diff -Nrc3pad gcc-3.2.3/.brik gcc-3.3/.brik *** gcc-3.2.3/.brik 2003-04-22 09:56:16.000000000 +0000 --- gcc-3.3/.brik 2003-05-14 02:48:05.000000000 +0000 *************** *** 3,82 **** # CRC-32 filename # ------ -------- ! 3205162104b ./.cvsignore ! 2680648595b ./BUGS ! 2171125041b ./COPYING ! 508743035b ./COPYING.LIB ! 3991841618b ./ChangeLog ! 835327280b ./FAQ ! 4190923194b ./GNATS ! 2229468985b ./INSTALL/README ! 1594371290b ./INSTALL/binaries.html ! 984517660b ./INSTALL/build.html ! 850286653b ./INSTALL/configure.html ! 3411038527b ./INSTALL/download.html ! 371279032b ./INSTALL/finalinstall.html ! 2697832096b ./INSTALL/gfdl.html ! 3334357163b ./INSTALL/index.html ! 503704929b ./INSTALL/old.html ! 4178635678b ./INSTALL/specific.html ! 2431446841b ./INSTALL/test.html ! 4287295648b ./MAINTAINERS ! 3313742257b ./Makefile.in ! 3697693037b ./README ! 655018850b ./boehm-gc/AmigaOS.c ! 2411687152b ./boehm-gc/BCC_MAKEFILE ! 1966835067b ./boehm-gc/ChangeLog ! 3428452570b ./boehm-gc/EMX_MAKEFILE ! 145946109b ./boehm-gc/MacOS.c ! 591574792b ./boehm-gc/MacProjects.sit.hqx ! 3338272940b ./boehm-gc/Mac_files/MacOS_Test_config.h ! 537693184b ./boehm-gc/Mac_files/MacOS_config.h ! 789649079b ./boehm-gc/Mac_files/dataend.c ! 3520138091b ./boehm-gc/Mac_files/datastart.c ! 2647418481b ./boehm-gc/Makefile.DLLs ! 2938168783b ./boehm-gc/Makefile.am ! 3148936110b ./boehm-gc/Makefile.direct ! 3806813747b ./boehm-gc/Makefile.dist ! 87051491b ./boehm-gc/Makefile.dj ! 3291187154b ./boehm-gc/Makefile.in ! 3941839401b ./boehm-gc/NT_MAKEFILE ! 3607948475b ./boehm-gc/NT_THREADS_MAKEFILE ! 3289014202b ./boehm-gc/OS2_MAKEFILE ! 2438519321b ./boehm-gc/PCR-Makefile ! 2956367466b ./boehm-gc/SMakefile.amiga ! 205379550b ./boehm-gc/WCC_MAKEFILE ! 643045998b ./boehm-gc/acinclude.m4 ! 2700729979b ./boehm-gc/aclocal.m4 971051254b ./boehm-gc/add_gc_prefix.c 2056900000b ./boehm-gc/allchblk.c ! 182725132b ./boehm-gc/alloc.c 1198071641b ./boehm-gc/alpha_mach_dep.s 3099799990b ./boehm-gc/backgraph.c 394605993b ./boehm-gc/blacklst.c 971406525b ./boehm-gc/callprocs 2542310219b ./boehm-gc/checksums.c 1272640704b ./boehm-gc/config.guess 4182969326b ./boehm-gc/config.sub ! 3736558677b ./boehm-gc/configure 2331870630b ./boehm-gc/configure.host ! 1394793554b ./boehm-gc/configure.in 3430717956b ./boehm-gc/cord/cordbscs.c 473686535b ./boehm-gc/cord/cordprnt.c 1796537586b ./boehm-gc/cord/cordtest.c 3610557498b ./boehm-gc/cord/cordxtra.c 1399512076b ./boehm-gc/cord/de.c 3493089115b ./boehm-gc/cord/de_cmds.h - 2226183422b ./boehm-gc/cord/de_win.ICO - 2296745137b ./boehm-gc/cord/de_win.RC 1274913051b ./boehm-gc/cord/de_win.c 1969645283b ./boehm-gc/cord/de_win.h 3479570773b ./boehm-gc/dbg_mlc.c 4155306217b ./boehm-gc/digimars.mak 1852147885b ./boehm-gc/doc/README - 2912965872b ./boehm-gc/doc/README.Mac - 3192387476b ./boehm-gc/doc/README.MacOSX - 1009764294b ./boehm-gc/doc/README.OS2 1398938057b ./boehm-gc/doc/README.amiga 3968038895b ./boehm-gc/doc/README.autoconf 609394135b ./boehm-gc/doc/README.changes --- 3,43 ---- # CRC-32 filename # ------ -------- ! 1177862404b ./boehm-gc/acinclude.m4 ! 1236612374b ./boehm-gc/aclocal.m4 971051254b ./boehm-gc/add_gc_prefix.c 2056900000b ./boehm-gc/allchblk.c ! 33265057b ./boehm-gc/alloc.c 1198071641b ./boehm-gc/alpha_mach_dep.s + 655018850b ./boehm-gc/AmigaOS.c 3099799990b ./boehm-gc/backgraph.c + 2411687152b ./boehm-gc/BCC_MAKEFILE 394605993b ./boehm-gc/blacklst.c 971406525b ./boehm-gc/callprocs + 688163094b ./boehm-gc/ChangeLog 2542310219b ./boehm-gc/checksums.c 1272640704b ./boehm-gc/config.guess 4182969326b ./boehm-gc/config.sub ! 2472545041b ./boehm-gc/configure 2331870630b ./boehm-gc/configure.host ! 1266343671b ./boehm-gc/configure.in 3430717956b ./boehm-gc/cord/cordbscs.c 473686535b ./boehm-gc/cord/cordprnt.c 1796537586b ./boehm-gc/cord/cordtest.c 3610557498b ./boehm-gc/cord/cordxtra.c 1399512076b ./boehm-gc/cord/de.c 3493089115b ./boehm-gc/cord/de_cmds.h 1274913051b ./boehm-gc/cord/de_win.c 1969645283b ./boehm-gc/cord/de_win.h + 2226183422b ./boehm-gc/cord/de_win.ICO + 2296745137b ./boehm-gc/cord/de_win.RC 3479570773b ./boehm-gc/dbg_mlc.c 4155306217b ./boehm-gc/digimars.mak + 602673483b ./boehm-gc/doc/barrett_diagram + 2134574438b ./boehm-gc/doc/debugging.html + 4112273729b ./boehm-gc/doc/gcdescr.html + 2587456343b ./boehm-gc/doc/gc.man 1852147885b ./boehm-gc/doc/README 1398938057b ./boehm-gc/doc/README.amiga 3968038895b ./boehm-gc/doc/README.autoconf 609394135b ./boehm-gc/doc/README.changes *************** *** 87,127 **** 1544667036b ./boehm-gc/doc/README.ews4800 2032435380b ./boehm-gc/doc/README.hp 261398962b ./boehm-gc/doc/README.linux 3651372180b ./boehm-gc/doc/README.macros 3249391671b ./boehm-gc/doc/README.rs6000 2157435131b ./boehm-gc/doc/README.sgi 2210572734b ./boehm-gc/doc/README.solaris2 1044770375b ./boehm-gc/doc/README.uts 3162142981b ./boehm-gc/doc/README.win32 - 602673483b ./boehm-gc/doc/barrett_diagram - 2134574438b ./boehm-gc/doc/debugging.html - 2587456343b ./boehm-gc/doc/gc.man - 4112273729b ./boehm-gc/doc/gcdescr.html 1244216301b ./boehm-gc/doc/tree.html ! 1267269518b ./boehm-gc/dyn_load.c 110360283b ./boehm-gc/finalize.c - 3607948475b ./boehm-gc/gc.mak 3449835837b ./boehm-gc/gc_cpp.cc 231223753b ./boehm-gc/gc_cpp.cpp - 145159317b ./boehm-gc/gc_dlopen.c 3458300802b ./boehm-gc/gcc_support.c 4111426693b ./boehm-gc/gcj_mlc.c 3106502053b ./boehm-gc/gcname.c 1644234138b ./boehm-gc/headers.c 1596485799b ./boehm-gc/hpux_test_and_clear.s 1676909184b ./boehm-gc/ia64_save_regs_in_stack.s 3582080946b ./boehm-gc/if_mach.c 387600055b ./boehm-gc/if_not_there.c - 695561534b ./boehm-gc/include/Makefile.am - 3142769731b ./boehm-gc/include/Makefile.in 3897882033b ./boehm-gc/include/cord.h 214150158b ./boehm-gc/include/ec.h - 61666144b ./boehm-gc/include/gc.h 2874534410b ./boehm-gc/include/gc_alloc.h 1922524680b ./boehm-gc/include/gc_amiga_redirects.h 3531915622b ./boehm-gc/include/gc_backptr.h 1564499082b ./boehm-gc/include/gc_cpp.h 2080667503b ./boehm-gc/include/gc_gcj.h 30043067b ./boehm-gc/include/gc_inl.h 601682422b ./boehm-gc/include/gc_inline.h 2851726125b ./boehm-gc/include/gc_local_alloc.h --- 48,86 ---- 1544667036b ./boehm-gc/doc/README.ews4800 2032435380b ./boehm-gc/doc/README.hp 261398962b ./boehm-gc/doc/README.linux + 2912965872b ./boehm-gc/doc/README.Mac + 3192387476b ./boehm-gc/doc/README.MacOSX 3651372180b ./boehm-gc/doc/README.macros + 1009764294b ./boehm-gc/doc/README.OS2 3249391671b ./boehm-gc/doc/README.rs6000 2157435131b ./boehm-gc/doc/README.sgi 2210572734b ./boehm-gc/doc/README.solaris2 1044770375b ./boehm-gc/doc/README.uts 3162142981b ./boehm-gc/doc/README.win32 1244216301b ./boehm-gc/doc/tree.html ! 414780111b ./boehm-gc/dyn_load.c ! 3428452570b ./boehm-gc/EMX_MAKEFILE 110360283b ./boehm-gc/finalize.c 3449835837b ./boehm-gc/gc_cpp.cc 231223753b ./boehm-gc/gc_cpp.cpp 3458300802b ./boehm-gc/gcc_support.c + 145159317b ./boehm-gc/gc_dlopen.c 4111426693b ./boehm-gc/gcj_mlc.c + 3607948475b ./boehm-gc/gc.mak 3106502053b ./boehm-gc/gcname.c 1644234138b ./boehm-gc/headers.c 1596485799b ./boehm-gc/hpux_test_and_clear.s 1676909184b ./boehm-gc/ia64_save_regs_in_stack.s 3582080946b ./boehm-gc/if_mach.c 387600055b ./boehm-gc/if_not_there.c 3897882033b ./boehm-gc/include/cord.h 214150158b ./boehm-gc/include/ec.h 2874534410b ./boehm-gc/include/gc_alloc.h 1922524680b ./boehm-gc/include/gc_amiga_redirects.h 3531915622b ./boehm-gc/include/gc_backptr.h 1564499082b ./boehm-gc/include/gc_cpp.h 2080667503b ./boehm-gc/include/gc_gcj.h + 61666144b ./boehm-gc/include/gc.h 30043067b ./boehm-gc/include/gc_inl.h 601682422b ./boehm-gc/include/gc_inline.h 2851726125b ./boehm-gc/include/gc_local_alloc.h *************** *** 130,172 **** 3286861254b ./boehm-gc/include/gc_typed.h 2246764458b ./boehm-gc/include/javaxfc.h 4237951566b ./boehm-gc/include/leak_detector.h 3792791209b ./boehm-gc/include/new_gc_alloc.h 1547838704b ./boehm-gc/include/private/cord_pos.h 902196938b ./boehm-gc/include/private/dbg_mlc.h 1215170430b ./boehm-gc/include/private/gc_hdrs.h ! 687589575b ./boehm-gc/include/private/gc_locks.h 583510369b ./boehm-gc/include/private/gc_pmark.h ! 2936482199b ./boehm-gc/include/private/gc_priv.h ! 1218966353b ./boehm-gc/include/private/gcconfig.h 2686914147b ./boehm-gc/include/private/solaris_threads.h 3935909412b ./boehm-gc/include/private/specific.h 2262051120b ./boehm-gc/include/weakpointer.h 4171599065b ./boehm-gc/install-sh ! 3059795267b ./boehm-gc/irix_threads.c 1133052236b ./boehm-gc/libtool.m4 ! 3750760998b ./boehm-gc/linux_threads.c ! 3535854335b ./boehm-gc/ltconfig ! 2828184627b ./boehm-gc/ltmain.sh ! 2932074179b ./boehm-gc/mach_dep.c 4270565414b ./boehm-gc/malloc.c 3656007348b ./boehm-gc/mallocx.c 2488176063b ./boehm-gc/mark.c ! 4184892336b ./boehm-gc/mark_rts.c 2792262463b ./boehm-gc/mips_sgi_mach_dep.S 447949782b ./boehm-gc/mips_ultrix_mach_dep.s ! 1352116856b ./boehm-gc/misc.c 4236112450b ./boehm-gc/mkinstalldirs 2583630088b ./boehm-gc/new_hblk.c 1361724709b ./boehm-gc/obj_map.c ! 3844001122b ./boehm-gc/os_dep.c 600864111b ./boehm-gc/pc_excludes 735852084b ./boehm-gc/pcr_interface.c 811834911b ./boehm-gc/powerpc_macosx_mach_dep.s 105828241b ./boehm-gc/ptr_chck.c 3988382907b ./boehm-gc/real_malloc.c 2946495074b ./boehm-gc/reclaim.c 2737439630b ./boehm-gc/rs6000_mach_dep.s 636267038b ./boehm-gc/setjmp_t.c 751650501b ./boehm-gc/solaris_pthreads.c 275051372b ./boehm-gc/solaris_threads.c 1425695416b ./boehm-gc/sparc_mach_dep.S --- 89,150 ---- 3286861254b ./boehm-gc/include/gc_typed.h 2246764458b ./boehm-gc/include/javaxfc.h 4237951566b ./boehm-gc/include/leak_detector.h + 1222266555b ./boehm-gc/include/Makefile.am + 2340206284b ./boehm-gc/include/Makefile.in 3792791209b ./boehm-gc/include/new_gc_alloc.h 1547838704b ./boehm-gc/include/private/cord_pos.h 902196938b ./boehm-gc/include/private/dbg_mlc.h + 3820561693b ./boehm-gc/include/private/gcconfig.h 1215170430b ./boehm-gc/include/private/gc_hdrs.h ! 3411375301b ./boehm-gc/include/private/gc_locks.h 583510369b ./boehm-gc/include/private/gc_pmark.h ! 1990877525b ./boehm-gc/include/private/gc_priv.h 2686914147b ./boehm-gc/include/private/solaris_threads.h 3935909412b ./boehm-gc/include/private/specific.h 2262051120b ./boehm-gc/include/weakpointer.h 4171599065b ./boehm-gc/install-sh ! 175500712b ./boehm-gc/irix_threads.c 1133052236b ./boehm-gc/libtool.m4 ! 3899988461b ./boehm-gc/linux_threads.c ! 604657675b ./boehm-gc/ltconfig ! 3301916719b ./boehm-gc/ltmain.sh ! 789649079b ./boehm-gc/Mac_files/dataend.c ! 3520138091b ./boehm-gc/Mac_files/datastart.c ! 537693184b ./boehm-gc/Mac_files/MacOS_config.h ! 3338272940b ./boehm-gc/Mac_files/MacOS_Test_config.h ! 1572371745b ./boehm-gc/mach_dep.c ! 145946109b ./boehm-gc/MacOS.c ! 591574792b ./boehm-gc/MacProjects.sit.hqx ! 2938168783b ./boehm-gc/Makefile.am ! 3148936110b ./boehm-gc/Makefile.direct ! 3806813747b ./boehm-gc/Makefile.dist ! 87051491b ./boehm-gc/Makefile.dj ! 2647418481b ./boehm-gc/Makefile.DLLs ! 3291187154b ./boehm-gc/Makefile.in 4270565414b ./boehm-gc/malloc.c 3656007348b ./boehm-gc/mallocx.c 2488176063b ./boehm-gc/mark.c ! 2210067257b ./boehm-gc/mark_rts.c 2792262463b ./boehm-gc/mips_sgi_mach_dep.S 447949782b ./boehm-gc/mips_ultrix_mach_dep.s ! 3319150875b ./boehm-gc/misc.c 4236112450b ./boehm-gc/mkinstalldirs 2583630088b ./boehm-gc/new_hblk.c + 3941839401b ./boehm-gc/NT_MAKEFILE + 3607948475b ./boehm-gc/NT_THREADS_MAKEFILE 1361724709b ./boehm-gc/obj_map.c ! 3289014202b ./boehm-gc/OS2_MAKEFILE ! 2236606828b ./boehm-gc/os_dep.c 600864111b ./boehm-gc/pc_excludes 735852084b ./boehm-gc/pcr_interface.c + 2438519321b ./boehm-gc/PCR-Makefile 811834911b ./boehm-gc/powerpc_macosx_mach_dep.s 105828241b ./boehm-gc/ptr_chck.c 3988382907b ./boehm-gc/real_malloc.c 2946495074b ./boehm-gc/reclaim.c 2737439630b ./boehm-gc/rs6000_mach_dep.s 636267038b ./boehm-gc/setjmp_t.c + 2956367466b ./boehm-gc/SMakefile.amiga 751650501b ./boehm-gc/solaris_pthreads.c 275051372b ./boehm-gc/solaris_threads.c 1425695416b ./boehm-gc/sparc_mach_dep.S *************** *** 182,1776 **** 3287937987b ./boehm-gc/threadlibs.c 2467355438b ./boehm-gc/typd_mlc.c 332085760b ./boehm-gc/version.h ! 3326583566b ./boehm-gc/win32_threads.c 1129492486b ./bugs.html ! 1583135805b ./config-ml.in 3794184949b ./config.guess ! 1864899138b ./config.if ! 537897852b ./config.sub ! 114139691b ./config/ChangeLog ! 3004978457b ./config/acinclude.m4 ! 3007349820b ./config/mh-a68bsd 1442196770b ./config/mh-aix386 ! 3054121875b ./config/mh-apollo68 3478341494b ./config/mh-armpic ! 1811916229b ./config/mh-cxux 3020282061b ./config/mh-cygwin ! 2180612469b ./config/mh-decstation 973727842b ./config/mh-delta88 ! 2133351807b ./config/mh-dgux ! 746894734b ./config/mh-dgux386 3870705974b ./config/mh-djgpp 3478341494b ./config/mh-elfalphapic ! 41994544b ./config/mh-hp300 ! 318860404b ./config/mh-hpux ! 318860404b ./config/mh-hpux8 3478341494b ./config/mh-i370pic 3265825290b ./config/mh-ia64pic ! 2339341800b ./config/mh-interix ! 3277888801b ./config/mh-irix4 ! 1357357208b ./config/mh-irix5 ! 200282509b ./config/mh-irix6 ! 2624861245b ./config/mh-lynxos ! 1194372982b ./config/mh-lynxrs6k 3265825290b ./config/mh-m68kpic ! 1904254329b ./config/mh-mingw32 ! 3317263548b ./config/mh-ncr3000 ! 2638893829b ./config/mh-ncrsvr43 ! 4287527672b ./config/mh-necv4 ! 3000874205b ./config/mh-openedition 3478341494b ./config/mh-papic 3478341494b ./config/mh-ppcpic ! 136062744b ./config/mh-riscos ! 407821128b ./config/mh-sco ! 2015316329b ./config/mh-solaris 1399222241b ./config/mh-sparcpic ! 889431517b ./config/mh-sun3 ! 1253937510b ./config/mh-sysv ! 3104599531b ./config/mh-sysv4 ! 2519884023b ./config/mh-sysv5 ! 456622165b ./config/mh-vaxult2 3265825290b ./config/mh-x86pic ! 198559626b ./config/mpw-mh-mpw ! 108267066b ./config/mpw/ChangeLog ! 3145098931b ./config/mpw/MoveIfChange ! 1476422091b ./config/mpw/README ! 4005879853b ./config/mpw/forward-include ! 439409833b ./config/mpw/g-mpw-make.sed ! 2800114792b ./config/mpw/mpw-touch ! 3832565257b ./config/mpw/mpw-true ! 792347706b ./config/mpw/null-command ! 3439853311b ./config/mpw/open-brace ! 779160003b ./config/mpw/tr-7to8-src ! 3832565257b ./config/mpw/true 2474610656b ./config/mt-aix43 3955224621b ./config/mt-alphaieee - 536974328b ./config/mt-armpic 1487563357b ./config/mt-d30v - 536974328b ./config/mt-elfalphapic - 536974328b ./config/mt-i370pic - 771382916b ./config/mt-ia64pic 3571760336b ./config/mt-linux - 771382916b ./config/mt-m68kpic 2548851201b ./config/mt-netware 971016637b ./config/mt-ospace - 536974328b ./config/mt-papic - 536974328b ./config/mt-ppcpic - 1847648786b ./config/mt-sparcpic 787786243b ./config/mt-v810 2659154290b ./config/mt-wince ! 771382916b ./config/mt-x86pic ! 2416042097b ./configure ! 3230279174b ./configure.in ! 3512451768b ./contrib/ChangeLog 1948950130b ./contrib/analyze_brprob 550196746b ./contrib/compare_tests 2828387446b ./contrib/convert_to_f2c 2929939770b ./contrib/convert_to_g2c 2025073358b ./contrib/download_f2c - 2292355102b ./contrib/gcc_build - 1246833311b ./contrib/gcc_update 1336632236b ./contrib/gccbug.el 109296376b ./contrib/gennews 4256039795b ./contrib/index-prop 3683285493b ./contrib/newcvsroot ! 2125180271b ./contrib/regression/ChangeLog 1757898889b ./contrib/regression/README ! 1596938872b ./contrib/regression/btest-gcc.sh ! 4208566980b ./contrib/regression/objs-gcc.sh ! 1865505596b ./contrib/regression/site.exp ! 1623905231b ./contrib/test_installed ! 2523431553b ./contrib/test_summary ! 3362750683b ./contrib/texi2pod.pl 4228623080b ./contrib/warn_summary ! 2887273247b ./faq.html 1005262133b ./fastjar/AUTHORS 1745615150b ./fastjar/CHANGES - 1396100520b ./fastjar/COPYING - 4056720975b ./fastjar/ChangeLog - 2770615802b ./fastjar/INSTALL - 3714739366b ./fastjar/Makefile.am - 39617579b ./fastjar/Makefile.in - 4038493440b ./fastjar/NEWS - 3780741064b ./fastjar/README - 3513702948b ./fastjar/aclocal.m4 3743222129b ./fastjar/compress.c 1169302702b ./fastjar/compress.h ! 754715889b ./fastjar/config.h.in ! 1796406241b ./fastjar/configure ! 1220094724b ./fastjar/configure.in ! 3353116274b ./fastjar/dostime.c 446939748b ./fastjar/dostime.h 2331671736b ./fastjar/install-defs.sh.in 1178077958b ./fastjar/install-sh ! 1960714715b ./fastjar/jargrep.c 4062871816b ./fastjar/jargrep.h ! 2153374785b ./fastjar/jartool.c 2754304773b ./fastjar/jartool.h 990942143b ./fastjar/missing 1455437353b ./fastjar/mkinstalldirs 1315168235b ./fastjar/pushback.c 302085493b ./fastjar/pushback.h 216805921b ./fastjar/stamp-h.in 3071504729b ./fastjar/zipfile.h ! 4208197548b ./gcc/.cvsignore ! 2539671184b ./gcc/ABOUT-GCC-NLS ! 1758308615b ./gcc/ABOUT-NLS ! 2171125041b ./gcc/COPYING ! 508743035b ./gcc/COPYING.LIB ! 2608914462b ./gcc/ChangeLog ! 1398127668b ./gcc/ChangeLog.0 ! 2827765101b ./gcc/ChangeLog.1 ! 1199055802b ./gcc/ChangeLog.2 ! 2924329613b ./gcc/ChangeLog.3 ! 164761891b ./gcc/ChangeLog.4 ! 1481898300b ./gcc/ChangeLog.5 ! 2613464808b ./gcc/ChangeLog.6 ! 3235050590b ./gcc/ChangeLog.lib ! 2146007539b ./gcc/FSFChangeLog ! 4184732518b ./gcc/FSFChangeLog.10 ! 3797967515b ./gcc/FSFChangeLog.11 ! 4134111346b ./gcc/LANGUAGES ! 214390302b ./gcc/Makefile.in ! 1084812157b ./gcc/NEWS ! 538471119b ./gcc/ONEWS ! 2799003008b ./gcc/README-fixinc ! 2741038711b ./gcc/README.Portability ! 1084935625b ./gcc/SERVICE 3729933059b ./gcc/acconfig.h ! 3650551157b ./gcc/aclocal.m4 ! 4242669380b ./gcc/ada/1aexcept.adb ! 956455478b ./gcc/ada/1aexcept.ads ! 1459838793b ./gcc/ada/1ic.ads ! 3953623706b ./gcc/ada/31soccon.ads ! 2884972597b ./gcc/ada/31soliop.ads ! 4248758801b ./gcc/ada/3asoccon.ads ! 3931896843b ./gcc/ada/3bsoccon.ads ! 3560754896b ./gcc/ada/3gsoccon.ads ! 580031672b ./gcc/ada/3hsoccon.ads ! 229359869b ./gcc/ada/3lsoccon.ads ! 2442231443b ./gcc/ada/3ssoccon.ads ! 1502394419b ./gcc/ada/3ssoliop.ads ! 3387310401b ./gcc/ada/3wsoccon.ads ! 391658942b ./gcc/ada/3wsocthi.adb ! 1356739718b ./gcc/ada/3wsocthi.ads ! 681502184b ./gcc/ada/3wsoliop.ads ! 3245682325b ./gcc/ada/41intnam.ads ! 2662178618b ./gcc/ada/42intnam.ads ! 959518590b ./gcc/ada/4aintnam.ads ! 3097801335b ./gcc/ada/4cintnam.ads ! 481858334b ./gcc/ada/4dintnam.ads ! 4162574675b ./gcc/ada/4gintnam.ads ! 2002752921b ./gcc/ada/4hexcpol.adb ! 2499132704b ./gcc/ada/4hintnam.ads ! 222726646b ./gcc/ada/4lintnam.ads ! 374384539b ./gcc/ada/4mintnam.ads ! 3241941732b ./gcc/ada/4nintnam.ads ! 620116621b ./gcc/ada/4ointnam.ads ! 3443503753b ./gcc/ada/4onumaux.ads ! 1566782773b ./gcc/ada/4pintnam.ads ! 3406122898b ./gcc/ada/4rintnam.ads ! 459655329b ./gcc/ada/4sintnam.ads ! 719827780b ./gcc/ada/4uintnam.ads ! 1115932068b ./gcc/ada/4vcaldel.adb ! 4160669776b ./gcc/ada/4vcalend.adb ! 2943884446b ./gcc/ada/4vcalend.ads ! 1904156899b ./gcc/ada/4vintnam.ads ! 594124201b ./gcc/ada/4wcalend.adb ! 3762378663b ./gcc/ada/4wexcpol.adb ! 1710451163b ./gcc/ada/4wintnam.ads ! 548303504b ./gcc/ada/4zintnam.ads ! 770211451b ./gcc/ada/4znumaux.ads ! 930797522b ./gcc/ada/4zsytaco.adb ! 3071531568b ./gcc/ada/4zsytaco.ads ! 3569647494b ./gcc/ada/51osinte.adb ! 2532503682b ./gcc/ada/51osinte.ads ! 3468089494b ./gcc/ada/52osinte.adb ! 2083506135b ./gcc/ada/52osinte.ads ! 765740382b ./gcc/ada/52system.ads ! 3057318985b ./gcc/ada/53osinte.ads ! 3513991105b ./gcc/ada/54osinte.ads ! 249779471b ./gcc/ada/5amastop.adb ! 1653378497b ./gcc/ada/5aosinte.adb ! 3367754742b ./gcc/ada/5aosinte.ads ! 3819202190b ./gcc/ada/5asystem.ads ! 613172531b ./gcc/ada/5ataprop.adb ! 3013377906b ./gcc/ada/5atasinf.ads ! 3014755298b ./gcc/ada/5ataspri.ads ! 3667261101b ./gcc/ada/5atpopsp.adb ! 3916423708b ./gcc/ada/5avxwork.ads ! 3659011384b ./gcc/ada/5bosinte.adb ! 2779241737b ./gcc/ada/5bosinte.ads ! 2308169616b ./gcc/ada/5bsystem.ads ! 1335114659b ./gcc/ada/5cosinte.ads ! 2058704820b ./gcc/ada/5dosinte.ads ! 1118228281b ./gcc/ada/5esystem.ads ! 74251179b ./gcc/ada/5etpopse.adb ! 745978377b ./gcc/ada/5fintman.adb ! 3658042447b ./gcc/ada/5fosinte.ads ! 3136371085b ./gcc/ada/5fsystem.ads ! 1678802713b ./gcc/ada/5ftaprop.adb ! 2739603168b ./gcc/ada/5ftasinf.ads ! 3610821942b ./gcc/ada/5ginterr.adb ! 975866538b ./gcc/ada/5gintman.adb ! 1378115556b ./gcc/ada/5gmastop.adb ! 2183233435b ./gcc/ada/5gosinte.ads ! 571431837b ./gcc/ada/5gproinf.adb ! 3191048862b ./gcc/ada/5gproinf.ads ! 693393540b ./gcc/ada/5gsystem.ads ! 2970373496b ./gcc/ada/5gtaprop.adb ! 2321444413b ./gcc/ada/5gtasinf.adb ! 3287583301b ./gcc/ada/5gtasinf.ads ! 2785741821b ./gcc/ada/5gtpgetc.adb ! 3503873280b ./gcc/ada/5hosinte.adb ! 2098542990b ./gcc/ada/5hosinte.ads ! 2099158447b ./gcc/ada/5hparame.ads ! 3465869647b ./gcc/ada/5hsystem.ads ! 1377954775b ./gcc/ada/5htaprop.adb ! 158492006b ./gcc/ada/5htaspri.ads ! 58230655b ./gcc/ada/5htraceb.adb ! 703108891b ./gcc/ada/5iosinte.adb ! 3200296303b ./gcc/ada/5iosinte.ads ! 1823263396b ./gcc/ada/5itaprop.adb ! 2428441881b ./gcc/ada/5itaspri.ads ! 258764448b ./gcc/ada/5ksystem.ads ! 801131281b ./gcc/ada/5kvxwork.ads ! 3740352184b ./gcc/ada/5lintman.adb ! 2092578045b ./gcc/ada/5lml-tgt.adb ! 1560385947b ./gcc/ada/5losinte.ads ! 566581471b ./gcc/ada/5lsystem.ads ! 3212004635b ./gcc/ada/5mosinte.ads ! 2556228116b ./gcc/ada/5mvxwork.ads ! 1277970924b ./gcc/ada/5ninmaop.adb ! 921618338b ./gcc/ada/5nintman.adb ! 2773599964b ./gcc/ada/5nosinte.ads ! 2606543337b ./gcc/ada/5ntaprop.adb ! 3755362459b ./gcc/ada/5ntaspri.ads ! 2203283165b ./gcc/ada/5ointerr.adb ! 4214075066b ./gcc/ada/5omastop.adb ! 51561081b ./gcc/ada/5oosinte.adb ! 3809744645b ./gcc/ada/5oosinte.ads ! 2928684265b ./gcc/ada/5oosprim.adb ! 2072280969b ./gcc/ada/5oparame.adb ! 3575712341b ./gcc/ada/5osystem.ads ! 679733143b ./gcc/ada/5otaprop.adb ! 1685662286b ./gcc/ada/5otaspri.ads ! 656589266b ./gcc/ada/5posinte.ads ! 3394687510b ./gcc/ada/5posprim.adb ! 1947102917b ./gcc/ada/5pvxwork.ads ! 2218896062b ./gcc/ada/5qosinte.adb ! 147874672b ./gcc/ada/5qosinte.ads ! 487900047b ./gcc/ada/5qparame.ads ! 1923594129b ./gcc/ada/5qstache.adb ! 2941573152b ./gcc/ada/5qtaprop.adb ! 3425306326b ./gcc/ada/5qtaspri.ads ! 3925078434b ./gcc/ada/5qvxwork.ads ! 3811279815b ./gcc/ada/5rosinte.adb ! 1423354446b ./gcc/ada/5rosinte.ads ! 341619696b ./gcc/ada/5rparame.adb ! 2774640451b ./gcc/ada/5rtpopsp.adb ! 3395974413b ./gcc/ada/5sintman.adb ! 2666853386b ./gcc/ada/5smastop.adb ! 946915847b ./gcc/ada/5sosinte.adb ! 1686512140b ./gcc/ada/5sosinte.ads ! 1089056181b ./gcc/ada/5sparame.adb ! 1789906565b ./gcc/ada/5ssystem.ads ! 1618657802b ./gcc/ada/5staprop.adb ! 2345225497b ./gcc/ada/5stasinf.adb ! 2933480236b ./gcc/ada/5stasinf.ads ! 3413502572b ./gcc/ada/5staspri.ads ! 1154412482b ./gcc/ada/5stpopse.adb ! 67524432b ./gcc/ada/5svxwork.ads ! 3415155229b ./gcc/ada/5tosinte.ads ! 512605178b ./gcc/ada/5uintman.adb ! 4009109831b ./gcc/ada/5uosinte.ads ! 20834007b ./gcc/ada/5vasthan.adb ! 2828545983b ./gcc/ada/5vinmaop.adb ! 757746642b ./gcc/ada/5vinterr.adb ! 3554377996b ./gcc/ada/5vintman.adb ! 4186329246b ./gcc/ada/5vintman.ads ! 1363122615b ./gcc/ada/5vmastop.adb ! 2126801266b ./gcc/ada/5vosinte.adb ! 257481916b ./gcc/ada/5vosinte.ads ! 2697009894b ./gcc/ada/5vosprim.adb ! 3173364854b ./gcc/ada/5vosprim.ads ! 1485530536b ./gcc/ada/5vparame.ads ! 477268412b ./gcc/ada/5vsystem.ads ! 880665297b ./gcc/ada/5vtaprop.adb ! 2017768241b ./gcc/ada/5vtaspri.ads ! 1524831970b ./gcc/ada/5vtpopde.adb ! 2510422485b ./gcc/ada/5vtpopde.ads ! 1323493335b ./gcc/ada/5vvaflop.adb ! 2061622518b ./gcc/ada/5wgloloc.adb ! 2867255266b ./gcc/ada/5wintman.adb ! 379035915b ./gcc/ada/5wmemory.adb ! 1635278585b ./gcc/ada/5wosinte.ads ! 2409163205b ./gcc/ada/5wosprim.adb ! 478208583b ./gcc/ada/5wsystem.ads ! 3106892401b ./gcc/ada/5wtaprop.adb ! 4085824633b ./gcc/ada/5wtaspri.ads ! 3290324010b ./gcc/ada/5ysystem.ads ! 218453075b ./gcc/ada/5zinterr.adb ! 2488090528b ./gcc/ada/5zintman.adb ! 3420496615b ./gcc/ada/5zosinte.adb ! 217803163b ./gcc/ada/5zosinte.ads ! 2386679201b ./gcc/ada/5zosprim.adb ! 4153514169b ./gcc/ada/5zparame.ads ! 2955891758b ./gcc/ada/5zsystem.ads ! 1056290651b ./gcc/ada/5ztaprop.adb ! 2493859349b ./gcc/ada/6vcpp.adb ! 3764631364b ./gcc/ada/6vcstrea.adb ! 1298363378b ./gcc/ada/6vinterf.ads ! 4042684575b ./gcc/ada/7sinmaop.adb ! 784835892b ./gcc/ada/7sintman.adb ! 3674994444b ./gcc/ada/7sosinte.adb ! 1201544504b ./gcc/ada/7sosprim.adb ! 2188892819b ./gcc/ada/7staprop.adb ! 2314536447b ./gcc/ada/7staspri.ads ! 2244813175b ./gcc/ada/7stpopsp.adb ! 1360717481b ./gcc/ada/7straceb.adb ! 1989930650b ./gcc/ada/86numaux.adb ! 4223067829b ./gcc/ada/86numaux.ads ! 176063031b ./gcc/ada/9drpc.adb ! 3541119639b ./gcc/ada/ChangeLog ! 1021041780b ./gcc/ada/Make-lang.in ! 82447397b ./gcc/ada/Makefile.adalib ! 3683211435b ./gcc/ada/Makefile.in ! 1238937539b ./gcc/ada/a-astaco.adb ! 4160306902b ./gcc/ada/a-astaco.ads ! 1228169839b ./gcc/ada/a-caldel.adb ! 2176358398b ./gcc/ada/a-caldel.ads ! 3780985610b ./gcc/ada/a-calend.adb ! 3197442795b ./gcc/ada/a-calend.ads ! 1974463316b ./gcc/ada/a-chahan.adb ! 3292743834b ./gcc/ada/a-chahan.ads ! 825575293b ./gcc/ada/a-charac.ads ! 3290669737b ./gcc/ada/a-chlat1.ads ! 4141698919b ./gcc/ada/a-colien.adb ! 1708206584b ./gcc/ada/a-colien.ads ! 2886731379b ./gcc/ada/a-colire.adb ! 632756715b ./gcc/ada/a-colire.ads ! 4188471995b ./gcc/ada/a-comlin.adb ! 1346248274b ./gcc/ada/a-comlin.ads ! 3629140421b ./gcc/ada/a-cwila1.ads ! 3138793590b ./gcc/ada/a-decima.adb ! 1463764551b ./gcc/ada/a-decima.ads ! 2965106267b ./gcc/ada/a-diocst.adb ! 1351302553b ./gcc/ada/a-diocst.ads ! 2204236254b ./gcc/ada/a-direio.adb ! 2663951086b ./gcc/ada/a-direio.ads ! 2899453035b ./gcc/ada/a-dynpri.adb ! 1808034404b ./gcc/ada/a-dynpri.ads ! 1930539183b ./gcc/ada/a-einuoc.adb ! 2923383870b ./gcc/ada/a-einuoc.ads ! 3811259854b ./gcc/ada/a-except.adb ! 4208405793b ./gcc/ada/a-except.ads ! 4151617553b ./gcc/ada/a-excpol.adb ! 1040381731b ./gcc/ada/a-exctra.adb ! 87828562b ./gcc/ada/a-exctra.ads ! 2225675502b ./gcc/ada/a-filico.adb ! 3260597455b ./gcc/ada/a-filico.ads ! 907923324b ./gcc/ada/a-finali.adb ! 3572535024b ./gcc/ada/a-finali.ads ! 2422945006b ./gcc/ada/a-flteio.ads ! 3013254494b ./gcc/ada/a-fwteio.ads ! 1706398574b ./gcc/ada/a-inteio.ads ! 2001069544b ./gcc/ada/a-interr.adb ! 2400554368b ./gcc/ada/a-interr.ads ! 3855829577b ./gcc/ada/a-intnam.ads ! 1774182036b ./gcc/ada/a-intsig.adb ! 2389005781b ./gcc/ada/a-intsig.ads ! 2978442327b ./gcc/ada/a-ioexce.ads ! 2820771598b ./gcc/ada/a-iwteio.ads ! 2695025338b ./gcc/ada/a-lfteio.ads ! 68898824b ./gcc/ada/a-lfwtio.ads ! 3958947062b ./gcc/ada/a-liteio.ads ! 3989352502b ./gcc/ada/a-liwtio.ads ! 706064852b ./gcc/ada/a-llftio.ads ! 1760483522b ./gcc/ada/a-llfwti.ads ! 1685529166b ./gcc/ada/a-llitio.ads ! 1092110807b ./gcc/ada/a-lliwti.ads ! 3751218976b ./gcc/ada/a-ncelfu.ads ! 3307386742b ./gcc/ada/a-ngcefu.adb ! 3410028763b ./gcc/ada/a-ngcefu.ads ! 1098245021b ./gcc/ada/a-ngcoty.adb ! 3206810014b ./gcc/ada/a-ngcoty.ads ! 3316580416b ./gcc/ada/a-ngelfu.adb ! 3094594364b ./gcc/ada/a-ngelfu.ads ! 238508204b ./gcc/ada/a-nlcefu.ads ! 4084493045b ./gcc/ada/a-nlcoty.ads ! 2627472219b ./gcc/ada/a-nlelfu.ads ! 4117474264b ./gcc/ada/a-nllcef.ads ! 2318923524b ./gcc/ada/a-nllcty.ads ! 2611968609b ./gcc/ada/a-nllefu.ads ! 1082074441b ./gcc/ada/a-nscefu.ads ! 3357121256b ./gcc/ada/a-nscoty.ads ! 3712559791b ./gcc/ada/a-nselfu.ads ! 1597516775b ./gcc/ada/a-nucoty.ads ! 1662364886b ./gcc/ada/a-nudira.adb ! 3453922662b ./gcc/ada/a-nudira.ads ! 4261702712b ./gcc/ada/a-nuelfu.ads ! 2981834359b ./gcc/ada/a-nuflra.adb ! 197186767b ./gcc/ada/a-nuflra.ads ! 3913215245b ./gcc/ada/a-numaux.ads ! 1796312085b ./gcc/ada/a-numeri.ads ! 1699976913b ./gcc/ada/a-reatim.adb ! 2826402039b ./gcc/ada/a-reatim.ads ! 4184054556b ./gcc/ada/a-retide.adb ! 1321308146b ./gcc/ada/a-retide.ads ! 4225555660b ./gcc/ada/a-sequio.adb ! 3093499209b ./gcc/ada/a-sequio.ads ! 201813662b ./gcc/ada/a-sfteio.ads ! 768813005b ./gcc/ada/a-sfwtio.ads ! 3107027497b ./gcc/ada/a-siocst.adb ! 4067781141b ./gcc/ada/a-siocst.ads ! 2998945311b ./gcc/ada/a-siteio.ads ! 764480998b ./gcc/ada/a-siwtio.ads ! 164767602b ./gcc/ada/a-ssicst.adb ! 2673543741b ./gcc/ada/a-ssicst.ads ! 6703000b ./gcc/ada/a-ssitio.ads ! 597839343b ./gcc/ada/a-ssiwti.ads ! 358760311b ./gcc/ada/a-stmaco.ads ! 3991680331b ./gcc/ada/a-storio.adb ! 3996647403b ./gcc/ada/a-storio.ads ! 850701758b ./gcc/ada/a-strbou.adb ! 209100723b ./gcc/ada/a-strbou.ads ! 2712052749b ./gcc/ada/a-stream.ads ! 3445389326b ./gcc/ada/a-strfix.adb ! 2291830284b ./gcc/ada/a-strfix.ads ! 3358703553b ./gcc/ada/a-string.ads ! 1074484976b ./gcc/ada/a-strmap.adb ! 3962780233b ./gcc/ada/a-strmap.ads ! 2443268654b ./gcc/ada/a-strsea.adb ! 294757473b ./gcc/ada/a-strsea.ads ! 1067561841b ./gcc/ada/a-strunb.adb ! 4156134282b ./gcc/ada/a-strunb.ads ! 4032395003b ./gcc/ada/a-ststio.adb ! 1884417935b ./gcc/ada/a-ststio.ads ! 3010897568b ./gcc/ada/a-stunau.adb ! 3715203779b ./gcc/ada/a-stunau.ads ! 2054174824b ./gcc/ada/a-stwibo.adb ! 744358246b ./gcc/ada/a-stwibo.ads ! 3330826391b ./gcc/ada/a-stwifi.adb ! 2923302688b ./gcc/ada/a-stwifi.ads ! 3258659279b ./gcc/ada/a-stwima.adb ! 1429080954b ./gcc/ada/a-stwima.ads ! 1405535584b ./gcc/ada/a-stwise.adb ! 2375036092b ./gcc/ada/a-stwise.ads ! 3573494769b ./gcc/ada/a-stwiun.adb ! 4063750480b ./gcc/ada/a-stwiun.ads ! 1857462924b ./gcc/ada/a-suteio.adb ! 988077225b ./gcc/ada/a-suteio.ads ! 3427083052b ./gcc/ada/a-swmwco.ads ! 247624637b ./gcc/ada/a-swuwti.adb ! 1326104524b ./gcc/ada/a-swuwti.ads ! 3992727238b ./gcc/ada/a-sytaco.adb ! 4059971314b ./gcc/ada/a-sytaco.ads ! 2394326814b ./gcc/ada/a-tags.adb ! 3486033137b ./gcc/ada/a-tags.ads ! 1194894578b ./gcc/ada/a-tasatt.adb ! 2943432852b ./gcc/ada/a-tasatt.ads ! 2912651322b ./gcc/ada/a-taside.adb ! 646153741b ./gcc/ada/a-taside.ads ! 3438800004b ./gcc/ada/a-teioed.adb ! 1748001536b ./gcc/ada/a-teioed.ads ! 1427379759b ./gcc/ada/a-textio.adb ! 1210750137b ./gcc/ada/a-textio.ads ! 1749119361b ./gcc/ada/a-ticoau.adb ! 2222697472b ./gcc/ada/a-ticoau.ads ! 1221231446b ./gcc/ada/a-ticoio.adb ! 1223874862b ./gcc/ada/a-ticoio.ads ! 4279581986b ./gcc/ada/a-tideau.adb ! 434050393b ./gcc/ada/a-tideau.ads ! 2037256210b ./gcc/ada/a-tideio.adb ! 1718502310b ./gcc/ada/a-tideio.ads ! 529543928b ./gcc/ada/a-tienau.adb ! 3941439160b ./gcc/ada/a-tienau.ads ! 3371851163b ./gcc/ada/a-tienio.adb ! 3974972174b ./gcc/ada/a-tienio.ads ! 4188977439b ./gcc/ada/a-tifiio.adb ! 1786065440b ./gcc/ada/a-tifiio.ads ! 3558731868b ./gcc/ada/a-tiflau.adb ! 1745997125b ./gcc/ada/a-tiflau.ads ! 1485143016b ./gcc/ada/a-tiflio.adb ! 3470894323b ./gcc/ada/a-tiflio.ads ! 3323143227b ./gcc/ada/a-tigeau.adb ! 1729452158b ./gcc/ada/a-tigeau.ads ! 3932871049b ./gcc/ada/a-tiinau.adb ! 2369391467b ./gcc/ada/a-tiinau.ads ! 1924191553b ./gcc/ada/a-tiinio.adb ! 2729601893b ./gcc/ada/a-tiinio.ads ! 934261002b ./gcc/ada/a-timoau.adb ! 1113536362b ./gcc/ada/a-timoau.ads ! 4264051069b ./gcc/ada/a-timoio.adb ! 805418156b ./gcc/ada/a-timoio.ads ! 3870116277b ./gcc/ada/a-tiocst.adb ! 1562031680b ./gcc/ada/a-tiocst.ads ! 622798727b ./gcc/ada/a-titest.adb ! 1725647162b ./gcc/ada/a-titest.ads ! 278716747b ./gcc/ada/a-unccon.ads ! 1157859592b ./gcc/ada/a-uncdea.ads ! 3576417048b ./gcc/ada/a-witeio.adb ! 3179602980b ./gcc/ada/a-witeio.ads ! 3259356202b ./gcc/ada/a-wtcoau.adb ! 4157240054b ./gcc/ada/a-wtcoau.ads ! 2649721481b ./gcc/ada/a-wtcoio.adb ! 3041062214b ./gcc/ada/a-wtcoio.ads ! 2350995641b ./gcc/ada/a-wtcstr.adb ! 4151370387b ./gcc/ada/a-wtcstr.ads ! 737993830b ./gcc/ada/a-wtdeau.adb ! 1297223500b ./gcc/ada/a-wtdeau.ads ! 317498445b ./gcc/ada/a-wtdeio.adb ! 2698675362b ./gcc/ada/a-wtdeio.ads ! 1920359111b ./gcc/ada/a-wtedit.adb ! 4233035352b ./gcc/ada/a-wtedit.ads ! 3733610031b ./gcc/ada/a-wtenau.adb ! 1209649592b ./gcc/ada/a-wtenau.ads ! 1772371901b ./gcc/ada/a-wtenio.adb ! 3345087568b ./gcc/ada/a-wtenio.ads ! 3955231020b ./gcc/ada/a-wtfiio.adb ! 2966383122b ./gcc/ada/a-wtfiio.ads ! 3172802882b ./gcc/ada/a-wtflau.adb ! 2847914558b ./gcc/ada/a-wtflau.ads ! 1430031960b ./gcc/ada/a-wtflio.adb ! 3504471884b ./gcc/ada/a-wtflio.ads ! 146615287b ./gcc/ada/a-wtgeau.adb ! 3202407425b ./gcc/ada/a-wtgeau.ads ! 1556046286b ./gcc/ada/a-wtinau.adb ! 620705682b ./gcc/ada/a-wtinau.ads ! 3330610374b ./gcc/ada/a-wtinio.adb ! 1587983670b ./gcc/ada/a-wtinio.ads ! 585816566b ./gcc/ada/a-wtmoau.adb ! 2360842842b ./gcc/ada/a-wtmoau.ads ! 2728837322b ./gcc/ada/a-wtmoio.adb ! 994042627b ./gcc/ada/a-wtmoio.ads ! 10193259b ./gcc/ada/a-wttest.adb ! 3792433389b ./gcc/ada/a-wttest.ads ! 512963659b ./gcc/ada/ada-tree.def ! 804772500b ./gcc/ada/ada-tree.h ! 307313649b ./gcc/ada/ada.ads ! 4047226521b ./gcc/ada/ada.h ! 2708993726b ./gcc/ada/adafinal.c ! 885231182b ./gcc/ada/adaint.c ! 756054851b ./gcc/ada/adaint.h ! 3701505690b ./gcc/ada/ali-util.adb ! 534404399b ./gcc/ada/ali-util.ads ! 1582815074b ./gcc/ada/ali.adb ! 1110656306b ./gcc/ada/ali.ads ! 1648510288b ./gcc/ada/alloc.ads ! 151152579b ./gcc/ada/argv.c ! 2460925843b ./gcc/ada/atree.adb ! 1541614871b ./gcc/ada/atree.ads ! 1078226318b ./gcc/ada/atree.h ! 3092527849b ./gcc/ada/back_end.adb ! 477747165b ./gcc/ada/back_end.ads ! 554760143b ./gcc/ada/bcheck.adb ! 1423149518b ./gcc/ada/bcheck.ads ! 603483282b ./gcc/ada/binde.adb ! 608595938b ./gcc/ada/binde.ads ! 3034016752b ./gcc/ada/binderr.adb ! 861498600b ./gcc/ada/binderr.ads ! 3217748288b ./gcc/ada/bindgen.adb ! 3453434027b ./gcc/ada/bindgen.ads ! 715016497b ./gcc/ada/bindusg.adb ! 2507691128b ./gcc/ada/bindusg.ads ! 1055153314b ./gcc/ada/butil.adb ! 2616385499b ./gcc/ada/butil.ads ! 322199477b ./gcc/ada/cal.c ! 3874049157b ./gcc/ada/calendar.ads ! 3825818772b ./gcc/ada/casing.adb ! 2190810584b ./gcc/ada/casing.ads ! 3750437973b ./gcc/ada/ceinfo.adb ! 869185536b ./gcc/ada/checks.adb ! 440073759b ./gcc/ada/checks.ads ! 401488734b ./gcc/ada/cio.c ! 1870694279b ./gcc/ada/comperr.adb ! 1643780092b ./gcc/ada/comperr.ads ! 1676023100b ./gcc/ada/config-lang.in ! 3110809717b ./gcc/ada/csets.adb ! 519863585b ./gcc/ada/csets.ads ! 1124381824b ./gcc/ada/csinfo.adb ! 853889379b ./gcc/ada/cstand.adb ! 276146343b ./gcc/ada/cstand.ads ! 1520807724b ./gcc/ada/cstreams.c ! 1822736202b ./gcc/ada/cuintp.c ! 2435692819b ./gcc/ada/debug.adb ! 638126818b ./gcc/ada/debug.ads ! 579009580b ./gcc/ada/debug_a.adb ! 799315376b ./gcc/ada/debug_a.ads ! 3565371015b ./gcc/ada/dec-io.adb ! 2106947862b ./gcc/ada/dec-io.ads ! 1459266024b ./gcc/ada/dec.ads ! 2132162623b ./gcc/ada/decl.c ! 1390338918b ./gcc/ada/deftarg.c ! 1749835375b ./gcc/ada/directio.ads ! 2461185080b ./gcc/ada/einfo.adb ! 3725314637b ./gcc/ada/einfo.ads ! 1040486350b ./gcc/ada/einfo.h ! 3827088848b ./gcc/ada/elists.adb ! 2003740348b ./gcc/ada/elists.ads ! 1105190374b ./gcc/ada/elists.h ! 204753916b ./gcc/ada/errno.c ! 4008402022b ./gcc/ada/errout.adb ! 320928564b ./gcc/ada/errout.ads ! 2999271413b ./gcc/ada/eval_fat.adb ! 2463431696b ./gcc/ada/eval_fat.ads ! 3517544739b ./gcc/ada/exit.c ! 2311141325b ./gcc/ada/exp_aggr.adb ! 2860900195b ./gcc/ada/exp_aggr.ads ! 2455995554b ./gcc/ada/exp_attr.adb ! 2274665870b ./gcc/ada/exp_attr.ads ! 3788438274b ./gcc/ada/exp_ch10.ads ! 1959020568b ./gcc/ada/exp_ch11.adb ! 1356092263b ./gcc/ada/exp_ch11.ads ! 2662303632b ./gcc/ada/exp_ch12.adb ! 1677837106b ./gcc/ada/exp_ch12.ads ! 1201493881b ./gcc/ada/exp_ch13.adb ! 2523628624b ./gcc/ada/exp_ch13.ads ! 2836932963b ./gcc/ada/exp_ch2.adb ! 1920342641b ./gcc/ada/exp_ch2.ads ! 2780430528b ./gcc/ada/exp_ch3.adb ! 3277988254b ./gcc/ada/exp_ch3.ads ! 423127048b ./gcc/ada/exp_ch4.adb ! 630544925b ./gcc/ada/exp_ch4.ads ! 1300859159b ./gcc/ada/exp_ch5.adb ! 3884008715b ./gcc/ada/exp_ch5.ads ! 1421574227b ./gcc/ada/exp_ch6.adb ! 2978408620b ./gcc/ada/exp_ch6.ads ! 1516530505b ./gcc/ada/exp_ch7.adb ! 4029388464b ./gcc/ada/exp_ch7.ads ! 806341254b ./gcc/ada/exp_ch8.adb ! 2493548378b ./gcc/ada/exp_ch8.ads ! 947069359b ./gcc/ada/exp_ch9.adb ! 3130662329b ./gcc/ada/exp_ch9.ads ! 2689298271b ./gcc/ada/exp_code.adb ! 3591911170b ./gcc/ada/exp_code.ads ! 3574458760b ./gcc/ada/exp_dbug.adb ! 4105290806b ./gcc/ada/exp_dbug.ads ! 3835417459b ./gcc/ada/exp_disp.adb ! 1460989777b ./gcc/ada/exp_disp.ads ! 4152673151b ./gcc/ada/exp_dist.adb ! 2224744101b ./gcc/ada/exp_dist.ads ! 2380394819b ./gcc/ada/exp_fixd.adb ! 2971633787b ./gcc/ada/exp_fixd.ads ! 383808865b ./gcc/ada/exp_imgv.adb ! 107414456b ./gcc/ada/exp_imgv.ads ! 533490453b ./gcc/ada/exp_intr.adb ! 603944530b ./gcc/ada/exp_intr.ads ! 1223570350b ./gcc/ada/exp_pakd.adb ! 3169217058b ./gcc/ada/exp_pakd.ads ! 561903948b ./gcc/ada/exp_prag.adb ! 2726623065b ./gcc/ada/exp_prag.ads ! 2694622276b ./gcc/ada/exp_smem.adb ! 4102883600b ./gcc/ada/exp_smem.ads ! 3367849671b ./gcc/ada/exp_strm.adb ! 508903407b ./gcc/ada/exp_strm.ads ! 4061285632b ./gcc/ada/exp_tss.adb ! 802174414b ./gcc/ada/exp_tss.ads ! 4294889971b ./gcc/ada/exp_util.adb ! 2588841819b ./gcc/ada/exp_util.ads ! 732650724b ./gcc/ada/exp_vfpt.adb ! 3158703166b ./gcc/ada/exp_vfpt.ads ! 2681017510b ./gcc/ada/expander.adb ! 2575484225b ./gcc/ada/expander.ads ! 196370175b ./gcc/ada/expect.c ! 3730235790b ./gcc/ada/fe.h ! 2410826795b ./gcc/ada/fmap.adb ! 1989849769b ./gcc/ada/fmap.ads ! 2554721004b ./gcc/ada/fname-sf.adb ! 3385587425b ./gcc/ada/fname-sf.ads ! 152433494b ./gcc/ada/fname-uf.adb ! 2869979673b ./gcc/ada/fname-uf.ads ! 4193711832b ./gcc/ada/fname.adb ! 3581054847b ./gcc/ada/fname.ads ! 165073793b ./gcc/ada/freeze.adb ! 286956192b ./gcc/ada/freeze.ads ! 146613934b ./gcc/ada/frontend.adb ! 1342421440b ./gcc/ada/frontend.ads ! 4158577973b ./gcc/ada/g-awk.adb ! 609310253b ./gcc/ada/g-awk.ads ! 606317350b ./gcc/ada/g-busora.adb ! 2327940372b ./gcc/ada/g-busora.ads ! 614263783b ./gcc/ada/g-busorg.adb ! 2383765954b ./gcc/ada/g-busorg.ads ! 2310918787b ./gcc/ada/g-calend.adb ! 775102218b ./gcc/ada/g-calend.ads ! 4188678555b ./gcc/ada/g-casuti.adb ! 1046751589b ./gcc/ada/g-casuti.ads ! 2508275788b ./gcc/ada/g-catiio.adb ! 1700304817b ./gcc/ada/g-catiio.ads ! 153263812b ./gcc/ada/g-cgi.adb ! 491501987b ./gcc/ada/g-cgi.ads ! 1552120806b ./gcc/ada/g-cgicoo.adb ! 514376152b ./gcc/ada/g-cgicoo.ads ! 2079055740b ./gcc/ada/g-cgideb.adb ! 3073151229b ./gcc/ada/g-cgideb.ads ! 1337328080b ./gcc/ada/g-comlin.adb ! 762947182b ./gcc/ada/g-comlin.ads ! 3063697563b ./gcc/ada/g-crc32.adb ! 4042174606b ./gcc/ada/g-crc32.ads ! 123778282b ./gcc/ada/g-curexc.ads ! 1009530951b ./gcc/ada/g-debpoo.adb ! 2797049575b ./gcc/ada/g-debpoo.ads ! 2483821241b ./gcc/ada/g-debuti.adb ! 2759144883b ./gcc/ada/g-debuti.ads ! 1479126304b ./gcc/ada/g-diopit.adb ! 2613579847b ./gcc/ada/g-diopit.ads ! 1351705587b ./gcc/ada/g-dirope.adb ! 1843551212b ./gcc/ada/g-dirope.ads ! 2129456205b ./gcc/ada/g-dyntab.adb ! 2301313958b ./gcc/ada/g-dyntab.ads ! 240250153b ./gcc/ada/g-except.ads ! 311327188b ./gcc/ada/g-exctra.adb ! 696104010b ./gcc/ada/g-exctra.ads ! 2021399770b ./gcc/ada/g-expect.adb ! 3670453648b ./gcc/ada/g-expect.ads ! 115710627b ./gcc/ada/g-flocon.ads ! 1241285700b ./gcc/ada/g-hesora.adb ! 1954443348b ./gcc/ada/g-hesora.ads ! 2162133654b ./gcc/ada/g-hesorg.adb ! 1899093730b ./gcc/ada/g-hesorg.ads ! 615231546b ./gcc/ada/g-htable.adb ! 1147404231b ./gcc/ada/g-htable.ads ! 4074378557b ./gcc/ada/g-io.adb ! 2059397144b ./gcc/ada/g-io.ads ! 3075502902b ./gcc/ada/g-io_aux.adb ! 2987271187b ./gcc/ada/g-io_aux.ads ! 2315560945b ./gcc/ada/g-locfil.adb ! 3845793000b ./gcc/ada/g-locfil.ads ! 2382601227b ./gcc/ada/g-moreex.adb ! 1324668450b ./gcc/ada/g-moreex.ads ! 1804647254b ./gcc/ada/g-os_lib.adb ! 3221085683b ./gcc/ada/g-os_lib.ads ! 1185528967b ./gcc/ada/g-regexp.adb ! 1629361223b ./gcc/ada/g-regexp.ads ! 3390523966b ./gcc/ada/g-regist.adb ! 3208719885b ./gcc/ada/g-regist.ads ! 1577468709b ./gcc/ada/g-regpat.adb ! 582026880b ./gcc/ada/g-regpat.ads ! 2451205314b ./gcc/ada/g-soccon.ads ! 2575242004b ./gcc/ada/g-socket.adb ! 1535656165b ./gcc/ada/g-socket.ads ! 2293859502b ./gcc/ada/g-socthi.adb ! 651912058b ./gcc/ada/g-socthi.ads ! 3350030780b ./gcc/ada/g-soliop.ads ! 758288908b ./gcc/ada/g-souinf.ads ! 581975334b ./gcc/ada/g-speche.adb ! 2314638139b ./gcc/ada/g-speche.ads ! 2855842118b ./gcc/ada/g-spipat.adb ! 791106872b ./gcc/ada/g-spipat.ads ! 3318271323b ./gcc/ada/g-spitbo.adb ! 605302019b ./gcc/ada/g-spitbo.ads ! 2302115365b ./gcc/ada/g-sptabo.ads ! 795251741b ./gcc/ada/g-sptain.ads ! 2860049437b ./gcc/ada/g-sptavs.ads ! 2522673043b ./gcc/ada/g-table.adb ! 4247473857b ./gcc/ada/g-table.ads ! 963828728b ./gcc/ada/g-tasloc.adb ! 3443589956b ./gcc/ada/g-tasloc.ads ! 4222037032b ./gcc/ada/g-thread.adb ! 2926605455b ./gcc/ada/g-thread.ads ! 1214503882b ./gcc/ada/g-traceb.adb ! 3641101501b ./gcc/ada/g-traceb.ads ! 4093206552b ./gcc/ada/g-trasym.adb ! 344030511b ./gcc/ada/g-trasym.ads ! 2000619828b ./gcc/ada/get_targ.adb ! 4235434426b ./gcc/ada/get_targ.ads ! 3771528129b ./gcc/ada/gigi.h ! 3781796779b ./gcc/ada/gmem.c ! 1099903949b ./gcc/ada/gnat-style.texi ! 3338432106b ./gcc/ada/gnat.ads ! 3331018174b ./gcc/ada/gnat1drv.adb ! 1236781124b ./gcc/ada/gnat1drv.ads ! 2787179765b ./gcc/ada/gnat_rm.texi ! 3866519797b ./gcc/ada/gnat_ug.texi ! 2299667202b ./gcc/ada/gnatbind.adb ! 104731427b ./gcc/ada/gnatbind.ads ! 4059170038b ./gcc/ada/gnatbl.c ! 3226234054b ./gcc/ada/gnatchop.adb ! 3118972477b ./gcc/ada/gnatcmd.adb ! 3908617844b ./gcc/ada/gnatcmd.ads ! 2796597452b ./gcc/ada/gnatdll.adb ! 1086468102b ./gcc/ada/gnatfind.adb ! 3373987329b ./gcc/ada/gnatkr.adb ! 3373093353b ./gcc/ada/gnatkr.ads ! 616714676b ./gcc/ada/gnatlbr.adb ! 2504670692b ./gcc/ada/gnatlink.adb ! 2544717462b ./gcc/ada/gnatlink.ads ! 4282914717b ./gcc/ada/gnatls.adb ! 1758666063b ./gcc/ada/gnatls.ads ! 1542183559b ./gcc/ada/gnatmain.adb ! 3283765307b ./gcc/ada/gnatmain.ads ! 2033004516b ./gcc/ada/gnatmake.adb ! 145840748b ./gcc/ada/gnatmake.ads ! 1758767486b ./gcc/ada/gnatmem.adb ! 2813528580b ./gcc/ada/gnatprep.adb ! 2835105488b ./gcc/ada/gnatprep.ads ! 3865862564b ./gcc/ada/gnatpsta.adb ! 3829654473b ./gcc/ada/gnatpsys.adb ! 4288634473b ./gcc/ada/gnatvsn.ads ! 2692053620b ./gcc/ada/gnatxref.adb ! 577038397b ./gcc/ada/hlo.adb ! 991320325b ./gcc/ada/hlo.ads ! 1962035170b ./gcc/ada/hostparm.ads ! 2031335613b ./gcc/ada/i-c.adb ! 1630163220b ./gcc/ada/i-c.ads ! 1541946831b ./gcc/ada/i-cexten.ads ! 3090969270b ./gcc/ada/i-cobol.adb ! 2496712247b ./gcc/ada/i-cobol.ads ! 2325074871b ./gcc/ada/i-cpoint.adb ! 1699793483b ./gcc/ada/i-cpoint.ads ! 214865019b ./gcc/ada/i-cpp.adb ! 2912941503b ./gcc/ada/i-cpp.ads ! 3140439521b ./gcc/ada/i-cstrea.adb ! 1842827516b ./gcc/ada/i-cstrea.ads ! 1294230726b ./gcc/ada/i-cstrin.adb ! 3630365631b ./gcc/ada/i-cstrin.ads ! 3233154322b ./gcc/ada/i-fortra.adb ! 3862297824b ./gcc/ada/i-fortra.ads ! 2660299838b ./gcc/ada/i-os2err.ads ! 1001031450b ./gcc/ada/i-os2lib.adb ! 3863909326b ./gcc/ada/i-os2lib.ads ! 2629699505b ./gcc/ada/i-os2syn.ads ! 2757162007b ./gcc/ada/i-os2thr.ads ! 10095810b ./gcc/ada/i-pacdec.adb ! 4204365106b ./gcc/ada/i-pacdec.ads ! 2079820695b ./gcc/ada/i-vxwork.ads ! 2205213686b ./gcc/ada/impunit.adb ! 3867557683b ./gcc/ada/impunit.ads ! 249803696b ./gcc/ada/init.c ! 2729724075b ./gcc/ada/inline.adb ! 409617942b ./gcc/ada/inline.ads ! 2710275605b ./gcc/ada/interfac.ads ! 304019218b ./gcc/ada/io-aux.c ! 182695114b ./gcc/ada/ioexcept.ads ! 3730121014b ./gcc/ada/itypes.adb ! 1791965281b ./gcc/ada/itypes.ads ! 1636222037b ./gcc/ada/krunch.adb ! 3193149413b ./gcc/ada/krunch.ads ! 3877739435b ./gcc/ada/lang-options.h ! 2419758820b ./gcc/ada/lang-specs.h ! 731292528b ./gcc/ada/layout.adb ! 2930468142b ./gcc/ada/layout.ads ! 3615838165b ./gcc/ada/lib-list.adb ! 13730108b ./gcc/ada/lib-load.adb ! 2583052213b ./gcc/ada/lib-load.ads ! 1127145456b ./gcc/ada/lib-sort.adb ! 1302172495b ./gcc/ada/lib-util.adb ! 1970877184b ./gcc/ada/lib-util.ads ! 1719338144b ./gcc/ada/lib-writ.adb ! 3384492892b ./gcc/ada/lib-writ.ads ! 1654030036b ./gcc/ada/lib-xref.adb ! 2167962937b ./gcc/ada/lib-xref.ads ! 1029825782b ./gcc/ada/lib.adb ! 1122008701b ./gcc/ada/lib.ads ! 3273789304b ./gcc/ada/link.c ! 1382287720b ./gcc/ada/live.adb ! 241788297b ./gcc/ada/live.ads ! 2349274909b ./gcc/ada/machcode.ads ! 1702260548b ./gcc/ada/make.adb ! 3505443302b ./gcc/ada/make.ads ! 2073972201b ./gcc/ada/makeusg.adb ! 2946385998b ./gcc/ada/makeusg.ads ! 1369191481b ./gcc/ada/math_lib.adb ! 3431850830b ./gcc/ada/mdll.adb ! 3403824619b ./gcc/ada/mdll.ads ! 63072210b ./gcc/ada/mdllfile.adb ! 1377024247b ./gcc/ada/mdllfile.ads ! 271650509b ./gcc/ada/mdlltool.adb ! 3822656791b ./gcc/ada/mdlltool.ads ! 2562707248b ./gcc/ada/memroot.adb ! 3394187078b ./gcc/ada/memroot.ads ! 3285031453b ./gcc/ada/memtrack.adb ! 2151760376b ./gcc/ada/misc.c ! 3038778953b ./gcc/ada/mlib-fil.adb ! 1806810212b ./gcc/ada/mlib-fil.ads ! 222091384b ./gcc/ada/mlib-prj.adb ! 2968654783b ./gcc/ada/mlib-prj.ads ! 882896001b ./gcc/ada/mlib-tgt.adb ! 3995257659b ./gcc/ada/mlib-tgt.ads ! 557486163b ./gcc/ada/mlib-utl.adb ! 3132611148b ./gcc/ada/mlib-utl.ads ! 2389340576b ./gcc/ada/mlib.adb ! 3760284379b ./gcc/ada/mlib.ads ! 2192832241b ./gcc/ada/namet.adb ! 4115408171b ./gcc/ada/namet.ads ! 1021113274b ./gcc/ada/namet.h ! 2786583125b ./gcc/ada/nlists.adb ! 3207616321b ./gcc/ada/nlists.ads ! 4207230567b ./gcc/ada/nlists.h ! 1668172920b ./gcc/ada/nmake.adb ! 3530016949b ./gcc/ada/nmake.ads ! 810039548b ./gcc/ada/nmake.adt ! 603482997b ./gcc/ada/opt.adb ! 272528391b ./gcc/ada/opt.ads ! 757957959b ./gcc/ada/osint.adb ! 124998996b ./gcc/ada/osint.ads ! 1444051127b ./gcc/ada/output.adb ! 4192286483b ./gcc/ada/output.ads ! 286171607b ./gcc/ada/par-ch10.adb ! 82263454b ./gcc/ada/par-ch11.adb ! 977429014b ./gcc/ada/par-ch12.adb ! 1605568863b ./gcc/ada/par-ch13.adb ! 2759284176b ./gcc/ada/par-ch2.adb ! 3744247741b ./gcc/ada/par-ch3.adb ! 2502332261b ./gcc/ada/par-ch4.adb ! 2508708623b ./gcc/ada/par-ch5.adb ! 3460173897b ./gcc/ada/par-ch6.adb ! 2558917702b ./gcc/ada/par-ch7.adb ! 1991687801b ./gcc/ada/par-ch8.adb ! 2902683544b ./gcc/ada/par-ch9.adb ! 1736379569b ./gcc/ada/par-endh.adb ! 2386370437b ./gcc/ada/par-labl.adb ! 2191110385b ./gcc/ada/par-load.adb ! 3989665290b ./gcc/ada/par-prag.adb ! 2061902000b ./gcc/ada/par-sync.adb ! 3034220935b ./gcc/ada/par-tchk.adb ! 435842982b ./gcc/ada/par-util.adb ! 667325059b ./gcc/ada/par.adb ! 890918457b ./gcc/ada/par.ads ! 769972278b ./gcc/ada/prj-attr.adb ! 1517107046b ./gcc/ada/prj-attr.ads ! 2579476649b ./gcc/ada/prj-com.adb ! 4188434019b ./gcc/ada/prj-com.ads ! 1445752564b ./gcc/ada/prj-dect.adb ! 2054972414b ./gcc/ada/prj-dect.ads ! 2978271615b ./gcc/ada/prj-env.adb ! 3039443255b ./gcc/ada/prj-env.ads ! 2914671733b ./gcc/ada/prj-ext.adb ! 2463218682b ./gcc/ada/prj-ext.ads ! 2361570952b ./gcc/ada/prj-nmsc.adb ! 1462185546b ./gcc/ada/prj-nmsc.ads ! 1324893907b ./gcc/ada/prj-pars.adb ! 1278172108b ./gcc/ada/prj-pars.ads ! 3627484519b ./gcc/ada/prj-part.adb ! 3249280050b ./gcc/ada/prj-part.ads ! 4152265411b ./gcc/ada/prj-proc.adb ! 2864536023b ./gcc/ada/prj-proc.ads ! 3885810048b ./gcc/ada/prj-strt.adb ! 463253586b ./gcc/ada/prj-strt.ads ! 2752403718b ./gcc/ada/prj-tree.adb ! 4172539515b ./gcc/ada/prj-tree.ads ! 195833379b ./gcc/ada/prj-util.adb ! 2190751868b ./gcc/ada/prj-util.ads ! 2681846287b ./gcc/ada/prj.adb ! 2159508649b ./gcc/ada/prj.ads ! 1173868787b ./gcc/ada/raise.c ! 137228817b ./gcc/ada/raise.h ! 2480259783b ./gcc/ada/repinfo.adb ! 638755227b ./gcc/ada/repinfo.ads ! 3072671705b ./gcc/ada/repinfo.h ! 1399693331b ./gcc/ada/restrict.adb ! 2826035214b ./gcc/ada/restrict.ads ! 1958872377b ./gcc/ada/rident.ads ! 685615765b ./gcc/ada/rtsfind.adb ! 944636897b ./gcc/ada/rtsfind.ads ! 2934207681b ./gcc/ada/s-addima.adb ! 2921793700b ./gcc/ada/s-addima.ads ! 3133788426b ./gcc/ada/s-arit64.adb ! 139066661b ./gcc/ada/s-arit64.ads ! 2146399349b ./gcc/ada/s-assert.adb ! 2467675233b ./gcc/ada/s-assert.ads ! 2471473947b ./gcc/ada/s-asthan.adb ! 1425755957b ./gcc/ada/s-asthan.ads ! 3345093947b ./gcc/ada/s-atacco.adb ! 274791225b ./gcc/ada/s-atacco.ads ! 1268162914b ./gcc/ada/s-auxdec.adb ! 3265586513b ./gcc/ada/s-auxdec.ads ! 1722353021b ./gcc/ada/s-bitops.adb ! 2501304200b ./gcc/ada/s-bitops.ads ! 368971619b ./gcc/ada/s-chepoo.ads ! 2083911466b ./gcc/ada/s-crc32.adb ! 3182978663b ./gcc/ada/s-crc32.ads ! 353869099b ./gcc/ada/s-direio.adb ! 309988644b ./gcc/ada/s-direio.ads ! 2211683422b ./gcc/ada/s-errrep.adb ! 1186812435b ./gcc/ada/s-errrep.ads ! 561621508b ./gcc/ada/s-except.ads ! 7350293b ./gcc/ada/s-exctab.adb ! 1119186265b ./gcc/ada/s-exctab.ads ! 622864413b ./gcc/ada/s-exnflt.ads ! 1352415346b ./gcc/ada/s-exngen.adb ! 2596541002b ./gcc/ada/s-exngen.ads ! 3390809287b ./gcc/ada/s-exnint.ads ! 4092255620b ./gcc/ada/s-exnlfl.ads ! 1474028514b ./gcc/ada/s-exnlin.ads ! 3994054006b ./gcc/ada/s-exnllf.ads ! 2680813188b ./gcc/ada/s-exnlli.ads ! 1172996611b ./gcc/ada/s-exnsfl.ads ! 2557413106b ./gcc/ada/s-exnsin.ads ! 2820344349b ./gcc/ada/s-exnssi.ads ! 4059331373b ./gcc/ada/s-expflt.ads ! 3105649102b ./gcc/ada/s-expgen.adb ! 4177327143b ./gcc/ada/s-expgen.ads ! 2038272825b ./gcc/ada/s-expint.ads ! 2921280512b ./gcc/ada/s-explfl.ads ! 3409169717b ./gcc/ada/s-explin.ads ! 1559471549b ./gcc/ada/s-expllf.ads ! 361819024b ./gcc/ada/s-explli.ads ! 1136797591b ./gcc/ada/s-expllu.adb ! 1070447422b ./gcc/ada/s-expllu.ads ! 3783588084b ./gcc/ada/s-expmod.adb ! 1306565465b ./gcc/ada/s-expmod.ads ! 1935872355b ./gcc/ada/s-expsfl.ads ! 693874826b ./gcc/ada/s-expsin.ads ! 3200711015b ./gcc/ada/s-expssi.ads ! 423463208b ./gcc/ada/s-expuns.adb ! 1226202999b ./gcc/ada/s-expuns.ads ! 3596082207b ./gcc/ada/s-fatflt.ads ! 152336698b ./gcc/ada/s-fatgen.adb ! 3452704907b ./gcc/ada/s-fatgen.ads ! 518796998b ./gcc/ada/s-fatlfl.ads ! 177868014b ./gcc/ada/s-fatllf.ads ! 1844976187b ./gcc/ada/s-fatsfl.ads ! 2030917946b ./gcc/ada/s-ficobl.ads ! 3604265630b ./gcc/ada/s-fileio.adb ! 1245988519b ./gcc/ada/s-fileio.ads ! 3998800077b ./gcc/ada/s-finimp.adb ! 348300428b ./gcc/ada/s-finimp.ads ! 3256667434b ./gcc/ada/s-finroo.adb ! 3539088082b ./gcc/ada/s-finroo.ads ! 1543367984b ./gcc/ada/s-fore.adb ! 2136160505b ./gcc/ada/s-fore.ads ! 1724896850b ./gcc/ada/s-gloloc.adb ! 2874263872b ./gcc/ada/s-gloloc.ads ! 2576558599b ./gcc/ada/s-imgbiu.adb ! 485571853b ./gcc/ada/s-imgbiu.ads ! 2696391467b ./gcc/ada/s-imgboo.adb ! 562529842b ./gcc/ada/s-imgboo.ads ! 3469875082b ./gcc/ada/s-imgcha.adb ! 768667588b ./gcc/ada/s-imgcha.ads ! 891425892b ./gcc/ada/s-imgdec.adb ! 3956162567b ./gcc/ada/s-imgdec.ads ! 799265416b ./gcc/ada/s-imgenu.adb ! 3206640093b ./gcc/ada/s-imgenu.ads ! 1232841808b ./gcc/ada/s-imgint.adb ! 1884481077b ./gcc/ada/s-imgint.ads ! 2589338037b ./gcc/ada/s-imgllb.adb ! 952054489b ./gcc/ada/s-imgllb.ads ! 3511505943b ./gcc/ada/s-imglld.adb ! 3728427327b ./gcc/ada/s-imglld.ads ! 710546980b ./gcc/ada/s-imglli.adb ! 3496934828b ./gcc/ada/s-imglli.ads ! 2026551128b ./gcc/ada/s-imgllu.adb ! 898533582b ./gcc/ada/s-imgllu.ads ! 2093598044b ./gcc/ada/s-imgllw.adb ! 1635490829b ./gcc/ada/s-imgllw.ads ! 771945696b ./gcc/ada/s-imgrea.adb ! 3266140221b ./gcc/ada/s-imgrea.ads ! 783564063b ./gcc/ada/s-imguns.adb ! 550522958b ./gcc/ada/s-imguns.ads ! 1103898200b ./gcc/ada/s-imgwch.adb ! 306032126b ./gcc/ada/s-imgwch.ads ! 1632744438b ./gcc/ada/s-imgwiu.adb ! 3186715504b ./gcc/ada/s-imgwiu.ads ! 2491143860b ./gcc/ada/s-inmaop.ads ! 642329874b ./gcc/ada/s-interr.adb ! 2363118667b ./gcc/ada/s-interr.ads ! 3439464760b ./gcc/ada/s-intman.ads ! 3081896815b ./gcc/ada/s-io.adb ! 2704983298b ./gcc/ada/s-io.ads ! 4266387665b ./gcc/ada/s-maccod.ads ! 697475233b ./gcc/ada/s-mantis.adb ! 3382852588b ./gcc/ada/s-mantis.ads ! 2497788184b ./gcc/ada/s-mastop.adb ! 412040989b ./gcc/ada/s-mastop.ads ! 4056300803b ./gcc/ada/s-memory.adb ! 436917678b ./gcc/ada/s-memory.ads ! 915988587b ./gcc/ada/s-osprim.ads ! 1785995040b ./gcc/ada/s-pack03.adb ! 1159696143b ./gcc/ada/s-pack03.ads ! 4006352481b ./gcc/ada/s-pack05.adb ! 943301033b ./gcc/ada/s-pack05.ads ! 2948914699b ./gcc/ada/s-pack06.adb ! 1761489706b ./gcc/ada/s-pack06.ads ! 2460225886b ./gcc/ada/s-pack07.adb ! 1527563558b ./gcc/ada/s-pack07.ads ! 1020068514b ./gcc/ada/s-pack09.adb ! 2851601610b ./gcc/ada/s-pack09.ads ! 3981484000b ./gcc/ada/s-pack10.adb ! 4110961926b ./gcc/ada/s-pack10.ads ! 3243254137b ./gcc/ada/s-pack11.adb ! 650802763b ./gcc/ada/s-pack11.ads ! 3544834485b ./gcc/ada/s-pack12.adb ! 1524517676b ./gcc/ada/s-pack12.ads ! 3174573638b ./gcc/ada/s-pack13.adb ! 1859524441b ./gcc/ada/s-pack13.ads ! 2439144266b ./gcc/ada/s-pack14.adb ! 34461279b ./gcc/ada/s-pack14.ads ! 964701959b ./gcc/ada/s-pack15.adb ! 3069359215b ./gcc/ada/s-pack15.ads ! 1172842552b ./gcc/ada/s-pack17.adb ! 4277065085b ./gcc/ada/s-pack17.ads ! 355821236b ./gcc/ada/s-pack18.adb ! 667115373b ./gcc/ada/s-pack18.ads ! 3951115204b ./gcc/ada/s-pack19.adb ! 3721065538b ./gcc/ada/s-pack19.ads ! 3968916188b ./gcc/ada/s-pack20.adb ! 1519291685b ./gcc/ada/s-pack20.ads ! 1677028498b ./gcc/ada/s-pack21.adb ! 2507237065b ./gcc/ada/s-pack21.ads ! 3532235913b ./gcc/ada/s-pack22.adb ! 4116220687b ./gcc/ada/s-pack22.ads ! 530410413b ./gcc/ada/s-pack23.adb ! 3714910171b ./gcc/ada/s-pack23.ads ! 2426545782b ./gcc/ada/s-pack24.adb ! 3730016048b ./gcc/ada/s-pack24.ads ! 2602918636b ./gcc/ada/s-pack25.adb ! 88712429b ./gcc/ada/s-pack25.ads ! 2931513379b ./gcc/ada/s-pack26.adb ! 1904574746b ./gcc/ada/s-pack26.ads ! 3880609235b ./gcc/ada/s-pack27.adb ! 1297466879b ./gcc/ada/s-pack27.ads ! 351609736b ./gcc/ada/s-pack28.adb ! 2286264142b ./gcc/ada/s-pack28.ads ! 1227126319b ./gcc/ada/s-pack29.adb ! 1852957888b ./gcc/ada/s-pack29.ads ! 3962509768b ./gcc/ada/s-pack30.adb ! 1072902852b ./gcc/ada/s-pack30.ads ! 3032045044b ./gcc/ada/s-pack31.adb ! 4226258615b ./gcc/ada/s-pack31.ads ! 3369161419b ./gcc/ada/s-pack33.adb ! 3019634597b ./gcc/ada/s-pack33.ads ! 2417878370b ./gcc/ada/s-pack34.adb ! 3140368593b ./gcc/ada/s-pack34.ads ! 1281973130b ./gcc/ada/s-pack35.adb ! 1809798291b ./gcc/ada/s-pack35.ads ! 2919537463b ./gcc/ada/s-pack36.adb ! 351813371b ./gcc/ada/s-pack36.ads ! 805395637b ./gcc/ada/s-pack37.adb ! 599995777b ./gcc/ada/s-pack37.ads ! 340451484b ./gcc/ada/s-pack38.adb ! 3979878575b ./gcc/ada/s-pack38.ads ! 2657636169b ./gcc/ada/s-pack39.adb ! 15144126b ./gcc/ada/s-pack39.ads ! 4010823844b ./gcc/ada/s-pack40.adb ! 3740404514b ./gcc/ada/s-pack40.ads ! 4258197765b ./gcc/ada/s-pack41.adb ! 695615884b ./gcc/ada/s-pack41.ads ! 3507039985b ./gcc/ada/s-pack42.adb ! 1898188040b ./gcc/ada/s-pack42.ads ! 2175202874b ./gcc/ada/s-pack43.adb ! 1634345118b ./gcc/ada/s-pack43.ads ! 2468523022b ./gcc/ada/s-pack44.adb ! 1513029943b ./gcc/ada/s-pack44.ads ! 85917563b ./gcc/ada/s-pack45.adb ! 3108930472b ./gcc/ada/s-pack45.ads ! 2906378843b ./gcc/ada/s-pack46.adb ! 4126738205b ./gcc/ada/s-pack46.ads ! 2037839940b ./gcc/ada/s-pack47.adb ! 4048741050b ./gcc/ada/s-pack47.ads ! 393587184b ./gcc/ada/s-pack48.adb ! 205068617b ./gcc/ada/s-pack48.ads ! 3609193400b ./gcc/ada/s-pack49.adb ! 3530998661b ./gcc/ada/s-pack49.ads ! 4021261232b ./gcc/ada/s-pack50.adb ! 3146757315b ./gcc/ada/s-pack50.ads ! 713214051b ./gcc/ada/s-pack51.adb ! 1205907954b ./gcc/ada/s-pack51.ads ! 3518426597b ./gcc/ada/s-pack52.adb ! 341422825b ./gcc/ada/s-pack52.ads ! 1458229084b ./gcc/ada/s-pack53.adb ! 268226784b ./gcc/ada/s-pack53.ads ! 2476568346b ./gcc/ada/s-pack54.adb ! 1062387414b ./gcc/ada/s-pack54.ads ! 3528640029b ./gcc/ada/s-pack55.adb ! 3621286870b ./gcc/ada/s-pack55.ads ! 2911113551b ./gcc/ada/s-pack56.adb ! 2424617212b ./gcc/ada/s-pack56.ads ! 2923086114b ./gcc/ada/s-pack57.adb ! 2680427204b ./gcc/ada/s-pack57.ads ! 399141604b ./gcc/ada/s-pack58.adb ! 1766106792b ./gcc/ada/s-pack58.ads ! 5493470b ./gcc/ada/s-pack59.adb ! 3168809979b ./gcc/ada/s-pack59.ads ! 4000306828b ./gcc/ada/s-pack60.adb ! 336164064b ./gcc/ada/s-pack60.ads ! 2284291464b ./gcc/ada/s-pack61.adb ! 4099645808b ./gcc/ada/s-pack61.ads ! 3497437401b ./gcc/ada/s-pack62.adb ! 3151983306b ./gcc/ada/s-pack62.ads ! 4098851511b ./gcc/ada/s-pack63.adb ! 3158818914b ./gcc/ada/s-pack63.ads ! 4185842302b ./gcc/ada/s-parame.adb ! 1016134734b ./gcc/ada/s-parame.ads ! 1616379944b ./gcc/ada/s-parint.adb ! 93334734b ./gcc/ada/s-parint.ads ! 985076593b ./gcc/ada/s-pooglo.adb ! 3631327025b ./gcc/ada/s-pooglo.ads ! 2411088466b ./gcc/ada/s-pooloc.adb ! 1220335642b ./gcc/ada/s-pooloc.ads ! 1276581093b ./gcc/ada/s-poosiz.adb ! 2771854951b ./gcc/ada/s-poosiz.ads ! 2369419157b ./gcc/ada/s-powtab.ads ! 4071092937b ./gcc/ada/s-proinf.adb ! 416511513b ./gcc/ada/s-proinf.ads ! 2266850977b ./gcc/ada/s-rpc.adb ! 4275658188b ./gcc/ada/s-rpc.ads ! 3513640423b ./gcc/ada/s-scaval.ads ! 2621428416b ./gcc/ada/s-secsta.adb ! 2345034983b ./gcc/ada/s-secsta.ads ! 4240948929b ./gcc/ada/s-sequio.adb ! 382868367b ./gcc/ada/s-sequio.ads ! 3744646875b ./gcc/ada/s-shasto.adb ! 3750666269b ./gcc/ada/s-shasto.ads ! 2184182802b ./gcc/ada/s-soflin.adb ! 4106853306b ./gcc/ada/s-soflin.ads ! 2959161428b ./gcc/ada/s-sopco3.adb ! 104891649b ./gcc/ada/s-sopco3.ads ! 4175442594b ./gcc/ada/s-sopco4.adb ! 3936975251b ./gcc/ada/s-sopco4.ads ! 291408130b ./gcc/ada/s-sopco5.adb ! 812118675b ./gcc/ada/s-sopco5.ads ! 1796793007b ./gcc/ada/s-stache.adb ! 2789527219b ./gcc/ada/s-stache.ads ! 1537964372b ./gcc/ada/s-stalib.adb ! 3115651505b ./gcc/ada/s-stalib.ads ! 432471810b ./gcc/ada/s-stoele.adb ! 1360919545b ./gcc/ada/s-stoele.ads ! 2052345399b ./gcc/ada/s-stopoo.ads ! 1633760278b ./gcc/ada/s-stratt.adb ! 1417791298b ./gcc/ada/s-stratt.ads ! 1686965279b ./gcc/ada/s-strops.adb ! 4252576344b ./gcc/ada/s-strops.ads ! 2532586131b ./gcc/ada/s-taasde.adb ! 2453532957b ./gcc/ada/s-taasde.ads ! 828130019b ./gcc/ada/s-tadeca.adb ! 1076421306b ./gcc/ada/s-tadeca.ads ! 1301221686b ./gcc/ada/s-tadert.adb ! 789036441b ./gcc/ada/s-tadert.ads ! 630027435b ./gcc/ada/s-taenca.adb ! 2587539578b ./gcc/ada/s-taenca.ads ! 2632590584b ./gcc/ada/s-taprob.adb ! 4128031181b ./gcc/ada/s-taprob.ads ! 1400440071b ./gcc/ada/s-taprop.ads ! 177921966b ./gcc/ada/s-tarest.adb ! 4066847638b ./gcc/ada/s-tarest.ads ! 1991438887b ./gcc/ada/s-tasdeb.adb ! 2613803021b ./gcc/ada/s-tasdeb.ads ! 4020918264b ./gcc/ada/s-tasinf.adb ! 1668935870b ./gcc/ada/s-tasinf.ads ! 2945140891b ./gcc/ada/s-tasini.adb ! 334920681b ./gcc/ada/s-tasini.ads ! 1584664889b ./gcc/ada/s-taskin.adb ! 1712940961b ./gcc/ada/s-taskin.ads ! 1111738188b ./gcc/ada/s-tasque.adb ! 3925582077b ./gcc/ada/s-tasque.ads ! 3253689117b ./gcc/ada/s-tasren.adb ! 3585675949b ./gcc/ada/s-tasren.ads ! 639180081b ./gcc/ada/s-tasres.ads ! 2506382509b ./gcc/ada/s-tassta.adb ! 1308608849b ./gcc/ada/s-tassta.ads ! 2198255554b ./gcc/ada/s-tasuti.adb ! 1251170994b ./gcc/ada/s-tasuti.ads ! 2438615219b ./gcc/ada/s-tataat.adb ! 2752485611b ./gcc/ada/s-tataat.ads ! 3146825506b ./gcc/ada/s-tpinop.adb ! 2392114437b ./gcc/ada/s-tpinop.ads ! 1630989423b ./gcc/ada/s-tpoben.adb ! 2974774482b ./gcc/ada/s-tpoben.ads ! 576942612b ./gcc/ada/s-tpobop.adb ! 348329523b ./gcc/ada/s-tpobop.ads ! 4078482581b ./gcc/ada/s-tposen.adb ! 583641471b ./gcc/ada/s-tposen.ads ! 1726319339b ./gcc/ada/s-traceb.adb ! 2819123084b ./gcc/ada/s-traceb.ads ! 2238856213b ./gcc/ada/s-unstyp.ads ! 383705502b ./gcc/ada/s-vaflop.adb ! 3525840106b ./gcc/ada/s-vaflop.ads ! 3777456120b ./gcc/ada/s-valboo.adb ! 823783850b ./gcc/ada/s-valboo.ads ! 2182323653b ./gcc/ada/s-valcha.adb ! 3984994262b ./gcc/ada/s-valcha.ads ! 2486462063b ./gcc/ada/s-valdec.adb ! 3078507172b ./gcc/ada/s-valdec.ads ! 4035209494b ./gcc/ada/s-valenu.adb ! 3348402059b ./gcc/ada/s-valenu.ads ! 3233347202b ./gcc/ada/s-valint.adb ! 809353895b ./gcc/ada/s-valint.ads ! 1624092680b ./gcc/ada/s-vallld.adb ! 2769897228b ./gcc/ada/s-vallld.ads ! 3744656291b ./gcc/ada/s-vallli.adb ! 3279109387b ./gcc/ada/s-vallli.ads ! 1459947133b ./gcc/ada/s-valllu.adb ! 585018696b ./gcc/ada/s-valllu.ads ! 764594178b ./gcc/ada/s-valrea.adb ! 1720102121b ./gcc/ada/s-valrea.ads ! 532716097b ./gcc/ada/s-valuns.adb ! 1244197250b ./gcc/ada/s-valuns.ads ! 852079584b ./gcc/ada/s-valuti.adb ! 738175561b ./gcc/ada/s-valuti.ads ! 8578713b ./gcc/ada/s-valwch.adb ! 1511491362b ./gcc/ada/s-valwch.ads ! 2493998789b ./gcc/ada/s-vercon.adb ! 76755328b ./gcc/ada/s-vercon.ads ! 4202237657b ./gcc/ada/s-vmexta.adb ! 4131737075b ./gcc/ada/s-vmexta.ads ! 3071200887b ./gcc/ada/s-wchcnv.adb ! 4248746072b ./gcc/ada/s-wchcnv.ads ! 1113131496b ./gcc/ada/s-wchcon.ads ! 13946560b ./gcc/ada/s-wchjis.adb ! 2260481846b ./gcc/ada/s-wchjis.ads ! 1448393887b ./gcc/ada/s-wchstw.adb ! 1559813388b ./gcc/ada/s-wchstw.ads ! 3747078028b ./gcc/ada/s-wchwts.adb ! 3218956526b ./gcc/ada/s-wchwts.ads ! 2111277990b ./gcc/ada/s-widboo.adb ! 3292895124b ./gcc/ada/s-widboo.ads ! 1836742483b ./gcc/ada/s-widcha.adb ! 3867876244b ./gcc/ada/s-widcha.ads ! 1034537775b ./gcc/ada/s-widenu.adb ! 847743074b ./gcc/ada/s-widenu.ads ! 1845615445b ./gcc/ada/s-widlli.adb ! 2364218579b ./gcc/ada/s-widlli.ads ! 248576485b ./gcc/ada/s-widllu.adb ! 2854689029b ./gcc/ada/s-widllu.ads ! 2511495067b ./gcc/ada/s-widwch.adb ! 3401797070b ./gcc/ada/s-widwch.ads ! 3528609494b ./gcc/ada/s-wwdcha.adb ! 586285622b ./gcc/ada/s-wwdcha.ads ! 2810367382b ./gcc/ada/s-wwdenu.adb ! 4200440603b ./gcc/ada/s-wwdenu.ads ! 1874741026b ./gcc/ada/s-wwdwch.adb ! 3321650370b ./gcc/ada/s-wwdwch.ads ! 468056045b ./gcc/ada/scans.adb ! 815846534b ./gcc/ada/scans.ads ! 3089102575b ./gcc/ada/scn-nlit.adb ! 4137585658b ./gcc/ada/scn-slit.adb ! 2107362337b ./gcc/ada/scn.adb ! 643548576b ./gcc/ada/scn.ads ! 1550561834b ./gcc/ada/sdefault.ads ! 3951057432b ./gcc/ada/sem.adb ! 1409686204b ./gcc/ada/sem.ads ! 666790856b ./gcc/ada/sem_aggr.adb ! 526541988b ./gcc/ada/sem_aggr.ads ! 3591099921b ./gcc/ada/sem_attr.adb ! 2192022517b ./gcc/ada/sem_attr.ads ! 2483089446b ./gcc/ada/sem_case.adb ! 1285698743b ./gcc/ada/sem_case.ads ! 3650211808b ./gcc/ada/sem_cat.adb ! 2960627583b ./gcc/ada/sem_cat.ads ! 3310159843b ./gcc/ada/sem_ch10.adb ! 1481985747b ./gcc/ada/sem_ch10.ads ! 4010667392b ./gcc/ada/sem_ch11.adb ! 1735222025b ./gcc/ada/sem_ch11.ads ! 248848194b ./gcc/ada/sem_ch12.adb ! 997879767b ./gcc/ada/sem_ch12.ads ! 2493455042b ./gcc/ada/sem_ch13.adb ! 3760013065b ./gcc/ada/sem_ch13.ads ! 1035453033b ./gcc/ada/sem_ch2.adb ! 2925796260b ./gcc/ada/sem_ch2.ads ! 256651025b ./gcc/ada/sem_ch3.adb ! 3506394288b ./gcc/ada/sem_ch3.ads ! 3342506445b ./gcc/ada/sem_ch4.adb ! 3161721114b ./gcc/ada/sem_ch4.ads ! 425430463b ./gcc/ada/sem_ch5.adb ! 921448714b ./gcc/ada/sem_ch5.ads ! 3940967835b ./gcc/ada/sem_ch6.adb ! 3617379945b ./gcc/ada/sem_ch6.ads ! 806087534b ./gcc/ada/sem_ch7.adb ! 2229285886b ./gcc/ada/sem_ch7.ads ! 2675641382b ./gcc/ada/sem_ch8.adb ! 414296948b ./gcc/ada/sem_ch8.ads ! 2226149000b ./gcc/ada/sem_ch9.adb ! 2313393680b ./gcc/ada/sem_ch9.ads ! 2789952266b ./gcc/ada/sem_disp.adb ! 1522627489b ./gcc/ada/sem_disp.ads ! 705974316b ./gcc/ada/sem_dist.adb ! 1442557709b ./gcc/ada/sem_dist.ads ! 2065925155b ./gcc/ada/sem_elab.adb ! 618332011b ./gcc/ada/sem_elab.ads ! 2796522258b ./gcc/ada/sem_elim.adb ! 4083559357b ./gcc/ada/sem_elim.ads ! 2582716150b ./gcc/ada/sem_eval.adb ! 1067144441b ./gcc/ada/sem_eval.ads ! 2566870177b ./gcc/ada/sem_intr.adb ! 4270264978b ./gcc/ada/sem_intr.ads ! 626970173b ./gcc/ada/sem_maps.adb ! 2624950393b ./gcc/ada/sem_maps.ads ! 2004945865b ./gcc/ada/sem_mech.adb ! 727986888b ./gcc/ada/sem_mech.ads ! 211861215b ./gcc/ada/sem_prag.adb ! 692139933b ./gcc/ada/sem_prag.ads ! 1680274646b ./gcc/ada/sem_res.adb ! 4223338214b ./gcc/ada/sem_res.ads ! 1966095667b ./gcc/ada/sem_smem.adb ! 3543394119b ./gcc/ada/sem_smem.ads ! 54838574b ./gcc/ada/sem_type.adb ! 1083645285b ./gcc/ada/sem_type.ads ! 3315098834b ./gcc/ada/sem_util.adb ! 3071381257b ./gcc/ada/sem_util.ads ! 512361512b ./gcc/ada/sem_vfpt.adb ! 2796693707b ./gcc/ada/sem_vfpt.ads ! 4155489467b ./gcc/ada/sem_warn.adb ! 2670991982b ./gcc/ada/sem_warn.ads ! 1802605744b ./gcc/ada/sequenio.ads ! 2389974990b ./gcc/ada/sfn_scan.adb ! 2382113394b ./gcc/ada/sfn_scan.ads ! 2547960021b ./gcc/ada/sinfo-cn.adb ! 528396316b ./gcc/ada/sinfo-cn.ads ! 1405497043b ./gcc/ada/sinfo.adb ! 267608903b ./gcc/ada/sinfo.ads ! 4211174202b ./gcc/ada/sinfo.h ! 318075408b ./gcc/ada/sinput-l.adb ! 4161724197b ./gcc/ada/sinput-l.ads ! 2486137427b ./gcc/ada/sinput-p.adb ! 4179659691b ./gcc/ada/sinput-p.ads ! 3969757742b ./gcc/ada/sinput.adb ! 2051669844b ./gcc/ada/sinput.ads ! 3972943832b ./gcc/ada/snames.adb ! 2711732664b ./gcc/ada/snames.ads ! 95357118b ./gcc/ada/snames.h ! 3261788857b ./gcc/ada/sprint.adb ! 1590570499b ./gcc/ada/sprint.ads ! 4203205869b ./gcc/ada/stand.adb ! 3916070949b ./gcc/ada/stand.ads ! 3088644110b ./gcc/ada/stringt.adb ! 3489928984b ./gcc/ada/stringt.ads ! 115966881b ./gcc/ada/stringt.h ! 1519917575b ./gcc/ada/style.adb ! 2363652095b ./gcc/ada/style.ads ! 941550211b ./gcc/ada/stylesw.adb ! 300221687b ./gcc/ada/stylesw.ads ! 27582413b ./gcc/ada/switch.adb ! 1598342278b ./gcc/ada/switch.ads ! 4244182023b ./gcc/ada/sysdep.c ! 1119298405b ./gcc/ada/system.ads ! 3848197813b ./gcc/ada/table.adb ! 3687590744b ./gcc/ada/table.ads ! 1109639380b ./gcc/ada/targparm.adb ! 1825795995b ./gcc/ada/targparm.ads ! 1202794553b ./gcc/ada/targtyps.c ! 1356345663b ./gcc/ada/tbuild.adb ! 1858742811b ./gcc/ada/tbuild.ads ! 75780159b ./gcc/ada/text_io.ads ! 360994578b ./gcc/ada/tracebak.c ! 2571992805b ./gcc/ada/trans.c ! 1966951634b ./gcc/ada/tree_gen.adb ! 3159530633b ./gcc/ada/tree_gen.ads ! 2530728701b ./gcc/ada/tree_in.adb ! 2711628455b ./gcc/ada/tree_in.ads ! 838934979b ./gcc/ada/tree_io.adb ! 752324076b ./gcc/ada/tree_io.ads ! 3859295957b ./gcc/ada/treepr.adb ! 2456186617b ./gcc/ada/treepr.ads ! 1911577299b ./gcc/ada/treeprs.ads ! 1276512398b ./gcc/ada/treeprs.adt ! 4263888685b ./gcc/ada/ttypef.ads ! 3874309715b ./gcc/ada/ttypes.ads ! 1369397640b ./gcc/ada/types.adb ! 4024957899b ./gcc/ada/types.ads ! 1402875333b ./gcc/ada/types.h 981400444b ./gcc/ada/ug_words ! 259981028b ./gcc/ada/uintp.adb ! 1501595103b ./gcc/ada/uintp.ads ! 2726784320b ./gcc/ada/uintp.h ! 1168757069b ./gcc/ada/uname.adb ! 3887027289b ./gcc/ada/uname.ads ! 2682664197b ./gcc/ada/unchconv.ads ! 906261077b ./gcc/ada/unchdeal.ads ! 1146813221b ./gcc/ada/urealp.adb ! 3019307290b ./gcc/ada/urealp.ads ! 2098404567b ./gcc/ada/urealp.h ! 3991257953b ./gcc/ada/usage.adb ! 876425940b ./gcc/ada/usage.ads ! 35898743b ./gcc/ada/utils.c ! 3098691088b ./gcc/ada/utils2.c ! 2206670030b ./gcc/ada/validsw.adb ! 2813759673b ./gcc/ada/validsw.ads ! 3183449725b ./gcc/ada/widechar.adb ! 1939896965b ./gcc/ada/widechar.ads ! 4107540872b ./gcc/ada/xeinfo.adb 208322693b ./gcc/ada/xgnatug.adb ! 5897144b ./gcc/ada/xnmake.adb ! 3378631066b ./gcc/ada/xr_tabls.adb ! 3872099053b ./gcc/ada/xr_tabls.ads ! 3670337130b ./gcc/ada/xref_lib.adb ! 4020137442b ./gcc/ada/xref_lib.ads ! 1408035530b ./gcc/ada/xsinfo.adb ! 1441973181b ./gcc/ada/xsnames.adb ! 579454790b ./gcc/ada/xtreeprs.adb ! 1423262391b ./gcc/alias.c ! 1031959714b ./gcc/attribs.c ! 3996983224b ./gcc/basic-block.h ! 3664924098b ./gcc/bb-reorder.c ! 518972076b ./gcc/bitmap.c ! 477755928b ./gcc/bitmap.h ! 540939972b ./gcc/builtin-attrs.def ! 1736755746b ./gcc/builtin-types.def ! 1602117951b ./gcc/builtins.c ! 2454689977b ./gcc/builtins.def ! 420541423b ./gcc/c-aux-info.c ! 3749632892b ./gcc/c-common.c ! 2096270511b ./gcc/c-common.def ! 17222401b ./gcc/c-common.h ! 1317742909b ./gcc/c-convert.c ! 3121341096b ./gcc/c-decl.c ! 487899684b ./gcc/c-errors.c ! 1391364139b ./gcc/c-format.c ! 1985388077b ./gcc/c-lang.c ! 382517507b ./gcc/c-lex.c ! 835686435b ./gcc/c-lex.h ! 1191094530b ./gcc/c-objc-common.c ! 707725569b ./gcc/c-parse.c ! 4048701711b ./gcc/c-parse.in ! 492383053b ./gcc/c-parse.y ! 73956308b ./gcc/c-pragma.c ! 1212765089b ./gcc/c-pragma.h ! 3567184655b ./gcc/c-semantics.c ! 2780104305b ./gcc/c-tree.h ! 1842642506b ./gcc/c-typeck.c ! 4196427447b ./gcc/caller-save.c ! 3428212111b ./gcc/calls.c ! 2908854975b ./gcc/cfg.c ! 2266313517b ./gcc/cfganal.c ! 2306033851b ./gcc/cfgbuild.c ! 1767622119b ./gcc/cfgcleanup.c ! 1219429812b ./gcc/cfglayout.c ! 1858346793b ./gcc/cfglayout.h ! 3236894730b ./gcc/cfgloop.c ! 697357307b ./gcc/cfgrtl.c ! 4092688391b ./gcc/collect2.c ! 653998699b ./gcc/collect2.h ! 1204798801b ./gcc/combine.c 4122382037b ./gcc/conditions.h - 1610676755b ./gcc/config.gcc - 1315260558b ./gcc/config.guess - 1761565476b ./gcc/config.in - 3356933371b ./gcc/config/1750a/1750a-protos.h - 525821919b ./gcc/config/1750a/1750a.c - 2195664858b ./gcc/config/1750a/1750a.h - 3089740443b ./gcc/config/1750a/1750a.md - 2477730384b ./gcc/config/1750a/ms1750.inc - 3917072699b ./gcc/config/README - 820188974b ./gcc/config/a29k/a29k-protos.h - 4248885141b ./gcc/config/a29k/a29k.c - 1800382809b ./gcc/config/a29k/a29k.h - 1270050344b ./gcc/config/a29k/a29k.md - 1083391793b ./gcc/config/a29k/rtems.h - 696851807b ./gcc/config/a29k/t-a29kbare - 2585873370b ./gcc/config/a29k/t-vx29k - 1544651385b ./gcc/config/a29k/unix.h - 3167234709b ./gcc/config/a29k/vx29k.h - 1076515812b ./gcc/config/alpha/alpha-interix.h - 4085134134b ./gcc/config/alpha/alpha-protos.h - 830149807b ./gcc/config/alpha/alpha.c - 2486755494b ./gcc/config/alpha/alpha.h - 1672390089b ./gcc/config/alpha/alpha.md 3915788506b ./gcc/config/alpha/alpha32.h 1407988137b ./gcc/config/alpha/crtfastmath.c ! 221364934b ./gcc/config/alpha/elf.h ! 611485563b ./gcc/config/alpha/freebsd.h 2998860143b ./gcc/config/alpha/lib1funcs.asm ! 1763018017b ./gcc/config/alpha/linux-ecoff.h ! 37916839b ./gcc/config/alpha/linux-elf.h ! 3901756355b ./gcc/config/alpha/linux.h ! 1830150315b ./gcc/config/alpha/netbsd.h ! 156117508b ./gcc/config/alpha/openbsd.h ! 4018452315b ./gcc/config/alpha/osf.h ! 1792826440b ./gcc/config/alpha/osf12.h ! 3744703656b ./gcc/config/alpha/osf2or3.h ! 2776242025b ./gcc/config/alpha/osf5.h 1190572001b ./gcc/config/alpha/qrnnd.asm 2672344824b ./gcc/config/alpha/t-alpha 1949254250b ./gcc/config/alpha/t-crtfm --- 160,1749 ---- 3287937987b ./boehm-gc/threadlibs.c 2467355438b ./boehm-gc/typd_mlc.c 332085760b ./boehm-gc/version.h ! 205379550b ./boehm-gc/WCC_MAKEFILE ! 62682092b ./boehm-gc/win32_threads.c ! 374941539b ./BUGS 1129492486b ./bugs.html ! 2979590753b ./ChangeLog ! 430854799b ./config/acinclude.m4 ! 2849228832b ./config/ChangeLog 3794184949b ./config.guess ! 2016379063b ./config.if ! 636889995b ./config/mh-a68bsd 1442196770b ./config/mh-aix386 ! 3252332438b ./config/mh-apollo68 3478341494b ./config/mh-armpic ! 902614684b ./config/mh-cxux 3020282061b ./config/mh-cygwin ! 2617404501b ./config/mh-decstation 973727842b ./config/mh-delta88 ! 4185392584b ./config/mh-dgux ! 3317035055b ./config/mh-dgux386 3870705974b ./config/mh-djgpp 3478341494b ./config/mh-elfalphapic ! 4145550551b ./config/mh-hp300 ! 1335785638b ./config/mh-hpux ! 1335785638b ./config/mh-hpux8 3478341494b ./config/mh-i370pic 3265825290b ./config/mh-ia64pic ! 3591401365b ./config/mh-interix ! 1185833176b ./config/mh-irix5 ! 3858294385b ./config/mh-irix6 ! 982405557b ./config/mh-lynxrs6k 3265825290b ./config/mh-m68kpic ! 2677046369b ./config/mh-mingw32 ! 2709332972b ./config/mh-ncr3000 ! 1441615720b ./config/mh-ncrsvr43 ! 4162364663b ./config/mh-necv4 ! 1335785638b ./config/mh-openedition 3478341494b ./config/mh-papic 3478341494b ./config/mh-ppcpic ! 633311229b ./config/mh-riscos ! 3265825290b ./config/mh-s390pic ! 883433131b ./config/mh-sco ! 612532950b ./config/mh-solaris 1399222241b ./config/mh-sparcpic ! 1335785638b ./config/mh-sysv ! 1114762032b ./config/mh-sysv4 ! 1114762032b ./config/mh-sysv5 3265825290b ./config/mh-x86pic ! 3482357965b ./config-ml.in 2474610656b ./config/mt-aix43 3955224621b ./config/mt-alphaieee 1487563357b ./config/mt-d30v 3571760336b ./config/mt-linux 2548851201b ./config/mt-netware 971016637b ./config/mt-ospace 787786243b ./config/mt-v810 2659154290b ./config/mt-wince ! 537897852b ./config.sub ! 4143692422b ./configure ! 2116766003b ./configure.in 1948950130b ./contrib/analyze_brprob + 986830812b ./contrib/ChangeLog 550196746b ./contrib/compare_tests 2828387446b ./contrib/convert_to_f2c 2929939770b ./contrib/convert_to_g2c 2025073358b ./contrib/download_f2c 1336632236b ./contrib/gccbug.el + 2292355102b ./contrib/gcc_build + 4070348786b ./contrib/gcc_update 109296376b ./contrib/gennews 4256039795b ./contrib/index-prop 3683285493b ./contrib/newcvsroot ! 3406928738b ./contrib/paranoia.cc ! 3661855799b ./contrib/regression/btest-gcc.sh ! 1240870349b ./contrib/regression/ChangeLog ! 1435553453b ./contrib/regression/objs-gcc.sh 1757898889b ./contrib/regression/README ! 3103378580b ./contrib/regression/site.exp ! 3168894978b ./contrib/test_installed ! 2176599191b ./contrib/test_summary ! 1581263438b ./contrib/texi2pod.pl 4228623080b ./contrib/warn_summary ! 2171125041b ./COPYING ! 508743035b ./COPYING.LIB ! 2864072627b ./.cvsignore ! 1423129605b ./FAQ ! 548441745b ./faq.html ! 54199525b ./fastjar/acinclude.m4 ! 1369101675b ./fastjar/aclocal.m4 1005262133b ./fastjar/AUTHORS + 1867626183b ./fastjar/ChangeLog 1745615150b ./fastjar/CHANGES 3743222129b ./fastjar/compress.c 1169302702b ./fastjar/compress.h ! 1117462681b ./fastjar/config.h.in ! 2619265826b ./fastjar/configure ! 3663315504b ./fastjar/configure.in ! 1396100520b ./fastjar/COPYING ! 3707811223b ./fastjar/.cvsignore ! 2553867110b ./fastjar/dostime.c 446939748b ./fastjar/dostime.h + 1044518281b ./fastjar/fastjar.info + 2806177633b ./fastjar/fastjar.texi + 552418521b ./fastjar/grepjar.1 + 2770615802b ./fastjar/INSTALL 2331671736b ./fastjar/install-defs.sh.in 1178077958b ./fastjar/install-sh ! 129852621b ./fastjar/jar.1 ! 2281221680b ./fastjar/jargrep.c 4062871816b ./fastjar/jargrep.h ! 2905933595b ./fastjar/jartool.c 2754304773b ./fastjar/jartool.h + 443848619b ./fastjar/Makefile.am + 232400679b ./fastjar/Makefile.in 990942143b ./fastjar/missing 1455437353b ./fastjar/mkinstalldirs + 4038493440b ./fastjar/NEWS 1315168235b ./fastjar/pushback.c 302085493b ./fastjar/pushback.h + 3780741064b ./fastjar/README 216805921b ./fastjar/stamp-h.in 3071504729b ./fastjar/zipfile.h ! 2215240433b ./gcc/ABOUT-GCC-NLS ! 1413896246b ./gcc/ABOUT-NLS 3729933059b ./gcc/acconfig.h ! 814772351b ./gcc/aclocal.m4 ! 3476755371b ./gcc/ada/1aexcept.adb ! 3022880533b ./gcc/ada/1aexcept.ads ! 2251433832b ./gcc/ada/1ic.ads ! 2191440237b ./gcc/ada/1ssecsta.adb ! 3514856157b ./gcc/ada/1ssecsta.ads ! 2511614379b ./gcc/ada/31soccon.ads ! 2020092279b ./gcc/ada/31soliop.ads ! 3802531266b ./gcc/ada/3asoccon.ads ! 4123202520b ./gcc/ada/3bsoccon.ads ! 3416531203b ./gcc/ada/3gsoccon.ads ! 3090342421b ./gcc/ada/3hsoccon.ads ! 861860510b ./gcc/ada/3ssoccon.ads ! 308347220b ./gcc/ada/3ssoliop.ads ! 2994673654b ./gcc/ada/3wsoccon.ads ! 607155891b ./gcc/ada/3wsocthi.adb ! 1316989620b ./gcc/ada/3wsocthi.ads ! 2811630886b ./gcc/ada/3wsoliop.ads ! 3864072001b ./gcc/ada/41intnam.ads ! 2130062026b ./gcc/ada/42intnam.ads ! 1221639557b ./gcc/ada/4aintnam.ads ! 1910436245b ./gcc/ada/4cintnam.ads ! 4134156609b ./gcc/ada/4dintnam.ads ! 2161733301b ./gcc/ada/4gintnam.ads ! 2224568272b ./gcc/ada/4hexcpol.adb ! 3599917665b ./gcc/ada/4hintnam.ads ! 633311103b ./gcc/ada/4lintnam.ads ! 22907278b ./gcc/ada/4mintnam.ads ! 2380472125b ./gcc/ada/4nintnam.ads ! 2857640960b ./gcc/ada/4ointnam.ads ! 659028582b ./gcc/ada/4onumaux.ads ! 1205711724b ./gcc/ada/4pintnam.ads ! 266939468b ./gcc/ada/4rintnam.ads ! 1762126051b ./gcc/ada/4sintnam.ads ! 2689159715b ./gcc/ada/4uintnam.ads ! 3611799279b ./gcc/ada/4vcaldel.adb ! 1212475634b ./gcc/ada/4vcalend.adb ! 722160584b ./gcc/ada/4vcalend.ads ! 182300439b ./gcc/ada/4vintnam.ads ! 3439856379b ./gcc/ada/4wcalend.adb ! 3094215319b ./gcc/ada/4wexcpol.adb ! 1159845327b ./gcc/ada/4wintnam.ads ! 85261513b ./gcc/ada/4zintnam.ads ! 3990942683b ./gcc/ada/4znumaux.ads ! 57100311b ./gcc/ada/4zsytaco.adb ! 1764501342b ./gcc/ada/4zsytaco.ads ! 2272920092b ./gcc/ada/51osinte.adb ! 1182798516b ./gcc/ada/51osinte.ads ! 3394379261b ./gcc/ada/52osinte.adb ! 416671034b ./gcc/ada/52osinte.ads ! 599905569b ./gcc/ada/52system.ads ! 1251038631b ./gcc/ada/53osinte.ads ! 2237974254b ./gcc/ada/54osinte.ads ! 1661726289b ./gcc/ada/5amastop.adb ! 3544698408b ./gcc/ada/5aosinte.adb ! 330606401b ./gcc/ada/5aosinte.ads ! 629299312b ./gcc/ada/5asystem.ads ! 2253927375b ./gcc/ada/5ataprop.adb ! 3785085609b ./gcc/ada/5atasinf.ads ! 445098646b ./gcc/ada/5ataspri.ads ! 3641787791b ./gcc/ada/5atpopsp.adb ! 3748211331b ./gcc/ada/5avxwork.ads ! 661930325b ./gcc/ada/5bosinte.adb ! 1183030227b ./gcc/ada/5bosinte.ads ! 95390389b ./gcc/ada/5bsystem.ads ! 3224075607b ./gcc/ada/5cosinte.ads ! 4067756523b ./gcc/ada/5dosinte.ads ! 4135155439b ./gcc/ada/5esystem.ads ! 3652564674b ./gcc/ada/5etpopse.adb ! 1407971971b ./gcc/ada/5fintman.adb ! 314025962b ./gcc/ada/5fosinte.ads ! 1561948410b ./gcc/ada/5fsystem.ads ! 2111090904b ./gcc/ada/5ftaprop.adb ! 1649270527b ./gcc/ada/5ftasinf.ads ! 4111312302b ./gcc/ada/5ginterr.adb ! 761494860b ./gcc/ada/5gintman.adb ! 2283439580b ./gcc/ada/5gmastop.adb ! 1273904975b ./gcc/ada/5gosinte.ads ! 1531447747b ./gcc/ada/5gproinf.adb ! 3992132528b ./gcc/ada/5gproinf.ads ! 2235216399b ./gcc/ada/5gsystem.ads ! 1074614971b ./gcc/ada/5gtaprop.adb ! 1216045678b ./gcc/ada/5gtasinf.adb ! 3051684560b ./gcc/ada/5gtasinf.ads ! 3228485956b ./gcc/ada/5gtpgetc.adb ! 1482105014b ./gcc/ada/5hosinte.adb ! 1138790463b ./gcc/ada/5hosinte.ads ! 3569104699b ./gcc/ada/5hparame.ads ! 3381576196b ./gcc/ada/5hsystem.ads ! 114481475b ./gcc/ada/5htaprop.adb ! 3985737607b ./gcc/ada/5htaspri.ads ! 1553633295b ./gcc/ada/5htraceb.adb ! 2354742934b ./gcc/ada/5iosinte.adb ! 341515731b ./gcc/ada/5iosinte.ads ! 4036108862b ./gcc/ada/5itaprop.adb ! 4209017149b ./gcc/ada/5itaspri.ads ! 3966701624b ./gcc/ada/5ksystem.ads ! 3469221755b ./gcc/ada/5kvxwork.ads ! 3333477404b ./gcc/ada/5lintman.adb ! 1002365908b ./gcc/ada/5lml-tgt.adb ! 159446570b ./gcc/ada/5losinte.ads ! 1136027948b ./gcc/ada/5lsystem.ads ! 2342382232b ./gcc/ada/5mosinte.ads ! 22175694b ./gcc/ada/5mvxwork.ads ! 820176851b ./gcc/ada/5ninmaop.adb ! 4204498933b ./gcc/ada/5nintman.adb ! 2307667247b ./gcc/ada/5nosinte.ads ! 1892616891b ./gcc/ada/5ntaprop.adb ! 1061474137b ./gcc/ada/5ntaspri.ads ! 4159557428b ./gcc/ada/5ointerr.adb ! 2159809007b ./gcc/ada/5omastop.adb ! 2019722547b ./gcc/ada/5oosinte.adb ! 94579548b ./gcc/ada/5oosinte.ads ! 3323151699b ./gcc/ada/5oosprim.adb ! 2375843411b ./gcc/ada/5oparame.adb ! 2813458373b ./gcc/ada/5osystem.ads ! 2064827163b ./gcc/ada/5otaprop.adb ! 2138761055b ./gcc/ada/5otaspri.ads ! 2126899975b ./gcc/ada/5posinte.ads ! 2287957803b ./gcc/ada/5posprim.adb ! 1181457253b ./gcc/ada/5pvxwork.ads ! 3743871039b ./gcc/ada/5qosinte.adb ! 52457731b ./gcc/ada/5qosinte.ads ! 1856329556b ./gcc/ada/5qstache.adb ! 1445919716b ./gcc/ada/5qtaprop.adb ! 2692969247b ./gcc/ada/5qtaspri.ads ! 1707765400b ./gcc/ada/5rosinte.adb ! 2024826220b ./gcc/ada/5rosinte.ads ! 54965811b ./gcc/ada/5rparame.adb ! 3957530165b ./gcc/ada/5rtpopsp.adb ! 1163200540b ./gcc/ada/5sintman.adb ! 3949337666b ./gcc/ada/5sosinte.adb ! 1560000859b ./gcc/ada/5sosinte.ads ! 146106406b ./gcc/ada/5sparame.adb ! 1305585189b ./gcc/ada/5ssystem.ads ! 3053269312b ./gcc/ada/5staprop.adb ! 4287558200b ./gcc/ada/5stasinf.adb ! 1101504362b ./gcc/ada/5stasinf.ads ! 691335402b ./gcc/ada/5staspri.ads ! 573438545b ./gcc/ada/5stpopse.adb ! 977723408b ./gcc/ada/5svxwork.ads ! 743181067b ./gcc/ada/5tosinte.ads ! 2291292459b ./gcc/ada/5uintman.adb ! 3471670416b ./gcc/ada/5uosinte.ads ! 1533466448b ./gcc/ada/5vasthan.adb ! 3181558064b ./gcc/ada/5vinmaop.adb ! 3986890387b ./gcc/ada/5vinterr.adb ! 4078156268b ./gcc/ada/5vintman.adb ! 117987244b ./gcc/ada/5vintman.ads ! 2067712643b ./gcc/ada/5vmastop.adb ! 395438714b ./gcc/ada/5vosinte.adb ! 2613021316b ./gcc/ada/5vosinte.ads ! 605174273b ./gcc/ada/5vosprim.adb ! 4255936643b ./gcc/ada/5vosprim.ads ! 4240903667b ./gcc/ada/5vparame.ads ! 3058807267b ./gcc/ada/5vsystem.ads ! 4029181318b ./gcc/ada/5vtaprop.adb ! 2532709981b ./gcc/ada/5vtaspri.ads ! 780199412b ./gcc/ada/5vtpopde.adb ! 4102009234b ./gcc/ada/5vtpopde.ads ! 2631128977b ./gcc/ada/5vvaflop.adb ! 4262337775b ./gcc/ada/5wgloloc.adb ! 2249394845b ./gcc/ada/5wintman.adb ! 2751463374b ./gcc/ada/5wmemory.adb ! 3616990531b ./gcc/ada/5wosinte.ads ! 1659711983b ./gcc/ada/5wosprim.adb ! 4283152297b ./gcc/ada/5wsystem.ads ! 1729829229b ./gcc/ada/5wtaprop.adb ! 1012802673b ./gcc/ada/5wtaspri.ads ! 2341478693b ./gcc/ada/5ysystem.ads ! 1967108827b ./gcc/ada/5zinterr.adb ! 2196483459b ./gcc/ada/5zintman.adb ! 1055330755b ./gcc/ada/5zosinte.adb ! 2446599206b ./gcc/ada/5zosinte.ads ! 3662233131b ./gcc/ada/5zosprim.adb ! 1348382967b ./gcc/ada/5zsystem.ads ! 3159175742b ./gcc/ada/5ztaprop.adb ! 2102065511b ./gcc/ada/6vcpp.adb ! 2689894027b ./gcc/ada/6vcstrea.adb ! 3306533281b ./gcc/ada/6vinterf.ads ! 694204948b ./gcc/ada/7sinmaop.adb ! 2049788032b ./gcc/ada/7sintman.adb ! 476691739b ./gcc/ada/7sosinte.adb ! 3965227943b ./gcc/ada/7sosprim.adb ! 1997910804b ./gcc/ada/7staprop.adb ! 1764982560b ./gcc/ada/7staspri.ads ! 1493206491b ./gcc/ada/7stpopsp.adb ! 1740285994b ./gcc/ada/7straceb.adb ! 1363857210b ./gcc/ada/86numaux.adb ! 4053303068b ./gcc/ada/86numaux.ads ! 3760778950b ./gcc/ada/9drpc.adb ! 2280800531b ./gcc/ada/a-astaco.adb ! 3259280671b ./gcc/ada/a-astaco.ads ! 367890918b ./gcc/ada/a-caldel.adb ! 2850927655b ./gcc/ada/a-caldel.ads ! 2264463076b ./gcc/ada/a-calend.adb ! 3705096499b ./gcc/ada/a-calend.ads ! 2432115721b ./gcc/ada/a-chahan.adb ! 2062715973b ./gcc/ada/a-chahan.ads ! 2585470398b ./gcc/ada/a-charac.ads ! 475906449b ./gcc/ada/a-chlat1.ads ! 1016788241b ./gcc/ada/a-chlat9.ads ! 474399754b ./gcc/ada/a-colien.adb ! 2019585318b ./gcc/ada/a-colien.ads ! 446719574b ./gcc/ada/a-colire.adb ! 3911502658b ./gcc/ada/a-colire.ads ! 4208260302b ./gcc/ada/a-comlin.adb ! 2676889573b ./gcc/ada/a-comlin.ads ! 2671391885b ./gcc/ada/a-cwila1.ads ! 3799548269b ./gcc/ada/a-cwila9.ads ! 3768095897b ./gcc/ada/ada.ads ! 1295005255b ./gcc/ada/adadecode.c ! 1590048241b ./gcc/ada/adadecode.h ! 3752930348b ./gcc/ada/adafinal.c ! 1951378334b ./gcc/ada/ada.h ! 4254504525b ./gcc/ada/adaint.c ! 842239939b ./gcc/ada/adaint.h ! 1982115237b ./gcc/ada/ada-tree.def ! 1334528231b ./gcc/ada/ada-tree.h ! 2562885096b ./gcc/ada/a-decima.adb ! 3964508631b ./gcc/ada/a-decima.ads ! 4162793785b ./gcc/ada/a-diocst.adb ! 3798368130b ./gcc/ada/a-diocst.ads ! 1037920363b ./gcc/ada/a-direio.adb ! 1125839799b ./gcc/ada/a-direio.ads ! 1891718240b ./gcc/ada/a-dynpri.adb ! 1228228526b ./gcc/ada/a-dynpri.ads ! 2515816420b ./gcc/ada/a-einuoc.adb ! 1361226149b ./gcc/ada/a-einuoc.ads ! 289090565b ./gcc/ada/a-except.adb ! 1373330010b ./gcc/ada/a-except.ads ! 2635307314b ./gcc/ada/a-excpol.adb ! 1476905781b ./gcc/ada/a-exctra.adb ! 3119338693b ./gcc/ada/a-exctra.ads ! 3314908396b ./gcc/ada/a-filico.adb ! 1154496649b ./gcc/ada/a-filico.ads ! 3900641047b ./gcc/ada/a-finali.adb ! 3971104804b ./gcc/ada/a-finali.ads ! 4084067249b ./gcc/ada/a-flteio.ads ! 2838243354b ./gcc/ada/a-fwteio.ads ! 2553750682b ./gcc/ada/a-inteio.ads ! 2112216622b ./gcc/ada/a-interr.adb ! 3711128136b ./gcc/ada/a-interr.ads ! 2252700482b ./gcc/ada/a-intnam.ads ! 3783787070b ./gcc/ada/a-intsig.adb ! 3753195216b ./gcc/ada/a-intsig.ads ! 4260440302b ./gcc/ada/a-ioexce.ads ! 1320750593b ./gcc/ada/a-iwteio.ads ! 3184637491b ./gcc/ada/a-lfteio.ads ! 3399197938b ./gcc/ada/a-lfwtio.ads ! 394580827b ./gcc/ada/ali.adb ! 2668171343b ./gcc/ada/ali.ads ! 4181349523b ./gcc/ada/a-liteio.ads ! 510875974b ./gcc/ada/ali-util.adb ! 3777303034b ./gcc/ada/ali-util.ads ! 4061818571b ./gcc/ada/a-liwtio.ads ! 2391273921b ./gcc/ada/a-llftio.ads ! 589145108b ./gcc/ada/a-llfwti.ads ! 733828438b ./gcc/ada/a-llitio.ads ! 2019981437b ./gcc/ada/a-lliwti.ads ! 641549079b ./gcc/ada/alloc.ads ! 4202114661b ./gcc/ada/a-ncelfu.ads ! 2982795424b ./gcc/ada/a-ngcefu.adb ! 2417195295b ./gcc/ada/a-ngcefu.ads ! 3422153681b ./gcc/ada/a-ngcoty.adb ! 2702884127b ./gcc/ada/a-ngcoty.ads ! 1264432570b ./gcc/ada/a-ngelfu.adb ! 4251236541b ./gcc/ada/a-ngelfu.ads ! 311918519b ./gcc/ada/a-nlcefu.ads ! 4262096075b ./gcc/ada/a-nlcoty.ads ! 1836187080b ./gcc/ada/a-nlelfu.ads ! 2034585729b ./gcc/ada/a-nllcef.ads ! 1706106687b ./gcc/ada/a-nllcty.ads ! 1710244911b ./gcc/ada/a-nllefu.ads ! 660173792b ./gcc/ada/a-nscefu.ads ! 2693186813b ./gcc/ada/a-nscoty.ads ! 414125373b ./gcc/ada/a-nselfu.ads ! 1771932863b ./gcc/ada/a-nucoty.ads ! 2830452418b ./gcc/ada/a-nudira.adb ! 2698500475b ./gcc/ada/a-nudira.ads ! 1941470210b ./gcc/ada/a-nuelfu.ads ! 578585452b ./gcc/ada/a-nuflra.adb ! 562766691b ./gcc/ada/a-nuflra.ads ! 3306765590b ./gcc/ada/a-numaux.ads ! 615971690b ./gcc/ada/a-numeri.ads ! 2251853720b ./gcc/ada/a-reatim.adb ! 3420934441b ./gcc/ada/a-reatim.ads ! 2422313336b ./gcc/ada/a-retide.adb ! 2786353850b ./gcc/ada/a-retide.ads ! 899190514b ./gcc/ada/argv.c ! 915291874b ./gcc/ada/a-sequio.adb ! 2781518414b ./gcc/ada/a-sequio.ads ! 1028548096b ./gcc/ada/a-sfteio.ads ! 756561237b ./gcc/ada/a-sfwtio.ads ! 2149334054b ./gcc/ada/a-siocst.adb ! 1013973588b ./gcc/ada/a-siocst.ads ! 1542052045b ./gcc/ada/a-siteio.ads ! 898470063b ./gcc/ada/a-siwtio.ads ! 2664255451b ./gcc/ada/a-ssicst.adb ! 3968217970b ./gcc/ada/a-ssicst.ads ! 2040244723b ./gcc/ada/a-ssitio.ads ! 3856185038b ./gcc/ada/a-ssiwti.ads ! 3843904384b ./gcc/ada/a-stmaco.ads ! 2558304413b ./gcc/ada/a-storio.adb ! 2039645547b ./gcc/ada/a-storio.ads ! 2545807360b ./gcc/ada/a-strbou.adb ! 1649576447b ./gcc/ada/a-strbou.ads ! 4189169864b ./gcc/ada/a-stream.ads ! 312272500b ./gcc/ada/a-strfix.adb ! 1836795891b ./gcc/ada/a-strfix.ads ! 452191775b ./gcc/ada/a-string.ads ! 3440162100b ./gcc/ada/a-strmap.adb ! 2813601661b ./gcc/ada/a-strmap.ads ! 2242083134b ./gcc/ada/a-strsea.adb ! 1087128520b ./gcc/ada/a-strsea.ads ! 2129652476b ./gcc/ada/a-strunb.adb ! 1086280505b ./gcc/ada/a-strunb.ads ! 3244198764b ./gcc/ada/a-ststio.adb ! 1434597636b ./gcc/ada/a-ststio.ads ! 3563861726b ./gcc/ada/a-stunau.adb ! 1904848935b ./gcc/ada/a-stunau.ads ! 847226371b ./gcc/ada/a-stwibo.adb ! 3765473566b ./gcc/ada/a-stwibo.ads ! 1000480915b ./gcc/ada/a-stwifi.adb ! 920074266b ./gcc/ada/a-stwifi.ads ! 1758378198b ./gcc/ada/a-stwima.adb ! 388329618b ./gcc/ada/a-stwima.ads ! 2111278285b ./gcc/ada/a-stwise.adb ! 489428799b ./gcc/ada/a-stwise.ads ! 931863816b ./gcc/ada/a-stwiun.adb ! 163835538b ./gcc/ada/a-stwiun.ads ! 1312891822b ./gcc/ada/a-suteio.adb ! 985067551b ./gcc/ada/a-suteio.ads ! 1525903292b ./gcc/ada/a-swmwco.ads ! 1588030610b ./gcc/ada/a-swuwti.adb ! 3037851063b ./gcc/ada/a-swuwti.ads ! 1272213971b ./gcc/ada/a-sytaco.adb ! 1711371162b ./gcc/ada/a-sytaco.ads ! 2802470452b ./gcc/ada/a-tags.adb ! 1139968956b ./gcc/ada/a-tags.ads ! 1682735148b ./gcc/ada/a-tasatt.adb ! 2506460027b ./gcc/ada/a-tasatt.ads ! 1017733066b ./gcc/ada/a-taside.adb ! 449278150b ./gcc/ada/a-taside.ads ! 2262767398b ./gcc/ada/a-teioed.adb ! 942283074b ./gcc/ada/a-teioed.ads ! 4268790192b ./gcc/ada/a-textio.adb ! 2542210919b ./gcc/ada/a-textio.ads ! 955977038b ./gcc/ada/a-ticoau.adb ! 2276027850b ./gcc/ada/a-ticoau.ads ! 3483744171b ./gcc/ada/a-ticoio.adb ! 665665210b ./gcc/ada/a-ticoio.ads ! 1248666345b ./gcc/ada/a-tideau.adb ! 4051134505b ./gcc/ada/a-tideau.ads ! 702405015b ./gcc/ada/a-tideio.adb ! 2372089939b ./gcc/ada/a-tideio.ads ! 3343604978b ./gcc/ada/a-tienau.adb ! 1925813485b ./gcc/ada/a-tienau.ads ! 3960488072b ./gcc/ada/a-tienio.adb ! 2111373475b ./gcc/ada/a-tienio.ads ! 3736901273b ./gcc/ada/a-tifiio.adb ! 629253286b ./gcc/ada/a-tifiio.ads ! 677807166b ./gcc/ada/a-tiflau.adb ! 1615304674b ./gcc/ada/a-tiflau.ads ! 2814224774b ./gcc/ada/a-tiflio.adb ! 1672570592b ./gcc/ada/a-tiflio.ads ! 810361168b ./gcc/ada/a-tigeau.adb ! 1572153528b ./gcc/ada/a-tigeau.ads ! 819961222b ./gcc/ada/a-tiinau.adb ! 2292489642b ./gcc/ada/a-tiinau.ads ! 1710485185b ./gcc/ada/a-tiinio.adb ! 2237530049b ./gcc/ada/a-tiinio.ads ! 330984461b ./gcc/ada/a-timoau.adb ! 2636796425b ./gcc/ada/a-timoau.ads ! 3963870398b ./gcc/ada/a-timoio.adb ! 2610046346b ./gcc/ada/a-timoio.ads ! 214132248b ./gcc/ada/a-tiocst.adb ! 4121988035b ./gcc/ada/a-tiocst.ads ! 3910455454b ./gcc/ada/a-titest.adb ! 3599822963b ./gcc/ada/a-titest.ads ! 618728363b ./gcc/ada/atree.adb ! 1328381436b ./gcc/ada/atree.ads ! 3927429423b ./gcc/ada/atree.h ! 2501643743b ./gcc/ada/a-unccon.ads ! 125078292b ./gcc/ada/a-uncdea.ads ! 3257044236b ./gcc/ada/aux-io.c ! 29969073b ./gcc/ada/a-witeio.adb ! 1654805280b ./gcc/ada/a-witeio.ads ! 399909379b ./gcc/ada/a-wtcoau.adb ! 15915668b ./gcc/ada/a-wtcoau.ads ! 3269698900b ./gcc/ada/a-wtcoio.adb ! 2633134472b ./gcc/ada/a-wtcoio.ads ! 3508555518b ./gcc/ada/a-wtcstr.adb ! 2332040028b ./gcc/ada/a-wtcstr.ads ! 641727529b ./gcc/ada/a-wtdeau.adb ! 2322401430b ./gcc/ada/a-wtdeau.ads ! 2118372476b ./gcc/ada/a-wtdeio.adb ! 2112087328b ./gcc/ada/a-wtdeio.ads ! 3854209025b ./gcc/ada/a-wtedit.adb ! 479264111b ./gcc/ada/a-wtedit.ads ! 1980816428b ./gcc/ada/a-wtenau.adb ! 3157540776b ./gcc/ada/a-wtenau.ads ! 3636478590b ./gcc/ada/a-wtenio.adb ! 2040027206b ./gcc/ada/a-wtenio.ads ! 890247767b ./gcc/ada/a-wtfiio.adb ! 2831441596b ./gcc/ada/a-wtfiio.ads ! 2557337210b ./gcc/ada/a-wtflau.adb ! 2182558825b ./gcc/ada/a-wtflau.ads ! 3508822041b ./gcc/ada/a-wtflio.adb ! 2091412810b ./gcc/ada/a-wtflio.ads ! 1511767393b ./gcc/ada/a-wtgeau.adb ! 2832624988b ./gcc/ada/a-wtgeau.ads ! 1836843487b ./gcc/ada/a-wtinau.adb ! 2000363120b ./gcc/ada/a-wtinau.ads ! 1243322800b ./gcc/ada/a-wtinio.adb ! 2970643185b ./gcc/ada/a-wtinio.ads ! 2930847231b ./gcc/ada/a-wtmoau.adb ! 2244525143b ./gcc/ada/a-wtmoau.ads ! 5494583b ./gcc/ada/a-wtmoio.adb ! 775232154b ./gcc/ada/a-wtmoio.ads ! 663806314b ./gcc/ada/a-wttest.adb ! 2990280730b ./gcc/ada/a-wttest.ads ! 1819935344b ./gcc/ada/back_end.adb ! 2085249332b ./gcc/ada/back_end.ads ! 2077333587b ./gcc/ada/bcheck.adb ! 610231922b ./gcc/ada/bcheck.ads ! 3315023152b ./gcc/ada/binde.adb ! 1670324692b ./gcc/ada/binde.ads ! 2059683005b ./gcc/ada/binderr.adb ! 3223521218b ./gcc/ada/binderr.ads ! 1109941393b ./gcc/ada/bindgen.adb ! 295408128b ./gcc/ada/bindgen.ads ! 2463228634b ./gcc/ada/bindusg.adb ! 2314222747b ./gcc/ada/bindusg.ads ! 2678651278b ./gcc/ada/butil.adb ! 440542872b ./gcc/ada/butil.ads ! 2310836100b ./gcc/ada/cal.c ! 1268893086b ./gcc/ada/calendar.ads ! 819907824b ./gcc/ada/casing.adb ! 383971693b ./gcc/ada/casing.ads ! 2658802005b ./gcc/ada/ceinfo.adb ! 760618345b ./gcc/ada/ChangeLog ! 2766796861b ./gcc/ada/checks.adb ! 2020343191b ./gcc/ada/checks.ads ! 1422160412b ./gcc/ada/cio.c ! 2875263289b ./gcc/ada/comperr.adb ! 1231263286b ./gcc/ada/comperr.ads ! 1849806667b ./gcc/ada/config-lang.in ! 1823124766b ./gcc/ada/csets.adb ! 3233617109b ./gcc/ada/csets.ads ! 90812921b ./gcc/ada/csinfo.adb ! 3005500375b ./gcc/ada/cstand.adb ! 281967843b ./gcc/ada/cstand.ads ! 2588845972b ./gcc/ada/cstreams.c ! 1496314704b ./gcc/ada/cuintp.c ! 1423685038b ./gcc/ada/.cvsignore ! 282379933b ./gcc/ada/debug_a.adb ! 2893733810b ./gcc/ada/debug_a.ads ! 4058447839b ./gcc/ada/debug.adb ! 1164136597b ./gcc/ada/debug.ads ! 4020479104b ./gcc/ada/dec.ads ! 2327476984b ./gcc/ada/dec-io.adb ! 564204733b ./gcc/ada/dec-io.ads ! 269093773b ./gcc/ada/decl.c ! 3825382514b ./gcc/ada/deftarg.c ! 238197807b ./gcc/ada/directio.ads ! 511345179b ./gcc/ada/einfo.adb ! 248137143b ./gcc/ada/einfo.ads ! 3647101285b ./gcc/ada/einfo.h ! 616869107b ./gcc/ada/elists.adb ! 56994651b ./gcc/ada/elists.ads ! 1004247325b ./gcc/ada/elists.h ! 2475394593b ./gcc/ada/errno.c ! 4176702965b ./gcc/ada/errout.adb ! 3196840869b ./gcc/ada/errout.ads ! 3148452071b ./gcc/ada/eval_fat.adb ! 4226389411b ./gcc/ada/eval_fat.ads ! 1134022627b ./gcc/ada/exit.c ! 2205430929b ./gcc/ada/exp_aggr.adb ! 407903332b ./gcc/ada/exp_aggr.ads ! 1707095337b ./gcc/ada/expander.adb ! 326210343b ./gcc/ada/expander.ads ! 4053842288b ./gcc/ada/exp_attr.adb ! 3526764645b ./gcc/ada/exp_attr.ads ! 235818397b ./gcc/ada/exp_ch10.ads ! 2818648683b ./gcc/ada/exp_ch11.adb ! 3533146355b ./gcc/ada/exp_ch11.ads ! 2334668711b ./gcc/ada/exp_ch12.adb ! 4092536961b ./gcc/ada/exp_ch12.ads ! 176447720b ./gcc/ada/exp_ch13.adb ! 2521527262b ./gcc/ada/exp_ch13.ads ! 1221904762b ./gcc/ada/exp_ch2.adb ! 3294806844b ./gcc/ada/exp_ch2.ads ! 4281826131b ./gcc/ada/exp_ch3.adb ! 2507567557b ./gcc/ada/exp_ch3.ads ! 2656116038b ./gcc/ada/exp_ch4.adb ! 1502930229b ./gcc/ada/exp_ch4.ads ! 758996479b ./gcc/ada/exp_ch5.adb ! 2064741599b ./gcc/ada/exp_ch5.ads ! 791462490b ./gcc/ada/exp_ch6.adb ! 544091101b ./gcc/ada/exp_ch6.ads ! 1034010091b ./gcc/ada/exp_ch7.adb ! 2662188587b ./gcc/ada/exp_ch7.ads ! 3988114403b ./gcc/ada/exp_ch8.adb ! 3648275711b ./gcc/ada/exp_ch8.ads ! 2387291365b ./gcc/ada/exp_ch9.adb ! 2693227642b ./gcc/ada/exp_ch9.ads ! 559795574b ./gcc/ada/exp_code.adb ! 121970742b ./gcc/ada/exp_code.ads ! 3428155909b ./gcc/ada/exp_dbug.adb ! 1356780760b ./gcc/ada/exp_dbug.ads ! 1275956251b ./gcc/ada/exp_disp.adb ! 2931129238b ./gcc/ada/exp_disp.ads ! 1762813961b ./gcc/ada/exp_dist.adb ! 1584948667b ./gcc/ada/exp_dist.ads ! 4257430321b ./gcc/ada/expect.c ! 611747716b ./gcc/ada/exp_fixd.adb ! 3285837422b ./gcc/ada/exp_fixd.ads ! 2525026740b ./gcc/ada/exp_imgv.adb ! 3516513979b ./gcc/ada/exp_imgv.ads ! 3844454892b ./gcc/ada/exp_intr.adb ! 537028872b ./gcc/ada/exp_intr.ads ! 1048921478b ./gcc/ada/exp_pakd.adb ! 1524361927b ./gcc/ada/exp_pakd.ads ! 1168291146b ./gcc/ada/exp_prag.adb ! 769332415b ./gcc/ada/exp_prag.ads ! 3827387746b ./gcc/ada/exp_smem.adb ! 2116635502b ./gcc/ada/exp_smem.ads ! 2713308952b ./gcc/ada/exp_strm.adb ! 1540246149b ./gcc/ada/exp_strm.ads ! 2105460934b ./gcc/ada/exp_tss.adb ! 1765437710b ./gcc/ada/exp_tss.ads ! 2284259498b ./gcc/ada/exp_util.adb ! 2076521219b ./gcc/ada/exp_util.ads ! 700545860b ./gcc/ada/exp_vfpt.adb ! 100115849b ./gcc/ada/exp_vfpt.ads ! 1835720949b ./gcc/ada/fe.h ! 4158495892b ./gcc/ada/fmap.adb ! 3938265786b ./gcc/ada/fmap.ads ! 3153532790b ./gcc/ada/fname.adb ! 4114894862b ./gcc/ada/fname.ads ! 88842572b ./gcc/ada/fname-sf.adb ! 3062888730b ./gcc/ada/fname-sf.ads ! 3767595337b ./gcc/ada/fname-uf.adb ! 406969945b ./gcc/ada/fname-uf.ads ! 2227723631b ./gcc/ada/freeze.adb ! 1206777338b ./gcc/ada/freeze.ads ! 1826922110b ./gcc/ada/frontend.adb ! 676042928b ./gcc/ada/frontend.ads ! 3777138484b ./gcc/ada/g-awk.adb ! 195728151b ./gcc/ada/g-awk.ads ! 4003887320b ./gcc/ada/g-busora.adb ! 1554164314b ./gcc/ada/g-busora.ads ! 4279742334b ./gcc/ada/g-busorg.adb ! 961766446b ./gcc/ada/g-busorg.ads ! 2044229632b ./gcc/ada/g-calend.adb ! 1871777734b ./gcc/ada/g-calend.ads ! 2463536054b ./gcc/ada/g-casuti.adb ! 4184607737b ./gcc/ada/g-casuti.ads ! 1568571149b ./gcc/ada/g-catiio.adb ! 856490972b ./gcc/ada/g-catiio.ads ! 411567761b ./gcc/ada/g-cgi.adb ! 1605337887b ./gcc/ada/g-cgi.ads ! 3170554685b ./gcc/ada/g-cgicoo.adb ! 3501738986b ./gcc/ada/g-cgicoo.ads ! 1510367608b ./gcc/ada/g-cgideb.adb ! 2766087039b ./gcc/ada/g-cgideb.ads ! 835608648b ./gcc/ada/g-comlin.adb ! 3977497081b ./gcc/ada/g-comlin.ads ! 329127690b ./gcc/ada/g-crc32.adb ! 1568690540b ./gcc/ada/g-crc32.ads ! 3616287417b ./gcc/ada/g-curexc.ads ! 2927265554b ./gcc/ada/g-debpoo.adb ! 1885333662b ./gcc/ada/g-debpoo.ads ! 1269256047b ./gcc/ada/g-debuti.adb ! 2222481425b ./gcc/ada/g-debuti.ads ! 3634284999b ./gcc/ada/g-diopit.adb ! 2583507319b ./gcc/ada/g-diopit.ads ! 2061346770b ./gcc/ada/g-dirope.adb ! 2521970571b ./gcc/ada/g-dirope.ads ! 397180417b ./gcc/ada/g-dyntab.adb ! 748979667b ./gcc/ada/g-dyntab.ads ! 514040300b ./gcc/ada/g-enblsp.adb ! 1210185367b ./gcc/ada/get_targ.adb ! 667434559b ./gcc/ada/get_targ.ads ! 997169893b ./gcc/ada/g-except.ads ! 401435319b ./gcc/ada/g-exctra.adb ! 3791669892b ./gcc/ada/g-exctra.ads ! 76806179b ./gcc/ada/g-expect.adb ! 872129069b ./gcc/ada/g-expect.ads ! 2314156678b ./gcc/ada/g-flocon.ads ! 592047281b ./gcc/ada/g-hesora.adb ! 1944268715b ./gcc/ada/g-hesora.ads ! 3121769016b ./gcc/ada/g-hesorg.adb ! 650879790b ./gcc/ada/g-hesorg.ads ! 3338369479b ./gcc/ada/g-htable.adb ! 3587450756b ./gcc/ada/g-htable.ads ! 2523297721b ./gcc/ada/gigi.h ! 2866037851b ./gcc/ada/g-io.adb ! 648542470b ./gcc/ada/g-io.ads ! 2816296285b ./gcc/ada/g-io_aux.adb ! 2095985066b ./gcc/ada/g-io_aux.ads ! 206565595b ./gcc/ada/g-locfil.adb ! 2765360318b ./gcc/ada/g-locfil.ads ! 1110643939b ./gcc/ada/g-md5.adb ! 313686793b ./gcc/ada/g-md5.ads ! 1321722641b ./gcc/ada/gmem.c ! 1229364627b ./gcc/ada/g-moreex.adb ! 1570727780b ./gcc/ada/g-moreex.ads ! 394153681b ./gcc/ada/gnat1drv.adb ! 1023650319b ./gcc/ada/gnat1drv.ads ! 1113521052b ./gcc/ada/gnat.ads ! 3119768779b ./gcc/ada/gnatbind.adb ! 33603998b ./gcc/ada/gnatbind.ads ! 1627437503b ./gcc/ada/gnatbl.c ! 540500642b ./gcc/ada/gnatchop.adb ! 2969604217b ./gcc/ada/gnatcmd.adb ! 4090853881b ./gcc/ada/gnatcmd.ads ! 2859978646b ./gcc/ada/gnatdll.adb ! 897045337b ./gcc/ada/gnatfind.adb ! 4239198286b ./gcc/ada/gnatkr.adb ! 2263227460b ./gcc/ada/gnatkr.ads ! 2824021054b ./gcc/ada/gnatlbr.adb ! 2717759059b ./gcc/ada/gnatlink.adb ! 2418815267b ./gcc/ada/gnatlink.ads ! 424096833b ./gcc/ada/gnatls.adb ! 1028292021b ./gcc/ada/gnatls.ads ! 3044577120b ./gcc/ada/gnatmake.adb ! 2090105224b ./gcc/ada/gnatmake.ads ! 3774075467b ./gcc/ada/gnatmem.adb ! 1656761015b ./gcc/ada/gnatname.adb ! 2261990630b ./gcc/ada/gnatname.ads ! 2304496705b ./gcc/ada/gnatprep.adb ! 2739505905b ./gcc/ada/gnatprep.ads ! 2618438921b ./gcc/ada/gnatpsta.adb ! 1628534330b ./gcc/ada/gnat_rm.info ! 652595551b ./gcc/ada/gnat_rm.texi ! 4056210887b ./gcc/ada/gnat-style.info ! 4283135334b ./gcc/ada/gnat-style.texi ! 2087208411b ./gcc/ada/gnat_ug.texi ! 525040348b ./gcc/ada/gnat_ug_unx.info ! 804303635b ./gcc/ada/gnat_ug_unx.texi ! 585522613b ./gcc/ada/gnat_ug_vms.info ! 1719659850b ./gcc/ada/gnat_ug_vms.texi ! 2757580321b ./gcc/ada/gnat_ug_vxw.info ! 1705774003b ./gcc/ada/gnat_ug_vxw.texi ! 1060752772b ./gcc/ada/gnat_ug_wnt.info ! 1236505387b ./gcc/ada/gnat_ug_wnt.texi ! 3334144073b ./gcc/ada/gnatvsn.adb ! 1947192708b ./gcc/ada/gnatvsn.ads ! 1802022950b ./gcc/ada/gnatxref.adb ! 338464037b ./gcc/ada/g-os_lib.adb ! 513796027b ./gcc/ada/g-os_lib.ads ! 3830058578b ./gcc/ada/g-regexp.adb ! 3070508642b ./gcc/ada/g-regexp.ads ! 3686549610b ./gcc/ada/g-regist.adb ! 747937862b ./gcc/ada/g-regist.ads ! 3753845184b ./gcc/ada/g-regpat.adb ! 138782653b ./gcc/ada/g-regpat.ads ! 1544278900b ./gcc/ada/g-soccon.ads ! 2379071440b ./gcc/ada/g-socket.adb ! 4174873093b ./gcc/ada/g-socket.ads ! 3785404924b ./gcc/ada/g-socthi.adb ! 4269123058b ./gcc/ada/g-socthi.ads ! 3126417264b ./gcc/ada/g-soliop.ads ! 3097077070b ./gcc/ada/g-souinf.ads ! 3686684815b ./gcc/ada/g-speche.adb ! 464423481b ./gcc/ada/g-speche.ads ! 3531734945b ./gcc/ada/g-spipat.adb ! 2004680943b ./gcc/ada/g-spipat.ads ! 4054796442b ./gcc/ada/g-spitbo.adb ! 851716979b ./gcc/ada/g-spitbo.ads ! 209235236b ./gcc/ada/g-sptabo.ads ! 3316143435b ./gcc/ada/g-sptain.ads ! 3012239657b ./gcc/ada/g-sptavs.ads ! 1756615822b ./gcc/ada/g-table.adb ! 1263895460b ./gcc/ada/g-table.ads ! 287058550b ./gcc/ada/g-tasloc.adb ! 3577598512b ./gcc/ada/g-tasloc.ads ! 3777760030b ./gcc/ada/g-thread.adb ! 1458239623b ./gcc/ada/g-thread.ads ! 3423345674b ./gcc/ada/g-traceb.adb ! 110997839b ./gcc/ada/g-traceb.ads ! 4154493035b ./gcc/ada/g-trasym.adb ! 2114872806b ./gcc/ada/g-trasym.ads ! 1992194948b ./gcc/ada/hlo.adb ! 7965000b ./gcc/ada/hlo.ads ! 3338520812b ./gcc/ada/hostparm.ads ! 1669538892b ./gcc/ada/i-c.adb ! 3530665587b ./gcc/ada/i-c.ads ! 1230378873b ./gcc/ada/i-cexten.ads ! 2075740660b ./gcc/ada/i-cobol.adb ! 3820285535b ./gcc/ada/i-cobol.ads ! 1479110528b ./gcc/ada/i-cpoint.adb ! 819019048b ./gcc/ada/i-cpoint.ads ! 298672945b ./gcc/ada/i-cpp.adb ! 28240857b ./gcc/ada/i-cpp.ads ! 1834260068b ./gcc/ada/i-cstrea.adb ! 43927628b ./gcc/ada/i-cstrea.ads ! 3182760100b ./gcc/ada/i-cstrin.adb ! 760004464b ./gcc/ada/i-cstrin.ads ! 1082363589b ./gcc/ada/i-fortra.adb ! 437203870b ./gcc/ada/i-fortra.ads ! 2860077370b ./gcc/ada/impunit.adb ! 1270682056b ./gcc/ada/impunit.ads ! 3972829514b ./gcc/ada/init.c ! 3278491691b ./gcc/ada/inline.adb ! 1762674301b ./gcc/ada/inline.ads ! 2192188241b ./gcc/ada/interfac.ads ! 629054167b ./gcc/ada/io-aux.c ! 2207881126b ./gcc/ada/ioexcept.ads ! 3167896627b ./gcc/ada/i-os2err.ads ! 1197558233b ./gcc/ada/i-os2lib.adb ! 2393101475b ./gcc/ada/i-os2lib.ads ! 3768225662b ./gcc/ada/i-os2syn.ads ! 113148653b ./gcc/ada/i-os2thr.ads ! 1225602965b ./gcc/ada/i-pacdec.adb ! 2496798758b ./gcc/ada/i-pacdec.ads ! 2314855848b ./gcc/ada/itypes.adb ! 2459378339b ./gcc/ada/itypes.ads ! 2140184443b ./gcc/ada/i-vxwork.ads ! 632117246b ./gcc/ada/krunch.adb ! 4246886280b ./gcc/ada/krunch.ads ! 1862862910b ./gcc/ada/lang-options.h ! 3845386634b ./gcc/ada/lang-specs.h ! 4287853992b ./gcc/ada/layout.adb ! 4081150350b ./gcc/ada/layout.ads ! 2230935205b ./gcc/ada/lib.adb ! 2936051516b ./gcc/ada/lib.ads ! 2597706667b ./gcc/ada/lib-list.adb ! 4055706216b ./gcc/ada/lib-load.adb ! 1245484453b ./gcc/ada/lib-load.ads ! 1969356493b ./gcc/ada/lib-sort.adb ! 626402722b ./gcc/ada/lib-util.adb ! 2975162935b ./gcc/ada/lib-util.ads ! 2489845101b ./gcc/ada/lib-writ.adb ! 1673066597b ./gcc/ada/lib-writ.ads ! 2264530243b ./gcc/ada/lib-xref.adb ! 901200146b ./gcc/ada/lib-xref.ads ! 999948081b ./gcc/ada/link.c ! 2630990747b ./gcc/ada/live.adb ! 2000138918b ./gcc/ada/live.ads ! 1415864294b ./gcc/ada/machcode.ads ! 122623076b ./gcc/ada/make.adb ! 793009024b ./gcc/ada/make.ads ! 2030243097b ./gcc/ada/Makefile.adalib ! 1996296872b ./gcc/ada/Makefile.in ! 564268436b ./gcc/ada/Make-lang.in ! 2487708892b ./gcc/ada/makeusg.adb ! 3790916888b ./gcc/ada/makeusg.ads ! 3923163233b ./gcc/ada/math_lib.adb ! 1956935174b ./gcc/ada/mdll.adb ! 3933871472b ./gcc/ada/mdll.ads ! 3362749341b ./gcc/ada/mdll-fil.adb ! 1485790591b ./gcc/ada/mdll-fil.ads ! 1067337271b ./gcc/ada/mdll-utl.adb ! 1242830681b ./gcc/ada/mdll-utl.ads ! 1750383127b ./gcc/ada/memroot.adb ! 3615380192b ./gcc/ada/memroot.ads ! 608378712b ./gcc/ada/memtrack.adb ! 2932384816b ./gcc/ada/misc.c ! 3998763736b ./gcc/ada/mkdir.c ! 203897137b ./gcc/ada/mlib.adb ! 2020670378b ./gcc/ada/mlib.ads ! 2065833419b ./gcc/ada/mlib-fil.adb ! 1905259349b ./gcc/ada/mlib-fil.ads ! 2608943021b ./gcc/ada/mlib-prj.adb ! 1529256654b ./gcc/ada/mlib-prj.ads ! 3283324341b ./gcc/ada/mlib-tgt.adb ! 3830455991b ./gcc/ada/mlib-tgt.ads ! 81774383b ./gcc/ada/mlib-utl.adb ! 1275564670b ./gcc/ada/mlib-utl.ads ! 3538350861b ./gcc/ada/namet.adb ! 3639574738b ./gcc/ada/namet.ads ! 1508657599b ./gcc/ada/namet.h ! 340034992b ./gcc/ada/nlists.adb ! 818865783b ./gcc/ada/nlists.ads ! 72558113b ./gcc/ada/nlists.h ! 3764030160b ./gcc/ada/nmake.adb ! 3274222280b ./gcc/ada/nmake.ads ! 3284608311b ./gcc/ada/nmake.adt ! 3260145123b ./gcc/ada/opt.adb ! 3447732531b ./gcc/ada/opt.ads ! 915506958b ./gcc/ada/osint.adb ! 2272158773b ./gcc/ada/osint.ads ! 1098506633b ./gcc/ada/osint-b.adb ! 1413972832b ./gcc/ada/osint-b.ads ! 516902818b ./gcc/ada/osint-c.adb ! 2923643768b ./gcc/ada/osint-c.ads ! 3431937667b ./gcc/ada/osint-l.adb ! 1051131321b ./gcc/ada/osint-l.ads ! 1024511265b ./gcc/ada/osint-m.adb ! 3386418329b ./gcc/ada/osint-m.ads ! 1573212521b ./gcc/ada/output.adb ! 2178583884b ./gcc/ada/output.ads ! 4267838632b ./gcc/ada/par.adb ! 3463587827b ./gcc/ada/par.ads ! 4236451772b ./gcc/ada/par-ch10.adb ! 1865473235b ./gcc/ada/par-ch11.adb ! 169758113b ./gcc/ada/par-ch12.adb ! 2654076926b ./gcc/ada/par-ch13.adb ! 2010507628b ./gcc/ada/par-ch2.adb ! 122888040b ./gcc/ada/par-ch3.adb ! 1660113933b ./gcc/ada/par-ch4.adb ! 457010280b ./gcc/ada/par-ch5.adb ! 1487424859b ./gcc/ada/par-ch6.adb ! 2829010181b ./gcc/ada/par-ch7.adb ! 2316044432b ./gcc/ada/par-ch8.adb ! 2506138788b ./gcc/ada/par-ch9.adb ! 1062189622b ./gcc/ada/par-endh.adb ! 1168771263b ./gcc/ada/par-labl.adb ! 2269988244b ./gcc/ada/par-load.adb ! 3261829805b ./gcc/ada/par-prag.adb ! 2376621938b ./gcc/ada/par-sync.adb ! 288991157b ./gcc/ada/par-tchk.adb ! 2421943630b ./gcc/ada/par-util.adb ! 1783366994b ./gcc/ada/prj.adb ! 273475311b ./gcc/ada/prj.ads ! 4198954950b ./gcc/ada/prj-attr.adb ! 455900702b ./gcc/ada/prj-attr.ads ! 1801774749b ./gcc/ada/prj-com.adb ! 1046429840b ./gcc/ada/prj-com.ads ! 217311928b ./gcc/ada/prj-dect.adb ! 445199952b ./gcc/ada/prj-dect.ads ! 1382477323b ./gcc/ada/prj-env.adb ! 1372104369b ./gcc/ada/prj-env.ads ! 1906670537b ./gcc/ada/prj-ext.adb ! 2859385035b ./gcc/ada/prj-ext.ads ! 2047634603b ./gcc/ada/prj-makr.adb ! 1883015243b ./gcc/ada/prj-makr.ads ! 2163536706b ./gcc/ada/prj-nmsc.adb ! 2064214000b ./gcc/ada/prj-nmsc.ads ! 1598163413b ./gcc/ada/prj-pars.adb ! 367734767b ./gcc/ada/prj-pars.ads ! 1918222795b ./gcc/ada/prj-part.adb ! 4117638943b ./gcc/ada/prj-part.ads ! 2413852799b ./gcc/ada/prj-pp.adb ! 118812696b ./gcc/ada/prj-pp.ads ! 202512728b ./gcc/ada/prj-proc.adb ! 3183599143b ./gcc/ada/prj-proc.ads ! 2843521976b ./gcc/ada/prj-strt.adb ! 2786884499b ./gcc/ada/prj-strt.ads ! 1081269790b ./gcc/ada/prj-tree.adb ! 11711493b ./gcc/ada/prj-tree.ads ! 1004920764b ./gcc/ada/prj-util.adb ! 2130834746b ./gcc/ada/prj-util.ads ! 3391358262b ./gcc/ada/raise.c ! 3177561595b ./gcc/ada/raise.h ! 1627893020b ./gcc/ada/repinfo.adb ! 1594795890b ./gcc/ada/repinfo.ads ! 2981853782b ./gcc/ada/repinfo.h ! 2934715699b ./gcc/ada/restrict.adb ! 3998552992b ./gcc/ada/restrict.ads ! 2764605227b ./gcc/ada/rident.ads ! 339035659b ./gcc/ada/rtsfind.adb ! 3155450455b ./gcc/ada/rtsfind.ads ! 2722724428b ./gcc/ada/s-addima.adb ! 3098169944b ./gcc/ada/s-addima.ads ! 4012036131b ./gcc/ada/s-arit64.adb ! 3804503140b ./gcc/ada/s-arit64.ads ! 3808766513b ./gcc/ada/s-assert.adb ! 37695168b ./gcc/ada/s-assert.ads ! 345958931b ./gcc/ada/s-asthan.adb ! 183676191b ./gcc/ada/s-asthan.ads ! 4105809443b ./gcc/ada/s-atacco.adb ! 2144915640b ./gcc/ada/s-atacco.ads ! 893556810b ./gcc/ada/s-auxdec.adb ! 351034639b ./gcc/ada/s-auxdec.ads ! 809451314b ./gcc/ada/s-bitops.adb ! 1402671709b ./gcc/ada/s-bitops.ads ! 128154809b ./gcc/ada/scans.adb ! 345695149b ./gcc/ada/scans.ads ! 1684329982b ./gcc/ada/s-chepoo.ads ! 2641128141b ./gcc/ada/scn.adb ! 3913556059b ./gcc/ada/scn.ads ! 96767155b ./gcc/ada/scn-nlit.adb ! 4141266749b ./gcc/ada/scn-slit.adb ! 2895675623b ./gcc/ada/s-crc32.adb ! 132785702b ./gcc/ada/s-crc32.ads ! 3456501945b ./gcc/ada/sdefault.ads ! 1025936575b ./gcc/ada/s-direio.adb ! 2310567932b ./gcc/ada/s-direio.ads ! 457587035b ./gcc/ada/sem.adb ! 3718551417b ./gcc/ada/sem.ads ! 1853623673b ./gcc/ada/sem_aggr.adb ! 4131551728b ./gcc/ada/sem_aggr.ads ! 153562469b ./gcc/ada/sem_attr.adb ! 453667776b ./gcc/ada/sem_attr.ads ! 564785830b ./gcc/ada/sem_case.adb ! 495176024b ./gcc/ada/sem_case.ads ! 2598563707b ./gcc/ada/sem_cat.adb ! 1516953566b ./gcc/ada/sem_cat.ads ! 237781320b ./gcc/ada/sem_ch10.adb ! 95842022b ./gcc/ada/sem_ch10.ads ! 1597810602b ./gcc/ada/sem_ch11.adb ! 301514658b ./gcc/ada/sem_ch11.ads ! 905665264b ./gcc/ada/sem_ch12.adb ! 1406477684b ./gcc/ada/sem_ch12.ads ! 2427266513b ./gcc/ada/sem_ch13.adb ! 3162337120b ./gcc/ada/sem_ch13.ads ! 675010544b ./gcc/ada/sem_ch2.adb ! 1337056150b ./gcc/ada/sem_ch2.ads ! 2468230337b ./gcc/ada/sem_ch3.adb ! 2282414621b ./gcc/ada/sem_ch3.ads ! 3533963930b ./gcc/ada/sem_ch4.adb ! 1626692841b ./gcc/ada/sem_ch4.ads ! 574340438b ./gcc/ada/sem_ch5.adb ! 3874469898b ./gcc/ada/sem_ch5.ads ! 1081660985b ./gcc/ada/sem_ch6.adb ! 1784406070b ./gcc/ada/sem_ch6.ads ! 3448287303b ./gcc/ada/sem_ch7.adb ! 3876690738b ./gcc/ada/sem_ch7.ads ! 532800431b ./gcc/ada/sem_ch8.adb ! 1332122704b ./gcc/ada/sem_ch8.ads ! 1333912384b ./gcc/ada/sem_ch9.adb ! 1981701559b ./gcc/ada/sem_ch9.ads ! 2874178694b ./gcc/ada/sem_disp.adb ! 64069076b ./gcc/ada/sem_disp.ads ! 3106266291b ./gcc/ada/sem_dist.adb ! 448784348b ./gcc/ada/sem_dist.ads ! 820420908b ./gcc/ada/sem_elab.adb ! 1737329980b ./gcc/ada/sem_elab.ads ! 1101292401b ./gcc/ada/sem_elim.adb ! 1586521596b ./gcc/ada/sem_elim.ads ! 1855970064b ./gcc/ada/sem_eval.adb ! 1644532762b ./gcc/ada/sem_eval.ads ! 2923550281b ./gcc/ada/sem_intr.adb ! 1636056678b ./gcc/ada/sem_intr.ads ! 3707937295b ./gcc/ada/sem_maps.adb ! 1420921962b ./gcc/ada/sem_maps.ads ! 823176495b ./gcc/ada/sem_mech.adb ! 3673774677b ./gcc/ada/sem_mech.ads ! 21685246b ./gcc/ada/sem_prag.adb ! 1882250315b ./gcc/ada/sem_prag.ads ! 573356616b ./gcc/ada/sem_res.adb ! 3045351009b ./gcc/ada/sem_res.ads ! 1138920335b ./gcc/ada/sem_smem.adb ! 2750071125b ./gcc/ada/sem_smem.ads ! 1762658297b ./gcc/ada/sem_type.adb ! 103784610b ./gcc/ada/sem_type.ads ! 1845973319b ./gcc/ada/sem_util.adb ! 2371663768b ./gcc/ada/sem_util.ads ! 784565722b ./gcc/ada/sem_vfpt.adb ! 3753664166b ./gcc/ada/sem_vfpt.ads ! 989663054b ./gcc/ada/sem_warn.adb ! 2835167594b ./gcc/ada/sem_warn.ads ! 2659804483b ./gcc/ada/sequenio.ads ! 3003047560b ./gcc/ada/s-errrep.adb ! 773860744b ./gcc/ada/s-errrep.ads ! 3034094549b ./gcc/ada/s-except.ads ! 2840870838b ./gcc/ada/s-exctab.adb ! 1381021952b ./gcc/ada/s-exctab.ads ! 277321339b ./gcc/ada/s-exnflt.ads ! 3305630942b ./gcc/ada/s-exngen.adb ! 170878969b ./gcc/ada/s-exngen.ads ! 2009440222b ./gcc/ada/s-exnint.ads ! 3585703256b ./gcc/ada/s-exnlfl.ads ! 2025729305b ./gcc/ada/s-exnlin.ads ! 76085712b ./gcc/ada/s-exnllf.ads ! 3587640776b ./gcc/ada/s-exnlli.ads ! 2253337806b ./gcc/ada/s-exnsfl.ads ! 121555862b ./gcc/ada/s-exnsin.ads ! 927678392b ./gcc/ada/s-exnssi.ads ! 2635019319b ./gcc/ada/s-expflt.ads ! 4131466647b ./gcc/ada/s-expgen.adb ! 1934847450b ./gcc/ada/s-expgen.ads ! 3146866455b ./gcc/ada/s-expint.ads ! 856080363b ./gcc/ada/s-explfl.ads ! 1256691204b ./gcc/ada/s-explin.ads ! 1743577065b ./gcc/ada/s-expllf.ads ! 4032558196b ./gcc/ada/s-explli.ads ! 1225992011b ./gcc/ada/s-expllu.adb ! 164475265b ./gcc/ada/s-expllu.ads ! 30334755b ./gcc/ada/s-expmod.adb ! 2989805776b ./gcc/ada/s-expmod.ads ! 453434327b ./gcc/ada/s-expsfl.ads ! 2982056988b ./gcc/ada/s-expsin.ads ! 3696165970b ./gcc/ada/s-expssi.ads ! 1405412241b ./gcc/ada/s-expuns.adb ! 4136946288b ./gcc/ada/s-expuns.ads ! 1285555801b ./gcc/ada/s-fatflt.ads ! 4124895106b ./gcc/ada/s-fatgen.adb ! 1305345872b ./gcc/ada/s-fatgen.ads ! 1597561807b ./gcc/ada/s-fatlfl.ads ! 94457987b ./gcc/ada/s-fatllf.ads ! 762738475b ./gcc/ada/s-fatsfl.ads ! 2088548454b ./gcc/ada/s-ficobl.ads ! 74527873b ./gcc/ada/s-fileio.adb ! 1465520633b ./gcc/ada/s-fileio.ads ! 1377364567b ./gcc/ada/s-finimp.adb ! 1794340590b ./gcc/ada/s-finimp.ads ! 2900827968b ./gcc/ada/s-finroo.adb ! 2894460b ./gcc/ada/s-finroo.ads ! 3879844819b ./gcc/ada/sfn_scan.adb ! 3386500562b ./gcc/ada/sfn_scan.ads ! 2452192785b ./gcc/ada/s-fore.adb ! 2647276537b ./gcc/ada/s-fore.ads ! 1958017185b ./gcc/ada/s-gloloc.adb ! 3901978355b ./gcc/ada/s-gloloc.ads ! 3092639076b ./gcc/ada/s-imgbiu.adb ! 839282222b ./gcc/ada/s-imgbiu.ads ! 3215984198b ./gcc/ada/s-imgboo.adb ! 1012955290b ./gcc/ada/s-imgboo.ads ! 770596485b ./gcc/ada/s-imgcha.adb ! 2182675496b ./gcc/ada/s-imgcha.ads ! 271764343b ./gcc/ada/s-imgdec.adb ! 4035532201b ./gcc/ada/s-imgdec.ads ! 1507540352b ./gcc/ada/s-imgenu.adb ! 3796933383b ./gcc/ada/s-imgenu.ads ! 527517008b ./gcc/ada/s-imgint.adb ! 2115107724b ./gcc/ada/s-imgint.ads ! 2065084451b ./gcc/ada/s-imgllb.adb ! 1277602504b ./gcc/ada/s-imgllb.ads ! 3028659959b ./gcc/ada/s-imglld.adb ! 706233748b ./gcc/ada/s-imglld.ads ! 1525142427b ./gcc/ada/s-imglli.adb ! 1465381421b ./gcc/ada/s-imglli.ads ! 4211809579b ./gcc/ada/s-imgllu.adb ! 334271664b ./gcc/ada/s-imgllu.ads ! 374169505b ./gcc/ada/s-imgllw.adb ! 585067938b ./gcc/ada/s-imgllw.ads ! 42487149b ./gcc/ada/s-imgrea.adb ! 1518997582b ./gcc/ada/s-imgrea.ads ! 3263329409b ./gcc/ada/s-imguns.adb ! 627244436b ./gcc/ada/s-imguns.ads ! 3126113706b ./gcc/ada/s-imgwch.adb ! 3303847345b ./gcc/ada/s-imgwch.ads ! 2781247757b ./gcc/ada/s-imgwiu.adb ! 1501445148b ./gcc/ada/s-imgwiu.ads ! 1510702737b ./gcc/ada/sinfo.adb ! 776264779b ./gcc/ada/sinfo.ads ! 3157179136b ./gcc/ada/sinfo-cn.adb ! 1838430262b ./gcc/ada/sinfo-cn.ads ! 3191222610b ./gcc/ada/sinfo.h ! 539067745b ./gcc/ada/s-inmaop.ads ! 1602228275b ./gcc/ada/sinput.adb ! 3934432023b ./gcc/ada/sinput.ads ! 1139072857b ./gcc/ada/sinput-d.adb ! 1552980541b ./gcc/ada/sinput-d.ads ! 1072947695b ./gcc/ada/sinput-l.adb ! 1344432336b ./gcc/ada/sinput-l.ads ! 3419288990b ./gcc/ada/sinput-p.adb ! 4012597971b ./gcc/ada/sinput-p.ads ! 1744313288b ./gcc/ada/s-interr.adb ! 636552118b ./gcc/ada/s-interr.ads ! 2883071225b ./gcc/ada/s-intman.ads ! 3616964442b ./gcc/ada/s-io.adb ! 1391751882b ./gcc/ada/s-io.ads ! 2255910292b ./gcc/ada/s-maccod.ads ! 3381361830b ./gcc/ada/s-mantis.adb ! 3702023408b ./gcc/ada/s-mantis.ads ! 995102447b ./gcc/ada/s-mastop.adb ! 2897130749b ./gcc/ada/s-mastop.ads ! 243974377b ./gcc/ada/s-memory.adb ! 4199680369b ./gcc/ada/s-memory.ads ! 1625013762b ./gcc/ada/snames.adb ! 1436168100b ./gcc/ada/snames.ads ! 3744225773b ./gcc/ada/snames.h ! 4294421032b ./gcc/ada/s-osprim.ads ! 1606354282b ./gcc/ada/s-pack03.adb ! 209622955b ./gcc/ada/s-pack03.ads ! 1005272667b ./gcc/ada/s-pack05.adb ! 760603435b ./gcc/ada/s-pack05.ads ! 2343322905b ./gcc/ada/s-pack06.adb ! 1027847988b ./gcc/ada/s-pack06.ads ! 405219508b ./gcc/ada/s-pack07.adb ! 3141158466b ./gcc/ada/s-pack07.ads ! 4081272889b ./gcc/ada/s-pack09.adb ! 4007014623b ./gcc/ada/s-pack09.ads ! 3602928622b ./gcc/ada/s-pack10.adb ! 1833574656b ./gcc/ada/s-pack10.ads ! 860091623b ./gcc/ada/s-pack11.adb ! 3543085520b ./gcc/ada/s-pack11.ads ! 899311322b ./gcc/ada/s-pack12.adb ! 910454706b ./gcc/ada/s-pack12.ads ! 277864968b ./gcc/ada/s-pack13.adb ! 2138309588b ./gcc/ada/s-pack13.ads ! 3406118855b ./gcc/ada/s-pack14.adb ! 2344287793b ./gcc/ada/s-pack14.ads ! 1960565049b ./gcc/ada/s-pack15.adb ! 1357403033b ./gcc/ada/s-pack15.ads ! 1461178326b ./gcc/ada/s-pack17.adb ! 4239614365b ./gcc/ada/s-pack17.ads ! 3981085628b ./gcc/ada/s-pack18.adb ! 3657571721b ./gcc/ada/s-pack18.ads ! 3161698139b ./gcc/ada/s-pack19.adb ! 265351939b ./gcc/ada/s-pack19.ads ! 3919873425b ./gcc/ada/s-pack20.adb ! 1671185151b ./gcc/ada/s-pack20.ads ! 3792887105b ./gcc/ada/s-pack21.adb ! 4178794595b ./gcc/ada/s-pack21.ads ! 184463525b ./gcc/ada/s-pack22.adb ! 949095501b ./gcc/ada/s-pack22.ads ! 3252603822b ./gcc/ada/s-pack23.adb ! 1430809191b ./gcc/ada/s-pack23.ads ! 4100057528b ./gcc/ada/s-pack24.adb ! 3581992859b ./gcc/ada/s-pack24.ads ! 2777346207b ./gcc/ada/s-pack25.adb ! 2060728874b ./gcc/ada/s-pack25.ads ! 389799052b ./gcc/ada/s-pack26.adb ! 2391707945b ./gcc/ada/s-pack26.ads ! 2252793456b ./gcc/ada/s-pack27.adb ! 3599697966b ./gcc/ada/s-pack27.ads ! 3526254019b ./gcc/ada/s-pack28.adb ! 3570695798b ./gcc/ada/s-pack28.ads ! 1830979325b ./gcc/ada/s-pack29.adb ! 636263088b ./gcc/ada/s-pack29.ads ! 1247267451b ./gcc/ada/s-pack30.adb ! 1714316202b ./gcc/ada/s-pack30.ads ! 2904701475b ./gcc/ada/s-pack31.adb ! 3774382322b ./gcc/ada/s-pack31.ads ! 2397973708b ./gcc/ada/s-pack33.adb ! 1285796598b ./gcc/ada/s-pack33.ads ! 1469228626b ./gcc/ada/s-pack34.adb ! 3493002958b ./gcc/ada/s-pack34.ads ! 3938064381b ./gcc/ada/s-pack35.adb ! 1665131195b ./gcc/ada/s-pack35.ads ! 3033043814b ./gcc/ada/s-pack36.adb ! 2336010364b ./gcc/ada/s-pack36.ads ! 3379953938b ./gcc/ada/s-pack37.adb ! 3479490751b ./gcc/ada/s-pack37.ads ! 1910313513b ./gcc/ada/s-pack38.adb ! 3513147171b ./gcc/ada/s-pack38.ads ! 571629983b ./gcc/ada/s-pack39.adb ! 1007108641b ./gcc/ada/s-pack39.ads ! 2540513647b ./gcc/ada/s-pack40.adb ! 2117108993b ./gcc/ada/s-pack40.ads ! 2613151820b ./gcc/ada/s-pack41.adb ! 2909506309b ./gcc/ada/s-pack41.ads ! 1949768795b ./gcc/ada/s-pack42.adb ! 624872371b ./gcc/ada/s-pack42.ads ! 3087900323b ./gcc/ada/s-pack43.adb ! 19970305b ./gcc/ada/s-pack43.ads ! 2326283590b ./gcc/ada/s-pack44.adb ! 3358333029b ./gcc/ada/s-pack44.ads ! 3696862610b ./gcc/ada/s-pack45.adb ! 783083852b ./gcc/ada/s-pack45.ads ! 1777496178b ./gcc/ada/s-pack46.adb ! 2468501207b ./gcc/ada/s-pack46.ads ! 4288000893b ./gcc/ada/s-pack47.adb ! 2197281608b ./gcc/ada/s-pack47.ads ! 2900881725b ./gcc/ada/s-pack48.adb ! 3380132232b ./gcc/ada/s-pack48.ads ! 351392752b ./gcc/ada/s-pack49.adb ! 1905543638b ./gcc/ada/s-pack49.ads ! 882796165b ./gcc/ada/s-pack50.adb ! 2072159316b ./gcc/ada/s-pack50.ads ! 3572592430b ./gcc/ada/s-pack51.adb ! 3028308884b ./gcc/ada/s-pack51.ads ! 3619967921b ./gcc/ada/s-pack52.adb ! 546106086b ./gcc/ada/s-pack52.ads ! 4148001217b ./gcc/ada/s-pack53.adb ! 417030544b ./gcc/ada/s-pack53.ads ! 693832364b ./gcc/ada/s-pack54.adb ! 3449698608b ./gcc/ada/s-pack54.ads ! 2473149168b ./gcc/ada/s-pack55.adb ! 927412701b ./gcc/ada/s-pack55.ads ! 3389079448b ./gcc/ada/s-pack56.adb ! 2526050178b ./gcc/ada/s-pack56.ads ! 2963624991b ./gcc/ada/s-pack57.adb ! 2602304473b ./gcc/ada/s-pack57.ads ! 253017815b ./gcc/ada/s-pack58.adb ! 3435829469b ./gcc/ada/s-pack58.ads ! 1539388562b ./gcc/ada/s-pack59.adb ! 1753190727b ./gcc/ada/s-pack59.ads ! 200978682b ./gcc/ada/s-pack60.adb ! 1968490411b ./gcc/ada/s-pack60.ads ! 94389896b ./gcc/ada/s-pack61.adb ! 2663135783b ./gcc/ada/s-pack61.ads ! 3902834126b ./gcc/ada/s-pack62.adb ! 777685273b ./gcc/ada/s-pack62.ads ! 644632679b ./gcc/ada/s-pack63.adb ! 854001699b ./gcc/ada/s-pack63.ads ! 3824482028b ./gcc/ada/s-parame.adb ! 100337926b ./gcc/ada/s-parame.ads ! 489302103b ./gcc/ada/s-parint.adb ! 1680959992b ./gcc/ada/s-parint.ads ! 1359239001b ./gcc/ada/s-pooglo.adb ! 3563085528b ./gcc/ada/s-pooglo.ads ! 3795210994b ./gcc/ada/s-pooloc.adb ! 3045504111b ./gcc/ada/s-pooloc.ads ! 2673838793b ./gcc/ada/s-poosiz.adb ! 438866099b ./gcc/ada/s-poosiz.ads ! 3029625785b ./gcc/ada/s-powtab.ads ! 4234849843b ./gcc/ada/sprint.adb ! 2040623862b ./gcc/ada/sprint.ads ! 830131794b ./gcc/ada/s-proinf.adb ! 271040113b ./gcc/ada/s-proinf.ads ! 2019333834b ./gcc/ada/s-rpc.adb ! 2908648187b ./gcc/ada/s-rpc.ads ! 446869618b ./gcc/ada/s-scaval.ads ! 30021732b ./gcc/ada/s-secsta.adb ! 1897968564b ./gcc/ada/s-secsta.ads ! 833329011b ./gcc/ada/s-sequio.adb ! 2909740124b ./gcc/ada/s-sequio.ads ! 4059417223b ./gcc/ada/s-shasto.adb ! 571382670b ./gcc/ada/s-shasto.ads ! 606537845b ./gcc/ada/s-soflin.adb ! 128602045b ./gcc/ada/s-soflin.ads ! 2957311133b ./gcc/ada/s-sopco3.adb ! 4163085753b ./gcc/ada/s-sopco3.ads ! 3463409789b ./gcc/ada/s-sopco4.adb ! 2234349572b ./gcc/ada/s-sopco4.ads ! 3479052300b ./gcc/ada/s-sopco5.adb ! 3566552120b ./gcc/ada/s-sopco5.ads ! 1229103716b ./gcc/ada/s-stache.adb ! 600743323b ./gcc/ada/s-stache.ads ! 2172697981b ./gcc/ada/s-stalib.adb ! 3474397127b ./gcc/ada/s-stalib.ads ! 4262180487b ./gcc/ada/s-stoele.adb ! 2971232174b ./gcc/ada/s-stoele.ads ! 4047429847b ./gcc/ada/s-stopoo.ads ! 3324639495b ./gcc/ada/s-stratt.adb ! 3974377445b ./gcc/ada/s-stratt.ads ! 370100204b ./gcc/ada/s-strops.adb ! 971678965b ./gcc/ada/s-strops.ads ! 3175332127b ./gcc/ada/s-taasde.adb ! 2376128105b ./gcc/ada/s-taasde.ads ! 296590963b ./gcc/ada/s-tadeca.adb ! 3931772177b ./gcc/ada/s-tadeca.ads ! 818008913b ./gcc/ada/s-tadert.adb ! 4037517831b ./gcc/ada/s-tadert.ads ! 3686545646b ./gcc/ada/s-taenca.adb ! 3926496203b ./gcc/ada/s-taenca.ads ! 1915984406b ./gcc/ada/stand.adb ! 3516623899b ./gcc/ada/stand.ads ! 2333648438b ./gcc/ada/s-taprob.adb ! 3419796729b ./gcc/ada/s-taprob.ads ! 571402338b ./gcc/ada/s-taprop.ads ! 1482926311b ./gcc/ada/s-tarest.adb ! 3894716834b ./gcc/ada/s-tarest.ads ! 4228845147b ./gcc/ada/s-tasdeb.adb ! 3250527878b ./gcc/ada/s-tasdeb.ads ! 261034302b ./gcc/ada/s-tasinf.adb ! 2352748810b ./gcc/ada/s-tasinf.ads ! 1578965009b ./gcc/ada/s-tasini.adb ! 2571536798b ./gcc/ada/s-tasini.ads ! 512143507b ./gcc/ada/s-taskin.adb ! 1376141781b ./gcc/ada/s-taskin.ads ! 1136094041b ./gcc/ada/s-tasque.adb ! 3759133430b ./gcc/ada/s-tasque.ads ! 2601412157b ./gcc/ada/s-tasren.adb ! 2827947168b ./gcc/ada/s-tasren.ads ! 3360475183b ./gcc/ada/s-tasres.ads ! 112793573b ./gcc/ada/s-tassta.adb ! 4013453345b ./gcc/ada/s-tassta.ads ! 3341695004b ./gcc/ada/s-tasuti.adb ! 2920439586b ./gcc/ada/s-tasuti.ads ! 2841804633b ./gcc/ada/s-tataat.adb ! 3281524283b ./gcc/ada/s-tataat.ads ! 4284210032b ./gcc/ada/s-tpinop.adb ! 1010260087b ./gcc/ada/s-tpinop.ads ! 1437959453b ./gcc/ada/s-tpoben.adb ! 78459834b ./gcc/ada/s-tpoben.ads ! 4108440041b ./gcc/ada/s-tpobop.adb ! 2707769297b ./gcc/ada/s-tpobop.ads ! 2861663022b ./gcc/ada/s-tposen.adb ! 3033925472b ./gcc/ada/s-tposen.ads ! 1383192057b ./gcc/ada/s-traceb.adb ! 2741886828b ./gcc/ada/s-traceb.ads ! 3234353667b ./gcc/ada/s-traces.adb ! 783758788b ./gcc/ada/s-traces.ads ! 922433200b ./gcc/ada/s-tratas.adb ! 1365141773b ./gcc/ada/s-tratas.ads ! 3202054863b ./gcc/ada/stringt.adb ! 3453373995b ./gcc/ada/stringt.ads ! 1716263916b ./gcc/ada/stringt.h ! 1443073414b ./gcc/ada/style.adb ! 3757146219b ./gcc/ada/style.ads ! 4004656796b ./gcc/ada/stylesw.adb ! 2425837244b ./gcc/ada/stylesw.ads ! 297299147b ./gcc/ada/s-unstyp.ads ! 3663234314b ./gcc/ada/s-vaflop.adb ! 1802491369b ./gcc/ada/s-vaflop.ads ! 3661545185b ./gcc/ada/s-valboo.adb ! 3721856174b ./gcc/ada/s-valboo.ads ! 755162775b ./gcc/ada/s-valcha.adb ! 1114541695b ./gcc/ada/s-valcha.ads ! 3585578263b ./gcc/ada/s-valdec.adb ! 851743862b ./gcc/ada/s-valdec.ads ! 2996009070b ./gcc/ada/s-valenu.adb ! 2467192511b ./gcc/ada/s-valenu.ads ! 2679797603b ./gcc/ada/s-valint.adb ! 627239498b ./gcc/ada/s-valint.ads ! 236165297b ./gcc/ada/s-vallld.adb ! 389421167b ./gcc/ada/s-vallld.ads ! 633857741b ./gcc/ada/s-vallli.adb ! 2812263233b ./gcc/ada/s-vallli.ads ! 1585236839b ./gcc/ada/s-valllu.adb ! 3383667889b ./gcc/ada/s-valllu.ads ! 1699855b ./gcc/ada/s-valrea.adb ! 2113650187b ./gcc/ada/s-valrea.ads ! 1259299469b ./gcc/ada/s-valuns.adb ! 3396059374b ./gcc/ada/s-valuns.ads ! 1775985419b ./gcc/ada/s-valuti.adb ! 45852770b ./gcc/ada/s-valuti.ads ! 3725838485b ./gcc/ada/s-valwch.adb ! 2626906273b ./gcc/ada/s-valwch.ads ! 751102067b ./gcc/ada/s-vercon.adb ! 1087339633b ./gcc/ada/s-vercon.ads ! 1035815090b ./gcc/ada/s-vmexta.adb ! 1273025419b ./gcc/ada/s-vmexta.ads ! 354330343b ./gcc/ada/s-wchcnv.adb ! 2396752870b ./gcc/ada/s-wchcnv.ads ! 597674757b ./gcc/ada/s-wchcon.ads ! 2580581322b ./gcc/ada/s-wchjis.adb ! 673518722b ./gcc/ada/s-wchjis.ads ! 3191144132b ./gcc/ada/s-wchstw.adb ! 2365550925b ./gcc/ada/s-wchstw.ads ! 2490415534b ./gcc/ada/s-wchwts.adb ! 1818373135b ./gcc/ada/s-wchwts.ads ! 2261037173b ./gcc/ada/s-widboo.adb ! 2020492367b ./gcc/ada/s-widboo.ads ! 450893490b ./gcc/ada/s-widcha.adb ! 1582980633b ./gcc/ada/s-widcha.ads ! 1589563136b ./gcc/ada/s-widenu.adb ! 443673851b ./gcc/ada/s-widenu.ads ! 2448211898b ./gcc/ada/s-widlli.adb ! 2514294788b ./gcc/ada/s-widlli.ads ! 2817457313b ./gcc/ada/s-widllu.adb ! 2104007358b ./gcc/ada/s-widllu.ads ! 777204248b ./gcc/ada/s-widwch.adb ! 2602874053b ./gcc/ada/s-widwch.ads ! 507332671b ./gcc/ada/switch.adb ! 3452617480b ./gcc/ada/switch.ads ! 2685331831b ./gcc/ada/switch-b.adb ! 3801384459b ./gcc/ada/switch-b.ads ! 3455476498b ./gcc/ada/switch-c.adb ! 3473960847b ./gcc/ada/switch-c.ads ! 1451377305b ./gcc/ada/switch-m.adb ! 1510716097b ./gcc/ada/switch-m.ads ! 3179820469b ./gcc/ada/s-wwdcha.adb ! 566151854b ./gcc/ada/s-wwdcha.ads ! 2981811991b ./gcc/ada/s-wwdenu.adb ! 876921949b ./gcc/ada/s-wwdenu.ads ! 742539160b ./gcc/ada/s-wwdwch.adb ! 1368753201b ./gcc/ada/s-wwdwch.ads ! 1097000358b ./gcc/ada/sysdep.c ! 863555368b ./gcc/ada/system.ads ! 1599555682b ./gcc/ada/table.adb ! 1565425186b ./gcc/ada/table.ads ! 413715310b ./gcc/ada/targparm.adb ! 3629509569b ./gcc/ada/targparm.ads ! 2656928717b ./gcc/ada/targtyps.c ! 1635537564b ./gcc/ada/tbuild.adb ! 1007224603b ./gcc/ada/tbuild.ads ! 2469703775b ./gcc/ada/text_io.ads ! 3022378179b ./gcc/ada/tracebak.c ! 3621738649b ./gcc/ada/trans.c ! 1930086756b ./gcc/ada/tree_gen.adb ! 2954553707b ./gcc/ada/tree_gen.ads ! 2410960934b ./gcc/ada/tree_in.adb ! 2092964734b ./gcc/ada/tree_in.ads ! 2795403287b ./gcc/ada/tree_io.adb ! 1074378588b ./gcc/ada/tree_io.ads ! 2422943668b ./gcc/ada/treepr.adb ! 667089060b ./gcc/ada/treepr.ads ! 1669384487b ./gcc/ada/treeprs.ads ! 3795314685b ./gcc/ada/treeprs.adt ! 3206526706b ./gcc/ada/ttypef.ads ! 2602607923b ./gcc/ada/ttypes.ads ! 2872000972b ./gcc/ada/types.adb ! 3049108073b ./gcc/ada/types.ads ! 2029472243b ./gcc/ada/types.h 981400444b ./gcc/ada/ug_words ! 2163270927b ./gcc/ada/uintp.adb ! 3083805627b ./gcc/ada/uintp.ads ! 4017347024b ./gcc/ada/uintp.h ! 3335630020b ./gcc/ada/uname.adb ! 3381102603b ./gcc/ada/uname.ads ! 1037780895b ./gcc/ada/unchconv.ads ! 2684345166b ./gcc/ada/unchdeal.ads ! 3748300839b ./gcc/ada/urealp.adb ! 2461048567b ./gcc/ada/urealp.ads ! 2654407585b ./gcc/ada/urealp.h ! 2228862505b ./gcc/ada/usage.adb ! 319517319b ./gcc/ada/usage.ads ! 1439939771b ./gcc/ada/utils2.c ! 3812277810b ./gcc/ada/utils.c ! 48927045b ./gcc/ada/validsw.adb ! 3951594422b ./gcc/ada/validsw.ads ! 1550194581b ./gcc/ada/widechar.adb ! 3442909407b ./gcc/ada/widechar.ads ! 3406844766b ./gcc/ada/xeinfo.adb 208322693b ./gcc/ada/xgnatug.adb ! 268664355b ./gcc/ada/xnmake.adb ! 1730081979b ./gcc/ada/xref_lib.adb ! 1668630154b ./gcc/ada/xref_lib.ads ! 2160162827b ./gcc/ada/xr_tabls.adb ! 1571871756b ./gcc/ada/xr_tabls.ads ! 3573112600b ./gcc/ada/xsinfo.adb ! 4190686960b ./gcc/ada/xsnames.adb ! 511048883b ./gcc/ada/xtreeprs.adb ! 2951681152b ./gcc/alias.c ! 3329204760b ./gcc/attribs.c ! 661204297b ./gcc/basic-block.h ! 3868878276b ./gcc/bb-reorder.c ! 3592689596b ./gcc/bitmap.c ! 3888731700b ./gcc/bitmap.h ! 866389233b ./gcc/builtin-attrs.def ! 423455440b ./gcc/builtins.c ! 3399851061b ./gcc/builtins.def ! 2231934789b ./gcc/builtin-types.def ! 1937217650b ./gcc/caller-save.c ! 1310036586b ./gcc/calls.c ! 266754123b ./gcc/c-aux-info.c ! 3445442514b ./gcc/c-common.c ! 1911269762b ./gcc/c-common.def ! 3230227898b ./gcc/c-common.h ! 2498727911b ./gcc/c-config-lang.in ! 4223371978b ./gcc/c-convert.c ! 4277149955b ./gcc/c-decl.c ! 420078897b ./gcc/c-dump.c ! 3988343334b ./gcc/c-errors.c ! 1424850360b ./gcc/cfganal.c ! 2497073643b ./gcc/cfgbuild.c ! 2570201327b ./gcc/cfg.c ! 3208815390b ./gcc/cfgcleanup.c ! 2495299687b ./gcc/cfglayout.c ! 397535119b ./gcc/cfglayout.h ! 2523244100b ./gcc/cfgloop.c ! 3924472751b ./gcc/cfgrtl.c ! 1308520655b ./gcc/c-format.c ! 1362040137b ./gcc/ChangeLog ! 4112479902b ./gcc/ChangeLog.0 ! 3216066841b ./gcc/ChangeLog.1 ! 2323556130b ./gcc/ChangeLog.2 ! 3176640938b ./gcc/ChangeLog.3 ! 3015000601b ./gcc/ChangeLog.4 ! 4176743933b ./gcc/ChangeLog.5 ! 2548364434b ./gcc/ChangeLog.6 ! 1208082050b ./gcc/ChangeLog.7 ! 3235050590b ./gcc/ChangeLog.lib ! 2967450474b ./gcc/c-lang.c ! 1290114788b ./gcc/c-lex.c ! 906643159b ./gcc/c-objc-common.c ! 2549935202b ./gcc/collect2.c ! 1843868705b ./gcc/collect2.h ! 4226959394b ./gcc/combine.c 4122382037b ./gcc/conditions.h 3915788506b ./gcc/config/alpha/alpha32.h + 1744690274b ./gcc/config/alpha/alpha.c + 1117342680b ./gcc/config/alpha/alpha.h + 1081521208b ./gcc/config/alpha/alpha-interix.h + 3267008061b ./gcc/config/alpha/alpha.md + 1148890194b ./gcc/config/alpha/alpha-protos.h 1407988137b ./gcc/config/alpha/crtfastmath.c ! 1689355033b ./gcc/config/alpha/elf.h ! 4100757221b ./gcc/config/alpha/ev4.md ! 592376398b ./gcc/config/alpha/ev5.md ! 320649145b ./gcc/config/alpha/ev6.md ! 2266038551b ./gcc/config/alpha/freebsd.h ! 2439445430b ./gcc/config/alpha/gnu.h 2998860143b ./gcc/config/alpha/lib1funcs.asm ! 3980115873b ./gcc/config/alpha/linux-elf.h ! 1799302733b ./gcc/config/alpha/linux.h ! 1246797152b ./gcc/config/alpha/netbsd.h ! 3083238444b ./gcc/config/alpha/openbsd.h ! 1148914945b ./gcc/config/alpha/osf5.h ! 2934606255b ./gcc/config/alpha/osf.h 1190572001b ./gcc/config/alpha/qrnnd.asm 2672344824b ./gcc/config/alpha/t-alpha 1949254250b ./gcc/config/alpha/t-crtfm *************** *** 1780,1848 **** 1191509594b ./gcc/config/alpha/t-unicosmk 1694999122b ./gcc/config/alpha/t-vms 3342100479b ./gcc/config/alpha/t-vms64 ! 3395550504b ./gcc/config/alpha/unicosmk.h 2817356982b ./gcc/config/alpha/va_list.h ! 3118436884b ./gcc/config/alpha/vms-cc.c ! 2784080362b ./gcc/config/alpha/vms-crt0-64.c ! 92885822b ./gcc/config/alpha/vms-crt0.c 3572749067b ./gcc/config/alpha/vms-dwarf2.asm 3031921581b ./gcc/config/alpha/vms-dwarf2eh.asm ! 2333112991b ./gcc/config/alpha/vms-ld.c ! 664285780b ./gcc/config/alpha/vms-psxcrt0-64.c ! 1499899963b ./gcc/config/alpha/vms-psxcrt0.c ! 923619902b ./gcc/config/alpha/vms.h ! 2920918174b ./gcc/config/alpha/vms64.h 1497613985b ./gcc/config/alpha/vms_tramp.asm ! 985208816b ./gcc/config/alpha/vxworks.h ! 1756604664b ./gcc/config/alpha/x-vms 1631226706b ./gcc/config/alpha/xm-alpha-interix.h - 1813891070b ./gcc/config/alpha/xm-vms.h 2164887597b ./gcc/config/alpha/xm-vms64.h 662120966b ./gcc/config/aoutos.h ! 1916903876b ./gcc/config/arc/arc-protos.h ! 3700366341b ./gcc/config/arc/arc.c ! 2300457202b ./gcc/config/arc/arc.h ! 2348200471b ./gcc/config/arc/arc.md 2242623574b ./gcc/config/arc/initfini.c 4224412506b ./gcc/config/arc/lib1funcs.asm ! 3275278750b ./gcc/config/arc/t-arc ! 2885119589b ./gcc/config/arm/README-interworking ! 2672724137b ./gcc/config/arm/aof.h ! 754089758b ./gcc/config/arm/aout.h ! 2355527864b ./gcc/config/arm/arm-protos.h ! 478450204b ./gcc/config/arm/arm-wince-pe.h ! 968318223b ./gcc/config/arm/arm.c ! 2386488705b ./gcc/config/arm/arm.h ! 2864793753b ./gcc/config/arm/arm.md ! 531784060b ./gcc/config/arm/coff.h ! 3968543328b ./gcc/config/arm/conix-elf.h ! 2901180917b ./gcc/config/arm/crti.asm ! 2281461647b ./gcc/config/arm/crtn.asm 4281626291b ./gcc/config/arm/ecos-elf.h ! 3143079784b ./gcc/config/arm/elf.h ! 1564985594b ./gcc/config/arm/freebsd.h 3355567723b ./gcc/config/arm/lib1funcs.asm ! 1770982396b ./gcc/config/arm/linux-elf.h ! 2890656711b ./gcc/config/arm/linux-gas.h ! 3050794234b ./gcc/config/arm/netbsd.h ! 3970353953b ./gcc/config/arm/pe.c ! 581802105b ./gcc/config/arm/pe.h ! 3068021852b ./gcc/config/arm/riscix.h ! 2367073445b ./gcc/config/arm/riscix1-1.h ! 3648344095b ./gcc/config/arm/rix-gas.h ! 3970258112b ./gcc/config/arm/rtems-elf.h ! 2419470702b ./gcc/config/arm/semi.h ! 3108552778b ./gcc/config/arm/semiaof.h 1676744073b ./gcc/config/arm/strongarm-coff.h 2572947596b ./gcc/config/arm/strongarm-elf.h 4084147202b ./gcc/config/arm/strongarm-pe.h 1225127474b ./gcc/config/arm/t-arm-aout 1432575844b ./gcc/config/arm/t-arm-coff ! 3068297759b ./gcc/config/arm/t-arm-elf 2454749767b ./gcc/config/arm/t-linux 1462551033b ./gcc/config/arm/t-netbsd ! 1171746127b ./gcc/config/arm/t-pe ! 3531598494b ./gcc/config/arm/t-riscix 1572194130b ./gcc/config/arm/t-semi 3145229981b ./gcc/config/arm/t-strongarm-coff 358695252b ./gcc/config/arm/t-strongarm-elf --- 1753,1819 ---- 1191509594b ./gcc/config/alpha/t-unicosmk 1694999122b ./gcc/config/alpha/t-vms 3342100479b ./gcc/config/alpha/t-vms64 ! 1874402377b ./gcc/config/alpha/unicosmk.h 2817356982b ./gcc/config/alpha/va_list.h ! 2920918174b ./gcc/config/alpha/vms64.h ! 2980547348b ./gcc/config/alpha/vms-cc.c ! 3010004084b ./gcc/config/alpha/vms-crt0-64.c ! 4198282733b ./gcc/config/alpha/vms-crt0.c 3572749067b ./gcc/config/alpha/vms-dwarf2.asm 3031921581b ./gcc/config/alpha/vms-dwarf2eh.asm ! 2505978720b ./gcc/config/alpha/vms.h ! 278320441b ./gcc/config/alpha/vms-ld.c ! 3270218594b ./gcc/config/alpha/vms-psxcrt0-64.c ! 2164189970b ./gcc/config/alpha/vms-psxcrt0.c 1497613985b ./gcc/config/alpha/vms_tramp.asm ! 945163077b ./gcc/config/alpha/vxworks.h 1631226706b ./gcc/config/alpha/xm-alpha-interix.h 2164887597b ./gcc/config/alpha/xm-vms64.h + 1813891070b ./gcc/config/alpha/xm-vms.h + 1756604664b ./gcc/config/alpha/x-vms 662120966b ./gcc/config/aoutos.h ! 984169977b ./gcc/config/arc/arc.c ! 1864215868b ./gcc/config/arc/arc.h ! 2879061285b ./gcc/config/arc/arc.md ! 3176057659b ./gcc/config/arc/arc-modes.def ! 1430913830b ./gcc/config/arc/arc-protos.h 2242623574b ./gcc/config/arc/initfini.c 4224412506b ./gcc/config/arc/lib1funcs.asm ! 3497841411b ./gcc/config/arc/t-arc ! 2219060296b ./gcc/config/arm/aof.h ! 2675616798b ./gcc/config/arm/aout.h ! 2558407191b ./gcc/config/arm/arm.c ! 2554986637b ./gcc/config/arm/arm.h ! 400998561b ./gcc/config/arm/arm.md ! 1511706560b ./gcc/config/arm/arm-modes.def ! 2313150707b ./gcc/config/arm/arm-protos.h ! 152133707b ./gcc/config/arm/coff.h ! 3566890009b ./gcc/config/arm/conix-elf.h ! 1666366669b ./gcc/config/arm/crti.asm ! 3836293988b ./gcc/config/arm/crtn.asm 4281626291b ./gcc/config/arm/ecos-elf.h ! 259208134b ./gcc/config/arm/elf.h ! 4010625370b ./gcc/config/arm/freebsd.h 3355567723b ./gcc/config/arm/lib1funcs.asm ! 4115592483b ./gcc/config/arm/linux-elf.h ! 2410223095b ./gcc/config/arm/linux-gas.h ! 816029099b ./gcc/config/arm/netbsd-elf.h ! 3559608348b ./gcc/config/arm/netbsd.h ! 152326865b ./gcc/config/arm/pe.c ! 2382903214b ./gcc/config/arm/pe.h ! 751909821b ./gcc/config/arm/README-interworking ! 1835834968b ./gcc/config/arm/rtems-elf.h ! 3907181312b ./gcc/config/arm/semiaof.h ! 4226743428b ./gcc/config/arm/semi.h 1676744073b ./gcc/config/arm/strongarm-coff.h 2572947596b ./gcc/config/arm/strongarm-elf.h 4084147202b ./gcc/config/arm/strongarm-pe.h 1225127474b ./gcc/config/arm/t-arm-aout 1432575844b ./gcc/config/arm/t-arm-coff ! 558258459b ./gcc/config/arm/t-arm-elf 2454749767b ./gcc/config/arm/t-linux 1462551033b ./gcc/config/arm/t-netbsd ! 2218565760b ./gcc/config/arm/t-pe 1572194130b ./gcc/config/arm/t-semi 3145229981b ./gcc/config/arm/t-strongarm-coff 358695252b ./gcc/config/arm/t-strongarm-elf *************** *** 1850,2614 **** 3941249553b ./gcc/config/arm/t-xscale-coff 4238855457b ./gcc/config/arm/t-xscale-elf 3331622085b ./gcc/config/arm/uclinux-elf.h ! 3664576446b ./gcc/config/arm/unknown-elf-oabi.h ! 169320906b ./gcc/config/arm/unknown-elf.h ! 4086326841b ./gcc/config/arm/vxarm.h ! 2632983487b ./gcc/config/arm/xscale-coff.h ! 2366951282b ./gcc/config/arm/xscale-elf.h ! 567694740b ./gcc/config/avr/avr-protos.h ! 2796367080b ./gcc/config/avr/avr.c ! 3254145940b ./gcc/config/avr/avr.h ! 366760619b ./gcc/config/avr/avr.md ! 1853285406b ./gcc/config/avr/libgcc.S ! 3040444126b ./gcc/config/avr/t-avr ! 1272252374b ./gcc/config/c4x/c4x-c.c ! 4161503224b ./gcc/config/c4x/c4x-protos.h ! 487323483b ./gcc/config/c4x/c4x.c ! 4149345821b ./gcc/config/c4x/c4x.h ! 2240751934b ./gcc/config/c4x/c4x.md ! 1473970252b ./gcc/config/c4x/libgcc.S ! 3126919437b ./gcc/config/c4x/rtems.h ! 1848402932b ./gcc/config/c4x/t-c4x ! 2216814105b ./gcc/config/chorus.h ! 3381447812b ./gcc/config/clipper/clipper-protos.h ! 2064231953b ./gcc/config/clipper/clipper.c ! 4145616021b ./gcc/config/clipper/clipper.h ! 28615455b ./gcc/config/clipper/clipper.md ! 319322158b ./gcc/config/clipper/clix.h ! 2941206894b ./gcc/config/convex/convex-protos.h ! 3677219838b ./gcc/config/convex/convex.c ! 597637161b ./gcc/config/convex/convex.h ! 462857671b ./gcc/config/convex/convex.md ! 384964748b ./gcc/config/convex/fixinc.convex ! 2576905081b ./gcc/config/convex/proto.h ! 2561716856b ./gcc/config/cris/aout.h ! 2531765543b ./gcc/config/cris/arit.c ! 2623962717b ./gcc/config/cris/cris-protos.h ! 937590356b ./gcc/config/cris/cris.c ! 1846933412b ./gcc/config/cris/cris.h ! 1799638103b ./gcc/config/cris/cris.md 4228128527b ./gcc/config/cris/cris_abi_symbol.c ! 2550031006b ./gcc/config/cris/linux.h 907689569b ./gcc/config/cris/mulsi3.asm 45521295b ./gcc/config/cris/t-aout ! 874481385b ./gcc/config/cris/t-cris 2080407099b ./gcc/config/cris/t-elfmulti 1112852607b ./gcc/config/cris/t-linux 3834330727b ./gcc/config/d30v/abi ! 3966607018b ./gcc/config/d30v/d30v-protos.h ! 349365251b ./gcc/config/d30v/d30v.c ! 5113978b ./gcc/config/d30v/d30v.h 3430463305b ./gcc/config/d30v/d30v.md 1512688016b ./gcc/config/d30v/libgcc1.asm 2120255627b ./gcc/config/d30v/t-d30v ! 2176622144b ./gcc/config/darwin-c.c ! 1469496228b ./gcc/config/darwin-protos.h ! 2411222628b ./gcc/config/darwin.c ! 2796646825b ./gcc/config/darwin.h ! 186717254b ./gcc/config/dbx.h ! 2118339989b ./gcc/config/dbxcoff.h ! 2470898471b ./gcc/config/dbxelf.h 4083711028b ./gcc/config/divmod.c 3807169411b ./gcc/config/dsp16xx/dsp16xx-protos.h ! 1337751109b ./gcc/config/dsp16xx/dsp16xx.c ! 508710765b ./gcc/config/dsp16xx/dsp16xx.h ! 273715633b ./gcc/config/dsp16xx/dsp16xx.md ! 1123139357b ./gcc/config/elfos.h ! 1622698848b ./gcc/config/elxsi/elxsi-protos.h ! 2583638380b ./gcc/config/elxsi/elxsi.c ! 1846962457b ./gcc/config/elxsi/elxsi.h ! 1729380348b ./gcc/config/elxsi/elxsi.md ! 2520622557b ./gcc/config/float-c4x.h ! 36687624b ./gcc/config/float-i128.h ! 2077185169b ./gcc/config/float-i32.h ! 751904614b ./gcc/config/float-i386.h ! 466751418b ./gcc/config/float-i64.h ! 2601002892b ./gcc/config/float-m68k.h ! 1084189067b ./gcc/config/float-sh.h ! 2134536939b ./gcc/config/float-sparc.h ! 766947524b ./gcc/config/float-vax.h ! 2162319998b ./gcc/config/fp-bit.c ! 3844459473b ./gcc/config/fp-bit.h 2304723625b ./gcc/config/fr30/crti.asm 2025473533b ./gcc/config/fr30/crtn.asm ! 4061935745b ./gcc/config/fr30/fr30-protos.h ! 3792879472b ./gcc/config/fr30/fr30.c ! 1135572440b ./gcc/config/fr30/fr30.h ! 4172871396b ./gcc/config/fr30/fr30.md 2734319269b ./gcc/config/fr30/lib1funcs.asm 3068633205b ./gcc/config/fr30/t-fr30 - 3532526787b ./gcc/config/freebsd-nthr.h - 3508760161b ./gcc/config/freebsd-spec.h - 22917470b ./gcc/config/freebsd.h 3857422654b ./gcc/config/freebsd3.h 2210711654b ./gcc/config/freebsd4.h 1531797731b ./gcc/config/freebsd5.h 3920011053b ./gcc/config/freebsd6.h ! 3236013445b ./gcc/config/gnu.h ! 269492728b ./gcc/config/gofast.h ! 3397297833b ./gcc/config/h8300/crti.asm 3919963794b ./gcc/config/h8300/crtn.asm ! 3512988181b ./gcc/config/h8300/elf.h ! 3407042493b ./gcc/config/h8300/fixunssfsi.c ! 1292256972b ./gcc/config/h8300/h8300-protos.h ! 3423866381b ./gcc/config/h8300/h8300.c ! 1422146659b ./gcc/config/h8300/h8300.h ! 311961515b ./gcc/config/h8300/h8300.md ! 2991149153b ./gcc/config/h8300/lib1funcs.asm ! 2198420981b ./gcc/config/h8300/rtems.h 2094865057b ./gcc/config/h8300/t-elf ! 85067832b ./gcc/config/h8300/t-h8300 ! 2187046003b ./gcc/config/i370/README ! 979765873b ./gcc/config/i370/i370-c.c ! 1981911754b ./gcc/config/i370/i370-protos.h ! 3470805473b ./gcc/config/i370/i370.c ! 3238258803b ./gcc/config/i370/i370.h 4214408308b ./gcc/config/i370/i370.md ! 1433729913b ./gcc/config/i370/linux.h ! 1044154955b ./gcc/config/i370/mvs.h ! 3630097967b ./gcc/config/i370/oe.h ! 1023365638b ./gcc/config/i370/t-i370 1100145942b ./gcc/config/i370/t-oe ! 3856846943b ./gcc/config/i386/386bsd.h ! 3990721733b ./gcc/config/i386/aix386.h ! 757618460b ./gcc/config/i386/aix386ng.h ! 3049279797b ./gcc/config/i386/att.h ! 1685915522b ./gcc/config/i386/beos-elf.h ! 778550489b ./gcc/config/i386/biarch64.h ! 2349519740b ./gcc/config/i386/bsd.h ! 118206770b ./gcc/config/i386/bsd386.h ! 105502713b ./gcc/config/i386/crtdll.h 4293145615b ./gcc/config/i386/cygwin.asm ! 169527687b ./gcc/config/i386/cygwin.h ! 3582951454b ./gcc/config/i386/dgux.h ! 2694509274b ./gcc/config/i386/djgpp-rtems.h ! 1419143807b ./gcc/config/i386/djgpp.h ! 1128409449b ./gcc/config/i386/freebsd-aout.h ! 149642195b ./gcc/config/i386/freebsd.h ! 3516447755b ./gcc/config/i386/freebsd64.h ! 872852389b ./gcc/config/i386/gas.h 4266288971b ./gcc/config/i386/gmon-sol2.c ! 915598536b ./gcc/config/i386/gnu.h ! 166489147b ./gcc/config/i386/gstabs.h ! 1725036574b ./gcc/config/i386/i386-aout.h ! 4168545992b ./gcc/config/i386/i386-coff.h ! 1321445318b ./gcc/config/i386/i386-interix.h ! 721929446b ./gcc/config/i386/i386-interix3.h ! 2589129574b ./gcc/config/i386/i386-protos.h ! 2676101452b ./gcc/config/i386/i386.c ! 1745281973b ./gcc/config/i386/i386.h ! 1385892283b ./gcc/config/i386/i386.md ! 2017248418b ./gcc/config/i386/i386elf.h ! 1164740130b ./gcc/config/i386/interix.c ! 3908393755b ./gcc/config/i386/isc.h ! 1996803131b ./gcc/config/i386/isccoff.h ! 1692083111b ./gcc/config/i386/iscdbx.h 877642037b ./gcc/config/i386/libgcc-x86_64-glibc.ver ! 2999558891b ./gcc/config/i386/linux-aout.h ! 2799520524b ./gcc/config/i386/linux-oldld.h ! 767649862b ./gcc/config/i386/linux.h ! 2975476387b ./gcc/config/i386/linux64.h ! 83628421b ./gcc/config/i386/lynx-ng.h ! 372710545b ./gcc/config/i386/lynx.h ! 4206477894b ./gcc/config/i386/mach.h ! 3126054901b ./gcc/config/i386/mingw32.h ! 3851444052b ./gcc/config/i386/mmintrin.h ! 3361545892b ./gcc/config/i386/moss.h ! 527360119b ./gcc/config/i386/netbsd-elf.h ! 4276805615b ./gcc/config/i386/netbsd.h ! 2015644945b ./gcc/config/i386/netbsd64.h ! 2351965586b ./gcc/config/i386/netware.h ! 3059925901b ./gcc/config/i386/next.h ! 903611773b ./gcc/config/i386/openbsd.h ! 2999570618b ./gcc/config/i386/osf1-ci.asm ! 2303041887b ./gcc/config/i386/osf1-cn.asm ! 1710286781b ./gcc/config/i386/osf1elf.h ! 3979872455b ./gcc/config/i386/osf1elfgdb.h ! 3128347339b ./gcc/config/i386/osfelf.h ! 4023690019b ./gcc/config/i386/osfrose.h ! 4166685458b ./gcc/config/i386/ptx4-i.h ! 3754059204b ./gcc/config/i386/rtems.h ! 3397896458b ./gcc/config/i386/rtemself.h ! 3691307729b ./gcc/config/i386/sco5.h ! 2517904468b ./gcc/config/i386/seq-gas.h ! 2376826274b ./gcc/config/i386/seq-sysv3.h ! 3439848366b ./gcc/config/i386/seq2-sysv3.h ! 1460292009b ./gcc/config/i386/sequent.h 425477609b ./gcc/config/i386/sol2-c1.asm 1565106149b ./gcc/config/i386/sol2-ci.asm 4008317666b ./gcc/config/i386/sol2-cn.asm 2045686122b ./gcc/config/i386/sol2-gc1.asm ! 293602449b ./gcc/config/i386/sol2.h ! 3870175252b ./gcc/config/i386/sol2gas.h ! 4009223163b ./gcc/config/i386/sun.h ! 3471554836b ./gcc/config/i386/sun386.h 3846064431b ./gcc/config/i386/svr3.ifile - 2138673972b ./gcc/config/i386/svr3dbx.h - 1965747476b ./gcc/config/i386/svr3gas.h 1523044645b ./gcc/config/i386/svr3z.ifile ! 3848105951b ./gcc/config/i386/sysv3.h ! 1594728867b ./gcc/config/i386/sysv4.h ! 1357982390b ./gcc/config/i386/sysv5.h 3914733738b ./gcc/config/i386/t-beos 2437302600b ./gcc/config/i386/t-crtpic 2246944266b ./gcc/config/i386/t-crtstuff ! 3093621951b ./gcc/config/i386/t-cygwin ! 2054288148b ./gcc/config/i386/t-dgux 2902972689b ./gcc/config/i386/t-djgpp 537671296b ./gcc/config/i386/t-i386elf ! 1614388594b ./gcc/config/i386/t-interix ! 196644080b ./gcc/config/i386/t-linux64 ! 4056914306b ./gcc/config/i386/t-mingw32 92801654b ./gcc/config/i386/t-netware - 1960948471b ./gcc/config/i386/t-next 709063989b ./gcc/config/i386/t-openbsd - 1186749595b ./gcc/config/i386/t-osf - 1520459705b ./gcc/config/i386/t-osf1elf 422823583b ./gcc/config/i386/t-rtems-i386 1649755892b ./gcc/config/i386/t-sco5 ! 1824758327b ./gcc/config/i386/t-sco5gas 2786912378b ./gcc/config/i386/t-sol2 3128852740b ./gcc/config/i386/t-svr3dbx 2977164768b ./gcc/config/i386/t-udk 1023926647b ./gcc/config/i386/t-uwin 1775100101b ./gcc/config/i386/udk.h ! 3838506178b ./gcc/config/i386/unix.h 2798938994b ./gcc/config/i386/uwin.asm ! 4142598938b ./gcc/config/i386/uwin.h ! 1148022895b ./gcc/config/i386/v3gas.h ! 1621915956b ./gcc/config/i386/vsta.h ! 57307462b ./gcc/config/i386/vxi386.h ! 3423798645b ./gcc/config/i386/win32.h ! 1200967744b ./gcc/config/i386/winnt.c ! 2420589009b ./gcc/config/i386/x86-64.h 1690208514b ./gcc/config/i386/xm-cygwin.h 3902343879b ./gcc/config/i386/xm-djgpp.h 3631826497b ./gcc/config/i386/xm-i386-interix.h 92688945b ./gcc/config/i386/xm-mingw32.h ! 1404515293b ./gcc/config/i386/xm-vsta.h ! 2085781748b ./gcc/config/i386/xmmintrin.h ! 2229503331b ./gcc/config/i860/bsd-gas.h ! 3105781024b ./gcc/config/i860/bsd.h ! 1997415443b ./gcc/config/i860/fx2800.h ! 1479219352b ./gcc/config/i860/i860-protos.h ! 4081368347b ./gcc/config/i860/i860.c ! 718661732b ./gcc/config/i860/i860.h ! 2940070083b ./gcc/config/i860/i860.md ! 3806449409b ./gcc/config/i860/mach.h ! 3225474743b ./gcc/config/i860/paragon.h ! 3497246692b ./gcc/config/i860/sysv3.h ! 1181281122b ./gcc/config/i860/sysv4.h ! 269024431b ./gcc/config/i860/t-fx2800 ! 1835110220b ./gcc/config/i860/varargs.asm ! 648677105b ./gcc/config/i960/i960-c.c 3384279950b ./gcc/config/i960/i960-coff.h ! 3598295769b ./gcc/config/i960/i960-protos.h ! 736082089b ./gcc/config/i960/i960.c ! 3931238913b ./gcc/config/i960/i960.h ! 2800981685b ./gcc/config/i960/i960.md 1281966645b ./gcc/config/i960/rtems.h ! 2036399646b ./gcc/config/i960/t-960bare ! 703563677b ./gcc/config/i960/t-vxworks960 3103531078b ./gcc/config/i960/vx960-coff.h 1895495318b ./gcc/config/i960/vx960.h ! 1007852506b ./gcc/config/ia64/aix.h ! 1057225417b ./gcc/config/ia64/crtbegin.asm ! 2515543842b ./gcc/config/ia64/crtend.asm 281392077b ./gcc/config/ia64/crtfastmath.c 3128441059b ./gcc/config/ia64/crti.asm 3161585686b ./gcc/config/ia64/crtn.asm ! 2297508797b ./gcc/config/ia64/elf.h 2446839914b ./gcc/config/ia64/fde-glibc.c ! 2501046378b ./gcc/config/ia64/freebsd.h ! 2423115826b ./gcc/config/ia64/hpux.h ! 3320865692b ./gcc/config/ia64/hpux_longdouble.h ! 2354458740b ./gcc/config/ia64/ia64-protos.h ! 2150614374b ./gcc/config/ia64/ia64.c ! 160446917b ./gcc/config/ia64/ia64.h ! 1143291289b ./gcc/config/ia64/ia64.md 511545686b ./gcc/config/ia64/ia64intrin.h 3488320870b ./gcc/config/ia64/lib1funcs.asm 2361471520b ./gcc/config/ia64/libgcc-ia64.ver ! 2435218299b ./gcc/config/ia64/linux.h ! 1337642433b ./gcc/config/ia64/quadlib.c ! 1454530158b ./gcc/config/ia64/sysv4.h ! 2374494786b ./gcc/config/ia64/t-aix 2148782144b ./gcc/config/ia64/t-glibc ! 3471209231b ./gcc/config/ia64/t-hpux ! 158251161b ./gcc/config/ia64/t-ia64 2759923269b ./gcc/config/ia64/unwind-aix.c ! 1364155779b ./gcc/config/ia64/unwind-ia64.c 2355075302b ./gcc/config/ia64/unwind-ia64.h ! 1139973568b ./gcc/config/interix.h 3221870490b ./gcc/config/interix3.h 3774321010b ./gcc/config/libgcc-glibc.ver ! 679171109b ./gcc/config/libgloss.h ! 265766519b ./gcc/config/linux-aout.h ! 2201567287b ./gcc/config/linux.h ! 2466014571b ./gcc/config/lynx-ng.h ! 510514981b ./gcc/config/lynx.h 2460604231b ./gcc/config/m32r/initfini.c ! 67938598b ./gcc/config/m32r/m32r-protos.h ! 2298486681b ./gcc/config/m32r/m32r.c ! 2178062905b ./gcc/config/m32r/m32r.h ! 2455193277b ./gcc/config/m32r/m32r.md 3043182144b ./gcc/config/m32r/t-m32r ! 35339373b ./gcc/config/m68hc11/larith.asm ! 3563849705b ./gcc/config/m68hc11/m68hc11-crt0.S ! 1796033124b ./gcc/config/m68hc11/m68hc11-protos.h ! 1272963761b ./gcc/config/m68hc11/m68hc11.c ! 1280294916b ./gcc/config/m68hc11/m68hc11.h ! 1425285532b ./gcc/config/m68hc11/m68hc11.md ! 452436463b ./gcc/config/m68hc11/m68hc12.h ! 1483227044b ./gcc/config/m68hc11/t-m68hc11-gas ! 3262237289b ./gcc/config/m68k/3b1.h ! 3032963201b ./gcc/config/m68k/3b1g.h ! 1105413220b ./gcc/config/m68k/a-ux.h ! 1524307847b ./gcc/config/m68k/altos3068.h ! 1472845046b ./gcc/config/m68k/amix.h ! 1484241857b ./gcc/config/m68k/apollo68.h ! 2229011187b ./gcc/config/m68k/atari.h ! 1360990051b ./gcc/config/m68k/aux-crt1.c ! 1689696476b ./gcc/config/m68k/aux-crt2.asm ! 2072970828b ./gcc/config/m68k/aux-crtn.asm ! 409246969b ./gcc/config/m68k/aux-exit.c ! 2164284366b ./gcc/config/m68k/aux-low.gld ! 2208437798b ./gcc/config/m68k/aux-mcount.c ! 304653227b ./gcc/config/m68k/auxas.h ! 741505994b ./gcc/config/m68k/auxgas.h ! 922288695b ./gcc/config/m68k/auxgld.h ! 2685530303b ./gcc/config/m68k/auxld.h ! 1916112183b ./gcc/config/m68k/ccur-GAS.h ! 1686080218b ./gcc/config/m68k/coff.h ! 2360909894b ./gcc/config/m68k/crds.h 1173190318b ./gcc/config/m68k/crti.s 4181788584b ./gcc/config/m68k/crtn.s - 3642339847b ./gcc/config/m68k/ctix.h - 2199460345b ./gcc/config/m68k/dpx2.h - 2216029984b ./gcc/config/m68k/dpx2.ifile - 2770446786b ./gcc/config/m68k/dpx2cdbx.h - 3851760573b ./gcc/config/m68k/dpx2g.h 2518640661b ./gcc/config/m68k/fpgnulib.c ! 136981270b ./gcc/config/m68k/hp2bsd.h ! 2625821362b ./gcc/config/m68k/hp310.h ! 4247760656b ./gcc/config/m68k/hp310g.h ! 2642329211b ./gcc/config/m68k/hp320.h ! 3645108527b ./gcc/config/m68k/hp320g.h ! 942415927b ./gcc/config/m68k/hp3bsd.h ! 3605366445b ./gcc/config/m68k/hp3bsd44.h 2864047424b ./gcc/config/m68k/hpux7.h - 3484500543b ./gcc/config/m68k/isi-nfp.h - 665470337b ./gcc/config/m68k/isi.h 704862081b ./gcc/config/m68k/lb1sf68.asm ! 1023591365b ./gcc/config/m68k/linux-aout.h ! 2268550865b ./gcc/config/m68k/linux.h ! 162996909b ./gcc/config/m68k/lynx-ng.h ! 3350690882b ./gcc/config/m68k/lynx.h 3379792683b ./gcc/config/m68k/m68020-elf.h ! 388266224b ./gcc/config/m68k/m68k-aout.h 3882947461b ./gcc/config/m68k/m68k-coff.h 3855098247b ./gcc/config/m68k/m68k-none.h ! 3954442786b ./gcc/config/m68k/m68k-protos.h 1109594909b ./gcc/config/m68k/m68k-psos.h ! 1870424553b ./gcc/config/m68k/m68k.c ! 3756685982b ./gcc/config/m68k/m68k.h ! 4063689296b ./gcc/config/m68k/m68k.md ! 2287927144b ./gcc/config/m68k/m68kelf.h ! 1120822994b ./gcc/config/m68k/m68kemb.h ! 947783547b ./gcc/config/m68k/m68kv4.h ! 2766673945b ./gcc/config/m68k/math-3300.h 3047408322b ./gcc/config/m68k/math-68881.h 1902334218b ./gcc/config/m68k/mot3300-crt0.S ! 4021646589b ./gcc/config/m68k/mot3300.h 4250921257b ./gcc/config/m68k/mot3300Mcrt0.S ! 1584694371b ./gcc/config/m68k/netbsd-elf.h ! 306540848b ./gcc/config/m68k/netbsd.h ! 823527599b ./gcc/config/m68k/news.h ! 895337217b ./gcc/config/m68k/news3.h ! 2598124463b ./gcc/config/m68k/news3gas.h ! 2724290690b ./gcc/config/m68k/newsgas.h ! 3375370361b ./gcc/config/m68k/next.h ! 3839942171b ./gcc/config/m68k/next21.h ! 615787625b ./gcc/config/m68k/openbsd.h ! 2096689574b ./gcc/config/m68k/pbb.h ! 964659279b ./gcc/config/m68k/plexus.h ! 4045485418b ./gcc/config/m68k/rtems.h 3840336856b ./gcc/config/m68k/rtemself.h 2246845695b ./gcc/config/m68k/sgs.h ! 844744081b ./gcc/config/m68k/sun2.h ! 3991060631b ./gcc/config/m68k/sun2o4.h ! 3239560263b ./gcc/config/m68k/sun3.h 3724598161b ./gcc/config/m68k/sun3mach.h - 120628064b ./gcc/config/m68k/sun3n.h 864417723b ./gcc/config/m68k/sun3n3.h 2298299278b ./gcc/config/m68k/sun3o3.h - 3527955370b ./gcc/config/m68k/t-aux 2957852228b ./gcc/config/m68k/t-crtstuff 1845413337b ./gcc/config/m68k/t-hp320 1601671577b ./gcc/config/m68k/t-linux 1601671577b ./gcc/config/m68k/t-linux-aout - 3474104024b ./gcc/config/m68k/t-lynx 591505405b ./gcc/config/m68k/t-m68kbare 1376927127b ./gcc/config/m68k/t-m68kelf 2312371323b ./gcc/config/m68k/t-mot3300 1278563328b ./gcc/config/m68k/t-mot3300-gald 505153656b ./gcc/config/m68k/t-mot3300-gas 2294965883b ./gcc/config/m68k/t-mot3300-gld - 1947397845b ./gcc/config/m68k/t-next 3937644742b ./gcc/config/m68k/t-openbsd ! 2710264317b ./gcc/config/m68k/t-vxworks68 ! 2078063242b ./gcc/config/m68k/tower-as.h 2265492461b ./gcc/config/m68k/tower.h ! 2466779056b ./gcc/config/m68k/vxm68k.h ! 330782920b ./gcc/config/m68k/x-next ! 3877749712b ./gcc/config/m88k/aout-dbx.h ! 2407166913b ./gcc/config/m88k/dgux.h ! 3298414170b ./gcc/config/m88k/dgux.ld ! 3964892058b ./gcc/config/m88k/dguxbcs.h ! 1645309935b ./gcc/config/m88k/dolph.h ! 1558967450b ./gcc/config/m88k/dolphin.ld ! 27544745b ./gcc/config/m88k/luna.h ! 1097971558b ./gcc/config/m88k/m88k-aout.h ! 929158884b ./gcc/config/m88k/m88k-coff.h ! 2372325319b ./gcc/config/m88k/m88k-move.sh ! 192457426b ./gcc/config/m88k/m88k-protos.h ! 382352310b ./gcc/config/m88k/m88k.c ! 2252790221b ./gcc/config/m88k/m88k.h ! 249987577b ./gcc/config/m88k/m88k.md ! 3182883703b ./gcc/config/m88k/openbsd.h ! 2062420508b ./gcc/config/m88k/sysv3.h 2064243939b ./gcc/config/m88k/sysv4.h - 1952601632b ./gcc/config/m88k/t-bug - 3570488521b ./gcc/config/m88k/t-dgux - 185935036b ./gcc/config/m88k/t-dgux-gas - 1929747752b ./gcc/config/m88k/t-dguxbcs - 141637502b ./gcc/config/m88k/t-dolph 2294317049b ./gcc/config/m88k/t-luna 3352809625b ./gcc/config/m88k/t-luna-gas 1952601632b ./gcc/config/m88k/t-m88k - 2909533034b ./gcc/config/m88k/t-m88k-gas 3580877409b ./gcc/config/m88k/t-sysv4 - 3049523840b ./gcc/config/m88k/t-tekXD88 - 3899935761b ./gcc/config/m88k/tekXD88.h - 173867895b ./gcc/config/m88k/tekXD88.ld 4057462442b ./gcc/config/mcore/crti.asm 3021138350b ./gcc/config/mcore/crtn.asm 3514021936b ./gcc/config/mcore/gfloat.h 3510059529b ./gcc/config/mcore/lib1.asm ! 511751417b ./gcc/config/mcore/mcore-elf.h ! 3984142890b ./gcc/config/mcore/mcore-pe.h ! 149272234b ./gcc/config/mcore/mcore-protos.h ! 2263673310b ./gcc/config/mcore/mcore.c ! 2030700230b ./gcc/config/mcore/mcore.h ! 400725302b ./gcc/config/mcore/mcore.md 1343396749b ./gcc/config/mcore/t-mcore ! 2921008064b ./gcc/config/mcore/t-mcore-pe ! 1252529019b ./gcc/config/mips/abi64.h ! 1865003947b ./gcc/config/mips/bsd-4.h ! 2290247989b ./gcc/config/mips/bsd-5.h 930726788b ./gcc/config/mips/cross64.h 1227388398b ./gcc/config/mips/crti.asm ! 1600482981b ./gcc/config/mips/crtn.asm ! 3317633569b ./gcc/config/mips/dec-bsd.h ! 4118299381b ./gcc/config/mips/dec-osf1.h ! 1910637049b ./gcc/config/mips/ecoff.h ! 3551974985b ./gcc/config/mips/ecoffl.h ! 1297779950b ./gcc/config/mips/elf.h ! 1974114900b ./gcc/config/mips/elf64.h ! 4118432176b ./gcc/config/mips/elfl.h ! 1175169006b ./gcc/config/mips/elfl64.h ! 452497001b ./gcc/config/mips/elflorion.h 4210328521b ./gcc/config/mips/elforion.h ! 4009674128b ./gcc/config/mips/iris3.h 3161243087b ./gcc/config/mips/iris4.h ! 2743944992b ./gcc/config/mips/iris4loser.h ! 4137712676b ./gcc/config/mips/iris5.h ! 1342606731b ./gcc/config/mips/iris5gas.h ! 1473745020b ./gcc/config/mips/iris6.h ! 2290690324b ./gcc/config/mips/iris6gld.h 3658812670b ./gcc/config/mips/irix6-libc-compat.c ! 3645898751b ./gcc/config/mips/isa32-linux.h ! 3639703657b ./gcc/config/mips/isa3264.h ! 1922092548b ./gcc/config/mips/linux.h ! 2202363688b ./gcc/config/mips/little.h ! 3112223626b ./gcc/config/mips/mips-5.h ! 3798369178b ./gcc/config/mips/mips-protos.h ! 4292919872b ./gcc/config/mips/mips.c ! 1682195442b ./gcc/config/mips/mips.h ! 218198435b ./gcc/config/mips/mips.md 2024693888b ./gcc/config/mips/mips16.S ! 3451330990b ./gcc/config/mips/netbsd.h ! 1685635385b ./gcc/config/mips/news4.h ! 3776131275b ./gcc/config/mips/news5.h ! 807792414b ./gcc/config/mips/nws3250v4.h 391873849b ./gcc/config/mips/openbsd-be.h ! 2082964611b ./gcc/config/mips/openbsd.h ! 14433004b ./gcc/config/mips/osfrose.h ! 440031462b ./gcc/config/mips/r3900.h ! 1842045499b ./gcc/config/mips/rtems.h ! 1390680376b ./gcc/config/mips/rtems64.h ! 4240783400b ./gcc/config/mips/sni-gas.h ! 670897314b ./gcc/config/mips/sni-svr4.h ! 3194520655b ./gcc/config/mips/svr3-4.h ! 767984692b ./gcc/config/mips/svr3-5.h ! 2860455593b ./gcc/config/mips/svr4-4.h ! 980733461b ./gcc/config/mips/svr4-5.h ! 2452459111b ./gcc/config/mips/svr4-t.h ! 2607420510b ./gcc/config/mips/t-bsd ! 2303697534b ./gcc/config/mips/t-bsd-gas 3044783963b ./gcc/config/mips/t-cross64 ! 3379398326b ./gcc/config/mips/t-ecoff ! 3744526568b ./gcc/config/mips/t-elf 2896429436b ./gcc/config/mips/t-iris ! 2557039330b ./gcc/config/mips/t-iris6 ! 2995723142b ./gcc/config/mips/t-isa3264 ! 3174612276b ./gcc/config/mips/t-linux ! 3174612276b ./gcc/config/mips/t-netbsd ! 1879935135b ./gcc/config/mips/t-r3900 ! 1413700483b ./gcc/config/mips/t-svr3 ! 3653081423b ./gcc/config/mips/t-svr3-gas ! 764398973b ./gcc/config/mips/t-svr4 ! 2691764145b ./gcc/config/mips/t-svr4-gas ! 1592869717b ./gcc/config/mips/t-ultrix ! 904152708b ./gcc/config/mips/ultrix.h ! 2931924525b ./gcc/config/mips/vxworks.h 3454112118b ./gcc/config/mips/xm-iris5.h 1256346916b ./gcc/config/mmix/crti.asm 4149276856b ./gcc/config/mmix/crtn.asm ! 1558302901b ./gcc/config/mmix/mmix-protos.h ! 1365569292b ./gcc/config/mmix/mmix.c ! 3912110255b ./gcc/config/mmix/mmix.h ! 785535891b ./gcc/config/mmix/mmix.md ! 1410017015b ./gcc/config/mmix/t-mmix 38698671b ./gcc/config/mn10200/lib1funcs.asm ! 4029388596b ./gcc/config/mn10200/mn10200-protos.h ! 585104722b ./gcc/config/mn10200/mn10200.c ! 3521160628b ./gcc/config/mn10200/mn10200.h 1601326717b ./gcc/config/mn10200/mn10200.md 2767557893b ./gcc/config/mn10200/t-mn10200 ! 3249413352b ./gcc/config/mn10300/mn10300-protos.h ! 62398656b ./gcc/config/mn10300/mn10300.c ! 2168100301b ./gcc/config/mn10300/mn10300.h ! 680410204b ./gcc/config/mn10300/mn10300.md 3295955402b ./gcc/config/mn10300/t-mn10300 ! 3969750295b ./gcc/config/netbsd-aout.h ! 2304062656b ./gcc/config/netbsd-elf.h ! 1669681271b ./gcc/config/netbsd.h ! 3670236471b ./gcc/config/netware.h ! 2525790015b ./gcc/config/nextstep-protos.h ! 884710202b ./gcc/config/nextstep.c ! 251016432b ./gcc/config/nextstep.h ! 3498035575b ./gcc/config/nextstep21.h ! 505151767b ./gcc/config/ns32k/encore.h ! 3294809321b ./gcc/config/ns32k/merlin.h ! 1759962800b ./gcc/config/ns32k/netbsd.h 1708247420b ./gcc/config/ns32k/ns32k-protos.h ! 1296740637b ./gcc/config/ns32k/ns32k.c ! 1493984519b ./gcc/config/ns32k/ns32k.h ! 1903185806b ./gcc/config/ns32k/ns32k.md ! 104963810b ./gcc/config/ns32k/pc532-mach.h ! 1249730935b ./gcc/config/ns32k/pc532-min.h ! 3974800750b ./gcc/config/ns32k/pc532.h ! 1951152204b ./gcc/config/ns32k/sequent.h ! 3970632321b ./gcc/config/ns32k/tek6000.h ! 906085514b ./gcc/config/ns32k/tek6100.h ! 3417438490b ./gcc/config/ns32k/tek6200.h ! 247387334b ./gcc/config/openbsd.h ! 2401043639b ./gcc/config/pa/elf.h ! 1435423353b ./gcc/config/pa/lib1funcs.asm 454965220b ./gcc/config/pa/lib2funcs.asm ! 2056209887b ./gcc/config/pa/long_double.h ! 2062031370b ./gcc/config/pa/milli32.S ! 401709680b ./gcc/config/pa/milli64.S ! 255410879b ./gcc/config/pa/pa-64.h ! 2070570431b ./gcc/config/pa/pa-hiux.h ! 2419055394b ./gcc/config/pa/pa-hpux.h ! 722967032b ./gcc/config/pa/pa-hpux10.h ! 3160109858b ./gcc/config/pa/pa-hpux11.h ! 3949639215b ./gcc/config/pa/pa-hpux7.h 3124002443b ./gcc/config/pa/pa-hpux9.h ! 1343875951b ./gcc/config/pa/pa-linux.h 3618123809b ./gcc/config/pa/pa-oldas.h ! 3108768032b ./gcc/config/pa/pa-osf.h ! 2360373262b ./gcc/config/pa/pa-pro-end.h ! 944974079b ./gcc/config/pa/pa-protos.h ! 4228751593b ./gcc/config/pa/pa.c ! 2873633316b ./gcc/config/pa/pa.h ! 756298139b ./gcc/config/pa/pa.md ! 2660241824b ./gcc/config/pa/pa32-linux.h ! 3627454173b ./gcc/config/pa/pa32-regs.h ! 3477747579b ./gcc/config/pa/pa64-hpux.h ! 4127689659b ./gcc/config/pa/pa64-linux.h ! 106717215b ./gcc/config/pa/pa64-regs.h ! 3813586304b ./gcc/config/pa/pa64-start.h ! 1224647575b ./gcc/config/pa/quadlib.c ! 486860211b ./gcc/config/pa/rtems.h ! 4072392940b ./gcc/config/pa/som.h 299977776b ./gcc/config/pa/t-bsd 1117935804b ./gcc/config/pa/t-dce-thr 1373645832b ./gcc/config/pa/t-hpux-shlib ! 176583881b ./gcc/config/pa/t-linux 3127053933b ./gcc/config/pa/t-linux64 1211178790b ./gcc/config/pa/t-mpeix 3597581162b ./gcc/config/pa/t-pa 2754633370b ./gcc/config/pa/t-pa-hpux - 1659865778b ./gcc/config/pa/t-pa64 817714064b ./gcc/config/pa/t-pro ! 1293323254b ./gcc/config/pa/x-ada 4118902235b ./gcc/config/pdp11/2bsd.h 1678731791b ./gcc/config/pdp11/pdp11-protos.h ! 3233992791b ./gcc/config/pdp11/pdp11.c ! 3228770397b ./gcc/config/pdp11/pdp11.h ! 3587948093b ./gcc/config/pdp11/pdp11.md ! 3096460014b ./gcc/config/pdp11/t-pdp11 ! 1460345365b ./gcc/config/pj/lib1funcs.S ! 3899085832b ./gcc/config/pj/linux.h ! 827420337b ./gcc/config/pj/pj-protos.h ! 3905905230b ./gcc/config/pj/pj.c ! 2997103714b ./gcc/config/pj/pj.h ! 4115579495b ./gcc/config/pj/pj.md ! 140528803b ./gcc/config/pj/pjl.h ! 3942936368b ./gcc/config/pj/t-pj ! 1311052798b ./gcc/config/psos.h ! 1638983603b ./gcc/config/ptx4.h ! 1229374838b ./gcc/config/romp/romp-protos.h ! 1415145997b ./gcc/config/romp/romp.c ! 4030226328b ./gcc/config/romp/romp.h 4096557609b ./gcc/config/romp/romp.md ! 676923459b ./gcc/config/rs6000/aix.h ! 3731158896b ./gcc/config/rs6000/aix31.h 2741987967b ./gcc/config/rs6000/aix3newas.h ! 1702283472b ./gcc/config/rs6000/aix41.h ! 1402586921b ./gcc/config/rs6000/aix43.h ! 1428773917b ./gcc/config/rs6000/aix51.h 1953946692b ./gcc/config/rs6000/altivec-defs.h ! 3231976674b ./gcc/config/rs6000/altivec.h ! 510508394b ./gcc/config/rs6000/beos.h 511519789b ./gcc/config/rs6000/crtsavres.asm 3983537248b ./gcc/config/rs6000/darwin-tramp.asm ! 362681124b ./gcc/config/rs6000/darwin.h 383867253b ./gcc/config/rs6000/eabi-ci.asm 3758141774b ./gcc/config/rs6000/eabi-cn.asm ! 2647778291b ./gcc/config/rs6000/eabi.asm ! 4071223554b ./gcc/config/rs6000/eabi.h ! 318728404b ./gcc/config/rs6000/eabiaix.h ! 1991998428b ./gcc/config/rs6000/eabialtivec.h ! 1258445797b ./gcc/config/rs6000/eabisim.h ! 3017082484b ./gcc/config/rs6000/freebsd.h ! 4293496085b ./gcc/config/rs6000/gnu.h ! 4204981338b ./gcc/config/rs6000/linux.h ! 1281642247b ./gcc/config/rs6000/linux64.h 1351560312b ./gcc/config/rs6000/linuxaltivec.h ! 1286374006b ./gcc/config/rs6000/lynx.h ! 4204979131b ./gcc/config/rs6000/mach.h 1820610909b ./gcc/config/rs6000/milli.exp ! 926081320b ./gcc/config/rs6000/netbsd.h ! 4127185084b ./gcc/config/rs6000/ppc-asm.h ! 2986503806b ./gcc/config/rs6000/rs6000-protos.h ! 4042212867b ./gcc/config/rs6000/rs6000.c ! 2995718160b ./gcc/config/rs6000/rs6000.h ! 1487812065b ./gcc/config/rs6000/rs6000.md ! 111710449b ./gcc/config/rs6000/rtems.h ! 2439652147b ./gcc/config/rs6000/softfloat.h 3703627966b ./gcc/config/rs6000/sol-ci.asm 3016810975b ./gcc/config/rs6000/sol-cn.asm ! 2779375231b ./gcc/config/rs6000/sysv4.h ! 3795959522b ./gcc/config/rs6000/sysv4le.h ! 427957895b ./gcc/config/rs6000/t-aix43 2042460673b ./gcc/config/rs6000/t-beos ! 3302666617b ./gcc/config/rs6000/t-darwin ! 2019934202b ./gcc/config/rs6000/t-linux64 4049449059b ./gcc/config/rs6000/t-newas ! 3107528900b ./gcc/config/rs6000/t-ppccomm 365048301b ./gcc/config/rs6000/t-ppcgas 3552141086b ./gcc/config/rs6000/t-ppcos 946774617b ./gcc/config/rs6000/t-rs6000 3304625655b ./gcc/config/rs6000/t-rtems ! 85679922b ./gcc/config/rs6000/tramp.asm ! 301220496b ./gcc/config/rs6000/vxppc.h ! 950192882b ./gcc/config/rs6000/xcoff.h 1142085470b ./gcc/config/rtems.h ! 3390348482b ./gcc/config/s390/fixdfdi.h ! 1234245155b ./gcc/config/s390/libgcc-glibc.ver ! 661638700b ./gcc/config/s390/linux.h ! 1407420306b ./gcc/config/s390/s390-protos.h ! 3979416840b ./gcc/config/s390/s390.c ! 2354192299b ./gcc/config/s390/s390.h ! 2229281672b ./gcc/config/s390/s390.md 3998835120b ./gcc/config/s390/s390x.h ! 1051100452b ./gcc/config/s390/t-linux ! 2020003531b ./gcc/config/s390/t-linux64 ! 41732123b ./gcc/config/sh/crt1.asm 643557115b ./gcc/config/sh/crti.asm 567573801b ./gcc/config/sh/crtn.asm ! 1588713186b ./gcc/config/sh/elf.h ! 3107978185b ./gcc/config/sh/lib1funcs.asm ! 450228266b ./gcc/config/sh/linux.h ! 1498631144b ./gcc/config/sh/rtems.h 2022181827b ./gcc/config/sh/rtemself.h ! 410816511b ./gcc/config/sh/sh-protos.h ! 3254166331b ./gcc/config/sh/sh.c ! 3738163077b ./gcc/config/sh/sh.h ! 2262481580b ./gcc/config/sh/sh.md ! 1071738647b ./gcc/config/sh/sh64.h 3656510246b ./gcc/config/sh/shmedia.h 4192915538b ./gcc/config/sh/sshmedia.h 3555569248b ./gcc/config/sh/t-elf ! 3486728930b ./gcc/config/sh/t-linux ! 2597458196b ./gcc/config/sh/t-sh ! 672246409b ./gcc/config/sh/t-sh64 2893164163b ./gcc/config/sh/ushmedia.h ! 1926756242b ./gcc/config/sparc/aout.h 3461838008b ./gcc/config/sparc/biarch64.h 1386942151b ./gcc/config/sparc/bsd.h 1479022830b ./gcc/config/sparc/crtfastmath.c 54964474b ./gcc/config/sparc/elf.h ! 1883862361b ./gcc/config/sparc/freebsd.h ! 1322899413b ./gcc/config/sparc/gmon-sol2.c 3746795534b ./gcc/config/sparc/hal.h ! 3587954192b ./gcc/config/sparc/lb1spc.asm ! 557614974b ./gcc/config/sparc/lb1spl.asm 1761187951b ./gcc/config/sparc/libgcc-sparc-glibc.ver ! 2544415545b ./gcc/config/sparc/linux-aout.h ! 1914379195b ./gcc/config/sparc/linux.h ! 753491459b ./gcc/config/sparc/linux64.h 2424336991b ./gcc/config/sparc/lite.h ! 2163445162b ./gcc/config/sparc/litecoff.h ! 1933660745b ./gcc/config/sparc/liteelf.h 2334021382b ./gcc/config/sparc/lynx-ng.h ! 2399395336b ./gcc/config/sparc/lynx.h ! 3811927118b ./gcc/config/sparc/netbsd-elf.h ! 365271853b ./gcc/config/sparc/netbsd.h ! 349992599b ./gcc/config/sparc/openbsd.h 1122827784b ./gcc/config/sparc/openbsd1-64.h 1977030271b ./gcc/config/sparc/openbsd64.h ! 3728184707b ./gcc/config/sparc/pbd.h ! 4106236389b ./gcc/config/sparc/rtems.h 2243601282b ./gcc/config/sparc/rtemself.h 1579903847b ./gcc/config/sparc/sol2-64.h ! 1510111749b ./gcc/config/sparc/sol2-bi.h 1463670426b ./gcc/config/sparc/sol2-c1.asm 3288323690b ./gcc/config/sparc/sol2-ci.asm 2004370404b ./gcc/config/sparc/sol2-cn.asm - 2182182911b ./gcc/config/sparc/sol2-g1.asm 878755050b ./gcc/config/sparc/sol2-gas-bi.h 3173831404b ./gcc/config/sparc/sol2-gld-bi.h 4206582763b ./gcc/config/sparc/sol2-gld.h ! 2455246824b ./gcc/config/sparc/sol2.h ! 2488307215b ./gcc/config/sparc/sol27-sld.h 3918002150b ./gcc/config/sparc/sp64-aout.h ! 2870886299b ./gcc/config/sparc/sp64-elf.h 3128199560b ./gcc/config/sparc/sp86x-aout.h ! 1221714757b ./gcc/config/sparc/sp86x-elf.h ! 4023359087b ./gcc/config/sparc/sparc-protos.h ! 2169834781b ./gcc/config/sparc/sparc.c ! 679741711b ./gcc/config/sparc/sparc.h ! 707642527b ./gcc/config/sparc/sparc.md 842964351b ./gcc/config/sparc/splet.h 952337645b ./gcc/config/sparc/sun4gas.h 1795303911b ./gcc/config/sparc/sun4o3.h ! 721602587b ./gcc/config/sparc/sunos4.h ! 14508846b ./gcc/config/sparc/sysv4.h 2782836992b ./gcc/config/sparc/t-chorus-elf 2056024669b ./gcc/config/sparc/t-crtfm 3744055768b ./gcc/config/sparc/t-elf --- 1821,2504 ---- 3941249553b ./gcc/config/arm/t-xscale-coff 4238855457b ./gcc/config/arm/t-xscale-elf 3331622085b ./gcc/config/arm/uclinux-elf.h ! 1071156127b ./gcc/config/arm/unknown-elf.h ! 4033330429b ./gcc/config/arm/unknown-elf-oabi.h ! 1588213826b ./gcc/config/arm/vxarm.h ! 2210599114b ./gcc/config/arm/xscale-coff.h ! 1990441242b ./gcc/config/arm/xscale-elf.h ! 1025531934b ./gcc/config/avr/avr.c ! 4086669495b ./gcc/config/avr/avr.h ! 3351685131b ./gcc/config/avr/avr.md ! 1358701110b ./gcc/config/avr/avr-protos.h ! 4272425436b ./gcc/config/avr/libgcc.S ! 2062536157b ./gcc/config/avr/t-avr ! 2961519321b ./gcc/config/c4x/c4x.c ! 2135324155b ./gcc/config/c4x/c4x-c.c ! 2694923076b ./gcc/config/c4x/c4x.h ! 455436257b ./gcc/config/c4x/c4x.md ! 3103028321b ./gcc/config/c4x/c4x-modes.def ! 3891197136b ./gcc/config/c4x/c4x-protos.h ! 611817595b ./gcc/config/c4x/libgcc.S ! 2241768860b ./gcc/config/c4x/rtems.h ! 2323387481b ./gcc/config/c4x/t-c4x ! 1330177116b ./gcc/config/chorus.h ! 3983475564b ./gcc/config/cris/aout.h ! 3670658933b ./gcc/config/cris/arit.c 4228128527b ./gcc/config/cris/cris_abi_symbol.c ! 490446796b ./gcc/config/cris/cris.c ! 2926215766b ./gcc/config/cris/cris.h ! 3538699081b ./gcc/config/cris/cris.md ! 881494957b ./gcc/config/cris/cris-protos.h ! 744364725b ./gcc/config/cris/linux.h 907689569b ./gcc/config/cris/mulsi3.asm 45521295b ./gcc/config/cris/t-aout ! 3846478151b ./gcc/config/cris/t-cris 2080407099b ./gcc/config/cris/t-elfmulti 1112852607b ./gcc/config/cris/t-linux 3834330727b ./gcc/config/d30v/abi ! 2625081148b ./gcc/config/d30v/d30v.c ! 1965727304b ./gcc/config/d30v/d30v.h 3430463305b ./gcc/config/d30v/d30v.md + 3447920759b ./gcc/config/d30v/d30v-protos.h 1512688016b ./gcc/config/d30v/libgcc1.asm 2120255627b ./gcc/config/d30v/t-d30v ! 3176848466b ./gcc/config/darwin.c ! 4059801364b ./gcc/config/darwin-c.c ! 3226016932b ./gcc/config/darwin-crt2.c ! 1934403156b ./gcc/config/darwin.h ! 1838012452b ./gcc/config/darwin-protos.h ! 2063159136b ./gcc/config/dbxcoff.h ! 741369544b ./gcc/config/dbxelf.h ! 2662634125b ./gcc/config/dbx.h 4083711028b ./gcc/config/divmod.c + 2358823832b ./gcc/config/dsp16xx/dsp16xx.c + 749466720b ./gcc/config/dsp16xx/dsp16xx.h + 3159876720b ./gcc/config/dsp16xx/dsp16xx.md 3807169411b ./gcc/config/dsp16xx/dsp16xx-protos.h ! 3752303804b ./gcc/config/elfos.h ! 4261313761b ./gcc/config/fp-bit.c ! 174418986b ./gcc/config/fp-bit.h 2304723625b ./gcc/config/fr30/crti.asm 2025473533b ./gcc/config/fr30/crtn.asm ! 1284148066b ./gcc/config/fr30/fr30.c ! 1920296356b ./gcc/config/fr30/fr30.h ! 1664440102b ./gcc/config/fr30/fr30.md ! 2264307288b ./gcc/config/fr30/fr30-protos.h 2734319269b ./gcc/config/fr30/lib1funcs.asm 3068633205b ./gcc/config/fr30/t-fr30 3857422654b ./gcc/config/freebsd3.h 2210711654b ./gcc/config/freebsd4.h 1531797731b ./gcc/config/freebsd5.h 3920011053b ./gcc/config/freebsd6.h ! 3873089153b ./gcc/config/freebsd.h ! 3532526787b ./gcc/config/freebsd-nthr.h ! 3606513384b ./gcc/config/freebsd-spec.h ! 927977764b ./gcc/config/frv/cmovd.c ! 1433509166b ./gcc/config/frv/cmovh.c ! 2671877583b ./gcc/config/frv/cmovw.c ! 1018636984b ./gcc/config/frv/frv-abi.h ! 2218059281b ./gcc/config/frv/frv-asm.h ! 1047071374b ./gcc/config/frv/frvbegin.c ! 4224181574b ./gcc/config/frv/frv.c ! 1886816641b ./gcc/config/frv/frvend.c ! 1111096050b ./gcc/config/frv/frv.h ! 3428515036b ./gcc/config/frv/frv.md ! 3648172764b ./gcc/config/frv/frv-modes.def ! 923550243b ./gcc/config/frv/frv-protos.h ! 3504198099b ./gcc/config/frv/lib1funcs.asm ! 3184593289b ./gcc/config/frv/modi.c ! 3995816317b ./gcc/config/frv/t-frv ! 3539083584b ./gcc/config/frv/uitod.c ! 1261623248b ./gcc/config/frv/uitof.c ! 3087488293b ./gcc/config/frv/ulltod.c ! 788903798b ./gcc/config/frv/ulltof.c ! 946276139b ./gcc/config/frv/umodi.c ! 3517594189b ./gcc/config.gcc ! 2184744613b ./gcc/config/gnu.h ! 2188992916b ./gcc/config/gofast.h ! 1315260558b ./gcc/config.guess ! 2135233002b ./gcc/config/h8300/crti.asm 3919963794b ./gcc/config/h8300/crtn.asm ! 367022637b ./gcc/config/h8300/elf.h ! 4087866448b ./gcc/config/h8300/fixunssfsi.c ! 913149092b ./gcc/config/h8300/h8300.c ! 2515220433b ./gcc/config/h8300/h8300.h ! 3672026458b ./gcc/config/h8300/h8300.md ! 2922330864b ./gcc/config/h8300/h8300-protos.h ! 1484792841b ./gcc/config/h8300/lib1funcs.asm ! 186420544b ./gcc/config/h8300/rtems.h 2094865057b ./gcc/config/h8300/t-elf ! 3777445358b ./gcc/config/h8300/t-h8300 ! 273465087b ./gcc/config/i370/i370.c ! 4183152766b ./gcc/config/i370/i370-c.c ! 2997303532b ./gcc/config/i370/i370.h 4214408308b ./gcc/config/i370/i370.md ! 2357921251b ./gcc/config/i370/i370-protos.h ! 577722511b ./gcc/config/i370/linux.h ! 191137681b ./gcc/config/i370/mvs.h ! 3293906116b ./gcc/config/i370/oe.h ! 2187046003b ./gcc/config/i370/README ! 1034372910b ./gcc/config/i370/t-i370 1100145942b ./gcc/config/i370/t-oe ! 2939308789b ./gcc/config/i386/athlon.md ! 3863347282b ./gcc/config/i386/att.h ! 2364445438b ./gcc/config/i386/beos-elf.h ! 3766713138b ./gcc/config/i386/biarch64.h ! 1477481609b ./gcc/config/i386/bsd.h ! 1364240360b ./gcc/config/i386/crtdll.h 4293145615b ./gcc/config/i386/cygwin.asm ! 349707370b ./gcc/config/i386/cygwin.h ! 2056477512b ./gcc/config/i386/darwin.h ! 3027724798b ./gcc/config/i386/djgpp.h ! 3229457143b ./gcc/config/i386/freebsd64.h ! 1846061297b ./gcc/config/i386/freebsd-aout.h ! 3806924135b ./gcc/config/i386/freebsd.h ! 1581335257b ./gcc/config/i386/gas.h 4266288971b ./gcc/config/i386/gmon-sol2.c ! 2242373399b ./gcc/config/i386/gnu.h ! 240648641b ./gcc/config/i386/gstabs.h ! 1164209646b ./gcc/config/i386/gthr-win32.c ! 3155216183b ./gcc/config/i386/i386-aout.h ! 1188932239b ./gcc/config/i386/i386.c ! 2124176398b ./gcc/config/i386/i386-coff.h ! 3652974168b ./gcc/config/i386/i386elf.h ! 4285636955b ./gcc/config/i386/i386.h ! 1579586996b ./gcc/config/i386/i386-interix3.h ! 1295044612b ./gcc/config/i386/i386-interix.h ! 895455062b ./gcc/config/i386/i386.md ! 1349730319b ./gcc/config/i386/i386-modes.def ! 2762729523b ./gcc/config/i386/i386-protos.h ! 3010218896b ./gcc/config/i386/k6.md 877642037b ./gcc/config/i386/libgcc-x86_64-glibc.ver ! 398104951b ./gcc/config/i386/linux64.h ! 2740762784b ./gcc/config/i386/linux-aout.h ! 3496202642b ./gcc/config/i386/linux.h ! 4257006542b ./gcc/config/i386/lynx.h ! 2085036314b ./gcc/config/i386/lynx-ng.h ! 720171487b ./gcc/config/i386/mach.h ! 2356303309b ./gcc/config/i386/mingw32.h ! 1934170596b ./gcc/config/i386/mmintrin.h ! 2276904589b ./gcc/config/i386/moss.h ! 1802874307b ./gcc/config/i386/netbsd64.h ! 1701064821b ./gcc/config/i386/netbsd-elf.h ! 4058916110b ./gcc/config/i386/netbsd.h ! 3368473133b ./gcc/config/i386/netware.h ! 1680355485b ./gcc/config/i386/openbsd.h ! 3736205979b ./gcc/config/i386/pentium.md ! 3476241273b ./gcc/config/i386/ppro.md ! 1986050166b ./gcc/config/i386/ptx4-i.h ! 574801934b ./gcc/config/i386/rtemself.h ! 2639545373b ./gcc/config/i386/sco5.h 425477609b ./gcc/config/i386/sol2-c1.asm 1565106149b ./gcc/config/i386/sol2-ci.asm 4008317666b ./gcc/config/i386/sol2-cn.asm 2045686122b ./gcc/config/i386/sol2-gc1.asm ! 1534089268b ./gcc/config/i386/sol2.h ! 2491384943b ./gcc/config/i386/svr3dbx.h ! 4076081204b ./gcc/config/i386/svr3gas.h 3846064431b ./gcc/config/i386/svr3.ifile 1523044645b ./gcc/config/i386/svr3z.ifile ! 139630777b ./gcc/config/i386/sysv3.h ! 1152040164b ./gcc/config/i386/sysv4-cpp.h ! 1378936193b ./gcc/config/i386/sysv4.h ! 3004666215b ./gcc/config/i386/sysv5.h 3914733738b ./gcc/config/i386/t-beos 2437302600b ./gcc/config/i386/t-crtpic 2246944266b ./gcc/config/i386/t-crtstuff ! 687615070b ./gcc/config/i386/t-cygwin 2902972689b ./gcc/config/i386/t-djgpp 537671296b ./gcc/config/i386/t-i386elf ! 2564210106b ./gcc/config/i386/t-interix ! 3660907309b ./gcc/config/i386/t-linux64 ! 160014998b ./gcc/config/i386/t-mingw32 92801654b ./gcc/config/i386/t-netware 709063989b ./gcc/config/i386/t-openbsd 422823583b ./gcc/config/i386/t-rtems-i386 1649755892b ./gcc/config/i386/t-sco5 ! 1098748916b ./gcc/config/i386/t-sco5gas 2786912378b ./gcc/config/i386/t-sol2 3128852740b ./gcc/config/i386/t-svr3dbx 2977164768b ./gcc/config/i386/t-udk 1023926647b ./gcc/config/i386/t-uwin 1775100101b ./gcc/config/i386/udk.h ! 3322583387b ./gcc/config/i386/unix.h 2798938994b ./gcc/config/i386/uwin.asm ! 131643872b ./gcc/config/i386/uwin.h ! 3582201266b ./gcc/config/i386/vsta.h ! 2708017943b ./gcc/config/i386/vxi386.h ! 1855791963b ./gcc/config/i386/win32.h ! 3975004312b ./gcc/config/i386/winnt.c ! 239023222b ./gcc/config/i386/x86-64.h 1690208514b ./gcc/config/i386/xm-cygwin.h 3902343879b ./gcc/config/i386/xm-djgpp.h 3631826497b ./gcc/config/i386/xm-i386-interix.h 92688945b ./gcc/config/i386/xm-mingw32.h ! 2685510744b ./gcc/config/i386/xmmintrin.h ! 3684275717b ./gcc/config/i386/xm-vsta.h ! 1340742553b ./gcc/config/i960/i960.c ! 3455814797b ./gcc/config/i960/i960-c.c 3384279950b ./gcc/config/i960/i960-coff.h ! 283530641b ./gcc/config/i960/i960.h ! 3878035903b ./gcc/config/i960/i960.md ! 1168116397b ./gcc/config/i960/i960-modes.def ! 2301317945b ./gcc/config/i960/i960-protos.h 1281966645b ./gcc/config/i960/rtems.h ! 2106185496b ./gcc/config/i960/t-960bare ! 3631800738b ./gcc/config/i960/t-vxworks960 3103531078b ./gcc/config/i960/vx960-coff.h 1895495318b ./gcc/config/i960/vx960.h ! 2397709646b ./gcc/config/ia64/aix.h ! 2620377854b ./gcc/config/ia64/crtbegin.asm ! 772692470b ./gcc/config/ia64/crtend.asm 281392077b ./gcc/config/ia64/crtfastmath.c 3128441059b ./gcc/config/ia64/crti.asm 3161585686b ./gcc/config/ia64/crtn.asm ! 1650540400b ./gcc/config/ia64/elf.h 2446839914b ./gcc/config/ia64/fde-glibc.c ! 2020318486b ./gcc/config/ia64/freebsd.h ! 1838314585b ./gcc/config/ia64/hpux.h ! 3568056609b ./gcc/config/ia64/hpux_longdouble.h ! 2684116176b ./gcc/config/ia64/ia64.c ! 1964471896b ./gcc/config/ia64/ia64-c.c ! 201253163b ./gcc/config/ia64/ia64.h 511545686b ./gcc/config/ia64/ia64intrin.h + 1780990922b ./gcc/config/ia64/ia64.md + 342783782b ./gcc/config/ia64/ia64-modes.def + 2015129861b ./gcc/config/ia64/ia64-protos.h 3488320870b ./gcc/config/ia64/lib1funcs.asm 2361471520b ./gcc/config/ia64/libgcc-ia64.ver ! 3882388711b ./gcc/config/ia64/linux.h ! 3940638341b ./gcc/config/ia64/quadlib.c ! 4206796904b ./gcc/config/ia64/sysv4.h ! 3165145488b ./gcc/config/ia64/t-aix 2148782144b ./gcc/config/ia64/t-glibc ! 1051208108b ./gcc/config/ia64/t-hpux ! 2350931219b ./gcc/config/ia64/t-ia64 2759923269b ./gcc/config/ia64/unwind-aix.c ! 565440965b ./gcc/config/ia64/unwind-ia64.c 2355075302b ./gcc/config/ia64/unwind-ia64.h ! 1042200183b ./gcc/config.in 3221870490b ./gcc/config/interix3.h + 782966245b ./gcc/config/interix.h + 1877317600b ./gcc/config/ip2k/crt0.S + 2273505501b ./gcc/config/ip2k/ip2k.c + 379096003b ./gcc/config/ip2k/ip2k.h + 3634264842b ./gcc/config/ip2k/ip2k.md + 2278252724b ./gcc/config/ip2k/ip2k-protos.h + 3381820128b ./gcc/config/ip2k/libgcc.S + 3899189512b ./gcc/config/ip2k/t-ip2k 3774321010b ./gcc/config/libgcc-glibc.ver ! 431681775b ./gcc/config/libgloss.h ! 1132125030b ./gcc/config/linux-aout.h ! 3792279926b ./gcc/config/linux.h ! 836960090b ./gcc/config/lynx.h ! 1696444785b ./gcc/config/lynx-ng.h 2460604231b ./gcc/config/m32r/initfini.c ! 2654083948b ./gcc/config/m32r/m32r.c ! 2114240739b ./gcc/config/m32r/m32r.h ! 3502142620b ./gcc/config/m32r/m32r.md ! 822298781b ./gcc/config/m32r/m32r-protos.h 3043182144b ./gcc/config/m32r/t-m32r ! 2563624329b ./gcc/config/m68hc11/larith.asm ! 3705868201b ./gcc/config/m68hc11/m68hc11.c ! 763404077b ./gcc/config/m68hc11/m68hc11-crt0.S ! 3244730436b ./gcc/config/m68hc11/m68hc11.h ! 2108112324b ./gcc/config/m68hc11/m68hc11.md ! 3203494610b ./gcc/config/m68hc11/m68hc11-protos.h ! 900567272b ./gcc/config/m68hc11/m68hc12.h ! 4223184266b ./gcc/config/m68hc11/t-m68hc11-gas ! 4152566641b ./gcc/config/m68k/3b1g.h ! 950165799b ./gcc/config/m68k/3b1.h ! 3699861513b ./gcc/config/m68k/amix.h ! 407639156b ./gcc/config/m68k/atari.h ! 2332207756b ./gcc/config/m68k/ccur-GAS.h ! 3538569647b ./gcc/config/m68k/coff.h ! 4282280342b ./gcc/config/m68k/crds.h 1173190318b ./gcc/config/m68k/crti.s 4181788584b ./gcc/config/m68k/crtn.s 2518640661b ./gcc/config/m68k/fpgnulib.c ! 835972293b ./gcc/config/m68k/hp2bsd.h ! 2008864906b ./gcc/config/m68k/hp310g.h ! 2184215546b ./gcc/config/m68k/hp310.h ! 2880102244b ./gcc/config/m68k/hp320g.h ! 3937265644b ./gcc/config/m68k/hp320.h ! 724663990b ./gcc/config/m68k/hp3bsd44.h ! 2670392370b ./gcc/config/m68k/hp3bsd.h 2864047424b ./gcc/config/m68k/hpux7.h 704862081b ./gcc/config/m68k/lb1sf68.asm ! 1561647958b ./gcc/config/m68k/linux-aout.h ! 753548289b ./gcc/config/m68k/linux.h 3379792683b ./gcc/config/m68k/m68020-elf.h ! 1327537006b ./gcc/config/m68k/m68k-aout.h ! 903011620b ./gcc/config/m68k/m68k.c 3882947461b ./gcc/config/m68k/m68k-coff.h + 2319834314b ./gcc/config/m68k/m68kelf.h + 1120822994b ./gcc/config/m68k/m68kemb.h + 2362160659b ./gcc/config/m68k/m68k.h + 3197983518b ./gcc/config/m68k/m68k.md 3855098247b ./gcc/config/m68k/m68k-none.h ! 3524361138b ./gcc/config/m68k/m68k-protos.h 1109594909b ./gcc/config/m68k/m68k-psos.h ! 2697287693b ./gcc/config/m68k/m68kv4.h 3047408322b ./gcc/config/m68k/math-68881.h 1902334218b ./gcc/config/m68k/mot3300-crt0.S ! 2775795386b ./gcc/config/m68k/mot3300.h 4250921257b ./gcc/config/m68k/mot3300Mcrt0.S ! 1309474383b ./gcc/config/m68k/netbsd-elf.h ! 159463439b ./gcc/config/m68k/netbsd.h ! 3848231446b ./gcc/config/m68k/openbsd.h ! 59313537b ./gcc/config/m68k/pbb.h ! 3241576474b ./gcc/config/m68k/plexus.h 3840336856b ./gcc/config/m68k/rtemself.h 2246845695b ./gcc/config/m68k/sgs.h ! 2416349863b ./gcc/config/m68k/sun2.h ! 2831407670b ./gcc/config/m68k/sun2o4.h ! 1923166176b ./gcc/config/m68k/sun3.h 3724598161b ./gcc/config/m68k/sun3mach.h 864417723b ./gcc/config/m68k/sun3n3.h + 120628064b ./gcc/config/m68k/sun3n.h 2298299278b ./gcc/config/m68k/sun3o3.h 2957852228b ./gcc/config/m68k/t-crtstuff 1845413337b ./gcc/config/m68k/t-hp320 1601671577b ./gcc/config/m68k/t-linux 1601671577b ./gcc/config/m68k/t-linux-aout 591505405b ./gcc/config/m68k/t-m68kbare 1376927127b ./gcc/config/m68k/t-m68kelf 2312371323b ./gcc/config/m68k/t-mot3300 1278563328b ./gcc/config/m68k/t-mot3300-gald 505153656b ./gcc/config/m68k/t-mot3300-gas 2294965883b ./gcc/config/m68k/t-mot3300-gld 3937644742b ./gcc/config/m68k/t-openbsd ! 888720875b ./gcc/config/m68k/tower-as.h 2265492461b ./gcc/config/m68k/tower.h ! 2710264317b ./gcc/config/m68k/t-vxworks68 ! 1353236462b ./gcc/config/m68k/vxm68k.h ! 1448728884b ./gcc/config/m88k/aout-dbx.h ! 814579860b ./gcc/config/m88k/m88k-aout.h ! 2923906961b ./gcc/config/m88k/m88k.c ! 3578315082b ./gcc/config/m88k/m88k.h ! 1160618394b ./gcc/config/m88k/m88k.md ! 2226816021b ./gcc/config/m88k/m88k-modes.def ! 2517732507b ./gcc/config/m88k/m88k-move.sh ! 491055328b ./gcc/config/m88k/m88k-protos.h ! 2690751438b ./gcc/config/m88k/openbsd.h 2064243939b ./gcc/config/m88k/sysv4.h 2294317049b ./gcc/config/m88k/t-luna 3352809625b ./gcc/config/m88k/t-luna-gas 1952601632b ./gcc/config/m88k/t-m88k 3580877409b ./gcc/config/m88k/t-sysv4 4057462442b ./gcc/config/mcore/crti.asm 3021138350b ./gcc/config/mcore/crtn.asm 3514021936b ./gcc/config/mcore/gfloat.h 3510059529b ./gcc/config/mcore/lib1.asm ! 3015468298b ./gcc/config/mcore/mcore.c ! 3525073614b ./gcc/config/mcore/mcore-elf.h ! 1860330775b ./gcc/config/mcore/mcore.h ! 940845277b ./gcc/config/mcore/mcore.md ! 3932339189b ./gcc/config/mcore/mcore-pe.h ! 1929010568b ./gcc/config/mcore/mcore-protos.h 1343396749b ./gcc/config/mcore/t-mcore ! 3157111889b ./gcc/config/mcore/t-mcore-pe ! 526658279b ./gcc/config/mips/5400.md ! 3343843219b ./gcc/config/mips/5500.md 930726788b ./gcc/config/mips/cross64.h 1227388398b ./gcc/config/mips/crti.asm ! 184329613b ./gcc/config/mips/crtn.asm ! 489357128b ./gcc/config/mips/elf64.h ! 1664872088b ./gcc/config/mips/elf.h 4210328521b ./gcc/config/mips/elforion.h ! 2770872793b ./gcc/config/mips/iris3.h 3161243087b ./gcc/config/mips/iris4.h ! 3486411214b ./gcc/config/mips/iris5gas.h ! 1890953057b ./gcc/config/mips/iris5.h ! 1743286067b ./gcc/config/mips/iris6gld.h ! 3983539867b ./gcc/config/mips/iris6.h ! 1379341701b ./gcc/config/mips/iris6-o32-as.h ! 1057753556b ./gcc/config/mips/iris6-o32-gas.h ! 4117356108b ./gcc/config/mips/iris6-o32.h 3658812670b ./gcc/config/mips/irix6-libc-compat.c ! 4097126978b ./gcc/config/mips/linux.h 2024693888b ./gcc/config/mips/mips16.S ! 2422307607b ./gcc/config/mips/mips.c ! 1349204957b ./gcc/config/mips/mips.h ! 339950479b ./gcc/config/mips/mips.md ! 4197939422b ./gcc/config/mips/mips-protos.h ! 405403345b ./gcc/config/mips/netbsd.h 391873849b ./gcc/config/mips/openbsd-be.h ! 3247383226b ./gcc/config/mips/openbsd.h ! 513268154b ./gcc/config/mips/r3900.h ! 1571389171b ./gcc/config/mips/rtems64.h ! 1600925076b ./gcc/config/mips/rtems.h ! 1275620168b ./gcc/config/mips/sni-gas.h ! 3908832052b ./gcc/config/mips/sni-svr4.h ! 215042761b ./gcc/config/mips/sr71k.md 3044783963b ./gcc/config/mips/t-cross64 ! 3731674899b ./gcc/config/mips/t-ecoff ! 2711887540b ./gcc/config/mips/t-elf ! 2701118387b ./gcc/config/mips/t-gofast ! 373382813b ./gcc/config/mips/_tilib.c 2896429436b ./gcc/config/mips/t-iris ! 3150583838b ./gcc/config/mips/t-iris5-6 ! 2253279697b ./gcc/config/mips/t-iris5-as ! 3014318451b ./gcc/config/mips/t-iris5-gas ! 2109099706b ./gcc/config/mips/t-iris6 ! 1205295560b ./gcc/config/mips/t-isa3264 ! 382304214b ./gcc/config/mips/t-mips ! 4201375008b ./gcc/config/mips/t-r3900 ! 2079451253b ./gcc/config/mips/t-sr71k ! 550681837b ./gcc/config/mips/t-vr ! 568075896b ./gcc/config/mips/vr.h ! 2899676500b ./gcc/config/mips/vxworks.h 3454112118b ./gcc/config/mips/xm-iris5.h 1256346916b ./gcc/config/mmix/crti.asm 4149276856b ./gcc/config/mmix/crtn.asm ! 3056375389b ./gcc/config/mmix/mmix.c ! 2979287903b ./gcc/config/mmix/mmix.h ! 2332454758b ./gcc/config/mmix/mmix.md ! 3695780430b ./gcc/config/mmix/mmix-modes.def ! 1739297186b ./gcc/config/mmix/mmix-protos.h ! 2544911756b ./gcc/config/mmix/t-mmix 38698671b ./gcc/config/mn10200/lib1funcs.asm ! 3768163681b ./gcc/config/mn10200/mn10200.c ! 1348550779b ./gcc/config/mn10200/mn10200.h 1601326717b ./gcc/config/mn10200/mn10200.md + 4029388596b ./gcc/config/mn10200/mn10200-protos.h 2767557893b ./gcc/config/mn10200/t-mn10200 ! 278523869b ./gcc/config/mn10300/mn10300.c ! 1667691994b ./gcc/config/mn10300/mn10300.h ! 3287195528b ./gcc/config/mn10300/mn10300.md ! 1573606752b ./gcc/config/mn10300/mn10300-protos.h 3295955402b ./gcc/config/mn10300/t-mn10300 ! 3492004077b ./gcc/config/netbsd-aout.h ! 2406981515b ./gcc/config/netbsd-elf.h ! 1701673410b ./gcc/config/netbsd.h ! 621398283b ./gcc/config/netware.h ! 3408818866b ./gcc/config/ns32k/netbsd.h ! 1927659146b ./gcc/config/ns32k/ns32k.c ! 406227706b ./gcc/config/ns32k/ns32k.h ! 1692887503b ./gcc/config/ns32k/ns32k.md 1708247420b ./gcc/config/ns32k/ns32k-protos.h ! 4229357330b ./gcc/config/ns32k/t-ns32k ! 1380708403b ./gcc/config/ns32k/__unorddf2.c ! 4035660070b ./gcc/config/ns32k/__unordsf2.c ! 4192993745b ./gcc/config/openbsd.h ! 3737584717b ./gcc/config/openbsd-oldgas.h ! 481445295b ./gcc/config/pa/elf.h ! 2599819123b ./gcc/config/pa/fptr.c 454965220b ./gcc/config/pa/lib2funcs.asm ! 3163635737b ./gcc/config/pa/long_double.h ! 3050906604b ./gcc/config/pa/milli64.S ! 2968109913b ./gcc/config/pa/pa32-linux.h ! 4077989132b ./gcc/config/pa/pa32-regs.h ! 1229145373b ./gcc/config/pa/pa-64.h ! 3956852599b ./gcc/config/pa/pa64-hpux.h ! 2920878761b ./gcc/config/pa/pa64-linux.h ! 653142328b ./gcc/config/pa/pa64-regs.h ! 3813586304b ./gcc/config/pa/pa64-start.h ! 1456283762b ./gcc/config/pa/pa.c ! 606429816b ./gcc/config/pa/pa.h ! 3786607524b ./gcc/config/pa/pa-hiux.h ! 4284123246b ./gcc/config/pa/pa-hpux10.h ! 1075128895b ./gcc/config/pa/pa-hpux11.h ! 1833709162b ./gcc/config/pa/pa-hpux7.h 3124002443b ./gcc/config/pa/pa-hpux9.h ! 4187284900b ./gcc/config/pa/pa-hpux.h ! 469628573b ./gcc/config/pa/pa-linux.h ! 2148016812b ./gcc/config/pa/pa.md ! 1508149926b ./gcc/config/pa/pa-modes.def 3618123809b ./gcc/config/pa/pa-oldas.h ! 2438052750b ./gcc/config/pa/pa-osf.h ! 1438700001b ./gcc/config/pa/pa-pro-end.h ! 2077118199b ./gcc/config/pa/pa-protos.h ! 710975505b ./gcc/config/pa/quadlib.c ! 232001645b ./gcc/config/pa/rtems.h ! 4119006164b ./gcc/config/pa/som.h 299977776b ./gcc/config/pa/t-bsd 1117935804b ./gcc/config/pa/t-dce-thr 1373645832b ./gcc/config/pa/t-hpux-shlib ! 3282884143b ./gcc/config/pa/t-linux 3127053933b ./gcc/config/pa/t-linux64 1211178790b ./gcc/config/pa/t-mpeix 3597581162b ./gcc/config/pa/t-pa + 4115616919b ./gcc/config/pa/t-pa64 2754633370b ./gcc/config/pa/t-pa-hpux 817714064b ./gcc/config/pa/t-pro ! 2014893074b ./gcc/config/pa/x-ada 4118902235b ./gcc/config/pdp11/2bsd.h + 4146554778b ./gcc/config/pdp11/pdp11.c + 3331219601b ./gcc/config/pdp11/pdp11.h + 205132985b ./gcc/config/pdp11/pdp11.md + 2255762635b ./gcc/config/pdp11/pdp11-modes.def 1678731791b ./gcc/config/pdp11/pdp11-protos.h ! 2346269274b ./gcc/config/pdp11/t-pdp11 ! 1282778420b ./gcc/config/psos.h ! 1534158272b ./gcc/config/ptx4.h ! 3917072699b ./gcc/config/README ! 4279253212b ./gcc/config/romp/romp.c ! 4167579613b ./gcc/config/romp/romp.h 4096557609b ./gcc/config/romp/romp.md ! 1229374838b ./gcc/config/romp/romp-protos.h ! 3436640225b ./gcc/config/rs6000/aix31.h 2741987967b ./gcc/config/rs6000/aix3newas.h ! 2369811082b ./gcc/config/rs6000/aix41.h ! 3414143559b ./gcc/config/rs6000/aix43.h ! 4162957869b ./gcc/config/rs6000/aix51.h ! 3058334962b ./gcc/config/rs6000/aix52.h ! 4220070344b ./gcc/config/rs6000/aix.h 1953946692b ./gcc/config/rs6000/altivec-defs.h ! 1917820999b ./gcc/config/rs6000/altivec.h ! 3171179683b ./gcc/config/rs6000/altivec.md ! 944517579b ./gcc/config/rs6000/beos.h 511519789b ./gcc/config/rs6000/crtsavres.asm + 1250348227b ./gcc/config/rs6000/darwin.h 3983537248b ./gcc/config/rs6000/darwin-tramp.asm ! 2850637315b ./gcc/config/rs6000/eabiaix.h ! 1991998428b ./gcc/config/rs6000/eabialtivec.h ! 1237235856b ./gcc/config/rs6000/eabi.asm 383867253b ./gcc/config/rs6000/eabi-ci.asm 3758141774b ./gcc/config/rs6000/eabi-cn.asm ! 3857080442b ./gcc/config/rs6000/eabi.h ! 2914196204b ./gcc/config/rs6000/eabisim.h ! 3977992822b ./gcc/config/rs6000/eabispe.h ! 2165084479b ./gcc/config/rs6000/freebsd.h ! 977386394b ./gcc/config/rs6000/gnu.h ! 839639747b ./gcc/config/rs6000/linux64.h 1351560312b ./gcc/config/rs6000/linuxaltivec.h ! 2981880866b ./gcc/config/rs6000/linux.h ! 1826004816b ./gcc/config/rs6000/lynx.h ! 662544262b ./gcc/config/rs6000/mach.h 1820610909b ./gcc/config/rs6000/milli.exp ! 3596315410b ./gcc/config/rs6000/netbsd.h ! 1801910688b ./gcc/config/rs6000/ppc64-fp.c ! 1765497648b ./gcc/config/rs6000/ppc-asm.h ! 3967595220b ./gcc/config/rs6000/rs6000.c ! 1345436052b ./gcc/config/rs6000/rs6000-c.c ! 1341641968b ./gcc/config/rs6000/rs6000.h ! 3478574407b ./gcc/config/rs6000/rs6000.md ! 3173719444b ./gcc/config/rs6000/rs6000-modes.def ! 1035564344b ./gcc/config/rs6000/rs6000-protos.h ! 255651415b ./gcc/config/rs6000/rtems.h 3703627966b ./gcc/config/rs6000/sol-ci.asm 3016810975b ./gcc/config/rs6000/sol-cn.asm ! 1152541462b ./gcc/config/rs6000/spe.h ! 1909067452b ./gcc/config/rs6000/spe.md ! 3923502058b ./gcc/config/rs6000/sysv4.h ! 1653865007b ./gcc/config/rs6000/sysv4le.h ! 2203981804b ./gcc/config/rs6000/t-aix43 ! 4039940345b ./gcc/config/rs6000/t-aix52 2042460673b ./gcc/config/rs6000/t-beos ! 559918584b ./gcc/config/rs6000/t-darwin ! 3572504369b ./gcc/config/rs6000/t-linux64 ! 3305727912b ./gcc/config/rs6000/t-netbsd 4049449059b ./gcc/config/rs6000/t-newas ! 564904179b ./gcc/config/rs6000/t-ppccomm ! 3571256406b ./gcc/config/rs6000/t-ppcendian 365048301b ./gcc/config/rs6000/t-ppcgas 3552141086b ./gcc/config/rs6000/t-ppcos + 85679922b ./gcc/config/rs6000/tramp.asm 946774617b ./gcc/config/rs6000/t-rs6000 + 174540514b ./gcc/config/rs6000/t-rs6000-c-rule 3304625655b ./gcc/config/rs6000/t-rtems ! 2873364089b ./gcc/config/rs6000/vxppc.h ! 1708069305b ./gcc/config/rs6000/windiss.h ! 1783558965b ./gcc/config/rs6000/xcoff.h 1142085470b ./gcc/config/rtems.h ! 3459519933b ./gcc/config/s390/fixdfdi.h ! 1186498086b ./gcc/config/s390/libgcc-glibc.ver ! 3967953893b ./gcc/config/s390/linux.h ! 150987911b ./gcc/config/s390/s390.c ! 896790375b ./gcc/config/s390/s390.h ! 3098658297b ./gcc/config/s390/s390.md ! 3010749633b ./gcc/config/s390/s390-modes.def ! 3745468972b ./gcc/config/s390/s390-protos.h 3998835120b ./gcc/config/s390/s390x.h ! 2119089207b ./gcc/config/s390/t-crtstuff ! 4260873024b ./gcc/config/s390/t-linux64 ! 390527827b ./gcc/config/sh/coff.h ! 2847540782b ./gcc/config/sh/crt1.asm 643557115b ./gcc/config/sh/crti.asm 567573801b ./gcc/config/sh/crtn.asm ! 3224910313b ./gcc/config/sh/elf.h ! 1949707998b ./gcc/config/sh/embed-elf.h ! 2071066204b ./gcc/config/sh/lib1funcs.asm ! 3563454360b ./gcc/config/sh/linux.h ! 3434577439b ./gcc/config/sh/little.h ! 3344891430b ./gcc/config/sh/netbsd-elf.h 2022181827b ./gcc/config/sh/rtemself.h ! 1498631144b ./gcc/config/sh/rtems.h ! 2384035668b ./gcc/config/sh/sh64.h ! 62784863b ./gcc/config/sh/sh.c ! 818613438b ./gcc/config/sh/sh.h ! 47786791b ./gcc/config/sh/sh.md 3656510246b ./gcc/config/sh/shmedia.h + 2501796428b ./gcc/config/sh/sh-protos.h 4192915538b ./gcc/config/sh/sshmedia.h + 549411496b ./gcc/config/sh/t-be 3555569248b ./gcc/config/sh/t-elf ! 1397704314b ./gcc/config/sh/t-le ! 1189073761b ./gcc/config/sh/t-linux ! 2944701435b ./gcc/config/sh/t-monolib ! 2090927389b ./gcc/config/sh/t-netbsd ! 448959963b ./gcc/config/sh/t-netbsd-sh5 ! 2118450283b ./gcc/config/sh/t-netbsd-sh5-64 ! 441324574b ./gcc/config/sh/t-sh ! 3415403265b ./gcc/config/sh/t-sh64 2893164163b ./gcc/config/sh/ushmedia.h ! 2207860794b ./gcc/config/sol2.h ! 103179472b ./gcc/config/sparc/aout.h 3461838008b ./gcc/config/sparc/biarch64.h 1386942151b ./gcc/config/sparc/bsd.h 1479022830b ./gcc/config/sparc/crtfastmath.c + 1419363945b ./gcc/config/sparc/cypress.md 54964474b ./gcc/config/sparc/elf.h ! 259269668b ./gcc/config/sparc/freebsd.h ! 1390270186b ./gcc/config/sparc/gmon-sol2.c 3746795534b ./gcc/config/sparc/hal.h ! 3138252280b ./gcc/config/sparc/hypersparc.md ! 2939495704b ./gcc/config/sparc/lb1spc.asm ! 1395104248b ./gcc/config/sparc/lb1spl.asm 1761187951b ./gcc/config/sparc/libgcc-sparc-glibc.ver ! 358368202b ./gcc/config/sparc/linux64.h ! 34002579b ./gcc/config/sparc/linux-aout.h ! 1478480193b ./gcc/config/sparc/linux.h ! 1314010724b ./gcc/config/sparc/litecoff.h ! 2270102558b ./gcc/config/sparc/liteelf.h 2424336991b ./gcc/config/sparc/lite.h ! 4235090054b ./gcc/config/sparc/lynx.h 2334021382b ./gcc/config/sparc/lynx-ng.h ! 2980510703b ./gcc/config/sparc/netbsd-elf.h ! 480283694b ./gcc/config/sparc/netbsd.h 1122827784b ./gcc/config/sparc/openbsd1-64.h 1977030271b ./gcc/config/sparc/openbsd64.h ! 3160524574b ./gcc/config/sparc/openbsd.h ! 1553479245b ./gcc/config/sparc/pbd.h 2243601282b ./gcc/config/sparc/rtemself.h 1579903847b ./gcc/config/sparc/sol2-64.h ! 3203477114b ./gcc/config/sparc/sol26-sld.h ! 1333200498b ./gcc/config/sparc/sol2-bi.h 1463670426b ./gcc/config/sparc/sol2-c1.asm 3288323690b ./gcc/config/sparc/sol2-ci.asm 2004370404b ./gcc/config/sparc/sol2-cn.asm 878755050b ./gcc/config/sparc/sol2-gas-bi.h 3173831404b ./gcc/config/sparc/sol2-gld-bi.h 4206582763b ./gcc/config/sparc/sol2-gld.h ! 1852489434b ./gcc/config/sparc/sol2.h 3918002150b ./gcc/config/sparc/sp64-aout.h ! 3549760155b ./gcc/config/sparc/sp64-elf.h 3128199560b ./gcc/config/sparc/sp86x-aout.h ! 632930923b ./gcc/config/sparc/sp86x-elf.h ! 1534370950b ./gcc/config/sparc/sparc.c ! 982764506b ./gcc/config/sparc/sparc.h ! 113806067b ./gcc/config/sparc/sparclet.md ! 1556034331b ./gcc/config/sparc/sparc.md ! 5497380b ./gcc/config/sparc/sparc-modes.def ! 2593826026b ./gcc/config/sparc/sparc-protos.h 842964351b ./gcc/config/sparc/splet.h 952337645b ./gcc/config/sparc/sun4gas.h 1795303911b ./gcc/config/sparc/sun4o3.h ! 602629919b ./gcc/config/sparc/sunos4.h ! 2316107629b ./gcc/config/sparc/supersparc.md ! 2995591816b ./gcc/config/sparc/sysv4.h 2782836992b ./gcc/config/sparc/t-chorus-elf 2056024669b ./gcc/config/sparc/t-crtfm 3744055768b ./gcc/config/sparc/t-elf *************** *** 2625,2653 **** 1776401931b ./gcc/config/sparc/t-sunos41 3082115393b ./gcc/config/sparc/t-vxsparc 3638105138b ./gcc/config/sparc/t-vxsparc64 ! 2444638453b ./gcc/config/sparc/vxsim.h 1610820992b ./gcc/config/sparc/vxsparc.h ! 3450727705b ./gcc/config/sparc/vxsparc64.h ! 1002673818b ./gcc/config/stormy16/stormy-abi 4011003560b ./gcc/config/stormy16/stormy16-lib2.c ! 2190947530b ./gcc/config/stormy16/stormy16-protos.h ! 1548984109b ./gcc/config/stormy16/stormy16.c ! 3776989782b ./gcc/config/stormy16/stormy16.h ! 552174638b ./gcc/config/stormy16/stormy16.md 3561720924b ./gcc/config/stormy16/t-stormy16 ! 2159505844b ./gcc/config/svr3.h ! 4237693824b ./gcc/config/svr4.h 2749923948b ./gcc/config/t-freebsd 3853732254b ./gcc/config/t-freebsd-thread 2512129728b ./gcc/config/t-gnu - 3050012299b ./gcc/config/t-install-cpp 825269638b ./gcc/config/t-interix ! 1047761087b ./gcc/config/t-libc-ok 2753685882b ./gcc/config/t-libgcc-pic ! 2712900964b ./gcc/config/t-linux 825269638b ./gcc/config/t-linux-aout 3205817010b ./gcc/config/t-linux-gnulibc1 ! 825269638b ./gcc/config/t-netbsd 2903849127b ./gcc/config/t-openbsd 2917904648b ./gcc/config/t-openbsd-thread 2246241652b ./gcc/config/t-rtems --- 2515,2546 ---- 1776401931b ./gcc/config/sparc/t-sunos41 3082115393b ./gcc/config/sparc/t-vxsparc 3638105138b ./gcc/config/sparc/t-vxsparc64 ! 1090529931b ./gcc/config/sparc/ultra1_2.md ! 3616257275b ./gcc/config/sparc/ultra3.md ! 3193374968b ./gcc/config/sparc/vxsim.h ! 1659951640b ./gcc/config/sparc/vxsparc64.h 1610820992b ./gcc/config/sparc/vxsparc.h ! 777689939b ./gcc/config/stormy16/stormy16.c ! 684595050b ./gcc/config/stormy16/stormy16.h 4011003560b ./gcc/config/stormy16/stormy16-lib2.c ! 2715629841b ./gcc/config/stormy16/stormy16.md ! 2395767221b ./gcc/config/stormy16/stormy16-protos.h ! 4145515672b ./gcc/config/stormy16/stormy-abi 3561720924b ./gcc/config/stormy16/t-stormy16 ! 2525748108b ./gcc/config/svr3.h ! 2147853147b ./gcc/config/svr4.h ! 1924777742b ./gcc/config/t-darwin 2749923948b ./gcc/config/t-freebsd 3853732254b ./gcc/config/t-freebsd-thread 2512129728b ./gcc/config/t-gnu 825269638b ./gcc/config/t-interix ! 4174365071b ./gcc/config/t-libc-ok 2753685882b ./gcc/config/t-libgcc-pic ! 2087781149b ./gcc/config/t-linux 825269638b ./gcc/config/t-linux-aout 3205817010b ./gcc/config/t-linux-gnulibc1 ! 121353396b ./gcc/config/tm-dwarf2.h ! 3907753730b ./gcc/config/t-netbsd 2903849127b ./gcc/config/t-openbsd 2917904648b ./gcc/config/t-openbsd-thread 2246241652b ./gcc/config/t-rtems *************** *** 2655,3080 **** 2124668958b ./gcc/config/t-slibgcc-nolc-override 1087805219b ./gcc/config/t-slibgcc-sld 321200235b ./gcc/config/t-svr4 - 121353396b ./gcc/config/tm-dwarf2.h 937080303b ./gcc/config/udivmod.c 2590328114b ./gcc/config/udivmodsi4.c 1401546799b ./gcc/config/usegas.h ! 1330961877b ./gcc/config/v850/lib1funcs.asm 3345272584b ./gcc/config/v850/rtems.h ! 3046767615b ./gcc/config/v850/t-v850 ! 4072890677b ./gcc/config/v850/v850-c.c ! 1229280760b ./gcc/config/v850/v850-protos.h ! 2149356335b ./gcc/config/v850/v850.c ! 1028297694b ./gcc/config/v850/v850.h ! 2739963548b ./gcc/config/v850/v850.md ! 678831326b ./gcc/config/vax/netbsd.h ! 2993271330b ./gcc/config/vax/openbsd.h 3271953013b ./gcc/config/vax/openbsd1.h ! 1070068995b ./gcc/config/vax/ultrix.h ! 3894216269b ./gcc/config/vax/vax-protos.h ! 3091217209b ./gcc/config/vax/vax.c ! 3909127338b ./gcc/config/vax/vax.h ! 657520682b ./gcc/config/vax/vax.md ! 3118052779b ./gcc/config/vax/vaxv.h ! 1265968606b ./gcc/config/vax/vms.h 1260653442b ./gcc/config/vax/xm-vms.h - 2514844092b ./gcc/config/we32k/we32k-protos.h - 560039799b ./gcc/config/we32k/we32k.c - 423633273b ./gcc/config/we32k/we32k.h - 3169968881b ./gcc/config/we32k/we32k.md 2711497169b ./gcc/config/x-interix ! 1151914555b ./gcc/config/xtensa/elf.h 1027874511b ./gcc/config/xtensa/lib1funcs.asm ! 3621223618b ./gcc/config/xtensa/lib2funcs.S ! 2321639494b ./gcc/config/xtensa/linux.h ! 3617796239b ./gcc/config/xtensa/t-xtensa 2796950173b ./gcc/config/xtensa/xtensa-config.h ! 981915907b ./gcc/config/xtensa/xtensa-protos.h ! 62812165b ./gcc/config/xtensa/xtensa.c ! 507316486b ./gcc/config/xtensa/xtensa.h ! 1348387747b ./gcc/config/xtensa/xtensa.md ! 2019129276b ./gcc/configure ! 2239237249b ./gcc/configure.frag ! 862560733b ./gcc/configure.in ! 3382606314b ./gcc/conflict.c ! 2854418854b ./gcc/convert.c 2020855935b ./gcc/convert.h ! 1230086821b ./gcc/cp/.cvsignore ! 1795683420b ./gcc/cp/ChangeLog ! 2221404065b ./gcc/cp/ChangeLog.1 ! 2127340768b ./gcc/cp/ChangeLog.2 2546444747b ./gcc/cp/ChangeLog.egcs ! 2368698010b ./gcc/cp/Make-lang.in ! 1710026913b ./gcc/cp/NEWS ! 2088201374b ./gcc/cp/call.c ! 4115552602b ./gcc/cp/cfns.gperf ! 1705070232b ./gcc/cp/cfns.h ! 596844565b ./gcc/cp/class.c ! 1309293181b ./gcc/cp/config-lang.in ! 4084279121b ./gcc/cp/cp-lang.c ! 2928114977b ./gcc/cp/cp-tree.def ! 3545021760b ./gcc/cp/cp-tree.h ! 67222431b ./gcc/cp/cvt.c ! 3585342875b ./gcc/cp/decl.c ! 3040950596b ./gcc/cp/decl.h ! 952368203b ./gcc/cp/decl2.c ! 1503739344b ./gcc/cp/dump.c ! 3569782164b ./gcc/cp/error.c ! 197247511b ./gcc/cp/except.c ! 516514444b ./gcc/cp/expr.c ! 728682437b ./gcc/cp/friend.c 1574667259b ./gcc/cp/g++.1 ! 3180385434b ./gcc/cp/g++spec.c ! 4068824735b ./gcc/cp/init.c ! 3812650249b ./gcc/cp/lang-options.h ! 2714092533b ./gcc/cp/lang-specs.h ! 1945319355b ./gcc/cp/lex.c ! 2280147967b ./gcc/cp/lex.h ! 1932648807b ./gcc/cp/mangle.c ! 3212394829b ./gcc/cp/method.c ! 701335209b ./gcc/cp/mpw-config.in ! 4041177245b ./gcc/cp/mpw-make.sed ! 2349927434b ./gcc/cp/operators.def ! 622478745b ./gcc/cp/optimize.c ! 230679025b ./gcc/cp/parse.c ! 586236678b ./gcc/cp/parse.h ! 1544139953b ./gcc/cp/parse.y ! 534531070b ./gcc/cp/pt.c ! 1408553642b ./gcc/cp/ptree.c ! 3993964584b ./gcc/cp/repo.c ! 2834061289b ./gcc/cp/rtti.c ! 1987668761b ./gcc/cp/search.c ! 4064329742b ./gcc/cp/semantics.c ! 2648162646b ./gcc/cp/spew.c ! 3384697218b ./gcc/cp/tree.c ! 3946434476b ./gcc/cp/typeck.c ! 3217357018b ./gcc/cp/typeck2.c 1602205564b ./gcc/cppdefault.c ! 733799898b ./gcc/cppdefault.h ! 3582099799b ./gcc/cpperror.c ! 4072103215b ./gcc/cppexp.c ! 2221722550b ./gcc/cppfiles.c ! 2283152717b ./gcc/cpphash.c ! 3545195852b ./gcc/cpphash.h ! 2419669468b ./gcc/cppinit.c ! 201524367b ./gcc/cpplex.c ! 3879218858b ./gcc/cpplib.c ! 3414601474b ./gcc/cpplib.h ! 3518489790b ./gcc/cppmacro.c ! 2363485754b ./gcc/cppmain.c ! 3972345626b ./gcc/cppspec.c ! 2032357073b ./gcc/crtstuff.c ! 3365219033b ./gcc/cse.c ! 1706957017b ./gcc/cselib.c ! 3914093915b ./gcc/cselib.h 216805921b ./gcc/cstamp-h.in ! 2693493979b ./gcc/dbxout.c 2583180678b ./gcc/dbxout.h 1104788844b ./gcc/dbxstclass.h ! 2470087149b ./gcc/debug.c ! 178689220b ./gcc/debug.h ! 852153964b ./gcc/defaults.h ! 2369804086b ./gcc/dependence.c ! 2491556822b ./gcc/df.c ! 3792421516b ./gcc/df.h ! 1042165669b ./gcc/diagnostic.c ! 1311569781b ./gcc/diagnostic.def ! 4192732570b ./gcc/diagnostic.h ! 1471878644b ./gcc/doc/.cvsignore ! 23600501b ./gcc/doc/bugreport.texi ! 3813743019b ./gcc/doc/c-tree.texi ! 2815010075b ./gcc/doc/collect2.texi ! 3060436631b ./gcc/doc/compat.texi 2785243168b ./gcc/doc/configfiles.texi 3399730921b ./gcc/doc/configterms.texi ! 2163122922b ./gcc/doc/contrib.texi 2272556046b ./gcc/doc/contribute.texi ! 1535227762b ./gcc/doc/cpp.1 ! 1544384634b ./gcc/doc/cpp.info ! 757073472b ./gcc/doc/cpp.info-1 ! 3446855226b ./gcc/doc/cpp.info-2 ! 636644590b ./gcc/doc/cpp.info-3 ! 3499936017b ./gcc/doc/cpp.info-4 ! 3675380875b ./gcc/doc/cpp.info-5 ! 3543132597b ./gcc/doc/cpp.texi ! 1838233798b ./gcc/doc/cppenv.texi ! 1685544580b ./gcc/doc/cppinternals.info 1958814700b ./gcc/doc/cppinternals.texi ! 685869710b ./gcc/doc/cppopts.texi ! 3004272717b ./gcc/doc/extend.texi 2634996326b ./gcc/doc/fragments.texi ! 600815516b ./gcc/doc/frontends.texi ! 3256871866b ./gcc/doc/fsf-funding.7 ! 2658060989b ./gcc/doc/gcc.1 ! 4148415874b ./gcc/doc/gcc.info ! 1053864515b ./gcc/doc/gcc.info-1 ! 4294678088b ./gcc/doc/gcc.info-10 ! 1344046739b ./gcc/doc/gcc.info-11 ! 451582535b ./gcc/doc/gcc.info-12 ! 4084131178b ./gcc/doc/gcc.info-13 ! 1824645699b ./gcc/doc/gcc.info-14 ! 1310951679b ./gcc/doc/gcc.info-15 ! 3633708433b ./gcc/doc/gcc.info-16 ! 2461331410b ./gcc/doc/gcc.info-17 ! 4272216147b ./gcc/doc/gcc.info-18 ! 3012752365b ./gcc/doc/gcc.info-19 ! 2218006986b ./gcc/doc/gcc.info-2 ! 1322735281b ./gcc/doc/gcc.info-20 ! 471346850b ./gcc/doc/gcc.info-21 ! 2053165308b ./gcc/doc/gcc.info-22 ! 3102591020b ./gcc/doc/gcc.info-23 ! 2266643536b ./gcc/doc/gcc.info-3 ! 383482857b ./gcc/doc/gcc.info-4 ! 2120276990b ./gcc/doc/gcc.info-5 ! 2474168124b ./gcc/doc/gcc.info-6 ! 521005660b ./gcc/doc/gcc.info-7 ! 686614003b ./gcc/doc/gcc.info-8 ! 396552069b ./gcc/doc/gcc.info-9 ! 2344693999b ./gcc/doc/gcc.texi ! 1868552664b ./gcc/doc/gccint.info ! 1364694741b ./gcc/doc/gccint.info-1 ! 618166170b ./gcc/doc/gccint.info-10 ! 3363182873b ./gcc/doc/gccint.info-11 ! 301752520b ./gcc/doc/gccint.info-12 ! 4149939712b ./gcc/doc/gccint.info-13 ! 949510653b ./gcc/doc/gccint.info-14 ! 1642518230b ./gcc/doc/gccint.info-15 ! 2069563881b ./gcc/doc/gccint.info-16 ! 925078439b ./gcc/doc/gccint.info-17 ! 3695438277b ./gcc/doc/gccint.info-18 ! 2272377258b ./gcc/doc/gccint.info-19 ! 561325731b ./gcc/doc/gccint.info-2 ! 3982078308b ./gcc/doc/gccint.info-20 ! 3867221700b ./gcc/doc/gccint.info-21 ! 3280571445b ./gcc/doc/gccint.info-22 ! 2008468483b ./gcc/doc/gccint.info-23 ! 797617646b ./gcc/doc/gccint.info-3 ! 1305326084b ./gcc/doc/gccint.info-4 ! 348735569b ./gcc/doc/gccint.info-5 ! 1160338029b ./gcc/doc/gccint.info-6 ! 508232037b ./gcc/doc/gccint.info-7 ! 3871253182b ./gcc/doc/gccint.info-8 ! 976972282b ./gcc/doc/gccint.info-9 ! 926520134b ./gcc/doc/gccint.texi ! 1397513510b ./gcc/doc/gcov.1 ! 2529603660b ./gcc/doc/gcov.texi ! 642118932b ./gcc/doc/gfdl.7 4217859569b ./gcc/doc/gnu.texi ! 422936980b ./gcc/doc/gpl.7 ! 2632697239b ./gcc/doc/headerdirs.texi 1425599017b ./gcc/doc/hostconfig.texi ! 1232987106b ./gcc/doc/include/fdl.texi 2048065465b ./gcc/doc/include/funding.texi ! 587916905b ./gcc/doc/include/gcc-common.texi ! 1416455933b ./gcc/doc/include/gpl.texi ! 3627483023b ./gcc/doc/include/texinfo.tex ! 4219640220b ./gcc/doc/install-old.texi ! 662529943b ./gcc/doc/install.texi 1451529977b ./gcc/doc/install.texi2html ! 1103982611b ./gcc/doc/interface.texi ! 2833537290b ./gcc/doc/invoke.texi 1327866291b ./gcc/doc/languages.texi ! 409601074b ./gcc/doc/makefile.texi ! 647485435b ./gcc/doc/md.texi ! 2014418726b ./gcc/doc/objc.texi ! 1074700556b ./gcc/doc/passes.texi 2247614285b ./gcc/doc/portability.texi ! 2576532070b ./gcc/doc/rtl.texi ! 3603168219b ./gcc/doc/service.texi ! 3643604442b ./gcc/doc/sourcebuild.texi ! 2997941012b ./gcc/doc/standards.texi ! 587522736b ./gcc/doc/tm.texi ! 886635974b ./gcc/doc/trouble.texi ! 3478556786b ./gcc/doc/vms.texi ! 3128118159b ./gcc/doloop.c ! 1033704706b ./gcc/dominance.c ! 2791449994b ./gcc/doschk.c 109276966b ./gcc/dwarf.h ! 2184520814b ./gcc/dwarf2.h ! 31829346b ./gcc/dwarf2asm.c ! 2077057275b ./gcc/dwarf2asm.h ! 1918216770b ./gcc/dwarf2out.c ! 1010158138b ./gcc/dwarf2out.h ! 3359840971b ./gcc/dwarfout.c ! 3336789552b ./gcc/emit-rtl.c ! 626897841b ./gcc/enquire.c 2953931641b ./gcc/errors.c ! 3972701730b ./gcc/errors.h ! 1431652736b ./gcc/except.c ! 2826708782b ./gcc/except.h ! 908040152b ./gcc/explow.c ! 1156766543b ./gcc/expmed.c ! 1064280766b ./gcc/expr.c ! 980675150b ./gcc/expr.h ! 1546791101b ./gcc/f/.cvsignore ! 2016181825b ./gcc/f/BUGS ! 2146318605b ./gcc/f/ChangeLog ! 4225493150b ./gcc/f/ChangeLog.0 ! 2403016299b ./gcc/f/Make-lang.in ! 3908583628b ./gcc/f/NEWS ! 281424983b ./gcc/f/README ! 3295584012b ./gcc/f/RELEASE-PREP 1934744031b ./gcc/f/ansify.c ! 1543506773b ./gcc/f/bad.c 3978113547b ./gcc/f/bad.def 2128126262b ./gcc/f/bad.h ! 4003760421b ./gcc/f/bit.c 194938753b ./gcc/f/bit.h ! 2128697889b ./gcc/f/bld-op.def ! 948632599b ./gcc/f/bld.c 3286267604b ./gcc/f/bld.h ! 158397208b ./gcc/f/bugs.texi 235013049b ./gcc/f/bugs0.texi 2664732170b ./gcc/f/com-rt.def ! 1588166676b ./gcc/f/com.c ! 87369815b ./gcc/f/com.h ! 535595698b ./gcc/f/config-lang.in ! 1011994563b ./gcc/f/data.c 1923155684b ./gcc/f/data.h 1611338677b ./gcc/f/equiv.c 2175994638b ./gcc/f/equiv.h ! 2251785098b ./gcc/f/expr.c 417834755b ./gcc/f/expr.h ! 2351117682b ./gcc/f/ffe.texi 782070966b ./gcc/f/fini.c ! 1751461796b ./gcc/f/g77.1 ! 3841913874b ./gcc/f/g77.info ! 2480007383b ./gcc/f/g77.info-1 ! 2368693530b ./gcc/f/g77.info-10 ! 1452968741b ./gcc/f/g77.info-11 ! 4253343420b ./gcc/f/g77.info-12 ! 1335253876b ./gcc/f/g77.info-13 ! 1460006442b ./gcc/f/g77.info-14 ! 735239497b ./gcc/f/g77.info-15 ! 4083034865b ./gcc/f/g77.info-16 ! 12335273b ./gcc/f/g77.info-17 ! 2200796034b ./gcc/f/g77.info-18 ! 671514182b ./gcc/f/g77.info-19 ! 1680815922b ./gcc/f/g77.info-2 ! 2044269147b ./gcc/f/g77.info-20 ! 863778320b ./gcc/f/g77.info-21 ! 3183619273b ./gcc/f/g77.info-3 ! 79160293b ./gcc/f/g77.info-4 ! 390737386b ./gcc/f/g77.info-5 ! 1607363995b ./gcc/f/g77.info-6 ! 2946328607b ./gcc/f/g77.info-7 ! 102401303b ./gcc/f/g77.info-8 ! 4260619545b ./gcc/f/g77.info-9 ! 3054392079b ./gcc/f/g77.texi ! 2824974536b ./gcc/f/g77spec.c 4062822261b ./gcc/f/global.c 3559352394b ./gcc/f/global.h 1392305407b ./gcc/f/implic.c 3939649511b ./gcc/f/implic.h 2287601317b ./gcc/f/info-b.def - 2535813338b ./gcc/f/info-k.def - 2242176401b ./gcc/f/info-w.def 2342702754b ./gcc/f/info.c 1115234844b ./gcc/f/info.h 3953937189b ./gcc/f/intdoc.c ! 3843015483b ./gcc/f/intdoc.in ! 4069635816b ./gcc/f/intdoc.texi 2410122381b ./gcc/f/intrin.c 1048488593b ./gcc/f/intrin.def 3418049706b ./gcc/f/intrin.h ! 3025422982b ./gcc/f/invoke.texi ! 1861938661b ./gcc/f/lab.c ! 3674332618b ./gcc/f/lab.h ! 136843109b ./gcc/f/lang-options.h ! 1977846343b ./gcc/f/lang-specs.h ! 4037310288b ./gcc/f/lex.c ! 722310274b ./gcc/f/lex.h ! 3929672430b ./gcc/f/malloc.c ! 1633854048b ./gcc/f/malloc.h ! 2687881356b ./gcc/f/name.c ! 558328466b ./gcc/f/name.h ! 273264189b ./gcc/f/news.texi ! 3453379674b ./gcc/f/news0.texi ! 2696377463b ./gcc/f/parse.c ! 1067232252b ./gcc/f/proj.h ! 2321878455b ./gcc/f/root.texi ! 3531682397b ./gcc/f/src.c ! 246620254b ./gcc/f/src.h ! 3466162958b ./gcc/f/st.c ! 1705988958b ./gcc/f/st.h ! 3608541363b ./gcc/f/sta.c ! 520236030b ./gcc/f/sta.h ! 520927036b ./gcc/f/stb.c ! 2810193132b ./gcc/f/stb.h ! 502694498b ./gcc/f/stc.c ! 1751601456b ./gcc/f/stc.h ! 260229363b ./gcc/f/std.c ! 1219390242b ./gcc/f/std.h ! 2021799054b ./gcc/f/ste.c ! 1786873989b ./gcc/f/ste.h ! 1100581971b ./gcc/f/storag.c ! 790029114b ./gcc/f/storag.h ! 2404416327b ./gcc/f/stp.c ! 3782361290b ./gcc/f/stp.h ! 3722860946b ./gcc/f/str-1t.fin ! 2828127862b ./gcc/f/str-2t.fin ! 4215029898b ./gcc/f/str-fo.fin ! 281471485b ./gcc/f/str-io.fin ! 3735910053b ./gcc/f/str-nq.fin ! 3134124633b ./gcc/f/str-op.fin ! 2608567153b ./gcc/f/str-ot.fin ! 920153914b ./gcc/f/str.c ! 2184386780b ./gcc/f/str.h ! 610725318b ./gcc/f/sts.c ! 1450832819b ./gcc/f/sts.h ! 2301635495b ./gcc/f/stt.c ! 514307919b ./gcc/f/stt.h ! 3188469687b ./gcc/f/stu.c ! 166252279b ./gcc/f/stu.h ! 857063390b ./gcc/f/stv.c ! 971049710b ./gcc/f/stv.h ! 2156320080b ./gcc/f/stw.c ! 3741680211b ./gcc/f/stw.h ! 659922490b ./gcc/f/symbol.c ! 1323122026b ./gcc/f/symbol.def ! 690030434b ./gcc/f/symbol.h ! 561154028b ./gcc/f/target.c ! 1248104671b ./gcc/f/target.h ! 2698043928b ./gcc/f/top.c ! 2232338664b ./gcc/f/top.h ! 3443401298b ./gcc/f/type.c ! 2499934202b ./gcc/f/type.h ! 1303748387b ./gcc/f/version.c ! 1781447679b ./gcc/f/version.h ! 3584291506b ./gcc/f/where.c ! 819940437b ./gcc/f/where.h ! 1237323857b ./gcc/final.c ! 2247789519b ./gcc/fix-header.c ! 3390155447b ./gcc/fixinc/Makefile.in ! 2750464368b ./gcc/fixinc/README ! 2894614091b ./gcc/fixinc/check.tpl ! 697597425b ./gcc/fixinc/fixfixes.c ! 3110054233b ./gcc/fixinc/fixinc.dgux ! 125459277b ./gcc/fixinc/fixinc.interix ! 1474597097b ./gcc/fixinc/fixinc.ptx ! 1901674452b ./gcc/fixinc/fixinc.svr4 ! 2193207840b ./gcc/fixinc/fixinc.winnt ! 1439814780b ./gcc/fixinc/fixinc.wrap 1824978333b ./gcc/fixinc/fixincl.c ! 4214658264b ./gcc/fixinc/fixincl.sh 2178021789b ./gcc/fixinc/fixincl.tpl ! 2557317697b ./gcc/fixinc/fixincl.x 1372603529b ./gcc/fixinc/fixlib.c 971233728b ./gcc/fixinc/fixlib.h 4013194329b ./gcc/fixinc/fixtests.c 2003329934b ./gcc/fixinc/genfixes ! 605191257b ./gcc/fixinc/gnu-regex.c 1403987073b ./gcc/fixinc/gnu-regex.h ! 3231767803b ./gcc/fixinc/inclhack.def ! 3327140809b ./gcc/fixinc/mkfixinc.sh 1834585069b ./gcc/fixinc/procopen.c 1750379031b ./gcc/fixinc/server.c 3490851801b ./gcc/fixinc/server.h - 1516247519b ./gcc/fixinc/tests/base/X11/Intrinsic.h - 2715935838b ./gcc/fixinc/tests/base/X11/ShellP.h - 4147305037b ./gcc/fixinc/tests/base/X11/Xmu.h - 3373785317b ./gcc/fixinc/tests/base/Xm/BaseClassI.h - 1118590845b ./gcc/fixinc/tests/base/Xm/Traversal.h 1165473466b ./gcc/fixinc/tests/base/ansi/math.h 3124694417b ./gcc/fixinc/tests/base/ansi/stdlib.h 2980092932b ./gcc/fixinc/tests/base/arch/i960/archI960.h --- 2548,2841 ---- 2124668958b ./gcc/config/t-slibgcc-nolc-override 1087805219b ./gcc/config/t-slibgcc-sld 321200235b ./gcc/config/t-svr4 937080303b ./gcc/config/udivmod.c 2590328114b ./gcc/config/udivmodsi4.c + 944452583b ./gcc/configure + 2239237249b ./gcc/configure.frag + 3894690181b ./gcc/configure.in 1401546799b ./gcc/config/usegas.h ! 1979686065b ./gcc/config/v850/lib1funcs.asm 3345272584b ./gcc/config/v850/rtems.h ! 3003464882b ./gcc/config/v850/t-v850 ! 1936936995b ./gcc/config/v850/v850.c ! 622471920b ./gcc/config/v850/v850-c.c ! 4260177643b ./gcc/config/v850/v850.h ! 26734558b ./gcc/config/v850/v850.md ! 3302034740b ./gcc/config/v850/v850-protos.h ! 2302540552b ./gcc/config/vax/bsd.h ! 1499903501b ./gcc/config/vax/elf.h ! 1260908819b ./gcc/config/vax/netbsd-elf.h ! 4122206431b ./gcc/config/vax/netbsd.h 3271953013b ./gcc/config/vax/openbsd1.h ! 3310399842b ./gcc/config/vax/openbsd.h ! 958978039b ./gcc/config/vax/ultrix.h ! 717787243b ./gcc/config/vax/vax.c ! 1777867058b ./gcc/config/vax/vax.h ! 1389545853b ./gcc/config/vax/vax.md ! 826363414b ./gcc/config/vax/vax-protos.h ! 1161511202b ./gcc/config/vax/vaxv.h ! 2954412003b ./gcc/config/vax/vms.h 1260653442b ./gcc/config/vax/xm-vms.h 2711497169b ./gcc/config/x-interix ! 2099599302b ./gcc/config/xtensa/elf.h 1027874511b ./gcc/config/xtensa/lib1funcs.asm ! 1529835891b ./gcc/config/xtensa/lib2funcs.S ! 2079961902b ./gcc/config/xtensa/linux.h ! 856985218b ./gcc/config/xtensa/t-xtensa ! 2323376682b ./gcc/config/xtensa/xtensa.c 2796950173b ./gcc/config/xtensa/xtensa-config.h ! 1634616005b ./gcc/config/xtensa/xtensa.h ! 992524755b ./gcc/config/xtensa/xtensa.md ! 2260785040b ./gcc/config/xtensa/xtensa-protos.h ! 1207339419b ./gcc/conflict.c ! 4183575079b ./gcc/convert.c 2020855935b ./gcc/convert.h ! 639894166b ./gcc/c-opts.c ! 2171125041b ./gcc/COPYING ! 508743035b ./gcc/COPYING.LIB ! 1231075891b ./gcc/c-parse.c ! 2637246862b ./gcc/c-parse.in ! 1656602684b ./gcc/c-parse.y ! 2146645649b ./gcc/cp/call.c ! 2726184849b ./gcc/cp/cfns.gperf ! 3403558692b ./gcc/cp/cfns.h ! 227140791b ./gcc/cp/ChangeLog ! 190176486b ./gcc/cp/ChangeLog.1 ! 97583749b ./gcc/cp/ChangeLog.2 2546444747b ./gcc/cp/ChangeLog.egcs ! 2360441047b ./gcc/cp/class.c ! 3665612579b ./gcc/cp/config-lang.in ! 3345049029b ./gcc/cp/cp-lang.c ! 2277233898b ./gcc/cp/cp-tree.def ! 1521775449b ./gcc/cp/cp-tree.h ! 1230086821b ./gcc/cp/.cvsignore ! 1969471444b ./gcc/cp/cvt.c ! 2371346210b ./gcc/cp/decl2.c ! 3387673329b ./gcc/cp/decl.c ! 139112969b ./gcc/cp/decl.h ! 757230858b ./gcc/cp/dump.c ! 3508801145b ./gcc/cp/error.c ! 452521469b ./gcc/cp/except.c ! 1201332681b ./gcc/cp/expr.c ! 3417476079b ./gcc/cp/friend.c 1574667259b ./gcc/cp/g++.1 ! 729602332b ./gcc/cp/g++spec.c ! 3951274753b ./gcc/cp/init.c ! 1486125690b ./gcc/cp/lang-options.h ! 2659645047b ./gcc/cp/lang-specs.h ! 2140565483b ./gcc/cp/lex.c ! 3229077171b ./gcc/cp/lex.h ! 1662196287b ./gcc/cp/Make-lang.in ! 3992347916b ./gcc/cp/mangle.c ! 3217219935b ./gcc/cp/method.c ! 1213810021b ./gcc/cp/NEWS ! 3193855424b ./gcc/cp/operators.def ! 1390979693b ./gcc/cp/optimize.c ! 3775628502b ./gcc/cp/parse.c ! 3404237981b ./gcc/cp/parse.h ! 716218406b ./gcc/cp/parse.y 1602205564b ./gcc/cppdefault.c ! 2551769006b ./gcc/cppdefault.h ! 3019979850b ./gcc/cpperror.c ! 379759034b ./gcc/cppexp.c ! 3546454282b ./gcc/cppfiles.c ! 3476502948b ./gcc/cpphash.c ! 1755335704b ./gcc/cpphash.h ! 1758176761b ./gcc/cppinit.c ! 3206802280b ./gcc/cpplex.c ! 4012594622b ./gcc/cpplib.c ! 2894228879b ./gcc/cpplib.h ! 1801162914b ./gcc/cppmacro.c ! 3118400845b ./gcc/cppmain.c ! 2457788577b ./gcc/cppspec.c ! 3462827583b ./gcc/cp/pt.c ! 1890705605b ./gcc/cpptrad.c ! 660118186b ./gcc/cp/ptree.c ! 2089666330b ./gcc/c-pragma.c ! 2824587351b ./gcc/c-pragma.h ! 2028729644b ./gcc/cp/repo.c ! 1364992996b ./gcc/c-pretty-print.c ! 322270390b ./gcc/c-pretty-print.h ! 525523675b ./gcc/cp/rtti.c ! 3175282220b ./gcc/cp/search.c ! 1932187930b ./gcc/cp/semantics.c ! 1129915797b ./gcc/cp/spew.c ! 4056721053b ./gcc/cp/tree.c ! 144086378b ./gcc/cp/typeck2.c ! 4036793569b ./gcc/cp/typeck.c ! 3987640245b ./gcc/crtstuff.c ! 2684723874b ./gcc/cse.c ! 1529675068b ./gcc/cselib.c ! 2819991749b ./gcc/cselib.h ! 2307648174b ./gcc/c-semantics.c 216805921b ./gcc/cstamp-h.in ! 3323894092b ./gcc/c-tree.h ! 3521541793b ./gcc/c-typeck.c ! 1308782881b ./gcc/.cvsignore ! 1183294539b ./gcc/dbxout.c 2583180678b ./gcc/dbxout.h 1104788844b ./gcc/dbxstclass.h ! 105350690b ./gcc/debug.c ! 4173256618b ./gcc/debug.h ! 712445290b ./gcc/defaults.h ! 1514011429b ./gcc/df.c ! 2526994456b ./gcc/df.h ! 319617324b ./gcc/diagnostic.c ! 2028699711b ./gcc/diagnostic.def ! 3377130548b ./gcc/diagnostic.h ! 518713344b ./gcc/doc/bugreport.texi ! 2660106596b ./gcc/doc/collect2.texi ! 2676162650b ./gcc/doc/compat.texi 2785243168b ./gcc/doc/configfiles.texi 3399730921b ./gcc/doc/configterms.texi ! 2420813268b ./gcc/doc/contrib.texi 2272556046b ./gcc/doc/contribute.texi ! 371376296b ./gcc/doc/cpp.1 ! 4226490983b ./gcc/doc/cppenv.texi ! 3724511468b ./gcc/doc/cpp.info ! 4128300115b ./gcc/doc/cppinternals.info 1958814700b ./gcc/doc/cppinternals.texi ! 2995328172b ./gcc/doc/cppopts.texi ! 3632300675b ./gcc/doc/cpp.texi ! 2067115343b ./gcc/doc/c-tree.texi ! 1123688643b ./gcc/doc/.cvsignore ! 3110820825b ./gcc/doc/extend.texi 2634996326b ./gcc/doc/fragments.texi ! 2401477723b ./gcc/doc/frontends.texi ! 2503036604b ./gcc/doc/fsf-funding.7 ! 247110329b ./gcc/doc/gcc.1 ! 150519545b ./gcc/doc/gcc.info ! 2693842055b ./gcc/doc/gccinstall.info ! 1345812104b ./gcc/doc/gccint.info ! 4222820739b ./gcc/doc/gccint.texi ! 1898756828b ./gcc/doc/gcc.texi ! 685913711b ./gcc/doc/gcov.1 ! 799484262b ./gcc/doc/gcov.texi ! 2208173396b ./gcc/doc/gfdl.7 4217859569b ./gcc/doc/gnu.texi ! 3972531627b ./gcc/doc/gpl.7 ! 2598049702b ./gcc/doc/gty.texi ! 2196841411b ./gcc/doc/headerdirs.texi 1425599017b ./gcc/doc/hostconfig.texi ! 3288537183b ./gcc/doc/include/fdl.texi 2048065465b ./gcc/doc/include/funding.texi ! 1335719493b ./gcc/doc/include/gcc-common.texi ! 3092587370b ./gcc/doc/include/gpl.texi ! 979687020b ./gcc/doc/include/texinfo.tex ! 3427634226b ./gcc/doc/install-old.texi ! 230803145b ./gcc/doc/install.texi 1451529977b ./gcc/doc/install.texi2html ! 3000332536b ./gcc/doc/interface.texi ! 996409702b ./gcc/doc/invoke.texi 1327866291b ./gcc/doc/languages.texi ! 904420347b ./gcc/doc/makefile.texi ! 3989659578b ./gcc/doc/md.texi ! 755615327b ./gcc/doc/objc.texi ! 2361210801b ./gcc/doc/passes.texi 2247614285b ./gcc/doc/portability.texi ! 827589118b ./gcc/doc/rtl.texi ! 1759580304b ./gcc/doc/service.texi ! 1530929173b ./gcc/doc/sourcebuild.texi ! 3565606796b ./gcc/doc/standards.texi ! 3642529288b ./gcc/doc/tm.texi ! 4023092718b ./gcc/doc/trouble.texi ! 767307547b ./gcc/doc/vms.texi ! 3258612192b ./gcc/doloop.c ! 1146162220b ./gcc/dominance.c ! 2102135385b ./gcc/doschk.c ! 2221635105b ./gcc/dummy-conditions.c ! 4027179154b ./gcc/dwarf2asm.c ! 538758205b ./gcc/dwarf2asm.h ! 1582620025b ./gcc/dwarf2.h ! 3477474952b ./gcc/dwarf2out.c ! 3517290530b ./gcc/dwarf2out.h 109276966b ./gcc/dwarf.h ! 3351836985b ./gcc/dwarfout.c ! 2672013369b ./gcc/emit-rtl.c 2953931641b ./gcc/errors.c ! 3556563741b ./gcc/errors.h ! 100350032b ./gcc/et-forest.c ! 2508316488b ./gcc/et-forest.h ! 1447635893b ./gcc/except.c ! 2747823533b ./gcc/except.h ! 1662793030b ./gcc/explow.c ! 2274877005b ./gcc/expmed.c ! 395436318b ./gcc/expr.c ! 2327914919b ./gcc/expr.h 1934744031b ./gcc/f/ansify.c ! 1172411862b ./gcc/f/bad.c 3978113547b ./gcc/f/bad.def 2128126262b ./gcc/f/bad.h ! 1136773989b ./gcc/f/bit.c 194938753b ./gcc/f/bit.h ! 3553474552b ./gcc/f/bld.c 3286267604b ./gcc/f/bld.h ! 2128697889b ./gcc/f/bld-op.def ! 3402312672b ./gcc/f/BUGS 235013049b ./gcc/f/bugs0.texi + 3922562500b ./gcc/f/bugs.texi + 2253718893b ./gcc/f/ChangeLog + 3233190569b ./gcc/f/ChangeLog.0 + 2704348073b ./gcc/f/com.c + 3386200382b ./gcc/f/com.h 2664732170b ./gcc/f/com-rt.def ! 565949339b ./gcc/f/config-lang.in ! 1546791101b ./gcc/f/.cvsignore ! 3871229020b ./gcc/f/data.c 1923155684b ./gcc/f/data.h 1611338677b ./gcc/f/equiv.c 2175994638b ./gcc/f/equiv.h ! 4275508610b ./gcc/f/expr.c 417834755b ./gcc/f/expr.h ! 333493781b ./gcc/f/ffe.texi 782070966b ./gcc/f/fini.c ! 1355115177b ./gcc/f/g77.1 ! 978742039b ./gcc/f/g77.info ! 1023118578b ./gcc/f/g77spec.c ! 559127145b ./gcc/f/g77.texi 4062822261b ./gcc/f/global.c 3559352394b ./gcc/f/global.h 1392305407b ./gcc/f/implic.c 3939649511b ./gcc/f/implic.h + 517586974b ./gcc/final.c 2287601317b ./gcc/f/info-b.def 2342702754b ./gcc/f/info.c 1115234844b ./gcc/f/info.h + 2535813338b ./gcc/f/info-k.def + 2242176401b ./gcc/f/info-w.def 3953937189b ./gcc/f/intdoc.c ! 2395507839b ./gcc/f/intdoc.in ! 3304139334b ./gcc/f/intdoc.texi 2410122381b ./gcc/f/intrin.c 1048488593b ./gcc/f/intrin.def 3418049706b ./gcc/f/intrin.h ! 2907149479b ./gcc/f/invoke.texi ! 4178345561b ./gcc/fix-header.c ! 766031417b ./gcc/fixinc/check.tpl ! 1043093163b ./gcc/fixinc/fixfixes.c ! 1862241894b ./gcc/fixinc/fixinc.dgux ! 15758129b ./gcc/fixinc/fixinc.interix 1824978333b ./gcc/fixinc/fixincl.c ! 2267967746b ./gcc/fixinc/fixincl.sh 2178021789b ./gcc/fixinc/fixincl.tpl ! 3635615316b ./gcc/fixinc/fixincl.x ! 1474597097b ./gcc/fixinc/fixinc.ptx ! 3187846170b ./gcc/fixinc/fixinc.svr4 ! 1864448151b ./gcc/fixinc/fixinc.winnt ! 1439814780b ./gcc/fixinc/fixinc.wrap 1372603529b ./gcc/fixinc/fixlib.c 971233728b ./gcc/fixinc/fixlib.h 4013194329b ./gcc/fixinc/fixtests.c 2003329934b ./gcc/fixinc/genfixes ! 2190395998b ./gcc/fixinc/gnu-regex.c 1403987073b ./gcc/fixinc/gnu-regex.h ! 1212592975b ./gcc/fixinc/inclhack.def ! 333067513b ./gcc/fixinc/Makefile.in ! 1990838210b ./gcc/fixinc/mkfixinc.sh 1834585069b ./gcc/fixinc/procopen.c + 2750464368b ./gcc/fixinc/README 1750379031b ./gcc/fixinc/server.c 3490851801b ./gcc/fixinc/server.h 1165473466b ./gcc/fixinc/tests/base/ansi/math.h 3124694417b ./gcc/fixinc/tests/base/ansi/stdlib.h 2980092932b ./gcc/fixinc/tests/base/arch/i960/archI960.h *************** *** 3087,3092 **** --- 2848,2854 ---- 3049981119b ./gcc/fixinc/tests/base/curses.h 2909636960b ./gcc/fixinc/tests/base/fcntl.h 3901972537b ./gcc/fixinc/tests/base/fixinc-test-limits.h + 2707131863b ./gcc/fixinc/tests/base/_G_config.h 4150745363b ./gcc/fixinc/tests/base/hsfs/hsfs_spec.h 1298358958b ./gcc/fixinc/tests/base/internal/sgimacros.h 2484816269b ./gcc/fixinc/tests/base/internal/wchar_core.h *************** *** 3095,3117 **** 2670651204b ./gcc/fixinc/tests/base/libgen.h 1854625388b ./gcc/fixinc/tests/base/machine/cpu.h 114078425b ./gcc/fixinc/tests/base/malloc.h ! 2615750814b ./gcc/fixinc/tests/base/math.h 2373596333b ./gcc/fixinc/tests/base/netdnet/dnetdb.h 4211518276b ./gcc/fixinc/tests/base/netinet/ip.h 3107111098b ./gcc/fixinc/tests/base/pixrect/memvar.h ! 372953949b ./gcc/fixinc/tests/base/pthread.h ! 351364386b ./gcc/fixinc/tests/base/reg_types.h 2876721819b ./gcc/fixinc/tests/base/regex.h 2249464053b ./gcc/fixinc/tests/base/rpc/auth.h 4166238922b ./gcc/fixinc/tests/base/rpc/rpc.h 778394431b ./gcc/fixinc/tests/base/rpc/svc.h - 164451816b ./gcc/fixinc/tests/base/rpc/xdr.h 1831085175b ./gcc/fixinc/tests/base/rpcsvc/rstat.h 2162639252b ./gcc/fixinc/tests/base/rpcsvc/rusers.h 135186565b ./gcc/fixinc/tests/base/sparc/asm_linkage.h 1583769396b ./gcc/fixinc/tests/base/stdio.h 1529509815b ./gcc/fixinc/tests/base/stdio_tag.h ! 3122205252b ./gcc/fixinc/tests/base/stdlib.h 2907849084b ./gcc/fixinc/tests/base/strings.h 482468002b ./gcc/fixinc/tests/base/sundev/vuid_event.h 1807434691b ./gcc/fixinc/tests/base/sunwindow/win_lock.h --- 2857,2879 ---- 2670651204b ./gcc/fixinc/tests/base/libgen.h 1854625388b ./gcc/fixinc/tests/base/machine/cpu.h 114078425b ./gcc/fixinc/tests/base/malloc.h ! 2313686563b ./gcc/fixinc/tests/base/math.h 2373596333b ./gcc/fixinc/tests/base/netdnet/dnetdb.h 4211518276b ./gcc/fixinc/tests/base/netinet/ip.h 3107111098b ./gcc/fixinc/tests/base/pixrect/memvar.h ! 3253666839b ./gcc/fixinc/tests/base/pthread.h 2876721819b ./gcc/fixinc/tests/base/regex.h + 351364386b ./gcc/fixinc/tests/base/reg_types.h 2249464053b ./gcc/fixinc/tests/base/rpc/auth.h 4166238922b ./gcc/fixinc/tests/base/rpc/rpc.h 778394431b ./gcc/fixinc/tests/base/rpc/svc.h 1831085175b ./gcc/fixinc/tests/base/rpcsvc/rstat.h 2162639252b ./gcc/fixinc/tests/base/rpcsvc/rusers.h + 164451816b ./gcc/fixinc/tests/base/rpc/xdr.h 135186565b ./gcc/fixinc/tests/base/sparc/asm_linkage.h 1583769396b ./gcc/fixinc/tests/base/stdio.h 1529509815b ./gcc/fixinc/tests/base/stdio_tag.h ! 298829255b ./gcc/fixinc/tests/base/stdlib.h 2907849084b ./gcc/fixinc/tests/base/strings.h 482468002b ./gcc/fixinc/tests/base/sundev/vuid_event.h 1807434691b ./gcc/fixinc/tests/base/sunwindow/win_lock.h *************** *** 3128,3233 **** 3041640682b ./gcc/fixinc/tests/base/sys/signal.h 85483121b ./gcc/fixinc/tests/base/sys/socket.h 2450632911b ./gcc/fixinc/tests/base/sys/spinlock.h ! 2880344765b ./gcc/fixinc/tests/base/sys/stat.h 2422167059b ./gcc/fixinc/tests/base/sys/time.h 2994886866b ./gcc/fixinc/tests/base/sys/times.h 1174710562b ./gcc/fixinc/tests/base/sys/types.h 3923345847b ./gcc/fixinc/tests/base/sys/utsname.h 3579560225b ./gcc/fixinc/tests/base/sys/wait.h ! 2119077343b ./gcc/fixinc/tests/base/testing.h 173746420b ./gcc/fixinc/tests/base/time.h 3845139066b ./gcc/fixinc/tests/base/tinfo.h 4209310059b ./gcc/fixinc/tests/base/types/vxTypesBase.h 3839547353b ./gcc/fixinc/tests/base/unistd.h 1242753480b ./gcc/fixinc/tests/base/widec.h ! 2236212838b ./gcc/fixproto ! 3658835587b ./gcc/flags.h 1465737068b ./gcc/floatlib.c ! 959822363b ./gcc/flow.c ! 3465354917b ./gcc/fold-const.c 3820449811b ./gcc/fp-test.c ! 1394029795b ./gcc/function.c ! 316231375b ./gcc/function.h 3058774034b ./gcc/future.options ! 1214866690b ./gcc/gbl-ctors.h ! 3977459944b ./gcc/gcc.c ! 960741132b ./gcc/gcc.h 3093644366b ./gcc/gcc.hlp ! 2405976148b ./gcc/gccbug.in ! 3633749318b ./gcc/gccspec.c ! 4197147799b ./gcc/gcov-io.h ! 3825112355b ./gcc/gcov.c ! 1524721645b ./gcc/gcse.c ! 802469235b ./gcc/gdbinit.in ! 4293398944b ./gcc/gen-protos.c ! 3638083387b ./gcc/genattr.c ! 3417344932b ./gcc/genattrtab.c 2682166046b ./gcc/gencheck.c ! 3810064934b ./gcc/gencodes.c ! 2539346427b ./gcc/genconfig.c 2631615302b ./gcc/genconstants.c ! 1628507273b ./gcc/genemit.c 2648961261b ./gcc/genextract.c ! 2023228290b ./gcc/genflags.c ! 2713590814b ./gcc/gengenrtl.c 2574485728b ./gcc/genmultilib ! 1384421270b ./gcc/genopinit.c 4030468350b ./gcc/genoutput.c 2221468101b ./gcc/genpeep.c ! 345520579b ./gcc/genpreds.c ! 1766167058b ./gcc/genrecog.c ! 3076545551b ./gcc/gensupport.c ! 1823528383b ./gcc/gensupport.h ! 2561993607b ./gcc/ggc-callbacks.c ! 831448355b ./gcc/ggc-common.c ! 1943428995b ./gcc/ggc-none.c ! 914540366b ./gcc/ggc-page.c ! 3876596452b ./gcc/ggc-simple.c ! 1613425309b ./gcc/ggc.h 684549565b ./gcc/ginclude/iso646.h ! 956736189b ./gcc/ginclude/stdarg.h 4095609490b ./gcc/ginclude/stdbool.h 1347750466b ./gcc/ginclude/stddef.h ! 673473982b ./gcc/ginclude/varargs.h ! 1222982330b ./gcc/glimits.h ! 2686596635b ./gcc/global.c 991678839b ./gcc/gmon.c ! 4262862037b ./gcc/graph.c ! 2272086758b ./gcc/graph.h 2006423200b ./gcc/gstab.h 2040904551b ./gcc/gsyms.h 808024354b ./gcc/gsyslimits.h 2343151743b ./gcc/gthr-aix.h ! 3203810708b ./gcc/gthr-dce.h ! 1931993243b ./gcc/gthr-posix.h ! 2828465396b ./gcc/gthr-rtems.h ! 1258851302b ./gcc/gthr-single.h ! 3966292684b ./gcc/gthr-solaris.h ! 4243675148b ./gcc/gthr-vxworks.h ! 3942109358b ./gcc/gthr-win32.h ! 925349290b ./gcc/gthr.h ! 430540108b ./gcc/haifa-sched.c ! 544018069b ./gcc/halfpic.c ! 2731657470b ./gcc/halfpic.h ! 3590969103b ./gcc/hard-reg-set.h ! 2643914866b ./gcc/hash.c ! 2987787285b ./gcc/hash.h ! 466224151b ./gcc/hashtable.c ! 126902747b ./gcc/hashtable.h ! 3796251430b ./gcc/hooks.c ! 779103435b ./gcc/hooks.h ! 519586985b ./gcc/hwint.h ! 2453090619b ./gcc/ifcvt.c ! 3686080794b ./gcc/input.h ! 2324132584b ./gcc/insn-addr.h ! 3301445102b ./gcc/integrate.c ! 1320722832b ./gcc/integrate.h ! 3277280645b ./gcc/intl.c ! 2379664116b ./gcc/intl.h ! 1081445972b ./gcc/intl/ChangeLog ! 680616337b ./gcc/intl/Makefile.in ! 1166279255b ./gcc/intl/VERSION 3847321727b ./gcc/intl/bindtextdom.c 3698301396b ./gcc/intl/config.charset 3683549278b ./gcc/intl/dcgettext.c 1537282354b ./gcc/intl/dcigettext.c --- 2890,3073 ---- 3041640682b ./gcc/fixinc/tests/base/sys/signal.h 85483121b ./gcc/fixinc/tests/base/sys/socket.h 2450632911b ./gcc/fixinc/tests/base/sys/spinlock.h ! 1536474806b ./gcc/fixinc/tests/base/sys/stat.h 2422167059b ./gcc/fixinc/tests/base/sys/time.h 2994886866b ./gcc/fixinc/tests/base/sys/times.h 1174710562b ./gcc/fixinc/tests/base/sys/types.h 3923345847b ./gcc/fixinc/tests/base/sys/utsname.h 3579560225b ./gcc/fixinc/tests/base/sys/wait.h ! 2641832564b ./gcc/fixinc/tests/base/testing.h 173746420b ./gcc/fixinc/tests/base/time.h 3845139066b ./gcc/fixinc/tests/base/tinfo.h 4209310059b ./gcc/fixinc/tests/base/types/vxTypesBase.h 3839547353b ./gcc/fixinc/tests/base/unistd.h 1242753480b ./gcc/fixinc/tests/base/widec.h ! 1516247519b ./gcc/fixinc/tests/base/X11/Intrinsic.h ! 2715935838b ./gcc/fixinc/tests/base/X11/ShellP.h ! 4147305037b ./gcc/fixinc/tests/base/X11/Xmu.h ! 3373785317b ./gcc/fixinc/tests/base/Xm/BaseClassI.h ! 2132924768b ./gcc/fixinc/tests/base/Xm/Traversal.h ! 2113569167b ./gcc/fixproto ! 1861938661b ./gcc/f/lab.c ! 3674332618b ./gcc/f/lab.h ! 1614112619b ./gcc/flags.h ! 136843109b ./gcc/f/lang-options.h ! 87061712b ./gcc/f/lang-specs.h ! 3588095999b ./gcc/f/lex.c ! 722310274b ./gcc/f/lex.h 1465737068b ./gcc/floatlib.c ! 3671207305b ./gcc/flow.c ! 140815367b ./gcc/f/Make-lang.in ! 3929672430b ./gcc/f/malloc.c ! 1633854048b ./gcc/f/malloc.h ! 2687881356b ./gcc/f/name.c ! 558328466b ./gcc/f/name.h ! 195685737b ./gcc/f/NEWS ! 3453379674b ./gcc/f/news0.texi ! 1286682074b ./gcc/f/news.texi ! 1359168717b ./gcc/fold-const.c ! 3383472522b ./gcc/f/parse.c ! 1067232252b ./gcc/f/proj.h 3820449811b ./gcc/fp-test.c ! 281424983b ./gcc/f/README ! 3295584012b ./gcc/f/RELEASE-PREP ! 1741768325b ./gcc/f/root.texi ! 2146007539b ./gcc/FSFChangeLog ! 2696443822b ./gcc/FSFChangeLog.10 ! 1302016933b ./gcc/FSFChangeLog.11 ! 3531682397b ./gcc/f/src.c ! 246620254b ./gcc/f/src.h ! 3608541363b ./gcc/f/sta.c ! 520236030b ./gcc/f/sta.h ! 520927036b ./gcc/f/stb.c ! 2810193132b ./gcc/f/stb.h ! 3466162958b ./gcc/f/st.c ! 1376080614b ./gcc/f/stc.c ! 1751601456b ./gcc/f/stc.h ! 1940318197b ./gcc/f/std.c ! 1219390242b ./gcc/f/std.h ! 2584461253b ./gcc/f/ste.c ! 1786873989b ./gcc/f/ste.h ! 1705988958b ./gcc/f/st.h ! 1100581971b ./gcc/f/storag.c ! 790029114b ./gcc/f/storag.h ! 2404416327b ./gcc/f/stp.c ! 3782361290b ./gcc/f/stp.h ! 3722860946b ./gcc/f/str-1t.fin ! 2828127862b ./gcc/f/str-2t.fin ! 920153914b ./gcc/f/str.c ! 4215029898b ./gcc/f/str-fo.fin ! 2184386780b ./gcc/f/str.h ! 281471485b ./gcc/f/str-io.fin ! 3735910053b ./gcc/f/str-nq.fin ! 3134124633b ./gcc/f/str-op.fin ! 2608567153b ./gcc/f/str-ot.fin ! 610725318b ./gcc/f/sts.c ! 1450832819b ./gcc/f/sts.h ! 2301635495b ./gcc/f/stt.c ! 514307919b ./gcc/f/stt.h ! 3188469687b ./gcc/f/stu.c ! 166252279b ./gcc/f/stu.h ! 857063390b ./gcc/f/stv.c ! 971049710b ./gcc/f/stv.h ! 2156320080b ./gcc/f/stw.c ! 3741680211b ./gcc/f/stw.h ! 659922490b ./gcc/f/symbol.c ! 1323122026b ./gcc/f/symbol.def ! 690030434b ./gcc/f/symbol.h ! 991497974b ./gcc/f/target.c ! 2424410241b ./gcc/f/target.h ! 501866674b ./gcc/f/top.c ! 2232338664b ./gcc/f/top.h ! 3443401298b ./gcc/f/type.c ! 2499934202b ./gcc/f/type.h ! 2589414035b ./gcc/function.c ! 2092834276b ./gcc/function.h 3058774034b ./gcc/future.options ! 316201735b ./gcc/f/where.c ! 3857741668b ./gcc/f/where.h ! 3783840564b ./gcc/gbl-ctors.h ! 1115769236b ./gcc/gccbug.in ! 3359207208b ./gcc/gcc.c ! 4230721321b ./gcc/gcc.h 3093644366b ./gcc/gcc.hlp ! 2622773729b ./gcc/gccspec.c ! 3225546711b ./gcc/gcov.c ! 2762855893b ./gcc/gcov-io.h ! 2353632639b ./gcc/gcse.c ! 696210819b ./gcc/gdbinit.in ! 2036947252b ./gcc/genattr.c ! 3347934187b ./gcc/genattrtab.c ! 49201825b ./gcc/genattrtab.h ! 936726739b ./gcc/genautomata.c 2682166046b ./gcc/gencheck.c ! 3078309930b ./gcc/gencodes.c ! 2446751798b ./gcc/genconditions.c ! 2521028207b ./gcc/genconfig.c 2631615302b ./gcc/genconstants.c ! 4264684932b ./gcc/genemit.c 2648961261b ./gcc/genextract.c ! 1430019866b ./gcc/genflags.c ! 904540311b ./gcc/gengenrtl.c ! 2765427045b ./gcc/gengtype.c ! 1706925807b ./gcc/gengtype.h ! 242502624b ./gcc/gengtype-lex.c ! 3137000585b ./gcc/gengtype-lex.l ! 283432982b ./gcc/gengtype-yacc.c ! 2625416625b ./gcc/gengtype-yacc.h ! 1642276134b ./gcc/gengtype-yacc.y 2574485728b ./gcc/genmultilib ! 3934270274b ./gcc/genopinit.c 4030468350b ./gcc/genoutput.c 2221468101b ./gcc/genpeep.c ! 2157311337b ./gcc/genpreds.c ! 4293398944b ./gcc/gen-protos.c ! 1456235423b ./gcc/genrecog.c ! 2155964351b ./gcc/gensupport.c ! 3939490572b ./gcc/gensupport.h ! 2009469051b ./gcc/ggc-common.c ! 852202395b ./gcc/ggc.h ! 4038703287b ./gcc/ggc-none.c ! 3486314564b ./gcc/ggc-page.c ! 3850484049b ./gcc/ggc-simple.c ! 158790627b ./gcc/ginclude/float.h 684549565b ./gcc/ginclude/iso646.h ! 2119154547b ./gcc/ginclude/stdarg.h 4095609490b ./gcc/ginclude/stdbool.h 1347750466b ./gcc/ginclude/stddef.h ! 2140936651b ./gcc/ginclude/varargs.h ! 689492719b ./gcc/glimits.h ! 2463952863b ./gcc/global.c 991678839b ./gcc/gmon.c ! 637392860b ./gcc/graph.c ! 3912371345b ./gcc/graph.h 2006423200b ./gcc/gstab.h 2040904551b ./gcc/gsyms.h 808024354b ./gcc/gsyslimits.h 2343151743b ./gcc/gthr-aix.h ! 2817714080b ./gcc/gthr-dce.h ! 920778145b ./gcc/gthr.h ! 1878777757b ./gcc/gthr-posix.h ! 2735875105b ./gcc/gthr-rtems.h ! 3347178149b ./gcc/gthr-single.h ! 335757205b ./gcc/gthr-solaris.h ! 26784372b ./gcc/gthr-vxworks.h ! 1467201133b ./gcc/gthr-win32.h ! 4237080631b ./gcc/haifa-sched.c ! 1344641109b ./gcc/hard-reg-set.h ! 1111206935b ./gcc/hashtable.c ! 2725203942b ./gcc/hashtable.h ! 127562897b ./gcc/hooks.c ! 3729897617b ./gcc/hooks.h ! 4221207654b ./gcc/hwint.h ! 4097385980b ./gcc/ifcvt.c ! 1952228975b ./gcc/input.h ! 3384627434b ./gcc/insn-addr.h ! 1476222599b ./gcc/integrate.c ! 3129523647b ./gcc/integrate.h 3847321727b ./gcc/intl/bindtextdom.c + 3277280645b ./gcc/intl.c + 3450120448b ./gcc/intl/ChangeLog 3698301396b ./gcc/intl/config.charset 3683549278b ./gcc/intl/dcgettext.c 1537282354b ./gcc/intl/dcigettext.c *************** *** 3239,3244 **** --- 3079,3085 ---- 3807651580b ./gcc/intl/gettext.c 864082220b ./gcc/intl/gettext.h 3298993106b ./gcc/intl/gettextP.h + 2379664116b ./gcc/intl.h 3470048606b ./gcc/intl/hash-string.h 3803759614b ./gcc/intl/intl-compat.c 3500562604b ./gcc/intl/l10nflist.c *************** *** 3249,3468 **** 934932803b ./gcc/intl/localcharset.c 3093413149b ./gcc/intl/locale.alias 2364750309b ./gcc/intl/localealias.c 2022997717b ./gcc/intl/ngettext.c 543478295b ./gcc/intl/plural.c 1047167798b ./gcc/intl/plural.y 409545719b ./gcc/intl/ref-add.sin 1121743739b ./gcc/intl/ref-del.sin 1971238900b ./gcc/intl/textdomain.c ! 503022028b ./gcc/java/.cvsignore ! 308773326b ./gcc/java/ChangeLog ! 3840961705b ./gcc/java/Make-lang.in ! 1752055498b ./gcc/java/boehm.c ! 3814965188b ./gcc/java/buffer.c 1535113190b ./gcc/java/buffer.h ! 637702143b ./gcc/java/builtins.c 2409493226b ./gcc/java/chartables.h ! 1544711683b ./gcc/java/check-init.c ! 3161785437b ./gcc/java/class.c ! 2672598613b ./gcc/java/config-lang.in ! 70342256b ./gcc/java/constants.c 640032177b ./gcc/java/convert.h ! 698834578b ./gcc/java/decl.c ! 1301173842b ./gcc/java/except.c ! 1888306202b ./gcc/java/expr.c ! 867039953b ./gcc/java/gcj.1 ! 1220042288b ./gcc/java/gcj.info ! 580198789b ./gcc/java/gcj.info-1 ! 1591575875b ./gcc/java/gcj.info-2 ! 2232106844b ./gcc/java/gcj.texi ! 2313957134b ./gcc/java/gcjh.1 533046670b ./gcc/java/gen-table.pl ! 2558615881b ./gcc/java/gij.1 ! 2862690686b ./gcc/java/gjavah.c 1545050516b ./gcc/java/java-except.h 1953641142b ./gcc/java/java-opcodes.h - 2113802419b ./gcc/java/java-tree.def - 3036080891b ./gcc/java/java-tree.h 2538410445b ./gcc/java/javaop.def ! 872575611b ./gcc/java/javaop.h 1618392854b ./gcc/java/jcf-depend.c ! 3138781441b ./gcc/java/jcf-dump.1 ! 1347786459b ./gcc/java/jcf-dump.c ! 370700983b ./gcc/java/jcf-io.c ! 981094631b ./gcc/java/jcf-parse.c ! 189754917b ./gcc/java/jcf-path.c ! 3070824570b ./gcc/java/jcf-reader.c ! 3086938723b ./gcc/java/jcf-write.c ! 921328820b ./gcc/java/jcf.h ! 1315261195b ./gcc/java/jv-convert.1 ! 2401697144b ./gcc/java/jv-scan.1 ! 3491242747b ./gcc/java/jv-scan.c 3805988298b ./gcc/java/jvgenmain.c ! 686969605b ./gcc/java/jvspec.c ! 3733396854b ./gcc/java/keyword.gperf ! 3748734913b ./gcc/java/keyword.h 366330104b ./gcc/java/lang-options.h 3731853870b ./gcc/java/lang-specs.h ! 2455368983b ./gcc/java/lang.c ! 930602719b ./gcc/java/lex.c ! 1057768549b ./gcc/java/lex.h ! 1290236487b ./gcc/java/mangle.c ! 624686086b ./gcc/java/mangle_name.c ! 2212453332b ./gcc/java/parse-scan.c ! 578153036b ./gcc/java/parse-scan.y ! 3918875946b ./gcc/java/parse.c ! 924019294b ./gcc/java/parse.h ! 2160466893b ./gcc/java/parse.y ! 241511114b ./gcc/java/rmic.1 ! 3124361170b ./gcc/java/rmiregistry.1 ! 2066605666b ./gcc/java/typeck.c ! 173829162b ./gcc/java/verify.c ! 3207437983b ./gcc/java/xref.c 3070080051b ./gcc/java/xref.h 2742723736b ./gcc/java/zextract.c 1459175152b ./gcc/java/zipfile.h ! 2200195809b ./gcc/jump.c ! 1885354315b ./gcc/langhooks-def.h ! 4163847594b ./gcc/langhooks.c ! 718654791b ./gcc/langhooks.h ! 2367190261b ./gcc/lcm.c ! 2318627229b ./gcc/libfuncs.h ! 1452643639b ./gcc/libgcc-std.ver ! 2402286846b ./gcc/libgcc2.c ! 3671718625b ./gcc/libgcc2.h 2497915666b ./gcc/limitx.h 1045880008b ./gcc/limity.h 1060915850b ./gcc/line-map.c ! 3486158933b ./gcc/line-map.h ! 2698117766b ./gcc/lists.c ! 1174355773b ./gcc/local-alloc.c ! 830917499b ./gcc/longlong.h ! 1168231708b ./gcc/loop.c ! 483531210b ./gcc/loop.h ! 2150704349b ./gcc/machmode.def ! 3928982379b ./gcc/machmode.h 189930733b ./gcc/main.c ! 501600506b ./gcc/mbchar.c 1508701785b ./gcc/mbchar.h 886384654b ./gcc/mips-tdump.c 4187769843b ./gcc/mips-tfile.c ! 3936313187b ./gcc/mkconfig.sh 217659056b ./gcc/mkdeps.c 3976112005b ./gcc/mkdeps.h 827441351b ./gcc/mkinstalldirs ! 3928753931b ./gcc/mklibgcc.in 4201050746b ./gcc/mkmap-flat.awk ! 2827346461b ./gcc/mkmap-symver.awk 1597314052b ./gcc/move-if-change 1966957144b ./gcc/objc/.cvsignore - 566554613b ./gcc/objc/Make-lang.in - 3823063152b ./gcc/objc/README - 4010954163b ./gcc/objc/config-lang.in 588115418b ./gcc/objc/lang-options.h ! 852310047b ./gcc/objc/lang-specs.h ! 3712044081b ./gcc/objc/objc-act.c ! 2554922770b ./gcc/objc/objc-act.h ! 2534517289b ./gcc/objc/objc-lang.c ! 1958451116b ./gcc/objc/objc-parse.c ! 1805259703b ./gcc/objc/objc-parse.y 688475759b ./gcc/objc/objc-tree.def ! 4077044196b ./gcc/optabs.c ! 3971816206b ./gcc/optabs.h ! 151133448b ./gcc/output.h ! 1911824904b ./gcc/params.c ! 2474575794b ./gcc/params.def ! 840880994b ./gcc/params.h ! 3997221312b ./gcc/po/ChangeLog 4281232887b ./gcc/po/EXCLUDES ! 275286308b ./gcc/po/da.gmo ! 276047898b ./gcc/po/da.po ! 4175362661b ./gcc/po/el.gmo ! 1399154149b ./gcc/po/el.po ! 1592121868b ./gcc/po/es.gmo ! 239486157b ./gcc/po/es.po ! 234060324b ./gcc/po/exgettext ! 3271137864b ./gcc/po/fr.gmo ! 641572084b ./gcc/po/fr.po ! 953510881b ./gcc/po/gcc.pot ! 810430188b ./gcc/po/ja.gmo ! 2505973891b ./gcc/po/ja.po ! 3002010451b ./gcc/po/nl.gmo ! 934957733b ./gcc/po/nl.po ! 3351765398b ./gcc/po/sv.gmo ! 1330626989b ./gcc/po/sv.po ! 866561722b ./gcc/po/tr.gmo ! 3345738807b ./gcc/po/tr.po ! 3161983355b ./gcc/predict.c ! 1371462395b ./gcc/predict.def ! 204342296b ./gcc/predict.h ! 542352850b ./gcc/prefix.c 3203071066b ./gcc/prefix.h ! 3724834025b ./gcc/print-rtl.c ! 417163997b ./gcc/print-tree.c ! 2666623009b ./gcc/profile.c ! 1610870410b ./gcc/protoize.c ! 2723074973b ./gcc/read-rtl.c ! 17316212b ./gcc/real.c ! 2885483337b ./gcc/real.h ! 1758079687b ./gcc/recog.c ! 2056680576b ./gcc/recog.h ! 3611458427b ./gcc/reg-stack.c ! 57810796b ./gcc/regclass.c ! 2157731750b ./gcc/regmove.c ! 113125100b ./gcc/regrename.c ! 3100477763b ./gcc/regs.h ! 3794134282b ./gcc/reload.c ! 834085082b ./gcc/reload.h ! 1807817122b ./gcc/reload1.c ! 4167441145b ./gcc/reorg.c ! 2715704724b ./gcc/resource.c 2605579460b ./gcc/resource.h ! 3490774286b ./gcc/rtl-error.c ! 2800367218b ./gcc/rtl.c ! 3964111654b ./gcc/rtl.def ! 3336969021b ./gcc/rtl.h ! 2758038583b ./gcc/rtlanal.c ! 1989258075b ./gcc/sbitmap.c ! 3201428436b ./gcc/sbitmap.h ! 1702118899b ./gcc/scan-decls.c ! 3912741047b ./gcc/scan-types.sh ! 324348149b ./gcc/scan.c 339714129b ./gcc/scan.h ! 347395426b ./gcc/sched-deps.c ! 3568403641b ./gcc/sched-ebb.c ! 4108826208b ./gcc/sched-int.h ! 2565292623b ./gcc/sched-rgn.c ! 2176345645b ./gcc/sched-vis.c ! 3014933100b ./gcc/sdbout.c 1391855772b ./gcc/sdbout.h ! 2225673670b ./gcc/sibcall.c ! 2715461417b ./gcc/simplify-rtx.c 3345261950b ./gcc/sort-protos ! 3407562807b ./gcc/ssa-ccp.c ! 2078369101b ./gcc/ssa-dce.c ! 3157302619b ./gcc/ssa.c ! 332547863b ./gcc/ssa.h ! 2395322097b ./gcc/stab.def 471587796b ./gcc/stack.h ! 114049826b ./gcc/stmt.c ! 2592810543b ./gcc/stor-layout.c ! 3515875777b ./gcc/stringpool.c 567176141b ./gcc/sys-protos.h 482558466b ./gcc/sys-types.h ! 524381800b ./gcc/system.h ! 293723253b ./gcc/target-def.h ! 4078089769b ./gcc/target.h ! 2721909951b ./gcc/testsuite/ChangeLog ! 986418331b ./gcc/testsuite/README ! 4258789052b ./gcc/testsuite/README.g++ ! 174183124b ./gcc/testsuite/README.gcc 1101480727b ./gcc/testsuite/config/default.exp - 3207711727b ./gcc/testsuite/consistency.vlad/README 3657217366b ./gcc/testsuite/consistency.vlad/layout/a-char.c 2814769741b ./gcc/testsuite/consistency.vlad/layout/a-double.c 789833107b ./gcc/testsuite/consistency.vlad/layout/a-float.c 1654384929b ./gcc/testsuite/consistency.vlad/layout/a-int.c 4126836986b ./gcc/testsuite/consistency.vlad/layout/a-long.c 2082883507b ./gcc/testsuite/consistency.vlad/layout/a-longdouble.c 1870550230b ./gcc/testsuite/consistency.vlad/layout/a-longlong.c --- 3090,3340 ---- 934932803b ./gcc/intl/localcharset.c 3093413149b ./gcc/intl/locale.alias 2364750309b ./gcc/intl/localealias.c + 680616337b ./gcc/intl/Makefile.in 2022997717b ./gcc/intl/ngettext.c 543478295b ./gcc/intl/plural.c 1047167798b ./gcc/intl/plural.y 409545719b ./gcc/intl/ref-add.sin 1121743739b ./gcc/intl/ref-del.sin 1971238900b ./gcc/intl/textdomain.c ! 1166279255b ./gcc/intl/VERSION ! 700876101b ./gcc/java/boehm.c ! 674770997b ./gcc/java/buffer.c 1535113190b ./gcc/java/buffer.h ! 2471190840b ./gcc/java/builtins.c ! 2570769711b ./gcc/java/ChangeLog 2409493226b ./gcc/java/chartables.h ! 1669534513b ./gcc/java/check-init.c ! 1987085295b ./gcc/java/class.c ! 771837757b ./gcc/java/config-lang.in ! 2852494447b ./gcc/java/constants.c 640032177b ./gcc/java/convert.h ! 503022028b ./gcc/java/.cvsignore ! 2447326245b ./gcc/java/decl.c ! 808662179b ./gcc/java/except.c ! 3550734029b ./gcc/java/expr.c ! 3569045584b ./gcc/java/gcj.1 ! 57142254b ./gcc/java/gcjh.1 ! 3037774527b ./gcc/java/gcj.info ! 3613529008b ./gcc/java/gcj.texi 533046670b ./gcc/java/gen-table.pl ! 2726837058b ./gcc/java/gij.1 ! 871232158b ./gcc/java/gjavah.c 1545050516b ./gcc/java/java-except.h 1953641142b ./gcc/java/java-opcodes.h 2538410445b ./gcc/java/javaop.def ! 3553057247b ./gcc/java/javaop.h ! 2113802419b ./gcc/java/java-tree.def ! 1585333829b ./gcc/java/java-tree.h 1618392854b ./gcc/java/jcf-depend.c ! 1669335888b ./gcc/java/jcf-dump.1 ! 989986345b ./gcc/java/jcf-dump.c ! 1096034698b ./gcc/java/jcf.h ! 265802933b ./gcc/java/jcf-io.c ! 2201709088b ./gcc/java/jcf-parse.c ! 3649177865b ./gcc/java/jcf-path.c ! 3469145485b ./gcc/java/jcf-reader.c ! 2779561656b ./gcc/java/jcf-write.c ! 2711991102b ./gcc/java/jv-convert.1 3805988298b ./gcc/java/jvgenmain.c ! 48814670b ./gcc/java/jv-scan.1 ! 1608362154b ./gcc/java/jv-scan.c ! 1503112447b ./gcc/java/jvspec.c ! 1823669543b ./gcc/java/keyword.gperf ! 4241021965b ./gcc/java/keyword.h ! 2227285634b ./gcc/java/lang.c 366330104b ./gcc/java/lang-options.h 3731853870b ./gcc/java/lang-specs.h ! 3540740791b ./gcc/java/lex.c ! 3065888956b ./gcc/java/lex.h ! 1116674429b ./gcc/java/Make-lang.in ! 3475732428b ./gcc/java/mangle.c ! 1178542691b ./gcc/java/mangle_name.c ! 2488889266b ./gcc/java/parse.c ! 1819635606b ./gcc/java/parse.h ! 1483640733b ./gcc/java/parse-scan.c ! 222108707b ./gcc/java/parse-scan.y ! 3662037178b ./gcc/java/parse.y ! 3419180161b ./gcc/java/rmic.1 ! 85557972b ./gcc/java/rmiregistry.1 ! 4133292138b ./gcc/java/typeck.c ! 3461608157b ./gcc/java/verify.c ! 3887545656b ./gcc/java/win32-host.c ! 995360189b ./gcc/java/xref.c 3070080051b ./gcc/java/xref.h 2742723736b ./gcc/java/zextract.c 1459175152b ./gcc/java/zipfile.h ! 364600072b ./gcc/jump.c ! 2942044572b ./gcc/langhooks.c ! 15274800b ./gcc/langhooks-def.h ! 2519431915b ./gcc/langhooks.h ! 3016546082b ./gcc/LANGUAGES ! 2478673079b ./gcc/lcm.c ! 95519294b ./gcc/libfuncs.h ! 1895885741b ./gcc/libgcc2.c ! 3322762549b ./gcc/libgcc2.h ! 3415969168b ./gcc/libgcc-std.ver 2497915666b ./gcc/limitx.h 1045880008b ./gcc/limity.h 1060915850b ./gcc/line-map.c ! 3549869863b ./gcc/line-map.h ! 1354723533b ./gcc/lists.c ! 2979000969b ./gcc/local-alloc.c ! 1812783525b ./gcc/location.h ! 3570672314b ./gcc/longlong.h ! 3072560908b ./gcc/loop.c ! 2947339148b ./gcc/loop.h ! 1751002388b ./gcc/machmode.def ! 2912025978b ./gcc/machmode.h 189930733b ./gcc/main.c ! 3086452264b ./gcc/Makefile.in ! 2927199649b ./gcc/mbchar.c 1508701785b ./gcc/mbchar.h 886384654b ./gcc/mips-tdump.c 4187769843b ./gcc/mips-tfile.c ! 65215581b ./gcc/mkconfig.sh 217659056b ./gcc/mkdeps.c 3976112005b ./gcc/mkdeps.h + 27366989b ./gcc/mkheaders.in 827441351b ./gcc/mkinstalldirs ! 1322684481b ./gcc/mklibgcc.in 4201050746b ./gcc/mkmap-flat.awk ! 1180430107b ./gcc/mkmap-symver.awk 1597314052b ./gcc/move-if-change + 1656752859b ./gcc/NEWS + 753535702b ./gcc/objc/config-lang.in 1966957144b ./gcc/objc/.cvsignore 588115418b ./gcc/objc/lang-options.h ! 2708854894b ./gcc/objc/lang-specs.h ! 1745196153b ./gcc/objc/Make-lang.in ! 883149047b ./gcc/objc/objc-act.c ! 288378628b ./gcc/objc/objc-act.h ! 1462887932b ./gcc/objc/objc-lang.c ! 999686990b ./gcc/objc/objc-parse.c ! 2857922994b ./gcc/objc/objc-parse.y 688475759b ./gcc/objc/objc-tree.def ! 3823063152b ./gcc/objc/README ! 1799560872b ./gcc/ONEWS ! 597909517b ./gcc/optabs.c ! 2466464809b ./gcc/optabs.h ! 4051333287b ./gcc/output.h ! 3801250653b ./gcc/params.c ! 3767044429b ./gcc/params.def ! 984476649b ./gcc/params.h ! 1249156b ./gcc/po/be.gmo ! 3330908741b ./gcc/po/be.po ! 2024225229b ./gcc/po/ChangeLog ! 2371816573b ./gcc/po/da.gmo ! 2198590362b ./gcc/po/da.po ! 2011111696b ./gcc/po/de.gmo ! 2679531065b ./gcc/po/de.po ! 3519582394b ./gcc/po/el.gmo ! 934120107b ./gcc/po/el.po ! 2512921427b ./gcc/po/es.gmo ! 2449828424b ./gcc/po/es.po 4281232887b ./gcc/po/EXCLUDES ! 1546479817b ./gcc/po/exgettext ! 676707049b ./gcc/po/fr.gmo ! 2023216552b ./gcc/po/fr.po ! 167670342b ./gcc/po/gcc.pot ! 1915710130b ./gcc/po/ja.gmo ! 1528387841b ./gcc/po/ja.po ! 713926345b ./gcc/po/nl.gmo ! 2738456990b ./gcc/po/nl.po ! 1968766402b ./gcc/po/sv.gmo ! 3465543535b ./gcc/po/sv.po ! 2639533812b ./gcc/po/tr.gmo ! 990622336b ./gcc/po/tr.po ! 2822615021b ./gcc/predict.c ! 2384316111b ./gcc/predict.def ! 3422815786b ./gcc/predict.h ! 2395022544b ./gcc/prefix.c 3203071066b ./gcc/prefix.h ! 637723833b ./gcc/pretty-print.h ! 1841372900b ./gcc/print-rtl.c ! 535203828b ./gcc/print-tree.c ! 4095588508b ./gcc/profile.c ! 1617327067b ./gcc/profile.h ! 4281450539b ./gcc/protoize.c ! 807691307b ./gcc/ra-build.c ! 3695686739b ./gcc/ra.c ! 2476204354b ./gcc/ra-colorize.c ! 1510897850b ./gcc/ra-debug.c ! 2452573025b ./gcc/ra.h ! 2855776542b ./gcc/ra-rewrite.c ! 2799003008b ./gcc/README-fixinc ! 756162762b ./gcc/README.Portability ! 58262063b ./gcc/read-rtl.c ! 2598205802b ./gcc/real.c ! 3979248105b ./gcc/real.h ! 3893622176b ./gcc/recog.c ! 3658154165b ./gcc/recog.h ! 1445421371b ./gcc/regclass.c ! 1380845695b ./gcc/regmove.c ! 886698666b ./gcc/regrename.c ! 4261713084b ./gcc/regs.h ! 3202425607b ./gcc/reg-stack.c ! 2276053377b ./gcc/reload1.c ! 2803735528b ./gcc/reload.c ! 3481272321b ./gcc/reload.h ! 4020213172b ./gcc/reorg.c ! 249014842b ./gcc/resource.c 2605579460b ./gcc/resource.h ! 3634610072b ./gcc/rtlanal.c ! 2941705038b ./gcc/rtl.c ! 3866851382b ./gcc/rtl.def ! 3586047414b ./gcc/rtl-error.c ! 462167881b ./gcc/rtl.h ! 1290811844b ./gcc/sbitmap.c ! 7124827b ./gcc/sbitmap.h ! 75721905b ./gcc/scan.c ! 1157934170b ./gcc/scan-decls.c 339714129b ./gcc/scan.h ! 3912741047b ./gcc/scan-types.sh ! 1561578738b ./gcc/sched-deps.c ! 3943952384b ./gcc/sched-ebb.c ! 4073647846b ./gcc/sched-int.h ! 1084263154b ./gcc/sched-rgn.c ! 1669243185b ./gcc/sched-vis.c ! 3973591925b ./gcc/sdbout.c 1391855772b ./gcc/sdbout.h ! 1084935625b ./gcc/SERVICE ! 2597421288b ./gcc/sibcall.c ! 1042687231b ./gcc/simplify-rtx.c 3345261950b ./gcc/sort-protos ! 391689662b ./gcc/ssa.c ! 2842654676b ./gcc/ssa-ccp.c ! 2028254015b ./gcc/ssa-dce.c ! 3490823511b ./gcc/ssa.h ! 661640452b ./gcc/stab.def 471587796b ./gcc/stack.h ! 3550420939b ./gcc/stmt.c ! 2148442539b ./gcc/stor-layout.c ! 3600592812b ./gcc/stringpool.c 567176141b ./gcc/sys-protos.h + 1032468258b ./gcc/system.h 482558466b ./gcc/sys-types.h ! 3943359312b ./gcc/target-def.h ! 1185210674b ./gcc/target.h ! 2398224019b ./gcc/testsuite/ChangeLog 1101480727b ./gcc/testsuite/config/default.exp 3657217366b ./gcc/testsuite/consistency.vlad/layout/a-char.c 2814769741b ./gcc/testsuite/consistency.vlad/layout/a-double.c 789833107b ./gcc/testsuite/consistency.vlad/layout/a-float.c 1654384929b ./gcc/testsuite/consistency.vlad/layout/a-int.c + 4146459649b ./gcc/testsuite/consistency.vlad/layout/align-bool.cpp + 2242642270b ./gcc/testsuite/consistency.vlad/layout/align-char.c + 1789069487b ./gcc/testsuite/consistency.vlad/layout/align-double.c + 2365706302b ./gcc/testsuite/consistency.vlad/layout/align-float.c + 1139013298b ./gcc/testsuite/consistency.vlad/layout/align-int.c + 2305175273b ./gcc/testsuite/consistency.vlad/layout/align-long.c + 1683867594b ./gcc/testsuite/consistency.vlad/layout/align-longdouble.c + 2116189486b ./gcc/testsuite/consistency.vlad/layout/align-longlong.c + 3775705613b ./gcc/testsuite/consistency.vlad/layout/align-pointer.c + 3243328118b ./gcc/testsuite/consistency.vlad/layout/align-ptrdiff.c + 3355052908b ./gcc/testsuite/consistency.vlad/layout/align-short.c + 2446562994b ./gcc/testsuite/consistency.vlad/layout/align-size.c + 4125888825b ./gcc/testsuite/consistency.vlad/layout/align-wchar.c 4126836986b ./gcc/testsuite/consistency.vlad/layout/a-long.c 2082883507b ./gcc/testsuite/consistency.vlad/layout/a-longdouble.c 1870550230b ./gcc/testsuite/consistency.vlad/layout/a-longlong.c *************** *** 3481,3499 **** 3218633480b ./gcc/testsuite/consistency.vlad/layout/a-short.c 1126124139b ./gcc/testsuite/consistency.vlad/layout/a-size_t.c 3526110053b ./gcc/testsuite/consistency.vlad/layout/a-wchar_t.c - 4146459649b ./gcc/testsuite/consistency.vlad/layout/align-bool.cpp - 2242642270b ./gcc/testsuite/consistency.vlad/layout/align-char.c - 1789069487b ./gcc/testsuite/consistency.vlad/layout/align-double.c - 2365706302b ./gcc/testsuite/consistency.vlad/layout/align-float.c - 1139013298b ./gcc/testsuite/consistency.vlad/layout/align-int.c - 2305175273b ./gcc/testsuite/consistency.vlad/layout/align-long.c - 1683867594b ./gcc/testsuite/consistency.vlad/layout/align-longdouble.c - 2116189486b ./gcc/testsuite/consistency.vlad/layout/align-longlong.c - 3775705613b ./gcc/testsuite/consistency.vlad/layout/align-pointer.c - 3243328118b ./gcc/testsuite/consistency.vlad/layout/align-ptrdiff.c - 3355052908b ./gcc/testsuite/consistency.vlad/layout/align-short.c - 2446562994b ./gcc/testsuite/consistency.vlad/layout/align-size.c - 4125888825b ./gcc/testsuite/consistency.vlad/layout/align-wchar.c 3324795146b ./gcc/testsuite/consistency.vlad/layout/biggest-field-align.c 1487466473b ./gcc/testsuite/consistency.vlad/layout/c-char-1-c-char.cpp 3519286859b ./gcc/testsuite/consistency.vlad/layout/c-char-1-c-double.cpp --- 3353,3358 ---- *************** *** 3567,3572 **** --- 3426,3440 ---- 3230342428b ./gcc/testsuite/consistency.vlad/layout/c-int-2-c-longlong.cpp 443814793b ./gcc/testsuite/consistency.vlad/layout/c-int-2-c-pointer.cpp 986131700b ./gcc/testsuite/consistency.vlad/layout/c-int-2-c-short.cpp + 1839888072b ./gcc/testsuite/consistency.vlad/layout/class-char-and-virtual.cpp + 2259371507b ./gcc/testsuite/consistency.vlad/layout/class-double-and-virtual.cpp + 3308691044b ./gcc/testsuite/consistency.vlad/layout/class-float-and-virtual.cpp + 4237514561b ./gcc/testsuite/consistency.vlad/layout/class-int-and-virtual.cpp + 3380766571b ./gcc/testsuite/consistency.vlad/layout/class-long-and-virtual.cpp + 815671556b ./gcc/testsuite/consistency.vlad/layout/class-longdouble-and-virtual.cpp + 3694413639b ./gcc/testsuite/consistency.vlad/layout/class-longlong-and-virtual.cpp + 361431068b ./gcc/testsuite/consistency.vlad/layout/class-pointer-and-virtual.cpp + 4030637509b ./gcc/testsuite/consistency.vlad/layout/class-short-and-virtual.cpp 3640144004b ./gcc/testsuite/consistency.vlad/layout/c-long-1-c-char.cpp 3170239534b ./gcc/testsuite/consistency.vlad/layout/c-long-1-c-double.cpp 1373364368b ./gcc/testsuite/consistency.vlad/layout/c-long-1-c-float.cpp *************** *** 3657,3687 **** 4128191352b ./gcc/testsuite/consistency.vlad/layout/c-short-2-c-longlong.cpp 249914684b ./gcc/testsuite/consistency.vlad/layout/c-short-2-c-pointer.cpp 967840663b ./gcc/testsuite/consistency.vlad/layout/c-short-2-c-short.cpp ! 1839888072b ./gcc/testsuite/consistency.vlad/layout/class-char-and-virtual.cpp ! 2259371507b ./gcc/testsuite/consistency.vlad/layout/class-double-and-virtual.cpp ! 3308691044b ./gcc/testsuite/consistency.vlad/layout/class-float-and-virtual.cpp ! 4237514561b ./gcc/testsuite/consistency.vlad/layout/class-int-and-virtual.cpp ! 3380766571b ./gcc/testsuite/consistency.vlad/layout/class-long-and-virtual.cpp ! 815671556b ./gcc/testsuite/consistency.vlad/layout/class-longdouble-and-virtual.cpp ! 3694413639b ./gcc/testsuite/consistency.vlad/layout/class-longlong-and-virtual.cpp ! 361431068b ./gcc/testsuite/consistency.vlad/layout/class-pointer-and-virtual.cpp ! 4030637509b ./gcc/testsuite/consistency.vlad/layout/class-short-and-virtual.cpp ! 3227054482b ./gcc/testsuite/consistency.vlad/layout/endian.c 3691894150b ./gcc/testsuite/consistency.vlad/layout/f-0-0-5.c 2906280459b ./gcc/testsuite/consistency.vlad/layout/f-0-20-17.c 4153795460b ./gcc/testsuite/consistency.vlad/layout/f-0-24-24.c - 2616499905b ./gcc/testsuite/consistency.vlad/layout/f-1-21-31.c - 877204714b ./gcc/testsuite/consistency.vlad/layout/f-1-3-1.c 2223677750b ./gcc/testsuite/consistency.vlad/layout/f-10-11-10.c 1656961235b ./gcc/testsuite/consistency.vlad/layout/f-11-12-10.c 628897670b ./gcc/testsuite/consistency.vlad/layout/f-14-22-10.c 2499257242b ./gcc/testsuite/consistency.vlad/layout/f-14-29-30.c 1116508393b ./gcc/testsuite/consistency.vlad/layout/f-14-31-26.c 3215710590b ./gcc/testsuite/consistency.vlad/layout/f-14-8-9.c 2598471587b ./gcc/testsuite/consistency.vlad/layout/f-15-1-22.c 1235023325b ./gcc/testsuite/consistency.vlad/layout/f-16-30-15.c - 1483764145b ./gcc/testsuite/consistency.vlad/layout/f-17-17-2.c 3175789490b ./gcc/testsuite/consistency.vlad/layout/f-17-17-20.c 2825171767b ./gcc/testsuite/consistency.vlad/layout/f-17-21-17.c 3571484701b ./gcc/testsuite/consistency.vlad/layout/f-18-15-30.c 325844328b ./gcc/testsuite/consistency.vlad/layout/f-18-26-0.c --- 3525,3546 ---- 4128191352b ./gcc/testsuite/consistency.vlad/layout/c-short-2-c-longlong.cpp 249914684b ./gcc/testsuite/consistency.vlad/layout/c-short-2-c-pointer.cpp 967840663b ./gcc/testsuite/consistency.vlad/layout/c-short-2-c-short.cpp ! 2630760029b ./gcc/testsuite/consistency.vlad/layout/endian.c 3691894150b ./gcc/testsuite/consistency.vlad/layout/f-0-0-5.c 2906280459b ./gcc/testsuite/consistency.vlad/layout/f-0-20-17.c 4153795460b ./gcc/testsuite/consistency.vlad/layout/f-0-24-24.c 2223677750b ./gcc/testsuite/consistency.vlad/layout/f-10-11-10.c 1656961235b ./gcc/testsuite/consistency.vlad/layout/f-11-12-10.c + 2616499905b ./gcc/testsuite/consistency.vlad/layout/f-1-21-31.c + 877204714b ./gcc/testsuite/consistency.vlad/layout/f-1-3-1.c 628897670b ./gcc/testsuite/consistency.vlad/layout/f-14-22-10.c 2499257242b ./gcc/testsuite/consistency.vlad/layout/f-14-29-30.c 1116508393b ./gcc/testsuite/consistency.vlad/layout/f-14-31-26.c 3215710590b ./gcc/testsuite/consistency.vlad/layout/f-14-8-9.c 2598471587b ./gcc/testsuite/consistency.vlad/layout/f-15-1-22.c 1235023325b ./gcc/testsuite/consistency.vlad/layout/f-16-30-15.c 3175789490b ./gcc/testsuite/consistency.vlad/layout/f-17-17-20.c + 1483764145b ./gcc/testsuite/consistency.vlad/layout/f-17-17-2.c 2825171767b ./gcc/testsuite/consistency.vlad/layout/f-17-21-17.c 3571484701b ./gcc/testsuite/consistency.vlad/layout/f-18-15-30.c 325844328b ./gcc/testsuite/consistency.vlad/layout/f-18-26-0.c *************** *** 3689,3695 **** 1812484656b ./gcc/testsuite/consistency.vlad/layout/f-18-4-17.c 3026961559b ./gcc/testsuite/consistency.vlad/layout/f-18-5-16.c 3538065200b ./gcc/testsuite/consistency.vlad/layout/f-19-6-22.c - 1424392875b ./gcc/testsuite/consistency.vlad/layout/f-2-25-27.c 2636321909b ./gcc/testsuite/consistency.vlad/layout/f-20-19-9.c 4072544979b ./gcc/testsuite/consistency.vlad/layout/f-20-20-15.c 3513144108b ./gcc/testsuite/consistency.vlad/layout/f-20-26-14.c --- 3548,3553 ---- *************** *** 3700,3705 **** --- 3558,3564 ---- 1590859529b ./gcc/testsuite/consistency.vlad/layout/f-21-5-26.c 1027772335b ./gcc/testsuite/consistency.vlad/layout/f-22-2-19.c 1959300243b ./gcc/testsuite/consistency.vlad/layout/f-22-2-28.c + 1424392875b ./gcc/testsuite/consistency.vlad/layout/f-2-25-27.c 4169983870b ./gcc/testsuite/consistency.vlad/layout/f-23-17-8.c 728940177b ./gcc/testsuite/consistency.vlad/layout/f-24-18-9.c 851596736b ./gcc/testsuite/consistency.vlad/layout/f-24-27-8.c *************** *** 3708,3723 **** 2248812453b ./gcc/testsuite/consistency.vlad/layout/f-27-22-7.c 3851531263b ./gcc/testsuite/consistency.vlad/layout/f-29-16-7.c 1140548972b ./gcc/testsuite/consistency.vlad/layout/f-29-4-10.c - 600206604b ./gcc/testsuite/consistency.vlad/layout/f-3-7-1.c 3817519794b ./gcc/testsuite/consistency.vlad/layout/f-30-15-26.c 2254570093b ./gcc/testsuite/consistency.vlad/layout/f-30-24-30.c 1287065065b ./gcc/testsuite/consistency.vlad/layout/f-31-28-16.c 1393314717b ./gcc/testsuite/consistency.vlad/layout/f-31-4-14.c 1649382578b ./gcc/testsuite/consistency.vlad/layout/f-31-9-0.c 666347310b ./gcc/testsuite/consistency.vlad/layout/f-4-14-29.c 821467656b ./gcc/testsuite/consistency.vlad/layout/f-5-23-7.c 2794715020b ./gcc/testsuite/consistency.vlad/layout/f-7-14-12.c - 2156310103b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/README 281818021b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-char.out 281818021b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-char.out++ 1727061245b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-double.out --- 3567,3581 ---- 2248812453b ./gcc/testsuite/consistency.vlad/layout/f-27-22-7.c 3851531263b ./gcc/testsuite/consistency.vlad/layout/f-29-16-7.c 1140548972b ./gcc/testsuite/consistency.vlad/layout/f-29-4-10.c 3817519794b ./gcc/testsuite/consistency.vlad/layout/f-30-15-26.c 2254570093b ./gcc/testsuite/consistency.vlad/layout/f-30-24-30.c 1287065065b ./gcc/testsuite/consistency.vlad/layout/f-31-28-16.c 1393314717b ./gcc/testsuite/consistency.vlad/layout/f-31-4-14.c 1649382578b ./gcc/testsuite/consistency.vlad/layout/f-31-9-0.c + 600206604b ./gcc/testsuite/consistency.vlad/layout/f-3-7-1.c 666347310b ./gcc/testsuite/consistency.vlad/layout/f-4-14-29.c 821467656b ./gcc/testsuite/consistency.vlad/layout/f-5-23-7.c 2794715020b ./gcc/testsuite/consistency.vlad/layout/f-7-14-12.c 281818021b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-char.out 281818021b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-char.out++ 1727061245b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-double.out *************** *** 3726,3737 **** 1601851831b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-float.out++ 3221406627b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-int.out 3221406627b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-int.out++ ! 3142186771b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-long.out ! 3142186771b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-long.out++ 2227734332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longdouble.out 2227734332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longdouble.out++ 1069590031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longlong.out 1069590031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longlong.out++ 1963275345b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-char.out 1963275345b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-char.out++ 2939358541b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-double.out --- 3584,3620 ---- 1601851831b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-float.out++ 3221406627b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-int.out 3221406627b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-int.out++ ! 3462656330b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-bool.out++ ! 2284866161b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-char.out ! 2284866161b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-char.out++ ! 2016168953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-double.out ! 2016168953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-double.out++ ! 3778571582b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-float.out ! 3778571582b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-float.out++ ! 2268947026b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-int.out ! 2268947026b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-int.out++ ! 3232401121b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longdouble.out ! 3232401121b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longdouble.out++ ! 2659664521b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longlong.out ! 2659664521b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longlong.out++ ! 3668254953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-long.out ! 3668254953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-long.out++ ! 3544657861b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-pointer.out ! 3544657861b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-pointer.out++ ! 568190957b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-ptrdiff.out ! 568190957b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-ptrdiff.out++ ! 1592598882b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-short.out ! 1592598882b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-short.out++ ! 2711568334b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-size.out ! 2711568334b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-size.out++ ! 1604716971b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-wchar.out ! 1604716971b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-wchar.out++ 2227734332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longdouble.out 2227734332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longdouble.out++ 1069590031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longlong.out 1069590031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-longlong.out++ + 3142186771b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-long.out + 3142186771b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-long.out++ 1963275345b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-char.out 1963275345b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-char.out++ 2939358541b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-double.out *************** *** 3740,3751 **** 4001039866b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-float.out++ 3232823433b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-int.out 3232823433b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-int.out++ - 3779601801b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-long.out - 3779601801b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-long.out++ 2623902989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longdouble.out 2623902989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longdouble.out++ 1713649002b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longlong.out 1713649002b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longlong.out++ 2443484079b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-pointer.out 2443484079b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-pointer.out++ 3159633525b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-ptrdiff_t.out --- 3623,3634 ---- 4001039866b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-float.out++ 3232823433b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-int.out 3232823433b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-int.out++ 2623902989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longdouble.out 2623902989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longdouble.out++ 1713649002b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longlong.out 1713649002b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-longlong.out++ + 3779601801b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-long.out + 3779601801b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-long.out++ 2443484079b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-pointer.out 2443484079b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-pointer.out++ 3159633525b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-of-s-ptrdiff_t.out *************** *** 3762,3880 **** 4156594561b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-size_t.out++ 492360794b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-wchar_t.out 492360794b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-wchar_t.out++ - 3462656330b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-bool.out++ - 2284866161b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-char.out - 2284866161b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-char.out++ - 2016168953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-double.out - 2016168953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-double.out++ - 3778571582b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-float.out - 3778571582b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-float.out++ - 2268947026b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-int.out - 2268947026b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-int.out++ - 3668254953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-long.out - 3668254953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-long.out++ - 3232401121b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longdouble.out - 3232401121b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longdouble.out++ - 2659664521b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longlong.out - 2659664521b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-longlong.out++ - 3544657861b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-pointer.out - 3544657861b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-pointer.out++ - 568190957b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-ptrdiff.out - 568190957b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-ptrdiff.out++ - 1592598882b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-short.out - 1592598882b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-short.out++ - 2711568334b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-size.out - 2711568334b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-size.out++ - 1604716971b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-wchar.out - 1604716971b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/align-wchar.out++ 4129036106b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/biggest-field-align.out 4129036106b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/biggest-field-align.out++ 4100226006b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-char.out++ 3647609206b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-double.out++ 706559590b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-float.out++ 1215678453b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-int.out++ - 4196765215b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-long.out++ 2100244020b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-longdouble.out+ 48453457b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-longlong.out++ 3131996511b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-pointer.out++ 1181309658b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-short.out++ 3978860778b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-char.out++ 2575125216b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-double.out++ 3758626543b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-float.out++ 876931045b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-int.out++ - 3122728674b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-long.out++ 2507562199b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-longdouble.out+ 1079948168b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-longlong.out++ 557528819b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-pointer.out++ 984328826b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-short.out++ 3870081867b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-char.out++ 19559768b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-double.out++ 2915080636b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-float.out++ 391114415b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-int.out++ - 897790368b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-long.out++ 2943384114b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-longlong.out+ 1812530953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-pointer.out++ 4419316b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-short.out++ 1529425773b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-char.out++ 2110018195b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-double.out++ 431267742b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-float.out++ 4127117436b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-int.out++ - 3610473804b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-long.out++ 3919625178b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-longlong.out+ 4161112465b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-pointer.out++ 2097187829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-short.out++ 638577261b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-char.out++ 476074193b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-double.out++ 384192667b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-float.out++ 3196085957b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-int.out++ - 964541378b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-long.out++ 3708436693b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-longdouble.out 2203415599b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-longlong.out++ 317097833b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-pointer.out++ 2217857064b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-short.out++ 3381433116b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-char.out++ 429641349b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-double.out++ 3143138522b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-float.out++ 637049178b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-int.out++ - 3915291152b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-long.out++ 2436155461b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-longdouble.out 1035042416b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-longlong.out++ 2715660950b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-pointer.out++ 1668069472b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-short.out++ 3152579670b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-char.out++ 1138705949b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-double.out++ 2023313489b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-float.out++ 1706645581b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-int.out++ - 824095637b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-long.out++ 1167102151b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-longdouble.out++ 853135804b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-longlong.out++ 2845722513b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-pointer.out++ 1032279461b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-short.out++ 150139450b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-char.out++ 3993039563b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-double.out++ 1771341638b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-float.out++ 981734500b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-int.out++ - 673250102b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-long.out++ 1272920488b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-longdouble.out++ 2082772967b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-longlong.out++ 1447464664b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-pointer.out++ 2980070396b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-short.out++ 978303701b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-char.out++ 1349831301b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-double.out++ 4055309409b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-float.out++ 281114634b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-int.out++ - 2092387878b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-long.out++ 1591591915b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-longdouble.out+ 1601182123b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-longlong.out++ 1167331858b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-pointer.out++ 1373996143b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-short.out++ 328768010b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-char.out++ 3391651497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-double.out++ 1331092866b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-float.out++ 1363762993b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-int.out++ - 860525318b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-long.out++ 3764776043b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-longdouble.out+ 3487659489b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-longlong.out++ 1919812282b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-pointer.out++ 2539788600b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-short.out++ 1261002308b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-longdouble-1-c-char.out+ --- 3645,3741 ---- 4156594561b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-size_t.out++ 492360794b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-wchar_t.out 492360794b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/a-wchar_t.out++ 4129036106b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/biggest-field-align.out 4129036106b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/biggest-field-align.out++ 4100226006b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-char.out++ 3647609206b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-double.out++ 706559590b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-float.out++ 1215678453b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-int.out++ 2100244020b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-longdouble.out+ 48453457b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-longlong.out++ + 4196765215b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-long.out++ 3131996511b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-pointer.out++ 1181309658b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-1-c-short.out++ 3978860778b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-char.out++ 2575125216b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-double.out++ 3758626543b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-float.out++ 876931045b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-int.out++ 2507562199b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-longdouble.out+ 1079948168b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-longlong.out++ + 3122728674b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-long.out++ 557528819b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-pointer.out++ 984328826b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-char-2-c-short.out++ 3870081867b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-char.out++ 19559768b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-double.out++ 2915080636b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-float.out++ 391114415b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-int.out++ 2943384114b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-longlong.out+ + 897790368b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-long.out++ 1812530953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-pointer.out++ 4419316b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-1-c-short.out++ 1529425773b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-char.out++ 2110018195b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-double.out++ 431267742b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-float.out++ 4127117436b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-int.out++ 3919625178b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-longlong.out+ + 3610473804b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-long.out++ 4161112465b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-pointer.out++ 2097187829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-double-2-c-short.out++ 638577261b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-char.out++ 476074193b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-double.out++ 384192667b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-float.out++ 3196085957b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-int.out++ 3708436693b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-longdouble.out 2203415599b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-longlong.out++ + 964541378b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-long.out++ 317097833b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-pointer.out++ 2217857064b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-1-c-short.out++ 3381433116b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-char.out++ 429641349b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-double.out++ 3143138522b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-float.out++ 637049178b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-int.out++ 2436155461b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-longdouble.out 1035042416b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-longlong.out++ + 3915291152b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-long.out++ 2715660950b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-pointer.out++ 1668069472b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-float-2-c-short.out++ 3152579670b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-char.out++ 1138705949b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-double.out++ 2023313489b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-float.out++ 1706645581b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-int.out++ 1167102151b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-longdouble.out++ 853135804b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-longlong.out++ + 824095637b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-long.out++ 2845722513b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-pointer.out++ 1032279461b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-1-c-short.out++ 150139450b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-char.out++ 3993039563b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-double.out++ 1771341638b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-float.out++ 981734500b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-int.out++ 1272920488b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-longdouble.out++ 2082772967b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-longlong.out++ + 673250102b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-long.out++ 1447464664b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-pointer.out++ 2980070396b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-int-2-c-short.out++ + 3338202537b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/class-char-and-virtual.out + 836464684b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/class-int-and-virtual.out+ + 3651827794b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/class-long-and-virtual.out 978303701b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-char.out++ 1349831301b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-double.out++ 4055309409b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-float.out++ 281114634b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-int.out++ 1591591915b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-longdouble.out+ 1601182123b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-longlong.out++ + 2092387878b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-long.out++ 1167331858b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-pointer.out++ 1373996143b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-1-c-short.out++ 328768010b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-char.out++ 3391651497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-double.out++ 1331092866b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-float.out++ 1363762993b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-int.out++ 3764776043b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-longdouble.out+ 3487659489b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-longlong.out++ + 860525318b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-long.out++ 1919812282b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-pointer.out++ 2539788600b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-long-2-c-short.out++ 1261002308b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-longdouble-1-c-char.out+ *************** *** 3905,3943 **** 1049692423b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-double.out++ 1162385065b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-float.out++ 1723690768b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-int.out++ - 1122627681b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-long.out++ 1018652914b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-longlong.out 3157843542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-pointer.out+ 274267090b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-short.out++ 1856515882b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-char.out++ 1292784229b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-double.out++ 1950731775b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-float.out++ 1717751486b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-int.out++ - 1316628006b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-long.out++ 2591426150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-longlong.out 4115148406b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-pointer.out+ 2893089093b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-short.out++ 3269036579b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-char.out++ 327031780b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-double.out++ 1794337572b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-float.out++ 799398662b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-int.out++ - 294463294b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-long.out++ 82846972b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-longdouble.out 3028299097b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-longlong.out++ 3616473829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-pointer.out++ 4123209829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-short.out++ 2386618953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-char.out++ 337500653b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-double.out++ 2241141027b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-float.out++ 3329743364b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-int.out++ - 1783534270b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-long.out++ 3880624999b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-longdouble.out 3865506072b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-longlong.out++ 2891687422b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-pointer.out++ 3938727462b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-short.out++ - 3338202537b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/class-char-and-virtual.out - 836464684b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/class-int-and-virtual.out+ - 3651827794b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/class-long-and-virtual.out 2162077044b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/endian.out 2162077044b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/endian.out++ 3419137637b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-0-5.out --- 3766,3801 ---- 1049692423b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-double.out++ 1162385065b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-float.out++ 1723690768b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-int.out++ 1018652914b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-longlong.out + 1122627681b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-long.out++ 3157843542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-pointer.out+ 274267090b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-1-c-short.out++ 1856515882b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-char.out++ 1292784229b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-double.out++ 1950731775b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-float.out++ 1717751486b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-int.out++ 2591426150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-longlong.out + 1316628006b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-long.out++ 4115148406b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-pointer.out+ 2893089093b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-pointer-2-c-short.out++ 3269036579b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-char.out++ 327031780b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-double.out++ 1794337572b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-float.out++ 799398662b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-int.out++ 82846972b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-longdouble.out 3028299097b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-longlong.out++ + 294463294b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-long.out++ 3616473829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-pointer.out++ 4123209829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-1-c-short.out++ 2386618953b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-char.out++ 337500653b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-double.out++ 2241141027b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-float.out++ 3329743364b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-int.out++ 3880624999b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-longdouble.out 3865506072b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-longlong.out++ + 1783534270b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-long.out++ 2891687422b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-pointer.out++ 3938727462b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/c-short-2-c-short.out++ 2162077044b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/endian.out 2162077044b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/endian.out++ 3419137637b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-0-5.out *************** *** 3946,3959 **** 4063785218b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-20-17.out++ 3595644405b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-24-24.out 2437734191b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-24-24.out++ - 1776162150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-21-31.out - 1776162150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-21-31.out++ - 4292846411b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-3-1.out - 4292846411b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-3-1.out++ 3203785748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-10-11-10.out 3203785748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-10-11-10.out++ 3883743979b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-11-12-10.out 3883743979b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-11-12-10.out++ 268554786b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-14-22-10.out 268554786b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-14-22-10.out++ 3887247867b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-14-29-30.out --- 3804,3817 ---- 4063785218b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-20-17.out++ 3595644405b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-24-24.out 2437734191b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-0-24-24.out++ 3203785748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-10-11-10.out 3203785748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-10-11-10.out++ 3883743979b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-11-12-10.out 3883743979b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-11-12-10.out++ + 1776162150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-21-31.out + 1776162150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-21-31.out++ + 4292846411b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-3-1.out + 4292846411b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-1-3-1.out++ 268554786b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-14-22-10.out 268554786b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-14-22-10.out++ 3887247867b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-14-29-30.out *************** *** 3966,3975 **** 2504143009b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-15-1-22.out++ 285193031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-16-30-15.out 285193031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-16-30-15.out++ - 3346294426b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-2.out - 3346294426b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-2.out++ 1491637755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-20.out 1491637755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-20.out++ 2949641380b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-21-17.out 2949641380b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-21-17.out++ 3877885575b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-18-15-30.out --- 3824,3833 ---- 2504143009b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-15-1-22.out++ 285193031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-16-30-15.out 285193031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-16-30-15.out++ 1491637755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-20.out 1491637755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-20.out++ + 3346294426b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-2.out + 3346294426b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-17-2.out++ 2949641380b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-21-17.out 2949641380b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-17-21-17.out++ 3877885575b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-18-15-30.out *************** *** 3984,3991 **** 1291671333b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-18-5-16.out++ 1700775495b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-19-6-22.out 1700775495b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-19-6-22.out++ - 906364881b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-2-25-27.out - 906364881b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-2-25-27.out++ 123227249b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-20-19-9.out 123227249b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-20-19-9.out++ 1217631134b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-20-20-15.out --- 3842,3847 ---- *************** *** 4006,4011 **** --- 3862,3869 ---- 1675033355b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-22-2-19.out++ 419856428b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-22-2-28.out 419856428b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-22-2-28.out++ + 906364881b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-2-25-27.out + 906364881b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-2-25-27.out++ 2034059518b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-23-17-8.out 2034059518b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-23-17-8.out++ 4200924887b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-24-18-9.out *************** *** 4022,4029 **** 3387583484b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-29-16-7.out++ 2411254670b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-29-4-10.out 2411254670b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-29-4-10.out++ - 1816309710b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-3-7-1.out - 1816309710b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-3-7-1.out++ 1870571592b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-30-15-26.out 1870571592b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-30-15-26.out++ 1466032498b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-30-24-30.out --- 3880,3885 ---- *************** *** 4034,4045 **** --- 3890,3904 ---- 663265344b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-31-4-14.out++ 1272990598b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-31-9-0.out 785742212b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-31-9-0.out++ + 1816309710b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-3-7-1.out + 1816309710b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-3-7-1.out++ 4120030053b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-4-14-29.out 4120030053b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-4-14-29.out++ 140937946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-5-23-7.out 140937946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-5-23-7.out++ 1100765591b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-7-14-12.out 1100765591b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/f-7-14-12.out++ + 2156310103b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/README 13174497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-char.out 13174497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-char.out++ 1263879599b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-double.out *************** *** 4048,4059 **** 3169577204b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-float.out++ 3237207754b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-int.out 3237207754b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-int.out++ - 1717871431b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-long.out - 1717871431b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-long.out++ 300638802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longdouble.out 300638802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longdouble.out++ 851353395b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longlong.out 851353395b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longlong.out++ 2838094559b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-pointer.out 2838094559b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-pointer.out++ 4192163054b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-short.out --- 3907,3918 ---- 3169577204b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-float.out++ 3237207754b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-int.out 3237207754b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-int.out++ 300638802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longdouble.out 300638802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longdouble.out++ 851353395b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longlong.out 851353395b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-longlong.out++ + 1717871431b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-long.out + 1717871431b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-long.out++ 2838094559b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-pointer.out 2838094559b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-pointer.out++ 4192163054b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-a-short.out *************** *** 4066,4077 **** 3332841867b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-float.out++ 1726003194b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-int.out 1726003194b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-int.out++ - 1941216341b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-long.out - 1941216341b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-long.out++ 2075118149b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longdouble.out 2075118149b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longdouble.out++ 4051434430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longlong.out 4051434430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longlong.out++ 3517893171b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-pointer.out 3517893171b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-pointer.out++ 1361556762b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-ptrdiff_t.out --- 3925,3936 ---- 3332841867b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-float.out++ 1726003194b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-int.out 1726003194b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-int.out++ 2075118149b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longdouble.out 2075118149b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longdouble.out++ 4051434430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longlong.out 4051434430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-longlong.out++ + 1941216341b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-long.out + 1941216341b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-long.out++ 3517893171b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-pointer.out 3517893171b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-pointer.out++ 1361556762b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-ptrdiff_t.out *************** *** 4082,4113 **** 3472798323b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-double.out++ 1163555929b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-float.out 1163555929b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-float.out++ 611130168b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-int.out 611130168b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-int.out++ ! 3300687114b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-long.out ! 3300687114b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-long.out++ 1330421760b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longdouble.out 1330421760b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longdouble.out++ 2813748371b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longlong.out 2813748371b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longlong.out++ 622013241b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-pointer.out 622013241b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-pointer.out++ 2254695019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-short.out 2254695019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-short.out++ - 2797269136b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-short.out - 2797269136b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-short.out++ - 3946363802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-size_t.out - 3946363802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-size_t.out++ 782081091b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-wchar_t.out 782081091b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-wchar_t.out++ 4058125827b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-char.out 2028972393b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-char.out++ 2183773616b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-int.out 720666868b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-int.out++ - 3570596356b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-long.out - 3870166054b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-long.out++ 2722211350b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-longlong.out 3171703288b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-longlong.out++ 3936055108b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-short.out 2420900899b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-short.out++ 4236338674b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-char.out --- 3941,3972 ---- 3472798323b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-double.out++ 1163555929b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-float.out 1163555929b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-float.out++ + 2797269136b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-short.out + 2797269136b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-short.out++ 611130168b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-int.out 611130168b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-int.out++ ! 3946363802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-size_t.out ! 3946363802b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-size_t.out++ 1330421760b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longdouble.out 1330421760b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longdouble.out++ 2813748371b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longlong.out 2813748371b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-longlong.out++ + 3300687114b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-long.out + 3300687114b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-long.out++ 622013241b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-pointer.out 622013241b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-pointer.out++ 2254695019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-short.out 2254695019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-s-short.out++ 782081091b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-wchar_t.out 782081091b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-wchar_t.out++ 4058125827b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-char.out 2028972393b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-char.out++ 2183773616b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-int.out 720666868b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-int.out++ 2722211350b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-longlong.out 3171703288b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-longlong.out++ + 3570596356b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-long.out + 3870166054b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-long.out++ 3936055108b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-short.out 2420900899b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-char-zf-short.out++ 4236338674b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-char.out *************** *** 4118,4129 **** 424524236b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-float.out++ 2185924966b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-int.out 2185924966b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-int.out++ - 1377847542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-long.out - 1377847542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-long.out++ 3208408277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longdouble.out 3208408277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longdouble.out+ 616366511b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longlong.out 616366511b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longlong.out++ 1932644731b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-pointer.out 1932644731b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-pointer.out++ 2597633381b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-short.out --- 3977,3988 ---- 424524236b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-float.out++ 2185924966b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-int.out 2185924966b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-int.out++ 3208408277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longdouble.out 3208408277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longdouble.out+ 616366511b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longlong.out 616366511b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longlong.out++ + 1377847542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-long.out + 1377847542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-long.out++ 1932644731b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-pointer.out 1932644731b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-pointer.out++ 2597633381b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-short.out *************** *** 4136,4147 **** 3759577000b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-float.out++ 51600390b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-int.out 51600390b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-int.out++ - 3724144772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-long.out - 3724144772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-long.out++ 3808892329b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longdouble.out 3808892329b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longdouble.out++ 3894925976b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longlong.out 3894925976b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longlong.out++ 1869357795b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-pointer.out 1869357795b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-pointer.out++ 993350744b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-ptrdiff_t.out --- 3995,4006 ---- 3759577000b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-float.out++ 51600390b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-int.out 51600390b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-int.out++ 3808892329b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longdouble.out 3808892329b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longdouble.out++ 3894925976b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longlong.out 3894925976b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-longlong.out++ + 3724144772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-long.out + 3724144772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-long.out++ 1869357795b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-pointer.out 1869357795b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-pointer.out++ 993350744b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-ptrdiff_t.out *************** *** 4152,4183 **** 2223824125b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-double.out++ 3883069309b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-float.out 3883069309b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-float.out++ 2863998748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-int.out 2863998748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-int.out++ ! 2272464711b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-long.out ! 2272464711b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-long.out++ 1829775023b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longdouble.out 1829775023b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longdouble.out+ 284599855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longlong.out 284599855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longlong.out++ 598623650b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-pointer.out 598623650b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-pointer.out++ 2749602529b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-short.out 2749602529b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-short.out++ - 351083924b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-short.out - 351083924b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-short.out++ - 3505234855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-size_t.out - 3505234855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-size_t.out++ 3026762224b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-wchar_t.out 3026762224b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-wchar_t.out++ 3986574077b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-char.out 2222066822b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-char.out++ 1754736725b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-int.out 1559899710b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-int.out++ - 2138195968b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-long.out - 1206677029b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-long.out++ 3088104680b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-longlong.out 3583168624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-longlong.out++ 868552483b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-short.out 3855067152b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-short.out++ 424345382b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-char.out --- 4011,4042 ---- 2223824125b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-double.out++ 3883069309b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-float.out 3883069309b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-float.out++ + 351083924b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-short.out + 351083924b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-short.out++ 2863998748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-int.out 2863998748b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-int.out++ ! 3505234855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-size_t.out ! 3505234855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-size_t.out++ 1829775023b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longdouble.out 1829775023b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longdouble.out+ 284599855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longlong.out 284599855b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longlong.out++ + 2272464711b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-long.out + 2272464711b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-long.out++ 598623650b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-pointer.out 598623650b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-pointer.out++ 2749602529b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-short.out 2749602529b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-short.out++ 3026762224b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-wchar_t.out 3026762224b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-wchar_t.out++ 3986574077b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-char.out 2222066822b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-char.out++ 1754736725b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-int.out 1559899710b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-int.out++ 3088104680b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-longlong.out 3583168624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-longlong.out++ + 2138195968b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-long.out + 1206677029b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-long.out++ 868552483b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-short.out 3855067152b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-zf-short.out++ 424345382b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-char.out *************** *** 4188,4199 **** 1489296274b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-float.out++ 1250016403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-int.out 1250016403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-int.out++ - 2598597791b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-long.out - 2598597791b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-long.out++ 1568017389b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longdouble.out 1568017389b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longdouble.out++ 1248642357b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longlong.out 1248642357b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longlong.out++ 799116997b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-pointer.out 799116997b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-pointer.out++ 3756480259b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-short.out --- 4047,4058 ---- 1489296274b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-float.out++ 1250016403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-int.out 1250016403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-int.out++ 1568017389b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longdouble.out 1568017389b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longdouble.out++ 1248642357b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longlong.out 1248642357b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-longlong.out++ + 2598597791b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-long.out + 2598597791b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-long.out++ 799116997b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-pointer.out 799116997b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-pointer.out++ 3756480259b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-a-short.out *************** *** 4206,4217 **** 1556696261b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-float.out++ 1622170282b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-int.out 1622170282b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-int.out++ - 530122249b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-long.out - 530122249b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-long.out++ 1134958145b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longdouble.out 1134958145b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longdouble.out++ 3168453682b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longlong.out 3168453682b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longlong.out++ 2922640763b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-pointer.out 2922640763b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-pointer.out++ 4066163210b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-ptrdiff_t.out --- 4065,4076 ---- 1556696261b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-float.out++ 1622170282b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-int.out 1622170282b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-int.out++ 1134958145b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longdouble.out 1134958145b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longdouble.out++ 3168453682b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longlong.out 3168453682b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-longlong.out++ + 530122249b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-long.out + 530122249b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-long.out++ 2922640763b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-pointer.out 2922640763b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-pointer.out++ 4066163210b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-ptrdiff_t.out *************** *** 4222,4253 **** 1420738760b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-double.out++ 1009261265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-float.out 1009261265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-float.out++ 2256009544b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-int.out 2256009544b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-int.out++ ! 1389606757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-long.out ! 1389606757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-long.out++ 310608698b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longdouble.out 310608698b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longdouble.out++ 229917060b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longlong.out 229917060b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longlong.out++ 1605766695b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-pointer.out 1605766695b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-pointer.out++ 1493100197b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-short.out 1493100197b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-short.out++ - 233068758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-short.out - 233068758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-short.out++ - 3735342934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-size_t.out - 3735342934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-size_t.out++ 1525245762b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-wchar_t.out 1525245762b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-wchar_t.out++ 2458932893b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-char.out 2965855099b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-char.out++ 349006013b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-int.out 2335123085b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-int.out++ - 1137560689b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-long.out - 430614706b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-long.out++ 1503454956b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-longlong.out 2287857977b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-longlong.out++ 811714276b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-short.out 2579260275b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-short.out++ 3026572564b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-char.out --- 4081,4112 ---- 1420738760b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-double.out++ 1009261265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-float.out 1009261265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-float.out++ + 233068758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-short.out + 233068758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-short.out++ 2256009544b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-int.out 2256009544b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-int.out++ ! 3735342934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-size_t.out ! 3735342934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-size_t.out++ 310608698b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longdouble.out 310608698b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longdouble.out++ 229917060b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longlong.out 229917060b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-longlong.out++ + 1389606757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-long.out + 1389606757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-long.out++ 1605766695b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-pointer.out 1605766695b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-pointer.out++ 1493100197b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-short.out 1493100197b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-s-short.out++ 1525245762b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-wchar_t.out 1525245762b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-wchar_t.out++ 2458932893b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-char.out 2965855099b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-char.out++ 349006013b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-int.out 2335123085b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-int.out++ 1503454956b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-longlong.out 2287857977b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-longlong.out++ + 1137560689b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-long.out + 430614706b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-long.out++ 811714276b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-short.out 2579260275b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-float-zf-short.out++ 3026572564b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-char.out *************** *** 4258,4269 **** 879973237b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-float.out++ 3051633289b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-int.out 3051633289b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-int.out++ - 2062849219b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-long.out - 2062849219b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-long.out++ 2410327242b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longdouble.out 2410327242b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longdouble.out++ 3929531475b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longlong.out 3929531475b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longlong.out++ 3096965928b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-pointer.out 3096965928b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-pointer.out++ 1204833150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-short.out --- 4117,4128 ---- 879973237b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-float.out++ 3051633289b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-int.out 3051633289b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-int.out++ 2410327242b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longdouble.out 2410327242b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longdouble.out++ 3929531475b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longlong.out 3929531475b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-longlong.out++ + 2062849219b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-long.out + 2062849219b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-long.out++ 3096965928b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-pointer.out 3096965928b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-pointer.out++ 1204833150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-a-short.out *************** *** 4276,4287 **** 3856842277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-float.out++ 3890912034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-int.out 3890912034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-int.out++ - 162876982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-long.out - 162876982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-long.out++ 3592101251b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longdouble.out 3592101251b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longdouble.out++ 881354323b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longlong.out 881354323b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longlong.out++ 3497380019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-pointer.out 3497380019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-pointer.out++ 127240785b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-ptrdiff_t.out --- 4135,4146 ---- 3856842277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-float.out++ 3890912034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-int.out 3890912034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-int.out++ 3592101251b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longdouble.out 3592101251b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longdouble.out++ 881354323b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longlong.out 881354323b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-longlong.out++ + 162876982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-long.out + 162876982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-long.out++ 3497380019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-pointer.out 3497380019b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-pointer.out++ 127240785b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-ptrdiff_t.out *************** *** 4292,4325 **** 1788492129b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-double.out++ 3331892538b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-float.out 3331892538b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-float.out++ 446524396b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-int.out 446524396b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-int.out++ ! 751158190b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-long.out ! 751158190b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-long.out++ 476184310b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longdouble.out 476184310b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longdouble.out++ 4058854518b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longlong.out 4058854518b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longlong.out++ 1766070031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-pointer.out 1766070031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-pointer.out++ 2844975244b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-short.out 2844975244b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-short.out++ - 3410880438b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-short.out - 3410880438b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-short.out++ - 2907962645b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-size_t.out - 2907962645b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-size_t.out++ 496574257b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-wchar_t.out 496574257b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-wchar_t.out++ 3465834813b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-char.out 3886284191b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-char.out++ 1090439347b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-int.out 3979163905b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-int.out++ - 2400092189b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-long.out - 3700180902b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-long.out++ 2062836287b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-longlong.out 3075841449b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-longlong.out++ 2158685975b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-short.out 1012271831b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-short.out++ 1870109470b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-char.out 1870109470b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-char.out++ 1651744974b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-double.out --- 4151,4209 ---- 1788492129b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-double.out++ 3331892538b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-float.out 3331892538b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-float.out++ + 3410880438b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-short.out + 3410880438b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-short.out++ 446524396b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-int.out 446524396b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-int.out++ ! 2907962645b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-size_t.out ! 2907962645b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-size_t.out++ 476184310b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longdouble.out 476184310b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longdouble.out++ 4058854518b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longlong.out 4058854518b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-longlong.out++ + 751158190b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-long.out + 751158190b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-long.out++ 1766070031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-pointer.out 1766070031b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-pointer.out++ 2844975244b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-short.out 2844975244b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-s-short.out++ 496574257b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-wchar_t.out 496574257b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-wchar_t.out++ 3465834813b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-char.out 3886284191b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-char.out++ 1090439347b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-int.out 3979163905b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-int.out++ 2062836287b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-longlong.out 3075841449b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-longlong.out++ + 2400092189b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-long.out + 3700180902b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-long.out++ 2158685975b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-short.out 1012271831b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-int-zf-short.out++ + 4107261541b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-bool.out++ + 919632946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-char.out + 919632946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-char.out++ + 1524915532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-double.out + 1524915532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-double.out++ + 594930693b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-float.out + 594930693b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-float.out++ + 1957268000b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-int.out + 1957268000b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-int.out++ + 1658583497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longdouble.out + 1658583497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longdouble.out++ + 312453039b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longlong.out + 312453039b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longlong.out++ + 1244662439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-long.out + 1244662439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-long.out++ + 3802875737b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-pointer.out + 3802875737b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-pointer.out++ + 1324451320b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-ptrdiff.out + 1324451320b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-ptrdiff.out++ + 1620300254b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-short.out + 1620300254b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-short.out++ + 1933118540b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-size.out + 1933118540b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-size.out++ + 3741425609b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-wchar.out + 3741425609b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-wchar.out++ 1870109470b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-char.out 1870109470b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-char.out++ 1651744974b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-double.out *************** *** 4328,4395 **** 362585434b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-float.out++ 1163094327b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-int.out 1163094327b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-int.out++ - 3555956076b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-long.out - 3555956076b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-long.out++ 291703399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longdouble.out 291703399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longdouble.out++ 3762408624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longlong.out 3762408624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longlong.out++ 2332886721b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-pointer.out 2332886721b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-pointer.out++ 2480870612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-short.out 2480870612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-short.out++ 2916189460b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-char.out 2916189460b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-char.out++ - 497513900b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-double.out - 497513900b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-double.out++ - 2489472050b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-float.out - 2489472050b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-float.out++ - 2743476630b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-int.out - 2743476630b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-int.out++ - 2654575439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-long.out - 2654575439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-long.out++ - 3665863579b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longdouble.out - 3665863579b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longdouble.out++ - 4020247482b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longlong.out - 4020247482b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longlong.out++ - 628108037b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-pointer.out - 628108037b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-pointer.out++ - 1311213846b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-ptrdiff_t.out - 1311213846b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-ptrdiff_t.out++ - 2141238480b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-char.out - 2141238480b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-char.out++ - 1859208772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-double.out - 1859208772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-double.out++ - 4206164034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-float.out - 4206164034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-float.out++ - 3679940725b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-int.out - 3679940725b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-int.out++ - 2261218946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-long.out - 2261218946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-long.out++ - 3251153332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longdouble.out - 3251153332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longdouble.out++ - 247594466b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longlong.out - 247594466b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longlong.out++ - 3759513989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-pointer.out - 3759513989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-pointer.out++ - 3008225932b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-short.out - 3008225932b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-short.out++ - 945387931b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-short.out - 945387931b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-short.out++ - 2232487072b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-size_t.out - 2232487072b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-size_t.out++ - 3661856117b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-wchar_t.out - 3661856117b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-wchar_t.out++ - 2003883578b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-char.out - 1185711188b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-char.out++ - 79396233b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-int.out - 347581897b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-int.out++ - 1379940925b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-long.out - 3639419163b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-long.out++ - 2617412395b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-longlong.out - 2872220966b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-longlong.out++ - 1812574077b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-short.out - 2920229150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-short.out++ 2502123578b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-a-char.out 2502123578b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-a-char.out++ 908745179b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-a-double.out --- 4212,4229 ---- 362585434b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-float.out++ 1163094327b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-int.out 1163094327b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-int.out++ 291703399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longdouble.out 291703399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longdouble.out++ 3762408624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longlong.out 3762408624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-longlong.out++ + 3555956076b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-long.out + 3555956076b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-long.out++ 2332886721b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-pointer.out 2332886721b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-pointer.out++ 2480870612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-short.out 2480870612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-a-short.out++ 2916189460b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-char.out 2916189460b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-char.out++ 2502123578b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-a-char.out 2502123578b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-a-char.out++ 908745179b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-a-double.out *************** *** 4411,4420 **** 3081730244b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-float.out++ 830680808b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-int.out 830680808b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-int.out++ - 1437253678b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-long.out - 1437253678b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-long.out++ 4111931150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-longlong.out 4111931150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-longlong.out+ 3184654982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-pointer.out 3184654982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-pointer.out++ 2209121894b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-ptrdiff_t.out --- 4245,4256 ---- 3081730244b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-float.out++ 830680808b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-int.out 830680808b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-int.out++ 4111931150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-longlong.out 4111931150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-longlong.out+ + 1437253678b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-long.out + 1437253678b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-long.out++ + 497513900b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-double.out + 497513900b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-double.out++ 3184654982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-pointer.out 3184654982b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-pointer.out++ 2209121894b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-ptrdiff_t.out *************** *** 4424,4440 **** 1592572645b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-double.out+ 2123592192b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-float.out 2123592192b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-float.out++ 2058112871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-int.out 2058112871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-int.out++ 1209643017b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-long.out 1209643017b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-long.out++ 137221407b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-pointer.out 2707233896b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-short.out 2707233896b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-short.out++ - 1624565665b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-short.out - 1624565665b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-short.out++ - 18114278b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-size_t.out - 18114278b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-size_t.out++ 2306040258b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-wchar_t.out 2306040258b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-wchar_t.out++ 561421555b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-zf-char.out --- 4260,4276 ---- 1592572645b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-double.out+ 2123592192b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-float.out 2123592192b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-float.out++ + 1624565665b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-short.out + 1624565665b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-short.out++ 2058112871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-int.out 2058112871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-int.out++ + 18114278b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-size_t.out + 18114278b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-size_t.out++ 1209643017b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-long.out 1209643017b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-long.out++ 137221407b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-pointer.out 2707233896b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-short.out 2707233896b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-s-short.out++ 2306040258b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-wchar_t.out 2306040258b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-wchar_t.out++ 561421555b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-zf-char.out *************** *** 4445,4450 **** --- 4281,4290 ---- 1403753192b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-zf-long.out++ 2463066035b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-zf-short.out 24031023b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longdouble-zf-short.out+ + 2489472050b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-float.out + 2489472050b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-float.out++ + 2743476630b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-int.out + 2743476630b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-int.out++ 2821438118b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-char.out 2821438118b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-char.out++ 44039327b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-double.out *************** *** 4453,4480 **** 3941392051b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-float.out++ 2609834450b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-int.out 2609834450b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-int.out++ - 3407178115b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-long.out - 3407178115b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-long.out++ 2868812260b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-longlong.out 2868812260b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-longlong.out+ 855452388b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-pointer.out 855452388b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-pointer.out++ 3186715271b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-short.out 3186715271b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-short.out++ 3073461247b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-char.out 3073461247b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-char.out++ 3026224568b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-double.out 3026224568b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-double.out++ 1191292162b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-float.out 1191292162b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-float.out++ 1548870351b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-int.out 1548870351b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-int.out++ - 470378869b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-long.out - 470378869b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-long.out++ 3829659624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longdouble.out 3829659624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longdouble.out+ 1372837239b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longlong.out 1372837239b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longlong.out++ 3536102064b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-pointer.out 3536102064b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-pointer.out++ 579862700b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-ptrdiff_t.out --- 4293,4326 ---- 3941392051b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-float.out++ 2609834450b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-int.out 2609834450b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-int.out++ 2868812260b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-longlong.out 2868812260b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-longlong.out+ + 3407178115b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-long.out + 3407178115b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-long.out++ 855452388b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-pointer.out 855452388b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-pointer.out++ 3186715271b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-short.out 3186715271b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-a-short.out++ 3073461247b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-char.out 3073461247b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-char.out++ + 3665863579b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longdouble.out + 3665863579b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longdouble.out++ 3026224568b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-double.out 3026224568b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-double.out++ 1191292162b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-float.out 1191292162b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-float.out++ 1548870351b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-int.out 1548870351b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-int.out++ 3829659624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longdouble.out 3829659624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longdouble.out+ 1372837239b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longlong.out 1372837239b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-longlong.out++ + 4020247482b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longlong.out + 4020247482b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-longlong.out++ + 470378869b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-long.out + 470378869b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-long.out++ + 2654575439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-long.out + 2654575439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-long.out++ 3536102064b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-pointer.out 3536102064b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-pointer.out++ 579862700b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-ptrdiff_t.out *************** *** 4485,4515 **** 397921610b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-double.out++ 2538191755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-float.out 2538191755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-float.out++ 4237589805b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-int.out 4237589805b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-int.out++ ! 3782463750b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-long.out ! 3782463750b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-long.out++ 1624025758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-longlong.out 1624025758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-longlong.out+ 1972186934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-pointer.out 1972186934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-pointer.out++ 829099133b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-short.out 829099133b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-short.out++ - 1971310399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-short.out - 1971310399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-short.out++ - 2419011586b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-size_t.out - 2419011586b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-size_t.out++ 1350491757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-wchar_t.out 1350491757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-wchar_t.out++ 2215666329b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-char.out 745407154b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-char.out++ 140198870b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-int.out 3397457298b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-int.out++ 904046880b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-long.out 2657286993b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-long.out++ - 972059489b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-longlong.out 2804701286b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-short.out 22008069b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-short.out++ 638071746b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-char.out 638071746b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-char.out++ 3332432545b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-double.out --- 4331,4399 ---- 397921610b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-double.out++ 2538191755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-float.out 2538191755b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-float.out++ + 1971310399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-short.out + 1971310399b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-short.out++ 4237589805b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-int.out 4237589805b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-int.out++ ! 2419011586b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-size_t.out ! 2419011586b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-size_t.out++ 1624025758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-longlong.out 1624025758b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-longlong.out+ + 3782463750b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-long.out + 3782463750b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-long.out++ 1972186934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-pointer.out 1972186934b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-pointer.out++ 829099133b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-short.out 829099133b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-s-short.out++ 1350491757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-wchar_t.out 1350491757b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-wchar_t.out++ 2215666329b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-char.out 745407154b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-char.out++ 140198870b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-int.out 3397457298b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-int.out++ + 972059489b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-longlong.out 904046880b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-long.out 2657286993b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-long.out++ 2804701286b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-short.out 22008069b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-longlong-zf-short.out++ + 628108037b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-pointer.out + 628108037b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-pointer.out++ + 1311213846b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-ptrdiff_t.out + 1311213846b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-ptrdiff_t.out++ + 2141238480b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-char.out + 2141238480b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-char.out++ + 1859208772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-double.out + 1859208772b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-double.out++ + 4206164034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-float.out + 4206164034b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-float.out++ + 945387931b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-short.out + 945387931b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-short.out++ + 3679940725b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-int.out + 3679940725b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-int.out++ + 2232487072b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-size_t.out + 2232487072b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-size_t.out++ + 3251153332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longdouble.out + 3251153332b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longdouble.out++ + 247594466b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longlong.out + 247594466b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-longlong.out++ + 2261218946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-long.out + 2261218946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-long.out++ + 3759513989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-pointer.out + 3759513989b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-pointer.out++ + 3008225932b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-short.out + 3008225932b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-s-short.out++ + 3661856117b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-wchar_t.out + 3661856117b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-wchar_t.out++ + 2003883578b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-char.out + 1185711188b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-char.out++ + 79396233b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-int.out + 347581897b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-int.out++ + 2617412395b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-longlong.out + 2872220966b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-longlong.out++ + 1379940925b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-long.out + 3639419163b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-long.out++ + 1812574077b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-short.out + 2920229150b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-long-zf-short.out++ 638071746b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-char.out 638071746b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-char.out++ 3332432545b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-double.out *************** *** 4518,4528 **** 1534334155b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-float.out++ 3880550727b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-int.out 3880550727b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-int.out++ - 180275403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-long.out - 180275403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-long.out++ 251411986b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-longdouble.out 2493905430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-longlong.out 2493905430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-longlong.out++ 1868637423b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-pointer.out 1868637423b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-pointer.out++ 3971852122b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-short.out --- 4402,4412 ---- 1534334155b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-float.out++ 3880550727b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-int.out 3880550727b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-int.out++ 251411986b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-longdouble.out 2493905430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-longlong.out 2493905430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-longlong.out++ + 180275403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-long.out + 180275403b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-long.out++ 1868637423b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-pointer.out 1868637423b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-pointer.out++ 3971852122b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-a-short.out *************** *** 4535,4546 **** 3364520721b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-float.out++ 2026186277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-int.out 2026186277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-int.out++ - 554032384b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-long.out - 554032384b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-long.out++ 1274562854b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longdouble.out 1274562854b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longdouble.out++ 2670045344b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longlong.out 2670045344b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longlong.out++ 2655788537b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-pointer.out 2655788537b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-pointer.out++ 797630104b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-ptrdiff_t.out --- 4419,4430 ---- 3364520721b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-float.out++ 2026186277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-int.out 2026186277b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-int.out++ 1274562854b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longdouble.out 1274562854b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longdouble.out++ 2670045344b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longlong.out 2670045344b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-longlong.out++ + 554032384b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-long.out + 554032384b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-long.out++ 2655788537b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-pointer.out 2655788537b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-pointer.out++ 797630104b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-ptrdiff_t.out *************** *** 4551,4581 **** 4073638002b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-double.out++ 3219629814b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-float.out 3219629814b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-float.out++ 2810751409b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-int.out 2810751409b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-int.out++ ! 4193535248b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-long.out ! 4193535248b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-long.out++ 2708502837b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-longdouble.out 753682265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-longlong.out 753682265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-longlong.out++ 554657656b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-pointer.out 554657656b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-pointer.out++ 843107606b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-short.out 843107606b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-short.out++ - 3050131671b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-short.out - 3050131671b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-short.out++ - 3655683515b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-size_t.out - 3655683515b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-size_t.out++ 2293091315b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-wchar_t.out 2293091315b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-wchar_t.out++ 1599802745b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-char.out 3264566923b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-char.out++ 2587475685b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-int.out 1005185879b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-int.out++ - 273113417b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-long.out - 3825433163b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-long.out++ 2426330969b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-longlong.out 3112366542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-longlong.out+ 1180077740b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-short.out 875920723b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-short.out++ 2651380458b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-char.out --- 4435,4465 ---- 4073638002b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-double.out++ 3219629814b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-float.out 3219629814b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-float.out++ + 3050131671b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-short.out + 3050131671b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-short.out++ 2810751409b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-int.out 2810751409b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-int.out++ ! 3655683515b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-size_t.out ! 3655683515b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-size_t.out++ 2708502837b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-longdouble.out 753682265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-longlong.out 753682265b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-longlong.out++ + 4193535248b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-long.out + 4193535248b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-long.out++ 554657656b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-pointer.out 554657656b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-pointer.out++ 843107606b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-short.out 843107606b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-s-short.out++ 2293091315b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-wchar_t.out 2293091315b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-wchar_t.out++ 1599802745b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-char.out 3264566923b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-char.out++ 2587475685b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-int.out 1005185879b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-int.out++ 2426330969b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-longlong.out 3112366542b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-longlong.out+ + 273113417b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-long.out + 3825433163b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-long.out++ 1180077740b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-short.out 875920723b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-pointer-zf-short.out++ 2651380458b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-char.out *************** *** 4586,4596 **** 2483342b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-float.out++ 3030027871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-int.out 3030027871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-int.out++ - 2742634608b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-long.out - 2742634608b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-long.out++ 842815367b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-longdouble.out 2374908820b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-longlong.out 2374908820b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-longlong.out++ 1105378681b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-pointer.out 1105378681b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-pointer.out++ 2222112016b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-ptrdiff_t.out --- 4470,4480 ---- 2483342b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-float.out++ 3030027871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-int.out 3030027871b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-int.out++ 842815367b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-longdouble.out 2374908820b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-longlong.out 2374908820b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-longlong.out++ + 2742634608b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-long.out + 2742634608b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-long.out++ 1105378681b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-pointer.out 1105378681b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-pointer.out++ 2222112016b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-ptrdiff_t-ptrdiff_t.out *************** *** 4609,4620 **** 3441673581b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-float.out++ 911216572b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-int.out 911216572b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-int.out++ - 1537969173b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-long.out - 1537969173b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-long.out++ 3193177612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longdouble.out 3193177612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longdouble.out++ 3997296607b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longlong.out 3997296607b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longlong.out++ 364952624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-pointer.out 364952624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-pointer.out++ 970855379b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-short.out --- 4493,4504 ---- 3441673581b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-float.out++ 911216572b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-int.out 911216572b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-int.out++ 3193177612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longdouble.out 3193177612b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longdouble.out++ 3997296607b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longlong.out 3997296607b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-longlong.out++ + 1537969173b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-long.out + 1537969173b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-long.out++ 364952624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-pointer.out 364952624b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-pointer.out++ 970855379b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-a-short.out *************** *** 4627,4638 **** 3721234230b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-float.out++ 1012475701b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-int.out 1012475701b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-int.out++ - 3766414610b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-long.out - 3766414610b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-long.out++ 2555149638b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longdouble.out 2555149638b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longdouble.out++ 2273094318b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longlong.out 2273094318b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longlong.out++ 1639107229b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-pointer.out 1639107229b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-pointer.out++ 1075156439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-ptrdiff_t.out --- 4511,4522 ---- 3721234230b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-float.out++ 1012475701b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-int.out 1012475701b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-int.out++ 2555149638b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longdouble.out 2555149638b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longdouble.out++ 2273094318b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longlong.out 2273094318b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-longlong.out++ + 3766414610b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-long.out + 3766414610b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-long.out++ 1639107229b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-pointer.out 1639107229b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-pointer.out++ 1075156439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-ptrdiff_t.out *************** *** 4643,4674 **** 2528716480b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-double.out++ 785209287b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-float.out 785209287b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-float.out++ 1126071492b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-int.out 1126071492b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-int.out++ ! 1435590236b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-long.out ! 1435590236b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-long.out++ 3460438392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longdouble.out 3460438392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longdouble.out++ 1289753849b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longlong.out 1289753849b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longlong.out++ 1476260714b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-pointer.out 1476260714b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-pointer.out++ 500188532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-short.out 500188532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-short.out++ - 2164738263b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-short.out - 2164738263b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-short.out++ - 3593875829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-size_t.out - 3593875829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-size_t.out++ 2506643620b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-wchar_t.out 2506643620b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-wchar_t.out++ 3126905441b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-char.out 1940799148b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-char.out++ 1010693185b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-int.out 1212564314b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-int.out++ - 1799180429b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-long.out - 3670265189b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-long.out++ 2599781179b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-longlong.out 3990788430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-longlong.out++ 412178968b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-short.out 1523910308b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-short.out++ 177607961b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-char.out --- 4527,4558 ---- 2528716480b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-double.out++ 785209287b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-float.out 785209287b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-float.out++ + 2164738263b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-short.out + 2164738263b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-short.out++ 1126071492b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-int.out 1126071492b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-int.out++ ! 3593875829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-size_t.out ! 3593875829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-size_t.out++ 3460438392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longdouble.out 3460438392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longdouble.out++ 1289753849b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longlong.out 1289753849b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-longlong.out++ + 1435590236b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-long.out + 1435590236b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-long.out++ 1476260714b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-pointer.out 1476260714b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-pointer.out++ 500188532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-short.out 500188532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-s-short.out++ 2506643620b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-wchar_t.out 2506643620b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-wchar_t.out++ 3126905441b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-char.out 1940799148b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-char.out++ 1010693185b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-int.out 1212564314b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-int.out++ 2599781179b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-longlong.out 3990788430b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-longlong.out++ + 1799180429b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-long.out + 3670265189b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-long.out++ 412178968b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-short.out 1523910308b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-short-zf-short.out++ 177607961b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-char.out *************** *** 4679,4690 **** 2227123143b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-float.out++ 2732243950b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-int.out 2732243950b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-int.out++ - 978381513b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-long.out - 978381513b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-long.out++ 2655501391b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longdouble.out 2655501391b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longdouble.out++ 3487867828b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longlong.out 3487867828b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longlong.out++ 4141092354b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-pointer.out 4141092354b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-pointer.out++ 282420262b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-ptrdiff_t.out --- 4563,4574 ---- 2227123143b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-float.out++ 2732243950b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-int.out 2732243950b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-int.out++ 2655501391b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longdouble.out 2655501391b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longdouble.out++ 3487867828b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longlong.out 3487867828b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-longlong.out++ + 978381513b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-long.out + 978381513b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-long.out++ 4141092354b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-pointer.out 4141092354b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-pointer.out++ 282420262b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-size_t-ptrdiff_t.out *************** *** 4703,4714 **** 4175033844b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-float.out++ 2745764679b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-int.out 2745764679b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-int.out++ - 2937616530b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-long.out - 2937616530b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-long.out++ 3007141392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longdouble.out 3007141392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longdouble.out++ 1445387844b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longlong.out 1445387844b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longlong.out++ 2501204111b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-pointer.out 2501204111b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-pointer.out++ 887379829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-ptrdiff_t.out --- 4587,4598 ---- 4175033844b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-float.out++ 2745764679b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-int.out 2745764679b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-int.out++ 3007141392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longdouble.out 3007141392b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longdouble.out++ 1445387844b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longlong.out 1445387844b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-longlong.out++ + 2937616530b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-long.out + 2937616530b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-long.out++ 2501204111b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-pointer.out 2501204111b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-pointer.out++ 887379829b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-ptrdiff_t.out *************** *** 4719,4749 **** 676320345b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-size_t.out++ 2213842565b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-wchar_t.out 2213842565b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-wchar_t-wchar_t.out++ - 4107261541b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-bool.out++ - 919632946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-char.out - 919632946b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-char.out++ - 1524915532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-double.out - 1524915532b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-double.out++ - 594930693b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-float.out - 594930693b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-float.out++ - 1957268000b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-int.out - 1957268000b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-int.out++ - 1244662439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-long.out - 1244662439b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-long.out++ - 1658583497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longdouble.out - 1658583497b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longdouble.out++ - 312453039b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longlong.out - 312453039b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-longlong.out++ - 3802875737b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-pointer.out - 3802875737b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-pointer.out++ - 1324451320b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-ptrdiff.out - 1324451320b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-ptrdiff.out++ - 1620300254b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-short.out - 1620300254b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-short.out++ - 1933118540b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-size.out - 1933118540b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-size.out++ - 3741425609b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-wchar.out - 3741425609b ./gcc/testsuite/consistency.vlad/layout/i960-97r2-results/size-wchar.out++ 2700306833b ./gcc/testsuite/consistency.vlad/layout/minimal-struct-size-align.c 3619982975b ./gcc/testsuite/consistency.vlad/layout/s-char-a-char.c 727040386b ./gcc/testsuite/consistency.vlad/layout/s-char-a-double.c --- 4603,4608 ---- *************** *** 4766,4779 **** 1919204038b ./gcc/testsuite/consistency.vlad/layout/s-char-s-char.c 2356076301b ./gcc/testsuite/consistency.vlad/layout/s-char-s-double.c 765329706b ./gcc/testsuite/consistency.vlad/layout/s-char-s-float.c 3351760677b ./gcc/testsuite/consistency.vlad/layout/s-char-s-int.c 1763672929b ./gcc/testsuite/consistency.vlad/layout/s-char-s-long.c 1834388031b ./gcc/testsuite/consistency.vlad/layout/s-char-s-longdouble.c 559076232b ./gcc/testsuite/consistency.vlad/layout/s-char-s-longlong.c 2344655103b ./gcc/testsuite/consistency.vlad/layout/s-char-s-pointer.c 220067620b ./gcc/testsuite/consistency.vlad/layout/s-char-s-short.c - 3605211274b ./gcc/testsuite/consistency.vlad/layout/s-char-short.c - 3130164308b ./gcc/testsuite/consistency.vlad/layout/s-char-size_t.c 4159231551b ./gcc/testsuite/consistency.vlad/layout/s-char-wchar_t.c 2462993036b ./gcc/testsuite/consistency.vlad/layout/s-char-zf-char.c 541003594b ./gcc/testsuite/consistency.vlad/layout/s-char-zf-int.c --- 4625,4638 ---- 1919204038b ./gcc/testsuite/consistency.vlad/layout/s-char-s-char.c 2356076301b ./gcc/testsuite/consistency.vlad/layout/s-char-s-double.c 765329706b ./gcc/testsuite/consistency.vlad/layout/s-char-s-float.c + 3605211274b ./gcc/testsuite/consistency.vlad/layout/s-char-short.c 3351760677b ./gcc/testsuite/consistency.vlad/layout/s-char-s-int.c + 3130164308b ./gcc/testsuite/consistency.vlad/layout/s-char-size_t.c 1763672929b ./gcc/testsuite/consistency.vlad/layout/s-char-s-long.c 1834388031b ./gcc/testsuite/consistency.vlad/layout/s-char-s-longdouble.c 559076232b ./gcc/testsuite/consistency.vlad/layout/s-char-s-longlong.c 2344655103b ./gcc/testsuite/consistency.vlad/layout/s-char-s-pointer.c 220067620b ./gcc/testsuite/consistency.vlad/layout/s-char-s-short.c 4159231551b ./gcc/testsuite/consistency.vlad/layout/s-char-wchar_t.c 2462993036b ./gcc/testsuite/consistency.vlad/layout/s-char-zf-char.c 541003594b ./gcc/testsuite/consistency.vlad/layout/s-char-zf-int.c *************** *** 4801,4814 **** 1892057278b ./gcc/testsuite/consistency.vlad/layout/s-double-s-char.c 2394566615b ./gcc/testsuite/consistency.vlad/layout/s-double-s-double.c 4064931917b ./gcc/testsuite/consistency.vlad/layout/s-double-s-float.c 3672946380b ./gcc/testsuite/consistency.vlad/layout/s-double-s-int.c 4099130503b ./gcc/testsuite/consistency.vlad/layout/s-double-s-long.c 2508841997b ./gcc/testsuite/consistency.vlad/layout/s-double-s-longdouble.c 2547516874b ./gcc/testsuite/consistency.vlad/layout/s-double-s-longlong.c 2394584890b ./gcc/testsuite/consistency.vlad/layout/s-double-s-pointer.c 1087857878b ./gcc/testsuite/consistency.vlad/layout/s-double-s-short.c - 1137455402b ./gcc/testsuite/consistency.vlad/layout/s-double-short.c - 3731114983b ./gcc/testsuite/consistency.vlad/layout/s-double-size_t.c 1074227714b ./gcc/testsuite/consistency.vlad/layout/s-double-wchar_t.c 4075513176b ./gcc/testsuite/consistency.vlad/layout/s-double-zf-char.c 2181060239b ./gcc/testsuite/consistency.vlad/layout/s-double-zf-int.c --- 4660,4673 ---- 1892057278b ./gcc/testsuite/consistency.vlad/layout/s-double-s-char.c 2394566615b ./gcc/testsuite/consistency.vlad/layout/s-double-s-double.c 4064931917b ./gcc/testsuite/consistency.vlad/layout/s-double-s-float.c + 1137455402b ./gcc/testsuite/consistency.vlad/layout/s-double-short.c 3672946380b ./gcc/testsuite/consistency.vlad/layout/s-double-s-int.c + 3731114983b ./gcc/testsuite/consistency.vlad/layout/s-double-size_t.c 4099130503b ./gcc/testsuite/consistency.vlad/layout/s-double-s-long.c 2508841997b ./gcc/testsuite/consistency.vlad/layout/s-double-s-longdouble.c 2547516874b ./gcc/testsuite/consistency.vlad/layout/s-double-s-longlong.c 2394584890b ./gcc/testsuite/consistency.vlad/layout/s-double-s-pointer.c 1087857878b ./gcc/testsuite/consistency.vlad/layout/s-double-s-short.c 1074227714b ./gcc/testsuite/consistency.vlad/layout/s-double-wchar_t.c 4075513176b ./gcc/testsuite/consistency.vlad/layout/s-double-zf-char.c 2181060239b ./gcc/testsuite/consistency.vlad/layout/s-double-zf-int.c *************** *** 4836,4849 **** 3748837421b ./gcc/testsuite/consistency.vlad/layout/s-float-s-char.c 1026162480b ./gcc/testsuite/consistency.vlad/layout/s-float-s-double.c 1757829971b ./gcc/testsuite/consistency.vlad/layout/s-float-s-float.c 1286304248b ./gcc/testsuite/consistency.vlad/layout/s-float-s-int.c 1058880033b ./gcc/testsuite/consistency.vlad/layout/s-float-s-long.c 3954384291b ./gcc/testsuite/consistency.vlad/layout/s-float-s-longdouble.c 2151659662b ./gcc/testsuite/consistency.vlad/layout/s-float-s-longlong.c 3825039217b ./gcc/testsuite/consistency.vlad/layout/s-float-s-pointer.c 4061428355b ./gcc/testsuite/consistency.vlad/layout/s-float-s-short.c - 1092900439b ./gcc/testsuite/consistency.vlad/layout/s-float-short.c - 1246576103b ./gcc/testsuite/consistency.vlad/layout/s-float-size_t.c 1758331367b ./gcc/testsuite/consistency.vlad/layout/s-float-wchar_t.c 3117484708b ./gcc/testsuite/consistency.vlad/layout/s-float-zf-char.c 550306535b ./gcc/testsuite/consistency.vlad/layout/s-float-zf-int.c --- 4695,4708 ---- 3748837421b ./gcc/testsuite/consistency.vlad/layout/s-float-s-char.c 1026162480b ./gcc/testsuite/consistency.vlad/layout/s-float-s-double.c 1757829971b ./gcc/testsuite/consistency.vlad/layout/s-float-s-float.c + 1092900439b ./gcc/testsuite/consistency.vlad/layout/s-float-short.c 1286304248b ./gcc/testsuite/consistency.vlad/layout/s-float-s-int.c + 1246576103b ./gcc/testsuite/consistency.vlad/layout/s-float-size_t.c 1058880033b ./gcc/testsuite/consistency.vlad/layout/s-float-s-long.c 3954384291b ./gcc/testsuite/consistency.vlad/layout/s-float-s-longdouble.c 2151659662b ./gcc/testsuite/consistency.vlad/layout/s-float-s-longlong.c 3825039217b ./gcc/testsuite/consistency.vlad/layout/s-float-s-pointer.c 4061428355b ./gcc/testsuite/consistency.vlad/layout/s-float-s-short.c 1758331367b ./gcc/testsuite/consistency.vlad/layout/s-float-wchar_t.c 3117484708b ./gcc/testsuite/consistency.vlad/layout/s-float-zf-char.c 550306535b ./gcc/testsuite/consistency.vlad/layout/s-float-zf-int.c *************** *** 4871,4890 **** 2014925874b ./gcc/testsuite/consistency.vlad/layout/s-int-s-char.c 1964724618b ./gcc/testsuite/consistency.vlad/layout/s-int-s-double.c 3513841278b ./gcc/testsuite/consistency.vlad/layout/s-int-s-float.c 1905836586b ./gcc/testsuite/consistency.vlad/layout/s-int-s-int.c 2587799721b ./gcc/testsuite/consistency.vlad/layout/s-int-s-long.c 3343583899b ./gcc/testsuite/consistency.vlad/layout/s-int-s-longdouble.c 3181309941b ./gcc/testsuite/consistency.vlad/layout/s-int-s-longlong.c 3198349197b ./gcc/testsuite/consistency.vlad/layout/s-int-s-pointer.c 1300436407b ./gcc/testsuite/consistency.vlad/layout/s-int-s-short.c - 3104696131b ./gcc/testsuite/consistency.vlad/layout/s-int-short.c - 2371102487b ./gcc/testsuite/consistency.vlad/layout/s-int-size_t.c 1358869671b ./gcc/testsuite/consistency.vlad/layout/s-int-wchar_t.c 2934034901b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-char.c 3777217979b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-int.c 823148372b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-long.c 55540591b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-longlong.c 3825926612b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-short.c 1014160019b ./gcc/testsuite/consistency.vlad/layout/s-long-a-char.c 1536711874b ./gcc/testsuite/consistency.vlad/layout/s-long-a-double.c 3755724289b ./gcc/testsuite/consistency.vlad/layout/s-long-a-float.c --- 4730,4762 ---- 2014925874b ./gcc/testsuite/consistency.vlad/layout/s-int-s-char.c 1964724618b ./gcc/testsuite/consistency.vlad/layout/s-int-s-double.c 3513841278b ./gcc/testsuite/consistency.vlad/layout/s-int-s-float.c + 3104696131b ./gcc/testsuite/consistency.vlad/layout/s-int-short.c 1905836586b ./gcc/testsuite/consistency.vlad/layout/s-int-s-int.c + 2371102487b ./gcc/testsuite/consistency.vlad/layout/s-int-size_t.c 2587799721b ./gcc/testsuite/consistency.vlad/layout/s-int-s-long.c 3343583899b ./gcc/testsuite/consistency.vlad/layout/s-int-s-longdouble.c 3181309941b ./gcc/testsuite/consistency.vlad/layout/s-int-s-longlong.c 3198349197b ./gcc/testsuite/consistency.vlad/layout/s-int-s-pointer.c 1300436407b ./gcc/testsuite/consistency.vlad/layout/s-int-s-short.c 1358869671b ./gcc/testsuite/consistency.vlad/layout/s-int-wchar_t.c 2934034901b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-char.c 3777217979b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-int.c 823148372b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-long.c 55540591b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-longlong.c 3825926612b ./gcc/testsuite/consistency.vlad/layout/s-int-zf-short.c + 1746672839b ./gcc/testsuite/consistency.vlad/layout/size-bool.cpp + 1662052327b ./gcc/testsuite/consistency.vlad/layout/size-char.c + 3361924014b ./gcc/testsuite/consistency.vlad/layout/size-double.c + 3608174439b ./gcc/testsuite/consistency.vlad/layout/size-float.c + 224133749b ./gcc/testsuite/consistency.vlad/layout/size-int.c + 2229647371b ./gcc/testsuite/consistency.vlad/layout/size-long.c + 1496097293b ./gcc/testsuite/consistency.vlad/layout/size-longdouble.c + 4243493805b ./gcc/testsuite/consistency.vlad/layout/size-longlong.c + 4234774016b ./gcc/testsuite/consistency.vlad/layout/size-pointer.c + 2742276437b ./gcc/testsuite/consistency.vlad/layout/size-ptrdiff.c + 2302838291b ./gcc/testsuite/consistency.vlad/layout/size-short.c + 1008704183b ./gcc/testsuite/consistency.vlad/layout/size-size.c + 767395346b ./gcc/testsuite/consistency.vlad/layout/size-wchar.c 1014160019b ./gcc/testsuite/consistency.vlad/layout/s-long-a-char.c 1536711874b ./gcc/testsuite/consistency.vlad/layout/s-long-a-double.c 3755724289b ./gcc/testsuite/consistency.vlad/layout/s-long-a-float.c *************** *** 4895,4925 **** 4219127792b ./gcc/testsuite/consistency.vlad/layout/s-long-a-pointer.c 1534004990b ./gcc/testsuite/consistency.vlad/layout/s-long-a-short.c 34352633b ./gcc/testsuite/consistency.vlad/layout/s-long-char.c - 1855339665b ./gcc/testsuite/consistency.vlad/layout/s-long-double.c - 1325299293b ./gcc/testsuite/consistency.vlad/layout/s-long-float.c - 1780742682b ./gcc/testsuite/consistency.vlad/layout/s-long-int.c - 2290380505b ./gcc/testsuite/consistency.vlad/layout/s-long-long.c - 1915663861b ./gcc/testsuite/consistency.vlad/layout/s-long-longdouble.c - 2368362338b ./gcc/testsuite/consistency.vlad/layout/s-long-longlong.c - 843227723b ./gcc/testsuite/consistency.vlad/layout/s-long-pointer.c - 501034814b ./gcc/testsuite/consistency.vlad/layout/s-long-ptrdiff_t.c - 1174469544b ./gcc/testsuite/consistency.vlad/layout/s-long-s-char.c - 1007870215b ./gcc/testsuite/consistency.vlad/layout/s-long-s-double.c - 1307839500b ./gcc/testsuite/consistency.vlad/layout/s-long-s-float.c - 3475912781b ./gcc/testsuite/consistency.vlad/layout/s-long-s-int.c - 1568391695b ./gcc/testsuite/consistency.vlad/layout/s-long-s-long.c - 74365094b ./gcc/testsuite/consistency.vlad/layout/s-long-s-longdouble.c - 501521658b ./gcc/testsuite/consistency.vlad/layout/s-long-s-longlong.c - 1748381535b ./gcc/testsuite/consistency.vlad/layout/s-long-s-pointer.c - 1836579330b ./gcc/testsuite/consistency.vlad/layout/s-long-s-short.c - 3071018593b ./gcc/testsuite/consistency.vlad/layout/s-long-short.c - 3723194327b ./gcc/testsuite/consistency.vlad/layout/s-long-size_t.c - 531244141b ./gcc/testsuite/consistency.vlad/layout/s-long-wchar_t.c - 3081442820b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-char.c - 914301375b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-int.c - 1562082244b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-long.c - 2520232686b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-longlong.c - 3568433576b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-short.c 2174891233b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-a-char.c 2263495912b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-a-double.c 3626355134b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-a-float.c --- 4767,4772 ---- *************** *** 4929,4934 **** --- 4776,4782 ---- 2001710554b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-a-longlong.c 1208252647b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-a-pointer.c 2636586618b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-a-short.c + 1855339665b ./gcc/testsuite/consistency.vlad/layout/s-long-double.c 1490423944b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-char.c 838089339b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-double.c 1901020700b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-float.c *************** *** 4941,4960 **** 3172036867b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-char.c 3278313495b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-double.c 717089781b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-float.c 585061394b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-int.c 2473143756b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-long.c 3638726274b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-longdouble.c 2023017496b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-longlong.c 54720140b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-pointer.c 1046498915b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-short.c - 2851776236b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-short.c - 1105156962b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-size_t.c 696506953b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-wchar_t.c 928069138b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-char.c 258209983b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-int.c 2227123382b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-long.c 2318782753b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-longlong.c 558562280b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-short.c 2746913946b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-char.c 2756929591b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-double.c 2279164925b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-float.c --- 4789,4810 ---- 3172036867b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-char.c 3278313495b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-double.c 717089781b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-float.c + 2851776236b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-short.c 585061394b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-int.c + 1105156962b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-size_t.c 2473143756b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-long.c 3638726274b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-longdouble.c 2023017496b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-longlong.c 54720140b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-pointer.c 1046498915b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-s-short.c 696506953b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-wchar_t.c 928069138b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-char.c 258209983b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-int.c 2227123382b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-long.c 2318782753b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-longlong.c 558562280b ./gcc/testsuite/consistency.vlad/layout/s-longdouble-zf-short.c + 1325299293b ./gcc/testsuite/consistency.vlad/layout/s-long-float.c + 1780742682b ./gcc/testsuite/consistency.vlad/layout/s-long-int.c 2746913946b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-char.c 2756929591b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-double.c 2279164925b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-float.c *************** *** 4964,4973 **** --- 4814,4826 ---- 2072567607b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-longlong.c 3659263135b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-pointer.c 2702861495b ./gcc/testsuite/consistency.vlad/layout/s-longlong-a-short.c + 2290380505b ./gcc/testsuite/consistency.vlad/layout/s-long-long.c 1507260206b ./gcc/testsuite/consistency.vlad/layout/s-longlong-char.c + 1915663861b ./gcc/testsuite/consistency.vlad/layout/s-long-longdouble.c 3018473966b ./gcc/testsuite/consistency.vlad/layout/s-longlong-double.c 3253702018b ./gcc/testsuite/consistency.vlad/layout/s-longlong-float.c 2941557918b ./gcc/testsuite/consistency.vlad/layout/s-longlong-int.c + 2368362338b ./gcc/testsuite/consistency.vlad/layout/s-long-longlong.c 4153967841b ./gcc/testsuite/consistency.vlad/layout/s-longlong-long.c 3405846513b ./gcc/testsuite/consistency.vlad/layout/s-longlong-longdouble.c 2651247883b ./gcc/testsuite/consistency.vlad/layout/s-longlong-longlong.c *************** *** 4976,4995 **** 183550901b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-char.c 1353709337b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-double.c 1622859985b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-float.c 3395819121b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-int.c 263554828b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-long.c 3292604731b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-longdouble.c 591712639b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-longlong.c 1892567537b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-pointer.c 108932916b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-short.c - 922091281b ./gcc/testsuite/consistency.vlad/layout/s-longlong-short.c - 3366304494b ./gcc/testsuite/consistency.vlad/layout/s-longlong-size_t.c 2585353545b ./gcc/testsuite/consistency.vlad/layout/s-longlong-wchar_t.c 1992502711b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-char.c 943400451b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-int.c 2630463188b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-long.c 108059264b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-longlong.c 162090179b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-short.c 2431525882b ./gcc/testsuite/consistency.vlad/layout/s-pointer-a-char.c 4182828966b ./gcc/testsuite/consistency.vlad/layout/s-pointer-a-double.c 2030442801b ./gcc/testsuite/consistency.vlad/layout/s-pointer-a-float.c --- 4829,4867 ---- 183550901b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-char.c 1353709337b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-double.c 1622859985b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-float.c + 922091281b ./gcc/testsuite/consistency.vlad/layout/s-longlong-short.c 3395819121b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-int.c + 3366304494b ./gcc/testsuite/consistency.vlad/layout/s-longlong-size_t.c 263554828b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-long.c 3292604731b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-longdouble.c 591712639b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-longlong.c 1892567537b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-pointer.c 108932916b ./gcc/testsuite/consistency.vlad/layout/s-longlong-s-short.c 2585353545b ./gcc/testsuite/consistency.vlad/layout/s-longlong-wchar_t.c 1992502711b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-char.c 943400451b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-int.c 2630463188b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-long.c 108059264b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-longlong.c 162090179b ./gcc/testsuite/consistency.vlad/layout/s-longlong-zf-short.c + 843227723b ./gcc/testsuite/consistency.vlad/layout/s-long-pointer.c + 501034814b ./gcc/testsuite/consistency.vlad/layout/s-long-ptrdiff_t.c + 1174469544b ./gcc/testsuite/consistency.vlad/layout/s-long-s-char.c + 1007870215b ./gcc/testsuite/consistency.vlad/layout/s-long-s-double.c + 1307839500b ./gcc/testsuite/consistency.vlad/layout/s-long-s-float.c + 3071018593b ./gcc/testsuite/consistency.vlad/layout/s-long-short.c + 3475912781b ./gcc/testsuite/consistency.vlad/layout/s-long-s-int.c + 3723194327b ./gcc/testsuite/consistency.vlad/layout/s-long-size_t.c + 1568391695b ./gcc/testsuite/consistency.vlad/layout/s-long-s-long.c + 74365094b ./gcc/testsuite/consistency.vlad/layout/s-long-s-longdouble.c + 501521658b ./gcc/testsuite/consistency.vlad/layout/s-long-s-longlong.c + 1748381535b ./gcc/testsuite/consistency.vlad/layout/s-long-s-pointer.c + 1836579330b ./gcc/testsuite/consistency.vlad/layout/s-long-s-short.c + 531244141b ./gcc/testsuite/consistency.vlad/layout/s-long-wchar_t.c + 3081442820b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-char.c + 914301375b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-int.c + 1562082244b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-long.c + 2520232686b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-longlong.c + 3568433576b ./gcc/testsuite/consistency.vlad/layout/s-long-zf-short.c 2431525882b ./gcc/testsuite/consistency.vlad/layout/s-pointer-a-char.c 4182828966b ./gcc/testsuite/consistency.vlad/layout/s-pointer-a-double.c 2030442801b ./gcc/testsuite/consistency.vlad/layout/s-pointer-a-float.c *************** *** 5011,5024 **** 1074103467b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-char.c 902838190b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-double.c 2754137289b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-float.c 157709325b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-int.c 663732630b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-long.c 1874509941b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-longdouble.c 2063875624b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-longlong.c 3199456656b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-pointer.c 2883478056b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-short.c - 2645485672b ./gcc/testsuite/consistency.vlad/layout/s-pointer-short.c - 3640207262b ./gcc/testsuite/consistency.vlad/layout/s-pointer-size_t.c 1316769493b ./gcc/testsuite/consistency.vlad/layout/s-pointer-wchar_t.c 2773199310b ./gcc/testsuite/consistency.vlad/layout/s-pointer-zf-char.c 2595768381b ./gcc/testsuite/consistency.vlad/layout/s-pointer-zf-int.c --- 4883,4896 ---- 1074103467b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-char.c 902838190b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-double.c 2754137289b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-float.c + 2645485672b ./gcc/testsuite/consistency.vlad/layout/s-pointer-short.c 157709325b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-int.c + 3640207262b ./gcc/testsuite/consistency.vlad/layout/s-pointer-size_t.c 663732630b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-long.c 1874509941b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-longdouble.c 2063875624b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-longlong.c 3199456656b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-pointer.c 2883478056b ./gcc/testsuite/consistency.vlad/layout/s-pointer-s-short.c 1316769493b ./gcc/testsuite/consistency.vlad/layout/s-pointer-wchar_t.c 2773199310b ./gcc/testsuite/consistency.vlad/layout/s-pointer-zf-char.c 2595768381b ./gcc/testsuite/consistency.vlad/layout/s-pointer-zf-int.c *************** *** 5058,5071 **** 4244286521b ./gcc/testsuite/consistency.vlad/layout/s-short-s-char.c 2777905017b ./gcc/testsuite/consistency.vlad/layout/s-short-s-double.c 2756050532b ./gcc/testsuite/consistency.vlad/layout/s-short-s-float.c 374910896b ./gcc/testsuite/consistency.vlad/layout/s-short-s-int.c 479538741b ./gcc/testsuite/consistency.vlad/layout/s-short-s-long.c 4025001367b ./gcc/testsuite/consistency.vlad/layout/s-short-s-longdouble.c 1274385076b ./gcc/testsuite/consistency.vlad/layout/s-short-s-longlong.c 2921220650b ./gcc/testsuite/consistency.vlad/layout/s-short-s-pointer.c 1050140596b ./gcc/testsuite/consistency.vlad/layout/s-short-s-short.c - 524161230b ./gcc/testsuite/consistency.vlad/layout/s-short-short.c - 1327871729b ./gcc/testsuite/consistency.vlad/layout/s-short-size_t.c 2735755699b ./gcc/testsuite/consistency.vlad/layout/s-short-wchar_t.c 2947437906b ./gcc/testsuite/consistency.vlad/layout/s-short-zf-char.c 3330463439b ./gcc/testsuite/consistency.vlad/layout/s-short-zf-int.c --- 4930,4943 ---- 4244286521b ./gcc/testsuite/consistency.vlad/layout/s-short-s-char.c 2777905017b ./gcc/testsuite/consistency.vlad/layout/s-short-s-double.c 2756050532b ./gcc/testsuite/consistency.vlad/layout/s-short-s-float.c + 524161230b ./gcc/testsuite/consistency.vlad/layout/s-short-short.c 374910896b ./gcc/testsuite/consistency.vlad/layout/s-short-s-int.c + 1327871729b ./gcc/testsuite/consistency.vlad/layout/s-short-size_t.c 479538741b ./gcc/testsuite/consistency.vlad/layout/s-short-s-long.c 4025001367b ./gcc/testsuite/consistency.vlad/layout/s-short-s-longdouble.c 1274385076b ./gcc/testsuite/consistency.vlad/layout/s-short-s-longlong.c 2921220650b ./gcc/testsuite/consistency.vlad/layout/s-short-s-pointer.c 1050140596b ./gcc/testsuite/consistency.vlad/layout/s-short-s-short.c 2735755699b ./gcc/testsuite/consistency.vlad/layout/s-short-wchar_t.c 2947437906b ./gcc/testsuite/consistency.vlad/layout/s-short-zf-char.c 3330463439b ./gcc/testsuite/consistency.vlad/layout/s-short-zf-int.c *************** *** 5096,5148 **** 4089915411b ./gcc/testsuite/consistency.vlad/layout/s-wchar_t-short.c 2415574017b ./gcc/testsuite/consistency.vlad/layout/s-wchar_t-size_t.c 2755349152b ./gcc/testsuite/consistency.vlad/layout/s-wchar_t-wchar_t.c ! 1746672839b ./gcc/testsuite/consistency.vlad/layout/size-bool.cpp ! 1662052327b ./gcc/testsuite/consistency.vlad/layout/size-char.c ! 3361924014b ./gcc/testsuite/consistency.vlad/layout/size-double.c ! 3608174439b ./gcc/testsuite/consistency.vlad/layout/size-float.c ! 224133749b ./gcc/testsuite/consistency.vlad/layout/size-int.c ! 2229647371b ./gcc/testsuite/consistency.vlad/layout/size-long.c ! 1496097293b ./gcc/testsuite/consistency.vlad/layout/size-longdouble.c ! 4243493805b ./gcc/testsuite/consistency.vlad/layout/size-longlong.c ! 4234774016b ./gcc/testsuite/consistency.vlad/layout/size-pointer.c ! 2742276437b ./gcc/testsuite/consistency.vlad/layout/size-ptrdiff.c ! 2302838291b ./gcc/testsuite/consistency.vlad/layout/size-short.c ! 1008704183b ./gcc/testsuite/consistency.vlad/layout/size-size.c ! 767395346b ./gcc/testsuite/consistency.vlad/layout/size-wchar.c 2068139423b ./gcc/testsuite/consistency.vlad/vlad.exp ! 739732730b ./gcc/testsuite/g++.dg/README 885716516b ./gcc/testsuite/g++.dg/abi/bitfield1.C 479436735b ./gcc/testsuite/g++.dg/abi/bitfield2.C 3225280346b ./gcc/testsuite/g++.dg/abi/bitfield3.C 1735502164b ./gcc/testsuite/g++.dg/abi/bitfield5.C 1982376149b ./gcc/testsuite/g++.dg/abi/dcast1.C 257517025b ./gcc/testsuite/g++.dg/abi/empty4.C 2703592525b ./gcc/testsuite/g++.dg/abi/enum1.C 3235702061b ./gcc/testsuite/g++.dg/abi/layout1.C 4006829604b ./gcc/testsuite/g++.dg/abi/layout2.C ! 4166781498b ./gcc/testsuite/g++.dg/abi/mangle1.C 2689331463b ./gcc/testsuite/g++.dg/abi/mangle11.C 356153643b ./gcc/testsuite/g++.dg/abi/mangle14.C 238964482b ./gcc/testsuite/g++.dg/abi/mangle17.C 4182318030b ./gcc/testsuite/g++.dg/abi/mangle2.C 1755377648b ./gcc/testsuite/g++.dg/abi/mangle3.C 3981957296b ./gcc/testsuite/g++.dg/abi/mangle4.C 4052214936b ./gcc/testsuite/g++.dg/abi/mangle5.C ! 31392269b ./gcc/testsuite/g++.dg/abi/mangle6.C 1724007624b ./gcc/testsuite/g++.dg/abi/mangle7.C 638258652b ./gcc/testsuite/g++.dg/abi/mangle8.C ! 1969970486b ./gcc/testsuite/g++.dg/abi/offsetof.C 2141080121b ./gcc/testsuite/g++.dg/abi/rtti1.C ! 20126271b ./gcc/testsuite/g++.dg/abi/vbase1.C 1053392201b ./gcc/testsuite/g++.dg/abi/vbase10.C 1286609512b ./gcc/testsuite/g++.dg/abi/vbase8-10.C 3227029100b ./gcc/testsuite/g++.dg/abi/vbase8-21.C 1921427599b ./gcc/testsuite/g++.dg/abi/vbase8-22.C 3728366429b ./gcc/testsuite/g++.dg/abi/vbase8-4.C 2997752155b ./gcc/testsuite/g++.dg/abi/vbase9.C 4073115738b ./gcc/testsuite/g++.dg/abi/vthunk1.C 2365486838b ./gcc/testsuite/g++.dg/conversion/to-virtual-base-1.C ! 1949293295b ./gcc/testsuite/g++.dg/debug/debug.exp 1740237496b ./gcc/testsuite/g++.dg/debug/debug1.C 1473360233b ./gcc/testsuite/g++.dg/debug/debug2.C 4057306503b ./gcc/testsuite/g++.dg/debug/debug3.C --- 4968,7833 ---- 4089915411b ./gcc/testsuite/consistency.vlad/layout/s-wchar_t-short.c 2415574017b ./gcc/testsuite/consistency.vlad/layout/s-wchar_t-size_t.c 2755349152b ./gcc/testsuite/consistency.vlad/layout/s-wchar_t-wchar_t.c ! 3207711727b ./gcc/testsuite/consistency.vlad/README 2068139423b ./gcc/testsuite/consistency.vlad/vlad.exp ! 2710099993b ./gcc/testsuite/g77.dg/20010216-1.f ! 88255324b ./gcc/testsuite/g77.dg/7388.f ! 2513750825b ./gcc/testsuite/g77.dg/bprob/bprob.exp ! 211215127b ./gcc/testsuite/g77.dg/bprob/g77-bprob-1.f ! 1815830648b ./gcc/testsuite/g77.dg/dg.exp ! 4034508570b ./gcc/testsuite/g77.dg/f77-edit-apostrophe-out.f ! 245196963b ./gcc/testsuite/g77.dg/f77-edit-colon-out.f ! 549518023b ./gcc/testsuite/g77.dg/f77-edit-h-out.f ! 3116993853b ./gcc/testsuite/g77.dg/f77-edit-i-in.f ! 462852590b ./gcc/testsuite/g77.dg/f77-edit-i-out.f ! 188941937b ./gcc/testsuite/g77.dg/f77-edit-slash-out.f ! 1014931200b ./gcc/testsuite/g77.dg/f77-edit-s-out.f ! 583752102b ./gcc/testsuite/g77.dg/f77-edit-t-in.f ! 819764799b ./gcc/testsuite/g77.dg/f77-edit-t-out.f ! 3976930856b ./gcc/testsuite/g77.dg/f77-edit-x-out.f ! 3692598063b ./gcc/testsuite/g77.dg/fbackslash.f ! 3349950140b ./gcc/testsuite/g77.dg/fcase-preserve.f ! 3493107241b ./gcc/testsuite/g77.dg/ff90-1.f ! 846110140b ./gcc/testsuite/g77.dg/ffixed-line-length-0.f ! 306302525b ./gcc/testsuite/g77.dg/ffixed-line-length-132.f ! 256008601b ./gcc/testsuite/g77.dg/ffixed-line-length-72.f ! 1293833923b ./gcc/testsuite/g77.dg/ffixed-line-length-7.f ! 2426259256b ./gcc/testsuite/g77.dg/ffixed-line-length-none.f ! 382313186b ./gcc/testsuite/g77.dg/ffree-form-1.f ! 1427613779b ./gcc/testsuite/g77.dg/fno-backslash.f ! 1787673713b ./gcc/testsuite/g77.dg/fno-f90-1.f ! 1073584992b ./gcc/testsuite/g77.dg/fno-fixed-form-1.f ! 2730066868b ./gcc/testsuite/g77.dg/fno-onetrip.f ! 109115498b ./gcc/testsuite/g77.dg/fno-typeless-boz.f ! 2720105997b ./gcc/testsuite/g77.dg/fno-underscoring.f ! 614291430b ./gcc/testsuite/g77.dg/fno-vxt-1.f ! 646478354b ./gcc/testsuite/g77.dg/fonetrip.f ! 298378793b ./gcc/testsuite/g77.dg/ftypeless-boz.f ! 1970388396b ./gcc/testsuite/g77.dg/fugly-assumed.f ! 813122842b ./gcc/testsuite/g77.dg/funderscoring.f ! 2755287889b ./gcc/testsuite/g77.dg/fvxt-1.f ! 4218369628b ./gcc/testsuite/g77.dg/gcov/gcov-1.f ! 2262587727b ./gcc/testsuite/g77.dg/gcov/gcov-1.x ! 3439770285b ./gcc/testsuite/g77.dg/gcov/gcov.exp ! 2336318971b ./gcc/testsuite/g77.dg/pr3743-1.f ! 3986109564b ./gcc/testsuite/g77.dg/pr3743-2.f ! 202729794b ./gcc/testsuite/g77.dg/pr3743-3.f ! 2533314951b ./gcc/testsuite/g77.dg/pr3743-4.f ! 3959051916b ./gcc/testsuite/g77.dg/pr5473.f ! 3348380351b ./gcc/testsuite/g77.dg/pr9258.f ! 724796683b ./gcc/testsuite/g77.dg/strlen0.f ! 2382988813b ./gcc/testsuite/g77.f-torture/compile/19990218-0.f ! 687255164b ./gcc/testsuite/g77.f-torture/compile/19990305-0.f ! 4067537756b ./gcc/testsuite/g77.f-torture/compile/19990419-0.f ! 3411435248b ./gcc/testsuite/g77.f-torture/compile/19990502-0.f ! 1869005611b ./gcc/testsuite/g77.f-torture/compile/19990502-1.f ! 4129788740b ./gcc/testsuite/g77.f-torture/compile/19990525-0.f ! 2117801028b ./gcc/testsuite/g77.f-torture/compile/19990826-1.f ! 1740583941b ./gcc/testsuite/g77.f-torture/compile/19990826-3.f ! 2822256200b ./gcc/testsuite/g77.f-torture/compile/19990905-0.f ! 1729432512b ./gcc/testsuite/g77.f-torture/compile/19990905-2.f ! 3873649497b ./gcc/testsuite/g77.f-torture/compile/20000412-1.f ! 2840421610b ./gcc/testsuite/g77.f-torture/compile/20000511-1.f ! 2723712181b ./gcc/testsuite/g77.f-torture/compile/20000511-2.f ! 82013928b ./gcc/testsuite/g77.f-torture/compile/20000518.f ! 412413004b ./gcc/testsuite/g77.f-torture/compile/20000601-1.f ! 3180214474b ./gcc/testsuite/g77.f-torture/compile/20000601-2.f ! 4055621021b ./gcc/testsuite/g77.f-torture/compile/20000629-1.f ! 2336002500b ./gcc/testsuite/g77.f-torture/compile/20000630-2.f ! 3970776632b ./gcc/testsuite/g77.f-torture/compile/20010115.f ! 3772314415b ./gcc/testsuite/g77.f-torture/compile/20010321-1.f ! 2213180372b ./gcc/testsuite/g77.f-torture/compile/20010426.f ! 756384820b ./gcc/testsuite/g77.f-torture/compile/20010519-1.f ! 139739226b ./gcc/testsuite/g77.f-torture/compile/20020307-1.f ! 3911540126b ./gcc/testsuite/g77.f-torture/compile/20030326-1.f ! 1776224360b ./gcc/testsuite/g77.f-torture/compile/960317-1.f ! 2528706840b ./gcc/testsuite/g77.f-torture/compile/970125-0.f ! 3100920780b ./gcc/testsuite/g77.f-torture/compile/970915-0.f ! 3454578083b ./gcc/testsuite/g77.f-torture/compile/980310-1.f ! 1063918752b ./gcc/testsuite/g77.f-torture/compile/980310-2.f ! 3699662809b ./gcc/testsuite/g77.f-torture/compile/980310-3.f ! 1046454488b ./gcc/testsuite/g77.f-torture/compile/980310-4.f ! 581995045b ./gcc/testsuite/g77.f-torture/compile/980310-6.f ! 758602941b ./gcc/testsuite/g77.f-torture/compile/980310-7.f ! 3264996889b ./gcc/testsuite/g77.f-torture/compile/980310-8.f ! 55455134b ./gcc/testsuite/g77.f-torture/compile/980419-2.f ! 2284181108b ./gcc/testsuite/g77.f-torture/compile/980424-0.f ! 585713859b ./gcc/testsuite/g77.f-torture/compile/980427-0.f ! 2853235618b ./gcc/testsuite/g77.f-torture/compile/980519-2.f ! 2138526345b ./gcc/testsuite/g77.f-torture/compile/980729-0.f ! 1069123470b ./gcc/testsuite/g77.f-torture/compile/981117-1.f ! 2053478041b ./gcc/testsuite/g77.f-torture/compile/990115-1.f ! 3973737388b ./gcc/testsuite/g77.f-torture/compile/alpha1.f ! 2107279947b ./gcc/testsuite/g77.f-torture/compile/alpha1.x ! 4148688482b ./gcc/testsuite/g77.f-torture/compile/compile.exp ! 1347946300b ./gcc/testsuite/g77.f-torture/compile/cpp2.F ! 883444817b ./gcc/testsuite/g77.f-torture/compile/cpp.F ! 407305629b ./gcc/testsuite/g77.f-torture/compile/toon_1.f ! 3599334924b ./gcc/testsuite/g77.f-torture/execute/10197.f ! 842468456b ./gcc/testsuite/g77.f-torture/execute/1832.f ! 1875205813b ./gcc/testsuite/g77.f-torture/execute/19981119-0.f ! 207133658b ./gcc/testsuite/g77.f-torture/execute/19990313-0.f ! 1311165077b ./gcc/testsuite/g77.f-torture/execute/19990313-1.f ! 2827041779b ./gcc/testsuite/g77.f-torture/execute/19990313-2.f ! 3627217083b ./gcc/testsuite/g77.f-torture/execute/19990313-3.f ! 334442269b ./gcc/testsuite/g77.f-torture/execute/19990325-0.f ! 2498790248b ./gcc/testsuite/g77.f-torture/execute/19990325-1.f ! 1566943825b ./gcc/testsuite/g77.f-torture/execute/19990419-1.f ! 1702408878b ./gcc/testsuite/g77.f-torture/execute/19990826-0.f ! 548549288b ./gcc/testsuite/g77.f-torture/execute/19990826-2.f ! 2245832686b ./gcc/testsuite/g77.f-torture/execute/20000503-1.f ! 119817854b ./gcc/testsuite/g77.f-torture/execute/20001111.f ! 3778266196b ./gcc/testsuite/g77.f-torture/execute/20001201.f ! 1721706271b ./gcc/testsuite/g77.f-torture/execute/20001201.x ! 3482653018b ./gcc/testsuite/g77.f-torture/execute/20010116.f ! 104441706b ./gcc/testsuite/g77.f-torture/execute/20010426.f ! 2134591728b ./gcc/testsuite/g77.f-torture/execute/20010430.f ! 2127502131b ./gcc/testsuite/g77.f-torture/execute/20010610.f ! 1835626441b ./gcc/testsuite/g77.f-torture/execute/5122.f ! 93616433b ./gcc/testsuite/g77.f-torture/execute/6177.f ! 4276687406b ./gcc/testsuite/g77.f-torture/execute/6367.f ! 1721706271b ./gcc/testsuite/g77.f-torture/execute/6367.x ! 166046708b ./gcc/testsuite/g77.f-torture/execute/947.f ! 2872624206b ./gcc/testsuite/g77.f-torture/execute/970625-2.f ! 2944713164b ./gcc/testsuite/g77.f-torture/execute/970816-3.f ! 3043987240b ./gcc/testsuite/g77.f-torture/execute/971102-1.f ! 1356010785b ./gcc/testsuite/g77.f-torture/execute/980520-1.f ! 2822825054b ./gcc/testsuite/g77.f-torture/execute/980628-0.f ! 1154425496b ./gcc/testsuite/g77.f-torture/execute/980628-10.f ! 731282896b ./gcc/testsuite/g77.f-torture/execute/980628-1.f ! 652392894b ./gcc/testsuite/g77.f-torture/execute/980628-2.f ! 3891656681b ./gcc/testsuite/g77.f-torture/execute/980628-3.f ! 4188896500b ./gcc/testsuite/g77.f-torture/execute/980628-4.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/980628-4.x ! 3480269714b ./gcc/testsuite/g77.f-torture/execute/980628-5.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/980628-5.x ! 1467613590b ./gcc/testsuite/g77.f-torture/execute/980628-6.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/980628-6.x ! 1104933088b ./gcc/testsuite/g77.f-torture/execute/980628-7.f ! 1264093278b ./gcc/testsuite/g77.f-torture/execute/980628-8.f ! 2969694593b ./gcc/testsuite/g77.f-torture/execute/980628-9.f ! 1979661682b ./gcc/testsuite/g77.f-torture/execute/980701-0.f ! 2199388550b ./gcc/testsuite/g77.f-torture/execute/980701-1.f ! 2519492399b ./gcc/testsuite/g77.f-torture/execute/alpha2.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/alpha2.x ! 2259027475b ./gcc/testsuite/g77.f-torture/execute/auto0.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/auto0.x ! 4202240464b ./gcc/testsuite/g77.f-torture/execute/auto1.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/auto1.x ! 232981110b ./gcc/testsuite/g77.f-torture/execute/cabs.f ! 877306443b ./gcc/testsuite/g77.f-torture/execute/claus.f ! 2682388459b ./gcc/testsuite/g77.f-torture/execute/complex_1.f ! 268027241b ./gcc/testsuite/g77.f-torture/execute/cpp2.F ! 274053025b ./gcc/testsuite/g77.f-torture/execute/cpp.F ! 3689042274b ./gcc/testsuite/g77.f-torture/execute/dcomplex.f ! 2431087293b ./gcc/testsuite/g77.f-torture/execute/dnrm2.f ! 1012852742b ./gcc/testsuite/g77.f-torture/execute/erfc.f ! 574860802b ./gcc/testsuite/g77.f-torture/execute/execute.exp ! 2348837361b ./gcc/testsuite/g77.f-torture/execute/exp.f ! 1166305221b ./gcc/testsuite/g77.f-torture/execute/f90-intrinsic-bit.f ! 1401151480b ./gcc/testsuite/g77.f-torture/execute/f90-intrinsic-mathematical.f ! 296501581b ./gcc/testsuite/g77.f-torture/execute/f90-intrinsic-numeric.f ! 1448802159b ./gcc/testsuite/g77.f-torture/execute/intrinsic77.f ! 1619227376b ./gcc/testsuite/g77.f-torture/execute/intrinsic-f2c-z.f ! 2512429495b ./gcc/testsuite/g77.f-torture/execute/intrinsic-unix-bessel.f ! 846341057b ./gcc/testsuite/g77.f-torture/execute/intrinsic-unix-erf.f ! 3837275230b ./gcc/testsuite/g77.f-torture/execute/intrinsic-vax-cd.f ! 3527337523b ./gcc/testsuite/g77.f-torture/execute/io0.f ! 1721706271b ./gcc/testsuite/g77.f-torture/execute/io0.x ! 1499748556b ./gcc/testsuite/g77.f-torture/execute/io1.f ! 1721706271b ./gcc/testsuite/g77.f-torture/execute/io1.x ! 3838992103b ./gcc/testsuite/g77.f-torture/execute/labug1.f ! 273345472b ./gcc/testsuite/g77.f-torture/execute/large_vec.f ! 775036014b ./gcc/testsuite/g77.f-torture/execute/le.f ! 873992663b ./gcc/testsuite/g77.f-torture/execute/select.f ! 3780459526b ./gcc/testsuite/g77.f-torture/execute/short.f ! 85764886b ./gcc/testsuite/g77.f-torture/execute/u77-test.f ! 991484451b ./gcc/testsuite/g77.f-torture/execute/u77-test.x ! 2234422141b ./gcc/testsuite/g77.f-torture/noncompile/19981216-0.f ! 2509327097b ./gcc/testsuite/g77.f-torture/noncompile/19990218-1.f ! 684708897b ./gcc/testsuite/g77.f-torture/noncompile/19990826-4.f ! 3593377062b ./gcc/testsuite/g77.f-torture/noncompile/19990905-1.f ! 118086646b ./gcc/testsuite/g77.f-torture/noncompile/9263.f ! 3649968898b ./gcc/testsuite/g77.f-torture/noncompile/970626-2.f ! 3382416911b ./gcc/testsuite/g77.f-torture/noncompile/980615-0.f ! 4269744935b ./gcc/testsuite/g77.f-torture/noncompile/980616-0.f ! 2374591598b ./gcc/testsuite/g77.f-torture/noncompile/check0.f ! 351555731b ./gcc/testsuite/g77.f-torture/noncompile/noncompile.exp ! 276625067b ./gcc/testsuite/g77.f-torture/noncompile/select_no_compile.f ! 2075770423b ./gcc/testsuite/gcc.c-torture/ChangeLog.0 ! 1091110310b ./gcc/testsuite/gcc.c-torture/compat/strct-layout.c ! 684784126b ./gcc/testsuite/gcc.c-torture/compat/struct-align.c ! 92980596b ./gcc/testsuite/gcc.c-torture/compat/struct-big.c ! 2993970556b ./gcc/testsuite/gcc.c-torture/compat/struct-i.c ! 1373131310b ./gcc/testsuite/gcc.c-torture/compat/struct-ic.c ! 367335173b ./gcc/testsuite/gcc.c-torture/compat/struct-ii.c ! 954170066b ./gcc/testsuite/gcc.c-torture/compat/struct-ret-1.c ! 452836178b ./gcc/testsuite/gcc.c-torture/compile/20000105-1.c ! 1901634825b ./gcc/testsuite/gcc.c-torture/compile/20000105-2.c ! 3139355726b ./gcc/testsuite/gcc.c-torture/compile/20000120-1.c ! 193146344b ./gcc/testsuite/gcc.c-torture/compile/20000120-2.c ! 3770371830b ./gcc/testsuite/gcc.c-torture/compile/20000127-1.c ! 1457334923b ./gcc/testsuite/gcc.c-torture/compile/20000211-1.c ! 3072124491b ./gcc/testsuite/gcc.c-torture/compile/20000211-3.c ! 2487027780b ./gcc/testsuite/gcc.c-torture/compile/20000224-1.c ! 976060843b ./gcc/testsuite/gcc.c-torture/compile/20000314-1.c ! 2716819908b ./gcc/testsuite/gcc.c-torture/compile/20000314-2.c ! 3323098889b ./gcc/testsuite/gcc.c-torture/compile/20000319-1.c ! 621983670b ./gcc/testsuite/gcc.c-torture/compile/20000326-1.c ! 362965832b ./gcc/testsuite/gcc.c-torture/compile/20000326-2.c ! 1360671142b ./gcc/testsuite/gcc.c-torture/compile/20000329-1.c ! 1376990121b ./gcc/testsuite/gcc.c-torture/compile/20000403-1.c ! 1295018105b ./gcc/testsuite/gcc.c-torture/compile/20000403-2.c ! 2994009121b ./gcc/testsuite/gcc.c-torture/compile/20000405-1.c ! 1202553741b ./gcc/testsuite/gcc.c-torture/compile/20000405-2.c ! 1972736685b ./gcc/testsuite/gcc.c-torture/compile/20000405-3.c ! 4185438508b ./gcc/testsuite/gcc.c-torture/compile/20000412-1.c ! 1020690516b ./gcc/testsuite/gcc.c-torture/compile/20000412-2.c ! 606471227b ./gcc/testsuite/gcc.c-torture/compile/20000420-1.c ! 3618930753b ./gcc/testsuite/gcc.c-torture/compile/20000420-2.c ! 1513651895b ./gcc/testsuite/gcc.c-torture/compile/20000427-1.c ! 1253394561b ./gcc/testsuite/gcc.c-torture/compile/20000502-1.c ! 2301846307b ./gcc/testsuite/gcc.c-torture/compile/20000504-1.c ! 4216707490b ./gcc/testsuite/gcc.c-torture/compile/20000511-1.c ! 160078686b ./gcc/testsuite/gcc.c-torture/compile/20000517-1.c ! 138460064b ./gcc/testsuite/gcc.c-torture/compile/20000518-1.c ! 4277321614b ./gcc/testsuite/gcc.c-torture/compile/20000523-1.c ! 894948419b ./gcc/testsuite/gcc.c-torture/compile/20000605-1.c ! 1801476756b ./gcc/testsuite/gcc.c-torture/compile/20000606-1.c ! 3807623957b ./gcc/testsuite/gcc.c-torture/compile/20000609-1.c ! 3889196710b ./gcc/testsuite/gcc.c-torture/compile/20000629-1.c ! 2019168881b ./gcc/testsuite/gcc.c-torture/compile/20000701-1.c ! 23561090b ./gcc/testsuite/gcc.c-torture/compile/20000717-1.c ! 1282603692b ./gcc/testsuite/gcc.c-torture/compile/20000718.c ! 1628213540b ./gcc/testsuite/gcc.c-torture/compile/20000728-1.c ! 1312817714b ./gcc/testsuite/gcc.c-torture/compile/20000802-1.c ! 726930164b ./gcc/testsuite/gcc.c-torture/compile/20000803-1.c ! 221685889b ./gcc/testsuite/gcc.c-torture/compile/20000804-1.c ! 3819705114b ./gcc/testsuite/gcc.c-torture/compile/20000804-1.x ! 14592370b ./gcc/testsuite/gcc.c-torture/compile/20000818-1.c ! 3951998464b ./gcc/testsuite/gcc.c-torture/compile/20000825-1.c ! 568900271b ./gcc/testsuite/gcc.c-torture/compile/20000827-1.c ! 1702972966b ./gcc/testsuite/gcc.c-torture/compile/20000922-1.c ! 1072305501b ./gcc/testsuite/gcc.c-torture/compile/20000923-1.c ! 3797844565b ./gcc/testsuite/gcc.c-torture/compile/20001018-1.c ! 1683967360b ./gcc/testsuite/gcc.c-torture/compile/20001024-1.c ! 2747210984b ./gcc/testsuite/gcc.c-torture/compile/20001109-1.c ! 1480527842b ./gcc/testsuite/gcc.c-torture/compile/20001109-2.c ! 1361242877b ./gcc/testsuite/gcc.c-torture/compile/20001116-1.c ! 3966980994b ./gcc/testsuite/gcc.c-torture/compile/20001121-1.c ! 599106867b ./gcc/testsuite/gcc.c-torture/compile/20001123-1.c ! 533599449b ./gcc/testsuite/gcc.c-torture/compile/20001123-2.c ! 3673931755b ./gcc/testsuite/gcc.c-torture/compile/20001205-1.c ! 2693813894b ./gcc/testsuite/gcc.c-torture/compile/20001205-1.x ! 1735535039b ./gcc/testsuite/gcc.c-torture/compile/20001212-1.c ! 2993397009b ./gcc/testsuite/gcc.c-torture/compile/20001221-1.c ! 2331416953b ./gcc/testsuite/gcc.c-torture/compile/20001222-1.c ! 1872827667b ./gcc/testsuite/gcc.c-torture/compile/20001226-1.c ! 3985327824b ./gcc/testsuite/gcc.c-torture/compile/20001226-1.x ! 4099141482b ./gcc/testsuite/gcc.c-torture/compile/20010102-1.c ! 2413955943b ./gcc/testsuite/gcc.c-torture/compile/20010107-1.c ! 1898226085b ./gcc/testsuite/gcc.c-torture/compile/20010112-1.c ! 2489493145b ./gcc/testsuite/gcc.c-torture/compile/20010113-1.c ! 297170965b ./gcc/testsuite/gcc.c-torture/compile/20010114-1.c ! 419921862b ./gcc/testsuite/gcc.c-torture/compile/20010114-2.c ! 1452007589b ./gcc/testsuite/gcc.c-torture/compile/20010117-1.c ! 704576096b ./gcc/testsuite/gcc.c-torture/compile/20010117-2.c ! 3392519430b ./gcc/testsuite/gcc.c-torture/compile/20010118-1.c ! 3355150280b ./gcc/testsuite/gcc.c-torture/compile/20010124-1.c ! 1731094577b ./gcc/testsuite/gcc.c-torture/compile/20010202-1.c ! 459778149b ./gcc/testsuite/gcc.c-torture/compile/20010209-1.c ! 620156961b ./gcc/testsuite/gcc.c-torture/compile/20010226-1.c ! 501795051b ./gcc/testsuite/gcc.c-torture/compile/20010227-1.c ! 1832317029b ./gcc/testsuite/gcc.c-torture/compile/20010313-1.c ! 2854417844b ./gcc/testsuite/gcc.c-torture/compile/20010320-1.c ! 3271306723b ./gcc/testsuite/gcc.c-torture/compile/20010326-1.c ! 2222955049b ./gcc/testsuite/gcc.c-torture/compile/20010327-1.c ! 3399421780b ./gcc/testsuite/gcc.c-torture/compile/20010328-1.c ! 3356008690b ./gcc/testsuite/gcc.c-torture/compile/20010329-1.c ! 4152637354b ./gcc/testsuite/gcc.c-torture/compile/20010404-1.c ! 1548469760b ./gcc/testsuite/gcc.c-torture/compile/20010408-1.c ! 3063630520b ./gcc/testsuite/gcc.c-torture/compile/20010421-1.c ! 3134579946b ./gcc/testsuite/gcc.c-torture/compile/20010423-1.c ! 2289909284b ./gcc/testsuite/gcc.c-torture/compile/20010426-1.c ! 2357536931b ./gcc/testsuite/gcc.c-torture/compile/20010503-1.c ! 1212631565b ./gcc/testsuite/gcc.c-torture/compile/20010510-1.c ! 1882079811b ./gcc/testsuite/gcc.c-torture/compile/20010516-1.c ! 3166989448b ./gcc/testsuite/gcc.c-torture/compile/20010518-1.c ! 3017611134b ./gcc/testsuite/gcc.c-torture/compile/20010518-2.c ! 2404992642b ./gcc/testsuite/gcc.c-torture/compile/20010518-2.x ! 3272357537b ./gcc/testsuite/gcc.c-torture/compile/20010525-1.c ! 475581102b ./gcc/testsuite/gcc.c-torture/compile/20010605-1.c ! 2936945185b ./gcc/testsuite/gcc.c-torture/compile/20010605-2.c ! 1294346331b ./gcc/testsuite/gcc.c-torture/compile/20010605-3.c ! 1636067950b ./gcc/testsuite/gcc.c-torture/compile/20010610-1.c ! 3077114319b ./gcc/testsuite/gcc.c-torture/compile/20010611-1.c ! 2584744929b ./gcc/testsuite/gcc.c-torture/compile/20010701-1.c ! 3815198051b ./gcc/testsuite/gcc.c-torture/compile/20010706-1.c ! 2713093522b ./gcc/testsuite/gcc.c-torture/compile/20010711-1.c ! 2299173088b ./gcc/testsuite/gcc.c-torture/compile/20010711-2.c ! 2571658330b ./gcc/testsuite/gcc.c-torture/compile/20010714-1.c ! 3287379546b ./gcc/testsuite/gcc.c-torture/compile/20010824-1.c ! 246682254b ./gcc/testsuite/gcc.c-torture/compile/20010903-1.c ! 2923439609b ./gcc/testsuite/gcc.c-torture/compile/20010903-2.c ! 4222197564b ./gcc/testsuite/gcc.c-torture/compile/20010911-1.c ! 1179192833b ./gcc/testsuite/gcc.c-torture/compile/20011010-1.c ! 3994663975b ./gcc/testsuite/gcc.c-torture/compile/20011023-1.c ! 1413783183b ./gcc/testsuite/gcc.c-torture/compile/20011029-1.c ! 2871784009b ./gcc/testsuite/gcc.c-torture/compile/20011106-1.c ! 3630952349b ./gcc/testsuite/gcc.c-torture/compile/20011106-2.c ! 259957404b ./gcc/testsuite/gcc.c-torture/compile/20011109-1.c ! 2924929463b ./gcc/testsuite/gcc.c-torture/compile/20011114-1.c ! 3434496008b ./gcc/testsuite/gcc.c-torture/compile/20011114-2.c ! 2760161415b ./gcc/testsuite/gcc.c-torture/compile/20011114-3.c ! 3547339064b ./gcc/testsuite/gcc.c-torture/compile/20011114-4.c ! 3653343012b ./gcc/testsuite/gcc.c-torture/compile/20011119-1.c ! 2885054257b ./gcc/testsuite/gcc.c-torture/compile/20011119-2.c ! 174415171b ./gcc/testsuite/gcc.c-torture/compile/20011130-1.c ! 1745547919b ./gcc/testsuite/gcc.c-torture/compile/20011130-2.c ! 3987052556b ./gcc/testsuite/gcc.c-torture/compile/20011205-1.c ! 1179199950b ./gcc/testsuite/gcc.c-torture/compile/20011217-1.c ! 315452475b ./gcc/testsuite/gcc.c-torture/compile/20011217-2.c ! 3416537061b ./gcc/testsuite/gcc.c-torture/compile/20011218-1.c ! 2149414673b ./gcc/testsuite/gcc.c-torture/compile/20011219-1.c ! 1484609615b ./gcc/testsuite/gcc.c-torture/compile/20011219-2.c ! 3590162726b ./gcc/testsuite/gcc.c-torture/compile/20011229-1.c ! 1849951092b ./gcc/testsuite/gcc.c-torture/compile/20011229-2.c ! 3637150343b ./gcc/testsuite/gcc.c-torture/compile/20020103-1.c ! 3505269843b ./gcc/testsuite/gcc.c-torture/compile/20020106-1.c ! 3398919425b ./gcc/testsuite/gcc.c-torture/compile/20020109-1.c ! 2348431150b ./gcc/testsuite/gcc.c-torture/compile/20020109-2.c ! 4197667212b ./gcc/testsuite/gcc.c-torture/compile/20020110.c ! 208428249b ./gcc/testsuite/gcc.c-torture/compile/20020116-1.c ! 966527433b ./gcc/testsuite/gcc.c-torture/compile/20020120-1.c ! 3002186865b ./gcc/testsuite/gcc.c-torture/compile/20020121-1.c ! 2862264485b ./gcc/testsuite/gcc.c-torture/compile/20020206-1.c ! 1009994283b ./gcc/testsuite/gcc.c-torture/compile/20020210-1.c ! 1193130025b ./gcc/testsuite/gcc.c-torture/compile/20020303-1.c ! 1683706700b ./gcc/testsuite/gcc.c-torture/compile/20020304-1.c ! 3186842248b ./gcc/testsuite/gcc.c-torture/compile/20020304-2.c ! 1366050512b ./gcc/testsuite/gcc.c-torture/compile/20020309-1.c ! 1174986914b ./gcc/testsuite/gcc.c-torture/compile/20020309-2.c ! 1727441689b ./gcc/testsuite/gcc.c-torture/compile/20020312-1.c ! 2872650660b ./gcc/testsuite/gcc.c-torture/compile/20020312-1.x ! 16580553b ./gcc/testsuite/gcc.c-torture/compile/20020314-1.c ! 2378124589b ./gcc/testsuite/gcc.c-torture/compile/20020315-1.c ! 4029159547b ./gcc/testsuite/gcc.c-torture/compile/20020318-1.c ! 4089657504b ./gcc/testsuite/gcc.c-torture/compile/20020319-1.c ! 2837722984b ./gcc/testsuite/gcc.c-torture/compile/20020320-1.c ! 1380106070b ./gcc/testsuite/gcc.c-torture/compile/20020323-1.c ! 392286369b ./gcc/testsuite/gcc.c-torture/compile/20020330-1.c ! 4289507025b ./gcc/testsuite/gcc.c-torture/compile/20020409-1.c ! 631285907b ./gcc/testsuite/gcc.c-torture/compile/20020415-1.c ! 3246888365b ./gcc/testsuite/gcc.c-torture/compile/20020418-1.c ! 1318297601b ./gcc/testsuite/gcc.c-torture/compile/20020530-1.c ! 1207151280b ./gcc/testsuite/gcc.c-torture/compile/20020604-1.c ! 1992100052b ./gcc/testsuite/gcc.c-torture/compile/20020604-1.x ! 909926902b ./gcc/testsuite/gcc.c-torture/compile/20020605-1.c ! 168620187b ./gcc/testsuite/gcc.c-torture/compile/20020701-1.c ! 1534237110b ./gcc/testsuite/gcc.c-torture/compile/20020706-1.c ! 2582470567b ./gcc/testsuite/gcc.c-torture/compile/20020706-2.c ! 1098925370b ./gcc/testsuite/gcc.c-torture/compile/20020709-1.c ! 1564612166b ./gcc/testsuite/gcc.c-torture/compile/20020710-1.c ! 737897185b ./gcc/testsuite/gcc.c-torture/compile/20020715-1.c ! 1067410022b ./gcc/testsuite/gcc.c-torture/compile/20020910-1.c ! 4042098602b ./gcc/testsuite/gcc.c-torture/compile/20020926-1.c ! 337401938b ./gcc/testsuite/gcc.c-torture/compile/20020927-1.c ! 597765545b ./gcc/testsuite/gcc.c-torture/compile/20020930-1.c ! 170766928b ./gcc/testsuite/gcc.c-torture/compile/20021001-1.c ! 1009786556b ./gcc/testsuite/gcc.c-torture/compile/20021007-1.c ! 778329230b ./gcc/testsuite/gcc.c-torture/compile/20021015-1.c ! 25981859b ./gcc/testsuite/gcc.c-torture/compile/20021015-2.c ! 2807893986b ./gcc/testsuite/gcc.c-torture/compile/20021103-1.c ! 3505925860b ./gcc/testsuite/gcc.c-torture/compile/20021108-1.c ! 2007214546b ./gcc/testsuite/gcc.c-torture/compile/20021110.c ! 3537627700b ./gcc/testsuite/gcc.c-torture/compile/20021119-1.c ! 3188218514b ./gcc/testsuite/gcc.c-torture/compile/20021120-1.c ! 3735410464b ./gcc/testsuite/gcc.c-torture/compile/20021120-2.c ! 2007214546b ./gcc/testsuite/gcc.c-torture/compile/20021123-1.c ! 3188218514b ./gcc/testsuite/gcc.c-torture/compile/20021123-2.c ! 3735410464b ./gcc/testsuite/gcc.c-torture/compile/20021123-3.c ! 3537627700b ./gcc/testsuite/gcc.c-torture/compile/20021123-4.c ! 2814356441b ./gcc/testsuite/gcc.c-torture/compile/20021124-1.c ! 3155365897b ./gcc/testsuite/gcc.c-torture/compile/20021204-1.c ! 953842788b ./gcc/testsuite/gcc.c-torture/compile/20021205-1.c ! 3765901682b ./gcc/testsuite/gcc.c-torture/compile/20021212-1.c ! 1694594576b ./gcc/testsuite/gcc.c-torture/compile/20030110-1.c ! 3005267439b ./gcc/testsuite/gcc.c-torture/compile/20030125-1.c ! 3514558242b ./gcc/testsuite/gcc.c-torture/compile/20030206-1.c ! 4268170432b ./gcc/testsuite/gcc.c-torture/compile/20030219-1.c ! 3214532330b ./gcc/testsuite/gcc.c-torture/compile/20030305-1.c ! 3074411947b ./gcc/testsuite/gcc.c-torture/compile/20030314-1.c ! 1095885293b ./gcc/testsuite/gcc.c-torture/compile/20030330-1.c ! 3865220381b ./gcc/testsuite/gcc.c-torture/compile/20030405-1.c ! 3497948189b ./gcc/testsuite/gcc.c-torture/compile/20030418-1.c ! 375311401b ./gcc/testsuite/gcc.c-torture/compile/900116-1.c ! 4181931788b ./gcc/testsuite/gcc.c-torture/compile/900216-1.c ! 426860692b ./gcc/testsuite/gcc.c-torture/compile/900313-1.c ! 221307575b ./gcc/testsuite/gcc.c-torture/compile/900407-1.c ! 197356982b ./gcc/testsuite/gcc.c-torture/compile/900516-1.c ! 1548983744b ./gcc/testsuite/gcc.c-torture/compile/920301-1.c ! 4282140702b ./gcc/testsuite/gcc.c-torture/compile/920409-1.c ! 1778084656b ./gcc/testsuite/gcc.c-torture/compile/920409-2.c ! 213155575b ./gcc/testsuite/gcc.c-torture/compile/920410-1.c ! 645991439b ./gcc/testsuite/gcc.c-torture/compile/920410-2.c ! 3957037518b ./gcc/testsuite/gcc.c-torture/compile/920411-2.c ! 2334498932b ./gcc/testsuite/gcc.c-torture/compile/920413-1.c ! 962899604b ./gcc/testsuite/gcc.c-torture/compile/920415-1.c ! 2539976202b ./gcc/testsuite/gcc.c-torture/compile/920428-1.c ! 1013934609b ./gcc/testsuite/gcc.c-torture/compile/920428-2.c ! 788296187b ./gcc/testsuite/gcc.c-torture/compile/920428-3.c ! 972355256b ./gcc/testsuite/gcc.c-torture/compile/920428-4.c ! 2850012644b ./gcc/testsuite/gcc.c-torture/compile/920428-5.c ! 3327240012b ./gcc/testsuite/gcc.c-torture/compile/920428-6.c ! 1997719687b ./gcc/testsuite/gcc.c-torture/compile/920428-7.c ! 2992320179b ./gcc/testsuite/gcc.c-torture/compile/920501-10.c ! 2609541759b ./gcc/testsuite/gcc.c-torture/compile/920501-11.c ! 46877596b ./gcc/testsuite/gcc.c-torture/compile/920501-12.c ! 2383031034b ./gcc/testsuite/gcc.c-torture/compile/920501-12.x ! 432031083b ./gcc/testsuite/gcc.c-torture/compile/920501-13.c ! 3986866565b ./gcc/testsuite/gcc.c-torture/compile/920501-15.c ! 2140301132b ./gcc/testsuite/gcc.c-torture/compile/920501-16.c ! 2776840158b ./gcc/testsuite/gcc.c-torture/compile/920501-17.c ! 2935229477b ./gcc/testsuite/gcc.c-torture/compile/920501-18.c ! 2462018157b ./gcc/testsuite/gcc.c-torture/compile/920501-19.c ! 3673935883b ./gcc/testsuite/gcc.c-torture/compile/920501-1.c ! 3480599006b ./gcc/testsuite/gcc.c-torture/compile/920501-20.c ! 1689258794b ./gcc/testsuite/gcc.c-torture/compile/920501-21.c ! 693947540b ./gcc/testsuite/gcc.c-torture/compile/920501-22.c ! 195826579b ./gcc/testsuite/gcc.c-torture/compile/920501-23.c ! 825734676b ./gcc/testsuite/gcc.c-torture/compile/920501-2.c ! 2815077449b ./gcc/testsuite/gcc.c-torture/compile/920501-3.c ! 3150704176b ./gcc/testsuite/gcc.c-torture/compile/920501-4.c ! 3513772660b ./gcc/testsuite/gcc.c-torture/compile/920501-4.x ! 3936438856b ./gcc/testsuite/gcc.c-torture/compile/920501-6.c ! 2978363162b ./gcc/testsuite/gcc.c-torture/compile/920501-7.c ! 3178366367b ./gcc/testsuite/gcc.c-torture/compile/920501-8.c ! 3988773566b ./gcc/testsuite/gcc.c-torture/compile/920501-9.c ! 4273234272b ./gcc/testsuite/gcc.c-torture/compile/920502-1.c ! 451473472b ./gcc/testsuite/gcc.c-torture/compile/920502-2.c ! 1332166500b ./gcc/testsuite/gcc.c-torture/compile/920520-1.c ! 2245440507b ./gcc/testsuite/gcc.c-torture/compile/920520-1.x ! 901366109b ./gcc/testsuite/gcc.c-torture/compile/920521-1.c ! 85616231b ./gcc/testsuite/gcc.c-torture/compile/920521-1.x ! 1216353647b ./gcc/testsuite/gcc.c-torture/compile/920529-1.c ! 619512296b ./gcc/testsuite/gcc.c-torture/compile/920608-1.c ! 2459147095b ./gcc/testsuite/gcc.c-torture/compile/920611-2.c ! 2108915266b ./gcc/testsuite/gcc.c-torture/compile/920615-1.c ! 1738386639b ./gcc/testsuite/gcc.c-torture/compile/920617-1.c ! 1497386838b ./gcc/testsuite/gcc.c-torture/compile/920617-2.c ! 15254500b ./gcc/testsuite/gcc.c-torture/compile/920623-1.c ! 1775235688b ./gcc/testsuite/gcc.c-torture/compile/920624-1.c ! 3157795265b ./gcc/testsuite/gcc.c-torture/compile/920625-1.c ! 3813813093b ./gcc/testsuite/gcc.c-torture/compile/920625-1.x ! 832571494b ./gcc/testsuite/gcc.c-torture/compile/920625-2.c ! 1209301541b ./gcc/testsuite/gcc.c-torture/compile/920626-1.c ! 1071302436b ./gcc/testsuite/gcc.c-torture/compile/920701-1.c ! 2769689708b ./gcc/testsuite/gcc.c-torture/compile/920702-1.c ! 2699685766b ./gcc/testsuite/gcc.c-torture/compile/920706-1.c ! 2611774952b ./gcc/testsuite/gcc.c-torture/compile/920710-2.c ! 3175710753b ./gcc/testsuite/gcc.c-torture/compile/920711-1.c ! 1838641399b ./gcc/testsuite/gcc.c-torture/compile/920721-1.c ! 1730574618b ./gcc/testsuite/gcc.c-torture/compile/920723-1.c ! 2728140867b ./gcc/testsuite/gcc.c-torture/compile/920729-1.c ! 3543134222b ./gcc/testsuite/gcc.c-torture/compile/920806-1.c ! 301898459b ./gcc/testsuite/gcc.c-torture/compile/920808-1.c ! 4286663396b ./gcc/testsuite/gcc.c-torture/compile/920809-1.c ! 1519893227b ./gcc/testsuite/gcc.c-torture/compile/920817-1.c ! 1506959740b ./gcc/testsuite/gcc.c-torture/compile/920820-1.c ! 2009298978b ./gcc/testsuite/gcc.c-torture/compile/920821-1.c ! 153303695b ./gcc/testsuite/gcc.c-torture/compile/920821-2.c ! 1035421587b ./gcc/testsuite/gcc.c-torture/compile/920825-1.c ! 1883204896b ./gcc/testsuite/gcc.c-torture/compile/920825-2.c ! 378919939b ./gcc/testsuite/gcc.c-torture/compile/920826-1.c ! 324445241b ./gcc/testsuite/gcc.c-torture/compile/920828-1.c ! 2512376601b ./gcc/testsuite/gcc.c-torture/compile/920829-1.c ! 1175894768b ./gcc/testsuite/gcc.c-torture/compile/920831-1.c ! 3615669663b ./gcc/testsuite/gcc.c-torture/compile/920902-1.c ! 3213642392b ./gcc/testsuite/gcc.c-torture/compile/920909-1.c ! 923773306b ./gcc/testsuite/gcc.c-torture/compile/920917-1.c ! 313805874b ./gcc/testsuite/gcc.c-torture/compile/920928-1.c ! 3576009210b ./gcc/testsuite/gcc.c-torture/compile/920928-2.c ! 2038558878b ./gcc/testsuite/gcc.c-torture/compile/920928-3.c ! 2544344324b ./gcc/testsuite/gcc.c-torture/compile/920928-4.c ! 934086546b ./gcc/testsuite/gcc.c-torture/compile/920928-5.c ! 6106016b ./gcc/testsuite/gcc.c-torture/compile/920928-6.c ! 735506239b ./gcc/testsuite/gcc.c-torture/compile/921004-1.c ! 3888639831b ./gcc/testsuite/gcc.c-torture/compile/921011-1.c ! 3956087084b ./gcc/testsuite/gcc.c-torture/compile/921011-2.c ! 1370935236b ./gcc/testsuite/gcc.c-torture/compile/921012-1.c ! 2304808730b ./gcc/testsuite/gcc.c-torture/compile/921012-2.c ! 3157047871b ./gcc/testsuite/gcc.c-torture/compile/921013-1.c ! 3740334758b ./gcc/testsuite/gcc.c-torture/compile/921019-1.c ! 2811091388b ./gcc/testsuite/gcc.c-torture/compile/921021-1.c ! 3551171868b ./gcc/testsuite/gcc.c-torture/compile/921024-1.c ! 3924542394b ./gcc/testsuite/gcc.c-torture/compile/921026-1.c ! 1165569278b ./gcc/testsuite/gcc.c-torture/compile/921103-1.c ! 1243246144b ./gcc/testsuite/gcc.c-torture/compile/921109-1.c ! 2203220429b ./gcc/testsuite/gcc.c-torture/compile/921111-1.c ! 1990624597b ./gcc/testsuite/gcc.c-torture/compile/921116-2.c ! 517704894b ./gcc/testsuite/gcc.c-torture/compile/921118-1.c ! 3811420781b ./gcc/testsuite/gcc.c-torture/compile/921126-1.c ! 3727547715b ./gcc/testsuite/gcc.c-torture/compile/921202-1.c ! 568945264b ./gcc/testsuite/gcc.c-torture/compile/921202-2.c ! 2130176572b ./gcc/testsuite/gcc.c-torture/compile/921203-1.c ! 492266852b ./gcc/testsuite/gcc.c-torture/compile/921203-2.c ! 855574805b ./gcc/testsuite/gcc.c-torture/compile/921206-1.c ! 2014683974b ./gcc/testsuite/gcc.c-torture/compile/921227-1.c ! 96957459b ./gcc/testsuite/gcc.c-torture/compile/930109-1.c ! 1189423329b ./gcc/testsuite/gcc.c-torture/compile/930109-2.c ! 1543922161b ./gcc/testsuite/gcc.c-torture/compile/930111-1.c ! 1357888911b ./gcc/testsuite/gcc.c-torture/compile/930117-1.c ! 2068061905b ./gcc/testsuite/gcc.c-torture/compile/930118-1.c ! 2900924058b ./gcc/testsuite/gcc.c-torture/compile/930120-1.c ! 4121817111b ./gcc/testsuite/gcc.c-torture/compile/930126-1.c ! 1532460815b ./gcc/testsuite/gcc.c-torture/compile/930210-1.c ! 3625302497b ./gcc/testsuite/gcc.c-torture/compile/930217-1.c ! 3938239975b ./gcc/testsuite/gcc.c-torture/compile/930222-1.c ! 1557388855b ./gcc/testsuite/gcc.c-torture/compile/930325-1.c ! 3378061921b ./gcc/testsuite/gcc.c-torture/compile/930326-1.c ! 2931382100b ./gcc/testsuite/gcc.c-torture/compile/930411-1.c ! 3578370973b ./gcc/testsuite/gcc.c-torture/compile/930421-1.c ! 3734830625b ./gcc/testsuite/gcc.c-torture/compile/930427-2.c ! 3885379756b ./gcc/testsuite/gcc.c-torture/compile/930503-1.c ! 959725141b ./gcc/testsuite/gcc.c-torture/compile/930503-2.c ! 140786434b ./gcc/testsuite/gcc.c-torture/compile/930506-1.c ! 3305652641b ./gcc/testsuite/gcc.c-torture/compile/930506-2.c ! 1442644232b ./gcc/testsuite/gcc.c-torture/compile/930510-1.c ! 3993332569b ./gcc/testsuite/gcc.c-torture/compile/930513-1.c ! 2006581046b ./gcc/testsuite/gcc.c-torture/compile/930513-2.c ! 2698332239b ./gcc/testsuite/gcc.c-torture/compile/930513-3.c ! 90110464b ./gcc/testsuite/gcc.c-torture/compile/930523-1.c ! 2548234910b ./gcc/testsuite/gcc.c-torture/compile/930525-1.c ! 422873186b ./gcc/testsuite/gcc.c-torture/compile/930527-1.c ! 784172570b ./gcc/testsuite/gcc.c-torture/compile/930529-1.c ! 3569132715b ./gcc/testsuite/gcc.c-torture/compile/930530-1.c ! 3200160962b ./gcc/testsuite/gcc.c-torture/compile/930602-1.c ! 3142735794b ./gcc/testsuite/gcc.c-torture/compile/930603-1.c ! 1973176638b ./gcc/testsuite/gcc.c-torture/compile/930607-1.c ! 208901999b ./gcc/testsuite/gcc.c-torture/compile/930611-1.c ! 3976001091b ./gcc/testsuite/gcc.c-torture/compile/930618-1.c ! 583248042b ./gcc/testsuite/gcc.c-torture/compile/930621-1.c ! 3751666180b ./gcc/testsuite/gcc.c-torture/compile/930623-1.c ! 3714994986b ./gcc/testsuite/gcc.c-torture/compile/930702-1.c ! 3138367793b ./gcc/testsuite/gcc.c-torture/compile/930926-1.c ! 126934282b ./gcc/testsuite/gcc.c-torture/compile/930927-1.c ! 2046421038b ./gcc/testsuite/gcc.c-torture/compile/931003-1.c ! 2795307593b ./gcc/testsuite/gcc.c-torture/compile/931004-1.c ! 2248992767b ./gcc/testsuite/gcc.c-torture/compile/931013-1.c ! 554284027b ./gcc/testsuite/gcc.c-torture/compile/931013-2.c ! 1170847752b ./gcc/testsuite/gcc.c-torture/compile/931013-3.c ! 752631056b ./gcc/testsuite/gcc.c-torture/compile/931018-1.c ! 4120231716b ./gcc/testsuite/gcc.c-torture/compile/931031-1.c ! 2466554678b ./gcc/testsuite/gcc.c-torture/compile/931102-1.c ! 4193170992b ./gcc/testsuite/gcc.c-torture/compile/931102-2.c ! 3312404691b ./gcc/testsuite/gcc.c-torture/compile/931203-1.c ! 2144495581b ./gcc/testsuite/gcc.c-torture/compile/940611-1.c ! 2217967256b ./gcc/testsuite/gcc.c-torture/compile/940712-1.c ! 43398345b ./gcc/testsuite/gcc.c-torture/compile/940718-1.c ! 2813422857b ./gcc/testsuite/gcc.c-torture/compile/941014-1.c ! 714535983b ./gcc/testsuite/gcc.c-torture/compile/941014-2.c ! 236968493b ./gcc/testsuite/gcc.c-torture/compile/941014-3.c ! 772624016b ./gcc/testsuite/gcc.c-torture/compile/941014-4.c ! 2255123649b ./gcc/testsuite/gcc.c-torture/compile/941019-1.c ! 3482340577b ./gcc/testsuite/gcc.c-torture/compile/941111-1.c ! 4138121525b ./gcc/testsuite/gcc.c-torture/compile/941113-1.c ! 938329066b ./gcc/testsuite/gcc.c-torture/compile/950122-1.c ! 4155644724b ./gcc/testsuite/gcc.c-torture/compile/950124-1.c ! 3810294661b ./gcc/testsuite/gcc.c-torture/compile/950221-1.c ! 3460610209b ./gcc/testsuite/gcc.c-torture/compile/950329-1.c ! 3474584992b ./gcc/testsuite/gcc.c-torture/compile/950512-1.c ! 3344132126b ./gcc/testsuite/gcc.c-torture/compile/950530-1.c ! 1876592424b ./gcc/testsuite/gcc.c-torture/compile/950607-1.c ! 1023117358b ./gcc/testsuite/gcc.c-torture/compile/950610-1.c ! 2634556580b ./gcc/testsuite/gcc.c-torture/compile/950612-1.c ! 1196693335b ./gcc/testsuite/gcc.c-torture/compile/950613-1.c ! 447206228b ./gcc/testsuite/gcc.c-torture/compile/950618-1.c ! 267255638b ./gcc/testsuite/gcc.c-torture/compile/950719-1.c ! 3590503950b ./gcc/testsuite/gcc.c-torture/compile/950729-1.c ! 3836055170b ./gcc/testsuite/gcc.c-torture/compile/950816-1.c ! 2188937099b ./gcc/testsuite/gcc.c-torture/compile/950816-2.c ! 2634731147b ./gcc/testsuite/gcc.c-torture/compile/950816-3.c ! 2650686602b ./gcc/testsuite/gcc.c-torture/compile/950910-1.c ! 2979160187b ./gcc/testsuite/gcc.c-torture/compile/950919-1.c ! 3635621359b ./gcc/testsuite/gcc.c-torture/compile/950921-1.c ! 3500911374b ./gcc/testsuite/gcc.c-torture/compile/950922-1.c ! 2220749535b ./gcc/testsuite/gcc.c-torture/compile/951004-1.c ! 1578339532b ./gcc/testsuite/gcc.c-torture/compile/951106-1.c ! 459531698b ./gcc/testsuite/gcc.c-torture/compile/951116-1.c ! 2236702069b ./gcc/testsuite/gcc.c-torture/compile/951128-1.c ! 559124320b ./gcc/testsuite/gcc.c-torture/compile/951220-1.c ! 2931610069b ./gcc/testsuite/gcc.c-torture/compile/951222-1.c ! 834462352b ./gcc/testsuite/gcc.c-torture/compile/960106-1.c ! 2810957446b ./gcc/testsuite/gcc.c-torture/compile/960130-1.c ! 3942840130b ./gcc/testsuite/gcc.c-torture/compile/960201-1.c ! 1531419420b ./gcc/testsuite/gcc.c-torture/compile/960218-1.c ! 1748987127b ./gcc/testsuite/gcc.c-torture/compile/960220-1.c ! 4272797008b ./gcc/testsuite/gcc.c-torture/compile/960221-1.c ! 2932166589b ./gcc/testsuite/gcc.c-torture/compile/960319-1.c ! 1856173622b ./gcc/testsuite/gcc.c-torture/compile/960514-1.c ! 3435740171b ./gcc/testsuite/gcc.c-torture/compile/960704-1.c ! 2939040127b ./gcc/testsuite/gcc.c-torture/compile/960829-1.c ! 497475088b ./gcc/testsuite/gcc.c-torture/compile/961004-1.c ! 1946932829b ./gcc/testsuite/gcc.c-torture/compile/961010-1.c ! 304816181b ./gcc/testsuite/gcc.c-torture/compile/961019-1.c ! 2048507537b ./gcc/testsuite/gcc.c-torture/compile/961031-1.c ! 3079865887b ./gcc/testsuite/gcc.c-torture/compile/961126-1.c ! 1672232168b ./gcc/testsuite/gcc.c-torture/compile/961203-1.c ! 601500610b ./gcc/testsuite/gcc.c-torture/compile/961203-1.x ! 3759439975b ./gcc/testsuite/gcc.c-torture/compile/970206-1.c ! 1182708149b ./gcc/testsuite/gcc.c-torture/compile/970214-1.c ! 3593522245b ./gcc/testsuite/gcc.c-torture/compile/980329-1.c ! 3672497829b ./gcc/testsuite/gcc.c-torture/compile/980408-1.c ! 2062728359b ./gcc/testsuite/gcc.c-torture/compile/980504-1.c ! 4232017618b ./gcc/testsuite/gcc.c-torture/compile/980506-1.c ! 2725121828b ./gcc/testsuite/gcc.c-torture/compile/980506-1.x ! 32528983b ./gcc/testsuite/gcc.c-torture/compile/980506-2.c ! 4270541716b ./gcc/testsuite/gcc.c-torture/compile/980511-1.c ! 3713274322b ./gcc/testsuite/gcc.c-torture/compile/980701-1.c ! 777674549b ./gcc/testsuite/gcc.c-torture/compile/980706-1.c ! 610537079b ./gcc/testsuite/gcc.c-torture/compile/980726-1.c ! 3564634914b ./gcc/testsuite/gcc.c-torture/compile/980729-1.c ! 1437208592b ./gcc/testsuite/gcc.c-torture/compile/980816-1.c ! 4262061714b ./gcc/testsuite/gcc.c-torture/compile/980821-1.c ! 411994094b ./gcc/testsuite/gcc.c-torture/compile/980825-1.c ! 84987168b ./gcc/testsuite/gcc.c-torture/compile/981001-1.c ! 3572428069b ./gcc/testsuite/gcc.c-torture/compile/981001-2.c ! 668832071b ./gcc/testsuite/gcc.c-torture/compile/981001-3.c ! 2581029790b ./gcc/testsuite/gcc.c-torture/compile/981001-4.c ! 2455813842b ./gcc/testsuite/gcc.c-torture/compile/981006-1.c ! 4074276501b ./gcc/testsuite/gcc.c-torture/compile/981006-1.x ! 436023456b ./gcc/testsuite/gcc.c-torture/compile/981007-1.c ! 3644509388b ./gcc/testsuite/gcc.c-torture/compile/981022-1.c ! 2402428546b ./gcc/testsuite/gcc.c-torture/compile/981022-1.x ! 2312981402b ./gcc/testsuite/gcc.c-torture/compile/981107-1.c ! 1534948383b ./gcc/testsuite/gcc.c-torture/compile/981223-1.c ! 2200568070b ./gcc/testsuite/gcc.c-torture/compile/981223-1.x ! 4068323857b ./gcc/testsuite/gcc.c-torture/compile/990107-1.c ! 2146948130b ./gcc/testsuite/gcc.c-torture/compile/990117-1.c ! 569996007b ./gcc/testsuite/gcc.c-torture/compile/990203-1.c ! 415305492b ./gcc/testsuite/gcc.c-torture/compile/990517-1.c ! 3394640266b ./gcc/testsuite/gcc.c-torture/compile/990519-1.c ! 2791783349b ./gcc/testsuite/gcc.c-torture/compile/990523-1.c ! 3000844764b ./gcc/testsuite/gcc.c-torture/compile/990527-1.c ! 582106274b ./gcc/testsuite/gcc.c-torture/compile/990617-1.c ! 2322013805b ./gcc/testsuite/gcc.c-torture/compile/990617-1.x ! 492504629b ./gcc/testsuite/gcc.c-torture/compile/990625-1.c ! 884965957b ./gcc/testsuite/gcc.c-torture/compile/990625-2.c ! 4084131388b ./gcc/testsuite/gcc.c-torture/compile/990801-1.c ! 2266581816b ./gcc/testsuite/gcc.c-torture/compile/990801-2.c ! 3317513113b ./gcc/testsuite/gcc.c-torture/compile/990829-1.c ! 3956045070b ./gcc/testsuite/gcc.c-torture/compile/990913-1.c ! 3319682501b ./gcc/testsuite/gcc.c-torture/compile/990928-1.c ! 3933777529b ./gcc/testsuite/gcc.c-torture/compile/991008-1.c ! 2673675627b ./gcc/testsuite/gcc.c-torture/compile/991026-1.c ! 1674528994b ./gcc/testsuite/gcc.c-torture/compile/991026-2.c ! 4044514395b ./gcc/testsuite/gcc.c-torture/compile/991127-1.c ! 4090550720b ./gcc/testsuite/gcc.c-torture/compile/991202-1.c ! 2790904959b ./gcc/testsuite/gcc.c-torture/compile/991208-1.c ! 3320607847b ./gcc/testsuite/gcc.c-torture/compile/991213-1.c ! 337781771b ./gcc/testsuite/gcc.c-torture/compile/991213-2.c ! 2183919411b ./gcc/testsuite/gcc.c-torture/compile/991213-3.c ! 2401949194b ./gcc/testsuite/gcc.c-torture/compile/991214-1.c ! 490622457b ./gcc/testsuite/gcc.c-torture/compile/991214-2.c ! 4103871327b ./gcc/testsuite/gcc.c-torture/compile/991229-1.c ! 3992734927b ./gcc/testsuite/gcc.c-torture/compile/991229-2.c ! 4256185088b ./gcc/testsuite/gcc.c-torture/compile/991229-3.c ! 1572386559b ./gcc/testsuite/gcc.c-torture/compile/calls.c ! 2432910359b ./gcc/testsuite/gcc.c-torture/compile/cmpdi-1.c ! 614750703b ./gcc/testsuite/gcc.c-torture/compile/combine-hang.c ! 1983287936b ./gcc/testsuite/gcc.c-torture/compile/compile.exp ! 1794942657b ./gcc/testsuite/gcc.c-torture/compile/cpp-1.c ! 970559481b ./gcc/testsuite/gcc.c-torture/compile/cpp-2.c ! 1931627759b ./gcc/testsuite/gcc.c-torture/compile/dll.c ! 3830564423b ./gcc/testsuite/gcc.c-torture/compile/dll.x ! 3452765233b ./gcc/testsuite/gcc.c-torture/compile/funcptr-1.c ! 1935315878b ./gcc/testsuite/gcc.c-torture/compile/goto-1.c ! 1601988128b ./gcc/testsuite/gcc.c-torture/compile/iftrap-1.c ! 335811326b ./gcc/testsuite/gcc.c-torture/compile/iftrap-2.c ! 4225667120b ./gcc/testsuite/gcc.c-torture/compile/init-1.c ! 2861967846b ./gcc/testsuite/gcc.c-torture/compile/init-2.c ! 2669634792b ./gcc/testsuite/gcc.c-torture/compile/init-3.c ! 4126878501b ./gcc/testsuite/gcc.c-torture/compile/labels-1.c ! 2067585207b ./gcc/testsuite/gcc.c-torture/compile/labels-2.c ! 3607951474b ./gcc/testsuite/gcc.c-torture/compile/labels-3.c ! 709334018b ./gcc/testsuite/gcc.c-torture/compile/labels-3.x ! 1059776974b ./gcc/testsuite/gcc.c-torture/compile/mipscop-1.c ! 935994442b ./gcc/testsuite/gcc.c-torture/compile/mipscop-1.x ! 679674485b ./gcc/testsuite/gcc.c-torture/compile/mipscop-2.c ! 935994442b ./gcc/testsuite/gcc.c-torture/compile/mipscop-2.x ! 1448278998b ./gcc/testsuite/gcc.c-torture/compile/mipscop-3.c ! 935994442b ./gcc/testsuite/gcc.c-torture/compile/mipscop-3.x ! 1045891263b ./gcc/testsuite/gcc.c-torture/compile/mipscop-4.c ! 935994442b ./gcc/testsuite/gcc.c-torture/compile/mipscop-4.x ! 1060389673b ./gcc/testsuite/gcc.c-torture/compile/packed-1.c ! 3351120683b ./gcc/testsuite/gcc.c-torture/compile/simd-1.c ! 3894704862b ./gcc/testsuite/gcc.c-torture/compile/simd-2.c ! 1096508861b ./gcc/testsuite/gcc.c-torture/compile/simd-3.c ! 3477152513b ./gcc/testsuite/gcc.c-torture/compile/simd-4.c ! 2652812557b ./gcc/testsuite/gcc.c-torture/compile/simd-5.c ! 3775693321b ./gcc/testsuite/gcc.c-torture/compile/simd-5.x ! 69389766b ./gcc/testsuite/gcc.c-torture/compile/structs.c ! 2677779184b ./gcc/testsuite/gcc.c-torture/compile/trunctfdf.c ! 3723113555b ./gcc/testsuite/gcc.c-torture/compile/widechar-1.c ! 2985433108b ./gcc/testsuite/gcc.c-torture/compile/zero-strct-1.c ! 1530761060b ./gcc/testsuite/gcc.c-torture/execute/20000112-1.c ! 2481066019b ./gcc/testsuite/gcc.c-torture/execute/20000113-1.c ! 1162771092b ./gcc/testsuite/gcc.c-torture/execute/20000121-1.c ! 2528273823b ./gcc/testsuite/gcc.c-torture/execute/20000205-1.c ! 763627167b ./gcc/testsuite/gcc.c-torture/execute/20000217-1.c ! 778222354b ./gcc/testsuite/gcc.c-torture/execute/20000223-1.c ! 2810936145b ./gcc/testsuite/gcc.c-torture/execute/20000224-1.c ! 2859303587b ./gcc/testsuite/gcc.c-torture/execute/20000225-1.c ! 2200813341b ./gcc/testsuite/gcc.c-torture/execute/20000227-1.c ! 1085530082b ./gcc/testsuite/gcc.c-torture/execute/20000313-1.c ! 1558819196b ./gcc/testsuite/gcc.c-torture/execute/20000314-1.c ! 1363719296b ./gcc/testsuite/gcc.c-torture/execute/20000314-2.c ! 1833012317b ./gcc/testsuite/gcc.c-torture/execute/20000314-3.c ! 3834437988b ./gcc/testsuite/gcc.c-torture/execute/20000402-1.c ! 4060238122b ./gcc/testsuite/gcc.c-torture/execute/20000403-1.c ! 3672378029b ./gcc/testsuite/gcc.c-torture/execute/20000412-1.c ! 2857396630b ./gcc/testsuite/gcc.c-torture/execute/20000412-2.c ! 3640032771b ./gcc/testsuite/gcc.c-torture/execute/20000412-3.c ! 4233239850b ./gcc/testsuite/gcc.c-torture/execute/20000412-4.c ! 3642307617b ./gcc/testsuite/gcc.c-torture/execute/20000412-5.c ! 122352684b ./gcc/testsuite/gcc.c-torture/execute/20000412-6.c ! 939777600b ./gcc/testsuite/gcc.c-torture/execute/20000419-1.c ! 1445008654b ./gcc/testsuite/gcc.c-torture/execute/20000422-1.c ! 677800698b ./gcc/testsuite/gcc.c-torture/execute/20000503-1.c ! 531516808b ./gcc/testsuite/gcc.c-torture/execute/20000511-1.c ! 301599840b ./gcc/testsuite/gcc.c-torture/execute/20000519-1.c ! 2363078014b ./gcc/testsuite/gcc.c-torture/execute/20000519-2.c ! 2387696776b ./gcc/testsuite/gcc.c-torture/execute/20000523-1.c ! 185622639b ./gcc/testsuite/gcc.c-torture/execute/20000528-1.c ! 3522437520b ./gcc/testsuite/gcc.c-torture/execute/20000603-1.c ! 1679879990b ./gcc/testsuite/gcc.c-torture/execute/20000605-1.c ! 2664922764b ./gcc/testsuite/gcc.c-torture/execute/20000605-2.c ! 3650927220b ./gcc/testsuite/gcc.c-torture/execute/20000605-3.c ! 3450155788b ./gcc/testsuite/gcc.c-torture/execute/20000622-1.c ! 1183204743b ./gcc/testsuite/gcc.c-torture/execute/20000703-1.c ! 2031552411b ./gcc/testsuite/gcc.c-torture/execute/20000706-1.c ! 425477806b ./gcc/testsuite/gcc.c-torture/execute/20000706-2.c ! 690409016b ./gcc/testsuite/gcc.c-torture/execute/20000706-3.c ! 388840900b ./gcc/testsuite/gcc.c-torture/execute/20000706-4.c ! 3881852138b ./gcc/testsuite/gcc.c-torture/execute/20000706-5.c ! 4202259059b ./gcc/testsuite/gcc.c-torture/execute/20000707-1.c ! 444353142b ./gcc/testsuite/gcc.c-torture/execute/20000715-1.c ! 1455669777b ./gcc/testsuite/gcc.c-torture/execute/20000715-2.c ! 1355649270b ./gcc/testsuite/gcc.c-torture/execute/20000717-1.c ! 2506273608b ./gcc/testsuite/gcc.c-torture/execute/20000717-2.c ! 3729674446b ./gcc/testsuite/gcc.c-torture/execute/20000717-3.c ! 843831990b ./gcc/testsuite/gcc.c-torture/execute/20000717-4.c ! 3868604235b ./gcc/testsuite/gcc.c-torture/execute/20000717-5.c ! 3718377161b ./gcc/testsuite/gcc.c-torture/execute/20000722-1.c ! 1809610528b ./gcc/testsuite/gcc.c-torture/execute/20000726-1.c ! 3447416803b ./gcc/testsuite/gcc.c-torture/execute/20000731-1.c ! 1979644625b ./gcc/testsuite/gcc.c-torture/execute/20000731-2.c ! 622038460b ./gcc/testsuite/gcc.c-torture/execute/20000801-1.c ! 379050989b ./gcc/testsuite/gcc.c-torture/execute/20000801-2.c ! 1541984007b ./gcc/testsuite/gcc.c-torture/execute/20000801-3.c ! 73769468b ./gcc/testsuite/gcc.c-torture/execute/20000801-4.c ! 3273221977b ./gcc/testsuite/gcc.c-torture/execute/20000808-1.c ! 3715226001b ./gcc/testsuite/gcc.c-torture/execute/20000815-1.c ! 2910084298b ./gcc/testsuite/gcc.c-torture/execute/20000818-1.c ! 3982907773b ./gcc/testsuite/gcc.c-torture/execute/20000819-1.c ! 806186932b ./gcc/testsuite/gcc.c-torture/execute/20000822-1.c ! 1842039169b ./gcc/testsuite/gcc.c-torture/execute/20000910-1.c ! 187331803b ./gcc/testsuite/gcc.c-torture/execute/20000910-2.c ! 2672323622b ./gcc/testsuite/gcc.c-torture/execute/20000914-1.c ! 3900394210b ./gcc/testsuite/gcc.c-torture/execute/20000917-1.c ! 3471632940b ./gcc/testsuite/gcc.c-torture/execute/20001009-1.c ! 1469841059b ./gcc/testsuite/gcc.c-torture/execute/20001009-2.c ! 1399364540b ./gcc/testsuite/gcc.c-torture/execute/20001011-1.c ! 1742992606b ./gcc/testsuite/gcc.c-torture/execute/20001013-1.c ! 4079653839b ./gcc/testsuite/gcc.c-torture/execute/20001017-1.c ! 915214225b ./gcc/testsuite/gcc.c-torture/execute/20001017-2.c ! 411820211b ./gcc/testsuite/gcc.c-torture/execute/20001024-1.c ! 4210982727b ./gcc/testsuite/gcc.c-torture/execute/20001026-1.c ! 2907247602b ./gcc/testsuite/gcc.c-torture/execute/20001027-1.c ! 731083799b ./gcc/testsuite/gcc.c-torture/execute/20001031-1.c ! 123108566b ./gcc/testsuite/gcc.c-torture/execute/20001101.c ! 3554851734b ./gcc/testsuite/gcc.c-torture/execute/20001108-1.c ! 696351685b ./gcc/testsuite/gcc.c-torture/execute/20001111-1.c ! 1813795050b ./gcc/testsuite/gcc.c-torture/execute/20001112-1.c ! 3234051961b ./gcc/testsuite/gcc.c-torture/execute/20001121-1.c ! 2035849840b ./gcc/testsuite/gcc.c-torture/execute/20001124-1.c ! 378727792b ./gcc/testsuite/gcc.c-torture/execute/20001130-1.c ! 1876645280b ./gcc/testsuite/gcc.c-torture/execute/20001130-2.c ! 3253069371b ./gcc/testsuite/gcc.c-torture/execute/20001203-1.c ! 2873524021b ./gcc/testsuite/gcc.c-torture/execute/20001203-2.c ! 315046176b ./gcc/testsuite/gcc.c-torture/execute/20001221-1.c ! 3430334061b ./gcc/testsuite/gcc.c-torture/execute/20001228-1.c ! 4145547631b ./gcc/testsuite/gcc.c-torture/execute/20001229-1.c ! 2867964338b ./gcc/testsuite/gcc.c-torture/execute/20010106-1.c ! 4104575350b ./gcc/testsuite/gcc.c-torture/execute/20010114-1.c ! 4274826155b ./gcc/testsuite/gcc.c-torture/execute/20010116-1.c ! 1853154998b ./gcc/testsuite/gcc.c-torture/execute/20010118-1.c ! 1273676691b ./gcc/testsuite/gcc.c-torture/execute/20010119-1.c ! 367104834b ./gcc/testsuite/gcc.c-torture/execute/20010122-1.c ! 598227125b ./gcc/testsuite/gcc.c-torture/execute/20010122-1.x ! 2126355226b ./gcc/testsuite/gcc.c-torture/execute/20010123-1.c ! 2748204733b ./gcc/testsuite/gcc.c-torture/execute/20010124-1.c ! 962969845b ./gcc/testsuite/gcc.c-torture/execute/20010129-1.c ! 3261363423b ./gcc/testsuite/gcc.c-torture/execute/20010129-1.x ! 3208398809b ./gcc/testsuite/gcc.c-torture/execute/20010206-1.c ! 1778342214b ./gcc/testsuite/gcc.c-torture/execute/20010209-1.c ! 3579334795b ./gcc/testsuite/gcc.c-torture/execute/20010221-1.c ! 2457134781b ./gcc/testsuite/gcc.c-torture/execute/20010222-1.c ! 3606901851b ./gcc/testsuite/gcc.c-torture/execute/20010224-1.c ! 1780176502b ./gcc/testsuite/gcc.c-torture/execute/20010325-1.c ! 111828245b ./gcc/testsuite/gcc.c-torture/execute/20010329-1.c ! 4181677122b ./gcc/testsuite/gcc.c-torture/execute/20010403-1.c ! 1255405665b ./gcc/testsuite/gcc.c-torture/execute/20010409-1.c ! 2948781834b ./gcc/testsuite/gcc.c-torture/execute/20010422-1.c ! 3990119664b ./gcc/testsuite/gcc.c-torture/execute/20010518-1.c ! 3221966760b ./gcc/testsuite/gcc.c-torture/execute/20010518-2.c ! 4150058335b ./gcc/testsuite/gcc.c-torture/execute/20010520-1.c ! 3398306936b ./gcc/testsuite/gcc.c-torture/execute/20010604-1.c ! 1597970944b ./gcc/testsuite/gcc.c-torture/execute/20010605-1.c ! 2151082111b ./gcc/testsuite/gcc.c-torture/execute/20010605-2.c ! 2682131177b ./gcc/testsuite/gcc.c-torture/execute/20010711-1.c ! 873772836b ./gcc/testsuite/gcc.c-torture/execute/20010717-1.c ! 2673367189b ./gcc/testsuite/gcc.c-torture/execute/20010723-1.c ! 3978892519b ./gcc/testsuite/gcc.c-torture/execute/20010724-1.c ! 1723617799b ./gcc/testsuite/gcc.c-torture/execute/20010724-1.x ! 731866148b ./gcc/testsuite/gcc.c-torture/execute/20010904-1.c ! 731377342b ./gcc/testsuite/gcc.c-torture/execute/20010904-2.c ! 2522784842b ./gcc/testsuite/gcc.c-torture/execute/20010910-1.c ! 2397573972b ./gcc/testsuite/gcc.c-torture/execute/20010915-1.c ! 3737091006b ./gcc/testsuite/gcc.c-torture/execute/20010924-1.c ! 260325577b ./gcc/testsuite/gcc.c-torture/execute/20010925-1.c ! 4188355089b ./gcc/testsuite/gcc.c-torture/execute/20011008-3.c ! 2281713299b ./gcc/testsuite/gcc.c-torture/execute/20011019-1.c ! 2655569315b ./gcc/testsuite/gcc.c-torture/execute/20011024-1.c ! 1814584846b ./gcc/testsuite/gcc.c-torture/execute/20011109-1.c ! 1662612200b ./gcc/testsuite/gcc.c-torture/execute/20011109-2.c ! 2550685908b ./gcc/testsuite/gcc.c-torture/execute/20011113-1.c ! 172432599b ./gcc/testsuite/gcc.c-torture/execute/20011114-1.c ! 809814896b ./gcc/testsuite/gcc.c-torture/execute/20011115-1.c ! 4092518b ./gcc/testsuite/gcc.c-torture/execute/20011121-1.c ! 31392419b ./gcc/testsuite/gcc.c-torture/execute/20011126-1.c ! 2732339842b ./gcc/testsuite/gcc.c-torture/execute/20011126-2.c ! 815133002b ./gcc/testsuite/gcc.c-torture/execute/20011128-1.c ! 241656074b ./gcc/testsuite/gcc.c-torture/execute/20011217-1.c ! 2277704872b ./gcc/testsuite/gcc.c-torture/execute/20011219-1.c ! 2006770303b ./gcc/testsuite/gcc.c-torture/execute/20011223-1.c ! 4135985164b ./gcc/testsuite/gcc.c-torture/execute/20020103-1.c ! 2284569670b ./gcc/testsuite/gcc.c-torture/execute/20020107-1.c ! 2382854982b ./gcc/testsuite/gcc.c-torture/execute/20020108-1.c ! 2848042033b ./gcc/testsuite/gcc.c-torture/execute/20020118-1.c ! 2653510244b ./gcc/testsuite/gcc.c-torture/execute/20020127-1.c ! 1739097481b ./gcc/testsuite/gcc.c-torture/execute/20020129-1.c ! 1264770028b ./gcc/testsuite/gcc.c-torture/execute/20020201-1.c ! 502375258b ./gcc/testsuite/gcc.c-torture/execute/20020206-1.c ! 3691690701b ./gcc/testsuite/gcc.c-torture/execute/20020206-2.c ! 4078405558b ./gcc/testsuite/gcc.c-torture/execute/20020213-1.c ! 125431111b ./gcc/testsuite/gcc.c-torture/execute/20020215-1.c ! 1599210871b ./gcc/testsuite/gcc.c-torture/execute/20020216-1.c ! 1360698555b ./gcc/testsuite/gcc.c-torture/execute/20020219-1.c ! 756862614b ./gcc/testsuite/gcc.c-torture/execute/20020225-1.c ! 2250800547b ./gcc/testsuite/gcc.c-torture/execute/20020225-2.c ! 53329258b ./gcc/testsuite/gcc.c-torture/execute/20020226-1.c ! 127051635b ./gcc/testsuite/gcc.c-torture/execute/20020227-1.c ! 222551441b ./gcc/testsuite/gcc.c-torture/execute/20020227-1.x ! 1982547595b ./gcc/testsuite/gcc.c-torture/execute/20020307-1.c ! 2236973257b ./gcc/testsuite/gcc.c-torture/execute/20020314-1.c ! 3091941732b ./gcc/testsuite/gcc.c-torture/execute/20020320-1.c ! 3564527352b ./gcc/testsuite/gcc.c-torture/execute/20020321-1.c ! 353921064b ./gcc/testsuite/gcc.c-torture/execute/20020328-1.c ! 577542360b ./gcc/testsuite/gcc.c-torture/execute/20020402-1.c ! 3290123747b ./gcc/testsuite/gcc.c-torture/execute/20020402-2.c ! 2122778375b ./gcc/testsuite/gcc.c-torture/execute/20020402-3.c ! 2806949247b ./gcc/testsuite/gcc.c-torture/execute/20020404-1.c ! 658725271b ./gcc/testsuite/gcc.c-torture/execute/20020406-1.c ! 1900879256b ./gcc/testsuite/gcc.c-torture/execute/20020411-1.c ! 1497258578b ./gcc/testsuite/gcc.c-torture/execute/20020412-1.c ! 2788774617b ./gcc/testsuite/gcc.c-torture/execute/20020413-1.c ! 2439380096b ./gcc/testsuite/gcc.c-torture/execute/20020418-1.c ! 49470659b ./gcc/testsuite/gcc.c-torture/execute/20020423-1.c ! 484359727b ./gcc/testsuite/gcc.c-torture/execute/20020503-1.c ! 659437566b ./gcc/testsuite/gcc.c-torture/execute/20020506-1.c ! 3085688005b ./gcc/testsuite/gcc.c-torture/execute/20020508-1.c ! 2813884435b ./gcc/testsuite/gcc.c-torture/execute/20020508-2.c ! 846728332b ./gcc/testsuite/gcc.c-torture/execute/20020508-3.c ! 3411191897b ./gcc/testsuite/gcc.c-torture/execute/20020510-1.c ! 1286592631b ./gcc/testsuite/gcc.c-torture/execute/20020529-1.c ! 2563139669b ./gcc/testsuite/gcc.c-torture/execute/20020611-1.c ! 2588225457b ./gcc/testsuite/gcc.c-torture/execute/20020614-1.c ! 2304661446b ./gcc/testsuite/gcc.c-torture/execute/20020615-1.c ! 1625459055b ./gcc/testsuite/gcc.c-torture/execute/20020619-1.c ! 2876236122b ./gcc/testsuite/gcc.c-torture/execute/20020716-1.c ! 2090219848b ./gcc/testsuite/gcc.c-torture/execute/20020720-1.c ! 1392513436b ./gcc/testsuite/gcc.c-torture/execute/20020720-1.x ! 1859138834b ./gcc/testsuite/gcc.c-torture/execute/20020805-1.c ! 492121497b ./gcc/testsuite/gcc.c-torture/execute/20020904-1.c ! 572636623b ./gcc/testsuite/gcc.c-torture/execute/20020911-1.c ! 1548331694b ./gcc/testsuite/gcc.c-torture/execute/20020916-1.c ! 1916205927b ./gcc/testsuite/gcc.c-torture/execute/20021010-1.c ! 20734874b ./gcc/testsuite/gcc.c-torture/execute/20021010-2.c ! 3494808673b ./gcc/testsuite/gcc.c-torture/execute/20021011-1.c ! 1275043517b ./gcc/testsuite/gcc.c-torture/execute/20021015-1.c ! 2849369814b ./gcc/testsuite/gcc.c-torture/execute/20021024-1.c ! 3361882342b ./gcc/testsuite/gcc.c-torture/execute/20021111-1.c ! 2966353244b ./gcc/testsuite/gcc.c-torture/execute/20021118-1.c ! 582186764b ./gcc/testsuite/gcc.c-torture/execute/20021118-2.c ! 3834877290b ./gcc/testsuite/gcc.c-torture/execute/20021118-3.c ! 2087431710b ./gcc/testsuite/gcc.c-torture/execute/20021119-1.c ! 2543457728b ./gcc/testsuite/gcc.c-torture/execute/20021120-1.c ! 2916213179b ./gcc/testsuite/gcc.c-torture/execute/20021120-2.c ! 1499334675b ./gcc/testsuite/gcc.c-torture/execute/20021120-3.c ! 3171635785b ./gcc/testsuite/gcc.c-torture/execute/20021127-1.c ! 1067752545b ./gcc/testsuite/gcc.c-torture/execute/20021127-1.x ! 989736458b ./gcc/testsuite/gcc.c-torture/execute/20021204-1.c ! 624734562b ./gcc/testsuite/gcc.c-torture/execute/20021219-1.c ! 2820909676b ./gcc/testsuite/gcc.c-torture/execute/20030109-1.c ! 302087111b ./gcc/testsuite/gcc.c-torture/execute/20030120-1.c ! 3272014655b ./gcc/testsuite/gcc.c-torture/execute/20030120-2.c ! 689965669b ./gcc/testsuite/gcc.c-torture/execute/20030218-1.c ! 855486154b ./gcc/testsuite/gcc.c-torture/execute/20030221-1.c ! 821090783b ./gcc/testsuite/gcc.c-torture/execute/20030224-2.c ! 4076291177b ./gcc/testsuite/gcc.c-torture/execute/20030307-1.c ! 2371585447b ./gcc/testsuite/gcc.c-torture/execute/20030313-1.c ! 2637074483b ./gcc/testsuite/gcc.c-torture/execute/20030316-1.c ! 37158978b ./gcc/testsuite/gcc.c-torture/execute/900409-1.c ! 1241514475b ./gcc/testsuite/gcc.c-torture/execute/920202-1.c ! 651529975b ./gcc/testsuite/gcc.c-torture/execute/920302-1.c ! 2196801137b ./gcc/testsuite/gcc.c-torture/execute/920409-1.c ! 1816933206b ./gcc/testsuite/gcc.c-torture/execute/920410-1.c ! 1957456510b ./gcc/testsuite/gcc.c-torture/execute/920411-1.c ! 1749111501b ./gcc/testsuite/gcc.c-torture/execute/920415-1.c ! 508706990b ./gcc/testsuite/gcc.c-torture/execute/920428-1.c ! 3878413130b ./gcc/testsuite/gcc.c-torture/execute/920428-2.c ! 4127832878b ./gcc/testsuite/gcc.c-torture/execute/920428-2.x ! 158200597b ./gcc/testsuite/gcc.c-torture/execute/920429-1.c ! 1826863267b ./gcc/testsuite/gcc.c-torture/execute/920501-1.c ! 4177429300b ./gcc/testsuite/gcc.c-torture/execute/920501-2.c ! 1351528020b ./gcc/testsuite/gcc.c-torture/execute/920501-3.c ! 700639089b ./gcc/testsuite/gcc.c-torture/execute/920501-4.c ! 798860387b ./gcc/testsuite/gcc.c-torture/execute/920501-5.c ! 4199344202b ./gcc/testsuite/gcc.c-torture/execute/920501-6.c ! 2006299034b ./gcc/testsuite/gcc.c-torture/execute/920501-7.c ! 4127832878b ./gcc/testsuite/gcc.c-torture/execute/920501-7.x ! 1420615555b ./gcc/testsuite/gcc.c-torture/execute/920501-8.c ! 1273235575b ./gcc/testsuite/gcc.c-torture/execute/920501-8.x ! 2227123057b ./gcc/testsuite/gcc.c-torture/execute/920501-9.c ! 3928484317b ./gcc/testsuite/gcc.c-torture/execute/920506-1.c ! 3897601778b ./gcc/testsuite/gcc.c-torture/execute/920520-1.c ! 4049662034b ./gcc/testsuite/gcc.c-torture/execute/920603-1.c ! 2593769598b ./gcc/testsuite/gcc.c-torture/execute/920604-1.c ! 2294544032b ./gcc/testsuite/gcc.c-torture/execute/920612-1.c ! 102881897b ./gcc/testsuite/gcc.c-torture/execute/920612-2.c ! 484477154b ./gcc/testsuite/gcc.c-torture/execute/920618-1.c ! 937300795b ./gcc/testsuite/gcc.c-torture/execute/920625-1.c ! 3030586241b ./gcc/testsuite/gcc.c-torture/execute/920710-1.c ! 1902096790b ./gcc/testsuite/gcc.c-torture/execute/920710-1.x ! 3876529175b ./gcc/testsuite/gcc.c-torture/execute/920711-1.c ! 818049019b ./gcc/testsuite/gcc.c-torture/execute/920721-1.c ! 3191124720b ./gcc/testsuite/gcc.c-torture/execute/920721-2.c ! 3879255001b ./gcc/testsuite/gcc.c-torture/execute/920721-3.c ! 2852120360b ./gcc/testsuite/gcc.c-torture/execute/920721-4.c ! 792790044b ./gcc/testsuite/gcc.c-torture/execute/920726-1.c ! 2154603996b ./gcc/testsuite/gcc.c-torture/execute/920728-1.c ! 917858221b ./gcc/testsuite/gcc.c-torture/execute/920730-1.c ! 3574659813b ./gcc/testsuite/gcc.c-torture/execute/920731-1.c ! 1308229799b ./gcc/testsuite/gcc.c-torture/execute/920810-1.c ! 950989321b ./gcc/testsuite/gcc.c-torture/execute/920812-1.c ! 4187598456b ./gcc/testsuite/gcc.c-torture/execute/920829-1.c ! 559637020b ./gcc/testsuite/gcc.c-torture/execute/920908-1.c ! 2513627586b ./gcc/testsuite/gcc.c-torture/execute/920908-2.c ! 2499750871b ./gcc/testsuite/gcc.c-torture/execute/920909-1.c ! 714100171b ./gcc/testsuite/gcc.c-torture/execute/920922-1.c ! 2279537940b ./gcc/testsuite/gcc.c-torture/execute/920929-1.c ! 70714742b ./gcc/testsuite/gcc.c-torture/execute/921006-1.c ! 137444921b ./gcc/testsuite/gcc.c-torture/execute/921007-1.c ! 2897219149b ./gcc/testsuite/gcc.c-torture/execute/921013-1.c ! 1296914634b ./gcc/testsuite/gcc.c-torture/execute/921016-1.c ! 1596244093b ./gcc/testsuite/gcc.c-torture/execute/921017-1.c ! 4199584647b ./gcc/testsuite/gcc.c-torture/execute/921019-1.c ! 2431715965b ./gcc/testsuite/gcc.c-torture/execute/921019-2.c ! 3170380362b ./gcc/testsuite/gcc.c-torture/execute/921029-1.c ! 487195362b ./gcc/testsuite/gcc.c-torture/execute/921104-1.c ! 2352124020b ./gcc/testsuite/gcc.c-torture/execute/921110-1.c ! 207021478b ./gcc/testsuite/gcc.c-torture/execute/921112-1.c ! 283175496b ./gcc/testsuite/gcc.c-torture/execute/921113-1.c ! 2879836698b ./gcc/testsuite/gcc.c-torture/execute/921117-1.c ! 201436377b ./gcc/testsuite/gcc.c-torture/execute/921123-1.c ! 4236695419b ./gcc/testsuite/gcc.c-torture/execute/921123-2.c ! 316909011b ./gcc/testsuite/gcc.c-torture/execute/921124-1.c ! 3328444406b ./gcc/testsuite/gcc.c-torture/execute/921202-1.c ! 2280032251b ./gcc/testsuite/gcc.c-torture/execute/921202-2.c ! 1311000952b ./gcc/testsuite/gcc.c-torture/execute/921204-1.c ! 2949408934b ./gcc/testsuite/gcc.c-torture/execute/921207-1.c ! 870865911b ./gcc/testsuite/gcc.c-torture/execute/921208-1.c ! 2032495193b ./gcc/testsuite/gcc.c-torture/execute/921208-2.c ! 283353483b ./gcc/testsuite/gcc.c-torture/execute/921215-1.c ! 130096086b ./gcc/testsuite/gcc.c-torture/execute/921218-1.c ! 2115073235b ./gcc/testsuite/gcc.c-torture/execute/921218-2.c ! 3561999462b ./gcc/testsuite/gcc.c-torture/execute/930106-1.c ! 3160736499b ./gcc/testsuite/gcc.c-torture/execute/930111-1.c ! 4162371994b ./gcc/testsuite/gcc.c-torture/execute/930123-1.c ! 3265874780b ./gcc/testsuite/gcc.c-torture/execute/930126-1.c ! 2299871172b ./gcc/testsuite/gcc.c-torture/execute/930208-1.c ! 3144873997b ./gcc/testsuite/gcc.c-torture/execute/930406-1.c ! 3189774734b ./gcc/testsuite/gcc.c-torture/execute/930408-1.c ! 3400489427b ./gcc/testsuite/gcc.c-torture/execute/930429-1.c ! 2948158283b ./gcc/testsuite/gcc.c-torture/execute/930429-2.c ! 3905354169b ./gcc/testsuite/gcc.c-torture/execute/930513-1.c ! 1273235575b ./gcc/testsuite/gcc.c-torture/execute/930513-1.x ! 2524183853b ./gcc/testsuite/gcc.c-torture/execute/930513-2.c ! 2391753101b ./gcc/testsuite/gcc.c-torture/execute/930518-1.c ! 576031745b ./gcc/testsuite/gcc.c-torture/execute/930526-1.c ! 956415563b ./gcc/testsuite/gcc.c-torture/execute/930527-1.c ! 4026322841b ./gcc/testsuite/gcc.c-torture/execute/930529-1.c ! 2050475769b ./gcc/testsuite/gcc.c-torture/execute/930529-1.x ! 310850888b ./gcc/testsuite/gcc.c-torture/execute/930603-1.c ! 572652809b ./gcc/testsuite/gcc.c-torture/execute/930603-2.c ! 3452170691b ./gcc/testsuite/gcc.c-torture/execute/930603-3.c ! 352498879b ./gcc/testsuite/gcc.c-torture/execute/930608-1.c ! 2318312710b ./gcc/testsuite/gcc.c-torture/execute/930614-1.c ! 307026414b ./gcc/testsuite/gcc.c-torture/execute/930614-2.c ! 380017129b ./gcc/testsuite/gcc.c-torture/execute/930621-1.c ! 852093434b ./gcc/testsuite/gcc.c-torture/execute/930622-1.c ! 1010026580b ./gcc/testsuite/gcc.c-torture/execute/930622-2.c ! 2381515578b ./gcc/testsuite/gcc.c-torture/execute/930628-1.c ! 3968663339b ./gcc/testsuite/gcc.c-torture/execute/930630-1.c ! 1360276333b ./gcc/testsuite/gcc.c-torture/execute/930702-1.c ! 2690450552b ./gcc/testsuite/gcc.c-torture/execute/930713-1.c ! 3621302381b ./gcc/testsuite/gcc.c-torture/execute/930718-1.c ! 1853260970b ./gcc/testsuite/gcc.c-torture/execute/930719-1.c ! 2257054643b ./gcc/testsuite/gcc.c-torture/execute/930725-1.c ! 1877434408b ./gcc/testsuite/gcc.c-torture/execute/930818-1.c ! 1262159860b ./gcc/testsuite/gcc.c-torture/execute/930916-1.c ! 2667793229b ./gcc/testsuite/gcc.c-torture/execute/930921-1.c ! 2351038398b ./gcc/testsuite/gcc.c-torture/execute/930929-1.c ! 2863421839b ./gcc/testsuite/gcc.c-torture/execute/930930-1.c ! 557816592b ./gcc/testsuite/gcc.c-torture/execute/930930-2.c ! 2101614510b ./gcc/testsuite/gcc.c-torture/execute/931002-1.c ! 1700898376b ./gcc/testsuite/gcc.c-torture/execute/931004-10.c ! 962417771b ./gcc/testsuite/gcc.c-torture/execute/931004-11.c ! 2700865821b ./gcc/testsuite/gcc.c-torture/execute/931004-12.c ! 3436458492b ./gcc/testsuite/gcc.c-torture/execute/931004-13.c ! 4127270352b ./gcc/testsuite/gcc.c-torture/execute/931004-14.c ! 2742393702b ./gcc/testsuite/gcc.c-torture/execute/931004-1.c ! 346996272b ./gcc/testsuite/gcc.c-torture/execute/931004-2.c ! 1206221721b ./gcc/testsuite/gcc.c-torture/execute/931004-3.c ! 3166093368b ./gcc/testsuite/gcc.c-torture/execute/931004-4.c ! 1452916171b ./gcc/testsuite/gcc.c-torture/execute/931004-5.c ! 2022610295b ./gcc/testsuite/gcc.c-torture/execute/931004-6.c ! 2036744892b ./gcc/testsuite/gcc.c-torture/execute/931004-7.c ! 1586770276b ./gcc/testsuite/gcc.c-torture/execute/931004-8.c ! 3369996669b ./gcc/testsuite/gcc.c-torture/execute/931004-9.c ! 3731237663b ./gcc/testsuite/gcc.c-torture/execute/931005-1.c ! 3432311031b ./gcc/testsuite/gcc.c-torture/execute/931009-1.c ! 1834388885b ./gcc/testsuite/gcc.c-torture/execute/931012-1.c ! 2534034619b ./gcc/testsuite/gcc.c-torture/execute/931017-1.c ! 1949677962b ./gcc/testsuite/gcc.c-torture/execute/931018-1.c ! 3825241545b ./gcc/testsuite/gcc.c-torture/execute/931031-1.c ! 1877484625b ./gcc/testsuite/gcc.c-torture/execute/931102-1.c ! 3927915289b ./gcc/testsuite/gcc.c-torture/execute/931102-2.c ! 480430370b ./gcc/testsuite/gcc.c-torture/execute/931110-1.c ! 3822785940b ./gcc/testsuite/gcc.c-torture/execute/931110-2.c ! 967340546b ./gcc/testsuite/gcc.c-torture/execute/931208-1.c ! 2682740818b ./gcc/testsuite/gcc.c-torture/execute/931228-1.c ! 2017170797b ./gcc/testsuite/gcc.c-torture/execute/940115-1.c ! 82400069b ./gcc/testsuite/gcc.c-torture/execute/940122-1.c ! 4235476365b ./gcc/testsuite/gcc.c-torture/execute/941014-1.c ! 2525145377b ./gcc/testsuite/gcc.c-torture/execute/941014-1.x ! 1977507646b ./gcc/testsuite/gcc.c-torture/execute/941014-2.c ! 310736147b ./gcc/testsuite/gcc.c-torture/execute/941015-1.c ! 1318043175b ./gcc/testsuite/gcc.c-torture/execute/941021-1.c ! 3185365004b ./gcc/testsuite/gcc.c-torture/execute/941025-1.c ! 678677907b ./gcc/testsuite/gcc.c-torture/execute/941031-1.c ! 3905782643b ./gcc/testsuite/gcc.c-torture/execute/941101-1.c ! 1810551831b ./gcc/testsuite/gcc.c-torture/execute/941110-1.c ! 3428057334b ./gcc/testsuite/gcc.c-torture/execute/941202-1.c ! 3908063718b ./gcc/testsuite/gcc.c-torture/execute/950221-1.c ! 1873160895b ./gcc/testsuite/gcc.c-torture/execute/950322-1.c ! 1672610716b ./gcc/testsuite/gcc.c-torture/execute/950426-1.c ! 3465653006b ./gcc/testsuite/gcc.c-torture/execute/950426-2.c ! 3696703975b ./gcc/testsuite/gcc.c-torture/execute/950503-1.c ! 1556250294b ./gcc/testsuite/gcc.c-torture/execute/950511-1.c ! 2857896870b ./gcc/testsuite/gcc.c-torture/execute/950512-1.c ! 114570668b ./gcc/testsuite/gcc.c-torture/execute/950605-1.c ! 2991280268b ./gcc/testsuite/gcc.c-torture/execute/950607-1.c ! 437837801b ./gcc/testsuite/gcc.c-torture/execute/950607-2.c ! 3950265298b ./gcc/testsuite/gcc.c-torture/execute/950612-1.c ! 1778400537b ./gcc/testsuite/gcc.c-torture/execute/950621-1.c ! 2070936302b ./gcc/testsuite/gcc.c-torture/execute/950628-1.c ! 3165536281b ./gcc/testsuite/gcc.c-torture/execute/950704-1.c ! 2486390814b ./gcc/testsuite/gcc.c-torture/execute/950706-1.c ! 1322454782b ./gcc/testsuite/gcc.c-torture/execute/950710-1.c ! 4241980915b ./gcc/testsuite/gcc.c-torture/execute/950714-1.c ! 3308590304b ./gcc/testsuite/gcc.c-torture/execute/950809-1.c ! 4154904713b ./gcc/testsuite/gcc.c-torture/execute/950906-1.c ! 1101166652b ./gcc/testsuite/gcc.c-torture/execute/950915-1.c ! 24392721b ./gcc/testsuite/gcc.c-torture/execute/950929-1.c ! 1234781098b ./gcc/testsuite/gcc.c-torture/execute/951003-1.c ! 3737612481b ./gcc/testsuite/gcc.c-torture/execute/951115-1.c ! 2658922424b ./gcc/testsuite/gcc.c-torture/execute/951204-1.c ! 3956410619b ./gcc/testsuite/gcc.c-torture/execute/960116-1.c ! 2093624467b ./gcc/testsuite/gcc.c-torture/execute/960117-1.c ! 1694357534b ./gcc/testsuite/gcc.c-torture/execute/960209-1.c ! 1952007331b ./gcc/testsuite/gcc.c-torture/execute/960215-1.c ! 60263952b ./gcc/testsuite/gcc.c-torture/execute/960218-1.c ! 1161569283b ./gcc/testsuite/gcc.c-torture/execute/960219-1.c ! 3429934900b ./gcc/testsuite/gcc.c-torture/execute/960301-1.c ! 160802950b ./gcc/testsuite/gcc.c-torture/execute/960302-1.c ! 2772979130b ./gcc/testsuite/gcc.c-torture/execute/960311-1.c ! 1259407124b ./gcc/testsuite/gcc.c-torture/execute/960311-2.c ! 3608527152b ./gcc/testsuite/gcc.c-torture/execute/960311-3.c ! 2087520542b ./gcc/testsuite/gcc.c-torture/execute/960312-1.c ! 1534960321b ./gcc/testsuite/gcc.c-torture/execute/960312-1.x ! 1208600766b ./gcc/testsuite/gcc.c-torture/execute/960317-1.c ! 1889026562b ./gcc/testsuite/gcc.c-torture/execute/960321-1.c ! 271449701b ./gcc/testsuite/gcc.c-torture/execute/960326-1.c ! 2449729039b ./gcc/testsuite/gcc.c-torture/execute/960327-1.c ! 2463095434b ./gcc/testsuite/gcc.c-torture/execute/960402-1.c ! 3079720318b ./gcc/testsuite/gcc.c-torture/execute/960405-1.c ! 4251399269b ./gcc/testsuite/gcc.c-torture/execute/960416-1.c ! 2615797380b ./gcc/testsuite/gcc.c-torture/execute/960416-1.x ! 2014388579b ./gcc/testsuite/gcc.c-torture/execute/960419-1.c ! 235840907b ./gcc/testsuite/gcc.c-torture/execute/960419-2.c ! 4266479970b ./gcc/testsuite/gcc.c-torture/execute/960512-1.c ! 3785913788b ./gcc/testsuite/gcc.c-torture/execute/960513-1.c ! 488880971b ./gcc/testsuite/gcc.c-torture/execute/960521-1.c ! 2321951599b ./gcc/testsuite/gcc.c-torture/execute/960608-1.c ! 4052360482b ./gcc/testsuite/gcc.c-torture/execute/960801-1.c ! 2655742085b ./gcc/testsuite/gcc.c-torture/execute/960802-1.c ! 135771086b ./gcc/testsuite/gcc.c-torture/execute/960830-1.c ! 2582740546b ./gcc/testsuite/gcc.c-torture/execute/960909-1.c ! 1944495033b ./gcc/testsuite/gcc.c-torture/execute/961004-1.c ! 658313774b ./gcc/testsuite/gcc.c-torture/execute/961017-1.c ! 785421501b ./gcc/testsuite/gcc.c-torture/execute/961017-2.c ! 2852845535b ./gcc/testsuite/gcc.c-torture/execute/961026-1.c ! 2375210094b ./gcc/testsuite/gcc.c-torture/execute/961112-1.c ! 2553026408b ./gcc/testsuite/gcc.c-torture/execute/961122-1.c ! 2422282222b ./gcc/testsuite/gcc.c-torture/execute/961122-2.c ! 3575956796b ./gcc/testsuite/gcc.c-torture/execute/961125-1.c ! 577488172b ./gcc/testsuite/gcc.c-torture/execute/961206-1.c ! 1182447544b ./gcc/testsuite/gcc.c-torture/execute/961213-1.c ! 2704046666b ./gcc/testsuite/gcc.c-torture/execute/961223-1.c ! 1973936950b ./gcc/testsuite/gcc.c-torture/execute/970214-1.c ! 1571629264b ./gcc/testsuite/gcc.c-torture/execute/970214-2.c ! 167780433b ./gcc/testsuite/gcc.c-torture/execute/970217-1.c ! 2343108590b ./gcc/testsuite/gcc.c-torture/execute/970923-1.c ! 2894602056b ./gcc/testsuite/gcc.c-torture/execute/980205.c ! 4265139835b ./gcc/testsuite/gcc.c-torture/execute/980223.c ! 1143734080b ./gcc/testsuite/gcc.c-torture/execute/980424-1.c ! 3704443102b ./gcc/testsuite/gcc.c-torture/execute/980505-1.c ! 2419800133b ./gcc/testsuite/gcc.c-torture/execute/980505-2.c ! 1955794056b ./gcc/testsuite/gcc.c-torture/execute/980506-1.c ! 2173791379b ./gcc/testsuite/gcc.c-torture/execute/980506-2.c ! 492472793b ./gcc/testsuite/gcc.c-torture/execute/980506-3.c ! 3939060245b ./gcc/testsuite/gcc.c-torture/execute/980526-1.c ! 1183240780b ./gcc/testsuite/gcc.c-torture/execute/980526-2.c ! 798626284b ./gcc/testsuite/gcc.c-torture/execute/980526-3.c ! 686935511b ./gcc/testsuite/gcc.c-torture/execute/980602-1.c ! 148166585b ./gcc/testsuite/gcc.c-torture/execute/980602-2.c ! 2555041864b ./gcc/testsuite/gcc.c-torture/execute/980604-1.c ! 2921367481b ./gcc/testsuite/gcc.c-torture/execute/980605-1.c ! 327024946b ./gcc/testsuite/gcc.c-torture/execute/980608-1.c ! 636602589b ./gcc/testsuite/gcc.c-torture/execute/980612-1.c ! 1796014237b ./gcc/testsuite/gcc.c-torture/execute/980617-1.c ! 1416887007b ./gcc/testsuite/gcc.c-torture/execute/980618-1.c ! 3252251770b ./gcc/testsuite/gcc.c-torture/execute/980701-1.c ! 3843080992b ./gcc/testsuite/gcc.c-torture/execute/980707-1.c ! 3327976229b ./gcc/testsuite/gcc.c-torture/execute/980709-1.c ! 2346484511b ./gcc/testsuite/gcc.c-torture/execute/980709-1.x ! 1464453071b ./gcc/testsuite/gcc.c-torture/execute/980716-1.c ! 1144140014b ./gcc/testsuite/gcc.c-torture/execute/980929-1.c ! 2567595595b ./gcc/testsuite/gcc.c-torture/execute/981001-1.c ! 1496092063b ./gcc/testsuite/gcc.c-torture/execute/981019-1.c ! 1493534646b ./gcc/testsuite/gcc.c-torture/execute/981130-1.c ! 296945303b ./gcc/testsuite/gcc.c-torture/execute/981130-1.x ! 2098827021b ./gcc/testsuite/gcc.c-torture/execute/981206-1.c ! 785276758b ./gcc/testsuite/gcc.c-torture/execute/990106-1.c ! 1458926953b ./gcc/testsuite/gcc.c-torture/execute/990106-2.c ! 1443443587b ./gcc/testsuite/gcc.c-torture/execute/990117-1.c ! 98144727b ./gcc/testsuite/gcc.c-torture/execute/990127-1.c ! 4206968879b ./gcc/testsuite/gcc.c-torture/execute/990127-2.c ! 1805424399b ./gcc/testsuite/gcc.c-torture/execute/990128-1.c ! 1406479809b ./gcc/testsuite/gcc.c-torture/execute/990130-1.c ! 1075245403b ./gcc/testsuite/gcc.c-torture/execute/990208-1.c ! 2607456693b ./gcc/testsuite/gcc.c-torture/execute/990208-1.x ! 1910322968b ./gcc/testsuite/gcc.c-torture/execute/990211-1.c ! 2520747136b ./gcc/testsuite/gcc.c-torture/execute/990222-1.c ! 4167898413b ./gcc/testsuite/gcc.c-torture/execute/990324-1.c ! 1316369295b ./gcc/testsuite/gcc.c-torture/execute/990326-1.c ! 2237806705b ./gcc/testsuite/gcc.c-torture/execute/990404-1.c ! 3506652867b ./gcc/testsuite/gcc.c-torture/execute/990413-2.c ! 1028733236b ./gcc/testsuite/gcc.c-torture/execute/990413-2.x ! 533594278b ./gcc/testsuite/gcc.c-torture/execute/990513-1.c ! 2242042026b ./gcc/testsuite/gcc.c-torture/execute/990524-1.c ! 1608250007b ./gcc/testsuite/gcc.c-torture/execute/990525-1.c ! 1043856586b ./gcc/testsuite/gcc.c-torture/execute/990525-2.c ! 1233686917b ./gcc/testsuite/gcc.c-torture/execute/990527-1.c ! 1220250784b ./gcc/testsuite/gcc.c-torture/execute/990531-1.c ! 3289696997b ./gcc/testsuite/gcc.c-torture/execute/990604-1.c ! 80435005b ./gcc/testsuite/gcc.c-torture/execute/990628-1.c ! 2064588039b ./gcc/testsuite/gcc.c-torture/execute/990804-1.c ! 2063909199b ./gcc/testsuite/gcc.c-torture/execute/990811-1.c ! 1435922216b ./gcc/testsuite/gcc.c-torture/execute/990826-0.c ! 2369075067b ./gcc/testsuite/gcc.c-torture/execute/990826-0.x ! 3894203537b ./gcc/testsuite/gcc.c-torture/execute/990827-1.c ! 1924065387b ./gcc/testsuite/gcc.c-torture/execute/990829-1.c ! 3657724130b ./gcc/testsuite/gcc.c-torture/execute/990923-1.c ! 3037719587b ./gcc/testsuite/gcc.c-torture/execute/991014-1.c ! 340177342b ./gcc/testsuite/gcc.c-torture/execute/991016-1.c ! 2236305082b ./gcc/testsuite/gcc.c-torture/execute/991019-1.c ! 4202756321b ./gcc/testsuite/gcc.c-torture/execute/991023-1.c ! 1824884313b ./gcc/testsuite/gcc.c-torture/execute/991030-1.c ! 4138873239b ./gcc/testsuite/gcc.c-torture/execute/991112-1.c ! 2109536582b ./gcc/testsuite/gcc.c-torture/execute/991118-1.c ! 1316882767b ./gcc/testsuite/gcc.c-torture/execute/991201-1.c ! 2220300988b ./gcc/testsuite/gcc.c-torture/execute/991202-1.c ! 1285333003b ./gcc/testsuite/gcc.c-torture/execute/991202-2.c ! 2329096948b ./gcc/testsuite/gcc.c-torture/execute/991202-3.c ! 3117583172b ./gcc/testsuite/gcc.c-torture/execute/991216-1.c ! 4234986278b ./gcc/testsuite/gcc.c-torture/execute/991216-2.c ! 2527910714b ./gcc/testsuite/gcc.c-torture/execute/991216-3.c ! 4137201305b ./gcc/testsuite/gcc.c-torture/execute/991216-4.c ! 882138391b ./gcc/testsuite/gcc.c-torture/execute/991221-1.c ! 2854457808b ./gcc/testsuite/gcc.c-torture/execute/991227-1.c ! 3688640862b ./gcc/testsuite/gcc.c-torture/execute/991228-1.c ! 3793831392b ./gcc/testsuite/gcc.c-torture/execute/align-1.c ! 4120792597b ./gcc/testsuite/gcc.c-torture/execute/align-2.c ! 1274835551b ./gcc/testsuite/gcc.c-torture/execute/alloca-1.c ! 3292072248b ./gcc/testsuite/gcc.c-torture/execute/anon-1.c ! 1605923399b ./gcc/testsuite/gcc.c-torture/execute/arith-1.c ! 343449147b ./gcc/testsuite/gcc.c-torture/execute/arith-rand.c ! 2001873795b ./gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c ! 312869222b ./gcc/testsuite/gcc.c-torture/execute/ashldi-1.c ! 1327544364b ./gcc/testsuite/gcc.c-torture/execute/ashrdi-1.c ! 629391558b ./gcc/testsuite/gcc.c-torture/execute/bcp-1.c ! 323354359b ./gcc/testsuite/gcc.c-torture/execute/bf64-1.c ! 3097986350b ./gcc/testsuite/gcc.c-torture/execute/bf64-1.x ! 2311291194b ./gcc/testsuite/gcc.c-torture/execute/bf-layout-1.c ! 2757361338b ./gcc/testsuite/gcc.c-torture/execute/bf-pack-1.c ! 3543906045b ./gcc/testsuite/gcc.c-torture/execute/bf-sign-1.c ! 1320697357b ./gcc/testsuite/gcc.c-torture/execute/bf-sign-2.c ! 1331291117b ./gcc/testsuite/gcc.c-torture/execute/bitfld-1.c ! 3644699221b ./gcc/testsuite/gcc.c-torture/execute/bitfld-1.x ! 1684940093b ./gcc/testsuite/gcc.c-torture/execute/bitfld-2.c ! 1673141587b ./gcc/testsuite/gcc.c-torture/execute/builtin-abs-1.c ! 2056736695b ./gcc/testsuite/gcc.c-torture/execute/builtin-abs-2.c ! 3097553545b ./gcc/testsuite/gcc.c-torture/execute/builtin-complex-1.c ! 1493337540b ./gcc/testsuite/gcc.c-torture/execute/builtin-constant.c ! 2076507160b ./gcc/testsuite/gcc.c-torture/execute/builtin-constant.x ! 185545879b ./gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c ! 329340471b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c ! 397570715b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-2.c ! 1484227202b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-3.c ! 1934387710b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-4.c ! 2627312111b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-5.c ! 3741124173b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-6.c ! 4012339802b ./gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c ! 2250919883b ./gcc/testsuite/gcc.c-torture/execute/builtin-types-compatible-p.c ! 2177138525b ./gcc/testsuite/gcc.c-torture/execute/cbrt.c ! 2994579909b ./gcc/testsuite/gcc.c-torture/execute/cmpdi-1.c ! 3257252249b ./gcc/testsuite/gcc.c-torture/execute/cmpsi-1.c ! 601076272b ./gcc/testsuite/gcc.c-torture/execute/compare-1.c ! 1093590348b ./gcc/testsuite/gcc.c-torture/execute/compare-2.c ! 485892504b ./gcc/testsuite/gcc.c-torture/execute/compare-3.c ! 3943123822b ./gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c ! 3449149566b ./gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c ! 760972136b ./gcc/testsuite/gcc.c-torture/execute/complex-1.c ! 3034158014b ./gcc/testsuite/gcc.c-torture/execute/complex-2.c ! 478689052b ./gcc/testsuite/gcc.c-torture/execute/complex-3.c ! 662396237b ./gcc/testsuite/gcc.c-torture/execute/complex-4.c ! 1022468052b ./gcc/testsuite/gcc.c-torture/execute/complex-5.c ! 3814081986b ./gcc/testsuite/gcc.c-torture/execute/complex-6.c ! 1079537985b ./gcc/testsuite/gcc.c-torture/execute/compndlit-1.c ! 3337673351b ./gcc/testsuite/gcc.c-torture/execute/conversion.c ! 1362123497b ./gcc/testsuite/gcc.c-torture/execute/cvt-1.c ! 732726874b ./gcc/testsuite/gcc.c-torture/execute/cvt-1.x ! 1037739064b ./gcc/testsuite/gcc.c-torture/execute/dbra-1.c ! 3567725587b ./gcc/testsuite/gcc.c-torture/execute/divconst-1.c ! 3321693440b ./gcc/testsuite/gcc.c-torture/execute/divconst-2.c ! 506840532b ./gcc/testsuite/gcc.c-torture/execute/divconst-3.c ! 2615797380b ./gcc/testsuite/gcc.c-torture/execute/divconst-3.x ! 2274689094b ./gcc/testsuite/gcc.c-torture/execute/divmod-1.c ! 1808173474b ./gcc/testsuite/gcc.c-torture/execute/eeprof-1.c ! 2216490291b ./gcc/testsuite/gcc.c-torture/execute/eeprof-1.x ! 1886321368b ./gcc/testsuite/gcc.c-torture/execute/enum-1.c ! 3916720934b ./gcc/testsuite/gcc.c-torture/execute/enum-2.c ! 2211348141b ./gcc/testsuite/gcc.c-torture/execute/execute.exp ! 1911697643b ./gcc/testsuite/gcc.c-torture/execute/extzvsi.c ! 1707039639b ./gcc/testsuite/gcc.c-torture/execute/ffs-1.c ! 3989025058b ./gcc/testsuite/gcc.c-torture/execute/ffs-2.c ! 155906334b ./gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c ! 1157816092b ./gcc/testsuite/gcc.c-torture/execute/gofast.c ! 3451592953b ./gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c ! 981656236b ./gcc/testsuite/gcc.c-torture/execute/ieee/20001122-1.c ! 2602526611b ./gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.c ! 1052207154b ./gcc/testsuite/gcc.c-torture/execute/ieee/20010226-1.c ! 372215662b ./gcc/testsuite/gcc.c-torture/execute/ieee/20011123-1.c ! 2046772610b ./gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.c ! 3673851898b ./gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.c ! 1813910189b ./gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c ! 73602629b ./gcc/testsuite/gcc.c-torture/execute/ieee/980619-1.c ! 1659512392b ./gcc/testsuite/gcc.c-torture/execute/ieee/980619-1.x ! 1948647907b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c ! 1935804586b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c ! 817625481b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c ! 3452570198b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.c ! 330892698b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-5.c ! 4125344101b ./gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c ! 1953413990b ./gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x ! 2299573411b ./gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ! 959223490b ./gcc/testsuite/gcc.c-torture/execute/ieee/inf-1.c ! 4017678214b ./gcc/testsuite/gcc.c-torture/execute/ieee/minuszero.c ! 3545392440b ./gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c ! 2290856575b ./gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.x ! 3203549249b ./gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c ! 545426428b ./gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c ! 2631912054b ./gcc/testsuite/gcc.c-torture/execute/ieee/rbug.x ! 287394580b ./gcc/testsuite/gcc.c-torture/execute/index-1.c ! 3728840213b ./gcc/testsuite/gcc.c-torture/execute/inst-check.c ! 2015511278b ./gcc/testsuite/gcc.c-torture/execute/int-compare.c ! 2503239574b ./gcc/testsuite/gcc.c-torture/execute/longlong.c ! 3284814162b ./gcc/testsuite/gcc.c-torture/execute/loop-10.c ! 2766603756b ./gcc/testsuite/gcc.c-torture/execute/loop-11.c ! 3036735737b ./gcc/testsuite/gcc.c-torture/execute/loop-12.c ! 1130729209b ./gcc/testsuite/gcc.c-torture/execute/loop-13.c ! 2537268960b ./gcc/testsuite/gcc.c-torture/execute/loop-14.c ! 995264748b ./gcc/testsuite/gcc.c-torture/execute/loop-15.c ! 2701191371b ./gcc/testsuite/gcc.c-torture/execute/loop-1.c ! 3443893179b ./gcc/testsuite/gcc.c-torture/execute/loop-2b.c ! 869002341b ./gcc/testsuite/gcc.c-torture/execute/loop-2.c ! 153943550b ./gcc/testsuite/gcc.c-torture/execute/loop-2c.c ! 720145550b ./gcc/testsuite/gcc.c-torture/execute/loop-2d.c ! 3479028442b ./gcc/testsuite/gcc.c-torture/execute/loop-2e.c ! 722341433b ./gcc/testsuite/gcc.c-torture/execute/loop-2e.x ! 1291794748b ./gcc/testsuite/gcc.c-torture/execute/loop-2f.c ! 3280299116b ./gcc/testsuite/gcc.c-torture/execute/loop-2f.x ! 661111306b ./gcc/testsuite/gcc.c-torture/execute/loop-2g.c ! 3280299116b ./gcc/testsuite/gcc.c-torture/execute/loop-2g.x ! 4068453712b ./gcc/testsuite/gcc.c-torture/execute/loop-3b.c ! 3620613760b ./gcc/testsuite/gcc.c-torture/execute/loop-3.c ! 2778041526b ./gcc/testsuite/gcc.c-torture/execute/loop-3c.c ! 1791416082b ./gcc/testsuite/gcc.c-torture/execute/loop-4b.c ! 3316778727b ./gcc/testsuite/gcc.c-torture/execute/loop-4.c ! 3541035036b ./gcc/testsuite/gcc.c-torture/execute/loop-5.c ! 4217961697b ./gcc/testsuite/gcc.c-torture/execute/loop-6.c ! 3649171232b ./gcc/testsuite/gcc.c-torture/execute/loop-7.c ! 3999194364b ./gcc/testsuite/gcc.c-torture/execute/loop-8.c ! 239440461b ./gcc/testsuite/gcc.c-torture/execute/loop-9.c ! 3308349321b ./gcc/testsuite/gcc.c-torture/execute/lshrdi-1.c ! 2178361746b ./gcc/testsuite/gcc.c-torture/execute/mayalias-1.c ! 1655048971b ./gcc/testsuite/gcc.c-torture/execute/memcpy-1.c ! 187988711b ./gcc/testsuite/gcc.c-torture/execute/memcpy-2.c ! 1198957866b ./gcc/testsuite/gcc.c-torture/execute/memcpy-bi.c ! 3672115493b ./gcc/testsuite/gcc.c-torture/execute/memset-1.c ! 2729518429b ./gcc/testsuite/gcc.c-torture/execute/memset-2.c ! 2259057543b ./gcc/testsuite/gcc.c-torture/execute/memset-3.c ! 1146723390b ./gcc/testsuite/gcc.c-torture/execute/mod-1.c ! 843122257b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c ! 2875393797b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-2.c ! 3451120516b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-3.c ! 1193207968b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-4.c ! 462740811b ./gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c ! 1347988605b ./gcc/testsuite/gcc.c-torture/execute/packed-1.c ! 3662025483b ./gcc/testsuite/gcc.c-torture/execute/packed-2.c ! 781350511b ./gcc/testsuite/gcc.c-torture/execute/pending-4.c ! 1246182987b ./gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c ! 1048909723b ./gcc/testsuite/gcc.c-torture/execute/pure-1.c ! 146053249b ./gcc/testsuite/gcc.c-torture/execute/regstack-1.c ! 1827676873b ./gcc/testsuite/gcc.c-torture/execute/scope-1.c ! 990025742b ./gcc/testsuite/gcc.c-torture/execute/scope-2.c ! 3788353048b ./gcc/testsuite/gcc.c-torture/execute/shiftdi.c ! 968964639b ./gcc/testsuite/gcc.c-torture/execute/simd-1.c ! 2111263962b ./gcc/testsuite/gcc.c-torture/execute/simd-2.c ! 1004975218b ./gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c ! 2726881848b ./gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c ! 2215607685b ./gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c ! 3991648294b ./gcc/testsuite/gcc.c-torture/execute/strcmp-1.c ! 2372605244b ./gcc/testsuite/gcc.c-torture/execute/strcpy-1.c ! 4127514660b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c ! 2567091361b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-2.c ! 3788900866b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-3.c ! 3787465303b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-4.c ! 2204360040b ./gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.c ! 3993171434b ./gcc/testsuite/gcc.c-torture/execute/strct-varg-1.c ! 13747021b ./gcc/testsuite/gcc.c-torture/execute/strct-varg-1.x ! 2004905304b ./gcc/testsuite/gcc.c-torture/execute/string-opt-10.c ! 1757228388b ./gcc/testsuite/gcc.c-torture/execute/string-opt-11.c ! 3269205009b ./gcc/testsuite/gcc.c-torture/execute/string-opt-12.c ! 1302429529b ./gcc/testsuite/gcc.c-torture/execute/string-opt-13.c ! 1984203373b ./gcc/testsuite/gcc.c-torture/execute/string-opt-14.c ! 206750096b ./gcc/testsuite/gcc.c-torture/execute/string-opt-15.c ! 2089995b ./gcc/testsuite/gcc.c-torture/execute/string-opt-16.c ! 4247898295b ./gcc/testsuite/gcc.c-torture/execute/string-opt-17.c ! 3389618360b ./gcc/testsuite/gcc.c-torture/execute/string-opt-1.c ! 2499130848b ./gcc/testsuite/gcc.c-torture/execute/string-opt-2.c ! 307949358b ./gcc/testsuite/gcc.c-torture/execute/string-opt-3.c ! 1473532603b ./gcc/testsuite/gcc.c-torture/execute/string-opt-4.c ! 2202340101b ./gcc/testsuite/gcc.c-torture/execute/string-opt-5.c ! 196339167b ./gcc/testsuite/gcc.c-torture/execute/string-opt-6.c ! 2437896034b ./gcc/testsuite/gcc.c-torture/execute/string-opt-7.c ! 3642395267b ./gcc/testsuite/gcc.c-torture/execute/string-opt-8.c ! 2299025367b ./gcc/testsuite/gcc.c-torture/execute/string-opt-9.c ! 2255190212b ./gcc/testsuite/gcc.c-torture/execute/strlen-1.c ! 4274645385b ./gcc/testsuite/gcc.c-torture/execute/strncmp-1.c ! 3047570290b ./gcc/testsuite/gcc.c-torture/execute/struct-cpy-1.c ! 2234035225b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-1.c ! 1176467633b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c ! 2162338370b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-3.c ! 3372312182b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c ! 1924491577b ./gcc/testsuite/gcc.c-torture/execute/struct-ret-1.c ! 2222062805b ./gcc/testsuite/gcc.c-torture/execute/struct-ret-2.c ! 2658407134b ./gcc/testsuite/gcc.c-torture/execute/tstdi-1.c ! 1760191623b ./gcc/testsuite/gcc.c-torture/execute/unroll-1.c ! 150011334b ./gcc/testsuite/gcc.c-torture/execute/va-arg-10.c ! 1341755443b ./gcc/testsuite/gcc.c-torture/execute/va-arg-11.c ! 3741851708b ./gcc/testsuite/gcc.c-torture/execute/va-arg-12.c ! 2056576210b ./gcc/testsuite/gcc.c-torture/execute/va-arg-13.c ! 1501818131b ./gcc/testsuite/gcc.c-torture/execute/va-arg-14.c ! 276020100b ./gcc/testsuite/gcc.c-torture/execute/va-arg-15.c ! 4028296238b ./gcc/testsuite/gcc.c-torture/execute/va-arg-16.c ! 2803615477b ./gcc/testsuite/gcc.c-torture/execute/va-arg-17.c ! 2108289558b ./gcc/testsuite/gcc.c-torture/execute/va-arg-18.c ! 4145285080b ./gcc/testsuite/gcc.c-torture/execute/va-arg-19.c ! 4100317579b ./gcc/testsuite/gcc.c-torture/execute/va-arg-1.c ! 366376907b ./gcc/testsuite/gcc.c-torture/execute/va-arg-20.c ! 3416533370b ./gcc/testsuite/gcc.c-torture/execute/va-arg-21.c ! 1403664843b ./gcc/testsuite/gcc.c-torture/execute/va-arg-22.c ! 2661012060b ./gcc/testsuite/gcc.c-torture/execute/va-arg-23.c ! 3898927180b ./gcc/testsuite/gcc.c-torture/execute/va-arg-2.c ! 839866355b ./gcc/testsuite/gcc.c-torture/execute/va-arg-4.c ! 1210036672b ./gcc/testsuite/gcc.c-torture/execute/va-arg-5.c ! 365894168b ./gcc/testsuite/gcc.c-torture/execute/va-arg-6.c ! 2019116109b ./gcc/testsuite/gcc.c-torture/execute/va-arg-7.c ! 3989115940b ./gcc/testsuite/gcc.c-torture/execute/va-arg-8.c ! 2833151734b ./gcc/testsuite/gcc.c-torture/execute/va-arg-9.c ! 1911372417b ./gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c ! 529327846b ./gcc/testsuite/gcc.c-torture/execute/widechar-1.c ! 1902127658b ./gcc/testsuite/gcc.c-torture/execute/widechar-2.c ! 2556092488b ./gcc/testsuite/gcc.c-torture/execute/zerolen-1.c ! 4066787379b ./gcc/testsuite/gcc.c-torture/execute/zerolen-2.c ! 634421910b ./gcc/testsuite/gcc.c-torture/unsorted/386.c ! 2512826658b ./gcc/testsuite/gcc.c-torture/unsorted/86.c ! 2687046562b ./gcc/testsuite/gcc.c-torture/unsorted/a1.c ! 3122819825b ./gcc/testsuite/gcc.c-torture/unsorted/a3.c ! 1905897475b ./gcc/testsuite/gcc.c-torture/unsorted/aaa.c ! 1430858172b ./gcc/testsuite/gcc.c-torture/unsorted/aa.c ! 2128951928b ./gcc/testsuite/gcc.c-torture/unsorted/abs.c ! 51945996b ./gcc/testsuite/gcc.c-torture/unsorted/a.c ! 4087775597b ./gcc/testsuite/gcc.c-torture/unsorted/ac.c ! 4108214922b ./gcc/testsuite/gcc.c-torture/unsorted/acc.c ! 178238083b ./gcc/testsuite/gcc.c-torture/unsorted/add386.c ! 1561010997b ./gcc/testsuite/gcc.c-torture/unsorted/add.c ! 425148131b ./gcc/testsuite/gcc.c-torture/unsorted/addcc.c ! 1010727230b ./gcc/testsuite/gcc.c-torture/unsorted/andm.c ! 1804826393b ./gcc/testsuite/gcc.c-torture/unsorted/andmem.c ! 1939054464b ./gcc/testsuite/gcc.c-torture/unsorted/andn.c ! 958534456b ./gcc/testsuite/gcc.c-torture/unsorted/andok.c ! 4100679649b ./gcc/testsuite/gcc.c-torture/unsorted/andsi.c ! 1812217387b ./gcc/testsuite/gcc.c-torture/unsorted/andsparc.c ! 1261488553b ./gcc/testsuite/gcc.c-torture/unsorted/aos.c ! 3358660284b ./gcc/testsuite/gcc.c-torture/unsorted/arr.c ! 529589500b ./gcc/testsuite/gcc.c-torture/unsorted/as.c ! 2341774096b ./gcc/testsuite/gcc.c-torture/unsorted/ase.c ! 278197700b ./gcc/testsuite/gcc.c-torture/unsorted/b1.c ! 1838022421b ./gcc/testsuite/gcc.c-torture/unsorted/b2.c ! 1297638431b ./gcc/testsuite/gcc.c-torture/unsorted/b3.c ! 98906803b ./gcc/testsuite/gcc.c-torture/unsorted/b88.c ! 4166624962b ./gcc/testsuite/gcc.c-torture/unsorted/bad.c ! 909355576b ./gcc/testsuite/gcc.c-torture/unsorted/band.c ! 782217635b ./gcc/testsuite/gcc.c-torture/unsorted/bb0.c ! 104727600b ./gcc/testsuite/gcc.c-torture/unsorted/bb1.c ! 2113129899b ./gcc/testsuite/gcc.c-torture/unsorted/bbb.c ! 3604241750b ./gcc/testsuite/gcc.c-torture/unsorted/b.c ! 2670310529b ./gcc/testsuite/gcc.c-torture/unsorted/bc.c ! 3090384483b ./gcc/testsuite/gcc.c-torture/unsorted/bcopy.c ! 2685623920b ./gcc/testsuite/gcc.c-torture/unsorted/bf.c ! 1825505370b ./gcc/testsuite/gcc.c-torture/unsorted/bfins.c ! 3222678366b ./gcc/testsuite/gcc.c-torture/unsorted/bfx.c ! 1818008243b ./gcc/testsuite/gcc.c-torture/unsorted/bge.c ! 1169896684b ./gcc/testsuite/gcc.c-torture/unsorted/bit.c ! 4267772046b ./gcc/testsuite/gcc.c-torture/unsorted/bitf.c ! 1244917866b ./gcc/testsuite/gcc.c-torture/unsorted/bitw.c ! 3205164461b ./gcc/testsuite/gcc.c-torture/unsorted/blk.c ! 3930520391b ./gcc/testsuite/gcc.c-torture/unsorted/bt386.c ! 3879987638b ./gcc/testsuite/gcc.c-torture/unsorted/bt.c ! 2930337150b ./gcc/testsuite/gcc.c-torture/unsorted/BUG11.c ! 645328736b ./gcc/testsuite/gcc.c-torture/unsorted/BUG12.c ! 3447791606b ./gcc/testsuite/gcc.c-torture/unsorted/BUG13.c ! 1345083343b ./gcc/testsuite/gcc.c-torture/unsorted/BUG16.c ! 2211699544b ./gcc/testsuite/gcc.c-torture/unsorted/BUG17.c ! 3824994911b ./gcc/testsuite/gcc.c-torture/unsorted/BUG18.c ! 1577087180b ./gcc/testsuite/gcc.c-torture/unsorted/BUG1.c ! 2177082003b ./gcc/testsuite/gcc.c-torture/unsorted/BUG21.c ! 1740665759b ./gcc/testsuite/gcc.c-torture/unsorted/BUG22.c ! 4075155387b ./gcc/testsuite/gcc.c-torture/unsorted/BUG23.c ! 3968893634b ./gcc/testsuite/gcc.c-torture/unsorted/BUG24.c ! 459689731b ./gcc/testsuite/gcc.c-torture/unsorted/BUG25.c ! 3618943848b ./gcc/testsuite/gcc.c-torture/unsorted/BUG2.c ! 474328818b ./gcc/testsuite/gcc.c-torture/unsorted/BUG3.c ! 1462112702b ./gcc/testsuite/gcc.c-torture/unsorted/BUG4.c ! 3140531389b ./gcc/testsuite/gcc.c-torture/unsorted/BUG5.c ! 460917160b ./gcc/testsuite/gcc.c-torture/unsorted/BUG6.c ! 2778832219b ./gcc/testsuite/gcc.c-torture/unsorted/bug.c ! 909529146b ./gcc/testsuite/gcc.c-torture/unsorted/bugc.c ! 3859987766b ./gcc/testsuite/gcc.c-torture/unsorted/buns.c ! 2981977682b ./gcc/testsuite/gcc.c-torture/unsorted/bx.c ! 3824196498b ./gcc/testsuite/gcc.c-torture/unsorted/c1.c ! 3656093116b ./gcc/testsuite/gcc.c-torture/unsorted/c2.c ! 3745915003b ./gcc/testsuite/gcc.c-torture/unsorted/call386.c ! 3818633964b ./gcc/testsuite/gcc.c-torture/unsorted/call.c ! 3496796739b ./gcc/testsuite/gcc.c-torture/unsorted/callind.c ! 3780608001b ./gcc/testsuite/gcc.c-torture/unsorted/c.c ! 162598922b ./gcc/testsuite/gcc.c-torture/unsorted/cc.c ! 2143288465b ./gcc/testsuite/gcc.c-torture/unsorted/charmtst.c ! 1855363258b ./gcc/testsuite/gcc.c-torture/unsorted/cmb.c ! 1285046858b ./gcc/testsuite/gcc.c-torture/unsorted/cmp.c ! 1423312127b ./gcc/testsuite/gcc.c-torture/unsorted/cmphi.c ! 2318993881b ./gcc/testsuite/gcc.c-torture/unsorted/cmpsi386.c ! 4235211728b ./gcc/testsuite/gcc.c-torture/unsorted/cmul.c ! 854170788b ./gcc/testsuite/gcc.c-torture/unsorted/cn1.c ! 935857365b ./gcc/testsuite/gcc.c-torture/unsorted/comb.c ! 1810135123b ./gcc/testsuite/gcc.c-torture/unsorted/consec.c ! 181790131b ./gcc/testsuite/gcc.c-torture/unsorted/const.c ! 2353636753b ./gcc/testsuite/gcc.c-torture/unsorted/conv.c ! 3252387675b ./gcc/testsuite/gcc.c-torture/unsorted/conv_tst.c ! 2280634062b ./gcc/testsuite/gcc.c-torture/unsorted/cp.c ! 1738381851b ./gcc/testsuite/gcc.c-torture/unsorted/csebug.c ! 1464956912b ./gcc/testsuite/gcc.c-torture/unsorted/cvt.c ! 606535868b ./gcc/testsuite/gcc.c-torture/unsorted/dblbug.c ! 3851183583b ./gcc/testsuite/gcc.c-torture/unsorted/dbl_parm.c ! 3440041653b ./gcc/testsuite/gcc.c-torture/unsorted/d.c ! 2925438011b ./gcc/testsuite/gcc.c-torture/unsorted/ddd.c ! 2791348449b ./gcc/testsuite/gcc.c-torture/unsorted/dead.c ! 609366019b ./gcc/testsuite/gcc.c-torture/unsorted/delay.c ! 305442480b ./gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c ! 3029371757b ./gcc/testsuite/gcc.c-torture/unsorted/di.c ! 420255576b ./gcc/testsuite/gcc.c-torture/unsorted/dic.c ! 716977667b ./gcc/testsuite/gcc.c-torture/unsorted/dilayout.c ! 1071957355b ./gcc/testsuite/gcc.c-torture/unsorted/dimove.c ! 163894537b ./gcc/testsuite/gcc.c-torture/unsorted/dimul.c ! 1962021495b ./gcc/testsuite/gcc.c-torture/unsorted/div.c ! 1911882561b ./gcc/testsuite/gcc.c-torture/unsorted/divdf.c ! 3643811739b ./gcc/testsuite/gcc.c-torture/unsorted/dm.c ! 3366321383b ./gcc/testsuite/gcc.c-torture/unsorted/dshift.c ! 691935419b ./gcc/testsuite/gcc.c-torture/unsorted/e.c ! 3422715387b ./gcc/testsuite/gcc.c-torture/unsorted/ex.c ! 3295431583b ./gcc/testsuite/gcc.c-torture/unsorted/ext.c ! 3418757365b ./gcc/testsuite/gcc.c-torture/unsorted/f1.c ! 1799287010b ./gcc/testsuite/gcc.c-torture/unsorted/f2.c ! 742887905b ./gcc/testsuite/gcc.c-torture/unsorted/fdmul.c ! 3396096931b ./gcc/testsuite/gcc.c-torture/unsorted/float.c ! 2705424580b ./gcc/testsuite/gcc.c-torture/unsorted/flo.c ! 1861286853b ./gcc/testsuite/gcc.c-torture/unsorted/flt_const.c ! 1778808555b ./gcc/testsuite/gcc.c-torture/unsorted/fnul.c ! 837581993b ./gcc/testsuite/gcc.c-torture/unsorted/foo.c ! 2603890884b ./gcc/testsuite/gcc.c-torture/unsorted/forgetcc.c ! 1311942689b ./gcc/testsuite/gcc.c-torture/unsorted/fq.c ! 2823794598b ./gcc/testsuite/gcc.c-torture/unsorted/g.c ! 4182806672b ./gcc/testsuite/gcc.c-torture/unsorted/gen_tst.c ! 440386278b ./gcc/testsuite/gcc.c-torture/unsorted/glob.c ! 2712797412b ./gcc/testsuite/gcc.c-torture/unsorted/gronk.c ! 2912660272b ./gcc/testsuite/gcc.c-torture/unsorted/hibug.c ! 2506280517b ./gcc/testsuite/gcc.c-torture/unsorted/hi.c ! 4088813022b ./gcc/testsuite/gcc.c-torture/unsorted/HIcmp.c ! 2060643608b ./gcc/testsuite/gcc.c-torture/unsorted/HIset.c ! 1463391444b ./gcc/testsuite/gcc.c-torture/unsorted/i.c ! 3171392500b ./gcc/testsuite/gcc.c-torture/unsorted/i++.c ! 1222319492b ./gcc/testsuite/gcc.c-torture/unsorted/ic.c ! 2244080969b ./gcc/testsuite/gcc.c-torture/unsorted/icmp.c ! 3544970343b ./gcc/testsuite/gcc.c-torture/unsorted/ifreg.c ! 1391595029b ./gcc/testsuite/gcc.c-torture/unsorted/imm.c ! 125065552b ./gcc/testsuite/gcc.c-torture/unsorted/isinf.c ! 3010843181b ./gcc/testsuite/gcc.c-torture/unsorted/jmp.c ! 2660706970b ./gcc/testsuite/gcc.c-torture/unsorted/jumptab.c ! 2953050089b ./gcc/testsuite/gcc.c-torture/unsorted/layout.c ! 3456840745b ./gcc/testsuite/gcc.c-torture/unsorted/lbug.c ! 1238043529b ./gcc/testsuite/gcc.c-torture/unsorted/l.c ! 2906412336b ./gcc/testsuite/gcc.c-torture/unsorted/ll1.c ! 2085462310b ./gcc/testsuite/gcc.c-torture/unsorted/llbug.c ! 1419215241b ./gcc/testsuite/gcc.c-torture/unsorted/lll.c ! 3825978026b ./gcc/testsuite/gcc.c-torture/unsorted/load8.c ! 791778479b ./gcc/testsuite/gcc.c-torture/unsorted/loadhicc.c ! 439371726b ./gcc/testsuite/gcc.c-torture/unsorted/log2.c ! 418270073b ./gcc/testsuite/gcc.c-torture/unsorted/logic.c ! 388000712b ./gcc/testsuite/gcc.c-torture/unsorted/loop-1.c ! 2317019693b ./gcc/testsuite/gcc.c-torture/unsorted/loop386.c ! 3780249238b ./gcc/testsuite/gcc.c-torture/unsorted/lop.c ! 3011092171b ./gcc/testsuite/gcc.c-torture/unsorted/m1.c ! 1664237855b ./gcc/testsuite/gcc.c-torture/unsorted/m2.c ! 836486950b ./gcc/testsuite/gcc.c-torture/unsorted/m5.c ! 1315431234b ./gcc/testsuite/gcc.c-torture/unsorted/m68.c ! 1140567438b ./gcc/testsuite/gcc.c-torture/unsorted/mbyte.c ! 1343630589b ./gcc/testsuite/gcc.c-torture/unsorted/mchar.c ! 1971867771b ./gcc/testsuite/gcc.c-torture/unsorted/mcmp.c ! 1050674918b ./gcc/testsuite/gcc.c-torture/unsorted/mdouble.c ! 3545288402b ./gcc/testsuite/gcc.c-torture/unsorted/memtst.c ! 1607208885b ./gcc/testsuite/gcc.c-torture/unsorted/miscomp.c ! 517599771b ./gcc/testsuite/gcc.c-torture/unsorted/mm.c ! 3498200377b ./gcc/testsuite/gcc.c-torture/unsorted/mod.c ! 852673854b ./gcc/testsuite/gcc.c-torture/unsorted/modcc.c ! 3290683845b ./gcc/testsuite/gcc.c-torture/unsorted/move.c ! 2934241414b ./gcc/testsuite/gcc.c-torture/unsorted/move_qhi.c ! 2156076426b ./gcc/testsuite/gcc.c-torture/unsorted/mregtst.c ! 2833441830b ./gcc/testsuite/gcc.c-torture/unsorted/msp.c ! 3686945259b ./gcc/testsuite/gcc.c-torture/unsorted/mtst.c ! 650788304b ./gcc/testsuite/gcc.c-torture/unsorted/mu.c ! 3210222105b ./gcc/testsuite/gcc.c-torture/unsorted/mul.c ! 206884481b ./gcc/testsuite/gcc.c-torture/unsorted/mword1.c ! 3114106310b ./gcc/testsuite/gcc.c-torture/unsorted/mword.c ! 1193753806b ./gcc/testsuite/gcc.c-torture/unsorted/n1.c ! 3021632957b ./gcc/testsuite/gcc.c-torture/unsorted/nand.c ! 1942143253b ./gcc/testsuite/gcc.c-torture/unsorted/n.c ! 1255157012b ./gcc/testsuite/gcc.c-torture/unsorted/neg.c ! 2666891841b ./gcc/testsuite/gcc.c-torture/unsorted/o.c ! 1641502386b ./gcc/testsuite/gcc.c-torture/unsorted/omit.c ! 2947983429b ./gcc/testsuite/gcc.c-torture/unsorted/opout.c ! 4144556375b ./gcc/testsuite/gcc.c-torture/unsorted/opt.c ! 2570634505b ./gcc/testsuite/gcc.c-torture/unsorted/or386.c ! 1221510857b ./gcc/testsuite/gcc.c-torture/unsorted/or.c ! 3498239118b ./gcc/testsuite/gcc.c-torture/unsorted/parms.c ! 4291861284b ./gcc/testsuite/gcc.c-torture/unsorted/pass.c ! 3299772143b ./gcc/testsuite/gcc.c-torture/unsorted/p.c ! 1371923458b ./gcc/testsuite/gcc.c-torture/unsorted/pmt.c ! 2511249387b ./gcc/testsuite/gcc.c-torture/unsorted/poor.c ! 745326023b ./gcc/testsuite/gcc.c-torture/unsorted/pp.c ! 1391345399b ./gcc/testsuite/gcc.c-torture/unsorted/pret-arg.c ! 3407302768b ./gcc/testsuite/gcc.c-torture/unsorted/pyr2.c ! 2603570420b ./gcc/testsuite/gcc.c-torture/unsorted/PYRBUG.c ! 697484600b ./gcc/testsuite/gcc.c-torture/unsorted/pyr.c ! 1835488344b ./gcc/testsuite/gcc.c-torture/unsorted/q.c ! 839150718b ./gcc/testsuite/gcc.c-torture/unsorted/QIcmp.c ! 2111121086b ./gcc/testsuite/gcc.c-torture/unsorted/QIset.c ! 4283361995b ./gcc/testsuite/gcc.c-torture/unsorted/r1.c ! 1427595492b ./gcc/testsuite/gcc.c-torture/unsorted/r.c ! 4078624014b ./gcc/testsuite/gcc.c-torture/unsorted/rel.c ! 3414105414b ./gcc/testsuite/gcc.c-torture/unsorted/rmsc.c ! 1012332947b ./gcc/testsuite/gcc.c-torture/unsorted/round.c ! 3178090569b ./gcc/testsuite/gcc.c-torture/unsorted/run.c ! 3862968210b ./gcc/testsuite/gcc.c-torture/unsorted/sar.c ! 1744325584b ./gcc/testsuite/gcc.c-torture/unsorted/s.c ! 2416335748b ./gcc/testsuite/gcc.c-torture/unsorted/scal.c ! 4292026279b ./gcc/testsuite/gcc.c-torture/unsorted/sc.c ! 1669731371b ./gcc/testsuite/gcc.c-torture/unsorted/scc.c ! 3073011184b ./gcc/testsuite/gcc.c-torture/unsorted/scond.c ! 4127283390b ./gcc/testsuite/gcc.c-torture/unsorted/selfrec.c ! 772856379b ./gcc/testsuite/gcc.c-torture/unsorted/seq.c ! 3595435741b ./gcc/testsuite/gcc.c-torture/unsorted/set386.c ! 772098437b ./gcc/testsuite/gcc.c-torture/unsorted/set88.c ! 1791217871b ./gcc/testsuite/gcc.c-torture/unsorted/SFset.c ! 2510322715b ./gcc/testsuite/gcc.c-torture/unsorted/shand.c ! 1917728540b ./gcc/testsuite/gcc.c-torture/unsorted/sh.c ! 369189446b ./gcc/testsuite/gcc.c-torture/unsorted/shft.c ! 786362264b ./gcc/testsuite/gcc.c-torture/unsorted/shift.c ! 1326810661b ./gcc/testsuite/gcc.c-torture/unsorted/shloop.c ! 1731774655b ./gcc/testsuite/gcc.c-torture/unsorted/shm.c ! 3855537843b ./gcc/testsuite/gcc.c-torture/unsorted/SIcmp.c ! 3198420130b ./gcc/testsuite/gcc.c-torture/unsorted/signext2.c ! 3333038544b ./gcc/testsuite/gcc.c-torture/unsorted/signext.c ! 1627754274b ./gcc/testsuite/gcc.c-torture/unsorted/sim.c ! 380795934b ./gcc/testsuite/gcc.c-torture/unsorted/simple.c ! 2010223878b ./gcc/testsuite/gcc.c-torture/unsorted/SIset.c ! 927966180b ./gcc/testsuite/gcc.c-torture/unsorted/sne.c ! 1732276088b ./gcc/testsuite/gcc.c-torture/unsorted/sound.c ! 1462108320b ./gcc/testsuite/gcc.c-torture/unsorted/sparcbug.c ! 680850660b ./gcc/testsuite/gcc.c-torture/unsorted/speed.c ! 1459712797b ./gcc/testsuite/gcc.c-torture/unsorted/stor.c ! 3521937419b ./gcc/testsuite/gcc.c-torture/unsorted/store0.c ! 429514643b ./gcc/testsuite/gcc.c-torture/unsorted/storecc.c ! 2367209182b ./gcc/testsuite/gcc.c-torture/unsorted/str.c ! 1212744014b ./gcc/testsuite/gcc.c-torture/unsorted/stru.c ! 2936891454b ./gcc/testsuite/gcc.c-torture/unsorted/structret.c ! 1723639277b ./gcc/testsuite/gcc.c-torture/unsorted/stuct.c ! 3579655725b ./gcc/testsuite/gcc.c-torture/unsorted/sub32.c ! 2225754564b ./gcc/testsuite/gcc.c-torture/unsorted/subcc.c ! 1610852268b ./gcc/testsuite/gcc.c-torture/unsorted/subcse.c ! 1291307272b ./gcc/testsuite/gcc.c-torture/unsorted/sym.c ! 319785041b ./gcc/testsuite/gcc.c-torture/unsorted/symconst.c ! 1215688317b ./gcc/testsuite/gcc.c-torture/unsorted/t.c ! 3564367767b ./gcc/testsuite/gcc.c-torture/unsorted/test.c ! 585245677b ./gcc/testsuite/gcc.c-torture/unsorted/test-flow.c ! 1417505636b ./gcc/testsuite/gcc.c-torture/unsorted/test-loop.c ! 1907124578b ./gcc/testsuite/gcc.c-torture/unsorted/time.c ! 316618822b ./gcc/testsuite/gcc.c-torture/unsorted/tmp.c ! 551299652b ./gcc/testsuite/gcc.c-torture/unsorted/trivial.c ! 54055479b ./gcc/testsuite/gcc.c-torture/unsorted/trunc.c ! 1458206113b ./gcc/testsuite/gcc.c-torture/unsorted/u.c ! 620556027b ./gcc/testsuite/gcc.c-torture/unsorted/udconvert.c ! 4030884798b ./gcc/testsuite/gcc.c-torture/unsorted/udivmod4.c ! 367886956b ./gcc/testsuite/gcc.c-torture/unsorted/UHIcmp.c ! 2240659922b ./gcc/testsuite/gcc.c-torture/unsorted/uns.c ! 434767322b ./gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ! 4067751424b ./gcc/testsuite/gcc.c-torture/unsorted/uns_tst.c ! 3380740291b ./gcc/testsuite/gcc.c-torture/unsorted/UQIcmp.c ! 3065994513b ./gcc/testsuite/gcc.c-torture/unsorted/USIcmp.c ! 3061572007b ./gcc/testsuite/gcc.c-torture/unsorted/uuarg.c ! 339227429b ./gcc/testsuite/gcc.c-torture/unsorted/v.c ! 97022866b ./gcc/testsuite/gcc.c-torture/unsorted/w.c ! 502682554b ./gcc/testsuite/gcc.c-torture/unsorted/ww.c ! 1561412324b ./gcc/testsuite/gcc.c-torture/unsorted/xb.c ! 3522679530b ./gcc/testsuite/gcc.c-torture/unsorted/xbg.c ! 2143513908b ./gcc/testsuite/gcc.c-torture/unsorted/x.c ! 2513066849b ./gcc/testsuite/gcc.c-torture/unsorted/xc.c ! 3791802167b ./gcc/testsuite/gcc.c-torture/unsorted/xcsebug.c ! 753765877b ./gcc/testsuite/gcc.c-torture/unsorted/xdi.c ! 2449229476b ./gcc/testsuite/gcc.c-torture/unsorted/xfoo.c ! 1976729056b ./gcc/testsuite/gcc.c-torture/unsorted/xi.c ! 467677832b ./gcc/testsuite/gcc.c-torture/unsorted/xlop.c ! 2772134709b ./gcc/testsuite/gcc.c-torture/unsorted/xmtst.c ! 2887718336b ./gcc/testsuite/gcc.c-torture/unsorted/xneg.c ! 891585403b ./gcc/testsuite/gcc.c-torture/unsorted/xopt.c ! 3158383083b ./gcc/testsuite/gcc.c-torture/unsorted/xor.c ! 2275025612b ./gcc/testsuite/gcc.c-torture/unsorted/xorn.c ! 696616007b ./gcc/testsuite/gcc.c-torture/unsorted/xp.c ! 3369544877b ./gcc/testsuite/gcc.c-torture/unsorted/xpp.c ! 687461532b ./gcc/testsuite/gcc.c-torture/unsorted/xs.c ! 2453856793b ./gcc/testsuite/gcc.c-torture/unsorted/xsh.c ! 749676174b ./gcc/testsuite/gcc.c-torture/unsorted/xz.c ! 3236233174b ./gcc/testsuite/gcc.c-torture/unsorted/xzz.c ! 1020735670b ./gcc/testsuite/gcc.dg/20000108-1.c ! 289377156b ./gcc/testsuite/gcc.dg/20000111-1.c ! 441096099b ./gcc/testsuite/gcc.dg/20000609-1.c ! 843859427b ./gcc/testsuite/gcc.dg/20000614-1.c ! 3590467322b ./gcc/testsuite/gcc.dg/20000614-2.c ! 2687914259b ./gcc/testsuite/gcc.dg/20000623-1.c ! 1697494088b ./gcc/testsuite/gcc.dg/20000629-1.c ! 2411171658b ./gcc/testsuite/gcc.dg/20000707-1.c ! 1242354775b ./gcc/testsuite/gcc.dg/20000715-1.c ! 2414727429b ./gcc/testsuite/gcc.dg/20000720-1.c ! 2628509241b ./gcc/testsuite/gcc.dg/20000724-1.c ! 855317863b ./gcc/testsuite/gcc.dg/20000807-1.c ! 2282190390b ./gcc/testsuite/gcc.dg/20000904-1.c ! 1205584698b ./gcc/testsuite/gcc.dg/20000906-1.c ! 2401733773b ./gcc/testsuite/gcc.dg/20000926-1.c ! 912559247b ./gcc/testsuite/gcc.dg/20001009-1.c ! 4235098888b ./gcc/testsuite/gcc.dg/20001012-1.c ! 3084023965b ./gcc/testsuite/gcc.dg/20001012-2.c ! 2504286200b ./gcc/testsuite/gcc.dg/20001013-1.c ! 989710521b ./gcc/testsuite/gcc.dg/20001023-1.c ! 2648600842b ./gcc/testsuite/gcc.dg/20001101-1.c ! 452608955b ./gcc/testsuite/gcc.dg/20001102-1.c ! 2644591049b ./gcc/testsuite/gcc.dg/20001108-1.c ! 3796315325b ./gcc/testsuite/gcc.dg/20001116-1.c ! 280677441b ./gcc/testsuite/gcc.dg/20001117-1.c ! 752060605b ./gcc/testsuite/gcc.dg/20001127-1.c ! 1243003570b ./gcc/testsuite/gcc.dg/20001201-1.c ! 1646064105b ./gcc/testsuite/gcc.dg/20001228-1.c ! 2498549558b ./gcc/testsuite/gcc.dg/20010202-1.c ! 2616951355b ./gcc/testsuite/gcc.dg/20010405-1.c ! 2545788691b ./gcc/testsuite/gcc.dg/20010423-1.c ! 3041407018b ./gcc/testsuite/gcc.dg/20010520-1.c ! 3520626317b ./gcc/testsuite/gcc.dg/20010622-1.c ! 2877988798b ./gcc/testsuite/gcc.dg/20010822-1.c ! 2149609410b ./gcc/testsuite/gcc.dg/20010912-1.c ! 1230888954b ./gcc/testsuite/gcc.dg/20011008-1.c ! 2932858639b ./gcc/testsuite/gcc.dg/20011008-2.c ! 2130390160b ./gcc/testsuite/gcc.dg/20011009-1.c ! 1094879191b ./gcc/testsuite/gcc.dg/20011015-1.c ! 3257749642b ./gcc/testsuite/gcc.dg/20011018-1.c ! 1920312928b ./gcc/testsuite/gcc.dg/20011021-1.c ! 707554340b ./gcc/testsuite/gcc.dg/20011029-2.c ! 1124303586b ./gcc/testsuite/gcc.dg/20011107-1.c ! 3977721072b ./gcc/testsuite/gcc.dg/20011113-1.c ! 43629702b ./gcc/testsuite/gcc.dg/20011119-1.c ! 1970395659b ./gcc/testsuite/gcc.dg/20011127-1.c ! 640681704b ./gcc/testsuite/gcc.dg/20011130-1.c ! 715751053b ./gcc/testsuite/gcc.dg/20011214-1.c ! 3615281870b ./gcc/testsuite/gcc.dg/20020103-1.c ! 2180708198b ./gcc/testsuite/gcc.dg/20020104-1.c ! 98244853b ./gcc/testsuite/gcc.dg/20020108-1.c ! 951724852b ./gcc/testsuite/gcc.dg/20020115-1.c ! 785896302b ./gcc/testsuite/gcc.dg/20020116-1.c ! 3842134030b ./gcc/testsuite/gcc.dg/20020116-2.c ! 4113077329b ./gcc/testsuite/gcc.dg/20020118-1.c ! 3751699275b ./gcc/testsuite/gcc.dg/20020122-1.c ! 150189901b ./gcc/testsuite/gcc.dg/20020122-2.c ! 57782331b ./gcc/testsuite/gcc.dg/20020122-3.c ! 2367653115b ./gcc/testsuite/gcc.dg/20020122-4.c ! 4139034769b ./gcc/testsuite/gcc.dg/20020201-1.c ! 205098899b ./gcc/testsuite/gcc.dg/20020201-2.c ! 821274050b ./gcc/testsuite/gcc.dg/20020201-3.c ! 2936802890b ./gcc/testsuite/gcc.dg/20020201-4.c ! 2531686627b ./gcc/testsuite/gcc.dg/20020206-1.c ! 3783933618b ./gcc/testsuite/gcc.dg/20020210-1.c ! 3546737192b ./gcc/testsuite/gcc.dg/20020218-1.c ! 819933725b ./gcc/testsuite/gcc.dg/20020219-1.c ! 794792782b ./gcc/testsuite/gcc.dg/20020220-1.c ! 1662033181b ./gcc/testsuite/gcc.dg/20020220-2.c ! 2954578455b ./gcc/testsuite/gcc.dg/20020222-1.c ! 2546434352b ./gcc/testsuite/gcc.dg/20020224-1.c ! 627755992b ./gcc/testsuite/gcc.dg/20020304-1.c ! 2738421039b ./gcc/testsuite/gcc.dg/20020310-1.c ! 767384458b ./gcc/testsuite/gcc.dg/20020312-1.c ! 2062142429b ./gcc/testsuite/gcc.dg/20020312-2.c ! 3842300935b ./gcc/testsuite/gcc.dg/20020313-1.c ! 663674028b ./gcc/testsuite/gcc.dg/20020319-1.c ! 3802202669b ./gcc/testsuite/gcc.dg/20020326-1.c ! 575770214b ./gcc/testsuite/gcc.dg/20020411-1.c ! 2767099233b ./gcc/testsuite/gcc.dg/20020415-1.c ! 2427264054b ./gcc/testsuite/gcc.dg/20020416-1.c ! 1785651312b ./gcc/testsuite/gcc.dg/20020418-1.c ! 1527728757b ./gcc/testsuite/gcc.dg/20020418-2.c ! 19296994b ./gcc/testsuite/gcc.dg/20020425-1.c ! 2088656022b ./gcc/testsuite/gcc.dg/20020426-1.c ! 4234050901b ./gcc/testsuite/gcc.dg/20020426-2.c ! 3359725112b ./gcc/testsuite/gcc.dg/20020430-1.c ! 2963915296b ./gcc/testsuite/gcc.dg/20020503-1.c ! 3667555097b ./gcc/testsuite/gcc.dg/20020517-1.c ! 536325431b ./gcc/testsuite/gcc.dg/20020523-1.c ! 536325431b ./gcc/testsuite/gcc.dg/20020523-2.c ! 886670658b ./gcc/testsuite/gcc.dg/20020527-1.c ! 2086765142b ./gcc/testsuite/gcc.dg/20020530-1.c ! 4218205154b ./gcc/testsuite/gcc.dg/20020531-1.c ! 1411493320b ./gcc/testsuite/gcc.dg/20020607-1.c ! 1354165258b ./gcc/testsuite/gcc.dg/20020607-2.c ! 1518490714b ./gcc/testsuite/gcc.dg/20020616-1.c ! 2940242394b ./gcc/testsuite/gcc.dg/20020620-1.c ! 1126442809b ./gcc/testsuite/gcc.dg/20020919-1.c ! 1344027764b ./gcc/testsuite/gcc.dg/20020926-1.c ! 3573081438b ./gcc/testsuite/gcc.dg/20021006-1.c ! 344810811b ./gcc/testsuite/gcc.dg/20021014-1.c ! 759072094b ./gcc/testsuite/gcc.dg/20021018-1.c ! 2475506444b ./gcc/testsuite/gcc.dg/20021023-1.c ! 233701902b ./gcc/testsuite/gcc.dg/20021029-1.c ! 2468373945b ./gcc/testsuite/gcc.dg/20021029-2.c ! 2578785970b ./gcc/testsuite/gcc.dg/20021116-1.c ! 32314160b ./gcc/testsuite/gcc.dg/20030120-1.c ! 6501003b ./gcc/testsuite/gcc.dg/20030123-1.c ! 2206154706b ./gcc/testsuite/gcc.dg/20030129-1.c ! 4052537013b ./gcc/testsuite/gcc.dg/20030213-1.c ! 1045670620b ./gcc/testsuite/gcc.dg/20030225-1.c ! 11242163b ./gcc/testsuite/gcc.dg/20030309-1.c ! 539628878b ./gcc/testsuite/gcc.dg/20030321-1.c ! 3937697137b ./gcc/testsuite/gcc.dg/20030323-1.c ! 2744313002b ./gcc/testsuite/gcc.dg/20030324-1.c ! 3096769307b ./gcc/testsuite/gcc.dg/20030331-2.c ! 1058638767b ./gcc/testsuite/gcc.dg/20030414-1.c ! 1577979025b ./gcc/testsuite/gcc.dg/920413-1.c ! 2176221389b ./gcc/testsuite/gcc.dg/940409-1.c ! 1567764883b ./gcc/testsuite/gcc.dg/940510-1.c ! 1435563142b ./gcc/testsuite/gcc.dg/951130-1.c ! 2196979187b ./gcc/testsuite/gcc.dg/980211-1.c ! 1568764691b ./gcc/testsuite/gcc.dg/980217-1.c ! 474510323b ./gcc/testsuite/gcc.dg/980226-1.c ! 2630738251b ./gcc/testsuite/gcc.dg/980312-1.c ! 2097327868b ./gcc/testsuite/gcc.dg/980313-1.c ! 372605499b ./gcc/testsuite/gcc.dg/980414-1.c ! 1500377530b ./gcc/testsuite/gcc.dg/980502-1.c ! 1541851881b ./gcc/testsuite/gcc.dg/980520-1.c ! 1113123204b ./gcc/testsuite/gcc.dg/980523-1.c ! 2389539979b ./gcc/testsuite/gcc.dg/980526-1.c ! 384442948b ./gcc/testsuite/gcc.dg/980709-1.c ! 1276688993b ./gcc/testsuite/gcc.dg/980816-1.c ! 2659217655b ./gcc/testsuite/gcc.dg/980827-1.c ! 844249748b ./gcc/testsuite/gcc.dg/990117-1.c ! 3592792935b ./gcc/testsuite/gcc.dg/990130-1.c ! 2565768458b ./gcc/testsuite/gcc.dg/990213-1.c ! 2125486048b ./gcc/testsuite/gcc.dg/990213-2.c ! 318703178b ./gcc/testsuite/gcc.dg/990214-1.c ! 1614449588b ./gcc/testsuite/gcc.dg/990424-1.c ! 1324715064b ./gcc/testsuite/gcc.dg/990506-0.c ! 714032148b ./gcc/testsuite/gcc.dg/990524-1.c ! 3071468415b ./gcc/testsuite/gcc.dg/991129-1.c ! 156954019b ./gcc/testsuite/gcc.dg/991209-1.c ! 1980057279b ./gcc/testsuite/gcc.dg/991214-1.c ! 3370443605b ./gcc/testsuite/gcc.dg/991230-1.c ! 382602831b ./gcc/testsuite/gcc.dg/alias-1.c ! 3861827683b ./gcc/testsuite/gcc.dg/alpha-base-1.c ! 3652428612b ./gcc/testsuite/gcc.dg/alpha-base-2.c ! 1456546896b ./gcc/testsuite/gcc.dg/alpha-cix-1.c ! 841368719b ./gcc/testsuite/gcc.dg/alpha-cix-2.c ! 293986620b ./gcc/testsuite/gcc.dg/alpha-max-1.c ! 3844320770b ./gcc/testsuite/gcc.dg/alpha-max-2.c ! 1751513009b ./gcc/testsuite/gcc.dg/altivec-1.c ! 181010449b ./gcc/testsuite/gcc.dg/altivec-2.c ! 967922284b ./gcc/testsuite/gcc.dg/altivec-3.c ! 93905551b ./gcc/testsuite/gcc.dg/altivec-4.c ! 3524513447b ./gcc/testsuite/gcc.dg/altivec-5.c ! 935607032b ./gcc/testsuite/gcc.dg/altivec-7.c ! 1396416814b ./gcc/testsuite/gcc.dg/altivec-8.c ! 1177846285b ./gcc/testsuite/gcc.dg/anon-struct-1.c ! 3330573194b ./gcc/testsuite/gcc.dg/anon-struct-2.c ! 3522520858b ./gcc/testsuite/gcc.dg/anon-struct-3.c ! 2000172397b ./gcc/testsuite/gcc.dg/arm-asm.c ! 1274871710b ./gcc/testsuite/gcc.dg/array-1.c ! 3861156036b ./gcc/testsuite/gcc.dg/array-2.c ! 1410330225b ./gcc/testsuite/gcc.dg/array-3.c ! 2440308460b ./gcc/testsuite/gcc.dg/array-4.c ! 2233987289b ./gcc/testsuite/gcc.dg/array-5.c ! 3636290766b ./gcc/testsuite/gcc.dg/array-6.c ! 2814093959b ./gcc/testsuite/gcc.dg/asm-1.c ! 3024001214b ./gcc/testsuite/gcc.dg/asm-2.c ! 2686162767b ./gcc/testsuite/gcc.dg/asm-3.c ! 339244874b ./gcc/testsuite/gcc.dg/asm-4.c ! 2673255882b ./gcc/testsuite/gcc.dg/asm-5.c ! 3512856485b ./gcc/testsuite/gcc.dg/asm-6.c ! 2560291160b ./gcc/testsuite/gcc.dg/asm-fs-1.c ! 1287172903b ./gcc/testsuite/gcc.dg/asm-names.c ! 1099611642b ./gcc/testsuite/gcc.dg/asmreg-1.c ! 2801105283b ./gcc/testsuite/gcc.dg/attr-alwaysinline.c ! 3087367494b ./gcc/testsuite/gcc.dg/attr-invalid.c ! 1915283314b ./gcc/testsuite/gcc.dg/attr-nest.c ! 2689909602b ./gcc/testsuite/gcc.dg/attr-noinline.c ! 745375068b ./gcc/testsuite/gcc.dg/attr-used.c ! 3155000092b ./gcc/testsuite/gcc.dg/bconstp-1.c ! 15751103b ./gcc/testsuite/gcc.dg/bf-spl1.c ! 1274634279b ./gcc/testsuite/gcc.dg/bitfld-1.c ! 865608720b ./gcc/testsuite/gcc.dg/bitfld-2.c ! 2003841110b ./gcc/testsuite/gcc.dg/bitfld-3.c ! 719825537b ./gcc/testsuite/gcc.dg/bitfld-4.c ! 331669473b ./gcc/testsuite/gcc.dg/bitfld-5.c ! 2721476408b ./gcc/testsuite/gcc.dg/bitfld-6.c ! 1594168367b ./gcc/testsuite/gcc.dg/builtin-choose-expr.c ! 10093864b ./gcc/testsuite/gcc.dg/builtin-inf-1.c ! 2462561678b ./gcc/testsuite/gcc.dg/builtin-prefetch-1.c ! 1407816576b ./gcc/testsuite/gcc.dg/builtins-1.c ! 3552134651b ./gcc/testsuite/gcc.dg/c90-arraydecl-1.c ! 2243816200b ./gcc/testsuite/gcc.dg/c90-array-lval-1.c ! 2768106060b ./gcc/testsuite/gcc.dg/c90-array-lval-2.c ! 4098525451b ./gcc/testsuite/gcc.dg/c90-array-lval-3.c ! 3655088604b ./gcc/testsuite/gcc.dg/c90-array-lval-4.c ! 1572913366b ./gcc/testsuite/gcc.dg/c90-array-lval-5.c ! 4018159207b ./gcc/testsuite/gcc.dg/c90-complex-1.c ! 3681535923b ./gcc/testsuite/gcc.dg/c90-complit-1.c ! 1705314837b ./gcc/testsuite/gcc.dg/c90-const-expr-1.c ! 78994009b ./gcc/testsuite/gcc.dg/c90-const-expr-2.c ! 822031417b ./gcc/testsuite/gcc.dg/c90-const-expr-3.c ! 3338177482b ./gcc/testsuite/gcc.dg/c90-digraph-1.c ! 3599184840b ./gcc/testsuite/gcc.dg/c90-enum-comma-1.c ! 4177353746b ./gcc/testsuite/gcc.dg/c90-flex-array-1.c ! 2306764382b ./gcc/testsuite/gcc.dg/c90-float-1.c ! 566533628b ./gcc/testsuite/gcc.dg/c90-fordecl-1.c ! 3347835572b ./gcc/testsuite/gcc.dg/c90-hexfloat-1.c ! 130898806b ./gcc/testsuite/gcc.dg/c90-hexfloat-2.c ! 2581693818b ./gcc/testsuite/gcc.dg/c90-idem-qual-1.c ! 596279025b ./gcc/testsuite/gcc.dg/c90-idem-qual-2.c ! 1581289258b ./gcc/testsuite/gcc.dg/c90-impl-decl-1.c ! 440307834b ./gcc/testsuite/gcc.dg/c90-impl-int-1.c ! 2344767678b ./gcc/testsuite/gcc.dg/c90-impl-int-2.c ! 970479166b ./gcc/testsuite/gcc.dg/c90-init-1.c ! 2729946148b ./gcc/testsuite/gcc.dg/c90-intconst-1.c ! 3559700294b ./gcc/testsuite/gcc.dg/c90-longlong-1.c ! 3728641939b ./gcc/testsuite/gcc.dg/c90-mixdecl-1.c ! 2576806337b ./gcc/testsuite/gcc.dg/c90-restrict-1.c ! 3688680206b ./gcc/testsuite/gcc.dg/c90-return-1.c ! 1775037086b ./gcc/testsuite/gcc.dg/c90-scope-1.c ! 2066437213b ./gcc/testsuite/gcc.dg/c90-vla-1.c ! 3554456685b ./gcc/testsuite/gcc.dg/c94-digraph-1.c ! 815267755b ./gcc/testsuite/gcc.dg/c99-arraydecl-1.c ! 1553286096b ./gcc/testsuite/gcc.dg/c99-array-lval-1.c ! 695388665b ./gcc/testsuite/gcc.dg/c99-array-lval-2.c ! 533861407b ./gcc/testsuite/gcc.dg/c99-array-lval-3.c ! 2215212813b ./gcc/testsuite/gcc.dg/c99-array-lval-4.c ! 3070583409b ./gcc/testsuite/gcc.dg/c99-array-lval-5.c ! 1817213908b ./gcc/testsuite/gcc.dg/c99-array-nonobj-1.c ! 2980400116b ./gcc/testsuite/gcc.dg/c99-bool-1.c ! 2269932988b ./gcc/testsuite/gcc.dg/c99-complex-1.c ! 820370146b ./gcc/testsuite/gcc.dg/c99-complex-2.c ! 3348642281b ./gcc/testsuite/gcc.dg/c99-complit-1.c ! 2252128544b ./gcc/testsuite/gcc.dg/c99-complit-2.c ! 1355429032b ./gcc/testsuite/gcc.dg/c99-condexpr-1.c ! 1666861367b ./gcc/testsuite/gcc.dg/c99-const-expr-1.c ! 1567288443b ./gcc/testsuite/gcc.dg/c99-const-expr-2.c ! 1530464516b ./gcc/testsuite/gcc.dg/c99-const-expr-3.c ! 2443028402b ./gcc/testsuite/gcc.dg/c99-digraph-1.c ! 436400556b ./gcc/testsuite/gcc.dg/c99-enum-comma-1.c ! 3680360076b ./gcc/testsuite/gcc.dg/c99-flex-array-1.c ! 1133393573b ./gcc/testsuite/gcc.dg/c99-flex-array-2.c ! 847128646b ./gcc/testsuite/gcc.dg/c99-flex-array-3.c ! 3786940747b ./gcc/testsuite/gcc.dg/c99-flex-array-4.c ! 4185875504b ./gcc/testsuite/gcc.dg/c99-float-1.c ! 553627065b ./gcc/testsuite/gcc.dg/c99-fordecl-1.c ! 561068221b ./gcc/testsuite/gcc.dg/c99-fordecl-2.c ! 2859208293b ./gcc/testsuite/gcc.dg/c99-func-1.c ! 1694776826b ./gcc/testsuite/gcc.dg/c99-func-2.c ! 2857481018b ./gcc/testsuite/gcc.dg/c99-func-3.c ! 3824254533b ./gcc/testsuite/gcc.dg/c99-func-4.c ! 403500133b ./gcc/testsuite/gcc.dg/c99-hexfloat-1.c ! 1547017269b ./gcc/testsuite/gcc.dg/c99-hexfloat-2.c ! 1046797268b ./gcc/testsuite/gcc.dg/c99-idem-qual-1.c ! 2591670319b ./gcc/testsuite/gcc.dg/c99-idem-qual-2.c ! 1293044648b ./gcc/testsuite/gcc.dg/c99-impl-decl-1.c ! 818104690b ./gcc/testsuite/gcc.dg/c99-impl-int-1.c ! 2312236475b ./gcc/testsuite/gcc.dg/c99-impl-int-2.c ! 829207642b ./gcc/testsuite/gcc.dg/c99-init-1.c ! 938647013b ./gcc/testsuite/gcc.dg/c99-init-2.c ! 205310301b ./gcc/testsuite/gcc.dg/c99-intconst-1.c ! 336478880b ./gcc/testsuite/gcc.dg/c99-longlong-1.c ! 2179124750b ./gcc/testsuite/gcc.dg/c99-main-1.c ! 1603510892b ./gcc/testsuite/gcc.dg/c99-mixdecl-1.c ! 2789813637b ./gcc/testsuite/gcc.dg/c99-restrict-1.c ! 1090698500b ./gcc/testsuite/gcc.dg/c99-return-1.c ! 1305485104b ./gcc/testsuite/gcc.dg/c99-scope-1.c ! 328628580b ./gcc/testsuite/gcc.dg/c99-scope-2.c ! 1500087630b ./gcc/testsuite/gcc.dg/c99-tag-1.c ! 3664842681b ./gcc/testsuite/gcc.dg/c99-vla-1.c ! 3333661125b ./gcc/testsuite/gcc.dg/cast-qual-1.c ! 1853040812b ./gcc/testsuite/gcc.dg/cast-qual-2.c ! 3509657813b ./gcc/testsuite/gcc.dg/clobbers.c ! 3796475762b ./gcc/testsuite/gcc.dg/compare1.c ! 446234451b ./gcc/testsuite/gcc.dg/compare2.c ! 1929905505b ./gcc/testsuite/gcc.dg/compare3.c ! 4172088563b ./gcc/testsuite/gcc.dg/compare4.c ! 2873193357b ./gcc/testsuite/gcc.dg/compare5.c ! 3985736899b ./gcc/testsuite/gcc.dg/compare6.c ! 3887990335b ./gcc/testsuite/gcc.dg/compare7.c ! 2818358019b ./gcc/testsuite/gcc.dg/complete-port.c ! 720344318b ./gcc/testsuite/gcc.dg/concat2.c ! 2444556566b ./gcc/testsuite/gcc.dg/concat.c ! 872352985b ./gcc/testsuite/gcc.dg/conv-1.c ! 2296607049b ./gcc/testsuite/gcc.dg/cpp/19921210-1.c ! 446012754b ./gcc/testsuite/gcc.dg/cpp/19930510-1.c ! 1310331126b ./gcc/testsuite/gcc.dg/cpp/19940712-1a.h ! 1255987496b ./gcc/testsuite/gcc.dg/cpp/19940712-1b.h ! 3035400854b ./gcc/testsuite/gcc.dg/cpp/19940712-1.c ! 3911462043b ./gcc/testsuite/gcc.dg/cpp/19940712-1.h ! 3107147397b ./gcc/testsuite/gcc.dg/cpp/19951025-1.c ! 1152006619b ./gcc/testsuite/gcc.dg/cpp/19951227-1.c ! 3844252401b ./gcc/testsuite/gcc.dg/cpp/19960224-1.c ! 2681484848b ./gcc/testsuite/gcc.dg/cpp/19990119-1.c ! 152529314b ./gcc/testsuite/gcc.dg/cpp/19990228-1.c ! 2850976318b ./gcc/testsuite/gcc.dg/cpp/19990407-1.c ! 1821165639b ./gcc/testsuite/gcc.dg/cpp/19990409-1.c ! 3140711711b ./gcc/testsuite/gcc.dg/cpp/19990413-1.c ! 3962958732b ./gcc/testsuite/gcc.dg/cpp/20000127-1.c ! 2271984635b ./gcc/testsuite/gcc.dg/cpp/20000129-1.c ! 2675766007b ./gcc/testsuite/gcc.dg/cpp/20000207-1.c ! 4123239500b ./gcc/testsuite/gcc.dg/cpp/20000207-2.c ! 4036437808b ./gcc/testsuite/gcc.dg/cpp/20000209-1.c ! 1472416455b ./gcc/testsuite/gcc.dg/cpp/20000209-2.c ! 2174334870b ./gcc/testsuite/gcc.dg/cpp/20000301-1.c ! 1872528864b ./gcc/testsuite/gcc.dg/cpp/20000419-1.c ! 2720098340b ./gcc/testsuite/gcc.dg/cpp/20000519-1.c ! 96666994b ./gcc/testsuite/gcc.dg/cpp/20000529-1.c ! 1226501171b ./gcc/testsuite/gcc.dg/cpp/20000625-1.c ! 3024473110b ./gcc/testsuite/gcc.dg/cpp/20000627-1.c ! 1252878971b ./gcc/testsuite/gcc.dg/cpp/20000628-1a.h ! 3176910360b ./gcc/testsuite/gcc.dg/cpp/20000628-1.c ! 302522843b ./gcc/testsuite/gcc.dg/cpp/20000628-1.h ! 3939185973b ./gcc/testsuite/gcc.dg/cpp/20000725-1.c ! 3467950758b ./gcc/testsuite/gcc.dg/cpp/20020927-1.c ! 562036807b ./gcc/testsuite/gcc.dg/cpp/arith-1.c ! 330742469b ./gcc/testsuite/gcc.dg/cpp/arith-3.c ! 3918751425b ./gcc/testsuite/gcc.dg/cpp/assembl2.S ! 2327987352b ./gcc/testsuite/gcc.dg/cpp/assembler.S ! 2692554582b ./gcc/testsuite/gcc.dg/cpp/assert1.c ! 3542126362b ./gcc/testsuite/gcc.dg/cpp/assert2.c ! 1282180884b ./gcc/testsuite/gcc.dg/cpp/assert3.c ! 4028897631b ./gcc/testsuite/gcc.dg/cpp/avoidpaste1.c ! 1804955265b ./gcc/testsuite/gcc.dg/cpp/avoidpaste2.c ! 1837306227b ./gcc/testsuite/gcc.dg/cpp/backslash2.c ! 2909138544b ./gcc/testsuite/gcc.dg/cpp/backslash.c ! 1769035451b ./gcc/testsuite/gcc.dg/cpp/c89.c ! 205095111b ./gcc/testsuite/gcc.dg/cpp/c89-pedantic.c ! 925335145b ./gcc/testsuite/gcc.dg/cpp/c94.c ! 1661764059b ./gcc/testsuite/gcc.dg/cpp/c94-pedantic.c ! 3857361837b ./gcc/testsuite/gcc.dg/cpp/c99.c ! 3306050866b ./gcc/testsuite/gcc.dg/cpp/c99-pedantic.c ! 3516322832b ./gcc/testsuite/gcc.dg/cpp/charconst-2.c ! 2303966988b ./gcc/testsuite/gcc.dg/cpp/charconst-3.c ! 31571692b ./gcc/testsuite/gcc.dg/cpp/charconst-4.c ! 3858286956b ./gcc/testsuite/gcc.dg/cpp/charconst.c ! 1491584113b ./gcc/testsuite/gcc.dg/cpp/cmdlne-C2.c ! 3355056256b ./gcc/testsuite/gcc.dg/cpp/cmdlne-C.c ! 2496993356b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dD.c ! 609905807b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dD-dM.c ! 1600174935b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dD-M.c ! 3705836802b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.c ! 3088209084b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.h ! 1486055617b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dM.c ! 1101687822b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dM-dD.c ! 932524367b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dM-M.c ! 553926808b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dN-M.c ! 1363982392b ./gcc/testsuite/gcc.dg/cpp/cmdlne-M.c ! 2953736128b ./gcc/testsuite/gcc.dg/cpp/cmdlne-P.c ! 3367113455b ./gcc/testsuite/gcc.dg/cpp/cpp.exp ! 3494213157b ./gcc/testsuite/gcc.dg/cpp/cxxcom1.c ! 3135164554b ./gcc/testsuite/gcc.dg/cpp/cxxcom2.c ! 10664058b ./gcc/testsuite/gcc.dg/cpp/defined.c ! 1438288565b ./gcc/testsuite/gcc.dg/cpp/digraph1.c ! 1288261895b ./gcc/testsuite/gcc.dg/cpp/digraph2.c ! 2068680422b ./gcc/testsuite/gcc.dg/cpp/digraphs.c ! 2630139647b ./gcc/testsuite/gcc.dg/cpp/direct2.c ! 2931467115b ./gcc/testsuite/gcc.dg/cpp/direct2s.c ! 2352238865b ./gcc/testsuite/gcc.dg/cpp/directiv.c ! 3129493545b ./gcc/testsuite/gcc.dg/cpp/endif.c ! 3479505545b ./gcc/testsuite/gcc.dg/cpp/endif.h ! 837832505b ./gcc/testsuite/gcc.dg/cpp/endif-pedantic1.c ! 3212345923b ./gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c ! 2483248350b ./gcc/testsuite/gcc.dg/cpp/escape-1.c ! 1730195871b ./gcc/testsuite/gcc.dg/cpp/escape-2.c ! 3767981014b ./gcc/testsuite/gcc.dg/cpp/escape.c ! 52547616b ./gcc/testsuite/gcc.dg/cpp/expr.c ! 2035166761b ./gcc/testsuite/gcc.dg/cpp/extratokens2.c ! 2697913940b ./gcc/testsuite/gcc.dg/cpp/extratokens.c ! 905736b ./gcc/testsuite/gcc.dg/cpp/fpreprocessed.c ! 3280737784b ./gcc/testsuite/gcc.dg/cpp/gnuc89.c ! 3959604708b ./gcc/testsuite/gcc.dg/cpp/gnuc89-pedantic.c ! 1263189585b ./gcc/testsuite/gcc.dg/cpp/gnuc99.c ! 1601787549b ./gcc/testsuite/gcc.dg/cpp/gnuc99-pedantic.c ! 4214308249b ./gcc/testsuite/gcc.dg/cpp/hash1.c ! 2366342564b ./gcc/testsuite/gcc.dg/cpp/ident.c ! 2665156700b ./gcc/testsuite/gcc.dg/cpp/if-1.c ! 3352628668b ./gcc/testsuite/gcc.dg/cpp/if-2.c ! 489101197b ./gcc/testsuite/gcc.dg/cpp/if-4.c ! 882715641b ./gcc/testsuite/gcc.dg/cpp/if-5.c ! 4254343746b ./gcc/testsuite/gcc.dg/cpp/if-cexp.c ! 3012723046b ./gcc/testsuite/gcc.dg/cpp/if-mop.c ! 1884204635b ./gcc/testsuite/gcc.dg/cpp/if-mpar.c ! 3400278075b ./gcc/testsuite/gcc.dg/cpp/if-oppr.c ! 1490350403b ./gcc/testsuite/gcc.dg/cpp/if-paren.c ! 3952218044b ./gcc/testsuite/gcc.dg/cpp/if-sc.c ! 2598999845b ./gcc/testsuite/gcc.dg/cpp/if-shift.c ! 3593199515b ./gcc/testsuite/gcc.dg/cpp/if-unary.c ! 1252723901b ./gcc/testsuite/gcc.dg/cpp/inc/foo.h ! 2159210260b ./gcc/testsuite/gcc.dg/cpp/include1.c ! 2421188667b ./gcc/testsuite/gcc.dg/cpp/include2.c ! 653081234b ./gcc/testsuite/gcc.dg/cpp/include3.c ! 104604027b ./gcc/testsuite/gcc.dg/cpp/lexident.c ! 2395885746b ./gcc/testsuite/gcc.dg/cpp/lexnum.c ! 3213919551b ./gcc/testsuite/gcc.dg/cpp/lexstrng.c ! 3897829843b ./gcc/testsuite/gcc.dg/cpp/line1.c ! 100687188b ./gcc/testsuite/gcc.dg/cpp/line2.c ! 567370415b ./gcc/testsuite/gcc.dg/cpp/line3.c ! 1626475943b ./gcc/testsuite/gcc.dg/cpp/line4.c ! 3632976596b ./gcc/testsuite/gcc.dg/cpp/line5.c ! 3868918885b ./gcc/testsuite/gcc.dg/cpp/maccom1.c ! 2390179144b ./gcc/testsuite/gcc.dg/cpp/maccom2.c ! 4234015141b ./gcc/testsuite/gcc.dg/cpp/maccom3.c ! 1935439548b ./gcc/testsuite/gcc.dg/cpp/maccom4.c ! 319559313b ./gcc/testsuite/gcc.dg/cpp/maccom5.c ! 2833851089b ./gcc/testsuite/gcc.dg/cpp/maccom6.c ! 2536504561b ./gcc/testsuite/gcc.dg/cpp/mac-dir-1.c ! 2457364874b ./gcc/testsuite/gcc.dg/cpp/mac-dir-2.c ! 1379729851b ./gcc/testsuite/gcc.dg/cpp/macro10.c ! 3340222164b ./gcc/testsuite/gcc.dg/cpp/macro11.c ! 271504116b ./gcc/testsuite/gcc.dg/cpp/macro1.c ! 4270051746b ./gcc/testsuite/gcc.dg/cpp/macro2.c ! 2969168869b ./gcc/testsuite/gcc.dg/cpp/macro3.c ! 1188431715b ./gcc/testsuite/gcc.dg/cpp/macro4.c ! 1628527586b ./gcc/testsuite/gcc.dg/cpp/macro5.c ! 2368380713b ./gcc/testsuite/gcc.dg/cpp/macro6.c ! 2072551274b ./gcc/testsuite/gcc.dg/cpp/macro7.c ! 613805223b ./gcc/testsuite/gcc.dg/cpp/macro8.c ! 2926705982b ./gcc/testsuite/gcc.dg/cpp/macro9.c ! 259331101b ./gcc/testsuite/gcc.dg/cpp/macsyntx.c ! 3610840456b ./gcc/testsuite/gcc.dg/cpp/mi1.c ! 4261701187b ./gcc/testsuite/gcc.dg/cpp/mi1cc.h ! 419074706b ./gcc/testsuite/gcc.dg/cpp/mi1c.h ! 3904566528b ./gcc/testsuite/gcc.dg/cpp/mi1nd.h ! 3410643645b ./gcc/testsuite/gcc.dg/cpp/mi1ndp.h ! 2792742846b ./gcc/testsuite/gcc.dg/cpp/mi1x.h ! 2971656236b ./gcc/testsuite/gcc.dg/cpp/mi2a.h ! 2249557715b ./gcc/testsuite/gcc.dg/cpp/mi2b.h ! 2949078889b ./gcc/testsuite/gcc.dg/cpp/mi2.c ! 975601727b ./gcc/testsuite/gcc.dg/cpp/mi2c.h ! 1340631459b ./gcc/testsuite/gcc.dg/cpp/mi3.c ! 3410155219b ./gcc/testsuite/gcc.dg/cpp/mi3.def ! 1784999780b ./gcc/testsuite/gcc.dg/cpp/mi3.h ! 3722098684b ./gcc/testsuite/gcc.dg/cpp/mi4.c ! 1150462829b ./gcc/testsuite/gcc.dg/cpp/mi5.c ! 1358227252b ./gcc/testsuite/gcc.dg/cpp/mi6a.h ! 641332290b ./gcc/testsuite/gcc.dg/cpp/mi6b.h ! 1142195235b ./gcc/testsuite/gcc.dg/cpp/mi6.c ! 4070915278b ./gcc/testsuite/gcc.dg/cpp/mi6c.h ! 1337479900b ./gcc/testsuite/gcc.dg/cpp/mi6d.h ! 509977090b ./gcc/testsuite/gcc.dg/cpp/mi6e.h ! 3136816756b ./gcc/testsuite/gcc.dg/cpp/mi7a.h ! 3560454972b ./gcc/testsuite/gcc.dg/cpp/mi7b.h ! 734509647b ./gcc/testsuite/gcc.dg/cpp/mi7.c ! 1202755802b ./gcc/testsuite/gcc.dg/cpp/multiline.c ! 2266859121b ./gcc/testsuite/gcc.dg/cpp/paste10.c ! 4285709590b ./gcc/testsuite/gcc.dg/cpp/paste11.c ! 3149837578b ./gcc/testsuite/gcc.dg/cpp/paste12.c ! 903828210b ./gcc/testsuite/gcc.dg/cpp/paste13.c ! 3165908728b ./gcc/testsuite/gcc.dg/cpp/paste1.c ! 2468893035b ./gcc/testsuite/gcc.dg/cpp/paste2.c ! 3026273649b ./gcc/testsuite/gcc.dg/cpp/paste3.c ! 3812446689b ./gcc/testsuite/gcc.dg/cpp/paste4.c ! 4196513421b ./gcc/testsuite/gcc.dg/cpp/paste5.c ! 3141633537b ./gcc/testsuite/gcc.dg/cpp/paste6.c ! 2441365564b ./gcc/testsuite/gcc.dg/cpp/paste7.c ! 1061671229b ./gcc/testsuite/gcc.dg/cpp/paste8.c ! 2408632284b ./gcc/testsuite/gcc.dg/cpp/paste9.c ! 1004643236b ./gcc/testsuite/gcc.dg/cpp/poison.c ! 858950276b ./gcc/testsuite/gcc.dg/cpp/pragma-1.c ! 3534493797b ./gcc/testsuite/gcc.dg/cpp/_Pragma1.c ! 2473416313b ./gcc/testsuite/gcc.dg/cpp/pragma-2.c ! 4186091043b ./gcc/testsuite/gcc.dg/cpp/_Pragma2.c ! 1230813557b ./gcc/testsuite/gcc.dg/cpp/_Pragma3.c ! 3384939096b ./gcc/testsuite/gcc.dg/cpp/_Pragma4.c ! 678120078b ./gcc/testsuite/gcc.dg/cpp/_Pragma5.c ! 1107840471b ./gcc/testsuite/gcc.dg/cpp/redef1.c ! 1601641321b ./gcc/testsuite/gcc.dg/cpp/redef2.c ! 2020720031b ./gcc/testsuite/gcc.dg/cpp/skipping2.c ! 3846911977b ./gcc/testsuite/gcc.dg/cpp/skipping.c ! 3873271528b ./gcc/testsuite/gcc.dg/cpp/spacing1.c ! 1299147601b ./gcc/testsuite/gcc.dg/cpp/spacing2.c ! 3081823659b ./gcc/testsuite/gcc.dg/cpp/strify1.c ! 3973832195b ./gcc/testsuite/gcc.dg/cpp/strify2.c ! 2418211010b ./gcc/testsuite/gcc.dg/cpp/strify3.c ! 2496189814b ./gcc/testsuite/gcc.dg/cpp/strp1.c ! 3609546715b ./gcc/testsuite/gcc.dg/cpp/strp2.c ! 3648062425b ./gcc/testsuite/gcc.dg/cpp/syshdr1.h ! 930452060b ./gcc/testsuite/gcc.dg/cpp/syshdr2.h ! 2075703559b ./gcc/testsuite/gcc.dg/cpp/syshdr.c ! 3898065321b ./gcc/testsuite/gcc.dg/cpp/syshdr.h ! 3033820257b ./gcc/testsuite/gcc.dg/cpp/sysmac1.c ! 4068510437b ./gcc/testsuite/gcc.dg/cpp/sysmac2.c ! 1977182375b ./gcc/testsuite/gcc.dg/cpp/trad/argcount.c ! 2662614668b ./gcc/testsuite/gcc.dg/cpp/trad/assembler.S ! 2692554582b ./gcc/testsuite/gcc.dg/cpp/trad/assert1.c ! 2998566071b ./gcc/testsuite/gcc.dg/cpp/trad/assert2.c ! 1282180884b ./gcc/testsuite/gcc.dg/cpp/trad/assert3.c ! 757236630b ./gcc/testsuite/gcc.dg/cpp/trad/builtins.c ! 4232160868b ./gcc/testsuite/gcc.dg/cpp/trad/builtins.h ! 190491925b ./gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C2.c ! 2472826799b ./gcc/testsuite/gcc.dg/cpp/trad/cmdlne-C.c ! 2558565698b ./gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dD.c ! 3710083041b ./gcc/testsuite/gcc.dg/cpp/trad/cmdlne-dM.c ! 2421283003b ./gcc/testsuite/gcc.dg/cpp/trad/comment-2.c ! 4034996363b ./gcc/testsuite/gcc.dg/cpp/trad/comment.c ! 283168914b ./gcc/testsuite/gcc.dg/cpp/trad/define.c ! 1611975625b ./gcc/testsuite/gcc.dg/cpp/trad/defined.c ! 3187301379b ./gcc/testsuite/gcc.dg/cpp/trad/directive.c ! 462047311b ./gcc/testsuite/gcc.dg/cpp/trad/escaped-eof.c ! 2227807358b ./gcc/testsuite/gcc.dg/cpp/trad/escaped-nl.c ! 3384760545b ./gcc/testsuite/gcc.dg/cpp/trad/funlike-2.c ! 3004870383b ./gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c ! 3428926172b ./gcc/testsuite/gcc.dg/cpp/trad/funlike-4.c ! 2538194728b ./gcc/testsuite/gcc.dg/cpp/trad/funlike-5.c ! 2410104667b ./gcc/testsuite/gcc.dg/cpp/trad/funlike.c ! 4181249374b ./gcc/testsuite/gcc.dg/cpp/trad/hash.c ! 3396000556b ./gcc/testsuite/gcc.dg/cpp/trad/include.c ! 1593567097b ./gcc/testsuite/gcc.dg/cpp/trad/literals-1.c ! 349061295b ./gcc/testsuite/gcc.dg/cpp/trad/literals-2.c ! 4147882455b ./gcc/testsuite/gcc.dg/cpp/trad/maccom1.c ! 3160477466b ./gcc/testsuite/gcc.dg/cpp/trad/maccom2.c ! 1329336031b ./gcc/testsuite/gcc.dg/cpp/trad/maccom3.c ! 2109801015b ./gcc/testsuite/gcc.dg/cpp/trad/maccom4.c ! 570232206b ./gcc/testsuite/gcc.dg/cpp/trad/maccom6.c ! 487420591b ./gcc/testsuite/gcc.dg/cpp/trad/macroargs.c ! 2016512953b ./gcc/testsuite/gcc.dg/cpp/trad/mi1.c ! 419074706b ./gcc/testsuite/gcc.dg/cpp/trad/mi1c.h ! 3904566528b ./gcc/testsuite/gcc.dg/cpp/trad/mi1nd.h ! 3410643645b ./gcc/testsuite/gcc.dg/cpp/trad/mi1ndp.h ! 2792742846b ./gcc/testsuite/gcc.dg/cpp/trad/mi1x.h ! 2971656236b ./gcc/testsuite/gcc.dg/cpp/trad/mi2a.h ! 2249557715b ./gcc/testsuite/gcc.dg/cpp/trad/mi2b.h ! 2949078889b ./gcc/testsuite/gcc.dg/cpp/trad/mi2.c ! 975601727b ./gcc/testsuite/gcc.dg/cpp/trad/mi2c.h ! 1340631459b ./gcc/testsuite/gcc.dg/cpp/trad/mi3.c ! 3410155219b ./gcc/testsuite/gcc.dg/cpp/trad/mi3.def ! 1784999780b ./gcc/testsuite/gcc.dg/cpp/trad/mi3.h ! 3722098684b ./gcc/testsuite/gcc.dg/cpp/trad/mi4.c ! 2597798094b ./gcc/testsuite/gcc.dg/cpp/trad/mi5.c ! 1358227252b ./gcc/testsuite/gcc.dg/cpp/trad/mi6a.h ! 641332290b ./gcc/testsuite/gcc.dg/cpp/trad/mi6b.h ! 1142195235b ./gcc/testsuite/gcc.dg/cpp/trad/mi6.c ! 4070915278b ./gcc/testsuite/gcc.dg/cpp/trad/mi6c.h ! 1337479900b ./gcc/testsuite/gcc.dg/cpp/trad/mi6d.h ! 509977090b ./gcc/testsuite/gcc.dg/cpp/trad/mi6e.h ! 3136816756b ./gcc/testsuite/gcc.dg/cpp/trad/mi7a.h ! 3560454972b ./gcc/testsuite/gcc.dg/cpp/trad/mi7b.h ! 3905249952b ./gcc/testsuite/gcc.dg/cpp/trad/mi7.c ! 559595333b ./gcc/testsuite/gcc.dg/cpp/trad/null-drctv.c ! 199207201b ./gcc/testsuite/gcc.dg/cpp/trad/num-sign.c ! 1450713990b ./gcc/testsuite/gcc.dg/cpp/trad/paste.c ! 2091734769b ./gcc/testsuite/gcc.dg/cpp/trad/quote.c ! 3299778145b ./gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c ! 1920549175b ./gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c ! 4138311880b ./gcc/testsuite/gcc.dg/cpp/trad/recurse-3.c ! 2501127986b ./gcc/testsuite/gcc.dg/cpp/trad/redef1.c ! 756307914b ./gcc/testsuite/gcc.dg/cpp/trad/redef2.c ! 1229021684b ./gcc/testsuite/gcc.dg/cpp/trad/__STDC__.c ! 2436946679b ./gcc/testsuite/gcc.dg/cpp/trad/strify.c ! 3580519774b ./gcc/testsuite/gcc.dg/cpp/trad/trad.exp ! 2826500595b ./gcc/testsuite/gcc.dg/cpp/trad/uchar.c ! 3646320904b ./gcc/testsuite/gcc.dg/cpp/trad/Wunused.c ! 2247214341b ./gcc/testsuite/gcc.dg/cpp/trad/Wunused.h ! 580041869b ./gcc/testsuite/gcc.dg/cpp/trigraphs.c ! 3954705973b ./gcc/testsuite/gcc.dg/cpp/tr-paste.c ! 2720640173b ./gcc/testsuite/gcc.dg/cpp/tr-warn1.c ! 256738446b ./gcc/testsuite/gcc.dg/cpp/tr-warn2.c ! 3053015314b ./gcc/testsuite/gcc.dg/cpp/tr-warn3.c ! 2634569795b ./gcc/testsuite/gcc.dg/cpp/tr-warn4.c ! 733328423b ./gcc/testsuite/gcc.dg/cpp/tr-warn5.c ! 880495829b ./gcc/testsuite/gcc.dg/cpp/tr-warn6.c ! 2894747317b ./gcc/testsuite/gcc.dg/cpp/uchar-1.c ! 2806339500b ./gcc/testsuite/gcc.dg/cpp/uchar-3.c ! 3156619494b ./gcc/testsuite/gcc.dg/cpp/ucs.c ! 1271068491b ./gcc/testsuite/gcc.dg/cpp/unc1.c ! 2985690540b ./gcc/testsuite/gcc.dg/cpp/unc2.c ! 479621763b ./gcc/testsuite/gcc.dg/cpp/unc3.c ! 1549705287b ./gcc/testsuite/gcc.dg/cpp/unc4.c ! 1052162081b ./gcc/testsuite/gcc.dg/cpp/undef2.c ! 1278828881b ./gcc/testsuite/gcc.dg/cpp/vararg1.c ! 270851301b ./gcc/testsuite/gcc.dg/cpp/vararg2.c ! 203701001b ./gcc/testsuite/gcc.dg/cpp/vararg3.c ! 2222858341b ./gcc/testsuite/gcc.dg/cpp/vararg4.c ! 3684840524b ./gcc/testsuite/gcc.dg/cpp/wchar-1.c ! 2112571638b ./gcc/testsuite/gcc.dg/cpp/widestr1.c ! 3886684794b ./gcc/testsuite/gcc.dg/cpp/Wsignprom.c ! 1685485063b ./gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c ! 3786746146b ./gcc/testsuite/gcc.dg/cpp/Wunused.c ! 2247214341b ./gcc/testsuite/gcc.dg/cpp/Wunused.h ! 3955692120b ./gcc/testsuite/gcc.dg/darwin-ld-1.c ! 3377797610b ./gcc/testsuite/gcc.dg/darwin-ld-2.c ! 858483839b ./gcc/testsuite/gcc.dg/darwin-ld-3.c ! 2696702867b ./gcc/testsuite/gcc.dg/darwin-ld-4.c ! 587036301b ./gcc/testsuite/gcc.dg/darwin-ld-5.c ! 2478073469b ./gcc/testsuite/gcc.dg/debug/20000503-1.c ! 1850073884b ./gcc/testsuite/gcc.dg/debug/20010207-1.c ! 2575589968b ./gcc/testsuite/gcc.dg/debug/20011223-1.c ! 3480555031b ./gcc/testsuite/gcc.dg/debug/20020104-2.c ! 465470758b ./gcc/testsuite/gcc.dg/debug/20020220-1.c ! 38521003b ./gcc/testsuite/gcc.dg/debug/20020224-1.c ! 1897254689b ./gcc/testsuite/gcc.dg/debug/20020327-1.c ! 2095797855b ./gcc/testsuite/gcc.dg/debug/debug-1.c ! 936371752b ./gcc/testsuite/gcc.dg/debug/debug-2.c ! 1466203416b ./gcc/testsuite/gcc.dg/debug/debug-3.c ! 591803753b ./gcc/testsuite/gcc.dg/debug/debug-4.c ! 524177325b ./gcc/testsuite/gcc.dg/debug/debug-5.c ! 4017752601b ./gcc/testsuite/gcc.dg/debug/debug-6.c ! 2820451029b ./gcc/testsuite/gcc.dg/debug/debug.exp ! 3154398188b ./gcc/testsuite/gcc.dg/debug/dwarf2-1.c ! 3551380716b ./gcc/testsuite/gcc.dg/debug/dwarf2-2.c ! 1865154101b ./gcc/testsuite/gcc.dg/debug/trivial.c ! 2108424497b ./gcc/testsuite/gcc.dg/decl-1.c ! 3489735771b ./gcc/testsuite/gcc.dg/decl-2.c ! 219343109b ./gcc/testsuite/gcc.dg/decl-3.c ! 2106699188b ./gcc/testsuite/gcc.dg/deprecated.c ! 462220244b ./gcc/testsuite/gcc.dg/dg.exp ! 3005671194b ./gcc/testsuite/gcc.dg/divbyzero.c ! 3732188130b ./gcc/testsuite/gcc.dg/dll-1.c ! 3201339636b ./gcc/testsuite/gcc.dg/dll-2.c ! 4107998098b ./gcc/testsuite/gcc.dg/dll-3.c ! 38849204b ./gcc/testsuite/gcc.dg/dll-4.c ! 2018483943b ./gcc/testsuite/gcc.dg/doloop-1.c ! 65866289b ./gcc/testsuite/gcc.dg/duff-1.c ! 1064594641b ./gcc/testsuite/gcc.dg/duff-2.c ! 607403040b ./gcc/testsuite/gcc.dg/duff-3.c ! 3922657633b ./gcc/testsuite/gcc.dg/empty1.c ! 2135186629b ./gcc/testsuite/gcc.dg/enum1.c ! 1119508710b ./gcc/testsuite/gcc.dg/fastmath-1.c ! 709842397b ./gcc/testsuite/gcc.dg/fnegate-1.c ! 3222632325b ./gcc/testsuite/gcc.dg/format/array-1.c ! 1862455428b ./gcc/testsuite/gcc.dg/format/attr-1.c ! 3131101897b ./gcc/testsuite/gcc.dg/format/attr-2.c ! 3345098920b ./gcc/testsuite/gcc.dg/format/attr-3.c ! 1282524185b ./gcc/testsuite/gcc.dg/format/attr-4.c ! 2109942555b ./gcc/testsuite/gcc.dg/format/attr-5.c ! 1342273591b ./gcc/testsuite/gcc.dg/format/attr-6.c ! 3314290167b ./gcc/testsuite/gcc.dg/format/attr-7.c ! 2805119685b ./gcc/testsuite/gcc.dg/format/branch-1.c ! 753102824b ./gcc/testsuite/gcc.dg/format/builtin-1.c ! 2984579335b ./gcc/testsuite/gcc.dg/format/c90-printf-1.c ! 2152399739b ./gcc/testsuite/gcc.dg/format/c90-printf-2.c ! 576410250b ./gcc/testsuite/gcc.dg/format/c90-printf-3.c ! 1954948606b ./gcc/testsuite/gcc.dg/format/c90-scanf-1.c ! 461393812b ./gcc/testsuite/gcc.dg/format/c90-scanf-2.c ! 3343890566b ./gcc/testsuite/gcc.dg/format/c90-scanf-3.c ! 2060901849b ./gcc/testsuite/gcc.dg/format/c90-scanf-4.c ! 3830240101b ./gcc/testsuite/gcc.dg/format/c90-strftime-1.c ! 908665911b ./gcc/testsuite/gcc.dg/format/c90-strftime-2.c ! 2447449665b ./gcc/testsuite/gcc.dg/format/c94-printf-1.c ! 1772682986b ./gcc/testsuite/gcc.dg/format/c94-scanf-1.c ! 1572424421b ./gcc/testsuite/gcc.dg/format/c99-printf-1.c ! 1982196060b ./gcc/testsuite/gcc.dg/format/c99-printf-2.c ! 3845709577b ./gcc/testsuite/gcc.dg/format/c99-printf-3.c ! 319347872b ./gcc/testsuite/gcc.dg/format/c99-scanf-1.c ! 3735460767b ./gcc/testsuite/gcc.dg/format/c99-scanf-2.c ! 3432916856b ./gcc/testsuite/gcc.dg/format/c99-scanf-3.c ! 3177298628b ./gcc/testsuite/gcc.dg/format/c99-strftime-1.c ! 2090637496b ./gcc/testsuite/gcc.dg/format/c99-strftime-2.c ! 2345337374b ./gcc/testsuite/gcc.dg/format/diag-1.c ! 1250738052b ./gcc/testsuite/gcc.dg/format/errmk-1.c ! 1927556152b ./gcc/testsuite/gcc.dg/format/ext-1.c ! 230043853b ./gcc/testsuite/gcc.dg/format/ext-2.c ! 3735744313b ./gcc/testsuite/gcc.dg/format/ext-3.c ! 2104347788b ./gcc/testsuite/gcc.dg/format/ext-4.c ! 3870005152b ./gcc/testsuite/gcc.dg/format/ext-5.c ! 4154438977b ./gcc/testsuite/gcc.dg/format/ext-6.c ! 174407969b ./gcc/testsuite/gcc.dg/format/format.exp ! 2650327793b ./gcc/testsuite/gcc.dg/format/format.h ! 3030055438b ./gcc/testsuite/gcc.dg/format/miss-1.c ! 58040071b ./gcc/testsuite/gcc.dg/format/miss-2.c ! 1680800961b ./gcc/testsuite/gcc.dg/format/multattr-1.c ! 3511814217b ./gcc/testsuite/gcc.dg/format/multattr-2.c ! 1621224881b ./gcc/testsuite/gcc.dg/format/multattr-3.c ! 2482792163b ./gcc/testsuite/gcc.dg/format/no-exargs-1.c ! 3432514252b ./gcc/testsuite/gcc.dg/format/no-exargs-2.c ! 2335984266b ./gcc/testsuite/gcc.dg/format/nonlit-1.c ! 3055177111b ./gcc/testsuite/gcc.dg/format/nonlit-2.c ! 449451912b ./gcc/testsuite/gcc.dg/format/nonlit-3.c ! 4199776146b ./gcc/testsuite/gcc.dg/format/no-y2k-1.c ! 3054977982b ./gcc/testsuite/gcc.dg/format/null-1.c ! 3652642152b ./gcc/testsuite/gcc.dg/format/plus-1.c ! 2673114039b ./gcc/testsuite/gcc.dg/format/sec-1.c ! 1815893280b ./gcc/testsuite/gcc.dg/format/strfmon-1.c ! 821372176b ./gcc/testsuite/gcc.dg/format/va-1.c ! 358822374b ./gcc/testsuite/gcc.dg/format/warnll-1.c ! 3962912739b ./gcc/testsuite/gcc.dg/format/xopen-1.c ! 1082307299b ./gcc/testsuite/gcc.dg/format/xopen-2.c ! 73044124b ./gcc/testsuite/gcc.dg/format/z-1.c ! 1464990929b ./gcc/testsuite/gcc.dg/format/zero-length-1.c ! 3435417081b ./gcc/testsuite/gcc.dg/fshort-wchar.c ! 745582715b ./gcc/testsuite/gcc.dg/gnu89-init-1.c ! 339065893b ./gcc/testsuite/gcc.dg/gnu89-init-2.c ! 1770671475b ./gcc/testsuite/gcc.dg/gnu99-init-1.c ! 2038429173b ./gcc/testsuite/gcc.dg/h8300-stack-1.c ! 885923224b ./gcc/testsuite/gcc.dg/i386-387-1.c ! 4204057333b ./gcc/testsuite/gcc.dg/i386-387-2.c ! 3371905361b ./gcc/testsuite/gcc.dg/i386-bitfield1.c ! 3703039330b ./gcc/testsuite/gcc.dg/i386-loop-1.c ! 2666972329b ./gcc/testsuite/gcc.dg/i386-loop-2.c ! 2036634176b ./gcc/testsuite/gcc.dg/i386-memset-1.c ! 2049230625b ./gcc/testsuite/gcc.dg/i386-mmx-1.c ! 3973906625b ./gcc/testsuite/gcc.dg/i386-mmx-2.c ! 1669092452b ./gcc/testsuite/gcc.dg/i386-mmx-3.c ! 811535520b ./gcc/testsuite/gcc.dg/i386-signbit-1.c ! 1624192171b ./gcc/testsuite/gcc.dg/i386-signbit-2.c ! 1578707081b ./gcc/testsuite/gcc.dg/i386-signbit-3.c ! 2923520039b ./gcc/testsuite/gcc.dg/i386-sse-1.c ! 1935024742b ./gcc/testsuite/gcc.dg/i386-sse-2.c ! 3426246610b ./gcc/testsuite/gcc.dg/i386-sse-3.c ! 3806311851b ./gcc/testsuite/gcc.dg/i386-ssetype-1.c ! 4034432096b ./gcc/testsuite/gcc.dg/i386-ssetype-2.c ! 1429730686b ./gcc/testsuite/gcc.dg/i386-ssetype-3.c ! 1818014328b ./gcc/testsuite/gcc.dg/i386-ssetype-4.c ! 2625840402b ./gcc/testsuite/gcc.dg/i386-ssetype-5.c ! 1459694165b ./gcc/testsuite/gcc.dg/i386-unroll-1.c ! 646600080b ./gcc/testsuite/gcc.dg/ia64-asm-1.c ! 2995485298b ./gcc/testsuite/gcc.dg/ia64-sync-1.c ! 72205644b ./gcc/testsuite/gcc.dg/ia64-sync-2.c ! 3522006930b ./gcc/testsuite/gcc.dg/ia64-sync-3.c ! 20033210b ./gcc/testsuite/gcc.dg/ia64-visibility-1.c ! 2611338469b ./gcc/testsuite/gcc.dg/ia64-visibility-2.c ! 1374850312b ./gcc/testsuite/gcc.dg/ifelse-1.c ! 4085178572b ./gcc/testsuite/gcc.dg/iftrap-1.c ! 448418366b ./gcc/testsuite/gcc.dg/iftrap-2.c ! 2512902839b ./gcc/testsuite/gcc.dg/inline-1.c ! 1196369631b ./gcc/testsuite/gcc.dg/inline-2.c ! 247919548b ./gcc/testsuite/gcc.dg/loop-1.c ! 775331063b ./gcc/testsuite/gcc.dg/lvalue1.c ! 208843907b ./gcc/testsuite/gcc.dg/mips-args-1.c ! 3921207576b ./gcc/testsuite/gcc.dg/mips-args-2.c ! 1475015375b ./gcc/testsuite/gcc.dg/mips-args-3.c ! 2954420820b ./gcc/testsuite/gcc.dg/mmix-1.c ! 2663557248b ./gcc/testsuite/gcc.dg/m-un-1.c ! 2341407016b ./gcc/testsuite/gcc.dg/m-un-2.c ! 3356258804b ./gcc/testsuite/gcc.dg/nest.c ! 167742958b ./gcc/testsuite/gcc.dg/no-builtin-1.c ! 2208318132b ./gcc/testsuite/gcc.dg/noncompile/20000901-1.c ! 3562764821b ./gcc/testsuite/gcc.dg/noncompile/20001228-1.c ! 677199841b ./gcc/testsuite/gcc.dg/noncompile/20010425-1.c ! 100652056b ./gcc/testsuite/gcc.dg/noncompile/20010524-1.c ! 292530438b ./gcc/testsuite/gcc.dg/noncompile/20011025-1.c ! 3164469142b ./gcc/testsuite/gcc.dg/noncompile/20020130-1.c ! 3055182962b ./gcc/testsuite/gcc.dg/noncompile/20020207-1.c ! 3889627347b ./gcc/testsuite/gcc.dg/noncompile/20020213-1.c ! 1457569280b ./gcc/testsuite/gcc.dg/noncompile/20020220-1.c ! 2964160251b ./gcc/testsuite/gcc.dg/noncompile/920507-1.c ! 2161867266b ./gcc/testsuite/gcc.dg/noncompile/920616-2.c ! 1066215762b ./gcc/testsuite/gcc.dg/noncompile/920721-2.c ! 2834384944b ./gcc/testsuite/gcc.dg/noncompile/920824-1.c ! 3955955814b ./gcc/testsuite/gcc.dg/noncompile/920923-1.c ! 3162370830b ./gcc/testsuite/gcc.dg/noncompile/921102-1.c ! 2258888666b ./gcc/testsuite/gcc.dg/noncompile/921116-1.c ! 4097035630b ./gcc/testsuite/gcc.dg/noncompile/930301-1.c ! 840634782b ./gcc/testsuite/gcc.dg/noncompile/930622-1.c ! 3061074939b ./gcc/testsuite/gcc.dg/noncompile/930622-2.c ! 181482966b ./gcc/testsuite/gcc.dg/noncompile/930714-1.c ! 3515814095b ./gcc/testsuite/gcc.dg/noncompile/931203-1.c ! 2994529883b ./gcc/testsuite/gcc.dg/noncompile/940112-1.c ! 3064722803b ./gcc/testsuite/gcc.dg/noncompile/940227-1.c ! 667278578b ./gcc/testsuite/gcc.dg/noncompile/950825-1.c ! 170314268b ./gcc/testsuite/gcc.dg/noncompile/950921-1.c ! 1539048278b ./gcc/testsuite/gcc.dg/noncompile/951123-1.c ! 988927550b ./gcc/testsuite/gcc.dg/noncompile/971104-1.c ! 3218469122b ./gcc/testsuite/gcc.dg/noncompile/990416-1.c ! 3596296296b ./gcc/testsuite/gcc.dg/noncompile/const-ll-1.c ! 2315448619b ./gcc/testsuite/gcc.dg/noncompile/incomplete-1.c ! 1128187562b ./gcc/testsuite/gcc.dg/noncompile/init-1.c ! 2927938029b ./gcc/testsuite/gcc.dg/noncompile/init-2.c ! 4011814030b ./gcc/testsuite/gcc.dg/noncompile/init-3.c ! 835046904b ./gcc/testsuite/gcc.dg/noncompile/invalid_asm.c ! 3441206096b ./gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c ! 348329041b ./gcc/testsuite/gcc.dg/noncompile/noncompile.exp ! 3105423709b ./gcc/testsuite/gcc.dg/noncompile/redecl-1.c ! 1781438824b ./gcc/testsuite/gcc.dg/noncompile/va-arg-1.c ! 3381135030b ./gcc/testsuite/gcc.dg/noncompile/voidparam-1.c ! 2112479311b ./gcc/testsuite/gcc.dg/nonnull-1.c ! 1724789636b ./gcc/testsuite/gcc.dg/nonnull-2.c ! 1329170478b ./gcc/testsuite/gcc.dg/noreturn-1.c ! 2267400179b ./gcc/testsuite/gcc.dg/noreturn-2.c ! 1222476594b ./gcc/testsuite/gcc.dg/noreturn-3.c ! 4260549149b ./gcc/testsuite/gcc.dg/noreturn-4.c ! 4241025034b ./gcc/testsuite/gcc.dg/old-style-asm-1.c ! 1662299957b ./gcc/testsuite/gcc.dg/pack-test-1.c ! 2754082325b ./gcc/testsuite/gcc.dg/pack-test-1.h ! 2875409621b ./gcc/testsuite/gcc.dg/pack-test-2.c ! 3389561780b ./gcc/testsuite/gcc.dg/ppc-fmadd-1.c ! 541289115b ./gcc/testsuite/gcc.dg/ppc-fmadd-2.c ! 2765687813b ./gcc/testsuite/gcc.dg/ppc-fmadd-3.c ! 635404827b ./gcc/testsuite/gcc.dg/ppc-ldstruct.c ! 1383345482b ./gcc/testsuite/gcc.dg/ppc-spe.c ! 3395691298b ./gcc/testsuite/gcc.dg/pragma-align.c ! 2976918557b ./gcc/testsuite/gcc.dg/pragma-darwin.c ! 2313186581b ./gcc/testsuite/gcc.dg/pragma-ep-1.c ! 689657683b ./gcc/testsuite/gcc.dg/pragma-ep-2.c ! 375277958b ./gcc/testsuite/gcc.dg/pragma-ep-3.c ! 18511022b ./gcc/testsuite/gcc.dg/pragma-re-1.c ! 3911201539b ./gcc/testsuite/gcc.dg/pragma-re-2.c ! 3011001240b ./gcc/testsuite/gcc.dg/qual-return-1.c ! 4111880764b ./gcc/testsuite/gcc.dg/qual-return-2.c ! 2426423235b ./gcc/testsuite/gcc.dg/README ! 2127458656b ./gcc/testsuite/gcc.dg/return-type-1.c ! 3519355790b ./gcc/testsuite/gcc.dg/return-type-2.c ! 2879526504b ./gcc/testsuite/gcc.dg/return-type-3.c ! 3862146754b ./gcc/testsuite/gcc.dg/sequence-pt-1.c ! 3997091992b ./gcc/testsuite/gcc.dg/setjmp-1.c ! 1999251039b ./gcc/testsuite/gcc.dg/sibcall-1.c ! 2394881430b ./gcc/testsuite/gcc.dg/sibcall-2.c ! 2328366575b ./gcc/testsuite/gcc.dg/sibcall-3.c ! 348731556b ./gcc/testsuite/gcc.dg/sibcall-4.c ! 3310584874b ./gcc/testsuite/gcc.dg/simd-1.c ! 2828537866b ./gcc/testsuite/gcc.dg/sparc-dwarf2.c ! 802040009b ./gcc/testsuite/gcc.dg/sparc-ret.c ! 1993113484b ./gcc/testsuite/gcc.dg/special/20000419-2.c ! 3430419731b ./gcc/testsuite/gcc.dg/special/alias-1.c ! 7306739b ./gcc/testsuite/gcc.dg/special/alias-2.c ! 2059304830b ./gcc/testsuite/gcc.dg/special/ecos.exp ! 4212112354b ./gcc/testsuite/gcc.dg/special/gcsec-1.c ! 3980204525b ./gcc/testsuite/gcc.dg/special/mips-abi.exp ! 4294967295b ./gcc/testsuite/gcc.dg/special/mips-abi.s ! 274062869b ./gcc/testsuite/gcc.dg/special/special.exp ! 3422703148b ./gcc/testsuite/gcc.dg/special/weak-1a.c ! 2943372070b ./gcc/testsuite/gcc.dg/special/weak-1.c ! 389288806b ./gcc/testsuite/gcc.dg/special/weak-2a.c ! 3422703148b ./gcc/testsuite/gcc.dg/special/weak-2b.c ! 3142421222b ./gcc/testsuite/gcc.dg/special/weak-2.c ! 2222470584b ./gcc/testsuite/gcc.dg/special/wkali-1.c ! 206085145b ./gcc/testsuite/gcc.dg/special/wkali-2a.c ! 2277202182b ./gcc/testsuite/gcc.dg/special/wkali-2b.c ! 3142421222b ./gcc/testsuite/gcc.dg/special/wkali-2.c ! 1648410279b ./gcc/testsuite/gcc.dg/splet-1.c ! 276809676b ./gcc/testsuite/gcc.dg/struct-alias-1.c ! 2735438447b ./gcc/testsuite/gcc.dg/struct-by-value-1.c ! 652392948b ./gcc/testsuite/gcc.dg/struct-ret-1.c ! 1932500816b ./gcc/testsuite/gcc.dg/struct-ret-2.c ! 3047762229b ./gcc/testsuite/gcc.dg/struct-ret-libc.c ! 548999932b ./gcc/testsuite/gcc.dg/switch-1.c ! 3837710588b ./gcc/testsuite/gcc.dg/tls/alias-1.c ! 1700260228b ./gcc/testsuite/gcc.dg/tls/diag-1.c ! 3983152143b ./gcc/testsuite/gcc.dg/tls/diag-2.c ! 3440648572b ./gcc/testsuite/gcc.dg/tls/diag-3.c ! 1583541536b ./gcc/testsuite/gcc.dg/tls/init-1.c ! 1079004879b ./gcc/testsuite/gcc.dg/tls/nonpic-1.c ! 2112067562b ./gcc/testsuite/gcc.dg/tls/opt-2.c ! 2888022674b ./gcc/testsuite/gcc.dg/tls/opt-3.c ! 2772172947b ./gcc/testsuite/gcc.dg/tls/opt-4.c ! 1198289493b ./gcc/testsuite/gcc.dg/tls/pic-1.c ! 2036184791b ./gcc/testsuite/gcc.dg/tls/section-1.c ! 2218745466b ./gcc/testsuite/gcc.dg/tls/struct-1.c ! 4065237020b ./gcc/testsuite/gcc.dg/tls/tls.exp ! 472549683b ./gcc/testsuite/gcc.dg/tls/trivial.c ! 1141366394b ./gcc/testsuite/gcc.dg/trunc-1.c ! 1890682509b ./gcc/testsuite/gcc.dg/typedef-init.c ! 1892637986b ./gcc/testsuite/gcc.dg/typeof-1.c ! 2805647153b ./gcc/testsuite/gcc.dg/typespec-1.c ! 1860858242b ./gcc/testsuite/gcc.dg/ultrasp1.c ! 789972216b ./gcc/testsuite/gcc.dg/ultrasp2.c ! 2708772692b ./gcc/testsuite/gcc.dg/ultrasp3.c ! 1890424464b ./gcc/testsuite/gcc.dg/ultrasp4.c ! 2979039757b ./gcc/testsuite/gcc.dg/ultrasp5.c ! 783369369b ./gcc/testsuite/gcc.dg/ultrasp6.c ! 2907651471b ./gcc/testsuite/gcc.dg/ultrasp7.c ! 906694114b ./gcc/testsuite/gcc.dg/ultrasp8.c ! 2258658308b ./gcc/testsuite/gcc.dg/uninit-1.c ! 608086310b ./gcc/testsuite/gcc.dg/uninit-2.c ! 2219873069b ./gcc/testsuite/gcc.dg/uninit-3.c ! 3153724678b ./gcc/testsuite/gcc.dg/uninit-4.c ! 2761916267b ./gcc/testsuite/gcc.dg/uninit-5.c ! 4187609695b ./gcc/testsuite/gcc.dg/uninit-6.c ! 3846997492b ./gcc/testsuite/gcc.dg/uninit-8.c ! 390912088b ./gcc/testsuite/gcc.dg/uninit-9.c ! 2047101897b ./gcc/testsuite/gcc.dg/uninit-A.c ! 3967573468b ./gcc/testsuite/gcc.dg/uninit-B.c ! 2467264013b ./gcc/testsuite/gcc.dg/uninit-C.c ! 3652858704b ./gcc/testsuite/gcc.dg/unordered-1.c ! 977726966b ./gcc/testsuite/gcc.dg/unused-1.c ! 3484455791b ./gcc/testsuite/gcc.dg/unused-2.c ! 865910481b ./gcc/testsuite/gcc.dg/unused-3.c ! 1143790346b ./gcc/testsuite/gcc.dg/unused-4.c ! 3706472995b ./gcc/testsuite/gcc.dg/va-arg-1.c ! 1598019737b ./gcc/testsuite/gcc.dg/va-arg-2.c ! 2932877249b ./gcc/testsuite/gcc.dg/verbose-asm.c ! 3017845162b ./gcc/testsuite/gcc.dg/vla-2.c ! 2427295047b ./gcc/testsuite/gcc.dg/vla-init-1.c ! 4257653081b ./gcc/testsuite/gcc.dg/warn-1.c ! 2228363679b ./gcc/testsuite/gcc.dg/wchar_t-1.c ! 943771070b ./gcc/testsuite/gcc.dg/Wconversion.c ! 2158608745b ./gcc/testsuite/gcc.dg/weak/typeof-2.c ! 284772550b ./gcc/testsuite/gcc.dg/weak/weak-1.c ! 4188979390b ./gcc/testsuite/gcc.dg/weak/weak-2.c ! 4217992067b ./gcc/testsuite/gcc.dg/weak/weak-3.c ! 335689940b ./gcc/testsuite/gcc.dg/weak/weak-4.c ! 2769940495b ./gcc/testsuite/gcc.dg/weak/weak-5.c ! 3288640728b ./gcc/testsuite/gcc.dg/weak/weak-6.c ! 448806115b ./gcc/testsuite/gcc.dg/weak/weak-7.c ! 4030894436b ./gcc/testsuite/gcc.dg/weak/weak-8.c ! 1489715470b ./gcc/testsuite/gcc.dg/weak/weak-9.c ! 352709517b ./gcc/testsuite/gcc.dg/weak/weak.exp ! 455748560b ./gcc/testsuite/gcc.dg/wint_t-1.c ! 3364645726b ./gcc/testsuite/gcc.dg/Wlarger-than.c ! 3791055151b ./gcc/testsuite/gcc.dg/Wparentheses-1.c ! 3316229121b ./gcc/testsuite/gcc.dg/Wreturn-type2.c ! 2809247827b ./gcc/testsuite/gcc.dg/Wreturn-type.c ! 3907876407b ./gcc/testsuite/gcc.dg/Wshadow-1.c ! 3928913400b ./gcc/testsuite/gcc.dg/Wswitch-2.c ! 49151727b ./gcc/testsuite/gcc.dg/Wswitch.c ! 3095170584b ./gcc/testsuite/gcc.dg/Wswitch-default.c ! 2102653224b ./gcc/testsuite/gcc.dg/Wswitch-enum.c ! 3993663285b ./gcc/testsuite/gcc.dg/wtr-aggr-init-1.c ! 633259392b ./gcc/testsuite/gcc.dg/wtr-conversion-1.c ! 3391999525b ./gcc/testsuite/gcc.dg/wtr-escape-1.c ! 1703287085b ./gcc/testsuite/gcc.dg/wtr-func-def-1.c ! 1477789682b ./gcc/testsuite/gcc.dg/wtr-int-type-1.c ! 2738321439b ./gcc/testsuite/gcc.dg/wtr-label-1.c ! 1412426885b ./gcc/testsuite/gcc.dg/wtr-static-1.c ! 2515335159b ./gcc/testsuite/gcc.dg/wtr-strcat-1.c ! 3352403433b ./gcc/testsuite/gcc.dg/wtr-suffix-1.c ! 3574773812b ./gcc/testsuite/gcc.dg/wtr-switch-1.c ! 38129501b ./gcc/testsuite/gcc.dg/wtr-unary-plus-1.c ! 3581927017b ./gcc/testsuite/gcc.dg/wtr-union-init-1.c ! 3887199666b ./gcc/testsuite/gcc.dg/wtr-union-init-2.c ! 2779433155b ./gcc/testsuite/gcc.dg/wtr-union-init-3.c ! 2078992029b ./gcc/testsuite/gcc.dg/Wunknownprag.c ! 1674197654b ./gcc/testsuite/gcc.dg/Wunreachable-1.c ! 3581949676b ./gcc/testsuite/gcc.dg/Wunreachable-2.c ! 1769759078b ./gcc/testsuite/gcc.misc-tests/acker1.c ! 1443030966b ./gcc/testsuite/gcc.misc-tests/acker1.exp ! 278378178b ./gcc/testsuite/gcc.misc-tests/arm-isr.c ! 1193019601b ./gcc/testsuite/gcc.misc-tests/arm-isr.exp ! 2075376861b ./gcc/testsuite/gcc.misc-tests/bprob-1.c ! 3293027214b ./gcc/testsuite/gcc.misc-tests/bprob-2.c ! 2056237520b ./gcc/testsuite/gcc.misc-tests/bprob.exp ! 865542926b ./gcc/testsuite/gcc.misc-tests/dg-10.c ! 2063159250b ./gcc/testsuite/gcc.misc-tests/dg-11.c ! 33043738b ./gcc/testsuite/gcc.misc-tests/dg-12.c ! 730919505b ./gcc/testsuite/gcc.misc-tests/dg-1.c ! 3096773472b ./gcc/testsuite/gcc.misc-tests/dg-2.c ! 3661115972b ./gcc/testsuite/gcc.misc-tests/dg-3.c ! 3160178728b ./gcc/testsuite/gcc.misc-tests/dg-4.c ! 2494962233b ./gcc/testsuite/gcc.misc-tests/dg-5.c ! 2938473505b ./gcc/testsuite/gcc.misc-tests/dg-6.c ! 3402935282b ./gcc/testsuite/gcc.misc-tests/dg-7.c ! 1050718588b ./gcc/testsuite/gcc.misc-tests/dg-8.c ! 1666656352b ./gcc/testsuite/gcc.misc-tests/dg-9.c ! 1706908915b ./gcc/testsuite/gcc.misc-tests/dg-test.exp ! 1483515495b ./gcc/testsuite/gcc.misc-tests/dhry.c ! 1824463967b ./gcc/testsuite/gcc.misc-tests/dhry.exp ! 208907585b ./gcc/testsuite/gcc.misc-tests/dhry.h ! 779830061b ./gcc/testsuite/gcc.misc-tests/gcov-1.c ! 3193043874b ./gcc/testsuite/gcc.misc-tests/gcov-2.c ! 4211514085b ./gcc/testsuite/gcc.misc-tests/gcov-3.c ! 527032712b ./gcc/testsuite/gcc.misc-tests/gcov-4b.c ! 3346981345b ./gcc/testsuite/gcc.misc-tests/gcov-4b.x ! 3919110722b ./gcc/testsuite/gcc.misc-tests/gcov-4.c ! 695277662b ./gcc/testsuite/gcc.misc-tests/gcov-5b.c ! 3346981345b ./gcc/testsuite/gcc.misc-tests/gcov-5b.x ! 790797496b ./gcc/testsuite/gcc.misc-tests/gcov-6.c ! 2262587727b ./gcc/testsuite/gcc.misc-tests/gcov-6.x ! 2647301947b ./gcc/testsuite/gcc.misc-tests/gcov-7.c ! 2262587727b ./gcc/testsuite/gcc.misc-tests/gcov-7.x ! 1143513930b ./gcc/testsuite/gcc.misc-tests/gcov-8.c ! 3346981345b ./gcc/testsuite/gcc.misc-tests/gcov-8.x ! 283921131b ./gcc/testsuite/gcc.misc-tests/gcov.exp ! 1258478426b ./gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c ! 3346801828b ./gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c ! 2266643451b ./gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c ! 2697809529b ./gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c ! 2256410310b ./gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ! 3414573605b ./gcc/testsuite/gcc.misc-tests/linkage.exp ! 2071381157b ./gcc/testsuite/gcc.misc-tests/linkage-x.c ! 3975807378b ./gcc/testsuite/gcc.misc-tests/linkage-y.c ! 2874350784b ./gcc/testsuite/gcc.misc-tests/matrix1.c ! 1686589144b ./gcc/testsuite/gcc.misc-tests/matrix1.exp ! 1813429392b ./gcc/testsuite/gcc.misc-tests/mg.c ! 1868251641b ./gcc/testsuite/gcc.misc-tests/mg.exp ! 1983153897b ./gcc/testsuite/gcc.misc-tests/sieve.c ! 3220093576b ./gcc/testsuite/gcc.misc-tests/sieve.exp ! 4235385594b ./gcc/testsuite/gcc.misc-tests/sort2.c ! 232815709b ./gcc/testsuite/gcc.misc-tests/sort2.exp 885716516b ./gcc/testsuite/g++.dg/abi/bitfield1.C 479436735b ./gcc/testsuite/g++.dg/abi/bitfield2.C 3225280346b ./gcc/testsuite/g++.dg/abi/bitfield3.C + 3573884716b ./gcc/testsuite/g++.dg/abi/bitfield4.C 1735502164b ./gcc/testsuite/g++.dg/abi/bitfield5.C + 1670527710b ./gcc/testsuite/g++.dg/abi/bitfield6.C + 2005829177b ./gcc/testsuite/g++.dg/abi/bitfield7.C + 322593750b ./gcc/testsuite/g++.dg/abi/bitfield8.C 1982376149b ./gcc/testsuite/g++.dg/abi/dcast1.C + 3301540330b ./gcc/testsuite/g++.dg/abi/dtor1.C + 2496676742b ./gcc/testsuite/g++.dg/abi/dtor2.C + 142826662b ./gcc/testsuite/g++.dg/abi/empty10.C + 1320651041b ./gcc/testsuite/g++.dg/abi/empty11.C 257517025b ./gcc/testsuite/g++.dg/abi/empty4.C + 328693286b ./gcc/testsuite/g++.dg/abi/empty5.C + 1399395569b ./gcc/testsuite/g++.dg/abi/empty6.C + 2279834179b ./gcc/testsuite/g++.dg/abi/empty7.C + 4289120352b ./gcc/testsuite/g++.dg/abi/empty8.C + 1897807123b ./gcc/testsuite/g++.dg/abi/empty9.C 2703592525b ./gcc/testsuite/g++.dg/abi/enum1.C 3235702061b ./gcc/testsuite/g++.dg/abi/layout1.C 4006829604b ./gcc/testsuite/g++.dg/abi/layout2.C ! 2837496529b ./gcc/testsuite/g++.dg/abi/mangle10.C 2689331463b ./gcc/testsuite/g++.dg/abi/mangle11.C + 474126595b ./gcc/testsuite/g++.dg/abi/mangle12.C + 3802000507b ./gcc/testsuite/g++.dg/abi/mangle13.C 356153643b ./gcc/testsuite/g++.dg/abi/mangle14.C + 1951189959b ./gcc/testsuite/g++.dg/abi/mangle15.C + 1089567105b ./gcc/testsuite/g++.dg/abi/mangle16.C 238964482b ./gcc/testsuite/g++.dg/abi/mangle17.C + 4166781498b ./gcc/testsuite/g++.dg/abi/mangle1.C 4182318030b ./gcc/testsuite/g++.dg/abi/mangle2.C 1755377648b ./gcc/testsuite/g++.dg/abi/mangle3.C 3981957296b ./gcc/testsuite/g++.dg/abi/mangle4.C 4052214936b ./gcc/testsuite/g++.dg/abi/mangle5.C ! 3727057722b ./gcc/testsuite/g++.dg/abi/mangle6.C 1724007624b ./gcc/testsuite/g++.dg/abi/mangle7.C 638258652b ./gcc/testsuite/g++.dg/abi/mangle8.C ! 2294200659b ./gcc/testsuite/g++.dg/abi/mangle9.C ! 55273850b ./gcc/testsuite/g++.dg/abi/offsetof.C 2141080121b ./gcc/testsuite/g++.dg/abi/rtti1.C ! 1349504570b ./gcc/testsuite/g++.dg/abi/rtti2.C ! 1357550525b ./gcc/testsuite/g++.dg/abi/thunk1.C ! 3595051525b ./gcc/testsuite/g++.dg/abi/thunk2.C ! 1623099683b ./gcc/testsuite/g++.dg/abi/vague1.C 1053392201b ./gcc/testsuite/g++.dg/abi/vbase10.C + 2404487712b ./gcc/testsuite/g++.dg/abi/vbase11.C + 2029294780b ./gcc/testsuite/g++.dg/abi/vbase12.C + 4079748467b ./gcc/testsuite/g++.dg/abi/vbase13.C + 226292728b ./gcc/testsuite/g++.dg/abi/vbase14.C + 20126271b ./gcc/testsuite/g++.dg/abi/vbase1.C 1286609512b ./gcc/testsuite/g++.dg/abi/vbase8-10.C 3227029100b ./gcc/testsuite/g++.dg/abi/vbase8-21.C 1921427599b ./gcc/testsuite/g++.dg/abi/vbase8-22.C 3728366429b ./gcc/testsuite/g++.dg/abi/vbase8-4.C 2997752155b ./gcc/testsuite/g++.dg/abi/vbase9.C + 834995686b ./gcc/testsuite/g++.dg/abi/vcall1.C 4073115738b ./gcc/testsuite/g++.dg/abi/vthunk1.C + 3217590870b ./gcc/testsuite/g++.dg/abi/vthunk2.C + 1213210024b ./gcc/testsuite/g++.dg/abi/vthunk3.C + 4162087753b ./gcc/testsuite/g++.dg/abi/vtt1.C + 2214309330b ./gcc/testsuite/g++.dg/bprob/bprob.exp + 3840814444b ./gcc/testsuite/g++.dg/bprob/g++-bprob-1.C + 415593691b ./gcc/testsuite/g++.dg/compat/abi/bitfield1.h + 3285208737b ./gcc/testsuite/g++.dg/compat/abi/bitfield1_main.C + 2521538733b ./gcc/testsuite/g++.dg/compat/abi/bitfield1_x.C + 1617626167b ./gcc/testsuite/g++.dg/compat/abi/bitfield1_y.C + 415593691b ./gcc/testsuite/g++.dg/compat/abi/bitfield2.h + 79323412b ./gcc/testsuite/g++.dg/compat/abi/bitfield2_main.C + 2521538733b ./gcc/testsuite/g++.dg/compat/abi/bitfield2_x.C + 3987149202b ./gcc/testsuite/g++.dg/compat/abi/bitfield2_y.C + 3517265975b ./gcc/testsuite/g++.dg/compat/abi/vbase8-10.h + 627878719b ./gcc/testsuite/g++.dg/compat/abi/vbase8-10_main.C + 2131331501b ./gcc/testsuite/g++.dg/compat/abi/vbase8-10_x.C + 3213998231b ./gcc/testsuite/g++.dg/compat/abi/vbase8-10_y.C + 1957960951b ./gcc/testsuite/g++.dg/compat/abi/vbase8-21.h + 2095552513b ./gcc/testsuite/g++.dg/compat/abi/vbase8-21_main.C + 1058121890b ./gcc/testsuite/g++.dg/compat/abi/vbase8-21_x.C + 2319283842b ./gcc/testsuite/g++.dg/compat/abi/vbase8-21_y.C + 304780406b ./gcc/testsuite/g++.dg/compat/abi/vbase8-22.h + 286941353b ./gcc/testsuite/g++.dg/compat/abi/vbase8-22_main.C + 3357792196b ./gcc/testsuite/g++.dg/compat/abi/vbase8-22_x.C + 4081180845b ./gcc/testsuite/g++.dg/compat/abi/vbase8-22_y.C + 1032810751b ./gcc/testsuite/g++.dg/compat/abi/vbase8-4.h + 157448015b ./gcc/testsuite/g++.dg/compat/abi/vbase8-4_main.C + 2816167507b ./gcc/testsuite/g++.dg/compat/abi/vbase8-4_x.C + 2498065892b ./gcc/testsuite/g++.dg/compat/abi/vbase8-4_y.C + 851022786b ./gcc/testsuite/g++.dg/compat/break/bitfield5.h + 3382847079b ./gcc/testsuite/g++.dg/compat/break/bitfield5_main.C + 4010281072b ./gcc/testsuite/g++.dg/compat/break/bitfield5_x.C + 1749481402b ./gcc/testsuite/g++.dg/compat/break/bitfield5_y.C + 2810451222b ./gcc/testsuite/g++.dg/compat/break/bitfield7.h + 1087109754b ./gcc/testsuite/g++.dg/compat/break/bitfield7_main.C + 3907692842b ./gcc/testsuite/g++.dg/compat/break/bitfield7_x.C + 2492209559b ./gcc/testsuite/g++.dg/compat/break/bitfield7_y.C + 35335525b ./gcc/testsuite/g++.dg/compat/break/empty6.h + 1403945939b ./gcc/testsuite/g++.dg/compat/break/empty6_main.C + 2235201715b ./gcc/testsuite/g++.dg/compat/break/empty6_x.C + 2853656504b ./gcc/testsuite/g++.dg/compat/break/empty6_y.C + 625329130b ./gcc/testsuite/g++.dg/compat/break/README + 1505598993b ./gcc/testsuite/g++.dg/compat/break/vbase10.h + 876834152b ./gcc/testsuite/g++.dg/compat/break/vbase10_main.C + 543758759b ./gcc/testsuite/g++.dg/compat/break/vbase10_x.C + 1536907374b ./gcc/testsuite/g++.dg/compat/break/vbase10_y.C + 2606505810b ./gcc/testsuite/g++.dg/compat/break/vbase11.h + 3899670955b ./gcc/testsuite/g++.dg/compat/break/vbase11_main.C + 4215640460b ./gcc/testsuite/g++.dg/compat/break/vbase11_x.C + 1103240193b ./gcc/testsuite/g++.dg/compat/break/vbase11_y.C + 843537723b ./gcc/testsuite/g++.dg/compat/compat.exp + 9647296b ./gcc/testsuite/g++.dg/compat/eh/ctor1.h + 4283968160b ./gcc/testsuite/g++.dg/compat/eh/ctor1_main.C + 3991621866b ./gcc/testsuite/g++.dg/compat/eh/ctor1_x.C + 54717223b ./gcc/testsuite/g++.dg/compat/eh/ctor1_y.C + 2070076990b ./gcc/testsuite/g++.dg/compat/eh/ctor2.h + 3602575005b ./gcc/testsuite/g++.dg/compat/eh/ctor2_main.C + 4247965299b ./gcc/testsuite/g++.dg/compat/eh/ctor2_x.C + 4272673664b ./gcc/testsuite/g++.dg/compat/eh/ctor2_y.C + 3919283161b ./gcc/testsuite/g++.dg/compat/eh/dtor1.h + 1402256585b ./gcc/testsuite/g++.dg/compat/eh/dtor1_main.C + 4076310662b ./gcc/testsuite/g++.dg/compat/eh/dtor1_x.C + 4142268013b ./gcc/testsuite/g++.dg/compat/eh/dtor1_y.C + 2762061085b ./gcc/testsuite/g++.dg/compat/eh/filter1.h + 1389288622b ./gcc/testsuite/g++.dg/compat/eh/filter1_main.C + 4104395228b ./gcc/testsuite/g++.dg/compat/eh/filter1_x.C + 449957020b ./gcc/testsuite/g++.dg/compat/eh/filter1_y.C + 2851584531b ./gcc/testsuite/g++.dg/compat/eh/filter2_main.C + 2917722437b ./gcc/testsuite/g++.dg/compat/eh/filter2_x.C + 2852631811b ./gcc/testsuite/g++.dg/compat/eh/filter2_y.C + 3790463378b ./gcc/testsuite/g++.dg/compat/eh/new1_main.C + 3888335722b ./gcc/testsuite/g++.dg/compat/eh/new1_x.C + 3545321257b ./gcc/testsuite/g++.dg/compat/eh/new1_y.C + 3262594805b ./gcc/testsuite/g++.dg/compat/eh/nrv1.h + 2686465250b ./gcc/testsuite/g++.dg/compat/eh/nrv1_main.C + 1998957168b ./gcc/testsuite/g++.dg/compat/eh/nrv1_x.C + 3548302549b ./gcc/testsuite/g++.dg/compat/eh/nrv1_y.C + 456479067b ./gcc/testsuite/g++.dg/compat/eh/spec3.h + 3425184913b ./gcc/testsuite/g++.dg/compat/eh/spec3_main.C + 2907643165b ./gcc/testsuite/g++.dg/compat/eh/spec3_x.C + 1649662926b ./gcc/testsuite/g++.dg/compat/eh/spec3_y.C + 2026147729b ./gcc/testsuite/g++.dg/compat/eh/template1.h + 3066390483b ./gcc/testsuite/g++.dg/compat/eh/template1_main.C + 2349281669b ./gcc/testsuite/g++.dg/compat/eh/template1_x.C + 2756081665b ./gcc/testsuite/g++.dg/compat/eh/template1_y.C + 3063025764b ./gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C + 1227706169b ./gcc/testsuite/g++.dg/compat/eh/unexpected1_x.C + 3443435783b ./gcc/testsuite/g++.dg/compat/eh/unexpected1_y.C + 2729053113b ./gcc/testsuite/g++.dg/compat/init/array5_main.C + 337915618b ./gcc/testsuite/g++.dg/compat/init/array5_x.C + 2666882815b ./gcc/testsuite/g++.dg/compat/init/array5_y.C + 438507150b ./gcc/testsuite/g++.dg/compat/init/byval1.h + 1482342731b ./gcc/testsuite/g++.dg/compat/init/byval1_main.C + 1790767386b ./gcc/testsuite/g++.dg/compat/init/byval1_x.C + 1219389063b ./gcc/testsuite/g++.dg/compat/init/byval1_y.C + 3646748329b ./gcc/testsuite/g++.dg/compat/init/dtor1.h + 3173579574b ./gcc/testsuite/g++.dg/compat/init/dtor1_main.C + 922358224b ./gcc/testsuite/g++.dg/compat/init/dtor1_x.C + 3976430680b ./gcc/testsuite/g++.dg/compat/init/dtor1_y.C + 2103024322b ./gcc/testsuite/g++.dg/compat/init/elide1.h + 540001212b ./gcc/testsuite/g++.dg/compat/init/elide1_main.C + 113379117b ./gcc/testsuite/g++.dg/compat/init/elide1_x.C + 1225077760b ./gcc/testsuite/g++.dg/compat/init/elide1_y.C + 2514230221b ./gcc/testsuite/g++.dg/compat/init/init-ref2_main.C + 700720258b ./gcc/testsuite/g++.dg/compat/init/init-ref2_x.C + 2301277977b ./gcc/testsuite/g++.dg/compat/init/init-ref2_y.C 2365486838b ./gcc/testsuite/g++.dg/conversion/to-virtual-base-1.C ! 1689064567b ./gcc/testsuite/g++.dg/cpp/c++98.C ! 3896968797b ./gcc/testsuite/g++.dg/cpp/c++98-pedantic.C ! 1514119316b ./gcc/testsuite/g++.dg/cpp/c++_cmd_1.C ! 1270735553b ./gcc/testsuite/g++.dg/cpp/c++_cmd_1.h ! 1307638268b ./gcc/testsuite/g++.dg/debug/const1.C 1740237496b ./gcc/testsuite/g++.dg/debug/debug1.C 1473360233b ./gcc/testsuite/g++.dg/debug/debug2.C 4057306503b ./gcc/testsuite/g++.dg/debug/debug3.C *************** *** 5150,5186 **** 2101587412b ./gcc/testsuite/g++.dg/debug/debug5.C 2910185760b ./gcc/testsuite/g++.dg/debug/debug6.C 2476891002b ./gcc/testsuite/g++.dg/debug/debug7.C 1865154101b ./gcc/testsuite/g++.dg/debug/trivial.C ! 2006018373b ./gcc/testsuite/g++.dg/dg.exp ! 65538524b ./gcc/testsuite/g++.dg/eh/ctor1.C 3380022165b ./gcc/testsuite/g++.dg/eh/dead1.C ! 2307599878b ./gcc/testsuite/g++.dg/eh/dtor1.C 3289569863b ./gcc/testsuite/g++.dg/eh/filter1.C 1460645953b ./gcc/testsuite/g++.dg/eh/filter2.C 507841710b ./gcc/testsuite/g++.dg/eh/loop1.C 4035633334b ./gcc/testsuite/g++.dg/eh/omit-frame-pointer.C 1888049158b ./gcc/testsuite/g++.dg/eh/registers1.C 2204781248b ./gcc/testsuite/g++.dg/eh/spec1.C 985744667b ./gcc/testsuite/g++.dg/eh/synth1.C 2213107508b ./gcc/testsuite/g++.dg/eh/template1.C 3379396295b ./gcc/testsuite/g++.dg/eh/template2.C 1789254796b ./gcc/testsuite/g++.dg/eh/unexpected1.C 880147168b ./gcc/testsuite/g++.dg/expr/cond1.C 10818138b ./gcc/testsuite/g++.dg/ext/align1.C 4214519942b ./gcc/testsuite/g++.dg/ext/attrib1.C 2242814507b ./gcc/testsuite/g++.dg/ext/attrib2.C 2606851845b ./gcc/testsuite/g++.dg/ext/attrib3.C 3822844850b ./gcc/testsuite/g++.dg/ext/attrib4.C ! 783893625b ./gcc/testsuite/g++.dg/ext/attrib5.C 2703749043b ./gcc/testsuite/g++.dg/ext/conv1.C 4165742225b ./gcc/testsuite/g++.dg/ext/forscope1.C 4019239529b ./gcc/testsuite/g++.dg/ext/forscope2.C 2832497986b ./gcc/testsuite/g++.dg/ext/instantiate1.C 1033795910b ./gcc/testsuite/g++.dg/ext/instantiate2.C 631460058b ./gcc/testsuite/g++.dg/ext/instantiate3.C 433892339b ./gcc/testsuite/g++.dg/ext/lvalue1.C 1212185861b ./gcc/testsuite/g++.dg/ext/max.C 1765466377b ./gcc/testsuite/g++.dg/ext/member-attr.C 714299152b ./gcc/testsuite/g++.dg/ext/typedef-init.C 3028501104b ./gcc/testsuite/g++.dg/ext/typeof1.C 2139267109b ./gcc/testsuite/g++.dg/ext/typeof2.C --- 7835,7904 ---- 2101587412b ./gcc/testsuite/g++.dg/debug/debug5.C 2910185760b ./gcc/testsuite/g++.dg/debug/debug6.C 2476891002b ./gcc/testsuite/g++.dg/debug/debug7.C + 1949293295b ./gcc/testsuite/g++.dg/debug/debug.exp + 2055774645b ./gcc/testsuite/g++.dg/debug/template1.C 1865154101b ./gcc/testsuite/g++.dg/debug/trivial.C ! 168898824b ./gcc/testsuite/g++.dg/debug/typedef1.C ! 3959371868b ./gcc/testsuite/g++.dg/dg.exp ! 2975391044b ./gcc/testsuite/g++.dg/eh/cleanup1.C ! 3604468645b ./gcc/testsuite/g++.dg/eh/ctor1.C ! 2992503335b ./gcc/testsuite/g++.dg/eh/ctor2.C 3380022165b ./gcc/testsuite/g++.dg/eh/dead1.C ! 2869281563b ./gcc/testsuite/g++.dg/eh/dtor1.C 3289569863b ./gcc/testsuite/g++.dg/eh/filter1.C 1460645953b ./gcc/testsuite/g++.dg/eh/filter2.C + 2708159744b ./gcc/testsuite/g++.dg/eh/forced1.C + 2542074308b ./gcc/testsuite/g++.dg/eh/forced2.C + 1420734044b ./gcc/testsuite/g++.dg/eh/forced3.C + 719445067b ./gcc/testsuite/g++.dg/eh/forced4.C 507841710b ./gcc/testsuite/g++.dg/eh/loop1.C + 521012641b ./gcc/testsuite/g++.dg/eh/new1.C + 1328551622b ./gcc/testsuite/g++.dg/eh/nrv1.C 4035633334b ./gcc/testsuite/g++.dg/eh/omit-frame-pointer.C 1888049158b ./gcc/testsuite/g++.dg/eh/registers1.C 2204781248b ./gcc/testsuite/g++.dg/eh/spec1.C + 2120952916b ./gcc/testsuite/g++.dg/eh/spec2.C + 2349477469b ./gcc/testsuite/g++.dg/eh/spec3.C + 3033653832b ./gcc/testsuite/g++.dg/eh/spec4.C + 1384086633b ./gcc/testsuite/g++.dg/eh/spec5.C + 292797123b ./gcc/testsuite/g++.dg/eh/spec6.C + 2126977935b ./gcc/testsuite/g++.dg/eh/stabilize.C 985744667b ./gcc/testsuite/g++.dg/eh/synth1.C 2213107508b ./gcc/testsuite/g++.dg/eh/template1.C 3379396295b ./gcc/testsuite/g++.dg/eh/template2.C 1789254796b ./gcc/testsuite/g++.dg/eh/unexpected1.C 880147168b ./gcc/testsuite/g++.dg/expr/cond1.C + 3467644215b ./gcc/testsuite/g++.dg/expr/dtor1.C + 1191085278b ./gcc/testsuite/g++.dg/expr/member-of-incomplete-type-1.C + 1950665048b ./gcc/testsuite/g++.dg/expr/pmf-1.C 10818138b ./gcc/testsuite/g++.dg/ext/align1.C + 161719849b ./gcc/testsuite/g++.dg/ext/alignof1.C + 1838999152b ./gcc/testsuite/g++.dg/ext/anon-struct1.C + 1653326846b ./gcc/testsuite/g++.dg/ext/anon-struct2.C + 1772814405b ./gcc/testsuite/g++.dg/ext/anon-struct3.C + 592156091b ./gcc/testsuite/g++.dg/ext/asm1.C + 1156093599b ./gcc/testsuite/g++.dg/ext/asm2.C + 134974628b ./gcc/testsuite/g++.dg/ext/asm3.C 4214519942b ./gcc/testsuite/g++.dg/ext/attrib1.C 2242814507b ./gcc/testsuite/g++.dg/ext/attrib2.C 2606851845b ./gcc/testsuite/g++.dg/ext/attrib3.C 3822844850b ./gcc/testsuite/g++.dg/ext/attrib4.C ! 3467041206b ./gcc/testsuite/g++.dg/ext/attrib5.C ! 2936155890b ./gcc/testsuite/g++.dg/ext/attrib6.C 2703749043b ./gcc/testsuite/g++.dg/ext/conv1.C + 3998238765b ./gcc/testsuite/g++.dg/ext/desig1.C + 2083191939b ./gcc/testsuite/g++.dg/ext/dllimport1.C 4165742225b ./gcc/testsuite/g++.dg/ext/forscope1.C 4019239529b ./gcc/testsuite/g++.dg/ext/forscope2.C 2832497986b ./gcc/testsuite/g++.dg/ext/instantiate1.C 1033795910b ./gcc/testsuite/g++.dg/ext/instantiate2.C 631460058b ./gcc/testsuite/g++.dg/ext/instantiate3.C + 1209979358b ./gcc/testsuite/g++.dg/ext/lvaddr.C 433892339b ./gcc/testsuite/g++.dg/ext/lvalue1.C + 100634646b ./gcc/testsuite/g++.dg/ext/lvcast.C 1212185861b ./gcc/testsuite/g++.dg/ext/max.C 1765466377b ./gcc/testsuite/g++.dg/ext/member-attr.C + 143199088b ./gcc/testsuite/g++.dg/ext/oper1.C 714299152b ./gcc/testsuite/g++.dg/ext/typedef-init.C 3028501104b ./gcc/testsuite/g++.dg/ext/typeof1.C 2139267109b ./gcc/testsuite/g++.dg/ext/typeof2.C *************** *** 5189,5223 **** 3384117993b ./gcc/testsuite/g++.dg/ext/vla1.C 4261072225b ./gcc/testsuite/g++.dg/ext/vlm1.C 546216042b ./gcc/testsuite/g++.dg/ext/vlm2.C 2576905511b ./gcc/testsuite/g++.dg/inherit/access1.C ! 3833575012b ./gcc/testsuite/g++.dg/inherit/access2.C 3439912284b ./gcc/testsuite/g++.dg/inherit/base1.C ! 2309234518b ./gcc/testsuite/g++.dg/inherit/namespace-as-base.C 4167951109b ./gcc/testsuite/g++.dg/inherit/null1.C 2075297623b ./gcc/testsuite/g++.dg/inherit/typedef1.C 3091040169b ./gcc/testsuite/g++.dg/inherit/typeinfo1.C 3799679971b ./gcc/testsuite/g++.dg/inherit/using1.C 2391219706b ./gcc/testsuite/g++.dg/inherit/using3.C ! 3967911027b ./gcc/testsuite/g++.dg/init/array1.C 3157994593b ./gcc/testsuite/g++.dg/init/array2.C 2628461993b ./gcc/testsuite/g++.dg/init/array4.C 267149531b ./gcc/testsuite/g++.dg/init/array5.C 3220934948b ./gcc/testsuite/g++.dg/init/array7.C 486682064b ./gcc/testsuite/g++.dg/init/copy1.C 1741245578b ./gcc/testsuite/g++.dg/init/dtor1.C 356489409b ./gcc/testsuite/g++.dg/init/dtor2.C 486760656b ./gcc/testsuite/g++.dg/init/elide1.C 2797496870b ./gcc/testsuite/g++.dg/init/empty1.C 2640181867b ./gcc/testsuite/g++.dg/init/init-ref1.C 3275947242b ./gcc/testsuite/g++.dg/init/init-ref2.C 1678560039b ./gcc/testsuite/g++.dg/init/new1.C 4033502091b ./gcc/testsuite/g++.dg/init/new2.C ! 1385694165b ./gcc/testsuite/g++.dg/init/pm1.C 710300032b ./gcc/testsuite/g++.dg/init/string1.C 766167426b ./gcc/testsuite/g++.dg/lookup/pretty1.C 684033142b ./gcc/testsuite/g++.dg/lookup/struct1.C ! 3384907788b ./gcc/testsuite/g++.dg/lookup/using.C 2782357448b ./gcc/testsuite/g++.dg/lookup/using2.C 421486798b ./gcc/testsuite/g++.dg/opt/alias1.C 3198583204b ./gcc/testsuite/g++.dg/opt/alias2.C 1878509122b ./gcc/testsuite/g++.dg/opt/anonunion1.C --- 7907,7996 ---- 3384117993b ./gcc/testsuite/g++.dg/ext/vla1.C 4261072225b ./gcc/testsuite/g++.dg/ext/vlm1.C 546216042b ./gcc/testsuite/g++.dg/ext/vlm2.C + 3564027846b ./gcc/testsuite/g++.dg/gcov/gcov-1.C + 3346981345b ./gcc/testsuite/g++.dg/gcov/gcov-1.x + 960723802b ./gcc/testsuite/g++.dg/gcov/gcov-2.C + 1254266122b ./gcc/testsuite/g++.dg/gcov/gcov-3.C + 2398234830b ./gcc/testsuite/g++.dg/gcov/gcov-3.h + 2567019724b ./gcc/testsuite/g++.dg/gcov/gcov.exp 2576905511b ./gcc/testsuite/g++.dg/inherit/access1.C ! 4162179820b ./gcc/testsuite/g++.dg/inherit/access2.C ! 3170353070b ./gcc/testsuite/g++.dg/inherit/access3.C 3439912284b ./gcc/testsuite/g++.dg/inherit/base1.C ! 3472745263b ./gcc/testsuite/g++.dg/inherit/cond1.C ! 3404023551b ./gcc/testsuite/g++.dg/inherit/covariant1.C ! 2543191854b ./gcc/testsuite/g++.dg/inherit/namespace-as-base.C 4167951109b ./gcc/testsuite/g++.dg/inherit/null1.C + 2478211972b ./gcc/testsuite/g++.dg/inherit/operator1.C + 413899805b ./gcc/testsuite/g++.dg/inherit/override1.C + 285424903b ./gcc/testsuite/g++.dg/inherit/template-as-base.C + 3055716699b ./gcc/testsuite/g++.dg/inherit/thunk1.C 2075297623b ./gcc/testsuite/g++.dg/inherit/typedef1.C 3091040169b ./gcc/testsuite/g++.dg/inherit/typeinfo1.C 3799679971b ./gcc/testsuite/g++.dg/inherit/using1.C + 1969352845b ./gcc/testsuite/g++.dg/inherit/using2.C 2391219706b ./gcc/testsuite/g++.dg/inherit/using3.C ! 1997208530b ./gcc/testsuite/g++.dg/init/addr-const1.C ! 1409346264b ./gcc/testsuite/g++.dg/init/aggr1.C ! 4149172890b ./gcc/testsuite/g++.dg/init/array1.C 3157994593b ./gcc/testsuite/g++.dg/init/array2.C + 3175368870b ./gcc/testsuite/g++.dg/init/array3.C 2628461993b ./gcc/testsuite/g++.dg/init/array4.C 267149531b ./gcc/testsuite/g++.dg/init/array5.C + 976499184b ./gcc/testsuite/g++.dg/init/array6.C 3220934948b ./gcc/testsuite/g++.dg/init/array7.C + 4270004926b ./gcc/testsuite/g++.dg/init/array8.C + 1774664391b ./gcc/testsuite/g++.dg/init/brace1.C + 221803890b ./gcc/testsuite/g++.dg/init/brace2.C + 3426337891b ./gcc/testsuite/g++.dg/init/brace3.C + 2757943207b ./gcc/testsuite/g++.dg/init/byval1.C 486682064b ./gcc/testsuite/g++.dg/init/copy1.C + 3207175535b ./gcc/testsuite/g++.dg/init/copy2.C + 2507646036b ./gcc/testsuite/g++.dg/init/copy3.C + 1144691903b ./gcc/testsuite/g++.dg/init/ctor1.C + 163984973b ./gcc/testsuite/g++.dg/init/ctor2.C 1741245578b ./gcc/testsuite/g++.dg/init/dtor1.C 356489409b ./gcc/testsuite/g++.dg/init/dtor2.C 486760656b ./gcc/testsuite/g++.dg/init/elide1.C + 1224647881b ./gcc/testsuite/g++.dg/init/elide2.C 2797496870b ./gcc/testsuite/g++.dg/init/empty1.C 2640181867b ./gcc/testsuite/g++.dg/init/init-ref1.C 3275947242b ./gcc/testsuite/g++.dg/init/init-ref2.C + 522523166b ./gcc/testsuite/g++.dg/init/init-ref3.C 1678560039b ./gcc/testsuite/g++.dg/init/new1.C 4033502091b ./gcc/testsuite/g++.dg/init/new2.C ! 2049519489b ./gcc/testsuite/g++.dg/init/new4.C ! 2065836625b ./gcc/testsuite/g++.dg/init/new5.C ! 3584312984b ./gcc/testsuite/g++.dg/init/new6.C ! 2240525756b ./gcc/testsuite/g++.dg/init/new7.C ! 1015198831b ./gcc/testsuite/g++.dg/init/pm1.C ! 1446834658b ./gcc/testsuite/g++.dg/init/pm2.C ! 3206400652b ./gcc/testsuite/g++.dg/init/ref1.C ! 1135829210b ./gcc/testsuite/g++.dg/init/ref2.C ! 550201609b ./gcc/testsuite/g++.dg/init/ref3.C ! 327983634b ./gcc/testsuite/g++.dg/init/ref5.C ! 4081692652b ./gcc/testsuite/g++.dg/init/ref6.C 710300032b ./gcc/testsuite/g++.dg/init/string1.C + 4082145348b ./gcc/testsuite/g++.dg/lookup/anon1.C + 3674515572b ./gcc/testsuite/g++.dg/lookup/anon2.C + 4033472976b ./gcc/testsuite/g++.dg/lookup/class-member-1.C + 1330806914b ./gcc/testsuite/g++.dg/lookup/class-member-2.C + 482911816b ./gcc/testsuite/g++.dg/lookup/decl1.C + 2431415658b ./gcc/testsuite/g++.dg/lookup/decl2.C + 3146359413b ./gcc/testsuite/g++.dg/lookup/delete1.C + 3013908110b ./gcc/testsuite/g++.dg/lookup/disamb1.C + 1698581993b ./gcc/testsuite/g++.dg/lookup/forscope1.C + 3727433793b ./gcc/testsuite/g++.dg/lookup/friend1.C 766167426b ./gcc/testsuite/g++.dg/lookup/pretty1.C + 1562081572b ./gcc/testsuite/g++.dg/lookup/ptrmem1.C + 2693929767b ./gcc/testsuite/g++.dg/lookup/scoped1.C + 2858733655b ./gcc/testsuite/g++.dg/lookup/scoped2.C + 586524310b ./gcc/testsuite/g++.dg/lookup/scoped3.C 684033142b ./gcc/testsuite/g++.dg/lookup/struct1.C ! 3591679318b ./gcc/testsuite/g++.dg/lookup/struct-hack1.C ! 4222767496b ./gcc/testsuite/g++.dg/lookup/template1.C 2782357448b ./gcc/testsuite/g++.dg/lookup/using2.C + 3384907788b ./gcc/testsuite/g++.dg/lookup/using.C 421486798b ./gcc/testsuite/g++.dg/opt/alias1.C 3198583204b ./gcc/testsuite/g++.dg/opt/alias2.C 1878509122b ./gcc/testsuite/g++.dg/opt/anonunion1.C *************** *** 5238,5341 **** 2026702440b ./gcc/testsuite/g++.dg/opt/mmx1.C 2857034604b ./gcc/testsuite/g++.dg/opt/nrv1.C 2448700667b ./gcc/testsuite/g++.dg/opt/nrv2.C 442892442b ./gcc/testsuite/g++.dg/opt/preinc1.C 1496969096b ./gcc/testsuite/g++.dg/opt/ptrintsum1.C 571185401b ./gcc/testsuite/g++.dg/opt/reg-stack.C 1557651694b ./gcc/testsuite/g++.dg/opt/reload1.C - 2822399311b ./gcc/testsuite/g++.dg/opt/reload2.C - 2874679179b ./gcc/testsuite/g++.dg/opt/rtti1.C 1124740865b ./gcc/testsuite/g++.dg/opt/static1.C 684782459b ./gcc/testsuite/g++.dg/opt/static2.C 4154721541b ./gcc/testsuite/g++.dg/opt/thunk1.C 4029726050b ./gcc/testsuite/g++.dg/opt/vt1.C - 135165742b ./gcc/testsuite/g++.dg/opt/vtgc1.C 686527483b ./gcc/testsuite/g++.dg/other/access1.C 681497421b ./gcc/testsuite/g++.dg/other/anon-struct.C 1585173858b ./gcc/testsuite/g++.dg/other/anon-union.C - 3285252373b ./gcc/testsuite/g++.dg/other/anon2.C 1233509973b ./gcc/testsuite/g++.dg/other/array1.C 2359273471b ./gcc/testsuite/g++.dg/other/big-struct.C 2708764484b ./gcc/testsuite/g++.dg/other/classkey1.C 867943500b ./gcc/testsuite/g++.dg/other/component1.C 4045861590b ./gcc/testsuite/g++.dg/other/const1.C 109747091b ./gcc/testsuite/g++.dg/other/const2.C 3254620469b ./gcc/testsuite/g++.dg/other/copy1.C 4162972212b ./gcc/testsuite/g++.dg/other/cxa-atexit1.C ! 1287592684b ./gcc/testsuite/g++.dg/other/deprecated.C ! 1127806654b ./gcc/testsuite/g++.dg/other/enum1.C ! 3062339491b ./gcc/testsuite/g++.dg/other/error1.C 4222650217b ./gcc/testsuite/g++.dg/other/error2.C 490611048b ./gcc/testsuite/g++.dg/other/error3.C - 2120952916b ./gcc/testsuite/g++.dg/other/exception-specification.C - 1698581993b ./gcc/testsuite/g++.dg/other/forscope1.C 2764746133b ./gcc/testsuite/g++.dg/other/friend1.C 2377020172b ./gcc/testsuite/g++.dg/other/gc1.C 2096815409b ./gcc/testsuite/g++.dg/other/init1.C 2028368016b ./gcc/testsuite/g++.dg/other/init2.C 2143945221b ./gcc/testsuite/g++.dg/other/linkage1.C 1073045139b ./gcc/testsuite/g++.dg/other/pragma-ep-1.C 198088036b ./gcc/testsuite/g++.dg/other/pragma-re-1.C 1453288357b ./gcc/testsuite/g++.dg/other/ptrmem1.C 392352692b ./gcc/testsuite/g++.dg/other/ptrmem2.C 522786262b ./gcc/testsuite/g++.dg/other/scope1.C 3572380294b ./gcc/testsuite/g++.dg/other/stdarg1.C 873911472b ./gcc/testsuite/g++.dg/other/stdbool-if.C 492684594b ./gcc/testsuite/g++.dg/overload/builtin1.C 3775778165b ./gcc/testsuite/g++.dg/overload/cond1.C 1110519878b ./gcc/testsuite/g++.dg/overload/error1.C 3780752279b ./gcc/testsuite/g++.dg/overload/member2.C 3588815363b ./gcc/testsuite/g++.dg/overload/pmf1.C 1828032968b ./gcc/testsuite/g++.dg/parse/angle-bracket.C 3621016079b ./gcc/testsuite/g++.dg/parse/attr1.C 2532827057b ./gcc/testsuite/g++.dg/parse/decl-specifier-1.C 3454082090b ./gcc/testsuite/g++.dg/parse/friend1.C 849996881b ./gcc/testsuite/g++.dg/parse/inline1.C 1601717576b ./gcc/testsuite/g++.dg/parse/named_ops.C 1189423005b ./gcc/testsuite/g++.dg/parse/parameter-declaration-1.C 4289007099b ./gcc/testsuite/g++.dg/parse/saved1.C 1402579554b ./gcc/testsuite/g++.dg/parse/stmtexpr1.C 2804352074b ./gcc/testsuite/g++.dg/parse/stmtexpr2.C 254645785b ./gcc/testsuite/g++.dg/parse/stmtexpr3.C ! 805014732b ./gcc/testsuite/g++.dg/parse/typedef1.C ! 522523166b ./gcc/testsuite/g++.dg/ref1.C 438642550b ./gcc/testsuite/g++.dg/rtti/crash1.C ! 1942107252b ./gcc/testsuite/g++.dg/sizeof1.C 370035332b ./gcc/testsuite/g++.dg/special/conpr-1.C - 641456338b ./gcc/testsuite/g++.dg/special/conpr-2.C 1217683257b ./gcc/testsuite/g++.dg/special/conpr-2a.C ! 1019201819b ./gcc/testsuite/g++.dg/special/conpr-3.C 3756639268b ./gcc/testsuite/g++.dg/special/conpr-3a.C 3436726377b ./gcc/testsuite/g++.dg/special/conpr-3b.C 908971672b ./gcc/testsuite/g++.dg/special/ecos.exp 2043265187b ./gcc/testsuite/g++.dg/special/initp1.C 3059417569b ./gcc/testsuite/g++.dg/template/access1.C 826296459b ./gcc/testsuite/g++.dg/template/alignof1.C 1168318524b ./gcc/testsuite/g++.dg/template/char1.C 783556741b ./gcc/testsuite/g++.dg/template/complit1.C 2083292273b ./gcc/testsuite/g++.dg/template/copy1.C ! 1072669517b ./gcc/testsuite/g++.dg/template/crash1.C 3504290323b ./gcc/testsuite/g++.dg/template/ctor1.C 184359799b ./gcc/testsuite/g++.dg/template/dtor1.C 1161800603b ./gcc/testsuite/g++.dg/template/explicit-instantiation.C ! 3595433718b ./gcc/testsuite/g++.dg/template/friend.C 2661209683b ./gcc/testsuite/g++.dg/template/friend16.C 3302501697b ./gcc/testsuite/g++.dg/template/friend3.C ! 587931705b ./gcc/testsuite/g++.dg/template/friend4.C 3560434139b ./gcc/testsuite/g++.dg/template/friend5.C 590954347b ./gcc/testsuite/g++.dg/template/friend6.C 3646815886b ./gcc/testsuite/g++.dg/template/friend7.C 438837461b ./gcc/testsuite/g++.dg/template/inherit.C 2872339928b ./gcc/testsuite/g++.dg/template/init-list.C ! 2182099475b ./gcc/testsuite/g++.dg/template/instantiate1.C 416617778b ./gcc/testsuite/g++.dg/template/local1.C ! 1449269044b ./gcc/testsuite/g++.dg/template/member.C 2815776671b ./gcc/testsuite/g++.dg/template/meminit1.C 2073430043b ./gcc/testsuite/g++.dg/template/ntp1.C 188396250b ./gcc/testsuite/g++.dg/template/partial-specialization.C 601175114b ./gcc/testsuite/g++.dg/template/ptrmem1.C 3748090308b ./gcc/testsuite/g++.dg/template/ptrmem2.C 1117759327b ./gcc/testsuite/g++.dg/template/qual1.C - 3125902504b ./gcc/testsuite/g++.dg/template/qualttp1.C 4043559007b ./gcc/testsuite/g++.dg/template/qualttp10.C 265969049b ./gcc/testsuite/g++.dg/template/qualttp11.C 3320116615b ./gcc/testsuite/g++.dg/template/qualttp12.C --- 8011,8187 ---- 2026702440b ./gcc/testsuite/g++.dg/opt/mmx1.C 2857034604b ./gcc/testsuite/g++.dg/opt/nrv1.C 2448700667b ./gcc/testsuite/g++.dg/opt/nrv2.C + 1861389259b ./gcc/testsuite/g++.dg/opt/nrv3.C + 4277884988b ./gcc/testsuite/g++.dg/opt/nrv4.C + 447614414b ./gcc/testsuite/g++.dg/opt/nrv5.C + 3580960284b ./gcc/testsuite/g++.dg/opt/pr6713.C 442892442b ./gcc/testsuite/g++.dg/opt/preinc1.C 1496969096b ./gcc/testsuite/g++.dg/opt/ptrintsum1.C + 1663667381b ./gcc/testsuite/g++.dg/opt/ptrmem1.C + 3284968679b ./gcc/testsuite/g++.dg/opt/ptrmem2.C 571185401b ./gcc/testsuite/g++.dg/opt/reg-stack.C 1557651694b ./gcc/testsuite/g++.dg/opt/reload1.C 1124740865b ./gcc/testsuite/g++.dg/opt/static1.C 684782459b ./gcc/testsuite/g++.dg/opt/static2.C 4154721541b ./gcc/testsuite/g++.dg/opt/thunk1.C 4029726050b ./gcc/testsuite/g++.dg/opt/vt1.C 686527483b ./gcc/testsuite/g++.dg/other/access1.C + 3285252373b ./gcc/testsuite/g++.dg/other/anon2.C 681497421b ./gcc/testsuite/g++.dg/other/anon-struct.C 1585173858b ./gcc/testsuite/g++.dg/other/anon-union.C 1233509973b ./gcc/testsuite/g++.dg/other/array1.C 2359273471b ./gcc/testsuite/g++.dg/other/big-struct.C + 1768430122b ./gcc/testsuite/g++.dg/other/bitfield1.C 2708764484b ./gcc/testsuite/g++.dg/other/classkey1.C 867943500b ./gcc/testsuite/g++.dg/other/component1.C 4045861590b ./gcc/testsuite/g++.dg/other/const1.C 109747091b ./gcc/testsuite/g++.dg/other/const2.C + 16677083b ./gcc/testsuite/g++.dg/other/constref1.C + 3377368091b ./gcc/testsuite/g++.dg/other/constref2.C + 825304846b ./gcc/testsuite/g++.dg/other/conversion1.C 3254620469b ./gcc/testsuite/g++.dg/other/copy1.C + 2255061677b ./gcc/testsuite/g++.dg/other/copy2.C 4162972212b ./gcc/testsuite/g++.dg/other/cxa-atexit1.C ! 1473349538b ./gcc/testsuite/g++.dg/other/do1.C ! 1158109576b ./gcc/testsuite/g++.dg/other/enum1.C ! 4292723259b ./gcc/testsuite/g++.dg/other/error1.C 4222650217b ./gcc/testsuite/g++.dg/other/error2.C 490611048b ./gcc/testsuite/g++.dg/other/error3.C 2764746133b ./gcc/testsuite/g++.dg/other/friend1.C 2377020172b ./gcc/testsuite/g++.dg/other/gc1.C 2096815409b ./gcc/testsuite/g++.dg/other/init1.C 2028368016b ./gcc/testsuite/g++.dg/other/init2.C 2143945221b ./gcc/testsuite/g++.dg/other/linkage1.C + 1678560039b ./gcc/testsuite/g++.dg/other/new1.C + 786983178b ./gcc/testsuite/g++.dg/other/offsetof1.C + 1786437900b ./gcc/testsuite/g++.dg/other/packed1.C 1073045139b ./gcc/testsuite/g++.dg/other/pragma-ep-1.C 198088036b ./gcc/testsuite/g++.dg/other/pragma-re-1.C 1453288357b ./gcc/testsuite/g++.dg/other/ptrmem1.C 392352692b ./gcc/testsuite/g++.dg/other/ptrmem2.C + 2641626507b ./gcc/testsuite/g++.dg/other/ptrmem3.C + 364521749b ./gcc/testsuite/g++.dg/other/ptrmem4.C + 2525094450b ./gcc/testsuite/g++.dg/other/redecl1.C 522786262b ./gcc/testsuite/g++.dg/other/scope1.C + 2007689408b ./gcc/testsuite/g++.dg/other/static11.C 3572380294b ./gcc/testsuite/g++.dg/other/stdarg1.C 873911472b ./gcc/testsuite/g++.dg/other/stdbool-if.C + 1809278557b ./gcc/testsuite/g++.dg/other/warning1.C + 2421396411b ./gcc/testsuite/g++.dg/overload/ambig1.C 492684594b ./gcc/testsuite/g++.dg/overload/builtin1.C + 2593583015b ./gcc/testsuite/g++.dg/overload/builtin2.C 3775778165b ./gcc/testsuite/g++.dg/overload/cond1.C 1110519878b ./gcc/testsuite/g++.dg/overload/error1.C + 1362696676b ./gcc/testsuite/g++.dg/overload/member1.C 3780752279b ./gcc/testsuite/g++.dg/overload/member2.C 3588815363b ./gcc/testsuite/g++.dg/overload/pmf1.C 1828032968b ./gcc/testsuite/g++.dg/parse/angle-bracket.C 3621016079b ./gcc/testsuite/g++.dg/parse/attr1.C + 1209396293b ./gcc/testsuite/g++.dg/parse/class1.C + 477745202b ./gcc/testsuite/g++.dg/parse/concat1.C + 2496138711b ./gcc/testsuite/g++.dg/parse/conv_op1.C + 2534111903b ./gcc/testsuite/g++.dg/parse/crash2.C + 3719445176b ./gcc/testsuite/g++.dg/parse/crash3.C + 3117628367b ./gcc/testsuite/g++.dg/parse/crash4.C 2532827057b ./gcc/testsuite/g++.dg/parse/decl-specifier-1.C + 1790715562b ./gcc/testsuite/g++.dg/parse/defarg1.C + 381770776b ./gcc/testsuite/g++.dg/parse/elab1.C 3454082090b ./gcc/testsuite/g++.dg/parse/friend1.C 849996881b ./gcc/testsuite/g++.dg/parse/inline1.C 1601717576b ./gcc/testsuite/g++.dg/parse/named_ops.C + 4148163115b ./gcc/testsuite/g++.dg/parse/namespace1.C + 402996652b ./gcc/testsuite/g++.dg/parse/namespace8.C + 1437124593b ./gcc/testsuite/g++.dg/parse/namespace9.C + 3024323785b ./gcc/testsuite/g++.dg/parse/octal1.C 1189423005b ./gcc/testsuite/g++.dg/parse/parameter-declaration-1.C + 2118699314b ./gcc/testsuite/g++.dg/parse/ptrmem1.C 4289007099b ./gcc/testsuite/g++.dg/parse/saved1.C + 19296994b ./gcc/testsuite/g++.dg/parse/stack1.C 1402579554b ./gcc/testsuite/g++.dg/parse/stmtexpr1.C 2804352074b ./gcc/testsuite/g++.dg/parse/stmtexpr2.C 254645785b ./gcc/testsuite/g++.dg/parse/stmtexpr3.C ! 1641234101b ./gcc/testsuite/g++.dg/parse/typedef1.C ! 465475026b ./gcc/testsuite/g++.dg/parse/varmod1.C ! 2764972821b ./gcc/testsuite/g++.dg/README 438642550b ./gcc/testsuite/g++.dg/rtti/crash1.C ! 1433046709b ./gcc/testsuite/g++.dg/rtti/cv1.C 370035332b ./gcc/testsuite/g++.dg/special/conpr-1.C 1217683257b ./gcc/testsuite/g++.dg/special/conpr-2a.C ! 641456338b ./gcc/testsuite/g++.dg/special/conpr-2.C 3756639268b ./gcc/testsuite/g++.dg/special/conpr-3a.C 3436726377b ./gcc/testsuite/g++.dg/special/conpr-3b.C + 1019201819b ./gcc/testsuite/g++.dg/special/conpr-3.C 908971672b ./gcc/testsuite/g++.dg/special/ecos.exp 2043265187b ./gcc/testsuite/g++.dg/special/initp1.C 3059417569b ./gcc/testsuite/g++.dg/template/access1.C + 2673931730b ./gcc/testsuite/g++.dg/template/access2.C + 2590614802b ./gcc/testsuite/g++.dg/template/access3.C + 3878569540b ./gcc/testsuite/g++.dg/template/access4.C + 2470699830b ./gcc/testsuite/g++.dg/template/access5.C + 1801777651b ./gcc/testsuite/g++.dg/template/access6.C + 199785845b ./gcc/testsuite/g++.dg/template/access7.C 826296459b ./gcc/testsuite/g++.dg/template/alignof1.C 1168318524b ./gcc/testsuite/g++.dg/template/char1.C 783556741b ./gcc/testsuite/g++.dg/template/complit1.C + 4014424234b ./gcc/testsuite/g++.dg/template/cond.C + 1872476630b ./gcc/testsuite/g++.dg/template/conv1.C + 2857910601b ./gcc/testsuite/g++.dg/template/conv2.C + 764320547b ./gcc/testsuite/g++.dg/template/conv3.C + 4248946815b ./gcc/testsuite/g++.dg/template/conv4.C + 538692921b ./gcc/testsuite/g++.dg/template/conv5.C + 1069408309b ./gcc/testsuite/g++.dg/template/conv6.C 2083292273b ./gcc/testsuite/g++.dg/template/copy1.C ! 611422239b ./gcc/testsuite/g++.dg/template/crash1.C ! 3568011765b ./gcc/testsuite/g++.dg/template/crash2.C 3504290323b ./gcc/testsuite/g++.dg/template/ctor1.C + 2330430995b ./gcc/testsuite/g++.dg/template/ctor2.C + 1215391925b ./gcc/testsuite/g++.dg/template/decl1.C + 2692451775b ./gcc/testsuite/g++.dg/template/deduce1.C + 3818821570b ./gcc/testsuite/g++.dg/template/defarg2.C 184359799b ./gcc/testsuite/g++.dg/template/dtor1.C + 2109880679b ./gcc/testsuite/g++.dg/template/explicit1.C 1161800603b ./gcc/testsuite/g++.dg/template/explicit-instantiation.C ! 2362246017b ./gcc/testsuite/g++.dg/template/friend10.C ! 1671034716b ./gcc/testsuite/g++.dg/template/friend12.C ! 2005778997b ./gcc/testsuite/g++.dg/template/friend13.C ! 3172354693b ./gcc/testsuite/g++.dg/template/friend14.C ! 2016352144b ./gcc/testsuite/g++.dg/template/friend15.C 2661209683b ./gcc/testsuite/g++.dg/template/friend16.C + 4292587643b ./gcc/testsuite/g++.dg/template/friend17.C + 4039879103b ./gcc/testsuite/g++.dg/template/friend18.C 3302501697b ./gcc/testsuite/g++.dg/template/friend3.C ! 2426122237b ./gcc/testsuite/g++.dg/template/friend4.C 3560434139b ./gcc/testsuite/g++.dg/template/friend5.C 590954347b ./gcc/testsuite/g++.dg/template/friend6.C 3646815886b ./gcc/testsuite/g++.dg/template/friend7.C + 3075113496b ./gcc/testsuite/g++.dg/template/friend8.C + 2441651640b ./gcc/testsuite/g++.dg/template/friend9.C + 3595433718b ./gcc/testsuite/g++.dg/template/friend.C + 1220946856b ./gcc/testsuite/g++.dg/template/inherit2.C + 851936600b ./gcc/testsuite/g++.dg/template/inherit3.C 438837461b ./gcc/testsuite/g++.dg/template/inherit.C 2872339928b ./gcc/testsuite/g++.dg/template/init-list.C ! 2887759381b ./gcc/testsuite/g++.dg/template/inline1.C ! 3521191462b ./gcc/testsuite/g++.dg/template/instantiate1.C ! 3977187324b ./gcc/testsuite/g++.dg/template/instantiate2.C ! 953723165b ./gcc/testsuite/g++.dg/template/instantiate3.C 416617778b ./gcc/testsuite/g++.dg/template/local1.C ! 1975040186b ./gcc/testsuite/g++.dg/template/member.C 2815776671b ./gcc/testsuite/g++.dg/template/meminit1.C + 1868048408b ./gcc/testsuite/g++.dg/template/nested2.C + 1327874294b ./gcc/testsuite/g++.dg/template/non-type1.C + 2908234966b ./gcc/testsuite/g++.dg/template/nontype1.C 2073430043b ./gcc/testsuite/g++.dg/template/ntp1.C + 3843222909b ./gcc/testsuite/g++.dg/template/ntp2.C + 2552830253b ./gcc/testsuite/g++.dg/template/op1.C + 1352422271b ./gcc/testsuite/g++.dg/template/partial1.C 188396250b ./gcc/testsuite/g++.dg/template/partial-specialization.C + 1094048270b ./gcc/testsuite/g++.dg/template/pretty1.C 601175114b ./gcc/testsuite/g++.dg/template/ptrmem1.C 3748090308b ./gcc/testsuite/g++.dg/template/ptrmem2.C + 1552975789b ./gcc/testsuite/g++.dg/template/ptrmem3.C + 1140102843b ./gcc/testsuite/g++.dg/template/ptrmem4.C 1117759327b ./gcc/testsuite/g++.dg/template/qual1.C 4043559007b ./gcc/testsuite/g++.dg/template/qualttp10.C 265969049b ./gcc/testsuite/g++.dg/template/qualttp11.C 3320116615b ./gcc/testsuite/g++.dg/template/qualttp12.C *************** *** 5346,5353 **** 730215493b ./gcc/testsuite/g++.dg/template/qualttp17.C 2705854603b ./gcc/testsuite/g++.dg/template/qualttp18.C 2340914395b ./gcc/testsuite/g++.dg/template/qualttp19.C ! 662492681b ./gcc/testsuite/g++.dg/template/qualttp2.C 3291215321b ./gcc/testsuite/g++.dg/template/qualttp20.C 2704736755b ./gcc/testsuite/g++.dg/template/qualttp3.C 2095971540b ./gcc/testsuite/g++.dg/template/qualttp4.C 1142633939b ./gcc/testsuite/g++.dg/template/qualttp5.C --- 8192,8201 ---- 730215493b ./gcc/testsuite/g++.dg/template/qualttp17.C 2705854603b ./gcc/testsuite/g++.dg/template/qualttp18.C 2340914395b ./gcc/testsuite/g++.dg/template/qualttp19.C ! 3125902504b ./gcc/testsuite/g++.dg/template/qualttp1.C 3291215321b ./gcc/testsuite/g++.dg/template/qualttp20.C + 759279296b ./gcc/testsuite/g++.dg/template/qualttp21.C + 662492681b ./gcc/testsuite/g++.dg/template/qualttp2.C 2704736755b ./gcc/testsuite/g++.dg/template/qualttp3.C 2095971540b ./gcc/testsuite/g++.dg/template/qualttp4.C 1142633939b ./gcc/testsuite/g++.dg/template/qualttp5.C *************** *** 5355,5370 **** 433357978b ./gcc/testsuite/g++.dg/template/qualttp7.C 1704860378b ./gcc/testsuite/g++.dg/template/qualttp8.C 700938418b ./gcc/testsuite/g++.dg/template/qualttp9.C ! 4163290563b ./gcc/testsuite/g++.dg/template/recurse.C 1960444878b ./gcc/testsuite/g++.dg/template/ref1.C ! 1028564434b ./gcc/testsuite/g++.dg/template/sizeof1.C 2914549620b ./gcc/testsuite/g++.dg/template/spec1.C 2378483146b ./gcc/testsuite/g++.dg/template/spec2.C 177374413b ./gcc/testsuite/g++.dg/template/spec7.C 3516934395b ./gcc/testsuite/g++.dg/template/spec8.C 3770294113b ./gcc/testsuite/g++.dg/template/static1.C 2876903140b ./gcc/testsuite/g++.dg/template/static2.C 1689207326b ./gcc/testsuite/g++.dg/template/strlen1.C 4241261648b ./gcc/testsuite/g++.dg/template/ttp1.C 2877667245b ./gcc/testsuite/g++.dg/template/ttp2.C 2215591204b ./gcc/testsuite/g++.dg/template/ttp3.C --- 8203,8224 ---- 433357978b ./gcc/testsuite/g++.dg/template/qualttp7.C 1704860378b ./gcc/testsuite/g++.dg/template/qualttp8.C 700938418b ./gcc/testsuite/g++.dg/template/qualttp9.C ! 1981975195b ./gcc/testsuite/g++.dg/template/recurse.C 1960444878b ./gcc/testsuite/g++.dg/template/ref1.C ! 2809672487b ./gcc/testsuite/g++.dg/template/restrict1.C ! 1942107252b ./gcc/testsuite/g++.dg/template/sizeof1.C ! 1028564434b ./gcc/testsuite/g++.dg/template/sizeof2.C 2914549620b ./gcc/testsuite/g++.dg/template/spec1.C 2378483146b ./gcc/testsuite/g++.dg/template/spec2.C + 4044137217b ./gcc/testsuite/g++.dg/template/spec3.C + 64153751b ./gcc/testsuite/g++.dg/template/spec4.C 177374413b ./gcc/testsuite/g++.dg/template/spec7.C 3516934395b ./gcc/testsuite/g++.dg/template/spec8.C 3770294113b ./gcc/testsuite/g++.dg/template/static1.C 2876903140b ./gcc/testsuite/g++.dg/template/static2.C + 3266188611b ./gcc/testsuite/g++.dg/template/static3.C 1689207326b ./gcc/testsuite/g++.dg/template/strlen1.C + 1965927799b ./gcc/testsuite/g++.dg/template/subst1.C 4241261648b ./gcc/testsuite/g++.dg/template/ttp1.C 2877667245b ./gcc/testsuite/g++.dg/template/ttp2.C 2215591204b ./gcc/testsuite/g++.dg/template/ttp3.C *************** *** 5379,5417 **** 3595370582b ./gcc/testsuite/g++.dg/template/unify1.C 3639225580b ./gcc/testsuite/g++.dg/template/unify2.C 4266445185b ./gcc/testsuite/g++.dg/template/unify3.C 509779393b ./gcc/testsuite/g++.dg/template/union1.C 382436164b ./gcc/testsuite/g++.dg/template/varmod1.C 3718685372b ./gcc/testsuite/g++.dg/template/vtable1.C ! 1594659113b ./gcc/testsuite/g++.dg/warn/Wshadow-1.C ! 3339416566b ./gcc/testsuite/g++.dg/warn/Wswitch-1.C ! 3928913400b ./gcc/testsuite/g++.dg/warn/Wswitch-2.C ! 223408438b ./gcc/testsuite/g++.dg/warn/Wunused-1.C 2244072137b ./gcc/testsuite/g++.dg/warn/effc1.C 1455133800b ./gcc/testsuite/g++.dg/warn/format1.C 886747822b ./gcc/testsuite/g++.dg/warn/format2.C 2805519034b ./gcc/testsuite/g++.dg/warn/friend.C 334159724b ./gcc/testsuite/g++.dg/warn/implicit-typename1.C 3402610409b ./gcc/testsuite/g++.dg/warn/oldcast1.C 2394314287b ./gcc/testsuite/g++.dg/warn/return-reference.C ! 3714230484b ./gcc/testsuite/g++.dg/warn/weak1.C 1014061570b ./gcc/testsuite/g++.old-deja/g++.abi/aggregates.C 3074970655b ./gcc/testsuite/g++.old-deja/g++.abi/align.C 1155806507b ./gcc/testsuite/g++.old-deja/g++.abi/arraynew.C 3647855758b ./gcc/testsuite/g++.old-deja/g++.abi/bitfields.C 2026386788b ./gcc/testsuite/g++.old-deja/g++.abi/crash1.C 1147144784b ./gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C - 2936636767b ./gcc/testsuite/g++.old-deja/g++.abi/empty.C 4096109742b ./gcc/testsuite/g++.old-deja/g++.abi/empty2.C 1878628007b ./gcc/testsuite/g++.old-deja/g++.abi/empty3.C 239352654b ./gcc/testsuite/g++.old-deja/g++.abi/layout1.C 3009318595b ./gcc/testsuite/g++.old-deja/g++.abi/mangle1.C - 694100951b ./gcc/testsuite/g++.old-deja/g++.abi/primary.C 2807005291b ./gcc/testsuite/g++.old-deja/g++.abi/primary2.C 3282879605b ./gcc/testsuite/g++.old-deja/g++.abi/primary3.C 1642224875b ./gcc/testsuite/g++.old-deja/g++.abi/primary4.C 758749582b ./gcc/testsuite/g++.old-deja/g++.abi/primary5.C 123432225b ./gcc/testsuite/g++.old-deja/g++.abi/ptrflags.C ! 3967703303b ./gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C 627664718b ./gcc/testsuite/g++.old-deja/g++.abi/vbase1.C 1393433492b ./gcc/testsuite/g++.old-deja/g++.abi/vbase2.C 1591406699b ./gcc/testsuite/g++.old-deja/g++.abi/vbase3.C --- 8233,8290 ---- 3595370582b ./gcc/testsuite/g++.dg/template/unify1.C 3639225580b ./gcc/testsuite/g++.dg/template/unify2.C 4266445185b ./gcc/testsuite/g++.dg/template/unify3.C + 2706560986b ./gcc/testsuite/g++.dg/template/unify4.C 509779393b ./gcc/testsuite/g++.dg/template/union1.C 382436164b ./gcc/testsuite/g++.dg/template/varmod1.C 3718685372b ./gcc/testsuite/g++.dg/template/vtable1.C ! 3759924478b ./gcc/testsuite/g++.dg/template/wrap1.C ! 1569401313b ./gcc/testsuite/g++.dg/tls/diag-1.C ! 2646101455b ./gcc/testsuite/g++.dg/tls/diag-2.C ! 2984687092b ./gcc/testsuite/g++.dg/tls/init-1.C ! 225284648b ./gcc/testsuite/g++.dg/tls/init-2.C ! 1820185551b ./gcc/testsuite/g++.dg/tls/tls.exp ! 472549683b ./gcc/testsuite/g++.dg/tls/trivial.C ! 3534874517b ./gcc/testsuite/g++.dg/warn/compare1.C ! 1287592684b ./gcc/testsuite/g++.dg/warn/deprecated.C 2244072137b ./gcc/testsuite/g++.dg/warn/effc1.C 1455133800b ./gcc/testsuite/g++.dg/warn/format1.C 886747822b ./gcc/testsuite/g++.dg/warn/format2.C 2805519034b ./gcc/testsuite/g++.dg/warn/friend.C 334159724b ./gcc/testsuite/g++.dg/warn/implicit-typename1.C + 3871123813b ./gcc/testsuite/g++.dg/warn/incomplete1.C + 550737263b ./gcc/testsuite/g++.dg/warn/inline1.C + 3941517581b ./gcc/testsuite/g++.dg/warn/noreturn-1.C 3402610409b ./gcc/testsuite/g++.dg/warn/oldcast1.C 2394314287b ./gcc/testsuite/g++.dg/warn/return-reference.C ! 2024522680b ./gcc/testsuite/g++.dg/warn/weak1.C ! 837914458b ./gcc/testsuite/g++.dg/warn/Winline-1.C ! 730621002b ./gcc/testsuite/g++.dg/warn/Woverloaded-1.C ! 155956907b ./gcc/testsuite/g++.dg/warn/Wreorder-1.C ! 140007329b ./gcc/testsuite/g++.dg/warn/Wshadow-1.C ! 4055228077b ./gcc/testsuite/g++.dg/warn/Wshadow-2.C ! 3339416566b ./gcc/testsuite/g++.dg/warn/Wswitch-1.C ! 3928913400b ./gcc/testsuite/g++.dg/warn/Wswitch-2.C ! 223408438b ./gcc/testsuite/g++.dg/warn/Wunused-1.C ! 3331243142b ./gcc/testsuite/g++.dg/warn/Wunused-2.C ! 2827119941b ./gcc/testsuite/g++.dg/warn/Wunused-3.C 1014061570b ./gcc/testsuite/g++.old-deja/g++.abi/aggregates.C 3074970655b ./gcc/testsuite/g++.old-deja/g++.abi/align.C 1155806507b ./gcc/testsuite/g++.old-deja/g++.abi/arraynew.C 3647855758b ./gcc/testsuite/g++.old-deja/g++.abi/bitfields.C 2026386788b ./gcc/testsuite/g++.old-deja/g++.abi/crash1.C 1147144784b ./gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C 4096109742b ./gcc/testsuite/g++.old-deja/g++.abi/empty2.C 1878628007b ./gcc/testsuite/g++.old-deja/g++.abi/empty3.C + 2936636767b ./gcc/testsuite/g++.old-deja/g++.abi/empty.C 239352654b ./gcc/testsuite/g++.old-deja/g++.abi/layout1.C 3009318595b ./gcc/testsuite/g++.old-deja/g++.abi/mangle1.C 2807005291b ./gcc/testsuite/g++.old-deja/g++.abi/primary2.C 3282879605b ./gcc/testsuite/g++.old-deja/g++.abi/primary3.C 1642224875b ./gcc/testsuite/g++.old-deja/g++.abi/primary4.C 758749582b ./gcc/testsuite/g++.old-deja/g++.abi/primary5.C + 694100951b ./gcc/testsuite/g++.old-deja/g++.abi/primary.C 123432225b ./gcc/testsuite/g++.old-deja/g++.abi/ptrflags.C ! 1585279684b ./gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C 627664718b ./gcc/testsuite/g++.old-deja/g++.abi/vbase1.C 1393433492b ./gcc/testsuite/g++.old-deja/g++.abi/vbase2.C 1591406699b ./gcc/testsuite/g++.old-deja/g++.abi/vbase3.C *************** *** 5422,5430 **** 3914589079b ./gcc/testsuite/g++.old-deja/g++.abi/vbase8-5.C 3332397893b ./gcc/testsuite/g++.old-deja/g++.abi/vbase8-9.C 186405531b ./gcc/testsuite/g++.old-deja/g++.abi/vmihint.C ! 2313706108b ./gcc/testsuite/g++.old-deja/g++.abi/vtable.C ! 1117843110b ./gcc/testsuite/g++.old-deja/g++.abi/vtable2.C ! 3689828910b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3.h 3601882386b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3a.C 1066819949b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3b.C 733573133b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3c.C --- 8295,8301 ---- 3914589079b ./gcc/testsuite/g++.old-deja/g++.abi/vbase8-5.C 3332397893b ./gcc/testsuite/g++.old-deja/g++.abi/vbase8-9.C 186405531b ./gcc/testsuite/g++.old-deja/g++.abi/vmihint.C ! 1000301122b ./gcc/testsuite/g++.old-deja/g++.abi/vtable2.C 3601882386b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3a.C 1066819949b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3b.C 733573133b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3c.C *************** *** 5432,5441 **** 2504154034b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3e.C 841363633b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3f.C 1020377548b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3g.C 1675326614b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3h.C 3323598815b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3i.C 4291841254b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3j.C ! 3056861018b ./gcc/testsuite/g++.old-deja/g++.benjamin/.cvsignore 3645238009b ./gcc/testsuite/g++.old-deja/g++.benjamin/13478.C 1290057507b ./gcc/testsuite/g++.old-deja/g++.benjamin/13523.C 3226269269b ./gcc/testsuite/g++.old-deja/g++.benjamin/13908.C --- 8303,8313 ---- 2504154034b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3e.C 841363633b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3f.C 1020377548b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3g.C + 3689828910b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3.h 1675326614b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3h.C 3323598815b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3i.C 4291841254b ./gcc/testsuite/g++.old-deja/g++.abi/vtable3j.C ! 2313706108b ./gcc/testsuite/g++.old-deja/g++.abi/vtable.C 3645238009b ./gcc/testsuite/g++.old-deja/g++.benjamin/13478.C 1290057507b ./gcc/testsuite/g++.old-deja/g++.benjamin/13523.C 3226269269b ./gcc/testsuite/g++.old-deja/g++.benjamin/13908.C *************** *** 5451,5457 **** 474009375b ./gcc/testsuite/g++.old-deja/g++.benjamin/15351-2.C 2917600664b ./gcc/testsuite/g++.old-deja/g++.benjamin/15756-1.C 2360709744b ./gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C ! 2662607350b ./gcc/testsuite/g++.old-deja/g++.benjamin/15799.C 2302070128b ./gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C 1420401846b ./gcc/testsuite/g++.old-deja/g++.benjamin/15800-2.C 3811260428b ./gcc/testsuite/g++.old-deja/g++.benjamin/15822.C --- 8323,8329 ---- 474009375b ./gcc/testsuite/g++.old-deja/g++.benjamin/15351-2.C 2917600664b ./gcc/testsuite/g++.old-deja/g++.benjamin/15756-1.C 2360709744b ./gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C ! 1910359531b ./gcc/testsuite/g++.old-deja/g++.benjamin/15799.C 2302070128b ./gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C 1420401846b ./gcc/testsuite/g++.old-deja/g++.benjamin/15800-2.C 3811260428b ./gcc/testsuite/g++.old-deja/g++.benjamin/15822.C *************** *** 5501,5507 **** 1370912247b ./gcc/testsuite/g++.old-deja/g++.bob/template2.C 2571452914b ./gcc/testsuite/g++.old-deja/g++.bob/template3.C 2876511802b ./gcc/testsuite/g++.old-deja/g++.bob/template4.C - 3336461445b ./gcc/testsuite/g++.old-deja/g++.brendan/README 934227986b ./gcc/testsuite/g++.old-deja/g++.brendan/abstract1.C 2431794017b ./gcc/testsuite/g++.old-deja/g++.brendan/access1.C 2157723684b ./gcc/testsuite/g++.old-deja/g++.brendan/alignof.C --- 8373,8378 ---- *************** *** 5510,5517 **** 3428758154b ./gcc/testsuite/g++.old-deja/g++.brendan/arm1.C 2574740314b ./gcc/testsuite/g++.old-deja/g++.brendan/arm2.C 2227979686b ./gcc/testsuite/g++.old-deja/g++.brendan/arm3.C - 1965428160b ./gcc/testsuite/g++.old-deja/g++.brendan/array-refs.C 2917176441b ./gcc/testsuite/g++.old-deja/g++.brendan/array1.C 1940036338b ./gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C 294912826b ./gcc/testsuite/g++.old-deja/g++.brendan/bit-fields1.C 3253987007b ./gcc/testsuite/g++.old-deja/g++.brendan/bit-fields2.C --- 8381,8388 ---- 3428758154b ./gcc/testsuite/g++.old-deja/g++.brendan/arm1.C 2574740314b ./gcc/testsuite/g++.old-deja/g++.brendan/arm2.C 2227979686b ./gcc/testsuite/g++.old-deja/g++.brendan/arm3.C 2917176441b ./gcc/testsuite/g++.old-deja/g++.brendan/array1.C + 1965428160b ./gcc/testsuite/g++.old-deja/g++.brendan/array-refs.C 1940036338b ./gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C 294912826b ./gcc/testsuite/g++.old-deja/g++.brendan/bit-fields1.C 3253987007b ./gcc/testsuite/g++.old-deja/g++.brendan/bit-fields2.C *************** *** 5531,5537 **** 1985077243b ./gcc/testsuite/g++.old-deja/g++.brendan/copy7.C 2478516341b ./gcc/testsuite/g++.old-deja/g++.brendan/copy8.C 4007430298b ./gcc/testsuite/g++.old-deja/g++.brendan/copy9.C - 73005642b ./gcc/testsuite/g++.old-deja/g++.brendan/crash1.C 2509157689b ./gcc/testsuite/g++.old-deja/g++.brendan/crash10.C 1585446941b ./gcc/testsuite/g++.old-deja/g++.brendan/crash11.C 1430846464b ./gcc/testsuite/g++.old-deja/g++.brendan/crash12.C --- 8402,8407 ---- *************** *** 5541,5547 **** 183613091b ./gcc/testsuite/g++.old-deja/g++.brendan/crash16.C 3586612658b ./gcc/testsuite/g++.old-deja/g++.brendan/crash17.C 563583842b ./gcc/testsuite/g++.old-deja/g++.brendan/crash18.C ! 2936347090b ./gcc/testsuite/g++.old-deja/g++.brendan/crash2.C 4119104494b ./gcc/testsuite/g++.old-deja/g++.brendan/crash20.C 927230476b ./gcc/testsuite/g++.old-deja/g++.brendan/crash22.C 547223421b ./gcc/testsuite/g++.old-deja/g++.brendan/crash23.C --- 8411,8417 ---- 183613091b ./gcc/testsuite/g++.old-deja/g++.brendan/crash16.C 3586612658b ./gcc/testsuite/g++.old-deja/g++.brendan/crash17.C 563583842b ./gcc/testsuite/g++.old-deja/g++.brendan/crash18.C ! 73005642b ./gcc/testsuite/g++.old-deja/g++.brendan/crash1.C 4119104494b ./gcc/testsuite/g++.old-deja/g++.brendan/crash20.C 927230476b ./gcc/testsuite/g++.old-deja/g++.brendan/crash22.C 547223421b ./gcc/testsuite/g++.old-deja/g++.brendan/crash23.C *************** *** 5551,5557 **** 1537159422b ./gcc/testsuite/g++.old-deja/g++.brendan/crash27.C 1095243311b ./gcc/testsuite/g++.old-deja/g++.brendan/crash28.C 899543906b ./gcc/testsuite/g++.old-deja/g++.brendan/crash29.C ! 1740428956b ./gcc/testsuite/g++.old-deja/g++.brendan/crash3.C 454853598b ./gcc/testsuite/g++.old-deja/g++.brendan/crash30.C 3144780301b ./gcc/testsuite/g++.old-deja/g++.brendan/crash31.C 255295637b ./gcc/testsuite/g++.old-deja/g++.brendan/crash32.C --- 8421,8427 ---- 1537159422b ./gcc/testsuite/g++.old-deja/g++.brendan/crash27.C 1095243311b ./gcc/testsuite/g++.old-deja/g++.brendan/crash28.C 899543906b ./gcc/testsuite/g++.old-deja/g++.brendan/crash29.C ! 2936347090b ./gcc/testsuite/g++.old-deja/g++.brendan/crash2.C 454853598b ./gcc/testsuite/g++.old-deja/g++.brendan/crash30.C 3144780301b ./gcc/testsuite/g++.old-deja/g++.brendan/crash31.C 255295637b ./gcc/testsuite/g++.old-deja/g++.brendan/crash32.C *************** *** 5562,5568 **** 4095821179b ./gcc/testsuite/g++.old-deja/g++.brendan/crash37.C 3095994190b ./gcc/testsuite/g++.old-deja/g++.brendan/crash38.C 1186001658b ./gcc/testsuite/g++.old-deja/g++.brendan/crash39.C ! 2075374404b ./gcc/testsuite/g++.old-deja/g++.brendan/crash4.C 2475994253b ./gcc/testsuite/g++.old-deja/g++.brendan/crash40.C 4225248580b ./gcc/testsuite/g++.old-deja/g++.brendan/crash41.C 2430128234b ./gcc/testsuite/g++.old-deja/g++.brendan/crash42.C --- 8432,8438 ---- 4095821179b ./gcc/testsuite/g++.old-deja/g++.brendan/crash37.C 3095994190b ./gcc/testsuite/g++.old-deja/g++.brendan/crash38.C 1186001658b ./gcc/testsuite/g++.old-deja/g++.brendan/crash39.C ! 1740428956b ./gcc/testsuite/g++.old-deja/g++.brendan/crash3.C 2475994253b ./gcc/testsuite/g++.old-deja/g++.brendan/crash40.C 4225248580b ./gcc/testsuite/g++.old-deja/g++.brendan/crash41.C 2430128234b ./gcc/testsuite/g++.old-deja/g++.brendan/crash42.C *************** *** 5573,5579 **** 3880129363b ./gcc/testsuite/g++.old-deja/g++.brendan/crash47.C 740147641b ./gcc/testsuite/g++.old-deja/g++.brendan/crash48.C 991257367b ./gcc/testsuite/g++.old-deja/g++.brendan/crash49.C ! 1308193179b ./gcc/testsuite/g++.old-deja/g++.brendan/crash5.C 3106709406b ./gcc/testsuite/g++.old-deja/g++.brendan/crash50.C 2259885687b ./gcc/testsuite/g++.old-deja/g++.brendan/crash51.C 2036848605b ./gcc/testsuite/g++.old-deja/g++.brendan/crash52.C --- 8443,8449 ---- 3880129363b ./gcc/testsuite/g++.old-deja/g++.brendan/crash47.C 740147641b ./gcc/testsuite/g++.old-deja/g++.brendan/crash48.C 991257367b ./gcc/testsuite/g++.old-deja/g++.brendan/crash49.C ! 2075374404b ./gcc/testsuite/g++.old-deja/g++.brendan/crash4.C 3106709406b ./gcc/testsuite/g++.old-deja/g++.brendan/crash50.C 2259885687b ./gcc/testsuite/g++.old-deja/g++.brendan/crash51.C 2036848605b ./gcc/testsuite/g++.old-deja/g++.brendan/crash52.C *************** *** 5583,5598 **** 1729790662b ./gcc/testsuite/g++.old-deja/g++.brendan/crash56.C 2097488269b ./gcc/testsuite/g++.old-deja/g++.brendan/crash57.C 1260831404b ./gcc/testsuite/g++.old-deja/g++.brendan/crash58.C ! 3392471730b ./gcc/testsuite/g++.old-deja/g++.brendan/crash6.C 3431262814b ./gcc/testsuite/g++.old-deja/g++.brendan/crash60.C 3845483878b ./gcc/testsuite/g++.old-deja/g++.brendan/crash61.C 2163074363b ./gcc/testsuite/g++.old-deja/g++.brendan/crash62.C 3068166302b ./gcc/testsuite/g++.old-deja/g++.brendan/crash63.C ! 1926363821b ./gcc/testsuite/g++.old-deja/g++.brendan/crash64.C 3191901754b ./gcc/testsuite/g++.old-deja/g++.brendan/crash65.C 2970533101b ./gcc/testsuite/g++.old-deja/g++.brendan/crash66.C 1982272158b ./gcc/testsuite/g++.old-deja/g++.brendan/crash67.C 3682557717b ./gcc/testsuite/g++.old-deja/g++.brendan/crash68.C 345174202b ./gcc/testsuite/g++.old-deja/g++.brendan/crash7.C 4188483267b ./gcc/testsuite/g++.old-deja/g++.brendan/crash8.C 3802934826b ./gcc/testsuite/g++.old-deja/g++.brendan/crash9.C --- 8453,8469 ---- 1729790662b ./gcc/testsuite/g++.old-deja/g++.brendan/crash56.C 2097488269b ./gcc/testsuite/g++.old-deja/g++.brendan/crash57.C 1260831404b ./gcc/testsuite/g++.old-deja/g++.brendan/crash58.C ! 1308193179b ./gcc/testsuite/g++.old-deja/g++.brendan/crash5.C 3431262814b ./gcc/testsuite/g++.old-deja/g++.brendan/crash60.C 3845483878b ./gcc/testsuite/g++.old-deja/g++.brendan/crash61.C 2163074363b ./gcc/testsuite/g++.old-deja/g++.brendan/crash62.C 3068166302b ./gcc/testsuite/g++.old-deja/g++.brendan/crash63.C ! 2575490386b ./gcc/testsuite/g++.old-deja/g++.brendan/crash64.C 3191901754b ./gcc/testsuite/g++.old-deja/g++.brendan/crash65.C 2970533101b ./gcc/testsuite/g++.old-deja/g++.brendan/crash66.C 1982272158b ./gcc/testsuite/g++.old-deja/g++.brendan/crash67.C 3682557717b ./gcc/testsuite/g++.old-deja/g++.brendan/crash68.C + 3392471730b ./gcc/testsuite/g++.old-deja/g++.brendan/crash6.C 345174202b ./gcc/testsuite/g++.old-deja/g++.brendan/crash7.C 4188483267b ./gcc/testsuite/g++.old-deja/g++.brendan/crash8.C 3802934826b ./gcc/testsuite/g++.old-deja/g++.brendan/crash9.C *************** *** 5612,5624 **** 1270991957b ./gcc/testsuite/g++.old-deja/g++.brendan/dtors2.C 1405617163b ./gcc/testsuite/g++.old-deja/g++.brendan/dtors3.C 50594595b ./gcc/testsuite/g++.old-deja/g++.brendan/eh1.C - 4113228927b ./gcc/testsuite/g++.old-deja/g++.brendan/enum-clash.C - 2752357079b ./gcc/testsuite/g++.old-deja/g++.brendan/enum1.C 2154024297b ./gcc/testsuite/g++.old-deja/g++.brendan/enum10.C 1012457759b ./gcc/testsuite/g++.old-deja/g++.brendan/enum11.C 3613259052b ./gcc/testsuite/g++.old-deja/g++.brendan/enum12.C 4062281691b ./gcc/testsuite/g++.old-deja/g++.brendan/enum13.C 1026608225b ./gcc/testsuite/g++.old-deja/g++.brendan/enum14.C 2495301458b ./gcc/testsuite/g++.old-deja/g++.brendan/enum2.C 857641714b ./gcc/testsuite/g++.old-deja/g++.brendan/enum3.C 2436566654b ./gcc/testsuite/g++.old-deja/g++.brendan/enum4.C --- 8483,8494 ---- 1270991957b ./gcc/testsuite/g++.old-deja/g++.brendan/dtors2.C 1405617163b ./gcc/testsuite/g++.old-deja/g++.brendan/dtors3.C 50594595b ./gcc/testsuite/g++.old-deja/g++.brendan/eh1.C 2154024297b ./gcc/testsuite/g++.old-deja/g++.brendan/enum10.C 1012457759b ./gcc/testsuite/g++.old-deja/g++.brendan/enum11.C 3613259052b ./gcc/testsuite/g++.old-deja/g++.brendan/enum12.C 4062281691b ./gcc/testsuite/g++.old-deja/g++.brendan/enum13.C 1026608225b ./gcc/testsuite/g++.old-deja/g++.brendan/enum14.C + 2752357079b ./gcc/testsuite/g++.old-deja/g++.brendan/enum1.C 2495301458b ./gcc/testsuite/g++.old-deja/g++.brendan/enum2.C 857641714b ./gcc/testsuite/g++.old-deja/g++.brendan/enum3.C 2436566654b ./gcc/testsuite/g++.old-deja/g++.brendan/enum4.C *************** *** 5627,5636 **** 1144354186b ./gcc/testsuite/g++.old-deja/g++.brendan/enum7.C 3721081721b ./gcc/testsuite/g++.old-deja/g++.brendan/enum8.C 1284409256b ./gcc/testsuite/g++.old-deja/g++.brendan/enum9.C ! 1658458603b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg1.C 3510755439b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg10.C 3189183114b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg11.C 1104107183b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg12.C 1956101213b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg2.C 139198600b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C 3762408786b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C --- 8497,8507 ---- 1144354186b ./gcc/testsuite/g++.old-deja/g++.brendan/enum7.C 3721081721b ./gcc/testsuite/g++.old-deja/g++.brendan/enum8.C 1284409256b ./gcc/testsuite/g++.old-deja/g++.brendan/enum9.C ! 4113228927b ./gcc/testsuite/g++.old-deja/g++.brendan/enum-clash.C 3510755439b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg10.C 3189183114b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg11.C 1104107183b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg12.C + 1658458603b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg1.C 1956101213b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg2.C 139198600b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C 3762408786b ./gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C *************** *** 5645,5655 **** 2483886013b ./gcc/testsuite/g++.old-deja/g++.brendan/friend3.C 3122834560b ./gcc/testsuite/g++.old-deja/g++.brendan/friend4.C 1714830524b ./gcc/testsuite/g++.old-deja/g++.brendan/groff1.C - 3909689745b ./gcc/testsuite/g++.old-deja/g++.brendan/init1.C 2246409428b ./gcc/testsuite/g++.old-deja/g++.brendan/init10.C 1901230214b ./gcc/testsuite/g++.old-deja/g++.brendan/init11.C 851254540b ./gcc/testsuite/g++.old-deja/g++.brendan/init12.C 2224246807b ./gcc/testsuite/g++.old-deja/g++.brendan/init13.C 1726022047b ./gcc/testsuite/g++.old-deja/g++.brendan/init2.C 2066877415b ./gcc/testsuite/g++.old-deja/g++.brendan/init3.C 1439428404b ./gcc/testsuite/g++.old-deja/g++.brendan/init4.C --- 8516,8526 ---- 2483886013b ./gcc/testsuite/g++.old-deja/g++.brendan/friend3.C 3122834560b ./gcc/testsuite/g++.old-deja/g++.brendan/friend4.C 1714830524b ./gcc/testsuite/g++.old-deja/g++.brendan/groff1.C 2246409428b ./gcc/testsuite/g++.old-deja/g++.brendan/init10.C 1901230214b ./gcc/testsuite/g++.old-deja/g++.brendan/init11.C 851254540b ./gcc/testsuite/g++.old-deja/g++.brendan/init12.C 2224246807b ./gcc/testsuite/g++.old-deja/g++.brendan/init13.C + 3909689745b ./gcc/testsuite/g++.old-deja/g++.brendan/init1.C 1726022047b ./gcc/testsuite/g++.old-deja/g++.brendan/init2.C 2066877415b ./gcc/testsuite/g++.old-deja/g++.brendan/init3.C 1439428404b ./gcc/testsuite/g++.old-deja/g++.brendan/init4.C *************** *** 5661,5673 **** 2492742855b ./gcc/testsuite/g++.old-deja/g++.brendan/label1.C 2945125995b ./gcc/testsuite/g++.old-deja/g++.brendan/label2.C 4243229627b ./gcc/testsuite/g++.old-deja/g++.brendan/line1.C - 3260792263b ./gcc/testsuite/g++.old-deja/g++.brendan/misc1.C 840292246b ./gcc/testsuite/g++.old-deja/g++.brendan/misc10.C 3482838045b ./gcc/testsuite/g++.old-deja/g++.brendan/misc11.C 2371682672b ./gcc/testsuite/g++.old-deja/g++.brendan/misc14.C 4172246159b ./gcc/testsuite/g++.old-deja/g++.brendan/misc15.C 1840031399b ./gcc/testsuite/g++.old-deja/g++.brendan/misc16.C 4145144968b ./gcc/testsuite/g++.old-deja/g++.brendan/misc17.C 1747247058b ./gcc/testsuite/g++.old-deja/g++.brendan/misc2.C 1984879017b ./gcc/testsuite/g++.old-deja/g++.brendan/misc3.C 3850320829b ./gcc/testsuite/g++.old-deja/g++.brendan/misc4.C --- 8532,8544 ---- 2492742855b ./gcc/testsuite/g++.old-deja/g++.brendan/label1.C 2945125995b ./gcc/testsuite/g++.old-deja/g++.brendan/label2.C 4243229627b ./gcc/testsuite/g++.old-deja/g++.brendan/line1.C 840292246b ./gcc/testsuite/g++.old-deja/g++.brendan/misc10.C 3482838045b ./gcc/testsuite/g++.old-deja/g++.brendan/misc11.C 2371682672b ./gcc/testsuite/g++.old-deja/g++.brendan/misc14.C 4172246159b ./gcc/testsuite/g++.old-deja/g++.brendan/misc15.C 1840031399b ./gcc/testsuite/g++.old-deja/g++.brendan/misc16.C 4145144968b ./gcc/testsuite/g++.old-deja/g++.brendan/misc17.C + 3260792263b ./gcc/testsuite/g++.old-deja/g++.brendan/misc1.C 1747247058b ./gcc/testsuite/g++.old-deja/g++.brendan/misc2.C 1984879017b ./gcc/testsuite/g++.old-deja/g++.brendan/misc3.C 3850320829b ./gcc/testsuite/g++.old-deja/g++.brendan/misc4.C *************** *** 5677,5683 **** 4192698961b ./gcc/testsuite/g++.old-deja/g++.brendan/misc8.C 464358847b ./gcc/testsuite/g++.old-deja/g++.brendan/misc9.C 4175086610b ./gcc/testsuite/g++.old-deja/g++.brendan/mutable1.C - 2880395837b ./gcc/testsuite/g++.old-deja/g++.brendan/nest1.C 4218289945b ./gcc/testsuite/g++.old-deja/g++.brendan/nest10.C 2376522411b ./gcc/testsuite/g++.old-deja/g++.brendan/nest11.C 1975302793b ./gcc/testsuite/g++.old-deja/g++.brendan/nest12.C --- 8548,8553 ---- *************** *** 5687,5704 **** 1548858648b ./gcc/testsuite/g++.old-deja/g++.brendan/nest17.C 3262257927b ./gcc/testsuite/g++.old-deja/g++.brendan/nest18.C 2348257545b ./gcc/testsuite/g++.old-deja/g++.brendan/nest19.C ! 4158798113b ./gcc/testsuite/g++.old-deja/g++.brendan/nest2.C 3266883735b ./gcc/testsuite/g++.old-deja/g++.brendan/nest20.C 269879871b ./gcc/testsuite/g++.old-deja/g++.brendan/nest21.C 3747210741b ./gcc/testsuite/g++.old-deja/g++.brendan/nest22.C 3359473085b ./gcc/testsuite/g++.old-deja/g++.brendan/nest23.C 741780000b ./gcc/testsuite/g++.old-deja/g++.brendan/nest24.C 3460040540b ./gcc/testsuite/g++.old-deja/g++.brendan/nest3.C 3092321784b ./gcc/testsuite/g++.old-deja/g++.brendan/nest4.C - 611468654b ./gcc/testsuite/g++.old-deja/g++.brendan/new-array.C 3209968741b ./gcc/testsuite/g++.old-deja/g++.brendan/new1.C 560844122b ./gcc/testsuite/g++.old-deja/g++.brendan/new2.C 952562718b ./gcc/testsuite/g++.old-deja/g++.brendan/new3.C 864176391b ./gcc/testsuite/g++.old-deja/g++.brendan/ns1.C 2649926624b ./gcc/testsuite/g++.old-deja/g++.brendan/operators1.C 2592721748b ./gcc/testsuite/g++.old-deja/g++.brendan/operators2.C --- 8557,8575 ---- 1548858648b ./gcc/testsuite/g++.old-deja/g++.brendan/nest17.C 3262257927b ./gcc/testsuite/g++.old-deja/g++.brendan/nest18.C 2348257545b ./gcc/testsuite/g++.old-deja/g++.brendan/nest19.C ! 2880395837b ./gcc/testsuite/g++.old-deja/g++.brendan/nest1.C 3266883735b ./gcc/testsuite/g++.old-deja/g++.brendan/nest20.C 269879871b ./gcc/testsuite/g++.old-deja/g++.brendan/nest21.C 3747210741b ./gcc/testsuite/g++.old-deja/g++.brendan/nest22.C 3359473085b ./gcc/testsuite/g++.old-deja/g++.brendan/nest23.C 741780000b ./gcc/testsuite/g++.old-deja/g++.brendan/nest24.C + 4158798113b ./gcc/testsuite/g++.old-deja/g++.brendan/nest2.C 3460040540b ./gcc/testsuite/g++.old-deja/g++.brendan/nest3.C 3092321784b ./gcc/testsuite/g++.old-deja/g++.brendan/nest4.C 3209968741b ./gcc/testsuite/g++.old-deja/g++.brendan/new1.C 560844122b ./gcc/testsuite/g++.old-deja/g++.brendan/new2.C 952562718b ./gcc/testsuite/g++.old-deja/g++.brendan/new3.C + 611468654b ./gcc/testsuite/g++.old-deja/g++.brendan/new-array.C 864176391b ./gcc/testsuite/g++.old-deja/g++.brendan/ns1.C 2649926624b ./gcc/testsuite/g++.old-deja/g++.brendan/operators1.C 2592721748b ./gcc/testsuite/g++.old-deja/g++.brendan/operators2.C *************** *** 5708,5716 **** 1939786411b ./gcc/testsuite/g++.old-deja/g++.brendan/operators6.C 2774653307b ./gcc/testsuite/g++.old-deja/g++.brendan/operators7.C 1264143080b ./gcc/testsuite/g++.old-deja/g++.brendan/operators8.C - 785078285b ./gcc/testsuite/g++.old-deja/g++.brendan/overload1.C 2183452204b ./gcc/testsuite/g++.old-deja/g++.brendan/overload10.C 1188978134b ./gcc/testsuite/g++.old-deja/g++.brendan/overload11.C 2745841756b ./gcc/testsuite/g++.old-deja/g++.brendan/overload2.C 4234832416b ./gcc/testsuite/g++.old-deja/g++.brendan/overload3.C 1846706050b ./gcc/testsuite/g++.old-deja/g++.brendan/overload4.C --- 8579,8587 ---- 1939786411b ./gcc/testsuite/g++.old-deja/g++.brendan/operators6.C 2774653307b ./gcc/testsuite/g++.old-deja/g++.brendan/operators7.C 1264143080b ./gcc/testsuite/g++.old-deja/g++.brendan/operators8.C 2183452204b ./gcc/testsuite/g++.old-deja/g++.brendan/overload10.C 1188978134b ./gcc/testsuite/g++.old-deja/g++.brendan/overload11.C + 785078285b ./gcc/testsuite/g++.old-deja/g++.brendan/overload1.C 2745841756b ./gcc/testsuite/g++.old-deja/g++.brendan/overload2.C 4234832416b ./gcc/testsuite/g++.old-deja/g++.brendan/overload3.C 1846706050b ./gcc/testsuite/g++.old-deja/g++.brendan/overload4.C *************** *** 5735,5740 **** --- 8606,8612 ---- 4022822146b ./gcc/testsuite/g++.old-deja/g++.brendan/ptrmem2.C 619231948b ./gcc/testsuite/g++.old-deja/g++.brendan/ptrmem3.C 2919120027b ./gcc/testsuite/g++.old-deja/g++.brendan/ptrmem4.C + 3336461445b ./gcc/testsuite/g++.old-deja/g++.brendan/README 2442841220b ./gcc/testsuite/g++.old-deja/g++.brendan/recurse.C 3187500629b ./gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C 3919299369b ./gcc/testsuite/g++.old-deja/g++.brendan/redecl2.C *************** *** 5757,5763 **** 3667553213b ./gcc/testsuite/g++.old-deja/g++.brendan/static2.C 3518242349b ./gcc/testsuite/g++.old-deja/g++.brendan/static3.C 1578126603b ./gcc/testsuite/g++.old-deja/g++.brendan/synth1.C - 2963427658b ./gcc/testsuite/g++.old-deja/g++.brendan/template1.C 486716772b ./gcc/testsuite/g++.old-deja/g++.brendan/template11.C 675307124b ./gcc/testsuite/g++.old-deja/g++.brendan/template12.C 4278394002b ./gcc/testsuite/g++.old-deja/g++.brendan/template13.C --- 8629,8634 ---- *************** *** 5766,5772 **** 3118430115b ./gcc/testsuite/g++.old-deja/g++.brendan/template17.C 378060276b ./gcc/testsuite/g++.old-deja/g++.brendan/template18.C 3959082203b ./gcc/testsuite/g++.old-deja/g++.brendan/template19.C ! 4292737843b ./gcc/testsuite/g++.old-deja/g++.brendan/template2.C 4030461184b ./gcc/testsuite/g++.old-deja/g++.brendan/template20.C 1759284086b ./gcc/testsuite/g++.old-deja/g++.brendan/template21.C 2020058736b ./gcc/testsuite/g++.old-deja/g++.brendan/template22.C --- 8637,8643 ---- 3118430115b ./gcc/testsuite/g++.old-deja/g++.brendan/template17.C 378060276b ./gcc/testsuite/g++.old-deja/g++.brendan/template18.C 3959082203b ./gcc/testsuite/g++.old-deja/g++.brendan/template19.C ! 2963427658b ./gcc/testsuite/g++.old-deja/g++.brendan/template1.C 4030461184b ./gcc/testsuite/g++.old-deja/g++.brendan/template20.C 1759284086b ./gcc/testsuite/g++.old-deja/g++.brendan/template21.C 2020058736b ./gcc/testsuite/g++.old-deja/g++.brendan/template22.C *************** *** 5777,5785 **** 1378450506b ./gcc/testsuite/g++.old-deja/g++.brendan/template27.C 1797214646b ./gcc/testsuite/g++.old-deja/g++.brendan/template28.C 290486161b ./gcc/testsuite/g++.old-deja/g++.brendan/template29.C ! 1373002312b ./gcc/testsuite/g++.old-deja/g++.brendan/template3.C 3262101990b ./gcc/testsuite/g++.old-deja/g++.brendan/template30.C 3508460272b ./gcc/testsuite/g++.old-deja/g++.brendan/template31.C 2599566194b ./gcc/testsuite/g++.old-deja/g++.brendan/template4.C 575580037b ./gcc/testsuite/g++.old-deja/g++.brendan/template5.C 534471494b ./gcc/testsuite/g++.old-deja/g++.brendan/template6.C --- 8648,8657 ---- 1378450506b ./gcc/testsuite/g++.old-deja/g++.brendan/template27.C 1797214646b ./gcc/testsuite/g++.old-deja/g++.brendan/template28.C 290486161b ./gcc/testsuite/g++.old-deja/g++.brendan/template29.C ! 4292737843b ./gcc/testsuite/g++.old-deja/g++.brendan/template2.C 3262101990b ./gcc/testsuite/g++.old-deja/g++.brendan/template30.C 3508460272b ./gcc/testsuite/g++.old-deja/g++.brendan/template31.C + 1373002312b ./gcc/testsuite/g++.old-deja/g++.brendan/template3.C 2599566194b ./gcc/testsuite/g++.old-deja/g++.brendan/template4.C 575580037b ./gcc/testsuite/g++.old-deja/g++.brendan/template5.C 534471494b ./gcc/testsuite/g++.old-deja/g++.brendan/template6.C *************** *** 5790,5797 **** 2846047998b ./gcc/testsuite/g++.old-deja/g++.brendan/union1.C 823018336b ./gcc/testsuite/g++.old-deja/g++.brendan/union2.C 2620564840b ./gcc/testsuite/g++.old-deja/g++.brendan/union3.C - 2922551156b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility1.C 1914281947b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility10.C 3793323471b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility2.C 399740001b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility3.C 2097292018b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility4.C --- 8662,8669 ---- 2846047998b ./gcc/testsuite/g++.old-deja/g++.brendan/union1.C 823018336b ./gcc/testsuite/g++.old-deja/g++.brendan/union2.C 2620564840b ./gcc/testsuite/g++.old-deja/g++.brendan/union3.C 1914281947b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility10.C + 2922551156b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility1.C 3793323471b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility2.C 399740001b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility3.C 2097292018b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility4.C *************** *** 5801,5808 **** 1186381819b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility8.C 350593631b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility9.C 1417363197b ./gcc/testsuite/g++.old-deja/g++.brendan/vtables1.C - 4011038443b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings1.C 2127742392b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings10.C 752421094b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C 2267971773b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings3.C 60611814b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings4.C --- 8673,8680 ---- 1186381819b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility8.C 350593631b ./gcc/testsuite/g++.old-deja/g++.brendan/visibility9.C 1417363197b ./gcc/testsuite/g++.old-deja/g++.brendan/vtables1.C 2127742392b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings10.C + 4011038443b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings1.C 752421094b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C 2267971773b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings3.C 60611814b ./gcc/testsuite/g++.old-deja/g++.brendan/warnings4.C *************** *** 5831,5837 **** 780393726b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_01.C 6412645b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_02.C 4275693472b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_03.C ! 1292327254b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_05.C 4037536992b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_06.C 2622921904b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_07.C 690087876b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_08.C --- 8703,8709 ---- 780393726b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_01.C 6412645b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_02.C 4275693472b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_03.C ! 1360950010b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_05.C 4037536992b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_06.C 2622921904b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_07.C 690087876b ./gcc/testsuite/g++.old-deja/g++.bugs/900210_08.C *************** *** 5840,5846 **** 1256707550b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_01.C 1084090140b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_02.C 3916124462b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_03.C ! 241770712b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_04.C 1582696199b ./gcc/testsuite/g++.old-deja/g++.bugs/900212_01.C 1974918899b ./gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C 203635920b ./gcc/testsuite/g++.old-deja/g++.bugs/900212_03.C --- 8712,8718 ---- 1256707550b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_01.C 1084090140b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_02.C 3916124462b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_03.C ! 1795465936b ./gcc/testsuite/g++.old-deja/g++.bugs/900211_04.C 1582696199b ./gcc/testsuite/g++.old-deja/g++.bugs/900212_01.C 1974918899b ./gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C 203635920b ./gcc/testsuite/g++.old-deja/g++.bugs/900212_03.C *************** *** 5856,5862 **** 1290432832b ./gcc/testsuite/g++.old-deja/g++.bugs/900221_01.C 1900361967b ./gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C 1984786856b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_01.C ! 3263132139b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_02.C 3726833614b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_04.C 3208622461b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C 2500096956b ./gcc/testsuite/g++.old-deja/g++.bugs/900322_01.C --- 8728,8734 ---- 1290432832b ./gcc/testsuite/g++.old-deja/g++.bugs/900221_01.C 1900361967b ./gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C 1984786856b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_01.C ! 454013245b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_02.C 3726833614b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_04.C 3208622461b ./gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C 2500096956b ./gcc/testsuite/g++.old-deja/g++.bugs/900322_01.C *************** *** 5877,5883 **** 1163828267b ./gcc/testsuite/g++.old-deja/g++.bugs/900403_01.C 4141739844b ./gcc/testsuite/g++.old-deja/g++.bugs/900403_04.C 1907728591b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C ! 2723342095b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C 1026865843b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C 1793308826b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C 3075423771b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_07.C --- 8749,8755 ---- 1163828267b ./gcc/testsuite/g++.old-deja/g++.bugs/900403_01.C 4141739844b ./gcc/testsuite/g++.old-deja/g++.bugs/900403_04.C 1907728591b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_01.C ! 2255023242b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C 1026865843b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C 1793308826b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C 3075423771b ./gcc/testsuite/g++.old-deja/g++.bugs/900404_07.C *************** *** 5891,5897 **** 2638840723b ./gcc/testsuite/g++.old-deja/g++.bugs/900511_01.C 1121452894b ./gcc/testsuite/g++.old-deja/g++.bugs/900511_02.C 2969943864b ./gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C ! 3359430702b ./gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C 2924879685b ./gcc/testsuite/g++.old-deja/g++.bugs/900519_01.C 1121534730b ./gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C 4018294577b ./gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C --- 8763,8769 ---- 2638840723b ./gcc/testsuite/g++.old-deja/g++.bugs/900511_01.C 1121452894b ./gcc/testsuite/g++.old-deja/g++.bugs/900511_02.C 2969943864b ./gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C ! 550376552b ./gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C 2924879685b ./gcc/testsuite/g++.old-deja/g++.bugs/900519_01.C 1121534730b ./gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C 4018294577b ./gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C *************** *** 5906,5919 **** 592030193b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_03.C 3373505469b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_04.C 1381261051b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C ! 3515041132b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_06.C ! 1287054743b ./gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C ! 669779261b ./gcc/testsuite/g++.old-deja/g++.eh/catch1.C 3799957377b ./gcc/testsuite/g++.old-deja/g++.eh/catch10.C 2291520496b ./gcc/testsuite/g++.old-deja/g++.eh/catch11.C 3311967999b ./gcc/testsuite/g++.old-deja/g++.eh/catch12.C 3320439198b ./gcc/testsuite/g++.old-deja/g++.eh/catch13.C 998245899b ./gcc/testsuite/g++.old-deja/g++.eh/catch14.C 2873880433b ./gcc/testsuite/g++.old-deja/g++.eh/catch2.C 2886528606b ./gcc/testsuite/g++.old-deja/g++.eh/catch3.C 237405446b ./gcc/testsuite/g++.old-deja/g++.eh/catch3p.C --- 8778,8791 ---- 592030193b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_03.C 3373505469b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_04.C 1381261051b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C ! 1154797658b ./gcc/testsuite/g++.old-deja/g++.bugs/900520_06.C ! 1025142468b ./gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C 3799957377b ./gcc/testsuite/g++.old-deja/g++.eh/catch10.C 2291520496b ./gcc/testsuite/g++.old-deja/g++.eh/catch11.C 3311967999b ./gcc/testsuite/g++.old-deja/g++.eh/catch12.C 3320439198b ./gcc/testsuite/g++.old-deja/g++.eh/catch13.C 998245899b ./gcc/testsuite/g++.old-deja/g++.eh/catch14.C + 669779261b ./gcc/testsuite/g++.old-deja/g++.eh/catch1.C 2873880433b ./gcc/testsuite/g++.old-deja/g++.eh/catch2.C 2886528606b ./gcc/testsuite/g++.old-deja/g++.eh/catch3.C 237405446b ./gcc/testsuite/g++.old-deja/g++.eh/catch3p.C *************** *** 5962,5968 **** 3512769980b ./gcc/testsuite/g++.old-deja/g++.eh/spec3.C 733574694b ./gcc/testsuite/g++.old-deja/g++.eh/spec4.C 3529701833b ./gcc/testsuite/g++.old-deja/g++.eh/spec5.C ! 3545946102b ./gcc/testsuite/g++.old-deja/g++.eh/spec6.C 3657524244b ./gcc/testsuite/g++.old-deja/g++.eh/spec7.C 1957276023b ./gcc/testsuite/g++.old-deja/g++.eh/terminate1.C 2882522407b ./gcc/testsuite/g++.old-deja/g++.eh/terminate2.C --- 8834,8840 ---- 3512769980b ./gcc/testsuite/g++.old-deja/g++.eh/spec3.C 733574694b ./gcc/testsuite/g++.old-deja/g++.eh/spec4.C 3529701833b ./gcc/testsuite/g++.old-deja/g++.eh/spec5.C ! 2735477777b ./gcc/testsuite/g++.old-deja/g++.eh/spec6.C 3657524244b ./gcc/testsuite/g++.old-deja/g++.eh/spec7.C 1957276023b ./gcc/testsuite/g++.old-deja/g++.eh/terminate1.C 2882522407b ./gcc/testsuite/g++.old-deja/g++.eh/terminate2.C *************** *** 5990,5997 **** 2976027349b ./gcc/testsuite/g++.old-deja/g++.ext/array2.C 3272522793b ./gcc/testsuite/g++.old-deja/g++.ext/array3.C 3707624253b ./gcc/testsuite/g++.old-deja/g++.ext/array4.C - 1417245570b ./gcc/testsuite/g++.old-deja/g++.ext/arrnew.C 2445582885b ./gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C 3682137158b ./gcc/testsuite/g++.old-deja/g++.ext/asmspec1.C 4101102615b ./gcc/testsuite/g++.old-deja/g++.ext/attrib1.C 3350275577b ./gcc/testsuite/g++.old-deja/g++.ext/attrib2.C --- 8862,8869 ---- 2976027349b ./gcc/testsuite/g++.old-deja/g++.ext/array2.C 3272522793b ./gcc/testsuite/g++.old-deja/g++.ext/array3.C 3707624253b ./gcc/testsuite/g++.old-deja/g++.ext/array4.C 2445582885b ./gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C + 1380113065b ./gcc/testsuite/g++.old-deja/g++.ext/arrnew.C 3682137158b ./gcc/testsuite/g++.old-deja/g++.ext/asmspec1.C 4101102615b ./gcc/testsuite/g++.old-deja/g++.ext/attrib1.C 3350275577b ./gcc/testsuite/g++.old-deja/g++.ext/attrib2.C *************** *** 6006,6022 **** 1220140779b ./gcc/testsuite/g++.old-deja/g++.ext/jump1.C 3122237559b ./gcc/testsuite/g++.old-deja/g++.ext/label1.C 1955233630b ./gcc/testsuite/g++.old-deja/g++.ext/label2.C ! 1587813183b ./gcc/testsuite/g++.old-deja/g++.ext/memconst.C 3051345065b ./gcc/testsuite/g++.old-deja/g++.ext/namedret1.C 1721594512b ./gcc/testsuite/g++.old-deja/g++.ext/namedret2.C 1693910821b ./gcc/testsuite/g++.old-deja/g++.ext/namedret3.C 4236509390b ./gcc/testsuite/g++.old-deja/g++.ext/noweak1.C 1485906792b ./gcc/testsuite/g++.old-deja/g++.ext/null1.C 1534627522b ./gcc/testsuite/g++.old-deja/g++.ext/overload1.C - 2953041955b ./gcc/testsuite/g++.old-deja/g++.ext/pretty.C 2789279145b ./gcc/testsuite/g++.old-deja/g++.ext/pretty2.C 1721106953b ./gcc/testsuite/g++.old-deja/g++.ext/pretty3.C 2283773682b ./gcc/testsuite/g++.old-deja/g++.ext/pretty4.C 1326958568b ./gcc/testsuite/g++.old-deja/g++.ext/restrict1.C 1853972109b ./gcc/testsuite/g++.old-deja/g++.ext/return1.C 463327965b ./gcc/testsuite/g++.old-deja/g++.ext/stmtexpr1.C --- 8878,8894 ---- 1220140779b ./gcc/testsuite/g++.old-deja/g++.ext/jump1.C 3122237559b ./gcc/testsuite/g++.old-deja/g++.ext/label1.C 1955233630b ./gcc/testsuite/g++.old-deja/g++.ext/label2.C ! 1417153132b ./gcc/testsuite/g++.old-deja/g++.ext/memconst.C 3051345065b ./gcc/testsuite/g++.old-deja/g++.ext/namedret1.C 1721594512b ./gcc/testsuite/g++.old-deja/g++.ext/namedret2.C 1693910821b ./gcc/testsuite/g++.old-deja/g++.ext/namedret3.C 4236509390b ./gcc/testsuite/g++.old-deja/g++.ext/noweak1.C 1485906792b ./gcc/testsuite/g++.old-deja/g++.ext/null1.C 1534627522b ./gcc/testsuite/g++.old-deja/g++.ext/overload1.C 2789279145b ./gcc/testsuite/g++.old-deja/g++.ext/pretty2.C 1721106953b ./gcc/testsuite/g++.old-deja/g++.ext/pretty3.C 2283773682b ./gcc/testsuite/g++.old-deja/g++.ext/pretty4.C + 2953041955b ./gcc/testsuite/g++.old-deja/g++.ext/pretty.C 1326958568b ./gcc/testsuite/g++.old-deja/g++.ext/restrict1.C 1853972109b ./gcc/testsuite/g++.old-deja/g++.ext/return1.C 463327965b ./gcc/testsuite/g++.old-deja/g++.ext/stmtexpr1.C *************** *** 6040,6046 **** 732967750b ./gcc/testsuite/g++.old-deja/g++.gb/scope13.C 939161176b ./gcc/testsuite/g++.old-deja/g++.jason/2371.C 3968774299b ./gcc/testsuite/g++.old-deja/g++.jason/3523.C - 906409788b ./gcc/testsuite/g++.old-deja/g++.jason/access1.C 1546884424b ./gcc/testsuite/g++.old-deja/g++.jason/access10.C 739404807b ./gcc/testsuite/g++.old-deja/g++.jason/access11.C 512908443b ./gcc/testsuite/g++.old-deja/g++.jason/access12.C --- 8912,8917 ---- *************** *** 6050,6107 **** 667302295b ./gcc/testsuite/g++.old-deja/g++.jason/access16.C 2572582943b ./gcc/testsuite/g++.old-deja/g++.jason/access17.C 2772251892b ./gcc/testsuite/g++.old-deja/g++.jason/access18.C ! 3689044609b ./gcc/testsuite/g++.old-deja/g++.jason/access2.C 2659493566b ./gcc/testsuite/g++.old-deja/g++.jason/access20.C 2929579271b ./gcc/testsuite/g++.old-deja/g++.jason/access21.C 3020128764b ./gcc/testsuite/g++.old-deja/g++.jason/access22.C 2730640435b ./gcc/testsuite/g++.old-deja/g++.jason/access23.C 338921992b ./gcc/testsuite/g++.old-deja/g++.jason/access24.C 642011051b ./gcc/testsuite/g++.old-deja/g++.jason/access3.C 3641897763b ./gcc/testsuite/g++.old-deja/g++.jason/access4.C 3768207880b ./gcc/testsuite/g++.old-deja/g++.jason/access5.C 1482167820b ./gcc/testsuite/g++.old-deja/g++.jason/access6.C 2788333672b ./gcc/testsuite/g++.old-deja/g++.jason/access7.C ! 3806038473b ./gcc/testsuite/g++.old-deja/g++.jason/access8.C 570522205b ./gcc/testsuite/g++.old-deja/g++.jason/access9.C 2808067800b ./gcc/testsuite/g++.old-deja/g++.jason/aggregate.C 3728379159b ./gcc/testsuite/g++.old-deja/g++.jason/ambig1.C 2153743197b ./gcc/testsuite/g++.old-deja/g++.jason/ambig2.C 970394079b ./gcc/testsuite/g++.old-deja/g++.jason/ambig3.C - 3828622053b ./gcc/testsuite/g++.old-deja/g++.jason/anon.C 3198278705b ./gcc/testsuite/g++.old-deja/g++.jason/anon2.C 221090634b ./gcc/testsuite/g++.old-deja/g++.jason/anon3.C 1050500875b ./gcc/testsuite/g++.old-deja/g++.jason/anon4.C ! 3877580602b ./gcc/testsuite/g++.old-deja/g++.jason/binding.C 1263298999b ./gcc/testsuite/g++.old-deja/g++.jason/binding2.C 2916172455b ./gcc/testsuite/g++.old-deja/g++.jason/binding3.C ! 876810594b ./gcc/testsuite/g++.old-deja/g++.jason/bool.C 406790293b ./gcc/testsuite/g++.old-deja/g++.jason/bool2.C 4269822269b ./gcc/testsuite/g++.old-deja/g++.jason/bool3.C 4291089432b ./gcc/testsuite/g++.old-deja/g++.jason/bool4.C 423379068b ./gcc/testsuite/g++.old-deja/g++.jason/bool5.C 3708944851b ./gcc/testsuite/g++.old-deja/g++.jason/bool6.C 2188617432b ./gcc/testsuite/g++.old-deja/g++.jason/bool7.C ! 1992610065b ./gcc/testsuite/g++.old-deja/g++.jason/builtin.C 910455504b ./gcc/testsuite/g++.old-deja/g++.jason/builtin2.C ! 2992950563b ./gcc/testsuite/g++.old-deja/g++.jason/byval.C 3965054847b ./gcc/testsuite/g++.old-deja/g++.jason/byval2.C 3007011667b ./gcc/testsuite/g++.old-deja/g++.jason/byval3.C ! 1840939242b ./gcc/testsuite/g++.old-deja/g++.jason/c-inline.C 4208843404b ./gcc/testsuite/g++.old-deja/g++.jason/cast1.C 864249402b ./gcc/testsuite/g++.old-deja/g++.jason/cast2.C 3757749527b ./gcc/testsuite/g++.old-deja/g++.jason/cast3.C ! 807930816b ./gcc/testsuite/g++.old-deja/g++.jason/cleanup.C 3337873852b ./gcc/testsuite/g++.old-deja/g++.jason/cleanup2.C 4038763735b ./gcc/testsuite/g++.old-deja/g++.jason/complete1.C - 4148991120b ./gcc/testsuite/g++.old-deja/g++.jason/cond.C 2828665920b ./gcc/testsuite/g++.old-deja/g++.jason/cond2.C 3479274833b ./gcc/testsuite/g++.old-deja/g++.jason/condexp.C - 455783151b ./gcc/testsuite/g++.old-deja/g++.jason/const.C 1286943233b ./gcc/testsuite/g++.old-deja/g++.jason/const2.C 1359832484b ./gcc/testsuite/g++.old-deja/g++.jason/const3.C 217115665b ./gcc/testsuite/g++.old-deja/g++.jason/const4.C 2571490602b ./gcc/testsuite/g++.old-deja/g++.jason/context.C - 390853410b ./gcc/testsuite/g++.old-deja/g++.jason/conversion.C 3177251757b ./gcc/testsuite/g++.old-deja/g++.jason/conversion10.C 79208780b ./gcc/testsuite/g++.old-deja/g++.jason/conversion11.C 960166000b ./gcc/testsuite/g++.old-deja/g++.jason/conversion2.C --- 8921,8978 ---- 667302295b ./gcc/testsuite/g++.old-deja/g++.jason/access16.C 2572582943b ./gcc/testsuite/g++.old-deja/g++.jason/access17.C 2772251892b ./gcc/testsuite/g++.old-deja/g++.jason/access18.C ! 906409788b ./gcc/testsuite/g++.old-deja/g++.jason/access1.C 2659493566b ./gcc/testsuite/g++.old-deja/g++.jason/access20.C 2929579271b ./gcc/testsuite/g++.old-deja/g++.jason/access21.C 3020128764b ./gcc/testsuite/g++.old-deja/g++.jason/access22.C 2730640435b ./gcc/testsuite/g++.old-deja/g++.jason/access23.C 338921992b ./gcc/testsuite/g++.old-deja/g++.jason/access24.C + 3689044609b ./gcc/testsuite/g++.old-deja/g++.jason/access2.C 642011051b ./gcc/testsuite/g++.old-deja/g++.jason/access3.C 3641897763b ./gcc/testsuite/g++.old-deja/g++.jason/access4.C 3768207880b ./gcc/testsuite/g++.old-deja/g++.jason/access5.C 1482167820b ./gcc/testsuite/g++.old-deja/g++.jason/access6.C 2788333672b ./gcc/testsuite/g++.old-deja/g++.jason/access7.C ! 3860920517b ./gcc/testsuite/g++.old-deja/g++.jason/access8.C 570522205b ./gcc/testsuite/g++.old-deja/g++.jason/access9.C 2808067800b ./gcc/testsuite/g++.old-deja/g++.jason/aggregate.C 3728379159b ./gcc/testsuite/g++.old-deja/g++.jason/ambig1.C 2153743197b ./gcc/testsuite/g++.old-deja/g++.jason/ambig2.C 970394079b ./gcc/testsuite/g++.old-deja/g++.jason/ambig3.C 3198278705b ./gcc/testsuite/g++.old-deja/g++.jason/anon2.C 221090634b ./gcc/testsuite/g++.old-deja/g++.jason/anon3.C 1050500875b ./gcc/testsuite/g++.old-deja/g++.jason/anon4.C ! 3828622053b ./gcc/testsuite/g++.old-deja/g++.jason/anon.C 1263298999b ./gcc/testsuite/g++.old-deja/g++.jason/binding2.C 2916172455b ./gcc/testsuite/g++.old-deja/g++.jason/binding3.C ! 3877580602b ./gcc/testsuite/g++.old-deja/g++.jason/binding.C 406790293b ./gcc/testsuite/g++.old-deja/g++.jason/bool2.C 4269822269b ./gcc/testsuite/g++.old-deja/g++.jason/bool3.C 4291089432b ./gcc/testsuite/g++.old-deja/g++.jason/bool4.C 423379068b ./gcc/testsuite/g++.old-deja/g++.jason/bool5.C 3708944851b ./gcc/testsuite/g++.old-deja/g++.jason/bool6.C 2188617432b ./gcc/testsuite/g++.old-deja/g++.jason/bool7.C ! 876810594b ./gcc/testsuite/g++.old-deja/g++.jason/bool.C 910455504b ./gcc/testsuite/g++.old-deja/g++.jason/builtin2.C ! 1992610065b ./gcc/testsuite/g++.old-deja/g++.jason/builtin.C 3965054847b ./gcc/testsuite/g++.old-deja/g++.jason/byval2.C 3007011667b ./gcc/testsuite/g++.old-deja/g++.jason/byval3.C ! 2992950563b ./gcc/testsuite/g++.old-deja/g++.jason/byval.C 4208843404b ./gcc/testsuite/g++.old-deja/g++.jason/cast1.C 864249402b ./gcc/testsuite/g++.old-deja/g++.jason/cast2.C 3757749527b ./gcc/testsuite/g++.old-deja/g++.jason/cast3.C ! 1840939242b ./gcc/testsuite/g++.old-deja/g++.jason/c-inline.C 3337873852b ./gcc/testsuite/g++.old-deja/g++.jason/cleanup2.C + 807930816b ./gcc/testsuite/g++.old-deja/g++.jason/cleanup.C 4038763735b ./gcc/testsuite/g++.old-deja/g++.jason/complete1.C 2828665920b ./gcc/testsuite/g++.old-deja/g++.jason/cond2.C + 2028612347b ./gcc/testsuite/g++.old-deja/g++.jason/cond.C 3479274833b ./gcc/testsuite/g++.old-deja/g++.jason/condexp.C 1286943233b ./gcc/testsuite/g++.old-deja/g++.jason/const2.C 1359832484b ./gcc/testsuite/g++.old-deja/g++.jason/const3.C 217115665b ./gcc/testsuite/g++.old-deja/g++.jason/const4.C + 455783151b ./gcc/testsuite/g++.old-deja/g++.jason/const.C 2571490602b ./gcc/testsuite/g++.old-deja/g++.jason/context.C 3177251757b ./gcc/testsuite/g++.old-deja/g++.jason/conversion10.C 79208780b ./gcc/testsuite/g++.old-deja/g++.jason/conversion11.C 960166000b ./gcc/testsuite/g++.old-deja/g++.jason/conversion2.C *************** *** 6112,6121 **** 537258674b ./gcc/testsuite/g++.old-deja/g++.jason/conversion7.C 972941297b ./gcc/testsuite/g++.old-deja/g++.jason/conversion8.C 1301591055b ./gcc/testsuite/g++.old-deja/g++.jason/conversion9.C ! 3761548571b ./gcc/testsuite/g++.old-deja/g++.jason/crash1.C 3868623548b ./gcc/testsuite/g++.old-deja/g++.jason/crash10.C 672669842b ./gcc/testsuite/g++.old-deja/g++.jason/crash11.C 2043944323b ./gcc/testsuite/g++.old-deja/g++.jason/crash12.C 2330655654b ./gcc/testsuite/g++.old-deja/g++.jason/crash3.C 631879164b ./gcc/testsuite/g++.old-deja/g++.jason/crash4.C 1898220452b ./gcc/testsuite/g++.old-deja/g++.jason/crash5.C --- 8983,8993 ---- 537258674b ./gcc/testsuite/g++.old-deja/g++.jason/conversion7.C 972941297b ./gcc/testsuite/g++.old-deja/g++.jason/conversion8.C 1301591055b ./gcc/testsuite/g++.old-deja/g++.jason/conversion9.C ! 390853410b ./gcc/testsuite/g++.old-deja/g++.jason/conversion.C 3868623548b ./gcc/testsuite/g++.old-deja/g++.jason/crash10.C 672669842b ./gcc/testsuite/g++.old-deja/g++.jason/crash11.C 2043944323b ./gcc/testsuite/g++.old-deja/g++.jason/crash12.C + 3761548571b ./gcc/testsuite/g++.old-deja/g++.jason/crash1.C 2330655654b ./gcc/testsuite/g++.old-deja/g++.jason/crash3.C 631879164b ./gcc/testsuite/g++.old-deja/g++.jason/crash4.C 1898220452b ./gcc/testsuite/g++.old-deja/g++.jason/crash5.C *************** *** 6135,6151 **** 3740171614b ./gcc/testsuite/g++.old-deja/g++.jason/delete1.C 3574023328b ./gcc/testsuite/g++.old-deja/g++.jason/delete2.C 2124825264b ./gcc/testsuite/g++.old-deja/g++.jason/delete3.C - 2111475973b ./gcc/testsuite/g++.old-deja/g++.jason/destruct.C 2782278746b ./gcc/testsuite/g++.old-deja/g++.jason/destruct2.C 2184115717b ./gcc/testsuite/g++.old-deja/g++.jason/destruct3.C 2354427725b ./gcc/testsuite/g++.old-deja/g++.jason/destruct4.C 1012609499b ./gcc/testsuite/g++.old-deja/g++.jason/dot.C - 2968837117b ./gcc/testsuite/g++.old-deja/g++.jason/dtor.C 2941621886b ./gcc/testsuite/g++.old-deja/g++.jason/dtor2.C 2007513193b ./gcc/testsuite/g++.old-deja/g++.jason/dtor3.C 4216434532b ./gcc/testsuite/g++.old-deja/g++.jason/dtor4.C 2710770854b ./gcc/testsuite/g++.old-deja/g++.jason/dtor5.C ! 1321613329b ./gcc/testsuite/g++.old-deja/g++.jason/enum.C 3290035079b ./gcc/testsuite/g++.old-deja/g++.jason/enum2.C 2249058705b ./gcc/testsuite/g++.old-deja/g++.jason/enum3.C 2986066562b ./gcc/testsuite/g++.old-deja/g++.jason/enum4.C --- 9007,9022 ---- 3740171614b ./gcc/testsuite/g++.old-deja/g++.jason/delete1.C 3574023328b ./gcc/testsuite/g++.old-deja/g++.jason/delete2.C 2124825264b ./gcc/testsuite/g++.old-deja/g++.jason/delete3.C 2782278746b ./gcc/testsuite/g++.old-deja/g++.jason/destruct2.C 2184115717b ./gcc/testsuite/g++.old-deja/g++.jason/destruct3.C 2354427725b ./gcc/testsuite/g++.old-deja/g++.jason/destruct4.C + 2111475973b ./gcc/testsuite/g++.old-deja/g++.jason/destruct.C 1012609499b ./gcc/testsuite/g++.old-deja/g++.jason/dot.C 2941621886b ./gcc/testsuite/g++.old-deja/g++.jason/dtor2.C 2007513193b ./gcc/testsuite/g++.old-deja/g++.jason/dtor3.C 4216434532b ./gcc/testsuite/g++.old-deja/g++.jason/dtor4.C 2710770854b ./gcc/testsuite/g++.old-deja/g++.jason/dtor5.C ! 2968837117b ./gcc/testsuite/g++.old-deja/g++.jason/dtor.C 3290035079b ./gcc/testsuite/g++.old-deja/g++.jason/enum2.C 2249058705b ./gcc/testsuite/g++.old-deja/g++.jason/enum3.C 2986066562b ./gcc/testsuite/g++.old-deja/g++.jason/enum4.C *************** *** 6153,6191 **** 1384011452b ./gcc/testsuite/g++.old-deja/g++.jason/enum6.C 1992437340b ./gcc/testsuite/g++.old-deja/g++.jason/enum7.C 301848339b ./gcc/testsuite/g++.old-deja/g++.jason/enum8.C 4190940764b ./gcc/testsuite/g++.old-deja/g++.jason/explicit.C 2873291254b ./gcc/testsuite/g++.old-deja/g++.jason/expr1.C - 547919805b ./gcc/testsuite/g++.old-deja/g++.jason/friend.C 58017093b ./gcc/testsuite/g++.old-deja/g++.jason/friend2.C 2216580894b ./gcc/testsuite/g++.old-deja/g++.jason/groff1.C 2374680588b ./gcc/testsuite/g++.old-deja/g++.jason/hmc1.C 4181972071b ./gcc/testsuite/g++.old-deja/g++.jason/incomplete1.C 3516752956b ./gcc/testsuite/g++.old-deja/g++.jason/incomplete2.C - 3118714958b ./gcc/testsuite/g++.old-deja/g++.jason/init.C 1181670562b ./gcc/testsuite/g++.old-deja/g++.jason/init2.C 1300989165b ./gcc/testsuite/g++.old-deja/g++.jason/init3.C 1056655196b ./gcc/testsuite/g++.old-deja/g++.jason/init4.C ! 3360472142b ./gcc/testsuite/g++.old-deja/g++.jason/inline.C 1350717964b ./gcc/testsuite/g++.old-deja/g++.jason/inline2.C 3599001559b ./gcc/testsuite/g++.old-deja/g++.jason/inline3.C 1197315088b ./gcc/testsuite/g++.old-deja/g++.jason/jump.C 4143262839b ./gcc/testsuite/g++.old-deja/g++.jason/lex1.C - 4180318534b ./gcc/testsuite/g++.old-deja/g++.jason/lineno.C 3982979093b ./gcc/testsuite/g++.old-deja/g++.jason/lineno2.C 1533566087b ./gcc/testsuite/g++.old-deja/g++.jason/lineno3.C 3991632661b ./gcc/testsuite/g++.old-deja/g++.jason/lineno4.C 2838970132b ./gcc/testsuite/g++.old-deja/g++.jason/lineno5.C 3655803253b ./gcc/testsuite/g++.old-deja/g++.jason/local.C - 1599936145b ./gcc/testsuite/g++.old-deja/g++.jason/lookup.C 1387367938b ./gcc/testsuite/g++.old-deja/g++.jason/lookup2.C 999889620b ./gcc/testsuite/g++.old-deja/g++.jason/lookup3.C ! 2443057294b ./gcc/testsuite/g++.old-deja/g++.jason/loverload.C 568852262b ./gcc/testsuite/g++.old-deja/g++.jason/loverload3.C 3199076242b ./gcc/testsuite/g++.old-deja/g++.jason/loverload4.C ! 3786923619b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue.C 1478776091b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue2.C 2486776920b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue3.C 2798615405b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue4.C 4250081538b ./gcc/testsuite/g++.old-deja/g++.jason/mangle1.C 2194458585b ./gcc/testsuite/g++.old-deja/g++.jason/mangle2.C 3647115525b ./gcc/testsuite/g++.old-deja/g++.jason/mangle3.C --- 9024,9063 ---- 1384011452b ./gcc/testsuite/g++.old-deja/g++.jason/enum6.C 1992437340b ./gcc/testsuite/g++.old-deja/g++.jason/enum7.C 301848339b ./gcc/testsuite/g++.old-deja/g++.jason/enum8.C + 1321613329b ./gcc/testsuite/g++.old-deja/g++.jason/enum.C 4190940764b ./gcc/testsuite/g++.old-deja/g++.jason/explicit.C 2873291254b ./gcc/testsuite/g++.old-deja/g++.jason/expr1.C 58017093b ./gcc/testsuite/g++.old-deja/g++.jason/friend2.C + 547919805b ./gcc/testsuite/g++.old-deja/g++.jason/friend.C 2216580894b ./gcc/testsuite/g++.old-deja/g++.jason/groff1.C 2374680588b ./gcc/testsuite/g++.old-deja/g++.jason/hmc1.C 4181972071b ./gcc/testsuite/g++.old-deja/g++.jason/incomplete1.C 3516752956b ./gcc/testsuite/g++.old-deja/g++.jason/incomplete2.C 1181670562b ./gcc/testsuite/g++.old-deja/g++.jason/init2.C 1300989165b ./gcc/testsuite/g++.old-deja/g++.jason/init3.C 1056655196b ./gcc/testsuite/g++.old-deja/g++.jason/init4.C ! 3118714958b ./gcc/testsuite/g++.old-deja/g++.jason/init.C 1350717964b ./gcc/testsuite/g++.old-deja/g++.jason/inline2.C 3599001559b ./gcc/testsuite/g++.old-deja/g++.jason/inline3.C + 3360472142b ./gcc/testsuite/g++.old-deja/g++.jason/inline.C 1197315088b ./gcc/testsuite/g++.old-deja/g++.jason/jump.C 4143262839b ./gcc/testsuite/g++.old-deja/g++.jason/lex1.C 3982979093b ./gcc/testsuite/g++.old-deja/g++.jason/lineno2.C 1533566087b ./gcc/testsuite/g++.old-deja/g++.jason/lineno3.C 3991632661b ./gcc/testsuite/g++.old-deja/g++.jason/lineno4.C 2838970132b ./gcc/testsuite/g++.old-deja/g++.jason/lineno5.C + 4180318534b ./gcc/testsuite/g++.old-deja/g++.jason/lineno.C 3655803253b ./gcc/testsuite/g++.old-deja/g++.jason/local.C 1387367938b ./gcc/testsuite/g++.old-deja/g++.jason/lookup2.C 999889620b ./gcc/testsuite/g++.old-deja/g++.jason/lookup3.C ! 1599936145b ./gcc/testsuite/g++.old-deja/g++.jason/lookup.C 568852262b ./gcc/testsuite/g++.old-deja/g++.jason/loverload3.C 3199076242b ./gcc/testsuite/g++.old-deja/g++.jason/loverload4.C ! 2443057294b ./gcc/testsuite/g++.old-deja/g++.jason/loverload.C 1478776091b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue2.C 2486776920b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue3.C 2798615405b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue4.C + 3786923619b ./gcc/testsuite/g++.old-deja/g++.jason/lvalue.C 4250081538b ./gcc/testsuite/g++.old-deja/g++.jason/mangle1.C 2194458585b ./gcc/testsuite/g++.old-deja/g++.jason/mangle2.C 3647115525b ./gcc/testsuite/g++.old-deja/g++.jason/mangle3.C *************** *** 6200,6229 **** 626314633b ./gcc/testsuite/g++.old-deja/g++.jason/nested6.C 1780563080b ./gcc/testsuite/g++.old-deja/g++.jason/nested7.C 496854853b ./gcc/testsuite/g++.old-deja/g++.jason/nested8.C - 2330092476b ./gcc/testsuite/g++.old-deja/g++.jason/net.C 814313341b ./gcc/testsuite/g++.old-deja/g++.jason/net2.C ! 761357985b ./gcc/testsuite/g++.old-deja/g++.jason/new.C 4108034998b ./gcc/testsuite/g++.old-deja/g++.jason/new2.C 2192651651b ./gcc/testsuite/g++.old-deja/g++.jason/new3.C 2568972186b ./gcc/testsuite/g++.old-deja/g++.jason/new4.C 3405685275b ./gcc/testsuite/g++.old-deja/g++.jason/new5.C 293878671b ./gcc/testsuite/g++.old-deja/g++.jason/offset1.C 4268803500b ./gcc/testsuite/g++.old-deja/g++.jason/offset2.C 3340471795b ./gcc/testsuite/g++.old-deja/g++.jason/offset3.C 832296383b ./gcc/testsuite/g++.old-deja/g++.jason/offset4.C - 1753231050b ./gcc/testsuite/g++.old-deja/g++.jason/opeq.C 1182090566b ./gcc/testsuite/g++.old-deja/g++.jason/opeq2.C 454853917b ./gcc/testsuite/g++.old-deja/g++.jason/opeq3.C 2472414567b ./gcc/testsuite/g++.old-deja/g++.jason/opeq4.C 238172458b ./gcc/testsuite/g++.old-deja/g++.jason/opeq5.C 4059740226b ./gcc/testsuite/g++.old-deja/g++.jason/opeq6.C ! 577328766b ./gcc/testsuite/g++.old-deja/g++.jason/operator.C 688207169b ./gcc/testsuite/g++.old-deja/g++.jason/operator2.C 754653379b ./gcc/testsuite/g++.old-deja/g++.jason/opover.C - 1303452248b ./gcc/testsuite/g++.old-deja/g++.jason/optimize.C 2635243370b ./gcc/testsuite/g++.old-deja/g++.jason/optimize2.C ! 2991781301b ./gcc/testsuite/g++.old-deja/g++.jason/overload.C ! 3391930718b ./gcc/testsuite/g++.old-deja/g++.jason/overload1.C 836020261b ./gcc/testsuite/g++.old-deja/g++.jason/overload11.C 3916743053b ./gcc/testsuite/g++.old-deja/g++.jason/overload12.C 2565712491b ./gcc/testsuite/g++.old-deja/g++.jason/overload13.C --- 9072,9099 ---- 626314633b ./gcc/testsuite/g++.old-deja/g++.jason/nested6.C 1780563080b ./gcc/testsuite/g++.old-deja/g++.jason/nested7.C 496854853b ./gcc/testsuite/g++.old-deja/g++.jason/nested8.C 814313341b ./gcc/testsuite/g++.old-deja/g++.jason/net2.C ! 2330092476b ./gcc/testsuite/g++.old-deja/g++.jason/net.C 4108034998b ./gcc/testsuite/g++.old-deja/g++.jason/new2.C 2192651651b ./gcc/testsuite/g++.old-deja/g++.jason/new3.C 2568972186b ./gcc/testsuite/g++.old-deja/g++.jason/new4.C 3405685275b ./gcc/testsuite/g++.old-deja/g++.jason/new5.C + 761357985b ./gcc/testsuite/g++.old-deja/g++.jason/new.C 293878671b ./gcc/testsuite/g++.old-deja/g++.jason/offset1.C 4268803500b ./gcc/testsuite/g++.old-deja/g++.jason/offset2.C 3340471795b ./gcc/testsuite/g++.old-deja/g++.jason/offset3.C 832296383b ./gcc/testsuite/g++.old-deja/g++.jason/offset4.C 1182090566b ./gcc/testsuite/g++.old-deja/g++.jason/opeq2.C 454853917b ./gcc/testsuite/g++.old-deja/g++.jason/opeq3.C 2472414567b ./gcc/testsuite/g++.old-deja/g++.jason/opeq4.C 238172458b ./gcc/testsuite/g++.old-deja/g++.jason/opeq5.C 4059740226b ./gcc/testsuite/g++.old-deja/g++.jason/opeq6.C ! 1753231050b ./gcc/testsuite/g++.old-deja/g++.jason/opeq.C 688207169b ./gcc/testsuite/g++.old-deja/g++.jason/operator2.C + 577328766b ./gcc/testsuite/g++.old-deja/g++.jason/operator.C 754653379b ./gcc/testsuite/g++.old-deja/g++.jason/opover.C 2635243370b ./gcc/testsuite/g++.old-deja/g++.jason/optimize2.C ! 1303452248b ./gcc/testsuite/g++.old-deja/g++.jason/optimize.C 836020261b ./gcc/testsuite/g++.old-deja/g++.jason/overload11.C 3916743053b ./gcc/testsuite/g++.old-deja/g++.jason/overload12.C 2565712491b ./gcc/testsuite/g++.old-deja/g++.jason/overload13.C *************** *** 6233,6239 **** 996751401b ./gcc/testsuite/g++.old-deja/g++.jason/overload17.C 3773007718b ./gcc/testsuite/g++.old-deja/g++.jason/overload18.C 2041143457b ./gcc/testsuite/g++.old-deja/g++.jason/overload19.C ! 1769317874b ./gcc/testsuite/g++.old-deja/g++.jason/overload2.C 1992601156b ./gcc/testsuite/g++.old-deja/g++.jason/overload20.C 415714207b ./gcc/testsuite/g++.old-deja/g++.jason/overload21.C 109216083b ./gcc/testsuite/g++.old-deja/g++.jason/overload22.C --- 9103,9109 ---- 996751401b ./gcc/testsuite/g++.old-deja/g++.jason/overload17.C 3773007718b ./gcc/testsuite/g++.old-deja/g++.jason/overload18.C 2041143457b ./gcc/testsuite/g++.old-deja/g++.jason/overload19.C ! 3391930718b ./gcc/testsuite/g++.old-deja/g++.jason/overload1.C 1992601156b ./gcc/testsuite/g++.old-deja/g++.jason/overload20.C 415714207b ./gcc/testsuite/g++.old-deja/g++.jason/overload21.C 109216083b ./gcc/testsuite/g++.old-deja/g++.jason/overload22.C *************** *** 6243,6249 **** 2193486232b ./gcc/testsuite/g++.old-deja/g++.jason/overload27.C 2342247690b ./gcc/testsuite/g++.old-deja/g++.jason/overload28.C 4082490103b ./gcc/testsuite/g++.old-deja/g++.jason/overload29.C ! 1344900458b ./gcc/testsuite/g++.old-deja/g++.jason/overload3.C 1565023156b ./gcc/testsuite/g++.old-deja/g++.jason/overload30.C 1649077682b ./gcc/testsuite/g++.old-deja/g++.jason/overload31.C 3667286916b ./gcc/testsuite/g++.old-deja/g++.jason/overload32.C --- 9113,9119 ---- 2193486232b ./gcc/testsuite/g++.old-deja/g++.jason/overload27.C 2342247690b ./gcc/testsuite/g++.old-deja/g++.jason/overload28.C 4082490103b ./gcc/testsuite/g++.old-deja/g++.jason/overload29.C ! 1769317874b ./gcc/testsuite/g++.old-deja/g++.jason/overload2.C 1565023156b ./gcc/testsuite/g++.old-deja/g++.jason/overload30.C 1649077682b ./gcc/testsuite/g++.old-deja/g++.jason/overload31.C 3667286916b ./gcc/testsuite/g++.old-deja/g++.jason/overload32.C *************** *** 6251,6268 **** 3641493497b ./gcc/testsuite/g++.old-deja/g++.jason/overload34.C 3176325712b ./gcc/testsuite/g++.old-deja/g++.jason/overload35.C 3976015069b ./gcc/testsuite/g++.old-deja/g++.jason/overload36.C 1743964910b ./gcc/testsuite/g++.old-deja/g++.jason/overload4.C 2748549869b ./gcc/testsuite/g++.old-deja/g++.jason/overload5.C 2771085460b ./gcc/testsuite/g++.old-deja/g++.jason/overload6.C 4124673438b ./gcc/testsuite/g++.old-deja/g++.jason/overload7.C 2918456708b ./gcc/testsuite/g++.old-deja/g++.jason/overload8.C 2194408276b ./gcc/testsuite/g++.old-deja/g++.jason/overload9.C ! 4063544381b ./gcc/testsuite/g++.old-deja/g++.jason/parse1.C 947289597b ./gcc/testsuite/g++.old-deja/g++.jason/parse10.C 3841541211b ./gcc/testsuite/g++.old-deja/g++.jason/parse11.C 3217450619b ./gcc/testsuite/g++.old-deja/g++.jason/parse12.C 1215499670b ./gcc/testsuite/g++.old-deja/g++.jason/parse13.C 3456522595b ./gcc/testsuite/g++.old-deja/g++.jason/parse14.C 3921597478b ./gcc/testsuite/g++.old-deja/g++.jason/parse2.C 2265325245b ./gcc/testsuite/g++.old-deja/g++.jason/parse3.C 1946466186b ./gcc/testsuite/g++.old-deja/g++.jason/parse4.C --- 9121,9140 ---- 3641493497b ./gcc/testsuite/g++.old-deja/g++.jason/overload34.C 3176325712b ./gcc/testsuite/g++.old-deja/g++.jason/overload35.C 3976015069b ./gcc/testsuite/g++.old-deja/g++.jason/overload36.C + 1344900458b ./gcc/testsuite/g++.old-deja/g++.jason/overload3.C 1743964910b ./gcc/testsuite/g++.old-deja/g++.jason/overload4.C 2748549869b ./gcc/testsuite/g++.old-deja/g++.jason/overload5.C 2771085460b ./gcc/testsuite/g++.old-deja/g++.jason/overload6.C 4124673438b ./gcc/testsuite/g++.old-deja/g++.jason/overload7.C 2918456708b ./gcc/testsuite/g++.old-deja/g++.jason/overload8.C 2194408276b ./gcc/testsuite/g++.old-deja/g++.jason/overload9.C ! 2991781301b ./gcc/testsuite/g++.old-deja/g++.jason/overload.C 947289597b ./gcc/testsuite/g++.old-deja/g++.jason/parse10.C 3841541211b ./gcc/testsuite/g++.old-deja/g++.jason/parse11.C 3217450619b ./gcc/testsuite/g++.old-deja/g++.jason/parse12.C 1215499670b ./gcc/testsuite/g++.old-deja/g++.jason/parse13.C 3456522595b ./gcc/testsuite/g++.old-deja/g++.jason/parse14.C + 4063544381b ./gcc/testsuite/g++.old-deja/g++.jason/parse1.C 3921597478b ./gcc/testsuite/g++.old-deja/g++.jason/parse2.C 2265325245b ./gcc/testsuite/g++.old-deja/g++.jason/parse3.C 1946466186b ./gcc/testsuite/g++.old-deja/g++.jason/parse4.C *************** *** 6271,6281 **** 1407239852b ./gcc/testsuite/g++.old-deja/g++.jason/parse7.C 2608587867b ./gcc/testsuite/g++.old-deja/g++.jason/parse8.C 2097676131b ./gcc/testsuite/g++.old-deja/g++.jason/parse9.C - 3300711445b ./gcc/testsuite/g++.old-deja/g++.jason/pmem.C 2869094375b ./gcc/testsuite/g++.old-deja/g++.jason/pmem2.C 515838035b ./gcc/testsuite/g++.old-deja/g++.jason/pmem3.C 882646803b ./gcc/testsuite/g++.old-deja/g++.jason/pmem4.C ! 2275329075b ./gcc/testsuite/g++.old-deja/g++.jason/pmf.C 2099557976b ./gcc/testsuite/g++.old-deja/g++.jason/pmf2.C 2245415039b ./gcc/testsuite/g++.old-deja/g++.jason/pmf3.C 2911197085b ./gcc/testsuite/g++.old-deja/g++.jason/pmf4.C --- 9143,9152 ---- 1407239852b ./gcc/testsuite/g++.old-deja/g++.jason/parse7.C 2608587867b ./gcc/testsuite/g++.old-deja/g++.jason/parse8.C 2097676131b ./gcc/testsuite/g++.old-deja/g++.jason/parse9.C 2869094375b ./gcc/testsuite/g++.old-deja/g++.jason/pmem2.C 515838035b ./gcc/testsuite/g++.old-deja/g++.jason/pmem3.C 882646803b ./gcc/testsuite/g++.old-deja/g++.jason/pmem4.C ! 3300711445b ./gcc/testsuite/g++.old-deja/g++.jason/pmem.C 2099557976b ./gcc/testsuite/g++.old-deja/g++.jason/pmf2.C 2245415039b ./gcc/testsuite/g++.old-deja/g++.jason/pmf3.C 2911197085b ./gcc/testsuite/g++.old-deja/g++.jason/pmf4.C *************** *** 6284,6296 **** 2487032279b ./gcc/testsuite/g++.old-deja/g++.jason/pmf7.C 2987146868b ./gcc/testsuite/g++.old-deja/g++.jason/pmf8.C 788166114b ./gcc/testsuite/g++.old-deja/g++.jason/pmf9.C 1423191415b ./gcc/testsuite/g++.old-deja/g++.jason/pmftemp.C 2592898175b ./gcc/testsuite/g++.old-deja/g++.jason/precedence.C 2132972863b ./gcc/testsuite/g++.old-deja/g++.jason/redecl1.C - 829230497b ./gcc/testsuite/g++.old-deja/g++.jason/ref1.C 2423430425b ./gcc/testsuite/g++.old-deja/g++.jason/ref10.C 252373474b ./gcc/testsuite/g++.old-deja/g++.jason/ref11.C 4220963029b ./gcc/testsuite/g++.old-deja/g++.jason/ref12.C 1138343018b ./gcc/testsuite/g++.old-deja/g++.jason/ref2.C 4198332542b ./gcc/testsuite/g++.old-deja/g++.jason/ref3.C 3108698233b ./gcc/testsuite/g++.old-deja/g++.jason/ref4.C --- 9155,9168 ---- 2487032279b ./gcc/testsuite/g++.old-deja/g++.jason/pmf7.C 2987146868b ./gcc/testsuite/g++.old-deja/g++.jason/pmf8.C 788166114b ./gcc/testsuite/g++.old-deja/g++.jason/pmf9.C + 2275329075b ./gcc/testsuite/g++.old-deja/g++.jason/pmf.C 1423191415b ./gcc/testsuite/g++.old-deja/g++.jason/pmftemp.C 2592898175b ./gcc/testsuite/g++.old-deja/g++.jason/precedence.C 2132972863b ./gcc/testsuite/g++.old-deja/g++.jason/redecl1.C 2423430425b ./gcc/testsuite/g++.old-deja/g++.jason/ref10.C 252373474b ./gcc/testsuite/g++.old-deja/g++.jason/ref11.C 4220963029b ./gcc/testsuite/g++.old-deja/g++.jason/ref12.C + 829230497b ./gcc/testsuite/g++.old-deja/g++.jason/ref1.C 1138343018b ./gcc/testsuite/g++.old-deja/g++.jason/ref2.C 4198332542b ./gcc/testsuite/g++.old-deja/g++.jason/ref3.C 3108698233b ./gcc/testsuite/g++.old-deja/g++.jason/ref4.C *************** *** 6300,6309 **** 1357591997b ./gcc/testsuite/g++.old-deja/g++.jason/ref8.C 1262470243b ./gcc/testsuite/g++.old-deja/g++.jason/ref9.C 1378933083b ./gcc/testsuite/g++.old-deja/g++.jason/report.C - 2084961742b ./gcc/testsuite/g++.old-deja/g++.jason/return.C 1302488236b ./gcc/testsuite/g++.old-deja/g++.jason/return2.C 1422012899b ./gcc/testsuite/g++.old-deja/g++.jason/return3.C ! 4282982182b ./gcc/testsuite/g++.old-deja/g++.jason/rfg1.C 364370005b ./gcc/testsuite/g++.old-deja/g++.jason/rfg10.C 3958400971b ./gcc/testsuite/g++.old-deja/g++.jason/rfg11.C 288348052b ./gcc/testsuite/g++.old-deja/g++.jason/rfg12.C --- 9172,9180 ---- 1357591997b ./gcc/testsuite/g++.old-deja/g++.jason/ref8.C 1262470243b ./gcc/testsuite/g++.old-deja/g++.jason/ref9.C 1378933083b ./gcc/testsuite/g++.old-deja/g++.jason/report.C 1302488236b ./gcc/testsuite/g++.old-deja/g++.jason/return2.C 1422012899b ./gcc/testsuite/g++.old-deja/g++.jason/return3.C ! 2084961742b ./gcc/testsuite/g++.old-deja/g++.jason/return.C 364370005b ./gcc/testsuite/g++.old-deja/g++.jason/rfg10.C 3958400971b ./gcc/testsuite/g++.old-deja/g++.jason/rfg11.C 288348052b ./gcc/testsuite/g++.old-deja/g++.jason/rfg12.C *************** *** 6312,6318 **** 2961300206b ./gcc/testsuite/g++.old-deja/g++.jason/rfg16.C 3703739742b ./gcc/testsuite/g++.old-deja/g++.jason/rfg17.C 3495930194b ./gcc/testsuite/g++.old-deja/g++.jason/rfg18.C ! 3117732826b ./gcc/testsuite/g++.old-deja/g++.jason/rfg2.C 3118729702b ./gcc/testsuite/g++.old-deja/g++.jason/rfg20.C 258053642b ./gcc/testsuite/g++.old-deja/g++.jason/rfg21.C 1272258763b ./gcc/testsuite/g++.old-deja/g++.jason/rfg22.C --- 9183,9189 ---- 2961300206b ./gcc/testsuite/g++.old-deja/g++.jason/rfg16.C 3703739742b ./gcc/testsuite/g++.old-deja/g++.jason/rfg17.C 3495930194b ./gcc/testsuite/g++.old-deja/g++.jason/rfg18.C ! 4282982182b ./gcc/testsuite/g++.old-deja/g++.jason/rfg1.C 3118729702b ./gcc/testsuite/g++.old-deja/g++.jason/rfg20.C 258053642b ./gcc/testsuite/g++.old-deja/g++.jason/rfg21.C 1272258763b ./gcc/testsuite/g++.old-deja/g++.jason/rfg22.C *************** *** 6322,6327 **** --- 9193,9199 ---- 4125676781b ./gcc/testsuite/g++.old-deja/g++.jason/rfg26.C 2764234637b ./gcc/testsuite/g++.old-deja/g++.jason/rfg27.C 838463016b ./gcc/testsuite/g++.old-deja/g++.jason/rfg28.C + 3117732826b ./gcc/testsuite/g++.old-deja/g++.jason/rfg2.C 148681664b ./gcc/testsuite/g++.old-deja/g++.jason/rfg3.C 3129549671b ./gcc/testsuite/g++.old-deja/g++.jason/rfg4.C 295301056b ./gcc/testsuite/g++.old-deja/g++.jason/rfg5.C *************** *** 6332,6338 **** 4260838706b ./gcc/testsuite/g++.old-deja/g++.jason/rvalue1.C 2113044148b ./gcc/testsuite/g++.old-deja/g++.jason/rvalue2.C 3051419482b ./gcc/testsuite/g++.old-deja/g++.jason/rvalue3.C - 2200136874b ./gcc/testsuite/g++.old-deja/g++.jason/scoping.C 3805792750b ./gcc/testsuite/g++.old-deja/g++.jason/scoping10.C 3393161477b ./gcc/testsuite/g++.old-deja/g++.jason/scoping11.C 703500731b ./gcc/testsuite/g++.old-deja/g++.jason/scoping12.C --- 9204,9209 ---- *************** *** 6349,6360 **** 3067776040b ./gcc/testsuite/g++.old-deja/g++.jason/scoping7.C 2559597057b ./gcc/testsuite/g++.old-deja/g++.jason/scoping8.C 3161523697b ./gcc/testsuite/g++.old-deja/g++.jason/scoping9.C 3886458318b ./gcc/testsuite/g++.old-deja/g++.jason/shadow1.C 1823439671b ./gcc/testsuite/g++.old-deja/g++.jason/soverload.C 2071551425b ./gcc/testsuite/g++.old-deja/g++.jason/special.C 1986795528b ./gcc/testsuite/g++.old-deja/g++.jason/static1.C ! 3703096829b ./gcc/testsuite/g++.old-deja/g++.jason/synth.C ! 298249268b ./gcc/testsuite/g++.old-deja/g++.jason/synth10.C 2450156296b ./gcc/testsuite/g++.old-deja/g++.jason/synth2.C 160110469b ./gcc/testsuite/g++.old-deja/g++.jason/synth3.C 1411162779b ./gcc/testsuite/g++.old-deja/g++.jason/synth4.C --- 9220,9231 ---- 3067776040b ./gcc/testsuite/g++.old-deja/g++.jason/scoping7.C 2559597057b ./gcc/testsuite/g++.old-deja/g++.jason/scoping8.C 3161523697b ./gcc/testsuite/g++.old-deja/g++.jason/scoping9.C + 2200136874b ./gcc/testsuite/g++.old-deja/g++.jason/scoping.C 3886458318b ./gcc/testsuite/g++.old-deja/g++.jason/shadow1.C 1823439671b ./gcc/testsuite/g++.old-deja/g++.jason/soverload.C 2071551425b ./gcc/testsuite/g++.old-deja/g++.jason/special.C 1986795528b ./gcc/testsuite/g++.old-deja/g++.jason/static1.C ! 982891039b ./gcc/testsuite/g++.old-deja/g++.jason/synth10.C 2450156296b ./gcc/testsuite/g++.old-deja/g++.jason/synth2.C 160110469b ./gcc/testsuite/g++.old-deja/g++.jason/synth3.C 1411162779b ./gcc/testsuite/g++.old-deja/g++.jason/synth4.C *************** *** 6363,6373 **** 192973807b ./gcc/testsuite/g++.old-deja/g++.jason/synth7.C 1655213980b ./gcc/testsuite/g++.old-deja/g++.jason/synth8.C 1526912645b ./gcc/testsuite/g++.old-deja/g++.jason/synth9.C 1892722905b ./gcc/testsuite/g++.old-deja/g++.jason/tempargs.C 2837214502b ./gcc/testsuite/g++.old-deja/g++.jason/tempcons.C 869843187b ./gcc/testsuite/g++.old-deja/g++.jason/tempdest.C 2805267621b ./gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C - 3635346741b ./gcc/testsuite/g++.old-deja/g++.jason/template1.C 3406530265b ./gcc/testsuite/g++.old-deja/g++.jason/template10.C 2580181076b ./gcc/testsuite/g++.old-deja/g++.jason/template11.C 1678941454b ./gcc/testsuite/g++.old-deja/g++.jason/template12.C --- 9234,9244 ---- 192973807b ./gcc/testsuite/g++.old-deja/g++.jason/synth7.C 1655213980b ./gcc/testsuite/g++.old-deja/g++.jason/synth8.C 1526912645b ./gcc/testsuite/g++.old-deja/g++.jason/synth9.C + 3703096829b ./gcc/testsuite/g++.old-deja/g++.jason/synth.C 1892722905b ./gcc/testsuite/g++.old-deja/g++.jason/tempargs.C 2837214502b ./gcc/testsuite/g++.old-deja/g++.jason/tempcons.C 869843187b ./gcc/testsuite/g++.old-deja/g++.jason/tempdest.C 2805267621b ./gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C 3406530265b ./gcc/testsuite/g++.old-deja/g++.jason/template10.C 2580181076b ./gcc/testsuite/g++.old-deja/g++.jason/template11.C 1678941454b ./gcc/testsuite/g++.old-deja/g++.jason/template12.C *************** *** 6377,6383 **** 1681885743b ./gcc/testsuite/g++.old-deja/g++.jason/template17.C 885790390b ./gcc/testsuite/g++.old-deja/g++.jason/template18.C 3406115895b ./gcc/testsuite/g++.old-deja/g++.jason/template19.C ! 43030923b ./gcc/testsuite/g++.old-deja/g++.jason/template2.C 3294085147b ./gcc/testsuite/g++.old-deja/g++.jason/template20.C 1417003889b ./gcc/testsuite/g++.old-deja/g++.jason/template21.C 3311958351b ./gcc/testsuite/g++.old-deja/g++.jason/template22.C --- 9248,9254 ---- 1681885743b ./gcc/testsuite/g++.old-deja/g++.jason/template17.C 885790390b ./gcc/testsuite/g++.old-deja/g++.jason/template18.C 3406115895b ./gcc/testsuite/g++.old-deja/g++.jason/template19.C ! 3635346741b ./gcc/testsuite/g++.old-deja/g++.jason/template1.C 3294085147b ./gcc/testsuite/g++.old-deja/g++.jason/template20.C 1417003889b ./gcc/testsuite/g++.old-deja/g++.jason/template21.C 3311958351b ./gcc/testsuite/g++.old-deja/g++.jason/template22.C *************** *** 6388,6394 **** 407308284b ./gcc/testsuite/g++.old-deja/g++.jason/template27.C 2630100527b ./gcc/testsuite/g++.old-deja/g++.jason/template28.C 3438625432b ./gcc/testsuite/g++.old-deja/g++.jason/template29.C ! 2243617030b ./gcc/testsuite/g++.old-deja/g++.jason/template3.C 2310025160b ./gcc/testsuite/g++.old-deja/g++.jason/template30.C 3335790712b ./gcc/testsuite/g++.old-deja/g++.jason/template31.C 987062964b ./gcc/testsuite/g++.old-deja/g++.jason/template32.C --- 9259,9265 ---- 407308284b ./gcc/testsuite/g++.old-deja/g++.jason/template27.C 2630100527b ./gcc/testsuite/g++.old-deja/g++.jason/template28.C 3438625432b ./gcc/testsuite/g++.old-deja/g++.jason/template29.C ! 43030923b ./gcc/testsuite/g++.old-deja/g++.jason/template2.C 2310025160b ./gcc/testsuite/g++.old-deja/g++.jason/template30.C 3335790712b ./gcc/testsuite/g++.old-deja/g++.jason/template31.C 987062964b ./gcc/testsuite/g++.old-deja/g++.jason/template32.C *************** *** 6398,6415 **** 805289702b ./gcc/testsuite/g++.old-deja/g++.jason/template36.C 2952351972b ./gcc/testsuite/g++.old-deja/g++.jason/template37.C 1653595335b ./gcc/testsuite/g++.old-deja/g++.jason/template39.C ! 2458850401b ./gcc/testsuite/g++.old-deja/g++.jason/template4.C 856312588b ./gcc/testsuite/g++.old-deja/g++.jason/template40.C 3809808817b ./gcc/testsuite/g++.old-deja/g++.jason/template41.C 1916885555b ./gcc/testsuite/g++.old-deja/g++.jason/template42.C 2401225387b ./gcc/testsuite/g++.old-deja/g++.jason/template43.C 702715140b ./gcc/testsuite/g++.old-deja/g++.jason/template44.C 3543005329b ./gcc/testsuite/g++.old-deja/g++.jason/template5.C 769854245b ./gcc/testsuite/g++.old-deja/g++.jason/template6.C 2079411687b ./gcc/testsuite/g++.old-deja/g++.jason/template7.C 700019405b ./gcc/testsuite/g++.old-deja/g++.jason/template8.C 3077908891b ./gcc/testsuite/g++.old-deja/g++.jason/template9.C - 2460644105b ./gcc/testsuite/g++.old-deja/g++.jason/temporary.C 2081867311b ./gcc/testsuite/g++.old-deja/g++.jason/temporary2.C 3434711731b ./gcc/testsuite/g++.old-deja/g++.jason/temporary3.C 2488321595b ./gcc/testsuite/g++.old-deja/g++.jason/temporary4.C --- 9269,9286 ---- 805289702b ./gcc/testsuite/g++.old-deja/g++.jason/template36.C 2952351972b ./gcc/testsuite/g++.old-deja/g++.jason/template37.C 1653595335b ./gcc/testsuite/g++.old-deja/g++.jason/template39.C ! 2243617030b ./gcc/testsuite/g++.old-deja/g++.jason/template3.C 856312588b ./gcc/testsuite/g++.old-deja/g++.jason/template40.C 3809808817b ./gcc/testsuite/g++.old-deja/g++.jason/template41.C 1916885555b ./gcc/testsuite/g++.old-deja/g++.jason/template42.C 2401225387b ./gcc/testsuite/g++.old-deja/g++.jason/template43.C 702715140b ./gcc/testsuite/g++.old-deja/g++.jason/template44.C + 2458850401b ./gcc/testsuite/g++.old-deja/g++.jason/template4.C 3543005329b ./gcc/testsuite/g++.old-deja/g++.jason/template5.C 769854245b ./gcc/testsuite/g++.old-deja/g++.jason/template6.C 2079411687b ./gcc/testsuite/g++.old-deja/g++.jason/template7.C 700019405b ./gcc/testsuite/g++.old-deja/g++.jason/template8.C 3077908891b ./gcc/testsuite/g++.old-deja/g++.jason/template9.C 2081867311b ./gcc/testsuite/g++.old-deja/g++.jason/temporary2.C 3434711731b ./gcc/testsuite/g++.old-deja/g++.jason/temporary3.C 2488321595b ./gcc/testsuite/g++.old-deja/g++.jason/temporary4.C *************** *** 6417,6422 **** --- 9288,9294 ---- 3514956217b ./gcc/testsuite/g++.old-deja/g++.jason/temporary6.C 2628353068b ./gcc/testsuite/g++.old-deja/g++.jason/temporary7.C 1522627554b ./gcc/testsuite/g++.old-deja/g++.jason/temporary8.C + 2460644105b ./gcc/testsuite/g++.old-deja/g++.jason/temporary.C 3278590279b ./gcc/testsuite/g++.old-deja/g++.jason/tempover.C 2151541644b ./gcc/testsuite/g++.old-deja/g++.jason/tempparse.C 2779254633b ./gcc/testsuite/g++.old-deja/g++.jason/tempsub.C *************** *** 6424,6446 **** 4280002449b ./gcc/testsuite/g++.old-deja/g++.jason/thunk1.C 274835885b ./gcc/testsuite/g++.old-deja/g++.jason/thunk2.C 1347779987b ./gcc/testsuite/g++.old-deja/g++.jason/thunk3.C - 3711346877b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl.C 2448025143b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl2.C 3072514699b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl3.C 979924921b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl4.C 569137935b ./gcc/testsuite/g++.old-deja/g++.jason/trivial.C 2659060194b ./gcc/testsuite/g++.old-deja/g++.jason/typeck.C - 299682196b ./gcc/testsuite/g++.old-deja/g++.jason/typedef.C 2723549891b ./gcc/testsuite/g++.old-deja/g++.jason/typedef2.C 3743711814b ./gcc/testsuite/g++.old-deja/g++.jason/typedef3.C 3951989009b ./gcc/testsuite/g++.old-deja/g++.jason/typeid1.C 999555960b ./gcc/testsuite/g++.old-deja/g++.jason/typeid2.C 281221996b ./gcc/testsuite/g++.old-deja/g++.jason/union.C 4213241018b ./gcc/testsuite/g++.old-deja/g++.jason/vecdel.C - 3907710929b ./gcc/testsuite/g++.old-deja/g++.jason/virtual.C 1193567888b ./gcc/testsuite/g++.old-deja/g++.jason/virtual2.C ! 230540000b ./gcc/testsuite/g++.old-deja/g++.jason/warning1.C 628732210b ./gcc/testsuite/g++.old-deja/g++.jason/warning10.C 4258001283b ./gcc/testsuite/g++.old-deja/g++.jason/warning2.C 1528338319b ./gcc/testsuite/g++.old-deja/g++.jason/warning3.C 4233202460b ./gcc/testsuite/g++.old-deja/g++.jason/warning4.C --- 9296,9318 ---- 4280002449b ./gcc/testsuite/g++.old-deja/g++.jason/thunk1.C 274835885b ./gcc/testsuite/g++.old-deja/g++.jason/thunk2.C 1347779987b ./gcc/testsuite/g++.old-deja/g++.jason/thunk3.C 2448025143b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl2.C 3072514699b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl3.C 979924921b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl4.C + 3711346877b ./gcc/testsuite/g++.old-deja/g++.jason/tredecl.C 569137935b ./gcc/testsuite/g++.old-deja/g++.jason/trivial.C 2659060194b ./gcc/testsuite/g++.old-deja/g++.jason/typeck.C 2723549891b ./gcc/testsuite/g++.old-deja/g++.jason/typedef2.C 3743711814b ./gcc/testsuite/g++.old-deja/g++.jason/typedef3.C + 299682196b ./gcc/testsuite/g++.old-deja/g++.jason/typedef.C 3951989009b ./gcc/testsuite/g++.old-deja/g++.jason/typeid1.C 999555960b ./gcc/testsuite/g++.old-deja/g++.jason/typeid2.C 281221996b ./gcc/testsuite/g++.old-deja/g++.jason/union.C 4213241018b ./gcc/testsuite/g++.old-deja/g++.jason/vecdel.C 1193567888b ./gcc/testsuite/g++.old-deja/g++.jason/virtual2.C ! 3907710929b ./gcc/testsuite/g++.old-deja/g++.jason/virtual.C 628732210b ./gcc/testsuite/g++.old-deja/g++.jason/warning10.C + 230540000b ./gcc/testsuite/g++.old-deja/g++.jason/warning1.C 4258001283b ./gcc/testsuite/g++.old-deja/g++.jason/warning2.C 1528338319b ./gcc/testsuite/g++.old-deja/g++.jason/warning3.C 4233202460b ./gcc/testsuite/g++.old-deja/g++.jason/warning4.C *************** *** 6454,6462 **** 1986081483b ./gcc/testsuite/g++.old-deja/g++.law/access3.C 2335314782b ./gcc/testsuite/g++.old-deja/g++.law/access4.C 2106211778b ./gcc/testsuite/g++.old-deja/g++.law/access5.C - 4149004511b ./gcc/testsuite/g++.old-deja/g++.law/arg1.C 2654444924b ./gcc/testsuite/g++.old-deja/g++.law/arg10.C 3238389534b ./gcc/testsuite/g++.old-deja/g++.law/arg11.C 629763071b ./gcc/testsuite/g++.old-deja/g++.law/arg2.C 3123919430b ./gcc/testsuite/g++.old-deja/g++.law/arg3.C 2520473449b ./gcc/testsuite/g++.old-deja/g++.law/arg4.C --- 9326,9334 ---- 1986081483b ./gcc/testsuite/g++.old-deja/g++.law/access3.C 2335314782b ./gcc/testsuite/g++.old-deja/g++.law/access4.C 2106211778b ./gcc/testsuite/g++.old-deja/g++.law/access5.C 2654444924b ./gcc/testsuite/g++.old-deja/g++.law/arg10.C 3238389534b ./gcc/testsuite/g++.old-deja/g++.law/arg11.C + 4149004511b ./gcc/testsuite/g++.old-deja/g++.law/arg1.C 629763071b ./gcc/testsuite/g++.old-deja/g++.law/arg2.C 3123919430b ./gcc/testsuite/g++.old-deja/g++.law/arg3.C 2520473449b ./gcc/testsuite/g++.old-deja/g++.law/arg4.C *************** *** 6465,6471 **** 4040623157b ./gcc/testsuite/g++.old-deja/g++.law/arg7.C 3232506355b ./gcc/testsuite/g++.old-deja/g++.law/arg8.C 1902710110b ./gcc/testsuite/g++.old-deja/g++.law/arg9.C - 1082355743b ./gcc/testsuite/g++.old-deja/g++.law/arm1.C 2967336193b ./gcc/testsuite/g++.old-deja/g++.law/arm10.C 256975320b ./gcc/testsuite/g++.old-deja/g++.law/arm11.C 2111564718b ./gcc/testsuite/g++.old-deja/g++.law/arm12.C --- 9337,9342 ---- *************** *** 6473,6478 **** --- 9344,9350 ---- 1730130090b ./gcc/testsuite/g++.old-deja/g++.law/arm14.C 730443534b ./gcc/testsuite/g++.old-deja/g++.law/arm15.C 2538202217b ./gcc/testsuite/g++.old-deja/g++.law/arm16.C + 1082355743b ./gcc/testsuite/g++.old-deja/g++.law/arm1.C 396475240b ./gcc/testsuite/g++.old-deja/g++.law/arm2.C 684470600b ./gcc/testsuite/g++.old-deja/g++.law/arm3.C 123832841b ./gcc/testsuite/g++.old-deja/g++.law/arm4.C *************** *** 6501,6507 **** 1581356732b ./gcc/testsuite/g++.old-deja/g++.law/code-gen5.C 3634037248b ./gcc/testsuite/g++.old-deja/g++.law/copy1.C 1559838734b ./gcc/testsuite/g++.old-deja/g++.law/copy2.C - 1092557618b ./gcc/testsuite/g++.old-deja/g++.law/ctors1.C 2824193941b ./gcc/testsuite/g++.old-deja/g++.law/ctors10.C 3669003858b ./gcc/testsuite/g++.old-deja/g++.law/ctors11.C 162342663b ./gcc/testsuite/g++.old-deja/g++.law/ctors12.C --- 9373,9378 ---- *************** *** 6512,6520 **** 4195839953b ./gcc/testsuite/g++.old-deja/g++.law/ctors17.C 795806665b ./gcc/testsuite/g++.old-deja/g++.law/ctors18.C 669077619b ./gcc/testsuite/g++.old-deja/g++.law/ctors19.C ! 487905434b ./gcc/testsuite/g++.old-deja/g++.law/ctors2.C 1400780598b ./gcc/testsuite/g++.old-deja/g++.law/ctors20.C 217884353b ./gcc/testsuite/g++.old-deja/g++.law/ctors21.C 1618360763b ./gcc/testsuite/g++.old-deja/g++.law/ctors3.C 2740682745b ./gcc/testsuite/g++.old-deja/g++.law/ctors4.C 4199368053b ./gcc/testsuite/g++.old-deja/g++.law/ctors5.C --- 9383,9392 ---- 4195839953b ./gcc/testsuite/g++.old-deja/g++.law/ctors17.C 795806665b ./gcc/testsuite/g++.old-deja/g++.law/ctors18.C 669077619b ./gcc/testsuite/g++.old-deja/g++.law/ctors19.C ! 1092557618b ./gcc/testsuite/g++.old-deja/g++.law/ctors1.C 1400780598b ./gcc/testsuite/g++.old-deja/g++.law/ctors20.C 217884353b ./gcc/testsuite/g++.old-deja/g++.law/ctors21.C + 487905434b ./gcc/testsuite/g++.old-deja/g++.law/ctors2.C 1618360763b ./gcc/testsuite/g++.old-deja/g++.law/ctors3.C 2740682745b ./gcc/testsuite/g++.old-deja/g++.law/ctors4.C 4199368053b ./gcc/testsuite/g++.old-deja/g++.law/ctors5.C *************** *** 6522,6528 **** 1869709463b ./gcc/testsuite/g++.old-deja/g++.law/ctors7.C 526334519b ./gcc/testsuite/g++.old-deja/g++.law/ctors8.C 270958262b ./gcc/testsuite/g++.old-deja/g++.law/ctors9.C - 2381956011b ./gcc/testsuite/g++.old-deja/g++.law/cvt1.C 2152841651b ./gcc/testsuite/g++.old-deja/g++.law/cvt10.C 3565079229b ./gcc/testsuite/g++.old-deja/g++.law/cvt11.C 2546176762b ./gcc/testsuite/g++.old-deja/g++.law/cvt12.C --- 9394,9399 ---- *************** *** 6533,6543 **** 394815871b ./gcc/testsuite/g++.old-deja/g++.law/cvt17.C 3549238781b ./gcc/testsuite/g++.old-deja/g++.law/cvt18.C 3392944402b ./gcc/testsuite/g++.old-deja/g++.law/cvt19.C ! 689250222b ./gcc/testsuite/g++.old-deja/g++.law/cvt2.C 2158455043b ./gcc/testsuite/g++.old-deja/g++.law/cvt20.C 836977921b ./gcc/testsuite/g++.old-deja/g++.law/cvt21.C 2819411287b ./gcc/testsuite/g++.old-deja/g++.law/cvt22.C 3913198799b ./gcc/testsuite/g++.old-deja/g++.law/cvt23.C 2951649907b ./gcc/testsuite/g++.old-deja/g++.law/cvt3.C 1937028645b ./gcc/testsuite/g++.old-deja/g++.law/cvt4.C 2149948272b ./gcc/testsuite/g++.old-deja/g++.law/cvt5.C --- 9404,9415 ---- 394815871b ./gcc/testsuite/g++.old-deja/g++.law/cvt17.C 3549238781b ./gcc/testsuite/g++.old-deja/g++.law/cvt18.C 3392944402b ./gcc/testsuite/g++.old-deja/g++.law/cvt19.C ! 2381956011b ./gcc/testsuite/g++.old-deja/g++.law/cvt1.C 2158455043b ./gcc/testsuite/g++.old-deja/g++.law/cvt20.C 836977921b ./gcc/testsuite/g++.old-deja/g++.law/cvt21.C 2819411287b ./gcc/testsuite/g++.old-deja/g++.law/cvt22.C 3913198799b ./gcc/testsuite/g++.old-deja/g++.law/cvt23.C + 689250222b ./gcc/testsuite/g++.old-deja/g++.law/cvt2.C 2951649907b ./gcc/testsuite/g++.old-deja/g++.law/cvt3.C 1937028645b ./gcc/testsuite/g++.old-deja/g++.law/cvt4.C 2149948272b ./gcc/testsuite/g++.old-deja/g++.law/cvt5.C *************** *** 6568,6580 **** 1596582118b ./gcc/testsuite/g++.old-deja/g++.law/friend1.C 3071269392b ./gcc/testsuite/g++.old-deja/g++.law/friend4.C 353712724b ./gcc/testsuite/g++.old-deja/g++.law/friend5.C ! 2516415904b ./gcc/testsuite/g++.old-deja/g++.law/global-init1.C 2935803087b ./gcc/testsuite/g++.old-deja/g++.law/incdec1.C - 1302059369b ./gcc/testsuite/g++.old-deja/g++.law/init1.C 3566036893b ./gcc/testsuite/g++.old-deja/g++.law/init10.C 3857491837b ./gcc/testsuite/g++.old-deja/g++.law/init11.C 4138152619b ./gcc/testsuite/g++.old-deja/g++.law/init13.C 1266397199b ./gcc/testsuite/g++.old-deja/g++.law/init14.C 2233506301b ./gcc/testsuite/g++.old-deja/g++.law/init2.C 2232979686b ./gcc/testsuite/g++.old-deja/g++.law/init3.C 1022202873b ./gcc/testsuite/g++.old-deja/g++.law/init4.C --- 9440,9452 ---- 1596582118b ./gcc/testsuite/g++.old-deja/g++.law/friend1.C 3071269392b ./gcc/testsuite/g++.old-deja/g++.law/friend4.C 353712724b ./gcc/testsuite/g++.old-deja/g++.law/friend5.C ! 2982594112b ./gcc/testsuite/g++.old-deja/g++.law/global-init1.C 2935803087b ./gcc/testsuite/g++.old-deja/g++.law/incdec1.C 3566036893b ./gcc/testsuite/g++.old-deja/g++.law/init10.C 3857491837b ./gcc/testsuite/g++.old-deja/g++.law/init11.C 4138152619b ./gcc/testsuite/g++.old-deja/g++.law/init13.C 1266397199b ./gcc/testsuite/g++.old-deja/g++.law/init14.C + 1302059369b ./gcc/testsuite/g++.old-deja/g++.law/init1.C 2233506301b ./gcc/testsuite/g++.old-deja/g++.law/init2.C 2232979686b ./gcc/testsuite/g++.old-deja/g++.law/init3.C 1022202873b ./gcc/testsuite/g++.old-deja/g++.law/init4.C *************** *** 6607,6613 **** 367329317b ./gcc/testsuite/g++.old-deja/g++.law/operators17.C 1796063085b ./gcc/testsuite/g++.old-deja/g++.law/operators18.C 909424019b ./gcc/testsuite/g++.old-deja/g++.law/operators19.C - 3492185823b ./gcc/testsuite/g++.old-deja/g++.law/operators2.C 799876233b ./gcc/testsuite/g++.old-deja/g++.law/operators21.C 2652758137b ./gcc/testsuite/g++.old-deja/g++.law/operators22.C 1066444429b ./gcc/testsuite/g++.old-deja/g++.law/operators23.C --- 9479,9484 ---- *************** *** 6616,6633 **** 1064475993b ./gcc/testsuite/g++.old-deja/g++.law/operators27.C 1472827461b ./gcc/testsuite/g++.old-deja/g++.law/operators28.C 3543940161b ./gcc/testsuite/g++.old-deja/g++.law/operators29.C ! 578739979b ./gcc/testsuite/g++.old-deja/g++.law/operators3.C 936276361b ./gcc/testsuite/g++.old-deja/g++.law/operators30.C 1540784012b ./gcc/testsuite/g++.old-deja/g++.law/operators31.C 1046500493b ./gcc/testsuite/g++.old-deja/g++.law/operators32.C 1564136570b ./gcc/testsuite/g++.old-deja/g++.law/operators33.C 2258128088b ./gcc/testsuite/g++.old-deja/g++.law/operators34.C 608812129b ./gcc/testsuite/g++.old-deja/g++.law/operators4.C 1329892354b ./gcc/testsuite/g++.old-deja/g++.law/operators6.C 355314823b ./gcc/testsuite/g++.old-deja/g++.law/operators8.C 1673377936b ./gcc/testsuite/g++.old-deja/g++.law/operators9.C - 2567910598b ./gcc/testsuite/g++.old-deja/g++.law/parsing1.C 3113604261b ./gcc/testsuite/g++.old-deja/g++.law/parsing10.C 1152481023b ./gcc/testsuite/g++.old-deja/g++.law/parsing2.C 1999913694b ./gcc/testsuite/g++.old-deja/g++.law/parsing3.C 2775279224b ./gcc/testsuite/g++.old-deja/g++.law/parsing4.C --- 9487,9505 ---- 1064475993b ./gcc/testsuite/g++.old-deja/g++.law/operators27.C 1472827461b ./gcc/testsuite/g++.old-deja/g++.law/operators28.C 3543940161b ./gcc/testsuite/g++.old-deja/g++.law/operators29.C ! 3492185823b ./gcc/testsuite/g++.old-deja/g++.law/operators2.C 936276361b ./gcc/testsuite/g++.old-deja/g++.law/operators30.C 1540784012b ./gcc/testsuite/g++.old-deja/g++.law/operators31.C 1046500493b ./gcc/testsuite/g++.old-deja/g++.law/operators32.C 1564136570b ./gcc/testsuite/g++.old-deja/g++.law/operators33.C 2258128088b ./gcc/testsuite/g++.old-deja/g++.law/operators34.C + 578739979b ./gcc/testsuite/g++.old-deja/g++.law/operators3.C 608812129b ./gcc/testsuite/g++.old-deja/g++.law/operators4.C 1329892354b ./gcc/testsuite/g++.old-deja/g++.law/operators6.C 355314823b ./gcc/testsuite/g++.old-deja/g++.law/operators8.C 1673377936b ./gcc/testsuite/g++.old-deja/g++.law/operators9.C 3113604261b ./gcc/testsuite/g++.old-deja/g++.law/parsing10.C + 2567910598b ./gcc/testsuite/g++.old-deja/g++.law/parsing1.C 1152481023b ./gcc/testsuite/g++.old-deja/g++.law/parsing2.C 1999913694b ./gcc/testsuite/g++.old-deja/g++.law/parsing3.C 2775279224b ./gcc/testsuite/g++.old-deja/g++.law/parsing4.C *************** *** 6678,6695 **** 698640776b ./gcc/testsuite/g++.old-deja/g++.law/virtual2.C 3868729894b ./gcc/testsuite/g++.old-deja/g++.law/virtual3.C 3199255308b ./gcc/testsuite/g++.old-deja/g++.law/virtual4.C - 62330698b ./gcc/testsuite/g++.old-deja/g++.law/visibility1.C 3314718848b ./gcc/testsuite/g++.old-deja/g++.law/visibility10.C 3972415808b ./gcc/testsuite/g++.old-deja/g++.law/visibility11.C 1008837063b ./gcc/testsuite/g++.old-deja/g++.law/visibility12.C ! 4257392333b ./gcc/testsuite/g++.old-deja/g++.law/visibility13.C 2184184428b ./gcc/testsuite/g++.old-deja/g++.law/visibility14.C 3711813419b ./gcc/testsuite/g++.old-deja/g++.law/visibility15.C 2324534234b ./gcc/testsuite/g++.old-deja/g++.law/visibility16.C 1421043627b ./gcc/testsuite/g++.old-deja/g++.law/visibility17.C 2757911294b ./gcc/testsuite/g++.old-deja/g++.law/visibility18.C 1759487204b ./gcc/testsuite/g++.old-deja/g++.law/visibility19.C ! 734410929b ./gcc/testsuite/g++.old-deja/g++.law/visibility2.C 1427247483b ./gcc/testsuite/g++.old-deja/g++.law/visibility20.C 3793046825b ./gcc/testsuite/g++.old-deja/g++.law/visibility21.C 271235804b ./gcc/testsuite/g++.old-deja/g++.law/visibility22.C --- 9550,9566 ---- 698640776b ./gcc/testsuite/g++.old-deja/g++.law/virtual2.C 3868729894b ./gcc/testsuite/g++.old-deja/g++.law/virtual3.C 3199255308b ./gcc/testsuite/g++.old-deja/g++.law/virtual4.C 3314718848b ./gcc/testsuite/g++.old-deja/g++.law/visibility10.C 3972415808b ./gcc/testsuite/g++.old-deja/g++.law/visibility11.C 1008837063b ./gcc/testsuite/g++.old-deja/g++.law/visibility12.C ! 4199412719b ./gcc/testsuite/g++.old-deja/g++.law/visibility13.C 2184184428b ./gcc/testsuite/g++.old-deja/g++.law/visibility14.C 3711813419b ./gcc/testsuite/g++.old-deja/g++.law/visibility15.C 2324534234b ./gcc/testsuite/g++.old-deja/g++.law/visibility16.C 1421043627b ./gcc/testsuite/g++.old-deja/g++.law/visibility17.C 2757911294b ./gcc/testsuite/g++.old-deja/g++.law/visibility18.C 1759487204b ./gcc/testsuite/g++.old-deja/g++.law/visibility19.C ! 62330698b ./gcc/testsuite/g++.old-deja/g++.law/visibility1.C 1427247483b ./gcc/testsuite/g++.old-deja/g++.law/visibility20.C 3793046825b ./gcc/testsuite/g++.old-deja/g++.law/visibility21.C 271235804b ./gcc/testsuite/g++.old-deja/g++.law/visibility22.C *************** *** 6698,6703 **** --- 9569,9575 ---- 322999725b ./gcc/testsuite/g++.old-deja/g++.law/visibility26.C 4190347231b ./gcc/testsuite/g++.old-deja/g++.law/visibility27.C 2911402499b ./gcc/testsuite/g++.old-deja/g++.law/visibility28.C + 734410929b ./gcc/testsuite/g++.old-deja/g++.law/visibility2.C 4290227694b ./gcc/testsuite/g++.old-deja/g++.law/visibility3.C 4210487078b ./gcc/testsuite/g++.old-deja/g++.law/visibility4.C 3907786275b ./gcc/testsuite/g++.old-deja/g++.law/visibility5.C *************** *** 6727,6733 **** 1222988217b ./gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C 3722279134b ./gcc/testsuite/g++.old-deja/g++.martin/typedef1.C 1998658156b ./gcc/testsuite/g++.old-deja/g++.martin/typedef2.C - 3056861018b ./gcc/testsuite/g++.old-deja/g++.mike/.cvsignore 3366578564b ./gcc/testsuite/g++.old-deja/g++.mike/align1.C 1357275564b ./gcc/testsuite/g++.old-deja/g++.mike/align2.C 1852680562b ./gcc/testsuite/g++.old-deja/g++.mike/ambig1.C --- 9599,9604 ---- *************** *** 6747,6753 **** 549691660b ./gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C 2943523376b ./gcc/testsuite/g++.old-deja/g++.mike/dyncast8.C 715384563b ./gcc/testsuite/g++.old-deja/g++.mike/dyncast9.C - 1479132794b ./gcc/testsuite/g++.old-deja/g++.mike/eh1.C 1898950024b ./gcc/testsuite/g++.old-deja/g++.mike/eh10.C 1222256435b ./gcc/testsuite/g++.old-deja/g++.mike/eh11.C 1447734306b ./gcc/testsuite/g++.old-deja/g++.mike/eh12.C --- 9618,9623 ---- *************** *** 6758,6764 **** 3368269369b ./gcc/testsuite/g++.old-deja/g++.mike/eh17.C 1954288096b ./gcc/testsuite/g++.old-deja/g++.mike/eh18.C 1564767830b ./gcc/testsuite/g++.old-deja/g++.mike/eh19.C ! 925380975b ./gcc/testsuite/g++.old-deja/g++.mike/eh2.C 2941675313b ./gcc/testsuite/g++.old-deja/g++.mike/eh20.C 1220907911b ./gcc/testsuite/g++.old-deja/g++.mike/eh21.C 517637270b ./gcc/testsuite/g++.old-deja/g++.mike/eh23.C --- 9628,9634 ---- 3368269369b ./gcc/testsuite/g++.old-deja/g++.mike/eh17.C 1954288096b ./gcc/testsuite/g++.old-deja/g++.mike/eh18.C 1564767830b ./gcc/testsuite/g++.old-deja/g++.mike/eh19.C ! 1479132794b ./gcc/testsuite/g++.old-deja/g++.mike/eh1.C 2941675313b ./gcc/testsuite/g++.old-deja/g++.mike/eh20.C 1220907911b ./gcc/testsuite/g++.old-deja/g++.mike/eh21.C 517637270b ./gcc/testsuite/g++.old-deja/g++.mike/eh23.C *************** *** 6768,6785 **** 2419761913b ./gcc/testsuite/g++.old-deja/g++.mike/eh27.C 1187597651b ./gcc/testsuite/g++.old-deja/g++.mike/eh28.C 1211663524b ./gcc/testsuite/g++.old-deja/g++.mike/eh29.C ! 3592708402b ./gcc/testsuite/g++.old-deja/g++.mike/eh3.C 19764474b ./gcc/testsuite/g++.old-deja/g++.mike/eh30.C 2656014861b ./gcc/testsuite/g++.old-deja/g++.mike/eh31.C 3196832667b ./gcc/testsuite/g++.old-deja/g++.mike/eh32.C ! 66552972b ./gcc/testsuite/g++.old-deja/g++.mike/eh33.C 503529587b ./gcc/testsuite/g++.old-deja/g++.mike/eh34.C 3352893098b ./gcc/testsuite/g++.old-deja/g++.mike/eh35.C 647929045b ./gcc/testsuite/g++.old-deja/g++.mike/eh36.C 1379433802b ./gcc/testsuite/g++.old-deja/g++.mike/eh37.C 2520417864b ./gcc/testsuite/g++.old-deja/g++.mike/eh38.C 2239202212b ./gcc/testsuite/g++.old-deja/g++.mike/eh39.C ! 833195775b ./gcc/testsuite/g++.old-deja/g++.mike/eh4.C 812645089b ./gcc/testsuite/g++.old-deja/g++.mike/eh40.C 2008000368b ./gcc/testsuite/g++.old-deja/g++.mike/eh41.C 396786327b ./gcc/testsuite/g++.old-deja/g++.mike/eh42.C --- 9638,9655 ---- 2419761913b ./gcc/testsuite/g++.old-deja/g++.mike/eh27.C 1187597651b ./gcc/testsuite/g++.old-deja/g++.mike/eh28.C 1211663524b ./gcc/testsuite/g++.old-deja/g++.mike/eh29.C ! 925380975b ./gcc/testsuite/g++.old-deja/g++.mike/eh2.C 19764474b ./gcc/testsuite/g++.old-deja/g++.mike/eh30.C 2656014861b ./gcc/testsuite/g++.old-deja/g++.mike/eh31.C 3196832667b ./gcc/testsuite/g++.old-deja/g++.mike/eh32.C ! 307331323b ./gcc/testsuite/g++.old-deja/g++.mike/eh33.C 503529587b ./gcc/testsuite/g++.old-deja/g++.mike/eh34.C 3352893098b ./gcc/testsuite/g++.old-deja/g++.mike/eh35.C 647929045b ./gcc/testsuite/g++.old-deja/g++.mike/eh36.C 1379433802b ./gcc/testsuite/g++.old-deja/g++.mike/eh37.C 2520417864b ./gcc/testsuite/g++.old-deja/g++.mike/eh38.C 2239202212b ./gcc/testsuite/g++.old-deja/g++.mike/eh39.C ! 3592708402b ./gcc/testsuite/g++.old-deja/g++.mike/eh3.C 812645089b ./gcc/testsuite/g++.old-deja/g++.mike/eh40.C 2008000368b ./gcc/testsuite/g++.old-deja/g++.mike/eh41.C 396786327b ./gcc/testsuite/g++.old-deja/g++.mike/eh42.C *************** *** 6789,6796 **** 2543002191b ./gcc/testsuite/g++.old-deja/g++.mike/eh47.C 3489458651b ./gcc/testsuite/g++.old-deja/g++.mike/eh48.C 836588330b ./gcc/testsuite/g++.old-deja/g++.mike/eh49.C ! 2616136317b ./gcc/testsuite/g++.old-deja/g++.mike/eh5.C ! 2022453553b ./gcc/testsuite/g++.old-deja/g++.mike/eh50.C 2472994932b ./gcc/testsuite/g++.old-deja/g++.mike/eh51.C 359223272b ./gcc/testsuite/g++.old-deja/g++.mike/eh52.C 4025472676b ./gcc/testsuite/g++.old-deja/g++.mike/eh53.C --- 9659,9666 ---- 2543002191b ./gcc/testsuite/g++.old-deja/g++.mike/eh47.C 3489458651b ./gcc/testsuite/g++.old-deja/g++.mike/eh48.C 836588330b ./gcc/testsuite/g++.old-deja/g++.mike/eh49.C ! 833195775b ./gcc/testsuite/g++.old-deja/g++.mike/eh4.C ! 4154329155b ./gcc/testsuite/g++.old-deja/g++.mike/eh50.C 2472994932b ./gcc/testsuite/g++.old-deja/g++.mike/eh51.C 359223272b ./gcc/testsuite/g++.old-deja/g++.mike/eh52.C 4025472676b ./gcc/testsuite/g++.old-deja/g++.mike/eh53.C *************** *** 6800,6811 **** 4236094512b ./gcc/testsuite/g++.old-deja/g++.mike/eh57.C 1057069707b ./gcc/testsuite/g++.old-deja/g++.mike/eh58.C 3255147266b ./gcc/testsuite/g++.old-deja/g++.mike/eh59.C 1226767941b ./gcc/testsuite/g++.old-deja/g++.mike/eh6.C 42372650b ./gcc/testsuite/g++.old-deja/g++.mike/eh7.C 851372296b ./gcc/testsuite/g++.old-deja/g++.mike/eh8.C 1319332410b ./gcc/testsuite/g++.old-deja/g++.mike/eh9.C 2247541281b ./gcc/testsuite/g++.old-deja/g++.mike/enum1.C ! 2068312285b ./gcc/testsuite/g++.old-deja/g++.mike/err1.C 1927043546b ./gcc/testsuite/g++.old-deja/g++.mike/err2.C 3135074705b ./gcc/testsuite/g++.old-deja/g++.mike/err3.C 3586800574b ./gcc/testsuite/g++.old-deja/g++.mike/explicit1.C --- 9670,9682 ---- 4236094512b ./gcc/testsuite/g++.old-deja/g++.mike/eh57.C 1057069707b ./gcc/testsuite/g++.old-deja/g++.mike/eh58.C 3255147266b ./gcc/testsuite/g++.old-deja/g++.mike/eh59.C + 2616136317b ./gcc/testsuite/g++.old-deja/g++.mike/eh5.C 1226767941b ./gcc/testsuite/g++.old-deja/g++.mike/eh6.C 42372650b ./gcc/testsuite/g++.old-deja/g++.mike/eh7.C 851372296b ./gcc/testsuite/g++.old-deja/g++.mike/eh8.C 1319332410b ./gcc/testsuite/g++.old-deja/g++.mike/eh9.C 2247541281b ./gcc/testsuite/g++.old-deja/g++.mike/enum1.C ! 1538019040b ./gcc/testsuite/g++.old-deja/g++.mike/err1.C 1927043546b ./gcc/testsuite/g++.old-deja/g++.mike/err2.C 3135074705b ./gcc/testsuite/g++.old-deja/g++.mike/err3.C 3586800574b ./gcc/testsuite/g++.old-deja/g++.mike/explicit1.C *************** *** 6824,6834 **** 3720053646b ./gcc/testsuite/g++.old-deja/g++.mike/memoize1.C 227243000b ./gcc/testsuite/g++.old-deja/g++.mike/mi1.C 4025070490b ./gcc/testsuite/g++.old-deja/g++.mike/mi2.C - 693076493b ./gcc/testsuite/g++.old-deja/g++.mike/misc1.C 4041946331b ./gcc/testsuite/g++.old-deja/g++.mike/misc11.C 3057947029b ./gcc/testsuite/g++.old-deja/g++.mike/misc12.C 430127070b ./gcc/testsuite/g++.old-deja/g++.mike/misc13.C 2291534767b ./gcc/testsuite/g++.old-deja/g++.mike/misc14.C 2351659378b ./gcc/testsuite/g++.old-deja/g++.mike/misc2.C 48579344b ./gcc/testsuite/g++.old-deja/g++.mike/misc3.C 263841150b ./gcc/testsuite/g++.old-deja/g++.mike/misc5.C --- 9695,9705 ---- 3720053646b ./gcc/testsuite/g++.old-deja/g++.mike/memoize1.C 227243000b ./gcc/testsuite/g++.old-deja/g++.mike/mi1.C 4025070490b ./gcc/testsuite/g++.old-deja/g++.mike/mi2.C 4041946331b ./gcc/testsuite/g++.old-deja/g++.mike/misc11.C 3057947029b ./gcc/testsuite/g++.old-deja/g++.mike/misc12.C 430127070b ./gcc/testsuite/g++.old-deja/g++.mike/misc13.C 2291534767b ./gcc/testsuite/g++.old-deja/g++.mike/misc14.C + 693076493b ./gcc/testsuite/g++.old-deja/g++.mike/misc1.C 2351659378b ./gcc/testsuite/g++.old-deja/g++.mike/misc2.C 48579344b ./gcc/testsuite/g++.old-deja/g++.mike/misc3.C 263841150b ./gcc/testsuite/g++.old-deja/g++.mike/misc5.C *************** *** 6836,6842 **** 3029506356b ./gcc/testsuite/g++.old-deja/g++.mike/misc7.C 3400747232b ./gcc/testsuite/g++.old-deja/g++.mike/misc8.C 2472705454b ./gcc/testsuite/g++.old-deja/g++.mike/misc9.C - 2700723029b ./gcc/testsuite/g++.old-deja/g++.mike/net1.C 2347594484b ./gcc/testsuite/g++.old-deja/g++.mike/net10.C 2264540476b ./gcc/testsuite/g++.old-deja/g++.mike/net11.C 1619954363b ./gcc/testsuite/g++.old-deja/g++.mike/net12.C --- 9707,9712 ---- *************** *** 6847,6853 **** 2790494835b ./gcc/testsuite/g++.old-deja/g++.mike/net17.C 128141995b ./gcc/testsuite/g++.old-deja/g++.mike/net18.C 948890721b ./gcc/testsuite/g++.old-deja/g++.mike/net19.C ! 4151722351b ./gcc/testsuite/g++.old-deja/g++.mike/net2.C 4292061310b ./gcc/testsuite/g++.old-deja/g++.mike/net20.C 226565812b ./gcc/testsuite/g++.old-deja/g++.mike/net21.C 1728885921b ./gcc/testsuite/g++.old-deja/g++.mike/net22.C --- 9717,9723 ---- 2790494835b ./gcc/testsuite/g++.old-deja/g++.mike/net17.C 128141995b ./gcc/testsuite/g++.old-deja/g++.mike/net18.C 948890721b ./gcc/testsuite/g++.old-deja/g++.mike/net19.C ! 2700723029b ./gcc/testsuite/g++.old-deja/g++.mike/net1.C 4292061310b ./gcc/testsuite/g++.old-deja/g++.mike/net20.C 226565812b ./gcc/testsuite/g++.old-deja/g++.mike/net21.C 1728885921b ./gcc/testsuite/g++.old-deja/g++.mike/net22.C *************** *** 6858,6866 **** 94102590b ./gcc/testsuite/g++.old-deja/g++.mike/net27.C 1622305952b ./gcc/testsuite/g++.old-deja/g++.mike/net28.C 2635182781b ./gcc/testsuite/g++.old-deja/g++.mike/net29.C ! 2896773743b ./gcc/testsuite/g++.old-deja/g++.mike/net3.C 623832663b ./gcc/testsuite/g++.old-deja/g++.mike/net30.C ! 1863329456b ./gcc/testsuite/g++.old-deja/g++.mike/net31.C 1380727967b ./gcc/testsuite/g++.old-deja/g++.mike/net32.C 643638364b ./gcc/testsuite/g++.old-deja/g++.mike/net34.C 1703492289b ./gcc/testsuite/g++.old-deja/g++.mike/net35.C --- 9728,9736 ---- 94102590b ./gcc/testsuite/g++.old-deja/g++.mike/net27.C 1622305952b ./gcc/testsuite/g++.old-deja/g++.mike/net28.C 2635182781b ./gcc/testsuite/g++.old-deja/g++.mike/net29.C ! 2767243364b ./gcc/testsuite/g++.old-deja/g++.mike/net2.C 623832663b ./gcc/testsuite/g++.old-deja/g++.mike/net30.C ! 1825313370b ./gcc/testsuite/g++.old-deja/g++.mike/net31.C 1380727967b ./gcc/testsuite/g++.old-deja/g++.mike/net32.C 643638364b ./gcc/testsuite/g++.old-deja/g++.mike/net34.C 1703492289b ./gcc/testsuite/g++.old-deja/g++.mike/net35.C *************** *** 6868,6874 **** 404712047b ./gcc/testsuite/g++.old-deja/g++.mike/net37.C 373469883b ./gcc/testsuite/g++.old-deja/g++.mike/net38.C 3771016947b ./gcc/testsuite/g++.old-deja/g++.mike/net39.C ! 2596381910b ./gcc/testsuite/g++.old-deja/g++.mike/net4.C 3117098407b ./gcc/testsuite/g++.old-deja/g++.mike/net40.C 2329906223b ./gcc/testsuite/g++.old-deja/g++.mike/net41.C 257842077b ./gcc/testsuite/g++.old-deja/g++.mike/net42.C --- 9738,9744 ---- 404712047b ./gcc/testsuite/g++.old-deja/g++.mike/net37.C 373469883b ./gcc/testsuite/g++.old-deja/g++.mike/net38.C 3771016947b ./gcc/testsuite/g++.old-deja/g++.mike/net39.C ! 2896773743b ./gcc/testsuite/g++.old-deja/g++.mike/net3.C 3117098407b ./gcc/testsuite/g++.old-deja/g++.mike/net40.C 2329906223b ./gcc/testsuite/g++.old-deja/g++.mike/net41.C 257842077b ./gcc/testsuite/g++.old-deja/g++.mike/net42.C *************** *** 6878,6894 **** 4252296965b ./gcc/testsuite/g++.old-deja/g++.mike/net46.C 3377446225b ./gcc/testsuite/g++.old-deja/g++.mike/net47.C 3175541105b ./gcc/testsuite/g++.old-deja/g++.mike/net48.C 557858870b ./gcc/testsuite/g++.old-deja/g++.mike/net6.C 2207442407b ./gcc/testsuite/g++.old-deja/g++.mike/net7.C 2718402760b ./gcc/testsuite/g++.old-deja/g++.mike/net8.C 2353333727b ./gcc/testsuite/g++.old-deja/g++.mike/net9.C - 452066686b ./gcc/testsuite/g++.old-deja/g++.mike/ns1.C 567253957b ./gcc/testsuite/g++.old-deja/g++.mike/ns10.C 2416554745b ./gcc/testsuite/g++.old-deja/g++.mike/ns11.C 533880824b ./gcc/testsuite/g++.old-deja/g++.mike/ns12.C 1634894638b ./gcc/testsuite/g++.old-deja/g++.mike/ns13.C 133757607b ./gcc/testsuite/g++.old-deja/g++.mike/ns14.C 2272679205b ./gcc/testsuite/g++.old-deja/g++.mike/ns15.C 3588362593b ./gcc/testsuite/g++.old-deja/g++.mike/ns2.C 1013122739b ./gcc/testsuite/g++.old-deja/g++.mike/ns3.C 1600942614b ./gcc/testsuite/g++.old-deja/g++.mike/ns4.C --- 9748,9765 ---- 4252296965b ./gcc/testsuite/g++.old-deja/g++.mike/net46.C 3377446225b ./gcc/testsuite/g++.old-deja/g++.mike/net47.C 3175541105b ./gcc/testsuite/g++.old-deja/g++.mike/net48.C + 2596381910b ./gcc/testsuite/g++.old-deja/g++.mike/net4.C 557858870b ./gcc/testsuite/g++.old-deja/g++.mike/net6.C 2207442407b ./gcc/testsuite/g++.old-deja/g++.mike/net7.C 2718402760b ./gcc/testsuite/g++.old-deja/g++.mike/net8.C 2353333727b ./gcc/testsuite/g++.old-deja/g++.mike/net9.C 567253957b ./gcc/testsuite/g++.old-deja/g++.mike/ns10.C 2416554745b ./gcc/testsuite/g++.old-deja/g++.mike/ns11.C 533880824b ./gcc/testsuite/g++.old-deja/g++.mike/ns12.C 1634894638b ./gcc/testsuite/g++.old-deja/g++.mike/ns13.C 133757607b ./gcc/testsuite/g++.old-deja/g++.mike/ns14.C 2272679205b ./gcc/testsuite/g++.old-deja/g++.mike/ns15.C + 452066686b ./gcc/testsuite/g++.old-deja/g++.mike/ns1.C 3588362593b ./gcc/testsuite/g++.old-deja/g++.mike/ns2.C 1013122739b ./gcc/testsuite/g++.old-deja/g++.mike/ns3.C 1600942614b ./gcc/testsuite/g++.old-deja/g++.mike/ns4.C *************** *** 6904,6910 **** 3568933834b ./gcc/testsuite/g++.old-deja/g++.mike/p10247.C 3637822285b ./gcc/testsuite/g++.old-deja/g++.mike/p10416.C 2277517536b ./gcc/testsuite/g++.old-deja/g++.mike/p10511.C ! 2480212522b ./gcc/testsuite/g++.old-deja/g++.mike/p10769a.C 3120977893b ./gcc/testsuite/g++.old-deja/g++.mike/p10769b.C 2837914956b ./gcc/testsuite/g++.old-deja/g++.mike/p10849a.C 288448977b ./gcc/testsuite/g++.old-deja/g++.mike/p10951.C --- 9775,9781 ---- 3568933834b ./gcc/testsuite/g++.old-deja/g++.mike/p10247.C 3637822285b ./gcc/testsuite/g++.old-deja/g++.mike/p10416.C 2277517536b ./gcc/testsuite/g++.old-deja/g++.mike/p10511.C ! 2865331112b ./gcc/testsuite/g++.old-deja/g++.mike/p10769a.C 3120977893b ./gcc/testsuite/g++.old-deja/g++.mike/p10769b.C 2837914956b ./gcc/testsuite/g++.old-deja/g++.mike/p10849a.C 288448977b ./gcc/testsuite/g++.old-deja/g++.mike/p10951.C *************** *** 6914,6921 **** 2584300706b ./gcc/testsuite/g++.old-deja/g++.mike/p11144.C 1612526821b ./gcc/testsuite/g++.old-deja/g++.mike/p11482.C 18099126b ./gcc/testsuite/g++.old-deja/g++.mike/p11667.C - 3634094361b ./gcc/testsuite/g++.old-deja/g++.mike/p12306.C 783911097b ./gcc/testsuite/g++.old-deja/g++.mike/p12306a.C 3834401134b ./gcc/testsuite/g++.old-deja/g++.mike/p1248.C 2006378635b ./gcc/testsuite/g++.old-deja/g++.mike/p1567.C 3231801438b ./gcc/testsuite/g++.old-deja/g++.mike/p16146.C --- 9785,9792 ---- 2584300706b ./gcc/testsuite/g++.old-deja/g++.mike/p11144.C 1612526821b ./gcc/testsuite/g++.old-deja/g++.mike/p11482.C 18099126b ./gcc/testsuite/g++.old-deja/g++.mike/p11667.C 783911097b ./gcc/testsuite/g++.old-deja/g++.mike/p12306a.C + 3634094361b ./gcc/testsuite/g++.old-deja/g++.mike/p12306.C 3834401134b ./gcc/testsuite/g++.old-deja/g++.mike/p1248.C 2006378635b ./gcc/testsuite/g++.old-deja/g++.mike/p1567.C 3231801438b ./gcc/testsuite/g++.old-deja/g++.mike/p16146.C *************** *** 6928,6936 **** 3189296082b ./gcc/testsuite/g++.old-deja/g++.mike/p2746.C 2655922230b ./gcc/testsuite/g++.old-deja/g++.mike/p2793.C 2222530613b ./gcc/testsuite/g++.old-deja/g++.mike/p2806.C - 1350283959b ./gcc/testsuite/g++.old-deja/g++.mike/p2846.C 3941688151b ./gcc/testsuite/g++.old-deja/g++.mike/p2846a.C 481437008b ./gcc/testsuite/g++.old-deja/g++.mike/p2846b.C 231166541b ./gcc/testsuite/g++.old-deja/g++.mike/p2855.C 1228637975b ./gcc/testsuite/g++.old-deja/g++.mike/p2960.C 172879720b ./gcc/testsuite/g++.old-deja/g++.mike/p3041.C --- 9799,9807 ---- 3189296082b ./gcc/testsuite/g++.old-deja/g++.mike/p2746.C 2655922230b ./gcc/testsuite/g++.old-deja/g++.mike/p2793.C 2222530613b ./gcc/testsuite/g++.old-deja/g++.mike/p2806.C 3941688151b ./gcc/testsuite/g++.old-deja/g++.mike/p2846a.C 481437008b ./gcc/testsuite/g++.old-deja/g++.mike/p2846b.C + 1350283959b ./gcc/testsuite/g++.old-deja/g++.mike/p2846.C 231166541b ./gcc/testsuite/g++.old-deja/g++.mike/p2855.C 1228637975b ./gcc/testsuite/g++.old-deja/g++.mike/p2960.C 172879720b ./gcc/testsuite/g++.old-deja/g++.mike/p3041.C *************** *** 6946,6954 **** 2629346869b ./gcc/testsuite/g++.old-deja/g++.mike/p3538b.C 1918171545b ./gcc/testsuite/g++.old-deja/g++.mike/p3570.C 2384869664b ./gcc/testsuite/g++.old-deja/g++.mike/p3579.C - 1307191770b ./gcc/testsuite/g++.old-deja/g++.mike/p3708.C 4049970058b ./gcc/testsuite/g++.old-deja/g++.mike/p3708a.C 2170847074b ./gcc/testsuite/g++.old-deja/g++.mike/p3708b.C 3856504451b ./gcc/testsuite/g++.old-deja/g++.mike/p3764.C 2579187029b ./gcc/testsuite/g++.old-deja/g++.mike/p3836.C 717100314b ./gcc/testsuite/g++.old-deja/g++.mike/p4068.C --- 9817,9825 ---- 2629346869b ./gcc/testsuite/g++.old-deja/g++.mike/p3538b.C 1918171545b ./gcc/testsuite/g++.old-deja/g++.mike/p3570.C 2384869664b ./gcc/testsuite/g++.old-deja/g++.mike/p3579.C 4049970058b ./gcc/testsuite/g++.old-deja/g++.mike/p3708a.C 2170847074b ./gcc/testsuite/g++.old-deja/g++.mike/p3708b.C + 1307191770b ./gcc/testsuite/g++.old-deja/g++.mike/p3708.C 3856504451b ./gcc/testsuite/g++.old-deja/g++.mike/p3764.C 2579187029b ./gcc/testsuite/g++.old-deja/g++.mike/p3836.C 717100314b ./gcc/testsuite/g++.old-deja/g++.mike/p4068.C *************** *** 6971,6978 **** 791627116b ./gcc/testsuite/g++.old-deja/g++.mike/p4736b.C 3037713609b ./gcc/testsuite/g++.old-deja/g++.mike/p4736c.C 3183066012b ./gcc/testsuite/g++.old-deja/g++.mike/p4750.C - 2783396832b ./gcc/testsuite/g++.old-deja/g++.mike/p5469.C 1643480270b ./gcc/testsuite/g++.old-deja/g++.mike/p5469a.C 1694086012b ./gcc/testsuite/g++.old-deja/g++.mike/p5571.C 2030989669b ./gcc/testsuite/g++.old-deja/g++.mike/p5611.C 3220562563b ./gcc/testsuite/g++.old-deja/g++.mike/p5673.C --- 9842,9849 ---- 791627116b ./gcc/testsuite/g++.old-deja/g++.mike/p4736b.C 3037713609b ./gcc/testsuite/g++.old-deja/g++.mike/p4736c.C 3183066012b ./gcc/testsuite/g++.old-deja/g++.mike/p4750.C 1643480270b ./gcc/testsuite/g++.old-deja/g++.mike/p5469a.C + 2783396832b ./gcc/testsuite/g++.old-deja/g++.mike/p5469.C 1694086012b ./gcc/testsuite/g++.old-deja/g++.mike/p5571.C 2030989669b ./gcc/testsuite/g++.old-deja/g++.mike/p5611.C 3220562563b ./gcc/testsuite/g++.old-deja/g++.mike/p5673.C *************** *** 6999,7024 **** 1244723488b ./gcc/testsuite/g++.old-deja/g++.mike/p7180.C 3521513511b ./gcc/testsuite/g++.old-deja/g++.mike/p7325.C 3900843491b ./gcc/testsuite/g++.old-deja/g++.mike/p7476.C - 2349738175b ./gcc/testsuite/g++.old-deja/g++.mike/p755.C 3394798100b ./gcc/testsuite/g++.old-deja/g++.mike/p755a.C 1365378601b ./gcc/testsuite/g++.old-deja/g++.mike/p7626.C 2818833306b ./gcc/testsuite/g++.old-deja/g++.mike/p7635.C 2124571317b ./gcc/testsuite/g++.old-deja/g++.mike/p7651.C - 298093700b ./gcc/testsuite/g++.old-deja/g++.mike/p783.C 3247827104b ./gcc/testsuite/g++.old-deja/g++.mike/p783a.C 3185815998b ./gcc/testsuite/g++.old-deja/g++.mike/p783b.C 1112249731b ./gcc/testsuite/g++.old-deja/g++.mike/p784.C - 1887516335b ./gcc/testsuite/g++.old-deja/g++.mike/p786.C 3281865096b ./gcc/testsuite/g++.old-deja/g++.mike/p7865.C 341429709b ./gcc/testsuite/g++.old-deja/g++.mike/p7868.C ! 1539916341b ./gcc/testsuite/g++.old-deja/g++.mike/p789.C 973504582b ./gcc/testsuite/g++.old-deja/g++.mike/p789a.C 2120486239b ./gcc/testsuite/g++.old-deja/g++.mike/p7912.C 1656717793b ./gcc/testsuite/g++.old-deja/g++.mike/p8009.C 134774070b ./gcc/testsuite/g++.old-deja/g++.mike/p8018.C 2662329366b ./gcc/testsuite/g++.old-deja/g++.mike/p8039.C - 1398614996b ./gcc/testsuite/g++.old-deja/g++.mike/p807.C 3781414938b ./gcc/testsuite/g++.old-deja/g++.mike/p807a.C 3344337430b ./gcc/testsuite/g++.old-deja/g++.mike/p811.C 2698571232b ./gcc/testsuite/g++.old-deja/g++.mike/p8154.C 3491611004b ./gcc/testsuite/g++.old-deja/g++.mike/p8155.C --- 9870,9895 ---- 1244723488b ./gcc/testsuite/g++.old-deja/g++.mike/p7180.C 3521513511b ./gcc/testsuite/g++.old-deja/g++.mike/p7325.C 3900843491b ./gcc/testsuite/g++.old-deja/g++.mike/p7476.C 3394798100b ./gcc/testsuite/g++.old-deja/g++.mike/p755a.C + 2349738175b ./gcc/testsuite/g++.old-deja/g++.mike/p755.C 1365378601b ./gcc/testsuite/g++.old-deja/g++.mike/p7626.C 2818833306b ./gcc/testsuite/g++.old-deja/g++.mike/p7635.C 2124571317b ./gcc/testsuite/g++.old-deja/g++.mike/p7651.C 3247827104b ./gcc/testsuite/g++.old-deja/g++.mike/p783a.C 3185815998b ./gcc/testsuite/g++.old-deja/g++.mike/p783b.C + 298093700b ./gcc/testsuite/g++.old-deja/g++.mike/p783.C 1112249731b ./gcc/testsuite/g++.old-deja/g++.mike/p784.C 3281865096b ./gcc/testsuite/g++.old-deja/g++.mike/p7865.C 341429709b ./gcc/testsuite/g++.old-deja/g++.mike/p7868.C ! 1887516335b ./gcc/testsuite/g++.old-deja/g++.mike/p786.C 973504582b ./gcc/testsuite/g++.old-deja/g++.mike/p789a.C + 1539916341b ./gcc/testsuite/g++.old-deja/g++.mike/p789.C 2120486239b ./gcc/testsuite/g++.old-deja/g++.mike/p7912.C 1656717793b ./gcc/testsuite/g++.old-deja/g++.mike/p8009.C 134774070b ./gcc/testsuite/g++.old-deja/g++.mike/p8018.C 2662329366b ./gcc/testsuite/g++.old-deja/g++.mike/p8039.C 3781414938b ./gcc/testsuite/g++.old-deja/g++.mike/p807a.C + 1398614996b ./gcc/testsuite/g++.old-deja/g++.mike/p807.C 3344337430b ./gcc/testsuite/g++.old-deja/g++.mike/p811.C 2698571232b ./gcc/testsuite/g++.old-deja/g++.mike/p8154.C 3491611004b ./gcc/testsuite/g++.old-deja/g++.mike/p8155.C *************** *** 7027,7037 **** 4289506060b ./gcc/testsuite/g++.old-deja/g++.mike/p8460.C 2097683379b ./gcc/testsuite/g++.old-deja/g++.mike/p8483.C 1218023303b ./gcc/testsuite/g++.old-deja/g++.mike/p8620.C ! 249128071b ./gcc/testsuite/g++.old-deja/g++.mike/p8786.C 771352385b ./gcc/testsuite/g++.old-deja/g++.mike/p8804.C 776812521b ./gcc/testsuite/g++.old-deja/g++.mike/p8825.C 1371812496b ./gcc/testsuite/g++.old-deja/g++.mike/p9068.C ! 325691543b ./gcc/testsuite/g++.old-deja/g++.mike/p9129.C 3342831000b ./gcc/testsuite/g++.old-deja/g++.mike/p9206.C 2518851606b ./gcc/testsuite/g++.old-deja/g++.mike/p9506.C 1690639952b ./gcc/testsuite/g++.old-deja/g++.mike/p9706.C --- 9898,9908 ---- 4289506060b ./gcc/testsuite/g++.old-deja/g++.mike/p8460.C 2097683379b ./gcc/testsuite/g++.old-deja/g++.mike/p8483.C 1218023303b ./gcc/testsuite/g++.old-deja/g++.mike/p8620.C ! 2539344157b ./gcc/testsuite/g++.old-deja/g++.mike/p8786.C 771352385b ./gcc/testsuite/g++.old-deja/g++.mike/p8804.C 776812521b ./gcc/testsuite/g++.old-deja/g++.mike/p8825.C 1371812496b ./gcc/testsuite/g++.old-deja/g++.mike/p9068.C ! 2555513930b ./gcc/testsuite/g++.old-deja/g++.mike/p9129.C 3342831000b ./gcc/testsuite/g++.old-deja/g++.mike/p9206.C 2518851606b ./gcc/testsuite/g++.old-deja/g++.mike/p9506.C 1690639952b ./gcc/testsuite/g++.old-deja/g++.mike/p9706.C *************** *** 7075,7087 **** 1193160491b ./gcc/testsuite/g++.old-deja/g++.mike/vtable1.C 3226895086b ./gcc/testsuite/g++.old-deja/g++.mike/warn1.C 3433176936b ./gcc/testsuite/g++.old-deja/g++.mike/warn2.C ! 1152844660b ./gcc/testsuite/g++.old-deja/g++.mike/warn3.C 3770397490b ./gcc/testsuite/g++.old-deja/g++.mike/warn4.C 2345927769b ./gcc/testsuite/g++.old-deja/g++.mike/warn5.C 2855656530b ./gcc/testsuite/g++.old-deja/g++.mike/warn6.C 1810473850b ./gcc/testsuite/g++.old-deja/g++.mike/warn7.C 1569186871b ./gcc/testsuite/g++.old-deja/g++.mike/warn8.C - 3056861018b ./gcc/testsuite/g++.old-deja/g++.niklas/.cvsignore 4133635689b ./gcc/testsuite/g++.old-deja/g++.niklas/README 1859900513b ./gcc/testsuite/g++.old-deja/g++.niklas/t113.C 3921758020b ./gcc/testsuite/g++.old-deja/g++.niklas/t114.C --- 9946,9957 ---- 1193160491b ./gcc/testsuite/g++.old-deja/g++.mike/vtable1.C 3226895086b ./gcc/testsuite/g++.old-deja/g++.mike/warn1.C 3433176936b ./gcc/testsuite/g++.old-deja/g++.mike/warn2.C ! 300397398b ./gcc/testsuite/g++.old-deja/g++.mike/warn3.C 3770397490b ./gcc/testsuite/g++.old-deja/g++.mike/warn4.C 2345927769b ./gcc/testsuite/g++.old-deja/g++.mike/warn5.C 2855656530b ./gcc/testsuite/g++.old-deja/g++.mike/warn6.C 1810473850b ./gcc/testsuite/g++.old-deja/g++.mike/warn7.C 1569186871b ./gcc/testsuite/g++.old-deja/g++.mike/warn8.C 4133635689b ./gcc/testsuite/g++.old-deja/g++.niklas/README 1859900513b ./gcc/testsuite/g++.old-deja/g++.niklas/t113.C 3921758020b ./gcc/testsuite/g++.old-deja/g++.niklas/t114.C *************** *** 7143,7149 **** 99097863b ./gcc/testsuite/g++.old-deja/g++.ns/lookup5.C 2416418172b ./gcc/testsuite/g++.old-deja/g++.ns/main1.C 462860645b ./gcc/testsuite/g++.old-deja/g++.ns/new1.C - 320140404b ./gcc/testsuite/g++.old-deja/g++.ns/ns1.C 2286495086b ./gcc/testsuite/g++.old-deja/g++.ns/ns10.C 2018913859b ./gcc/testsuite/g++.old-deja/g++.ns/ns11.C 1953910502b ./gcc/testsuite/g++.old-deja/g++.ns/ns12.C --- 10013,10018 ---- *************** *** 7154,7159 **** --- 10023,10029 ---- 2083452456b ./gcc/testsuite/g++.old-deja/g++.ns/ns17.C 1679880705b ./gcc/testsuite/g++.old-deja/g++.ns/ns18.C 3180343024b ./gcc/testsuite/g++.old-deja/g++.ns/ns19.C + 320140404b ./gcc/testsuite/g++.old-deja/g++.ns/ns1.C 1879177898b ./gcc/testsuite/g++.old-deja/g++.ns/ns2.C 1465385187b ./gcc/testsuite/g++.old-deja/g++.ns/ns3.C 4084737299b ./gcc/testsuite/g++.old-deja/g++.ns/ns4.C *************** *** 7168,7174 **** 3876905928b ./gcc/testsuite/g++.old-deja/g++.ns/overload4.C 2260598962b ./gcc/testsuite/g++.old-deja/g++.ns/overload5.C 4131178865b ./gcc/testsuite/g++.old-deja/g++.ns/scoped1.C - 1497628723b ./gcc/testsuite/g++.old-deja/g++.ns/template1.C 1593366070b ./gcc/testsuite/g++.old-deja/g++.ns/template10.C 227548188b ./gcc/testsuite/g++.old-deja/g++.ns/template11.C 3712349348b ./gcc/testsuite/g++.old-deja/g++.ns/template12.C --- 10038,10043 ---- *************** *** 7178,7183 **** --- 10047,10053 ---- 703552988b ./gcc/testsuite/g++.old-deja/g++.ns/template16.C 3733063651b ./gcc/testsuite/g++.old-deja/g++.ns/template17.C 1888321924b ./gcc/testsuite/g++.old-deja/g++.ns/template18.C + 1497628723b ./gcc/testsuite/g++.old-deja/g++.ns/template1.C 2875853595b ./gcc/testsuite/g++.old-deja/g++.ns/template2.C 1112300813b ./gcc/testsuite/g++.old-deja/g++.ns/template3.C 2350177435b ./gcc/testsuite/g++.old-deja/g++.ns/template4.C *************** *** 7189,7200 **** 84089911b ./gcc/testsuite/g++.old-deja/g++.ns/type1.C 3277562556b ./gcc/testsuite/g++.old-deja/g++.ns/type2.C 1028524427b ./gcc/testsuite/g++.old-deja/g++.ns/undef1.C - 1496925944b ./gcc/testsuite/g++.old-deja/g++.ns/using1.C 3481627695b ./gcc/testsuite/g++.old-deja/g++.ns/using10.C 3329538563b ./gcc/testsuite/g++.old-deja/g++.ns/using11.C 1085995099b ./gcc/testsuite/g++.old-deja/g++.ns/using12.C 883766752b ./gcc/testsuite/g++.old-deja/g++.ns/using13.C 35819294b ./gcc/testsuite/g++.old-deja/g++.ns/using14.C 549926689b ./gcc/testsuite/g++.old-deja/g++.ns/using2.C 2238481400b ./gcc/testsuite/g++.old-deja/g++.ns/using3.C 3304922930b ./gcc/testsuite/g++.old-deja/g++.ns/using4.C --- 10059,10070 ---- 84089911b ./gcc/testsuite/g++.old-deja/g++.ns/type1.C 3277562556b ./gcc/testsuite/g++.old-deja/g++.ns/type2.C 1028524427b ./gcc/testsuite/g++.old-deja/g++.ns/undef1.C 3481627695b ./gcc/testsuite/g++.old-deja/g++.ns/using10.C 3329538563b ./gcc/testsuite/g++.old-deja/g++.ns/using11.C 1085995099b ./gcc/testsuite/g++.old-deja/g++.ns/using12.C 883766752b ./gcc/testsuite/g++.old-deja/g++.ns/using13.C 35819294b ./gcc/testsuite/g++.old-deja/g++.ns/using14.C + 1496925944b ./gcc/testsuite/g++.old-deja/g++.ns/using1.C 549926689b ./gcc/testsuite/g++.old-deja/g++.ns/using2.C 2238481400b ./gcc/testsuite/g++.old-deja/g++.ns/using3.C 3304922930b ./gcc/testsuite/g++.old-deja/g++.ns/using4.C *************** *** 7203,7209 **** 3099602163b ./gcc/testsuite/g++.old-deja/g++.ns/using7.C 396388537b ./gcc/testsuite/g++.old-deja/g++.ns/using8.C 536814910b ./gcc/testsuite/g++.old-deja/g++.ns/using9.C ! 624680462b ./gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog 3728265872b ./gcc/testsuite/g++.old-deja/g++.oliva/ctor1.C 3026414575b ./gcc/testsuite/g++.old-deja/g++.oliva/delete1.C 3639944207b ./gcc/testsuite/g++.old-deja/g++.oliva/delete2.C --- 10073,10079 ---- 3099602163b ./gcc/testsuite/g++.old-deja/g++.ns/using7.C 396388537b ./gcc/testsuite/g++.old-deja/g++.ns/using8.C 536814910b ./gcc/testsuite/g++.old-deja/g++.ns/using9.C ! 3908942161b ./gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog 3728265872b ./gcc/testsuite/g++.old-deja/g++.oliva/ctor1.C 3026414575b ./gcc/testsuite/g++.old-deja/g++.oliva/delete1.C 3639944207b ./gcc/testsuite/g++.old-deja/g++.oliva/delete2.C *************** *** 7218,7223 **** --- 10088,10095 ---- 738813804b ./gcc/testsuite/g++.old-deja/g++.oliva/ext1.C 149147424b ./gcc/testsuite/g++.old-deja/g++.oliva/friend1.C 3385010570b ./gcc/testsuite/g++.old-deja/g++.oliva/inline1.C + 4116417275b ./gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C + 3935429550b ./gcc/testsuite/g++.old-deja/g++.oliva/linkage1-main.cc 2214033786b ./gcc/testsuite/g++.old-deja/g++.oliva/nameret1.C 2703397514b ./gcc/testsuite/g++.old-deja/g++.oliva/nameret2.C 759830263b ./gcc/testsuite/g++.old-deja/g++.oliva/new1.C *************** *** 7225,7235 **** 2491296653b ./gcc/testsuite/g++.old-deja/g++.oliva/ns2.C 2727020577b ./gcc/testsuite/g++.old-deja/g++.oliva/ns3.C 55143343b ./gcc/testsuite/g++.old-deja/g++.oliva/overload1.C ! 2278180057b ./gcc/testsuite/g++.old-deja/g++.oliva/partord1.C 4276767902b ./gcc/testsuite/g++.old-deja/g++.oliva/partspec1.C 2386630112b ./gcc/testsuite/g++.old-deja/g++.oliva/stkalign.C - 1309552996b ./gcc/testsuite/g++.old-deja/g++.oliva/template1.C 4240481284b ./gcc/testsuite/g++.old-deja/g++.oliva/template10.C 894610317b ./gcc/testsuite/g++.old-deja/g++.oliva/template2.C 4111994491b ./gcc/testsuite/g++.old-deja/g++.oliva/template3.C 3380741154b ./gcc/testsuite/g++.old-deja/g++.oliva/template4.C --- 10097,10107 ---- 2491296653b ./gcc/testsuite/g++.old-deja/g++.oliva/ns2.C 2727020577b ./gcc/testsuite/g++.old-deja/g++.oliva/ns3.C 55143343b ./gcc/testsuite/g++.old-deja/g++.oliva/overload1.C ! 1341045521b ./gcc/testsuite/g++.old-deja/g++.oliva/partord1.C 4276767902b ./gcc/testsuite/g++.old-deja/g++.oliva/partspec1.C 2386630112b ./gcc/testsuite/g++.old-deja/g++.oliva/stkalign.C 4240481284b ./gcc/testsuite/g++.old-deja/g++.oliva/template10.C + 1309552996b ./gcc/testsuite/g++.old-deja/g++.oliva/template1.C 894610317b ./gcc/testsuite/g++.old-deja/g++.oliva/template2.C 4111994491b ./gcc/testsuite/g++.old-deja/g++.oliva/template3.C 3380741154b ./gcc/testsuite/g++.old-deja/g++.oliva/template4.C *************** *** 7242,7253 **** 2910311896b ./gcc/testsuite/g++.old-deja/g++.oliva/typename1.C 3314243773b ./gcc/testsuite/g++.old-deja/g++.oliva/typename2.C 3536726592b ./gcc/testsuite/g++.old-deja/g++.oliva/typeof1.C - 3056861018b ./gcc/testsuite/g++.old-deja/g++.other/.cvsignore 1057884755b ./gcc/testsuite/g++.old-deja/g++.other/900403_04.C 3988635652b ./gcc/testsuite/g++.old-deja/g++.other/900519_12.C - 2645069492b ./gcc/testsuite/g++.old-deja/g++.other/access1.C 3191928166b ./gcc/testsuite/g++.old-deja/g++.other/access10.C 2726240569b ./gcc/testsuite/g++.old-deja/g++.other/access11.C 627859229b ./gcc/testsuite/g++.old-deja/g++.other/access2.C 2495312369b ./gcc/testsuite/g++.old-deja/g++.other/access3.C 2750828805b ./gcc/testsuite/g++.old-deja/g++.other/access4.C --- 10114,10124 ---- 2910311896b ./gcc/testsuite/g++.old-deja/g++.oliva/typename1.C 3314243773b ./gcc/testsuite/g++.old-deja/g++.oliva/typename2.C 3536726592b ./gcc/testsuite/g++.old-deja/g++.oliva/typeof1.C 1057884755b ./gcc/testsuite/g++.old-deja/g++.other/900403_04.C 3988635652b ./gcc/testsuite/g++.old-deja/g++.other/900519_12.C 3191928166b ./gcc/testsuite/g++.old-deja/g++.other/access10.C 2726240569b ./gcc/testsuite/g++.old-deja/g++.other/access11.C + 2645069492b ./gcc/testsuite/g++.old-deja/g++.other/access1.C 627859229b ./gcc/testsuite/g++.old-deja/g++.other/access2.C 2495312369b ./gcc/testsuite/g++.old-deja/g++.other/access3.C 2750828805b ./gcc/testsuite/g++.old-deja/g++.other/access4.C *************** *** 7279,7285 **** 128237130b ./gcc/testsuite/g++.old-deja/g++.other/array9.C 775293500b ./gcc/testsuite/g++.old-deja/g++.other/asm1.C 1087917488b ./gcc/testsuite/g++.old-deja/g++.other/asm2.C ! 2120817147b ./gcc/testsuite/g++.old-deja/g++.other/asm3.C 4169192453b ./gcc/testsuite/g++.old-deja/g++.other/badarrow.C 1457616136b ./gcc/testsuite/g++.old-deja/g++.other/badopt1.C 578421507b ./gcc/testsuite/g++.old-deja/g++.other/base1.C --- 10150,10156 ---- 128237130b ./gcc/testsuite/g++.old-deja/g++.other/array9.C 775293500b ./gcc/testsuite/g++.old-deja/g++.other/asm1.C 1087917488b ./gcc/testsuite/g++.old-deja/g++.other/asm2.C ! 2367096086b ./gcc/testsuite/g++.old-deja/g++.other/asm3.C 4169192453b ./gcc/testsuite/g++.old-deja/g++.other/badarrow.C 1457616136b ./gcc/testsuite/g++.old-deja/g++.other/badopt1.C 578421507b ./gcc/testsuite/g++.old-deja/g++.other/base1.C *************** *** 7288,7293 **** --- 10159,10165 ---- 2880959878b ./gcc/testsuite/g++.old-deja/g++.other/bitfld3.C 574179745b ./gcc/testsuite/g++.old-deja/g++.other/bitfld4.C 2818363580b ./gcc/testsuite/g++.old-deja/g++.other/bitfld5.C + 790805105b ./gcc/testsuite/g++.old-deja/g++.other/builtins10.C 849916728b ./gcc/testsuite/g++.old-deja/g++.other/builtins1.C 1119192045b ./gcc/testsuite/g++.old-deja/g++.other/builtins2.C 1541855856b ./gcc/testsuite/g++.old-deja/g++.other/builtins3.C *************** *** 7312,7317 **** --- 10184,10192 ---- 3620214006b ./gcc/testsuite/g++.old-deja/g++.other/comdat1.C 2015497124b ./gcc/testsuite/g++.old-deja/g++.other/comdat2-aux.cc 1235507024b ./gcc/testsuite/g++.old-deja/g++.other/comdat2.C + 3978549342b ./gcc/testsuite/g++.old-deja/g++.other/comdat3-aux.cc + 3930848226b ./gcc/testsuite/g++.old-deja/g++.other/comdat3.C + 1884629113b ./gcc/testsuite/g++.old-deja/g++.other/comdat3.h 32346335b ./gcc/testsuite/g++.old-deja/g++.other/cond1.C 2040886616b ./gcc/testsuite/g++.old-deja/g++.other/cond2.C 1693754994b ./gcc/testsuite/g++.old-deja/g++.other/cond3.C *************** *** 7334,7340 **** 3735054018b ./gcc/testsuite/g++.old-deja/g++.other/copy2.C 4116304803b ./gcc/testsuite/g++.old-deja/g++.other/copy3.C 809878899b ./gcc/testsuite/g++.old-deja/g++.other/covar1.C - 1458918645b ./gcc/testsuite/g++.old-deja/g++.other/crash1.C 2622243234b ./gcc/testsuite/g++.old-deja/g++.other/crash10.C 1409785718b ./gcc/testsuite/g++.old-deja/g++.other/crash11.C 155389209b ./gcc/testsuite/g++.old-deja/g++.other/crash12.C --- 10209,10214 ---- *************** *** 7345,7351 **** 2768038718b ./gcc/testsuite/g++.old-deja/g++.other/crash17.C 1844482260b ./gcc/testsuite/g++.old-deja/g++.other/crash18.C 4239879636b ./gcc/testsuite/g++.old-deja/g++.other/crash19.C ! 2556139745b ./gcc/testsuite/g++.old-deja/g++.other/crash2.C 2114923665b ./gcc/testsuite/g++.old-deja/g++.other/crash20.C 2408483670b ./gcc/testsuite/g++.old-deja/g++.other/crash21.C 389951009b ./gcc/testsuite/g++.old-deja/g++.other/crash22.C --- 10219,10225 ---- 2768038718b ./gcc/testsuite/g++.old-deja/g++.other/crash17.C 1844482260b ./gcc/testsuite/g++.old-deja/g++.other/crash18.C 4239879636b ./gcc/testsuite/g++.old-deja/g++.other/crash19.C ! 1458918645b ./gcc/testsuite/g++.old-deja/g++.other/crash1.C 2114923665b ./gcc/testsuite/g++.old-deja/g++.other/crash20.C 2408483670b ./gcc/testsuite/g++.old-deja/g++.other/crash21.C 389951009b ./gcc/testsuite/g++.old-deja/g++.other/crash22.C *************** *** 7356,7365 **** 621631894b ./gcc/testsuite/g++.old-deja/g++.other/crash27.C 1274918070b ./gcc/testsuite/g++.old-deja/g++.other/crash28.C 3218325168b ./gcc/testsuite/g++.old-deja/g++.other/crash29.C ! 1986207284b ./gcc/testsuite/g++.old-deja/g++.other/crash3.C 3863621974b ./gcc/testsuite/g++.old-deja/g++.other/crash30.C 1567414961b ./gcc/testsuite/g++.old-deja/g++.other/crash31.C ! 2337764618b ./gcc/testsuite/g++.old-deja/g++.other/crash32.C 3826660229b ./gcc/testsuite/g++.old-deja/g++.other/crash33.C 1464877078b ./gcc/testsuite/g++.old-deja/g++.other/crash34.C 1090618161b ./gcc/testsuite/g++.old-deja/g++.other/crash35.C --- 10230,10239 ---- 621631894b ./gcc/testsuite/g++.old-deja/g++.other/crash27.C 1274918070b ./gcc/testsuite/g++.old-deja/g++.other/crash28.C 3218325168b ./gcc/testsuite/g++.old-deja/g++.other/crash29.C ! 2556139745b ./gcc/testsuite/g++.old-deja/g++.other/crash2.C 3863621974b ./gcc/testsuite/g++.old-deja/g++.other/crash30.C 1567414961b ./gcc/testsuite/g++.old-deja/g++.other/crash31.C ! 654989067b ./gcc/testsuite/g++.old-deja/g++.other/crash32.C 3826660229b ./gcc/testsuite/g++.old-deja/g++.other/crash33.C 1464877078b ./gcc/testsuite/g++.old-deja/g++.other/crash34.C 1090618161b ./gcc/testsuite/g++.old-deja/g++.other/crash35.C *************** *** 7367,7379 **** 3888381363b ./gcc/testsuite/g++.old-deja/g++.other/crash37.C 3660059490b ./gcc/testsuite/g++.old-deja/g++.other/crash38.C 465327177b ./gcc/testsuite/g++.old-deja/g++.other/crash39.C ! 226105322b ./gcc/testsuite/g++.old-deja/g++.other/crash4.C 2473163715b ./gcc/testsuite/g++.old-deja/g++.other/crash40.C 2559623170b ./gcc/testsuite/g++.old-deja/g++.other/crash41.C 2300001961b ./gcc/testsuite/g++.old-deja/g++.other/crash42.C 1657789856b ./gcc/testsuite/g++.old-deja/g++.other/crash5.C - 3212679954b ./gcc/testsuite/g++.old-deja/g++.other/crash6.C 2889210351b ./gcc/testsuite/g++.old-deja/g++.other/crash60.C 3092570108b ./gcc/testsuite/g++.old-deja/g++.other/crash7.C 1968632283b ./gcc/testsuite/g++.old-deja/g++.other/crash8.C 739803606b ./gcc/testsuite/g++.old-deja/g++.other/crash9.C --- 10241,10254 ---- 3888381363b ./gcc/testsuite/g++.old-deja/g++.other/crash37.C 3660059490b ./gcc/testsuite/g++.old-deja/g++.other/crash38.C 465327177b ./gcc/testsuite/g++.old-deja/g++.other/crash39.C ! 1986207284b ./gcc/testsuite/g++.old-deja/g++.other/crash3.C 2473163715b ./gcc/testsuite/g++.old-deja/g++.other/crash40.C 2559623170b ./gcc/testsuite/g++.old-deja/g++.other/crash41.C 2300001961b ./gcc/testsuite/g++.old-deja/g++.other/crash42.C + 226105322b ./gcc/testsuite/g++.old-deja/g++.other/crash4.C 1657789856b ./gcc/testsuite/g++.old-deja/g++.other/crash5.C 2889210351b ./gcc/testsuite/g++.old-deja/g++.other/crash60.C + 3212679954b ./gcc/testsuite/g++.old-deja/g++.other/crash6.C 3092570108b ./gcc/testsuite/g++.old-deja/g++.other/crash7.C 1968632283b ./gcc/testsuite/g++.old-deja/g++.other/crash8.C 739803606b ./gcc/testsuite/g++.old-deja/g++.other/crash9.C *************** *** 7396,7407 **** 424334940b ./gcc/testsuite/g++.old-deja/g++.other/decl2.C 3608003944b ./gcc/testsuite/g++.old-deja/g++.other/decl3.C 1694963597b ./gcc/testsuite/g++.old-deja/g++.other/decl4.C ! 1101755295b ./gcc/testsuite/g++.old-deja/g++.other/decl5.C 1313195230b ./gcc/testsuite/g++.old-deja/g++.other/decl6.C 634053859b ./gcc/testsuite/g++.old-deja/g++.other/decl7.C 681270539b ./gcc/testsuite/g++.old-deja/g++.other/decl8.C 2910519026b ./gcc/testsuite/g++.old-deja/g++.other/decl9.C ! 2306726678b ./gcc/testsuite/g++.old-deja/g++.other/defarg1.C 2242070909b ./gcc/testsuite/g++.old-deja/g++.other/defarg2.C 1782517406b ./gcc/testsuite/g++.old-deja/g++.other/defarg3.C 1949407113b ./gcc/testsuite/g++.old-deja/g++.other/defarg4.C --- 10271,10282 ---- 424334940b ./gcc/testsuite/g++.old-deja/g++.other/decl2.C 3608003944b ./gcc/testsuite/g++.old-deja/g++.other/decl3.C 1694963597b ./gcc/testsuite/g++.old-deja/g++.other/decl4.C ! 399391711b ./gcc/testsuite/g++.old-deja/g++.other/decl5.C 1313195230b ./gcc/testsuite/g++.old-deja/g++.other/decl6.C 634053859b ./gcc/testsuite/g++.old-deja/g++.other/decl7.C 681270539b ./gcc/testsuite/g++.old-deja/g++.other/decl8.C 2910519026b ./gcc/testsuite/g++.old-deja/g++.other/decl9.C ! 400550551b ./gcc/testsuite/g++.old-deja/g++.other/defarg1.C 2242070909b ./gcc/testsuite/g++.old-deja/g++.other/defarg2.C 1782517406b ./gcc/testsuite/g++.old-deja/g++.other/defarg3.C 1949407113b ./gcc/testsuite/g++.old-deja/g++.other/defarg4.C *************** *** 7413,7419 **** 2802881760b ./gcc/testsuite/g++.old-deja/g++.other/delete1.C 276485906b ./gcc/testsuite/g++.old-deja/g++.other/delete2.C 904586144b ./gcc/testsuite/g++.old-deja/g++.other/delete3.C ! 3432343895b ./gcc/testsuite/g++.old-deja/g++.other/delete4.C 1951825413b ./gcc/testsuite/g++.old-deja/g++.other/delete5.C 3466783310b ./gcc/testsuite/g++.old-deja/g++.other/delete6.C 509373967b ./gcc/testsuite/g++.old-deja/g++.other/delete7.C --- 10288,10294 ---- 2802881760b ./gcc/testsuite/g++.old-deja/g++.other/delete1.C 276485906b ./gcc/testsuite/g++.old-deja/g++.other/delete2.C 904586144b ./gcc/testsuite/g++.old-deja/g++.other/delete3.C ! 4051772028b ./gcc/testsuite/g++.old-deja/g++.other/delete4.C 1951825413b ./gcc/testsuite/g++.old-deja/g++.other/delete5.C 3466783310b ./gcc/testsuite/g++.old-deja/g++.other/delete6.C 509373967b ./gcc/testsuite/g++.old-deja/g++.other/delete7.C *************** *** 7425,7435 **** 4096635328b ./gcc/testsuite/g++.old-deja/g++.other/dll-4.C 4188389053b ./gcc/testsuite/g++.old-deja/g++.other/dll-5.C 2919979689b ./gcc/testsuite/g++.old-deja/g++.other/dll-6.C - 1284663345b ./gcc/testsuite/g++.old-deja/g++.other/dtor1.C 18134551b ./gcc/testsuite/g++.old-deja/g++.other/dtor10.C 1164270328b ./gcc/testsuite/g++.old-deja/g++.other/dtor11.C 3251874725b ./gcc/testsuite/g++.old-deja/g++.other/dtor12.C 2995412590b ./gcc/testsuite/g++.old-deja/g++.other/dtor13.C 19912911b ./gcc/testsuite/g++.old-deja/g++.other/dtor2.C 1972124996b ./gcc/testsuite/g++.old-deja/g++.other/dtor3.C 3858298340b ./gcc/testsuite/g++.old-deja/g++.other/dtor4.C --- 10300,10310 ---- 4096635328b ./gcc/testsuite/g++.old-deja/g++.other/dll-4.C 4188389053b ./gcc/testsuite/g++.old-deja/g++.other/dll-5.C 2919979689b ./gcc/testsuite/g++.old-deja/g++.other/dll-6.C 18134551b ./gcc/testsuite/g++.old-deja/g++.other/dtor10.C 1164270328b ./gcc/testsuite/g++.old-deja/g++.other/dtor11.C 3251874725b ./gcc/testsuite/g++.old-deja/g++.other/dtor12.C 2995412590b ./gcc/testsuite/g++.old-deja/g++.other/dtor13.C + 1284663345b ./gcc/testsuite/g++.old-deja/g++.other/dtor1.C 19912911b ./gcc/testsuite/g++.old-deja/g++.other/dtor2.C 1972124996b ./gcc/testsuite/g++.old-deja/g++.other/dtor3.C 3858298340b ./gcc/testsuite/g++.old-deja/g++.other/dtor4.C *************** *** 7444,7455 **** 771042933b ./gcc/testsuite/g++.old-deja/g++.other/dyncast4.C 3056485598b ./gcc/testsuite/g++.old-deja/g++.other/dyncast5.C 1196348440b ./gcc/testsuite/g++.old-deja/g++.other/dyncast6.C - 326457279b ./gcc/testsuite/g++.old-deja/g++.other/eh.C 3203327173b ./gcc/testsuite/g++.old-deja/g++.other/eh1.C 4127184370b ./gcc/testsuite/g++.old-deja/g++.other/eh2.C 3559396844b ./gcc/testsuite/g++.old-deja/g++.other/eh3.C 3143843455b ./gcc/testsuite/g++.old-deja/g++.other/eh4.C 1752543333b ./gcc/testsuite/g++.old-deja/g++.other/eh5.C 3053308594b ./gcc/testsuite/g++.old-deja/g++.other/elab1.C 3888745390b ./gcc/testsuite/g++.old-deja/g++.other/empty1.C 3170636835b ./gcc/testsuite/g++.old-deja/g++.other/empty2.C --- 10319,10330 ---- 771042933b ./gcc/testsuite/g++.old-deja/g++.other/dyncast4.C 3056485598b ./gcc/testsuite/g++.old-deja/g++.other/dyncast5.C 1196348440b ./gcc/testsuite/g++.old-deja/g++.other/dyncast6.C 3203327173b ./gcc/testsuite/g++.old-deja/g++.other/eh1.C 4127184370b ./gcc/testsuite/g++.old-deja/g++.other/eh2.C 3559396844b ./gcc/testsuite/g++.old-deja/g++.other/eh3.C 3143843455b ./gcc/testsuite/g++.old-deja/g++.other/eh4.C 1752543333b ./gcc/testsuite/g++.old-deja/g++.other/eh5.C + 326457279b ./gcc/testsuite/g++.old-deja/g++.other/eh.C 3053308594b ./gcc/testsuite/g++.old-deja/g++.other/elab1.C 3888745390b ./gcc/testsuite/g++.old-deja/g++.other/empty1.C 3170636835b ./gcc/testsuite/g++.old-deja/g++.other/empty2.C *************** *** 7471,7479 **** 1648602614b ./gcc/testsuite/g++.old-deja/g++.other/fnname1.C 2595576321b ./gcc/testsuite/g++.old-deja/g++.other/for1.C 3948754017b ./gcc/testsuite/g++.old-deja/g++.other/for2.C - 3153977462b ./gcc/testsuite/g++.old-deja/g++.other/friend1.C 1195751396b ./gcc/testsuite/g++.old-deja/g++.other/friend10.C 3233024721b ./gcc/testsuite/g++.old-deja/g++.other/friend11.C 1833376578b ./gcc/testsuite/g++.old-deja/g++.other/friend2.C 1953203540b ./gcc/testsuite/g++.old-deja/g++.other/friend3.C 438287814b ./gcc/testsuite/g++.old-deja/g++.other/friend4.C --- 10346,10354 ---- 1648602614b ./gcc/testsuite/g++.old-deja/g++.other/fnname1.C 2595576321b ./gcc/testsuite/g++.old-deja/g++.other/for1.C 3948754017b ./gcc/testsuite/g++.old-deja/g++.other/for2.C 1195751396b ./gcc/testsuite/g++.old-deja/g++.other/friend10.C 3233024721b ./gcc/testsuite/g++.old-deja/g++.other/friend11.C + 3153977462b ./gcc/testsuite/g++.old-deja/g++.other/friend1.C 1833376578b ./gcc/testsuite/g++.old-deja/g++.other/friend2.C 1953203540b ./gcc/testsuite/g++.old-deja/g++.other/friend3.C 438287814b ./gcc/testsuite/g++.old-deja/g++.other/friend4.C *************** *** 7488,7494 **** 2785798940b ./gcc/testsuite/g++.old-deja/g++.other/goto4.C 2615587703b ./gcc/testsuite/g++.old-deja/g++.other/headers1.C 1685869594b ./gcc/testsuite/g++.old-deja/g++.other/incomplete.C - 927757255b ./gcc/testsuite/g++.old-deja/g++.other/init1.C 1598723950b ./gcc/testsuite/g++.old-deja/g++.other/init10.C 1393596821b ./gcc/testsuite/g++.old-deja/g++.other/init11.C 3918302157b ./gcc/testsuite/g++.old-deja/g++.other/init12.C --- 10363,10368 ---- *************** *** 7497,7502 **** --- 10371,10377 ---- 2091624673b ./gcc/testsuite/g++.old-deja/g++.other/init15.C 1512725790b ./gcc/testsuite/g++.old-deja/g++.other/init16.C 1093306404b ./gcc/testsuite/g++.old-deja/g++.other/init17.C + 927757255b ./gcc/testsuite/g++.old-deja/g++.other/init1.C 2603599454b ./gcc/testsuite/g++.old-deja/g++.other/init2.C 60242679b ./gcc/testsuite/g++.old-deja/g++.other/init3.C 1928831477b ./gcc/testsuite/g++.old-deja/g++.other/init4.C *************** *** 7506,7512 **** 1098289890b ./gcc/testsuite/g++.old-deja/g++.other/init8.C 557927133b ./gcc/testsuite/g++.old-deja/g++.other/init9.C 1778823150b ./gcc/testsuite/g++.old-deja/g++.other/initstring.C - 2434780038b ./gcc/testsuite/g++.old-deja/g++.other/inline1.C 1695544611b ./gcc/testsuite/g++.old-deja/g++.other/inline10.C 3270512395b ./gcc/testsuite/g++.old-deja/g++.other/inline11.C 1325890431b ./gcc/testsuite/g++.old-deja/g++.other/inline12.C --- 10381,10386 ---- *************** *** 7517,7526 **** 1438985095b ./gcc/testsuite/g++.old-deja/g++.other/inline17.C 938935758b ./gcc/testsuite/g++.old-deja/g++.other/inline18.C 3672842965b ./gcc/testsuite/g++.old-deja/g++.other/inline19.C ! 2138039153b ./gcc/testsuite/g++.old-deja/g++.other/inline2.C 1204135970b ./gcc/testsuite/g++.old-deja/g++.other/inline20.C ! 3724397225b ./gcc/testsuite/g++.old-deja/g++.other/inline21.C 3956374226b ./gcc/testsuite/g++.old-deja/g++.other/inline23.C 1052546588b ./gcc/testsuite/g++.old-deja/g++.other/inline3.C 56787941b ./gcc/testsuite/g++.old-deja/g++.other/inline4.C 3486429137b ./gcc/testsuite/g++.old-deja/g++.other/inline5.C --- 10391,10401 ---- 1438985095b ./gcc/testsuite/g++.old-deja/g++.other/inline17.C 938935758b ./gcc/testsuite/g++.old-deja/g++.other/inline18.C 3672842965b ./gcc/testsuite/g++.old-deja/g++.other/inline19.C ! 2434780038b ./gcc/testsuite/g++.old-deja/g++.other/inline1.C 1204135970b ./gcc/testsuite/g++.old-deja/g++.other/inline20.C ! 1800807796b ./gcc/testsuite/g++.old-deja/g++.other/inline21.C 3956374226b ./gcc/testsuite/g++.old-deja/g++.other/inline23.C + 2138039153b ./gcc/testsuite/g++.old-deja/g++.other/inline2.C 1052546588b ./gcc/testsuite/g++.old-deja/g++.other/inline3.C 56787941b ./gcc/testsuite/g++.old-deja/g++.other/inline4.C 3486429137b ./gcc/testsuite/g++.old-deja/g++.other/inline5.C *************** *** 7542,7553 **** 617990355b ./gcc/testsuite/g++.old-deja/g++.other/linkage5.C 3257516835b ./gcc/testsuite/g++.old-deja/g++.other/linkage6.C 1235107285b ./gcc/testsuite/g++.old-deja/g++.other/linkage7.C - 3682661614b ./gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C 577632193b ./gcc/testsuite/g++.old-deja/g++.other/local1.C 88188461b ./gcc/testsuite/g++.old-deja/g++.other/local2.C 2840919735b ./gcc/testsuite/g++.old-deja/g++.other/local3.C 1540707900b ./gcc/testsuite/g++.old-deja/g++.other/local4.C ! 2269210126b ./gcc/testsuite/g++.old-deja/g++.other/lookup1.C 1737066412b ./gcc/testsuite/g++.old-deja/g++.other/lookup10.C 1037102268b ./gcc/testsuite/g++.old-deja/g++.other/lookup11.C 245062181b ./gcc/testsuite/g++.old-deja/g++.other/lookup12.C --- 10417,10427 ---- 617990355b ./gcc/testsuite/g++.old-deja/g++.other/linkage5.C 3257516835b ./gcc/testsuite/g++.old-deja/g++.other/linkage6.C 1235107285b ./gcc/testsuite/g++.old-deja/g++.other/linkage7.C 577632193b ./gcc/testsuite/g++.old-deja/g++.other/local1.C 88188461b ./gcc/testsuite/g++.old-deja/g++.other/local2.C 2840919735b ./gcc/testsuite/g++.old-deja/g++.other/local3.C 1540707900b ./gcc/testsuite/g++.old-deja/g++.other/local4.C ! 3682661614b ./gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C 1737066412b ./gcc/testsuite/g++.old-deja/g++.other/lookup10.C 1037102268b ./gcc/testsuite/g++.old-deja/g++.other/lookup11.C 245062181b ./gcc/testsuite/g++.old-deja/g++.other/lookup12.C *************** *** 7558,7569 **** 697721056b ./gcc/testsuite/g++.old-deja/g++.other/lookup17.C 815912902b ./gcc/testsuite/g++.old-deja/g++.other/lookup18.C 280785492b ./gcc/testsuite/g++.old-deja/g++.other/lookup19.C ! 3765524406b ./gcc/testsuite/g++.old-deja/g++.other/lookup2.C 436406477b ./gcc/testsuite/g++.old-deja/g++.other/lookup20.C 1209560984b ./gcc/testsuite/g++.old-deja/g++.other/lookup21.C 614093465b ./gcc/testsuite/g++.old-deja/g++.other/lookup22.C 2433482316b ./gcc/testsuite/g++.old-deja/g++.other/lookup23.C 1637417916b ./gcc/testsuite/g++.old-deja/g++.other/lookup24.C 2344878047b ./gcc/testsuite/g++.old-deja/g++.other/lookup3.C 1023689233b ./gcc/testsuite/g++.old-deja/g++.other/lookup4.C 2548363938b ./gcc/testsuite/g++.old-deja/g++.other/lookup5.C --- 10432,10444 ---- 697721056b ./gcc/testsuite/g++.old-deja/g++.other/lookup17.C 815912902b ./gcc/testsuite/g++.old-deja/g++.other/lookup18.C 280785492b ./gcc/testsuite/g++.old-deja/g++.other/lookup19.C ! 2269210126b ./gcc/testsuite/g++.old-deja/g++.other/lookup1.C 436406477b ./gcc/testsuite/g++.old-deja/g++.other/lookup20.C 1209560984b ./gcc/testsuite/g++.old-deja/g++.other/lookup21.C 614093465b ./gcc/testsuite/g++.old-deja/g++.other/lookup22.C 2433482316b ./gcc/testsuite/g++.old-deja/g++.other/lookup23.C 1637417916b ./gcc/testsuite/g++.old-deja/g++.other/lookup24.C + 3765524406b ./gcc/testsuite/g++.old-deja/g++.other/lookup2.C 2344878047b ./gcc/testsuite/g++.old-deja/g++.other/lookup3.C 1023689233b ./gcc/testsuite/g++.old-deja/g++.other/lookup4.C 2548363938b ./gcc/testsuite/g++.old-deja/g++.other/lookup5.C *************** *** 7583,7595 **** 4217851482b ./gcc/testsuite/g++.old-deja/g++.other/nested2.C 2800890661b ./gcc/testsuite/g++.old-deja/g++.other/nested3.C 3749047676b ./gcc/testsuite/g++.old-deja/g++.other/nested4.C - 2658114065b ./gcc/testsuite/g++.old-deja/g++.other/new.C 2899415960b ./gcc/testsuite/g++.old-deja/g++.other/new2.C 1176720819b ./gcc/testsuite/g++.old-deja/g++.other/new3.C 2825689270b ./gcc/testsuite/g++.old-deja/g++.other/new4.C 850194097b ./gcc/testsuite/g++.old-deja/g++.other/new5.C 2266969204b ./gcc/testsuite/g++.old-deja/g++.other/new6.C 2661895613b ./gcc/testsuite/g++.old-deja/g++.other/new7.C 4142273200b ./gcc/testsuite/g++.old-deja/g++.other/null1.C 2086727759b ./gcc/testsuite/g++.old-deja/g++.other/null2.C 2676296478b ./gcc/testsuite/g++.old-deja/g++.other/null3.C --- 10458,10470 ---- 4217851482b ./gcc/testsuite/g++.old-deja/g++.other/nested2.C 2800890661b ./gcc/testsuite/g++.old-deja/g++.other/nested3.C 3749047676b ./gcc/testsuite/g++.old-deja/g++.other/nested4.C 2899415960b ./gcc/testsuite/g++.old-deja/g++.other/new2.C 1176720819b ./gcc/testsuite/g++.old-deja/g++.other/new3.C 2825689270b ./gcc/testsuite/g++.old-deja/g++.other/new4.C 850194097b ./gcc/testsuite/g++.old-deja/g++.other/new5.C 2266969204b ./gcc/testsuite/g++.old-deja/g++.other/new6.C 2661895613b ./gcc/testsuite/g++.old-deja/g++.other/new7.C + 2658114065b ./gcc/testsuite/g++.old-deja/g++.other/new.C 4142273200b ./gcc/testsuite/g++.old-deja/g++.other/null1.C 2086727759b ./gcc/testsuite/g++.old-deja/g++.other/null2.C 2676296478b ./gcc/testsuite/g++.old-deja/g++.other/null3.C *************** *** 7602,7613 **** 3940439065b ./gcc/testsuite/g++.old-deja/g++.other/optimize4.C 3254521143b ./gcc/testsuite/g++.old-deja/g++.other/overcnv1.C 96458692b ./gcc/testsuite/g++.old-deja/g++.other/overcnv2.C - 2161968240b ./gcc/testsuite/g++.old-deja/g++.other/overload1.C 2127838940b ./gcc/testsuite/g++.old-deja/g++.other/overload10.C 3726065244b ./gcc/testsuite/g++.old-deja/g++.other/overload11.C 759039694b ./gcc/testsuite/g++.old-deja/g++.other/overload12.C 3493214783b ./gcc/testsuite/g++.old-deja/g++.other/overload13.C 2296515759b ./gcc/testsuite/g++.old-deja/g++.other/overload14.C 1905644607b ./gcc/testsuite/g++.old-deja/g++.other/overload2.C 3260262987b ./gcc/testsuite/g++.old-deja/g++.other/overload3.C 2754535673b ./gcc/testsuite/g++.old-deja/g++.other/overload4.C --- 10477,10488 ---- 3940439065b ./gcc/testsuite/g++.old-deja/g++.other/optimize4.C 3254521143b ./gcc/testsuite/g++.old-deja/g++.other/overcnv1.C 96458692b ./gcc/testsuite/g++.old-deja/g++.other/overcnv2.C 2127838940b ./gcc/testsuite/g++.old-deja/g++.other/overload10.C 3726065244b ./gcc/testsuite/g++.old-deja/g++.other/overload11.C 759039694b ./gcc/testsuite/g++.old-deja/g++.other/overload12.C 3493214783b ./gcc/testsuite/g++.old-deja/g++.other/overload13.C 2296515759b ./gcc/testsuite/g++.old-deja/g++.other/overload14.C + 2161968240b ./gcc/testsuite/g++.old-deja/g++.other/overload1.C 1905644607b ./gcc/testsuite/g++.old-deja/g++.other/overload2.C 3260262987b ./gcc/testsuite/g++.old-deja/g++.other/overload3.C 2754535673b ./gcc/testsuite/g++.old-deja/g++.other/overload4.C *************** *** 7630,7637 **** 2326771429b ./gcc/testsuite/g++.old-deja/g++.other/pmf7.C 1021148727b ./gcc/testsuite/g++.old-deja/g++.other/pod1.C 3266716729b ./gcc/testsuite/g++.old-deja/g++.other/printf1.C - 2987181013b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C 1700199637b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem10.C 1412545442b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem2.C 104810161b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem3.C 516033591b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C --- 10505,10512 ---- 2326771429b ./gcc/testsuite/g++.old-deja/g++.other/pmf7.C 1021148727b ./gcc/testsuite/g++.old-deja/g++.other/pod1.C 3266716729b ./gcc/testsuite/g++.old-deja/g++.other/printf1.C 1700199637b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem10.C + 2987181013b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C 1412545442b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem2.C 104810161b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem3.C 516033591b ./gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C *************** *** 7669,7681 **** 3144403535b ./gcc/testsuite/g++.old-deja/g++.other/sibcall1.C 1879839494b ./gcc/testsuite/g++.old-deja/g++.other/sibcall2.C 2236161814b ./gcc/testsuite/g++.old-deja/g++.other/signed.C ! 3978933585b ./gcc/testsuite/g++.old-deja/g++.other/singleton.C 2035612399b ./gcc/testsuite/g++.old-deja/g++.other/sizeof1.C 3022356006b ./gcc/testsuite/g++.old-deja/g++.other/sizeof2.C 791384214b ./gcc/testsuite/g++.old-deja/g++.other/sizeof3.C 3011566538b ./gcc/testsuite/g++.old-deja/g++.other/sizeof4.C 2613402158b ./gcc/testsuite/g++.old-deja/g++.other/sizeof5.C - 730081105b ./gcc/testsuite/g++.old-deja/g++.other/static1.C 3522079581b ./gcc/testsuite/g++.old-deja/g++.other/static10.C 2480249422b ./gcc/testsuite/g++.old-deja/g++.other/static11.C 1625548421b ./gcc/testsuite/g++.old-deja/g++.other/static12.C --- 10544,10555 ---- 3144403535b ./gcc/testsuite/g++.old-deja/g++.other/sibcall1.C 1879839494b ./gcc/testsuite/g++.old-deja/g++.other/sibcall2.C 2236161814b ./gcc/testsuite/g++.old-deja/g++.other/signed.C ! 59948427b ./gcc/testsuite/g++.old-deja/g++.other/singleton.C 2035612399b ./gcc/testsuite/g++.old-deja/g++.other/sizeof1.C 3022356006b ./gcc/testsuite/g++.old-deja/g++.other/sizeof2.C 791384214b ./gcc/testsuite/g++.old-deja/g++.other/sizeof3.C 3011566538b ./gcc/testsuite/g++.old-deja/g++.other/sizeof4.C 2613402158b ./gcc/testsuite/g++.old-deja/g++.other/sizeof5.C 3522079581b ./gcc/testsuite/g++.old-deja/g++.other/static10.C 2480249422b ./gcc/testsuite/g++.old-deja/g++.other/static11.C 1625548421b ./gcc/testsuite/g++.old-deja/g++.other/static12.C *************** *** 7683,7690 **** 938771596b ./gcc/testsuite/g++.old-deja/g++.other/static14.C 2968457282b ./gcc/testsuite/g++.old-deja/g++.other/static15.C 254220227b ./gcc/testsuite/g++.old-deja/g++.other/static16.C ! 1208581965b ./gcc/testsuite/g++.old-deja/g++.other/static2.C 400806999b ./gcc/testsuite/g++.old-deja/g++.other/static20.C 1822341199b ./gcc/testsuite/g++.old-deja/g++.other/static3.C 3669301779b ./gcc/testsuite/g++.old-deja/g++.other/static4.C 4026472462b ./gcc/testsuite/g++.old-deja/g++.other/static5.C --- 10557,10565 ---- 938771596b ./gcc/testsuite/g++.old-deja/g++.other/static14.C 2968457282b ./gcc/testsuite/g++.old-deja/g++.other/static15.C 254220227b ./gcc/testsuite/g++.old-deja/g++.other/static16.C ! 730081105b ./gcc/testsuite/g++.old-deja/g++.other/static1.C 400806999b ./gcc/testsuite/g++.old-deja/g++.other/static20.C + 1208581965b ./gcc/testsuite/g++.old-deja/g++.other/static2.C 1822341199b ./gcc/testsuite/g++.old-deja/g++.other/static3.C 3669301779b ./gcc/testsuite/g++.old-deja/g++.other/static4.C 4026472462b ./gcc/testsuite/g++.old-deja/g++.other/static5.C *************** *** 7743,7751 **** 1361331299b ./gcc/testsuite/g++.old-deja/g++.other/vbase3.C 2014677415b ./gcc/testsuite/g++.old-deja/g++.other/vbase4.C 891656248b ./gcc/testsuite/g++.old-deja/g++.other/vbase5.C - 1164439917b ./gcc/testsuite/g++.old-deja/g++.other/virtual1.C 1779651648b ./gcc/testsuite/g++.old-deja/g++.other/virtual10.C 3755735707b ./gcc/testsuite/g++.old-deja/g++.other/virtual11.C 1816448166b ./gcc/testsuite/g++.old-deja/g++.other/virtual2.C 3809279113b ./gcc/testsuite/g++.old-deja/g++.other/virtual3.C 2374162758b ./gcc/testsuite/g++.old-deja/g++.other/virtual4.C --- 10618,10626 ---- 1361331299b ./gcc/testsuite/g++.old-deja/g++.other/vbase3.C 2014677415b ./gcc/testsuite/g++.old-deja/g++.other/vbase4.C 891656248b ./gcc/testsuite/g++.old-deja/g++.other/vbase5.C 1779651648b ./gcc/testsuite/g++.old-deja/g++.other/virtual10.C 3755735707b ./gcc/testsuite/g++.old-deja/g++.other/virtual11.C + 1164439917b ./gcc/testsuite/g++.old-deja/g++.other/virtual1.C 1816448166b ./gcc/testsuite/g++.old-deja/g++.other/virtual2.C 3809279113b ./gcc/testsuite/g++.old-deja/g++.other/virtual3.C 2374162758b ./gcc/testsuite/g++.old-deja/g++.other/virtual4.C *************** *** 7771,7784 **** 2973690302b ./gcc/testsuite/g++.old-deja/g++.pt/array5.C 3458314759b ./gcc/testsuite/g++.old-deja/g++.pt/array6.C 4134234496b ./gcc/testsuite/g++.old-deja/g++.pt/array7.C ! 2426888442b ./gcc/testsuite/g++.old-deja/g++.pt/asm1.C 811778129b ./gcc/testsuite/g++.old-deja/g++.pt/asm2.C 1767746723b ./gcc/testsuite/g++.old-deja/g++.pt/assign1.C 1101270203b ./gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C 981522879b ./gcc/testsuite/g++.old-deja/g++.pt/bad-type.C 1894536795b ./gcc/testsuite/g++.old-deja/g++.pt/builtin.C 388121289b ./gcc/testsuite/g++.old-deja/g++.pt/call1.C ! 4181983549b ./gcc/testsuite/g++.old-deja/g++.pt/call2.C 308746068b ./gcc/testsuite/g++.old-deja/g++.pt/cast1.C 2859433933b ./gcc/testsuite/g++.old-deja/g++.pt/cast2.C 3941530280b ./gcc/testsuite/g++.old-deja/g++.pt/codegen1.C --- 10646,10659 ---- 2973690302b ./gcc/testsuite/g++.old-deja/g++.pt/array5.C 3458314759b ./gcc/testsuite/g++.old-deja/g++.pt/array6.C 4134234496b ./gcc/testsuite/g++.old-deja/g++.pt/array7.C ! 682149440b ./gcc/testsuite/g++.old-deja/g++.pt/asm1.C 811778129b ./gcc/testsuite/g++.old-deja/g++.pt/asm2.C 1767746723b ./gcc/testsuite/g++.old-deja/g++.pt/assign1.C 1101270203b ./gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C 981522879b ./gcc/testsuite/g++.old-deja/g++.pt/bad-type.C 1894536795b ./gcc/testsuite/g++.old-deja/g++.pt/builtin.C 388121289b ./gcc/testsuite/g++.old-deja/g++.pt/call1.C ! 3065626929b ./gcc/testsuite/g++.old-deja/g++.pt/call2.C 308746068b ./gcc/testsuite/g++.old-deja/g++.pt/cast1.C 2859433933b ./gcc/testsuite/g++.old-deja/g++.pt/cast2.C 3941530280b ./gcc/testsuite/g++.old-deja/g++.pt/codegen1.C *************** *** 7790,7797 **** 177622420b ./gcc/testsuite/g++.old-deja/g++.pt/conv2.C 2497086818b ./gcc/testsuite/g++.old-deja/g++.pt/conv3.C 971692590b ./gcc/testsuite/g++.old-deja/g++.pt/copy1.C ! 552860807b ./gcc/testsuite/g++.old-deja/g++.pt/crash1.C ! 3867481536b ./gcc/testsuite/g++.old-deja/g++.pt/crash10.C 4238033897b ./gcc/testsuite/g++.old-deja/g++.pt/crash11.C 1342559330b ./gcc/testsuite/g++.old-deja/g++.pt/crash12.C 2103079352b ./gcc/testsuite/g++.old-deja/g++.pt/crash13.C --- 10665,10671 ---- 177622420b ./gcc/testsuite/g++.old-deja/g++.pt/conv2.C 2497086818b ./gcc/testsuite/g++.old-deja/g++.pt/conv3.C 971692590b ./gcc/testsuite/g++.old-deja/g++.pt/copy1.C ! 3035040424b ./gcc/testsuite/g++.old-deja/g++.pt/crash10.C 4238033897b ./gcc/testsuite/g++.old-deja/g++.pt/crash11.C 1342559330b ./gcc/testsuite/g++.old-deja/g++.pt/crash12.C 2103079352b ./gcc/testsuite/g++.old-deja/g++.pt/crash13.C *************** *** 7801,7808 **** 3806215227b ./gcc/testsuite/g++.old-deja/g++.pt/crash17.C 2468320011b ./gcc/testsuite/g++.old-deja/g++.pt/crash18.C 2448971391b ./gcc/testsuite/g++.old-deja/g++.pt/crash19.C ! 2796245436b ./gcc/testsuite/g++.old-deja/g++.pt/crash2.C ! 3999403848b ./gcc/testsuite/g++.old-deja/g++.pt/crash20.C 2626609357b ./gcc/testsuite/g++.old-deja/g++.pt/crash21.C 2675166712b ./gcc/testsuite/g++.old-deja/g++.pt/crash22.C 1909438119b ./gcc/testsuite/g++.old-deja/g++.pt/crash23.C --- 10675,10682 ---- 3806215227b ./gcc/testsuite/g++.old-deja/g++.pt/crash17.C 2468320011b ./gcc/testsuite/g++.old-deja/g++.pt/crash18.C 2448971391b ./gcc/testsuite/g++.old-deja/g++.pt/crash19.C ! 552860807b ./gcc/testsuite/g++.old-deja/g++.pt/crash1.C ! 2920226417b ./gcc/testsuite/g++.old-deja/g++.pt/crash20.C 2626609357b ./gcc/testsuite/g++.old-deja/g++.pt/crash21.C 2675166712b ./gcc/testsuite/g++.old-deja/g++.pt/crash22.C 1909438119b ./gcc/testsuite/g++.old-deja/g++.pt/crash23.C *************** *** 7812,7829 **** 3949680625b ./gcc/testsuite/g++.old-deja/g++.pt/crash27.C 1024790123b ./gcc/testsuite/g++.old-deja/g++.pt/crash28.C 467456086b ./gcc/testsuite/g++.old-deja/g++.pt/crash29.C ! 2974624163b ./gcc/testsuite/g++.old-deja/g++.pt/crash3.C ! 2162500140b ./gcc/testsuite/g++.old-deja/g++.pt/crash30.C 802398069b ./gcc/testsuite/g++.old-deja/g++.pt/crash31.C ! 3747058208b ./gcc/testsuite/g++.old-deja/g++.pt/crash32.C 3806692544b ./gcc/testsuite/g++.old-deja/g++.pt/crash33.C 3104137488b ./gcc/testsuite/g++.old-deja/g++.pt/crash34.C 3290437470b ./gcc/testsuite/g++.old-deja/g++.pt/crash35.C ! 1106982300b ./gcc/testsuite/g++.old-deja/g++.pt/crash36.C 3084210338b ./gcc/testsuite/g++.old-deja/g++.pt/crash37.C 54189209b ./gcc/testsuite/g++.old-deja/g++.pt/crash38.C 322608397b ./gcc/testsuite/g++.old-deja/g++.pt/crash39.C ! 2620241700b ./gcc/testsuite/g++.old-deja/g++.pt/crash4.C 3347789237b ./gcc/testsuite/g++.old-deja/g++.pt/crash40.C 447454995b ./gcc/testsuite/g++.old-deja/g++.pt/crash41.C 4041430549b ./gcc/testsuite/g++.old-deja/g++.pt/crash42.C --- 10686,10703 ---- 3949680625b ./gcc/testsuite/g++.old-deja/g++.pt/crash27.C 1024790123b ./gcc/testsuite/g++.old-deja/g++.pt/crash28.C 467456086b ./gcc/testsuite/g++.old-deja/g++.pt/crash29.C ! 2796245436b ./gcc/testsuite/g++.old-deja/g++.pt/crash2.C ! 2824092513b ./gcc/testsuite/g++.old-deja/g++.pt/crash30.C 802398069b ./gcc/testsuite/g++.old-deja/g++.pt/crash31.C ! 3246968168b ./gcc/testsuite/g++.old-deja/g++.pt/crash32.C 3806692544b ./gcc/testsuite/g++.old-deja/g++.pt/crash33.C 3104137488b ./gcc/testsuite/g++.old-deja/g++.pt/crash34.C 3290437470b ./gcc/testsuite/g++.old-deja/g++.pt/crash35.C ! 262056931b ./gcc/testsuite/g++.old-deja/g++.pt/crash36.C 3084210338b ./gcc/testsuite/g++.old-deja/g++.pt/crash37.C 54189209b ./gcc/testsuite/g++.old-deja/g++.pt/crash38.C 322608397b ./gcc/testsuite/g++.old-deja/g++.pt/crash39.C ! 2974624163b ./gcc/testsuite/g++.old-deja/g++.pt/crash3.C 3347789237b ./gcc/testsuite/g++.old-deja/g++.pt/crash40.C 447454995b ./gcc/testsuite/g++.old-deja/g++.pt/crash41.C 4041430549b ./gcc/testsuite/g++.old-deja/g++.pt/crash42.C *************** *** 7834,7840 **** 3755777163b ./gcc/testsuite/g++.old-deja/g++.pt/crash47.C 3545711527b ./gcc/testsuite/g++.old-deja/g++.pt/crash48.C 248168869b ./gcc/testsuite/g++.old-deja/g++.pt/crash49.C ! 2444045960b ./gcc/testsuite/g++.old-deja/g++.pt/crash5.C 803889593b ./gcc/testsuite/g++.old-deja/g++.pt/crash50.C 3389049910b ./gcc/testsuite/g++.old-deja/g++.pt/crash51.C 4194603956b ./gcc/testsuite/g++.old-deja/g++.pt/crash52.C --- 10708,10714 ---- 3755777163b ./gcc/testsuite/g++.old-deja/g++.pt/crash47.C 3545711527b ./gcc/testsuite/g++.old-deja/g++.pt/crash48.C 248168869b ./gcc/testsuite/g++.old-deja/g++.pt/crash49.C ! 2620241700b ./gcc/testsuite/g++.old-deja/g++.pt/crash4.C 803889593b ./gcc/testsuite/g++.old-deja/g++.pt/crash50.C 3389049910b ./gcc/testsuite/g++.old-deja/g++.pt/crash51.C 4194603956b ./gcc/testsuite/g++.old-deja/g++.pt/crash52.C *************** *** 7845,7851 **** 2303343499b ./gcc/testsuite/g++.old-deja/g++.pt/crash57.C 4236801680b ./gcc/testsuite/g++.old-deja/g++.pt/crash58.C 2789225927b ./gcc/testsuite/g++.old-deja/g++.pt/crash59.C ! 2304216659b ./gcc/testsuite/g++.old-deja/g++.pt/crash6.C 1374908702b ./gcc/testsuite/g++.old-deja/g++.pt/crash60.C 3795952345b ./gcc/testsuite/g++.old-deja/g++.pt/crash61.C 1665773703b ./gcc/testsuite/g++.old-deja/g++.pt/crash62.C --- 10719,10725 ---- 2303343499b ./gcc/testsuite/g++.old-deja/g++.pt/crash57.C 4236801680b ./gcc/testsuite/g++.old-deja/g++.pt/crash58.C 2789225927b ./gcc/testsuite/g++.old-deja/g++.pt/crash59.C ! 2444045960b ./gcc/testsuite/g++.old-deja/g++.pt/crash5.C 1374908702b ./gcc/testsuite/g++.old-deja/g++.pt/crash60.C 3795952345b ./gcc/testsuite/g++.old-deja/g++.pt/crash61.C 1665773703b ./gcc/testsuite/g++.old-deja/g++.pt/crash62.C *************** *** 7853,7860 **** 3150696822b ./gcc/testsuite/g++.old-deja/g++.pt/crash64.C 3278220743b ./gcc/testsuite/g++.old-deja/g++.pt/crash65.C 2950875437b ./gcc/testsuite/g++.old-deja/g++.pt/crash66.C ! 1588727602b ./gcc/testsuite/g++.old-deja/g++.pt/crash67.C 2591611103b ./gcc/testsuite/g++.old-deja/g++.pt/crash68.C 3887562144b ./gcc/testsuite/g++.old-deja/g++.pt/crash7.C 423406852b ./gcc/testsuite/g++.old-deja/g++.pt/crash8.C 2256920146b ./gcc/testsuite/g++.old-deja/g++.pt/crash9.C --- 10727,10735 ---- 3150696822b ./gcc/testsuite/g++.old-deja/g++.pt/crash64.C 3278220743b ./gcc/testsuite/g++.old-deja/g++.pt/crash65.C 2950875437b ./gcc/testsuite/g++.old-deja/g++.pt/crash66.C ! 1445781996b ./gcc/testsuite/g++.old-deja/g++.pt/crash67.C 2591611103b ./gcc/testsuite/g++.old-deja/g++.pt/crash68.C + 1541566419b ./gcc/testsuite/g++.old-deja/g++.pt/crash6.C 3887562144b ./gcc/testsuite/g++.old-deja/g++.pt/crash7.C 423406852b ./gcc/testsuite/g++.old-deja/g++.pt/crash8.C 2256920146b ./gcc/testsuite/g++.old-deja/g++.pt/crash9.C *************** *** 7869,7882 **** 536984424b ./gcc/testsuite/g++.old-deja/g++.pt/deduct2.C 1102733199b ./gcc/testsuite/g++.old-deja/g++.pt/deduct3.C 1268727238b ./gcc/testsuite/g++.old-deja/g++.pt/deduct4.C ! 2614275894b ./gcc/testsuite/g++.old-deja/g++.pt/deduct5.C 606334760b ./gcc/testsuite/g++.old-deja/g++.pt/deduct6.C 340374206b ./gcc/testsuite/g++.old-deja/g++.pt/deduct7.C - 2858847781b ./gcc/testsuite/g++.old-deja/g++.pt/defarg.C 940625563b ./gcc/testsuite/g++.old-deja/g++.pt/defarg10.C 3439579652b ./gcc/testsuite/g++.old-deja/g++.pt/defarg11.C 3231347060b ./gcc/testsuite/g++.old-deja/g++.pt/defarg12.C ! 3348379576b ./gcc/testsuite/g++.old-deja/g++.pt/defarg13.C 1334739447b ./gcc/testsuite/g++.old-deja/g++.pt/defarg14.C 975389866b ./gcc/testsuite/g++.old-deja/g++.pt/defarg2.C 1340096939b ./gcc/testsuite/g++.old-deja/g++.pt/defarg3.C --- 10744,10756 ---- 536984424b ./gcc/testsuite/g++.old-deja/g++.pt/deduct2.C 1102733199b ./gcc/testsuite/g++.old-deja/g++.pt/deduct3.C 1268727238b ./gcc/testsuite/g++.old-deja/g++.pt/deduct4.C ! 3984395519b ./gcc/testsuite/g++.old-deja/g++.pt/deduct5.C 606334760b ./gcc/testsuite/g++.old-deja/g++.pt/deduct6.C 340374206b ./gcc/testsuite/g++.old-deja/g++.pt/deduct7.C 940625563b ./gcc/testsuite/g++.old-deja/g++.pt/defarg10.C 3439579652b ./gcc/testsuite/g++.old-deja/g++.pt/defarg11.C 3231347060b ./gcc/testsuite/g++.old-deja/g++.pt/defarg12.C ! 2524589634b ./gcc/testsuite/g++.old-deja/g++.pt/defarg13.C 1334739447b ./gcc/testsuite/g++.old-deja/g++.pt/defarg14.C 975389866b ./gcc/testsuite/g++.old-deja/g++.pt/defarg2.C 1340096939b ./gcc/testsuite/g++.old-deja/g++.pt/defarg3.C *************** *** 7886,7900 **** 3989235169b ./gcc/testsuite/g++.old-deja/g++.pt/defarg7.C 1989729882b ./gcc/testsuite/g++.old-deja/g++.pt/defarg8.C 3350438012b ./gcc/testsuite/g++.old-deja/g++.pt/defarg9.C 1222848640b ./gcc/testsuite/g++.old-deja/g++.pt/derived1.C 4047438471b ./gcc/testsuite/g++.old-deja/g++.pt/derived2.C ! 1684757501b ./gcc/testsuite/g++.old-deja/g++.pt/derived3.C 3987198593b ./gcc/testsuite/g++.old-deja/g++.pt/dynarray.C 2287973117b ./gcc/testsuite/g++.old-deja/g++.pt/ehspec1.C - 104775079b ./gcc/testsuite/g++.old-deja/g++.pt/eichin01.C 2070134968b ./gcc/testsuite/g++.old-deja/g++.pt/eichin01a.C 3522936035b ./gcc/testsuite/g++.old-deja/g++.pt/eichin01b.C ! 1760960609b ./gcc/testsuite/g++.old-deja/g++.pt/enum.C 3830592816b ./gcc/testsuite/g++.old-deja/g++.pt/enum10.C 3760628339b ./gcc/testsuite/g++.old-deja/g++.pt/enum11.C 822927832b ./gcc/testsuite/g++.old-deja/g++.pt/enum12.C --- 10760,10774 ---- 3989235169b ./gcc/testsuite/g++.old-deja/g++.pt/defarg7.C 1989729882b ./gcc/testsuite/g++.old-deja/g++.pt/defarg8.C 3350438012b ./gcc/testsuite/g++.old-deja/g++.pt/defarg9.C + 2858847781b ./gcc/testsuite/g++.old-deja/g++.pt/defarg.C 1222848640b ./gcc/testsuite/g++.old-deja/g++.pt/derived1.C 4047438471b ./gcc/testsuite/g++.old-deja/g++.pt/derived2.C ! 1251762810b ./gcc/testsuite/g++.old-deja/g++.pt/derived3.C 3987198593b ./gcc/testsuite/g++.old-deja/g++.pt/dynarray.C 2287973117b ./gcc/testsuite/g++.old-deja/g++.pt/ehspec1.C 2070134968b ./gcc/testsuite/g++.old-deja/g++.pt/eichin01a.C 3522936035b ./gcc/testsuite/g++.old-deja/g++.pt/eichin01b.C ! 104775079b ./gcc/testsuite/g++.old-deja/g++.pt/eichin01.C 3830592816b ./gcc/testsuite/g++.old-deja/g++.pt/enum10.C 3760628339b ./gcc/testsuite/g++.old-deja/g++.pt/enum11.C 822927832b ./gcc/testsuite/g++.old-deja/g++.pt/enum12.C *************** *** 7908,7918 **** 1918437107b ./gcc/testsuite/g++.old-deja/g++.pt/enum7.C 1945876041b ./gcc/testsuite/g++.old-deja/g++.pt/enum8.C 3328823063b ./gcc/testsuite/g++.old-deja/g++.pt/enum9.C ! 861304912b ./gcc/testsuite/g++.old-deja/g++.pt/error1.C 2760448470b ./gcc/testsuite/g++.old-deja/g++.pt/error2.C 1691206603b ./gcc/testsuite/g++.old-deja/g++.pt/error3.C 273875566b ./gcc/testsuite/g++.old-deja/g++.pt/explarg1.C - 2454708693b ./gcc/testsuite/g++.old-deja/g++.pt/explicit1.C 3406944984b ./gcc/testsuite/g++.old-deja/g++.pt/explicit10.C 1528071887b ./gcc/testsuite/g++.old-deja/g++.pt/explicit11.C 3195577006b ./gcc/testsuite/g++.old-deja/g++.pt/explicit12.C --- 10782,10792 ---- 1918437107b ./gcc/testsuite/g++.old-deja/g++.pt/enum7.C 1945876041b ./gcc/testsuite/g++.old-deja/g++.pt/enum8.C 3328823063b ./gcc/testsuite/g++.old-deja/g++.pt/enum9.C ! 1760960609b ./gcc/testsuite/g++.old-deja/g++.pt/enum.C ! 1804107123b ./gcc/testsuite/g++.old-deja/g++.pt/error1.C 2760448470b ./gcc/testsuite/g++.old-deja/g++.pt/error2.C 1691206603b ./gcc/testsuite/g++.old-deja/g++.pt/error3.C 273875566b ./gcc/testsuite/g++.old-deja/g++.pt/explarg1.C 3406944984b ./gcc/testsuite/g++.old-deja/g++.pt/explicit10.C 1528071887b ./gcc/testsuite/g++.old-deja/g++.pt/explicit11.C 3195577006b ./gcc/testsuite/g++.old-deja/g++.pt/explicit12.C *************** *** 7923,7929 **** 3929356898b ./gcc/testsuite/g++.old-deja/g++.pt/explicit17.C 2998496732b ./gcc/testsuite/g++.old-deja/g++.pt/explicit18.C 114780192b ./gcc/testsuite/g++.old-deja/g++.pt/explicit19.C ! 3142420592b ./gcc/testsuite/g++.old-deja/g++.pt/explicit2.C 238030727b ./gcc/testsuite/g++.old-deja/g++.pt/explicit20.C 2757073081b ./gcc/testsuite/g++.old-deja/g++.pt/explicit21.C 1964200215b ./gcc/testsuite/g++.old-deja/g++.pt/explicit22.C --- 10797,10803 ---- 3929356898b ./gcc/testsuite/g++.old-deja/g++.pt/explicit17.C 2998496732b ./gcc/testsuite/g++.old-deja/g++.pt/explicit18.C 114780192b ./gcc/testsuite/g++.old-deja/g++.pt/explicit19.C ! 2454708693b ./gcc/testsuite/g++.old-deja/g++.pt/explicit1.C 238030727b ./gcc/testsuite/g++.old-deja/g++.pt/explicit20.C 2757073081b ./gcc/testsuite/g++.old-deja/g++.pt/explicit21.C 1964200215b ./gcc/testsuite/g++.old-deja/g++.pt/explicit22.C *************** *** 7934,7940 **** 460921353b ./gcc/testsuite/g++.old-deja/g++.pt/explicit27.C 854667679b ./gcc/testsuite/g++.old-deja/g++.pt/explicit28.C 4066092212b ./gcc/testsuite/g++.old-deja/g++.pt/explicit29.C ! 4211740392b ./gcc/testsuite/g++.old-deja/g++.pt/explicit3.C 470577039b ./gcc/testsuite/g++.old-deja/g++.pt/explicit30.C 1628118551b ./gcc/testsuite/g++.old-deja/g++.pt/explicit31.C 2552821833b ./gcc/testsuite/g++.old-deja/g++.pt/explicit32.C --- 10808,10814 ---- 460921353b ./gcc/testsuite/g++.old-deja/g++.pt/explicit27.C 854667679b ./gcc/testsuite/g++.old-deja/g++.pt/explicit28.C 4066092212b ./gcc/testsuite/g++.old-deja/g++.pt/explicit29.C ! 3142420592b ./gcc/testsuite/g++.old-deja/g++.pt/explicit2.C 470577039b ./gcc/testsuite/g++.old-deja/g++.pt/explicit30.C 1628118551b ./gcc/testsuite/g++.old-deja/g++.pt/explicit31.C 2552821833b ./gcc/testsuite/g++.old-deja/g++.pt/explicit32.C *************** *** 7945,7956 **** 4009959133b ./gcc/testsuite/g++.old-deja/g++.pt/explicit37.C 3750063865b ./gcc/testsuite/g++.old-deja/g++.pt/explicit38.C 921580635b ./gcc/testsuite/g++.old-deja/g++.pt/explicit39.C ! 4095060524b ./gcc/testsuite/g++.old-deja/g++.pt/explicit4.C 492617767b ./gcc/testsuite/g++.old-deja/g++.pt/explicit40.C 3845938453b ./gcc/testsuite/g++.old-deja/g++.pt/explicit41.C 1186034051b ./gcc/testsuite/g++.old-deja/g++.pt/explicit42.C 3636286206b ./gcc/testsuite/g++.old-deja/g++.pt/explicit43.C ! 2944430939b ./gcc/testsuite/g++.old-deja/g++.pt/explicit5.C 598873974b ./gcc/testsuite/g++.old-deja/g++.pt/explicit50.C 442258121b ./gcc/testsuite/g++.old-deja/g++.pt/explicit51.C 2381854829b ./gcc/testsuite/g++.old-deja/g++.pt/explicit52.C --- 10819,10830 ---- 4009959133b ./gcc/testsuite/g++.old-deja/g++.pt/explicit37.C 3750063865b ./gcc/testsuite/g++.old-deja/g++.pt/explicit38.C 921580635b ./gcc/testsuite/g++.old-deja/g++.pt/explicit39.C ! 4211740392b ./gcc/testsuite/g++.old-deja/g++.pt/explicit3.C 492617767b ./gcc/testsuite/g++.old-deja/g++.pt/explicit40.C 3845938453b ./gcc/testsuite/g++.old-deja/g++.pt/explicit41.C 1186034051b ./gcc/testsuite/g++.old-deja/g++.pt/explicit42.C 3636286206b ./gcc/testsuite/g++.old-deja/g++.pt/explicit43.C ! 4095060524b ./gcc/testsuite/g++.old-deja/g++.pt/explicit4.C 598873974b ./gcc/testsuite/g++.old-deja/g++.pt/explicit50.C 442258121b ./gcc/testsuite/g++.old-deja/g++.pt/explicit51.C 2381854829b ./gcc/testsuite/g++.old-deja/g++.pt/explicit52.C *************** *** 7961,7967 **** 2105743169b ./gcc/testsuite/g++.old-deja/g++.pt/explicit57.C 138392149b ./gcc/testsuite/g++.old-deja/g++.pt/explicit58.C 3072912940b ./gcc/testsuite/g++.old-deja/g++.pt/explicit59.C ! 1140210865b ./gcc/testsuite/g++.old-deja/g++.pt/explicit6.C 1115714633b ./gcc/testsuite/g++.old-deja/g++.pt/explicit60.C 3490613258b ./gcc/testsuite/g++.old-deja/g++.pt/explicit61.C 2630908446b ./gcc/testsuite/g++.old-deja/g++.pt/explicit62.C --- 10835,10841 ---- 2105743169b ./gcc/testsuite/g++.old-deja/g++.pt/explicit57.C 138392149b ./gcc/testsuite/g++.old-deja/g++.pt/explicit58.C 3072912940b ./gcc/testsuite/g++.old-deja/g++.pt/explicit59.C ! 2944430939b ./gcc/testsuite/g++.old-deja/g++.pt/explicit5.C 1115714633b ./gcc/testsuite/g++.old-deja/g++.pt/explicit60.C 3490613258b ./gcc/testsuite/g++.old-deja/g++.pt/explicit61.C 2630908446b ./gcc/testsuite/g++.old-deja/g++.pt/explicit62.C *************** *** 7972,7977 **** --- 10846,10852 ---- 2017968194b ./gcc/testsuite/g++.old-deja/g++.pt/explicit67.C 2468743553b ./gcc/testsuite/g++.old-deja/g++.pt/explicit68.C 232590105b ./gcc/testsuite/g++.old-deja/g++.pt/explicit69.C + 1140210865b ./gcc/testsuite/g++.old-deja/g++.pt/explicit6.C 598155740b ./gcc/testsuite/g++.old-deja/g++.pt/explicit70.C 734055097b ./gcc/testsuite/g++.old-deja/g++.pt/explicit71.C 3681260211b ./gcc/testsuite/g++.old-deja/g++.pt/explicit72.C *************** *** 7982,7992 **** 2721209b ./gcc/testsuite/g++.old-deja/g++.pt/explicit77.C 2546202913b ./gcc/testsuite/g++.old-deja/g++.pt/explicit78.C 2960594790b ./gcc/testsuite/g++.old-deja/g++.pt/explicit79.C - 1495453328b ./gcc/testsuite/g++.old-deja/g++.pt/explicit8.C 3985776178b ./gcc/testsuite/g++.old-deja/g++.pt/explicit80.C 1821121835b ./gcc/testsuite/g++.old-deja/g++.pt/explicit81.C 3301548077b ./gcc/testsuite/g++.old-deja/g++.pt/explicit82.C 1885670533b ./gcc/testsuite/g++.old-deja/g++.pt/explicit83.C 3419948260b ./gcc/testsuite/g++.old-deja/g++.pt/explicit9.C 662598850b ./gcc/testsuite/g++.old-deja/g++.pt/export1.C 1515995682b ./gcc/testsuite/g++.old-deja/g++.pt/expr1.C --- 10857,10867 ---- 2721209b ./gcc/testsuite/g++.old-deja/g++.pt/explicit77.C 2546202913b ./gcc/testsuite/g++.old-deja/g++.pt/explicit78.C 2960594790b ./gcc/testsuite/g++.old-deja/g++.pt/explicit79.C 3985776178b ./gcc/testsuite/g++.old-deja/g++.pt/explicit80.C 1821121835b ./gcc/testsuite/g++.old-deja/g++.pt/explicit81.C 3301548077b ./gcc/testsuite/g++.old-deja/g++.pt/explicit82.C 1885670533b ./gcc/testsuite/g++.old-deja/g++.pt/explicit83.C + 1495453328b ./gcc/testsuite/g++.old-deja/g++.pt/explicit8.C 3419948260b ./gcc/testsuite/g++.old-deja/g++.pt/explicit9.C 662598850b ./gcc/testsuite/g++.old-deja/g++.pt/export1.C 1515995682b ./gcc/testsuite/g++.old-deja/g++.pt/expr1.C *************** *** 7998,8004 **** 161410515b ./gcc/testsuite/g++.old-deja/g++.pt/expr8.C 1422905843b ./gcc/testsuite/g++.old-deja/g++.pt/extern1.C 1069100821b ./gcc/testsuite/g++.old-deja/g++.pt/fntry1.C - 4017972632b ./gcc/testsuite/g++.old-deja/g++.pt/friend1.C 1287620498b ./gcc/testsuite/g++.old-deja/g++.pt/friend10.C 1165640191b ./gcc/testsuite/g++.old-deja/g++.pt/friend11.C 3100262252b ./gcc/testsuite/g++.old-deja/g++.pt/friend12.C --- 10873,10878 ---- *************** *** 8008,8024 **** 869822534b ./gcc/testsuite/g++.old-deja/g++.pt/friend16.C 4066339061b ./gcc/testsuite/g++.old-deja/g++.pt/friend17.C 3286295955b ./gcc/testsuite/g++.old-deja/g++.pt/friend18.C 2120784153b ./gcc/testsuite/g++.old-deja/g++.pt/friend20.C ! 717575958b ./gcc/testsuite/g++.old-deja/g++.pt/friend21.C 416829101b ./gcc/testsuite/g++.old-deja/g++.pt/friend22.C ! 4030871100b ./gcc/testsuite/g++.old-deja/g++.pt/friend23.C 1465973595b ./gcc/testsuite/g++.old-deja/g++.pt/friend24.C 150282741b ./gcc/testsuite/g++.old-deja/g++.pt/friend25.C 680173221b ./gcc/testsuite/g++.old-deja/g++.pt/friend26.C 3274309194b ./gcc/testsuite/g++.old-deja/g++.pt/friend27.C 1284470831b ./gcc/testsuite/g++.old-deja/g++.pt/friend28.C 3161078590b ./gcc/testsuite/g++.old-deja/g++.pt/friend29.C - 2144037049b ./gcc/testsuite/g++.old-deja/g++.pt/friend3.C 3765298518b ./gcc/testsuite/g++.old-deja/g++.pt/friend30.C 2264286486b ./gcc/testsuite/g++.old-deja/g++.pt/friend31.C 2346260162b ./gcc/testsuite/g++.old-deja/g++.pt/friend32.C --- 10882,10898 ---- 869822534b ./gcc/testsuite/g++.old-deja/g++.pt/friend16.C 4066339061b ./gcc/testsuite/g++.old-deja/g++.pt/friend17.C 3286295955b ./gcc/testsuite/g++.old-deja/g++.pt/friend18.C + 4017972632b ./gcc/testsuite/g++.old-deja/g++.pt/friend1.C 2120784153b ./gcc/testsuite/g++.old-deja/g++.pt/friend20.C ! 2467760231b ./gcc/testsuite/g++.old-deja/g++.pt/friend21.C 416829101b ./gcc/testsuite/g++.old-deja/g++.pt/friend22.C ! 2094823068b ./gcc/testsuite/g++.old-deja/g++.pt/friend23.C 1465973595b ./gcc/testsuite/g++.old-deja/g++.pt/friend24.C 150282741b ./gcc/testsuite/g++.old-deja/g++.pt/friend25.C 680173221b ./gcc/testsuite/g++.old-deja/g++.pt/friend26.C 3274309194b ./gcc/testsuite/g++.old-deja/g++.pt/friend27.C 1284470831b ./gcc/testsuite/g++.old-deja/g++.pt/friend28.C 3161078590b ./gcc/testsuite/g++.old-deja/g++.pt/friend29.C 3765298518b ./gcc/testsuite/g++.old-deja/g++.pt/friend30.C 2264286486b ./gcc/testsuite/g++.old-deja/g++.pt/friend31.C 2346260162b ./gcc/testsuite/g++.old-deja/g++.pt/friend32.C *************** *** 8029,8035 **** 3754374175b ./gcc/testsuite/g++.old-deja/g++.pt/friend37.C 3281471741b ./gcc/testsuite/g++.old-deja/g++.pt/friend38.C 317013285b ./gcc/testsuite/g++.old-deja/g++.pt/friend39.C ! 1839433882b ./gcc/testsuite/g++.old-deja/g++.pt/friend4.C 182204021b ./gcc/testsuite/g++.old-deja/g++.pt/friend40.C 345702925b ./gcc/testsuite/g++.old-deja/g++.pt/friend41.C 2157387021b ./gcc/testsuite/g++.old-deja/g++.pt/friend42.C --- 10903,10909 ---- 3754374175b ./gcc/testsuite/g++.old-deja/g++.pt/friend37.C 3281471741b ./gcc/testsuite/g++.old-deja/g++.pt/friend38.C 317013285b ./gcc/testsuite/g++.old-deja/g++.pt/friend39.C ! 2144037049b ./gcc/testsuite/g++.old-deja/g++.pt/friend3.C 182204021b ./gcc/testsuite/g++.old-deja/g++.pt/friend40.C 345702925b ./gcc/testsuite/g++.old-deja/g++.pt/friend41.C 2157387021b ./gcc/testsuite/g++.old-deja/g++.pt/friend42.C *************** *** 8040,8071 **** 4284536748b ./gcc/testsuite/g++.old-deja/g++.pt/friend47.C 1943593208b ./gcc/testsuite/g++.old-deja/g++.pt/friend48.C 2460768791b ./gcc/testsuite/g++.old-deja/g++.pt/friend49.C 704986118b ./gcc/testsuite/g++.old-deja/g++.pt/friend5.C 1522663160b ./gcc/testsuite/g++.old-deja/g++.pt/friend6.C 1156856345b ./gcc/testsuite/g++.old-deja/g++.pt/friend7.C 20638590b ./gcc/testsuite/g++.old-deja/g++.pt/friend8.C 3274600020b ./gcc/testsuite/g++.old-deja/g++.pt/friend9.C - 3949127698b ./gcc/testsuite/g++.old-deja/g++.pt/goto.C 2373771284b ./gcc/testsuite/g++.old-deja/g++.pt/goto2.C 1470520127b ./gcc/testsuite/g++.old-deja/g++.pt/incomplete1.C ! 2675563938b ./gcc/testsuite/g++.old-deja/g++.pt/infinite1.C 2141463905b ./gcc/testsuite/g++.old-deja/g++.pt/inherit1.C 3554938548b ./gcc/testsuite/g++.old-deja/g++.pt/inherit2.C 393856408b ./gcc/testsuite/g++.old-deja/g++.pt/inject1.C 1666451974b ./gcc/testsuite/g++.old-deja/g++.pt/inject2.C 775587620b ./gcc/testsuite/g++.old-deja/g++.pt/inline1.C 4143100873b ./gcc/testsuite/g++.old-deja/g++.pt/inline2.C - 2167918209b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C 567219073b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C 658392970b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C ! 934055119b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C 3666215677b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate13.C 2568581654b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate2.C 3989382998b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate3.C 3598960158b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C - 1230172281b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate5-main.cc 1010945845b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate5.C 2967623396b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate5.cc 4042450939b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C 2137469555b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate7.C 2823240025b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate8.C --- 10914,10946 ---- 4284536748b ./gcc/testsuite/g++.old-deja/g++.pt/friend47.C 1943593208b ./gcc/testsuite/g++.old-deja/g++.pt/friend48.C 2460768791b ./gcc/testsuite/g++.old-deja/g++.pt/friend49.C + 1839433882b ./gcc/testsuite/g++.old-deja/g++.pt/friend4.C 704986118b ./gcc/testsuite/g++.old-deja/g++.pt/friend5.C 1522663160b ./gcc/testsuite/g++.old-deja/g++.pt/friend6.C 1156856345b ./gcc/testsuite/g++.old-deja/g++.pt/friend7.C 20638590b ./gcc/testsuite/g++.old-deja/g++.pt/friend8.C 3274600020b ./gcc/testsuite/g++.old-deja/g++.pt/friend9.C 2373771284b ./gcc/testsuite/g++.old-deja/g++.pt/goto2.C + 3949127698b ./gcc/testsuite/g++.old-deja/g++.pt/goto.C 1470520127b ./gcc/testsuite/g++.old-deja/g++.pt/incomplete1.C ! 1047213389b ./gcc/testsuite/g++.old-deja/g++.pt/infinite1.C 2141463905b ./gcc/testsuite/g++.old-deja/g++.pt/inherit1.C 3554938548b ./gcc/testsuite/g++.old-deja/g++.pt/inherit2.C 393856408b ./gcc/testsuite/g++.old-deja/g++.pt/inject1.C 1666451974b ./gcc/testsuite/g++.old-deja/g++.pt/inject2.C 775587620b ./gcc/testsuite/g++.old-deja/g++.pt/inline1.C 4143100873b ./gcc/testsuite/g++.old-deja/g++.pt/inline2.C 567219073b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C 658392970b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C ! 2528080326b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C 3666215677b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate13.C + 2167918209b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C 2568581654b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate2.C 3989382998b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate3.C 3598960158b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C 1010945845b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate5.C 2967623396b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate5.cc + 1230172281b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate5-main.cc 4042450939b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C 2137469555b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate7.C 2823240025b ./gcc/testsuite/g++.old-deja/g++.pt/instantiate8.C *************** *** 8080,8087 **** 2354833145b ./gcc/testsuite/g++.old-deja/g++.pt/local5.C 3330482290b ./gcc/testsuite/g++.old-deja/g++.pt/local6.C 3591262298b ./gcc/testsuite/g++.old-deja/g++.pt/local7.C - 2198910890b ./gcc/testsuite/g++.old-deja/g++.pt/lookup1.C 1618400382b ./gcc/testsuite/g++.old-deja/g++.pt/lookup10.C 2928431480b ./gcc/testsuite/g++.old-deja/g++.pt/lookup2.C 2326742548b ./gcc/testsuite/g++.old-deja/g++.pt/lookup3.C 58581562b ./gcc/testsuite/g++.old-deja/g++.pt/lookup4.C --- 10955,10962 ---- 2354833145b ./gcc/testsuite/g++.old-deja/g++.pt/local5.C 3330482290b ./gcc/testsuite/g++.old-deja/g++.pt/local6.C 3591262298b ./gcc/testsuite/g++.old-deja/g++.pt/local7.C 1618400382b ./gcc/testsuite/g++.old-deja/g++.pt/lookup10.C + 2198910890b ./gcc/testsuite/g++.old-deja/g++.pt/lookup1.C 2928431480b ./gcc/testsuite/g++.old-deja/g++.pt/lookup2.C 2326742548b ./gcc/testsuite/g++.old-deja/g++.pt/lookup3.C 58581562b ./gcc/testsuite/g++.old-deja/g++.pt/lookup4.C *************** *** 8098,8108 **** 2792466666b ./gcc/testsuite/g++.old-deja/g++.pt/m6.C 2010181237b ./gcc/testsuite/g++.old-deja/g++.pt/m7.C 181270594b ./gcc/testsuite/g++.old-deja/g++.pt/m8.C - 860513545b ./gcc/testsuite/g++.old-deja/g++.pt/m9.C 454140677b ./gcc/testsuite/g++.old-deja/g++.pt/m9a.C 4199939364b ./gcc/testsuite/g++.old-deja/g++.pt/mangle1.C 735244068b ./gcc/testsuite/g++.old-deja/g++.pt/mangle2.C - 2993433239b ./gcc/testsuite/g++.old-deja/g++.pt/memclass1.C 3280522955b ./gcc/testsuite/g++.old-deja/g++.pt/memclass10.C 3429032104b ./gcc/testsuite/g++.old-deja/g++.pt/memclass11.C 2793864882b ./gcc/testsuite/g++.old-deja/g++.pt/memclass12.C --- 10973,10982 ---- 2792466666b ./gcc/testsuite/g++.old-deja/g++.pt/m6.C 2010181237b ./gcc/testsuite/g++.old-deja/g++.pt/m7.C 181270594b ./gcc/testsuite/g++.old-deja/g++.pt/m8.C 454140677b ./gcc/testsuite/g++.old-deja/g++.pt/m9a.C + 860513545b ./gcc/testsuite/g++.old-deja/g++.pt/m9.C 4199939364b ./gcc/testsuite/g++.old-deja/g++.pt/mangle1.C 735244068b ./gcc/testsuite/g++.old-deja/g++.pt/mangle2.C 3280522955b ./gcc/testsuite/g++.old-deja/g++.pt/memclass10.C 3429032104b ./gcc/testsuite/g++.old-deja/g++.pt/memclass11.C 2793864882b ./gcc/testsuite/g++.old-deja/g++.pt/memclass12.C *************** *** 8113,8121 **** 1861858814b ./gcc/testsuite/g++.old-deja/g++.pt/memclass17.C 2612688561b ./gcc/testsuite/g++.old-deja/g++.pt/memclass18.C 2502022996b ./gcc/testsuite/g++.old-deja/g++.pt/memclass19.C ! 2537802637b ./gcc/testsuite/g++.old-deja/g++.pt/memclass2.C 93385345b ./gcc/testsuite/g++.old-deja/g++.pt/memclass20.C 3252022289b ./gcc/testsuite/g++.old-deja/g++.pt/memclass21.C 1014036937b ./gcc/testsuite/g++.old-deja/g++.pt/memclass3.C 1431379137b ./gcc/testsuite/g++.old-deja/g++.pt/memclass4.C 1075497415b ./gcc/testsuite/g++.old-deja/g++.pt/memclass5.C --- 10987,10996 ---- 1861858814b ./gcc/testsuite/g++.old-deja/g++.pt/memclass17.C 2612688561b ./gcc/testsuite/g++.old-deja/g++.pt/memclass18.C 2502022996b ./gcc/testsuite/g++.old-deja/g++.pt/memclass19.C ! 2993433239b ./gcc/testsuite/g++.old-deja/g++.pt/memclass1.C 93385345b ./gcc/testsuite/g++.old-deja/g++.pt/memclass20.C 3252022289b ./gcc/testsuite/g++.old-deja/g++.pt/memclass21.C + 2537802637b ./gcc/testsuite/g++.old-deja/g++.pt/memclass2.C 1014036937b ./gcc/testsuite/g++.old-deja/g++.pt/memclass3.C 1431379137b ./gcc/testsuite/g++.old-deja/g++.pt/memclass4.C 1075497415b ./gcc/testsuite/g++.old-deja/g++.pt/memclass5.C *************** *** 8123,8131 **** 2127284390b ./gcc/testsuite/g++.old-deja/g++.pt/memclass7.C 1195266757b ./gcc/testsuite/g++.old-deja/g++.pt/memclass8.C 1810826153b ./gcc/testsuite/g++.old-deja/g++.pt/memclass9.C - 1224975036b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp1.C - 2904180820b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp10.C 4058618179b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C 2282254491b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp11.C 1976328805b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp12.C 1239088058b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp13.C --- 10998,11005 ---- 2127284390b ./gcc/testsuite/g++.old-deja/g++.pt/memclass7.C 1195266757b ./gcc/testsuite/g++.old-deja/g++.pt/memclass8.C 1810826153b ./gcc/testsuite/g++.old-deja/g++.pt/memclass9.C 4058618179b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C + 2904180820b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp10.C 2282254491b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp11.C 1976328805b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp12.C 1239088058b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp13.C *************** *** 8135,8141 **** 1544280209b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp17.C 2050660023b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp18.C 2678511608b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C ! 1871764459b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp2.C 1334964388b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp20.C 459239676b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp23.C 2533288060b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp24.C --- 11009,11015 ---- 1544280209b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp17.C 2050660023b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp18.C 2678511608b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C ! 1224975036b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp1.C 1334964388b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp20.C 459239676b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp23.C 2533288060b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp24.C *************** *** 8144,8150 **** 2533288060b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp27.C 1005751857b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp28.C 199305334b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp29.C ! 1631129726b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp3.C 1670170059b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp30.C 2289485955b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp31.C 27098458b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp32.C --- 11018,11024 ---- 2533288060b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp27.C 1005751857b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp28.C 199305334b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp29.C ! 1871764459b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp2.C 1670170059b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp30.C 2289485955b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp31.C 27098458b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp32.C *************** *** 8154,8160 **** 2010910590b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp36.C 458681200b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp37.C 20442451b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp39.C ! 1762838619b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp4.C 3100522038b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp40.C 938647569b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp41.C 1217004521b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp42.C --- 11028,11034 ---- 2010910590b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp36.C 458681200b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp37.C 20442451b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp39.C ! 1631129726b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp3.C 3100522038b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp40.C 938647569b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp41.C 1217004521b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp42.C *************** *** 8165,8178 **** 87150136b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp47.C 2797911396b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp48.C 3001846639b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp49.C ! 1033026004b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp5.C 899239607b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp52.C 1512186785b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp53.C 734020637b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp55.C 1075898943b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp56.C 1044391503b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp58.C 2900869252b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp59.C ! 3026038856b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp6.C 1257470032b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C 761783865b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C 1690671324b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C --- 11039,11052 ---- 87150136b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp47.C 2797911396b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp48.C 3001846639b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp49.C ! 1762838619b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp4.C 899239607b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp52.C 1512186785b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp53.C 734020637b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp55.C 1075898943b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp56.C 1044391503b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp58.C 2900869252b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp59.C ! 1033026004b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp5.C 1257470032b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C 761783865b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C 1690671324b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C *************** *** 8183,8189 **** 1942260890b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C 3915762673b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp68.C 3344118567b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp69.C ! 1316217894b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp7.C 2509660495b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp70.C 104374337b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C 1613408023b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp72.C --- 11057,11063 ---- 1942260890b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C 3915762673b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp68.C 3344118567b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp69.C ! 3026038856b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp6.C 2509660495b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp70.C 104374337b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C 1613408023b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp72.C *************** *** 8194,8211 **** 1218672257b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C 3371462880b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C 4186537912b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp79.C ! 2098916421b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp8.C 4184361784b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp80.C 2741487455b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C 669240911b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp82.C 1536069827b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp83.C 2073825342b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp84.C ! 2859456911b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp85.C ! 159076361b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp86.C 782720859b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C 3073633390b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp88.C ! 3067920578b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C ! 1544636937b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp9.C 329208420b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp90.C 357390701b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp91.C 440251046b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp92.C --- 11068,11085 ---- 1218672257b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C 3371462880b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C 4186537912b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp79.C ! 1316217894b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp7.C 4184361784b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp80.C 2741487455b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C 669240911b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp82.C 1536069827b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp83.C 2073825342b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp84.C ! 3855204735b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp85.C ! 1223051592b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp86.C 782720859b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C 3073633390b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp88.C ! 4187592159b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C ! 2098916421b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp8.C 329208420b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp90.C 357390701b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp91.C 440251046b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp92.C *************** *** 8216,8227 **** 876225447b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp97.C 3251366836b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp98.C 588126708b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp99.C 4151922476b ./gcc/testsuite/g++.old-deja/g++.pt/mi1.C 3159596706b ./gcc/testsuite/g++.old-deja/g++.pt/nested1.C 752451121b ./gcc/testsuite/g++.old-deja/g++.pt/nested2.C - 206427704b ./gcc/testsuite/g++.old-deja/g++.pt/niklas01.C 3261242986b ./gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C 3338878252b ./gcc/testsuite/g++.old-deja/g++.pt/niklas01b.C 3121397720b ./gcc/testsuite/g++.old-deja/g++.pt/niklas02.C 18744569b ./gcc/testsuite/g++.old-deja/g++.pt/niklas03.C 4224711202b ./gcc/testsuite/g++.old-deja/g++.pt/nontype1.C --- 11090,11102 ---- 876225447b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp97.C 3251366836b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp98.C 588126708b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp99.C + 1544636937b ./gcc/testsuite/g++.old-deja/g++.pt/memtemp9.C 4151922476b ./gcc/testsuite/g++.old-deja/g++.pt/mi1.C 3159596706b ./gcc/testsuite/g++.old-deja/g++.pt/nested1.C 752451121b ./gcc/testsuite/g++.old-deja/g++.pt/nested2.C 3261242986b ./gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C 3338878252b ./gcc/testsuite/g++.old-deja/g++.pt/niklas01b.C + 206427704b ./gcc/testsuite/g++.old-deja/g++.pt/niklas01.C 3121397720b ./gcc/testsuite/g++.old-deja/g++.pt/niklas02.C 18744569b ./gcc/testsuite/g++.old-deja/g++.pt/niklas03.C 4224711202b ./gcc/testsuite/g++.old-deja/g++.pt/nontype1.C *************** *** 8232,8244 **** 2791152240b ./gcc/testsuite/g++.old-deja/g++.pt/nttp1.C 247002708b ./gcc/testsuite/g++.old-deja/g++.pt/nttp2.C 1278541513b ./gcc/testsuite/g++.old-deja/g++.pt/operator1.C - 2435336654b ./gcc/testsuite/g++.old-deja/g++.pt/overload1.C 700666863b ./gcc/testsuite/g++.old-deja/g++.pt/overload10.C 106266692b ./gcc/testsuite/g++.old-deja/g++.pt/overload11.C 2233076058b ./gcc/testsuite/g++.old-deja/g++.pt/overload12.C 567369625b ./gcc/testsuite/g++.old-deja/g++.pt/overload13.C 43242814b ./gcc/testsuite/g++.old-deja/g++.pt/overload14.C 775259676b ./gcc/testsuite/g++.old-deja/g++.pt/overload15.C 1331381682b ./gcc/testsuite/g++.old-deja/g++.pt/overload2.C 2609432689b ./gcc/testsuite/g++.old-deja/g++.pt/overload3.C 685890975b ./gcc/testsuite/g++.old-deja/g++.pt/overload4.C --- 11107,11119 ---- 2791152240b ./gcc/testsuite/g++.old-deja/g++.pt/nttp1.C 247002708b ./gcc/testsuite/g++.old-deja/g++.pt/nttp2.C 1278541513b ./gcc/testsuite/g++.old-deja/g++.pt/operator1.C 700666863b ./gcc/testsuite/g++.old-deja/g++.pt/overload10.C 106266692b ./gcc/testsuite/g++.old-deja/g++.pt/overload11.C 2233076058b ./gcc/testsuite/g++.old-deja/g++.pt/overload12.C 567369625b ./gcc/testsuite/g++.old-deja/g++.pt/overload13.C 43242814b ./gcc/testsuite/g++.old-deja/g++.pt/overload14.C 775259676b ./gcc/testsuite/g++.old-deja/g++.pt/overload15.C + 2435336654b ./gcc/testsuite/g++.old-deja/g++.pt/overload1.C 1331381682b ./gcc/testsuite/g++.old-deja/g++.pt/overload2.C 2609432689b ./gcc/testsuite/g++.old-deja/g++.pt/overload3.C 685890975b ./gcc/testsuite/g++.old-deja/g++.pt/overload4.C *************** *** 8258,8265 **** 4209924429b ./gcc/testsuite/g++.old-deja/g++.pt/partial5.C 4183203582b ./gcc/testsuite/g++.old-deja/g++.pt/poi1.C 1609222984b ./gcc/testsuite/g++.old-deja/g++.pt/pointer1.C - 667276243b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C 2621744921b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C 1628163413b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem2.C 3615617559b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem3.C 886281225b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem4.C --- 11133,11140 ---- 4209924429b ./gcc/testsuite/g++.old-deja/g++.pt/partial5.C 4183203582b ./gcc/testsuite/g++.old-deja/g++.pt/poi1.C 1609222984b ./gcc/testsuite/g++.old-deja/g++.pt/pointer1.C 2621744921b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C + 667276243b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C 1628163413b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem2.C 3615617559b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem3.C 886281225b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem4.C *************** *** 8268,8275 **** 3758586102b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem7.C 2054039204b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem8.C 3543585318b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem9.C - 1176769163b ./gcc/testsuite/g++.old-deja/g++.pt/recursion.C 2282560315b ./gcc/testsuite/g++.old-deja/g++.pt/recursion2.C 2783268127b ./gcc/testsuite/g++.old-deja/g++.pt/redecl1.C 273604436b ./gcc/testsuite/g++.old-deja/g++.pt/redecl2.C 594557972b ./gcc/testsuite/g++.old-deja/g++.pt/ref1.C --- 11143,11150 ---- 3758586102b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem7.C 2054039204b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem8.C 3543585318b ./gcc/testsuite/g++.old-deja/g++.pt/ptrmem9.C 2282560315b ./gcc/testsuite/g++.old-deja/g++.pt/recursion2.C + 1176769163b ./gcc/testsuite/g++.old-deja/g++.pt/recursion.C 2783268127b ./gcc/testsuite/g++.old-deja/g++.pt/redecl1.C 273604436b ./gcc/testsuite/g++.old-deja/g++.pt/redecl2.C 594557972b ./gcc/testsuite/g++.old-deja/g++.pt/ref1.C *************** *** 8283,8292 **** 842128020b ./gcc/testsuite/g++.old-deja/g++.pt/scope1.C 696905520b ./gcc/testsuite/g++.old-deja/g++.pt/shadow1.C 3988722815b ./gcc/testsuite/g++.old-deja/g++.pt/shadow2.C - 4082900584b ./gcc/testsuite/g++.old-deja/g++.pt/sizeof.C 3116942821b ./gcc/testsuite/g++.old-deja/g++.pt/sizeof2.C 2876524265b ./gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C ! 991382684b ./gcc/testsuite/g++.old-deja/g++.pt/spec1.C 93654703b ./gcc/testsuite/g++.old-deja/g++.pt/spec10.C 3527506444b ./gcc/testsuite/g++.old-deja/g++.pt/spec11.C 3538641668b ./gcc/testsuite/g++.old-deja/g++.pt/spec12.C --- 11158,11166 ---- 842128020b ./gcc/testsuite/g++.old-deja/g++.pt/scope1.C 696905520b ./gcc/testsuite/g++.old-deja/g++.pt/shadow1.C 3988722815b ./gcc/testsuite/g++.old-deja/g++.pt/shadow2.C 3116942821b ./gcc/testsuite/g++.old-deja/g++.pt/sizeof2.C 2876524265b ./gcc/testsuite/g++.old-deja/g++.pt/sizeof3.C ! 4082900584b ./gcc/testsuite/g++.old-deja/g++.pt/sizeof.C 93654703b ./gcc/testsuite/g++.old-deja/g++.pt/spec10.C 3527506444b ./gcc/testsuite/g++.old-deja/g++.pt/spec11.C 3538641668b ./gcc/testsuite/g++.old-deja/g++.pt/spec12.C *************** *** 8297,8303 **** 411261988b ./gcc/testsuite/g++.old-deja/g++.pt/spec17.C 4048825100b ./gcc/testsuite/g++.old-deja/g++.pt/spec18.C 3497658316b ./gcc/testsuite/g++.old-deja/g++.pt/spec19.C ! 3880560938b ./gcc/testsuite/g++.old-deja/g++.pt/spec2.C 2791297069b ./gcc/testsuite/g++.old-deja/g++.pt/spec20.C 3113620134b ./gcc/testsuite/g++.old-deja/g++.pt/spec21.C 2983405950b ./gcc/testsuite/g++.old-deja/g++.pt/spec22.C --- 11171,11177 ---- 411261988b ./gcc/testsuite/g++.old-deja/g++.pt/spec17.C 4048825100b ./gcc/testsuite/g++.old-deja/g++.pt/spec18.C 3497658316b ./gcc/testsuite/g++.old-deja/g++.pt/spec19.C ! 991382684b ./gcc/testsuite/g++.old-deja/g++.pt/spec1.C 2791297069b ./gcc/testsuite/g++.old-deja/g++.pt/spec20.C 3113620134b ./gcc/testsuite/g++.old-deja/g++.pt/spec21.C 2983405950b ./gcc/testsuite/g++.old-deja/g++.pt/spec22.C *************** *** 8306,8314 **** 843333207b ./gcc/testsuite/g++.old-deja/g++.pt/spec25.C 2342185227b ./gcc/testsuite/g++.old-deja/g++.pt/spec26.C 163389509b ./gcc/testsuite/g++.old-deja/g++.pt/spec27.C ! 1709855616b ./gcc/testsuite/g++.old-deja/g++.pt/spec28.C 288771490b ./gcc/testsuite/g++.old-deja/g++.pt/spec29.C ! 2986435997b ./gcc/testsuite/g++.old-deja/g++.pt/spec3.C 3450541938b ./gcc/testsuite/g++.old-deja/g++.pt/spec30.C 3771549807b ./gcc/testsuite/g++.old-deja/g++.pt/spec31.C 811045881b ./gcc/testsuite/g++.old-deja/g++.pt/spec32.C --- 11180,11188 ---- 843333207b ./gcc/testsuite/g++.old-deja/g++.pt/spec25.C 2342185227b ./gcc/testsuite/g++.old-deja/g++.pt/spec26.C 163389509b ./gcc/testsuite/g++.old-deja/g++.pt/spec27.C ! 723418800b ./gcc/testsuite/g++.old-deja/g++.pt/spec28.C 288771490b ./gcc/testsuite/g++.old-deja/g++.pt/spec29.C ! 3880560938b ./gcc/testsuite/g++.old-deja/g++.pt/spec2.C 3450541938b ./gcc/testsuite/g++.old-deja/g++.pt/spec30.C 3771549807b ./gcc/testsuite/g++.old-deja/g++.pt/spec31.C 811045881b ./gcc/testsuite/g++.old-deja/g++.pt/spec32.C *************** *** 8319,8335 **** 2893602715b ./gcc/testsuite/g++.old-deja/g++.pt/spec37.C 1089795364b ./gcc/testsuite/g++.old-deja/g++.pt/spec38.C 3573286877b ./gcc/testsuite/g++.old-deja/g++.pt/spec39.C ! 1203682774b ./gcc/testsuite/g++.old-deja/g++.pt/spec4.C 263033306b ./gcc/testsuite/g++.old-deja/g++.pt/spec40.C 4257539281b ./gcc/testsuite/g++.old-deja/g++.pt/spec41.C 472020156b ./gcc/testsuite/g++.old-deja/g++.pt/spec5.C 2997305150b ./gcc/testsuite/g++.old-deja/g++.pt/spec6.C 4161522669b ./gcc/testsuite/g++.old-deja/g++.pt/spec7.C 2956825769b ./gcc/testsuite/g++.old-deja/g++.pt/spec8.C 689217773b ./gcc/testsuite/g++.old-deja/g++.pt/spec9.C - 2178379561b ./gcc/testsuite/g++.old-deja/g++.pt/static1.C 3499532117b ./gcc/testsuite/g++.old-deja/g++.pt/static10.C ! 3672678643b ./gcc/testsuite/g++.old-deja/g++.pt/static11.C 3095826275b ./gcc/testsuite/g++.old-deja/g++.pt/static2.C 3043759182b ./gcc/testsuite/g++.old-deja/g++.pt/static3.C 4121342217b ./gcc/testsuite/g++.old-deja/g++.pt/static4.C --- 11193,11210 ---- 2893602715b ./gcc/testsuite/g++.old-deja/g++.pt/spec37.C 1089795364b ./gcc/testsuite/g++.old-deja/g++.pt/spec38.C 3573286877b ./gcc/testsuite/g++.old-deja/g++.pt/spec39.C ! 2986435997b ./gcc/testsuite/g++.old-deja/g++.pt/spec3.C 263033306b ./gcc/testsuite/g++.old-deja/g++.pt/spec40.C 4257539281b ./gcc/testsuite/g++.old-deja/g++.pt/spec41.C + 1203682774b ./gcc/testsuite/g++.old-deja/g++.pt/spec4.C 472020156b ./gcc/testsuite/g++.old-deja/g++.pt/spec5.C 2997305150b ./gcc/testsuite/g++.old-deja/g++.pt/spec6.C 4161522669b ./gcc/testsuite/g++.old-deja/g++.pt/spec7.C 2956825769b ./gcc/testsuite/g++.old-deja/g++.pt/spec8.C 689217773b ./gcc/testsuite/g++.old-deja/g++.pt/spec9.C 3499532117b ./gcc/testsuite/g++.old-deja/g++.pt/static10.C ! 3953283065b ./gcc/testsuite/g++.old-deja/g++.pt/static11.C ! 2178379561b ./gcc/testsuite/g++.old-deja/g++.pt/static1.C 3095826275b ./gcc/testsuite/g++.old-deja/g++.pt/static2.C 3043759182b ./gcc/testsuite/g++.old-deja/g++.pt/static3.C 4121342217b ./gcc/testsuite/g++.old-deja/g++.pt/static4.C *************** *** 8339,8346 **** 3987560353b ./gcc/testsuite/g++.old-deja/g++.pt/static8.C 1860907942b ./gcc/testsuite/g++.old-deja/g++.pt/static9.C 1680154606b ./gcc/testsuite/g++.old-deja/g++.pt/static_cast.C - 2053761696b ./gcc/testsuite/g++.old-deja/g++.pt/stmtexpr.C 3432829463b ./gcc/testsuite/g++.old-deja/g++.pt/stmtexpr2.C 2038345660b ./gcc/testsuite/g++.old-deja/g++.pt/switch1.C 1321551276b ./gcc/testsuite/g++.old-deja/g++.pt/syntax1.C 769950811b ./gcc/testsuite/g++.old-deja/g++.pt/syntax2.C --- 11214,11221 ---- 3987560353b ./gcc/testsuite/g++.old-deja/g++.pt/static8.C 1860907942b ./gcc/testsuite/g++.old-deja/g++.pt/static9.C 1680154606b ./gcc/testsuite/g++.old-deja/g++.pt/static_cast.C 3432829463b ./gcc/testsuite/g++.old-deja/g++.pt/stmtexpr2.C + 2053761696b ./gcc/testsuite/g++.old-deja/g++.pt/stmtexpr.C 2038345660b ./gcc/testsuite/g++.old-deja/g++.pt/switch1.C 1321551276b ./gcc/testsuite/g++.old-deja/g++.pt/syntax1.C 769950811b ./gcc/testsuite/g++.old-deja/g++.pt/syntax2.C *************** *** 8354,8366 **** 1220980648b ./gcc/testsuite/g++.old-deja/g++.pt/t08.C 54752251b ./gcc/testsuite/g++.old-deja/g++.pt/t09.C 3939433080b ./gcc/testsuite/g++.old-deja/g++.pt/t10.C - 3632072790b ./gcc/testsuite/g++.old-deja/g++.pt/t11.C 1989751964b ./gcc/testsuite/g++.old-deja/g++.pt/t11a.C ! 2249141950b ./gcc/testsuite/g++.old-deja/g++.pt/t12.C 2049763895b ./gcc/testsuite/g++.old-deja/g++.pt/t12a.C 1228232084b ./gcc/testsuite/g++.old-deja/g++.pt/t13.C - 2100897741b ./gcc/testsuite/g++.old-deja/g++.pt/t14.C 2705379238b ./gcc/testsuite/g++.old-deja/g++.pt/t14a.C 1989199194b ./gcc/testsuite/g++.old-deja/g++.pt/t16.C 3606509706b ./gcc/testsuite/g++.old-deja/g++.pt/t18.C 141625773b ./gcc/testsuite/g++.old-deja/g++.pt/t20.C --- 11229,11241 ---- 1220980648b ./gcc/testsuite/g++.old-deja/g++.pt/t08.C 54752251b ./gcc/testsuite/g++.old-deja/g++.pt/t09.C 3939433080b ./gcc/testsuite/g++.old-deja/g++.pt/t10.C 1989751964b ./gcc/testsuite/g++.old-deja/g++.pt/t11a.C ! 3632072790b ./gcc/testsuite/g++.old-deja/g++.pt/t11.C 2049763895b ./gcc/testsuite/g++.old-deja/g++.pt/t12a.C + 2249141950b ./gcc/testsuite/g++.old-deja/g++.pt/t12.C 1228232084b ./gcc/testsuite/g++.old-deja/g++.pt/t13.C 2705379238b ./gcc/testsuite/g++.old-deja/g++.pt/t14a.C + 2100897741b ./gcc/testsuite/g++.old-deja/g++.pt/t14.C 1989199194b ./gcc/testsuite/g++.old-deja/g++.pt/t16.C 3606509706b ./gcc/testsuite/g++.old-deja/g++.pt/t18.C 141625773b ./gcc/testsuite/g++.old-deja/g++.pt/t20.C *************** *** 8375,8389 **** 1147556452b ./gcc/testsuite/g++.old-deja/g++.pt/t29.C 3402602239b ./gcc/testsuite/g++.old-deja/g++.pt/t30.C 1087482084b ./gcc/testsuite/g++.old-deja/g++.pt/t31.C - 2623408289b ./gcc/testsuite/g++.old-deja/g++.pt/t32.C 1551618603b ./gcc/testsuite/g++.old-deja/g++.pt/t32a.C ! 4017416236b ./gcc/testsuite/g++.old-deja/g++.pt/t34.C 163082280b ./gcc/testsuite/g++.old-deja/g++.pt/t34a.C ! 2585097382b ./gcc/testsuite/g++.old-deja/g++.pt/t35.C 3947322975b ./gcc/testsuite/g++.old-deja/g++.pt/t35a.C 1516584548b ./gcc/testsuite/g++.old-deja/g++.pt/t36.C - 1426987064b ./gcc/testsuite/g++.old-deja/g++.pt/t37.C 420324441b ./gcc/testsuite/g++.old-deja/g++.pt/t37a.C 2340198171b ./gcc/testsuite/g++.old-deja/g++.pt/t38.C 3309470860b ./gcc/testsuite/g++.old-deja/g++.pt/t39.C 1718444525b ./gcc/testsuite/g++.old-deja/g++.pt/t40.C --- 11250,11264 ---- 1147556452b ./gcc/testsuite/g++.old-deja/g++.pt/t29.C 3402602239b ./gcc/testsuite/g++.old-deja/g++.pt/t30.C 1087482084b ./gcc/testsuite/g++.old-deja/g++.pt/t31.C 1551618603b ./gcc/testsuite/g++.old-deja/g++.pt/t32a.C ! 2623408289b ./gcc/testsuite/g++.old-deja/g++.pt/t32.C 163082280b ./gcc/testsuite/g++.old-deja/g++.pt/t34a.C ! 4017416236b ./gcc/testsuite/g++.old-deja/g++.pt/t34.C 3947322975b ./gcc/testsuite/g++.old-deja/g++.pt/t35a.C + 2585097382b ./gcc/testsuite/g++.old-deja/g++.pt/t35.C 1516584548b ./gcc/testsuite/g++.old-deja/g++.pt/t36.C 420324441b ./gcc/testsuite/g++.old-deja/g++.pt/t37a.C + 1426987064b ./gcc/testsuite/g++.old-deja/g++.pt/t37.C 2340198171b ./gcc/testsuite/g++.old-deja/g++.pt/t38.C 3309470860b ./gcc/testsuite/g++.old-deja/g++.pt/t39.C 1718444525b ./gcc/testsuite/g++.old-deja/g++.pt/t40.C *************** *** 8394,8402 **** 1121503772b ./gcc/testsuite/g++.old-deja/g++.pt/tiemann1r.C 129425925b ./gcc/testsuite/g++.old-deja/g++.pt/tiemann2.C 1767149933b ./gcc/testsuite/g++.old-deja/g++.pt/to2.C - 1910189955b ./gcc/testsuite/g++.old-deja/g++.pt/tt.C 611975575b ./gcc/testsuite/g++.old-deja/g++.pt/tt2.C ! 2278374754b ./gcc/testsuite/g++.old-deja/g++.pt/ttp1.C 2900382617b ./gcc/testsuite/g++.old-deja/g++.pt/ttp10.C 526371793b ./gcc/testsuite/g++.old-deja/g++.pt/ttp11.C 862146403b ./gcc/testsuite/g++.old-deja/g++.pt/ttp12.C --- 11269,11276 ---- 1121503772b ./gcc/testsuite/g++.old-deja/g++.pt/tiemann1r.C 129425925b ./gcc/testsuite/g++.old-deja/g++.pt/tiemann2.C 1767149933b ./gcc/testsuite/g++.old-deja/g++.pt/to2.C 611975575b ./gcc/testsuite/g++.old-deja/g++.pt/tt2.C ! 1910189955b ./gcc/testsuite/g++.old-deja/g++.pt/tt.C 2900382617b ./gcc/testsuite/g++.old-deja/g++.pt/ttp10.C 526371793b ./gcc/testsuite/g++.old-deja/g++.pt/ttp11.C 862146403b ./gcc/testsuite/g++.old-deja/g++.pt/ttp12.C *************** *** 8407,8413 **** 2374108737b ./gcc/testsuite/g++.old-deja/g++.pt/ttp17.C 2213336936b ./gcc/testsuite/g++.old-deja/g++.pt/ttp18.C 1575203598b ./gcc/testsuite/g++.old-deja/g++.pt/ttp19.C ! 3553743b ./gcc/testsuite/g++.old-deja/g++.pt/ttp2.C 1859285874b ./gcc/testsuite/g++.old-deja/g++.pt/ttp20.C 1147993431b ./gcc/testsuite/g++.old-deja/g++.pt/ttp21.C 1298886248b ./gcc/testsuite/g++.old-deja/g++.pt/ttp22.C --- 11281,11287 ---- 2374108737b ./gcc/testsuite/g++.old-deja/g++.pt/ttp17.C 2213336936b ./gcc/testsuite/g++.old-deja/g++.pt/ttp18.C 1575203598b ./gcc/testsuite/g++.old-deja/g++.pt/ttp19.C ! 2278374754b ./gcc/testsuite/g++.old-deja/g++.pt/ttp1.C 1859285874b ./gcc/testsuite/g++.old-deja/g++.pt/ttp20.C 1147993431b ./gcc/testsuite/g++.old-deja/g++.pt/ttp21.C 1298886248b ./gcc/testsuite/g++.old-deja/g++.pt/ttp22.C *************** *** 8418,8424 **** 4244916136b ./gcc/testsuite/g++.old-deja/g++.pt/ttp27.C 3429685547b ./gcc/testsuite/g++.old-deja/g++.pt/ttp28.C 3829242227b ./gcc/testsuite/g++.old-deja/g++.pt/ttp29.C ! 2339659475b ./gcc/testsuite/g++.old-deja/g++.pt/ttp3.C 2855054105b ./gcc/testsuite/g++.old-deja/g++.pt/ttp30.C 4010195516b ./gcc/testsuite/g++.old-deja/g++.pt/ttp31.C 3654116178b ./gcc/testsuite/g++.old-deja/g++.pt/ttp32.C --- 11292,11298 ---- 4244916136b ./gcc/testsuite/g++.old-deja/g++.pt/ttp27.C 3429685547b ./gcc/testsuite/g++.old-deja/g++.pt/ttp28.C 3829242227b ./gcc/testsuite/g++.old-deja/g++.pt/ttp29.C ! 3553743b ./gcc/testsuite/g++.old-deja/g++.pt/ttp2.C 2855054105b ./gcc/testsuite/g++.old-deja/g++.pt/ttp30.C 4010195516b ./gcc/testsuite/g++.old-deja/g++.pt/ttp31.C 3654116178b ./gcc/testsuite/g++.old-deja/g++.pt/ttp32.C *************** *** 8429,8435 **** 361840570b ./gcc/testsuite/g++.old-deja/g++.pt/ttp37.C 570115104b ./gcc/testsuite/g++.old-deja/g++.pt/ttp38.C 2884076986b ./gcc/testsuite/g++.old-deja/g++.pt/ttp39.C ! 883851040b ./gcc/testsuite/g++.old-deja/g++.pt/ttp4.C 3777404240b ./gcc/testsuite/g++.old-deja/g++.pt/ttp40.C 1654832327b ./gcc/testsuite/g++.old-deja/g++.pt/ttp41.C 1252557260b ./gcc/testsuite/g++.old-deja/g++.pt/ttp42.C --- 11303,11309 ---- 361840570b ./gcc/testsuite/g++.old-deja/g++.pt/ttp37.C 570115104b ./gcc/testsuite/g++.old-deja/g++.pt/ttp38.C 2884076986b ./gcc/testsuite/g++.old-deja/g++.pt/ttp39.C ! 2339659475b ./gcc/testsuite/g++.old-deja/g++.pt/ttp3.C 3777404240b ./gcc/testsuite/g++.old-deja/g++.pt/ttp40.C 1654832327b ./gcc/testsuite/g++.old-deja/g++.pt/ttp41.C 1252557260b ./gcc/testsuite/g++.old-deja/g++.pt/ttp42.C *************** *** 8440,8446 **** 1411925217b ./gcc/testsuite/g++.old-deja/g++.pt/ttp47.C 3294346857b ./gcc/testsuite/g++.old-deja/g++.pt/ttp48.C 246280481b ./gcc/testsuite/g++.old-deja/g++.pt/ttp49.C ! 744920614b ./gcc/testsuite/g++.old-deja/g++.pt/ttp5.C 148311367b ./gcc/testsuite/g++.old-deja/g++.pt/ttp50.C 1355737114b ./gcc/testsuite/g++.old-deja/g++.pt/ttp51.C 742860133b ./gcc/testsuite/g++.old-deja/g++.pt/ttp52.C --- 11314,11320 ---- 1411925217b ./gcc/testsuite/g++.old-deja/g++.pt/ttp47.C 3294346857b ./gcc/testsuite/g++.old-deja/g++.pt/ttp48.C 246280481b ./gcc/testsuite/g++.old-deja/g++.pt/ttp49.C ! 883851040b ./gcc/testsuite/g++.old-deja/g++.pt/ttp4.C 148311367b ./gcc/testsuite/g++.old-deja/g++.pt/ttp50.C 1355737114b ./gcc/testsuite/g++.old-deja/g++.pt/ttp51.C 742860133b ./gcc/testsuite/g++.old-deja/g++.pt/ttp52.C *************** *** 8449,8463 **** 969371039b ./gcc/testsuite/g++.old-deja/g++.pt/ttp55.C 1933937224b ./gcc/testsuite/g++.old-deja/g++.pt/ttp56.C 781548580b ./gcc/testsuite/g++.old-deja/g++.pt/ttp57.C ! 3542091704b ./gcc/testsuite/g++.old-deja/g++.pt/ttp58.C 1970694533b ./gcc/testsuite/g++.old-deja/g++.pt/ttp59.C ! 1041079584b ./gcc/testsuite/g++.old-deja/g++.pt/ttp6.C 1001403023b ./gcc/testsuite/g++.old-deja/g++.pt/ttp60.C 3275558727b ./gcc/testsuite/g++.old-deja/g++.pt/ttp61.C 1915032158b ./gcc/testsuite/g++.old-deja/g++.pt/ttp62.C 3261657532b ./gcc/testsuite/g++.old-deja/g++.pt/ttp63.C 1109524802b ./gcc/testsuite/g++.old-deja/g++.pt/ttp64.C 334468093b ./gcc/testsuite/g++.old-deja/g++.pt/ttp65.C 2962993334b ./gcc/testsuite/g++.old-deja/g++.pt/ttp7.C 1961268006b ./gcc/testsuite/g++.old-deja/g++.pt/ttp8.C 3708749815b ./gcc/testsuite/g++.old-deja/g++.pt/ttp9.C --- 11323,11338 ---- 969371039b ./gcc/testsuite/g++.old-deja/g++.pt/ttp55.C 1933937224b ./gcc/testsuite/g++.old-deja/g++.pt/ttp56.C 781548580b ./gcc/testsuite/g++.old-deja/g++.pt/ttp57.C ! 471877508b ./gcc/testsuite/g++.old-deja/g++.pt/ttp58.C 1970694533b ./gcc/testsuite/g++.old-deja/g++.pt/ttp59.C ! 744920614b ./gcc/testsuite/g++.old-deja/g++.pt/ttp5.C 1001403023b ./gcc/testsuite/g++.old-deja/g++.pt/ttp60.C 3275558727b ./gcc/testsuite/g++.old-deja/g++.pt/ttp61.C 1915032158b ./gcc/testsuite/g++.old-deja/g++.pt/ttp62.C 3261657532b ./gcc/testsuite/g++.old-deja/g++.pt/ttp63.C 1109524802b ./gcc/testsuite/g++.old-deja/g++.pt/ttp64.C 334468093b ./gcc/testsuite/g++.old-deja/g++.pt/ttp65.C + 1041079584b ./gcc/testsuite/g++.old-deja/g++.pt/ttp6.C 2962993334b ./gcc/testsuite/g++.old-deja/g++.pt/ttp7.C 1961268006b ./gcc/testsuite/g++.old-deja/g++.pt/ttp8.C 3708749815b ./gcc/testsuite/g++.old-deja/g++.pt/ttp9.C *************** *** 8465,8471 **** 2645715863b ./gcc/testsuite/g++.old-deja/g++.pt/typedef2.C 1128115184b ./gcc/testsuite/g++.old-deja/g++.pt/typedef3.C 687887055b ./gcc/testsuite/g++.old-deja/g++.pt/typedef4.C - 155924010b ./gcc/testsuite/g++.old-deja/g++.pt/typename1.C 3197185389b ./gcc/testsuite/g++.old-deja/g++.pt/typename10.C 11764674b ./gcc/testsuite/g++.old-deja/g++.pt/typename11.C 275086081b ./gcc/testsuite/g++.old-deja/g++.pt/typename12.C --- 11340,11345 ---- *************** *** 8476,8482 **** 4165656026b ./gcc/testsuite/g++.old-deja/g++.pt/typename17.C 2199791863b ./gcc/testsuite/g++.old-deja/g++.pt/typename18.C 1657062514b ./gcc/testsuite/g++.old-deja/g++.pt/typename19.C ! 1202424634b ./gcc/testsuite/g++.old-deja/g++.pt/typename2.C 3251695233b ./gcc/testsuite/g++.old-deja/g++.pt/typename20.C 4031896858b ./gcc/testsuite/g++.old-deja/g++.pt/typename21.C 3346623174b ./gcc/testsuite/g++.old-deja/g++.pt/typename22.C --- 11350,11356 ---- 4165656026b ./gcc/testsuite/g++.old-deja/g++.pt/typename17.C 2199791863b ./gcc/testsuite/g++.old-deja/g++.pt/typename18.C 1657062514b ./gcc/testsuite/g++.old-deja/g++.pt/typename19.C ! 155924010b ./gcc/testsuite/g++.old-deja/g++.pt/typename1.C 3251695233b ./gcc/testsuite/g++.old-deja/g++.pt/typename20.C 4031896858b ./gcc/testsuite/g++.old-deja/g++.pt/typename21.C 3346623174b ./gcc/testsuite/g++.old-deja/g++.pt/typename22.C *************** *** 8486,8491 **** --- 11360,11366 ---- 2707583962b ./gcc/testsuite/g++.old-deja/g++.pt/typename26.C 1423713632b ./gcc/testsuite/g++.old-deja/g++.pt/typename27.C 1479397024b ./gcc/testsuite/g++.old-deja/g++.pt/typename28.C + 1202424634b ./gcc/testsuite/g++.old-deja/g++.pt/typename2.C 671867998b ./gcc/testsuite/g++.old-deja/g++.pt/typename3.C 516047961b ./gcc/testsuite/g++.old-deja/g++.pt/typename4.C 3990219214b ./gcc/testsuite/g++.old-deja/g++.pt/typename5.C *************** *** 8504,8512 **** 3325944931b ./gcc/testsuite/g++.old-deja/g++.pt/union2.C 3304362700b ./gcc/testsuite/g++.old-deja/g++.pt/using1.C 3289243465b ./gcc/testsuite/g++.old-deja/g++.pt/using2.C - 886046502b ./gcc/testsuite/g++.old-deja/g++.pt/vaarg.C 3460641357b ./gcc/testsuite/g++.old-deja/g++.pt/vaarg2.C 358497795b ./gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C 663619266b ./gcc/testsuite/g++.old-deja/g++.pt/var1.C 1421755768b ./gcc/testsuite/g++.old-deja/g++.pt/vbase1.C 3353980626b ./gcc/testsuite/g++.old-deja/g++.pt/virtual1.C --- 11379,11387 ---- 3325944931b ./gcc/testsuite/g++.old-deja/g++.pt/union2.C 3304362700b ./gcc/testsuite/g++.old-deja/g++.pt/using1.C 3289243465b ./gcc/testsuite/g++.old-deja/g++.pt/using2.C 3460641357b ./gcc/testsuite/g++.old-deja/g++.pt/vaarg2.C 358497795b ./gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C + 886046502b ./gcc/testsuite/g++.old-deja/g++.pt/vaarg.C 663619266b ./gcc/testsuite/g++.old-deja/g++.pt/var1.C 1421755768b ./gcc/testsuite/g++.old-deja/g++.pt/vbase1.C 3353980626b ./gcc/testsuite/g++.old-deja/g++.pt/virtual1.C *************** *** 8518,8525 **** 1415873556b ./gcc/testsuite/g++.old-deja/g++.rfg/00321_01-.C 1112275657b ./gcc/testsuite/g++.old-deja/g++.rfg/00324_02-.C 4001281008b ./gcc/testsuite/g++.old-deja/g++.robertl/980310-1.C - 3593716546b ./gcc/testsuite/g++.old-deja/g++.robertl/README - 3648377352b ./gcc/testsuite/g++.old-deja/g++.robertl/eb10.C 3472844044b ./gcc/testsuite/g++.old-deja/g++.robertl/eb102.C 2443648446b ./gcc/testsuite/g++.old-deja/g++.robertl/eb103.C 2507881262b ./gcc/testsuite/g++.old-deja/g++.robertl/eb104.C --- 11393,11398 ---- *************** *** 8528,8534 **** 816702909b ./gcc/testsuite/g++.old-deja/g++.robertl/eb107.C 1370397701b ./gcc/testsuite/g++.old-deja/g++.robertl/eb108.C 2829681364b ./gcc/testsuite/g++.old-deja/g++.robertl/eb109.C ! 1227838581b ./gcc/testsuite/g++.old-deja/g++.robertl/eb11.C 1181050923b ./gcc/testsuite/g++.old-deja/g++.robertl/eb110.C 3893933499b ./gcc/testsuite/g++.old-deja/g++.robertl/eb111.C 1958243707b ./gcc/testsuite/g++.old-deja/g++.robertl/eb112.C --- 11401,11407 ---- 816702909b ./gcc/testsuite/g++.old-deja/g++.robertl/eb107.C 1370397701b ./gcc/testsuite/g++.old-deja/g++.robertl/eb108.C 2829681364b ./gcc/testsuite/g++.old-deja/g++.robertl/eb109.C ! 3648377352b ./gcc/testsuite/g++.old-deja/g++.robertl/eb10.C 1181050923b ./gcc/testsuite/g++.old-deja/g++.robertl/eb110.C 3893933499b ./gcc/testsuite/g++.old-deja/g++.robertl/eb111.C 1958243707b ./gcc/testsuite/g++.old-deja/g++.robertl/eb112.C *************** *** 8538,8544 **** 882322806b ./gcc/testsuite/g++.old-deja/g++.robertl/eb116.C 3652784132b ./gcc/testsuite/g++.old-deja/g++.robertl/eb118.C 1321940613b ./gcc/testsuite/g++.old-deja/g++.robertl/eb119.C ! 158711949b ./gcc/testsuite/g++.old-deja/g++.robertl/eb12.C 784221952b ./gcc/testsuite/g++.old-deja/g++.robertl/eb120.C 1281713077b ./gcc/testsuite/g++.old-deja/g++.robertl/eb121.C 2148357158b ./gcc/testsuite/g++.old-deja/g++.robertl/eb122.C --- 11411,11417 ---- 882322806b ./gcc/testsuite/g++.old-deja/g++.robertl/eb116.C 3652784132b ./gcc/testsuite/g++.old-deja/g++.robertl/eb118.C 1321940613b ./gcc/testsuite/g++.old-deja/g++.robertl/eb119.C ! 1227838581b ./gcc/testsuite/g++.old-deja/g++.robertl/eb11.C 784221952b ./gcc/testsuite/g++.old-deja/g++.robertl/eb120.C 1281713077b ./gcc/testsuite/g++.old-deja/g++.robertl/eb121.C 2148357158b ./gcc/testsuite/g++.old-deja/g++.robertl/eb122.C *************** *** 8547,8569 **** 3467340374b ./gcc/testsuite/g++.old-deja/g++.robertl/eb125.C 1327581862b ./gcc/testsuite/g++.old-deja/g++.robertl/eb126.C 3379073614b ./gcc/testsuite/g++.old-deja/g++.robertl/eb127.C ! 1650763244b ./gcc/testsuite/g++.old-deja/g++.robertl/eb128.C ! 551639476b ./gcc/testsuite/g++.old-deja/g++.robertl/eb129.C 2811911547b ./gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C ! 630981722b ./gcc/testsuite/g++.old-deja/g++.robertl/eb13.C 3610132478b ./gcc/testsuite/g++.old-deja/g++.robertl/eb130.C 2576744469b ./gcc/testsuite/g++.old-deja/g++.robertl/eb131.C 191646019b ./gcc/testsuite/g++.old-deja/g++.robertl/eb132.C - 960695829b ./gcc/testsuite/g++.old-deja/g++.robertl/eb133.C 2212505012b ./gcc/testsuite/g++.old-deja/g++.robertl/eb133a.C 960695829b ./gcc/testsuite/g++.old-deja/g++.robertl/eb133b.C 3851013524b ./gcc/testsuite/g++.old-deja/g++.robertl/eb14.C 8426984b ./gcc/testsuite/g++.old-deja/g++.robertl/eb15.C 2805277324b ./gcc/testsuite/g++.old-deja/g++.robertl/eb16.C 1023058352b ./gcc/testsuite/g++.old-deja/g++.robertl/eb17.C 2664767884b ./gcc/testsuite/g++.old-deja/g++.robertl/eb18.C 526517709b ./gcc/testsuite/g++.old-deja/g++.robertl/eb19.C - 3780933159b ./gcc/testsuite/g++.old-deja/g++.robertl/eb2.C 461969397b ./gcc/testsuite/g++.old-deja/g++.robertl/eb20.C 2675256374b ./gcc/testsuite/g++.old-deja/g++.robertl/eb21.C 917318256b ./gcc/testsuite/g++.old-deja/g++.robertl/eb22.C --- 11420,11442 ---- 3467340374b ./gcc/testsuite/g++.old-deja/g++.robertl/eb125.C 1327581862b ./gcc/testsuite/g++.old-deja/g++.robertl/eb126.C 3379073614b ./gcc/testsuite/g++.old-deja/g++.robertl/eb127.C ! 3752300231b ./gcc/testsuite/g++.old-deja/g++.robertl/eb128.C 2811911547b ./gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C ! 551639476b ./gcc/testsuite/g++.old-deja/g++.robertl/eb129.C ! 158711949b ./gcc/testsuite/g++.old-deja/g++.robertl/eb12.C 3610132478b ./gcc/testsuite/g++.old-deja/g++.robertl/eb130.C 2576744469b ./gcc/testsuite/g++.old-deja/g++.robertl/eb131.C 191646019b ./gcc/testsuite/g++.old-deja/g++.robertl/eb132.C 2212505012b ./gcc/testsuite/g++.old-deja/g++.robertl/eb133a.C 960695829b ./gcc/testsuite/g++.old-deja/g++.robertl/eb133b.C + 960695829b ./gcc/testsuite/g++.old-deja/g++.robertl/eb133.C + 630981722b ./gcc/testsuite/g++.old-deja/g++.robertl/eb13.C 3851013524b ./gcc/testsuite/g++.old-deja/g++.robertl/eb14.C 8426984b ./gcc/testsuite/g++.old-deja/g++.robertl/eb15.C 2805277324b ./gcc/testsuite/g++.old-deja/g++.robertl/eb16.C 1023058352b ./gcc/testsuite/g++.old-deja/g++.robertl/eb17.C 2664767884b ./gcc/testsuite/g++.old-deja/g++.robertl/eb18.C 526517709b ./gcc/testsuite/g++.old-deja/g++.robertl/eb19.C 461969397b ./gcc/testsuite/g++.old-deja/g++.robertl/eb20.C 2675256374b ./gcc/testsuite/g++.old-deja/g++.robertl/eb21.C 917318256b ./gcc/testsuite/g++.old-deja/g++.robertl/eb22.C *************** *** 8573,8579 **** 292107192b ./gcc/testsuite/g++.old-deja/g++.robertl/eb27.C 1890436003b ./gcc/testsuite/g++.old-deja/g++.robertl/eb28.C 3453020821b ./gcc/testsuite/g++.old-deja/g++.robertl/eb29.C ! 2212669672b ./gcc/testsuite/g++.old-deja/g++.robertl/eb3.C 563892057b ./gcc/testsuite/g++.old-deja/g++.robertl/eb30.C 3084203745b ./gcc/testsuite/g++.old-deja/g++.robertl/eb31.C 4187617186b ./gcc/testsuite/g++.old-deja/g++.robertl/eb32.C --- 11446,11452 ---- 292107192b ./gcc/testsuite/g++.old-deja/g++.robertl/eb27.C 1890436003b ./gcc/testsuite/g++.old-deja/g++.robertl/eb28.C 3453020821b ./gcc/testsuite/g++.old-deja/g++.robertl/eb29.C ! 3780933159b ./gcc/testsuite/g++.old-deja/g++.robertl/eb2.C 563892057b ./gcc/testsuite/g++.old-deja/g++.robertl/eb30.C 3084203745b ./gcc/testsuite/g++.old-deja/g++.robertl/eb31.C 4187617186b ./gcc/testsuite/g++.old-deja/g++.robertl/eb32.C *************** *** 8584,8590 **** 2564432607b ./gcc/testsuite/g++.old-deja/g++.robertl/eb37.C 2426566316b ./gcc/testsuite/g++.old-deja/g++.robertl/eb38.C 528193552b ./gcc/testsuite/g++.old-deja/g++.robertl/eb39.C ! 291255111b ./gcc/testsuite/g++.old-deja/g++.robertl/eb4.C 507123073b ./gcc/testsuite/g++.old-deja/g++.robertl/eb41.C 3295582703b ./gcc/testsuite/g++.old-deja/g++.robertl/eb43.C 3397322273b ./gcc/testsuite/g++.old-deja/g++.robertl/eb44.C --- 11457,11463 ---- 2564432607b ./gcc/testsuite/g++.old-deja/g++.robertl/eb37.C 2426566316b ./gcc/testsuite/g++.old-deja/g++.robertl/eb38.C 528193552b ./gcc/testsuite/g++.old-deja/g++.robertl/eb39.C ! 2212669672b ./gcc/testsuite/g++.old-deja/g++.robertl/eb3.C 507123073b ./gcc/testsuite/g++.old-deja/g++.robertl/eb41.C 3295582703b ./gcc/testsuite/g++.old-deja/g++.robertl/eb43.C 3397322273b ./gcc/testsuite/g++.old-deja/g++.robertl/eb44.C *************** *** 8592,8598 **** 804543247b ./gcc/testsuite/g++.old-deja/g++.robertl/eb46.C 753241876b ./gcc/testsuite/g++.old-deja/g++.robertl/eb48.C 3504050873b ./gcc/testsuite/g++.old-deja/g++.robertl/eb49.C ! 3128226785b ./gcc/testsuite/g++.old-deja/g++.robertl/eb5.C 4113309347b ./gcc/testsuite/g++.old-deja/g++.robertl/eb50.C 1918037503b ./gcc/testsuite/g++.old-deja/g++.robertl/eb51.C 3209054875b ./gcc/testsuite/g++.old-deja/g++.robertl/eb52.C --- 11465,11471 ---- 804543247b ./gcc/testsuite/g++.old-deja/g++.robertl/eb46.C 753241876b ./gcc/testsuite/g++.old-deja/g++.robertl/eb48.C 3504050873b ./gcc/testsuite/g++.old-deja/g++.robertl/eb49.C ! 291255111b ./gcc/testsuite/g++.old-deja/g++.robertl/eb4.C 4113309347b ./gcc/testsuite/g++.old-deja/g++.robertl/eb50.C 1918037503b ./gcc/testsuite/g++.old-deja/g++.robertl/eb51.C 3209054875b ./gcc/testsuite/g++.old-deja/g++.robertl/eb52.C *************** *** 8602,8608 **** 1356497150b ./gcc/testsuite/g++.old-deja/g++.robertl/eb57.C 3407397105b ./gcc/testsuite/g++.old-deja/g++.robertl/eb58.C 794738043b ./gcc/testsuite/g++.old-deja/g++.robertl/eb59.C ! 1997456294b ./gcc/testsuite/g++.old-deja/g++.robertl/eb6.C 2498272255b ./gcc/testsuite/g++.old-deja/g++.robertl/eb60.C 1266761033b ./gcc/testsuite/g++.old-deja/g++.robertl/eb61.C 2004022719b ./gcc/testsuite/g++.old-deja/g++.robertl/eb62.C --- 11475,11481 ---- 1356497150b ./gcc/testsuite/g++.old-deja/g++.robertl/eb57.C 3407397105b ./gcc/testsuite/g++.old-deja/g++.robertl/eb58.C 794738043b ./gcc/testsuite/g++.old-deja/g++.robertl/eb59.C ! 3128226785b ./gcc/testsuite/g++.old-deja/g++.robertl/eb5.C 2498272255b ./gcc/testsuite/g++.old-deja/g++.robertl/eb60.C 1266761033b ./gcc/testsuite/g++.old-deja/g++.robertl/eb61.C 2004022719b ./gcc/testsuite/g++.old-deja/g++.robertl/eb62.C *************** *** 8612,8618 **** 980372542b ./gcc/testsuite/g++.old-deja/g++.robertl/eb66.C 3389307963b ./gcc/testsuite/g++.old-deja/g++.robertl/eb67.C 4223737421b ./gcc/testsuite/g++.old-deja/g++.robertl/eb69.C ! 718049317b ./gcc/testsuite/g++.old-deja/g++.robertl/eb7.C 2182473885b ./gcc/testsuite/g++.old-deja/g++.robertl/eb70.C 3826058150b ./gcc/testsuite/g++.old-deja/g++.robertl/eb71.C 3782517804b ./gcc/testsuite/g++.old-deja/g++.robertl/eb73.C --- 11485,11491 ---- 980372542b ./gcc/testsuite/g++.old-deja/g++.robertl/eb66.C 3389307963b ./gcc/testsuite/g++.old-deja/g++.robertl/eb67.C 4223737421b ./gcc/testsuite/g++.old-deja/g++.robertl/eb69.C ! 1997456294b ./gcc/testsuite/g++.old-deja/g++.robertl/eb6.C 2182473885b ./gcc/testsuite/g++.old-deja/g++.robertl/eb70.C 3826058150b ./gcc/testsuite/g++.old-deja/g++.robertl/eb71.C 3782517804b ./gcc/testsuite/g++.old-deja/g++.robertl/eb73.C *************** *** 8621,8627 **** 2546436998b ./gcc/testsuite/g++.old-deja/g++.robertl/eb76.C 2308966043b ./gcc/testsuite/g++.old-deja/g++.robertl/eb77.C 3644883412b ./gcc/testsuite/g++.old-deja/g++.robertl/eb79.C ! 3708449542b ./gcc/testsuite/g++.old-deja/g++.robertl/eb8.C 1974141968b ./gcc/testsuite/g++.old-deja/g++.robertl/eb80.C 3623034003b ./gcc/testsuite/g++.old-deja/g++.robertl/eb81.C 303859604b ./gcc/testsuite/g++.old-deja/g++.robertl/eb82.C --- 11494,11500 ---- 2546436998b ./gcc/testsuite/g++.old-deja/g++.robertl/eb76.C 2308966043b ./gcc/testsuite/g++.old-deja/g++.robertl/eb77.C 3644883412b ./gcc/testsuite/g++.old-deja/g++.robertl/eb79.C ! 718049317b ./gcc/testsuite/g++.old-deja/g++.robertl/eb7.C 1974141968b ./gcc/testsuite/g++.old-deja/g++.robertl/eb80.C 3623034003b ./gcc/testsuite/g++.old-deja/g++.robertl/eb81.C 303859604b ./gcc/testsuite/g++.old-deja/g++.robertl/eb82.C *************** *** 8630,8636 **** 83084630b ./gcc/testsuite/g++.old-deja/g++.robertl/eb86.C 637629215b ./gcc/testsuite/g++.old-deja/g++.robertl/eb87.C 15844958b ./gcc/testsuite/g++.old-deja/g++.robertl/eb88.C ! 3273280926b ./gcc/testsuite/g++.old-deja/g++.robertl/eb9.C 1724324673b ./gcc/testsuite/g++.old-deja/g++.robertl/eb90.C 2024296388b ./gcc/testsuite/g++.old-deja/g++.robertl/eb91.C 2107259564b ./gcc/testsuite/g++.old-deja/g++.robertl/eb92.C --- 11503,11509 ---- 83084630b ./gcc/testsuite/g++.old-deja/g++.robertl/eb86.C 637629215b ./gcc/testsuite/g++.old-deja/g++.robertl/eb87.C 15844958b ./gcc/testsuite/g++.old-deja/g++.robertl/eb88.C ! 3708449542b ./gcc/testsuite/g++.old-deja/g++.robertl/eb8.C 1724324673b ./gcc/testsuite/g++.old-deja/g++.robertl/eb90.C 2024296388b ./gcc/testsuite/g++.old-deja/g++.robertl/eb91.C 2107259564b ./gcc/testsuite/g++.old-deja/g++.robertl/eb92.C *************** *** 8640,8648 **** 2908163544b ./gcc/testsuite/g++.old-deja/g++.robertl/eb97.C 131102227b ./gcc/testsuite/g++.old-deja/g++.robertl/eb98.C 2054173722b ./gcc/testsuite/g++.old-deja/g++.robertl/eb99.C 1294688249b ./gcc/testsuite/g++.old-deja/g++.robertl/ebnull-cast.C 2390910991b ./gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C - 3496760893b ./gcc/testsuite/g++.old-deja/g++.robertl/ebnull.C 3321525464b ./gcc/testsuite/g++.old-deja/g++.robertl/eh990323-1.C 349170821b ./gcc/testsuite/g++.old-deja/g++.robertl/eh990323-2.C 2742680950b ./gcc/testsuite/g++.old-deja/g++.robertl/eh990323-3.C --- 11513,11522 ---- 2908163544b ./gcc/testsuite/g++.old-deja/g++.robertl/eb97.C 131102227b ./gcc/testsuite/g++.old-deja/g++.robertl/eb98.C 2054173722b ./gcc/testsuite/g++.old-deja/g++.robertl/eb99.C + 3273280926b ./gcc/testsuite/g++.old-deja/g++.robertl/eb9.C + 3496760893b ./gcc/testsuite/g++.old-deja/g++.robertl/ebnull.C 1294688249b ./gcc/testsuite/g++.old-deja/g++.robertl/ebnull-cast.C 2390910991b ./gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C 3321525464b ./gcc/testsuite/g++.old-deja/g++.robertl/eh990323-1.C 349170821b ./gcc/testsuite/g++.old-deja/g++.robertl/eh990323-2.C 2742680950b ./gcc/testsuite/g++.old-deja/g++.robertl/eh990323-3.C *************** *** 8653,11096 **** 424851899b ./gcc/testsuite/g++.old-deja/g++.robertl/ice990323-3.C 1966976843b ./gcc/testsuite/g++.old-deja/g++.robertl/ice990323-4.C 2792305431b ./gcc/testsuite/g++.old-deja/g++.robertl/ice990323-5.C 2167858031b ./gcc/testsuite/g++.old-deja/g++.warn/cast-align1.C 2257841595b ./gcc/testsuite/g++.old-deja/g++.warn/compare1.C 478428580b ./gcc/testsuite/g++.old-deja/g++.warn/flow1.C - 228848226b ./gcc/testsuite/g++.old-deja/g++.warn/impint.C 1434994100b ./gcc/testsuite/g++.old-deja/g++.warn/impint2.C 308484502b ./gcc/testsuite/g++.old-deja/g++.warn/inline.C 3053994732b ./gcc/testsuite/g++.old-deja/g++.warn/iomanip.C 3603456747b ./gcc/testsuite/g++.old-deja/g++.warn/virt1.C 1241992731b ./gcc/testsuite/g++.old-deja/old-deja.exp ! 2710099993b ./gcc/testsuite/g77.dg/20010216-1.f ! 211215127b ./gcc/testsuite/g77.dg/bprob/bprob-1.f ! 345215922b ./gcc/testsuite/g77.dg/bprob/bprob.exp ! 1815830648b ./gcc/testsuite/g77.dg/dg.exp ! 2557434398b ./gcc/testsuite/g77.dg/f77-edit-i-in.f ! 462852590b ./gcc/testsuite/g77.dg/f77-edit-i-out.f ! 3692598063b ./gcc/testsuite/g77.dg/fbackslash.f ! 3349950140b ./gcc/testsuite/g77.dg/fcase-preserve.f ! 3493107241b ./gcc/testsuite/g77.dg/ff90-1.f ! 846110140b ./gcc/testsuite/g77.dg/ffixed-line-length-0.f ! 306302525b ./gcc/testsuite/g77.dg/ffixed-line-length-132.f ! 1293833923b ./gcc/testsuite/g77.dg/ffixed-line-length-7.f ! 256008601b ./gcc/testsuite/g77.dg/ffixed-line-length-72.f ! 2426259256b ./gcc/testsuite/g77.dg/ffixed-line-length-none.f ! 382313186b ./gcc/testsuite/g77.dg/ffree-form-1.f ! 1427613779b ./gcc/testsuite/g77.dg/fno-backslash.f ! 1787673713b ./gcc/testsuite/g77.dg/fno-f90-1.f ! 1073584992b ./gcc/testsuite/g77.dg/fno-fixed-form-1.f ! 2730066868b ./gcc/testsuite/g77.dg/fno-onetrip.f ! 109115498b ./gcc/testsuite/g77.dg/fno-typeless-boz.f ! 2720105997b ./gcc/testsuite/g77.dg/fno-underscoring.f ! 614291430b ./gcc/testsuite/g77.dg/fno-vxt-1.f ! 646478354b ./gcc/testsuite/g77.dg/fonetrip.f ! 298378793b ./gcc/testsuite/g77.dg/ftypeless-boz.f ! 1970388396b ./gcc/testsuite/g77.dg/fugly-assumed.f ! 813122842b ./gcc/testsuite/g77.dg/funderscoring.f ! 2755287889b ./gcc/testsuite/g77.dg/fvxt-1.f ! 4218369628b ./gcc/testsuite/g77.dg/gcov/gcov-1.f ! 2262587727b ./gcc/testsuite/g77.dg/gcov/gcov-1.x ! 3439770285b ./gcc/testsuite/g77.dg/gcov/gcov.exp ! 2336318971b ./gcc/testsuite/g77.dg/pr3743-1.f ! 3986109564b ./gcc/testsuite/g77.dg/pr3743-2.f ! 202729794b ./gcc/testsuite/g77.dg/pr3743-3.f ! 2533314951b ./gcc/testsuite/g77.dg/pr3743-4.f ! 3959051916b ./gcc/testsuite/g77.dg/pr5473.f ! 3353736439b ./gcc/testsuite/g77.dg/pr9258.f ! 3263834407b ./gcc/testsuite/g77.dg/strlen0.f ! 2382988813b ./gcc/testsuite/g77.f-torture/compile/19990218-0.f ! 687255164b ./gcc/testsuite/g77.f-torture/compile/19990305-0.f ! 4067537756b ./gcc/testsuite/g77.f-torture/compile/19990419-0.f ! 3411435248b ./gcc/testsuite/g77.f-torture/compile/19990502-0.f ! 1869005611b ./gcc/testsuite/g77.f-torture/compile/19990502-1.f ! 4129788740b ./gcc/testsuite/g77.f-torture/compile/19990525-0.f ! 2117801028b ./gcc/testsuite/g77.f-torture/compile/19990826-1.f ! 1740583941b ./gcc/testsuite/g77.f-torture/compile/19990826-3.f ! 2822256200b ./gcc/testsuite/g77.f-torture/compile/19990905-0.f ! 1729432512b ./gcc/testsuite/g77.f-torture/compile/19990905-2.f ! 3873649497b ./gcc/testsuite/g77.f-torture/compile/20000412-1.f ! 2840421610b ./gcc/testsuite/g77.f-torture/compile/20000511-1.f ! 2723712181b ./gcc/testsuite/g77.f-torture/compile/20000511-2.f ! 82013928b ./gcc/testsuite/g77.f-torture/compile/20000518.f ! 412413004b ./gcc/testsuite/g77.f-torture/compile/20000601-1.f ! 3180214474b ./gcc/testsuite/g77.f-torture/compile/20000601-2.f ! 4055621021b ./gcc/testsuite/g77.f-torture/compile/20000629-1.f ! 2336002500b ./gcc/testsuite/g77.f-torture/compile/20000630-2.f ! 3970776632b ./gcc/testsuite/g77.f-torture/compile/20010115.f ! 3772314415b ./gcc/testsuite/g77.f-torture/compile/20010321-1.f ! 2213180372b ./gcc/testsuite/g77.f-torture/compile/20010426.f ! 267354428b ./gcc/testsuite/g77.f-torture/compile/20010519-1.f ! 1776224360b ./gcc/testsuite/g77.f-torture/compile/960317-1.f ! 2528706840b ./gcc/testsuite/g77.f-torture/compile/970125-0.f ! 3100920780b ./gcc/testsuite/g77.f-torture/compile/970915-0.f ! 3454578083b ./gcc/testsuite/g77.f-torture/compile/980310-1.f ! 1063918752b ./gcc/testsuite/g77.f-torture/compile/980310-2.f ! 3699662809b ./gcc/testsuite/g77.f-torture/compile/980310-3.f ! 3523537961b ./gcc/testsuite/g77.f-torture/compile/980310-4.f ! 581995045b ./gcc/testsuite/g77.f-torture/compile/980310-6.f ! 758602941b ./gcc/testsuite/g77.f-torture/compile/980310-7.f ! 3264996889b ./gcc/testsuite/g77.f-torture/compile/980310-8.f ! 55455134b ./gcc/testsuite/g77.f-torture/compile/980419-2.f ! 2284181108b ./gcc/testsuite/g77.f-torture/compile/980424-0.f ! 585713859b ./gcc/testsuite/g77.f-torture/compile/980427-0.f ! 2853235618b ./gcc/testsuite/g77.f-torture/compile/980519-2.f ! 2138526345b ./gcc/testsuite/g77.f-torture/compile/980729-0.f ! 1069123470b ./gcc/testsuite/g77.f-torture/compile/981117-1.f ! 2053478041b ./gcc/testsuite/g77.f-torture/compile/990115-1.f ! 3973737388b ./gcc/testsuite/g77.f-torture/compile/alpha1.f ! 2107279947b ./gcc/testsuite/g77.f-torture/compile/alpha1.x ! 4148688482b ./gcc/testsuite/g77.f-torture/compile/compile.exp ! 883444817b ./gcc/testsuite/g77.f-torture/compile/cpp.F ! 1347946300b ./gcc/testsuite/g77.f-torture/compile/cpp2.F ! 407305629b ./gcc/testsuite/g77.f-torture/compile/toon_1.f ! 1875205813b ./gcc/testsuite/g77.f-torture/execute/19981119-0.f ! 207133658b ./gcc/testsuite/g77.f-torture/execute/19990313-0.f ! 1311165077b ./gcc/testsuite/g77.f-torture/execute/19990313-1.f ! 2827041779b ./gcc/testsuite/g77.f-torture/execute/19990313-2.f ! 3627217083b ./gcc/testsuite/g77.f-torture/execute/19990313-3.f ! 334442269b ./gcc/testsuite/g77.f-torture/execute/19990325-0.f ! 2498790248b ./gcc/testsuite/g77.f-torture/execute/19990325-1.f ! 1566943825b ./gcc/testsuite/g77.f-torture/execute/19990419-1.f ! 1702408878b ./gcc/testsuite/g77.f-torture/execute/19990826-0.f ! 548549288b ./gcc/testsuite/g77.f-torture/execute/19990826-2.f ! 2245832686b ./gcc/testsuite/g77.f-torture/execute/20000503-1.f ! 119817854b ./gcc/testsuite/g77.f-torture/execute/20001111.f ! 3778266196b ./gcc/testsuite/g77.f-torture/execute/20001201.f ! 1721706271b ./gcc/testsuite/g77.f-torture/execute/20001201.x ! 3482653018b ./gcc/testsuite/g77.f-torture/execute/20010116.f ! 104441706b ./gcc/testsuite/g77.f-torture/execute/20010426.f ! 2134591728b ./gcc/testsuite/g77.f-torture/execute/20010430.f ! 2127502131b ./gcc/testsuite/g77.f-torture/execute/20010610.f ! 1835626441b ./gcc/testsuite/g77.f-torture/execute/5122.f ! 166046708b ./gcc/testsuite/g77.f-torture/execute/947.f ! 2872624206b ./gcc/testsuite/g77.f-torture/execute/970625-2.f ! 2944713164b ./gcc/testsuite/g77.f-torture/execute/970816-3.f ! 3043987240b ./gcc/testsuite/g77.f-torture/execute/971102-1.f ! 1356010785b ./gcc/testsuite/g77.f-torture/execute/980520-1.f ! 2822825054b ./gcc/testsuite/g77.f-torture/execute/980628-0.f ! 731282896b ./gcc/testsuite/g77.f-torture/execute/980628-1.f ! 1154425496b ./gcc/testsuite/g77.f-torture/execute/980628-10.f ! 652392894b ./gcc/testsuite/g77.f-torture/execute/980628-2.f ! 3891656681b ./gcc/testsuite/g77.f-torture/execute/980628-3.f ! 4188896500b ./gcc/testsuite/g77.f-torture/execute/980628-4.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/980628-4.x ! 3480269714b ./gcc/testsuite/g77.f-torture/execute/980628-5.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/980628-5.x ! 1467613590b ./gcc/testsuite/g77.f-torture/execute/980628-6.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/980628-6.x ! 1104933088b ./gcc/testsuite/g77.f-torture/execute/980628-7.f ! 1264093278b ./gcc/testsuite/g77.f-torture/execute/980628-8.f ! 2969694593b ./gcc/testsuite/g77.f-torture/execute/980628-9.f ! 1979661682b ./gcc/testsuite/g77.f-torture/execute/980701-0.f ! 2199388550b ./gcc/testsuite/g77.f-torture/execute/980701-1.f ! 2519492399b ./gcc/testsuite/g77.f-torture/execute/alpha2.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/alpha2.x ! 2259027475b ./gcc/testsuite/g77.f-torture/execute/auto0.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/auto0.x ! 4202240464b ./gcc/testsuite/g77.f-torture/execute/auto1.f ! 2107279947b ./gcc/testsuite/g77.f-torture/execute/auto1.x ! 232981110b ./gcc/testsuite/g77.f-torture/execute/cabs.f ! 877306443b ./gcc/testsuite/g77.f-torture/execute/claus.f ! 2682388459b ./gcc/testsuite/g77.f-torture/execute/complex_1.f ! 274053025b ./gcc/testsuite/g77.f-torture/execute/cpp.F ! 268027241b ./gcc/testsuite/g77.f-torture/execute/cpp2.F ! 3689042274b ./gcc/testsuite/g77.f-torture/execute/dcomplex.f ! 2431087293b ./gcc/testsuite/g77.f-torture/execute/dnrm2.f ! 1012852742b ./gcc/testsuite/g77.f-torture/execute/erfc.f ! 574860802b ./gcc/testsuite/g77.f-torture/execute/execute.exp ! 2348837361b ./gcc/testsuite/g77.f-torture/execute/exp.f ! 1166305221b ./gcc/testsuite/g77.f-torture/execute/f90-intrinsic-bit.f ! 1401151480b ./gcc/testsuite/g77.f-torture/execute/f90-intrinsic-mathematical.f ! 296501581b ./gcc/testsuite/g77.f-torture/execute/f90-intrinsic-numeric.f ! 1619227376b ./gcc/testsuite/g77.f-torture/execute/intrinsic-f2c-z.f ! 2512429495b ./gcc/testsuite/g77.f-torture/execute/intrinsic-unix-bessel.f ! 846341057b ./gcc/testsuite/g77.f-torture/execute/intrinsic-unix-erf.f ! 3837275230b ./gcc/testsuite/g77.f-torture/execute/intrinsic-vax-cd.f ! 1448802159b ./gcc/testsuite/g77.f-torture/execute/intrinsic77.f ! 3527337523b ./gcc/testsuite/g77.f-torture/execute/io0.f ! 1721706271b ./gcc/testsuite/g77.f-torture/execute/io0.x ! 1499748556b ./gcc/testsuite/g77.f-torture/execute/io1.f ! 1721706271b ./gcc/testsuite/g77.f-torture/execute/io1.x ! 3838992103b ./gcc/testsuite/g77.f-torture/execute/labug1.f ! 273345472b ./gcc/testsuite/g77.f-torture/execute/large_vec.f ! 775036014b ./gcc/testsuite/g77.f-torture/execute/le.f ! 3780459526b ./gcc/testsuite/g77.f-torture/execute/short.f ! 85764886b ./gcc/testsuite/g77.f-torture/execute/u77-test.f ! 991484451b ./gcc/testsuite/g77.f-torture/execute/u77-test.x ! 2234422141b ./gcc/testsuite/g77.f-torture/noncompile/19981216-0.f ! 2509327097b ./gcc/testsuite/g77.f-torture/noncompile/19990218-1.f ! 684708897b ./gcc/testsuite/g77.f-torture/noncompile/19990826-4.f ! 3593377062b ./gcc/testsuite/g77.f-torture/noncompile/19990905-1.f ! 3649968898b ./gcc/testsuite/g77.f-torture/noncompile/970626-2.f ! 3382416911b ./gcc/testsuite/g77.f-torture/noncompile/980615-0.f ! 4269744935b ./gcc/testsuite/g77.f-torture/noncompile/980616-0.f ! 2374591598b ./gcc/testsuite/g77.f-torture/noncompile/check0.f ! 351555731b ./gcc/testsuite/g77.f-torture/noncompile/noncompile.exp ! 2075770423b ./gcc/testsuite/gcc.c-torture/ChangeLog.0 ! 1091110310b ./gcc/testsuite/gcc.c-torture/compat/strct-layout.c ! 684784126b ./gcc/testsuite/gcc.c-torture/compat/struct-align.c ! 92980596b ./gcc/testsuite/gcc.c-torture/compat/struct-big.c ! 2993970556b ./gcc/testsuite/gcc.c-torture/compat/struct-i.c ! 1373131310b ./gcc/testsuite/gcc.c-torture/compat/struct-ic.c ! 367335173b ./gcc/testsuite/gcc.c-torture/compat/struct-ii.c ! 954170066b ./gcc/testsuite/gcc.c-torture/compat/struct-ret-1.c ! 452836178b ./gcc/testsuite/gcc.c-torture/compile/20000105-1.c ! 1901634825b ./gcc/testsuite/gcc.c-torture/compile/20000105-2.c ! 3139355726b ./gcc/testsuite/gcc.c-torture/compile/20000120-1.c ! 193146344b ./gcc/testsuite/gcc.c-torture/compile/20000120-2.c ! 3770371830b ./gcc/testsuite/gcc.c-torture/compile/20000127-1.c ! 1457334923b ./gcc/testsuite/gcc.c-torture/compile/20000211-1.c ! 3072124491b ./gcc/testsuite/gcc.c-torture/compile/20000211-3.c ! 2487027780b ./gcc/testsuite/gcc.c-torture/compile/20000224-1.c ! 976060843b ./gcc/testsuite/gcc.c-torture/compile/20000314-1.c ! 2716819908b ./gcc/testsuite/gcc.c-torture/compile/20000314-2.c ! 3323098889b ./gcc/testsuite/gcc.c-torture/compile/20000319-1.c ! 621983670b ./gcc/testsuite/gcc.c-torture/compile/20000326-1.c ! 362965832b ./gcc/testsuite/gcc.c-torture/compile/20000326-2.c ! 1360671142b ./gcc/testsuite/gcc.c-torture/compile/20000329-1.c ! 1376990121b ./gcc/testsuite/gcc.c-torture/compile/20000403-1.c ! 1295018105b ./gcc/testsuite/gcc.c-torture/compile/20000403-2.c ! 2994009121b ./gcc/testsuite/gcc.c-torture/compile/20000405-1.c ! 1202553741b ./gcc/testsuite/gcc.c-torture/compile/20000405-2.c ! 1972736685b ./gcc/testsuite/gcc.c-torture/compile/20000405-3.c ! 4185438508b ./gcc/testsuite/gcc.c-torture/compile/20000412-1.c ! 1020690516b ./gcc/testsuite/gcc.c-torture/compile/20000412-2.c ! 606471227b ./gcc/testsuite/gcc.c-torture/compile/20000420-1.c ! 3618930753b ./gcc/testsuite/gcc.c-torture/compile/20000420-2.c ! 1513651895b ./gcc/testsuite/gcc.c-torture/compile/20000427-1.c ! 1253394561b ./gcc/testsuite/gcc.c-torture/compile/20000502-1.c ! 2301846307b ./gcc/testsuite/gcc.c-torture/compile/20000504-1.c ! 4216707490b ./gcc/testsuite/gcc.c-torture/compile/20000511-1.c ! 160078686b ./gcc/testsuite/gcc.c-torture/compile/20000517-1.c ! 138460064b ./gcc/testsuite/gcc.c-torture/compile/20000518-1.c ! 4277321614b ./gcc/testsuite/gcc.c-torture/compile/20000523-1.c ! 2889990236b ./gcc/testsuite/gcc.c-torture/compile/20000605-1.c ! 1801476756b ./gcc/testsuite/gcc.c-torture/compile/20000606-1.c ! 3807623957b ./gcc/testsuite/gcc.c-torture/compile/20000609-1.c ! 3889196710b ./gcc/testsuite/gcc.c-torture/compile/20000629-1.c ! 2019168881b ./gcc/testsuite/gcc.c-torture/compile/20000701-1.c ! 23561090b ./gcc/testsuite/gcc.c-torture/compile/20000717-1.c ! 1282603692b ./gcc/testsuite/gcc.c-torture/compile/20000718.c ! 1628213540b ./gcc/testsuite/gcc.c-torture/compile/20000728-1.c ! 1312817714b ./gcc/testsuite/gcc.c-torture/compile/20000802-1.c ! 726930164b ./gcc/testsuite/gcc.c-torture/compile/20000803-1.c ! 221685889b ./gcc/testsuite/gcc.c-torture/compile/20000804-1.c ! 365799149b ./gcc/testsuite/gcc.c-torture/compile/20000804-1.x ! 14592370b ./gcc/testsuite/gcc.c-torture/compile/20000818-1.c ! 3951998464b ./gcc/testsuite/gcc.c-torture/compile/20000825-1.c ! 568900271b ./gcc/testsuite/gcc.c-torture/compile/20000827-1.c ! 1702972966b ./gcc/testsuite/gcc.c-torture/compile/20000922-1.c ! 1072305501b ./gcc/testsuite/gcc.c-torture/compile/20000923-1.c ! 3797844565b ./gcc/testsuite/gcc.c-torture/compile/20001018-1.c ! 1683967360b ./gcc/testsuite/gcc.c-torture/compile/20001024-1.c ! 2747210984b ./gcc/testsuite/gcc.c-torture/compile/20001109-1.c ! 1480527842b ./gcc/testsuite/gcc.c-torture/compile/20001109-2.c ! 1361242877b ./gcc/testsuite/gcc.c-torture/compile/20001116-1.c ! 3966980994b ./gcc/testsuite/gcc.c-torture/compile/20001121-1.c ! 599106867b ./gcc/testsuite/gcc.c-torture/compile/20001123-1.c ! 533599449b ./gcc/testsuite/gcc.c-torture/compile/20001123-2.c ! 3673931755b ./gcc/testsuite/gcc.c-torture/compile/20001205-1.c ! 4124637154b ./gcc/testsuite/gcc.c-torture/compile/20001205-1.x ! 1735535039b ./gcc/testsuite/gcc.c-torture/compile/20001212-1.c ! 2993397009b ./gcc/testsuite/gcc.c-torture/compile/20001221-1.c ! 2331416953b ./gcc/testsuite/gcc.c-torture/compile/20001222-1.c ! 1872827667b ./gcc/testsuite/gcc.c-torture/compile/20001226-1.c ! 1799289877b ./gcc/testsuite/gcc.c-torture/compile/20001226-1.x ! 4099141482b ./gcc/testsuite/gcc.c-torture/compile/20010102-1.c ! 2413955943b ./gcc/testsuite/gcc.c-torture/compile/20010107-1.c ! 1898226085b ./gcc/testsuite/gcc.c-torture/compile/20010112-1.c ! 2489493145b ./gcc/testsuite/gcc.c-torture/compile/20010113-1.c ! 297170965b ./gcc/testsuite/gcc.c-torture/compile/20010114-1.c ! 419921862b ./gcc/testsuite/gcc.c-torture/compile/20010114-2.c ! 1452007589b ./gcc/testsuite/gcc.c-torture/compile/20010117-1.c ! 704576096b ./gcc/testsuite/gcc.c-torture/compile/20010117-2.c ! 3392519430b ./gcc/testsuite/gcc.c-torture/compile/20010118-1.c ! 3355150280b ./gcc/testsuite/gcc.c-torture/compile/20010124-1.c ! 1731094577b ./gcc/testsuite/gcc.c-torture/compile/20010202-1.c ! 459778149b ./gcc/testsuite/gcc.c-torture/compile/20010209-1.c ! 620156961b ./gcc/testsuite/gcc.c-torture/compile/20010226-1.c ! 501795051b ./gcc/testsuite/gcc.c-torture/compile/20010227-1.c ! 1832317029b ./gcc/testsuite/gcc.c-torture/compile/20010313-1.c ! 2854417844b ./gcc/testsuite/gcc.c-torture/compile/20010320-1.c ! 3271306723b ./gcc/testsuite/gcc.c-torture/compile/20010326-1.c ! 2222955049b ./gcc/testsuite/gcc.c-torture/compile/20010327-1.c ! 3399421780b ./gcc/testsuite/gcc.c-torture/compile/20010328-1.c ! 3356008690b ./gcc/testsuite/gcc.c-torture/compile/20010329-1.c ! 4152637354b ./gcc/testsuite/gcc.c-torture/compile/20010404-1.c ! 1548469760b ./gcc/testsuite/gcc.c-torture/compile/20010408-1.c ! 3063630520b ./gcc/testsuite/gcc.c-torture/compile/20010421-1.c ! 3134579946b ./gcc/testsuite/gcc.c-torture/compile/20010423-1.c ! 2289909284b ./gcc/testsuite/gcc.c-torture/compile/20010426-1.c ! 2357536931b ./gcc/testsuite/gcc.c-torture/compile/20010503-1.c ! 1212631565b ./gcc/testsuite/gcc.c-torture/compile/20010510-1.c ! 1882079811b ./gcc/testsuite/gcc.c-torture/compile/20010516-1.c ! 3166989448b ./gcc/testsuite/gcc.c-torture/compile/20010518-1.c ! 3017611134b ./gcc/testsuite/gcc.c-torture/compile/20010518-2.c ! 85616231b ./gcc/testsuite/gcc.c-torture/compile/20010518-2.x ! 3272357537b ./gcc/testsuite/gcc.c-torture/compile/20010525-1.c ! 475581102b ./gcc/testsuite/gcc.c-torture/compile/20010605-1.c ! 2936945185b ./gcc/testsuite/gcc.c-torture/compile/20010605-2.c ! 1294346331b ./gcc/testsuite/gcc.c-torture/compile/20010605-3.c ! 1636067950b ./gcc/testsuite/gcc.c-torture/compile/20010610-1.c ! 3077114319b ./gcc/testsuite/gcc.c-torture/compile/20010611-1.c ! 2584744929b ./gcc/testsuite/gcc.c-torture/compile/20010701-1.c ! 3815198051b ./gcc/testsuite/gcc.c-torture/compile/20010706-1.c ! 2713093522b ./gcc/testsuite/gcc.c-torture/compile/20010711-1.c ! 2299173088b ./gcc/testsuite/gcc.c-torture/compile/20010711-2.c ! 2571658330b ./gcc/testsuite/gcc.c-torture/compile/20010714-1.c ! 3287379546b ./gcc/testsuite/gcc.c-torture/compile/20010824-1.c ! 246682254b ./gcc/testsuite/gcc.c-torture/compile/20010903-1.c ! 2923439609b ./gcc/testsuite/gcc.c-torture/compile/20010903-2.c ! 4222197564b ./gcc/testsuite/gcc.c-torture/compile/20010911-1.c ! 1179192833b ./gcc/testsuite/gcc.c-torture/compile/20011010-1.c ! 3994663975b ./gcc/testsuite/gcc.c-torture/compile/20011023-1.c ! 1413783183b ./gcc/testsuite/gcc.c-torture/compile/20011029-1.c ! 2871784009b ./gcc/testsuite/gcc.c-torture/compile/20011106-1.c ! 3630952349b ./gcc/testsuite/gcc.c-torture/compile/20011106-2.c ! 259957404b ./gcc/testsuite/gcc.c-torture/compile/20011109-1.c ! 2924929463b ./gcc/testsuite/gcc.c-torture/compile/20011114-1.c ! 3434496008b ./gcc/testsuite/gcc.c-torture/compile/20011114-2.c ! 2760161415b ./gcc/testsuite/gcc.c-torture/compile/20011114-3.c ! 3547339064b ./gcc/testsuite/gcc.c-torture/compile/20011114-4.c ! 3653343012b ./gcc/testsuite/gcc.c-torture/compile/20011119-1.c ! 2885054257b ./gcc/testsuite/gcc.c-torture/compile/20011119-2.c ! 174415171b ./gcc/testsuite/gcc.c-torture/compile/20011130-1.c ! 1745547919b ./gcc/testsuite/gcc.c-torture/compile/20011130-2.c ! 3987052556b ./gcc/testsuite/gcc.c-torture/compile/20011205-1.c ! 1179199950b ./gcc/testsuite/gcc.c-torture/compile/20011217-1.c ! 315452475b ./gcc/testsuite/gcc.c-torture/compile/20011217-2.c ! 3416537061b ./gcc/testsuite/gcc.c-torture/compile/20011218-1.c ! 2149414673b ./gcc/testsuite/gcc.c-torture/compile/20011219-1.c ! 1484609615b ./gcc/testsuite/gcc.c-torture/compile/20011219-2.c ! 3590162726b ./gcc/testsuite/gcc.c-torture/compile/20011229-1.c ! 1849951092b ./gcc/testsuite/gcc.c-torture/compile/20011229-2.c ! 3637150343b ./gcc/testsuite/gcc.c-torture/compile/20020103-1.c ! 3505269843b ./gcc/testsuite/gcc.c-torture/compile/20020106-1.c ! 3398919425b ./gcc/testsuite/gcc.c-torture/compile/20020109-1.c ! 2348431150b ./gcc/testsuite/gcc.c-torture/compile/20020109-2.c ! 4197667212b ./gcc/testsuite/gcc.c-torture/compile/20020110.c ! 208428249b ./gcc/testsuite/gcc.c-torture/compile/20020116-1.c ! 966527433b ./gcc/testsuite/gcc.c-torture/compile/20020120-1.c ! 3002186865b ./gcc/testsuite/gcc.c-torture/compile/20020121-1.c ! 2862264485b ./gcc/testsuite/gcc.c-torture/compile/20020206-1.c ! 1009994283b ./gcc/testsuite/gcc.c-torture/compile/20020210-1.c ! 1683706700b ./gcc/testsuite/gcc.c-torture/compile/20020304-1.c ! 3186842248b ./gcc/testsuite/gcc.c-torture/compile/20020304-2.c ! 1366050512b ./gcc/testsuite/gcc.c-torture/compile/20020309-1.c ! 1174986914b ./gcc/testsuite/gcc.c-torture/compile/20020309-2.c ! 1727441689b ./gcc/testsuite/gcc.c-torture/compile/20020312-1.c ! 2378124589b ./gcc/testsuite/gcc.c-torture/compile/20020315-1.c ! 4029159547b ./gcc/testsuite/gcc.c-torture/compile/20020318-1.c ! 2837722984b ./gcc/testsuite/gcc.c-torture/compile/20020320-1.c ! 1380106070b ./gcc/testsuite/gcc.c-torture/compile/20020323-1.c ! 392286369b ./gcc/testsuite/gcc.c-torture/compile/20020330-1.c ! 4289507025b ./gcc/testsuite/gcc.c-torture/compile/20020409-1.c ! 3246888365b ./gcc/testsuite/gcc.c-torture/compile/20020418-1.c ! 1318297601b ./gcc/testsuite/gcc.c-torture/compile/20020530-1.c ! 909926902b ./gcc/testsuite/gcc.c-torture/compile/20020605-1.c ! 168620187b ./gcc/testsuite/gcc.c-torture/compile/20020701-1.c ! 1564612166b ./gcc/testsuite/gcc.c-torture/compile/20020710-1.c ! 737897185b ./gcc/testsuite/gcc.c-torture/compile/20020715-1.c ! 4042098602b ./gcc/testsuite/gcc.c-torture/compile/20020926-1.c ! 337401938b ./gcc/testsuite/gcc.c-torture/compile/20020927-1.c ! 1009786556b ./gcc/testsuite/gcc.c-torture/compile/20021007-1.c ! 778329230b ./gcc/testsuite/gcc.c-torture/compile/20021015-1.c ! 25981859b ./gcc/testsuite/gcc.c-torture/compile/20021015-2.c ! 2007214546b ./gcc/testsuite/gcc.c-torture/compile/20021123-1.c ! 3188218514b ./gcc/testsuite/gcc.c-torture/compile/20021123-2.c ! 3735410464b ./gcc/testsuite/gcc.c-torture/compile/20021123-3.c ! 3537627700b ./gcc/testsuite/gcc.c-torture/compile/20021123-4.c ! 2814356441b ./gcc/testsuite/gcc.c-torture/compile/20021124-1.c ! 3155365897b ./gcc/testsuite/gcc.c-torture/compile/20021204-1.c ! 953842788b ./gcc/testsuite/gcc.c-torture/compile/20021205-1.c ! 3765901682b ./gcc/testsuite/gcc.c-torture/compile/20021212-1.c ! 1694594576b ./gcc/testsuite/gcc.c-torture/compile/20030110-1.c ! 3514558242b ./gcc/testsuite/gcc.c-torture/compile/20030206-1.c ! 2261613922b ./gcc/testsuite/gcc.c-torture/compile/20030220-1.c ! 3214532330b ./gcc/testsuite/gcc.c-torture/compile/20030305-1.c ! 3074411947b ./gcc/testsuite/gcc.c-torture/compile/20030314-1.c ! 375311401b ./gcc/testsuite/gcc.c-torture/compile/900116-1.c ! 4181931788b ./gcc/testsuite/gcc.c-torture/compile/900216-1.c ! 426860692b ./gcc/testsuite/gcc.c-torture/compile/900313-1.c ! 221307575b ./gcc/testsuite/gcc.c-torture/compile/900407-1.c ! 197356982b ./gcc/testsuite/gcc.c-torture/compile/900516-1.c ! 1548983744b ./gcc/testsuite/gcc.c-torture/compile/920301-1.c ! 4282140702b ./gcc/testsuite/gcc.c-torture/compile/920409-1.c ! 1778084656b ./gcc/testsuite/gcc.c-torture/compile/920409-2.c ! 213155575b ./gcc/testsuite/gcc.c-torture/compile/920410-1.c ! 645991439b ./gcc/testsuite/gcc.c-torture/compile/920410-2.c ! 3957037518b ./gcc/testsuite/gcc.c-torture/compile/920411-2.c ! 2334498932b ./gcc/testsuite/gcc.c-torture/compile/920413-1.c ! 962899604b ./gcc/testsuite/gcc.c-torture/compile/920415-1.c ! 2539976202b ./gcc/testsuite/gcc.c-torture/compile/920428-1.c ! 1013934609b ./gcc/testsuite/gcc.c-torture/compile/920428-2.c ! 788296187b ./gcc/testsuite/gcc.c-torture/compile/920428-3.c ! 972355256b ./gcc/testsuite/gcc.c-torture/compile/920428-4.c ! 2850012644b ./gcc/testsuite/gcc.c-torture/compile/920428-5.c ! 3327240012b ./gcc/testsuite/gcc.c-torture/compile/920428-6.c ! 1997719687b ./gcc/testsuite/gcc.c-torture/compile/920428-7.c ! 3673935883b ./gcc/testsuite/gcc.c-torture/compile/920501-1.c ! 2992320179b ./gcc/testsuite/gcc.c-torture/compile/920501-10.c ! 2609541759b ./gcc/testsuite/gcc.c-torture/compile/920501-11.c ! 46877596b ./gcc/testsuite/gcc.c-torture/compile/920501-12.c ! 432031083b ./gcc/testsuite/gcc.c-torture/compile/920501-13.c ! 3986866565b ./gcc/testsuite/gcc.c-torture/compile/920501-15.c ! 2140301132b ./gcc/testsuite/gcc.c-torture/compile/920501-16.c ! 2776840158b ./gcc/testsuite/gcc.c-torture/compile/920501-17.c ! 2935229477b ./gcc/testsuite/gcc.c-torture/compile/920501-18.c ! 2462018157b ./gcc/testsuite/gcc.c-torture/compile/920501-19.c ! 825734676b ./gcc/testsuite/gcc.c-torture/compile/920501-2.c ! 3480599006b ./gcc/testsuite/gcc.c-torture/compile/920501-20.c ! 1689258794b ./gcc/testsuite/gcc.c-torture/compile/920501-21.c ! 693947540b ./gcc/testsuite/gcc.c-torture/compile/920501-22.c ! 195826579b ./gcc/testsuite/gcc.c-torture/compile/920501-23.c ! 2815077449b ./gcc/testsuite/gcc.c-torture/compile/920501-3.c ! 3150704176b ./gcc/testsuite/gcc.c-torture/compile/920501-4.c ! 3936438856b ./gcc/testsuite/gcc.c-torture/compile/920501-6.c ! 2978363162b ./gcc/testsuite/gcc.c-torture/compile/920501-7.c ! 3178366367b ./gcc/testsuite/gcc.c-torture/compile/920501-8.c ! 3988773566b ./gcc/testsuite/gcc.c-torture/compile/920501-9.c ! 4273234272b ./gcc/testsuite/gcc.c-torture/compile/920502-1.c ! 451473472b ./gcc/testsuite/gcc.c-torture/compile/920502-2.c ! 1332166500b ./gcc/testsuite/gcc.c-torture/compile/920520-1.c ! 3357986992b ./gcc/testsuite/gcc.c-torture/compile/920520-1.x ! 901366109b ./gcc/testsuite/gcc.c-torture/compile/920521-1.c ! 85616231b ./gcc/testsuite/gcc.c-torture/compile/920521-1.x ! 1216353647b ./gcc/testsuite/gcc.c-torture/compile/920529-1.c ! 619512296b ./gcc/testsuite/gcc.c-torture/compile/920608-1.c ! 2459147095b ./gcc/testsuite/gcc.c-torture/compile/920611-2.c ! 2108915266b ./gcc/testsuite/gcc.c-torture/compile/920615-1.c ! 1738386639b ./gcc/testsuite/gcc.c-torture/compile/920617-1.c ! 1497386838b ./gcc/testsuite/gcc.c-torture/compile/920617-2.c ! 15254500b ./gcc/testsuite/gcc.c-torture/compile/920623-1.c ! 1775235688b ./gcc/testsuite/gcc.c-torture/compile/920624-1.c ! 3157795265b ./gcc/testsuite/gcc.c-torture/compile/920625-1.c ! 2188778612b ./gcc/testsuite/gcc.c-torture/compile/920625-1.x ! 832571494b ./gcc/testsuite/gcc.c-torture/compile/920625-2.c ! 1209301541b ./gcc/testsuite/gcc.c-torture/compile/920626-1.c ! 1071302436b ./gcc/testsuite/gcc.c-torture/compile/920701-1.c ! 2769689708b ./gcc/testsuite/gcc.c-torture/compile/920702-1.c ! 2699685766b ./gcc/testsuite/gcc.c-torture/compile/920706-1.c ! 2611774952b ./gcc/testsuite/gcc.c-torture/compile/920710-2.c ! 3175710753b ./gcc/testsuite/gcc.c-torture/compile/920711-1.c ! 1838641399b ./gcc/testsuite/gcc.c-torture/compile/920721-1.c ! 1730574618b ./gcc/testsuite/gcc.c-torture/compile/920723-1.c ! 2728140867b ./gcc/testsuite/gcc.c-torture/compile/920729-1.c ! 3543134222b ./gcc/testsuite/gcc.c-torture/compile/920806-1.c ! 301898459b ./gcc/testsuite/gcc.c-torture/compile/920808-1.c ! 4286663396b ./gcc/testsuite/gcc.c-torture/compile/920809-1.c ! 1519893227b ./gcc/testsuite/gcc.c-torture/compile/920817-1.c ! 1506959740b ./gcc/testsuite/gcc.c-torture/compile/920820-1.c ! 2009298978b ./gcc/testsuite/gcc.c-torture/compile/920821-1.c ! 153303695b ./gcc/testsuite/gcc.c-torture/compile/920821-2.c ! 1035421587b ./gcc/testsuite/gcc.c-torture/compile/920825-1.c ! 1883204896b ./gcc/testsuite/gcc.c-torture/compile/920825-2.c ! 378919939b ./gcc/testsuite/gcc.c-torture/compile/920826-1.c ! 324445241b ./gcc/testsuite/gcc.c-torture/compile/920828-1.c ! 2512376601b ./gcc/testsuite/gcc.c-torture/compile/920829-1.c ! 1175894768b ./gcc/testsuite/gcc.c-torture/compile/920831-1.c ! 3615669663b ./gcc/testsuite/gcc.c-torture/compile/920902-1.c ! 3213642392b ./gcc/testsuite/gcc.c-torture/compile/920909-1.c ! 923773306b ./gcc/testsuite/gcc.c-torture/compile/920917-1.c ! 313805874b ./gcc/testsuite/gcc.c-torture/compile/920928-1.c ! 3576009210b ./gcc/testsuite/gcc.c-torture/compile/920928-2.c ! 2038558878b ./gcc/testsuite/gcc.c-torture/compile/920928-3.c ! 2544344324b ./gcc/testsuite/gcc.c-torture/compile/920928-4.c ! 934086546b ./gcc/testsuite/gcc.c-torture/compile/920928-5.c ! 6106016b ./gcc/testsuite/gcc.c-torture/compile/920928-6.c ! 735506239b ./gcc/testsuite/gcc.c-torture/compile/921004-1.c ! 3888639831b ./gcc/testsuite/gcc.c-torture/compile/921011-1.c ! 3956087084b ./gcc/testsuite/gcc.c-torture/compile/921011-2.c ! 1370935236b ./gcc/testsuite/gcc.c-torture/compile/921012-1.c ! 2304808730b ./gcc/testsuite/gcc.c-torture/compile/921012-2.c ! 3157047871b ./gcc/testsuite/gcc.c-torture/compile/921013-1.c ! 3740334758b ./gcc/testsuite/gcc.c-torture/compile/921019-1.c ! 2811091388b ./gcc/testsuite/gcc.c-torture/compile/921021-1.c ! 3551171868b ./gcc/testsuite/gcc.c-torture/compile/921024-1.c ! 3924542394b ./gcc/testsuite/gcc.c-torture/compile/921026-1.c ! 1165569278b ./gcc/testsuite/gcc.c-torture/compile/921103-1.c ! 1243246144b ./gcc/testsuite/gcc.c-torture/compile/921109-1.c ! 2203220429b ./gcc/testsuite/gcc.c-torture/compile/921111-1.c ! 1990624597b ./gcc/testsuite/gcc.c-torture/compile/921116-2.c ! 517704894b ./gcc/testsuite/gcc.c-torture/compile/921118-1.c ! 3811420781b ./gcc/testsuite/gcc.c-torture/compile/921126-1.c ! 3727547715b ./gcc/testsuite/gcc.c-torture/compile/921202-1.c ! 568945264b ./gcc/testsuite/gcc.c-torture/compile/921202-2.c ! 2130176572b ./gcc/testsuite/gcc.c-torture/compile/921203-1.c ! 492266852b ./gcc/testsuite/gcc.c-torture/compile/921203-2.c ! 855574805b ./gcc/testsuite/gcc.c-torture/compile/921206-1.c ! 2014683974b ./gcc/testsuite/gcc.c-torture/compile/921227-1.c ! 96957459b ./gcc/testsuite/gcc.c-torture/compile/930109-1.c ! 1189423329b ./gcc/testsuite/gcc.c-torture/compile/930109-2.c ! 1543922161b ./gcc/testsuite/gcc.c-torture/compile/930111-1.c ! 1357888911b ./gcc/testsuite/gcc.c-torture/compile/930117-1.c ! 2068061905b ./gcc/testsuite/gcc.c-torture/compile/930118-1.c ! 2900924058b ./gcc/testsuite/gcc.c-torture/compile/930120-1.c ! 4121817111b ./gcc/testsuite/gcc.c-torture/compile/930126-1.c ! 1532460815b ./gcc/testsuite/gcc.c-torture/compile/930210-1.c ! 3625302497b ./gcc/testsuite/gcc.c-torture/compile/930217-1.c ! 3938239975b ./gcc/testsuite/gcc.c-torture/compile/930222-1.c ! 1557388855b ./gcc/testsuite/gcc.c-torture/compile/930325-1.c ! 3378061921b ./gcc/testsuite/gcc.c-torture/compile/930326-1.c ! 3007351406b ./gcc/testsuite/gcc.c-torture/compile/930326-1.x ! 2931382100b ./gcc/testsuite/gcc.c-torture/compile/930411-1.c ! 3578370973b ./gcc/testsuite/gcc.c-torture/compile/930421-1.c ! 3734830625b ./gcc/testsuite/gcc.c-torture/compile/930427-2.c ! 3885379756b ./gcc/testsuite/gcc.c-torture/compile/930503-1.c ! 959725141b ./gcc/testsuite/gcc.c-torture/compile/930503-2.c ! 140786434b ./gcc/testsuite/gcc.c-torture/compile/930506-1.c ! 3305652641b ./gcc/testsuite/gcc.c-torture/compile/930506-2.c ! 1442644232b ./gcc/testsuite/gcc.c-torture/compile/930510-1.c ! 3993332569b ./gcc/testsuite/gcc.c-torture/compile/930513-1.c ! 2006581046b ./gcc/testsuite/gcc.c-torture/compile/930513-2.c ! 2698332239b ./gcc/testsuite/gcc.c-torture/compile/930513-3.c ! 90110464b ./gcc/testsuite/gcc.c-torture/compile/930523-1.c ! 2548234910b ./gcc/testsuite/gcc.c-torture/compile/930525-1.c ! 422873186b ./gcc/testsuite/gcc.c-torture/compile/930527-1.c ! 784172570b ./gcc/testsuite/gcc.c-torture/compile/930529-1.c ! 3569132715b ./gcc/testsuite/gcc.c-torture/compile/930530-1.c ! 3200160962b ./gcc/testsuite/gcc.c-torture/compile/930602-1.c ! 3142735794b ./gcc/testsuite/gcc.c-torture/compile/930603-1.c ! 1973176638b ./gcc/testsuite/gcc.c-torture/compile/930607-1.c ! 208901999b ./gcc/testsuite/gcc.c-torture/compile/930611-1.c ! 3976001091b ./gcc/testsuite/gcc.c-torture/compile/930618-1.c ! 583248042b ./gcc/testsuite/gcc.c-torture/compile/930621-1.c ! 3751666180b ./gcc/testsuite/gcc.c-torture/compile/930623-1.c ! 3714994986b ./gcc/testsuite/gcc.c-torture/compile/930702-1.c ! 3138367793b ./gcc/testsuite/gcc.c-torture/compile/930926-1.c ! 126934282b ./gcc/testsuite/gcc.c-torture/compile/930927-1.c ! 2046421038b ./gcc/testsuite/gcc.c-torture/compile/931003-1.c ! 2795307593b ./gcc/testsuite/gcc.c-torture/compile/931004-1.c ! 2248992767b ./gcc/testsuite/gcc.c-torture/compile/931013-1.c ! 554284027b ./gcc/testsuite/gcc.c-torture/compile/931013-2.c ! 1170847752b ./gcc/testsuite/gcc.c-torture/compile/931013-3.c ! 752631056b ./gcc/testsuite/gcc.c-torture/compile/931018-1.c ! 4120231716b ./gcc/testsuite/gcc.c-torture/compile/931031-1.c ! 2466554678b ./gcc/testsuite/gcc.c-torture/compile/931102-1.c ! 4193170992b ./gcc/testsuite/gcc.c-torture/compile/931102-2.c ! 3312404691b ./gcc/testsuite/gcc.c-torture/compile/931203-1.c ! 2144495581b ./gcc/testsuite/gcc.c-torture/compile/940611-1.c ! 2217967256b ./gcc/testsuite/gcc.c-torture/compile/940712-1.c ! 43398345b ./gcc/testsuite/gcc.c-torture/compile/940718-1.c ! 2813422857b ./gcc/testsuite/gcc.c-torture/compile/941014-1.c ! 714535983b ./gcc/testsuite/gcc.c-torture/compile/941014-2.c ! 236968493b ./gcc/testsuite/gcc.c-torture/compile/941014-3.c ! 772624016b ./gcc/testsuite/gcc.c-torture/compile/941014-4.c ! 2255123649b ./gcc/testsuite/gcc.c-torture/compile/941019-1.c ! 3482340577b ./gcc/testsuite/gcc.c-torture/compile/941111-1.c ! 4138121525b ./gcc/testsuite/gcc.c-torture/compile/941113-1.c ! 938329066b ./gcc/testsuite/gcc.c-torture/compile/950122-1.c ! 4155644724b ./gcc/testsuite/gcc.c-torture/compile/950124-1.c ! 3810294661b ./gcc/testsuite/gcc.c-torture/compile/950221-1.c ! 3460610209b ./gcc/testsuite/gcc.c-torture/compile/950329-1.c ! 3474584992b ./gcc/testsuite/gcc.c-torture/compile/950512-1.c ! 3344132126b ./gcc/testsuite/gcc.c-torture/compile/950530-1.c ! 1876592424b ./gcc/testsuite/gcc.c-torture/compile/950607-1.c ! 1023117358b ./gcc/testsuite/gcc.c-torture/compile/950610-1.c ! 2634556580b ./gcc/testsuite/gcc.c-torture/compile/950612-1.c ! 1196693335b ./gcc/testsuite/gcc.c-torture/compile/950613-1.c ! 447206228b ./gcc/testsuite/gcc.c-torture/compile/950618-1.c ! 267255638b ./gcc/testsuite/gcc.c-torture/compile/950719-1.c ! 3590503950b ./gcc/testsuite/gcc.c-torture/compile/950729-1.c ! 3836055170b ./gcc/testsuite/gcc.c-torture/compile/950816-1.c ! 2188937099b ./gcc/testsuite/gcc.c-torture/compile/950816-2.c ! 2634731147b ./gcc/testsuite/gcc.c-torture/compile/950816-3.c ! 2650686602b ./gcc/testsuite/gcc.c-torture/compile/950910-1.c ! 2979160187b ./gcc/testsuite/gcc.c-torture/compile/950919-1.c ! 3635621359b ./gcc/testsuite/gcc.c-torture/compile/950921-1.c ! 3500911374b ./gcc/testsuite/gcc.c-torture/compile/950922-1.c ! 2220749535b ./gcc/testsuite/gcc.c-torture/compile/951004-1.c ! 1578339532b ./gcc/testsuite/gcc.c-torture/compile/951106-1.c ! 459531698b ./gcc/testsuite/gcc.c-torture/compile/951116-1.c ! 2236702069b ./gcc/testsuite/gcc.c-torture/compile/951128-1.c ! 559124320b ./gcc/testsuite/gcc.c-torture/compile/951220-1.c ! 2931610069b ./gcc/testsuite/gcc.c-torture/compile/951222-1.c ! 834462352b ./gcc/testsuite/gcc.c-torture/compile/960106-1.c ! 2810957446b ./gcc/testsuite/gcc.c-torture/compile/960130-1.c ! 3942840130b ./gcc/testsuite/gcc.c-torture/compile/960201-1.c ! 1531419420b ./gcc/testsuite/gcc.c-torture/compile/960218-1.c ! 1748987127b ./gcc/testsuite/gcc.c-torture/compile/960220-1.c ! 4272797008b ./gcc/testsuite/gcc.c-torture/compile/960221-1.c ! 2932166589b ./gcc/testsuite/gcc.c-torture/compile/960319-1.c ! 1856173622b ./gcc/testsuite/gcc.c-torture/compile/960514-1.c ! 3435740171b ./gcc/testsuite/gcc.c-torture/compile/960704-1.c ! 2939040127b ./gcc/testsuite/gcc.c-torture/compile/960829-1.c ! 497475088b ./gcc/testsuite/gcc.c-torture/compile/961004-1.c ! 1946932829b ./gcc/testsuite/gcc.c-torture/compile/961010-1.c ! 304816181b ./gcc/testsuite/gcc.c-torture/compile/961019-1.c ! 2048507537b ./gcc/testsuite/gcc.c-torture/compile/961031-1.c ! 3079865887b ./gcc/testsuite/gcc.c-torture/compile/961126-1.c ! 1672232168b ./gcc/testsuite/gcc.c-torture/compile/961203-1.c ! 4037616572b ./gcc/testsuite/gcc.c-torture/compile/961203-1.x ! 3759439975b ./gcc/testsuite/gcc.c-torture/compile/970206-1.c ! 1182708149b ./gcc/testsuite/gcc.c-torture/compile/970214-1.c ! 3593522245b ./gcc/testsuite/gcc.c-torture/compile/980329-1.c ! 3672497829b ./gcc/testsuite/gcc.c-torture/compile/980408-1.c ! 2062728359b ./gcc/testsuite/gcc.c-torture/compile/980504-1.c ! 4232017618b ./gcc/testsuite/gcc.c-torture/compile/980506-1.c ! 4075622106b ./gcc/testsuite/gcc.c-torture/compile/980506-1.x ! 32528983b ./gcc/testsuite/gcc.c-torture/compile/980506-2.c ! 4270541716b ./gcc/testsuite/gcc.c-torture/compile/980511-1.c ! 3713274322b ./gcc/testsuite/gcc.c-torture/compile/980701-1.c ! 777674549b ./gcc/testsuite/gcc.c-torture/compile/980706-1.c ! 610537079b ./gcc/testsuite/gcc.c-torture/compile/980726-1.c ! 3564634914b ./gcc/testsuite/gcc.c-torture/compile/980729-1.c ! 1437208592b ./gcc/testsuite/gcc.c-torture/compile/980816-1.c ! 4262061714b ./gcc/testsuite/gcc.c-torture/compile/980821-1.c ! 411994094b ./gcc/testsuite/gcc.c-torture/compile/980825-1.c ! 84987168b ./gcc/testsuite/gcc.c-torture/compile/981001-1.c ! 3572428069b ./gcc/testsuite/gcc.c-torture/compile/981001-2.c ! 668832071b ./gcc/testsuite/gcc.c-torture/compile/981001-3.c ! 2581029790b ./gcc/testsuite/gcc.c-torture/compile/981001-4.c ! 2455813842b ./gcc/testsuite/gcc.c-torture/compile/981006-1.c ! 303831411b ./gcc/testsuite/gcc.c-torture/compile/981006-1.x ! 436023456b ./gcc/testsuite/gcc.c-torture/compile/981007-1.c ! 3644509388b ./gcc/testsuite/gcc.c-torture/compile/981022-1.c ! 2402428546b ./gcc/testsuite/gcc.c-torture/compile/981022-1.x ! 2312981402b ./gcc/testsuite/gcc.c-torture/compile/981107-1.c ! 1534948383b ./gcc/testsuite/gcc.c-torture/compile/981223-1.c ! 2200568070b ./gcc/testsuite/gcc.c-torture/compile/981223-1.x ! 4068323857b ./gcc/testsuite/gcc.c-torture/compile/990107-1.c ! 2146948130b ./gcc/testsuite/gcc.c-torture/compile/990117-1.c ! 569996007b ./gcc/testsuite/gcc.c-torture/compile/990203-1.c ! 415305492b ./gcc/testsuite/gcc.c-torture/compile/990517-1.c ! 3394640266b ./gcc/testsuite/gcc.c-torture/compile/990519-1.c ! 2791783349b ./gcc/testsuite/gcc.c-torture/compile/990523-1.c ! 3000844764b ./gcc/testsuite/gcc.c-torture/compile/990527-1.c ! 582106274b ./gcc/testsuite/gcc.c-torture/compile/990617-1.c ! 2322013805b ./gcc/testsuite/gcc.c-torture/compile/990617-1.x ! 492504629b ./gcc/testsuite/gcc.c-torture/compile/990625-1.c ! 884965957b ./gcc/testsuite/gcc.c-torture/compile/990625-2.c ! 4084131388b ./gcc/testsuite/gcc.c-torture/compile/990801-1.c ! 2266581816b ./gcc/testsuite/gcc.c-torture/compile/990801-2.c ! 3317513113b ./gcc/testsuite/gcc.c-torture/compile/990829-1.c ! 3956045070b ./gcc/testsuite/gcc.c-torture/compile/990913-1.c ! 3319682501b ./gcc/testsuite/gcc.c-torture/compile/990928-1.c ! 3933777529b ./gcc/testsuite/gcc.c-torture/compile/991008-1.c ! 2673675627b ./gcc/testsuite/gcc.c-torture/compile/991026-1.c ! 1674528994b ./gcc/testsuite/gcc.c-torture/compile/991026-2.c ! 4044514395b ./gcc/testsuite/gcc.c-torture/compile/991127-1.c ! 4090550720b ./gcc/testsuite/gcc.c-torture/compile/991202-1.c ! 2790904959b ./gcc/testsuite/gcc.c-torture/compile/991208-1.c ! 3320607847b ./gcc/testsuite/gcc.c-torture/compile/991213-1.c ! 337781771b ./gcc/testsuite/gcc.c-torture/compile/991213-2.c ! 2183919411b ./gcc/testsuite/gcc.c-torture/compile/991213-3.c ! 2401949194b ./gcc/testsuite/gcc.c-torture/compile/991214-1.c ! 490622457b ./gcc/testsuite/gcc.c-torture/compile/991214-2.c ! 4103871327b ./gcc/testsuite/gcc.c-torture/compile/991229-1.c ! 3992734927b ./gcc/testsuite/gcc.c-torture/compile/991229-2.c ! 4256185088b ./gcc/testsuite/gcc.c-torture/compile/991229-3.c ! 1572386559b ./gcc/testsuite/gcc.c-torture/compile/calls.c ! 2432910359b ./gcc/testsuite/gcc.c-torture/compile/cmpdi-1.c ! 614750703b ./gcc/testsuite/gcc.c-torture/compile/combine-hang.c ! 1983287936b ./gcc/testsuite/gcc.c-torture/compile/compile.exp ! 1794942657b ./gcc/testsuite/gcc.c-torture/compile/cpp-1.c ! 970559481b ./gcc/testsuite/gcc.c-torture/compile/cpp-2.c ! 1931627759b ./gcc/testsuite/gcc.c-torture/compile/dll.c ! 3830564423b ./gcc/testsuite/gcc.c-torture/compile/dll.x ! 3452765233b ./gcc/testsuite/gcc.c-torture/compile/funcptr-1.c ! 1935315878b ./gcc/testsuite/gcc.c-torture/compile/goto-1.c ! 1601988128b ./gcc/testsuite/gcc.c-torture/compile/iftrap-1.c ! 335811326b ./gcc/testsuite/gcc.c-torture/compile/iftrap-2.c ! 4225667120b ./gcc/testsuite/gcc.c-torture/compile/init-1.c ! 2861967846b ./gcc/testsuite/gcc.c-torture/compile/init-2.c ! 2669634792b ./gcc/testsuite/gcc.c-torture/compile/init-3.c ! 4126878501b ./gcc/testsuite/gcc.c-torture/compile/labels-1.c ! 2067585207b ./gcc/testsuite/gcc.c-torture/compile/labels-2.c ! 3607951474b ./gcc/testsuite/gcc.c-torture/compile/labels-3.c ! 709334018b ./gcc/testsuite/gcc.c-torture/compile/labels-3.x ! 1060389673b ./gcc/testsuite/gcc.c-torture/compile/packed-1.c ! 69389766b ./gcc/testsuite/gcc.c-torture/compile/structs.c ! 2677779184b ./gcc/testsuite/gcc.c-torture/compile/trunctfdf.c ! 3723113555b ./gcc/testsuite/gcc.c-torture/compile/widechar-1.c ! 2985433108b ./gcc/testsuite/gcc.c-torture/compile/zero-strct-1.c ! 1530761060b ./gcc/testsuite/gcc.c-torture/execute/20000112-1.c ! 2481066019b ./gcc/testsuite/gcc.c-torture/execute/20000113-1.c ! 1162771092b ./gcc/testsuite/gcc.c-torture/execute/20000121-1.c ! 2528273823b ./gcc/testsuite/gcc.c-torture/execute/20000205-1.c ! 1308437308b ./gcc/testsuite/gcc.c-torture/execute/20000217-1.c ! 778222354b ./gcc/testsuite/gcc.c-torture/execute/20000223-1.c ! 2810936145b ./gcc/testsuite/gcc.c-torture/execute/20000224-1.c ! 2859303587b ./gcc/testsuite/gcc.c-torture/execute/20000225-1.c ! 2200813341b ./gcc/testsuite/gcc.c-torture/execute/20000227-1.c ! 1085530082b ./gcc/testsuite/gcc.c-torture/execute/20000313-1.c ! 1558819196b ./gcc/testsuite/gcc.c-torture/execute/20000314-1.c ! 1363719296b ./gcc/testsuite/gcc.c-torture/execute/20000314-2.c ! 1833012317b ./gcc/testsuite/gcc.c-torture/execute/20000314-3.c ! 3834437988b ./gcc/testsuite/gcc.c-torture/execute/20000402-1.c ! 4060238122b ./gcc/testsuite/gcc.c-torture/execute/20000403-1.c ! 3672378029b ./gcc/testsuite/gcc.c-torture/execute/20000412-1.c ! 2857396630b ./gcc/testsuite/gcc.c-torture/execute/20000412-2.c ! 3640032771b ./gcc/testsuite/gcc.c-torture/execute/20000412-3.c ! 4233239850b ./gcc/testsuite/gcc.c-torture/execute/20000412-4.c ! 3642307617b ./gcc/testsuite/gcc.c-torture/execute/20000412-5.c ! 122352684b ./gcc/testsuite/gcc.c-torture/execute/20000412-6.c ! 939777600b ./gcc/testsuite/gcc.c-torture/execute/20000419-1.c ! 1445008654b ./gcc/testsuite/gcc.c-torture/execute/20000422-1.c ! 677800698b ./gcc/testsuite/gcc.c-torture/execute/20000503-1.c ! 531516808b ./gcc/testsuite/gcc.c-torture/execute/20000511-1.c ! 301599840b ./gcc/testsuite/gcc.c-torture/execute/20000519-1.c ! 2363078014b ./gcc/testsuite/gcc.c-torture/execute/20000519-2.c ! 2387696776b ./gcc/testsuite/gcc.c-torture/execute/20000523-1.c ! 185622639b ./gcc/testsuite/gcc.c-torture/execute/20000528-1.c ! 3522437520b ./gcc/testsuite/gcc.c-torture/execute/20000603-1.c ! 1679879990b ./gcc/testsuite/gcc.c-torture/execute/20000605-1.c ! 2664922764b ./gcc/testsuite/gcc.c-torture/execute/20000605-2.c ! 3650927220b ./gcc/testsuite/gcc.c-torture/execute/20000605-3.c ! 3450155788b ./gcc/testsuite/gcc.c-torture/execute/20000622-1.c ! 1183204743b ./gcc/testsuite/gcc.c-torture/execute/20000703-1.c ! 2031552411b ./gcc/testsuite/gcc.c-torture/execute/20000706-1.c ! 425477806b ./gcc/testsuite/gcc.c-torture/execute/20000706-2.c ! 690409016b ./gcc/testsuite/gcc.c-torture/execute/20000706-3.c ! 388840900b ./gcc/testsuite/gcc.c-torture/execute/20000706-4.c ! 3881852138b ./gcc/testsuite/gcc.c-torture/execute/20000706-5.c ! 4202259059b ./gcc/testsuite/gcc.c-torture/execute/20000707-1.c ! 444353142b ./gcc/testsuite/gcc.c-torture/execute/20000715-1.c ! 1455669777b ./gcc/testsuite/gcc.c-torture/execute/20000715-2.c ! 1355649270b ./gcc/testsuite/gcc.c-torture/execute/20000717-1.c ! 2506273608b ./gcc/testsuite/gcc.c-torture/execute/20000717-2.c ! 3729674446b ./gcc/testsuite/gcc.c-torture/execute/20000717-3.c ! 843831990b ./gcc/testsuite/gcc.c-torture/execute/20000717-4.c ! 3868604235b ./gcc/testsuite/gcc.c-torture/execute/20000717-5.c ! 3718377161b ./gcc/testsuite/gcc.c-torture/execute/20000722-1.c ! 1809610528b ./gcc/testsuite/gcc.c-torture/execute/20000726-1.c ! 3447416803b ./gcc/testsuite/gcc.c-torture/execute/20000731-1.c ! 1979644625b ./gcc/testsuite/gcc.c-torture/execute/20000731-2.c ! 622038460b ./gcc/testsuite/gcc.c-torture/execute/20000801-1.c ! 379050989b ./gcc/testsuite/gcc.c-torture/execute/20000801-2.c ! 1541984007b ./gcc/testsuite/gcc.c-torture/execute/20000801-3.c ! 2632039733b ./gcc/testsuite/gcc.c-torture/execute/20000801-4.c ! 3273221977b ./gcc/testsuite/gcc.c-torture/execute/20000808-1.c ! 3715226001b ./gcc/testsuite/gcc.c-torture/execute/20000815-1.c ! 2910084298b ./gcc/testsuite/gcc.c-torture/execute/20000818-1.c ! 3982907773b ./gcc/testsuite/gcc.c-torture/execute/20000819-1.c ! 806186932b ./gcc/testsuite/gcc.c-torture/execute/20000822-1.c ! 1842039169b ./gcc/testsuite/gcc.c-torture/execute/20000910-1.c ! 187331803b ./gcc/testsuite/gcc.c-torture/execute/20000910-2.c ! 2672323622b ./gcc/testsuite/gcc.c-torture/execute/20000914-1.c ! 3900394210b ./gcc/testsuite/gcc.c-torture/execute/20000917-1.c ! 3471632940b ./gcc/testsuite/gcc.c-torture/execute/20001009-1.c ! 1469841059b ./gcc/testsuite/gcc.c-torture/execute/20001009-2.c ! 1399364540b ./gcc/testsuite/gcc.c-torture/execute/20001011-1.c ! 1742992606b ./gcc/testsuite/gcc.c-torture/execute/20001013-1.c ! 4079653839b ./gcc/testsuite/gcc.c-torture/execute/20001017-1.c ! 915214225b ./gcc/testsuite/gcc.c-torture/execute/20001017-2.c ! 411820211b ./gcc/testsuite/gcc.c-torture/execute/20001024-1.c ! 4210982727b ./gcc/testsuite/gcc.c-torture/execute/20001026-1.c ! 2907247602b ./gcc/testsuite/gcc.c-torture/execute/20001027-1.c ! 731083799b ./gcc/testsuite/gcc.c-torture/execute/20001031-1.c ! 123108566b ./gcc/testsuite/gcc.c-torture/execute/20001101.c ! 3554851734b ./gcc/testsuite/gcc.c-torture/execute/20001108-1.c ! 696351685b ./gcc/testsuite/gcc.c-torture/execute/20001111-1.c ! 1813795050b ./gcc/testsuite/gcc.c-torture/execute/20001112-1.c ! 3234051961b ./gcc/testsuite/gcc.c-torture/execute/20001121-1.c ! 2035849840b ./gcc/testsuite/gcc.c-torture/execute/20001124-1.c ! 378727792b ./gcc/testsuite/gcc.c-torture/execute/20001130-1.c ! 1876645280b ./gcc/testsuite/gcc.c-torture/execute/20001130-2.c ! 3253069371b ./gcc/testsuite/gcc.c-torture/execute/20001203-1.c ! 2873524021b ./gcc/testsuite/gcc.c-torture/execute/20001203-2.c ! 315046176b ./gcc/testsuite/gcc.c-torture/execute/20001221-1.c ! 3430334061b ./gcc/testsuite/gcc.c-torture/execute/20001228-1.c ! 4145547631b ./gcc/testsuite/gcc.c-torture/execute/20001229-1.c ! 2867964338b ./gcc/testsuite/gcc.c-torture/execute/20010106-1.c ! 4104575350b ./gcc/testsuite/gcc.c-torture/execute/20010114-1.c ! 4274826155b ./gcc/testsuite/gcc.c-torture/execute/20010116-1.c ! 1853154998b ./gcc/testsuite/gcc.c-torture/execute/20010118-1.c ! 1273676691b ./gcc/testsuite/gcc.c-torture/execute/20010119-1.c ! 367104834b ./gcc/testsuite/gcc.c-torture/execute/20010122-1.c ! 2189672298b ./gcc/testsuite/gcc.c-torture/execute/20010122-1.x ! 2126355226b ./gcc/testsuite/gcc.c-torture/execute/20010123-1.c ! 2748204733b ./gcc/testsuite/gcc.c-torture/execute/20010124-1.c ! 962969845b ./gcc/testsuite/gcc.c-torture/execute/20010129-1.c ! 3261363423b ./gcc/testsuite/gcc.c-torture/execute/20010129-1.x ! 3208398809b ./gcc/testsuite/gcc.c-torture/execute/20010206-1.c ! 1778342214b ./gcc/testsuite/gcc.c-torture/execute/20010209-1.c ! 3579334795b ./gcc/testsuite/gcc.c-torture/execute/20010221-1.c ! 2457134781b ./gcc/testsuite/gcc.c-torture/execute/20010222-1.c ! 3606901851b ./gcc/testsuite/gcc.c-torture/execute/20010224-1.c ! 1780176502b ./gcc/testsuite/gcc.c-torture/execute/20010325-1.c ! 111828245b ./gcc/testsuite/gcc.c-torture/execute/20010329-1.c ! 4181677122b ./gcc/testsuite/gcc.c-torture/execute/20010403-1.c ! 1255405665b ./gcc/testsuite/gcc.c-torture/execute/20010409-1.c ! 2948781834b ./gcc/testsuite/gcc.c-torture/execute/20010422-1.c ! 3990119664b ./gcc/testsuite/gcc.c-torture/execute/20010518-1.c ! 3221966760b ./gcc/testsuite/gcc.c-torture/execute/20010518-2.c ! 4150058335b ./gcc/testsuite/gcc.c-torture/execute/20010520-1.c ! 3398306936b ./gcc/testsuite/gcc.c-torture/execute/20010604-1.c ! 1597970944b ./gcc/testsuite/gcc.c-torture/execute/20010605-1.c ! 2151082111b ./gcc/testsuite/gcc.c-torture/execute/20010605-2.c ! 2682131177b ./gcc/testsuite/gcc.c-torture/execute/20010711-1.c ! 873772836b ./gcc/testsuite/gcc.c-torture/execute/20010717-1.c ! 2673367189b ./gcc/testsuite/gcc.c-torture/execute/20010723-1.c ! 3978892519b ./gcc/testsuite/gcc.c-torture/execute/20010724-1.c ! 1723617799b ./gcc/testsuite/gcc.c-torture/execute/20010724-1.x ! 731866148b ./gcc/testsuite/gcc.c-torture/execute/20010904-1.c ! 731377342b ./gcc/testsuite/gcc.c-torture/execute/20010904-2.c ! 2522784842b ./gcc/testsuite/gcc.c-torture/execute/20010910-1.c ! 1182047103b ./gcc/testsuite/gcc.c-torture/execute/20010915-1.c ! 3737091006b ./gcc/testsuite/gcc.c-torture/execute/20010924-1.c ! 260325577b ./gcc/testsuite/gcc.c-torture/execute/20010925-1.c ! 4188355089b ./gcc/testsuite/gcc.c-torture/execute/20011008-3.c ! 2281713299b ./gcc/testsuite/gcc.c-torture/execute/20011019-1.c ! 2655569315b ./gcc/testsuite/gcc.c-torture/execute/20011024-1.c ! 1814584846b ./gcc/testsuite/gcc.c-torture/execute/20011109-1.c ! 1662612200b ./gcc/testsuite/gcc.c-torture/execute/20011109-2.c ! 2550685908b ./gcc/testsuite/gcc.c-torture/execute/20011113-1.c ! 172432599b ./gcc/testsuite/gcc.c-torture/execute/20011114-1.c ! 809814896b ./gcc/testsuite/gcc.c-torture/execute/20011115-1.c ! 4092518b ./gcc/testsuite/gcc.c-torture/execute/20011121-1.c ! 3502448934b ./gcc/testsuite/gcc.c-torture/execute/20011126-1.c ! 2732339842b ./gcc/testsuite/gcc.c-torture/execute/20011126-2.c ! 815133002b ./gcc/testsuite/gcc.c-torture/execute/20011128-1.c ! 241656074b ./gcc/testsuite/gcc.c-torture/execute/20011217-1.c ! 2277704872b ./gcc/testsuite/gcc.c-torture/execute/20011219-1.c ! 2006770303b ./gcc/testsuite/gcc.c-torture/execute/20011223-1.c ! 4135985164b ./gcc/testsuite/gcc.c-torture/execute/20020103-1.c ! 2284569670b ./gcc/testsuite/gcc.c-torture/execute/20020107-1.c ! 2382854982b ./gcc/testsuite/gcc.c-torture/execute/20020108-1.c ! 2848042033b ./gcc/testsuite/gcc.c-torture/execute/20020118-1.c ! 2653510244b ./gcc/testsuite/gcc.c-torture/execute/20020127-1.c ! 1739097481b ./gcc/testsuite/gcc.c-torture/execute/20020129-1.c ! 1264770028b ./gcc/testsuite/gcc.c-torture/execute/20020201-1.c ! 502375258b ./gcc/testsuite/gcc.c-torture/execute/20020206-1.c ! 3691690701b ./gcc/testsuite/gcc.c-torture/execute/20020206-2.c ! 4078405558b ./gcc/testsuite/gcc.c-torture/execute/20020213-1.c ! 125431111b ./gcc/testsuite/gcc.c-torture/execute/20020215-1.c ! 1599210871b ./gcc/testsuite/gcc.c-torture/execute/20020216-1.c ! 1360698555b ./gcc/testsuite/gcc.c-torture/execute/20020219-1.c ! 1656358954b ./gcc/testsuite/gcc.c-torture/execute/20020225-1.c ! 127051635b ./gcc/testsuite/gcc.c-torture/execute/20020227-1.c ! 2965337212b ./gcc/testsuite/gcc.c-torture/execute/20020227-1.x ! 1982547595b ./gcc/testsuite/gcc.c-torture/execute/20020307-1.c ! 1497258578b ./gcc/testsuite/gcc.c-torture/execute/20020307-2.c ! 3970771348b ./gcc/testsuite/gcc.c-torture/execute/20020307-2.x ! 2236973257b ./gcc/testsuite/gcc.c-torture/execute/20020314-1.c ! 3091941732b ./gcc/testsuite/gcc.c-torture/execute/20020320-1.c ! 3564527352b ./gcc/testsuite/gcc.c-torture/execute/20020321-1.c ! 577542360b ./gcc/testsuite/gcc.c-torture/execute/20020402-1.c ! 3290123747b ./gcc/testsuite/gcc.c-torture/execute/20020402-2.c ! 2122778375b ./gcc/testsuite/gcc.c-torture/execute/20020402-3.c ! 2806949247b ./gcc/testsuite/gcc.c-torture/execute/20020404-1.c ! 658725271b ./gcc/testsuite/gcc.c-torture/execute/20020406-1.c ! 1900879256b ./gcc/testsuite/gcc.c-torture/execute/20020411-1.c ! 2788774617b ./gcc/testsuite/gcc.c-torture/execute/20020413-1.c ! 2439380096b ./gcc/testsuite/gcc.c-torture/execute/20020418-1.c ! 49470659b ./gcc/testsuite/gcc.c-torture/execute/20020423-1.c ! 484359727b ./gcc/testsuite/gcc.c-torture/execute/20020503-1.c ! 1286592631b ./gcc/testsuite/gcc.c-torture/execute/20020529-1.c ! 2563139669b ./gcc/testsuite/gcc.c-torture/execute/20020611-1.c ! 2588225457b ./gcc/testsuite/gcc.c-torture/execute/20020614-1.c ! 2304661446b ./gcc/testsuite/gcc.c-torture/execute/20020615-1.c ! 1625459055b ./gcc/testsuite/gcc.c-torture/execute/20020619-1.c ! 2876236122b ./gcc/testsuite/gcc.c-torture/execute/20020716-1.c ! 1859138834b ./gcc/testsuite/gcc.c-torture/execute/20020805-1.c ! 492121497b ./gcc/testsuite/gcc.c-torture/execute/20020904-1.c ! 1275043517b ./gcc/testsuite/gcc.c-torture/execute/20021015-1.c ! 2849369814b ./gcc/testsuite/gcc.c-torture/execute/20021024-1.c ! 3361882342b ./gcc/testsuite/gcc.c-torture/execute/20021111-1.c ! 3834877290b ./gcc/testsuite/gcc.c-torture/execute/20021118-3.c ! 624734562b ./gcc/testsuite/gcc.c-torture/execute/20021219-1.c ! 2820909676b ./gcc/testsuite/gcc.c-torture/execute/20030109-1.c ! 855486154b ./gcc/testsuite/gcc.c-torture/execute/20030221-1.c ! 821090783b ./gcc/testsuite/gcc.c-torture/execute/20030224-2.c ! 4076291177b ./gcc/testsuite/gcc.c-torture/execute/20030307-1.c ! 2371585447b ./gcc/testsuite/gcc.c-torture/execute/20030313-1.c ! 2637074483b ./gcc/testsuite/gcc.c-torture/execute/20030316-1.c ! 37158978b ./gcc/testsuite/gcc.c-torture/execute/900409-1.c ! 1241514475b ./gcc/testsuite/gcc.c-torture/execute/920202-1.c ! 651529975b ./gcc/testsuite/gcc.c-torture/execute/920302-1.c ! 2196801137b ./gcc/testsuite/gcc.c-torture/execute/920409-1.c ! 1816933206b ./gcc/testsuite/gcc.c-torture/execute/920410-1.c ! 1957456510b ./gcc/testsuite/gcc.c-torture/execute/920411-1.c ! 1749111501b ./gcc/testsuite/gcc.c-torture/execute/920415-1.c ! 508706990b ./gcc/testsuite/gcc.c-torture/execute/920428-1.c ! 3878413130b ./gcc/testsuite/gcc.c-torture/execute/920428-2.c ! 4127832878b ./gcc/testsuite/gcc.c-torture/execute/920428-2.x ! 158200597b ./gcc/testsuite/gcc.c-torture/execute/920429-1.c ! 1826863267b ./gcc/testsuite/gcc.c-torture/execute/920501-1.c ! 4177429300b ./gcc/testsuite/gcc.c-torture/execute/920501-2.c ! 1351528020b ./gcc/testsuite/gcc.c-torture/execute/920501-3.c ! 700639089b ./gcc/testsuite/gcc.c-torture/execute/920501-4.c ! 798860387b ./gcc/testsuite/gcc.c-torture/execute/920501-5.c ! 4199344202b ./gcc/testsuite/gcc.c-torture/execute/920501-6.c ! 2006299034b ./gcc/testsuite/gcc.c-torture/execute/920501-7.c ! 4127832878b ./gcc/testsuite/gcc.c-torture/execute/920501-7.x ! 1420615555b ./gcc/testsuite/gcc.c-torture/execute/920501-8.c ! 1273235575b ./gcc/testsuite/gcc.c-torture/execute/920501-8.x ! 2227123057b ./gcc/testsuite/gcc.c-torture/execute/920501-9.c ! 3928484317b ./gcc/testsuite/gcc.c-torture/execute/920506-1.c ! 3897601778b ./gcc/testsuite/gcc.c-torture/execute/920520-1.c ! 4049662034b ./gcc/testsuite/gcc.c-torture/execute/920603-1.c ! 2593769598b ./gcc/testsuite/gcc.c-torture/execute/920604-1.c ! 2294544032b ./gcc/testsuite/gcc.c-torture/execute/920612-1.c ! 102881897b ./gcc/testsuite/gcc.c-torture/execute/920612-2.c ! 484477154b ./gcc/testsuite/gcc.c-torture/execute/920618-1.c ! 937300795b ./gcc/testsuite/gcc.c-torture/execute/920625-1.c ! 3030586241b ./gcc/testsuite/gcc.c-torture/execute/920710-1.c ! 3876529175b ./gcc/testsuite/gcc.c-torture/execute/920711-1.c ! 818049019b ./gcc/testsuite/gcc.c-torture/execute/920721-1.c ! 3191124720b ./gcc/testsuite/gcc.c-torture/execute/920721-2.c ! 3879255001b ./gcc/testsuite/gcc.c-torture/execute/920721-3.c ! 2852120360b ./gcc/testsuite/gcc.c-torture/execute/920721-4.c ! 792790044b ./gcc/testsuite/gcc.c-torture/execute/920726-1.c ! 2154603996b ./gcc/testsuite/gcc.c-torture/execute/920728-1.c ! 917858221b ./gcc/testsuite/gcc.c-torture/execute/920730-1.c ! 1400910240b ./gcc/testsuite/gcc.c-torture/execute/920730-1t.c ! 3331598307b ./gcc/testsuite/gcc.c-torture/execute/920730-1t.x ! 3574659813b ./gcc/testsuite/gcc.c-torture/execute/920731-1.c ! 1308229799b ./gcc/testsuite/gcc.c-torture/execute/920810-1.c ! 950989321b ./gcc/testsuite/gcc.c-torture/execute/920812-1.c ! 4187598456b ./gcc/testsuite/gcc.c-torture/execute/920829-1.c ! 559637020b ./gcc/testsuite/gcc.c-torture/execute/920908-1.c ! 2513627586b ./gcc/testsuite/gcc.c-torture/execute/920908-2.c ! 2499750871b ./gcc/testsuite/gcc.c-torture/execute/920909-1.c ! 714100171b ./gcc/testsuite/gcc.c-torture/execute/920922-1.c ! 2279537940b ./gcc/testsuite/gcc.c-torture/execute/920929-1.c ! 70714742b ./gcc/testsuite/gcc.c-torture/execute/921006-1.c ! 137444921b ./gcc/testsuite/gcc.c-torture/execute/921007-1.c ! 2897219149b ./gcc/testsuite/gcc.c-torture/execute/921013-1.c ! 1296914634b ./gcc/testsuite/gcc.c-torture/execute/921016-1.c ! 1596244093b ./gcc/testsuite/gcc.c-torture/execute/921017-1.c ! 4199584647b ./gcc/testsuite/gcc.c-torture/execute/921019-1.c ! 2431715965b ./gcc/testsuite/gcc.c-torture/execute/921019-2.c ! 3170380362b ./gcc/testsuite/gcc.c-torture/execute/921029-1.c ! 487195362b ./gcc/testsuite/gcc.c-torture/execute/921104-1.c ! 2352124020b ./gcc/testsuite/gcc.c-torture/execute/921110-1.c ! 207021478b ./gcc/testsuite/gcc.c-torture/execute/921112-1.c ! 283175496b ./gcc/testsuite/gcc.c-torture/execute/921113-1.c ! 2879836698b ./gcc/testsuite/gcc.c-torture/execute/921117-1.c ! 201436377b ./gcc/testsuite/gcc.c-torture/execute/921123-1.c ! 4236695419b ./gcc/testsuite/gcc.c-torture/execute/921123-2.c ! 316909011b ./gcc/testsuite/gcc.c-torture/execute/921124-1.c ! 3328444406b ./gcc/testsuite/gcc.c-torture/execute/921202-1.c ! 2280032251b ./gcc/testsuite/gcc.c-torture/execute/921202-2.c ! 1311000952b ./gcc/testsuite/gcc.c-torture/execute/921204-1.c ! 2949408934b ./gcc/testsuite/gcc.c-torture/execute/921207-1.c ! 870865911b ./gcc/testsuite/gcc.c-torture/execute/921208-1.c ! 2032495193b ./gcc/testsuite/gcc.c-torture/execute/921208-2.c ! 283353483b ./gcc/testsuite/gcc.c-torture/execute/921215-1.c ! 130096086b ./gcc/testsuite/gcc.c-torture/execute/921218-1.c ! 2115073235b ./gcc/testsuite/gcc.c-torture/execute/921218-2.c ! 3561999462b ./gcc/testsuite/gcc.c-torture/execute/930106-1.c ! 3160736499b ./gcc/testsuite/gcc.c-torture/execute/930111-1.c ! 4162371994b ./gcc/testsuite/gcc.c-torture/execute/930123-1.c ! 3265874780b ./gcc/testsuite/gcc.c-torture/execute/930126-1.c ! 2299871172b ./gcc/testsuite/gcc.c-torture/execute/930208-1.c ! 3144873997b ./gcc/testsuite/gcc.c-torture/execute/930406-1.c ! 3189774734b ./gcc/testsuite/gcc.c-torture/execute/930408-1.c ! 3400489427b ./gcc/testsuite/gcc.c-torture/execute/930429-1.c ! 2948158283b ./gcc/testsuite/gcc.c-torture/execute/930429-2.c ! 3905354169b ./gcc/testsuite/gcc.c-torture/execute/930513-1.c ! 1273235575b ./gcc/testsuite/gcc.c-torture/execute/930513-1.x ! 2524183853b ./gcc/testsuite/gcc.c-torture/execute/930513-2.c ! 2391753101b ./gcc/testsuite/gcc.c-torture/execute/930518-1.c ! 576031745b ./gcc/testsuite/gcc.c-torture/execute/930526-1.c ! 956415563b ./gcc/testsuite/gcc.c-torture/execute/930527-1.c ! 4026322841b ./gcc/testsuite/gcc.c-torture/execute/930529-1.c ! 2050475769b ./gcc/testsuite/gcc.c-torture/execute/930529-1.x ! 310850888b ./gcc/testsuite/gcc.c-torture/execute/930603-1.c ! 572652809b ./gcc/testsuite/gcc.c-torture/execute/930603-2.c ! 3452170691b ./gcc/testsuite/gcc.c-torture/execute/930603-3.c ! 352498879b ./gcc/testsuite/gcc.c-torture/execute/930608-1.c ! 2318312710b ./gcc/testsuite/gcc.c-torture/execute/930614-1.c ! 307026414b ./gcc/testsuite/gcc.c-torture/execute/930614-2.c ! 380017129b ./gcc/testsuite/gcc.c-torture/execute/930621-1.c ! 852093434b ./gcc/testsuite/gcc.c-torture/execute/930622-1.c ! 1010026580b ./gcc/testsuite/gcc.c-torture/execute/930622-2.c ! 2381515578b ./gcc/testsuite/gcc.c-torture/execute/930628-1.c ! 3968663339b ./gcc/testsuite/gcc.c-torture/execute/930630-1.c ! 1360276333b ./gcc/testsuite/gcc.c-torture/execute/930702-1.c ! 2690450552b ./gcc/testsuite/gcc.c-torture/execute/930713-1.c ! 3621302381b ./gcc/testsuite/gcc.c-torture/execute/930718-1.c ! 1853260970b ./gcc/testsuite/gcc.c-torture/execute/930719-1.c ! 2257054643b ./gcc/testsuite/gcc.c-torture/execute/930725-1.c ! 1877434408b ./gcc/testsuite/gcc.c-torture/execute/930818-1.c ! 1262159860b ./gcc/testsuite/gcc.c-torture/execute/930916-1.c ! 2667793229b ./gcc/testsuite/gcc.c-torture/execute/930921-1.c ! 2351038398b ./gcc/testsuite/gcc.c-torture/execute/930929-1.c ! 2863421839b ./gcc/testsuite/gcc.c-torture/execute/930930-1.c ! 557816592b ./gcc/testsuite/gcc.c-torture/execute/930930-2.c ! 2101614510b ./gcc/testsuite/gcc.c-torture/execute/931002-1.c ! 2742393702b ./gcc/testsuite/gcc.c-torture/execute/931004-1.c ! 1700898376b ./gcc/testsuite/gcc.c-torture/execute/931004-10.c ! 962417771b ./gcc/testsuite/gcc.c-torture/execute/931004-11.c ! 2700865821b ./gcc/testsuite/gcc.c-torture/execute/931004-12.c ! 3436458492b ./gcc/testsuite/gcc.c-torture/execute/931004-13.c ! 4127270352b ./gcc/testsuite/gcc.c-torture/execute/931004-14.c ! 346996272b ./gcc/testsuite/gcc.c-torture/execute/931004-2.c ! 1206221721b ./gcc/testsuite/gcc.c-torture/execute/931004-3.c ! 3166093368b ./gcc/testsuite/gcc.c-torture/execute/931004-4.c ! 1452916171b ./gcc/testsuite/gcc.c-torture/execute/931004-5.c ! 2022610295b ./gcc/testsuite/gcc.c-torture/execute/931004-6.c ! 2036744892b ./gcc/testsuite/gcc.c-torture/execute/931004-7.c ! 1586770276b ./gcc/testsuite/gcc.c-torture/execute/931004-8.c ! 3369996669b ./gcc/testsuite/gcc.c-torture/execute/931004-9.c ! 3731237663b ./gcc/testsuite/gcc.c-torture/execute/931005-1.c ! 3432311031b ./gcc/testsuite/gcc.c-torture/execute/931009-1.c ! 1834388885b ./gcc/testsuite/gcc.c-torture/execute/931012-1.c ! 2534034619b ./gcc/testsuite/gcc.c-torture/execute/931017-1.c ! 1949677962b ./gcc/testsuite/gcc.c-torture/execute/931018-1.c ! 3825241545b ./gcc/testsuite/gcc.c-torture/execute/931031-1.c ! 1877484625b ./gcc/testsuite/gcc.c-torture/execute/931102-1.c ! 3927915289b ./gcc/testsuite/gcc.c-torture/execute/931102-2.c ! 480430370b ./gcc/testsuite/gcc.c-torture/execute/931110-1.c ! 3822785940b ./gcc/testsuite/gcc.c-torture/execute/931110-2.c ! 967340546b ./gcc/testsuite/gcc.c-torture/execute/931208-1.c ! 2682740818b ./gcc/testsuite/gcc.c-torture/execute/931228-1.c ! 2017170797b ./gcc/testsuite/gcc.c-torture/execute/940115-1.c ! 82400069b ./gcc/testsuite/gcc.c-torture/execute/940122-1.c ! 4235476365b ./gcc/testsuite/gcc.c-torture/execute/941014-1.c ! 645804174b ./gcc/testsuite/gcc.c-torture/execute/941014-1.x ! 1977507646b ./gcc/testsuite/gcc.c-torture/execute/941014-2.c ! 310736147b ./gcc/testsuite/gcc.c-torture/execute/941015-1.c ! 1318043175b ./gcc/testsuite/gcc.c-torture/execute/941021-1.c ! 3185365004b ./gcc/testsuite/gcc.c-torture/execute/941025-1.c ! 678677907b ./gcc/testsuite/gcc.c-torture/execute/941031-1.c ! 3905782643b ./gcc/testsuite/gcc.c-torture/execute/941101-1.c ! 1810551831b ./gcc/testsuite/gcc.c-torture/execute/941110-1.c ! 3428057334b ./gcc/testsuite/gcc.c-torture/execute/941202-1.c ! 3908063718b ./gcc/testsuite/gcc.c-torture/execute/950221-1.c ! 1873160895b ./gcc/testsuite/gcc.c-torture/execute/950322-1.c ! 1672610716b ./gcc/testsuite/gcc.c-torture/execute/950426-1.c ! 3465653006b ./gcc/testsuite/gcc.c-torture/execute/950426-2.c ! 3696703975b ./gcc/testsuite/gcc.c-torture/execute/950503-1.c ! 1556250294b ./gcc/testsuite/gcc.c-torture/execute/950511-1.c ! 2857896870b ./gcc/testsuite/gcc.c-torture/execute/950512-1.c ! 114570668b ./gcc/testsuite/gcc.c-torture/execute/950605-1.c ! 2991280268b ./gcc/testsuite/gcc.c-torture/execute/950607-1.c ! 437837801b ./gcc/testsuite/gcc.c-torture/execute/950607-2.c ! 3950265298b ./gcc/testsuite/gcc.c-torture/execute/950612-1.c ! 1778400537b ./gcc/testsuite/gcc.c-torture/execute/950621-1.c ! 2070936302b ./gcc/testsuite/gcc.c-torture/execute/950628-1.c ! 3165536281b ./gcc/testsuite/gcc.c-torture/execute/950704-1.c ! 2486390814b ./gcc/testsuite/gcc.c-torture/execute/950706-1.c ! 1322454782b ./gcc/testsuite/gcc.c-torture/execute/950710-1.c ! 4241980915b ./gcc/testsuite/gcc.c-torture/execute/950714-1.c ! 3308590304b ./gcc/testsuite/gcc.c-torture/execute/950809-1.c ! 4154904713b ./gcc/testsuite/gcc.c-torture/execute/950906-1.c ! 1101166652b ./gcc/testsuite/gcc.c-torture/execute/950915-1.c ! 24392721b ./gcc/testsuite/gcc.c-torture/execute/950929-1.c ! 1234781098b ./gcc/testsuite/gcc.c-torture/execute/951003-1.c ! 3737612481b ./gcc/testsuite/gcc.c-torture/execute/951115-1.c ! 2658922424b ./gcc/testsuite/gcc.c-torture/execute/951204-1.c ! 3956410619b ./gcc/testsuite/gcc.c-torture/execute/960116-1.c ! 2093624467b ./gcc/testsuite/gcc.c-torture/execute/960117-1.c ! 1694357534b ./gcc/testsuite/gcc.c-torture/execute/960209-1.c ! 1952007331b ./gcc/testsuite/gcc.c-torture/execute/960215-1.c ! 60263952b ./gcc/testsuite/gcc.c-torture/execute/960218-1.c ! 1161569283b ./gcc/testsuite/gcc.c-torture/execute/960219-1.c ! 3429934900b ./gcc/testsuite/gcc.c-torture/execute/960301-1.c ! 160802950b ./gcc/testsuite/gcc.c-torture/execute/960302-1.c ! 2772979130b ./gcc/testsuite/gcc.c-torture/execute/960311-1.c ! 1259407124b ./gcc/testsuite/gcc.c-torture/execute/960311-2.c ! 3608527152b ./gcc/testsuite/gcc.c-torture/execute/960311-3.c ! 2087520542b ./gcc/testsuite/gcc.c-torture/execute/960312-1.c ! 1208600766b ./gcc/testsuite/gcc.c-torture/execute/960317-1.c ! 1889026562b ./gcc/testsuite/gcc.c-torture/execute/960321-1.c ! 271449701b ./gcc/testsuite/gcc.c-torture/execute/960326-1.c ! 2449729039b ./gcc/testsuite/gcc.c-torture/execute/960327-1.c ! 2463095434b ./gcc/testsuite/gcc.c-torture/execute/960402-1.c ! 3079720318b ./gcc/testsuite/gcc.c-torture/execute/960405-1.c ! 4251399269b ./gcc/testsuite/gcc.c-torture/execute/960416-1.c ! 2615797380b ./gcc/testsuite/gcc.c-torture/execute/960416-1.x ! 2014388579b ./gcc/testsuite/gcc.c-torture/execute/960419-1.c ! 235840907b ./gcc/testsuite/gcc.c-torture/execute/960419-2.c ! 4266479970b ./gcc/testsuite/gcc.c-torture/execute/960512-1.c ! 3785913788b ./gcc/testsuite/gcc.c-torture/execute/960513-1.c ! 488880971b ./gcc/testsuite/gcc.c-torture/execute/960521-1.c ! 2321951599b ./gcc/testsuite/gcc.c-torture/execute/960608-1.c ! 4052360482b ./gcc/testsuite/gcc.c-torture/execute/960801-1.c ! 2655742085b ./gcc/testsuite/gcc.c-torture/execute/960802-1.c ! 135771086b ./gcc/testsuite/gcc.c-torture/execute/960830-1.c ! 2582740546b ./gcc/testsuite/gcc.c-torture/execute/960909-1.c ! 1944495033b ./gcc/testsuite/gcc.c-torture/execute/961004-1.c ! 658313774b ./gcc/testsuite/gcc.c-torture/execute/961017-1.c ! 785421501b ./gcc/testsuite/gcc.c-torture/execute/961017-2.c ! 2852845535b ./gcc/testsuite/gcc.c-torture/execute/961026-1.c ! 2375210094b ./gcc/testsuite/gcc.c-torture/execute/961112-1.c ! 2553026408b ./gcc/testsuite/gcc.c-torture/execute/961122-1.c ! 2422282222b ./gcc/testsuite/gcc.c-torture/execute/961122-2.c ! 3575956796b ./gcc/testsuite/gcc.c-torture/execute/961125-1.c ! 577488172b ./gcc/testsuite/gcc.c-torture/execute/961206-1.c ! 1182447544b ./gcc/testsuite/gcc.c-torture/execute/961213-1.c ! 2704046666b ./gcc/testsuite/gcc.c-torture/execute/961223-1.c ! 1973936950b ./gcc/testsuite/gcc.c-torture/execute/970214-1.c ! 1571629264b ./gcc/testsuite/gcc.c-torture/execute/970214-2.c ! 167780433b ./gcc/testsuite/gcc.c-torture/execute/970217-1.c ! 2343108590b ./gcc/testsuite/gcc.c-torture/execute/970923-1.c ! 2894602056b ./gcc/testsuite/gcc.c-torture/execute/980205.c ! 4265139835b ./gcc/testsuite/gcc.c-torture/execute/980223.c ! 1143734080b ./gcc/testsuite/gcc.c-torture/execute/980424-1.c ! 3704443102b ./gcc/testsuite/gcc.c-torture/execute/980505-1.c ! 2419800133b ./gcc/testsuite/gcc.c-torture/execute/980505-2.c ! 1955794056b ./gcc/testsuite/gcc.c-torture/execute/980506-1.c ! 2173791379b ./gcc/testsuite/gcc.c-torture/execute/980506-2.c ! 492472793b ./gcc/testsuite/gcc.c-torture/execute/980506-3.c ! 3939060245b ./gcc/testsuite/gcc.c-torture/execute/980526-1.c ! 1183240780b ./gcc/testsuite/gcc.c-torture/execute/980526-2.c ! 798626284b ./gcc/testsuite/gcc.c-torture/execute/980526-3.c ! 686935511b ./gcc/testsuite/gcc.c-torture/execute/980602-1.c ! 148166585b ./gcc/testsuite/gcc.c-torture/execute/980602-2.c ! 2555041864b ./gcc/testsuite/gcc.c-torture/execute/980604-1.c ! 2921367481b ./gcc/testsuite/gcc.c-torture/execute/980605-1.c ! 327024946b ./gcc/testsuite/gcc.c-torture/execute/980608-1.c ! 636602589b ./gcc/testsuite/gcc.c-torture/execute/980612-1.c ! 1796014237b ./gcc/testsuite/gcc.c-torture/execute/980617-1.c ! 1416887007b ./gcc/testsuite/gcc.c-torture/execute/980618-1.c ! 3252251770b ./gcc/testsuite/gcc.c-torture/execute/980701-1.c ! 3843080992b ./gcc/testsuite/gcc.c-torture/execute/980707-1.c ! 3327976229b ./gcc/testsuite/gcc.c-torture/execute/980709-1.c ! 2346484511b ./gcc/testsuite/gcc.c-torture/execute/980709-1.x ! 1464453071b ./gcc/testsuite/gcc.c-torture/execute/980716-1.c ! 1144140014b ./gcc/testsuite/gcc.c-torture/execute/980929-1.c ! 2567595595b ./gcc/testsuite/gcc.c-torture/execute/981001-1.c ! 1496092063b ./gcc/testsuite/gcc.c-torture/execute/981019-1.c ! 1493534646b ./gcc/testsuite/gcc.c-torture/execute/981130-1.c ! 296945303b ./gcc/testsuite/gcc.c-torture/execute/981130-1.x ! 2098827021b ./gcc/testsuite/gcc.c-torture/execute/981206-1.c ! 785276758b ./gcc/testsuite/gcc.c-torture/execute/990106-1.c ! 1458926953b ./gcc/testsuite/gcc.c-torture/execute/990106-2.c ! 1443443587b ./gcc/testsuite/gcc.c-torture/execute/990117-1.c ! 98144727b ./gcc/testsuite/gcc.c-torture/execute/990127-1.c ! 4206968879b ./gcc/testsuite/gcc.c-torture/execute/990127-2.c ! 1805424399b ./gcc/testsuite/gcc.c-torture/execute/990128-1.c ! 1406479809b ./gcc/testsuite/gcc.c-torture/execute/990130-1.c ! 1075245403b ./gcc/testsuite/gcc.c-torture/execute/990208-1.c ! 1370072006b ./gcc/testsuite/gcc.c-torture/execute/990208-1.x ! 1910322968b ./gcc/testsuite/gcc.c-torture/execute/990211-1.c ! 2520747136b ./gcc/testsuite/gcc.c-torture/execute/990222-1.c ! 4167898413b ./gcc/testsuite/gcc.c-torture/execute/990324-1.c ! 1316369295b ./gcc/testsuite/gcc.c-torture/execute/990326-1.c ! 2237806705b ./gcc/testsuite/gcc.c-torture/execute/990404-1.c ! 3506652867b ./gcc/testsuite/gcc.c-torture/execute/990413-2.c ! 1028733236b ./gcc/testsuite/gcc.c-torture/execute/990413-2.x ! 533594278b ./gcc/testsuite/gcc.c-torture/execute/990513-1.c ! 2242042026b ./gcc/testsuite/gcc.c-torture/execute/990524-1.c ! 1608250007b ./gcc/testsuite/gcc.c-torture/execute/990525-1.c ! 1043856586b ./gcc/testsuite/gcc.c-torture/execute/990525-2.c ! 1233686917b ./gcc/testsuite/gcc.c-torture/execute/990527-1.c ! 1220250784b ./gcc/testsuite/gcc.c-torture/execute/990531-1.c ! 3289696997b ./gcc/testsuite/gcc.c-torture/execute/990604-1.c ! 80435005b ./gcc/testsuite/gcc.c-torture/execute/990628-1.c ! 2064588039b ./gcc/testsuite/gcc.c-torture/execute/990804-1.c ! 2063909199b ./gcc/testsuite/gcc.c-torture/execute/990811-1.c ! 1435922216b ./gcc/testsuite/gcc.c-torture/execute/990826-0.c ! 2369075067b ./gcc/testsuite/gcc.c-torture/execute/990826-0.x ! 3894203537b ./gcc/testsuite/gcc.c-torture/execute/990827-1.c ! 1924065387b ./gcc/testsuite/gcc.c-torture/execute/990829-1.c ! 3657724130b ./gcc/testsuite/gcc.c-torture/execute/990923-1.c ! 3037719587b ./gcc/testsuite/gcc.c-torture/execute/991014-1.c ! 340177342b ./gcc/testsuite/gcc.c-torture/execute/991016-1.c ! 2236305082b ./gcc/testsuite/gcc.c-torture/execute/991019-1.c ! 4202756321b ./gcc/testsuite/gcc.c-torture/execute/991023-1.c ! 1824884313b ./gcc/testsuite/gcc.c-torture/execute/991030-1.c ! 4138873239b ./gcc/testsuite/gcc.c-torture/execute/991112-1.c ! 2109536582b ./gcc/testsuite/gcc.c-torture/execute/991118-1.c ! 1316882767b ./gcc/testsuite/gcc.c-torture/execute/991201-1.c ! 2220300988b ./gcc/testsuite/gcc.c-torture/execute/991202-1.c ! 1285333003b ./gcc/testsuite/gcc.c-torture/execute/991202-2.c ! 2329096948b ./gcc/testsuite/gcc.c-torture/execute/991202-3.c ! 3117583172b ./gcc/testsuite/gcc.c-torture/execute/991216-1.c ! 4234986278b ./gcc/testsuite/gcc.c-torture/execute/991216-2.c ! 631159512b ./gcc/testsuite/gcc.c-torture/execute/991216-3.c ! 4137201305b ./gcc/testsuite/gcc.c-torture/execute/991216-4.c ! 882138391b ./gcc/testsuite/gcc.c-torture/execute/991221-1.c ! 2854457808b ./gcc/testsuite/gcc.c-torture/execute/991227-1.c ! 3688640862b ./gcc/testsuite/gcc.c-torture/execute/991228-1.c ! 3793831392b ./gcc/testsuite/gcc.c-torture/execute/align-1.c ! 4120792597b ./gcc/testsuite/gcc.c-torture/execute/align-2.c ! 1274835551b ./gcc/testsuite/gcc.c-torture/execute/alloca-1.c ! 3292072248b ./gcc/testsuite/gcc.c-torture/execute/anon-1.c ! 1605923399b ./gcc/testsuite/gcc.c-torture/execute/arith-1.c ! 343449147b ./gcc/testsuite/gcc.c-torture/execute/arith-rand.c ! 312869222b ./gcc/testsuite/gcc.c-torture/execute/ashldi-1.c ! 1327544364b ./gcc/testsuite/gcc.c-torture/execute/ashrdi-1.c ! 629391558b ./gcc/testsuite/gcc.c-torture/execute/bcp-1.c ! 2311291194b ./gcc/testsuite/gcc.c-torture/execute/bf-layout-1.c ! 2757361338b ./gcc/testsuite/gcc.c-torture/execute/bf-pack-1.c ! 3543906045b ./gcc/testsuite/gcc.c-torture/execute/bf-sign-1.c ! 1320697357b ./gcc/testsuite/gcc.c-torture/execute/bf-sign-2.c ! 323354359b ./gcc/testsuite/gcc.c-torture/execute/bf64-1.c ! 3097986350b ./gcc/testsuite/gcc.c-torture/execute/bf64-1.x ! 1331291117b ./gcc/testsuite/gcc.c-torture/execute/bitfld-1.c ! 3644699221b ./gcc/testsuite/gcc.c-torture/execute/bitfld-1.x ! 1684940093b ./gcc/testsuite/gcc.c-torture/execute/bitfld-2.c ! 4012339802b ./gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c ! 1673141587b ./gcc/testsuite/gcc.c-torture/execute/builtin-abs-1.c ! 2056736695b ./gcc/testsuite/gcc.c-torture/execute/builtin-abs-2.c ! 3097553545b ./gcc/testsuite/gcc.c-torture/execute/builtin-complex-1.c ! 1581619700b ./gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c ! 329340471b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c ! 397570715b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-2.c ! 1484227202b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-3.c ! 1934387710b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-4.c ! 2627312111b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-5.c ! 3741124173b ./gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-6.c ! 2250919883b ./gcc/testsuite/gcc.c-torture/execute/builtin-types-compatible-p.c ! 2177138525b ./gcc/testsuite/gcc.c-torture/execute/cbrt.c ! 2994579909b ./gcc/testsuite/gcc.c-torture/execute/cmpdi-1.c ! 3257252249b ./gcc/testsuite/gcc.c-torture/execute/cmpsi-1.c ! 3943123822b ./gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c ! 3449149566b ./gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c ! 760972136b ./gcc/testsuite/gcc.c-torture/execute/complex-1.c ! 3034158014b ./gcc/testsuite/gcc.c-torture/execute/complex-2.c ! 478689052b ./gcc/testsuite/gcc.c-torture/execute/complex-3.c ! 662396237b ./gcc/testsuite/gcc.c-torture/execute/complex-4.c ! 1022468052b ./gcc/testsuite/gcc.c-torture/execute/complex-5.c ! 3814081986b ./gcc/testsuite/gcc.c-torture/execute/complex-6.c ! 1079537985b ./gcc/testsuite/gcc.c-torture/execute/compndlit-1.c ! 4213843385b ./gcc/testsuite/gcc.c-torture/execute/conversion.c ! 1362123497b ./gcc/testsuite/gcc.c-torture/execute/cvt-1.c ! 732726874b ./gcc/testsuite/gcc.c-torture/execute/cvt-1.x ! 1037739064b ./gcc/testsuite/gcc.c-torture/execute/dbra-1.c ! 3567725587b ./gcc/testsuite/gcc.c-torture/execute/divconst-1.c ! 3321693440b ./gcc/testsuite/gcc.c-torture/execute/divconst-2.c ! 506840532b ./gcc/testsuite/gcc.c-torture/execute/divconst-3.c ! 2615797380b ./gcc/testsuite/gcc.c-torture/execute/divconst-3.x ! 2274689094b ./gcc/testsuite/gcc.c-torture/execute/divmod-1.c ! 1808173474b ./gcc/testsuite/gcc.c-torture/execute/eeprof-1.c ! 2216490291b ./gcc/testsuite/gcc.c-torture/execute/eeprof-1.x ! 1886321368b ./gcc/testsuite/gcc.c-torture/execute/enum-1.c ! 3916720934b ./gcc/testsuite/gcc.c-torture/execute/enum-2.c ! 2211348141b ./gcc/testsuite/gcc.c-torture/execute/execute.exp ! 1911697643b ./gcc/testsuite/gcc.c-torture/execute/extzvsi.c ! 155906334b ./gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c ! 1157816092b ./gcc/testsuite/gcc.c-torture/execute/gofast.c ! 3099798770b ./gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c ! 981656236b ./gcc/testsuite/gcc.c-torture/execute/ieee/20001122-1.c ! 2602526611b ./gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.c ! 3379104705b ./gcc/testsuite/gcc.c-torture/execute/ieee/20010226-1.c ! 372215662b ./gcc/testsuite/gcc.c-torture/execute/ieee/20011123-1.c ! 2046772610b ./gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.c ! 3673851898b ./gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.c ! 1813910189b ./gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c ! 73602629b ./gcc/testsuite/gcc.c-torture/execute/ieee/980619-1.c ! 1659512392b ./gcc/testsuite/gcc.c-torture/execute/ieee/980619-1.x ! 1948647907b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c ! 1935804586b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c ! 817625481b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c ! 3452570198b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.c ! 330892698b ./gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-5.c ! 4125344101b ./gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.c ! 1953413990b ./gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x ! 2299573411b ./gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ! 4017678214b ./gcc/testsuite/gcc.c-torture/execute/ieee/minuszero.c ! 3545392440b ./gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c ! 2290856575b ./gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.x ! 3203549249b ./gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c ! 545426428b ./gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c ! 2631912054b ./gcc/testsuite/gcc.c-torture/execute/ieee/rbug.x ! 287394580b ./gcc/testsuite/gcc.c-torture/execute/index-1.c ! 3728840213b ./gcc/testsuite/gcc.c-torture/execute/inst-check.c ! 2015511278b ./gcc/testsuite/gcc.c-torture/execute/int-compare.c ! 2503239574b ./gcc/testsuite/gcc.c-torture/execute/longlong.c ! 2701191371b ./gcc/testsuite/gcc.c-torture/execute/loop-1.c ! 3284814162b ./gcc/testsuite/gcc.c-torture/execute/loop-10.c ! 2766603756b ./gcc/testsuite/gcc.c-torture/execute/loop-11.c ! 3036735737b ./gcc/testsuite/gcc.c-torture/execute/loop-12.c ! 2537268960b ./gcc/testsuite/gcc.c-torture/execute/loop-14.c ! 995264748b ./gcc/testsuite/gcc.c-torture/execute/loop-15.c ! 869002341b ./gcc/testsuite/gcc.c-torture/execute/loop-2.c ! 3443893179b ./gcc/testsuite/gcc.c-torture/execute/loop-2b.c ! 153943550b ./gcc/testsuite/gcc.c-torture/execute/loop-2c.c ! 720145550b ./gcc/testsuite/gcc.c-torture/execute/loop-2d.c ! 2058046897b ./gcc/testsuite/gcc.c-torture/execute/loop-2e.c ! 722341433b ./gcc/testsuite/gcc.c-torture/execute/loop-2e.x ! 1291794748b ./gcc/testsuite/gcc.c-torture/execute/loop-2f.c ! 3280299116b ./gcc/testsuite/gcc.c-torture/execute/loop-2f.x ! 661111306b ./gcc/testsuite/gcc.c-torture/execute/loop-2g.c ! 3280299116b ./gcc/testsuite/gcc.c-torture/execute/loop-2g.x ! 3620613760b ./gcc/testsuite/gcc.c-torture/execute/loop-3.c ! 4068453712b ./gcc/testsuite/gcc.c-torture/execute/loop-3b.c ! 2778041526b ./gcc/testsuite/gcc.c-torture/execute/loop-3c.c ! 253629485b ./gcc/testsuite/gcc.c-torture/execute/loop-3c.x ! 3316778727b ./gcc/testsuite/gcc.c-torture/execute/loop-4.c ! 1791416082b ./gcc/testsuite/gcc.c-torture/execute/loop-4b.c ! 3541035036b ./gcc/testsuite/gcc.c-torture/execute/loop-5.c ! 4217961697b ./gcc/testsuite/gcc.c-torture/execute/loop-6.c ! 3649171232b ./gcc/testsuite/gcc.c-torture/execute/loop-7.c ! 3999194364b ./gcc/testsuite/gcc.c-torture/execute/loop-8.c ! 239440461b ./gcc/testsuite/gcc.c-torture/execute/loop-9.c ! 3308349321b ./gcc/testsuite/gcc.c-torture/execute/lshrdi-1.c ! 1655048971b ./gcc/testsuite/gcc.c-torture/execute/memcpy-1.c ! 1198957866b ./gcc/testsuite/gcc.c-torture/execute/memcpy-bi.c ! 2259057543b ./gcc/testsuite/gcc.c-torture/execute/memset-3.c ! 1146723390b ./gcc/testsuite/gcc.c-torture/execute/mod-1.c ! 462740811b ./gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c ! 843122257b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c ! 2875393797b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-2.c ! 3451120516b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-3.c ! 1193207968b ./gcc/testsuite/gcc.c-torture/execute/nestfunc-4.c ! 1347988605b ./gcc/testsuite/gcc.c-torture/execute/packed-1.c ! 3662025483b ./gcc/testsuite/gcc.c-torture/execute/packed-2.c ! 781350511b ./gcc/testsuite/gcc.c-torture/execute/pending-4.c ! 1246182987b ./gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c ! 146053249b ./gcc/testsuite/gcc.c-torture/execute/regstack-1.c ! 1827676873b ./gcc/testsuite/gcc.c-torture/execute/scope-1.c ! 990025742b ./gcc/testsuite/gcc.c-torture/execute/scope-2.c ! 3788353048b ./gcc/testsuite/gcc.c-torture/execute/shiftdi.c ! 1004975218b ./gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c ! 2726881848b ./gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c ! 2215607685b ./gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c ! 4127514660b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c ! 2567091361b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-2.c ! 3788900866b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-3.c ! 3787465303b ./gcc/testsuite/gcc.c-torture/execute/strct-pack-4.c ! 2204360040b ./gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.c ! 665194027b ./gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.x ! 3638595647b ./gcc/testsuite/gcc.c-torture/execute/strct-varg-1.c ! 2424749175b ./gcc/testsuite/gcc.c-torture/execute/strct-varg-1.x ! 3389618360b ./gcc/testsuite/gcc.c-torture/execute/string-opt-1.c ! 2004905304b ./gcc/testsuite/gcc.c-torture/execute/string-opt-10.c ! 1757228388b ./gcc/testsuite/gcc.c-torture/execute/string-opt-11.c ! 3269205009b ./gcc/testsuite/gcc.c-torture/execute/string-opt-12.c ! 1302429529b ./gcc/testsuite/gcc.c-torture/execute/string-opt-13.c ! 1984203373b ./gcc/testsuite/gcc.c-torture/execute/string-opt-14.c ! 206750096b ./gcc/testsuite/gcc.c-torture/execute/string-opt-15.c ! 2089995b ./gcc/testsuite/gcc.c-torture/execute/string-opt-16.c ! 2499130848b ./gcc/testsuite/gcc.c-torture/execute/string-opt-2.c ! 307949358b ./gcc/testsuite/gcc.c-torture/execute/string-opt-3.c ! 1473532603b ./gcc/testsuite/gcc.c-torture/execute/string-opt-4.c ! 2202340101b ./gcc/testsuite/gcc.c-torture/execute/string-opt-5.c ! 196339167b ./gcc/testsuite/gcc.c-torture/execute/string-opt-6.c ! 2437896034b ./gcc/testsuite/gcc.c-torture/execute/string-opt-7.c ! 524866461b ./gcc/testsuite/gcc.c-torture/execute/string-opt-8.c ! 2299025367b ./gcc/testsuite/gcc.c-torture/execute/string-opt-9.c ! 2234035225b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-1.c ! 1176467633b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c ! 2162338370b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-3.c ! 3372312182b ./gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c ! 1924491577b ./gcc/testsuite/gcc.c-torture/execute/struct-ret-1.c ! 2222062805b ./gcc/testsuite/gcc.c-torture/execute/struct-ret-2.c ! 2658407134b ./gcc/testsuite/gcc.c-torture/execute/tstdi-1.c ! 1760191623b ./gcc/testsuite/gcc.c-torture/execute/unroll-1.c ! 4100317579b ./gcc/testsuite/gcc.c-torture/execute/va-arg-1.c ! 150011334b ./gcc/testsuite/gcc.c-torture/execute/va-arg-10.c ! 1341755443b ./gcc/testsuite/gcc.c-torture/execute/va-arg-11.c ! 3741851708b ./gcc/testsuite/gcc.c-torture/execute/va-arg-12.c ! 2056576210b ./gcc/testsuite/gcc.c-torture/execute/va-arg-13.c ! 1501818131b ./gcc/testsuite/gcc.c-torture/execute/va-arg-14.c ! 625024539b ./gcc/testsuite/gcc.c-torture/execute/va-arg-15.c ! 905618458b ./gcc/testsuite/gcc.c-torture/execute/va-arg-15.x ! 1304294650b ./gcc/testsuite/gcc.c-torture/execute/va-arg-16.c ! 905618458b ./gcc/testsuite/gcc.c-torture/execute/va-arg-16.x ! 3654734537b ./gcc/testsuite/gcc.c-torture/execute/va-arg-17.c ! 905618458b ./gcc/testsuite/gcc.c-torture/execute/va-arg-17.x ! 2108289558b ./gcc/testsuite/gcc.c-torture/execute/va-arg-18.c ! 2682407156b ./gcc/testsuite/gcc.c-torture/execute/va-arg-19.c ! 3898927180b ./gcc/testsuite/gcc.c-torture/execute/va-arg-2.c ! 366376907b ./gcc/testsuite/gcc.c-torture/execute/va-arg-20.c ! 3416533370b ./gcc/testsuite/gcc.c-torture/execute/va-arg-21.c ! 1403664843b ./gcc/testsuite/gcc.c-torture/execute/va-arg-22.c ! 3316575978b ./gcc/testsuite/gcc.c-torture/execute/va-arg-3.c ! 2693536633b ./gcc/testsuite/gcc.c-torture/execute/va-arg-3.x ! 839866355b ./gcc/testsuite/gcc.c-torture/execute/va-arg-4.c ! 1210036672b ./gcc/testsuite/gcc.c-torture/execute/va-arg-5.c ! 365894168b ./gcc/testsuite/gcc.c-torture/execute/va-arg-6.c ! 3547378445b ./gcc/testsuite/gcc.c-torture/execute/va-arg-7.c ! 3028804389b ./gcc/testsuite/gcc.c-torture/execute/va-arg-8.c ! 2833151734b ./gcc/testsuite/gcc.c-torture/execute/va-arg-9.c ! 1911372417b ./gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c ! 529327846b ./gcc/testsuite/gcc.c-torture/execute/widechar-1.c ! 1902127658b ./gcc/testsuite/gcc.c-torture/execute/widechar-2.c ! 2556092488b ./gcc/testsuite/gcc.c-torture/execute/zerolen-1.c ! 4066787379b ./gcc/testsuite/gcc.c-torture/execute/zerolen-2.c ! 634421910b ./gcc/testsuite/gcc.c-torture/unsorted/386.c ! 2512826658b ./gcc/testsuite/gcc.c-torture/unsorted/86.c ! 1577087180b ./gcc/testsuite/gcc.c-torture/unsorted/BUG1.c ! 2930337150b ./gcc/testsuite/gcc.c-torture/unsorted/BUG11.c ! 645328736b ./gcc/testsuite/gcc.c-torture/unsorted/BUG12.c ! 3447791606b ./gcc/testsuite/gcc.c-torture/unsorted/BUG13.c ! 1345083343b ./gcc/testsuite/gcc.c-torture/unsorted/BUG16.c ! 2211699544b ./gcc/testsuite/gcc.c-torture/unsorted/BUG17.c ! 3824994911b ./gcc/testsuite/gcc.c-torture/unsorted/BUG18.c ! 3618943848b ./gcc/testsuite/gcc.c-torture/unsorted/BUG2.c ! 2177082003b ./gcc/testsuite/gcc.c-torture/unsorted/BUG21.c ! 1740665759b ./gcc/testsuite/gcc.c-torture/unsorted/BUG22.c ! 4075155387b ./gcc/testsuite/gcc.c-torture/unsorted/BUG23.c ! 3968893634b ./gcc/testsuite/gcc.c-torture/unsorted/BUG24.c ! 459689731b ./gcc/testsuite/gcc.c-torture/unsorted/BUG25.c ! 474328818b ./gcc/testsuite/gcc.c-torture/unsorted/BUG3.c ! 1462112702b ./gcc/testsuite/gcc.c-torture/unsorted/BUG4.c ! 3140531389b ./gcc/testsuite/gcc.c-torture/unsorted/BUG5.c ! 460917160b ./gcc/testsuite/gcc.c-torture/unsorted/BUG6.c ! 305442480b ./gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c ! 4088813022b ./gcc/testsuite/gcc.c-torture/unsorted/HIcmp.c ! 2060643608b ./gcc/testsuite/gcc.c-torture/unsorted/HIset.c ! 2603570420b ./gcc/testsuite/gcc.c-torture/unsorted/PYRBUG.c ! 839150718b ./gcc/testsuite/gcc.c-torture/unsorted/QIcmp.c ! 2111121086b ./gcc/testsuite/gcc.c-torture/unsorted/QIset.c ! 1791217871b ./gcc/testsuite/gcc.c-torture/unsorted/SFset.c ! 3855537843b ./gcc/testsuite/gcc.c-torture/unsorted/SIcmp.c ! 2010223878b ./gcc/testsuite/gcc.c-torture/unsorted/SIset.c ! 367886956b ./gcc/testsuite/gcc.c-torture/unsorted/UHIcmp.c ! 3380740291b ./gcc/testsuite/gcc.c-torture/unsorted/UQIcmp.c ! 3065994513b ./gcc/testsuite/gcc.c-torture/unsorted/USIcmp.c ! 51945996b ./gcc/testsuite/gcc.c-torture/unsorted/a.c ! 2687046562b ./gcc/testsuite/gcc.c-torture/unsorted/a1.c ! 3122819825b ./gcc/testsuite/gcc.c-torture/unsorted/a3.c ! 1430858172b ./gcc/testsuite/gcc.c-torture/unsorted/aa.c ! 1905897475b ./gcc/testsuite/gcc.c-torture/unsorted/aaa.c ! 2128951928b ./gcc/testsuite/gcc.c-torture/unsorted/abs.c ! 4087775597b ./gcc/testsuite/gcc.c-torture/unsorted/ac.c ! 4108214922b ./gcc/testsuite/gcc.c-torture/unsorted/acc.c ! 1561010997b ./gcc/testsuite/gcc.c-torture/unsorted/add.c ! 178238083b ./gcc/testsuite/gcc.c-torture/unsorted/add386.c ! 425148131b ./gcc/testsuite/gcc.c-torture/unsorted/addcc.c ! 1010727230b ./gcc/testsuite/gcc.c-torture/unsorted/andm.c ! 1804826393b ./gcc/testsuite/gcc.c-torture/unsorted/andmem.c ! 1939054464b ./gcc/testsuite/gcc.c-torture/unsorted/andn.c ! 958534456b ./gcc/testsuite/gcc.c-torture/unsorted/andok.c ! 4100679649b ./gcc/testsuite/gcc.c-torture/unsorted/andsi.c ! 1812217387b ./gcc/testsuite/gcc.c-torture/unsorted/andsparc.c ! 1261488553b ./gcc/testsuite/gcc.c-torture/unsorted/aos.c ! 3358660284b ./gcc/testsuite/gcc.c-torture/unsorted/arr.c ! 529589500b ./gcc/testsuite/gcc.c-torture/unsorted/as.c ! 2341774096b ./gcc/testsuite/gcc.c-torture/unsorted/ase.c ! 3604241750b ./gcc/testsuite/gcc.c-torture/unsorted/b.c ! 278197700b ./gcc/testsuite/gcc.c-torture/unsorted/b1.c ! 1838022421b ./gcc/testsuite/gcc.c-torture/unsorted/b2.c ! 1297638431b ./gcc/testsuite/gcc.c-torture/unsorted/b3.c ! 98906803b ./gcc/testsuite/gcc.c-torture/unsorted/b88.c ! 4166624962b ./gcc/testsuite/gcc.c-torture/unsorted/bad.c ! 909355576b ./gcc/testsuite/gcc.c-torture/unsorted/band.c ! 782217635b ./gcc/testsuite/gcc.c-torture/unsorted/bb0.c ! 104727600b ./gcc/testsuite/gcc.c-torture/unsorted/bb1.c ! 2113129899b ./gcc/testsuite/gcc.c-torture/unsorted/bbb.c ! 2670310529b ./gcc/testsuite/gcc.c-torture/unsorted/bc.c ! 3090384483b ./gcc/testsuite/gcc.c-torture/unsorted/bcopy.c ! 2685623920b ./gcc/testsuite/gcc.c-torture/unsorted/bf.c ! 1825505370b ./gcc/testsuite/gcc.c-torture/unsorted/bfins.c ! 3222678366b ./gcc/testsuite/gcc.c-torture/unsorted/bfx.c ! 1818008243b ./gcc/testsuite/gcc.c-torture/unsorted/bge.c ! 1169896684b ./gcc/testsuite/gcc.c-torture/unsorted/bit.c ! 4267772046b ./gcc/testsuite/gcc.c-torture/unsorted/bitf.c ! 1244917866b ./gcc/testsuite/gcc.c-torture/unsorted/bitw.c ! 3205164461b ./gcc/testsuite/gcc.c-torture/unsorted/blk.c ! 3879987638b ./gcc/testsuite/gcc.c-torture/unsorted/bt.c ! 3930520391b ./gcc/testsuite/gcc.c-torture/unsorted/bt386.c ! 2778832219b ./gcc/testsuite/gcc.c-torture/unsorted/bug.c ! 909529146b ./gcc/testsuite/gcc.c-torture/unsorted/bugc.c ! 3859987766b ./gcc/testsuite/gcc.c-torture/unsorted/buns.c ! 2981977682b ./gcc/testsuite/gcc.c-torture/unsorted/bx.c ! 3780608001b ./gcc/testsuite/gcc.c-torture/unsorted/c.c ! 3824196498b ./gcc/testsuite/gcc.c-torture/unsorted/c1.c ! 3656093116b ./gcc/testsuite/gcc.c-torture/unsorted/c2.c ! 3818633964b ./gcc/testsuite/gcc.c-torture/unsorted/call.c ! 3745915003b ./gcc/testsuite/gcc.c-torture/unsorted/call386.c ! 3496796739b ./gcc/testsuite/gcc.c-torture/unsorted/callind.c ! 162598922b ./gcc/testsuite/gcc.c-torture/unsorted/cc.c ! 2143288465b ./gcc/testsuite/gcc.c-torture/unsorted/charmtst.c ! 1855363258b ./gcc/testsuite/gcc.c-torture/unsorted/cmb.c ! 1285046858b ./gcc/testsuite/gcc.c-torture/unsorted/cmp.c ! 1423312127b ./gcc/testsuite/gcc.c-torture/unsorted/cmphi.c ! 2318993881b ./gcc/testsuite/gcc.c-torture/unsorted/cmpsi386.c ! 4235211728b ./gcc/testsuite/gcc.c-torture/unsorted/cmul.c ! 854170788b ./gcc/testsuite/gcc.c-torture/unsorted/cn1.c ! 935857365b ./gcc/testsuite/gcc.c-torture/unsorted/comb.c ! 1810135123b ./gcc/testsuite/gcc.c-torture/unsorted/consec.c ! 181790131b ./gcc/testsuite/gcc.c-torture/unsorted/const.c ! 2353636753b ./gcc/testsuite/gcc.c-torture/unsorted/conv.c ! 3252387675b ./gcc/testsuite/gcc.c-torture/unsorted/conv_tst.c ! 2280634062b ./gcc/testsuite/gcc.c-torture/unsorted/cp.c ! 1738381851b ./gcc/testsuite/gcc.c-torture/unsorted/csebug.c ! 1464956912b ./gcc/testsuite/gcc.c-torture/unsorted/cvt.c ! 3440041653b ./gcc/testsuite/gcc.c-torture/unsorted/d.c ! 3851183583b ./gcc/testsuite/gcc.c-torture/unsorted/dbl_parm.c ! 606535868b ./gcc/testsuite/gcc.c-torture/unsorted/dblbug.c ! 2925438011b ./gcc/testsuite/gcc.c-torture/unsorted/ddd.c ! 2791348449b ./gcc/testsuite/gcc.c-torture/unsorted/dead.c ! 609366019b ./gcc/testsuite/gcc.c-torture/unsorted/delay.c ! 3029371757b ./gcc/testsuite/gcc.c-torture/unsorted/di.c ! 420255576b ./gcc/testsuite/gcc.c-torture/unsorted/dic.c ! 716977667b ./gcc/testsuite/gcc.c-torture/unsorted/dilayout.c ! 1071957355b ./gcc/testsuite/gcc.c-torture/unsorted/dimove.c ! 163894537b ./gcc/testsuite/gcc.c-torture/unsorted/dimul.c ! 1962021495b ./gcc/testsuite/gcc.c-torture/unsorted/div.c ! 1911882561b ./gcc/testsuite/gcc.c-torture/unsorted/divdf.c ! 3643811739b ./gcc/testsuite/gcc.c-torture/unsorted/dm.c ! 3366321383b ./gcc/testsuite/gcc.c-torture/unsorted/dshift.c ! 691935419b ./gcc/testsuite/gcc.c-torture/unsorted/e.c ! 3422715387b ./gcc/testsuite/gcc.c-torture/unsorted/ex.c ! 3295431583b ./gcc/testsuite/gcc.c-torture/unsorted/ext.c ! 3418757365b ./gcc/testsuite/gcc.c-torture/unsorted/f1.c ! 1799287010b ./gcc/testsuite/gcc.c-torture/unsorted/f2.c ! 742887905b ./gcc/testsuite/gcc.c-torture/unsorted/fdmul.c ! 2705424580b ./gcc/testsuite/gcc.c-torture/unsorted/flo.c ! 3396096931b ./gcc/testsuite/gcc.c-torture/unsorted/float.c ! 1861286853b ./gcc/testsuite/gcc.c-torture/unsorted/flt_const.c ! 1778808555b ./gcc/testsuite/gcc.c-torture/unsorted/fnul.c ! 837581993b ./gcc/testsuite/gcc.c-torture/unsorted/foo.c ! 2603890884b ./gcc/testsuite/gcc.c-torture/unsorted/forgetcc.c ! 1311942689b ./gcc/testsuite/gcc.c-torture/unsorted/fq.c ! 2823794598b ./gcc/testsuite/gcc.c-torture/unsorted/g.c ! 4182806672b ./gcc/testsuite/gcc.c-torture/unsorted/gen_tst.c ! 440386278b ./gcc/testsuite/gcc.c-torture/unsorted/glob.c ! 2712797412b ./gcc/testsuite/gcc.c-torture/unsorted/gronk.c ! 2506280517b ./gcc/testsuite/gcc.c-torture/unsorted/hi.c ! 2912660272b ./gcc/testsuite/gcc.c-torture/unsorted/hibug.c ! 3171392500b ./gcc/testsuite/gcc.c-torture/unsorted/i++.c ! 1463391444b ./gcc/testsuite/gcc.c-torture/unsorted/i.c ! 1222319492b ./gcc/testsuite/gcc.c-torture/unsorted/ic.c ! 2244080969b ./gcc/testsuite/gcc.c-torture/unsorted/icmp.c ! 3544970343b ./gcc/testsuite/gcc.c-torture/unsorted/ifreg.c ! 1391595029b ./gcc/testsuite/gcc.c-torture/unsorted/imm.c ! 125065552b ./gcc/testsuite/gcc.c-torture/unsorted/isinf.c ! 3010843181b ./gcc/testsuite/gcc.c-torture/unsorted/jmp.c ! 2660706970b ./gcc/testsuite/gcc.c-torture/unsorted/jumptab.c ! 1238043529b ./gcc/testsuite/gcc.c-torture/unsorted/l.c ! 2953050089b ./gcc/testsuite/gcc.c-torture/unsorted/layout.c ! 3456840745b ./gcc/testsuite/gcc.c-torture/unsorted/lbug.c ! 2906412336b ./gcc/testsuite/gcc.c-torture/unsorted/ll1.c ! 2085462310b ./gcc/testsuite/gcc.c-torture/unsorted/llbug.c ! 1419215241b ./gcc/testsuite/gcc.c-torture/unsorted/lll.c ! 3825978026b ./gcc/testsuite/gcc.c-torture/unsorted/load8.c ! 791778479b ./gcc/testsuite/gcc.c-torture/unsorted/loadhicc.c ! 439371726b ./gcc/testsuite/gcc.c-torture/unsorted/log2.c ! 418270073b ./gcc/testsuite/gcc.c-torture/unsorted/logic.c ! 388000712b ./gcc/testsuite/gcc.c-torture/unsorted/loop-1.c ! 2317019693b ./gcc/testsuite/gcc.c-torture/unsorted/loop386.c ! 3780249238b ./gcc/testsuite/gcc.c-torture/unsorted/lop.c ! 3011092171b ./gcc/testsuite/gcc.c-torture/unsorted/m1.c ! 1664237855b ./gcc/testsuite/gcc.c-torture/unsorted/m2.c ! 836486950b ./gcc/testsuite/gcc.c-torture/unsorted/m5.c ! 1315431234b ./gcc/testsuite/gcc.c-torture/unsorted/m68.c ! 1140567438b ./gcc/testsuite/gcc.c-torture/unsorted/mbyte.c ! 1343630589b ./gcc/testsuite/gcc.c-torture/unsorted/mchar.c ! 1971867771b ./gcc/testsuite/gcc.c-torture/unsorted/mcmp.c ! 1050674918b ./gcc/testsuite/gcc.c-torture/unsorted/mdouble.c ! 3545288402b ./gcc/testsuite/gcc.c-torture/unsorted/memtst.c ! 1607208885b ./gcc/testsuite/gcc.c-torture/unsorted/miscomp.c ! 517599771b ./gcc/testsuite/gcc.c-torture/unsorted/mm.c ! 3498200377b ./gcc/testsuite/gcc.c-torture/unsorted/mod.c ! 852673854b ./gcc/testsuite/gcc.c-torture/unsorted/modcc.c ! 3290683845b ./gcc/testsuite/gcc.c-torture/unsorted/move.c ! 2934241414b ./gcc/testsuite/gcc.c-torture/unsorted/move_qhi.c ! 2156076426b ./gcc/testsuite/gcc.c-torture/unsorted/mregtst.c ! 2833441830b ./gcc/testsuite/gcc.c-torture/unsorted/msp.c ! 3686945259b ./gcc/testsuite/gcc.c-torture/unsorted/mtst.c ! 650788304b ./gcc/testsuite/gcc.c-torture/unsorted/mu.c ! 3210222105b ./gcc/testsuite/gcc.c-torture/unsorted/mul.c ! 3114106310b ./gcc/testsuite/gcc.c-torture/unsorted/mword.c ! 206884481b ./gcc/testsuite/gcc.c-torture/unsorted/mword1.c ! 1942143253b ./gcc/testsuite/gcc.c-torture/unsorted/n.c ! 1193753806b ./gcc/testsuite/gcc.c-torture/unsorted/n1.c ! 3021632957b ./gcc/testsuite/gcc.c-torture/unsorted/nand.c ! 1255157012b ./gcc/testsuite/gcc.c-torture/unsorted/neg.c ! 2666891841b ./gcc/testsuite/gcc.c-torture/unsorted/o.c ! 1641502386b ./gcc/testsuite/gcc.c-torture/unsorted/omit.c ! 2947983429b ./gcc/testsuite/gcc.c-torture/unsorted/opout.c ! 4144556375b ./gcc/testsuite/gcc.c-torture/unsorted/opt.c ! 1221510857b ./gcc/testsuite/gcc.c-torture/unsorted/or.c ! 2570634505b ./gcc/testsuite/gcc.c-torture/unsorted/or386.c ! 3299772143b ./gcc/testsuite/gcc.c-torture/unsorted/p.c ! 3498239118b ./gcc/testsuite/gcc.c-torture/unsorted/parms.c ! 4291861284b ./gcc/testsuite/gcc.c-torture/unsorted/pass.c ! 1371923458b ./gcc/testsuite/gcc.c-torture/unsorted/pmt.c ! 2511249387b ./gcc/testsuite/gcc.c-torture/unsorted/poor.c ! 745326023b ./gcc/testsuite/gcc.c-torture/unsorted/pp.c ! 1391345399b ./gcc/testsuite/gcc.c-torture/unsorted/pret-arg.c ! 697484600b ./gcc/testsuite/gcc.c-torture/unsorted/pyr.c ! 3407302768b ./gcc/testsuite/gcc.c-torture/unsorted/pyr2.c ! 1835488344b ./gcc/testsuite/gcc.c-torture/unsorted/q.c ! 1427595492b ./gcc/testsuite/gcc.c-torture/unsorted/r.c ! 4283361995b ./gcc/testsuite/gcc.c-torture/unsorted/r1.c ! 4078624014b ./gcc/testsuite/gcc.c-torture/unsorted/rel.c ! 3414105414b ./gcc/testsuite/gcc.c-torture/unsorted/rmsc.c ! 1012332947b ./gcc/testsuite/gcc.c-torture/unsorted/round.c ! 3178090569b ./gcc/testsuite/gcc.c-torture/unsorted/run.c ! 1744325584b ./gcc/testsuite/gcc.c-torture/unsorted/s.c ! 3862968210b ./gcc/testsuite/gcc.c-torture/unsorted/sar.c ! 4292026279b ./gcc/testsuite/gcc.c-torture/unsorted/sc.c ! 2416335748b ./gcc/testsuite/gcc.c-torture/unsorted/scal.c ! 1669731371b ./gcc/testsuite/gcc.c-torture/unsorted/scc.c ! 3073011184b ./gcc/testsuite/gcc.c-torture/unsorted/scond.c ! 4127283390b ./gcc/testsuite/gcc.c-torture/unsorted/selfrec.c ! 772856379b ./gcc/testsuite/gcc.c-torture/unsorted/seq.c ! 3595435741b ./gcc/testsuite/gcc.c-torture/unsorted/set386.c ! 772098437b ./gcc/testsuite/gcc.c-torture/unsorted/set88.c ! 1917728540b ./gcc/testsuite/gcc.c-torture/unsorted/sh.c ! 2510322715b ./gcc/testsuite/gcc.c-torture/unsorted/shand.c ! 369189446b ./gcc/testsuite/gcc.c-torture/unsorted/shft.c ! 786362264b ./gcc/testsuite/gcc.c-torture/unsorted/shift.c ! 1326810661b ./gcc/testsuite/gcc.c-torture/unsorted/shloop.c ! 1731774655b ./gcc/testsuite/gcc.c-torture/unsorted/shm.c ! 3333038544b ./gcc/testsuite/gcc.c-torture/unsorted/signext.c ! 3198420130b ./gcc/testsuite/gcc.c-torture/unsorted/signext2.c ! 1627754274b ./gcc/testsuite/gcc.c-torture/unsorted/sim.c ! 380795934b ./gcc/testsuite/gcc.c-torture/unsorted/simple.c ! 927966180b ./gcc/testsuite/gcc.c-torture/unsorted/sne.c ! 1732276088b ./gcc/testsuite/gcc.c-torture/unsorted/sound.c ! 1462108320b ./gcc/testsuite/gcc.c-torture/unsorted/sparcbug.c ! 680850660b ./gcc/testsuite/gcc.c-torture/unsorted/speed.c ! 1459712797b ./gcc/testsuite/gcc.c-torture/unsorted/stor.c ! 3521937419b ./gcc/testsuite/gcc.c-torture/unsorted/store0.c ! 429514643b ./gcc/testsuite/gcc.c-torture/unsorted/storecc.c ! 2367209182b ./gcc/testsuite/gcc.c-torture/unsorted/str.c ! 1212744014b ./gcc/testsuite/gcc.c-torture/unsorted/stru.c ! 2936891454b ./gcc/testsuite/gcc.c-torture/unsorted/structret.c ! 1723639277b ./gcc/testsuite/gcc.c-torture/unsorted/stuct.c ! 3579655725b ./gcc/testsuite/gcc.c-torture/unsorted/sub32.c ! 2225754564b ./gcc/testsuite/gcc.c-torture/unsorted/subcc.c ! 1610852268b ./gcc/testsuite/gcc.c-torture/unsorted/subcse.c ! 1291307272b ./gcc/testsuite/gcc.c-torture/unsorted/sym.c ! 319785041b ./gcc/testsuite/gcc.c-torture/unsorted/symconst.c ! 1215688317b ./gcc/testsuite/gcc.c-torture/unsorted/t.c ! 585245677b ./gcc/testsuite/gcc.c-torture/unsorted/test-flow.c ! 1417505636b ./gcc/testsuite/gcc.c-torture/unsorted/test-loop.c ! 3564367767b ./gcc/testsuite/gcc.c-torture/unsorted/test.c ! 1907124578b ./gcc/testsuite/gcc.c-torture/unsorted/time.c ! 316618822b ./gcc/testsuite/gcc.c-torture/unsorted/tmp.c ! 551299652b ./gcc/testsuite/gcc.c-torture/unsorted/trivial.c ! 54055479b ./gcc/testsuite/gcc.c-torture/unsorted/trunc.c ! 1458206113b ./gcc/testsuite/gcc.c-torture/unsorted/u.c ! 620556027b ./gcc/testsuite/gcc.c-torture/unsorted/udconvert.c ! 4030884798b ./gcc/testsuite/gcc.c-torture/unsorted/udivmod4.c ! 2240659922b ./gcc/testsuite/gcc.c-torture/unsorted/uns.c ! 4067751424b ./gcc/testsuite/gcc.c-torture/unsorted/uns_tst.c ! 434767322b ./gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ! 3061572007b ./gcc/testsuite/gcc.c-torture/unsorted/uuarg.c ! 339227429b ./gcc/testsuite/gcc.c-torture/unsorted/v.c ! 97022866b ./gcc/testsuite/gcc.c-torture/unsorted/w.c ! 502682554b ./gcc/testsuite/gcc.c-torture/unsorted/ww.c ! 2143513908b ./gcc/testsuite/gcc.c-torture/unsorted/x.c ! 1561412324b ./gcc/testsuite/gcc.c-torture/unsorted/xb.c ! 3522679530b ./gcc/testsuite/gcc.c-torture/unsorted/xbg.c ! 2513066849b ./gcc/testsuite/gcc.c-torture/unsorted/xc.c ! 3791802167b ./gcc/testsuite/gcc.c-torture/unsorted/xcsebug.c ! 753765877b ./gcc/testsuite/gcc.c-torture/unsorted/xdi.c ! 2449229476b ./gcc/testsuite/gcc.c-torture/unsorted/xfoo.c ! 1976729056b ./gcc/testsuite/gcc.c-torture/unsorted/xi.c ! 467677832b ./gcc/testsuite/gcc.c-torture/unsorted/xlop.c ! 2772134709b ./gcc/testsuite/gcc.c-torture/unsorted/xmtst.c ! 2887718336b ./gcc/testsuite/gcc.c-torture/unsorted/xneg.c ! 891585403b ./gcc/testsuite/gcc.c-torture/unsorted/xopt.c ! 3158383083b ./gcc/testsuite/gcc.c-torture/unsorted/xor.c ! 2275025612b ./gcc/testsuite/gcc.c-torture/unsorted/xorn.c ! 696616007b ./gcc/testsuite/gcc.c-torture/unsorted/xp.c ! 3369544877b ./gcc/testsuite/gcc.c-torture/unsorted/xpp.c ! 687461532b ./gcc/testsuite/gcc.c-torture/unsorted/xs.c ! 2453856793b ./gcc/testsuite/gcc.c-torture/unsorted/xsh.c ! 749676174b ./gcc/testsuite/gcc.c-torture/unsorted/xz.c ! 3236233174b ./gcc/testsuite/gcc.c-torture/unsorted/xzz.c ! 1020735670b ./gcc/testsuite/gcc.dg/20000108-1.c ! 289377156b ./gcc/testsuite/gcc.dg/20000111-1.c ! 441096099b ./gcc/testsuite/gcc.dg/20000609-1.c ! 843859427b ./gcc/testsuite/gcc.dg/20000614-1.c ! 984866335b ./gcc/testsuite/gcc.dg/20000614-2.c ! 2687914259b ./gcc/testsuite/gcc.dg/20000623-1.c ! 1697494088b ./gcc/testsuite/gcc.dg/20000629-1.c ! 2411171658b ./gcc/testsuite/gcc.dg/20000707-1.c ! 1242354775b ./gcc/testsuite/gcc.dg/20000715-1.c ! 2414727429b ./gcc/testsuite/gcc.dg/20000720-1.c ! 2628509241b ./gcc/testsuite/gcc.dg/20000724-1.c ! 855317863b ./gcc/testsuite/gcc.dg/20000807-1.c ! 2282190390b ./gcc/testsuite/gcc.dg/20000904-1.c ! 1205584698b ./gcc/testsuite/gcc.dg/20000906-1.c ! 2401733773b ./gcc/testsuite/gcc.dg/20000926-1.c ! 912559247b ./gcc/testsuite/gcc.dg/20001009-1.c ! 4235098888b ./gcc/testsuite/gcc.dg/20001012-1.c ! 3084023965b ./gcc/testsuite/gcc.dg/20001012-2.c ! 2504286200b ./gcc/testsuite/gcc.dg/20001013-1.c ! 989710521b ./gcc/testsuite/gcc.dg/20001023-1.c ! 2648600842b ./gcc/testsuite/gcc.dg/20001101-1.c ! 452608955b ./gcc/testsuite/gcc.dg/20001102-1.c ! 2644591049b ./gcc/testsuite/gcc.dg/20001108-1.c ! 3796315325b ./gcc/testsuite/gcc.dg/20001116-1.c ! 280677441b ./gcc/testsuite/gcc.dg/20001117-1.c ! 752060605b ./gcc/testsuite/gcc.dg/20001127-1.c ! 1243003570b ./gcc/testsuite/gcc.dg/20001201-1.c ! 1646064105b ./gcc/testsuite/gcc.dg/20001228-1.c ! 2498549558b ./gcc/testsuite/gcc.dg/20010202-1.c ! 2616951355b ./gcc/testsuite/gcc.dg/20010405-1.c ! 2545788691b ./gcc/testsuite/gcc.dg/20010423-1.c ! 3041407018b ./gcc/testsuite/gcc.dg/20010520-1.c ! 3520626317b ./gcc/testsuite/gcc.dg/20010622-1.c ! 2877988798b ./gcc/testsuite/gcc.dg/20010822-1.c ! 2149609410b ./gcc/testsuite/gcc.dg/20010912-1.c ! 2349250184b ./gcc/testsuite/gcc.dg/20011008-1.c ! 2932858639b ./gcc/testsuite/gcc.dg/20011008-2.c ! 2130390160b ./gcc/testsuite/gcc.dg/20011009-1.c ! 1094879191b ./gcc/testsuite/gcc.dg/20011015-1.c ! 3257749642b ./gcc/testsuite/gcc.dg/20011018-1.c ! 1920312928b ./gcc/testsuite/gcc.dg/20011021-1.c ! 707554340b ./gcc/testsuite/gcc.dg/20011029-2.c ! 1124303586b ./gcc/testsuite/gcc.dg/20011107-1.c ! 3977721072b ./gcc/testsuite/gcc.dg/20011113-1.c ! 43629702b ./gcc/testsuite/gcc.dg/20011119-1.c ! 1970395659b ./gcc/testsuite/gcc.dg/20011127-1.c ! 640681704b ./gcc/testsuite/gcc.dg/20011130-1.c ! 715751053b ./gcc/testsuite/gcc.dg/20011214-1.c ! 2394786434b ./gcc/testsuite/gcc.dg/20020103-1.c ! 2180708198b ./gcc/testsuite/gcc.dg/20020104-1.c ! 98244853b ./gcc/testsuite/gcc.dg/20020108-1.c ! 951724852b ./gcc/testsuite/gcc.dg/20020115-1.c ! 785896302b ./gcc/testsuite/gcc.dg/20020116-1.c ! 3842134030b ./gcc/testsuite/gcc.dg/20020116-2.c ! 4113077329b ./gcc/testsuite/gcc.dg/20020118-1.c ! 3751699275b ./gcc/testsuite/gcc.dg/20020122-1.c ! 150189901b ./gcc/testsuite/gcc.dg/20020122-2.c ! 57782331b ./gcc/testsuite/gcc.dg/20020122-3.c ! 2367653115b ./gcc/testsuite/gcc.dg/20020122-4.c ! 4139034769b ./gcc/testsuite/gcc.dg/20020201-1.c ! 205098899b ./gcc/testsuite/gcc.dg/20020201-2.c ! 821274050b ./gcc/testsuite/gcc.dg/20020201-3.c ! 2936802890b ./gcc/testsuite/gcc.dg/20020201-4.c ! 2531686627b ./gcc/testsuite/gcc.dg/20020206-1.c ! 756555090b ./gcc/testsuite/gcc.dg/20020210-1.c ! 3546737192b ./gcc/testsuite/gcc.dg/20020218-1.c ! 2855726391b ./gcc/testsuite/gcc.dg/20020219-1.c ! 794792782b ./gcc/testsuite/gcc.dg/20020220-1.c ! 1662033181b ./gcc/testsuite/gcc.dg/20020220-2.c ! 2954578455b ./gcc/testsuite/gcc.dg/20020222-1.c ! 2546434352b ./gcc/testsuite/gcc.dg/20020224-1.c ! 627755992b ./gcc/testsuite/gcc.dg/20020304-1.c ! 2738421039b ./gcc/testsuite/gcc.dg/20020310-1.c ! 767384458b ./gcc/testsuite/gcc.dg/20020312-1.c ! 1632668533b ./gcc/testsuite/gcc.dg/20020312-2.c ! 3842300935b ./gcc/testsuite/gcc.dg/20020313-1.c ! 663674028b ./gcc/testsuite/gcc.dg/20020319-1.c ! 3802202669b ./gcc/testsuite/gcc.dg/20020326-1.c ! 926713919b ./gcc/testsuite/gcc.dg/20020411-1.c ! 2767099233b ./gcc/testsuite/gcc.dg/20020415-1.c ! 2427264054b ./gcc/testsuite/gcc.dg/20020416-1.c ! 1785651312b ./gcc/testsuite/gcc.dg/20020418-1.c ! 1527728757b ./gcc/testsuite/gcc.dg/20020418-2.c ! 2088656022b ./gcc/testsuite/gcc.dg/20020426-1.c ! 4234050901b ./gcc/testsuite/gcc.dg/20020426-2.c ! 3359725112b ./gcc/testsuite/gcc.dg/20020430-1.c ! 2963915296b ./gcc/testsuite/gcc.dg/20020503-1.c ! 3667555097b ./gcc/testsuite/gcc.dg/20020517-1.c ! 536325431b ./gcc/testsuite/gcc.dg/20020523-1.c ! 1463174796b ./gcc/testsuite/gcc.dg/20020527-1.c ! 2086765142b ./gcc/testsuite/gcc.dg/20020530-1.c ! 1518490714b ./gcc/testsuite/gcc.dg/20020616-1.c ! 344810811b ./gcc/testsuite/gcc.dg/20021014-1.c ! 2919267b ./gcc/testsuite/gcc.dg/20030217-1.c ! 1045670620b ./gcc/testsuite/gcc.dg/20030225-1.c ! 11242163b ./gcc/testsuite/gcc.dg/20030309-1.c ! 3937697137b ./gcc/testsuite/gcc.dg/20030323-1.c ! 1058638767b ./gcc/testsuite/gcc.dg/20030414-1.c ! 1577979025b ./gcc/testsuite/gcc.dg/920413-1.c ! 2176221389b ./gcc/testsuite/gcc.dg/940409-1.c ! 1567764883b ./gcc/testsuite/gcc.dg/940510-1.c ! 1435563142b ./gcc/testsuite/gcc.dg/951130-1.c ! 1414883796b ./gcc/testsuite/gcc.dg/980211-1.c ! 1568764691b ./gcc/testsuite/gcc.dg/980217-1.c ! 474510323b ./gcc/testsuite/gcc.dg/980226-1.c ! 2630738251b ./gcc/testsuite/gcc.dg/980312-1.c ! 2097327868b ./gcc/testsuite/gcc.dg/980313-1.c ! 372605499b ./gcc/testsuite/gcc.dg/980414-1.c ! 1500377530b ./gcc/testsuite/gcc.dg/980502-1.c ! 1541851881b ./gcc/testsuite/gcc.dg/980520-1.c ! 1113123204b ./gcc/testsuite/gcc.dg/980523-1.c ! 2389539979b ./gcc/testsuite/gcc.dg/980526-1.c ! 384442948b ./gcc/testsuite/gcc.dg/980709-1.c ! 1276688993b ./gcc/testsuite/gcc.dg/980816-1.c ! 2659217655b ./gcc/testsuite/gcc.dg/980827-1.c ! 844249748b ./gcc/testsuite/gcc.dg/990117-1.c ! 3592792935b ./gcc/testsuite/gcc.dg/990130-1.c ! 2565768458b ./gcc/testsuite/gcc.dg/990213-1.c ! 2125486048b ./gcc/testsuite/gcc.dg/990213-2.c ! 318703178b ./gcc/testsuite/gcc.dg/990214-1.c ! 1614449588b ./gcc/testsuite/gcc.dg/990424-1.c ! 1324715064b ./gcc/testsuite/gcc.dg/990506-0.c ! 714032148b ./gcc/testsuite/gcc.dg/990524-1.c ! 3071468415b ./gcc/testsuite/gcc.dg/991129-1.c ! 156954019b ./gcc/testsuite/gcc.dg/991209-1.c ! 1980057279b ./gcc/testsuite/gcc.dg/991214-1.c ! 3370443605b ./gcc/testsuite/gcc.dg/991230-1.c ! 2426423235b ./gcc/testsuite/gcc.dg/README ! 943771070b ./gcc/testsuite/gcc.dg/Wconversion.c ! 3364645726b ./gcc/testsuite/gcc.dg/Wlarger-than.c ! 3791055151b ./gcc/testsuite/gcc.dg/Wparentheses-1.c ! 2809247827b ./gcc/testsuite/gcc.dg/Wreturn-type.c ! 3316229121b ./gcc/testsuite/gcc.dg/Wreturn-type2.c ! 3907876407b ./gcc/testsuite/gcc.dg/Wshadow-1.c ! 3928913400b ./gcc/testsuite/gcc.dg/Wswitch-2.c ! 49151727b ./gcc/testsuite/gcc.dg/Wswitch.c ! 2078992029b ./gcc/testsuite/gcc.dg/Wunknownprag.c ! 1674197654b ./gcc/testsuite/gcc.dg/Wunreachable-1.c ! 3581949676b ./gcc/testsuite/gcc.dg/Wunreachable-2.c ! 3936329118b ./gcc/testsuite/gcc.dg/altivec-1.c ! 79724433b ./gcc/testsuite/gcc.dg/altivec-2.c ! 967922284b ./gcc/testsuite/gcc.dg/altivec-3.c ! 93905551b ./gcc/testsuite/gcc.dg/altivec-4.c ! 1274871710b ./gcc/testsuite/gcc.dg/array-1.c ! 3861156036b ./gcc/testsuite/gcc.dg/array-2.c ! 1410330225b ./gcc/testsuite/gcc.dg/array-3.c ! 2440308460b ./gcc/testsuite/gcc.dg/array-4.c ! 2233987289b ./gcc/testsuite/gcc.dg/array-5.c ! 3636290766b ./gcc/testsuite/gcc.dg/array-6.c ! 2814093959b ./gcc/testsuite/gcc.dg/asm-1.c ! 3024001214b ./gcc/testsuite/gcc.dg/asm-2.c ! 2686162767b ./gcc/testsuite/gcc.dg/asm-3.c ! 339244874b ./gcc/testsuite/gcc.dg/asm-4.c ! 2673255882b ./gcc/testsuite/gcc.dg/asm-5.c ! 2560291160b ./gcc/testsuite/gcc.dg/asm-fs-1.c ! 1287172903b ./gcc/testsuite/gcc.dg/asm-names.c ! 1099611642b ./gcc/testsuite/gcc.dg/asmreg-1.c ! 2801105283b ./gcc/testsuite/gcc.dg/attr-alwaysinline.c ! 1514674985b ./gcc/testsuite/gcc.dg/attr-invalid.c ! 1915283314b ./gcc/testsuite/gcc.dg/attr-nest.c ! 2689909602b ./gcc/testsuite/gcc.dg/attr-noinline.c ! 745375068b ./gcc/testsuite/gcc.dg/attr-used.c ! 3155000092b ./gcc/testsuite/gcc.dg/bconstp-1.c ! 15751103b ./gcc/testsuite/gcc.dg/bf-spl1.c ! 1274634279b ./gcc/testsuite/gcc.dg/bitfld-1.c ! 865608720b ./gcc/testsuite/gcc.dg/bitfld-2.c ! 2003841110b ./gcc/testsuite/gcc.dg/bitfld-3.c ! 1594168367b ./gcc/testsuite/gcc.dg/builtin-choose-expr.c ! 2462561678b ./gcc/testsuite/gcc.dg/builtin-prefetch-1.c ! 2243816200b ./gcc/testsuite/gcc.dg/c90-array-lval-1.c ! 2768106060b ./gcc/testsuite/gcc.dg/c90-array-lval-2.c ! 4098525451b ./gcc/testsuite/gcc.dg/c90-array-lval-3.c ! 3655088604b ./gcc/testsuite/gcc.dg/c90-array-lval-4.c ! 1572913366b ./gcc/testsuite/gcc.dg/c90-array-lval-5.c ! 3153387113b ./gcc/testsuite/gcc.dg/c90-arraydecl-1.c ! 4018159207b ./gcc/testsuite/gcc.dg/c90-complex-1.c ! 3681535923b ./gcc/testsuite/gcc.dg/c90-complit-1.c ! 1705314837b ./gcc/testsuite/gcc.dg/c90-const-expr-1.c ! 78994009b ./gcc/testsuite/gcc.dg/c90-const-expr-2.c ! 822031417b ./gcc/testsuite/gcc.dg/c90-const-expr-3.c ! 4085555442b ./gcc/testsuite/gcc.dg/c90-digraph-1.c ! 3599184840b ./gcc/testsuite/gcc.dg/c90-enum-comma-1.c ! 2306764382b ./gcc/testsuite/gcc.dg/c90-float-1.c ! 566533628b ./gcc/testsuite/gcc.dg/c90-fordecl-1.c ! 1928391037b ./gcc/testsuite/gcc.dg/c90-hexfloat-1.c ! 4124256667b ./gcc/testsuite/gcc.dg/c90-hexfloat-2.c ! 2581693818b ./gcc/testsuite/gcc.dg/c90-idem-qual-1.c ! 1581289258b ./gcc/testsuite/gcc.dg/c90-impl-decl-1.c ! 440307834b ./gcc/testsuite/gcc.dg/c90-impl-int-1.c ! 2344767678b ./gcc/testsuite/gcc.dg/c90-impl-int-2.c ! 970479166b ./gcc/testsuite/gcc.dg/c90-init-1.c ! 2729946148b ./gcc/testsuite/gcc.dg/c90-intconst-1.c ! 3559700294b ./gcc/testsuite/gcc.dg/c90-longlong-1.c ! 3728641939b ./gcc/testsuite/gcc.dg/c90-mixdecl-1.c ! 2576806337b ./gcc/testsuite/gcc.dg/c90-restrict-1.c ! 3688680206b ./gcc/testsuite/gcc.dg/c90-return-1.c ! 1775037086b ./gcc/testsuite/gcc.dg/c90-scope-1.c ! 3958618876b ./gcc/testsuite/gcc.dg/c94-digraph-1.c ! 1553286096b ./gcc/testsuite/gcc.dg/c99-array-lval-1.c ! 695388665b ./gcc/testsuite/gcc.dg/c99-array-lval-2.c ! 533861407b ./gcc/testsuite/gcc.dg/c99-array-lval-3.c ! 2215212813b ./gcc/testsuite/gcc.dg/c99-array-lval-4.c ! 3070583409b ./gcc/testsuite/gcc.dg/c99-array-lval-5.c ! 1817213908b ./gcc/testsuite/gcc.dg/c99-array-nonobj-1.c ! 815267755b ./gcc/testsuite/gcc.dg/c99-arraydecl-1.c ! 1951407439b ./gcc/testsuite/gcc.dg/c99-bool-1.c ! 2269932988b ./gcc/testsuite/gcc.dg/c99-complex-1.c ! 820370146b ./gcc/testsuite/gcc.dg/c99-complex-2.c ! 3348642281b ./gcc/testsuite/gcc.dg/c99-complit-1.c ! 2252128544b ./gcc/testsuite/gcc.dg/c99-complit-2.c ! 1355429032b ./gcc/testsuite/gcc.dg/c99-condexpr-1.c ! 1666861367b ./gcc/testsuite/gcc.dg/c99-const-expr-1.c ! 1567288443b ./gcc/testsuite/gcc.dg/c99-const-expr-2.c ! 1530464516b ./gcc/testsuite/gcc.dg/c99-const-expr-3.c ! 1067407398b ./gcc/testsuite/gcc.dg/c99-digraph-1.c ! 436400556b ./gcc/testsuite/gcc.dg/c99-enum-comma-1.c ! 3680360076b ./gcc/testsuite/gcc.dg/c99-flex-array-1.c ! 1133393573b ./gcc/testsuite/gcc.dg/c99-flex-array-2.c ! 4185875504b ./gcc/testsuite/gcc.dg/c99-float-1.c ! 553627065b ./gcc/testsuite/gcc.dg/c99-fordecl-1.c ! 561068221b ./gcc/testsuite/gcc.dg/c99-fordecl-2.c ! 2859208293b ./gcc/testsuite/gcc.dg/c99-func-1.c ! 1694776826b ./gcc/testsuite/gcc.dg/c99-func-2.c ! 2857481018b ./gcc/testsuite/gcc.dg/c99-func-3.c ! 3824254533b ./gcc/testsuite/gcc.dg/c99-func-4.c ! 403500133b ./gcc/testsuite/gcc.dg/c99-hexfloat-1.c ! 442351990b ./gcc/testsuite/gcc.dg/c99-hexfloat-2.c ! 1046797268b ./gcc/testsuite/gcc.dg/c99-idem-qual-1.c ! 1293044648b ./gcc/testsuite/gcc.dg/c99-impl-decl-1.c ! 818104690b ./gcc/testsuite/gcc.dg/c99-impl-int-1.c ! 2312236475b ./gcc/testsuite/gcc.dg/c99-impl-int-2.c ! 829207642b ./gcc/testsuite/gcc.dg/c99-init-1.c ! 938647013b ./gcc/testsuite/gcc.dg/c99-init-2.c ! 3578360837b ./gcc/testsuite/gcc.dg/c99-intconst-1.c ! 336478880b ./gcc/testsuite/gcc.dg/c99-longlong-1.c ! 2179124750b ./gcc/testsuite/gcc.dg/c99-main-1.c ! 1603510892b ./gcc/testsuite/gcc.dg/c99-mixdecl-1.c ! 2789813637b ./gcc/testsuite/gcc.dg/c99-restrict-1.c ! 1090698500b ./gcc/testsuite/gcc.dg/c99-return-1.c ! 1305485104b ./gcc/testsuite/gcc.dg/c99-scope-1.c ! 328628580b ./gcc/testsuite/gcc.dg/c99-scope-2.c ! 1500087630b ./gcc/testsuite/gcc.dg/c99-tag-1.c ! 3333661125b ./gcc/testsuite/gcc.dg/cast-qual-1.c ! 1853040812b ./gcc/testsuite/gcc.dg/cast-qual-2.c ! 3509657813b ./gcc/testsuite/gcc.dg/clobbers.c ! 3796475762b ./gcc/testsuite/gcc.dg/compare1.c ! 280070085b ./gcc/testsuite/gcc.dg/compare2.c ! 1929905505b ./gcc/testsuite/gcc.dg/compare3.c ! 4172088563b ./gcc/testsuite/gcc.dg/compare4.c ! 2873193357b ./gcc/testsuite/gcc.dg/compare5.c ! 2818358019b ./gcc/testsuite/gcc.dg/complete-port.c ! 2444556566b ./gcc/testsuite/gcc.dg/concat.c ! 872352985b ./gcc/testsuite/gcc.dg/conv-1.c ! 2296607049b ./gcc/testsuite/gcc.dg/cpp/19921210-1.c ! 446012754b ./gcc/testsuite/gcc.dg/cpp/19930510-1.c ! 3035400854b ./gcc/testsuite/gcc.dg/cpp/19940712-1.c ! 3911462043b ./gcc/testsuite/gcc.dg/cpp/19940712-1.h ! 1310331126b ./gcc/testsuite/gcc.dg/cpp/19940712-1a.h ! 1255987496b ./gcc/testsuite/gcc.dg/cpp/19940712-1b.h ! 3107147397b ./gcc/testsuite/gcc.dg/cpp/19951025-1.c ! 1152006619b ./gcc/testsuite/gcc.dg/cpp/19951227-1.c ! 3844252401b ./gcc/testsuite/gcc.dg/cpp/19960224-1.c ! 2681484848b ./gcc/testsuite/gcc.dg/cpp/19990119-1.c ! 152529314b ./gcc/testsuite/gcc.dg/cpp/19990228-1.c ! 2850976318b ./gcc/testsuite/gcc.dg/cpp/19990407-1.c ! 1821165639b ./gcc/testsuite/gcc.dg/cpp/19990409-1.c ! 3140711711b ./gcc/testsuite/gcc.dg/cpp/19990413-1.c ! 3962958732b ./gcc/testsuite/gcc.dg/cpp/20000127-1.c ! 2271984635b ./gcc/testsuite/gcc.dg/cpp/20000129-1.c ! 2675766007b ./gcc/testsuite/gcc.dg/cpp/20000207-1.c ! 4123239500b ./gcc/testsuite/gcc.dg/cpp/20000207-2.c ! 4036437808b ./gcc/testsuite/gcc.dg/cpp/20000209-1.c ! 1472416455b ./gcc/testsuite/gcc.dg/cpp/20000209-2.c ! 2174334870b ./gcc/testsuite/gcc.dg/cpp/20000301-1.c ! 1872528864b ./gcc/testsuite/gcc.dg/cpp/20000419-1.c ! 2720098340b ./gcc/testsuite/gcc.dg/cpp/20000519-1.c ! 96666994b ./gcc/testsuite/gcc.dg/cpp/20000529-1.c ! 1226501171b ./gcc/testsuite/gcc.dg/cpp/20000625-1.c ! 2192746957b ./gcc/testsuite/gcc.dg/cpp/20000625-2.c ! 3024473110b ./gcc/testsuite/gcc.dg/cpp/20000627-1.c ! 3176910360b ./gcc/testsuite/gcc.dg/cpp/20000628-1.c ! 302522843b ./gcc/testsuite/gcc.dg/cpp/20000628-1.h ! 1252878971b ./gcc/testsuite/gcc.dg/cpp/20000628-1a.h ! 3939185973b ./gcc/testsuite/gcc.dg/cpp/20000725-1.c ! 1092019739b ./gcc/testsuite/gcc.dg/cpp/20020927-1.c ! 1685485063b ./gcc/testsuite/gcc.dg/cpp/Wtrigraphs.c ! 3534493797b ./gcc/testsuite/gcc.dg/cpp/_Pragma1.c ! 4186091043b ./gcc/testsuite/gcc.dg/cpp/_Pragma2.c ! 1230813557b ./gcc/testsuite/gcc.dg/cpp/_Pragma3.c ! 3384939096b ./gcc/testsuite/gcc.dg/cpp/_Pragma4.c ! 678120078b ./gcc/testsuite/gcc.dg/cpp/_Pragma5.c ! 3918751425b ./gcc/testsuite/gcc.dg/cpp/assembl2.S ! 2829543114b ./gcc/testsuite/gcc.dg/cpp/assembler.S ! 2692554582b ./gcc/testsuite/gcc.dg/cpp/assert1.c ! 3542126362b ./gcc/testsuite/gcc.dg/cpp/assert2.c ! 1282180884b ./gcc/testsuite/gcc.dg/cpp/assert3.c ! 2600163266b ./gcc/testsuite/gcc.dg/cpp/assert_trad1.c ! 4035026457b ./gcc/testsuite/gcc.dg/cpp/assert_trad2.c ! 1560406171b ./gcc/testsuite/gcc.dg/cpp/assert_trad3.c ! 1134445732b ./gcc/testsuite/gcc.dg/cpp/avoidpaste1.c ! 1804955265b ./gcc/testsuite/gcc.dg/cpp/avoidpaste2.c ! 2909138544b ./gcc/testsuite/gcc.dg/cpp/backslash.c ! 1837306227b ./gcc/testsuite/gcc.dg/cpp/backslash2.c ! 2939353970b ./gcc/testsuite/gcc.dg/cpp/c++98-pedantic.c ! 1689064567b ./gcc/testsuite/gcc.dg/cpp/c++98.c ! 3749407486b ./gcc/testsuite/gcc.dg/cpp/c89-pedantic.c ! 1769035451b ./gcc/testsuite/gcc.dg/cpp/c89.c ! 1510840104b ./gcc/testsuite/gcc.dg/cpp/c94-pedantic.c ! 925335145b ./gcc/testsuite/gcc.dg/cpp/c94.c ! 3306050866b ./gcc/testsuite/gcc.dg/cpp/c99-pedantic.c ! 3857361837b ./gcc/testsuite/gcc.dg/cpp/c99.c ! 3516322832b ./gcc/testsuite/gcc.dg/cpp/charconst-2.c ! 796483159b ./gcc/testsuite/gcc.dg/cpp/charconst.c ! 3355056256b ./gcc/testsuite/gcc.dg/cpp/cmdlne-C.c ! 1491584113b ./gcc/testsuite/gcc.dg/cpp/cmdlne-C2.c ! 2953736128b ./gcc/testsuite/gcc.dg/cpp/cmdlne-P.c ! 1600174935b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dD-M.c ! 609905807b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dD-dM.c ! 2496993356b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dD.c ! 3705836802b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.c ! 3088209084b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dI-M.h ! 932524367b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dM-M.c ! 1101687822b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dM-dD.c ! 1486055617b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dM.c ! 553926808b ./gcc/testsuite/gcc.dg/cpp/cmdlne-dN-M.c ! 2647411665b ./gcc/testsuite/gcc.dg/cpp/cpp.exp ! 3494213157b ./gcc/testsuite/gcc.dg/cpp/cxxcom1.c ! 3135164554b ./gcc/testsuite/gcc.dg/cpp/cxxcom2.c ! 2496170433b ./gcc/testsuite/gcc.dg/cpp/defined.c ! 3663773136b ./gcc/testsuite/gcc.dg/cpp/defined_trad.c ! 1438288565b ./gcc/testsuite/gcc.dg/cpp/digraph1.c ! 1288261895b ./gcc/testsuite/gcc.dg/cpp/digraph2.c ! 2068680422b ./gcc/testsuite/gcc.dg/cpp/digraphs.c ! 2630139647b ./gcc/testsuite/gcc.dg/cpp/direct2.c ! 2843065740b ./gcc/testsuite/gcc.dg/cpp/direct2s.c ! 3290053048b ./gcc/testsuite/gcc.dg/cpp/directiv.c ! 3129493545b ./gcc/testsuite/gcc.dg/cpp/endif.c ! 3479505545b ./gcc/testsuite/gcc.dg/cpp/endif.h ! 2483248350b ./gcc/testsuite/gcc.dg/cpp/escape-1.c ! 1730195871b ./gcc/testsuite/gcc.dg/cpp/escape-2.c ! 3767981014b ./gcc/testsuite/gcc.dg/cpp/escape.c ! 2697913940b ./gcc/testsuite/gcc.dg/cpp/extratokens.c ! 905736b ./gcc/testsuite/gcc.dg/cpp/fpreprocessed.c ! 836196340b ./gcc/testsuite/gcc.dg/cpp/gnuc89-pedantic.c ! 3280737784b ./gcc/testsuite/gcc.dg/cpp/gnuc89.c ! 1601787549b ./gcc/testsuite/gcc.dg/cpp/gnuc99-pedantic.c ! 1263189585b ./gcc/testsuite/gcc.dg/cpp/gnuc99.c ! 4214308249b ./gcc/testsuite/gcc.dg/cpp/hash1.c ! 1903615326b ./gcc/testsuite/gcc.dg/cpp/hash2.c ! 2366342564b ./gcc/testsuite/gcc.dg/cpp/ident.c ! 1133669485b ./gcc/testsuite/gcc.dg/cpp/if-1.c ! 3352628668b ./gcc/testsuite/gcc.dg/cpp/if-2.c ! 1439970428b ./gcc/testsuite/gcc.dg/cpp/if-3.c ! 489101197b ./gcc/testsuite/gcc.dg/cpp/if-4.c ! 882715641b ./gcc/testsuite/gcc.dg/cpp/if-5.c ! 3507076303b ./gcc/testsuite/gcc.dg/cpp/if-cexp.c ! 2728498877b ./gcc/testsuite/gcc.dg/cpp/if-mop.c ! 1281382817b ./gcc/testsuite/gcc.dg/cpp/if-mpar.c ! 3079188871b ./gcc/testsuite/gcc.dg/cpp/if-oppr.c ! 1490350403b ./gcc/testsuite/gcc.dg/cpp/if-paren.c ! 3952218044b ./gcc/testsuite/gcc.dg/cpp/if-sc.c ! 2598999845b ./gcc/testsuite/gcc.dg/cpp/if-shift.c ! 3593199515b ./gcc/testsuite/gcc.dg/cpp/if-unary.c ! 2159210260b ./gcc/testsuite/gcc.dg/cpp/include1.c ! 2421188667b ./gcc/testsuite/gcc.dg/cpp/include2.c ! 104604027b ./gcc/testsuite/gcc.dg/cpp/lexident.c ! 2395885746b ./gcc/testsuite/gcc.dg/cpp/lexnum.c ! 3213919551b ./gcc/testsuite/gcc.dg/cpp/lexstrng.c ! 3897829843b ./gcc/testsuite/gcc.dg/cpp/line1.c ! 100687188b ./gcc/testsuite/gcc.dg/cpp/line2.c ! 567370415b ./gcc/testsuite/gcc.dg/cpp/line3.c ! 1626475943b ./gcc/testsuite/gcc.dg/cpp/line4.c ! 4294705052b ./gcc/testsuite/gcc.dg/cpp/line5.c ! 271504116b ./gcc/testsuite/gcc.dg/cpp/macro1.c ! 1379729851b ./gcc/testsuite/gcc.dg/cpp/macro10.c ! 3340222164b ./gcc/testsuite/gcc.dg/cpp/macro11.c ! 4270051746b ./gcc/testsuite/gcc.dg/cpp/macro2.c ! 2969168869b ./gcc/testsuite/gcc.dg/cpp/macro3.c ! 1188431715b ./gcc/testsuite/gcc.dg/cpp/macro4.c ! 1628527586b ./gcc/testsuite/gcc.dg/cpp/macro5.c ! 2368380713b ./gcc/testsuite/gcc.dg/cpp/macro6.c ! 2072551274b ./gcc/testsuite/gcc.dg/cpp/macro7.c ! 613805223b ./gcc/testsuite/gcc.dg/cpp/macro8.c ! 2926705982b ./gcc/testsuite/gcc.dg/cpp/macro9.c ! 5175037b ./gcc/testsuite/gcc.dg/cpp/macsyntx.c ! 3610840456b ./gcc/testsuite/gcc.dg/cpp/mi1.c ! 419074706b ./gcc/testsuite/gcc.dg/cpp/mi1c.h ! 4261701187b ./gcc/testsuite/gcc.dg/cpp/mi1cc.h ! 3904566528b ./gcc/testsuite/gcc.dg/cpp/mi1nd.h ! 3410643645b ./gcc/testsuite/gcc.dg/cpp/mi1ndp.h ! 2792742846b ./gcc/testsuite/gcc.dg/cpp/mi1x.h ! 2949078889b ./gcc/testsuite/gcc.dg/cpp/mi2.c ! 2971656236b ./gcc/testsuite/gcc.dg/cpp/mi2a.h ! 2249557715b ./gcc/testsuite/gcc.dg/cpp/mi2b.h ! 975601727b ./gcc/testsuite/gcc.dg/cpp/mi2c.h ! 1340631459b ./gcc/testsuite/gcc.dg/cpp/mi3.c ! 3410155219b ./gcc/testsuite/gcc.dg/cpp/mi3.def ! 1784999780b ./gcc/testsuite/gcc.dg/cpp/mi3.h ! 3722098684b ./gcc/testsuite/gcc.dg/cpp/mi4.c ! 1150462829b ./gcc/testsuite/gcc.dg/cpp/mi5.c ! 1142195235b ./gcc/testsuite/gcc.dg/cpp/mi6.c ! 1358227252b ./gcc/testsuite/gcc.dg/cpp/mi6a.h ! 641332290b ./gcc/testsuite/gcc.dg/cpp/mi6b.h ! 4070915278b ./gcc/testsuite/gcc.dg/cpp/mi6c.h ! 1337479900b ./gcc/testsuite/gcc.dg/cpp/mi6d.h ! 509977090b ./gcc/testsuite/gcc.dg/cpp/mi6e.h ! 68499164b ./gcc/testsuite/gcc.dg/cpp/multiline.c ! 3165908728b ./gcc/testsuite/gcc.dg/cpp/paste1.c ! 2266859121b ./gcc/testsuite/gcc.dg/cpp/paste10.c ! 4285709590b ./gcc/testsuite/gcc.dg/cpp/paste11.c ! 3149837578b ./gcc/testsuite/gcc.dg/cpp/paste12.c ! 1864172813b ./gcc/testsuite/gcc.dg/cpp/paste2.c ! 3026273649b ./gcc/testsuite/gcc.dg/cpp/paste3.c ! 872474116b ./gcc/testsuite/gcc.dg/cpp/paste4.c ! 4196513421b ./gcc/testsuite/gcc.dg/cpp/paste5.c ! 3141633537b ./gcc/testsuite/gcc.dg/cpp/paste6.c ! 2441365564b ./gcc/testsuite/gcc.dg/cpp/paste7.c ! 1061671229b ./gcc/testsuite/gcc.dg/cpp/paste8.c ! 2408632284b ./gcc/testsuite/gcc.dg/cpp/paste9.c ! 1054364467b ./gcc/testsuite/gcc.dg/cpp/poison.c ! 858950276b ./gcc/testsuite/gcc.dg/cpp/pragma-1.c ! 2473416313b ./gcc/testsuite/gcc.dg/cpp/pragma-2.c ! 1107840471b ./gcc/testsuite/gcc.dg/cpp/redef1.c ! 1601641321b ./gcc/testsuite/gcc.dg/cpp/redef2.c ! 3846911977b ./gcc/testsuite/gcc.dg/cpp/skipping.c ! 2020720031b ./gcc/testsuite/gcc.dg/cpp/skipping2.c ! 3873271528b ./gcc/testsuite/gcc.dg/cpp/spacing1.c ! 1299147601b ./gcc/testsuite/gcc.dg/cpp/spacing2.c ! 3081823659b ./gcc/testsuite/gcc.dg/cpp/strify1.c ! 3973832195b ./gcc/testsuite/gcc.dg/cpp/strify2.c ! 2418211010b ./gcc/testsuite/gcc.dg/cpp/strify3.c ! 2496189814b ./gcc/testsuite/gcc.dg/cpp/strp1.c ! 3609546715b ./gcc/testsuite/gcc.dg/cpp/strp2.c ! 2075703559b ./gcc/testsuite/gcc.dg/cpp/syshdr.c ! 3898065321b ./gcc/testsuite/gcc.dg/cpp/syshdr.h ! 3648062425b ./gcc/testsuite/gcc.dg/cpp/syshdr1.h ! 930452060b ./gcc/testsuite/gcc.dg/cpp/syshdr2.h ! 3033820257b ./gcc/testsuite/gcc.dg/cpp/sysmac1.c ! 2994610141b ./gcc/testsuite/gcc.dg/cpp/sysmac2.c ! 3021818451b ./gcc/testsuite/gcc.dg/cpp/tr-define.c ! 298013196b ./gcc/testsuite/gcc.dg/cpp/tr-direct.c ! 3954705973b ./gcc/testsuite/gcc.dg/cpp/tr-paste.c ! 56672469b ./gcc/testsuite/gcc.dg/cpp/tr-sign.c ! 2430481737b ./gcc/testsuite/gcc.dg/cpp/tr-str.c ! 2720640173b ./gcc/testsuite/gcc.dg/cpp/tr-warn1.c ! 4214944447b ./gcc/testsuite/gcc.dg/cpp/tr-warn2.c ! 3053015314b ./gcc/testsuite/gcc.dg/cpp/tr-warn3.c ! 2634569795b ./gcc/testsuite/gcc.dg/cpp/tr-warn4.c ! 733328423b ./gcc/testsuite/gcc.dg/cpp/tr-warn5.c ! 880495829b ./gcc/testsuite/gcc.dg/cpp/tr-warn6.c ! 580041869b ./gcc/testsuite/gcc.dg/cpp/trigraphs.c ! 2894747317b ./gcc/testsuite/gcc.dg/cpp/uchar-1.c ! 1961440147b ./gcc/testsuite/gcc.dg/cpp/uchar-2.c ! 2806339500b ./gcc/testsuite/gcc.dg/cpp/uchar-3.c ! 3156619494b ./gcc/testsuite/gcc.dg/cpp/ucs.c ! 1271068491b ./gcc/testsuite/gcc.dg/cpp/unc1.c ! 2985690540b ./gcc/testsuite/gcc.dg/cpp/unc2.c ! 479621763b ./gcc/testsuite/gcc.dg/cpp/unc3.c ! 1549705287b ./gcc/testsuite/gcc.dg/cpp/unc4.c ! 3474810570b ./gcc/testsuite/gcc.dg/cpp/undef1.c ! 1052162081b ./gcc/testsuite/gcc.dg/cpp/undef2.c ! 1278828881b ./gcc/testsuite/gcc.dg/cpp/vararg1.c ! 270851301b ./gcc/testsuite/gcc.dg/cpp/vararg2.c ! 203701001b ./gcc/testsuite/gcc.dg/cpp/vararg3.c ! 2222858341b ./gcc/testsuite/gcc.dg/cpp/vararg4.c ! 3684840524b ./gcc/testsuite/gcc.dg/cpp/wchar-1.c ! 2112571638b ./gcc/testsuite/gcc.dg/cpp/widestr1.c ! 2478073469b ./gcc/testsuite/gcc.dg/debug/20000503-1.c ! 1850073884b ./gcc/testsuite/gcc.dg/debug/20010207-1.c ! 2575589968b ./gcc/testsuite/gcc.dg/debug/20011223-1.c ! 3480555031b ./gcc/testsuite/gcc.dg/debug/20020104-2.c ! 465470758b ./gcc/testsuite/gcc.dg/debug/20020220-1.c ! 38521003b ./gcc/testsuite/gcc.dg/debug/20020224-1.c ! 1897254689b ./gcc/testsuite/gcc.dg/debug/20020327-1.c ! 2095797855b ./gcc/testsuite/gcc.dg/debug/debug-1.c ! 936371752b ./gcc/testsuite/gcc.dg/debug/debug-2.c ! 1466203416b ./gcc/testsuite/gcc.dg/debug/debug-3.c ! 591803753b ./gcc/testsuite/gcc.dg/debug/debug-4.c ! 524177325b ./gcc/testsuite/gcc.dg/debug/debug-5.c ! 4017752601b ./gcc/testsuite/gcc.dg/debug/debug-6.c ! 2820451029b ./gcc/testsuite/gcc.dg/debug/debug.exp ! 3154398188b ./gcc/testsuite/gcc.dg/debug/dwarf2-1.c ! 3551380716b ./gcc/testsuite/gcc.dg/debug/dwarf2-2.c ! 1865154101b ./gcc/testsuite/gcc.dg/debug/trivial.c ! 2108424497b ./gcc/testsuite/gcc.dg/decl-1.c ! 3489735771b ./gcc/testsuite/gcc.dg/decl-2.c ! 219343109b ./gcc/testsuite/gcc.dg/decl-3.c ! 2106699188b ./gcc/testsuite/gcc.dg/deprecated.c ! 462220244b ./gcc/testsuite/gcc.dg/dg.exp ! 3005671194b ./gcc/testsuite/gcc.dg/divbyzero.c ! 3732188130b ./gcc/testsuite/gcc.dg/dll-1.c ! 2397785716b ./gcc/testsuite/gcc.dg/dll-2.c ! 4107998098b ./gcc/testsuite/gcc.dg/dll-3.c ! 38849204b ./gcc/testsuite/gcc.dg/dll-4.c ! 2135186629b ./gcc/testsuite/gcc.dg/enum1.c ! 2635594155b ./gcc/testsuite/gcc.dg/ext-glob.c ! 3222632325b ./gcc/testsuite/gcc.dg/format/array-1.c ! 1862455428b ./gcc/testsuite/gcc.dg/format/attr-1.c ! 3131101897b ./gcc/testsuite/gcc.dg/format/attr-2.c ! 884013987b ./gcc/testsuite/gcc.dg/format/attr-3.c ! 1282524185b ./gcc/testsuite/gcc.dg/format/attr-4.c ! 3309516915b ./gcc/testsuite/gcc.dg/format/attr-5.c ! 1342273591b ./gcc/testsuite/gcc.dg/format/attr-6.c ! 3314290167b ./gcc/testsuite/gcc.dg/format/attr-7.c ! 2805119685b ./gcc/testsuite/gcc.dg/format/branch-1.c ! 753102824b ./gcc/testsuite/gcc.dg/format/builtin-1.c ! 1458645895b ./gcc/testsuite/gcc.dg/format/c90-printf-1.c ! 2152399739b ./gcc/testsuite/gcc.dg/format/c90-printf-2.c ! 576410250b ./gcc/testsuite/gcc.dg/format/c90-printf-3.c ! 1600984968b ./gcc/testsuite/gcc.dg/format/c90-scanf-1.c ! 461393812b ./gcc/testsuite/gcc.dg/format/c90-scanf-2.c ! 2607652439b ./gcc/testsuite/gcc.dg/format/c90-scanf-3.c ! 2060901849b ./gcc/testsuite/gcc.dg/format/c90-scanf-4.c ! 3830240101b ./gcc/testsuite/gcc.dg/format/c90-strftime-1.c ! 908665911b ./gcc/testsuite/gcc.dg/format/c90-strftime-2.c ! 2447449665b ./gcc/testsuite/gcc.dg/format/c94-printf-1.c ! 1772682986b ./gcc/testsuite/gcc.dg/format/c94-scanf-1.c ! 2398886219b ./gcc/testsuite/gcc.dg/format/c99-printf-1.c ! 1982196060b ./gcc/testsuite/gcc.dg/format/c99-printf-2.c ! 3845709577b ./gcc/testsuite/gcc.dg/format/c99-printf-3.c ! 842927031b ./gcc/testsuite/gcc.dg/format/c99-scanf-1.c ! 3735460767b ./gcc/testsuite/gcc.dg/format/c99-scanf-2.c ! 3432916856b ./gcc/testsuite/gcc.dg/format/c99-scanf-3.c ! 3177298628b ./gcc/testsuite/gcc.dg/format/c99-strftime-1.c ! 2090637496b ./gcc/testsuite/gcc.dg/format/c99-strftime-2.c ! 2345337374b ./gcc/testsuite/gcc.dg/format/diag-1.c ! 1250738052b ./gcc/testsuite/gcc.dg/format/errmk-1.c ! 1927556152b ./gcc/testsuite/gcc.dg/format/ext-1.c ! 230043853b ./gcc/testsuite/gcc.dg/format/ext-2.c ! 3735744313b ./gcc/testsuite/gcc.dg/format/ext-3.c ! 2712114535b ./gcc/testsuite/gcc.dg/format/ext-4.c ! 3870005152b ./gcc/testsuite/gcc.dg/format/ext-5.c ! 4154438977b ./gcc/testsuite/gcc.dg/format/ext-6.c ! 174407969b ./gcc/testsuite/gcc.dg/format/format.exp ! 2650327793b ./gcc/testsuite/gcc.dg/format/format.h ! 3030055438b ./gcc/testsuite/gcc.dg/format/miss-1.c ! 58040071b ./gcc/testsuite/gcc.dg/format/miss-2.c ! 1680800961b ./gcc/testsuite/gcc.dg/format/multattr-1.c ! 3511814217b ./gcc/testsuite/gcc.dg/format/multattr-2.c ! 1621224881b ./gcc/testsuite/gcc.dg/format/multattr-3.c ! 2482792163b ./gcc/testsuite/gcc.dg/format/no-exargs-1.c ! 3432514252b ./gcc/testsuite/gcc.dg/format/no-exargs-2.c ! 4199776146b ./gcc/testsuite/gcc.dg/format/no-y2k-1.c ! 2335984266b ./gcc/testsuite/gcc.dg/format/nonlit-1.c ! 3055177111b ./gcc/testsuite/gcc.dg/format/nonlit-2.c ! 449451912b ./gcc/testsuite/gcc.dg/format/nonlit-3.c ! 3652642152b ./gcc/testsuite/gcc.dg/format/plus-1.c ! 2673114039b ./gcc/testsuite/gcc.dg/format/sec-1.c ! 1815893280b ./gcc/testsuite/gcc.dg/format/strfmon-1.c ! 821372176b ./gcc/testsuite/gcc.dg/format/va-1.c ! 358822374b ./gcc/testsuite/gcc.dg/format/warnll-1.c ! 3962912739b ./gcc/testsuite/gcc.dg/format/xopen-1.c ! 73044124b ./gcc/testsuite/gcc.dg/format/z-1.c ! 745582715b ./gcc/testsuite/gcc.dg/gnu89-init-1.c ! 339065893b ./gcc/testsuite/gcc.dg/gnu89-init-2.c ! 1770671475b ./gcc/testsuite/gcc.dg/gnu99-init-1.c ! 885923224b ./gcc/testsuite/gcc.dg/i386-387-1.c ! 4204057333b ./gcc/testsuite/gcc.dg/i386-387-2.c ! 3371905361b ./gcc/testsuite/gcc.dg/i386-bitfield1.c ! 3703039330b ./gcc/testsuite/gcc.dg/i386-loop-1.c ! 2666972329b ./gcc/testsuite/gcc.dg/i386-loop-2.c ! 2049230625b ./gcc/testsuite/gcc.dg/i386-mmx-1.c ! 3973906625b ./gcc/testsuite/gcc.dg/i386-mmx-2.c ! 811535520b ./gcc/testsuite/gcc.dg/i386-signbit-1.c ! 1624192171b ./gcc/testsuite/gcc.dg/i386-signbit-2.c ! 1578707081b ./gcc/testsuite/gcc.dg/i386-signbit-3.c ! 2923520039b ./gcc/testsuite/gcc.dg/i386-sse-1.c ! 1935024742b ./gcc/testsuite/gcc.dg/i386-sse-2.c ! 2407665653b ./gcc/testsuite/gcc.dg/i386-sse-3.c ! 1459694165b ./gcc/testsuite/gcc.dg/i386-unroll-1.c ! 646600080b ./gcc/testsuite/gcc.dg/ia64-asm-1.c ! 2995485298b ./gcc/testsuite/gcc.dg/ia64-sync-1.c ! 72205644b ./gcc/testsuite/gcc.dg/ia64-sync-2.c ! 1374850312b ./gcc/testsuite/gcc.dg/ifelse-1.c ! 4085178572b ./gcc/testsuite/gcc.dg/iftrap-1.c ! 448418366b ./gcc/testsuite/gcc.dg/iftrap-2.c ! 3685495880b ./gcc/testsuite/gcc.dg/inline-1.c ! 6005157b ./gcc/testsuite/gcc.dg/inline-2.c ! 247919548b ./gcc/testsuite/gcc.dg/loop-1.c ! 2663557248b ./gcc/testsuite/gcc.dg/m-un-1.c ! 2341407016b ./gcc/testsuite/gcc.dg/m-un-2.c ! 2954420820b ./gcc/testsuite/gcc.dg/mmix-1.c ! 167742958b ./gcc/testsuite/gcc.dg/no-builtin-1.c ! 2208318132b ./gcc/testsuite/gcc.dg/noncompile/20000901-1.c ! 3562764821b ./gcc/testsuite/gcc.dg/noncompile/20001228-1.c ! 677199841b ./gcc/testsuite/gcc.dg/noncompile/20010425-1.c ! 100652056b ./gcc/testsuite/gcc.dg/noncompile/20010524-1.c ! 292530438b ./gcc/testsuite/gcc.dg/noncompile/20011025-1.c ! 3164469142b ./gcc/testsuite/gcc.dg/noncompile/20020130-1.c ! 3055182962b ./gcc/testsuite/gcc.dg/noncompile/20020207-1.c ! 3889627347b ./gcc/testsuite/gcc.dg/noncompile/20020213-1.c ! 1457569280b ./gcc/testsuite/gcc.dg/noncompile/20020220-1.c ! 2964160251b ./gcc/testsuite/gcc.dg/noncompile/920507-1.c ! 2161867266b ./gcc/testsuite/gcc.dg/noncompile/920616-2.c ! 1066215762b ./gcc/testsuite/gcc.dg/noncompile/920721-2.c ! 2834384944b ./gcc/testsuite/gcc.dg/noncompile/920824-1.c ! 3955955814b ./gcc/testsuite/gcc.dg/noncompile/920923-1.c ! 3162370830b ./gcc/testsuite/gcc.dg/noncompile/921102-1.c ! 2258888666b ./gcc/testsuite/gcc.dg/noncompile/921116-1.c ! 4097035630b ./gcc/testsuite/gcc.dg/noncompile/930301-1.c ! 840634782b ./gcc/testsuite/gcc.dg/noncompile/930622-1.c ! 3061074939b ./gcc/testsuite/gcc.dg/noncompile/930622-2.c ! 181482966b ./gcc/testsuite/gcc.dg/noncompile/930714-1.c ! 3515814095b ./gcc/testsuite/gcc.dg/noncompile/931203-1.c ! 2994529883b ./gcc/testsuite/gcc.dg/noncompile/940112-1.c ! 3064722803b ./gcc/testsuite/gcc.dg/noncompile/940227-1.c ! 667278578b ./gcc/testsuite/gcc.dg/noncompile/950825-1.c ! 170314268b ./gcc/testsuite/gcc.dg/noncompile/950921-1.c ! 1539048278b ./gcc/testsuite/gcc.dg/noncompile/951123-1.c ! 988927550b ./gcc/testsuite/gcc.dg/noncompile/971104-1.c ! 3218469122b ./gcc/testsuite/gcc.dg/noncompile/990416-1.c ! 3596296296b ./gcc/testsuite/gcc.dg/noncompile/const-ll-1.c ! 1128187562b ./gcc/testsuite/gcc.dg/noncompile/init-1.c ! 2927938029b ./gcc/testsuite/gcc.dg/noncompile/init-2.c ! 4011814030b ./gcc/testsuite/gcc.dg/noncompile/init-3.c ! 835046904b ./gcc/testsuite/gcc.dg/noncompile/invalid_asm.c ! 3441206096b ./gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c ! 348329041b ./gcc/testsuite/gcc.dg/noncompile/noncompile.exp ! 3105423709b ./gcc/testsuite/gcc.dg/noncompile/redecl-1.c ! 1781438824b ./gcc/testsuite/gcc.dg/noncompile/va-arg-1.c ! 3381135030b ./gcc/testsuite/gcc.dg/noncompile/voidparam-1.c ! 1329170478b ./gcc/testsuite/gcc.dg/noreturn-1.c ! 2267400179b ./gcc/testsuite/gcc.dg/noreturn-2.c ! 1222476594b ./gcc/testsuite/gcc.dg/noreturn-3.c ! 4260549149b ./gcc/testsuite/gcc.dg/noreturn-4.c ! 3873251871b ./gcc/testsuite/gcc.dg/old-style-asm-1.c ! 1662299957b ./gcc/testsuite/gcc.dg/pack-test-1.c ! 2754082325b ./gcc/testsuite/gcc.dg/pack-test-1.h ! 2875409621b ./gcc/testsuite/gcc.dg/pack-test-2.c ! 3395691298b ./gcc/testsuite/gcc.dg/pragma-align.c ! 2976918557b ./gcc/testsuite/gcc.dg/pragma-darwin.c ! 2313186581b ./gcc/testsuite/gcc.dg/pragma-ep-1.c ! 689657683b ./gcc/testsuite/gcc.dg/pragma-ep-2.c ! 375277958b ./gcc/testsuite/gcc.dg/pragma-ep-3.c ! 18511022b ./gcc/testsuite/gcc.dg/pragma-re-1.c ! 3911201539b ./gcc/testsuite/gcc.dg/pragma-re-2.c ! 3011001240b ./gcc/testsuite/gcc.dg/qual-return-1.c ! 4111880764b ./gcc/testsuite/gcc.dg/qual-return-2.c ! 2127458656b ./gcc/testsuite/gcc.dg/return-type-1.c ! 3519355790b ./gcc/testsuite/gcc.dg/return-type-2.c ! 3862146754b ./gcc/testsuite/gcc.dg/sequence-pt-1.c ! 3997091992b ./gcc/testsuite/gcc.dg/setjmp-1.c ! 2828537866b ./gcc/testsuite/gcc.dg/sparc-dwarf2.c ! 802040009b ./gcc/testsuite/gcc.dg/sparc-ret.c ! 1993113484b ./gcc/testsuite/gcc.dg/special/20000419-2.c ! 3430419731b ./gcc/testsuite/gcc.dg/special/alias-1.c ! 7306739b ./gcc/testsuite/gcc.dg/special/alias-2.c ! 371725929b ./gcc/testsuite/gcc.dg/special/ecos.exp ! 4212112354b ./gcc/testsuite/gcc.dg/special/gcsec-1.c ! 274062869b ./gcc/testsuite/gcc.dg/special/special.exp ! 2943372070b ./gcc/testsuite/gcc.dg/special/weak-1.c ! 3422703148b ./gcc/testsuite/gcc.dg/special/weak-1a.c ! 3142421222b ./gcc/testsuite/gcc.dg/special/weak-2.c ! 389288806b ./gcc/testsuite/gcc.dg/special/weak-2a.c ! 3422703148b ./gcc/testsuite/gcc.dg/special/weak-2b.c ! 2222470584b ./gcc/testsuite/gcc.dg/special/wkali-1.c ! 3142421222b ./gcc/testsuite/gcc.dg/special/wkali-2.c ! 206085145b ./gcc/testsuite/gcc.dg/special/wkali-2a.c ! 2277202182b ./gcc/testsuite/gcc.dg/special/wkali-2b.c ! 1648410279b ./gcc/testsuite/gcc.dg/splet-1.c ! 276809676b ./gcc/testsuite/gcc.dg/struct-alias-1.c ! 2735438447b ./gcc/testsuite/gcc.dg/struct-by-value-1.c ! 935614314b ./gcc/testsuite/gcc.dg/struct-ret-1.c ! 1932500816b ./gcc/testsuite/gcc.dg/struct-ret-2.c ! 3047762229b ./gcc/testsuite/gcc.dg/struct-ret-libc.c ! 548999932b ./gcc/testsuite/gcc.dg/switch-1.c ! 1141366394b ./gcc/testsuite/gcc.dg/trunc-1.c ! 1890682509b ./gcc/testsuite/gcc.dg/typedef-init.c ! 1892637986b ./gcc/testsuite/gcc.dg/typeof-1.c ! 4017319276b ./gcc/testsuite/gcc.dg/typeof-2.c ! 1860858242b ./gcc/testsuite/gcc.dg/ultrasp1.c ! 789972216b ./gcc/testsuite/gcc.dg/ultrasp2.c ! 2708772692b ./gcc/testsuite/gcc.dg/ultrasp3.c ! 1890424464b ./gcc/testsuite/gcc.dg/ultrasp4.c ! 783369369b ./gcc/testsuite/gcc.dg/ultrasp6.c ! 2907651471b ./gcc/testsuite/gcc.dg/ultrasp7.c ! 906694114b ./gcc/testsuite/gcc.dg/ultrasp8.c ! 2258658308b ./gcc/testsuite/gcc.dg/uninit-1.c ! 608086310b ./gcc/testsuite/gcc.dg/uninit-2.c ! 2219873069b ./gcc/testsuite/gcc.dg/uninit-3.c ! 3153724678b ./gcc/testsuite/gcc.dg/uninit-4.c ! 2761916267b ./gcc/testsuite/gcc.dg/uninit-5.c ! 4187609695b ./gcc/testsuite/gcc.dg/uninit-6.c ! 3846997492b ./gcc/testsuite/gcc.dg/uninit-8.c ! 390912088b ./gcc/testsuite/gcc.dg/uninit-9.c ! 4065754561b ./gcc/testsuite/gcc.dg/uninit-A.c ! 3967573468b ./gcc/testsuite/gcc.dg/uninit-B.c ! 3792784646b ./gcc/testsuite/gcc.dg/unroll-1.c ! 977726966b ./gcc/testsuite/gcc.dg/unused-1.c ! 3484455791b ./gcc/testsuite/gcc.dg/unused-2.c ! 865910481b ./gcc/testsuite/gcc.dg/unused-3.c ! 3706472995b ./gcc/testsuite/gcc.dg/va-arg-1.c ! 2932877249b ./gcc/testsuite/gcc.dg/verbose-asm.c ! 3017845162b ./gcc/testsuite/gcc.dg/vla-2.c ! 2427295047b ./gcc/testsuite/gcc.dg/vla-init-1.c ! 2228363679b ./gcc/testsuite/gcc.dg/wchar_t-1.c ! 2603701000b ./gcc/testsuite/gcc.dg/weak-1.c ! 2107795305b ./gcc/testsuite/gcc.dg/weak-2.c ! 2916280352b ./gcc/testsuite/gcc.dg/weak-3.c ! 190723555b ./gcc/testsuite/gcc.dg/weak-4.c ! 176100891b ./gcc/testsuite/gcc.dg/weak-5.c ! 1022686552b ./gcc/testsuite/gcc.dg/weak-6.c ! 789089149b ./gcc/testsuite/gcc.dg/weak-7.c ! 2849791540b ./gcc/testsuite/gcc.dg/weak-9.c ! 455748560b ./gcc/testsuite/gcc.dg/wint_t-1.c ! 1217899241b ./gcc/testsuite/gcc.dg/wtr-aggr-init-1.c ! 3348015737b ./gcc/testsuite/gcc.dg/wtr-conversion-1.c ! 3943648306b ./gcc/testsuite/gcc.dg/wtr-escape-1.c ! 1258505090b ./gcc/testsuite/gcc.dg/wtr-int-type-1.c ! 2927503050b ./gcc/testsuite/gcc.dg/wtr-label-1.c ! 2138480914b ./gcc/testsuite/gcc.dg/wtr-static-1.c ! 3063513729b ./gcc/testsuite/gcc.dg/wtr-strcat-1.c ! 2559544004b ./gcc/testsuite/gcc.dg/wtr-suffix-1.c ! 2920370985b ./gcc/testsuite/gcc.dg/wtr-switch-1.c ! 569838363b ./gcc/testsuite/gcc.dg/wtr-unary-plus-1.c ! 1007453610b ./gcc/testsuite/gcc.dg/wtr-union-init-1.c ! 1817815277b ./gcc/testsuite/gcc.dg/wtr-union-init-2.c ! 3147738885b ./gcc/testsuite/gcc.dg/wtr-union-init-3.c ! 1769759078b ./gcc/testsuite/gcc.misc-tests/acker1.c ! 1443030966b ./gcc/testsuite/gcc.misc-tests/acker1.exp ! 278378178b ./gcc/testsuite/gcc.misc-tests/arm-isr.c ! 1193019601b ./gcc/testsuite/gcc.misc-tests/arm-isr.exp ! 2075376861b ./gcc/testsuite/gcc.misc-tests/bprob-1.c ! 3293027214b ./gcc/testsuite/gcc.misc-tests/bprob-2.c ! 2453911973b ./gcc/testsuite/gcc.misc-tests/bprob.exp ! 730919505b ./gcc/testsuite/gcc.misc-tests/dg-1.c ! 865542926b ./gcc/testsuite/gcc.misc-tests/dg-10.c ! 2063159250b ./gcc/testsuite/gcc.misc-tests/dg-11.c ! 33043738b ./gcc/testsuite/gcc.misc-tests/dg-12.c ! 3096773472b ./gcc/testsuite/gcc.misc-tests/dg-2.c ! 3661115972b ./gcc/testsuite/gcc.misc-tests/dg-3.c ! 3160178728b ./gcc/testsuite/gcc.misc-tests/dg-4.c ! 2494962233b ./gcc/testsuite/gcc.misc-tests/dg-5.c ! 2938473505b ./gcc/testsuite/gcc.misc-tests/dg-6.c ! 3402935282b ./gcc/testsuite/gcc.misc-tests/dg-7.c ! 1050718588b ./gcc/testsuite/gcc.misc-tests/dg-8.c ! 1666656352b ./gcc/testsuite/gcc.misc-tests/dg-9.c ! 1706908915b ./gcc/testsuite/gcc.misc-tests/dg-test.exp ! 1483515495b ./gcc/testsuite/gcc.misc-tests/dhry.c ! 1824463967b ./gcc/testsuite/gcc.misc-tests/dhry.exp ! 208907585b ./gcc/testsuite/gcc.misc-tests/dhry.h ! 779830061b ./gcc/testsuite/gcc.misc-tests/gcov-1.c ! 3193043874b ./gcc/testsuite/gcc.misc-tests/gcov-2.c ! 4211514085b ./gcc/testsuite/gcc.misc-tests/gcov-3.c ! 3919110722b ./gcc/testsuite/gcc.misc-tests/gcov-4.c ! 527032712b ./gcc/testsuite/gcc.misc-tests/gcov-4b.c ! 3346981345b ./gcc/testsuite/gcc.misc-tests/gcov-4b.x ! 695277662b ./gcc/testsuite/gcc.misc-tests/gcov-5b.c ! 3346981345b ./gcc/testsuite/gcc.misc-tests/gcov-5b.x ! 790797496b ./gcc/testsuite/gcc.misc-tests/gcov-6.c ! 2262587727b ./gcc/testsuite/gcc.misc-tests/gcov-6.x ! 2647301947b ./gcc/testsuite/gcc.misc-tests/gcov-7.c ! 2262587727b ./gcc/testsuite/gcc.misc-tests/gcov-7.x ! 283921131b ./gcc/testsuite/gcc.misc-tests/gcov.exp ! 1258478426b ./gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c ! 3346801828b ./gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c ! 2266643451b ./gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c ! 2697809529b ./gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c ! 2256410310b ./gcc/testsuite/gcc.misc-tests/i386-prefetch.exp ! 2071381157b ./gcc/testsuite/gcc.misc-tests/linkage-x.c ! 3975807378b ./gcc/testsuite/gcc.misc-tests/linkage-y.c ! 1392461362b ./gcc/testsuite/gcc.misc-tests/linkage.exp ! 2874350784b ./gcc/testsuite/gcc.misc-tests/matrix1.c ! 1686589144b ./gcc/testsuite/gcc.misc-tests/matrix1.exp ! 1813429392b ./gcc/testsuite/gcc.misc-tests/mg.c ! 1868251641b ./gcc/testsuite/gcc.misc-tests/mg.exp ! 1983153897b ./gcc/testsuite/gcc.misc-tests/sieve.c ! 3220093576b ./gcc/testsuite/gcc.misc-tests/sieve.exp ! 4235385594b ./gcc/testsuite/gcc.misc-tests/sort2.c ! 232815709b ./gcc/testsuite/gcc.misc-tests/sort2.exp ! 1387283607b ./gcc/testsuite/lib/c-torture.exp ! 246962046b ./gcc/testsuite/lib/f-torture.exp 827216288b ./gcc/testsuite/lib/file-format.exp ! 1025717576b ./gcc/testsuite/lib/g++-dg.exp ! 590309199b ./gcc/testsuite/lib/g++.exp 2197210451b ./gcc/testsuite/lib/g77-dg.exp ! 4020741824b ./gcc/testsuite/lib/g77.exp 3365202398b ./gcc/testsuite/lib/gcc-defs.exp 3402161270b ./gcc/testsuite/lib/gcc-dg.exp ! 3313214307b ./gcc/testsuite/lib/gcc.exp ! 1748156049b ./gcc/testsuite/lib/gcov.exp ! 2511438650b ./gcc/testsuite/lib/mike-g++.exp 1785660070b ./gcc/testsuite/lib/mike-g77.exp 3188273403b ./gcc/testsuite/lib/mike-gcc.exp 576875699b ./gcc/testsuite/lib/objc-dg.exp ! 3849564329b ./gcc/testsuite/lib/objc-torture.exp ! 2555356069b ./gcc/testsuite/lib/objc.exp ! 1673351574b ./gcc/testsuite/lib/old-dejagnu.exp ! 766192419b ./gcc/testsuite/lib/profopt.exp ! 1029251629b ./gcc/testsuite/lib/prune.exp ! 2428636490b ./gcc/testsuite/lib/scanasm.exp 3463101165b ./gcc/testsuite/lib/target-supports.exp 1369080733b ./gcc/testsuite/objc.dg/alias.m 3316559321b ./gcc/testsuite/objc.dg/class-1.m 3678679752b ./gcc/testsuite/objc.dg/class-2.m 1411503086b ./gcc/testsuite/objc.dg/const-str-1.m ! 3977573176b ./gcc/testsuite/objc.dg/const-str-2.m 1541394849b ./gcc/testsuite/objc.dg/dg.exp 1505392257b ./gcc/testsuite/objc.dg/fwd-proto-1.m 2449513844b ./gcc/testsuite/objc.dg/id-1.m 2495249432b ./gcc/testsuite/objc.dg/local-decl-1.m 1667427564b ./gcc/testsuite/objc.dg/method-1.m 2835356210b ./gcc/testsuite/objc.dg/method-2.m ! 4046194509b ./gcc/testsuite/objc.dg/naming-1.m ! 3719205740b ./gcc/testsuite/objc.dg/naming-2.m 2785734223b ./gcc/testsuite/objc.dg/proto-hier-1.m 888349193b ./gcc/testsuite/objc.dg/special/special.exp 3078900770b ./gcc/testsuite/objc.dg/special/unclaimed-category-1.h 1931469026b ./gcc/testsuite/objc.dg/special/unclaimed-category-1.m - 3208621557b ./gcc/testsuite/objc.dg/special/unclaimed-category-1a.m 967308749b ./gcc/testsuite/objc.dg/super-class-1.m ! 3665869615b ./gcc/testsuite/objc/compile/20011211-1.m ! 1806367206b ./gcc/testsuite/objc/compile/compile.exp ! 2696823090b ./gcc/testsuite/objc/execute/IMP.m ! 1707819077b ./gcc/testsuite/objc/execute/_cmd.m 3837394038b ./gcc/testsuite/objc/execute/accessing_ivars.m - 1927175126b ./gcc/testsuite/objc/execute/bf-1.m 2710215022b ./gcc/testsuite/objc/execute/bf-10.m 2657298938b ./gcc/testsuite/objc/execute/bf-11.m 2456637155b ./gcc/testsuite/objc/execute/bf-12.m --- 11527,11604 ---- 424851899b ./gcc/testsuite/g++.old-deja/g++.robertl/ice990323-3.C 1966976843b ./gcc/testsuite/g++.old-deja/g++.robertl/ice990323-4.C 2792305431b ./gcc/testsuite/g++.old-deja/g++.robertl/ice990323-5.C + 3593716546b ./gcc/testsuite/g++.old-deja/g++.robertl/README 2167858031b ./gcc/testsuite/g++.old-deja/g++.warn/cast-align1.C 2257841595b ./gcc/testsuite/g++.old-deja/g++.warn/compare1.C 478428580b ./gcc/testsuite/g++.old-deja/g++.warn/flow1.C 1434994100b ./gcc/testsuite/g++.old-deja/g++.warn/impint2.C + 228848226b ./gcc/testsuite/g++.old-deja/g++.warn/impint.C 308484502b ./gcc/testsuite/g++.old-deja/g++.warn/inline.C 3053994732b ./gcc/testsuite/g++.old-deja/g++.warn/iomanip.C 3603456747b ./gcc/testsuite/g++.old-deja/g++.warn/virt1.C 1241992731b ./gcc/testsuite/g++.old-deja/old-deja.exp ! 3239465090b ./gcc/testsuite/lib/compat.exp ! 1271260439b ./gcc/testsuite/lib/c-torture.exp 827216288b ./gcc/testsuite/lib/file-format.exp ! 246962046b ./gcc/testsuite/lib/f-torture.exp 2197210451b ./gcc/testsuite/lib/g77-dg.exp ! 2606618639b ./gcc/testsuite/lib/g77.exp 3365202398b ./gcc/testsuite/lib/gcc-defs.exp 3402161270b ./gcc/testsuite/lib/gcc-dg.exp ! 1886578930b ./gcc/testsuite/lib/gcc.exp ! 310116090b ./gcc/testsuite/lib/gcov.exp ! 1025717576b ./gcc/testsuite/lib/g++-dg.exp ! 698932340b ./gcc/testsuite/lib/g++.exp 1785660070b ./gcc/testsuite/lib/mike-g77.exp 3188273403b ./gcc/testsuite/lib/mike-gcc.exp + 2511438650b ./gcc/testsuite/lib/mike-g++.exp 576875699b ./gcc/testsuite/lib/objc-dg.exp ! 2912756680b ./gcc/testsuite/lib/objc.exp ! 86722252b ./gcc/testsuite/lib/objc-torture.exp ! 807926328b ./gcc/testsuite/lib/old-dejagnu.exp ! 1067355345b ./gcc/testsuite/lib/profopt.exp ! 1819066650b ./gcc/testsuite/lib/prune.exp ! 3687014284b ./gcc/testsuite/lib/scanasm.exp 3463101165b ./gcc/testsuite/lib/target-supports.exp + 397114874b ./gcc/testsuite/lib/treelang.exp + 3665869615b ./gcc/testsuite/objc/compile/20011211-1.m + 1806367206b ./gcc/testsuite/objc/compile/compile.exp 1369080733b ./gcc/testsuite/objc.dg/alias.m + 3457756194b ./gcc/testsuite/objc.dg/bitfield-1.m + 1257506925b ./gcc/testsuite/objc.dg/bitfield-2.m 3316559321b ./gcc/testsuite/objc.dg/class-1.m 3678679752b ./gcc/testsuite/objc.dg/class-2.m + 1505452930b ./gcc/testsuite/objc.dg/comp-types-1.m + 621209494b ./gcc/testsuite/objc.dg/comp-types-2.m + 1632711877b ./gcc/testsuite/objc.dg/comp-types-3.m + 912836849b ./gcc/testsuite/objc.dg/comp-types-4.m + 850137640b ./gcc/testsuite/objc.dg/comp-types-5.m + 3019670015b ./gcc/testsuite/objc.dg/comp-types-6.m 1411503086b ./gcc/testsuite/objc.dg/const-str-1.m ! 3332971546b ./gcc/testsuite/objc.dg/const-str-2.m ! 521284886b ./gcc/testsuite/objc.dg/desig-init-1.m 1541394849b ./gcc/testsuite/objc.dg/dg.exp + 2715390064b ./gcc/testsuite/objc.dg/fsyntax-only.m 1505392257b ./gcc/testsuite/objc.dg/fwd-proto-1.m 2449513844b ./gcc/testsuite/objc.dg/id-1.m 2495249432b ./gcc/testsuite/objc.dg/local-decl-1.m 1667427564b ./gcc/testsuite/objc.dg/method-1.m 2835356210b ./gcc/testsuite/objc.dg/method-2.m ! 1830729571b ./gcc/testsuite/objc.dg/naming-1.m ! 250748297b ./gcc/testsuite/objc.dg/naming-2.m ! 3497150704b ./gcc/testsuite/objc.dg/param-1.m 2785734223b ./gcc/testsuite/objc.dg/proto-hier-1.m + 1637082747b ./gcc/testsuite/objc.dg/proto-hier-2.m + 3533197243b ./gcc/testsuite/objc.dg/proto-lossage-1.m + 26181874b ./gcc/testsuite/objc.dg/selector-1.m 888349193b ./gcc/testsuite/objc.dg/special/special.exp + 3208621557b ./gcc/testsuite/objc.dg/special/unclaimed-category-1a.m 3078900770b ./gcc/testsuite/objc.dg/special/unclaimed-category-1.h 1931469026b ./gcc/testsuite/objc.dg/special/unclaimed-category-1.m 967308749b ./gcc/testsuite/objc.dg/super-class-1.m ! 3933978206b ./gcc/testsuite/objc.dg/super-class-2.m ! 2504543796b ./gcc/testsuite/objc.dg/undeclared-selector.m 3837394038b ./gcc/testsuite/objc/execute/accessing_ivars.m 2710215022b ./gcc/testsuite/objc/execute/bf-10.m 2657298938b ./gcc/testsuite/objc/execute/bf-11.m 2456637155b ./gcc/testsuite/objc/execute/bf-12.m *************** *** 11101,11109 **** 4134365460b ./gcc/testsuite/objc/execute/bf-17.m 355990402b ./gcc/testsuite/objc/execute/bf-18.m 3674443693b ./gcc/testsuite/objc/execute/bf-19.m ! 3212450864b ./gcc/testsuite/objc/execute/bf-2.m 2184610020b ./gcc/testsuite/objc/execute/bf-20.m 2019969445b ./gcc/testsuite/objc/execute/bf-21.m 80833366b ./gcc/testsuite/objc/execute/bf-3.m 1154895973b ./gcc/testsuite/objc/execute/bf-4.m 2150643868b ./gcc/testsuite/objc/execute/bf-5.m --- 11609,11618 ---- 4134365460b ./gcc/testsuite/objc/execute/bf-17.m 355990402b ./gcc/testsuite/objc/execute/bf-18.m 3674443693b ./gcc/testsuite/objc/execute/bf-19.m ! 1927175126b ./gcc/testsuite/objc/execute/bf-1.m 2184610020b ./gcc/testsuite/objc/execute/bf-20.m 2019969445b ./gcc/testsuite/objc/execute/bf-21.m + 3212450864b ./gcc/testsuite/objc/execute/bf-2.m 80833366b ./gcc/testsuite/objc/execute/bf-3.m 1154895973b ./gcc/testsuite/objc/execute/bf-4.m 2150643868b ./gcc/testsuite/objc/execute/bf-5.m *************** *** 11115,11126 **** 490840694b ./gcc/testsuite/objc/execute/bycopy-1.m 494931174b ./gcc/testsuite/objc/execute/bycopy-2.m 1730034329b ./gcc/testsuite/objc/execute/bycopy-3.m - 15537293b ./gcc/testsuite/objc/execute/class-1.m 3022811812b ./gcc/testsuite/objc/execute/class-10.m 1808680681b ./gcc/testsuite/objc/execute/class-11.m 3170467444b ./gcc/testsuite/objc/execute/class-12.m 1450032037b ./gcc/testsuite/objc/execute/class-13.m 962298201b ./gcc/testsuite/objc/execute/class-14.m 184341932b ./gcc/testsuite/objc/execute/class-2.m 1192708745b ./gcc/testsuite/objc/execute/class-3.m 1197020462b ./gcc/testsuite/objc/execute/class-4.m --- 11624,11635 ---- 490840694b ./gcc/testsuite/objc/execute/bycopy-1.m 494931174b ./gcc/testsuite/objc/execute/bycopy-2.m 1730034329b ./gcc/testsuite/objc/execute/bycopy-3.m 3022811812b ./gcc/testsuite/objc/execute/class-10.m 1808680681b ./gcc/testsuite/objc/execute/class-11.m 3170467444b ./gcc/testsuite/objc/execute/class-12.m 1450032037b ./gcc/testsuite/objc/execute/class-13.m 962298201b ./gcc/testsuite/objc/execute/class-14.m + 15537293b ./gcc/testsuite/objc/execute/class-1.m 184341932b ./gcc/testsuite/objc/execute/class-2.m 1192708745b ./gcc/testsuite/objc/execute/class-3.m 1197020462b ./gcc/testsuite/objc/execute/class-4.m *************** *** 11129,11138 **** 3834458842b ./gcc/testsuite/objc/execute/class-7.m 3671287888b ./gcc/testsuite/objc/execute/class-8.m 3384901465b ./gcc/testsuite/objc/execute/class-9.m - 68195390b ./gcc/testsuite/objc/execute/class-tests-1.h - 1742460237b ./gcc/testsuite/objc/execute/class-tests-2.h 4110777484b ./gcc/testsuite/objc/execute/class_self-1.m 1951268392b ./gcc/testsuite/objc/execute/class_self-2.m 2668180928b ./gcc/testsuite/objc/execute/compatibility_alias.m 2525550462b ./gcc/testsuite/objc/execute/encode-1.m 2615444748b ./gcc/testsuite/objc/execute/enumeration-1.m --- 11638,11648 ---- 3834458842b ./gcc/testsuite/objc/execute/class-7.m 3671287888b ./gcc/testsuite/objc/execute/class-8.m 3384901465b ./gcc/testsuite/objc/execute/class-9.m 4110777484b ./gcc/testsuite/objc/execute/class_self-1.m 1951268392b ./gcc/testsuite/objc/execute/class_self-2.m + 1679931936b ./gcc/testsuite/objc/execute/class-tests-1.h + 1742460237b ./gcc/testsuite/objc/execute/class-tests-2.h + 1707819077b ./gcc/testsuite/objc/execute/_cmd.m 2668180928b ./gcc/testsuite/objc/execute/compatibility_alias.m 2525550462b ./gcc/testsuite/objc/execute/encode-1.m 2615444748b ./gcc/testsuite/objc/execute/enumeration-1.m *************** *** 11145,11152 **** 382692504b ./gcc/testsuite/objc/execute/formal_protocol-4.m 3973735702b ./gcc/testsuite/objc/execute/formal_protocol-5.m 2144981305b ./gcc/testsuite/objc/execute/formal_protocol-6.m - 3644699221b ./gcc/testsuite/objc/execute/formal_protocol-6.x 99644718b ./gcc/testsuite/objc/execute/formal_protocol-7.m 1013228926b ./gcc/testsuite/objc/execute/informal_protocol.m 2858039597b ./gcc/testsuite/objc/execute/initialize.m 4264400256b ./gcc/testsuite/objc/execute/load-2.m --- 11655,11662 ---- 382692504b ./gcc/testsuite/objc/execute/formal_protocol-4.m 3973735702b ./gcc/testsuite/objc/execute/formal_protocol-5.m 2144981305b ./gcc/testsuite/objc/execute/formal_protocol-6.m 99644718b ./gcc/testsuite/objc/execute/formal_protocol-7.m + 2696823090b ./gcc/testsuite/objc/execute/IMP.m 1013228926b ./gcc/testsuite/objc/execute/informal_protocol.m 2858039597b ./gcc/testsuite/objc/execute/initialize.m 4264400256b ./gcc/testsuite/objc/execute/load-2.m *************** *** 11156,11161 **** --- 11666,11672 ---- 160833808b ./gcc/testsuite/objc/execute/nested-1.m 3121484936b ./gcc/testsuite/objc/execute/nested-2.m 1950177275b ./gcc/testsuite/objc/execute/nested-3.m + 3513682111b ./gcc/testsuite/objc/execute/nil_method-1.m 3845787514b ./gcc/testsuite/objc/execute/no_clash.m 3091877589b ./gcc/testsuite/objc/execute/np-1.m 837055144b ./gcc/testsuite/objc/execute/np-2.m *************** *** 11165,11171 **** 1487670997b ./gcc/testsuite/objc/execute/protocol.m 3592928955b ./gcc/testsuite/objc/execute/redefining_self.m 1524125855b ./gcc/testsuite/objc/execute/root_methods.m ! 1619707236b ./gcc/testsuite/objc/execute/selector-1.m 2594938245b ./gcc/testsuite/objc/execute/static-1.m 639280843b ./gcc/testsuite/objc/execute/static-2.m 1410428796b ./gcc/testsuite/objc/execute/string1.m --- 11676,11682 ---- 1487670997b ./gcc/testsuite/objc/execute/protocol.m 3592928955b ./gcc/testsuite/objc/execute/redefining_self.m 1524125855b ./gcc/testsuite/objc/execute/root_methods.m ! 1571511265b ./gcc/testsuite/objc/execute/selector-1.m 2594938245b ./gcc/testsuite/objc/execute/static-1.m 639280843b ./gcc/testsuite/objc/execute/static-2.m 1410428796b ./gcc/testsuite/objc/execute/string1.m *************** *** 11173,11553 **** 2934965640b ./gcc/testsuite/objc/execute/string3.m 416130789b ./gcc/testsuite/objc/execute/string4.m 34483048b ./gcc/testsuite/objc/execute/va_method.m ! 214354681b ./gcc/timevar.c ! 2559007517b ./gcc/timevar.def ! 2115869626b ./gcc/timevar.h ! 2335446483b ./gcc/tlink.c ! 1633125668b ./gcc/toplev.c ! 1100253771b ./gcc/toplev.h ! 2279698662b ./gcc/tradcif.c ! 840149782b ./gcc/tradcif.y ! 325171845b ./gcc/tradcpp.c ! 133942480b ./gcc/tradcpp.h ! 1565760610b ./gcc/tree-dump.c ! 177026127b ./gcc/tree-dump.h ! 4108002902b ./gcc/tree-inline.c ! 2000795530b ./gcc/tree-inline.h ! 1782878008b ./gcc/tree.c ! 2149556796b ./gcc/tree.def ! 1200175084b ./gcc/tree.h ! 2106315745b ./gcc/tsystem.h 4139263293b ./gcc/typeclass.h ! 1488638700b ./gcc/unroll.c ! 2451297709b ./gcc/unwind-dw2-fde-glibc.c ! 939184029b ./gcc/unwind-dw2-fde.c ! 2681777274b ./gcc/unwind-dw2-fde.h ! 177874286b ./gcc/unwind-dw2.c ! 1733200042b ./gcc/unwind-pe.h ! 3015631845b ./gcc/unwind-sjlj.c ! 4110084340b ./gcc/unwind.h ! 1788741054b ./gcc/unwind.inc ! 1202449654b ./gcc/varasm.c ! 1377429075b ./gcc/varray.c ! 251576980b ./gcc/varray.h ! 309143238b ./gcc/version.c ! 835289284b ./gcc/version.h ! 1602668013b ./gcc/vmsdbg.h ! 4159431942b ./gcc/vmsdbgout.c ! 3414725237b ./gcc/xcoffout.c ! 241048359b ./gcc/xcoffout.h 1616768675b ./gnats.html 2171125041b ./include/COPYING ! 595770831b ./include/ChangeLog ! 218913669b ./include/ansidecl.h ! 3472518673b ./include/demangle.h 524172850b ./include/dyn-string.h ! 3966992879b ./include/fibheap.h ! 3882244111b ./include/floatformat.h 1934715875b ./include/fnmatch.h ! 1069433913b ./include/getopt.h ! 3613614297b ./include/hashtab.h ! 1889274764b ./include/libiberty.h 2315750201b ./include/md5.h 1017179691b ./include/objalloc.h 2663239037b ./include/obstack.h ! 1121284874b ./include/partition.h 618378141b ./include/safe-ctype.h ! 1944369318b ./include/sort.h ! 2658328396b ./include/splay-tree.h 1653599470b ./include/symcat.h 1386762946b ./include/ternary.h - 1151436348b ./include/xregex.h 1261882580b ./include/xregex2.h 656627656b ./install-sh ! 884630057b ./libf2c/ChangeLog ! 643704007b ./libf2c/Makefile.in ! 3111321221b ./libf2c/README ! 308226469b ./libf2c/TODO ! 323434498b ./libf2c/aclocal.m4 1973941211b ./libf2c/changes.netlib ! 193308155b ./libf2c/configure ! 1477197116b ./libf2c/configure.in 2487502900b ./libf2c/disclaimer.netlib 259100451b ./libf2c/f2c.h ! 332556269b ./libf2c/f2cext.c ! 3266643335b ./libf2c/g2c.hin ! 317136894b ./libf2c/libF77/F77_aloc.c ! 2048561220b ./libf2c/libF77/Makefile.in 1384146782b ./libf2c/libF77/Notice 3594711912b ./libf2c/libF77/README.netlib ! 705291937b ./libf2c/libF77/Version.c ! 1304659322b ./libf2c/libF77/abort_.c ! 2143735092b ./libf2c/libF77/c_abs.c ! 4102372920b ./libf2c/libF77/c_cos.c ! 1754542093b ./libf2c/libF77/c_div.c ! 3847115202b ./libf2c/libF77/c_exp.c ! 2878052462b ./libf2c/libF77/c_log.c ! 3389634672b ./libf2c/libF77/c_sin.c ! 1183895118b ./libf2c/libF77/c_sqrt.c ! 3290078007b ./libf2c/libF77/cabs.c ! 871413835b ./libf2c/libF77/configure ! 937702981b ./libf2c/libF77/configure.in ! 3030188690b ./libf2c/libF77/d_abs.c ! 1507325734b ./libf2c/libF77/d_acos.c ! 4159233847b ./libf2c/libF77/d_asin.c ! 2427060621b ./libf2c/libF77/d_atan.c ! 1296492558b ./libf2c/libF77/d_atn2.c ! 3575888780b ./libf2c/libF77/d_cnjg.c ! 4073305831b ./libf2c/libF77/d_cos.c ! 3091338483b ./libf2c/libF77/d_cosh.c ! 810995689b ./libf2c/libF77/d_dim.c ! 858325700b ./libf2c/libF77/d_exp.c ! 2046018081b ./libf2c/libF77/d_imag.c ! 3730554656b ./libf2c/libF77/d_int.c ! 2573277355b ./libf2c/libF77/d_lg10.c ! 2735602877b ./libf2c/libF77/d_log.c ! 2463902440b ./libf2c/libF77/d_mod.c ! 1315838709b ./libf2c/libF77/d_nint.c ! 865009317b ./libf2c/libF77/d_prod.c ! 93986231b ./libf2c/libF77/d_sign.c ! 3550952375b ./libf2c/libF77/d_sin.c ! 3529247529b ./libf2c/libF77/d_sinh.c ! 198362081b ./libf2c/libF77/d_sqrt.c ! 836556354b ./libf2c/libF77/d_tan.c ! 4186903397b ./libf2c/libF77/d_tanh.c ! 3392851220b ./libf2c/libF77/derf_.c ! 1250156454b ./libf2c/libF77/derfc_.c ! 1412482988b ./libf2c/libF77/dtime_.c ! 3387281619b ./libf2c/libF77/ef1asc_.c ! 49504728b ./libf2c/libF77/ef1cmc_.c ! 2553568528b ./libf2c/libF77/erf_.c ! 1439324285b ./libf2c/libF77/erfc_.c ! 2682848958b ./libf2c/libF77/etime_.c ! 2926211158b ./libf2c/libF77/exit_.c ! 3294101487b ./libf2c/libF77/f2ch.add ! 262909947b ./libf2c/libF77/getarg_.c ! 1053635766b ./libf2c/libF77/getenv_.c ! 1464793891b ./libf2c/libF77/h_abs.c ! 4172389826b ./libf2c/libF77/h_dim.c ! 4004178848b ./libf2c/libF77/h_dnnt.c ! 4111775146b ./libf2c/libF77/h_indx.c ! 3370033031b ./libf2c/libF77/h_len.c ! 2764887666b ./libf2c/libF77/h_mod.c ! 3401291699b ./libf2c/libF77/h_nint.c ! 1347560191b ./libf2c/libF77/h_sign.c ! 577774165b ./libf2c/libF77/hl_ge.c ! 1370298730b ./libf2c/libF77/hl_gt.c ! 1915814870b ./libf2c/libF77/hl_le.c ! 368944666b ./libf2c/libF77/hl_lt.c ! 2473169636b ./libf2c/libF77/i_abs.c ! 4060206463b ./libf2c/libF77/i_dim.c ! 2964212421b ./libf2c/libF77/i_dnnt.c ! 2958321828b ./libf2c/libF77/i_indx.c ! 1478370784b ./libf2c/libF77/i_len.c ! 1964370981b ./libf2c/libF77/i_mod.c ! 956761106b ./libf2c/libF77/i_nint.c ! 3590616869b ./libf2c/libF77/i_sign.c ! 1210543358b ./libf2c/libF77/iargc_.c ! 4105379815b ./libf2c/libF77/l_ge.c ! 4110886289b ./libf2c/libF77/l_gt.c ! 1122360099b ./libf2c/libF77/l_le.c ! 3320765614b ./libf2c/libF77/l_lt.c ! 443393905b ./libf2c/libF77/lbitbits.c ! 3575626916b ./libf2c/libF77/lbitshft.c ! 1531755714b ./libf2c/libF77/main.c ! 1177519321b ./libf2c/libF77/makefile.netlib ! 3561723582b ./libf2c/libF77/pow_ci.c ! 80946260b ./libf2c/libF77/pow_dd.c ! 1800535765b ./libf2c/libF77/pow_di.c ! 3408442423b ./libf2c/libF77/pow_hh.c ! 4238680779b ./libf2c/libF77/pow_ii.c ! 483795003b ./libf2c/libF77/pow_qq.c ! 2828214001b ./libf2c/libF77/pow_ri.c ! 1113537371b ./libf2c/libF77/pow_zi.c ! 1192551031b ./libf2c/libF77/pow_zz.c ! 1528868299b ./libf2c/libF77/qbitbits.c ! 2508152427b ./libf2c/libF77/qbitshft.c ! 3223994220b ./libf2c/libF77/r_abs.c ! 3352864098b ./libf2c/libF77/r_acos.c ! 3384723664b ./libf2c/libF77/r_asin.c ! 1988008783b ./libf2c/libF77/r_atan.c ! 713014287b ./libf2c/libF77/r_atn2.c ! 823683848b ./libf2c/libF77/r_cnjg.c ! 186941398b ./libf2c/libF77/r_cos.c ! 3322305540b ./libf2c/libF77/r_cosh.c ! 3466251772b ./libf2c/libF77/r_dim.c ! 3655480343b ./libf2c/libF77/r_exp.c ! 457367872b ./libf2c/libF77/r_imag.c ! 1964745019b ./libf2c/libF77/r_int.c ! 361396536b ./libf2c/libF77/r_lg10.c ! 2577838016b ./libf2c/libF77/r_log.c ! 3015829361b ./libf2c/libF77/r_mod.c ! 1801353496b ./libf2c/libF77/r_nint.c ! 617376052b ./libf2c/libF77/r_sign.c ! 1330225769b ./libf2c/libF77/r_sin.c ! 3815237833b ./libf2c/libF77/r_sinh.c ! 3405603649b ./libf2c/libF77/r_sqrt.c ! 948857700b ./libf2c/libF77/r_tan.c ! 2204673615b ./libf2c/libF77/r_tanh.c ! 2846091421b ./libf2c/libF77/s_cat.c ! 1366254496b ./libf2c/libF77/s_cmp.c ! 3500695330b ./libf2c/libF77/s_copy.c ! 2017948720b ./libf2c/libF77/s_paus.c ! 2593705873b ./libf2c/libF77/s_rnge.c ! 3862265148b ./libf2c/libF77/s_stop.c ! 3467937994b ./libf2c/libF77/setarg.c ! 273280446b ./libf2c/libF77/setsig.c ! 199330663b ./libf2c/libF77/sig_die.c 1302607324b ./libf2c/libF77/signal1.h ! 3496496096b ./libf2c/libF77/signal1.h0 ! 4121880197b ./libf2c/libF77/signal_.c ! 113341864b ./libf2c/libF77/system_.c ! 1937893648b ./libf2c/libF77/z_abs.c ! 2431309812b ./libf2c/libF77/z_cos.c ! 4069203393b ./libf2c/libF77/z_div.c ! 654537628b ./libf2c/libF77/z_exp.c ! 391907002b ./libf2c/libF77/z_log.c ! 2332417514b ./libf2c/libF77/z_sin.c ! 4013824581b ./libf2c/libF77/z_sqrt.c ! 81211418b ./libf2c/libI77/Makefile.in ! 1384146782b ./libf2c/libI77/Notice ! 3744878144b ./libf2c/libI77/README.netlib ! 199281018b ./libf2c/libI77/Version.c ! 1606913831b ./libf2c/libI77/backspace.c ! 2398093876b ./libf2c/libI77/close.c 3442307107b ./libf2c/libI77/config.h.in ! 3559715528b ./libf2c/libI77/configure ! 511797131b ./libf2c/libI77/configure.in ! 1434317732b ./libf2c/libI77/dfe.c ! 1498544240b ./libf2c/libI77/dolio.c ! 4138072081b ./libf2c/libI77/due.c ! 2736903293b ./libf2c/libI77/endfile.c ! 690850192b ./libf2c/libI77/err.c ! 3294101487b ./libf2c/libI77/f2ch.add ! 1356134703b ./libf2c/libI77/fio.h ! 772866895b ./libf2c/libI77/fmt.c ! 4101507712b ./libf2c/libI77/fmt.h ! 3009804035b ./libf2c/libI77/fmtlib.c ! 1409031309b ./libf2c/libI77/fp.h ! 1512800910b ./libf2c/libI77/ftell_.c ! 1917699485b ./libf2c/libI77/iio.c ! 1458869538b ./libf2c/libI77/ilnw.c ! 1005821588b ./libf2c/libI77/inquire.c ! 771509778b ./libf2c/libI77/lio.h ! 339145586b ./libf2c/libI77/lread.c ! 2727021368b ./libf2c/libI77/lwrite.c 2636902289b ./libf2c/libI77/makefile.netlib ! 1954564498b ./libf2c/libI77/open.c ! 2450120238b ./libf2c/libI77/rdfmt.c ! 2149393700b ./libf2c/libI77/rewind.c ! 3082421543b ./libf2c/libI77/rsfe.c ! 27319661b ./libf2c/libI77/rsli.c ! 673652988b ./libf2c/libI77/rsne.c ! 2680457877b ./libf2c/libI77/sfe.c 216805921b ./libf2c/libI77/stamp-h.in ! 4119833693b ./libf2c/libI77/sue.c ! 4028809578b ./libf2c/libI77/typesize.c ! 2487538082b ./libf2c/libI77/uio.c ! 1670879675b ./libf2c/libI77/util.c ! 3746777128b ./libf2c/libI77/wref.c ! 1966568786b ./libf2c/libI77/wrtfmt.c ! 3540661106b ./libf2c/libI77/wsfe.c ! 869896149b ./libf2c/libI77/wsle.c ! 3647229305b ./libf2c/libI77/wsne.c ! 2958634571b ./libf2c/libI77/xwsne.c 508743035b ./libf2c/libU77/COPYING.LIB ! 2717291481b ./libf2c/libU77/Makefile.in 572996563b ./libf2c/libU77/PROJECTS 2980229902b ./libf2c/libU77/README ! 1494896292b ./libf2c/libU77/Version.c ! 1842933802b ./libf2c/libU77/access_.c ! 4214861580b ./libf2c/libU77/acconfig.h ! 2301261828b ./libf2c/libU77/aclocal.m4 ! 3260157535b ./libf2c/libU77/alarm_.c ! 481185218b ./libf2c/libU77/bes.c ! 3531718858b ./libf2c/libU77/chdir_.c ! 3571215248b ./libf2c/libU77/chmod_.c ! 1954724291b ./libf2c/libU77/config.hin ! 2271415334b ./libf2c/libU77/configure ! 4081950488b ./libf2c/libU77/configure.in ! 3577720310b ./libf2c/libU77/ctime_.c ! 2890960351b ./libf2c/libU77/date_.c ! 2503989765b ./libf2c/libU77/datetime_.c ! 1344682531b ./libf2c/libU77/dbes.c ! 969611891b ./libf2c/libU77/dtime_.c ! 2796364082b ./libf2c/libU77/etime_.c ! 3739002369b ./libf2c/libU77/fdate_.c ! 2936845924b ./libf2c/libU77/fgetc_.c ! 1262136923b ./libf2c/libU77/flush1_.c ! 55475392b ./libf2c/libU77/fnum_.c ! 1786809239b ./libf2c/libU77/fputc_.c ! 3903452909b ./libf2c/libU77/fstat_.c ! 3782463129b ./libf2c/libU77/gerror_.c ! 1443084591b ./libf2c/libU77/getcwd_.c ! 2258536089b ./libf2c/libU77/getgid_.c ! 2010909588b ./libf2c/libU77/getlog_.c ! 3431059629b ./libf2c/libU77/getpid_.c ! 72289587b ./libf2c/libU77/getuid_.c ! 827784876b ./libf2c/libU77/gmtime_.c ! 2490508241b ./libf2c/libU77/hostnm_.c ! 1547236336b ./libf2c/libU77/idate_.c ! 1177948837b ./libf2c/libU77/ierrno_.c ! 2294075352b ./libf2c/libU77/irand_.c ! 1142470864b ./libf2c/libU77/isatty_.c ! 2802178091b ./libf2c/libU77/itime_.c ! 3704802748b ./libf2c/libU77/kill_.c ! 910885406b ./libf2c/libU77/link_.c ! 1995276793b ./libf2c/libU77/lnblnk_.c ! 3149128167b ./libf2c/libU77/lstat_.c ! 1763071373b ./libf2c/libU77/ltime_.c ! 2455391013b ./libf2c/libU77/mclock_.c ! 4183902576b ./libf2c/libU77/perror_.c ! 3798879256b ./libf2c/libU77/rand_.c ! 2297401196b ./libf2c/libU77/rename_.c ! 91467825b ./libf2c/libU77/secnds_.c ! 3426498280b ./libf2c/libU77/second_.c ! 1721102323b ./libf2c/libU77/sleep_.c ! 366913838b ./libf2c/libU77/srand_.c 216805921b ./libf2c/libU77/stamp-h.in ! 1858264400b ./libf2c/libU77/stat_.c ! 398713372b ./libf2c/libU77/symlnk_.c ! 1023580093b ./libf2c/libU77/sys_clock_.c ! 4060599200b ./libf2c/libU77/time_.c ! 4222211870b ./libf2c/libU77/ttynam_.c 791266987b ./libf2c/libU77/u77-test.f ! 387772730b ./libf2c/libU77/umask_.c ! 1230596654b ./libf2c/libU77/unlink_.c ! 2702299573b ./libf2c/libU77/vxtidate_.c ! 3987376609b ./libf2c/libU77/vxttime_.c 1384146782b ./libf2c/permission.netlib 3513813969b ./libf2c/readme.netlib ! 829387645b ./libffi/ChangeLog ! 3479323424b ./libffi/ChangeLog.libgcj ! 1481682558b ./libffi/ChangeLog.v1 ! 2593181117b ./libffi/LICENSE ! 1227206699b ./libffi/Makefile.am ! 2307036350b ./libffi/Makefile.in ! 3508322383b ./libffi/README 1812706554b ./libffi/acconfig.h 2067133813b ./libffi/acinclude.m4 724319761b ./libffi/aclocal.m4 ! 2850538130b ./libffi/configure ! 525563280b ./libffi/configure.in ! 1158949320b ./libffi/fficonfig.h.in ! 1175058075b ./libffi/include/Makefile.am ! 3624063070b ./libffi/include/Makefile.in ! 2313143056b ./libffi/include/ffi.h.in 3309556484b ./libffi/include/ffi_common.h 2321044801b ./libffi/include/ffi_mips.h 3852747706b ./libffi/src/alpha/ffi.c 2032396460b ./libffi/src/alpha/osf.S ! 4293371769b ./libffi/src/arm/ffi.c ! 591152992b ./libffi/src/arm/sysv.S 2669027491b ./libffi/src/debug.c ! 967989305b ./libffi/src/ffitest.c 2435449601b ./libffi/src/ia64/ffi.c 1956966073b ./libffi/src/ia64/ia64_flags.h 2886414800b ./libffi/src/ia64/unix.S ! 2946352717b ./libffi/src/java_raw_api.c ! 4236219331b ./libffi/src/m68k/ffi.c 1684090594b ./libffi/src/m68k/sysv.S ! 1785558758b ./libffi/src/mips/ffi.c 176940890b ./libffi/src/mips/n32.S 3634355650b ./libffi/src/mips/o32.S - 1342850260b ./libffi/src/powerpc/aix.S 1122125803b ./libffi/src/powerpc/aix_closure.S 257105690b ./libffi/src/powerpc/asm.h ! 91989017b ./libffi/src/powerpc/darwin.S ! 4044999467b ./libffi/src/powerpc/darwin_closure.S 1692071312b ./libffi/src/powerpc/ffi.c 2961975388b ./libffi/src/powerpc/ffi_darwin.c 978519837b ./libffi/src/powerpc/ppc_closure.S 1185461672b ./libffi/src/powerpc/sysv.S ! 1962807490b ./libffi/src/prep_cif.c 2419197691b ./libffi/src/raw_api.c ! 1719114531b ./libffi/src/sparc/ffi.c ! 1526185028b ./libffi/src/sparc/v8.S ! 2310583994b ./libffi/src/sparc/v9.S ! 518804215b ./libffi/src/types.c ! 788399349b ./libffi/src/x86/ffi.c ! 760488121b ./libffi/src/x86/sysv.S ! 478025840b ./libffi/src/x86/win32.S 216805921b ./libffi/stamp-h.in - 508743035b ./libiberty/COPYING.LIB - 2977486001b ./libiberty/ChangeLog - 1980229302b ./libiberty/Makefile.in - 4016047250b ./libiberty/README - 602306638b ./libiberty/_doprnt.c 3848560079b ./libiberty/acconfig.h 640604299b ./libiberty/aclocal.m4 4169173798b ./libiberty/alloca.c --- 11684,12100 ---- 2934965640b ./gcc/testsuite/objc/execute/string3.m 416130789b ./gcc/testsuite/objc/execute/string4.m 34483048b ./gcc/testsuite/objc/execute/va_method.m ! 986418331b ./gcc/testsuite/README ! 922475304b ./gcc/testsuite/README.compat ! 4258789052b ./gcc/testsuite/README.g++ ! 174183124b ./gcc/testsuite/README.gcc ! 3846056859b ./gcc/testsuite/README.QMTEST ! 459055346b ./gcc/testsuite/treelang/a01gcci01.c ! 2293023639b ./gcc/testsuite/treelang/a01gcci01.tree ! 1160413650b ./gcc/testsuite/treelang/a01gcco01runpgm ! 379445799b ./gcc/testsuite/treelang/ChangeLog ! 2484589993b ./gcc/testsuite/treelang/Makefile.in ! 1917546689b ./gcc/testsuite/treelang/treetests.exp ! 1194399710b ./gcc/timevar.c ! 2017483246b ./gcc/timevar.def ! 70728940b ./gcc/timevar.h ! 4177260386b ./gcc/tlink.c ! 963116892b ./gcc/toplev.c ! 2285258868b ./gcc/toplev.h ! 3423640720b ./gcc/tracer.c ! 3241971144b ./gcc/tree.c ! 266537813b ./gcc/tree.def ! 3233962690b ./gcc/tree-dump.c ! 3355334157b ./gcc/tree-dump.h ! 3493072161b ./gcc/tree.h ! 1679328872b ./gcc/tree-inline.c ! 3754771676b ./gcc/tree-inline.h ! 1043964485b ./gcc/treelang/ChangeLog ! 1636615662b ./gcc/treelang/config-lang.in ! 1245022634b ./gcc/treelang/.cvsignore ! 3755575041b ./gcc/treelang/lang-options.h ! 169461342b ./gcc/treelang/lang-specs.h ! 2793678110b ./gcc/treelang/lex.l ! 3716106704b ./gcc/treelang/Make-lang.in ! 3271936071b ./gcc/treelang/parse.y ! 1455824996b ./gcc/treelang/README ! 1247992967b ./gcc/treelang/tree1.c ! 2740323862b ./gcc/treelang/treelang.h ! 967872958b ./gcc/treelang/treelang.texi ! 2119761727b ./gcc/treelang/treetree.c ! 4292976636b ./gcc/treelang/treetree.h ! 2170053915b ./gcc/tsystem.h 4139263293b ./gcc/typeclass.h ! 4022974429b ./gcc/unroll.c ! 3435537911b ./gcc/unwind-dw2.c ! 4197489626b ./gcc/unwind-dw2-fde.c ! 2891582256b ./gcc/unwind-dw2-fde-darwin.c ! 4043744940b ./gcc/unwind-dw2-fde-glibc.c ! 1040599635b ./gcc/unwind-dw2-fde.h ! 1280880390b ./gcc/unwind.h ! 2409220459b ./gcc/unwind.inc ! 703686593b ./gcc/unwind-pe.h ! 2302719627b ./gcc/unwind-sjlj.c ! 1626187161b ./gcc/varasm.c ! 2835975751b ./gcc/varray.c ! 1175263363b ./gcc/varray.h ! 2365811186b ./gcc/version.c ! 3311075015b ./gcc/version.h ! 1174103923b ./gcc/vmsdbg.h ! 3947609636b ./gcc/vmsdbgout.c ! 1306126748b ./gcc/xcoffout.c ! 1199287060b ./gcc/xcoffout.h ! 3421165831b ./GNATS 1616768675b ./gnats.html + 815071723b ./include/ansidecl.h + 3055832404b ./include/ChangeLog 2171125041b ./include/COPYING ! 3541972160b ./include/demangle.h 524172850b ./include/dyn-string.h ! 299694374b ./include/fibheap.h ! 1678191193b ./include/floatformat.h 1934715875b ./include/fnmatch.h ! 894338799b ./include/getopt.h ! 3905730254b ./include/hashtab.h ! 1843204786b ./include/libiberty.h 2315750201b ./include/md5.h 1017179691b ./include/objalloc.h 2663239037b ./include/obstack.h ! 953934126b ./include/partition.h 618378141b ./include/safe-ctype.h ! 2509642748b ./include/sort.h ! 1910476895b ./include/splay-tree.h 1653599470b ./include/symcat.h 1386762946b ./include/ternary.h 1261882580b ./include/xregex2.h + 1151436348b ./include/xregex.h + 535694508b ./INSTALL/binaries.html + 613493251b ./INSTALL/build.html + 2378123527b ./INSTALL/configure.html + 4044841084b ./INSTALL/download.html + 1291706358b ./INSTALL/finalinstall.html + 333087212b ./INSTALL/gfdl.html + 4067214366b ./INSTALL/index.html + 2397948b ./INSTALL/old.html + 2229468985b ./INSTALL/README 656627656b ./install-sh ! 1148294081b ./INSTALL/specific.html ! 255789484b ./INSTALL/test.html ! 2266217259b ./libf2c/aclocal.m4 ! 1702317351b ./libf2c/ChangeLog 1973941211b ./libf2c/changes.netlib ! 1081212729b ./libf2c/configure ! 2026513347b ./libf2c/configure.in 2487502900b ./libf2c/disclaimer.netlib + 4252437873b ./libf2c/f2cext.c 259100451b ./libf2c/f2c.h ! 1667086857b ./libf2c/g2c.hin ! 3870392859b ./libf2c/libF77/abort_.c ! 308572448b ./libf2c/libF77/c_abs.c ! 2082137729b ./libf2c/libF77/cabs.c ! 1883497441b ./libf2c/libF77/c_cos.c ! 1858422356b ./libf2c/libF77/c_div.c ! 790029673b ./libf2c/libF77/c_exp.c ! 994577213b ./libf2c/libF77/c_log.c ! 1273103030b ./libf2c/libF77/configure ! 4180656621b ./libf2c/libF77/configure.in ! 2669446875b ./libf2c/libF77/c_sin.c ! 3903296098b ./libf2c/libF77/c_sqrt.c ! 3104858124b ./libf2c/libF77/d_abs.c ! 439429488b ./libf2c/libF77/d_acos.c ! 3154060526b ./libf2c/libF77/d_asin.c ! 1295036968b ./libf2c/libF77/d_atan.c ! 3493197304b ./libf2c/libF77/d_atn2.c ! 659571017b ./libf2c/libF77/d_cnjg.c ! 3427599074b ./libf2c/libF77/d_cos.c ! 4206462540b ./libf2c/libF77/d_cosh.c ! 2776283018b ./libf2c/libF77/d_dim.c ! 4081149047b ./libf2c/libF77/derf_.c ! 1955443966b ./libf2c/libF77/derfc_.c ! 3451576040b ./libf2c/libF77/d_exp.c ! 2381745545b ./libf2c/libF77/d_imag.c ! 1146832515b ./libf2c/libF77/d_int.c ! 2671088763b ./libf2c/libF77/d_lg10.c ! 2114001239b ./libf2c/libF77/d_log.c ! 926610831b ./libf2c/libF77/d_mod.c ! 367162319b ./libf2c/libF77/d_nint.c ! 3564836056b ./libf2c/libF77/d_prod.c ! 3313687939b ./libf2c/libF77/d_sign.c ! 3681961298b ./libf2c/libF77/d_sin.c ! 3987731970b ./libf2c/libF77/d_sinh.c ! 1226820162b ./libf2c/libF77/d_sqrt.c ! 417505515b ./libf2c/libF77/d_tan.c ! 2673761809b ./libf2c/libF77/d_tanh.c ! 3131947640b ./libf2c/libF77/dtime_.c ! 458872884b ./libf2c/libF77/ef1asc_.c ! 1860532555b ./libf2c/libF77/ef1cmc_.c ! 3949684565b ./libf2c/libF77/erf_.c ! 988185481b ./libf2c/libF77/erfc_.c ! 2613183923b ./libf2c/libF77/etime_.c ! 1297045716b ./libf2c/libF77/exit_.c ! 3698594684b ./libf2c/libF77/f2ch.add ! 1526525282b ./libf2c/libF77/F77_aloc.c ! 3828795678b ./libf2c/libF77/getarg_.c ! 1741489762b ./libf2c/libF77/getenv_.c ! 1705811646b ./libf2c/libF77/h_abs.c ! 1827788007b ./libf2c/libF77/h_dim.c ! 2105686072b ./libf2c/libF77/h_dnnt.c ! 3429041813b ./libf2c/libF77/h_indx.c ! 1359030284b ./libf2c/libF77/h_len.c ! 2723905741b ./libf2c/libF77/hl_ge.c ! 3742765482b ./libf2c/libF77/hl_gt.c ! 4136074850b ./libf2c/libF77/hl_le.c ! 3720320860b ./libf2c/libF77/hl_lt.c ! 3044296674b ./libf2c/libF77/h_mod.c ! 417520566b ./libf2c/libF77/h_nint.c ! 2232494709b ./libf2c/libF77/h_sign.c ! 3798144592b ./libf2c/libF77/i_abs.c ! 2492709119b ./libf2c/libF77/iargc_.c ! 1810643827b ./libf2c/libF77/i_dim.c ! 3695350001b ./libf2c/libF77/i_dnnt.c ! 1369278917b ./libf2c/libF77/i_indx.c ! 3819541293b ./libf2c/libF77/i_len.c ! 81602132b ./libf2c/libF77/i_mod.c ! 3937278533b ./libf2c/libF77/i_nint.c ! 3575399967b ./libf2c/libF77/i_sign.c ! 2410485343b ./libf2c/libF77/lbitbits.c ! 2730286639b ./libf2c/libF77/lbitshft.c ! 606263729b ./libf2c/libF77/l_ge.c ! 1973270906b ./libf2c/libF77/l_gt.c ! 1895704350b ./libf2c/libF77/l_le.c ! 1999912844b ./libf2c/libF77/l_lt.c ! 4187310039b ./libf2c/libF77/main.c ! 1669682409b ./libf2c/libF77/Makefile.in ! 1177519321b ./libf2c/libF77/makefile.netlib 1384146782b ./libf2c/libF77/Notice + 2796565280b ./libf2c/libF77/pow_ci.c + 2439413233b ./libf2c/libF77/pow_dd.c + 526163208b ./libf2c/libF77/pow_di.c + 1373672032b ./libf2c/libF77/pow_hh.c + 734184237b ./libf2c/libF77/pow_ii.c + 291078692b ./libf2c/libF77/pow_qq.c + 2737026767b ./libf2c/libF77/pow_ri.c + 3155504448b ./libf2c/libF77/pow_zi.c + 1887569768b ./libf2c/libF77/pow_zz.c + 3637313651b ./libf2c/libF77/qbitbits.c + 527675109b ./libf2c/libF77/qbitshft.c + 4285278599b ./libf2c/libF77/r_abs.c + 1551576033b ./libf2c/libF77/r_acos.c + 3894027214b ./libf2c/libF77/r_asin.c + 484649779b ./libf2c/libF77/r_atan.c + 141200088b ./libf2c/libF77/r_atn2.c + 2680833231b ./libf2c/libF77/r_cnjg.c + 4287786824b ./libf2c/libF77/r_cos.c + 2790215018b ./libf2c/libF77/r_cosh.c + 1076735700b ./libf2c/libF77/r_dim.c 3594711912b ./libf2c/libF77/README.netlib ! 2818320536b ./libf2c/libF77/r_exp.c ! 3427760224b ./libf2c/libF77/r_imag.c ! 2923052734b ./libf2c/libF77/r_int.c ! 375443936b ./libf2c/libF77/r_lg10.c ! 2827055546b ./libf2c/libF77/r_log.c ! 548642897b ./libf2c/libF77/r_mod.c ! 2463929113b ./libf2c/libF77/r_nint.c ! 3199098034b ./libf2c/libF77/r_sign.c ! 2642530469b ./libf2c/libF77/r_sin.c ! 220860731b ./libf2c/libF77/r_sinh.c ! 2893293391b ./libf2c/libF77/r_sqrt.c ! 85460191b ./libf2c/libF77/r_tan.c ! 3469895314b ./libf2c/libF77/r_tanh.c ! 640128405b ./libf2c/libF77/s_cat.c ! 779675553b ./libf2c/libF77/s_cmp.c ! 1675956197b ./libf2c/libF77/s_copy.c ! 1364170531b ./libf2c/libF77/setarg.c ! 2295434596b ./libf2c/libF77/setsig.c ! 3891027752b ./libf2c/libF77/sig_die.c 1302607324b ./libf2c/libF77/signal1.h ! 4224588406b ./libf2c/libF77/signal1.h0 ! 4053384399b ./libf2c/libF77/signal_.c ! 2066061240b ./libf2c/libF77/s_paus.c ! 2010036224b ./libf2c/libF77/s_rnge.c ! 1481975032b ./libf2c/libF77/s_stop.c ! 2098642508b ./libf2c/libF77/system_.c ! 1442622178b ./libf2c/libF77/Version.c ! 2063164754b ./libf2c/libF77/z_abs.c ! 835487827b ./libf2c/libF77/z_cos.c ! 3418342039b ./libf2c/libF77/z_div.c ! 7408854b ./libf2c/libF77/z_exp.c ! 4262685973b ./libf2c/libF77/z_log.c ! 3558981315b ./libf2c/libF77/z_sin.c ! 1777351958b ./libf2c/libF77/z_sqrt.c ! 1429551872b ./libf2c/libI77/backspace.c ! 1478172370b ./libf2c/libI77/close.c 3442307107b ./libf2c/libI77/config.h.in ! 3562663626b ./libf2c/libI77/configure ! 2391287435b ./libf2c/libI77/configure.in ! 2571901921b ./libf2c/libI77/dfe.c ! 1378942569b ./libf2c/libI77/dolio.c ! 4101073344b ./libf2c/libI77/due.c ! 1688502163b ./libf2c/libI77/endfile.c ! 2838058360b ./libf2c/libI77/err.c ! 3698594684b ./libf2c/libI77/f2ch.add ! 1314493157b ./libf2c/libI77/fio.h ! 1922167015b ./libf2c/libI77/fmt.c ! 927515036b ./libf2c/libI77/fmt.h ! 1863392275b ./libf2c/libI77/fmtlib.c ! 3945834675b ./libf2c/libI77/fp.h ! 641707471b ./libf2c/libI77/ftell_.c ! 44510479b ./libf2c/libI77/iio.c ! 2702210774b ./libf2c/libI77/ilnw.c ! 2579029951b ./libf2c/libI77/inquire.c ! 2845426094b ./libf2c/libI77/lio.h ! 2339662760b ./libf2c/libI77/lread.c ! 2457359454b ./libf2c/libI77/lwrite.c ! 413813536b ./libf2c/libI77/Makefile.in 2636902289b ./libf2c/libI77/makefile.netlib ! 1384146782b ./libf2c/libI77/Notice ! 715736260b ./libf2c/libI77/open.c ! 110392506b ./libf2c/libI77/rdfmt.c ! 3744878144b ./libf2c/libI77/README.netlib ! 1384836661b ./libf2c/libI77/rewind.c ! 469225673b ./libf2c/libI77/rsfe.c ! 789788430b ./libf2c/libI77/rsli.c ! 3985654398b ./libf2c/libI77/rsne.c ! 2719705714b ./libf2c/libI77/sfe.c 216805921b ./libf2c/libI77/stamp-h.in ! 182573360b ./libf2c/libI77/sue.c ! 1467065886b ./libf2c/libI77/typesize.c ! 133188881b ./libf2c/libI77/uio.c ! 2599288354b ./libf2c/libI77/util.c ! 267355977b ./libf2c/libI77/Version.c ! 1343669172b ./libf2c/libI77/wref.c ! 2378602654b ./libf2c/libI77/wrtfmt.c ! 3995928311b ./libf2c/libI77/wsfe.c ! 2574376751b ./libf2c/libI77/wsle.c ! 2709711524b ./libf2c/libI77/wsne.c ! 3815521984b ./libf2c/libI77/xwsne.c ! 2464439682b ./libf2c/libU77/access_.c ! 4214861580b ./libf2c/libU77/acconfig.h ! 2301261828b ./libf2c/libU77/aclocal.m4 ! 4206795400b ./libf2c/libU77/alarm_.c ! 1380912688b ./libf2c/libU77/bes.c ! 1115737290b ./libf2c/libU77/chdir_.c ! 3821931374b ./libf2c/libU77/chmod_.c ! 3159418401b ./libf2c/libU77/config.hin ! 1372640931b ./libf2c/libU77/configure ! 111860866b ./libf2c/libU77/configure.in 508743035b ./libf2c/libU77/COPYING.LIB ! 2480064804b ./libf2c/libU77/ctime_.c ! 1870363175b ./libf2c/libU77/date_.c ! 3360553792b ./libf2c/libU77/datetime_.c ! 3553985240b ./libf2c/libU77/dbes.c ! 1697676533b ./libf2c/libU77/dtime_.c ! 2637605473b ./libf2c/libU77/etime_.c ! 3072504531b ./libf2c/libU77/fdate_.c ! 3670575902b ./libf2c/libU77/fgetc_.c ! 1851589385b ./libf2c/libU77/flush1_.c ! 2968704141b ./libf2c/libU77/fnum_.c ! 171328602b ./libf2c/libU77/fputc_.c ! 2392046259b ./libf2c/libU77/fstat_.c ! 3187794870b ./libf2c/libU77/gerror_.c ! 2452555318b ./libf2c/libU77/getcwd_.c ! 4194023935b ./libf2c/libU77/getgid_.c ! 18998824b ./libf2c/libU77/getlog_.c ! 2532774813b ./libf2c/libU77/getpid_.c ! 2006693946b ./libf2c/libU77/getuid_.c ! 3888874659b ./libf2c/libU77/gmtime_.c ! 834239509b ./libf2c/libU77/hostnm_.c ! 2001015675b ./libf2c/libU77/idate_.c ! 1617877237b ./libf2c/libU77/ierrno_.c ! 3441994535b ./libf2c/libU77/irand_.c ! 1914470547b ./libf2c/libU77/isatty_.c ! 2778638692b ./libf2c/libU77/itime_.c ! 4293322118b ./libf2c/libU77/kill_.c ! 1437720097b ./libf2c/libU77/link_.c ! 1296799026b ./libf2c/libU77/lnblnk_.c ! 398926786b ./libf2c/libU77/lstat_.c ! 2099416211b ./libf2c/libU77/ltime_.c ! 3265980298b ./libf2c/libU77/Makefile.in ! 1591902849b ./libf2c/libU77/mclock_.c ! 2823834342b ./libf2c/libU77/perror_.c 572996563b ./libf2c/libU77/PROJECTS + 763363676b ./libf2c/libU77/rand_.c 2980229902b ./libf2c/libU77/README ! 1327457751b ./libf2c/libU77/rename_.c ! 3477232826b ./libf2c/libU77/secnds_.c ! 3521234196b ./libf2c/libU77/second_.c ! 3632503793b ./libf2c/libU77/sleep_.c ! 2503000743b ./libf2c/libU77/srand_.c 216805921b ./libf2c/libU77/stamp-h.in ! 2344558464b ./libf2c/libU77/stat_.c ! 3936618975b ./libf2c/libU77/symlnk_.c ! 2777490142b ./libf2c/libU77/sys_clock_.c ! 3896790002b ./libf2c/libU77/time_.c ! 1750563591b ./libf2c/libU77/ttynam_.c 791266987b ./libf2c/libU77/u77-test.f ! 3528727832b ./libf2c/libU77/umask_.c ! 2495094887b ./libf2c/libU77/unlink_.c ! 2309533730b ./libf2c/libU77/Version.c ! 1291654081b ./libf2c/libU77/vxtidate_.c ! 4171477524b ./libf2c/libU77/vxttime_.c ! 4144310272b ./libf2c/Makefile.in 1384146782b ./libf2c/permission.netlib + 3111321221b ./libf2c/README 3513813969b ./libf2c/readme.netlib ! 308226469b ./libf2c/TODO 1812706554b ./libffi/acconfig.h 2067133813b ./libffi/acinclude.m4 724319761b ./libffi/aclocal.m4 ! 2035482090b ./libffi/ChangeLog ! 2702617959b ./libffi/ChangeLog.libgcj ! 1481682558b ./libffi/ChangeLog.v1 ! 1474348907b ./libffi/configure ! 530068231b ./libffi/configure.in ! 3275597189b ./libffi/fficonfig.h.in 3309556484b ./libffi/include/ffi_common.h + 1733019211b ./libffi/include/ffi.h.in 2321044801b ./libffi/include/ffi_mips.h + 1175058075b ./libffi/include/Makefile.am + 244394589b ./libffi/include/Makefile.in + 2593181117b ./libffi/LICENSE + 2695167608b ./libffi/Makefile.am + 3694438602b ./libffi/Makefile.in + 3508322383b ./libffi/README 3852747706b ./libffi/src/alpha/ffi.c 2032396460b ./libffi/src/alpha/osf.S ! 1065761440b ./libffi/src/arm/ffi.c ! 1757503563b ./libffi/src/arm/sysv.S 2669027491b ./libffi/src/debug.c ! 1429791466b ./libffi/src/ffitest.c 2435449601b ./libffi/src/ia64/ffi.c 1956966073b ./libffi/src/ia64/ia64_flags.h 2886414800b ./libffi/src/ia64/unix.S ! 1005272579b ./libffi/src/java_raw_api.c ! 3875823595b ./libffi/src/m68k/ffi.c 1684090594b ./libffi/src/m68k/sysv.S ! 3974415875b ./libffi/src/mips/ffi.c 176940890b ./libffi/src/mips/n32.S 3634355650b ./libffi/src/mips/o32.S 1122125803b ./libffi/src/powerpc/aix_closure.S + 1342850260b ./libffi/src/powerpc/aix.S 257105690b ./libffi/src/powerpc/asm.h ! 4115538808b ./libffi/src/powerpc/darwin_closure.S ! 3703527275b ./libffi/src/powerpc/darwin.S 1692071312b ./libffi/src/powerpc/ffi.c 2961975388b ./libffi/src/powerpc/ffi_darwin.c 978519837b ./libffi/src/powerpc/ppc_closure.S 1185461672b ./libffi/src/powerpc/sysv.S ! 3703360582b ./libffi/src/prep_cif.c 2419197691b ./libffi/src/raw_api.c ! 1997868904b ./libffi/src/s390/ffi.c ! 4021769301b ./libffi/src/s390/sysv.S ! 3513581803b ./libffi/src/sh/ffi.c ! 1941331637b ./libffi/src/sh/sysv.S ! 1230507525b ./libffi/src/sparc/ffi.c ! 3362405709b ./libffi/src/sparc/v8.S ! 3260083111b ./libffi/src/sparc/v9.S ! 524688417b ./libffi/src/types.c ! 3320856843b ./libffi/src/x86/ffi64.c ! 2484336261b ./libffi/src/x86/ffi.c ! 1341124901b ./libffi/src/x86/sysv.S ! 3837950194b ./libffi/src/x86/unix64.S ! 3296190987b ./libffi/src/x86/win32.S 216805921b ./libffi/stamp-h.in 3848560079b ./libiberty/acconfig.h 640604299b ./libiberty/aclocal.m4 4169173798b ./libiberty/alloca.c *************** *** 11560,11633 **** 1033916047b ./libiberty/bsearch.c 2389959529b ./libiberty/bzero.c 1591293922b ./libiberty/calloc.c 2264262326b ./libiberty/choose-temp.c 2557767520b ./libiberty/clock.c 3170582338b ./libiberty/concat.c 1987387424b ./libiberty/config.h-vms ! 257229344b ./libiberty/config.in ! 4294237366b ./libiberty/config.table 3500529335b ./libiberty/config/mh-aix 3476234501b ./libiberty/config/mh-cxux7 1235651640b ./libiberty/config/mh-fbsd21 2904567379b ./libiberty/config/mh-openedition 2131807358b ./libiberty/config/mh-windows ! 575752138b ./libiberty/configure ! 1313961034b ./libiberty/configure.in 2478885430b ./libiberty/copying-lib.texi 3329761531b ./libiberty/copysign.c ! 2979121734b ./libiberty/cp-demangle.c ! 2109007668b ./libiberty/cplus-dem.c 3785501494b ./libiberty/dyn-string.c 1492855576b ./libiberty/fdmatch.c 3977780801b ./libiberty/ffs.c ! 2257696761b ./libiberty/fibheap.c ! 2495949053b ./libiberty/floatformat.c 1510070689b ./libiberty/fnmatch.c 1078076716b ./libiberty/fnmatch.txh ! 85493406b ./libiberty/functions.texi 3789905598b ./libiberty/gather-docs 2046253791b ./libiberty/getcwd.c - 3944018229b ./libiberty/getopt.c 2320609345b ./libiberty/getopt1.c 3996466380b ./libiberty/getpagesize.c 2690816019b ./libiberty/getpwd.c ! 3425858883b ./libiberty/getruntime.c ! 725846775b ./libiberty/hashtab.c ! 1870214410b ./libiberty/hex.c 3335497459b ./libiberty/index.c 3255705408b ./libiberty/insque.c ! 1676968368b ./libiberty/lbasename.c ! 1958824006b ./libiberty/libiberty.texi 3183084918b ./libiberty/maint-tool ! 2495473509b ./libiberty/make-temp-file.c 3226217883b ./libiberty/makefile.vms ! 3176875729b ./libiberty/md5.c 1640952211b ./libiberty/memchr.c 2120544197b ./libiberty/memcmp.c 998344495b ./libiberty/memcpy.c 1685999989b ./libiberty/memmove.c 781584880b ./libiberty/memset.c 1326635668b ./libiberty/mkstemps.c 2010995764b ./libiberty/mpw-config.in 1580171809b ./libiberty/mpw-make.sed - 3930704547b ./libiberty/mpw.c 2503648631b ./libiberty/msdos.c 196373918b ./libiberty/objalloc.c 317557207b ./libiberty/obstack.c 3821010694b ./libiberty/obstacks.texi 1735078044b ./libiberty/partition.c 2798791758b ./libiberty/pexecute.c 3819346820b ./libiberty/putenv.c 4197438328b ./libiberty/random.c ! 4045358849b ./libiberty/regex.c 1175910896b ./libiberty/rename.c 2903758838b ./libiberty/rindex.c ! 2149284318b ./libiberty/safe-ctype.c 779495612b ./libiberty/setenv.c 1334646884b ./libiberty/sigsetmask.c 532242404b ./libiberty/sort.c 4103476962b ./libiberty/spaces.c ! 656918725b ./libiberty/splay-tree.c 2341714522b ./libiberty/strcasecmp.c 4233130047b ./libiberty/strchr.c 18952980b ./libiberty/strdup.c --- 12107,12187 ---- 1033916047b ./libiberty/bsearch.c 2389959529b ./libiberty/bzero.c 1591293922b ./libiberty/calloc.c + 20480493b ./libiberty/ChangeLog 2264262326b ./libiberty/choose-temp.c 2557767520b ./libiberty/clock.c 3170582338b ./libiberty/concat.c 1987387424b ./libiberty/config.h-vms ! 3647623834b ./libiberty/config.in 3500529335b ./libiberty/config/mh-aix 3476234501b ./libiberty/config/mh-cxux7 1235651640b ./libiberty/config/mh-fbsd21 2904567379b ./libiberty/config/mh-openedition 2131807358b ./libiberty/config/mh-windows ! 2543977175b ./libiberty/config.table ! 3739674717b ./libiberty/configure ! 1377838630b ./libiberty/configure.in ! 508743035b ./libiberty/COPYING.LIB 2478885430b ./libiberty/copying-lib.texi 3329761531b ./libiberty/copysign.c ! 1701501400b ./libiberty/cp-demangle.c ! 2540319089b ./libiberty/cplus-dem.c ! 602306638b ./libiberty/_doprnt.c 3785501494b ./libiberty/dyn-string.c 1492855576b ./libiberty/fdmatch.c 3977780801b ./libiberty/ffs.c ! 3028952516b ./libiberty/fibheap.c ! 211982368b ./libiberty/floatformat.c 1510070689b ./libiberty/fnmatch.c 1078076716b ./libiberty/fnmatch.txh ! 1804042475b ./libiberty/functions.texi 3789905598b ./libiberty/gather-docs 2046253791b ./libiberty/getcwd.c 2320609345b ./libiberty/getopt1.c + 8121880b ./libiberty/getopt.c 3996466380b ./libiberty/getpagesize.c 2690816019b ./libiberty/getpwd.c ! 3452871343b ./libiberty/getruntime.c ! 1952887063b ./libiberty/hashtab.c ! 2688336720b ./libiberty/hex.c 3335497459b ./libiberty/index.c 3255705408b ./libiberty/insque.c ! 1913216598b ./libiberty/lbasename.c ! 327045341b ./libiberty/libiberty.texi 3183084918b ./libiberty/maint-tool ! 2821047856b ./libiberty/Makefile.in 3226217883b ./libiberty/makefile.vms ! 2785210701b ./libiberty/make-relative-prefix.c ! 2495473509b ./libiberty/make-temp-file.c ! 2576148307b ./libiberty/md5.c 1640952211b ./libiberty/memchr.c 2120544197b ./libiberty/memcmp.c 998344495b ./libiberty/memcpy.c 1685999989b ./libiberty/memmove.c 781584880b ./libiberty/memset.c 1326635668b ./libiberty/mkstemps.c + 3930704547b ./libiberty/mpw.c 2010995764b ./libiberty/mpw-config.in 1580171809b ./libiberty/mpw-make.sed 2503648631b ./libiberty/msdos.c 196373918b ./libiberty/objalloc.c 317557207b ./libiberty/obstack.c 3821010694b ./libiberty/obstacks.texi 1735078044b ./libiberty/partition.c 2798791758b ./libiberty/pexecute.c + 2767667075b ./libiberty/physmem.c 3819346820b ./libiberty/putenv.c 4197438328b ./libiberty/random.c ! 2709928858b ./libiberty/README ! 1551948166b ./libiberty/regex.c 1175910896b ./libiberty/rename.c 2903758838b ./libiberty/rindex.c ! 2643208427b ./libiberty/safe-ctype.c 779495612b ./libiberty/setenv.c 1334646884b ./libiberty/sigsetmask.c 532242404b ./libiberty/sort.c 4103476962b ./libiberty/spaces.c ! 1094241807b ./libiberty/splay-tree.c 2341714522b ./libiberty/strcasecmp.c 4233130047b ./libiberty/strchr.c 18952980b ./libiberty/strdup.c *************** *** 11641,11696 **** 2287814393b ./libiberty/strtol.c 1828706574b ./libiberty/strtoul.c 3268886825b ./libiberty/ternary.c ! 2389145348b ./libiberty/testsuite/Makefile.in ! 3508543088b ./libiberty/testsuite/demangle-expected ! 2944174175b ./libiberty/testsuite/regress-demangle 3862028978b ./libiberty/tmpnam.c ! 3018358591b ./libiberty/vasprintf.c 3875192457b ./libiberty/vfork.c 3556593952b ./libiberty/vfprintf.c 2773716443b ./libiberty/vmsbuild.com 3899232273b ./libiberty/vprintf.c 3719865817b ./libiberty/vsprintf.c ! 192504561b ./libiberty/waitpid.c 3482083725b ./libiberty/xatexit.c 805686844b ./libiberty/xexit.c ! 3313408860b ./libiberty/xmalloc.c 1302531664b ./libiberty/xmemdup.c 991611298b ./libiberty/xstrdup.c 387398324b ./libiberty/xstrerror.c ! 2171125041b ./libjava/COPYING ! 520335338b ./libjava/ChangeLog 3473562392b ./libjava/ChangeLog-1999 2385951174b ./libjava/ChangeLog-2001 ! 1487334009b ./libjava/HACKING ! 1362543266b ./libjava/LIBGCJ_LICENSE ! 2383594386b ./libjava/Makefile.am ! 1578178085b ./libjava/Makefile.in ! 4049677327b ./libjava/NEWS ! 3199155412b ./libjava/README ! 3410290178b ./libjava/THANKS ! 426063533b ./libjava/acconfig.h ! 3221815868b ./libjava/acinclude.m4 ! 3506621156b ./libjava/aclocal.m4 ! 3784840223b ./libjava/addr2name.awk ! 2317653915b ./libjava/boehm.cc ! 3218668682b ./libjava/configure ! 2328290871b ./libjava/configure.host ! 3906507712b ./libjava/configure.in ! 3097747965b ./libjava/defineclass.cc 535801509b ./libjava/doc/cni.sgml 1183730379b ./libjava/exception.cc - 1011701793b ./libjava/gcj/Makefile.am - 3428145469b ./libjava/gcj/Makefile.in 3591403769b ./libjava/gcj/array.h ! 1281724033b ./libjava/gcj/cni.h 227606957b ./libjava/gcj/field.h ! 1774648773b ./libjava/gcj/javaprims.h 1775313853b ./libjava/gcj/libgcj-config.h.in 1073488355b ./libjava/gcj/method.h ! 1055027936b ./libjava/gij.cc ! 2535888045b ./libjava/gnu/awt/LightweightRedirector.java 1596689297b ./libjava/gnu/awt/gtk/GtkButtonPeer.java 3410609778b ./libjava/gnu/awt/gtk/GtkComponentPeer.java 2912275709b ./libjava/gnu/awt/gtk/GtkContainerPeer.java 1877686985b ./libjava/gnu/awt/gtk/GtkFramePeer.java --- 12195,12245 ---- 2287814393b ./libiberty/strtol.c 1828706574b ./libiberty/strtoul.c 3268886825b ./libiberty/ternary.c ! 103243516b ./libiberty/testsuite/demangle-expected ! 4279220892b ./libiberty/testsuite/Makefile.in ! 2193003674b ./libiberty/testsuite/test-demangle.c 3862028978b ./libiberty/tmpnam.c ! 2419507931b ./libiberty/vasprintf.c 3875192457b ./libiberty/vfork.c 3556593952b ./libiberty/vfprintf.c 2773716443b ./libiberty/vmsbuild.com 3899232273b ./libiberty/vprintf.c 3719865817b ./libiberty/vsprintf.c ! 436796946b ./libiberty/waitpid.c 3482083725b ./libiberty/xatexit.c 805686844b ./libiberty/xexit.c ! 1512407367b ./libiberty/xmalloc.c 1302531664b ./libiberty/xmemdup.c 991611298b ./libiberty/xstrdup.c 387398324b ./libiberty/xstrerror.c ! 3884330632b ./libjava/acconfig.h ! 3589880985b ./libjava/acinclude.m4 ! 3744134120b ./libjava/aclocal.m4 ! 3784840223b ./libjava/addr2name.awk ! 1162779077b ./libjava/boehm.cc ! 1329310134b ./libjava/ChangeLog 3473562392b ./libjava/ChangeLog-1999 2385951174b ./libjava/ChangeLog-2001 ! 3567051743b ./libjava/configure ! 1341552609b ./libjava/configure.host ! 1530067760b ./libjava/configure.in ! 2171125041b ./libjava/COPYING ! 177999057b ./libjava/defineclass.cc 535801509b ./libjava/doc/cni.sgml 1183730379b ./libjava/exception.cc 3591403769b ./libjava/gcj/array.h ! 3965696277b ./libjava/gcj/cni.h ! 724593360b ./libjava/gcj/.cvsignore 227606957b ./libjava/gcj/field.h ! 1482145418b ./libjava/gcj/javaprims.h 1775313853b ./libjava/gcj/libgcj-config.h.in + 1011701793b ./libjava/gcj/Makefile.am + 2471533732b ./libjava/gcj/Makefile.in 1073488355b ./libjava/gcj/method.h ! 2464224985b ./libjava/gij.cc 1596689297b ./libjava/gnu/awt/gtk/GtkButtonPeer.java + 922026864b ./libjava/gnu/awt/gtk/gtkcommon.cc + 3699017559b ./libjava/gnu/awt/gtk/gtkcommon.h 3410609778b ./libjava/gnu/awt/gtk/GtkComponentPeer.java 2912275709b ./libjava/gnu/awt/gtk/GtkContainerPeer.java 1877686985b ./libjava/gnu/awt/gtk/GtkFramePeer.java *************** *** 11698,11705 **** 3368349978b ./libjava/gnu/awt/gtk/GtkMainThread.java 2212086115b ./libjava/gnu/awt/gtk/GtkToolkit.java 466557738b ./libjava/gnu/awt/gtk/GtkWindowPeer.java - 922026864b ./libjava/gnu/awt/gtk/gtkcommon.cc - 3699017559b ./libjava/gnu/awt/gtk/gtkcommon.h 3416961245b ./libjava/gnu/awt/gtk/natGtkButtonPeer.cc 2501282912b ./libjava/gnu/awt/gtk/natGtkComponentPeer.cc 861082488b ./libjava/gnu/awt/gtk/natGtkContainerPeer.cc --- 12247,12252 ---- *************** *** 11709,11827 **** 968113131b ./libjava/gnu/awt/gtk/natGtkToolkit.cc 2864147854b ./libjava/gnu/awt/gtk/natGtkWindowPeer.cc 2742774547b ./libjava/gnu/awt/j2d/AbstractGraphicsState.java ! 298830684b ./libjava/gnu/awt/j2d/DirectRasterGraphics.java ! 1783524857b ./libjava/gnu/awt/j2d/Graphics2DImpl.java ! 2946615030b ./libjava/gnu/awt/j2d/IntegerGraphicsState.java 823126662b ./libjava/gnu/awt/j2d/MappedRaster.java 4203439929b ./libjava/gnu/awt/xlib/XCanvasPeer.java 3055110597b ./libjava/gnu/awt/xlib/XEventLoop.java 2886723915b ./libjava/gnu/awt/xlib/XEventQueue.java 1386185884b ./libjava/gnu/awt/xlib/XFontMetrics.java 1240842045b ./libjava/gnu/awt/xlib/XFramePeer.java ! 1394253720b ./libjava/gnu/awt/xlib/XGraphics.java ! 1292730399b ./libjava/gnu/awt/xlib/XGraphicsConfiguration.java 4211424512b ./libjava/gnu/awt/xlib/XPanelPeer.java ! 2089387515b ./libjava/gnu/awt/xlib/XToolkit.java ! 3357000131b ./libjava/gnu/classpath/Configuration.java.in ! 2882288660b ./libjava/gnu/gcj/Core.java ! 2282503099b ./libjava/gnu/gcj/RawData.java 2926627917b ./libjava/gnu/gcj/convert/Blocks-3.txt 958965717b ./libjava/gnu/gcj/convert/BytesToUnicode.java 3687721297b ./libjava/gnu/gcj/convert/Convert.java ! 1955248518b ./libjava/gnu/gcj/convert/IOConverter.java 624954174b ./libjava/gnu/gcj/convert/Input_8859_1.java 1230020474b ./libjava/gnu/gcj/convert/Input_ASCII.java 271098151b ./libjava/gnu/gcj/convert/Input_EUCJIS.java 2185755288b ./libjava/gnu/gcj/convert/Input_JavaSrc.java 2110225778b ./libjava/gnu/gcj/convert/Input_SJIS.java 1513325785b ./libjava/gnu/gcj/convert/Input_UTF8.java ! 1595200171b ./libjava/gnu/gcj/convert/Input_iconv.java 3459137842b ./libjava/gnu/gcj/convert/JIS0201.h 2049723314b ./libjava/gnu/gcj/convert/JIS0208.h 4153637973b ./libjava/gnu/gcj/convert/JIS0208_to_Unicode.cc 1075531862b ./libjava/gnu/gcj/convert/JIS0212.h 2320550799b ./libjava/gnu/gcj/convert/JIS0212_to_Unicode.cc 2034070368b ./libjava/gnu/gcj/convert/Output_8859_1.java 4217873292b ./libjava/gnu/gcj/convert/Output_ASCII.java 842766967b ./libjava/gnu/gcj/convert/Output_EUCJIS.java 3127943909b ./libjava/gnu/gcj/convert/Output_JavaSrc.java 3336489456b ./libjava/gnu/gcj/convert/Output_SJIS.java 1644529420b ./libjava/gnu/gcj/convert/Output_UTF8.java - 58644124b ./libjava/gnu/gcj/convert/Output_iconv.java 2459634193b ./libjava/gnu/gcj/convert/UnicodeCharacterDatabase-3.0.0.html 2507096442b ./libjava/gnu/gcj/convert/UnicodeData-3.0.0.txt 4262149961b ./libjava/gnu/gcj/convert/UnicodeToBytes.java 2676798711b ./libjava/gnu/gcj/convert/Unicode_to_JIS.cc ! 2990675168b ./libjava/gnu/gcj/convert/gen-from-JIS.c ! 3112494990b ./libjava/gnu/gcj/convert/make-trie.c ! 2305784698b ./libjava/gnu/gcj/convert/natIconv.cc ! 3409212961b ./libjava/gnu/gcj/convert/natInput_EUCJIS.cc ! 2514359574b ./libjava/gnu/gcj/convert/natInput_SJIS.cc ! 784829283b ./libjava/gnu/gcj/convert/natOutput_EUCJIS.cc ! 4119160238b ./libjava/gnu/gcj/convert/natOutput_SJIS.cc 3580885543b ./libjava/gnu/gcj/io/DefaultMimeTypes.java 1393439370b ./libjava/gnu/gcj/io/MimeTypes.java - 595453629b ./libjava/gnu/gcj/io/SimpleSHSStream.java 1645841998b ./libjava/gnu/gcj/io/natSimpleSHSStream.cc 88411881b ./libjava/gnu/gcj/io/shs.cc 3951902308b ./libjava/gnu/gcj/io/shs.h 19196032b ./libjava/gnu/gcj/natCore.cc ! 3713902803b ./libjava/gnu/gcj/protocol/core/Connection.java 1924151198b ./libjava/gnu/gcj/protocol/core/CoreInputStream.java 2886826729b ./libjava/gnu/gcj/protocol/core/Handler.java 3112605791b ./libjava/gnu/gcj/protocol/core/natCoreInputStream.cc ! 640992483b ./libjava/gnu/gcj/protocol/file/Connection.java 3103931425b ./libjava/gnu/gcj/protocol/file/Handler.java ! 635772836b ./libjava/gnu/gcj/protocol/http/Connection.java 132815256b ./libjava/gnu/gcj/protocol/http/Handler.java ! 2878492435b ./libjava/gnu/gcj/protocol/jar/Connection.java 1743208466b ./libjava/gnu/gcj/protocol/jar/Handler.java 501773112b ./libjava/gnu/gcj/runtime/FileDeleter.java 1535802220b ./libjava/gnu/gcj/runtime/FinalizerThread.java 1105934296b ./libjava/gnu/gcj/runtime/FirstThread.java 4204305482b ./libjava/gnu/gcj/runtime/JNIWeakRef.java ! 2135835481b ./libjava/gnu/gcj/runtime/SharedLibLoader.java ! 3369847265b ./libjava/gnu/gcj/runtime/StringBuffer.java ! 3662016298b ./libjava/gnu/gcj/runtime/VMClassLoader.java 1025799273b ./libjava/gnu/gcj/runtime/natFinalizerThread.cc 1558736281b ./libjava/gnu/gcj/runtime/natFirstThread.cc 2521984623b ./libjava/gnu/gcj/runtime/natSharedLibLoader.cc 2150610459b ./libjava/gnu/gcj/runtime/natStringBuffer.cc 66527498b ./libjava/gnu/gcj/xlib/Clip.java 2501208995b ./libjava/gnu/gcj/xlib/Colormap.java 4007691160b ./libjava/gnu/gcj/xlib/Display.java 334010163b ./libjava/gnu/gcj/xlib/Drawable.java 3794271918b ./libjava/gnu/gcj/xlib/Font.java ! 2207398681b ./libjava/gnu/gcj/xlib/GC.java ! 3285825579b ./libjava/gnu/gcj/xlib/Pixmap.java ! 3350074944b ./libjava/gnu/gcj/xlib/Screen.java ! 442092378b ./libjava/gnu/gcj/xlib/Visual.java ! 540355668b ./libjava/gnu/gcj/xlib/WMSizeHints.java ! 2300472805b ./libjava/gnu/gcj/xlib/Window.java ! 2703412405b ./libjava/gnu/gcj/xlib/WindowAttributes.java ! 735616079b ./libjava/gnu/gcj/xlib/XAnyEvent.java ! 2053093871b ./libjava/gnu/gcj/xlib/XButtonEvent.java ! 1193490335b ./libjava/gnu/gcj/xlib/XColor.java ! 3412915905b ./libjava/gnu/gcj/xlib/XConfigureEvent.java ! 3680444774b ./libjava/gnu/gcj/xlib/XConnectException.java ! 3758585380b ./libjava/gnu/gcj/xlib/XEvent.java ! 2109559056b ./libjava/gnu/gcj/xlib/XException.java ! 3813405109b ./libjava/gnu/gcj/xlib/XExposeEvent.java ! 1394364288b ./libjava/gnu/gcj/xlib/XID.java ! 2651203935b ./libjava/gnu/gcj/xlib/XImage.java ! 623452528b ./libjava/gnu/gcj/xlib/XUnmapEvent.java 2721622585b ./libjava/gnu/gcj/xlib/natClip.cc 313845725b ./libjava/gnu/gcj/xlib/natColormap.cc 4037646551b ./libjava/gnu/gcj/xlib/natDisplay.cc 639031309b ./libjava/gnu/gcj/xlib/natDrawable.cc 1648177432b ./libjava/gnu/gcj/xlib/natFont.cc ! 61045074b ./libjava/gnu/gcj/xlib/natGC.cc 2441230090b ./libjava/gnu/gcj/xlib/natPixmap.cc 1112468906b ./libjava/gnu/gcj/xlib/natScreen.cc 3505240565b ./libjava/gnu/gcj/xlib/natVisual.cc - 2728656554b ./libjava/gnu/gcj/xlib/natWMSizeHints.cc - 3715533436b ./libjava/gnu/gcj/xlib/natWindow.cc 49610297b ./libjava/gnu/gcj/xlib/natWindowAttributes.cc 2928451851b ./libjava/gnu/gcj/xlib/natXAnyEvent.cc 1448210768b ./libjava/gnu/gcj/xlib/natXButtonEvent.cc 1690231537b ./libjava/gnu/gcj/xlib/natXColor.cc --- 12256,12364 ---- 968113131b ./libjava/gnu/awt/gtk/natGtkToolkit.cc 2864147854b ./libjava/gnu/awt/gtk/natGtkWindowPeer.cc 2742774547b ./libjava/gnu/awt/j2d/AbstractGraphicsState.java ! 3526842747b ./libjava/gnu/awt/j2d/DirectRasterGraphics.java ! 2239051370b ./libjava/gnu/awt/j2d/Graphics2DImpl.java ! 2433840214b ./libjava/gnu/awt/j2d/IntegerGraphicsState.java 823126662b ./libjava/gnu/awt/j2d/MappedRaster.java + 2535888045b ./libjava/gnu/awt/LightweightRedirector.java 4203439929b ./libjava/gnu/awt/xlib/XCanvasPeer.java 3055110597b ./libjava/gnu/awt/xlib/XEventLoop.java 2886723915b ./libjava/gnu/awt/xlib/XEventQueue.java 1386185884b ./libjava/gnu/awt/xlib/XFontMetrics.java 1240842045b ./libjava/gnu/awt/xlib/XFramePeer.java ! 2099207950b ./libjava/gnu/awt/xlib/XGraphicsConfiguration.java ! 3343357972b ./libjava/gnu/awt/xlib/XGraphics.java 4211424512b ./libjava/gnu/awt/xlib/XPanelPeer.java ! 1597864113b ./libjava/gnu/awt/xlib/XToolkit.java ! 3229059960b ./libjava/gnu/classpath/Configuration.java.in 2926627917b ./libjava/gnu/gcj/convert/Blocks-3.txt 958965717b ./libjava/gnu/gcj/convert/BytesToUnicode.java 3687721297b ./libjava/gnu/gcj/convert/Convert.java ! 2990675168b ./libjava/gnu/gcj/convert/gen-from-JIS.c 624954174b ./libjava/gnu/gcj/convert/Input_8859_1.java 1230020474b ./libjava/gnu/gcj/convert/Input_ASCII.java 271098151b ./libjava/gnu/gcj/convert/Input_EUCJIS.java + 1595200171b ./libjava/gnu/gcj/convert/Input_iconv.java 2185755288b ./libjava/gnu/gcj/convert/Input_JavaSrc.java 2110225778b ./libjava/gnu/gcj/convert/Input_SJIS.java 1513325785b ./libjava/gnu/gcj/convert/Input_UTF8.java ! 1955248518b ./libjava/gnu/gcj/convert/IOConverter.java 3459137842b ./libjava/gnu/gcj/convert/JIS0201.h 2049723314b ./libjava/gnu/gcj/convert/JIS0208.h 4153637973b ./libjava/gnu/gcj/convert/JIS0208_to_Unicode.cc 1075531862b ./libjava/gnu/gcj/convert/JIS0212.h 2320550799b ./libjava/gnu/gcj/convert/JIS0212_to_Unicode.cc + 3112494990b ./libjava/gnu/gcj/convert/make-trie.c + 2305784698b ./libjava/gnu/gcj/convert/natIconv.cc + 3409212961b ./libjava/gnu/gcj/convert/natInput_EUCJIS.cc + 2514359574b ./libjava/gnu/gcj/convert/natInput_SJIS.cc + 784829283b ./libjava/gnu/gcj/convert/natOutput_EUCJIS.cc + 4119160238b ./libjava/gnu/gcj/convert/natOutput_SJIS.cc 2034070368b ./libjava/gnu/gcj/convert/Output_8859_1.java 4217873292b ./libjava/gnu/gcj/convert/Output_ASCII.java 842766967b ./libjava/gnu/gcj/convert/Output_EUCJIS.java + 58644124b ./libjava/gnu/gcj/convert/Output_iconv.java 3127943909b ./libjava/gnu/gcj/convert/Output_JavaSrc.java 3336489456b ./libjava/gnu/gcj/convert/Output_SJIS.java 1644529420b ./libjava/gnu/gcj/convert/Output_UTF8.java 2459634193b ./libjava/gnu/gcj/convert/UnicodeCharacterDatabase-3.0.0.html 2507096442b ./libjava/gnu/gcj/convert/UnicodeData-3.0.0.txt 4262149961b ./libjava/gnu/gcj/convert/UnicodeToBytes.java 2676798711b ./libjava/gnu/gcj/convert/Unicode_to_JIS.cc ! 2882288660b ./libjava/gnu/gcj/Core.java 3580885543b ./libjava/gnu/gcj/io/DefaultMimeTypes.java 1393439370b ./libjava/gnu/gcj/io/MimeTypes.java 1645841998b ./libjava/gnu/gcj/io/natSimpleSHSStream.cc 88411881b ./libjava/gnu/gcj/io/shs.cc 3951902308b ./libjava/gnu/gcj/io/shs.h + 595453629b ./libjava/gnu/gcj/io/SimpleSHSStream.java 19196032b ./libjava/gnu/gcj/natCore.cc ! 3355622759b ./libjava/gnu/gcj/protocol/core/Connection.java 1924151198b ./libjava/gnu/gcj/protocol/core/CoreInputStream.java 2886826729b ./libjava/gnu/gcj/protocol/core/Handler.java 3112605791b ./libjava/gnu/gcj/protocol/core/natCoreInputStream.cc ! 2654635341b ./libjava/gnu/gcj/protocol/file/Connection.java 3103931425b ./libjava/gnu/gcj/protocol/file/Handler.java ! 3815212660b ./libjava/gnu/gcj/protocol/http/Connection.java 132815256b ./libjava/gnu/gcj/protocol/http/Handler.java ! 2968724550b ./libjava/gnu/gcj/protocol/jar/Connection.java 1743208466b ./libjava/gnu/gcj/protocol/jar/Handler.java + 2282503099b ./libjava/gnu/gcj/RawData.java 501773112b ./libjava/gnu/gcj/runtime/FileDeleter.java 1535802220b ./libjava/gnu/gcj/runtime/FinalizerThread.java 1105934296b ./libjava/gnu/gcj/runtime/FirstThread.java 4204305482b ./libjava/gnu/gcj/runtime/JNIWeakRef.java ! 404324331b ./libjava/gnu/gcj/runtime/MethodRef.java ! 1025270005b ./libjava/gnu/gcj/runtime/NameFinder.java 1025799273b ./libjava/gnu/gcj/runtime/natFinalizerThread.cc 1558736281b ./libjava/gnu/gcj/runtime/natFirstThread.cc + 1348605213b ./libjava/gnu/gcj/runtime/natNameFinder.cc 2521984623b ./libjava/gnu/gcj/runtime/natSharedLibLoader.cc + 4052355658b ./libjava/gnu/gcj/runtime/natStackTrace.cc 2150610459b ./libjava/gnu/gcj/runtime/natStringBuffer.cc + 924636906b ./libjava/gnu/gcj/runtime/natVMClassLoader.cc + 2135835481b ./libjava/gnu/gcj/runtime/SharedLibLoader.java + 800781577b ./libjava/gnu/gcj/runtime/StackTrace.java + 3369847265b ./libjava/gnu/gcj/runtime/StringBuffer.java + 1651542781b ./libjava/gnu/gcj/runtime/VMClassLoader.java 66527498b ./libjava/gnu/gcj/xlib/Clip.java 2501208995b ./libjava/gnu/gcj/xlib/Colormap.java 4007691160b ./libjava/gnu/gcj/xlib/Display.java 334010163b ./libjava/gnu/gcj/xlib/Drawable.java 3794271918b ./libjava/gnu/gcj/xlib/Font.java ! 2076853606b ./libjava/gnu/gcj/xlib/GC.java 2721622585b ./libjava/gnu/gcj/xlib/natClip.cc 313845725b ./libjava/gnu/gcj/xlib/natColormap.cc 4037646551b ./libjava/gnu/gcj/xlib/natDisplay.cc 639031309b ./libjava/gnu/gcj/xlib/natDrawable.cc 1648177432b ./libjava/gnu/gcj/xlib/natFont.cc ! 398458936b ./libjava/gnu/gcj/xlib/natGC.cc 2441230090b ./libjava/gnu/gcj/xlib/natPixmap.cc 1112468906b ./libjava/gnu/gcj/xlib/natScreen.cc 3505240565b ./libjava/gnu/gcj/xlib/natVisual.cc 49610297b ./libjava/gnu/gcj/xlib/natWindowAttributes.cc + 3715533436b ./libjava/gnu/gcj/xlib/natWindow.cc + 2728656554b ./libjava/gnu/gcj/xlib/natWMSizeHints.cc 2928451851b ./libjava/gnu/gcj/xlib/natXAnyEvent.cc 1448210768b ./libjava/gnu/gcj/xlib/natXButtonEvent.cc 1690231537b ./libjava/gnu/gcj/xlib/natXColor.cc *************** *** 11830,11843 **** 1109730421b ./libjava/gnu/gcj/xlib/natXExposeEvent.cc 2724939209b ./libjava/gnu/gcj/xlib/natXImage.cc 2947736072b ./libjava/gnu/gcj/xlib/natXUnmapEvent.cc 251988486b ./libjava/gnu/java/awt/BitMaskExtent.java 2959084409b ./libjava/gnu/java/awt/Buffers.java 3864124155b ./libjava/gnu/java/awt/ComponentDataBlitOp.java 76001054b ./libjava/gnu/java/awt/GLightweightPeer.java 4175984299b ./libjava/gnu/java/beans/BeanInfoEmbryo.java - 1050980841b ./libjava/gnu/java/beans/EmptyBeanInfo.java - 4274204668b ./libjava/gnu/java/beans/ExplicitBeanInfo.java - 2859546207b ./libjava/gnu/java/beans/IntrospectionIncubator.java 1186439895b ./libjava/gnu/java/beans/editors/ColorEditor.java 1824068032b ./libjava/gnu/java/beans/editors/FontEditor.java 1141912550b ./libjava/gnu/java/beans/editors/NativeBooleanEditor.java --- 12367,12397 ---- 1109730421b ./libjava/gnu/gcj/xlib/natXExposeEvent.cc 2724939209b ./libjava/gnu/gcj/xlib/natXImage.cc 2947736072b ./libjava/gnu/gcj/xlib/natXUnmapEvent.cc + 3285825579b ./libjava/gnu/gcj/xlib/Pixmap.java + 3350074944b ./libjava/gnu/gcj/xlib/Screen.java + 442092378b ./libjava/gnu/gcj/xlib/Visual.java + 2703412405b ./libjava/gnu/gcj/xlib/WindowAttributes.java + 2300472805b ./libjava/gnu/gcj/xlib/Window.java + 540355668b ./libjava/gnu/gcj/xlib/WMSizeHints.java + 735616079b ./libjava/gnu/gcj/xlib/XAnyEvent.java + 2053093871b ./libjava/gnu/gcj/xlib/XButtonEvent.java + 1193490335b ./libjava/gnu/gcj/xlib/XColor.java + 3412915905b ./libjava/gnu/gcj/xlib/XConfigureEvent.java + 3680444774b ./libjava/gnu/gcj/xlib/XConnectException.java + 3758585380b ./libjava/gnu/gcj/xlib/XEvent.java + 2109559056b ./libjava/gnu/gcj/xlib/XException.java + 3813405109b ./libjava/gnu/gcj/xlib/XExposeEvent.java + 1394364288b ./libjava/gnu/gcj/xlib/XID.java + 2651203935b ./libjava/gnu/gcj/xlib/XImage.java + 623452528b ./libjava/gnu/gcj/xlib/XUnmapEvent.java 251988486b ./libjava/gnu/java/awt/BitMaskExtent.java 2959084409b ./libjava/gnu/java/awt/Buffers.java 3864124155b ./libjava/gnu/java/awt/ComponentDataBlitOp.java + 3006777506b ./libjava/gnu/java/awt/EventModifier.java 76001054b ./libjava/gnu/java/awt/GLightweightPeer.java + 1265528252b ./libjava/gnu/java/awt/image/ImageDecoder.java + 793939877b ./libjava/gnu/java/awt/image/XBMDecoder.java 4175984299b ./libjava/gnu/java/beans/BeanInfoEmbryo.java 1186439895b ./libjava/gnu/java/beans/editors/ColorEditor.java 1824068032b ./libjava/gnu/java/beans/editors/FontEditor.java 1141912550b ./libjava/gnu/java/beans/editors/NativeBooleanEditor.java *************** *** 11848,11866 **** 3649786395b ./libjava/gnu/java/beans/editors/NativeLongEditor.java 2388248931b ./libjava/gnu/java/beans/editors/NativeShortEditor.java 84373625b ./libjava/gnu/java/beans/editors/StringEditor.java 3309737548b ./libjava/gnu/java/beans/info/ComponentBeanInfo.java 1517826185b ./libjava/gnu/java/io/ClassLoaderObjectInputStream.java 185400995b ./libjava/gnu/java/io/NullOutputStream.java 337775204b ./libjava/gnu/java/io/ObjectIdentityWrapper.java 412146955b ./libjava/gnu/java/lang/ArrayHelper.java 1957385229b ./libjava/gnu/java/lang/CharData.java 1294839044b ./libjava/gnu/java/lang/ClassHelper.java ! 375881807b ./libjava/gnu/java/lang/reflect/TypeSignature.java ! 3367817123b ./libjava/gnu/java/locale/Calendar.java 3366025795b ./libjava/gnu/java/locale/Calendar_de.java 3838960820b ./libjava/gnu/java/locale/Calendar_en.java 2827383186b ./libjava/gnu/java/locale/Calendar_nl.java - 88782889b ./libjava/gnu/java/locale/LocaleInformation.java 853990452b ./libjava/gnu/java/locale/LocaleInformation_af_ZA.java 3574665519b ./libjava/gnu/java/locale/LocaleInformation_ar_AE.java 1313953526b ./libjava/gnu/java/locale/LocaleInformation_ar_BH.java --- 12402,12422 ---- 3649786395b ./libjava/gnu/java/beans/editors/NativeLongEditor.java 2388248931b ./libjava/gnu/java/beans/editors/NativeShortEditor.java 84373625b ./libjava/gnu/java/beans/editors/StringEditor.java + 1050980841b ./libjava/gnu/java/beans/EmptyBeanInfo.java + 4274204668b ./libjava/gnu/java/beans/ExplicitBeanInfo.java 3309737548b ./libjava/gnu/java/beans/info/ComponentBeanInfo.java + 2859546207b ./libjava/gnu/java/beans/IntrospectionIncubator.java 1517826185b ./libjava/gnu/java/io/ClassLoaderObjectInputStream.java 185400995b ./libjava/gnu/java/io/NullOutputStream.java 337775204b ./libjava/gnu/java/io/ObjectIdentityWrapper.java 412146955b ./libjava/gnu/java/lang/ArrayHelper.java 1957385229b ./libjava/gnu/java/lang/CharData.java 1294839044b ./libjava/gnu/java/lang/ClassHelper.java ! 3244075397b ./libjava/gnu/java/lang/reflect/TypeSignature.java 3366025795b ./libjava/gnu/java/locale/Calendar_de.java 3838960820b ./libjava/gnu/java/locale/Calendar_en.java + 3367817123b ./libjava/gnu/java/locale/Calendar.java 2827383186b ./libjava/gnu/java/locale/Calendar_nl.java 853990452b ./libjava/gnu/java/locale/LocaleInformation_af_ZA.java 3574665519b ./libjava/gnu/java/locale/LocaleInformation_ar_AE.java 1313953526b ./libjava/gnu/java/locale/LocaleInformation_ar_BH.java *************** *** 11887,11900 **** 3606272911b ./libjava/gnu/java/locale/LocaleInformation_cs_CZ.java 3029808974b ./libjava/gnu/java/locale/LocaleInformation_cy_GB.java 3138806717b ./libjava/gnu/java/locale/LocaleInformation_da_DK.java - 1896252461b ./libjava/gnu/java/locale/LocaleInformation_de.java 660397810b ./libjava/gnu/java/locale/LocaleInformation_de_AT.java 2697869622b ./libjava/gnu/java/locale/LocaleInformation_de_BE.java 1184133602b ./libjava/gnu/java/locale/LocaleInformation_de_CH.java 2039543804b ./libjava/gnu/java/locale/LocaleInformation_de_DE.java 1754963126b ./libjava/gnu/java/locale/LocaleInformation_de_LU.java 1950789713b ./libjava/gnu/java/locale/LocaleInformation_el_GR.java - 1639156831b ./libjava/gnu/java/locale/LocaleInformation_en.java 3105733407b ./libjava/gnu/java/locale/LocaleInformation_en_AU.java 1645688637b ./libjava/gnu/java/locale/LocaleInformation_en_BW.java 1552823020b ./libjava/gnu/java/locale/LocaleInformation_en_CA.java --- 12443,12455 ---- 3606272911b ./libjava/gnu/java/locale/LocaleInformation_cs_CZ.java 3029808974b ./libjava/gnu/java/locale/LocaleInformation_cy_GB.java 3138806717b ./libjava/gnu/java/locale/LocaleInformation_da_DK.java 660397810b ./libjava/gnu/java/locale/LocaleInformation_de_AT.java 2697869622b ./libjava/gnu/java/locale/LocaleInformation_de_BE.java 1184133602b ./libjava/gnu/java/locale/LocaleInformation_de_CH.java 2039543804b ./libjava/gnu/java/locale/LocaleInformation_de_DE.java + 1896252461b ./libjava/gnu/java/locale/LocaleInformation_de.java 1754963126b ./libjava/gnu/java/locale/LocaleInformation_de_LU.java 1950789713b ./libjava/gnu/java/locale/LocaleInformation_el_GR.java 3105733407b ./libjava/gnu/java/locale/LocaleInformation_en_AU.java 1645688637b ./libjava/gnu/java/locale/LocaleInformation_en_BW.java 1552823020b ./libjava/gnu/java/locale/LocaleInformation_en_CA.java *************** *** 11903,11908 **** --- 12458,12464 ---- 3654129156b ./libjava/gnu/java/locale/LocaleInformation_en_HK.java 1423793734b ./libjava/gnu/java/locale/LocaleInformation_en_IE.java 3034389835b ./libjava/gnu/java/locale/LocaleInformation_en_IN.java + 1639156831b ./libjava/gnu/java/locale/LocaleInformation_en.java 4146466217b ./libjava/gnu/java/locale/LocaleInformation_en_NZ.java 2700111700b ./libjava/gnu/java/locale/LocaleInformation_en_PH.java 1734741103b ./libjava/gnu/java/locale/LocaleInformation_en_SG.java *************** *** 11952,11957 **** --- 12508,12514 ---- 2288758679b ./libjava/gnu/java/locale/LocaleInformation_it_IT.java 1670529133b ./libjava/gnu/java/locale/LocaleInformation_iw_IL.java 4285275820b ./libjava/gnu/java/locale/LocaleInformation_ja_JP.java + 88782889b ./libjava/gnu/java/locale/LocaleInformation.java 305209674b ./libjava/gnu/java/locale/LocaleInformation_ka_GE.java 289636212b ./libjava/gnu/java/locale/LocaleInformation_kl_GL.java 3381743821b ./libjava/gnu/java/locale/LocaleInformation_ko_KR.java *************** *** 11962,11969 **** 1118828067b ./libjava/gnu/java/locale/LocaleInformation_mk_MK.java 3470919889b ./libjava/gnu/java/locale/LocaleInformation_mr_IN.java 3011395902b ./libjava/gnu/java/locale/LocaleInformation_mt_MT.java - 803932216b ./libjava/gnu/java/locale/LocaleInformation_nl.java 3941557872b ./libjava/gnu/java/locale/LocaleInformation_nl_BE.java 2192944115b ./libjava/gnu/java/locale/LocaleInformation_nl_NL.java 171051379b ./libjava/gnu/java/locale/LocaleInformation_nn_NO.java 1581832797b ./libjava/gnu/java/locale/LocaleInformation_no_NO.java --- 12519,12526 ---- 1118828067b ./libjava/gnu/java/locale/LocaleInformation_mk_MK.java 3470919889b ./libjava/gnu/java/locale/LocaleInformation_mr_IN.java 3011395902b ./libjava/gnu/java/locale/LocaleInformation_mt_MT.java 3941557872b ./libjava/gnu/java/locale/LocaleInformation_nl_BE.java + 803932216b ./libjava/gnu/java/locale/LocaleInformation_nl.java 2192944115b ./libjava/gnu/java/locale/LocaleInformation_nl_NL.java 171051379b ./libjava/gnu/java/locale/LocaleInformation_nn_NO.java 1581832797b ./libjava/gnu/java/locale/LocaleInformation_no_NO.java *************** *** 11996,12231 **** 1075516168b ./libjava/gnu/java/locale/LocaleInformation_zh_SG.java 3357709537b ./libjava/gnu/java/locale/LocaleInformation_zh_TW.java 3391912438b ./libjava/gnu/java/math/MPN.java ! 4169108228b ./libjava/gnu/java/rmi/dgc/DGCImpl.java ! 4171280577b ./libjava/gnu/java/rmi/dgc/DGCImpl_Skel.java ! 1424132902b ./libjava/gnu/java/rmi/dgc/DGCImpl_Stub.java ! 1371885502b ./libjava/gnu/java/rmi/registry/RegistryImpl.java ! 583279947b ./libjava/gnu/java/rmi/registry/RegistryImpl_Skel.java ! 44985979b ./libjava/gnu/java/rmi/registry/RegistryImpl_Stub.java 3466229248b ./libjava/gnu/java/rmi/rmic/Compile_gcj.java 2495154954b ./libjava/gnu/java/rmi/rmic/Compiler.java 2850269889b ./libjava/gnu/java/rmi/rmic/CompilerProcess.java 4019537723b ./libjava/gnu/java/rmi/rmic/RMIC.java 634294081b ./libjava/gnu/java/rmi/rmic/TabbedWriter.java 2494884681b ./libjava/gnu/java/rmi/server/ProtocolConstants.java 1676680003b ./libjava/gnu/java/rmi/server/RMIDefaultSocketFactory.java ! 2333110819b ./libjava/gnu/java/rmi/server/RMIHashes.java ! 742398258b ./libjava/gnu/java/rmi/server/RMIObjectInputStream.java ! 1754833006b ./libjava/gnu/java/rmi/server/RMIObjectOutputStream.java ! 3598051261b ./libjava/gnu/java/rmi/server/UnicastConnection.java ! 2756896208b ./libjava/gnu/java/rmi/server/UnicastConnectionManager.java ! 1237410073b ./libjava/gnu/java/rmi/server/UnicastRef.java ! 764069575b ./libjava/gnu/java/rmi/server/UnicastRemoteCall.java 2008823240b ./libjava/gnu/java/rmi/server/UnicastRemoteStub.java ! 2722838441b ./libjava/gnu/java/rmi/server/UnicastServer.java ! 3552747973b ./libjava/gnu/java/rmi/server/UnicastServerRef.java ! 841643156b ./libjava/gnu/java/security/provider/DefaultPolicy.java ! 663745795b ./libjava/gnu/java/security/provider/Gnu.java ! 2413849314b ./libjava/gnu/java/security/provider/SHA.java ! 1021717986b ./libjava/gnu/java/security/provider/SHA1PRNG.java 1289725769b ./libjava/gnu/java/text/BaseBreakIterator.java 3390709828b ./libjava/gnu/java/text/CharacterBreakIterator.java 1407853328b ./libjava/gnu/java/text/LineBreakIterator.java ! 2384000550b ./libjava/gnu/java/text/SentenceBreakIterator.java 1103805396b ./libjava/gnu/java/text/WordBreakIterator.java 3820369931b ./libjava/gnu/java/util/DoubleEnumeration.java ! 2049405362b ./libjava/include/Makefile.am ! 2861273894b ./libjava/include/Makefile.in 264180982b ./libjava/include/boehm-gc.h ! 2986199884b ./libjava/include/config.h.in 1108817619b ./libjava/include/default-signal.h 833024369b ./libjava/include/dwarf2-signal.h ! 1283777735b ./libjava/include/i386-signal.h 590982531b ./libjava/include/java-assert.h 890969256b ./libjava/include/java-chardecomp.h 3721703006b ./libjava/include/java-chartables.h 11772111b ./libjava/include/java-cpool.h ! 2197729359b ./libjava/include/java-insns.h ! 1956488254b ./libjava/include/java-interp.h 770850052b ./libjava/include/java-props.h ! 4043128117b ./libjava/include/jni.h ! 1917986290b ./libjava/include/jvm.h 1398877611b ./libjava/include/jvmpi.h ! 1055189824b ./libjava/include/name-finder.h 528567171b ./libjava/include/no-gc.h 2243083888b ./libjava/include/no-threads.h ! 2807487107b ./libjava/include/posix-threads.h ! 1563983297b ./libjava/include/posix.h 1012702888b ./libjava/include/sparc-signal.h 216805921b ./libjava/include/stamp-h.in 2649356437b ./libjava/include/win32-signal.h ! 2413743549b ./libjava/include/win32-threads.h ! 976467848b ./libjava/include/win32.h ! 3593727190b ./libjava/interpret.cc ! 2958027378b ./libjava/java/applet/Applet.java ! 1953201146b ./libjava/java/applet/AppletContext.java ! 2731140101b ./libjava/java/applet/AppletStub.java ! 3593095746b ./libjava/java/applet/AudioClip.java ! 1157609128b ./libjava/java/awt/AWTError.java ! 111816746b ./libjava/java/awt/AWTEvent.java ! 4165999385b ./libjava/java/awt/AWTEventMulticaster.java ! 825557229b ./libjava/java/awt/AWTException.java ! 285605791b ./libjava/java/awt/AWTPermission.java ! 160993819b ./libjava/java/awt/ActiveEvent.java ! 3526070699b ./libjava/java/awt/Adjustable.java ! 3534694635b ./libjava/java/awt/BorderLayout.java ! 1398395335b ./libjava/java/awt/Button.java 3153758342b ./libjava/java/awt/Canvas.java ! 2092554577b ./libjava/java/awt/CardLayout.java ! 2248202942b ./libjava/java/awt/Checkbox.java 2084690368b ./libjava/java/awt/CheckboxGroup.java ! 1349721036b ./libjava/java/awt/CheckboxMenuItem.java ! 1888831652b ./libjava/java/awt/Choice.java ! 1705431914b ./libjava/java/awt/Color.java ! 1148661590b ./libjava/java/awt/Component.java ! 361324264b ./libjava/java/awt/ComponentOrientation.java ! 2162499700b ./libjava/java/awt/Container.java ! 4143803538b ./libjava/java/awt/Cursor.java 3031261269b ./libjava/java/awt/Dialog.java ! 2683530461b ./libjava/java/awt/Dimension.java ! 1493568122b ./libjava/java/awt/Event.java 483492170b ./libjava/java/awt/EventDispatchThread.java ! 651462567b ./libjava/java/awt/EventQueue.java ! 1194915480b ./libjava/java/awt/FileDialog.java ! 3367824178b ./libjava/java/awt/FlowLayout.java ! 1157240010b ./libjava/java/awt/Font.java 484873117b ./libjava/java/awt/FontMetrics.java ! 1144124992b ./libjava/java/awt/Frame.java 2012998318b ./libjava/java/awt/Graphics.java ! 3811561912b ./libjava/java/awt/Graphics2D.java ! 986514240b ./libjava/java/awt/GraphicsConfiguration.java ! 2629743040b ./libjava/java/awt/GridBagConstraints.java ! 2079310366b ./libjava/java/awt/GridLayout.java ! 681353006b ./libjava/java/awt/IllegalComponentStateException.java ! 4141700730b ./libjava/java/awt/Image.java ! 4084426b ./libjava/java/awt/Insets.java ! 3129189005b ./libjava/java/awt/ItemSelectable.java ! 1439045277b ./libjava/java/awt/Label.java ! 2458754937b ./libjava/java/awt/LayoutManager.java ! 3544278012b ./libjava/java/awt/LayoutManager2.java ! 2578681493b ./libjava/java/awt/List.java ! 4032096533b ./libjava/java/awt/MediaTracker.java ! 2620146298b ./libjava/java/awt/Menu.java ! 3704860539b ./libjava/java/awt/MenuBar.java ! 1793267135b ./libjava/java/awt/MenuComponent.java ! 3297700167b ./libjava/java/awt/MenuContainer.java ! 641743542b ./libjava/java/awt/MenuItem.java ! 2408918380b ./libjava/java/awt/MenuShortcut.java ! 2127085069b ./libjava/java/awt/Paint.java ! 3861110754b ./libjava/java/awt/PaintContext.java ! 3663039317b ./libjava/java/awt/Panel.java ! 2267781966b ./libjava/java/awt/Point.java ! 2495677833b ./libjava/java/awt/Polygon.java ! 931171809b ./libjava/java/awt/PopupMenu.java ! 2031272343b ./libjava/java/awt/PrintGraphics.java ! 2842009822b ./libjava/java/awt/PrintJob.java ! 1514649029b ./libjava/java/awt/Rectangle.java ! 3814610113b ./libjava/java/awt/RenderingHints.java ! 3117778311b ./libjava/java/awt/ScrollPane.java ! 1642159056b ./libjava/java/awt/Scrollbar.java ! 2074345175b ./libjava/java/awt/Shape.java ! 1158345737b ./libjava/java/awt/SystemColor.java ! 3469060179b ./libjava/java/awt/TextArea.java ! 725438430b ./libjava/java/awt/TextComponent.java ! 4163002735b ./libjava/java/awt/TextField.java ! 1661689740b ./libjava/java/awt/Toolkit.java ! 3337245196b ./libjava/java/awt/Transparency.java ! 2530618234b ./libjava/java/awt/Window.java ! 1282085816b ./libjava/java/awt/color/ColorSpace.java ! 2276155610b ./libjava/java/awt/color/ICC_ColorSpace.java ! 4017444258b ./libjava/java/awt/color/ICC_Profile.java ! 275075726b ./libjava/java/awt/datatransfer/Clipboard.java ! 4070519256b ./libjava/java/awt/datatransfer/ClipboardOwner.java ! 61459584b ./libjava/java/awt/datatransfer/DataFlavor.java ! 783509723b ./libjava/java/awt/datatransfer/FlavorMap.java ! 579142958b ./libjava/java/awt/datatransfer/MimeTypeParseException.java ! 253155729b ./libjava/java/awt/datatransfer/StringSelection.java ! 219256387b ./libjava/java/awt/datatransfer/SystemFlavorMap.java ! 1647430043b ./libjava/java/awt/datatransfer/Transferable.java ! 1851200747b ./libjava/java/awt/datatransfer/UnsupportedFlavorException.java ! 3809396958b ./libjava/java/awt/event/AWTEventListener.java ! 722690297b ./libjava/java/awt/event/ActionEvent.java ! 1915593531b ./libjava/java/awt/event/ActionListener.java ! 3892890048b ./libjava/java/awt/event/AdjustmentEvent.java ! 463745915b ./libjava/java/awt/event/AdjustmentListener.java ! 2557579579b ./libjava/java/awt/event/ComponentAdapter.java ! 3039204703b ./libjava/java/awt/event/ComponentEvent.java ! 360564300b ./libjava/java/awt/event/ComponentListener.java ! 810761210b ./libjava/java/awt/event/ContainerAdapter.java ! 2468937091b ./libjava/java/awt/event/ContainerEvent.java ! 95255207b ./libjava/java/awt/event/ContainerListener.java ! 1865939252b ./libjava/java/awt/event/FocusAdapter.java ! 934630871b ./libjava/java/awt/event/FocusEvent.java ! 4001635571b ./libjava/java/awt/event/FocusListener.java ! 4282322346b ./libjava/java/awt/event/HierarchyBoundsAdapter.java ! 2758355953b ./libjava/java/awt/event/HierarchyBoundsListener.java ! 2116272606b ./libjava/java/awt/event/HierarchyEvent.java ! 2771680955b ./libjava/java/awt/event/HierarchyListener.java ! 702145522b ./libjava/java/awt/event/InputEvent.java ! 726380493b ./libjava/java/awt/event/InputMethodEvent.java ! 4033049562b ./libjava/java/awt/event/InputMethodListener.java ! 1843469307b ./libjava/java/awt/event/InvocationEvent.java ! 3611652050b ./libjava/java/awt/event/ItemEvent.java ! 3300913656b ./libjava/java/awt/event/ItemListener.java ! 1564566587b ./libjava/java/awt/event/KeyAdapter.java ! 3711723317b ./libjava/java/awt/event/KeyEvent.java ! 1381805491b ./libjava/java/awt/event/KeyListener.java ! 2313273360b ./libjava/java/awt/event/MouseAdapter.java ! 2126050085b ./libjava/java/awt/event/MouseEvent.java ! 1649544172b ./libjava/java/awt/event/MouseListener.java ! 1060229023b ./libjava/java/awt/event/MouseMotionAdapter.java ! 1773953094b ./libjava/java/awt/event/MouseMotionListener.java ! 560349420b ./libjava/java/awt/event/PaintEvent.java ! 3023928876b ./libjava/java/awt/event/TextEvent.java ! 2239555241b ./libjava/java/awt/event/TextListener.java ! 2939336909b ./libjava/java/awt/event/WindowAdapter.java ! 3033208050b ./libjava/java/awt/event/WindowEvent.java ! 1930937502b ./libjava/java/awt/event/WindowListener.java ! 2545826257b ./libjava/java/awt/geom/AffineTransform.java ! 4013428113b ./libjava/java/awt/geom/Dimension2D.java ! 4073501358b ./libjava/java/awt/geom/Ellipse2D.java ! 2790798005b ./libjava/java/awt/geom/IllegalPathStateException.java ! 400349421b ./libjava/java/awt/geom/Line2D.java ! 1253586302b ./libjava/java/awt/geom/NoninvertibleTransformException.java ! 1513833568b ./libjava/java/awt/geom/PathIterator.java ! 3208068889b ./libjava/java/awt/geom/Point2D.java ! 1401543311b ./libjava/java/awt/geom/Rectangle2D.java ! 1140671299b ./libjava/java/awt/geom/RectangularShape.java ! 3886036733b ./libjava/java/awt/geom/RoundRectangle2D.java 2039150620b ./libjava/java/awt/image/AreaAveragingScaleFilter.java 47278745b ./libjava/java/awt/image/BufferedImage.java ! 897500197b ./libjava/java/awt/image/ColorModel.java 109440071b ./libjava/java/awt/image/ComponentColorModel.java 1906201349b ./libjava/java/awt/image/ComponentSampleModel.java 3384911687b ./libjava/java/awt/image/CropImageFilter.java - 634855604b ./libjava/java/awt/image/DataBuffer.java 3465530846b ./libjava/java/awt/image/DataBufferByte.java 4075525464b ./libjava/java/awt/image/DataBufferInt.java 3095543468b ./libjava/java/awt/image/DataBufferUShort.java 1806419668b ./libjava/java/awt/image/DirectColorModel.java 3631042426b ./libjava/java/awt/image/FilteredImageSource.java 2890896341b ./libjava/java/awt/image/ImageConsumer.java ! 1624439520b ./libjava/java/awt/image/ImageFilter.java 4043851738b ./libjava/java/awt/image/ImageObserver.java 3411264349b ./libjava/java/awt/image/ImageProducer.java ! 2968747135b ./libjava/java/awt/image/IndexColorModel.java ! 1393501117b ./libjava/java/awt/image/MemoryImageSource.java 1585332925b ./libjava/java/awt/image/PackedColorModel.java ! 1331801894b ./libjava/java/awt/image/PixelGrabber.java ! 4052348878b ./libjava/java/awt/image/RGBImageFilter.java 1883441019b ./libjava/java/awt/image/Raster.java 869369986b ./libjava/java/awt/image/RasterOp.java 3510533440b ./libjava/java/awt/image/ReplicateScaleFilter.java 1652657911b ./libjava/java/awt/image/SampleModel.java 2512892899b ./libjava/java/awt/image/SinglePixelPackedSampleModel.java 4567438b ./libjava/java/awt/image/WritableRaster.java 1611158274b ./libjava/java/awt/peer/ButtonPeer.java 1171238008b ./libjava/java/awt/peer/CanvasPeer.java 483129233b ./libjava/java/awt/peer/CheckboxMenuItemPeer.java 1055872542b ./libjava/java/awt/peer/CheckboxPeer.java 2176941064b ./libjava/java/awt/peer/ChoicePeer.java 1485974642b ./libjava/java/awt/peer/ComponentPeer.java ! 385477645b ./libjava/java/awt/peer/ContainerPeer.java 1630111979b ./libjava/java/awt/peer/DialogPeer.java 3476723069b ./libjava/java/awt/peer/FileDialogPeer.java 1821313126b ./libjava/java/awt/peer/FontPeer.java --- 12553,12913 ---- 1075516168b ./libjava/gnu/java/locale/LocaleInformation_zh_SG.java 3357709537b ./libjava/gnu/java/locale/LocaleInformation_zh_TW.java 3391912438b ./libjava/gnu/java/math/MPN.java ! 3250783603b ./libjava/gnu/java/nio/ByteBufferImpl.java ! 2568267781b ./libjava/gnu/java/nio/CharBufferImpl.java ! 3078772899b ./libjava/gnu/java/nio/charset/ISO_8859_1.java ! 2654453523b ./libjava/gnu/java/nio/charset/Provider.java ! 929666892b ./libjava/gnu/java/nio/charset/US_ASCII.java ! 504852002b ./libjava/gnu/java/nio/charset/UTF_16BE.java ! 3756135414b ./libjava/gnu/java/nio/charset/UTF_16Decoder.java ! 3988722461b ./libjava/gnu/java/nio/charset/UTF_16Encoder.java ! 430102613b ./libjava/gnu/java/nio/charset/UTF_16.java ! 2147056701b ./libjava/gnu/java/nio/charset/UTF_16LE.java ! 1651590565b ./libjava/gnu/java/nio/charset/UTF_8.java ! 312179626b ./libjava/gnu/java/nio/DatagramChannelImpl.java ! 2627116050b ./libjava/gnu/java/nio/DoubleBufferImpl.java ! 1158988190b ./libjava/gnu/java/nio/FileChannelImpl.java ! 2141995272b ./libjava/gnu/java/nio/FileLockImpl.java ! 4120013253b ./libjava/gnu/java/nio/FloatBufferImpl.java ! 911937971b ./libjava/gnu/java/nio/IntBufferImpl.java ! 3331021714b ./libjava/gnu/java/nio/LongBufferImpl.java ! 295164197b ./libjava/gnu/java/nio/natByteBufferImpl.cc ! 1293579223b ./libjava/gnu/java/nio/natCharBufferImpl.cc ! 429998168b ./libjava/gnu/java/nio/natDoubleBufferImpl.cc ! 1681224896b ./libjava/gnu/java/nio/natFileChannelImpl.cc ! 3377536148b ./libjava/gnu/java/nio/natFloatBufferImpl.cc ! 3055038605b ./libjava/gnu/java/nio/natIntBufferImpl.cc ! 633028141b ./libjava/gnu/java/nio/natLongBufferImpl.cc ! 1475746268b ./libjava/gnu/java/nio/natSelectorImpl.cc ! 3260148530b ./libjava/gnu/java/nio/natShortBufferImpl.cc ! 2806870622b ./libjava/gnu/java/nio/natSocketChannelImpl.cc ! 2966338573b ./libjava/gnu/java/nio/PipeImpl.java ! 240090473b ./libjava/gnu/java/nio/SelectionKeyImpl.java ! 3665820149b ./libjava/gnu/java/nio/SelectorImpl.java ! 208835466b ./libjava/gnu/java/nio/SelectorProviderImpl.java ! 423624715b ./libjava/gnu/java/nio/ServerSocketChannelImpl.java ! 1613556027b ./libjava/gnu/java/nio/ShortBufferImpl.java ! 1592622703b ./libjava/gnu/java/nio/SocketChannelImpl.java ! 2623356584b ./libjava/gnu/java/rmi/dgc/DGCImpl.java ! 4219884184b ./libjava/gnu/java/rmi/dgc/DGCImpl_Skel.java ! 2240902530b ./libjava/gnu/java/rmi/dgc/DGCImpl_Stub.java ! 3946781725b ./libjava/gnu/java/rmi/registry/RegistryImpl.java ! 2437598406b ./libjava/gnu/java/rmi/registry/RegistryImpl_Skel.java ! 485210080b ./libjava/gnu/java/rmi/registry/RegistryImpl_Stub.java 3466229248b ./libjava/gnu/java/rmi/rmic/Compile_gcj.java 2495154954b ./libjava/gnu/java/rmi/rmic/Compiler.java 2850269889b ./libjava/gnu/java/rmi/rmic/CompilerProcess.java 4019537723b ./libjava/gnu/java/rmi/rmic/RMIC.java 634294081b ./libjava/gnu/java/rmi/rmic/TabbedWriter.java + 3592805147b ./libjava/gnu/java/rmi/RMIMarshalledObjectInputStream.java + 2643930283b ./libjava/gnu/java/rmi/RMIMarshalledObjectOutputStream.java + 552490553b ./libjava/gnu/java/rmi/server/ConnectionRunnerPool.java 2494884681b ./libjava/gnu/java/rmi/server/ProtocolConstants.java 1676680003b ./libjava/gnu/java/rmi/server/RMIDefaultSocketFactory.java ! 847486923b ./libjava/gnu/java/rmi/server/RMIHashes.java ! 1078771726b ./libjava/gnu/java/rmi/server/RMIObjectInputStream.java ! 2489643914b ./libjava/gnu/java/rmi/server/RMIObjectOutputStream.java ! 536671614b ./libjava/gnu/java/rmi/server/UnicastConnection.java ! 1938331312b ./libjava/gnu/java/rmi/server/UnicastConnectionManager.java ! 2731757459b ./libjava/gnu/java/rmi/server/UnicastRef.java ! 2573593373b ./libjava/gnu/java/rmi/server/UnicastRemoteCall.java 2008823240b ./libjava/gnu/java/rmi/server/UnicastRemoteStub.java ! 3883234073b ./libjava/gnu/java/rmi/server/UnicastServer.java ! 1118567737b ./libjava/gnu/java/rmi/server/UnicastServerRef.java ! 3239632654b ./libjava/gnu/java/security/der/DEREncodingException.java ! 2256345182b ./libjava/gnu/java/security/provider/DefaultPolicy.java ! 1820482079b ./libjava/gnu/java/security/provider/DERReader.java ! 2704871023b ./libjava/gnu/java/security/provider/DERWriter.java ! 3261508967b ./libjava/gnu/java/security/provider/DSAKeyPairGenerator.java ! 1519893159b ./libjava/gnu/java/security/provider/DSAParameterGenerator.java ! 1477530236b ./libjava/gnu/java/security/provider/DSAParameters.java ! 3260407392b ./libjava/gnu/java/security/provider/DSASignature.java ! 2068913615b ./libjava/gnu/java/security/provider/GnuDSAPrivateKey.java ! 1235159706b ./libjava/gnu/java/security/provider/GnuDSAPublicKey.java ! 3623080517b ./libjava/gnu/java/security/provider/Gnu.java ! 2149484977b ./libjava/gnu/java/security/provider/MD5.java ! 3696070442b ./libjava/gnu/java/security/provider/SHA1PRNG.java ! 1099987683b ./libjava/gnu/java/security/provider/SHA.java ! 1539127399b ./libjava/gnu/java/security/util/Prime.java 1289725769b ./libjava/gnu/java/text/BaseBreakIterator.java 3390709828b ./libjava/gnu/java/text/CharacterBreakIterator.java 1407853328b ./libjava/gnu/java/text/LineBreakIterator.java ! 1959252922b ./libjava/gnu/java/text/SentenceBreakIterator.java 1103805396b ./libjava/gnu/java/text/WordBreakIterator.java 3820369931b ./libjava/gnu/java/util/DoubleEnumeration.java ! 840138884b ./libjava/gnu/java/util/EmptyEnumeration.java ! 1487334009b ./libjava/HACKING 264180982b ./libjava/include/boehm-gc.h ! 2817074558b ./libjava/include/config.h.in ! 1821380608b ./libjava/include/.cvsignore 1108817619b ./libjava/include/default-signal.h 833024369b ./libjava/include/dwarf2-signal.h ! 1300618817b ./libjava/include/i386-signal.h 590982531b ./libjava/include/java-assert.h 890969256b ./libjava/include/java-chardecomp.h 3721703006b ./libjava/include/java-chartables.h 11772111b ./libjava/include/java-cpool.h ! 853232758b ./libjava/include/java-insns.h ! 827751901b ./libjava/include/java-interp.h 770850052b ./libjava/include/java-props.h ! 2032951804b ./libjava/include/jni.h ! 1476617536b ./libjava/include/jvm.h 1398877611b ./libjava/include/jvmpi.h ! 2049405362b ./libjava/include/Makefile.am ! 2932752241b ./libjava/include/Makefile.in 528567171b ./libjava/include/no-gc.h 2243083888b ./libjava/include/no-threads.h ! 475052500b ./libjava/include/posix.h ! 310794441b ./libjava/include/posix-threads.h ! 1401115806b ./libjava/include/s390-signal.h 1012702888b ./libjava/include/sparc-signal.h 216805921b ./libjava/include/stamp-h.in + 976722849b ./libjava/include/win32.h 2649356437b ./libjava/include/win32-signal.h ! 1995256761b ./libjava/include/win32-threads.h ! 2094091298b ./libjava/include/x86_64-signal.h ! 3764720684b ./libjava/interpret.cc ! 3506533125b ./libjava/java/applet/AppletContext.java ! 3229086933b ./libjava/java/applet/Applet.java ! 1680765461b ./libjava/java/applet/AppletStub.java ! 2170436367b ./libjava/java/applet/AudioClip.java ! 613872008b ./libjava/java/awt/ActiveEvent.java ! 4143391530b ./libjava/java/awt/Adjustable.java ! 94453016b ./libjava/java/awt/AlphaComposite.java ! 3526011036b ./libjava/java/awt/AttributeValue.java ! 3578239573b ./libjava/java/awt/AWTError.java ! 2387560357b ./libjava/java/awt/AWTEvent.java ! 469159342b ./libjava/java/awt/AWTEventMulticaster.java ! 705651278b ./libjava/java/awt/AWTException.java ! 3976492360b ./libjava/java/awt/AWTKeyStroke.java ! 4037429003b ./libjava/java/awt/AWTPermission.java ! 3781709551b ./libjava/java/awt/BasicStroke.java ! 4000225361b ./libjava/java/awt/BorderLayout.java ! 3580056686b ./libjava/java/awt/BufferCapabilities.java ! 155576881b ./libjava/java/awt/Button.java 3153758342b ./libjava/java/awt/Canvas.java ! 4223116111b ./libjava/java/awt/CardLayout.java 2084690368b ./libjava/java/awt/CheckboxGroup.java ! 238715688b ./libjava/java/awt/Checkbox.java ! 3055035423b ./libjava/java/awt/CheckboxMenuItem.java ! 1052527485b ./libjava/java/awt/Choice.java ! 498416266b ./libjava/java/awt/color/CMMException.java ! 960806366b ./libjava/java/awt/color/ColorSpace.java ! 1800874819b ./libjava/java/awt/color/ICC_ColorSpace.java ! 3509399304b ./libjava/java/awt/color/ICC_ProfileGray.java ! 2233522723b ./libjava/java/awt/color/ICC_Profile.java ! 2874732289b ./libjava/java/awt/color/ICC_ProfileRGB.java ! 2782110294b ./libjava/java/awt/Color.java ! 3567698033b ./libjava/java/awt/ColorPaintContext.java ! 4033383559b ./libjava/java/awt/color/ProfileDataException.java ! 2912911681b ./libjava/java/awt/Component.java ! 1717065250b ./libjava/java/awt/ComponentOrientation.java ! 320873769b ./libjava/java/awt/CompositeContext.java ! 2831300442b ./libjava/java/awt/Composite.java ! 724065501b ./libjava/java/awt/Container.java ! 1338315312b ./libjava/java/awt/ContainerOrderFocusTraversalPolicy.java ! 2451822490b ./libjava/java/awt/Cursor.java ! 3033779709b ./libjava/java/awt/datatransfer/Clipboard.java ! 4070519256b ./libjava/java/awt/datatransfer/ClipboardOwner.java ! 2891944126b ./libjava/java/awt/datatransfer/DataFlavor.java ! 229458937b ./libjava/java/awt/datatransfer/FlavorMap.java ! 3697672232b ./libjava/java/awt/datatransfer/FlavorTable.java ! 1776151121b ./libjava/java/awt/datatransfer/MimeTypeParseException.java ! 253155729b ./libjava/java/awt/datatransfer/StringSelection.java ! 1445228003b ./libjava/java/awt/datatransfer/SystemFlavorMap.java ! 1010717000b ./libjava/java/awt/datatransfer/Transferable.java ! 726417761b ./libjava/java/awt/datatransfer/UnsupportedFlavorException.java ! 1469774519b ./libjava/java/awt/DefaultFocusTraversalPolicy.java ! 2509273387b ./libjava/java/awt/DefaultKeyboardFocusManager.java 3031261269b ./libjava/java/awt/Dialog.java ! 3428005045b ./libjava/java/awt/Dimension.java ! 2168140043b ./libjava/java/awt/DisplayMode.java ! 1025187418b ./libjava/java/awt/dnd/Autoscroll.java ! 2447971049b ./libjava/java/awt/dnd/DnDConstants.java ! 1102087244b ./libjava/java/awt/dnd/DragGestureEvent.java ! 2802041397b ./libjava/java/awt/dnd/DragGestureListener.java ! 3114129124b ./libjava/java/awt/dnd/DragGestureRecognizer.java ! 1356984825b ./libjava/java/awt/dnd/DragSourceAdapter.java ! 2128505939b ./libjava/java/awt/dnd/DragSourceContext.java ! 1488746875b ./libjava/java/awt/dnd/DragSourceDragEvent.java ! 4043246495b ./libjava/java/awt/dnd/DragSourceDropEvent.java ! 238443577b ./libjava/java/awt/dnd/DragSourceEvent.java ! 1629612264b ./libjava/java/awt/dnd/DragSource.java ! 3292001816b ./libjava/java/awt/dnd/DragSourceListener.java ! 2429919247b ./libjava/java/awt/dnd/DragSourceMotionListener.java ! 2038089415b ./libjava/java/awt/dnd/DropTargetAdapter.java ! 3247445554b ./libjava/java/awt/dnd/DropTargetContext.java ! 3629879512b ./libjava/java/awt/dnd/DropTargetDragEvent.java ! 2203760588b ./libjava/java/awt/dnd/DropTargetDropEvent.java ! 3671737304b ./libjava/java/awt/dnd/DropTargetEvent.java ! 4147823551b ./libjava/java/awt/dnd/DropTarget.java ! 2764609457b ./libjava/java/awt/dnd/DropTargetListener.java ! 2705594945b ./libjava/java/awt/dnd/InvalidDnDOperationException.java ! 2612483306b ./libjava/java/awt/dnd/MouseDragGestureRecognizer.java ! 2157009526b ./libjava/java/awt/dnd/peer/DragSourceContextPeer.java ! 4093241194b ./libjava/java/awt/dnd/peer/DropTargetContextPeer.java ! 591080406b ./libjava/java/awt/event/ActionEvent.java ! 3032932106b ./libjava/java/awt/event/ActionListener.java ! 1658245186b ./libjava/java/awt/event/AdjustmentEvent.java ! 1126909547b ./libjava/java/awt/event/AdjustmentListener.java ! 4256422651b ./libjava/java/awt/event/AWTEventListener.java ! 1218974938b ./libjava/java/awt/event/AWTEventListenerProxy.java ! 742593982b ./libjava/java/awt/event/ComponentAdapter.java ! 3070654304b ./libjava/java/awt/event/ComponentEvent.java ! 1350036484b ./libjava/java/awt/event/ComponentListener.java ! 3046890041b ./libjava/java/awt/event/ContainerAdapter.java ! 1368633287b ./libjava/java/awt/event/ContainerEvent.java ! 3847122394b ./libjava/java/awt/event/ContainerListener.java 483492170b ./libjava/java/awt/EventDispatchThread.java ! 2001594214b ./libjava/java/awt/event/FocusAdapter.java ! 1740308265b ./libjava/java/awt/event/FocusEvent.java ! 71612696b ./libjava/java/awt/event/FocusListener.java ! 25178828b ./libjava/java/awt/event/HierarchyBoundsAdapter.java ! 1852444527b ./libjava/java/awt/event/HierarchyBoundsListener.java ! 914085271b ./libjava/java/awt/event/HierarchyEvent.java ! 1581886278b ./libjava/java/awt/event/HierarchyListener.java ! 4218631792b ./libjava/java/awt/event/InputEvent.java ! 3564551314b ./libjava/java/awt/event/InputMethodEvent.java ! 1748533120b ./libjava/java/awt/event/InputMethodListener.java ! 1285585304b ./libjava/java/awt/event/InvocationEvent.java ! 3488278756b ./libjava/java/awt/event/ItemEvent.java ! 1488812576b ./libjava/java/awt/event/ItemListener.java ! 3029266233b ./libjava/java/awt/Event.java ! 1065108034b ./libjava/java/awt/event/KeyAdapter.java ! 1381841346b ./libjava/java/awt/event/KeyEvent.java ! 2529341460b ./libjava/java/awt/event/KeyListener.java ! 328109079b ./libjava/java/awt/event/MouseAdapter.java ! 3693609814b ./libjava/java/awt/event/MouseEvent.java ! 2805020725b ./libjava/java/awt/event/MouseListener.java ! 3165358338b ./libjava/java/awt/event/MouseMotionAdapter.java ! 586825684b ./libjava/java/awt/event/MouseMotionListener.java ! 3800295855b ./libjava/java/awt/event/MouseWheelEvent.java ! 2429115855b ./libjava/java/awt/event/MouseWheelListener.java ! 2777618879b ./libjava/java/awt/event/PaintEvent.java ! 258490417b ./libjava/java/awt/EventQueue.java ! 1736791458b ./libjava/java/awt/event/TextEvent.java ! 1113873283b ./libjava/java/awt/event/TextListener.java ! 3149748542b ./libjava/java/awt/event/WindowAdapter.java ! 1646143115b ./libjava/java/awt/event/WindowEvent.java ! 499567421b ./libjava/java/awt/event/WindowFocusListener.java ! 178882217b ./libjava/java/awt/event/WindowListener.java ! 2054241804b ./libjava/java/awt/event/WindowStateListener.java ! 803293815b ./libjava/java/awt/FileDialog.java ! 3460513004b ./libjava/java/awt/FlowLayout.java ! 2093793136b ./libjava/java/awt/FocusTraversalPolicy.java ! 2988174516b ./libjava/java/awt/FontFormatException.java ! 218799448b ./libjava/java/awt/Font.java 484873117b ./libjava/java/awt/FontMetrics.java ! 797362298b ./libjava/java/awt/font/TextHitInfo.java ! 557579533b ./libjava/java/awt/Frame.java ! 3687585830b ./libjava/java/awt/geom/AffineTransform.java ! 29333179b ./libjava/java/awt/geom/Arc2D.java ! 117138830b ./libjava/java/awt/geom/Area.java ! 1012349416b ./libjava/java/awt/geom/CubicCurve2D.java ! 1325555627b ./libjava/java/awt/geom/Dimension2D.java ! 1391849143b ./libjava/java/awt/geom/Ellipse2D.java ! 95968592b ./libjava/java/awt/geom/FlatteningPathIterator.java ! 197610622b ./libjava/java/awt/geom/GeneralPath.java ! 1358976481b ./libjava/java/awt/geom/IllegalPathStateException.java ! 4272165898b ./libjava/java/awt/geom/Line2D.java ! 487804427b ./libjava/java/awt/geom/NoninvertibleTransformException.java ! 1751830836b ./libjava/java/awt/geom/PathIterator.java ! 2496314352b ./libjava/java/awt/geom/Point2D.java ! 1176889339b ./libjava/java/awt/geom/QuadCurve2D.java ! 3423320809b ./libjava/java/awt/geom/Rectangle2D.java ! 3367968605b ./libjava/java/awt/geom/RectangularShape.java ! 3819292914b ./libjava/java/awt/geom/RoundRectangle2D.java ! 593542459b ./libjava/java/awt/GradientPaint.java ! 1169548611b ./libjava/java/awt/Graphics2D.java ! 580882191b ./libjava/java/awt/GraphicsConfigTemplate.java ! 3351412922b ./libjava/java/awt/GraphicsConfiguration.java ! 3538996993b ./libjava/java/awt/GraphicsDevice.java ! 3023278509b ./libjava/java/awt/GraphicsEnvironment.java 2012998318b ./libjava/java/awt/Graphics.java ! 3926197676b ./libjava/java/awt/GridBagConstraints.java ! 1018877862b ./libjava/java/awt/GridBagLayout.java ! 43546062b ./libjava/java/awt/GridLayout.java ! 344540931b ./libjava/java/awt/HeadlessException.java ! 3789228907b ./libjava/java/awt/IllegalComponentStateException.java 2039150620b ./libjava/java/awt/image/AreaAveragingScaleFilter.java 47278745b ./libjava/java/awt/image/BufferedImage.java ! 2036451294b ./libjava/java/awt/image/BufferedImageOp.java ! 27995175b ./libjava/java/awt/image/BufferStrategy.java ! 2493337469b ./libjava/java/awt/ImageCapabilities.java ! 1269423221b ./libjava/java/awt/image/ColorModel.java 109440071b ./libjava/java/awt/image/ComponentColorModel.java 1906201349b ./libjava/java/awt/image/ComponentSampleModel.java 3384911687b ./libjava/java/awt/image/CropImageFilter.java 3465530846b ./libjava/java/awt/image/DataBufferByte.java 4075525464b ./libjava/java/awt/image/DataBufferInt.java + 634855604b ./libjava/java/awt/image/DataBuffer.java 3095543468b ./libjava/java/awt/image/DataBufferUShort.java 1806419668b ./libjava/java/awt/image/DirectColorModel.java 3631042426b ./libjava/java/awt/image/FilteredImageSource.java 2890896341b ./libjava/java/awt/image/ImageConsumer.java ! 696638785b ./libjava/java/awt/image/ImageFilter.java 4043851738b ./libjava/java/awt/image/ImageObserver.java 3411264349b ./libjava/java/awt/image/ImageProducer.java ! 2311312957b ./libjava/java/awt/image/ImagingOpException.java ! 1293101551b ./libjava/java/awt/image/IndexColorModel.java ! 2718926858b ./libjava/java/awt/Image.java ! 2126711191b ./libjava/java/awt/image/MemoryImageSource.java 1585332925b ./libjava/java/awt/image/PackedColorModel.java ! 3420827243b ./libjava/java/awt/image/PixelGrabber.java ! 3515952183b ./libjava/java/awt/image/RasterFormatException.java 1883441019b ./libjava/java/awt/image/Raster.java 869369986b ./libjava/java/awt/image/RasterOp.java + 2050559967b ./libjava/java/awt/image/renderable/ContextualRenderedImageFactory.java + 1792765242b ./libjava/java/awt/image/renderable/ParameterBlock.java + 943978836b ./libjava/java/awt/image/renderable/RenderableImage.java + 30237810b ./libjava/java/awt/image/renderable/RenderableImageOp.java + 134114010b ./libjava/java/awt/image/renderable/RenderableImageProducer.java + 3991882613b ./libjava/java/awt/image/renderable/RenderContext.java + 2864582905b ./libjava/java/awt/image/renderable/RenderedImageFactory.java + 2829036068b ./libjava/java/awt/image/RenderedImage.java 3510533440b ./libjava/java/awt/image/ReplicateScaleFilter.java + 4052348878b ./libjava/java/awt/image/RGBImageFilter.java 1652657911b ./libjava/java/awt/image/SampleModel.java 2512892899b ./libjava/java/awt/image/SinglePixelPackedSampleModel.java + 3763437230b ./libjava/java/awt/image/TileObserver.java + 201953267b ./libjava/java/awt/image/VolatileImage.java 4567438b ./libjava/java/awt/image/WritableRaster.java + 4267361925b ./libjava/java/awt/image/WritableRenderedImage.java + 1531714450b ./libjava/java/awt/im/InputContext.java + 3459586354b ./libjava/java/awt/im/InputMethodHighlight.java + 3751290640b ./libjava/java/awt/im/InputMethodRequests.java + 588530106b ./libjava/java/awt/im/InputSubset.java + 771850894b ./libjava/java/awt/im/spi/InputMethodContext.java + 2738209418b ./libjava/java/awt/im/spi/InputMethodDescriptor.java + 3747011663b ./libjava/java/awt/im/spi/InputMethod.java + 2855255637b ./libjava/java/awt/Insets.java + 2919804909b ./libjava/java/awt/ItemSelectable.java + 3548735145b ./libjava/java/awt/JobAttributes.java + 2148109134b ./libjava/java/awt/KeyboardFocusManager.java + 498257517b ./libjava/java/awt/KeyEventDispatcher.java + 2266678890b ./libjava/java/awt/KeyEventPostProcessor.java + 3064848655b ./libjava/java/awt/Label.java + 2267522997b ./libjava/java/awt/LayoutManager2.java + 939373230b ./libjava/java/awt/LayoutManager.java + 685065105b ./libjava/java/awt/List.java + 4032096533b ./libjava/java/awt/MediaTracker.java + 1493315237b ./libjava/java/awt/MenuBar.java + 2897941301b ./libjava/java/awt/MenuComponent.java + 2778668375b ./libjava/java/awt/MenuContainer.java + 864519593b ./libjava/java/awt/MenuItem.java + 2782059501b ./libjava/java/awt/Menu.java + 2408918380b ./libjava/java/awt/MenuShortcut.java + 1435803511b ./libjava/java/awt/PageAttributes.java + 3456029234b ./libjava/java/awt/PaintContext.java + 1356355652b ./libjava/java/awt/Paint.java + 667414534b ./libjava/java/awt/Panel.java 1611158274b ./libjava/java/awt/peer/ButtonPeer.java 1171238008b ./libjava/java/awt/peer/CanvasPeer.java 483129233b ./libjava/java/awt/peer/CheckboxMenuItemPeer.java 1055872542b ./libjava/java/awt/peer/CheckboxPeer.java 2176941064b ./libjava/java/awt/peer/ChoicePeer.java 1485974642b ./libjava/java/awt/peer/ComponentPeer.java ! 254287469b ./libjava/java/awt/peer/ContainerPeer.java 1630111979b ./libjava/java/awt/peer/DialogPeer.java 3476723069b ./libjava/java/awt/peer/FileDialogPeer.java 1821313126b ./libjava/java/awt/peer/FontPeer.java *************** *** 12239,12729 **** 2144114987b ./libjava/java/awt/peer/MenuPeer.java 3010921620b ./libjava/java/awt/peer/PanelPeer.java 3378714445b ./libjava/java/awt/peer/PopupMenuPeer.java - 921008058b ./libjava/java/awt/peer/ScrollPanePeer.java 2932476036b ./libjava/java/awt/peer/ScrollbarPeer.java 4184845888b ./libjava/java/awt/peer/TextAreaPeer.java 1984969162b ./libjava/java/awt/peer/TextComponentPeer.java 3129312744b ./libjava/java/awt/peer/TextFieldPeer.java 2230435871b ./libjava/java/awt/peer/WindowPeer.java 1515366999b ./libjava/java/beans/AppletInitializer.java 1833441000b ./libjava/java/beans/BeanDescriptor.java ! 1195953294b ./libjava/java/beans/BeanInfo.java 744629114b ./libjava/java/beans/Beans.java 2117723836b ./libjava/java/beans/Customizer.java 1994194050b ./libjava/java/beans/DesignMode.java 3820662012b ./libjava/java/beans/EventSetDescriptor.java 4125494981b ./libjava/java/beans/FeatureDescriptor.java 1047826036b ./libjava/java/beans/IndexedPropertyDescriptor.java 2875985243b ./libjava/java/beans/IntrospectionException.java ! 1848432301b ./libjava/java/beans/Introspector.java 649392727b ./libjava/java/beans/MethodDescriptor.java 3829002128b ./libjava/java/beans/ParameterDescriptor.java ! 1516690242b ./libjava/java/beans/PropertyChangeEvent.java ! 469117173b ./libjava/java/beans/PropertyChangeListener.java ! 703973953b ./libjava/java/beans/PropertyChangeSupport.java ! 2757753208b ./libjava/java/beans/PropertyDescriptor.java 199700315b ./libjava/java/beans/PropertyEditor.java 1782408506b ./libjava/java/beans/PropertyEditorManager.java 1820268780b ./libjava/java/beans/PropertyEditorSupport.java 4007301740b ./libjava/java/beans/PropertyVetoException.java 2552578115b ./libjava/java/beans/SimpleBeanInfo.java ! 1050530153b ./libjava/java/beans/VetoableChangeListener.java ! 292324922b ./libjava/java/beans/VetoableChangeSupport.java 1473289197b ./libjava/java/beans/Visibility.java - 2767542609b ./libjava/java/beans/beancontext/BeanContext.java - 1680972619b ./libjava/java/beans/beancontext/BeanContextChild.java - 2669908550b ./libjava/java/beans/beancontext/BeanContextChildComponentProxy.java - 1680093002b ./libjava/java/beans/beancontext/BeanContextChildSupport.java - 1094587434b ./libjava/java/beans/beancontext/BeanContextContainerProxy.java - 1135449293b ./libjava/java/beans/beancontext/BeanContextEvent.java - 242862210b ./libjava/java/beans/beancontext/BeanContextMembershipEvent.java - 2481552408b ./libjava/java/beans/beancontext/BeanContextMembershipListener.java - 2023778890b ./libjava/java/beans/beancontext/BeanContextProxy.java - 3567375214b ./libjava/java/beans/beancontext/BeanContextServiceAvailableEvent.java - 2290646255b ./libjava/java/beans/beancontext/BeanContextServiceProvider.java - 1524483334b ./libjava/java/beans/beancontext/BeanContextServiceProviderBeanInfo.java - 3486010592b ./libjava/java/beans/beancontext/BeanContextServiceRevokedEvent.java - 1792611913b ./libjava/java/beans/beancontext/BeanContextServiceRevokedListener.java - 172300183b ./libjava/java/beans/beancontext/BeanContextServices.java - 649450665b ./libjava/java/beans/beancontext/BeanContextServicesListener.java 200470800b ./libjava/java/io/BufferedInputStream.java ! 369879890b ./libjava/java/io/BufferedOutputStream.java ! 2577191356b ./libjava/java/io/BufferedReader.java 1491845880b ./libjava/java/io/BufferedWriter.java 3804278996b ./libjava/java/io/ByteArrayInputStream.java 200503157b ./libjava/java/io/ByteArrayOutputStream.java 1595495810b ./libjava/java/io/CharArrayReader.java ! 926602239b ./libjava/java/io/CharArrayWriter.java ! 2789582151b ./libjava/java/io/CharConversionException.java 833277233b ./libjava/java/io/DataInput.java ! 634383556b ./libjava/java/io/DataInputStream.java 2779752650b ./libjava/java/io/DataOutput.java 2879044799b ./libjava/java/io/DataOutputStream.java ! 3063714856b ./libjava/java/io/EOFException.java ! 1517492329b ./libjava/java/io/Externalizable.java ! 3923475116b ./libjava/java/io/File.java ! 3546628049b ./libjava/java/io/FileDescriptor.java 3092690903b ./libjava/java/io/FileFilter.java ! 3304954915b ./libjava/java/io/FileInputStream.java ! 1122350410b ./libjava/java/io/FileNotFoundException.java ! 493183800b ./libjava/java/io/FileOutputStream.java ! 4203170751b ./libjava/java/io/FilePermission.java 480136026b ./libjava/java/io/FileReader.java 3272147344b ./libjava/java/io/FileWriter.java - 57206385b ./libjava/java/io/FilenameFilter.java 491642459b ./libjava/java/io/FilterInputStream.java 3572067476b ./libjava/java/io/FilterOutputStream.java 834480594b ./libjava/java/io/FilterReader.java 805331833b ./libjava/java/io/FilterWriter.java - 1797218177b ./libjava/java/io/IOException.java 1021426083b ./libjava/java/io/InputStream.java ! 529146689b ./libjava/java/io/InputStreamReader.java ! 2158134143b ./libjava/java/io/InterruptedIOException.java ! 2959384144b ./libjava/java/io/InvalidClassException.java ! 2711688958b ./libjava/java/io/InvalidObjectException.java ! 2297659773b ./libjava/java/io/LineNumberInputStream.java 1977393201b ./libjava/java/io/LineNumberReader.java ! 356981144b ./libjava/java/io/NotActiveException.java ! 296825781b ./libjava/java/io/NotSerializableException.java 3695857432b ./libjava/java/io/ObjectInput.java ! 2999285723b ./libjava/java/io/ObjectInputStream.java 1835600781b ./libjava/java/io/ObjectInputValidation.java 601064657b ./libjava/java/io/ObjectOutput.java ! 839357625b ./libjava/java/io/ObjectOutputStream.java ! 758370469b ./libjava/java/io/ObjectStreamClass.java ! 3828010025b ./libjava/java/io/ObjectStreamConstants.java ! 1279521507b ./libjava/java/io/ObjectStreamException.java ! 3088927270b ./libjava/java/io/ObjectStreamField.java ! 2743734189b ./libjava/java/io/OptionalDataException.java 3053819886b ./libjava/java/io/OutputStream.java ! 1432753727b ./libjava/java/io/OutputStreamWriter.java ! 3611790327b ./libjava/java/io/PipedInputStream.java ! 2982069551b ./libjava/java/io/PipedOutputStream.java 3065379959b ./libjava/java/io/PipedReader.java ! 4173881044b ./libjava/java/io/PipedWriter.java 1146852699b ./libjava/java/io/PrintStream.java 569978908b ./libjava/java/io/PrintWriter.java ! 1369338935b ./libjava/java/io/PushbackInputStream.java 2210002535b ./libjava/java/io/PushbackReader.java ! 3411632522b ./libjava/java/io/RandomAccessFile.java 3147885412b ./libjava/java/io/Reader.java 978743808b ./libjava/java/io/SequenceInputStream.java ! 1322946837b ./libjava/java/io/Serializable.java ! 745751528b ./libjava/java/io/SerializablePermission.java ! 750070673b ./libjava/java/io/StreamCorruptedException.java ! 949081819b ./libjava/java/io/StreamTokenizer.java 1180454189b ./libjava/java/io/StringBufferInputStream.java 3179611106b ./libjava/java/io/StringReader.java ! 2031479671b ./libjava/java/io/StringWriter.java ! 1480215451b ./libjava/java/io/SyncFailedException.java ! 2698018036b ./libjava/java/io/UTFDataFormatException.java ! 616805431b ./libjava/java/io/UnsupportedEncodingException.java ! 2719928003b ./libjava/java/io/WriteAbortedException.java 3470521880b ./libjava/java/io/Writer.java ! 1763600901b ./libjava/java/io/natFileDescriptorEcos.cc ! 50298342b ./libjava/java/io/natFileDescriptorPosix.cc ! 645547190b ./libjava/java/io/natFileDescriptorWin32.cc ! 438765382b ./libjava/java/io/natFilePosix.cc ! 4215574494b ./libjava/java/io/natFileWin32.cc ! 2701462559b ./libjava/java/io/natObjectInputStream.cc ! 4239505089b ./libjava/java/io/natObjectOutputStream.cc ! 4090106463b ./libjava/java/lang/AbstractMethodError.java ! 3425188680b ./libjava/java/lang/ArithmeticException.java ! 3115671720b ./libjava/java/lang/ArrayIndexOutOfBoundsException.java ! 1373410447b ./libjava/java/lang/ArrayStoreException.java ! 2983258460b ./libjava/java/lang/Boolean.java ! 4251066809b ./libjava/java/lang/Byte.java ! 3632753519b ./libjava/java/lang/CharSequence.java ! 3322445246b ./libjava/java/lang/Character.java ! 553573251b ./libjava/java/lang/Class.h ! 3641057162b ./libjava/java/lang/Class.java ! 3914593902b ./libjava/java/lang/ClassCastException.java ! 2018649547b ./libjava/java/lang/ClassCircularityError.java ! 1262342693b ./libjava/java/lang/ClassFormatError.java ! 2745405805b ./libjava/java/lang/ClassLoader.java ! 863405399b ./libjava/java/lang/ClassNotFoundException.java ! 1163791317b ./libjava/java/lang/CloneNotSupportedException.java ! 524108559b ./libjava/java/lang/Cloneable.java ! 2017623600b ./libjava/java/lang/Comparable.java ! 4154726046b ./libjava/java/lang/Compiler.java ! 4246954832b ./libjava/java/lang/Double.java ! 315782992b ./libjava/java/lang/EcosProcess.java ! 674629591b ./libjava/java/lang/Error.java ! 2224382764b ./libjava/java/lang/Exception.java ! 479874825b ./libjava/java/lang/ExceptionInInitializerError.java ! 1399651516b ./libjava/java/lang/Float.java ! 1546884627b ./libjava/java/lang/IllegalAccessError.java ! 2739492776b ./libjava/java/lang/IllegalAccessException.java ! 1557093291b ./libjava/java/lang/IllegalArgumentException.java ! 4220991068b ./libjava/java/lang/IllegalMonitorStateException.java ! 172855953b ./libjava/java/lang/IllegalStateException.java ! 1303108506b ./libjava/java/lang/IllegalThreadStateException.java ! 153906896b ./libjava/java/lang/IncompatibleClassChangeError.java ! 166061792b ./libjava/java/lang/IndexOutOfBoundsException.java ! 2772342819b ./libjava/java/lang/InheritableThreadLocal.java ! 1458836935b ./libjava/java/lang/InstantiationError.java ! 650328562b ./libjava/java/lang/InstantiationException.java ! 4120577335b ./libjava/java/lang/Integer.java ! 1716407270b ./libjava/java/lang/InternalError.java ! 3005393186b ./libjava/java/lang/InterruptedException.java ! 1031814374b ./libjava/java/lang/LinkageError.java ! 1043365864b ./libjava/java/lang/Long.java ! 3228990355b ./libjava/java/lang/Math.java ! 480489940b ./libjava/java/lang/NegativeArraySizeException.java ! 1147004568b ./libjava/java/lang/NoClassDefFoundError.java ! 2828263392b ./libjava/java/lang/NoSuchFieldError.java ! 2392659469b ./libjava/java/lang/NoSuchFieldException.java ! 1339035495b ./libjava/java/lang/NoSuchMethodError.java ! 615266877b ./libjava/java/lang/NoSuchMethodException.java ! 1556435959b ./libjava/java/lang/NullPointerException.java ! 1334794302b ./libjava/java/lang/Number.java ! 899274464b ./libjava/java/lang/NumberFormatException.java ! 3421547735b ./libjava/java/lang/Object.h ! 3641470251b ./libjava/java/lang/Object.java ! 344219618b ./libjava/java/lang/OutOfMemoryError.java ! 2281685049b ./libjava/java/lang/Package.java ! 2357238508b ./libjava/java/lang/PosixProcess.java ! 3622530025b ./libjava/java/lang/Process.java ! 3010960818b ./libjava/java/lang/Runnable.java ! 1498739702b ./libjava/java/lang/Runtime.java ! 1799896457b ./libjava/java/lang/RuntimeException.java ! 3735977458b ./libjava/java/lang/RuntimePermission.java ! 3082173393b ./libjava/java/lang/SecurityException.java ! 788295818b ./libjava/java/lang/SecurityManager.java ! 987059562b ./libjava/java/lang/Short.java ! 3968168506b ./libjava/java/lang/StackOverflowError.java ! 2934755101b ./libjava/java/lang/StrictMath.java ! 1328413402b ./libjava/java/lang/String.java ! 2480138781b ./libjava/java/lang/StringBuffer.java ! 4119807874b ./libjava/java/lang/StringIndexOutOfBoundsException.java ! 2990987309b ./libjava/java/lang/System.java ! 3073946400b ./libjava/java/lang/Thread.java ! 3910182705b ./libjava/java/lang/ThreadDeath.java ! 176223137b ./libjava/java/lang/ThreadGroup.java ! 2901552173b ./libjava/java/lang/ThreadLocal.java ! 2728582923b ./libjava/java/lang/Throwable.java ! 402341795b ./libjava/java/lang/UnknownError.java ! 964603433b ./libjava/java/lang/UnsatisfiedLinkError.java ! 1966641471b ./libjava/java/lang/UnsupportedClassVersionError.java ! 3152130847b ./libjava/java/lang/UnsupportedOperationException.java ! 1734917059b ./libjava/java/lang/VMClassLoader.java ! 3002073692b ./libjava/java/lang/VMSecurityManager.java ! 4139089776b ./libjava/java/lang/VerifyError.java ! 3680335112b ./libjava/java/lang/VirtualMachineError.java ! 3929414917b ./libjava/java/lang/Void.java ! 3209764157b ./libjava/java/lang/Win32Process.java 1435754341b ./libjava/java/lang/dtoa.c 994774164b ./libjava/java/lang/e_acos.c 4273053537b ./libjava/java/lang/e_asin.c 1280734317b ./libjava/java/lang/e_atan2.c 2698793341b ./libjava/java/lang/e_exp.c 3934619985b ./libjava/java/lang/e_fmod.c 3710448655b ./libjava/java/lang/e_log.c 876585599b ./libjava/java/lang/e_pow.c - 3827866584b ./libjava/java/lang/e_rem_pio2.c 3495227073b ./libjava/java/lang/e_remainder.c 351649389b ./libjava/java/lang/e_scalb.c 4172761909b ./libjava/java/lang/e_sqrt.c 773177573b ./libjava/java/lang/fdlibm.h ! 969459924b ./libjava/java/lang/ieeefp.h 2140439599b ./libjava/java/lang/k_cos.c 2521991737b ./libjava/java/lang/k_rem_pio2.c 1794170989b ./libjava/java/lang/k_sin.c 2812209061b ./libjava/java/lang/k_tan.c 3525801158b ./libjava/java/lang/mprec.c 338852744b ./libjava/java/lang/mprec.h 2041042935b ./libjava/java/lang/natCharacter.cc ! 1760287660b ./libjava/java/lang/natClass.cc ! 3980285264b ./libjava/java/lang/natClassLoader.cc 3519010570b ./libjava/java/lang/natDouble.cc 2312870767b ./libjava/java/lang/natEcosProcess.cc 91234316b ./libjava/java/lang/natFloat.cc 3510482433b ./libjava/java/lang/natMath.cc ! 76124715b ./libjava/java/lang/natObject.cc ! 1982998394b ./libjava/java/lang/natPosixProcess.cc ! 3985207471b ./libjava/java/lang/natRuntime.cc ! 4255324328b ./libjava/java/lang/natString.cc 209062817b ./libjava/java/lang/natStringBuffer.cc ! 1182371633b ./libjava/java/lang/natSystem.cc ! 1391213516b ./libjava/java/lang/natThread.cc ! 1137947649b ./libjava/java/lang/natThrowable.cc ! 4294967295b ./libjava/java/lang/natWin32Process.cc ! 1460247144b ./libjava/java/lang/ref/PhantomReference.java ! 704062708b ./libjava/java/lang/ref/Reference.java ! 65399149b ./libjava/java/lang/ref/ReferenceQueue.java ! 3675082054b ./libjava/java/lang/ref/SoftReference.java ! 4137952990b ./libjava/java/lang/ref/WeakReference.java ! 4262082056b ./libjava/java/lang/ref/natReference.cc 1863148120b ./libjava/java/lang/reflect/AccessibleObject.java 1772289084b ./libjava/java/lang/reflect/Array.java 1042641503b ./libjava/java/lang/reflect/Constructor.java 2343995282b ./libjava/java/lang/reflect/Field.java ! 4276731407b ./libjava/java/lang/reflect/InvocationTargetException.java 2195316717b ./libjava/java/lang/reflect/Member.java 3154056039b ./libjava/java/lang/reflect/Method.java ! 737811330b ./libjava/java/lang/reflect/Modifier.java ! 3286982797b ./libjava/java/lang/reflect/ReflectPermission.java 467850593b ./libjava/java/lang/reflect/natArray.cc ! 848571325b ./libjava/java/lang/reflect/natConstructor.cc ! 2897267786b ./libjava/java/lang/reflect/natField.cc ! 3433405242b ./libjava/java/lang/reflect/natMethod.cc 4211007333b ./libjava/java/lang/s_atan.c 1992861509b ./libjava/java/lang/s_ceil.c 2560516823b ./libjava/java/lang/s_copysign.c 138245783b ./libjava/java/lang/s_cos.c 2696927637b ./libjava/java/lang/s_fabs.c 1587392745b ./libjava/java/lang/s_floor.c 781279555b ./libjava/java/lang/s_rint.c 1543063550b ./libjava/java/lang/s_scalbn.c 683141039b ./libjava/java/lang/s_sin.c 2604631654b ./libjava/java/lang/s_tan.c ! 2861859787b ./libjava/java/lang/sf_fabs.c ! 3733918551b ./libjava/java/lang/sf_rint.c 2159586687b ./libjava/java/lang/strtod.c 2208706716b ./libjava/java/lang/w_acos.c 2509257289b ./libjava/java/lang/w_asin.c 129756780b ./libjava/java/lang/w_atan2.c 3101537020b ./libjava/java/lang/w_exp.c 4251570485b ./libjava/java/lang/w_fmod.c 2517288589b ./libjava/java/lang/w_log.c 2200179114b ./libjava/java/lang/w_pow.c 3127225850b ./libjava/java/lang/w_remainder.c 3084712253b ./libjava/java/lang/w_sqrt.c ! 647790385b ./libjava/java/math/BigDecimal.java ! 1413640672b ./libjava/java/math/BigInteger.java ! 2740663451b ./libjava/java/net/Authenticator.java ! 1892964846b ./libjava/java/net/BindException.java ! 465134141b ./libjava/java/net/ConnectException.java ! 2009481994b ./libjava/java/net/ContentHandler.java 2451709496b ./libjava/java/net/ContentHandlerFactory.java ! 2799450041b ./libjava/java/net/DatagramPacket.java ! 2186623986b ./libjava/java/net/DatagramSocket.java ! 1684404099b ./libjava/java/net/DatagramSocketImpl.java ! 3221371229b ./libjava/java/net/FileNameMap.java ! 905107405b ./libjava/java/net/HttpURLConnection.java ! 2016211119b ./libjava/java/net/InetAddress.java ! 3267095408b ./libjava/java/net/JarURLConnection.java ! 2855708971b ./libjava/java/net/MalformedURLException.java ! 2301622401b ./libjava/java/net/MulticastSocket.java ! 1682337997b ./libjava/java/net/NetPermission.java ! 219229722b ./libjava/java/net/NoRouteToHostException.java ! 833606891b ./libjava/java/net/PasswordAuthentication.java ! 4105261490b ./libjava/java/net/PlainDatagramSocketImpl.java ! 2335349056b ./libjava/java/net/PlainSocketImpl.java ! 1942565398b ./libjava/java/net/ProtocolException.java ! 3938255056b ./libjava/java/net/ServerSocket.java ! 1934542585b ./libjava/java/net/Socket.java ! 3016170839b ./libjava/java/net/SocketException.java ! 1289495366b ./libjava/java/net/SocketImpl.java 2277031455b ./libjava/java/net/SocketImplFactory.java ! 2567328645b ./libjava/java/net/SocketOptions.java ! 1657196367b ./libjava/java/net/SocketPermission.java ! 1440065038b ./libjava/java/net/URL.java ! 194604118b ./libjava/java/net/URLClassLoader.java ! 2961889722b ./libjava/java/net/URLConnection.java ! 2772681802b ./libjava/java/net/URLDecoder.java ! 4220867118b ./libjava/java/net/URLEncoder.java ! 3036638609b ./libjava/java/net/URLStreamHandler.java 2216267556b ./libjava/java/net/URLStreamHandlerFactory.java ! 1041327798b ./libjava/java/net/UnknownHostException.java ! 2623632799b ./libjava/java/net/UnknownServiceException.java ! 4045295019b ./libjava/java/net/natInetAddress.cc ! 743824210b ./libjava/java/net/natPlainDatagramSocketImpl.cc ! 2983285886b ./libjava/java/net/natPlainSocketImpl.cc ! 2345713982b ./libjava/java/rmi/AccessException.java ! 638523787b ./libjava/java/rmi/AlreadyBoundException.java ! 3168686766b ./libjava/java/rmi/ConnectException.java ! 108680455b ./libjava/java/rmi/ConnectIOException.java ! 2315456896b ./libjava/java/rmi/MarshalException.java ! 1559402097b ./libjava/java/rmi/MarshalledObject.java ! 2730841917b ./libjava/java/rmi/Naming.java ! 2964967266b ./libjava/java/rmi/NoSuchObjectException.java ! 2207159994b ./libjava/java/rmi/NotBoundException.java ! 1880593648b ./libjava/java/rmi/RMISecurityException.java ! 1668944357b ./libjava/java/rmi/RMISecurityManager.java ! 3977817460b ./libjava/java/rmi/Remote.java ! 2722897537b ./libjava/java/rmi/RemoteException.java ! 2063315085b ./libjava/java/rmi/ServerError.java ! 3013999798b ./libjava/java/rmi/ServerException.java ! 991417645b ./libjava/java/rmi/ServerRuntimeException.java ! 158040251b ./libjava/java/rmi/StubNotFoundException.java ! 981089142b ./libjava/java/rmi/UnexpectedException.java ! 3267495332b ./libjava/java/rmi/UnknownHostException.java ! 3831786123b ./libjava/java/rmi/UnmarshalException.java 1531149925b ./libjava/java/rmi/activation/Activatable.java ! 202413195b ./libjava/java/rmi/activation/ActivateFailedException.java ! 3435388540b ./libjava/java/rmi/activation/ActivationDesc.java ! 2977173158b ./libjava/java/rmi/activation/ActivationException.java 443589476b ./libjava/java/rmi/activation/ActivationGroup.java ! 3932453163b ./libjava/java/rmi/activation/ActivationGroupDesc.java ! 3794676101b ./libjava/java/rmi/activation/ActivationGroupID.java ! 1660066253b ./libjava/java/rmi/activation/ActivationID.java 3314676255b ./libjava/java/rmi/activation/ActivationInstantiator.java 331032778b ./libjava/java/rmi/activation/ActivationMonitor.java 3527811786b ./libjava/java/rmi/activation/ActivationSystem.java 38902488b ./libjava/java/rmi/activation/Activator.java ! 3932075613b ./libjava/java/rmi/activation/UnknownGroupException.java ! 2859838111b ./libjava/java/rmi/activation/UnknownObjectException.java 1240298b ./libjava/java/rmi/dgc/DGC.java 3040253205b ./libjava/java/rmi/dgc/Lease.java 4206440135b ./libjava/java/rmi/dgc/VMID.java 2660899207b ./libjava/java/rmi/registry/LocateRegistry.java - 3447606163b ./libjava/java/rmi/registry/Registry.java 1399983578b ./libjava/java/rmi/registry/RegistryHandler.java ! 3139440594b ./libjava/java/rmi/server/ExportException.java 1080320338b ./libjava/java/rmi/server/LoaderHandler.java ! 3453671358b ./libjava/java/rmi/server/LogStream.java 3627631958b ./libjava/java/rmi/server/ObjID.java 1620681979b ./libjava/java/rmi/server/Operation.java ! 766223293b ./libjava/java/rmi/server/RMIClassLoader.java 1381387676b ./libjava/java/rmi/server/RMIClientSocketFactory.java 1355495784b ./libjava/java/rmi/server/RMIFailureHandler.java 637510001b ./libjava/java/rmi/server/RMIServerSocketFactory.java 491843230b ./libjava/java/rmi/server/RMISocketFactory.java ! 3007384076b ./libjava/java/rmi/server/RemoteCall.java ! 646982205b ./libjava/java/rmi/server/RemoteObject.java ! 1057967745b ./libjava/java/rmi/server/RemoteRef.java ! 3980074697b ./libjava/java/rmi/server/RemoteServer.java ! 2379911685b ./libjava/java/rmi/server/RemoteStub.java ! 2405566142b ./libjava/java/rmi/server/ServerCloneException.java ! 970903487b ./libjava/java/rmi/server/ServerNotActiveException.java 3269103800b ./libjava/java/rmi/server/ServerRef.java 1284557277b ./libjava/java/rmi/server/Skeleton.java ! 1298691040b ./libjava/java/rmi/server/SkeletonMismatchException.java ! 301272094b ./libjava/java/rmi/server/SkeletonNotFoundException.java ! 2163278585b ./libjava/java/rmi/server/SocketSecurityException.java 946423957b ./libjava/java/rmi/server/UID.java ! 3436591463b ./libjava/java/rmi/server/UnicastRemoteObject.java 3786643443b ./libjava/java/rmi/server/Unreferenced.java 3377565930b ./libjava/java/security/AccessControlContext.java ! 2503008464b ./libjava/java/security/AccessControlException.java ! 961049396b ./libjava/java/security/AccessController.java ! 2206881746b ./libjava/java/security/AlgorithmParameterGenerator.java ! 3955879194b ./libjava/java/security/AlgorithmParameterGeneratorSpi.java ! 1605717160b ./libjava/java/security/AlgorithmParameters.java ! 2891548705b ./libjava/java/security/AlgorithmParametersSpi.java ! 445477635b ./libjava/java/security/AllPermission.java ! 3690509591b ./libjava/java/security/BasicPermission.java ! 3914599195b ./libjava/java/security/Certificate.java ! 1245295455b ./libjava/java/security/CodeSource.java ! 1011061724b ./libjava/java/security/DigestException.java ! 3484233527b ./libjava/java/security/DigestInputStream.java ! 1273872520b ./libjava/java/security/DigestOutputStream.java ! 3131452143b ./libjava/java/security/DomainCombiner.java ! 2064440254b ./libjava/java/security/DummyKeyPairGenerator.java ! 1205011236b ./libjava/java/security/DummyMessageDigest.java ! 3244660822b ./libjava/java/security/DummySignature.java ! 3754360724b ./libjava/java/security/GeneralSecurityException.java ! 1223151028b ./libjava/java/security/Guard.java ! 1546088936b ./libjava/java/security/GuardedObject.java ! 2534219749b ./libjava/java/security/Identity.java ! 3669588150b ./libjava/java/security/IdentityScope.java ! 1258878052b ./libjava/java/security/InvalidAlgorithmParameterException.java ! 729426758b ./libjava/java/security/InvalidKeyException.java ! 4278354519b ./libjava/java/security/InvalidParameterException.java ! 323696554b ./libjava/java/security/Key.java ! 508303117b ./libjava/java/security/KeyException.java ! 3556171286b ./libjava/java/security/KeyFactory.java ! 1081989305b ./libjava/java/security/KeyFactorySpi.java ! 3220074237b ./libjava/java/security/KeyManagementException.java ! 1450975497b ./libjava/java/security/KeyPair.java ! 1445793144b ./libjava/java/security/KeyPairGenerator.java ! 3630224179b ./libjava/java/security/KeyPairGeneratorSpi.java ! 2818591760b ./libjava/java/security/KeyStore.java ! 2462887043b ./libjava/java/security/KeyStoreException.java ! 803045781b ./libjava/java/security/KeyStoreSpi.java ! 4235721395b ./libjava/java/security/MessageDigest.java ! 3540748562b ./libjava/java/security/MessageDigestSpi.java ! 1866536196b ./libjava/java/security/NoSuchAlgorithmException.java ! 492706813b ./libjava/java/security/NoSuchProviderException.java ! 528332829b ./libjava/java/security/Permission.java ! 4053507376b ./libjava/java/security/PermissionCollection.java ! 3401846776b ./libjava/java/security/Permissions.java ! 1801865567b ./libjava/java/security/Policy.java ! 3369614815b ./libjava/java/security/Principal.java ! 985381771b ./libjava/java/security/PrivateKey.java ! 1519374483b ./libjava/java/security/PrivilegedAction.java ! 2559441309b ./libjava/java/security/PrivilegedActionException.java ! 1001728643b ./libjava/java/security/PrivilegedExceptionAction.java ! 368821109b ./libjava/java/security/ProtectionDomain.java ! 2340776264b ./libjava/java/security/Provider.java ! 3835680906b ./libjava/java/security/ProviderException.java ! 1224382933b ./libjava/java/security/PublicKey.java ! 120707443b ./libjava/java/security/SecureClassLoader.java ! 494331022b ./libjava/java/security/SecureRandom.java ! 2053869154b ./libjava/java/security/SecureRandomSpi.java ! 3229850841b ./libjava/java/security/Security.java ! 3637925183b ./libjava/java/security/SecurityPermission.java ! 4213110400b ./libjava/java/security/Signature.java ! 498383671b ./libjava/java/security/SignatureException.java ! 2850222648b ./libjava/java/security/SignatureSpi.java ! 366295954b ./libjava/java/security/SignedObject.java ! 3719230281b ./libjava/java/security/Signer.java ! 2654502080b ./libjava/java/security/UnrecoverableKeyException.java ! 3042679945b ./libjava/java/security/UnresolvedPermission.java ! 208951186b ./libjava/java/security/acl/Acl.java 1107973997b ./libjava/java/security/acl/AclEntry.java ! 470826478b ./libjava/java/security/acl/AclNotFoundException.java 1196419206b ./libjava/java/security/acl/Group.java ! 2213283367b ./libjava/java/security/acl/LastOwnerException.java ! 3397637888b ./libjava/java/security/acl/NotOwnerException.java 689449683b ./libjava/java/security/acl/Owner.java 3427961043b ./libjava/java/security/acl/Permission.java ! 275997395b ./libjava/java/security/cert/CRL.java ! 938503207b ./libjava/java/security/cert/CRLException.java ! 233269914b ./libjava/java/security/cert/Certificate.java ! 962908602b ./libjava/java/security/cert/CertificateEncodingException.java ! 3422220568b ./libjava/java/security/cert/CertificateException.java ! 392043989b ./libjava/java/security/cert/CertificateExpiredException.java ! 1893973660b ./libjava/java/security/cert/CertificateFactory.java 1773373825b ./libjava/java/security/cert/CertificateFactorySpi.java ! 2007231431b ./libjava/java/security/cert/CertificateNotYetValidException.java ! 944611608b ./libjava/java/security/cert/CertificateParsingException.java ! 838800704b ./libjava/java/security/cert/X509CRL.java ! 379566121b ./libjava/java/security/cert/X509CRLEntry.java 3595656724b ./libjava/java/security/cert/X509Certificate.java 1496043464b ./libjava/java/security/cert/X509Extension.java 2128346166b ./libjava/java/security/classpath.security 1502191052b ./libjava/java/security/interfaces/DSAKey.java 931326038b ./libjava/java/security/interfaces/DSAKeyPairGenerator.java 3412106065b ./libjava/java/security/interfaces/DSAParams.java --- 12921,13492 ---- 2144114987b ./libjava/java/awt/peer/MenuPeer.java 3010921620b ./libjava/java/awt/peer/PanelPeer.java 3378714445b ./libjava/java/awt/peer/PopupMenuPeer.java 2932476036b ./libjava/java/awt/peer/ScrollbarPeer.java + 921008058b ./libjava/java/awt/peer/ScrollPanePeer.java 4184845888b ./libjava/java/awt/peer/TextAreaPeer.java 1984969162b ./libjava/java/awt/peer/TextComponentPeer.java 3129312744b ./libjava/java/awt/peer/TextFieldPeer.java 2230435871b ./libjava/java/awt/peer/WindowPeer.java + 1667509381b ./libjava/java/awt/Point.java + 1337742529b ./libjava/java/awt/Polygon.java + 1012523291b ./libjava/java/awt/PopupMenu.java + 895727923b ./libjava/java/awt/print/Book.java + 2575252233b ./libjava/java/awt/PrintGraphics.java + 1045531247b ./libjava/java/awt/PrintJob.java + 665581200b ./libjava/java/awt/print/Pageable.java + 2833569988b ./libjava/java/awt/print/PageFormat.java + 2950073433b ./libjava/java/awt/print/Paper.java + 2988584336b ./libjava/java/awt/print/Printable.java + 803392179b ./libjava/java/awt/print/PrinterAbortException.java + 3382830069b ./libjava/java/awt/print/PrinterException.java + 767673772b ./libjava/java/awt/print/PrinterGraphics.java + 3099051394b ./libjava/java/awt/print/PrinterIOException.java + 2450229836b ./libjava/java/awt/print/PrinterJob.java + 3867925269b ./libjava/java/awt/Rectangle.java + 3068597129b ./libjava/java/awt/RenderingHints.java + 2145818565b ./libjava/java/awt/Robot.java + 1655268610b ./libjava/java/awt/Scrollbar.java + 2144642110b ./libjava/java/awt/ScrollPaneAdjustable.java + 1265557509b ./libjava/java/awt/ScrollPane.java + 1622161060b ./libjava/java/awt/Shape.java + 2113160201b ./libjava/java/awt/Stroke.java + 2393232210b ./libjava/java/awt/SystemColor.java + 1409075397b ./libjava/java/awt/TextArea.java + 1189512898b ./libjava/java/awt/TextComponent.java + 2808733748b ./libjava/java/awt/TextField.java + 2679622818b ./libjava/java/awt/TexturePaint.java + 2797418683b ./libjava/java/awt/Toolkit.java + 3811432567b ./libjava/java/awt/Transparency.java + 3101170851b ./libjava/java/awt/Window.java 1515366999b ./libjava/java/beans/AppletInitializer.java + 2669908550b ./libjava/java/beans/beancontext/BeanContextChildComponentProxy.java + 1680972619b ./libjava/java/beans/beancontext/BeanContextChild.java + 488232453b ./libjava/java/beans/beancontext/BeanContextChildSupport.java + 1094587434b ./libjava/java/beans/beancontext/BeanContextContainerProxy.java + 1135449293b ./libjava/java/beans/beancontext/BeanContextEvent.java + 2767542609b ./libjava/java/beans/beancontext/BeanContext.java + 242862210b ./libjava/java/beans/beancontext/BeanContextMembershipEvent.java + 2481552408b ./libjava/java/beans/beancontext/BeanContextMembershipListener.java + 2023778890b ./libjava/java/beans/beancontext/BeanContextProxy.java + 3567375214b ./libjava/java/beans/beancontext/BeanContextServiceAvailableEvent.java + 1524483334b ./libjava/java/beans/beancontext/BeanContextServiceProviderBeanInfo.java + 2290646255b ./libjava/java/beans/beancontext/BeanContextServiceProvider.java + 3486010592b ./libjava/java/beans/beancontext/BeanContextServiceRevokedEvent.java + 1792611913b ./libjava/java/beans/beancontext/BeanContextServiceRevokedListener.java + 172300183b ./libjava/java/beans/beancontext/BeanContextServices.java + 649450665b ./libjava/java/beans/beancontext/BeanContextServicesListener.java 1833441000b ./libjava/java/beans/BeanDescriptor.java ! 1524972636b ./libjava/java/beans/BeanInfo.java 744629114b ./libjava/java/beans/Beans.java 2117723836b ./libjava/java/beans/Customizer.java 1994194050b ./libjava/java/beans/DesignMode.java 3820662012b ./libjava/java/beans/EventSetDescriptor.java + 2574430131b ./libjava/java/beans/ExceptionListener.java 4125494981b ./libjava/java/beans/FeatureDescriptor.java 1047826036b ./libjava/java/beans/IndexedPropertyDescriptor.java 2875985243b ./libjava/java/beans/IntrospectionException.java ! 2580414211b ./libjava/java/beans/Introspector.java 649392727b ./libjava/java/beans/MethodDescriptor.java 3829002128b ./libjava/java/beans/ParameterDescriptor.java ! 1631945746b ./libjava/java/beans/PropertyChangeEvent.java ! 471956345b ./libjava/java/beans/PropertyChangeListener.java ! 1512558450b ./libjava/java/beans/PropertyChangeListenerProxy.java ! 1009159415b ./libjava/java/beans/PropertyChangeSupport.java ! 3214497699b ./libjava/java/beans/PropertyDescriptor.java 199700315b ./libjava/java/beans/PropertyEditor.java 1782408506b ./libjava/java/beans/PropertyEditorManager.java 1820268780b ./libjava/java/beans/PropertyEditorSupport.java 4007301740b ./libjava/java/beans/PropertyVetoException.java 2552578115b ./libjava/java/beans/SimpleBeanInfo.java ! 18668222b ./libjava/java/beans/VetoableChangeListener.java ! 1333667518b ./libjava/java/beans/VetoableChangeListenerProxy.java ! 3099026450b ./libjava/java/beans/VetoableChangeSupport.java 1473289197b ./libjava/java/beans/Visibility.java 200470800b ./libjava/java/io/BufferedInputStream.java ! 1289264783b ./libjava/java/io/BufferedOutputStream.java ! 2712911459b ./libjava/java/io/BufferedReader.java 1491845880b ./libjava/java/io/BufferedWriter.java 3804278996b ./libjava/java/io/ByteArrayInputStream.java 200503157b ./libjava/java/io/ByteArrayOutputStream.java 1595495810b ./libjava/java/io/CharArrayReader.java ! 2053362408b ./libjava/java/io/CharArrayWriter.java ! 4153455823b ./libjava/java/io/CharConversionException.java 833277233b ./libjava/java/io/DataInput.java ! 1935409472b ./libjava/java/io/DataInputStream.java 2779752650b ./libjava/java/io/DataOutput.java 2879044799b ./libjava/java/io/DataOutputStream.java ! 431456788b ./libjava/java/io/EOFException.java ! 2008649999b ./libjava/java/io/Externalizable.java ! 2244502590b ./libjava/java/io/FileDescriptor.java 3092690903b ./libjava/java/io/FileFilter.java ! 1289873619b ./libjava/java/io/FileInputStream.java ! 445146170b ./libjava/java/io/File.java ! 57206385b ./libjava/java/io/FilenameFilter.java ! 3349996992b ./libjava/java/io/FileNotFoundException.java ! 845573317b ./libjava/java/io/FileOutputStream.java ! 3458190272b ./libjava/java/io/FilePermission.java 480136026b ./libjava/java/io/FileReader.java 3272147344b ./libjava/java/io/FileWriter.java 491642459b ./libjava/java/io/FilterInputStream.java 3572067476b ./libjava/java/io/FilterOutputStream.java 834480594b ./libjava/java/io/FilterReader.java 805331833b ./libjava/java/io/FilterWriter.java 1021426083b ./libjava/java/io/InputStream.java ! 3092965501b ./libjava/java/io/InputStreamReader.java ! 811084925b ./libjava/java/io/InterruptedIOException.java ! 1806625621b ./libjava/java/io/InvalidClassException.java ! 4213264284b ./libjava/java/io/InvalidObjectException.java ! 3499037157b ./libjava/java/io/IOException.java ! 2046387247b ./libjava/java/io/LineNumberInputStream.java 1977393201b ./libjava/java/io/LineNumberReader.java ! 873510583b ./libjava/java/io/natFileDescriptorEcos.cc ! 3852237539b ./libjava/java/io/natFileDescriptorPosix.cc ! 1364932101b ./libjava/java/io/natFileDescriptorWin32.cc ! 2467702739b ./libjava/java/io/natFilePosix.cc ! 3758140118b ./libjava/java/io/natFileWin32.cc ! 459733413b ./libjava/java/io/natObjectInputStream.cc ! 439868232b ./libjava/java/io/natVMObjectStreamClass.cc ! 2817046586b ./libjava/java/io/NotActiveException.java ! 241424297b ./libjava/java/io/NotSerializableException.java 3695857432b ./libjava/java/io/ObjectInput.java ! 2138300002b ./libjava/java/io/ObjectInputStream.java 1835600781b ./libjava/java/io/ObjectInputValidation.java 601064657b ./libjava/java/io/ObjectOutput.java ! 1579919169b ./libjava/java/io/ObjectOutputStream.java ! 66520657b ./libjava/java/io/ObjectStreamClass.java ! 410604428b ./libjava/java/io/ObjectStreamConstants.java ! 3589764989b ./libjava/java/io/ObjectStreamException.java ! 1962696547b ./libjava/java/io/ObjectStreamField.java ! 776684190b ./libjava/java/io/OptionalDataException.java 3053819886b ./libjava/java/io/OutputStream.java ! 1776975617b ./libjava/java/io/OutputStreamWriter.java ! 2127281274b ./libjava/java/io/PipedInputStream.java ! 4261211463b ./libjava/java/io/PipedOutputStream.java 3065379959b ./libjava/java/io/PipedReader.java ! 3864918147b ./libjava/java/io/PipedWriter.java 1146852699b ./libjava/java/io/PrintStream.java 569978908b ./libjava/java/io/PrintWriter.java ! 3038939981b ./libjava/java/io/PushbackInputStream.java 2210002535b ./libjava/java/io/PushbackReader.java ! 707722423b ./libjava/java/io/RandomAccessFile.java 3147885412b ./libjava/java/io/Reader.java 978743808b ./libjava/java/io/SequenceInputStream.java ! 1018370618b ./libjava/java/io/Serializable.java ! 2304632965b ./libjava/java/io/SerializablePermission.java ! 1922662748b ./libjava/java/io/StreamCorruptedException.java ! 1213715586b ./libjava/java/io/StreamTokenizer.java 1180454189b ./libjava/java/io/StringBufferInputStream.java 3179611106b ./libjava/java/io/StringReader.java ! 2231068296b ./libjava/java/io/StringWriter.java ! 2020363932b ./libjava/java/io/SyncFailedException.java ! 1184652293b ./libjava/java/io/UnsupportedEncodingException.java ! 753296513b ./libjava/java/io/UTFDataFormatException.java ! 3949190653b ./libjava/java/io/VMObjectStreamClass.java ! 1793710473b ./libjava/java/io/WriteAbortedException.java 3470521880b ./libjava/java/io/Writer.java ! 1705015121b ./libjava/java/lang/AbstractMethodError.java ! 3608826441b ./libjava/java/lang/ArithmeticException.java ! 1408252974b ./libjava/java/lang/ArrayIndexOutOfBoundsException.java ! 765150679b ./libjava/java/lang/ArrayStoreException.java ! 306993996b ./libjava/java/lang/AssertionError.java ! 390582101b ./libjava/java/lang/Boolean.java ! 1656999773b ./libjava/java/lang/Byte.java ! 2227892273b ./libjava/java/lang/Character.java ! 1320727522b ./libjava/java/lang/CharSequence.java ! 2151473066b ./libjava/java/lang/ClassCastException.java ! 2126293361b ./libjava/java/lang/ClassCircularityError.java ! 1199144380b ./libjava/java/lang/ClassFormatError.java ! 1230118788b ./libjava/java/lang/Class.h ! 3137319053b ./libjava/java/lang/Class.java ! 1934884531b ./libjava/java/lang/ClassLoader.java ! 3832354279b ./libjava/java/lang/ClassNotFoundException.java ! 1486373898b ./libjava/java/lang/Cloneable.java ! 673068051b ./libjava/java/lang/CloneNotSupportedException.java ! 3893631920b ./libjava/java/lang/Comparable.java ! 4032774784b ./libjava/java/lang/Compiler.java ! 1200936367b ./libjava/java/lang/Double.java 1435754341b ./libjava/java/lang/dtoa.c 994774164b ./libjava/java/lang/e_acos.c 4273053537b ./libjava/java/lang/e_asin.c 1280734317b ./libjava/java/lang/e_atan2.c + 1379141136b ./libjava/java/lang/EcosProcess.java 2698793341b ./libjava/java/lang/e_exp.c 3934619985b ./libjava/java/lang/e_fmod.c 3710448655b ./libjava/java/lang/e_log.c 876585599b ./libjava/java/lang/e_pow.c 3495227073b ./libjava/java/lang/e_remainder.c + 3827866584b ./libjava/java/lang/e_rem_pio2.c + 9105713b ./libjava/java/lang/Error.java 351649389b ./libjava/java/lang/e_scalb.c 4172761909b ./libjava/java/lang/e_sqrt.c + 1952296714b ./libjava/java/lang/ExceptionInInitializerError.java + 2472475140b ./libjava/java/lang/Exception.java 773177573b ./libjava/java/lang/fdlibm.h ! 3220530637b ./libjava/java/lang/Float.java ! 1797756641b ./libjava/java/lang/ieeefp.h ! 1418569968b ./libjava/java/lang/IllegalAccessError.java ! 1197904351b ./libjava/java/lang/IllegalAccessException.java ! 394073694b ./libjava/java/lang/IllegalArgumentException.java ! 792399989b ./libjava/java/lang/IllegalMonitorStateException.java ! 4199675375b ./libjava/java/lang/IllegalStateException.java ! 2942340144b ./libjava/java/lang/IllegalThreadStateException.java ! 3713589241b ./libjava/java/lang/IncompatibleClassChangeError.java ! 3797428312b ./libjava/java/lang/IndexOutOfBoundsException.java ! 2358284394b ./libjava/java/lang/InheritableThreadLocal.java ! 2732567219b ./libjava/java/lang/InstantiationError.java ! 4238832620b ./libjava/java/lang/InstantiationException.java ! 654167576b ./libjava/java/lang/Integer.java ! 2038401493b ./libjava/java/lang/InternalError.java ! 1061890963b ./libjava/java/lang/InterruptedException.java 2140439599b ./libjava/java/lang/k_cos.c 2521991737b ./libjava/java/lang/k_rem_pio2.c 1794170989b ./libjava/java/lang/k_sin.c 2812209061b ./libjava/java/lang/k_tan.c + 524389970b ./libjava/java/lang/LinkageError.java + 960037250b ./libjava/java/lang/Long.java + 3228990355b ./libjava/java/lang/Math.java 3525801158b ./libjava/java/lang/mprec.c 338852744b ./libjava/java/lang/mprec.h 2041042935b ./libjava/java/lang/natCharacter.cc ! 4068337916b ./libjava/java/lang/natClass.cc ! 1216079886b ./libjava/java/lang/natClassLoader.cc 3519010570b ./libjava/java/lang/natDouble.cc 2312870767b ./libjava/java/lang/natEcosProcess.cc 91234316b ./libjava/java/lang/natFloat.cc 3510482433b ./libjava/java/lang/natMath.cc ! 3690041071b ./libjava/java/lang/natObject.cc ! 152803494b ./libjava/java/lang/natPosixProcess.cc ! 789884803b ./libjava/java/lang/natRuntime.cc 209062817b ./libjava/java/lang/natStringBuffer.cc ! 1537911366b ./libjava/java/lang/natString.cc ! 1777124194b ./libjava/java/lang/natSystem.cc ! 636949972b ./libjava/java/lang/natThread.cc ! 585510303b ./libjava/java/lang/natVMSecurityManager.cc ! 2120194864b ./libjava/java/lang/natWin32Process.cc ! 263797800b ./libjava/java/lang/NegativeArraySizeException.java ! 3319507675b ./libjava/java/lang/NoClassDefFoundError.java ! 4085492067b ./libjava/java/lang/NoSuchFieldError.java ! 2323645147b ./libjava/java/lang/NoSuchFieldException.java ! 344512868b ./libjava/java/lang/NoSuchMethodError.java ! 1564778027b ./libjava/java/lang/NoSuchMethodException.java ! 1207657808b ./libjava/java/lang/NullPointerException.java ! 1235646575b ./libjava/java/lang/NumberFormatException.java ! 4257473768b ./libjava/java/lang/Number.java ! 3421547735b ./libjava/java/lang/Object.h ! 3641470251b ./libjava/java/lang/Object.java ! 1753573435b ./libjava/java/lang/OutOfMemoryError.java ! 2281685049b ./libjava/java/lang/Package.java ! 2135848456b ./libjava/java/lang/PosixProcess.java ! 281793156b ./libjava/java/lang/Process.java 1863148120b ./libjava/java/lang/reflect/AccessibleObject.java 1772289084b ./libjava/java/lang/reflect/Array.java 1042641503b ./libjava/java/lang/reflect/Constructor.java 2343995282b ./libjava/java/lang/reflect/Field.java ! 3471691201b ./libjava/java/lang/reflect/InvocationHandler.java ! 1047699882b ./libjava/java/lang/reflect/InvocationTargetException.java 2195316717b ./libjava/java/lang/reflect/Member.java 3154056039b ./libjava/java/lang/reflect/Method.java ! 2395391486b ./libjava/java/lang/reflect/Modifier.java 467850593b ./libjava/java/lang/reflect/natArray.cc ! 3363342234b ./libjava/java/lang/reflect/natConstructor.cc ! 1629711356b ./libjava/java/lang/reflect/natField.cc ! 1126649798b ./libjava/java/lang/reflect/natMethod.cc ! 2206651938b ./libjava/java/lang/reflect/natProxy.cc ! 4197235819b ./libjava/java/lang/reflect/Proxy.java ! 3286982797b ./libjava/java/lang/reflect/ReflectPermission.java ! 2625799733b ./libjava/java/lang/reflect/UndeclaredThrowableException.java ! 3450092246b ./libjava/java/lang/ref/natReference.cc ! 1460247144b ./libjava/java/lang/ref/PhantomReference.java ! 1257792028b ./libjava/java/lang/ref/Reference.java ! 65399149b ./libjava/java/lang/ref/ReferenceQueue.java ! 3675082054b ./libjava/java/lang/ref/SoftReference.java ! 4137952990b ./libjava/java/lang/ref/WeakReference.java ! 314741759b ./libjava/java/lang/Runnable.java ! 3456940884b ./libjava/java/lang/RuntimeException.java ! 520756140b ./libjava/java/lang/Runtime.java ! 2126854009b ./libjava/java/lang/RuntimePermission.java 4211007333b ./libjava/java/lang/s_atan.c 1992861509b ./libjava/java/lang/s_ceil.c 2560516823b ./libjava/java/lang/s_copysign.c 138245783b ./libjava/java/lang/s_cos.c + 3060742237b ./libjava/java/lang/SecurityException.java + 2913842258b ./libjava/java/lang/SecurityManager.java 2696927637b ./libjava/java/lang/s_fabs.c + 2861859787b ./libjava/java/lang/sf_fabs.c 1587392745b ./libjava/java/lang/s_floor.c + 3733918551b ./libjava/java/lang/sf_rint.c + 2863678286b ./libjava/java/lang/Short.java 781279555b ./libjava/java/lang/s_rint.c 1543063550b ./libjava/java/lang/s_scalbn.c 683141039b ./libjava/java/lang/s_sin.c + 4244757918b ./libjava/java/lang/StackOverflowError.java + 2186241527b ./libjava/java/lang/StackTraceElement.java 2604631654b ./libjava/java/lang/s_tan.c ! 2934755101b ./libjava/java/lang/StrictMath.java ! 2253734108b ./libjava/java/lang/StringBuffer.java ! 976268260b ./libjava/java/lang/StringIndexOutOfBoundsException.java ! 1255014411b ./libjava/java/lang/String.java 2159586687b ./libjava/java/lang/strtod.c + 4124028661b ./libjava/java/lang/System.java + 708268231b ./libjava/java/lang/ThreadDeath.java + 1472651677b ./libjava/java/lang/ThreadGroup.java + 2224008050b ./libjava/java/lang/Thread.java + 2461717169b ./libjava/java/lang/ThreadLocal.java + 865003071b ./libjava/java/lang/Throwable.java + 1410681639b ./libjava/java/lang/UnknownError.java + 3661785266b ./libjava/java/lang/UnsatisfiedLinkError.java + 1590920791b ./libjava/java/lang/UnsupportedClassVersionError.java + 1755663743b ./libjava/java/lang/UnsupportedOperationException.java + 1033563786b ./libjava/java/lang/VerifyError.java + 119886432b ./libjava/java/lang/VirtualMachineError.java + 805198848b ./libjava/java/lang/VMClassLoader.java + 1683849443b ./libjava/java/lang/VMSecurityManager.java + 108756976b ./libjava/java/lang/VMThrowable.java + 4151098611b ./libjava/java/lang/Void.java 2208706716b ./libjava/java/lang/w_acos.c 2509257289b ./libjava/java/lang/w_asin.c 129756780b ./libjava/java/lang/w_atan2.c 3101537020b ./libjava/java/lang/w_exp.c 4251570485b ./libjava/java/lang/w_fmod.c + 3963510586b ./libjava/java/lang/Win32Process.java 2517288589b ./libjava/java/lang/w_log.c 2200179114b ./libjava/java/lang/w_pow.c 3127225850b ./libjava/java/lang/w_remainder.c 3084712253b ./libjava/java/lang/w_sqrt.c ! 592829120b ./libjava/java/math/BigDecimal.java ! 1238150788b ./libjava/java/math/BigInteger.java ! 3180929962b ./libjava/java/net/Authenticator.java ! 1743512707b ./libjava/java/net/BindException.java ! 2426087274b ./libjava/java/net/ConnectException.java 2451709496b ./libjava/java/net/ContentHandlerFactory.java ! 3990596783b ./libjava/java/net/ContentHandler.java ! 848318870b ./libjava/java/net/DatagramPacket.java ! 2274051154b ./libjava/java/net/DatagramSocketImplFactory.java ! 2506966924b ./libjava/java/net/DatagramSocketImpl.java ! 3906909869b ./libjava/java/net/DatagramSocket.java ! 1502291104b ./libjava/java/net/FileNameMap.java ! 2216245141b ./libjava/java/net/HttpURLConnection.java ! 2818832983b ./libjava/java/net/Inet4Address.java ! 2278252408b ./libjava/java/net/Inet6Address.java ! 4139718372b ./libjava/java/net/InetAddress.java ! 1410075727b ./libjava/java/net/InetSocketAddress.java ! 1448108501b ./libjava/java/net/JarURLConnection.java ! 2375086431b ./libjava/java/net/MalformedURLException.java ! 3239854152b ./libjava/java/net/MulticastSocket.java ! 1717571079b ./libjava/java/net/natInetAddress.cc ! 1172732398b ./libjava/java/net/natNetworkInterface.cc ! 1843848253b ./libjava/java/net/natPlainDatagramSocketImpl.cc ! 3546340705b ./libjava/java/net/natPlainSocketImpl.cc ! 1976437067b ./libjava/java/net/NetPermission.java ! 2182773416b ./libjava/java/net/NetworkInterface.java ! 1314162899b ./libjava/java/net/NoRouteToHostException.java ! 2364180137b ./libjava/java/net/PasswordAuthentication.java ! 2704087174b ./libjava/java/net/PlainDatagramSocketImpl.java ! 1639544030b ./libjava/java/net/PlainSocketImpl.java ! 9108857b ./libjava/java/net/PortUnreachableException.java ! 4269059656b ./libjava/java/net/ProtocolException.java ! 1143041390b ./libjava/java/net/ServerSocket.java ! 1288381648b ./libjava/java/net/SocketAddress.java ! 2640191189b ./libjava/java/net/SocketException.java 2277031455b ./libjava/java/net/SocketImplFactory.java ! 1936643428b ./libjava/java/net/SocketImpl.java ! 1962161860b ./libjava/java/net/Socket.java ! 2287397673b ./libjava/java/net/SocketOptions.java ! 2557609826b ./libjava/java/net/SocketPermission.java ! 2121024205b ./libjava/java/net/SocketTimeoutException.java ! 621547579b ./libjava/java/net/UnknownHostException.java ! 1524613334b ./libjava/java/net/UnknownServiceException.java ! 1778798028b ./libjava/java/net/URI.java ! 1110355129b ./libjava/java/net/URISyntaxException.java ! 92332022b ./libjava/java/net/URLClassLoader.java ! 1087332218b ./libjava/java/net/URLConnection.java ! 3344161737b ./libjava/java/net/URLDecoder.java ! 1435682115b ./libjava/java/net/URLEncoder.java ! 3836199530b ./libjava/java/net/URL.java 2216267556b ./libjava/java/net/URLStreamHandlerFactory.java ! 2420777516b ./libjava/java/net/URLStreamHandler.java ! 114232809b ./libjava/java/nio/Buffer.java ! 3003180277b ./libjava/java/nio/BufferOverflowException.java ! 2231682041b ./libjava/java/nio/BufferUnderflowException.java ! 1601207350b ./libjava/java/nio/ByteBuffer.java ! 3686289353b ./libjava/java/nio/ByteOrder.java ! 1177379858b ./libjava/java/nio/channels/AlreadyConnectedException.java ! 1107823056b ./libjava/java/nio/channels/AsynchronousCloseException.java ! 3361202762b ./libjava/java/nio/channels/ByteChannel.java ! 208984261b ./libjava/java/nio/channels/CancelledKeyException.java ! 2343921310b ./libjava/java/nio/channels/Channel.java ! 2787319640b ./libjava/java/nio/channels/Channels.java ! 2786751875b ./libjava/java/nio/channels/ClosedByInterruptException.java ! 4212624934b ./libjava/java/nio/channels/ClosedChannelException.java ! 4203077387b ./libjava/java/nio/channels/ClosedSelectorException.java ! 3740244084b ./libjava/java/nio/channels/ConnectionPendingException.java ! 3518662813b ./libjava/java/nio/channels/DatagramChannel.java ! 3885509195b ./libjava/java/nio/channels/FileChannel.java ! 868008962b ./libjava/java/nio/channels/FileLockInterruptionException.java ! 3845407183b ./libjava/java/nio/channels/FileLock.java ! 2289036483b ./libjava/java/nio/channels/GatheringByteChannel.java ! 1128586081b ./libjava/java/nio/channels/IllegalBlockingModeException.java ! 1109611563b ./libjava/java/nio/channels/IllegalSelectorException.java ! 1672534674b ./libjava/java/nio/channels/InterruptibleChannel.java ! 3350473350b ./libjava/java/nio/channels/NoConnectionPendingException.java ! 608877251b ./libjava/java/nio/channels/NonReadableChannelException.java ! 3872587480b ./libjava/java/nio/channels/NonWritableChannelException.java ! 1101980409b ./libjava/java/nio/channels/NotYetBoundException.java ! 890667765b ./libjava/java/nio/channels/NotYetConnectedException.java ! 1778308890b ./libjava/java/nio/channels/OverlappingFileLockException.java ! 2039195070b ./libjava/java/nio/channels/Pipe.java ! 3283352633b ./libjava/java/nio/channels/ReadableByteChannel.java ! 1278030260b ./libjava/java/nio/channels/ScatteringByteChannel.java ! 1187145085b ./libjava/java/nio/channels/SelectableChannel.java ! 2222366718b ./libjava/java/nio/channels/SelectionKey.java ! 449503035b ./libjava/java/nio/channels/Selector.java ! 756463571b ./libjava/java/nio/channels/ServerSocketChannel.java ! 2666360020b ./libjava/java/nio/channels/SocketChannel.java ! 1504911414b ./libjava/java/nio/channels/spi/AbstractInterruptibleChannel.java ! 1375134345b ./libjava/java/nio/channels/spi/AbstractSelectableChannel.java ! 4093345435b ./libjava/java/nio/channels/spi/AbstractSelectionKey.java ! 1401298231b ./libjava/java/nio/channels/spi/AbstractSelector.java ! 4050154085b ./libjava/java/nio/channels/spi/SelectorProvider.java ! 2778637637b ./libjava/java/nio/channels/UnresolvedAddressException.java ! 3969634423b ./libjava/java/nio/channels/UnsupportedAddressTypeException.java ! 3544554741b ./libjava/java/nio/channels/WritableByteChannel.java ! 2811837814b ./libjava/java/nio/CharBuffer.java ! 2225496161b ./libjava/java/nio/charset/CharacterCodingException.java ! 1176971308b ./libjava/java/nio/charset/CharsetDecoder.java ! 1877868600b ./libjava/java/nio/charset/CharsetEncoder.java ! 3129762162b ./libjava/java/nio/charset/Charset.java ! 737660262b ./libjava/java/nio/charset/CoderMalfunctionError.java ! 4012862540b ./libjava/java/nio/charset/CoderResult.java ! 490549822b ./libjava/java/nio/charset/CodingErrorAction.java ! 3780446712b ./libjava/java/nio/charset/IllegalCharsetNameException.java ! 1055655800b ./libjava/java/nio/charset/MalformedInputException.java ! 4069491730b ./libjava/java/nio/charset/spi/CharsetProvider.java ! 476170321b ./libjava/java/nio/charset/UnmappableCharacterException.java ! 343000553b ./libjava/java/nio/charset/UnsupportedCharsetException.java ! 1221212992b ./libjava/java/nio/DoubleBuffer.java ! 67400934b ./libjava/java/nio/FloatBuffer.java ! 2471040152b ./libjava/java/nio/IntBuffer.java ! 783746649b ./libjava/java/nio/InvalidMarkException.java ! 327783972b ./libjava/java/nio/LongBuffer.java ! 3677204947b ./libjava/java/nio/MappedByteBuffer.java ! 3776813594b ./libjava/java/nio/ReadOnlyBufferException.java ! 3065952916b ./libjava/java/nio/ShortBuffer.java ! 2536299246b ./libjava/java/rmi/AccessException.java 1531149925b ./libjava/java/rmi/activation/Activatable.java ! 2276804202b ./libjava/java/rmi/activation/ActivateFailedException.java ! 3241489747b ./libjava/java/rmi/activation/ActivationDesc.java ! 3697136923b ./libjava/java/rmi/activation/ActivationException.java ! 1497281637b ./libjava/java/rmi/activation/ActivationGroupDesc.java ! 1688342631b ./libjava/java/rmi/activation/ActivationGroupID.java 443589476b ./libjava/java/rmi/activation/ActivationGroup.java ! 2857609657b ./libjava/java/rmi/activation/ActivationID.java 3314676255b ./libjava/java/rmi/activation/ActivationInstantiator.java 331032778b ./libjava/java/rmi/activation/ActivationMonitor.java 3527811786b ./libjava/java/rmi/activation/ActivationSystem.java 38902488b ./libjava/java/rmi/activation/Activator.java ! 2836476823b ./libjava/java/rmi/activation/UnknownGroupException.java ! 33984796b ./libjava/java/rmi/activation/UnknownObjectException.java ! 3218589521b ./libjava/java/rmi/AlreadyBoundException.java ! 3062104288b ./libjava/java/rmi/ConnectException.java ! 2074608419b ./libjava/java/rmi/ConnectIOException.java 1240298b ./libjava/java/rmi/dgc/DGC.java 3040253205b ./libjava/java/rmi/dgc/Lease.java 4206440135b ./libjava/java/rmi/dgc/VMID.java + 1405989343b ./libjava/java/rmi/MarshalException.java + 626626695b ./libjava/java/rmi/MarshalledObject.java + 2730841917b ./libjava/java/rmi/Naming.java + 1822147110b ./libjava/java/rmi/NoSuchObjectException.java + 309568247b ./libjava/java/rmi/NotBoundException.java 2660899207b ./libjava/java/rmi/registry/LocateRegistry.java 1399983578b ./libjava/java/rmi/registry/RegistryHandler.java ! 3447606163b ./libjava/java/rmi/registry/Registry.java ! 2927091976b ./libjava/java/rmi/RemoteException.java ! 3977817460b ./libjava/java/rmi/Remote.java ! 3203646295b ./libjava/java/rmi/RMISecurityException.java ! 1668944357b ./libjava/java/rmi/RMISecurityManager.java ! 2930230515b ./libjava/java/rmi/ServerError.java ! 407423429b ./libjava/java/rmi/ServerException.java ! 2646105728b ./libjava/java/rmi/server/ExportException.java 1080320338b ./libjava/java/rmi/server/LoaderHandler.java ! 2675657151b ./libjava/java/rmi/server/LogStream.java 3627631958b ./libjava/java/rmi/server/ObjID.java 1620681979b ./libjava/java/rmi/server/Operation.java ! 3007384076b ./libjava/java/rmi/server/RemoteCall.java ! 503452378b ./libjava/java/rmi/server/RemoteObject.java ! 1057967745b ./libjava/java/rmi/server/RemoteRef.java ! 4145601291b ./libjava/java/rmi/server/RemoteServer.java ! 2379911685b ./libjava/java/rmi/server/RemoteStub.java ! 1653790122b ./libjava/java/rmi/server/RMIClassLoader.java ! 1010028748b ./libjava/java/rmi/server/RMIClassLoaderSpi.java 1381387676b ./libjava/java/rmi/server/RMIClientSocketFactory.java 1355495784b ./libjava/java/rmi/server/RMIFailureHandler.java 637510001b ./libjava/java/rmi/server/RMIServerSocketFactory.java 491843230b ./libjava/java/rmi/server/RMISocketFactory.java ! 611023924b ./libjava/java/rmi/ServerRuntimeException.java ! 27509570b ./libjava/java/rmi/server/ServerCloneException.java ! 2514270999b ./libjava/java/rmi/server/ServerNotActiveException.java 3269103800b ./libjava/java/rmi/server/ServerRef.java 1284557277b ./libjava/java/rmi/server/Skeleton.java ! 2339569196b ./libjava/java/rmi/server/SkeletonMismatchException.java ! 1195752104b ./libjava/java/rmi/server/SkeletonNotFoundException.java ! 907104369b ./libjava/java/rmi/server/SocketSecurityException.java 946423957b ./libjava/java/rmi/server/UID.java ! 803665402b ./libjava/java/rmi/server/UnicastRemoteObject.java 3786643443b ./libjava/java/rmi/server/Unreferenced.java + 860394651b ./libjava/java/rmi/StubNotFoundException.java + 1208462067b ./libjava/java/rmi/UnexpectedException.java + 891904643b ./libjava/java/rmi/UnknownHostException.java + 33682231b ./libjava/java/rmi/UnmarshalException.java 3377565930b ./libjava/java/security/AccessControlContext.java ! 645134208b ./libjava/java/security/AccessControlException.java ! 3588628199b ./libjava/java/security/AccessController.java 1107973997b ./libjava/java/security/acl/AclEntry.java ! 208951186b ./libjava/java/security/acl/Acl.java ! 2498147684b ./libjava/java/security/acl/AclNotFoundException.java 1196419206b ./libjava/java/security/acl/Group.java ! 1230038778b ./libjava/java/security/acl/LastOwnerException.java ! 3467649811b ./libjava/java/security/acl/NotOwnerException.java 689449683b ./libjava/java/security/acl/Owner.java 3427961043b ./libjava/java/security/acl/Permission.java ! 2206881746b ./libjava/java/security/AlgorithmParameterGenerator.java ! 3955879194b ./libjava/java/security/AlgorithmParameterGeneratorSpi.java ! 1605717160b ./libjava/java/security/AlgorithmParameters.java ! 2891548705b ./libjava/java/security/AlgorithmParametersSpi.java ! 759553445b ./libjava/java/security/AllPermission.java ! 1520811337b ./libjava/java/security/BasicPermission.java ! 1573863421b ./libjava/java/security/cert/CertificateEncodingException.java ! 2026304611b ./libjava/java/security/cert/CertificateException.java ! 1582164272b ./libjava/java/security/cert/CertificateExpiredException.java ! 1554554645b ./libjava/java/security/cert/CertificateFactory.java 1773373825b ./libjava/java/security/cert/CertificateFactorySpi.java ! 2932971988b ./libjava/java/security/cert/Certificate.java ! 3600083148b ./libjava/java/security/cert/CertificateNotYetValidException.java ! 1378301308b ./libjava/java/security/cert/CertificateParsingException.java ! 947418097b ./libjava/java/security/cert/CertPathBuilderException.java ! 670032851b ./libjava/java/security/cert/CertPath.java ! 1793252223b ./libjava/java/security/cert/CertPathValidatorException.java ! 3879438487b ./libjava/java/security/cert/CertStoreException.java ! 4092886020b ./libjava/java/security/cert/CRLException.java ! 275997395b ./libjava/java/security/cert/CRL.java ! 3432481564b ./libjava/java/security/Certificate.java 3595656724b ./libjava/java/security/cert/X509Certificate.java + 379566121b ./libjava/java/security/cert/X509CRLEntry.java + 838800704b ./libjava/java/security/cert/X509CRL.java 1496043464b ./libjava/java/security/cert/X509Extension.java 2128346166b ./libjava/java/security/classpath.security + 1577610710b ./libjava/java/security/CodeSource.java + 4122990934b ./libjava/java/security/DigestException.java + 3484233527b ./libjava/java/security/DigestInputStream.java + 447643046b ./libjava/java/security/DigestOutputStream.java + 369929178b ./libjava/java/security/DomainCombiner.java + 2750196912b ./libjava/java/security/DummyKeyPairGenerator.java + 4093927334b ./libjava/java/security/DummyMessageDigest.java + 3197216121b ./libjava/java/security/DummySignature.java + 151534961b ./libjava/java/security/GeneralSecurityException.java + 1982594480b ./libjava/java/security/GuardedObject.java + 4240398367b ./libjava/java/security/Guard.java + 382462013b ./libjava/java/security/Identity.java + 3669588150b ./libjava/java/security/IdentityScope.java 1502191052b ./libjava/java/security/interfaces/DSAKey.java 931326038b ./libjava/java/security/interfaces/DSAKeyPairGenerator.java 3412106065b ./libjava/java/security/interfaces/DSAParams.java *************** *** 12733,12746 **** 1654913905b ./libjava/java/security/interfaces/RSAPrivateCrtKey.java 2692733678b ./libjava/java/security/interfaces/RSAPrivateKey.java 1233397848b ./libjava/java/security/interfaces/RSAPublicKey.java 464741950b ./libjava/java/security/libgcj.security 822101390b ./libjava/java/security/spec/AlgorithmParameterSpec.java ! 3120841125b ./libjava/java/security/spec/DSAParameterSpec.java ! 2299637832b ./libjava/java/security/spec/DSAPrivateKeySpec.java ! 681202330b ./libjava/java/security/spec/DSAPublicKeySpec.java 1352408709b ./libjava/java/security/spec/EncodedKeySpec.java ! 4009180494b ./libjava/java/security/spec/InvalidKeySpecException.java ! 965497815b ./libjava/java/security/spec/InvalidParameterSpecException.java 3101037976b ./libjava/java/security/spec/KeySpec.java 2816023539b ./libjava/java/security/spec/PKCS8EncodedKeySpec.java 1120858009b ./libjava/java/security/spec/RSAKeyGenParameterSpec.java --- 13496,13550 ---- 1654913905b ./libjava/java/security/interfaces/RSAPrivateCrtKey.java 2692733678b ./libjava/java/security/interfaces/RSAPrivateKey.java 1233397848b ./libjava/java/security/interfaces/RSAPublicKey.java + 387743926b ./libjava/java/security/InvalidAlgorithmParameterException.java + 1114124902b ./libjava/java/security/InvalidKeyException.java + 842557512b ./libjava/java/security/InvalidParameterException.java + 2538597255b ./libjava/java/security/KeyException.java + 3556171286b ./libjava/java/security/KeyFactory.java + 1081989305b ./libjava/java/security/KeyFactorySpi.java + 2104909133b ./libjava/java/security/Key.java + 3873869696b ./libjava/java/security/KeyManagementException.java + 2733769867b ./libjava/java/security/KeyPairGenerator.java + 2630188502b ./libjava/java/security/KeyPairGeneratorSpi.java + 3788361193b ./libjava/java/security/KeyPair.java + 3516921498b ./libjava/java/security/KeyStoreException.java + 2908170181b ./libjava/java/security/KeyStore.java + 803045781b ./libjava/java/security/KeyStoreSpi.java 464741950b ./libjava/java/security/libgcj.security + 2785763200b ./libjava/java/security/MessageDigest.java + 3540748562b ./libjava/java/security/MessageDigestSpi.java + 2811830407b ./libjava/java/security/NoSuchAlgorithmException.java + 2194883871b ./libjava/java/security/NoSuchProviderException.java + 4179048292b ./libjava/java/security/PermissionCollection.java + 3216869363b ./libjava/java/security/Permission.java + 2966145350b ./libjava/java/security/Permissions.java + 19046364b ./libjava/java/security/Policy.java + 2295363248b ./libjava/java/security/Principal.java + 4182367670b ./libjava/java/security/PrivateKey.java + 3035557964b ./libjava/java/security/PrivilegedActionException.java + 845620376b ./libjava/java/security/PrivilegedAction.java + 751056497b ./libjava/java/security/PrivilegedExceptionAction.java + 2659210574b ./libjava/java/security/ProtectionDomain.java + 2801902693b ./libjava/java/security/ProviderException.java + 2816249636b ./libjava/java/security/Provider.java + 3182669628b ./libjava/java/security/PublicKey.java + 3455569078b ./libjava/java/security/SecureClassLoader.java + 872681494b ./libjava/java/security/SecureRandom.java + 1398410059b ./libjava/java/security/SecureRandomSpi.java + 2828697755b ./libjava/java/security/Security.java + 143681966b ./libjava/java/security/SecurityPermission.java + 2750720587b ./libjava/java/security/SignatureException.java + 1667712372b ./libjava/java/security/Signature.java + 2850222648b ./libjava/java/security/SignatureSpi.java + 985912182b ./libjava/java/security/SignedObject.java + 3719230281b ./libjava/java/security/Signer.java 822101390b ./libjava/java/security/spec/AlgorithmParameterSpec.java ! 957943062b ./libjava/java/security/spec/DSAParameterSpec.java ! 3690614578b ./libjava/java/security/spec/DSAPrivateKeySpec.java ! 2054270432b ./libjava/java/security/spec/DSAPublicKeySpec.java 1352408709b ./libjava/java/security/spec/EncodedKeySpec.java ! 1905338052b ./libjava/java/security/spec/InvalidKeySpecException.java ! 1996938961b ./libjava/java/security/spec/InvalidParameterSpecException.java 3101037976b ./libjava/java/security/spec/KeySpec.java 2816023539b ./libjava/java/security/spec/PKCS8EncodedKeySpec.java 1120858009b ./libjava/java/security/spec/RSAKeyGenParameterSpec.java *************** *** 12748,13025 **** 2927717266b ./libjava/java/security/spec/RSAPrivateKeySpec.java 379229426b ./libjava/java/security/spec/RSAPublicKeySpec.java 2631607563b ./libjava/java/security/spec/X509EncodedKeySpec.java ! 2530986689b ./libjava/java/sql/Array.java ! 732307642b ./libjava/java/sql/BatchUpdateException.java ! 374178764b ./libjava/java/sql/Blob.java ! 1076961675b ./libjava/java/sql/CallableStatement.java ! 3989040128b ./libjava/java/sql/Clob.java ! 2277896489b ./libjava/java/sql/Connection.java ! 3465346954b ./libjava/java/sql/DataTruncation.java ! 3263074261b ./libjava/java/sql/DatabaseMetaData.java ! 3146941939b ./libjava/java/sql/Date.java ! 2513314582b ./libjava/java/sql/Driver.java ! 3274581597b ./libjava/java/sql/DriverManager.java ! 824112165b ./libjava/java/sql/DriverPropertyInfo.java ! 650191309b ./libjava/java/sql/PreparedStatement.java ! 3735265522b ./libjava/java/sql/Ref.java ! 1340870361b ./libjava/java/sql/ResultSet.java ! 303434648b ./libjava/java/sql/ResultSetMetaData.java ! 2203730199b ./libjava/java/sql/SQLData.java ! 2087528963b ./libjava/java/sql/SQLException.java ! 4204919565b ./libjava/java/sql/SQLInput.java ! 497830475b ./libjava/java/sql/SQLOutput.java ! 2690669161b ./libjava/java/sql/SQLWarning.java ! 2118176561b ./libjava/java/sql/Statement.java ! 1941352982b ./libjava/java/sql/Struct.java ! 1822095083b ./libjava/java/sql/Time.java ! 3582484656b ./libjava/java/sql/Timestamp.java ! 2990213411b ./libjava/java/sql/Types.java 2231202473b ./libjava/java/text/Annotation.java 459822626b ./libjava/java/text/AttributedCharacterIterator.java - 1309664747b ./libjava/java/text/AttributedString.java 1193044303b ./libjava/java/text/AttributedStringIterator.java 2390211842b ./libjava/java/text/BreakIterator.java 558207429b ./libjava/java/text/CharacterIterator.java ! 2434956617b ./libjava/java/text/ChoiceFormat.java 3293929777b ./libjava/java/text/CollationElementIterator.java 285476728b ./libjava/java/text/CollationKey.java ! 376903872b ./libjava/java/text/Collator.java 178017360b ./libjava/java/text/DateFormat.java 1553614803b ./libjava/java/text/DateFormatSymbols.java 3087605867b ./libjava/java/text/DecimalFormat.java 934140472b ./libjava/java/text/DecimalFormatSymbols.java 2519664708b ./libjava/java/text/FieldPosition.java ! 1527062930b ./libjava/java/text/Format.java ! 3209075256b ./libjava/java/text/MessageFormat.java 2380468989b ./libjava/java/text/NumberFormat.java ! 2701315364b ./libjava/java/text/ParseException.java 807650843b ./libjava/java/text/ParsePosition.java 2113083680b ./libjava/java/text/RuleBasedCollator.java 1428855839b ./libjava/java/text/SimpleDateFormat.java 253040983b ./libjava/java/text/StringCharacterIterator.java - 1224532863b ./libjava/java/text/natCollator.cc 2532876071b ./libjava/java/util/AbstractCollection.java ! 2029909984b ./libjava/java/util/AbstractList.java ! 744897810b ./libjava/java/util/AbstractMap.java 4033710468b ./libjava/java/util/AbstractSequentialList.java 2512678519b ./libjava/java/util/AbstractSet.java ! 3703107479b ./libjava/java/util/ArrayList.java ! 1381887354b ./libjava/java/util/Arrays.java ! 3524843230b ./libjava/java/util/BasicMapEntry.java ! 282804152b ./libjava/java/util/BitSet.java ! 2660147876b ./libjava/java/util/Calendar.java 1341887661b ./libjava/java/util/Collection.java ! 2871372597b ./libjava/java/util/Collections.java 3016313098b ./libjava/java/util/Comparator.java 2908271472b ./libjava/java/util/ConcurrentModificationException.java 710778165b ./libjava/java/util/Date.java ! 328149423b ./libjava/java/util/Dictionary.java 393960426b ./libjava/java/util/EmptyStackException.java 358368463b ./libjava/java/util/Enumeration.java ! 2421153851b ./libjava/java/util/EventListener.java ! 3090423014b ./libjava/java/util/EventObject.java 3092311908b ./libjava/java/util/GregorianCalendar.java ! 1559136349b ./libjava/java/util/HashMap.java 3919942898b ./libjava/java/util/HashSet.java ! 804852857b ./libjava/java/util/Hashtable.java ! 4293305226b ./libjava/java/util/IdentityHashMap.java 4026479457b ./libjava/java/util/Iterator.java ! 832329135b ./libjava/java/util/LinkedHashMap.java 1624117899b ./libjava/java/util/LinkedHashSet.java ! 627526944b ./libjava/java/util/LinkedList.java ! 3068429576b ./libjava/java/util/List.java 751985718b ./libjava/java/util/ListIterator.java ! 2456450061b ./libjava/java/util/ListResourceBundle.java ! 667725203b ./libjava/java/util/Locale.java ! 484359853b ./libjava/java/util/Map.java ! 2250155039b ./libjava/java/util/MissingResourceException.java 1572696779b ./libjava/java/util/NoSuchElementException.java ! 1271533381b ./libjava/java/util/Observable.java ! 4174427959b ./libjava/java/util/Observer.java ! 2595158547b ./libjava/java/util/Properties.java ! 2604596284b ./libjava/java/util/PropertyPermission.java ! 1495521984b ./libjava/java/util/PropertyResourceBundle.java ! 1741060266b ./libjava/java/util/Random.java 2707837116b ./libjava/java/util/RandomAccess.java ! 604399175b ./libjava/java/util/ResourceBundle.java 2326466944b ./libjava/java/util/Set.java ! 2701923146b ./libjava/java/util/SimpleTimeZone.java 1991994937b ./libjava/java/util/SortedMap.java 2357787438b ./libjava/java/util/SortedSet.java 1274465736b ./libjava/java/util/Stack.java ! 3200298650b ./libjava/java/util/StringTokenizer.java ! 2511347434b ./libjava/java/util/TimeZone.java 3482719698b ./libjava/java/util/Timer.java ! 2154207616b ./libjava/java/util/TimerTask.java ! 4294130868b ./libjava/java/util/TooManyListenersException.java ! 3728869390b ./libjava/java/util/TreeMap.java 3277604160b ./libjava/java/util/TreeSet.java 3512853982b ./libjava/java/util/Vector.java ! 1610986963b ./libjava/java/util/WeakHashMap.java ! 3778884769b ./libjava/java/util/jar/Attributes.java ! 3242774103b ./libjava/java/util/jar/JarEntry.java ! 1439364136b ./libjava/java/util/jar/JarException.java ! 3579491279b ./libjava/java/util/jar/JarFile.java ! 3108700190b ./libjava/java/util/jar/JarInputStream.java ! 3060414122b ./libjava/java/util/jar/JarOutputStream.java ! 1259280694b ./libjava/java/util/jar/Manifest.java 2655847765b ./libjava/java/util/zip/Adler32.java - 2436561403b ./libjava/java/util/zip/CRC32.java 4095201247b ./libjava/java/util/zip/CheckedInputStream.java 1148292706b ./libjava/java/util/zip/CheckedOutputStream.java 2267421579b ./libjava/java/util/zip/Checksum.java ! 3657795573b ./libjava/java/util/zip/DataFormatException.java 199330457b ./libjava/java/util/zip/Deflater.java 3336807235b ./libjava/java/util/zip/DeflaterOutputStream.java ! 4059428363b ./libjava/java/util/zip/GZIPInputStream.java 371303032b ./libjava/java/util/zip/GZIPOutputStream.java 2396996601b ./libjava/java/util/zip/Inflater.java ! 3396470608b ./libjava/java/util/zip/InflaterInputStream.java ! 1145913690b ./libjava/java/util/zip/ZipConstants.java ! 65566596b ./libjava/java/util/zip/ZipEntry.java ! 96030578b ./libjava/java/util/zip/ZipException.java ! 2814843272b ./libjava/java/util/zip/ZipFile.java ! 2069419618b ./libjava/java/util/zip/ZipInputStream.java ! 3710262911b ./libjava/java/util/zip/ZipOutputStream.java ! 1224162092b ./libjava/java/util/zip/natDeflater.cc ! 3063634192b ./libjava/java/util/zip/natInflater.cc ! 145274057b ./libjava/javax/naming/AuthenticationException.java ! 1613568553b ./libjava/javax/naming/AuthenticationNotSupportedException.java ! 3018524827b ./libjava/javax/naming/BinaryRefAddr.java ! 2950522979b ./libjava/javax/naming/Binding.java ! 495208868b ./libjava/javax/naming/CannotProceedException.java ! 1696161213b ./libjava/javax/naming/CommunicationException.java ! 1020365512b ./libjava/javax/naming/CompositeName.java ! 3091243262b ./libjava/javax/naming/CompoundName.java ! 2106105768b ./libjava/javax/naming/ConfigurationException.java ! 2355024605b ./libjava/javax/naming/Context.java ! 3253591271b ./libjava/javax/naming/ContextNotEmptyException.java ! 1739543939b ./libjava/javax/naming/InitialContext.java ! 38212245b ./libjava/javax/naming/InsufficientResourcesException.java ! 2296688963b ./libjava/javax/naming/InterruptedNamingException.java 4165253207b ./libjava/javax/naming/InvalidNameException.java ! 3467011523b ./libjava/javax/naming/LimitExceededException.java ! 2945536555b ./libjava/javax/naming/LinkException.java ! 3280765719b ./libjava/javax/naming/LinkLoopException.java ! 4232859152b ./libjava/javax/naming/LinkRef.java ! 1528609025b ./libjava/javax/naming/MalformedLinkException.java ! 2645610340b ./libjava/javax/naming/Name.java ! 2798268023b ./libjava/javax/naming/NameAlreadyBoundException.java ! 4202297725b ./libjava/javax/naming/NameClassPair.java ! 230282723b ./libjava/javax/naming/NameNotFoundException.java ! 2454523681b ./libjava/javax/naming/NameParser.java ! 3641625296b ./libjava/javax/naming/NamingEnumeration.java ! 949888078b ./libjava/javax/naming/NamingException.java ! 1081898018b ./libjava/javax/naming/NamingSecurityException.java ! 3355150544b ./libjava/javax/naming/NoInitialContextException.java ! 3148663544b ./libjava/javax/naming/NoPermissionException.java ! 1051745286b ./libjava/javax/naming/NotContextException.java ! 1197235786b ./libjava/javax/naming/OperationNotSupportedException.java ! 2758830928b ./libjava/javax/naming/PartialResultException.java ! 3291792639b ./libjava/javax/naming/RefAddr.java ! 3197721219b ./libjava/javax/naming/Reference.java ! 1496952630b ./libjava/javax/naming/Referenceable.java ! 2706204834b ./libjava/javax/naming/ReferralException.java ! 740355282b ./libjava/javax/naming/ServiceUnavailableException.java ! 2175690233b ./libjava/javax/naming/SizeLimitExceededException.java 255272768b ./libjava/javax/naming/StringRefAddr.java ! 668991294b ./libjava/javax/naming/TimeLimitExceededException.java ! 3287107224b ./libjava/javax/naming/directory/Attribute.java ! 1403862831b ./libjava/javax/naming/directory/AttributeInUseException.java ! 1937491808b ./libjava/javax/naming/directory/AttributeModificationException.java ! 2124855085b ./libjava/javax/naming/directory/Attributes.java ! 4218631907b ./libjava/javax/naming/directory/BasicAttribute.java ! 1340187773b ./libjava/javax/naming/directory/BasicAttributes.java ! 525649657b ./libjava/javax/naming/directory/DirContext.java ! 3780905669b ./libjava/javax/naming/directory/InitialDirContext.java ! 1070098408b ./libjava/javax/naming/directory/InvalidAttributeIdentifierException.java ! 2448051700b ./libjava/javax/naming/directory/InvalidAttributeValueException.java ! 2130227696b ./libjava/javax/naming/directory/InvalidAttributesException.java ! 3317095745b ./libjava/javax/naming/directory/InvalidSearchControlsException.java ! 2677951745b ./libjava/javax/naming/directory/InvalidSearchFilterException.java ! 297375529b ./libjava/javax/naming/directory/ModificationItem.java ! 1218016472b ./libjava/javax/naming/directory/NoSuchAttributeException.java ! 3800798223b ./libjava/javax/naming/directory/SchemaViolationException.java ! 2280737329b ./libjava/javax/naming/directory/SearchControls.java ! 2833305555b ./libjava/javax/naming/directory/SearchResult.java ! 632548719b ./libjava/javax/naming/event/EventContext.java ! 1104789568b ./libjava/javax/naming/event/EventDirContext.java ! 1079821505b ./libjava/javax/naming/event/NamespaceChangeListener.java ! 1238809356b ./libjava/javax/naming/event/NamingEvent.java ! 3831078506b ./libjava/javax/naming/event/NamingExceptionEvent.java ! 1293039497b ./libjava/javax/naming/event/NamingListener.java ! 1847110909b ./libjava/javax/naming/event/ObjectChangeListener.java ! 1181684484b ./libjava/javax/naming/ldap/Control.java ! 4178007180b ./libjava/javax/naming/ldap/ControlFactory.java ! 1350269098b ./libjava/javax/naming/ldap/ExtendedRequest.java ! 738885701b ./libjava/javax/naming/ldap/ExtendedResponse.java ! 4143032207b ./libjava/javax/naming/ldap/HasControls.java ! 992304517b ./libjava/javax/naming/ldap/InitialLdapContext.java ! 1094699680b ./libjava/javax/naming/ldap/LdapContext.java ! 3377633528b ./libjava/javax/naming/ldap/LdapReferralException.java ! 391691341b ./libjava/javax/naming/ldap/UnsolicitedNotification.java ! 2717074673b ./libjava/javax/naming/ldap/UnsolicitedNotificationEvent.java ! 4115295275b ./libjava/javax/naming/ldap/UnsolicitedNotificationListener.java ! 1671315693b ./libjava/javax/naming/spi/DirObjectFactory.java ! 2654197748b ./libjava/javax/naming/spi/DirStateFactory.java ! 940282333b ./libjava/javax/naming/spi/DirectoryManager.java ! 1751323528b ./libjava/javax/naming/spi/InitialContextFactory.java ! 2067382225b ./libjava/javax/naming/spi/InitialContextFactoryBuilder.java ! 4282133359b ./libjava/javax/naming/spi/NamingManager.java ! 162979435b ./libjava/javax/naming/spi/ObjectFactory.java ! 2834439335b ./libjava/javax/naming/spi/ObjectFactoryBuilder.java ! 3604649919b ./libjava/javax/naming/spi/ResolveResult.java ! 324774529b ./libjava/javax/naming/spi/Resolver.java ! 2596286413b ./libjava/javax/naming/spi/StateFactory.java ! 1100799981b ./libjava/javax/transaction/HeuristicCommitException.java ! 3468030488b ./libjava/javax/transaction/HeuristicMixedException.java ! 3612916446b ./libjava/javax/transaction/HeuristicRollbackException.java ! 3063033259b ./libjava/javax/transaction/InvalidTransactionException.java ! 3066010541b ./libjava/javax/transaction/NotSupportedException.java ! 2654654450b ./libjava/javax/transaction/RollbackException.java ! 1778487585b ./libjava/javax/transaction/Status.java ! 314435753b ./libjava/javax/transaction/Synchronization.java ! 2247680091b ./libjava/javax/transaction/SystemException.java ! 3332683111b ./libjava/javax/transaction/Transaction.java ! 1322333630b ./libjava/javax/transaction/TransactionManager.java ! 1540883701b ./libjava/javax/transaction/TransactionRequiredException.java ! 149347685b ./libjava/javax/transaction/TransactionRolledbackException.java ! 1599652796b ./libjava/javax/transaction/UserTransaction.java ! 91616559b ./libjava/javax/transaction/xa/XAException.java ! 151022467b ./libjava/javax/transaction/xa/XAResource.java ! 2545015127b ./libjava/javax/transaction/xa/Xid.java ! 2987342447b ./libjava/jni.cc 3263845190b ./libjava/libgcj-test.spec.in - 799924566b ./libjava/libgcj.spec.in - 3885054737b ./libjava/libltdl/.cvsignore - 1530919786b ./libjava/libltdl/COPYING.LIB - 3841120685b ./libjava/libltdl/ChangeLog - 3589765398b ./libjava/libltdl/Makefile.am - 2495909158b ./libjava/libltdl/Makefile.in - 1322928877b ./libjava/libltdl/README 464053222b ./libjava/libltdl/acconfig.h 1486261890b ./libjava/libltdl/acinclude.m4 2748542911b ./libjava/libltdl/aclocal.m4 3229611250b ./libjava/libltdl/config.h.in 3663840013b ./libjava/libltdl/configure 586017012b ./libjava/libltdl/configure.in 1708336280b ./libjava/libltdl/ltdl.c 3122579166b ./libjava/libltdl/ltdl.h 216805921b ./libjava/libltdl/stamp-h.in ! 4225681790b ./libjava/libtool-version ! 1775785992b ./libjava/mauve-libgcj ! 3598737829b ./libjava/name-finder.cc ! 529282886b ./libjava/no-threads.cc 3395710497b ./libjava/nogc.cc 2042069291b ./libjava/org/w3c/dom/Attr.java 722169044b ./libjava/org/w3c/dom/CDATASection.java 2065721992b ./libjava/org/w3c/dom/CharacterData.java 2143127567b ./libjava/org/w3c/dom/Comment.java - 488476586b ./libjava/org/w3c/dom/DOMException.java - 4211570251b ./libjava/org/w3c/dom/DOMImplementation.java - 1900680333b ./libjava/org/w3c/dom/Document.java 862763522b ./libjava/org/w3c/dom/DocumentFragment.java 2426412549b ./libjava/org/w3c/dom/DocumentType.java 4250415570b ./libjava/org/w3c/dom/Element.java 4046624265b ./libjava/org/w3c/dom/Entity.java 2262342958b ./libjava/org/w3c/dom/EntityReference.java --- 13552,14169 ---- 2927717266b ./libjava/java/security/spec/RSAPrivateKeySpec.java 379229426b ./libjava/java/security/spec/RSAPublicKeySpec.java 2631607563b ./libjava/java/security/spec/X509EncodedKeySpec.java ! 2617159890b ./libjava/java/security/UnrecoverableKeyException.java ! 2643960988b ./libjava/java/security/UnresolvedPermission.java ! 2075396606b ./libjava/java/sql/Array.java ! 4157405111b ./libjava/java/sql/BatchUpdateException.java ! 2586989813b ./libjava/java/sql/Blob.java ! 1692384713b ./libjava/java/sql/CallableStatement.java ! 2298223471b ./libjava/java/sql/Clob.java ! 3941715616b ./libjava/java/sql/Connection.java ! 4102002106b ./libjava/java/sql/DatabaseMetaData.java ! 336101031b ./libjava/java/sql/DataTruncation.java ! 799054576b ./libjava/java/sql/Date.java ! 3311253236b ./libjava/java/sql/Driver.java ! 337493618b ./libjava/java/sql/DriverManager.java ! 1740849920b ./libjava/java/sql/DriverPropertyInfo.java ! 3212909068b ./libjava/java/sql/ParameterMetaData.java ! 4234150163b ./libjava/java/sql/PreparedStatement.java ! 3020811324b ./libjava/java/sql/Ref.java ! 3316779926b ./libjava/java/sql/ResultSet.java ! 2507059794b ./libjava/java/sql/ResultSetMetaData.java ! 761750991b ./libjava/java/sql/Savepoint.java ! 2956635204b ./libjava/java/sql/SQLData.java ! 3891244003b ./libjava/java/sql/SQLException.java ! 4001819294b ./libjava/java/sql/SQLInput.java ! 2816930046b ./libjava/java/sql/SQLOutput.java ! 922288344b ./libjava/java/sql/SQLPermission.java ! 2408507038b ./libjava/java/sql/SQLWarning.java ! 2872208133b ./libjava/java/sql/Statement.java ! 2296283265b ./libjava/java/sql/Struct.java ! 1919034406b ./libjava/java/sql/Time.java ! 2837359076b ./libjava/java/sql/Timestamp.java ! 3153435951b ./libjava/java/sql/Types.java 2231202473b ./libjava/java/text/Annotation.java 459822626b ./libjava/java/text/AttributedCharacterIterator.java 1193044303b ./libjava/java/text/AttributedStringIterator.java + 1309664747b ./libjava/java/text/AttributedString.java 2390211842b ./libjava/java/text/BreakIterator.java 558207429b ./libjava/java/text/CharacterIterator.java ! 2514336238b ./libjava/java/text/ChoiceFormat.java 3293929777b ./libjava/java/text/CollationElementIterator.java 285476728b ./libjava/java/text/CollationKey.java ! 2386622069b ./libjava/java/text/Collator.java 178017360b ./libjava/java/text/DateFormat.java 1553614803b ./libjava/java/text/DateFormatSymbols.java 3087605867b ./libjava/java/text/DecimalFormat.java 934140472b ./libjava/java/text/DecimalFormatSymbols.java 2519664708b ./libjava/java/text/FieldPosition.java ! 489030362b ./libjava/java/text/Format.java ! 41364597b ./libjava/java/text/MessageFormat.java ! 1224532863b ./libjava/java/text/natCollator.cc 2380468989b ./libjava/java/text/NumberFormat.java ! 2098004750b ./libjava/java/text/ParseException.java 807650843b ./libjava/java/text/ParsePosition.java 2113083680b ./libjava/java/text/RuleBasedCollator.java 1428855839b ./libjava/java/text/SimpleDateFormat.java 253040983b ./libjava/java/text/StringCharacterIterator.java 2532876071b ./libjava/java/util/AbstractCollection.java ! 3779992323b ./libjava/java/util/AbstractList.java ! 296089431b ./libjava/java/util/AbstractMap.java 4033710468b ./libjava/java/util/AbstractSequentialList.java 2512678519b ./libjava/java/util/AbstractSet.java ! 1767707531b ./libjava/java/util/ArrayList.java ! 1124382953b ./libjava/java/util/Arrays.java ! 3169763842b ./libjava/java/util/BitSet.java ! 103272295b ./libjava/java/util/Calendar.java 1341887661b ./libjava/java/util/Collection.java ! 3883385053b ./libjava/java/util/Collections.java 3016313098b ./libjava/java/util/Comparator.java 2908271472b ./libjava/java/util/ConcurrentModificationException.java 710778165b ./libjava/java/util/Date.java ! 2698254829b ./libjava/java/util/Dictionary.java 393960426b ./libjava/java/util/EmptyStackException.java 358368463b ./libjava/java/util/Enumeration.java ! 367754523b ./libjava/java/util/EventListener.java ! 2571504724b ./libjava/java/util/EventListenerProxy.java ! 864477044b ./libjava/java/util/EventObject.java 3092311908b ./libjava/java/util/GregorianCalendar.java ! 938662091b ./libjava/java/util/HashMap.java 3919942898b ./libjava/java/util/HashSet.java ! 2697630490b ./libjava/java/util/Hashtable.java ! 3461596666b ./libjava/java/util/IdentityHashMap.java 4026479457b ./libjava/java/util/Iterator.java ! 3386565408b ./libjava/java/util/jar/Attributes.java ! 3242774103b ./libjava/java/util/jar/JarEntry.java ! 765503455b ./libjava/java/util/jar/JarException.java ! 2270300450b ./libjava/java/util/jar/JarFile.java ! 3108700190b ./libjava/java/util/jar/JarInputStream.java ! 3060414122b ./libjava/java/util/jar/JarOutputStream.java ! 870445261b ./libjava/java/util/jar/Manifest.java ! 875979038b ./libjava/java/util/LinkedHashMap.java 1624117899b ./libjava/java/util/LinkedHashSet.java ! 2208127961b ./libjava/java/util/LinkedList.java 751985718b ./libjava/java/util/ListIterator.java ! 427533929b ./libjava/java/util/List.java ! 263544433b ./libjava/java/util/ListResourceBundle.java ! 2598541840b ./libjava/java/util/Locale.java ! 4001674772b ./libjava/java/util/Map.java ! 365564519b ./libjava/java/util/MissingResourceException.java ! 974643411b ./libjava/java/util/natResourceBundle.cc ! 1412254651b ./libjava/java/util/natTimeZone.cc 1572696779b ./libjava/java/util/NoSuchElementException.java ! 925267169b ./libjava/java/util/Observable.java ! 3089043170b ./libjava/java/util/Observer.java ! 3155794945b ./libjava/java/util/Properties.java ! 1820991145b ./libjava/java/util/PropertyPermissionCollection.java ! 2526711315b ./libjava/java/util/PropertyPermission.java ! 1277794645b ./libjava/java/util/PropertyResourceBundle.java 2707837116b ./libjava/java/util/RandomAccess.java ! 1617602218b ./libjava/java/util/Random.java ! 1655052431b ./libjava/java/util/regex/Matcher.java ! 2577874110b ./libjava/java/util/regex/Pattern.java ! 1273083159b ./libjava/java/util/regex/PatternSyntaxException.java ! 3772649199b ./libjava/java/util/ResourceBundle.java 2326466944b ./libjava/java/util/Set.java ! 2204545834b ./libjava/java/util/SimpleTimeZone.java 1991994937b ./libjava/java/util/SortedMap.java 2357787438b ./libjava/java/util/SortedSet.java 1274465736b ./libjava/java/util/Stack.java ! 3650971754b ./libjava/java/util/StringTokenizer.java 3482719698b ./libjava/java/util/Timer.java ! 3304049024b ./libjava/java/util/TimerTask.java ! 2454222183b ./libjava/java/util/TimeZone.java ! 2374142028b ./libjava/java/util/TooManyListenersException.java ! 1629472097b ./libjava/java/util/TreeMap.java 3277604160b ./libjava/java/util/TreeSet.java 3512853982b ./libjava/java/util/Vector.java ! 2860839520b ./libjava/java/util/WeakHashMap.java 2655847765b ./libjava/java/util/zip/Adler32.java 4095201247b ./libjava/java/util/zip/CheckedInputStream.java 1148292706b ./libjava/java/util/zip/CheckedOutputStream.java 2267421579b ./libjava/java/util/zip/Checksum.java ! 2436561403b ./libjava/java/util/zip/CRC32.java ! 3170102970b ./libjava/java/util/zip/DataFormatException.java 199330457b ./libjava/java/util/zip/Deflater.java 3336807235b ./libjava/java/util/zip/DeflaterOutputStream.java ! 4173550682b ./libjava/java/util/zip/GZIPInputStream.java 371303032b ./libjava/java/util/zip/GZIPOutputStream.java + 436970631b ./libjava/java/util/zip/InflaterInputStream.java 2396996601b ./libjava/java/util/zip/Inflater.java ! 1592453423b ./libjava/java/util/zip/natDeflater.cc ! 3706907962b ./libjava/java/util/zip/natInflater.cc ! 1799848574b ./libjava/java/util/zip/ZipConstants.java ! 1805763671b ./libjava/java/util/zip/ZipEntry.java ! 711961929b ./libjava/java/util/zip/ZipException.java ! 848210062b ./libjava/java/util/zip/ZipFile.java ! 3362483155b ./libjava/java/util/zip/ZipInputStream.java ! 1243431937b ./libjava/java/util/zip/ZipOutputStream.java ! 765026405b ./libjava/javax/accessibility/AccessibleAction.java ! 2410157757b ./libjava/javax/accessibility/AccessibleBundle.java ! 476875933b ./libjava/javax/accessibility/AccessibleComponent.java ! 31854063b ./libjava/javax/accessibility/AccessibleContext.java ! 2201149308b ./libjava/javax/accessibility/AccessibleEditableText.java ! 1775534588b ./libjava/javax/accessibility/AccessibleExtendedComponent.java ! 14806974b ./libjava/javax/accessibility/AccessibleExtendedTable.java ! 488565b ./libjava/javax/accessibility/AccessibleHyperlink.java ! 768530314b ./libjava/javax/accessibility/AccessibleHypertext.java ! 576087898b ./libjava/javax/accessibility/AccessibleIcon.java ! 3260478420b ./libjava/javax/accessibility/Accessible.java ! 3757185563b ./libjava/javax/accessibility/AccessibleKeyBinding.java ! 1604114229b ./libjava/javax/accessibility/AccessibleRelation.java ! 2885888465b ./libjava/javax/accessibility/AccessibleRelationSet.java ! 1461383153b ./libjava/javax/accessibility/AccessibleResourceBundle.java ! 4053046493b ./libjava/javax/accessibility/AccessibleRole.java ! 2814383134b ./libjava/javax/accessibility/AccessibleSelection.java ! 3109922057b ./libjava/javax/accessibility/AccessibleState.java ! 900565856b ./libjava/javax/accessibility/AccessibleStateSet.java ! 2871597664b ./libjava/javax/accessibility/AccessibleTable.java ! 1094699769b ./libjava/javax/accessibility/AccessibleTableModelChange.java ! 3692965296b ./libjava/javax/accessibility/AccessibleText.java ! 1848461777b ./libjava/javax/accessibility/AccessibleValue.java ! 2072072160b ./libjava/javax/naming/AuthenticationException.java ! 4197549670b ./libjava/javax/naming/AuthenticationNotSupportedException.java ! 3712351941b ./libjava/javax/naming/BinaryRefAddr.java ! 28263794b ./libjava/javax/naming/Binding.java ! 4082228951b ./libjava/javax/naming/CannotProceedException.java ! 608763168b ./libjava/javax/naming/CommunicationException.java ! 807104830b ./libjava/javax/naming/CompositeName.java ! 2187376310b ./libjava/javax/naming/CompoundName.java ! 924578413b ./libjava/javax/naming/ConfigurationException.java ! 4230315303b ./libjava/javax/naming/Context.java ! 3512961574b ./libjava/javax/naming/ContextNotEmptyException.java ! 2653155353b ./libjava/javax/naming/directory/AttributeInUseException.java ! 2453832758b ./libjava/javax/naming/directory/Attribute.java ! 123657565b ./libjava/javax/naming/directory/AttributeModificationException.java ! 1050669936b ./libjava/javax/naming/directory/Attributes.java ! 2068899045b ./libjava/javax/naming/directory/BasicAttribute.java ! 1646443301b ./libjava/javax/naming/directory/BasicAttributes.java ! 125937778b ./libjava/javax/naming/directory/DirContext.java ! 509989331b ./libjava/javax/naming/directory/InitialDirContext.java ! 2025773161b ./libjava/javax/naming/directory/InvalidAttributeIdentifierException.java ! 1459642370b ./libjava/javax/naming/directory/InvalidAttributesException.java ! 441409977b ./libjava/javax/naming/directory/InvalidAttributeValueException.java ! 3061973789b ./libjava/javax/naming/directory/InvalidSearchControlsException.java ! 4065931623b ./libjava/javax/naming/directory/InvalidSearchFilterException.java ! 3033329141b ./libjava/javax/naming/directory/ModificationItem.java ! 2670910572b ./libjava/javax/naming/directory/NoSuchAttributeException.java ! 4069157966b ./libjava/javax/naming/directory/SchemaViolationException.java ! 3963975738b ./libjava/javax/naming/directory/SearchControls.java ! 2317157956b ./libjava/javax/naming/directory/SearchResult.java ! 1318179838b ./libjava/javax/naming/event/EventContext.java ! 203044389b ./libjava/javax/naming/event/EventDirContext.java ! 2261427818b ./libjava/javax/naming/event/NamespaceChangeListener.java ! 3872439113b ./libjava/javax/naming/event/NamingEvent.java ! 3608644761b ./libjava/javax/naming/event/NamingExceptionEvent.java ! 528046180b ./libjava/javax/naming/event/NamingListener.java ! 290931993b ./libjava/javax/naming/event/ObjectChangeListener.java ! 1973128135b ./libjava/javax/naming/InitialContext.java ! 361736140b ./libjava/javax/naming/InsufficientResourcesException.java ! 1016595152b ./libjava/javax/naming/InterruptedNamingException.java 4165253207b ./libjava/javax/naming/InvalidNameException.java ! 774117726b ./libjava/javax/naming/ldap/ControlFactory.java ! 455520386b ./libjava/javax/naming/ldap/Control.java ! 3343298056b ./libjava/javax/naming/ldap/ExtendedRequest.java ! 3141761690b ./libjava/javax/naming/ldap/ExtendedResponse.java ! 2604682024b ./libjava/javax/naming/ldap/HasControls.java ! 3808021639b ./libjava/javax/naming/ldap/InitialLdapContext.java ! 1851822730b ./libjava/javax/naming/ldap/LdapContext.java ! 311247848b ./libjava/javax/naming/ldap/LdapReferralException.java ! 1167693247b ./libjava/javax/naming/ldap/UnsolicitedNotificationEvent.java ! 1522403085b ./libjava/javax/naming/ldap/UnsolicitedNotification.java ! 3381766536b ./libjava/javax/naming/ldap/UnsolicitedNotificationListener.java ! 2434068408b ./libjava/javax/naming/LimitExceededException.java ! 2330199926b ./libjava/javax/naming/LinkException.java ! 22978149b ./libjava/javax/naming/LinkLoopException.java ! 3487766619b ./libjava/javax/naming/LinkRef.java ! 3430693620b ./libjava/javax/naming/MalformedLinkException.java ! 1556763091b ./libjava/javax/naming/NameAlreadyBoundException.java ! 572156631b ./libjava/javax/naming/NameClassPair.java ! 1975364309b ./libjava/javax/naming/Name.java ! 2174471505b ./libjava/javax/naming/NameNotFoundException.java ! 1201633991b ./libjava/javax/naming/NameParser.java ! 3098518773b ./libjava/javax/naming/NamingEnumeration.java ! 2282904476b ./libjava/javax/naming/NamingException.java ! 729175013b ./libjava/javax/naming/NamingSecurityException.java ! 777408494b ./libjava/javax/naming/NoInitialContextException.java ! 3635890215b ./libjava/javax/naming/NoPermissionException.java ! 2088749355b ./libjava/javax/naming/NotContextException.java ! 2687124965b ./libjava/javax/naming/OperationNotSupportedException.java ! 1125863632b ./libjava/javax/naming/PartialResultException.java ! 3668063304b ./libjava/javax/naming/RefAddr.java ! 1025138289b ./libjava/javax/naming/Referenceable.java ! 4142766100b ./libjava/javax/naming/Reference.java ! 797780091b ./libjava/javax/naming/ReferralException.java ! 3704681067b ./libjava/javax/naming/ServiceUnavailableException.java ! 604735613b ./libjava/javax/naming/SizeLimitExceededException.java ! 999308001b ./libjava/javax/naming/spi/DirectoryManager.java ! 2081706856b ./libjava/javax/naming/spi/DirObjectFactory.java ! 1400574417b ./libjava/javax/naming/spi/DirStateFactory.java ! 3735459034b ./libjava/javax/naming/spi/InitialContextFactoryBuilder.java ! 3811257042b ./libjava/javax/naming/spi/InitialContextFactory.java ! 2813260563b ./libjava/javax/naming/spi/NamingManager.java ! 148845931b ./libjava/javax/naming/spi/ObjectFactoryBuilder.java ! 2981932521b ./libjava/javax/naming/spi/ObjectFactory.java ! 1013699198b ./libjava/javax/naming/spi/ResolveResult.java ! 77448015b ./libjava/javax/naming/spi/Resolver.java ! 1114754724b ./libjava/javax/naming/spi/StateFactory.java 255272768b ./libjava/javax/naming/StringRefAddr.java ! 1396767478b ./libjava/javax/naming/TimeLimitExceededException.java ! 1598924264b ./libjava/javax/sql/ConnectionEvent.java ! 324509581b ./libjava/javax/sql/ConnectionEventListener.java ! 3183943466b ./libjava/javax/sql/ConnectionPoolDataSource.java ! 1903361066b ./libjava/javax/sql/DataSource.java ! 312702808b ./libjava/javax/sql/PooledConnection.java ! 3740486686b ./libjava/javax/sql/RowSetEvent.java ! 233288925b ./libjava/javax/sql/RowSetInternal.java ! 142780728b ./libjava/javax/sql/RowSet.java ! 3398926084b ./libjava/javax/sql/RowSetListener.java ! 148314645b ./libjava/javax/sql/RowSetMetaData.java ! 3733308273b ./libjava/javax/sql/RowSetReader.java ! 3470019794b ./libjava/javax/sql/RowSetWriter.java ! 900593073b ./libjava/javax/sql/XAConnection.java ! 2978004682b ./libjava/javax/sql/XADataSource.java ! 1010178173b ./libjava/javax/swing/AbstractAction.java ! 3516689561b ./libjava/javax/swing/AbstractButton.java ! 2858843205b ./libjava/javax/swing/AbstractCellEditor.java ! 303183107b ./libjava/javax/swing/AbstractListModel.java ! 2887051295b ./libjava/javax/swing/AbstractSet.java ! 221499530b ./libjava/javax/swing/Action.java ! 3236289112b ./libjava/javax/swing/ActionMap.java ! 1130131950b ./libjava/javax/swing/border/AbstractBorder.java ! 3216239309b ./libjava/javax/swing/border/BevelBorder.java ! 4254773811b ./libjava/javax/swing/border/Border.java ! 3643497984b ./libjava/javax/swing/border/CompoundBorder.java ! 3769723158b ./libjava/javax/swing/border/EmptyBorder.java ! 3557339618b ./libjava/javax/swing/border/EtchedBorder.java ! 202788741b ./libjava/javax/swing/BorderFactory.java ! 1880010849b ./libjava/javax/swing/border/LineBorder.java ! 456207290b ./libjava/javax/swing/border/MatteBorder.java ! 1708340786b ./libjava/javax/swing/border/TitledBorder.java ! 288440758b ./libjava/javax/swing/BoundedRangeModel.java ! 2184534331b ./libjava/javax/swing/Box.java ! 1616609332b ./libjava/javax/swing/BoxLayout.java ! 1271390568b ./libjava/javax/swing/ButtonGroup.java ! 966775533b ./libjava/javax/swing/ButtonModel.java ! 3937420799b ./libjava/javax/swing/CellEditor.java ! 34904380b ./libjava/javax/swing/CellRendererPane.java ! 2685544675b ./libjava/javax/swing/colorchooser/AbstractColorChooserPanel.java ! 3107430868b ./libjava/javax/swing/colorchooser/ColorChooserComponentFactory.java ! 3410433532b ./libjava/javax/swing/colorchooser/ColorSelectionModel.java ! 4078086360b ./libjava/javax/swing/colorchooser/DefaultColorSelectionModel.java ! 1898273114b ./libjava/javax/swing/ComboBoxEditor.java ! 1783711525b ./libjava/javax/swing/ComboBoxModel.java ! 3369516448b ./libjava/javax/swing/ComponentInputMap.java ! 4089292043b ./libjava/javax/swing/DebugGraphics.java ! 2571124337b ./libjava/javax/swing/DefaultBoundedRangeModel.java ! 1400696570b ./libjava/javax/swing/DefaultButtonModel.java ! 3385469838b ./libjava/javax/swing/DefaultCellEditor.java ! 3044441464b ./libjava/javax/swing/DefaultCellRenderer.java ! 892194504b ./libjava/javax/swing/DefaultComboBoxModel.java ! 1581239455b ./libjava/javax/swing/DefaultDesktopManager.java ! 2049473114b ./libjava/javax/swing/DefaultFocusManager.java ! 1223065606b ./libjava/javax/swing/DefaultListCellRenderer.java ! 2698106998b ./libjava/javax/swing/DefaultListModel.java ! 4237859972b ./libjava/javax/swing/DefaultListSelectionModel.java ! 3364206517b ./libjava/javax/swing/DefaultSingleSelectionModel.java ! 3834225171b ./libjava/javax/swing/DesktopManager.java ! 1706792490b ./libjava/javax/swing/event/AncestorEvent.java ! 3700501714b ./libjava/javax/swing/event/AncestorListener.java ! 1382227892b ./libjava/javax/swing/event/CaretEvent.java ! 3521875215b ./libjava/javax/swing/event/CaretListener.java ! 2883157052b ./libjava/javax/swing/event/CellEditorListener.java ! 2005893020b ./libjava/javax/swing/event/ChangeEvent.java ! 3070027624b ./libjava/javax/swing/event/ChangeListener.java ! 1911256007b ./libjava/javax/swing/event/DocumentEvent.java ! 2383866233b ./libjava/javax/swing/event/DocumentListener.java ! 1715105336b ./libjava/javax/swing/event/EventListenerList.java ! 2045946240b ./libjava/javax/swing/event/HyperlinkEvent.java ! 1382262574b ./libjava/javax/swing/event/HyperlinkListener.java ! 843290135b ./libjava/javax/swing/event/InternalFrameAdapter.java ! 1258500710b ./libjava/javax/swing/event/InternalFrameEvent.java ! 2186391772b ./libjava/javax/swing/event/InternalFrameListener.java ! 1592008443b ./libjava/javax/swing/event/ListDataEvent.java ! 1076641865b ./libjava/javax/swing/event/ListDataListener.java ! 1578453180b ./libjava/javax/swing/event/ListSelectionEvent.java ! 3559173088b ./libjava/javax/swing/event/ListSelectionListener.java ! 2479877087b ./libjava/javax/swing/event/MenuDragMouseEvent.java ! 2685355060b ./libjava/javax/swing/event/MenuDragMouseListener.java ! 3023535867b ./libjava/javax/swing/event/MenuEvent.java ! 3971214880b ./libjava/javax/swing/event/MenuKeyEvent.java ! 2785444747b ./libjava/javax/swing/event/MenuKeyListener.java ! 3808074600b ./libjava/javax/swing/event/MenuListener.java ! 3794707282b ./libjava/javax/swing/event/MouseInputAdapter.java ! 2998166022b ./libjava/javax/swing/event/MouseInputListener.java ! 725513679b ./libjava/javax/swing/event/PopupMenuEvent.java ! 547770825b ./libjava/javax/swing/event/PopupMenuListener.java ! 1479228607b ./libjava/javax/swing/event/SwingPropertyChangeSupport.java ! 4198863774b ./libjava/javax/swing/event/TableColumnModelEvent.java ! 1031262491b ./libjava/javax/swing/event/TableColumnModelListener.java ! 4220558008b ./libjava/javax/swing/event/TableModelEvent.java ! 1223981694b ./libjava/javax/swing/event/TableModelListener.java ! 9766319b ./libjava/javax/swing/event/TreeExpansionEvent.java ! 3109536888b ./libjava/javax/swing/event/TreeExpansionListener.java ! 411921968b ./libjava/javax/swing/event/TreeModelEvent.java ! 486265876b ./libjava/javax/swing/event/TreeModelListener.java ! 3509118559b ./libjava/javax/swing/event/TreeSelectionEvent.java ! 1295028794b ./libjava/javax/swing/event/TreeSelectionListener.java ! 1977542521b ./libjava/javax/swing/event/TreeWillExpandListener.java ! 168714960b ./libjava/javax/swing/event/UndoableEditEvent.java ! 2667618060b ./libjava/javax/swing/event/UndoableEditListener.java ! 1988278504b ./libjava/javax/swing/filechooser/FileFilter.java ! 3879476878b ./libjava/javax/swing/filechooser/FileSystemView.java ! 857897025b ./libjava/javax/swing/filechooser/FileView.java ! 1819534985b ./libjava/javax/swing/FocusManager.java ! 1905293927b ./libjava/javax/swing/GrayFilter.java ! 1839113764b ./libjava/javax/swing/Icon.java ! 2486761856b ./libjava/javax/swing/ImageIcon.java ! 745650812b ./libjava/javax/swing/InputMap.java ! 1908689280b ./libjava/javax/swing/InputVerifier.java ! 2857068486b ./libjava/javax/swing/JApplet.java ! 2404147098b ./libjava/javax/swing/JButton.java ! 2457596236b ./libjava/javax/swing/JCheckBox.java ! 3851234405b ./libjava/javax/swing/JCheckBoxMenuItem.java ! 2390997207b ./libjava/javax/swing/JColorChooser.java ! 4156983052b ./libjava/javax/swing/JComboBox.java ! 4048611239b ./libjava/javax/swing/JComponent.java ! 3752947146b ./libjava/javax/swing/JDesktopPane.java ! 1656957117b ./libjava/javax/swing/JDialog.java ! 244319045b ./libjava/javax/swing/JEditorPane.java ! 1045960131b ./libjava/javax/swing/JFileChooser.java ! 1759393335b ./libjava/javax/swing/JFrame.java ! 1826893518b ./libjava/javax/swing/JInternalFrame.java ! 1931846720b ./libjava/javax/swing/JLabel.java ! 2885946987b ./libjava/javax/swing/JLayeredPane.java ! 1282013929b ./libjava/javax/swing/JList.java ! 229985408b ./libjava/javax/swing/JMenuBar.java ! 2057593046b ./libjava/javax/swing/JMenuItem.java ! 2215382883b ./libjava/javax/swing/JMenu.java ! 1316288447b ./libjava/javax/swing/JOptionPane.java ! 3109850202b ./libjava/javax/swing/JPanel.java ! 2641263101b ./libjava/javax/swing/JPasswordField.java ! 2148348416b ./libjava/javax/swing/JPopupMenu.java ! 2445473710b ./libjava/javax/swing/JProgressBar.java ! 4269362165b ./libjava/javax/swing/JRadioButton.java ! 1554339604b ./libjava/javax/swing/JRadioButtonMenuItem.java ! 1256742655b ./libjava/javax/swing/JRootPane.java ! 1049100343b ./libjava/javax/swing/JScrollBar.java ! 1586399092b ./libjava/javax/swing/JScrollPane.java ! 4136782745b ./libjava/javax/swing/JSeparator.java ! 2743483951b ./libjava/javax/swing/JSlider.java ! 3898889978b ./libjava/javax/swing/JSplitPane.java ! 3035294173b ./libjava/javax/swing/JTabbedPane.java ! 3831055012b ./libjava/javax/swing/JTable.java ! 3945240108b ./libjava/javax/swing/JTextField.java ! 1144296855b ./libjava/javax/swing/JTextPane.java ! 1225949360b ./libjava/javax/swing/JToggleButton.java ! 3669222877b ./libjava/javax/swing/JToolBar.java ! 1133273780b ./libjava/javax/swing/JToolTip.java ! 1127698981b ./libjava/javax/swing/JTree.java ! 555125340b ./libjava/javax/swing/JViewport.java ! 2029833736b ./libjava/javax/swing/JWindow.java ! 21372743b ./libjava/javax/swing/KeyStroke.java ! 3444631881b ./libjava/javax/swing/ListCellRenderer.java ! 354093800b ./libjava/javax/swing/ListModel.java ! 1380975920b ./libjava/javax/swing/ListSelectionModel.java ! 156834520b ./libjava/javax/swing/LookAndFeel.java ! 799396182b ./libjava/javax/swing/MenuElement.java ! 4154783463b ./libjava/javax/swing/MenuSelectionManager.java ! 4065015575b ./libjava/javax/swing/MutableComboBoxModel.java ! 1418297156b ./libjava/javax/swing/OverlayLayout.java ! 2845814411b ./libjava/javax/swing/plaf/ActionMapUIResource.java ! 1001403656b ./libjava/javax/swing/plaf/basic/BasicBorders.java ! 2925722822b ./libjava/javax/swing/plaf/basic/BasicButtonUI.java ! 3827550305b ./libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java ! 3994216609b ./libjava/javax/swing/plaf/basic/BasicDefaults.java ! 2064160547b ./libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java ! 3387377466b ./libjava/javax/swing/plaf/basic/BasicIconFactory.java ! 2715624883b ./libjava/javax/swing/plaf/basic/BasicLabelUI.java ! 1218363334b ./libjava/javax/swing/plaf/basic/BasicListUI.java ! 4142725156b ./libjava/javax/swing/plaf/basic/BasicLookAndFeel.java ! 283501118b ./libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java ! 3431751273b ./libjava/javax/swing/plaf/basic/BasicPanelUI.java ! 3834969947b ./libjava/javax/swing/plaf/basic/BasicRadioButtonUI.java ! 2376150809b ./libjava/javax/swing/plaf/basic/BasicScrollPaneUI.java ! 3766095341b ./libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java ! 39491336b ./libjava/javax/swing/plaf/basic/BasicTextUI.java ! 3522223785b ./libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java ! 3258351481b ./libjava/javax/swing/plaf/basic/BasicTreeUI.java ! 1762138359b ./libjava/javax/swing/plaf/basic/BasicViewportUI.java ! 1477234031b ./libjava/javax/swing/plaf/BorderUIResource.java ! 1891619519b ./libjava/javax/swing/plaf/ButtonUI.java ! 1174416830b ./libjava/javax/swing/plaf/ColorChooserUI.java ! 4281041131b ./libjava/javax/swing/plaf/ColorUIResource.java ! 4014838717b ./libjava/javax/swing/plaf/ComboBoxUI.java ! 3627891356b ./libjava/javax/swing/plaf/ComponentInputMapUIResource.java ! 228381389b ./libjava/javax/swing/plaf/ComponentUI.java ! 55877874b ./libjava/javax/swing/plaf/DesktopIconUI.java ! 3787118728b ./libjava/javax/swing/plaf/DesktopPaneUI.java ! 2370869879b ./libjava/javax/swing/plaf/DimensionUIResource.java ! 2284710160b ./libjava/javax/swing/plaf/FileChooserUI.java ! 3909075810b ./libjava/javax/swing/plaf/FontUIResource.java ! 3273154363b ./libjava/javax/swing/plaf/IconUIResource.java ! 2682438596b ./libjava/javax/swing/plaf/InputMapUIResource.java ! 329609590b ./libjava/javax/swing/plaf/InsetsUIResource.java ! 1249808777b ./libjava/javax/swing/plaf/InternalFrameUI.java ! 191197305b ./libjava/javax/swing/plaf/LabelUI.java ! 1370601366b ./libjava/javax/swing/plaf/ListUI.java ! 1356565006b ./libjava/javax/swing/plaf/MenuBarUI.java ! 658224616b ./libjava/javax/swing/plaf/MenuItemUI.java ! 2485478966b ./libjava/javax/swing/plaf/metal/MetalLookAndFeel.java ! 1119106726b ./libjava/javax/swing/plaf/OptionPaneUI.java ! 1297588943b ./libjava/javax/swing/plaf/PanelUI.java ! 1118028570b ./libjava/javax/swing/plaf/PopupMenuUI.java ! 3160157082b ./libjava/javax/swing/plaf/ProgressBarUI.java ! 3627175898b ./libjava/javax/swing/plaf/RootPaneUI.java ! 1533053491b ./libjava/javax/swing/plaf/ScrollBarUI.java ! 972627364b ./libjava/javax/swing/plaf/ScrollPaneUI.java ! 1035703958b ./libjava/javax/swing/plaf/SeparatorUI.java ! 2207634381b ./libjava/javax/swing/plaf/SliderUI.java ! 1523807527b ./libjava/javax/swing/plaf/SplitPaneUI.java ! 4038488752b ./libjava/javax/swing/plaf/TabbedPaneUI.java ! 3565780009b ./libjava/javax/swing/plaf/TableHeaderUI.java ! 318065114b ./libjava/javax/swing/plaf/TableUI.java ! 773525029b ./libjava/javax/swing/plaf/TextUI.java ! 3829951337b ./libjava/javax/swing/plaf/ToolBarUI.java ! 2055968850b ./libjava/javax/swing/plaf/ToolTipUI.java ! 3381135940b ./libjava/javax/swing/plaf/TreeUI.java ! 3744703465b ./libjava/javax/swing/plaf/UIResource.java ! 1669303262b ./libjava/javax/swing/plaf/ViewportUI.java ! 1737292334b ./libjava/javax/swing/ProgressMonitorInputStream.java ! 3441135054b ./libjava/javax/swing/ProgressMonitor.java ! 271041998b ./libjava/javax/swing/Renderer.java ! 422745662b ./libjava/javax/swing/RepaintManager.java ! 1019018809b ./libjava/javax/swing/RootPaneContainer.java ! 1322845843b ./libjava/javax/swing/Scrollable.java ! 3792870879b ./libjava/javax/swing/ScrollPaneConstants.java ! 3875912602b ./libjava/javax/swing/ScrollPaneLayout.java ! 2789578500b ./libjava/javax/swing/SingleSelectionModel.java ! 1269923720b ./libjava/javax/swing/SizeRequirements.java ! 3306921956b ./libjava/javax/swing/SizeSequence.java ! 2347253833b ./libjava/javax/swing/SwingConstants.java ! 3367265967b ./libjava/javax/swing/SwingUtilities.java ! 3079464494b ./libjava/javax/swing/table/AbstractTableModel.java ! 291737387b ./libjava/javax/swing/table/DefaultTableCellRenderer.java ! 4160644105b ./libjava/javax/swing/table/DefaultTableColumnModel.java ! 119482337b ./libjava/javax/swing/table/DefaultTableModel.java ! 1753764548b ./libjava/javax/swing/table/TableCellEditor.java ! 1833707345b ./libjava/javax/swing/table/TableCellRenderer.java ! 2729739220b ./libjava/javax/swing/table/TableColumn.java ! 1205953393b ./libjava/javax/swing/table/TableColumnModel.java ! 3329252611b ./libjava/javax/swing/table/TableModel.java ! 395830468b ./libjava/javax/swing/text/AbstractDocument.java ! 3225566688b ./libjava/javax/swing/text/AttributeSet.java ! 2143902987b ./libjava/javax/swing/text/BadLocationException.java ! 1210691547b ./libjava/javax/swing/text/Caret.java ! 1560705752b ./libjava/javax/swing/text/CharacterIterator.java ! 117805677b ./libjava/javax/swing/text/ComponentView.java ! 3648316906b ./libjava/javax/swing/text/DefaultCaret.java ! 2316064455b ./libjava/javax/swing/text/DefaultEditorKit.java ! 222035690b ./libjava/javax/swing/text/Document.java ! 3829581196b ./libjava/javax/swing/text/EditorKit.java ! 2970875473b ./libjava/javax/swing/text/Element.java ! 2853732243b ./libjava/javax/swing/text/GapContent.java ! 4043897272b ./libjava/javax/swing/text/html/HTML.java ! 348698776b ./libjava/javax/swing/text/html/parser/ParserDelegator.java ! 3331442636b ./libjava/javax/swing/text/JTextComponent.java ! 2566839308b ./libjava/javax/swing/text/Keymap.java ! 2074070618b ./libjava/javax/swing/text/MutableAttributeSet.java ! 2233263155b ./libjava/javax/swing/text/PlainDocument.java ! 2162967864b ./libjava/javax/swing/text/PlainEditorKit.java ! 2579915949b ./libjava/javax/swing/text/Position.java ! 823120388b ./libjava/javax/swing/text/Segment.java ! 3426697128b ./libjava/javax/swing/text/StyledDocument.java ! 1911783619b ./libjava/javax/swing/text/StyledEditorKit.java ! 2891437475b ./libjava/javax/swing/text/Style.java ! 962719405b ./libjava/javax/swing/text/TextAction.java ! 2689141824b ./libjava/javax/swing/text/ViewFactory.java ! 3495234529b ./libjava/javax/swing/text/View.java ! 33434864b ./libjava/javax/swing/Timer.java ! 3407956077b ./libjava/javax/swing/ToggleButtonModel.java ! 3887503118b ./libjava/javax/swing/ToolTipManager.java ! 2308844089b ./libjava/javax/swing/tree/AbstractLayoutCache.java ! 3080754508b ./libjava/javax/swing/tree/DefaultMutableTreeNode.java ! 167253082b ./libjava/javax/swing/tree/DefaultTreeCellEditor.java ! 3073220493b ./libjava/javax/swing/tree/DefaultTreeCellRenderer.java ! 110066967b ./libjava/javax/swing/tree/DefaultTreeModel.java ! 3780964794b ./libjava/javax/swing/tree/DefaultTreeSelectionModel.java ! 951817634b ./libjava/javax/swing/tree/ExpandVetoException.java ! 342151432b ./libjava/javax/swing/tree/FixedHeightLayoutCache.java ! 2877199827b ./libjava/javax/swing/tree/MutableTreeNode.java ! 1308835668b ./libjava/javax/swing/tree/RowMapper.java ! 2711798282b ./libjava/javax/swing/tree/TreeCellEditor.java ! 1036689398b ./libjava/javax/swing/tree/TreeCellRenderer.java ! 3213635565b ./libjava/javax/swing/tree/TreeModel.java ! 3253809537b ./libjava/javax/swing/tree/TreeNode.java ! 2667391640b ./libjava/javax/swing/tree/TreePath.java ! 1990089199b ./libjava/javax/swing/tree/TreeSelectionModel.java ! 2130907010b ./libjava/javax/swing/tree/VariableHeightLayoutCache.java ! 21602999b ./libjava/javax/swing/UIDefaults.java ! 2345425161b ./libjava/javax/swing/UIManager.java ! 3592518646b ./libjava/javax/swing/undo/AbstractUndoableEdit.java ! 3666237561b ./libjava/javax/swing/undo/CannotRedoException.java ! 3367641305b ./libjava/javax/swing/undo/CannotUndoException.java ! 1998794068b ./libjava/javax/swing/undo/CompoundEdit.java ! 3110821623b ./libjava/javax/swing/undo/StateEditable.java ! 4246257322b ./libjava/javax/swing/undo/StateEdit.java ! 667404810b ./libjava/javax/swing/undo/UndoableEdit.java ! 1005070151b ./libjava/javax/swing/undo/UndoableEditSupport.java ! 2675818546b ./libjava/javax/swing/undo/UndoManager.java ! 3718291190b ./libjava/javax/swing/UnsupportedLookAndFeelException.java ! 2980346064b ./libjava/javax/swing/ViewportLayout.java ! 630293868b ./libjava/javax/swing/WindowConstants.java ! 1440351788b ./libjava/javax/transaction/HeuristicCommitException.java ! 2743141414b ./libjava/javax/transaction/HeuristicMixedException.java ! 3885800227b ./libjava/javax/transaction/HeuristicRollbackException.java ! 2096107569b ./libjava/javax/transaction/InvalidTransactionException.java ! 3640616559b ./libjava/javax/transaction/NotSupportedException.java ! 3857101503b ./libjava/javax/transaction/RollbackException.java ! 3731718777b ./libjava/javax/transaction/Status.java ! 606235285b ./libjava/javax/transaction/Synchronization.java ! 1756661316b ./libjava/javax/transaction/SystemException.java ! 3001400745b ./libjava/javax/transaction/Transaction.java ! 1367338589b ./libjava/javax/transaction/TransactionManager.java ! 1517955261b ./libjava/javax/transaction/TransactionRequiredException.java ! 53909417b ./libjava/javax/transaction/TransactionRolledbackException.java ! 2498458402b ./libjava/javax/transaction/UserTransaction.java ! 2881304658b ./libjava/javax/transaction/xa/XAException.java ! 3369315948b ./libjava/javax/transaction/xa/XAResource.java ! 583543514b ./libjava/javax/transaction/xa/Xid.java ! 2830800794b ./libjava/jni.cc ! 1362543266b ./libjava/LIBGCJ_LICENSE ! 854343147b ./libjava/libgcj.spec.in 3263845190b ./libjava/libgcj-test.spec.in 464053222b ./libjava/libltdl/acconfig.h 1486261890b ./libjava/libltdl/acinclude.m4 2748542911b ./libjava/libltdl/aclocal.m4 + 2360651443b ./libjava/libltdl/ChangeLog 3229611250b ./libjava/libltdl/config.h.in 3663840013b ./libjava/libltdl/configure 586017012b ./libjava/libltdl/configure.in + 1530919786b ./libjava/libltdl/COPYING.LIB + 3885054737b ./libjava/libltdl/.cvsignore 1708336280b ./libjava/libltdl/ltdl.c 3122579166b ./libjava/libltdl/ltdl.h + 3589765398b ./libjava/libltdl/Makefile.am + 2495909158b ./libjava/libltdl/Makefile.in + 1322928877b ./libjava/libltdl/README 216805921b ./libjava/libltdl/stamp-h.in ! 3873176006b ./libjava/libtool-version ! 2113750124b ./libjava/Makefile.am ! 3087644291b ./libjava/Makefile.in ! 1579747897b ./libjava/mauve-libgcj ! 4049677327b ./libjava/NEWS 3395710497b ./libjava/nogc.cc + 529282886b ./libjava/no-threads.cc 2042069291b ./libjava/org/w3c/dom/Attr.java 722169044b ./libjava/org/w3c/dom/CDATASection.java 2065721992b ./libjava/org/w3c/dom/CharacterData.java 2143127567b ./libjava/org/w3c/dom/Comment.java 862763522b ./libjava/org/w3c/dom/DocumentFragment.java + 1900680333b ./libjava/org/w3c/dom/Document.java 2426412549b ./libjava/org/w3c/dom/DocumentType.java + 488476586b ./libjava/org/w3c/dom/DOMException.java + 4211570251b ./libjava/org/w3c/dom/DOMImplementation.java 4250415570b ./libjava/org/w3c/dom/Element.java 4046624265b ./libjava/org/w3c/dom/Entity.java 2262342958b ./libjava/org/w3c/dom/EntityReference.java *************** *** 13028,13099 **** 1228842303b ./libjava/org/w3c/dom/NodeList.java 3739671112b ./libjava/org/w3c/dom/Notation.java 358325944b ./libjava/org/w3c/dom/ProcessingInstruction.java - 1690022844b ./libjava/org/w3c/dom/Text.java 2318984118b ./libjava/org/w3c/dom/ranges/DocumentRange.java - 1265227100b ./libjava/org/w3c/dom/ranges/Range.java 575095803b ./libjava/org/w3c/dom/ranges/RangeException.java 4050517071b ./libjava/org/w3c/dom/traversal/DocumentTraversal.java 2226386849b ./libjava/org/w3c/dom/traversal/NodeFilter.java 3652245705b ./libjava/org/w3c/dom/traversal/NodeIterator.java 819381088b ./libjava/org/w3c/dom/traversal/TreeWalker.java ! 1845225689b ./libjava/org/xml/sax/AttributeList.java ! 34783101b ./libjava/org/xml/sax/Attributes.java ! 2393098782b ./libjava/org/xml/sax/ContentHandler.java ! 2487190850b ./libjava/org/xml/sax/DTDHandler.java ! 2167265032b ./libjava/org/xml/sax/DocumentHandler.java ! 3192023668b ./libjava/org/xml/sax/EntityResolver.java ! 2389406127b ./libjava/org/xml/sax/ErrorHandler.java ! 3331884369b ./libjava/org/xml/sax/HandlerBase.java ! 3525958518b ./libjava/org/xml/sax/InputSource.java ! 1358247595b ./libjava/org/xml/sax/Locator.java ! 570431615b ./libjava/org/xml/sax/Parser.java ! 1627938146b ./libjava/org/xml/sax/SAXException.java ! 4028320752b ./libjava/org/xml/sax/SAXNotRecognizedException.java ! 800153920b ./libjava/org/xml/sax/SAXNotSupportedException.java ! 24590437b ./libjava/org/xml/sax/SAXParseException.java ! 2665273964b ./libjava/org/xml/sax/XMLFilter.java ! 557624139b ./libjava/org/xml/sax/XMLReader.java ! 3779605388b ./libjava/org/xml/sax/ext/DeclHandler.java ! 3015426944b ./libjava/org/xml/sax/ext/LexicalHandler.java ! 2006841075b ./libjava/org/xml/sax/helpers/AttributeListImpl.java ! 1981118939b ./libjava/org/xml/sax/helpers/AttributesImpl.java ! 3683787168b ./libjava/org/xml/sax/helpers/DefaultHandler.java ! 3791965905b ./libjava/org/xml/sax/helpers/LocatorImpl.java ! 1401784461b ./libjava/org/xml/sax/helpers/NamespaceSupport.java ! 3459248108b ./libjava/org/xml/sax/helpers/ParserAdapter.java ! 1216147324b ./libjava/org/xml/sax/helpers/ParserFactory.java ! 774083139b ./libjava/org/xml/sax/helpers/XMLFilterImpl.java ! 3667288069b ./libjava/org/xml/sax/helpers/XMLReaderAdapter.java ! 1058624631b ./libjava/org/xml/sax/helpers/XMLReaderFactory.java ! 4218036894b ./libjava/posix-threads.cc ! 268319164b ./libjava/posix.cc ! 1057670606b ./libjava/prims.cc ! 3315476665b ./libjava/resolve.cc ! 2639955246b ./libjava/scripts/MakeCharTables.java ! 211751055b ./libjava/scripts/MakeDefaultMimeTypes.java ! 2309086205b ./libjava/scripts/TexinfoDoclet.java 2710913388b ./libjava/scripts/classes.pl 2322272636b ./libjava/scripts/encodings.pl 415147073b ./libjava/scripts/mime.types 1359447378b ./libjava/scripts/showval.java 2507783b ./libjava/scripts/unicode-blocks.pl 2554188738b ./libjava/scripts/unicode-decomp.pl 3460612990b ./libjava/scripts/unicode-muncher.pl 810390237b ./libjava/sysdep/alpha/locks.h 2948369561b ./libjava/sysdep/generic/locks.h 255022282b ./libjava/sysdep/i386/locks.h - 3969226176b ./libjava/sysdep/ia64-frame.h 4255020929b ./libjava/sysdep/ia64.c 2487590179b ./libjava/sysdep/ia64/locks.h ! 3446737173b ./libjava/sysdep/powerpc/locks.h 2903495760b ./libjava/sysdep/sparc/locks.h ! 4288525704b ./libjava/testsuite/ChangeLog ! 3806425466b ./libjava/testsuite/Makefile.am ! 1096421437b ./libjava/testsuite/Makefile.in 1230501773b ./libjava/testsuite/config/default.exp ! 2598210176b ./libjava/testsuite/lib/libjava.exp 2597392402b ./libjava/testsuite/libjava.compile/ArrayClass.java 2001362839b ./libjava/testsuite/libjava.compile/Case.java 1402474633b ./libjava/testsuite/libjava.compile/G19990210_1.java 3600660956b ./libjava/testsuite/libjava.compile/G19990210_2.java 2466381413b ./libjava/testsuite/libjava.compile/G19990210_3.java --- 14172,14262 ---- 1228842303b ./libjava/org/w3c/dom/NodeList.java 3739671112b ./libjava/org/w3c/dom/Notation.java 358325944b ./libjava/org/w3c/dom/ProcessingInstruction.java 2318984118b ./libjava/org/w3c/dom/ranges/DocumentRange.java 575095803b ./libjava/org/w3c/dom/ranges/RangeException.java + 1265227100b ./libjava/org/w3c/dom/ranges/Range.java + 1690022844b ./libjava/org/w3c/dom/Text.java 4050517071b ./libjava/org/w3c/dom/traversal/DocumentTraversal.java 2226386849b ./libjava/org/w3c/dom/traversal/NodeFilter.java 3652245705b ./libjava/org/w3c/dom/traversal/NodeIterator.java 819381088b ./libjava/org/w3c/dom/traversal/TreeWalker.java ! 1129310863b ./libjava/org/xml/sax/AttributeList.java ! 186120789b ./libjava/org/xml/sax/Attributes.java ! 2728687290b ./libjava/org/xml/sax/ContentHandler.java ! 1046461319b ./libjava/org/xml/sax/DocumentHandler.java ! 3514130481b ./libjava/org/xml/sax/DTDHandler.java ! 345027888b ./libjava/org/xml/sax/EntityResolver.java ! 748594598b ./libjava/org/xml/sax/ErrorHandler.java ! 3920069772b ./libjava/org/xml/sax/ext/DeclHandler.java ! 1872175396b ./libjava/org/xml/sax/ext/LexicalHandler.java ! 3813315315b ./libjava/org/xml/sax/ext/package.html ! 2474834889b ./libjava/org/xml/sax/HandlerBase.java ! 3204409856b ./libjava/org/xml/sax/helpers/AttributeListImpl.java ! 645412983b ./libjava/org/xml/sax/helpers/AttributesImpl.java ! 489492922b ./libjava/org/xml/sax/helpers/DefaultHandler.java ! 314779727b ./libjava/org/xml/sax/helpers/LocatorImpl.java ! 750502649b ./libjava/org/xml/sax/helpers/NamespaceSupport.java ! 1300988152b ./libjava/org/xml/sax/helpers/NewInstance.java ! 3155728298b ./libjava/org/xml/sax/helpers/package.html ! 3105076878b ./libjava/org/xml/sax/helpers/ParserAdapter.java ! 1733309899b ./libjava/org/xml/sax/helpers/ParserFactory.java ! 3640643604b ./libjava/org/xml/sax/helpers/XMLFilterImpl.java ! 1610756734b ./libjava/org/xml/sax/helpers/XMLReaderAdapter.java ! 3616638609b ./libjava/org/xml/sax/helpers/XMLReaderFactory.java ! 3969232393b ./libjava/org/xml/sax/InputSource.java ! 1449457533b ./libjava/org/xml/sax/Locator.java ! 1586395588b ./libjava/org/xml/sax/package.html ! 1116558011b ./libjava/org/xml/sax/Parser.java ! 688197855b ./libjava/org/xml/sax/SAXException.java ! 287566472b ./libjava/org/xml/sax/SAXNotRecognizedException.java ! 3488708861b ./libjava/org/xml/sax/SAXNotSupportedException.java ! 283277028b ./libjava/org/xml/sax/SAXParseException.java ! 797458550b ./libjava/org/xml/sax/XMLFilter.java ! 718503864b ./libjava/org/xml/sax/XMLReader.java ! 601024531b ./libjava/posix.cc ! 1371529945b ./libjava/posix-threads.cc ! 110444835b ./libjava/prims.cc ! 3199155412b ./libjava/README ! 3770005913b ./libjava/resolve.cc 2710913388b ./libjava/scripts/classes.pl 2322272636b ./libjava/scripts/encodings.pl + 2639955246b ./libjava/scripts/MakeCharTables.java + 211751055b ./libjava/scripts/MakeDefaultMimeTypes.java 415147073b ./libjava/scripts/mime.types 1359447378b ./libjava/scripts/showval.java + 2309086205b ./libjava/scripts/TexinfoDoclet.java 2507783b ./libjava/scripts/unicode-blocks.pl 2554188738b ./libjava/scripts/unicode-decomp.pl 3460612990b ./libjava/scripts/unicode-muncher.pl 810390237b ./libjava/sysdep/alpha/locks.h 2948369561b ./libjava/sysdep/generic/locks.h 255022282b ./libjava/sysdep/i386/locks.h 4255020929b ./libjava/sysdep/ia64.c + 3969226176b ./libjava/sysdep/ia64-frame.h 2487590179b ./libjava/sysdep/ia64/locks.h ! 984701779b ./libjava/sysdep/powerpc/locks.h ! 106901581b ./libjava/sysdep/s390/locks.h ! 2334349943b ./libjava/sysdep/sh/locks.h 2903495760b ./libjava/sysdep/sparc/locks.h ! 1725741696b ./libjava/sysdep/x86-64/locks.h ! 3224728677b ./libjava/testsuite/ChangeLog 1230501773b ./libjava/testsuite/config/default.exp ! 3718926011b ./libjava/testsuite/libjava.compile/abstr.java ! 2888415448b ./libjava/testsuite/libjava.compile/abstr.xfail 2597392402b ./libjava/testsuite/libjava.compile/ArrayClass.java + 2510342235b ./libjava/testsuite/libjava.compile/assignment_2.java + 113533645b ./libjava/testsuite/libjava.compile/assignment.java + 226856759b ./libjava/testsuite/libjava.compile/block.java + 1927457704b ./libjava/testsuite/libjava.compile/block.xfail 2001362839b ./libjava/testsuite/libjava.compile/Case.java + 1280659122b ./libjava/testsuite/libjava.compile/comment.java + 3786501780b ./libjava/testsuite/libjava.compile/compile.exp + 3540074415b ./libjava/testsuite/libjava.compile/consthrow.java + 4283562407b ./libjava/testsuite/libjava.compile/consthrow.xfail + 3242282126b ./libjava/testsuite/libjava.compile/final_assignment_check.java + 1927457704b ./libjava/testsuite/libjava.compile/final_assignment_check.xfail + 2489230363b ./libjava/testsuite/libjava.compile/final_initialization_in_ctor.java + 2700872724b ./libjava/testsuite/libjava.compile/final_local_switch.java 1402474633b ./libjava/testsuite/libjava.compile/G19990210_1.java 3600660956b ./libjava/testsuite/libjava.compile/G19990210_2.java 2466381413b ./libjava/testsuite/libjava.compile/G19990210_3.java *************** *** 13101,13123 **** --- 14264,14307 ---- 3096844209b ./libjava/testsuite/libjava.compile/G19990217_02.java 290547391b ./libjava/testsuite/libjava.compile/G19990217_02.no-link 2679863284b ./libjava/testsuite/libjava.compile/G19990225_01.java + 2268267866b ./libjava/testsuite/libjava.compile/iface.java + 3867761903b ./libjava/testsuite/libjava.compile/inner_1.java + 20838332b ./libjava/testsuite/libjava.compile/inner_1.xfail + 2923236037b ./libjava/testsuite/libjava.compile/inner_data.java + 1142481695b ./libjava/testsuite/libjava.compile/inner_inherit.java + 2576661865b ./libjava/testsuite/libjava.compile/inner_priv.java + 1329801431b ./libjava/testsuite/libjava.compile/inner_pub.java + 988747335b ./libjava/testsuite/libjava.compile/invokeinterface/A.java + 1237730563b ./libjava/testsuite/libjava.compile/invokeinterface/B.java + 887835602b ./libjava/testsuite/libjava.compile/invokeinterface/Test.java 3848284330b ./libjava/testsuite/libjava.compile/MethodFailure4.java 1927457704b ./libjava/testsuite/libjava.compile/MethodFailure4.xfail 1373164997b ./libjava/testsuite/libjava.compile/N19990310_01.java 2764881773b ./libjava/testsuite/libjava.compile/N19990317.java + 1874616617b ./libjava/testsuite/libjava.compile/narrow_case.java + 1478470590b ./libjava/testsuite/libjava.compile/not_a_redef.java + 2802394982b ./libjava/testsuite/libjava.compile/not_a_redef.xfail 2730053140b ./libjava/testsuite/libjava.compile/OperatorBenchmark.java + 1193669757b ./libjava/testsuite/libjava.compile/perc.java + 4184523558b ./libjava/testsuite/libjava.compile/plusplus.java + 2163108697b ./libjava/testsuite/libjava.compile/pr10459_2.java + 3480725861b ./libjava/testsuite/libjava.compile/pr10459.java 285536381b ./libjava/testsuite/libjava.compile/PR124.java 1927457704b ./libjava/testsuite/libjava.compile/PR124.xfail 2852406997b ./libjava/testsuite/libjava.compile/PR127.java 1927457704b ./libjava/testsuite/libjava.compile/PR127.xfail 804684683b ./libjava/testsuite/libjava.compile/PR129_B.java 290547391b ./libjava/testsuite/libjava.compile/PR129_B.no-link + 266794418b ./libjava/testsuite/libjava.compile/PR1343.java 3146715453b ./libjava/testsuite/libjava.compile/PR140.java 1927457704b ./libjava/testsuite/libjava.compile/PR140.xfail 4285258758b ./libjava/testsuite/libjava.compile/PR163.java 1927457704b ./libjava/testsuite/libjava.compile/PR163.xfail 2290833112b ./libjava/testsuite/libjava.compile/PR164.java 1927457704b ./libjava/testsuite/libjava.compile/PR164.xfail + 127683262b ./libjava/testsuite/libjava.compile/pr172.java + 3745463245b ./libjava/testsuite/libjava.compile/pr174.java + 2787957046b ./libjava/testsuite/libjava.compile/pr176.java 895496907b ./libjava/testsuite/libjava.compile/PR206.java 973849712b ./libjava/testsuite/libjava.compile/PR207.java 2802394982b ./libjava/testsuite/libjava.compile/PR207.xfail *************** *** 13126,13133 **** 1822717569b ./libjava/testsuite/libjava.compile/PR209.java 779507036b ./libjava/testsuite/libjava.compile/PR224.java 1927457704b ./libjava/testsuite/libjava.compile/PR224.xfail - 2989158759b ./libjava/testsuite/libjava.compile/PR232.java 2627046019b ./libjava/testsuite/libjava.compile/PR232B.java 3778326371b ./libjava/testsuite/libjava.compile/PR234.java 842896942b ./libjava/testsuite/libjava.compile/PR235.java 2668948381b ./libjava/testsuite/libjava.compile/PR238.java --- 14310,14317 ---- 1822717569b ./libjava/testsuite/libjava.compile/PR209.java 779507036b ./libjava/testsuite/libjava.compile/PR224.java 1927457704b ./libjava/testsuite/libjava.compile/PR224.xfail 2627046019b ./libjava/testsuite/libjava.compile/PR232B.java + 2989158759b ./libjava/testsuite/libjava.compile/PR232.java 3778326371b ./libjava/testsuite/libjava.compile/PR234.java 842896942b ./libjava/testsuite/libjava.compile/PR235.java 2668948381b ./libjava/testsuite/libjava.compile/PR238.java *************** *** 13146,13189 **** 2802394982b ./libjava/testsuite/libjava.compile/PR5848.xfail 3877718833b ./libjava/testsuite/libjava.compile/PR5902.java 3468040591b ./libjava/testsuite/libjava.compile/PR5913.java - 588631470b ./libjava/testsuite/libjava.compile/PR5913.xfail 3689218637b ./libjava/testsuite/libjava.compile/PR6026.java ! 1601820268b ./libjava/testsuite/libjava.compile/Semi.java ! 1283240173b ./libjava/testsuite/libjava.compile/Statics.java ! 2919174619b ./libjava/testsuite/libjava.compile/SuperConstr.java ! 4243896875b ./libjava/testsuite/libjava.compile/Twice.java ! 328754321b ./libjava/testsuite/libjava.compile/Where.java ! 20838332b ./libjava/testsuite/libjava.compile/Where.xfail ! 4003272220b ./libjava/testsuite/libjava.compile/XercesBug.java ! 3718926011b ./libjava/testsuite/libjava.compile/abstr.java ! 2888415448b ./libjava/testsuite/libjava.compile/abstr.xfail ! 113533645b ./libjava/testsuite/libjava.compile/assignment.java ! 2510342235b ./libjava/testsuite/libjava.compile/assignment_2.java ! 226856759b ./libjava/testsuite/libjava.compile/block.java ! 1927457704b ./libjava/testsuite/libjava.compile/block.xfail ! 1280659122b ./libjava/testsuite/libjava.compile/comment.java ! 1877199736b ./libjava/testsuite/libjava.compile/compile.exp ! 3242282126b ./libjava/testsuite/libjava.compile/final_assignment_check.java ! 1927457704b ./libjava/testsuite/libjava.compile/final_assignment_check.xfail ! 2489230363b ./libjava/testsuite/libjava.compile/final_initialization_in_ctor.java ! 2700872724b ./libjava/testsuite/libjava.compile/final_local_switch.java ! 2268267866b ./libjava/testsuite/libjava.compile/iface.java ! 3867761903b ./libjava/testsuite/libjava.compile/inner_1.java ! 20838332b ./libjava/testsuite/libjava.compile/inner_1.xfail ! 2923236037b ./libjava/testsuite/libjava.compile/inner_data.java ! 1142481695b ./libjava/testsuite/libjava.compile/inner_inherit.java ! 2576661865b ./libjava/testsuite/libjava.compile/inner_priv.java ! 1329801431b ./libjava/testsuite/libjava.compile/inner_pub.java ! 988747335b ./libjava/testsuite/libjava.compile/invokeinterface/A.java ! 1237730563b ./libjava/testsuite/libjava.compile/invokeinterface/B.java ! 887835602b ./libjava/testsuite/libjava.compile/invokeinterface/Test.java ! 1478470590b ./libjava/testsuite/libjava.compile/not_a_redef.java ! 2802394982b ./libjava/testsuite/libjava.compile/not_a_redef.xfail ! 1193669757b ./libjava/testsuite/libjava.compile/perc.java ! 4184523558b ./libjava/testsuite/libjava.compile/plusplus.java ! 127683262b ./libjava/testsuite/libjava.compile/pr172.java ! 3745463245b ./libjava/testsuite/libjava.compile/pr174.java ! 2787957046b ./libjava/testsuite/libjava.compile/pr176.java 1123122376b ./libjava/testsuite/libjava.compile/redef1.java 1927457704b ./libjava/testsuite/libjava.compile/redef1.xfail 1933159159b ./libjava/testsuite/libjava.compile/redef2.java --- 14330,14341 ---- 2802394982b ./libjava/testsuite/libjava.compile/PR5848.xfail 3877718833b ./libjava/testsuite/libjava.compile/PR5902.java 3468040591b ./libjava/testsuite/libjava.compile/PR5913.java 3689218637b ./libjava/testsuite/libjava.compile/PR6026.java ! 2971726147b ./libjava/testsuite/libjava.compile/PR6865.java ! 1927457704b ./libjava/testsuite/libjava.compile/PR6865.xfail ! 3358917760b ./libjava/testsuite/libjava.compile/pr7912.java ! 1946038566b ./libjava/testsuite/libjava.compile/pr8712.java ! 1362898969b ./libjava/testsuite/libjava.compile/pr8955.java 1123122376b ./libjava/testsuite/libjava.compile/redef1.java 1927457704b ./libjava/testsuite/libjava.compile/redef1.xfail 1933159159b ./libjava/testsuite/libjava.compile/redef2.java *************** *** 13196,13404 **** 1927457704b ./libjava/testsuite/libjava.compile/redef5.xfail 301913850b ./libjava/testsuite/libjava.compile/redef6.java 1927457704b ./libjava/testsuite/libjava.compile/redef6.xfail 1151358467b ./libjava/testsuite/libjava.compile/static_1.java 1927457704b ./libjava/testsuite/libjava.compile/static_1.xfail 3508774254b ./libjava/testsuite/libjava.compile/static_2.java 2802394982b ./libjava/testsuite/libjava.compile/static_2.xfail 2883944369b ./libjava/testsuite/libjava.compile/static_3.java 2802394982b ./libjava/testsuite/libjava.compile/static_3.xfail 1851980739b ./libjava/testsuite/libjava.compile/static_init.java 1927457704b ./libjava/testsuite/libjava.compile/static_init.xfail - 1286489290b ./libjava/testsuite/libjava.compile/static_init2.java 2134939631b ./libjava/testsuite/libjava.compile/static_inner.java 3221090904b ./libjava/testsuite/libjava.compile/support/Case.java 1796854903b ./libjava/testsuite/libjava.compile/support/PR129_A.java 4294110747b ./libjava/testsuite/libjava.compile/support/PR206_A.java 3604033893b ./libjava/testsuite/libjava.compile/support/PR207_A.java 3847332882b ./libjava/testsuite/libjava.compile/support/Waldo.java 1618780916b ./libjava/testsuite/libjava.compile/uesc.java 1927457704b ./libjava/testsuite/libjava.compile/uesc.xfail 650583552b ./libjava/testsuite/libjava.compile/weirddecl.java 2802394982b ./libjava/testsuite/libjava.compile/weirddecl.xfail ! 2406961399b ./libjava/testsuite/libjava.jni/calls.c ! 570497497b ./libjava/testsuite/libjava.jni/calls.java 2319994314b ./libjava/testsuite/libjava.jni/calls.out 3258253370b ./libjava/testsuite/libjava.jni/cxxtest.cc 3556355428b ./libjava/testsuite/libjava.jni/cxxtest.java 1591540413b ./libjava/testsuite/libjava.jni/cxxtest.out ! 3827106409b ./libjava/testsuite/libjava.jni/field.c 2827280571b ./libjava/testsuite/libjava.jni/field.java 1591540413b ./libjava/testsuite/libjava.jni/field.out ! 2542861742b ./libjava/testsuite/libjava.jni/final_method.c 744642976b ./libjava/testsuite/libjava.jni/final_method.java 4113024295b ./libjava/testsuite/libjava.jni/final_method.out ! 2096366722b ./libjava/testsuite/libjava.jni/findclass.c 1104414750b ./libjava/testsuite/libjava.jni/findclass.java 2209130481b ./libjava/testsuite/libjava.jni/findclass.out ! 3064158603b ./libjava/testsuite/libjava.jni/invoke.c 259614484b ./libjava/testsuite/libjava.jni/invoke.java 2175620992b ./libjava/testsuite/libjava.jni/invoke.out ! 2564626451b ./libjava/testsuite/libjava.jni/jni.exp ! 4181163842b ./libjava/testsuite/libjava.jni/martin.c 1311631215b ./libjava/testsuite/libjava.jni/martin.java 3887683434b ./libjava/testsuite/libjava.jni/martin.out ! 2791696369b ./libjava/testsuite/libjava.jni/noclass.c 32928721b ./libjava/testsuite/libjava.jni/noclass.java 497334114b ./libjava/testsuite/libjava.jni/noclass.out ! 1963806613b ./libjava/testsuite/libjava.jni/overload.c 961228127b ./libjava/testsuite/libjava.jni/overload.java 2399516383b ./libjava/testsuite/libjava.jni/overload.out ! 1369103910b ./libjava/testsuite/libjava.jni/register.c 4203322028b ./libjava/testsuite/libjava.jni/register.java 871340861b ./libjava/testsuite/libjava.jni/register.out ! 4271669831b ./libjava/testsuite/libjava.jni/simple_int.c 555115153b ./libjava/testsuite/libjava.jni/simple_int.java 1242895306b ./libjava/testsuite/libjava.jni/simple_int.out ! 1996443135b ./libjava/testsuite/libjava.jni/throwit.c 2321406220b ./libjava/testsuite/libjava.jni/throwit.java 3149777050b ./libjava/testsuite/libjava.jni/throwit.out ! 4001436975b ./libjava/testsuite/libjava.jni/virtual.c 1112271683b ./libjava/testsuite/libjava.jni/virtual.java 3956933800b ./libjava/testsuite/libjava.jni/virtual.out - 2027810547b ./libjava/testsuite/libjava.lang/ArrayStore.java - 1436845427b ./libjava/testsuite/libjava.lang/ArrayStore.out - 300949552b ./libjava/testsuite/libjava.lang/ArrayStore.xfail - 4266220724b ./libjava/testsuite/libjava.lang/ArrayStore2.java - 2092431633b ./libjava/testsuite/libjava.lang/ArrayStore2.out - 4156356334b ./libjava/testsuite/libjava.lang/ArrayStore2.xfail - 861880957b ./libjava/testsuite/libjava.lang/Array_1.java - 882278996b ./libjava/testsuite/libjava.lang/Array_1.out - 1251637952b ./libjava/testsuite/libjava.lang/Array_2.java - 684357305b ./libjava/testsuite/libjava.lang/Array_2.out - 938556093b ./libjava/testsuite/libjava.lang/Array_3.java - 4294967295b ./libjava/testsuite/libjava.lang/Array_3.out - 3857779796b ./libjava/testsuite/libjava.lang/Class_1.java - 2350753667b ./libjava/testsuite/libjava.lang/Class_1.out - 101283440b ./libjava/testsuite/libjava.lang/Divide_1.java - 1217781165b ./libjava/testsuite/libjava.lang/Divide_1.out - 3723805515b ./libjava/testsuite/libjava.lang/FileHandleGcTest.java - 4294967295b ./libjava/testsuite/libjava.lang/FileHandleGcTest.out - 1007761145b ./libjava/testsuite/libjava.lang/Final.java - 1431193732b ./libjava/testsuite/libjava.lang/Final.out - 4214563461b ./libjava/testsuite/libjava.lang/Float_1.java - 151908695b ./libjava/testsuite/libjava.lang/Float_1.out - 4211438566b ./libjava/testsuite/libjava.lang/G19990301_01.java - 461683115b ./libjava/testsuite/libjava.lang/G19990301_01.out - 33515568b ./libjava/testsuite/libjava.lang/G19990302_02.java - 4126570333b ./libjava/testsuite/libjava.lang/G19990302_02.out - 1577075294b ./libjava/testsuite/libjava.lang/G19990303_01.java - 3694902336b ./libjava/testsuite/libjava.lang/G19990303_01.out - 3568552442b ./libjava/testsuite/libjava.lang/G19990303_02.java - 3718849348b ./libjava/testsuite/libjava.lang/G19990303_02.out - 690728310b ./libjava/testsuite/libjava.lang/G19990304_01.java - 2163223985b ./libjava/testsuite/libjava.lang/G19990304_01.out - 309057909b ./libjava/testsuite/libjava.lang/G19990310_01.java - 3818873941b ./libjava/testsuite/libjava.lang/G19990310_01.out - 3927692588b ./libjava/testsuite/libjava.lang/II.java - 324202418b ./libjava/testsuite/libjava.lang/II.out - 2590078423b ./libjava/testsuite/libjava.lang/InterfaceDispatch.java - 3002596040b ./libjava/testsuite/libjava.lang/InterfaceDispatch.out - 1233424497b ./libjava/testsuite/libjava.lang/InvokeReturn.java - 1505249822b ./libjava/testsuite/libjava.lang/InvokeReturn.out - 2975542902b ./libjava/testsuite/libjava.lang/Invoke_1.java - 636088706b ./libjava/testsuite/libjava.lang/Invoke_1.out - 482546829b ./libjava/testsuite/libjava.lang/Invoke_2.java - 1406708247b ./libjava/testsuite/libjava.lang/Invoke_2.out - 897141912b ./libjava/testsuite/libjava.lang/KeepInline.java - 3068566825b ./libjava/testsuite/libjava.lang/KeepInline.out - 1339868029b ./libjava/testsuite/libjava.lang/Matrix4f.java - 2870485448b ./libjava/testsuite/libjava.lang/Matrix4f.out - 3824357332b ./libjava/testsuite/libjava.lang/N19990310_02.java - 2283836352b ./libjava/testsuite/libjava.lang/N19990310_02.out - 792408510b ./libjava/testsuite/libjava.lang/N19990310_3.java - 2283836352b ./libjava/testsuite/libjava.lang/N19990310_3.out - 1646449121b ./libjava/testsuite/libjava.lang/N19990310_4.java - 2283836352b ./libjava/testsuite/libjava.lang/N19990310_4.out - 1522131980b ./libjava/testsuite/libjava.lang/N19990310_5.java - 2283836352b ./libjava/testsuite/libjava.lang/N19990310_5.out - 4106708340b ./libjava/testsuite/libjava.lang/PR141.java - 417890381b ./libjava/testsuite/libjava.lang/PR141.out - 924969358b ./libjava/testsuite/libjava.lang/PR160.java - 636088706b ./libjava/testsuite/libjava.lang/PR160.out - 710573971b ./libjava/testsuite/libjava.lang/PR162.java - 3491850227b ./libjava/testsuite/libjava.lang/PR162.out - 4227723795b ./libjava/testsuite/libjava.lang/PR218.java - 4039517750b ./libjava/testsuite/libjava.lang/PR218.out - 1329261743b ./libjava/testsuite/libjava.lang/PR242.java - 1147234566b ./libjava/testsuite/libjava.lang/PR242.out - 526707998b ./libjava/testsuite/libjava.lang/PR260.java - 3569591772b ./libjava/testsuite/libjava.lang/PR260.out - 14665884b ./libjava/testsuite/libjava.lang/PR3096.java - 2259565565b ./libjava/testsuite/libjava.lang/PR3096.out - 2985138501b ./libjava/testsuite/libjava.lang/PR3731.java - 3956933800b ./libjava/testsuite/libjava.lang/PR3731.out - 2537530668b ./libjava/testsuite/libjava.lang/PR5057.java - 742353047b ./libjava/testsuite/libjava.lang/PR5057.out - 2570001649b ./libjava/testsuite/libjava.lang/PR5057_2.java - 742353047b ./libjava/testsuite/libjava.lang/PR5057_2.out - 1438756381b ./libjava/testsuite/libjava.lang/PR55.java - 1201518198b ./libjava/testsuite/libjava.lang/PR55.out - 1733338993b ./libjava/testsuite/libjava.lang/PR56.java - 4294967295b ./libjava/testsuite/libjava.lang/PR56.out - 230260077b ./libjava/testsuite/libjava.lang/Shazam.java - 2140426616b ./libjava/testsuite/libjava.lang/Shazam.out - 3112946038b ./libjava/testsuite/libjava.lang/StringBuffer_1.java - 2481391305b ./libjava/testsuite/libjava.lang/StringBuffer_1.out - 2731334240b ./libjava/testsuite/libjava.lang/SyncTest.java - 636088706b ./libjava/testsuite/libjava.lang/SyncTest.out - 2443605665b ./libjava/testsuite/libjava.lang/SyncTest.xfail - 3629333030b ./libjava/testsuite/libjava.lang/Synch.java - 497334114b ./libjava/testsuite/libjava.lang/Synch.out - 1571608298b ./libjava/testsuite/libjava.lang/TLtest.java - 2677880801b ./libjava/testsuite/libjava.lang/TLtest.out - 2443605665b ./libjava/testsuite/libjava.lang/TLtest.xfail - 523427206b ./libjava/testsuite/libjava.lang/Thread_Alive.java - 3591103454b ./libjava/testsuite/libjava.lang/Thread_Alive.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Alive.xfail - 1125974645b ./libjava/testsuite/libjava.lang/Thread_Interrupt.java - 2320601405b ./libjava/testsuite/libjava.lang/Thread_Interrupt.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Interrupt.xfail - 2682118636b ./libjava/testsuite/libjava.lang/Thread_Join.java - 2884008640b ./libjava/testsuite/libjava.lang/Thread_Join.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Join.xfail - 3992399686b ./libjava/testsuite/libjava.lang/Thread_Monitor.java - 636088706b ./libjava/testsuite/libjava.lang/Thread_Monitor.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Monitor.xfail - 3015472066b ./libjava/testsuite/libjava.lang/Thread_Sleep.java - 1299320686b ./libjava/testsuite/libjava.lang/Thread_Sleep.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Sleep.xfail - 3820325918b ./libjava/testsuite/libjava.lang/Thread_Wait.java - 3866441409b ./libjava/testsuite/libjava.lang/Thread_Wait.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Wait.xfail - 2785867945b ./libjava/testsuite/libjava.lang/Thread_Wait_2.java - 3278714705b ./libjava/testsuite/libjava.lang/Thread_Wait_2.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Wait_2.xfail - 3412514508b ./libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.java - 3606244218b ./libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.out - 2443605665b ./libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail - 1046451808b ./libjava/testsuite/libjava.lang/Throw_1.java - 4294967295b ./libjava/testsuite/libjava.lang/Throw_1.out - 1749384831b ./libjava/testsuite/libjava.lang/Throw_2.java - 4294967295b ./libjava/testsuite/libjava.lang/Throw_2.out 68731963b ./libjava/testsuite/libjava.lang/anfi.java 1280347506b ./libjava/testsuite/libjava.lang/anfi.out - 4123776590b ./libjava/testsuite/libjava.lang/anon.java - 2668540913b ./libjava/testsuite/libjava.lang/anon.out 3232612065b ./libjava/testsuite/libjava.lang/anon2.java 119345088b ./libjava/testsuite/libjava.lang/anon2.out 1843983227b ./libjava/testsuite/libjava.lang/anon3.java 4270138359b ./libjava/testsuite/libjava.lang/anon3.out 507421585b ./libjava/testsuite/libjava.lang/anon4.java 1106138275b ./libjava/testsuite/libjava.lang/anon4.out - 112674158b ./libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java - 3114021423b ./libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out - 1808791407b ./libjava/testsuite/libjava.lang/anonarray.java - 2382672912b ./libjava/testsuite/libjava.lang/anonarray.out 3443545975b ./libjava/testsuite/libjava.lang/anonarray2.java 2382672912b ./libjava/testsuite/libjava.lang/anonarray2.out 3491730776b ./libjava/testsuite/libjava.lang/anonarray3.java 1685542540b ./libjava/testsuite/libjava.lang/anonarray3.out 2546101232b ./libjava/testsuite/libjava.lang/direct_read.java 2764570783b ./libjava/testsuite/libjava.lang/direct_read.out 941796535b ./libjava/testsuite/libjava.lang/direct_write.java 975119945b ./libjava/testsuite/libjava.lang/direct_write.out ! 4201705759b ./libjava/testsuite/libjava.lang/err1.java ! 2283836352b ./libjava/testsuite/libjava.lang/err1.out 215085604b ./libjava/testsuite/libjava.lang/err10.java 2283836352b ./libjava/testsuite/libjava.lang/err10.out 1346535668b ./libjava/testsuite/libjava.lang/err11.java --- 14348,14466 ---- 1927457704b ./libjava/testsuite/libjava.compile/redef5.xfail 301913850b ./libjava/testsuite/libjava.compile/redef6.java 1927457704b ./libjava/testsuite/libjava.compile/redef6.xfail + 1601820268b ./libjava/testsuite/libjava.compile/Semi.java 1151358467b ./libjava/testsuite/libjava.compile/static_1.java 1927457704b ./libjava/testsuite/libjava.compile/static_1.xfail 3508774254b ./libjava/testsuite/libjava.compile/static_2.java 2802394982b ./libjava/testsuite/libjava.compile/static_2.xfail 2883944369b ./libjava/testsuite/libjava.compile/static_3.java 2802394982b ./libjava/testsuite/libjava.compile/static_3.xfail + 1286489290b ./libjava/testsuite/libjava.compile/static_init2.java 1851980739b ./libjava/testsuite/libjava.compile/static_init.java 1927457704b ./libjava/testsuite/libjava.compile/static_init.xfail 2134939631b ./libjava/testsuite/libjava.compile/static_inner.java + 1283240173b ./libjava/testsuite/libjava.compile/Statics.java + 2919174619b ./libjava/testsuite/libjava.compile/SuperConstr.java 3221090904b ./libjava/testsuite/libjava.compile/support/Case.java 1796854903b ./libjava/testsuite/libjava.compile/support/PR129_A.java 4294110747b ./libjava/testsuite/libjava.compile/support/PR206_A.java 3604033893b ./libjava/testsuite/libjava.compile/support/PR207_A.java 3847332882b ./libjava/testsuite/libjava.compile/support/Waldo.java + 2226206425b ./libjava/testsuite/libjava.compile/T20020529.java + 1661935898b ./libjava/testsuite/libjava.compile/T20020604.java + 4243896875b ./libjava/testsuite/libjava.compile/Twice.java 1618780916b ./libjava/testsuite/libjava.compile/uesc.java 1927457704b ./libjava/testsuite/libjava.compile/uesc.xfail 650583552b ./libjava/testsuite/libjava.compile/weirddecl.java 2802394982b ./libjava/testsuite/libjava.compile/weirddecl.xfail ! 328754321b ./libjava/testsuite/libjava.compile/Where.java ! 20838332b ./libjava/testsuite/libjava.compile/Where.xfail ! 4003272220b ./libjava/testsuite/libjava.compile/XercesBug.java ! 2065520158b ./libjava/testsuite/libjava.compile/zeroexp.java ! 2283325765b ./libjava/testsuite/libjava.jacks/jacks.exp ! 3618791515b ./libjava/testsuite/libjava.jacks/jacks.xfail ! 1422278949b ./libjava/testsuite/libjava.jni/calls.c ! 706093238b ./libjava/testsuite/libjava.jni/calls.java 2319994314b ./libjava/testsuite/libjava.jni/calls.out 3258253370b ./libjava/testsuite/libjava.jni/cxxtest.cc 3556355428b ./libjava/testsuite/libjava.jni/cxxtest.java 1591540413b ./libjava/testsuite/libjava.jni/cxxtest.out ! 3339388097b ./libjava/testsuite/libjava.jni/field.c 2827280571b ./libjava/testsuite/libjava.jni/field.java 1591540413b ./libjava/testsuite/libjava.jni/field.out ! 616155173b ./libjava/testsuite/libjava.jni/final_method.c 744642976b ./libjava/testsuite/libjava.jni/final_method.java 4113024295b ./libjava/testsuite/libjava.jni/final_method.out ! 2248822053b ./libjava/testsuite/libjava.jni/findclass.c 1104414750b ./libjava/testsuite/libjava.jni/findclass.java 2209130481b ./libjava/testsuite/libjava.jni/findclass.out ! 290458146b ./libjava/testsuite/libjava.jni/invoke.c 259614484b ./libjava/testsuite/libjava.jni/invoke.java 2175620992b ./libjava/testsuite/libjava.jni/invoke.out ! 1035193127b ./libjava/testsuite/libjava.jni/jni.exp ! 69938174b ./libjava/testsuite/libjava.jni/martin.c 1311631215b ./libjava/testsuite/libjava.jni/martin.java 3887683434b ./libjava/testsuite/libjava.jni/martin.out ! 3688050699b ./libjava/testsuite/libjava.jni/noclass.c 32928721b ./libjava/testsuite/libjava.jni/noclass.java 497334114b ./libjava/testsuite/libjava.jni/noclass.out ! 2127668646b ./libjava/testsuite/libjava.jni/overload.c 961228127b ./libjava/testsuite/libjava.jni/overload.java 2399516383b ./libjava/testsuite/libjava.jni/overload.out ! 3427368473b ./libjava/testsuite/libjava.jni/register.c 4203322028b ./libjava/testsuite/libjava.jni/register.java 871340861b ./libjava/testsuite/libjava.jni/register.out ! 475210260b ./libjava/testsuite/libjava.jni/simple_int.c 555115153b ./libjava/testsuite/libjava.jni/simple_int.java 1242895306b ./libjava/testsuite/libjava.jni/simple_int.out ! 1132242870b ./libjava/testsuite/libjava.jni/throwit.c 2321406220b ./libjava/testsuite/libjava.jni/throwit.java 3149777050b ./libjava/testsuite/libjava.jni/throwit.out ! 1912520937b ./libjava/testsuite/libjava.jni/virtual.c 1112271683b ./libjava/testsuite/libjava.jni/virtual.java 3956933800b ./libjava/testsuite/libjava.jni/virtual.out 68731963b ./libjava/testsuite/libjava.lang/anfi.java 1280347506b ./libjava/testsuite/libjava.lang/anfi.out 3232612065b ./libjava/testsuite/libjava.lang/anon2.java 119345088b ./libjava/testsuite/libjava.lang/anon2.out 1843983227b ./libjava/testsuite/libjava.lang/anon3.java 4270138359b ./libjava/testsuite/libjava.lang/anon3.out 507421585b ./libjava/testsuite/libjava.lang/anon4.java 1106138275b ./libjava/testsuite/libjava.lang/anon4.out 3443545975b ./libjava/testsuite/libjava.lang/anonarray2.java 2382672912b ./libjava/testsuite/libjava.lang/anonarray2.out 3491730776b ./libjava/testsuite/libjava.lang/anonarray3.java 1685542540b ./libjava/testsuite/libjava.lang/anonarray3.out + 1808791407b ./libjava/testsuite/libjava.lang/anonarray.java + 2382672912b ./libjava/testsuite/libjava.lang/anonarray.out + 112674158b ./libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java + 3114021423b ./libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out + 4123776590b ./libjava/testsuite/libjava.lang/anon.java + 2668540913b ./libjava/testsuite/libjava.lang/anon.out + 861880957b ./libjava/testsuite/libjava.lang/Array_1.java + 882278996b ./libjava/testsuite/libjava.lang/Array_1.out + 1251637952b ./libjava/testsuite/libjava.lang/Array_2.java + 684357305b ./libjava/testsuite/libjava.lang/Array_2.out + 2813917809b ./libjava/testsuite/libjava.lang/Array_3.java + 4294967295b ./libjava/testsuite/libjava.lang/Array_3.out + 4266220724b ./libjava/testsuite/libjava.lang/ArrayStore2.java + 2092431633b ./libjava/testsuite/libjava.lang/ArrayStore2.out + 4156356334b ./libjava/testsuite/libjava.lang/ArrayStore2.xfail + 2027810547b ./libjava/testsuite/libjava.lang/ArrayStore.java + 1436845427b ./libjava/testsuite/libjava.lang/ArrayStore.out + 300949552b ./libjava/testsuite/libjava.lang/ArrayStore.xfail + 2901641847b ./libjava/testsuite/libjava.lang/assign.java + 4294967295b ./libjava/testsuite/libjava.lang/assign.out + 3857779796b ./libjava/testsuite/libjava.lang/Class_1.java + 2350753667b ./libjava/testsuite/libjava.lang/Class_1.out 2546101232b ./libjava/testsuite/libjava.lang/direct_read.java 2764570783b ./libjava/testsuite/libjava.lang/direct_read.out 941796535b ./libjava/testsuite/libjava.lang/direct_write.java 975119945b ./libjava/testsuite/libjava.lang/direct_write.out ! 101283440b ./libjava/testsuite/libjava.lang/Divide_1.java ! 1217781165b ./libjava/testsuite/libjava.lang/Divide_1.out ! 3876547816b ./libjava/testsuite/libjava.lang/emptystring.java ! 2346852551b ./libjava/testsuite/libjava.lang/emptystring.out 215085604b ./libjava/testsuite/libjava.lang/err10.java 2283836352b ./libjava/testsuite/libjava.lang/err10.out 1346535668b ./libjava/testsuite/libjava.lang/err11.java *************** *** 13407,13412 **** --- 14469,14476 ---- 2283836352b ./libjava/testsuite/libjava.lang/err12.out 1986676622b ./libjava/testsuite/libjava.lang/err13.java 2283836352b ./libjava/testsuite/libjava.lang/err13.out + 4201705759b ./libjava/testsuite/libjava.lang/err1.java + 2283836352b ./libjava/testsuite/libjava.lang/err1.out 616366908b ./libjava/testsuite/libjava.lang/err2.java 2283836352b ./libjava/testsuite/libjava.lang/err2.out 826646394b ./libjava/testsuite/libjava.lang/err3.java *************** *** 13423,13440 **** --- 14487,14532 ---- 2283836352b ./libjava/testsuite/libjava.lang/err8.out 1031956187b ./libjava/testsuite/libjava.lang/err9.java 2283836352b ./libjava/testsuite/libjava.lang/err9.out + 511367726b ./libjava/testsuite/libjava.lang/EvaluationOrder.java + 3687043723b ./libjava/testsuite/libjava.lang/EvaluationOrder.out + 3723805515b ./libjava/testsuite/libjava.lang/FileHandleGcTest.java + 4294967295b ./libjava/testsuite/libjava.lang/FileHandleGcTest.out 595443392b ./libjava/testsuite/libjava.lang/final_inner.java 269314928b ./libjava/testsuite/libjava.lang/final_inner.out 2193071619b ./libjava/testsuite/libjava.lang/final_int.java 238725689b ./libjava/testsuite/libjava.lang/final_int.out + 1007761145b ./libjava/testsuite/libjava.lang/Final.java + 1431193732b ./libjava/testsuite/libjava.lang/Final.out 3093949935b ./libjava/testsuite/libjava.lang/final_static_and_friend.java 3219318744b ./libjava/testsuite/libjava.lang/final_static_and_friend.out + 4214563461b ./libjava/testsuite/libjava.lang/Float_1.java + 151908695b ./libjava/testsuite/libjava.lang/Float_1.out + 4211438566b ./libjava/testsuite/libjava.lang/G19990301_01.java + 461683115b ./libjava/testsuite/libjava.lang/G19990301_01.out + 33515568b ./libjava/testsuite/libjava.lang/G19990302_02.java + 4126570333b ./libjava/testsuite/libjava.lang/G19990302_02.out + 1577075294b ./libjava/testsuite/libjava.lang/G19990303_01.java + 3694902336b ./libjava/testsuite/libjava.lang/G19990303_01.out + 3568552442b ./libjava/testsuite/libjava.lang/G19990303_02.java + 3718849348b ./libjava/testsuite/libjava.lang/G19990303_02.out + 690728310b ./libjava/testsuite/libjava.lang/G19990304_01.java + 2163223985b ./libjava/testsuite/libjava.lang/G19990304_01.out + 309057909b ./libjava/testsuite/libjava.lang/G19990310_01.java + 3818873941b ./libjava/testsuite/libjava.lang/G19990310_01.out + 3927692588b ./libjava/testsuite/libjava.lang/II.java + 324202418b ./libjava/testsuite/libjava.lang/II.out 2525179149b ./libjava/testsuite/libjava.lang/indirect.java 904878278b ./libjava/testsuite/libjava.lang/indirect.out 2201837161b ./libjava/testsuite/libjava.lang/indirect_read.java 3331949298b ./libjava/testsuite/libjava.lang/indirect_read.out 3857018296b ./libjava/testsuite/libjava.lang/indirect_write.java 1875502579b ./libjava/testsuite/libjava.lang/indirect_write.out + 4159410669b ./libjava/testsuite/libjava.lang/initexc.java + 4294967295b ./libjava/testsuite/libjava.lang/initexc.out + 469857471b ./libjava/testsuite/libjava.lang/initfield.java + 3043318155b ./libjava/testsuite/libjava.lang/initfield.out + 447720604b ./libjava/testsuite/libjava.lang/inline.java + 2016664308b ./libjava/testsuite/libjava.lang/inline.out 1492610043b ./libjava/testsuite/libjava.lang/inner1.java 3510182188b ./libjava/testsuite/libjava.lang/inner1.out 952566991b ./libjava/testsuite/libjava.lang/inner2.java *************** *** 13449,13483 **** 1716749990b ./libjava/testsuite/libjava.lang/inner_interface.out 1867695741b ./libjava/testsuite/libjava.lang/instance.java 1690435817b ./libjava/testsuite/libjava.lang/instance.out - 1279201771b ./libjava/testsuite/libjava.lang/instinit.java - 2984417841b ./libjava/testsuite/libjava.lang/instinit.out 260121539b ./libjava/testsuite/libjava.lang/instinit2.java 2177795989b ./libjava/testsuite/libjava.lang/instinit2.out 4259046923b ./libjava/testsuite/libjava.lang/invoke_from_inner.java 297330900b ./libjava/testsuite/libjava.lang/invoke_from_inner.out 4188659518b ./libjava/testsuite/libjava.lang/invokethrow.java 191230813b ./libjava/testsuite/libjava.lang/invokethrow.out 1729910187b ./libjava/testsuite/libjava.lang/klass.java 1591540413b ./libjava/testsuite/libjava.lang/klass.out ! 2546673117b ./libjava/testsuite/libjava.lang/lang.exp 2891997855b ./libjava/testsuite/libjava.lang/multiple_finit.java 3652598231b ./libjava/testsuite/libjava.lang/multiple_finit.out 1347891809b ./libjava/testsuite/libjava.lang/negzero.java 2849607288b ./libjava/testsuite/libjava.lang/negzero.out 1199013303b ./libjava/testsuite/libjava.lang/nested_with_ctor.java 4279847335b ./libjava/testsuite/libjava.lang/nested_with_ctor.out 3956035919b ./libjava/testsuite/libjava.lang/pr100.java 706901580b ./libjava/testsuite/libjava.lang/pr100.xpo 424134208b ./libjava/testsuite/libjava.lang/pr109.java 4059478477b ./libjava/testsuite/libjava.lang/pr109.out 1039260224b ./libjava/testsuite/libjava.lang/pr133.java 3434991606b ./libjava/testsuite/libjava.lang/pr133.out 3102718266b ./libjava/testsuite/libjava.lang/pr179.java 3022277835b ./libjava/testsuite/libjava.lang/pr179.out 2924279369b ./libjava/testsuite/libjava.lang/pr184.java 4039517750b ./libjava/testsuite/libjava.lang/pr184.out 832973302b ./libjava/testsuite/libjava.lang/pr83.java 987139956b ./libjava/testsuite/libjava.lang/pr83.out 1555339199b ./libjava/testsuite/libjava.lang/private_direct_read.java 2096756880b ./libjava/testsuite/libjava.lang/private_direct_read.out 901884110b ./libjava/testsuite/libjava.lang/private_direct_write.java --- 14541,14642 ---- 1716749990b ./libjava/testsuite/libjava.lang/inner_interface.out 1867695741b ./libjava/testsuite/libjava.lang/instance.java 1690435817b ./libjava/testsuite/libjava.lang/instance.out 260121539b ./libjava/testsuite/libjava.lang/instinit2.java 2177795989b ./libjava/testsuite/libjava.lang/instinit2.out + 1279201771b ./libjava/testsuite/libjava.lang/instinit.java + 2984417841b ./libjava/testsuite/libjava.lang/instinit.out + 2590078423b ./libjava/testsuite/libjava.lang/InterfaceDispatch.java + 3002596040b ./libjava/testsuite/libjava.lang/InterfaceDispatch.out + 2975542902b ./libjava/testsuite/libjava.lang/Invoke_1.java + 636088706b ./libjava/testsuite/libjava.lang/Invoke_1.out + 482546829b ./libjava/testsuite/libjava.lang/Invoke_2.java + 1406708247b ./libjava/testsuite/libjava.lang/Invoke_2.out 4259046923b ./libjava/testsuite/libjava.lang/invoke_from_inner.java 297330900b ./libjava/testsuite/libjava.lang/invoke_from_inner.out + 1233424497b ./libjava/testsuite/libjava.lang/InvokeReturn.java + 1505249822b ./libjava/testsuite/libjava.lang/InvokeReturn.out 4188659518b ./libjava/testsuite/libjava.lang/invokethrow.java 191230813b ./libjava/testsuite/libjava.lang/invokethrow.out + 897141912b ./libjava/testsuite/libjava.lang/KeepInline.java + 3068566825b ./libjava/testsuite/libjava.lang/KeepInline.out 1729910187b ./libjava/testsuite/libjava.lang/klass.java 1591540413b ./libjava/testsuite/libjava.lang/klass.out ! 2205709303b ./libjava/testsuite/libjava.lang/lang.exp ! 1339868029b ./libjava/testsuite/libjava.lang/Matrix4f.java ! 2870485448b ./libjava/testsuite/libjava.lang/Matrix4f.out 2891997855b ./libjava/testsuite/libjava.lang/multiple_finit.java 3652598231b ./libjava/testsuite/libjava.lang/multiple_finit.out + 3824357332b ./libjava/testsuite/libjava.lang/N19990310_02.java + 2283836352b ./libjava/testsuite/libjava.lang/N19990310_02.out + 792408510b ./libjava/testsuite/libjava.lang/N19990310_3.java + 2283836352b ./libjava/testsuite/libjava.lang/N19990310_3.out + 1646449121b ./libjava/testsuite/libjava.lang/N19990310_4.java + 2283836352b ./libjava/testsuite/libjava.lang/N19990310_4.out + 1522131980b ./libjava/testsuite/libjava.lang/N19990310_5.java + 2283836352b ./libjava/testsuite/libjava.lang/N19990310_5.out 1347891809b ./libjava/testsuite/libjava.lang/negzero.java 2849607288b ./libjava/testsuite/libjava.lang/negzero.out 1199013303b ./libjava/testsuite/libjava.lang/nested_with_ctor.java 4279847335b ./libjava/testsuite/libjava.lang/nested_with_ctor.out + 1633723662b ./libjava/testsuite/libjava.lang/override.java + 1678501004b ./libjava/testsuite/libjava.lang/override.out 3956035919b ./libjava/testsuite/libjava.lang/pr100.java 706901580b ./libjava/testsuite/libjava.lang/pr100.xpo 424134208b ./libjava/testsuite/libjava.lang/pr109.java 4059478477b ./libjava/testsuite/libjava.lang/pr109.out 1039260224b ./libjava/testsuite/libjava.lang/pr133.java 3434991606b ./libjava/testsuite/libjava.lang/pr133.out + 4106708340b ./libjava/testsuite/libjava.lang/PR141.java + 417890381b ./libjava/testsuite/libjava.lang/PR141.out + 924969358b ./libjava/testsuite/libjava.lang/PR160.java + 636088706b ./libjava/testsuite/libjava.lang/PR160.out + 710573971b ./libjava/testsuite/libjava.lang/PR162.java + 3491850227b ./libjava/testsuite/libjava.lang/PR162.out 3102718266b ./libjava/testsuite/libjava.lang/pr179.java 3022277835b ./libjava/testsuite/libjava.lang/pr179.out 2924279369b ./libjava/testsuite/libjava.lang/pr184.java 4039517750b ./libjava/testsuite/libjava.lang/pr184.out + 4227723795b ./libjava/testsuite/libjava.lang/PR218.java + 4039517750b ./libjava/testsuite/libjava.lang/PR218.out + 1329261743b ./libjava/testsuite/libjava.lang/PR242.java + 1147234566b ./libjava/testsuite/libjava.lang/PR242.out + 526707998b ./libjava/testsuite/libjava.lang/PR260.java + 3569591772b ./libjava/testsuite/libjava.lang/PR260.out + 14665884b ./libjava/testsuite/libjava.lang/PR3096.java + 2259565565b ./libjava/testsuite/libjava.lang/PR3096.out + 2985138501b ./libjava/testsuite/libjava.lang/PR3731.java + 3956933800b ./libjava/testsuite/libjava.lang/PR3731.out + 2570001649b ./libjava/testsuite/libjava.lang/PR5057_2.java + 742353047b ./libjava/testsuite/libjava.lang/PR5057_2.out + 2537530668b ./libjava/testsuite/libjava.lang/PR5057.java + 742353047b ./libjava/testsuite/libjava.lang/PR5057.out + 1438756381b ./libjava/testsuite/libjava.lang/PR55.java + 1201518198b ./libjava/testsuite/libjava.lang/PR55.out + 1733338993b ./libjava/testsuite/libjava.lang/PR56.java + 4294967295b ./libjava/testsuite/libjava.lang/PR56.out + 3042764517b ./libjava/testsuite/libjava.lang/PR6085.java + 3918401364b ./libjava/testsuite/libjava.lang/PR6085.out + 1382821704b ./libjava/testsuite/libjava.lang/PR6204.java + 3011727471b ./libjava/testsuite/libjava.lang/PR6204.out + 4120892206b ./libjava/testsuite/libjava.lang/pr6388.java + 3110601854b ./libjava/testsuite/libjava.lang/pr6388.out + 1407959591b ./libjava/testsuite/libjava.lang/PR6520.java + 596112227b ./libjava/testsuite/libjava.lang/PR6729.java + 3171855956b ./libjava/testsuite/libjava.lang/PR6729.out + 4154727428b ./libjava/testsuite/libjava.lang/PR6820.java + 2934438133b ./libjava/testsuite/libjava.lang/PR6820.out 832973302b ./libjava/testsuite/libjava.lang/pr83.java 987139956b ./libjava/testsuite/libjava.lang/pr83.out + 3251332277b ./libjava/testsuite/libjava.lang/pr8415.java + 1795978602b ./libjava/testsuite/libjava.lang/pr8415.out + 120512631b ./libjava/testsuite/libjava.lang/pr8676.java + 4294967295b ./libjava/testsuite/libjava.lang/pr8676.out + 1369554236b ./libjava/testsuite/libjava.lang/pr8823.java + 2196447778b ./libjava/testsuite/libjava.lang/pr8823.out + 563800791b ./libjava/testsuite/libjava.lang/pr8823.xfail + 3263485865b ./libjava/testsuite/libjava.lang/PR8866.java + 2818824147b ./libjava/testsuite/libjava.lang/pr8945.java + 2545623221b ./libjava/testsuite/libjava.lang/pr8945.out 1555339199b ./libjava/testsuite/libjava.lang/private_direct_read.java 2096756880b ./libjava/testsuite/libjava.lang/private_direct_read.out 901884110b ./libjava/testsuite/libjava.lang/private_direct_write.java *************** *** 13485,13556 **** 523758111b ./libjava/testsuite/libjava.lang/private_indirect_write.java 1147328248b ./libjava/testsuite/libjava.lang/search_outer.java 3994336194b ./libjava/testsuite/libjava.lang/search_outer.out 1863083995b ./libjava/testsuite/libjava.lang/stringconst.java 2835043487b ./libjava/testsuite/libjava.lang/stringconst.out 4156356334b ./libjava/testsuite/libjava.lang/stringconst.xfail - 1823338028b ./libjava/testsuite/libjava.lang/stringconst2.java - 2835043487b ./libjava/testsuite/libjava.lang/stringconst2.out 2261096902b ./libjava/testsuite/libjava.lang/stub.java 3886998802b ./libjava/testsuite/libjava.lang/stub.out 1655763772b ./libjava/testsuite/libjava.lang/test_long.java 3533371317b ./libjava/testsuite/libjava.lang/test_long.out 1531499305b ./libjava/testsuite/libjava.lang/tmi.java 1798035647b ./libjava/testsuite/libjava.lang/tmi.out 4123810669b ./libjava/testsuite/libjava.lang/tp.java 1040445301b ./libjava/testsuite/libjava.lang/tp.out 3674020949b ./libjava/testsuite/libjava.lang/update_outer.java 1947112134b ./libjava/testsuite/libjava.lang/update_outer.out 4013205125b ./libjava/testsuite/libjava.mauve/DejaGNUTestHarness.java ! 1740456441b ./libjava/testsuite/libjava.mauve/mauve.exp ! 2293687712b ./libjava/testsuite/libjava.mauve/xfails ! 3417667916b ./libjava/verify.cc ! 3459150705b ./libjava/win32-threads.cc ! 916359044b ./libjava/win32.cc ! 3049078639b ./libobjc/ChangeLog ! 3778683951b ./libobjc/Makefile.in ! 638422313b ./libobjc/NXConstStr.m ! 3285287551b ./libobjc/Object.m ! 3962273975b ./libobjc/Protocol.m ! 3823063152b ./libobjc/README ! 749035591b ./libobjc/README.threads ! 519687216b ./libobjc/THREADS ! 4055902911b ./libobjc/THREADS.MACH ! 478280180b ./libobjc/aclocal.m4 ! 605856870b ./libobjc/archive.c ! 3477231866b ./libobjc/class.c 1748737547b ./libobjc/config.h.in ! 3426291681b ./libobjc/configure ! 3168606688b ./libobjc/configure.in ! 506544385b ./libobjc/encoding.c ! 726164266b ./libobjc/gc.c ! 1761713542b ./libobjc/hash.c ! 1287123563b ./libobjc/init.c 489398123b ./libobjc/libobjc.def 4072125181b ./libobjc/libobjc_entry.c 4260228535b ./libobjc/linking.m 2398517524b ./libobjc/makefile.dos ! 687879051b ./libobjc/misc.c ! 1752870170b ./libobjc/nil_method.c 1937854528b ./libobjc/objc/NXConstStr.h - 1680445531b ./libobjc/objc/Object.h - 226797930b ./libobjc/objc/Protocol.h - 1692177559b ./libobjc/objc/encoding.h - 597415090b ./libobjc/objc/hash.h 1908906592b ./libobjc/objc/objc-api.h 1569406371b ./libobjc/objc/objc-list.h ! 2946018502b ./libobjc/objc/objc.h ! 1775267864b ./libobjc/objc/runtime.h 1609667340b ./libobjc/objc/sarray.h ! 2440049860b ./libobjc/objc/thr.h 2746948162b ./libobjc/objc/typedstream.h ! 2760949240b ./libobjc/objects.c ! 1415022174b ./libobjc/sarray.c ! 791617547b ./libobjc/selector.c ! 3257296953b ./libobjc/sendmsg.c 3414327023b ./libobjc/thr-dce.c 2193934747b ./libobjc/thr-decosf1.c 570456722b ./libobjc/thr-irix.c ! 1715842563b ./libobjc/thr-mach.c 1626852001b ./libobjc/thr-objc.c 2841374444b ./libobjc/thr-os2.c 1966484436b ./libobjc/thr-posix.c --- 14644,14783 ---- 523758111b ./libjava/testsuite/libjava.lang/private_indirect_write.java 1147328248b ./libjava/testsuite/libjava.lang/search_outer.java 3994336194b ./libjava/testsuite/libjava.lang/search_outer.out + 230260077b ./libjava/testsuite/libjava.lang/Shazam.java + 2140426616b ./libjava/testsuite/libjava.lang/Shazam.out + 1190085929b ./libjava/testsuite/libjava.lang/StaticConstructor.java + 2129179555b ./libjava/testsuite/libjava.lang/StaticConstructor.out + 3112946038b ./libjava/testsuite/libjava.lang/StringBuffer_1.java + 2481391305b ./libjava/testsuite/libjava.lang/StringBuffer_1.out + 1823338028b ./libjava/testsuite/libjava.lang/stringconst2.java + 2835043487b ./libjava/testsuite/libjava.lang/stringconst2.out 1863083995b ./libjava/testsuite/libjava.lang/stringconst.java 2835043487b ./libjava/testsuite/libjava.lang/stringconst.out 4156356334b ./libjava/testsuite/libjava.lang/stringconst.xfail 2261096902b ./libjava/testsuite/libjava.lang/stub.java 3886998802b ./libjava/testsuite/libjava.lang/stub.out + 1320018384b ./libjava/testsuite/libjava.lang/SyncGlobal.java + 2327269251b ./libjava/testsuite/libjava.lang/SyncGlobal.out + 3629333030b ./libjava/testsuite/libjava.lang/Synch.java + 497334114b ./libjava/testsuite/libjava.lang/Synch.out + 2731334240b ./libjava/testsuite/libjava.lang/SyncTest.java + 636088706b ./libjava/testsuite/libjava.lang/SyncTest.out + 2443605665b ./libjava/testsuite/libjava.lang/SyncTest.xfail 1655763772b ./libjava/testsuite/libjava.lang/test_long.java 3533371317b ./libjava/testsuite/libjava.lang/test_long.out + 1478180716b ./libjava/testsuite/libjava.lang/TestProxy.java + 2030707875b ./libjava/testsuite/libjava.lang/TestProxy.out + 523427206b ./libjava/testsuite/libjava.lang/Thread_Alive.java + 3591103454b ./libjava/testsuite/libjava.lang/Thread_Alive.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Alive.xfail + 1125974645b ./libjava/testsuite/libjava.lang/Thread_Interrupt.java + 2320601405b ./libjava/testsuite/libjava.lang/Thread_Interrupt.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Interrupt.xfail + 2682118636b ./libjava/testsuite/libjava.lang/Thread_Join.java + 2884008640b ./libjava/testsuite/libjava.lang/Thread_Join.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Join.xfail + 3992399686b ./libjava/testsuite/libjava.lang/Thread_Monitor.java + 636088706b ./libjava/testsuite/libjava.lang/Thread_Monitor.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Monitor.xfail + 3015472066b ./libjava/testsuite/libjava.lang/Thread_Sleep.java + 1299320686b ./libjava/testsuite/libjava.lang/Thread_Sleep.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Sleep.xfail + 2785867945b ./libjava/testsuite/libjava.lang/Thread_Wait_2.java + 3278714705b ./libjava/testsuite/libjava.lang/Thread_Wait_2.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Wait_2.xfail + 3412514508b ./libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.java + 3606244218b ./libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail + 3820325918b ./libjava/testsuite/libjava.lang/Thread_Wait.java + 3866441409b ./libjava/testsuite/libjava.lang/Thread_Wait.out + 2443605665b ./libjava/testsuite/libjava.lang/Thread_Wait.xfail + 1046451808b ./libjava/testsuite/libjava.lang/Throw_1.java + 4294967295b ./libjava/testsuite/libjava.lang/Throw_1.out + 3191152259b ./libjava/testsuite/libjava.lang/Throw_2.java + 2518583198b ./libjava/testsuite/libjava.lang/Throw_2.out + 1571608298b ./libjava/testsuite/libjava.lang/TLtest.java + 2677880801b ./libjava/testsuite/libjava.lang/TLtest.out + 2443605665b ./libjava/testsuite/libjava.lang/TLtest.xfail 1531499305b ./libjava/testsuite/libjava.lang/tmi.java 1798035647b ./libjava/testsuite/libjava.lang/tmi.out 4123810669b ./libjava/testsuite/libjava.lang/tp.java 1040445301b ./libjava/testsuite/libjava.lang/tp.out 3674020949b ./libjava/testsuite/libjava.lang/update_outer.java 1947112134b ./libjava/testsuite/libjava.lang/update_outer.out + 3462100417b ./libjava/testsuite/libjava.lang/utf8concat.java + 4294967295b ./libjava/testsuite/libjava.lang/utf8concat.out + 2756460652b ./libjava/testsuite/libjava.lang/utilTest.java + 3113392904b ./libjava/testsuite/libjava.lang/utilTest.out + 2040334255b ./libjava/testsuite/libjava.lang/verify.java + 4294967295b ./libjava/testsuite/libjava.lang/verify.out + 932272313b ./libjava/testsuite/libjava.loader/dummy.java + 3576323543b ./libjava/testsuite/libjava.loader/loader.exp + 4167021751b ./libjava/testsuite/libjava.loader/MyLoader.java + 2496412578b ./libjava/testsuite/libjava.loader/TestEarlyGC.java + 4294967295b ./libjava/testsuite/libjava.loader/TestEarlyGC.out + 1215164017b ./libjava/testsuite/libjava.loader/TestLeak.java + 4294967295b ./libjava/testsuite/libjava.loader/TestLeak.out + 3929316301b ./libjava/testsuite/libjava.loader/TestMultiple.java + 4294967295b ./libjava/testsuite/libjava.loader/TestMultiple.out + 1835588609b ./libjava/testsuite/libjava.loader/TestParent.java + 4294967295b ./libjava/testsuite/libjava.loader/TestParent.out 4013205125b ./libjava/testsuite/libjava.mauve/DejaGNUTestHarness.java ! 2966609441b ./libjava/testsuite/libjava.mauve/mauve.exp ! 3608340727b ./libjava/testsuite/libjava.mauve/xfails ! 2694003197b ./libjava/testsuite/lib/libjava.exp ! 41198457b ./libjava/testsuite/Makefile.am ! 813266623b ./libjava/testsuite/Makefile.in ! 3410290178b ./libjava/THANKS ! 2121899684b ./libjava/verify.cc ! 3481778046b ./libjava/win32.cc ! 295719627b ./libjava/win32-threads.cc ! 3981227345b ./libobjc/aclocal.m4 ! 2023635858b ./libobjc/archive.c ! 2283699490b ./libobjc/ChangeLog ! 1187612736b ./libobjc/class.c 1748737547b ./libobjc/config.h.in ! 3718287267b ./libobjc/configure ! 944229002b ./libobjc/configure.in ! 2269926719b ./libobjc/encoding.c ! 1957395429b ./libobjc/gc.c ! 1560131147b ./libobjc/hash.c ! 1131558168b ./libobjc/init.c 489398123b ./libobjc/libobjc.def 4072125181b ./libobjc/libobjc_entry.c 4260228535b ./libobjc/linking.m 2398517524b ./libobjc/makefile.dos ! 4293292598b ./libobjc/Makefile.in ! 2483567863b ./libobjc/misc.c ! 1914983354b ./libobjc/nil_method.c ! 638422313b ./libobjc/NXConstStr.m ! 2395655210b ./libobjc/objc/encoding.h ! 75862554b ./libobjc/objc/hash.h 1937854528b ./libobjc/objc/NXConstStr.h 1908906592b ./libobjc/objc/objc-api.h + 3381499646b ./libobjc/objc/objc.h 1569406371b ./libobjc/objc/objc-list.h ! 1680445531b ./libobjc/objc/Object.h ! 226797930b ./libobjc/objc/Protocol.h ! 2628563916b ./libobjc/objc/runtime.h 1609667340b ./libobjc/objc/sarray.h ! 1260149625b ./libobjc/objc/thr.h 2746948162b ./libobjc/objc/typedstream.h ! 3808242592b ./libobjc/Object.m ! 3301042811b ./libobjc/objects.c ! 1078942169b ./libobjc/Protocol.m ! 3823063152b ./libobjc/README ! 749035591b ./libobjc/README.threads ! 3053500919b ./libobjc/sarray.c ! 733243441b ./libobjc/selector.c ! 3114440466b ./libobjc/sendmsg.c ! 2758799845b ./libobjc/thr.c 3414327023b ./libobjc/thr-dce.c 2193934747b ./libobjc/thr-decosf1.c + 519687216b ./libobjc/THREADS + 4055902911b ./libobjc/THREADS.MACH 570456722b ./libobjc/thr-irix.c ! 2827034650b ./libobjc/thr-mach.c 1626852001b ./libobjc/thr-objc.c 2841374444b ./libobjc/thr-os2.c 1966484436b ./libobjc/thr-posix.c *************** *** 13560,13745 **** 60531382b ./libobjc/thr-solaris.c 2005277748b ./libobjc/thr-vxworks.c 2963027857b ./libobjc/thr-win32.c ! 3239202263b ./libobjc/thr.c ! 3164673878b ./libstdc++-v3/ChangeLog 1996982572b ./libstdc++-v3/ChangeLog-2000 3665233589b ./libstdc++-v3/ChangeLog-2001 - 3601994870b ./libstdc++-v3/Makefile.am - 3692255625b ./libstdc++-v3/Makefile.in - 201474883b ./libstdc++-v3/README - 4114737556b ./libstdc++-v3/acconfig.h - 1335999300b ./libstdc++-v3/acinclude.m4 - 1757393875b ./libstdc++-v3/aclocal.m4 - 1280750931b ./libstdc++-v3/config.h.in 4214408479b ./libstdc++-v3/config/abi/alphaev67-unknown-linux-gnu/baseline_symbols.txt 1077465800b ./libstdc++-v3/config/abi/extract_symvers 1049799838b ./libstdc++-v3/config/abi/i686-pc-linux-gnu/baseline_symbols.txt 3479696688b ./libstdc++-v3/config/abi/ia64-unknown-linux-gnu/baseline_symbols.txt ! 3799164404b ./libstdc++-v3/config/cpu/alpha/bits/atomicity.h ! 2657854614b ./libstdc++-v3/config/cpu/alpha/bits/cpu_limits.h ! 2453414067b ./libstdc++-v3/config/cpu/arm/bits/atomicity.h ! 1636456412b ./libstdc++-v3/config/cpu/cris/bits/atomicity.h ! 2029688870b ./libstdc++-v3/config/cpu/cris/bits/cpu_limits.h ! 3812954815b ./libstdc++-v3/config/cpu/generic/bits/atomicity.h ! 1315378737b ./libstdc++-v3/config/cpu/generic/bits/cpu_limits.h ! 1670735336b ./libstdc++-v3/config/cpu/generic/bits/limits.h ! 2485610863b ./libstdc++-v3/config/cpu/i386/bits/atomicity.h ! 593957722b ./libstdc++-v3/config/cpu/i386/bits/cpu_limits.h ! 623210587b ./libstdc++-v3/config/cpu/i486/bits/atomicity.h ! 193432505b ./libstdc++-v3/config/cpu/ia64/bits/atomicity.h ! 1770651251b ./libstdc++-v3/config/cpu/ia64/bits/cpu_limits.h ! 1265572143b ./libstdc++-v3/config/cpu/m68k/bits/atomicity.h ! 3967527574b ./libstdc++-v3/config/cpu/m68k/bits/cpu_limits.h ! 1806424498b ./libstdc++-v3/config/cpu/mips/bits/atomicity.h ! 736712600b ./libstdc++-v3/config/cpu/mmix/bits/cpu_limits.h ! 1062517327b ./libstdc++-v3/config/cpu/powerpc/bits/atomicity.h ! 1958944292b ./libstdc++-v3/config/cpu/powerpc/bits/cpu_limits.h ! 3930061484b ./libstdc++-v3/config/cpu/s390/bits/atomicity.h ! 2029688870b ./libstdc++-v3/config/cpu/s390/bits/cpu_limits.h ! 1984909614b ./libstdc++-v3/config/cpu/sparc/bits/atomicity.h ! 785222978b ./libstdc++-v3/config/cpu/x86-64/bits/atomicity.h ! 4180289496b ./libstdc++-v3/config/cpu/x86-64/bits/cpu_limits.h 1453199454b ./libstdc++-v3/config/io/basic_file_libio.cc 3157152478b ./libstdc++-v3/config/io/basic_file_libio.h ! 3725479456b ./libstdc++-v3/config/io/basic_file_stdio.cc ! 2615133940b ./libstdc++-v3/config/io/basic_file_stdio.h ! 1754405198b ./libstdc++-v3/config/io/c_io_libio.h 714808428b ./libstdc++-v3/config/io/c_io_libio_codecvt.c 3948747720b ./libstdc++-v3/config/io/c_io_stdio.h 1615839786b ./libstdc++-v3/config/linker-map.dummy ! 1840988863b ./libstdc++-v3/config/linker-map.gnu 3981697735b ./libstdc++-v3/config/locale/generic/c++locale_internal.h ! 1866975602b ./libstdc++-v3/config/locale/generic/c_locale.cc ! 1871355918b ./libstdc++-v3/config/locale/generic/c_locale.h ! 3717051883b ./libstdc++-v3/config/locale/generic/codecvt_members.cc 2005861251b ./libstdc++-v3/config/locale/generic/codecvt_specializations.h 4228611347b ./libstdc++-v3/config/locale/generic/collate_members.cc 1221593163b ./libstdc++-v3/config/locale/generic/ctype_members.cc 474184383b ./libstdc++-v3/config/locale/generic/messages_members.cc ! 1593852442b ./libstdc++-v3/config/locale/generic/messages_members.h 45184175b ./libstdc++-v3/config/locale/generic/monetary_members.cc 650933917b ./libstdc++-v3/config/locale/generic/numeric_members.cc 1292331022b ./libstdc++-v3/config/locale/generic/time_members.cc 4160660040b ./libstdc++-v3/config/locale/generic/time_members.h 490906006b ./libstdc++-v3/config/locale/gnu/c++locale_internal.h ! 1345884901b ./libstdc++-v3/config/locale/gnu/c_locale.cc ! 543017678b ./libstdc++-v3/config/locale/gnu/c_locale.h ! 2228791650b ./libstdc++-v3/config/locale/gnu/codecvt_members.cc ! 3958263092b ./libstdc++-v3/config/locale/gnu/collate_members.cc ! 1102464431b ./libstdc++-v3/config/locale/gnu/ctype_members.cc ! 4087381875b ./libstdc++-v3/config/locale/gnu/messages_members.cc 2781776822b ./libstdc++-v3/config/locale/gnu/messages_members.h ! 3100021465b ./libstdc++-v3/config/locale/gnu/monetary_members.cc ! 630744503b ./libstdc++-v3/config/locale/gnu/numeric_members.cc ! 2183208255b ./libstdc++-v3/config/locale/gnu/time_members.cc ! 3496359145b ./libstdc++-v3/config/locale/gnu/time_members.h 3232379868b ./libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.cc 3136594064b ./libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.h 2429580009b ./libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h 3823275112b ./libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.cc 488667815b ./libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.h ! 4256387970b ./libstdc++-v3/config/os/aix/bits/atomicity.h ! 2669974896b ./libstdc++-v3/config/os/aix/bits/ctype_base.h ! 3165823414b ./libstdc++-v3/config/os/aix/bits/ctype_inline.h ! 3499623117b ./libstdc++-v3/config/os/aix/bits/ctype_noninline.h ! 1501649315b ./libstdc++-v3/config/os/aix/bits/os_defines.h ! 537966674b ./libstdc++-v3/config/os/bsd/freebsd/bits/ctype_base.h ! 2331573625b ./libstdc++-v3/config/os/bsd/freebsd/bits/ctype_inline.h ! 1778189959b ./libstdc++-v3/config/os/bsd/freebsd/bits/ctype_noninline.h ! 4188452209b ./libstdc++-v3/config/os/bsd/freebsd/bits/os_defines.h ! 1041874990b ./libstdc++-v3/config/os/bsd/netbsd/bits/ctype_base.h ! 361863904b ./libstdc++-v3/config/os/bsd/netbsd/bits/ctype_inline.h ! 3997726502b ./libstdc++-v3/config/os/bsd/netbsd/bits/ctype_noninline.h ! 1602795831b ./libstdc++-v3/config/os/bsd/netbsd/bits/os_defines.h ! 3950885908b ./libstdc++-v3/config/os/djgpp/bits/ctype_base.h ! 4050668400b ./libstdc++-v3/config/os/djgpp/bits/ctype_inline.h ! 2200168434b ./libstdc++-v3/config/os/djgpp/bits/ctype_noninline.h ! 1128798661b ./libstdc++-v3/config/os/djgpp/bits/os_defines.h ! 1770894154b ./libstdc++-v3/config/os/generic/bits/ctype_base.h ! 913781161b ./libstdc++-v3/config/os/generic/bits/ctype_inline.h ! 2814302307b ./libstdc++-v3/config/os/generic/bits/ctype_noninline.h ! 2662031339b ./libstdc++-v3/config/os/generic/bits/os_defines.h ! 585502053b ./libstdc++-v3/config/os/gnu-linux/bits/ctype_base.h ! 577770049b ./libstdc++-v3/config/os/gnu-linux/bits/ctype_inline.h ! 382466980b ./libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h ! 1115301117b ./libstdc++-v3/config/os/gnu-linux/bits/os_defines.h ! 1503897878b ./libstdc++-v3/config/os/hpux/bits/cpu_limits.h ! 2727448261b ./libstdc++-v3/config/os/hpux/bits/ctype_base.h ! 521899911b ./libstdc++-v3/config/os/hpux/bits/ctype_inline.h ! 766270739b ./libstdc++-v3/config/os/hpux/bits/ctype_noninline.h ! 4256303940b ./libstdc++-v3/config/os/hpux/bits/os_defines.h ! 805235121b ./libstdc++-v3/config/os/irix/irix5.2/bits/atomicity.h ! 734403019b ./libstdc++-v3/config/os/irix/irix5.2/bits/ctype_base.h ! 2703839638b ./libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h ! 3142167642b ./libstdc++-v3/config/os/irix/irix5.2/bits/ctype_noninline.h ! 3024037761b ./libstdc++-v3/config/os/irix/irix5.2/bits/os_defines.h ! 1437354439b ./libstdc++-v3/config/os/irix/irix6.5/bits/atomicity.h ! 1682275129b ./libstdc++-v3/config/os/irix/irix6.5/bits/ctype_base.h ! 4093669771b ./libstdc++-v3/config/os/irix/irix6.5/bits/ctype_inline.h ! 1925322031b ./libstdc++-v3/config/os/irix/irix6.5/bits/ctype_noninline.h ! 4040974915b ./libstdc++-v3/config/os/irix/irix6.5/bits/os_defines.h ! 2513027003b ./libstdc++-v3/config/os/mingw32/bits/ctype_base.h ! 2249364639b ./libstdc++-v3/config/os/mingw32/bits/ctype_inline.h ! 4236896349b ./libstdc++-v3/config/os/mingw32/bits/ctype_noninline.h ! 3217385665b ./libstdc++-v3/config/os/mingw32/bits/os_defines.h ! 1435551091b ./libstdc++-v3/config/os/newlib/bits/ctype_base.h ! 4265751979b ./libstdc++-v3/config/os/newlib/bits/ctype_inline.h ! 3780859290b ./libstdc++-v3/config/os/newlib/bits/ctype_noninline.h ! 1247228618b ./libstdc++-v3/config/os/newlib/bits/os_defines.h ! 269230749b ./libstdc++-v3/config/os/osf/osf5.0/bits/cpu_limits.h ! 1980991936b ./libstdc++-v3/config/os/qnx/qnx6.1/bits/ctype_base.h ! 418495046b ./libstdc++-v3/config/os/qnx/qnx6.1/bits/ctype_inline.h ! 545913221b ./libstdc++-v3/config/os/qnx/qnx6.1/bits/ctype_noninline.h ! 263975258b ./libstdc++-v3/config/os/qnx/qnx6.1/bits/os_defines.h ! 4257366577b ./libstdc++-v3/config/os/solaris/solaris2.5/bits/ctype_base.h ! 967249986b ./libstdc++-v3/config/os/solaris/solaris2.5/bits/ctype_inline.h ! 2955367373b ./libstdc++-v3/config/os/solaris/solaris2.5/bits/ctype_noninline.h ! 167493702b ./libstdc++-v3/config/os/solaris/solaris2.5/bits/os_defines.h ! 1305011444b ./libstdc++-v3/config/os/solaris/solaris2.6/bits/ctype_base.h ! 404061893b ./libstdc++-v3/config/os/solaris/solaris2.6/bits/ctype_inline.h ! 3814698223b ./libstdc++-v3/config/os/solaris/solaris2.6/bits/ctype_noninline.h ! 1062247100b ./libstdc++-v3/config/os/solaris/solaris2.6/bits/os_defines.h ! 2023078243b ./libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_base.h ! 577770049b ./libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h ! 399834321b ./libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h ! 157883947b ./libstdc++-v3/config/os/solaris/solaris2.7/bits/os_defines.h ! 3647444520b ./libstdc++-v3/configure ! 3116040814b ./libstdc++-v3/configure.host ! 31792307b ./libstdc++-v3/configure.in ! 282761406b ./libstdc++-v3/configure.target ! 1637481960b ./libstdc++-v3/docs/doxygen/Intro.3 ! 2829674872b ./libstdc++-v3/docs/doxygen/TODO 1779001880b ./libstdc++-v3/docs/doxygen/doxygroups.cc ! 748681152b ./libstdc++-v3/docs/doxygen/mainpage.html ! 2755680348b ./libstdc++-v3/docs/doxygen/run_doxygen 1848847078b ./libstdc++-v3/docs/doxygen/stdheader.cc 1658879940b ./libstdc++-v3/docs/doxygen/style.css 4159982733b ./libstdc++-v3/docs/doxygen/tables.html ! 1655786274b ./libstdc++-v3/docs/doxygen/user.cfg.in 4001239912b ./libstdc++-v3/docs/html/17_intro/BADNAMES 985890621b ./libstdc++-v3/docs/html/17_intro/BUGS - 3201164177b ./libstdc++-v3/docs/html/17_intro/C++STYLE 2881598729b ./libstdc++-v3/docs/html/17_intro/CHECKLIST 2171125041b ./libstdc++-v3/docs/html/17_intro/COPYING 3922222294b ./libstdc++-v3/docs/html/17_intro/COPYING.DOC 3222542515b ./libstdc++-v3/docs/html/17_intro/DESIGN 1363011462b ./libstdc++-v3/docs/html/17_intro/HEADER_POLICY - 12001592b ./libstdc++-v3/docs/html/17_intro/PROBLEMS - 2519365120b ./libstdc++-v3/docs/html/17_intro/RELEASE-NOTES - 1434629529b ./libstdc++-v3/docs/html/17_intro/TODO - 3997884874b ./libstdc++-v3/docs/html/17_intro/concept_check.diff - 3442652972b ./libstdc++-v3/docs/html/17_intro/contribute.html 3461116413b ./libstdc++-v3/docs/html/17_intro/headers_cc.txt ! 2140830045b ./libstdc++-v3/docs/html/17_intro/howto.html 3565645043b ./libstdc++-v3/docs/html/17_intro/libstdc++-assign.txt 582177044b ./libstdc++-v3/docs/html/17_intro/license.html - 982764901b ./libstdc++-v3/docs/html/17_intro/organization 1322295551b ./libstdc++-v3/docs/html/17_intro/porting-howto.html 405521978b ./libstdc++-v3/docs/html/17_intro/porting-howto.xml ! 3117636407b ./libstdc++-v3/docs/html/17_intro/porting.html ! 2627448232b ./libstdc++-v3/docs/html/17_intro/porting.texi ! 3627393391b ./libstdc++-v3/docs/html/18_support/howto.html ! 2953954414b ./libstdc++-v3/docs/html/19_diagnostics/howto.html 2593370209b ./libstdc++-v3/docs/html/20_util/howto.html 2326263830b ./libstdc++-v3/docs/html/21_strings/gotw29a.txt 738456501b ./libstdc++-v3/docs/html/21_strings/howto.html --- 14787,14958 ---- 60531382b ./libobjc/thr-solaris.c 2005277748b ./libobjc/thr-vxworks.c 2963027857b ./libobjc/thr-win32.c ! 1476631381b ./libstdc++-v3/acconfig.h ! 248322858b ./libstdc++-v3/acinclude.m4 ! 3734648539b ./libstdc++-v3/aclocal.m4 ! 2553309420b ./libstdc++-v3/ChangeLog 1996982572b ./libstdc++-v3/ChangeLog-2000 3665233589b ./libstdc++-v3/ChangeLog-2001 4214408479b ./libstdc++-v3/config/abi/alphaev67-unknown-linux-gnu/baseline_symbols.txt 1077465800b ./libstdc++-v3/config/abi/extract_symvers + 4031151333b ./libstdc++-v3/config/abi/i386-unknown-freebsd4/baseline_symbols.txt 1049799838b ./libstdc++-v3/config/abi/i686-pc-linux-gnu/baseline_symbols.txt 3479696688b ./libstdc++-v3/config/abi/ia64-unknown-linux-gnu/baseline_symbols.txt ! 2187561085b ./libstdc++-v3/config/abi/x86_64-unknown-linux-gnu/baseline_symbols.txt ! 3799164404b ./libstdc++-v3/config/cpu/alpha/atomicity.h ! 1636456412b ./libstdc++-v3/config/cpu/cris/atomicity.h ! 3088308555b ./libstdc++-v3/config/cpu/generic/atomicity.h ! 264186165b ./libstdc++-v3/config/cpu/hppa/atomicity.h ! 901432167b ./libstdc++-v3/config/cpu/i386/atomicity.h ! 623210587b ./libstdc++-v3/config/cpu/i486/atomicity.h ! 193432505b ./libstdc++-v3/config/cpu/ia64/atomicity.h ! 1265572143b ./libstdc++-v3/config/cpu/m68k/atomicity.h ! 3409157594b ./libstdc++-v3/config/cpu/mips/atomicity.h ! 915792421b ./libstdc++-v3/config/cpu/powerpc/atomicity.h ! 3930061484b ./libstdc++-v3/config/cpu/s390/atomicity.h ! 1984909614b ./libstdc++-v3/config/cpu/sparc/atomicity.h ! 569844405b ./libstdc++-v3/config.h.in 1453199454b ./libstdc++-v3/config/io/basic_file_libio.cc 3157152478b ./libstdc++-v3/config/io/basic_file_libio.h ! 1104130345b ./libstdc++-v3/config/io/basic_file_stdio.cc ! 467422175b ./libstdc++-v3/config/io/basic_file_stdio.h 714808428b ./libstdc++-v3/config/io/c_io_libio_codecvt.c + 1754405198b ./libstdc++-v3/config/io/c_io_libio.h 3948747720b ./libstdc++-v3/config/io/c_io_stdio.h 1615839786b ./libstdc++-v3/config/linker-map.dummy ! 3861607433b ./libstdc++-v3/config/linker-map.gnu ! 1424668937b ./libstdc++-v3/config/locale/generic/c_locale.cc ! 3031721532b ./libstdc++-v3/config/locale/generic/c_locale.h 3981697735b ./libstdc++-v3/config/locale/generic/c++locale_internal.h ! 1369267090b ./libstdc++-v3/config/locale/generic/codecvt_members.cc 2005861251b ./libstdc++-v3/config/locale/generic/codecvt_specializations.h 4228611347b ./libstdc++-v3/config/locale/generic/collate_members.cc 1221593163b ./libstdc++-v3/config/locale/generic/ctype_members.cc 474184383b ./libstdc++-v3/config/locale/generic/messages_members.cc ! 177225482b ./libstdc++-v3/config/locale/generic/messages_members.h 45184175b ./libstdc++-v3/config/locale/generic/monetary_members.cc 650933917b ./libstdc++-v3/config/locale/generic/numeric_members.cc 1292331022b ./libstdc++-v3/config/locale/generic/time_members.cc 4160660040b ./libstdc++-v3/config/locale/generic/time_members.h + 3285574356b ./libstdc++-v3/config/locale/gnu/c_locale.cc + 3489573188b ./libstdc++-v3/config/locale/gnu/c_locale.h 490906006b ./libstdc++-v3/config/locale/gnu/c++locale_internal.h ! 2712762793b ./libstdc++-v3/config/locale/gnu/codecvt_members.cc ! 1792931968b ./libstdc++-v3/config/locale/gnu/collate_members.cc ! 2503295949b ./libstdc++-v3/config/locale/gnu/ctype_members.cc ! 440357314b ./libstdc++-v3/config/locale/gnu/messages_members.cc 2781776822b ./libstdc++-v3/config/locale/gnu/messages_members.h ! 875064597b ./libstdc++-v3/config/locale/gnu/monetary_members.cc ! 618801409b ./libstdc++-v3/config/locale/gnu/numeric_members.cc ! 3799603845b ./libstdc++-v3/config/locale/gnu/time_members.cc ! 2289591476b ./libstdc++-v3/config/locale/gnu/time_members.h 3232379868b ./libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.cc 3136594064b ./libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.h 2429580009b ./libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h 3823275112b ./libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.cc 488667815b ./libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.h ! 4256387970b ./libstdc++-v3/config/os/aix/atomicity.h ! 2669974896b ./libstdc++-v3/config/os/aix/ctype_base.h ! 3165823414b ./libstdc++-v3/config/os/aix/ctype_inline.h ! 1905924369b ./libstdc++-v3/config/os/aix/ctype_noninline.h ! 3604197906b ./libstdc++-v3/config/os/aix/os_defines.h ! 537966674b ./libstdc++-v3/config/os/bsd/freebsd/ctype_base.h ! 1541701773b ./libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h ! 1778189959b ./libstdc++-v3/config/os/bsd/freebsd/ctype_noninline.h ! 2534160914b ./libstdc++-v3/config/os/bsd/freebsd/os_defines.h ! 1041874990b ./libstdc++-v3/config/os/bsd/netbsd/ctype_base.h ! 361863904b ./libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h ! 3997726502b ./libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h ! 1602795831b ./libstdc++-v3/config/os/bsd/netbsd/os_defines.h ! 3950885908b ./libstdc++-v3/config/os/djgpp/ctype_base.h ! 4050668400b ./libstdc++-v3/config/os/djgpp/ctype_inline.h ! 2200168434b ./libstdc++-v3/config/os/djgpp/ctype_noninline.h ! 1128798661b ./libstdc++-v3/config/os/djgpp/os_defines.h ! 1770894154b ./libstdc++-v3/config/os/generic/ctype_base.h ! 2893983699b ./libstdc++-v3/config/os/generic/ctype_inline.h ! 2814302307b ./libstdc++-v3/config/os/generic/ctype_noninline.h ! 2662031339b ./libstdc++-v3/config/os/generic/os_defines.h ! 585502053b ./libstdc++-v3/config/os/gnu-linux/ctype_base.h ! 577770049b ./libstdc++-v3/config/os/gnu-linux/ctype_inline.h ! 382466980b ./libstdc++-v3/config/os/gnu-linux/ctype_noninline.h ! 2444346481b ./libstdc++-v3/config/os/gnu-linux/os_defines.h ! 2727448261b ./libstdc++-v3/config/os/hpux/ctype_base.h ! 577770049b ./libstdc++-v3/config/os/hpux/ctype_inline.h ! 3255050061b ./libstdc++-v3/config/os/hpux/ctype_noninline.h ! 3238421283b ./libstdc++-v3/config/os/hpux/os_defines.h ! 805235121b ./libstdc++-v3/config/os/irix/irix5.2/atomicity.h ! 734403019b ./libstdc++-v3/config/os/irix/irix5.2/ctype_base.h ! 2703839638b ./libstdc++-v3/config/os/irix/irix5.2/ctype_inline.h ! 3142167642b ./libstdc++-v3/config/os/irix/irix5.2/ctype_noninline.h ! 2885660318b ./libstdc++-v3/config/os/irix/irix5.2/os_defines.h ! 1437354439b ./libstdc++-v3/config/os/irix/irix6.5/atomicity.h ! 1682275129b ./libstdc++-v3/config/os/irix/irix6.5/ctype_base.h ! 4093669771b ./libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h ! 1925322031b ./libstdc++-v3/config/os/irix/irix6.5/ctype_noninline.h ! 4190387429b ./libstdc++-v3/config/os/irix/irix6.5/os_defines.h ! 2513027003b ./libstdc++-v3/config/os/mingw32/ctype_base.h ! 2249364639b ./libstdc++-v3/config/os/mingw32/ctype_inline.h ! 4236896349b ./libstdc++-v3/config/os/mingw32/ctype_noninline.h ! 3217385665b ./libstdc++-v3/config/os/mingw32/os_defines.h ! 1435551091b ./libstdc++-v3/config/os/newlib/ctype_base.h ! 4265751979b ./libstdc++-v3/config/os/newlib/ctype_inline.h ! 3780859290b ./libstdc++-v3/config/os/newlib/ctype_noninline.h ! 1247228618b ./libstdc++-v3/config/os/newlib/os_defines.h ! 1980991936b ./libstdc++-v3/config/os/qnx/qnx6.1/ctype_base.h ! 418495046b ./libstdc++-v3/config/os/qnx/qnx6.1/ctype_inline.h ! 545913221b ./libstdc++-v3/config/os/qnx/qnx6.1/ctype_noninline.h ! 263975258b ./libstdc++-v3/config/os/qnx/qnx6.1/os_defines.h ! 4257366577b ./libstdc++-v3/config/os/solaris/solaris2.5/ctype_base.h ! 967249986b ./libstdc++-v3/config/os/solaris/solaris2.5/ctype_inline.h ! 2955367373b ./libstdc++-v3/config/os/solaris/solaris2.5/ctype_noninline.h ! 167493702b ./libstdc++-v3/config/os/solaris/solaris2.5/os_defines.h ! 1305011444b ./libstdc++-v3/config/os/solaris/solaris2.6/ctype_base.h ! 404061893b ./libstdc++-v3/config/os/solaris/solaris2.6/ctype_inline.h ! 3814698223b ./libstdc++-v3/config/os/solaris/solaris2.6/ctype_noninline.h ! 1062247100b ./libstdc++-v3/config/os/solaris/solaris2.6/os_defines.h ! 2023078243b ./libstdc++-v3/config/os/solaris/solaris2.7/ctype_base.h ! 577770049b ./libstdc++-v3/config/os/solaris/solaris2.7/ctype_inline.h ! 399834321b ./libstdc++-v3/config/os/solaris/solaris2.7/ctype_noninline.h ! 95426010b ./libstdc++-v3/config/os/solaris/solaris2.7/os_defines.h ! 154939870b ./libstdc++-v3/config/os/windiss/ctype_base.h ! 3459761118b ./libstdc++-v3/config/os/windiss/ctype_inline.h ! 273313682b ./libstdc++-v3/config/os/windiss/ctype_noninline.h ! 2207004934b ./libstdc++-v3/config/os/windiss/os_defines.h ! 153460110b ./libstdc++-v3/configure ! 945000952b ./libstdc++-v3/configure.in ! 3631991851b ./libstdc++-v3/configure.target 1779001880b ./libstdc++-v3/docs/doxygen/doxygroups.cc ! 2885814097b ./libstdc++-v3/docs/doxygen/Intro.3 ! 970260889b ./libstdc++-v3/docs/doxygen/mainpage.html ! 771017295b ./libstdc++-v3/docs/doxygen/run_doxygen 1848847078b ./libstdc++-v3/docs/doxygen/stdheader.cc 1658879940b ./libstdc++-v3/docs/doxygen/style.css 4159982733b ./libstdc++-v3/docs/doxygen/tables.html ! 2181338291b ./libstdc++-v3/docs/doxygen/TODO ! 1597379317b ./libstdc++-v3/docs/doxygen/user.cfg.in 4001239912b ./libstdc++-v3/docs/html/17_intro/BADNAMES 985890621b ./libstdc++-v3/docs/html/17_intro/BUGS 2881598729b ./libstdc++-v3/docs/html/17_intro/CHECKLIST + 3997884874b ./libstdc++-v3/docs/html/17_intro/concept_check.diff + 3442652972b ./libstdc++-v3/docs/html/17_intro/contribute.html 2171125041b ./libstdc++-v3/docs/html/17_intro/COPYING 3922222294b ./libstdc++-v3/docs/html/17_intro/COPYING.DOC + 3201164177b ./libstdc++-v3/docs/html/17_intro/C++STYLE 3222542515b ./libstdc++-v3/docs/html/17_intro/DESIGN 1363011462b ./libstdc++-v3/docs/html/17_intro/HEADER_POLICY 3461116413b ./libstdc++-v3/docs/html/17_intro/headers_cc.txt ! 2909345151b ./libstdc++-v3/docs/html/17_intro/howto.html 3565645043b ./libstdc++-v3/docs/html/17_intro/libstdc++-assign.txt 582177044b ./libstdc++-v3/docs/html/17_intro/license.html 1322295551b ./libstdc++-v3/docs/html/17_intro/porting-howto.html 405521978b ./libstdc++-v3/docs/html/17_intro/porting-howto.xml ! 1377009950b ./libstdc++-v3/docs/html/17_intro/porting.html ! 2028272619b ./libstdc++-v3/docs/html/17_intro/porting.texi ! 12001592b ./libstdc++-v3/docs/html/17_intro/PROBLEMS ! 2519365120b ./libstdc++-v3/docs/html/17_intro/RELEASE-NOTES ! 1434629529b ./libstdc++-v3/docs/html/17_intro/TODO ! 942477833b ./libstdc++-v3/docs/html/18_support/howto.html ! 3047072579b ./libstdc++-v3/docs/html/19_diagnostics/howto.html 2593370209b ./libstdc++-v3/docs/html/20_util/howto.html 2326263830b ./libstdc++-v3/docs/html/21_strings/gotw29a.txt 738456501b ./libstdc++-v3/docs/html/21_strings/howto.html *************** *** 13757,13782 **** 859670355b ./libstdc++-v3/docs/html/26_numerics/howto.html 2452165260b ./libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt 3249620502b ./libstdc++-v3/docs/html/27_io/binary_iostreams_kuehl.txt ! 3688723454b ./libstdc++-v3/docs/html/27_io/howto.html ! 3528340567b ./libstdc++-v3/docs/html/Makefile 3224577239b ./libstdc++-v3/docs/html/abi.txt ! 3375980434b ./libstdc++-v3/docs/html/configopts.html ! 1240257832b ./libstdc++-v3/docs/html/debug.html ! 3656872165b ./libstdc++-v3/docs/html/documentation.html ! 67497914b ./libstdc++-v3/docs/html/explanations.html ! 1617484274b ./libstdc++-v3/docs/html/ext/howto.html 1205808203b ./libstdc++-v3/docs/html/ext/lwg-active.html 1419862998b ./libstdc++-v3/docs/html/ext/lwg-defects.html ! 3922863503b ./libstdc++-v3/docs/html/ext/sgiexts.html ! 1466200526b ./libstdc++-v3/docs/html/faq/index.html ! 389877678b ./libstdc++-v3/docs/html/faq/index.txt ! 1647630625b ./libstdc++-v3/docs/html/install.html 2049389478b ./libstdc++-v3/docs/html/lib3styles.css 1757651676b ./libstdc++-v3/docs/html/makedoc.awk ! 3558381021b ./libstdc++-v3/include/Makefile.am ! 3865059555b ./libstdc++-v3/include/Makefile.in ! 2730818532b ./libstdc++-v3/include/backward/algo.h 2473605692b ./libstdc++-v3/include/backward/algobase.h 4187232950b ./libstdc++-v3/include/backward/alloc.h 2505680659b ./libstdc++-v3/include/backward/backward_warning.h 1252063761b ./libstdc++-v3/include/backward/bvector.h --- 14970,14993 ---- 859670355b ./libstdc++-v3/docs/html/26_numerics/howto.html 2452165260b ./libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt 3249620502b ./libstdc++-v3/docs/html/27_io/binary_iostreams_kuehl.txt ! 3035695656b ./libstdc++-v3/docs/html/27_io/howto.html 3224577239b ./libstdc++-v3/docs/html/abi.txt ! 4274998541b ./libstdc++-v3/docs/html/configopts.html ! 3808579651b ./libstdc++-v3/docs/html/debug.html ! 1828300705b ./libstdc++-v3/docs/html/documentation.html ! 2914135593b ./libstdc++-v3/docs/html/explanations.html ! 2147640684b ./libstdc++-v3/docs/html/ext/howto.html 1205808203b ./libstdc++-v3/docs/html/ext/lwg-active.html 1419862998b ./libstdc++-v3/docs/html/ext/lwg-defects.html ! 3694800380b ./libstdc++-v3/docs/html/ext/sgiexts.html ! 2710542967b ./libstdc++-v3/docs/html/faq/index.html ! 3201436442b ./libstdc++-v3/docs/html/faq/index.txt ! 847317691b ./libstdc++-v3/docs/html/install.html 2049389478b ./libstdc++-v3/docs/html/lib3styles.css 1757651676b ./libstdc++-v3/docs/html/makedoc.awk ! 3528340567b ./libstdc++-v3/docs/html/Makefile 2473605692b ./libstdc++-v3/include/backward/algobase.h + 2730818532b ./libstdc++-v3/include/backward/algo.h 4187232950b ./libstdc++-v3/include/backward/alloc.h 2505680659b ./libstdc++-v3/include/backward/backward_warning.h 1252063761b ./libstdc++-v3/include/backward/bvector.h *************** *** 13805,13899 **** 2568486625b ./libstdc++-v3/include/backward/set.h 2372197114b ./libstdc++-v3/include/backward/slist.h 374939843b ./libstdc++-v3/include/backward/stack.h - 2367779603b ./libstdc++-v3/include/backward/stream.h 3825989730b ./libstdc++-v3/include/backward/streambuf.h 4047744617b ./libstdc++-v3/include/backward/strstream - 3139222786b ./libstdc++-v3/include/backward/strstream.h 2999216474b ./libstdc++-v3/include/backward/tempbuf.h 1420771511b ./libstdc++-v3/include/backward/tree.h 3803139445b ./libstdc++-v3/include/backward/vector.h ! 4104762506b ./libstdc++-v3/include/bits/basic_ios.h ! 613772707b ./libstdc++-v3/include/bits/basic_ios.tcc ! 1196444434b ./libstdc++-v3/include/bits/basic_string.h ! 3004074520b ./libstdc++-v3/include/bits/basic_string.tcc ! 179433314b ./libstdc++-v3/include/bits/boost_concept_check.h ! 1036368554b ./libstdc++-v3/include/bits/c++config ! 3498736544b ./libstdc++-v3/include/bits/char_traits.h ! 3672868066b ./libstdc++-v3/include/bits/codecvt.h ! 2442194789b ./libstdc++-v3/include/bits/concept_check.h 329719722b ./libstdc++-v3/include/bits/cpp_type_traits.h ! 1176672394b ./libstdc++-v3/include/bits/fpos.h ! 1776886078b ./libstdc++-v3/include/bits/fstream.tcc 3886600201b ./libstdc++-v3/include/bits/functexcept.h ! 3055891139b ./libstdc++-v3/include/bits/generic_shadow.h 1117238130b ./libstdc++-v3/include/bits/gslice.h ! 3512731163b ./libstdc++-v3/include/bits/gslice_array.h ! 3450716320b ./libstdc++-v3/include/bits/indirect_array.h ! 4268468129b ./libstdc++-v3/include/bits/ios_base.h ! 43945125b ./libstdc++-v3/include/bits/istream.tcc ! 1639901713b ./libstdc++-v3/include/bits/locale_facets.h ! 2875120428b ./libstdc++-v3/include/bits/locale_facets.tcc ! 2665867097b ./libstdc++-v3/include/bits/localefwd.h ! 1519677165b ./libstdc++-v3/include/bits/mask_array.h ! 2822101373b ./libstdc++-v3/include/bits/ostream.tcc 3592433582b ./libstdc++-v3/include/bits/pthread_allocimpl.h ! 3194205835b ./libstdc++-v3/include/bits/slice.h ! 1647096263b ./libstdc++-v3/include/bits/slice_array.h 3555571522b ./libstdc++-v3/include/bits/sstream.tcc - 1569010907b ./libstdc++-v3/include/bits/stl_algo.h 3316800061b ./libstdc++-v3/include/bits/stl_algobase.h ! 420479723b ./libstdc++-v3/include/bits/stl_alloc.h ! 1112043135b ./libstdc++-v3/include/bits/stl_bvector.h 3302543196b ./libstdc++-v3/include/bits/stl_construct.h ! 1156806073b ./libstdc++-v3/include/bits/stl_deque.h 297399515b ./libstdc++-v3/include/bits/stl_function.h 2464389940b ./libstdc++-v3/include/bits/stl_heap.h ! 2136979193b ./libstdc++-v3/include/bits/stl_iterator.h ! 2116609667b ./libstdc++-v3/include/bits/stl_iterator_base_funcs.h ! 2132265867b ./libstdc++-v3/include/bits/stl_iterator_base_types.h ! 684063649b ./libstdc++-v3/include/bits/stl_list.h ! 883579033b ./libstdc++-v3/include/bits/stl_map.h ! 567466793b ./libstdc++-v3/include/bits/stl_multimap.h 2343171452b ./libstdc++-v3/include/bits/stl_multiset.h 1738941440b ./libstdc++-v3/include/bits/stl_numeric.h 4071317909b ./libstdc++-v3/include/bits/stl_pair.h 369962606b ./libstdc++-v3/include/bits/stl_pthread_alloc.h ! 2900628572b ./libstdc++-v3/include/bits/stl_queue.h 2150554874b ./libstdc++-v3/include/bits/stl_raw_storage_iter.h 2630067228b ./libstdc++-v3/include/bits/stl_relops.h 114789971b ./libstdc++-v3/include/bits/stl_set.h ! 256518146b ./libstdc++-v3/include/bits/stl_stack.h 745396233b ./libstdc++-v3/include/bits/stl_tempbuf.h ! 3393061403b ./libstdc++-v3/include/bits/stl_threads.h ! 1753867163b ./libstdc++-v3/include/bits/stl_tree.h 1954571679b ./libstdc++-v3/include/bits/stl_uninitialized.h ! 1856687262b ./libstdc++-v3/include/bits/stl_vector.h 99981565b ./libstdc++-v3/include/bits/stream_iterator.h - 3082898899b ./libstdc++-v3/include/bits/streambuf.tcc - 466836896b ./libstdc++-v3/include/bits/streambuf_iterator.h 1373192946b ./libstdc++-v3/include/bits/stringfwd.h 1571290449b ./libstdc++-v3/include/bits/type_traits.h ! 3358963606b ./libstdc++-v3/include/bits/valarray_array.h 780098702b ./libstdc++-v3/include/bits/valarray_array.tcc ! 63020838b ./libstdc++-v3/include/bits/valarray_meta.h ! 4098574322b ./libstdc++-v3/include/c/std_cassert.h ! 1243273805b ./libstdc++-v3/include/c/std_cctype.h ! 4253759613b ./libstdc++-v3/include/c/std_cerrno.h ! 4090686127b ./libstdc++-v3/include/c/std_cfloat.h ! 1108468159b ./libstdc++-v3/include/c/std_ciso646.h ! 1957729161b ./libstdc++-v3/include/c/std_climits.h ! 2616677270b ./libstdc++-v3/include/c/std_clocale.h ! 3373490872b ./libstdc++-v3/include/c/std_cmath.h ! 2198093326b ./libstdc++-v3/include/c/std_csetjmp.h ! 3312976087b ./libstdc++-v3/include/c/std_csignal.h ! 1491351151b ./libstdc++-v3/include/c/std_cstdarg.h ! 969673189b ./libstdc++-v3/include/c/std_cstddef.h ! 3498882442b ./libstdc++-v3/include/c/std_cstdio.h ! 2143638095b ./libstdc++-v3/include/c/std_cstdlib.h ! 948151623b ./libstdc++-v3/include/c/std_cstring.h ! 641399722b ./libstdc++-v3/include/c/std_ctime.h ! 1161763336b ./libstdc++-v3/include/c/std_cwchar.h ! 446614233b ./libstdc++-v3/include/c/std_cwctype.h 174717104b ./libstdc++-v3/include/c_compatibility/assert.h 157601073b ./libstdc++-v3/include/c_compatibility/ctype.h 1205462529b ./libstdc++-v3/include/c_compatibility/errno.h --- 15016,15093 ---- 2568486625b ./libstdc++-v3/include/backward/set.h 2372197114b ./libstdc++-v3/include/backward/slist.h 374939843b ./libstdc++-v3/include/backward/stack.h 3825989730b ./libstdc++-v3/include/backward/streambuf.h + 2367779603b ./libstdc++-v3/include/backward/stream.h 4047744617b ./libstdc++-v3/include/backward/strstream 2999216474b ./libstdc++-v3/include/backward/tempbuf.h 1420771511b ./libstdc++-v3/include/backward/tree.h 3803139445b ./libstdc++-v3/include/backward/vector.h ! 4098873302b ./libstdc++-v3/include/bits/basic_ios.h ! 1002346927b ./libstdc++-v3/include/bits/basic_ios.tcc ! 3589760465b ./libstdc++-v3/include/bits/basic_string.h ! 925690662b ./libstdc++-v3/include/bits/basic_string.tcc ! 3126573300b ./libstdc++-v3/include/bits/boost_concept_check.h ! 2290387303b ./libstdc++-v3/include/bits/c++config ! 994369839b ./libstdc++-v3/include/bits/char_traits.h ! 694818237b ./libstdc++-v3/include/bits/codecvt.h ! 4105193573b ./libstdc++-v3/include/bits/concept_check.h 329719722b ./libstdc++-v3/include/bits/cpp_type_traits.h ! 2371882872b ./libstdc++-v3/include/bits/deque.tcc ! 489793863b ./libstdc++-v3/include/bits/fpos.h ! 1476997947b ./libstdc++-v3/include/bits/fstream.tcc 3886600201b ./libstdc++-v3/include/bits/functexcept.h ! 2533571042b ./libstdc++-v3/include/bits/gslice_array.h 1117238130b ./libstdc++-v3/include/bits/gslice.h ! 3095889165b ./libstdc++-v3/include/bits/indirect_array.h ! 1693685954b ./libstdc++-v3/include/bits/ios_base.h ! 2216112061b ./libstdc++-v3/include/bits/istream.tcc ! 3496463763b ./libstdc++-v3/include/bits/list.tcc ! 3441456866b ./libstdc++-v3/include/bits/locale_classes.h ! 3356988184b ./libstdc++-v3/include/bits/locale_facets.h ! 3937017658b ./libstdc++-v3/include/bits/locale_facets.tcc ! 3993915647b ./libstdc++-v3/include/bits/localefwd.h ! 1105005297b ./libstdc++-v3/include/bits/mask_array.h ! 2057229567b ./libstdc++-v3/include/bits/ostream.tcc 3592433582b ./libstdc++-v3/include/bits/pthread_allocimpl.h ! 3530846268b ./libstdc++-v3/include/bits/slice_array.h 3555571522b ./libstdc++-v3/include/bits/sstream.tcc 3316800061b ./libstdc++-v3/include/bits/stl_algobase.h ! 1569010907b ./libstdc++-v3/include/bits/stl_algo.h ! 2776455548b ./libstdc++-v3/include/bits/stl_alloc.h ! 840750803b ./libstdc++-v3/include/bits/stl_bvector.h 3302543196b ./libstdc++-v3/include/bits/stl_construct.h ! 2340261024b ./libstdc++-v3/include/bits/stl_deque.h 297399515b ./libstdc++-v3/include/bits/stl_function.h 2464389940b ./libstdc++-v3/include/bits/stl_heap.h ! 1904359658b ./libstdc++-v3/include/bits/stl_iterator_base_funcs.h ! 1450548210b ./libstdc++-v3/include/bits/stl_iterator_base_types.h ! 3497511782b ./libstdc++-v3/include/bits/stl_iterator.h ! 1475754507b ./libstdc++-v3/include/bits/stl_list.h ! 1933538770b ./libstdc++-v3/include/bits/stl_map.h ! 742036372b ./libstdc++-v3/include/bits/stl_multimap.h 2343171452b ./libstdc++-v3/include/bits/stl_multiset.h 1738941440b ./libstdc++-v3/include/bits/stl_numeric.h 4071317909b ./libstdc++-v3/include/bits/stl_pair.h 369962606b ./libstdc++-v3/include/bits/stl_pthread_alloc.h ! 3824509806b ./libstdc++-v3/include/bits/stl_queue.h 2150554874b ./libstdc++-v3/include/bits/stl_raw_storage_iter.h 2630067228b ./libstdc++-v3/include/bits/stl_relops.h 114789971b ./libstdc++-v3/include/bits/stl_set.h ! 458911618b ./libstdc++-v3/include/bits/stl_stack.h 745396233b ./libstdc++-v3/include/bits/stl_tempbuf.h ! 1207025674b ./libstdc++-v3/include/bits/stl_threads.h ! 119104515b ./libstdc++-v3/include/bits/stl_tree.h 1954571679b ./libstdc++-v3/include/bits/stl_uninitialized.h ! 6253542b ./libstdc++-v3/include/bits/stl_vector.h ! 4258920603b ./libstdc++-v3/include/bits/streambuf_iterator.h ! 2170621579b ./libstdc++-v3/include/bits/streambuf.tcc 99981565b ./libstdc++-v3/include/bits/stream_iterator.h 1373192946b ./libstdc++-v3/include/bits/stringfwd.h 1571290449b ./libstdc++-v3/include/bits/type_traits.h ! 338351241b ./libstdc++-v3/include/bits/valarray_array.h 780098702b ./libstdc++-v3/include/bits/valarray_array.tcc ! 430572417b ./libstdc++-v3/include/bits/valarray_meta.h ! 3741283544b ./libstdc++-v3/include/bits/vector.tcc 174717104b ./libstdc++-v3/include/c_compatibility/assert.h 157601073b ./libstdc++-v3/include/c_compatibility/ctype.h 1205462529b ./libstdc++-v3/include/c_compatibility/errno.h *************** *** 13912,13971 **** 1640882917b ./libstdc++-v3/include/c_compatibility/time.h 242317554b ./libstdc++-v3/include/c_compatibility/wchar.h 264438164b ./libstdc++-v3/include/c_compatibility/wctype.h ! 54766345b ./libstdc++-v3/include/c_shadow/assert.h ! 408320858b ./libstdc++-v3/include/c_shadow/bits/std_cassert.h ! 560228963b ./libstdc++-v3/include/c_shadow/bits/std_cctype.h ! 4211213130b ./libstdc++-v3/include/c_shadow/bits/std_cerrno.h ! 2068961496b ./libstdc++-v3/include/c_shadow/bits/std_cfloat.h ! 1221980595b ./libstdc++-v3/include/c_shadow/bits/std_climits.h ! 2373554238b ./libstdc++-v3/include/c_shadow/bits/std_clocale.h ! 2922108560b ./libstdc++-v3/include/c_shadow/bits/std_cmath.h ! 3399111523b ./libstdc++-v3/include/c_shadow/bits/std_csetjmp.h ! 2811346449b ./libstdc++-v3/include/c_shadow/bits/std_csignal.h ! 1849023164b ./libstdc++-v3/include/c_shadow/bits/std_cstdarg.h ! 1416432536b ./libstdc++-v3/include/c_shadow/bits/std_cstddef.h ! 603206410b ./libstdc++-v3/include/c_shadow/bits/std_cstdio.h ! 362076186b ./libstdc++-v3/include/c_shadow/bits/std_cstdlib.h ! 3229568541b ./libstdc++-v3/include/c_shadow/bits/std_cstring.h ! 3422048856b ./libstdc++-v3/include/c_shadow/bits/std_ctime.h ! 536419890b ./libstdc++-v3/include/c_shadow/bits/std_cwchar.h ! 1653117625b ./libstdc++-v3/include/c_shadow/bits/std_cwctype.h ! 329322306b ./libstdc++-v3/include/c_shadow/bits/wrap_fcntl.h ! 627501306b ./libstdc++-v3/include/c_shadow/bits/wrap_features.h ! 2049971348b ./libstdc++-v3/include/c_shadow/bits/wrap_iconv.h ! 3382563118b ./libstdc++-v3/include/c_shadow/bits/wrap_iolibio.h ! 2864679755b ./libstdc++-v3/include/c_shadow/bits/wrap_langinfo.h ! 2532894743b ./libstdc++-v3/include/c_shadow/bits/wrap_libio.h ! 2741006858b ./libstdc++-v3/include/c_shadow/bits/wrap_libioP.h ! 3095110387b ./libstdc++-v3/include/c_shadow/bits/wrap_pthread.h ! 3334462167b ./libstdc++-v3/include/c_shadow/bits/wrap_unistd.h ! 150067418b ./libstdc++-v3/include/c_shadow/ctype.h ! 3907725087b ./libstdc++-v3/include/c_shadow/errno.h ! 3350312907b ./libstdc++-v3/include/c_shadow/fcntl.h ! 2000598911b ./libstdc++-v3/include/c_shadow/features.h ! 3613357385b ./libstdc++-v3/include/c_shadow/float.h ! 2229010711b ./libstdc++-v3/include/c_shadow/iconv.h ! 587788318b ./libstdc++-v3/include/c_shadow/iolibio.h ! 1158236952b ./libstdc++-v3/include/c_shadow/langinfo.h ! 2010863678b ./libstdc++-v3/include/c_shadow/libio.h ! 34314066b ./libstdc++-v3/include/c_shadow/libioP.h ! 3248894685b ./libstdc++-v3/include/c_shadow/limits.h ! 2383653384b ./libstdc++-v3/include/c_shadow/locale.h ! 1611791486b ./libstdc++-v3/include/c_shadow/math.h ! 2578093016b ./libstdc++-v3/include/c_shadow/pthread.h ! 3850164351b ./libstdc++-v3/include/c_shadow/setjmp.h ! 4096900936b ./libstdc++-v3/include/c_shadow/signal.h ! 3742613068b ./libstdc++-v3/include/c_shadow/stdarg.h ! 1746566969b ./libstdc++-v3/include/c_shadow/stddef.h ! 3938753534b ./libstdc++-v3/include/c_shadow/stdio.h ! 4232198514b ./libstdc++-v3/include/c_shadow/stdlib.h ! 105073828b ./libstdc++-v3/include/c_shadow/string.h ! 2629001503b ./libstdc++-v3/include/c_shadow/sys/cdefs.h ! 3221974189b ./libstdc++-v3/include/c_shadow/time.h ! 3696004291b ./libstdc++-v3/include/c_shadow/unistd.h ! 3189910958b ./libstdc++-v3/include/c_shadow/wchar.h ! 887325795b ./libstdc++-v3/include/c_shadow/wctype.h 4087026299b ./libstdc++-v3/include/c_std/cmath.tcc 1055988818b ./libstdc++-v3/include/c_std/std_cassert.h 513093939b ./libstdc++-v3/include/c_std/std_cctype.h 2752122999b ./libstdc++-v3/include/c_std/std_cerrno.h --- 15106,15130 ---- 1640882917b ./libstdc++-v3/include/c_compatibility/time.h 242317554b ./libstdc++-v3/include/c_compatibility/wchar.h 264438164b ./libstdc++-v3/include/c_compatibility/wctype.h ! 4098574322b ./libstdc++-v3/include/c/std_cassert.h ! 1243273805b ./libstdc++-v3/include/c/std_cctype.h ! 4253759613b ./libstdc++-v3/include/c/std_cerrno.h ! 4090686127b ./libstdc++-v3/include/c/std_cfloat.h ! 1108468159b ./libstdc++-v3/include/c/std_ciso646.h ! 1957729161b ./libstdc++-v3/include/c/std_climits.h ! 2616677270b ./libstdc++-v3/include/c/std_clocale.h ! 3373490872b ./libstdc++-v3/include/c/std_cmath.h 4087026299b ./libstdc++-v3/include/c_std/cmath.tcc + 2198093326b ./libstdc++-v3/include/c/std_csetjmp.h + 3312976087b ./libstdc++-v3/include/c/std_csignal.h + 1491351151b ./libstdc++-v3/include/c/std_cstdarg.h + 969673189b ./libstdc++-v3/include/c/std_cstddef.h + 3498882442b ./libstdc++-v3/include/c/std_cstdio.h + 2143638095b ./libstdc++-v3/include/c/std_cstdlib.h + 948151623b ./libstdc++-v3/include/c/std_cstring.h + 641399722b ./libstdc++-v3/include/c/std_ctime.h + 1161763336b ./libstdc++-v3/include/c/std_cwchar.h + 446614233b ./libstdc++-v3/include/c/std_cwctype.h 1055988818b ./libstdc++-v3/include/c_std/std_cassert.h 513093939b ./libstdc++-v3/include/c_std/std_cctype.h 2752122999b ./libstdc++-v3/include/c_std/std_cerrno.h *************** *** 13973,13988 **** 1108468159b ./libstdc++-v3/include/c_std/std_ciso646.h 3552340376b ./libstdc++-v3/include/c_std/std_climits.h 3610469005b ./libstdc++-v3/include/c_std/std_clocale.h ! 298849884b ./libstdc++-v3/include/c_std/std_cmath.h 664446368b ./libstdc++-v3/include/c_std/std_csetjmp.h 1548436805b ./libstdc++-v3/include/c_std/std_csignal.h 2409940084b ./libstdc++-v3/include/c_std/std_cstdarg.h 2943077263b ./libstdc++-v3/include/c_std/std_cstddef.h ! 2516759904b ./libstdc++-v3/include/c_std/std_cstdio.h ! 1778106626b ./libstdc++-v3/include/c_std/std_cstdlib.h 3597700667b ./libstdc++-v3/include/c_std/std_cstring.h 1833374328b ./libstdc++-v3/include/c_std/std_ctime.h ! 855540198b ./libstdc++-v3/include/c_std/std_cwchar.h 3941323151b ./libstdc++-v3/include/c_std/std_cwctype.h 3317328074b ./libstdc++-v3/include/ext/algorithm 1641495854b ./libstdc++-v3/include/ext/enc_filebuf.h --- 15132,15147 ---- 1108468159b ./libstdc++-v3/include/c_std/std_ciso646.h 3552340376b ./libstdc++-v3/include/c_std/std_climits.h 3610469005b ./libstdc++-v3/include/c_std/std_clocale.h ! 3338621959b ./libstdc++-v3/include/c_std/std_cmath.h 664446368b ./libstdc++-v3/include/c_std/std_csetjmp.h 1548436805b ./libstdc++-v3/include/c_std/std_csignal.h 2409940084b ./libstdc++-v3/include/c_std/std_cstdarg.h 2943077263b ./libstdc++-v3/include/c_std/std_cstddef.h ! 4148454615b ./libstdc++-v3/include/c_std/std_cstdio.h ! 2404775940b ./libstdc++-v3/include/c_std/std_cstdlib.h 3597700667b ./libstdc++-v3/include/c_std/std_cstring.h 1833374328b ./libstdc++-v3/include/c_std/std_ctime.h ! 3311967865b ./libstdc++-v3/include/c_std/std_cwchar.h 3941323151b ./libstdc++-v3/include/c_std/std_cwctype.h 3317328074b ./libstdc++-v3/include/ext/algorithm 1641495854b ./libstdc++-v3/include/ext/enc_filebuf.h *************** *** 13996,14040 **** 177834210b ./libstdc++-v3/include/ext/rope 836293130b ./libstdc++-v3/include/ext/ropeimpl.h 4160164241b ./libstdc++-v3/include/ext/slist ! 580180377b ./libstdc++-v3/include/ext/stdio_filebuf.h 2805137138b ./libstdc++-v3/include/ext/stl_hash_fun.h ! 1833363198b ./libstdc++-v3/include/ext/stl_hashtable.h 984888269b ./libstdc++-v3/include/ext/stl_rope.h 4064711400b ./libstdc++-v3/include/std/std_algorithm.h ! 1636885247b ./libstdc++-v3/include/std/std_bitset.h ! 3412647990b ./libstdc++-v3/include/std/std_complex.h ! 1730455182b ./libstdc++-v3/include/std/std_deque.h ! 1610993124b ./libstdc++-v3/include/std/std_fstream.h 3174050204b ./libstdc++-v3/include/std/std_functional.h ! 2010625027b ./libstdc++-v3/include/std/std_iomanip.h 2056599714b ./libstdc++-v3/include/std/std_ios.h ! 1134808427b ./libstdc++-v3/include/std/std_iosfwd.h ! 2007291560b ./libstdc++-v3/include/std/std_iostream.h ! 270752150b ./libstdc++-v3/include/std/std_istream.h 3826418885b ./libstdc++-v3/include/std/std_iterator.h ! 2456685888b ./libstdc++-v3/include/std/std_limits.h ! 1509281666b ./libstdc++-v3/include/std/std_list.h ! 918488326b ./libstdc++-v3/include/std/std_locale.h 2375471353b ./libstdc++-v3/include/std/std_map.h ! 458060559b ./libstdc++-v3/include/std/std_memory.h 2200880623b ./libstdc++-v3/include/std/std_numeric.h ! 3467401292b ./libstdc++-v3/include/std/std_ostream.h ! 1570707417b ./libstdc++-v3/include/std/std_queue.h 2180214858b ./libstdc++-v3/include/std/std_set.h ! 2149174599b ./libstdc++-v3/include/std/std_sstream.h ! 1037640383b ./libstdc++-v3/include/std/std_stack.h 3429471837b ./libstdc++-v3/include/std/std_stdexcept.h ! 3726186323b ./libstdc++-v3/include/std/std_streambuf.h 1365091273b ./libstdc++-v3/include/std/std_string.h 4158492065b ./libstdc++-v3/include/std/std_utility.h ! 362016596b ./libstdc++-v3/include/std/std_valarray.h ! 125145631b ./libstdc++-v3/include/std/std_vector.h ! 4102282136b ./libstdc++-v3/libio/ChangeLog ! 226381804b ./libstdc++-v3/libio/Makefile.am ! 4199895907b ./libstdc++-v3/libio/Makefile.in ! 314955067b ./libstdc++-v3/libio/_G_config.h 2122576197b ./libstdc++-v3/libio/filedoalloc.c 3590060213b ./libstdc++-v3/libio/fileops.c 1488981607b ./libstdc++-v3/libio/genops.c 1308598865b ./libstdc++-v3/libio/iofclose.c 932932445b ./libstdc++-v3/libio/iofopen.c --- 15155,15199 ---- 177834210b ./libstdc++-v3/include/ext/rope 836293130b ./libstdc++-v3/include/ext/ropeimpl.h 4160164241b ./libstdc++-v3/include/ext/slist ! 3365122817b ./libstdc++-v3/include/ext/stdio_filebuf.h 2805137138b ./libstdc++-v3/include/ext/stl_hash_fun.h ! 3897129258b ./libstdc++-v3/include/ext/stl_hashtable.h 984888269b ./libstdc++-v3/include/ext/stl_rope.h + 261894093b ./libstdc++-v3/include/Makefile.am + 61602503b ./libstdc++-v3/include/Makefile.in 4064711400b ./libstdc++-v3/include/std/std_algorithm.h ! 3911856756b ./libstdc++-v3/include/std/std_bitset.h ! 1583194405b ./libstdc++-v3/include/std/std_complex.h ! 1297268887b ./libstdc++-v3/include/std/std_deque.h ! 1066440750b ./libstdc++-v3/include/std/std_fstream.h 3174050204b ./libstdc++-v3/include/std/std_functional.h ! 2685440839b ./libstdc++-v3/include/std/std_iomanip.h ! 585057502b ./libstdc++-v3/include/std/std_iosfwd.h 2056599714b ./libstdc++-v3/include/std/std_ios.h ! 2424855794b ./libstdc++-v3/include/std/std_iostream.h ! 1392065197b ./libstdc++-v3/include/std/std_istream.h 3826418885b ./libstdc++-v3/include/std/std_iterator.h ! 51496764b ./libstdc++-v3/include/std/std_limits.h ! 295346053b ./libstdc++-v3/include/std/std_list.h ! 2438271915b ./libstdc++-v3/include/std/std_locale.h 2375471353b ./libstdc++-v3/include/std/std_map.h ! 3316890792b ./libstdc++-v3/include/std/std_memory.h 2200880623b ./libstdc++-v3/include/std/std_numeric.h ! 1921136331b ./libstdc++-v3/include/std/std_ostream.h ! 3654172558b ./libstdc++-v3/include/std/std_queue.h 2180214858b ./libstdc++-v3/include/std/std_set.h ! 3083807553b ./libstdc++-v3/include/std/std_sstream.h ! 855058790b ./libstdc++-v3/include/std/std_stack.h 3429471837b ./libstdc++-v3/include/std/std_stdexcept.h ! 2039006963b ./libstdc++-v3/include/std/std_streambuf.h 1365091273b ./libstdc++-v3/include/std/std_string.h 4158492065b ./libstdc++-v3/include/std/std_utility.h ! 2660730597b ./libstdc++-v3/include/std/std_valarray.h ! 3713138538b ./libstdc++-v3/include/std/std_vector.h ! 2703339597b ./libstdc++-v3/libio/ChangeLog 2122576197b ./libstdc++-v3/libio/filedoalloc.c 3590060213b ./libstdc++-v3/libio/fileops.c + 314955067b ./libstdc++-v3/libio/_G_config.h 1488981607b ./libstdc++-v3/libio/genops.c 1308598865b ./libstdc++-v3/libio/iofclose.c 932932445b ./libstdc++-v3/libio/iofopen.c *************** *** 14042,14130 **** 3964237465b ./libstdc++-v3/libio/iolibio.h 4269898080b ./libstdc++-v3/libio/libio.h 276542374b ./libstdc++-v3/libio/libioP.h 13280908b ./libstdc++-v3/libio/stdfiles.c 2344987226b ./libstdc++-v3/libio/stdio.c 688559115b ./libstdc++-v3/libio/wfiledoalloc.c 871695306b ./libstdc++-v3/libio/wfileops.c 2568419733b ./libstdc++-v3/libio/wgenops.c - 3368788614b ./libstdc++-v3/libmath/Makefile.am - 439494187b ./libstdc++-v3/libmath/Makefile.in 4088285812b ./libstdc++-v3/libmath/copysignf.c 346371220b ./libstdc++-v3/libmath/mathconf.h 1759197966b ./libstdc++-v3/libmath/nan.c 1774241233b ./libstdc++-v3/libmath/signbit.c 3226432156b ./libstdc++-v3/libmath/signbitf.c 706230946b ./libstdc++-v3/libmath/signbitl.c 940829383b ./libstdc++-v3/libmath/stubs.c ! 2343038402b ./libstdc++-v3/libsupc++/Makefile.am ! 40568948b ./libstdc++-v3/libsupc++/Makefile.in ! 2871090365b ./libstdc++-v3/libsupc++/cxxabi.h 3887473586b ./libstdc++-v3/libsupc++/del_op.cc 2108254126b ./libstdc++-v3/libsupc++/del_opnt.cc 998297127b ./libstdc++-v3/libsupc++/del_opv.cc 958055369b ./libstdc++-v3/libsupc++/del_opvnt.cc 256210637b ./libstdc++-v3/libsupc++/eh_alloc.cc 1594858350b ./libstdc++-v3/libsupc++/eh_aux_runtime.cc ! 152242761b ./libstdc++-v3/libsupc++/eh_catch.cc 4215496070b ./libstdc++-v3/libsupc++/eh_exception.cc 1852005316b ./libstdc++-v3/libsupc++/eh_globals.cc ! 3605044656b ./libstdc++-v3/libsupc++/eh_personality.cc 192927225b ./libstdc++-v3/libsupc++/eh_terminate.cc ! 3767983751b ./libstdc++-v3/libsupc++/eh_throw.cc 3381460574b ./libstdc++-v3/libsupc++/eh_type.cc ! 1338501219b ./libstdc++-v3/libsupc++/exception 3453419455b ./libstdc++-v3/libsupc++/exception_defines.h ! 4225132204b ./libstdc++-v3/libsupc++/new 2545598190b ./libstdc++-v3/libsupc++/new_handler.cc 2558289852b ./libstdc++-v3/libsupc++/new_op.cc 1924050083b ./libstdc++-v3/libsupc++/new_opnt.cc 4286163592b ./libstdc++-v3/libsupc++/new_opv.cc 1153125428b ./libstdc++-v3/libsupc++/new_opvnt.cc 2851101423b ./libstdc++-v3/libsupc++/pure.cc - 1898763744b ./libstdc++-v3/libsupc++/tinfo.cc - 1192700122b ./libstdc++-v3/libsupc++/tinfo.h 4266179473b ./libstdc++-v3/libsupc++/tinfo2.cc ! 2283435214b ./libstdc++-v3/libsupc++/typeinfo ! 875479559b ./libstdc++-v3/libsupc++/unwind-cxx.h 712738859b ./libstdc++-v3/libsupc++/vec.cc ! 2396933860b ./libstdc++-v3/mkcheck.in ! 3790569303b ./libstdc++-v3/mkcshadow ! 805804711b ./libstdc++-v3/mkinclosure ! 2710223631b ./libstdc++-v3/po/Makefile.am ! 253600989b ./libstdc++-v3/po/Makefile.in ! 2014452913b ./libstdc++-v3/po/POTFILES.in 1252249648b ./libstdc++-v3/po/de.po 4161545945b ./libstdc++-v3/po/fr.po 571561184b ./libstdc++-v3/po/libstdc++.pot 1352447199b ./libstdc++-v3/po/string_literals.cc ! 2372986634b ./libstdc++-v3/src/Makefile.am ! 2799367586b ./libstdc++-v3/src/Makefile.in ! 2225403332b ./libstdc++-v3/src/bitset.cc ! 3877796949b ./libstdc++-v3/src/codecvt.cc 252828227b ./libstdc++-v3/src/complex_io.cc ! 730767358b ./libstdc++-v3/src/concept-inst.cc 1573161063b ./libstdc++-v3/src/ctype.cc 78911046b ./libstdc++-v3/src/ext-inst.cc ! 3501232323b ./libstdc++-v3/src/fstream-inst.cc ! 2915333764b ./libstdc++-v3/src/fstream.cc 3677721072b ./libstdc++-v3/src/functexcept.cc ! 4248290172b ./libstdc++-v3/src/globals.cc ! 62109486b ./libstdc++-v3/src/io-inst.cc ! 3777736418b ./libstdc++-v3/src/ios.cc ! 3318878382b ./libstdc++-v3/src/istream-inst.cc 2798828124b ./libstdc++-v3/src/limits.cc ! 2887946202b ./libstdc++-v3/src/locale-inst.cc ! 3165521097b ./libstdc++-v3/src/locale.cc ! 1418138439b ./libstdc++-v3/src/localename.cc ! 46061667b ./libstdc++-v3/src/misc-inst.cc ! 1456313812b ./libstdc++-v3/src/ostream-inst.cc ! 1968902758b ./libstdc++-v3/src/sstream-inst.cc 3634270088b ./libstdc++-v3/src/stdexcept.cc 4276116934b ./libstdc++-v3/src/stl-inst.cc 294577884b ./libstdc++-v3/src/streambuf-inst.cc 1002021259b ./libstdc++-v3/src/string-inst.cc ! 102324994b ./libstdc++-v3/src/strstream.cc ! 3557593608b ./libstdc++-v3/src/valarray-inst.cc 2601290630b ./libstdc++-v3/src/vterminate.cc 1651008667b ./libstdc++-v3/src/wstring-inst.cc 3407177850b ./libstdc++-v3/testsuite/17_intro/header_cassert.cc --- 15201,15293 ---- 3964237465b ./libstdc++-v3/libio/iolibio.h 4269898080b ./libstdc++-v3/libio/libio.h 276542374b ./libstdc++-v3/libio/libioP.h + 3759774482b ./libstdc++-v3/libio/Makefile.am + 3035076726b ./libstdc++-v3/libio/Makefile.in 13280908b ./libstdc++-v3/libio/stdfiles.c 2344987226b ./libstdc++-v3/libio/stdio.c 688559115b ./libstdc++-v3/libio/wfiledoalloc.c 871695306b ./libstdc++-v3/libio/wfileops.c 2568419733b ./libstdc++-v3/libio/wgenops.c 4088285812b ./libstdc++-v3/libmath/copysignf.c + 3838182569b ./libstdc++-v3/libmath/Makefile.am + 1884225693b ./libstdc++-v3/libmath/Makefile.in 346371220b ./libstdc++-v3/libmath/mathconf.h 1759197966b ./libstdc++-v3/libmath/nan.c 1774241233b ./libstdc++-v3/libmath/signbit.c 3226432156b ./libstdc++-v3/libmath/signbitf.c 706230946b ./libstdc++-v3/libmath/signbitl.c 940829383b ./libstdc++-v3/libmath/stubs.c ! 1326026004b ./libstdc++-v3/libsupc++/cxxabi.h 3887473586b ./libstdc++-v3/libsupc++/del_op.cc 2108254126b ./libstdc++-v3/libsupc++/del_opnt.cc 998297127b ./libstdc++-v3/libsupc++/del_opv.cc 958055369b ./libstdc++-v3/libsupc++/del_opvnt.cc 256210637b ./libstdc++-v3/libsupc++/eh_alloc.cc 1594858350b ./libstdc++-v3/libsupc++/eh_aux_runtime.cc ! 113875910b ./libstdc++-v3/libsupc++/eh_catch.cc 4215496070b ./libstdc++-v3/libsupc++/eh_exception.cc 1852005316b ./libstdc++-v3/libsupc++/eh_globals.cc ! 2270762618b ./libstdc++-v3/libsupc++/eh_personality.cc 192927225b ./libstdc++-v3/libsupc++/eh_terminate.cc ! 4225154740b ./libstdc++-v3/libsupc++/eh_throw.cc 3381460574b ./libstdc++-v3/libsupc++/eh_type.cc ! 3207332728b ./libstdc++-v3/libsupc++/exception 3453419455b ./libstdc++-v3/libsupc++/exception_defines.h ! 930362627b ./libstdc++-v3/libsupc++/guard.cc ! 2660421896b ./libstdc++-v3/libsupc++/Makefile.am ! 334186148b ./libstdc++-v3/libsupc++/Makefile.in ! 1619407531b ./libstdc++-v3/libsupc++/new 2545598190b ./libstdc++-v3/libsupc++/new_handler.cc 2558289852b ./libstdc++-v3/libsupc++/new_op.cc 1924050083b ./libstdc++-v3/libsupc++/new_opnt.cc 4286163592b ./libstdc++-v3/libsupc++/new_opv.cc 1153125428b ./libstdc++-v3/libsupc++/new_opvnt.cc 2851101423b ./libstdc++-v3/libsupc++/pure.cc 4266179473b ./libstdc++-v3/libsupc++/tinfo2.cc ! 1354681125b ./libstdc++-v3/libsupc++/tinfo.cc ! 1192700122b ./libstdc++-v3/libsupc++/tinfo.h ! 1563723440b ./libstdc++-v3/libsupc++/typeinfo ! 2547443127b ./libstdc++-v3/libsupc++/unwind-cxx.h 712738859b ./libstdc++-v3/libsupc++/vec.cc ! 854314497b ./libstdc++-v3/Makefile.am ! 627860607b ./libstdc++-v3/Makefile.in ! 987967454b ./libstdc++-v3/mkcheck.in 1252249648b ./libstdc++-v3/po/de.po 4161545945b ./libstdc++-v3/po/fr.po 571561184b ./libstdc++-v3/po/libstdc++.pot + 2710223631b ./libstdc++-v3/po/Makefile.am + 1741914905b ./libstdc++-v3/po/Makefile.in + 2014452913b ./libstdc++-v3/po/POTFILES.in 1352447199b ./libstdc++-v3/po/string_literals.cc ! 201474883b ./libstdc++-v3/README ! 4044863439b ./libstdc++-v3/src/bitset.cc ! 1525000204b ./libstdc++-v3/src/codecvt.cc 252828227b ./libstdc++-v3/src/complex_io.cc ! 3051346090b ./libstdc++-v3/src/concept-inst.cc 1573161063b ./libstdc++-v3/src/ctype.cc 78911046b ./libstdc++-v3/src/ext-inst.cc ! 3692870828b ./libstdc++-v3/src/fstream.cc ! 3851559670b ./libstdc++-v3/src/fstream-inst.cc 3677721072b ./libstdc++-v3/src/functexcept.cc ! 3025190218b ./libstdc++-v3/src/globals.cc ! 363698629b ./libstdc++-v3/src/io-inst.cc ! 2203507197b ./libstdc++-v3/src/ios.cc ! 3726206629b ./libstdc++-v3/src/istream-inst.cc 2798828124b ./libstdc++-v3/src/limits.cc ! 3213175621b ./libstdc++-v3/src/locale.cc ! 906894940b ./libstdc++-v3/src/locale-inst.cc ! 2818357303b ./libstdc++-v3/src/localename.cc ! 4061406571b ./libstdc++-v3/src/Makefile.am ! 1045148615b ./libstdc++-v3/src/Makefile.in ! 1950596427b ./libstdc++-v3/src/misc-inst.cc ! 281972773b ./libstdc++-v3/src/ostream-inst.cc ! 3716553502b ./libstdc++-v3/src/sstream-inst.cc 3634270088b ./libstdc++-v3/src/stdexcept.cc 4276116934b ./libstdc++-v3/src/stl-inst.cc 294577884b ./libstdc++-v3/src/streambuf-inst.cc 1002021259b ./libstdc++-v3/src/string-inst.cc ! 491513474b ./libstdc++-v3/src/strstream.cc ! 721446018b ./libstdc++-v3/src/valarray-inst.cc 2601290630b ./libstdc++-v3/src/vterminate.cc 1651008667b ./libstdc++-v3/src/wstring-inst.cc 3407177850b ./libstdc++-v3/testsuite/17_intro/header_cassert.cc *************** *** 14146,14161 **** 1794666783b ./libstdc++-v3/testsuite/17_intro/header_iostream.cc 1280776215b ./libstdc++-v3/testsuite/17_intro/header_istream.cc 3671158117b ./libstdc++-v3/testsuite/17_intro/header_ostream.cc 161485874b ./libstdc++-v3/testsuite/17_intro/header_sstream.cc 553109088b ./libstdc++-v3/testsuite/17_intro/header_streambuf.cc - 3461116413b ./libstdc++-v3/testsuite/17_intro/headers.cc - 2076357409b ./libstdc++-v3/testsuite/17_intro/headers_c++.cc - 3404318748b ./libstdc++-v3/testsuite/17_intro/headers_c.cc 2977766596b ./libstdc++-v3/testsuite/18_support/new_delete_placement.cc ! 2714224389b ./libstdc++-v3/testsuite/18_support/numeric_limits.cc 3977893255b ./libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc 3578392413b ./libstdc++-v3/testsuite/20_util/allocator_members.cc ! 4062528466b ./libstdc++-v3/testsuite/20_util/auto_ptr.cc 4006660250b ./libstdc++-v3/testsuite/20_util/binders.cc 1043517205b ./libstdc++-v3/testsuite/20_util/comparisons.cc 1073181186b ./libstdc++-v3/testsuite/20_util/pairs.cc --- 15309,15325 ---- 1794666783b ./libstdc++-v3/testsuite/17_intro/header_iostream.cc 1280776215b ./libstdc++-v3/testsuite/17_intro/header_istream.cc 3671158117b ./libstdc++-v3/testsuite/17_intro/header_ostream.cc + 2645939509b ./libstdc++-v3/testsuite/17_intro/headers.cc + 3404318748b ./libstdc++-v3/testsuite/17_intro/headers_c.cc + 2076357409b ./libstdc++-v3/testsuite/17_intro/headers_c++.cc 161485874b ./libstdc++-v3/testsuite/17_intro/header_sstream.cc 553109088b ./libstdc++-v3/testsuite/17_intro/header_streambuf.cc 2977766596b ./libstdc++-v3/testsuite/18_support/new_delete_placement.cc ! 587896804b ./libstdc++-v3/testsuite/18_support/numeric_limits.cc 3977893255b ./libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc 3578392413b ./libstdc++-v3/testsuite/20_util/allocator_members.cc ! 459745751b ./libstdc++-v3/testsuite/20_util/auto_ptr.cc ! 3732785603b ./libstdc++-v3/testsuite/20_util/auto_ptr_neg.cc 4006660250b ./libstdc++-v3/testsuite/20_util/binders.cc 1043517205b ./libstdc++-v3/testsuite/20_util/comparisons.cc 1073181186b ./libstdc++-v3/testsuite/20_util/pairs.cc *************** *** 14163,14182 **** 2339280423b ./libstdc++-v3/testsuite/20_util/temporary_buffer.cc 2620430532b ./libstdc++-v3/testsuite/21_strings/append.cc 1749237095b ./libstdc++-v3/testsuite/21_strings/assign.cc ! 1828225934b ./libstdc++-v3/testsuite/21_strings/c_strings.cc ! 2588370034b ./libstdc++-v3/testsuite/21_strings/capacity.cc 2635888646b ./libstdc++-v3/testsuite/21_strings/char_traits_requirements.cc 4052621376b ./libstdc++-v3/testsuite/21_strings/char_traits_typedefs.cc 2742086522b ./libstdc++-v3/testsuite/21_strings/compare.cc ! 747384429b ./libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc 2926478704b ./libstdc++-v3/testsuite/21_strings/element_access.cc 2204151867b ./libstdc++-v3/testsuite/21_strings/find.cc ! 1722926940b ./libstdc++-v3/testsuite/21_strings/insert.cc 1426636344b ./libstdc++-v3/testsuite/21_strings/inserters_extractors.cc 2168000074b ./libstdc++-v3/testsuite/21_strings/invariants.cc 593155147b ./libstdc++-v3/testsuite/21_strings/nonmember.cc 1709617082b ./libstdc++-v3/testsuite/21_strings/operations.cc ! 3864027067b ./libstdc++-v3/testsuite/21_strings/replace.cc 2718476092b ./libstdc++-v3/testsuite/21_strings/rfind.cc 1483165749b ./libstdc++-v3/testsuite/21_strings/substr.cc 387593609b ./libstdc++-v3/testsuite/22_locale/codecvt.cc --- 15327,15346 ---- 2339280423b ./libstdc++-v3/testsuite/20_util/temporary_buffer.cc 2620430532b ./libstdc++-v3/testsuite/21_strings/append.cc 1749237095b ./libstdc++-v3/testsuite/21_strings/assign.cc ! 166406663b ./libstdc++-v3/testsuite/21_strings/capacity.cc 2635888646b ./libstdc++-v3/testsuite/21_strings/char_traits_requirements.cc 4052621376b ./libstdc++-v3/testsuite/21_strings/char_traits_typedefs.cc 2742086522b ./libstdc++-v3/testsuite/21_strings/compare.cc ! 1828225934b ./libstdc++-v3/testsuite/21_strings/c_strings.cc ! 2035394048b ./libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc 2926478704b ./libstdc++-v3/testsuite/21_strings/element_access.cc 2204151867b ./libstdc++-v3/testsuite/21_strings/find.cc ! 2747064326b ./libstdc++-v3/testsuite/21_strings/insert.cc 1426636344b ./libstdc++-v3/testsuite/21_strings/inserters_extractors.cc 2168000074b ./libstdc++-v3/testsuite/21_strings/invariants.cc 593155147b ./libstdc++-v3/testsuite/21_strings/nonmember.cc 1709617082b ./libstdc++-v3/testsuite/21_strings/operations.cc ! 26593010b ./libstdc++-v3/testsuite/21_strings/replace.cc 2718476092b ./libstdc++-v3/testsuite/21_strings/rfind.cc 1483165749b ./libstdc++-v3/testsuite/21_strings/substr.cc 387593609b ./libstdc++-v3/testsuite/22_locale/codecvt.cc *************** *** 14184,14194 **** 1168972362b ./libstdc++-v3/testsuite/22_locale/codecvt_members_unicode_char.cc 56961166b ./libstdc++-v3/testsuite/22_locale/codecvt_members_unicode_wchar_t.cc 4100654250b ./libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc - 4219192012b ./libstdc++-v3/testsuite/22_locale/collate.cc 378719965b ./libstdc++-v3/testsuite/22_locale/collate_byname.cc 1671297459b ./libstdc++-v3/testsuite/22_locale/collate_members_char.cc 2271354246b ./libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc ! 3591030064b ./libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc 2708515186b ./libstdc++-v3/testsuite/22_locale/ctype.cc 249444744b ./libstdc++-v3/testsuite/22_locale/ctype_is_char.cc 547279960b ./libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc --- 15348,15358 ---- 1168972362b ./libstdc++-v3/testsuite/22_locale/codecvt_members_unicode_char.cc 56961166b ./libstdc++-v3/testsuite/22_locale/codecvt_members_unicode_wchar_t.cc 4100654250b ./libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc 378719965b ./libstdc++-v3/testsuite/22_locale/collate_byname.cc + 4219192012b ./libstdc++-v3/testsuite/22_locale/collate.cc 1671297459b ./libstdc++-v3/testsuite/22_locale/collate_members_char.cc 2271354246b ./libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc ! 2835583010b ./libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc 2708515186b ./libstdc++-v3/testsuite/22_locale/ctype.cc 249444744b ./libstdc++-v3/testsuite/22_locale/ctype_is_char.cc 547279960b ./libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc *************** *** 14205,14233 **** 3849986858b ./libstdc++-v3/testsuite/22_locale/facet.cc 3496730433b ./libstdc++-v3/testsuite/22_locale/global_templates.cc 1723684426b ./libstdc++-v3/testsuite/22_locale/members.cc - 3196187062b ./libstdc++-v3/testsuite/22_locale/messages.cc 1401094326b ./libstdc++-v3/testsuite/22_locale/messages_byname.cc 1970700053b ./libstdc++-v3/testsuite/22_locale/messages_members_char.cc 2495817416b ./libstdc++-v3/testsuite/22_locale/money_get.cc 1766255762b ./libstdc++-v3/testsuite/22_locale/money_get_members_char.cc 138738715b ./libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc - 2714963439b ./libstdc++-v3/testsuite/22_locale/money_put.cc - 545615219b ./libstdc++-v3/testsuite/22_locale/money_put_members_char.cc - 299189870b ./libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc - 1298769732b ./libstdc++-v3/testsuite/22_locale/moneypunct.cc 396525641b ./libstdc++-v3/testsuite/22_locale/moneypunct_byname.cc 1486946696b ./libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc 2302401224b ./libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc 3806757668b ./libstdc++-v3/testsuite/22_locale/num_get.cc 942400636b ./libstdc++-v3/testsuite/22_locale/num_get_members_char.cc 3952754596b ./libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc - 2013396522b ./libstdc++-v3/testsuite/22_locale/num_put.cc - 2410491259b ./libstdc++-v3/testsuite/22_locale/num_put_members_char.cc - 547290714b ./libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc - 481449220b ./libstdc++-v3/testsuite/22_locale/numpunct.cc 3109277057b ./libstdc++-v3/testsuite/22_locale/numpunct_byname.cc 1180876674b ./libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc 3139380707b ./libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc 2592583186b ./libstdc++-v3/testsuite/22_locale/operators.cc 786606213b ./libstdc++-v3/testsuite/22_locale/static_members.cc 3529549306b ./libstdc++-v3/testsuite/22_locale/time_get.cc --- 15369,15397 ---- 3849986858b ./libstdc++-v3/testsuite/22_locale/facet.cc 3496730433b ./libstdc++-v3/testsuite/22_locale/global_templates.cc 1723684426b ./libstdc++-v3/testsuite/22_locale/members.cc 1401094326b ./libstdc++-v3/testsuite/22_locale/messages_byname.cc + 3196187062b ./libstdc++-v3/testsuite/22_locale/messages.cc 1970700053b ./libstdc++-v3/testsuite/22_locale/messages_members_char.cc 2495817416b ./libstdc++-v3/testsuite/22_locale/money_get.cc 1766255762b ./libstdc++-v3/testsuite/22_locale/money_get_members_char.cc 138738715b ./libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc 396525641b ./libstdc++-v3/testsuite/22_locale/moneypunct_byname.cc + 1298769732b ./libstdc++-v3/testsuite/22_locale/moneypunct.cc 1486946696b ./libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc 2302401224b ./libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc + 2714963439b ./libstdc++-v3/testsuite/22_locale/money_put.cc + 545615219b ./libstdc++-v3/testsuite/22_locale/money_put_members_char.cc + 299189870b ./libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc 3806757668b ./libstdc++-v3/testsuite/22_locale/num_get.cc 942400636b ./libstdc++-v3/testsuite/22_locale/num_get_members_char.cc 3952754596b ./libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc 3109277057b ./libstdc++-v3/testsuite/22_locale/numpunct_byname.cc + 481449220b ./libstdc++-v3/testsuite/22_locale/numpunct.cc 1180876674b ./libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc 3139380707b ./libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc + 2013396522b ./libstdc++-v3/testsuite/22_locale/num_put.cc + 3717422626b ./libstdc++-v3/testsuite/22_locale/num_put_members_char.cc + 2943051713b ./libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc 2592583186b ./libstdc++-v3/testsuite/22_locale/operators.cc 786606213b ./libstdc++-v3/testsuite/22_locale/static_members.cc 3529549306b ./libstdc++-v3/testsuite/22_locale/time_get.cc *************** *** 14236,14268 **** 4249879313b ./libstdc++-v3/testsuite/22_locale/time_put.cc 2625268284b ./libstdc++-v3/testsuite/22_locale/time_put_members_char.cc 1365876592b ./libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc 1594601537b ./libstdc++-v3/testsuite/23_containers/bitset_ctor.cc ! 4248533082b ./libstdc++-v3/testsuite/23_containers/bitset_members.cc ! 897013241b ./libstdc++-v3/testsuite/23_containers/bitset_shift.cc ! 298271417b ./libstdc++-v3/testsuite/23_containers/deque_ctor.cc 3599034057b ./libstdc++-v3/testsuite/23_containers/deque_operators.cc 205784061b ./libstdc++-v3/testsuite/23_containers/list_capacity.cc 326983922b ./libstdc++-v3/testsuite/23_containers/list_ctor.cc ! 599293253b ./libstdc++-v3/testsuite/23_containers/list_modifiers.cc 4244756936b ./libstdc++-v3/testsuite/23_containers/list_operators.cc 307316045b ./libstdc++-v3/testsuite/23_containers/map_insert.cc ! 1772243688b ./libstdc++-v3/testsuite/23_containers/map_operators.cc 3789154851b ./libstdc++-v3/testsuite/23_containers/multiset.cc ! 4102929314b ./libstdc++-v3/testsuite/23_containers/set_operators.cc 3617128880b ./libstdc++-v3/testsuite/23_containers/vector_bool.cc ! 3656594969b ./libstdc++-v3/testsuite/23_containers/vector_capacity.cc ! 2149604858b ./libstdc++-v3/testsuite/23_containers/vector_ctor.cc 3683155594b ./libstdc++-v3/testsuite/23_containers/vector_element_access.cc 4203207973b ./libstdc++-v3/testsuite/23_containers/vector_modifiers.cc 2310165208b ./libstdc++-v3/testsuite/23_containers/vector_resize.cc 3679802360b ./libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc 2736134729b ./libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc 1154183743b ./libstdc++-v3/testsuite/24_iterators/insert_iterator.cc - 3795589628b ./libstdc++-v3/testsuite/24_iterators/istream_iterator.cc 714376333b ./libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc 2873994073b ./libstdc++-v3/testsuite/24_iterators/iterator.cc - 3195646624b ./libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc 1144199940b ./libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc 1944522737b ./libstdc++-v3/testsuite/24_iterators/rel_ops.cc 2512302022b ./libstdc++-v3/testsuite/24_iterators/reverse_iterator.cc 1024863451b ./libstdc++-v3/testsuite/25_algorithms/binary_search.cc --- 15400,15434 ---- 4249879313b ./libstdc++-v3/testsuite/22_locale/time_put.cc 2625268284b ./libstdc++-v3/testsuite/22_locale/time_put_members_char.cc 1365876592b ./libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc + 3289301322b ./libstdc++-v3/testsuite/23_containers/adaptors.cc 1594601537b ./libstdc++-v3/testsuite/23_containers/bitset_ctor.cc ! 2655563763b ./libstdc++-v3/testsuite/23_containers/bitset_members.cc ! 557765720b ./libstdc++-v3/testsuite/23_containers/bitset_shift.cc ! 2884910715b ./libstdc++-v3/testsuite/23_containers/deque_ctor.cc 3599034057b ./libstdc++-v3/testsuite/23_containers/deque_operators.cc 205784061b ./libstdc++-v3/testsuite/23_containers/list_capacity.cc 326983922b ./libstdc++-v3/testsuite/23_containers/list_ctor.cc ! 2845190223b ./libstdc++-v3/testsuite/23_containers/list_modifiers.cc 4244756936b ./libstdc++-v3/testsuite/23_containers/list_operators.cc 307316045b ./libstdc++-v3/testsuite/23_containers/map_insert.cc ! 3245327296b ./libstdc++-v3/testsuite/23_containers/map_operators.cc ! 2101607150b ./libstdc++-v3/testsuite/23_containers/map_operators_neg.cc 3789154851b ./libstdc++-v3/testsuite/23_containers/multiset.cc ! 3240936840b ./libstdc++-v3/testsuite/23_containers/set_operators_neg.cc 3617128880b ./libstdc++-v3/testsuite/23_containers/vector_bool.cc ! 257259405b ./libstdc++-v3/testsuite/23_containers/vector_capacity.cc ! 1192517831b ./libstdc++-v3/testsuite/23_containers/vector_ctor.cc 3683155594b ./libstdc++-v3/testsuite/23_containers/vector_element_access.cc 4203207973b ./libstdc++-v3/testsuite/23_containers/vector_modifiers.cc 2310165208b ./libstdc++-v3/testsuite/23_containers/vector_resize.cc 3679802360b ./libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc 2736134729b ./libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc 1154183743b ./libstdc++-v3/testsuite/24_iterators/insert_iterator.cc 714376333b ./libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc + 3795589628b ./libstdc++-v3/testsuite/24_iterators/istream_iterator.cc 2873994073b ./libstdc++-v3/testsuite/24_iterators/iterator.cc 1144199940b ./libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc + 3195646624b ./libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc 1944522737b ./libstdc++-v3/testsuite/24_iterators/rel_ops.cc 2512302022b ./libstdc++-v3/testsuite/24_iterators/reverse_iterator.cc 1024863451b ./libstdc++-v3/testsuite/25_algorithms/binary_search.cc *************** *** 14277,14315 **** 3487714017b ./libstdc++-v3/testsuite/25_algorithms/unique.cc 825452073b ./libstdc++-v3/testsuite/26_numerics/binary_closure.cc 4174117585b ./libstdc++-v3/testsuite/26_numerics/buggy_complex.cc 477083436b ./libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc - 3446031285b ./libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc 162388279b ./libstdc++-v3/testsuite/26_numerics/c_math.cc 3345793307b ./libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc ! 4028172023b ./libstdc++-v3/testsuite/26_numerics/complex_value.cc 1538489744b ./libstdc++-v3/testsuite/26_numerics/fabs_inline.cc 2398191938b ./libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc 2493789332b ./libstdc++-v3/testsuite/26_numerics/sum_diff.cc 2203801309b ./libstdc++-v3/testsuite/26_numerics/valarray.cc 2289035929b ./libstdc++-v3/testsuite/26_numerics/valarray_const_bracket.cc ! 1162163080b ./libstdc++-v3/testsuite/27_io/filebuf.cc 4294967295b ./libstdc++-v3/testsuite/27_io/filebuf_members-1.tst 4294967295b ./libstdc++-v3/testsuite/27_io/filebuf_members-1.txt ! 1936479101b ./libstdc++-v3/testsuite/27_io/filebuf_members.cc 4204648704b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-1.tst 4204648704b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-1.txt 655821823b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-2.tst 1896106013b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-3.tst ! 3120338832b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc 1987901042b ./libstdc++-v3/testsuite/27_io/fpos.cc ! 2165147103b ./libstdc++-v3/testsuite/27_io/fstream.cc 358840366b ./libstdc++-v3/testsuite/27_io/fstream_members.cc 4052401030b ./libstdc++-v3/testsuite/27_io/ifstream.cc 4294967295b ./libstdc++-v3/testsuite/27_io/ifstream_members-1.tst 4294967295b ./libstdc++-v3/testsuite/27_io/ifstream_members-1.txt 2885752721b ./libstdc++-v3/testsuite/27_io/ifstream_members.cc 2822576026b ./libstdc++-v3/testsuite/27_io/instantiations.cc - 236727293b ./libstdc++-v3/testsuite/27_io/ios.cc 1158981090b ./libstdc++-v3/testsuite/27_io/ios_base_callbacks.cc 3079502096b ./libstdc++-v3/testsuite/27_io/ios_base_members_static-1.tst 2904656871b ./libstdc++-v3/testsuite/27_io/ios_base_members_static.cc ! 848019283b ./libstdc++-v3/testsuite/27_io/ios_base_storage.cc ! 1912639991b ./libstdc++-v3/testsuite/27_io/ios_base_type.cc 3028704293b ./libstdc++-v3/testsuite/27_io/ios_ctor.cc 3931163797b ./libstdc++-v3/testsuite/27_io/ios_init.cc 1589179378b ./libstdc++-v3/testsuite/27_io/ios_manip_basefield.cc --- 15443,15485 ---- 3487714017b ./libstdc++-v3/testsuite/25_algorithms/unique.cc 825452073b ./libstdc++-v3/testsuite/26_numerics/binary_closure.cc 4174117585b ./libstdc++-v3/testsuite/26_numerics/buggy_complex.cc + 2282141510b ./libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc 477083436b ./libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc 162388279b ./libstdc++-v3/testsuite/26_numerics/c_math.cc + 1247641597b ./libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc 3345793307b ./libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc ! 2483842052b ./libstdc++-v3/testsuite/26_numerics/complex_value.cc 1538489744b ./libstdc++-v3/testsuite/26_numerics/fabs_inline.cc 2398191938b ./libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc + 777494929b ./libstdc++-v3/testsuite/26_numerics/slice.cc 2493789332b ./libstdc++-v3/testsuite/26_numerics/sum_diff.cc 2203801309b ./libstdc++-v3/testsuite/26_numerics/valarray.cc 2289035929b ./libstdc++-v3/testsuite/26_numerics/valarray_const_bracket.cc ! 2780305313b ./libstdc++-v3/testsuite/26_numerics/valarray_name_lookup.cc ! 2056661626b ./libstdc++-v3/testsuite/26_numerics/valarray_operators.cc ! 1543732888b ./libstdc++-v3/testsuite/27_io/filebuf.cc 4294967295b ./libstdc++-v3/testsuite/27_io/filebuf_members-1.tst 4294967295b ./libstdc++-v3/testsuite/27_io/filebuf_members-1.txt ! 1856875262b ./libstdc++-v3/testsuite/27_io/filebuf_members.cc 4204648704b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-1.tst 4204648704b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-1.txt 655821823b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-2.tst 1896106013b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals-3.tst ! 2840411801b ./libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc 1987901042b ./libstdc++-v3/testsuite/27_io/fpos.cc ! 3847670068b ./libstdc++-v3/testsuite/27_io/fstream.cc 358840366b ./libstdc++-v3/testsuite/27_io/fstream_members.cc 4052401030b ./libstdc++-v3/testsuite/27_io/ifstream.cc 4294967295b ./libstdc++-v3/testsuite/27_io/ifstream_members-1.tst 4294967295b ./libstdc++-v3/testsuite/27_io/ifstream_members-1.txt 2885752721b ./libstdc++-v3/testsuite/27_io/ifstream_members.cc 2822576026b ./libstdc++-v3/testsuite/27_io/instantiations.cc 1158981090b ./libstdc++-v3/testsuite/27_io/ios_base_callbacks.cc 3079502096b ./libstdc++-v3/testsuite/27_io/ios_base_members_static-1.tst 2904656871b ./libstdc++-v3/testsuite/27_io/ios_base_members_static.cc ! 1272750519b ./libstdc++-v3/testsuite/27_io/ios_base_storage.cc ! 1912639991b ./libstdc++-v3/testsuite/27_io/ios_base_types.cc ! 236727293b ./libstdc++-v3/testsuite/27_io/ios.cc 3028704293b ./libstdc++-v3/testsuite/27_io/ios_ctor.cc 3931163797b ./libstdc++-v3/testsuite/27_io/ios_init.cc 1589179378b ./libstdc++-v3/testsuite/27_io/ios_manip_basefield.cc *************** *** 14317,14323 **** 402291869b ./libstdc++-v3/testsuite/27_io/ios_members.cc 3395187832b ./libstdc++-v3/testsuite/27_io/iostream.cc 2441613414b ./libstdc++-v3/testsuite/27_io/iostream_members.cc ! 403539923b ./libstdc++-v3/testsuite/27_io/istream.cc 1146610544b ./libstdc++-v3/testsuite/27_io/istream_extractor_arith/01.cc 1207400618b ./libstdc++-v3/testsuite/27_io/istream_extractor_arith/02.cc 1925096617b ./libstdc++-v3/testsuite/27_io/istream_extractor_arith/03.cc --- 15487,15494 ---- 402291869b ./libstdc++-v3/testsuite/27_io/ios_members.cc 3395187832b ./libstdc++-v3/testsuite/27_io/iostream.cc 2441613414b ./libstdc++-v3/testsuite/27_io/iostream_members.cc ! 1894730605b ./libstdc++-v3/testsuite/27_io/istream.cc ! 4195222810b ./libstdc++-v3/testsuite/27_io/istream_exception.cc 1146610544b ./libstdc++-v3/testsuite/27_io/istream_extractor_arith/01.cc 1207400618b ./libstdc++-v3/testsuite/27_io/istream_extractor_arith/02.cc 1925096617b ./libstdc++-v3/testsuite/27_io/istream_extractor_arith/03.cc *************** *** 14343,14356 **** 466639813b ./libstdc++-v3/testsuite/27_io/istream_sentry.cc 38986799b ./libstdc++-v3/testsuite/27_io/istream_unformatted-1.tst 38986799b ./libstdc++-v3/testsuite/27_io/istream_unformatted-1.txt ! 3117431722b ./libstdc++-v3/testsuite/27_io/istream_unformatted.cc 351004607b ./libstdc++-v3/testsuite/27_io/istringstream.cc 2607021483b ./libstdc++-v3/testsuite/27_io/istringstream_members.cc ! 3768461150b ./libstdc++-v3/testsuite/27_io/narrow_stream_objects.cc 190325385b ./libstdc++-v3/testsuite/27_io/ofstream.cc 4294967295b ./libstdc++-v3/testsuite/27_io/ofstream_members-1.tst 2333857258b ./libstdc++-v3/testsuite/27_io/ofstream_members.cc ! 3562911149b ./libstdc++-v3/testsuite/27_io/ostream.cc 2379954655b ./libstdc++-v3/testsuite/27_io/ostream_inserter_arith.cc 1556078817b ./libstdc++-v3/testsuite/27_io/ostream_inserter_char-1.tst 1556078817b ./libstdc++-v3/testsuite/27_io/ostream_inserter_char-1.txt --- 15514,15529 ---- 466639813b ./libstdc++-v3/testsuite/27_io/istream_sentry.cc 38986799b ./libstdc++-v3/testsuite/27_io/istream_unformatted-1.tst 38986799b ./libstdc++-v3/testsuite/27_io/istream_unformatted-1.txt ! 3332135430b ./libstdc++-v3/testsuite/27_io/istream_unformatted.cc 351004607b ./libstdc++-v3/testsuite/27_io/istringstream.cc 2607021483b ./libstdc++-v3/testsuite/27_io/istringstream_members.cc ! 2419303660b ./libstdc++-v3/testsuite/27_io/narrow_stream_objects.cc 190325385b ./libstdc++-v3/testsuite/27_io/ofstream.cc 4294967295b ./libstdc++-v3/testsuite/27_io/ofstream_members-1.tst 2333857258b ./libstdc++-v3/testsuite/27_io/ofstream_members.cc ! 2908255347b ./libstdc++-v3/testsuite/27_io/ostream.cc ! 880133189b ./libstdc++-v3/testsuite/27_io/ostream_exception.cc ! 1939406016b ./libstdc++-v3/testsuite/27_io/ostream_fail.cc 2379954655b ./libstdc++-v3/testsuite/27_io/ostream_inserter_arith.cc 1556078817b ./libstdc++-v3/testsuite/27_io/ostream_inserter_char-1.tst 1556078817b ./libstdc++-v3/testsuite/27_io/ostream_inserter_char-1.txt *************** *** 14361,14382 **** 1438625590b ./libstdc++-v3/testsuite/27_io/ostream_manip.cc 4294967295b ./libstdc++-v3/testsuite/27_io/ostream_seeks-1.tst 169443827b ./libstdc++-v3/testsuite/27_io/ostream_seeks.cc 4124709644b ./libstdc++-v3/testsuite/27_io/ostream_unformatted.cc 4123639841b ./libstdc++-v3/testsuite/27_io/ostringstream.cc 1267238271b ./libstdc++-v3/testsuite/27_io/ostringstream_members.cc 989576790b ./libstdc++-v3/testsuite/27_io/standard_manipulators.cc ! 252515735b ./libstdc++-v3/testsuite/27_io/streambuf.cc ! 1084514322b ./libstdc++-v3/testsuite/27_io/streambuf_members.cc ! 939421885b ./libstdc++-v3/testsuite/27_io/stringbuf.cc ! 1939814633b ./libstdc++-v3/testsuite/27_io/stringbuf_members.cc 2822024689b ./libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc ! 4012426009b ./libstdc++-v3/testsuite/27_io/stringstream.cc 2617118873b ./libstdc++-v3/testsuite/27_io/stringstream_members.cc 365205754b ./libstdc++-v3/testsuite/27_io/wide_stream_objects.cc ! 530685480b ./libstdc++-v3/testsuite/Makefile.am ! 2958696649b ./libstdc++-v3/testsuite/Makefile.in ! 443433597b ./libstdc++-v3/testsuite/README ! 2449407162b ./libstdc++-v3/testsuite/abi_check.cc 3762370376b ./libstdc++-v3/testsuite/backward/header_deque_h.cc 651880874b ./libstdc++-v3/testsuite/backward/header_hash_map_h.cc 2293472298b ./libstdc++-v3/testsuite/backward/header_hash_set_h.cc --- 15534,15553 ---- 1438625590b ./libstdc++-v3/testsuite/27_io/ostream_manip.cc 4294967295b ./libstdc++-v3/testsuite/27_io/ostream_seeks-1.tst 169443827b ./libstdc++-v3/testsuite/27_io/ostream_seeks.cc + 2154601095b ./libstdc++-v3/testsuite/27_io/ostream_sentry.cc 4124709644b ./libstdc++-v3/testsuite/27_io/ostream_unformatted.cc 4123639841b ./libstdc++-v3/testsuite/27_io/ostringstream.cc 1267238271b ./libstdc++-v3/testsuite/27_io/ostringstream_members.cc 989576790b ./libstdc++-v3/testsuite/27_io/standard_manipulators.cc ! 2239074027b ./libstdc++-v3/testsuite/27_io/streambuf.cc ! 3804159145b ./libstdc++-v3/testsuite/27_io/streambuf_members.cc ! 1048911834b ./libstdc++-v3/testsuite/27_io/stringbuf.cc ! 3127280169b ./libstdc++-v3/testsuite/27_io/stringbuf_members.cc 2822024689b ./libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc ! 1660875934b ./libstdc++-v3/testsuite/27_io/stringstream.cc 2617118873b ./libstdc++-v3/testsuite/27_io/stringstream_members.cc 365205754b ./libstdc++-v3/testsuite/27_io/wide_stream_objects.cc ! 3484805969b ./libstdc++-v3/testsuite/abi_check.cc 3762370376b ./libstdc++-v3/testsuite/backward/header_deque_h.cc 651880874b ./libstdc++-v3/testsuite/backward/header_hash_map_h.cc 2293472298b ./libstdc++-v3/testsuite/backward/header_hash_set_h.cc *************** *** 14387,14478 **** 4284948430b ./libstdc++-v3/testsuite/backward/header_tempbuf_h.cc 2753031700b ./libstdc++-v3/testsuite/backward/strstream_members.cc 872857903b ./libstdc++-v3/testsuite/config/default.exp ! 275572765b ./libstdc++-v3/testsuite/ext/allocators.cc 1828531587b ./libstdc++-v3/testsuite/ext/concept_checks.cc 1683071968b ./libstdc++-v3/testsuite/ext/hash_map.cc 2382325141b ./libstdc++-v3/testsuite/ext/hash_set.cc 2849413443b ./libstdc++-v3/testsuite/ext/headers.cc 2661012354b ./libstdc++-v3/testsuite/ext/rope.cc ! 92278597b ./libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp 3712176129b ./libstdc++-v3/testsuite/lib/prune.exp ! 2848734369b ./libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp 1352817621b ./libstdc++-v3/testsuite/printnow.c ! 3725824881b ./libstdc++-v3/testsuite/testsuite_hooks.h ! 156463796b ./libstdc++-v3/testsuite/thread/pthread1.cc ! 1550931445b ./libstdc++-v3/testsuite/thread/pthread2.cc ! 1829037829b ./libstdc++-v3/testsuite/thread/pthread3.cc ! 3999709480b ./libstdc++-v3/testsuite/thread/pthread4.cc ! 3966130685b ./libstdc++-v3/testsuite/thread/pthread5.cc ! 2701150431b ./libstdc++-v3/testsuite/thread/pthread6.cc ! 1165386526b ./libstdc++-v3/testsuite_flags.in ! 4084702431b ./libtool.m4 ! 2081401147b ./ltcf-c.sh ! 534669854b ./ltcf-cxx.sh ! 3594421631b ./ltcf-gcj.sh ! 30175378b ./ltconfig ! 2369122487b ./ltmain.sh ! 1660471952b ./maintainer-scripts/ChangeLog ! 3126840705b ./maintainer-scripts/README ! 1905552954b ./maintainer-scripts/crontab 4171969357b ./maintainer-scripts/doc_exclude ! 3945756456b ./maintainer-scripts/gcc_release ! 1797615493b ./maintainer-scripts/snapshot-README ! 4169093075b ./maintainer-scripts/snapshot-index.html ! 3359505648b ./maintainer-scripts/update_version ! 612565256b ./maintainer-scripts/update_web_docs 2568232642b ./maintainer-scripts/update_web_docs_libstdcxx ! 1719002991b ./maintainer-scripts/update_web_docs_old 990942143b ./missing 2656466409b ./mkdep 4236112450b ./mkinstalldirs 902556840b ./move-if-change 1077958069b ./symlink-tree 1370970362b ./ylwrap - 426049005b ./zlib/ChangeLog - 356214916b ./zlib/ChangeLog.gcj - 1790959550b ./zlib/FAQ - 467711448b ./zlib/INDEX - 3901505907b ./zlib/Make_vms.com - 2499419301b ./zlib/Makefile.am - 957823529b ./zlib/Makefile.in - 3707467235b ./zlib/Makefile.riscos - 2343974137b ./zlib/README 1221785251b ./zlib/acinclude.m4 63064805b ./zlib/aclocal.m4 ! 1297198925b ./zlib/adler32.c 2360440520b ./zlib/algorithm.txt 1537725969b ./zlib/amiga/Makefile.pup 3919607569b ./zlib/amiga/Makefile.sas ! 720988996b ./zlib/compress.c ! 784731032b ./zlib/configure ! 3521535304b ./zlib/configure.in ! 3769239525b ./zlib/contrib/README.contrib 215845136b ./zlib/contrib/asm386/gvmat32.asm 4143184108b ./zlib/contrib/asm386/gvmat32c.c 2920733537b ./zlib/contrib/asm386/mkgvmt32.bat 3675080833b ./zlib/contrib/asm386/zlibvc.def 2499069487b ./zlib/contrib/asm386/zlibvc.dsp 993885909b ./zlib/contrib/asm386/zlibvc.dsw - 1760950630b ./zlib/contrib/asm586/README.586 793867511b ./zlib/contrib/asm586/match.S ! 3564267527b ./zlib/contrib/asm686/README.686 3445355807b ./zlib/contrib/asm686/match.S ! 1981000180b ./zlib/contrib/delphi/zlib.mak ! 26085236b ./zlib/contrib/delphi/zlibdef.pas 3962801576b ./zlib/contrib/delphi2/d_zlib.bpr 3205278976b ./zlib/contrib/delphi2/d_zlib.cpp 3618554340b ./zlib/contrib/delphi2/readme.txt 1448048189b ./zlib/contrib/delphi2/zlib.bpg 1970984078b ./zlib/contrib/delphi2/zlib.bpr 2460992656b ./zlib/contrib/delphi2/zlib.cpp 2183495051b ./zlib/contrib/delphi2/zlib.pas ! 812510417b ./zlib/contrib/delphi2/zlib32.bpr ! 2671802940b ./zlib/contrib/delphi2/zlib32.cpp 339148404b ./zlib/contrib/iostream/test.cpp 1960805227b ./zlib/contrib/iostream/zfstream.cpp 933409408b ./zlib/contrib/iostream/zfstream.h - 2533136546b ./zlib/contrib/iostream2/zstream.h - 3297987584b ./zlib/contrib/iostream2/zstream_test.cpp 2533758279b ./zlib/contrib/minizip/ChangeLogUnzip 2310837728b ./zlib/contrib/minizip/Makefile 4259570427b ./zlib/contrib/minizip/miniunz.c --- 15558,15654 ---- 4284948430b ./libstdc++-v3/testsuite/backward/header_tempbuf_h.cc 2753031700b ./libstdc++-v3/testsuite/backward/strstream_members.cc 872857903b ./libstdc++-v3/testsuite/config/default.exp ! 2429476407b ./libstdc++-v3/testsuite/ext/allocators.cc 1828531587b ./libstdc++-v3/testsuite/ext/concept_checks.cc 1683071968b ./libstdc++-v3/testsuite/ext/hash_map.cc 2382325141b ./libstdc++-v3/testsuite/ext/hash_set.cc 2849413443b ./libstdc++-v3/testsuite/ext/headers.cc 2661012354b ./libstdc++-v3/testsuite/ext/rope.cc ! 3529200406b ./libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc ! 3925889556b ./libstdc++-v3/testsuite/ext/stdio_filebuf.cc ! 1094483777b ./libstdc++-v3/testsuite_flags.in ! 2557034066b ./libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp 3712176129b ./libstdc++-v3/testsuite/lib/prune.exp ! 1989654054b ./libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp ! 1069290918b ./libstdc++-v3/testsuite/Makefile.am ! 1400382303b ./libstdc++-v3/testsuite/Makefile.in 1352817621b ./libstdc++-v3/testsuite/printnow.c ! 2335944059b ./libstdc++-v3/testsuite/README ! 3171796543b ./libstdc++-v3/testsuite/testsuite_allocator.cc ! 1172596206b ./libstdc++-v3/testsuite/testsuite_allocator.h ! 4015920727b ./libstdc++-v3/testsuite/testsuite_hooks.cc ! 3986991287b ./libstdc++-v3/testsuite/testsuite_hooks.h ! 1100965735b ./libstdc++-v3/testsuite/thread/pthread1.cc ! 1386230452b ./libstdc++-v3/testsuite/thread/pthread2.cc ! 1095152806b ./libstdc++-v3/testsuite/thread/pthread3.cc ! 4089682994b ./libstdc++-v3/testsuite/thread/pthread4.cc ! 3647024336b ./libstdc++-v3/testsuite/thread/pthread5.cc ! 1701874201b ./libstdc++-v3/testsuite/thread/pthread6.cc ! 1879354273b ./libtool.m4 ! 3680999751b ./ltcf-c.sh ! 809573867b ./ltcf-cxx.sh ! 2744413125b ./ltcf-gcj.sh ! 910615352b ./ltconfig ! 1562969795b ./ltmain.sh ! 2447650149b ./MAINTAINERS ! 3082651464b ./maintainer-scripts/ChangeLog ! 3655238705b ./maintainer-scripts/crontab 4171969357b ./maintainer-scripts/doc_exclude ! 693937008b ./maintainer-scripts/gcc_release ! 3126840705b ./maintainer-scripts/README ! 449123050b ./maintainer-scripts/snapshot-index.html ! 865042342b ./maintainer-scripts/snapshot-README ! 1469123857b ./maintainer-scripts/update_version ! 2459358099b ./maintainer-scripts/update_web_docs 2568232642b ./maintainer-scripts/update_web_docs_libstdcxx ! 3852629653b ./maintainer-scripts/update_web_docs_old ! 459788085b ./Makefile.def ! 353513394b ./Makefile.in ! 3175264286b ./Makefile.tpl 990942143b ./missing 2656466409b ./mkdep 4236112450b ./mkinstalldirs 902556840b ./move-if-change + 3697693037b ./README 1077958069b ./symlink-tree 1370970362b ./ylwrap 1221785251b ./zlib/acinclude.m4 63064805b ./zlib/aclocal.m4 ! 4246695714b ./zlib/adler32.c 2360440520b ./zlib/algorithm.txt 1537725969b ./zlib/amiga/Makefile.pup 3919607569b ./zlib/amiga/Makefile.sas ! 1834055081b ./zlib/ChangeLog ! 26252237b ./zlib/ChangeLog.gcj ! 1397025471b ./zlib/compress.c ! 165956115b ./zlib/configure ! 1753606500b ./zlib/configure.in 215845136b ./zlib/contrib/asm386/gvmat32.asm 4143184108b ./zlib/contrib/asm386/gvmat32c.c 2920733537b ./zlib/contrib/asm386/mkgvmt32.bat 3675080833b ./zlib/contrib/asm386/zlibvc.def 2499069487b ./zlib/contrib/asm386/zlibvc.dsp 993885909b ./zlib/contrib/asm386/zlibvc.dsw 793867511b ./zlib/contrib/asm586/match.S ! 1760950630b ./zlib/contrib/asm586/README.586 3445355807b ./zlib/contrib/asm686/match.S ! 3564267527b ./zlib/contrib/asm686/README.686 3962801576b ./zlib/contrib/delphi2/d_zlib.bpr 3205278976b ./zlib/contrib/delphi2/d_zlib.cpp 3618554340b ./zlib/contrib/delphi2/readme.txt + 812510417b ./zlib/contrib/delphi2/zlib32.bpr + 2671802940b ./zlib/contrib/delphi2/zlib32.cpp 1448048189b ./zlib/contrib/delphi2/zlib.bpg 1970984078b ./zlib/contrib/delphi2/zlib.bpr 2460992656b ./zlib/contrib/delphi2/zlib.cpp 2183495051b ./zlib/contrib/delphi2/zlib.pas ! 26085236b ./zlib/contrib/delphi/zlibdef.pas ! 1981000180b ./zlib/contrib/delphi/zlib.mak ! 3191203911b ./zlib/contrib/iostream2/zstream.h ! 3297987584b ./zlib/contrib/iostream2/zstream_test.cpp 339148404b ./zlib/contrib/iostream/test.cpp 1960805227b ./zlib/contrib/iostream/zfstream.cpp 933409408b ./zlib/contrib/iostream/zfstream.h 2533758279b ./zlib/contrib/minizip/ChangeLogUnzip 2310837728b ./zlib/contrib/minizip/Makefile 4259570427b ./zlib/contrib/minizip/miniunz.c *************** *** 14487,14502 **** 3675080833b ./zlib/contrib/minizip/zlibvc.def 2499069487b ./zlib/contrib/minizip/zlibvc.dsp 993885909b ./zlib/contrib/minizip/zlibvc.dsw 4061615005b ./zlib/contrib/untgz/Makefile 1408736380b ./zlib/contrib/untgz/makefile.w32 1384858048b ./zlib/contrib/untgz/untgz.c 2352798505b ./zlib/contrib/visual-basic.txt ! 4189021895b ./zlib/crc32.c ! 1822942177b ./zlib/deflate.c ! 1789868741b ./zlib/deflate.h 1690938184b ./zlib/descrip.mms ! 2345539147b ./zlib/example.c ! 703718503b ./zlib/gzio.c 3009787290b ./zlib/infblock.c 34847356b ./zlib/infblock.h 763710488b ./zlib/infcodes.c --- 15663,15681 ---- 3675080833b ./zlib/contrib/minizip/zlibvc.def 2499069487b ./zlib/contrib/minizip/zlibvc.dsp 993885909b ./zlib/contrib/minizip/zlibvc.dsw + 3769239525b ./zlib/contrib/README.contrib 4061615005b ./zlib/contrib/untgz/Makefile 1408736380b ./zlib/contrib/untgz/makefile.w32 1384858048b ./zlib/contrib/untgz/untgz.c 2352798505b ./zlib/contrib/visual-basic.txt ! 409540251b ./zlib/crc32.c ! 754093270b ./zlib/deflate.c ! 2321655791b ./zlib/deflate.h 1690938184b ./zlib/descrip.mms ! 1880553404b ./zlib/example.c ! 1790959550b ./zlib/FAQ ! 2238767519b ./zlib/gzio.c ! 467711448b ./zlib/INDEX 3009787290b ./zlib/infblock.c 34847356b ./zlib/infblock.h 763710488b ./zlib/infcodes.c *************** *** 14509,14516 **** 2634414216b ./zlib/inftrees.h 788977750b ./zlib/infutil.c 2297950969b ./zlib/infutil.h 196153738b ./zlib/maketree.c ! 229496420b ./zlib/minigzip.c 955312409b ./zlib/msdos/Makefile.b32 3122518693b ./zlib/msdos/Makefile.bor 73399342b ./zlib/msdos/Makefile.dj2 --- 15688,15699 ---- 2634414216b ./zlib/inftrees.h 788977750b ./zlib/infutil.c 2297950969b ./zlib/infutil.h + 2499419301b ./zlib/Makefile.am + 957823529b ./zlib/Makefile.in + 3707467235b ./zlib/Makefile.riscos 196153738b ./zlib/maketree.c ! 3901505907b ./zlib/Make_vms.com ! 470692683b ./zlib/minigzip.c 955312409b ./zlib/msdos/Makefile.b32 3122518693b ./zlib/msdos/Makefile.bor 73399342b ./zlib/msdos/Makefile.dj2 *************** *** 14527,14538 **** 3298347746b ./zlib/nt/zlib.dnt 2605576410b ./zlib/os2/Makefile.os2 99579017b ./zlib/os2/zlib.def ! 2789763235b ./zlib/trees.c 10665304b ./zlib/trees.h ! 1566688640b ./zlib/uncompr.c ! 2035162903b ./zlib/zconf.h 3626005175b ./zlib/zlib.3 3609968891b ./zlib/zlib.h 191319815b ./zlib/zlib.html ! 957671919b ./zlib/zutil.c ! 4163685086b ./zlib/zutil.h --- 15710,15722 ---- 3298347746b ./zlib/nt/zlib.dnt 2605576410b ./zlib/os2/Makefile.os2 99579017b ./zlib/os2/zlib.def ! 2343974137b ./zlib/README ! 1164927361b ./zlib/trees.c 10665304b ./zlib/trees.h ! 275019746b ./zlib/uncompr.c ! 894113733b ./zlib/zconf.h 3626005175b ./zlib/zlib.3 3609968891b ./zlib/zlib.h 191319815b ./zlib/zlib.html ! 2621638539b ./zlib/zutil.c ! 1523742995b ./zlib/zutil.h diff -Nrc3pad gcc-3.2.3/BUGS gcc-3.3/BUGS *** gcc-3.2.3/BUGS 2003-04-22 06:56:31.000000000 +0000 --- gcc-3.3/BUGS 2003-05-14 00:18:25.000000000 +0000 *************** *** 1,7 **** GCC Bugs ! The latest version of this document is always available at [1]http://gcc.gnu.org/bugs.html. _________________________________________________________________ --- 1,7 ---- GCC Bugs ! The latest version of this document is always available at [1]http://gcc.gnu.org/bugs.html. _________________________________________________________________ *************** Table of Contents *** 13,19 **** + [5]Where to post it + [6]Detailed bug reporting instructions + [7]Detailed bug reporting instructions for GNAT ! + [8]Detailed bug reporting instructions when using a precompiled header * [9]Frequently Reported Bugs in GCC + [10]General --- 13,19 ---- + [5]Where to post it + [6]Detailed bug reporting instructions + [7]Detailed bug reporting instructions for GNAT ! + [8]Detailed bug reporting instructions when using a precompiled header * [9]Frequently Reported Bugs in GCC + [10]General *************** Table of Contents *** 29,64 **** Reporting Bugs ! Our preferred way of receiving bugs is via the [19]GCC GNATS bug reporting system. ! Before you report a bug, please check the [20]list of well-known bugs ! and, if possible in any way, try a current development snapshot. If ! you want to report a bug with versions of GCC before 3.1 we strongly recommend upgrading to the current release first. ! Before reporting that GCC compiles your code incorrectly, please ! compile it with gcc -Wall and see whether this shows anything wrong with your code that could be the cause instead of a bug in GCC. Summarized bug reporting instructions ! After this summary, you'll find detailed bug reporting instructions, ! that explain how to obtain some of the information requested in this summary. What we need ! Please include in your bug report all of the following items, the first three of which can be obtained from the output of gcc -v: * the exact version of GCC; * the system type; * the options given when GCC was configured/built; * the complete command line that triggers the bug; * the compiler output (error messages, warnings, etc.); and ! * the preprocessed file (*.i*) that triggers the bug, generated by adding -save-temps to the complete compilation command, or, in the ! case of a bug report for the GNAT front end, a complete set of source files (see below). What we do not want --- 29,64 ---- Reporting Bugs ! Our preferred way of receiving bugs is via the [19]GCC GNATS bug reporting system. ! Before you report a bug, please check the [20]list of well-known bugs ! and, if possible in any way, try a current development snapshot. If ! you want to report a bug with versions of GCC before 3.1 we strongly recommend upgrading to the current release first. ! Before reporting that GCC compiles your code incorrectly, please ! compile it with gcc -Wall and see whether this shows anything wrong with your code that could be the cause instead of a bug in GCC. Summarized bug reporting instructions ! After this summary, you'll find detailed bug reporting instructions, ! that explain how to obtain some of the information requested in this summary. What we need ! Please include in your bug report all of the following items, the first three of which can be obtained from the output of gcc -v: * the exact version of GCC; * the system type; * the options given when GCC was configured/built; * the complete command line that triggers the bug; * the compiler output (error messages, warnings, etc.); and ! * the preprocessed file (*.i*) that triggers the bug, generated by adding -save-temps to the complete compilation command, or, in the ! case of a bug report for the GNAT front end, a complete set of source files (see below). What we do not want *************** Summarized bug reporting instructions *** 66,224 **** * A source file that #includes header files that are left out of the bug report (see above) * That source file and a collection of header files. ! * An attached archive (tar, zip, shar, whatever) containing all (or some :-) of the above. ! * A code snippet that won't cause the compiler to produce the exact ! output mentioned in the bug report (e.g., a snippet with just a ! few lines around the one that apparently triggers the bug, with ! some pieces replaced with ellipses or comments for extra obfuscation :-) ! * The location (URL) of the package that failed to build (we won't download it, anyway, since you've already given us what we need to duplicate the bug, haven't you? :-) ! * An error that occurs only some of the times a certain file is ! compiled, such that retrying a sufficient number of times results ! in a successful compilation; this is a symptom of a hardware problem, not of a compiler bug (sorry) ! * E-mail messages that complement previous, incomplete bug reports. ! Post a new, self-contained, full bug report instead, if possible as a follow-up to the original bug report ! * Assembly files (*.s) produced by the compiler, or any binary ! files, such as object files, executables, core files, or precompiled header files ! * Duplicate bug reports, or reports of bugs already fixed in the development tree, especially those that have already been reported as fixed last week :-) ! * Bugs in the assembler, the linker or the C library. These are ! separate projects, with separate mailing lists and different bug reporting procedures ! * Bugs in releases or snapshots of GCC not issued by the GNU Project. Report them to whoever provided you with the release ! * Questions about the correctness or the expected behavior of certain constructs that are not GCC extensions. Ask them in forums dedicated to the discussion of the programming language Where to post it ! Please submit your bug report directly to the [21]GCC GNATS bug ! database. Only if this is not possible, mail all information to [22]bug-gcc@gnu.org or [23]gcc-bugs@gcc.gnu.org. ! The GCC lists have message size limits (200 kbytes) and bug reports ! over those limits will currently be bounced. If your bug is larger than that, please post it using the [24]GCC GNATS bug database. Detailed bug reporting instructions ! Please refer to the [25]next section when reporting bugs in GNAT, the ! Ada compiler, or to the [26]one after that when reporting bugs that appear when using a precompiled header. ! In general, all the information we need can be obtained by collecting ! the command line below, as well as its output and the preprocessed file it generates. gcc -v -save-temps all-your-options source-file ! Typically the preprocessed file (extension .i for C or .ii for C++) ! will be large, so please compress the resulting file with one of the ! popular compression programs such as bzip2, gzip, zip or compress (in ! decreasing order of preference). Use maximum compression (-9) if ! available. Please include the compressed preprocessor output in your ! bug report, even if the source code is freely available elsewhere; it makes the job of our volunteer testers much easier. ! The only excuses to not send us the preprocessed sources are (i) if ! you've found a bug in the preprocessor, (ii) if you've reduced the ! testcase to a small file that doesn't include any other file or (iii) ! if the bug appears only when using precompiled headers. If you can't ! post the preprocessed sources because they're proprietary code, then try to create a small file that triggers the same problem. ! Since we're supposed to be able to re-create the assembly output ! (extension .s), you usually should not include it in the bug report, ! although you may want to post parts of it to point out assembly code you consider to be wrong. Whether to use MIME attachments or uuencode is up to you. In any case, ! make sure the compiler command line, version and error output are in plain text, so that we don't have to decode the bug report in order to ! tell who should take care of it. A meaningful subject indicating language and platform also helps. ! Please avoid posting an archive (.tar, .shar or .zip); we generally ! need just a single file to reproduce the bug (the .i/.ii preprocessed ! file), and, by storing it in an archive, you're just making our ! volunteers' jobs harder. Only when your bug report requires multiple ! source files to be reproduced should you use an archive. In any case, ! make sure the compiler version, error message, etc, are included in ! the body of your bug report as plain text, even if needlessly duplicated as part of an archive. ! If you fail to supply enough information for a bug report to be ! reproduced, someone will probably ask you to post additional ! information (or just ignore your bug report, if they're in a bad day, ! so try to get it right on the first posting :-). In this case, please post the additional information to the bug reporting mailing list, not ! just to the person who requested it, unless explicitly told so. If possible, please include in this follow-up all the information you had ! supplied in the incomplete bug report (including the preprocessor output), so that the new bug report is self-contained. Detailed bug reporting instructions for GNAT ! See the [27]previous section for bug reporting instructions for GCC language implementations other than Ada. ! Bug reports have to contain at least the following information in order to be useful: * the exact version of GCC, as shown by "gcc -v"; * the system type; * the options when GCC was configured/built; ! * the exact command line passed to the gcc program triggering the ! bug (not just the flags passed to gnatmake, but gnatmake prints the parameters it passed to gcc) * a collection of source files for reproducing the bug, preferably a minimal set (see below); * a description of the expected behavior; * a description of actual behavior. ! If your code depends on additional source files (usually package specifications), submit the source code for these compilation units in ! a single file that is acceptable input to gnatchop, i.e. contains no ! non-Ada text. If the compilation terminated normally, you can usually obtain a list of dependencies using the "gnatls -d main_unit" command, ! where main_unit is the file name of the main compilation unit (which is also passed to gcc). ! If you report a bug which causes the compiler to print a bug box, include that bug box in your report, and do not forget to send all the source files listed after the bug box along with your report. ! If you use gnatprep, be sure to send in preprocessed sources (unless you have to report a bug in gnatprep). ! When you have checked that your report meets these criteria, please ! submit it according to our [28]generic instructions. (If you use a ! mailing list for reporting, please include an "[Ada]" tag in the subject.) Detailed bug reporting instructions when using a precompiled header ! If you're encountering a bug when using a precompiled header, the first thing to do is to delete the precompiled header, and try running ! the same GCC command again. If the bug happens again, the bug doesn't ! really involve precompiled headers, please report it without using them by following the instructions [29]above. ! If you've found a bug while building a precompiled header (for ! instance, the compiler crashes), follow the usual instructions [30]above. ! If you've found a real precompiled header bug, what we'll need to ! reproduce it is the sources to build the precompiled header (as a single .i file), the source file that uses the precompiled header, any ! other headers that source file includes, and the command lines that you used to build the precompiled header and to use it. Please don't send us the actual precompiled header. It is likely to be --- 66,224 ---- * A source file that #includes header files that are left out of the bug report (see above) * That source file and a collection of header files. ! * An attached archive (tar, zip, shar, whatever) containing all (or some :-) of the above. ! * A code snippet that won't cause the compiler to produce the exact ! output mentioned in the bug report (e.g., a snippet with just a ! few lines around the one that apparently triggers the bug, with ! some pieces replaced with ellipses or comments for extra obfuscation :-) ! * The location (URL) of the package that failed to build (we won't download it, anyway, since you've already given us what we need to duplicate the bug, haven't you? :-) ! * An error that occurs only some of the times a certain file is ! compiled, such that retrying a sufficient number of times results ! in a successful compilation; this is a symptom of a hardware problem, not of a compiler bug (sorry) ! * E-mail messages that complement previous, incomplete bug reports. ! Post a new, self-contained, full bug report instead, if possible as a follow-up to the original bug report ! * Assembly files (*.s) produced by the compiler, or any binary ! files, such as object files, executables, core files, or precompiled header files ! * Duplicate bug reports, or reports of bugs already fixed in the development tree, especially those that have already been reported as fixed last week :-) ! * Bugs in the assembler, the linker or the C library. These are ! separate projects, with separate mailing lists and different bug reporting procedures ! * Bugs in releases or snapshots of GCC not issued by the GNU Project. Report them to whoever provided you with the release ! * Questions about the correctness or the expected behavior of certain constructs that are not GCC extensions. Ask them in forums dedicated to the discussion of the programming language Where to post it ! Please submit your bug report directly to the [21]GCC GNATS bug ! database. Only if this is not possible, mail all information to [22]bug-gcc@gnu.org or [23]gcc-bugs@gcc.gnu.org. ! The GCC lists have message size limits (200 kbytes) and bug reports ! over those limits will currently be bounced. If your bug is larger than that, please post it using the [24]GCC GNATS bug database. Detailed bug reporting instructions ! Please refer to the [25]next section when reporting bugs in GNAT, the ! Ada compiler, or to the [26]one after that when reporting bugs that appear when using a precompiled header. ! In general, all the information we need can be obtained by collecting ! the command line below, as well as its output and the preprocessed file it generates. gcc -v -save-temps all-your-options source-file ! Typically the preprocessed file (extension .i for C or .ii for C++) ! will be large, so please compress the resulting file with one of the ! popular compression programs such as bzip2, gzip, zip or compress (in ! decreasing order of preference). Use maximum compression (-9) if ! available. Please include the compressed preprocessor output in your ! bug report, even if the source code is freely available elsewhere; it makes the job of our volunteer testers much easier. ! The only excuses to not send us the preprocessed sources are (i) if ! you've found a bug in the preprocessor, (ii) if you've reduced the ! testcase to a small file that doesn't include any other file or (iii) ! if the bug appears only when using precompiled headers. If you can't ! post the preprocessed sources because they're proprietary code, then try to create a small file that triggers the same problem. ! Since we're supposed to be able to re-create the assembly output ! (extension .s), you usually should not include it in the bug report, ! although you may want to post parts of it to point out assembly code you consider to be wrong. Whether to use MIME attachments or uuencode is up to you. In any case, ! make sure the compiler command line, version and error output are in plain text, so that we don't have to decode the bug report in order to ! tell who should take care of it. A meaningful subject indicating language and platform also helps. ! Please avoid posting an archive (.tar, .shar or .zip); we generally ! need just a single file to reproduce the bug (the .i/.ii preprocessed ! file), and, by storing it in an archive, you're just making our ! volunteers' jobs harder. Only when your bug report requires multiple ! source files to be reproduced should you use an archive. In any case, ! make sure the compiler version, error message, etc, are included in ! the body of your bug report as plain text, even if needlessly duplicated as part of an archive. ! If you fail to supply enough information for a bug report to be ! reproduced, someone will probably ask you to post additional ! information (or just ignore your bug report, if they're in a bad day, ! so try to get it right on the first posting :-). In this case, please post the additional information to the bug reporting mailing list, not ! just to the person who requested it, unless explicitly told so. If possible, please include in this follow-up all the information you had ! supplied in the incomplete bug report (including the preprocessor output), so that the new bug report is self-contained. Detailed bug reporting instructions for GNAT ! See the [27]previous section for bug reporting instructions for GCC language implementations other than Ada. ! Bug reports have to contain at least the following information in order to be useful: * the exact version of GCC, as shown by "gcc -v"; * the system type; * the options when GCC was configured/built; ! * the exact command line passed to the gcc program triggering the ! bug (not just the flags passed to gnatmake, but gnatmake prints the parameters it passed to gcc) * a collection of source files for reproducing the bug, preferably a minimal set (see below); * a description of the expected behavior; * a description of actual behavior. ! If your code depends on additional source files (usually package specifications), submit the source code for these compilation units in ! a single file that is acceptable input to gnatchop, i.e. contains no ! non-Ada text. If the compilation terminated normally, you can usually obtain a list of dependencies using the "gnatls -d main_unit" command, ! where main_unit is the file name of the main compilation unit (which is also passed to gcc). ! If you report a bug which causes the compiler to print a bug box, include that bug box in your report, and do not forget to send all the source files listed after the bug box along with your report. ! If you use gnatprep, be sure to send in preprocessed sources (unless you have to report a bug in gnatprep). ! When you have checked that your report meets these criteria, please ! submit it according to our [28]generic instructions. (If you use a ! mailing list for reporting, please include an "[Ada]" tag in the subject.) Detailed bug reporting instructions when using a precompiled header ! If you're encountering a bug when using a precompiled header, the first thing to do is to delete the precompiled header, and try running ! the same GCC command again. If the bug happens again, the bug doesn't ! really involve precompiled headers, please report it without using them by following the instructions [29]above. ! If you've found a bug while building a precompiled header (for ! instance, the compiler crashes), follow the usual instructions [30]above. ! If you've found a real precompiled header bug, what we'll need to ! reproduce it is the sources to build the precompiled header (as a single .i file), the source file that uses the precompiled header, any ! other headers that source file includes, and the command lines that you used to build the precompiled header and to use it. Please don't send us the actual precompiled header. It is likely to be *************** Detailed bug reporting instructions when *** 229,246 **** Fortran ! Fortran bugs are documented in the G77 manual rather than explicitly ! listed here. Please see [31]Known Causes of Trouble with GNU Fortran in the G77 manual. _________________________________________________________________ C ! The following are not bugs in the C compiler, but are reported often enough to warrant a mention here. Cannot initialize a static variable with stdin. ! This has nothing to do with GCC, but people ask us about it a lot. Code like this: #include --- 229,246 ---- Fortran ! Fortran bugs are documented in the G77 manual rather than explicitly ! listed here. Please see [31]Known Causes of Trouble with GNU Fortran in the G77 manual. _________________________________________________________________ C ! The following are not bugs in the C compiler, but are reported often enough to warrant a mention here. Cannot initialize a static variable with stdin. ! This has nothing to do with GCC, but people ask us about it a lot. Code like this: #include *************** C *** 248,268 **** FILE *yyin = stdin; will not compile with GNU libc (GNU/Linux libc6), because stdin ! is not a constant. This was done deliberately, to make it ! easier to maintain binary compatibility when the type FILE ! needs to be changed. It is surprising for people used to ! traditional Unix C libraries, but it is permitted by the C standard. ! This construct commonly occurs in code generated by old ! versions of lex or yacc. We suggest you try regenerating the ! parser with a current version of flex or bison, respectively. ! In your own code, the appropriate fix is to move the initialization to the beginning of main. ! There is a common misconception that the GCC developers are ! responsible for GNU libc. These are in fact two entirely ! separate projects; please check the [32]GNU libc web pages for details. Cannot use preprocessor directive in macro arguments. --- 248,268 ---- FILE *yyin = stdin; will not compile with GNU libc (GNU/Linux libc6), because stdin ! is not a constant. This was done deliberately, to make it ! easier to maintain binary compatibility when the type FILE ! needs to be changed. It is surprising for people used to ! traditional Unix C libraries, but it is permitted by the C standard. ! This construct commonly occurs in code generated by old ! versions of lex or yacc. We suggest you try regenerating the ! parser with a current version of flex or bison, respectively. ! In your own code, the appropriate fix is to move the initialization to the beginning of main. ! There is a common misconception that the GCC developers are ! responsible for GNU libc. These are in fact two entirely ! separate projects; please check the [32]GNU libc web pages for details. Cannot use preprocessor directive in macro arguments. *************** FILE *yyin = stdin; *** 278,288 **** and you got a whole pile of error messages: ! test.c:11: warning: preprocessing directive not recognized within macro arg ! test.c:11: warning: preprocessing directive not recognized within macro arg ! test.c:11: warning: preprocessing directive not recognized within macro arg test.c: In function `foo': test.c:6: undefined or invalid # directive --- 278,288 ---- and you got a whole pile of error messages: ! test.c:11: warning: preprocessing directive not recognized within macro arg ! test.c:11: warning: preprocessing directive not recognized within macro arg ! test.c:11: warning: preprocessing directive not recognized within macro arg test.c: In function `foo': test.c:6: undefined or invalid # directive *************** FILE *yyin = stdin; *** 292,310 **** test.c:11: parse error before `#' Update: As of GCC 3.2 this kind of construct is always accepted ! and CPP will probably do what you expect, but see the manual for detailed semantics. ! However, versions of GCC prior to 3.2 did not allow you to put ! #ifdef (or any other directive) inside the arguments of a ! macro. Your C library's happens to define memcpy as ! a macro - this is perfectly legitimate. The code therefore would not compile. ! This kind of code is not portable. It is "undefined behavior" ! according to the C standard; that means different compilers ! will do different things with it. It is always possible to ! rewrite code which uses conditionals inside macros so that it doesn't. You could write the above example #ifdef PLATFORM1 --- 292,310 ---- test.c:11: parse error before `#' Update: As of GCC 3.2 this kind of construct is always accepted ! and CPP will probably do what you expect, but see the manual for detailed semantics. ! However, versions of GCC prior to 3.2 did not allow you to put ! #ifdef (or any other directive) inside the arguments of a ! macro. Your C library's happens to define memcpy as ! a macro - this is perfectly legitimate. The code therefore would not compile. ! This kind of code is not portable. It is "undefined behavior" ! according to the C standard; that means different compilers ! will do different things with it. It is always possible to ! rewrite code which uses conditionals inside macros so that it doesn't. You could write the above example #ifdef PLATFORM1 *************** FILE *yyin = stdin; *** 313,396 **** memcpy(dest, src, 24); #endif ! This is a bit more typing, but I personally think it's better style in addition to being more portable. ! In recent versions of glibc, printf is among the functions which are implemented as macros. _________________________________________________________________ C++ ! This is the list of bugs (and non-bugs) in g++ (aka GNU C++) that are ! reported very often, but not yet fixed. While it is certainly better ! to fix bugs instead of documenting them, this document might save ! people the effort of writing a bug report when the bug is already well-known. [33]How to report bugs tells you how to report a bug. ! There are many reasons why reported bugs don't get fixed. It might be ! difficult to fix, or fixing it might break compatibility. Often, ! reports get a low priority when there is a simple work-around. In particular, bugs caused by invalid C++ code have a simple work-around, ! fix the code. Now that there is an agreed ISO/ANSI standard for C++, ! the compiler has a definitive document to adhere to. Earlier versions might have accepted source code that is no longer C++. This means that code which might have `worked' in a previous version, is now rejected. You should update your code to be C++. ! You should try to use the latest stable release of the GNU C++ compiler. Common problems updating from G++ 2.95 to G++ 3.0 ! G++ 3.0 conforms much closer to the ISO C++ standard (available at [34]http://www.ncits.org/cplusplus.htm). ! We have also implemented some of the core and library defect reports (available at ! [35]http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html & [36]http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html respectively). ! * The ABI has changed. This means that both class layout and name ! mangling is different. You must recompile all c++ libraries (if you don't you will get link errors). ! * The standard library is much more conformant, and uses the std:: namespace. * std:: is now a real namespace, not an alias for ::. * The standard header files for the c library don't end with .h, but begin with c (i.e. rather than ). The .h names are still available, but are deprecated. * is deprecated, use instead. ! * streambuf::seekoff & streambuf::seekpos are private, instead use streambuf::pubseekoff & streambuf::pubseekpos respectively. * If std::operator << (std::ostream &, long long) doesn't exist, you need to recompile libstdc++ with --enable-long-long. ! This means you may get lots of errors about things like strcmp not being found. You've most likely forgotten to tell the compiler to look in the std:: namespace. There are several ways to do this, ! * Say, std::strcmp at the call. This is the most explicit way of saying what you mean. ! * Say, using std::strcmp; somewhere before the call. You will need ! to do this for each function or type you wish to use from the standard library. ! * Say, using namespace std; somewhere before the call. This is the ! quick-but-dirty fix. This brings the whole of the std:: namespace into scope. Never do this in a header file, as you will be forcing users of your header file to do the same. ABI bugs ! 3.0 had a new ABI, which affected class layout, function mangling and ! calling conventions. We had intended it to be complete, unfortunately ! some issues came to light, too late to fix in the 3.0 series. The ABI ! should not change in dot releases, so we addressed most issues in GCC 3.1. Covariant return types ! We do not implement non-trivial covariant returns. We also ! generate incorrect virtual function tables for trivial ! covariance. Although trivial covariance will work, it is incompatible with the ABI. GNATS PR 3706 tracks this problem. Non-bugs --- 313,396 ---- memcpy(dest, src, 24); #endif ! This is a bit more typing, but I personally think it's better style in addition to being more portable. ! In recent versions of glibc, printf is among the functions which are implemented as macros. _________________________________________________________________ C++ ! This is the list of bugs (and non-bugs) in g++ (aka GNU C++) that are ! reported very often, but not yet fixed. While it is certainly better ! to fix bugs instead of documenting them, this document might save ! people the effort of writing a bug report when the bug is already well-known. [33]How to report bugs tells you how to report a bug. ! There are many reasons why reported bugs don't get fixed. It might be ! difficult to fix, or fixing it might break compatibility. Often, ! reports get a low priority when there is a simple work-around. In particular, bugs caused by invalid C++ code have a simple work-around, ! fix the code. Now that there is an agreed ISO/ANSI standard for C++, ! the compiler has a definitive document to adhere to. Earlier versions might have accepted source code that is no longer C++. This means that code which might have `worked' in a previous version, is now rejected. You should update your code to be C++. ! You should try to use the latest stable release of the GNU C++ compiler. Common problems updating from G++ 2.95 to G++ 3.0 ! G++ 3.0 conforms much closer to the ISO C++ standard (available at [34]http://www.ncits.org/cplusplus.htm). ! We have also implemented some of the core and library defect reports (available at ! [35]http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html & [36]http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html respectively). ! * The ABI has changed. This means that both class layout and name ! mangling is different. You must recompile all c++ libraries (if you don't you will get link errors). ! * The standard library is much more conformant, and uses the std:: namespace. * std:: is now a real namespace, not an alias for ::. * The standard header files for the c library don't end with .h, but begin with c (i.e. rather than ). The .h names are still available, but are deprecated. * is deprecated, use instead. ! * streambuf::seekoff & streambuf::seekpos are private, instead use streambuf::pubseekoff & streambuf::pubseekpos respectively. * If std::operator << (std::ostream &, long long) doesn't exist, you need to recompile libstdc++ with --enable-long-long. ! This means you may get lots of errors about things like strcmp not being found. You've most likely forgotten to tell the compiler to look in the std:: namespace. There are several ways to do this, ! * Say, std::strcmp at the call. This is the most explicit way of saying what you mean. ! * Say, using std::strcmp; somewhere before the call. You will need ! to do this for each function or type you wish to use from the standard library. ! * Say, using namespace std; somewhere before the call. This is the ! quick-but-dirty fix. This brings the whole of the std:: namespace into scope. Never do this in a header file, as you will be forcing users of your header file to do the same. ABI bugs ! 3.0 had a new ABI, which affected class layout, function mangling and ! calling conventions. We had intended it to be complete, unfortunately ! some issues came to light, too late to fix in the 3.0 series. The ABI ! should not change in dot releases, so we addressed most issues in GCC 3.1. Covariant return types ! We do not implement non-trivial covariant returns. We also ! generate incorrect virtual function tables for trivial ! covariance. Although trivial covariance will work, it is incompatible with the ABI. GNATS PR 3706 tracks this problem. Non-bugs *************** C++ *** 398,443 **** Here are some features that have been reported as bugs, but are not. Nested classes can access private types of the containing class. ! G++ now implements type access control on member types. Defect ! report 45 clarifies that nested classes are members of the ! class they are nested in, and so are granted access to private members of that class. Classes in exception specifiers must be complete types. ! [15.4]/1 tells you that you cannot have an incomplete type, or ! pointer to incomplete (other than cv void *) in an exception specification. G++ emits two copies of constructors and destructors. ! In general there are three types of constructors (and destructors). 1. The complete object constructor/destructor. 2. The base object constructor/destructor. 3. The allocating destructor/deallocating destructor. ! The first two are different, when virtual base classes are involved. In some cases we can do better, and this is logged in GNATS. Exceptions don't work in multithreaded applications. ! You need to rebuild g++ and libstdc++ with --enable-threads. ! Remember, c++ exceptions are not like hardware interrupts. You ! cannot throw an exception in one thread and catch it in ! another. You cannot throw an exception from a signal handler, and catch it in the main thread. Global destructors are not run in the correct order. ! Global destructors should be run in the reverse order of their ! constructors completing. In most cases this is the same as the ! reverse order of constructors starting, but sometimes it is ! different, and that is important. You need to compile and link ! your programs with --use-cxa-atexit. We have not turned this ! switch on by default, as it requires a cxa aware runtime library (libc, glibc, or equivalent). Problems with floating point computations. ! In a number of cases, GCC appears to perform floating point computations incorrectly. For example, the program #include --- 398,443 ---- Here are some features that have been reported as bugs, but are not. Nested classes can access private types of the containing class. ! G++ now implements type access control on member types. Defect ! report 45 clarifies that nested classes are members of the ! class they are nested in, and so are granted access to private members of that class. Classes in exception specifiers must be complete types. ! [15.4]/1 tells you that you cannot have an incomplete type, or ! pointer to incomplete (other than cv void *) in an exception specification. G++ emits two copies of constructors and destructors. ! In general there are three types of constructors (and destructors). 1. The complete object constructor/destructor. 2. The base object constructor/destructor. 3. The allocating destructor/deallocating destructor. ! The first two are different, when virtual base classes are involved. In some cases we can do better, and this is logged in GNATS. Exceptions don't work in multithreaded applications. ! You need to rebuild g++ and libstdc++ with --enable-threads. ! Remember, c++ exceptions are not like hardware interrupts. You ! cannot throw an exception in one thread and catch it in ! another. You cannot throw an exception from a signal handler, and catch it in the main thread. Global destructors are not run in the correct order. ! Global destructors should be run in the reverse order of their ! constructors completing. In most cases this is the same as the ! reverse order of constructors starting, but sometimes it is ! different, and that is important. You need to compile and link ! your programs with --use-cxa-atexit. We have not turned this ! switch on by default, as it requires a cxa aware runtime library (libc, glibc, or equivalent). Problems with floating point computations. ! In a number of cases, GCC appears to perform floating point computations incorrectly. For example, the program #include *************** C++ *** 448,479 **** std::cout << (int)(((max - min) / width) - 1) << std::endl; } ! might print 49 on some systems and optimization levels, and 48 on others. ! The is the result of rounding: The computer cannot represent all real numbers exactly, so it has to use approximations. When ! computing with approximation, the computer needs to round to the nearest representable number. ! This is not a bug in the compiler, but an inherent limitation ! of the float and double types. Please study [37]this paper for more information. Templates, scoping, and digraphs. ! If you have a class in global namespace, say named X, and want ! to give it as a template argument to some other class, say ! std::vector, then this here fails with a parser error: std::vector<::X>. ! The reason is that the standard mandates that the sequence <: ! is treated as if it were the token [, and the parser then reports a parse error before the character : (by which it means ! the second colon). There are several such combinations of characters, and they are called digraphs. ! The simplest way to avoid this is to write std::vector< ::X>, ! i.e. place a space between the opening angle bracket and the scope operator. Missing features --- 448,479 ---- std::cout << (int)(((max - min) / width) - 1) << std::endl; } ! might print 49 on some systems and optimization levels, and 48 on others. ! The is the result of rounding: The computer cannot represent all real numbers exactly, so it has to use approximations. When ! computing with approximation, the computer needs to round to the nearest representable number. ! This is not a bug in the compiler, but an inherent limitation ! of the float and double types. Please study [37]this paper for more information. Templates, scoping, and digraphs. ! If you have a class in global namespace, say named X, and want ! to give it as a template argument to some other class, say ! std::vector, then this here fails with a parser error: std::vector<::X>. ! The reason is that the standard mandates that the sequence <: ! is treated as if it were the token [, and the parser then reports a parse error before the character : (by which it means ! the second colon). There are several such combinations of characters, and they are called digraphs. ! The simplest way to avoid this is to write std::vector< ::X>, ! i.e. place a space between the opening angle bracket and the scope operator. Missing features *************** C++ *** 481,502 **** We know some things are missing from G++. The export keyword is not implemented. ! Most C++ compilers (G++ included) do not yet implement export, ! which is necessary for separate compilation of template ! declarations and definitions. Without export, a template ! definition must be in scope to be used. The obvious workaround ! is simply to place all definitions in the header itself. ! Alternatively, the compilation unit containing template definitions may be included from the header. Two stage lookup in templates is not implemented. [14.6] specifies how names are looked up inside a template. G++ ! does not do this correctly, but for most templates this will not be noticeable. Parse errors for "simple" code ! Up to and including GCC 3.0, the compiler will give "parse error" for seemingly simple code, such as struct A{ A(); --- 481,502 ---- We know some things are missing from G++. The export keyword is not implemented. ! Most C++ compilers (G++ included) do not yet implement export, ! which is necessary for separate compilation of template ! declarations and definitions. Without export, a template ! definition must be in scope to be used. The obvious workaround ! is simply to place all definitions in the header itself. ! Alternatively, the compilation unit containing template definitions may be included from the header. Two stage lookup in templates is not implemented. [14.6] specifies how names are looked up inside a template. G++ ! does not do this correctly, but for most templates this will not be noticeable. Parse errors for "simple" code ! Up to and including GCC 3.0, the compiler will give "parse error" for seemingly simple code, such as struct A{ A(); *************** void foo(){ *** 515,528 **** B(A(2)).func(); //B temporary, initialized with A temporary } ! The problem is that GCC starts to parse the declaration of b as a ! function b returning B, taking a function returning A as an argument. ! When it sees the 1, it is too late. The work-around in these cases is to add additional parentheses around the expressions that are mistaken as declarations: (B(A(2))).func(); ! Sometimes, even that is not enough; to show the compiler that this should be really an expression, a comma operator with a dummy argument can be used: B b((0,A()),A(1)); --- 515,528 ---- B(A(2)).func(); //B temporary, initialized with A temporary } ! The problem is that GCC starts to parse the declaration of b as a ! function b returning B, taking a function returning A as an argument. ! When it sees the 1, it is too late. The work-around in these cases is to add additional parentheses around the expressions that are mistaken as declarations: (B(A(2))).func(); ! Sometimes, even that is not enough; to show the compiler that this should be really an expression, a comma operator with a dummy argument can be used: B b((0,A()),A(1)); *************** A B::f1(bool b) *** 542,563 **** return a; } ! The problem is that the compiler interprets A() as a function (taking ! no arguments, returning A), and (A()) as a cast - with a missing ! expression, hence the parse error. The work-around is to omit the parentheses: if (b) return A(); ! This problem occurs in a number of variants; in throw statements, ! people also frequently put the object in parentheses. The exact error ! also somewhat varies with the compiler version. The work-arounds ! proposed do not change the semantics of the program at all; they make them perhaps less readable. Optimization at -O3 takes a very long time ! At -O3, all functions are candidates for inlining. The heuristic used has some deficiencies which show up when allowed such freedom. This is g++ specific, as it has an earlier inliner than gcc. --- 542,563 ---- return a; } ! The problem is that the compiler interprets A() as a function (taking ! no arguments, returning A), and (A()) as a cast - with a missing ! expression, hence the parse error. The work-around is to omit the parentheses: if (b) return A(); ! This problem occurs in a number of variants; in throw statements, ! people also frequently put the object in parentheses. The exact error ! also somewhat varies with the compiler version. The work-arounds ! proposed do not change the semantics of the program at all; they make them perhaps less readable. Optimization at -O3 takes a very long time ! At -O3, all functions are candidates for inlining. The heuristic used has some deficiencies which show up when allowed such freedom. This is g++ specific, as it has an earlier inliner than gcc. diff -Nrc3pad gcc-3.2.3/ChangeLog gcc-3.3/ChangeLog *** gcc-3.2.3/ChangeLog 2003-04-22 06:14:01.000000000 +0000 --- gcc-3.3/ChangeLog 2003-05-14 00:08:52.000000000 +0000 *************** *** 1,91 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-02-12 Marc Espie ! * config-ml.in: Propagate DESTDIR. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. 2003-01-30 Roger Sayle * config.guess: Updated to 2003-01-30's version. * config.sub: Updated to 2003-01-28's version. ! 2003-01-28 Christian Cornelssen ! * Makefile.in (BASE_FLAGS_TO_PASS): Also pass DESTDIR. ! (MAKEDIRS): Prepend $(DESTDIR) to installdir names. (install-info, dir.info): Prepend $(DESTDIR) to $(infodir). ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. 2002-11-18 Gerald Pfeifer * MAINTAINERS: Complete James Dennett's entry. ! 2002-11-18  Eric Botcazou   * MAINTAINERS (Write After Approval): Add myself. ! 2002-11-14 Gabriel Dos Reis ! * MAINTAINERS: Remove from write-after-approval-list, uniformize ! email. ! 2002-11-08 Neil Booth ! * MAINTAINERS: Fix email address. ! 2002-11-05 Nick Clifton ! * MAINTAINERS: Fix typo in my email address. ! 2002-11-05 Paolo Carlini ! * MAINTAINERS (Write After Approval): Remove myself. ! (Various Maintainers: c++ runtime libs): Add myself. ! 2002-10-07 Kaveh R. Ghazi ! * Makefile.in (CFLAGS_FOR_TARGET): Add -O2. 2002-09-14 Kazu Hirata * MAINTAINERS: Update my email address. ! 2002-09-14 Stephane Carrez ! * MAINTAINERS: Update my email address. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. 2002-07-08 Phil Edwards * configure.in (gxx_include_dir): Change to match versioned C++ headers if --enable-version-specific-runtime-libs is used. ! 2002-06-27 Benjamin Kosnik * config.if (libstdcxx_incdir): Version C++ headers. ! (cxx_incdir): Remove. ! 2002-06-24 Phil Edwards ! * configure: Revert in-srcdir redirect upon request. ! * .cvsignore: Add Makefile. ! * Makefile: Removed. 2002-06-18 Phil Edwards --- 1,560 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-04 Gerald Pfeifer ! ! * MAINTAINERS: Remove duplicate entries in Write After Approval. ! ! 2003-05-03 Chris Demetriou ! ! Merge from mainline: ! 2003-05-02 Chris Demetriou ! * Makefile.tpl: Require "makeinfo" from texinfo 4.2 or later. ! * Makefile.in: Regenerate. ! ! 2003-04-29 Gerald Pfeifer ! ! * Makefile.tpl (MAKEINFOFLAGS): Use --no-split instead of ! --split-size. ! * Makefile.in: Regenerate. ! ! 2003-04-25 Gerald Pfeifer ! ! * Makefile.tpl (MAKEINFOFLAGS): Default to --split-size=5000000. ! * Makefile.in: Regenerate. ! ! 2003-04-08 Joel Sherrill ! ! * MAINTAINERS: Add my email address. ! ! 2003-04-03 Gerald Pfeifer ! ! Backport from mainline. ! ! 2003-03-10 Ben Elliston ! ! * MAINTAINERS: Update my mail address. ! ! 2003-03-09 Franz Sirl ! ! * configure.in (gxx_include_dir): Fix typo. ! ! 2003-02-21 Zack Weinberg ! ! * MAINTAINERS: Copy from HEAD. ! ! 2003-02-19 Alexandre Oliva ! ! * libtool.m4 (LD): Append -melf* option to LD on IRIX with GNU ld. ! * ltconfig: Handle it. ! * ltcf-cxx.sh: Use with_gnu_ld passed as a shell variable instead of ! auto-detecting it. ! ! 2003-02-19 Alexandre Oliva ! ! * ltcf-cxx.sh: Replace $linker_flags with $compiler_flags wherever ! it is used as argument to $CC. ! * ltcf-gcj.sh: Likewise. ! ! 2003-02-18 Jason Merrill ! ! * Makefile.tpl (check-c++): Allow parallelism. ! ! 2003-02-16 Gerald Pfeifer ! ! * MAINTAINERS: Remove John Carr (who never actually had access to ! gcc.gnu.org). ! ! 2003-02-06 Andreas Tobler ! ! * MAINTAINERS: Add myself to write-after-approval list. ! ! 2003-02-06 Gerald Pfeifer ! ! * MAINTAINERS: Remove duplicate entry for Bernd Schmidt from Write ! After Approval. 2003-01-30 Roger Sayle * config.guess: Updated to 2003-01-30's version. * config.sub: Updated to 2003-01-28's version. ! 2003-01-30 Alexandre Oliva ! * config.if: If gcc_version is already set, just use it. Don't set ! gcc_version_trigger if it's already set, otherwise set it to ! gcc/version.c, but only if the file exists. If it is not set and ! gcc/version.c does not exist, try to extract the version number from ! $CC. ! ! 2003-01-26 Christian Cornelssen ! ! * Makefile.tpl (BASE_FLAGS_TO_PASS): Also pass DESTDIR. (install-info, dir.info): Prepend $(DESTDIR) to $(infodir). + * Makefile.in: Regenerate. ! 2003-01-22 Volker Reichelt ! * MAINTAINERS: Move myself from GNATS-only-accounts to ! write-after-approval. ! ! 2002-12-31 Tom Tromey ! ! * Makefile.in: Rebuilt. ! * Makefile.def (target_modules) [libffi]: Allow installation. ! ! 2002-12-13 Jason Merrill ! ! * Makefile.tpl (check-gcc-c++): Renamed from check-c++. Don't run ! library tests. ! (check-c++): Just depend on it and check-target-libstdc++-v3. ! * Makefile.in: Regenerate. ! ! 2002-12-12 Alexandre Oliva ! ! * Makefile.tpl (configure-target-rda): Depend on $(ALL_GCC_C). ! * Makefile.in: Rebuilt. ! ! 2002-12-25 Svein E. Seldal ! ! * config.sub: Import from master repository ! * config.guess: Ditto ! ! 2002-12-13 Jason Merrill ! ! * Makefile.in (check-gcc-c++): Renamed from check-c++. Don't run ! library tests. ! (check-c++): Just depend on it and check-target-libstdc++-v3. ! ! 2002-12-12 Alexandre Oliva ! ! * Makefile.in (configure-target-rda): Depend on ALL_GCC_C. ! ! 2002-12-09 Svein E. Seldal ! ! * config.sub: Import from master repository ! * config.guess: Ditto ! * MAINTAINERS: Added Svein Seldal under write after approval ! ! 2002-12-05 Gerald Pfeifer ! ! * MAINTAINERS: Add Christian Ehrhardt under "GNATS only". ! ! 2002-11-28 Geoffrey Keating ! ! * configure.in: Move host-specific darwin noconfigdirs into ! the host-specific section. ! ! 2002-11-19 Rainer Orth ! ! * ltconfig (osf[345]): Append $major to soname_spec. ! Reflect this in library_names_spec. ! * ltmain.sh (osf): Prefix $major with . for use as extension. ! ! 2002-11-19 Andreas Jaeger ! ! * libtool.m4 (libtool_flags): Add patch from libtool CVS: Support ! linking of 32-bit libraries with ld on the x86-64, ppc64, s390x ! and sparc64 GNU/Linux systems. ! ! 2002-11-19 Nathan Sidwell ! ! * MAINTAINERS: Update email. 2002-11-18 Gerald Pfeifer * MAINTAINERS: Complete James Dennett's entry. ! 2002-11-15 Eric Botcazou * MAINTAINERS (Write After Approval): Add myself. ! 2002-11-13 Bruce Korb ! * Makefile.tpl: syntactic cleanup ! 2002-11-13 Stuart Hastings ! * MAINTAINERS: Add myself to write-after-approval list. ! 2002-11-11 Jonathan Wakely ! * MAINTAINERS (Write After Approval): Add myself. ! 2002-11-04 Adam Nemet ! * MAINTAINERS (Write After Approval): Add myself. ! 2002-11-04 Kevin Buettner ! * Makefile.def (host_modules): Add rda. ! * Makefile.in: Regenerate. ! * configure.in (target_tool): Add target-rda to list. ! ! 2002-10-28 Gerald Pfeifer ! ! * MAINTAINERS: Remove "co-maintainer" note for web pages. ! ! 2002-10-25 Phil Edwards ! ! * Makefile.tpl (bootstrap): Add bubblestrap, quickstrap, cleanstrap, ! and restrap targets to this rule. ! * Makefile.in: Regenerate. ! ! 2002-10-25 Gerald Pfeifer ! ! * MAINTAINERS: Add Wolfgang Bangerth and Volker Reichelt under ! GNATS only accounts. ! ! 2002-10-24 Hans-Peter Nilsson ! ! * configure.in (i[3456]86-*-linux*): Add check to disable ! ${libgcj} for glibc1. ! ! 2002-10-24 Denis Chertykov ! ! * MAINTAINERS: Add myself as ip2k port maintainer. ! ! 2002-10-07 Svein E. Seldal ! ! * configure.in: Add tic4x target. ! ! 2002-10-03 Nathanael Nerode ! ! * Makefile.tpl: Make SET_LIB_PATH substitution more autoconfy. ! * configure.in: Make SET_LIB_PATH substitution more autoconfy. ! * Makefile.in: Regenerate. ! ! * Makefile.tpl: Make RPATH_ENVVAR substitution more autoconfy. ! * configure.in: Make RPATH_ENVVAR substitution more autoconfy. ! * Makefile.in: Regenerate. ! ! 2002-10-02 Janis Johnson ! ! * MAINTAINERS: Add myself as web pages co-maintainer. ! ! 2002-10-02 Nathanael Nerode ! ! * Makefile.tpl: Eliminate reference to all-gui, all-libproc. ! * Makefile.in: Regenerate. ! ! 2002-10-02 Zack Weinberg ! ! * MAINTAINERS: Add myself and Nathan Sidwell ! as VxWorks maintainers. ! ! 2002-10-02 Nathanael Nerode ! ! * Makefile.def: Remove order dependency comments. ! * Makefile.tpl: Add explicit install-install dependencies. ! * Makefile.in: Regenerate. ! ! * Makefile.tpl: Remove material now in src-release. (Finally!) ! * Makefile.in: Regenerate. ! ! * Makefile.tpl: Add configure-target (for src-release in src) ! * Makefile.in: Regenerate. ! ! 2002-09-30 Nick Clifton ! ! * Makefile.in (BINUTILS_SUPPORT_DIRS): Add cpu directory. ! ! 2002-09-30 Ulrich Weigand ! ! * configure.in (s390*-*-linux*): Enable libgcj. ! ! 2002-09-29 Nathanael Nerode ! ! * configure: Revert accidentally applied changes. ! ! * Makefile.tpl: Make more autoconf-friendly. ! * Makefile.in: Regenerate. ! * configure: Make substitution more autoconf-like. ! ! 2002-09-28 Richard Earnshaw ! ! * configure.in (arm-*-coff, strongarm-*-coff, xscale-*-coff): Use a ! single entry to handle all these. ! (arm-*-elf, strongarm-*-elf, xscale-*-elf): Likewise. Also enable ! libjava on arm-*-elf. ! ! 2002-09-27 Geoffrey Keating ! ! * configure.in (powerpc-*-darwin*): Don't configure BFD, TK, or the ! things that depend on them. ! ! 2002-09-25 Nathanael Nerode ! ! * Makefile.tpl: Make subsituted variables more autoconfy. ! * Makefile.in: Regenerate. ! * configure: Make seds more autoconfy. ! ! 2002-09-25 Nathanael Nerode ! ! * Makefile.tpl: Rewrite substituted lines to look autoconfy. ! * Makefile.in: Regenerate. ! * configure.in: Rewrite sed statements to look autoconfy. ! ! * Makefile.tpl: Autogenerate *-target-* lists, dependencies of ! all-target-foo on configure-target-foo. ! * Makefile.def: Ditto. ! * Makefile.in: Rebuild. ! ! 2002-09-25 Andrew Haley ! ! * MAINTAINERS: Add aph@redhat.com as Java maintainer. ! ! 2002-09-22 Nathanael Nerode ! ! * Makefile.def: New file. ! * Makefile.tpl: New file. ! * Makefile.in: Generate from Makefile.tpl with 'autogen Makefile.def'. ! * contrib/gcc_update: Note that Makefile.in is a generated file. ! ! * configure.in: Minor rearrangement. Simplify tests. ! ! 2002-09-22 Jason Thorpe ! ! * configure.in (with_headers): Skip copy if value is "yes". ! (with_libs): Likewise. ! ! 2002-09-20 Nathanael Nerode ! ! * configure.in (*-*-netbsd*): Use noconfigdirs, not skipdirs. ! * configure.in (sh*-*-pe*): Ditto. ! * configure.in (mips*-*-pe*): Ditto. ! * configure.in (*arm-wince-pe): Ditto. ! ! * configure.in: Rearrange. 2002-09-14 Kazu Hirata * MAINTAINERS: Update my email address. ! 2002-08-30 Paul Koning ! * MAINTAINERS: (Write After Approval): Add myself. ! 2002-08-29 Geoffrey Keating ! * MAINTAINERS: Update Jason Eckhardt's address, remove i860. ! 2002-08-24 Geoffrey Keating ! * MAINTAINERS: Change my mailing address. ! ! 2002-08-21 Paolo Carlini ! ! * MAINTAINERS (Write After Approval): Remove myself. ! (Various Maintainers: c++ runtime libs): Add myself. ! ! 2002-08-20 Loren J. Rittle ! ! * MAINTAINERS (Write After Approval): Remove myself. ! (Various Maintainers: c++ runtime libs): Add myself. ! ! 2002-08-15 Eric Christopher ! ! * config.sub: Import from master repository. ! * config.guess: Ditto. ! ! 2002-08-19 Alexandre Oliva ! ! * Makefile.in (GCC_FOR_TARGET): Prepend STAGE_CC_WRAPPER. ! * configure.in (CC_FOR_TARGET, GCJ_FOR_TARGET, CXX_FOR_TARGET, ! CXX_FOR_TARGET_FOR_RECURSIVE_MAKE): Likewise. ! ! 2002-08-16 Aldy Hernandez ! ! * MAINTAINERS: Add self to rs6000 vector extensions. ! ! 2002-08-15 Alexandre Oliva ! ! * libiberty/configure: Reverted unintended yesterday's check in. ! ! 2002-08-14 Alexandre Oliva ! ! * boehm-gc/configure, libf2c/configure: Rebuilt. ! * libffi/configure, libiberty/configure: Ditto. ! * libjava/configure, libobjc/configure: Ditto. ! * libstdc++-v3/configure, zlib/configure: Ditto. ! Merged from binutils: ! 2002-01-27 Daniel Jacobowitz ! From Steve Ellcey : ! * libtool.m4 (HPUX_IA64_MODE): Set to 32 or 64 based on ABI. ! (lt_cv_deplibs_check_method, lt_cv_file_magic_cmd, ! lt_cv_file_magic_test_file): Set to appropriate values for HP-UX ! IA64. ! * ltcf-c.sh (archive_cmds, hardcode_*): Ditto. ! * ltconfig (shlibpath_*, dynamic_linker, library_names_spec, ! soname_spec, sys_lib_search_path_spec): Ditto. ! ! 2002-08-06 Federico G. Schwindt ! ! * configure.in (hppa*-*-openbsd*): Treat like hppa*-*-*elf*. ! ! 2002-08-04 H.J. Lu (hjl@gnu.org) ! ! * configure.in (mips*-*-linux*): Don't skip target-libffi. ! ! 2002-08-02 Krister Walfridsson ! ! * MAINTAINERS (Write After Approval): Add myself. ! ! 2002-07-31 Alan Modra ! ! * configure.in: Move generic linux case to end. Copy generic ! linux noconfigdirs to mips*-*-linux* entry and new ! powerpc64*-*-linux* entry. Add target-libffi for the latter. ! ! 2002-07-19 Michael Matz ! ! * MAINTAINERS: Add myself as ra* maintainer. ! ! 2002-07-16 Chris Demetriou ! ! * config.guess: Update to 2002-07-09 version. ! * config.sub: Update to 2002-07-03 version. ! ! 2002-07-15 Hans-Peter Nilsson ! ! * MAINTAINERS: Fix typo in a maintainer email address. ! ! 2002-07-11 Nathanael Nerode ! ! * configure.in: Remove two redundant tests. ! ! 2002-07-11 Rainer Orth ! ! * configure.in (mips*-*-irix6*o32): Enable stabs. ! ! 2002-07-08 Nathanael Nerode ! ! * configure.in: Don't build grez. ! * Makefile.in: Ditto. ! ! * Makefile.in: Remove references to bsp, cygmon, libstub. ! * configure.in: Ditto. ! ! * configure.in: Remove leftover reference to gdbtest. 2002-07-08 Phil Edwards * configure.in (gxx_include_dir): Change to match versioned C++ headers if --enable-version-specific-runtime-libs is used. ! 2002-07-04 Steve Ellcey ! ! * ltcf-cxx.sh (hpux*): Modify to support ia64-*-hpux*. ! ! 2002-07-03 Nathanael Nerode ! ! * configure.in: Make --without-x work. ! ! 2002-07-02 Nathanael Nerode ! ! * configure.in: Rearrange target Makefile fragment collection. ! ! * Makefile.in: Don't try to build gdbtest, tgas, ispell, inet, or ! cvs[src]. ! * configure.in: Ditto. ! ! 2002-07-01 Matt Kraai ! ! * MAINTAINERS (Write After Approval): Update my e-mail address. ! ! 2002-06-24 Ben Elliston ! ! * configure.in (host_tools): Remove cgen. ! ! * Makefile.in (all-cgen): Remove; runs from its source directory. ! (check-cgen, install-cgen, clean-cgen): Likewise. ! (all-opcodes): Do not depend on all-cgen. ! (all-sim): Likewise. ! ! 2002-07-01 Nathanael Nerode ! ! * Makefile.in: Eliminate 'apache' targets. ! * configure.in: Eliminate 'apache' targets. ! ! * configure.in: Eliminate redundant tests. Reorganize. ! ! * Makefile.in: Eliminate last reference to LIBGCC1_TEST. ! ! * config-ml.in: Eliminate references to Cygnus configure. ! ! * Makefile.in: Eliminate references to building emacs. ! ! 2002-06-28 Graham Stott ! ! * MAINTAINERS: Update my email address. ! ! 2002-06-26 Benjamin Kosnik * config.if (libstdcxx_incdir): Version C++ headers. ! (cxx_incdir): Remove. ! 2002-06-25 Nathanael Nerode ! * MAINTAINERS (Write After Approval): Add self. ! ! Thu Jun 20 00:35:14 2002 Denis Chertykov ! ! * configure.in: Add support for ip2k. ! ! 2002-06-22 Nathanael Nerode ! ! * configure.in: Fix AIX configury bug. ! ! 2002-06-20 Steve Ellcey ! ! * MAINTAINERS (Write After Approval): Add self. ! ! 2002-06-19 Nathanael Nerode ! ! * configure.in: replace ${topsrcdir} with ${srcdir} ! ! * configure.in: Move definition of libstdcxx_flags ! right above usage, rather than waaay earlier. ! ! * configure.in: Pull definition of is_cross_compiler earlier. ! ! * configure.in: Rearrange a little. ! ! * configure.in: Remove references to librx. ! * Makefile.in: Remove references to librx. ! ! Tue Jun 18 22:37:35 2002 Denis Chertykov ! ! * config.sub: Add support for avr target. ! Import from master sources, rev 1.255 ! ! 2002-06-19 Phil Edwards ! ! * configure, .cvsignore: Revert previous change... ! * Makefile: ...delete. ! ! 2002-06-19 Nathanael Nerode ! ! * configure.in: Eliminate ${gasdir} variable. ! ! 2002-06-18 Dave Brolley ! ! * configure.in: Add support for frv. ! * config.sub: Add support for frv. 2002-06-18 Phil Edwards *************** *** 97,116 **** * Makefile: New file. Pass targets through to build directory. * .cvsignore: No longer ignore "Makefile". ! 2002-06-05 Loren J. Rittle ! * ltmain.sh: Detect and handle object name conflicts while ! piecewise linking a static library. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-04 Alexandre Oliva * configure.in (noconfigdirs): Don't disable libgcj on sparc64-*-solaris* and sparcv9-*-solaris*. --- 566,665 ---- * Makefile: New file. Pass targets through to build directory. * .cvsignore: No longer ignore "Makefile". ! 2002-06-16 Douglas Rupp ! * MAINTAINERS (Write After Approval): Add self. ! 2002-06-11 Kaveh R. Ghazi ! * Makefile.in (CFLAGS_FOR_TARGET): Add -O2. ! 2002-06-08 Jason Thorpe ! * configure.in (vax-*-netbsd*): Re-enable gas. ! 2002-05-31 Nathanael Nerode ! ! * Makefile.in: Replace HOST_PREFIX, HOST_PREFIX_1 with BUILD_PREFIX, ! BUILD_PREFIX_1, to correct nomenclature. ! * configure: Likewise. ! ! * Makefile.in: Eliminate version-specific references to tcl8.1, tk8.1. ! * configure.in: Eliminate version-specific references to tcl8.1, tk8.1. ! ! 2002-05-31 Olaf Hering ! ! * config-ml.in: Propogate DESTDIR also. ! ! 2002-05-29 Jason Thorpe ! ! * configure.in (vax-*-netbsd*): Don't build gas for this ! platform. ! ! 2002-05-28 Marek Michalkiewicz ! ! * configure.in (noconfigdirs): Don't compile libiberty, libstdcxx ! and libgcj for AVR. ! ! 2002-05-23 Kaz Kojima ! ! * MAINTAINERS (Write After Approval): Add myself. ! ! 2002-05-22 Jason Thorpe ! ! * config.guess: Update to 2002-05-22 version. ! * config.sub: Likewise. ! ! 2002-05-16 Rainer Orth ! ! * Makefile.in: Allow for PWDCMD to override hardcoded pwd. ! * config-ml.in: Likewise. ! * configure: Likewise. ! * configure.in: Likewise. ! ! 2002-05-16 Stephane Carrez ! ! * MAINTAINERS: Update my email address. ! ! 2002-05-13 Nathanael Nerode ! ! * configure.in: Simplify makefile fragment collection. ! ! * configure.in: Remove code to build emacs. ! ! * configure.in : Remove --srcdir argument from targargs and buildargs ! (it's always overridden in the Makefile anyway). Rearrange a bit. ! ! * configure: Move some logic to configure.in. ! * configure.in: Move some logic from configure. ! ! 2002-05-11 Tom Tromey ! ! * MAINTAINERS: Reflect libgcj reality. ! ! 2002-05-09 Federico G. Schwindt ! ! * Makefile.in: Honour DESTDIR. ! ! 2002-05-08 Mark Mitchell ! ! * config.guess: Import 2002-03-20 version. ! * config.sub: Import 2002-04-26 version. ! ! 2002-05-08 Rainer Orth ! ! * config-ml.in: Allow for PWDCMD to determine ML_POPDIR. ! ! 2002-05-07 Tim Josling ! ! * MAINTAINERS: Add self. ! ! 2002-05-06 Loren J. Rittle ! ! * ltmain.sh: Detect and handle object name conflicts ! while piecewise linking a static library. ! ! 2002-05-05 Alexandre Oliva * configure.in (noconfigdirs): Don't disable libgcj on sparc64-*-solaris* and sparcv9-*-solaris*. *************** *** 119,136 **** * configure.in: Revert 2002-04-18's patch; fixed in libjava. 2002-04-29 Roger Sayle ! * MAINTAINERS: Synchronize with mainline. 2002-04-26 Joel Sherrill * configure.in (h8300*-*-rtems*): Disable libf2c and libgcj. (sparc-*-elf*, sparc64-*-elf*): Disable libgcj. ! 2002-04-22 Ulrich Weigand ! * configure.in: Disable libgcj on s390-linux targets. 2002-04-19 Mark Mitchell --- 668,715 ---- * configure.in: Revert 2002-04-18's patch; fixed in libjava. + 2002-05-03 Thomas Fitzsimmons + + * configure.in (FLAGS_FOR_TARGET): Do not add + -B$$r/$(TARGET_SUBDIR)/newlib/ when compiling newlib natively + on i[3456]86-*-linux*. + + 2002-05-01 Thomas Fitzsimmons + + * configure.in (noconfigdirs): Replace [ ] with test. + + * configure.in (noconfigdirs): Do not add target-newlib if + target == i[3456]86-*-linux*, and host == target. + + 2002-04-29 Nathanael Nerode + + * configure.in: delete reference to absent file + + * configure.in: replace '[' with 'test' + + * configure.in: Eliminate references to gash. + * Makefile.in: Eliminate references to gash. + + * configure.in: remove useless references to 'pic' makefile fragments. + + * configure.in: (*-*-windows*) Finish removing. + + * configure.in: Eliminate redundant test for libgui. + 2002-04-29 Roger Sayle ! * MAINTAINERS: Add self and realphabetize. Update entries ! for Dan Berlin, Chris Demetriou and Michael Matz. Remove ! entry for a29k port maintainer. 2002-04-26 Joel Sherrill * configure.in (h8300*-*-rtems*): Disable libf2c and libgcj. (sparc-*-elf*, sparc64-*-elf*): Disable libgcj. ! 2002-04-19 Nathanael Nerode ! * configure.in: remove references to dead files 2002-04-19 Mark Mitchell *************** *** 142,150 **** installed and we're using Solaris 2.8 linker. Do enable libgcj on Solaris 2.8 by default. For PR libgcj/6158. ! 2002-04-15 Richard Henderson ! * config.guess (sun4u:SunOS:5.*:*): Revert 04-12 change. 2002-04-15 Mark Mitchell --- 721,735 ---- installed and we're using Solaris 2.8 linker. Do enable libgcj on Solaris 2.8 by default. For PR libgcj/6158. ! 2002-04-17 Nathanael Nerode ! * configure.in: Move default CC setting out of config/mh-* fragments ! directly into here. ! ! 2002-04-17 Nathanael Nerode ! ! * configure.in: don't even try to configure or make a subdirectory ! if there's no configure script for it. 2002-04-15 Mark Mitchell *************** *** 164,174 **** * configure.in (target_libs): Remove target-libchill. Do not compute CHILL_FOR_TARGET. * libchill: Remove directory. - - 2002-04-12 Richard Henderson ! * config.guess (sun4u:SunOS:5.*:*): Guess sparcv9 if 64-bit isa ! is supported. 2002-04-09 Loren J. Rittle --- 749,846 ---- * configure.in (target_libs): Remove target-libchill. Do not compute CHILL_FOR_TARGET. * libchill: Remove directory. ! 2002-04-11 DJ Delorie ! ! * Makefile.in, configure.in: Sync with binutils, entries ! follow... ! ! 2002-04-07 Andrew Cagney ! ! * Makefile.in (do-tar-bz2): Delete rule. Replace with ... ! (do-tar, do-bz2): New rules. ! (taz): Update. Replace do-tar-bz2 with do-tar and do-bz2. ! (gdb-tar): New rule. ! (gdb-taz): Rewrite. Use gdb-tar and do-bz2. ! (insight_dejagnu.tar): New rule. ! (insight.tar): New rule. ! (gdb+dejagnu.tar): New rule. ! (gdb.tar): New rule. ! ! 2002-02-01 Mo DeJong ! ! * Makefile.in: Add all-tix to deps for all-snavigator ! so that tix is built when building snavigator. ! ! 2002-01-11 Steve Ellcey ! ! * configure.in (ia64*-*-hpux*): New target for IA64 HP-UX, ! ld and gdb are not supported. ! ! 2002-01-07 Mark Salter ! ! * configure.in: Remove target-bsp and target-cygmon from arm builds. ! Allow target-libgloss to be built for arm, strongarm, and xscale. ! ! 2001-12-13 Thomas Fitzsimmons ! ! * configure.in (FLAGS_FOR_TARGET): Remove -nostdinc and -isystem ! options for i[3456]86-pc-linux* native builds. ! ! 2001-11-20 Nick Clifton ! ! * Makefile.in (do-proto-toplev): Use msgfmt to generate .gmo ! files from .po files for a distribution. ! ! 2001-09-03 Jeff Holcomb ! ! * configure.in: Enable libstdc++-v3 for h8300 targets. ! ! 2001-06-19 Alan Modra ! ! * Makefile.in (VER): If AM_INIT_AUTOMAKE uses BFD_VERSION, get ! version from bfd/. ! ! Fri Jun 8 11:14:02 2001 Andrew Cagney ! ! * Makefile.in (VER): When present, extract the version number from ! the file version.in. ! ! 2001-05-24 Tom Rix ! ! * configure.in : enable ld for aix ! ! 2001-02-09 Martin Schwidefsky ! ! * config.guess: Add linux target for S/390. ! ! 2000-11-07 Philip Blundell ! ! * Makefile.in (ETC_SUPPORT): Also add configbuild.* and configdev.*. ! ! 2000-11-03 Philip Blundell ! ! * Makefile.in (ETC_SUPPORT): Add configure.texi and associated info ! files. ! ! 2001-01-15 Ben Elliston ! ! * configure.in (host_tools): Add sid. ! Always configure cgen. ! ! 2000-11-24 Nick Clifton ! ! * configure.in (c4x, c5x, tic54x): Move after ARM targets. ! ! ! 2000-08-20 Doug Evans ! ! * Makefile.in (ALL_MODULES): Add all-cgen. ! (CROSS_CHECK_MODULES,INSTALL_MODULES,CLEAN_MODULES): Similarily. ! (all-cgen): New target. ! (all-opcodes,all-sim): Depend on all-cgen. ! * configure.in (host_tools): Add cgen. ! Only configure cgen if --enable-cgen-maint. 2002-04-09 Loren J. Rittle *************** *** 187,192 **** --- 859,868 ---- * configure.in (alpha*-dec-osf*): Enable libgcj. + 2003-03-27 Matthew Gingell + + * MAINTAINERS (Write After Approval): Add myself. + 2002-03-24 Nick Clifton Fix for: PR bootstrap/3591, target/5676 *************** *** 197,202 **** --- 873,882 ---- * configure.in: Enable libgcj for xscale-elf target. + Tue Mar 19 09:05:08 2002 J"orn Rennecke + + * MAINTAINERS: Update my email address. + 2002-03-16 Alexandre Oliva * ltmain.sh (relink_command): Fix typo in previous change. *************** *** 228,233 **** --- 908,917 ---- * configure.in: Enable gprof for mips*-*-linux*. + 2002-03-05 Danny Smith + + * MAINTAINERS (Write After Approval): Add myself. + 2002-02-28 Alexandre Oliva * configure.in (libstdcxx_flags): Don't add libstdc++-v3 flags for *************** *** 248,254 **** * gcc/Makefile.in: Removed libstdc++-v3 dependancy for libjava and boehm-gc ! 2002-02-09 Alexandre Oliva * config.guess: Updated to 2002-01-30's version. --- 932,938 ---- * gcc/Makefile.in: Removed libstdc++-v3 dependancy for libjava and boehm-gc ! 2002-02-09 Alexandre Oliva * config.guess: Updated to 2002-01-30's version. *************** Thu Feb 7 12:40:58 CET 2002 Jan Hubick *** 277,284 **** 2002-01-26 Jason Thorpe ! * configure.in (*-*-netbsd*): New. Skip target-newlib, ! target-libiberty, and target-libgloss. Skip Java-related libraries if not supported for NetBSD on target CPU. 2002-01-25 Douglas B Rupp --- 961,968 ---- 2002-01-26 Jason Thorpe ! * configure.in (*-*-netbsd*): New. Skip target-newlib, ! target-libiberty, and target-libgloss. Skip Java-related libraries if not supported for NetBSD on target CPU. 2002-01-25 Douglas B Rupp *************** Mon Apr 23 09:15:03 2001 Anthony Green *** 1056,1063 **** 2000-12-13 Anthony Green * configure.in: Disable libgcj for any target not specifically ! listed. Disable libgcj for x86 and Alpha Linux until compatible ! with g++ abi. 2000-12-13 Mike Stump --- 1740,1747 ---- 2000-12-13 Anthony Green * configure.in: Disable libgcj for any target not specifically ! listed. Disable libgcj for x86 and Alpha Linux until compatible ! with g++ abi. 2000-12-13 Mike Stump *************** Tue May 16 09:57:35 2000 Andrew Cagney *** 1561,1567 **** Wed Apr 26 17:03:53 2000 Andrew Cagney : * Makefile.in (do-djunpack): New target. Update djunpack.bat with ! current version information. Add to proto-toplev directory. (gdb-taz): Build do-djunpack. 2000-05-15 David Edelsohn --- 2245,2251 ---- Wed Apr 26 17:03:53 2000 Andrew Cagney : * Makefile.in (do-djunpack): New target. Update djunpack.bat with ! current version information. Add to proto-toplev directory. (gdb-taz): Build do-djunpack. 2000-05-15 David Edelsohn *************** Sat May 6 21:12:55 CDT 2000 Jason Eckh *** 1605,1613 **** Wed Apr 19 12:46:26 2000 Andrew Cagney * Makefile.in (taz, gdb-taz, gas.tar.bz2, binutils.tar.bz2, ! gas+binutils.tar.bz2, libg++.tar.bz2, gnats.tar.bz2, gdb.tar.bz2, ! dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, insight.tar.bz2, ! insight+dejagnu.tar.bz2, newlib.tar.bz2): Pass MD5PROG to sub-make. 2000-04-16 Dave Pitts --- 2289,2297 ---- Wed Apr 19 12:46:26 2000 Andrew Cagney * Makefile.in (taz, gdb-taz, gas.tar.bz2, binutils.tar.bz2, ! gas+binutils.tar.bz2, libg++.tar.bz2, gnats.tar.bz2, gdb.tar.bz2, ! dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, insight.tar.bz2, ! insight+dejagnu.tar.bz2, newlib.tar.bz2): Pass MD5PROG to sub-make. 2000-04-16 Dave Pitts *************** Wed Apr 12 16:42:48 2000 Andrew Cagney *** 1626,1636 **** (PACKAGE): Default to TOOL. (VER): Default to a shell script. (taz): Rewrite target. Move real work to do-proto-toplev. Include ! md5 checksum generation. (do-proto-toplev): New target. Create $(PACKAGE)-$(VER) link. (do-tar-bz2): Delete creation of $(PACKAGE)-$(VER) link. (gdb.tar.bz2, dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, ! insight.tar.bz2): Use gdb-taz to create archive. Fri Apr 7 18:10:29 2000 Andrew Cagney --- 2310,2320 ---- (PACKAGE): Default to TOOL. (VER): Default to a shell script. (taz): Rewrite target. Move real work to do-proto-toplev. Include ! md5 checksum generation. (do-proto-toplev): New target. Create $(PACKAGE)-$(VER) link. (do-tar-bz2): Delete creation of $(PACKAGE)-$(VER) link. (gdb.tar.bz2, dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, ! insight.tar.bz2): Use gdb-taz to create archive. Fri Apr 7 18:10:29 2000 Andrew Cagney *************** Fri Mar 3 18:44:08 2000 Andrew Cagney *** 1675,1681 **** (do-tar-bz2): Replace TOOL with PACKAGE. (gdb.tar.bz2): Remove GDBTK from GDB package. (gdb+dejagnu.tar.bz2, insight.tar.bz2, insight+dejagnu.tar.bz2, ! dejagnu.tar.bz2): New packages. 2000-02-27 Andreas Jaeger --- 2359,2365 ---- (do-tar-bz2): Replace TOOL with PACKAGE. (gdb.tar.bz2): Remove GDBTK from GDB package. (gdb+dejagnu.tar.bz2, insight.tar.bz2, insight+dejagnu.tar.bz2, ! dejagnu.tar.bz2): New packages. 2000-02-27 Andreas Jaeger *************** Fri Mar 3 18:44:08 2000 Andrew Cagney *** 1693,1699 **** Thu Feb 24 16:15:56 2000 Andrew Cagney * config.guess, config.sub: Updated to match config's 2000-02-15 ! version. 2000-02-23 Linas Vepstas --- 2377,2383 ---- Thu Feb 24 16:15:56 2000 Andrew Cagney * config.guess, config.sub: Updated to match config's 2000-02-15 ! version. 2000-02-23 Linas Vepstas *************** Wed Mar 10 18:35:07 1999 Jeff Johnston *** 2054,2060 **** Wed Mar 10 17:39:09 1999 Drew Moseley * configure.in: Added bsp support to arm-*-coff and arm-*-elf ! targets. 1999-03-02 Nick Clifton --- 2738,2744 ---- Wed Mar 10 17:39:09 1999 Drew Moseley * configure.in: Added bsp support to arm-*-coff and arm-*-elf ! targets. 1999-03-02 Nick Clifton *************** Thu Dec 17 01:22:30 1998 Jeffrey A Law *** 2182,2188 **** Tue Dec 15 17:02:58 1998 Bob Manson * configure.in: Add cygmon for x86-coff and x86-elf. Configure ! cygmon for all sparclite targets, regardless of object format. 1998-12-15 Mark Salter --- 2866,2872 ---- Tue Dec 15 17:02:58 1998 Bob Manson * configure.in: Add cygmon for x86-coff and x86-elf. Configure ! cygmon for all sparclite targets, regardless of object format. 1998-12-15 Mark Salter *************** Sat Jun 27 22:46:32 1998 Jeffrey A Law *** 2569,2575 **** Wed Jun 24 16:01:59 1998 John Metzler * configure.in (noconfigdirs): Add configure pattern for mips tx39 ! cygmon Tue Jun 23 22:42:32 1998 Mark Alexander --- 3253,3259 ---- Wed Jun 24 16:01:59 1998 John Metzler * configure.in (noconfigdirs): Add configure pattern for mips tx39 ! cygmon Tue Jun 23 22:42:32 1998 Mark Alexander *************** Mon Sep 29 00:38:08 1997 Aaron Jackson < *** 3221,3227 **** Wed Sep 24 18:06:27 1997 Stu Grossman * configure.in (d30v): Remove tcl, tk, expect, gdb, itcl, tix, db, ! sn, and gnuserv from noconfigdirs. Wed Sep 24 15:18:32 1997 Ian Lance Taylor --- 3905,3911 ---- Wed Sep 24 18:06:27 1997 Stu Grossman * configure.in (d30v): Remove tcl, tk, expect, gdb, itcl, tix, db, ! sn, and gnuserv from noconfigdirs. Wed Sep 24 15:18:32 1997 Ian Lance Taylor *************** Thu Sep 18 21:43:23 1997 Alexandre Oliv *** 3241,3247 **** Thu Sep 18 15:37:42 1997 Andrew Cagney * configure (tooldir): enable_gdbtk=YES for cygwin32, NO for ! windows. Consistent with gdb/configure. 1997-09-15 02:37 Ulrich Drepper --- 3925,3931 ---- Thu Sep 18 15:37:42 1997 Andrew Cagney * configure (tooldir): enable_gdbtk=YES for cygwin32, NO for ! windows. Consistent with gdb/configure. 1997-09-15 02:37 Ulrich Drepper *************** Tue Aug 5 12:12:44 1997 Andrew Cagney *** 3422,3434 **** Mon Aug 4 22:59:02 1997 Andrew Cagney * Makefile.in (CC_FOR_TARGET): When winsup/Makefile present, ! correctly specify the target build directory $(TARGET_SUBDIR)/winsup ! for libraries. Mon Aug 4 12:40:24 1997 Jason Merrill * Makefile.in (EXTRA_GCC_FLAGS): Fix handling of macros with values ! separated by spaces. Thu Jul 31 19:49:49 1997 Ian Lance Taylor --- 4106,4118 ---- Mon Aug 4 22:59:02 1997 Andrew Cagney * Makefile.in (CC_FOR_TARGET): When winsup/Makefile present, ! correctly specify the target build directory $(TARGET_SUBDIR)/winsup ! for libraries. Mon Aug 4 12:40:24 1997 Jason Merrill * Makefile.in (EXTRA_GCC_FLAGS): Fix handling of macros with values ! separated by spaces. Thu Jul 31 19:49:49 1997 Ian Lance Taylor *************** Mon Jun 16 11:11:10 1997 Ian Lance Tayl *** 3559,3565 **** $(DEFAULT_YACC). * configure.in: Build itl, db, sn, etc., when building for native ! cygwin32. * Makefile.in (LD): New variable. (EXTRA_HOST_FLAGS): Pass down LD. --- 4243,4249 ---- $(DEFAULT_YACC). * configure.in: Build itl, db, sn, etc., when building for native ! cygwin32. * Makefile.in (LD): New variable. (EXTRA_HOST_FLAGS): Pass down LD. *************** Mon Jun 16 11:10:35 1997 Philip Blundel *** 3572,3578 **** Fri Jun 13 10:22:56 1997 Bob Manson * configure.in (targargs): Strip out any supplied --build argument ! before adding our own. Always add --build. Thu Jun 12 21:12:28 1997 Bob Manson --- 4256,4262 ---- Fri Jun 13 10:22:56 1997 Bob Manson * configure.in (targargs): Strip out any supplied --build argument ! before adding our own. Always add --build. Thu Jun 12 21:12:28 1997 Bob Manson *************** Tue Feb 25 18:46:14 1997 Stan Shebs * configure.in (noconfigdirs): Disable target-newlib, ! target-examples and target-libiberty for d30v. Fri Feb 21 17:56:25 1997 Martin M. Hunt --- 4451,4457 ---- Tue Feb 25 13:19:14 1997 Andrew Cagney * configure.in (noconfigdirs): Disable target-newlib, ! target-examples and target-libiberty for d30v. Fri Feb 21 17:56:25 1997 Martin M. Hunt *************** Fri Feb 21 20:58:51 1997 Michael Meissn *** 3780,3786 **** Sun Feb 16 15:41:09 1997 Andrew Cagney * configure.in (d30v-*): Remove sim directory from list of ! unsupported d30v directories Tue Feb 18 17:32:42 1997 Martin M. Hunt --- 4464,4470 ---- Sun Feb 16 15:41:09 1997 Andrew Cagney * configure.in (d30v-*): Remove sim directory from list of ! unsupported d30v directories Tue Feb 18 17:32:42 1997 Martin M. Hunt *************** Fri Nov 8 11:34:58 1996 David J. MacKe *** 3963,3969 **** LynxOs is not a hardware supplier. * config.guess: Contributions from bug-gnu-utils to add support for: ! OpenBSD like NetBSD. Stratus systems. More Pyramid systems. i[n>4]86 Intel chips. --- 4647,4653 ---- LynxOs is not a hardware supplier. * config.guess: Contributions from bug-gnu-utils to add support for: ! OpenBSD like NetBSD. Stratus systems. More Pyramid systems. i[n>4]86 Intel chips. *************** Wed Oct 2 15:52:36 1996 Klaus Kaempf *** 4104,4110 **** Tue Oct 1 01:28:41 1996 James G. Smith * configure.in (noconfigdirs): Don't build libgloss for arm-coff ! targets. Mon Sep 30 14:24:01 1996 Stan Shebs --- 4788,4794 ---- Tue Oct 1 01:28:41 1996 James G. Smith * configure.in (noconfigdirs): Don't build libgloss for arm-coff ! targets. Mon Sep 30 14:24:01 1996 Stan Shebs *************** Sun Jun 23 22:41:54 1996 Geoffrey Noer *** 4331,4337 **** Sat Jun 22 11:39:01 1996 Jason Merrill * Makefile.in (TARGET_SUBDIR): Move comment to previous line so we ! don't get ". ". Fri Jun 21 17:24:48 1996 Jim Wilson --- 5015,5021 ---- Sat Jun 22 11:39:01 1996 Jason Merrill * Makefile.in (TARGET_SUBDIR): Move comment to previous line so we ! don't get ". ". Fri Jun 21 17:24:48 1996 Jim Wilson *************** Fri Dec 29 07:56:11 1995 Michael Meissn *** 4778,4784 **** * Makefile.in (EXTRA_GCC_FLAGS): If any of the make variables LANGUAGES, BOOT_CFLAGS, STMP_FIXPROTO, LIMITS_H_TEST, LIBGCC1_TEST, LIBGCC2_CFLAGS, LIBGCC2_INCLUDES, and ENQUIRE are ! non-empty, pass them on to the GCC make. (all-bootstrap): New rule that is like all-gcc, except it executes the GCC bootstrap rule instead of the GCC all rule. --- 5462,5468 ---- * Makefile.in (EXTRA_GCC_FLAGS): If any of the make variables LANGUAGES, BOOT_CFLAGS, STMP_FIXPROTO, LIMITS_H_TEST, LIBGCC1_TEST, LIBGCC2_CFLAGS, LIBGCC2_INCLUDES, and ENQUIRE are ! non-empty, pass them on to the GCC make. (all-bootstrap): New rule that is like all-gcc, except it executes the GCC bootstrap rule instead of the GCC all rule. *************** Mon Dec 4 12:38:15 1995 Ian Lance Tayl *** 4858,4864 **** Thu Nov 30 14:45:25 1995 J.T. Conklin * config/mt-v810 (CC_FOR_TARGET): Add -ansi flag. NEC compiler ! defaults to K&R mode, but doesn't have varargs.h, so we have to compile in ANSI mode. Thu Nov 30 16:57:33 1995 Per Bothner --- 5542,5548 ---- Thu Nov 30 14:45:25 1995 J.T. Conklin * config/mt-v810 (CC_FOR_TARGET): Add -ansi flag. NEC compiler ! defaults to K&R mode, but doesn't have varargs.h, so we have to compile in ANSI mode. Thu Nov 30 16:57:33 1995 Per Bothner *************** Mon Nov 13 12:34:20 1995 Stan Shebs * configure: CXX defaults to gcc, not g++. If we find ! gcc in the path, set CC to gcc -O2. Tue Nov 7 15:45:17 1995 Ian Lance Taylor --- 5654,5668 ---- * mpw-config.in: Configure grez if targeting Mac. * config.sub: Accept pmac and pmac-mpw as names for PowerMacs, ! accept mpw and mac-mpw as names for m68k Macs, change macos7 to ! just macos. * configure.in: Configure grez resource compiler if targeting Mac. * Makefile.in (all-grez, install-grez): New targets. Wed Nov 8 17:33:51 1995 Jason Merrill * configure: CXX defaults to gcc, not g++. If we find ! gcc in the path, set CC to gcc -O2. Tue Nov 7 15:45:17 1995 Ian Lance Taylor *************** Wed Nov 1 12:23:20 1995 Ian Lance Tayl *** 5028,5035 **** Tue Oct 31 17:52:39 1995 J.T. Conklin * configure.in (host_makefile_frag): Use m68k-sun-sunos* instead ! of m68k-sun-* when selecting mh-sun3 to avoid matching NetBSD/sun3 ! systems. Tue Oct 31 16:57:32 1995 Jim Wilson --- 5712,5719 ---- Tue Oct 31 17:52:39 1995 J.T. Conklin * configure.in (host_makefile_frag): Use m68k-sun-sunos* instead ! of m68k-sun-* when selecting mh-sun3 to avoid matching NetBSD/sun3 ! systems. Tue Oct 31 16:57:32 1995 Jim Wilson *************** Thu Sep 7 20:03:41 1995 Ken Raeburn < *** 5307,5313 **** Fri Sep 1 08:06:58 1995 James G. Smith * config.sub: recognise mips64vr4300 and mips64vr4300el as valid ! targets. Wed Aug 30 21:06:50 1995 Jason Molenda (crash@phydeaux.cygnus.com) --- 5991,5997 ---- Fri Sep 1 08:06:58 1995 James G. Smith * config.sub: recognise mips64vr4300 and mips64vr4300el as valid ! targets. Wed Aug 30 21:06:50 1995 Jason Molenda (crash@phydeaux.cygnus.com) *************** Tue Apr 26 18:11:33 1994 Ian Lance Tayl *** 6301,6308 **** Mon Apr 25 15:06:34 1994 Stan Shebs (shebs@andros.cygnus.com) ! * configure.in (*-*-lynxos*): Don't configure newlib for either ! native or cross Lynx. Sat Apr 16 11:58:16 1994 Doug Evans (dje@canuck.cygnus.com) --- 6985,6992 ---- Mon Apr 25 15:06:34 1994 Stan Shebs (shebs@andros.cygnus.com) ! * configure.in (*-*-lynxos*): Don't configure newlib for either ! native or cross Lynx. Sat Apr 16 11:58:16 1994 Doug Evans (dje@canuck.cygnus.com) *************** Thu Aug 27 13:04:42 1992 Brendan Kehoe *** 8047,8053 **** Mon Aug 24 14:05:14 1992 Ian Lance Taylor (ian@cygnus.com) ! * config.sub, configure.in: accept OSE68000 and OSE68k. * Makefile.in: don't create all directories for ``make install''; let the subdirectories create the ones they need. --- 8731,8737 ---- Mon Aug 24 14:05:14 1992 Ian Lance Taylor (ian@cygnus.com) ! * config.sub, configure.in: accept OSE68000 and OSE68k. * Makefile.in: don't create all directories for ``make install''; let the subdirectories create the ones they need. diff -Nrc3pad gcc-3.2.3/config/acinclude.m4 gcc-3.3/config/acinclude.m4 *** gcc-3.2.3/config/acinclude.m4 2001-10-07 18:02:40.000000000 +0000 --- gcc-3.3/config/acinclude.m4 2002-05-16 17:41:56.000000000 +0000 *************** dnl Look for the header file *** 206,212 **** AC_CACHE_VAL(ac_cv_c_bfdh,[ for i in $dirlist; do if test -f "$i/bfd/bfd.h" ; then ! ac_cv_c_bfdh=`(cd $i/bfd; pwd)` break fi done --- 206,212 ---- AC_CACHE_VAL(ac_cv_c_bfdh,[ for i in $dirlist; do if test -f "$i/bfd/bfd.h" ; then ! ac_cv_c_bfdh=`(cd $i/bfd; ${PWDCMD-pwd})` break fi done *************** AC_MSG_CHECKING(for the bfd library in t *** 224,230 **** AC_CACHE_VAL(ac_cv_c_bfdlib,[ for i in $dirlist; do if test -f "$i/bfd/Makefile" ; then ! ac_cv_c_bfdlib=`(cd $i/bfd; pwd)` fi done ]) --- 224,230 ---- AC_CACHE_VAL(ac_cv_c_bfdlib,[ for i in $dirlist; do if test -f "$i/bfd/Makefile" ; then ! ac_cv_c_bfdlib=`(cd $i/bfd; ${PWDCMD-pwd})` fi done ]) *************** dirlist=".. ../../ ../../../ ../../../.. *** 247,253 **** AC_CACHE_VAL(ac_cv_c_liberty,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then ! ac_cv_c_liberty=`(cd $i/libiberty; pwd)` fi done ]) --- 247,253 ---- AC_CACHE_VAL(ac_cv_c_liberty,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then ! ac_cv_c_liberty=`(cd $i/libiberty; ${PWDCMD-pwd})` fi done ]) *************** dirlist=".. ../../ ../../../ ../../../.. *** 268,274 **** AC_CACHE_VAL(ac_cv_c_opc,[ for i in $dirlist; do if test -f "$i/opcodes/Makefile" ; then ! ac_cv_c_opc=`(cd $i/opcodes; pwd)` fi done ]) --- 268,274 ---- AC_CACHE_VAL(ac_cv_c_opc,[ for i in $dirlist; do if test -f "$i/opcodes/Makefile" ; then ! ac_cv_c_opc=`(cd $i/opcodes; ${PWDCMD-pwd})` fi done ]) *************** dirlist=".. ../../ ../../../ ../../../.. *** 290,296 **** AC_CACHE_VAL(ac_cv_c_dejagnu,[ for i in $dirlist; do if test -f "$srcdir/$i/ecc/ecc/infra/testlib/current/include/dejagnu.h" ; then ! ac_cv_c_dejagnu=`(cd $srcdir/$i/ecc/ecc/infra/testlib/current/include; pwd)` fi done ]) --- 290,296 ---- AC_CACHE_VAL(ac_cv_c_dejagnu,[ for i in $dirlist; do if test -f "$srcdir/$i/ecc/ecc/infra/testlib/current/include/dejagnu.h" ; then ! ac_cv_c_dejagnu=`(cd $srcdir/$i/ecc/ecc/infra/testlib/current/include; ${PWDCMD-pwd})` fi done ]) *************** fi *** 303,309 **** AC_CACHE_VAL(ac_cv_c_dejagnulib,[ for i in $dirlist; do if test -f "$srcdir/$i/infra/testlib/current/lib/hostutil.exp" ; then ! ac_cv_c_dejagnulib=`(cd $srcdir/$i/infra/testlib/current/lib; pwd)` fi done ]) --- 303,309 ---- AC_CACHE_VAL(ac_cv_c_dejagnulib,[ for i in $dirlist; do if test -f "$srcdir/$i/infra/testlib/current/lib/hostutil.exp" ; then ! ac_cv_c_dejagnulib=`(cd $srcdir/$i/infra/testlib/current/lib; ${PWDCMD-pwd})` fi done ]) *************** AC_MSG_CHECKING(for runtest in the sourc *** 316,322 **** AC_CACHE_VAL(ac_cv_c_runtest,[ for i in $dirlist; do if test -f "$srcdir/$i/dejagnu/runtest" ; then ! ac_cv_c_runtest=`(cd $srcdir/$i/dejagnu; pwd)` fi done ]) --- 316,322 ---- AC_CACHE_VAL(ac_cv_c_runtest,[ for i in $dirlist; do if test -f "$srcdir/$i/dejagnu/runtest" ; then ! ac_cv_c_runtest=`(cd $srcdir/$i/dejagnu; ${PWDCMD-pwd})` fi done ]) *************** dnl Look for the header file *** 342,348 **** AC_CACHE_VAL(ac_cv_c_intlh,[ for i in $dirlist; do if test -f "$i/intl/libintl.h" ; then ! ac_cv_c_intlh=`(cd $i/intl; pwd)` break fi done --- 342,348 ---- AC_CACHE_VAL(ac_cv_c_intlh,[ for i in $dirlist; do if test -f "$i/intl/libintl.h" ; then ! ac_cv_c_intlh=`(cd $i/intl; ${PWDCMD-pwd})` break fi done *************** AC_MSG_CHECKING(for the libintl library *** 360,366 **** AC_CACHE_VAL(ac_cv_c_intllib,[ for i in $dirlist; do if test -f "$i/intl/Makefile" ; then ! ac_cv_c_intllib=`(cd $i/intl; pwd)` fi done ]) --- 360,366 ---- AC_CACHE_VAL(ac_cv_c_intllib,[ for i in $dirlist; do if test -f "$i/intl/Makefile" ; then ! ac_cv_c_intllib=`(cd $i/intl; ${PWDCMD-pwd})` fi done ]) *************** AC_MSG_CHECKING(for the simulator header *** 388,394 **** AC_CACHE_VAL(ac_cv_c_simh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then ! ac_cv_c_simh=`(cd ${srcdir}/$i/include; pwd)` break fi done --- 388,394 ---- AC_CACHE_VAL(ac_cv_c_simh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then ! ac_cv_c_simh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})` break fi done *************** AC_MSG_CHECKING(for the simulator librar *** 420,426 **** AC_CACHE_VAL(ac_cv_c_simlib,[ for i in $dirlist; do if test -f "$i/sim/$target_dir/Makefile" ; then ! ac_cv_c_simlib=`(cd $i/sim/$target_dir; pwd)` fi done ]) --- 420,426 ---- AC_CACHE_VAL(ac_cv_c_simlib,[ for i in $dirlist; do if test -f "$i/sim/$target_dir/Makefile" ; then ! ac_cv_c_simlib=`(cd $i/sim/$target_dir; ${PWDCMD-pwd})` fi done ]) *************** dirlist=".. ../../ ../../../ ../../../.. *** 463,469 **** AC_CACHE_VAL(ac_cv_c_libib,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then ! ac_cv_c_libib=`(cd $i/libiberty/; pwd)` fi done ]) --- 463,469 ---- AC_CACHE_VAL(ac_cv_c_libib,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then ! ac_cv_c_libib=`(cd $i/libiberty/; ${PWDCMD-pwd})` fi done ]) *************** dirlist=".. ../../ ../../../ ../../../.. *** 483,489 **** AC_CACHE_VAL(ac_cv_c_devoh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then ! ac_cv_c_devoh=`(cd ${srcdir}/$i/include; pwd)` fi done ]) --- 483,489 ---- AC_CACHE_VAL(ac_cv_c_devoh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then ! ac_cv_c_devoh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})` fi done ]) *************** IDELIB= *** 506,512 **** AC_CACHE_VAL(ac_cv_c_ideh,[ for i in $dirlist; do if test -f "${srcdir}/$i/libide/src/event.h" ; then ! ac_cv_c_ideh=`(cd ${srcdir}/$i/libide/src; pwd)`; fi done ]) --- 506,512 ---- AC_CACHE_VAL(ac_cv_c_ideh,[ for i in $dirlist; do if test -f "${srcdir}/$i/libide/src/event.h" ; then ! ac_cv_c_ideh=`(cd ${srcdir}/$i/libide/src; ${PWDCMD-pwd})`; fi done ]) *************** AC_MSG_CHECKING(for LIBIDE TCL headers i *** 521,527 **** AC_CACHE_VAL(ac_cv_c_idetclh,[ for i in $dirlist; do if test -f "${srcdir}/$i/libidetcl/src/idetcl.h" ; then ! ac_cv_c_idetclh=`(cd ${srcdir}/$i/libidetcl/src; pwd)`; fi done ]) --- 521,527 ---- AC_CACHE_VAL(ac_cv_c_idetclh,[ for i in $dirlist; do if test -f "${srcdir}/$i/libidetcl/src/idetcl.h" ; then ! ac_cv_c_idetclh=`(cd ${srcdir}/$i/libidetcl/src; ${PWDCMD-pwd})`; fi done ]) *************** AC_MSG_CHECKING(for IDE headers in the b *** 536,542 **** AC_CACHE_VAL(ac_cv_c_ideh2,[ for i in $dirlist; do if test -f "$i/libide/src/Makefile" ; then ! ac_cv_c_ideh2=`(cd $i/libide/src; pwd)`; fi done ]) --- 536,542 ---- AC_CACHE_VAL(ac_cv_c_ideh2,[ for i in $dirlist; do if test -f "$i/libide/src/Makefile" ; then ! ac_cv_c_ideh2=`(cd $i/libide/src; ${PWDCMD-pwd})`; fi done ]) *************** AC_CACHE_VAL(ac_cv_c_idelib,[ *** 553,559 **** if test x"${ac_cv_c_idelib}" = x ; then for i in $dirlist; do if test -f "$i/libide/src/Makefile" ; then ! ac_cv_c_idelib=`(cd $i/libide/src; pwd)` break fi done --- 553,559 ---- if test x"${ac_cv_c_idelib}" = x ; then for i in $dirlist; do if test -f "$i/libide/src/Makefile" ; then ! ac_cv_c_idelib=`(cd $i/libide/src; ${PWDCMD-pwd})` break fi done *************** AC_CACHE_VAL(ac_cv_c_idetcllib,[ *** 571,577 **** if test x"${ac_cv_c_idetcllib}" = x ; then for i in $dirlist; do if test -f "$i/libidetcl/src/Makefile" ; then ! ac_cv_c_idetcllib=`(cd $i/libidetcl/src; pwd)` break fi done --- 571,577 ---- if test x"${ac_cv_c_idetcllib}" = x ; then for i in $dirlist; do if test -f "$i/libidetcl/src/Makefile" ; then ! ac_cv_c_idetcllib=`(cd $i/libidetcl/src; ${PWDCMD-pwd})` break fi done *************** dirlist=".. ../../ ../../../ ../../../.. *** 597,603 **** AC_CACHE_VAL(ac_cv_c_iluh,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/kernel/method.h" ; then ! ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; pwd)` fi done ]) --- 597,603 ---- AC_CACHE_VAL(ac_cv_c_iluh,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/kernel/method.h" ; then ! ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; ${PWDCMD-pwd})` fi done ]) *************** dirlist=".. ../../ ../../../ ../../../.. *** 613,619 **** AC_CACHE_VAL(ac_cv_c_iluh5,[ for i in $dirlist; do if test -f "$i/ilu/runtime/kernel/iluconf.h" ; then ! ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; pwd)` fi done ]) --- 613,619 ---- AC_CACHE_VAL(ac_cv_c_iluh5,[ for i in $dirlist; do if test -f "$i/ilu/runtime/kernel/iluconf.h" ; then ! ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; ${PWDCMD-pwd})` fi done ]) *************** AC_MSG_CHECKING(for ILU C++ headers in t *** 628,634 **** AC_CACHE_VAL(ac_cv_c_iluh2,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/cpp/resource.h" ; then ! ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; pwd)` fi done ]) --- 628,634 ---- AC_CACHE_VAL(ac_cv_c_iluh2,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/cpp/resource.h" ; then ! ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; ${PWDCMD-pwd})` fi done ]) *************** AC_MSG_CHECKING(for ILU C headers) *** 643,649 **** AC_CACHE_VAL(ac_cv_c_iluh3,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/c/resource.h" ; then ! ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c ; pwd)` fi done ]) --- 643,649 ---- AC_CACHE_VAL(ac_cv_c_iluh3,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/c/resource.h" ; then ! ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c ; ${PWDCMD-pwd})` fi done ]) *************** AC_MSG_CHECKING(for ILU C runtime header *** 658,664 **** AC_CACHE_VAL(ac_cv_c_iluh4,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/c/ilucstub.h" ; then ! ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c ; pwd)` fi done ]) --- 658,664 ---- AC_CACHE_VAL(ac_cv_c_iluh4,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/c/ilucstub.h" ; then ! ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c ; ${PWDCMD-pwd})` fi done ]) *************** fi *** 672,678 **** AC_CACHE_VAL(ac_cv_c_ilupath,[ for i in $dirlist; do if test -f "$i/ilu/Makefile" ; then ! ac_cv_c_ilupath=`(cd $i/ilu; pwd)` break fi done --- 672,678 ---- AC_CACHE_VAL(ac_cv_c_ilupath,[ for i in $dirlist; do if test -f "$i/ilu/Makefile" ; then ! ac_cv_c_ilupath=`(cd $i/ilu; ${PWDCMD-pwd})` break fi done *************** ILUTOP=${ac_cv_c_ilupath} *** 682,688 **** AC_MSG_CHECKING(for the ILU library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib,[ if test -f "$ac_cv_c_ilupath/runtime/kernel/Makefile" ; then ! ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; pwd)` AC_MSG_RESULT(found ${ac_cv_c_ilulib}/libilu.a) else AC_MSG_RESULT(no) --- 682,688 ---- AC_MSG_CHECKING(for the ILU library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib,[ if test -f "$ac_cv_c_ilupath/runtime/kernel/Makefile" ; then ! ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib}/libilu.a) else AC_MSG_RESULT(no) *************** fi]) *** 691,697 **** AC_MSG_CHECKING(for the ILU C++ bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib2,[ if test -f "$ac_cv_c_ilupath/runtime/cpp/Makefile" ; then ! ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; pwd)` AC_MSG_RESULT(found ${ac_cv_c_ilulib2}/libilu-c++.a) else AC_MSG_RESULT(no) --- 691,697 ---- AC_MSG_CHECKING(for the ILU C++ bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib2,[ if test -f "$ac_cv_c_ilupath/runtime/cpp/Makefile" ; then ! ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib2}/libilu-c++.a) else AC_MSG_RESULT(no) *************** fi]) *** 700,706 **** AC_MSG_CHECKING(for the ILU C bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib3,[ if test -f "$ac_cv_c_ilupath/runtime/c/Makefile" ; then ! ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; pwd)` AC_MSG_RESULT(found ${ac_cv_c_ilulib3}/libilu-c.a) else AC_MSG_RESULT(no) --- 700,706 ---- AC_MSG_CHECKING(for the ILU C bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib3,[ if test -f "$ac_cv_c_ilupath/runtime/c/Makefile" ; then ! ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib3}/libilu-c.a) else AC_MSG_RESULT(no) *************** fi]) *** 709,715 **** AC_MSG_CHECKING(for the ILU Tk bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib4,[ if test -f "$ac_cv_c_ilupath/runtime/mainloop/Makefile" ; then ! ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; pwd)` AC_MSG_RESULT(found ${ac_cv_c_ilulib4}/libilu-tk.a) else AC_MSG_RESULT(no) --- 709,715 ---- AC_MSG_CHECKING(for the ILU Tk bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib4,[ if test -f "$ac_cv_c_ilupath/runtime/mainloop/Makefile" ; then ! ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib4}/libilu-tk.a) else AC_MSG_RESULT(no) *************** AC_CACHE_VAL(ac_cv_c_tclh,[ *** 858,866 **** dnl first check to see if --with-tclinclude was specified if test x"${with_tclinclude}" != x ; then if test -f ${with_tclinclude}/tcl.h ; then ! ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` elif test -f ${with_tclinclude}/generic/tcl.h ; then ! ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` else AC_MSG_ERROR([${with_tclinclude} directory doesn't contain headers]) fi --- 858,866 ---- dnl first check to see if --with-tclinclude was specified if test x"${with_tclinclude}" != x ; then if test -f ${with_tclinclude}/tcl.h ; then ! ac_cv_c_tclh=`(cd ${with_tclinclude}; ${PWDCMD-pwd})` elif test -f ${with_tclinclude}/generic/tcl.h ; then ! ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tclinclude} directory doesn't contain headers]) fi *************** dnl next check if it came with Tcl confi *** 870,876 **** if test x"${ac_cv_c_tclconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tclconfig/$i/generic/tcl.h ; then ! ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; pwd)` break fi done --- 870,876 ---- if test x"${ac_cv_c_tclconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tclconfig/$i/generic/tcl.h ; then ! ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; ${PWDCMD-pwd})` break fi done *************** if test x"${ac_cv_c_tclh}" = x ; then *** 891,897 **** dnl might be multiple version of Tcl, and we want the most recent one. for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do if test -f $i/generic/tcl.h ; then ! ac_cv_c_tclh=`(cd $i/generic; pwd)` break fi done --- 891,897 ---- dnl might be multiple version of Tcl, and we want the most recent one. for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do if test -f $i/generic/tcl.h ; then ! ac_cv_c_tclh=`(cd $i/generic; ${PWDCMD-pwd})` break fi done *************** if test x"${no_tcl}" = x ; then *** 950,956 **** dnl First check to see if --with-tclconfig was specified. if test x"${with_tclconfig}" != x ; then if test -f "${with_tclconfig}/tclConfig.sh" ; then ! ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi --- 950,956 ---- dnl First check to see if --with-tclconfig was specified. if test x"${with_tclconfig}" != x ; then if test -f "${with_tclconfig}/tclConfig.sh" ; then ! ac_cv_c_tclconfig=`(cd ${with_tclconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi *************** if test x"${no_tcl}" = x ; then *** 959,966 **** dnl next check if it came with Tcl configuration file in the source tree if test x"${ac_cv_c_tclconfig}" = x ; then for i in $dirlist; do if test -f $srcdir/$i/unix/tclConfig.sh ; then ! ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; pwd)` break fi done --- 959,973 ---- dnl next check if it came with Tcl configuration file in the source tree if test x"${ac_cv_c_tclconfig}" = x ; then for i in $dirlist; do + dnl need to test both unix and win directories, since + dnl cygwin's tkConfig.sh could be in either directory depending + dnl on the cygwin port of tcl. if test -f $srcdir/$i/unix/tclConfig.sh ; then ! ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})` ! break ! fi ! if test -f $srcdir/$i/win/tclConfig.sh ; then ! ac_cv_c_tclconfig=`(cd $srcdir/$i/win; ${PWDCMD-pwd})` break fi done *************** if test x"${no_tcl}" = x ; then *** 978,985 **** dnl find the exact Tcl dir. We do it this way, cause there dnl might be multiple version of Tcl, and we want the most recent one. for i in `ls -dr $tclconfpath/tcl* 2>/dev/null ` ; do if test -f $i/unix/tclConfig.sh ; then ! ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done --- 985,999 ---- dnl find the exact Tcl dir. We do it this way, cause there dnl might be multiple version of Tcl, and we want the most recent one. for i in `ls -dr $tclconfpath/tcl* 2>/dev/null ` ; do + dnl need to test both unix and win directories, since + dnl cygwin's tclConfig.sh could be in either directory depending + dnl on the cygwin port of tcl. if test -f $i/unix/tclConfig.sh ; then ! ac_cv_c_tclconfig=`(cd $i/unix; ${PWDCMD-pwd})` ! break ! fi ! if test -f $i/win/tclConfig.sh ; then ! ac_cv_c_tclconfig=`(cd $i/win; ${PWDCMD-pwd})` break fi done *************** AC_CACHE_VAL(ac_cv_c_tkh,[ *** 1083,1091 **** dnl first check to see if --with-tkinclude was specified if test x"${with_tkinclude}" != x ; then if test -f ${with_tkinclude}/tk.h ; then ! ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` elif test -f ${with_tkinclude}/generic/tk.h ; then ! ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` else AC_MSG_ERROR([${with_tkinclude} directory doesn't contain headers]) fi --- 1097,1105 ---- dnl first check to see if --with-tkinclude was specified if test x"${with_tkinclude}" != x ; then if test -f ${with_tkinclude}/tk.h ; then ! ac_cv_c_tkh=`(cd ${with_tkinclude}; ${PWDCMD-pwd})` elif test -f ${with_tkinclude}/generic/tk.h ; then ! ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tkinclude} directory doesn't contain headers]) fi *************** dnl next check if it came with Tk config *** 1095,1101 **** if test x"${ac_cv_c_tkconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tkconfig/$i/generic/tk.h ; then ! ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; pwd)` break fi done --- 1109,1115 ---- if test x"${ac_cv_c_tkconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tkconfig/$i/generic/tk.h ; then ! ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; ${PWDCMD-pwd})` break fi done *************** if test x"${ac_cv_c_tkh}" = x ; then *** 1116,1122 **** dnl might be multiple version of Tk, and we want the most recent one. for i in `ls -dr $tkpath/tk* 2>/dev/null ` ; do if test -f $i/generic/tk.h ; then ! ac_cv_c_tkh=`(cd $i/generic; pwd)` break fi done --- 1130,1136 ---- dnl might be multiple version of Tk, and we want the most recent one. for i in `ls -dr $tkpath/tk* 2>/dev/null ` ; do if test -f $i/generic/tk.h ; then ! ac_cv_c_tkh=`(cd $i/generic; ${PWDCMD-pwd})` break fi done *************** if test x"${no_tk}" = x ; then *** 1169,1175 **** dnl First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then if test -f "${with_tkconfig}/tkConfig.sh" ; then ! ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi --- 1183,1189 ---- dnl First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then if test -f "${with_tkconfig}/tkConfig.sh" ; then ! ac_cv_c_tkconfig=`(cd ${with_tkconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi *************** if test x"${no_tk}" = x ; then *** 1178,1185 **** dnl next check if it came with Tk configuration file in the source tree if test x"${ac_cv_c_tkconfig}" = x ; then for i in $dirlist; do if test -f $srcdir/$i/unix/tkConfig.sh ; then ! ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; pwd)` break fi done --- 1192,1206 ---- dnl next check if it came with Tk configuration file in the source tree if test x"${ac_cv_c_tkconfig}" = x ; then for i in $dirlist; do + dnl need to test both unix and win directories, since + dnl cygwin's tkConfig.sh could be in either directory depending + dnl on the cygwin port of tk. if test -f $srcdir/$i/unix/tkConfig.sh ; then ! ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})` ! break ! fi ! if test -f $srcdir/$i/win/tkConfig.sh ; then ! ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})` break fi done *************** if test x"${no_tk}" = x ; then *** 1197,1204 **** dnl find the exact Tk dir. We do it this way, cause there dnl might be multiple version of Tk, and we want the most recent one. for i in `ls -dr $tkconfpath/tk* 2>/dev/null ` ; do if test -f $i/unix/tkConfig.sh ; then ! ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done --- 1218,1232 ---- dnl find the exact Tk dir. We do it this way, cause there dnl might be multiple version of Tk, and we want the most recent one. for i in `ls -dr $tkconfpath/tk* 2>/dev/null ` ; do + dnl need to test both unix and win directories, since + dnl cygwin's tkConfig.sh could be in either directory depending + dnl on the cygwin port of tk. if test -f $i/unix/tkConfig.sh ; then ! ac_cv_c_tkconfig=`(cd $i/unix; ${PWDCMD-pwd})` ! break ! fi ! if test -f $i/win/tkConfig.sh ; then ! ac_cv_c_tkconfig=`(cd $i/win; ${PWDCMD-pwd})` break fi done *************** AC_CACHE_VAL(ac_cv_c_itclh,[ *** 1274,1282 **** dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl.h ; then ! ac_cv_c_itclh=`(cd ${with_itclinclude}; pwd)` elif test -f ${with_itclinclude}/src/itcl.h ; then ! ac_cv_c_itclh=`(cd ${with_itclinclude}/src; pwd)` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain headers]) fi --- 1302,1310 ---- dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl.h ; then ! ac_cv_c_itclh=`(cd ${with_itclinclude}; ${PWDCMD-pwd})` elif test -f ${with_itclinclude}/src/itcl.h ; then ! ac_cv_c_itclh=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain headers]) fi *************** dnl next check if it came with Itcl conf *** 1286,1292 **** if test x"${ac_cv_c_itclconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_itclconfig/$i/src/itcl.h ; then ! ac_cv_c_itclh=`(cd $ac_cv_c_itclconfig/$i/src; pwd)` break fi done --- 1314,1320 ---- if test x"${ac_cv_c_itclconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_itclconfig/$i/src/itcl.h ; then ! ac_cv_c_itclh=`(cd $ac_cv_c_itclconfig/$i/src; ${PWDCMD-pwd})` break fi done *************** if test x"${ac_cv_c_itclh}" = x ; then *** 1307,1313 **** dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/src/itcl.h ; then ! ac_cv_c_itclh=`(cd $i/src; pwd)` break fi done --- 1335,1341 ---- dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/src/itcl.h ; then ! ac_cv_c_itclh=`(cd $i/src; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itcl}" = x ; then *** 1352,1361 **** dnl First check to see if --with-itcllib was specified. if test x"${with_itcllib}" != x ; then if test -f "${with_itcllib}/libitcl$TCL_SHARED_LIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd ${with_itcllib}; pwd)`/libitcl$TCL_SHARED_LIB_SUFFIX else if test -f "${with_itcllib}/libitcl$TCL_UNSHARED_LIB_SUFFIX"; then ! ac_cv_c_itcllib=`(cd ${with_itcllib}; pwd)`/libitcl$TCL_UNSHARED_LIB_SUFFIX fi fi fi --- 1380,1389 ---- dnl First check to see if --with-itcllib was specified. if test x"${with_itcllib}" != x ; then if test -f "${with_itcllib}/libitcl$TCL_SHARED_LIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd ${with_itcllib}; ${PWDCMD-pwd})`/libitcl$TCL_SHARED_LIB_SUFFIX else if test -f "${with_itcllib}/libitcl$TCL_UNSHARED_LIB_SUFFIX"; then ! ac_cv_c_itcllib=`(cd ${with_itcllib}; ${PWDCMD-pwd})`/libitcl$TCL_UNSHARED_LIB_SUFFIX fi fi fi *************** if test x"${no_itcl}" = x ; then *** 1371,1379 **** done dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "$itclpath/src/libitcl.$TCL_SHLIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd $itclpath/src; pwd)` elif test -f "$itclpath/src/libitcl.a"; then ! ac_cv_c_itcllib=`(cd $itclpath/src; pwd)` fi fi dnl check in a few other private locations --- 1399,1407 ---- done dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "$itclpath/src/libitcl.$TCL_SHLIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd $itclpath/src; ${PWDCMD-pwd})` elif test -f "$itclpath/src/libitcl.a"; then ! ac_cv_c_itcllib=`(cd $itclpath/src; ${PWDCMD-pwd})` fi fi dnl check in a few other private locations *************** if test x"${no_itcl}" = x ; then *** 1387,1396 **** for i in `ls -dr ${itclpath}/itcl* 2>/dev/null` ; do dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "$i/src/libitcl$TCL_SHLIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd $i/src; pwd)` break elif test -f "$i/src/libitcl.a"; then ! ac_cv_c_itcllib=`(cd $i/src; pwd)` break fi done --- 1415,1424 ---- for i in `ls -dr ${itclpath}/itcl* 2>/dev/null` ; do dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "$i/src/libitcl$TCL_SHLIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd $i/src; ${PWDCMD-pwd})` break elif test -f "$i/src/libitcl.a"; then ! ac_cv_c_itcllib=`(cd $i/src; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itcl}" = x ; then *** 1402,1410 **** ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "${ccpath}/libitcl$TCL_SHLIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd ${ccpath}; pwd)` elif test -f "${ccpath}/libitcl.a"; then ! ac_cv_c_itcllib=`(cd ${ccpath}; pwd)` fi fi ]) --- 1430,1438 ---- ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "${ccpath}/libitcl$TCL_SHLIB_SUFFIX" ; then ! ac_cv_c_itcllib=`(cd ${ccpath}; ${PWDCMD-pwd})` elif test -f "${ccpath}/libitcl.a"; then ! ac_cv_c_itcllib=`(cd ${ccpath}; ${PWDCMD-pwd})` fi fi ]) *************** AC_CACHE_VAL(ac_cv_c_itclsh,[ *** 1435,1443 **** dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl_sh ; then ! ac_cv_c_itclsh=`(cd ${with_itclinclude}; pwd)` elif test -f ${with_itclinclude}/src/itcl_sh ; then ! ac_cv_c_itclsh=`(cd ${with_itclinclude}/src; pwd)` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh]) fi --- 1463,1471 ---- dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl_sh ; then ! ac_cv_c_itclsh=`(cd ${with_itclinclude}; ${PWDCMD-pwd})` elif test -f ${with_itclinclude}/src/itcl_sh ; then ! ac_cv_c_itclsh=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh]) fi *************** if test x"${ac_cv_c_itclsh}" = x ; then *** 1458,1464 **** dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/src/itcl_sh ; then ! ac_cv_c_itclsh=`(cd $i/src; pwd)`/itcl_sh break fi done --- 1486,1492 ---- dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/src/itcl_sh ; then ! ac_cv_c_itclsh=`(cd $i/src; ${PWDCMD-pwd})`/itcl_sh break fi done *************** AC_CACHE_VAL(ac_cv_c_itclmkidx,[ *** 1497,1505 **** dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl_sh ; then ! ac_cv_c_itclmkidx=`(cd ${with_itclinclude}; pwd)` elif test -f ${with_itclinclude}/src/itcl_sh ; then ! ac_cv_c_itclmkidx=`(cd ${with_itclinclude}/src; pwd)` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh]) fi --- 1525,1533 ---- dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl_sh ; then ! ac_cv_c_itclmkidx=`(cd ${with_itclinclude}; ${PWDCMD-pwd})` elif test -f ${with_itclinclude}/src/itcl_sh ; then ! ac_cv_c_itclmkidx=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh]) fi *************** if test x"${ac_cv_c_itclmkidx}" = x ; th *** 1520,1526 **** dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/library/itcl_mkindex.tcl ; then ! ac_cv_c_itclmkidx=`(cd $i/library; pwd)`/itcl_mkindex.tcl break fi done --- 1548,1554 ---- dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/library/itcl_mkindex.tcl ; then ! ac_cv_c_itclmkidx=`(cd $i/library; ${PWDCMD-pwd})`/itcl_mkindex.tcl break fi done *************** if test x"${ac_cv_c_itclmkidx}" = x ; th *** 1531,1537 **** dnl Itcl 7.5 and greater puts library in subdir. Look there first. for i in `ls -dr $ccpath/itcl* 2>/dev/null ` ; do if test -f $i/itcl_mkindex.tcl ; then ! ac_cv_c_itclmkidx=`(cd $i; pwd)`/itcl_mkindex.tcl break fi done --- 1559,1565 ---- dnl Itcl 7.5 and greater puts library in subdir. Look there first. for i in `ls -dr $ccpath/itcl* 2>/dev/null ` ; do if test -f $i/itcl_mkindex.tcl ; then ! ac_cv_c_itclmkidx=`(cd $i; ${PWDCMD-pwd})`/itcl_mkindex.tcl break fi done *************** AC_CACHE_VAL(ac_cv_c_tixh,[ *** 1567,1575 **** dnl first check to see if --with-tixinclude was specified if test x"${with_tixinclude}" != x ; then if test -f ${with_tixinclude}/tix.h ; then ! ac_cv_c_tixh=`(cd ${with_tixinclude}; pwd)` elif test -f ${with_tixinclude}/generic/tix.h ; then ! ac_cv_c_tixh=`(cd ${with_tixinclude}/generic; pwd)` else AC_MSG_ERROR([${with_tixinclude} directory doesn't contain headers]) fi --- 1595,1603 ---- dnl first check to see if --with-tixinclude was specified if test x"${with_tixinclude}" != x ; then if test -f ${with_tixinclude}/tix.h ; then ! ac_cv_c_tixh=`(cd ${with_tixinclude}; ${PWDCMD-pwd})` elif test -f ${with_tixinclude}/generic/tix.h ; then ! ac_cv_c_tixh=`(cd ${with_tixinclude}/generic; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tixinclude} directory doesn't contain headers]) fi *************** dnl next check if it came with Tix confi *** 1579,1585 **** if test x"${ac_cv_c_tixconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tixconfig/$i/generic/tix.h ; then ! ac_cv_c_tixh=`(cd $ac_cv_c_tixconfig/$i/generic; pwd)` break fi done --- 1607,1613 ---- if test x"${ac_cv_c_tixconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tixconfig/$i/generic/tix.h ; then ! ac_cv_c_tixh=`(cd $ac_cv_c_tixconfig/$i/generic; ${PWDCMD-pwd})` break fi done *************** if test x"${ac_cv_c_tixh}" = x ; then *** 1600,1606 **** dnl might be multiple version of Tix, and we want the most recent one. for i in `ls -dr $tixpath/tix* 2>/dev/null ` ; do if test -f $i/generic/tix.h ; then ! ac_cv_c_tixh=`(cd $i/generic; pwd)` break fi done --- 1628,1634 ---- dnl might be multiple version of Tix, and we want the most recent one. for i in `ls -dr $tixpath/tix* 2>/dev/null ` ; do if test -f $i/generic/tix.h ; then ! ac_cv_c_tixh=`(cd $i/generic; ${PWDCMD-pwd})` break fi done *************** if test x"${no_tix}" = x ; then *** 1653,1659 **** # First check to see if --with-tixconfig was specified. if test x"${with_tixconfig}" != x ; then if test -f "${with_tixconfig}/tixConfig.sh" ; then ! ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` else AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh]) fi --- 1681,1687 ---- # First check to see if --with-tixconfig was specified. if test x"${with_tixconfig}" != x ; then if test -f "${with_tixconfig}/tixConfig.sh" ; then ! ac_cv_c_tixconfig=`(cd ${with_tixconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh]) fi *************** if test x"${no_tix}" = x ; then *** 1669,1675 **** ../../../tix \ `ls -dr ../../../tix[[4]]* 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then ! ac_cv_c_tixconfig=`(cd $i; pwd)` break fi done --- 1697,1703 ---- ../../../tix \ `ls -dr ../../../tix[[4]]* 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then ! ac_cv_c_tixconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_tix}" = x ; then *** 1678,1684 **** if test x"${ac_cv_c_tixconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then ! ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done --- 1706,1712 ---- if test x"${ac_cv_c_tixconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then ! ac_cv_c_tkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_tix}" = x ; then *** 1689,1695 **** ${srcdir}/../tix \ `ls -dr ${srcdir}/../tix[[4-9]]* 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then ! ac_cv_c_tixconfig=`(cd $i; pwd)` break fi done --- 1717,1723 ---- ${srcdir}/../tix \ `ls -dr ${srcdir}/../tix[[4-9]]* 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then ! ac_cv_c_tixconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itcl}" = x ; then *** 1736,1742 **** # First check to see if --with-itclconfig was specified. if test x"${with_itclconfig}" != x ; then if test -f "${with_itclconfig}/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` else AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh]) fi --- 1764,1770 ---- # First check to see if --with-itclconfig was specified. if test x"${with_itclconfig}" != x ; then if test -f "${with_itclconfig}/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd ${with_itclconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh]) fi *************** if test x"${no_itcl}" = x ; then *** 1752,1758 **** ../../../itcl/itcl \ `ls -dr ../../../itcl/itcl[[3]]* 2>/dev/null` ; do if test -f "$i/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd $i; pwd)` break fi done --- 1780,1786 ---- ../../../itcl/itcl \ `ls -dr ../../../itcl/itcl[[3]]* 2>/dev/null` ; do if test -f "$i/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itcl}" = x ; then *** 1761,1767 **** if test x"${ac_cv_c_itclconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd $i; pwd)` break fi done --- 1789,1795 ---- if test x"${ac_cv_c_itclconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itcl}" = x ; then *** 1772,1778 **** ${srcdir}/../itcl/itcl \ `ls -dr ${srcdir}/../itcl/itcl[[3]]* 2>/dev/null` ; do if test -f "$i/itcl/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd $i; pwd)` break fi done --- 1800,1806 ---- ${srcdir}/../itcl/itcl \ `ls -dr ${srcdir}/../itcl/itcl[[3]]* 2>/dev/null` ; do if test -f "$i/itcl/itclConfig.sh" ; then ! ac_cv_c_itclconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itk}" = x ; then *** 1823,1829 **** # First check to see if --with-itkconfig was specified. if test x"${with_itkconfig}" != x ; then if test -f "${with_itkconfig}/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` else AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh]) fi --- 1851,1857 ---- # First check to see if --with-itkconfig was specified. if test x"${with_itkconfig}" != x ; then if test -f "${with_itkconfig}/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd ${with_itkconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh]) fi *************** if test x"${no_itk}" = x ; then *** 1839,1845 **** ../../../itcl/itk \ `ls -dr ../../../itcl/itk[[3]]* 2>/dev/null` ; do if test -f "$i/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd $i; pwd)` break fi done --- 1867,1873 ---- ../../../itcl/itk \ `ls -dr ../../../itcl/itk[[3]]* 2>/dev/null` ; do if test -f "$i/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itk}" = x ; then *** 1848,1854 **** if test x"${ac_cv_c_itkconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/itcl/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd $i; pwd)` break fi done --- 1876,1882 ---- if test x"${ac_cv_c_itkconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/itcl/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** if test x"${no_itk}" = x ; then *** 1859,1865 **** ${srcdir}/../itcl/itk \ `ls -dr ${srcdir}/../itcl/itk[[3]]* 2>/dev/null` ; do if test -f "$i/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd $i; pwd)` break fi done --- 1887,1893 ---- ${srcdir}/../itcl/itk \ `ls -dr ${srcdir}/../itcl/itk[[3]]* 2>/dev/null` ; do if test -f "$i/itkConfig.sh" ; then ! ac_cv_c_itkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done *************** AC_CACHE_VAL(ac_cv_c_libguih,[ *** 1906,1914 **** dnl first check to see if --with-libguiinclude was specified if test x"${with_libguiinclude}" != x ; then if test -f ${with_libguiinclude}/guitcl.h ; then ! ac_cv_c_libguih=`(cd ${with_libguiinclude}; pwd)` elif test -f ${with_libguiinclude}/src/guitcl.h ; then ! ac_cv_c_libguih=`(cd ${with_libguiinclude}/src; pwd)` else AC_MSG_ERROR([${with_libguiinclude} directory doesn't contain headers]) fi --- 1934,1942 ---- dnl first check to see if --with-libguiinclude was specified if test x"${with_libguiinclude}" != x ; then if test -f ${with_libguiinclude}/guitcl.h ; then ! ac_cv_c_libguih=`(cd ${with_libguiinclude}; ${PWDCMD-pwd})` elif test -f ${with_libguiinclude}/src/guitcl.h ; then ! ac_cv_c_libguih=`(cd ${with_libguiinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_libguiinclude} directory doesn't contain headers]) fi *************** dnl next check if it came with Libgui co *** 1918,1924 **** if test x"${ac_cv_c_libguiconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_libguiconfig/$i/src/guitcl.h ; then ! ac_cv_c_libguih=`(cd $ac_cv_c_libguiconfig/$i/src; pwd)` break fi done --- 1946,1952 ---- if test x"${ac_cv_c_libguiconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_libguiconfig/$i/src/guitcl.h ; then ! ac_cv_c_libguih=`(cd $ac_cv_c_libguiconfig/$i/src; ${PWDCMD-pwd})` break fi done *************** if test x"${ac_cv_c_libguih}" = x ; then *** 1939,1945 **** dnl might be multiple version of Libgui, and we want the most recent one. for i in `ls -dr $libguipath/libgui* 2>/dev/null ` ; do if test -f $i/src/guitcl.h ; then ! ac_cv_c_libguih=`(cd $i/src; pwd)` break fi done --- 1967,1973 ---- dnl might be multiple version of Libgui, and we want the most recent one. for i in `ls -dr $libguipath/libgui* 2>/dev/null ` ; do if test -f $i/src/guitcl.h ; then ! ac_cv_c_libguih=`(cd $i/src; ${PWDCMD-pwd})` break fi done *************** AC_CACHE_VAL(ac_cv_c_libguilib,[ *** 1976,1982 **** if test x"${ac_cv_c_libguilib}" = x ; then for i in $dirlist; do if test -f "$i/libgui/src/Makefile" ; then ! ac_cv_c_libguilib=`(cd $i/libgui/src; pwd)` break fi done --- 2004,2010 ---- if test x"${ac_cv_c_libguilib}" = x ; then for i in $dirlist; do if test -f "$i/libgui/src/Makefile" ; then ! ac_cv_c_libguilib=`(cd $i/libgui/src; ${PWDCMD-pwd})` break fi done diff -Nrc3pad gcc-3.2.3/config/ChangeLog gcc-3.3/config/ChangeLog *** gcc-3.2.3/config/ChangeLog 2003-04-22 06:14:11.000000000 +0000 --- gcc-3.3/config/ChangeLog 2003-05-14 00:09:01.000000000 +0000 *************** *** 1,38 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. 2001-10-07 Joseph S. Myers --- 1,96 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2002-11-10 Stan Shebs ! Retire common MPW configury bits. ! * mpw-mh-mpw: Remove. ! * mpw: Remove directory along with all of its files. ! 2002-05-16 Rainer Orth ! * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. ! 2002-05-13 Nathanael Nerode ! * mh-apollo68: remove unused HDEFINES setting. ! * mh-dgux: remove unused HDEFINES setting. ! * mh-dgux386: remove unused HDEFINES setting, duplicate RANLIB=true. ! 2002-04-29 Nathanael Nerode ! * config/mh-cxux: remove dead code ! * config/mh-dgux386: remove dead code ! * config/mh-hp300: remove dead code ! * config/mh-hpux: remove dead code ! * config/mh-hpux8: remove dead code ! * config/mh-irix5: remove dead code ! * config/mh-irix6: remove dead code ! * config/mh-ncr3000: remove dead code ! * config/mh-ncrsvr43: remove dead code ! * config/mh-necv4: remove dead code ! * config/mh-sco: remove dead code ! * config/mh-solaris: remove dead code ! * config/mh-sysv: remove dead code ! * config/mh-sysv4: remove dead code ! * config/mh-sysv5: remove dead code ! * config/mh-irix4: remove, contains only dead code ! * config/mt-armpic: Delete. ! * config/mt-elfalphapic: Delete. ! * config/mt-i370pic: Delete. ! * config/mt-ia64pic: Delete. ! * config/mt-m68kpic: Delete. ! * config/mt-papic: Delete. ! * config/mt-ppcpic: Delete. ! * config/mt-s390pic: Delete. ! * config/mt-sparcpic: Delete. ! * config/mt-x86pic: Delete. ! 2002-04-19 Nathanael Nerode ! ! * mh-a68bsd: clean out dead code ! * mh-apollo68: clean out dead code ! * mh-cxux: clean out dead code ! * mh-decstation: clean out dead code ! * mh-dgux: clean out dead code ! * mh-dgux386: clean out dead code ! * mh-hp300: clean out dead code ! * mh-hpux: clean out dead code ! * mh-hpux8: clean out dead code ! * mh-interix: clean out dead code ! * mh-irix4: clean out dead code ! * mh-lynxrs6k: clean out dead code ! * mh-mingw32: clean out dead code ! * mh-ncr3000: clean out dead code ! * mh-ncrsvr43: clean out dead code ! * mh-necv4: clean out dead code ! * mh-openedition: clean out dead code ! * mh-riscos: clean out dead code ! * mh-sco: clean out dead code ! * mh-sysv4: clean out dead code ! * mh-lynxos: removed, contained only dead code ! * mh-vaxult2: removed, contained only dead code ! * mh-sun3: removed, contained only dead code ! ! 2002-04-15 Keith Seitz ! ! * acinclude.m4 (CYG_AC_PATH_TCLCONFIG): Search the win/ directory, ! too. ! (CYG_AC_PATH_TKCONFIG): Likewise. 2001-10-07 Joseph S. Myers *************** *** 60,66 **** * mh-ia64pic: New file. * mt-ia64pic: New file. ! Fri Jul 14 18:13:23 2000 Mark P Mitchell * mh-irix6 (CC): Don't set it. --- 118,129 ---- * mh-ia64pic: New file. * mt-ia64pic: New file. ! 2001-02-09 Martin Schwidefsky ! ! * mh-s390pic: New file. ! * mt-s390pic: New file. ! ! 2000-07-14 Mark P Mitchell * mh-irix6 (CC): Don't set it. diff -Nrc3pad gcc-3.2.3/config/mh-a68bsd gcc-3.3/config/mh-a68bsd *** gcc-3.2.3/config/mh-a68bsd 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-a68bsd 2002-04-19 17:26:07.000000000 +0000 *************** *** 1,12 **** RANLIB=true - - #None of the Apollo compilers can compile gas or binutils. The preprocessor - # chokes on bfd, the compiler won't let you assign integers to enums, and - # other problems. Defining CC to gcc is a questionable way to say "don't use - # the apollo compiler" (the preferred version of GCC could be called cc, - # or whatever), but I'm not sure leaving CC as cc is any better... - - #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG - CC=gcc - BISON=yacc --- 1,2 ---- diff -Nrc3pad gcc-3.2.3/config/mh-apollo68 gcc-3.3/config/mh-apollo68 *** gcc-3.2.3/config/mh-apollo68 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-apollo68 2002-05-13 21:14:13.000000000 +0000 *************** *** 1,3 **** - HDEFINES = -DUSG RANLIB=true - CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG --- 1 ---- diff -Nrc3pad gcc-3.2.3/config/mh-cxux gcc-3.3/config/mh-cxux *** gcc-3.2.3/config/mh-cxux 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-cxux 2002-04-30 03:30:21.000000000 +0000 *************** *** 1,14 **** # Configuration for Harris CX/UX 7 (and maybe 6), based on sysv4 configuration. - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV -DSVR4 RANLIB = true - # C++ debugging is not yet supported under SVR4 (DWARF) - CXXFLAGS=-O - # The l flag generates a warning from the SVR4 archiver, remove it. AR_FLAGS = cq - # Under CX/UX, we want to tell the compiler to use ANSI mode. - CC=cc -Xa --- 1,7 ---- diff -Nrc3pad gcc-3.2.3/config/mh-decstation gcc-3.3/config/mh-decstation *** gcc-3.2.3/config/mh-decstation 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-decstation 2002-04-19 17:26:08.000000000 +0000 *************** *** 1,5 **** - CC = cc -Wf,-XNg1000 - # for X11, since the native DECwindows include files are really broken when # it comes to function prototypes. X11_EXTRA_CFLAGS = "-DNeedFunctionPrototypes=0" --- 1,3 ---- diff -Nrc3pad gcc-3.2.3/config/mh-dgux gcc-3.3/config/mh-dgux *** gcc-3.2.3/config/mh-dgux 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-dgux 2002-05-13 21:14:13.000000000 +0000 *************** *** 1,4 **** - HDEFINES=-DHOST_SYS=DGUX_SYS - CC=gcc -Wall -ansi -D__using_DGUX RANLIB=true --- 1,2 ---- diff -Nrc3pad gcc-3.2.3/config/mh-dgux386 gcc-3.3/config/mh-dgux386 *** gcc-3.2.3/config/mh-dgux386 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-dgux386 2002-05-13 21:14:13.000000000 +0000 *************** *** 1,22 **** - # from mh-dgux - HDEFINES=-DHOST_SYS=DGUX_SYS - CC=gcc -Wall -ansi -D__using_DGUX - RANLIB = true - # from mh-sysv4 - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV -DSVR4 RANLIB = true - # C++ debugging is not yet supported under SVR4 (DWARF) - CXXFLAGS=-O - # The l flag generates a warning from the SVR4 archiver, remove it. AR_FLAGS = cr X11_EXTRA_LIBS = -lnsl - # from angela - # no debugging due to broken compiler, use BSD style timeofday - CFLAGS=-O -D_BSD_TIMEOFDAY_FLAVOR - --- 1,8 ---- diff -Nrc3pad gcc-3.2.3/config/mh-hp300 gcc-3.3/config/mh-hp300 *** gcc-3.2.3/config/mh-hp300 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-hp300 2002-04-30 03:30:21.000000000 +0000 *************** *** 1,13 **** - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV - # Avoid "too much defining" errors from HPUX compiler. - CC = cc -Wp,-H256000 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding. # If it's HP/UX ar, this should be harmless. RANLIB = ar ts - - # Native cc can't bootstrap gcc with -g. Defining CFLAGS here loses (a) - # for non-gcc directories, (b) if we are compiling with gcc, not - # native cc. Neither (a) nor (b) has a trivial fix though. - - CFLAGS = --- 1,3 ---- diff -Nrc3pad gcc-3.2.3/config/mh-hpux gcc-3.3/config/mh-hpux *** gcc-3.2.3/config/mh-hpux 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-hpux 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,4 **** - # Define SYSV as -DSYSV if you are using a System V operating system. - CC = cc -Wp,-H256000 - SYSV = -DSYSV RANLIB = true --- 1 ---- diff -Nrc3pad gcc-3.2.3/config/mh-hpux8 gcc-3.3/config/mh-hpux8 *** gcc-3.2.3/config/mh-hpux8 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-hpux8 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,4 **** - # Define SYSV as -DSYSV if you are using a System V operating system. - CC = cc -Wp,-H256000 - SYSV = -DSYSV RANLIB = true --- 1 ---- diff -Nrc3pad gcc-3.2.3/config/mh-interix gcc-3.3/config/mh-interix *** gcc-3.2.3/config/mh-interix 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-interix 2002-04-19 17:26:08.000000000 +0000 *************** *** 2,13 **** SHELL = sh RANLIB = true - # We don't want debugging info in Interix-hosted toolchains. - # Accomplish this by overriding CFLAGS. This is also a workaround - # for LD crash when building shared libstdc++. - CFLAGS=-O2 - CXXFLAGS=-O2 - # We also need to override LIBGCC2_DEBUG_CFLAGS so libgcc2 will be # built without debugging information --- 2,7 ---- diff -Nrc3pad gcc-3.2.3/config/mh-irix4 gcc-3.3/config/mh-irix4 *** gcc-3.2.3/config/mh-irix4 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-irix4 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - # Makefile changes for SGI's running IRIX-4.x. - # Tell compiler to use K&R C. We can't compile under the SGI Ansi - # environment. Also bump switch table size so that cp-parse will - # compile. Bump string length limit so linker builds. - - CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192 - SYSV = -DSYSV --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mh-irix5 gcc-3.3/config/mh-irix5 *** gcc-3.2.3/config/mh-irix5 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-irix5 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,3 **** # Makefile changes for SGI's running IRIX-5.x. - SYSV = -DSYSV RANLIB = true --- 1,2 ---- diff -Nrc3pad gcc-3.2.3/config/mh-irix6 gcc-3.3/config/mh-irix6 *** gcc-3.2.3/config/mh-irix6 2000-07-15 00:15:16.000000000 +0000 --- gcc-3.3/config/mh-irix6 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,3 **** # Makefile changes for SGI's running IRIX-6.x. - SYSV = -DSYSV RANLIB = true --- 1,2 ---- diff -Nrc3pad gcc-3.2.3/config/mh-lynxos gcc-3.3/config/mh-lynxos *** gcc-3.2.3/config/mh-lynxos 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-lynxos 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2 **** - # /bin/cc is less than useful for our purposes. Always use GCC - CC = /bin/gcc --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mh-lynxrs6k gcc-3.3/config/mh-lynxrs6k *** gcc-3.2.3/config/mh-lynxrs6k 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-lynxrs6k 2002-04-19 17:26:08.000000000 +0000 *************** *** 1,8 **** # LynxOS running on the rs6000 doesn't have ranlib RANLIB = true - # /bin/cc is less than useful for our purposes. Always use GCC - CC = /usr/cygnus/progressive/bin/gcc - # /bin/sh is too buggy, so use /bin/bash instead. SHELL = /bin/bash --- 1,5 ---- diff -Nrc3pad gcc-3.2.3/config/mh-mingw32 gcc-3.3/config/mh-mingw32 *** gcc-3.2.3/config/mh-mingw32 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-mingw32 2002-04-19 17:26:08.000000000 +0000 *************** *** 1,8 **** - # We don't want debugging info in Win32-hosted toolchains. - # Accomplish this by overriding CFLAGS. - CFLAGS=-O2 - CXXFLAGS=-O2 - # We also need to override LIBGCC2_DEBUG_CFLAGS so libgcc2 will be # built without debugging information --- 1,3 ---- diff -Nrc3pad gcc-3.2.3/config/mh-ncr3000 gcc-3.3/config/mh-ncr3000 *** gcc-3.2.3/config/mh-ncr3000 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-ncr3000 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,16 **** # Host configuration file for an NCR 3000 (i486/SVR4) system. - # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc. - # This compiler not only emits obnoxious copyright messages every time - # you run it, but it chokes and dies on a whole bunch of GNU source - # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc. - # Unfortunately though, the AT&T compiler sometimes generates code that - # the assembler barfs on if -g is used, so disable it by default as well. - CC = /usr/ccs/ATT/cc - CFLAGS = - - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV -DSVR4 RANLIB = true # The l flag generates a warning from the SVR4 archiver, remove it. --- 1,5 ---- diff -Nrc3pad gcc-3.2.3/config/mh-ncrsvr43 gcc-3.3/config/mh-ncrsvr43 *** gcc-3.2.3/config/mh-ncrsvr43 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-ncrsvr43 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,9 **** # Host configuration file for an NCR 3000 (i486/SVR43) system. - # The MetaWare compiler will generate a copyright message unless you - # turn it off by adding the -Hnocopyr flag. - CC = cc -Hnocopyr - - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV -DSVR4 RANLIB = true --- 1,3 ---- diff -Nrc3pad gcc-3.2.3/config/mh-necv4 gcc-3.3/config/mh-necv4 *** gcc-3.2.3/config/mh-necv4 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-necv4 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,10 **** # Host Makefile fragment for NEC MIPS SVR4. - # The C compiler on NEC MIPS SVR4 needs bigger tables. - CC = cc -ZXNd=5000 -ZXNg=1000 - - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV -DSVR4 RANLIB = true # NEC -lX11 needs some other libraries. --- 1,5 ---- diff -Nrc3pad gcc-3.2.3/config/mh-openedition gcc-3.3/config/mh-openedition *** gcc-3.2.3/config/mh-openedition 1999-09-08 06:31:40.000000000 +0000 --- gcc-3.3/config/mh-openedition 2002-04-19 17:26:08.000000000 +0000 *************** *** 1,2 **** RANLIB = true - CC = c89 --- 1 ---- diff -Nrc3pad gcc-3.2.3/config/mh-riscos gcc-3.3/config/mh-riscos *** gcc-3.2.3/config/mh-riscos 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-riscos 2002-04-19 17:26:08.000000000 +0000 *************** *** 1,15 **** # This is for a MIPS running RISC/os 4.52C. - # This is needed for GDB, but needs to be in the top-level make because - # if a library is compiled with the bsd headers and gets linked with the - # sysv system libraries all hell can break loose (e.g. a jmp_buf might be - # a different size). - # ptrace(2) apparently has problems in the BSD environment. No workaround is - # known except to select the sysv environment. Could we use /proc instead? - # These "sysv environments" and "bsd environments" often end up being a pain. - # - # This is not part of CFLAGS because perhaps not all C compilers have this - # option. - CC= cc -systype sysv - RANLIB = true --- 1,3 ---- diff -Nrc3pad gcc-3.2.3/config/mh-s390pic gcc-3.3/config/mh-s390pic *** gcc-3.2.3/config/mh-s390pic 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/config/mh-s390pic 2002-04-11 21:23:35.000000000 +0000 *************** *** 0 **** --- 1 ---- + PICFLAG=-fpic diff -Nrc3pad gcc-3.2.3/config/mh-sco gcc-3.3/config/mh-sco *** gcc-3.2.3/config/mh-sco 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-sco 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,10 **** - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV RANLIB = true # You may need this if you don't have bison. # BISON = yacc -Sm10400 - # The native C compiler botches some simple uses of const. Unfortunately, - # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h. - CC = cc -Dconst= X11_EXTRA_LIBS = -lsocket -lm -lintl -lmalloc --- 1,5 ---- diff -Nrc3pad gcc-3.2.3/config/mh-solaris gcc-3.3/config/mh-solaris *** gcc-3.2.3/config/mh-solaris 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-solaris 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,6 **** # Makefile changes for Suns running Solaris 2 - SYSV = -DSYSV RANLIB = true X11_EXTRA_LIBS = -lnsl -lsocket --- 1,5 ---- diff -Nrc3pad gcc-3.2.3/config/mh-sun3 gcc-3.3/config/mh-sun3 *** gcc-3.2.3/config/mh-sun3 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-sun3 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Sun's C compiler needs the -J flag to be able to compile cp-parse.c - # without overflowing the jump tables (-J says to use a 32 bit table) - CC = cc -J --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mh-sysv gcc-3.3/config/mh-sysv *** gcc-3.2.3/config/mh-sysv 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-sysv 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,3 **** - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV RANLIB = true --- 1 ---- diff -Nrc3pad gcc-3.2.3/config/mh-sysv4 gcc-3.3/config/mh-sysv4 *** gcc-3.2.3/config/mh-sysv4 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-sysv4 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,10 **** - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV -DSVR4 RANLIB = true - # C++ debugging is not yet supported under SVR4 (DWARF) - CXXFLAGS=-O - # The l flag generates a warning from the SVR4 archiver, remove it. AR_FLAGS = cr --- 1,5 ---- diff -Nrc3pad gcc-3.2.3/config/mh-sysv5 gcc-3.3/config/mh-sysv5 *** gcc-3.2.3/config/mh-sysv5 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-sysv5 2002-04-30 03:30:22.000000000 +0000 *************** *** 1,5 **** - # Define SYSV as -DSYSV if you are using a System V operating system. - SYSV = -DSYSV -DSVR4 -DSVR5 RANLIB = true # The l flag generates a warning from the SVR4 archiver, remove it. --- 1,3 ---- diff -Nrc3pad gcc-3.2.3/config/mh-vaxult2 gcc-3.3/config/mh-vaxult2 *** gcc-3.2.3/config/mh-vaxult2 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mh-vaxult2 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2 **** - # The old BSD pcc isn't up to compiling parts of gdb so use gcc - CC = gcc --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/ChangeLog gcc-3.3/config/mpw/ChangeLog *** gcc-3.2.3/config/mpw/ChangeLog 2003-04-22 06:14:08.000000000 +0000 --- gcc-3.3/config/mpw/ChangeLog 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,89 **** - 2003-04-22 Release Manager - - * GCC 3.2.3 Released. - - 2003-02-05 Release Manager - - * GCC 3.2.2 Released. - - 2002-11-19 Release Manager - - * GCC 3.2.1 Released. - - 2002-11-19 Release Manager - - * GCC 3.2.1 Released. - - 2002-11-18 Release Manager - - * GCC 3.2.1 Released. - - 2002-08-14 Release Manager - - * GCC 3.2 Released. - - 2002-07-25 Release Manager - - * GCC 3.1.1 Released. - - 2002-05-14 Release Manager - - * GCC 3.1 Released. - - 2002-05-14 Release Manager - - * GCC 3.1 Released. - - Tue Nov 26 12:34:12 1996 Stan Shebs - - * g-mpw-make.sed: Fix some comments. - - Mon Sep 16 14:42:52 1996 Stan Shebs - - * g-mpw-make.sed (HLDENV): Edit out all references. - - Thu Aug 15 19:49:23 1996 Stan Shebs - - * true: New script, identical to mpw-true. - * g-mpw-make.sed: Add @DASH_C_FLAG@ and @SEGMENT_FLAG()@ - to the editors for compile commands. - - Thu Aug 1 15:01:42 1996 Stan Shebs - - * mpw-true, mpw-touch, null-command: New scripts. - * README: Describe usage in more detail. - - Tue Dec 12 14:51:51 1995 Stan Shebs - - * g-mpw-make.sed: Don't edit out "version=" occurrences. - - Fri Dec 1 11:46:18 1995 Stan Shebs - - * g-mpw-make.sed (bindir, libdir): Edit the positions of - pathname separators to work with other pathnames better. - - Tue Nov 7 15:08:07 1995 Stan Shebs - - * g-mpw-make.sed: Add comment about Duplicate vs Catenate, - add additional pattern for editing link-compile commands. - - Tue Oct 24 14:28:51 1995 Stan Shebs - - * g-mpw-make.sed: Add handling for *.tab.[hc] files. - (CHILL_FOR_TARGET, CHILL_LIB): Edit out tricky definitions - of these. - - Thu Sep 28 21:05:10 1995 Stan Shebs - - * g-mpw-make.sed: New file, generic sed commands to translate - Unix makefiles into MPW makefile syntax. - - Fri Mar 17 11:51:20 1995 Stan Shebs - - * README: Clarify instructions. - * fi: Remove. - - Wed Dec 21 15:45:53 1994 Stan Shebs - - * MoveIfChange, README, fi, forward-include, open-brace, - tr-7to8-src: New files. --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/forward-include gcc-3.3/config/mpw/forward-include *** gcc-3.2.3/config/mpw/forward-include 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mpw/forward-include 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - Echo '#include' ¶""{1}"¶" >"{2}".tem - MoveIfChange "{2}".tem "{2}" - --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/g-mpw-make.sed gcc-3.3/config/mpw/g-mpw-make.sed *** gcc-3.2.3/config/mpw/g-mpw-make.sed 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mpw/g-mpw-make.sed 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,293 **** - # Sed commands to translate Unix makefiles into MPW makefiles. - # These are nominally generic, but work best on the makefiles used - # for GNU programs. - - # Whack out any commented-out lines that are probably commands; - # they can only cause trouble later on. - /^# /d - - # Change dependency char. - /:$/s/:/ \\Option-f/g - /^[^ :#][^:]*:/s/\([ ]*\):\([ ]*\)/ \\Option-f /g - - # Change syntax of Makefile vars. - /\$/s/\${\([a-zA-Z0-9_-]*\)}/{\1}/g - /\$/s/\$(\([a-zA-Z0-9_-]*\))/{\1}/g - / $@/s/ $@/ {Targ}/ - - # Double-$ are literals to Unix but not to MPW make. - /\$\$/s/\$\$/$/g - - # Change pathname syntax. - /\//s,\.\./\/\.\./,:::,g - /\//s,\.\./,::,g - /\.\//s,\./,:,g - /\//s,/,:,g - # Undo excess changes. - /and/s,and:or$,and/or, - /and/s,and:or ,and/or , - /want/s,want:need,want/need, - # Fixing up sed commands. - /-e/s_":\([^:]*\):d"_"/\1/d"_g - /-e/s_":\([^:]*\):,:\([^:]*\):d"_"/\1/,/\2/d"_g - - /=/s/ = \.$/ = :/ - - # Make these go away so that later edits not confused. - /HLDENV/s/{HLDENV}// - - # Comment out any explicit srcdir setting. - /srcdir/s/^srcdir/# srcdir/ - - /BASEDIR/s/^BASEDIR =.*$/BASEDIR = "{srcroot}"/ - /{BASEDIR}:/s/{BASEDIR}:/{BASEDIR}/g - /{srcdir}:/s/{srcdir}:/"{srcdir}"/g - /"{srcdir}":/s/"{srcdir}":/"{srcdir}"/g - - # Tweak some conventions that are backwards for the Mac. - /bindir/s/{exec_prefix}:bin/{exec_prefix}bin:/ - /libdir/s/{exec_prefix}:lib/{exec_prefix}lib:/ - - # Comment out settings of anything set by mpw host config. - /CC/s/^CC *=/#CC =/ - /CFLAGS/s/^CFLAGS *=/#CFLAGS =/ - /AR/s/^AR *=/#AR =/ - /AR_FLAGS/s/^AR_FLAGS *=/#AR_FLAGS =/ - /RANLIB/s/^RANLIB *=/#RANLIB =/ - /CC_LD/s/^CC_LD *=/#CC_LD =/ - /LDFLAGS/s/^LDFLAGS *=/#LDFLAGS =/ - - # Change -I usages. - /-I/s/-I\./-i :/g - /-I/s/-I::bfd/-i ::bfd:/g - /-I/s/-I::include/-i ::include:/g - /-I/s/-I/-i /g - - # Change -D usage. - /-D/s/\([ =]\)-D\([^ ]*\)/\1-d \2/g - - # Change continuation char. - /\\$/s/\\$/\\Option-d/ - - # Change wildcard char. - /\*/s/\*/\\Option-x/g - - # Change path of various types of source files. This rule does not allow - # for file names with multiple dots in the name. - /\.[chly]/s/\([ ><=]\)\([-a-zA-Z0-9_${}:"]*\)\.\([chly]\)/\1"{s}"\2.\3/g - /\.[chly]/s/^\([-a-zA-Z0-9_${}:"]*\)\.\([chly]\)/"{s}"\1.\2/ - # Allow files named *.tab.[ch] as a special case. - /\.tab\.[ch]/s/\([ ><=]\)\([-a-zA-Z0-9_${}:"]*\.tab\)\.\([ch]\)/\1"{s}"\2.\3/g - /\.tab\.[ch]/s/^\([-a-zA-Z0-9_${}:"]*\.tab\)\.\([ch]\)/"{s}"\1.\2/ - # Fix some overenthusiasms. - /{s}/s/"{s}""{srcdir}"/"{srcdir}"/g - /{s}/s/"{s}"{\([a-zA-Z0-9_]*\)dir}/"{\1dir}"/g - /{s}/s/"{s}"{\([a-zA-Z0-9_]*\)DIR}/"{\1DIR}"/g - /{s}/s/"{s}""{\([a-zA-Z0-9_]*\)dir}"/"{\1dir}"/g - /{s}/s/"{s}""{\([a-zA-Z0-9_]*\)DIR}"/"{\1DIR}"/g - /{s}/s/"{s}":/:/g - /{s}/s/^"{s}"//g - /{s}/s/"{s}""{s}"/"{s}"/g - /{s}/s/"{s}""{srcdir}"/"{s}"/g - /{s}/s/"{srcdir}""{s}"/"{s}"/g - - # The .def files are also typically source files. - /\.def/s/\([ ><]\)\([-a-zA-Z0-9_${}:"]*\)\.def/\1"{s}"\2.def/g - /\.def/s/^\([-a-zA-Z0-9_${}:"]*\)\.def/"{s}"\1.def/g - - # Change extension and path of objects. - /\.o/s/\([ =]\)\([-a-zA-Z0-9_${}:"]*\)\.o/\1"{o}"\2.c.o/g - /\.o/s/^\([-a-zA-Z0-9_${}:"]*\)\.o/"{o}"\1.c.o/ - # Allow *.tab.o files as a special case of a 2-dot-name file. - /\.o/s/\([ =]\)\([-a-zA-Z0-9_${}:"]*\)\.tab\.o/\1"{o}"\2.tab.c.o/g - /\.o/s/^\([-a-zA-Z0-9_${}:"]*\)\.tab\.o/"{o}"\1.tab.c.o/ - # Clean up. - /"{o}"/s/"{o}""{o}"/"{o}"/g - /"{o}"/s/^"{o}"\([a-zA-Z0-9_]*\)=/\1=/ - - # Change extension of libs. - /\.a/s/lib\([a-z]*\)\.a/lib\1.o/g - - # Remove non-fail option. - /-/s/^\([ ]*\)-/\1/ - # Fix overeagernesses - assumes no one-letter commands. - /^[ ]*[a-z] /s/^\([ ]*\)\([a-z]\) /\1-\2 / - - # Remove non-echo option. (watch out for autoconf things) - /@/s/^\([ ]*\)@/\1/ - - # Change cp to Duplicate. - # Catenate is perhaps more accurate, but the pattern would have to - # identify the output file and add a '>' redirection into it. - /cp/s/^\([ ]*\)cp /\1Duplicate -d -y / - # Change mv to Rename. - /mv/s/^\([ ]*\)mv /\1Rename -y / - /Rename/s/^\([ ]*\)Rename -y -f/\1Rename -y/ - # Change rm to Delete. - /rm -rf/s/^\([ ]*\)rm -rf /\1Delete -i -y / - /rm -f/s/^\([ ]*\)rm -f /\1Delete -i -y / - /rm/s/^\([ ]*\)rm /\1Delete -i -y / - # Note that we don't mess with ln - directory-specific scripts - # must decide what to do with symlinks. - # Change cat to Catenate. - /cat/s/^\([ ]*\)cat /\1Catenate / - # Change touch to mpw-touch. - /touch/s/^\([ ]*\)touch /\1mpw-touch / - # Change mkdir to NewFolder. - /mkdir/s/^\([ ]*\)mkdir /\1NewFolder / - # Change var setting to Set. - /=/s/^\([ ]*\)\([-a-zA-Z0-9_]*\)=\([^;]*\); \\Option-d/\1Set \2 \3/ - - # Change tests. - /if /s/if \[ *-f \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" != ""/ - /if /s/if \[ *-f \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" != ""/ - /if /s/if \[ ! *-f \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" == ""/ - /if /s/if \[ ! *-f \([^ ]*\) ] *; *then \\Option-d/If "`Exists "\1"`" == ""/ - - /if /s/if \[ *-d \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" != ""/ - /if /s/if \[ *-d \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" != ""/ - /if /s/if \[ ! *-d \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" == ""/ - /if /s/if \[ ! *-d \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" == ""/ - - /if /s/if \[ -d \([^ ]*\) ] *; then true *; else mkdir \([^ ;]*\) *; fi/If "`Exists "\1"`" != "" NewFolder \2 End If/ - - /if /s/if \[ \([^ ]*\) = \([^ ]*\) ] *; *\\Option-d/If "\1" == "\2"/ - /if /s/if \[ \([^ ]*\) = \([^ ]*\) ] *; *then *\\Option-d/If "\1" == "\2"/ - - /if /s/if \[ \([^ ]*\) != \([^ ]*\) ] *; *\\Option-d/If "\1" != "\2"/ - /if /s/if \[ \([^ ]*\) != \([^ ]*\) ] *; *then *\\Option-d/If "\1" != "\2"/ - - /if /s/if \[ \([^ ]*\) -eq \([^ ]*\) ] *; *\\Option-d/If "\1" != "\2"/ - /if /s/if \[ \([^ ]*\) -eq \([^ ]*\) ] *; *then *\\Option-d/If "\1" != "\2"/ - - /^[ ]*else true$/c\ - Else\ - mpw-true\ - - - /else/s/^\([ ]*\)else[ ]*$/\1Else/ - /else/s/^\([ ]*\)else[; ]*\\Option-d$/\1Else/ - - /^[ ]*else[ ]*true[ ]*$/c\ - Else\ - mpw-true - - /^[ ]*else[ ]*true[; ]*fi$/c\ - Else\ - mpw-true\ - End If - - /fi/s/^\([ ]*\)fi *$/\1End/ - /fi/s/^\([ ]*\)fi *; *\\Option-d/\1End/ - - # Change looping. - /for/s/^\([ ]*\)for \([-a-zA-Z0-9_]*\) in \([^;]*\); *do *\\Option-d/\1For \2 In \3/ - /^\([ ]*\)do *\\Option-d/d - /done/s/^\([ ]*\)done *; *\\Option-d/\1End/ - /done/s/^\([ ]*\)done$/\1End/ - - # Trailing semicolons and continued lines are unneeded sh syntax. - /; \\Option-d/s/; \\Option-d// - - # Change move-if-change to MoveIfChange. - /move-if-change/s/\([^ ]*\)move-if-change/MoveIfChange/g - - # Change $(SHELL) to the script name by itself. - /SHELL/s/^\([ ]*\){SHELL} /\1/ - - # Change syntax of default rule dependency. - /^\.c\.o/s/^\.c\.o \\Option-f$/.c.o \\Option-f .c/ - - # Change default rule's action. - /{CC} -c/s/{CC} -c \(.*\) \$<$/{CC} @DASH_C_FLAG@ {DepDir}{Default}.c \1 @SEGMENT_FLAG({Default})@ -o {TargDir}{Default}.c.o/ - - # This is pretty disgusting, but I can't seem to detect empty rules. - /Option-f$/s/Option-f$/Option-f _oldest/g - - # Remove -c from explicit compiler calls. (but should not if GCC) - # Handle the case of a source file that is "{xxx}"file.c. - / -c /s/{\([A-Z_]*\)CC}\(.*\) -c \(.*\)"\([^"]*\)"\([-a-z_]*\)\.c/{\1CC}\2 @DASH_C_FLAG@ \3"\4"\5.c -o "{o}"\5.c.o/ - # Handle the case of a source file that is "{xxx}"dir:file.c. - / -c /s/{\([A-Z_]*\)CC}\(.*\) -c \(.*\)"\([^"]*\)"\([-a-z_]*\):\([-a-z_]*\)\.c/{\1CC}\2 @DASH_C_FLAG@ \3"\4"\5:\6.c -o "{o}"\6.c.o/ - - # Change linking cc to linking sequence. - /-o/s/^\([ ]*\){CC} \(.*\){\([A-Z_]*\)CFLAGS} \(.*\){LDFLAGS} \(.*\)-o \([^ ]*\) \(.*\)$/\1{CC_LD} \2 {\3CFLAGS} \4 {LDFLAGS} \5 -o \6{PROG_EXT} \7\ - \1{MAKEPEF} \6{PROG_EXT} -o \6 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\ - \1{REZ} "{s}"\6.r -o \6 -append -d PROG_NAME='"'\6'"' -d VERSION_STRING='"'{version}'"'/ - /-o/s/^\([ ]*\){CC} \(.*\){\([A-Z_]*\)CFLAGS} \(.*\)-o \([^ ]*\) \(.*\){LDFLAGS} \(.*\)$/\1{CC_LD} \2 {\3CFLAGS} \4 {LDFLAGS} \6 -o \5{PROG_EXT} \7\ - \1{MAKEPEF} \5{PROG_EXT} -o \5 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\ - \1{REZ} "{s}"\5.r -o \5 -append -d PROG_NAME='"'\5'"' -d VERSION_STRING='"'{version}'"'/ - /-o/s/^\([ ]*\){HOST_CC} \(.*\)-o \([^ ]*\) \(.*\)$/\1{HOST_CC_LD} \2 -o \3{PROG_EXT} \4\ - \1{MAKEPEF} \3{PROG_EXT} -o \3 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\ - \1{REZ} "{s}"\3.r -o \3 -append -d PROG_NAME='"'\3'"' -d VERSION_STRING='"'{version}'"'/ - - # Comment out .NOEXPORT rules. - /\.NOEXPORT/s/^\.NOEXPORT/#\.NOEXPORT/ - # Comment out .PHONY rules. - /\.PHONY/s/^\.PHONY/#\.PHONY/ - # Comment out .PRECIOUS rules. - /\.PRECIOUS/s/^\.PRECIOUS/#\.PRECIOUS/ - # Comment out .SUFFIXES rules. - /\.SUFFIXES/s/^\.SUFFIXES/#\.SUFFIXES/ - - # Set the install program appropriately. - /INSTALL/s/^INSTALL *= *`.*`:install.sh -c/INSTALL = Duplicate -y/ - - # Don't try to decide whether to use the tree's own tools. - /bison/s/`.*bison:bison.*`/bison -y/ - /byacc/s/`.*byacc:byacc.*`/byacc/ - /flex/s/`.*flex:flex.*`/flex/ - - # Turn transformed C comments in echo commands back into comments. - /echo/s,echo '\(.*\):\\Option-x\(.*\)\\Option-x:\(.*\)',echo '\1/*\2*/\3', - - # Whack out various clever expressions that search for tools, since - # the clever code is too /bin/sh specific. - - /^AR_FOR_TARGET = `/,/`$/c\ - AR_FOR_TARGET = ::binutils:ar\ - - - /^RANLIB_FOR_TARGET = `/,/`$/c\ - RANLIB_FOR_TARGET = ::binutils:ranlib\ - - - /^RANLIB_TEST_FOR_TARGET = /,/ranlib ] )$/c\ - RANLIB_TEST_FOR_TARGET = \ - - - /^EXPECT = `/,/`$/c\ - EXPECT = \ - - - /^RUNTEST = `/,/`$/c\ - RUNTEST = \ - - - /^CC_FOR_TARGET = `/,/`$/c\ - CC_FOR_TARGET = \ - - - /^CXX_FOR_TARGET = `/,/`$/c\ - CXX_FOR_TARGET = \ - - - /^CHILL_FOR_TARGET = `/,/`$/c\ - CHILL_FOR_TARGET = \ - - - /^CHILL_LIB = `/,/`$/c\ - CHILL_LIB = \ - - /sanit/s/{start-sanit...-[a-z0-9]*}// - /sanit/s/{end-sanit...-[a-z0-9]*}// - - # Add standard defines and default rules. - /^# srcdir/a\ - \ - s = "{srcdir}"\ - \ - o = :\ - \ - "{o}" \\Option-f : "{s}" - --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/MoveIfChange gcc-3.3/config/mpw/MoveIfChange *** gcc-3.2.3/config/mpw/MoveIfChange 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mpw/MoveIfChange 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,19 **** - # Rename a file only if it is different from a previously existing - # file of the same name. This is useful for keeping make from doing - # too much work if the contents of a file haven't changed. - - # This is an MPW translation of the standard GNU sh script move-if-change. - - Set exit 0 - - If "`exists -f "{2}"`" - Compare "{1}" "{2}" >dev:null - If {status} != 0 - Rename -y "{1}" "{2}" - Else - Echo "{2}" is unchanged - Delete -i -y "{1}" - End - Else - Rename -y "{1}" "{2}" - End --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/mpw-touch gcc-3.3/config/mpw/mpw-touch *** gcc-3.2.3/config/mpw/mpw-touch 1999-09-04 15:08:49.000000000 +0000 --- gcc-3.3/config/mpw/mpw-touch 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - # "Touch" command. - - If "`Exists "{1}"`" != "" - SetFile -m . "{1}" - Else - Echo ' ' > "{1}" - End If --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/mpw-true gcc-3.3/config/mpw/mpw-true *** gcc-3.2.3/config/mpw/mpw-true 1999-09-04 15:08:49.000000000 +0000 --- gcc-3.3/config/mpw/mpw-true 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - Exit 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/null-command gcc-3.3/config/mpw/null-command *** gcc-3.2.3/config/mpw/null-command 1999-09-04 15:08:49.000000000 +0000 --- gcc-3.3/config/mpw/null-command 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - # This command does nothing. --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/open-brace gcc-3.3/config/mpw/open-brace *** gcc-3.2.3/config/mpw/open-brace 1999-09-04 15:08:49.000000000 +0000 --- gcc-3.3/config/mpw/open-brace 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,4 **** - # MPW makefiles seem not to have any way to get a literal open - # brace into a rule anywhere, so this does the job. - - Echo '{' --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/README gcc-3.3/config/mpw/README *** gcc-3.2.3/config/mpw/README 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mpw/README 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,23 **** - This directory contains MPW scripts and related files that are needed to - build Cygnus GNU tools for MPW. The scripts should be somewhere on the - command path; our usual practice has been to have a separate directory - for the scripts, and put the tools (byacc, flex, and sed at least) there - also; then it's easier to drag the support bits around as a group, or to - upgrade MPW versions. The complete package of scripts and tool binaries - is usually available as pub/mac/buildtools.cpt.hqx on ftp.cygnus.com. - - "tr-7to8-src" is actually the source to an MPW script that transforms - sequences like "\Option-d" into the actual 8-bit chars that MPW needs. - It's only the source because it can't itself include any 8-bit chars. - It *can* be processed into a genuine "tr-7to8" by using itself: - - tr-7to8 tr-7to8-src | sed -e 's/Src//' >new-tr-7to8 - - Use this to verify: - - compare tr-7to8 new-tr-7to8 - - If you don't have a working tr-7to8, then you will have to manually - replace all occurrences of "\Option-d" with real Option-d (which looks - like a delta), then do similarly with all the other "\Option-..." - strings, and then change "\SrcOption-d" into the string "\Option-d". --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/tr-7to8-src gcc-3.3/config/mpw/tr-7to8-src *** gcc-3.2.3/config/mpw/tr-7to8-src 1999-09-04 15:08:49.000000000 +0000 --- gcc-3.3/config/mpw/tr-7to8-src 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,9 **** - StreamEdit -e \Option-d - '/\Option-x/ \Option-d - Replace /\Option-d\SrcOption-d/ "\Option-d\Option-d" -c \Option-5 ; \Option-d - Replace /\Option-d\SrcOption-f/ "\Option-d\Option-f" -c \Option-5 ; \Option-d - Replace /\Option-d\SrcOption-8/ "\Option-d\Option-8" -c \Option-5 ; \Option-d - Replace /\Option-d\SrcOption-5/ "\Option-d\Option-5" -c \Option-5 ; \Option-d - Replace /\Option-d\SrcOption-x/ "\Option-d\Option-x" -c \Option-5 ; \Option-d - Replace /\Option-d\SrcOption-r/ "\Option-d\Option-r" -c \Option-5' \Option-d - "{1}" --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw/true gcc-3.3/config/mpw/true *** gcc-3.2.3/config/mpw/true 1999-09-04 15:08:49.000000000 +0000 --- gcc-3.3/config/mpw/true 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - Exit 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mpw-mh-mpw gcc-3.3/config/mpw-mh-mpw *** gcc-3.2.3/config/mpw-mh-mpw 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mpw-mh-mpw 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,157 **** - # This is an MPW makefile fragment. - - # Since there are a multiplicity of Mac compilers and two different - # processors, this file is primarily a library of options for each - # compiler. Somebody else (such as a configure or build script) will - # make the actual choice. - - # Compiler to use for compiling. - - CC_MPW_C = C -d MPW_C -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -mc68020 -model far -b -w - - CC_SC = SC -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -mc68020 -model far -b -i '' -i : - - CC_MWC68K = MWC68K -d MPW -enum int -mpw_chars -sym on -w off -mc68020 -model far - - CC_PPCC = PPCC -d powerc=1 -d pascal= -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -w - - CC_MRC = MrC -d powerc=1 -d pascal= -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -i '' -i : -jm - - CC_SMrC = SMrC -d MPW - - # "-mpw_chars" is necessary because GNU sources often mix signed and - # unsigned casually. - # "-w off" is not a great idea, but CW7 is complaining about enum - # assignments. - # "-opt global,peep,l4,speed" is sometimes good, and sometimes bad. - # We must use {CIncludes} so that MPW tools will work; {MWCIncludes} - # defines stdout, islower, etc, in ways that are incompatible with MPW's - # runtime. However, this cannot be done via -i "{CIncludes}", since - # that does not affect how <>-type includes happen; instead, the variable - # MWCIncludes must be set to point at {CIncludes}. - - CC_MWCPPC = MWCPPC -d MPW -enum int -mpw_chars -sym on -w off - - # Note that GCC does *not* wire in a definition of "pascal", so that - # it can be handled in another way if desired. - - CC_68K_GCC = gC -Dpascal= -DANSI_PROTOTYPES -DMPW - - CC_PPC_GCC = gC -Dpowerc=1 -Dpascal= -DANSI_PROTOTYPES -DMPW - - # Nothing for the default CFLAGS. - - CFLAGS = - - # Tool to use for making libraries/archives. - - AR_LIB = Lib - - AR_MWLINK68K = MWLink68K -xm library - - AR_PPCLINK = PPCLink -xm library - - AR_MWLINKPPC = MWLinkPPC -xm library - - AR_AR = ar - - AR_FLAGS = -o - - RANLIB_NULL = null-command - - RANLIB_RANLIB = ranlib - - # Compiler and/or linker to use for linking. - - CC_LD_LINK = Link -w -d -model far {CC_LD_TOOL_FLAGS} - - CC_LD_MWLINK68K = MWLink68K -w {CC_LD_TOOL_FLAGS} -sym on -model far - - CC_LD_PPCLINK = PPCLink -main __start -outputformat xcoff - - CC_LD_MWLINKPPC = MWLinkPPC -w {CC_LD_TOOL_FLAGS} -sym on - - CC_LD_GLD = gC - - # Extension for linker output. - - PROG_EXT_68K = - - PROG_EXT_XCOFF = .xcoff - - # Nothing for the default LDFLAGS. - - LDFLAGS = -w - - CC_LD_TOOL_FLAGS = -c 'MPS ' -t MPST - - # Libraries to link against. - - # It would appear that the math libraries are not - # needed except to provide a definition for scalb, - # which is called from ldexp, which is referenced - # in the m68k opcodes library. - - EXTRALIBS_C = \Option-d - "{CLibraries}"StdClib.o \Option-d - "{CLibraries}"Math.o \Option-d - "{CLibraries}"CSANELib.o \Option-d - "{Libraries}"Stubs.o \Option-d - "{Libraries}"Runtime.o \Option-d - "{Libraries}"Interface.o \Option-d - "{Libraries}"ToolLibs.o - - EXTRALIBS_MWC68K = \Option-d - "{CLibraries}"StdClib.o \Option-d - "{CLibraries}"Math.o \Option-d - "{CLibraries}"CSANELib.o \Option-d - "{Libraries}"Stubs.o \Option-d - "{Libraries}"Runtime.o \Option-d - "{Libraries}"Interface.o \Option-d - "{Libraries}"ToolLibs.o \Option-d - "{MW68KLibraries}MPW ANSI (4i) C.68K.Lib" - - EXTRALIBS_PPC_XCOFF = \Option-d - "{PPCLibraries}"StdCRuntime.o \Option-d - "{PPCLibraries}"InterfaceLib.xcoff \Option-d - "{PPCLibraries}"MathLib.xcoff \Option-d - "{PPCLibraries}"StdCLib.xcoff \Option-d - "{PPCLibraries}"PPCToolLibs.o \Option-d - "{PPCLibraries}"PPCCRuntime.o \Option-d - "{GCCPPCLibraries}"libgcc.xcoff - - EXTRALIBS_PPC = \Option-d - "{PPCLibraries}"StdCRuntime.o \Option-d - "{SharedLibraries}"InterfaceLib \Option-d - "{SharedLibraries}"MathLib \Option-d - "{SharedLibraries}"StdCLib \Option-d - "{PPCLibraries}"PPCToolLibs.o \Option-d - "{PPCLibraries}"PPCCRuntime.o \Option-d - "{GCCPPCLibraries}"libgcc.xcoff - - EXTRALIBS_MWCPPC = \Option-d - "{MWPPCLibraries}"MWStdCRuntime.Lib \Option-d - "{MWPPCLibraries}"InterfaceLib \Option-d - "{MWPPCLibraries}"StdCLib \Option-d - "{MWPPCLibraries}"MathLib \Option-d - "{MWPPCLibraries}"PPCToolLibs.o - - # Tool to make PEF with, if needed. - - MAKEPEF_NULL = null-command - - MAKEPEF_PPC = MakePEF - - MAKEPEF_FLAGS = \Option-d - -l InterfaceLib.xcoff=InterfaceLib \Option-d - -l MathLib.xcoff=MathLib \Option-d - -l StdCLib.xcoff=StdCLib - - MAKEPEF_TOOL_FLAGS = -ft MPST -fc 'MPS ' - - # Resource compiler to use. - - REZ_68K = Rez - - REZ_PPC = Rez -d WANT_CFRG - --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-armpic gcc-3.3/config/mt-armpic *** gcc-3.2.3/config/mt-armpic 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mt-armpic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fPIC --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-elfalphapic gcc-3.3/config/mt-elfalphapic *** gcc-3.2.3/config/mt-elfalphapic 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mt-elfalphapic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fPIC --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-i370pic gcc-3.3/config/mt-i370pic *** gcc-3.2.3/config/mt-i370pic 2000-07-21 05:44:02.000000000 +0000 --- gcc-3.3/config/mt-i370pic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fPIC --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-ia64pic gcc-3.3/config/mt-ia64pic *** gcc-3.2.3/config/mt-ia64pic 2000-07-21 14:11:08.000000000 +0000 --- gcc-3.3/config/mt-ia64pic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fpic --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-m68kpic gcc-3.3/config/mt-m68kpic *** gcc-3.2.3/config/mt-m68kpic 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mt-m68kpic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fpic --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-papic gcc-3.3/config/mt-papic *** gcc-3.2.3/config/mt-papic 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mt-papic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fPIC --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-ppcpic gcc-3.3/config/mt-ppcpic *** gcc-3.2.3/config/mt-ppcpic 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mt-ppcpic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fPIC --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-sparcpic gcc-3.3/config/mt-sparcpic *** gcc-3.2.3/config/mt-sparcpic 2000-06-21 22:22:41.000000000 +0000 --- gcc-3.3/config/mt-sparcpic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac` --- 0 ---- diff -Nrc3pad gcc-3.2.3/config/mt-x86pic gcc-3.3/config/mt-x86pic *** gcc-3.2.3/config/mt-x86pic 1999-09-04 15:08:48.000000000 +0000 --- gcc-3.3/config/mt-x86pic 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - PICFLAG_FOR_TARGET=-fpic --- 0 ---- diff -Nrc3pad gcc-3.2.3/config.if gcc-3.3/config.if *** gcc-3.2.3/config.if 2002-06-28 01:53:37.000000000 +0000 --- gcc-3.3/config.if 2003-01-30 11:53:39.000000000 +0000 *************** fi *** 22,30 **** # Set libstdcxx_incdir. # This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4. ! gcc_version_trigger=${if_topsrcdir}/gcc/version.c ! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` ! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` libstdcxx_incdir=c++/${gcc_version} # The trickiest part is libc_interface. --- 22,39 ---- # Set libstdcxx_incdir. # This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4. ! if test -z "$gcc_version"; then ! if test -z "${gcc_version_trigger}" \ ! && test -f ${if_topsrcdir}/gcc/version.c; then ! gcc_version_trigger=${if_topsrcdir}/gcc/version.c ! fi ! if test -f "${gcc_version_trigger}"; then ! gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'` ! else ! gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'` ! fi ! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! fi libstdcxx_incdir=c++/${gcc_version} # The trickiest part is libc_interface. diff -Nrc3pad gcc-3.2.3/config-ml.in gcc-3.3/config-ml.in *** gcc-3.2.3/config-ml.in 2003-02-12 17:44:49.000000000 +0000 --- gcc-3.3/config-ml.in 2002-07-01 19:59:22.000000000 +0000 *************** *** 64,74 **** # newlib. It is up to each target to turn on multilib support for the other # libraries as desired. - # We have to handle being invoked by both Cygnus configure and Autoconf. - # - # Cygnus configure incoming variables: - # srcdir, subdir, host, arguments - # # Autoconf incoming variables: # srcdir, host, ac_configure_args # --- 64,69 ---- *************** *** 78,98 **** # Note that `host' in this case is GCC's `target'. Target libraries are # configured for a particular host. ! if [ -n "${ac_configure_args}" ]; then ! Makefile=${ac_file-Makefile} ! ml_config_shell=${CONFIG_SHELL-/bin/sh} ! ml_arguments="${ac_configure_args}" ! ml_realsrcdir=${srcdir} ! else ! Makefile=${Makefile-Makefile} ! ml_config_shell=${config_shell-/bin/sh} ! ml_arguments="${arguments}" ! if [ -n "${subdir}" -a "${subdir}" != "." ] ; then ! ml_realsrcdir=${srcdir}/${subdir} ! else ! ml_realsrcdir=${srcdir} ! fi ! fi # Scan all the arguments and set all the ones we need. --- 73,82 ---- # Note that `host' in this case is GCC's `target'. Target libraries are # configured for a particular host. ! Makefile=${ac_file-Makefile} ! ml_config_shell=${CONFIG_SHELL-/bin/sh} ! ml_arguments="${ac_configure_args}" ! ml_realsrcdir=${srcdir} # Scan all the arguments and set all the ones we need. *************** multidirs=`echo "$multidirs" | sed -e 's *** 527,540 **** cat > Multi.tem <<\EOF # FIXME: There should be an @-sign in front of the `if'. # Leave out until this is tested a bit more. multi-do: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ ! rootpre=`pwd`/; export rootpre; \ ! srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ compiler="$(CC)"; \ for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \ --- 511,526 ---- cat > Multi.tem <<\EOF + PWD=$${PWDCMD-pwd} + # FIXME: There should be an @-sign in front of the `if'. # Leave out until this is tested a bit more. multi-do: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ ! rootpre=`${PWD}`/; export rootpre; \ ! srcrootpre=`cd $(srcdir); ${PWD}`/; export srcrootpre; \ lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ compiler="$(CC)"; \ for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \ *************** multi-clean: *** 571,577 **** if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ ! lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ for dir in Makefile $(MULTIDIRS); do \ if [ -f ../$${dir}/$${lib}/Makefile ]; then \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \ --- 557,563 ---- if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ ! lib=`${PWD} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ for dir in Makefile $(MULTIDIRS); do \ if [ -f ../$${dir}/$${lib}/Makefile ]; then \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \ *************** if [ -n "${multidirs}" ] && [ -z "${ml_n *** 678,687 **** if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdirs ${multidirs}" ! echo "pwd: `pwd`" fi ! ml_origdir=`pwd` ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'` # cd to top-level-build-dir/${with_target_subdir} cd .. --- 664,673 ---- if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdirs ${multidirs}" ! echo "pwd: `${PWDCMD-pwd}`" fi ! ml_origdir=`${PWDCMD-pwd}` ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'` # cd to top-level-build-dir/${with_target_subdir} cd .. *************** if [ -n "${multidirs}" ] && [ -z "${ml_n *** 690,696 **** if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdir ${ml_dir}" ! echo "pwd: `pwd`" fi if [ -d ${ml_dir} ]; then true; else --- 676,682 ---- if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdir ${ml_dir}" ! echo "pwd: `${PWDCMD-pwd}`" fi if [ -d ${ml_dir} ]; then true; else *************** if [ -n "${multidirs}" ] && [ -z "${ml_n *** 718,724 **** case ${srcdir} in ".") ! echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir} if [ "${with_target_subdir}" != "." ]; then ml_unsubdir="../" else --- 704,710 ---- case ${srcdir} in ".") ! echo Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir} if [ "${with_target_subdir}" != "." ]; then ml_unsubdir="../" else *************** if [ -n "${multidirs}" ] && [ -z "${ml_n *** 757,763 **** esac # FIXME: POPDIR=${PWD=`pwd`} doesn't work here. ! ML_POPDIR=`pwd` cd ${ml_dir}/${ml_libdir} if [ -f ${ml_newsrcdir}/configure ]; then --- 743,749 ---- esac # FIXME: POPDIR=${PWD=`pwd`} doesn't work here. ! ML_POPDIR=`${PWDCMD-pwd}` cd ${ml_dir}/${ml_libdir} if [ -f ${ml_newsrcdir}/configure ]; then diff -Nrc3pad gcc-3.2.3/configure gcc-3.3/configure *** gcc-3.2.3/configure 2002-06-24 16:14:28.000000000 +0000 --- gcc-3.3/configure 2002-09-29 16:11:24.000000000 +0000 *************** *** 3,10 **** ### WARNING: this file contains embedded tabs. Do not run untabify on this file. # Configuration script ! # Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001 ! # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by --- 3,10 ---- ### WARNING: this file contains embedded tabs. Do not run untabify on this file. # Configuration script ! # Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, ! # 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by *************** subdirs= *** 89,95 **** target_alias=NOTARGET target_makefile_frag= undefs=NOUNDEFS ! version="$Revision: 1.40.6.3 $" x11=default bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' --- 89,95 ---- target_alias=NOTARGET target_makefile_frag= undefs=NOUNDEFS ! version="$Revision: 1.49 $" x11=default bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' *************** NO_EDIT="This file was generated automat *** 152,164 **** progname=$0 # if PWD already has a value, it is probably wrong. ! if [ -n "$PWD" ]; then PWD=`pwd`; fi case "${progname}" in /* | [A-Za-z]:[\\/]* ) ;; */*) ;; *) ! PATH=$PATH:${PWD=`pwd`} ; export PATH ;; esac --- 152,164 ---- progname=$0 # if PWD already has a value, it is probably wrong. ! if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi case "${progname}" in /* | [A-Za-z]:[\\/]* ) ;; */*) ;; *) ! PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH ;; esac *************** fi *** 526,532 **** configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` ## the sed command below emulates the dirname command ! topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd` # this is a hack. sun4 must always be a valid host alias or this will fail. --- 526,532 ---- configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` ## the sed command below emulates the dirname command ! topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}` # this is a hack. sun4 must always be a valid host alias or this will fail. *************** case "${srcdir}" in *** 566,573 **** echo "Invalid source directory ${srcdir}" >&2 exit 1 fi ! pwd=`pwd` ! srcpwd=`cd ${srcdir} ; pwd` if [ "${pwd}" = "${srcpwd}" ] ; then srcdir=. fi --- 566,573 ---- echo "Invalid source directory ${srcdir}" >&2 exit 1 fi ! pwd=`${PWDCMD-pwd}` ! srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` if [ "${pwd}" = "${srcpwd}" ] ; then srcdir=. fi *************** case "${srcdir}" in *** 579,585 **** ".") ;; *) if [ -f ${srcdir}/config.status ] ; then ! echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2 exit 1 fi esac --- 579,585 ---- ".") ;; *) if [ -f ${srcdir}/config.status ] ; then ! echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2 exit 1 fi esac *************** fi *** 708,714 **** # some sanity checks on configure.in case "${srctrigger}" in "") ! echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2 exit 1 ;; *) ;; --- 708,714 ---- # some sanity checks on configure.in case "${srctrigger}" in "") ! echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in. 1>&2 exit 1 ;; *) ;; *************** esac *** 778,785 **** if [ ! -r ${srcdir}/${srctrigger} ] ; then case "${srcdirdefaulted}" in ! "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;; ! *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;; esac echo '***' \(At least ${srctrigger} is missing.\) 1>&2 --- 778,785 ---- if [ ! -r ${srcdir}/${srctrigger} ] ; then case "${srcdirdefaulted}" in ! "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/${srcdir}" 1>&2 ;; ! *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;; esac echo '***' \(At least ${srctrigger} is missing.\) 1>&2 *************** if [ "${build}" != "${host}" ]; then *** 917,924 **** tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD" tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET" ! tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX" ! tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM" tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET" tools="${tools} WINDRES WINDRES_FOR_TARGET YACC" tools="${tools} OBJCOPY OBJDUMP" --- 917,924 ---- tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD" tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET" ! tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX" ! tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM" tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET" tools="${tools} WINDRES WINDRES_FOR_TARGET YACC" tools="${tools} OBJCOPY OBJDUMP" *************** t loop *** 955,962 **** DLLTOOL=${DLLTOOL-${host_alias}-dlltool} DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool} GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} ! HOST_PREFIX=${build_alias}- ! HOST_PREFIX_1=${build_alias}- LD=${LD-${host_alias}-ld} LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld} MAKEINFO=${MAKEINFO-makeinfo} --- 955,962 ---- DLLTOOL=${DLLTOOL-${host_alias}-dlltool} DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool} GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} ! BUILD_PREFIX=${build_alias}- ! BUILD_PREFIX_1=${build_alias}- LD=${LD-${host_alias}-ld} LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld} MAKEINFO=${MAKEINFO-makeinfo} *************** export CXX *** 1072,1093 **** export CFLAGS export CXXFLAGS - # FIXME: This should be in configure.in, not configure - case "$host" in - *go32*) - enable_gdbtk=no ;; - *msdosdjgpp*) - enable_gdbtk=no ;; - esac - - # FIXME: This should be in configure.in, not configure - # Determine whether gdb needs tk/tcl or not. - if [ "$enable_gdbtk" != "no" ]; then - GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" - else - GDB_TK="" - fi - all_build_modules= if test x"${build_alias}" != x"${host_alias}" then --- 1072,1077 ---- *************** for subdir in . ${subdirs} ; do *** 1124,1130 **** if mkdir ${subdir} ; then true else ! echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2 exit 1 fi fi --- 1108,1114 ---- if mkdir ${subdir} ; then true else ! echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${subdir}" 1>&2 exit 1 fi fi *************** EOF *** 1223,1229 **** sed -e "/^####/ r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem else echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2 ! echo '***' is missing in ${PWD=`pwd`}. 1>&2 cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem fi esac --- 1207,1213 ---- sed -e "/^####/ r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem else echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2 ! echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem fi esac *************** EOF *** 1259,1265 **** sed -e "/^####/ r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2 ! echo '***' is missing in ${PWD=`pwd`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac --- 1243,1249 ---- sed -e "/^####/ r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2 ! echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac *************** EOF *** 1295,1301 **** sed -e "/^####/ r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2 ! echo '***' is missing in ${PWD=`pwd`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac --- 1279,1285 ---- sed -e "/^####/ r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2 ! echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac *************** EOF *** 1372,1379 **** rm -f ${subdir}/Makefile.tm2 sedtemp=sed.$$ cat >$sedtemp < ${subdir}/Makefile.tm2 --- 1356,1362 ---- rm -f ${subdir}/Makefile.tm2 sedtemp=sed.$$ cat >$sedtemp < ${subdir}/Makefile.tm2 *************** EOF *** 1381,1401 **** rm -f ${subdir}/Makefile.tem mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem fi ! sed -e "s|^prefix[ ]*=.*$|prefix = ${prefix}|" \ ! -e "s|^exec_prefix[ ]*=.*$|exec_prefix = ${exec_prefix}|" \ ! -e "s|^bindir[ ]*=.*$|bindir = ${bindir}|" \ ! -e "s|^sbindir[ ]*=.*$|sbindir = ${sbindir}|" \ ! -e "s|^libexecdir[ ]*=.*$|libexecdir = ${libexecdir}|" \ ! -e "s|^datadir[ ]*=.*$|datadir = ${datadir}|" \ ! -e "s|^sysconfdir[ ]*=.*$|sysconfdir = ${sysconfdir}|" \ ! -e "s|^sharedstatedir[ ]*=.*$|sharedstatedir = ${sharedstatedir}|" \ ! -e "s|^localstatedir[ ]*=.*$|localstatedir = ${localstatedir}|" \ ! -e "s|^libdir[ ]*=.*$|libdir = ${libdir}|" \ ! -e "s|^includedir[ ]*=.*$|includedir = ${includedir}|" \ ! -e "s|^oldincludedir[ ]*=.*$|oldincludedir = ${oldincludedir}|" \ ! -e "s|^infodir[ ]*=.*$|infodir = ${infodir}|" \ ! -e "s|^mandir[ ]*=.*$|mandir = ${mandir}|" \ ! -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \ -e "/^CC[ ]*=/{ :loop1 /\\\\$/ N --- 1364,1384 ---- rm -f ${subdir}/Makefile.tem mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem fi ! sed -e "s|@prefix@|${prefix}|" \ ! -e "s|@exec_prefix@|${exec_prefix}|" \ ! -e "s|@bindir@|${bindir}|" \ ! -e "s|@sbindir@|${sbindir}|" \ ! -e "s|@libexecdir@|${libexecdir}|" \ ! -e "s|@datadir@|${datadir}|" \ ! -e "s|@sysconfdir@|${sysconfdir}|" \ ! -e "s|@sharedstatedir@|${sharedstatedir}|" \ ! -e "s|@localstatedir@|${localstatedir}|" \ ! -e "s|@libdir@|${libdir}|" \ ! -e "s|@includedir@|${includedir}|" \ ! -e "s|@oldincludedir@|${oldincludedir}|" \ ! -e "s|@infodir@|${infodir}|" \ ! -e "s|@mandir@|${mandir}|" \ ! -e "s|@all_build_modules@|${all_build_modules}|" \ -e "/^CC[ ]*=/{ :loop1 /\\\\$/ N *************** EOF *** 1424,1443 **** t loop4 s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}% }" \ ! -e "s|^SHELL[ ]*=.*$|SHELL = ${config_shell}|" \ ! -e "s|^srcdir[ ]*=.*$|srcdir = ${makesrcdir}|" \ -e "s/ //" \ ! -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \ ! -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \ ! -e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \ ! -e "s|^tooldir[ ]*=.*$|tooldir = ${tooldir}|" \ ! -e "s|^build_tooldir[ ]*=.*$|build_tooldir = ${tooldir}|" \ ! -e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \ ! -e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \ ! -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \ ${subdir}/Makefile.tem >> ${Makefile} ! sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem mv -f ${Makefile}.tem ${Makefile} # If this is a Canadian Cross, preset the values of many more --- 1407,1424 ---- t loop4 s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}% }" \ ! -e "s|@config_shell@|${config_shell}|" \ ! -e "s|@srcdir@|${makesrcdir}|" \ -e "s/ //" \ ! -e "s:@program_transform_name@:${program_transform_name}:" \ ! -e "s|@tooldir@|${tooldir}|" \ ! -e "s|@build_tooldir@|${tooldir}|" \ ! -e "s:@DEFAULT_YACC@:${DEFAULT_YACC}:" \ ! -e "s:@DEFAULT_LEX@:${DEFAULT_LEX}:" \ ! -e "s:@DEFAULT_M4@:${DEFAULT_M4}:" \ ${subdir}/Makefile.tem >> ${Makefile} ! sed -e "s:@GDB_TK@:${GDB_TK}:" ${Makefile} >${Makefile}.tem mv -f ${Makefile}.tem ${Makefile} # If this is a Canadian Cross, preset the values of many more *************** EOF *** 1481,1487 **** newusing=`echo "${using}" | sed 's/and/using/'` using=${newusing} ! echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using} . ${tmpfile}.pos --- 1462,1468 ---- newusing=`echo "${using}" | sed 's/and/using/'` using=${newusing} ! echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using} . ${tmpfile}.pos *************** if [ -z "${norecursion}" ] && [ -n "${co *** 1547,1560 **** if mkdir ./${bld_dir} ; then true else ! echo '***' "${progname}: could not make ${PWD=`pwd`}/${bld_dir}" 1>&2 exit 1 fi fi ;; esac ! POPDIR=${PWD=`pwd`} cd ${bld_dir} ### figure out what to do with srcdir --- 1528,1541 ---- if mkdir ./${bld_dir} ; then true else ! echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${bld_dir}" 1>&2 exit 1 fi fi ;; esac ! POPDIR=${PWD=`${PWDCMD-pwd}`} cd ${bld_dir} ### figure out what to do with srcdir *************** if [ -z "${norecursion}" ] && [ -n "${co *** 1602,1608 **** ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then true else ! echo Configure in `pwd` failed, exiting. 1>&2 exit 1 fi fi --- 1583,1589 ---- ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then true else ! echo Configure in `${PWDCMD-pwd}` failed, exiting. 1>&2 exit 1 fi fi diff -Nrc3pad gcc-3.2.3/configure.in gcc-3.3/configure.in *** gcc-3.2.3/configure.in 2002-07-08 10:00:57.000000000 +0000 --- gcc-3.3/configure.in 2003-03-09 17:05:46.000000000 +0000 *************** *** 42,61 **** # these libraries are used by various programs built for the host environment # ! host_libs="intl mmalloc libiberty opcodes bfd readline gash db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui zlib" ! ! if [ "${enable_gdbgui}" = "yes" ] ; then ! host_libs="${host_libs} libgui" ! fi libstdcxx_version="target-libstdc++-v3" - # Don't use libstdc++-v3's flags to configure/build itself. - libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to # know that we are building the simulator. ! host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip fastjar" # libgcj represents the runtime libraries only used by gcj. libgcj="target-libffi \ --- 42,55 ---- # these libraries are used by various programs built for the host environment # ! host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tclX itcl tix libgui zlib" libstdcxx_version="target-libstdc++-v3" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to # know that we are building the simulator. ! host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator libtool gettext zip fastjar" # libgcj represents the runtime libraries only used by gcj. libgcj="target-libffi \ *************** libgcj="target-libffi \ *** 70,76 **** target_libs="target-libiberty \ target-libgloss \ target-newlib \ - target-librx \ ${libstdcxx_version} \ target-libf2c \ ${libgcj} --- 64,69 ---- *************** target_libs="target-libiberty \ *** 83,108 **** # list belongs in this list. those programs are also very likely # candidates for the "native_only" list which follows # ! target_tools="target-examples target-groff target-gperf" ################################################################################ - ## These two lists are of directories that are to be removed from the - ## ${configdirs} list for either cross-compilations or for native- - ## compilations. For example, it doesn't make that much sense to - ## cross-compile Emacs, nor is it terribly useful to compile target-libiberty in - ## a native environment. - - # directories to be built in the native environment only - # - # This must be a single line because of the way it is searched by grep in - # the code below. - native_only="autoconf automake libtool cvssrc emacs emacs19 fileutils find gawk gettext grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils gash uudecode wdiff gprof target-groff guile perl apache inet time ash bash bzip2 prms snavigator gnuserv target-gperf" - - # directories to be built in a cross environment only - # - cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub" - ## All tools belong in one of the four categories, and are assigned above ## We assign ${configdirs} this way to remove all embedded newlines. This ## is important because configure will choke if they ever get through. --- 76,85 ---- # list belongs in this list. those programs are also very likely # candidates for the "native_only" list which follows # ! target_tools="target-examples target-groff target-gperf target-rda" ################################################################################ ## All tools belong in one of the four categories, and are assigned above ## We assign ${configdirs} this way to remove all embedded newlines. This ## is important because configure will choke if they ever get through. *************** appdirs="" *** 122,599 **** # per-host: ! # Work in distributions that contain no compiler tools, like Autoconf. ! if [ -d ${srcdir}/config ]; then ! case "${host}" in ! m68k-hp-hpux*) ! host_makefile_frag="${host_makefile_frag} config/mh-hp300" ! ;; ! m68k-apollo-sysv*) ! host_makefile_frag="${host_makefile_frag} config/mh-apollo68" ! ;; ! m68k-apollo-bsd*) ! host_makefile_frag="${host_makefile_frag} config/mh-a68bsd" ! ;; ! m88k-dg-dgux*) ! host_makefile_frag="${host_makefile_frag} config/mh-dgux" ! ;; ! m88k-harris-cxux*) ! host_makefile_frag="${host_makefile_frag} config/mh-cxux" ! ;; ! m88k-motorola-sysv*) ! host_makefile_frag="${host_makefile_frag} config/mh-delta88" ! ;; ! mips*-dec-ultrix*) ! host_makefile_frag="${host_makefile_frag} config/mh-decstation" ! ;; ! mips*-nec-sysv4*) ! host_makefile_frag="${host_makefile_frag} config/mh-necv4" ! ;; ! mips*-sgi-irix6*) ! host_makefile_frag="${host_makefile_frag} config/mh-irix6" ! ;; ! mips*-sgi-irix5*) ! host_makefile_frag="${host_makefile_frag} config/mh-irix5" ! ;; ! mips*-sgi-irix4*) ! host_makefile_frag="${host_makefile_frag} config/mh-irix4" ! ;; ! mips*-sgi-irix3*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv" ! ;; ! mips*-*-sysv4*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv4" ! ;; ! mips*-*-sysv*) ! host_makefile_frag="${host_makefile_frag} config/mh-riscos" ! ;; ! i370-ibm-opened*) ! host_makefile_frag="${host_makefile_frag} config/mh-openedition" ! ;; ! i[3456]86-*-sysv5*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv5" ! ;; ! i[3456]86-*-dgux*) ! host_makefile_frag="${host_makefile_frag} config/mh-dgux386" ! ;; ! i[3456]86-ncr-sysv4.3*) ! host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43" ! ;; ! i[3456]86-ncr-sysv4*) ! host_makefile_frag="${host_makefile_frag} config/mh-ncr3000" ! ;; ! i[3456]86-*-sco3.2v5*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv" ! ;; ! i[3456]86-*-sco*) ! host_makefile_frag="${host_makefile_frag} config/mh-sco" ! ;; ! i[3456]86-*-udk*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv5" ! ;; ! i[3456]86-*-isc*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv" ! ;; ! i[3456]86-*-solaris2*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv4" ! ;; ! i[3456]86-*-aix*) ! host_makefile_frag="${host_makefile_frag} config/mh-aix386" ! ;; ! i[3456]86-*-msdosdjgpp*) ! host_makefile_frag="${host_makefile_frag} config/mh-djgpp" ! ;; ! *-cygwin*) ! host_makefile_frag="${host_makefile_frag} config/mh-cygwin" ! ;; ! *-mingw32*) ! host_makefile_frag="${host_makefile_frag} config/mh-mingw32" ! ;; ! *-interix*) ! host_makefile_frag="${host_makefile_frag} config/mh-interix" ! ;; ! *-windows*) ! host_makefile_frag="${host_makefile_frag} config/mh-windows" ! ;; ! vax-*-ultrix2*) ! host_makefile_frag="${host_makefile_frag} config/mh-vaxult2" ! ;; ! *-*-solaris2*) ! host_makefile_frag="${host_makefile_frag} config/mh-solaris" ! ;; ! m68k-sun-sunos*) ! host_makefile_frag="${host_makefile_frag} config/mh-sun3" ! ;; ! *-hp-hpux[78]*) ! host_makefile_frag="${host_makefile_frag} config/mh-hpux8" ! ;; ! *-hp-hpux*) ! host_makefile_frag="${host_makefile_frag} config/mh-hpux" ! ;; ! *-*-hiux*) ! host_makefile_frag="${host_makefile_frag} config/mh-hpux" ! ;; ! rs6000-*-lynxos*) ! host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k" ! ;; ! *-*-lynxos*) ! host_makefile_frag="${host_makefile_frag} config/mh-lynxos" ! ;; ! *-*-sysv4*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv4" ! ;; ! *-*-sysv*) ! host_makefile_frag="${host_makefile_frag} config/mh-sysv" ! ;; ! esac ! fi ! ! # If we aren't going to be using gcc, see if we can extract a definition ! # of CC from the fragment. ! if [ -z "${CC}" ] && [ "${build}" = "${host}" ]; then ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ! found= ! for dir in $PATH; do ! test -z "$dir" && dir=. ! if test -f $dir/gcc; then ! found=yes ! break ! fi ! done ! IFS="$save_ifs" ! if [ -z "${found}" ] && [ -n "${host_makefile_frag}" ] && [ -f "${srcdir}/${host_makefile_frag}" ]; then ! xx=`sed -n -e 's/^[ ]*CC[ ]*=[ ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}` ! if [ -n "${xx}" ] ; then ! CC=$xx ! fi ! fi ! fi ! ! # We default to --with-shared on platforms where -fpic is meaningless. ! # Well, we don't yet, but we will. ! if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then ! case "${target}" in ! alpha*-dec-osf*) enable_shared=yes ;; ! alpha*-*-linux*) enable_shared=yes ;; ! mips-sgi-irix5*) enable_shared=yes ;; ! *) enable_shared=no ;; ! esac ! fi ! ! # hpux11 in 64bit mode has libraries in a weird place. Arrange to find ! # them automatically. ! case "${host}" in ! hppa*64*-*-hpux11*) ! withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" ! ;; ! esac ! ! case "${enable_shared}" in ! yes) shared=yes ;; ! no) shared=no ;; ! "") shared=no ;; ! *) shared=yes ;; ! esac ! ! if [ x${shared} = xyes ]; then ! case "${host}" in ! alpha*-*-linux*) ! host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic" ! ;; ! arm*-*-*) ! host_makefile_frag="${host_makefile_frag} config/mh-armpic" ! ;; ! parisc*-*-* | hppa*-*-*) ! host_makefile_frag="${host_makefile_frag} config/mh-papic" ! ;; ! i[3456]86-*-cygwin*) ! # We don't want -fPIC on Cygwin. ! ;; ! i[3456]86-*-*) ! host_makefile_frag="${host_makefile_frag} config/mh-x86pic" ! ;; ! i370-*-*) ! host_makefile_frag="${host_makefile_frag} config/mh-i370pic" ! ;; ! ia64-*-*) ! host_makefile_frag="${host_makefile_frag} config/mh-ia64pic" ! ;; ! sparc64-*-*) ! host_makefile_frag="${host_makefile_frag} config/mh-sparcpic" ! ;; ! powerpc*-*-aix*) ! # We don't want -fPIC on AIX. ! ;; ! powerpc*-*-*) ! host_makefile_frag="${host_makefile_frag} config/mh-ppcpic" ! ;; ! *-*-*) ! if test -f ${srcdir}/config/mh-${host_cpu}pic; then ! host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic" ! fi ! ;; ! esac ! fi ! ! rm -f mh-frag ! if [ -n "${host_makefile_frag}" ] ; then ! for f in ${host_makefile_frag} ! do ! cat ${srcdir}/$f >> mh-frag ! done ! host_makefile_frag=mh-frag ! fi # per-target: ! case "${target}" in ! v810*) ! target_makefile_frag="${target_makefile_frag} config/mt-v810" ! ;; ! i[3456]86-*-netware*) ! target_makefile_frag="${target_makefile_frag} config/mt-netware" ! ;; ! powerpc-*-netware*) ! target_makefile_frag="${target_makefile_frag} config/mt-netware" ! ;; ! alpha*-*-linux*) ! target_makefile_frag="${target_makefile_frag} config/mt-linux" ! target_makefile_frag="${target_makefile_frag} config/mt-alphaieee" ! ;; ! alpha*-*-*) ! target_makefile_frag="${target_makefile_frag} config/mt-alphaieee" ! ;; ! *-*-linux*) ! target_makefile_frag="${target_makefile_frag} config/mt-linux" ! ;; ! *-*-aix4.[3456789]* | *-*-aix[56789].*) ! target_makefile_frag="${target_makefile_frag} config/mt-aix43" ! ;; ! mips*-*-pe | sh*-*-pe | *arm-wince-pe) ! target_makefile_frag="${target_makefile_frag} config/mt-wince" ! ;; ! esac ! ! # If --enable-target-optspace always use -Os instead of -O2 to build ! # the target libraries, similarly if it is not specified, use -Os ! # on selected platforms. ! case "${enable_target_optspace}:${target}" in ! yes:*) ! target_makefile_frag="${target_makefile_frag} config/mt-ospace" ! ;; ! :d30v-*) ! target_makefile_frag="${target_makefile_frag} config/mt-d30v" ! ;; ! :m32r-* | :d10v-* | :fr30-*) ! target_makefile_frag="${target_makefile_frag} config/mt-ospace" ! ;; ! no:* | :*) ! ;; ! *) ! echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 ! ;; ! esac ! ! skipdirs= ! gasdir=gas ! use_gnu_ld= ! use_gnu_as= ! ! # some tools are so dependent upon X11 that if we're not building with X, ! # it's not even worth trying to configure, much less build, that tool. ! ! case ${with_x} in ! yes | "") # the default value for this tree is that X11 is available ! ;; ! no) ! skipdirs="${skipdirs} tk libgui gash" ! ;; ! *) ! echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ! ;; ! esac ! ! # Some tools are only suitable for building in a "native" situation. ! # Those are added when we have a host==target configuration. For cross ! # toolchains, we add some directories that should only be useful in a ! # cross-compiler. ! is_cross_compiler= ! ! if [ x"${host}" = x"${target}" ] ; then ! # when doing a native toolchain, don't build the targets ! # that are in the 'cross only' list ! skipdirs="${skipdirs} ${cross_only}" ! is_cross_compiler=no else ! # similarly, don't build the targets in the 'native only' ! # list when building a cross compiler ! skipdirs="${skipdirs} ${native_only}" ! is_cross_compiler=yes fi # We always want to use the same name for this directory, so that dejagnu # can reliably find it. target_subdir=${target_alias} ! if [ ! -d ${target_subdir} ] ; then if mkdir ${target_subdir} ; then true else ! echo "'*** could not make ${PWD=`pwd`}/${target_subdir}" 1>&2 exit 1 fi fi build_subdir=${build_alias} ! if [ x"${build_alias}" != x"${host}" ] ; then ! if [ ! -d ${build_subdir} ] ; then if mkdir ${build_subdir} ; then true else ! echo "'*** could not make ${PWD=`pwd`}/${build_subdir}" 1>&2 exit 1 fi fi fi ! copy_dirs= ! ! # Handle --with-headers=XXX. The contents of the named directory are ! # copied to $(tooldir)/sys-include. ! if [ x"${with_headers}" != x ]; then ! if [ x${is_cross_compiler} = xno ]; then ! echo 1>&2 '***' --with-headers is only supported when cross compiling ! exit 1 ! fi ! case "${exec_prefixoption}" in ! "") x=${prefix} ;; ! *) x=${exec_prefix} ;; ! esac ! copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" ! fi ! # Handle --with-libs=XXX. Multiple directories are permitted. The ! # contents are copied to $(tooldir)/lib. ! if [ x"${with_libs}" != x ]; then ! if [ x${is_cross_compiler} = xno ]; then ! echo 1>&2 '***' --with-libs is only supported when cross compiling ! exit 1 ! fi ! # Copy the libraries in reverse order, so that files in the first named ! # library override files in subsequent libraries. ! case "${exec_prefixoption}" in ! "") x=${prefix} ;; ! *) x=${exec_prefix} ;; ! esac ! for l in ${with_libs}; do ! copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" ! done fi ! # If both --with-headers and --with-libs are specified, default to ! # --without-newlib. ! if [ x"${with_headers}" != x ] && [ x"${with_libs}" != x ]; then ! if [ x"${with_newlib}" = x ]; then ! with_newlib=no ! fi fi ! # Recognize --with-newlib/--without-newlib. ! if [ x${with_newlib} = xno ]; then ! skipdirs="${skipdirs} target-newlib" ! elif [ x${with_newlib} = xyes ]; then ! skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ! fi ! # Default to using --with-stabs for certain targets. ! if [ x${with_stabs} = x ]; then ! case "${target}" in ! mips*-*-irix6*) ! ;; ! mips*-*-* | alpha*-*-osf*) ! with_stabs=yes; ! withoptions="${withoptions} --with-stabs" ;; ! esac ! fi ! ! # Handle ${copy_dirs} ! set fnord ${copy_dirs} ! shift ! while [ $# != 0 ]; do ! if [ -f $2/COPIED ] && [ x"`cat $2/COPIED`" = x"$1" ]; then ! : ! else ! echo Copying $1 to $2 ! # Use the install script to create the directory and all required ! # parent directories. ! if [ -d $2 ]; then ! : ! else ! echo >config.temp ! ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED ! fi ! # Copy the directory, assuming we have tar. ! # FIXME: Should we use B in the second tar? Not all systems support it. ! (cd $1; tar -cf - .) | (cd $2; tar -xpf -) ! # It is the responsibility of the user to correctly adjust all ! # symlinks. If somebody can figure out how to handle them correctly ! # here, feel free to add the code. ! echo $1 > $2/COPIED fi ! shift; shift ! done # Configure extra directories which are host specific case "${host}" in ! i[3456]86-*-go32*) ! configdirs="$configdirs dosrel" ;; ! i[3456]86-*-mingw32*) ! configdirs="$configdirs dosrel" ;; ! *-cygwin*) ! configdirs="$configdirs libtermcap dosrel" ;; esac # Remove more programs from consideration, based on the host or # target this usually means that a port of the program doesn't # exist yet. - noconfigdirs="" - case "${host}" in hppa*64*-*-*) noconfigdirs="$noconfigdirs byacc" ;; i[3456]86-*-vsta) ! noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext" ;; i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*) ! noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile apache inet itcl tix db snavigator gnuserv libffi" ;; i[3456]86-*-mingw32*) ! # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv" ! noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool" ;; i[3456]86-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb" ;; *-*-cygwin*) ! noconfigdirs="autoconf automake send-pr rcs guile perl apache inet" ;; *-*-netbsd*) noconfigdirs="rcs" ;; ppc*-*-pe) ! noconfigdirs="patch diff make tk tcl expect dejagnu cvssrc autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db snavigator gnuserv" ;; powerpc-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline" ;; esac # Save it here so that, even in case of --enable-libgcj, if the Java --- 99,246 ---- # per-host: ! # There is no longer anything interesting in the per-host section. # per-target: ! # Define is_cross_compiler to save on calls to 'test'. is_cross_compiler= ! if test x"${host}" = x"${target}" ; then ! is_cross_compiler=no else ! is_cross_compiler=yes fi # We always want to use the same name for this directory, so that dejagnu # can reliably find it. target_subdir=${target_alias} ! if test ! -d ${target_subdir} ; then if mkdir ${target_subdir} ; then true else ! echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2 exit 1 fi fi build_subdir=${build_alias} ! if test x"${build_alias}" != x"${host}" ; then ! if test ! -d ${build_subdir} ; then if mkdir ${build_subdir} ; then true else ! echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2 exit 1 fi fi fi ! # Skipdirs are removed silently. ! skipdirs= ! # Noconfigdirs are removed loudly. ! noconfigdirs="" ! use_gnu_ld= ! # Make sure we don't let GNU ld be added if we didn't want it. ! if test x$with_gnu_ld = xno ; then ! use_gnu_ld=no ! noconfigdirs="$noconfigdirs ld" fi ! use_gnu_as= ! # Make sure we don't let GNU as be added if we didn't want it. ! if test x$with_gnu_as = xno ; then ! use_gnu_as=no ! noconfigdirs="$noconfigdirs gas" fi ! # some tools are so dependent upon X11 that if we're not building with X, ! # it's not even worth trying to configure, much less build, that tool. ! case ${with_x} in ! yes | "") ;; # the default value for this tree is that X11 is available ! no) ! skipdirs="${skipdirs} tk tix itcl libgui" ! # We won't be able to build gdbtk without X. ! enable_gdbtk=no ;; ! *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;; ! esac ! # Some tools are only suitable for building in a "native" situation. ! # Remove these if host!=target. ! native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf" ! # Similarly, some are only suitable for cross toolchains. ! # Remove these if host=target. ! cross_only="target-libgloss target-newlib target-opcodes" ! case $is_cross_compiler in ! no) skipdirs="${skipdirs} ${cross_only}" ;; ! yes) skipdirs="${skipdirs} ${native_only}" ;; ! esac ! # If both --with-headers and --with-libs are specified, default to ! # --without-newlib. ! if test x"${with_headers}" != x && test x"${with_libs}" != x ; then ! if test x"${with_newlib}" = x ; then ! with_newlib=no fi ! fi ! ! # Recognize --with-newlib/--without-newlib. ! case ${with_newlib} in ! no) skipdirs="${skipdirs} target-newlib" ;; ! yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; ! esac # Configure extra directories which are host specific case "${host}" in ! i[3456]86-*-go32*) ! configdirs="$configdirs dosrel" ;; ! i[3456]86-*-mingw32*) ! configdirs="$configdirs dosrel" ;; ! *-cygwin*) ! configdirs="$configdirs libtermcap dosrel" ;; esac # Remove more programs from consideration, based on the host or # target this usually means that a port of the program doesn't # exist yet. case "${host}" in hppa*64*-*-*) noconfigdirs="$noconfigdirs byacc" ;; i[3456]86-*-vsta) ! noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext" ;; i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*) ! noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi" ;; i[3456]86-*-mingw32*) ! # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv" ! noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool" ;; i[3456]86-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb" ;; *-*-cygwin*) ! noconfigdirs="autoconf automake send-pr rcs guile perl" ;; *-*-netbsd*) noconfigdirs="rcs" ;; ppc*-*-pe) ! noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv" ;; powerpc-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline" ;; + *-*-darwin*) + noconfigdirs="$noconfigdirs tk itcl tix libgui" + ;; esac # Save it here so that, even in case of --enable-libgcj, if the Java *************** case "${target}" in *** 621,627 **** ;; *-*-netbsd*) # Skip some stuff on all NetBSD configurations. ! skipdirs="$skipdirs target-newlib target-libiberty target-libgloss" # Skip some stuff that's unsupported on some NetBSD configurations. case "${target}" in --- 268,274 ---- ;; *-*-netbsd*) # Skip some stuff on all NetBSD configurations. ! noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss" # Skip some stuff that's unsupported on some NetBSD configurations. case "${target}" in *************** case "${target}" in *** 632,638 **** esac ;; *-*-netware) ! noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-newlib target-libiberty target-libgloss ${libgcj}" ;; *-*-rtems*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" --- 279,285 ---- esac ;; *-*-netware) ! noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}" ;; *-*-rtems*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" *************** case "${target}" in *** 647,656 **** noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; alpha*-dec-osf*) ! # ld works, but does not support shared libraries. emacs doesn't ! # work. newlib is not 64 bit ready. I'm not sure about fileutils. # gas doesn't generate exception information. ! noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss" ;; alpha*-*-*vms*) noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}" --- 294,303 ---- noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; alpha*-dec-osf*) ! # ld works, but does not support shared libraries. ! # newlib is not 64 bit ready. I'm not sure about fileutils. # gas doesn't generate exception information. ! noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss" ;; alpha*-*-*vms*) noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}" *************** case "${target}" in *** 658,665 **** alpha*-*-linux*) # newlib is not 64 bit ready noconfigdirs="$noconfigdirs target-newlib target-libgloss" - # linux has rx in libc - skipdirs="$skipdirs target-librx" ;; alpha*-*-freebsd*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" --- 305,310 ---- *************** case "${target}" in *** 670,677 **** ;; sh-*-linux*) noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - # linux has rx in libc - skipdirs="$skipdirs target-librx" ;; sh*-*-pe|mips*-*-pe|*arm-wince-pe) noconfigdirs="$noconfigdirs ${libgcj}" --- 315,320 ---- *************** case "${target}" in *** 681,687 **** noconfigdirs="$noconfigdirs expect dejagnu" # the C++ libraries don't build on top of CE's C libraries noconfigdirs="$noconfigdirs ${libstdcxx_version}" ! skipdirs="$skipdirs target-newlib" case "${host}" in *-*-cygwin*) ;; # keep gdb and readline *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}" --- 324,330 ---- noconfigdirs="$noconfigdirs expect dejagnu" # the C++ libraries don't build on top of CE's C libraries noconfigdirs="$noconfigdirs ${libstdcxx_version}" ! noconfigdirs="$noconfigdirs target-newlib" case "${host}" in *-*-cygwin*) ;; # keep gdb and readline *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}" *************** case "${target}" in *** 691,720 **** arc-*-*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; ! arm-*-pe*) ! noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; ! arm-*-coff*) ! noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ! if [ x${is_cross_compiler} != xno ] ; then ! target_configdirs="${target_configdirs} target-bsp target-cygmon" ! fi ;; ! arm-*-elf*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi ;; arm-*-oabi*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; - c4x-*-*) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}" - ;; - c54x*-*-* | tic54x-*-*) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib" - ;; thumb-*-coff) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; --- 334,351 ---- arc-*-*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; ! arm-*-coff | strongarm-*-coff | xscale-*-coff) ! noconfigdirs="$noconfigdirs ${libgcj}" ;; ! arm-*-elf* | strongarm-*-elf* | xscale-*-elf*) ! noconfigdirs="$noconfigdirs target-libffi target-qthreads" ;; ! arm-*-pe*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; arm-*-oabi*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; thumb-*-coff) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; *************** case "${target}" in *** 724,777 **** thumb-*-oabi) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; - strongarm-*-elf) - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi - ;; - strongarm-*-coff) - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi - ;; - xscale-*-elf) - noconfigdirs="$noconfigdirs target-libgloss target-libffi target-qthreads" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi - ;; - xscale-*-coff) - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi - ;; thumb-*-pe) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; arm-*-riscix*) noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" ;; cris-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; d10v-*-*) ! noconfigdirs="$noconfigdirs target-librx ${libstdcxx_version} target-libgloss ${libgcj}" ;; d30v-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; fr30-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" - fi ;; ! h8300*-*-* | \ h8500-*-*) ! noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj} target-libf2c" ;; hppa*64*-*-linux* | parisc*64*-*-linux*) # In this case, it's because the hppa64-linux target is for --- 355,395 ---- thumb-*-oabi) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; thumb-*-pe) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; arm-*-riscix*) noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" ;; + avr-*-*) + noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}" + ;; + c4x-*-* | tic4x-*-*) + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}" + ;; + c54x*-*-* | tic54x-*-*) + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib" + ;; cris-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; d10v-*-*) ! noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}" ;; d30v-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; fr30-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" ;; ! frv-*-*) ! noconfigdirs="$noconfigdirs ${libgcj}" ! ;; ! h8300*-*-*) ! noconfigdirs="$noconfigdirs target-libgloss" ! ;; h8500-*-*) ! noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c" ;; hppa*64*-*-linux* | parisc*64*-*-linux*) # In this case, it's because the hppa64-linux target is for *************** case "${target}" in *** 782,799 **** hppa*-*-*elf* | \ parisc*-*-linux* | hppa*-*-linux* | \ hppa*-*-lites* | \ hppa*64*-*-*) noconfigdirs="$noconfigdirs ${libgcj}" # Do configure ld/binutils/gas for this case. ;; hppa*-*-*) - # HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach - # cc is gcc, and on any system a user should be able to link cc to - # whatever they want. FIXME, emacs emacs19). - case "${CC}" in - "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;; - *) ;; - esac # According to Alexandre Oliva , libjava won't # build on HP-UX 10.20. noconfigdirs="$noconfigdirs ld shellutils ${libgcj}" --- 400,411 ---- hppa*-*-*elf* | \ parisc*-*-linux* | hppa*-*-linux* | \ hppa*-*-lites* | \ + hppa*-*-openbsd* | \ hppa*64*-*-*) noconfigdirs="$noconfigdirs ${libgcj}" # Do configure ld/binutils/gas for this case. ;; hppa*-*-*) # According to Alexandre Oliva , libjava won't # build on HP-UX 10.20. noconfigdirs="$noconfigdirs ld shellutils ${libgcj}" *************** case "${target}" in *** 802,826 **** # No gdb support yet. noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb" ;; i[3456]86-*-coff | i[3456]86-*-elf) noconfigdirs="$noconfigdirs ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" - fi ;; i[34567]86-*-freebsd*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; ! s390*-*-linux*) ! # The libffi port is not yet in the GCC tree ! noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ! # linux has rx in libc ! skipdirs="$skipdirs target-librx" ! ;; ! *-*-linux*) ! noconfigdirs="$noconfigdirs target-newlib target-libgloss" ! # linux has rx in libc ! skipdirs="$skipdirs target-librx" ;; i[3456]86-*-mingw32*) target_configdirs="$target_configdirs target-mingw" --- 414,447 ---- # No gdb support yet. noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb" ;; + ia64*-**-hpux*) + # No gdb or ld support yet. + noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld" + ;; i[3456]86-*-coff | i[3456]86-*-elf) noconfigdirs="$noconfigdirs ${libgcj}" ;; i[34567]86-*-freebsd*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; ! i[3456]86-*-linux*) ! # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's ! # not build java stuff by default. ! case "${target}" in ! *-*-*libc1*) ! noconfigdirs="$noconfigdirs ${libgcj}";; ! esac ! ! # This section makes it possible to build newlib natively on linux. ! # If we are using a cross compiler then don't configure newlib. ! if test x${is_cross_compiler} != xno ; then ! noconfigdirs="$noconfigdirs target-newlib" ! fi ! noconfigdirs="$noconfigdirs target-libgloss" ! # If we are not using a cross compiler, do configure newlib. ! # Note however, that newlib will only be configured in this situation ! # if the --with-newlib option has been given, because otherwise ! # 'target-newlib' will appear in skipdirs. ;; i[3456]86-*-mingw32*) target_configdirs="$target_configdirs target-mingw" *************** case "${target}" in *** 847,853 **** esac ;; i[3456]86-*-pe) ! noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}" ;; i[3456]86-*-sco3.2v5*) # The linker does not yet know about weak symbols in COFF, --- 468,474 ---- esac ;; i[3456]86-*-pe) ! noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}" ;; i[3456]86-*-sco3.2v5*) # The linker does not yet know about weak symbols in COFF, *************** case "${target}" in *** 861,873 **** noconfigdirs="$noconfigdirs target-libgloss" ;; i[3456]86-*-sysv4*) ! # The SYSV4 C compiler doesn't handle Emacs correctly ! case "${CC}" in ! "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;; ! *) ;; ! esac ! # but that's okay since emacs doesn't work anyway ! noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss ${libgcj}" ;; i[3456]86-*-beos*) noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" --- 482,488 ---- noconfigdirs="$noconfigdirs target-libgloss" ;; i[3456]86-*-sysv4*) ! noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; i[3456]86-*-beos*) noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" *************** case "${target}" in *** 877,891 **** ;; m68k-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi ;; m68k-*-coff*) noconfigdirs="$noconfigdirs ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi ;; mcore-*-pe*) # The EPOC C++ environment does not support exceptions or rtti, --- 492,500 ---- *************** case "${target}" in *** 897,920 **** ;; mn10200-*-*) noconfigdirs="$noconfigdirs ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" - fi ;; mn10300-*-*) noconfigdirs="$noconfigdirs ${libgcj}" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" - fi ;; powerpc-*-aix*) # copied from rs6000-*-* entry ! # The configure and build of ld are currently disabled because ! # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least) ! # The symptom is that GDBtk 4.18 fails at startup with a segfault ! # if linked by GNU ld, but not if linked by the native ld. ! noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss ${libgcj} ld" ! use_gnu_ld=no ;; powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe) target_configdirs="$target_configdirs target-winsup" --- 506,518 ---- ;; mn10200-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; mn10300-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; powerpc-*-aix*) # copied from rs6000-*-* entry ! noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" ;; powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe) target_configdirs="$target_configdirs target-winsup" *************** case "${target}" in *** 929,951 **** powerpc-*-beos*) noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; powerpc-*-eabi) noconfigdirs="$noconfigdirs ${libgcj}" ! if [ x${is_cross_compiler} != xno ] ; then ! target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" ! fi ;; rs6000-*-lynxos*) ! # The CVS server code doesn't work on the RS/6000 ! noconfigdirs="$noconfigdirs target-newlib gprof cvssrc ${libgcj}" ;; rs6000-*-aix*) ! # The configure and build of ld are currently disabled because ! # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least) ! # The symptom is that GDBtk 4.18 fails at startup with a segfault ! # if linked by GNU ld, but not if linked by the native ld. ! noconfigdirs="$noconfigdirs gprof ld ${libgcj}" ! use_gnu_ld=no ;; rs6000-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" --- 527,548 ---- powerpc-*-beos*) noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; + powerpc-*-darwin*) + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof ${libgcj}" + ;; powerpc-*-eabi) noconfigdirs="$noconfigdirs ${libgcj}" ! ;; ! powerpc64*-*-linux*) ! noconfigdirs="$noconfigdirs target-newlib target-libgloss" ! # not yet ported. ! noconfigdirs="$noconfigdirs target-libffi" ;; rs6000-*-lynxos*) ! noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" ;; rs6000-*-aix*) ! noconfigdirs="$noconfigdirs gprof ${libgcj}" ;; rs6000-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" *************** case "${target}" in *** 955,971 **** ;; mips*-*-irix5*) # The GNU linker does not support shared libraries. ! # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work) ! noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss ${libgcj}" ;; mips*-*-irix6*) # The GNU assembler does not support IRIX 6. - # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work) # Linking libjava exceeds command-line length limits on at least # IRIX 6.2, but not on IRIX 6.5. # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham # ! noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss ${libgcj}" ;; mips*-dec-bsd*) noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" --- 552,566 ---- ;; mips*-*-irix5*) # The GNU linker does not support shared libraries. ! noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}" ;; mips*-*-irix6*) # The GNU assembler does not support IRIX 6. # Linking libjava exceeds command-line length limits on at least # IRIX 6.2, but not on IRIX 6.5. # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham # ! noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}" ;; mips*-dec-bsd*) noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" *************** case "${target}" in *** 975,984 **** ;; mipstx39-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" ;; mips*-*-linux*) ! noconfigdirs="$noconfigdirs target-libffi" ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" --- 570,578 ---- ;; mipstx39-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips ;; mips*-*-linux*) ! noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" *************** case "${target}" in *** 999,1025 **** noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; sparc-*-elf*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" - fi noconfigdirs="$noconfigdirs ${libgcj}" ;; sparc64-*-elf*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" - fi noconfigdirs="$noconfigdirs ${libgcj}" ;; sparclite-*-*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" - fi noconfigdirs="$noconfigdirs ${libgcj}" ;; sparc-*-sunos4*) noconfigdirs="$noconfigdirs ${libgcj}" ! if [ x${is_cross_compiler} != xno ] ; then ! noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss" else use_gnu_ld=no fi --- 593,610 ---- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; sparc-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" ;; sparc64-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" ;; sparclite-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; sparc-*-sunos4*) noconfigdirs="$noconfigdirs ${libgcj}" ! if test x${is_cross_compiler} != xno ; then ! noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" else use_gnu_ld=no fi *************** case "${target}" in *** 1044,1058 **** vax-*-*) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; *-*-lynxos*) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; - *-*-macos* | \ - *-*-mpw*) - # Macs want a resource compiler. - configdirs="$configdirs grez" - noconfigdirs="$noconfigdirs ${libgcj}" - ;; *-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; --- 629,643 ---- vax-*-*) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; + ip2k-*-*) + noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}" + ;; + *-*-linux*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + ;; *-*-lynxos*) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; *-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; *************** case "${noconfigdirs}" in *** 1065,1082 **** *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;; esac - # Make sure we don't let GNU ld be added if we didn't want it. - if [ x$with_gnu_ld = xno ]; then - use_gnu_ld=no - noconfigdirs="$noconfigdirs ld" - fi - - # Make sure we don't let GNU as be added if we didn't want it. - if [ x$with_gnu_as = xno ]; then - use_gnu_as=no - noconfigdirs="$noconfigdirs gas" - fi - # Figure out what language subdirectories are present. # Look if the user specified --enable-languages="..."; if not, use # the environment variable $LANGUAGES if defined. $LANGUAGES might --- 650,655 ---- *************** done *** 1171,1180 **** notsupp="" for dir in . $skipdirs $noconfigdirs ; do dirname=`echo $dir | sed -e s/target-//g` ! if [ $dir != . ] && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` ! if [ -r $srcdir/$dirname/configure ] \ ! || [ -r $srcdir/$dirname/configure.in ]; then if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then true else --- 744,752 ---- notsupp="" for dir in . $skipdirs $noconfigdirs ; do dirname=`echo $dir | sed -e s/target-//g` ! if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` ! if test -r $srcdir/$dirname/configure ; then if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then true else *************** for dir in . $skipdirs $noconfigdirs ; d *** 1182,1191 **** fi fi fi ! if [ $dir != . ] && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` ! if [ -r $srcdir/$dirname/configure ] \ ! || [ -r $srcdir/$dirname/configure.in ]; then if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then true else --- 754,762 ---- fi fi fi ! if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` ! if test -r $srcdir/$dirname/configure ; then if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then true else *************** done *** 1197,1213 **** # Sometimes the tools are distributed with libiberty but with no other # libraries. In that case, we don't want to build target-libiberty. ! if [ -n "${target_configdirs}" ]; then others= for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do ! if [ "$i" != "libiberty" ]; then ! if [ -r $srcdir/$i/configure ] || [ -r $srcdir/$i/configure.in ]; then others=yes; break; fi fi done ! if [ -z "${others}" ]; then target_configdirs= fi fi --- 768,784 ---- # Sometimes the tools are distributed with libiberty but with no other # libraries. In that case, we don't want to build target-libiberty. ! if test -n "${target_configdirs}" ; then others= for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do ! if test "$i" != "libiberty" ; then ! if test -r $srcdir/$i/configure ; then others=yes; break; fi fi done ! if test -z "${others}" ; then target_configdirs= fi fi *************** fi *** 1215,1244 **** # Deconfigure all subdirectories, in case we are changing the # configuration from one where a subdirectory is supported to one where it # is not. ! if [ -z "${norecursion}" ] && [ -n "${configdirs}" ]; then for i in `echo ${configdirs} | sed -e s/target-//g` ; do rm -f $i/Makefile done fi ! if [ -z "${norecursion}" ] && [ -n "${target_configdirs}" ]; then for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do rm -f ${target_subdir}/$i/Makefile done fi # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't # supported by the one or two programs in a package. ! if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then # If $appdirs is non-empty, at least one of those directories must still # be configured, or we error out. (E.g., if the gas release supports a # specified target in some subdirs but not the gas subdir, we shouldn't # pretend that all is well.) ! if [ -n "$appdirs" ]; then for dir in $appdirs ; do ! if [ -r $dir/Makefile.in ]; then if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then appdirs="" break --- 786,834 ---- # Deconfigure all subdirectories, in case we are changing the # configuration from one where a subdirectory is supported to one where it # is not. ! if test -z "${norecursion}" && test -n "${configdirs}" ; then for i in `echo ${configdirs} | sed -e s/target-//g` ; do rm -f $i/Makefile done fi ! if test -z "${norecursion}" && test -n "${target_configdirs}" ; then for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do rm -f ${target_subdir}/$i/Makefile done fi + # Quietly strip out all directories which aren't configurable in this tree. + # This relies on all configurable subdirectories being autoconfiscated, which + # is now the case. + configdirs_all="$configdirs" + configdirs= + for i in ${configdirs_all} ; do + if test -f ${srcdir}/$i/configure ; then + configdirs="${configdirs} $i" + fi + done + target_configdirs_all="$target_configdirs" + target_configdirs= + for i in ${target_configdirs_all} ; do + j=`echo $i | sed -e s/target-//g` + if test -f ${srcdir}/$j/configure ; then + target_configdirs="${target_configdirs} $i" + fi + done + # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't # supported by the one or two programs in a package. ! if test -n "${notsupp}" && test -z "${norecursion}" ; then # If $appdirs is non-empty, at least one of those directories must still # be configured, or we error out. (E.g., if the gas release supports a # specified target in some subdirs but not the gas subdir, we shouldn't # pretend that all is well.) ! if test -n "$appdirs" ; then for dir in $appdirs ; do ! if test -r $dir/Makefile.in ; then if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then appdirs="" break *************** if [ -n "${notsupp}" ] && [ -z "${norecu *** 1249,1255 **** fi fi done ! if [ -n "$appdirs" ]; then echo "*** This configuration is not supported by this package." 1>&2 exit 1 fi --- 839,845 ---- fi fi done ! if test -n "$appdirs" ; then echo "*** This configuration is not supported by this package." 1>&2 exit 1 fi *************** if [ -n "${notsupp}" ] && [ -z "${norecu *** 1261,1266 **** --- 851,1186 ---- echo " (Any other directories should still work fine.)" 1>&2 fi + case "$host" in + *msdosdjgpp*) + enable_gdbtk=no ;; + esac + # Determine whether gdb needs tk/tcl or not. + case "$enable_gdbtk" in + no) + GDB_TK="" ;; + *) + GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" ;; + esac + + copy_dirs= + + # Handle --with-headers=XXX. If the value is not "yes", the contents of + # the named directory are copied to $(tooldir)/sys-include. + if test x"${with_headers}" != x ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-headers is only supported when cross compiling + exit 1 + fi + if test x"${with_headers}" != xyes ; then + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" + fi + fi + + # Handle --with-libs=XXX. If the value is not "yes", the contents of + # the name directories are copied to $(tooldir)/lib. Multiple directories + # are permitted. + if test x"${with_libs}" != x ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-libs is only supported when cross compiling + exit 1 + fi + if test x"${with_libs}" != xyes ; then + # Copy the libraries in reverse order, so that files in the first named + # library override files in subsequent libraries. + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + for l in ${with_libs}; do + copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" + done + fi + fi + + # Handle ${copy_dirs} + set fnord ${copy_dirs} + shift + while test $# != 0 ; do + if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then + : + else + echo Copying $1 to $2 + + # Use the install script to create the directory and all required + # parent directories. + if test -d $2 ; then + : + else + echo >config.temp + ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED + fi + + # Copy the directory, assuming we have tar. + # FIXME: Should we use B in the second tar? Not all systems support it. + (cd $1; tar -cf - .) | (cd $2; tar -xpf -) + + # It is the responsibility of the user to correctly adjust all + # symlinks. If somebody can figure out how to handle them correctly + # here, feel free to add the code. + + echo $1 > $2/COPIED + fi + shift; shift + done + + # Work in distributions that contain no compiler tools, like Autoconf. + tentative_cc="" + if test -d ${srcdir}/config ; then + case "${host}" in + m68k-hp-hpux*) + # Avoid "too much defining" errors from HPUX compiler. + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hp300" + ;; + m68k-apollo-sysv*) + tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG" + host_makefile_frag="config/mh-apollo68" + ;; + m68k-apollo-bsd*) + #None of the Apollo compilers can compile gas or binutils. The preprocessor + # chokes on bfd, the compiler won't let you assign integers to enums, and + # other problems. Defining CC to gcc is a questionable way to say "don't use + # the apollo compiler" (the preferred version of GCC could be called cc, + # or whatever), but I'm not sure leaving CC as cc is any better... + #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG + tentative_cc=gcc + host_makefile_frag="config/mh-a68bsd" + ;; + m88k-dg-dgux*) + tentative_cc="gcc -Wall -ansi -D__using_DGUX" + host_makefile_frag="config/mh-dgux" + ;; + m88k-harris-cxux*) + # Under CX/UX, we want to tell the compiler to use ANSI mode. + tentative_cc="cc -Xa" + host_makefile_frag="config/mh-cxux" + ;; + m88k-motorola-sysv*) + host_makefile_frag="config/mh-delta88" + ;; + mips*-dec-ultrix*) + tentative_cc="cc -Wf,-XNg1000" + host_makefile_frag="config/mh-decstation" + ;; + mips*-nec-sysv4*) + # The C compiler on NEC MIPS SVR4 needs bigger tables. + tentative_cc="cc -ZXNd=5000 -ZXNg=1000" + host_makefile_frag="config/mh-necv4" + ;; + mips*-sgi-irix6*) + host_makefile_frag="config/mh-irix6" + ;; + mips*-sgi-irix5*) + host_makefile_frag="config/mh-irix5" + ;; + mips*-sgi-irix4*) + # Tell compiler to use K&R C. We can't compile under the SGI Ansi + # environment. Also bump switch table size so that cp-parse will + # compile. Bump string length limit so linker builds. + tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192" + ;; + mips*-sgi-irix3*) + host_makefile_frag="config/mh-sysv" + ;; + mips*-*-sysv4*) + host_makefile_frag="config/mh-sysv4" + ;; + mips*-*-sysv*) + # This is for a MIPS running RISC/os 4.52C. + + # This is needed for GDB, but needs to be in the top-level make because + # if a library is compiled with the bsd headers and gets linked with the + # sysv system libraries all hell can break loose (e.g. a jmp_buf might be + # a different size). + # ptrace(2) apparently has problems in the BSD environment. No workaround is + # known except to select the sysv environment. Could we use /proc instead? + # These "sysv environments" and "bsd environments" often end up being a pain. + # + # This is not part of CFLAGS because perhaps not all C compilers have this + # option. + tentative_cc="cc -systype sysv" + host_makefile_frag="config/mh-riscos" + ;; + i370-ibm-opened*) + tentative_cc="c89" + host_makefile_frag="config/mh-openedition" + ;; + i[3456]86-*-sysv5*) + host_makefile_frag="config/mh-sysv5" + ;; + i[3456]86-*-dgux*) + tentative_cc="gcc -Wall -ansi -D__using_DGUX" + host_makefile_frag="config/mh-dgux386" + ;; + i[3456]86-ncr-sysv4.3*) + # The MetaWare compiler will generate a copyright message unless you + # turn it off by adding the -Hnocopyr flag. + tentative_cc="cc -Hnocopyr" + host_makefile_frag="config/mh-ncrsvr43" + ;; + i[3456]86-ncr-sysv4*) + # for an NCR 3000 (i486/SVR4) system. + # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc. + # This compiler not only emits obnoxious copyright messages every time + # you run it, but it chokes and dies on a whole bunch of GNU source + # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc. + tentative_cc="/usr/ccs/ATT/cc" + host_makefile_frag="config/mh-ncr3000" + ;; + i[3456]86-*-sco3.2v5*) + host_makefile_frag="config/mh-sysv" + ;; + i[3456]86-*-sco*) + # The native C compiler botches some simple uses of const. Unfortunately, + # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h. + tentative_cc="cc -Dconst=" + host_makefile_frag="config/mh-sco" + ;; + i[3456]86-*-udk*) + host_makefile_frag="config/mh-sysv5" + ;; + i[3456]86-*-isc*) + host_makefile_frag="config/mh-sysv" + ;; + i[3456]86-*-solaris2*) + host_makefile_frag="config/mh-sysv4" + ;; + i[3456]86-*-aix*) + host_makefile_frag="config/mh-aix386" + ;; + i[3456]86-*-msdosdjgpp*) + host_makefile_frag="config/mh-djgpp" + ;; + *-cygwin*) + host_makefile_frag="config/mh-cygwin" + ;; + *-mingw32*) + host_makefile_frag="config/mh-mingw32" + ;; + *-interix*) + host_makefile_frag="config/mh-interix" + ;; + vax-*-ultrix2*) + # The old BSD pcc isn't up to compiling parts of gdb so use gcc + tentative_cc=gcc + ;; + *-*-solaris2*) + host_makefile_frag="config/mh-solaris" + ;; + m68k-sun-sunos*) + # Sun's C compiler needs the -J flag to be able to compile cp-parse.c + # without overflowing the jump tables (-J says to use a 32 bit table) + tentative_cc="cc -J" + ;; + *-hp-hpux[78]*) + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hpux8" + ;; + *-hp-hpux*) + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hpux" + ;; + *-*-hiux*) + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hpux" + ;; + rs6000-*-lynxos*) + # /bin/cc is less than useful for our purposes. Always use GCC + tentative_cc="/usr/cygnus/progressive/bin/gcc" + host_makefile_frag="config/mh-lynxrs6k" + ;; + *-*-lynxos*) + # /bin/cc is less than useful for our purposes. Always use GCC + tentative_cc="/bin/gcc" + ;; + *-*-sysv4*) + host_makefile_frag="config/mh-sysv4" + ;; + *-*-sysv*) + host_makefile_frag="config/mh-sysv" + ;; + esac + fi + + rm -f mh-frag + if test -n "${host_makefile_frag}" ; then + for f in ${host_makefile_frag} + do + cat ${srcdir}/$f >> mh-frag + done + host_makefile_frag=mh-frag + fi + + case "${target}" in + v810*) + target_makefile_frag="config/mt-v810" + ;; + i[3456]86-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + powerpc-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + *-*-linux*) + target_makefile_frag="config/mt-linux" + ;; + *-*-aix4.[3456789]* | *-*-aix[56789].*) + target_makefile_frag="config/mt-aix43" + ;; + mips*-*-pe | sh*-*-pe | *arm-wince-pe) + target_makefile_frag="config/mt-wince" + ;; + esac + + alphaieee_frag= + case $target in + alpha*-*-*) + # This just makes sure to use the -mieee option to build target libs. + # This should probably be set individually by each library. + alphaieee_frag="config/mt-alphaieee" + ;; + esac + + # If --enable-target-optspace always use -Os instead of -O2 to build + # the target libraries, similarly if it is not specified, use -Os + # on selected platforms. + ospace_frag= + case "${enable_target_optspace}:${target}" in + yes:*) + ospace_frag="config/mt-ospace" + ;; + :d30v-*) + ospace_frag="config/mt-d30v" + ;; + :m32r-* | :d10v-* | :fr30-*) + ospace_frag="config/mt-ospace" + ;; + no:* | :*) + ;; + *) + echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 + ;; + esac + + rm -f mt-frag + if test -n "${target_makefile_frag}${alphaieee_frag}${ospace_frag}" ; then + for f in ${target_makefile_frag} ${alphaieee_frag} ${ospace_frag} + do + cat ${srcdir}/$f >> mt-frag + done + target_makefile_frag=mt-frag + fi + # Set with_gnu_as and with_gnu_ld as appropriate. # # This is done by determining whether or not the appropriate directory *************** fi *** 1274,1336 **** # want to do that, then you should use the --without-gnu-as and # --without-gnu-ld options for the configure script. ! if [ x${use_gnu_as} = x ] ; then ! if [ x${with_gnu_as} != xno ] && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && [ -d ${srcdir}/${gasdir} ] ; then ! with_gnu_as=yes ! withoptions="$withoptions --with-gnu-as" ! fi fi ! if [ x${use_gnu_ld} = x ] ; then ! if [ x${with_gnu_ld} != xno ] && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && [ -d ${srcdir}/ld ] ; then ! with_gnu_ld=yes ! withoptions="$withoptions --with-gnu-ld" ! fi fi # If using newlib, add --with-newlib to the withoptions so that gcc/configure # can detect this case. ! if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then with_newlib=yes withoptions="$withoptions --with-newlib" fi ! if [ x${shared} = xyes ]; then case "${target}" in ! hppa* | parisc*) ! target_makefile_frag="${target_makefile_frag} config/mt-papic" ! ;; ! i[3456]86-*) ! target_makefile_frag="${target_makefile_frag} config/mt-x86pic" ! ;; ! ia64-*) ! target_makefile_frag="${target_makefile_frag} config/mt-ia64pic" ! ;; ! powerpc*-*-aix*) ! # We don't want -fPIC on AIX. ! ;; ! powerpc*-*) ! target_makefile_frag="${target_makefile_frag} config/mt-ppcpic" ! ;; ! alpha*-*-linux*) ! target_makefile_frag="${target_makefile_frag} config/mt-elfalphapic" ! ;; ! *) ! if test -f ${srcdir}/config/mt-${target_cpu}pic; then ! target_makefile_frag="${target_makefile_frag} config/mt-${target_cpu}pic" ! fi ! ;; esac fi ! rm -f mt-frag ! if [ -n "${target_makefile_frag}" ] ; then ! for f in ${target_makefile_frag} ! do ! cat ${srcdir}/$f >> mt-frag done ! target_makefile_frag=mt-frag fi # post-target: --- 1194,1279 ---- # want to do that, then you should use the --without-gnu-as and # --without-gnu-ld options for the configure script. ! if test x${use_gnu_as} = x && ! echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then ! with_gnu_as=yes ! withoptions="$withoptions --with-gnu-as" fi ! if test x${use_gnu_ld} = x && ! echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then ! with_gnu_ld=yes ! withoptions="$withoptions --with-gnu-ld" fi # If using newlib, add --with-newlib to the withoptions so that gcc/configure # can detect this case. ! if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then with_newlib=yes withoptions="$withoptions --with-newlib" fi ! # We default to --with-shared on platforms where -fpic is meaningless. ! # Well, we don't yet, but we will. ! if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then case "${target}" in ! alpha*-dec-osf*) enable_shared=yes ;; ! alpha*-*-linux*) enable_shared=yes ;; ! mips-sgi-irix5*) enable_shared=yes ;; ! *) enable_shared=no ;; esac fi ! case "${enable_shared}" in ! yes) shared=yes ;; ! no) shared=no ;; ! "") shared=no ;; ! *) shared=yes ;; ! esac ! ! ! # Default to using --with-stabs for certain targets. ! if test x${with_stabs} = x ; then ! case "${target}" in ! mips*-*-irix6*o32) ! with_stabs=yes; ! withoptions="${withoptions} --with-stabs" ! ;; ! mips*-*-irix6*) ! ;; ! mips*-*-* | alpha*-*-osf*) ! with_stabs=yes; ! withoptions="${withoptions} --with-stabs" ! ;; ! esac ! fi ! ! # hpux11 in 64bit mode has libraries in a weird place. Arrange to find ! # them automatically. ! case "${host}" in ! hppa*64*-*-hpux11*) ! withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" ! ;; ! esac ! ! # If we aren't going to be using gcc, see if we can extract a definition ! # of CC from the fragment. ! # Actually, use the 'pre-extracted' version above. ! if test -z "${CC}" && test "${build}" = "${host}" ; then ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ! found= ! for dir in $PATH; do ! test -z "$dir" && dir=. ! if test -f $dir/gcc; then ! found=yes ! break ! fi done ! IFS="$save_ifs" ! if test -z "${found}" && test -n "${tentative_cc}" ; then ! CC=$tentative_cc ! fi fi # post-target: *************** fi *** 1339,1371 **** # can't, we are probably in trouble. We don't care whether we can run the # executable--we might be using a cross compiler--we only care whether it # can be created. At this point the main configure script has set CC. echo "int main () { return 0; }" > conftest.c ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c ! if [ $? = 0 ] && [ -s conftest -o -s conftest.exe ]; then ! : ! else ! echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." ! echo 1>&2 "*** You must set the environment variable CC to a working compiler." ! rm -f conftest* ! exit 1 ! fi rm -f conftest* # The Solaris /usr/ucb/cc compiler does not appear to work. case "${host}" in sparc-sun-solaris2*) CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`" ! if [ "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ] ; then could_use= ! [ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin" ! if [ -d /opt/cygnus/bin ] ; then ! if [ "$could_use" = "" ] ; then could_use="/opt/cygnus/bin" else could_use="$could_use or /opt/cygnus/bin" fi fi ! if [ "$could_use" = "" ] ; then echo "Warning: compilation may fail because you're using" echo "/usr/ucb/cc. You should change your PATH or CC " echo "variable and rerun configure." --- 1282,1320 ---- # can't, we are probably in trouble. We don't care whether we can run the # executable--we might be using a cross compiler--we only care whether it # can be created. At this point the main configure script has set CC. + we_are_ok=no echo "int main () { return 0; }" > conftest.c ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c ! if test $? = 0 ; then ! if test -s conftest || test -s conftest.exe ; then ! we_are_ok=yes ! fi ! fi ! case $we_are_ok in ! no) ! echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." ! echo 1>&2 "*** You must set the environment variable CC to a working compiler." ! rm -f conftest* ! exit 1 ! ;; ! esac rm -f conftest* # The Solaris /usr/ucb/cc compiler does not appear to work. case "${host}" in sparc-sun-solaris2*) CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`" ! if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then could_use= ! test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin" ! if test -d /opt/cygnus/bin ; then ! if test "$could_use" = "" ; then could_use="/opt/cygnus/bin" else could_use="$could_use or /opt/cygnus/bin" fi fi ! if test "$could_use" = "" ; then echo "Warning: compilation may fail because you're using" echo "/usr/ucb/cc. You should change your PATH or CC " echo "variable and rerun configure." *************** esac *** 1381,1408 **** # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the # binutils tools will find libbfd.so. ! if [ "${shared}" = "yes" ]; then ! sed -e 's/^SET_LIB_PATH[ ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \ ! Makefile > Makefile.tem ! rm -f Makefile ! mv -f Makefile.tem Makefile ! ! case "${host}" in ! *-*-hpux*) ! sed -e 's/^RPATH_ENVVAR[ ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \ ! Makefile > Makefile.tem ! rm -f Makefile ! mv -f Makefile.tem Makefile ! ;; ! esac fi ! # Record target_configdirs and the configure arguments for target and ! # build configuration in Makefile. ! target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` ! targargs=`echo "${arguments}" | \ sed -e 's/--no[^ ]*//' \ -e 's/--cache[a-z-]*=[^ ]*//' \ -e 's/--ho[a-z-]*=[^ ]*//' \ -e 's/--bu[a-z-]*=[^ ]*//' \ -e 's/--ta[a-z-]*=[^ ]*//'` --- 1330,1360 ---- # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the # binutils tools will find libbfd.so. ! if test "${shared}" = "yes" ; then ! SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ! else ! SET_LIB_PATH= fi + sed -e "s/@SET_LIB_PATH@/${SET_LIB_PATH}/" Makefile > Makefile.tem + rm -f Makefile + mv -f Makefile.tem Makefile ! ! case "${host}" in ! *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; ! *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; ! esac ! sed -e "s/@RPATH_ENVVAR@/${RPATH_ENVVAR}/" Makefile > Makefile.tem ! rm -f Makefile ! mv -f Makefile.tem Makefile ! ! ! # Base args. Strip norecursion, cache-file, srcdir, host, build, target. ! # These are the ones we might not want to pass down to subconfigures. ! baseargs=`echo "${arguments}" | \ sed -e 's/--no[^ ]*//' \ -e 's/--cache[a-z-]*=[^ ]*//' \ + -e 's/--sr[a-z-]*=[^ ]*//' \ -e 's/--ho[a-z-]*=[^ ]*//' \ -e 's/--bu[a-z-]*=[^ ]*//' \ -e 's/--ta[a-z-]*=[^ ]*//'` *************** targargs=`echo "${arguments}" | \ *** 1410,1434 **** # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor # desired. ! buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${targargs}" # Passing a --with-cross-host argument lets the target libraries know # whether they are being built with a cross-compiler or being built # native. However, it would be better to use other mechanisms to make the # sorts of decisions they want to make on this basis. Please consider # this option to be deprecated. FIXME. ! if [ x${is_cross_compiler} = xyes ]; then targargs="--with-cross-host=${host_alias} ${targargs}" fi # Default to --enable-multilib. ! if [ x${enable_multilib} = x ]; then targargs="--enable-multilib ${targargs}" fi # Pass --with-newlib if appropriate. Note that target_configdirs has # changed from the earlier setting of with_newlib. ! if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then targargs="--with-newlib ${targargs}" fi --- 1362,1391 ---- # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor # desired. ! buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}" ! ! # Record target_configdirs and the configure arguments for target and ! # build configuration in Makefile. ! target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` ! targargs=${baseargs} # Passing a --with-cross-host argument lets the target libraries know # whether they are being built with a cross-compiler or being built # native. However, it would be better to use other mechanisms to make the # sorts of decisions they want to make on this basis. Please consider # this option to be deprecated. FIXME. ! if test x${is_cross_compiler} = xyes ; then targargs="--with-cross-host=${host_alias} ${targargs}" fi # Default to --enable-multilib. ! if test x${enable_multilib} = x ; then targargs="--enable-multilib ${targargs}" fi # Pass --with-newlib if appropriate. Note that target_configdirs has # changed from the earlier setting of with_newlib. ! if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then targargs="--with-newlib ${targargs}" fi *************** if test x${gxx_include_dir} = x; then *** 1457,1474 **** if test x${enable_version_specific_runtime_libs} = xyes; then gxx_include_dir='${libsubdir}/include/c++' else ! . ${topsrcdir}/config.if ! gxx_include_dir='${prefix}/include/${libstdcxx_incdir}' fi else gxx_include_dir=${gxx_include_dir} fi FLAGS_FOR_TARGET= ! case " $skipdirs " in ! *" target-newlib "*) ;; ! *) ! case " $target_configdirs " in *" newlib "*) case " $targargs " in *" --with-newlib "*) --- 1414,1428 ---- if test x${enable_version_specific_runtime_libs} = xyes; then gxx_include_dir='${libsubdir}/include/c++' else ! . ${srcdir}/config.if ! gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} fi else gxx_include_dir=${gxx_include_dir} fi FLAGS_FOR_TARGET= ! case " $target_configdirs " in *" newlib "*) case " $targargs " in *" --with-newlib "*) *************** case " $skipdirs " in *** 1478,1484 **** esac # If we're not building GCC, don't discard standard headers. ! if test -d ${topsrcdir}/gcc; then FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc' if test "${build}" != "${host}"; then --- 1432,1438 ---- esac # If we're not building GCC, don't discard standard headers. ! if test -d ${srcdir}/gcc; then FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc' if test "${build}" != "${host}"; then *************** case " $skipdirs " in *** 1500,1535 **** fi fi ! # If we're building newlib, use its generic headers last, but search ! # for any libc-related directories first (so make it the last -B ! # switch). ! FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' ;; esac ;; - esac - ;; esac # On Canadian crosses, we'll be searching the right directories for # the previously-installed cross compiler, so don't bother to add # flags for directories within the install tree of the compiler # being built; programs in there won't even run. ! if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then # Search for pre-installed headers if nothing else fits. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include' fi ! if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno && ! echo " ${configdirs} " | grep " ld " > /dev/null && ! test -d ${srcdir}/ld; then # Arrange for us to find uninstalled linker scripts. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld' fi if test "x${CC_FOR_TARGET+set}" = xset; then : ! elif test -d ${topsrcdir}/gcc; then CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/' elif test "$host" = "$target"; then CC_FOR_TARGET='$(CC)' --- 1454,1495 ---- fi fi ! case "${target}-${is_cross_compiler}" in ! i[3456]86-*-linux*-no) ! # Here host == target, so we don't need to build gcc, ! # so we don't want to discard standard headers. ! FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'` ! ;; ! *) ! # If we're building newlib, use its generic headers last, but search ! # for any libc-related directories first (so make it the last -B ! # switch). ! FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' ! ;; ! esac ;; esac ;; esac # On Canadian crosses, we'll be searching the right directories for # the previously-installed cross compiler, so don't bother to add # flags for directories within the install tree of the compiler # being built; programs in there won't even run. ! if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then # Search for pre-installed headers if nothing else fits. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include' fi ! if test "x${use_gnu_ld}" = x && ! echo " ${configdirs} " | grep " ld " > /dev/null ; then # Arrange for us to find uninstalled linker scripts. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld' fi if test "x${CC_FOR_TARGET+set}" = xset; then : ! elif test -d ${srcdir}/gcc; then CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/' elif test "$host" = "$target"; then CC_FOR_TARGET='$(CC)' *************** esac *** 1545,1551 **** if test "x${GCJ_FOR_TARGET+set}" = xset; then : ! elif test -d ${topsrcdir}/gcc; then GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/' elif test "$host" = "$target"; then GCJ_FOR_TARGET='gcj' --- 1505,1511 ---- if test "x${GCJ_FOR_TARGET+set}" = xset; then : ! elif test -d ${srcdir}/gcc; then GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/' elif test "$host" = "$target"; then GCJ_FOR_TARGET='gcj' *************** case $GCJ_FOR_TARGET in *** 1557,1565 **** *) GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; esac if test "x${CXX_FOR_TARGET+set}" = xset; then : ! elif test -d ${topsrcdir}/gcc; then # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead # of g++ for linking C++ or Java, because g++ has -shared-libgcc by # default whereas gcc does not. --- 1517,1528 ---- *) GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; esac + # Don't use libstdc++-v3's flags to configure/build itself. + libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' + if test "x${CXX_FOR_TARGET+set}" = xset; then : ! elif test -d ${srcdir}/gcc; then # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead # of g++ for linking C++ or Java, because g++ has -shared-libgcc by # default whereas gcc does not. *************** qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET *** 1585,1601 **** sedtemp=sed.$$ cat >$sedtemp < Makefile.tem rm -f Makefile $sedtemp --- 1548,1564 ---- sedtemp=sed.$$ cat >$sedtemp < Makefile.tem rm -f Makefile $sedtemp diff -Nrc3pad gcc-3.2.3/contrib/ChangeLog gcc-3.3/contrib/ChangeLog *** gcc-3.2.3/contrib/ChangeLog 2003-04-22 06:14:14.000000000 +0000 --- gcc-3.3/contrib/ChangeLog 2003-05-14 00:09:04.000000000 +0000 *************** *** 1,68 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2003-01-25 Kaveh R. Ghazi * gcc_update (files_and_dependencies): Add gcc/cp/cfns.h depends on gcc/cp/cfns.gperf and gcc/java/keyword.h depends on gcc/java/keyword.gperf ! 2003-01-25 Gerald Pfeifer * gcc_update (files_and_dependencies): Add gcc/intl/plural.c as depending on gcc/intl/plural.y. ! 2003-01-25 Richard Henderson ! * gcc_update: Remove libchill. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. 2002-08-14 Mark Mitchell * gennews (files): Add GCC 3.2 files. - 2002-07-25 Release Manager - - * GCC 3.1.1 Released. - 2002-07-22 Gerald Pfeifer * gennews (files): Add proper files for the GCC 3.1 release series. Simplify and reformat introductory wording. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-04-03 Zack Weinberg * texi2pod.pl: Handle @end ftable and @end vtable. ! 2002-03-12 Zack Weinberg * texi2pod.pl: Handle @include, @ftable, @vtable. Reformat some code for clarity. --- 1,108 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-04-12 Matthias Klose ! ! * test_installed: Add options to run objc tests. ! In generated site.exp, initialize rootme, CFLAGS, CXXFLAGS. ! ! 2003-01-03 Kaveh R. Ghazi * gcc_update (files_and_dependencies): Add gcc/cp/cfns.h depends on gcc/cp/cfns.gperf and gcc/java/keyword.h depends on gcc/java/keyword.gperf ! 2002-12-29 Gerald Pfeifer * gcc_update (files_and_dependencies): Add gcc/intl/plural.c as depending on gcc/intl/plural.y. ! 2002-12-28 Joseph S. Myers ! * texi2pod.pl: Skip contents of @copying. ! 2002-10-21 Richard Henderson ! * paranoia.cc (real_c_float::image): Accomodate size of ! real_internal format. ! (main): Unbuffer stdio. Add real_internal format. ! (floor_log2_wide): New. ! 2002-10-16 Richard Henderson ! * paranoia.cc (ENUM_BITFIELD): New. ! (class): Define as klass around real.h. ! (real_c_float): Not a template any longer; define MODE as a ! class static constant; use real_format elements for SIZE. ! Update uses of real_to_decimal and real_to_hexadecimal. ! (main): Change -g argument to use a format name. ! (mode_for_size): Remove. ! 2002-09-16 Richard Henderson ! * paranoia.cc: New file. ! 2002-09-04 Richard Henderson ! * enquire.c: Remove. 2002-08-14 Mark Mitchell * gennews (files): Add GCC 3.2 files. 2002-07-22 Gerald Pfeifer * gennews (files): Add proper files for the GCC 3.1 release series. Simplify and reformat introductory wording. ! 2002-07-16 Nathanael Nerode ! * enquire.c: Move from gcc. ! 2002-07-16 H.J. Lu ! * gcc_update (touch_files): Pass -s to ${MAKE}. ! 2002-06-26 Zack Weinberg ! ! * texi2pod.pl: Correct handling of the internal R<> sequence. ! ! 2002-05-31 Florian Weimer ! ! * gcc_update (files_and_dependencies): Add generated Texinfo files ! for Ada. ! ! 2002-05-16 Rainer Orth ! ! * test_installed: Allow for PWDCMD to override hardcoded pwd. ! * test_summary: Likewise. ! ! 2002-04-18 Geoffrey Keating ! ! * gcc_update (touch_files): Don't have empty for loop. ! ! 2002-04-16 Richard Henderson ! ! * gcc_update: Remove libchill. ! ! 2002-03-25 Zack Weinberg * texi2pod.pl: Handle @end ftable and @end vtable. ! 2002-03-11 Zack Weinberg * texi2pod.pl: Handle @include, @ftable, @vtable. Reformat some code for clarity. diff -Nrc3pad gcc-3.2.3/contrib/gcc_update gcc-3.3/contrib/gcc_update *** gcc-3.2.3/contrib/gcc_update 2003-01-25 15:51:53.000000000 +0000 --- gcc-3.3/contrib/gcc_update 2003-01-03 06:07:16.000000000 +0000 *************** gcc/ada/einfo.h: gcc/ada/einfo.ads gcc/a *** 79,84 **** --- 79,88 ---- gcc/ada/sinfo.h: gcc/ada/sinfo.ads gcc/ada/xsinfo.adb gcc/ada/nmake.adb: gcc/ada/sinfo.ads gcc/ada/nmake.adt gcc/ada/xnmake.adb gcc/ada/nmake.ads: gcc/ada/sinfo.ads gcc/ada/nmake.adt gcc/ada/xnmake.adb + gcc/ada/gnat_ug_unx.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words + gcc/ada/gnat_ug_vms.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words + gcc/ada/gnat_ug_vxw.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words + gcc/ada/gnat_ug_w32.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words # And libraries, at last libf2c/configure: libf2c/configure.in libf2c/libF77/configure: libf2c/libF77/configure.in *************** libjava/libltdl/aclocal.m4: libjava/libl *** 103,108 **** --- 107,114 ---- libjava/libltdl/Makefile.in: libjava/libltdl/Makefile.am libjava/libltdl/configure.in libjava/libltdl/aclocal.m4 libjava/libltdl/configure: libjava/libltdl/configure.in libjava/libltdl/aclocal.m4 libjava/libltdl/stamp-h.in: libjava/libltdl/configure.in libjava/libltdl/aclocal.m4 libjava/libltdl/acconfig.h + # Top level + Makefile.in: Makefile.tpl Makefile.def EOF } *************** touch_files () { *** 117,128 **** files_and_dependencies | sed 's, ,: ,' >> Makefile.$$ files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$ echo ':' >> Makefile.$$ ! echo ' @for f in $?; do test -f $$f || exit 0; done; \' >> Makefile.$$ echo ' echo Touching $@...; \' >> Makefile.$$ echo ' echo Touching $@... 1>&2; \' >> Makefile.$$ echo ' touch $@' >> Makefile.$$ files_and_dependencies | sed 's,[^ ]* ,,;s,$, :,' >> Makefile.$$ ! while ${MAKE-make} -f Makefile.$$ all | grep . > /dev/null; do sleep 1 done 2>&1 rm -f Makefile.$$ --- 123,134 ---- files_and_dependencies | sed 's, ,: ,' >> Makefile.$$ files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$ echo ':' >> Makefile.$$ ! echo ' @for f in $? $@; do test -f $$f || exit 0; done; \' >> Makefile.$$ echo ' echo Touching $@...; \' >> Makefile.$$ echo ' echo Touching $@... 1>&2; \' >> Makefile.$$ echo ' touch $@' >> Makefile.$$ files_and_dependencies | sed 's,[^ ]* ,,;s,$, :,' >> Makefile.$$ ! while ${MAKE-make} -s -f Makefile.$$ all | grep . > /dev/null; do sleep 1 done 2>&1 rm -f Makefile.$$ diff -Nrc3pad gcc-3.2.3/contrib/paranoia.cc gcc-3.3/contrib/paranoia.cc *** gcc-3.2.3/contrib/paranoia.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/contrib/paranoia.cc 2002-10-22 00:09:41.000000000 +0000 *************** *** 0 **** --- 1,2716 ---- + /* A C version of Kahan's Floating Point Test "Paranoia" + + Thos Sumner, UCSF, Feb. 1985 + David Gay, BTL, Jan. 1986 + + This is a rewrite from the Pascal version by + + B. A. Wichmann, 18 Jan. 1985 + + (and does NOT exhibit good C programming style). + + Adjusted to use Standard C headers 19 Jan. 1992 (dmg); + + (C) Apr 19 1983 in BASIC version by: + Professor W. M. Kahan, + 567 Evans Hall + Electrical Engineering & Computer Science Dept. + University of California + Berkeley, California 94720 + USA + + converted to Pascal by: + B. A. Wichmann + National Physical Laboratory + Teddington Middx + TW11 OLW + UK + + converted to C by: + + David M. Gay and Thos Sumner + AT&T Bell Labs Computer Center, Rm. U-76 + 600 Mountain Avenue University of California + Murray Hill, NJ 07974 San Francisco, CA 94143 + USA USA + + with simultaneous corrections to the Pascal source (reflected + in the Pascal source available over netlib). + [A couple of bug fixes from dgh = sun!dhough incorporated 31 July 1986.] + + Reports of results on various systems from all the versions + of Paranoia are being collected by Richard Karpinski at the + same address as Thos Sumner. This includes sample outputs, + bug reports, and criticisms. + + You may copy this program freely if you acknowledge its source. + Comments on the Pascal version to NPL, please. + + The following is from the introductory commentary from Wichmann's work: + + The BASIC program of Kahan is written in Microsoft BASIC using many + facilities which have no exact analogy in Pascal. The Pascal + version below cannot therefore be exactly the same. Rather than be + a minimal transcription of the BASIC program, the Pascal coding + follows the conventional style of block-structured languages. Hence + the Pascal version could be useful in producing versions in other + structured languages. + + Rather than use identifiers of minimal length (which therefore have + little mnemonic significance), the Pascal version uses meaningful + identifiers as follows [Note: A few changes have been made for C]: + + + BASIC C BASIC C BASIC C + + A J S StickyBit + A1 AInverse J0 NoErrors T + B Radix [Failure] T0 Underflow + B1 BInverse J1 NoErrors T2 ThirtyTwo + B2 RadixD2 [SeriousDefect] T5 OneAndHalf + B9 BMinusU2 J2 NoErrors T7 TwentySeven + C [Defect] T8 TwoForty + C1 CInverse J3 NoErrors U OneUlp + D [Flaw] U0 UnderflowThreshold + D4 FourD K PageNo U1 + E0 L Milestone U2 + E1 M V + E2 Exp2 N V0 + E3 N1 V8 + E5 MinSqEr O Zero V9 + E6 SqEr O1 One W + E7 MaxSqEr O2 Two X + E8 O3 Three X1 + E9 O4 Four X8 + F1 MinusOne O5 Five X9 Random1 + F2 Half O8 Eight Y + F3 Third O9 Nine Y1 + F6 P Precision Y2 + F9 Q Y9 Random2 + G1 GMult Q8 Z + G2 GDiv Q9 Z0 PseudoZero + G3 GAddSub R Z1 + H R1 RMult Z2 + H1 HInverse R2 RDiv Z9 + I R3 RAddSub + IO NoTrials R4 RSqrt + I3 IEEE R9 Random9 + + SqRWrng + + All the variables in BASIC are true variables and in consequence, + the program is more difficult to follow since the "constants" must + be determined (the glossary is very helpful). The Pascal version + uses Real constants, but checks are added to ensure that the values + are correctly converted by the compiler. + + The major textual change to the Pascal version apart from the + identifiersis that named procedures are used, inserting parameters + wherehelpful. New procedures are also introduced. The + correspondence is as follows: + + + BASIC Pascal + lines + + 90- 140 Pause + 170- 250 Instructions + 380- 460 Heading + 480- 670 Characteristics + 690- 870 History + 2940-2950 Random + 3710-3740 NewD + 4040-4080 DoesYequalX + 4090-4110 PrintIfNPositive + 4640-4850 TestPartialUnderflow + + */ + + /* This version of paranoia has been modified to work with GCC's internal + software floating point emulation library, as a sanity check of same. + + I'm doing this in C++ so that I can do operator overloading and not + have to modify so damned much of the existing code. */ + + extern "C" { + #include + #include + #include + #include + #include + #include + #include + #include + + /* This part is made all the more awful because many gcc headers are + not prepared at all to be parsed as C++. The biggest stickler + here is const structure members. So we include exactly the pieces + that we need. */ + + #define GTY(x) + + #include "ansidecl.h" + #include "auto-host.h" + #include "hwint.h" + + #undef EXTRA_MODES_FILE + + struct rtx_def; + typedef struct rtx_def *rtx; + struct rtvec_def; + typedef struct rtvec_def *rtvec; + union tree_node; + typedef union tree_node *tree; + + #define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM, + enum tree_code { + #include "tree.def" + LAST_AND_UNUSED_TREE_CODE + }; + #undef DEFTREECODE + + #define ENUM_BITFIELD(X) enum X + #define class klass + + #include "real.h" + + #undef class + } + + /* We never produce signals from the library. Thus setjmp need do nothing. */ + #undef setjmp + #define setjmp(x) (0) + + static bool verbose = false; + static int verbose_index = 0; + + /* ====================================================================== */ + /* The implementation of the abstract floating point class based on gcc's + real.c. I.e. the object of this excersize. Templated so that we can + all fp sizes. */ + + class real_c_float + { + public: + static const enum machine_mode MODE = SFmode; + + private: + static const int external_max = 128 / 32; + static const int internal_max + = (sizeof (REAL_VALUE_TYPE) + sizeof (long) + 1) / sizeof (long); + long image[external_max < internal_max ? internal_max : external_max]; + + void from_long(long); + void from_str(const char *); + void binop(int code, const real_c_float&); + void unop(int code); + bool cmp(int code, const real_c_float&) const; + + public: + real_c_float() + { } + real_c_float(long l) + { from_long(l); } + real_c_float(const char *s) + { from_str(s); } + real_c_float(const real_c_float &b) + { memcpy(image, b.image, sizeof(image)); } + + const real_c_float& operator= (long l) + { from_long(l); return *this; } + const real_c_float& operator= (const char *s) + { from_str(s); return *this; } + const real_c_float& operator= (const real_c_float &b) + { memcpy(image, b.image, sizeof(image)); return *this; } + + const real_c_float& operator+= (const real_c_float &b) + { binop(PLUS_EXPR, b); return *this; } + const real_c_float& operator-= (const real_c_float &b) + { binop(MINUS_EXPR, b); return *this; } + const real_c_float& operator*= (const real_c_float &b) + { binop(MULT_EXPR, b); return *this; } + const real_c_float& operator/= (const real_c_float &b) + { binop(RDIV_EXPR, b); return *this; } + + real_c_float operator- () const + { real_c_float r(*this); r.unop(NEGATE_EXPR); return r; } + real_c_float abs () const + { real_c_float r(*this); r.unop(ABS_EXPR); return r; } + + bool operator < (const real_c_float &b) const { return cmp(LT_EXPR, b); } + bool operator <= (const real_c_float &b) const { return cmp(LE_EXPR, b); } + bool operator == (const real_c_float &b) const { return cmp(EQ_EXPR, b); } + bool operator != (const real_c_float &b) const { return cmp(NE_EXPR, b); } + bool operator >= (const real_c_float &b) const { return cmp(GE_EXPR, b); } + bool operator > (const real_c_float &b) const { return cmp(GT_EXPR, b); } + + const char * str () const; + const char * hex () const; + long integer () const; + int exp () const; + void ldexp (int); + }; + + void + real_c_float::from_long (long l) + { + REAL_VALUE_TYPE f; + + real_from_integer (&f, MODE, l, l < 0 ? -1 : 0, 0); + real_to_target (image, &f, MODE); + } + + void + real_c_float::from_str (const char *s) + { + REAL_VALUE_TYPE f; + const char *p = s; + + if (*p == '-' || *p == '+') + p++; + if (strcasecmp(p, "inf") == 0) + { + real_inf (&f); + if (*s == '-') + real_arithmetic (&f, NEGATE_EXPR, &f, NULL); + } + else if (strcasecmp(p, "nan") == 0) + real_nan (&f, "", 1, MODE); + else + real_from_string (&f, s); + + real_to_target (image, &f, MODE); + } + + void + real_c_float::binop (int code, const real_c_float &b) + { + REAL_VALUE_TYPE ai, bi, ri; + + real_from_target (&ai, image, MODE); + real_from_target (&bi, b.image, MODE); + real_arithmetic (&ri, code, &ai, &bi); + real_to_target (image, &ri, MODE); + + if (verbose) + { + char ab[64], bb[64], rb[64]; + const real_format *fmt = real_format_for_mode[MODE - QFmode]; + const int digits = (fmt->p * fmt->log2_b + 3) / 4; + char symbol_for_code; + + real_from_target (&ri, image, MODE); + real_to_hexadecimal (ab, &ai, sizeof(ab), digits, 0); + real_to_hexadecimal (bb, &bi, sizeof(bb), digits, 0); + real_to_hexadecimal (rb, &ri, sizeof(rb), digits, 0); + + switch (code) + { + case PLUS_EXPR: + symbol_for_code = '+'; + break; + case MINUS_EXPR: + symbol_for_code = '-'; + break; + case MULT_EXPR: + symbol_for_code = '*'; + break; + case RDIV_EXPR: + symbol_for_code = '/'; + break; + default: + abort (); + } + + fprintf (stderr, "%6d: %s %c %s = %s\n", verbose_index++, + ab, symbol_for_code, bb, rb); + } + } + + void + real_c_float::unop (int code) + { + REAL_VALUE_TYPE ai, ri; + + real_from_target (&ai, image, MODE); + real_arithmetic (&ri, code, &ai, NULL); + real_to_target (image, &ri, MODE); + + if (verbose) + { + char ab[64], rb[64]; + const real_format *fmt = real_format_for_mode[MODE - QFmode]; + const int digits = (fmt->p * fmt->log2_b + 3) / 4; + const char *symbol_for_code; + + real_from_target (&ri, image, MODE); + real_to_hexadecimal (ab, &ai, sizeof(ab), digits, 0); + real_to_hexadecimal (rb, &ri, sizeof(rb), digits, 0); + + switch (code) + { + case NEGATE_EXPR: + symbol_for_code = "-"; + break; + case ABS_EXPR: + symbol_for_code = "abs "; + break; + default: + abort (); + } + + fprintf (stderr, "%6d: %s%s = %s\n", verbose_index++, + symbol_for_code, ab, rb); + } + } + + bool + real_c_float::cmp (int code, const real_c_float &b) const + { + REAL_VALUE_TYPE ai, bi; + bool ret; + + real_from_target (&ai, image, MODE); + real_from_target (&bi, b.image, MODE); + ret = real_compare (code, &ai, &bi); + + if (verbose) + { + char ab[64], bb[64]; + const real_format *fmt = real_format_for_mode[MODE - QFmode]; + const int digits = (fmt->p * fmt->log2_b + 3) / 4; + const char *symbol_for_code; + + real_to_hexadecimal (ab, &ai, sizeof(ab), digits, 0); + real_to_hexadecimal (bb, &bi, sizeof(bb), digits, 0); + + switch (code) + { + case LT_EXPR: + symbol_for_code = "<"; + break; + case LE_EXPR: + symbol_for_code = "<="; + break; + case EQ_EXPR: + symbol_for_code = "=="; + break; + case NE_EXPR: + symbol_for_code = "!="; + break; + case GE_EXPR: + symbol_for_code = ">="; + break; + case GT_EXPR: + symbol_for_code = ">"; + break; + default: + abort (); + } + + fprintf (stderr, "%6d: %s %s %s = %s\n", verbose_index++, + ab, symbol_for_code, bb, (ret ? "true" : "false")); + } + + return ret; + } + + const char * + real_c_float::str() const + { + REAL_VALUE_TYPE f; + const real_format *fmt = real_format_for_mode[MODE - QFmode]; + const int digits = int(fmt->p * fmt->log2_b * .30102999566398119521 + 1); + + real_from_target (&f, image, MODE); + char *buf = new char[digits + 10]; + real_to_decimal (buf, &f, digits+10, digits, 0); + + return buf; + } + + const char * + real_c_float::hex() const + { + REAL_VALUE_TYPE f; + const real_format *fmt = real_format_for_mode[MODE - QFmode]; + const int digits = (fmt->p * fmt->log2_b + 3) / 4; + + real_from_target (&f, image, MODE); + char *buf = new char[digits + 10]; + real_to_hexadecimal (buf, &f, digits+10, digits, 0); + + return buf; + } + + long + real_c_float::integer() const + { + REAL_VALUE_TYPE f; + real_from_target (&f, image, MODE); + return real_to_integer (&f); + } + + int + real_c_float::exp() const + { + REAL_VALUE_TYPE f; + real_from_target (&f, image, MODE); + return real_exponent (&f); + } + + void + real_c_float::ldexp (int exp) + { + REAL_VALUE_TYPE ai; + + real_from_target (&ai, image, MODE); + real_ldexp (&ai, &ai, exp); + real_to_target (image, &ai, MODE); + } + + /* ====================================================================== */ + /* An implementation of the abstract floating point class that uses native + arithmetic. Exists for reference and debugging. */ + + template + class native_float + { + private: + // Force intermediate results back to memory. + volatile T image; + + static T from_str (const char *); + static T do_abs (T); + static T verbose_binop (T, char, T, T); + static T verbose_unop (const char *, T, T); + static bool verbose_cmp (T, const char *, T, bool); + + public: + native_float() + { } + native_float(long l) + { image = l; } + native_float(const char *s) + { image = from_str(s); } + native_float(const native_float &b) + { image = b.image; } + + const native_float& operator= (long l) + { image = l; return *this; } + const native_float& operator= (const char *s) + { image = from_str(s); return *this; } + const native_float& operator= (const native_float &b) + { image = b.image; return *this; } + + const native_float& operator+= (const native_float &b) + { + image = verbose_binop(image, '+', b.image, image + b.image); + return *this; + } + const native_float& operator-= (const native_float &b) + { + image = verbose_binop(image, '-', b.image, image - b.image); + return *this; + } + const native_float& operator*= (const native_float &b) + { + image = verbose_binop(image, '*', b.image, image * b.image); + return *this; + } + const native_float& operator/= (const native_float &b) + { + image = verbose_binop(image, '/', b.image, image / b.image); + return *this; + } + + native_float operator- () const + { + native_float r; + r.image = verbose_unop("-", image, -image); + return r; + } + native_float abs () const + { + native_float r; + r.image = verbose_unop("abs ", image, do_abs(image)); + return r; + } + + bool operator < (const native_float &b) const + { return verbose_cmp(image, "<", b.image, image < b.image); } + bool operator <= (const native_float &b) const + { return verbose_cmp(image, "<=", b.image, image <= b.image); } + bool operator == (const native_float &b) const + { return verbose_cmp(image, "==", b.image, image == b.image); } + bool operator != (const native_float &b) const + { return verbose_cmp(image, "!=", b.image, image != b.image); } + bool operator >= (const native_float &b) const + { return verbose_cmp(image, ">=", b.image, image >= b.image); } + bool operator > (const native_float &b) const + { return verbose_cmp(image, ">", b.image, image > b.image); } + + const char * str () const; + const char * hex () const; + long integer () const + { return long(image); } + int exp () const; + void ldexp (int); + }; + + template + inline T + native_float::from_str (const char *s) + { + return strtold (s, NULL); + } + + template<> + inline float + native_float::from_str (const char *s) + { + return strtof (s, NULL); + } + + template<> + inline double + native_float::from_str (const char *s) + { + return strtod (s, NULL); + } + + template + inline T + native_float::do_abs (T image) + { + return fabsl (image); + } + + template<> + inline float + native_float::do_abs (float image) + { + return fabsf (image); + } + + template<> + inline double + native_float::do_abs (double image) + { + return fabs (image); + } + + template + T + native_float::verbose_binop (T a, char symbol, T b, T r) + { + if (verbose) + { + const int digits = int(sizeof(T) * CHAR_BIT / 4) - 1; + #ifdef NO_LONG_DOUBLE + fprintf (stderr, "%6d: %.*a %c %.*a = %.*a\n", verbose_index++, + digits, (double)a, symbol, + digits, (double)b, digits, (double)r); + #else + fprintf (stderr, "%6d: %.*La %c %.*La = %.*La\n", verbose_index++, + digits, (long double)a, symbol, + digits, (long double)b, digits, (long double)r); + #endif + } + return r; + } + + template + T + native_float::verbose_unop (const char *symbol, T a, T r) + { + if (verbose) + { + const int digits = int(sizeof(T) * CHAR_BIT / 4) - 1; + #ifdef NO_LONG_DOUBLE + fprintf (stderr, "%6d: %s%.*a = %.*a\n", verbose_index++, + symbol, digits, (double)a, digits, (double)r); + #else + fprintf (stderr, "%6d: %s%.*La = %.*La\n", verbose_index++, + symbol, digits, (long double)a, digits, (long double)r); + #endif + } + return r; + } + + template + bool + native_float::verbose_cmp (T a, const char *symbol, T b, bool r) + { + if (verbose) + { + const int digits = int(sizeof(T) * CHAR_BIT / 4) - 1; + #ifndef NO_LONG_DOUBLE + fprintf (stderr, "%6d: %.*a %s %.*a = %s\n", verbose_index++, + digits, (double)a, symbol, + digits, (double)b, (r ? "true" : "false")); + #else + fprintf (stderr, "%6d: %.*La %s %.*La = %s\n", verbose_index++, + digits, (long double)a, symbol, + digits, (long double)b, (r ? "true" : "false")); + #endif + } + return r; + } + + template + const char * + native_float::str() const + { + char *buf = new char[50]; + const int digits = int(sizeof(T) * CHAR_BIT * .30102999566398119521 + 1); + #ifndef NO_LONG_DOUBLE + sprintf (buf, "%.*e", digits - 1, (double) image); + #else + sprintf (buf, "%.*Le", digits - 1, (long double) image); + #endif + return buf; + } + + template + const char * + native_float::hex() const + { + char *buf = new char[50]; + const int digits = int(sizeof(T) * CHAR_BIT / 4); + #ifndef NO_LONG_DOUBLE + sprintf (buf, "%.*a", digits - 1, (double) image); + #else + sprintf (buf, "%.*La", digits - 1, (long double) image); + #endif + return buf; + } + + template + int + native_float::exp() const + { + int e; + frexp (image, &e); + return e; + } + + template + void + native_float::ldexp (int exp) + { + image = ldexpl (image, exp); + } + + template<> + void + native_float::ldexp (int exp) + { + image = ldexpf (image, exp); + } + + template<> + void + native_float::ldexp (int exp) + { + image = ::ldexp (image, exp); + } + + /* ====================================================================== */ + /* Some libm routines that Paranoia expects to be available. */ + + template + inline FLOAT + FABS (const FLOAT &f) + { + return f.abs(); + } + + template + inline FLOAT + operator+ (const FLOAT &a, const RHS &b) + { + return FLOAT(a) += FLOAT(b); + } + + template + inline FLOAT + operator- (const FLOAT &a, const RHS &b) + { + return FLOAT(a) -= FLOAT(b); + } + + template + inline FLOAT + operator* (const FLOAT &a, const RHS &b) + { + return FLOAT(a) *= FLOAT(b); + } + + template + inline FLOAT + operator/ (const FLOAT &a, const RHS &b) + { + return FLOAT(a) /= FLOAT(b); + } + + template + FLOAT + FLOOR (const FLOAT &f) + { + /* ??? This is only correct when F is representable as an integer. */ + long i = f.integer(); + FLOAT r; + + r = i; + if (i < 0 && f != r) + r = i - 1; + + return r; + } + + template + FLOAT + SQRT (const FLOAT &f) + { + #if 0 + FLOAT zero = long(0); + FLOAT two = 2; + FLOAT one = 1; + FLOAT diff, diff2; + FLOAT z, t; + + if (f == zero) + return zero; + if (f < zero) + return zero / zero; + if (f == one) + return f; + + z = f; + z.ldexp (-f.exp() / 2); + + diff2 = FABS (z * z - f); + if (diff2 > zero) + while (1) + { + t = (f / (two * z)) + (z / two); + diff = FABS (t * t - f); + if (diff >= diff2) + break; + z = t; + diff2 = diff; + } + + return z; + #elif defined(NO_LONG_DOUBLE) + double d; + char buf[64]; + + d = strtod (f.hex(), NULL); + d = sqrt (d); + sprintf(buf, "%.35a", d); + + return FLOAT(buf); + #else + long double ld; + char buf[64]; + + ld = strtold (f.hex(), NULL); + ld = sqrtl (ld); + sprintf(buf, "%.35La", ld); + + return FLOAT(buf); + #endif + } + + template + FLOAT + LOG (FLOAT x) + { + #if 0 + FLOAT zero = long(0); + FLOAT one = 1; + + if (x <= zero) + return zero / zero; + if (x == one) + return zero; + + int exp = x.exp() - 1; + x.ldexp(-exp); + + FLOAT xm1 = x - one; + FLOAT y = xm1; + long n = 2; + + FLOAT sum = xm1; + while (1) + { + y *= xm1; + FLOAT term = y / FLOAT (n); + FLOAT next = sum + term; + if (next == sum) + break; + sum = next; + if (++n == 1000) + break; + } + + if (exp) + sum += FLOAT (exp) * FLOAT(".69314718055994530941"); + + return sum; + #elif defined (NO_LONG_DOUBLE) + double d; + char buf[64]; + + d = strtod (x.hex(), NULL); + d = log (d); + sprintf(buf, "%.35a", d); + + return FLOAT(buf); + #else + long double ld; + char buf[64]; + + ld = strtold (x.hex(), NULL); + ld = logl (ld); + sprintf(buf, "%.35La", ld); + + return FLOAT(buf); + #endif + } + + template + FLOAT + EXP (const FLOAT &x) + { + /* Cheat. */ + #ifdef NO_LONG_DOUBLE + double d; + char buf[64]; + + d = strtod (x.hex(), NULL); + d = exp (d); + sprintf(buf, "%.35a", d); + + return FLOAT(buf); + #else + long double ld; + char buf[64]; + + ld = strtold (x.hex(), NULL); + ld = expl (ld); + sprintf(buf, "%.35La", ld); + + return FLOAT(buf); + #endif + } + + template + FLOAT + POW (const FLOAT &base, const FLOAT &exp) + { + /* Cheat. */ + #ifdef NO_LONG_DOUBLE + double d1, d2; + char buf[64]; + + d1 = strtod (base.hex(), NULL); + d2 = strtod (exp.hex(), NULL); + d1 = pow (d1, d2); + sprintf(buf, "%.35a", d1); + + return FLOAT(buf); + #else + long double ld1, ld2; + char buf[64]; + + ld1 = strtold (base.hex(), NULL); + ld2 = strtold (exp.hex(), NULL); + ld1 = powl (ld1, ld2); + sprintf(buf, "%.35La", ld1); + + return FLOAT(buf); + #endif + } + + /* ====================================================================== */ + /* Real Paranoia begins again here. We wrap the thing in a template so + that we can instantiate it for each floating point type we care for. */ + + int NoTrials = 20; /*Number of tests for commutativity. */ + bool do_pause = false; + + enum Guard { No, Yes }; + enum Rounding { Other, Rounded, Chopped }; + enum Class { Failure, Serious, Defect, Flaw }; + + template + struct Paranoia + { + FLOAT Radix, BInvrse, RadixD2, BMinusU2; + + /* Small floating point constants. */ + FLOAT Zero; + FLOAT Half; + FLOAT One; + FLOAT Two; + FLOAT Three; + FLOAT Four; + FLOAT Five; + FLOAT Eight; + FLOAT Nine; + FLOAT TwentySeven; + FLOAT ThirtyTwo; + FLOAT TwoForty; + FLOAT MinusOne; + FLOAT OneAndHalf; + + /* Declarations of Variables. */ + int Indx; + char ch[8]; + FLOAT AInvrse, A1; + FLOAT C, CInvrse; + FLOAT D, FourD; + FLOAT E0, E1, Exp2, E3, MinSqEr; + FLOAT SqEr, MaxSqEr, E9; + FLOAT Third; + FLOAT F6, F9; + FLOAT H, HInvrse; + int I; + FLOAT StickyBit, J; + FLOAT MyZero; + FLOAT Precision; + FLOAT Q, Q9; + FLOAT R, Random9; + FLOAT T, Underflow, S; + FLOAT OneUlp, UfThold, U1, U2; + FLOAT V, V0, V9; + FLOAT W; + FLOAT X, X1, X2, X8, Random1; + FLOAT Y, Y1, Y2, Random2; + FLOAT Z, PseudoZero, Z1, Z2, Z9; + int ErrCnt[4]; + int Milestone; + int PageNo; + int M, N, N1; + Guard GMult, GDiv, GAddSub; + Rounding RMult, RDiv, RAddSub, RSqrt; + int Break, Done, NotMonot, Monot, Anomaly, IEEE, SqRWrng, UfNGrad; + + /* Computed constants. */ + /*U1 gap below 1.0, i.e, 1.0-U1 is next number below 1.0 */ + /*U2 gap above 1.0, i.e, 1.0+U2 is next number above 1.0 */ + + int main (); + + FLOAT Sign (FLOAT); + FLOAT Random (); + void Pause (); + void BadCond (int, const char *); + void SqXMinX (int); + void TstCond (int, int, const char *); + void notify (const char *); + void IsYeqX (); + void NewD (); + void PrintIfNPositive (); + void SR3750 (); + void TstPtUf (); + + // Pretend we're bss. + Paranoia() { memset(this, 0, sizeof (*this)); } + }; + + template + int + Paranoia::main() + { + /* First two assignments use integer right-hand sides. */ + Zero = long(0); + One = long(1); + Two = long(2); + Three = long(3); + Four = long(4); + Five = long(5); + Eight = long(8); + Nine = long(9); + TwentySeven = long(27); + ThirtyTwo = long(32); + TwoForty = long(240); + MinusOne = long(-1); + Half = "0x1p-1"; + OneAndHalf = "0x3p-1"; + ErrCnt[Failure] = 0; + ErrCnt[Serious] = 0; + ErrCnt[Defect] = 0; + ErrCnt[Flaw] = 0; + PageNo = 1; + /*=============================================*/ + Milestone = 7; + /*=============================================*/ + printf ("Program is now RUNNING tests on small integers:\n"); + + TstCond (Failure, (Zero + Zero == Zero), "0+0 != 0"); + TstCond (Failure, (One - One == Zero), "1-1 != 0"); + TstCond (Failure, (One > Zero), "1 <= 0"); + TstCond (Failure, (One + One == Two), "1+1 != 2"); + + Z = -Zero; + if (Z != Zero) + { + ErrCnt[Failure] = ErrCnt[Failure] + 1; + printf ("Comparison alleges that -0.0 is Non-zero!\n"); + U2 = "0.001"; + Radix = 1; + TstPtUf (); + } + + TstCond (Failure, (Three == Two + One), "3 != 2+1"); + TstCond (Failure, (Four == Three + One), "4 != 3+1"); + TstCond (Failure, (Four + Two * (-Two) == Zero), "4 + 2*(-2) != 0"); + TstCond (Failure, (Four - Three - One == Zero), "4-3-1 != 0"); + + TstCond (Failure, (MinusOne == (Zero - One)), "-1 != 0-1"); + TstCond (Failure, (MinusOne + One == Zero), "-1+1 != 0"); + TstCond (Failure, (One + MinusOne == Zero), "1+(-1) != 0"); + TstCond (Failure, (MinusOne + FABS (One) == Zero), "-1+abs(1) != 0"); + TstCond (Failure, (MinusOne + MinusOne * MinusOne == Zero), + "-1+(-1)*(-1) != 0"); + + TstCond (Failure, Half + MinusOne + Half == Zero, "1/2 + (-1) + 1/2 != 0"); + + /*=============================================*/ + Milestone = 10; + /*=============================================*/ + + TstCond (Failure, (Nine == Three * Three), "9 != 3*3"); + TstCond (Failure, (TwentySeven == Nine * Three), "27 != 9*3"); + TstCond (Failure, (Eight == Four + Four), "8 != 4+4"); + TstCond (Failure, (ThirtyTwo == Eight * Four), "32 != 8*4"); + TstCond (Failure, (ThirtyTwo - TwentySeven - Four - One == Zero), + "32-27-4-1 != 0"); + + TstCond (Failure, Five == Four + One, "5 != 4+1"); + TstCond (Failure, TwoForty == Four * Five * Three * Four, "240 != 4*5*3*4"); + TstCond (Failure, TwoForty / Three - Four * Four * Five == Zero, + "240/3 - 4*4*5 != 0"); + TstCond (Failure, TwoForty / Four - Five * Three * Four == Zero, + "240/4 - 5*3*4 != 0"); + TstCond (Failure, TwoForty / Five - Four * Three * Four == Zero, + "240/5 - 4*3*4 != 0"); + + if (ErrCnt[Failure] == 0) + { + printf ("-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 are O.K.\n"); + printf ("\n"); + } + printf ("Searching for Radix and Precision.\n"); + W = One; + do + { + W = W + W; + Y = W + One; + Z = Y - W; + Y = Z - One; + } + while (MinusOne + FABS (Y) < Zero); + /*.. now W is just big enough that |((W+1)-W)-1| >= 1 ... */ + Precision = Zero; + Y = One; + do + { + Radix = W + Y; + Y = Y + Y; + Radix = Radix - W; + } + while (Radix == Zero); + if (Radix < Two) + Radix = One; + printf ("Radix = %s .\n", Radix.str()); + if (Radix != One) + { + W = One; + do + { + Precision = Precision + One; + W = W * Radix; + Y = W + One; + } + while ((Y - W) == One); + } + /*... now W == Radix^Precision is barely too big to satisfy (W+1)-W == 1 + ... */ + U1 = One / W; + U2 = Radix * U1; + printf ("Closest relative separation found is U1 = %s .\n\n", U1.str()); + printf ("Recalculating radix and precision\n "); + + /*save old values */ + E0 = Radix; + E1 = U1; + E9 = U2; + E3 = Precision; + + X = Four / Three; + Third = X - One; + F6 = Half - Third; + X = F6 + F6; + X = FABS (X - Third); + if (X < U2) + X = U2; + + /*... now X = (unknown no.) ulps of 1+... */ + do + { + U2 = X; + Y = Half * U2 + ThirtyTwo * U2 * U2; + Y = One + Y; + X = Y - One; + } + while (!((U2 <= X) || (X <= Zero))); + + /*... now U2 == 1 ulp of 1 + ... */ + X = Two / Three; + F6 = X - Half; + Third = F6 + F6; + X = Third - Half; + X = FABS (X + F6); + if (X < U1) + X = U1; + + /*... now X == (unknown no.) ulps of 1 -... */ + do + { + U1 = X; + Y = Half * U1 + ThirtyTwo * U1 * U1; + Y = Half - Y; + X = Half + Y; + Y = Half - X; + X = Half + Y; + } + while (!((U1 <= X) || (X <= Zero))); + /*... now U1 == 1 ulp of 1 - ... */ + if (U1 == E1) + printf ("confirms closest relative separation U1 .\n"); + else + printf ("gets better closest relative separation U1 = %s .\n", U1.str()); + W = One / U1; + F9 = (Half - U1) + Half; + + Radix = FLOOR (FLOAT ("0.01") + U2 / U1); + if (Radix == E0) + printf ("Radix confirmed.\n"); + else + printf ("MYSTERY: recalculated Radix = %s .\n", Radix.str()); + TstCond (Defect, Radix <= Eight + Eight, + "Radix is too big: roundoff problems"); + TstCond (Flaw, (Radix == Two) || (Radix == 10) + || (Radix == One), "Radix is not as good as 2 or 10"); + /*=============================================*/ + Milestone = 20; + /*=============================================*/ + TstCond (Failure, F9 - Half < Half, + "(1-U1)-1/2 < 1/2 is FALSE, prog. fails?"); + X = F9; + I = 1; + Y = X - Half; + Z = Y - Half; + TstCond (Failure, (X != One) + || (Z == Zero), "Comparison is fuzzy,X=1 but X-1/2-1/2 != 0"); + X = One + U2; + I = 0; + /*=============================================*/ + Milestone = 25; + /*=============================================*/ + /*... BMinusU2 = nextafter(Radix, 0) */ + BMinusU2 = Radix - One; + BMinusU2 = (BMinusU2 - U2) + One; + /* Purify Integers */ + if (Radix != One) + { + X = -TwoForty * LOG (U1) / LOG (Radix); + Y = FLOOR (Half + X); + if (FABS (X - Y) * Four < One) + X = Y; + Precision = X / TwoForty; + Y = FLOOR (Half + Precision); + if (FABS (Precision - Y) * TwoForty < Half) + Precision = Y; + } + if ((Precision != FLOOR (Precision)) || (Radix == One)) + { + printf ("Precision cannot be characterized by an Integer number\n"); + printf + ("of significant digits but, by itself, this is a minor flaw.\n"); + } + if (Radix == One) + printf + ("logarithmic encoding has precision characterized solely by U1.\n"); + else + printf ("The number of significant digits of the Radix is %s .\n", + Precision.str()); + TstCond (Serious, U2 * Nine * Nine * TwoForty < One, + "Precision worse than 5 decimal figures "); + /*=============================================*/ + Milestone = 30; + /*=============================================*/ + /* Test for extra-precise subexpressions */ + X = FABS (((Four / Three - One) - One / Four) * Three - One / Four); + do + { + Z2 = X; + X = (One + (Half * Z2 + ThirtyTwo * Z2 * Z2)) - One; + } + while (!((Z2 <= X) || (X <= Zero))); + X = Y = Z = FABS ((Three / Four - Two / Three) * Three - One / Four); + do + { + Z1 = Z; + Z = (One / Two - ((One / Two - (Half * Z1 + ThirtyTwo * Z1 * Z1)) + + One / Two)) + One / Two; + } + while (!((Z1 <= Z) || (Z <= Zero))); + do + { + do + { + Y1 = Y; + Y = + (Half - ((Half - (Half * Y1 + ThirtyTwo * Y1 * Y1)) + Half)) + + Half; + } + while (!((Y1 <= Y) || (Y <= Zero))); + X1 = X; + X = ((Half * X1 + ThirtyTwo * X1 * X1) - F9) + F9; + } + while (!((X1 <= X) || (X <= Zero))); + if ((X1 != Y1) || (X1 != Z1)) + { + BadCond (Serious, "Disagreements among the values X1, Y1, Z1,\n"); + printf ("respectively %s, %s, %s,\n", X1.str(), Y1.str(), Z1.str()); + printf ("are symptoms of inconsistencies introduced\n"); + printf ("by extra-precise evaluation of arithmetic subexpressions.\n"); + notify ("Possibly some part of this"); + if ((X1 == U1) || (Y1 == U1) || (Z1 == U1)) + printf ("That feature is not tested further by this program.\n"); + } + else + { + if ((Z1 != U1) || (Z2 != U2)) + { + if ((Z1 >= U1) || (Z2 >= U2)) + { + BadCond (Failure, ""); + notify ("Precision"); + printf ("\tU1 = %s, Z1 - U1 = %s\n", U1.str(), (Z1 - U1).str()); + printf ("\tU2 = %s, Z2 - U2 = %s\n", U2.str(), (Z2 - U2).str()); + } + else + { + if ((Z1 <= Zero) || (Z2 <= Zero)) + { + printf ("Because of unusual Radix = %s", Radix.str()); + printf (", or exact rational arithmetic a result\n"); + printf ("Z1 = %s, or Z2 = %s ", Z1.str(), Z2.str()); + notify ("of an\nextra-precision"); + } + if (Z1 != Z2 || Z1 > Zero) + { + X = Z1 / U1; + Y = Z2 / U2; + if (Y > X) + X = Y; + Q = -LOG (X); + printf ("Some subexpressions appear to be calculated " + "extra precisely\n"); + printf ("with about %s extra B-digits, i.e.\n", + (Q / LOG (Radix)).str()); + printf ("roughly %s extra significant decimals.\n", + (Q / LOG (FLOAT (10))).str()); + } + printf + ("That feature is not tested further by this program.\n"); + } + } + } + Pause (); + /*=============================================*/ + Milestone = 35; + /*=============================================*/ + if (Radix >= Two) + { + X = W / (Radix * Radix); + Y = X + One; + Z = Y - X; + T = Z + U2; + X = T - Z; + TstCond (Failure, X == U2, + "Subtraction is not normalized X=Y,X+Z != Y+Z!"); + if (X == U2) + printf ("Subtraction appears to be normalized, as it should be."); + } + printf ("\nChecking for guard digit in *, /, and -.\n"); + Y = F9 * One; + Z = One * F9; + X = F9 - Half; + Y = (Y - Half) - X; + Z = (Z - Half) - X; + X = One + U2; + T = X * Radix; + R = Radix * X; + X = T - Radix; + X = X - Radix * U2; + T = R - Radix; + T = T - Radix * U2; + X = X * (Radix - One); + T = T * (Radix - One); + if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero)) + GMult = Yes; + else + { + GMult = No; + TstCond (Serious, false, "* lacks a Guard Digit, so 1*X != X"); + } + Z = Radix * U2; + X = One + Z; + Y = FABS ((X + Z) - X * X) - U2; + X = One - U2; + Z = FABS ((X - U2) - X * X) - U1; + TstCond (Failure, (Y <= Zero) + && (Z <= Zero), "* gets too many final digits wrong.\n"); + Y = One - U2; + X = One + U2; + Z = One / Y; + Y = Z - X; + X = One / Three; + Z = Three / Nine; + X = X - Z; + T = Nine / TwentySeven; + Z = Z - T; + TstCond (Defect, X == Zero && Y == Zero && Z == Zero, + "Division lacks a Guard Digit, so error can exceed 1 ulp\n" + "or 1/3 and 3/9 and 9/27 may disagree"); + Y = F9 / One; + X = F9 - Half; + Y = (Y - Half) - X; + X = One + U2; + T = X / One; + X = T - X; + if ((X == Zero) && (Y == Zero) && (Z == Zero)) + GDiv = Yes; + else + { + GDiv = No; + TstCond (Serious, false, "Division lacks a Guard Digit, so X/1 != X"); + } + X = One / (One + U2); + Y = X - Half - Half; + TstCond (Serious, Y < Zero, "Computed value of 1/1.000..1 >= 1"); + X = One - U2; + Y = One + Radix * U2; + Z = X * Radix; + T = Y * Radix; + R = Z / Radix; + StickyBit = T / Radix; + X = R - X; + Y = StickyBit - Y; + TstCond (Failure, X == Zero && Y == Zero, + "* and/or / gets too many last digits wrong"); + Y = One - U1; + X = One - F9; + Y = One - Y; + T = Radix - U2; + Z = Radix - BMinusU2; + T = Radix - T; + if ((X == U1) && (Y == U1) && (Z == U2) && (T == U2)) + GAddSub = Yes; + else + { + GAddSub = No; + TstCond (Serious, false, + "- lacks Guard Digit, so cancellation is obscured"); + } + if (F9 != One && F9 - One >= Zero) + { + BadCond (Serious, "comparison alleges (1-U1) < 1 although\n"); + printf (" subtraction yields (1-U1) - 1 = 0 , thereby vitiating\n"); + printf (" such precautions against division by zero as\n"); + printf (" ... if (X == 1.0) {.....} else {.../(X-1.0)...}\n"); + } + if (GMult == Yes && GDiv == Yes && GAddSub == Yes) + printf + (" *, /, and - appear to have guard digits, as they should.\n"); + /*=============================================*/ + Milestone = 40; + /*=============================================*/ + Pause (); + printf ("Checking rounding on multiply, divide and add/subtract.\n"); + RMult = Other; + RDiv = Other; + RAddSub = Other; + RadixD2 = Radix / Two; + A1 = Two; + Done = false; + do + { + AInvrse = Radix; + do + { + X = AInvrse; + AInvrse = AInvrse / A1; + } + while (!(FLOOR (AInvrse) != AInvrse)); + Done = (X == One) || (A1 > Three); + if (!Done) + A1 = Nine + One; + } + while (!(Done)); + if (X == One) + A1 = Radix; + AInvrse = One / A1; + X = A1; + Y = AInvrse; + Done = false; + do + { + Z = X * Y - Half; + TstCond (Failure, Z == Half, "X * (1/X) differs from 1"); + Done = X == Radix; + X = Radix; + Y = One / X; + } + while (!(Done)); + Y2 = One + U2; + Y1 = One - U2; + X = OneAndHalf - U2; + Y = OneAndHalf + U2; + Z = (X - U2) * Y2; + T = Y * Y1; + Z = Z - X; + T = T - X; + X = X * Y2; + Y = (Y + U2) * Y1; + X = X - OneAndHalf; + Y = Y - OneAndHalf; + if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T <= Zero)) + { + X = (OneAndHalf + U2) * Y2; + Y = OneAndHalf - U2 - U2; + Z = OneAndHalf + U2 + U2; + T = (OneAndHalf - U2) * Y1; + X = X - (Z + U2); + StickyBit = Y * Y1; + S = Z * Y2; + T = T - Y; + Y = (U2 - Y) + StickyBit; + Z = S - (Z + U2 + U2); + StickyBit = (Y2 + U2) * Y1; + Y1 = Y2 * Y1; + StickyBit = StickyBit - Y2; + Y1 = Y1 - Half; + if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero) + && (StickyBit == Zero) && (Y1 == Half)) + { + RMult = Rounded; + printf ("Multiplication appears to round correctly.\n"); + } + else if ((X + U2 == Zero) && (Y < Zero) && (Z + U2 == Zero) + && (T < Zero) && (StickyBit + U2 == Zero) && (Y1 < Half)) + { + RMult = Chopped; + printf ("Multiplication appears to chop.\n"); + } + else + printf ("* is neither chopped nor correctly rounded.\n"); + if ((RMult == Rounded) && (GMult == No)) + notify ("Multiplication"); + } + else + printf ("* is neither chopped nor correctly rounded.\n"); + /*=============================================*/ + Milestone = 45; + /*=============================================*/ + Y2 = One + U2; + Y1 = One - U2; + Z = OneAndHalf + U2 + U2; + X = Z / Y2; + T = OneAndHalf - U2 - U2; + Y = (T - U2) / Y1; + Z = (Z + U2) / Y2; + X = X - OneAndHalf; + Y = Y - T; + T = T / Y1; + Z = Z - (OneAndHalf + U2); + T = (U2 - OneAndHalf) + T; + if (!((X > Zero) || (Y > Zero) || (Z > Zero) || (T > Zero))) + { + X = OneAndHalf / Y2; + Y = OneAndHalf - U2; + Z = OneAndHalf + U2; + X = X - Y; + T = OneAndHalf / Y1; + Y = Y / Y1; + T = T - (Z + U2); + Y = Y - Z; + Z = Z / Y2; + Y1 = (Y2 + U2) / Y2; + Z = Z - OneAndHalf; + Y2 = Y1 - Y2; + Y1 = (F9 - U1) / F9; + if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero) + && (Y2 == Zero) && (Y2 == Zero) && (Y1 - Half == F9 - Half)) + { + RDiv = Rounded; + printf ("Division appears to round correctly.\n"); + if (GDiv == No) + notify ("Division"); + } + else if ((X < Zero) && (Y < Zero) && (Z < Zero) && (T < Zero) + && (Y2 < Zero) && (Y1 - Half < F9 - Half)) + { + RDiv = Chopped; + printf ("Division appears to chop.\n"); + } + } + if (RDiv == Other) + printf ("/ is neither chopped nor correctly rounded.\n"); + BInvrse = One / Radix; + TstCond (Failure, (BInvrse * Radix - Half == Half), + "Radix * ( 1 / Radix ) differs from 1"); + /*=============================================*/ + Milestone = 50; + /*=============================================*/ + TstCond (Failure, ((F9 + U1) - Half == Half) + && ((BMinusU2 + U2) - One == Radix - One), + "Incomplete carry-propagation in Addition"); + X = One - U1 * U1; + Y = One + U2 * (One - U2); + Z = F9 - Half; + X = (X - Half) - Z; + Y = Y - One; + if ((X == Zero) && (Y == Zero)) + { + RAddSub = Chopped; + printf ("Add/Subtract appears to be chopped.\n"); + } + if (GAddSub == Yes) + { + X = (Half + U2) * U2; + Y = (Half - U2) * U2; + X = One + X; + Y = One + Y; + X = (One + U2) - X; + Y = One - Y; + if ((X == Zero) && (Y == Zero)) + { + X = (Half + U2) * U1; + Y = (Half - U2) * U1; + X = One - X; + Y = One - Y; + X = F9 - X; + Y = One - Y; + if ((X == Zero) && (Y == Zero)) + { + RAddSub = Rounded; + printf ("Addition/Subtraction appears to round correctly.\n"); + if (GAddSub == No) + notify ("Add/Subtract"); + } + else + printf ("Addition/Subtraction neither rounds nor chops.\n"); + } + else + printf ("Addition/Subtraction neither rounds nor chops.\n"); + } + else + printf ("Addition/Subtraction neither rounds nor chops.\n"); + S = One; + X = One + Half * (One + Half); + Y = (One + U2) * Half; + Z = X - Y; + T = Y - X; + StickyBit = Z + T; + if (StickyBit != Zero) + { + S = Zero; + BadCond (Flaw, "(X - Y) + (Y - X) is non zero!\n"); + } + StickyBit = Zero; + if ((GMult == Yes) && (GDiv == Yes) && (GAddSub == Yes) + && (RMult == Rounded) && (RDiv == Rounded) + && (RAddSub == Rounded) && (FLOOR (RadixD2) == RadixD2)) + { + printf ("Checking for sticky bit.\n"); + X = (Half + U1) * U2; + Y = Half * U2; + Z = One + Y; + T = One + X; + if ((Z - One <= Zero) && (T - One >= U2)) + { + Z = T + Y; + Y = Z - X; + if ((Z - T >= U2) && (Y - T == Zero)) + { + X = (Half + U1) * U1; + Y = Half * U1; + Z = One - Y; + T = One - X; + if ((Z - One == Zero) && (T - F9 == Zero)) + { + Z = (Half - U1) * U1; + T = F9 - Z; + Q = F9 - Y; + if ((T - F9 == Zero) && (F9 - U1 - Q == Zero)) + { + Z = (One + U2) * OneAndHalf; + T = (OneAndHalf + U2) - Z + U2; + X = One + Half / Radix; + Y = One + Radix * U2; + Z = X * Y; + if (T == Zero && X + Radix * U2 - Z == Zero) + { + if (Radix != Two) + { + X = Two + U2; + Y = X / Two; + if ((Y - One == Zero)) + StickyBit = S; + } + else + StickyBit = S; + } + } + } + } + } + } + if (StickyBit == One) + printf ("Sticky bit apparently used correctly.\n"); + else + printf ("Sticky bit used incorrectly or not at all.\n"); + TstCond (Flaw, !(GMult == No || GDiv == No || GAddSub == No || + RMult == Other || RDiv == Other || RAddSub == Other), + "lack(s) of guard digits or failure(s) to correctly round or chop\n\ + (noted above) count as one flaw in the final tally below"); + /*=============================================*/ + Milestone = 60; + /*=============================================*/ + printf ("\n"); + printf ("Does Multiplication commute? "); + printf ("Testing on %d random pairs.\n", NoTrials); + Random9 = SQRT (FLOAT (3)); + Random1 = Third; + I = 1; + do + { + X = Random (); + Y = Random (); + Z9 = Y * X; + Z = X * Y; + Z9 = Z - Z9; + I = I + 1; + } + while (!((I > NoTrials) || (Z9 != Zero))); + if (I == NoTrials) + { + Random1 = One + Half / Three; + Random2 = (U2 + U1) + One; + Z = Random1 * Random2; + Y = Random2 * Random1; + Z9 = (One + Half / Three) * ((U2 + U1) + One) - (One + Half / + Three) * ((U2 + U1) + + One); + } + if (!((I == NoTrials) || (Z9 == Zero))) + BadCond (Defect, "X * Y == Y * X trial fails.\n"); + else + printf (" No failures found in %d integer pairs.\n", NoTrials); + /*=============================================*/ + Milestone = 70; + /*=============================================*/ + printf ("\nRunning test of square root(x).\n"); + TstCond (Failure, (Zero == SQRT (Zero)) + && (-Zero == SQRT (-Zero)) + && (One == SQRT (One)), "Square root of 0.0, -0.0 or 1.0 wrong"); + MinSqEr = Zero; + MaxSqEr = Zero; + J = Zero; + X = Radix; + OneUlp = U2; + SqXMinX (Serious); + X = BInvrse; + OneUlp = BInvrse * U1; + SqXMinX (Serious); + X = U1; + OneUlp = U1 * U1; + SqXMinX (Serious); + if (J != Zero) + Pause (); + printf ("Testing if sqrt(X * X) == X for %d Integers X.\n", NoTrials); + J = Zero; + X = Two; + Y = Radix; + if ((Radix != One)) + do + { + X = Y; + Y = Radix * Y; + } + while (!((Y - X >= NoTrials))); + OneUlp = X * U2; + I = 1; + while (I <= NoTrials) + { + X = X + One; + SqXMinX (Defect); + if (J > Zero) + break; + I = I + 1; + } + printf ("Test for sqrt monotonicity.\n"); + I = -1; + X = BMinusU2; + Y = Radix; + Z = Radix + Radix * U2; + NotMonot = false; + Monot = false; + while (!(NotMonot || Monot)) + { + I = I + 1; + X = SQRT (X); + Q = SQRT (Y); + Z = SQRT (Z); + if ((X > Q) || (Q > Z)) + NotMonot = true; + else + { + Q = FLOOR (Q + Half); + if (!(I > 0 || Radix == Q * Q)) + Monot = true; + else if (I > 0) + { + if (I > 1) + Monot = true; + else + { + Y = Y * BInvrse; + X = Y - U1; + Z = Y + U1; + } + } + else + { + Y = Q; + X = Y - U2; + Z = Y + U2; + } + } + } + if (Monot) + printf ("sqrt has passed a test for Monotonicity.\n"); + else + { + BadCond (Defect, ""); + printf ("sqrt(X) is non-monotonic for X near %s .\n", Y.str()); + } + /*=============================================*/ + Milestone = 110; + /*=============================================*/ + printf ("Seeking Underflow thresholds UfThold and E0.\n"); + D = U1; + if (Precision != FLOOR (Precision)) + { + D = BInvrse; + X = Precision; + do + { + D = D * BInvrse; + X = X - One; + } + while (X > Zero); + } + Y = One; + Z = D; + /* ... D is power of 1/Radix < 1. */ + do + { + C = Y; + Y = Z; + Z = Y * Y; + } + while ((Y > Z) && (Z + Z > Z)); + Y = C; + Z = Y * D; + do + { + C = Y; + Y = Z; + Z = Y * D; + } + while ((Y > Z) && (Z + Z > Z)); + if (Radix < Two) + HInvrse = Two; + else + HInvrse = Radix; + H = One / HInvrse; + /* ... 1/HInvrse == H == Min(1/Radix, 1/2) */ + CInvrse = One / C; + E0 = C; + Z = E0 * H; + /* ...1/Radix^(BIG Integer) << 1 << CInvrse == 1/C */ + do + { + Y = E0; + E0 = Z; + Z = E0 * H; + } + while ((E0 > Z) && (Z + Z > Z)); + UfThold = E0; + E1 = Zero; + Q = Zero; + E9 = U2; + S = One + E9; + D = C * S; + if (D <= C) + { + E9 = Radix * U2; + S = One + E9; + D = C * S; + if (D <= C) + { + BadCond (Failure, + "multiplication gets too many last digits wrong.\n"); + Underflow = E0; + Y1 = Zero; + PseudoZero = Z; + Pause (); + } + } + else + { + Underflow = D; + PseudoZero = Underflow * H; + UfThold = Zero; + do + { + Y1 = Underflow; + Underflow = PseudoZero; + if (E1 + E1 <= E1) + { + Y2 = Underflow * HInvrse; + E1 = FABS (Y1 - Y2); + Q = Y1; + if ((UfThold == Zero) && (Y1 != Y2)) + UfThold = Y1; + } + PseudoZero = PseudoZero * H; + } + while ((Underflow > PseudoZero) + && (PseudoZero + PseudoZero > PseudoZero)); + } + /* Comment line 4530 .. 4560 */ + if (PseudoZero != Zero) + { + printf ("\n"); + Z = PseudoZero; + /* ... Test PseudoZero for "phoney- zero" violates */ + /* ... PseudoZero < Underflow or PseudoZero < PseudoZero + PseudoZero + ... */ + if (PseudoZero <= Zero) + { + BadCond (Failure, "Positive expressions can underflow to an\n"); + printf ("allegedly negative value\n"); + printf ("PseudoZero that prints out as: %s .\n", PseudoZero.str()); + X = -PseudoZero; + if (X <= Zero) + { + printf ("But -PseudoZero, which should be\n"); + printf ("positive, isn't; it prints out as %s .\n", X.str()); + } + } + else + { + BadCond (Flaw, "Underflow can stick at an allegedly positive\n"); + printf ("value PseudoZero that prints out as %s .\n", + PseudoZero.str()); + } + TstPtUf (); + } + /*=============================================*/ + Milestone = 120; + /*=============================================*/ + if (CInvrse * Y > CInvrse * Y1) + { + S = H * S; + E0 = Underflow; + } + if (!((E1 == Zero) || (E1 == E0))) + { + BadCond (Defect, ""); + if (E1 < E0) + { + printf ("Products underflow at a higher"); + printf (" threshold than differences.\n"); + if (PseudoZero == Zero) + E0 = E1; + } + else + { + printf ("Difference underflows at a higher"); + printf (" threshold than products.\n"); + } + } + printf ("Smallest strictly positive number found is E0 = %s .\n", E0.str()); + Z = E0; + TstPtUf (); + Underflow = E0; + if (N == 1) + Underflow = Y; + I = 4; + if (E1 == Zero) + I = 3; + if (UfThold == Zero) + I = I - 2; + UfNGrad = true; + switch (I) + { + case 1: + UfThold = Underflow; + if ((CInvrse * Q) != ((CInvrse * Y) * S)) + { + UfThold = Y; + BadCond (Failure, "Either accuracy deteriorates as numbers\n"); + printf ("approach a threshold = %s\n", UfThold.str()); + printf (" coming down from %s\n", C.str()); + printf + (" or else multiplication gets too many last digits wrong.\n"); + } + Pause (); + break; + + case 2: + BadCond (Failure, + "Underflow confuses Comparison, which alleges that\n"); + printf ("Q == Y while denying that |Q - Y| == 0; these values\n"); + printf ("print out as Q = %s, Y = %s .\n", Q.str(), Y2.str()); + printf ("|Q - Y| = %s .\n", FABS (Q - Y2).str()); + UfThold = Q; + break; + + case 3: + X = X; + break; + + case 4: + if ((Q == UfThold) && (E1 == E0) && (FABS (UfThold - E1 / E9) <= E1)) + { + UfNGrad = false; + printf ("Underflow is gradual; it incurs Absolute Error =\n"); + printf ("(roundoff in UfThold) < E0.\n"); + Y = E0 * CInvrse; + Y = Y * (OneAndHalf + U2); + X = CInvrse * (One + U2); + Y = Y / X; + IEEE = (Y == E0); + } + } + if (UfNGrad) + { + printf ("\n"); + if (setjmp (ovfl_buf)) + { + printf ("Underflow / UfThold failed!\n"); + R = H + H; + } + else + R = SQRT (Underflow / UfThold); + if (R <= H) + { + Z = R * UfThold; + X = Z * (One + R * H * (One + H)); + } + else + { + Z = UfThold; + X = Z * (One + H * H * (One + H)); + } + if (!((X == Z) || (X - Z != Zero))) + { + BadCond (Flaw, ""); + printf ("X = %s\n\tis not equal to Z = %s .\n", X.str(), Z.str()); + Z9 = X - Z; + printf ("yet X - Z yields %s .\n", Z9.str()); + printf (" Should this NOT signal Underflow, "); + printf ("this is a SERIOUS DEFECT\nthat causes "); + printf ("confusion when innocent statements like\n");; + printf (" if (X == Z) ... else"); + printf (" ... (f(X) - f(Z)) / (X - Z) ...\n"); + printf ("encounter Division by Zero although actually\n"); + if (setjmp (ovfl_buf)) + printf ("X / Z fails!\n"); + else + printf ("X / Z = 1 + %s .\n", ((X / Z - Half) - Half).str()); + } + } + printf ("The Underflow threshold is %s, below which\n", UfThold.str()); + printf ("calculation may suffer larger Relative error than "); + printf ("merely roundoff.\n"); + Y2 = U1 * U1; + Y = Y2 * Y2; + Y2 = Y * U1; + if (Y2 <= UfThold) + { + if (Y > E0) + { + BadCond (Defect, ""); + I = 5; + } + else + { + BadCond (Serious, ""); + I = 4; + } + printf ("Range is too narrow; U1^%d Underflows.\n", I); + } + /*=============================================*/ + Milestone = 130; + /*=============================================*/ + Y = -FLOOR (Half - TwoForty * LOG (UfThold) / LOG (HInvrse)) / TwoForty; + Y2 = Y + Y; + printf ("Since underflow occurs below the threshold\n"); + printf ("UfThold = (%s) ^ (%s)\nonly underflow ", HInvrse.str(), Y.str()); + printf ("should afflict the expression\n\t(%s) ^ (%s);\n", + HInvrse.str(), Y2.str()); + printf ("actually calculating yields:"); + if (setjmp (ovfl_buf)) + { + BadCond (Serious, "trap on underflow.\n"); + } + else + { + V9 = POW (HInvrse, Y2); + printf (" %s .\n", V9.str()); + if (!((V9 >= Zero) && (V9 <= (Radix + Radix + E9) * UfThold))) + { + BadCond (Serious, "this is not between 0 and underflow\n"); + printf (" threshold = %s .\n", UfThold.str()); + } + else if (!(V9 > UfThold * (One + E9))) + printf ("This computed value is O.K.\n"); + else + { + BadCond (Defect, "this is not between 0 and underflow\n"); + printf (" threshold = %s .\n", UfThold.str()); + } + } + /*=============================================*/ + Milestone = 160; + /*=============================================*/ + Pause (); + printf ("Searching for Overflow threshold:\n"); + printf ("This may generate an error.\n"); + Y = -CInvrse; + V9 = HInvrse * Y; + if (setjmp (ovfl_buf)) + { + I = 0; + V9 = Y; + goto overflow; + } + do + { + V = Y; + Y = V9; + V9 = HInvrse * Y; + } + while (V9 < Y); + I = 1; + overflow: + Z = V9; + printf ("Can `Z = -Y' overflow?\n"); + printf ("Trying it on Y = %s .\n", Y.str()); + V9 = -Y; + V0 = V9; + if (V - Y == V + V0) + printf ("Seems O.K.\n"); + else + { + printf ("finds a "); + BadCond (Flaw, "-(-Y) differs from Y.\n"); + } + if (Z != Y) + { + BadCond (Serious, ""); + printf ("overflow past %s\n\tshrinks to %s .\n", Y.str(), Z.str()); + } + if (I) + { + Y = V * (HInvrse * U2 - HInvrse); + Z = Y + ((One - HInvrse) * U2) * V; + if (Z < V0) + Y = Z; + if (Y < V0) + V = Y; + if (V0 - V < V0) + V = V0; + } + else + { + V = Y * (HInvrse * U2 - HInvrse); + V = V + ((One - HInvrse) * U2) * Y; + } + printf ("Overflow threshold is V = %s .\n", V.str()); + if (I) + printf ("Overflow saturates at V0 = %s .\n", V0.str()); + else + printf ("There is no saturation value because " + "the system traps on overflow.\n"); + V9 = V * One; + printf ("No Overflow should be signaled for V * 1 = %s\n", V9.str()); + V9 = V / One; + printf (" nor for V / 1 = %s.\n", V9.str()); + printf ("Any overflow signal separating this * from the one\n"); + printf ("above is a DEFECT.\n"); + /*=============================================*/ + Milestone = 170; + /*=============================================*/ + if (!(-V < V && -V0 < V0 && -UfThold < V && UfThold < V)) + { + BadCond (Failure, "Comparisons involving "); + printf ("+-%s, +-%s\nand +-%s are confused by Overflow.", + V.str(), V0.str(), UfThold.str()); + } + /*=============================================*/ + Milestone = 175; + /*=============================================*/ + printf ("\n"); + for (Indx = 1; Indx <= 3; ++Indx) + { + switch (Indx) + { + case 1: + Z = UfThold; + break; + case 2: + Z = E0; + break; + case 3: + Z = PseudoZero; + break; + } + if (Z != Zero) + { + V9 = SQRT (Z); + Y = V9 * V9; + if (Y / (One - Radix * E9) < Z || Y > (One + Radix * E9) * Z) + { /* dgh: + E9 --> * E9 */ + if (V9 > U1) + BadCond (Serious, ""); + else + BadCond (Defect, ""); + printf ("Comparison alleges that what prints as Z = %s\n", + Z.str()); + printf (" is too far from sqrt(Z) ^ 2 = %s .\n", Y.str()); + } + } + } + /*=============================================*/ + Milestone = 180; + /*=============================================*/ + for (Indx = 1; Indx <= 2; ++Indx) + { + if (Indx == 1) + Z = V; + else + Z = V0; + V9 = SQRT (Z); + X = (One - Radix * E9) * V9; + V9 = V9 * X; + if (((V9 < (One - Two * Radix * E9) * Z) || (V9 > Z))) + { + Y = V9; + if (X < W) + BadCond (Serious, ""); + else + BadCond (Defect, ""); + printf ("Comparison alleges that Z = %s\n", Z.str()); + printf (" is too far from sqrt(Z) ^ 2 (%s) .\n", Y.str()); + } + } + /*=============================================*/ + Milestone = 190; + /*=============================================*/ + Pause (); + X = UfThold * V; + Y = Radix * Radix; + if (X * Y < One || X > Y) + { + if (X * Y < U1 || X > Y / U1) + BadCond (Defect, "Badly"); + else + BadCond (Flaw, ""); + + printf (" unbalanced range; UfThold * V = %s\n\t%s\n", + X.str(), "is too far from 1.\n"); + } + /*=============================================*/ + Milestone = 200; + /*=============================================*/ + for (Indx = 1; Indx <= 5; ++Indx) + { + X = F9; + switch (Indx) + { + case 2: + X = One + U2; + break; + case 3: + X = V; + break; + case 4: + X = UfThold; + break; + case 5: + X = Radix; + } + Y = X; + if (setjmp (ovfl_buf)) + printf (" X / X traps when X = %s\n", X.str()); + else + { + V9 = (Y / X - Half) - Half; + if (V9 == Zero) + continue; + if (V9 == -U1 && Indx < 5) + BadCond (Flaw, ""); + else + BadCond (Serious, ""); + printf (" X / X differs from 1 when X = %s\n", X.str()); + printf (" instead, X / X - 1/2 - 1/2 = %s .\n", V9.str()); + } + } + /*=============================================*/ + Milestone = 210; + /*=============================================*/ + MyZero = Zero; + printf ("\n"); + printf ("What message and/or values does Division by Zero produce?\n"); + printf (" Trying to compute 1 / 0 produces ..."); + if (!setjmp (ovfl_buf)) + printf (" %s .\n", (One / MyZero).str()); + printf ("\n Trying to compute 0 / 0 produces ..."); + if (!setjmp (ovfl_buf)) + printf (" %s .\n", (Zero / MyZero).str()); + /*=============================================*/ + Milestone = 220; + /*=============================================*/ + Pause (); + printf ("\n"); + { + static const char *msg[] = { + "FAILUREs encountered =", + "SERIOUS DEFECTs discovered =", + "DEFECTs discovered =", + "FLAWs discovered =" + }; + int i; + for (i = 0; i < 4; i++) + if (ErrCnt[i]) + printf ("The number of %-29s %d.\n", msg[i], ErrCnt[i]); + } + printf ("\n"); + if ((ErrCnt[Failure] + ErrCnt[Serious] + ErrCnt[Defect] + ErrCnt[Flaw]) > 0) + { + if ((ErrCnt[Failure] + ErrCnt[Serious] + ErrCnt[Defect] == 0) + && (ErrCnt[Flaw] > 0)) + { + printf ("The arithmetic diagnosed seems "); + printf ("Satisfactory though flawed.\n"); + } + if ((ErrCnt[Failure] + ErrCnt[Serious] == 0) && (ErrCnt[Defect] > 0)) + { + printf ("The arithmetic diagnosed may be Acceptable\n"); + printf ("despite inconvenient Defects.\n"); + } + if ((ErrCnt[Failure] + ErrCnt[Serious]) > 0) + { + printf ("The arithmetic diagnosed has "); + printf ("unacceptable Serious Defects.\n"); + } + if (ErrCnt[Failure] > 0) + { + printf ("Potentially fatal FAILURE may have spoiled this"); + printf (" program's subsequent diagnoses.\n"); + } + } + else + { + printf ("No failures, defects nor flaws have been discovered.\n"); + if (!((RMult == Rounded) && (RDiv == Rounded) + && (RAddSub == Rounded) && (RSqrt == Rounded))) + printf ("The arithmetic diagnosed seems Satisfactory.\n"); + else + { + if (StickyBit >= One && + (Radix - Two) * (Radix - Nine - One) == Zero) + { + printf ("Rounding appears to conform to "); + printf ("the proposed IEEE standard P"); + if ((Radix == Two) && + ((Precision - Four * Three * Two) * + (Precision - TwentySeven - TwentySeven + One) == Zero)) + printf ("754"); + else + printf ("854"); + if (IEEE) + printf (".\n"); + else + { + printf (",\nexcept for possibly Double Rounding"); + printf (" during Gradual Underflow.\n"); + } + } + printf ("The arithmetic diagnosed appears to be Excellent!\n"); + } + } + printf ("END OF TEST.\n"); + return 0; + } + + template + FLOAT + Paranoia::Sign (FLOAT X) + { + return X >= FLOAT (long (0)) ? 1 : -1; + } + + template + void + Paranoia::Pause () + { + if (do_pause) + { + fputs ("Press return...", stdout); + fflush (stdout); + getchar(); + } + printf ("\nDiagnosis resumes after milestone Number %d", Milestone); + printf (" Page: %d\n\n", PageNo); + ++Milestone; + ++PageNo; + } + + template + void + Paranoia::TstCond (int K, int Valid, const char *T) + { + if (!Valid) + { + BadCond (K, T); + printf (".\n"); + } + } + + template + void + Paranoia::BadCond (int K, const char *T) + { + static const char *msg[] = { "FAILURE", "SERIOUS DEFECT", "DEFECT", "FLAW" }; + + ErrCnt[K] = ErrCnt[K] + 1; + printf ("%s: %s", msg[K], T); + } + + /* Random computes + X = (Random1 + Random9)^5 + Random1 = X - FLOOR(X) + 0.000005 * X; + and returns the new value of Random1. */ + + template + FLOAT + Paranoia::Random () + { + FLOAT X, Y; + + X = Random1 + Random9; + Y = X * X; + Y = Y * Y; + X = X * Y; + Y = X - FLOOR (X); + Random1 = Y + X * FLOAT ("0.000005"); + return (Random1); + } + + template + void + Paranoia::SqXMinX (int ErrKind) + { + FLOAT XA, XB; + + XB = X * BInvrse; + XA = X - XB; + SqEr = ((SQRT (X * X) - XB) - XA) / OneUlp; + if (SqEr != Zero) + { + if (SqEr < MinSqEr) + MinSqEr = SqEr; + if (SqEr > MaxSqEr) + MaxSqEr = SqEr; + J = J + 1; + BadCond (ErrKind, "\n"); + printf ("sqrt(%s) - %s = %s\n", (X * X).str(), X.str(), + (OneUlp * SqEr).str()); + printf ("\tinstead of correct value 0 .\n"); + } + } + + template + void + Paranoia::NewD () + { + X = Z1 * Q; + X = FLOOR (Half - X / Radix) * Radix + X; + Q = (Q - X * Z) / Radix + X * X * (D / Radix); + Z = Z - Two * X * D; + if (Z <= Zero) + { + Z = -Z; + Z1 = -Z1; + } + D = Radix * D; + } + + template + void + Paranoia::SR3750 () + { + if (!((X - Radix < Z2 - Radix) || (X - Z2 > W - Z2))) + { + I = I + 1; + X2 = SQRT (X * D); + Y2 = (X2 - Z2) - (Y - Z2); + X2 = X8 / (Y - Half); + X2 = X2 - Half * X2 * X2; + SqEr = (Y2 + Half) + (Half - X2); + if (SqEr < MinSqEr) + MinSqEr = SqEr; + SqEr = Y2 - X2; + if (SqEr > MaxSqEr) + MaxSqEr = SqEr; + } + } + + template + void + Paranoia::IsYeqX () + { + if (Y != X) + { + if (N <= 0) + { + if (Z == Zero && Q <= Zero) + printf ("WARNING: computing\n"); + else + BadCond (Defect, "computing\n"); + printf ("\t(%s) ^ (%s)\n", Z.str(), Q.str()); + printf ("\tyielded %s;\n", Y.str()); + printf ("\twhich compared unequal to correct %s ;\n", X.str()); + printf ("\t\tthey differ by %s .\n", (Y - X).str()); + } + N = N + 1; /* ... count discrepancies. */ + } + } + + template + void + Paranoia::PrintIfNPositive () + { + if (N > 0) + printf ("Similar discrepancies have occurred %d times.\n", N); + } + + template + void + Paranoia::TstPtUf () + { + N = 0; + if (Z != Zero) + { + printf ("Since comparison denies Z = 0, evaluating "); + printf ("(Z + Z) / Z should be safe.\n"); + if (setjmp (ovfl_buf)) + goto very_serious; + Q9 = (Z + Z) / Z; + printf ("What the machine gets for (Z + Z) / Z is %s .\n", Q9.str()); + if (FABS (Q9 - Two) < Radix * U2) + { + printf ("This is O.K., provided Over/Underflow"); + printf (" has NOT just been signaled.\n"); + } + else + { + if ((Q9 < One) || (Q9 > Two)) + { + very_serious: + N = 1; + ErrCnt[Serious] = ErrCnt[Serious] + 1; + printf ("This is a VERY SERIOUS DEFECT!\n"); + } + else + { + N = 1; + ErrCnt[Defect] = ErrCnt[Defect] + 1; + printf ("This is a DEFECT!\n"); + } + } + V9 = Z * One; + Random1 = V9; + V9 = One * Z; + Random2 = V9; + V9 = Z / One; + if ((Z == Random1) && (Z == Random2) && (Z == V9)) + { + if (N > 0) + Pause (); + } + else + { + N = 1; + BadCond (Defect, "What prints as Z = "); + printf ("%s\n\tcompares different from ", Z.str()); + if (Z != Random1) + printf ("Z * 1 = %s ", Random1.str()); + if (!((Z == Random2) || (Random2 == Random1))) + printf ("1 * Z == %s\n", Random2.str()); + if (!(Z == V9)) + printf ("Z / 1 = %s\n", V9.str()); + if (Random2 != Random1) + { + ErrCnt[Defect] = ErrCnt[Defect] + 1; + BadCond (Defect, "Multiplication does not commute!\n"); + printf ("\tComparison alleges that 1 * Z = %s\n", Random2.str()); + printf ("\tdiffers from Z * 1 = %s\n", Random1.str()); + } + Pause (); + } + } + } + + template + void + Paranoia::notify (const char *s) + { + printf ("%s test appears to be inconsistent...\n", s); + printf (" PLEASE NOTIFY KARPINKSI!\n"); + } + + /* ====================================================================== */ + + int main(int ac, char **av) + { + setbuf(stdout, NULL); + setbuf(stderr, NULL); + + while (1) + switch (getopt (ac, av, "pvg:fdl")) + { + case -1: + return 0; + case 'p': + do_pause = true; + break; + case 'v': + verbose = true; + break; + case 'g': + { + static const struct { + const char *name; + const struct real_format *fmt; + } fmts[] = { + #define F(x) { #x, &x##_format } + F(ieee_single), + F(ieee_double), + F(ieee_extended_motorola), + F(ieee_extended_intel_96), + F(ieee_extended_intel_128), + F(ibm_extended), + F(ieee_quad), + F(vax_f), + F(vax_d), + F(vax_g), + F(i370_single), + F(i370_double), + F(c4x_single), + F(c4x_extended), + F(real_internal), + #undef F + }; + + int i, n = sizeof (fmts)/sizeof(*fmts); + + for (i = 0; i < n; ++i) + if (strcmp (fmts[i].name, optarg) == 0) + break; + + if (i == n) + { + printf ("Unknown implementation \"%s\"; " + "available implementations:\n", optarg); + for (i = 0; i < n; ++i) + printf ("\t%s\n", fmts[i].name); + return 1; + } + + // We cheat and use the same mode all the time, but vary + // the format used for that mode. + real_format_for_mode[int(real_c_float::MODE) - int(QFmode)] + = fmts[i].fmt; + + Paranoia().main(); + break; + } + + case 'f': + Paranoia < native_float >().main(); + break; + case 'd': + Paranoia < native_float >().main(); + break; + case 'l': + #ifndef NO_LONG_DOUBLE + Paranoia < native_float >().main(); + #endif + break; + + case '?': + puts ("-p\tpause between pages"); + puts ("-g\treal.c implementation FMT"); + puts ("-f\tnative float"); + puts ("-d\tnative double"); + puts ("-l\tnative long double"); + return 0; + } + } + + /* GCC stuff referenced by real.o. */ + + extern "C" void + fancy_abort () + { + abort (); + } + + int target_flags = 0; + + extern "C" int + floor_log2_wide (unsigned HOST_WIDE_INT x) + { + int log = -1; + while (x != 0) + log++, + x >>= 1; + return log; + } diff -Nrc3pad gcc-3.2.3/contrib/regression/btest-gcc.sh gcc-3.3/contrib/regression/btest-gcc.sh *** gcc-3.2.3/contrib/regression/btest-gcc.sh 2002-02-02 05:23:34.000000000 +0000 --- gcc-3.3/contrib/regression/btest-gcc.sh 2002-10-22 20:02:49.000000000 +0000 *************** *** 19,26 **** # INPUT: # btest ! # TARGET is the target triplet. It should be the same one ! # as used in constructing PREFIX. TARGET=$1 # SOURCE is the directory containing the toplevel configure. SOURCE=$2 --- 19,27 ---- # INPUT: # btest ! # TARGET is the target triplet. It should be the same one as used in ! # constructing PREFIX. Or it can be the keyword 'native', indicating ! # a target of whatever platform the script is running on. TARGET=$1 # SOURCE is the directory containing the toplevel configure. SOURCE=$2 *************** H_REAL_TARGET=`$SOURCE/config.sub $H_TAR *** 98,117 **** TESTLOGS="gcc/testsuite/gcc.sum gcc/testsuite/g++.sum gcc/testsuite/g77.sum ! gcc/testsuite/objc.sum ! test-gdb/gdb.sum" # $H_TARGET/libstdc++-v3/testsuite/libstdc++-v3.sum # Build. echo build > $RESULT - $SOURCE/configure --prefix=$PREFIX --target=$H_TARGET || exit 1 if [ $H_HOST = $H_TARGET ] ; then if ! make bootstrap ; then [ -s gcc/.bad_compare ] || exit 1 cat gcc/.bad_compare >> $REGRESS || exit 1 make all || exit 1 fi else make || exit 1 fi echo error > $RESULT || exit 1 --- 99,119 ---- TESTLOGS="gcc/testsuite/gcc.sum gcc/testsuite/g++.sum gcc/testsuite/g77.sum ! gcc/testsuite/objc.sum" # $H_TARGET/libstdc++-v3/testsuite/libstdc++-v3.sum # Build. echo build > $RESULT if [ $H_HOST = $H_TARGET ] ; then + $SOURCE/configure --prefix=$PREFIX --target=$H_TARGET || exit 1 if ! make bootstrap ; then [ -s gcc/.bad_compare ] || exit 1 cat gcc/.bad_compare >> $REGRESS || exit 1 make all || exit 1 fi else + $SOURCE/configure --prefix=$PREFIX --target=$H_TARGET \ + --with-gnu-ld --with-gnu-as --with-newlib || exit 1 make || exit 1 fi echo error > $RESULT || exit 1 *************** make -k check-gcc *** 123,144 **** make check-target-libstdc++-v3 # Test the just-built GCC with the GDB testsuite. ! mkdir test-gdb || exit 1 ! cd $GDB_TESTSUITE || exit 1 ! for i in gdb.* ; do ! if [ -d $i ] ; then ! mkdir $BUILD/test-gdb/$i ! fi ! done ! cd $BUILD/test-gdb || exit 1 ! echo "set host_alias $H_HOST" > site.exp ! echo "set host_triplet $H_HOST" >> site.exp ! echo "set target_alias $H_TARGET" >> site.exp ! echo "set target_triplet $H_REAL_TARGET" >> site.exp ! echo "set build_alias $H_BUILD" >> site.exp ! echo "set build_triplet $H_BUILD" >> site.exp ! echo "set srcdir $GDB_TESTSUITE" >> site.exp ! runtest --tool gdb # Sanity-check the testlogs. They should contain at least one PASS. cd $BUILD || exit 1 --- 125,149 ---- make check-target-libstdc++-v3 # Test the just-built GCC with the GDB testsuite. ! if [ -d $GDB_TESTSUITE ] ; then ! mkdir test-gdb || exit 1 ! cd $GDB_TESTSUITE || exit 1 ! for i in gdb.* ; do ! if [ -d $i ] ; then ! mkdir $BUILD/test-gdb/$i ! fi ! done ! cd $BUILD/test-gdb || exit 1 ! echo "set host_alias $H_HOST" > site.exp ! echo "set host_triplet $H_HOST" >> site.exp ! echo "set target_alias $H_TARGET" >> site.exp ! echo "set target_triplet $H_REAL_TARGET" >> site.exp ! echo "set build_alias $H_BUILD" >> site.exp ! echo "set build_triplet $H_BUILD" >> site.exp ! echo "set srcdir $GDB_TESTSUITE" >> site.exp ! runtest --tool gdb ! TESTLOGS="$TESTLOGS test-gdb/gdb.sum" ! fi # Sanity-check the testlogs. They should contain at least one PASS. cd $BUILD || exit 1 diff -Nrc3pad gcc-3.2.3/contrib/regression/ChangeLog gcc-3.3/contrib/regression/ChangeLog *** gcc-3.2.3/contrib/regression/ChangeLog 2003-04-22 06:14:17.000000000 +0000 --- gcc-3.3/contrib/regression/ChangeLog 2003-05-14 00:09:08.000000000 +0000 *************** *** 1,38 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. 2002-01-31 Geoffrey Keating --- 1,40 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2002-10-22 Geoffrey Keating ! * btest-gcc.sh: Add gdb.sum to TESTLOGS only when GDB testsuite is run. ! 2002-10-11 Geoffrey Keating ! * objs-gcc.sh: Don't install GDB testsuite if GDB was not built. ! * btest-gcc.sh: Don't run GDB testsuite if it doesn't exist. ! 2002-10-09 Phil Edwards ! * btest-gcc.sh, objs-gcc.sh: Update TARGET comments. ! 2002-10-09 Geoffrey Keating ! * objs-gcc.sh: On (non-linux) native hosts, use 'make bootstrap'. ! 2002-03-09 Geoffrey Keating ! * btest-gcc.sh: For crosses, assume newlib and GNU binutils. ! * site.exp: Correct mips-elf triplet. 2002-01-31 Geoffrey Keating diff -Nrc3pad gcc-3.2.3/contrib/regression/objs-gcc.sh gcc-3.3/contrib/regression/objs-gcc.sh *** gcc-3.2.3/contrib/regression/objs-gcc.sh 2002-02-02 05:23:34.000000000 +0000 --- gcc-3.3/contrib/regression/objs-gcc.sh 2002-10-11 20:23:21.000000000 +0000 *************** *** 19,26 **** # INPUT: # btest ! # TARGET is the target triplet. It should be the same one ! # as used in constructing PREFIX. TARGET=$1 # SOURCE is the directory containing the toplevel configure. SOURCE=$2 --- 19,27 ---- # INPUT: # btest ! # TARGET is the target triplet. It should be the same one as used in ! # constructing PREFIX. Or it can be the keyword 'native', indicating ! # a target of whatever platform the script is running on. TARGET=$1 # SOURCE is the directory containing the toplevel configure. SOURCE=$2 *************** if [ $H_REAL_TARGET = $H_REAL_HOST -a $H *** 104,121 **** then make all-gdb all-dejagnu all-ld || exit 1 make install-gdb install-dejagnu install-ld || exit 1 else make || exit 1 make install || exit 1 fi ! mkdir -p $PREFIX/share/gdb-testsuite || exit 1 ! cd $SOURCE/gdb/testsuite || exit 1 ! find . -print | cpio -pdmu $PREFIX/share/gdb-testsuite || exit 1 ! # selftest.exp requires keeping old sources around, which is impractical ! rm $PREFIX/share/gdb-testsuite/gdb.base/selftest.exp ! # these tests seem to be broken and randomly failing ! rm -r $PREFIX/share/gdb-testsuite/gdb.mi echo pass > $RESULT exit 0 --- 105,127 ---- then make all-gdb all-dejagnu all-ld || exit 1 make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 else make || exit 1 make install || exit 1 fi ! if [ -x $PREFIX/bin/$TARGET-gdb ] ; then ! mkdir -p $PREFIX/share/gdb-testsuite || exit 1 ! cd $SOURCE/gdb/testsuite || exit 1 ! find . -print | cpio -pdmu $PREFIX/share/gdb-testsuite || exit 1 ! # selftest.exp requires keeping old sources around, which is impractical ! rm $PREFIX/share/gdb-testsuite/gdb.base/selftest.exp ! # these tests seem to be broken and randomly failing ! rm -r $PREFIX/share/gdb-testsuite/gdb.mi ! fi echo pass > $RESULT exit 0 diff -Nrc3pad gcc-3.2.3/contrib/regression/site.exp gcc-3.3/contrib/regression/site.exp *** gcc-3.2.3/contrib/regression/site.exp 2002-02-02 05:23:34.000000000 +0000 --- gcc-3.3/contrib/regression/site.exp 2002-03-09 19:41:11.000000000 +0000 *************** case "$target_triplet" in { *** 8,14 **** set target_list { "powerpc-sim" } # } } ! { "mips-elf" } { set target_list { "mips-sim" } } --- 8,14 ---- set target_list { "powerpc-sim" } # } } ! { "mips*-*-elf" } { set target_list { "mips-sim" } } diff -Nrc3pad gcc-3.2.3/contrib/test_installed gcc-3.3/contrib/test_installed *** gcc-3.2.3/contrib/test_installed 2000-10-08 18:39:27.000000000 +0000 --- gcc-3.3/contrib/test_installed 2003-04-13 05:47:07.000000000 +0000 *************** *** 1,6 **** #! /bin/sh ! # (C) 1998, 2000 Free Software Foundation # Originally by Alexandre Oliva # This script is Free Software, and it can be copied, distributed and --- 1,6 ---- #! /bin/sh ! # (C) 1998, 2000, 2002, 2003 Free Software Foundation # Originally by Alexandre Oliva # This script is Free Software, and it can be copied, distributed and *************** while true; do *** 54,65 **** --without-gcc) GCC_UNDER_TEST=no; shift;; --without-g++) GXX_UNDER_TEST=no; shift;; --without-g77) G77_UNDER_TEST=no; shift;; --tmpdir=*) tmpdir=`echo "$1" | sed 's/[^=]*=//'`; shift;; --help) cat <<\EOF ! Runs the testsuite for an installed version of gcc/g++/g77 ! Copyright (C) 1998 Free Software Foundation by Alexandre Oliva Supported arguments: --- 54,66 ---- --without-gcc) GCC_UNDER_TEST=no; shift;; --without-g++) GXX_UNDER_TEST=no; shift;; --without-g77) G77_UNDER_TEST=no; shift;; + --without-objc) OBJC_UNDER_TEST=no; shift;; --tmpdir=*) tmpdir=`echo "$1" | sed 's/[^=]*=//'`; shift;; --help) cat <<\EOF ! Runs the testsuite for an installed version of gcc/g++/g77/objc ! Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation by Alexandre Oliva Supported arguments: *************** Supported arguments: *** 77,82 **** --- 78,84 ---- --without-gcc do not run gcc testsuite --without-g++ do not run g++ testsuite --without-g77 do not run g77 testsuite + --without-objc do not run objc testsuite --tmpdir=/some/dir create temporaries and leave failed programs at specified directory [.] *************** if test x"${testsuite+set}" != x"set" && *** 96,114 **** while [ -h $file ]; do file=`ls -l $file | sed s/'.* -> '//` done ! srcdir=`CDPATH=. && cd \`echo "$file" | sed 's,/*[^/]*$,,;s,^$,.,'\`/.. >/dev/null && pwd` fi cat >site.exp < '//` done ! srcdir=`CDPATH=. && cd \`echo "$file" | sed 's,/*[^/]*$,,;s,^$,.,'\`/.. >/dev/null && ${PWDCMD-pwd}` fi cat >site.exp < # This script is Free Software, and it can be copied, distributed and --- 1,6 ---- #! /bin/sh ! # (C) 1998, 1999, 2000, 2002 Free Software Foundation # Originally by Alexandre Oliva # This script is Free Software, and it can be copied, distributed and *************** END { if (lang != "") { *** 135,141 **** ' | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" && if $move; then for file in $files `ls -1 $files | sed s/sum$/log/`; do ! [ -f $file ] && echo "mv `pwd`/$file `pwd`/$file.sent &&" done fi && echo true --- 135,141 ---- ' | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" && if $move; then for file in $files `ls -1 $files | sed s/sum$/log/`; do ! [ -f $file ] && echo "mv `${PWDCMD-pwd}`/$file `${PWDCMD-pwd}`/$file.sent &&" done fi && echo true diff -Nrc3pad gcc-3.2.3/contrib/texi2pod.pl gcc-3.3/contrib/texi2pod.pl *** gcc-3.2.3/contrib/texi2pod.pl 2002-04-03 18:33:58.000000000 +0000 --- gcc-3.3/contrib/texi2pod.pl 2002-12-28 20:51:38.000000000 +0000 *************** while(<$inf>) { *** 138,144 **** # Ignore @end foo, where foo is not an operation which may # cause us to skip, if we are presently skipping. my $ended = $1; ! next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/; die "\@end $ended without \@$ended at line $.\n" unless defined $endw; die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw; --- 138,144 ---- # Ignore @end foo, where foo is not an operation which may # cause us to skip, if we are presently skipping. my $ended = $1; ! next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex|copying)$/; die "\@end $ended without \@$ended at line $.\n" unless defined $endw; die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw; *************** while(<$inf>) { *** 178,184 **** next; }; ! /^\@(ignore|menu|iftex)\b/ and do { push @endwstack, $endw; push @skstack, $skipping; $endw = $1; --- 178,184 ---- next; }; ! /^\@(ignore|menu|iftex|copying)\b/ and do { push @endwstack, $endw; push @skstack, $skipping; $endw = $1; *************** sub postprocess *** 365,378 **** s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g; s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g; ! # Turn B blah> into B I B to ! # match Texinfo semantics of @emph inside @samp. Also handle @r ! # inside bold. s/<//g; ! 1 while s/B<((?:[^<>]|I<[^<>]*>)*)R<([^>]*)>/B<$1>${2}B]*)I<([^>]+)>/B<$1>I<$2>B]*)B<([^>]+)>/I<$1>B<$2>I//g; s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g; s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g; --- 365,382 ---- s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g; s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g; ! # Un-escape <> at this point. s/<//g; ! ! # Now un-nest all B<>, I<>, R<>. Theoretically we could have ! # indefinitely deep nesting; in practice, one level suffices. ! 1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1 with bare ...; eliminate empty markup, B<>; ! # shift white space at the ends of [BI]<...> expressions outside ! # the expression. ! s/R<([^<>]*)>/$1/g; s/[BI]<>//g; s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g; s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g; diff -Nrc3pad gcc-3.2.3/.cvsignore gcc-3.3/.cvsignore *** gcc-3.2.3/.cvsignore 2002-06-24 16:14:28.000000000 +0000 --- gcc-3.3/.cvsignore 2002-06-19 18:10:09.000000000 +0000 *************** configure.tp *** 25,32 **** configure.tps configure.vr configure.vrs - Makefile dir.info lost+found update.out LAST_UPDATED --- 25,32 ---- configure.tps configure.vr configure.vrs dir.info + Makefile lost+found update.out LAST_UPDATED diff -Nrc3pad gcc-3.2.3/FAQ gcc-3.3/FAQ *** gcc-3.2.3/FAQ 2003-04-22 06:56:31.000000000 +0000 --- gcc-3.3/FAQ 2003-05-14 00:18:25.000000000 +0000 *************** *** 1,12 **** GCC Frequently Asked Questions ! The latest version of this document is always available at [1]http://gcc.gnu.org/faq.html. ! This FAQ tries to answer specific questions concerning GCC. For ! general information regarding C, C++, resp. Fortran please check the ! [2]comp.lang.c FAQ, [3]comp.std.c++ FAQ, and the [4]Fortran Information page. Other GCC-related FAQs: [5]libstdc++-v3, and [6]GCJ. --- 1,12 ---- GCC Frequently Asked Questions ! The latest version of this document is always available at [1]http://gcc.gnu.org/faq.html. ! This FAQ tries to answer specific questions concerning GCC. For ! general information regarding C, C++, resp. Fortran please check the ! [2]comp.lang.c FAQ, [3]comp.std.c++ FAQ, and the [4]Fortran Information page. Other GCC-related FAQs: [5]libstdc++-v3, and [6]GCJ. *************** *** 18,33 **** 1. [8]What is the relationship between GCC and EGCS? 2. [9]What is the relationship between GCC and Cygnus / Red Hat? 3. [10]What is an open development model? ! 4. [11]How do I report a bug? ! 5. [12]How do I get a bug fixed or a feature added? ! 6. [13]Does GCC work on my platform? ! 2. [14]Installation ! 1. [15]How to install multiple versions of GCC ! 2. [16]Dynamic linker is unable to find GCC libraries ! 3. [17]libstdc++/libio tests fail badly with --enable-shared ! 4. [18]GCC can not find GNU as/GNU ld ! 5. [19]cpp: Usage:... Error ! 6. [20]Optimizing the compiler itself 3. [21]Testsuite problems 1. [22]Unable to run the testsuite 2. [23]How do I pass flags like -fnew-abi to the testsuite? --- 18,33 ---- 1. [8]What is the relationship between GCC and EGCS? 2. [9]What is the relationship between GCC and Cygnus / Red Hat? 3. [10]What is an open development model? ! 4. [11]How do I get a bug fixed or a feature added? ! 5. [12]Does GCC work on my platform? ! 2. [13]Installation ! 1. [14]How to install multiple versions of GCC ! 2. [15]Dynamic linker is unable to find GCC libraries ! 3. [16]libstdc++/libio tests fail badly with --enable-shared ! 4. [17]GCC can not find GNU as/GNU ld ! 5. [18]cpp: Usage:... Error ! 6. [19]Optimizing the compiler itself ! 7. [20]Why does libiconv get linked into jc1 on Solaris? 3. [21]Testsuite problems 1. [22]Unable to run the testsuite 2. [23]How do I pass flags like -fnew-abi to the testsuite? *************** *** 36,47 **** 1. [26]Is there a stringstream / sstream for GCC 2.95.2? 5. [27]Miscellaneous 1. [28]Friend Templates ! 2. [29]dynamic_cast, throw, typeid don't work with shared libraries 3. [30]Why do I need autoconf, bison, xgettext, automake, etc? 4. [31]Why can't I build a shared library? ! 5. [32]When building C++, the linker says my constructors, ! destructors or virtual tables are undefined, but I defined them 6. [33]Will GCC someday include an incremental linker? _________________________________________________________________ --- 36,47 ---- 1. [26]Is there a stringstream / sstream for GCC 2.95.2? 5. [27]Miscellaneous 1. [28]Friend Templates ! 2. [29]dynamic_cast, throw, typeid don't work with shared libraries 3. [30]Why do I need autoconf, bison, xgettext, automake, etc? 4. [31]Why can't I build a shared library? ! 5. [32]When building C++, the linker says my constructors, ! destructors or virtual tables are undefined, but I defined them 6. [33]Will GCC someday include an incremental linker? _________________________________________________________________ *************** *** 50,175 **** What is the relationship between GCC and EGCS? ! In 1990/1991 gcc version 1 had reached a point of stability. For the ! targets it could support, it worked well. It had limitations inherent ! in its design that would be difficult to resolve, so a major effort ! was made to resolve those limitiations and gcc version 2 was the result. ! When we had gcc2 in a useful state, development efforts on gcc1 ! stopped and we all concentrated on making gcc2 better than gcc1 could ! ever be. This is the kind of step forward we wanted to make with the EGCS project when it was formed in 1997. ! In April 1999 the Free Software Foundation officially halted development on the gcc2 compiler and appointed the EGCS project as the ! official GCC maintainers. The net result was a single project which ! carries forward GCC development under the ultimate control of the [34]GCC Steering Committee. _________________________________________________________________ What is the relationship between GCC and Cygnus / Red Hat? ! It is a common mis-conception that Red Hat controls GCC either directly or indirectly. ! While Red Hat does donate hardware, network connections, code and developer time to GCC development, Red Hat does not control GCC. ! Overall control of GCC is in the hands of the [35]GCC Steering ! Committee which includes people from a variety of different ! organizations and backgrounds. The purpose of the steering committee ! is to make decisions in the best interest of GCC and to help ensure that no individual or company has control over the project. ! To summarize, Red Hat contributes to the GCC project, but does not exert a controlling influence over GCC. _________________________________________________________________ What is an open development model? ! We are using a bazaar style [36][1] approach to GCC development: we ! make snapshots publicly available to anyone who wants to try them; we ! welcome anyone to join the development mailing list. All of the discussions on the development mailing list are available via the web. ! We're going to be making releases with a much higher frequency than they have been made in the past. ! In addition to weekly snapshots of the GCC development sources, we ! have the sources readable from a CVS server by anyone. Furthermore we ! are using remote CVS to allow remote maintainers write access to the sources. ! There have been many potential GCC developers who were not able to ! participate in GCC development in the past. We want these people to ! help in any way they can; we ultimately want GCC to be the best compiler in the world. ! A compiler is a complicated piece of software, there will still be ! strong central maintainers who will reject patches, who will demand ! documentation of implementations, and who will keep the level of ! quality as high as it is today. Code that could use wider testing may be integrated--code that is simply ill-conceived won't be. ! GCC is not the first piece of software to use this open development ! process; FreeBSD, the Emacs lisp repository, and the Linux kernel are a few examples of the bazaar style of development. ! With GCC, we are adding new features and optimizations at a rate that ! has not been done since the creation of gcc2; these additions ! inevitably have a temporarily destabilizing effect. With the help of ! developers working together with this bazaar style development, the ! resulting stability and quality levels will be better than we've had before. ! [1] We've been discussing different development models a lot over the past few months. The paper which started all of this introduced ! two terms: A cathedral development model versus a bazaar ! development model. The paper is written by Eric S. Raymond, it is ! called ``The Cathedral and the Bazaar''. The paper is a useful starting point for discussions. _________________________________________________________________ - How do I report a bug? - - There are complete instructions [37]here. - _________________________________________________________________ - How do I get a bug fixed or a feature added? ! There are lots of ways to get something fixed. The list below may be ! incomplete, but it covers many of the common cases. These are listed ! roughly in order of increasing difficulty for the average GCC user, ! meaning someone who is not skilled in the internals of GCC, and where ! difficulty is measured in terms of the time required to fix the bug. ! No alternative is better than any other; each has its benefits and disadvantages. ! * Hire someone to fix it for you. There are various companies and ! individuals providing support for GCC. This alternative costs ! money, but is relatively likely to get results. ! * [38]Report the problem to the GCC GNATS bug tracking system and ! hope that someone will be kind enough to fix it for you. While ! this is certainly possible, and often happens, there is no ! guarantee that it will. You should not expect the same response ! from this method that you would see from a commercial support ! organization since the people who read GCC bug reports, if they ! choose to help you, will be volunteering their time. This ! alternative will work best if you follow the directions on ! [39]submitting bugreports. ! * Fix it yourself. This alternative will probably bring results, if ! you work hard enough, but will probably take a lot of time, and, ! depending on the quality of your work and the perceived benefits ! of your changes, your code may or may not ever make it into an official release of GCC. _________________________________________________________________ Does GCC work on my platform? ! The host/target specific installation notes for GCC include ! information about known problems with installing or using GCC on ! particular platforms. These are included in the sources for a release ! in INSTALL/specific.html, and the [40]latest version is always ! available at the GCC web site. Reports of [41]successful builds for several versions of GCC are also available at the web site. _________________________________________________________________ --- 50,168 ---- What is the relationship between GCC and EGCS? ! In 1990/1991 gcc version 1 had reached a point of stability. For the ! targets it could support, it worked well. It had limitations inherent ! in its design that would be difficult to resolve, so a major effort ! was made to resolve those limitiations and gcc version 2 was the result. ! When we had gcc2 in a useful state, development efforts on gcc1 ! stopped and we all concentrated on making gcc2 better than gcc1 could ! ever be. This is the kind of step forward we wanted to make with the EGCS project when it was formed in 1997. ! In April 1999 the Free Software Foundation officially halted development on the gcc2 compiler and appointed the EGCS project as the ! official GCC maintainers. The net result was a single project which ! carries forward GCC development under the ultimate control of the [34]GCC Steering Committee. _________________________________________________________________ What is the relationship between GCC and Cygnus / Red Hat? ! It is a common mis-conception that Red Hat controls GCC either directly or indirectly. ! While Red Hat does donate hardware, network connections, code and developer time to GCC development, Red Hat does not control GCC. ! Overall control of GCC is in the hands of the [35]GCC Steering ! Committee which includes people from a variety of different ! organizations and backgrounds. The purpose of the steering committee ! is to make decisions in the best interest of GCC and to help ensure that no individual or company has control over the project. ! To summarize, Red Hat contributes to the GCC project, but does not exert a controlling influence over GCC. _________________________________________________________________ What is an open development model? ! We are using a bazaar style [36][1] approach to GCC development: we ! make snapshots publicly available to anyone who wants to try them; we ! welcome anyone to join the development mailing list. All of the discussions on the development mailing list are available via the web. ! We're going to be making releases with a much higher frequency than they have been made in the past. ! In addition to weekly snapshots of the GCC development sources, we ! have the sources readable from a CVS server by anyone. Furthermore we ! are using remote CVS to allow remote maintainers write access to the sources. ! There have been many potential GCC developers who were not able to ! participate in GCC development in the past. We want these people to ! help in any way they can; we ultimately want GCC to be the best compiler in the world. ! A compiler is a complicated piece of software, there will still be ! strong central maintainers who will reject patches, who will demand ! documentation of implementations, and who will keep the level of ! quality as high as it is today. Code that could use wider testing may be integrated--code that is simply ill-conceived won't be. ! GCC is not the first piece of software to use this open development ! process; FreeBSD, the Emacs lisp repository, and the Linux kernel are a few examples of the bazaar style of development. ! With GCC, we are adding new features and optimizations at a rate that ! has not been done since the creation of gcc2; these additions ! inevitably have a temporarily destabilizing effect. With the help of ! developers working together with this bazaar style development, the ! resulting stability and quality levels will be better than we've had before. ! [1] We've been discussing different development models a lot over the past few months. The paper which started all of this introduced ! two terms: A cathedral development model versus a bazaar ! development model. The paper is written by Eric S. Raymond, it is ! called ``The Cathedral and the Bazaar''. The paper is a useful starting point for discussions. _________________________________________________________________ How do I get a bug fixed or a feature added? ! There are lots of ways to get something fixed. The list below may be ! incomplete, but it covers many of the common cases. These are listed ! roughly in order of decreasing difficulty for the average GCC user, ! meaning someone who is not skilled in the internals of GCC, and where ! difficulty is measured in terms of the time required to fix the bug. ! No alternative is better than any other; each has its benefits and disadvantages. ! * Fix it yourself. This alternative will probably bring results, if ! you work hard enough, but will probably take a lot of time, and, ! depending on the quality of your work and the perceived benefits ! of your changes, your code may or may not ever make it into an official release of GCC. + * [37]Report the problem to the GCC bug tracking system and hope + that someone will be kind enough to fix it for you. While this is + certainly possible, and often happens, there is no guarantee that + it will. You should not expect the same response from this method + that you would see from a commercial support organization since + the people who read GCC bug reports, if they choose to help you, + will be volunteering their time. + * Hire someone to fix it for you. There are various companies and + individuals providing support for GCC. This alternative costs + money, but is relatively likely to get results. _________________________________________________________________ Does GCC work on my platform? ! The host/target specific installation notes for GCC include ! information about known problems with installing or using GCC on ! particular platforms. These are included in the sources for a release ! in INSTALL/specific.html, and the [38]latest version is always ! available at the GCC web site. Reports of [39]successful builds for several versions of GCC are also available at the web site. _________________________________________________________________ *************** Does GCC work on my platform? *** 177,227 **** How to install multiple versions of GCC ! It may be desirable to install multiple versions of the compiler on ! the same system. This can be done by using different prefix paths at configure time and a few symlinks. ! Basically, configure the two compilers with different --prefix ! options, then build and install each compiler. Assume you want "gcc" to be the latest compiler and available in /usr/local/bin; also assume ! that you want "gcc2" to be the older gcc2 compiler and also available in /usr/local/bin. ! The easiest way to do this is to configure the new GCC with ! --prefix=/usr/local/gcc and the older gcc2 with ! --prefix=/usr/local/gcc2. Build and install both compilers. Then make ! a symlink from /usr/local/bin/gcc to /usr/local/gcc/bin/gcc and from ! /usr/local/bin/gcc2 to /usr/local/gcc2/bin/gcc. Create similar links for the "g++", "c++" and "g77" compiler drivers. ! An alternative to using symlinks is to configure with a ! --program-transform-name option. This option specifies a sed command ! to process installed program names with. Using it you can, for instance, have all the new GCC programs installed as "new-gcc" and the ! like. You will still have to specify different --prefix options for ! new GCC and old GCC, because it is only the executable program names that are transformed. The difference is that you (as administrator) do ! not have to set up symlinks, but must specify additional directories in your (as a user) PATH. A complication with --program-transform-name ! is that the sed command invariably contains characters significant to ! the shell, and these have to be escaped correctly, also it is not ! possible to use "^" or "$" in the command. Here is the option to prefix "new-" to the new GCC installed programs: --program-transform-name='s,\\\\(.*\\\\),new-\\\\1,' With the above --prefix option, that will install the new GCC programs ! into /usr/local/gcc/bin with names prefixed by "new-". You can use ! --program-transform-name if you have multiple versions of GCC, and wish to be sure about which version you are invoking. ! If you use --prefix, GCC may have difficulty locating a GNU assembler ! or linker on your system, [42]GCC can not find GNU as/GNU ld explains how to deal with this. ! Another option that may be easier is to use the --program-prefix= or ! --program-suffix= options to configure. So if you're installing GCC ! 2.95.2 and don't want to disturb the current version of GCC in /usr/local/bin/, you could do configure --program-suffix=-2.95.2 --- 170,220 ---- How to install multiple versions of GCC ! It may be desirable to install multiple versions of the compiler on ! the same system. This can be done by using different prefix paths at configure time and a few symlinks. ! Basically, configure the two compilers with different --prefix ! options, then build and install each compiler. Assume you want "gcc" to be the latest compiler and available in /usr/local/bin; also assume ! that you want "gcc2" to be the older gcc2 compiler and also available in /usr/local/bin. ! The easiest way to do this is to configure the new GCC with ! --prefix=/usr/local/gcc and the older gcc2 with ! --prefix=/usr/local/gcc2. Build and install both compilers. Then make ! a symlink from /usr/local/bin/gcc to /usr/local/gcc/bin/gcc and from ! /usr/local/bin/gcc2 to /usr/local/gcc2/bin/gcc. Create similar links for the "g++", "c++" and "g77" compiler drivers. ! An alternative to using symlinks is to configure with a ! --program-transform-name option. This option specifies a sed command ! to process installed program names with. Using it you can, for instance, have all the new GCC programs installed as "new-gcc" and the ! like. You will still have to specify different --prefix options for ! new GCC and old GCC, because it is only the executable program names that are transformed. The difference is that you (as administrator) do ! not have to set up symlinks, but must specify additional directories in your (as a user) PATH. A complication with --program-transform-name ! is that the sed command invariably contains characters significant to ! the shell, and these have to be escaped correctly, also it is not ! possible to use "^" or "$" in the command. Here is the option to prefix "new-" to the new GCC installed programs: --program-transform-name='s,\\\\(.*\\\\),new-\\\\1,' With the above --prefix option, that will install the new GCC programs ! into /usr/local/gcc/bin with names prefixed by "new-". You can use ! --program-transform-name if you have multiple versions of GCC, and wish to be sure about which version you are invoking. ! If you use --prefix, GCC may have difficulty locating a GNU assembler ! or linker on your system, [40]GCC can not find GNU as/GNU ld explains how to deal with this. ! Another option that may be easier is to use the --program-prefix= or ! --program-suffix= options to configure. So if you're installing GCC ! 2.95.2 and don't want to disturb the current version of GCC in /usr/local/bin/, you could do configure --program-suffix=-2.95.2 *************** How to install multiple versions of GCC *** 233,320 **** Dynamic linker is unable to find GCC libraries This problem manifests itself by programs not finding shared libraries ! they depend on when the programs are started. Note this problem often ! manifests itself with failures in the libio/libstdc++ tests after configuring with --enable-shared and building GCC. ! GCC does not specify a runpath so that the dynamic linker can find dynamic libraries at runtime. ! The short explanation is that if you always pass a -R option to the ! linker, then your programs become dependent on directories which may be NFS mounted, and programs may hang unnecessarily when an NFS server goes down. ! The problem is not programs that do require the directories; those ! programs are going to hang no matter what you do. The problem is programs that do not require the directories. ! SunOS effectively always passed a -R option for every -L option; this ! was a bad idea, and so it was removed for Solaris. We should not recreate it. ! However, if you feel you really need such an option to be passed ! automatically to the linker, you may add it to the GCC specs file. ! This file can be found in the same directory that contains cc1 (run gcc -print-prog-name=cc1 to find it). You may add linker flags such as ! -R or -rpath, depending on platform and linker, to the *link or *lib specs. ! Another alternative is to install a wrapper script around gcc, g++ or ! ld that adds the appropriate directory to the environment variable LD_RUN_PATH or equivalent (again, it's platform-dependent). Yet another option, that works on a few platforms, is to hard-code the ! full pathname of the library into its soname. This can only be ! accomplished by modifying the appropriate .ml file within libstdc++/config (and also libg++/config, if you are building libg++), ! so that $(libdir)/ appears just before the library name in -soname or -h options. _________________________________________________________________ GCC can not find GNU as/GNU ld ! GCC searches the PATH for an assembler and a loader, but it only does so after searching a directory list hard-coded in the GCC executables. ! Since, on most platforms, the hard-coded list includes directories in ! which the system assembler and loader can be found, you may have to ! take one of the following actions to arrange that GCC uses the GNU versions of those programs. To ensure that GCC finds the GNU assembler (the GNU loader), which are ! required by [43]some configurations, you should configure these with the same --prefix option as you used for GCC. Then build & install GNU as (GNU ld) and proceed with building GCC. ! Another alternative is to create links to GNU as and ld in any of the ! directories printed by the command `gcc -print-search-dirs | grep ! '^programs:''. The link to `ld' should be named `real-ld' if `ld' already exists. If such links do not exist while you're compiling GCC, ! you may have to create them in the build directories too, within the gcc directory and in all the gcc/stage* subdirectories. ! GCC 2.95 allows you to specify the full pathname of the assembler and the linker to use. The configure flags are `--with-as=/path/to/as' and ! `--with-ld=/path/to/ld'. GCC will try to use these pathnames before ! looking for `as' or `(real-)ld' in the standard search dirs. If, at ! configure-time, the specified programs are found to be GNU utilities, `--with-gnu-as' and `--with-gnu-ld' need not be used; these flags will ! be auto-detected. One drawback of this option is that it won't allow ! you to override the search path for assembler and linker with command-line options -B/path/ if the specified filenames exist. _________________________________________________________________ cpp: Usage:... Error ! If you get an error like this when building GCC (particularly when ! building __mulsi3), then you likely have a problem with your environment variables. cpp: Usage: /usr/lib/gcc-lib/i586-unknown-linux-gnulibc1/2.7.2.3/cpp [switches] input output ! First look for an explicit '.' in either LIBRARY_PATH or ! GCC_EXEC_PREFIX from your environment. If you do not find an explicit ! '.', look for an empty pathname in those variables. Note that ':' at either the start or end of these variables is an implicit '.' and will cause problems. --- 226,313 ---- Dynamic linker is unable to find GCC libraries This problem manifests itself by programs not finding shared libraries ! they depend on when the programs are started. Note this problem often ! manifests itself with failures in the libio/libstdc++ tests after configuring with --enable-shared and building GCC. ! GCC does not specify a runpath so that the dynamic linker can find dynamic libraries at runtime. ! The short explanation is that if you always pass a -R option to the ! linker, then your programs become dependent on directories which may be NFS mounted, and programs may hang unnecessarily when an NFS server goes down. ! The problem is not programs that do require the directories; those ! programs are going to hang no matter what you do. The problem is programs that do not require the directories. ! SunOS effectively always passed a -R option for every -L option; this ! was a bad idea, and so it was removed for Solaris. We should not recreate it. ! However, if you feel you really need such an option to be passed ! automatically to the linker, you may add it to the GCC specs file. ! This file can be found in the same directory that contains cc1 (run gcc -print-prog-name=cc1 to find it). You may add linker flags such as ! -R or -rpath, depending on platform and linker, to the *link or *lib specs. ! Another alternative is to install a wrapper script around gcc, g++ or ! ld that adds the appropriate directory to the environment variable LD_RUN_PATH or equivalent (again, it's platform-dependent). Yet another option, that works on a few platforms, is to hard-code the ! full pathname of the library into its soname. This can only be ! accomplished by modifying the appropriate .ml file within libstdc++/config (and also libg++/config, if you are building libg++), ! so that $(libdir)/ appears just before the library name in -soname or -h options. _________________________________________________________________ GCC can not find GNU as/GNU ld ! GCC searches the PATH for an assembler and a loader, but it only does so after searching a directory list hard-coded in the GCC executables. ! Since, on most platforms, the hard-coded list includes directories in ! which the system assembler and loader can be found, you may have to ! take one of the following actions to arrange that GCC uses the GNU versions of those programs. To ensure that GCC finds the GNU assembler (the GNU loader), which are ! required by [41]some configurations, you should configure these with the same --prefix option as you used for GCC. Then build & install GNU as (GNU ld) and proceed with building GCC. ! Another alternative is to create links to GNU as and ld in any of the ! directories printed by the command `gcc -print-search-dirs | grep ! '^programs:''. The link to `ld' should be named `real-ld' if `ld' already exists. If such links do not exist while you're compiling GCC, ! you may have to create them in the build directories too, within the gcc directory and in all the gcc/stage* subdirectories. ! GCC 2.95 allows you to specify the full pathname of the assembler and the linker to use. The configure flags are `--with-as=/path/to/as' and ! `--with-ld=/path/to/ld'. GCC will try to use these pathnames before ! looking for `as' or `(real-)ld' in the standard search dirs. If, at ! configure-time, the specified programs are found to be GNU utilities, `--with-gnu-as' and `--with-gnu-ld' need not be used; these flags will ! be auto-detected. One drawback of this option is that it won't allow ! you to override the search path for assembler and linker with command-line options -B/path/ if the specified filenames exist. _________________________________________________________________ cpp: Usage:... Error ! If you get an error like this when building GCC (particularly when ! building __mulsi3), then you likely have a problem with your environment variables. cpp: Usage: /usr/lib/gcc-lib/i586-unknown-linux-gnulibc1/2.7.2.3/cpp [switches] input output ! First look for an explicit '.' in either LIBRARY_PATH or ! GCC_EXEC_PREFIX from your environment. If you do not find an explicit ! '.', look for an empty pathname in those variables. Note that ':' at either the start or end of these variables is an implicit '.' and will cause problems. *************** cpp: Usage:... Error *** 323,351 **** Optimizing the compiler itself ! If you want to test a particular optimization option, it's useful to ! try bootstrapping the compiler with that option turned on. For example, to test the -fssa option, you could bootstrap like this: make BOOT_CFLAGS="-O2 -fssa" bootstrap _________________________________________________________________ ! Testsuite problems ! Unable to run the testsuite ! If you get a message about unable to find "standard.exp" when trying ! to run the GCC testsuites, then your dejagnu is too old to run the GCC ! tests. You will need to get a newer version of dejagnu from ! [44]http://www.gnu.org/software/dejagnu/dejagnu.html. _________________________________________________________________ How do I pass flags like -fnew-abi to the testsuite? ! If you invoke runtest directly, you can use the --tool_opts option, e.g: runtest --tool_opts "-fnew-abi -fno-honor-std" ! Or, if you use make check you can use the make variable RUNTESTFLAGS, e.g: make RUNTESTFLAGS="--tool_opts '-fnew-abi -fno-honor-std'" check-g++ _________________________________________________________________ --- 316,355 ---- Optimizing the compiler itself ! If you want to test a particular optimization option, it's useful to ! try bootstrapping the compiler with that option turned on. For example, to test the -fssa option, you could bootstrap like this: make BOOT_CFLAGS="-O2 -fssa" bootstrap _________________________________________________________________ ! Why does libiconv get linked into jc1 on Solaris? ! The Java front end requires iconv. If the compiler used to bootstrap ! GCC finds libiconv (because the GNU version of libiconv has been ! installed in the same prefix as the bootstrap compiler), but the newly ! built GCC does not find the library (because it will be installed with ! a different prefix), then a link-time error will occur when building ! jc1. This problem does not show up so often on platforms that have ! libiconv in a default location (like /usr/lib) because then both ! compilers can find a library named libiconv, even though it is a ! different library. ! Using --disable-nls at configure-time does not prevent this problem ! because jc1 uses iconv even in that case. Solutions include ! temporarily removing the GNU libiconv, copying it to a default ! location such as /usr/lib/, and using --enable-languages at ! configure-time to disable Java. _________________________________________________________________ + Testsuite problems + How do I pass flags like -fnew-abi to the testsuite? ! If you invoke runtest directly, you can use the --tool_opts option, e.g: runtest --tool_opts "-fnew-abi -fno-honor-std" ! Or, if you use make check you can use the make variable RUNTESTFLAGS, e.g: make RUNTESTFLAGS="--tool_opts '-fnew-abi -fno-honor-std'" check-g++ _________________________________________________________________ *************** How can I run the test suite with multip *** 356,366 **** e.g: runtest --target_board "unix{-fPIC,-fpic,}" ! Or, if you use make check you can use the make variable RUNTESTFLAGS, e.g: make RUNTESTFLAGS="--target_board 'unix{-fPIC,-fpic,}'" check-gcc ! Either of these examples will run the tests three times. Once with -fPIC, once with -fpic, and once with no additional flags. This technique is particularly useful on multilibbed targets. --- 360,370 ---- e.g: runtest --target_board "unix{-fPIC,-fpic,}" ! Or, if you use make check you can use the make variable RUNTESTFLAGS, e.g: make RUNTESTFLAGS="--target_board 'unix{-fPIC,-fpic,}'" check-gcc ! Either of these examples will run the tests three times. Once with -fPIC, once with -fpic, and once with no additional flags. This technique is particularly useful on multilibbed targets. *************** How can I run the test suite with multip *** 371,377 **** Is there a stringstream / sstream for GCC 2.95.2? Yes, it's at: ! [45]http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00700/sstream. _________________________________________________________________ Miscellaneous --- 375,381 ---- Is there a stringstream / sstream for GCC 2.95.2? Yes, it's at: ! [42]http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00700/sstream. _________________________________________________________________ Miscellaneous *************** Is there a stringstream / sstream for GC *** 379,402 **** Friend Templates In order to make a specialization of a template function a friend of a ! (possibly template) class, you must explicitly state that the friend ! function is a template, by appending angle brackets to its name, and ! this template function must have been declared already. Here's an example: template class foo { friend void bar(foo); } ! The above declaration declares a non-template function named bar, so ! it must be explicitly defined for each specialization of foo. A ! template definition of bar won't do, because it is unrelated with the non-template declaration above. So you'd have to end up writing: void bar(foo) { /* ... */ } void bar(foo) { /* ... */ } ! If you meant bar to be a template function, you should have forward-declared it as follows. Note that, since the template function ! declaration refers to the template class, the template class must be forward-declared too: template class foo; --- 383,406 ---- Friend Templates In order to make a specialization of a template function a friend of a ! (possibly template) class, you must explicitly state that the friend ! function is a template, by appending angle brackets to its name, and ! this template function must have been declared already. Here's an example: template class foo { friend void bar(foo); } ! The above declaration declares a non-template function named bar, so ! it must be explicitly defined for each specialization of foo. A ! template definition of bar won't do, because it is unrelated with the non-template declaration above. So you'd have to end up writing: void bar(foo) { /* ... */ } void bar(foo) { /* ... */ } ! If you meant bar to be a template function, you should have forward-declared it as follows. Note that, since the template function ! declaration refers to the template class, the template class must be forward-declared too: template class foo; *************** class foo { *** 412,427 **** template void bar(foo) { /* ... */ } ! In this case, the template argument list could be left empty, because ! it can be implicitly deduced from the function arguments, but the ! angle brackets must be present, otherwise the declaration will be ! taken as a non-template function. Furthermore, in some cases, you may ! have to explicitly specify the template arguments, to remove ambiguity. An error in the last public comment draft of the ANSI/ISO C++ Standard ! and the fact that previous releases of GCC would accept such friend ! declarations as template declarations has led people to believe that the forward declaration was not necessary, but, according to the final version of the Standard, it is. _________________________________________________________________ --- 416,431 ---- template void bar(foo) { /* ... */ } ! In this case, the template argument list could be left empty, because ! it can be implicitly deduced from the function arguments, but the ! angle brackets must be present, otherwise the declaration will be ! taken as a non-template function. Furthermore, in some cases, you may ! have to explicitly specify the template arguments, to remove ambiguity. An error in the last public comment draft of the ANSI/ISO C++ Standard ! and the fact that previous releases of GCC would accept such friend ! declarations as template declarations has led people to believe that the forward declaration was not necessary, but, according to the final version of the Standard, it is. _________________________________________________________________ *************** dynamic_cast, throw, typeid don't work w *** 430,529 **** The new C++ ABI in the GCC 3.0 series uses address comparisons, rather than string compares, to determine type equality. This leads to better ! performance. Like other objects that have to be present in the final ! executable, these std::typeinfo_t objects have what is called vague ! linkage because they are not tightly bound to any one particular ! translation unit (object file). The compiler has to emit them in any ! translation unit that requires their presence, and then rely on the ! linking and loading process to make sure that only one of them is ! active in the final executable. With static linking all of these ! symbols are resolved at link time, but with dynamic linking, further resolution occurs at load time. You have to ensure that objects within ! a shared library are resolved against objects in the executable and other shared libraries. ! * For a program which is linked against a shared library, no additional precautions need taking. ! * You cannot create a shared library with the "-Bsymbolic" option, as that prevents the resolution described above. ! * If you use dlopen to explicitly load code from a shared library, ! you must do several things. First, export global symbols from the ! executable by linking it with the "-E" flag (you will have to ! specify this as "-Wl,-E" if you are invoking the linker in the ! usual manner from the compiler driver, g++). You must also make ! the external symbols in the loaded library available for ! subsequent libraries by providing the RTLD_GLOBAL flag to dlopen. The symbol resolution can be immediate or lazy. ! Template instantiations are another, user visible, case of objects with vague linkage, which needs similar resolution. If you do not take ! the above precautions, you may discover that a template instantiation ! with the same argument list, but instantiated in multiple translation ! units, has several addresses, depending in which translation unit the ! address is taken. (This is not an exhaustive list of the kind of ! objects which have vague linkage and are expected to be resolved during linking & loading.) ! If you are worried about different objects with the same name ! colliding during the linking or loading process, then you should use ! namespaces to disambiguate them. Giving distinct objects with global ! linkage the same name is a violation of the One Definition Rule (ODR) [basic.def.odr]. For more details about the way that GCC implements these and other C++ ! features, please read the [46]ABI specification. Note the ! std::typeinfo_t objects which must be resolved all begin with "_ZTS". ! Refer to ld's documentation for a description of the "-E" & "-Bsymbolic" flags. _________________________________________________________________ Why do I need autoconf, bison, xgettext, automake, etc? ! If you're using diffs up dated from one snapshot to the next, or if ! you're using the CVS repository, you may need several additional programs to build GCC. ! These include, but are not necessarily limited to autoconf, automake, bison, and xgettext. ! This is necessary because neither diff nor cvs keep timestamps ! correct. This causes problems for generated files as "make" may think those generated files are out of date and try to regenerate them. ! An easy way to work around this problem is to use the gcc_update ! script in the contrib subdirectory of GCC, which handles this ! transparently without requiring installation of any additional tools. (Note: Up to and including GCC 2.95 this script was called egcs_update .) ! When building from diffs or CVS or if you modified some sources, you may also need to obtain development versions of some GNU tools, as the ! production versions do not necessarily handle all features needed to rebuild GCC. ! In general, the current versions of these tools from ! [47]ftp://ftp.gnu.org/gnu/ will work. At present, Autoconf 2.50 is not supported, and you will need to use Autoconf 2.13; work is in progress to fix this problem. Also look at ! [48]ftp://gcc.gnu.org/pub/gcc/infrastructure/ for any special versions of packages. _________________________________________________________________ Why can't I build a shared library? ! When building a shared library you may get an error message from the linker like `assert pure-text failed:' or `DP relative code in file'. ! This kind of error occurs when you've failed to provide proper flags to gcc when linking the shared library. You can get this error even if all the .o files for the shared library ! were compiled with the proper PIC option. When building a shared ! library, gcc will compile additional code to be included in the ! library. That additional code must also be compiled with the proper PIC option. ! Adding the proper PIC option (-fpic or -fPIC) to the link line which ! creates the shared library will fix this problem on targets that support PIC in this manner. For example: gcc -c -fPIC myfile.c gcc -shared -o libmyfile.so -fPIC myfile.o --- 434,533 ---- The new C++ ABI in the GCC 3.0 series uses address comparisons, rather than string compares, to determine type equality. This leads to better ! performance. Like other objects that have to be present in the final ! executable, these std::typeinfo_t objects have what is called vague ! linkage because they are not tightly bound to any one particular ! translation unit (object file). The compiler has to emit them in any ! translation unit that requires their presence, and then rely on the ! linking and loading process to make sure that only one of them is ! active in the final executable. With static linking all of these ! symbols are resolved at link time, but with dynamic linking, further resolution occurs at load time. You have to ensure that objects within ! a shared library are resolved against objects in the executable and other shared libraries. ! * For a program which is linked against a shared library, no additional precautions need taking. ! * You cannot create a shared library with the "-Bsymbolic" option, as that prevents the resolution described above. ! * If you use dlopen to explicitly load code from a shared library, ! you must do several things. First, export global symbols from the ! executable by linking it with the "-E" flag (you will have to ! specify this as "-Wl,-E" if you are invoking the linker in the ! usual manner from the compiler driver, g++). You must also make ! the external symbols in the loaded library available for ! subsequent libraries by providing the RTLD_GLOBAL flag to dlopen. The symbol resolution can be immediate or lazy. ! Template instantiations are another, user visible, case of objects with vague linkage, which needs similar resolution. If you do not take ! the above precautions, you may discover that a template instantiation ! with the same argument list, but instantiated in multiple translation ! units, has several addresses, depending in which translation unit the ! address is taken. (This is not an exhaustive list of the kind of ! objects which have vague linkage and are expected to be resolved during linking & loading.) ! If you are worried about different objects with the same name ! colliding during the linking or loading process, then you should use ! namespaces to disambiguate them. Giving distinct objects with global ! linkage the same name is a violation of the One Definition Rule (ODR) [basic.def.odr]. For more details about the way that GCC implements these and other C++ ! features, please read the [43]ABI specification. Note the ! std::typeinfo_t objects which must be resolved all begin with "_ZTS". ! Refer to ld's documentation for a description of the "-E" & "-Bsymbolic" flags. _________________________________________________________________ Why do I need autoconf, bison, xgettext, automake, etc? ! If you're using diffs up dated from one snapshot to the next, or if ! you're using the CVS repository, you may need several additional programs to build GCC. ! These include, but are not necessarily limited to autoconf, automake, bison, and xgettext. ! This is necessary because neither diff nor cvs keep timestamps ! correct. This causes problems for generated files as "make" may think those generated files are out of date and try to regenerate them. ! An easy way to work around this problem is to use the gcc_update ! script in the contrib subdirectory of GCC, which handles this ! transparently without requiring installation of any additional tools. (Note: Up to and including GCC 2.95 this script was called egcs_update .) ! When building from diffs or CVS or if you modified some sources, you may also need to obtain development versions of some GNU tools, as the ! production versions do not necessarily handle all features needed to rebuild GCC. ! In general, the current versions of these tools from ! [44]ftp://ftp.gnu.org/gnu/ will work. At present, Autoconf 2.50 is not supported, and you will need to use Autoconf 2.13; work is in progress to fix this problem. Also look at ! [45]ftp://gcc.gnu.org/pub/gcc/infrastructure/ for any special versions of packages. _________________________________________________________________ Why can't I build a shared library? ! When building a shared library you may get an error message from the linker like `assert pure-text failed:' or `DP relative code in file'. ! This kind of error occurs when you've failed to provide proper flags to gcc when linking the shared library. You can get this error even if all the .o files for the shared library ! were compiled with the proper PIC option. When building a shared ! library, gcc will compile additional code to be included in the ! library. That additional code must also be compiled with the proper PIC option. ! Adding the proper PIC option (-fpic or -fPIC) to the link line which ! creates the shared library will fix this problem on targets that support PIC in this manner. For example: gcc -c -fPIC myfile.c gcc -shared -o libmyfile.so -fPIC myfile.o *************** Why can't I build a shared library? *** 532,561 **** When building C++, the linker says my constructors, destructors or virtual tables are undefined, but I defined them ! The ISO C++ Standard specifies that all virtual methods of a class ! that are not pure-virtual must be defined, but does not require any ! diagnostic for violations of this rule [class.virtual]/8. Based on ! this assumption, GCC will only emit the implicitly defined ! constructors, the assignment operator, the destructor and the virtual ! table of a class in the translation unit that defines its first such non-inline method. ! Therefore, if you fail to define this particular method, the linker ! may complain about the lack of definitions for apparently unrelated ! symbols. Unfortunately, in order to improve this error message, it ! might be necessary to change the linker, and this can't always be done. ! The solution is to ensure that all virtual methods that are not pure ! are defined. Note that a destructor must be defined even if it is declared pure-virtual [class.dtor]/7. _________________________________________________________________ Will GCC someday include an incremental linker? ! Incremental linking is part of the linker, not the compiler. As such, GCC doesn't have anything to do with incremental linking. Depending on ! what platform you use, it may be possible to tell GCC to use the platform's native linker (e.g., Solaris' ild(1)). References --- 536,565 ---- When building C++, the linker says my constructors, destructors or virtual tables are undefined, but I defined them ! The ISO C++ Standard specifies that all virtual methods of a class ! that are not pure-virtual must be defined, but does not require any ! diagnostic for violations of this rule [class.virtual]/8. Based on ! this assumption, GCC will only emit the implicitly defined ! constructors, the assignment operator, the destructor and the virtual ! table of a class in the translation unit that defines its first such non-inline method. ! Therefore, if you fail to define this particular method, the linker ! may complain about the lack of definitions for apparently unrelated ! symbols. Unfortunately, in order to improve this error message, it ! might be necessary to change the linker, and this can't always be done. ! The solution is to ensure that all virtual methods that are not pure ! are defined. Note that a destructor must be defined even if it is declared pure-virtual [class.dtor]/7. _________________________________________________________________ Will GCC someday include an incremental linker? ! Incremental linking is part of the linker, not the compiler. As such, GCC doesn't have anything to do with incremental linking. Depending on ! what platform you use, it may be possible to tell GCC to use the platform's native linker (e.g., Solaris' ild(1)). References *************** References *** 570,585 **** 8. http://gcc.gnu.org/faq.html#gcc 9. http://gcc.gnu.org/faq.html#cygnus 10. http://gcc.gnu.org/faq.html#open-development ! 11. http://gcc.gnu.org/faq.html#bugreport ! 12. http://gcc.gnu.org/faq.html#support ! 13. http://gcc.gnu.org/faq.html#platforms ! 14. http://gcc.gnu.org/faq.html#installation ! 15. http://gcc.gnu.org/faq.html#multiple 16. http://gcc.gnu.org/faq.html#rpath ! 17. http://gcc.gnu.org/faq.html#rpath ! 18. http://gcc.gnu.org/faq.html#gas ! 19. http://gcc.gnu.org/faq.html#environ ! 20. http://gcc.gnu.org/faq.html#optimizing 21. http://gcc.gnu.org/faq.html#testsuite 22. http://gcc.gnu.org/faq.html#dejagnu 23. http://gcc.gnu.org/faq.html#testoptions --- 574,589 ---- 8. http://gcc.gnu.org/faq.html#gcc 9. http://gcc.gnu.org/faq.html#cygnus 10. http://gcc.gnu.org/faq.html#open-development ! 11. http://gcc.gnu.org/faq.html#support ! 12. http://gcc.gnu.org/faq.html#platforms ! 13. http://gcc.gnu.org/faq.html#installation ! 14. http://gcc.gnu.org/faq.html#multiple ! 15. http://gcc.gnu.org/faq.html#rpath 16. http://gcc.gnu.org/faq.html#rpath ! 17. http://gcc.gnu.org/faq.html#gas ! 18. http://gcc.gnu.org/faq.html#environ ! 19. http://gcc.gnu.org/faq.html#optimizing ! 20. http://gcc.gnu.org/faq.html#iconv 21. http://gcc.gnu.org/faq.html#testsuite 22. http://gcc.gnu.org/faq.html#dejagnu 23. http://gcc.gnu.org/faq.html#testoptions *************** References *** 597,610 **** 35. http://gcc.gnu.org/steering.html 36. http://gcc.gnu.org/faq.html#cathedral-vs-bazaar 37. http://gcc.gnu.org/bugs.html ! 38. http://gcc.gnu.org/bugs.html ! 39. http://gcc.gnu.org/bugs.html ! 40. http://gcc.gnu.org/install/specific.html ! 41. http://gcc.gnu.org/buildstat.html ! 42. http://gcc.gnu.org/faq.html#gas ! 43. http://gcc.gnu.org/install/specific.html ! 44. http://www.gnu.org/software/dejagnu/dejagnu.html ! 45. http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00700/sstream ! 46. http://www.codesourcery.com/cxx-abi/ ! 47. ftp://ftp.gnu.org/gnu/ ! 48. ftp://gcc.gnu.org/pub/gcc/infrastructure/ --- 601,611 ---- 35. http://gcc.gnu.org/steering.html 36. http://gcc.gnu.org/faq.html#cathedral-vs-bazaar 37. http://gcc.gnu.org/bugs.html ! 38. http://gcc.gnu.org/install/specific.html ! 39. http://gcc.gnu.org/buildstat.html ! 40. http://gcc.gnu.org/faq.html#gas ! 41. http://gcc.gnu.org/install/specific.html ! 42. http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00700/sstream ! 43. http://www.codesourcery.com/cxx-abi/ ! 44. ftp://ftp.gnu.org/gnu/ ! 45. ftp://gcc.gnu.org/pub/gcc/infrastructure/ diff -Nrc3pad gcc-3.2.3/faq.html gcc-3.3/faq.html *** gcc-3.2.3/faq.html 2003-04-22 06:56:29.000000000 +0000 --- gcc-3.3/faq.html 2003-05-14 00:18:25.000000000 +0000 *************** Information page.

*** 32,38 ****
  • What is the relationship between GCC and EGCS?
  • What is the relationship between GCC and Cygnus / Red Hat?
  • What is an open development model?
  • -
  • How do I report a bug?
  • How do I get a bug fixed or a feature added?
  • Does GCC work on my platform?
  • --- 32,37 ---- *************** Information page.

    *** 45,50 **** --- 44,50 ----
  • GCC can not find GNU as/GNU ld
  • cpp: Usage:... Error
  • Optimizing the compiler itself
  • +
  • Why does libiconv get linked into jc1 on Solaris?
  • Testsuite problems *************** than we've had before.

    *** 159,206 **** past few months. The paper which started all of this introduced two terms: A cathedral development model versus a bazaar development model. The paper is written by Eric S. Raymond, it is ! called ``The Cathedral and the Bazaar''. The paper is a useful starting point for discussions. -
    !

    How do I report a bug?

    ! !

    There are complete instructions here.

    ! ! !
    !

    How do I get a bug fixed or a feature added?

    There are lots of ways to get something fixed. The list below may be incomplete, but it covers many of the common cases. These are listed ! roughly in order of increasing difficulty for the average GCC user, meaning someone who is not skilled in the internals of GCC, and where difficulty is measured in terms of the time required to fix the bug. No alternative is better than any other; each has its benefits and disadvantages.

      !
    • Hire someone to fix it for you. There are various companies and ! individuals providing support for GCC. This alternative costs ! money, but is relatively likely to get results.
    • !
    • Report the problem to the GCC GNATS bug tracking system and hope that someone will be kind enough to fix it for you. While this is certainly possible, and often happens, there is no guarantee that it will. You should not expect the same response from this method that you would see from a commercial support organization since the people who read GCC bug reports, if they choose to help you, will be volunteering their ! time. This alternative will work best if you follow the directions ! on submitting bugreports.
    • !
    • Fix it yourself. This alternative will probably bring results, ! if you work hard enough, but will probably take a lot of time, ! and, depending on the quality of your work and the perceived ! benefits of your changes, your code may or may not ever make it ! into an official release of GCC.

    --- 159,200 ---- past few months. The paper which started all of this introduced two terms: A cathedral development model versus a bazaar development model. The paper is written by Eric S. Raymond, it is ! called ``The Cathedral and the Bazaar''. The paper is a useful starting point for discussions.
    ! !

    How do I get a bug fixed or ! a feature added?

    There are lots of ways to get something fixed. The list below may be incomplete, but it covers many of the common cases. These are listed ! roughly in order of decreasing difficulty for the average GCC user, meaning someone who is not skilled in the internals of GCC, and where difficulty is measured in terms of the time required to fix the bug. No alternative is better than any other; each has its benefits and disadvantages.

      !
    • Fix it yourself. This alternative will probably bring results, ! if you work hard enough, but will probably take a lot of time, ! and, depending on the quality of your work and the perceived ! benefits of your changes, your code may or may not ever make it ! into an official release of GCC.
    • !
    • Report the problem to the GCC bug tracking system and hope that someone will be kind enough to fix it for you. While this is certainly possible, and often happens, there is no guarantee that it will. You should not expect the same response from this method that you would see from a commercial support organization since the people who read GCC bug reports, if they choose to help you, will be volunteering their ! time.
    • !
    • Hire someone to fix it for you. There are various companies and ! individuals providing support for GCC. This alternative costs ! money, but is relatively likely to get results.

    *************** test the -fssa option, you *** 384,403 ****
    make BOOT_CFLAGS="-O2 -fssa" bootstrap
    -
    ! !

    Testsuite problems

    !

    Unable to run the testsuite

    !

    If you get a message about unable to find "standard.exp" when trying to ! run the GCC testsuites, then your dejagnu is too old to run the GCC tests. ! You will need to get a newer version of dejagnu from ! ! http://www.gnu.org/software/dejagnu/dejagnu.html.


    How do I pass flags like -fnew-abi to the testsuite?

    --- 378,409 ----
    make BOOT_CFLAGS="-O2 -fssa" bootstrap

    !

    Why does libiconv get linked into jc1 on Solaris?

    !

    The Java front end requires iconv. If the compiler ! used to bootstrap GCC finds libiconv (because the GNU ! version of libiconv has been installed in the same prefix ! as the bootstrap compiler), but the newly built GCC does not find the ! library (because it will be installed with a different prefix), then a ! link-time error will occur when building jc1. This ! problem does not show up so often on platforms that have ! libiconv in a default location (like ! /usr/lib) because then both compilers can find a library ! named libiconv, even though it is a different ! library.

    !

    Using --disable-nls at configure-time does not ! prevent this problem because jc1 uses ! iconv even in that case. Solutions include temporarily ! removing the GNU libiconv, copying it to a default ! location such as /usr/lib/, and using ! --enable-languages at configure-time to disable Java.


    + +

    Testsuite problems

    +

    How do I pass flags like -fnew-abi to the testsuite?

    diff -Nrc3pad gcc-3.2.3/gcc/ABOUT-GCC-NLS gcc-3.3/gcc/ABOUT-GCC-NLS *** gcc-3.2.3/gcc/ABOUT-GCC-NLS 2001-04-22 22:33:45.000000000 +0000 --- gcc-3.3/gcc/ABOUT-GCC-NLS 2002-09-18 05:07:02.000000000 +0000 *************** Some work remains in other areas; for ex *** 5,23 **** non-ASCII letters in identifiers. Not all of GCC's diagnostic messages have been internationalized. Programs ! like `enquire' and `genattr' (in fact all gen* programs) are not ! internationalized, as their users are GCC maintainers who typically need ! to be able to read English anyway; internationalizing them would thus ! entail needless work for the human translators. Messages used for ! debugging, such as used in dumped tables, should also not be translated. The GCC library should not contain any messages that need internationalization, because it operates below the internationalization library. - Currently, the only language translation supplied is en_UK (British - English). - Unlike some other GNU programs, the GCC sources contain few instances of explicit translation calls like _("string"). Instead, the diagnostic printing routines automatically translate their arguments. --- 5,20 ---- non-ASCII letters in identifiers. Not all of GCC's diagnostic messages have been internationalized. Programs ! like `genattr' (in fact all gen* programs) are not internationalized, as ! their users are GCC maintainers who typically need to be able to read ! English anyway; internationalizing them would thus entail needless work for ! the human translators. Messages used for debugging, such as used in dumped ! tables, should also not be translated. The GCC library should not contain any messages that need internationalization, because it operates below the internationalization library. Unlike some other GNU programs, the GCC sources contain few instances of explicit translation calls like _("string"). Instead, the diagnostic printing routines automatically translate their arguments. diff -Nrc3pad gcc-3.2.3/gcc/ABOUT-NLS gcc-3.3/gcc/ABOUT-NLS *** gcc-3.2.3/gcc/ABOUT-NLS 2001-10-12 17:23:46.000000000 +0000 --- gcc-3.3/gcc/ABOUT-NLS 2002-09-16 11:41:45.000000000 +0000 *************** library will be used. This library is w *** 60,66 **** package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default ! behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls --- 60,66 ---- package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default ! behavior. The commands: ./configure --with-included-gettext ./configure --disable-nls diff -Nrc3pad gcc-3.2.3/gcc/aclocal.m4 gcc-3.3/gcc/aclocal.m4 *** gcc-3.2.3/gcc/aclocal.m4 2002-01-22 22:48:45.000000000 +0000 --- gcc-3.3/gcc/aclocal.m4 2003-01-13 17:23:58.000000000 +0000 *************** procedure conftest is begin null; end co *** 306,315 **** EOF gcc_cv_prog_adac=no # Have to do ac_tool_prefix and user overrides by hand. ! user_adac=$ADAC ! user_cc=$CC ! for cand in ${ac_tool_prefix}$user_adac $user_adac \ ! ${ac_tool_prefix}$user_cc $user_cc \ ${ac_tool_prefix}gcc gcc \ ${ac_tool_prefix}cc cc \ ${ac_tool_prefix}gnatgcc gnatgcc \ --- 306,312 ---- EOF gcc_cv_prog_adac=no # Have to do ac_tool_prefix and user overrides by hand. ! for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ ${ac_tool_prefix}gcc gcc \ ${ac_tool_prefix}cc cc \ ${ac_tool_prefix}gnatgcc gnatgcc \ *************** AC_CACHE_CHECK(for working mmap from /de *** 660,673 **** then ac_cv_func_mmap_dev_zero=no else ac_cv_func_mmap_dev_zero=buggy fi], ! # If this is not cygwin, and /dev/zero is a character device, it's probably ! # safe to assume it works. [case "$host_os" in cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; ! * ) if test -c /dev/zero ! then ac_cv_func_mmap_dev_zero=yes ! else ac_cv_func_mmap_dev_zero=no ! fi ;; esac]) ]) if test $ac_cv_func_mmap_dev_zero = yes; then --- 657,669 ---- then ac_cv_func_mmap_dev_zero=no else ac_cv_func_mmap_dev_zero=buggy fi], ! # When cross-building, assume that this works, unless we know it ! # doesn't. Of course, we have no way of knowing if there even is a /dev/zero ! # on the host, let alone whether mmap will work on it. [case "$host_os" in cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; ! darwin* ) ac_cv_func_mmap_dev_zero=no ;; ! * ) ac_cv_func_mmap_dev_zero=yes ;; esac]) ]) if test $ac_cv_func_mmap_dev_zero = yes; then *************** AC_CACHE_CHECK([for working mmap with MA *** 687,693 **** fi], # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works # just because it's there. Some SCO Un*xen define it but don't implement it. ! ac_cv_func_mmap_anon=no) ]) if test $ac_cv_func_mmap_anon = yes; then AC_DEFINE(HAVE_MMAP_ANON, 1, --- 683,692 ---- fi], # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works # just because it's there. Some SCO Un*xen define it but don't implement it. ! [case "$host_os" in ! darwin* ) ac_cv_func_mmap_anon=yes ;; ! * ) ac_cv_func_mmap_anon=no ;; ! esac]) ]) if test $ac_cv_func_mmap_anon = yes; then AC_DEFINE(HAVE_MMAP_ANON, 1, *************** int main() *** 740,746 **** exit(0); }], ac_cv_func_mmap_file=yes, ac_cv_func_mmap_file=no, ! ac_cv_func_mmap_file=no)]) if test $ac_cv_func_mmap_file = yes; then AC_DEFINE(HAVE_MMAP_FILE, 1, [Define if read-only mmap of a plain file works.]) --- 739,748 ---- exit(0); }], ac_cv_func_mmap_file=yes, ac_cv_func_mmap_file=no, ! [case "$host_os" in ! darwin* ) ac_cv_func_mmap_file=yes ;; ! * ) ac_cv_func_mmap_file=no ;; ! esac])]) if test $ac_cv_func_mmap_file = yes; then AC_DEFINE(HAVE_MMAP_FILE, 1, [Define if read-only mmap of a plain file works.]) *************** strdup strtoul tsearch __argz_count __ar *** 1690,1692 **** --- 1692,1720 ---- INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) + + AC_DEFUN(gcc_AC_INITFINI_ARRAY, + [AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, + gcc_cv_initfinit_array, [dnl + cat > conftest.c <&AS_MESSAGE_LOG_FD]) + then + if ./conftest; then + gcc_cv_initfinit_array=yes + else + gcc_cv_initfinit_array=no + fi + else + gcc_cv_initfinit_array=no + fi + rm -f conftest*]) + AC_SUBST(gcc_cv_initfinit_array) + if test $gcc_cv_initfinit_array = yes; then + AC_DEFINE(HAVE_INITFINI_ARRAY, 1, + [Define .init_array/.fini_array sections are available and working.]) + fi]) diff -Nrc3pad gcc-3.2.3/gcc/alias.c gcc-3.3/gcc/alias.c *** gcc-3.2.3/gcc/alias.c 2003-02-03 18:01:34.000000000 +0000 --- gcc-3.3/gcc/alias.c 2003-01-07 20:58:20.000000000 +0000 *************** *** 1,5 **** /* Alias analysis for GNU C ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by John Carr (jfc@mit.edu). This file is part of GCC. --- 1,6 ---- /* Alias analysis for GNU C ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. Contributed by John Carr (jfc@mit.edu). This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 36,41 **** --- 37,43 ---- #include "splay-tree.h" #include "ggc.h" #include "langhooks.h" + #include "target.h" /* The alias sets assigned to MEMs assist the back-end in determining which MEMs can alias which other MEMs. In general, two MEMs in *************** typedef struct alias_set_entry *** 75,81 **** /* The children of the alias set. These are not just the immediate children, but, in fact, all descendents. So, if we have: ! struct T { struct S s; float f; } continuing our example above, the children here will be all of `int', `double', `float', and `struct S'. */ --- 77,83 ---- /* The children of the alias set. These are not just the immediate children, but, in fact, all descendents. So, if we have: ! struct T { struct S s; float f; } continuing our example above, the children here will be all of `int', `double', `float', and `struct S'. */ *************** static tree decl_for_component_ref PARAM *** 108,114 **** --- 110,122 ---- static rtx adjust_offset_for_component_ref PARAMS ((tree, rtx)); static int nonoverlapping_memrefs_p PARAMS ((rtx, rtx)); static int write_dependence_p PARAMS ((rtx, rtx, int)); + + static int nonlocal_mentioned_p_1 PARAMS ((rtx *, void *)); static int nonlocal_mentioned_p PARAMS ((rtx)); + static int nonlocal_referenced_p_1 PARAMS ((rtx *, void *)); + static int nonlocal_referenced_p PARAMS ((rtx)); + static int nonlocal_set_p_1 PARAMS ((rtx *, void *)); + static int nonlocal_set_p PARAMS ((rtx)); /* Set up all info needed to perform alias analysis on memory references. */ *************** static int nonlocal_mentioned_p *** 125,131 **** /* Cap the number of passes we make over the insns propagating alias information through set chains. 10 is a completely arbitrary choice. */ #define MAX_ALIAS_LOOP_PASSES 10 ! /* reg_base_value[N] gives an address to which register N is related. If all sets after the first add or subtract to the current value or otherwise modify it so it does not point to a different top level --- 133,139 ---- /* Cap the number of passes we make over the insns propagating alias information through set chains. 10 is a completely arbitrary choice. */ #define MAX_ALIAS_LOOP_PASSES 10 ! /* reg_base_value[N] gives an address to which register N is related. If all sets after the first add or subtract to the current value or otherwise modify it so it does not point to a different top level *************** static int nonlocal_mentioned_p *** 134,140 **** A base address can be an ADDRESS, SYMBOL_REF, or LABEL_REF. ADDRESS expressions represent certain special values: function arguments and ! the stack, frame, and argument pointers. The contents of an ADDRESS is not normally used, the mode of the ADDRESS determines whether the ADDRESS is a function argument or some --- 142,148 ---- A base address can be an ADDRESS, SYMBOL_REF, or LABEL_REF. ADDRESS expressions represent certain special values: function arguments and ! the stack, frame, and argument pointers. The contents of an ADDRESS is not normally used, the mode of the ADDRESS determines whether the ADDRESS is a function argument or some *************** static int nonlocal_mentioned_p *** 145,154 **** current function performs nonlocal memory memory references for the purposes of marking the function as a constant function. */ ! static rtx *reg_base_value; static rtx *new_reg_base_value; static unsigned int reg_base_value_size; /* size of reg_base_value array */ #define REG_BASE_VALUE(X) \ (REGNO (X) < reg_base_value_size \ ? reg_base_value[REGNO (X)] : 0) --- 153,166 ---- current function performs nonlocal memory memory references for the purposes of marking the function as a constant function. */ ! static GTY((length ("reg_base_value_size"))) rtx *reg_base_value; static rtx *new_reg_base_value; static unsigned int reg_base_value_size; /* size of reg_base_value array */ + /* Static hunks of RTL used by the aliasing code; these are initialized + once per function to avoid unnecessary RTL allocations. */ + static GTY (()) rtx static_reg_base_value[FIRST_PSEUDO_REGISTER]; + #define REG_BASE_VALUE(X) \ (REGNO (X) < reg_base_value_size \ ? reg_base_value[REGNO (X)] : 0) *************** char *reg_known_equiv_p; *** 188,194 **** /* True when scanning insns from the start of the rtl to the NOTE_INSN_FUNCTION_BEG note. */ ! static int copying_arguments; /* The splay-tree used to store the various alias set entries. */ static splay_tree alias_sets; --- 200,206 ---- /* True when scanning insns from the start of the rtl to the NOTE_INSN_FUNCTION_BEG note. */ ! static bool copying_arguments; /* The splay-tree used to store the various alias set entries. */ static splay_tree alias_sets; *************** get_alias_set_entry (alias_set) *** 209,220 **** /* Returns nonzero if the alias sets for MEM1 and MEM2 are such that the two MEMs cannot alias each other. */ ! static int mems_in_disjoint_alias_sets_p (mem1, mem2) rtx mem1; rtx mem2; { ! #ifdef ENABLE_CHECKING /* Perform a basic sanity check. Namely, that there are no alias sets if we're not using strict aliasing. This helps to catch bugs whereby someone uses PUT_CODE, but doesn't clear MEM_ALIAS_SET, or --- 221,232 ---- /* Returns nonzero if the alias sets for MEM1 and MEM2 are such that the two MEMs cannot alias each other. */ ! static int mems_in_disjoint_alias_sets_p (mem1, mem2) rtx mem1; rtx mem2; { ! #ifdef ENABLE_CHECKING /* Perform a basic sanity check. Namely, that there are no alias sets if we're not using strict aliasing. This helps to catch bugs whereby someone uses PUT_CODE, but doesn't clear MEM_ALIAS_SET, or *************** get_alias_set (t) *** 508,515 **** else { DECL_POINTER_ALIAS_SET (decl) = new_alias_set (); ! record_alias_subset (pointed_to_alias_set, ! DECL_POINTER_ALIAS_SET (decl)); } } --- 520,527 ---- else { DECL_POINTER_ALIAS_SET (decl) = new_alias_set (); ! record_alias_subset (pointed_to_alias_set, ! DECL_POINTER_ALIAS_SET (decl)); } } *************** new_alias_set () *** 603,609 **** not vice versa. For example, in C, a store to an `int' can alias a structure containing an `int', but not vice versa. Here, the structure would be the SUPERSET and `int' the SUBSET. This ! function should be called only once per SUPERSET/SUBSET pair. It is illegal for SUPERSET to be zero; everything is implicitly a subset of alias set zero. */ --- 615,621 ---- not vice versa. For example, in C, a store to an `int' can alias a structure containing an `int', but not vice versa. Here, the structure would be the SUPERSET and `int' the SUBSET. This ! function should be called only once per SUPERSET/SUBSET pair. It is illegal for SUPERSET to be zero; everything is implicitly a subset of alias set zero. */ *************** record_alias_subset (superset, subset) *** 625,638 **** abort (); superset_entry = get_alias_set_entry (superset); ! if (superset_entry == 0) { /* Create an entry for the SUPERSET, so that we have a place to attach the SUBSET. */ superset_entry = (alias_set_entry) xmalloc (sizeof (struct alias_set_entry)); superset_entry->alias_set = superset; ! superset_entry->children = splay_tree_new (splay_tree_compare_ints, 0, 0); superset_entry->has_zero_child = 0; splay_tree_insert (alias_sets, (splay_tree_key) superset, --- 637,650 ---- abort (); superset_entry = get_alias_set_entry (superset); ! if (superset_entry == 0) { /* Create an entry for the SUPERSET, so that we have a place to attach the SUBSET. */ superset_entry = (alias_set_entry) xmalloc (sizeof (struct alias_set_entry)); superset_entry->alias_set = superset; ! superset_entry->children = splay_tree_new (splay_tree_compare_ints, 0, 0); superset_entry->has_zero_child = 0; splay_tree_insert (alias_sets, (splay_tree_key) superset, *************** record_alias_subset (superset, subset) *** 646,652 **** subset_entry = get_alias_set_entry (subset); /* If there is an entry for the subset, enter all of its children (if they are not already present) as children of the SUPERSET. */ ! if (subset_entry) { if (subset_entry->has_zero_child) superset_entry->has_zero_child = 1; --- 658,664 ---- subset_entry = get_alias_set_entry (subset); /* If there is an entry for the subset, enter all of its children (if they are not already present) as children of the SUPERSET. */ ! if (subset_entry) { if (subset_entry->has_zero_child) superset_entry->has_zero_child = 1; *************** record_alias_subset (superset, subset) *** 656,662 **** } /* Enter the SUBSET itself as a child of the SUPERSET. */ ! splay_tree_insert (superset_entry->children, (splay_tree_key) subset, 0); } } --- 668,674 ---- } /* Enter the SUBSET itself as a child of the SUPERSET. */ ! splay_tree_insert (superset_entry->children, (splay_tree_key) subset, 0); } } *************** record_component_aliases (type) *** 687,692 **** --- 699,715 ---- case RECORD_TYPE: case UNION_TYPE: case QUAL_UNION_TYPE: + /* Recursively record aliases for the base classes, if there are any */ + if (TYPE_BINFO (type) != NULL && TYPE_BINFO_BASETYPES (type) != NULL) + { + int i; + for (i = 0; i < TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES (type)); i++) + { + tree binfo = TREE_VEC_ELT (TYPE_BINFO_BASETYPES (type), i); + record_alias_subset (superset, + get_alias_set (BINFO_TYPE (binfo))); + } + } for (field = TYPE_FIELDS (type); field != 0; field = TREE_CHAIN (field)) if (TREE_CODE (field) == FIELD_DECL && ! DECL_NONADDRESSABLE_P (field)) record_alias_subset (superset, get_alias_set (TREE_TYPE (field))); *************** find_base_value (src) *** 759,767 **** The test above is not sufficient because the scheduler may move a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN. */ if ((regno >= FIRST_PSEUDO_REGISTER || fixed_regs[regno]) ! && regno < reg_base_value_size ! && reg_base_value[regno]) ! return reg_base_value[regno]; return src; --- 782,798 ---- The test above is not sufficient because the scheduler may move a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN. */ if ((regno >= FIRST_PSEUDO_REGISTER || fixed_regs[regno]) ! && regno < reg_base_value_size) ! { ! /* If we're inside init_alias_analysis, use new_reg_base_value ! to reduce the number of relaxation iterations. */ ! if (new_reg_base_value && new_reg_base_value[regno] ! && REG_N_SETS (regno) == 1) ! return new_reg_base_value[regno]; ! ! if (reg_base_value[regno]) ! return reg_base_value[regno]; ! } return src; *************** rtx_equal_for_memref_p (x, y) *** 1111,1117 **** case LABEL_REF: return XEXP (x, 0) == XEXP (y, 0); ! case SYMBOL_REF: return XSTR (x, 0) == XSTR (y, 0); --- 1142,1148 ---- case LABEL_REF: return XEXP (x, 0) == XEXP (y, 0); ! case SYMBOL_REF: return XSTR (x, 0) == XSTR (y, 0); *************** find_base_term (x) *** 1248,1254 **** case TRUNCATE: if (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (Pmode)) ! return 0; /* Fall through. */ case HIGH: case PRE_INC: --- 1279,1285 ---- case TRUNCATE: if (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (Pmode)) ! return 0; /* Fall through. */ case HIGH: case PRE_INC: *************** find_base_term (x) *** 1302,1308 **** tests can certainly be added. For example, if one of the operands is a shift or multiply, then it must be the index register and the other operand is the base register. */ ! if (tmp1 == pic_offset_table_rtx && CONSTANT_P (tmp2)) return find_base_term (tmp2); --- 1333,1339 ---- tests can certainly be added. For example, if one of the operands is a shift or multiply, then it must be the index register and the other operand is the base register. */ ! if (tmp1 == pic_offset_table_rtx && CONSTANT_P (tmp2)) return find_base_term (tmp2); *************** base_alias_check (x, y, x_mode, y_mode) *** 1400,1406 **** if (rtx_equal_p (x_base, y_base)) return 1; ! /* The base addresses of the read and write are different expressions. If they are both symbols and they are not accessed via AND, there is no conflict. We can bring knowledge of object alignment into play here. For example, on alpha, "char a, b;" can alias one another, --- 1431,1437 ---- if (rtx_equal_p (x_base, y_base)) return 1; ! /* The base addresses of the read and write are different expressions. If they are both symbols and they are not accessed via AND, there is no conflict. We can bring knowledge of object alignment into play here. For example, on alpha, "char a, b;" can alias one another, *************** addr_side_effect_eval (addr, size, n_ref *** 1475,1481 **** int n_refs; { int offset = 0; ! switch (GET_CODE (addr)) { case PRE_INC: --- 1506,1512 ---- int n_refs; { int offset = 0; ! switch (GET_CODE (addr)) { case PRE_INC: *************** addr_side_effect_eval (addr, size, n_ref *** 1494,1500 **** default: return addr; } ! if (offset) addr = gen_rtx_PLUS (GET_MODE (addr), XEXP (addr, 0), GEN_INT (offset)); else --- 1525,1531 ---- default: return addr; } ! if (offset) addr = gen_rtx_PLUS (GET_MODE (addr), XEXP (addr, 0), GEN_INT (offset)); else *************** memrefs_conflict_p (xsize, x, ysize, y, *** 1657,1663 **** } /* Treat an access through an AND (e.g. a subword access on an Alpha) ! as an access with indeterminate size. Assume that references besides AND are aligned, so if the size of the other reference is at least as large as the alignment, assume no other overlap. */ if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT) --- 1688,1694 ---- } /* Treat an access through an AND (e.g. a subword access on an Alpha) ! as an access with indeterminate size. Assume that references besides AND are aligned, so if the size of the other reference is at least as large as the alignment, assume no other overlap. */ if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT) *************** memrefs_conflict_p (xsize, x, ysize, y, *** 1669,1675 **** if (GET_CODE (y) == AND && GET_CODE (XEXP (y, 1)) == CONST_INT) { /* ??? If we are indexing far enough into the array/structure, we ! may yet be able to determine that we can not overlap. But we also need to that we are far enough from the end not to overlap a following reference, so we do nothing with that for now. */ if (GET_CODE (x) == AND || xsize < -INTVAL (XEXP (y, 1))) --- 1700,1706 ---- if (GET_CODE (y) == AND && GET_CODE (XEXP (y, 1)) == CONST_INT) { /* ??? If we are indexing far enough into the array/structure, we ! may yet be able to determine that we can not overlap. But we also need to that we are far enough from the end not to overlap a following reference, so we do nothing with that for now. */ if (GET_CODE (x) == AND || xsize < -INTVAL (XEXP (y, 1))) *************** memrefs_conflict_p (xsize, x, ysize, y, *** 1731,1737 **** If both memory references are volatile, then there must always be a dependence between the two references, since their order can not be changed. A volatile and non-volatile reference can be interchanged ! though. A MEM_IN_STRUCT reference at a non-AND varying address can never conflict with a non-MEM_IN_STRUCT reference at a fixed address. We --- 1762,1768 ---- If both memory references are volatile, then there must always be a dependence between the two references, since their order can not be changed. A volatile and non-volatile reference can be interchanged ! though. A MEM_IN_STRUCT reference at a non-AND varying address can never conflict with a non-MEM_IN_STRUCT reference at a fixed address. We *************** read_dependence (mem, x) *** 1758,1780 **** to decide whether or not an address may vary; it should return nonzero whenever variation is possible. MEM1_ADDR and MEM2_ADDR are the addresses of MEM1 and MEM2. */ ! static rtx fixed_scalar_and_varying_struct_p (mem1, mem2, mem1_addr, mem2_addr, varies_p) rtx mem1, mem2; rtx mem1_addr, mem2_addr; int (*varies_p) PARAMS ((rtx, int)); ! { if (! flag_strict_aliasing) return NULL_RTX; ! if (MEM_SCALAR_P (mem1) && MEM_IN_STRUCT_P (mem2) && !varies_p (mem1_addr, 1) && varies_p (mem2_addr, 1)) /* MEM1 is a scalar at a fixed address; MEM2 is a struct at a varying address. */ return mem1; ! if (MEM_IN_STRUCT_P (mem1) && MEM_SCALAR_P (mem2) && varies_p (mem1_addr, 1) && !varies_p (mem2_addr, 1)) /* MEM2 is a scalar at a fixed address; MEM1 is a struct at a varying address. */ --- 1789,1811 ---- to decide whether or not an address may vary; it should return nonzero whenever variation is possible. MEM1_ADDR and MEM2_ADDR are the addresses of MEM1 and MEM2. */ ! static rtx fixed_scalar_and_varying_struct_p (mem1, mem2, mem1_addr, mem2_addr, varies_p) rtx mem1, mem2; rtx mem1_addr, mem2_addr; int (*varies_p) PARAMS ((rtx, int)); ! { if (! flag_strict_aliasing) return NULL_RTX; ! if (MEM_SCALAR_P (mem1) && MEM_IN_STRUCT_P (mem2) && !varies_p (mem1_addr, 1) && varies_p (mem2_addr, 1)) /* MEM1 is a scalar at a fixed address; MEM2 is a struct at a varying address. */ return mem1; ! if (MEM_IN_STRUCT_P (mem1) && MEM_SCALAR_P (mem2) && varies_p (mem1_addr, 1) && !varies_p (mem2_addr, 1)) /* MEM2 is a scalar at a fixed address; MEM1 is a struct at a varying address. */ *************** aliases_everything_p (mem) *** 1794,1800 **** /* If the address is an AND, its very hard to know at what it is actually pointing. */ return 1; ! return 0; } --- 1825,1831 ---- /* If the address is an AND, its very hard to know at what it is actually pointing. */ return 1; ! return 0; } *************** nonoverlapping_component_refs_p (x, y) *** 1852,1858 **** while (x && y && TREE_CODE (x) == COMPONENT_REF && TREE_CODE (y) == COMPONENT_REF); ! return false; } --- 1883,1889 ---- while (x && y && TREE_CODE (x) == COMPONENT_REF && TREE_CODE (y) == COMPONENT_REF); ! return false; } *************** adjust_offset_for_component_ref (x, offs *** 1885,1891 **** return NULL_RTX; ioffset = INTVAL (offset); ! do { tree field = TREE_OPERAND (x, 1); --- 1916,1922 ---- return NULL_RTX; ioffset = INTVAL (offset); ! do { tree field = TREE_OPERAND (x, 1); *************** nonoverlapping_memrefs_p (x, y) *** 1986,2000 **** offsety = INTVAL (XEXP (basey, 1)), basey = XEXP (basey, 0); /* If the bases are different, we know they do not overlap if both ! are constants or if one is a constant and the other a pointer into the stack frame. Otherwise a different base means we can't tell if they overlap or not. */ if (! rtx_equal_p (basex, basey)) ! return ((CONSTANT_P (basex) && CONSTANT_P (basey)) ! || (CONSTANT_P (basex) && REG_P (basey) ! && REGNO_PTR_FRAME_P (REGNO (basey))) ! || (CONSTANT_P (basey) && REG_P (basex) ! && REGNO_PTR_FRAME_P (REGNO (basex)))); sizex = (GET_CODE (rtlx) != MEM ? (int) GET_MODE_SIZE (GET_MODE (rtlx)) : MEM_SIZE (rtlx) ? INTVAL (MEM_SIZE (rtlx)) --- 2017,2031 ---- offsety = INTVAL (XEXP (basey, 1)), basey = XEXP (basey, 0); /* If the bases are different, we know they do not overlap if both ! are constants or if one is a constant and the other a pointer into the stack frame. Otherwise a different base means we can't tell if they overlap or not. */ if (! rtx_equal_p (basex, basey)) ! return ((CONSTANT_P (basex) && CONSTANT_P (basey)) ! || (CONSTANT_P (basex) && REG_P (basey) ! && REGNO_PTR_FRAME_P (REGNO (basey))) ! || (CONSTANT_P (basey) && REG_P (basex) ! && REGNO_PTR_FRAME_P (REGNO (basex)))); sizex = (GET_CODE (rtlx) != MEM ? (int) GET_MODE_SIZE (GET_MODE (rtlx)) : MEM_SIZE (rtlx) ? INTVAL (MEM_SIZE (rtlx)) *************** true_dependence (mem, mem_mode, x, varie *** 2111,2119 **** } /* Canonical true dependence: X is read after store in MEM takes place. ! Variant of true_dependence which assumes MEM has already been ! canonicalized (hence we no longer do that here). ! The mem_addr argument has been added, since true_dependence computed this value prior to canonicalizing. */ int --- 2142,2150 ---- } /* Canonical true dependence: X is read after store in MEM takes place. ! Variant of true_dependence which assumes MEM has already been ! canonicalized (hence we no longer do that here). ! The mem_addr argument has been added, since true_dependence computed this value prior to canonicalizing. */ int *************** canon_true_dependence (mem, mem_mode, me *** 2177,2184 **** varies); } ! /* Returns non-zero if a write to X might alias a previous read from ! (or, if WRITEP is non-zero, a write to) MEM. */ static int write_dependence_p (mem, x, writep) --- 2208,2215 ---- varies); } ! /* Returns nonzero if a write to X might alias a previous read from ! (or, if WRITEP is nonzero, a write to) MEM. */ static int write_dependence_p (mem, x, writep) *************** write_dependence_p (mem, x, writep) *** 2239,2245 **** SIZE_FOR_MODE (x), x_addr, 0)) return 0; ! fixed_scalar = fixed_scalar_and_varying_struct_p (mem, x, mem_addr, x_addr, rtx_addr_varies_p); --- 2270,2276 ---- SIZE_FOR_MODE (x), x_addr, 0)) return 0; ! fixed_scalar = fixed_scalar_and_varying_struct_p (mem, x, mem_addr, x_addr, rtx_addr_varies_p); *************** output_dependence (mem, x) *** 2266,2301 **** { return write_dependence_p (mem, x, /*writep=*/1); } ! ! /* Returns non-zero if X mentions something which is not ! local to the function and is not constant. */ static int ! nonlocal_mentioned_p (x) ! rtx x; { rtx base; - RTX_CODE code; int regno; ! code = GET_CODE (x); ! ! if (GET_RTX_CLASS (code) == 'i') ! { ! /* Constant functions can be constant if they don't use ! scratch memory used to mark function w/o side effects. */ ! if (code == CALL_INSN && CONST_OR_PURE_CALL_P (x)) ! { ! x = CALL_INSN_FUNCTION_USAGE (x); ! if (x == 0) ! return 0; ! } ! else ! x = PATTERN (x); ! code = GET_CODE (x); ! } ! switch (code) { case SUBREG: if (GET_CODE (SUBREG_REG (x)) == REG) --- 2297,2319 ---- { return write_dependence_p (mem, x, /*writep=*/1); } ! ! /* A subroutine of nonlocal_mentioned_p, returns 1 if *LOC mentions ! something which is not local to the function and is not constant. */ static int ! nonlocal_mentioned_p_1 (loc, data) ! rtx *loc; ! void *data ATTRIBUTE_UNUSED; { + rtx x = *loc; rtx base; int regno; ! if (! x) ! return 0; ! switch (GET_CODE (x)) { case SUBREG: if (GET_CODE (SUBREG_REG (x)) == REG) *************** nonlocal_mentioned_p (x) *** 2377,2450 **** break; } ! /* Recursively scan the operands of this expression. */ ! { ! const char *fmt = GET_RTX_FORMAT (code); ! int i; ! ! for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) ! { ! if (fmt[i] == 'e' && XEXP (x, i)) ! { ! if (nonlocal_mentioned_p (XEXP (x, i))) ! return 1; ! } ! else if (fmt[i] == 'E') ! { ! int j; ! for (j = 0; j < XVECLEN (x, i); j++) ! if (nonlocal_mentioned_p (XVECEXP (x, i, j))) ! return 1; ! } ! } ! } return 0; } /* Mark the function if it is constant. */ void mark_constant_function () { rtx insn; ! int nonlocal_mentioned; ! if (TREE_PUBLIC (current_function_decl) ! || TREE_READONLY (current_function_decl) || DECL_IS_PURE (current_function_decl) || TREE_THIS_VOLATILE (current_function_decl) ! || TYPE_MODE (TREE_TYPE (current_function_decl)) == VOIDmode) return; /* A loop might not return which counts as a side effect. */ if (mark_dfs_back_edges ()) return; ! nonlocal_mentioned = 0; init_alias_analysis (); ! /* Determine if this is a constant function. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) ! if (INSN_P (insn) && nonlocal_mentioned_p (insn)) ! { ! nonlocal_mentioned = 1; break; ! } end_alias_analysis (); /* Mark the function. */ ! if (! nonlocal_mentioned) TREE_READONLY (current_function_decl) = 1; } ! ! ! static HARD_REG_SET argument_registers; void init_alias_once () --- 2395,2657 ---- break; } ! return 0; ! } ! /* Returns nonzero if X might mention something which is not ! local to the function and is not constant. */ ! ! static int ! nonlocal_mentioned_p (x) ! rtx x; ! { ! ! if (INSN_P (x)) ! { ! if (GET_CODE (x) == CALL_INSN) ! { ! if (! CONST_OR_PURE_CALL_P (x)) ! return 1; ! x = CALL_INSN_FUNCTION_USAGE (x); ! if (x == 0) ! return 0; ! } ! else ! x = PATTERN (x); ! } ! ! return for_each_rtx (&x, nonlocal_mentioned_p_1, NULL); ! } ! ! /* A subroutine of nonlocal_referenced_p, returns 1 if *LOC references ! something which is not local to the function and is not constant. */ ! ! static int ! nonlocal_referenced_p_1 (loc, data) ! rtx *loc; ! void *data ATTRIBUTE_UNUSED; ! { ! rtx x = *loc; ! ! if (! x) ! return 0; ! ! switch (GET_CODE (x)) ! { ! case MEM: ! case REG: ! case SYMBOL_REF: ! case SUBREG: ! return nonlocal_mentioned_p (x); ! ! case CALL: ! /* Non-constant calls and recursion are not local. */ ! return 1; ! ! case SET: ! if (nonlocal_mentioned_p (SET_SRC (x))) ! return 1; ! ! if (GET_CODE (SET_DEST (x)) == MEM) ! return nonlocal_mentioned_p (XEXP (SET_DEST (x), 0)); ! ! /* If the destination is anything other than a CC0, PC, ! MEM, REG, or a SUBREG of a REG that occupies all of ! the REG, then X references nonlocal memory if it is ! mentioned in the destination. */ ! if (GET_CODE (SET_DEST (x)) != CC0 ! && GET_CODE (SET_DEST (x)) != PC ! && GET_CODE (SET_DEST (x)) != REG ! && ! (GET_CODE (SET_DEST (x)) == SUBREG ! && GET_CODE (SUBREG_REG (SET_DEST (x))) == REG ! && (((GET_MODE_SIZE (GET_MODE (SUBREG_REG (SET_DEST (x)))) ! + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) ! == ((GET_MODE_SIZE (GET_MODE (SET_DEST (x))) ! + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)))) ! return nonlocal_mentioned_p (SET_DEST (x)); ! return 0; ! ! case CLOBBER: ! if (GET_CODE (XEXP (x, 0)) == MEM) ! return nonlocal_mentioned_p (XEXP (XEXP (x, 0), 0)); ! return 0; ! ! case USE: ! return nonlocal_mentioned_p (XEXP (x, 0)); ! ! case ASM_INPUT: ! case UNSPEC_VOLATILE: ! return 1; ! ! case ASM_OPERANDS: ! if (MEM_VOLATILE_P (x)) ! return 1; ! ! /* FALLTHROUGH */ ! ! default: ! break; ! } return 0; } + /* Returns nonzero if X might reference something which is not + local to the function and is not constant. */ + + static int + nonlocal_referenced_p (x) + rtx x; + { + + if (INSN_P (x)) + { + if (GET_CODE (x) == CALL_INSN) + { + if (! CONST_OR_PURE_CALL_P (x)) + return 1; + x = CALL_INSN_FUNCTION_USAGE (x); + if (x == 0) + return 0; + } + else + x = PATTERN (x); + } + + return for_each_rtx (&x, nonlocal_referenced_p_1, NULL); + } + + /* A subroutine of nonlocal_set_p, returns 1 if *LOC sets + something which is not local to the function and is not constant. */ + + static int + nonlocal_set_p_1 (loc, data) + rtx *loc; + void *data ATTRIBUTE_UNUSED; + { + rtx x = *loc; + + if (! x) + return 0; + + switch (GET_CODE (x)) + { + case CALL: + /* Non-constant calls and recursion are not local. */ + return 1; + + case PRE_INC: + case PRE_DEC: + case POST_INC: + case POST_DEC: + case PRE_MODIFY: + case POST_MODIFY: + return nonlocal_mentioned_p (XEXP (x, 0)); + + case SET: + if (nonlocal_mentioned_p (SET_DEST (x))) + return 1; + return nonlocal_set_p (SET_SRC (x)); + + case CLOBBER: + return nonlocal_mentioned_p (XEXP (x, 0)); + + case USE: + return 0; + + case ASM_INPUT: + case UNSPEC_VOLATILE: + return 1; + + case ASM_OPERANDS: + if (MEM_VOLATILE_P (x)) + return 1; + + /* FALLTHROUGH */ + + default: + break; + } + + return 0; + } + + /* Returns nonzero if X might set something which is not + local to the function and is not constant. */ + + static int + nonlocal_set_p (x) + rtx x; + { + + if (INSN_P (x)) + { + if (GET_CODE (x) == CALL_INSN) + { + if (! CONST_OR_PURE_CALL_P (x)) + return 1; + x = CALL_INSN_FUNCTION_USAGE (x); + if (x == 0) + return 0; + } + else + x = PATTERN (x); + } + + return for_each_rtx (&x, nonlocal_set_p_1, NULL); + } + /* Mark the function if it is constant. */ void mark_constant_function () { rtx insn; ! int nonlocal_memory_referenced; ! if (TREE_READONLY (current_function_decl) || DECL_IS_PURE (current_function_decl) || TREE_THIS_VOLATILE (current_function_decl) ! || TYPE_MODE (TREE_TYPE (current_function_decl)) == VOIDmode ! || current_function_has_nonlocal_goto ! || !(*targetm.binds_local_p) (current_function_decl)) return; /* A loop might not return which counts as a side effect. */ if (mark_dfs_back_edges ()) return; ! nonlocal_memory_referenced = 0; init_alias_analysis (); ! /* Determine if this is a constant or pure function. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) ! { ! if (! INSN_P (insn)) ! continue; ! ! if (nonlocal_set_p (insn) || global_reg_mentioned_p (insn) ! || volatile_refs_p (PATTERN (insn))) break; ! ! if (! nonlocal_memory_referenced) ! nonlocal_memory_referenced = nonlocal_referenced_p (insn); ! } end_alias_analysis (); /* Mark the function. */ ! if (insn) ! ; ! else if (nonlocal_memory_referenced) ! DECL_IS_PURE (current_function_decl) = 1; ! else TREE_READONLY (current_function_decl) = 1; } ! void init_alias_once () *************** init_alias_once () *** 2460,2466 **** numbers, so translate if necessary due to register windows. */ if (FUNCTION_ARG_REGNO_P (OUTGOING_REGNO (i)) && HARD_REGNO_MODE_OK (i, Pmode)) ! SET_HARD_REG_BIT (argument_registers, i); alias_sets = splay_tree_new (splay_tree_compare_ints, 0, 0); } --- 2667,2685 ---- numbers, so translate if necessary due to register windows. */ if (FUNCTION_ARG_REGNO_P (OUTGOING_REGNO (i)) && HARD_REGNO_MODE_OK (i, Pmode)) ! static_reg_base_value[i] ! = gen_rtx_ADDRESS (VOIDmode, gen_rtx_REG (Pmode, i)); ! ! static_reg_base_value[STACK_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, stack_pointer_rtx); ! static_reg_base_value[ARG_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, arg_pointer_rtx); ! static_reg_base_value[FRAME_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, frame_pointer_rtx); ! #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM ! static_reg_base_value[HARD_FRAME_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx); ! #endif alias_sets = splay_tree_new (splay_tree_compare_ints, 0, 0); } *************** init_alias_analysis () *** 2479,2488 **** reg_known_value_size = maxreg; ! reg_known_value = (rtx *) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (rtx)) - FIRST_PSEUDO_REGISTER; ! reg_known_equiv_p = (char*) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (char)) - FIRST_PSEUDO_REGISTER; --- 2698,2707 ---- reg_known_value_size = maxreg; ! reg_known_value = (rtx *) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (rtx)) - FIRST_PSEUDO_REGISTER; ! reg_known_equiv_p = (char*) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (char)) - FIRST_PSEUDO_REGISTER; *************** init_alias_analysis () *** 2490,2497 **** optimization. Loop unrolling can create a large number of registers. */ reg_base_value_size = maxreg * 2; ! reg_base_value = (rtx *) xcalloc (reg_base_value_size, sizeof (rtx)); ! ggc_add_rtx_root (reg_base_value, reg_base_value_size); new_reg_base_value = (rtx *) xmalloc (reg_base_value_size * sizeof (rtx)); reg_seen = (char *) xmalloc (reg_base_value_size); --- 2709,2716 ---- optimization. Loop unrolling can create a large number of registers. */ reg_base_value_size = maxreg * 2; ! reg_base_value = (rtx *) ggc_alloc_cleared (reg_base_value_size ! * sizeof (rtx)); new_reg_base_value = (rtx *) xmalloc (reg_base_value_size * sizeof (rtx)); reg_seen = (char *) xmalloc (reg_base_value_size); *************** init_alias_analysis () *** 2534,2540 **** /* We're at the start of the function each iteration through the loop, so we're copying arguments. */ ! copying_arguments = 1; /* Wipe the potential alias information clean for this pass. */ memset ((char *) new_reg_base_value, 0, reg_base_value_size * sizeof (rtx)); --- 2753,2759 ---- /* We're at the start of the function each iteration through the loop, so we're copying arguments. */ ! copying_arguments = true; /* Wipe the potential alias information clean for this pass. */ memset ((char *) new_reg_base_value, 0, reg_base_value_size * sizeof (rtx)); *************** init_alias_analysis () *** 2550,2570 **** The address expression is VOIDmode for an argument and Pmode for other registers. */ ! for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! if (TEST_HARD_REG_BIT (argument_registers, i)) ! new_reg_base_value[i] = gen_rtx_ADDRESS (VOIDmode, ! gen_rtx_REG (Pmode, i)); ! ! new_reg_base_value[STACK_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, stack_pointer_rtx); ! new_reg_base_value[ARG_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, arg_pointer_rtx); ! new_reg_base_value[FRAME_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, frame_pointer_rtx); ! #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM ! new_reg_base_value[HARD_FRAME_POINTER_REGNUM] ! = gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx); ! #endif /* Walk the insns adding values to the new_reg_base_value array. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) --- 2769,2776 ---- The address expression is VOIDmode for an argument and Pmode for other registers. */ ! memcpy (new_reg_base_value, static_reg_base_value, ! FIRST_PSEUDO_REGISTER * sizeof (rtx)); /* Walk the insns adding values to the new_reg_base_value array. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) *************** init_alias_analysis () *** 2637,2643 **** } else if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) ! copying_arguments = 0; } /* Now propagate values from new_reg_base_value to reg_base_value. */ --- 2843,2849 ---- } else if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) ! copying_arguments = false; } /* Now propagate values from new_reg_base_value to reg_base_value. */ *************** end_alias_analysis () *** 2705,2716 **** reg_known_value_size = 0; free (reg_known_equiv_p + FIRST_PSEUDO_REGISTER); reg_known_equiv_p = 0; ! if (reg_base_value) ! { ! ggc_del_root (reg_base_value); ! free (reg_base_value); ! reg_base_value = 0; ! } reg_base_value_size = 0; if (alias_invariant) { --- 2911,2917 ---- reg_known_value_size = 0; free (reg_known_equiv_p + FIRST_PSEUDO_REGISTER); reg_known_equiv_p = 0; ! reg_base_value = 0; reg_base_value_size = 0; if (alias_invariant) { *************** end_alias_analysis () *** 2718,2720 **** --- 2919,2923 ---- alias_invariant = 0; } } + + #include "gt-alias.h" diff -Nrc3pad gcc-3.2.3/gcc/attribs.c gcc-3.3/gcc/attribs.c *** gcc-3.2.3/gcc/attribs.c 2002-05-27 05:48:13.000000000 +0000 --- gcc-3.3/gcc/attribs.c 2002-08-05 18:46:32.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 29,192 **** #include "ggc.h" #include "expr.h" #include "tm_p.h" - #include "obstack.h" #include "cpplib.h" #include "target.h" static void init_attributes PARAMS ((void)); ! /* Table of the tables of attributes (common, format, language, machine) searched. */ static const struct attribute_spec *attribute_tables[4]; static bool attributes_initialized = false; - static tree handle_packed_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_nocommon_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_common_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_noreturn_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_noinline_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_always_inline_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_used_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_unused_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_const_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_transparent_union_attribute PARAMS ((tree *, tree, tree, - int, bool *)); - static tree handle_constructor_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_destructor_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_mode_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_section_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_aligned_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_weak_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_alias_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_no_instrument_function_attribute PARAMS ((tree *, tree, - tree, int, - bool *)); - static tree handle_malloc_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_no_limit_stack_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_pure_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_deprecated_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree handle_vector_size_attribute PARAMS ((tree *, tree, tree, int, - bool *)); - static tree vector_size_helper PARAMS ((tree, tree)); - - /* Table of machine-independent attributes common to all C-like languages. */ - static const struct attribute_spec c_common_attribute_table[] = - { - /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ - { "packed", 0, 0, false, false, false, - handle_packed_attribute }, - { "nocommon", 0, 0, true, false, false, - handle_nocommon_attribute }, - { "common", 0, 0, true, false, false, - handle_common_attribute }, - /* FIXME: logically, noreturn attributes should be listed as - "false, true, true" and apply to function types. But implementing this - would require all the places in the compiler that use TREE_THIS_VOLATILE - on a decl to identify non-returning functions to be located and fixed - to check the function type instead. */ - { "noreturn", 0, 0, true, false, false, - handle_noreturn_attribute }, - { "volatile", 0, 0, true, false, false, - handle_noreturn_attribute }, - { "noinline", 0, 0, true, false, false, - handle_noinline_attribute }, - { "always_inline", 0, 0, true, false, false, - handle_always_inline_attribute }, - { "used", 0, 0, true, false, false, - handle_used_attribute }, - { "unused", 0, 0, false, false, false, - handle_unused_attribute }, - /* The same comments as for noreturn attributes apply to const ones. */ - { "const", 0, 0, true, false, false, - handle_const_attribute }, - { "transparent_union", 0, 0, false, false, false, - handle_transparent_union_attribute }, - { "constructor", 0, 0, true, false, false, - handle_constructor_attribute }, - { "destructor", 0, 0, true, false, false, - handle_destructor_attribute }, - { "mode", 1, 1, false, true, false, - handle_mode_attribute }, - { "section", 1, 1, true, false, false, - handle_section_attribute }, - { "aligned", 0, 1, false, false, false, - handle_aligned_attribute }, - { "weak", 0, 0, true, false, false, - handle_weak_attribute }, - { "alias", 1, 1, true, false, false, - handle_alias_attribute }, - { "no_instrument_function", 0, 0, true, false, false, - handle_no_instrument_function_attribute }, - { "malloc", 0, 0, true, false, false, - handle_malloc_attribute }, - { "no_stack_limit", 0, 0, true, false, false, - handle_no_limit_stack_attribute }, - { "pure", 0, 0, true, false, false, - handle_pure_attribute }, - { "deprecated", 0, 0, false, false, false, - handle_deprecated_attribute }, - { "vector_size", 1, 1, false, true, false, - handle_vector_size_attribute }, - { NULL, 0, 0, false, false, false, NULL } - }; - /* Default empty table of attributes. */ static const struct attribute_spec empty_attribute_table[] = { { NULL, 0, 0, false, false, false, NULL } }; - /* Table of machine-independent attributes for checking formats, if used. */ - const struct attribute_spec *format_attribute_table = empty_attribute_table; - - /* Table of machine-independent attributes for a particular language. */ - const struct attribute_spec *lang_attribute_table = empty_attribute_table; - - /* Flag saying whether common language attributes are to be supported. */ - int lang_attribute_common = 1; - /* Initialize attribute tables, and make some sanity checks if --enable-checking. */ static void init_attributes () { ! #ifdef ENABLE_CHECKING ! int i; ! #endif ! attribute_tables[0] ! = lang_attribute_common ? c_common_attribute_table : empty_attribute_table; ! attribute_tables[1] = lang_attribute_table; ! attribute_tables[2] = format_attribute_table; attribute_tables[3] = targetm.attribute_table; #ifdef ENABLE_CHECKING /* Make some sanity checks on the attribute tables. */ ! for (i = 0; ! i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); ! i++) { int j; --- 29,73 ---- #include "ggc.h" #include "expr.h" #include "tm_p.h" #include "cpplib.h" #include "target.h" + #include "langhooks.h" static void init_attributes PARAMS ((void)); ! /* Table of the tables of attributes (common, language, format, machine) searched. */ static const struct attribute_spec *attribute_tables[4]; static bool attributes_initialized = false; /* Default empty table of attributes. */ static const struct attribute_spec empty_attribute_table[] = { { NULL, 0, 0, false, false, false, NULL } }; /* Initialize attribute tables, and make some sanity checks if --enable-checking. */ static void init_attributes () { ! size_t i; ! attribute_tables[0] = lang_hooks.common_attribute_table; ! attribute_tables[1] = lang_hooks.attribute_table; ! attribute_tables[2] = lang_hooks.format_attribute_table; attribute_tables[3] = targetm.attribute_table; + /* Translate NULL pointers to pointers to the empty table. */ + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) + if (attribute_tables[i] == NULL) + attribute_tables[i] = empty_attribute_table; + #ifdef ENABLE_CHECKING /* Make some sanity checks on the attribute tables. */ ! for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j; *************** init_attributes () *** 218,226 **** } /* Check that each name occurs just once in each table. */ ! for (i = 0; ! i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); ! i++) { int j, k; for (j = 0; attribute_tables[i][j].name != NULL; j++) --- 99,105 ---- } /* Check that each name occurs just once in each table. */ ! for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j, k; for (j = 0; attribute_tables[i][j].name != NULL; j++) *************** init_attributes () *** 230,245 **** abort (); } /* Check that no name occurs in more than one table. */ ! for (i = 0; ! i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); ! i++) { ! int j, k, l; ! for (j = i + 1; ! j < ((int) (sizeof (attribute_tables) ! / sizeof (attribute_tables[0]))); ! j++) for (k = 0; attribute_tables[i][k].name != NULL; k++) for (l = 0; attribute_tables[j][l].name != NULL; l++) if (!strcmp (attribute_tables[i][k].name, --- 109,119 ---- abort (); } /* Check that no name occurs in more than one table. */ ! for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { ! size_t j, k, l; ! for (j = i + 1; j < ARRAY_SIZE (attribute_tables); j++) for (k = 0; attribute_tables[i][k].name != NULL; k++) for (l = 0; attribute_tables[j][l].name != NULL; l++) if (!strcmp (attribute_tables[i][k].name, *************** decl_attributes (node, attributes, flags *** 279,285 **** if (DECL_P (*node) && TREE_CODE (*node) == FUNCTION_DECL && !(flags & (int) ATTR_FLAG_BUILT_IN)) ! insert_default_attributes (*node); for (a = attributes; a; a = TREE_CHAIN (a)) { --- 153,159 ---- if (DECL_P (*node) && TREE_CODE (*node) == FUNCTION_DECL && !(flags & (int) ATTR_FLAG_BUILT_IN)) ! (*lang_hooks.insert_default_attributes) (*node); for (a = attributes; a; a = TREE_CHAIN (a)) { *************** decl_attributes (node, attributes, flags *** 288,299 **** tree *anode = node; const struct attribute_spec *spec = NULL; bool no_add_attrs = 0; ! int i; ! for (i = 0; ! i < ((int) (sizeof (attribute_tables) ! / sizeof (attribute_tables[0]))); ! i++) { int j; --- 162,170 ---- tree *anode = node; const struct attribute_spec *spec = NULL; bool no_add_attrs = 0; ! size_t i; ! for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j; *************** decl_attributes (node, attributes, flags *** 433,1362 **** return returned_attrs; } - /* Handle a "packed" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_packed_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags; - bool *no_add_attrs; - { - tree *type = NULL; - if (DECL_P (*node)) - { - if (TREE_CODE (*node) == TYPE_DECL) - type = &TREE_TYPE (*node); - } - else - type = node; - - if (type) - { - if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) - *type = build_type_copy (*type); - TYPE_PACKED (*type) = 1; - } - else if (TREE_CODE (*node) == FIELD_DECL) - DECL_PACKED (*node) = 1; - /* We can't set DECL_PACKED for a VAR_DECL, because the bit is - used for DECL_REGISTER. It wouldn't mean anything anyway. */ - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "nocommon" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_nocommon_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - if (TREE_CODE (*node) == VAR_DECL) - DECL_COMMON (*node) = 0; - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "common" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_common_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - if (TREE_CODE (*node) == VAR_DECL) - DECL_COMMON (*node) = 1; - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "noreturn" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_noreturn_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree type = TREE_TYPE (*node); - - /* See FIXME comment in c_common_attribute_table. */ - if (TREE_CODE (*node) == FUNCTION_DECL) - TREE_THIS_VOLATILE (*node) = 1; - else if (TREE_CODE (type) == POINTER_TYPE - && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) - TREE_TYPE (*node) - = build_pointer_type - (build_type_variant (TREE_TYPE (type), - TREE_READONLY (TREE_TYPE (type)), 1)); - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "noinline" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_noinline_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - if (TREE_CODE (*node) == FUNCTION_DECL) - DECL_UNINLINABLE (*node) = 1; - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "always_inline" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_always_inline_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - if (TREE_CODE (*node) == FUNCTION_DECL) - { - /* Do nothing else, just set the attribute. We'll get at - it later with lookup_attribute. */ - } - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "used" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_used_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - if (TREE_CODE (*node) == FUNCTION_DECL) - TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (*node)) - = TREE_USED (*node) = 1; - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "unused" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_unused_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags; - bool *no_add_attrs; - { - if (DECL_P (*node)) - { - tree decl = *node; - - if (TREE_CODE (decl) == PARM_DECL - || TREE_CODE (decl) == VAR_DECL - || TREE_CODE (decl) == FUNCTION_DECL - || TREE_CODE (decl) == LABEL_DECL - || TREE_CODE (decl) == TYPE_DECL) - TREE_USED (decl) = 1; - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - } - else - { - if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) - *node = build_type_copy (*node); - TREE_USED (*node) = 1; - } - - return NULL_TREE; - } - - /* Handle a "const" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_const_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree type = TREE_TYPE (*node); - - /* See FIXME comment on noreturn in c_common_attribute_table. */ - if (TREE_CODE (*node) == FUNCTION_DECL) - TREE_READONLY (*node) = 1; - else if (TREE_CODE (type) == POINTER_TYPE - && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) - TREE_TYPE (*node) - = build_pointer_type - (build_type_variant (TREE_TYPE (type), 1, - TREE_THIS_VOLATILE (TREE_TYPE (type)))); - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "transparent_union" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_transparent_union_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags; - bool *no_add_attrs; - { - tree decl = NULL_TREE; - tree *type = NULL; - int is_type = 0; - - if (DECL_P (*node)) - { - decl = *node; - type = &TREE_TYPE (decl); - is_type = TREE_CODE (*node) == TYPE_DECL; - } - else if (TYPE_P (*node)) - type = node, is_type = 1; - - if (is_type - && TREE_CODE (*type) == UNION_TYPE - && (decl == 0 - || (TYPE_FIELDS (*type) != 0 - && TYPE_MODE (*type) == DECL_MODE (TYPE_FIELDS (*type))))) - { - if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) - *type = build_type_copy (*type); - TYPE_TRANSPARENT_UNION (*type) = 1; - } - else if (decl != 0 && TREE_CODE (decl) == PARM_DECL - && TREE_CODE (*type) == UNION_TYPE - && TYPE_MODE (*type) == DECL_MODE (TYPE_FIELDS (*type))) - DECL_TRANSPARENT_UNION (decl) = 1; - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "constructor" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_constructor_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree decl = *node; - tree type = TREE_TYPE (decl); - - if (TREE_CODE (decl) == FUNCTION_DECL - && TREE_CODE (type) == FUNCTION_TYPE - && decl_function_context (decl) == 0) - { - DECL_STATIC_CONSTRUCTOR (decl) = 1; - TREE_USED (decl) = 1; - } - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "destructor" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_destructor_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree decl = *node; - tree type = TREE_TYPE (decl); - - if (TREE_CODE (decl) == FUNCTION_DECL - && TREE_CODE (type) == FUNCTION_TYPE - && decl_function_context (decl) == 0) - { - DECL_STATIC_DESTRUCTOR (decl) = 1; - TREE_USED (decl) = 1; - } - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "mode" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_mode_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree type = *node; - - *no_add_attrs = true; - - if (TREE_CODE (TREE_VALUE (args)) != IDENTIFIER_NODE) - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - else - { - int j; - const char *p = IDENTIFIER_POINTER (TREE_VALUE (args)); - int len = strlen (p); - enum machine_mode mode = VOIDmode; - tree typefm; - - if (len > 4 && p[0] == '_' && p[1] == '_' - && p[len - 1] == '_' && p[len - 2] == '_') - { - char *newp = (char *) alloca (len - 1); - - strcpy (newp, &p[2]); - newp[len - 4] = '\0'; - p = newp; - } - - /* Change this type to have a type with the specified mode. - First check for the special modes. */ - if (! strcmp (p, "byte")) - mode = byte_mode; - else if (!strcmp (p, "word")) - mode = word_mode; - else if (! strcmp (p, "pointer")) - mode = ptr_mode; - else - for (j = 0; j < NUM_MACHINE_MODES; j++) - if (!strcmp (p, GET_MODE_NAME (j))) - mode = (enum machine_mode) j; - - if (mode == VOIDmode) - error ("unknown machine mode `%s'", p); - else if (0 == (typefm = type_for_mode (mode, - TREE_UNSIGNED (type)))) - error ("no data type for mode `%s'", p); - else - *node = typefm; - /* No need to layout the type here. The caller should do this. */ - } - - return NULL_TREE; - } - - /* Handle a "section" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_section_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name ATTRIBUTE_UNUSED; - tree args; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree decl = *node; - - if (targetm.have_named_sections) - { - if ((TREE_CODE (decl) == FUNCTION_DECL - || TREE_CODE (decl) == VAR_DECL) - && TREE_CODE (TREE_VALUE (args)) == STRING_CST) - { - if (TREE_CODE (decl) == VAR_DECL - && current_function_decl != NULL_TREE - && ! TREE_STATIC (decl)) - { - error_with_decl (decl, - "section attribute cannot be specified for local variables"); - *no_add_attrs = true; - } - - /* The decl may have already been given a section attribute - from a previous declaration. Ensure they match. */ - else if (DECL_SECTION_NAME (decl) != NULL_TREE - && strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), - TREE_STRING_POINTER (TREE_VALUE (args))) != 0) - { - error_with_decl (*node, - "section of `%s' conflicts with previous declaration"); - *no_add_attrs = true; - } - else - DECL_SECTION_NAME (decl) = TREE_VALUE (args); - } - else - { - error_with_decl (*node, - "section attribute not allowed for `%s'"); - *no_add_attrs = true; - } - } - else - { - error_with_decl (*node, - "section attributes are not supported for this target"); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "aligned" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_aligned_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name ATTRIBUTE_UNUSED; - tree args; - int flags; - bool *no_add_attrs; - { - tree decl = NULL_TREE; - tree *type = NULL; - int is_type = 0; - tree align_expr = (args ? TREE_VALUE (args) - : size_int (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); - int i; - - if (DECL_P (*node)) - { - decl = *node; - type = &TREE_TYPE (decl); - is_type = TREE_CODE (*node) == TYPE_DECL; - } - else if (TYPE_P (*node)) - type = node, is_type = 1; - - /* Strip any NOPs of any kind. */ - while (TREE_CODE (align_expr) == NOP_EXPR - || TREE_CODE (align_expr) == CONVERT_EXPR - || TREE_CODE (align_expr) == NON_LVALUE_EXPR) - align_expr = TREE_OPERAND (align_expr, 0); - - if (TREE_CODE (align_expr) != INTEGER_CST) - { - error ("requested alignment is not a constant"); - *no_add_attrs = true; - } - else if ((i = tree_log2 (align_expr)) == -1) - { - error ("requested alignment is not a power of 2"); - *no_add_attrs = true; - } - else if (i > HOST_BITS_PER_INT - 2) - { - error ("requested alignment is too large"); - *no_add_attrs = true; - } - else if (is_type) - { - /* If we have a TYPE_DECL, then copy the type, so that we - don't accidentally modify a builtin type. See pushdecl. */ - if (decl && TREE_TYPE (decl) != error_mark_node - && DECL_ORIGINAL_TYPE (decl) == NULL_TREE) - { - tree tt = TREE_TYPE (decl); - *type = build_type_copy (*type); - DECL_ORIGINAL_TYPE (decl) = tt; - TYPE_NAME (*type) = decl; - TREE_USED (*type) = TREE_USED (decl); - TREE_TYPE (decl) = *type; - } - else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) - *type = build_type_copy (*type); - - TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT; - TYPE_USER_ALIGN (*type) = 1; - } - else if (TREE_CODE (decl) != VAR_DECL - && TREE_CODE (decl) != FIELD_DECL) - { - error_with_decl (decl, - "alignment may not be specified for `%s'"); - *no_add_attrs = true; - } - else - { - DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT; - DECL_USER_ALIGN (decl) = 1; - } - - return NULL_TREE; - } - - /* Handle a "weak" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_weak_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name ATTRIBUTE_UNUSED; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs ATTRIBUTE_UNUSED; - { - declare_weak (*node); - - return NULL_TREE; - } - - /* Handle an "alias" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_alias_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree decl = *node; - - if ((TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl)) - || (TREE_CODE (decl) != FUNCTION_DECL && ! DECL_EXTERNAL (decl))) - { - error_with_decl (decl, - "`%s' defined both normally and as an alias"); - *no_add_attrs = true; - } - else if (decl_function_context (decl) == 0) - { - tree id; - - id = TREE_VALUE (args); - if (TREE_CODE (id) != STRING_CST) - { - error ("alias arg not a string"); - *no_add_attrs = true; - return NULL_TREE; - } - id = get_identifier (TREE_STRING_POINTER (id)); - /* This counts as a use of the object pointed to. */ - TREE_USED (id) = 1; - - if (TREE_CODE (decl) == FUNCTION_DECL) - DECL_INITIAL (decl) = error_mark_node; - else - DECL_EXTERNAL (decl) = 0; - } - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "no_instrument_function" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_no_instrument_function_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree decl = *node; - - if (TREE_CODE (decl) != FUNCTION_DECL) - { - error_with_decl (decl, - "`%s' attribute applies only to functions", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - else if (DECL_INITIAL (decl)) - { - error_with_decl (decl, - "can't set `%s' attribute after definition", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - else - DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1; - - return NULL_TREE; - } - - /* Handle a "malloc" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_malloc_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - if (TREE_CODE (*node) == FUNCTION_DECL) - DECL_IS_MALLOC (*node) = 1; - /* ??? TODO: Support types. */ - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "no_limit_stack" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_no_limit_stack_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - tree decl = *node; - - if (TREE_CODE (decl) != FUNCTION_DECL) - { - error_with_decl (decl, - "`%s' attribute applies only to functions", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - else if (DECL_INITIAL (decl)) - { - error_with_decl (decl, - "can't set `%s' attribute after definition", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - else - DECL_NO_LIMIT_STACK (decl) = 1; - - return NULL_TREE; - } - - /* Handle a "pure" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_pure_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - if (TREE_CODE (*node) == FUNCTION_DECL) - DECL_IS_PURE (*node) = 1; - /* ??? TODO: Support types. */ - else - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; - } - - /* Handle a "deprecated" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_deprecated_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args ATTRIBUTE_UNUSED; - int flags; - bool *no_add_attrs; - { - tree type = NULL_TREE; - int warn = 0; - const char *what = NULL; - - if (DECL_P (*node)) - { - tree decl = *node; - type = TREE_TYPE (decl); - - if (TREE_CODE (decl) == TYPE_DECL - || TREE_CODE (decl) == PARM_DECL - || TREE_CODE (decl) == VAR_DECL - || TREE_CODE (decl) == FUNCTION_DECL - || TREE_CODE (decl) == FIELD_DECL) - TREE_DEPRECATED (decl) = 1; - else - warn = 1; - } - else if (TYPE_P (*node)) - { - if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) - *node = build_type_copy (*node); - TREE_DEPRECATED (*node) = 1; - type = *node; - } - else - warn = 1; - - if (warn) - { - *no_add_attrs = true; - if (type && TYPE_NAME (type)) - { - if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) - what = IDENTIFIER_POINTER (TYPE_NAME (*node)); - else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL - && DECL_NAME (TYPE_NAME (type))) - what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); - } - if (what) - warning ("`%s' attribute ignored for `%s'", - IDENTIFIER_POINTER (name), what); - else - warning ("`%s' attribute ignored", - IDENTIFIER_POINTER (name)); - } - - return NULL_TREE; - } - - /* Handle a "vector_size" attribute; arguments as in - struct attribute_spec.handler. */ - - static tree - handle_vector_size_attribute (node, name, args, flags, no_add_attrs) - tree *node; - tree name; - tree args; - int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs; - { - unsigned HOST_WIDE_INT vecsize, nunits; - enum machine_mode mode, orig_mode, new_mode; - tree type = *node, new_type; - - *no_add_attrs = true; - - if (! host_integerp (TREE_VALUE (args), 1)) - { - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); - return NULL_TREE; - } - - /* Get the vector size (in bytes). */ - vecsize = tree_low_cst (TREE_VALUE (args), 1); - - /* We need to provide for vector pointers, vector arrays, and - functions returning vectors. For example: - - __attribute__((vector_size(16))) short *foo; - - In this case, the mode is SI, but the type being modified is - HI, so we need to look further. */ - - while (POINTER_TYPE_P (type) - || TREE_CODE (type) == FUNCTION_TYPE - || TREE_CODE (type) == ARRAY_TYPE) - type = TREE_TYPE (type); - - /* Get the mode of the type being modified. */ - orig_mode = TYPE_MODE (type); - - if (TREE_CODE (type) == RECORD_TYPE - || (GET_MODE_CLASS (orig_mode) != MODE_FLOAT - && GET_MODE_CLASS (orig_mode) != MODE_INT) - || ! host_integerp (TYPE_SIZE_UNIT (type), 1)) - { - error ("invalid vector type for attribute `%s'", - IDENTIFIER_POINTER (name)); - return NULL_TREE; - } - - /* Calculate how many units fit in the vector. */ - nunits = vecsize / tree_low_cst (TYPE_SIZE_UNIT (type), 1); - - /* Find a suitably sized vector. */ - new_mode = VOIDmode; - for (mode = GET_CLASS_NARROWEST_MODE (GET_MODE_CLASS (orig_mode) == MODE_INT - ? MODE_VECTOR_INT - : MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if (vecsize == GET_MODE_SIZE (mode) - && nunits == (unsigned HOST_WIDE_INT) GET_MODE_NUNITS (mode)) - { - new_mode = mode; - break; - } - - if (new_mode == VOIDmode) - error ("no vector mode with the size and type specified could be found"); - else - { - new_type = type_for_mode (new_mode, TREE_UNSIGNED (type)); - if (!new_type) - error ("no vector mode with the size and type specified could be found"); - else - /* Build back pointers if needed. */ - *node = vector_size_helper (*node, new_type); - } - - return NULL_TREE; - } - - /* HACK. GROSS. This is absolutely disgusting. I wish there was a - better way. - - If we requested a pointer to a vector, build up the pointers that - we stripped off while looking for the inner type. Similarly for - return values from functions. - - The argument "type" is the top of the chain, and "bottom" is the - new type which we will point to. */ - - static tree - vector_size_helper (type, bottom) - tree type, bottom; - { - tree inner, outer; - - if (POINTER_TYPE_P (type)) - { - inner = vector_size_helper (TREE_TYPE (type), bottom); - outer = build_pointer_type (inner); - } - else if (TREE_CODE (type) == ARRAY_TYPE) - { - inner = vector_size_helper (TREE_TYPE (type), bottom); - outer = build_array_type (inner, TYPE_VALUES (type)); - } - else if (TREE_CODE (type) == FUNCTION_TYPE) - { - inner = vector_size_helper (TREE_TYPE (type), bottom); - outer = build_function_type (inner, TYPE_VALUES (type)); - } - else - return bottom; - - TREE_READONLY (outer) = TREE_READONLY (type); - TREE_THIS_VOLATILE (outer) = TREE_THIS_VOLATILE (type); - - return outer; - } - /* Split SPECS_ATTRS, a list of declspecs and prefix attributes, into two lists. SPECS_ATTRS may also be just a typespec (eg: RECORD_TYPE). --- 304,309 ---- *************** split_specs_attrs (specs_attrs, declspec *** 1375,1381 **** tree t, s, a, next, specs, attrs; /* This can happen after an __extension__ in pedantic mode. */ ! if (specs_attrs != NULL_TREE && TREE_CODE (specs_attrs) == INTEGER_CST) { *declspecs = NULL_TREE; --- 322,328 ---- tree t, s, a, next, specs, attrs; /* This can happen after an __extension__ in pedantic mode. */ ! if (specs_attrs != NULL_TREE && TREE_CODE (specs_attrs) == INTEGER_CST) { *declspecs = NULL_TREE; diff -Nrc3pad gcc-3.2.3/gcc/basic-block.h gcc-3.3/gcc/basic-block.h *** gcc-3.2.3/gcc/basic-block.h 2003-01-10 13:36:19.000000000 +0000 --- gcc-3.3/gcc/basic-block.h 2003-03-25 20:31:38.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 26,31 **** --- 26,32 ---- #include "sbitmap.h" #include "varray.h" #include "partition.h" + #include "hard-reg-set.h" /* Head of register set linked list. */ typedef bitmap_head regset_head; *************** typedef bitmap_head regset_head; *** 33,39 **** typedef bitmap regset; /* Initialize a new regset. */ ! #define INIT_REG_SET(HEAD) bitmap_initialize (HEAD) /* Clear a register set by freeing up the linked list. */ #define CLEAR_REG_SET(HEAD) bitmap_clear (HEAD) --- 34,40 ---- typedef bitmap regset; /* Initialize a new regset. */ ! #define INIT_REG_SET(HEAD) bitmap_initialize (HEAD, 1) /* Clear a register set by freeing up the linked list. */ #define CLEAR_REG_SET(HEAD) bitmap_clear (HEAD) *************** do { \ *** 99,105 **** #define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK) /* Initialize a register set. Returns the new register set. */ ! #define INITIALIZE_REG_SET(HEAD) bitmap_initialize (&HEAD) /* Do any cleanup needed on a regset when it is no longer used. */ #define FREE_REG_SET(REGSET) BITMAP_FREE(REGSET) --- 100,106 ---- #define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK) /* Initialize a register set. Returns the new register set. */ ! #define INITIALIZE_REG_SET(HEAD) bitmap_initialize (&HEAD, 1) /* Do any cleanup needed on a regset when it is no longer used. */ #define FREE_REG_SET(REGSET) BITMAP_FREE(REGSET) *************** typedef struct edge_def { *** 135,146 **** in profile.c */ } *edge; ! #define EDGE_FALLTHRU 1 ! #define EDGE_ABNORMAL 2 ! #define EDGE_ABNORMAL_CALL 4 ! #define EDGE_EH 8 ! #define EDGE_FAKE 16 ! #define EDGE_DFS_BACK 32 #define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH) --- 136,151 ---- in profile.c */ } *edge; ! #define EDGE_FALLTHRU 1 /* 'Straight line' flow */ ! #define EDGE_ABNORMAL 2 /* Strange flow, like computed ! label, or eh */ ! #define EDGE_ABNORMAL_CALL 4 /* Call with abnormal exit ! like an exception, or sibcall */ ! #define EDGE_EH 8 /* Exception throw */ ! #define EDGE_FAKE 16 /* Not a real edge (profile.c) */ ! #define EDGE_DFS_BACK 32 /* A backwards edge */ ! #define EDGE_CAN_FALLTHRU 64 /* Candidate for straight line ! flow. */ #define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH) *************** typedef struct basic_block_def { *** 205,213 **** --- 210,224 ---- /* The index of this block. */ int index; + /* Previous and next blocks in the chain. */ + struct basic_block_def *prev_bb, *next_bb; + /* The loop depth of this block. */ int loop_depth; + /* Outermost loop containing the block. */ + struct loop *loop_father; + /* Expected number of executions: calculated in profile.c. */ gcov_type count; *************** typedef struct basic_block_def { *** 221,232 **** #define BB_FREQ_MAX 10000 /* Masks for basic_block.flags. */ ! #define BB_REACHABLE 1 /* Number of basic blocks in the current function. */ extern int n_basic_blocks; /* Number of edges in the current function. */ extern int n_edges; --- 232,250 ---- #define BB_FREQ_MAX 10000 /* Masks for basic_block.flags. */ ! #define BB_DIRTY 1 ! #define BB_NEW 2 ! #define BB_REACHABLE 4 ! #define BB_VISITED 8 /* Number of basic blocks in the current function. */ extern int n_basic_blocks; + /* First free basic block number. */ + + extern int last_basic_block; + /* Number of edges in the current function. */ extern int n_edges; *************** extern varray_type basic_block_info; *** 237,249 **** #define BASIC_BLOCK(N) (VARRAY_BB (basic_block_info, (N))) /* What registers are live at the setjmp call. */ extern regset regs_live_at_setjmp; /* Special labels found during CFG build. */ ! extern rtx label_value_list, tail_recursion_label_list; extern struct obstack flow_obstack; --- 255,284 ---- #define BASIC_BLOCK(N) (VARRAY_BB (basic_block_info, (N))) + /* For iterating over basic blocks. */ + #define FOR_BB_BETWEEN(BB, FROM, TO, DIR) \ + for (BB = FROM; BB != TO; BB = BB->DIR) + + #define FOR_EACH_BB(BB) \ + FOR_BB_BETWEEN (BB, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR, next_bb) + + #define FOR_EACH_BB_REVERSE(BB) \ + FOR_BB_BETWEEN (BB, EXIT_BLOCK_PTR->prev_bb, ENTRY_BLOCK_PTR, prev_bb) + + /* Cycles through _all_ basic blocks, even the fake ones (entry and + exit block). */ + + #define FOR_ALL_BB(BB) \ + for (BB = ENTRY_BLOCK_PTR; BB; BB = BB->next_bb) + /* What registers are live at the setjmp call. */ extern regset regs_live_at_setjmp; /* Special labels found during CFG build. */ ! extern GTY(()) rtx label_value_list; ! extern GTY(()) rtx tail_recursion_label_list; extern struct obstack flow_obstack; *************** extern struct basic_block_def entry_exit *** 279,305 **** #define ENTRY_BLOCK_PTR (&entry_exit_blocks[0]) #define EXIT_BLOCK_PTR (&entry_exit_blocks[1]) - extern varray_type basic_block_for_insn; - #define BLOCK_FOR_INSN(INSN) VARRAY_BB (basic_block_for_insn, INSN_UID (INSN)) #define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->index + 0) ! extern void compute_bb_for_insn PARAMS ((int)); extern void free_bb_for_insn PARAMS ((void)); extern void update_bb_for_insn PARAMS ((basic_block)); - extern void set_block_for_insn PARAMS ((rtx, basic_block)); extern void free_basic_block_vars PARAMS ((int)); extern edge split_block PARAMS ((basic_block, rtx)); extern basic_block split_edge PARAMS ((edge)); extern void insert_insn_on_edge PARAMS ((rtx, edge)); extern void commit_edge_insertions PARAMS ((void)); extern void remove_fake_edges PARAMS ((void)); extern void add_noreturn_fake_exit_edges PARAMS ((void)); extern void connect_infinite_loops_to_exit PARAMS ((void)); extern int flow_call_edges_add PARAMS ((sbitmap)); extern edge cached_make_edge PARAMS ((sbitmap *, basic_block, basic_block, int)); extern edge make_edge PARAMS ((basic_block, basic_block, int)); extern edge make_single_succ_edge PARAMS ((basic_block, --- 314,343 ---- #define ENTRY_BLOCK_PTR (&entry_exit_blocks[0]) #define EXIT_BLOCK_PTR (&entry_exit_blocks[1]) #define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->index + 0) + #define set_block_for_insn(INSN, BB) (BLOCK_FOR_INSN (INSN) = BB) ! extern void compute_bb_for_insn PARAMS ((void)); extern void free_bb_for_insn PARAMS ((void)); extern void update_bb_for_insn PARAMS ((basic_block)); extern void free_basic_block_vars PARAMS ((int)); extern edge split_block PARAMS ((basic_block, rtx)); extern basic_block split_edge PARAMS ((edge)); extern void insert_insn_on_edge PARAMS ((rtx, edge)); + extern void commit_edge_insertions PARAMS ((void)); + extern void commit_edge_insertions_watch_calls PARAMS ((void)); + extern void remove_fake_edges PARAMS ((void)); extern void add_noreturn_fake_exit_edges PARAMS ((void)); extern void connect_infinite_loops_to_exit PARAMS ((void)); extern int flow_call_edges_add PARAMS ((sbitmap)); extern edge cached_make_edge PARAMS ((sbitmap *, basic_block, basic_block, int)); + extern edge unchecked_make_edge PARAMS ((basic_block, + basic_block, int)); extern edge make_edge PARAMS ((basic_block, basic_block, int)); extern edge make_single_succ_edge PARAMS ((basic_block, *************** extern void remove_edge PARAMS ((edge) *** 308,317 **** extern void redirect_edge_succ PARAMS ((edge, basic_block)); extern edge redirect_edge_succ_nodup PARAMS ((edge, basic_block)); extern void redirect_edge_pred PARAMS ((edge, basic_block)); ! extern basic_block create_basic_block_structure PARAMS ((int, rtx, rtx, rtx)); ! extern basic_block create_basic_block PARAMS ((int, rtx, rtx)); extern int flow_delete_block PARAMS ((basic_block)); extern int flow_delete_block_noexpunge PARAMS ((basic_block)); extern void merge_blocks_nomove PARAMS ((basic_block, basic_block)); extern void tidy_fallthru_edge PARAMS ((edge, basic_block, basic_block)); --- 346,356 ---- extern void redirect_edge_succ PARAMS ((edge, basic_block)); extern edge redirect_edge_succ_nodup PARAMS ((edge, basic_block)); extern void redirect_edge_pred PARAMS ((edge, basic_block)); ! extern basic_block create_basic_block_structure PARAMS ((rtx, rtx, rtx, basic_block)); ! extern basic_block create_basic_block PARAMS ((rtx, rtx, basic_block)); extern int flow_delete_block PARAMS ((basic_block)); extern int flow_delete_block_noexpunge PARAMS ((basic_block)); + extern void clear_bb_flags PARAMS ((void)); extern void merge_blocks_nomove PARAMS ((basic_block, basic_block)); extern void tidy_fallthru_edge PARAMS ((edge, basic_block, basic_block)); *************** extern void clear_edges PARAMS ((void) *** 324,329 **** --- 363,372 ---- extern void mark_critical_edges PARAMS ((void)); extern rtx first_insn_after_basic_block_note PARAMS ((basic_block)); + /* Dominator information for basic blocks. */ + + typedef struct dominance_info *dominance_info; + /* Structure to hold information for each natural loop. */ struct loop { *************** struct loop *** 379,384 **** --- 422,430 ---- /* The loop nesting depth. */ int depth; + /* Superloops of the loop. */ + struct loop **pred; + /* The height of the loop (enclosed loop levels) within the loop hierarchy tree. */ int level; *************** struct loop *** 392,401 **** /* Link to the next (sibling) loop. */ struct loop *next; ! /* Non-zero if the loop shares a header with another loop. */ ! int shared; ! ! /* Non-zero if the loop is invalid (e.g., contains setjmp.). */ int invalid; /* Auxiliary info specific to a pass. */ --- 438,444 ---- /* Link to the next (sibling) loop. */ struct loop *next; ! /* Nonzero if the loop is invalid (e.g., contains setjmp.). */ int invalid; /* Auxiliary info specific to a pass. */ *************** struct loop *** 404,419 **** /* The following are currently used by loop.c but they are likely to disappear as loop.c is converted to use the CFG. */ ! /* Non-zero if the loop has a NOTE_INSN_LOOP_VTOP. */ rtx vtop; ! /* Non-zero if the loop has a NOTE_INSN_LOOP_CONT. A continue statement will generate a branch to NEXT_INSN (cont). */ rtx cont; - /* The dominator of cont. */ - rtx cont_dominator; - /* The NOTE_INSN_LOOP_BEG. */ rtx start; --- 447,459 ---- /* The following are currently used by loop.c but they are likely to disappear as loop.c is converted to use the CFG. */ ! /* Nonzero if the loop has a NOTE_INSN_LOOP_VTOP. */ rtx vtop; ! /* Nonzero if the loop has a NOTE_INSN_LOOP_CONT. A continue statement will generate a branch to NEXT_INSN (cont). */ rtx cont; /* The NOTE_INSN_LOOP_BEG. */ rtx start; *************** struct loops *** 460,465 **** --- 500,510 ---- will find the inner loops before their enclosing outer loops). */ struct loop *array; + /* The above array is unused in new loop infrastructure and is kept only for + purposes of the old loop optimizer. Instead we store just pointers to + loops here. */ + struct loop **parray; + /* Pointer to root of loop heirachy tree. */ struct loop *tree_root; *************** struct loops *** 467,473 **** struct cfg { /* The bitmap vector of dominators or NULL if not computed. */ ! sbitmap *dom; /* The ordering of the basic blocks in a depth first search. */ int *dfs_order; --- 512,518 ---- struct cfg { /* The bitmap vector of dominators or NULL if not computed. */ ! dominance_info dom; /* The ordering of the basic blocks in a depth first search. */ int *dfs_order; *************** struct loops *** 481,486 **** --- 526,558 ---- sbitmap shared_headers; }; + /* Structure to group all of the information to process IF-THEN and + IF-THEN-ELSE blocks for the conditional execution support. This + needs to be in a public file in case the IFCVT macros call + functions passing the ce_if_block data structure. */ + + typedef struct ce_if_block + { + basic_block test_bb; /* First test block. */ + basic_block then_bb; /* THEN block. */ + basic_block else_bb; /* ELSE block or NULL. */ + basic_block join_bb; /* Join THEN/ELSE blocks. */ + basic_block last_test_bb; /* Last bb to hold && or || tests. */ + int num_multiple_test_blocks; /* # of && and || basic blocks. */ + int num_and_and_blocks; /* # of && blocks. */ + int num_or_or_blocks; /* # of || blocks. */ + int num_multiple_test_insns; /* # of insns in && and || blocks. */ + int and_and_p; /* Complex test is &&. */ + int num_then_insns; /* # of insns in THEN block. */ + int num_else_insns; /* # of insns in ELSE block. */ + int pass; /* Pass number. */ + + #ifdef IFCVT_EXTRA_FIELDS + IFCVT_EXTRA_FIELDS /* Any machine dependent fields. */ + #endif + + } ce_if_block_t; + extern int flow_loops_find PARAMS ((struct loops *, int flags)); extern int flow_loops_update PARAMS ((struct loops *, int flags)); extern void flow_loops_free PARAMS ((struct loops *)); *************** extern void flow_loop_dump PARAMS ((cons *** 491,496 **** --- 563,570 ---- void (*)(const struct loop *, FILE *, int), int)); extern int flow_loop_scan PARAMS ((struct loops *, struct loop *, int)); + extern void flow_loop_tree_node_add PARAMS ((struct loop *, struct loop *)); + extern void flow_loop_tree_node_remove PARAMS ((struct loop *)); /* This structure maintains an edge list vector. */ struct edge_list *************** enum update_life_extent *** 562,568 **** by dead code removal. */ #define PROP_AUTOINC 64 /* Create autoinc mem references. */ #define PROP_EQUAL_NOTES 128 /* Take into account REG_EQUAL notes. */ ! #define PROP_FINAL 127 /* All of the above. */ #define CLEANUP_EXPENSIVE 1 /* Do relativly expensive optimizations except for edge forwarding */ --- 636,647 ---- by dead code removal. */ #define PROP_AUTOINC 64 /* Create autoinc mem references. */ #define PROP_EQUAL_NOTES 128 /* Take into account REG_EQUAL notes. */ ! #define PROP_SCAN_DEAD_STORES 256 /* Scan for dead code. */ ! #define PROP_FINAL (PROP_DEATH_NOTES | PROP_LOG_LINKS \ ! | PROP_REG_INFO | PROP_KILL_DEAD_CODE \ ! | PROP_SCAN_DEAD_CODE | PROP_AUTOINC \ ! | PROP_ALLOW_CFG_CHANGES \ ! | PROP_SCAN_DEAD_STORES) #define CLEANUP_EXPENSIVE 1 /* Do relativly expensive optimizations except for edge forwarding */ *************** enum update_life_extent *** 575,580 **** --- 654,661 ---- notes. */ #define CLEANUP_UPDATE_LIFE 32 /* Keep life information up to date. */ #define CLEANUP_THREADING 64 /* Do jump threading. */ + #define CLEANUP_NO_INSN_DEL 128 /* Do not try to delete trivially dead + insns. */ /* Flags for loop discovery. */ #define LOOP_TREE 1 /* Build loop hierarchy tree. */ *************** enum update_life_extent *** 582,593 **** #define LOOP_ENTRY_EDGES 4 /* Find entry edges. */ #define LOOP_EXIT_EDGES 8 /* Find exit edges. */ #define LOOP_EDGES (LOOP_ENTRY_EDGES | LOOP_EXIT_EDGES) ! #define LOOP_EXITS_DOMS 16 /* Find nodes that dom. all exits. */ ! #define LOOP_ALL 31 /* All of the above */ extern void life_analysis PARAMS ((rtx, FILE *, int)); ! extern void update_life_info PARAMS ((sbitmap, enum update_life_extent, int)); extern int count_or_remove_death_notes PARAMS ((sbitmap, int)); extern int propagate_block PARAMS ((basic_block, regset, regset, regset, int)); --- 663,675 ---- #define LOOP_ENTRY_EDGES 4 /* Find entry edges. */ #define LOOP_EXIT_EDGES 8 /* Find exit edges. */ #define LOOP_EDGES (LOOP_ENTRY_EDGES | LOOP_EXIT_EDGES) ! #define LOOP_ALL 15 /* All of the above */ extern void life_analysis PARAMS ((rtx, FILE *, int)); ! extern int update_life_info PARAMS ((sbitmap, enum update_life_extent, int)); + extern int update_life_info_in_dirty_blocks PARAMS ((enum update_life_extent, + int)); extern int count_or_remove_death_notes PARAMS ((sbitmap, int)); extern int propagate_block PARAMS ((basic_block, regset, regset, regset, int)); *************** extern rtx emit_block_insn_before PARAMS *** 617,623 **** --- 699,710 ---- /* In predict.c */ extern void estimate_probability PARAMS ((struct loops *)); + extern void note_prediction_to_br_prob PARAMS ((void)); extern void expected_value_to_br_prob PARAMS ((void)); + extern void note_prediction_to_br_prob PARAMS ((void)); + extern bool maybe_hot_bb_p PARAMS ((basic_block)); + extern bool probably_cold_bb_p PARAMS ((basic_block)); + extern bool probably_never_executed_bb_p PARAMS ((basic_block)); /* In flow.c */ extern void init_flow PARAMS ((void)); *************** extern void debug_regset PARAMS ((regse *** 630,639 **** extern void allocate_reg_life_data PARAMS ((void)); extern void allocate_bb_life_data PARAMS ((void)); extern void expunge_block PARAMS ((basic_block)); ! extern void expunge_block_nocompact PARAMS ((basic_block)); extern basic_block alloc_block PARAMS ((void)); extern void find_unreachable_blocks PARAMS ((void)); ! extern void delete_noop_moves PARAMS ((rtx)); extern basic_block redirect_edge_and_branch_force PARAMS ((edge, basic_block)); extern basic_block force_nonfallthru PARAMS ((edge)); extern bool redirect_edge_and_branch PARAMS ((edge, basic_block)); --- 717,728 ---- extern void allocate_reg_life_data PARAMS ((void)); extern void allocate_bb_life_data PARAMS ((void)); extern void expunge_block PARAMS ((basic_block)); ! extern void link_block PARAMS ((basic_block, basic_block)); ! extern void unlink_block PARAMS ((basic_block)); ! extern void compact_blocks PARAMS ((void)); extern basic_block alloc_block PARAMS ((void)); extern void find_unreachable_blocks PARAMS ((void)); ! extern int delete_noop_moves PARAMS ((rtx)); extern basic_block redirect_edge_and_branch_force PARAMS ((edge, basic_block)); extern basic_block force_nonfallthru PARAMS ((edge)); extern bool redirect_edge_and_branch PARAMS ((edge, basic_block)); *************** extern void free_aux_for_edges PARAMS ( *** 661,673 **** debugger, and it is declared extern so we don't get warnings about it being unused. */ extern void verify_flow_info PARAMS ((void)); ! extern int flow_loop_outside_edge_p PARAMS ((const struct loop *, edge)); typedef struct conflict_graph_def *conflict_graph; /* Callback function when enumerating conflicts. The arguments are the smaller and larger regno in the conflict. Returns zero if ! enumeration is to continue, non-zero to halt enumeration. */ typedef int (*conflict_graph_enum_fn) PARAMS ((int, int, void *)); --- 750,781 ---- debugger, and it is declared extern so we don't get warnings about it being unused. */ extern void verify_flow_info PARAMS ((void)); ! extern bool flow_loop_outside_edge_p PARAMS ((const struct loop *, edge)); ! extern bool flow_loop_nested_p PARAMS ((const struct loop *, ! const struct loop *)); ! extern bool flow_bb_inside_loop_p PARAMS ((const struct loop *, ! const basic_block)); ! extern basic_block *get_loop_body PARAMS ((const struct loop *)); ! extern int dfs_enumerate_from PARAMS ((basic_block, int, ! bool (*)(basic_block, void *), ! basic_block *, int, void *)); ! ! extern edge loop_preheader_edge PARAMS ((struct loop *)); ! extern edge loop_latch_edge PARAMS ((struct loop *)); ! ! extern void add_bb_to_loop PARAMS ((basic_block, struct loop *)); ! extern void remove_bb_from_loops PARAMS ((basic_block)); ! extern struct loop * find_common_loop PARAMS ((struct loop *, struct loop *)); ! ! extern void verify_loop_structure PARAMS ((struct loops *, int)); ! #define VLS_EXPECT_PREHEADERS 1 ! #define VLS_EXPECT_SIMPLE_LATCHES 2 typedef struct conflict_graph_def *conflict_graph; /* Callback function when enumerating conflicts. The arguments are the smaller and larger regno in the conflict. Returns zero if ! enumeration is to continue, nonzero to halt enumeration. */ typedef int (*conflict_graph_enum_fn) PARAMS ((int, int, void *)); *************** extern conflict_graph conflict_graph_com *** 690,697 **** --- 798,809 ---- PARAMS ((regset, partition)); extern bool mark_dfs_back_edges PARAMS ((void)); + extern void set_edge_can_fallthru_flag PARAMS ((void)); extern void update_br_prob_note PARAMS ((basic_block)); extern void fixup_abnormal_edges PARAMS ((void)); + extern bool can_hoist_insn_p PARAMS ((rtx, rtx, regset)); + extern rtx hoist_insn_after PARAMS ((rtx, rtx, rtx, rtx)); + extern rtx hoist_insn_to_edge PARAMS ((rtx, edge, rtx, rtx)); extern bool control_flow_insn_p PARAMS ((rtx)); /* In dominance.c */ *************** enum cdi_direction *** 702,708 **** CDI_POST_DOMINATORS }; ! extern void calculate_dominance_info PARAMS ((int *, sbitmap *, ! enum cdi_direction)); ! #endif /* GCC_BASIC_BLOCK_H */ --- 814,834 ---- CDI_POST_DOMINATORS }; ! extern dominance_info calculate_dominance_info PARAMS ((enum cdi_direction)); ! extern void free_dominance_info PARAMS ((dominance_info)); ! extern basic_block nearest_common_dominator PARAMS ((dominance_info, ! basic_block, basic_block)); ! extern void set_immediate_dominator PARAMS ((dominance_info, ! basic_block, basic_block)); ! extern basic_block get_immediate_dominator PARAMS ((dominance_info, ! basic_block)); ! extern bool dominated_by_p PARAMS ((dominance_info, basic_block, basic_block)); ! extern int get_dominated_by PARAMS ((dominance_info, basic_block, basic_block **)); ! extern void add_to_dominance_info PARAMS ((dominance_info, basic_block)); ! extern void delete_from_dominance_info PARAMS ((dominance_info, basic_block)); ! basic_block recount_dominator PARAMS ((dominance_info, basic_block)); ! extern void redirect_immediate_dominators PARAMS ((dominance_info, basic_block, ! basic_block)); ! void iterate_fix_dominators PARAMS ((dominance_info, basic_block *, int)); ! extern void verify_dominators PARAMS ((dominance_info)); #endif /* GCC_BASIC_BLOCK_H */ diff -Nrc3pad gcc-3.2.3/gcc/bb-reorder.c gcc-3.3/gcc/bb-reorder.c *** gcc-3.2.3/gcc/bb-reorder.c 2003-02-20 20:10:57.000000000 +0000 --- gcc-3.3/gcc/bb-reorder.c 2003-03-21 23:56:58.000000000 +0000 *************** *** 89,99 **** --- 89,101 ---- #include "flags.h" #include "output.h" #include "cfglayout.h" + #include "function.h" #include "target.h" /* Local function prototypes. */ static void make_reorder_chain PARAMS ((void)); static basic_block make_reorder_chain_1 PARAMS ((basic_block, basic_block)); + static basic_block maybe_duplicate_computed_goto_succ PARAMS ((basic_block)); /* Compute an ordering for a subgraph beginning with block BB. Record the ordering in RBI()->index and chained through RBI()->next. */ *************** static void *** 102,115 **** make_reorder_chain () { basic_block prev = NULL; ! int nbb_m1 = n_basic_blocks - 1; ! basic_block next; /* Loop until we've placed every block. */ do { - int i; - next = NULL; /* Find the next unplaced block. */ --- 104,114 ---- make_reorder_chain () { basic_block prev = NULL; ! basic_block next, bb; /* Loop until we've placed every block. */ do { next = NULL; /* Find the next unplaced block. */ *************** make_reorder_chain () *** 119,137 **** remove from the list as we place. The head of that list is what we're looking for here. */ ! for (i = 0; i <= nbb_m1 && !next; ++i) ! { ! basic_block bb = BASIC_BLOCK (i); ! if (! RBI (bb)->visited) next = bb; ! } if (next) ! prev = make_reorder_chain_1 (next, prev); } while (next); RBI (prev)->next = NULL; } /* A helper function for make_reorder_chain. We do not follow EH edges, or non-fallthru edges to noreturn blocks. --- 118,176 ---- remove from the list as we place. The head of that list is what we're looking for here. */ ! FOR_EACH_BB (bb) ! if (! RBI (bb)->visited) ! { next = bb; ! break; ! } ! if (next) ! prev = make_reorder_chain_1 (next, prev); } while (next); RBI (prev)->next = NULL; } + /* If the successor is our artificial computed_jump block, duplicate it. */ + + static inline basic_block + maybe_duplicate_computed_goto_succ (bb) + basic_block bb; + { + edge e; + basic_block next; + + /* Note that we can't rely on computed_goto_common_label still being in + the instruction stream -- cfgloop.c likes to munge things about. But + we can still use it's non-null-ness to avoid a fruitless search. */ + if (!cfun->computed_goto_common_label) + return NULL; + + /* Only want to duplicate when coming from a simple branch. */ + e = bb->succ; + if (!e || e->succ_next) + return NULL; + + /* Only duplicate if we've already layed out this block once. */ + next = e->dest; + if (!RBI (next)->visited) + return NULL; + + /* See if the block contains only a computed branch. */ + if ((next->head == next->end + || next_active_insn (next->head) == next->end) + && computed_jump_p (next->end)) + { + if (rtl_dump_file) + fprintf (rtl_dump_file, "Duplicating block %d after %d\n", + next->index, bb->index); + return cfg_layout_duplicate_bb (next, e); + } + + return NULL; + } + /* A helper function for make_reorder_chain. We do not follow EH edges, or non-fallthru edges to noreturn blocks. *************** make_reorder_chain_1 (bb, prev) *** 158,170 **** restart: RBI (prev)->next = bb; ! if (rtl_dump_file && prev->index + 1 != bb->index) fprintf (rtl_dump_file, "Reordering block %d after %d\n", bb->index, prev->index); } else { ! if (bb->index != 0) abort (); } RBI (bb)->visited = 1; --- 197,209 ---- restart: RBI (prev)->next = bb; ! if (rtl_dump_file && prev->next_bb != bb) fprintf (rtl_dump_file, "Reordering block %d after %d\n", bb->index, prev->index); } else { ! if (bb->prev_bb != ENTRY_BLOCK_PTR) abort (); } RBI (bb)->visited = 1; *************** make_reorder_chain_1 (bb, prev) *** 208,213 **** --- 247,256 ---- next = ((taken && e_taken) ? e_taken : e_fall)->dest; } + /* If the successor is our artificial computed_jump block, duplicate it. */ + else + next = maybe_duplicate_computed_goto_succ (bb); + /* In the absence of a prediction, disturb things as little as possible by selecting the old "next" block from the list of successors. If there had been a fallthru edge, that will be the one. */ *************** make_reorder_chain_1 (bb, prev) *** 221,227 **** next = e->dest; break; } ! else if (e->dest->index == bb->index + 1) { if (! (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))) next = e->dest; --- 264,270 ---- next = e->dest; break; } ! else if (e->dest == bb->next_bb) { if (! (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))) next = e->dest; diff -Nrc3pad gcc-3.2.3/gcc/bitmap.c gcc-3.3/gcc/bitmap.c *** gcc-3.2.3/gcc/bitmap.c 2002-05-24 12:23:36.000000000 +0000 --- gcc-3.3/gcc/bitmap.c 2003-02-13 23:28:51.000000000 +0000 *************** *** 1,5 **** /* Functions to support general ended bitmaps. ! Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GCC. --- 1,6 ---- /* Functions to support general ended bitmaps. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003 ! Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 23,28 **** --- 24,30 ---- #include "rtl.h" #include "flags.h" #include "obstack.h" + #include "ggc.h" #include "bitmap.h" /* Obstack to allocate bitmap elements from. */ *************** static int bitmap_obstack_init = FALSE; *** 40,52 **** /* Global data */ bitmap_element bitmap_zero_bits; /* An element of all zero bits. */ static bitmap_element *bitmap_free; /* Freelist of bitmap elements. */ static void bitmap_element_free PARAMS ((bitmap, bitmap_element *)); ! static bitmap_element *bitmap_element_allocate PARAMS ((void)); static int bitmap_element_zerop PARAMS ((bitmap_element *)); static void bitmap_element_link PARAMS ((bitmap, bitmap_element *)); static bitmap_element *bitmap_find_bit PARAMS ((bitmap, unsigned int)); /* Free a bitmap element. Since these are allocated off the bitmap_obstack, "free" actually means "put onto the freelist". */ --- 42,74 ---- /* Global data */ bitmap_element bitmap_zero_bits; /* An element of all zero bits. */ static bitmap_element *bitmap_free; /* Freelist of bitmap elements. */ + static GTY((deletable (""))) bitmap_element *bitmap_ggc_free; + static void bitmap_elem_to_freelist PARAMS ((bitmap, bitmap_element *)); static void bitmap_element_free PARAMS ((bitmap, bitmap_element *)); ! static bitmap_element *bitmap_element_allocate PARAMS ((bitmap)); static int bitmap_element_zerop PARAMS ((bitmap_element *)); static void bitmap_element_link PARAMS ((bitmap, bitmap_element *)); static bitmap_element *bitmap_find_bit PARAMS ((bitmap, unsigned int)); + /* Add ELEM to the appropriate freelist. */ + static INLINE void + bitmap_elem_to_freelist (head, elt) + bitmap head; + bitmap_element *elt; + { + if (head->using_obstack) + { + elt->next = bitmap_free; + bitmap_free = elt; + } + else + { + elt->next = bitmap_ggc_free; + bitmap_ggc_free = elt; + } + } + /* Free a bitmap element. Since these are allocated off the bitmap_obstack, "free" actually means "put onto the freelist". */ *************** bitmap_element_free (head, elt) *** 75,130 **** if (head->current) head->indx = head->current->indx; } ! ! elt->next = bitmap_free; ! bitmap_free = elt; } /* Allocate a bitmap element. The bits are cleared, but nothing else is. */ static INLINE bitmap_element * ! bitmap_element_allocate () { bitmap_element *element; ! if (bitmap_free != 0) ! { ! element = bitmap_free; ! bitmap_free = element->next; ! } ! else { ! /* We can't use gcc_obstack_init to initialize the obstack since ! print-rtl.c now calls bitmap functions, and bitmap is linked ! into the gen* functions. */ ! if (!bitmap_obstack_init) { ! bitmap_obstack_init = TRUE; ! ! /* Let particular systems override the size of a chunk. */ #ifndef OBSTACK_CHUNK_SIZE #define OBSTACK_CHUNK_SIZE 0 #endif ! /* Let them override the alloc and free routines too. */ #ifndef OBSTACK_CHUNK_ALLOC #define OBSTACK_CHUNK_ALLOC xmalloc #endif #ifndef OBSTACK_CHUNK_FREE #define OBSTACK_CHUNK_FREE free #endif ! #if !defined(__GNUC__) || (__GNUC__ < 2) #define __alignof__(type) 0 #endif ! ! obstack_specify_allocation (&bitmap_obstack, OBSTACK_CHUNK_SIZE, ! __alignof__ (bitmap_element), ! (void *(*) PARAMS ((long))) OBSTACK_CHUNK_ALLOC, ! (void (*) PARAMS ((void *))) OBSTACK_CHUNK_FREE); } ! ! element = (bitmap_element *) obstack_alloc (&bitmap_obstack, ! sizeof (bitmap_element)); } memset (element->bits, 0, sizeof (element->bits)); --- 97,164 ---- if (head->current) head->indx = head->current->indx; } ! bitmap_elem_to_freelist (head, elt); } /* Allocate a bitmap element. The bits are cleared, but nothing else is. */ static INLINE bitmap_element * ! bitmap_element_allocate (head) ! bitmap head; { bitmap_element *element; ! if (head->using_obstack) { ! if (bitmap_free != 0) { ! element = bitmap_free; ! bitmap_free = element->next; ! } ! else ! { ! /* We can't use gcc_obstack_init to initialize the obstack since ! print-rtl.c now calls bitmap functions, and bitmap is linked ! into the gen* functions. */ ! if (!bitmap_obstack_init) ! { ! bitmap_obstack_init = TRUE; ! ! /* Let particular systems override the size of a chunk. */ #ifndef OBSTACK_CHUNK_SIZE #define OBSTACK_CHUNK_SIZE 0 #endif ! /* Let them override the alloc and free routines too. */ #ifndef OBSTACK_CHUNK_ALLOC #define OBSTACK_CHUNK_ALLOC xmalloc #endif #ifndef OBSTACK_CHUNK_FREE #define OBSTACK_CHUNK_FREE free #endif ! #if !defined(__GNUC__) || (__GNUC__ < 2) #define __alignof__(type) 0 #endif ! ! obstack_specify_allocation (&bitmap_obstack, OBSTACK_CHUNK_SIZE, ! __alignof__ (bitmap_element), ! (void *(*) PARAMS ((long))) OBSTACK_CHUNK_ALLOC, ! (void (*) PARAMS ((void *))) OBSTACK_CHUNK_FREE); ! } ! ! element = (bitmap_element *) obstack_alloc (&bitmap_obstack, ! sizeof (bitmap_element)); } ! } ! else ! { ! if (bitmap_ggc_free != NULL) ! { ! element = bitmap_ggc_free; ! bitmap_ggc_free = element->next; ! } ! else ! element = ggc_alloc (sizeof (bitmap_element)); } memset (element->bits, 0, sizeof (element->bits)); *************** bitmap_clear (head) *** 232,242 **** for (element = head->first; element != 0; element = next) { next = element->next; ! element->next = bitmap_free; ! bitmap_free = element; } ! head->first = head->current = 0; } /* Copy a bitmap to another bitmap. */ --- 266,275 ---- for (element = head->first; element != 0; element = next) { next = element->next; ! bitmap_elem_to_freelist (head, element); } ! head->first = head->current = 0; } /* Copy a bitmap to another bitmap. */ *************** bitmap_copy (to, from) *** 256,262 **** /* Copy elements in forward direction one at a time */ for (from_ptr = from->first; from_ptr; from_ptr = from_ptr->next) { ! bitmap_element *to_elt = bitmap_element_allocate (); to_elt->indx = from_ptr->indx; --- 289,295 ---- /* Copy elements in forward direction one at a time */ for (from_ptr = from->first; from_ptr; from_ptr = from_ptr->next) { ! bitmap_element *to_elt = bitmap_element_allocate (to); to_elt->indx = from_ptr->indx; *************** bitmap_find_bit (head, bit) *** 298,304 **** unsigned int bit; { bitmap_element *element; ! unsigned HOST_WIDE_INT indx = bit / BITMAP_ELEMENT_ALL_BITS; if (head->current == 0 || head->indx == indx) --- 331,337 ---- unsigned int bit; { bitmap_element *element; ! unsigned int indx = bit / BITMAP_ELEMENT_ALL_BITS; if (head->current == 0 || head->indx == indx) *************** bitmap_clear_bit (head, bit) *** 337,346 **** if (ptr != 0) { ! unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT; ! unsigned word_num = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) ! % BITMAP_ELEMENT_WORDS); ! ptr->bits[word_num] &= ~ (((unsigned HOST_WIDE_INT) 1) << bit_num); /* If we cleared the entire word, free up the element */ if (bitmap_element_zerop (ptr)) --- 370,378 ---- if (ptr != 0) { ! unsigned bit_num = bit % BITMAP_WORD_BITS; ! unsigned word_num = bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; ! ptr->bits[word_num] &= ~ (((BITMAP_WORD) 1) << bit_num); /* If we cleared the entire word, free up the element */ if (bitmap_element_zerop (ptr)) *************** bitmap_set_bit (head, bit) *** 356,369 **** int bit; { bitmap_element *ptr = bitmap_find_bit (head, bit); ! unsigned word_num ! = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS); ! unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT; ! unsigned HOST_WIDE_INT bit_val = ((unsigned HOST_WIDE_INT) 1) << bit_num; if (ptr == 0) { ! ptr = bitmap_element_allocate (); ptr->indx = bit / BITMAP_ELEMENT_ALL_BITS; ptr->bits[word_num] = bit_val; bitmap_element_link (head, ptr); --- 388,400 ---- int bit; { bitmap_element *ptr = bitmap_find_bit (head, bit); ! unsigned word_num = bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; ! unsigned bit_num = bit % BITMAP_WORD_BITS; ! BITMAP_WORD bit_val = ((BITMAP_WORD) 1) << bit_num; if (ptr == 0) { ! ptr = bitmap_element_allocate (head); ptr->indx = bit / BITMAP_ELEMENT_ALL_BITS; ptr->bits[word_num] = bit_val; bitmap_element_link (head, ptr); *************** bitmap_bit_p (head, bit) *** 387,395 **** if (ptr == 0) return 0; ! bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT; ! word_num ! = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS); return (ptr->bits[word_num] >> bit_num) & 1; } --- 418,425 ---- if (ptr == 0) return 0; ! bit_num = bit % BITMAP_WORD_BITS; ! word_num = bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; return (ptr->bits[word_num] >> bit_num) & 1; } *************** bitmap_bit_p (head, bit) *** 397,408 **** /* Return the bit number of the first set bit in the bitmap, or -1 if the bitmap is empty. */ ! int bitmap_first_set_bit (a) bitmap a; { bitmap_element *ptr = a->first; ! unsigned HOST_WIDE_INT word; unsigned word_num, bit_num; if (ptr == NULL) --- 427,438 ---- /* Return the bit number of the first set bit in the bitmap, or -1 if the bitmap is empty. */ ! int bitmap_first_set_bit (a) bitmap a; { bitmap_element *ptr = a->first; ! BITMAP_WORD word; unsigned word_num, bit_num; if (ptr == NULL) *************** bitmap_first_set_bit (a) *** 424,433 **** bit_num = 0; word = word & -word; ! #if HOST_BITS_PER_WIDE_INT > 64 #error "Fill out the table." #endif ! #if HOST_BITS_PER_WIDE_INT > 32 if ((word & 0xffffffff) == 0) word >>= 32, bit_num += 32; #endif --- 454,463 ---- bit_num = 0; word = word & -word; ! #if nBITMAP_WORD_BITS > 64 #error "Fill out the table." #endif ! #if nBITMAP_WORD_BITS > 32 if ((word & 0xffffffff) == 0) word >>= 32, bit_num += 32; #endif *************** bitmap_first_set_bit (a) *** 443,461 **** bit_num += 1; return (ptr->indx * BITMAP_ELEMENT_ALL_BITS ! + word_num * HOST_BITS_PER_WIDE_INT + bit_num); } /* Return the bit number of the last set bit in the bitmap, or -1 if the bitmap is empty. */ ! int bitmap_last_set_bit (a) bitmap a; { bitmap_element *ptr = a->first; ! unsigned HOST_WIDE_INT word; unsigned word_num, bit_num; if (ptr == NULL) --- 473,491 ---- bit_num += 1; return (ptr->indx * BITMAP_ELEMENT_ALL_BITS ! + word_num * BITMAP_WORD_BITS + bit_num); } /* Return the bit number of the last set bit in the bitmap, or -1 if the bitmap is empty. */ ! int bitmap_last_set_bit (a) bitmap a; { bitmap_element *ptr = a->first; ! BITMAP_WORD word; unsigned word_num, bit_num; if (ptr == NULL) *************** bitmap_last_set_bit (a) *** 477,487 **** /* Binary search for the last set bit. */ bit_num = 0; ! #if HOST_BITS_PER_WIDE_INT > 64 #error "Fill out the table." #endif ! #if HOST_BITS_PER_WIDE_INT > 32 ! if (word & ~ (unsigned HOST_WIDE_INT) 0xffffffff) word >>= 32, bit_num += 32; #endif if (word & 0xffff0000) --- 507,517 ---- /* Binary search for the last set bit. */ bit_num = 0; ! #if nBITMAP_WORD_BITS > 64 #error "Fill out the table." #endif ! #if nBITMAP_WORD_BITS > 32 ! if (word & ~(BITMAP_WORD)0xffffffff) word >>= 32, bit_num += 32; #endif if (word & 0xffff0000) *************** bitmap_last_set_bit (a) *** 496,502 **** bit_num += 1; return (ptr->indx * BITMAP_ELEMENT_ALL_BITS ! + word_num * HOST_BITS_PER_WIDE_INT + bit_num); } --- 526,532 ---- bit_num += 1; return (ptr->indx * BITMAP_ELEMENT_ALL_BITS ! + word_num * BITMAP_WORD_BITS + bit_num); } *************** bitmap_operation (to, from1, from2, oper *** 526,532 **** #if BITMAP_ELEMENT_WORDS == 2 #define DOIT(OP) \ do { \ ! unsigned HOST_WIDE_INT t0, t1, f10, f11, f20, f21; \ f10 = from1_tmp->bits[0]; \ f20 = from2_tmp->bits[0]; \ t0 = f10 OP f20; \ --- 556,562 ---- #if BITMAP_ELEMENT_WORDS == 2 #define DOIT(OP) \ do { \ ! BITMAP_WORD t0, t1, f10, f11, f20, f21; \ f10 = from1_tmp->bits[0]; \ f20 = from2_tmp->bits[0]; \ t0 = f10 OP f20; \ *************** bitmap_operation (to, from1, from2, oper *** 541,547 **** #else #define DOIT(OP) \ do { \ ! unsigned HOST_WIDE_INT t, f1, f2; \ int i; \ for (i = 0; i < BITMAP_ELEMENT_WORDS; ++i) \ { \ --- 571,577 ---- #else #define DOIT(OP) \ do { \ ! BITMAP_WORD t, f1, f2; \ int i; \ for (i = 0; i < BITMAP_ELEMENT_WORDS; ++i) \ { \ *************** bitmap_operation (to, from1, from2, oper *** 594,601 **** changed = 1; to_tmp = to_ptr; to_ptr = to_ptr->next; ! to_tmp->next = bitmap_free; ! bitmap_free = to_tmp; } if (to_ptr && to_ptr->indx == indx) { --- 624,630 ---- changed = 1; to_tmp = to_ptr; to_ptr = to_ptr->next; ! bitmap_elem_to_freelist (to, to_tmp); } if (to_ptr && to_ptr->indx == indx) { *************** bitmap_operation (to, from1, from2, oper *** 603,609 **** to_ptr = to_ptr->next; } else ! to_tmp = bitmap_element_allocate (); /* Do the operation, and if any bits are set, link it into the linked list. */ --- 632,638 ---- to_ptr = to_ptr->next; } else ! to_tmp = bitmap_element_allocate (to); /* Do the operation, and if any bits are set, link it into the linked list. */ *************** bitmap_operation (to, from1, from2, oper *** 638,645 **** } else { ! to_tmp->next = bitmap_free; ! bitmap_free = to_tmp; } } --- 667,673 ---- } else { ! bitmap_elem_to_freelist (to, to_tmp); } } *************** bitmap_operation (to, from1, from2, oper *** 649,656 **** changed = 1; for (to_tmp = to_ptr; to_tmp->next ; to_tmp = to_tmp->next) continue; ! to_tmp->next = bitmap_free; ! bitmap_free = to_ptr; } #undef DOIT --- 677,692 ---- changed = 1; for (to_tmp = to_ptr; to_tmp->next ; to_tmp = to_tmp->next) continue; ! if (to->using_obstack) ! { ! to_tmp->next = bitmap_free; ! bitmap_free = to_ptr; ! } ! else ! { ! to_tmp->next = bitmap_ggc_free; ! bitmap_ggc_free = to_ptr; ! } } #undef DOIT *************** bitmap_equal_p (a, b) *** 668,674 **** bitmap_head c; int ret; ! c.first = c.current = 0; ret = ! bitmap_operation (&c, a, b, BITMAP_XOR); bitmap_clear (&c); --- 704,710 ---- bitmap_head c; int ret; ! memset (&c, 0, sizeof (c)); ret = ! bitmap_operation (&c, a, b, BITMAP_XOR); bitmap_clear (&c); *************** bitmap_ior_and_compl (to, from1, from2) *** 687,692 **** --- 723,729 ---- bitmap_head tmp; tmp.first = tmp.current = 0; + tmp.using_obstack = 0; bitmap_operation (&tmp, from1, from2, BITMAP_AND_COMPL); bitmap_operation (to, to, &tmp, BITMAP_IOR); *************** bitmap_union_of_diff (dst, a, b, c) *** 704,709 **** --- 741,747 ---- int changed; tmp.first = tmp.current = 0; + tmp.using_obstack = 0; bitmap_operation (&tmp, b, c, BITMAP_AND_COMPL); changed = bitmap_operation (dst, &tmp, a, BITMAP_IOR); *************** bitmap_union_of_diff (dst, a, b, c) *** 715,724 **** /* Initialize a bitmap header. */ bitmap ! bitmap_initialize (head) bitmap head; { head->first = head->current = 0; return head; } --- 753,767 ---- /* Initialize a bitmap header. */ bitmap ! bitmap_initialize (head, using_obstack) bitmap head; + int using_obstack; { + if (head == NULL && ! using_obstack) + head = ggc_alloc (sizeof (*head)); + head->first = head->current = 0; + head->using_obstack = using_obstack; return head; } *************** debug_bitmap_file (file, head) *** 740,746 **** for (ptr = head->first; ptr; ptr = ptr->next) { ! int i, j, col = 26; fprintf (file, "\t"); fprintf (file, HOST_PTR_PRINTF, (PTR) ptr); --- 783,789 ---- for (ptr = head->first; ptr; ptr = ptr->next) { ! unsigned int i, j, col = 26; fprintf (file, "\t"); fprintf (file, HOST_PTR_PRINTF, (PTR) ptr); *************** debug_bitmap_file (file, head) *** 751,757 **** fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx); for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) ! for (j = 0; j < HOST_BITS_PER_WIDE_INT; j++) if ((ptr->bits[i] >> j) & 1) { if (col > 70) --- 794,800 ---- fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx); for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) ! for (j = 0; j < BITMAP_WORD_BITS; j++) if ((ptr->bits[i] >> j) & 1) { if (col > 70) *************** debug_bitmap_file (file, head) *** 761,767 **** } fprintf (file, " %u", (ptr->indx * BITMAP_ELEMENT_ALL_BITS ! + i * HOST_BITS_PER_WIDE_INT + j)); col += 4; } --- 804,810 ---- } fprintf (file, " %u", (ptr->indx * BITMAP_ELEMENT_ALL_BITS ! + i * BITMAP_WORD_BITS + j)); col += 4; } *************** bitmap_print (file, head, prefix, suffix *** 800,802 **** --- 843,847 ---- }); fputs (suffix, file); } + + #include "gt-bitmap.h" diff -Nrc3pad gcc-3.2.3/gcc/bitmap.h gcc-3.3/gcc/bitmap.h *** gcc-3.2.3/gcc/bitmap.h 2002-01-18 13:40:27.000000000 +0000 --- gcc-3.3/gcc/bitmap.h 2003-02-13 23:28:55.000000000 +0000 *************** *** 1,5 **** /* Functions to support general ended bitmaps. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Functions to support general ended bitmaps. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 20,31 **** 02111-1307, USA. */ #ifndef GCC_BITMAP_H ! #define GCC_BITMAP_H /* Number of words to use for each element in the linked list. */ #ifndef BITMAP_ELEMENT_WORDS ! #define BITMAP_ELEMENT_WORDS 2 #endif /* Number of bits in each actual element of a bitmap. We get slightly better --- 20,39 ---- 02111-1307, USA. */ #ifndef GCC_BITMAP_H ! #define GCC_BITMAP_H ! ! /* Fundamental storage type for bitmap. */ ! ! /* typedef unsigned HOST_WIDE_INT BITMAP_WORD; */ ! /* #define nBITMAP_WORD_BITS HOST_BITS_PER_WIDE_INT */ ! typedef unsigned long BITMAP_WORD; ! #define nBITMAP_WORD_BITS (CHAR_BIT * SIZEOF_LONG) ! #define BITMAP_WORD_BITS (unsigned) nBITMAP_WORD_BITS /* Number of words to use for each element in the linked list. */ #ifndef BITMAP_ELEMENT_WORDS ! #define BITMAP_ELEMENT_WORDS ((128 + nBITMAP_WORD_BITS - 1) / nBITMAP_WORD_BITS) #endif /* Number of bits in each actual element of a bitmap. We get slightly better *************** Software Foundation, 59 Temple Place - S *** 33,60 **** bits is unsigned, assuming it is a power of 2. */ #define BITMAP_ELEMENT_ALL_BITS \ ! ((unsigned) (BITMAP_ELEMENT_WORDS * HOST_BITS_PER_WIDE_INT)) /* Bitmap set element. We use a linked list to hold only the bits that are set. This allows for use to grow the bitset dynamically without having to realloc and copy a giant bit array. The `prev' field is undefined for an element on the free list. */ ! typedef struct bitmap_element_def { struct bitmap_element_def *next; /* Next element. */ struct bitmap_element_def *prev; /* Previous element. */ unsigned int indx; /* regno/BITMAP_ELEMENT_ALL_BITS. */ ! unsigned HOST_WIDE_INT bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */ } bitmap_element; /* Head of bitmap linked list. */ ! typedef struct bitmap_head_def { bitmap_element *first; /* First element in linked list. */ bitmap_element *current; /* Last element looked at. */ unsigned int indx; /* Index of last element looked at. */ ! ! } bitmap_head, *bitmap; /* Enumeration giving the various operations we support. */ enum bitmap_bits { --- 41,70 ---- bits is unsigned, assuming it is a power of 2. */ #define BITMAP_ELEMENT_ALL_BITS \ ! ((unsigned) (BITMAP_ELEMENT_WORDS * BITMAP_WORD_BITS)) /* Bitmap set element. We use a linked list to hold only the bits that are set. This allows for use to grow the bitset dynamically without having to realloc and copy a giant bit array. The `prev' field is undefined for an element on the free list. */ ! typedef struct bitmap_element_def GTY(()) { struct bitmap_element_def *next; /* Next element. */ struct bitmap_element_def *prev; /* Previous element. */ unsigned int indx; /* regno/BITMAP_ELEMENT_ALL_BITS. */ ! BITMAP_WORD bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */ } bitmap_element; /* Head of bitmap linked list. */ ! typedef struct bitmap_head_def GTY(()) { bitmap_element *first; /* First element in linked list. */ bitmap_element *current; /* Last element looked at. */ unsigned int indx; /* Index of last element looked at. */ ! int using_obstack; /* Are we using an obstack or ggc for ! allocation? */ ! } bitmap_head; ! typedef struct bitmap_head_def *bitmap; /* Enumeration giving the various operations we support. */ enum bitmap_bits { *************** extern void debug_bitmap_file PARAMS ((F *** 100,109 **** /* Print a bitmap */ extern void bitmap_print PARAMS ((FILE *, bitmap, const char *, const char *)); ! /* Initialize a bitmap header. */ ! extern bitmap bitmap_initialize PARAMS ((bitmap)); ! /* Release all memory held by bitmaps. */ extern void bitmap_release_memory PARAMS ((void)); /* A few compatibility/functions macros for compatibility with sbitmaps */ --- 110,121 ---- /* Print a bitmap */ extern void bitmap_print PARAMS ((FILE *, bitmap, const char *, const char *)); ! /* Initialize a bitmap header. If HEAD is NULL, a new header will be ! allocated. USING_OBSTACK indicates how elements should be allocated. */ ! extern bitmap bitmap_initialize PARAMS ((bitmap head, ! int using_obstack)); ! /* Release all memory used by the bitmap obstack. */ extern void bitmap_release_memory PARAMS ((void)); /* A few compatibility/functions macros for compatibility with sbitmaps */ *************** extern int bitmap_last_set_bit PARAMS((b *** 117,138 **** /* Allocate a bitmap with oballoc. */ #define BITMAP_OBSTACK_ALLOC(OBSTACK) \ ! bitmap_initialize ((bitmap) obstack_alloc (OBSTACK, sizeof (bitmap_head))) - /* Allocate a bitmap with alloca. Note alloca cannot be passed as an - argument to a function, so we set a temporary variable to the value - returned by alloca and pass that variable to bitmap_initialize(). - PTR is then set to the value returned from bitmap_initialize() to - avoid having it appear more than once in case it has side effects. */ - #define BITMAP_ALLOCA(PTR) \ - do { \ - bitmap temp_bitmap_ = (bitmap) alloca (sizeof (bitmap_head)); \ - (PTR) = bitmap_initialize (temp_bitmap_); \ - } while (0) - /* Allocate a bitmap with xmalloc. */ #define BITMAP_XMALLOC() \ ! bitmap_initialize ((bitmap) xmalloc (sizeof (bitmap_head))) /* Do any cleanup needed on a bitmap when it is no longer used. */ #define BITMAP_FREE(BITMAP) \ --- 129,143 ---- /* Allocate a bitmap with oballoc. */ #define BITMAP_OBSTACK_ALLOC(OBSTACK) \ ! bitmap_initialize ((bitmap) obstack_alloc (OBSTACK, sizeof (bitmap_head)), 1) ! ! /* Allocate a bitmap with ggc_alloc. */ ! #define BITMAP_GGC_ALLOC() \ ! bitmap_initialize (NULL, 0) /* Allocate a bitmap with xmalloc. */ #define BITMAP_XMALLOC() \ ! bitmap_initialize ((bitmap) xmalloc (sizeof (bitmap_head)), 1) /* Do any cleanup needed on a bitmap when it is no longer used. */ #define BITMAP_FREE(BITMAP) \ *************** do { \ *** 165,173 **** do { \ bitmap_element *ptr_ = (BITMAP)->first; \ unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ ! unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \ ! unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \ ! % BITMAP_ELEMENT_WORDS); \ \ \ /* Find the block the minimum bit is in. */ \ --- 170,177 ---- do { \ bitmap_element *ptr_ = (BITMAP)->first; \ unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ ! unsigned bit_num_ = (MIN) % BITMAP_WORD_BITS; \ ! unsigned word_num_ = (MIN) / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; \ \ \ /* Find the block the minimum bit is in. */ \ *************** do { \ *** 184,203 **** { \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ ! unsigned HOST_WIDE_INT word_ = ptr_->bits[word_num_]; \ \ if (word_ != 0) \ { \ ! for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ { \ ! unsigned HOST_WIDE_INT mask_ \ ! = ((unsigned HOST_WIDE_INT) 1) << bit_num_; \ \ if ((word_ & mask_) != 0) \ { \ word_ &= ~ mask_; \ (BITNUM) = (ptr_->indx * BITMAP_ELEMENT_ALL_BITS \ ! + word_num_ * HOST_BITS_PER_WIDE_INT \ + bit_num_); \ CODE; \ \ --- 188,206 ---- { \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ ! BITMAP_WORD word_ = ptr_->bits[word_num_]; \ \ if (word_ != 0) \ { \ ! for (; bit_num_ < BITMAP_WORD_BITS; bit_num_++) \ { \ ! BITMAP_WORD mask_ = ((BITMAP_WORD) 1) << bit_num_; \ \ if ((word_ & mask_) != 0) \ { \ word_ &= ~ mask_; \ (BITNUM) = (ptr_->indx * BITMAP_ELEMENT_ALL_BITS \ ! + word_num_ * BITMAP_WORD_BITS \ + bit_num_); \ CODE; \ \ *************** do { \ *** 223,231 **** bitmap_element *ptr1_ = (BITMAP1)->first; \ bitmap_element *ptr2_ = (BITMAP2)->first; \ unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ ! unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \ ! unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \ ! % BITMAP_ELEMENT_WORDS); \ \ /* Find the block the minimum bit is in in the first bitmap. */ \ while (ptr1_ != 0 && ptr1_->indx < indx_) \ --- 226,233 ---- bitmap_element *ptr1_ = (BITMAP1)->first; \ bitmap_element *ptr2_ = (BITMAP2)->first; \ unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ ! unsigned bit_num_ = (MIN) % BITMAP_WORD_BITS; \ ! unsigned word_num_ = (MIN) / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; \ \ /* Find the block the minimum bit is in in the first bitmap. */ \ while (ptr1_ != 0 && ptr1_->indx < indx_) \ *************** do { \ *** 251,270 **** \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ ! unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \ ! & ~ tmp2_->bits[word_num_]); \ if (word_ != 0) \ { \ ! for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ { \ ! unsigned HOST_WIDE_INT mask_ \ ! = ((unsigned HOST_WIDE_INT)1) << bit_num_; \ \ if ((word_ & mask_) != 0) \ { \ word_ &= ~ mask_; \ (BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \ ! + word_num_ * HOST_BITS_PER_WIDE_INT \ + bit_num_); \ \ CODE; \ --- 253,271 ---- \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ ! BITMAP_WORD word_ = (ptr1_->bits[word_num_] \ ! & ~ tmp2_->bits[word_num_]); \ if (word_ != 0) \ { \ ! for (; bit_num_ < BITMAP_WORD_BITS; bit_num_++) \ { \ ! BITMAP_WORD mask_ = ((BITMAP_WORD) 1) << bit_num_; \ \ if ((word_ & mask_) != 0) \ { \ word_ &= ~ mask_; \ (BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \ ! + word_num_ * BITMAP_WORD_BITS \ + bit_num_); \ \ CODE; \ *************** do { \ *** 290,298 **** bitmap_element *ptr1_ = (BITMAP1)->first; \ bitmap_element *ptr2_ = (BITMAP2)->first; \ unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ ! unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \ ! unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \ ! % BITMAP_ELEMENT_WORDS); \ \ /* Find the block the minimum bit is in in the first bitmap. */ \ while (ptr1_ != 0 && ptr1_->indx < indx_) \ --- 291,298 ---- bitmap_element *ptr1_ = (BITMAP1)->first; \ bitmap_element *ptr2_ = (BITMAP2)->first; \ unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ ! unsigned bit_num_ = (MIN) % BITMAP_WORD_BITS; \ ! unsigned word_num_ = (MIN) / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; \ \ /* Find the block the minimum bit is in in the first bitmap. */ \ while (ptr1_ != 0 && ptr1_->indx < indx_) \ *************** do { \ *** 324,343 **** \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ ! unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \ ! & ptr2_->bits[word_num_]); \ if (word_ != 0) \ { \ ! for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ { \ ! unsigned HOST_WIDE_INT mask_ \ ! = ((unsigned HOST_WIDE_INT)1) << bit_num_; \ \ if ((word_ & mask_) != 0) \ { \ word_ &= ~ mask_; \ (BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \ ! + word_num_ * HOST_BITS_PER_WIDE_INT \ + bit_num_); \ \ CODE; \ --- 324,342 ---- \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ ! BITMAP_WORD word_ = (ptr1_->bits[word_num_] \ ! & ptr2_->bits[word_num_]); \ if (word_ != 0) \ { \ ! for (; bit_num_ < BITMAP_WORD_BITS; bit_num_++) \ { \ ! BITMAP_WORD mask_ = ((BITMAP_WORD) 1) << bit_num_; \ \ if ((word_ & mask_) != 0) \ { \ word_ &= ~ mask_; \ (BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \ ! + word_num_ * BITMAP_WORD_BITS \ + bit_num_); \ \ CODE; \ diff -Nrc3pad gcc-3.2.3/gcc/builtin-attrs.def gcc-3.3/gcc/builtin-attrs.def *** gcc-3.2.3/gcc/builtin-attrs.def 2001-12-21 02:36:34.000000000 +0000 --- gcc-3.3/gcc/builtin-attrs.def 2003-03-04 14:37:20.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 2001 Free Software Foundation, Inc. Contributed by Joseph Myers . This file is part of GCC. --- 1,4 ---- ! /* Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Joseph Myers . This file is part of GCC. *************** DEF_LIST_INT_INT (3,0) *** 77,112 **** DEF_LIST_INT_INT (3,4) #undef DEF_LIST_INT_INT DEF_ATTR_IDENT (ATTR_PRINTF, "printf") DEF_ATTR_IDENT (ATTR_SCANF, "scanf") - DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime") DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon") ! DEF_ATTR_IDENT (ATTR_FORMAT, "format") ! DEF_ATTR_IDENT (ATTR_FORMAT_ARG, "format_arg") /* Construct a tree for a format attribute. */ ! #define DEF_FORMAT_ATTRIBUTE(TYPE, VALUES) \ DEF_ATTR_TREE_LIST (CONCAT4 (ATTR_,TYPE,_,VALUES), ATTR_NULL, \ CONCAT2 (ATTR_,TYPE), CONCAT2 (ATTR_LIST_,VALUES)) \ DEF_ATTR_TREE_LIST (CONCAT4 (ATTR_FORMAT_,TYPE,_,VALUES), ATTR_FORMAT, \ ! CONCAT4 (ATTR_,TYPE,_,VALUES), ATTR_NULL) ! DEF_FORMAT_ATTRIBUTE(PRINTF,1_0) ! DEF_FORMAT_ATTRIBUTE(PRINTF,1_2) ! DEF_FORMAT_ATTRIBUTE(PRINTF,2_0) ! DEF_FORMAT_ATTRIBUTE(PRINTF,2_3) ! DEF_FORMAT_ATTRIBUTE(PRINTF,3_0) ! DEF_FORMAT_ATTRIBUTE(PRINTF,3_4) ! DEF_FORMAT_ATTRIBUTE(SCANF,1_0) ! DEF_FORMAT_ATTRIBUTE(SCANF,1_2) ! DEF_FORMAT_ATTRIBUTE(SCANF,2_0) ! DEF_FORMAT_ATTRIBUTE(SCANF,2_3) ! DEF_FORMAT_ATTRIBUTE(STRFTIME,3_0) ! DEF_FORMAT_ATTRIBUTE(STRFMON,3_4) #undef DEF_FORMAT_ATTRIBUTE ! DEF_ATTR_TREE_LIST (ATTR_FORMAT_ARG_1, ATTR_FORMAT_ARG, ATTR_LIST_1, ATTR_NULL) ! DEF_ATTR_TREE_LIST (ATTR_FORMAT_ARG_2, ATTR_FORMAT_ARG, ATTR_LIST_2, ATTR_NULL) /* Define an attribute for a function, along with the IDENTIFIER_NODE. */ #define DEF_FN_ATTR_IDENT(NAME, ATTRS, PREDICATE) \ --- 77,141 ---- DEF_LIST_INT_INT (3,4) #undef DEF_LIST_INT_INT + /* Construct tress for identifiers. */ + DEF_ATTR_IDENT (ATTR_CONST, "const") + DEF_ATTR_IDENT (ATTR_FORMAT, "format") + DEF_ATTR_IDENT (ATTR_FORMAT_ARG, "format_arg") + DEF_ATTR_IDENT (ATTR_MALLOC, "malloc") + DEF_ATTR_IDENT (ATTR_NONNULL, "nonnull") + DEF_ATTR_IDENT (ATTR_NORETURN, "noreturn") + DEF_ATTR_IDENT (ATTR_NOTHROW, "nothrow") DEF_ATTR_IDENT (ATTR_PRINTF, "printf") + DEF_ATTR_IDENT (ATTR_PURE, "pure") DEF_ATTR_IDENT (ATTR_SCANF, "scanf") DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon") + DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime") ! DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LIST, ATTR_NOTHROW, ATTR_NULL, ATTR_NULL) ! ! DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LIST, ATTR_CONST, \ ! ATTR_NULL, ATTR_NOTHROW_LIST) ! DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LIST, ATTR_PURE, \ ! ATTR_NULL, ATTR_NOTHROW_LIST) ! DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN, \ ! ATTR_NULL, ATTR_NOTHROW_LIST) ! DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC, \ ! ATTR_NULL, ATTR_NOTHROW_LIST) ! ! DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \ ! ATTR_NOTHROW_LIST) ! DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, \ ! ATTR_NOTHROW_LIST) ! DEF_ATTR_TREE_LIST (ATTR_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, \ ! ATTR_NOTHROW_LIST) /* Construct a tree for a format attribute. */ ! #define DEF_FORMAT_ATTRIBUTE(TYPE, FA, VALUES) \ DEF_ATTR_TREE_LIST (CONCAT4 (ATTR_,TYPE,_,VALUES), ATTR_NULL, \ CONCAT2 (ATTR_,TYPE), CONCAT2 (ATTR_LIST_,VALUES)) \ DEF_ATTR_TREE_LIST (CONCAT4 (ATTR_FORMAT_,TYPE,_,VALUES), ATTR_FORMAT, \ ! CONCAT4 (ATTR_,TYPE,_,VALUES), CONCAT2 (ATTR_NONNULL_,FA)) ! DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_0) ! DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_2) ! DEF_FORMAT_ATTRIBUTE(PRINTF,2,2_0) ! DEF_FORMAT_ATTRIBUTE(PRINTF,2,2_3) ! DEF_FORMAT_ATTRIBUTE(PRINTF,3,3_0) ! DEF_FORMAT_ATTRIBUTE(PRINTF,3,3_4) ! DEF_FORMAT_ATTRIBUTE(SCANF,1,1_0) ! DEF_FORMAT_ATTRIBUTE(SCANF,1,1_2) ! DEF_FORMAT_ATTRIBUTE(SCANF,2,2_0) ! DEF_FORMAT_ATTRIBUTE(SCANF,2,2_3) ! DEF_FORMAT_ATTRIBUTE(STRFTIME,3,3_0) ! DEF_FORMAT_ATTRIBUTE(STRFMON,3,3_4) #undef DEF_FORMAT_ATTRIBUTE ! /* Construct a tree for a format_arg attribute. */ ! #define DEF_FORMAT_ARG_ATTRIBUTE(FA) \ ! DEF_ATTR_TREE_LIST (CONCAT2 (ATTR_FORMAT_ARG_,FA), ATTR_FORMAT_ARG, \ ! CONCAT2 (ATTR_LIST_,FA), CONCAT2 (ATTR_NONNULL_,FA)) ! DEF_FORMAT_ARG_ATTRIBUTE(1) ! DEF_FORMAT_ARG_ATTRIBUTE(2) ! #undef DEF_FORMAT_ARG_ATTRIBUTE /* Define an attribute for a function, along with the IDENTIFIER_NODE. */ #define DEF_FN_ATTR_IDENT(NAME, ATTRS, PREDICATE) \ *************** DEF_ATTR_TREE_LIST (ATTR_FORMAT_ARG_2, A *** 121,144 **** -ffreestanding, these default attributes are disabled, and must be specified manually if desired. */ - /* __builtin functions should be checked unconditionally, even with - -ffreestanding. */ - DEF_FN_ATTR_IDENT (__builtin_printf, ATTR_FORMAT_PRINTF_1_2, true) - DEF_FN_ATTR_IDENT (__builtin_fprintf, ATTR_FORMAT_PRINTF_2_3, true) - DEF_FN_ATTR_IDENT (__builtin_printf_unlocked, ATTR_FORMAT_PRINTF_1_2, true) - DEF_FN_ATTR_IDENT (__builtin_fprintf_unlocked, ATTR_FORMAT_PRINTF_2_3, true) - /* Functions from ISO/IEC 9899:1990. */ #define DEF_C89_ATTR(NAME, ATTRS) DEF_FN_ATTR_IDENT (NAME, ATTRS, flag_hosted) - DEF_C89_ATTR (printf, ATTR_FORMAT_PRINTF_1_2) - DEF_C89_ATTR (fprintf, ATTR_FORMAT_PRINTF_2_3) - DEF_C89_ATTR (sprintf, ATTR_FORMAT_PRINTF_2_3) - DEF_C89_ATTR (scanf, ATTR_FORMAT_SCANF_1_2) DEF_C89_ATTR (fscanf, ATTR_FORMAT_SCANF_2_3) - DEF_C89_ATTR (sscanf, ATTR_FORMAT_SCANF_2_3) - DEF_C89_ATTR (vprintf, ATTR_FORMAT_PRINTF_1_0) DEF_C89_ATTR (vfprintf, ATTR_FORMAT_PRINTF_2_0) - DEF_C89_ATTR (vsprintf, ATTR_FORMAT_PRINTF_2_0) DEF_C89_ATTR (strftime, ATTR_FORMAT_STRFTIME_3_0) #undef DEF_C89_ATTR --- 150,159 ---- *************** DEF_C89_ATTR (strftime, ATTR_FORMAT_STRF *** 147,157 **** DEF_FN_ATTR_IDENT (NAME, ATTRS, \ (flag_hosted \ && (flag_isoc99 || flag_noniso_default_format_attributes))) - DEF_C99_ATTR (snprintf, ATTR_FORMAT_PRINTF_3_4) - DEF_C99_ATTR (vsnprintf, ATTR_FORMAT_PRINTF_3_0) - DEF_C99_ATTR (vscanf, ATTR_FORMAT_SCANF_1_0) DEF_C99_ATTR (vfscanf, ATTR_FORMAT_SCANF_2_0) - DEF_C99_ATTR (vsscanf, ATTR_FORMAT_SCANF_2_0) #undef DEF_C99_ATTR /* Functions not in any version of ISO C. */ --- 162,168 ---- *************** DEF_EXT_ATTR (dgettext, ATTR_FORMAT_ARG_ *** 164,171 **** DEF_EXT_ATTR (dcgettext, ATTR_FORMAT_ARG_2) /* X/Open strfmon function. */ DEF_EXT_ATTR (strfmon, ATTR_FORMAT_STRFMON_3_4) - /* Glibc thread-unsafe stdio functions. */ - DEF_EXT_ATTR (printf_unlocked, ATTR_FORMAT_PRINTF_1_2) - DEF_EXT_ATTR (fprintf_unlocked, ATTR_FORMAT_PRINTF_2_3) #undef DEF_EXT_ATTR #undef DEF_FN_ATTR_IDENT --- 175,179 ---- diff -Nrc3pad gcc-3.2.3/gcc/builtins.c gcc-3.3/gcc/builtins.c *** gcc-3.2.3/gcc/builtins.c 2003-03-30 04:42:16.000000000 +0000 --- gcc-3.3/gcc/builtins.c 2003-05-05 16:59:13.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 22,30 **** #include "config.h" #include "system.h" #include "machmode.h" #include "rtl.h" #include "tree.h" - #include "obstack.h" #include "flags.h" #include "regs.h" #include "hard-reg-set.h" --- 22,30 ---- #include "config.h" #include "system.h" #include "machmode.h" + #include "real.h" #include "rtl.h" #include "tree.h" #include "flags.h" #include "regs.h" #include "hard-reg-set.h" *************** Software Foundation, 59 Temple Place - S *** 41,46 **** --- 41,47 ---- #include "predict.h" #include "tm_p.h" #include "target.h" + #include "langhooks.h" #define CALLED_AS_BUILT_IN(NODE) \ (!strncmp (IDENTIFIER_POINTER (DECL_NAME (NODE)), "__builtin_", 10)) *************** Software Foundation, 59 Temple Place - S *** 61,67 **** const char *const built_in_class_names[4] = {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"}; ! #define DEF_BUILTIN(X, N, C, T, LT, B, F, NA) STRINGX(X), const char *const built_in_names[(int) END_BUILTINS] = { #include "builtins.def" --- 62,68 ---- const char *const built_in_class_names[4] = {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"}; ! #define DEF_BUILTIN(X, N, C, T, LT, B, F, NA, AT) STRINGX(X), const char *const built_in_names[(int) END_BUILTINS] = { #include "builtins.def" *************** const char *const built_in_names[(int) E *** 72,79 **** initialized to NULL_TREE. */ tree built_in_decls[(int) END_BUILTINS]; - tree (*lang_type_promotes_to) PARAMS ((tree)); - static int get_pointer_alignment PARAMS ((tree, unsigned int)); static tree c_strlen PARAMS ((tree)); static const char *c_getstr PARAMS ((tree)); --- 73,78 ---- *************** static rtx expand_builtin_mathfn PARAMS *** 98,108 **** static rtx expand_builtin_constant_p PARAMS ((tree)); static rtx expand_builtin_args_info PARAMS ((tree)); static rtx expand_builtin_next_arg PARAMS ((tree)); ! static rtx expand_builtin_va_start PARAMS ((int, tree)); static rtx expand_builtin_va_end PARAMS ((tree)); static rtx expand_builtin_va_copy PARAMS ((tree)); static rtx expand_builtin_memcmp PARAMS ((tree, tree, rtx, ! enum machine_mode)); static rtx expand_builtin_strcmp PARAMS ((tree, rtx, enum machine_mode)); static rtx expand_builtin_strncmp PARAMS ((tree, rtx, --- 97,107 ---- static rtx expand_builtin_constant_p PARAMS ((tree)); static rtx expand_builtin_args_info PARAMS ((tree)); static rtx expand_builtin_next_arg PARAMS ((tree)); ! static rtx expand_builtin_va_start PARAMS ((tree)); static rtx expand_builtin_va_end PARAMS ((tree)); static rtx expand_builtin_va_copy PARAMS ((tree)); static rtx expand_builtin_memcmp PARAMS ((tree, tree, rtx, ! enum machine_mode)); static rtx expand_builtin_strcmp PARAMS ((tree, rtx, enum machine_mode)); static rtx expand_builtin_strncmp PARAMS ((tree, rtx, *************** static rtx expand_builtin_strspn PARAMS *** 118,134 **** static rtx expand_builtin_strcspn PARAMS ((tree, rtx, enum machine_mode)); static rtx expand_builtin_memcpy PARAMS ((tree, rtx, ! enum machine_mode)); static rtx expand_builtin_strcpy PARAMS ((tree, rtx, ! enum machine_mode)); static rtx builtin_strncpy_read_str PARAMS ((PTR, HOST_WIDE_INT, enum machine_mode)); static rtx expand_builtin_strncpy PARAMS ((tree, rtx, enum machine_mode)); static rtx builtin_memset_read_str PARAMS ((PTR, HOST_WIDE_INT, enum machine_mode)); static rtx expand_builtin_memset PARAMS ((tree, rtx, ! enum machine_mode)); static rtx expand_builtin_bzero PARAMS ((tree)); static rtx expand_builtin_strlen PARAMS ((tree, rtx)); static rtx expand_builtin_strstr PARAMS ((tree, rtx, --- 117,135 ---- static rtx expand_builtin_strcspn PARAMS ((tree, rtx, enum machine_mode)); static rtx expand_builtin_memcpy PARAMS ((tree, rtx, ! enum machine_mode)); static rtx expand_builtin_strcpy PARAMS ((tree, rtx, ! enum machine_mode)); static rtx builtin_strncpy_read_str PARAMS ((PTR, HOST_WIDE_INT, enum machine_mode)); static rtx expand_builtin_strncpy PARAMS ((tree, rtx, enum machine_mode)); static rtx builtin_memset_read_str PARAMS ((PTR, HOST_WIDE_INT, enum machine_mode)); + static rtx builtin_memset_gen_str PARAMS ((PTR, HOST_WIDE_INT, + enum machine_mode)); static rtx expand_builtin_memset PARAMS ((tree, rtx, ! enum machine_mode)); static rtx expand_builtin_bzero PARAMS ((tree)); static rtx expand_builtin_strlen PARAMS ((tree, rtx)); static rtx expand_builtin_strstr PARAMS ((tree, rtx, *************** static tree stabilize_va_list PARAMS (( *** 147,152 **** --- 148,155 ---- static rtx expand_builtin_expect PARAMS ((tree, rtx)); static tree fold_builtin_constant_p PARAMS ((tree)); static tree fold_builtin_classify_type PARAMS ((tree)); + static tree fold_builtin_inf PARAMS ((tree, int)); + static tree fold_builtin_nan PARAMS ((tree, tree, int)); static tree build_function_call_expr PARAMS ((tree, tree)); static int validate_arglist PARAMS ((tree, ...)); *************** expand_builtin_setjmp_setup (buf_addr, r *** 511,517 **** void expand_builtin_setjmp_receiver (receiver_label) ! rtx receiver_label ATTRIBUTE_UNUSED; { /* Clobber the FP when we get here, so we have to make sure it's marked as used by this function. */ --- 514,520 ---- void expand_builtin_setjmp_receiver (receiver_label) ! rtx receiver_label ATTRIBUTE_UNUSED; { /* Clobber the FP when we get here, so we have to make sure it's marked as used by this function. */ *************** void *** 639,645 **** expand_builtin_longjmp (buf_addr, value) rtx buf_addr, value; { ! rtx fp, lab, stack, insn; enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); if (setjmp_alias_set == -1) --- 642,648 ---- expand_builtin_longjmp (buf_addr, value) rtx buf_addr, value; { ! rtx fp, lab, stack, insn, last; enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); if (setjmp_alias_set == -1) *************** expand_builtin_longjmp (buf_addr, value) *** 662,667 **** --- 665,671 ---- current_function_calls_longjmp = 1; + last = get_last_insn (); #ifdef HAVE_builtin_longjmp if (HAVE_builtin_longjmp) emit_insn (gen_builtin_longjmp (buf_addr)); *************** expand_builtin_longjmp (buf_addr, value) *** 707,712 **** --- 711,718 ---- internal exception handling use only. */ for (insn = get_last_insn (); insn; insn = PREV_INSN (insn)) { + if (insn == last) + abort (); if (GET_CODE (insn) == JUMP_INSN) { REG_NOTES (insn) = alloc_EXPR_LIST (REG_NON_LOCAL_GOTO, const0_rtx, *************** expand_builtin_longjmp (buf_addr, value) *** 714,720 **** break; } else if (GET_CODE (insn) == CALL_INSN) ! break; } } --- 720,726 ---- break; } else if (GET_CODE (insn) == CALL_INSN) ! break; } } *************** expand_builtin_prefetch (arglist) *** 740,746 **** { arg1 = TREE_VALUE (TREE_CHAIN (arglist)); if (TREE_CHAIN (TREE_CHAIN (arglist))) ! arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); else arg2 = build_int_2 (3, 0); } --- 746,752 ---- { arg1 = TREE_VALUE (TREE_CHAIN (arglist)); if (TREE_CHAIN (TREE_CHAIN (arglist))) ! arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); else arg2 = build_int_2 (3, 0); } *************** expand_builtin_prefetch (arglist) *** 756,763 **** /* Argument 1 (read/write flag) must be a compile-time constant int. */ if (TREE_CODE (arg1) != INTEGER_CST) { ! error ("second arg to `__builtin_prefetch' must be a constant"); ! arg1 = integer_zero_node; } op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); /* Argument 1 must be either zero or one. */ --- 762,769 ---- /* Argument 1 (read/write flag) must be a compile-time constant int. */ if (TREE_CODE (arg1) != INTEGER_CST) { ! error ("second arg to `__builtin_prefetch' must be a constant"); ! arg1 = integer_zero_node; } op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); /* Argument 1 must be either zero or one. */ *************** expand_builtin_prefetch (arglist) *** 784,802 **** #ifdef HAVE_prefetch if (HAVE_prefetch) { ! if (! (*insn_data[(int)CODE_FOR_prefetch].operand[0].predicate) ! (op0, ! insn_data[(int)CODE_FOR_prefetch].operand[0].mode)) ! op0 = force_reg (Pmode, op0); emit_insn (gen_prefetch (op0, op1, op2)); } else #endif op0 = protect_from_queue (op0, 0); ! /* Don't do anything with direct references to volatile memory, but ! generate code to handle other side effects. */ ! if (GET_CODE (op0) != MEM && side_effects_p (op0)) ! emit_insn (op0); } /* Get a MEM rtx for expression EXP which is the address of an operand --- 790,815 ---- #ifdef HAVE_prefetch if (HAVE_prefetch) { ! if ((! (*insn_data[(int) CODE_FOR_prefetch].operand[0].predicate) ! (op0, ! insn_data[(int) CODE_FOR_prefetch].operand[0].mode)) ! || (GET_MODE(op0) != Pmode)) ! { ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE(op0) != Pmode) ! op0 = convert_memory_address (Pmode, op0); ! #endif ! op0 = force_reg (Pmode, op0); ! } emit_insn (gen_prefetch (op0, op1, op2)); } else #endif op0 = protect_from_queue (op0, 0); ! /* Don't do anything with direct references to volatile memory, but ! generate code to handle other side effects. */ ! if (GET_CODE (op0) != MEM && side_effects_p (op0)) ! emit_insn (op0); } /* Get a MEM rtx for expression EXP which is the address of an operand *************** get_memory_rtx (exp) *** 820,826 **** If it is an ADDR_EXPR, use the operand. Otherwise, dereference it if we can. First remove any nops. */ while ((TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR ! || TREE_CODE (exp) == NON_LVALUE_EXPR) && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))) exp = TREE_OPERAND (exp, 0); --- 833,839 ---- If it is an ADDR_EXPR, use the operand. Otherwise, dereference it if we can. First remove any nops. */ while ((TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR ! || TREE_CODE (exp) == NON_LVALUE_EXPR) && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))) exp = TREE_OPERAND (exp, 0); *************** apply_args_register_offset (regno) *** 874,880 **** /* Arguments are always put in outgoing registers (in the argument block) if such make sense. */ #ifdef OUTGOING_REGNO ! regno = OUTGOING_REGNO(regno); #endif return apply_args_reg_offset[regno]; } --- 887,893 ---- /* Arguments are always put in outgoing registers (in the argument block) if such make sense. */ #ifdef OUTGOING_REGNO ! regno = OUTGOING_REGNO (regno); #endif return apply_args_reg_offset[regno]; } *************** apply_result_size () *** 1001,1007 **** mode = GET_MODE_WIDER_MODE (mode)) if (HARD_REGNO_MODE_OK (regno, mode) && have_insn_for (SET, mode)) ! best_mode = mode; if (best_mode == VOIDmode) for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); --- 1014,1020 ---- mode = GET_MODE_WIDER_MODE (mode)) if (HARD_REGNO_MODE_OK (regno, mode) && have_insn_for (SET, mode)) ! best_mode = mode; if (best_mode == VOIDmode) for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); *************** expand_builtin_apply_args () *** 1147,1158 **** apply_args_value = temp; ! /* Put the sequence after the NOTE that starts the function. ! If this is inside a SEQUENCE, make the outer-level insn chain current, so the code is placed at the start of the function. */ push_topmost_sequence (); ! emit_insns_before (seq, NEXT_INSN (get_insns ())); pop_topmost_sequence (); return temp; } --- 1160,1171 ---- apply_args_value = temp; ! /* Put the insns after the NOTE that starts the function. ! If this is inside a start_sequence, make the outer-level insn chain current, so the code is placed at the start of the function. */ push_topmost_sequence (); ! emit_insn_before (seq, NEXT_INSN (get_insns ())); pop_topmost_sequence (); return temp; } *************** expand_builtin_apply (function, argument *** 1214,1220 **** set_mem_align (dest, PARM_BOUNDARY); src = gen_rtx_MEM (BLKmode, incoming_args); set_mem_align (src, PARM_BOUNDARY); ! emit_block_move (dest, src, argsize); /* Refer to the argument block. */ apply_args_size (); --- 1227,1233 ---- set_mem_align (dest, PARM_BOUNDARY); src = gen_rtx_MEM (BLKmode, incoming_args); set_mem_align (src, PARM_BOUNDARY); ! emit_block_move (dest, src, argsize, BLOCK_OP_NORMAL); /* Refer to the argument block. */ apply_args_size (); *************** expand_builtin_apply (function, argument *** 1249,1255 **** emit_move_insn (value, adjust_address (arguments, Pmode, size)); emit_move_insn (struct_value_rtx, value); if (GET_CODE (struct_value_rtx) == REG) ! use_reg (&call_fusage, struct_value_rtx); size += GET_MODE_SIZE (Pmode); } --- 1262,1268 ---- emit_move_insn (value, adjust_address (arguments, Pmode, size)); emit_move_insn (struct_value_rtx, value); if (GET_CODE (struct_value_rtx) == REG) ! use_reg (&call_fusage, struct_value_rtx); size += GET_MODE_SIZE (Pmode); } *************** expand_builtin_return (result) *** 1381,1387 **** } /* Put the USE insns before the return. */ ! emit_insns (call_fusage); /* Return whatever values was restored by jumping directly to the end of the function. */ --- 1394,1400 ---- } /* Put the USE insns before the return. */ ! emit_insn (call_fusage); /* Return whatever values was restored by jumping directly to the end of the function. */ *************** expand_builtin_mathfn (exp, target, subt *** 1470,1475 **** --- 1483,1489 ---- rtx op0, insns; tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree arglist = TREE_OPERAND (exp, 1); + enum machine_mode argmode; if (!validate_arglist (arglist, REAL_TYPE, VOID_TYPE)) return 0; *************** expand_builtin_mathfn (exp, target, subt *** 1512,1525 **** case BUILT_IN_SQRTF: case BUILT_IN_SQRTL: builtin_optab = sqrt_optab; break; ! default: abort (); } /* Compute into TARGET. Set TARGET to wherever the result comes back. */ ! target = expand_unop (TYPE_MODE (TREE_TYPE (TREE_VALUE (arglist))), ! builtin_optab, op0, target, 0); /* If we were unable to expand via the builtin, stop the sequence (without outputting the insns) and return 0, causing --- 1526,1547 ---- case BUILT_IN_SQRTF: case BUILT_IN_SQRTL: builtin_optab = sqrt_optab; break; ! case BUILT_IN_EXP: ! case BUILT_IN_EXPF: ! case BUILT_IN_EXPL: ! builtin_optab = exp_optab; break; ! case BUILT_IN_LOG: ! case BUILT_IN_LOGF: ! case BUILT_IN_LOGL: ! builtin_optab = log_optab; break; ! default: abort (); } /* Compute into TARGET. Set TARGET to wherever the result comes back. */ ! argmode = TYPE_MODE (TREE_TYPE (TREE_VALUE (arglist))); ! target = expand_unop (argmode, builtin_optab, op0, target, 0); /* If we were unable to expand via the builtin, stop the sequence (without outputting the insns) and return 0, causing *************** expand_builtin_mathfn (exp, target, subt *** 1530,1547 **** return 0; } ! /* If errno must be maintained and if we are not allowing unsafe ! math optimizations, check the result. */ ! if (flag_errno_math && ! flag_unsafe_math_optimizations) { rtx lab1; - /* Don't define the builtin FP instructions - if your machine is not IEEE. */ - if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT) - abort (); - lab1 = gen_label_rtx (); /* Test the result; if it is NaN, set errno=EDOM because --- 1552,1563 ---- return 0; } ! /* If errno must be maintained, we must set it to EDOM for NaN results. */ ! if (flag_errno_math && HONOR_NANS (argmode)) { rtx lab1; lab1 = gen_label_rtx (); /* Test the result; if it is NaN, set errno=EDOM because *************** expand_builtin_mathfn (exp, target, subt *** 1550,1565 **** 0, lab1); #ifdef TARGET_EDOM ! { #ifdef GEN_ERRNO_RTX ! rtx errno_rtx = GEN_ERRNO_RTX; #else ! rtx errno_rtx ! = gen_rtx_MEM (word_mode, gen_rtx_SYMBOL_REF (Pmode, "errno")); #endif ! emit_move_insn (errno_rtx, GEN_INT (TARGET_EDOM)); ! } #else /* We can't set errno=EDOM directly; let the library call do it. Pop the arguments right away in case the call gets deleted. */ --- 1566,1581 ---- 0, lab1); #ifdef TARGET_EDOM ! { #ifdef GEN_ERRNO_RTX ! rtx errno_rtx = GEN_ERRNO_RTX; #else ! rtx errno_rtx ! = gen_rtx_MEM (word_mode, gen_rtx_SYMBOL_REF (Pmode, "errno")); #endif ! emit_move_insn (errno_rtx, GEN_INT (TARGET_EDOM)); ! } #else /* We can't set errno=EDOM directly; let the library call do it. Pop the arguments right away in case the call gets deleted. */ *************** expand_builtin_mathfn (exp, target, subt *** 1574,1580 **** /* Output the entire sequence. */ insns = get_insns (); end_sequence (); ! emit_insns (insns); return target; } --- 1590,1596 ---- /* Output the entire sequence. */ insns = get_insns (); end_sequence (); ! emit_insn (insns); return target; } *************** expand_builtin_strlen (exp, target) *** 1636,1642 **** /* Mark the beginning of the strlen sequence so we can emit the source operand later. */ ! before_strlen = get_last_insn(); char_rtx = const0_rtx; char_mode = insn_data[(int) icode].operand[2].mode; --- 1652,1658 ---- /* Mark the beginning of the strlen sequence so we can emit the source operand later. */ ! before_strlen = get_last_insn (); char_rtx = const0_rtx; char_mode = insn_data[(int) icode].operand[2].mode; *************** expand_builtin_strlen (exp, target) *** 1656,1662 **** expand_expr (src, src_reg, ptr_mode, EXPAND_SUM)); if (pat != src_reg) emit_move_insn (src_reg, pat); ! pat = gen_sequence (); end_sequence (); if (before_strlen) --- 1672,1678 ---- expand_expr (src, src_reg, ptr_mode, EXPAND_SUM)); if (pat != src_reg) emit_move_insn (src_reg, pat); ! pat = get_insns (); end_sequence (); if (before_strlen) *************** expand_builtin_memcpy (arglist, target, *** 1942,1961 **** /* If DEST is not a pointer type, call the normal function. */ if (dest_align == 0) ! return 0; /* If the LEN parameter is zero, return DEST. */ if (host_integerp (len, 1) && tree_low_cst (len, 1) == 0) ! { ! /* Evaluate and ignore SRC in case it has side-effects. */ ! expand_expr (src, const0_rtx, VOIDmode, EXPAND_NORMAL); ! return expand_expr (dest, target, mode, EXPAND_NORMAL); ! } /* If either SRC is not a pointer type, don't do this operation in-line. */ if (src_align == 0) ! return 0; dest_mem = get_memory_rtx (dest); set_mem_align (dest_mem, dest_align); --- 1958,1977 ---- /* If DEST is not a pointer type, call the normal function. */ if (dest_align == 0) ! return 0; /* If the LEN parameter is zero, return DEST. */ if (host_integerp (len, 1) && tree_low_cst (len, 1) == 0) ! { ! /* Evaluate and ignore SRC in case it has side-effects. */ ! expand_expr (src, const0_rtx, VOIDmode, EXPAND_NORMAL); ! return expand_expr (dest, target, mode, EXPAND_NORMAL); ! } /* If either SRC is not a pointer type, don't do this operation in-line. */ if (src_align == 0) ! return 0; dest_mem = get_memory_rtx (dest); set_mem_align (dest_mem, dest_align); *************** expand_builtin_memcpy (arglist, target, *** 1974,1990 **** store_by_pieces (dest_mem, INTVAL (len_rtx), builtin_memcpy_read_str, (PTR) src_str, dest_align); ! return force_operand (XEXP (dest_mem, 0), NULL_RTX); } src_mem = get_memory_rtx (src); set_mem_align (src_mem, src_align); /* Copy word part most expediently. */ ! dest_addr = emit_block_move (dest_mem, src_mem, len_rtx); if (dest_addr == 0) ! dest_addr = force_operand (XEXP (dest_mem, 0), NULL_RTX); return dest_addr; } --- 1990,2018 ---- store_by_pieces (dest_mem, INTVAL (len_rtx), builtin_memcpy_read_str, (PTR) src_str, dest_align); ! dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (dest_mem) != ptr_mode) ! dest_mem = convert_memory_address (ptr_mode, dest_mem); ! #endif ! return dest_mem; } src_mem = get_memory_rtx (src); set_mem_align (src_mem, src_align); /* Copy word part most expediently. */ ! dest_addr = emit_block_move (dest_mem, src_mem, len_rtx, ! BLOCK_OP_NORMAL); if (dest_addr == 0) ! { ! dest_addr = force_operand (XEXP (dest_mem, 0), NULL_RTX); ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (dest_addr) != ptr_mode) ! dest_addr = convert_memory_address (ptr_mode, dest_addr); ! #endif ! } return dest_addr; } *************** expand_builtin_strcpy (exp, target, mode *** 2018,2024 **** len = size_binop (PLUS_EXPR, len, ssize_int (1)); chainon (arglist, build_tree_list (NULL_TREE, len)); return expand_expr (build_function_call_expr (fn, arglist), ! target, mode, EXPAND_NORMAL); } /* Callback routine for store_by_pieces. Read GET_MODE_BITSIZE (MODE) --- 2046,2052 ---- len = size_binop (PLUS_EXPR, len, ssize_int (1)); chainon (arglist, build_tree_list (NULL_TREE, len)); return expand_expr (build_function_call_expr (fn, arglist), ! target, mode, EXPAND_NORMAL); } /* Callback routine for store_by_pieces. Read GET_MODE_BITSIZE (MODE) *************** expand_builtin_strncpy (arglist, target, *** 2063,2071 **** /* If the len parameter is zero, return the dst parameter. */ if (integer_zerop (len)) ! { ! /* Evaluate and ignore the src argument in case it has ! side-effects. */ expand_expr (TREE_VALUE (TREE_CHAIN (arglist)), const0_rtx, VOIDmode, EXPAND_NORMAL); /* Return the dst parameter. */ --- 2091,2099 ---- /* If the len parameter is zero, return the dst parameter. */ if (integer_zerop (len)) ! { ! /* Evaluate and ignore the src argument in case it has ! side-effects. */ expand_expr (TREE_VALUE (TREE_CHAIN (arglist)), const0_rtx, VOIDmode, EXPAND_NORMAL); /* Return the dst parameter. */ *************** expand_builtin_strncpy (arglist, target, *** 2100,2114 **** store_by_pieces (dest_mem, tree_low_cst (len, 1), builtin_strncpy_read_str, (PTR) p, dest_align); ! return force_operand (XEXP (dest_mem, 0), NULL_RTX); } /* OK transform into builtin memcpy. */ fn = built_in_decls[BUILT_IN_MEMCPY]; if (!fn) ! return 0; return expand_expr (build_function_call_expr (fn, arglist), ! target, mode, EXPAND_NORMAL); } } --- 2128,2147 ---- store_by_pieces (dest_mem, tree_low_cst (len, 1), builtin_strncpy_read_str, (PTR) p, dest_align); ! dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (dest_mem) != ptr_mode) ! dest_mem = convert_memory_address (ptr_mode, dest_mem); ! #endif ! return dest_mem; } /* OK transform into builtin memcpy. */ fn = built_in_decls[BUILT_IN_MEMCPY]; if (!fn) ! return 0; return expand_expr (build_function_call_expr (fn, arglist), ! target, mode, EXPAND_NORMAL); } } *************** builtin_memset_read_str (data, offset, m *** 2130,2135 **** --- 2163,2196 ---- return c_readstr (p, mode); } + /* Callback routine for store_by_pieces. Return the RTL of a register + containing GET_MODE_SIZE (MODE) consecutive copies of the unsigned + char value given in the RTL register data. For example, if mode is + 4 bytes wide, return the RTL for 0x01010101*data. */ + + static rtx + builtin_memset_gen_str (data, offset, mode) + PTR data; + HOST_WIDE_INT offset ATTRIBUTE_UNUSED; + enum machine_mode mode; + { + rtx target, coeff; + size_t size; + char *p; + + size = GET_MODE_SIZE (mode); + if (size == 1) + return (rtx) data; + + p = alloca (size); + memset (p, 1, size); + coeff = c_readstr (p, mode); + + target = convert_to_mode (mode, (rtx) data, 1); + target = expand_mult (mode, target, coeff, NULL_RTX, 1); + return force_reg (mode, target); + } + /* Expand expression EXP, which is a call to the memset builtin. Return 0 if we failed the caller should emit a normal call, otherwise try to get the result in TARGET, if convenient (and in mode MODE if that's *************** expand_builtin_memset (exp, target, mode *** 2164,2177 **** /* If the LEN parameter is zero, return DEST. */ if (host_integerp (len, 1) && tree_low_cst (len, 1) == 0) ! { ! /* Evaluate and ignore VAL in case it has side-effects. */ ! expand_expr (val, const0_rtx, VOIDmode, EXPAND_NORMAL); ! return expand_expr (dest, target, mode, EXPAND_NORMAL); ! } if (TREE_CODE (val) != INTEGER_CST) ! return 0; if (target_char_cast (val, &c)) return 0; --- 2225,2270 ---- /* If the LEN parameter is zero, return DEST. */ if (host_integerp (len, 1) && tree_low_cst (len, 1) == 0) ! { ! /* Evaluate and ignore VAL in case it has side-effects. */ ! expand_expr (val, const0_rtx, VOIDmode, EXPAND_NORMAL); ! return expand_expr (dest, target, mode, EXPAND_NORMAL); ! } if (TREE_CODE (val) != INTEGER_CST) ! { ! rtx val_rtx; ! ! if (!host_integerp (len, 1)) ! return 0; ! ! if (optimize_size && tree_low_cst (len, 1) > 1) ! return 0; ! ! /* Assume that we can memset by pieces if we can store the ! * the coefficients by pieces (in the required modes). ! * We can't pass builtin_memset_gen_str as that emits RTL. */ ! c = 1; ! if (!can_store_by_pieces (tree_low_cst (len, 1), ! builtin_memset_read_str, ! (PTR) &c, dest_align)) ! return 0; ! ! val = fold (build1 (CONVERT_EXPR, unsigned_char_type_node, val)); ! val_rtx = expand_expr (val, NULL_RTX, VOIDmode, 0); ! val_rtx = force_reg (TYPE_MODE (unsigned_char_type_node), ! val_rtx); ! dest_mem = get_memory_rtx (dest); ! store_by_pieces (dest_mem, tree_low_cst (len, 1), ! builtin_memset_gen_str, ! (PTR) val_rtx, dest_align); ! dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (dest_mem) != ptr_mode) ! dest_mem = convert_memory_address (ptr_mode, dest_mem); ! #endif ! return dest_mem; ! } if (target_char_cast (val, &c)) return 0; *************** expand_builtin_memset (exp, target, mode *** 2189,2195 **** store_by_pieces (dest_mem, tree_low_cst (len, 1), builtin_memset_read_str, (PTR) &c, dest_align); ! return force_operand (XEXP (dest_mem, 0), NULL_RTX); } len_rtx = expand_expr (len, NULL_RTX, VOIDmode, 0); --- 2282,2293 ---- store_by_pieces (dest_mem, tree_low_cst (len, 1), builtin_memset_read_str, (PTR) &c, dest_align); ! dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (dest_mem) != ptr_mode) ! dest_mem = convert_memory_address (ptr_mode, dest_mem); ! #endif ! return dest_mem; } len_rtx = expand_expr (len, NULL_RTX, VOIDmode, 0); *************** expand_builtin_memset (exp, target, mode *** 2199,2205 **** dest_addr = clear_storage (dest_mem, len_rtx); if (dest_addr == 0) ! dest_addr = force_operand (XEXP (dest_mem, 0), NULL_RTX); return dest_addr; } --- 2297,2309 ---- dest_addr = clear_storage (dest_mem, len_rtx); if (dest_addr == 0) ! { ! dest_addr = force_operand (XEXP (dest_mem, 0), NULL_RTX); ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (dest_addr) != ptr_mode) ! dest_addr = convert_memory_address (ptr_mode, dest_addr); ! #endif ! } return dest_addr; } *************** expand_builtin_memcmp (exp, arglist, tar *** 2256,2262 **** const char *p1, *p2; if (!validate_arglist (arglist, ! POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) return 0; arg1 = TREE_VALUE (arglist); --- 2360,2366 ---- const char *p1, *p2; if (!validate_arglist (arglist, ! POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) return 0; arg1 = TREE_VALUE (arglist); *************** expand_builtin_memcmp (exp, arglist, tar *** 2295,2306 **** tree cst_uchar_ptr_node = build_pointer_type (cst_uchar_node); tree ind1 = fold (build1 (CONVERT_EXPR, integer_type_node, ! build1 (INDIRECT_REF, cst_uchar_node, ! build1 (NOP_EXPR, cst_uchar_ptr_node, arg1)))); tree ind2 = fold (build1 (CONVERT_EXPR, integer_type_node, ! build1 (INDIRECT_REF, cst_uchar_node, ! build1 (NOP_EXPR, cst_uchar_ptr_node, arg2)))); tree result = fold (build (MINUS_EXPR, integer_type_node, ind1, ind2)); return expand_expr (result, target, mode, EXPAND_NORMAL); } --- 2399,2410 ---- tree cst_uchar_ptr_node = build_pointer_type (cst_uchar_node); tree ind1 = fold (build1 (CONVERT_EXPR, integer_type_node, ! build1 (INDIRECT_REF, cst_uchar_node, ! build1 (NOP_EXPR, cst_uchar_ptr_node, arg1)))); tree ind2 = fold (build1 (CONVERT_EXPR, integer_type_node, ! build1 (INDIRECT_REF, cst_uchar_node, ! build1 (NOP_EXPR, cst_uchar_ptr_node, arg2)))); tree result = fold (build (MINUS_EXPR, integer_type_node, ind1, ind2)); return expand_expr (result, target, mode, EXPAND_NORMAL); } *************** expand_builtin_strcmp (exp, target, mode *** 2437,2448 **** if (!len || TREE_CODE (len) != INTEGER_CST) { if (len2 && !TREE_SIDE_EFFECTS (len2)) ! len = len2; else if (len == 0) ! return 0; } else if (len2 && TREE_CODE (len2) == INTEGER_CST ! && tree_int_cst_lt (len2, len)) len = len2; /* If both arguments have side effects, we cannot optimize. */ --- 2541,2552 ---- if (!len || TREE_CODE (len) != INTEGER_CST) { if (len2 && !TREE_SIDE_EFFECTS (len2)) ! len = len2; else if (len == 0) ! return 0; } else if (len2 && TREE_CODE (len2) == INTEGER_CST ! && tree_int_cst_lt (len2, len)) len = len2; /* If both arguments have side effects, we cannot optimize. */ *************** expand_builtin_strcmp (exp, target, mode *** 2455,2461 **** chainon (arglist, build_tree_list (NULL_TREE, len)); return expand_expr (build_function_call_expr (fn, arglist), ! target, mode, EXPAND_NORMAL); } /* Expand expression EXP, which is a call to the strncmp builtin. Return 0 --- 2559,2565 ---- chainon (arglist, build_tree_list (NULL_TREE, len)); return expand_expr (build_function_call_expr (fn, arglist), ! target, mode, EXPAND_NORMAL); } /* Expand expression EXP, which is a call to the strncmp builtin. Return 0 *************** expand_builtin_strncmp (exp, target, mod *** 2483,2505 **** /* If the len parameter is zero, return zero. */ if (host_integerp (arg3, 1) && tree_low_cst (arg3, 1) == 0) ! { ! /* Evaluate and ignore arg1 and arg2 in case they have ! side-effects. */ ! expand_expr (arg1, const0_rtx, VOIDmode, EXPAND_NORMAL); ! expand_expr (arg2, const0_rtx, VOIDmode, EXPAND_NORMAL); ! return const0_rtx; ! } p1 = c_getstr (arg1); p2 = c_getstr (arg2); /* If all arguments are constant, evaluate at compile-time. */ if (host_integerp (arg3, 1) && p1 && p2) ! { ! const int r = strncmp (p1, p2, tree_low_cst (arg3, 1)); ! return (r < 0 ? constm1_rtx : (r > 0 ? const1_rtx : const0_rtx)); ! } /* If len == 1 or (either string parameter is "" and (len >= 1)), return (*(const u_char*)arg1 - *(const u_char*)arg2). */ --- 2587,2609 ---- /* If the len parameter is zero, return zero. */ if (host_integerp (arg3, 1) && tree_low_cst (arg3, 1) == 0) ! { ! /* Evaluate and ignore arg1 and arg2 in case they have ! side-effects. */ ! expand_expr (arg1, const0_rtx, VOIDmode, EXPAND_NORMAL); ! expand_expr (arg2, const0_rtx, VOIDmode, EXPAND_NORMAL); ! return const0_rtx; ! } p1 = c_getstr (arg1); p2 = c_getstr (arg2); /* If all arguments are constant, evaluate at compile-time. */ if (host_integerp (arg3, 1) && p1 && p2) ! { ! const int r = strncmp (p1, p2, tree_low_cst (arg3, 1)); ! return (r < 0 ? constm1_rtx : (r > 0 ? const1_rtx : const0_rtx)); ! } /* If len == 1 or (either string parameter is "" and (len >= 1)), return (*(const u_char*)arg1 - *(const u_char*)arg2). */ *************** expand_builtin_strncmp (exp, target, mod *** 2557,2563 **** newarglist = tree_cons (NULL_TREE, arg2, newarglist); newarglist = tree_cons (NULL_TREE, arg1, newarglist); return expand_expr (build_function_call_expr (fn, newarglist), ! target, mode, EXPAND_NORMAL); } /* Expand expression EXP, which is a call to the strcat builtin. --- 2661,2667 ---- newarglist = tree_cons (NULL_TREE, arg2, newarglist); newarglist = tree_cons (NULL_TREE, arg1, newarglist); return expand_expr (build_function_call_expr (fn, newarglist), ! target, mode, EXPAND_NORMAL); } /* Expand expression EXP, which is a call to the strcat builtin. *************** expand_builtin_strncat (arglist, target, *** 2609,2615 **** /* If the requested length is zero, or the src parameter string length is zero, return the dst parameter. */ if (integer_zerop (len) || (p && *p == '\0')) ! { /* Evaluate and ignore the src and len parameters in case they have side-effects. */ expand_expr (src, const0_rtx, VOIDmode, EXPAND_NORMAL); --- 2713,2719 ---- /* If the requested length is zero, or the src parameter string length is zero, return the dst parameter. */ if (integer_zerop (len) || (p && *p == '\0')) ! { /* Evaluate and ignore the src and len parameters in case they have side-effects. */ expand_expr (src, const0_rtx, VOIDmode, EXPAND_NORMAL); *************** expand_builtin_strncat (arglist, target, *** 2621,2627 **** length, call strcat. */ if (TREE_CODE (len) == INTEGER_CST && p && compare_tree_int (len, strlen (p)) >= 0) ! { tree newarglist = tree_cons (NULL_TREE, dst, build_tree_list (NULL_TREE, src)); tree fn = built_in_decls[BUILT_IN_STRCAT]; --- 2725,2731 ---- length, call strcat. */ if (TREE_CODE (len) == INTEGER_CST && p && compare_tree_int (len, strlen (p)) >= 0) ! { tree newarglist = tree_cons (NULL_TREE, dst, build_tree_list (NULL_TREE, src)); tree fn = built_in_decls[BUILT_IN_STRCAT]; *************** expand_builtin_strspn (arglist, target, *** 2657,2670 **** /* If both arguments are constants, evaluate at compile-time. */ if (p1 && p2) ! { const size_t r = strspn (p1, p2); return expand_expr (size_int (r), target, mode, EXPAND_NORMAL); } /* If either argument is "", return 0. */ if ((p1 && *p1 == '\0') || (p2 && *p2 == '\0')) ! { /* Evaluate and ignore both arguments in case either one has side-effects. */ expand_expr (s1, const0_rtx, VOIDmode, EXPAND_NORMAL); --- 2761,2774 ---- /* If both arguments are constants, evaluate at compile-time. */ if (p1 && p2) ! { const size_t r = strspn (p1, p2); return expand_expr (size_int (r), target, mode, EXPAND_NORMAL); } /* If either argument is "", return 0. */ if ((p1 && *p1 == '\0') || (p2 && *p2 == '\0')) ! { /* Evaluate and ignore both arguments in case either one has side-effects. */ expand_expr (s1, const0_rtx, VOIDmode, EXPAND_NORMAL); *************** expand_builtin_strcspn (arglist, target, *** 2694,2707 **** /* If both arguments are constants, evaluate at compile-time. */ if (p1 && p2) ! { const size_t r = strcspn (p1, p2); return expand_expr (size_int (r), target, mode, EXPAND_NORMAL); } /* If the first argument is "", return 0. */ if (p1 && *p1 == '\0') ! { /* Evaluate and ignore argument s2 in case it has side-effects. */ expand_expr (s2, const0_rtx, VOIDmode, EXPAND_NORMAL); --- 2798,2811 ---- /* If both arguments are constants, evaluate at compile-time. */ if (p1 && p2) ! { const size_t r = strcspn (p1, p2); return expand_expr (size_int (r), target, mode, EXPAND_NORMAL); } /* If the first argument is "", return 0. */ if (p1 && *p1 == '\0') ! { /* Evaluate and ignore argument s2 in case it has side-effects. */ expand_expr (s2, const0_rtx, VOIDmode, EXPAND_NORMAL); *************** expand_builtin_strcspn (arglist, target, *** 2710,2716 **** /* If the second argument is "", return __builtin_strlen(s1). */ if (p2 && *p2 == '\0') ! { tree newarglist = build_tree_list (NULL_TREE, s1), fn = built_in_decls[BUILT_IN_STRLEN]; --- 2814,2820 ---- /* If the second argument is "", return __builtin_strlen(s1). */ if (p2 && *p2 == '\0') ! { tree newarglist = build_tree_list (NULL_TREE, s1), fn = built_in_decls[BUILT_IN_STRLEN]; *************** expand_builtin_saveregs () *** 2766,2776 **** saveregs_value = val; ! /* Put the sequence after the NOTE that starts the function. If this ! is inside a SEQUENCE, make the outer-level insn chain current, so the code is placed at the start of the function. */ push_topmost_sequence (); ! emit_insns_after (seq, get_insns ()); pop_topmost_sequence (); return val; --- 2870,2880 ---- saveregs_value = val; ! /* Put the insns after the NOTE that starts the function. If this ! is inside a start_sequence, make the outer-level insn chain current, so the code is placed at the start of the function. */ push_topmost_sequence (); ! emit_insn_after (seq, get_insns ()); pop_topmost_sequence (); return val; *************** expand_builtin_next_arg (arglist) *** 2838,2847 **** { tree fntype = TREE_TYPE (current_function_decl); ! if ((TYPE_ARG_TYPES (fntype) == 0 ! || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) ! == void_type_node)) ! && ! current_function_varargs) { error ("`va_start' used in function with fixed args"); return const0_rtx; --- 2942,2950 ---- { tree fntype = TREE_TYPE (current_function_decl); ! if (TYPE_ARG_TYPES (fntype) == 0 ! || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) ! == void_type_node)) { error ("`va_start' used in function with fixed args"); return const0_rtx; *************** expand_builtin_next_arg (arglist) *** 2864,2870 **** if (arg != last_parm) warning ("second parameter of `va_start' not last named argument"); } ! else if (! current_function_varargs) /* Evidently an out of date version of ; can't validate va_start's second argument, but can still work as intended. */ warning ("`__builtin_next_arg' called without an argument"); --- 2967,2973 ---- if (arg != last_parm) warning ("second parameter of `va_start' not last named argument"); } ! else /* Evidently an out of date version of ; can't validate va_start's second argument, but can still work as intended. */ warning ("`__builtin_next_arg' called without an argument"); *************** stabilize_va_list (valist, needs_lvalue) *** 2928,2952 **** the variable. */ void ! std_expand_builtin_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg; { tree t; - if (! stdarg_p) - { - /* The dummy named parameter is declared as a 'word' sized - object, but if a 'word' is smaller than an 'int', it would - have been promoted to int when it was added to the arglist. */ - int align = PARM_BOUNDARY / BITS_PER_UNIT; - int size = MAX (UNITS_PER_WORD, - GET_MODE_SIZE (TYPE_MODE (integer_type_node))); - int offset = ((size + align - 1) / align) * align; - nextarg = plus_constant (nextarg, -offset); - } - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, make_tree (ptr_type_node, nextarg)); TREE_SIDE_EFFECTS (t) = 1; --- 3031,3042 ---- the variable. */ void ! std_expand_builtin_va_start (valist, nextarg) tree valist; rtx nextarg; { tree t; t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, make_tree (ptr_type_node, nextarg)); TREE_SIDE_EFFECTS (t) = 1; *************** std_expand_builtin_va_start (stdarg_p, v *** 2954,2984 **** expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } ! /* Expand ARGLIST, which from a call to __builtin_stdarg_va_start or ! __builtin_varargs_va_start, depending on STDARG_P. */ static rtx ! expand_builtin_va_start (stdarg_p, arglist) ! int stdarg_p; tree arglist; { rtx nextarg; ! tree chain = arglist, valist; ! if (stdarg_p) ! nextarg = expand_builtin_next_arg (chain = TREE_CHAIN (arglist)); ! else ! nextarg = expand_builtin_next_arg (NULL_TREE); if (TREE_CHAIN (chain)) error ("too many arguments to function `va_start'"); valist = stabilize_va_list (TREE_VALUE (arglist), 1); #ifdef EXPAND_BUILTIN_VA_START ! EXPAND_BUILTIN_VA_START (stdarg_p, valist, nextarg); #else ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); #endif return const0_rtx; --- 3044,3070 ---- expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } ! /* Expand ARGLIST, from a call to __builtin_va_start. */ static rtx ! expand_builtin_va_start (arglist) tree arglist; { rtx nextarg; ! tree chain, valist; ! chain = TREE_CHAIN (arglist); if (TREE_CHAIN (chain)) error ("too many arguments to function `va_start'"); + nextarg = expand_builtin_next_arg (chain); valist = stabilize_va_list (TREE_VALUE (arglist), 1); #ifdef EXPAND_BUILTIN_VA_START ! EXPAND_BUILTIN_VA_START (valist, nextarg); #else ! std_expand_builtin_va_start (valist, nextarg); #endif return const0_rtx; *************** expand_builtin_va_arg (valist, type) *** 3078,3084 **** /* Generate a diagnostic for requesting data of a type that cannot be passed through `...' due to type promotion at the call site. */ ! else if ((promoted_type = (*lang_type_promotes_to) (type)) != NULL_TREE) { const char *name = "", *pname = 0; static bool gave_help; --- 3164,3171 ---- /* Generate a diagnostic for requesting data of a type that cannot be passed through `...' due to type promotion at the call site. */ ! else if ((promoted_type = (*lang_hooks.types.type_promotes_to) (type)) ! != type) { const char *name = "", *pname = 0; static bool gave_help; *************** expand_builtin_va_end (arglist) *** 3154,3160 **** #ifdef EXPAND_BUILTIN_VA_END valist = stabilize_va_list (valist, 0); ! EXPAND_BUILTIN_VA_END(arglist); #else /* Evaluate for side effects, if needed. I hate macros that don't do that. */ --- 3241,3247 ---- #ifdef EXPAND_BUILTIN_VA_END valist = stabilize_va_list (valist, 0); ! EXPAND_BUILTIN_VA_END (arglist); #else /* Evaluate for side effects, if needed. I hate macros that don't do that. */ *************** expand_builtin_va_copy (arglist) *** 3214,3220 **** set_mem_align (srcb, TYPE_ALIGN (va_list_type_node)); /* Copy. */ ! emit_block_move (dstb, srcb, size); } return const0_rtx; --- 3301,3307 ---- set_mem_align (srcb, TYPE_ALIGN (va_list_type_node)); /* Copy. */ ! emit_block_move (dstb, srcb, size, BLOCK_OP_NORMAL); } return const0_rtx; *************** expand_builtin_expect (arglist, target) *** 3436,3442 **** target = expand_expr (exp, target, VOIDmode, EXPAND_NORMAL); /* Don't bother with expected value notes for integral constants. */ ! if (GET_CODE (target) != CONST_INT) { /* We do need to force this into a register so that we can be moderately sure to be able to correctly interpret the branch --- 3523,3529 ---- target = expand_expr (exp, target, VOIDmode, EXPAND_NORMAL); /* Don't bother with expected value notes for integral constants. */ ! if (flag_guess_branch_prob && GET_CODE (target) != CONST_INT) { /* We do need to force this into a register so that we can be moderately sure to be able to correctly interpret the branch *************** expand_builtin_expect (arglist, target) *** 3454,3460 **** /* Like expand_builtin_expect, except do this in a jump context. This is called from do_jump if the conditional is a __builtin_expect. Return either ! a SEQUENCE of insns to emit the jump or NULL if we cannot optimize __builtin_expect. We need to optimize this at jump time so that machines like the PowerPC don't turn the test into a SCC operation, and then jump based on the test being 0/1. */ --- 3541,3547 ---- /* Like expand_builtin_expect, except do this in a jump context. This is called from do_jump if the conditional is a __builtin_expect. Return either ! a list of insns to emit the jump or NULL if we cannot optimize __builtin_expect. We need to optimize this at jump time so that machines like the PowerPC don't turn the test into a SCC operation, and then jump based on the test being 0/1. */ *************** expand_builtin_expect_jump (exp, if_fals *** 3475,3482 **** if (TREE_CODE (TREE_TYPE (arg1)) == INTEGER_TYPE && (integer_zerop (arg1) || integer_onep (arg1))) { - int j; int num_jumps = 0; /* If we fail to locate an appropriate conditional jump, we'll fall back to normal evaluation. Ensure that the expression --- 3562,3569 ---- if (TREE_CODE (TREE_TYPE (arg1)) == INTEGER_TYPE && (integer_zerop (arg1) || integer_onep (arg1))) { int num_jumps = 0; + rtx insn; /* If we fail to locate an appropriate conditional jump, we'll fall back to normal evaluation. Ensure that the expression *************** expand_builtin_expect_jump (exp, if_fals *** 3497,3512 **** /* Expand the jump insns. */ start_sequence (); do_jump (arg0, if_false_label, if_true_label); ! ret = gen_sequence (); end_sequence (); /* Now that the __builtin_expect has been validated, go through and add the expect's to each of the conditional jumps. If we run into an error, just give up and generate the 'safe' code of doing a SCC operation and then doing a branch on that. */ ! for (j = 0; j < XVECLEN (ret, 0); j++) { ! rtx insn = XVECEXP (ret, 0, j); rtx pattern; if (GET_CODE (insn) == JUMP_INSN && any_condjump_p (insn) --- 3584,3600 ---- /* Expand the jump insns. */ start_sequence (); do_jump (arg0, if_false_label, if_true_label); ! ret = get_insns (); end_sequence (); /* Now that the __builtin_expect has been validated, go through and add the expect's to each of the conditional jumps. If we run into an error, just give up and generate the 'safe' code of doing a SCC operation and then doing a branch on that. */ ! insn = ret; ! while (insn != NULL_RTX) { ! rtx next = NEXT_INSN (insn); rtx pattern; if (GET_CODE (insn) == JUMP_INSN && any_condjump_p (insn) *************** expand_builtin_expect_jump (exp, if_fals *** 3517,3523 **** int taken; if (GET_CODE (ifelse) != IF_THEN_ELSE) ! continue; if (GET_CODE (XEXP (ifelse, 1)) == LABEL_REF) { --- 3605,3611 ---- int taken; if (GET_CODE (ifelse) != IF_THEN_ELSE) ! goto do_next_insn; if (GET_CODE (XEXP (ifelse, 1)) == LABEL_REF) { *************** expand_builtin_expect_jump (exp, if_fals *** 3544,3550 **** label = NULL_RTX; } else ! continue; /* If the test is expected to fail, reverse the probabilities. */ --- 3632,3638 ---- label = NULL_RTX; } else ! goto do_next_insn; /* If the test is expected to fail, reverse the probabilities. */ *************** expand_builtin_expect_jump (exp, if_fals *** 3558,3568 **** else if (label == if_false_label) taken = 1 - taken; else if (label != if_true_label) ! continue; num_jumps++; predict_insn_def (insn, PRED_BUILTIN_EXPECT, taken); } } /* If no jumps were modified, fail and do __builtin_expect the normal --- 3646,3659 ---- else if (label == if_false_label) taken = 1 - taken; else if (label != if_true_label) ! goto do_next_insn; num_jumps++; predict_insn_def (insn, PRED_BUILTIN_EXPECT, taken); } + + do_next_insn: + insn = next; } /* If no jumps were modified, fail and do __builtin_expect the normal *************** expand_builtin (exp, target, subtarget, *** 3615,3625 **** if (!optimize && !CALLED_AS_BUILT_IN (fndecl)) switch (fcode) { - case BUILT_IN_SIN: - case BUILT_IN_COS: case BUILT_IN_SQRT: case BUILT_IN_SQRTF: case BUILT_IN_SQRTL: case BUILT_IN_MEMSET: case BUILT_IN_MEMCPY: case BUILT_IN_MEMCMP: --- 3706,3723 ---- if (!optimize && !CALLED_AS_BUILT_IN (fndecl)) switch (fcode) { case BUILT_IN_SQRT: case BUILT_IN_SQRTF: case BUILT_IN_SQRTL: + case BUILT_IN_SIN: + case BUILT_IN_SINF: + case BUILT_IN_SINL: + case BUILT_IN_COS: + case BUILT_IN_COSF: + case BUILT_IN_COSL: + case BUILT_IN_EXP: + case BUILT_IN_EXPF: + case BUILT_IN_EXPL: case BUILT_IN_MEMSET: case BUILT_IN_MEMCPY: case BUILT_IN_MEMCMP: *************** expand_builtin (exp, target, subtarget, *** 3653,3663 **** case BUILT_IN_FPUTC_UNLOCKED: case BUILT_IN_FPUTS_UNLOCKED: case BUILT_IN_FWRITE_UNLOCKED: ! return expand_call (exp, target, ignore); default: ! break; ! } switch (fcode) { --- 3751,3761 ---- case BUILT_IN_FPUTC_UNLOCKED: case BUILT_IN_FPUTS_UNLOCKED: case BUILT_IN_FWRITE_UNLOCKED: ! return expand_call (exp, target, ignore); default: ! break; ! } switch (fcode) { *************** expand_builtin (exp, target, subtarget, *** 3690,3695 **** --- 3788,3799 ---- case BUILT_IN_COS: case BUILT_IN_COSF: case BUILT_IN_COSL: + case BUILT_IN_EXP: + case BUILT_IN_EXPF: + case BUILT_IN_EXPL: + case BUILT_IN_LOG: + case BUILT_IN_LOGF: + case BUILT_IN_LOGL: /* Treat these like sqrt only if unsafe math optimizations are allowed, because of possible accuracy problems. */ if (! flag_unsafe_math_optimizations) *************** expand_builtin (exp, target, subtarget, *** 3702,3710 **** return target; break; - case BUILT_IN_FMOD: - break; - case BUILT_IN_APPLY_ARGS: return expand_builtin_apply_args (); --- 3806,3811 ---- *************** expand_builtin (exp, target, subtarget, *** 3769,3779 **** 0 otherwise. */ case BUILT_IN_AGGREGATE_INCOMING_ADDRESS: if (arglist != 0 ! || ! AGGREGATE_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl))) ! || GET_CODE (DECL_RTL (DECL_RESULT (current_function_decl))) != MEM) ! return const0_rtx; else ! return XEXP (DECL_RTL (DECL_RESULT (current_function_decl)), 0); case BUILT_IN_ALLOCA: target = expand_builtin_alloca (arglist, target); --- 3870,3880 ---- 0 otherwise. */ case BUILT_IN_AGGREGATE_INCOMING_ADDRESS: if (arglist != 0 ! || ! AGGREGATE_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl))) ! || GET_CODE (DECL_RTL (DECL_RESULT (current_function_decl))) != MEM) ! return const0_rtx; else ! return XEXP (DECL_RTL (DECL_RESULT (current_function_decl)), 0); case BUILT_IN_ALLOCA: target = expand_builtin_alloca (arglist, target); *************** expand_builtin (exp, target, subtarget, *** 3925,3939 **** expand_builtin_trap (); return const0_rtx; - case BUILT_IN_PUTCHAR: - case BUILT_IN_PUTS: - case BUILT_IN_FPUTC: - case BUILT_IN_FWRITE: - case BUILT_IN_PUTCHAR_UNLOCKED: - case BUILT_IN_PUTS_UNLOCKED: - case BUILT_IN_FPUTC_UNLOCKED: - case BUILT_IN_FWRITE_UNLOCKED: - break; case BUILT_IN_FPUTS: target = expand_builtin_fputs (arglist, ignore,/*unlocked=*/ 0); if (target) --- 4026,4031 ---- *************** expand_builtin (exp, target, subtarget, *** 3952,3959 **** case BUILT_IN_DWARF_CFA: return virtual_cfa_rtx; #ifdef DWARF2_UNWIND_INFO ! case BUILT_IN_DWARF_FP_REGNUM: ! return expand_builtin_dwarf_fp_regnum (); case BUILT_IN_INIT_DWARF_REG_SIZES: expand_builtin_init_dwarf_reg_sizes (TREE_VALUE (arglist)); return const0_rtx; --- 4044,4051 ---- case BUILT_IN_DWARF_CFA: return virtual_cfa_rtx; #ifdef DWARF2_UNWIND_INFO ! case BUILT_IN_DWARF_SP_COLUMN: ! return expand_builtin_dwarf_sp_column (); case BUILT_IN_INIT_DWARF_REG_SIZES: expand_builtin_init_dwarf_reg_sizes (TREE_VALUE (arglist)); return const0_rtx; *************** expand_builtin (exp, target, subtarget, *** 3970,3979 **** case BUILT_IN_EH_RETURN_DATA_REGNO: return expand_builtin_eh_return_data_regno (arglist); #endif ! case BUILT_IN_VARARGS_START: ! return expand_builtin_va_start (0, arglist); case BUILT_IN_STDARG_START: ! return expand_builtin_va_start (1, arglist); case BUILT_IN_VA_END: return expand_builtin_va_end (arglist); case BUILT_IN_VA_COPY: --- 4062,4070 ---- case BUILT_IN_EH_RETURN_DATA_REGNO: return expand_builtin_eh_return_data_regno (arglist); #endif ! case BUILT_IN_VA_START: case BUILT_IN_STDARG_START: ! return expand_builtin_va_start (arglist); case BUILT_IN_VA_END: return expand_builtin_va_end (arglist); case BUILT_IN_VA_COPY: *************** expand_builtin (exp, target, subtarget, *** 3985,3993 **** return const0_rtx; ! default: /* just do library call, if unknown builtin */ ! error ("built-in function `%s' not currently supported", ! IDENTIFIER_POINTER (DECL_NAME (fndecl))); } /* The switch statement above can drop through to cause the function --- 4076,4085 ---- return const0_rtx; ! default: /* just do library call, if unknown builtin */ ! if (!DECL_ASSEMBLER_NAME_SET_P (fndecl)) ! error ("built-in function `%s' not currently supported", ! IDENTIFIER_POINTER (DECL_NAME (fndecl))); } /* The switch statement above can drop through to cause the function *************** fold_builtin_classify_type (arglist) *** 4049,4054 **** --- 4141,4184 ---- return build_int_2 (type_to_class (TREE_TYPE (TREE_VALUE (arglist))), 0); } + /* Fold a call to __builtin_inf or __builtin_huge_val. */ + + static tree + fold_builtin_inf (type, warn) + tree type; + int warn; + { + REAL_VALUE_TYPE real; + + if (!MODE_HAS_INFINITIES (TYPE_MODE (type)) && warn) + warning ("target format does not support infinity"); + + real_inf (&real); + return build_real (type, real); + } + + /* Fold a call to __builtin_nan or __builtin_nans. */ + + static tree + fold_builtin_nan (arglist, type, quiet) + tree arglist, type; + int quiet; + { + REAL_VALUE_TYPE real; + const char *str; + + if (!validate_arglist (arglist, POINTER_TYPE, VOID_TYPE)) + return 0; + str = c_getstr (TREE_VALUE (arglist)); + if (!str) + return 0; + + if (!real_nan (&real, str, quiet, TYPE_MODE (type))) + return 0; + + return build_real (type, real); + } + /* Used by constant folding to eliminate some builtin calls early. EXP is the CALL_EXPR of a call to a builtin function. */ *************** fold_builtin (exp) *** 4085,4090 **** --- 4215,4240 ---- } break; + case BUILT_IN_INF: + case BUILT_IN_INFF: + case BUILT_IN_INFL: + return fold_builtin_inf (TREE_TYPE (TREE_TYPE (fndecl)), true); + + case BUILT_IN_HUGE_VAL: + case BUILT_IN_HUGE_VALF: + case BUILT_IN_HUGE_VALL: + return fold_builtin_inf (TREE_TYPE (TREE_TYPE (fndecl)), false); + + case BUILT_IN_NAN: + case BUILT_IN_NANF: + case BUILT_IN_NANL: + return fold_builtin_nan (arglist, TREE_TYPE (TREE_TYPE (fndecl)), true); + + case BUILT_IN_NANS: + case BUILT_IN_NANSF: + case BUILT_IN_NANSL: + return fold_builtin_nan (arglist, TREE_TYPE (TREE_TYPE (fndecl)), false); + default: break; } *************** validate_arglist VPARAMS ((tree arglist, *** 4119,4147 **** VA_OPEN (ap, arglist); VA_FIXEDARG (ap, tree, arglist); ! do { ! code = va_arg (ap, enum tree_code); ! switch (code) { ! case 0: ! /* This signifies an ellipses, any further arguments are all ok. */ ! res = 1; ! goto end; ! case VOID_TYPE: ! /* This signifies an endlink, if no arguments remain, return ! true, otherwise return false. */ ! res = arglist == 0; ! goto end; ! default: ! /* If no parameters remain or the parameter's code does not ! match the specified code, return false. Otherwise continue ! checking any remaining arguments. */ ! if (arglist == 0 || code != TREE_CODE (TREE_TYPE (TREE_VALUE (arglist)))) ! goto end; ! break; } ! arglist = TREE_CHAIN (arglist); ! } while (1); /* We need gotos here since we can only have one VA_CLOSE in a function. */ --- 4269,4300 ---- VA_OPEN (ap, arglist); VA_FIXEDARG (ap, tree, arglist); ! do { ! code = va_arg (ap, enum tree_code); ! switch (code) ! { ! case 0: ! /* This signifies an ellipses, any further arguments are all ok. */ ! res = 1; ! goto end; ! case VOID_TYPE: ! /* This signifies an endlink, if no arguments remain, return ! true, otherwise return false. */ ! res = arglist == 0; ! goto end; ! default: ! /* If no parameters remain or the parameter's code does not ! match the specified code, return false. Otherwise continue ! checking any remaining arguments. */ ! if (arglist == 0 ! || code != TREE_CODE (TREE_TYPE (TREE_VALUE (arglist)))) ! goto end; ! break; ! } ! arglist = TREE_CHAIN (arglist); } ! while (1); /* We need gotos here since we can only have one VA_CLOSE in a function. */ diff -Nrc3pad gcc-3.2.3/gcc/builtins.def gcc-3.3/gcc/builtins.def *** gcc-3.2.3/gcc/builtins.def 2002-01-28 20:07:00.000000000 +0000 --- gcc-3.3/gcc/builtins.def 2003-05-05 16:59:19.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 22,28 **** /* Before including this file, you should define a macro: DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, ! FALLBACK_P, NONANSI_P) This macro will be called once for each builtin function. The ENUM will be of type `enum built_in_function', and will indicate --- 22,28 ---- /* Before including this file, you should define a macro: DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, ! FALLBACK_P, NONANSI_P, ATTRS) This macro will be called once for each builtin function. The ENUM will be of type `enum built_in_function', and will indicate *************** Software Foundation, 59 Temple Place - S *** 50,64 **** If NONANSI_P is true, then the non-`__builtin_' variant is not an ANSI/ISO library function, and so we should pretend it does not ! exist when compiling in ANSI conformant mode. */ /* A GCC builtin (like __builtin_saveregs) is provided by the compiler, but does not correspond to a function in the standard library. */ #undef DEF_GCC_BUILTIN ! #define DEF_GCC_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \ ! false, false, false) /* A fallback builtin is a builtin (like __builtin_puts) that falls --- 50,67 ---- If NONANSI_P is true, then the non-`__builtin_' variant is not an ANSI/ISO library function, and so we should pretend it does not ! exist when compiling in ANSI conformant mode. ! ! ATTRs is an attribute list as defined in builtin-attrs.def that ! describes the attributes of this builtin function. */ /* A GCC builtin (like __builtin_saveregs) is provided by the compiler, but does not correspond to a function in the standard library. */ #undef DEF_GCC_BUILTIN ! #define DEF_GCC_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \ ! false, false, false, ATTRS) /* A fallback builtin is a builtin (like __builtin_puts) that falls *************** Software Foundation, 59 Temple Place - S *** 66,74 **** for which we should not introduce the non-`__builtin' variant of the name. */ #undef DEF_FALLBACK_BUILTIN ! #define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! false, true, false) /* Like DEF_FALLBACK_BUILTIN, except that the function is not one that is specified by ANSI/ISO C. So, when we're being fully conformant --- 69,77 ---- for which we should not introduce the non-`__builtin' variant of the name. */ #undef DEF_FALLBACK_BUILTIN ! #define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! false, true, false, ATTRS) /* Like DEF_FALLBACK_BUILTIN, except that the function is not one that is specified by ANSI/ISO C. So, when we're being fully conformant *************** Software Foundation, 59 Temple Place - S *** 77,150 **** #undef DEF_EXT_FALLBACK_BUILTIN #define DEF_EXT_FALLBACK_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! false, true, true) /* A library builtin (like __builtin_strchr) is a builtin equivalent of an ANSI/ISO standard library function. In addition to the `__builtin' version, we will create an ordinary version (e.g, `strchr') as well. If we cannot compute the answer using the builtin function, we will fall back to the standard library ! version. */ #undef DEF_LIB_BUILTIN ! #define DEF_LIB_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, true, false) /* Like DEF_LIB_BUILTIN, except that a call to the builtin should never fall back to the library version. */ #undef DEF_LIB_ALWAYS_BUILTIN #define DEF_LIB_ALWAYS_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, false, true) /* Like DEF_LIB_BUILTIN, except that the function is not one that is specified by ANSI/ISO C. So, when we're being fully conformant we ignore the version of these builtins that does not begin with __builtin. */ #undef DEF_EXT_LIB_BUILTIN ! #define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, true, true) /* Like DEF_LIB_BUILTIN, except that the function is only a part of the standard in C99 or above. */ #undef DEF_C99_BUILTIN ! #define DEF_C99_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, !flag_isoc99, true) /* Like DEF_LIB_BUILTIN, except that the function is expanded in the front-end. */ #undef DEF_FRONT_END_LIB_BUILTIN ! #define DEF_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \ ! true, true, false) /* Like DEF_FRONT_END_LIB_BUILTIN, except that the function is not one that is specified by ANSI/ISO C. So, when we're being fully conformant we ignore the version of these builtins that does not begin with __builtin. */ #undef DEF_EXT_FRONT_END_LIB_BUILTIN ! #define DEF_EXT_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \ ! true, true, true) /* A built-in that is not currently used. */ #undef DEF_UNUSED_BUILTIN #define DEF_UNUSED_BUILTIN(X) \ DEF_BUILTIN (X, (const char *) NULL, NOT_BUILT_IN, BT_LAST, \ ! BT_LAST, false, false, false) /* If SMALL_STACK is defined, then `alloca' is only defined in its `__builtin' form. */ #if SMALL_STACK DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA, "__builtin_alloca", ! BT_FN_PTR_SIZE) #else DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA, "__builtin_alloca", ! BT_FN_PTR_SIZE) #endif DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_ABS, --- 80,155 ---- #undef DEF_EXT_FALLBACK_BUILTIN #define DEF_EXT_FALLBACK_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! false, true, true, ATTR_NOTHROW_LIST) /* A library builtin (like __builtin_strchr) is a builtin equivalent of an ANSI/ISO standard library function. In addition to the `__builtin' version, we will create an ordinary version (e.g, `strchr') as well. If we cannot compute the answer using the builtin function, we will fall back to the standard library ! version. */ #undef DEF_LIB_BUILTIN ! #define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, true, false, ATTRS) /* Like DEF_LIB_BUILTIN, except that a call to the builtin should never fall back to the library version. */ #undef DEF_LIB_ALWAYS_BUILTIN #define DEF_LIB_ALWAYS_BUILTIN(ENUM, NAME, TYPE) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, false, true, ATTR_CONST_NOTHROW_LIST) /* Like DEF_LIB_BUILTIN, except that the function is not one that is specified by ANSI/ISO C. So, when we're being fully conformant we ignore the version of these builtins that does not begin with __builtin. */ #undef DEF_EXT_LIB_BUILTIN ! #define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, true, true, ATTRS) /* Like DEF_LIB_BUILTIN, except that the function is only a part of the standard in C99 or above. */ #undef DEF_C99_BUILTIN ! #define DEF_C99_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ ! true, true, !flag_isoc99, ATTRS) /* Like DEF_LIB_BUILTIN, except that the function is expanded in the front-end. */ #undef DEF_FRONT_END_LIB_BUILTIN ! #define DEF_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \ ! true, true, false, ATTRS) /* Like DEF_FRONT_END_LIB_BUILTIN, except that the function is not one that is specified by ANSI/ISO C. So, when we're being fully conformant we ignore the version of these builtins that does not begin with __builtin. */ #undef DEF_EXT_FRONT_END_LIB_BUILTIN ! #define DEF_EXT_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \ ! true, true, true, ATTRS) /* A built-in that is not currently used. */ #undef DEF_UNUSED_BUILTIN #define DEF_UNUSED_BUILTIN(X) \ DEF_BUILTIN (X, (const char *) NULL, NOT_BUILT_IN, BT_LAST, \ ! BT_LAST, false, false, false, ATTR_NOTHROW_LIST) /* If SMALL_STACK is defined, then `alloca' is only defined in its `__builtin' form. */ #if SMALL_STACK DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA, "__builtin_alloca", ! BT_FN_PTR_SIZE, ! ATTR_MALLOC_NOTHROW_LIST) #else DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA, "__builtin_alloca", ! BT_FN_PTR_SIZE, ! ATTR_MALLOC_NOTHROW_LIST) #endif DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_ABS, *************** DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSL, *** 166,202 **** DEF_C99_BUILTIN(BUILT_IN_LLABS, "__builtin_llabs", ! BT_FN_LONGLONG_LONGLONG) DEF_C99_BUILTIN(BUILT_IN_IMAXABS, "__builtin_imaxabs", ! BT_FN_INTMAX_INTMAX) DEF_C99_BUILTIN(BUILT_IN_CONJ, "__builtin_conj", ! BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE) DEF_C99_BUILTIN(BUILT_IN_CONJF, "__builtin_conjf", ! BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT) DEF_C99_BUILTIN(BUILT_IN_CONJL, "__builtin_conjl", ! BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) DEF_C99_BUILTIN(BUILT_IN_CREAL, "__builtin_creal", ! BT_FN_DOUBLE_COMPLEX_DOUBLE) DEF_C99_BUILTIN(BUILT_IN_CREALF, "__builtin_crealf", ! BT_FN_FLOAT_COMPLEX_FLOAT) DEF_C99_BUILTIN(BUILT_IN_CREALL, "__builtin_creall", ! BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) DEF_C99_BUILTIN(BUILT_IN_CIMAG, "__builtin_cimag", ! BT_FN_DOUBLE_COMPLEX_DOUBLE) DEF_C99_BUILTIN(BUILT_IN_CIMAGF, "__builtin_cimagf", ! BT_FN_FLOAT_COMPLEX_FLOAT) DEF_C99_BUILTIN(BUILT_IN_CIMAGL, "__builtin_cimagl", ! BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) DEF_UNUSED_BUILTIN(BUILT_IN_DIV) DEF_UNUSED_BUILTIN(BUILT_IN_LDIV) --- 171,218 ---- DEF_C99_BUILTIN(BUILT_IN_LLABS, "__builtin_llabs", ! BT_FN_LONGLONG_LONGLONG, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_IMAXABS, "__builtin_imaxabs", ! BT_FN_INTMAX_INTMAX, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJ, "__builtin_conj", ! BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJF, "__builtin_conjf", ! BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJL, "__builtin_conjl", ! BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREAL, "__builtin_creal", ! BT_FN_DOUBLE_COMPLEX_DOUBLE, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREALF, "__builtin_crealf", ! BT_FN_FLOAT_COMPLEX_FLOAT, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREALL, "__builtin_creall", ! BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAG, "__builtin_cimag", ! BT_FN_DOUBLE_COMPLEX_DOUBLE, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAGF, "__builtin_cimagf", ! BT_FN_FLOAT_COMPLEX_FLOAT, ! ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAGL, "__builtin_cimagl", ! BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, ! ATTR_NOTHROW_LIST) DEF_UNUSED_BUILTIN(BUILT_IN_DIV) DEF_UNUSED_BUILTIN(BUILT_IN_LDIV) *************** DEF_UNUSED_BUILTIN(BUILT_IN_FREM) *** 211,394 **** DEF_BUILTIN (BUILT_IN_BZERO, "__builtin_bzero", BUILT_IN_NORMAL, ! BT_FN_VOID_TRAD_PTR_LEN, BT_FN_VOID_VAR, ! true, true, true) DEF_BUILTIN (BUILT_IN_BCMP, "__builtin_bcmp", BUILT_IN_NORMAL, ! BT_FN_INT_TRAD_CONST_PTR_TRAD_CONST_PTR_LEN, BT_FN_INT_VAR, ! true, true, true) DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS, "__builtin_ffs", ! BT_FN_INT_INT) DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX, "__builtin_index", ! BT_FN_STRING_CONST_STRING_INT) DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX, "__builtin_rindex", ! BT_FN_STRING_CONST_STRING_INT) DEF_LIB_BUILTIN(BUILT_IN_MEMCPY, "__builtin_memcpy", ! BT_FN_TRAD_PTR_PTR_CONST_PTR_SIZE) DEF_LIB_BUILTIN(BUILT_IN_MEMCMP, "__builtin_memcmp", ! BT_FN_INT_CONST_PTR_CONST_PTR_SIZE) DEF_LIB_BUILTIN(BUILT_IN_MEMSET, "__builtin_memset", ! BT_FN_TRAD_PTR_PTR_INT_SIZE) DEF_LIB_BUILTIN(BUILT_IN_STRCAT, "__builtin_strcat", ! BT_FN_STRING_STRING_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRNCAT, "__builtin_strncat", ! BT_FN_STRING_STRING_CONST_STRING_SIZE) DEF_LIB_BUILTIN(BUILT_IN_STRCPY, "__builtin_strcpy", ! BT_FN_STRING_STRING_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRNCPY, "__builtin_strncpy", ! BT_FN_STRING_STRING_CONST_STRING_SIZE) DEF_LIB_BUILTIN(BUILT_IN_STRCMP, "__builtin_strcmp", ! BT_FN_INT_CONST_STRING_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRNCMP, "__builtin_strncmp", ! BT_FN_INT_CONST_STRING_CONST_STRING_SIZE) DEF_LIB_BUILTIN(BUILT_IN_STRLEN, "__builtin_strlen", ! BT_FN_LEN_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRSTR, "__builtin_strstr", ! BT_FN_STRING_CONST_STRING_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRPBRK, "__builtin_strpbrk", ! BT_FN_STRING_CONST_STRING_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRSPN, "__builtin_strspn", ! BT_FN_SIZE_CONST_STRING_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRCSPN, "__builtin_strcspn", ! BT_FN_SIZE_CONST_STRING_CONST_STRING) DEF_LIB_BUILTIN(BUILT_IN_STRCHR, "__builtin_strchr", ! BT_FN_STRING_CONST_STRING_INT) DEF_LIB_BUILTIN(BUILT_IN_STRRCHR, "__builtin_strrchr", ! BT_FN_STRING_CONST_STRING_INT) DEF_LIB_BUILTIN(BUILT_IN_SQRT, "__builtin_sqrt", ! BT_FN_DOUBLE_DOUBLE) DEF_LIB_BUILTIN(BUILT_IN_SIN, "__builtin_sin", ! BT_FN_DOUBLE_DOUBLE) DEF_LIB_BUILTIN(BUILT_IN_COS, "__builtin_cos", ! BT_FN_DOUBLE_DOUBLE) DEF_LIB_BUILTIN(BUILT_IN_SQRTF, "__builtin_sqrtf", ! BT_FN_FLOAT_FLOAT) DEF_LIB_BUILTIN(BUILT_IN_SINF, "__builtin_sinf", ! BT_FN_FLOAT_FLOAT) DEF_LIB_BUILTIN(BUILT_IN_COSF, "__builtin_cosf", ! BT_FN_FLOAT_FLOAT) DEF_LIB_BUILTIN(BUILT_IN_SQRTL, "__builtin_sqrtl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE) DEF_LIB_BUILTIN(BUILT_IN_SINL, "__builtin_sinl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE) DEF_LIB_BUILTIN(BUILT_IN_COSL, "__builtin_cosl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE) ! DEF_UNUSED_BUILTIN(BUILT_IN_GETEXP) ! DEF_UNUSED_BUILTIN(BUILT_IN_GETMAN) DEF_GCC_BUILTIN(BUILT_IN_SAVEREGS, "__builtin_saveregs", ! BT_FN_PTR_VAR) DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE, "__builtin_classify_type", ! BT_FN_INT_VAR) DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG, "__builtin_next_arg", ! BT_FN_PTR_VAR) DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO, "__builtin_args_info", ! BT_FN_INT_INT) DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P, "__builtin_constant_p", ! BT_FN_INT_VAR) DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS, "__builtin_frame_address", ! BT_FN_PTR_UNSIGNED) DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS, "__builtin_return_address", ! BT_FN_PTR_UNSIGNED) DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS, "__builtin_aggregate_incoming_address", ! BT_FN_PTR_VAR) DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS, "__builtin_apply_args", ! BT_FN_PTR_VAR) DEF_GCC_BUILTIN(BUILT_IN_APPLY, "__builtin_apply", ! BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE) DEF_GCC_BUILTIN(BUILT_IN_RETURN, "__builtin_return", ! BT_FN_VOID_PTR) DEF_GCC_BUILTIN(BUILT_IN_SETJMP, "__builtin_setjmp", ! BT_FN_INT_PTR) DEF_GCC_BUILTIN(BUILT_IN_LONGJMP, "__builtin_longjmp", ! BT_FN_VOID_PTR_INT) DEF_GCC_BUILTIN(BUILT_IN_TRAP, "__builtin_trap", ! BT_FN_VOID) DEF_GCC_BUILTIN(BUILT_IN_PREFETCH, "__builtin_prefetch", ! BT_FN_VOID_CONST_PTR_VAR) - /* Stdio builtins. */ - DEF_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR, - "__builtin_putchar", - BT_FN_INT_INT) - DEF_FALLBACK_BUILTIN(BUILT_IN_PUTS, - "__builtin_puts", - BT_FN_INT_CONST_STRING) DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF, "__builtin_printf", ! BT_FN_INT_CONST_STRING_VAR) ! DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC, ! "__builtin_fputc", ! BT_FN_INT_INT_PTR) /* Declare the __builtin_ style with arguments and the regular style without them. We rely on stdio.h to supply the arguments for the regular style declaration since we had to use void* instead of FILE* in the __builtin_ prototype supplied here. */ DEF_BUILTIN (BUILT_IN_FPUTS, "__builtin_fputs", BUILT_IN_NORMAL, BT_FN_INT_CONST_STRING_PTR, BT_FN_INT_VAR, ! true, true, false) DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE, "__builtin_fwrite", ! BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR) DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF, "__builtin_fprintf", ! BT_FN_INT_PTR_CONST_STRING_VAR) ! /* Stdio unlocked builtins. */ DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED, "__builtin_putchar_unlocked", --- 227,609 ---- DEF_BUILTIN (BUILT_IN_BZERO, "__builtin_bzero", BUILT_IN_NORMAL, ! BT_FN_VOID_PTR_SIZE, BT_FN_VOID_VAR, ! true, true, true, ! ATTR_NOTHROW_LIST) DEF_BUILTIN (BUILT_IN_BCMP, "__builtin_bcmp", BUILT_IN_NORMAL, ! BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, BT_FN_INT_VAR, ! true, true, true, ! ATTR_PURE_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS, "__builtin_ffs", ! BT_FN_INT_INT, ! ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX, "__builtin_index", ! BT_FN_STRING_CONST_STRING_INT, ! ATTR_PURE_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX, "__builtin_rindex", ! BT_FN_STRING_CONST_STRING_INT, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_MEMCPY, "__builtin_memcpy", ! BT_FN_PTR_PTR_CONST_PTR_SIZE, ! ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_MEMCMP, "__builtin_memcmp", ! BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_MEMSET, "__builtin_memset", ! BT_FN_PTR_PTR_INT_SIZE, ! ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRCAT, "__builtin_strcat", ! BT_FN_STRING_STRING_CONST_STRING, ! ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRNCAT, "__builtin_strncat", ! BT_FN_STRING_STRING_CONST_STRING_SIZE, ! ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRCPY, "__builtin_strcpy", ! BT_FN_STRING_STRING_CONST_STRING, ! ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRNCPY, "__builtin_strncpy", ! BT_FN_STRING_STRING_CONST_STRING_SIZE, ! ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRCMP, "__builtin_strcmp", ! BT_FN_INT_CONST_STRING_CONST_STRING, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRNCMP, "__builtin_strncmp", ! BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRLEN, "__builtin_strlen", ! BT_FN_SIZE_CONST_STRING, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRSTR, "__builtin_strstr", ! BT_FN_STRING_CONST_STRING_CONST_STRING, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRPBRK, "__builtin_strpbrk", ! BT_FN_STRING_CONST_STRING_CONST_STRING, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRSPN, "__builtin_strspn", ! BT_FN_SIZE_CONST_STRING_CONST_STRING, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRCSPN, "__builtin_strcspn", ! BT_FN_SIZE_CONST_STRING_CONST_STRING, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRCHR, "__builtin_strchr", ! BT_FN_STRING_CONST_STRING_INT, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRRCHR, "__builtin_strrchr", ! BT_FN_STRING_CONST_STRING_INT, ! ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_SQRT, "__builtin_sqrt", ! BT_FN_DOUBLE_DOUBLE, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) DEF_LIB_BUILTIN(BUILT_IN_SIN, "__builtin_sin", ! BT_FN_DOUBLE_DOUBLE, ! flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_COS, "__builtin_cos", ! BT_FN_DOUBLE_DOUBLE, ! flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_EXP, ! "__builtin_exp", ! BT_FN_DOUBLE_DOUBLE, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) ! DEF_LIB_BUILTIN(BUILT_IN_LOG, ! "__builtin_log", ! BT_FN_DOUBLE_DOUBLE, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) DEF_LIB_BUILTIN(BUILT_IN_SQRTF, "__builtin_sqrtf", ! BT_FN_FLOAT_FLOAT, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) DEF_LIB_BUILTIN(BUILT_IN_SINF, "__builtin_sinf", ! BT_FN_FLOAT_FLOAT, ! flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_COSF, "__builtin_cosf", ! BT_FN_FLOAT_FLOAT, ! flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_EXPF, ! "__builtin_expf", ! BT_FN_FLOAT_FLOAT, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) ! DEF_LIB_BUILTIN(BUILT_IN_LOGF, ! "__builtin_logf", ! BT_FN_FLOAT_FLOAT, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) DEF_LIB_BUILTIN(BUILT_IN_SQRTL, "__builtin_sqrtl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) DEF_LIB_BUILTIN(BUILT_IN_SINL, "__builtin_sinl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE, ! flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_COSL, "__builtin_cosl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE, ! flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_EXPL, ! "__builtin_expl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) ! DEF_LIB_BUILTIN(BUILT_IN_LOGL, ! "__builtin_logl", ! BT_FN_LONG_DOUBLE_LONG_DOUBLE, ! flag_errno_math ? ATTR_NOTHROW_LIST ! : (flag_unsafe_math_optimizations ! ? ATTR_CONST_NOTHROW_LIST ! : ATTR_PURE_NOTHROW_LIST)) ! DEF_GCC_BUILTIN(BUILT_IN_INF, ! "__builtin_inf", ! BT_FN_DOUBLE, ! ATTR_CONST_NOTHROW_LIST) ! DEF_GCC_BUILTIN(BUILT_IN_INFF, ! "__builtin_inff", ! BT_FN_FLOAT, ! ATTR_CONST_NOTHROW_LIST) ! DEF_GCC_BUILTIN(BUILT_IN_INFL, ! "__builtin_infl", ! BT_FN_LONG_DOUBLE, ! ATTR_CONST_NOTHROW_LIST) ! ! DEF_GCC_BUILTIN(BUILT_IN_HUGE_VAL, ! "__builtin_huge_val", ! BT_FN_DOUBLE, ! ATTR_CONST_NOTHROW_LIST) ! DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALF, ! "__builtin_huge_valf", ! BT_FN_FLOAT, ! ATTR_CONST_NOTHROW_LIST) ! DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALL, ! "__builtin_huge_vall", ! BT_FN_LONG_DOUBLE, ! ATTR_CONST_NOTHROW_LIST) ! ! DEF_LIB_BUILTIN(BUILT_IN_NAN, ! "__builtin_nan", ! BT_FN_DOUBLE_CONST_STRING, ! ATTR_CONST_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_NANF, ! "__builtin_nanf", ! BT_FN_FLOAT_CONST_STRING, ! ATTR_CONST_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_NANL, ! "__builtin_nanl", ! BT_FN_LONG_DOUBLE_CONST_STRING, ! ATTR_CONST_NOTHROW_LIST) ! ! DEF_LIB_BUILTIN(BUILT_IN_NANS, ! "__builtin_nans", ! BT_FN_DOUBLE_CONST_STRING, ! ATTR_CONST_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_NANSF, ! "__builtin_nansf", ! BT_FN_FLOAT_CONST_STRING, ! ATTR_CONST_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_NANSL, ! "__builtin_nansl", ! BT_FN_LONG_DOUBLE_CONST_STRING, ! ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_SAVEREGS, "__builtin_saveregs", ! BT_FN_PTR_VAR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE, "__builtin_classify_type", ! BT_FN_INT_VAR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG, "__builtin_next_arg", ! BT_FN_PTR_VAR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO, "__builtin_args_info", ! BT_FN_INT_INT, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P, "__builtin_constant_p", ! BT_FN_INT_VAR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS, "__builtin_frame_address", ! BT_FN_PTR_UNSIGNED, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS, "__builtin_return_address", ! BT_FN_PTR_UNSIGNED, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS, "__builtin_aggregate_incoming_address", ! BT_FN_PTR_VAR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS, "__builtin_apply_args", ! BT_FN_PTR_VAR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_APPLY, "__builtin_apply", ! BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_RETURN, "__builtin_return", ! BT_FN_VOID_PTR, ! ATTR_NORETURN_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_SETJMP, "__builtin_setjmp", ! BT_FN_INT_PTR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_LONGJMP, "__builtin_longjmp", ! BT_FN_VOID_PTR_INT, ! ATTR_NORETURN_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_TRAP, "__builtin_trap", ! BT_FN_VOID, ! ATTR_NORETURN_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_PREFETCH, "__builtin_prefetch", ! BT_FN_VOID_CONST_PTR_VAR, ! ATTR_NULL) ! ! /* stdio.h builtins (without FILE *). */ DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF, "__builtin_printf", ! BT_FN_INT_CONST_STRING_VAR, ! ATTR_FORMAT_PRINTF_1_2) ! DEF_LIB_BUILTIN(BUILT_IN_PUTCHAR, ! "__builtin_putchar", ! BT_FN_INT_INT, ! ATTR_NOTHROW_LIST) ! DEF_LIB_BUILTIN(BUILT_IN_PUTS, ! "__builtin_puts", ! BT_FN_INT_CONST_STRING, ! ATTR_NOTHROW_LIST) ! DEF_C99_BUILTIN(BUILT_IN_SNPRINTF, ! "__builtin_snprintf", ! BT_FN_INT_STRING_SIZE_CONST_STRING_VAR, ! ATTR_FORMAT_PRINTF_3_4) ! DEF_LIB_BUILTIN(BUILT_IN_SPRINTF, ! "__builtin_sprintf", ! BT_FN_INT_STRING_CONST_STRING_VAR, ! ATTR_FORMAT_PRINTF_2_3) ! DEF_LIB_BUILTIN(BUILT_IN_SCANF, ! "__builtin_scanf", ! BT_FN_INT_CONST_STRING_VAR, ! ATTR_FORMAT_SCANF_1_2) ! DEF_LIB_BUILTIN(BUILT_IN_SSCANF, ! "__builtin_sscanf", ! BT_FN_INT_CONST_STRING_CONST_STRING_VAR, ! ATTR_FORMAT_SCANF_2_3) ! DEF_LIB_BUILTIN(BUILT_IN_VPRINTF, ! "__builtin_vprintf", ! BT_FN_INT_CONST_STRING_VALIST_ARG, ! ATTR_FORMAT_PRINTF_1_0) ! DEF_C99_BUILTIN(BUILT_IN_VSCANF, ! "__builtin_vscanf", ! BT_FN_INT_CONST_STRING_VALIST_ARG, ! ATTR_FORMAT_SCANF_1_0) ! DEF_C99_BUILTIN(BUILT_IN_VSSCANF, ! "__builtin_vsscanf", ! BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG, ! ATTR_FORMAT_SCANF_2_0) ! DEF_C99_BUILTIN(BUILT_IN_VSNPRINTF, ! "__builtin_vsnprintf", ! BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG, ! ATTR_FORMAT_PRINTF_3_0) ! DEF_LIB_BUILTIN(BUILT_IN_VSPRINTF, ! "__builtin_vsprintf", ! BT_FN_INT_STRING_CONST_STRING_VALIST_ARG, ! ATTR_FORMAT_PRINTF_2_0) ! ! ! /* stdio.h builtins (with FILE *). */ ! /* Declare the __builtin_ style with arguments and the regular style without them. We rely on stdio.h to supply the arguments for the regular style declaration since we had to use void* instead of FILE* in the __builtin_ prototype supplied here. */ + + DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC, + "__builtin_fputc", + BT_FN_INT_INT_PTR, + ATTR_NOTHROW_LIST) DEF_BUILTIN (BUILT_IN_FPUTS, "__builtin_fputs", BUILT_IN_NORMAL, BT_FN_INT_CONST_STRING_PTR, BT_FN_INT_VAR, ! true, true, false, ATTR_NOTHROW_LIST) DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE, "__builtin_fwrite", ! BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, ! ATTR_NOTHROW_LIST) DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF, "__builtin_fprintf", ! BT_FN_INT_PTR_CONST_STRING_VAR, ! ATTR_FORMAT_PRINTF_2_3) ! /* stdio unlocked builtins (without FILE *). */ DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED, "__builtin_putchar_unlocked", *************** DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTS_U *** 398,488 **** BT_FN_INT_CONST_STRING) DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED, "__builtin_printf_unlocked", ! BT_FN_INT_CONST_STRING_VAR) ! DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FPUTC_UNLOCKED, ! "__builtin_fputc_unlocked", ! BT_FN_INT_INT_PTR) /* Declare the __builtin_ style with arguments and the regular style without them. We rely on stdio.h to supply the arguments for the regular style declaration since we had to use void* instead of FILE* in the __builtin_ prototype supplied here. */ DEF_BUILTIN (BUILT_IN_FPUTS_UNLOCKED, "__builtin_fputs_unlocked", BUILT_IN_NORMAL, BT_FN_INT_CONST_STRING_PTR, BT_FN_INT_VAR, ! true, true, true) DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FWRITE_UNLOCKED, "__builtin_fwrite_unlocked", BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR) DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF_UNLOCKED, "__builtin_fprintf_unlocked", ! BT_FN_INT_PTR_CONST_STRING_VAR) /* ISO C99 floating point unordered comparisons. */ DEF_GCC_BUILTIN(BUILT_IN_ISGREATER, "__builtin_isgreater", ! BT_FN_INT_VAR) DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL, "__builtin_isgreaterequal", ! BT_FN_INT_VAR) DEF_GCC_BUILTIN(BUILT_IN_ISLESS, "__builtin_isless", ! BT_FN_INT_VAR) DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL, "__builtin_islessequal", ! BT_FN_INT_VAR) DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER, "__builtin_islessgreater", ! BT_FN_INT_VAR) DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED, "__builtin_isunordered", ! BT_FN_INT_VAR) /* Various hooks for the DWARF 2 __throw routine. */ DEF_GCC_BUILTIN(BUILT_IN_UNWIND_INIT, "__builtin_unwind_init", ! BT_FN_VOID) DEF_GCC_BUILTIN(BUILT_IN_DWARF_CFA, "__builtin_dwarf_cfa", ! BT_FN_PTR) ! DEF_GCC_BUILTIN(BUILT_IN_DWARF_FP_REGNUM, ! "__builtin_dwarf_fp_regnum", ! BT_FN_UNSIGNED) DEF_GCC_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES, "__builtin_init_dwarf_reg_size_table", ! BT_FN_VOID_PTR) DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR, "__builtin_frob_return_addr", ! BT_FN_PTR_PTR) DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR, "__builtin_extract_return_addr", ! BT_FN_PTR_PTR) DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN, "__builtin_eh_return", ! BT_FN_VOID_PTRMODE_PTR) DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO, "__builtin_eh_return_data_regno", ! BT_FN_INT_INT) ! DEF_GCC_BUILTIN(BUILT_IN_VARARGS_START, ! "__builtin_varargs_start", ! BT_FN_VOID_VALIST_REF) ! DEF_GCC_BUILTIN(BUILT_IN_STDARG_START, "__builtin_stdarg_start", ! BT_FN_VOID_VALIST_REF_VAR) DEF_GCC_BUILTIN(BUILT_IN_VA_END, "__builtin_va_end", ! BT_FN_VOID_VALIST_REF) DEF_GCC_BUILTIN(BUILT_IN_VA_COPY, "__builtin_va_copy", ! BT_FN_VOID_VALIST_REF_VALIST_ARG) DEF_GCC_BUILTIN(BUILT_IN_EXPECT, "__builtin_expect", ! BT_FN_LONG_LONG_LONG) /* C++ extensions */ DEF_UNUSED_BUILTIN(BUILT_IN_NEW) DEF_UNUSED_BUILTIN(BUILT_IN_VEC_NEW) DEF_UNUSED_BUILTIN(BUILT_IN_DELETE) DEF_UNUSED_BUILTIN(BUILT_IN_VEC_DELETE) --- 613,764 ---- BT_FN_INT_CONST_STRING) DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED, "__builtin_printf_unlocked", ! BT_FN_INT_CONST_STRING_VAR, ! ATTR_FORMAT_PRINTF_1_2) ! ! /* stdio unlocked builtins (with FILE *). */ ! /* Declare the __builtin_ style with arguments and the regular style without them. We rely on stdio.h to supply the arguments for the regular style declaration since we had to use void* instead of FILE* in the __builtin_ prototype supplied here. */ + + DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FPUTC_UNLOCKED, + "__builtin_fputc_unlocked", + BT_FN_INT_INT_PTR) DEF_BUILTIN (BUILT_IN_FPUTS_UNLOCKED, "__builtin_fputs_unlocked", BUILT_IN_NORMAL, BT_FN_INT_CONST_STRING_PTR, BT_FN_INT_VAR, ! true, true, true, ATTR_NOTHROW_LIST) DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FWRITE_UNLOCKED, "__builtin_fwrite_unlocked", BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR) DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF_UNLOCKED, "__builtin_fprintf_unlocked", ! BT_FN_INT_PTR_CONST_STRING_VAR, ! ATTR_FORMAT_PRINTF_2_3) /* ISO C99 floating point unordered comparisons. */ DEF_GCC_BUILTIN(BUILT_IN_ISGREATER, "__builtin_isgreater", ! BT_FN_INT_VAR, ! ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL, "__builtin_isgreaterequal", ! BT_FN_INT_VAR, ! ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISLESS, "__builtin_isless", ! BT_FN_INT_VAR, ! ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL, "__builtin_islessequal", ! BT_FN_INT_VAR, ! ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER, "__builtin_islessgreater", ! BT_FN_INT_VAR, ! ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED, "__builtin_isunordered", ! BT_FN_INT_VAR, ! ATTR_CONST_NOTHROW_LIST) /* Various hooks for the DWARF 2 __throw routine. */ DEF_GCC_BUILTIN(BUILT_IN_UNWIND_INIT, "__builtin_unwind_init", ! BT_FN_VOID, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_DWARF_CFA, "__builtin_dwarf_cfa", ! BT_FN_PTR, ! ATTR_NULL) ! DEF_GCC_BUILTIN(BUILT_IN_DWARF_SP_COLUMN, ! "__builtin_dwarf_sp_column", ! BT_FN_UNSIGNED, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES, "__builtin_init_dwarf_reg_size_table", ! BT_FN_VOID_PTR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR, "__builtin_frob_return_addr", ! BT_FN_PTR_PTR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR, "__builtin_extract_return_addr", ! BT_FN_PTR_PTR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN, "__builtin_eh_return", ! BT_FN_VOID_PTRMODE_PTR, ! ATTR_NORETURN_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO, "__builtin_eh_return_data_regno", ! BT_FN_INT_INT, ! ATTR_NULL) ! /* Variable argument list (stdarg.h) support */ ! DEF_GCC_BUILTIN(BUILT_IN_VA_START, ! "__builtin_va_start", ! BT_FN_VOID_VALIST_REF_VAR, ! ATTR_NULL) ! DEF_GCC_BUILTIN(BUILT_IN_STDARG_START, /* backward compat */ "__builtin_stdarg_start", ! BT_FN_VOID_VALIST_REF_VAR, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_VA_END, "__builtin_va_end", ! BT_FN_VOID_VALIST_REF, ! ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_VA_COPY, "__builtin_va_copy", ! BT_FN_VOID_VALIST_REF_VALIST_ARG, ! ATTR_NULL) ! DEF_GCC_BUILTIN(BUILT_IN_EXPECT, "__builtin_expect", ! BT_FN_LONG_LONG_LONG, ! ATTR_NULL) /* C++ extensions */ DEF_UNUSED_BUILTIN(BUILT_IN_NEW) DEF_UNUSED_BUILTIN(BUILT_IN_VEC_NEW) DEF_UNUSED_BUILTIN(BUILT_IN_DELETE) DEF_UNUSED_BUILTIN(BUILT_IN_VEC_DELETE) + + /* Declare abort, exit, _exit and _Exit */ + DEF_BUILTIN (BUILT_IN_ABORT, + "__builtin_abort", + NOT_BUILT_IN, + BT_FN_VOID, + BT_FN_VOID, + 1, 0, 0, + ATTR_NORETURN_NOTHROW_LIST) + + DEF_BUILTIN (BUILT_IN_EXIT, + "__builtin_exit", + NOT_BUILT_IN, + BT_FN_VOID_INT, + BT_FN_VOID_INT, + 1, 0, 0, + ATTR_NORETURN_NOTHROW_LIST) + + DEF_BUILTIN (BUILT_IN__EXIT, + "__builtin__exit", + NOT_BUILT_IN, + BT_FN_VOID_INT, + BT_FN_VOID_INT, + 1, 0, 1, + ATTR_NORETURN_NOTHROW_LIST) + + DEF_BUILTIN (BUILT_IN__EXIT2, + "__builtin__Exit", + NOT_BUILT_IN, + BT_FN_VOID_INT, + BT_FN_VOID_INT, + 1, 0, !flag_isoc99, + ATTR_NORETURN_NOTHROW_LIST) + diff -Nrc3pad gcc-3.2.3/gcc/builtin-types.def gcc-3.3/gcc/builtin-types.def *** gcc-3.2.3/gcc/builtin-types.def 2002-12-01 18:19:08.000000000 +0000 --- gcc-3.3/gcc/builtin-types.def 2003-03-04 14:37:14.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 40,45 **** --- 40,46 ---- DEF_FUNCTION_TYPE_VAR_0 (ENUM, RETURN) DEF_FUNCTION_TYPE_VAR_1 (ENUM, RETURN, ARG1) DEF_FUNCTION_TYPE_VAR_2 (ENUM, RETURN, ARG1, ARG2) + DEF_FUNCTION_TYPE_VAR_3 (ENUM, RETURN, ARG1, ARG2, ARG3) Similar, but for function types that take variable arguments. For example: *************** DEF_PRIMITIVE_TYPE (BT_COMPLEX_LONG_DOUB *** 73,85 **** DEF_PRIMITIVE_TYPE (BT_PTR, ptr_type_node) DEF_PRIMITIVE_TYPE (BT_CONST_PTR, const_ptr_type_node) ! DEF_PRIMITIVE_TYPE (BT_TRAD_PTR, traditional_ptr_type_node) ! DEF_PRIMITIVE_TYPE (BT_TRAD_CONST_PTR, traditional_cptr_type_node) ! DEF_PRIMITIVE_TYPE (BT_PTRMODE, type_for_mode (ptr_mode, 0)) DEF_PRIMITIVE_TYPE (BT_SIZE, size_type_node) DEF_PRIMITIVE_TYPE (BT_STRING, string_type_node) DEF_PRIMITIVE_TYPE (BT_CONST_STRING, const_string_type_node) - DEF_PRIMITIVE_TYPE (BT_LEN, traditional_len_type_node) DEF_PRIMITIVE_TYPE (BT_VALIST_REF, va_list_ref_type_node) DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_list_arg_type_node) --- 74,83 ---- DEF_PRIMITIVE_TYPE (BT_PTR, ptr_type_node) DEF_PRIMITIVE_TYPE (BT_CONST_PTR, const_ptr_type_node) ! DEF_PRIMITIVE_TYPE (BT_PTRMODE, (*lang_hooks.types.type_for_mode)(ptr_mode, 0)) DEF_PRIMITIVE_TYPE (BT_SIZE, size_type_node) DEF_PRIMITIVE_TYPE (BT_STRING, string_type_node) DEF_PRIMITIVE_TYPE (BT_CONST_STRING, const_string_type_node) DEF_PRIMITIVE_TYPE (BT_VALIST_REF, va_list_ref_type_node) DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_list_arg_type_node) *************** DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_li *** 87,92 **** --- 85,93 ---- DEF_FUNCTION_TYPE_0 (BT_FN_VOID, BT_VOID) DEF_FUNCTION_TYPE_0 (BT_FN_PTR, BT_PTR) DEF_FUNCTION_TYPE_0 (BT_FN_UNSIGNED, BT_UNSIGNED) + DEF_FUNCTION_TYPE_0 (BT_FN_FLOAT, BT_FLOAT) + DEF_FUNCTION_TYPE_0 (BT_FN_DOUBLE, BT_DOUBLE) + DEF_FUNCTION_TYPE_0 (BT_FN_LONG_DOUBLE, BT_LONG_DOUBLE) DEF_FUNCTION_TYPE_1 (BT_FN_LONG_LONG, BT_LONG, BT_LONG) DEF_FUNCTION_TYPE_1 (BT_FN_LONGLONG_LONGLONG, BT_LONGLONG, BT_LONGLONG) *************** DEF_FUNCTION_TYPE_1 (BT_FN_PTR_SIZE, BT_ *** 112,122 **** DEF_FUNCTION_TYPE_1 (BT_FN_INT_INT, BT_INT, BT_INT) DEF_FUNCTION_TYPE_1 (BT_FN_INT_PTR, BT_INT, BT_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_PTR, BT_VOID, BT_PTR) ! DEF_FUNCTION_TYPE_1 (BT_FN_LEN_CONST_STRING, BT_LEN, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_INT_CONST_STRING, BT_INT, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_PTR_PTR, BT_PTR, BT_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_VALIST_REF, BT_VOID, BT_VALIST_REF) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_INT, BT_VOID, BT_INT) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_INT, BT_VOID, BT_PTR, BT_INT) DEF_FUNCTION_TYPE_2 (BT_FN_STRING_STRING_CONST_STRING, --- 113,127 ---- DEF_FUNCTION_TYPE_1 (BT_FN_INT_INT, BT_INT, BT_INT) DEF_FUNCTION_TYPE_1 (BT_FN_INT_PTR, BT_INT, BT_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_PTR, BT_VOID, BT_PTR) ! DEF_FUNCTION_TYPE_1 (BT_FN_SIZE_CONST_STRING, BT_SIZE, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_INT_CONST_STRING, BT_INT, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_PTR_PTR, BT_PTR, BT_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_VALIST_REF, BT_VOID, BT_VALIST_REF) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_INT, BT_VOID, BT_INT) + DEF_FUNCTION_TYPE_1 (BT_FN_FLOAT_CONST_STRING, BT_FLOAT, BT_CONST_STRING) + DEF_FUNCTION_TYPE_1 (BT_FN_DOUBLE_CONST_STRING, BT_DOUBLE, BT_CONST_STRING) + DEF_FUNCTION_TYPE_1 (BT_FN_LONG_DOUBLE_CONST_STRING, + BT_LONG_DOUBLE, BT_CONST_STRING) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_INT, BT_VOID, BT_PTR, BT_INT) DEF_FUNCTION_TYPE_2 (BT_FN_STRING_STRING_CONST_STRING, *************** DEF_FUNCTION_TYPE_2 (BT_FN_LONG_LONG_LON *** 141,165 **** BT_LONG, BT_LONG, BT_LONG) DEF_FUNCTION_TYPE_2 (BT_FN_INT_PTR_CONST_STRING, BT_INT, BT_PTR, BT_CONST_STRING) ! DEF_FUNCTION_TYPE_2 (BT_FN_VOID_TRAD_PTR_LEN, ! BT_VOID, BT_TRAD_PTR, BT_LEN) DEF_FUNCTION_TYPE_3 (BT_FN_STRING_STRING_CONST_STRING_SIZE, BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE) DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, BT_INT, BT_CONST_STRING, BT_CONST_STRING, BT_SIZE) ! DEF_FUNCTION_TYPE_3 (BT_FN_TRAD_PTR_PTR_CONST_PTR_SIZE, ! BT_TRAD_PTR, BT_PTR, BT_CONST_PTR, BT_SIZE) DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, BT_INT, BT_CONST_PTR, BT_CONST_PTR, BT_SIZE) ! DEF_FUNCTION_TYPE_3 (BT_FN_TRAD_PTR_PTR_INT_SIZE, ! BT_TRAD_PTR, BT_PTR, BT_INT, BT_SIZE) ! DEF_FUNCTION_TYPE_3 (BT_FN_INT_TRAD_CONST_PTR_TRAD_CONST_PTR_LEN, ! BT_INT, BT_TRAD_CONST_PTR, BT_TRAD_CONST_PTR, BT_LEN) ! DEF_FUNCTION_TYPE_3 (BT_FN_VOID_PTR_INT_INT, BT_VOID, BT_PTR, BT_INT, BT_INT) DEF_FUNCTION_TYPE_4 (BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, BT_SIZE, BT_CONST_PTR, BT_SIZE, BT_SIZE, BT_PTR) DEF_FUNCTION_TYPE_VAR_0 (BT_FN_VOID_VAR, BT_VOID) DEF_FUNCTION_TYPE_VAR_0 (BT_FN_INT_VAR, BT_INT) --- 146,177 ---- BT_LONG, BT_LONG, BT_LONG) DEF_FUNCTION_TYPE_2 (BT_FN_INT_PTR_CONST_STRING, BT_INT, BT_PTR, BT_CONST_STRING) ! DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_SIZE, ! BT_VOID, BT_PTR, BT_SIZE) ! DEF_FUNCTION_TYPE_2 (BT_FN_INT_CONST_STRING_VALIST_ARG, ! BT_INT, BT_CONST_STRING, BT_VALIST_ARG) DEF_FUNCTION_TYPE_3 (BT_FN_STRING_STRING_CONST_STRING_SIZE, BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE) DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, BT_INT, BT_CONST_STRING, BT_CONST_STRING, BT_SIZE) ! DEF_FUNCTION_TYPE_3 (BT_FN_PTR_PTR_CONST_PTR_SIZE, ! BT_PTR, BT_PTR, BT_CONST_PTR, BT_SIZE) DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, BT_INT, BT_CONST_PTR, BT_CONST_PTR, BT_SIZE) ! DEF_FUNCTION_TYPE_3 (BT_FN_PTR_PTR_INT_SIZE, ! BT_PTR, BT_PTR, BT_INT, BT_SIZE) ! DEF_FUNCTION_TYPE_3 (BT_FN_VOID_PTR_INT_INT, ! BT_VOID, BT_PTR, BT_INT, BT_INT) ! DEF_FUNCTION_TYPE_3 (BT_FN_INT_STRING_CONST_STRING_VALIST_ARG, ! BT_INT, BT_STRING, BT_CONST_STRING, BT_VALIST_ARG) ! DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG, ! BT_INT, BT_CONST_STRING, BT_CONST_STRING, BT_VALIST_ARG) DEF_FUNCTION_TYPE_4 (BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, BT_SIZE, BT_CONST_PTR, BT_SIZE, BT_SIZE, BT_PTR) + DEF_FUNCTION_TYPE_4 (BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG, + BT_INT, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_VALIST_ARG) DEF_FUNCTION_TYPE_VAR_0 (BT_FN_VOID_VAR, BT_VOID) DEF_FUNCTION_TYPE_VAR_0 (BT_FN_INT_VAR, BT_INT) *************** DEF_FUNCTION_TYPE_VAR_1 (BT_FN_INT_CONST *** 174,179 **** --- 186,198 ---- DEF_FUNCTION_TYPE_VAR_2 (BT_FN_INT_PTR_CONST_STRING_VAR, BT_INT, BT_PTR, BT_CONST_STRING) + DEF_FUNCTION_TYPE_VAR_2 (BT_FN_INT_STRING_CONST_STRING_VAR, + BT_INT, BT_STRING, BT_CONST_STRING) + DEF_FUNCTION_TYPE_VAR_2 (BT_FN_INT_CONST_STRING_CONST_STRING_VAR, + BT_INT, BT_CONST_STRING, BT_CONST_STRING) + + DEF_FUNCTION_TYPE_VAR_3 (BT_FN_INT_STRING_SIZE_CONST_STRING_VAR, + BT_INT, BT_STRING, BT_SIZE, BT_CONST_STRING) DEF_POINTER_TYPE (BT_PTR_FN_VOID_VAR, BT_FN_VOID_VAR) DEF_FUNCTION_TYPE_3 (BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE, diff -Nrc3pad gcc-3.2.3/gcc/caller-save.c gcc-3.3/gcc/caller-save.c *** gcc-3.2.3/gcc/caller-save.c 2002-01-01 22:22:25.000000000 +0000 --- gcc-3.3/gcc/caller-save.c 2002-06-13 12:24:00.000000000 +0000 *************** init_caller_save () *** 115,120 **** --- 115,123 ---- rtx address; int i, j; enum machine_mode mode; + rtx savepat, restpat; + rtx test_reg, test_mem; + rtx saveinsn, restinsn; /* First find all the registers that we need to deal with and all the modes that they can have. If we can't find a mode to use, *************** init_caller_save () *** 179,200 **** address = addr_reg; /* Next we try to form an insn to save and restore the register. We ! see if such an insn is recognized and meets its constraints. */ ! start_sequence (); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (mode = 0 ; mode < MAX_MACHINE_MODE; mode++) if (HARD_REGNO_MODE_OK (i, mode)) { - rtx mem = gen_rtx_MEM (mode, address); - rtx reg = gen_rtx_REG (mode, i); - rtx savepat = gen_rtx_SET (VOIDmode, mem, reg); - rtx restpat = gen_rtx_SET (VOIDmode, reg, mem); - rtx saveinsn = emit_insn (savepat); - rtx restinsn = emit_insn (restpat); int ok; reg_save_code[i][mode] = recog_memoized (saveinsn); reg_restore_code[i][mode] = recog_memoized (restinsn); --- 182,216 ---- address = addr_reg; /* Next we try to form an insn to save and restore the register. We ! see if such an insn is recognized and meets its constraints. ! To avoid lots of unnecessary RTL allocation, we construct all the RTL ! once, then modify the memory and register operands in-place. */ ! ! test_reg = gen_rtx_REG (VOIDmode, 0); ! test_mem = gen_rtx_MEM (VOIDmode, address); ! savepat = gen_rtx_SET (VOIDmode, test_mem, test_reg); ! restpat = gen_rtx_SET (VOIDmode, test_reg, test_mem); ! ! saveinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, savepat, -1, 0, 0); ! restinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, restpat, -1, 0, 0); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (mode = 0 ; mode < MAX_MACHINE_MODE; mode++) if (HARD_REGNO_MODE_OK (i, mode)) { int ok; + /* Update the register number and modes of the register + and memory operand. */ + REGNO (test_reg) = i; + PUT_MODE (test_reg, mode); + PUT_MODE (test_mem, mode); + + /* Force re-recognition of the modified insns. */ + INSN_CODE (saveinsn) = -1; + INSN_CODE (restinsn) = -1; + reg_save_code[i][mode] = recog_memoized (saveinsn); reg_restore_code[i][mode] = recog_memoized (restinsn); *************** init_caller_save () *** 221,226 **** --- 237,243 ---- reg_save_code[i][mode] = -1; reg_restore_code[i][mode] = -1; } + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (j = 1; j <= MOVE_MAX_WORDS; j++) if (reg_save_code [i][regno_save_mode[i][j]] == -1) *************** init_caller_save () *** 232,239 **** SET_HARD_REG_BIT (call_fixed_reg_set, i); } } - - end_sequence (); } /* Initialize save areas by showing that we haven't allocated any yet. */ --- 249,254 ---- diff -Nrc3pad gcc-3.2.3/gcc/calls.c gcc-3.3/gcc/calls.c *** gcc-3.2.3/gcc/calls.c 2003-01-21 18:12:21.000000000 +0000 --- gcc-3.3/gcc/calls.c 2003-04-22 15:50:54.000000000 +0000 *************** *** 1,6 **** /* Convert function calls to rtl insns, for GNU C compiler. Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 ! 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GCC. --- 1,6 ---- /* Convert function calls to rtl insns, for GNU C compiler. Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 ! 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 33,38 **** --- 33,41 ---- #include "tm_p.h" #include "timevar.h" #include "sbitmap.h" + #include "langhooks.h" + #include "target.h" + #include "except.h" #if !defined FUNCTION_OK_FOR_SIBCALL #define FUNCTION_OK_FOR_SIBCALL(DECL) 1 *************** struct arg_data *** 91,97 **** /* Number of registers to use. 0 means put the whole arg in registers. Also 0 if not passed in registers. */ int partial; ! /* Non-zero if argument must be passed on stack. Note that some arguments may be passed on the stack even though pass_on_stack is zero, just because FUNCTION_ARG says so. pass_on_stack identifies arguments that *cannot* go in registers. */ --- 94,100 ---- /* Number of registers to use. 0 means put the whole arg in registers. Also 0 if not passed in registers. */ int partial; ! /* Nonzero if argument must be passed on stack. Note that some arguments may be passed on the stack even though pass_on_stack is zero, just because FUNCTION_ARG says so. pass_on_stack identifies arguments that *cannot* go in registers. */ *************** struct arg_data *** 126,132 **** struct args_size alignment_pad; }; ! /* A vector of one char per byte of stack space. A byte if non-zero if the corresponding stack location has been used. This vector is used to prevent a function call within an argument from clobbering any stack already set up. */ --- 129,135 ---- struct args_size alignment_pad; }; ! /* A vector of one char per byte of stack space. A byte if nonzero if the corresponding stack location has been used. This vector is used to prevent a function call within an argument from clobbering any stack already set up. */ *************** static int check_sibcall_argument_overla *** 225,230 **** --- 228,234 ---- static int combine_pending_stack_adjustment_and_call PARAMS ((int, struct args_size *, int)); + static tree fix_unsafe_tree PARAMS ((tree)); #ifdef REG_PARM_STACK_SPACE static rtx save_fixed_argument_area PARAMS ((int, rtx, int *, int *)); *************** emit_call_1 (funexp, fndecl, funtype, st *** 614,619 **** --- 618,625 ---- if (ecf_flags & ECF_NOTHROW) REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, const0_rtx, REG_NOTES (call_insn)); + else + note_eh_region_may_contain_throw (); if (ecf_flags & ECF_NORETURN) REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_NORETURN, const0_rtx, *************** setjmp_call_p (fndecl) *** 799,804 **** --- 805,825 ---- return special_function_p (fndecl, 0) & ECF_RETURNS_TWICE; } + /* Return true when exp contains alloca call. */ + bool + alloca_call_p (exp) + tree exp; + { + if (TREE_CODE (exp) == CALL_EXPR + && TREE_CODE (TREE_OPERAND (exp, 0)) == ADDR_EXPR + && (TREE_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)) + == FUNCTION_DECL) + && (special_function_p (TREE_OPERAND (TREE_OPERAND (exp, 0), 0), + 0) & ECF_MAY_BE_ALLOCA)) + return true; + return false; + } + /* Detect flags (function attributes) from the function decl or type node. */ static int *************** precompute_register_parameters (num_actu *** 876,881 **** --- 897,908 ---- emit_queue (); } + /* If the value is a non-legitimate constant, force it into a + pseudo now. TLS symbols sometimes need a call to resolve. */ + if (CONSTANT_P (args[i].value) + && !LEGITIMATE_CONSTANT_P (args[i].value)) + args[i].value = force_reg (args[i].mode, args[i].value); + /* If we are to promote the function arg to a wider mode, do it now. */ *************** save_fixed_argument_area (reg_parm_stack *** 967,977 **** if (save_mode == BLKmode) { save_area = assign_stack_temp (BLKmode, num_to_save, 0); ! /* Cannot use emit_block_move here because it can be done by a ! library call which in turn gets into this place again and deadly ! infinite recursion happens. */ ! move_by_pieces (validize_mem (save_area), stack_area, num_to_save, ! PARM_BOUNDARY); } else { --- 994,1001 ---- if (save_mode == BLKmode) { save_area = assign_stack_temp (BLKmode, num_to_save, 0); ! emit_block_move (validize_mem (save_area), stack_area, ! GEN_INT (num_to_save), BLOCK_OP_CALL_PARM); } else { *************** restore_fixed_argument_area (save_area, *** 1008,1018 **** if (save_mode != BLKmode) emit_move_insn (stack_area, save_area); else ! /* Cannot use emit_block_move here because it can be done by a library ! call which in turn gets into this place again and deadly infinite ! recursion happens. */ ! move_by_pieces (stack_area, validize_mem (save_area), ! high_to_save - low_to_save + 1, PARM_BOUNDARY); } #endif /* REG_PARM_STACK_SPACE */ --- 1032,1040 ---- if (save_mode != BLKmode) emit_move_insn (stack_area, save_area); else ! emit_block_move (stack_area, validize_mem (save_area), ! GEN_INT (high_to_save - low_to_save + 1), ! BLOCK_OP_CALL_PARM); } #endif /* REG_PARM_STACK_SPACE */ *************** store_unaligned_arguments_into_pseudos ( *** 1053,1059 **** this means we must skip the empty high order bytes when calculating the bit offset. */ if (BYTES_BIG_ENDIAN - && !FUNCTION_ARG_REG_LITTLE_ENDIAN && bytes < UNITS_PER_WORD) big_endian_correction = (BITS_PER_WORD - (bytes * BITS_PER_UNIT)); --- 1075,1080 ---- *************** precompute_arguments (flags, num_actuals *** 1539,1546 **** args[i].initial_value = gen_lowpart_SUBREG (mode, args[i].value); SUBREG_PROMOTED_VAR_P (args[i].initial_value) = 1; ! SUBREG_PROMOTED_UNSIGNED_P (args[i].initial_value) ! = args[i].unsignedp; } #endif } --- 1560,1567 ---- args[i].initial_value = gen_lowpart_SUBREG (mode, args[i].value); SUBREG_PROMOTED_VAR_P (args[i].initial_value) = 1; ! SUBREG_PROMOTED_UNSIGNED_SET (args[i].initial_value, ! args[i].unsignedp); } #endif } *************** compute_argument_addresses (args, argblo *** 1645,1650 **** --- 1666,1672 ---- addr = plus_constant (addr, arg_offset); args[i].stack = gen_rtx_MEM (args[i].mode, addr); + set_mem_align (args[i].stack, PARM_BOUNDARY); set_mem_attributes (args[i].stack, TREE_TYPE (args[i].tree_value), 1); *************** compute_argument_addresses (args, argblo *** 1655,1660 **** --- 1677,1683 ---- addr = plus_constant (addr, arg_offset); args[i].stack_slot = gen_rtx_MEM (args[i].mode, addr); + set_mem_align (args[i].stack_slot, PARM_BOUNDARY); set_mem_attributes (args[i].stack_slot, TREE_TYPE (args[i].tree_value), 1); *************** compute_argument_addresses (args, argblo *** 1674,1685 **** FNDECL is the tree node for the target function. For an indirect call FNDECL will be NULL_TREE. ! EXP is the CALL_EXPR for this call. */ static rtx ! rtx_for_function_call (fndecl, exp) tree fndecl; ! tree exp; { rtx funexp; --- 1697,1708 ---- FNDECL is the tree node for the target function. For an indirect call FNDECL will be NULL_TREE. ! ADDR is the operand 0 of CALL_EXPR for this call. */ static rtx ! rtx_for_function_call (fndecl, addr) tree fndecl; ! tree addr; { rtx funexp; *************** rtx_for_function_call (fndecl, exp) *** 1703,1709 **** rtx funaddr; push_temp_slots (); funaddr = funexp ! = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); pop_temp_slots (); /* FUNEXP can't be BLKmode. */ emit_queue (); } --- 1726,1732 ---- rtx funaddr; push_temp_slots (); funaddr = funexp ! = expand_expr (addr, NULL_RTX, VOIDmode, 0); pop_temp_slots (); /* FUNEXP can't be BLKmode. */ emit_queue (); } *************** try_to_integrate (fndecl, actparms, targ *** 1881,1887 **** NULL_RTX, BITS_PER_UNIT); seq = get_insns (); end_sequence (); ! emit_insns_before (seq, first_insn); emit_stack_restore (SAVE_BLOCK, old_stack_level, NULL_RTX); } } --- 1904,1910 ---- NULL_RTX, BITS_PER_UNIT); seq = get_insns (); end_sequence (); ! emit_insn_before (seq, first_insn); emit_stack_restore (SAVE_BLOCK, old_stack_level, NULL_RTX); } } *************** try_to_integrate (fndecl, actparms, targ *** 1904,1910 **** warning_with_decl (fndecl, "inlining failed in call to `%s'"); warning ("called from here"); } ! mark_addressable (fndecl); return (rtx) (size_t) - 1; } --- 1927,1933 ---- warning_with_decl (fndecl, "inlining failed in call to `%s'"); warning ("called from here"); } ! (*lang_hooks.mark_addressable) (fndecl); return (rtx) (size_t) - 1; } *************** combine_pending_stack_adjustment_and_cal *** 1970,1976 **** /* Scan X expression if it does not dereference any argument slots we already clobbered by tail call arguments (as noted in stored_args_map bitmap). ! Return non-zero if X expression dereferences such argument slots, zero otherwise. */ static int --- 1993,1999 ---- /* Scan X expression if it does not dereference any argument slots we already clobbered by tail call arguments (as noted in stored_args_map bitmap). ! Return nonzero if X expression dereferences such argument slots, zero otherwise. */ static int *************** check_sibcall_argument_overlap_1 (x) *** 2033,2039 **** /* Scan sequence after INSN if it does not dereference any argument slots we already clobbered by tail call arguments (as noted in stored_args_map bitmap). Add stack slots for ARG to stored_args_map bitmap afterwards. ! Return non-zero if sequence after INSN dereferences such argument slots, zero otherwise. */ static int --- 2056,2062 ---- /* Scan sequence after INSN if it does not dereference any argument slots we already clobbered by tail call arguments (as noted in stored_args_map bitmap). Add stack slots for ARG to stored_args_map bitmap afterwards. ! Return nonzero if sequence after INSN dereferences such argument slots, zero otherwise. */ static int *************** expand_call (exp, target, ignore) *** 2204,2209 **** --- 2227,2233 ---- int old_stack_allocated; rtx call_fusage; tree p = TREE_OPERAND (exp, 0); + tree addr = TREE_OPERAND (exp, 0); int i; /* The alignment of the stack, in bits. */ HOST_WIDE_INT preferred_stack_boundary; *************** expand_call (exp, target, ignore) *** 2239,2245 **** warning_with_decl (fndecl, "can't inline call to `%s'"); warning ("called from here"); } ! mark_addressable (fndecl); } flags |= flags_from_decl_or_type (fndecl); --- 2263,2269 ---- warning_with_decl (fndecl, "can't inline call to `%s'"); warning ("called from here"); } ! (*lang_hooks.mark_addressable) (fndecl); } flags |= flags_from_decl_or_type (fndecl); *************** expand_call (exp, target, ignore) *** 2285,2291 **** /* In case this is a static function, note that it has been used. */ if (! TREE_ADDRESSABLE (fndecl)) ! mark_addressable (fndecl); is_integrable = 0; } } --- 2309,2315 ---- /* In case this is a static function, note that it has been used. */ if (! TREE_ADDRESSABLE (fndecl)) ! (*lang_hooks.mark_addressable) (fndecl); is_integrable = 0; } } *************** expand_call (exp, target, ignore) *** 2325,2331 **** preferred_stack_boundary = PREFERRED_STACK_BOUNDARY; /* Operand 0 is a pointer-to-function; get the type of the function. */ ! funtype = TREE_TYPE (TREE_OPERAND (exp, 0)); if (! POINTER_TYPE_P (funtype)) abort (); funtype = TREE_TYPE (funtype); --- 2349,2355 ---- preferred_stack_boundary = PREFERRED_STACK_BOUNDARY; /* Operand 0 is a pointer-to-function; get the type of the function. */ ! funtype = TREE_TYPE (addr); if (! POINTER_TYPE_P (funtype)) abort (); funtype = TREE_TYPE (funtype); *************** expand_call (exp, target, ignore) *** 2462,2469 **** /* Tail recursion fails, when we are not dealing with recursive calls. */ if (!try_tail_recursion ! || TREE_CODE (TREE_OPERAND (exp, 0)) != ADDR_EXPR ! || TREE_OPERAND (TREE_OPERAND (exp, 0), 0) != current_function_decl) try_tail_recursion = 0; /* Rest of purposes for tail call optimizations to fail. */ --- 2486,2493 ---- /* Tail recursion fails, when we are not dealing with recursive calls. */ if (!try_tail_recursion ! || TREE_CODE (addr) != ADDR_EXPR ! || TREE_OPERAND (addr, 0) != current_function_decl) try_tail_recursion = 0; /* Rest of purposes for tail call optimizations to fail. */ *************** expand_call (exp, target, ignore) *** 2487,2494 **** reload insns generated to fix things up would appear before the sibcall_epilogue. */ || fndecl == NULL_TREE ! || (flags & (ECF_RETURNS_TWICE | ECF_LONGJMP)) ! || TREE_THIS_VOLATILE (fndecl) || !FUNCTION_OK_FOR_SIBCALL (fndecl) /* If this function requires more stack slots than the current function, we cannot change it into a sibling call. */ --- 2511,2517 ---- reload insns generated to fix things up would appear before the sibcall_epilogue. */ || fndecl == NULL_TREE ! || (flags & (ECF_RETURNS_TWICE | ECF_LONGJMP | ECF_NORETURN)) || !FUNCTION_OK_FOR_SIBCALL (fndecl) /* If this function requires more stack slots than the current function, we cannot change it into a sibling call. */ *************** expand_call (exp, target, ignore) *** 2499,2505 **** != RETURN_POPS_ARGS (current_function_decl, TREE_TYPE (current_function_decl), current_function_args_size)) ! try_tail_call = 0; if (try_tail_call || try_tail_recursion) { --- 2522,2528 ---- != RETURN_POPS_ARGS (current_function_decl, TREE_TYPE (current_function_decl), current_function_args_size)) ! try_tail_call = 0; if (try_tail_call || try_tail_recursion) { *************** expand_call (exp, target, ignore) *** 2544,2550 **** } /* Do the same for the function address if it is an expression. */ if (!fndecl) ! TREE_OPERAND (exp, 0) = fix_unsafe_tree (TREE_OPERAND (exp, 0)); /* Expanding one of those dangerous arguments could have added cleanups, but otherwise give it a whirl. */ if (any_pending_cleanups (1)) --- 2567,2573 ---- } /* Do the same for the function address if it is an expression. */ if (!fndecl) ! addr = fix_unsafe_tree (addr); /* Expanding one of those dangerous arguments could have added cleanups, but otherwise give it a whirl. */ if (any_pending_cleanups (1)) *************** expand_call (exp, target, ignore) *** 2938,2944 **** be deferred during the evaluation of the arguments. */ NO_DEFER_POP; ! funexp = rtx_for_function_call (fndecl, exp); /* Figure out the register where the value, if any, will come back. */ valreg = 0; --- 2961,2967 ---- be deferred during the evaluation of the arguments. */ NO_DEFER_POP; ! funexp = rtx_for_function_call (fndecl, addr); /* Figure out the register where the value, if any, will come back. */ valreg = 0; *************** expand_call (exp, target, ignore) *** 3089,3095 **** { insns = get_insns (); end_sequence (); ! emit_insns (insns); } else { --- 3112,3118 ---- { insns = get_insns (); end_sequence (); ! emit_insn (insns); } else { *************** expand_call (exp, target, ignore) *** 3143,3149 **** /* Write out the sequence. */ insns = get_insns (); end_sequence (); ! emit_insns (insns); valreg = temp; } --- 3166,3172 ---- /* Write out the sequence. */ insns = get_insns (); end_sequence (); ! emit_insn (insns); valreg = temp; } *************** expand_call (exp, target, ignore) *** 3288,3294 **** } target = gen_rtx_SUBREG (TYPE_MODE (type), target, offset); SUBREG_PROMOTED_VAR_P (target) = 1; ! SUBREG_PROMOTED_UNSIGNED_P (target) = unsignedp; } #endif --- 3311,3317 ---- } target = gen_rtx_SUBREG (TYPE_MODE (type), target, offset); SUBREG_PROMOTED_VAR_P (target) = 1; ! SUBREG_PROMOTED_UNSIGNED_SET (target, unsignedp); } #endif *************** expand_call (exp, target, ignore) *** 3327,3335 **** if (save_mode != BLKmode) emit_move_insn (stack_area, args[i].save_area); else ! emit_block_move (stack_area, ! validize_mem (args[i].save_area), ! GEN_INT (args[i].size.constant)); } highest_outgoing_arg_in_use = initial_highest_arg_in_use; --- 3350,3358 ---- if (save_mode != BLKmode) emit_move_insn (stack_area, args[i].save_area); else ! emit_block_move (stack_area, args[i].save_area, ! GEN_INT (args[i].size.constant), ! BLOCK_OP_CALL_PARM); } highest_outgoing_arg_in_use = initial_highest_arg_in_use; *************** expand_call (exp, target, ignore) *** 3430,3436 **** tail_recursion_label)); } else ! emit_insns (normal_call_insns); currently_expanding_call--; --- 3453,3459 ---- tail_recursion_label)); } else ! emit_insn (normal_call_insns); currently_expanding_call--; *************** emit_library_call_value_1 (retval, orgfu *** 3494,3499 **** --- 3517,3523 ---- int reg_parm_stack_space = 0; int needed; rtx before_call; + tree tfom; /* type_for_mode (outmode, 0) */ #ifdef REG_PARM_STACK_SPACE /* Define the boundary of the register parm stack space that needs to be *************** emit_library_call_value_1 (retval, orgfu *** 3555,3581 **** /* If this kind of value comes back in memory, decide where in memory it should come back. */ ! if (outmode != VOIDmode && aggregate_value_p (type_for_mode (outmode, 0))) { #ifdef PCC_STATIC_STRUCT_RETURN ! rtx pointer_reg ! = hard_function_value (build_pointer_type (type_for_mode (outmode, 0)), ! 0, 0); ! mem_value = gen_rtx_MEM (outmode, pointer_reg); ! pcc_struct_value = 1; ! if (value == 0) ! value = gen_reg_rtx (outmode); #else /* not PCC_STATIC_STRUCT_RETURN */ ! struct_value_size = GET_MODE_SIZE (outmode); ! if (value != 0 && GET_CODE (value) == MEM) ! mem_value = value; ! else ! mem_value = assign_temp (type_for_mode (outmode, 0), 0, 1, 1); #endif ! ! /* This call returns a big structure. */ ! flags &= ~(ECF_CONST | ECF_PURE | ECF_LIBCALL_BLOCK); } /* ??? Unfinished: must pass the memory address as an argument. */ --- 3579,3609 ---- /* If this kind of value comes back in memory, decide where in memory it should come back. */ ! if (outmode != VOIDmode) { + tfom = (*lang_hooks.types.type_for_mode) (outmode, 0); + if (aggregate_value_p (tfom)) + { #ifdef PCC_STATIC_STRUCT_RETURN ! rtx pointer_reg ! = hard_function_value (build_pointer_type (tfom), 0, 0); ! mem_value = gen_rtx_MEM (outmode, pointer_reg); ! pcc_struct_value = 1; ! if (value == 0) ! value = gen_reg_rtx (outmode); #else /* not PCC_STATIC_STRUCT_RETURN */ ! struct_value_size = GET_MODE_SIZE (outmode); ! if (value != 0 && GET_CODE (value) == MEM) ! mem_value = value; ! else ! mem_value = assign_temp (tfom, 0, 1, 1); #endif ! /* This call returns a big structure. */ ! flags &= ~(ECF_CONST | ECF_PURE | ECF_LIBCALL_BLOCK); ! } } + else + tfom = void_type_node; /* ??? Unfinished: must pass the memory address as an argument. */ *************** emit_library_call_value_1 (retval, orgfu *** 3684,3689 **** --- 3712,3727 ---- #endif ; + /* loop.c won't look at CALL_INSN_FUNCTION_USAGE of const/pure + functions, so we have to pretend this isn't such a function. */ + if (flags & ECF_LIBCALL_BLOCK) + { + rtx insns = get_insns (); + end_sequence (); + emit_insn (insns); + } + flags &= ~(ECF_CONST | ECF_PURE | ECF_LIBCALL_BLOCK); + /* If this was a CONST function, it is now PURE since it now reads memory. */ if (flags & ECF_CONST) *************** emit_library_call_value_1 (retval, orgfu *** 3696,3707 **** slot = val; else if (must_copy) { ! slot = assign_temp (type_for_mode (mode, 0), 0, 1, 1); emit_move_insn (slot, val); } else { ! tree type = type_for_mode (mode, 0); slot = gen_rtx_MEM (mode, expand_expr (build1 (ADDR_EXPR, --- 3734,3746 ---- slot = val; else if (must_copy) { ! slot = assign_temp ((*lang_hooks.types.type_for_mode) (mode, 0), ! 0, 1, 1); emit_move_insn (slot, val); } else { ! tree type = (*lang_hooks.types.type_for_mode) (mode, 0); slot = gen_rtx_MEM (mode, expand_expr (build1 (ADDR_EXPR, *************** emit_library_call_value_1 (retval, orgfu *** 3911,3918 **** { save_area = assign_stack_temp (BLKmode, num_to_save, 0); set_mem_align (save_area, PARM_BOUNDARY); ! emit_block_move (validize_mem (save_area), stack_area, ! GEN_INT (num_to_save)); } else { --- 3950,3957 ---- { save_area = assign_stack_temp (BLKmode, num_to_save, 0); set_mem_align (save_area, PARM_BOUNDARY); ! emit_block_move (save_area, stack_area, GEN_INT (num_to_save), ! BLOCK_OP_CALL_PARM); } else { *************** emit_library_call_value_1 (retval, orgfu *** 3980,3987 **** } } ! emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0, ! argblock, GEN_INT (argvec[argnum].offset.constant), reg_parm_stack_space, ARGS_SIZE_RTX (alignment_pad)); /* Now mark the segment we just used. */ --- 4019,4027 ---- } } ! emit_push_insn (val, mode, NULL_TREE, NULL_RTX, PARM_BOUNDARY, ! partial, reg, 0, argblock, ! GEN_INT (argvec[argnum].offset.constant), reg_parm_stack_space, ARGS_SIZE_RTX (alignment_pad)); /* Now mark the segment we just used. */ *************** emit_library_call_value_1 (retval, orgfu *** 4068,4075 **** emit_call_1 (fun, get_identifier (XSTR (orgfun, 0)), ! build_function_type (outmode == VOIDmode ? void_type_node ! : type_for_mode (outmode, 0), NULL_TREE), original_args_size.constant, args_size.constant, struct_value_size, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), --- 4108,4114 ---- emit_call_1 (fun, get_identifier (XSTR (orgfun, 0)), ! build_function_type (tfom, NULL_TREE), original_args_size.constant, args_size.constant, struct_value_size, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), *************** emit_library_call_value_1 (retval, orgfu *** 4109,4126 **** { rtx insns; ! if (valreg == 0 || GET_CODE (valreg) == PARALLEL) { insns = get_insns (); end_sequence (); ! emit_insns (insns); } else { rtx note = 0; ! rtx temp = gen_reg_rtx (GET_MODE (valreg)); int i; /* Construct an "equal form" for the value which mentions all the arguments in order as well as the function name. */ for (i = 0; i < nargs; i++) --- 4148,4174 ---- { rtx insns; ! if (valreg == 0) { insns = get_insns (); end_sequence (); ! emit_insn (insns); } else { rtx note = 0; ! rtx temp; int i; + if (GET_CODE (valreg) == PARALLEL) + { + temp = gen_reg_rtx (outmode); + emit_group_store (temp, valreg, outmode); + valreg = temp; + } + + temp = gen_reg_rtx (GET_MODE (valreg)); + /* Construct an "equal form" for the value which mentions all the arguments in order as well as the function name. */ for (i = 0; i < nargs; i++) *************** emit_library_call_value_1 (retval, orgfu *** 4154,4163 **** if (value != mem_value) emit_move_insn (value, mem_value); } else if (value != 0) ! emit_move_insn (value, hard_libcall_value (outmode)); else ! value = hard_libcall_value (outmode); } if (ACCUMULATE_OUTGOING_ARGS) --- 4202,4217 ---- if (value != mem_value) emit_move_insn (value, mem_value); } + else if (GET_CODE (valreg) == PARALLEL) + { + if (value == 0) + value = gen_reg_rtx (outmode); + emit_group_store (value, valreg, outmode); + } else if (value != 0) ! emit_move_insn (value, valreg); else ! value = valreg; } if (ACCUMULATE_OUTGOING_ARGS) *************** emit_library_call_value_1 (retval, orgfu *** 4183,4190 **** if (save_mode != BLKmode) emit_move_insn (stack_area, save_area); else ! emit_block_move (stack_area, validize_mem (save_area), ! GEN_INT (high_to_save - low_to_save + 1)); } #endif --- 4237,4245 ---- if (save_mode != BLKmode) emit_move_insn (stack_area, save_area); else ! emit_block_move (stack_area, save_area, ! GEN_INT (high_to_save - low_to_save + 1), ! BLOCK_OP_CALL_PARM); } #endif *************** emit_library_call_value VPARAMS((rtx org *** 4286,4292 **** FNDECL is the declaration of the function we are calling. ! Return non-zero if this arg should cause sibcall failure, zero otherwise. */ static int --- 4341,4347 ---- FNDECL is the declaration of the function we are calling. ! Return nonzero if this arg should cause sibcall failure, zero otherwise. */ static int *************** store_one_arg (arg, argblock, flags, var *** 4294,4300 **** struct arg_data *arg; rtx argblock; int flags; ! int variable_size; int reg_parm_stack_space; { tree pval = arg->tree_value; --- 4349,4355 ---- struct arg_data *arg; rtx argblock; int flags; ! int variable_size ATTRIBUTE_UNUSED; int reg_parm_stack_space; { tree pval = arg->tree_value; *************** store_one_arg (arg, argblock, flags, var *** 4361,4367 **** arg->save_area = assign_temp (nt, 0, 1, 1); preserve_temp_slots (arg->save_area); emit_block_move (validize_mem (arg->save_area), stack_area, ! expr_size (arg->tree_value)); } else { --- 4416,4423 ---- arg->save_area = assign_temp (nt, 0, 1, 1); preserve_temp_slots (arg->save_area); emit_block_move (validize_mem (arg->save_area), stack_area, ! expr_size (arg->tree_value), ! BLOCK_OP_CALL_PARM); } else { *************** store_one_arg (arg, argblock, flags, var *** 4369,4389 **** emit_move_insn (arg->save_area, stack_area); } } - - /* Now that we have saved any slots that will be overwritten - by this store, mark all slots this store will use. We - must do this before we actually expand the argument since - the expansion itself may trigger library calls which might - need to use the same stack slot. We only do it if we can't - pass all arguments to a library call in registers. */ - if (arg->partial) - { - for (i = lower_bound; i < upper_bound; i++) - stack_usage_map[i] = 1; - - /* Set it so that we don't do it again. */ - variable_size = 1; - } } } --- 4425,4430 ---- *************** store_one_arg (arg, argblock, flags, var *** 4437,4443 **** (partial || TYPE_MODE (TREE_TYPE (pval)) != arg->mode) ? NULL_RTX : arg->stack, ! VOIDmode, 0); /* If we are promoting object (or for any other reason) the mode doesn't agree, convert the mode. */ --- 4478,4484 ---- (partial || TYPE_MODE (TREE_TYPE (pval)) != arg->mode) ? NULL_RTX : arg->stack, ! VOIDmode, EXPAND_STACK_PARM); /* If we are promoting object (or for any other reason) the mode doesn't agree, convert the mode. */ *************** store_one_arg (arg, argblock, flags, var *** 4490,4497 **** /* This isn't already where we want it on the stack, so put it there. This can either be done with push or copy insns. */ ! emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX, 0, ! partial, reg, used - size, argblock, ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space, ARGS_SIZE_RTX (arg->alignment_pad)); --- 4531,4538 ---- /* This isn't already where we want it on the stack, so put it there. This can either be done with push or copy insns. */ ! emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX, ! PARM_BOUNDARY, partial, reg, used - size, argblock, ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space, ARGS_SIZE_RTX (arg->alignment_pad)); *************** store_one_arg (arg, argblock, flags, var *** 4504,4509 **** --- 4545,4551 ---- { /* BLKmode, at least partly to be pushed. */ + unsigned int parm_align; int excess; rtx size_rtx; *************** store_one_arg (arg, argblock, flags, var *** 4529,4534 **** --- 4571,4593 ---- NULL_RTX, TYPE_MODE (sizetype), 0); } + /* Some types will require stricter alignment, which will be + provided for elsewhere in argument layout. */ + parm_align = MAX (PARM_BOUNDARY, TYPE_ALIGN (TREE_TYPE (pval))); + + /* When an argument is padded down, the block is aligned to + PARM_BOUNDARY, but the actual argument isn't. */ + if (FUNCTION_ARG_PADDING (arg->mode, TREE_TYPE (pval)) == downward) + { + if (arg->size.var) + parm_align = BITS_PER_UNIT; + else if (excess) + { + unsigned int excess_align = (excess & -excess) * BITS_PER_UNIT; + parm_align = MIN (parm_align, excess_align); + } + } + if ((flags & ECF_SIBCALL) && GET_CODE (arg->value) == MEM) { /* emit_push_insn might not work properly if arg->value and *************** store_one_arg (arg, argblock, flags, var *** 4562,4603 **** } } - /* Special handling is required if part of the parameter lies in the - register parameter area. The argument may be copied into the stack - slot using memcpy(), but the original contents of the register - parameter area will be restored after the memcpy() call. - - To ensure that the part that lies in the register parameter area - is copied correctly, we emit a separate push for that part. This - push should be small enough to avoid a call to memcpy(). */ - #ifndef STACK_PARMS_IN_REG_PARM_AREA - if (arg->reg && arg->pass_on_stack) - #else - if (1) - #endif - { - if (arg->offset.constant < reg_parm_stack_space && arg->offset.var) - error ("variable offset is passed partially in stack and in reg"); - else if (arg->offset.constant < reg_parm_stack_space && arg->size.var) - error ("variable size is passed partially in stack and in reg"); - else if (arg->offset.constant < reg_parm_stack_space - && ((arg->offset.constant + arg->size.constant) - > reg_parm_stack_space)) - { - rtx size_rtx1 = GEN_INT (reg_parm_stack_space - arg->offset.constant); - emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx1, - TYPE_ALIGN (TREE_TYPE (pval)), partial, reg, - excess, argblock, ARGS_SIZE_RTX (arg->offset), - reg_parm_stack_space, - ARGS_SIZE_RTX (arg->alignment_pad)); - } - } - - emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx, ! TYPE_ALIGN (TREE_TYPE (pval)), partial, reg, excess, ! argblock, ARGS_SIZE_RTX (arg->offset), ! reg_parm_stack_space, ARGS_SIZE_RTX (arg->alignment_pad)); /* Unless this is a partially-in-register argument, the argument is now --- 4621,4629 ---- } } emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx, ! parm_align, partial, reg, excess, argblock, ! ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space, ARGS_SIZE_RTX (arg->alignment_pad)); /* Unless this is a partially-in-register argument, the argument is now *************** store_one_arg (arg, argblock, flags, var *** 4612,4617 **** --- 4638,4644 ---- arg->value = arg->stack_slot; } + /* Mark all slots this store used. */ if (ACCUMULATE_OUTGOING_ARGS && !(flags & ECF_SIBCALL) && argblock && ! variable_size && arg->stack) for (i = lower_bound; i < upper_bound; i++) diff -Nrc3pad gcc-3.2.3/gcc/c-aux-info.c gcc-3.3/gcc/c-aux-info.c *** gcc-3.2.3/gcc/c-aux-info.c 2001-09-24 22:38:22.000000000 +0000 --- gcc-3.3/gcc/c-aux-info.c 2002-09-22 02:03:14.000000000 +0000 *************** gen_formal_list_for_type (fntype, style) *** 188,194 **** /* For the generation of an ANSI prototype for a function definition, we have to look at the formal parameter list of the function's own "type" to determine if the function's formal parameter list should end with an ! ellipsis. Given a tree node, the following function will return non-zero if the "function type" parameter list should end with an ellipsis. */ static int --- 188,194 ---- /* For the generation of an ANSI prototype for a function definition, we have to look at the formal parameter list of the function's own "type" to determine if the function's formal parameter list should end with an ! ellipsis. Given a tree node, the following function will return nonzero if the "function type" parameter list should end with an ellipsis. */ static int *************** gen_type (ret_val, t, style) *** 471,477 **** The given entity may be either a variable or a function. ! If the "is_func_definition" parameter is non-zero, assume that the thing we are generating a declaration for is a FUNCTION_DECL node which is associated with a function definition. In this case, we can assume that an attached list of DECL nodes for function formal arguments is present. */ --- 471,477 ---- The given entity may be either a variable or a function. ! If the "is_func_definition" parameter is nonzero, assume that the thing we are generating a declaration for is a FUNCTION_DECL node which is associated with a function definition. In this case, we can assume that an attached list of DECL nodes for function formal arguments is present. */ diff -Nrc3pad gcc-3.2.3/gcc/c-common.c gcc-3.3/gcc/c-common.c *** gcc-3.2.3/gcc/c-common.c 2002-12-01 18:19:08.000000000 +0000 --- gcc-3.3/gcc/c-common.c 2003-03-09 19:31:11.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 22,27 **** --- 22,28 ---- #include "config.h" #include "system.h" #include "tree.h" + #include "real.h" #include "flags.h" #include "toplev.h" #include "output.h" *************** Software Foundation, 59 Temple Place - S *** 30,46 **** #include "ggc.h" #include "expr.h" #include "c-common.h" - #include "tree-inline.h" #include "diagnostic.h" #include "tm_p.h" #include "obstack.h" - #include "c-lex.h" #include "cpplib.h" #include "target.h" ! cpp_reader *parse_in; /* Declared in c-lex.h. */ ! #undef WCHAR_TYPE_SIZE ! #define WCHAR_TYPE_SIZE TYPE_PRECISION (wchar_type_node) /* We let tm.h override the types used here, to handle trivial differences such as the choice of unsigned int or long unsigned int for size_t. --- 31,46 ---- #include "ggc.h" #include "expr.h" #include "c-common.h" #include "diagnostic.h" #include "tm_p.h" #include "obstack.h" #include "cpplib.h" #include "target.h" ! #include "langhooks.h" ! #include "except.h" /* For USING_SJLJ_EXCEPTIONS. */ ! #include "tree-inline.h" ! cpp_reader *parse_in; /* Declared in c-pragma.h. */ /* We let tm.h override the types used here, to handle trivial differences such as the choice of unsigned int or long unsigned int for size_t. *************** cpp_reader *parse_in; /* Declared in c- *** 56,61 **** --- 56,65 ---- #define WCHAR_TYPE "int" #endif + /* WCHAR_TYPE gets overridden by -fshort-wchar. */ + #define MODIFIED_WCHAR_TYPE \ + (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE) + #ifndef PTRDIFF_TYPE #define PTRDIFF_TYPE "long int" #endif *************** cpp_reader *parse_in; /* Declared in c- *** 80,85 **** --- 84,93 ---- : "long long unsigned int")) #endif + #ifndef REGISTER_PREFIX + #define REGISTER_PREFIX "" + #endif + /* The variant of the C language being processed. */ enum c_language_kind c_language; *************** enum c_language_kind c_language; *** 180,185 **** --- 188,209 ---- tree c_global_trees[CTI_MAX]; + /* Switches common to the C front ends. */ + + /* Nonzero if prepreprocessing only. */ + int flag_preprocess_only; + + /* Nonzero if an ISO standard was selected. It rejects macros in the + user's namespace. */ + int flag_iso; + + /* Nonzero whenever Objective-C functionality is being used. */ + int flag_objc; + + /* Nonzero if -undef was given. It suppresses target built-in macros + and assertions. */ + int flag_undef; + /* Nonzero means don't recognize the non-ANSI builtin functions. */ int flag_no_builtin; *************** int flag_short_double; *** 197,202 **** --- 221,400 ---- int flag_short_wchar; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ + int flag_ms_extensions; + + /* Nonzero means don't recognize the keyword `asm'. */ + + int flag_no_asm; + + /* Nonzero means give string constants the type `const char *', as mandated + by the standard. */ + + int flag_const_strings; + + /* Nonzero means `$' can be in an identifier. */ + + #ifndef DOLLARS_IN_IDENTIFIERS + #define DOLLARS_IN_IDENTIFIERS 1 + #endif + int dollars_in_ident = DOLLARS_IN_IDENTIFIERS; + + /* Nonzero means to treat bitfields as signed unless they say `unsigned'. */ + + int flag_signed_bitfields = 1; + int explicit_flag_signed_bitfields; + + /* Nonzero means warn about pointer casts that can drop a type qualifier + from the pointer target type. */ + + int warn_cast_qual; + + /* Warn about functions which might be candidates for format attributes. */ + + int warn_missing_format_attribute; + + /* Nonzero means warn about sizeof(function) or addition/subtraction + of function pointers. */ + + int warn_pointer_arith; + + /* Nonzero means warn for any global function def + without separate previous prototype decl. */ + + int warn_missing_prototypes; + + /* Warn if adding () is suggested. */ + + int warn_parentheses; + + /* Warn if initializer is not completely bracketed. */ + + int warn_missing_braces; + + /* Warn about comparison of signed and unsigned values. + If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified. */ + + int warn_sign_compare; + + /* Nonzero means warn about usage of long long when `-pedantic'. */ + + int warn_long_long = 1; + + /* Nonzero means warn about deprecated conversion from string constant to + `char *'. */ + + int warn_write_strings; + + /* Nonzero means warn about multiple (redundant) decls for the same single + variable or function. */ + + int warn_redundant_decls; + + /* Warn about testing equality of floating point numbers. */ + + int warn_float_equal; + + /* Warn about a subscript that has type char. */ + + int warn_char_subscripts; + + /* Warn if a type conversion is done that might have confusing results. */ + + int warn_conversion; + + /* Warn about #pragma directives that are not recognized. */ + + int warn_unknown_pragmas; /* Tri state variable. */ + + /* Warn about format/argument anomalies in calls to formatted I/O functions + (*printf, *scanf, strftime, strfmon, etc.). */ + + int warn_format; + + /* Warn about Y2K problems with strftime formats. */ + + int warn_format_y2k; + + /* Warn about excess arguments to formats. */ + + int warn_format_extra_args; + + /* Warn about zero-length formats. */ + + int warn_format_zero_length; + + /* Warn about non-literal format arguments. */ + + int warn_format_nonliteral; + + /* Warn about possible security problems with calls to format functions. */ + + int warn_format_security; + + + /* C/ObjC language option variables. */ + + + /* Nonzero means message about use of implicit function declarations; + 1 means warning; 2 means error. */ + + int mesg_implicit_function_declaration = -1; + + /* Nonzero means allow type mismatches in conditional expressions; + just make their values `void'. */ + + int flag_cond_mismatch; + + /* Nonzero means enable C89 Amendment 1 features. */ + + int flag_isoc94; + + /* Nonzero means use the ISO C99 dialect of C. */ + + int flag_isoc99; + + /* Nonzero means that we have builtin functions, and main is an int */ + + int flag_hosted = 1; + + /* Nonzero means add default format_arg attributes for functions not + in ISO C. */ + + int flag_noniso_default_format_attributes = 1; + + /* Nonzero means warn when casting a function call to a type that does + not match the return type (e.g. (float)sqrt() or (anything*)malloc() + when there is no previous declaration of sqrt or malloc. */ + + int warn_bad_function_cast; + + /* Warn about traditional constructs whose meanings changed in ANSI C. */ + + int warn_traditional; + + /* Nonzero means warn for non-prototype function decls + or non-prototyped defs without previous prototype. */ + + int warn_strict_prototypes; + + /* Nonzero means warn for any global function def + without separate previous decl. */ + + int warn_missing_declarations; + + /* Nonzero means warn about declarations of objects not at + file-scope level and about *all* declarations of functions (whether + or static) not at file-scope level. Note that we exclude + implicit function declarations. To get warnings about those, use + -Wimplicit. */ + + int warn_nested_externs; + + /* Warn if main is suspicious. */ + + int warn_main; + /* Nonzero means warn about possible violations of sequence point rules. */ int warn_sequence_point; *************** int warn_sequence_point; *** 204,209 **** --- 402,655 ---- /* Nonzero means to warn about compile-time division by zero. */ int warn_div_by_zero = 1; + /* Nonzero means warn about use of implicit int. */ + + int warn_implicit_int; + + /* Warn about NULL being passed to argument slots marked as requiring + non-NULL. */ + + int warn_nonnull; + + + /* ObjC language option variables. */ + + + /* Open and close the file for outputting class declarations, if + requested (ObjC). */ + + int flag_gen_declaration; + + /* Generate code for GNU or NeXT runtime environment. */ + + #ifdef NEXT_OBJC_RUNTIME + int flag_next_runtime = 1; + #else + int flag_next_runtime = 0; + #endif + + /* Tells the compiler that this is a special run. Do not perform any + compiling, instead we are to test some platform dependent features + and output a C header file with appropriate definitions. */ + + int print_struct_values; + + /* ???. Undocumented. */ + + const char *constant_string_class_name; + + /* Warn if multiple methods are seen for the same selector, but with + different argument types. Performs the check on the whole selector + table at the end of compilation. */ + + int warn_selector; + + /* Warn if a @selector() is found, and no method with that selector + has been previously declared. The check is done on each + @selector() as soon as it is found - so it warns about forward + declarations. */ + + int warn_undeclared_selector; + + /* Warn if methods required by a protocol are not implemented in the + class adopting it. When turned off, methods inherited to that + class are also considered implemented. */ + + int warn_protocol = 1; + + + /* C++ language option variables. */ + + + /* Nonzero means don't recognize any extension keywords. */ + + int flag_no_gnu_keywords; + + /* Nonzero means do emit exported implementations of functions even if + they can be inlined. */ + + int flag_implement_inlines = 1; + + /* Nonzero means do emit exported implementations of templates, instead of + multiple static copies in each file that needs a definition. */ + + int flag_external_templates; + + /* Nonzero means that the decision to emit or not emit the implementation of a + template depends on where the template is instantiated, rather than where + it is defined. */ + + int flag_alt_external_templates; + + /* Nonzero means that implicit instantiations will be emitted if needed. */ + + int flag_implicit_templates = 1; + + /* Nonzero means that implicit instantiations of inline templates will be + emitted if needed, even if instantiations of non-inline templates + aren't. */ + + int flag_implicit_inline_templates = 1; + + /* Nonzero means generate separate instantiation control files and + juggle them at link time. */ + + int flag_use_repository; + + /* Nonzero if we want to issue diagnostics that the standard says are not + required. */ + + int flag_optional_diags = 1; + + /* Nonzero means we should attempt to elide constructors when possible. */ + + int flag_elide_constructors = 1; + + /* Nonzero means that member functions defined in class scope are + inline by default. */ + + int flag_default_inline = 1; + + /* Controls whether compiler generates 'type descriptor' that give + run-time type information. */ + + int flag_rtti = 1; + + /* Nonzero if we want to conserve space in the .o files. We do this + by putting uninitialized data and runtime initialized data into + .common instead of .data at the expense of not flagging multiple + definitions. */ + + int flag_conserve_space; + + /* Nonzero if we want to obey access control semantics. */ + + int flag_access_control = 1; + + /* Nonzero if we want to check the return value of new and avoid calling + constructors if it is a null pointer. */ + + int flag_check_new; + + /* Nonzero if we want the new ISO rules for pushing a new scope for `for' + initialization variables. + 0: Old rules, set by -fno-for-scope. + 2: New ISO rules, set by -ffor-scope. + 1: Try to implement new ISO rules, but with backup compatibility + (and warnings). This is the default, for now. */ + + int flag_new_for_scope = 1; + + /* Nonzero if we want to emit defined symbols with common-like linkage as + weak symbols where possible, in order to conform to C++ semantics. + Otherwise, emit them as local symbols. */ + + int flag_weak = 1; + + /* Nonzero to use __cxa_atexit, rather than atexit, to register + destructors for local statics and global objects. */ + + int flag_use_cxa_atexit = DEFAULT_USE_CXA_ATEXIT; + + /* Nonzero means output .vtable_{entry,inherit} for use in doing vtable gc. */ + + int flag_vtable_gc; + + /* Nonzero means make the default pedwarns warnings instead of errors. + The value of this flag is ignored if -pedantic is specified. */ + + int flag_permissive; + + /* Nonzero means to implement standard semantics for exception + specifications, calling unexpected if an exception is thrown that + doesn't match the specification. Zero means to treat them as + assertions and optimize accordingly, but not check them. */ + + int flag_enforce_eh_specs = 1; + + /* The version of the C++ ABI in use. The following values are + allowed: + + 0: The version of the ABI believed most conformant with the + C++ ABI specification. This ABI may change as bugs are + discovered and fixed. Therefore, 0 will not necessarily + indicate the same ABI in different versions of G++. + + 1: The version of the ABI first used in G++ 3.2. + + Additional positive integers will be assigned as new versions of + the ABI become the default version of the ABI. */ + + int flag_abi_version = 1; + + /* Nonzero means warn about things that will change when compiling + with an ABI-compliant compiler. */ + + int warn_abi = 0; + + /* Nonzero means warn about implicit declarations. */ + + int warn_implicit = 1; + + /* Nonzero means warn when all ctors or dtors are private, and the class + has no friends. */ + + int warn_ctor_dtor_privacy = 1; + + /* Nonzero means warn in function declared in derived class has the + same name as a virtual in the base class, but fails to match the + type signature of any virtual function in the base class. */ + + int warn_overloaded_virtual; + + /* Nonzero means warn when declaring a class that has a non virtual + destructor, when it really ought to have a virtual one. */ + + int warn_nonvdtor; + + /* Nonzero means warn when the compiler will reorder code. */ + + int warn_reorder; + + /* Nonzero means warn when synthesis behavior differs from Cfront's. */ + + int warn_synth; + + /* Nonzero means warn when we convert a pointer to member function + into a pointer to (void or function). */ + + int warn_pmf2ptr = 1; + + /* Nonzero means warn about violation of some Effective C++ style rules. */ + + int warn_ecpp; + + /* Nonzero means warn where overload resolution chooses a promotion from + unsigned to signed over a conversion to an unsigned of the same size. */ + + int warn_sign_promo; + + /* Nonzero means warn when an old-style cast is used. */ + + int warn_old_style_cast; + + /* Nonzero means warn when non-templatized friend functions are + declared within a template */ + + int warn_nontemplate_friend = 1; + + /* Nonzero means complain about deprecated features. */ + + int warn_deprecated = 1; + + /* Maximum template instantiation depth. This limit is rather + arbitrary, but it exists to limit the time it takes to notice + infinite template instantiations. */ + + int max_tinst_depth = 500; + + + /* The elements of `ridpointers' are identifier nodes for the reserved type names and storage classes. It is indexed by a RID_... value. */ tree *ridpointers; *************** static int if_stack_space = 0; *** 267,272 **** --- 713,877 ---- /* Stack pointer. */ static int if_stack_pointer = 0; + static tree handle_packed_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_nocommon_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_common_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_noreturn_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_noinline_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_always_inline_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_used_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_unused_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_const_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_transparent_union_attribute PARAMS ((tree *, tree, tree, + int, bool *)); + static tree handle_constructor_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_destructor_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_mode_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_section_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_aligned_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_weak_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_alias_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_visibility_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_tls_model_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_no_instrument_function_attribute PARAMS ((tree *, tree, + tree, int, + bool *)); + static tree handle_malloc_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_no_limit_stack_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_pure_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_deprecated_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_vector_size_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_nonnull_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree handle_nothrow_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree vector_size_helper PARAMS ((tree, tree)); + + static void check_function_nonnull PARAMS ((tree, tree)); + static void check_nonnull_arg PARAMS ((void *, tree, + unsigned HOST_WIDE_INT)); + static bool nonnull_check_p PARAMS ((tree, unsigned HOST_WIDE_INT)); + static bool get_nonnull_operand PARAMS ((tree, + unsigned HOST_WIDE_INT *)); + void builtin_define_std PARAMS ((const char *)); + static void builtin_define_with_value PARAMS ((const char *, const char *, + int)); + static void builtin_define_with_int_value PARAMS ((const char *, + HOST_WIDE_INT)); + static void builtin_define_with_hex_fp_value PARAMS ((const char *, tree, + int, const char *, + const char *)); + static void builtin_define_type_max PARAMS ((const char *, tree, int)); + static void builtin_define_type_precision PARAMS ((const char *, tree)); + static void builtin_define_float_constants PARAMS ((const char *, + const char *, tree)); + + /* Table of machine-independent attributes common to all C-like languages. */ + const struct attribute_spec c_common_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ + { "packed", 0, 0, false, false, false, + handle_packed_attribute }, + { "nocommon", 0, 0, true, false, false, + handle_nocommon_attribute }, + { "common", 0, 0, true, false, false, + handle_common_attribute }, + /* FIXME: logically, noreturn attributes should be listed as + "false, true, true" and apply to function types. But implementing this + would require all the places in the compiler that use TREE_THIS_VOLATILE + on a decl to identify non-returning functions to be located and fixed + to check the function type instead. */ + { "noreturn", 0, 0, true, false, false, + handle_noreturn_attribute }, + { "volatile", 0, 0, true, false, false, + handle_noreturn_attribute }, + { "noinline", 0, 0, true, false, false, + handle_noinline_attribute }, + { "always_inline", 0, 0, true, false, false, + handle_always_inline_attribute }, + { "used", 0, 0, true, false, false, + handle_used_attribute }, + { "unused", 0, 0, false, false, false, + handle_unused_attribute }, + /* The same comments as for noreturn attributes apply to const ones. */ + { "const", 0, 0, true, false, false, + handle_const_attribute }, + { "transparent_union", 0, 0, false, false, false, + handle_transparent_union_attribute }, + { "constructor", 0, 0, true, false, false, + handle_constructor_attribute }, + { "destructor", 0, 0, true, false, false, + handle_destructor_attribute }, + { "mode", 1, 1, false, true, false, + handle_mode_attribute }, + { "section", 1, 1, true, false, false, + handle_section_attribute }, + { "aligned", 0, 1, false, false, false, + handle_aligned_attribute }, + { "weak", 0, 0, true, false, false, + handle_weak_attribute }, + { "alias", 1, 1, true, false, false, + handle_alias_attribute }, + { "no_instrument_function", 0, 0, true, false, false, + handle_no_instrument_function_attribute }, + { "malloc", 0, 0, true, false, false, + handle_malloc_attribute }, + { "no_stack_limit", 0, 0, true, false, false, + handle_no_limit_stack_attribute }, + { "pure", 0, 0, true, false, false, + handle_pure_attribute }, + { "deprecated", 0, 0, false, false, false, + handle_deprecated_attribute }, + { "vector_size", 1, 1, false, true, false, + handle_vector_size_attribute }, + { "visibility", 1, 1, true, false, false, + handle_visibility_attribute }, + { "tls_model", 1, 1, true, false, false, + handle_tls_model_attribute }, + { "nonnull", 0, -1, false, true, true, + handle_nonnull_attribute }, + { "nothrow", 0, 0, true, false, false, + handle_nothrow_attribute }, + { "may_alias", 0, 0, false, true, false, NULL }, + { NULL, 0, 0, false, false, false, NULL } + }; + + /* Give the specifications for the format attributes, used by C and all + descendents. */ + + const struct attribute_spec c_common_format_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ + { "format", 3, 3, false, true, true, + handle_format_attribute }, + { "format_arg", 1, 1, false, true, true, + handle_format_arg_attribute }, + { NULL, 0, 0, false, false, false, NULL } + }; + /* Record the start of an if-then, and record the start of it for ambiguous else detection. *************** fname_as_string (pretty_p) *** 483,489 **** if (pretty_p) name = (current_function_decl ! ? (*decl_printable_name) (current_function_decl, 2) : "top level"); else if (current_function_decl && DECL_NAME (current_function_decl)) name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl)); --- 1088,1094 ---- if (pretty_p) name = (current_function_decl ! ? (*lang_hooks.decl_printable_name) (current_function_decl, 2) : "top level"); else if (current_function_decl && DECL_NAME (current_function_decl)) name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl)); *************** fname_decl (rid, id) *** 530,535 **** --- 1135,1147 ---- if (!decl) { tree saved_last_tree = last_tree; + /* If a tree is built here, it would normally have the lineno of + the current statement. Later this tree will be moved to the + beginning of the function and this line number will be wrong. + To avoid this problem set the lineno to 0 here; that prevents + it from appearing in the RTL. */ + int saved_lineno = lineno; + lineno = 0; decl = (*make_fname_decl) (id, fname_vars[ix].pretty); if (last_tree != saved_last_tree) *************** fname_decl (rid, id) *** 545,550 **** --- 1157,1163 ---- saved_function_name_decls); } *fname_vars[ix].decl = decl; + lineno = saved_lineno; } if (!ix && !current_function_decl) pedwarn_with_decl (decl, "`%s' is not defined outside of function scope"); *************** fname_decl (rid, id) *** 552,687 **** return decl; } ! /* Given a chain of STRING_CST nodes, ! concatenate them into one STRING_CST ! and give it a suitable array-of-chars data type. */ tree combine_strings (strings) ! tree strings; { tree value, t; int length = 1; int wide_length = 0; int wide_flag = 0; ! int wchar_bytes = TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT; ! int nchars; ! const int nchars_max = flag_isoc99 ? 4095 : 509; ! if (TREE_CHAIN (strings)) { ! /* More than one in the chain, so concatenate. */ ! char *p, *q; ! /* Don't include the \0 at the end of each substring, ! except for the last one. ! Count wide strings and ordinary strings separately. */ ! for (t = strings; t; t = TREE_CHAIN (t)) { ! if (TREE_TYPE (t) == wchar_array_type_node) ! { ! wide_length += (TREE_STRING_LENGTH (t) - wchar_bytes); ! wide_flag = 1; ! } ! else ! { ! length += (TREE_STRING_LENGTH (t) - 1); ! if (C_ARTIFICIAL_STRING_P (t) && !in_system_header) ! warning ("concatenation of string literals with __FUNCTION__ is deprecated"); ! } } ! /* If anything is wide, the non-wides will be converted, ! which makes them take more space. */ ! if (wide_flag) ! length = length * wchar_bytes + wide_length; ! p = xmalloc (length); ! /* Copy the individual strings into the new combined string. ! If the combined string is wide, convert the chars to ints ! for any individual strings that are not wide. */ ! q = p; ! for (t = strings; t; t = TREE_CHAIN (t)) { ! int len = (TREE_STRING_LENGTH (t) ! - ((TREE_TYPE (t) == wchar_array_type_node) ! ? wchar_bytes : 1)); ! if ((TREE_TYPE (t) == wchar_array_type_node) == wide_flag) { ! memcpy (q, TREE_STRING_POINTER (t), len); ! q += len; } else { ! int i, j; ! for (i = 0; i < len; i++) { ! if (BYTES_BIG_ENDIAN) ! { ! for (j=0; j<(WCHAR_TYPE_SIZE / BITS_PER_UNIT)-1; j++) ! *q++ = 0; ! *q++ = TREE_STRING_POINTER (t)[i]; ! } ! else ! { ! *q++ = TREE_STRING_POINTER (t)[i]; ! for (j=0; j<(WCHAR_TYPE_SIZE / BITS_PER_UNIT)-1; j++) ! *q++ = 0; ! } } } } - if (wide_flag) - { - int i; - for (i = 0; i < wchar_bytes; i++) - *q++ = 0; - } - else - *q = 0; - - value = build_string (length, p); - free (p); } ! else { ! value = strings; ! length = TREE_STRING_LENGTH (value); ! if (TREE_TYPE (value) == wchar_array_type_node) ! wide_flag = 1; } ! /* Compute the number of elements, for the array type. */ ! nchars = wide_flag ? length / wchar_bytes : length; ! ! if (pedantic && nchars - 1 > nchars_max && c_language == clk_c) ! pedwarn ("string length `%d' is greater than the length `%d' ISO C%d compilers are required to support", ! nchars - 1, nchars_max, flag_isoc99 ? 99 : 89); ! /* Create the array type for the string constant. ! -Wwrite-strings says make the string constant an array of const char ! so that copying it to a non-const pointer will get a warning. ! For C++, this is the standard behavior. */ ! if (flag_const_strings ! && (! flag_traditional && ! flag_writable_strings)) ! { ! tree elements ! = build_type_variant (wide_flag ? wchar_type_node : char_type_node, ! 1, 0); ! TREE_TYPE (value) ! = build_array_type (elements, ! build_index_type (build_int_2 (nchars - 1, 0))); ! } else ! TREE_TYPE (value) ! = build_array_type (wide_flag ? wchar_type_node : char_type_node, ! build_index_type (build_int_2 (nchars - 1, 0))); - TREE_CONSTANT (value) = 1; - TREE_READONLY (value) = ! flag_writable_strings; - TREE_STATIC (value) = 1; return value; } --- 1165,1316 ---- return decl; } ! /* Given a STRING_CST, give it a suitable array-of-chars data type. */ ! ! tree ! fix_string_type (value) ! tree value; ! { ! const int wchar_bytes = TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT; ! const int wide_flag = TREE_TYPE (value) == wchar_array_type_node; ! const int nchars_max = flag_isoc99 ? 4095 : 509; ! int length = TREE_STRING_LENGTH (value); ! int nchars; ! ! /* Compute the number of elements, for the array type. */ ! nchars = wide_flag ? length / wchar_bytes : length; ! ! if (pedantic && nchars - 1 > nchars_max && c_language == clk_c) ! pedwarn ("string length `%d' is greater than the length `%d' ISO C%d compilers are required to support", ! nchars - 1, nchars_max, flag_isoc99 ? 99 : 89); ! ! /* Create the array type for the string constant. ! -Wwrite-strings says make the string constant an array of const char ! so that copying it to a non-const pointer will get a warning. ! For C++, this is the standard behavior. */ ! if (flag_const_strings && ! flag_writable_strings) ! { ! tree elements ! = build_type_variant (wide_flag ? wchar_type_node : char_type_node, ! 1, 0); ! TREE_TYPE (value) ! = build_array_type (elements, ! build_index_type (build_int_2 (nchars - 1, 0))); ! } ! else ! TREE_TYPE (value) ! = build_array_type (wide_flag ? wchar_type_node : char_type_node, ! build_index_type (build_int_2 (nchars - 1, 0))); ! ! TREE_CONSTANT (value) = 1; ! TREE_READONLY (value) = ! flag_writable_strings; ! TREE_STATIC (value) = 1; ! return value; ! } ! ! /* Given a VARRAY of STRING_CST nodes, concatenate them into one ! STRING_CST. */ tree combine_strings (strings) ! varray_type strings; { + const int wchar_bytes = TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT; + const int nstrings = VARRAY_ACTIVE_SIZE (strings); tree value, t; int length = 1; int wide_length = 0; int wide_flag = 0; ! int i; ! char *p, *q; ! /* Don't include the \0 at the end of each substring. Count wide ! strings and ordinary strings separately. */ ! for (i = 0; i < nstrings; ++i) { ! t = VARRAY_TREE (strings, i); ! if (TREE_TYPE (t) == wchar_array_type_node) { ! wide_length += TREE_STRING_LENGTH (t) - wchar_bytes; ! wide_flag = 1; } + else + { + length += (TREE_STRING_LENGTH (t) - 1); + if (C_ARTIFICIAL_STRING_P (t) && !in_system_header) + warning ("concatenation of string literals with __FUNCTION__ is deprecated"); + } + } ! /* If anything is wide, the non-wides will be converted, ! which makes them take more space. */ ! if (wide_flag) ! length = length * wchar_bytes + wide_length; ! p = xmalloc (length); ! /* Copy the individual strings into the new combined string. ! If the combined string is wide, convert the chars to ints ! for any individual strings that are not wide. */ ! q = p; ! for (i = 0; i < nstrings; ++i) ! { ! int len, this_wide; ! ! t = VARRAY_TREE (strings, i); ! this_wide = TREE_TYPE (t) == wchar_array_type_node; ! len = TREE_STRING_LENGTH (t) - (this_wide ? wchar_bytes : 1); ! if (this_wide == wide_flag) { ! memcpy (q, TREE_STRING_POINTER (t), len); ! q += len; ! } ! else ! { ! const int nzeros = (TYPE_PRECISION (wchar_type_node) ! / BITS_PER_UNIT) - 1; ! int j, k; ! ! if (BYTES_BIG_ENDIAN) { ! for (k = 0; k < len; k++) ! { ! for (j = 0; j < nzeros; j++) ! *q++ = 0; ! *q++ = TREE_STRING_POINTER (t)[k]; ! } } else { ! for (k = 0; k < len; k++) { ! *q++ = TREE_STRING_POINTER (t)[k]; ! for (j = 0; j < nzeros; j++) ! *q++ = 0; } } } } ! ! /* Nul terminate the string. */ ! if (wide_flag) { ! for (i = 0; i < wchar_bytes; i++) ! *q++ = 0; } + else + *q = 0; ! value = build_string (length, p); ! free (p); ! if (wide_flag) ! TREE_TYPE (value) = wchar_array_type_node; else ! TREE_TYPE (value) = char_array_type_node; return value; } *************** void *** 755,767 **** unsigned_conversion_warning (result, operand) tree result, operand; { if (TREE_CODE (operand) == INTEGER_CST ! && TREE_CODE (TREE_TYPE (result)) == INTEGER_TYPE ! && TREE_UNSIGNED (TREE_TYPE (result)) && skip_evaluation == 0 ! && !int_fits_type_p (operand, TREE_TYPE (result))) { ! if (!int_fits_type_p (operand, signed_type (TREE_TYPE (result)))) /* This detects cases like converting -129 or 256 to unsigned char. */ warning ("large integer implicitly truncated to unsigned type"); else if (warn_conversion) --- 1384,1398 ---- unsigned_conversion_warning (result, operand) tree result, operand; { + tree type = TREE_TYPE (result); + if (TREE_CODE (operand) == INTEGER_CST ! && TREE_CODE (type) == INTEGER_TYPE ! && TREE_UNSIGNED (type) && skip_evaluation == 0 ! && !int_fits_type_p (operand, type)) { ! if (!int_fits_type_p (operand, c_common_signed_type (type))) /* This detects cases like converting -129 or 256 to unsigned char. */ warning ("large integer implicitly truncated to unsigned type"); else if (warn_conversion) *************** convert_and_check (type, expr) *** 810,816 **** don't warn unless pedantic. */ if ((pedantic || TREE_UNSIGNED (type) ! || ! constant_fits_type_p (expr, unsigned_type (type))) && skip_evaluation == 0) warning ("overflow in implicit constant conversion"); } --- 1441,1448 ---- don't warn unless pedantic. */ if ((pedantic || TREE_UNSIGNED (type) ! || ! constant_fits_type_p (expr, ! c_common_unsigned_type (type))) && skip_evaluation == 0) warning ("overflow in implicit constant conversion"); } *************** verify_tree (x, pbefore_sp, pno_sp, writ *** 1212,1218 **** } } ! /* Try to warn for undefined behaviour in EXPR due to missing sequence points. */ static void --- 1844,1850 ---- } } ! /* Try to warn for undefined behavior in EXPR due to missing sequence points. */ static void *************** check_case_value (value) *** 1300,1306 **** that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ tree ! type_for_size (bits, unsignedp) unsigned bits; int unsignedp; { --- 1932,1938 ---- that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ tree ! c_common_type_for_size (bits, unsignedp) unsigned bits; int unsignedp; { *************** type_for_size (bits, unsignedp) *** 1344,1350 **** then UNSIGNEDP selects between signed and unsigned types. */ tree ! type_for_mode (mode, unsignedp) enum machine_mode mode; int unsignedp; { --- 1976,1982 ---- then UNSIGNEDP selects between signed and unsigned types. */ tree ! c_common_type_for_mode (mode, unsignedp) enum machine_mode mode; int unsignedp; { *************** type_for_mode (mode, unsignedp) *** 1399,1439 **** if (mode == TYPE_MODE (build_pointer_type (integer_type_node))) return build_pointer_type (integer_type_node); ! #ifdef VECTOR_MODE_SUPPORTED_P ! if (VECTOR_MODE_SUPPORTED_P (mode)) { ! switch (mode) ! { ! case V16QImode: ! return unsignedp ? unsigned_V16QI_type_node : V16QI_type_node; ! case V8HImode: ! return unsignedp ? unsigned_V8HI_type_node : V8HI_type_node; ! case V4SImode: ! return unsignedp ? unsigned_V4SI_type_node : V4SI_type_node; ! case V2SImode: ! return unsignedp ? unsigned_V2SI_type_node : V2SI_type_node; ! case V4HImode: ! return unsignedp ? unsigned_V4HI_type_node : V4HI_type_node; ! case V8QImode: ! return unsignedp ? unsigned_V8QI_type_node : V8QI_type_node; ! case V16SFmode: ! return V16SF_type_node; ! case V4SFmode: ! return V4SF_type_node; ! case V2SFmode: ! return V2SF_type_node; ! default: ! break; ! } } - #endif return 0; } /* Return an unsigned type the same as TYPE in other respects. */ tree ! unsigned_type (type) tree type; { tree type1 = TYPE_MAIN_VARIANT (type); --- 2031,2074 ---- if (mode == TYPE_MODE (build_pointer_type (integer_type_node))) return build_pointer_type (integer_type_node); ! switch (mode) { ! case V16QImode: ! return unsignedp ? unsigned_V16QI_type_node : V16QI_type_node; ! case V8HImode: ! return unsignedp ? unsigned_V8HI_type_node : V8HI_type_node; ! case V4SImode: ! return unsignedp ? unsigned_V4SI_type_node : V4SI_type_node; ! case V2DImode: ! return unsignedp ? unsigned_V2DI_type_node : V2DI_type_node; ! case V2SImode: ! return unsignedp ? unsigned_V2SI_type_node : V2SI_type_node; ! case V2HImode: ! return unsignedp ? unsigned_V2HI_type_node : V2HI_type_node; ! case V4HImode: ! return unsignedp ? unsigned_V4HI_type_node : V4HI_type_node; ! case V8QImode: ! return unsignedp ? unsigned_V8QI_type_node : V8QI_type_node; ! case V1DImode: ! return unsignedp ? unsigned_V1DI_type_node : V1DI_type_node; ! case V16SFmode: ! return V16SF_type_node; ! case V4SFmode: ! return V4SF_type_node; ! case V2SFmode: ! return V2SF_type_node; ! case V2DFmode: ! return V2DF_type_node; ! default: ! break; } return 0; } /* Return an unsigned type the same as TYPE in other respects. */ tree ! c_common_unsigned_type (type) tree type; { tree type1 = TYPE_MAIN_VARIANT (type); *************** unsigned_type (type) *** 1462,1474 **** if (type1 == intQI_type_node) return unsigned_intQI_type_node; ! return signed_or_unsigned_type (1, type); } /* Return a signed type the same as TYPE in other respects. */ tree ! signed_type (type) tree type; { tree type1 = TYPE_MAIN_VARIANT (type); --- 2097,2109 ---- if (type1 == intQI_type_node) return unsigned_intQI_type_node; ! return c_common_signed_or_unsigned_type (1, type); } /* Return a signed type the same as TYPE in other respects. */ tree ! c_common_signed_type (type) tree type; { tree type1 = TYPE_MAIN_VARIANT (type); *************** signed_type (type) *** 1497,1510 **** if (type1 == unsigned_intQI_type_node) return intQI_type_node; ! return signed_or_unsigned_type (0, type); } /* Return a type the same as TYPE except unsigned or signed according to UNSIGNEDP. */ tree ! signed_or_unsigned_type (unsignedp, type) int unsignedp; tree type; { --- 2132,2145 ---- if (type1 == unsigned_intQI_type_node) return intQI_type_node; ! return c_common_signed_or_unsigned_type (0, type); } /* Return a type the same as TYPE except unsigned or signed according to UNSIGNEDP. */ tree ! c_common_signed_or_unsigned_type (unsignedp, type) int unsignedp; tree type; { *************** min_precision (value, unsignedp) *** 1572,1579 **** return log + 1 + ! unsignedp; } ! /* Print an error message for invalid operands to arith operation CODE. ! NOP_EXPR is used as a special case (see truthvalue_conversion). */ void binary_op_error (code) --- 2207,2215 ---- return log + 1 + ! unsignedp; } ! /* Print an error message for invalid operands to arith operation ! CODE. NOP_EXPR is used as a special case (see ! c_common_truthvalue_conversion). */ void binary_op_error (code) *************** shorten_compare (op0_ptr, op1_ptr, resty *** 1753,1771 **** int unsignedp = TREE_UNSIGNED (*restype_ptr); tree val; ! type = signed_or_unsigned_type (unsignedp0, TREE_TYPE (primop0)); /* If TYPE is an enumeration, then we need to get its min/max values from it's underlying integral type, not the enumerated type itself. */ if (TREE_CODE (type) == ENUMERAL_TYPE) ! type = type_for_size (TYPE_PRECISION (type), unsignedp0); maxval = TYPE_MAX_VALUE (type); minval = TYPE_MIN_VALUE (type); if (unsignedp && !unsignedp0) ! *restype_ptr = signed_type (*restype_ptr); if (TREE_TYPE (primop1) != *restype_ptr) primop1 = convert (*restype_ptr, primop1); --- 2389,2408 ---- int unsignedp = TREE_UNSIGNED (*restype_ptr); tree val; ! type = c_common_signed_or_unsigned_type (unsignedp0, ! TREE_TYPE (primop0)); /* If TYPE is an enumeration, then we need to get its min/max values from it's underlying integral type, not the enumerated type itself. */ if (TREE_CODE (type) == ENUMERAL_TYPE) ! type = c_common_type_for_size (TYPE_PRECISION (type), unsignedp0); maxval = TYPE_MAX_VALUE (type); minval = TYPE_MIN_VALUE (type); if (unsignedp && !unsignedp0) ! *restype_ptr = c_common_signed_type (*restype_ptr); if (TREE_TYPE (primop1) != *restype_ptr) primop1 = convert (*restype_ptr, primop1); *************** shorten_compare (op0_ptr, op1_ptr, resty *** 1862,1883 **** default: break; } ! type = unsigned_type (type); ! } ! ! if (!max_gt && !unsignedp0 && TREE_CODE (primop0) != INTEGER_CST) ! { ! /* This is the case of (char)x >?< 0x80, which people used to use ! expecting old C compilers to change the 0x80 into -0x80. */ ! if (val == boolean_false_node) ! warning ("comparison is always false due to limited range of data type"); ! if (val == boolean_true_node) ! warning ("comparison is always true due to limited range of data type"); } ! if (!min_lt && unsignedp0 && TREE_CODE (primop0) != INTEGER_CST) { - /* This is the case of (unsigned char)x >?< -1 or < 0. */ if (val == boolean_false_node) warning ("comparison is always false due to limited range of data type"); if (val == boolean_true_node) --- 2499,2509 ---- default: break; } ! type = c_common_unsigned_type (type); } ! if (TREE_CODE (primop0) != INTEGER_CST) { if (val == boolean_false_node) warning ("comparison is always false due to limited range of data type"); if (val == boolean_true_node) *************** shorten_compare (op0_ptr, op1_ptr, resty *** 1914,1928 **** && TYPE_PRECISION (TREE_TYPE (primop1)) < TYPE_PRECISION (*restype_ptr)) { type = common_type (TREE_TYPE (primop0), TREE_TYPE (primop1)); ! type = signed_or_unsigned_type (unsignedp0 ! || TREE_UNSIGNED (*restype_ptr), ! type); /* Make sure shorter operand is extended the right way to match the longer operand. */ ! primop0 = convert (signed_or_unsigned_type (unsignedp0, TREE_TYPE (primop0)), ! primop0); ! primop1 = convert (signed_or_unsigned_type (unsignedp1, TREE_TYPE (primop1)), ! primop1); } else { --- 2540,2558 ---- && TYPE_PRECISION (TREE_TYPE (primop1)) < TYPE_PRECISION (*restype_ptr)) { type = common_type (TREE_TYPE (primop0), TREE_TYPE (primop1)); ! type = c_common_signed_or_unsigned_type (unsignedp0 ! || TREE_UNSIGNED (*restype_ptr), ! type); /* Make sure shorter operand is extended the right way to match the longer operand. */ ! primop0 ! = convert (c_common_signed_or_unsigned_type (unsignedp0, ! TREE_TYPE (primop0)), ! primop0); ! primop1 ! = convert (c_common_signed_or_unsigned_type (unsignedp1, ! TREE_TYPE (primop1)), ! primop1); } else { *************** shorten_compare (op0_ptr, op1_ptr, resty *** 1945,1951 **** so suppress the warning. */ if (extra_warnings && !in_system_header && ! (TREE_CODE (primop0) == INTEGER_CST ! && ! TREE_OVERFLOW (convert (signed_type (type), primop0)))) warning ("comparison of unsigned expression >= 0 is always true"); value = boolean_true_node; --- 2575,2581 ---- so suppress the warning. */ if (extra_warnings && !in_system_header && ! (TREE_CODE (primop0) == INTEGER_CST ! && ! TREE_OVERFLOW (convert (c_common_signed_type (type), primop0)))) warning ("comparison of unsigned expression >= 0 is always true"); value = boolean_true_node; *************** shorten_compare (op0_ptr, op1_ptr, resty *** 1954,1960 **** case LT_EXPR: if (extra_warnings && !in_system_header && ! (TREE_CODE (primop0) == INTEGER_CST ! && ! TREE_OVERFLOW (convert (signed_type (type), primop0)))) warning ("comparison of unsigned expression < 0 is always false"); value = boolean_false_node; --- 2584,2590 ---- case LT_EXPR: if (extra_warnings && !in_system_header && ! (TREE_CODE (primop0) == INTEGER_CST ! && ! TREE_OVERFLOW (convert (c_common_signed_type (type), primop0)))) warning ("comparison of unsigned expression < 0 is always false"); value = boolean_false_node; *************** pointer_int_sum (resultcode, ptrop, into *** 2063,2070 **** if (TYPE_PRECISION (TREE_TYPE (intop)) != TYPE_PRECISION (sizetype) || TREE_UNSIGNED (TREE_TYPE (intop)) != TREE_UNSIGNED (sizetype)) ! intop = convert (type_for_size (TYPE_PRECISION (sizetype), ! TREE_UNSIGNED (sizetype)), intop); /* Replace the integer argument with a suitable product by the object size. Do this multiplication as signed, then convert to the appropriate --- 2693,2700 ---- if (TYPE_PRECISION (TREE_TYPE (intop)) != TYPE_PRECISION (sizetype) || TREE_UNSIGNED (TREE_TYPE (intop)) != TREE_UNSIGNED (sizetype)) ! intop = convert (c_common_type_for_size (TYPE_PRECISION (sizetype), ! TREE_UNSIGNED (sizetype)), intop); /* Replace the integer argument with a suitable product by the object size. Do this multiplication as signed, then convert to the appropriate *************** pointer_int_sum (resultcode, ptrop, into *** 2096,2102 **** The resulting type should always be `boolean_type_node'. */ tree ! truthvalue_conversion (expr) tree expr; { if (TREE_CODE (expr) == ERROR_MARK) --- 2726,2732 ---- The resulting type should always be `boolean_type_node'. */ tree ! c_common_truthvalue_conversion (expr) tree expr; { if (TREE_CODE (expr) == ERROR_MARK) *************** truthvalue_conversion (expr) *** 2162,2193 **** case COMPLEX_EXPR: return build_binary_op ((TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1)) ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), ! truthvalue_conversion (TREE_OPERAND (expr, 0)), ! truthvalue_conversion (TREE_OPERAND (expr, 1)), 0); case NEGATE_EXPR: case ABS_EXPR: case FLOAT_EXPR: case FFS_EXPR: ! /* These don't change whether an object is non-zero or zero. */ ! return truthvalue_conversion (TREE_OPERAND (expr, 0)); case LROTATE_EXPR: case RROTATE_EXPR: ! /* These don't change whether an object is zero or non-zero, but we can't ignore them if their second arg has side-effects. */ if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))) return build (COMPOUND_EXPR, boolean_type_node, TREE_OPERAND (expr, 1), ! truthvalue_conversion (TREE_OPERAND (expr, 0))); else ! return truthvalue_conversion (TREE_OPERAND (expr, 0)); case COND_EXPR: /* Distribute the conversion into the arms of a COND_EXPR. */ return fold (build (COND_EXPR, boolean_type_node, TREE_OPERAND (expr, 0), ! truthvalue_conversion (TREE_OPERAND (expr, 1)), ! truthvalue_conversion (TREE_OPERAND (expr, 2)))); case CONVERT_EXPR: /* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE, --- 2792,2823 ---- case COMPLEX_EXPR: return build_binary_op ((TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1)) ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), ! c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)), ! c_common_truthvalue_conversion (TREE_OPERAND (expr, 1)), 0); case NEGATE_EXPR: case ABS_EXPR: case FLOAT_EXPR: case FFS_EXPR: ! /* These don't change whether an object is nonzero or zero. */ ! return c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)); case LROTATE_EXPR: case RROTATE_EXPR: ! /* These don't change whether an object is zero or nonzero, but we can't ignore them if their second arg has side-effects. */ if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))) return build (COMPOUND_EXPR, boolean_type_node, TREE_OPERAND (expr, 1), ! c_common_truthvalue_conversion (TREE_OPERAND (expr, 0))); else ! return c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)); case COND_EXPR: /* Distribute the conversion into the arms of a COND_EXPR. */ return fold (build (COND_EXPR, boolean_type_node, TREE_OPERAND (expr, 0), ! c_common_truthvalue_conversion (TREE_OPERAND (expr, 1)), ! c_common_truthvalue_conversion (TREE_OPERAND (expr, 2)))); case CONVERT_EXPR: /* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE, *************** truthvalue_conversion (expr) *** 2200,2213 **** /* If this is widening the argument, we can ignore it. */ if (TYPE_PRECISION (TREE_TYPE (expr)) >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (expr, 0)))) ! return truthvalue_conversion (TREE_OPERAND (expr, 0)); break; case MINUS_EXPR: ! /* With IEEE arithmetic, x - x may not equal 0, so we can't optimize ! this case. */ ! if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT ! && TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE) break; /* fall through... */ case BIT_XOR_EXPR: --- 2830,2848 ---- /* If this is widening the argument, we can ignore it. */ if (TYPE_PRECISION (TREE_TYPE (expr)) >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (expr, 0)))) ! return c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)); break; case MINUS_EXPR: ! /* Perhaps reduce (x - y) != 0 to (x != y). The expressions ! aren't guaranteed to the be same for modes that can represent ! infinity, since if x and y are both +infinity, or both ! -infinity, then x - y is not a number. ! ! Note that this transformation is safe when x or y is NaN. ! (x - y) is then NaN, and both (x - y) != 0 and x != y will ! be false. */ ! if (HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (TREE_OPERAND (expr, 0))))) break; /* fall through... */ case BIT_XOR_EXPR: *************** truthvalue_conversion (expr) *** 2240,2251 **** if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE) { ! tree tem = save_expr (expr); return (build_binary_op ((TREE_SIDE_EFFECTS (expr) ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), ! truthvalue_conversion (build_unary_op (REALPART_EXPR, tem, 0)), ! truthvalue_conversion (build_unary_op (IMAGPART_EXPR, tem, 0)), 0)); } --- 2875,2886 ---- if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE) { ! tree t = save_expr (expr); return (build_binary_op ((TREE_SIDE_EFFECTS (expr) ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), ! c_common_truthvalue_conversion (build_unary_op (REALPART_EXPR, t, 0)), ! c_common_truthvalue_conversion (build_unary_op (IMAGPART_EXPR, t, 0)), 0)); } *************** truthvalue_conversion (expr) *** 2254,2260 **** static tree builtin_function_2 PARAMS ((const char *, const char *, tree, tree, int, enum built_in_class, int, int, ! int)); /* Make a variant type in the proper way for C/C++, propagating qualifiers down to the element type of an array. */ --- 2889,2895 ---- static tree builtin_function_2 PARAMS ((const char *, const char *, tree, tree, int, enum built_in_class, int, int, ! tree)); /* Make a variant type in the proper way for C/C++, propagating qualifiers down to the element type of an array. */ *************** c_apply_type_quals_to_decl (type_quals, *** 2316,2322 **** } } - /* Return the typed-based alias set for T, which may be an expression or a type. Return -1 if we don't do anything special. */ --- 2951,2956 ---- *************** c_common_get_alias_set (t) *** 2349,2361 **** || t == signed_char_type_node || t == unsigned_char_type_node) return 0; ! /* The C standard specifically allows aliasing between signed and unsigned variants of the same type. We treat the signed variant as canonical. */ if (TREE_CODE (t) == INTEGER_TYPE && TREE_UNSIGNED (t)) { ! tree t1 = signed_type (t); /* t1 == t can happen for boolean nodes which are always unsigned. */ if (t1 != t) --- 2983,2999 ---- || t == signed_char_type_node || t == unsigned_char_type_node) return 0; ! ! /* If it has the may_alias attribute, it can alias anything. */ ! if (lookup_attribute ("may_alias", TYPE_ATTRIBUTES (t))) ! return 0; ! /* The C standard specifically allows aliasing between signed and unsigned variants of the same type. We treat the signed variant as canonical. */ if (TREE_CODE (t) == INTEGER_TYPE && TREE_UNSIGNED (t)) { ! tree t1 = c_common_signed_type (t); /* t1 == t can happen for boolean nodes which are always unsigned. */ if (t1 != t) *************** c_common_get_alias_set (t) *** 2396,2431 **** return -1; } ! /* Implement the __alignof keyword: Return the minimum required ! alignment of TYPE, measured in bytes. */ ! tree ! c_alignof (type) tree type; { ! enum tree_code code = TREE_CODE (type); ! tree t; ! ! /* In C++, sizeof applies to the referent. Handle alignof the same way. */ ! if (code == REFERENCE_TYPE) { ! type = TREE_TYPE (type); ! code = TREE_CODE (type); } - - if (code == FUNCTION_TYPE) - t = size_int (FUNCTION_BOUNDARY / BITS_PER_UNIT); - else if (code == VOID_TYPE || code == ERROR_MARK) - t = size_one_node; else if (!COMPLETE_TYPE_P (type)) { ! error ("__alignof__ applied to an incomplete type"); ! t = size_zero_node; } else ! t = size_int (TYPE_ALIGN (type) / BITS_PER_UNIT); ! return fold (build1 (NOP_EXPR, size_type_node, t)); } /* Implement the __alignof keyword: Return the minimum required --- 3034,3099 ---- return -1; } ! /* Compute the value of 'sizeof (TYPE)' or '__alignof__ (TYPE)', where the ! second parameter indicates which OPERATOR is being applied. The COMPLAIN ! flag controls whether we should diagnose possibly ill-formed ! constructs or not. */ tree ! c_sizeof_or_alignof_type (type, op, complain) tree type; + enum tree_code op; + int complain; { ! const char *op_name; ! tree value = NULL; ! enum tree_code type_code = TREE_CODE (type); ! ! my_friendly_assert (op == SIZEOF_EXPR || op == ALIGNOF_EXPR, 20020720); ! op_name = op == SIZEOF_EXPR ? "sizeof" : "__alignof__"; ! ! if (type_code == FUNCTION_TYPE) { ! if (op == SIZEOF_EXPR) ! { ! if (complain && (pedantic || warn_pointer_arith)) ! pedwarn ("invalid application of `sizeof' to a function type"); ! value = size_one_node; ! } ! else ! value = size_int (FUNCTION_BOUNDARY / BITS_PER_UNIT); ! } ! else if (type_code == VOID_TYPE || type_code == ERROR_MARK) ! { ! if (type_code == VOID_TYPE ! && complain && (pedantic || warn_pointer_arith)) ! pedwarn ("invalid application of `%s' to a void type", op_name); ! value = size_one_node; } else if (!COMPLETE_TYPE_P (type)) { ! if (complain) ! error ("invalid application of `%s' to an incomplete type", op_name); ! value = size_zero_node; } else ! { ! if (op == SIZEOF_EXPR) ! /* Convert in case a char is more than one unit. */ ! value = size_binop (CEIL_DIV_EXPR, TYPE_SIZE_UNIT (type), ! size_int (TYPE_PRECISION (char_type_node) ! / BITS_PER_UNIT)); ! else ! value = size_int (TYPE_ALIGN (type) / BITS_PER_UNIT); ! } ! /* VALUE will have an integer type with TYPE_IS_SIZETYPE set. ! TYPE_IS_SIZETYPE means that certain things (like overflow) will ! never happen. However, this node should really have type ! `size_t', which is just a typedef for an ordinary integer type. */ ! value = fold (build1 (NOP_EXPR, size_type_node, value)); ! my_friendly_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (value)), 20001021); ! ! return value; } /* Implement the __alignof keyword: Return the minimum required *************** c_alignof_expr (expr) *** 2476,2494 **** return fold (build1 (NOP_EXPR, size_type_node, t)); } ! /* Give the specifications for the format attributes, used by C and all ! descendents. */ ! static const struct attribute_spec c_format_attribute_table[] = { ! /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ ! { "format", 3, 3, false, true, true, ! handle_format_attribute }, ! { "format_arg", 1, 1, false, true, true, ! handle_format_arg_attribute }, ! { NULL, 0, 0, false, false, false, NULL } }; /* Build tree nodes and builtin functions common to both C and C++ language frontends. */ --- 3144,3173 ---- return fold (build1 (NOP_EXPR, size_type_node, t)); } ! /* Handle C and C++ default attributes. */ ! enum built_in_attribute { ! #define DEF_ATTR_NULL_TREE(ENUM) ENUM, ! #define DEF_ATTR_INT(ENUM, VALUE) ENUM, ! #define DEF_ATTR_IDENT(ENUM, STRING) ENUM, ! #define DEF_ATTR_TREE_LIST(ENUM, PURPOSE, VALUE, CHAIN) ENUM, ! #define DEF_FN_ATTR(NAME, ATTRS, PREDICATE) /* No entry needed in enum. */ ! #include "builtin-attrs.def" ! #undef DEF_ATTR_NULL_TREE ! #undef DEF_ATTR_INT ! #undef DEF_ATTR_IDENT ! #undef DEF_ATTR_TREE_LIST ! #undef DEF_FN_ATTR ! ATTR_LAST }; + static GTY(()) tree built_in_attributes[(int) ATTR_LAST]; + + static bool c_attrs_initialized = false; + + static void c_init_attributes PARAMS ((void)); + /* Build tree nodes and builtin functions common to both C and C++ language frontends. */ *************** c_common_nodes_and_builtins () *** 2506,2511 **** --- 3185,3191 ---- #define DEF_FUNCTION_TYPE_VAR_0(NAME, RETURN) NAME, #define DEF_FUNCTION_TYPE_VAR_1(NAME, RETURN, ARG1) NAME, #define DEF_FUNCTION_TYPE_VAR_2(NAME, RETURN, ARG1, ARG2) NAME, + #define DEF_FUNCTION_TYPE_VAR_3(NAME, RETURN, ARG1, ARG2, ARG3) NAME, #define DEF_POINTER_TYPE(NAME, TYPE) NAME, #include "builtin-types.def" #undef DEF_PRIMITIVE_TYPE *************** c_common_nodes_and_builtins () *** 2517,2522 **** --- 3197,3203 ---- #undef DEF_FUNCTION_TYPE_VAR_0 #undef DEF_FUNCTION_TYPE_VAR_1 #undef DEF_FUNCTION_TYPE_VAR_2 + #undef DEF_FUNCTION_TYPE_VAR_3 #undef DEF_POINTER_TYPE BT_LAST }; *************** c_common_nodes_and_builtins () *** 2526,2543 **** tree builtin_types[(int) BT_LAST]; int wchar_type_size; tree array_domain_type; - /* Either char* or void*. */ - tree traditional_ptr_type_node; - /* Either const char* or const void*. */ - tree traditional_cptr_type_node; - tree traditional_len_type_node; tree va_list_ref_type_node; tree va_list_arg_type_node; - /* We must initialize this before any builtin functions (which might have - attributes) are declared. (c_common_init is too late.) */ - format_attribute_table = c_format_attribute_table; - /* Define `int' and `char' first so that dbx will output them first. */ record_builtin_type (RID_INT, NULL, integer_type_node); record_builtin_type (RID_CHAR, "char", char_type_node); --- 3207,3215 ---- *************** c_common_nodes_and_builtins () *** 2571,2611 **** record_builtin_type (RID_MAX, "signed char", signed_char_type_node); record_builtin_type (RID_MAX, "unsigned char", unsigned_char_type_node); ! /* These are types that type_for_size and type_for_mode use. */ ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, intQI_type_node)); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, intHI_type_node)); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, intSI_type_node)); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, intDI_type_node)); #if HOST_BITS_PER_WIDE_INT >= 64 ! pushdecl (build_decl (TYPE_DECL, get_identifier ("__int128_t"), intTI_type_node)); #endif ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intQI_type_node)); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intHI_type_node)); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intSI_type_node)); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intDI_type_node)); #if HOST_BITS_PER_WIDE_INT >= 64 ! pushdecl (build_decl (TYPE_DECL, get_identifier ("__uint128_t"), unsigned_intTI_type_node)); #endif /* Create the widest literal types. */ widest_integer_literal_type_node = make_signed_type (HOST_BITS_PER_WIDE_INT * 2); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, ! widest_integer_literal_type_node)); widest_unsigned_literal_type_node = make_unsigned_type (HOST_BITS_PER_WIDE_INT * 2); ! pushdecl (build_decl (TYPE_DECL, NULL_TREE, ! widest_unsigned_literal_type_node)); /* `unsigned long' is the standard type for sizeof. Note that stddef.h uses `unsigned long', and this must agree, even if long and int are the same size. */ size_type_node = TREE_TYPE (identifier_global_value (get_identifier (SIZE_TYPE))); ! signed_size_type_node = signed_type (size_type_node); ! if (flag_traditional) ! size_type_node = signed_size_type_node; set_sizetype (size_type_node); build_common_tree_nodes_2 (flag_short_double); --- 3243,3294 ---- record_builtin_type (RID_MAX, "signed char", signed_char_type_node); record_builtin_type (RID_MAX, "unsigned char", unsigned_char_type_node); ! /* These are types that c_common_type_for_size and ! c_common_type_for_mode use. */ ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! intQI_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! intHI_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! intSI_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! intDI_type_node)); #if HOST_BITS_PER_WIDE_INT >= 64 ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("__int128_t"), ! intTI_type_node)); #endif ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! unsigned_intQI_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! unsigned_intHI_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! unsigned_intSI_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! unsigned_intDI_type_node)); #if HOST_BITS_PER_WIDE_INT >= 64 ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("__uint128_t"), ! unsigned_intTI_type_node)); #endif /* Create the widest literal types. */ widest_integer_literal_type_node = make_signed_type (HOST_BITS_PER_WIDE_INT * 2); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! widest_integer_literal_type_node)); widest_unsigned_literal_type_node = make_unsigned_type (HOST_BITS_PER_WIDE_INT * 2); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE, ! widest_unsigned_literal_type_node)); /* `unsigned long' is the standard type for sizeof. Note that stddef.h uses `unsigned long', and this must agree, even if long and int are the same size. */ size_type_node = TREE_TYPE (identifier_global_value (get_identifier (SIZE_TYPE))); ! signed_size_type_node = c_common_signed_type (size_type_node); set_sizetype (size_type_node); build_common_tree_nodes_2 (flag_short_double); *************** c_common_nodes_and_builtins () *** 2614,2627 **** record_builtin_type (RID_DOUBLE, NULL, double_type_node); record_builtin_type (RID_MAX, "long double", long_double_type_node); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("complex int"), ! complex_integer_type_node)); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("complex float"), ! complex_float_type_node)); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("complex double"), ! complex_double_type_node)); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("complex long double"), ! complex_long_double_type_node)); /* Types which are common to the fortran compiler and libf2c. When changing these, you also need to be concerned with f/com.h. */ --- 3297,3314 ---- record_builtin_type (RID_DOUBLE, NULL, double_type_node); record_builtin_type (RID_MAX, "long double", long_double_type_node); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("complex int"), ! complex_integer_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("complex float"), ! complex_float_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("complex double"), ! complex_double_type_node)); ! (*lang_hooks.decls.pushdecl) ! (build_decl (TYPE_DECL, get_identifier ("complex long double"), ! complex_long_double_type_node)); /* Types which are common to the fortran compiler and libf2c. When changing these, you also need to be concerned with f/com.h. */ *************** c_common_nodes_and_builtins () *** 2643,2654 **** if (g77_integer_type_node != NULL_TREE) { ! pushdecl (build_decl (TYPE_DECL, ! get_identifier ("__g77_integer"), ! g77_integer_type_node)); ! pushdecl (build_decl (TYPE_DECL, ! get_identifier ("__g77_uinteger"), ! g77_uinteger_type_node)); } if (TYPE_PRECISION (float_type_node) * 2 --- 3330,3341 ---- if (g77_integer_type_node != NULL_TREE) { ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("__g77_integer"), ! g77_integer_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("__g77_uinteger"), ! g77_uinteger_type_node)); } if (TYPE_PRECISION (float_type_node) * 2 *************** c_common_nodes_and_builtins () *** 2668,2679 **** if (g77_longint_type_node != NULL_TREE) { ! pushdecl (build_decl (TYPE_DECL, ! get_identifier ("__g77_longint"), ! g77_longint_type_node)); ! pushdecl (build_decl (TYPE_DECL, ! get_identifier ("__g77_ulongint"), ! g77_ulongint_type_node)); } record_builtin_type (RID_VOID, NULL, void_type_node); --- 3355,3366 ---- if (g77_longint_type_node != NULL_TREE) { ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("__g77_longint"), ! g77_longint_type_node)); ! (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, ! get_identifier ("__g77_ulongint"), ! g77_ulongint_type_node)); } record_builtin_type (RID_VOID, NULL, void_type_node); *************** c_common_nodes_and_builtins () *** 2705,2723 **** = build_pointer_type (build_qualified_type (char_type_node, TYPE_QUAL_CONST)); - traditional_ptr_type_node = ((flag_traditional && - c_language != clk_cplusplus) - ? string_type_node : ptr_type_node); - traditional_cptr_type_node = ((flag_traditional && - c_language != clk_cplusplus) - ? const_string_type_node : const_ptr_type_node); - - (*targetm.init_builtins) (); - /* This is special for C++ so functions can be overloaded. */ ! wchar_type_node = get_identifier (flag_short_wchar ! ? "short unsigned int" ! : WCHAR_TYPE); wchar_type_node = TREE_TYPE (identifier_global_value (wchar_type_node)); wchar_type_size = TYPE_PRECISION (wchar_type_node); if (c_language == clk_cplusplus) --- 3392,3399 ---- = build_pointer_type (build_qualified_type (char_type_node, TYPE_QUAL_CONST)); /* This is special for C++ so functions can be overloaded. */ ! wchar_type_node = get_identifier (MODIFIED_WCHAR_TYPE); wchar_type_node = TREE_TYPE (identifier_global_value (wchar_type_node)); wchar_type_size = TYPE_PRECISION (wchar_type_node); if (c_language == clk_cplusplus) *************** c_common_nodes_and_builtins () *** 2730,2737 **** } else { ! signed_wchar_type_node = signed_type (wchar_type_node); ! unsigned_wchar_type_node = unsigned_type (wchar_type_node); } /* This is for wide string constants. */ --- 3406,3413 ---- } else { ! signed_wchar_type_node = c_common_signed_type (wchar_type_node); ! unsigned_wchar_type_node = c_common_unsigned_type (wchar_type_node); } /* This is for wide string constants. */ *************** c_common_nodes_and_builtins () *** 2749,2764 **** default_function_type = build_function_type (integer_type_node, NULL_TREE); ptrdiff_type_node = TREE_TYPE (identifier_global_value (get_identifier (PTRDIFF_TYPE))); ! unsigned_ptrdiff_type_node = unsigned_type (ptrdiff_type_node); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("__builtin_va_list"), ! va_list_type_node)); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("__builtin_ptrdiff_t"), ! ptrdiff_type_node)); ! pushdecl (build_decl (TYPE_DECL, get_identifier ("__builtin_size_t"), ! sizetype)); if (TREE_CODE (va_list_type_node) == ARRAY_TYPE) { --- 3425,3443 ---- default_function_type = build_function_type (integer_type_node, NULL_TREE); ptrdiff_type_node = TREE_TYPE (identifier_global_value (get_identifier (PTRDIFF_TYPE))); ! unsigned_ptrdiff_type_node = c_common_unsigned_type (ptrdiff_type_node); ! (*lang_hooks.decls.pushdecl) ! (build_decl (TYPE_DECL, get_identifier ("__builtin_va_list"), ! va_list_type_node)); ! (*lang_hooks.decls.pushdecl) ! (build_decl (TYPE_DECL, get_identifier ("__builtin_ptrdiff_t"), ! ptrdiff_type_node)); ! (*lang_hooks.decls.pushdecl) ! (build_decl (TYPE_DECL, get_identifier ("__builtin_size_t"), ! sizetype)); if (TREE_CODE (va_list_type_node) == ARRAY_TYPE) { *************** c_common_nodes_and_builtins () *** 2771,2780 **** va_list_ref_type_node = build_reference_type (va_list_type_node); } - traditional_len_type_node = ((flag_traditional && - c_language != clk_cplusplus) - ? integer_type_node : sizetype); - #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \ builtin_types[(int) ENUM] = VALUE; #define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ --- 3450,3455 ---- *************** c_common_nodes_and_builtins () *** 2840,2845 **** --- 3515,3533 ---- tree_cons (NULL_TREE, \ builtin_types[(int) ARG2], \ NULL_TREE))); + + #define DEF_FUNCTION_TYPE_VAR_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ + builtin_types[(int) ENUM] \ + = build_function_type \ + (builtin_types[(int) RETURN], \ + tree_cons (NULL_TREE, \ + builtin_types[(int) ARG1], \ + tree_cons (NULL_TREE, \ + builtin_types[(int) ARG2], \ + tree_cons (NULL_TREE, \ + builtin_types[(int) ARG3], \ + NULL_TREE)))); + #define DEF_POINTER_TYPE(ENUM, TYPE) \ builtin_types[(int) ENUM] \ = build_pointer_type (builtin_types[(int) TYPE]); *************** c_common_nodes_and_builtins () *** 2851,2860 **** #undef DEF_FUNCTION_TYPE_4 #undef DEF_FUNCTION_TYPE_VAR_0 #undef DEF_FUNCTION_TYPE_VAR_1 #undef DEF_POINTER_TYPE ! #define DEF_BUILTIN(ENUM, NAME, CLASS, \ ! TYPE, LIBTYPE, BOTH_P, FALLBACK_P, NONANSI_P) \ if (NAME) \ { \ tree decl; \ --- 3539,3553 ---- #undef DEF_FUNCTION_TYPE_4 #undef DEF_FUNCTION_TYPE_VAR_0 #undef DEF_FUNCTION_TYPE_VAR_1 + #undef DEF_FUNCTION_TYPE_VAR_2 + #undef DEF_FUNCTION_TYPE_VAR_3 #undef DEF_POINTER_TYPE ! if (!c_attrs_initialized) ! c_init_attributes (); ! ! #define DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, \ ! BOTH_P, FALLBACK_P, NONANSI_P, ATTRS) \ if (NAME) \ { \ tree decl; \ *************** c_common_nodes_and_builtins () *** 2867,2873 **** CLASS, \ (FALLBACK_P \ ? (NAME + strlen ("__builtin_")) \ ! : NULL)); \ else \ decl = builtin_function_2 (NAME, \ NAME + strlen ("__builtin_"), \ --- 3560,3567 ---- CLASS, \ (FALLBACK_P \ ? (NAME + strlen ("__builtin_")) \ ! : NULL), \ ! built_in_attributes[(int) ATTRS]); \ else \ decl = builtin_function_2 (NAME, \ NAME + strlen ("__builtin_"), \ *************** c_common_nodes_and_builtins () *** 2877,2916 **** CLASS, \ FALLBACK_P, \ NONANSI_P, \ ! /*noreturn_p=*/0); \ \ built_in_decls[(int) ENUM] = decl; \ } #include "builtins.def" #undef DEF_BUILTIN ! /* Declare _exit and _Exit just to mark them as non-returning. */ ! builtin_function_2 (NULL, "_exit", NULL_TREE, ! builtin_types[BT_FN_VOID_INT], ! 0, NOT_BUILT_IN, 0, 1, 1); ! builtin_function_2 (NULL, "_Exit", NULL_TREE, ! builtin_types[BT_FN_VOID_INT], ! 0, NOT_BUILT_IN, 0, !flag_isoc99, 1); ! ! /* Declare these functions non-returning ! to avoid spurious "control drops through" warnings. */ ! builtin_function_2 (NULL, "abort", ! NULL_TREE, ((c_language == clk_cplusplus) ! ? builtin_types[BT_FN_VOID] ! : builtin_types[BT_FN_VOID_VAR]), ! 0, NOT_BUILT_IN, 0, 0, 1); ! ! builtin_function_2 (NULL, "exit", ! NULL_TREE, ((c_language == clk_cplusplus) ! ? builtin_types[BT_FN_VOID_INT] ! : builtin_types[BT_FN_VOID_VAR]), ! 0, NOT_BUILT_IN, 0, 0, 1); main_identifier_node = get_identifier ("main"); - - /* ??? Perhaps there's a better place to do this. But it is related - to __builtin_va_arg, so it isn't that off-the-wall. */ - lang_type_promotes_to = simple_type_promotes_to; } tree --- 3571,3586 ---- CLASS, \ FALLBACK_P, \ NONANSI_P, \ ! built_in_attributes[(int) ATTRS]); \ \ built_in_decls[(int) ENUM] = decl; \ } #include "builtins.def" #undef DEF_BUILTIN ! (*targetm.init_builtins) (); main_identifier_node = get_identifier ("main"); } tree *************** builtin_function_disabled_p (name) *** 2977,2991 **** conflicts with headers. FUNCTION_CODE and CLASS are as for builtin_function. If LIBRARY_NAME_P is nonzero, NAME is passed as the LIBRARY_NAME parameter to builtin_function when declaring BUILTIN_NAME. ! If NONANSI_P is nonzero, the name NAME is treated as a non-ANSI name; if ! NORETURN_P is nonzero, the function is marked as non-returning. Returns the declaration of BUILTIN_NAME, if any, otherwise the declaration of NAME. Does not declare NAME if flag_no_builtin, or if NONANSI_P and flag_no_nonansi_builtin. */ static tree builtin_function_2 (builtin_name, name, builtin_type, type, function_code, ! class, library_name_p, nonansi_p, noreturn_p) const char *builtin_name; const char *name; tree builtin_type; --- 3647,3661 ---- conflicts with headers. FUNCTION_CODE and CLASS are as for builtin_function. If LIBRARY_NAME_P is nonzero, NAME is passed as the LIBRARY_NAME parameter to builtin_function when declaring BUILTIN_NAME. ! If NONANSI_P is nonzero, the name NAME is treated as a non-ANSI name; ! ATTRS is the tree list representing the builtin's function attributes. Returns the declaration of BUILTIN_NAME, if any, otherwise the declaration of NAME. Does not declare NAME if flag_no_builtin, or if NONANSI_P and flag_no_nonansi_builtin. */ static tree builtin_function_2 (builtin_name, name, builtin_type, type, function_code, ! class, library_name_p, nonansi_p, attrs) const char *builtin_name; const char *name; tree builtin_type; *************** builtin_function_2 (builtin_name, name, *** 2994,3024 **** enum built_in_class class; int library_name_p; int nonansi_p; ! int noreturn_p; { tree bdecl = NULL_TREE; tree decl = NULL_TREE; if (builtin_name != 0) { bdecl = builtin_function (builtin_name, builtin_type, function_code, ! class, library_name_p ? name : NULL); ! if (noreturn_p) ! { ! TREE_THIS_VOLATILE (bdecl) = 1; ! TREE_SIDE_EFFECTS (bdecl) = 1; ! } } if (name != 0 && !flag_no_builtin && !builtin_function_disabled_p (name) && !(nonansi_p && flag_no_nonansi_builtin)) { ! decl = builtin_function (name, type, function_code, class, NULL); if (nonansi_p) DECL_BUILT_IN_NONANSI (decl) = 1; - if (noreturn_p) - { - TREE_THIS_VOLATILE (decl) = 1; - TREE_SIDE_EFFECTS (decl) = 1; - } } return (bdecl != 0 ? bdecl : decl); } --- 3664,3686 ---- enum built_in_class class; int library_name_p; int nonansi_p; ! tree attrs; { tree bdecl = NULL_TREE; tree decl = NULL_TREE; if (builtin_name != 0) { bdecl = builtin_function (builtin_name, builtin_type, function_code, ! class, library_name_p ? name : NULL, ! attrs); } if (name != 0 && !flag_no_builtin && !builtin_function_disabled_p (name) && !(nonansi_p && flag_no_nonansi_builtin)) { ! decl = builtin_function (name, type, function_code, class, NULL, ! attrs); if (nonansi_p) DECL_BUILT_IN_NONANSI (decl) = 1; } return (bdecl != 0 ? bdecl : decl); } *************** c_promoting_integer_type_p (t) *** 3054,3087 **** } } - /* Given a type, apply default promotions wrt unnamed function arguments - and return the new type. Return NULL_TREE if no change. */ - /* ??? There is a function of the same name in the C++ front end that - does something similar, but is more thorough and does not return NULL - if no change. We could perhaps share code, but it would make the - self_promoting_type property harder to identify. */ - - tree - simple_type_promotes_to (type) - tree type; - { - if (TYPE_MAIN_VARIANT (type) == float_type_node) - return double_type_node; - - if (c_promoting_integer_type_p (type)) - { - /* Traditionally, unsignedness is preserved in default promotions. - Also preserve unsignedness if not really getting any wider. */ - if (TREE_UNSIGNED (type) - && (flag_traditional - || TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))) - return unsigned_type_node; - return integer_type_node; - } - - return NULL_TREE; - } - /* Return 1 if PARMS specifies a fixed number of parameters and none of their types is affected by default promotions. */ --- 3716,3721 ---- *************** strip_array_types (type) *** 3122,3127 **** --- 3756,3836 ---- return type; } + static tree expand_unordered_cmp PARAMS ((tree, tree, enum tree_code, + enum tree_code)); + + /* Expand a call to an unordered comparison function such as + __builtin_isgreater(). FUNCTION is the function's declaration and + PARAMS a list of the values passed. For __builtin_isunordered(), + UNORDERED_CODE is UNORDERED_EXPR and ORDERED_CODE is NOP_EXPR. In + other cases, UNORDERED_CODE and ORDERED_CODE are comparison codes + that give the opposite of the desired result. UNORDERED_CODE is + used for modes that can hold NaNs and ORDERED_CODE is used for the + rest. */ + + static tree + expand_unordered_cmp (function, params, unordered_code, ordered_code) + tree function, params; + enum tree_code unordered_code, ordered_code; + { + tree arg0, arg1, type; + enum tree_code code0, code1; + + /* Check that we have exactly two arguments. */ + if (params == 0 || TREE_CHAIN (params) == 0) + { + error ("too few arguments to function `%s'", + IDENTIFIER_POINTER (DECL_NAME (function))); + return error_mark_node; + } + else if (TREE_CHAIN (TREE_CHAIN (params)) != 0) + { + error ("too many arguments to function `%s'", + IDENTIFIER_POINTER (DECL_NAME (function))); + return error_mark_node; + } + + arg0 = TREE_VALUE (params); + arg1 = TREE_VALUE (TREE_CHAIN (params)); + + code0 = TREE_CODE (TREE_TYPE (arg0)); + code1 = TREE_CODE (TREE_TYPE (arg1)); + + /* Make sure that the arguments have a common type of REAL. */ + type = 0; + if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE) + && (code1 == INTEGER_TYPE || code1 == REAL_TYPE)) + type = common_type (TREE_TYPE (arg0), TREE_TYPE (arg1)); + + if (type == 0 || TREE_CODE (type) != REAL_TYPE) + { + error ("non-floating-point argument to function `%s'", + IDENTIFIER_POINTER (DECL_NAME (function))); + return error_mark_node; + } + + if (unordered_code == UNORDERED_EXPR) + { + if (MODE_HAS_NANS (TYPE_MODE (type))) + return build_binary_op (unordered_code, + convert (type, arg0), + convert (type, arg1), + 0); + else + return integer_zero_node; + } + + return build_unary_op (TRUTH_NOT_EXPR, + build_binary_op (MODE_HAS_NANS (TYPE_MODE (type)) + ? unordered_code + : ordered_code, + convert (type, arg0), + convert (type, arg1), + 0), + 0); + } + + /* Recognize certain built-in functions so we can make tree-codes other than CALL_EXPR. We do this when it enables fold-const.c to do something useful. */ *************** tree *** 3134,3141 **** expand_tree_builtin (function, params, coerced_params) tree function, params, coerced_params; { - enum tree_code code; - if (DECL_BUILT_IN_CLASS (function) != BUILT_IN_NORMAL) return NULL_TREE; --- 3843,3848 ---- *************** expand_tree_builtin (function, params, c *** 3174,3245 **** return build_unary_op (IMAGPART_EXPR, TREE_VALUE (coerced_params), 0); case BUILT_IN_ISGREATER: ! if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) ! code = UNLE_EXPR; ! else ! code = LE_EXPR; ! goto unordered_cmp; case BUILT_IN_ISGREATEREQUAL: ! if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) ! code = UNLT_EXPR; ! else ! code = LT_EXPR; ! goto unordered_cmp; case BUILT_IN_ISLESS: ! if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) ! code = UNGE_EXPR; ! else ! code = GE_EXPR; ! goto unordered_cmp; case BUILT_IN_ISLESSEQUAL: ! if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) ! code = UNGT_EXPR; ! else ! code = GT_EXPR; ! goto unordered_cmp; case BUILT_IN_ISLESSGREATER: ! if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) ! code = UNEQ_EXPR; ! else ! code = EQ_EXPR; ! goto unordered_cmp; case BUILT_IN_ISUNORDERED: ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT) ! return integer_zero_node; ! code = UNORDERED_EXPR; ! goto unordered_cmp; ! ! unordered_cmp: ! { ! tree arg0, arg1; ! ! if (params == 0 ! || TREE_CHAIN (params) == 0) ! { ! error ("too few arguments to function `%s'", ! IDENTIFIER_POINTER (DECL_NAME (function))); ! return error_mark_node; ! } ! else if (TREE_CHAIN (TREE_CHAIN (params)) != 0) ! { ! error ("too many arguments to function `%s'", ! IDENTIFIER_POINTER (DECL_NAME (function))); ! return error_mark_node; ! } ! ! arg0 = TREE_VALUE (params); ! arg1 = TREE_VALUE (TREE_CHAIN (params)); ! arg0 = build_binary_op (code, arg0, arg1, 0); ! if (code != UNORDERED_EXPR) ! arg0 = build_unary_op (TRUTH_NOT_EXPR, arg0, 0); ! return arg0; ! } ! break; default: break; --- 3881,3902 ---- return build_unary_op (IMAGPART_EXPR, TREE_VALUE (coerced_params), 0); case BUILT_IN_ISGREATER: ! return expand_unordered_cmp (function, params, UNLE_EXPR, LE_EXPR); case BUILT_IN_ISGREATEREQUAL: ! return expand_unordered_cmp (function, params, UNLT_EXPR, LT_EXPR); case BUILT_IN_ISLESS: ! return expand_unordered_cmp (function, params, UNGE_EXPR, GE_EXPR); case BUILT_IN_ISLESSEQUAL: ! return expand_unordered_cmp (function, params, UNGT_EXPR, GT_EXPR); case BUILT_IN_ISLESSGREATER: ! return expand_unordered_cmp (function, params, UNEQ_EXPR, EQ_EXPR); case BUILT_IN_ISUNORDERED: ! return expand_unordered_cmp (function, params, UNORDERED_EXPR, NOP_EXPR); default: break; *************** expand_tree_builtin (function, params, c *** 3248,3254 **** return NULL_TREE; } ! /* Returns non-zero if CODE is the code for a statement. */ int statement_code_p (code) --- 3905,3911 ---- return NULL_TREE; } ! /* Returns nonzero if CODE is the code for a statement. */ int statement_code_p (code) *************** finish_label_address_expr (label) *** 3566,3606 **** return result; } - /* Mark P (a stmt_tree) for GC. The use of a `void *' for the - parameter allows this function to be used as a GC-marking - function. */ - - void - mark_stmt_tree (p) - void *p; - { - stmt_tree st = (stmt_tree) p; - - ggc_mark_tree (st->x_last_stmt); - ggc_mark_tree (st->x_last_expr_type); - } - - /* Mark LD for GC. */ - - void - c_mark_lang_decl (c) - struct c_lang_decl *c ATTRIBUTE_UNUSED; - { - } - - /* Mark F for GC. */ - - void - mark_c_language_function (f) - struct language_function *f; - { - if (!f) - return; - - mark_stmt_tree (&f->x_stmt_tree); - ggc_mark_tree (f->x_scope_stmt_stack); - } - /* Hook used by expand_expr to expand language-specific tree codes. */ rtx --- 4223,4228 ---- *************** c_expand_expr (exp, target, tmode, modif *** 3608,3614 **** tree exp; rtx target; enum machine_mode tmode; ! enum expand_modifier modifier; { switch (TREE_CODE (exp)) { --- 4230,4236 ---- tree exp; rtx target; enum machine_mode tmode; ! int modifier; /* Actually enum_modifier. */ { switch (TREE_CODE (exp)) { *************** c_safe_from_p (target, exp) *** 3749,3755 **** /* Hook used by unsafe_for_reeval to handle language-specific tree codes. */ int ! c_unsafe_for_reeval (exp) tree exp; { /* Statement expressions may not be reevaluated, likewise compound --- 4371,4377 ---- /* Hook used by unsafe_for_reeval to handle language-specific tree codes. */ int ! c_common_unsafe_for_reeval (exp) tree exp; { /* Statement expressions may not be reevaluated, likewise compound *************** c_staticp (exp) *** 3774,3829 **** return 0; } - /* Tree code classes. */ - - #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, - - static const char c_tree_code_type[] = { - 'x', - #include "c-common.def" - }; - #undef DEFTREECODE - - /* Table indexed by tree code giving number of expression - operands beyond the fixed part of the node structure. - Not used for types or decls. */ - - #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, - - static const int c_tree_code_length[] = { - 0, - #include "c-common.def" - }; - #undef DEFTREECODE - - /* Names of tree components. - Used for printing out the tree and error messages. */ - #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, - - static const char *const c_tree_code_name[] = { - "@@dummy", - #include "c-common.def" - }; - #undef DEFTREECODE - - /* Adds the tree codes specific to the C front end to the list of all - tree codes. */ - - void - add_c_tree_codes () - { - memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE, - c_tree_code_type, - (int) LAST_C_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE); - memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE, - c_tree_code_length, - (LAST_C_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE) * sizeof (int)); - memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE, - c_tree_code_name, - (LAST_C_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE) * sizeof (char *)); - lang_unsafe_for_reeval = c_unsafe_for_reeval; - } - #define CALLED_AS_BUILT_IN(NODE) \ (!strncmp (IDENTIFIER_POINTER (DECL_NAME (NODE)), "__builtin_", 10)) --- 4396,4401 ---- *************** c_expand_builtin_printf (arglist, target *** 4012,4018 **** memcpy (newstr, TREE_STRING_POINTER (stripped_string), newlen - 1); newstr[newlen - 1] = 0; ! arglist = combine_strings (build_string (newlen, newstr)); arglist = build_tree_list (NULL_TREE, arglist); fn = fn_puts; } --- 4584,4590 ---- memcpy (newstr, TREE_STRING_POINTER (stripped_string), newlen - 1); newstr[newlen - 1] = 0; ! arglist = fix_string_type (build_string (newlen, newstr)); arglist = build_tree_list (NULL_TREE, arglist); fn = fn_puts; } *************** boolean_increment (code, arg) *** 4151,4262 **** return val; } ! /* Handle C and C++ default attributes. */ ! enum built_in_attribute { ! #define DEF_ATTR_NULL_TREE(ENUM) ENUM, ! #define DEF_ATTR_INT(ENUM, VALUE) ENUM, ! #define DEF_ATTR_IDENT(ENUM, STRING) ENUM, ! #define DEF_ATTR_TREE_LIST(ENUM, PURPOSE, VALUE, CHAIN) ENUM, ! #define DEF_FN_ATTR(NAME, ATTRS, PREDICATE) /* No entry needed in enum. */ ! #include "builtin-attrs.def" ! #undef DEF_ATTR_NULL_TREE ! #undef DEF_ATTR_INT ! #undef DEF_ATTR_IDENT ! #undef DEF_ATTR_TREE_LIST ! #undef DEF_FN_ATTR ! ATTR_LAST ! }; ! static tree built_in_attributes[(int) ATTR_LAST]; ! static bool c_attrs_initialized = false; ! static void c_init_attributes PARAMS ((void)); ! /* Common initialization before parsing options. */ void ! c_common_init_options (lang) ! enum c_language_kind lang; { ! c_language = lang; ! parse_in = cpp_create_reader (lang == clk_c ? CLK_GNUC89: ! lang == clk_cplusplus ? CLK_GNUCXX: CLK_OBJC); ! /* Mark as "unspecified" (see c_common_post_options). */ ! flag_bounds_check = -1; } ! /* Post-switch processing. */ void ! c_common_post_options () { ! cpp_post_options (parse_in); ! flag_inline_trees = 1; ! /* Use tree inlining if possible. Function instrumentation is only ! done in the RTL level, so we disable tree inlining. */ ! if (! flag_instrument_function_entry_exit) { ! if (!flag_no_inline) ! flag_no_inline = 1; ! if (flag_inline_functions) ! { ! flag_inline_trees = 2; ! flag_inline_functions = 0; ! } } ! /* If still "unspecified", make it match -fbounded-pointers. */ ! if (flag_bounds_check == -1) ! flag_bounds_check = flag_bounded_pointers; ! /* Special format checking options don't work without -Wformat; warn if ! they are used. */ ! if (warn_format_y2k && !warn_format) ! warning ("-Wformat-y2k ignored without -Wformat"); ! if (warn_format_extra_args && !warn_format) ! warning ("-Wformat-extra-args ignored without -Wformat"); ! if (warn_format_nonliteral && !warn_format) ! warning ("-Wformat-nonliteral ignored without -Wformat"); ! if (warn_format_security && !warn_format) ! warning ("-Wformat-security ignored without -Wformat"); ! if (warn_missing_format_attribute && !warn_format) ! warning ("-Wmissing-format-attribute ignored without -Wformat"); ! /* If an error has occurred in cpplib, note it so we fail ! immediately. */ ! errorcount += cpp_errors (parse_in); } ! /* Front end initialization common to C, ObjC and C++. */ ! const char * ! c_common_init (filename) ! const char *filename; { ! /* Do this before initializing pragmas, as then cpplib's hash table ! has been set up. */ ! filename = init_c_lex (filename); ! init_pragma (); ! if (!c_attrs_initialized) ! c_init_attributes (); ! return filename; } ! /* Common finish hook for the C, ObjC and C++ front ends. */ ! void ! c_common_finish () { ! cpp_finish (parse_in); ! /* For performance, avoid tearing down cpplib's internal structures. ! Call cpp_errors () instead of cpp_destroy (). */ ! errorcount += cpp_errors (parse_in); } static void --- 4723,5171 ---- return val; } ! /* Define NAME with value TYPE precision. */ ! static void ! builtin_define_type_precision (name, type) ! const char *name; ! tree type; ! { ! builtin_define_with_int_value (name, TYPE_PRECISION (type)); ! } ! /* Define the float.h constants for TYPE using NAME_PREFIX and FP_SUFFIX. */ ! static void ! builtin_define_float_constants (name_prefix, fp_suffix, type) ! const char *name_prefix; ! const char *fp_suffix; ! tree type; { ! /* Used to convert radix-based values to base 10 values in several cases. ! In the max_exp -> max_10_exp conversion for 128-bit IEEE, we need at ! least 6 significant digits for correct results. Using the fraction ! formed by (log(2)*1e6)/(log(10)*1e6) overflows a 32-bit integer as an ! intermediate; perhaps someone can find a better approximation, in the ! mean time, I suspect using doubles won't harm the bootstrap here. */ ! const double log10_2 = .30102999566398119521; ! double log10_b; ! const struct real_format *fmt; ! char name[64], buf[128]; ! int dig, min_10_exp, max_10_exp; ! int decimal_dig; ! fmt = real_format_for_mode[TYPE_MODE (type) - QFmode]; ! ! /* The radix of the exponent representation. */ ! if (type == float_type_node) ! builtin_define_with_int_value ("__FLT_RADIX__", fmt->b); ! log10_b = log10_2 * fmt->log2_b; ! ! /* The number of radix digits, p, in the floating-point significand. */ ! sprintf (name, "__%s_MANT_DIG__", name_prefix); ! builtin_define_with_int_value (name, fmt->p); ! ! /* The number of decimal digits, q, such that any floating-point number ! with q decimal digits can be rounded into a floating-point number with ! p radix b digits and back again without change to the q decimal digits, ! ! p log10 b if b is a power of 10 ! floor((p - 1) log10 b) otherwise ! */ ! dig = (fmt->p - 1) * log10_b; ! sprintf (name, "__%s_DIG__", name_prefix); ! builtin_define_with_int_value (name, dig); ! ! /* The minimum negative int x such that b**(x-1) is a normalized float. */ ! sprintf (name, "__%s_MIN_EXP__", name_prefix); ! sprintf (buf, "(%d)", fmt->emin); ! builtin_define_with_value (name, buf, 0); ! ! /* The minimum negative int x such that 10**x is a normalized float, ! ! ceil (log10 (b ** (emin - 1))) ! = ceil (log10 (b) * (emin - 1)) ! ! Recall that emin is negative, so the integer truncation calculates ! the ceiling, not the floor, in this case. */ ! min_10_exp = (fmt->emin - 1) * log10_b; ! sprintf (name, "__%s_MIN_10_EXP__", name_prefix); ! sprintf (buf, "(%d)", min_10_exp); ! builtin_define_with_value (name, buf, 0); ! ! /* The maximum int x such that b**(x-1) is a representable float. */ ! sprintf (name, "__%s_MAX_EXP__", name_prefix); ! builtin_define_with_int_value (name, fmt->emax); ! ! /* The maximum int x such that 10**x is in the range of representable ! finite floating-point numbers, ! ! floor (log10((1 - b**-p) * b**emax)) ! = floor (log10(1 - b**-p) + log10(b**emax)) ! = floor (log10(1 - b**-p) + log10(b)*emax) ! ! The safest thing to do here is to just compute this number. But since ! we don't link cc1 with libm, we cannot. We could implement log10 here ! a series expansion, but that seems too much effort because: ! ! Note that the first term, for all extant p, is a number exceedingly close ! to zero, but slightly negative. Note that the second term is an integer ! scaling an irrational number, and that because of the floor we are only ! interested in its integral portion. ! ! In order for the first term to have any effect on the integral portion ! of the second term, the second term has to be exceedingly close to an ! integer itself (e.g. 123.000000000001 or something). Getting a result ! that close to an integer requires that the irrational multiplicand have ! a long series of zeros in its expansion, which doesn't occur in the ! first 20 digits or so of log10(b). ! ! Hand-waving aside, crunching all of the sets of constants above by hand ! does not yield a case for which the first term is significant, which ! in the end is all that matters. */ ! max_10_exp = fmt->emax * log10_b; ! sprintf (name, "__%s_MAX_10_EXP__", name_prefix); ! builtin_define_with_int_value (name, max_10_exp); ! ! /* The number of decimal digits, n, such that any floating-point number ! can be rounded to n decimal digits and back again without change to ! the value. ! ! p * log10(b) if b is a power of 10 ! ceil(1 + p * log10(b)) otherwise ! ! The only macro we care about is this number for the widest supported ! floating type, but we want this value for rendering constants below. */ ! { ! double d_decimal_dig = 1 + fmt->p * log10_b; ! decimal_dig = d_decimal_dig; ! if (decimal_dig < d_decimal_dig) ! decimal_dig++; ! } ! if (type == long_double_type_node) ! builtin_define_with_int_value ("__DECIMAL_DIG__", decimal_dig); ! ! /* Since, for the supported formats, B is always a power of 2, we ! construct the following numbers directly as a hexadecimal ! constants. */ ! ! /* The maximum representable finite floating-point number, ! (1 - b**-p) * b**emax */ ! { ! int i, n; ! char *p; ! ! strcpy (buf, "0x0."); ! n = fmt->p * fmt->log2_b; ! for (i = 0, p = buf + 4; i + 3 < n; i += 4) ! *p++ = 'f'; ! if (i < n) ! *p++ = "08ce"[n - i]; ! sprintf (p, "p%d", fmt->emax * fmt->log2_b); ! } ! sprintf (name, "__%s_MAX__", name_prefix); ! builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); ! ! /* The minimum normalized positive floating-point number, ! b**(emin-1). */ ! sprintf (name, "__%s_MIN__", name_prefix); ! sprintf (buf, "0x1p%d", (fmt->emin - 1) * fmt->log2_b); ! builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); ! ! /* The difference between 1 and the least value greater than 1 that is ! representable in the given floating point type, b**(1-p). */ ! sprintf (name, "__%s_EPSILON__", name_prefix); ! sprintf (buf, "0x1p%d", (1 - fmt->p) * fmt->log2_b); ! builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); ! ! /* For C++ std::numeric_limits::denorm_min. The minimum denormalized ! positive floating-point number, b**(emin-p). Zero for formats that ! don't support denormals. */ ! sprintf (name, "__%s_DENORM_MIN__", name_prefix); ! if (fmt->has_denorm) ! { ! sprintf (buf, "0x1p%d", (fmt->emin - fmt->p) * fmt->log2_b); ! builtin_define_with_hex_fp_value (name, type, decimal_dig, ! buf, fp_suffix); ! } ! else ! { ! sprintf (buf, "0.0%s", fp_suffix); ! builtin_define_with_value (name, buf, 0); ! } ! } ! ! /* Hook that registers front end and target-specific built-ins. */ void ! cb_register_builtins (pfile) ! cpp_reader *pfile; { ! /* -undef turns off target-specific built-ins. */ ! if (flag_undef) ! return; ! if (c_language == clk_cplusplus) ! { ! if (SUPPORTS_ONE_ONLY) ! cpp_define (pfile, "__GXX_WEAK__=1"); ! else ! cpp_define (pfile, "__GXX_WEAK__=0"); ! if (flag_exceptions) ! cpp_define (pfile, "__EXCEPTIONS"); ! if (warn_deprecated) ! cpp_define (pfile, "__DEPRECATED"); ! } ! ! /* represents the C++ ABI version, always defined so it can be used while ! preprocessing C and assembler. */ ! cpp_define (pfile, "__GXX_ABI_VERSION=102"); ! ! /* libgcc needs to know this. */ ! if (USING_SJLJ_EXCEPTIONS) ! cpp_define (pfile, "__USING_SJLJ_EXCEPTIONS__"); ! ! /* stddef.h needs to know these. */ ! builtin_define_with_value ("__SIZE_TYPE__", SIZE_TYPE, 0); ! builtin_define_with_value ("__PTRDIFF_TYPE__", PTRDIFF_TYPE, 0); ! builtin_define_with_value ("__WCHAR_TYPE__", MODIFIED_WCHAR_TYPE, 0); ! builtin_define_with_value ("__WINT_TYPE__", WINT_TYPE, 0); ! ! /* limits.h needs to know these. */ ! builtin_define_type_max ("__SCHAR_MAX__", signed_char_type_node, 0); ! builtin_define_type_max ("__SHRT_MAX__", short_integer_type_node, 0); ! builtin_define_type_max ("__INT_MAX__", integer_type_node, 0); ! builtin_define_type_max ("__LONG_MAX__", long_integer_type_node, 1); ! builtin_define_type_max ("__LONG_LONG_MAX__", long_long_integer_type_node, 2); ! builtin_define_type_max ("__WCHAR_MAX__", wchar_type_node, 0); ! ! builtin_define_type_precision ("__CHAR_BIT__", char_type_node); ! ! /* float.h needs to know these. */ ! ! builtin_define_with_int_value ("__FLT_EVAL_METHOD__", ! TARGET_FLT_EVAL_METHOD); ! ! builtin_define_float_constants ("FLT", "F", float_type_node); ! builtin_define_float_constants ("DBL", "", double_type_node); ! builtin_define_float_constants ("LDBL", "L", long_double_type_node); ! ! /* For use in assembly language. */ ! builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); ! builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); ! ! /* Misc. */ ! builtin_define_with_value ("__VERSION__", version_string, 1); ! ! /* Other target-independent built-ins determined by command-line ! options. */ ! if (optimize_size) ! cpp_define (pfile, "__OPTIMIZE_SIZE__"); ! if (optimize) ! cpp_define (pfile, "__OPTIMIZE__"); ! ! if (flag_hosted) ! cpp_define (pfile, "__STDC_HOSTED__=1"); ! else ! cpp_define (pfile, "__STDC_HOSTED__=0"); ! ! if (fast_math_flags_set_p ()) ! cpp_define (pfile, "__FAST_MATH__"); ! if (flag_really_no_inline) ! cpp_define (pfile, "__NO_INLINE__"); ! if (flag_signaling_nans) ! cpp_define (pfile, "__SUPPORT_SNAN__"); ! if (flag_finite_math_only) ! cpp_define (pfile, "__FINITE_MATH_ONLY__=1"); ! else ! cpp_define (pfile, "__FINITE_MATH_ONLY__=0"); ! ! if (flag_iso) ! cpp_define (pfile, "__STRICT_ANSI__"); ! ! if (!flag_signed_char) ! cpp_define (pfile, "__CHAR_UNSIGNED__"); ! ! if (c_language == clk_cplusplus && TREE_UNSIGNED (wchar_type_node)) ! cpp_define (pfile, "__WCHAR_UNSIGNED__"); ! ! /* Make the choice of ObjC runtime visible to source code. */ ! if (flag_objc && flag_next_runtime) ! cpp_define (pfile, "__NEXT_RUNTIME__"); ! ! /* A straightforward target hook doesn't work, because of problems ! linking that hook's body when part of non-C front ends. */ ! # define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM) ! # define preprocessing_trad_p() (cpp_get_options (pfile)->traditional) ! # define builtin_define(TXT) cpp_define (pfile, TXT) ! # define builtin_assert(TXT) cpp_assert (pfile, TXT) ! TARGET_CPU_CPP_BUILTINS (); ! TARGET_OS_CPP_BUILTINS (); } ! /* Pass an object-like macro. If it doesn't lie in the user's ! namespace, defines it unconditionally. Otherwise define a version ! with two leading underscores, and another version with two leading ! and trailing underscores, and define the original only if an ISO ! standard was not nominated. ! ! e.g. passing "unix" defines "__unix", "__unix__" and possibly ! "unix". Passing "_mips" defines "__mips", "__mips__" and possibly ! "_mips". */ void ! builtin_define_std (macro) ! const char *macro; { ! size_t len = strlen (macro); ! char *buff = alloca (len + 5); ! char *p = buff + 2; ! char *q = p + len; ! /* prepend __ (or maybe just _) if in user's namespace. */ ! memcpy (p, macro, len + 1); ! if (!( *p == '_' && (p[1] == '_' || ISUPPER (p[1])))) ! { ! if (*p != '_') ! *--p = '_'; ! if (p[1] != '_') ! *--p = '_'; ! } ! cpp_define (parse_in, p); ! /* If it was in user's namespace... */ ! if (p != buff + 2) { ! /* Define the macro with leading and following __. */ ! if (q[-1] != '_') ! *q++ = '_'; ! if (q[-2] != '_') ! *q++ = '_'; ! *q = '\0'; ! cpp_define (parse_in, p); ! ! /* Finally, define the original macro if permitted. */ ! if (!flag_iso) ! cpp_define (parse_in, macro); } + } ! /* Pass an object-like macro and a value to define it to. The third ! parameter says whether or not to turn the value into a string ! constant. */ ! static void ! builtin_define_with_value (macro, expansion, is_str) ! const char *macro; ! const char *expansion; ! int is_str; ! { ! char *buf; ! size_t mlen = strlen (macro); ! size_t elen = strlen (expansion); ! size_t extra = 2; /* space for an = and a NUL */ ! if (is_str) ! extra += 2; /* space for two quote marks */ ! buf = alloca (mlen + elen + extra); ! if (is_str) ! sprintf (buf, "%s=\"%s\"", macro, expansion); ! else ! sprintf (buf, "%s=%s", macro, expansion); ! ! cpp_define (parse_in, buf); } ! /* Pass an object-like macro and an integer value to define it to. */ ! static void ! builtin_define_with_int_value (macro, value) ! const char *macro; ! HOST_WIDE_INT value; { ! char *buf; ! size_t mlen = strlen (macro); ! size_t vlen = 18; ! size_t extra = 2; /* space for = and NUL. */ ! buf = alloca (mlen + vlen + extra); ! memcpy (buf, macro, mlen); ! buf[mlen] = '='; ! sprintf (buf + mlen + 1, HOST_WIDE_INT_PRINT_DEC, value); ! cpp_define (parse_in, buf); ! } ! /* Pass an object-like macro a hexadecimal floating-point value. */ ! static void ! builtin_define_with_hex_fp_value (macro, type, digits, hex_str, fp_suffix) ! const char *macro; ! tree type ATTRIBUTE_UNUSED; ! int digits; ! const char *hex_str; ! const char *fp_suffix; ! { ! REAL_VALUE_TYPE real; ! char dec_str[64], buf[256]; ! ! /* Hex values are really cool and convenient, except that they're ! not supported in strict ISO C90 mode. First, the "p-" sequence ! is not valid as part of a preprocessor number. Second, we get a ! pedwarn from the preprocessor, which has no context, so we can't ! suppress the warning with __extension__. ! ! So instead what we do is construct the number in hex (because ! it's easy to get the exact correct value), parse it as a real, ! then print it back out as decimal. */ ! ! real_from_string (&real, hex_str); ! real_to_decimal (dec_str, &real, sizeof (dec_str), digits, 0); ! ! sprintf (buf, "%s=%s%s", macro, dec_str, fp_suffix); ! cpp_define (parse_in, buf); } ! /* Define MAX for TYPE based on the precision of the type. IS_LONG is ! 1 for type "long" and 2 for "long long". We have to handle ! unsigned types, since wchar_t might be unsigned. */ ! ! static void ! builtin_define_type_max (macro, type, is_long) ! const char *macro; ! tree type; ! int is_long; { ! static const char *const values[] ! = { "127", "255", ! "32767", "65535", ! "2147483647", "4294967295", ! "9223372036854775807", "18446744073709551615", ! "170141183460469231731687303715884105727", ! "340282366920938463463374607431768211455" }; ! static const char *const suffixes[] = { "", "U", "L", "UL", "LL", "ULL" }; ! const char *value, *suffix; ! char *buf; ! size_t idx; ! ! /* Pre-rendering the values mean we don't have to futz with printing a ! multi-word decimal value. There are also a very limited number of ! precisions that we support, so it's really a waste of time. */ ! switch (TYPE_PRECISION (type)) ! { ! case 8: idx = 0; break; ! case 16: idx = 2; break; ! case 32: idx = 4; break; ! case 64: idx = 6; break; ! case 128: idx = 8; break; ! default: abort (); ! } ! ! value = values[idx + TREE_UNSIGNED (type)]; ! suffix = suffixes[is_long * 2 + TREE_UNSIGNED (type)]; ! ! buf = alloca (strlen (macro) + 1 + strlen (value) + strlen (suffix) + 1); ! sprintf (buf, "%s=%s%s", macro, value, suffix); ! ! cpp_define (parse_in, buf); } static void *************** c_init_attributes () *** 4281,4287 **** #undef DEF_ATTR_IDENT #undef DEF_ATTR_TREE_LIST #undef DEF_FN_ATTR - ggc_add_tree_root (built_in_attributes, (int) ATTR_LAST); c_attrs_initialized = true; } --- 5190,5195 ---- *************** shadow_warning (msgid, name, decl) *** 4325,4327 **** --- 5233,6630 ---- "shadowed declaration is here"); } + /* Attribute handlers common to C front ends. */ + + /* Handle a "packed" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_packed_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags; + bool *no_add_attrs; + { + tree *type = NULL; + if (DECL_P (*node)) + { + if (TREE_CODE (*node) == TYPE_DECL) + type = &TREE_TYPE (*node); + } + else + type = node; + + if (type) + { + if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + *type = build_type_copy (*type); + TYPE_PACKED (*type) = 1; + } + else if (TREE_CODE (*node) == FIELD_DECL) + DECL_PACKED (*node) = 1; + /* We can't set DECL_PACKED for a VAR_DECL, because the bit is + used for DECL_REGISTER. It wouldn't mean anything anyway. */ + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "nocommon" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_nocommon_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) == VAR_DECL) + DECL_COMMON (*node) = 0; + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "common" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_common_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) == VAR_DECL) + DECL_COMMON (*node) = 1; + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "noreturn" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_noreturn_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree type = TREE_TYPE (*node); + + /* See FIXME comment in c_common_attribute_table. */ + if (TREE_CODE (*node) == FUNCTION_DECL) + TREE_THIS_VOLATILE (*node) = 1; + else if (TREE_CODE (type) == POINTER_TYPE + && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) + TREE_TYPE (*node) + = build_pointer_type + (build_type_variant (TREE_TYPE (type), + TREE_READONLY (TREE_TYPE (type)), 1)); + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "noinline" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_noinline_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) == FUNCTION_DECL) + DECL_UNINLINABLE (*node) = 1; + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "always_inline" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_always_inline_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) == FUNCTION_DECL) + { + /* Do nothing else, just set the attribute. We'll get at + it later with lookup_attribute. */ + } + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "used" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_used_attribute (pnode, name, args, flags, no_add_attrs) + tree *pnode; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree node = *pnode; + + if (TREE_CODE (node) == FUNCTION_DECL + || (TREE_CODE (node) == VAR_DECL && TREE_STATIC (node))) + TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (node)) + = TREE_USED (node) = 1; + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "unused" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_unused_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags; + bool *no_add_attrs; + { + if (DECL_P (*node)) + { + tree decl = *node; + + if (TREE_CODE (decl) == PARM_DECL + || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == LABEL_DECL + || TREE_CODE (decl) == TYPE_DECL) + TREE_USED (decl) = 1; + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + } + else + { + if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + *node = build_type_copy (*node); + TREE_USED (*node) = 1; + } + + return NULL_TREE; + } + + /* Handle a "const" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_const_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree type = TREE_TYPE (*node); + + /* See FIXME comment on noreturn in c_common_attribute_table. */ + if (TREE_CODE (*node) == FUNCTION_DECL) + TREE_READONLY (*node) = 1; + else if (TREE_CODE (type) == POINTER_TYPE + && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) + TREE_TYPE (*node) + = build_pointer_type + (build_type_variant (TREE_TYPE (type), 1, + TREE_THIS_VOLATILE (TREE_TYPE (type)))); + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "transparent_union" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_transparent_union_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags; + bool *no_add_attrs; + { + tree decl = NULL_TREE; + tree *type = NULL; + int is_type = 0; + + if (DECL_P (*node)) + { + decl = *node; + type = &TREE_TYPE (decl); + is_type = TREE_CODE (*node) == TYPE_DECL; + } + else if (TYPE_P (*node)) + type = node, is_type = 1; + + if (is_type + && TREE_CODE (*type) == UNION_TYPE + && (decl == 0 + || (TYPE_FIELDS (*type) != 0 + && TYPE_MODE (*type) == DECL_MODE (TYPE_FIELDS (*type))))) + { + if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + *type = build_type_copy (*type); + TYPE_TRANSPARENT_UNION (*type) = 1; + } + else if (decl != 0 && TREE_CODE (decl) == PARM_DECL + && TREE_CODE (*type) == UNION_TYPE + && TYPE_MODE (*type) == DECL_MODE (TYPE_FIELDS (*type))) + DECL_TRANSPARENT_UNION (decl) = 1; + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "constructor" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_constructor_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + tree type = TREE_TYPE (decl); + + if (TREE_CODE (decl) == FUNCTION_DECL + && TREE_CODE (type) == FUNCTION_TYPE + && decl_function_context (decl) == 0) + { + DECL_STATIC_CONSTRUCTOR (decl) = 1; + TREE_USED (decl) = 1; + } + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "destructor" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_destructor_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + tree type = TREE_TYPE (decl); + + if (TREE_CODE (decl) == FUNCTION_DECL + && TREE_CODE (type) == FUNCTION_TYPE + && decl_function_context (decl) == 0) + { + DECL_STATIC_DESTRUCTOR (decl) = 1; + TREE_USED (decl) = 1; + } + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "mode" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_mode_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree type = *node; + + *no_add_attrs = true; + + if (TREE_CODE (TREE_VALUE (args)) != IDENTIFIER_NODE) + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + else + { + int j; + const char *p = IDENTIFIER_POINTER (TREE_VALUE (args)); + int len = strlen (p); + enum machine_mode mode = VOIDmode; + tree typefm; + + if (len > 4 && p[0] == '_' && p[1] == '_' + && p[len - 1] == '_' && p[len - 2] == '_') + { + char *newp = (char *) alloca (len - 1); + + strcpy (newp, &p[2]); + newp[len - 4] = '\0'; + p = newp; + } + + /* Change this type to have a type with the specified mode. + First check for the special modes. */ + if (! strcmp (p, "byte")) + mode = byte_mode; + else if (!strcmp (p, "word")) + mode = word_mode; + else if (! strcmp (p, "pointer")) + mode = ptr_mode; + else + for (j = 0; j < NUM_MACHINE_MODES; j++) + if (!strcmp (p, GET_MODE_NAME (j))) + mode = (enum machine_mode) j; + + if (mode == VOIDmode) + error ("unknown machine mode `%s'", p); + else if (0 == (typefm = (*lang_hooks.types.type_for_mode) + (mode, TREE_UNSIGNED (type)))) + error ("no data type for mode `%s'", p); + else + { + /* If this is a vector, make sure we either have hardware + support, or we can emulate it. */ + if ((GET_MODE_CLASS (mode) == MODE_VECTOR_INT + || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT) + && !vector_mode_valid_p (mode)) + { + error ("unable to emulate '%s'", GET_MODE_NAME (mode)); + return NULL_TREE; + } + + *node = typefm; + /* No need to layout the type here. The caller should do this. */ + } + } + + return NULL_TREE; + } + + /* Handle a "section" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_section_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name ATTRIBUTE_UNUSED; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + + if (targetm.have_named_sections) + { + if ((TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == VAR_DECL) + && TREE_CODE (TREE_VALUE (args)) == STRING_CST) + { + if (TREE_CODE (decl) == VAR_DECL + && current_function_decl != NULL_TREE + && ! TREE_STATIC (decl)) + { + error_with_decl (decl, + "section attribute cannot be specified for local variables"); + *no_add_attrs = true; + } + + /* The decl may have already been given a section attribute + from a previous declaration. Ensure they match. */ + else if (DECL_SECTION_NAME (decl) != NULL_TREE + && strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), + TREE_STRING_POINTER (TREE_VALUE (args))) != 0) + { + error_with_decl (*node, + "section of `%s' conflicts with previous declaration"); + *no_add_attrs = true; + } + else + DECL_SECTION_NAME (decl) = TREE_VALUE (args); + } + else + { + error_with_decl (*node, + "section attribute not allowed for `%s'"); + *no_add_attrs = true; + } + } + else + { + error_with_decl (*node, + "section attributes are not supported for this target"); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "aligned" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_aligned_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name ATTRIBUTE_UNUSED; + tree args; + int flags; + bool *no_add_attrs; + { + tree decl = NULL_TREE; + tree *type = NULL; + int is_type = 0; + tree align_expr = (args ? TREE_VALUE (args) + : size_int (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); + int i; + + if (DECL_P (*node)) + { + decl = *node; + type = &TREE_TYPE (decl); + is_type = TREE_CODE (*node) == TYPE_DECL; + } + else if (TYPE_P (*node)) + type = node, is_type = 1; + + /* Strip any NOPs of any kind. */ + while (TREE_CODE (align_expr) == NOP_EXPR + || TREE_CODE (align_expr) == CONVERT_EXPR + || TREE_CODE (align_expr) == NON_LVALUE_EXPR) + align_expr = TREE_OPERAND (align_expr, 0); + + if (TREE_CODE (align_expr) != INTEGER_CST) + { + error ("requested alignment is not a constant"); + *no_add_attrs = true; + } + else if ((i = tree_log2 (align_expr)) == -1) + { + error ("requested alignment is not a power of 2"); + *no_add_attrs = true; + } + else if (i > HOST_BITS_PER_INT - 2) + { + error ("requested alignment is too large"); + *no_add_attrs = true; + } + else if (is_type) + { + /* If we have a TYPE_DECL, then copy the type, so that we + don't accidentally modify a builtin type. See pushdecl. */ + if (decl && TREE_TYPE (decl) != error_mark_node + && DECL_ORIGINAL_TYPE (decl) == NULL_TREE) + { + tree tt = TREE_TYPE (decl); + *type = build_type_copy (*type); + DECL_ORIGINAL_TYPE (decl) = tt; + TYPE_NAME (*type) = decl; + TREE_USED (*type) = TREE_USED (decl); + TREE_TYPE (decl) = *type; + } + else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + *type = build_type_copy (*type); + + TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT; + TYPE_USER_ALIGN (*type) = 1; + } + else if (TREE_CODE (decl) != VAR_DECL + && TREE_CODE (decl) != FIELD_DECL) + { + error_with_decl (decl, + "alignment may not be specified for `%s'"); + *no_add_attrs = true; + } + else + { + DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT; + DECL_USER_ALIGN (decl) = 1; + } + + return NULL_TREE; + } + + /* Handle a "weak" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_weak_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name ATTRIBUTE_UNUSED; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs ATTRIBUTE_UNUSED; + { + declare_weak (*node); + + return NULL_TREE; + } + + /* Handle an "alias" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_alias_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + + if ((TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl)) + || (TREE_CODE (decl) != FUNCTION_DECL && ! DECL_EXTERNAL (decl))) + { + error_with_decl (decl, + "`%s' defined both normally and as an alias"); + *no_add_attrs = true; + } + else if (decl_function_context (decl) == 0) + { + tree id; + + id = TREE_VALUE (args); + if (TREE_CODE (id) != STRING_CST) + { + error ("alias arg not a string"); + *no_add_attrs = true; + return NULL_TREE; + } + id = get_identifier (TREE_STRING_POINTER (id)); + /* This counts as a use of the object pointed to. */ + TREE_USED (id) = 1; + + if (TREE_CODE (decl) == FUNCTION_DECL) + DECL_INITIAL (decl) = error_mark_node; + else + DECL_EXTERNAL (decl) = 0; + } + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle an "visibility" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_visibility_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + + if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl)) + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + else + { + tree id; + + id = TREE_VALUE (args); + if (TREE_CODE (id) != STRING_CST) + { + error ("visibility arg not a string"); + *no_add_attrs = true; + return NULL_TREE; + } + if (strcmp (TREE_STRING_POINTER (id), "hidden") + && strcmp (TREE_STRING_POINTER (id), "protected") + && strcmp (TREE_STRING_POINTER (id), "internal") + && strcmp (TREE_STRING_POINTER (id), "default")) + { + error ("visibility arg must be one of \"default\", \"hidden\", \"protected\" or \"internal\""); + *no_add_attrs = true; + return NULL_TREE; + } + } + + return NULL_TREE; + } + + /* Handle an "tls_model" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_tls_model_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + + if (! DECL_THREAD_LOCAL (decl)) + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + else + { + tree id; + + id = TREE_VALUE (args); + if (TREE_CODE (id) != STRING_CST) + { + error ("tls_model arg not a string"); + *no_add_attrs = true; + return NULL_TREE; + } + if (strcmp (TREE_STRING_POINTER (id), "local-exec") + && strcmp (TREE_STRING_POINTER (id), "initial-exec") + && strcmp (TREE_STRING_POINTER (id), "local-dynamic") + && strcmp (TREE_STRING_POINTER (id), "global-dynamic")) + { + error ("tls_model arg must be one of \"local-exec\", \"initial-exec\", \"local-dynamic\" or \"global-dynamic\""); + *no_add_attrs = true; + return NULL_TREE; + } + } + + return NULL_TREE; + } + + /* Handle a "no_instrument_function" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_no_instrument_function_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + + if (TREE_CODE (decl) != FUNCTION_DECL) + { + error_with_decl (decl, + "`%s' attribute applies only to functions", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + else if (DECL_INITIAL (decl)) + { + error_with_decl (decl, + "can't set `%s' attribute after definition", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + else + DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1; + + return NULL_TREE; + } + + /* Handle a "malloc" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_malloc_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) == FUNCTION_DECL) + DECL_IS_MALLOC (*node) = 1; + /* ??? TODO: Support types. */ + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "no_limit_stack" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_no_limit_stack_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree decl = *node; + + if (TREE_CODE (decl) != FUNCTION_DECL) + { + error_with_decl (decl, + "`%s' attribute applies only to functions", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + else if (DECL_INITIAL (decl)) + { + error_with_decl (decl, + "can't set `%s' attribute after definition", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + else + DECL_NO_LIMIT_STACK (decl) = 1; + + return NULL_TREE; + } + + /* Handle a "pure" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_pure_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) == FUNCTION_DECL) + DECL_IS_PURE (*node) = 1; + /* ??? TODO: Support types. */ + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Handle a "deprecated" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_deprecated_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags; + bool *no_add_attrs; + { + tree type = NULL_TREE; + int warn = 0; + const char *what = NULL; + + if (DECL_P (*node)) + { + tree decl = *node; + type = TREE_TYPE (decl); + + if (TREE_CODE (decl) == TYPE_DECL + || TREE_CODE (decl) == PARM_DECL + || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == FIELD_DECL) + TREE_DEPRECATED (decl) = 1; + else + warn = 1; + } + else if (TYPE_P (*node)) + { + if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + *node = build_type_copy (*node); + TREE_DEPRECATED (*node) = 1; + type = *node; + } + else + warn = 1; + + if (warn) + { + *no_add_attrs = true; + if (type && TYPE_NAME (type)) + { + if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) + what = IDENTIFIER_POINTER (TYPE_NAME (*node)); + else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && DECL_NAME (TYPE_NAME (type))) + what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); + } + if (what) + warning ("`%s' attribute ignored for `%s'", + IDENTIFIER_POINTER (name), what); + else + warning ("`%s' attribute ignored", + IDENTIFIER_POINTER (name)); + } + + return NULL_TREE; + } + + /* Keep a list of vector type nodes we created in handle_vector_size_attribute, + to prevent us from duplicating type nodes unnecessarily. + The normal mechanism to prevent duplicates is to use type_hash_canon, but + since we want to distinguish types that are essentially identical (except + for their debug representation), we use a local list here. */ + static GTY(()) tree vector_type_node_list = 0; + + /* Handle a "vector_size" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_vector_size_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + unsigned HOST_WIDE_INT vecsize, nunits; + enum machine_mode mode, orig_mode, new_mode; + tree type = *node, new_type = NULL_TREE; + tree type_list_node; + + *no_add_attrs = true; + + if (! host_integerp (TREE_VALUE (args), 1)) + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + return NULL_TREE; + } + + /* Get the vector size (in bytes). */ + vecsize = tree_low_cst (TREE_VALUE (args), 1); + + /* We need to provide for vector pointers, vector arrays, and + functions returning vectors. For example: + + __attribute__((vector_size(16))) short *foo; + + In this case, the mode is SI, but the type being modified is + HI, so we need to look further. */ + + while (POINTER_TYPE_P (type) + || TREE_CODE (type) == FUNCTION_TYPE + || TREE_CODE (type) == ARRAY_TYPE) + type = TREE_TYPE (type); + + /* Get the mode of the type being modified. */ + orig_mode = TYPE_MODE (type); + + if (TREE_CODE (type) == RECORD_TYPE + || (GET_MODE_CLASS (orig_mode) != MODE_FLOAT + && GET_MODE_CLASS (orig_mode) != MODE_INT) + || ! host_integerp (TYPE_SIZE_UNIT (type), 1)) + { + error ("invalid vector type for attribute `%s'", + IDENTIFIER_POINTER (name)); + return NULL_TREE; + } + + /* Calculate how many units fit in the vector. */ + nunits = vecsize / tree_low_cst (TYPE_SIZE_UNIT (type), 1); + + /* Find a suitably sized vector. */ + new_mode = VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (GET_MODE_CLASS (orig_mode) == MODE_INT + ? MODE_VECTOR_INT + : MODE_VECTOR_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if (vecsize == GET_MODE_SIZE (mode) + && nunits == (unsigned HOST_WIDE_INT) GET_MODE_NUNITS (mode)) + { + new_mode = mode; + break; + } + + if (new_mode == VOIDmode) + { + error ("no vector mode with the size and type specified could be found"); + return NULL_TREE; + } + + for (type_list_node = vector_type_node_list; type_list_node; + type_list_node = TREE_CHAIN (type_list_node)) + { + tree other_type = TREE_VALUE (type_list_node); + tree record = TYPE_DEBUG_REPRESENTATION_TYPE (other_type); + tree fields = TYPE_FIELDS (record); + tree field_type = TREE_TYPE (fields); + tree array_type = TREE_TYPE (field_type); + if (TREE_CODE (fields) != FIELD_DECL + || TREE_CODE (field_type) != ARRAY_TYPE) + abort (); + + if (TYPE_MODE (other_type) == mode && type == array_type) + { + new_type = other_type; + break; + } + } + + if (new_type == NULL_TREE) + { + tree index, array, rt, list_node; + + new_type = (*lang_hooks.types.type_for_mode) (new_mode, + TREE_UNSIGNED (type)); + + if (!new_type) + { + error ("no vector mode with the size and type specified could be found"); + return NULL_TREE; + } + + new_type = build_type_copy (new_type); + + /* If this is a vector, make sure we either have hardware + support, or we can emulate it. */ + if ((GET_MODE_CLASS (mode) == MODE_VECTOR_INT + || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT) + && !vector_mode_valid_p (mode)) + { + error ("unable to emulate '%s'", GET_MODE_NAME (mode)); + return NULL_TREE; + } + + /* Set the debug information here, because this is the only + place where we know the underlying type for a vector made + with vector_size. For debugging purposes we pretend a vector + is an array within a structure. */ + index = build_int_2 (TYPE_VECTOR_SUBPARTS (new_type) - 1, 0); + array = build_array_type (type, build_index_type (index)); + rt = make_node (RECORD_TYPE); + + TYPE_FIELDS (rt) = build_decl (FIELD_DECL, get_identifier ("f"), array); + DECL_CONTEXT (TYPE_FIELDS (rt)) = rt; + layout_type (rt); + TYPE_DEBUG_REPRESENTATION_TYPE (new_type) = rt; + + list_node = build_tree_list (NULL, new_type); + TREE_CHAIN (list_node) = vector_type_node_list; + vector_type_node_list = list_node; + } + + /* Build back pointers if needed. */ + *node = vector_size_helper (*node, new_type); + + return NULL_TREE; + } + + /* HACK. GROSS. This is absolutely disgusting. I wish there was a + better way. + + If we requested a pointer to a vector, build up the pointers that + we stripped off while looking for the inner type. Similarly for + return values from functions. + + The argument "type" is the top of the chain, and "bottom" is the + new type which we will point to. */ + + static tree + vector_size_helper (type, bottom) + tree type, bottom; + { + tree inner, outer; + + if (POINTER_TYPE_P (type)) + { + inner = vector_size_helper (TREE_TYPE (type), bottom); + outer = build_pointer_type (inner); + } + else if (TREE_CODE (type) == ARRAY_TYPE) + { + inner = vector_size_helper (TREE_TYPE (type), bottom); + outer = build_array_type (inner, TYPE_VALUES (type)); + } + else if (TREE_CODE (type) == FUNCTION_TYPE) + { + inner = vector_size_helper (TREE_TYPE (type), bottom); + outer = build_function_type (inner, TYPE_VALUES (type)); + } + else + return bottom; + + TREE_READONLY (outer) = TREE_READONLY (type); + TREE_THIS_VOLATILE (outer) = TREE_THIS_VOLATILE (type); + + return outer; + } + + /* Handle the "nonnull" attribute. */ + static tree + handle_nonnull_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name ATTRIBUTE_UNUSED; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + tree type = *node; + unsigned HOST_WIDE_INT attr_arg_num; + + /* If no arguments are specified, all pointer arguments should be + non-null. Veryify a full prototype is given so that the arguments + will have the correct types when we actually check them later. */ + if (! args) + { + if (! TYPE_ARG_TYPES (type)) + { + error ("nonnull attribute without arguments on a non-prototype"); + *no_add_attrs = true; + } + return NULL_TREE; + } + + /* Argument list specified. Verify that each argument number references + a pointer argument. */ + for (attr_arg_num = 1; args; args = TREE_CHAIN (args)) + { + tree argument; + unsigned HOST_WIDE_INT arg_num, ck_num; + + if (! get_nonnull_operand (TREE_VALUE (args), &arg_num)) + { + error ("nonnull argument has invalid operand number (arg %lu)", + (unsigned long) attr_arg_num); + *no_add_attrs = true; + return NULL_TREE; + } + + argument = TYPE_ARG_TYPES (type); + if (argument) + { + for (ck_num = 1; ; ck_num++) + { + if (! argument || ck_num == arg_num) + break; + argument = TREE_CHAIN (argument); + } + + if (! argument + || TREE_CODE (TREE_VALUE (argument)) == VOID_TYPE) + { + error ("nonnull argument with out-of-range operand number (arg %lu, operand %lu)", + (unsigned long) attr_arg_num, (unsigned long) arg_num); + *no_add_attrs = true; + return NULL_TREE; + } + + if (TREE_CODE (TREE_VALUE (argument)) != POINTER_TYPE) + { + error ("nonnull argument references non-pointer operand (arg %lu, operand %lu)", + (unsigned long) attr_arg_num, (unsigned long) arg_num); + *no_add_attrs = true; + return NULL_TREE; + } + } + } + + return NULL_TREE; + } + + /* Check the argument list of a function call for null in argument slots + that are marked as requiring a non-null pointer argument. */ + + static void + check_function_nonnull (attrs, params) + tree attrs; + tree params; + { + tree a, args, param; + int param_num; + + for (a = attrs; a; a = TREE_CHAIN (a)) + { + if (is_attribute_p ("nonnull", TREE_PURPOSE (a))) + { + args = TREE_VALUE (a); + + /* Walk the argument list. If we encounter an argument number we + should check for non-null, do it. If the attribute has no args, + then every pointer argument is checked (in which case the check + for pointer type is done in check_nonnull_arg). */ + for (param = params, param_num = 1; ; + param_num++, param = TREE_CHAIN (param)) + { + if (! param) + break; + if (! args || nonnull_check_p (args, param_num)) + check_function_arguments_recurse (check_nonnull_arg, NULL, + TREE_VALUE (param), + param_num); + } + } + } + } + + /* Helper for check_function_nonnull; given a list of operands which + must be non-null in ARGS, determine if operand PARAM_NUM should be + checked. */ + + static bool + nonnull_check_p (args, param_num) + tree args; + unsigned HOST_WIDE_INT param_num; + { + unsigned HOST_WIDE_INT arg_num; + + for (; args; args = TREE_CHAIN (args)) + { + if (! get_nonnull_operand (TREE_VALUE (args), &arg_num)) + abort (); + + if (arg_num == param_num) + return true; + } + return false; + } + + /* Check that the function argument PARAM (which is operand number + PARAM_NUM) is non-null. This is called by check_function_nonnull + via check_function_arguments_recurse. */ + + static void + check_nonnull_arg (ctx, param, param_num) + void *ctx ATTRIBUTE_UNUSED; + tree param; + unsigned HOST_WIDE_INT param_num; + { + /* Just skip checking the argument if it's not a pointer. This can + happen if the "nonnull" attribute was given without an operand + list (which means to check every pointer argument). */ + + if (TREE_CODE (TREE_TYPE (param)) != POINTER_TYPE) + return; + + if (integer_zerop (param)) + warning ("null argument where non-null required (arg %lu)", + (unsigned long) param_num); + } + + /* Helper for nonnull attribute handling; fetch the operand number + from the attribute argument list. */ + + static bool + get_nonnull_operand (arg_num_expr, valp) + tree arg_num_expr; + unsigned HOST_WIDE_INT *valp; + { + /* Strip any conversions from the arg number and verify they + are constants. */ + while (TREE_CODE (arg_num_expr) == NOP_EXPR + || TREE_CODE (arg_num_expr) == CONVERT_EXPR + || TREE_CODE (arg_num_expr) == NON_LVALUE_EXPR) + arg_num_expr = TREE_OPERAND (arg_num_expr, 0); + + if (TREE_CODE (arg_num_expr) != INTEGER_CST + || TREE_INT_CST_HIGH (arg_num_expr) != 0) + return false; + + *valp = TREE_INT_CST_LOW (arg_num_expr); + return true; + } + + /* Handle a "nothrow" attribute; arguments as in + struct attribute_spec.handler. */ + + static tree + handle_nothrow_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) == FUNCTION_DECL) + TREE_NOTHROW (*node) = 1; + /* ??? TODO: Support types. */ + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Check for valid arguments being passed to a function. */ + void + check_function_arguments (attrs, params) + tree attrs; + tree params; + { + /* Check for null being passed in a pointer argument that must be + non-null. We also need to do this if format checking is enabled. */ + + if (warn_nonnull) + check_function_nonnull (attrs, params); + + /* Check for errors in format strings. */ + + if (warn_format) + check_function_format (NULL, attrs, params); + } + + /* Generic argument checking recursion routine. PARAM is the argument to + be checked. PARAM_NUM is the number of the argument. CALLBACK is invoked + once the argument is resolved. CTX is context for the callback. */ + void + check_function_arguments_recurse (callback, ctx, param, param_num) + void (*callback) PARAMS ((void *, tree, unsigned HOST_WIDE_INT)); + void *ctx; + tree param; + unsigned HOST_WIDE_INT param_num; + { + if (TREE_CODE (param) == NOP_EXPR) + { + /* Strip coercion. */ + check_function_arguments_recurse (callback, ctx, + TREE_OPERAND (param, 0), param_num); + return; + } + + if (TREE_CODE (param) == CALL_EXPR) + { + tree type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (param, 0))); + tree attrs; + bool found_format_arg = false; + + /* See if this is a call to a known internationalization function + that modifies a format arg. Such a function may have multiple + format_arg attributes (for example, ngettext). */ + + for (attrs = TYPE_ATTRIBUTES (type); + attrs; + attrs = TREE_CHAIN (attrs)) + if (is_attribute_p ("format_arg", TREE_PURPOSE (attrs))) + { + tree inner_args; + tree format_num_expr; + int format_num; + int i; + + /* Extract the argument number, which was previously checked + to be valid. */ + format_num_expr = TREE_VALUE (TREE_VALUE (attrs)); + while (TREE_CODE (format_num_expr) == NOP_EXPR + || TREE_CODE (format_num_expr) == CONVERT_EXPR + || TREE_CODE (format_num_expr) == NON_LVALUE_EXPR) + format_num_expr = TREE_OPERAND (format_num_expr, 0); + + if (TREE_CODE (format_num_expr) != INTEGER_CST + || TREE_INT_CST_HIGH (format_num_expr) != 0) + abort (); + + format_num = TREE_INT_CST_LOW (format_num_expr); + + for (inner_args = TREE_OPERAND (param, 1), i = 1; + inner_args != 0; + inner_args = TREE_CHAIN (inner_args), i++) + if (i == format_num) + { + check_function_arguments_recurse (callback, ctx, + TREE_VALUE (inner_args), + param_num); + found_format_arg = true; + break; + } + } + + /* If we found a format_arg attribute and did a recursive check, + we are done with checking this argument. Otherwise, we continue + and this will be considered a non-literal. */ + if (found_format_arg) + return; + } + + if (TREE_CODE (param) == COND_EXPR) + { + /* Check both halves of the conditional expression. */ + check_function_arguments_recurse (callback, ctx, + TREE_OPERAND (param, 1), param_num); + check_function_arguments_recurse (callback, ctx, + TREE_OPERAND (param, 2), param_num); + return; + } + + (*callback) (ctx, param, param_num); + } + + #include "gt-c-common.h" diff -Nrc3pad gcc-3.2.3/gcc/c-common.def gcc-3.3/gcc/c-common.def *** gcc-3.2.3/gcc/c-common.def 2002-03-16 01:07:52.000000000 +0000 --- gcc-3.3/gcc/c-common.def 2002-09-29 13:16:42.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 23,29 **** 02111-1307, USA. */ /* Tree nodes relevant to both C and C++. These were originally in ! cp-tree.def in the cp subdir. */ /* A node to remember a source position. */ DEFTREECODE (SRCLOC, "srcloc", 'x', 2) --- 23,29 ---- 02111-1307, USA. */ /* Tree nodes relevant to both C and C++. These were originally in ! cp-tree.def in the cp subdir. */ /* A node to remember a source position. */ DEFTREECODE (SRCLOC, "srcloc", 'x', 2) *************** DEFTREECODE (ARROW_EXPR, "arrow_expr", ' *** 33,87 **** DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1) /* Used to represent an expression statement. Use `EXPR_STMT_EXPR' to ! obtain the expression. */ DEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1) /* Used to represent a brace-enclosed block. The operand is ! COMPOUND_BODY. */ DEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1) /* Used to represent a local declaration. The operand is ! DECL_STMT_DECL. */ DEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1) /* Represents an 'if' statement. The operands are IF_COND, ! THEN_CLAUSE, and ELSE_CLAUSE, respectively. */ DEFTREECODE (IF_STMT, "if_stmt", 'e', 3) /* Used to represent a `for' statement. The operands are ! FOR_INIT_STMT, FOR_COND, FOR_EXPR, and FOR_BODY, respectively. */ DEFTREECODE (FOR_STMT, "for_stmt", 'e', 4) /* Used to represent a 'while' statement. The operands are WHILE_COND ! and WHILE_BODY, respectively. */ DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2) /* Used to represent a 'do' statement. The operands are DO_BODY and ! DO_COND, respectively. */ DEFTREECODE (DO_STMT, "do_stmt", 'e', 2) /* Used to represent a 'return' statement. The operand is ! RETURN_EXPR. */ DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1) ! /* Used to represent a 'break' statement. */ DEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0) ! /* Used to represent a 'continue' statement. */ DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0) /* Used to represent a 'switch' statement. The operands are ! SWITCH_COND, SWITCH_BODY and SWITCH_TYPE, respectively. */ DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 3) ! /* Used to represent a 'goto' statement. The operand is GOTO_DESTINATION. */ DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1) /* Used to represent a 'label' statement. The operand is a LABEL_DECL ! and can be obtained through the macro LABEL_STMT_LABEL. */ DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1) ! /* Used to represent an inline assembly statement. */ DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5) /* A SCOPE_STMT marks the beginning or end of a scope. If --- 33,87 ---- DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1) /* Used to represent an expression statement. Use `EXPR_STMT_EXPR' to ! obtain the expression. */ DEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1) /* Used to represent a brace-enclosed block. The operand is ! COMPOUND_BODY. */ DEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1) /* Used to represent a local declaration. The operand is ! DECL_STMT_DECL. */ DEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1) /* Represents an 'if' statement. The operands are IF_COND, ! THEN_CLAUSE, and ELSE_CLAUSE, respectively. */ DEFTREECODE (IF_STMT, "if_stmt", 'e', 3) /* Used to represent a `for' statement. The operands are ! FOR_INIT_STMT, FOR_COND, FOR_EXPR, and FOR_BODY, respectively. */ DEFTREECODE (FOR_STMT, "for_stmt", 'e', 4) /* Used to represent a 'while' statement. The operands are WHILE_COND ! and WHILE_BODY, respectively. */ DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2) /* Used to represent a 'do' statement. The operands are DO_BODY and ! DO_COND, respectively. */ DEFTREECODE (DO_STMT, "do_stmt", 'e', 2) /* Used to represent a 'return' statement. The operand is ! RETURN_STMT_EXPR. */ DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1) ! /* Used to represent a 'break' statement. */ DEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0) ! /* Used to represent a 'continue' statement. */ DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0) /* Used to represent a 'switch' statement. The operands are ! SWITCH_COND, SWITCH_BODY and SWITCH_TYPE, respectively. */ DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 3) ! /* Used to represent a 'goto' statement. The operand is GOTO_DESTINATION. */ DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1) /* Used to represent a 'label' statement. The operand is a LABEL_DECL ! and can be obtained through the macro LABEL_STMT_LABEL. */ DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1) ! /* Used to represent an inline assembly statement. */ DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5) /* A SCOPE_STMT marks the beginning or end of a scope. If diff -Nrc3pad gcc-3.2.3/gcc/c-common.h gcc-3.3/gcc/c-common.h *** gcc-3.2.3/gcc/c-common.h 2002-12-01 18:19:09.000000000 +0000 --- gcc-3.3/gcc/c-common.h 2002-12-01 17:51:44.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 43,49 **** */ /* Reserved identifiers. This is the union of all the keywords for C, ! C++, and Objective C. All the type modifiers have to be in one block at the beginning, because they are used as mask bits. There are 27 type modifiers; if we add many more we will have to redesign the mask mechanism. */ --- 43,49 ---- */ /* Reserved identifiers. This is the union of all the keywords for C, ! C++, and Objective-C. All the type modifiers have to be in one block at the beginning, because they are used as mask bits. There are 27 type modifiers; if we add many more we will have to redesign the mask mechanism. */ *************** enum rid *** 58,64 **** RID_VOLATILE, RID_SIGNED, RID_AUTO, RID_RESTRICT, /* C extensions */ ! RID_BOUNDED, RID_UNBOUNDED, RID_COMPLEX, /* C++ */ RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE, --- 58,64 ---- RID_VOLATILE, RID_SIGNED, RID_AUTO, RID_RESTRICT, /* C extensions */ ! RID_BOUNDED, RID_UNBOUNDED, RID_COMPLEX, RID_THREAD, /* C++ */ RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE, *************** enum rid *** 93,104 **** /* casts */ RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST, ! /* alternate spellings */ ! RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ, ! RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, ! RID_BITAND, RID_BITOR, RID_COMPL, ! ! /* Objective C */ RID_ID, RID_AT_ENCODE, RID_AT_END, RID_AT_CLASS, RID_AT_ALIAS, RID_AT_DEFS, RID_AT_PRIVATE, RID_AT_PROTECTED, RID_AT_PUBLIC, --- 93,99 ---- /* casts */ RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST, ! /* Objective-C */ RID_ID, RID_AT_ENCODE, RID_AT_END, RID_AT_CLASS, RID_AT_ALIAS, RID_AT_DEFS, RID_AT_PRIVATE, RID_AT_PROTECTED, RID_AT_PUBLIC, *************** enum c_tree_index *** 179,188 **** /* Identifier part common to the C front ends. Inherits from tree_identifier, despite appearances. */ ! struct c_common_identifier { struct tree_common common; ! struct cpp_hashnode node; }; #define wchar_type_node c_global_trees[CTI_WCHAR_TYPE] --- 174,183 ---- /* Identifier part common to the C front ends. Inherits from tree_identifier, despite appearances. */ ! struct c_common_identifier GTY(()) { struct tree_common common; ! struct cpp_hashnode GTY ((skip (""))) node; }; #define wchar_type_node c_global_trees[CTI_WCHAR_TYPE] *************** struct c_common_identifier *** 226,232 **** /* A node for `((void) 0)'. */ #define void_zero_node c_global_trees[CTI_VOID_ZERO] ! extern tree c_global_trees[CTI_MAX]; /* Mark which labels are explicitly declared. These may be shadowed, and may be referenced from nested functions. */ --- 221,227 ---- /* A node for `((void) 0)'. */ #define void_zero_node c_global_trees[CTI_VOID_ZERO] ! extern GTY(()) tree c_global_trees[CTI_MAX]; /* Mark which labels are explicitly declared. These may be shadowed, and may be referenced from nested functions. */ *************** extern tree c_global_trees[CTI_MAX]; *** 238,253 **** typedef enum c_language_kind { ! clk_c, /* A dialect of C: K&R C, ANSI/ISO C89, C2000, ! etc. */ ! clk_cplusplus, /* ANSI/ISO C++ */ ! clk_objective_c /* Objective C */ } c_language_kind; /* Information about a statement tree. */ ! struct stmt_tree_s { /* The last statement added to the tree. */ tree x_last_stmt; /* The type of the last expression statement. (This information is --- 233,246 ---- typedef enum c_language_kind { ! clk_c = 0, /* A dialect of C: K&R C, ANSI/ISO C89, C2000, etc. */ ! clk_cplusplus /* ANSI/ISO C++ */ } c_language_kind; /* Information about a statement tree. */ ! struct stmt_tree_s GTY(()) { /* The last statement added to the tree. */ tree x_last_stmt; /* The type of the last expression statement. (This information is *************** struct stmt_tree_s { *** 255,266 **** tree x_last_expr_type; /* The last filename we recorded. */ const char *x_last_expr_filename; ! /* In C++, Non-zero if we should treat statements as full expressions. In particular, this variable is no-zero if at the end of a statement we should destroy any temporaries created during that statement. Similarly, if, at the end of a block, we should destroy any local variables in this block. Normally, this ! variable is non-zero, since those are the normal semantics of C++. However, in order to represent aggregate initialization code as --- 248,259 ---- tree x_last_expr_type; /* The last filename we recorded. */ const char *x_last_expr_filename; ! /* In C++, Nonzero if we should treat statements as full expressions. In particular, this variable is no-zero if at the end of a statement we should destroy any temporaries created during that statement. Similarly, if, at the end of a block, we should destroy any local variables in this block. Normally, this ! variable is nonzero, since those are the normal semantics of C++. However, in order to represent aggregate initialization code as *************** typedef struct stmt_tree_s *stmt_tree; *** 277,283 **** /* Global state pertinent to the current function. Some C dialects extend this structure with additional fields. */ ! struct language_function { /* While we are parsing the function, this contains information about the statement-tree that we are building. */ struct stmt_tree_s x_stmt_tree; --- 270,276 ---- /* Global state pertinent to the current function. Some C dialects extend this structure with additional fields. */ ! struct c_language_function GTY(()) { /* While we are parsing the function, this contains information about the statement-tree that we are building. */ struct stmt_tree_s x_stmt_tree; *************** extern int (*lang_statement_code_p) *** 316,326 **** --- 309,322 ---- extern void (*lang_expand_stmt) PARAMS ((tree)); extern void (*lang_expand_decl_stmt) PARAMS ((tree)); extern void (*lang_expand_function_end) PARAMS ((void)); + extern tree gettags PARAMS ((void)); /* Callback that determines if it's ok for a function to have no noreturn attribute. */ extern int (*lang_missing_noreturn_ok_p) PARAMS ((tree)); + extern int yyparse PARAMS ((void)); + extern void free_parser_stacks PARAMS ((void)); extern stmt_tree current_stmt_tree PARAMS ((void)); extern tree *current_scope_stmt_stack PARAMS ((void)); *************** extern tree walk_stmt_tree PARAMS ((tr *** 336,342 **** void *)); extern void prep_stmt PARAMS ((tree)); extern void expand_stmt PARAMS ((tree)); - extern void mark_stmt_tree PARAMS ((void *)); extern void shadow_warning PARAMS ((const char *, tree, tree)); extern tree c_begin_if_stmt PARAMS ((void)); --- 332,337 ---- *************** extern void c_finish_while_stmt_cond PA *** 349,355 **** structure for FUNCTION_DECLs; all other DECLs have a NULL DECL_LANG_SPECIFIC field. */ ! struct c_lang_decl { unsigned declared_inline : 1; }; --- 344,350 ---- structure for FUNCTION_DECLs; all other DECLs have a NULL DECL_LANG_SPECIFIC field. */ ! struct c_lang_decl GTY(()) { unsigned declared_inline : 1; }; *************** struct c_lang_decl { *** 360,376 **** #define DECL_NUM_STMTS(NODE) \ (FUNCTION_DECL_CHECK (NODE)->decl.u1.i) - extern void c_mark_lang_decl PARAMS ((struct c_lang_decl *)); - /* The variant of the C language being processed. Each C language front-end defines this variable. */ extern c_language_kind c_language; ! /* Nonzero means give string constants the type `const char *', rather ! than `char *'. */ ! extern int flag_const_strings; /* Nonzero means give `double' the same size as `float'. */ --- 355,389 ---- #define DECL_NUM_STMTS(NODE) \ (FUNCTION_DECL_CHECK (NODE)->decl.u1.i) /* The variant of the C language being processed. Each C language front-end defines this variable. */ extern c_language_kind c_language; ! /* Switches common to the C front ends. */ ! /* Nonzero if prepreprocessing only. */ ! extern int flag_preprocess_only; ! ! /* Nonzero if an ISO standard was selected. It rejects macros in the ! user's namespace. */ ! extern int flag_iso; ! ! /* Nonzero whenever Objective-C functionality is being used. */ ! extern int flag_objc; ! ! /* Nonzero if -undef was given. It suppresses target built-in macros ! and assertions. */ ! extern int flag_undef; ! ! /* Nonzero means don't recognize the non-ANSI builtin functions. */ ! ! extern int flag_no_builtin; ! ! /* Nonzero means don't recognize the non-ANSI builtin functions. ! -ansi sets this. */ ! ! extern int flag_no_nonansi_builtin; /* Nonzero means give `double' the same size as `float'. */ *************** extern int flag_short_double; *** 380,386 **** extern int flag_short_wchar; ! /* Warn about *printf or *scanf format/argument anomalies. */ extern int warn_format; --- 393,483 ---- extern int flag_short_wchar; ! /* Nonzero means allow Microsoft extensions without warnings or errors. */ ! extern int flag_ms_extensions; ! ! /* Nonzero means don't recognize the keyword `asm'. */ ! ! extern int flag_no_asm; ! ! /* Nonzero means give string constants the type `const char *', as mandated ! by the standard. */ ! ! extern int flag_const_strings; ! ! /* Nonzero means `$' can be in an identifier. */ ! ! extern int dollars_in_ident; ! ! /* Nonzero means to treat bitfields as signed unless they say `unsigned'. */ ! ! extern int flag_signed_bitfields; ! extern int explicit_flag_signed_bitfields; ! ! /* Nonzero means warn about pointer casts that can drop a type qualifier ! from the pointer target type. */ ! ! extern int warn_cast_qual; ! ! /* Warn about functions which might be candidates for format attributes. */ ! ! extern int warn_missing_format_attribute; ! ! /* Nonzero means warn about sizeof(function) or addition/subtraction ! of function pointers. */ ! ! extern int warn_pointer_arith; ! ! /* Nonzero means warn for any global function def ! without separate previous prototype decl. */ ! ! extern int warn_missing_prototypes; ! ! /* Warn if adding () is suggested. */ ! ! extern int warn_parentheses; ! ! /* Warn if initializer is not completely bracketed. */ ! ! extern int warn_missing_braces; ! ! /* Warn about comparison of signed and unsigned values. ! If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified. */ ! ! extern int warn_sign_compare; ! ! /* Nonzero means warn about usage of long long when `-pedantic'. */ ! ! extern int warn_long_long; ! ! /* Nonzero means warn about deprecated conversion from string constant to ! `char *'. */ ! ! extern int warn_write_strings; ! ! /* Nonzero means warn about multiple (redundant) decls for the same single ! variable or function. */ ! ! extern int warn_redundant_decls; ! ! /* Warn about testing equality of floating point numbers. */ ! ! extern int warn_float_equal; ! ! /* Warn about a subscript that has type char. */ ! ! extern int warn_char_subscripts; ! ! /* Warn if a type conversion is done that might have confusing results. */ ! ! extern int warn_conversion; ! ! /* Warn about #pragma directives that are not recognized. */ ! ! extern int warn_unknown_pragmas; /* Tri state variable. */ ! ! /* Warn about format/argument anomalies in calls to formatted I/O functions ! (*printf, *scanf, strftime, strfmon, etc.). */ extern int warn_format; *************** extern int warn_format_y2k; *** 392,397 **** --- 489,498 ---- extern int warn_format_extra_args; + /* Warn about zero-length formats. */ + + extern int warn_format_zero_length; + /* Warn about non-literal format arguments. */ extern int warn_format_nonliteral; *************** extern int warn_format_nonliteral; *** 400,424 **** extern int warn_format_security; - /* Warn about possible violations of sequence point rules. */ - - extern int warn_sequence_point; - - /* Warn about functions which might be candidates for format attributes. */ ! extern int warn_missing_format_attribute; - /* Nonzero means warn about sizeof (function) or addition/subtraction - of function pointers. */ ! extern int warn_pointer_arith; ! /* Nonzero means to warn about compile-time division by zero. */ ! extern int warn_div_by_zero; ! /* Nonzero means do some things the same way PCC does. */ ! extern int flag_traditional; /* Nonzero means enable C89 Amendment 1 features. */ --- 501,519 ---- extern int warn_format_security; ! /* C/ObjC language option variables. */ ! /* Nonzero means message about use of implicit function declarations; ! 1 means warning; 2 means error. */ ! extern int mesg_implicit_function_declaration; ! /* Nonzero means allow type mismatches in conditional expressions; ! just make their values `void'. */ ! extern int flag_cond_mismatch; /* Nonzero means enable C89 Amendment 1 features. */ *************** extern int flag_isoc94; *** 428,434 **** extern int flag_isoc99; ! /* Nonzero means environment is hosted (i.e., not freestanding) */ extern int flag_hosted; --- 523,529 ---- extern int flag_isoc99; ! /* Nonzero means that we have builtin functions, and main is an int */ extern int flag_hosted; *************** extern int flag_hosted; *** 437,463 **** extern int flag_noniso_default_format_attributes; ! /* Nonzero means don't recognize any builtin functions. */ ! extern int flag_no_builtin; ! /* Nonzero means don't recognize the non-ANSI builtin functions. ! -ansi sets this. */ ! extern int flag_no_nonansi_builtin; ! /* Nonzero means warn about suggesting putting in ()'s. */ ! extern int warn_parentheses; ! /* Warn if a type conversion is done that might have confusing results. */ ! extern int warn_conversion; ! /* Nonzero means warn about usage of long long, ! when `-pedantic' and not C99. */ ! extern int warn_long_long; /* Nonzero means the expression being parsed will never be evaluated. This is a count, since unevaluated expressions can nest. */ --- 532,817 ---- extern int flag_noniso_default_format_attributes; ! /* Nonzero means warn when casting a function call to a type that does ! not match the return type (e.g. (float)sqrt() or (anything*)malloc() ! when there is no previous declaration of sqrt or malloc. */ ! extern int warn_bad_function_cast; ! /* Warn about traditional constructs whose meanings changed in ANSI C. */ ! extern int warn_traditional; ! /* Nonzero means warn for non-prototype function decls ! or non-prototyped defs without previous prototype. */ ! extern int warn_strict_prototypes; ! /* Nonzero means warn for any global function def ! without separate previous decl. */ ! extern int warn_missing_declarations; ! /* Nonzero means warn about extern declarations of objects not at ! file-scope level and about *all* declarations of functions (whether ! extern or static) not at file-scope level. Note that we exclude ! implicit function declarations. To get warnings about those, use ! -Wimplicit. */ ! extern int warn_nested_externs; ! ! /* Warn if main is suspicious. */ ! ! extern int warn_main; ! ! /* Nonzero means warn about possible violations of sequence point rules. */ ! ! extern int warn_sequence_point; ! ! /* Nonzero means to warn about compile-time division by zero. */ ! extern int warn_div_by_zero; ! ! /* Nonzero means warn about use of implicit int. */ ! ! extern int warn_implicit_int; ! ! /* Warn about NULL being passed to argument slots marked as requiring ! non-NULL. */ ! ! extern int warn_nonnull; ! ! ! /* ObjC language option variables. */ ! ! ! /* Open and close the file for outputting class declarations, if ! requested (ObjC). */ ! ! extern int flag_gen_declaration; ! ! /* Generate code for GNU or NeXT runtime environment. */ ! ! extern int flag_next_runtime; ! ! /* Tells the compiler that this is a special run. Do not perform any ! compiling, instead we are to test some platform dependent features ! and output a C header file with appropriate definitions. */ ! ! extern int print_struct_values; ! ! /* ???. Undocumented. */ ! ! extern const char *constant_string_class_name; ! ! /* Warn if multiple methods are seen for the same selector, but with ! different argument types. Performs the check on the whole selector ! table at the end of compilation. */ ! ! extern int warn_selector; ! ! /* Warn if a @selector() is found, and no method with that selector ! has been previously declared. The check is done on each ! @selector() as soon as it is found - so it warns about forward ! declarations. */ ! ! extern int warn_undeclared_selector; ! ! /* Warn if methods required by a protocol are not implemented in the ! class adopting it. When turned off, methods inherited to that ! class are also considered implemented. */ ! ! extern int warn_protocol; ! ! ! /* C++ language option variables. */ ! ! ! /* Nonzero means don't recognize any extension keywords. */ ! ! extern int flag_no_gnu_keywords; ! ! /* Nonzero means do emit exported implementations of functions even if ! they can be inlined. */ ! ! extern int flag_implement_inlines; ! ! /* Nonzero means do emit exported implementations of templates, instead of ! multiple static copies in each file that needs a definition. */ ! ! extern int flag_external_templates; ! ! /* Nonzero means that the decision to emit or not emit the implementation of a ! template depends on where the template is instantiated, rather than where ! it is defined. */ ! ! extern int flag_alt_external_templates; ! ! /* Nonzero means that implicit instantiations will be emitted if needed. */ ! ! extern int flag_implicit_templates; ! ! /* Nonzero means that implicit instantiations of inline templates will be ! emitted if needed, even if instantiations of non-inline templates ! aren't. */ ! ! extern int flag_implicit_inline_templates; ! ! /* Nonzero means generate separate instantiation control files and ! juggle them at link time. */ ! ! extern int flag_use_repository; ! ! /* Nonzero if we want to issue diagnostics that the standard says are not ! required. */ ! ! extern int flag_optional_diags; ! ! /* Nonzero means we should attempt to elide constructors when possible. */ ! ! extern int flag_elide_constructors; ! ! /* Nonzero means that member functions defined in class scope are ! inline by default. */ ! ! extern int flag_default_inline; ! ! /* Controls whether compiler generates 'type descriptor' that give ! run-time type information. */ ! ! extern int flag_rtti; ! ! /* Nonzero if we want to conserve space in the .o files. We do this ! by putting uninitialized data and runtime initialized data into ! .common instead of .data at the expense of not flagging multiple ! definitions. */ ! ! extern int flag_conserve_space; ! ! /* Nonzero if we want to obey access control semantics. */ ! ! extern int flag_access_control; ! ! /* Nonzero if we want to check the return value of new and avoid calling ! constructors if it is a null pointer. */ ! ! extern int flag_check_new; ! ! /* Nonzero if we want the new ISO rules for pushing a new scope for `for' ! initialization variables. ! 0: Old rules, set by -fno-for-scope. ! 2: New ISO rules, set by -ffor-scope. ! 1: Try to implement new ISO rules, but with backup compatibility ! (and warnings). This is the default, for now. */ ! ! extern int flag_new_for_scope; ! ! /* Nonzero if we want to emit defined symbols with common-like linkage as ! weak symbols where possible, in order to conform to C++ semantics. ! Otherwise, emit them as local symbols. */ ! ! extern int flag_weak; ! ! /* Nonzero to use __cxa_atexit, rather than atexit, to register ! destructors for local statics and global objects. */ ! ! extern int flag_use_cxa_atexit; ! ! /* Nonzero means output .vtable_{entry,inherit} for use in doing vtable gc. */ ! ! extern int flag_vtable_gc; ! ! /* Nonzero means make the default pedwarns warnings instead of errors. ! The value of this flag is ignored if -pedantic is specified. */ ! ! extern int flag_permissive; ! ! /* Nonzero means to implement standard semantics for exception ! specifications, calling unexpected if an exception is thrown that ! doesn't match the specification. Zero means to treat them as ! assertions and optimize accordingly, but not check them. */ ! ! extern int flag_enforce_eh_specs; ! ! /* The version of the C++ ABI in use. The following values are ! allowed: ! ! 0: The version of the ABI believed most conformant with the ! C++ ABI specification. This ABI may change as bugs are ! discovered and fixed. Therefore, 0 will not necessarily ! indicate the same ABI in different versions of G++. ! ! 1: The version of the ABI first used in G++ 3.2. ! ! Additional positive integers will be assigned as new versions of ! the ABI become the default version of the ABI. */ ! ! extern int flag_abi_version; ! ! /* Nonzero means warn about things that will change when compiling ! with an ABI-compliant compiler. */ ! ! extern int warn_abi; ! ! /* Nonzero means warn about implicit declarations. */ ! ! extern int warn_implicit; ! ! /* Nonzero means warn when all ctors or dtors are private, and the class ! has no friends. */ ! ! extern int warn_ctor_dtor_privacy; ! ! /* Nonzero means warn in function declared in derived class has the ! same name as a virtual in the base class, but fails to match the ! type signature of any virtual function in the base class. */ ! ! extern int warn_overloaded_virtual; ! ! /* Nonzero means warn when declaring a class that has a non virtual ! destructor, when it really ought to have a virtual one. */ ! ! extern int warn_nonvdtor; ! ! /* Nonzero means warn when the compiler will reorder code. */ ! ! extern int warn_reorder; ! ! /* Nonzero means warn when synthesis behavior differs from Cfront's. */ ! ! extern int warn_synth; ! ! /* Nonzero means warn when we convert a pointer to member function ! into a pointer to (void or function). */ ! ! extern int warn_pmf2ptr; ! ! /* Nonzero means warn about violation of some Effective C++ style rules. */ ! ! extern int warn_ecpp; ! ! /* Nonzero means warn where overload resolution chooses a promotion from ! unsigned to signed over a conversion to an unsigned of the same size. */ ! ! extern int warn_sign_promo; ! ! /* Nonzero means warn when an old-style cast is used. */ ! ! extern int warn_old_style_cast; ! ! /* Nonzero means warn when non-templatized friend functions are ! declared within a template */ ! ! extern int warn_nontemplate_friend; ! ! /* Nonzero means complain about deprecated features. */ ! ! extern int warn_deprecated; ! ! /* Maximum template instantiation depth. This limit is rather ! arbitrary, but it exists to limit the time it takes to notice ! infinite template instantiations. */ ! ! extern int max_tinst_depth; /* Nonzero means the expression being parsed will never be evaluated. This is a count, since unevaluated expressions can nest. */ *************** extern int skip_evaluation; *** 484,489 **** --- 838,847 ---- what operator was specified for it. */ #define C_EXP_ORIGINAL_CODE(exp) ((enum tree_code) TREE_COMPLEXITY (exp)) + /* Attribute table common to the C front ends. */ + extern const struct attribute_spec c_common_attribute_table[]; + extern const struct attribute_spec c_common_format_attribute_table[]; + /* Pointer to function to lazily generate the VAR_DECL for __FUNCTION__ etc. ID is the identifier to use, NAME is the string. TYPE_DEP indicates whether it depends on type of the function or not *************** extern const char *fname_as_string PARA *** 501,506 **** --- 859,870 ---- extern tree fname_decl PARAMS ((unsigned, tree)); extern const char *fname_string PARAMS ((unsigned)); + extern void check_function_arguments PARAMS ((tree, tree)); + extern void check_function_arguments_recurse PARAMS ((void (*) (void *, + tree, + unsigned HOST_WIDE_INT), + void *, tree, + unsigned HOST_WIDE_INT)); extern void check_function_format PARAMS ((int *, tree, tree)); extern void set_Wformat PARAMS ((int)); extern tree handle_format_attribute PARAMS ((tree *, tree, tree, *************** extern tree handle_format_attribute PAR *** 508,530 **** extern tree handle_format_arg_attribute PARAMS ((tree *, tree, tree, int, bool *)); extern void c_common_insert_default_attributes PARAMS ((tree)); extern void c_apply_type_quals_to_decl PARAMS ((int, tree)); ! extern tree c_sizeof PARAMS ((tree)); ! extern tree c_alignof PARAMS ((tree)); extern tree c_alignof_expr PARAMS ((tree)); /* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */ extern void binary_op_error PARAMS ((enum tree_code)); extern tree c_expand_expr_stmt PARAMS ((tree)); extern void c_expand_start_cond PARAMS ((tree, int, tree)); extern void c_finish_then PARAMS ((void)); extern void c_expand_start_else PARAMS ((void)); ! extern void c_finish_else PARAMS ((void)); extern void c_expand_end_cond PARAMS ((void)); /* Validate the expression after `case' and apply default promotions. */ extern tree check_case_value PARAMS ((tree)); ! /* Concatenate a list of STRING_CST nodes into one STRING_CST. */ ! extern tree combine_strings PARAMS ((tree)); extern void constant_expression_warning PARAMS ((tree)); extern tree convert_and_check PARAMS ((tree, tree)); extern void overflow_warning PARAMS ((tree)); --- 872,905 ---- extern tree handle_format_arg_attribute PARAMS ((tree *, tree, tree, int, bool *)); extern void c_common_insert_default_attributes PARAMS ((tree)); + extern int c_common_decode_option PARAMS ((int, char **)); + extern tree c_common_type_for_mode PARAMS ((enum machine_mode, + int)); + extern tree c_common_type_for_size PARAMS ((unsigned int, int)); + extern tree c_common_unsigned_type PARAMS ((tree)); + extern tree c_common_signed_type PARAMS ((tree)); + extern tree c_common_signed_or_unsigned_type PARAMS ((int, tree)); + extern tree c_common_truthvalue_conversion PARAMS ((tree)); extern void c_apply_type_quals_to_decl PARAMS ((int, tree)); ! extern tree c_sizeof_or_alignof_type PARAMS ((tree, enum tree_code, int)); extern tree c_alignof_expr PARAMS ((tree)); /* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */ extern void binary_op_error PARAMS ((enum tree_code)); + #define my_friendly_assert(EXP, N) (void) \ + (((EXP) == 0) ? (fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0) : 0) + extern tree c_expand_expr_stmt PARAMS ((tree)); extern void c_expand_start_cond PARAMS ((tree, int, tree)); extern void c_finish_then PARAMS ((void)); extern void c_expand_start_else PARAMS ((void)); ! extern void c_finish_else PARAMS ((void)); extern void c_expand_end_cond PARAMS ((void)); /* Validate the expression after `case' and apply default promotions. */ extern tree check_case_value PARAMS ((tree)); ! extern tree fix_string_type PARAMS ((tree)); ! struct varray_head_tag; ! extern tree combine_strings PARAMS ((struct varray_head_tag *)); extern void constant_expression_warning PARAMS ((tree)); extern tree convert_and_check PARAMS ((tree, tree)); extern void overflow_warning PARAMS ((tree)); *************** extern void unsigned_conversion_warning *** 533,538 **** --- 908,915 ---- /* Read the rest of the current #-directive line. */ extern char *get_directive_line PARAMS ((void)); #define GET_DIRECTIVE_LINE() get_directive_line () + #define c_sizeof(T) c_sizeof_or_alignof_type (T, SIZEOF_EXPR, 1) + #define c_alignof(T) c_sizeof_or_alignof_type (T, ALIGNOF_EXPR, 1) /* Subroutine of build_binary_op, used for comparison operations. See if the operands have both been converted from subword integer types *************** extern void disable_builtin_function PA *** 554,566 **** extern tree build_va_arg PARAMS ((tree, tree)); extern void c_common_init_options PARAMS ((enum c_language_kind)); ! extern void c_common_post_options PARAMS ((void)); extern const char *c_common_init PARAMS ((const char *)); extern void c_common_finish PARAMS ((void)); extern HOST_WIDE_INT c_common_get_alias_set PARAMS ((tree)); extern bool c_promoting_integer_type_p PARAMS ((tree)); extern int self_promoting_args_p PARAMS ((tree)); - extern tree simple_type_promotes_to PARAMS ((tree)); extern tree strip_array_types PARAMS ((tree)); /* These macros provide convenient access to the various _STMT nodes. */ --- 931,943 ---- extern tree build_va_arg PARAMS ((tree, tree)); extern void c_common_init_options PARAMS ((enum c_language_kind)); ! extern bool c_common_post_options PARAMS ((void)); extern const char *c_common_init PARAMS ((const char *)); extern void c_common_finish PARAMS ((void)); + extern void c_common_parse_file PARAMS ((int)); extern HOST_WIDE_INT c_common_get_alias_set PARAMS ((tree)); extern bool c_promoting_integer_type_p PARAMS ((tree)); extern int self_promoting_args_p PARAMS ((tree)); extern tree strip_array_types PARAMS ((tree)); /* These macros provide convenient access to the various _STMT nodes. */ *************** extern tree strip_array_types *** 591,597 **** /* RETURN_STMT accessors. These give the expression associated with a return statement, and whether it should be ignored when expanding (as opposed to inlining). */ ! #define RETURN_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0) /* EXPR_STMT accessor. This gives the expression associated with an expression statement. */ --- 968,974 ---- /* RETURN_STMT accessors. These give the expression associated with a return statement, and whether it should be ignored when expanding (as opposed to inlining). */ ! #define RETURN_STMT_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0) /* EXPR_STMT accessor. This gives the expression associated with an expression statement. */ *************** extern tree strip_array_types *** 721,727 **** #define STMT_LINENO(NODE) \ (TREE_COMPLEXITY ((NODE))) ! /* If non-zero, the STMT_LINENO for NODE is the line at which the function ended. */ #define STMT_LINENO_FOR_FN_P(NODE) \ (TREE_LANG_FLAG_2 ((NODE))) --- 1098,1104 ---- #define STMT_LINENO(NODE) \ (TREE_COMPLEXITY ((NODE))) ! /* If nonzero, the STMT_LINENO for NODE is the line at which the function ended. */ #define STMT_LINENO_FOR_FN_P(NODE) \ (TREE_LANG_FLAG_2 ((NODE))) *************** enum c_tree_code { *** 744,750 **** #undef DEFTREECODE - extern void add_c_tree_codes PARAMS ((void)); extern void genrtl_do_pushlevel PARAMS ((void)); extern void genrtl_goto_stmt PARAMS ((tree)); extern void genrtl_expr_stmt PARAMS ((tree)); --- 1121,1126 ---- *************** extern tree boolean_increment PARAMS ( *** 830,837 **** after entering or leaving a header file. */ extern void extract_interface_info PARAMS ((void)); - extern void mark_c_language_function PARAMS ((struct language_function *)); - extern int case_compare PARAMS ((splay_tree_key, splay_tree_key)); --- 1206,1211 ---- *************** extern tree finish_label_address_expr P *** 847,864 **** different implementations. Used in c-common.c. */ extern tree lookup_label PARAMS ((tree)); ! /* enum expand_modified is in expr.h, as is the macro below. */ ! ! #ifdef QUEUED_VAR ! extern rtx c_expand_expr PARAMS ((tree, rtx, enum machine_mode, ! enum expand_modifier)); ! #endif extern int c_safe_from_p PARAMS ((rtx, tree)); extern int c_staticp PARAMS ((tree)); ! extern int c_unsafe_for_reeval PARAMS ((tree)); /* Information recorded about each file examined during compilation. */ --- 1221,1239 ---- different implementations. Used in c-common.c. */ extern tree lookup_label PARAMS ((tree)); ! extern rtx c_expand_expr PARAMS ((tree, rtx, ! enum machine_mode, ! int)); extern int c_safe_from_p PARAMS ((rtx, tree)); extern int c_staticp PARAMS ((tree)); ! extern int c_common_unsafe_for_reeval PARAMS ((tree)); ! ! extern const char *init_c_lex PARAMS ((const char *)); ! ! extern void cb_register_builtins PARAMS ((cpp_reader *)); /* Information recorded about each file examined during compilation. */ *************** struct c_fileinfo *** 872,875 **** --- 1247,1252 ---- struct c_fileinfo *get_fileinfo PARAMS ((const char *)); extern void dump_time_statistics PARAMS ((void)); + extern int c_dump_tree PARAMS ((void *, tree)); + #endif /* ! GCC_C_COMMON_H */ diff -Nrc3pad gcc-3.2.3/gcc/c-config-lang.in gcc-3.3/gcc/c-config-lang.in *** gcc-3.2.3/gcc/c-config-lang.in 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/c-config-lang.in 2002-07-14 01:59:12.000000000 +0000 *************** *** 0 **** --- 1,26 ---- + # Top level configure fragment for GNU C - C language. + # Copyright (C) 1994, 1995, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. + + #This file is part of GCC. + + #GCC is free software; you can redistribute it and/or modify + #it under the terms of the GNU General Public License as published by + #the Free Software Foundation; either version 2, or (at your option) + #any later version. + + #GCC is distributed in the hope that it will be useful, + #but WITHOUT ANY WARRANTY; without even the implied warranty of + #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + #GNU General Public License for more details. + + #You should have received a copy of the GNU General Public License + #along with GCC; see the file COPYING. If not, write to + #the Free Software Foundation, 59 Temple Place - Suite 330, + #Boston, MA 02111-1307, USA. + + # This file c-config-lang.c is a special pseudo config-lang.in file + # for the language C. It has limited use, specifically to record the + # files used by C that have garbage collection GTY macros in them + # which therefore need to be scanned by gengtype.c. + + gtfiles="\$(srcdir)/c-lang.c \$(srcdir)/c-parse.in \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-pragma.c \$(srcdir)/c-objc-common.c" diff -Nrc3pad gcc-3.2.3/gcc/c-convert.c gcc-3.3/gcc/c-convert.c *** gcc-3.2.3/gcc/c-convert.c 2001-10-11 03:15:18.000000000 +0000 --- gcc-3.3/gcc/c-convert.c 2002-04-05 09:06:04.000000000 +0000 *************** *** 1,5 **** /* Language-level data type conversion for GNU C. ! Copyright (C) 1987, 1988, 1991, 1998 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Language-level data type conversion for GNU C. ! Copyright (C) 1987, 1988, 1991, 1998, 2002 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 29,34 **** --- 29,35 ---- #include "tree.h" #include "flags.h" #include "convert.h" + #include "c-common.h" #include "toplev.h" /* Change of width--truncation and extension of integers or reals-- *************** Software Foundation, 59 Temple Place - S *** 42,48 **** Here is a list of all the functions that assume that widening and narrowing is always done with a NOP_EXPR: In convert.c, convert_to_integer. ! In c-typeck.c, build_binary_op (boolean ops), and truthvalue_conversion. In expr.c: expand_expr, for operands of a MULT_EXPR. In fold-const.c: fold. In tree.c: get_narrower and get_unwidened. */ --- 43,50 ---- Here is a list of all the functions that assume that widening and narrowing is always done with a NOP_EXPR: In convert.c, convert_to_integer. ! In c-typeck.c, build_binary_op (boolean ops), and ! c_common_truthvalue_conversion. In expr.c: expand_expr, for operands of a MULT_EXPR. In fold-const.c: fold. In tree.c: get_narrower and get_unwidened. */ *************** convert (type, expr) *** 90,98 **** return fold (convert_to_integer (type, e)); if (code == BOOLEAN_TYPE) { ! tree t = truthvalue_conversion (expr); ! /* If truthvalue_conversion returns a NOP_EXPR, we must fold it here ! to avoid infinite recursion between fold () and convert (). */ if (TREE_CODE (t) == NOP_EXPR) return fold (build1 (NOP_EXPR, type, TREE_OPERAND (t, 0))); else --- 92,100 ---- return fold (convert_to_integer (type, e)); if (code == BOOLEAN_TYPE) { ! tree t = c_common_truthvalue_conversion (expr); ! /* If it returns a NOP_EXPR, we must fold it here to avoid ! infinite recursion between fold () and convert (). */ if (TREE_CODE (t) == NOP_EXPR) return fold (build1 (NOP_EXPR, type, TREE_OPERAND (t, 0))); else diff -Nrc3pad gcc-3.2.3/gcc/c-decl.c gcc-3.3/gcc/c-decl.c *** gcc-3.2.3/gcc/c-decl.c 2003-03-12 10:04:51.000000000 +0000 --- gcc-3.3/gcc/c-decl.c 2003-04-18 17:48:44.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 37,43 **** #include "output.h" #include "expr.h" #include "c-tree.h" - #include "c-lex.h" #include "toplev.h" #include "ggc.h" #include "tm_p.h" --- 37,42 ---- *************** static int current_function_prototype_li *** 104,129 **** /* The current statement tree. */ ! static struct stmt_tree_s c_stmt_tree; /* The current scope statement stack. */ ! static tree c_scope_stmt_stack; /* A list (chain of TREE_LIST nodes) of all LABEL_DECLs in the function that have names. Here so we can clear out their names' definitions at the end of the function. */ ! static tree named_labels; /* A list of LABEL_DECLs from outer contexts that are currently shadowed. */ ! static tree shadowed_labels; ! ! /* Nonzero when store_parm_decls is called indicates a varargs function. ! Value not meaningful after store_parm_decls. */ ! ! static int c_function_varargs; /* Set to 0 at beginning of a function definition, set to 1 if a return statement that specifies a return value is seen. */ --- 103,123 ---- /* The current statement tree. */ ! static GTY(()) struct stmt_tree_s c_stmt_tree; /* The current scope statement stack. */ ! static GTY(()) tree c_scope_stmt_stack; /* A list (chain of TREE_LIST nodes) of all LABEL_DECLs in the function that have names. Here so we can clear out their names' definitions at the end of the function. */ ! static GTY(()) tree named_labels; /* A list of LABEL_DECLs from outer contexts that are currently shadowed. */ ! static GTY(()) tree shadowed_labels; /* Set to 0 at beginning of a function definition, set to 1 if a return statement that specifies a return value is seen. */ *************** static int current_extern_inline; *** 165,171 **** /* Note that the information in the `names' component of the global contour is duplicated in the IDENTIFIER_GLOBAL_VALUEs of all identifiers. */ ! struct binding_level { /* A chain of _DECL nodes for all variables, constants, functions, and typedef types. These are in the reverse of the order supplied. --- 159,165 ---- /* Note that the information in the `names' component of the global contour is duplicated in the IDENTIFIER_GLOBAL_VALUEs of all identifiers. */ ! struct binding_level GTY(()) { /* A chain of _DECL nodes for all variables, constants, functions, and typedef types. These are in the reverse of the order supplied. *************** struct binding_level *** 216,224 **** /* Nonzero means make a BLOCK if this level has any subblocks. */ char keep_if_subblocks; ! /* Number of decls in `names' that have incomplete ! structure or union types. */ ! int n_incomplete; /* A list of decls giving the (reversed) specified order of parms, not including any forward-decls in the parmlist. --- 210,218 ---- /* Nonzero means make a BLOCK if this level has any subblocks. */ char keep_if_subblocks; ! /* List of decls in `names' that have incomplete structure or ! union types. */ ! tree incomplete_list; /* A list of decls giving the (reversed) specified order of parms, not including any forward-decls in the parmlist. *************** struct binding_level *** 230,251 **** /* The binding level currently in effect. */ ! static struct binding_level *current_binding_level; /* A chain of binding_level structures awaiting reuse. */ ! static struct binding_level *free_binding_level; /* The outermost binding level, for names of file scope. This is created when the compiler is started and exists through the entire run. */ ! static struct binding_level *global_binding_level; /* Binding level structures are initialized by copying this one. */ static struct binding_level clear_binding_level ! = {NULL, NULL, NULL, NULL, NULL, NULL_BINDING_LEVEL, 0, 0, 0, 0, 0, 0, NULL}; /* Nonzero means unconditionally make a BLOCK for the next level pushed. */ --- 224,245 ---- /* The binding level currently in effect. */ ! static GTY(()) struct binding_level *current_binding_level; /* A chain of binding_level structures awaiting reuse. */ ! static GTY((deletable (""))) struct binding_level *free_binding_level; /* The outermost binding level, for names of file scope. This is created when the compiler is started and exists through the entire run. */ ! static GTY(()) struct binding_level *global_binding_level; /* Binding level structures are initialized by copying this one. */ static struct binding_level clear_binding_level ! = {NULL, NULL, NULL, NULL, NULL, NULL_BINDING_LEVEL, 0, 0, 0, 0, 0, NULL, NULL}; /* Nonzero means unconditionally make a BLOCK for the next level pushed. */ *************** static int keep_next_if_subblocks; *** 263,269 **** saved values of named_labels and shadowed_labels for a label binding level outside the current one. */ ! static struct binding_level *label_level_chain; /* Functions called automatically at the beginning and end of execution. */ --- 257,263 ---- saved values of named_labels and shadowed_labels for a label binding level outside the current one. */ ! static GTY(()) struct binding_level *label_level_chain; /* Functions called automatically at the beginning and end of execution. */ *************** tree static_ctors, static_dtors; *** 272,278 **** /* Forward declarations. */ static struct binding_level * make_binding_level PARAMS ((void)); ! static void mark_binding_level PARAMS ((void *)); static void clear_limbo_values PARAMS ((tree)); static int duplicate_decls PARAMS ((tree, tree, int)); static int redeclaration_error_message PARAMS ((tree, tree)); --- 266,272 ---- /* Forward declarations. */ static struct binding_level * make_binding_level PARAMS ((void)); ! static void pop_binding_level PARAMS ((struct binding_level **)); static void clear_limbo_values PARAMS ((tree)); static int duplicate_decls PARAMS ((tree, tree, int)); static int redeclaration_error_message PARAMS ((tree, tree)); *************** static void layout_array_type PARAMS (( *** 288,450 **** static tree c_make_fname_decl PARAMS ((tree, int)); static void c_expand_body PARAMS ((tree, int, int)); static void warn_if_shadowing PARAMS ((tree, tree)); - /* C-specific option variables. */ - - /* Nonzero means allow type mismatches in conditional expressions; - just make their values `void'. */ - - int flag_cond_mismatch; - - /* Nonzero means don't recognize the keyword `asm'. */ - - int flag_no_asm; - - /* Nonzero means do some things the same way PCC does. */ - - int flag_traditional; - - /* Nonzero means enable C89 Amendment 1 features. */ - - int flag_isoc94 = 0; - - /* Nonzero means use the ISO C99 dialect of C. */ - - int flag_isoc99 = 0; - - /* Nonzero means that we have builtin functions, and main is an int */ - - int flag_hosted = 1; - - /* Nonzero means add default format_arg attributes for functions not - in ISO C. */ - - int flag_noniso_default_format_attributes = 1; - - /* Nonzero means to allow single precision math even if we're generally - being traditional. */ - int flag_allow_single_precision = 0; - - /* Nonzero means to treat bitfields as signed unless they say `unsigned'. */ - - int flag_signed_bitfields = 1; - int explicit_flag_signed_bitfields = 0; - - /* Nonzero means warn about use of implicit int. */ - - int warn_implicit_int; - - /* Nonzero means warn about usage of long long when `-pedantic'. */ - - int warn_long_long = 1; - - /* Nonzero means message about use of implicit function declarations; - 1 means warning; 2 means error. */ - - int mesg_implicit_function_declaration = -1; - - /* Nonzero means give string constants the type `const char *' - to get extra warnings from them. These warnings will be too numerous - to be useful, except in thoroughly ANSIfied programs. */ - - int flag_const_strings; - - /* Nonzero means warn about pointer casts that can drop a type qualifier - from the pointer target type. */ - - int warn_cast_qual; - - /* Nonzero means warn when casting a function call to a type that does - not match the return type (e.g. (float)sqrt() or (anything*)malloc() - when there is no previous declaration of sqrt or malloc. */ - - int warn_bad_function_cast; - - /* Warn about functions which might be candidates for format attributes. */ - - int warn_missing_format_attribute; - - /* Warn about traditional constructs whose meanings changed in ANSI C. */ - - int warn_traditional; - - /* Nonzero means warn about sizeof(function) or addition/subtraction - of function pointers. */ - - int warn_pointer_arith; - - /* Nonzero means warn for non-prototype function decls - or non-prototyped defs without previous prototype. */ - - int warn_strict_prototypes; - - /* Nonzero means warn for any global function def - without separate previous prototype decl. */ - - int warn_missing_prototypes; - - /* Nonzero means warn for any global function def - without separate previous decl. */ - - int warn_missing_declarations; - - /* Nonzero means warn about multiple (redundant) decls for the same single - variable or function. */ - - int warn_redundant_decls = 0; - - /* Nonzero means warn about extern declarations of objects not at - file-scope level and about *all* declarations of functions (whether - extern or static) not at file-scope level. Note that we exclude - implicit function declarations. To get warnings about those, use - -Wimplicit. */ - - int warn_nested_externs = 0; - - /* Warn about a subscript that has type char. */ - - int warn_char_subscripts = 0; - - /* Warn if a type conversion is done that might have confusing results. */ - - int warn_conversion; - - /* Warn if adding () is suggested. */ - - int warn_parentheses; - - /* Warn if initializer is not completely bracketed. */ - - int warn_missing_braces; - - /* Warn if main is suspicious. */ - - int warn_main; - - /* Warn about #pragma directives that are not recognised. */ - - int warn_unknown_pragmas = 0; /* Tri state variable. */ - - /* Warn about comparison of signed and unsigned values. - If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified. */ - - int warn_sign_compare = -1; - - /* Warn about testing equality of floating point numbers. */ - - int warn_float_equal = 0; - - /* Nonzero means warn about use of multicharacter literals. */ - - int warn_multichar = 1; - - /* Nonzero means `$' can be in an identifier. */ - - #ifndef DOLLARS_IN_IDENTIFIERS - #define DOLLARS_IN_IDENTIFIERS 1 - #endif - int dollars_in_ident = DOLLARS_IN_IDENTIFIERS; - /* States indicating how grokdeclarator() should handle declspecs marked with __attribute__((deprecated)). An object declared as __attribute__((deprecated)) suppresses warnings of uses of other --- 282,290 ---- static tree c_make_fname_decl PARAMS ((tree, int)); static void c_expand_body PARAMS ((tree, int, int)); static void warn_if_shadowing PARAMS ((tree, tree)); + static bool flexible_array_type_p PARAMS ((tree)); + static tree set_save_expr_context PARAMS ((tree *, int *, void *)); /* States indicating how grokdeclarator() should handle declspecs marked with __attribute__((deprecated)). An object declared as __attribute__((deprecated)) suppresses warnings of uses of other *************** enum deprecated_states { *** 457,813 **** static enum deprecated_states deprecated_state = DEPRECATED_NORMAL; - /* Decode the string P as a language-specific option for C. - Return the number of strings consumed. Should not complain - if it does not recognise the option. */ - - int - c_decode_option (argc, argv) - int argc ATTRIBUTE_UNUSED; - char **argv; - { - int strings_processed; - char *p = argv[0]; - - strings_processed = cpp_handle_option (parse_in, argc, argv, 0); - - if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional")) - { - warning ("-traditional is deprecated and may be removed"); - flag_traditional = 1; - flag_writable_strings = 1; - } - else if (!strcmp (p, "-fallow-single-precision")) - flag_allow_single_precision = 1; - else if (!strcmp (p, "-fhosted") || !strcmp (p, "-fno-freestanding")) - { - flag_hosted = 1; - flag_no_builtin = 0; - } - else if (!strcmp (p, "-ffreestanding") || !strcmp (p, "-fno-hosted")) - { - flag_hosted = 0; - flag_no_builtin = 1; - /* warn_main will be 2 if set by -Wall, 1 if set by -Wmain */ - if (warn_main == 2) - warn_main = 0; - } - else if (!strcmp (p, "-fnotraditional") || !strcmp (p, "-fno-traditional")) - { - flag_traditional = 0; - flag_writable_strings = 0; - } - else if (!strncmp (p, "-std=", 5)) - { - /* Select the appropriate language standard. We currently - recognize: - -std=iso9899:1990 same as -ansi - -std=iso9899:199409 ISO C as modified in amend. 1 - -std=iso9899:1999 ISO C 99 - -std=c89 same as -std=iso9899:1990 - -std=c99 same as -std=iso9899:1999 - -std=gnu89 default, iso9899:1990 + gnu extensions - -std=gnu99 iso9899:1999 + gnu extensions - */ - const char *const argstart = &p[5]; - - if (!strcmp (argstart, "iso9899:1990") - || !strcmp (argstart, "c89")) - { - iso_1990: - flag_isoc94 = 0; - iso_1994: - flag_traditional = 0; - flag_writable_strings = 0; - flag_no_asm = 1; - flag_no_nonansi_builtin = 1; - flag_noniso_default_format_attributes = 0; - flag_isoc99 = 0; - } - else if (!strcmp (argstart, "iso9899:199409")) - { - flag_isoc94 = 1; - goto iso_1994; - } - else if (!strcmp (argstart, "iso9899:199x") - || !strcmp (argstart, "iso9899:1999") - || !strcmp (argstart, "c9x") - || !strcmp (argstart, "c99")) - { - flag_traditional = 0; - flag_writable_strings = 0; - flag_no_asm = 1; - flag_no_nonansi_builtin = 1; - flag_noniso_default_format_attributes = 0; - flag_isoc99 = 1; - flag_isoc94 = 1; - } - else if (!strcmp (argstart, "gnu89")) - { - flag_traditional = 0; - flag_writable_strings = 0; - flag_no_asm = 0; - flag_no_nonansi_builtin = 0; - flag_noniso_default_format_attributes = 1; - flag_isoc99 = 0; - flag_isoc94 = 0; - } - else if (!strcmp (argstart, "gnu9x") || !strcmp (argstart, "gnu99")) - { - flag_traditional = 0; - flag_writable_strings = 0; - flag_no_asm = 0; - flag_no_nonansi_builtin = 0; - flag_noniso_default_format_attributes = 1; - flag_isoc99 = 1; - flag_isoc94 = 1; - } - else - error ("unknown C standard `%s'", argstart); - } - else if (!strcmp (p, "-fdollars-in-identifiers")) - dollars_in_ident = 1; - else if (!strcmp (p, "-fno-dollars-in-identifiers")) - dollars_in_ident = 0; - else if (!strcmp (p, "-fsigned-char")) - flag_signed_char = 1; - else if (!strcmp (p, "-funsigned-char")) - flag_signed_char = 0; - else if (!strcmp (p, "-fno-signed-char")) - flag_signed_char = 0; - else if (!strcmp (p, "-fno-unsigned-char")) - flag_signed_char = 1; - else if (!strcmp (p, "-fsigned-bitfields") - || !strcmp (p, "-fno-unsigned-bitfields")) - { - flag_signed_bitfields = 1; - explicit_flag_signed_bitfields = 1; - } - else if (!strcmp (p, "-funsigned-bitfields") - || !strcmp (p, "-fno-signed-bitfields")) - { - flag_signed_bitfields = 0; - explicit_flag_signed_bitfields = 1; - } - else if (!strcmp (p, "-fshort-enums")) - flag_short_enums = 1; - else if (!strcmp (p, "-fno-short-enums")) - flag_short_enums = 0; - else if (!strcmp (p, "-fshort-wchar")) - flag_short_wchar = 1; - else if (!strcmp (p, "-fno-short-wchar")) - flag_short_wchar = 0; - else if (!strcmp (p, "-fcond-mismatch")) - flag_cond_mismatch = 1; - else if (!strcmp (p, "-fno-cond-mismatch")) - flag_cond_mismatch = 0; - else if (!strcmp (p, "-fshort-double")) - flag_short_double = 1; - else if (!strcmp (p, "-fno-short-double")) - flag_short_double = 0; - else if (!strcmp (p, "-fasm")) - flag_no_asm = 0; - else if (!strcmp (p, "-fno-asm")) - flag_no_asm = 1; - else if (!strcmp (p, "-fbuiltin")) - flag_no_builtin = 0; - else if (!strcmp (p, "-fno-builtin")) - flag_no_builtin = 1; - else if (!strncmp (p, "-fno-builtin-", strlen ("-fno-builtin-"))) - disable_builtin_function (p + strlen ("-fno-builtin-")); - else if (p[0] == '-' && p[1] == 'f' && dump_switch_p (p + 2)) - ; - else if (!strcmp (p, "-ansi")) - goto iso_1990; - else if (!strcmp (p, "-Werror-implicit-function-declaration")) - mesg_implicit_function_declaration = 2; - else if (!strcmp (p, "-Wimplicit-function-declaration")) - mesg_implicit_function_declaration = 1; - else if (!strcmp (p, "-Wno-implicit-function-declaration")) - mesg_implicit_function_declaration = 0; - else if (!strcmp (p, "-Wimplicit-int")) - warn_implicit_int = 1; - else if (!strcmp (p, "-Wno-implicit-int")) - warn_implicit_int = 0; - else if (!strcmp (p, "-Wimplicit")) - { - warn_implicit_int = 1; - if (mesg_implicit_function_declaration != 2) - mesg_implicit_function_declaration = 1; - } - else if (!strcmp (p, "-Wno-implicit")) - warn_implicit_int = 0, mesg_implicit_function_declaration = 0; - else if (!strcmp (p, "-Wlong-long")) - warn_long_long = 1; - else if (!strcmp (p, "-Wno-long-long")) - warn_long_long = 0; - else if (!strcmp (p, "-Wwrite-strings")) - flag_const_strings = 1; - else if (!strcmp (p, "-Wno-write-strings")) - flag_const_strings = 0; - else if (!strcmp (p, "-Wcast-qual")) - warn_cast_qual = 1; - else if (!strcmp (p, "-Wno-cast-qual")) - warn_cast_qual = 0; - else if (!strcmp (p, "-Wbad-function-cast")) - warn_bad_function_cast = 1; - else if (!strcmp (p, "-Wno-bad-function-cast")) - warn_bad_function_cast = 0; - else if (!strcmp (p, "-Wno-missing-noreturn")) - warn_missing_noreturn = 0; - else if (!strcmp (p, "-Wmissing-format-attribute")) - warn_missing_format_attribute = 1; - else if (!strcmp (p, "-Wno-missing-format-attribute")) - warn_missing_format_attribute = 0; - else if (!strcmp (p, "-Wpointer-arith")) - warn_pointer_arith = 1; - else if (!strcmp (p, "-Wno-pointer-arith")) - warn_pointer_arith = 0; - else if (!strcmp (p, "-Wstrict-prototypes")) - warn_strict_prototypes = 1; - else if (!strcmp (p, "-Wno-strict-prototypes")) - warn_strict_prototypes = 0; - else if (!strcmp (p, "-Wmissing-prototypes")) - warn_missing_prototypes = 1; - else if (!strcmp (p, "-Wno-missing-prototypes")) - warn_missing_prototypes = 0; - else if (!strcmp (p, "-Wmissing-declarations")) - warn_missing_declarations = 1; - else if (!strcmp (p, "-Wno-missing-declarations")) - warn_missing_declarations = 0; - else if (!strcmp (p, "-Wredundant-decls")) - warn_redundant_decls = 1; - else if (!strcmp (p, "-Wno-redundant-decls")) - warn_redundant_decls = 0; - else if (!strcmp (p, "-Wnested-externs")) - warn_nested_externs = 1; - else if (!strcmp (p, "-Wno-nested-externs")) - warn_nested_externs = 0; - else if (!strcmp (p, "-Wtraditional")) - warn_traditional = 1; - else if (!strcmp (p, "-Wno-traditional")) - warn_traditional = 0; - else if (!strncmp (p, "-Wformat=", 9)) - set_Wformat (atoi (p + 9)); - else if (!strcmp (p, "-Wformat")) - set_Wformat (1); - else if (!strcmp (p, "-Wno-format")) - set_Wformat (0); - else if (!strcmp (p, "-Wformat-y2k")) - warn_format_y2k = 1; - else if (!strcmp (p, "-Wno-format-y2k")) - warn_format_y2k = 0; - else if (!strcmp (p, "-Wformat-extra-args")) - warn_format_extra_args = 1; - else if (!strcmp (p, "-Wno-format-extra-args")) - warn_format_extra_args = 0; - else if (!strcmp (p, "-Wformat-nonliteral")) - warn_format_nonliteral = 1; - else if (!strcmp (p, "-Wno-format-nonliteral")) - warn_format_nonliteral = 0; - else if (!strcmp (p, "-Wformat-security")) - warn_format_security = 1; - else if (!strcmp (p, "-Wno-format-security")) - warn_format_security = 0; - else if (!strcmp (p, "-Wchar-subscripts")) - warn_char_subscripts = 1; - else if (!strcmp (p, "-Wno-char-subscripts")) - warn_char_subscripts = 0; - else if (!strcmp (p, "-Wconversion")) - warn_conversion = 1; - else if (!strcmp (p, "-Wno-conversion")) - warn_conversion = 0; - else if (!strcmp (p, "-Wparentheses")) - warn_parentheses = 1; - else if (!strcmp (p, "-Wno-parentheses")) - warn_parentheses = 0; - else if (!strcmp (p, "-Wreturn-type")) - warn_return_type = 1; - else if (!strcmp (p, "-Wno-return-type")) - warn_return_type = 0; - else if (!strcmp (p, "-Wsequence-point")) - warn_sequence_point = 1; - else if (!strcmp (p, "-Wno-sequence-point")) - warn_sequence_point = 0; - else if (!strcmp (p, "-Wcomment")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wno-comment")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wcomments")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wno-comments")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wtrigraphs")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wno-trigraphs")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wundef")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wno-undef")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wimport")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wno-import")) - ; /* cpp handles this one. */ - else if (!strcmp (p, "-Wmissing-braces")) - warn_missing_braces = 1; - else if (!strcmp (p, "-Wno-missing-braces")) - warn_missing_braces = 0; - else if (!strcmp (p, "-Wmain")) - warn_main = 1; - else if (!strcmp (p, "-Wno-main")) - warn_main = -1; - else if (!strcmp (p, "-Wsign-compare")) - warn_sign_compare = 1; - else if (!strcmp (p, "-Wno-sign-compare")) - warn_sign_compare = 0; - else if (!strcmp (p, "-Wfloat-equal")) - warn_float_equal = 1; - else if (!strcmp (p, "-Wno-float-equal")) - warn_float_equal = 0; - else if (!strcmp (p, "-Wmultichar")) - warn_multichar = 1; - else if (!strcmp (p, "-Wno-multichar")) - warn_multichar = 0; - else if (!strcmp (p, "-Wdiv-by-zero")) - warn_div_by_zero = 1; - else if (!strcmp (p, "-Wno-div-by-zero")) - warn_div_by_zero = 0; - else if (!strcmp (p, "-Wunknown-pragmas")) - /* Set to greater than 1, so that even unknown pragmas in system - headers will be warned about. */ - warn_unknown_pragmas = 2; - else if (!strcmp (p, "-Wno-unknown-pragmas")) - warn_unknown_pragmas = 0; - else if (!strcmp (p, "-Wall")) - { - /* We save the value of warn_uninitialized, since if they put - -Wuninitialized on the command line, we need to generate a - warning about not using it without also specifying -O. */ - if (warn_uninitialized != 1) - warn_uninitialized = 2; - warn_implicit_int = 1; - mesg_implicit_function_declaration = 1; - warn_return_type = 1; - set_Wunused (1); - warn_switch = 1; - set_Wformat (1); - warn_char_subscripts = 1; - warn_parentheses = 1; - warn_sequence_point = 1; - warn_missing_braces = 1; - /* We set this to 2 here, but 1 in -Wmain, so -ffreestanding can turn - it off only if it's not explicit. */ - warn_main = 2; - /* Only warn about unknown pragmas that are not in system headers. */ - warn_unknown_pragmas = 1; - } - else - return strings_processed; - - return 1; - } - void c_print_identifier (file, node, indent) FILE *file; --- 297,302 ---- *************** c_print_identifier (file, node, indent) *** 834,840 **** for a top-level tentative array defn that wasn't complete before. */ void ! finish_incomplete_decl (decl) tree decl; { if (TREE_CODE (decl) == VAR_DECL) --- 323,329 ---- for a top-level tentative array defn that wasn't complete before. */ void ! c_finish_incomplete_decl (decl) tree decl; { if (TREE_CODE (decl) == VAR_DECL) *************** finish_incomplete_decl (decl) *** 854,866 **** } } ! /* Create a new `struct binding_level'. */ static struct binding_level * make_binding_level () { ! /* NOSTRICT */ ! return (struct binding_level *) xmalloc (sizeof (struct binding_level)); } /* Nonzero if we are currently in the global binding level. */ --- 343,375 ---- } } ! /* Reuse or create a struct for this binding level. */ static struct binding_level * make_binding_level () { ! if (free_binding_level) ! { ! struct binding_level *result = free_binding_level; ! free_binding_level = result->level_chain; ! return result; ! } ! else ! return (struct binding_level *) ggc_alloc (sizeof (struct binding_level)); ! } ! ! /* Remove a binding level from a list and add it to the level chain. */ ! ! static void ! pop_binding_level (lp) ! struct binding_level **lp; ! { ! struct binding_level *l = *lp; ! *lp = l->level_chain; ! ! memset (l, 0, sizeof (struct binding_level)); ! l->level_chain = free_binding_level; ! free_binding_level = l; } /* Nonzero if we are currently in the global binding level. */ *************** pushlevel (tag_transparent) *** 928,944 **** named_labels = 0; } ! /* Reuse or create a struct for this binding level. */ ! ! if (free_binding_level) ! { ! newlevel = free_binding_level; ! free_binding_level = free_binding_level->level_chain; ! } ! else ! { ! newlevel = make_binding_level (); ! } /* Add this level to the front of the chain (stack) of levels that are active. */ --- 437,443 ---- named_labels = 0; } ! newlevel = make_binding_level (); /* Add this level to the front of the chain (stack) of levels that are active. */ *************** poplevel (keep, reverse, functionbody) *** 1159,1171 **** /* Pop the current level, and free the structure for reuse. */ ! { ! struct binding_level *level = current_binding_level; ! current_binding_level = current_binding_level->level_chain; ! ! level->level_chain = free_binding_level; ! free_binding_level = level; ! } /* Dispose of the block that we just made inside some higher level. */ if (functionbody) --- 658,664 ---- /* Pop the current level, and free the structure for reuse. */ ! pop_binding_level (¤t_binding_level); /* Dispose of the block that we just made inside some higher level. */ if (functionbody) *************** push_label_level () *** 1244,1260 **** { struct binding_level *newlevel; ! /* Reuse or create a struct for this binding level. */ ! ! if (free_binding_level) ! { ! newlevel = free_binding_level; ! free_binding_level = free_binding_level->level_chain; ! } ! else ! { ! newlevel = make_binding_level (); ! } /* Add this level to the front of the chain (stack) of label levels. */ --- 737,743 ---- { struct binding_level *newlevel; ! newlevel = make_binding_level (); /* Add this level to the front of the chain (stack) of label levels. */ *************** pop_label_level () *** 1316,1324 **** shadowed_labels = level->shadowed; /* Pop the current level, and free the structure for reuse. */ ! label_level_chain = label_level_chain->level_chain; ! level->level_chain = free_binding_level; ! free_binding_level = level; } /* Push a definition or a declaration of struct, union or enum tag "name". --- 799,805 ---- shadowed_labels = level->shadowed; /* Pop the current level, and free the structure for reuse. */ ! pop_binding_level (&label_level_chain); } /* Push a definition or a declaration of struct, union or enum tag "name". *************** duplicate_decls (newdecl, olddecl, diffe *** 1483,1496 **** match enough. Ultimately, copy most of the information from the new decl to the old one, and keep using the old one. */ ! if (flag_traditional && TREE_CODE (newdecl) == FUNCTION_DECL ! && IDENTIFIER_IMPLICIT_DECL (DECL_NAME (newdecl)) == olddecl ! && DECL_INITIAL (olddecl) == 0) ! /* If -traditional, avoid error for redeclaring fcn ! after implicit decl. */ ! ; ! else if (TREE_CODE (olddecl) == FUNCTION_DECL ! && DECL_BUILT_IN (olddecl)) { /* A function declaration for a built-in function. */ if (!TREE_PUBLIC (newdecl)) --- 964,970 ---- match enough. Ultimately, copy most of the information from the new decl to the old one, and keep using the old one. */ ! if (TREE_CODE (olddecl) == FUNCTION_DECL && DECL_BUILT_IN (olddecl)) { /* A function declaration for a built-in function. */ if (!TREE_PUBLIC (newdecl)) *************** duplicate_decls (newdecl, olddecl, diffe *** 1657,1663 **** break; } ! if (simple_type_promotes_to (type) != NULL_TREE) { error ("an argument type that has a default promotion can't match an empty parameter name list declaration"); break; --- 1131,1137 ---- break; } ! if (c_type_promotes_to (type) != type) { error ("an argument type that has a default promotion can't match an empty parameter name list declaration"); break; *************** duplicate_decls (newdecl, olddecl, diffe *** 1673,1678 **** --- 1147,1166 ---- if (TREE_CODE (newdecl) == VAR_DECL) DECL_INITIAL (newdecl) = 0; } + /* TLS cannot follow non-TLS declaration. */ + else if (TREE_CODE (olddecl) == VAR_DECL && TREE_CODE (newdecl) == VAR_DECL + && !DECL_THREAD_LOCAL (olddecl) && DECL_THREAD_LOCAL (newdecl)) + { + error_with_decl (newdecl, "thread-local declaration of `%s' follows non thread-local declaration"); + error_with_decl (olddecl, "previous declaration of `%s'"); + } + /* non-TLS declaration cannot follow TLS declaration. */ + else if (TREE_CODE (olddecl) == VAR_DECL && TREE_CODE (newdecl) == VAR_DECL + && DECL_THREAD_LOCAL (olddecl) && !DECL_THREAD_LOCAL (newdecl)) + { + error_with_decl (newdecl, "non thread-local declaration of `%s' follows thread-local declaration"); + error_with_decl (olddecl, "previous declaration of `%s'"); + } else { errmsg = redeclaration_error_message (newdecl, olddecl); *************** duplicate_decls (newdecl, olddecl, diffe *** 1746,1757 **** } /* Type for passing arg must be consistent with that declared for the arg. */ ! if (! comptypes (TREE_VALUE (parm), TREE_VALUE (type)) ! /* If -traditional, allow `unsigned int' instead of `int' ! in the prototype. */ ! && (! (flag_traditional ! && TYPE_MAIN_VARIANT (TREE_VALUE (parm)) == integer_type_node ! && TYPE_MAIN_VARIANT (TREE_VALUE (type)) == unsigned_type_node))) { error_with_decl (newdecl, "prototype for `%s' follows and argument %d doesn't match", --- 1234,1240 ---- } /* Type for passing arg must be consistent with that declared for the arg. */ ! if (! comptypes (TREE_VALUE (parm), TREE_VALUE (type))) { error_with_decl (newdecl, "prototype for `%s' follows and argument %d doesn't match", *************** duplicate_decls (newdecl, olddecl, diffe *** 1886,1896 **** COPY_DECL_RTL (olddecl, newdecl); /* Merge the type qualifiers. */ - if (TREE_CODE (olddecl) == FUNCTION_DECL - && DECL_BUILT_IN_NONANSI (olddecl) && TREE_THIS_VOLATILE (olddecl) - && ! TREE_THIS_VOLATILE (newdecl)) - TREE_THIS_VOLATILE (write_olddecl) = 0; - if (TREE_READONLY (newdecl)) TREE_READONLY (write_olddecl) = 1; --- 1369,1374 ---- *************** pushdecl (x) *** 2204,2213 **** IDENTIFIER_POINTER (name)); t = lookup_name_current_level (name); ! /* Don't type check externs here when -traditional. This is so that ! code with conflicting declarations inside blocks will get warnings ! not errors. X11 for instance depends on this. */ ! if (! t && DECL_EXTERNAL (x) && TREE_PUBLIC (x) && ! flag_traditional) { t = IDENTIFIER_GLOBAL_VALUE (name); /* Type decls at global scope don't conflict with externs declared --- 1682,1688 ---- IDENTIFIER_POINTER (name)); t = lookup_name_current_level (name); ! if (! t && DECL_EXTERNAL (x) && TREE_PUBLIC (x)) { t = IDENTIFIER_GLOBAL_VALUE (name); /* Type decls at global scope don't conflict with externs declared *************** pushdecl (x) *** 2226,2234 **** } /* If this decl is `static' and an implicit decl was seen previously, ! warn. But don't complain if -traditional, ! since traditional compilers don't complain. */ ! if (! flag_traditional && TREE_PUBLIC (name) /* Don't test for DECL_EXTERNAL, because grokdeclarator sets this for all functions. */ && ! TREE_PUBLIC (x) --- 1701,1708 ---- } /* If this decl is `static' and an implicit decl was seen previously, ! warn. */ ! if (TREE_PUBLIC (name) /* Don't test for DECL_EXTERNAL, because grokdeclarator sets this for all functions. */ && ! TREE_PUBLIC (x) *************** pushdecl (x) *** 2260,2266 **** } /* If we are processing a typedef statement, generate a whole new ! ..._TYPE node (which will be just an variant of the existing ..._TYPE node with identical properties) and then install the TYPE_DECL node generated to represent the typedef name as the TYPE_NAME of this brand new (duplicate) ..._TYPE node. --- 1734,1740 ---- } /* If we are processing a typedef statement, generate a whole new ! ..._TYPE node (which will be just a variant of the existing ..._TYPE node with identical properties) and then install the TYPE_DECL node generated to represent the typedef name as the TYPE_NAME of this brand new (duplicate) ..._TYPE node. *************** pushdecl (x) *** 2322,2330 **** } /* Multiple external decls of the same identifier ought to match. - Check against both global declarations (when traditional) and out of - scope (limbo) block level declarations. - We get warnings about inline functions where they are defined. Avoid duplicate warnings where they are used. */ if (TREE_PUBLIC (x) --- 1796,1801 ---- *************** pushdecl (x) *** 2332,2342 **** { tree decl; ! if (flag_traditional && IDENTIFIER_GLOBAL_VALUE (name) != 0 ! && (DECL_EXTERNAL (IDENTIFIER_GLOBAL_VALUE (name)) ! || TREE_PUBLIC (IDENTIFIER_GLOBAL_VALUE (name)))) ! decl = IDENTIFIER_GLOBAL_VALUE (name); ! else if (IDENTIFIER_LIMBO_VALUE (name) != 0) /* Decls in limbo are always extern, so no need to check that. */ decl = IDENTIFIER_LIMBO_VALUE (name); else --- 1803,1809 ---- { tree decl; ! if (IDENTIFIER_LIMBO_VALUE (name) != 0) /* Decls in limbo are always extern, so no need to check that. */ decl = IDENTIFIER_LIMBO_VALUE (name); else *************** pushdecl (x) *** 2366,2404 **** "previous implicit declaration of `%s'"); } - /* In PCC-compatibility mode, extern decls of vars with no current decl - take effect at top level no matter where they are. */ - if (flag_traditional && DECL_EXTERNAL (x) - && lookup_name (name) == 0) - { - tree type = TREE_TYPE (x); - - /* But don't do this if the type contains temporary nodes. */ - while (type) - { - if (type == error_mark_node) - break; - if (TYPE_CONTEXT (type)) - { - warning_with_decl (x, "type of external `%s' is not global"); - /* By exiting the loop early, we leave TYPE nonzero, - and thus prevent globalization of the decl. */ - break; - } - else if (TREE_CODE (type) == FUNCTION_TYPE - && TYPE_ARG_TYPES (type) != 0) - /* The types might not be truly local, - but the list of arg types certainly is temporary. - Since prototypes are nontraditional, - ok not to do the traditional thing. */ - break; - type = TREE_TYPE (type); - } - - if (type == 0) - b = global_binding_level; - } - /* This name is new in its binding level. Install the new declaration and return it. */ if (b == global_binding_level) --- 1833,1838 ---- *************** pushdecl (x) *** 2555,2561 **** b->shadowed = tree_cons (name, oldlocal, b->shadowed); } ! /* Keep count of variables in this level with incomplete type. If the input is erroneous, we can have error_mark in the type slot (e.g. "f(void a, ...)") - that doesn't count as an incomplete type. */ --- 1989,1995 ---- b->shadowed = tree_cons (name, oldlocal, b->shadowed); } ! /* Keep list of variables in this level with incomplete type. If the input is erroneous, we can have error_mark in the type slot (e.g. "f(void a, ...)") - that doesn't count as an incomplete type. */ *************** pushdecl (x) *** 2568,2574 **** element = TREE_TYPE (element); if (TREE_CODE (element) == RECORD_TYPE || TREE_CODE (element) == UNION_TYPE) ! ++b->n_incomplete; } } --- 2002,2008 ---- element = TREE_TYPE (element); if (TREE_CODE (element) == RECORD_TYPE || TREE_CODE (element) == UNION_TYPE) ! b->incomplete_list = tree_cons (NULL_TREE, x, b->incomplete_list); } } *************** implicitly_declare (functionid) *** 2632,2643 **** IDENTIFIER_IMPLICIT_DECL (functionid) = decl; /* ANSI standard says implicit declarations are in the innermost block. ! So we record the decl in the standard fashion. ! If flag_traditional is set, pushdecl does it top-level. */ pushdecl (decl); ! /* This is a no-op in c-lang.c or something real in objc-actions.c. */ ! maybe_objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, 0, 0); --- 2066,2077 ---- IDENTIFIER_IMPLICIT_DECL (functionid) = decl; /* ANSI standard says implicit declarations are in the innermost block. ! So we record the decl in the standard fashion. */ pushdecl (decl); ! /* This is a no-op in c-lang.c or something real in objc-act.c. */ ! if (flag_objc) ! objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, 0, 0); *************** redeclaration_error_message (newdecl, ol *** 2681,2697 **** { if (TREE_CODE (newdecl) == TYPE_DECL) { ! if (flag_traditional && TREE_TYPE (newdecl) == TREE_TYPE (olddecl)) ! return 0; ! /* pushdecl creates distinct types for TYPE_DECLs by calling ! build_type_copy, so the above comparison generally fails. We do ! another test against the TYPE_MAIN_VARIANT of the olddecl, which ! is equivalent to what this code used to do before the build_type_copy ! call. The variant type distinction should not matter for traditional ! code, because it doesn't have type qualifiers. */ ! if (flag_traditional ! && TYPE_MAIN_VARIANT (TREE_TYPE (olddecl)) == TREE_TYPE (newdecl)) ! return 0; if (DECL_IN_SYSTEM_HEADER (olddecl) || DECL_IN_SYSTEM_HEADER (newdecl)) return 0; return 1; --- 2115,2122 ---- { if (TREE_CODE (newdecl) == TYPE_DECL) { ! /* Do not complain about type redeclarations where at least one ! declaration was in a system header. */ if (DECL_IN_SYSTEM_HEADER (olddecl) || DECL_IN_SYSTEM_HEADER (newdecl)) return 0; return 1; *************** lookup_name_current_level (name) *** 3037,3061 **** return t; } - /* Mark ARG for GC. */ - - static void - mark_binding_level (arg) - void *arg; - { - struct binding_level *level = *(struct binding_level **) arg; - - for (; level != 0; level = level->level_chain) - { - ggc_mark_tree (level->names); - ggc_mark_tree (level->tags); - ggc_mark_tree (level->shadowed); - ggc_mark_tree (level->blocks); - ggc_mark_tree (level->this_block); - ggc_mark_tree (level->parm_order); - } - } - /* Create the predefined scalar types of C, and some nodes representing standard constants (0, 1, (void *) 0). Initialize the global binding level. --- 2462,2467 ---- *************** c_init_decl_processing () *** 3109,3130 **** make_fname_decl = c_make_fname_decl; start_fname_decls (); - - incomplete_decl_finalize_hook = finish_incomplete_decl; - - /* Record our roots. */ - - ggc_add_tree_root (c_global_trees, CTI_MAX); - ggc_add_root (&c_stmt_tree, 1, sizeof c_stmt_tree, mark_stmt_tree); - ggc_add_tree_root (&c_scope_stmt_stack, 1); - ggc_add_tree_root (&named_labels, 1); - ggc_add_tree_root (&shadowed_labels, 1); - ggc_add_root (¤t_binding_level, 1, sizeof current_binding_level, - mark_binding_level); - ggc_add_root (&label_level_chain, 1, sizeof label_level_chain, - mark_binding_level); - ggc_add_tree_root (&static_ctors, 1); - ggc_add_tree_root (&static_dtors, 1); } /* Create the VAR_DECL for __FUNCTION__ etc. ID is the name to give the --- 2515,2520 ---- *************** c_make_fname_decl (id, type_dep) *** 3173,3196 **** See tree.h for its possible values. If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME, ! the name to be called if we can't opencode the function. */ tree ! builtin_function (name, type, function_code, class, library_name) const char *name; tree type; int function_code; enum built_in_class class; const char *library_name; { tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; - /* If -traditional, permit redefining a builtin function any way you like. - (Though really, if the program redefines these functions, - it probably won't work right unless compiled with -fno-builtin.) */ - if (flag_traditional && name[0] != '_') - DECL_BUILT_IN_NONANSI (decl) = 1; if (library_name) SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name)); make_decl_rtl (decl, NULL); --- 2563,2583 ---- See tree.h for its possible values. If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME, ! the name to be called if we can't opencode the function. If ! ATTRS is nonzero, use that for the function's attribute list. */ tree ! builtin_function (name, type, function_code, class, library_name, attrs) const char *name; tree type; int function_code; enum built_in_class class; const char *library_name; + tree attrs; { tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; if (library_name) SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name)); make_decl_rtl (decl, NULL); *************** builtin_function (name, type, function_c *** 3198,3214 **** DECL_BUILT_IN_CLASS (decl) = class; DECL_FUNCTION_CODE (decl) = function_code; - /* The return builtins leave the current function. */ - if (function_code == BUILT_IN_RETURN || function_code == BUILT_IN_EH_RETURN) - TREE_THIS_VOLATILE (decl) = 1; - /* Warn if a function in the namespace for users is used without an occasion to consider it declared. */ if (name[0] != '_' || name[1] != '_') C_DECL_ANTICIPATED (decl) = 1; /* Possibly apply some default attributes to this built-in function. */ ! decl_attributes (&decl, NULL_TREE, 0); return decl; } --- 2585,2600 ---- DECL_BUILT_IN_CLASS (decl) = class; DECL_FUNCTION_CODE (decl) = function_code; /* Warn if a function in the namespace for users is used without an occasion to consider it declared. */ if (name[0] != '_' || name[1] != '_') C_DECL_ANTICIPATED (decl) = 1; /* Possibly apply some default attributes to this built-in function. */ ! if (attrs) ! decl_attributes (&decl, attrs, ATTR_FLAG_BUILT_IN); ! else ! decl_attributes (&decl, NULL_TREE, 0); return decl; } *************** builtin_function (name, type, function_c *** 3217,3223 **** attributes. */ void ! insert_default_attributes (decl) tree decl; { if (!TREE_PUBLIC (decl)) --- 2603,2609 ---- attributes. */ void ! c_insert_default_attributes (decl) tree decl; { if (!TREE_PUBLIC (decl)) *************** shadow_tag_warned (declspecs, warned) *** 3314,3321 **** /* Construct an array declarator. EXPR is the expression inside [], or NULL_TREE. QUALS are the type qualifiers inside the [] (to be applied to the pointer to which a parameter array is converted). STATIC_P is ! non-zero if "static" is inside the [], zero otherwise. VLA_UNSPEC_P ! is non-zero is the array is [*], a VLA of unspecified length which is nevertheless a complete type (not currently implemented by GCC), zero otherwise. The declarator is constructed as an ARRAY_REF (to be decoded by grokdeclarator), whose operand 0 is what's on the --- 2700,2707 ---- /* Construct an array declarator. EXPR is the expression inside [], or NULL_TREE. QUALS are the type qualifiers inside the [] (to be applied to the pointer to which a parameter array is converted). STATIC_P is ! nonzero if "static" is inside the [], zero otherwise. VLA_UNSPEC_P ! is nonzero is the array is [*], a VLA of unspecified length which is nevertheless a complete type (not currently implemented by GCC), zero otherwise. The declarator is constructed as an ARRAY_REF (to be decoded by grokdeclarator), whose operand 0 is what's on the *************** build_array_declarator (expr, quals, sta *** 3337,3345 **** if (pedantic && !flag_isoc99) { if (static_p || quals != NULL_TREE) ! pedwarn ("ISO C89 does not support `static' or type qualifiers in parameter array declarators"); if (vla_unspec_p) ! pedwarn ("ISO C89 does not support `[*]' array declarators"); } if (vla_unspec_p) warning ("GCC does not yet properly implement `[*]' array declarators"); --- 2723,2731 ---- if (pedantic && !flag_isoc99) { if (static_p || quals != NULL_TREE) ! pedwarn ("ISO C90 does not support `static' or type qualifiers in parameter array declarators"); if (vla_unspec_p) ! pedwarn ("ISO C90 does not support `[*]' array declarators"); } if (vla_unspec_p) warning ("GCC does not yet properly implement `[*]' array declarators"); *************** build_array_declarator (expr, quals, sta *** 3348,3354 **** /* Set the type of an array declarator. DECL is the declarator, as constructed by build_array_declarator; TYPE is what appears on the left ! of the [] and goes in operand 0. ABSTRACT_P is non-zero if it is an abstract declarator, zero otherwise; this is used to reject static and type qualifiers in abstract declarators, where they are not in the C99 grammar. */ --- 2734,2740 ---- /* Set the type of an array declarator. DECL is the declarator, as constructed by build_array_declarator; TYPE is what appears on the left ! of the [] and goes in operand 0. ABSTRACT_P is nonzero if it is an abstract declarator, zero otherwise; this is used to reject static and type qualifiers in abstract declarators, where they are not in the C99 grammar. */ *************** start_decl (declarator, declspecs, initi *** 3524,3532 **** /* ANSI specifies that a tentative definition which is not merged with a non-tentative definition behaves exactly like a definition with an initializer equal to zero. (Section 3.7.2) ! -fno-common gives strict ANSI behavior. Usually you don't want it. ! This matters only for variables with external linkage. */ ! if (! flag_no_common || ! TREE_PUBLIC (decl)) DECL_COMMON (decl) = 1; /* Set attributes here so if duplicate decl, will have proper attributes. */ --- 2910,2928 ---- /* ANSI specifies that a tentative definition which is not merged with a non-tentative definition behaves exactly like a definition with an initializer equal to zero. (Section 3.7.2) ! ! -fno-common gives strict ANSI behavior, though this tends to break ! a large body of code that grew up without this rule. ! ! Thread-local variables are never common, since there's no entrenched ! body of code to break, and it allows more efficient variable references ! in the presense of dynamic linking. */ ! ! if (TREE_CODE (decl) == VAR_DECL ! && !initialized ! && TREE_PUBLIC (decl) ! && !DECL_THREAD_LOCAL (decl) ! && !flag_no_common) DECL_COMMON (decl) = 1; /* Set attributes here so if duplicate decl, will have proper attributes. */ *************** finish_decl (decl, init, asmspec_tree) *** 3697,3704 **** if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL) { ! /* This is a no-op in c-lang.c or something real in objc-actions.c. */ ! maybe_objc_check_decl (decl); if (!DECL_CONTEXT (decl)) { --- 3093,3101 ---- if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL) { ! /* This is a no-op in c-lang.c or something real in objc-act.c. */ ! if (flag_objc) ! objc_check_decl (decl); if (!DECL_CONTEXT (decl)) { *************** finish_decl (decl, init, asmspec_tree) *** 3760,3767 **** if (TREE_CODE (decl) == TYPE_DECL) { ! /* This is a no-op in c-lang.c or something real in objc-actions.c. */ ! maybe_objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, DECL_CONTEXT (decl) == 0, 0); } --- 3157,3165 ---- if (TREE_CODE (decl) == TYPE_DECL) { ! /* This is a no-op in c-lang.c or something real in objc-act.c. */ ! if (flag_objc) ! objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, DECL_CONTEXT (decl) == 0, 0); } *************** finish_decl (decl, init, asmspec_tree) *** 3772,3788 **** get_pending_sizes (); } - /* If DECL has a cleanup, build and return that cleanup here. - This is a callback called by expand_expr. */ - - tree - maybe_build_cleanup (decl) - tree decl ATTRIBUTE_UNUSED; - { - /* There are no cleanups in C. */ - return NULL_TREE; - } - /* Given a parsed parameter declaration, decode it into a PARM_DECL and push that on the current binding level. Also, for the sake of forward parm decls, --- 3170,3175 ---- *************** complete_array_type (type, initial_value *** 3965,3970 **** --- 3352,3391 ---- return value; } + /* Determine whether TYPE is a structure with a flexible array member, + or a union containing such a structure (possibly recursively). */ + + static bool + flexible_array_type_p (type) + tree type; + { + tree x; + switch (TREE_CODE (type)) + { + case RECORD_TYPE: + x = TYPE_FIELDS (type); + if (x == NULL_TREE) + return false; + while (TREE_CHAIN (x) != NULL_TREE) + x = TREE_CHAIN (x); + if (TREE_CODE (TREE_TYPE (x)) == ARRAY_TYPE + && TYPE_SIZE (TREE_TYPE (x)) == NULL_TREE + && TYPE_DOMAIN (TREE_TYPE (x)) != NULL_TREE + && TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (x))) == NULL_TREE) + return true; + return false; + case UNION_TYPE: + for (x = TYPE_FIELDS (type); x != NULL_TREE; x = TREE_CHAIN (x)) + { + if (flexible_array_type_p (TREE_TYPE (x))) + return true; + } + return false; + default: + return false; + } + } + /* Given declspecs and a declarator, determine the name and type of the object declared and construct a ..._DECL node for it. *************** grokdeclarator (declarator, declspecs, d *** 4116,4122 **** enum rid i = C_RID_CODE (id); if ((int) i <= (int) RID_LAST_MODIFIER) { ! if (i == RID_LONG && (specbits & (1 << (int) i))) { if (longlong) error ("`long long long' is too long for GCC"); --- 3537,3543 ---- enum rid i = C_RID_CODE (id); if ((int) i <= (int) RID_LAST_MODIFIER) { ! if (i == RID_LONG && (specbits & (1 << (int) RID_LONG))) { if (longlong) error ("`long long long' is too long for GCC"); *************** grokdeclarator (declarator, declspecs, d *** 4124,4135 **** { if (pedantic && !flag_isoc99 && ! in_system_header && warn_long_long) ! pedwarn ("ISO C89 does not support `long long'"); longlong = 1; } } else if (specbits & (1 << (int) i)) ! pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id)); specbits |= 1 << (int) i; goto found; } --- 3545,3577 ---- { if (pedantic && !flag_isoc99 && ! in_system_header && warn_long_long) ! pedwarn ("ISO C90 does not support `long long'"); longlong = 1; } } else if (specbits & (1 << (int) i)) ! { ! if (i == RID_CONST || i == RID_VOLATILE || i == RID_RESTRICT) ! { ! if (!flag_isoc99) ! pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id)); ! } ! else ! error ("duplicate `%s'", IDENTIFIER_POINTER (id)); ! } ! ! /* Diagnose "__thread extern". Recall that this list ! is in the reverse order seen in the text. */ ! if (i == RID_THREAD ! && (specbits & (1 << (int) RID_EXTERN ! | 1 << (int) RID_STATIC))) ! { ! if (specbits & 1 << (int) RID_EXTERN) ! error ("`__thread' before `extern'"); ! else ! error ("`__thread' before `static'"); ! } ! specbits |= 1 << (int) i; goto found; } *************** grokdeclarator (declarator, declspecs, d *** 4249,4260 **** else { ok = 1; ! if (!explicit_int && !defaulted_int && !explicit_char && pedantic) { ! pedwarn ("long, short, signed or unsigned used invalidly for `%s'", ! name); ! if (flag_pedantic_errors) ! ok = 0; } } --- 3691,3701 ---- else { ok = 1; ! if (!explicit_int && !defaulted_int && !explicit_char) { ! error ("long, short, signed or unsigned used invalidly for `%s'", ! name); ! ok = 0; } } *************** grokdeclarator (declarator, declspecs, d *** 4277,4285 **** /* Decide whether an integer type is signed or not. Optionally treat bitfields as signed by default. */ if (specbits & 1 << (int) RID_UNSIGNED - /* Traditionally, all bitfields are unsigned. */ - || (bitfield && flag_traditional - && (! explicit_flag_signed_bitfields || !flag_signed_bitfields)) || (bitfield && ! flag_signed_bitfields && (explicit_int || defaulted_int || explicit_char /* A typedef for plain `int' without `signed' --- 3718,3723 ---- *************** grokdeclarator (declarator, declspecs, d *** 4298,4304 **** else if (type == char_type_node) type = unsigned_char_type_node; else if (typedef_decl) ! type = unsigned_type (type); else type = unsigned_type_node; } --- 3736,3742 ---- else if (type == char_type_node) type = unsigned_char_type_node; else if (typedef_decl) ! type = c_common_unsigned_type (type); else type = unsigned_type_node; } *************** grokdeclarator (declarator, declspecs, d *** 4315,4321 **** if (specbits & 1 << (int) RID_COMPLEX) { if (pedantic && !flag_isoc99) ! pedwarn ("ISO C89 does not support complex types"); /* If we just have "complex", it is equivalent to "complex double", but if any modifiers at all are specified it is the complex form of TYPE. E.g, "complex short" is --- 3753,3759 ---- if (specbits & 1 << (int) RID_COMPLEX) { if (pedantic && !flag_isoc99) ! pedwarn ("ISO C90 does not support complex types"); /* If we just have "complex", it is equivalent to "complex double", but if any modifiers at all are specified it is the complex form of TYPE. E.g, "complex short" is *************** grokdeclarator (declarator, declspecs, d *** 4382,4387 **** --- 3820,3831 ---- if (specbits & 1 << (int) RID_REGISTER) nclasses++; if (specbits & 1 << (int) RID_TYPEDEF) nclasses++; + /* "static __thread" and "extern __thread" are allowed. */ + if ((specbits & (1 << (int) RID_THREAD + | 1 << (int) RID_STATIC + | 1 << (int) RID_EXTERN)) == (1 << (int) RID_THREAD)) + nclasses++; + /* Warn about storage classes that are invalid for certain kinds of declarations (parameters, typenames, etc.). */ *************** grokdeclarator (declarator, declspecs, d *** 4391,4397 **** && (specbits & ((1 << (int) RID_REGISTER) | (1 << (int) RID_AUTO) ! | (1 << (int) RID_TYPEDEF)))) { if (specbits & 1 << (int) RID_AUTO && (pedantic || current_binding_level == global_binding_level)) --- 3835,3842 ---- && (specbits & ((1 << (int) RID_REGISTER) | (1 << (int) RID_AUTO) ! | (1 << (int) RID_TYPEDEF) ! | (1 << (int) RID_THREAD)))) { if (specbits & 1 << (int) RID_AUTO && (pedantic || current_binding_level == global_binding_level)) *************** grokdeclarator (declarator, declspecs, d *** 4400,4407 **** error ("function definition declared `register'"); if (specbits & 1 << (int) RID_TYPEDEF) error ("function definition declared `typedef'"); specbits &= ~((1 << (int) RID_TYPEDEF) | (1 << (int) RID_REGISTER) ! | (1 << (int) RID_AUTO)); } else if (decl_context != NORMAL && nclasses > 0) { --- 3845,3854 ---- error ("function definition declared `register'"); if (specbits & 1 << (int) RID_TYPEDEF) error ("function definition declared `typedef'"); + if (specbits & 1 << (int) RID_THREAD) + error ("function definition declared `__thread'"); specbits &= ~((1 << (int) RID_TYPEDEF) | (1 << (int) RID_REGISTER) ! | (1 << (int) RID_AUTO) | (1 << (int) RID_THREAD)); } else if (decl_context != NORMAL && nclasses > 0) { *************** grokdeclarator (declarator, declspecs, d *** 4424,4430 **** } specbits &= ~((1 << (int) RID_TYPEDEF) | (1 << (int) RID_REGISTER) | (1 << (int) RID_AUTO) | (1 << (int) RID_STATIC) ! | (1 << (int) RID_EXTERN)); } } else if (specbits & 1 << (int) RID_EXTERN && initialized && ! funcdef_flag) --- 3871,3877 ---- } specbits &= ~((1 << (int) RID_TYPEDEF) | (1 << (int) RID_REGISTER) | (1 << (int) RID_AUTO) | (1 << (int) RID_STATIC) ! | (1 << (int) RID_EXTERN) | (1 << (int) RID_THREAD)); } } else if (specbits & 1 << (int) RID_EXTERN && initialized && ! funcdef_flag) *************** grokdeclarator (declarator, declspecs, d *** 4435,4446 **** else error ("`%s' has both `extern' and initializer", name); } ! else if (specbits & 1 << (int) RID_EXTERN && funcdef_flag ! && current_binding_level != global_binding_level) ! error ("nested function `%s' declared `extern'", name); ! else if (current_binding_level == global_binding_level ! && specbits & (1 << (int) RID_AUTO)) ! error ("top-level declaration of `%s' specifies `auto'", name); } /* Now figure out the structure of the declarator proper. --- 3882,3906 ---- else error ("`%s' has both `extern' and initializer", name); } ! else if (current_binding_level == global_binding_level) ! { ! if (specbits & 1 << (int) RID_AUTO) ! error ("top-level declaration of `%s' specifies `auto'", name); ! } ! else ! { ! if (specbits & 1 << (int) RID_EXTERN && funcdef_flag) ! error ("nested function `%s' declared `extern'", name); ! else if ((specbits & (1 << (int) RID_THREAD ! | 1 << (int) RID_EXTERN ! | 1 << (int) RID_STATIC)) ! == (1 << (int) RID_THREAD)) ! { ! error ("function-scope `%s' implicitly auto and declared `__thread'", ! name); ! specbits &= ~(1 << (int) RID_THREAD); ! } ! } } /* Now figure out the structure of the declarator proper. *************** grokdeclarator (declarator, declspecs, d *** 4508,4514 **** tree itype = NULL_TREE; tree size = TREE_OPERAND (declarator, 1); /* The index is a signed object `sizetype' bits wide. */ ! tree index_type = signed_type (sizetype); array_ptr_quals = TREE_TYPE (declarator); array_parm_static = TREE_STATIC (declarator); --- 3968,3974 ---- tree itype = NULL_TREE; tree size = TREE_OPERAND (declarator, 1); /* The index is a signed object `sizetype' bits wide. */ ! tree index_type = c_common_signed_type (sizetype); array_ptr_quals = TREE_TYPE (declarator); array_parm_static = TREE_STATIC (declarator); *************** grokdeclarator (declarator, declspecs, d *** 4529,4534 **** --- 3989,3997 ---- type = error_mark_node; } + if (pedantic && flexible_array_type_p (type)) + pedwarn ("invalid use of structure with flexible array member"); + if (size == error_mark_node) type = error_mark_node; *************** grokdeclarator (declarator, declspecs, d *** 4571,4580 **** if (!flag_isoc99 && pedantic) { if (TREE_CONSTANT (size)) ! pedwarn ("ISO C89 forbids array `%s' whose size can't be evaluated", name); else ! pedwarn ("ISO C89 forbids variable-size array `%s'", name); } } --- 4034,4043 ---- if (!flag_isoc99 && pedantic) { if (TREE_CONSTANT (size)) ! pedwarn ("ISO C90 forbids array `%s' whose size can't be evaluated", name); else ! pedwarn ("ISO C90 forbids variable-size array `%s'", name); } } *************** grokdeclarator (declarator, declspecs, d *** 4610,4623 **** } if (size_varies) ! itype = variable_size (itype); itype = build_index_type (itype); } } else if (decl_context == FIELD) { if (pedantic && !flag_isoc99 && !in_system_header) ! pedwarn ("ISO C89 does not support flexible array members"); /* ISO C99 Flexible array members are effectively identical to GCC's zero-length array extension. */ --- 4073,4099 ---- } if (size_varies) ! { ! /* We must be able to distinguish the ! SAVE_EXPR_CONTEXT for the variably-sized type ! so that we can set it correctly in ! set_save_expr_context. The convention is ! that all SAVE_EXPRs that need to be reset ! have NULL_TREE for their SAVE_EXPR_CONTEXT. */ ! tree cfd = current_function_decl; ! if (decl_context == PARM) ! current_function_decl = NULL_TREE; ! itype = variable_size (itype); ! if (decl_context == PARM) ! current_function_decl = cfd; ! } itype = build_index_type (itype); } } else if (decl_context == FIELD) { if (pedantic && !flag_isoc99 && !in_system_header) ! pedwarn ("ISO C90 does not support flexible array members"); /* ISO C99 Flexible array members are effectively identical to GCC's zero-length array extension. */ *************** grokdeclarator (declarator, declspecs, d *** 4689,4701 **** type = integer_type_node; } - #ifndef TRADITIONAL_RETURN_FLOAT - /* Traditionally, declaring return type float means double. */ - - if (flag_traditional && TYPE_MAIN_VARIANT (type) == float_type_node) - type = double_type_node; - #endif /* TRADITIONAL_RETURN_FLOAT */ - /* Construct the function type and go to the next inner layer of declarator. */ --- 4165,4170 ---- *************** grokdeclarator (declarator, declspecs, d *** 4983,4993 **** if (type == error_mark_node) promoted_type = type; else ! { ! promoted_type = simple_type_promotes_to (type); ! if (! promoted_type) ! promoted_type = type; ! } DECL_ARG_TYPE (decl) = promoted_type; DECL_ARG_TYPE_AS_WRITTEN (decl) = type_as_written; --- 4452,4458 ---- if (type == error_mark_node) promoted_type = type; else ! promoted_type = c_type_promotes_to (type); DECL_ARG_TYPE (decl) = promoted_type; DECL_ARG_TYPE_AS_WRITTEN (decl) = type_as_written; *************** grokdeclarator (declarator, declspecs, d *** 5039,5044 **** --- 4504,4511 ---- pedwarn ("invalid storage class for function `%s'", name); if (specbits & (1 << (int) RID_REGISTER)) error ("invalid storage class for function `%s'", name); + if (specbits & (1 << (int) RID_THREAD)) + error ("invalid storage class for function `%s'", name); /* Function declaration not at top level. Storage classes other than `extern' are not allowed and `extern' makes no difference. */ *************** grokdeclarator (declarator, declspecs, d *** 5098,5103 **** --- 4565,4572 ---- needed, and let dwarf2 know that the function is inlinable. */ else if (flag_inline_trees == 2 && initialized) { + if (!DECL_INLINE (decl)) + DID_INLINE_FUNC (decl) = 1; DECL_INLINE (decl) = 1; DECL_DECLARED_INLINE_P (decl) = 0; } *************** grokdeclarator (declarator, declspecs, d *** 5131,5152 **** pedwarn_with_decl (decl, "variable `%s' declared `inline'"); DECL_EXTERNAL (decl) = extern_ref; /* At top level, the presence of a `static' or `register' storage class specifier, or the absence of all storage class specifiers makes this declaration a definition (perhaps tentative). Also, the absence of both `static' and `register' makes it public. */ if (current_binding_level == global_binding_level) { ! TREE_PUBLIC (decl) ! = !(specbits ! & ((1 << (int) RID_STATIC) | (1 << (int) RID_REGISTER))); ! TREE_STATIC (decl) = ! DECL_EXTERNAL (decl); } /* Not at top level, only `static' makes a static definition. */ else { TREE_STATIC (decl) = (specbits & (1 << (int) RID_STATIC)) != 0; ! TREE_PUBLIC (decl) = DECL_EXTERNAL (decl); } } --- 4600,4631 ---- pedwarn_with_decl (decl, "variable `%s' declared `inline'"); DECL_EXTERNAL (decl) = extern_ref; + /* At top level, the presence of a `static' or `register' storage class specifier, or the absence of all storage class specifiers makes this declaration a definition (perhaps tentative). Also, the absence of both `static' and `register' makes it public. */ if (current_binding_level == global_binding_level) { ! TREE_PUBLIC (decl) = !(specbits & ((1 << (int) RID_STATIC) ! | (1 << (int) RID_REGISTER))); ! TREE_STATIC (decl) = !extern_ref; } /* Not at top level, only `static' makes a static definition. */ else { TREE_STATIC (decl) = (specbits & (1 << (int) RID_STATIC)) != 0; ! TREE_PUBLIC (decl) = extern_ref; ! } ! ! if (specbits & 1 << (int) RID_THREAD) ! { ! if (targetm.have_tls) ! DECL_THREAD_LOCAL (decl) = 1; ! else ! /* A mere warning is sure to result in improper semantics ! at runtime. Don't bother to allow this to compile. */ ! error ("thread-local storage not supported for this target"); } } *************** grokdeclarator (declarator, declspecs, d *** 5163,5169 **** Otherwise, the fact that those components are volatile will be ignored, and would even crash the compiler. */ if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (decl))) ! mark_addressable (decl); decl_attributes (&decl, returned_attrs, 0); --- 4642,4648 ---- Otherwise, the fact that those components are volatile will be ignored, and would even crash the compiler. */ if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (decl))) ! c_mark_addressable (decl); decl_attributes (&decl, returned_attrs, 0); *************** start_struct (code, name) *** 5498,5522 **** ref = lookup_tag (code, name, current_binding_level, 1); if (ref && TREE_CODE (ref) == code) { - C_TYPE_BEING_DEFINED (ref) = 1; - TYPE_PACKED (ref) = flag_pack_struct; if (TYPE_FIELDS (ref)) { if (code == UNION_TYPE) ! error ("redefinition of `union %s'", ! IDENTIFIER_POINTER (name)); else ! error ("redefinition of `struct %s'", ! IDENTIFIER_POINTER (name)); } - - return ref; } ! /* Otherwise create a forward-reference just so the tag is in scope. */ ! ! ref = make_node (code); ! pushtag (name, ref); C_TYPE_BEING_DEFINED (ref) = 1; TYPE_PACKED (ref) = flag_pack_struct; return ref; --- 4977,4998 ---- ref = lookup_tag (code, name, current_binding_level, 1); if (ref && TREE_CODE (ref) == code) { if (TYPE_FIELDS (ref)) { if (code == UNION_TYPE) ! error ("redefinition of `union %s'", IDENTIFIER_POINTER (name)); else ! error ("redefinition of `struct %s'", IDENTIFIER_POINTER (name)); } } + else + { + /* Otherwise create a forward-reference just so the tag is in scope. */ ! ref = make_node (code); ! pushtag (name, ref); ! } ! C_TYPE_BEING_DEFINED (ref) = 1; TYPE_PACKED (ref) = flag_pack_struct; return ref; *************** grokfield (filename, line, declarator, d *** 5540,5554 **** if (declarator == NULL_TREE && width == NULL_TREE) { ! /* This is an unnamed decl. We only support unnamed ! structs/unions, so check for other things and refuse them. */ tree type = TREE_VALUE (declspecs); ! if (TREE_CODE (type) == TYPE_DECL) type = TREE_TYPE (type); ! if (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE) { ! error ("unnamed fields of type other than struct or union are not allowed"); return NULL_TREE; } } --- 5016,5059 ---- if (declarator == NULL_TREE && width == NULL_TREE) { ! /* This is an unnamed decl. ! ! If we have something of the form "union { list } ;" then this ! is the anonymous union extension. Similarly for struct. ! ! If this is something of the form "struct foo;", then ! If MS extensions are enabled, this is handled as an ! anonymous struct. ! Otherwise this is a forward declaration of a structure tag. ! ! If this is something of the form "foo;" and foo is a TYPE_DECL, then ! If MS extensions are enabled and foo names a structure, then ! again this is an anonymous struct. ! Otherwise this is an error. ! ! Oh what a horrid tangled web we weave. I wonder if MS consiously ! took this from Plan 9 or if it was an accident of implementation ! that took root before someone noticed the bug... */ ! tree type = TREE_VALUE (declspecs); ! if (flag_ms_extensions && TREE_CODE (type) == TYPE_DECL) type = TREE_TYPE (type); ! if (TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE) { ! if (flag_ms_extensions) ! ; /* ok */ ! else if (flag_iso) ! goto warn_unnamed_field; ! else if (TYPE_NAME (type) == NULL) ! ; /* ok */ ! else ! goto warn_unnamed_field; ! } ! else ! { ! warn_unnamed_field: ! warning ("declaration does not declare anything"); return NULL_TREE; } } *************** grokfield (filename, line, declarator, d *** 5558,5564 **** finish_decl (value, NULL_TREE, NULL_TREE); DECL_INITIAL (value) = width; ! maybe_objc_check_decl (value); return value; } --- 5063,5070 ---- finish_decl (value, NULL_TREE, NULL_TREE); DECL_INITIAL (value) = width; ! if (flag_objc) ! objc_check_decl (value); return value; } *************** finish_struct (t, fieldlist, attributes) *** 5591,5597 **** if (pedantic) pedwarn ("%s defined inside parms", TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure")); ! else if (! flag_traditional) warning ("%s defined inside parms", TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure")); } --- 5097,5103 ---- if (pedantic) pedwarn ("%s defined inside parms", TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure")); ! else warning ("%s defined inside parms", TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure")); } *************** finish_struct (t, fieldlist, attributes) *** 5734,5751 **** } } - else if (TREE_TYPE (x) != error_mark_node) - { - unsigned int min_align = (DECL_PACKED (x) ? BITS_PER_UNIT - : TYPE_ALIGN (TREE_TYPE (x))); - - /* Non-bit-fields are aligned for their type, except packed - fields which require only BITS_PER_UNIT alignment. */ - DECL_ALIGN (x) = MAX (DECL_ALIGN (x), min_align); - if (! DECL_PACKED (x)) - DECL_USER_ALIGN (x) |= TYPE_USER_ALIGN (TREE_TYPE (x)); - } - DECL_INITIAL (x) = 0; /* Detect flexible array member in an invalid context. */ --- 5240,5245 ---- *************** finish_struct (t, fieldlist, attributes) *** 5761,5766 **** --- 5255,5265 ---- else if (! saw_named_field) error_with_decl (x, "flexible array member in otherwise empty struct"); } + + if (pedantic && TREE_CODE (t) == RECORD_TYPE + && flexible_array_type_p (TREE_TYPE (x))) + pedwarn_with_decl (x, "invalid use of structure with flexible array member"); + if (DECL_NAME (x)) saw_named_field = 1; } *************** finish_struct (t, fieldlist, attributes) *** 5834,5855 **** /* If this structure or union completes the type of any previous variable declaration, lay it out and output its rtl. */ ! if (current_binding_level->n_incomplete != 0) { ! tree decl; ! for (decl = current_binding_level->names; decl; decl = TREE_CHAIN (decl)) ! { if (TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == TYPE_MAIN_VARIANT (t) && TREE_CODE (decl) != TYPE_DECL) { layout_decl (decl, 0); ! /* This is a no-op in c-lang.c or something real in objc-actions.c. */ ! maybe_objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, toplevel, 0); if (! toplevel) expand_decl (decl); ! if (--current_binding_level->n_incomplete == 0) ! break; } else if (!COMPLETE_TYPE_P (TREE_TYPE (decl)) && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE) --- 5333,5361 ---- /* If this structure or union completes the type of any previous variable declaration, lay it out and output its rtl. */ ! if (current_binding_level->incomplete_list != NULL_TREE) { ! tree prev = NULL_TREE; ! ! for (x = current_binding_level->incomplete_list; x; x = TREE_CHAIN (x)) ! { ! tree decl = TREE_VALUE (x); ! if (TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == TYPE_MAIN_VARIANT (t) && TREE_CODE (decl) != TYPE_DECL) { layout_decl (decl, 0); ! /* This is a no-op in c-lang.c or something real in objc-act.c. */ ! if (flag_objc) ! objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, toplevel, 0); if (! toplevel) expand_decl (decl); ! /* Unlink X from the incomplete list. */ ! if (prev) ! TREE_CHAIN (prev) = TREE_CHAIN (x); ! else ! current_binding_level->incomplete_list = TREE_CHAIN (x); } else if (!COMPLETE_TYPE_P (TREE_TYPE (decl)) && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE) *************** finish_struct (t, fieldlist, attributes) *** 5863,5875 **** if (TREE_CODE (decl) != TYPE_DECL) { layout_decl (decl, 0); ! maybe_objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, toplevel, 0); if (! toplevel) expand_decl (decl); } ! if (--current_binding_level->n_incomplete == 0) ! break; } } } --- 5369,5385 ---- if (TREE_CODE (decl) != TYPE_DECL) { layout_decl (decl, 0); ! if (flag_objc) ! objc_check_decl (decl); rest_of_decl_compilation (decl, NULL, toplevel, 0); if (! toplevel) expand_decl (decl); } ! /* Unlink X from the incomplete list. */ ! if (prev) ! TREE_CHAIN (prev) = TREE_CHAIN (x); ! else ! current_binding_level->incomplete_list = TREE_CHAIN (x); } } } *************** finish_enum (enumtype, values, attribute *** 5986,5992 **** min_precision (maxnode, unsign)); if (TYPE_PACKED (enumtype) || precision > TYPE_PRECISION (integer_type_node)) { ! tree narrowest = type_for_size (precision, unsign); if (narrowest == 0) { warning ("enumeration values exceed range of largest integer"); --- 5496,5502 ---- min_precision (maxnode, unsign)); if (TYPE_PACKED (enumtype) || precision > TYPE_PRECISION (integer_type_node)) { ! tree narrowest = c_common_type_for_size (precision, unsign); if (narrowest == 0) { warning ("enumeration values exceed range of largest integer"); *************** finish_enum (enumtype, values, attribute *** 5999,6005 **** precision = TYPE_PRECISION (integer_type_node); if (precision == TYPE_PRECISION (integer_type_node)) ! enum_value_type = type_for_size (precision, 0); else enum_value_type = enumtype; --- 5509,5515 ---- precision = TYPE_PRECISION (integer_type_node); if (precision == TYPE_PRECISION (integer_type_node)) ! enum_value_type = c_common_type_for_size (precision, 0); else enum_value_type = enumtype; *************** build_enumerator (name, value) *** 6127,6137 **** /* Now create a declaration for the enum value name. */ type = TREE_TYPE (value); ! type = type_for_size (MAX (TYPE_PRECISION (type), ! TYPE_PRECISION (integer_type_node)), ! ((flag_traditional ! || TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node)) ! && TREE_UNSIGNED (type))); decl = build_decl (CONST_DECL, name, type); DECL_INITIAL (decl) = convert (type, value); --- 5637,5647 ---- /* Now create a declaration for the enum value name. */ type = TREE_TYPE (value); ! type = c_common_type_for_size (MAX (TYPE_PRECISION (type), ! TYPE_PRECISION (integer_type_node)), ! (TYPE_PRECISION (type) ! >= TYPE_PRECISION (integer_type_node) ! && TREE_UNSIGNED (type))); decl = build_decl (CONST_DECL, name, type); DECL_INITIAL (decl) = convert (type, value); *************** start_function (declspecs, declarator, a *** 6166,6172 **** current_function_returns_abnormally = 0; warn_about_return_type = 0; current_extern_inline = 0; - c_function_varargs = 0; named_labels = 0; shadowed_labels = 0; --- 5676,5681 ---- *************** start_function (declspecs, declarator, a *** 6363,6374 **** /* Promote the value to int before returning it. */ if (c_promoting_integer_type_p (restype)) { ! /* It retains unsignedness if traditional ! or if not really getting wider. */ if (TREE_UNSIGNED (restype) ! && (flag_traditional ! || (TYPE_PRECISION (restype) ! == TYPE_PRECISION (integer_type_node)))) restype = unsigned_type_node; else restype = integer_type_node; --- 5872,5881 ---- /* Promote the value to int before returning it. */ if (c_promoting_integer_type_p (restype)) { ! /* It retains unsignedness if not really getting wider. */ if (TREE_UNSIGNED (restype) ! && (TYPE_PRECISION (restype) ! == TYPE_PRECISION (integer_type_node))) restype = unsigned_type_node; else restype = integer_type_node; *************** start_function (declspecs, declarator, a *** 6387,6402 **** return 1; } - - /* Record that this function is going to be a varargs function. - This is called before store_parm_decls, which is too early - to call mark_varargs directly. */ - - void - c_mark_varargs () - { - c_function_varargs = 1; - } /* Store the parameter declarations into the current function declaration. This is called after parsing the parameter declarations, before --- 5894,5899 ---- *************** store_parm_decls () *** 6587,6601 **** layout_decl (found, 0); } - /* Traditionally, a parm declared float is actually a double. */ - if (found && flag_traditional - && TYPE_MAIN_VARIANT (TREE_TYPE (found)) == float_type_node) - { - TREE_TYPE (found) = double_type_node; - DECL_ARG_TYPE (found) = double_type_node; - layout_decl (found, 0); - } - /* If no declaration found, default to int. */ if (!found) { --- 6084,6089 ---- *************** store_parm_decls () *** 6729,6739 **** "prototype declaration"); } } ! /* If -traditional, allow `int' argument to match ! `unsigned' prototype. */ ! else if (! (flag_traditional ! && TYPE_MAIN_VARIANT (TREE_TYPE (parm)) == integer_type_node ! && TYPE_MAIN_VARIANT (TREE_VALUE (type)) == unsigned_type_node)) { error ("argument `%s' doesn't match prototype", IDENTIFIER_POINTER (DECL_NAME (parm))); --- 6217,6223 ---- "prototype declaration"); } } ! else { error ("argument `%s' doesn't match prototype", IDENTIFIER_POINTER (DECL_NAME (parm))); *************** finish_function (nested, can_defer_p) *** 6868,6880 **** DECL_CONTEXT (DECL_RESULT (fndecl)) = fndecl; - /* Obey `register' declarations if `setjmp' is called in this fn. */ - if (flag_traditional && current_function_calls_setjmp) - { - setjmp_protect (DECL_INITIAL (fndecl)); - setjmp_protect_args (); - } - if (MAIN_NAME_P (DECL_NAME (fndecl)) && flag_hosted) { if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (fndecl))) --- 6352,6357 ---- *************** finish_function (nested, can_defer_p) *** 6931,6937 **** /* Let the error reporting routines know that we're outside a function. For a nested function, this value is used in ! pop_c_function_context and then reset via pop_function_context. */ current_function_decl = NULL; } } --- 6408,6414 ---- /* Let the error reporting routines know that we're outside a function. For a nested function, this value is used in ! c_pop_function_context and then reset via pop_function_context. */ current_function_decl = NULL; } } *************** c_expand_deferred_function (fndecl) *** 6951,6957 **** } } ! /* Generate the RTL for the body of FNDECL. If NESTED_P is non-zero, then we are already in the process of generating RTL for another function. If can_defer_p is zero, we won't attempt to defer the generation of RTL. */ --- 6428,6454 ---- } } ! /* Called to move the SAVE_EXPRs for parameter declarations in a ! nested function into the nested function. DATA is really the ! nested FUNCTION_DECL. */ ! ! static tree ! set_save_expr_context (tp, walk_subtrees, data) ! tree *tp; ! int *walk_subtrees; ! void *data; ! { ! if (TREE_CODE (*tp) == SAVE_EXPR && !SAVE_EXPR_CONTEXT (*tp)) ! SAVE_EXPR_CONTEXT (*tp) = (tree) data; ! /* Do not walk back into the SAVE_EXPR_CONTEXT; that will cause ! circularity. */ ! else if (DECL_P (*tp)) ! *walk_subtrees = 0; ! ! return NULL_TREE; ! } ! ! /* Generate the RTL for the body of FNDECL. If NESTED_P is nonzero, then we are already in the process of generating RTL for another function. If can_defer_p is zero, we won't attempt to defer the generation of RTL. */ *************** c_expand_body (fndecl, nested_p, can_def *** 7019,7031 **** immediate_size_expand = 0; cfun->x_dont_save_pending_sizes_p = 1; - /* If this is a varargs function, inform function.c. */ - if (c_function_varargs) - mark_varargs (); - /* Set up parameters and prepare for return, for the function. */ expand_function_start (fndecl, 0); /* If this function is `main', emit a call to `__main' to run global initializers, etc. */ if (DECL_NAME (fndecl) --- 6516,6533 ---- immediate_size_expand = 0; cfun->x_dont_save_pending_sizes_p = 1; /* Set up parameters and prepare for return, for the function. */ expand_function_start (fndecl, 0); + /* If the function has a variably modified type, there may be + SAVE_EXPRs in the parameter types. Their context must be set to + refer to this function; they cannot be expanded in the containing + function. */ + if (decl_function_context (fndecl) + && variably_modified_type_p (TREE_TYPE (fndecl))) + walk_tree (&TREE_TYPE (fndecl), set_save_expr_context, fndecl, + NULL); + /* If this function is `main', emit a call to `__main' to run global initializers, etc. */ if (DECL_NAME (fndecl) *************** c_expand_body (fndecl, nested_p, can_def *** 7035,7041 **** /* Generate the RTL for this function. */ expand_stmt (DECL_SAVED_TREE (fndecl)); ! if (uninlinable) { /* Allow the body of the function to be garbage collected. */ DECL_SAVED_TREE (fndecl) = NULL_TREE; --- 6537,6545 ---- /* Generate the RTL for this function. */ expand_stmt (DECL_SAVED_TREE (fndecl)); ! ! /* Keep the function body if it's needed for inlining or dumping. */ ! if (uninlinable && !dump_enabled_p (TDI_all)) { /* Allow the body of the function to be garbage collected. */ DECL_SAVED_TREE (fndecl) = NULL_TREE; *************** c_expand_body (fndecl, nested_p, can_def *** 7106,7112 **** /* Stop pointing to the local nodes about to be freed. But DECL_INITIAL must remain nonzero so we know this was an actual function definition. ! For a nested function, this is done in pop_c_function_context. If rest_of_compilation set this to 0, leave it 0. */ if (DECL_INITIAL (fndecl) != 0) DECL_INITIAL (fndecl) = error_mark_node; --- 6610,6616 ---- /* Stop pointing to the local nodes about to be freed. But DECL_INITIAL must remain nonzero so we know this was an actual function definition. ! For a nested function, this is done in c_pop_function_context. If rest_of_compilation set this to 0, leave it 0. */ if (DECL_INITIAL (fndecl) != 0) DECL_INITIAL (fndecl) = error_mark_node; *************** check_for_loop_decls () *** 7200,7208 **** that keep track of the progress of compilation of the current function. Used for nested functions. */ ! struct c_language_function { ! struct language_function base; tree named_labels; tree shadowed_labels; int returns_value; --- 6704,6712 ---- that keep track of the progress of compilation of the current function. Used for nested functions. */ ! struct language_function GTY(()) { ! struct c_language_function base; tree named_labels; tree shadowed_labels; int returns_value; *************** struct c_language_function *** 7217,7229 **** used during compilation of a C function. */ void ! push_c_function_context (f) struct function *f; { ! struct c_language_function *p; ! p = ((struct c_language_function *) ! xmalloc (sizeof (struct c_language_function))); ! f->language = (struct language_function *) p; p->base.x_stmt_tree = c_stmt_tree; p->base.x_scope_stmt_stack = c_scope_stmt_stack; --- 6721,6733 ---- used during compilation of a C function. */ void ! c_push_function_context (f) struct function *f; { ! struct language_function *p; ! p = ((struct language_function *) ! ggc_alloc (sizeof (struct language_function))); ! f->language = p; p->base.x_stmt_tree = c_stmt_tree; p->base.x_scope_stmt_stack = c_scope_stmt_stack; *************** push_c_function_context (f) *** 7240,7250 **** /* Restore the variables used during compilation of a C function. */ void ! pop_c_function_context (f) struct function *f; { ! struct c_language_function *p ! = (struct c_language_function *) f->language; tree link; /* Bring back all the labels that were shadowed. */ --- 6744,6753 ---- /* Restore the variables used during compilation of a C function. */ void ! c_pop_function_context (f) struct function *f; { ! struct language_function *p = f->language; tree link; /* Bring back all the labels that were shadowed. */ *************** pop_c_function_context (f) *** 7274,7305 **** current_extern_inline = p->extern_inline; current_binding_level = p->binding_level; ! free (p); ! f->language = 0; ! } ! ! /* Mark the language specific parts of F for GC. */ ! ! void ! mark_c_function_context (f) ! struct function *f; ! { ! struct c_language_function *p ! = (struct c_language_function *) f->language; ! ! if (p == 0) ! return; ! ! mark_c_language_function (&p->base); ! ggc_mark_tree (p->shadowed_labels); ! ggc_mark_tree (p->named_labels); ! mark_binding_level (&p->binding_level); } ! /* Copy the DECL_LANG_SPECIFIC data associated with NODE. */ void ! copy_lang_decl (decl) tree decl; { struct lang_decl *ld; --- 6777,6789 ---- current_extern_inline = p->extern_inline; current_binding_level = p->binding_level; ! f->language = NULL; } ! /* Copy the DECL_LANG_SPECIFIC data associated with DECL. */ void ! c_dup_lang_specific_decl (decl) tree decl; { struct lang_decl *ld; *************** copy_lang_decl (decl) *** 7313,7350 **** DECL_LANG_SPECIFIC (decl) = ld; } - /* Mark the language specific bits in T for GC. */ - - void - lang_mark_tree (t) - tree t; - { - if (TREE_CODE (t) == IDENTIFIER_NODE) - { - struct lang_identifier *i = (struct lang_identifier *) t; - ggc_mark_tree (i->global_value); - ggc_mark_tree (i->local_value); - ggc_mark_tree (i->label_value); - ggc_mark_tree (i->implicit_decl); - ggc_mark_tree (i->error_locus); - ggc_mark_tree (i->limbo_value); - } - else if (TYPE_P (t) && TYPE_LANG_SPECIFIC (t)) - ggc_mark (TYPE_LANG_SPECIFIC (t)); - else if (DECL_P (t) && DECL_LANG_SPECIFIC (t)) - { - ggc_mark (DECL_LANG_SPECIFIC (t)); - c_mark_lang_decl (&DECL_LANG_SPECIFIC (t)->base); - ggc_mark_tree (DECL_LANG_SPECIFIC (t)->pending_sizes); - } - } - /* The functions below are required for functionality of doing function at once processing in the C front end. Currently these functions are not called from anywhere in the C front end, but as these changes continue, that will change. */ ! /* Returns non-zero if the current statement is a full expression, i.e. temporaries created during that statement should be destroyed at the end of the statement. */ --- 6797,6808 ---- DECL_LANG_SPECIFIC (decl) = ld; } /* The functions below are required for functionality of doing function at once processing in the C front end. Currently these functions are not called from anywhere in the C front end, but as these changes continue, that will change. */ ! /* Returns nonzero if the current statement is a full expression, i.e. temporaries created during that statement should be destroyed at the end of the statement. */ *************** build_void_list_node () *** 7453,7455 **** --- 6911,6936 ---- tree t = build_tree_list (NULL_TREE, void_type_node); return t; } + + /* Return something to represent absolute declarators containing a *. + TARGET is the absolute declarator that the * contains. + TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile + to apply to the pointer type, represented as identifiers, possible mixed + with attributes. + + We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, + if attributes are present) and whose type is the modifier list. */ + + tree + make_pointer_declarator (type_quals_attrs, target) + tree type_quals_attrs, target; + { + tree quals, attrs; + tree itarget = target; + split_specs_attrs (type_quals_attrs, &quals, &attrs); + if (attrs != NULL_TREE) + itarget = tree_cons (attrs, target, NULL_TREE); + return build1 (INDIRECT_REF, quals, itarget); + } + + #include "gt-c-decl.h" diff -Nrc3pad gcc-3.2.3/gcc/c-dump.c gcc-3.3/gcc/c-dump.c *** gcc-3.2.3/gcc/c-dump.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/c-dump.c 2002-08-22 23:22:51.000000000 +0000 *************** *** 0 **** --- 1,196 ---- + /* Tree-dumping functionality for C-family languages. + Copyright (C) 2002 Free Software Foundation, Inc. + Written by Mark Mitchell + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "tree.h" + #include "c-tree.h" + #include "tree-dump.h" + + /* Dump information common to statements from STMT. */ + + void + dump_stmt (di, t) + dump_info_p di; + tree t; + { + dump_int (di, "line", STMT_LINENO (t)); + } + + /* Dump the next statement after STMT. */ + + void + dump_next_stmt (di, t) + dump_info_p di; + tree t; + { + dump_child ("next", TREE_CHAIN (t)); + } + + /* Dump any C-specific tree codes and attributes of common codes. */ + + int + c_dump_tree (dump_info, t) + void *dump_info; + tree t; + { + enum tree_code code; + dump_info_p di = (dump_info_p) dump_info; + + /* Figure out what kind of node this is. */ + code = TREE_CODE (t); + + switch (code) + { + case FIELD_DECL: + if (DECL_C_BIT_FIELD (t)) + dump_string (di, "bitfield"); + break; + + case ASM_STMT: + dump_stmt (di, t); + if (ASM_VOLATILE_P (t)) + dump_string (di, "volatile"); + dump_child ("strg", ASM_STRING (t)); + dump_child ("outs", ASM_OUTPUTS (t)); + dump_child ("ins", ASM_INPUTS (t)); + dump_child ("clbr", ASM_CLOBBERS (t)); + dump_next_stmt (di, t); + break; + + case BREAK_STMT: + case CONTINUE_STMT: + dump_stmt (di, t); + dump_next_stmt (di, t); + break; + + case CASE_LABEL: + /* Note that a case label is not like other statements; there is + no way to get the line-number of a case label. */ + dump_child ("low", CASE_LOW (t)); + dump_child ("high", CASE_HIGH (t)); + dump_next_stmt (di, t); + break; + + case CLEANUP_STMT: + dump_stmt (di, t); + dump_child ("decl", CLEANUP_DECL (t)); + dump_child ("expr", CLEANUP_EXPR (t)); + dump_next_stmt (di, t); + break; + + case COMPOUND_STMT: + dump_stmt (di, t); + dump_child ("body", COMPOUND_BODY (t)); + dump_next_stmt (di, t); + break; + + case DECL_STMT: + dump_stmt (di, t); + dump_child ("decl", DECL_STMT_DECL (t)); + dump_next_stmt (di, t); + break; + + case DO_STMT: + dump_stmt (di, t); + dump_child ("body", DO_BODY (t)); + dump_child ("cond", DO_COND (t)); + dump_next_stmt (di, t); + break; + + case EXPR_STMT: + dump_stmt (di, t); + dump_child ("expr", EXPR_STMT_EXPR (t)); + dump_next_stmt (di, t); + break; + + case FOR_STMT: + dump_stmt (di, t); + dump_child ("init", FOR_INIT_STMT (t)); + dump_child ("cond", FOR_COND (t)); + dump_child ("expr", FOR_EXPR (t)); + dump_child ("body", FOR_BODY (t)); + dump_next_stmt (di, t); + break; + + case GOTO_STMT: + dump_stmt (di, t); + dump_child ("dest", GOTO_DESTINATION (t)); + dump_next_stmt (di, t); + break; + + case IF_STMT: + dump_stmt (di, t); + dump_child ("cond", IF_COND (t)); + dump_child ("then", THEN_CLAUSE (t)); + dump_child ("else", ELSE_CLAUSE (t)); + dump_next_stmt (di, t); + break; + + case LABEL_STMT: + dump_stmt (di, t); + dump_child ("labl", LABEL_STMT_LABEL (t)); + dump_next_stmt (di, t); + break; + + case RETURN_STMT: + dump_stmt (di, t); + dump_child ("expr", RETURN_STMT_EXPR (t)); + dump_next_stmt (di, t); + break; + + case SWITCH_STMT: + dump_stmt (di, t); + dump_child ("cond", SWITCH_COND (t)); + dump_child ("body", SWITCH_BODY (t)); + dump_next_stmt (di, t); + break; + + case WHILE_STMT: + dump_stmt (di, t); + dump_child ("cond", WHILE_COND (t)); + dump_child ("body", WHILE_BODY (t)); + dump_next_stmt (di, t); + break; + + case SCOPE_STMT: + dump_stmt (di, t); + if (SCOPE_BEGIN_P (t)) + dump_string (di, "begn"); + else + dump_string (di, "end"); + if (SCOPE_NULLIFIED_P (t)) + dump_string (di, "null"); + if (!SCOPE_NO_CLEANUPS_P (t)) + dump_string (di, "clnp"); + dump_next_stmt (di, t); + break; + + case STMT_EXPR: + dump_child ("stmt", STMT_EXPR_STMT (t)); + break; + + default: + break; + } + + return 0; + } diff -Nrc3pad gcc-3.2.3/gcc/c-errors.c gcc-3.3/gcc/c-errors.c *** gcc-3.2.3/gcc/c-errors.c 2001-08-27 06:48:41.000000000 +0000 --- gcc-3.3/gcc/c-errors.c 2002-06-05 19:35:30.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 32,44 **** void pedwarn_c99 VPARAMS ((const char *msgid, ...)) { ! diagnostic_context dc; ! VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context (&dc, msgid, &ap, input_filename, lineno, ! !flag_isoc99 || !flag_pedantic_errors); ! report_diagnostic (&dc); VA_CLOSE (ap); } --- 32,43 ---- void pedwarn_c99 VPARAMS ((const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno, ! flag_isoc99 ? pedantic_error_kind () : DK_WARNING); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); } diff -Nrc3pad gcc-3.2.3/gcc/cfganal.c gcc-3.3/gcc/cfganal.c *** gcc-3.2.3/gcc/cfganal.c 2003-01-07 20:21:35.000000000 +0000 --- gcc-3.3/gcc/cfganal.c 2003-01-15 20:16:46.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 28,34 **** #include "insn-config.h" #include "recog.h" #include "toplev.h" - #include "obstack.h" #include "tm_p.h" /* Store the data structures necessary for depth-first search. */ --- 28,33 ---- *************** static void flow_dfs_compute_reverse_fin *** 55,61 **** PARAMS ((depth_first_search_ds)); static void remove_fake_successors PARAMS ((basic_block)); static bool need_fake_edge_p PARAMS ((rtx)); - static bool keep_with_call_p PARAMS ((rtx)); static bool flow_active_insn_p PARAMS ((rtx)); /* Like active_insn_p, except keep the return value clobber around --- 54,59 ---- *************** flow_active_insn_p (insn) *** 69,75 **** return true; /* A clobber of the function return value exists for buggy ! programs that fail to return a value. It's effect is to keep the return value from being live across the entire function. If we allow it to be skipped, we introduce the possibility for register livetime aborts. */ --- 67,73 ---- return true; /* A clobber of the function return value exists for buggy ! programs that fail to return a value. Its effect is to keep the return value from being live across the entire function. If we allow it to be skipped, we introduce the possibility for register livetime aborts. */ *************** can_fallthru (src, target) *** 112,118 **** rtx insn = src->end; rtx insn2 = target->head; ! if (src->index + 1 == target->index && !active_insn_p (insn2)) insn2 = next_active_insn (insn2); /* ??? Later we may add code to move jump tables offline. */ --- 110,119 ---- rtx insn = src->end; rtx insn2 = target->head; ! if (src->next_bb != target) ! return 0; ! ! if (!active_insn_p (insn2)) insn2 = next_active_insn (insn2); /* ??? Later we may add code to move jump tables offline. */ *************** can_fallthru (src, target) *** 120,126 **** } /* Mark the back edges in DFS traversal. ! Return non-zero if a loop (natural or otherwise) is present. Inspired by Depth_First_Search_PP described in: Advanced Compiler Design and Implementation --- 121,127 ---- } /* Mark the back edges in DFS traversal. ! Return nonzero if a loop (natural or otherwise) is present. Inspired by Depth_First_Search_PP described in: Advanced Compiler Design and Implementation *************** mark_dfs_back_edges () *** 142,156 **** bool found = false; /* Allocate the preorder and postorder number arrays. */ ! pre = (int *) xcalloc (n_basic_blocks, sizeof (int)); ! post = (int *) xcalloc (n_basic_blocks, sizeof (int)); /* Allocate stack for back-tracking up CFG. */ stack = (edge *) xmalloc ((n_basic_blocks + 1) * sizeof (edge)); sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (n_basic_blocks); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); --- 143,157 ---- bool found = false; /* Allocate the preorder and postorder number arrays. */ ! pre = (int *) xcalloc (last_basic_block, sizeof (int)); ! post = (int *) xcalloc (last_basic_block, sizeof (int)); /* Allocate stack for back-tracking up CFG. */ stack = (edge *) xmalloc ((n_basic_blocks + 1) * sizeof (edge)); sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); *************** mark_dfs_back_edges () *** 211,216 **** --- 212,251 ---- return found; } + /* Set the flag EDGE_CAN_FALLTHRU for edges that can be fallthru. */ + + void + set_edge_can_fallthru_flag () + { + basic_block bb; + + FOR_EACH_BB (bb) + { + edge e; + + for (e = bb->succ; e; e = e->succ_next) + { + e->flags &= ~EDGE_CAN_FALLTHRU; + + /* The FALLTHRU edge is also CAN_FALLTHRU edge. */ + if (e->flags & EDGE_FALLTHRU) + e->flags |= EDGE_CAN_FALLTHRU; + } + + /* If the BB ends with an invertable condjump all (2) edges are + CAN_FALLTHRU edges. */ + if (!bb->succ || !bb->succ->succ_next || bb->succ->succ_next->succ_next) + continue; + if (!any_condjump_p (bb->end)) + continue; + if (!invert_jump (bb->end, JUMP_LABEL (bb->end), 0)) + continue; + invert_jump (bb->end, JUMP_LABEL (bb->end), 0); + bb->succ->flags |= EDGE_CAN_FALLTHRU; + bb->succ->succ_next->flags |= EDGE_CAN_FALLTHRU; + } + } + /* Return true if we need to add fake edge to exit. Helper function for the flow_call_edges_add. */ *************** need_fake_edge_p (insn) *** 236,267 **** || GET_CODE (PATTERN (insn)) == ASM_INPUT); } - /* Return true if INSN should be kept in the same block as a preceding call. - This is done for a single-set whose destination is a fixed register or - whose source is the function return value. This is a helper function for - flow_call_edges_add. */ - - static bool - keep_with_call_p (insn) - rtx insn; - { - rtx set; - - if (INSN_P (insn) && (set = single_set (insn)) != NULL) - { - if (GET_CODE (SET_DEST (set)) == REG - && fixed_regs[REGNO (SET_DEST (set))] - && general_operand (SET_SRC (set), VOIDmode)) - return true; - if (GET_CODE (SET_SRC (set)) == REG - && FUNCTION_VALUE_REGNO_P (REGNO (SET_SRC (set))) - && GET_CODE (SET_DEST (set)) == REG - && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER) - return true; - } - return false; - } - /* Add fake edges to the function exit for any non constant and non noreturn calls, volatile inline assembly in the bitmap of blocks specified by BLOCKS or to the whole CFG if BLOCKS is zero. Return the number of blocks --- 271,276 ---- *************** flow_call_edges_add (blocks) *** 276,304 **** { int i; int blocks_split = 0; ! int bb_num = 0; ! basic_block *bbs; bool check_last_block = false; ! /* Map bb indices into basic block pointers since split_block ! will renumber the basic blocks. */ ! ! bbs = xmalloc (n_basic_blocks * sizeof (*bbs)); if (! blocks) ! { ! for (i = 0; i < n_basic_blocks; i++) ! bbs[bb_num++] = BASIC_BLOCK (i); ! ! check_last_block = true; ! } else ! EXECUTE_IF_SET_IN_SBITMAP (blocks, 0, i, ! { ! bbs[bb_num++] = BASIC_BLOCK (i); ! if (i == n_basic_blocks - 1) ! check_last_block = true; ! }); /* In the last basic block, before epilogue generation, there will be a fallthru edge to EXIT. Special care is required if the last insn --- 285,300 ---- { int i; int blocks_split = 0; ! int last_bb = last_basic_block; bool check_last_block = false; ! if (n_basic_blocks == 0) ! return 0; if (! blocks) ! check_last_block = true; else ! check_last_block = TEST_BIT (blocks, EXIT_BLOCK_PTR->prev_bb->index); /* In the last basic block, before epilogue generation, there will be a fallthru edge to EXIT. Special care is required if the last insn *************** flow_call_edges_add (blocks) *** 314,320 **** Handle this by adding a dummy instruction in a new last basic block. */ if (check_last_block) { ! basic_block bb = BASIC_BLOCK (n_basic_blocks - 1); rtx insn = bb->end; /* Back up past insns that must be kept in the same block as a call. */ --- 310,316 ---- Handle this by adding a dummy instruction in a new last basic block. */ if (check_last_block) { ! basic_block bb = EXIT_BLOCK_PTR->prev_bb; rtx insn = bb->end; /* Back up past insns that must be kept in the same block as a call. */ *************** flow_call_edges_add (blocks) *** 340,351 **** calls since there is no way that we can determine if they will return or not... */ ! for (i = 0; i < bb_num; i++) { ! basic_block bb = bbs[i]; rtx insn; rtx prev_insn; for (insn = bb->end; ; insn = prev_insn) { prev_insn = PREV_INSN (insn); --- 336,353 ---- calls since there is no way that we can determine if they will return or not... */ ! for (i = 0; i < last_bb; i++) { ! basic_block bb = BASIC_BLOCK (i); rtx insn; rtx prev_insn; + if (!bb) + continue; + + if (blocks && !TEST_BIT (blocks, i)) + continue; + for (insn = bb->end; ; insn = prev_insn) { prev_insn = PREV_INSN (insn); *************** flow_call_edges_add (blocks) *** 375,383 **** /* Note that the following may create a new basic block and renumber the existing basic blocks. */ ! e = split_block (bb, split_at_insn); ! if (e) ! blocks_split++; make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE); } --- 377,388 ---- /* Note that the following may create a new basic block and renumber the existing basic blocks. */ ! if (split_at_insn != bb->end) ! { ! e = split_block (bb, split_at_insn); ! if (e) ! blocks_split++; ! } make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE); } *************** flow_call_edges_add (blocks) *** 390,417 **** if (blocks_split) verify_flow_info (); - free (bbs); return blocks_split; } /* Find unreachable blocks. An unreachable block will have 0 in ! the reachable bit in block->flags. A non-zero value indicates the block is reachable. */ void find_unreachable_blocks () { edge e; ! int i, n; ! basic_block *tos, *worklist; ! n = n_basic_blocks; ! tos = worklist = (basic_block *) xmalloc (sizeof (basic_block) * n); /* Clear all the reachability flags. */ ! for (i = 0; i < n; ++i) ! BASIC_BLOCK (i)->flags &= ~BB_REACHABLE; /* Add our starting points to the worklist. Almost always there will be only one. It isn't inconceivable that we might one day directly --- 395,420 ---- if (blocks_split) verify_flow_info (); return blocks_split; } /* Find unreachable blocks. An unreachable block will have 0 in ! the reachable bit in block->flags. A nonzero value indicates the block is reachable. */ void find_unreachable_blocks () { edge e; ! basic_block *tos, *worklist, bb; ! tos = worklist = ! (basic_block *) xmalloc (sizeof (basic_block) * n_basic_blocks); /* Clear all the reachability flags. */ ! FOR_EACH_BB (bb) ! bb->flags &= ~BB_REACHABLE; /* Add our starting points to the worklist. Almost always there will be only one. It isn't inconceivable that we might one day directly *************** create_edge_list () *** 461,468 **** struct edge_list *elist; edge e; int num_edges; - int x; int block_count; block_count = n_basic_blocks + 2; /* Include the entry and exit blocks. */ --- 464,471 ---- struct edge_list *elist; edge e; int num_edges; int block_count; + basic_block bb; block_count = n_basic_blocks + 2; /* Include the entry and exit blocks. */ *************** create_edge_list () *** 470,487 **** /* Determine the number of edges in the flow graph by counting successor edges on each basic block. */ ! for (x = 0; x < n_basic_blocks; x++) { - basic_block bb = BASIC_BLOCK (x); - for (e = bb->succ; e; e = e->succ_next) num_edges++; } - /* Don't forget successors of the entry block. */ - for (e = ENTRY_BLOCK_PTR->succ; e; e = e->succ_next) - num_edges++; - elist = (struct edge_list *) xmalloc (sizeof (struct edge_list)); elist->num_blocks = block_count; elist->num_edges = num_edges; --- 473,484 ---- /* Determine the number of edges in the flow graph by counting successor edges on each basic block. */ ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { for (e = bb->succ; e; e = e->succ_next) num_edges++; } elist = (struct edge_list *) xmalloc (sizeof (struct edge_list)); elist->num_blocks = block_count; elist->num_edges = num_edges; *************** create_edge_list () *** 489,506 **** num_edges = 0; ! /* Follow successors of the entry block, and register these edges. */ ! for (e = ENTRY_BLOCK_PTR->succ; e; e = e->succ_next) ! elist->index_to_edge[num_edges++] = e; ! ! for (x = 0; x < n_basic_blocks; x++) ! { ! basic_block bb = BASIC_BLOCK (x); ! ! /* Follow all successors of blocks, and register these edges. */ ! for (e = bb->succ; e; e = e->succ_next) ! elist->index_to_edge[num_edges++] = e; ! } return elist; } --- 486,495 ---- num_edges = 0; ! /* Follow successors of blocks, and register these edges. */ ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) ! for (e = bb->succ; e; e = e->succ_next) ! elist->index_to_edge[num_edges++] = e; return elist; } *************** verify_edge_list (f, elist) *** 554,566 **** FILE *f; struct edge_list *elist; { ! int x, pred, succ, index; edge e; ! for (x = 0; x < n_basic_blocks; x++) { - basic_block bb = BASIC_BLOCK (x); - for (e = bb->succ; e; e = e->succ_next) { pred = e->src->index; --- 543,554 ---- FILE *f; struct edge_list *elist; { ! int pred, succ, index; edge e; + basic_block bb, p, s; ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { for (e = bb->succ; e; e = e->succ_next) { pred = e->src->index; *************** verify_edge_list (f, elist) *** 581,613 **** } } ! for (e = ENTRY_BLOCK_PTR->succ; e; e = e->succ_next) ! { ! pred = e->src->index; ! succ = e->dest->index; ! index = EDGE_INDEX (elist, e->src, e->dest); ! if (index == EDGE_INDEX_NO_EDGE) ! { ! fprintf (f, "*p* No index for edge from %d to %d\n", pred, succ); ! continue; ! } ! ! if (INDEX_EDGE_PRED_BB (elist, index)->index != pred) ! fprintf (f, "*p* Pred for index %d should be %d not %d\n", ! index, pred, INDEX_EDGE_PRED_BB (elist, index)->index); ! if (INDEX_EDGE_SUCC_BB (elist, index)->index != succ) ! fprintf (f, "*p* Succ for index %d should be %d not %d\n", ! index, succ, INDEX_EDGE_SUCC_BB (elist, index)->index); ! } ! ! /* We've verified that all the edges are in the list, no lets make sure there are no spurious edges in the list. */ ! for (pred = 0; pred < n_basic_blocks; pred++) ! for (succ = 0; succ < n_basic_blocks; succ++) { - basic_block p = BASIC_BLOCK (pred); - basic_block s = BASIC_BLOCK (succ); int found_edge = 0; for (e = p->succ; e; e = e->succ_next) --- 569,580 ---- } } ! /* We've verified that all the edges are in the list, now lets make sure there are no spurious edges in the list. */ ! FOR_BB_BETWEEN (p, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) ! FOR_BB_BETWEEN (s, ENTRY_BLOCK_PTR->next_bb, NULL, next_bb) { int found_edge = 0; for (e = p->succ; e; e = e->succ_next) *************** verify_edge_list (f, elist) *** 624,701 **** break; } ! if (EDGE_INDEX (elist, BASIC_BLOCK (pred), BASIC_BLOCK (succ)) == EDGE_INDEX_NO_EDGE && found_edge != 0) fprintf (f, "*** Edge (%d, %d) appears to not have an index\n", ! pred, succ); ! if (EDGE_INDEX (elist, BASIC_BLOCK (pred), BASIC_BLOCK (succ)) != EDGE_INDEX_NO_EDGE && found_edge == 0) fprintf (f, "*** Edge (%d, %d) has index %d, but there is no edge\n", ! pred, succ, EDGE_INDEX (elist, BASIC_BLOCK (pred), ! BASIC_BLOCK (succ))); } - - for (succ = 0; succ < n_basic_blocks; succ++) - { - basic_block p = ENTRY_BLOCK_PTR; - basic_block s = BASIC_BLOCK (succ); - int found_edge = 0; - - for (e = p->succ; e; e = e->succ_next) - if (e->dest == s) - { - found_edge = 1; - break; - } - - for (e = s->pred; e; e = e->pred_next) - if (e->src == p) - { - found_edge = 1; - break; - } - - if (EDGE_INDEX (elist, ENTRY_BLOCK_PTR, BASIC_BLOCK (succ)) - == EDGE_INDEX_NO_EDGE && found_edge != 0) - fprintf (f, "*** Edge (entry, %d) appears to not have an index\n", - succ); - if (EDGE_INDEX (elist, ENTRY_BLOCK_PTR, BASIC_BLOCK (succ)) - != EDGE_INDEX_NO_EDGE && found_edge == 0) - fprintf (f, "*** Edge (entry, %d) has index %d, but no edge exists\n", - succ, EDGE_INDEX (elist, ENTRY_BLOCK_PTR, - BASIC_BLOCK (succ))); - } - - for (pred = 0; pred < n_basic_blocks; pred++) - { - basic_block p = BASIC_BLOCK (pred); - basic_block s = EXIT_BLOCK_PTR; - int found_edge = 0; - - for (e = p->succ; e; e = e->succ_next) - if (e->dest == s) - { - found_edge = 1; - break; - } - - for (e = s->pred; e; e = e->pred_next) - if (e->src == p) - { - found_edge = 1; - break; - } - - if (EDGE_INDEX (elist, BASIC_BLOCK (pred), EXIT_BLOCK_PTR) - == EDGE_INDEX_NO_EDGE && found_edge != 0) - fprintf (f, "*** Edge (%d, exit) appears to not have an index\n", - pred); - if (EDGE_INDEX (elist, BASIC_BLOCK (pred), EXIT_BLOCK_PTR) - != EDGE_INDEX_NO_EDGE && found_edge == 0) - fprintf (f, "*** Edge (%d, exit) has index %d, but no edge exists\n", - pred, EDGE_INDEX (elist, BASIC_BLOCK (pred), - EXIT_BLOCK_PTR)); - } } /* This routine will determine what, if any, edge there is between --- 591,605 ---- break; } ! if (EDGE_INDEX (elist, p, s) == EDGE_INDEX_NO_EDGE && found_edge != 0) fprintf (f, "*** Edge (%d, %d) appears to not have an index\n", ! p->index, s->index); ! if (EDGE_INDEX (elist, p, s) != EDGE_INDEX_NO_EDGE && found_edge == 0) fprintf (f, "*** Edge (%d, %d) has index %d, but there is no edge\n", ! p->index, s->index, EDGE_INDEX (elist, p, s)); } } /* This routine will determine what, if any, edge there is between *************** remove_fake_successors (bb) *** 784,796 **** void remove_fake_edges () { ! int x; ! ! for (x = 0; x < n_basic_blocks; x++) ! remove_fake_successors (BASIC_BLOCK (x)); ! /* We've handled all successors except the entry block's. */ ! remove_fake_successors (ENTRY_BLOCK_PTR); } /* This function will add a fake edge between any block which has no --- 688,697 ---- void remove_fake_edges () { ! basic_block bb; ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) ! remove_fake_successors (bb); } /* This function will add a fake edge between any block which has no *************** remove_fake_edges () *** 800,810 **** void add_noreturn_fake_exit_edges () { ! int x; ! for (x = 0; x < n_basic_blocks; x++) ! if (BASIC_BLOCK (x)->succ == NULL) ! make_single_succ_edge (BASIC_BLOCK (x), EXIT_BLOCK_PTR, EDGE_FAKE); } /* This function adds a fake edge between any infinite loops to the --- 701,711 ---- void add_noreturn_fake_exit_edges () { ! basic_block bb; ! FOR_EACH_BB (bb) ! if (bb->succ == NULL) ! make_single_succ_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE); } /* This function adds a fake edge between any infinite loops to the *************** flow_reverse_top_sort_order_compute (rts *** 860,866 **** sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (n_basic_blocks); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); --- 761,767 ---- sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); *************** flow_reverse_top_sort_order_compute (rts *** 909,916 **** } /* Compute the depth first search order and store in the array ! DFS_ORDER if non-zero, marking the nodes visited in VISITED. If ! RC_ORDER is non-zero, return the reverse completion number for each node. Returns the number of nodes visited. A depth first search tries to get as far away from the starting point as quickly as possible. */ --- 810,817 ---- } /* Compute the depth first search order and store in the array ! DFS_ORDER if nonzero, marking the nodes visited in VISITED. If ! RC_ORDER is nonzero, return the reverse completion number for each node. Returns the number of nodes visited. A depth first search tries to get as far away from the starting point as quickly as possible. */ *************** flow_depth_first_order_compute (dfs_orde *** 931,937 **** sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (n_basic_blocks); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); --- 832,838 ---- sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); *************** flow_preorder_transversal_compute (pot_o *** 1030,1051 **** sbitmap visited; struct dfst_node *node; struct dfst_node *dfst; /* Allocate stack for back-tracking up CFG. */ stack = (edge *) xmalloc ((n_basic_blocks + 1) * sizeof (edge)); sp = 0; /* Allocate the tree. */ ! dfst = (struct dfst_node *) xcalloc (n_basic_blocks, sizeof (struct dfst_node)); ! for (i = 0; i < n_basic_blocks; i++) { max_successors = 0; ! for (e = BASIC_BLOCK (i)->succ; e; e = e->succ_next) max_successors++; ! dfst[i].node = (max_successors ? (struct dfst_node **) xcalloc (max_successors, sizeof (struct dfst_node *)) --- 931,953 ---- sbitmap visited; struct dfst_node *node; struct dfst_node *dfst; + basic_block bb; /* Allocate stack for back-tracking up CFG. */ stack = (edge *) xmalloc ((n_basic_blocks + 1) * sizeof (edge)); sp = 0; /* Allocate the tree. */ ! dfst = (struct dfst_node *) xcalloc (last_basic_block, sizeof (struct dfst_node)); ! FOR_EACH_BB (bb) { max_successors = 0; ! for (e = bb->succ; e; e = e->succ_next) max_successors++; ! dfst[bb->index].node = (max_successors ? (struct dfst_node **) xcalloc (max_successors, sizeof (struct dfst_node *)) *************** flow_preorder_transversal_compute (pot_o *** 1053,1059 **** } /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (n_basic_blocks); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); --- 955,961 ---- } /* Allocate bitmap to track nodes that have been visited. */ ! visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); *************** flow_preorder_transversal_compute (pot_o *** 1104,1110 **** walking the tree from right to left. */ i = 0; ! node = &dfst[0]; pot_order[i++] = 0; while (node) --- 1006,1012 ---- walking the tree from right to left. */ i = 0; ! node = &dfst[ENTRY_BLOCK_PTR->next_bb->index]; pot_order[i++] = 0; while (node) *************** flow_preorder_transversal_compute (pot_o *** 1120,1126 **** /* Free the tree. */ ! for (i = 0; i < n_basic_blocks; i++) if (dfst[i].node) free (dfst[i].node); --- 1022,1028 ---- /* Free the tree. */ ! for (i = 0; i < last_basic_block; i++) if (dfst[i].node) free (dfst[i].node); *************** flow_preorder_transversal_compute (pot_o *** 1154,1160 **** /* Initialize the data structures used for depth-first search on the reverse graph. If INITIALIZE_STACK is nonzero, the exit block is added to the basic block stack. DATA is the current depth-first ! search context. If INITIALIZE_STACK is non-zero, there is an element on the stack. */ static void --- 1056,1062 ---- /* Initialize the data structures used for depth-first search on the reverse graph. If INITIALIZE_STACK is nonzero, the exit block is added to the basic block stack. DATA is the current depth-first ! search context. If INITIALIZE_STACK is nonzero, there is an element on the stack. */ static void *************** flow_dfs_compute_reverse_init (data) *** 1167,1173 **** data->sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! data->visited_blocks = sbitmap_alloc (n_basic_blocks - (INVALID_BLOCK + 1)); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (data->visited_blocks); --- 1069,1075 ---- data->sp = 0; /* Allocate bitmap to track nodes that have been visited. */ ! data->visited_blocks = sbitmap_alloc (last_basic_block - (INVALID_BLOCK + 1)); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (data->visited_blocks); *************** flow_dfs_compute_reverse_execute (data) *** 1199,1205 **** { basic_block bb; edge e; - int i; while (data->sp > 0) { --- 1101,1106 ---- *************** flow_dfs_compute_reverse_execute (data) *** 1213,1221 **** } /* Determine if there are unvisited basic blocks. */ ! for (i = n_basic_blocks - (INVALID_BLOCK + 1); --i >= 0; ) ! if (!TEST_BIT (data->visited_blocks, i)) ! return BASIC_BLOCK (i + (INVALID_BLOCK + 1)); return NULL; } --- 1114,1122 ---- } /* Determine if there are unvisited basic blocks. */ ! FOR_BB_BETWEEN (bb, EXIT_BLOCK_PTR, NULL, prev_bb) ! if (!TEST_BIT (data->visited_blocks, bb->index - (INVALID_BLOCK + 1))) ! return bb; return NULL; } *************** flow_dfs_compute_reverse_finish (data) *** 1230,1232 **** --- 1131,1184 ---- free (data->stack); sbitmap_free (data->visited_blocks); } + + /* Performs dfs search from BB over vertices satisfying PREDICATE; + if REVERSE, go against direction of edges. Returns number of blocks + found and their list in RSLT. RSLT can contain at most RSLT_MAX items. */ + int + dfs_enumerate_from (bb, reverse, predicate, rslt, rslt_max, data) + basic_block bb; + int reverse; + bool (*predicate) PARAMS ((basic_block, void *)); + basic_block *rslt; + int rslt_max; + void *data; + { + basic_block *st, lbb; + int sp = 0, tv = 0; + + st = xcalloc (rslt_max, sizeof (basic_block)); + rslt[tv++] = st[sp++] = bb; + bb->flags |= BB_VISITED; + while (sp) + { + edge e; + lbb = st[--sp]; + if (reverse) + { + for (e = lbb->pred; e; e = e->pred_next) + if (!(e->src->flags & BB_VISITED) && predicate (e->src, data)) + { + if (tv == rslt_max) + abort (); + rslt[tv++] = st[sp++] = e->src; + e->src->flags |= BB_VISITED; + } + } + else + { + for (e = lbb->succ; e; e = e->succ_next) + if (!(e->dest->flags & BB_VISITED) && predicate (e->dest, data)) + { + if (tv == rslt_max) + abort (); + rslt[tv++] = st[sp++] = e->dest; + e->dest->flags |= BB_VISITED; + } + } + } + free (st); + for (sp = 0; sp < tv; sp++) + rslt[sp]->flags &= ~BB_VISITED; + return tv; + } diff -Nrc3pad gcc-3.2.3/gcc/cfgbuild.c gcc-3.3/gcc/cfgbuild.c *** gcc-3.2.3/gcc/cfgbuild.c 2003-01-10 13:36:19.000000000 +0000 --- gcc-3.3/gcc/cfgbuild.c 2003-01-09 12:40:44.000000000 +0000 *************** *** 1,6 **** /* Control flow graph building code for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GCC. --- 1,6 ---- /* Control flow graph building code for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 45,56 **** #include "except.h" #include "toplev.h" #include "timevar.h" - #include "obstack.h" static int count_basic_blocks PARAMS ((rtx)); static void find_basic_blocks_1 PARAMS ((rtx)); static rtx find_label_refs PARAMS ((rtx, rtx)); ! static void make_edges PARAMS ((rtx, int, int, int)); static void make_label_edge PARAMS ((sbitmap *, basic_block, rtx, int)); static void make_eh_edge PARAMS ((sbitmap *, basic_block, rtx)); --- 45,56 ---- #include "except.h" #include "toplev.h" #include "timevar.h" static int count_basic_blocks PARAMS ((rtx)); static void find_basic_blocks_1 PARAMS ((rtx)); static rtx find_label_refs PARAMS ((rtx, rtx)); ! static void make_edges PARAMS ((rtx, basic_block, ! basic_block, int)); static void make_label_edge PARAMS ((sbitmap *, basic_block, rtx, int)); static void make_eh_edge PARAMS ((sbitmap *, basic_block, rtx)); *************** control_flow_insn_p (insn) *** 102,136 **** switch (GET_CODE (insn)) { ! case NOTE: ! case CODE_LABEL: ! return false; ! case JUMP_INSN: ! /* Jump insn always causes control transfer except for tablejumps. */ ! return (GET_CODE (PATTERN (insn)) != ADDR_VEC ! && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC); ! case CALL_INSN: ! /* Call insn may return to the nonlocal goto handler. */ ! return ((nonlocal_goto_handler_labels ! && (0 == (note = find_reg_note (insn, REG_EH_REGION, ! NULL_RTX)) ! || INTVAL (XEXP (note, 0)) >= 0)) ! /* Or may trap. */ ! || can_throw_internal (insn)); ! case INSN: ! return (flag_non_call_exceptions && can_throw_internal (insn)); ! case BARRIER: ! /* It is nonsence to reach barrier when looking for the ! end of basic block, but before dead code is eliminated ! this may happen. */ ! return false; ! default: ! abort (); } } --- 102,136 ---- switch (GET_CODE (insn)) { ! case NOTE: ! case CODE_LABEL: ! return false; ! case JUMP_INSN: ! /* Jump insn always causes control transfer except for tablejumps. */ ! return (GET_CODE (PATTERN (insn)) != ADDR_VEC ! && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC); ! case CALL_INSN: ! /* Call insn may return to the nonlocal goto handler. */ ! return ((nonlocal_goto_handler_labels ! && (0 == (note = find_reg_note (insn, REG_EH_REGION, ! NULL_RTX)) ! || INTVAL (XEXP (note, 0)) >= 0)) ! /* Or may trap. */ ! || can_throw_internal (insn)); ! case INSN: ! return (flag_non_call_exceptions && can_throw_internal (insn)); ! case BARRIER: ! /* It is nonsence to reach barrier when looking for the ! end of basic block, but before dead code is eliminated ! this may happen. */ ! return false; ! default: ! abort (); } } *************** find_label_refs (f, lvl) *** 205,213 **** rtx lab = XEXP (note, 0), next; if ((next = next_nonnote_insn (lab)) != NULL ! && GET_CODE (next) == JUMP_INSN ! && (GET_CODE (PATTERN (next)) == ADDR_VEC ! || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)) ; else if (GET_CODE (lab) == NOTE) ; --- 205,213 ---- rtx lab = XEXP (note, 0), next; if ((next = next_nonnote_insn (lab)) != NULL ! && GET_CODE (next) == JUMP_INSN ! && (GET_CODE (PATTERN (next)) == ADDR_VEC ! || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)) ; else if (GET_CODE (lab) == NOTE) ; *************** make_eh_edge (edge_cache, src, insn) *** 279,287 **** static void make_edges (label_value_list, min, max, update_p) rtx label_value_list; ! int min, max, update_p; { ! int i; sbitmap *edge_cache = NULL; /* Assume no computed jump; revise as we create edges. */ --- 279,288 ---- static void make_edges (label_value_list, min, max, update_p) rtx label_value_list; ! basic_block min, max; ! int update_p; { ! basic_block bb; sbitmap *edge_cache = NULL; /* Assume no computed jump; revise as we create edges. */ *************** make_edges (label_value_list, min, max, *** 290,324 **** /* Heavy use of computed goto in machine-generated code can lead to nearly fully-connected CFGs. In that case we spend a significant amount of time searching the edge lists for duplicates. */ ! if (forced_labels || label_value_list) { ! edge_cache = sbitmap_vector_alloc (n_basic_blocks, n_basic_blocks); ! sbitmap_vector_zero (edge_cache, n_basic_blocks); if (update_p) ! for (i = min; i <= max; ++i) { edge e; ! for (e = BASIC_BLOCK (i)->succ; e ; e = e->succ_next) if (e->dest != EXIT_BLOCK_PTR) ! SET_BIT (edge_cache[i], e->dest->index); } } ! /* By nature of the way these get numbered, block 0 is always the entry. */ ! if (min == 0) ! cached_make_edge (edge_cache, ENTRY_BLOCK_PTR, BASIC_BLOCK (0), EDGE_FALLTHRU); ! for (i = min; i <= max; ++i) { - basic_block bb = BASIC_BLOCK (i); rtx insn, x; enum rtx_code code; int force_fallthru = 0; ! if (GET_CODE (bb->head) == CODE_LABEL && LABEL_ALTERNATE_NAME (bb->head)) cached_make_edge (NULL, ENTRY_BLOCK_PTR, bb, 0); /* Examine the last instruction of the block, and discover the --- 291,325 ---- /* Heavy use of computed goto in machine-generated code can lead to nearly fully-connected CFGs. In that case we spend a significant amount of time searching the edge lists for duplicates. */ ! if (forced_labels || label_value_list || cfun->max_jumptable_ents > 100) { ! edge_cache = sbitmap_vector_alloc (last_basic_block, last_basic_block); ! sbitmap_vector_zero (edge_cache, last_basic_block); if (update_p) ! FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb) { edge e; ! for (e = bb->succ; e ; e = e->succ_next) if (e->dest != EXIT_BLOCK_PTR) ! SET_BIT (edge_cache[bb->index], e->dest->index); } } ! /* By nature of the way these get numbered, ENTRY_BLOCK_PTR->next_bb block ! is always the entry. */ ! if (min == ENTRY_BLOCK_PTR->next_bb) ! cached_make_edge (edge_cache, ENTRY_BLOCK_PTR, min, EDGE_FALLTHRU); ! FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb) { rtx insn, x; enum rtx_code code; int force_fallthru = 0; ! if (GET_CODE (bb->head) == CODE_LABEL && LABEL_ALT_ENTRY_P (bb->head)) cached_make_edge (NULL, ENTRY_BLOCK_PTR, bb, 0); /* Examine the last instruction of the block, and discover the *************** make_edges (label_value_list, min, max, *** 442,457 **** /* Find out if we can drop through to the next block. */ insn = next_nonnote_insn (insn); ! if (!insn || (i + 1 == n_basic_blocks && force_fallthru)) cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU); ! else if (i + 1 < n_basic_blocks) { ! rtx tmp = BLOCK_HEAD (i + 1); if (GET_CODE (tmp) == NOTE) tmp = next_nonnote_insn (tmp); if (force_fallthru || insn == tmp) ! cached_make_edge (edge_cache, bb, BASIC_BLOCK (i + 1), ! EDGE_FALLTHRU); } } --- 443,457 ---- /* Find out if we can drop through to the next block. */ insn = next_nonnote_insn (insn); ! if (!insn || (bb->next_bb == EXIT_BLOCK_PTR && force_fallthru)) cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU); ! else if (bb->next_bb != EXIT_BLOCK_PTR) { ! rtx tmp = bb->next_bb->head; if (GET_CODE (tmp) == NOTE) tmp = next_nonnote_insn (tmp); if (force_fallthru || insn == tmp) ! cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU); } } *************** find_basic_blocks_1 (f) *** 469,480 **** rtx f; { rtx insn, next; - int i = 0; rtx bb_note = NULL_RTX; rtx lvl = NULL_RTX; rtx trll = NULL_RTX; rtx head = NULL_RTX; rtx end = NULL_RTX; /* We process the instructions in a slightly different way than we did previously. This is so that we see a NOTE_BASIC_BLOCK after we have --- 469,480 ---- rtx f; { rtx insn, next; rtx bb_note = NULL_RTX; rtx lvl = NULL_RTX; rtx trll = NULL_RTX; rtx head = NULL_RTX; rtx end = NULL_RTX; + basic_block prev = ENTRY_BLOCK_PTR; /* We process the instructions in a slightly different way than we did previously. This is so that we see a NOTE_BASIC_BLOCK after we have *************** find_basic_blocks_1 (f) *** 491,497 **** if ((GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == BARRIER) && head) { ! create_basic_block_structure (i++, head, end, bb_note); head = end = NULL_RTX; bb_note = NULL_RTX; } --- 491,497 ---- if ((GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == BARRIER) && head) { ! prev = create_basic_block_structure (head, end, bb_note, prev); head = end = NULL_RTX; bb_note = NULL_RTX; } *************** find_basic_blocks_1 (f) *** 505,511 **** if (head && control_flow_insn_p (insn)) { ! create_basic_block_structure (i++, head, end, bb_note); head = end = NULL_RTX; bb_note = NULL_RTX; } --- 505,511 ---- if (head && control_flow_insn_p (insn)) { ! prev = create_basic_block_structure (head, end, bb_note, prev); head = end = NULL_RTX; bb_note = NULL_RTX; } *************** find_basic_blocks_1 (f) *** 587,601 **** } if (head != NULL_RTX) ! create_basic_block_structure (i++, head, end, bb_note); else if (bb_note) delete_insn (bb_note); ! if (i != n_basic_blocks) abort (); label_value_list = lvl; tail_recursion_label_list = trll; } --- 587,602 ---- } if (head != NULL_RTX) ! create_basic_block_structure (head, end, bb_note, prev); else if (bb_note) delete_insn (bb_note); ! if (last_basic_block != n_basic_blocks) abort (); label_value_list = lvl; tail_recursion_label_list = trll; + clear_aux_for_blocks (); } *************** find_basic_blocks (f, nregs, file) *** 609,636 **** int nregs ATTRIBUTE_UNUSED; FILE *file ATTRIBUTE_UNUSED; { ! int max_uid; ! timevar_push (TV_CFG); ! basic_block_for_insn = 0; /* Flush out existing data. */ if (basic_block_info != NULL) { - int i; - clear_edges (); /* Clear bb->aux on all extant basic blocks. We'll use this as a tag for reuse during create_basic_block, just in case some pass copies around basic block notes improperly. */ ! for (i = 0; i < n_basic_blocks; ++i) ! BASIC_BLOCK (i)->aux = NULL; VARRAY_FREE (basic_block_info); } n_basic_blocks = count_basic_blocks (f); /* Size the basic block table. The actual structures will be allocated by find_basic_blocks_1, since we want to keep the structure pointers --- 610,637 ---- int nregs ATTRIBUTE_UNUSED; FILE *file ATTRIBUTE_UNUSED; { ! basic_block bb; ! timevar_push (TV_CFG); /* Flush out existing data. */ if (basic_block_info != NULL) { clear_edges (); /* Clear bb->aux on all extant basic blocks. We'll use this as a tag for reuse during create_basic_block, just in case some pass copies around basic block notes improperly. */ ! FOR_EACH_BB (bb) ! bb->aux = NULL; VARRAY_FREE (basic_block_info); } n_basic_blocks = count_basic_blocks (f); + last_basic_block = 0; + ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR; + EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR; /* Size the basic block table. The actual structures will be allocated by find_basic_blocks_1, since we want to keep the structure pointers *************** find_basic_blocks (f, nregs, file) *** 644,665 **** find_basic_blocks_1 (f); - /* Record the block to which an insn belongs. */ - /* ??? This should be done another way, by which (perhaps) a label is - tagged directly with the basic block that it starts. It is used for - more than that currently, but IMO that is the only valid use. */ - - max_uid = get_max_uid (); - #ifdef AUTO_INC_DEC - /* Leave space for insns life_analysis makes in some cases for auto-inc. - These cases are rare, so we don't need too much space. */ - max_uid += max_uid / 10; - #endif - - compute_bb_for_insn (max_uid); - /* Discover the edges of our cfg. */ ! make_edges (label_value_list, 0, n_basic_blocks - 1, 0); /* Do very simple cleanup now, for the benefit of code that runs between here and cleanup_cfg, e.g. thread_prologue_and_epilogue_insns. */ --- 645,652 ---- find_basic_blocks_1 (f); /* Discover the edges of our cfg. */ ! make_edges (label_value_list, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0); /* Do very simple cleanup now, for the benefit of code that runs between here and cleanup_cfg, e.g. thread_prologue_and_epilogue_insns. */ *************** find_bb_boundaries (bb) *** 710,716 **** bb = fallthru->dest; remove_edge (fallthru); flow_transfer_insn = NULL_RTX; ! if (LABEL_ALTERNATE_NAME (insn)) make_edge (ENTRY_BLOCK_PTR, bb, 0); } --- 697,703 ---- bb = fallthru->dest; remove_edge (fallthru); flow_transfer_insn = NULL_RTX; ! if (LABEL_ALT_ENTRY_P (insn)) make_edge (ENTRY_BLOCK_PTR, bb, 0); } *************** void *** 788,812 **** find_many_sub_basic_blocks (blocks) sbitmap blocks; { ! int i; ! int min, max; ! for (i = 0; i < n_basic_blocks; i++) ! SET_STATE (BASIC_BLOCK (i), ! TEST_BIT (blocks, i) ? BLOCK_TO_SPLIT : BLOCK_ORIGINAL); ! for (i = 0; i < n_basic_blocks; i++) ! if (STATE (BASIC_BLOCK (i)) == BLOCK_TO_SPLIT) ! find_bb_boundaries (BASIC_BLOCK (i)); ! for (i = 0; i < n_basic_blocks; i++) ! if (STATE (BASIC_BLOCK (i)) != BLOCK_ORIGINAL) break; ! min = max = i; ! for (; i < n_basic_blocks; i++) ! if (STATE (BASIC_BLOCK (i)) != BLOCK_ORIGINAL) ! max = i; /* Now re-scan and wire in all edges. This expect simple (conditional) jumps at the end of each new basic blocks. */ --- 775,798 ---- find_many_sub_basic_blocks (blocks) sbitmap blocks; { ! basic_block bb, min, max; ! FOR_EACH_BB (bb) ! SET_STATE (bb, ! TEST_BIT (blocks, bb->index) ? BLOCK_TO_SPLIT : BLOCK_ORIGINAL); ! FOR_EACH_BB (bb) ! if (STATE (bb) == BLOCK_TO_SPLIT) ! find_bb_boundaries (bb); ! FOR_EACH_BB (bb) ! if (STATE (bb) != BLOCK_ORIGINAL) break; ! min = max = bb; ! for (; bb != EXIT_BLOCK_PTR; bb = bb->next_bb) ! if (STATE (bb) != BLOCK_ORIGINAL) ! max = bb; /* Now re-scan and wire in all edges. This expect simple (conditional) jumps at the end of each new basic blocks. */ *************** find_many_sub_basic_blocks (blocks) *** 814,858 **** /* Update branch probabilities. Expect only (un)conditional jumps to be created with only the forward edges. */ ! for (i = min; i <= max; i++) { edge e; - basic_block b = BASIC_BLOCK (i); ! if (STATE (b) == BLOCK_ORIGINAL) continue; ! if (STATE (b) == BLOCK_NEW) { ! b->count = 0; ! b->frequency = 0; ! for (e = b->pred; e; e=e->pred_next) { ! b->count += e->count; ! b->frequency += EDGE_FREQUENCY (e); } } ! compute_outgoing_frequencies (b); } ! for (i = 0; i < n_basic_blocks; i++) ! SET_STATE (BASIC_BLOCK (i), 0); } /* Like above but for single basic block only. */ void find_sub_basic_blocks (bb) ! basic_block bb; { ! int i; ! int min, max; ! basic_block next = (bb->index == n_basic_blocks - 1 ! ? NULL : BASIC_BLOCK (bb->index + 1)); ! min = bb->index; find_bb_boundaries (bb); ! max = (next ? next->index : n_basic_blocks) - 1; /* Now re-scan and wire in all edges. This expect simple (conditional) jumps at the end of each new basic blocks. */ --- 800,841 ---- /* Update branch probabilities. Expect only (un)conditional jumps to be created with only the forward edges. */ ! FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb) { edge e; ! if (STATE (bb) == BLOCK_ORIGINAL) continue; ! if (STATE (bb) == BLOCK_NEW) { ! bb->count = 0; ! bb->frequency = 0; ! for (e = bb->pred; e; e=e->pred_next) { ! bb->count += e->count; ! bb->frequency += EDGE_FREQUENCY (e); } } ! compute_outgoing_frequencies (bb); } ! FOR_EACH_BB (bb) ! SET_STATE (bb, 0); } /* Like above but for single basic block only. */ void find_sub_basic_blocks (bb) ! basic_block bb; { ! basic_block min, max, b; ! basic_block next = bb->next_bb; ! min = bb; find_bb_boundaries (bb); ! max = next->prev_bb; /* Now re-scan and wire in all edges. This expect simple (conditional) jumps at the end of each new basic blocks. */ *************** find_sub_basic_blocks (bb) *** 860,871 **** /* Update branch probabilities. Expect only (un)conditional jumps to be created with only the forward edges. */ ! for (i = min; i <= max; i++) { edge e; - basic_block b = BASIC_BLOCK (i); ! if (i != min) { b->count = 0; b->frequency = 0; --- 843,853 ---- /* Update branch probabilities. Expect only (un)conditional jumps to be created with only the forward edges. */ ! FOR_BB_BETWEEN (b, min, max->next_bb, next_bb) { edge e; ! if (b != min) { b->count = 0; b->frequency = 0; diff -Nrc3pad gcc-3.2.3/gcc/cfg.c gcc-3.3/gcc/cfg.c *** gcc-3.2.3/gcc/cfg.c 2002-04-10 00:18:53.000000000 +0000 --- gcc-3.3/gcc/cfg.c 2003-03-25 20:31:42.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 38,43 **** --- 38,44 ---- dump_flow_info, debug_flow_info, dump_edge_info - Allocation of AUX fields for basic blocks alloc_aux_for_blocks, free_aux_for_blocks, alloc_aux_for_block + - clear_bb_flags */ #include "config.h" *************** static char *flow_firstobj; *** 64,69 **** --- 65,74 ---- int n_basic_blocks; + /* First free basic block number. */ + + int last_basic_block; + /* Number of edges in the current function. */ int n_edges; *************** struct basic_block_def entry_exit_blocks *** 92,98 **** --- 97,106 ---- NULL, /* global_live_at_end */ NULL, /* aux */ ENTRY_BLOCK, /* index */ + NULL, /* prev_bb */ + EXIT_BLOCK_PTR, /* next_bb */ 0, /* loop_depth */ + NULL, /* loop_father */ 0, /* count */ 0, /* frequency */ 0 /* flags */ *************** struct basic_block_def entry_exit_blocks *** 110,116 **** --- 118,127 ---- NULL, /* global_live_at_end */ NULL, /* aux */ EXIT_BLOCK, /* index */ + ENTRY_BLOCK_PTR, /* prev_bb */ + NULL, /* next_bb */ 0, /* loop_depth */ + NULL, /* loop_father */ 0, /* count */ 0, /* frequency */ 0 /* flags */ *************** free_edge (e) *** 162,173 **** void clear_edges () { ! int i; edge e; ! for (i = 0; i < n_basic_blocks; ++i) { - basic_block bb = BASIC_BLOCK (i); edge e = bb->succ; while (e) --- 173,183 ---- void clear_edges () { ! basic_block bb; edge e; ! FOR_EACH_BB (bb) { edge e = bb->succ; while (e) *************** alloc_block () *** 219,256 **** return bb; } ! /* Remove block B from the basic block array and compact behind it. */ void ! expunge_block_nocompact (b) basic_block b; { /* Invalidate data to make bughunting easier. */ memset (b, 0, sizeof *b); b->index = -3; b->succ = (edge) first_deleted_block; first_deleted_block = (basic_block) b; } ! void ! expunge_block (b) ! basic_block b; { ! int i, n = n_basic_blocks; ! for (i = b->index; i + 1 < n; ++i) { ! basic_block x = BASIC_BLOCK (i + 1); ! BASIC_BLOCK (i) = x; ! x->index = i; } ! n_basic_blocks--; ! basic_block_info->num_elements--; ! expunge_block_nocompact (b); } - /* Create an edge connecting SRC and DST with FLAGS optionally using edge cache CACHE. Return the new edge, NULL if already exist. */ --- 229,327 ---- return bb; } ! /* Link block B to chain after AFTER. */ ! void ! link_block (b, after) ! basic_block b, after; ! { ! b->next_bb = after->next_bb; ! b->prev_bb = after; ! after->next_bb = b; ! b->next_bb->prev_bb = b; ! } + /* Unlink block B from chain. */ void ! unlink_block (b) basic_block b; { + b->next_bb->prev_bb = b->prev_bb; + b->prev_bb->next_bb = b->next_bb; + } + + /* Sequentially order blocks and compact the arrays. */ + void + compact_blocks () + { + int i; + basic_block bb; + + i = 0; + FOR_EACH_BB (bb) + { + BASIC_BLOCK (i) = bb; + bb->index = i; + i++; + } + + if (i != n_basic_blocks) + abort (); + + last_basic_block = n_basic_blocks; + } + + + /* Remove block B from the basic block array. */ + + void + expunge_block (b) + basic_block b; + { + unlink_block (b); + BASIC_BLOCK (b->index) = NULL; + n_basic_blocks--; + /* Invalidate data to make bughunting easier. */ memset (b, 0, sizeof *b); b->index = -3; b->succ = (edge) first_deleted_block; first_deleted_block = (basic_block) b; } + + /* Create an edge connecting SRC and DEST with flags FLAGS. Return newly + created edge. Use this only if you are sure that this edge can't + possibly already exist. */ ! edge ! unchecked_make_edge (src, dst, flags) ! basic_block src, dst; ! int flags; { ! edge e; ! if (first_deleted_edge) { ! e = first_deleted_edge; ! first_deleted_edge = e->succ_next; ! } ! else ! { ! e = (edge) obstack_alloc (&flow_obstack, sizeof *e); ! memset (e, 0, sizeof *e); } + n_edges++; ! e->succ_next = src->succ; ! e->pred_next = dst->pred; ! e->src = src; ! e->dest = dst; ! e->flags = flags; ! src->succ = e; ! dst->pred = e; ! ! return e; } /* Create an edge connecting SRC and DST with FLAGS optionally using edge cache CACHE. Return the new edge, NULL if already exist. */ *************** cached_make_edge (edge_cache, src, dst, *** 291,316 **** break; } ! if (first_deleted_edge) ! { ! e = first_deleted_edge; ! first_deleted_edge = e->succ_next; ! } ! else ! { ! e = (edge) obstack_alloc (&flow_obstack, sizeof *e); ! memset (e, 0, sizeof *e); ! } ! n_edges++; ! ! e->succ_next = src->succ; ! e->pred_next = dst->pred; ! e->src = src; ! e->dest = dst; ! e->flags = flags; ! ! src->succ = e; ! dst->pred = e; if (use_edge_cache) SET_BIT (edge_cache[src->index], dst->index); --- 362,368 ---- break; } ! e = unchecked_make_edge (src, dst, flags); if (use_edge_cache) SET_BIT (edge_cache[src->index], dst->index); *************** redirect_edge_succ_nodup (e, new_succ) *** 418,423 **** --- 470,477 ---- { s->flags |= e->flags; s->probability += e->probability; + if (s->probability > REG_BR_PROB_BASE) + s->probability = REG_BR_PROB_BASE; s->count += e->count; remove_edge (e); e = s; *************** redirect_edge_pred (e, new_pred) *** 448,459 **** --- 502,524 ---- new_pred->succ = e; e->src = new_pred; } + + void + clear_bb_flags () + { + basic_block bb; + + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) + bb->flags = 0; + } void dump_flow_info (file) FILE *file; { int i; + int max_regno = max_reg_num (); + basic_block bb; static const char * const reg_class_names[] = REG_CLASS_NAMES; fprintf (file, "%d registers.\n", max_regno); *************** dump_flow_info (file) *** 469,475 **** if (REG_N_SETS (i)) fprintf (file, "; set %d time%s", REG_N_SETS (i), (REG_N_SETS (i) == 1) ? "" : "s"); ! if (REG_USERVAR_P (regno_reg_rtx[i])) fprintf (file, "; user var"); if (REG_N_DEATHS (i) != 1) fprintf (file, "; dies in %d places", REG_N_DEATHS (i)); --- 534,540 ---- if (REG_N_SETS (i)) fprintf (file, "; set %d time%s", REG_N_SETS (i), (REG_N_SETS (i) == 1) ? "" : "s"); ! if (regno_reg_rtx[i] != NULL && REG_USERVAR_P (regno_reg_rtx[i])) fprintf (file, "; user var"); if (REG_N_DEATHS (i) != 1) fprintf (file, "; dies in %d places", REG_N_DEATHS (i)); *************** dump_flow_info (file) *** 477,483 **** fprintf (file, "; crosses 1 call"); else if (REG_N_CALLS_CROSSED (i)) fprintf (file, "; crosses %d calls", REG_N_CALLS_CROSSED (i)); ! if (PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD) fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i)); class = reg_preferred_class (i); --- 542,549 ---- fprintf (file, "; crosses 1 call"); else if (REG_N_CALLS_CROSSED (i)) fprintf (file, "; crosses %d calls", REG_N_CALLS_CROSSED (i)); ! if (regno_reg_rtx[i] != NULL ! && PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD) fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i)); class = reg_preferred_class (i); *************** dump_flow_info (file) *** 494,515 **** reg_class_names[(int) altclass]); } ! if (REG_POINTER (regno_reg_rtx[i])) fprintf (file, "; pointer"); fprintf (file, ".\n"); } fprintf (file, "\n%d basic blocks, %d edges.\n", n_basic_blocks, n_edges); ! for (i = 0; i < n_basic_blocks; i++) { - basic_block bb = BASIC_BLOCK (i); edge e; fprintf (file, "\nBasic block %d: first insn %d, last %d, ", ! i, INSN_UID (bb->head), INSN_UID (bb->end)); fprintf (file, "loop_depth %d, count ", bb->loop_depth); fprintf (file, HOST_WIDEST_INT_PRINT_DEC, bb->count); ! fprintf (file, ", freq %i.\n", bb->frequency); fprintf (file, "Predecessors: "); for (e = bb->pred; e; e = e->pred_next) --- 560,589 ---- reg_class_names[(int) altclass]); } ! if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i])) fprintf (file, "; pointer"); fprintf (file, ".\n"); } fprintf (file, "\n%d basic blocks, %d edges.\n", n_basic_blocks, n_edges); ! FOR_EACH_BB (bb) { edge e; + int sum; + gcov_type lsum; fprintf (file, "\nBasic block %d: first insn %d, last %d, ", ! bb->index, INSN_UID (bb->head), INSN_UID (bb->end)); ! fprintf (file, "prev %d, next %d, ", ! bb->prev_bb->index, bb->next_bb->index); fprintf (file, "loop_depth %d, count ", bb->loop_depth); fprintf (file, HOST_WIDEST_INT_PRINT_DEC, bb->count); ! fprintf (file, ", freq %i", bb->frequency); ! if (maybe_hot_bb_p (bb)) ! fprintf (file, ", maybe hot"); ! if (probably_never_executed_bb_p (bb)) ! fprintf (file, ", probably never executed"); ! fprintf (file, ".\n"); fprintf (file, "Predecessors: "); for (e = bb->pred; e; e = e->pred_next) *************** dump_flow_info (file) *** 526,531 **** --- 600,636 ---- dump_regset (bb->global_live_at_end, file); putc ('\n', file); + + /* Check the consistency of profile information. We can't do that + in verify_flow_info, as the counts may get invalid for incompletely + solved graphs, later elliminating of conditionals or roundoff errors. + It is still practical to have them reported for debugging of simple + testcases. */ + sum = 0; + for (e = bb->succ; e; e = e->succ_next) + sum += e->probability; + if (bb->succ && abs (sum - REG_BR_PROB_BASE) > 100) + fprintf (file, "Invalid sum of outgoing probabilities %.1f%%\n", + sum * 100.0 / REG_BR_PROB_BASE); + sum = 0; + for (e = bb->pred; e; e = e->pred_next) + sum += EDGE_FREQUENCY (e); + if (abs (sum - bb->frequency) > 100) + fprintf (file, + "Invalid sum of incomming frequencies %i, should be %i\n", + sum, bb->frequency); + lsum = 0; + for (e = bb->pred; e; e = e->pred_next) + lsum += e->count; + if (lsum - bb->count > 100 || lsum - bb->count < -100) + fprintf (file, "Invalid sum of incomming counts %i, should be %i\n", + (int)lsum, (int)bb->count); + lsum = 0; + for (e = bb->succ; e; e = e->succ_next) + lsum += e->count; + if (bb->succ && (lsum - bb->count > 100 || lsum - bb->count < -100)) + fprintf (file, "Invalid sum of incomming counts %i, should be %i\n", + (int)lsum, (int)bb->count); } putc ('\n', file); *************** dump_edge_info (file, e, do_succ) *** 564,570 **** if (e->flags) { static const char * const bitnames[] ! = {"fallthru", "ab", "abcall", "eh", "fake", "dfs_back"}; int comma = 0; int i, flags = e->flags; --- 669,675 ---- if (e->flags) { static const char * const bitnames[] ! = {"fallthru", "ab", "abcall", "eh", "fake", "dfs_back", "can_fallthru"}; int comma = 0; int i, flags = e->flags; *************** static void *first_block_aux_obj = 0; *** 594,600 **** static struct obstack edge_aux_obstack; static void *first_edge_aux_obj = 0; ! /* Allocate an memory block of SIZE as BB->aux. The obstack must be first initialized by alloc_aux_for_blocks. */ inline void --- 699,705 ---- static struct obstack edge_aux_obstack; static void *first_edge_aux_obj = 0; ! /* Allocate a memory block of SIZE as BB->aux. The obstack must be first initialized by alloc_aux_for_blocks. */ inline void *************** alloc_aux_for_blocks (size) *** 630,642 **** first_block_aux_obj = (char *) obstack_alloc (&block_aux_obstack, 0); if (size) { ! int i; ! ! for (i = 0; i < n_basic_blocks; i++) ! alloc_aux_for_block (BASIC_BLOCK (i), size); ! alloc_aux_for_block (ENTRY_BLOCK_PTR, size); ! alloc_aux_for_block (EXIT_BLOCK_PTR, size); } } --- 735,744 ---- first_block_aux_obj = (char *) obstack_alloc (&block_aux_obstack, 0); if (size) { ! basic_block bb; ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) ! alloc_aux_for_block (bb, size); } } *************** alloc_aux_for_blocks (size) *** 645,657 **** void clear_aux_for_blocks () { ! int i; ! ! for (i = 0; i < n_basic_blocks; i++) ! BASIC_BLOCK (i)->aux = NULL; ! ENTRY_BLOCK_PTR->aux = NULL; ! EXIT_BLOCK_PTR->aux = NULL; } /* Free data allocated in block_aux_obstack and clear AUX pointers --- 747,756 ---- void clear_aux_for_blocks () { ! basic_block bb; ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) ! bb->aux = NULL; } /* Free data allocated in block_aux_obstack and clear AUX pointers *************** free_aux_for_blocks () *** 668,674 **** clear_aux_for_blocks (); } ! /* Allocate an memory edge of SIZE as BB->aux. The obstack must be first initialized by alloc_aux_for_edges. */ inline void --- 767,773 ---- clear_aux_for_blocks (); } ! /* Allocate a memory edge of SIZE as BB->aux. The obstack must be first initialized by alloc_aux_for_edges. */ inline void *************** alloc_aux_for_edges (size) *** 705,721 **** first_edge_aux_obj = (char *) obstack_alloc (&edge_aux_obstack, 0); if (size) { ! int i; ! for (i = -1; i < n_basic_blocks; i++) { - basic_block bb; edge e; - if (i >= 0) - bb = BASIC_BLOCK (i); - else - bb = ENTRY_BLOCK_PTR; - for (e = bb->succ; e; e = e->succ_next) alloc_aux_for_edge (e, size); } --- 804,815 ---- first_edge_aux_obj = (char *) obstack_alloc (&edge_aux_obstack, 0); if (size) { ! basic_block bb; ! ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { edge e; for (e = bb->succ; e; e = e->succ_next) alloc_aux_for_edge (e, size); } *************** alloc_aux_for_edges (size) *** 727,744 **** void clear_aux_for_edges () { ! int i; ! for (i = -1; i < n_basic_blocks; i++) { - basic_block bb; - edge e; - - if (i >= 0) - bb = BASIC_BLOCK (i); - else - bb = ENTRY_BLOCK_PTR; - for (e = bb->succ; e; e = e->succ_next) e->aux = NULL; } --- 821,831 ---- void clear_aux_for_edges () { ! basic_block bb; ! edge e; ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { for (e = bb->succ; e; e = e->succ_next) e->aux = NULL; } diff -Nrc3pad gcc-3.2.3/gcc/cfgcleanup.c gcc-3.3/gcc/cfgcleanup.c *** gcc-3.2.3/gcc/cfgcleanup.c 2003-03-23 20:41:22.000000000 +0000 --- gcc-3.3/gcc/cfgcleanup.c 2003-03-23 20:40:51.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 43,62 **** #include "recog.h" #include "toplev.h" #include "cselib.h" #include "tm_p.h" #include "target.h" - #include "obstack.h" - /* cleanup_cfg maintains following flags for each basic block. */ enum bb_flags { - /* Set if life info needs to be recomputed for given BB. */ - BB_UPDATE_LIFE = 1, /* Set if BB is the forwarder block to avoid too many forwarder_block_p calls. */ ! BB_FORWARDER_BLOCK = 2 }; #define BB_FLAGS(BB) (enum bb_flags) (BB)->aux --- 43,60 ---- #include "recog.h" #include "toplev.h" #include "cselib.h" + #include "params.h" #include "tm_p.h" #include "target.h" /* cleanup_cfg maintains following flags for each basic block. */ enum bb_flags { /* Set if BB is the forwarder block to avoid too many forwarder_block_p calls. */ ! BB_FORWARDER_BLOCK = 1, ! BB_NONTHREADABLE_BLOCK = 2 }; #define BB_FLAGS(BB) (enum bb_flags) (BB)->aux *************** static int flow_find_cross_jump PARAMS *** 75,81 **** rtx *, rtx *)); static bool insns_match_p PARAMS ((int, rtx, rtx)); - static bool delete_unreachable_blocks PARAMS ((void)); static bool label_is_jump_target_p PARAMS ((rtx, rtx)); static bool tail_recursion_label_p PARAMS ((rtx)); static void merge_blocks_move_predecessor_nojumps PARAMS ((basic_block, --- 73,78 ---- *************** static edge thread_jump PARAMS ((int, *** 91,96 **** --- 88,94 ---- static bool mark_effect PARAMS ((rtx, bitmap)); static void notice_new_block PARAMS ((basic_block)); static void update_forwarder_flag PARAMS ((basic_block)); + static int mentions_nonequal_regs PARAMS ((rtx *, void *)); /* Set flags for newly created block. */ *************** notice_new_block (bb) *** 101,107 **** if (!bb) return; - BB_SET_FLAG (bb, BB_UPDATE_LIFE); if (forwarder_block_p (bb)) BB_SET_FLAG (bb, BB_FORWARDER_BLOCK); } --- 99,104 ---- *************** try_simplify_condjump (cbranch_block) *** 149,155 **** unconditional jump. */ jump_block = cbranch_fallthru_edge->dest; if (jump_block->pred->pred_next ! || jump_block->index == n_basic_blocks - 1 || !FORWARDER_BLOCK_P (jump_block)) return false; jump_dest_block = jump_block->succ->dest; --- 146,152 ---- unconditional jump. */ jump_block = cbranch_fallthru_edge->dest; if (jump_block->pred->pred_next ! || jump_block->next_bb == EXIT_BLOCK_PTR || !FORWARDER_BLOCK_P (jump_block)) return false; jump_dest_block = jump_block->succ->dest; *************** try_simplify_condjump (cbranch_block) *** 192,199 **** static bool mark_effect (exp, nonequal) ! rtx exp; ! regset nonequal; { int regno; rtx dest; --- 189,196 ---- static bool mark_effect (exp, nonequal) ! rtx exp; ! regset nonequal; { int regno; rtx dest; *************** mark_effect (exp, nonequal) *** 201,243 **** { /* In case we do clobber the register, mark it as equal, as we know the value is dead so it don't have to match. */ ! case CLOBBER: ! if (REG_P (XEXP (exp, 0))) ! { ! dest = XEXP (exp, 0); ! regno = REGNO (dest); ! CLEAR_REGNO_REG_SET (nonequal, regno); ! if (regno < FIRST_PSEUDO_REGISTER) ! { ! int n = HARD_REGNO_NREGS (regno, GET_MODE (dest)); ! while (--n > 0) ! CLEAR_REGNO_REG_SET (nonequal, regno + n); ! } ! } ! return false; ! case SET: ! if (rtx_equal_for_cselib_p (SET_DEST (exp), SET_SRC (exp))) ! return false; ! dest = SET_DEST (exp); ! if (dest == pc_rtx) ! return false; ! if (!REG_P (dest)) ! return true; ! regno = REGNO (dest); ! SET_REGNO_REG_SET (nonequal, regno); ! if (regno < FIRST_PSEUDO_REGISTER) ! { ! int n = HARD_REGNO_NREGS (regno, GET_MODE (dest)); ! while (--n > 0) ! SET_REGNO_REG_SET (nonequal, regno + n); ! } return false; ! ! default: return false; } } /* Attempt to prove that the basic block B will have no side effects and allways continues in the same edge if reached via E. Return the edge if exist, NULL otherwise. */ --- 198,266 ---- { /* In case we do clobber the register, mark it as equal, as we know the value is dead so it don't have to match. */ ! case CLOBBER: ! if (REG_P (XEXP (exp, 0))) ! { ! dest = XEXP (exp, 0); ! regno = REGNO (dest); ! CLEAR_REGNO_REG_SET (nonequal, regno); ! if (regno < FIRST_PSEUDO_REGISTER) ! { ! int n = HARD_REGNO_NREGS (regno, GET_MODE (dest)); ! while (--n > 0) ! CLEAR_REGNO_REG_SET (nonequal, regno + n); ! } ! } ! return false; ! case SET: ! if (rtx_equal_for_cselib_p (SET_DEST (exp), SET_SRC (exp))) return false; ! dest = SET_DEST (exp); ! if (dest == pc_rtx) return false; + if (!REG_P (dest)) + return true; + regno = REGNO (dest); + SET_REGNO_REG_SET (nonequal, regno); + if (regno < FIRST_PSEUDO_REGISTER) + { + int n = HARD_REGNO_NREGS (regno, GET_MODE (dest)); + while (--n > 0) + SET_REGNO_REG_SET (nonequal, regno + n); + } + return false; + + default: + return false; } } + + /* Return nonzero if X is an register set in regset DATA. + Called via for_each_rtx. */ + static int + mentions_nonequal_regs (x, data) + rtx *x; + void *data; + { + regset nonequal = (regset) data; + if (REG_P (*x)) + { + int regno; + + regno = REGNO (*x); + if (REGNO_REG_SET_P (nonequal, regno)) + return 1; + if (regno < FIRST_PSEUDO_REGISTER) + { + int n = HARD_REGNO_NREGS (regno, GET_MODE (*x)); + while (--n > 0) + if (REGNO_REG_SET_P (nonequal, regno + n)) + return 1; + } + } + return 0; + } /* Attempt to prove that the basic block B will have no side effects and allways continues in the same edge if reached via E. Return the edge if exist, NULL otherwise. */ *************** thread_jump (mode, e, b) *** 255,272 **** regset nonequal; bool failed = false; /* At the moment, we do handle only conditional jumps, but later we may want to extend this code to tablejumps and others. */ if (!e->src->succ->succ_next || e->src->succ->succ_next->succ_next) return NULL; if (!b->succ || !b->succ->succ_next || b->succ->succ_next->succ_next) ! return NULL; /* Second branch must end with onlyjump, as we will eliminate the jump. */ ! if (!any_condjump_p (e->src->end) || !any_condjump_p (b->end) ! || !onlyjump_p (b->end)) return NULL; set1 = pc_set (e->src->end); set2 = pc_set (b->end); if (((e->flags & EDGE_FALLTHRU) != 0) --- 278,306 ---- regset nonequal; bool failed = false; + if (BB_FLAGS (b) & BB_NONTHREADABLE_BLOCK) + return NULL; + /* At the moment, we do handle only conditional jumps, but later we may want to extend this code to tablejumps and others. */ if (!e->src->succ->succ_next || e->src->succ->succ_next->succ_next) return NULL; if (!b->succ || !b->succ->succ_next || b->succ->succ_next->succ_next) ! { ! BB_SET_FLAG (b, BB_NONTHREADABLE_BLOCK); ! return NULL; ! } /* Second branch must end with onlyjump, as we will eliminate the jump. */ ! if (!any_condjump_p (e->src->end)) return NULL; + if (!any_condjump_p (b->end) || !onlyjump_p (b->end)) + { + BB_SET_FLAG (b, BB_NONTHREADABLE_BLOCK); + return NULL; + } + set1 = pc_set (e->src->end); set2 = pc_set (b->end); if (((e->flags & EDGE_FALLTHRU) != 0) *************** thread_jump (mode, e, b) *** 300,306 **** for (insn = NEXT_INSN (b->head); insn != NEXT_INSN (b->end); insn = NEXT_INSN (insn)) if (INSN_P (insn) && side_effects_p (PATTERN (insn))) ! return NULL; cselib_init (); --- 334,343 ---- for (insn = NEXT_INSN (b->head); insn != NEXT_INSN (b->end); insn = NEXT_INSN (insn)) if (INSN_P (insn) && side_effects_p (PATTERN (insn))) ! { ! BB_SET_FLAG (b, BB_NONTHREADABLE_BLOCK); ! return NULL; ! } cselib_init (); *************** thread_jump (mode, e, b) *** 319,344 **** for (insn = NEXT_INSN (b->head); insn != NEXT_INSN (b->end) && !failed; insn = NEXT_INSN (insn)) ! { ! if (INSN_P (insn)) ! { ! rtx pat = PATTERN (insn); ! if (GET_CODE (pat) == PARALLEL) ! { ! for (i = 0; i < XVECLEN (pat, 0); i++) ! failed |= mark_effect (XVECEXP (pat, 0, i), nonequal); ! } ! else ! failed |= mark_effect (pat, nonequal); ! } ! cselib_process_insn (insn); ! } /* Later we should clear nonequal of dead registers. So far we don't have life information in cfg_cleanup. */ if (failed) goto failed_exit; /* In case liveness information is available, we need to prove equivalence --- 356,389 ---- for (insn = NEXT_INSN (b->head); insn != NEXT_INSN (b->end) && !failed; insn = NEXT_INSN (insn)) ! { ! if (INSN_P (insn)) ! { ! rtx pat = PATTERN (insn); ! if (GET_CODE (pat) == PARALLEL) ! { ! for (i = 0; i < XVECLEN (pat, 0); i++) ! failed |= mark_effect (XVECEXP (pat, 0, i), nonequal); ! } ! else ! failed |= mark_effect (pat, nonequal); ! } ! cselib_process_insn (insn); ! } /* Later we should clear nonequal of dead registers. So far we don't have life information in cfg_cleanup. */ if (failed) + { + BB_SET_FLAG (b, BB_NONTHREADABLE_BLOCK); + goto failed_exit; + } + + /* cond2 must not mention any register that is not equal to the + former block. */ + if (for_each_rtx (&cond2, mentions_nonequal_regs, nonequal)) goto failed_exit; /* In case liveness information is available, we need to prove equivalence *************** try_forward_edges (mode, b) *** 455,464 **** For fallthru forwarders, the LOOP_BEG note must appear between the header of block and CODE_LABEL of the loop, for non forwarders it must appear before the JUMP_INSN. */ ! if (mode & CLEANUP_PRE_LOOP) { rtx insn = (target->succ->flags & EDGE_FALLTHRU ! ? target->head : prev_nonnote_insn (target->end)); if (GET_CODE (insn) != NOTE) insn = NEXT_INSN (insn); --- 500,509 ---- For fallthru forwarders, the LOOP_BEG note must appear between the header of block and CODE_LABEL of the loop, for non forwarders it must appear before the JUMP_INSN. */ ! if ((mode & CLEANUP_PRE_LOOP) && optimize) { rtx insn = (target->succ->flags & EDGE_FALLTHRU ! ? target->head : prev_nonnote_insn (target->end)); if (GET_CODE (insn) != NOTE) insn = NEXT_INSN (insn); *************** try_forward_edges (mode, b) *** 469,482 **** && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) break; ! if (insn && GET_CODE (insn) == NOTE) break; } counter++; target = new_target; threaded |= new_target_threaded; ! } if (counter >= n_basic_blocks) { --- 514,536 ---- && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) break; ! if (GET_CODE (insn) == NOTE) ! break; ! ! /* Do not clean up branches to just past the end of a loop ! at this time; it can mess up the loop optimizer's ! recognition of some patterns. */ ! ! insn = PREV_INSN (target->head); ! if (insn && GET_CODE (insn) == NOTE ! && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END) break; } counter++; target = new_target; threaded |= new_target_threaded; ! } if (counter >= n_basic_blocks) { *************** try_forward_edges (mode, b) *** 499,505 **** { notice_new_block (redirect_edge_and_branch_force (e, target)); if (rtl_dump_file) ! fprintf (rtl_dump_file, "Conditionals threaded.\n"); } else if (!redirect_edge_and_branch (e, target)) { --- 553,559 ---- { notice_new_block (redirect_edge_and_branch_force (e, target)); if (rtl_dump_file) ! fprintf (rtl_dump_file, "Conditionals threaded.\n"); } else if (!redirect_edge_and_branch (e, target)) { *************** try_forward_edges (mode, b) *** 519,525 **** if (!FORWARDER_BLOCK_P (b) && forwarder_block_p (b)) BB_SET_FLAG (b, BB_FORWARDER_BLOCK); - BB_SET_FLAG (b, BB_UPDATE_LIFE); do { --- 573,578 ---- *************** try_forward_edges (mode, b) *** 569,575 **** && first == threaded_edges [n]->src) n++; t = first->succ; ! } t->count -= edge_count; if (t->count < 0) --- 622,628 ---- && first == threaded_edges [n]->src) n++; t = first->succ; ! } t->count -= edge_count; if (t->count < 0) *************** merge_blocks_move_predecessor_nojumps (a *** 643,649 **** basic_block a, b; { rtx barrier; - int index; barrier = next_nonnote_insn (a->end); if (GET_CODE (barrier) != BARRIER) --- 696,701 ---- *************** merge_blocks_move_predecessor_nojumps (a *** 663,682 **** /* Scramble the insn chain. */ if (a->end != PREV_INSN (b->head)) reorder_insns_nobb (a->head, a->end, PREV_INSN (b->head)); ! BB_SET_FLAG (a, BB_UPDATE_LIFE); if (rtl_dump_file) fprintf (rtl_dump_file, "Moved block %d before %d and merged.\n", a->index, b->index); ! /* Swap the records for the two blocks around. Although we are deleting B, ! A is now where B was and we want to compact the BB array from where ! A used to be. */ ! BASIC_BLOCK (a->index) = b; ! BASIC_BLOCK (b->index) = a; ! index = a->index; ! a->index = b->index; ! b->index = index; /* Now blocks A and B are contiguous. Merge them. */ merge_blocks_nomove (a, b); --- 715,730 ---- /* Scramble the insn chain. */ if (a->end != PREV_INSN (b->head)) reorder_insns_nobb (a->head, a->end, PREV_INSN (b->head)); ! a->flags |= BB_DIRTY; if (rtl_dump_file) fprintf (rtl_dump_file, "Moved block %d before %d and merged.\n", a->index, b->index); ! /* Swap the records for the two blocks around. */ ! ! unlink_block (a); ! link_block (a, b->prev_bb); /* Now blocks A and B are contiguous. Merge them. */ merge_blocks_nomove (a, b); *************** merge_blocks_move_successor_nojumps (a, *** 729,741 **** /* Restore the real end of b. */ b->end = real_b_end; - /* Now blocks A and B are contiguous. Merge them. */ - merge_blocks_nomove (a, b); - BB_SET_FLAG (a, BB_UPDATE_LIFE); - if (rtl_dump_file) fprintf (rtl_dump_file, "Moved block %d after %d and merged.\n", b->index, a->index); } /* Attempt to merge basic blocks that are potentially non-adjacent. --- 777,788 ---- /* Restore the real end of b. */ b->end = real_b_end; if (rtl_dump_file) fprintf (rtl_dump_file, "Moved block %d after %d and merged.\n", b->index, a->index); + + /* Now blocks A and B are contiguous. Merge them. */ + merge_blocks_nomove (a, b); } /* Attempt to merge basic blocks that are potentially non-adjacent. *************** merge_blocks (e, b, c, mode) *** 760,777 **** if (e->flags & EDGE_FALLTHRU) { int b_index = b->index, c_index = c->index; - /* We need to update liveness in case C already has broken liveness - or B ends by conditional jump to next instructions that will be - removed. */ - if ((BB_FLAGS (c) & BB_UPDATE_LIFE) - || GET_CODE (b->end) == JUMP_INSN) - BB_SET_FLAG (b, BB_UPDATE_LIFE); merge_blocks_nomove (b, c); update_forwarder_flag (b); if (rtl_dump_file) fprintf (rtl_dump_file, "Merged %d and %d without moving.\n", ! b_index, c_index); return true; } --- 807,818 ---- if (e->flags & EDGE_FALLTHRU) { int b_index = b->index, c_index = c->index; merge_blocks_nomove (b, c); update_forwarder_flag (b); if (rtl_dump_file) fprintf (rtl_dump_file, "Merged %d and %d without moving.\n", ! b_index, c_index); return true; } *************** merge_blocks (e, b, c, mode) *** 831,838 **** bb = force_nonfallthru (b_fallthru_edge); if (bb) notice_new_block (bb); - else - BB_SET_FLAG (b_fallthru_edge->src, BB_UPDATE_LIFE); } merge_blocks_move_predecessor_nojumps (b, c); --- 872,877 ---- *************** merge_blocks (e, b, c, mode) *** 847,854 **** static bool insns_match_p (mode, i1, i2) ! int mode ATTRIBUTE_UNUSED; ! rtx i1, i2; { rtx p1, p2; --- 886,893 ---- static bool insns_match_p (mode, i1, i2) ! int mode ATTRIBUTE_UNUSED; ! rtx i1, i2; { rtx p1, p2; *************** insns_match_p (mode, i1, i2) *** 873,880 **** equal, they were constructed identically. */ if (GET_CODE (i1) == CALL_INSN ! && !rtx_equal_p (CALL_INSN_FUNCTION_USAGE (i1), ! CALL_INSN_FUNCTION_USAGE (i2))) return false; #ifdef STACK_REGS --- 912,920 ---- equal, they were constructed identically. */ if (GET_CODE (i1) == CALL_INSN ! && (!rtx_equal_p (CALL_INSN_FUNCTION_USAGE (i1), ! CALL_INSN_FUNCTION_USAGE (i2)) ! || SIBLING_CALL_P (i1) != SIBLING_CALL_P (i2))) return false; #ifdef STACK_REGS *************** flow_find_cross_jump (mode, bb1, bb2, f1 *** 1018,1027 **** remove_note (i1, equiv1); remove_note (i2, equiv2); } ! afterlast1 = last1, afterlast2 = last2; last1 = i1, last2 = i2; ! ninsns++; } i1 = PREV_INSN (i1); --- 1058,1067 ---- remove_note (i1, equiv1); remove_note (i2, equiv2); } ! afterlast1 = last1, afterlast2 = last2; last1 = i1, last2 = i2; ! ninsns++; } i1 = PREV_INSN (i1); *************** outgoing_edges_match (mode, bb1, bb2) *** 1098,1104 **** enum rtx_code code1, code2; if (!bb2->succ ! || !bb2->succ->succ_next || bb2->succ->succ_next->succ_next || !any_condjump_p (bb2->end) || !onlyjump_p (bb2->end)) --- 1138,1144 ---- enum rtx_code code1, code2; if (!bb2->succ ! || !bb2->succ->succ_next || bb2->succ->succ_next->succ_next || !any_condjump_p (bb2->end) || !onlyjump_p (bb2->end)) *************** outgoing_edges_match (mode, bb1, bb2) *** 1177,1184 **** roughly similar. */ if (match && !optimize_size ! && bb1->frequency > BB_FREQ_MAX / 1000 ! && bb2->frequency > BB_FREQ_MAX / 1000) { int prob2; --- 1217,1224 ---- roughly similar. */ if (match && !optimize_size ! && maybe_hot_bb_p (bb1) ! && maybe_hot_bb_p (bb2)) { int prob2; *************** outgoing_edges_match (mode, bb1, bb2) *** 1209,1215 **** return match; } ! /* Generic case - we are seeing an computed jump, table jump or trapping instruction. */ /* First ensure that the instructions match. There may be many outgoing --- 1249,1255 ---- return match; } ! /* Generic case - we are seeing a computed jump, table jump or trapping instruction. */ /* First ensure that the instructions match. There may be many outgoing *************** outgoing_edges_match (mode, bb1, bb2) *** 1247,1255 **** if (fallthru1) { basic_block d1 = (forwarder_block_p (fallthru1->dest) ! ? fallthru1->dest->succ->dest: fallthru1->dest); basic_block d2 = (forwarder_block_p (fallthru2->dest) ! ? fallthru2->dest->succ->dest: fallthru2->dest); if (d1 != d2) return false; --- 1287,1295 ---- if (fallthru1) { basic_block d1 = (forwarder_block_p (fallthru1->dest) ! ? fallthru1->dest->succ->dest: fallthru1->dest); basic_block d2 = (forwarder_block_p (fallthru2->dest) ! ? fallthru2->dest->succ->dest: fallthru2->dest); if (d1 != d2) return false; *************** try_crossjump_to_edge (mode, e1, e2) *** 1281,1301 **** { int nmatch; basic_block src1 = e1->src, src2 = e2->src; ! basic_block redirect_to; rtx newpos1, newpos2; edge s; - rtx last; - rtx label; /* Search backward through forwarder blocks. We don't need to worry about multiple entry or chained forwarders, as they will be optimized away. We do this to look past the unconditional jump following a conditional jump that is required due to the current CFG shape. */ if (src1->pred && FORWARDER_BLOCK_P (src1)) e1 = src1->pred, src1 = e1->src; if (src2->pred && FORWARDER_BLOCK_P (src2)) e2 = src2->pred, src2 = e2->src; --- 1321,1341 ---- { int nmatch; basic_block src1 = e1->src, src2 = e2->src; ! basic_block redirect_to, redirect_from, to_remove; rtx newpos1, newpos2; edge s; /* Search backward through forwarder blocks. We don't need to worry about multiple entry or chained forwarders, as they will be optimized away. We do this to look past the unconditional jump following a conditional jump that is required due to the current CFG shape. */ if (src1->pred + && !src1->pred->pred_next && FORWARDER_BLOCK_P (src1)) e1 = src1->pred, src1 = e1->src; if (src2->pred + && !src2->pred->pred_next && FORWARDER_BLOCK_P (src2)) e2 = src2->pred, src2 = e2->src; *************** try_crossjump_to_edge (mode, e1, e2) *** 1346,1351 **** --- 1386,1393 ---- redirect_to->count += src1->count; redirect_to->frequency += src1->frequency; + /* We may have some registers visible trought the block. */ + redirect_to->flags |= BB_DIRTY; /* Recompute the frequencies and counts of outgoing edges. */ for (s = redirect_to->succ; s; s = s->succ_next) *************** try_crossjump_to_edge (mode, e1, e2) *** 1409,1437 **** if (GET_CODE (newpos1) == NOTE) newpos1 = NEXT_INSN (newpos1); - last = src1->end; - - /* Emit the jump insn. */ - label = block_label (redirect_to); - emit_jump_insn_after (gen_jump (label), src1->end); - JUMP_LABEL (src1->end) = label; - LABEL_NUSES (label)++; ! /* Delete the now unreachable instructions. */ ! delete_insn_chain (newpos1, last); ! ! /* Make sure there is a barrier after the new jump. */ ! last = next_nonnote_insn (src1->end); ! if (!last || GET_CODE (last) != BARRIER) ! emit_barrier_after (src1->end); ! /* Update CFG. */ ! while (src1->succ) ! remove_edge (src1->succ); ! make_single_succ_edge (src1, redirect_to, 0); ! BB_SET_FLAG (src1, BB_UPDATE_LIFE); ! update_forwarder_flag (src1); return true; } --- 1451,1464 ---- if (GET_CODE (newpos1) == NOTE) newpos1 = NEXT_INSN (newpos1); ! redirect_from = split_block (src1, PREV_INSN (newpos1))->src; ! to_remove = redirect_from->succ->dest; ! redirect_edge_and_branch_force (redirect_from->succ, redirect_to); ! flow_delete_block (to_remove); ! update_forwarder_flag (redirect_from); return true; } *************** try_crossjump_bb (mode, bb) *** 1447,1452 **** --- 1474,1480 ---- { edge e, e2, nexte2, nexte, fallthru; bool changed; + int n = 0, max; /* Nothing to do if there is not at least two incoming edges. */ if (!bb->pred || !bb->pred->pred_next) *************** try_crossjump_bb (mode, bb) *** 1455,1463 **** /* It is always cheapest to redirect a block that ends in a branch to a block that falls through into BB, as that adds no branches to the program. We'll try that combination first. */ ! for (fallthru = bb->pred; fallthru; fallthru = fallthru->pred_next) ! if (fallthru->flags & EDGE_FALLTHRU) ! break; changed = false; for (e = bb->pred; e; e = nexte) --- 1483,1497 ---- /* It is always cheapest to redirect a block that ends in a branch to a block that falls through into BB, as that adds no branches to the program. We'll try that combination first. */ ! fallthru = NULL; ! max = PARAM_VALUE (PARAM_MAX_CROSSJUMP_EDGES); ! for (e = bb->pred; e ; e = e->pred_next, n++) ! { ! if (e->flags & EDGE_FALLTHRU) ! fallthru = e; ! if (n > max) ! return false; ! } changed = false; for (e = bb->pred; e; e = nexte) *************** static bool *** 1532,1548 **** try_optimize_cfg (mode) int mode; { - int i; bool changed_overall = false; bool changed; int iterations = 0; ! sbitmap blocks; if (mode & CLEANUP_CROSSJUMP) add_noreturn_fake_exit_edges (); ! for (i = 0; i < n_basic_blocks; i++) ! update_forwarder_flag (BASIC_BLOCK (i)); if (! (* targetm.cannot_modify_jumps_p) ()) { --- 1566,1584 ---- try_optimize_cfg (mode) int mode; { bool changed_overall = false; bool changed; int iterations = 0; ! basic_block bb, b; if (mode & CLEANUP_CROSSJUMP) add_noreturn_fake_exit_edges (); ! FOR_EACH_BB (bb) ! update_forwarder_flag (bb); ! ! if (mode & CLEANUP_UPDATE_LIFE) ! clear_bb_flags (); if (! (* targetm.cannot_modify_jumps_p) ()) { *************** try_optimize_cfg (mode) *** 1559,1574 **** "\n\ntry_optimize_cfg iteration %i\n\n", iterations); ! for (i = 0; i < n_basic_blocks;) { ! basic_block c, b = BASIC_BLOCK (i); edge s; bool changed_here = false; /* Delete trivially dead basic blocks. */ while (b->pred == NULL) { ! c = BASIC_BLOCK (b->index - 1); if (rtl_dump_file) fprintf (rtl_dump_file, "Deleting block %i.\n", b->index); --- 1595,1610 ---- "\n\ntry_optimize_cfg iteration %i\n\n", iterations); ! for (b = ENTRY_BLOCK_PTR->next_bb; b != EXIT_BLOCK_PTR;) { ! basic_block c; edge s; bool changed_here = false; /* Delete trivially dead basic blocks. */ while (b->pred == NULL) { ! c = b->prev_bb; if (rtl_dump_file) fprintf (rtl_dump_file, "Deleting block %i.\n", b->index); *************** try_optimize_cfg (mode) *** 1622,1628 **** "Deleting fallthru block %i.\n", b->index); ! c = BASIC_BLOCK (b->index ? b->index - 1 : 1); redirect_edge_succ_nodup (b->pred, b->succ->dest); flow_delete_block (b); changed = true; --- 1658,1664 ---- "Deleting fallthru block %i.\n", b->index); ! c = b->prev_bb == ENTRY_BLOCK_PTR ? b->next_bb : b->prev_bb; redirect_edge_succ_nodup (b->pred, b->succ->dest); flow_delete_block (b); changed = true; *************** try_optimize_cfg (mode) *** 1640,1646 **** /* If the jump insn has side effects, we can't kill the edge. */ && (GET_CODE (b->end) != JUMP_INSN ! || (flow2_completed ? simplejump_p (b->end) : onlyjump_p (b->end))) && merge_blocks (s, b, c, mode)) --- 1676,1682 ---- /* If the jump insn has side effects, we can't kill the edge. */ && (GET_CODE (b->end) != JUMP_INSN ! || (flow2_completed ? simplejump_p (b->end) : onlyjump_p (b->end))) && merge_blocks (s, b, c, mode)) *************** try_optimize_cfg (mode) *** 1648,1657 **** /* Simplify branch over branch. */ if ((mode & CLEANUP_EXPENSIVE) && try_simplify_condjump (b)) ! { ! BB_SET_FLAG (b, BB_UPDATE_LIFE); ! changed_here = true; ! } /* If B has a single outgoing edge, but uses a non-trivial jump instruction without side-effects, we --- 1684,1690 ---- /* Simplify branch over branch. */ if ((mode & CLEANUP_EXPENSIVE) && try_simplify_condjump (b)) ! changed_here = true; /* If B has a single outgoing edge, but uses a non-trivial jump instruction without side-effects, we *************** try_optimize_cfg (mode) *** 1664,1670 **** && onlyjump_p (b->end) && redirect_edge_and_branch (b->succ, b->succ->dest)) { - BB_SET_FLAG (b, BB_UPDATE_LIFE); update_forwarder_flag (b); changed_here = true; } --- 1697,1702 ---- *************** try_optimize_cfg (mode) *** 1681,1687 **** /* Don't get confused by the index shift caused by deleting blocks. */ if (!changed_here) ! i = b->index + 1; else changed = true; } --- 1713,1719 ---- /* Don't get confused by the index shift caused by deleting blocks. */ if (!changed_here) ! b = b->next_bb; else changed = true; } *************** try_optimize_cfg (mode) *** 1703,1766 **** if (mode & CLEANUP_CROSSJUMP) remove_fake_edges (); ! if ((mode & CLEANUP_UPDATE_LIFE) && changed_overall) ! { ! bool found = 0; ! ! blocks = sbitmap_alloc (n_basic_blocks); ! sbitmap_zero (blocks); ! for (i = 0; i < n_basic_blocks; i++) ! if (BB_FLAGS (BASIC_BLOCK (i)) & BB_UPDATE_LIFE) ! { ! found = 1; ! SET_BIT (blocks, i); ! } ! ! if (found) ! update_life_info (blocks, UPDATE_LIFE_GLOBAL, ! PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE ! | PROP_KILL_DEAD_CODE); ! sbitmap_free (blocks); ! } ! ! for (i = 0; i < n_basic_blocks; i++) ! BASIC_BLOCK (i)->aux = NULL; return changed_overall; } /* Delete all unreachable basic blocks. */ ! static bool delete_unreachable_blocks () { - int i, j; bool changed = false; find_unreachable_blocks (); ! /* Delete all unreachable basic blocks. Do compaction concurrently, ! as otherwise we can wind up with O(N^2) behaviour here when we ! have oodles of dead code. */ ! for (i = j = 0; i < n_basic_blocks; ++i) { ! basic_block b = BASIC_BLOCK (i); if (!(b->flags & BB_REACHABLE)) { ! flow_delete_block_noexpunge (b); ! expunge_block_nocompact (b); changed = true; } - else - { - BASIC_BLOCK (j) = b; - b->index = j++; - } } - n_basic_blocks = j; - basic_block_info->num_elements = j; if (changed) tidy_fallthru_edges (); --- 1735,1767 ---- if (mode & CLEANUP_CROSSJUMP) remove_fake_edges (); ! clear_aux_for_blocks (); return changed_overall; } /* Delete all unreachable basic blocks. */ ! bool delete_unreachable_blocks () { bool changed = false; + basic_block b, next_bb; find_unreachable_blocks (); ! /* Delete all unreachable basic blocks. */ ! for (b = ENTRY_BLOCK_PTR->next_bb; b != EXIT_BLOCK_PTR; b = next_bb) { ! next_bb = b->next_bb; if (!(b->flags & BB_REACHABLE)) { ! flow_delete_block (b); changed = true; } } if (changed) tidy_fallthru_edges (); *************** cleanup_cfg (mode) *** 1776,1788 **** bool changed = false; timevar_push (TV_CLEANUP_CFG); ! changed = delete_unreachable_blocks (); ! if (try_optimize_cfg (mode)) ! delete_unreachable_blocks (), changed = true; /* Kill the data we won't maintain. */ free_EXPR_LIST_list (&label_value_list); - free_EXPR_LIST_list (&tail_recursion_label_list); timevar_pop (TV_CLEANUP_CFG); return changed; --- 1777,1824 ---- bool changed = false; timevar_push (TV_CLEANUP_CFG); ! if (delete_unreachable_blocks ()) ! { ! changed = true; ! /* We've possibly created trivially dead code. Cleanup it right ! now to introduce more oppurtunities for try_optimize_cfg. */ ! if (!(mode & (CLEANUP_NO_INSN_DEL ! | CLEANUP_UPDATE_LIFE | CLEANUP_PRE_SIBCALL)) ! && !reload_completed) ! delete_trivially_dead_insns (get_insns(), max_reg_num ()); ! } ! ! compact_blocks (); ! ! while (try_optimize_cfg (mode)) ! { ! delete_unreachable_blocks (), changed = true; ! if (mode & CLEANUP_UPDATE_LIFE) ! { ! /* Cleaning up CFG introduces more oppurtunities for dead code ! removal that in turn may introduce more oppurtunities for ! cleaning up the CFG. */ ! if (!update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES, ! PROP_DEATH_NOTES ! | PROP_SCAN_DEAD_CODE ! | PROP_KILL_DEAD_CODE ! | PROP_LOG_LINKS)) ! break; ! } ! else if (!(mode & (CLEANUP_NO_INSN_DEL | CLEANUP_PRE_SIBCALL)) ! && (mode & CLEANUP_EXPENSIVE) ! && !reload_completed) ! { ! if (!delete_trivially_dead_insns (get_insns(), max_reg_num ())) ! break; ! } ! else ! break; ! delete_dead_jumptables (); ! } /* Kill the data we won't maintain. */ free_EXPR_LIST_list (&label_value_list); timevar_pop (TV_CLEANUP_CFG); return changed; diff -Nrc3pad gcc-3.2.3/gcc/cfglayout.c gcc-3.3/gcc/cfglayout.c *** gcc-3.2.3/gcc/cfglayout.c 2002-01-10 20:37:42.000000000 +0000 --- gcc-3.3/gcc/cfglayout.c 2003-04-07 16:31:42.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 35,41 **** extern struct obstack flow_obstack; /* Holds the interesting trailing notes for the function. */ ! static rtx function_tail_eff_head; static rtx skip_insns_after_block PARAMS ((basic_block)); static void record_effective_endpoints PARAMS ((void)); --- 35,41 ---- extern struct obstack flow_obstack; /* Holds the interesting trailing notes for the function. */ ! static rtx function_footer; static rtx skip_insns_after_block PARAMS ((basic_block)); static void record_effective_endpoints PARAMS ((void)); *************** static void set_block_levels PARAMS ((t *** 46,55 **** static void change_scope PARAMS ((rtx, tree, tree)); void verify_insn_chain PARAMS ((void)); static void fixup_fallthru_exit_predecessor PARAMS ((void)); ! /* Map insn uid to lexical block. */ ! static varray_type insn_scopes; /* Skip over inter-block insns occurring after BB which are typically associated with BB (e.g., barriers). If there are any such insns, --- 46,76 ---- static void change_scope PARAMS ((rtx, tree, tree)); void verify_insn_chain PARAMS ((void)); + static void cleanup_unconditional_jumps PARAMS ((void)); static void fixup_fallthru_exit_predecessor PARAMS ((void)); + static rtx unlink_insn_chain PARAMS ((rtx, rtx)); + static rtx duplicate_insn_chain PARAMS ((rtx, rtx)); + + static rtx + unlink_insn_chain (first, last) + rtx first; + rtx last; + { + rtx prevfirst = PREV_INSN (first); + rtx nextlast = NEXT_INSN (last); ! PREV_INSN (first) = NULL; ! NEXT_INSN (last) = NULL; ! if (prevfirst) ! NEXT_INSN (prevfirst) = nextlast; ! if (nextlast) ! PREV_INSN (nextlast) = prevfirst; ! else ! set_last_insn (prevfirst); ! if (!prevfirst) ! set_first_insn (nextlast); ! return first; ! } /* Skip over inter-block insns occurring after BB which are typically associated with BB (e.g., barriers). If there are any such insns, *************** skip_insns_after_block (bb) *** 62,69 **** rtx insn, last_insn, next_head, prev; next_head = NULL_RTX; ! if (bb->index + 1 != n_basic_blocks) ! next_head = BASIC_BLOCK (bb->index + 1)->head; for (last_insn = insn = bb->end; (insn = NEXT_INSN (insn)) != 0; ) { --- 83,90 ---- rtx insn, last_insn, next_head, prev; next_head = NULL_RTX; ! if (bb->next_bb != EXIT_BLOCK_PTR) ! next_head = bb->next_bb->head; for (last_insn = insn = bb->end; (insn = NEXT_INSN (insn)) != 0; ) { *************** skip_insns_after_block (bb) *** 103,109 **** last_insn = insn; continue; } ! break; default: break; --- 124,130 ---- last_insn = insn; continue; } ! break; default: break; *************** skip_insns_after_block (bb) *** 113,119 **** } /* It is possible to hit contradictory sequence. For instance: ! jump_insn NOTE_INSN_LOOP_BEG barrier --- 134,140 ---- } /* It is possible to hit contradictory sequence. For instance: ! jump_insn NOTE_INSN_LOOP_BEG barrier *************** skip_insns_after_block (bb) *** 128,141 **** if (GET_CODE (insn) == NOTE) switch (NOTE_LINE_NUMBER (insn)) { ! case NOTE_INSN_LOOP_END: ! case NOTE_INSN_BLOCK_END: ! case NOTE_INSN_DELETED: ! case NOTE_INSN_DELETED_LABEL: continue; ! default: reorder_insns (insn, insn, last_insn); ! } } return last_insn; --- 149,162 ---- if (GET_CODE (insn) == NOTE) switch (NOTE_LINE_NUMBER (insn)) { ! case NOTE_INSN_LOOP_END: ! case NOTE_INSN_BLOCK_END: ! case NOTE_INSN_DELETED: ! case NOTE_INSN_DELETED_LABEL: continue; ! default: reorder_insns (insn, insn, last_insn); ! } } return last_insn; *************** label_for_bb (bb) *** 155,162 **** fprintf (rtl_dump_file, "Emitting label for block %d\n", bb->index); label = block_label (bb); - if (bb->head == PREV_INSN (RBI (bb)->eff_head)) - RBI (bb)->eff_head = label; } return label; --- 176,181 ---- *************** static void *** 169,188 **** record_effective_endpoints () { rtx next_insn = get_insns (); ! int i; ! ! for (i = 0; i < n_basic_blocks; i++) { - basic_block bb = BASIC_BLOCK (i); rtx end; ! RBI (bb)->eff_head = next_insn; end = skip_insns_after_block (bb); ! RBI (bb)->eff_end = end; ! next_insn = NEXT_INSN (end); } ! function_tail_eff_head = next_insn; } /* Build a varray mapping INSN_UID to lexical block. Return it. */ --- 188,211 ---- record_effective_endpoints () { rtx next_insn = get_insns (); ! basic_block bb; ! ! FOR_EACH_BB (bb) { rtx end; ! if (PREV_INSN (bb->head) && next_insn != bb->head) ! RBI (bb)->header = unlink_insn_chain (next_insn, ! PREV_INSN (bb->head)); end = skip_insns_after_block (bb); ! if (NEXT_INSN (bb->end) && bb->end != end) ! RBI (bb)->footer = unlink_insn_chain (NEXT_INSN (bb->end), end); ! next_insn = NEXT_INSN (bb->end); } ! function_footer = next_insn; ! if (function_footer) ! function_footer = unlink_insn_chain (function_footer, get_last_insn ()); } /* Build a varray mapping INSN_UID to lexical block. Return it. */ *************** scope_to_insns_initialize () *** 193,200 **** tree block = NULL; rtx insn, next; - VARRAY_TREE_INIT (insn_scopes, get_max_uid (), "insn scopes"); - for (insn = get_insns (); insn; insn = next) { next = NEXT_INSN (insn); --- 216,221 ---- *************** scope_to_insns_initialize () *** 202,208 **** if (active_insn_p (insn) && GET_CODE (PATTERN (insn)) != ADDR_VEC && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC) ! VARRAY_TREE (insn_scopes, INSN_UID (insn)) = block; else if (GET_CODE (insn) == NOTE) { switch (NOTE_LINE_NUMBER (insn)) --- 223,229 ---- if (active_insn_p (insn) && GET_CODE (PATTERN (insn)) != ADDR_VEC && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC) ! INSN_SCOPE (insn) = block; else if (GET_CODE (insn) == NOTE) { switch (NOTE_LINE_NUMBER (insn)) *************** scope_to_insns_initialize () *** 220,225 **** --- 241,250 ---- } } } + + /* Tag the blocks with a depth number so that change_scope can find + the common parent easily. */ + set_block_levels (DECL_INITIAL (cfun->decl), 0); } /* For each lexical block, set BLOCK_NUMBER to the depth at which it is *************** set_block_levels (block, level) *** 237,243 **** block = BLOCK_CHAIN (block); } } ! /* Emit lexical block notes needed to change scope from S1 to S2. */ static void --- 262,282 ---- block = BLOCK_CHAIN (block); } } ! ! /* Return sope resulting from combination of S1 and S2. */ ! tree ! choose_inner_scope (s1, s2) ! tree s1, s2; ! { ! if (!s1) ! return s2; ! if (!s2) ! return s1; ! if (BLOCK_NUMBER (s1) > BLOCK_NUMBER (s2)) ! return s1; ! return s2; ! } ! /* Emit lexical block notes needed to change scope from S1 to S2. */ static void *************** scope_to_insns_finalize () *** 294,310 **** tree cur_block = DECL_INITIAL (cfun->decl); rtx insn, note; ! /* Tag the blocks with a depth number so that change_scope can find ! the common parent easily. */ ! set_block_levels (cur_block, 0); ! ! for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) { tree this_block; ! if ((size_t) INSN_UID (insn) >= insn_scopes->num_elements) ! continue; ! this_block = VARRAY_TREE (insn_scopes, INSN_UID (insn)); if (! this_block) continue; --- 333,358 ---- tree cur_block = DECL_INITIAL (cfun->decl); rtx insn, note; ! insn = get_insns (); ! if (!active_insn_p (insn)) ! insn = next_active_insn (insn); ! for (; insn; insn = next_active_insn (insn)) { tree this_block; ! this_block = INSN_SCOPE (insn); ! /* For sequences compute scope resulting from merging all scopes ! of instructions nested inside. */ ! if (GET_CODE (PATTERN (insn)) == SEQUENCE) ! { ! int i; ! rtx body = PATTERN (insn); ! ! this_block = NULL; ! for (i = 0; i < XVECLEN (body, 0); i++) ! this_block = choose_inner_scope (this_block, ! INSN_SCOPE (XVECEXP (body, 0, i))); ! } if (! this_block) continue; *************** scope_to_insns_finalize () *** 315,322 **** } } - VARRAY_FREE (insn_scopes); - /* change_scope emits before the insn, not after. */ note = emit_note (NULL, NOTE_INSN_DELETED); change_scope (note, cur_block, DECL_INITIAL (cfun->decl)); --- 363,368 ---- *************** scope_to_insns_finalize () *** 330,361 **** static void fixup_reorder_chain () { ! basic_block bb, last_bb; int index; ! rtx insn; ! int old_n_basic_blocks = n_basic_blocks; /* First do the bulk reordering -- rechain the blocks without regard to the needed changes to jumps and labels. */ ! for (last_bb = BASIC_BLOCK (0), bb = RBI (last_bb)->next, index = 1; bb != 0; ! last_bb = bb, bb = RBI (bb)->next, index++) { ! rtx last_e = RBI (last_bb)->eff_end; ! rtx curr_h = RBI (bb)->eff_head; ! ! NEXT_INSN (last_e) = curr_h; ! PREV_INSN (curr_h) = last_e; } if (index != n_basic_blocks) abort (); ! insn = RBI (last_bb)->eff_end; ! NEXT_INSN (insn) = function_tail_eff_head; ! if (function_tail_eff_head) ! PREV_INSN (function_tail_eff_head) = insn; while (NEXT_INSN (insn)) insn = NEXT_INSN (insn); --- 376,424 ---- static void fixup_reorder_chain () { ! basic_block bb, prev_bb; int index; ! rtx insn = NULL; /* First do the bulk reordering -- rechain the blocks without regard to the needed changes to jumps and labels. */ ! for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; bb != 0; ! bb = RBI (bb)->next, index++) { ! if (RBI (bb)->header) ! { ! if (insn) ! NEXT_INSN (insn) = RBI (bb)->header; ! else ! set_first_insn (RBI (bb)->header); ! PREV_INSN (RBI (bb)->header) = insn; ! insn = RBI (bb)->header; ! while (NEXT_INSN (insn)) ! insn = NEXT_INSN (insn); ! } ! if (insn) ! NEXT_INSN (insn) = bb->head; ! else ! set_first_insn (bb->head); ! PREV_INSN (bb->head) = insn; ! insn = bb->end; ! if (RBI (bb)->footer) ! { ! NEXT_INSN (insn) = RBI (bb)->footer; ! PREV_INSN (RBI (bb)->footer) = insn; ! while (NEXT_INSN (insn)) ! insn = NEXT_INSN (insn); ! } } if (index != n_basic_blocks) abort (); ! NEXT_INSN (insn) = function_footer; ! if (function_footer) ! PREV_INSN (function_footer) = insn; while (NEXT_INSN (insn)) insn = NEXT_INSN (insn); *************** fixup_reorder_chain () *** 368,374 **** /* Now add jumps and labels as needed to match the blocks new outgoing edges. */ ! for (bb = BASIC_BLOCK (0); bb ; bb = RBI (bb)->next) { edge e_fall, e_taken, e; rtx bb_end_insn; --- 431,437 ---- /* Now add jumps and labels as needed to match the blocks new outgoing edges. */ ! for (bb = ENTRY_BLOCK_PTR->next_bb; bb ; bb = RBI (bb)->next) { edge e_fall, e_taken, e; rtx bb_end_insn; *************** fixup_reorder_chain () *** 397,407 **** && e_fall->dest == EXIT_BLOCK_PTR)) continue; /* There is one special case: if *neither* block is next, such as happens at the very end of a function, then we'll need to add a new unconditional jump. Choose the taken edge based on known or assumed probability. */ ! if (RBI (bb)->next != e_taken->dest) { rtx note = find_reg_note (bb_end_insn, REG_BR_PROB, 0); --- 460,503 ---- && e_fall->dest == EXIT_BLOCK_PTR)) continue; + if (!e_taken) + e_taken = e_fall; + + /* The degenerated case of conditional jump jumping to the next + instruction can happen on target having jumps with side + effects. + + Create temporarily the duplicated edge representing branch. + It will get unidentified by force_nonfallthru_and_redirect + that would otherwise get confused by fallthru edge not pointing + to the next basic block. */ + if (!e_taken) + { + rtx note; + edge e_fake; + + e_fake = unchecked_make_edge (bb, e_fall->dest, 0); + + note = find_reg_note (bb->end, REG_BR_PROB, NULL_RTX); + if (note) + { + int prob = INTVAL (XEXP (note, 0)); + + e_fake->probability = prob; + e_fake->count = e_fall->count * prob / REG_BR_PROB_BASE; + e_fall->probability -= e_fall->probability; + e_fall->count -= e_fake->count; + if (e_fall->probability < 0) + e_fall->probability = 0; + if (e_fall->count < 0) + e_fall->count = 0; + } + } /* There is one special case: if *neither* block is next, such as happens at the very end of a function, then we'll need to add a new unconditional jump. Choose the taken edge based on known or assumed probability. */ ! else if (RBI (bb)->next != e_taken->dest) { rtx note = find_reg_note (bb_end_insn, REG_BR_PROB, 0); *************** fixup_reorder_chain () *** 417,423 **** } } ! /* Otherwise we can try to invert the jump. This will basically never fail, however, keep up the pretense. */ else if (invert_jump (bb_end_insn, label_for_bb (e_fall->dest), 0)) --- 513,519 ---- } } ! /* Otherwise we can try to invert the jump. This will basically never fail, however, keep up the pretense. */ else if (invert_jump (bb_end_insn, label_for_bb (e_fall->dest), 0)) *************** fixup_reorder_chain () *** 470,477 **** if (nb) { alloc_aux_for_block (nb, sizeof (struct reorder_block_def)); - RBI (nb)->eff_head = nb->head; - RBI (nb)->eff_end = NEXT_INSN (nb->end); RBI (nb)->visited = 1; RBI (nb)->next = RBI (bb)->next; RBI (bb)->next = nb; --- 566,571 ---- *************** fixup_reorder_chain () *** 481,503 **** } /* Put basic_block_info in the new order. */ - bb = BASIC_BLOCK (0); - index = 0; if (rtl_dump_file) - fprintf (rtl_dump_file, "Reordered sequence:\n"); - - for (; bb; bb = RBI (bb)->next, index++) { ! if (rtl_dump_file) ! fprintf (rtl_dump_file, " %i %sbb %i freq %i\n", index, ! bb->index >= old_n_basic_blocks ? "compensation " : "", ! bb->index, ! bb->frequency); bb->index = index; BASIC_BLOCK (index) = bb; } } /* Perform sanity checks on the insn chain. --- 575,612 ---- } /* Put basic_block_info in the new order. */ if (rtl_dump_file) { ! fprintf (rtl_dump_file, "Reordered sequence:\n"); ! for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; bb; bb = RBI (bb)->next, index ++) ! { ! fprintf (rtl_dump_file, " %i ", index); ! if (RBI (bb)->original) ! fprintf (rtl_dump_file, "duplicate of %i ", ! RBI (bb)->original->index); ! else if (forwarder_block_p (bb) && GET_CODE (bb->head) != CODE_LABEL) ! fprintf (rtl_dump_file, "compensation "); ! else ! fprintf (rtl_dump_file, "bb %i ", bb->index); ! fprintf (rtl_dump_file, " [%i]\n", bb->frequency); ! } ! } + prev_bb = ENTRY_BLOCK_PTR; + bb = ENTRY_BLOCK_PTR->next_bb; + index = 0; + + for (; bb; prev_bb = bb, bb = RBI (bb)->next, index ++) + { bb->index = index; BASIC_BLOCK (index) = bb; + + bb->prev_bb = prev_bb; + prev_bb->next_bb = bb; } + prev_bb->next_bb = EXIT_BLOCK_PTR; + EXIT_BLOCK_PTR->prev_bb = prev_bb; } /* Perform sanity checks on the insn chain. *************** verify_insn_chain () *** 530,539 **** if (insn_cnt1 != insn_cnt2) abort (); } ! /* The block falling through to exit must be the last one in the reordered ! chain. Ensure it is. */ static void fixup_fallthru_exit_predecessor () { --- 639,708 ---- if (insn_cnt1 != insn_cnt2) abort (); } + + /* Remove any unconditional jumps and forwarder block creating fallthru + edges instead. During BB reordering, fallthru edges are not required + to target next basic block in the linear CFG layout, so the unconditional + jumps are not needed. */ ! static void ! cleanup_unconditional_jumps () ! { ! basic_block bb; ! ! FOR_EACH_BB (bb) ! { ! if (!bb->succ) ! continue; ! if (bb->succ->flags & EDGE_FALLTHRU) ! continue; ! if (!bb->succ->succ_next) ! { ! rtx insn; ! if (GET_CODE (bb->head) != CODE_LABEL && forwarder_block_p (bb) ! && bb->prev_bb != ENTRY_BLOCK_PTR) ! { ! basic_block prev = bb->prev_bb; ! ! if (rtl_dump_file) ! fprintf (rtl_dump_file, "Removing forwarder BB %i\n", ! bb->index); ! ! redirect_edge_succ_nodup (bb->pred, bb->succ->dest); ! flow_delete_block (bb); ! bb = prev; ! } ! else if (simplejump_p (bb->end)) ! { ! rtx jump = bb->end; ! ! if (rtl_dump_file) ! fprintf (rtl_dump_file, "Removing jump %i in BB %i\n", ! INSN_UID (jump), bb->index); ! delete_insn (jump); ! bb->succ->flags |= EDGE_FALLTHRU; ! } ! else ! continue; + insn = NEXT_INSN (bb->end); + while (insn + && (GET_CODE (insn) != NOTE + || NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK)) + { + rtx next = NEXT_INSN (insn); + + if (GET_CODE (insn) == BARRIER) + delete_barrier (insn); + + insn = next; + } + } + } + } + + /* The block falling through to exit must be the last one in the + reordered chain. Ensure that this condition is met. */ static void fixup_fallthru_exit_predecessor () { *************** fixup_fallthru_exit_predecessor () *** 546,552 **** if (bb && RBI (bb)->next) { ! basic_block c = BASIC_BLOCK (0); while (RBI (c)->next != bb) c = RBI (c)->next; --- 715,721 ---- if (bb && RBI (bb)->next) { ! basic_block c = ENTRY_BLOCK_PTR->next_bb; while (RBI (c)->next != bb) c = RBI (c)->next; *************** fixup_fallthru_exit_predecessor () *** 560,574 **** } } ! /* Main entry point to this module: initialize the datastructures for CFG ! layout changes. */ void cfg_layout_initialize () { alloc_aux_for_blocks (sizeof (struct reorder_block_def)); ! scope_to_insns_initialize (); record_effective_endpoints (); } --- 729,1007 ---- } } ! /* Return true in case it is possible to duplicate the basic block BB. */ ! ! bool ! cfg_layout_can_duplicate_bb_p (bb) ! basic_block bb; ! { ! rtx next; ! edge s; ! ! if (bb == EXIT_BLOCK_PTR || bb == ENTRY_BLOCK_PTR) ! return false; ! ! /* Duplicating fallthru block to exit would require adding a jump ! and splitting the real last BB. */ ! for (s = bb->succ; s; s = s->succ_next) ! if (s->dest == EXIT_BLOCK_PTR && s->flags & EDGE_FALLTHRU) ! return false; ! ! /* Do not attempt to duplicate tablejumps, as we need to unshare ! the dispatch table. This is dificult to do, as the instructions ! computing jump destination may be hoisted outside the basic block. */ ! if (GET_CODE (bb->end) == JUMP_INSN && JUMP_LABEL (bb->end) ! && (next = next_nonnote_insn (JUMP_LABEL (bb->end))) ! && GET_CODE (next) == JUMP_INSN ! && (GET_CODE (PATTERN (next)) == ADDR_VEC ! || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)) ! return false; ! return true; ! } ! ! static rtx ! duplicate_insn_chain (from, to) ! rtx from, to; ! { ! rtx insn, last; ! ! /* Avoid updating of boundaries of previous basic block. The ! note will get removed from insn stream in fixup. */ ! last = emit_note (NULL, NOTE_INSN_DELETED); ! ! /* Create copy at the end of INSN chain. The chain will ! be reordered later. */ ! for (insn = from; insn != NEXT_INSN (to); insn = NEXT_INSN (insn)) ! { ! rtx new; ! switch (GET_CODE (insn)) ! { ! case INSN: ! case CALL_INSN: ! case JUMP_INSN: ! /* Avoid copying of dispatch tables. We never duplicate ! tablejumps, so this can hit only in case the table got ! moved far from original jump. */ ! if (GET_CODE (PATTERN (insn)) == ADDR_VEC ! || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC) ! break; ! new = emit_copy_of_insn_after (insn, get_last_insn ()); ! break; ! ! case CODE_LABEL: ! break; ! ! case BARRIER: ! emit_barrier (); ! break; ! ! case NOTE: ! switch (NOTE_LINE_NUMBER (insn)) ! { ! /* In case prologue is empty and function contain label ! in first BB, we may want to copy the block. */ ! case NOTE_INSN_PROLOGUE_END: ! ! case NOTE_INSN_LOOP_VTOP: ! case NOTE_INSN_LOOP_CONT: ! case NOTE_INSN_LOOP_BEG: ! case NOTE_INSN_LOOP_END: ! /* Strip down the loop notes - we don't really want to keep ! them consistent in loop copies. */ ! case NOTE_INSN_DELETED: ! case NOTE_INSN_DELETED_LABEL: ! /* No problem to strip these. */ ! case NOTE_INSN_EPILOGUE_BEG: ! case NOTE_INSN_FUNCTION_END: ! /* Debug code expect these notes to exist just once. ! Keep them in the master copy. ! ??? It probably makes more sense to duplicate them for each ! epilogue copy. */ ! case NOTE_INSN_FUNCTION_BEG: ! /* There is always just single entry to function. */ ! case NOTE_INSN_BASIC_BLOCK: ! break; ! ! /* There is no purpose to duplicate prologue. */ ! case NOTE_INSN_BLOCK_BEG: ! case NOTE_INSN_BLOCK_END: ! /* The BLOCK_BEG/BLOCK_END notes should be eliminated when BB ! reordering is in the progress. */ ! case NOTE_INSN_EH_REGION_BEG: ! case NOTE_INSN_EH_REGION_END: ! /* Should never exist at BB duplication time. */ ! abort (); ! break; ! case NOTE_INSN_REPEATED_LINE_NUMBER: ! emit_note (NOTE_SOURCE_FILE (insn), NOTE_LINE_NUMBER (insn)); ! break; ! ! default: ! if (NOTE_LINE_NUMBER (insn) < 0) ! abort (); ! /* It is possible that no_line_number is set and the note ! won't be emitted. */ ! emit_note (NOTE_SOURCE_FILE (insn), NOTE_LINE_NUMBER (insn)); ! } ! break; ! default: ! abort (); ! } ! } ! insn = NEXT_INSN (last); ! delete_insn (last); ! return insn; ! } ! ! /* Redirect Edge to DEST. */ ! void ! cfg_layout_redirect_edge (e, dest) ! edge e; ! basic_block dest; ! { ! basic_block src = e->src; ! basic_block old_next_bb = src->next_bb; ! ! /* Redirect_edge_and_branch may decide to turn branch into fallthru edge ! in the case the basic block appears to be in sequence. Avoid this ! transformation. */ ! ! src->next_bb = NULL; ! if (e->flags & EDGE_FALLTHRU) ! { ! /* Redirect any branch edges unified with the fallthru one. */ ! if (GET_CODE (src->end) == JUMP_INSN ! && JUMP_LABEL (src->end) == e->dest->head) ! { ! if (!redirect_jump (src->end, block_label (dest), 0)) ! abort (); ! } ! /* In case we are redirecting fallthru edge to the branch edge ! of conditional jump, remove it. */ ! if (src->succ->succ_next ! && !src->succ->succ_next->succ_next) ! { ! edge s = e->succ_next ? e->succ_next : src->succ; ! if (s->dest == dest ! && any_condjump_p (src->end) ! && onlyjump_p (src->end)) ! delete_insn (src->end); ! } ! redirect_edge_succ_nodup (e, dest); ! } ! else ! redirect_edge_and_branch (e, dest); ! ! /* We don't want simplejumps in the insn stream during cfglayout. */ ! if (simplejump_p (src->end)) ! { ! delete_insn (src->end); ! delete_barrier (NEXT_INSN (src->end)); ! src->succ->flags |= EDGE_FALLTHRU; ! } ! src->next_bb = old_next_bb; ! } ! ! /* Create a duplicate of the basic block BB and redirect edge E into it. */ ! ! basic_block ! cfg_layout_duplicate_bb (bb, e) ! basic_block bb; ! edge e; ! { ! rtx insn; ! edge s, n; ! basic_block new_bb; ! gcov_type new_count = e ? e->count : 0; ! ! if (bb->count < new_count) ! new_count = bb->count; ! if (!bb->pred) ! abort (); ! #ifdef ENABLE_CHECKING ! if (!cfg_layout_can_duplicate_bb_p (bb)) ! abort (); ! #endif ! ! insn = duplicate_insn_chain (bb->head, bb->end); ! new_bb = create_basic_block (insn, ! insn ? get_last_insn () : NULL, ! EXIT_BLOCK_PTR->prev_bb); ! alloc_aux_for_block (new_bb, sizeof (struct reorder_block_def)); ! ! if (RBI (bb)->header) ! { ! insn = RBI (bb)->header; ! while (NEXT_INSN (insn)) ! insn = NEXT_INSN (insn); ! insn = duplicate_insn_chain (RBI (bb)->header, insn); ! if (insn) ! RBI (new_bb)->header = unlink_insn_chain (insn, get_last_insn ()); ! } ! ! if (RBI (bb)->footer) ! { ! insn = RBI (bb)->footer; ! while (NEXT_INSN (insn)) ! insn = NEXT_INSN (insn); ! insn = duplicate_insn_chain (RBI (bb)->footer, insn); ! if (insn) ! RBI (new_bb)->footer = unlink_insn_chain (insn, get_last_insn ()); ! } ! ! if (bb->global_live_at_start) ! { ! new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (&flow_obstack); ! new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&flow_obstack); ! COPY_REG_SET (new_bb->global_live_at_start, bb->global_live_at_start); ! COPY_REG_SET (new_bb->global_live_at_end, bb->global_live_at_end); ! } ! ! new_bb->loop_depth = bb->loop_depth; ! new_bb->flags = bb->flags; ! for (s = bb->succ; s; s = s->succ_next) ! { ! n = make_edge (new_bb, s->dest, s->flags); ! n->probability = s->probability; ! if (new_count) ! /* Take care for overflows! */ ! n->count = s->count * (new_count * 10000 / bb->count) / 10000; ! else ! n->count = 0; ! s->count -= n->count; ! } ! ! new_bb->count = new_count; ! bb->count -= new_count; ! ! if (e) ! { ! new_bb->frequency = EDGE_FREQUENCY (e); ! bb->frequency -= EDGE_FREQUENCY (e); ! ! cfg_layout_redirect_edge (e, new_bb); ! } ! ! if (bb->count < 0) ! bb->count = 0; ! if (bb->frequency < 0) ! bb->frequency = 0; ! ! RBI (new_bb)->original = bb; ! return new_bb; ! } ! ! /* Main entry point to this module - initialize the datastructures for ! CFG layout changes. It keeps LOOPS up-to-date if not null. */ void cfg_layout_initialize () { + /* Our algorithm depends on fact that there are now dead jumptables + around the code. */ alloc_aux_for_blocks (sizeof (struct reorder_block_def)); ! cleanup_unconditional_jumps (); record_effective_endpoints (); } *************** cfg_layout_finalize () *** 586,593 **** verify_insn_chain (); #endif - scope_to_insns_finalize (); - free_aux_for_blocks (); #ifdef ENABLE_CHECKING --- 1019,1024 ---- diff -Nrc3pad gcc-3.2.3/gcc/cfglayout.h gcc-3.3/gcc/cfglayout.h *** gcc-3.2.3/gcc/cfglayout.h 2001-12-31 04:19:34.000000000 +0000 --- gcc-3.3/gcc/cfglayout.h 2002-05-08 09:17:17.000000000 +0000 *************** *** 21,29 **** /* Structure to hold information about the blocks during reordering. */ typedef struct reorder_block_def { ! rtx eff_head; ! rtx eff_end; basic_block next; int visited; } *reorder_block_def; --- 21,32 ---- /* Structure to hold information about the blocks during reordering. */ typedef struct reorder_block_def { ! rtx header; ! rtx footer; basic_block next; + basic_block original; + + /* These fields are used by bb-reorder pass. */ int visited; } *reorder_block_def; *************** typedef struct reorder_block_def *** 31,36 **** extern void cfg_layout_initialize PARAMS ((void)); extern void cfg_layout_finalize PARAMS ((void)); ! extern void scope_to_insns_initialize PARAMS ((void)); extern void scope_to_insns_finalize PARAMS ((void)); --- 34,41 ---- extern void cfg_layout_initialize PARAMS ((void)); extern void cfg_layout_finalize PARAMS ((void)); ! extern bool cfg_layout_can_duplicate_bb_p PARAMS ((basic_block)); ! extern basic_block cfg_layout_duplicate_bb PARAMS ((basic_block, edge)); extern void scope_to_insns_initialize PARAMS ((void)); extern void scope_to_insns_finalize PARAMS ((void)); + extern void cfg_layout_redirect_edge PARAMS ((edge, basic_block)); diff -Nrc3pad gcc-3.2.3/gcc/cfgloop.c gcc-3.3/gcc/cfgloop.c *** gcc-3.2.3/gcc/cfgloop.c 2002-01-20 09:32:27.000000000 +0000 --- gcc-3.3/gcc/cfgloop.c 2002-09-22 02:03:15.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 23,46 **** #include "rtl.h" #include "hard-reg-set.h" #include "basic-block.h" static void flow_loops_cfg_dump PARAMS ((const struct loops *, FILE *)); ! static int flow_loop_nested_p PARAMS ((struct loop *, ! struct loop *)); ! static int flow_loop_entry_edges_find PARAMS ((basic_block, const sbitmap, ! edge **)); ! static int flow_loop_exit_edges_find PARAMS ((const sbitmap, edge **)); ! static int flow_loop_nodes_find PARAMS ((basic_block, basic_block, ! sbitmap)); static void flow_loop_pre_header_scan PARAMS ((struct loop *)); static basic_block flow_loop_pre_header_find PARAMS ((basic_block, ! const sbitmap *)); ! static void flow_loop_tree_node_add PARAMS ((struct loop *, ! struct loop *)); ! static void flow_loops_tree_build PARAMS ((struct loops *)); ! static int flow_loop_level_compute PARAMS ((struct loop *, int)); static int flow_loops_level_compute PARAMS ((struct loops *)); /* Dump loop related CFG information. */ --- 23,50 ---- #include "rtl.h" #include "hard-reg-set.h" #include "basic-block.h" + #include "toplev.h" + + /* Ratio of frequencies of edges so that one of more latch edges is + considered to belong to inner loop with same header. */ + #define HEAVY_EDGE_RATIO 8 static void flow_loops_cfg_dump PARAMS ((const struct loops *, FILE *)); ! static void flow_loop_entry_edges_find PARAMS ((struct loop *)); ! static void flow_loop_exit_edges_find PARAMS ((struct loop *)); ! static int flow_loop_nodes_find PARAMS ((basic_block, struct loop *)); static void flow_loop_pre_header_scan PARAMS ((struct loop *)); static basic_block flow_loop_pre_header_find PARAMS ((basic_block, ! dominance_info)); ! static int flow_loop_level_compute PARAMS ((struct loop *)); static int flow_loops_level_compute PARAMS ((struct loops *)); + static basic_block make_forwarder_block PARAMS ((basic_block, int, int, + edge, int)); + static void canonicalize_loop_headers PARAMS ((void)); + static bool glb_enum_p PARAMS ((basic_block, void *)); + static void redirect_edge_with_latch_update PARAMS ((edge, basic_block)); + static void flow_loop_free PARAMS ((struct loop *)); /* Dump loop related CFG information. */ *************** flow_loops_cfg_dump (loops, file) *** 50,67 **** FILE *file; { int i; if (! loops->num || ! file || ! loops->cfg.dom) return; ! for (i = 0; i < n_basic_blocks; i++) { edge succ; ! fprintf (file, ";; %d succs { ", i); ! for (succ = BASIC_BLOCK (i)->succ; succ; succ = succ->succ_next) fprintf (file, "%d ", succ->dest->index); ! flow_nodes_print ("} dom", loops->cfg.dom[i], file); } /* Dump the DFS node order. */ --- 54,72 ---- FILE *file; { int i; + basic_block bb; if (! loops->num || ! file || ! loops->cfg.dom) return; ! FOR_EACH_BB (bb) { edge succ; ! fprintf (file, ";; %d succs { ", bb->index); ! for (succ = bb->succ; succ; succ = succ->succ_next) fprintf (file, "%d ", succ->dest->index); ! fprintf (file, "}\n"); } /* Dump the DFS node order. */ *************** flow_loops_cfg_dump (loops, file) *** 85,98 **** } } ! /* Return non-zero if the nodes of LOOP are a subset of OUTER. */ ! static int flow_loop_nested_p (outer, loop) ! struct loop *outer; ! struct loop *loop; { ! return sbitmap_a_subset_b_p (loop->nodes, outer->nodes); } /* Dump the loop information specified by LOOP to the stream FILE --- 90,104 ---- } } ! /* Return nonzero if the nodes of LOOP are a subset of OUTER. */ ! bool flow_loop_nested_p (outer, loop) ! const struct loop *outer; ! const struct loop *loop; { ! return loop->depth > outer->depth ! && loop->pred[outer->depth] == outer; } /* Dump the loop information specified by LOOP to the stream FILE *************** flow_loop_dump (loop, file, loop_dump_au *** 105,126 **** void (*loop_dump_aux) PARAMS((const struct loop *, FILE *, int)); int verbose; { if (! loop || ! loop->header) return; ! if (loop->first->head && loop->last->end) ! fprintf (file, ";;\n;; Loop %d (%d to %d):%s%s\n", ! loop->num, INSN_UID (loop->first->head), ! INSN_UID (loop->last->end), ! loop->shared ? " shared" : "", loop->invalid ? " invalid" : ""); ! else ! fprintf (file, ";;\n;; Loop %d:%s%s\n", loop->num, ! loop->shared ? " shared" : "", loop->invalid ? " invalid" : ""); ! fprintf (file, ";; header %d, latch %d, pre-header %d, first %d, last %d\n", loop->header->index, loop->latch->index, ! loop->pre_header ? loop->pre_header->index : -1, ! loop->first->index, loop->last->index); fprintf (file, ";; depth %d, level %d, outer %ld\n", loop->depth, loop->level, (long) (loop->outer ? loop->outer->num : -1)); --- 111,128 ---- void (*loop_dump_aux) PARAMS((const struct loop *, FILE *, int)); int verbose; { + basic_block *bbs; + int i; + if (! loop || ! loop->header) return; ! fprintf (file, ";;\n;; Loop %d:%s\n", loop->num, ! loop->invalid ? " invalid" : ""); ! fprintf (file, ";; header %d, latch %d, pre-header %d\n", loop->header->index, loop->latch->index, ! loop->pre_header ? loop->pre_header->index : -1); fprintf (file, ";; depth %d, level %d, outer %ld\n", loop->depth, loop->level, (long) (loop->outer ? loop->outer->num : -1)); *************** flow_loop_dump (loop, file, loop_dump_au *** 131,144 **** flow_edge_list_print (";; entry edges", loop->entry_edges, loop->num_entries, file); ! fprintf (file, ";; %d", loop->num_nodes); ! flow_nodes_print (" nodes", loop->nodes, file); flow_edge_list_print (";; exit edges", loop->exit_edges, loop->num_exits, file); - if (loop->exits_doms) - flow_nodes_print (";; exit doms", loop->exits_doms, file); - if (loop_dump_aux) loop_dump_aux (loop, file, verbose); } --- 133,147 ---- flow_edge_list_print (";; entry edges", loop->entry_edges, loop->num_entries, file); ! fprintf (file, ";; nodes:"); ! bbs = get_loop_body (loop); ! for (i = 0; i < loop->num_nodes; i++) ! fprintf (file, " %d", bbs[i]->index); ! free (bbs); ! fprintf (file, "\n"); flow_edge_list_print (";; exit edges", loop->exit_edges, loop->num_exits, file); if (loop_dump_aux) loop_dump_aux (loop, file, verbose); } *************** flow_loops_dump (loops, file, loop_dump_ *** 153,207 **** void (*loop_dump_aux) PARAMS((const struct loop *, FILE *, int)); int verbose; { ! int i, j; int num_loops; num_loops = loops->num; if (! num_loops || ! file) return; ! fprintf (file, ";; %d loops found, %d levels\n", num_loops, loops->levels); for (i = 0; i < num_loops; i++) { ! struct loop *loop = &loops->array[i]; ! ! flow_loop_dump (loop, file, loop_dump_aux, verbose); ! if (loop->shared) ! for (j = 0; j < i; j++) ! { ! struct loop *oloop = &loops->array[j]; ! ! if (loop->header == oloop->header) ! { ! int disjoint; ! int smaller; ! smaller = loop->num_nodes < oloop->num_nodes; ! /* If the union of LOOP and OLOOP is different than ! the larger of LOOP and OLOOP then LOOP and OLOOP ! must be disjoint. */ ! disjoint = ! flow_loop_nested_p (smaller ? loop : oloop, ! smaller ? oloop : loop); ! fprintf (file, ! ";; loop header %d shared by loops %d, %d %s\n", ! loop->header->index, i, j, ! disjoint ? "disjoint" : "nested"); ! } ! } } if (verbose) flow_loops_cfg_dump (loops, file); } /* Free all the memory allocated for LOOPS. */ void flow_loops_free (loops) struct loops *loops; { ! if (loops->array) { int i; --- 156,208 ---- void (*loop_dump_aux) PARAMS((const struct loop *, FILE *, int)); int verbose; { ! int i; int num_loops; num_loops = loops->num; if (! num_loops || ! file) return; ! fprintf (file, ";; %d loops found, %d levels\n", ! num_loops, loops->levels); ! for (i = 0; i < num_loops; i++) { ! struct loop *loop = loops->parray[i]; ! if (!loop) ! continue; ! flow_loop_dump (loop, file, loop_dump_aux, verbose); } if (verbose) flow_loops_cfg_dump (loops, file); } + /* Free data allocated for LOOP. */ + static void + flow_loop_free (loop) + struct loop *loop; + { + if (loop->pre_header_edges) + free (loop->pre_header_edges); + if (loop->entry_edges) + free (loop->entry_edges); + if (loop->exit_edges) + free (loop->exit_edges); + if (loop->pred) + free (loop->pred); + free (loop); + } + /* Free all the memory allocated for LOOPS. */ void flow_loops_free (loops) struct loops *loops; { ! if (loops->parray) { int i; *************** flow_loops_free (loops) *** 211,390 **** /* Free the loop descriptors. */ for (i = 0; i < loops->num; i++) { ! struct loop *loop = &loops->array[i]; ! if (loop->pre_header_edges) ! free (loop->pre_header_edges); ! if (loop->nodes) ! sbitmap_free (loop->nodes); ! if (loop->entry_edges) ! free (loop->entry_edges); ! if (loop->exit_edges) ! free (loop->exit_edges); ! if (loop->exits_doms) ! sbitmap_free (loop->exits_doms); } ! free (loops->array); ! loops->array = NULL; if (loops->cfg.dom) ! sbitmap_vector_free (loops->cfg.dom); if (loops->cfg.dfs_order) free (loops->cfg.dfs_order); - if (loops->shared_headers) - sbitmap_free (loops->shared_headers); } } ! /* Find the entry edges into the loop with header HEADER and nodes ! NODES and store in ENTRY_EDGES array. Return the number of entry ! edges from the loop. */ ! static int ! flow_loop_entry_edges_find (header, nodes, entry_edges) ! basic_block header; ! const sbitmap nodes; ! edge **entry_edges; { edge e; int num_entries; - *entry_edges = NULL; - num_entries = 0; ! for (e = header->pred; e; e = e->pred_next) { ! basic_block src = e->src; ! ! if (src == ENTRY_BLOCK_PTR || ! TEST_BIT (nodes, src->index)) num_entries++; } if (! num_entries) abort (); ! *entry_edges = (edge *) xmalloc (num_entries * sizeof (edge)); num_entries = 0; ! for (e = header->pred; e; e = e->pred_next) { ! basic_block src = e->src; ! ! if (src == ENTRY_BLOCK_PTR || ! TEST_BIT (nodes, src->index)) ! (*entry_edges)[num_entries++] = e; } ! return num_entries; } ! /* Find the exit edges from the loop using the bitmap of loop nodes ! NODES and store in EXIT_EDGES array. Return the number of ! exit edges from the loop. */ ! static int ! flow_loop_exit_edges_find (nodes, exit_edges) ! const sbitmap nodes; ! edge **exit_edges; { edge e; ! int node; ! int num_exits; ! *exit_edges = NULL; /* Check all nodes within the loop to see if there are any successors not in the loop. Note that a node may have multiple ! exiting edges ????? A node can have one jumping edge and one fallthru ! edge so only one of these can exit the loop. */ num_exits = 0; ! EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, node, { ! for (e = BASIC_BLOCK (node)->succ; e; e = e->succ_next) ! { ! basic_block dest = e->dest; ! if (dest == EXIT_BLOCK_PTR || ! TEST_BIT (nodes, dest->index)) num_exits++; ! } ! }); if (! num_exits) ! return 0; ! *exit_edges = (edge *) xmalloc (num_exits * sizeof (edge)); /* Store all exiting edges into an array. */ num_exits = 0; ! EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, node, { ! for (e = BASIC_BLOCK (node)->succ; e; e = e->succ_next) ! { ! basic_block dest = e->dest; ! if (dest == EXIT_BLOCK_PTR || ! TEST_BIT (nodes, dest->index)) ! (*exit_edges)[num_exits++] = e; } ! }); ! ! return num_exits; } ! /* Find the nodes contained within the loop with header HEADER and ! latch LATCH and store in NODES. Return the number of nodes within ! the loop. */ static int ! flow_loop_nodes_find (header, latch, nodes) basic_block header; ! basic_block latch; ! sbitmap nodes; { basic_block *stack; int sp; ! int num_nodes = 0; ! ! stack = (basic_block *) xmalloc (n_basic_blocks * sizeof (basic_block)); ! sp = 0; ! /* Start with only the loop header in the set of loop nodes. */ ! sbitmap_zero (nodes); ! SET_BIT (nodes, header->index); ! num_nodes++; ! header->loop_depth++; ! /* Push the loop latch on to the stack. */ ! if (! TEST_BIT (nodes, latch->index)) { ! SET_BIT (nodes, latch->index); ! latch->loop_depth++; num_nodes++; ! stack[sp++] = latch; ! } ! ! while (sp) ! { ! basic_block node; ! edge e; ! ! node = stack[--sp]; ! for (e = node->pred; e; e = e->pred_next) { ! basic_block ancestor = e->src; ! /* If each ancestor not marked as part of loop, add to set of ! loop nodes and push on to stack. */ ! if (ancestor != ENTRY_BLOCK_PTR ! && ! TEST_BIT (nodes, ancestor->index)) { ! SET_BIT (nodes, ancestor->index); ! ancestor->loop_depth++; ! num_nodes++; ! stack[sp++] = ancestor; } } } - free (stack); return num_nodes; } --- 212,374 ---- /* Free the loop descriptors. */ for (i = 0; i < loops->num; i++) { ! struct loop *loop = loops->parray[i]; ! if (!loop) ! continue; ! ! flow_loop_free (loop); } ! free (loops->parray); ! loops->parray = NULL; if (loops->cfg.dom) ! free_dominance_info (loops->cfg.dom); if (loops->cfg.dfs_order) free (loops->cfg.dfs_order); + if (loops->cfg.rc_order) + free (loops->cfg.rc_order); } } ! /* Find the entry edges into the LOOP. */ ! static void ! flow_loop_entry_edges_find (loop) ! struct loop *loop; { edge e; int num_entries; num_entries = 0; ! for (e = loop->header->pred; e; e = e->pred_next) { ! if (flow_loop_outside_edge_p (loop, e)) num_entries++; } if (! num_entries) abort (); ! loop->entry_edges = (edge *) xmalloc (num_entries * sizeof (edge *)); num_entries = 0; ! for (e = loop->header->pred; e; e = e->pred_next) { ! if (flow_loop_outside_edge_p (loop, e)) ! loop->entry_edges[num_entries++] = e; } ! loop->num_entries = num_entries; } ! /* Find the exit edges from the LOOP. */ ! static void ! flow_loop_exit_edges_find (loop) ! struct loop *loop; { edge e; ! basic_block node, *bbs; ! int num_exits, i; ! loop->exit_edges = NULL; ! loop->num_exits = 0; /* Check all nodes within the loop to see if there are any successors not in the loop. Note that a node may have multiple ! exiting edges. */ num_exits = 0; ! bbs = get_loop_body (loop); ! for (i = 0; i < loop->num_nodes; i++) ! { ! node = bbs[i]; ! for (e = node->succ; e; e = e->succ_next) ! { ! basic_block dest = e->dest; ! if (!flow_bb_inside_loop_p (loop, dest)) num_exits++; ! } ! } if (! num_exits) ! { ! free (bbs); ! return; ! } ! loop->exit_edges = (edge *) xmalloc (num_exits * sizeof (edge *)); /* Store all exiting edges into an array. */ num_exits = 0; ! for (i = 0; i < loop->num_nodes; i++) ! { ! node = bbs[i]; ! for (e = node->succ; e; e = e->succ_next) ! { ! basic_block dest = e->dest; ! if (!flow_bb_inside_loop_p (loop, dest)) ! loop->exit_edges[num_exits++] = e; } ! } ! free (bbs); ! loop->num_exits = num_exits; } ! /* Find the nodes contained within the LOOP with header HEADER. ! Return the number of nodes within the loop. */ static int ! flow_loop_nodes_find (header, loop) basic_block header; ! struct loop *loop; { basic_block *stack; int sp; ! int num_nodes = 1; ! int findex, lindex; ! header->loop_father = loop; ! header->loop_depth = loop->depth; ! findex = lindex = header->index; ! if (loop->latch->loop_father != loop) { ! stack = (basic_block *) xmalloc (n_basic_blocks * sizeof (basic_block)); ! sp = 0; num_nodes++; ! stack[sp++] = loop->latch; ! loop->latch->loop_father = loop; ! loop->latch->loop_depth = loop->depth; ! ! while (sp) { ! basic_block node; ! edge e; ! node = stack[--sp]; ! ! for (e = node->pred; e; e = e->pred_next) { ! basic_block ancestor = e->src; ! ! if (ancestor != ENTRY_BLOCK_PTR ! && ancestor->loop_father != loop) ! { ! ancestor->loop_father = loop; ! ancestor->loop_depth = loop->depth; ! num_nodes++; ! stack[sp++] = ancestor; ! } } } + free (stack); } return num_nodes; } *************** flow_loop_pre_header_scan (loop) *** 431,437 **** static basic_block flow_loop_pre_header_find (header, dom) basic_block header; ! const sbitmap *dom; { basic_block pre_header; edge e; --- 415,421 ---- static basic_block flow_loop_pre_header_find (header, dom) basic_block header; ! dominance_info dom; { basic_block pre_header; edge e; *************** flow_loop_pre_header_find (header, dom) *** 444,450 **** basic_block node = e->src; if (node != ENTRY_BLOCK_PTR ! && ! TEST_BIT (dom[node->index], header->index)) { if (pre_header == NULL) pre_header = node; --- 428,434 ---- basic_block node = e->src; if (node != ENTRY_BLOCK_PTR ! && ! dominated_by_p (dom, node, header)) { if (pre_header == NULL) pre_header = node; *************** flow_loop_pre_header_find (header, dom) *** 461,528 **** return pre_header; } ! /* Add LOOP to the loop hierarchy tree where PREVLOOP was the loop ! previously added. The insertion algorithm assumes that the loops ! are added in the order found by a depth first search of the CFG. */ ! static void ! flow_loop_tree_node_add (prevloop, loop) ! struct loop *prevloop; struct loop *loop; { ! if (flow_loop_nested_p (prevloop, loop)) ! { ! prevloop->inner = loop; ! loop->outer = prevloop; ! return; ! } ! ! for (; prevloop->outer; prevloop = prevloop->outer) ! if (flow_loop_nested_p (prevloop->outer, loop)) ! { ! prevloop->next = loop; ! loop->outer = prevloop->outer; ! return; ! } ! ! prevloop->next = loop; ! loop->outer = NULL; } ! /* Build the loop hierarchy tree for LOOPS. */ ! static void ! flow_loops_tree_build (loops) ! struct loops *loops; { ! int i; ! int num_loops; ! num_loops = loops->num; ! if (! num_loops) ! return; ! /* Root the loop hierarchy tree with the first loop found. ! Since we used a depth first search this should be the ! outermost loop. */ ! loops->tree_root = &loops->array[0]; ! loops->tree_root->outer = loops->tree_root->inner ! = loops->tree_root->next = NULL; ! /* Add the remaining loops to the tree. */ ! for (i = 1; i < num_loops; i++) ! flow_loop_tree_node_add (&loops->array[i - 1], &loops->array[i]); } /* Helper function to compute loop nesting depth and enclosed loop level ! for the natural loop specified by LOOP at the loop depth DEPTH. ! Returns the loop level. */ static int ! flow_loop_level_compute (loop, depth) struct loop *loop; - int depth; { struct loop *inner; int level = 1; --- 445,499 ---- return pre_header; } ! /* Add LOOP to the loop hierarchy tree where FATHER is father of the ! added loop. */ ! void ! flow_loop_tree_node_add (father, loop) ! struct loop *father; struct loop *loop; { + loop->next = father->inner; + father->inner = loop; + loop->outer = father; ! loop->depth = father->depth + 1; ! loop->pred = xmalloc (sizeof (struct loop *) * loop->depth); ! memcpy (loop->pred, father->pred, sizeof (struct loop *) * father->depth); ! loop->pred[father->depth] = father; } ! /* Remove LOOP from the loop hierarchy tree. */ ! void ! flow_loop_tree_node_remove (loop) ! struct loop *loop; { ! struct loop *prev, *father; ! father = loop->outer; ! loop->outer = NULL; ! /* Remove loop from the list of sons. */ ! if (father->inner == loop) ! father->inner = loop->next; ! else ! { ! for (prev = father->inner; prev->next != loop; prev = prev->next); ! prev->next = loop->next; ! } ! loop->depth = -1; ! free (loop->pred); ! loop->pred = NULL; } /* Helper function to compute loop nesting depth and enclosed loop level ! for the natural loop specified by LOOP. Returns the loop level. */ static int ! flow_loop_level_compute (loop) struct loop *loop; { struct loop *inner; int level = 1; *************** flow_loop_level_compute (loop, depth) *** 537,549 **** itself). */ for (inner = loop->inner; inner; inner = inner->next) { ! int ilevel = flow_loop_level_compute (inner, depth + 1) + 1; ! level = MAX (ilevel, level); } loop->level = level; - loop->depth = depth; return level; } --- 508,520 ---- itself). */ for (inner = loop->inner; inner; inner = inner->next) { ! int ilevel = flow_loop_level_compute (inner) + 1; ! if (ilevel > level) ! level = ilevel; } loop->level = level; return level; } *************** static int *** 555,572 **** flow_loops_level_compute (loops) struct loops *loops; { ! int levels = 0; ! struct loop *loop; ! int level; ! ! /* Traverse all the outer level loops. */ ! for (loop = loops->tree_root; loop; loop = loop->next) ! { ! level = flow_loop_level_compute (loop, 1); ! levels = MAX (levels, level); ! } ! ! return levels; } /* Scan a single natural loop specified by LOOP collecting information --- 526,532 ---- flow_loops_level_compute (loops) struct loops *loops; { ! return flow_loop_level_compute (loops->tree_root); } /* Scan a single natural loop specified by LOOP collecting information *************** flow_loop_scan (loops, loop, flags) *** 578,614 **** struct loop *loop; int flags; { - /* Determine prerequisites. */ - if ((flags & LOOP_EXITS_DOMS) && ! loop->exit_edges) - flags |= LOOP_EXIT_EDGES; - if (flags & LOOP_ENTRY_EDGES) ! /* Find edges which enter the loop header. Note that the entry edges ! should only enter the header of a natural loop. */ ! loop->num_entries = flow_loop_entry_edges_find (loop->header, loop->nodes, ! &loop->entry_edges); if (flags & LOOP_EXIT_EDGES) - /* Find edges which exit the loop. */ - loop->num_exits - = flow_loop_exit_edges_find (loop->nodes, &loop->exit_edges); - - if (flags & LOOP_EXITS_DOMS) { ! int j; ! ! /* Determine which loop nodes dominate all the exits ! of the loop. */ ! loop->exits_doms = sbitmap_alloc (n_basic_blocks); ! sbitmap_copy (loop->exits_doms, loop->nodes); ! for (j = 0; j < loop->num_exits; j++) ! sbitmap_a_and_b (loop->exits_doms, loop->exits_doms, ! loops->cfg.dom[loop->exit_edges[j]->src->index]); ! ! /* The header of a natural loop must dominate ! all exits. */ ! if (! TEST_BIT (loop->exits_doms, loop->header->index)) ! abort (); } if (flags & LOOP_PRE_HEADER) --- 538,555 ---- struct loop *loop; int flags; { if (flags & LOOP_ENTRY_EDGES) ! { ! /* Find edges which enter the loop header. ! Note that the entry edges should only ! enter the header of a natural loop. */ ! flow_loop_entry_edges_find (loop); ! } if (flags & LOOP_EXIT_EDGES) { ! /* Find edges which exit the loop. */ ! flow_loop_exit_edges_find (loop); } if (flags & LOOP_PRE_HEADER) *************** flow_loop_scan (loops, loop, flags) *** 625,630 **** --- 566,754 ---- return 1; } + #define HEADER_BLOCK(B) (* (int *) (B)->aux) + #define LATCH_EDGE(E) (*(int *) (E)->aux) + + /* Redirect edge and update latch and header info. */ + static void + redirect_edge_with_latch_update (e, to) + edge e; + basic_block to; + { + basic_block jump; + + jump = redirect_edge_and_branch_force (e, to); + if (jump) + { + alloc_aux_for_block (jump, sizeof (int)); + HEADER_BLOCK (jump) = 0; + alloc_aux_for_edge (jump->pred, sizeof (int)); + LATCH_EDGE (jump->succ) = LATCH_EDGE (e); + LATCH_EDGE (jump->pred) = 0; + } + } + + /* Split BB into entry part and rest; if REDIRECT_LATCH, redirect edges + marked as latch into entry part, analogically for REDIRECT_NONLATCH. + In both of these cases, ignore edge EXCEPT. If CONN_LATCH, set edge + between created entry part and BB as latch one. Return created entry + part. */ + + static basic_block + make_forwarder_block (bb, redirect_latch, redirect_nonlatch, except, + conn_latch) + basic_block bb; + int redirect_latch; + int redirect_nonlatch; + edge except; + int conn_latch; + { + edge e, next_e, fallthru; + basic_block dummy; + rtx insn; + + insn = PREV_INSN (first_insn_after_basic_block_note (bb)); + + fallthru = split_block (bb, insn); + dummy = fallthru->src; + bb = fallthru->dest; + + bb->aux = xmalloc (sizeof (int)); + HEADER_BLOCK (dummy) = 0; + HEADER_BLOCK (bb) = 1; + + /* Redirect back edges we want to keep. */ + for (e = dummy->pred; e; e = next_e) + { + next_e = e->pred_next; + if (e == except + || !((redirect_latch && LATCH_EDGE (e)) + || (redirect_nonlatch && !LATCH_EDGE (e)))) + { + dummy->frequency -= EDGE_FREQUENCY (e); + dummy->count -= e->count; + if (dummy->frequency < 0) + dummy->frequency = 0; + if (dummy->count < 0) + dummy->count = 0; + redirect_edge_with_latch_update (e, bb); + } + } + + alloc_aux_for_edge (fallthru, sizeof (int)); + LATCH_EDGE (fallthru) = conn_latch; + + return dummy; + } + + /* Takes care of merging natural loops with shared headers. */ + static void + canonicalize_loop_headers () + { + dominance_info dom; + basic_block header; + edge e; + + /* Compute the dominators. */ + dom = calculate_dominance_info (CDI_DOMINATORS); + + alloc_aux_for_blocks (sizeof (int)); + alloc_aux_for_edges (sizeof (int)); + + /* Split blocks so that each loop has only single latch. */ + FOR_EACH_BB (header) + { + int num_latches = 0; + int have_abnormal_edge = 0; + + for (e = header->pred; e; e = e->pred_next) + { + basic_block latch = e->src; + + if (e->flags & EDGE_ABNORMAL) + have_abnormal_edge = 1; + + if (latch != ENTRY_BLOCK_PTR + && dominated_by_p (dom, latch, header)) + { + num_latches++; + LATCH_EDGE (e) = 1; + } + } + if (have_abnormal_edge) + HEADER_BLOCK (header) = 0; + else + HEADER_BLOCK (header) = num_latches; + } + + if (HEADER_BLOCK (ENTRY_BLOCK_PTR->succ->dest)) + { + basic_block bb; + + /* We could not redirect edges freely here. On the other hand, + we can simply split the edge from entry block. */ + bb = split_edge (ENTRY_BLOCK_PTR->succ); + + alloc_aux_for_edge (bb->succ, sizeof (int)); + LATCH_EDGE (bb->succ) = 0; + alloc_aux_for_block (bb, sizeof (int)); + HEADER_BLOCK (bb) = 0; + } + + FOR_EACH_BB (header) + { + int num_latch; + int want_join_latch; + int max_freq, is_heavy; + edge heavy; + + if (!HEADER_BLOCK (header)) + continue; + + num_latch = HEADER_BLOCK (header); + + want_join_latch = (num_latch > 1); + + if (!want_join_latch) + continue; + + /* Find a heavy edge. */ + is_heavy = 1; + heavy = NULL; + max_freq = 0; + for (e = header->pred; e; e = e->pred_next) + if (LATCH_EDGE (e) && + EDGE_FREQUENCY (e) > max_freq) + max_freq = EDGE_FREQUENCY (e); + for (e = header->pred; e; e = e->pred_next) + if (LATCH_EDGE (e) && + EDGE_FREQUENCY (e) >= max_freq / HEAVY_EDGE_RATIO) + { + if (heavy) + { + is_heavy = 0; + break; + } + else + heavy = e; + } + + if (is_heavy) + { + basic_block new_header = + make_forwarder_block (header, true, true, heavy, 0); + if (num_latch > 2) + make_forwarder_block (new_header, true, false, NULL, 1); + } + else + make_forwarder_block (header, true, false, NULL, 1); + } + + free_aux_for_blocks (); + free_aux_for_edges (); + free_dominance_info (dom); + } + /* Find all the natural loops in the function and save in LOOPS structure and recalculate loop_depth information in basic block structures. FLAGS controls which loop information is collected. Return the number of natural *************** flow_loops_find (loops, flags) *** 640,648 **** int num_loops; edge e; sbitmap headers; ! sbitmap *dom; int *dfs_order; int *rc_order; /* This function cannot be repeatedly called with different flags to build up the loop information. The loop tree --- 764,774 ---- int num_loops; edge e; sbitmap headers; ! dominance_info dom; int *dfs_order; int *rc_order; + basic_block header; + basic_block bb; /* This function cannot be repeatedly called with different flags to build up the loop information. The loop tree *************** flow_loops_find (loops, flags) *** 660,697 **** dfs_order = NULL; rc_order = NULL; /* Compute the dominators. */ ! dom = sbitmap_vector_alloc (n_basic_blocks, n_basic_blocks); ! calculate_dominance_info (NULL, dom, CDI_DOMINATORS); ! /* Count the number of loop edges (back edges). This should be the same as the number of natural loops. */ num_loops = 0; ! for (b = 0; b < n_basic_blocks; b++) { ! basic_block header; ! ! header = BASIC_BLOCK (b); header->loop_depth = 0; for (e = header->pred; e; e = e->pred_next) { basic_block latch = e->src; /* Look for back edges where a predecessor is dominated by this block. A natural loop has a single entry node (header) that dominates all the nodes in the loop. It also has single back edge to the header ! from a latch node. Note that multiple natural loops ! may share the same header. */ ! if (b != header->index) ! abort (); ! ! if (latch != ENTRY_BLOCK_PTR && TEST_BIT (dom[latch->index], b)) ! num_loops++; } } if (num_loops) { /* Compute depth first search order of the CFG so that outer --- 786,864 ---- dfs_order = NULL; rc_order = NULL; + /* Join loops with shared headers. */ + canonicalize_loop_headers (); + /* Compute the dominators. */ ! dom = loops->cfg.dom = calculate_dominance_info (CDI_DOMINATORS); ! /* Count the number of loop headers. This should be the same as the number of natural loops. */ + headers = sbitmap_alloc (last_basic_block); + sbitmap_zero (headers); + num_loops = 0; ! FOR_EACH_BB (header) { ! int more_latches = 0; ! header->loop_depth = 0; for (e = header->pred; e; e = e->pred_next) { basic_block latch = e->src; + if (e->flags & EDGE_ABNORMAL) + { + if (more_latches) + { + RESET_BIT (headers, header->index); + num_loops--; + } + break; + } + /* Look for back edges where a predecessor is dominated by this block. A natural loop has a single entry node (header) that dominates all the nodes in the loop. It also has single back edge to the header ! from a latch node. */ ! if (latch != ENTRY_BLOCK_PTR && dominated_by_p (dom, latch, header)) ! { ! /* Shared headers should be eliminated by now. */ ! if (more_latches) ! abort (); ! more_latches = 1; ! SET_BIT (headers, header->index); ! num_loops++; ! } } } + /* Allocate loop structures. */ + loops->parray = (struct loop **) xcalloc (num_loops + 1, sizeof (struct loop *)); + + /* Dummy loop containing whole function. */ + loops->parray[0] = xcalloc (1, sizeof (struct loop)); + loops->parray[0]->next = NULL; + loops->parray[0]->inner = NULL; + loops->parray[0]->outer = NULL; + loops->parray[0]->depth = 0; + loops->parray[0]->pred = NULL; + loops->parray[0]->num_nodes = n_basic_blocks + 2; + loops->parray[0]->latch = EXIT_BLOCK_PTR; + loops->parray[0]->header = ENTRY_BLOCK_PTR; + ENTRY_BLOCK_PTR->loop_father = loops->parray[0]; + EXIT_BLOCK_PTR->loop_father = loops->parray[0]; + + loops->tree_root = loops->parray[0]; + + /* Find and record information about all the natural loops + in the CFG. */ + loops->num = 1; + FOR_EACH_BB (bb) + bb->loop_father = loops->tree_root; + if (num_loops) { /* Compute depth first search order of the CFG so that outer *************** flow_loops_find (loops, flags) *** 705,808 **** loops->cfg.dfs_order = dfs_order; loops->cfg.rc_order = rc_order; ! /* Allocate loop structures. */ ! loops->array ! = (struct loop *) xcalloc (num_loops, sizeof (struct loop)); ! ! headers = sbitmap_alloc (n_basic_blocks); ! sbitmap_zero (headers); ! ! loops->shared_headers = sbitmap_alloc (n_basic_blocks); ! sbitmap_zero (loops->shared_headers); ! /* Find and record information about all the natural loops ! in the CFG. */ ! num_loops = 0; ! for (b = n_basic_blocks - 1; b >= 0; b--) { ! basic_block latch; /* Search the nodes of the CFG in reverse completion order so that we can find outer loops first. */ ! latch = BASIC_BLOCK (rc_order[b]); ! /* Look for all the possible headers for this latch block. */ ! for (e = latch->succ; e; e = e->succ_next) ! { ! basic_block header = e->dest; ! /* Look for forward edges where this block is dominated by ! a successor of this block. A natural loop has a single ! entry node (header) that dominates all the nodes in the ! loop. It also has single back edge to the header from a ! latch node. Note that multiple natural loops may share ! the same header. */ ! if (header != EXIT_BLOCK_PTR ! && TEST_BIT (dom[latch->index], header->index)) ! { ! struct loop *loop; ! loop = loops->array + num_loops; ! loop->header = header; loop->latch = latch; ! loop->num = num_loops; ! ! num_loops++; } } - } ! for (i = 0; i < num_loops; i++) ! { ! struct loop *loop = &loops->array[i]; ! ! /* Keep track of blocks that are loop headers so ! that we can tell which loops should be merged. */ ! if (TEST_BIT (headers, loop->header->index)) ! SET_BIT (loops->shared_headers, loop->header->index); ! SET_BIT (headers, loop->header->index); ! ! /* Find nodes contained within the loop. */ ! loop->nodes = sbitmap_alloc (n_basic_blocks); ! loop->num_nodes ! = flow_loop_nodes_find (loop->header, loop->latch, loop->nodes); ! ! /* Compute first and last blocks within the loop. ! These are often the same as the loop header and ! loop latch respectively, but this is not always ! the case. */ ! loop->first ! = BASIC_BLOCK (sbitmap_first_set_bit (loop->nodes)); ! loop->last ! = BASIC_BLOCK (sbitmap_last_set_bit (loop->nodes)); ! ! flow_loop_scan (loops, loop, flags); } - /* Natural loops with shared headers may either be disjoint or - nested. Disjoint loops with shared headers cannot be inner - loops and should be merged. For now just mark loops that share - headers. */ - for (i = 0; i < num_loops; i++) - if (TEST_BIT (loops->shared_headers, loops->array[i].header->index)) - loops->array[i].shared = 1; - sbitmap_free (headers); - } - else - sbitmap_vector_free (dom); ! loops->num = num_loops; ! /* Build the loop hierarchy tree. */ ! flow_loops_tree_build (loops); ! /* Assign the loop nesting depth and enclosed loop level for each ! loop. */ ! loops->levels = flow_loops_level_compute (loops); ! return num_loops; } /* Update the information regarding the loops in the CFG --- 872,936 ---- loops->cfg.dfs_order = dfs_order; loops->cfg.rc_order = rc_order; ! num_loops = 1; ! for (b = 0; b < n_basic_blocks; b++) { ! struct loop *loop; /* Search the nodes of the CFG in reverse completion order so that we can find outer loops first. */ ! if (!TEST_BIT (headers, rc_order[b])) ! continue; ! header = BASIC_BLOCK (rc_order[b]); ! ! loop = loops->parray[num_loops] = xcalloc (1, sizeof (struct loop)); ! loop->header = header; ! loop->num = num_loops; ! num_loops++; ! /* Look for the latch for this header block. */ ! for (e = header->pred; e; e = e->pred_next) ! { ! basic_block latch = e->src; ! if (latch != ENTRY_BLOCK_PTR ! && dominated_by_p (dom, latch, header)) ! { loop->latch = latch; ! break; } } ! flow_loop_tree_node_add (header->loop_father, loop); ! loop->num_nodes = flow_loop_nodes_find (loop->header, loop); } sbitmap_free (headers); ! /* Assign the loop nesting depth and enclosed loop level for each ! loop. */ ! loops->levels = flow_loops_level_compute (loops); ! /* Scan the loops. */ ! for (i = 1; i < num_loops; i++) ! flow_loop_scan (loops, loops->parray[i], flags); ! loops->num = num_loops; ! } ! else ! { ! loops->cfg.dom = NULL; ! free_dominance_info (dom); ! } ! #ifdef ENABLE_CHECKING ! verify_flow_info (); ! verify_loop_structure (loops, 0); ! #endif ! return loops->num; } /* Update the information regarding the loops in the CFG *************** flow_loops_update (loops, flags) *** 815,836 **** { /* One day we may want to update the current loop data. For now throw away the old stuff and rebuild what we need. */ ! if (loops->array) flow_loops_free (loops); return flow_loops_find (loops, flags); } ! /* Return non-zero if edge E enters header of LOOP from outside of LOOP. */ ! int flow_loop_outside_edge_p (loop, e) const struct loop *loop; edge e; { if (e->dest != loop->header) abort (); ! return (e->src == ENTRY_BLOCK_PTR) ! || ! TEST_BIT (loop->nodes, e->src->index); } --- 943,1201 ---- { /* One day we may want to update the current loop data. For now throw away the old stuff and rebuild what we need. */ ! if (loops->parray) flow_loops_free (loops); return flow_loops_find (loops, flags); } ! /* Return nonzero if basic block BB belongs to LOOP. */ ! bool ! flow_bb_inside_loop_p (loop, bb) ! const struct loop *loop; ! const basic_block bb; ! { ! struct loop *source_loop; ! if (bb == ENTRY_BLOCK_PTR || bb == EXIT_BLOCK_PTR) ! return 0; ! ! source_loop = bb->loop_father; ! return loop == source_loop || flow_loop_nested_p (loop, source_loop); ! } ! ! /* Return nonzero if edge E enters header of LOOP from outside of LOOP. */ ! ! bool flow_loop_outside_edge_p (loop, e) const struct loop *loop; edge e; { if (e->dest != loop->header) abort (); + return !flow_bb_inside_loop_p (loop, e->src); + } ! /* Enumeration predicate for get_loop_body. */ ! static bool ! glb_enum_p (bb, glb_header) ! basic_block bb; ! void *glb_header; ! { ! return bb != (basic_block) glb_header; } + + /* Gets basic blocks of a loop. */ + basic_block * + get_loop_body (loop) + const struct loop *loop; + { + basic_block *tovisit, bb; + int tv = 0; + + if (!loop->num_nodes) + abort (); + + tovisit = xcalloc (loop->num_nodes, sizeof (basic_block)); + tovisit[tv++] = loop->header; + + if (loop->latch == EXIT_BLOCK_PTR) + { + /* There may be blocks unreachable from EXIT_BLOCK. */ + if (loop->num_nodes != n_basic_blocks + 2) + abort (); + FOR_EACH_BB (bb) + tovisit[tv++] = bb; + tovisit[tv++] = EXIT_BLOCK_PTR; + } + else if (loop->latch != loop->header) + { + tv = dfs_enumerate_from (loop->latch, 1, glb_enum_p, + tovisit + 1, loop->num_nodes - 1, + loop->header) + 1; + } + + if (tv != loop->num_nodes) + abort (); + return tovisit; + } + + /* Adds basic block BB to LOOP. */ + void + add_bb_to_loop (bb, loop) + basic_block bb; + struct loop *loop; + { + int i; + + bb->loop_father = loop; + bb->loop_depth = loop->depth; + loop->num_nodes++; + for (i = 0; i < loop->depth; i++) + loop->pred[i]->num_nodes++; + } + + /* Remove basic block BB from loops. */ + void + remove_bb_from_loops (bb) + basic_block bb; + { + int i; + struct loop *loop = bb->loop_father; + + loop->num_nodes--; + for (i = 0; i < loop->depth; i++) + loop->pred[i]->num_nodes--; + bb->loop_father = NULL; + bb->loop_depth = 0; + } + + /* Finds nearest common ancestor in loop tree for given loops. */ + struct loop * + find_common_loop (loop_s, loop_d) + struct loop *loop_s; + struct loop *loop_d; + { + if (!loop_s) return loop_d; + if (!loop_d) return loop_s; + + if (loop_s->depth < loop_d->depth) + loop_d = loop_d->pred[loop_s->depth]; + else if (loop_s->depth > loop_d->depth) + loop_s = loop_s->pred[loop_d->depth]; + + while (loop_s != loop_d) + { + loop_s = loop_s->outer; + loop_d = loop_d->outer; + } + return loop_s; + } + + /* Checks that LOOPS are allright: + -- sizes of loops are allright + -- results of get_loop_body really belong to the loop + -- loop header have just single entry edge and single latch edge + -- loop latches have only single successor that is header of their loop + */ + void + verify_loop_structure (loops, flags) + struct loops *loops; + int flags; + { + int *sizes, i, j; + basic_block *bbs, bb; + struct loop *loop; + int err = 0; + + /* Check sizes. */ + sizes = xcalloc (loops->num, sizeof (int)); + sizes[0] = 2; + + FOR_EACH_BB (bb) + for (loop = bb->loop_father; loop; loop = loop->outer) + sizes[loop->num]++; + + for (i = 0; i < loops->num; i++) + { + if (!loops->parray[i]) + continue; + + if (loops->parray[i]->num_nodes != sizes[i]) + { + error ("Size of loop %d should be %d, not %d.", + i, sizes[i], loops->parray[i]->num_nodes); + err = 1; + } + } + + free (sizes); + + /* Check get_loop_body. */ + for (i = 1; i < loops->num; i++) + { + loop = loops->parray[i]; + if (!loop) + continue; + bbs = get_loop_body (loop); + + for (j = 0; j < loop->num_nodes; j++) + if (!flow_bb_inside_loop_p (loop, bbs[j])) + { + error ("Bb %d do not belong to loop %d.", + bbs[j]->index, i); + err = 1; + } + free (bbs); + } + + /* Check headers and latches. */ + for (i = 1; i < loops->num; i++) + { + loop = loops->parray[i]; + if (!loop) + continue; + + if ((flags & VLS_EXPECT_PREHEADERS) + && (!loop->header->pred->pred_next + || loop->header->pred->pred_next->pred_next)) + { + error ("Loop %d's header does not have exactly 2 entries.", i); + err = 1; + } + if (flags & VLS_EXPECT_SIMPLE_LATCHES) + { + if (!loop->latch->succ + || loop->latch->succ->succ_next) + { + error ("Loop %d's latch does not have exactly 1 successor.", i); + err = 1; + } + if (loop->latch->succ->dest != loop->header) + { + error ("Loop %d's latch does not have header as successor.", i); + err = 1; + } + if (loop->latch->loop_father != loop) + { + error ("Loop %d's latch does not belong directly to it.", i); + err = 1; + } + } + if (loop->header->loop_father != loop) + { + error ("Loop %d's header does not belong directly to it.", i); + err = 1; + } + } + + if (err) + abort (); + } + + /* Returns latch edge of LOOP. */ + edge + loop_latch_edge (loop) + struct loop *loop; + { + edge e; + + for (e = loop->header->pred; e->src != loop->latch; e = e->pred_next) + continue; + + return e; + } + + /* Returns preheader edge of LOOP. */ + edge + loop_preheader_edge (loop) + struct loop *loop; + { + edge e; + + for (e = loop->header->pred; e->src == loop->latch; e = e->pred_next) + continue; + + return e; + } + diff -Nrc3pad gcc-3.2.3/gcc/cfgrtl.c gcc-3.3/gcc/cfgrtl.c *** gcc-3.2.3/gcc/cfgrtl.c 2003-03-27 22:25:48.000000000 +0000 --- gcc-3.3/gcc/cfgrtl.c 2003-04-22 23:08:15.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 56,61 **** --- 56,62 ---- #include "toplev.h" #include "tm_p.h" #include "obstack.h" + #include "insn-config.h" /* Stubs in case we don't have a return insn. */ #ifndef HAVE_return *************** Software Foundation, 59 Temple Place - S *** 63,71 **** #define gen_return() NULL_RTX #endif - /* The basic block structure for every insn, indexed by uid. */ - varray_type basic_block_for_insn; - /* The labels mentioned in non-jump rtl. Valid during find_basic_blocks. */ /* ??? Should probably be using LABEL_NUSES instead. It would take a bit of surgery to be able to use or co-opt the routines in jump. */ --- 64,69 ---- *************** rtx tail_recursion_label_list; *** 74,80 **** static int can_delete_note_p PARAMS ((rtx)); static int can_delete_label_p PARAMS ((rtx)); ! static void commit_one_edge_insertion PARAMS ((edge)); static bool try_redirect_by_replacing_jump PARAMS ((edge, basic_block)); static rtx last_loop_beg_note PARAMS ((rtx)); static bool back_edge_of_syntactic_loop_p PARAMS ((basic_block, basic_block)); --- 72,78 ---- static int can_delete_note_p PARAMS ((rtx)); static int can_delete_label_p PARAMS ((rtx)); ! static void commit_one_edge_insertion PARAMS ((edge, int)); static bool try_redirect_by_replacing_jump PARAMS ((edge, basic_block)); static rtx last_loop_beg_note PARAMS ((rtx)); static bool back_edge_of_syntactic_loop_p PARAMS ((basic_block, basic_block)); *************** can_delete_note_p (note) *** 88,94 **** rtx note; { return (NOTE_LINE_NUMBER (note) == NOTE_INSN_DELETED ! || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK); } /* True if a given label can be deleted. */ --- 86,93 ---- rtx note; { return (NOTE_LINE_NUMBER (note) == NOTE_INSN_DELETED ! || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK ! || NOTE_LINE_NUMBER (note) == NOTE_INSN_PREDICTION); } /* True if a given label can be deleted. */ *************** delete_insn (insn) *** 117,123 **** if (GET_CODE (insn) == CODE_LABEL) { /* Some labels can't be directly removed from the INSN chain, as they ! might be references via variables, constant pool etc. Convert them to the special NOTE_INSN_DELETED_LABEL note. */ if (! can_delete_label_p (insn)) { --- 116,122 ---- if (GET_CODE (insn) == CODE_LABEL) { /* Some labels can't be directly removed from the INSN chain, as they ! might be references via variables, constant pool etc. Convert them to the special NOTE_INSN_DELETED_LABEL note. */ if (! can_delete_label_p (insn)) { *************** delete_insn (insn) *** 177,182 **** --- 176,199 ---- return next; } + /* Like delete_insn but also purge dead edges from BB. */ + rtx + delete_insn_and_edges (insn) + rtx insn; + { + rtx x; + bool purge = false; + + if (INSN_P (insn) + && BLOCK_FOR_INSN (insn) + && BLOCK_FOR_INSN (insn)->end == insn) + purge = true; + x = delete_insn (insn); + if (purge) + purge_dead_edges (BLOCK_FOR_INSN (insn)); + return x; + } + /* Unlink a chain of insns between START and FINISH, leaving notes that must be paired. */ *************** delete_insn_chain (start, finish) *** 202,219 **** start = next; } } /* Create a new basic block consisting of the instructions between HEAD and END inclusive. This function is designed to allow fast BB construction - reuses the note and basic block struct in BB_NOTE, if any and do not grow BASIC_BLOCK chain and should be used directly only by CFG construction code. END can be NULL in to create new empty basic block before HEAD. Both END ! and HEAD can be NULL to create basic block at the end of INSN chain. */ basic_block ! create_basic_block_structure (index, head, end, bb_note) ! int index; rtx head, end, bb_note; { basic_block bb; --- 219,253 ---- start = next; } } + + /* Like delete_insn but also purge dead edges from BB. */ + void + delete_insn_chain_and_edges (first, last) + rtx first, last; + { + bool purge = false; + + if (INSN_P (last) + && BLOCK_FOR_INSN (last) + && BLOCK_FOR_INSN (last)->end == last) + purge = true; + delete_insn_chain (first, last); + if (purge) + purge_dead_edges (BLOCK_FOR_INSN (last)); + } /* Create a new basic block consisting of the instructions between HEAD and END inclusive. This function is designed to allow fast BB construction - reuses the note and basic block struct in BB_NOTE, if any and do not grow BASIC_BLOCK chain and should be used directly only by CFG construction code. END can be NULL in to create new empty basic block before HEAD. Both END ! and HEAD can be NULL to create basic block at the end of INSN chain. ! AFTER is the basic block we should be put after. */ basic_block ! create_basic_block_structure (head, end, bb_note, after) rtx head, end, bb_note; + basic_block after; { basic_block bb; *************** create_basic_block_structure (index, hea *** 235,241 **** } if (after != bb_note && NEXT_INSN (after) != bb_note) ! reorder_insns (bb_note, bb_note, after); } else { --- 269,275 ---- } if (after != bb_note && NEXT_INSN (after) != bb_note) ! reorder_insns_nobb (bb_note, bb_note, after); } else { *************** create_basic_block_structure (index, hea *** 269,278 **** bb->head = head; bb->end = end; ! bb->index = index; ! BASIC_BLOCK (index) = bb; ! if (basic_block_for_insn) ! update_bb_for_insn (bb); /* Tag the block so that we know it has been used when considering other basic block notes. */ --- 303,313 ---- bb->head = head; bb->end = end; ! bb->index = last_basic_block++; ! bb->flags = BB_NEW; ! link_block (bb, after); ! BASIC_BLOCK (bb->index) = bb; ! update_bb_for_insn (bb); /* Tag the block so that we know it has been used when considering other basic block notes. */ *************** create_basic_block_structure (index, hea *** 282,314 **** } /* Create new basic block consisting of instructions in between HEAD and END ! and place it to the BB chain at position INDEX. END can be NULL in to create new empty basic block before HEAD. Both END and HEAD can be NULL to create basic block at the end of INSN chain. */ basic_block ! create_basic_block (index, head, end) ! int index; rtx head, end; { basic_block bb; - int i; - - /* Place the new block just after the block being split. */ - VARRAY_GROW (basic_block_info, ++n_basic_blocks); ! /* Some parts of the compiler expect blocks to be number in ! sequential order so insert the new block immediately after the ! block being split.. */ ! for (i = n_basic_blocks - 1; i > index; --i) ! { ! basic_block tmp = BASIC_BLOCK (i - 1); ! BASIC_BLOCK (i) = tmp; ! tmp->index = i; ! } ! bb = create_basic_block_structure (index, head, end, NULL); bb->aux = NULL; return bb; } --- 317,339 ---- } /* Create new basic block consisting of instructions in between HEAD and END ! and place it to the BB chain after block AFTER. END can be NULL in to create new empty basic block before HEAD. Both END and HEAD can be NULL to create basic block at the end of INSN chain. */ basic_block ! create_basic_block (head, end, after) rtx head, end; + basic_block after; { basic_block bb; ! /* Place the new block just after the end. */ ! VARRAY_GROW (basic_block_info, last_basic_block+1); ! n_basic_blocks++; ! bb = create_basic_block_structure (head, end, NULL, after); bb->aux = NULL; return bb; } *************** flow_delete_block_noexpunge (b) *** 335,340 **** --- 360,377 ---- and remove the associated NOTE_INSN_EH_REGION_BEG and NOTE_INSN_EH_REGION_END notes. */ + /* Get rid of all NOTE_INSN_PREDICTIONs and NOTE_INSN_LOOP_CONTs + hanging before the block. */ + + for (insn = PREV_INSN (b->head); insn; insn = PREV_INSN (insn)) + { + if (GET_CODE (insn) != NOTE) + break; + if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_PREDICTION + || NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_CONT) + NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED; + } + insn = b->head; never_reached_warning (insn, b->end); *************** flow_delete_block (b) *** 379,416 **** basic_block b; { int deleted_handler = flow_delete_block_noexpunge (b); ! ! /* Remove the basic block from the array, and compact behind it. */ expunge_block (b); return deleted_handler; } ! /* Records the basic block struct in BB_FOR_INSN, for every instruction ! indexed by INSN_UID. MAX is the size of the array. */ void ! compute_bb_for_insn (max) ! int max; { ! int i; ! ! if (basic_block_for_insn) ! VARRAY_FREE (basic_block_for_insn); ! ! VARRAY_BB_INIT (basic_block_for_insn, max, "basic_block_for_insn"); ! for (i = 0; i < n_basic_blocks; ++i) { - basic_block bb = BASIC_BLOCK (i); rtx end = bb->end; rtx insn; for (insn = bb->head; ; insn = NEXT_INSN (insn)) { ! if (INSN_UID (insn) < max) ! VARRAY_BB (basic_block_for_insn, INSN_UID (insn)) = bb; ! if (insn == end) break; } --- 416,443 ---- basic_block b; { int deleted_handler = flow_delete_block_noexpunge (b); ! ! /* Remove the basic block from the array. */ expunge_block (b); return deleted_handler; } ! /* Records the basic block struct in BLOCK_FOR_INSN for every insn. */ void ! compute_bb_for_insn () { ! basic_block bb; ! FOR_EACH_BB (bb) { rtx end = bb->end; rtx insn; for (insn = bb->head; ; insn = NEXT_INSN (insn)) { ! BLOCK_FOR_INSN (insn) = bb; if (insn == end) break; } *************** compute_bb_for_insn (max) *** 422,431 **** void free_bb_for_insn () { ! if (basic_block_for_insn) ! VARRAY_FREE (basic_block_for_insn); ! ! basic_block_for_insn = 0; } /* Update insns block within BB. */ --- 449,458 ---- void free_bb_for_insn () { ! rtx insn; ! for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) ! if (GET_CODE (insn) != BARRIER) ! BLOCK_FOR_INSN (insn) = NULL; } /* Update insns block within BB. */ *************** update_bb_for_insn (bb) *** 436,444 **** { rtx insn; - if (! basic_block_for_insn) - return; - for (insn = bb->head; ; insn = NEXT_INSN (insn)) { set_block_for_insn (insn, bb); --- 463,468 ---- *************** update_bb_for_insn (bb) *** 446,471 **** break; } } - - /* Record INSN's block as BB. */ - - void - set_block_for_insn (insn, bb) - rtx insn; - basic_block bb; - { - size_t uid = INSN_UID (insn); - - if (uid >= basic_block_for_insn->num_elements) - { - /* Add one-eighth the size so we don't keep calling xrealloc. */ - size_t new_size = uid + (uid + 7) / 8; - - VARRAY_GROW (basic_block_for_insn, new_size); - } - - VARRAY_BB (basic_block_for_insn, uid) = bb; - } /* Split a block BB after insn INSN creating a new fallthru edge. Return the new edge. Note that to keep other parts of the compiler happy, --- 470,475 ---- *************** split_block (bb, insn) *** 486,492 **** return 0; /* Create the new basic block. */ ! new_bb = create_basic_block (bb->index + 1, NEXT_INSN (insn), bb->end); new_bb->count = bb->count; new_bb->frequency = bb->frequency; new_bb->loop_depth = bb->loop_depth; --- 490,496 ---- return 0; /* Create the new basic block. */ ! new_bb = create_basic_block (NEXT_INSN (insn), bb->end, bb); new_bb->count = bb->count; new_bb->frequency = bb->frequency; new_bb->loop_depth = bb->loop_depth; *************** split_block (bb, insn) *** 515,520 **** --- 519,533 ---- propagate_block (new_bb, new_bb->global_live_at_start, NULL, NULL, 0); COPY_REG_SET (bb->global_live_at_end, new_bb->global_live_at_start); + #ifdef HAVE_conditional_execution + /* In the presence of conditional execution we are not able to update + liveness precisely. */ + if (reload_completed) + { + bb->flags |= BB_DIRTY; + new_bb->flags |= BB_DIRTY; + } + #endif } return new_edge; *************** merge_blocks_nomove (a, b) *** 600,605 **** --- 613,619 ---- for (e = b->succ; e; e = e->succ_next) e->src = a; a->succ = b->succ; + a->flags |= b->flags; /* B hasn't quite yet ceased to exist. Attempt to prevent mishap. */ b->pred = b->succ = NULL; *************** merge_blocks_nomove (a, b) *** 614,628 **** /* Reassociate the insns of B with A. */ if (!b_empty) { ! if (basic_block_for_insn) ! { ! rtx x; ! for (x = a_end; x != b_end; x = NEXT_INSN (x)) ! set_block_for_insn (x, a); ! set_block_for_insn (b_end, a); ! } a_end = b_end; } --- 628,639 ---- /* Reassociate the insns of B with A. */ if (!b_empty) { ! rtx x; ! for (x = a_end; x != b_end; x = NEXT_INSN (x)) ! set_block_for_insn (x, a); ! set_block_for_insn (b_end, a); a_end = b_end; } *************** block_label (block) *** 643,650 **** if (GET_CODE (block->head) != CODE_LABEL) { block->head = emit_label_before (gen_label_rtx (), block->head); - if (basic_block_for_insn) - set_block_for_insn (block->head, block); } return block->head; --- 654,659 ---- *************** try_redirect_by_replacing_jump (e, targe *** 663,669 **** basic_block src = e->src; rtx insn = src->end, kill_from; edge tmp; ! rtx set; int fallthru = 0; /* Verify that all targets will be TARGET. */ --- 672,678 ---- basic_block src = e->src; rtx insn = src->end, kill_from; edge tmp; ! rtx set, table; int fallthru = 0; /* Verify that all targets will be TARGET. */ *************** try_redirect_by_replacing_jump (e, targe *** 673,680 **** if (tmp || !onlyjump_p (insn)) return false; ! ! if ((!optimize || flow2_completed) && tablejump_p (insn)) return false; /* Avoid removing branch with side effects. */ --- 682,692 ---- if (tmp || !onlyjump_p (insn)) return false; ! if (flow2_completed && JUMP_LABEL (insn) ! && (table = NEXT_INSN (JUMP_LABEL (insn))) != NULL_RTX ! && GET_CODE (table) == JUMP_INSN ! && (GET_CODE (PATTERN (table)) == ADDR_VEC ! || GET_CODE (PATTERN (table)) == ADDR_DIFF_VEC)) return false; /* Avoid removing branch with side effects. */ *************** try_redirect_by_replacing_jump (e, targe *** 781,787 **** /* Return last loop_beg note appearing after INSN, before start of next basic block. Return INSN if there are no such notes. ! When emitting jump to redirect an fallthru edge, it should always appear after the LOOP_BEG notes, as loop optimizer expect loop to either start by fallthru edge or jump following the LOOP_BEG note jumping to the loop exit test. */ --- 793,799 ---- /* Return last loop_beg note appearing after INSN, before start of next basic block. Return INSN if there are no such notes. ! When emitting jump to redirect a fallthru edge, it should always appear after the LOOP_BEG notes, as loop optimizer expect loop to either start by fallthru edge or jump following the LOOP_BEG note jumping to the loop exit test. */ *************** force_nonfallthru_and_redirect (e, targe *** 921,932 **** edge e; basic_block target; { ! basic_block jump_block, new_bb = NULL; rtx note; edge new_edge; if (e->flags & EDGE_ABNORMAL) ! abort (); else if (!(e->flags & EDGE_FALLTHRU)) abort (); else if (e->src == ENTRY_BLOCK_PTR) --- 933,986 ---- edge e; basic_block target; { ! basic_block jump_block, new_bb = NULL, src = e->src; rtx note; edge new_edge; + int abnormal_edge_flags = 0; + + /* In the case the last instruction is conditional jump to the next + instruction, first redirect the jump itself and then continue + by creating an basic block afterwards to redirect fallthru edge. */ + if (e->src != ENTRY_BLOCK_PTR && e->dest != EXIT_BLOCK_PTR + && any_condjump_p (e->src->end) + /* When called from cfglayout, fallthru edges do not + neccessarily go to the next block. */ + && e->src->next_bb == e->dest + && JUMP_LABEL (e->src->end) == e->dest->head) + { + rtx note; + edge b = unchecked_make_edge (e->src, target, 0); + + if (!redirect_jump (e->src->end, block_label (target), 0)) + abort (); + note = find_reg_note (e->src->end, REG_BR_PROB, NULL_RTX); + if (note) + { + int prob = INTVAL (XEXP (note, 0)); + + b->probability = prob; + b->count = e->count * prob / REG_BR_PROB_BASE; + e->probability -= e->probability; + e->count -= b->count; + if (e->probability < 0) + e->probability = 0; + if (e->count < 0) + e->count = 0; + } + } if (e->flags & EDGE_ABNORMAL) ! { ! /* Irritating special case - fallthru edge to the same block as abnormal ! edge. ! We can't redirect abnormal edge, but we still can split the fallthru ! one and create separate abnormal edge to original destination. ! This allows bb-reorder to make such edge non-fallthru. */ ! if (e->dest != target) ! abort (); ! abnormal_edge_flags = e->flags & ~(EDGE_FALLTHRU | EDGE_CAN_FALLTHRU); ! e->flags &= EDGE_FALLTHRU | EDGE_CAN_FALLTHRU; ! } else if (!(e->flags & EDGE_FALLTHRU)) abort (); else if (e->src == ENTRY_BLOCK_PTR) *************** force_nonfallthru_and_redirect (e, targe *** 934,947 **** /* We can't redirect the entry block. Create an empty block at the start of the function which we use to add the new jump. */ edge *pe1; ! basic_block bb = create_basic_block (0, e->dest->head, NULL); /* Change the existing edge's source to be the new block, and add a new edge from the entry block to the new block. */ e->src = bb; - bb->count = e->count; - bb->frequency = EDGE_FREQUENCY (e); - bb->loop_depth = 0; for (pe1 = &ENTRY_BLOCK_PTR->succ; *pe1; pe1 = &(*pe1)->succ_next) if (*pe1 == e) { --- 988,998 ---- /* We can't redirect the entry block. Create an empty block at the start of the function which we use to add the new jump. */ edge *pe1; ! basic_block bb = create_basic_block (e->dest->head, NULL, ENTRY_BLOCK_PTR); /* Change the existing edge's source to be the new block, and add a new edge from the entry block to the new block. */ e->src = bb; for (pe1 = &ENTRY_BLOCK_PTR->succ; *pe1; pe1 = &(*pe1)->succ_next) if (*pe1 == e) { *************** force_nonfallthru_and_redirect (e, targe *** 953,959 **** make_single_succ_edge (ENTRY_BLOCK_PTR, bb, EDGE_FALLTHRU); } ! if (e->src->succ->succ_next) { /* Create the new structures. */ --- 1004,1010 ---- make_single_succ_edge (ENTRY_BLOCK_PTR, bb, EDGE_FALLTHRU); } ! if (e->src->succ->succ_next || abnormal_edge_flags) { /* Create the new structures. */ *************** force_nonfallthru_and_redirect (e, targe *** 970,976 **** || GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_VEC)) note = NEXT_INSN (NEXT_INSN (note)); ! jump_block = create_basic_block (e->src->index + 1, note, NULL); jump_block->count = e->count; jump_block->frequency = EDGE_FREQUENCY (e); jump_block->loop_depth = target->loop_depth; --- 1021,1027 ---- || GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_VEC)) note = NEXT_INSN (NEXT_INSN (note)); ! jump_block = create_basic_block (note, NULL, e->src); jump_block->count = e->count; jump_block->frequency = EDGE_FREQUENCY (e); jump_block->loop_depth = target->loop_depth; *************** force_nonfallthru_and_redirect (e, targe *** 1020,1025 **** --- 1071,1079 ---- emit_barrier_after (jump_block->end); redirect_edge_succ_nodup (e, target); + if (abnormal_edge_flags) + make_edge (src, target, abnormal_edge_flags); + return new_bb; } *************** tidy_fallthru_edge (e, b, c) *** 1072,1079 **** So search through a sequence of barriers, labels, and notes for the head of block C and assert that we really do fall through. */ ! if (next_real_insn (b->end) != next_real_insn (PREV_INSN (c->head))) ! return; /* Remove what will soon cease being the jump insn from the source block. If block B consisted only of this single jump, turn it into a deleted --- 1126,1134 ---- So search through a sequence of barriers, labels, and notes for the head of block C and assert that we really do fall through. */ ! for (q = NEXT_INSN (b->end); q != c->head; q = NEXT_INSN (q)) ! if (INSN_P (q)) ! return; /* Remove what will soon cease being the jump insn from the source block. If block B consisted only of this single jump, turn it into a deleted *************** tidy_fallthru_edge (e, b, c) *** 1114,1127 **** void tidy_fallthru_edges () { ! int i; ! for (i = 1; i < n_basic_blocks; i++) { - basic_block b = BASIC_BLOCK (i - 1); - basic_block c = BASIC_BLOCK (i); edge s; /* We care about simple conditional or unconditional jumps with a single successor. --- 1169,1185 ---- void tidy_fallthru_edges () { ! basic_block b, c; ! if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR) ! return; ! ! FOR_BB_BETWEEN (b, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, next_bb) { edge s; + c = b->next_bb; + /* We care about simple conditional or unconditional jumps with a single successor. *************** back_edge_of_syntactic_loop_p (bb1, bb2) *** 1154,1165 **** { rtx insn; int count = 0; ! if (bb1->index > bb2->index) ! return false; ! else if (bb1->index == bb2->index) return true; for (insn = bb1->end; insn != bb2->head && count >= 0; insn = NEXT_INSN (insn)) if (GET_CODE (insn) == NOTE) --- 1212,1230 ---- { rtx insn; int count = 0; + basic_block bb; ! if (bb1 == bb2) return true; + /* ??? Could we guarantee that bb indices are monotone, so that we could + just compare them? */ + for (bb = bb1; bb && bb != bb2; bb = bb->next_bb) + continue; + + if (!bb) + return false; + for (insn = bb1->end; insn != bb2->head && count >= 0; insn = NEXT_INSN (insn)) if (GET_CODE (insn) == NOTE) *************** split_edge (edge_in) *** 1236,1246 **** else before = NULL_RTX; ! bb = create_basic_block (edge_in->dest == EXIT_BLOCK_PTR ? n_basic_blocks ! : edge_in->dest->index, before, NULL); bb->count = edge_in->count; bb->frequency = EDGE_FREQUENCY (edge_in); - bb->loop_depth = edge_in->dest->loop_depth; /* ??? This info is likely going to be out of date very soon. */ if (edge_in->dest->global_live_at_start) --- 1301,1309 ---- else before = NULL_RTX; ! bb = create_basic_block (before, NULL, edge_in->dest->prev_bb); bb->count = edge_in->count; bb->frequency = EDGE_FREQUENCY (edge_in); /* ??? This info is likely going to be out of date very soon. */ if (edge_in->dest->global_live_at_start) *************** insert_insn_on_edge (pattern, e) *** 1296,1389 **** /* Update the CFG for the instructions queued on edge E. */ static void ! commit_one_edge_insertion (e) edge e; { rtx before = NULL_RTX, after = NULL_RTX, insns, tmp, last; ! basic_block bb; /* Pull the insns off the edge now since the edge might go away. */ insns = e->insns; e->insns = NULL_RTX; ! /* Figure out where to put these things. If the destination has ! one predecessor, insert there. Except for the exit block. */ ! if (e->dest->pred->pred_next == NULL ! && e->dest != EXIT_BLOCK_PTR) { ! bb = e->dest; ! /* Get the location correct wrt a code label, and "nice" wrt ! a basic block note, and before everything else. */ ! tmp = bb->head; ! if (GET_CODE (tmp) == CODE_LABEL) ! tmp = NEXT_INSN (tmp); ! if (NOTE_INSN_BASIC_BLOCK_P (tmp)) ! tmp = NEXT_INSN (tmp); ! if (tmp == bb->head) ! before = tmp; ! else ! after = PREV_INSN (tmp); } ! ! /* If the source has one successor and the edge is not abnormal, ! insert there. Except for the entry block. */ ! else if ((e->flags & EDGE_ABNORMAL) == 0 ! && e->src->succ->succ_next == NULL ! && e->src != ENTRY_BLOCK_PTR) { ! bb = e->src; ! /* It is possible to have a non-simple jump here. Consider a target ! where some forms of unconditional jumps clobber a register. This ! happens on the fr30 for example. ! We know this block has a single successor, so we can just emit ! the queued insns before the jump. */ ! if (GET_CODE (bb->end) == JUMP_INSN) ! for (before = bb->end; ! GET_CODE (PREV_INSN (before)) == NOTE ! && NOTE_LINE_NUMBER (PREV_INSN (before)) == NOTE_INSN_LOOP_BEG; ! before = PREV_INSN (before)) ! ; ! else { ! /* We'd better be fallthru, or we've lost track of what's what. */ ! if ((e->flags & EDGE_FALLTHRU) == 0) ! abort (); after = bb->end; } } - /* Otherwise we must split the edge. */ - else - { - bb = split_edge (e); - after = bb->end; - } - /* Now that we've found the spot, do the insertion. */ if (before) { ! emit_insns_before (insns, before); last = prev_nonnote_insn (before); } else ! last = emit_insns_after (insns, after); if (returnjump_p (last)) { /* ??? Remove all outgoing edges from BB and add one for EXIT. This is not currently a problem because this only happens ! for the (single) epilogue, which already has a fallthru edge ! to EXIT. */ e = bb->succ; if (e->dest != EXIT_BLOCK_PTR ! || e->succ_next != NULL ! || (e->flags & EDGE_FALLTHRU) == 0) abort (); e->flags &= ~EDGE_FALLTHRU; --- 1359,1473 ---- /* Update the CFG for the instructions queued on edge E. */ static void ! commit_one_edge_insertion (e, watch_calls) edge e; + int watch_calls; { rtx before = NULL_RTX, after = NULL_RTX, insns, tmp, last; ! basic_block bb = NULL; /* Pull the insns off the edge now since the edge might go away. */ insns = e->insns; e->insns = NULL_RTX; ! /* Special case -- avoid inserting code between call and storing ! its return value. */ ! if (watch_calls && (e->flags & EDGE_FALLTHRU) && !e->dest->pred->pred_next ! && e->src != ENTRY_BLOCK_PTR ! && GET_CODE (e->src->end) == CALL_INSN) { ! rtx next = next_nonnote_insn (e->src->end); ! after = e->dest->head; ! /* The first insn after the call may be a stack pop, skip it. */ ! while (next ! && keep_with_call_p (next)) ! { ! after = next; ! next = next_nonnote_insn (next); ! } ! bb = e->dest; } ! if (!before && !after) { ! /* Figure out where to put these things. If the destination has ! one predecessor, insert there. Except for the exit block. */ ! if (e->dest->pred->pred_next == NULL && e->dest != EXIT_BLOCK_PTR) ! { ! bb = e->dest; ! /* Get the location correct wrt a code label, and "nice" wrt ! a basic block note, and before everything else. */ ! tmp = bb->head; ! if (GET_CODE (tmp) == CODE_LABEL) ! tmp = NEXT_INSN (tmp); ! if (NOTE_INSN_BASIC_BLOCK_P (tmp)) ! tmp = NEXT_INSN (tmp); ! if (tmp == bb->head) ! before = tmp; ! else if (tmp) ! after = PREV_INSN (tmp); ! else ! after = get_last_insn (); ! } ! /* If the source has one successor and the edge is not abnormal, ! insert there. Except for the entry block. */ ! else if ((e->flags & EDGE_ABNORMAL) == 0 ! && e->src->succ->succ_next == NULL ! && e->src != ENTRY_BLOCK_PTR) { ! bb = e->src; ! ! /* It is possible to have a non-simple jump here. Consider a target ! where some forms of unconditional jumps clobber a register. This ! happens on the fr30 for example. + We know this block has a single successor, so we can just emit + the queued insns before the jump. */ + if (GET_CODE (bb->end) == JUMP_INSN) + for (before = bb->end; + GET_CODE (PREV_INSN (before)) == NOTE + && NOTE_LINE_NUMBER (PREV_INSN (before)) == + NOTE_INSN_LOOP_BEG; before = PREV_INSN (before)) + ; + else + { + /* We'd better be fallthru, or we've lost track of what's what. */ + if ((e->flags & EDGE_FALLTHRU) == 0) + abort (); + + after = bb->end; + } + } + /* Otherwise we must split the edge. */ + else + { + bb = split_edge (e); after = bb->end; } } /* Now that we've found the spot, do the insertion. */ if (before) { ! emit_insn_before (insns, before); last = prev_nonnote_insn (before); } else ! last = emit_insn_after (insns, after); if (returnjump_p (last)) { /* ??? Remove all outgoing edges from BB and add one for EXIT. This is not currently a problem because this only happens ! for the (single) epilogue, which already has a fallthru edge ! to EXIT. */ e = bb->succ; if (e->dest != EXIT_BLOCK_PTR ! || e->succ_next != NULL || (e->flags & EDGE_FALLTHRU) == 0) abort (); e->flags &= ~EDGE_FALLTHRU; *************** commit_one_edge_insertion (e) *** 1395,1401 **** else if (GET_CODE (last) == JUMP_INSN) abort (); ! find_sub_basic_blocks (bb); } /* Update the CFG for all queued instructions. */ --- 1479,1486 ---- else if (GET_CODE (last) == JUMP_INSN) abort (); ! /* Mark the basic block for find_sub_basic_blocks. */ ! bb->aux = &bb->aux; } /* Update the CFG for all queued instructions. */ *************** commit_one_edge_insertion (e) *** 1403,1418 **** void commit_edge_insertions () { - int i; basic_block bb; #ifdef ENABLE_CHECKING verify_flow_info (); #endif ! i = -1; ! bb = ENTRY_BLOCK_PTR; ! while (1) { edge e, next; --- 1488,1502 ---- void commit_edge_insertions () { basic_block bb; + sbitmap blocks; + bool changed = false; #ifdef ENABLE_CHECKING verify_flow_info (); #endif ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { edge e, next; *************** commit_edge_insertions () *** 1420,1432 **** { next = e->succ_next; if (e->insns) ! commit_one_edge_insertion (e); } ! if (++i >= n_basic_blocks) ! break; ! bb = BASIC_BLOCK (i); } } /* Print out one basic block with live information at start and end. */ --- 1504,1573 ---- { next = e->succ_next; if (e->insns) ! { ! changed = true; ! commit_one_edge_insertion (e, false); ! } } + } ! if (!changed) ! return; ! ! blocks = sbitmap_alloc (last_basic_block); ! sbitmap_zero (blocks); ! FOR_EACH_BB (bb) ! if (bb->aux) ! { ! SET_BIT (blocks, bb->index); ! bb->aux = NULL; ! } ! find_many_sub_basic_blocks (blocks); ! sbitmap_free (blocks); ! } ! ! /* Update the CFG for all queued instructions, taking special care of inserting ! code on edges between call and storing its return value. */ ! ! void ! commit_edge_insertions_watch_calls () ! { ! basic_block bb; ! sbitmap blocks; ! bool changed = false; ! ! #ifdef ENABLE_CHECKING ! verify_flow_info (); ! #endif ! ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) ! { ! edge e, next; ! ! for (e = bb->succ; e; e = next) ! { ! next = e->succ_next; ! if (e->insns) ! { ! changed = true; ! commit_one_edge_insertion (e, true); ! } ! } } + + if (!changed) + return; + + blocks = sbitmap_alloc (last_basic_block); + sbitmap_zero (blocks); + FOR_EACH_BB (bb) + if (bb->aux) + { + SET_BIT (blocks, bb->index); + bb->aux = NULL; + } + find_many_sub_basic_blocks (blocks); + sbitmap_free (blocks); } /* Print out one basic block with live information at start and end. */ *************** print_rtl_with_bb (outf, rtx_first) *** 1496,1502 **** fprintf (outf, "(nil)\n"); else { - int i; enum bb_state { NOT_IN_BB, IN_ONE_BB, IN_MULTIPLE_BB }; int max_uid = get_max_uid (); basic_block *start --- 1637,1642 ---- *************** print_rtl_with_bb (outf, rtx_first) *** 1506,1514 **** enum bb_state *in_bb_p = (enum bb_state *) xcalloc (max_uid, sizeof (enum bb_state)); ! for (i = n_basic_blocks - 1; i >= 0; i--) { - basic_block bb = BASIC_BLOCK (i); rtx x; start[INSN_UID (bb->head)] = bb; --- 1646,1655 ---- enum bb_state *in_bb_p = (enum bb_state *) xcalloc (max_uid, sizeof (enum bb_state)); ! basic_block bb; ! ! FOR_EACH_BB_REVERSE (bb) { rtx x; start[INSN_UID (bb->head)] = bb; *************** print_rtl_with_bb (outf, rtx_first) *** 1529,1535 **** for (tmp_rtx = rtx_first; NULL != tmp_rtx; tmp_rtx = NEXT_INSN (tmp_rtx)) { int did_output; - basic_block bb; if ((bb = start[INSN_UID (tmp_rtx)]) != NULL) { --- 1670,1675 ---- *************** verify_flow_info () *** 1616,1631 **** basic_block *bb_info, *last_visited; size_t *edge_checksum; rtx x; ! int i, last_bb_num_seen, num_bb_notes, err = 0; bb_info = (basic_block *) xcalloc (max_uid, sizeof (basic_block)); ! last_visited = (basic_block *) xcalloc (n_basic_blocks + 2, sizeof (basic_block)); ! edge_checksum = (size_t *) xcalloc (n_basic_blocks + 2, sizeof (size_t)); ! for (i = n_basic_blocks - 1; i >= 0; i--) { - basic_block bb = BASIC_BLOCK (i); rtx head = bb->head; rtx end = bb->end; --- 1756,1792 ---- basic_block *bb_info, *last_visited; size_t *edge_checksum; rtx x; ! int num_bb_notes, err = 0; ! basic_block bb, last_bb_seen; bb_info = (basic_block *) xcalloc (max_uid, sizeof (basic_block)); ! last_visited = (basic_block *) xcalloc (last_basic_block + 2, sizeof (basic_block)); ! edge_checksum = (size_t *) xcalloc (last_basic_block + 2, sizeof (size_t)); ! /* Check bb chain & numbers. */ ! last_bb_seen = ENTRY_BLOCK_PTR; ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR->next_bb, NULL, next_bb) ! { ! if (bb != EXIT_BLOCK_PTR ! && bb != BASIC_BLOCK (bb->index)) ! { ! error ("bb %d on wrong place", bb->index); ! err = 1; ! } ! ! if (bb->prev_bb != last_bb_seen) ! { ! error ("prev_bb of %d should be %d, not %d", ! bb->index, last_bb_seen->index, bb->prev_bb->index); ! err = 1; ! } ! ! last_bb_seen = bb; ! } ! ! FOR_EACH_BB_REVERSE (bb) { rtx head = bb->head; rtx end = bb->end; *************** verify_flow_info () *** 1671,1682 **** } /* Now check the basic blocks (boundaries etc.) */ ! for (i = n_basic_blocks - 1; i >= 0; i--) { ! basic_block bb = BASIC_BLOCK (i); ! int has_fallthru = 0; edge e; for (e = bb->succ; e; e = e->succ_next) { if (last_visited [e->dest->index + 2] == bb) --- 1832,1867 ---- } /* Now check the basic blocks (boundaries etc.) */ ! FOR_EACH_BB_REVERSE (bb) { ! int n_fallthru = 0, n_eh = 0, n_call = 0, n_abnormal = 0, n_branch = 0; edge e; + rtx note; + if (INSN_P (bb->end) + && (note = find_reg_note (bb->end, REG_BR_PROB, NULL_RTX)) + && bb->succ && bb->succ->succ_next + && any_condjump_p (bb->end)) + { + if (INTVAL (XEXP (note, 0)) != BRANCH_EDGE (bb)->probability) + { + error ("verify_flow_info: REG_BR_PROB does not match cfg %i %i", + INTVAL (XEXP (note, 0)), BRANCH_EDGE (bb)->probability); + err = 1; + } + } + if (bb->count < 0) + { + error ("verify_flow_info: Wrong count of block %i %i", + bb->index, (int)bb->count); + err = 1; + } + if (bb->frequency < 0) + { + error ("verify_flow_info: Wrong frequency of block %i %i", + bb->index, bb->frequency); + err = 1; + } for (e = bb->succ; e; e = e->succ_next) { if (last_visited [e->dest->index + 2] == bb) *************** verify_flow_info () *** 1685,1695 **** e->src->index, e->dest->index); err = 1; } last_visited [e->dest->index + 2] = bb; if (e->flags & EDGE_FALLTHRU) ! has_fallthru = 1; if ((e->flags & EDGE_FALLTHRU) && e->src != ENTRY_BLOCK_PTR --- 1870,1903 ---- e->src->index, e->dest->index); err = 1; } + if (e->probability < 0 || e->probability > REG_BR_PROB_BASE) + { + error ("verify_flow_info: Wrong probability of edge %i->%i %i", + e->src->index, e->dest->index, e->probability); + err = 1; + } + if (e->count < 0) + { + error ("verify_flow_info: Wrong count of edge %i->%i %i", + e->src->index, e->dest->index, (int)e->count); + err = 1; + } last_visited [e->dest->index + 2] = bb; if (e->flags & EDGE_FALLTHRU) ! n_fallthru++; ! ! if ((e->flags & ~EDGE_DFS_BACK) == 0) ! n_branch++; ! ! if (e->flags & EDGE_ABNORMAL_CALL) ! n_call++; ! ! if (e->flags & EDGE_EH) ! n_eh++; ! else if (e->flags & EDGE_ABNORMAL) ! n_abnormal++; if ((e->flags & EDGE_FALLTHRU) && e->src != ENTRY_BLOCK_PTR *************** verify_flow_info () *** 1697,1703 **** { rtx insn; ! if (e->src->index + 1 != e->dest->index) { error ("verify_flow_info: Incorrect blocks for fallthru %i->%i", --- 1905,1911 ---- { rtx insn; ! if (e->src->next_bb != e->dest) { error ("verify_flow_info: Incorrect blocks for fallthru %i->%i", *************** verify_flow_info () *** 1737,1743 **** edge_checksum[e->dest->index + 2] += (size_t) e; } ! if (!has_fallthru) { rtx insn; --- 1945,1996 ---- edge_checksum[e->dest->index + 2] += (size_t) e; } ! if (n_eh && GET_CODE (PATTERN (bb->end)) != RESX ! && !find_reg_note (bb->end, REG_EH_REGION, NULL_RTX)) ! { ! error ("Missing REG_EH_REGION note in the end of bb %i", bb->index); ! err = 1; ! } ! if (n_branch ! && (GET_CODE (bb->end) != JUMP_INSN ! || (n_branch > 1 && (any_uncondjump_p (bb->end) ! || any_condjump_p (bb->end))))) ! { ! error ("Too many outgoing branch edges from bb %i", bb->index); ! err = 1; ! } ! if (n_fallthru && any_uncondjump_p (bb->end)) ! { ! error ("Fallthru edge after unconditional jump %i", bb->index); ! err = 1; ! } ! if (n_branch != 1 && any_uncondjump_p (bb->end)) ! { ! error ("Wrong amount of branch edges after unconditional jump %i", bb->index); ! err = 1; ! } ! if (n_branch != 1 && any_condjump_p (bb->end) ! && JUMP_LABEL (bb->end) != bb->next_bb->head) ! { ! error ("Wrong amount of branch edges after conditional jump %i", bb->index); ! err = 1; ! } ! if (n_call && GET_CODE (bb->end) != CALL_INSN) ! { ! error ("Call edges for non-call insn in bb %i", bb->index); ! err = 1; ! } ! if (n_abnormal ! && (GET_CODE (bb->end) != CALL_INSN && n_call != n_abnormal) ! && (GET_CODE (bb->end) != JUMP_INSN ! || any_condjump_p (bb->end) ! || any_uncondjump_p (bb->end))) ! { ! error ("Abnormal edges for no purpose in bb %i", bb->index); ! err = 1; ! } ! ! if (!n_fallthru) { rtx insn; *************** verify_flow_info () *** 1770,1776 **** } for (x = bb->head; x != NEXT_INSN (bb->end); x = NEXT_INSN (x)) ! if (basic_block_for_insn && BLOCK_FOR_INSN (x) != bb) { debug_rtx (x); if (! BLOCK_FOR_INSN (x)) --- 2023,2029 ---- } for (x = bb->head; x != NEXT_INSN (bb->end); x = NEXT_INSN (x)) ! if (BLOCK_FOR_INSN (x) != bb) { debug_rtx (x); if (! BLOCK_FOR_INSN (x)) *************** verify_flow_info () *** 1845,1870 **** edge_checksum[e->dest->index + 2] -= (size_t) e; } ! for (i = -2; i < n_basic_blocks; ++i) ! if (edge_checksum[i + 2]) { ! error ("basic block %i edge lists are corrupted", i); err = 1; } - last_bb_num_seen = -1; num_bb_notes = 0; for (x = rtx_first; x; x = NEXT_INSN (x)) { if (NOTE_INSN_BASIC_BLOCK_P (x)) { ! basic_block bb = NOTE_BASIC_BLOCK (x); num_bb_notes++; ! if (bb->index != last_bb_num_seen + 1) internal_error ("basic blocks not numbered consecutively"); ! last_bb_num_seen = bb->index; } if (!bb_info[INSN_UID (x)]) --- 2098,2124 ---- edge_checksum[e->dest->index + 2] -= (size_t) e; } ! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) ! if (edge_checksum[bb->index + 2]) { ! error ("basic block %i edge lists are corrupted", bb->index); err = 1; } num_bb_notes = 0; + last_bb_seen = ENTRY_BLOCK_PTR; + for (x = rtx_first; x; x = NEXT_INSN (x)) { if (NOTE_INSN_BASIC_BLOCK_P (x)) { ! bb = NOTE_BASIC_BLOCK (x); num_bb_notes++; ! if (bb != last_bb_seen->next_bb) internal_error ("basic blocks not numbered consecutively"); ! last_bb_seen = bb; } if (!bb_info[INSN_UID (x)]) *************** purge_dead_edges (bb) *** 1936,1953 **** remove_note (insn, note); } ! /* Cleanup abnormal edges caused by throwing insns that have been ! eliminated. */ ! if (! can_throw_internal (bb->end)) ! for (e = bb->succ; e; e = next) ! { ! next = e->succ_next; ! if (e->flags & EDGE_EH) ! { ! remove_edge (e); ! purged = true; ! } ! } if (GET_CODE (insn) == JUMP_INSN) { --- 2190,2218 ---- remove_note (insn, note); } ! /* Cleanup abnormal edges caused by exceptions or non-local gotos. */ ! for (e = bb->succ; e; e = next) ! { ! next = e->succ_next; ! if (e->flags & EDGE_EH) ! { ! if (can_throw_internal (bb->end)) ! continue; ! } ! else if (e->flags & EDGE_ABNORMAL_CALL) ! { ! if (GET_CODE (bb->end) == CALL_INSN ! && (! (note = find_reg_note (insn, REG_EH_REGION, NULL)) ! || INTVAL (XEXP (note, 0)) >= 0)) ! continue; ! } ! else ! continue; ! ! remove_edge (e); ! bb->flags |= BB_DIRTY; ! purged = true; ! } if (GET_CODE (insn) == JUMP_INSN) { *************** purge_dead_edges (bb) *** 1958,1964 **** if (!any_condjump_p (insn) && !returnjump_p (insn) && !simplejump_p (insn)) ! return false; for (e = bb->succ; e; e = next) { --- 2223,2240 ---- if (!any_condjump_p (insn) && !returnjump_p (insn) && !simplejump_p (insn)) ! return purged; ! ! /* Branch probability/prediction notes are defined only for ! condjumps. We've possibly turned condjump into simplejump. */ ! if (simplejump_p (insn)) ! { ! note = find_reg_note (insn, REG_BR_PROB, NULL); ! if (note) ! remove_note (insn, note); ! while ((note = find_reg_note (insn, REG_BR_PRED, NULL))) ! remove_note (insn, note); ! } for (e = bb->succ; e; e = next) { *************** purge_dead_edges (bb) *** 1966,1972 **** /* Avoid abnormal flags to leak from computed jumps turned into simplejumps. */ ! e->flags &= ~EDGE_ABNORMAL; /* See if this edge is one we should keep. */ --- 2242,2248 ---- /* Avoid abnormal flags to leak from computed jumps turned into simplejumps. */ ! e->flags &= ~EDGE_ABNORMAL; /* See if this edge is one we should keep. */ *************** purge_dead_edges (bb) *** 1989,2000 **** continue; /* We do not need this edge. */ purged = true; remove_edge (e); } if (!bb->succ || !purged) ! return false; if (rtl_dump_file) fprintf (rtl_dump_file, "Purged edges from bb %i\n", bb->index); --- 2265,2277 ---- continue; /* We do not need this edge. */ + bb->flags |= BB_DIRTY; purged = true; remove_edge (e); } if (!bb->succ || !purged) ! return purged; if (rtl_dump_file) fprintf (rtl_dump_file, "Purged edges from bb %i\n", bb->index); *************** purge_dead_edges (bb) *** 2007,2013 **** { bb->succ->probability = REG_BR_PROB_BASE; bb->succ->count = bb->count; ! } else { note = find_reg_note (insn, REG_BR_PROB, NULL); --- 2284,2290 ---- { bb->succ->probability = REG_BR_PROB_BASE; bb->succ->count = bb->count; ! } else { note = find_reg_note (insn, REG_BR_PROB, NULL); *************** purge_dead_edges (bb) *** 2041,2047 **** { next = e->succ_next; if (!(e->flags & EDGE_FALLTHRU)) ! remove_edge (e), purged = true; } if (!bb->succ || bb->succ->succ_next) --- 2318,2328 ---- { next = e->succ_next; if (!(e->flags & EDGE_FALLTHRU)) ! { ! bb->flags |= BB_DIRTY; ! remove_edge (e); ! purged = true; ! } } if (!bb->succ || bb->succ->succ_next) *************** bool *** 2063,2084 **** purge_all_dead_edges (update_life_p) int update_life_p; { ! int i, purged = false; sbitmap blocks = 0; if (update_life_p) { ! blocks = sbitmap_alloc (n_basic_blocks); sbitmap_zero (blocks); } ! for (i = 0; i < n_basic_blocks; i++) { ! bool purged_here = purge_dead_edges (BASIC_BLOCK (i)); purged |= purged_here; if (purged_here && update_life_p) ! SET_BIT (blocks, i); } if (update_life_p && purged) --- 2344,2366 ---- purge_all_dead_edges (update_life_p) int update_life_p; { ! int purged = false; sbitmap blocks = 0; + basic_block bb; if (update_life_p) { ! blocks = sbitmap_alloc (last_basic_block); sbitmap_zero (blocks); } ! FOR_EACH_BB (bb) { ! bool purged_here = purge_dead_edges (bb); purged |= purged_here; if (purged_here && update_life_p) ! SET_BIT (blocks, bb->index); } if (update_life_p && purged) diff -Nrc3pad gcc-3.2.3/gcc/c-format.c gcc-3.3/gcc/c-format.c *** gcc-3.2.3/gcc/c-format.c 2002-12-01 18:19:09.000000000 +0000 --- gcc-3.3/gcc/c-format.c 2002-12-01 17:51:44.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 27,57 **** #include "c-common.h" #include "intl.h" #include "diagnostic.h" ! - /* Command line options and their associated flags. */ - - /* Warn about format/argument anomalies in calls to formatted I/O functions - (*printf, *scanf, strftime, strfmon, etc.). */ - - int warn_format; - - /* Warn about Y2K problems with strftime formats. */ - - int warn_format_y2k; - - /* Warn about excess arguments to formats. */ - - int warn_format_extra_args; - - /* Warn about non-literal format arguments. */ - - int warn_format_nonliteral; - - /* Warn about possible security problems with calls to format functions. */ - - int warn_format_security; - /* Set format warning options according to a -Wformat=n option. */ void --- 27,34 ---- #include "c-common.h" #include "intl.h" #include "diagnostic.h" ! #include "langhooks.h" /* Set format warning options according to a -Wformat=n option. */ void *************** set_Wformat (setting) *** 61,71 **** --- 38,52 ---- warn_format = setting; warn_format_y2k = setting; warn_format_extra_args = setting; + warn_format_zero_length = setting; if (setting != 1) { warn_format_nonliteral = setting; warn_format_security = setting; } + /* Make sure not to disable -Wnonnull if -Wformat=0 is specified. */ + if (setting) + warn_nonnull = setting; } *************** decode_format_attr (args, info, validate *** 305,311 **** /* Check a call to a format function against a parameter list. */ ! /* The meaningfully distinct length modifiers for format checking recognised by GCC. */ enum format_lengths { --- 286,292 ---- /* Check a call to a format function against a parameter list. */ ! /* The meaningfully distinct length modifiers for format checking recognized by GCC. */ enum format_lengths { *************** enum format_std_version *** 348,354 **** ? "ISO C++" \ : ((FEATURE_VER) == STD_EXT \ ? "ISO C" \ ! : "ISO C89")) /* Adjust a C standard version, which may be STD_C9L, to account for -Wno-long-long. Returns other standard versions unchanged. */ #define ADJ_STD(VER) ((int)((VER) == STD_C9L \ --- 329,335 ---- ? "ISO C++" \ : ((FEATURE_VER) == STD_EXT \ ? "ISO C" \ ! : "ISO C90")) /* Adjust a C standard version, which may be STD_C9L, to account for -Wno-long-long. Returns other standard versions unchanged. */ #define ADJ_STD(VER) ((int)((VER) == STD_C9L \ *************** typedef struct *** 458,464 **** /* The flag character in question (0 for end of array). */ const int flag_char; /* Zero if this entry describes the flag character in general, or a ! non-zero character that may be found in flags2 if it describes the flag when used with certain formats only. If the latter, only the first such entry found that applies to the current conversion specifier is used; the values of `name' and `long_name' it supplies --- 439,445 ---- /* The flag character in question (0 for end of array). */ const int flag_char; /* Zero if this entry describes the flag character in general, or a ! nonzero character that may be found in flags2 if it describes the flag when used with certain formats only. If the latter, only the first such entry found that applies to the current conversion specifier is used; the values of `name' and `long_name' it supplies *************** typedef struct *** 488,498 **** const int flag_char1; /* The second flag character. */ const int flag_char2; ! /* Non-zero if the message should say that the first flag is ignored with the second, zero if the combination should simply be objected to. */ const int ignored; /* Zero if this entry applies whenever this flag combination occurs, ! a non-zero character from flags2 if it only applies in some circumstances (e.g. 'i' for printf formats ignoring 0 with precision). */ const int predicate; } format_flag_pair; --- 469,479 ---- const int flag_char1; /* The second flag character. */ const int flag_char2; ! /* Nonzero if the message should say that the first flag is ignored with the second, zero if the combination should simply be objected to. */ const int ignored; /* Zero if this entry applies whenever this flag combination occurs, ! a nonzero character from flags2 if it only applies in some circumstances (e.g. 'i' for printf formats ignoring 0 with precision). */ const int predicate; } format_flag_pair; *************** static const format_flag_pair strfmon_fl *** 709,715 **** #define T_I &integer_type_node #define T89_I { STD_C89, NULL, T_I } - #define T99_I { STD_C99, NULL, T_I } #define T_L &long_integer_type_node #define T89_L { STD_C89, NULL, T_L } #define T_LL &long_long_integer_type_node --- 690,695 ---- *************** static const format_flag_pair strfmon_fl *** 719,725 **** #define T89_S { STD_C89, NULL, T_S } #define T_UI &unsigned_type_node #define T89_UI { STD_C89, NULL, T_UI } - #define T99_UI { STD_C99, NULL, T_UI } #define T_UL &long_unsigned_type_node #define T89_UL { STD_C89, NULL, T_UL } #define T_ULL &long_long_unsigned_type_node --- 699,704 ---- *************** typedef struct *** 895,904 **** int number_other; } format_check_results; static void check_format_info PARAMS ((int *, function_format_info *, tree)); ! static void check_format_info_recurse PARAMS ((int *, format_check_results *, ! function_format_info *, tree, ! tree, unsigned HOST_WIDE_INT)); static void check_format_info_main PARAMS ((int *, format_check_results *, function_format_info *, const char *, int, tree, --- 874,889 ---- int number_other; } format_check_results; + typedef struct + { + format_check_results *res; + function_format_info *info; + tree params; + int *status; + } format_check_context; + static void check_format_info PARAMS ((int *, function_format_info *, tree)); ! static void check_format_arg PARAMS ((void *, tree, unsigned HOST_WIDE_INT)); static void check_format_info_main PARAMS ((int *, format_check_results *, function_format_info *, const char *, int, tree, *************** check_function_format (status, attrs, pa *** 1011,1017 **** static void status_warning VPARAMS ((int *status, const char *msgid, ...)) { ! diagnostic_context dc; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, int *, status); --- 996,1002 ---- static void status_warning VPARAMS ((int *status, const char *msgid, ...)) { ! diagnostic_info diagnostic ; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, int *, status); *************** status_warning VPARAMS ((int *status, co *** 1022,1030 **** else { /* This duplicates the warning function behavior. */ ! set_diagnostic_context ! (&dc, msgid, &ap, input_filename, lineno, /* warn = */ 1); ! report_diagnostic (&dc); } VA_CLOSE (ap); --- 1007,1015 ---- else { /* This duplicates the warning function behavior. */ ! diagnostic_set_info (&diagnostic, _(msgid), &ap, input_filename, lineno, ! DK_WARNING); ! report_diagnostic (&diagnostic); } VA_CLOSE (ap); *************** check_format_info (status, info, params) *** 1289,1294 **** --- 1274,1280 ---- function_format_info *info; tree params; { + format_check_context format_ctx; unsigned HOST_WIDE_INT arg_num; tree format_tree; format_check_results res; *************** check_format_info (status, info, params) *** 1315,1321 **** res.number_unterminated = 0; res.number_other = 0; ! check_format_info_recurse (status, &res, info, format_tree, params, arg_num); if (res.number_non_literal > 0) { --- 1301,1313 ---- res.number_unterminated = 0; res.number_other = 0; ! format_ctx.res = &res; ! format_ctx.info = info; ! format_ctx.params = params; ! format_ctx.status = status; ! ! check_function_arguments_recurse (check_format_arg, &format_ctx, ! format_tree, arg_num); if (res.number_non_literal > 0) { *************** check_format_info (status, info, params) *** 1361,1368 **** && res.number_other == 0 && warn_format_extra_args) status_warning (status, "unused arguments in $-style format"); if (res.number_empty > 0 && res.number_non_literal == 0 ! && res.number_other == 0) ! status_warning (status, "zero-length format string"); if (res.number_wide > 0) status_warning (status, "format is a wide character string"); --- 1353,1361 ---- && res.number_other == 0 && warn_format_extra_args) status_warning (status, "unused arguments in $-style format"); if (res.number_empty > 0 && res.number_non_literal == 0 ! && res.number_other == 0 && warn_format_zero_length) ! status_warning (status, "zero-length %s format string", ! format_types[info->format_type].name); if (res.number_wide > 0) status_warning (status, "format is a wide character string"); *************** check_format_info (status, info, params) *** 1371,1482 **** status_warning (status, "unterminated format string"); } ! ! /* Recursively check a call to a format function. FORMAT_TREE is the ! format parameter, which may be a conditional expression in which ! both halves should be checked. ARG_NUM is the number of the ! format argument; PARAMS points just after it in the argument list. */ static void ! check_format_info_recurse (status, res, info, format_tree, params, arg_num) ! int *status; ! format_check_results *res; ! function_format_info *info; tree format_tree; - tree params; unsigned HOST_WIDE_INT arg_num; { int format_length; HOST_WIDE_INT offset; const char *format_chars; tree array_size = 0; tree array_init; - if (TREE_CODE (format_tree) == NOP_EXPR) - { - /* Strip coercion. */ - check_format_info_recurse (status, res, info, - TREE_OPERAND (format_tree, 0), params, - arg_num); - return; - } - - if (TREE_CODE (format_tree) == CALL_EXPR) - { - tree type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (format_tree, 0))); - tree attrs; - bool found_format_arg = false; - - /* See if this is a call to a known internationalization function - that modifies the format arg. Such a function may have multiple - format_arg attributes (for example, ngettext). */ - - for (attrs = TYPE_ATTRIBUTES (type); - attrs; - attrs = TREE_CHAIN (attrs)) - if (is_attribute_p ("format_arg", TREE_PURPOSE (attrs))) - { - tree inner_args; - tree format_num_expr; - int format_num; - int i; - - /* Extract the argument number, which was previously checked - to be valid. */ - format_num_expr = TREE_VALUE (TREE_VALUE (attrs)); - while (TREE_CODE (format_num_expr) == NOP_EXPR - || TREE_CODE (format_num_expr) == CONVERT_EXPR - || TREE_CODE (format_num_expr) == NON_LVALUE_EXPR) - format_num_expr = TREE_OPERAND (format_num_expr, 0); - - if (TREE_CODE (format_num_expr) != INTEGER_CST - || TREE_INT_CST_HIGH (format_num_expr) != 0) - abort (); - - format_num = TREE_INT_CST_LOW (format_num_expr); - - for (inner_args = TREE_OPERAND (format_tree, 1), i = 1; - inner_args != 0; - inner_args = TREE_CHAIN (inner_args), i++) - if (i == format_num) - { - check_format_info_recurse (status, res, info, - TREE_VALUE (inner_args), params, - arg_num); - found_format_arg = true; - break; - } - } - - /* If we found a format_arg attribute and did a recursive check, - we are done with checking this format string. Otherwise, we - continue and this will count as a non-literal format string. */ - if (found_format_arg) - return; - } - - if (TREE_CODE (format_tree) == COND_EXPR) - { - /* Check both halves of the conditional expression. */ - check_format_info_recurse (status, res, info, - TREE_OPERAND (format_tree, 1), params, - arg_num); - check_format_info_recurse (status, res, info, - TREE_OPERAND (format_tree, 2), params, - arg_num); - return; - } - if (integer_zerop (format_tree)) { - /* FIXME: this warning should go away once Marc Espie's - __attribute__((nonnull)) patch is in. Instead, checking for - nonnull attributes should probably change this function to act - specially if info == NULL and add a res->number_null entry for - that case, or maybe add a function pointer to be called at - the end instead of hardcoding check_format_info_main. */ - status_warning (status, "null format string"); - /* Skip to first argument to check, so we can see if this format has any arguments (it shouldn't). */ while (arg_num + 1 < info->first_arg_num) --- 1364,1394 ---- status_warning (status, "unterminated format string"); } ! /* Callback from check_function_arguments_recurse to check a ! format string. FORMAT_TREE is the format parameter. ARG_NUM ! is the number of the format argument. CTX points to a ! format_check_context. */ static void ! check_format_arg (ctx, format_tree, arg_num) ! void *ctx; tree format_tree; unsigned HOST_WIDE_INT arg_num; { + format_check_context *format_ctx = ctx; + format_check_results *res = format_ctx->res; + function_format_info *info = format_ctx->info; + tree params = format_ctx->params; + int *status = format_ctx->status; + int format_length; HOST_WIDE_INT offset; const char *format_chars; tree array_size = 0; tree array_init; if (integer_zerop (format_tree)) { /* Skip to first argument to check, so we can see if this format has any arguments (it shouldn't). */ while (arg_num + 1 < info->first_arg_num) *************** check_format_info_main (status, res, inf *** 1751,1761 **** /* "...a field width...may be indicated by an asterisk. In this case, an int argument supplies the field width..." */ ++format_chars; - if (params == 0) - { - status_warning (status, "too few arguments for format"); - return; - } if (has_operand_number != 0) { int opnum; --- 1663,1668 ---- *************** check_format_info_main (status, res, inf *** 1775,1780 **** --- 1682,1692 ---- } if (info->first_arg_num != 0) { + if (params == 0) + { + status_warning (status, "too few arguments for format"); + return; + } cur_param = TREE_VALUE (params); if (has_operand_number <= 0) { *************** check_format_types (status, types) *** 2258,2264 **** tree cur_type; tree orig_cur_type; tree wanted_type; - tree promoted_type; int arg_num; int i; int char_type_flag; --- 2170,2175 ---- *************** check_format_types (status, types) *** 2277,2287 **** abort (); if (types->pointer_count == 0) ! { ! promoted_type = simple_type_promotes_to (wanted_type); ! if (promoted_type != NULL_TREE) ! wanted_type = promoted_type; ! } STRIP_NOPS (cur_param); --- 2188,2194 ---- abort (); if (types->pointer_count == 0) ! wanted_type = (*lang_hooks.types.type_promotes_to) (wanted_type); STRIP_NOPS (cur_param); *************** check_format_types (status, types) *** 2386,2393 **** && TREE_CODE (cur_type) == INTEGER_TYPE && (! pedantic || i == 0 || (i == 1 && char_type_flag)) && (TREE_UNSIGNED (wanted_type) ! ? wanted_type == unsigned_type (cur_type) ! : wanted_type == signed_type (cur_type))) continue; /* Likewise, "signed char", "unsigned char" and "char" are equivalent but the above test won't consider them equivalent. */ --- 2293,2300 ---- && TREE_CODE (cur_type) == INTEGER_TYPE && (! pedantic || i == 0 || (i == 1 && char_type_flag)) && (TREE_UNSIGNED (wanted_type) ! ? wanted_type == c_common_unsigned_type (cur_type) ! : wanted_type == c_common_signed_type (cur_type))) continue; /* Likewise, "signed char", "unsigned char" and "char" are equivalent but the above test won't consider them equivalent. */ diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog gcc-3.3/gcc/ChangeLog *** gcc-3.2.3/gcc/ChangeLog 2003-04-22 06:14:38.000000000 +0000 --- gcc-3.3/gcc/ChangeLog 2003-05-14 00:09:31.000000000 +0000 *************** *** 1,24 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. 2003-04-16 John David Anglin PR/10271 * pa-protos.h (function_arg): Remove last argument. * pa.c (function_arg): Likewise. Use CUMULATIVE_ARGS struct instead. ! * pa.h (struct hppa_args): Add member incoming. (INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Initialize member incoming. (FUNCTION_ARG): Revise call to function_arg. (FUNCTION_INCOMING_ARG): Delete. 2003-04-15 Jason Merrill PR middle-end/10336, c++/10401 ! * jump.c (never_reached_warning): Also stop looking if we reach the beginning of the function. 2003-04-14 Hans-Peter Nilsson PR target/10377 --- 1,544 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-12 Mark Mitchell ! ! PR other/10745 ! * configure.in: Correct detection of GNU ld version number. ! * configure: Regenerated. ! ! 2003-05-08 J"orn Rennecke ! ! * sh.c (gen_block_redirect, split_branches): Use ! CODE_FOR_jump_compact instead of CODE_FOR_jump ! ! 2003-05-06 Eric Christopher ! ! * config/mips/linux.h: Fix typo. ! ! 2003-05-06 Ulrich Weigand ! ! PR other/10650 ! * unwind-dw2.c (uw_update_context_1): Don't set sp as cfa on s390. ! (uw_init_context_1): Set initial sp to outer cfa on s390. ! ! 2003-05-06 Mark Mitchell ! ! PR other/10658 ! * gcc.c (process_command): Update copyright date. ! ! 2003-05-06 Bruce Korb ! ! * inclhack.def: fix up whitespace differences from mainline. ! mark fix tests that fail on BSD systems (like mainline). ! Fixup the solaris_mutex_init test to cope with Sol. 2.6 (like mainline). ! Removed unused SONY commentary (its obsolete anyway). ! (svr4_mach_defines): remove i860 machine from comment (like mainline). ! * gcc/fixinc/tests/base/pthread.h: solaris_mutex_init fix tests ! * gcc/fixinc/tests/base/testing.h: remove ^M chars from some mistake ! * gcc/fixinc/tests/base/Xm/Traversal.h: accommodate BSD's sed ! * gcc/fixinc/tests/base/sys/stat.h: accommodate BSD's sed ! * gcc/fixinc/fixincl.x: regenerated ! ! 2003-05-06 Phil Edwards ! ! * doc/install.texi (mips-*-*): Add note about libstdc++. ! ! 2003-05-05 Mark Mitchell ! Kean Johnston ! ! * toplev.c (check_global_declarations): Do not warn about unused ! static consts. ! ! 2003-05-05 Richard Henderson ! ! * builtins.c (expand_builtin) : Remove. ! : New. ! * builtins.def (BUILT_IN_DWARF_FP_REGNUM): Remove. ! (BUILT_IN_DWARF_SP_COLUMN): New. ! * dwarf2out.c (expand_builtin_dwarf_fp_regnum): Remove. ! (expand_builtin_dwarf_sp_column): New. ! * except.h: Update to match. ! * unwind-dw2.c (execute_stack_op): Correct stack push typo. ! (execute_cfa_program): Record location expression address ! before extracting length. ! (uw_update_context_1): Install old CFA into stack pointer column. ! (uw_init_context_1): Set cfa_reg to stack pointer column. ! ! 2003-05-05 David O'Brien ! ! * config/rs6000/sysv4.h (CPP_OS_FREEBSD_SPEC): Add __ELF__ to mirror ! other FreeBSD ports. ! (LINK_OS_FREEBSD_SPEC): Mirror conventions on other FreeBSD ports. ! ! 2003-05-05 Jason Merrill ! ! * stor-layout.c (update_alignment_for_field): Set DECL_ALIGN for ! the field. ! ! 2003-05-02 Zack Weinberg ! ! PR c/10604 ! * c-opts.c (c_common_decode_option ): Set ! warn_sign_compare for C++ only. ! * doc/invoke.texi: Clarify documentation of -Wsign-compare. ! ! 2003-05-03 Falk Hueffner ! Gerald Pfeifer ! ! * doc/contrib.texi (Contributors): Add Zdenek Dvorak, Aldy ! Hernandez, and Kazu Hirata. ! ! 2003-05-02 Richard Henderson ! ! PR c++/10570 ! * except.c: Revert 04-01 and 04-02 forced-unwind changes. ! * flags.h, toplev.c, doc/invoke.texi: Likewise. ! ! * unwind-dw2.c (_Unwind_GetCFA): Fix ptr->int conversion warning. ! * unwind.inc (_Unwind_DeleteException): Check for null ! exception_cleanup. ! ! * unwind-sjlj.c (_Unwind_SjLj_Resume_or_Rethrow): New. ! * unwind.inc (_Unwind_Resume_or_Rethrow): New. ! * unwind.h: Declare them. ! * libgcc-std.ver (GCC_3.3): Export them. ! ! 2003-05-02 Steven Bosscher  ! ! * tree-inline.c (find_alloca_call): ! Use walk_tree_without_duplicates, instead of walk_tree. ! (find_builtin_longjmp_call): Ditto. ! * c-objc-common.c (c_cannot_inline_fn): Ditto. ! ! 2003-05-02 Gerald Pfeifer ! ! * doc/contrib.texi (Contributors): Add Daniel Berlin. ! ! 2003-05-01 Rodney Brown ! ! * rtl.h (subreg_offset_representable_p): Prototype. ! ! 2003-05-01 Roger Sayle ! ! PR fortran/9974 ! * gcse.c (reg_killed_on_edge): New function to test whether the ! given reg is overwritten by any instruction queued on an edge. ! (bypass_block): Ignore substitutions killed on incoming edges. ! Don't bypass outgoing edges that have queued instructions. ! ! 2003-04-30 Andreas Schwab ! ! * doc/extend.texi (Other Builtins): Enclose multiple word data ! type in braces for @deftypefn. ! ! 2003-04-29 Jason Merrill ! ! PR middle-end/10336 ! * jump.c (never_reached_warning): Really stop looking if we reach ! the beginning of the function. ! ! Tue Apr 29 21:07:00 CEST 2003 Jan Hubicka ! ! * cse.c (count_reg_usage): Revert my previous patch. ! ! 2003-04-29 Alexander Kabaev ! ! bootstrap/10452 ! * gengtype-yacc.y: Improve portability. ! ! 2003-04-29 Zack Weinberg ! ! * config.gcc: Install obsolete target list for GCC 3.3. ! * doc/install.texi: Mention in specific-target instructions ! that certain configurations are deprecated. ! ! 2003-04-29 Kriang Lerdsuwanakij ! ! * c-pragma.c (maybe_apply_renaming_pragma): Fix typo. ! * gcc.c (display_help): Likewise. ! * toplev.c (f_options): Likewise. ! * params.def (PARAM_MAX_INLINE_SCOPE): Likewise. ! * config/c4x/c4x.h (TARGET_SWITCHES): Likewise. ! * config/mcore/mcore.h (TARGET_SWITCHES): Likewise. ! * config/s390/s390.h (TARGET_SWITCHES): Likewise. ! * config/v850/v850.h (TARGET_SWITCHES): Likewise. ! ! 2003-04-29 Danny Smith ! ! * config/i386/mingw32.h (LIBGCC_SPEC): Add libmingwex.a. ! Update copyright. ! * config/i386/cygwin.h (LIBGCC_SPEC): Add libmingwex.a, for ! -mno-cygwin case. ! ! 2003-04-29 J"orn Rennecke ! ! * varasm.c (default_assemble_visibility): Use assemble_name. ! ! 2003-04-29 David O'Brien ! ! * config/i386/freebsd64.h (LINK_SPEC): Mirror FreeBSD linker. ! * config/rs6000/freebsd.h (LINK_SHLIB_SPEC): New macro. ! (SIZE_TYPE): New macro. ! * config/i386/freebsd-aout.h (NO_PROFILE_COUNTERS): New macro. ! (SET_ASM_OP): New macro. ! (HANDLE_SYSV_PRAGMA): New macro. ! (ASM_WEAKEN_LABEL): New macro. ! ! 2003-04-28 Mark Mitchell ! ! PR c++/10180 ! * tree-inline.c (expand_call_inline): Call push_srcloc when ! encountering EXPR_WITH_FILE_LOCATION. Honor warn_inline. ! ! 2003-04-28 Mike Stump ! ! * gdbinit.in: Update to reflect new identifier structure. ! ! 2003-04-28 Richard Henderson ! ! * config/sparc/sparc.c (print_operand): Add 's' to sign-extend. ! * config/sparc/sparc.md (const_mulsidi3_v8plus): Fix mode of ! integral constant mult operand. ! (const_mulsidi3_sp32, const_mulsidi3_sp64): Likewise. ! (const_smulsi3_highpart_v8plus): Likewise. ! (const_smulsi3_highpart): Likewise. ! (const_umulsidi3_sp32): Likewise; sign-extend it in the output. ! (const_umulsidi3_sp64, const_umulsidi3_v8plus): Likewise. ! (const_umulsi3_highpart_v8plus): Likewise. ! (const_umulsi3_highpart): Likewise. ! ! 2003-04-28 David O'Brien ! ! * config/i386/i386.h (builtin_define): Add __amd64 and __amd64__. ! ! Mon Apr 28 09:54:56 CEST 2003 Jan Hubicka ! ! PR c/10308 ! * reload.c (find_reloads_address_1): Reload plus at the place of ! index register. ! ! 2003-04-26 Richard Henderson ! ! * config/ia64/ia64.c (ia64_compute_frame_size): Allow inline asm ! to clobber ar.pfs and ar.unat. ! (ia64_expand_prologue): Force alloc instruction if ar.pfs saved; ! fix test for spilling ar.pfs to the stack. ! ! 2003-04-26 Stephane Carrez ! ! * doc/install.texi (Binaries): Mention binaries for HC11/HC12. ! ! 2003-04-26 Stephane Carrez ! ! * doc/extend.texi (Function Attributes): Document "near" and "far" ! for 68HC11 and 68HC12. ! ! 2003-04-25 Bob Wilson ! ! * config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Back out previous ! addition of __PIC__ and __pic__ macros. ! * config/xtensa/xtensa.h: Clean up indentation. ! ! 2003-04-25 Bob Wilson ! ! * config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Remove definition of ! _GNU_SOURCE. Add definitions of __PIC__ and __pic__. ! (SUBTARGET_CPP_SPEC): Define. ! (LIB_SPEC): Delete. ! * config/xtensa/xtensa-protos.h (xtensa_declare_object): Delete. ! * config/xtensa/xtensa.c (xtensa_declare_object): Delete. ! * config/xtensa/xtensa.h (CPP_SPEC, SUBTARGET_CPP_SPEC, EXTRA_SPECS): ! Define. ! (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Delete. ! (ASM_OUTPUT_ALIGNED_BSS, BSS_SECTION_ASM_OP): Define. ! ! 2003-04-25 Richard Henderson ! ! PR opt/10315 ! * config/rs6000/rs6000.c (rs6000_emit_move): Only elide proper ! checks during reload; use validize_mem instead of adjust_address. ! ! Fri Apr 25 15:43:23 CEST 2003 Jan Hubicka ! ! * emit-rtl.c (subreg_hard_regno): Check that register is ! representable. ! * reload.c (reload_inner_reg_of_subreg): When register is not ! representable, reload the whole thing. ! (find_reloads): Likewsie. ! * rtlanal.c (subreg_representable_p): New function. ! ! Sun Apr 20 18:23:18 CEST 2003 Richard Henderson ! ! (backported to 3.3 by Jan Hubicka) ! ! * config/ia64/ia64.md (UNSPECV_SETJMP_RECEIVER): New. ! (builtin_setjmp_receiver): Delay call to ia64_reload_gp ! until after reload. ! ! * emit-rtl.c (try_split): Handle 1-1 splits of call insns properly. ! ! * config/ia64/ia64.c (TARGET_FUNCTION_OK_FOR_SIBCALL): New. ! (ia64_gp_save_reg): Remove. ! (struct ia64_frame_info): Move to the beginning of the file; ! add reg_save_gp. ! (ia64_expand_call): Rearrange for new call patterns. ! (ia64_reload_gp): New. ! (ia64_split_call): New. ! (ia64_compute_frame_size): Allocate reg_save_gp. ! (ia64_expand_prologue): Save reg_save_gp. ! (ia64_expand_epilogue): Don't restore gp. ! (ia64_hard_regno_rename_ok): Remove R4 hack. ! (ia64_function_ok_for_sibcall): New. ! (ia64_output_mi_thunk): Set reload_completed, no_new_pseudos; ! call try_split on sibcall pattern. ! * config/ia64/ia64-protos.h: Update. ! * config/ia64/ia64.md (call_nogp, call_value_nogp, sibcall_nogp): ! Rename from nopic versions. Confiscate 2nd argument to call as ! a marker. ! (call_pic, call_value_pic, sibcall_pic): Remove. ! (call_gp, call_value_gp, sibcall_gp): New. ! (builtin_setjmp_setup): Remove. ! (builtin_setjmp_receiver): Call ia64_reload_gp. ! ! 2003-04-24 John David Anglin ! ! PR opt/8705 ! * gcse.c (try_replace_reg): On a successful substitution of a constant ! into a single set, try to simplify the source of the set. ! * loop.c (scan_loop): Don't try to optimize a MODE_CC set with a ! constant source. ! ! 2003-04-24 Alexander Kabaev ! ! bootstrap/10453 ! * config/sparc/sparc.md (umulsidi3, mulsidi3): Avoid using ! const_umulsidi3_sp32 and const_mulsidi3_sp32 on 64bit targets ! where they might be not present. Use their _sp64 equivalent ! instead. ! ! 2003-04-23 Richard Henderson ! ! PR opt/8300 ! * toplev.c (rest_of_compilation): Delay no_new_pseudos until ! after initialize_uninitialized_subregs; update reg info assuming ! new pseudos were created. ! ! 2003-04-23 Olivier Hainque ! ! * config/pa/pa.md (extv, extzv): FAIL if the bitfield length is zero. ! ! 2003-04-23 James A Morrison ! ! * invoke.texi: Eliminate extra white-space caused by @gccoptlist{ ! on its own line. ! Ensure there are two spaces between each pair of options and add ! @gol where appropriate. ! ! 2003-04-23 Ulrich Weigand ! ! * config/s390/s390.c (s390_expand_cmpstr): Disable CLC loop. ! ! 2003-04-22 Devang Patel ! ! * cpptrad.c (_cpp_replacement_text_len): Add check for macro parameter count. ! (_cpp_copy_replacement_text): Same. ! ! 2003-04-22 Richard Henderson ! ! PR 8866 ! * rtl.h (MEM_NOTRAP_P): New. ! (MEM_COPY_ATTRIBUTES): Copy it. ! * rtlanal.c (may_trap_p): Check it. ! * expr.c (do_tablejump): Set it. ! ! * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. ! ! 2003-04-22 David Turner ! ! * gbl-ctors.h: Add special license exception. ! * libgcc2.h: Likewise. ! * tsystem.h: Likewise. ! * gcov-io.h: Likewise. ! ! 2003-04-21 Mark Mitchell ! ! * Makefile.in (calls.o): Depend on except.h. ! * calls.c: Include except.h. ! (emit_call_1): Call note_eh_region_may_contain_throw if ! appropriate. ! * except.c (eh_region): Add may_contain_throw. ! (expand_eh_region_end_cleanup): Do not include handler code when ! it cannot be reached. ! (note_eh_region_may_contain_throw): New function. ! * except.h (note_eh_region_may_contain_throw): New function. ! ! 2003-04-21 Mark Mitchell ! ! * config/i386/winnt.c (i386_pe_mark_dllimport): Revert previous ! changes. ! ! 2003-04-21 Mark Mitchell ! ! * config/i386/winnt.c (i386_pe_mark_dllimport): Make the new RTL ! have the same form as the old RTL. ! ! 2003-04-18 Mark Mitchell ! ! * cfgrtl.c (try_redirect_by_replacing_jump): Create a basic block ! for orphaned jump tables. ! ! 2003-04-20 John David Anglin ! ! PR/8705 ! * pa.md (movccfp): New expander. ! (setccfp0, setccfp1): Rename to movccfp0 and movccfp1, respectively. ! Reverse fcmp conditions. ! ! 2003-04-20 Marek Michalkiewicz ! ! * config/avr/avr.md (*cmpqi_sign_extend): Handle negative values ! of operand 1 correctly. ! ! 2003-04-19 John David Anglin ! ! * cfgrtl.c (try_redirect_by_replacing_jump): Remove unused variables. ! * flow.c (life_analysis): Fix warning. ! ! 2003-04-18 Gerald Pfeifer ! ! * doc/contrib.texi (Contributors): Prefer "bug fix" over "bugfix". ! Add Segher Boessenkool. ! ! 2003-04-18 Alexander Sotirov ! ! PR c/9177 ! * c-decl.c (c_expand_body): Don't garbage collect the function ! body if we are going to dump it later. ! ! 2003-04-18 Eric Botcazou ! ! PR optimization/7675 ! * c-typeck.c (build_external_ref): Set the DECL_NONLOCAL flag ! on VAR_DECL, PARM_DECL and FUNCTION_DECL from within ! nested functions if they refer to declarations from parent functions. ! * stmt.c (expand_decl): Don't put automatic variables in registers ! if the DECL_NONLOCAL flag is set. ! ! 2003-04-17 Janis Johnson ! ! * doc/sourcebuild.texi (Test Suites): Document support for testing ! binary compatibility (moved from testsuite/README.compat). ! ! 2003-04-17 Simon Law ! ! * doc/include/gpl.texi: Fix double-spacing after "MA" to match ! the one provided by the FSF. ! ! 2003-04-17 Gerald Pfeifer ! ! * doc/install.texi (Binaries): Update URL and list of platforms ! provided by ftp.thewrittenword.com. ! ! 2003-04-17 Eric Botcazou ! ! * doc/invoke.texi (inline-limit): Fix pasto. ! ! 2003-04-16 Mark Mitchell ! ! PR middle-end/8866 ! * cfgtrl.c (try_redirect_by_replacing_jump): Do not delete ! jumptables. 2003-04-16 John David Anglin PR/10271 * pa-protos.h (function_arg): Remove last argument. * pa.c (function_arg): Likewise. Use CUMULATIVE_ARGS struct instead. ! * pa.h (struct hppa_args): Add member incoming. (INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Initialize member incoming. (FUNCTION_ARG): Revise call to function_arg. (FUNCTION_INCOMING_ARG): Delete. + 2003-04-15 J"orn Rennecke + + PR target/9594: + * sh.c (barrier_align): Also recognize stuff_delay_slot as + an indicator that a barrier was created by branch splitting. + + merge from mainline: + + 2003-03-05 J"orn Rennecke + + * sh.h (OVERRIDE_OPTIONS): For TARGET_SHMEDIA, the minimum value + for align_jumps is 4. + + (SECONDARY_INPUT_RELOAD_CLASS): If reloading a PLUS into FPUL, + use GENERAL_REGS. + + 2003-03-03 J"orn Rennecke + + * sh.h (OVERRIDE_OPTIONS): Set default values for align_loops + and align_jumps if not set. + Force align_jumps to be at least 2. + When relaxing, force align_functions to be at least the maximum of + align_loops, align_jumps and 4. + * sh.c (find_barrier, barrier_align): Honour align_jumps_log. + (sh_loop_align): Honour align_loops_log. + + * sh.md (length attribute): Use prev_nonnote_insn instead of PREV_INSN + to check for indirect_jump_scratch. + (indirect_jump_scratch): Add second set. + * sh.c (output_far_jump): Use prev_nonnote_insn instead of PREV_INSN + when looking for indirect_jump_scratch. + Extract scratch register taking new structure of indirect_jump_scratch + into account. + (gen_block_redirect): Set INSN_SCOPE for indirect_jump_scratch. + + 2003-04-15 James A. Morrison + + * invoke.texi (Spec Files): Wrap if-exists-else example. + (MCore): Remove duplicate @itemx entries and @opindex entries. + + 2003-04-15 Ulrich Weigand + + * unwind.inc (_Unwind_Backtrace): New function. + * unwind.h (_Unwind_Backtrace): Declare it. + * libgcc-std.ver (_Unwind_Backtrace): Export it. + 2003-04-15 Jason Merrill PR middle-end/10336, c++/10401 ! * jump.c (never_reached_warning): Also stop looking if we reach the beginning of the function. + 2003-04-15 Kaveh R. Ghazi + + PR target/10338 + PR bootstrap/10198 + PR bootstrap/10140 + * fixinc/gnu-regex.c (regerror): Use mempcpy not __mempcpy. + + 2003-04-15 Jakub Jelinek + + * config/rs6000/rs6000.h (EPILOGUE_USES): Use register 2, + instead of TOC_REGISTER in epilogue in + current_function_calls_eh_return functions. + 2003-04-14 Hans-Peter Nilsson PR target/10377 *************** *** 33,96 **** ("*extophisi_swap_side", 8th, 9th, 10th, 11th, 14th peepholes): When next to constraint R, replace constraint i with n. ! 2003-04-10 Bob Wilson ! * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE, IMPLICIT_FIX_EXPR, ! EASY_DIV_EXPR): Delete poisoned macro definitions. ! 2003-04-09 Richard Henderson ! PR opt/10352 ! Tue Jul 23 21:49:24 2002 J"orn Rennecke ! * simplify-rtx.c (simplify_subreg): When converting to a non-int ! mode, try to convert to an integer mode of matching size first. ! 2003-04-09 Alan Modra ! * config/rs6000/rs6000.c (rs6000_emit_prologue): Use correct mode to ! set frame pointer. 2003-04-03 Jason Merrill PR c/10175 ! * jump.c (never_reached_warning): Look backwards for a line note. 2003-04-02 Richard Henderson * dwarf2out.c (output_call_frame_info): Ignore fde->nothrow as an optimization when flag_exceptions not enabled. 2003-03-30 Kaveh R. Ghazi PR other/6955 * collect2.c (collect_wait): Use WCOREDUMP and fix output message. * system.h (WCOREDUMP, WCOREFLG): Define if necessary. ! 2003-03-29 Arpad Beszedes ! ! PR middle-end/9967 ! * builtins.c (expand_builtin_fputs): When optimizing for size, ! don't transform fputs into fwrite. ! ! 2003-03-29 Albert Chin-A-Young ! DJ Delorie , ! Bruce Korb ! * fixinc/inclhack.def (solaris_mutex_init_1): New; Fix ! buggy Solaris mutex/cond initializers. ! (solaris_mutex_init): Rename to solaris_mutex_init_2. ! * fixinc/fixincl.x: Regenerate. ! * fixinc/tests/base/pthread.h: Update. ! 2003-03-29 Nathanael Nerode ! * fixinc/fixinc.interix: Remove completely dead code ! 2003-03-29 Ulrich Weigand ! PR target/7784 ! * reload.c (maybe_memory_address_p): New function. ! (find_reloads_address): Use it instead of memory_address_p. 2003-03-29 Alan Modra --- 553,951 ---- ("*extophisi_swap_side", 8th, 9th, 10th, 11th, 14th peepholes): When next to constraint R, replace constraint i with n. ! Mon Apr 14 16:14:37 CEST 2003 Jan Hubicka ! PR opt/10024 ! * cfgrtl.c (force_nonfallthru_and_redirect): Use unchecked_make_edge. ! 2003-04-14 Kriang Lerdsuwanakij ! * doc/contrib.texi (Contributors): Correct my entry. ! 2003-04-12 Stephane Carrez ! * config/m68hc11/m68hc11-protos.h ! (m68hc11_eq_compare_operator): Declare ! * config/m68hc11/m68hc11.h (PREDICATE_CODES): Register new predicate. ! * config/m68hc11/m68hc11.c (m68hc11_eq_compare_operator): New predicate ! (d_register_operand): Check the operand mode. ! (hard_addr_reg_operand): Likewise. ! ! 2003-04-12 Stephane Carrez ! ! * config/m68hc11/m68hc11.md ("decrement_and_branch_until_zero"): New ! pattern for dbcc/ibcc generation for 68HC12. ! ("doloop_end"): New pattern. ! ("m68hc12_dbcc_dec_hi"): New pattern for dbeq/dbne. ! ("m68hc12_dbcc_inc_hi"): New pattern for ibeq/ibne. ! ("m68hc12_dbcc_dec_qi"): New pattern. ! ("m68hc12_dbcc_inc_qi"): New pattern. ! (split): Add split for the above when we can't use dbcc/ibcc due to ! reloading. ! (peephole2): Add peephole2 to generate the above when possible. ! ! 2003-04-12 Stephane Carrez ! ! * config/m68hc11/m68hc11.md ("bitcmpqi" split): No need to test the ! mode of operand 0. ! (peephole2 optimize const load): Likewise for operand 2. ! ("*rotlhi3_with_carry"): Change pattern to a const 1 rotate which ! clobbers CC_REGNUM. ! ("*rotrhi3_with_carry"): Likewise. ! (ashift:DI 1 split): Update pattern to create the above rotate. ! (lshiftrt:DI 1 split): Likewise. ! ! 2003-04-12 Stephane Carrez ! ! * config/m68hc11/m68hc11.md (SOFT_Z_REGNUM): New constant. ! ("tstqi_z_used" split): Use it. ! ("cmphi_z_used"): Likewise. ! ("bitcmpqi_z_used"): Likewise; also use SP_REGNUM constant. ! ("cmpqi_z_used"): Likewise. ! ! 2003-04-12 Mark Mitchell ! ! PR c++/7910 ! * config/i386/winnt.c (i386_pe_mark_dllimport): Fix thinko. ! ! 2003-04-12 Stephane Carrez ! ! * config/m68hc11/m68hc11.h (TARGET_SWITCHES): Fix -mnominmax option; ! recognize -mnorelax. ! (reg_class): Add Z_OR_S_REGS to represent soft registers with Z ! (REG_CLASS_NAMES): Add its name. ! (REG_CLASS_CONTENTS): Define its content. ! ! 2003-04-12 Stephane Carrez ! ! * config/m68hc11/larith.asm (memcpy): Use ARG macro to access stack ! parameters so that offsets are valid for far definition. ! (__mulsi3): Likewise and use ret to return. ! (___adddi3, ___subdi3, ___notdi2, ): Don't use it to save the result. ! ! 2003-04-11 Geoffrey Keating ! ! * doc/extend.texi (Empty Structures): New. ! ! 2003-04-11 Richard Henderson ! ! PR c++/10202 ! * expr.c (expand_expr): Use COMPLETE_OR_UNBOUND_ARRAY_TYPE_P ! not COMPLETE_TYPE_P for re-invoking layout_decl. ! ! 2003-04-11 Simon Law ! ! * doc/bugreport.texi: Fix paragraph breaking between sections ! in preparation for TeXinfo's paragraph indentation fixes. ! * doc/extend.texi: Ditto. ! * doc/invoke.texi: Ditto. ! * doc/objc.texi: Ditto. ! * doc/gcov.texi: Wrap 'gcov' in @command{}. ! * doc/invoke.texi (Darwin Options): Add a preamble. ! ! 2003-04-11 Richard Henderson ! ! PR c/10201 ! * expr.c (expand_expr): Move DECL_RTL frobbing ... ! * stor-layout.c (layout_decl): ... here. ! ! 2003-04-11 John David Anglin ! ! * doc/install.texi (hppa): Update links for HP-UX patches. Revise ! notes on linker selection and configuration for 64-bit HP-UX port. ! * doc/invoke.texi (hppa): Remove hppa text from description for ! -ffunction-sections and -fdata-sections. Document -static, -nolibdld ! and -threads options. ! ! * pa-hpux10.h (LIB_SPEC): Add link options to resolve dependency of ! libc.a on libdld.sl when -static is specified and -nolibdld is not ! specified. ! * pa64-hpux.h (LIB_SPEC): Likewise. ! * pa-hpux11.h (LIB_SPEC): Likewise. ! (LINK_SPEC): Add __gcc_plt_call as an undefined symbol when -shared ! is not specified. ! ! 2003-04-08 Jonathan Wakely ! ! * doc/extend.texi (Template Instantiation): Refer to ISO standard, ! not Working Paper. ! * doc/invoke.texi (C++ Dialect Options): Same. ! ! Fri Apr 11 00:12:14 CEST 2003 Jan Hubicka ! ! PR inline-asm/8803 ! * function.c (instantate_virtual_regs): Verify that all ASM statements ! match after the virutal regs instantiation. ! ! 2003-04-10 Steve Ellcey ! ! * ia64-protos.h (addp4_optimize_ok): New. ! * ia64.c (addp4_optimize_ok): New. ! * ia64.md (*ptr_extend_plus_1): Use addp4_optimize_ok. ! (*ptr_extend_plus_2): Ditto. ! ! 2003-04-10 Steve Ellcey ! ! * expr.c (expand_assignment): Extend offset_rtx with convert_to_mode ! not with convert_memory_address. ! (store_constructor): Ditto, and same for copy_size_rtx. ! (expand_expr): Ditto. ! ! 2003-04-10 Ulrich Weigand ! ! * config/s390/s390.c (larl_operand): Do not allow symbols ! marked with '@'. ! (s390_encode_section_info): Mark symbols with forced 1-byte ! alignment with '@'. ! (s390_strip_name_encoding): Strip '@'. ! (legitimize_pic_address): Handle symbols that are not valid ! LARL operands in 64-bit mode. ! ! 2003-04-10 Andrew Haley ! ! * tree-inline.c (inlinable_function_p): Disable inlining for ! synchronized methods. ! ! 2003-04-09 Alexandre Oliva ! ! * config/fp-bit.c (unpack_d): Handle pair of doubles with ! different signs correctly. ! ! 2003-04-08 Richard Henderson ! ! PR target/9886 ! * config/ia64/ia64.md (cmovdi_internal): Use 'n' not 'i' constraints. ! (cmovsi_internal): Likewise. ! ! 2003-04-07 Matt Kraai ! ! * doc/install.texi: Use @command and @samp for single- and ! multi-word commands respectively. ! * doc/makefile.texi: Likewise. ! * doc/sourcebuild.texi: Likewise. ! ! 2003-04-07 Christian Ehrhardt ! Richard Henderson ! ! PR c/9516 ! * expr.c (safe_from_p): Rearrange to avoid deep recursion in ! favour of looping and tail recursion for TREE_LIST and binops. ! ! 2003-04-07 Glen Nakamura ! ! PR opt/8634 ! * explow.c (maybe_set_unchanging): Don't flag non-static const ! aggregate type initializers with RTX_UNCHANGING_P. ! ! 2003-04-07 Richard Henderson ! ! PR opt/8634 ! * function.c (purge_addressof_1): Don't try arithmetics for ! unchanging memories. ! ! 2003-04-07 Janis Johnson ! ! * doc/sourcebuild.texi (Test Suites): Document testing support for ! gcov and profile-directed optimizations; describe gcc.misc-tests. ! ! 2003-04-07 Eric Botcazou ! ! * doc/rtl.texi (Comparison operations): Update to ! record the allowed comparison modes. ! ! Mon Apr 7 22:13:38 CEST 2003 Jan Hubicka ! ! PR target/10077 ! * i386.md (movsi_1): Fix SSEMOV alternative. ! ! Mon Apr 7 15:56:30 CEST 2003 Jan Hubicka ! ! PR opt/10024 ! Revert Zack's change ! * cfglayout.c (cfg_layout_redirect_edge): ! Redirect any branch edges unified with the fallthru one. ! * cfgrtl.c (force_nonfallthru_and_redirect): Do not special ! case fallthru edges when called via cfglayout.c ! ! 2003-04-07 James A Morrison ! ! * doc/extend.texi (Darwin Pragmas): Fix spelling of Mac OS. ! ! 2003-04-05 Kaveh R. Ghazi ! ! * c-decl.c (set_save_expr_context): Prototype. ! ! 2003-04-05 David Edelsohn ! ! * config/rs6000/rs6000.h (RTX_COSTS): Halve Power multiply costs. ! * config/rs6000/rs6000.md: Correct Power4 multiply latency. ! ! 2003-04-05 Zack Weinberg ! ! PR optimization/10024 ! * cfgrtl.c (force_nonfallthru_and_redirect): If e is the edge ! we want, use it. ! ! 2003-04-05 Gerald Pfeifer ! ! PR bootstrap/10267 ! * doc/install.texi (*-*-solaris2): /bin/ksh is not just recommended ! for configuring. ! ! 2003-04-04 Kaveh R. Ghazi ! ! * c-decl.c (set_save_expr_context): Use traditional-style function ! definition. ! ! 2003-04-04 Gerald Pfeifer ! ! * doc/contrib.texi (Contributors): Add entries for Wolfgang ! Bangerth, DJ Delorie, Christian Ehrhardt, Christopher Faylor, ! Nathanael Nerode, Diego Novillo, Hartmut Penner, Volker Reichelt, ! Danny Smith, and Ulrich Weigand. ! Update Kriang Lerdsuwanakij and fix a typo in Janis Johnson's ! entry. ! ! 2003-04-04 Zack Weinberg ! ! PR bootstrap/10216 ! * configure.in: Check whether it is necessary to link against ! libm to use ldexp. ! * configure: Regenerate. ! * Makefile.in: Add LDEXP_LIB substitution variable. 2003-04-03 Jason Merrill PR c/10175 ! * jump.c (never_reached_warning): Revert patch of 2002-11-02. ! Look backwards for a line note. ! ! 2003-04-02 Mike Stump ! ! * doc/extend.texi (PowerPC AltiVec Built-in Functions): Split up ! some to avoid faulting makeinfo --html. ! ! 2003-04-02 Richard Henderson ! ! * libgcc-std.ver (_Unwind_GetCFA): New. ! * unwind-dw2.c (_Unwind_GetCFA): New. ! * unwind-sjlj.c (_Unwind_GetCFA): New. ! * unwind.h: Declare it. ! ! 2003-04-02 Mike Stump ! ! * doc/install.texi (Specific): Update pointers to apple.com. ! ! 2003-04-01 Jan Hubicka ! ! PR inline-asm/8088 ! * i386.c (ix86_hard_regno_mode_ok): Return 0 for MMX/SSE registers ! when MMX/SSE is not available. ! ! 2003-04-02 Richard Henderson ! ! * except.c (sjlj_find_directly_reachable_regions): Recognize when ! must-not-throw region has been deleted. 2003-04-02 Richard Henderson * dwarf2out.c (output_call_frame_info): Ignore fde->nothrow as an optimization when flag_exceptions not enabled. + 2003-04-01 Richard Henderson + + * except.c (convert_from_eh_region_ranges_1): Smash REG_EH_REGION + notes for nothrow calls if flag_forced_unwind_exceptions. + (build_post_landing_pads): Mind flag_forced_unwind_exceptions. + (sjlj_find_directly_reachable_regions): Likewise. + (reachable_handlers): Likewise. + (can_throw_external): Likewise. + (collect_one_action_chain): Record cleanups after catch-all and + must-not-throw if flag_forced_unwind_exceptions. + * flags.h (flag_forced_unwind_exceptions): Declare. + * toplev.c (flag_forced_unwind_exceptions): New. + (lang_independent_options): Add it. + * doc/invoke.texi: Add it. + + 2003-04-01 Geoffrey Keating + + * unwind-dw2-fde-darwin.c (DESTRUCTOR_MAY_BE_CALLED_LIVE): New. + (live_image_destructor): Reset image to initial state. + (examine_objects): Set DESTRUCTOR_MAY_BE_CALLED_LIVE. + + 2003-04-01 Dale Johannesen + + * cse.c (count_reg_usage): Fix handling of REG_EQUAL notes. + (Zdenek Dvorak's fix from 3.4 branch) + + 2003-04-01 Ulrich Weigand + + * config/s390/s390.c (s390_fixup_clobbered_return_reg): + Do nothing if __builtin_return_address was not used. + + 2003-04-01 David Edelsohn + + * config/rs6000/rs6000.c (function_arg_pass_by_reference): + Return true for variable sized types. + (rs6000_va_arg): Handle variable sized types passed by reference + on non-SVR4 ABI. + + 2003-03-31 Mark Mitchell + + PR c/9936 + * c-decl.c (grokdeclarator): Clear SAVE_EXPR_CONTEXT for + variably-sized arrays in parameters. + (set_save_expr_context): New function. + (c_expand_body): Use it, via walk_tree. + + 2003-03-31 Stephane Carrez + + * config/m68hc11/m68hc11.c (hard_reg_operand): Check the mode. + + 2003-03-31 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Don't rely on REG_WAS_0 + notes as they are boggus. + (m68hc11_gen_movqi): Likewise. + + 2003-03-31 Stephane Carrez + + * config/m68hc11/m68hc11.c (expand_prologue): For an interrupt handler + save the soft registers after the frame pointer so that gdb can unwind + the frame more easily. + (expand_epilogue): Likewise in opposite order; allow to use X register + as scratch if the return value is by reference. + + 2003-03-31 Jason Merrill + + PR java/10145 + * stor-layout.c (update_alignment_for_field): Respect + DECL_USER_ALIGN for zero-length bitfields, too. + * c-decl.c (finish_struct): Don't set DECL_ALIGN for normal + fields. + 2003-03-30 Kaveh R. Ghazi PR other/6955 * collect2.c (collect_wait): Use WCOREDUMP and fix output message. * system.h (WCOREDUMP, WCOREFLG): Define if necessary. ! 2003-03-30 Richard Henderson ! PR c/10083 ! * config/alpha/alpha.md (umuldi3_highpart): Change to expander; ! don't zero_extend const inputs. ! 2003-03-29 Gerald Pfeifer ! * doc/contrib.texi: Add Eric Botcazou and Roger Sayle. ! Uniformly use bugfix instead of bug fix. ! 2003-03-29 Gerald Pfeifer ! PR doc/895 ! * ONEWS: Remove those items that already appear in the EGCS ! release notes on our web pages. 2003-03-29 Alan Modra *************** *** 98,119 **** TARGET_HARD_FLOAT. Reformat. (FUNCTION_ARG_REGNO_P): Likewise, and remove unneeded casts. ! 2003-03-29 Glen Nakamura ! PR c/8224 ! * fold-const.c (extract_muldiv_1): Don't pass through type conversions ! when signedness changes for division or modulus. 2003-03-29 Alan Modra * reload1.c (reload_as_needed): Allow a USE in asm reloads. ! 2003-03-28 Olivier Hainque ! PR ada/9953 ! * ada/Makefile.in (gnatlib configuration for HPUX): Split ! the general section for HPUX into specific sections for ! HPUX 10 and HPUX 11. 2003-03-28 Eric Botcazou --- 953,985 ---- TARGET_HARD_FLOAT. Reformat. (FUNCTION_ARG_REGNO_P): Likewise, and remove unneeded casts. ! 2003-03-29 Ulrich Weigand ! * config/s390/s390.c (s390_emit_prologoue): Make sure backchain is ! set up before any trapping memory access if flag_non_call_exceptions. 2003-03-29 Alan Modra * reload1.c (reload_as_needed): Allow a USE in asm reloads. ! * loop.c: (find_mem_in_note_1, find_mem_in_note): Comment. ! 2003-03-28 Loren James Rittle ! ! * doc/install.texi (*-*-freebsd*): Update with known status. ! ! 2003-03-28 Ulrich Weigand ! ! * config/s390/s390.md ("literal_pool_31"): Output pool anchor ! label even if pool empty when generating PIC. ! ("literal_pool_31", "literal_pool_64"): Coding style cleanup. ! ! 2003-03-28 Kazu Hirata , ! Dhananjay Deshpande ! ! PR target/10205 ! * config/h8300/h8300.c (h8300_initial_elimination_offset): ! Correct the offset computation when TARGET_NORMAL. 2003-03-28 Eric Botcazou *************** *** 121,126 **** --- 987,999 ---- * config/sparc/sparc.md (jump pattern): Correct order when issuing the annuling marker. + 2003-03-28 Alan Modra + + * loop.c: (find_mem_in_note_1, find_mem_in_note): New functions. + (replace_loop_mems): Add "written" param. Remove invalid REG_EQUAL + notes after hoisting. + (load_mems): Adjust replace_loop_mems call. + 2003-03-28 Eric Botcazou PR c/8281 *************** *** 128,159 **** (movdi reg/reg split): Match only on sparc32, and v9 when int regs. 2003-03-28 Eric Botcazou ! Richard Henderson PR target/10114 and PR target/10084 * dwarf2out.c (mem_loc_descriptor): Handle LO_SUM. ! 2003-03-27 Janis Johnson ! PR sw-bug/10234 ! * system.h (GCCBUGURL): Reference GCC web site. ! 2003-03-26 Richard Henderson ! * cfgrtl.c (try_redirect_by_replacing_jump): Disable removing ! tablejumps with no optimization. ! 2003-03-27 Rainer Orth ! * config/mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define __c99. ! * fixinc/inclhack.def (irix___restrict): Don't change __restrict ! for C++ on IRIX 6.5.1[89]. ! * fixinc/tests/base/internal/sgimacros.h: New file. ! * fixinc/inclhack.def (irix_wcsftime): Use XPG5 variant for C99. ! * fixinc/fixincl.x: Regenerate. ! * fixinc/tests/base/internal/wchar_core.h: New file. 2003-03-26 Eric Botcazou --- 1001,1037 ---- (movdi reg/reg split): Match only on sparc32, and v9 when int regs. 2003-03-28 Eric Botcazou ! Richard Henderson PR target/10114 and PR target/10084 * dwarf2out.c (mem_loc_descriptor): Handle LO_SUM. ! 2003-03-27 Olivier Hainque ! PR ada/9953 ! * ada/Makefile.in (gnatlib configuration for HPUX): Split ! the general section for HPUX into specific sections for ! HPUX 10 and HPUX 11. Fix the setting of TGT_LIB in the HPUX ! 11 case. ! 2003-03-26 Ulrich Weigand ! * config/s390/s390.c (s390_optimize_prolog): Do not save/restore ! registers used for global asm variables. ! (s390_frame_info, s390_arg_frame_offset): Likewise. ! (s390_emit_prologue, s390_emit_epilogue): Likewise. ! 2003-03-26 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Update Janis Johnson. ! 2003-03-26 Jakub Jelinek ! * config/ia64/ia64.c (ia64_expand_op_and_fetch): Fix comment. ! (ia64_expand_compare_and_swap): Use always DImode ar.ccv, ! zero extend old to it. ! * config/ia64/ia64.md (cmpxchg_acq_si): Remove mode from ccv ! operand. 2003-03-26 Eric Botcazou *************** *** 162,173 **** --- 1040,1070 ---- (PLUS (PLUS (REG) (REG)) (CONST_INT)) form for all base registers. + 2003-03-25 Marcelo Abreu + + PR other/10203 + * version.c: Reference the GCC web site in the URL. + + 2003-03-25 Jan Hubicka + + PR opt/10056 + * cfglayout.c (fixup_reorder_chain): Fix dealing with the conditional + jump jumping to the next instruction. + * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. + * cfg.c (unchecked_make_edge): New. + * basic-block.h (unchecked_make_edge): Declare. + 2003-03-25 Jason Merrill PR optimization/10171 * unroll.c (unroll_loop): Don't delete the jump at the end unless we also delete a jump at the beginning. + 2003-03-25 Stephane Carrez + + * doc/contrib.texi (Contributors): Mention self as 68HC11/68HC12 + contributor. + 2003-03-25 Gerald Pfeifer * doc/passes.texi (Passes): Properly document that we do not *************** *** 177,184 **** PR optimization/8746 * config/i386/i386.md (and promoting splitters): Disable HImode to ! SImode promoting when the sign bit matters and is not preserved. ! Disable promoting when optimizing for size. 2003-03-23 Eric Botcazou --- 1074,1150 ---- PR optimization/8746 * config/i386/i386.md (and promoting splitters): Disable HImode to ! SImode promoting when the sign bit matters and is not preserved, or ! when TARGET_FAST_PREFIX is true. Disable promoting when optimizing ! for size. ! ! 2003-03-24 Stephane Carrez ! ! * config/m68hc11/t-m68hc11-gas (LIB1ASMFUNCS): Add _call_far and ! _return_far ! (MULTILIB_OPTIONS): Don't multilib on -mlong-calls. ! (MULTILIB_EXCEPTIONS): Likewise. ! * config/m68hc11/m68hc11.md ("call"): Support far calls for 68HC11 ! by calling some board support routine. ! ("call_value"): Likewise. ! ("*return_void"): Likewise for return. ! ("*return_16bit"): Likewise. ! ("*return_32bit"): Likewise. ! * config/m68hc11/m68hc11.h (ASM_DECLARE_FUNCTION_NAME): Generate .far ! for 68HC11 too. ! (DWARF2_ADDR_SIZE): Use 4 so that addresses can ! * config/m68hc11/m68hc11.c (m68hc11_override_options): Accept ! -mlong-calls for 68HC11. ! * config/m68hc11/larith.asm (declare_near): New macro. ! (__premain, ___negsi2, ___one_cmplsi2, ___ashlsi3): Use it. ! (___ashrsi3, ___lshrsi3, ___lshrhi3, ___lshlhi3): Likewise. ! (___rotrhi3, ___rotlhi3, ___ashrhi3, ___ashrqi3): Likewise. ! (___lshlqi3, __divmodhi4, ___mulqi3, ___mulhi3): Likewise. ! (__mulhi32): Likewise. ! (ret): Update macro for 68HC11. ! (__far_trampoline): Implement for 68HC11. ! (__call_a16, __call_a32, __return_void, __return_16): New support ! routines for 68HC11 memory bank switching calling support. ! (__return_32): Likewise. ! ! 2003-03-21 Glen Nakamura ! ! PR opt/10087 ! * loop.c (loop_givs_reduce): Skip bivs with duplicate locations ! while incrementing giv. ! (record_biv): Check for duplicate biv locations and ! set (struct induction *) v->same if found. ! ! 2003-03-24 Janis Johnson ! ! * doc/install.texi (Testing): Mention test result links from build ! status pages. ! ! 2003-03-24 Mark Mitchell ! ! * function.c (put_var_into_stack): Change bool parameter to int. ! (gen_mem_addressof): Likewise. ! * rtl.h (gen_mem_addressof): Likewise. ! * tree.h (put_var_into_stack): Likewise. ! * config/alpha/alpha.c (alpha_gp_save_rtx): Adjust call to ! gen_mem_addressof or put_var_into_stack. ! * config/c4x/c4x.c (c4x_expand_builtin): Likewise. ! ! 2003-03-24 Andreas Schwab ! ! * config/ia64/ia64.c (spill_tfmode_operand): Adjust calls to ! gen_mem_addressof. ! ! 2003-03-24 Jakub Jelinek ! ! * expr.c (do_jump): Handle UNSAVE_EXPR specially. ! ! 2003-03-23 Eric Botcazou ! ! PR target/10072 ! * combine.c (simplify_if_then_else): Check that the mode ! has MODE_INT class before applying the (OP Z (mult COND C2)) ! transformation. 2003-03-23 Eric Botcazou *************** *** 186,213 **** * config/sparc/sparc.md (widening peepholes): Use widen_memory_access instead of change_address. ! 2003-03-23 Daniel Jacobowitz ! Fix PR target/9797. ! * stmt.c (expand_decl_init): Call push_temp_slots () and ! pop_temp_slots (). 2003-03-23 Richard Henderson ! ! * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps ! before flow2. ! * cfgrtl.c (try_redirect_by_replacing_jump): Similarly. 2003-03-23 Richard Henderson ! PR opt/10116 ! * ifcvt.c (find_if_block): Disallow tablejump insns outgoing ! from then_bb or else_bb after flow2. 2003-03-22 John David Anglin * pa.c (output_cbranch, output_bb, output_bvb): Output nop for ! conditional branch to the following instruction. 2003-03-21 Volker Reichelt --- 1152,1285 ---- * config/sparc/sparc.md (widening peepholes): Use widen_memory_access instead of change_address. ! 2003-03-23 Mark Mitchell ! PR c++/7086 ! * c-typeck.c (c_mark_addressable): Adjust calls to ! put_var_into_stack. ! * expr.c (expand_expr): Likewise. ! * function.c (put_var_into_stack): Add rescan parameter. Do not ! call fixup_var_refs when rescan is false. ! (gen_mem_addressof): Likewise. ! (assign_parms): Adjust calls to put_var_into_stack. ! (setjmp_protect): Likewise. ! (setjmp_protect_args): Likewise. ! * rtl.h (gen_mem_addressof): Change prototype. ! * stmt.c (expand_decl): Adjust calls to put_var_into_stack. ! * tree.h (put_var_into_stack): Change prototype. ! ! 2003-03-23 Arpad Beszedes ! ! PR middle-end/9967 ! * builtins.c (expand_builtin_fputs): When optimizing for size, ! don't transform fputs into fwrite. ! ! 2003-03-24 Alan Modra ! ! * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Remove unnecessary ! globalize_label. ! ! Merge from mainline. ! 2003-01-13 Andreas Schwab ! * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Output type ! directive. ! ! 2003-03-23 Glen Nakamura ! ! PR c/8224 ! * fold-const.c (extract_muldiv_1): Don't pass through type conversions ! when signedness changes for division or modulus. 2003-03-23 Richard Henderson ! ! * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps ! before flow2. ! * cfgrtl.c (try_redirect_by_replacing_jump): Similarly. 2003-03-23 Richard Henderson ! PR opt/10116 ! * ifcvt.c (find_if_block): Disallow tablejump insns outgoing ! from then_bb or else_bb after flow2. ! * jump.c (tablejump_p): New. ! * rtl.h: Declare it. ! ! 2003-03-22 John David Anglin ! ! * pa.c (output_cbranch): Fix typo in comment. 2003-03-22 John David Anglin * pa.c (output_cbranch, output_bb, output_bvb): Output nop for ! conditional branch to the following instruction. Use next_real_insn ! instead of next_active_insn. ! (output_dbra, output_movb, jump_in_call_delay): Use next_real_insn ! instead of next_active_insn. ! ! 2003-03-22 Ulrich Weigand ! ! * config/s390/s390.md ("movti", "*movdi_31", "*movdf_31"): Use 'o' instead ! of 'm' constraint in forced-split alternatives. ! ("*adddi3_31", "*subdi3_31"): Likewise. Also, pass 0 instead of 1 as ! VALIDATE_ADDRESS parameter to operand_subword. ! ! 2003-03-22 Svein E. Seldal ! ! * config/c4x/t-c4x (MULTILIB_MATCHES): Make gcc recognize a c33 as ! a c30 instead of a c40 processor. ! ! 2003-03-21 Richard Henderson ! ! PR opt/2001 ! * bb-reorder.c (maybe_duplicate_computed_goto_succ): New. ! (make_reorder_chain_1): Call it. ! ! * function.h (struct function): Add computed_goto_common_label, ! computed_goto_common_reg. ! * function.c (free_after_compilation): Zap them. ! * stmt.c (expand_computed_goto): Use them to produce one ! indirect branch per function. ! ! 2003-03-22 Stephane Carrez ! ! * config/m68hc11/m68hc11.md ("call_value"): Fix trap check. ! ! 2003-03-22 Stephane Carrez ! ! * config/m68hc11/m68hc11.h (ASM_DECLARE_FUNCTION_NAME): Fix typo in ! writing .interrupt command. ! * config/m68hc11/m68hc11.md ("call"): Look at the symbol to see ! if it's a far or near function. ! ("call_value"): Likewise. ! * config/m68hc11/m68hc11.c (m68hc11_attribute_table): Add far and ! near attributes. ! (m68hc11_handle_fntype_attribute): Accept attributes on methods. ! (m68hc11_override_options): Ignore -mlong-calls for 68HC11. ! (m68hc11_initial_elimination_offset): Set current_function_far ! according to attributes. ! (expand_prologue): Likewise. ! (trap_handler_symbol): New global to keep track of trap handlers. ! (m68hc11_encode_section_info): Mark symbol as far if needed; set ! trap symbol. ! (m68hc11_is_far_symbol): New function. ! (m68hc11_is_trap_symbol): New function. ! * config/m68hc11/m68hc11-protos.h (m68hc11_is_far_symbol): Declare. ! (m68hc11_is_trap_symbol): Declare. ! ! 2003-03-21 Jan Hubicka ! ! PR inline-asm/7916 ! ! * function.c (instantiate_virtual_regs_lossage): New function. ! (instantiate_virtual_regs_1): Use it. ! (instantiate_virtual_regs): Do not continue in substition when insn has ! been deleted. ! ! 2003-03-21 Ulrich Weigand ! ! * config/s390/s390.h: Do not include fixdfdi.h on s390x. ! (TARGET_64BIT): Define as compile-time constant when IN_LIBGCC2. ! (MIN_UNITS_PER_WORD): Do not define when IN_LIBGCC2. 2003-03-21 Volker Reichelt *************** *** 215,222 **** * doc/extend.texi: Move misplaced paragraph about underscores in variables in macros. 2003-03-21 Eric Botcazou ! Richard Henderson PR optimization/8366 * config/sparc/sparc.h: (SYMBOLIC_CONST): New macro. --- 1287,1303 ---- * doc/extend.texi: Move misplaced paragraph about underscores in variables in macros. + 2003-03-21 Volker Reichelt + + * doc/invoke.texi: Fix table environment. + + 2003-03-21 Richard Earnshaw + + * ifcvt.c (find_if_case_1): If we add a new bb, update the dominance + information. + 2003-03-21 Eric Botcazou ! Richard Henderson PR optimization/8366 * config/sparc/sparc.h: (SYMBOLIC_CONST): New macro. *************** *** 230,286 **** * fold-const.c (extract_muldiv_1): Revert changing order of operands in case MULT_EXPR of 2003-02-16 patch. ! 2003-03-19 Eric Botcazou ! PR optimization/8746 ! Backport from mainline: ! Thu Jun 6 23:14:46 CEST 2002 Jan Hubicka ! * i386.md (and promoting splitters): Disable QI to SImode promoting ! when doing so changes immediate to be 32bit. 2003-03-19 Jakub Jelinek ! * stmt.c (expand_start_case): Call emit_queue (). 2003-03-19 Jakub Jelinek * ifcvt.c (dead_or_predicable): Fail if there are any references to tablejump in merge_bb other than the final JUMP_INSN. 2003-03-19 Alan Modra PR target/10073 * combine.c (force_to_mode ): Use gen_int_mode. 2003-03-17 Dave Love Rainer Orth ! * config/alpha/osf.h (CPP_PREDEFINES): Define __digital__, __arch64__ to match Compaq cc. - - 2003-03-17 Andreas Schwab ! PR target/7248 ! * config/m68k/m68k.md (iordi3): Fix setting low half to -1. From ! martin@blom.org. 2003-03-16 Richard Henderson * config/i386/i386.md (movstrictqi, movstrictqi_1): Check optimize_size as well. 2003-03-16 Falk Hueffner ! PR target/9164 ! * tree.c (get_narrower): For extensions with unchanged bit number, ! return the unsignedness of the outer mode. ! 2003-03-14 Jakub Jelinek ! * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Don't call ! rs6000_maybe_dead if !fromprolog. 2003-03-14 Eric Botcazou --- 1311,1526 ---- * fold-const.c (extract_muldiv_1): Revert changing order of operands in case MULT_EXPR of 2003-02-16 patch. ! 2003-03-20 Richard Henderson ! PR c/8602 ! * integrate.c (output_inline_function): Reset input_filename ! and lineno from the decl before rest_of_compilation. ! 2003-03-20 Richard Earnshaw ! PR 10066 ! * arm.md (UNSPEC_PIC_BASE): New constant. ! (pic_add_dot_plus_four): Wrap with unspec. ! (pic_add_dot_plus_eight): Likewise. ! ! 2003-03-19 Ulrich Weigand ! ! * config/s390/s390.c (s390_preferred_reload_class): Do not ! force constants to the pool unless necessary. ! (s390_decompose_address): Prefer to use pointer as base, ! not index register. ! * config/s390/s390.md ("*tsthiCCT_only"): Remove '?' from ! Q alternative. ! ("*movdi_64", "*movsi", "movhi", "movqi_64", "movqi", ! "*movdf_64", "*movsf"): Add '?' to Q->Q alternatives. ! ("*extractqi", "*extracthi", "*zero_extendhisi2_31", ! "*zero_extendqisi2_31", "*zero_extendqihi2_31", ! "*adddi3_31", "*subdi3_31"): Do not set "type" attribute. 2003-03-19 Jakub Jelinek ! * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Don't call ! rs6000_maybe_dead if !fromprolog. 2003-03-19 Jakub Jelinek * ifcvt.c (dead_or_predicable): Fail if there are any references to tablejump in merge_bb other than the final JUMP_INSN. + 2003-03-19 Jakub Jelinek + + * stmt.c (expand_start_case): Call emit_queue (). + + 2003-03-19 John David Anglin + + PR 10062 + * config/pa/pa-hpux.h (TARGET_HPUX_UNWIND_LIBRARY): Redefine. + * pa-protos.h (output_lbranch): New prototype. + * pa.c (compute_frame_size): Change size of the frame marker on the + 64-bit ports to 48 bytes. + (pa_output_function_prologue): Document why SAVE_SP is set. + (hppa_expand_prologue): Save previous stack pointer into frame marker + on targets which use the hpux unwind library. + (output_cbranch): Use output_lbranch. + (output_lbranch): New function to output long unconditional branches. + * pa.h (TARGET_HPUX_UNWIND_LIBRARY): Define. + (STACK_POINTER_OFFSET): Update offset for 48-byte frame marker on + 64-bit ports. + * pa.md (jump): Use output_lbranch. + (allocate_stack): New expander for dynamic stack allocation. + + 2003-03-18 Alexandre Oliva + + * toplev.c (independent_decode_option): Return success for --help, + --target-help and --version. + 2003-03-19 Alan Modra PR target/10073 * combine.c (force_to_mode ): Use gen_int_mode. + 2003-03-18 Andreas Schwab + + PR target/7248 + * config/m68k/m68k.md (iordi3): Fix setting low half to -1. From + martin@blom.org. + + 2003-03-17 Jason Merrill + + PR c++/10091 + * expr.c (expand_expr) [ADDR_EXPR]: Disallow taking the address of + an unaligned member of TREE_ADDRESSABLE type. + + 2003-03-17 Kaveh R. Ghazi + + * dwarf2asm.h: Delete obsolete comment. + (dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset, + dw2_asm_output_pcrel, dw2_asm_output_addr, + dw2_asm_output_addr_rtx, dw2_asm_output_encoded_addr_rtx, + dw2_asm_output_nstring, dw2_asm_output_data_uleb128, + dw2_asm_output_data_sleb128, dw2_asm_output_delta_uleb128, + dw2_asm_output_delta_sleb128): Add ATTRIBUTE_NULL_PRINTF. + + 2003-03-17 Steve Ellcey + + * stmt.c (tail_recursion_args): Call promote_mode to set + unsignedp flag correctly before calling convert_move. + 2003-03-17 Dave Love Rainer Orth ! * config/alpha/osf.h (TARGET_OS_CPP_BUILTINS): Define __digital__, __arch64__ to match Compaq cc. ! 2003-03-17 Michael Hayes ! ! * function.c (thread_prologue_and_epilogue_insns): Set delete_unused ! argument to 0 for redirect_jump. ! ! 2003-03-16 Mark Mitchell ! ! PR c++/8805 ! * except.c (eh_region_u_cleanup): Add prev_try. ! (expand_eh_region_end_cleanup): Set it. ! (reachable_handlers): Use it to skip over cleanup blocks. ! ! 2003-03-16 Richard Henderson ! ! PR opt/6798 ! * cfgcleanup.c: Include params.h. ! (try_crossjump_bb): Use PARAM_MAX_CROSSJUMP_EDGES. Fix test for ! too many outgoing edges from a block. ! * Makefile.in (cfgcleanup.o): Depend on PARAMS_H. ! * params.def (max-crossjump-edges): New. ! * doc/invoke.texi: Document it. 2003-03-16 Richard Henderson * config/i386/i386.md (movstrictqi, movstrictqi_1): Check optimize_size as well. + 2003-03-16 Stephane Carrez + + * config/m68hc11/m68hc11.c (print_operand): Handle 'b' modifier + for D register to specify the low part of it, aka B. + (m68hc11_gen_movhi): Use REG_WAS_0 note and increment or decrement + the register if we are loading 1 or -1 to it; avoid using temp + register when moving X/Y to Y/X. + (m68hc11_gen_movqi): Likewise. + (m68hc11_check_z_replacement): Fix last insn setting for compare case. + + 2003-03-14 Mark Mitchell + + PR optimization/9016 + * config/i386/i386.c (ix86_expand_move): Force more CONST_DOUBLEs + into the constant pool. + 2003-03-16 Falk Hueffner ! PR target/9164 ! * tree.c (get_narrower): For extensions with unchanged bit number, ! return the unsignedness of the outer mode. ! 2003-03-16 Roger Sayle ! * c-typeck.c (build_component_ref): Turn "for" into "do .. while" ! to avoid "may be used uninitialized" warning on ia64-hpux. ! * config/ia64/ia64-c.c: Include "tm_p.h" for function prototypes. ! ! 2003-03-16 Neil Booth ! ! * cppinit.c: Remove support of -A-. ! * doc/cppopts.texi: Remove documentation of -A-. ! ! 2003-03-15 Richard Henderson ! ! 2003-01-14 Richard Henderson ! * config/alpha/alpha.c (alpha_expand_mov): Use correct mode ! for force_const_mem. ! ! 2003-03-15 Richard Henderson ! ! PR target/9700 ! * config/alpha/alpha.c (alpha_va_start): Account for ! current_function_pretend_args_size in the AP offset. ! ! 2003-03-15 Jason Merrill ! ! PR debug/6387 ! * dwarf2out.c (dwarf2out_decl): If we're at -g1, just stick nested ! function DIEs at toplevel. ! (decls_for_scope): At -g1, don't descend into subblocks. ! ! 2003-03-15 Ulrich Weigand ! ! * varasm.c (struct rtx_const): Change type of un.addr member ! to struct holding an additional 'symbol' member. ! (decode_rtx_const): Re-enable optimization to count SYMBOL_REFs ! with equal string addresses as equal. ! (simplify_subtraction): Adapt to struct rtx_const change. ! ! 2003-03-15 Glen Nakamura ! ! * reload1.c (choose_reload_regs): Use && instead of || ! with REG_CANNOT_CHANGE_MODE_P condition. ! ! 2003-03-15 Michael Hayes ! ! PR optimization/9387 ! * function.c (thread_prologue_and_epilogue_insns): Use redirect jump ! for conditional returns. ! ! 2003-03-14 Jason Merrill ! ! PR optimization/6871 ! * varasm.c (assemble_variable): Leave constant zeroes in .rodata. ! ! 2003-03-12 Andrew Lewycky ! ! PR c++/7050 ! * expr.c (store_expr): Don't attempt to store void-typed trees, ! just evaluate them for side effects. 2003-03-14 Eric Botcazou *************** *** 289,303 **** of read-only constant arguments is passed with the right type. 2003-03-14 Andreas Jaeger ! * config/i386/linux64.h (CPP_SPEC): Define __LP64__ and _LP64 for ! 64-bit. 2003-03-12 Richard Henderson ! PR opt/8178 ! * config/i386/i386.md (ffssi2): Tighten op1 predicate to ! the requirements of the output insns. 2003-03-12 Andrew Lewycky --- 1529,1580 ---- of read-only constant arguments is passed with the right type. 2003-03-14 Andreas Jaeger + Gwenole Beauchesne ! * linux64.h (TARGET_OS_CPP_BUILTINS): Define _LP64 and __LP64__ in ! 64-bit mode. ! ! 2003-03-13 Mike Stump ! ! * ggc-page.c (struct page_entry): Remove varray.h header. ! Add index_by_depth field. ! Remove save_in_use_p field. ! (struct globals): Add depth_in_use, depth_max, by_depth_in_use, ! by_depth_max, by_depth, and save_in_use fields. ! (INITIAL_PTE_COUNT): Add. ! (save_in_use_p_i): Add. ! (save_in_use_p): Add. ! (adjust_depth): Add. ! (push_depth): Add. ! (push_by_depth): Add. ! (prefetch): Add. ! (free_page): Add support for and use faster data structures. ! (ggc_alloc): Likewise. ! (init_ggc): Likewise. ! (ggc_recalculate_in_use_p): Likewise. ! (ggc_pop_context): Likewise. ! (clear_marks): Likewise. ! * Makefile.in (ggc-page.o): Remove varray.h. ! ! 2003-03-12 John David Anglin ! ! * pa.c (pa_init_builtins): Fix warning. 2003-03-12 Richard Henderson ! PR opt/8178 ! * config/i386/i386.md (ffssi2): Tighten op1 predicate to ! the requirements of the output insns. ! ! 2003-03-12 Steve Ellcey ! ! * config/ia64/ia64.h (ASM_OUTPUT_XDATA_CHAR): Remove. ! (ASM_OUTPUT_XDATA_SHORT): Remove. ! (ASM_OUTPUT_XDATA_INT): Remove. ! (ASM_OUTPUT_XDATA_DOUBLE_INT): Remove. ! (ASM_OUTPUT_ADDR_DIFF_ELT): Handled 32 bit address diffs. ! (ASM_PREFERRED_EH_DATA_FORMAT): Handle 32 bit EH pointers. ! (CASE_VECTOR_MODE): Handle 32 bit pointers in case statement. 2003-03-12 Andrew Lewycky *************** *** 314,319 **** --- 1591,1612 ---- to detect carry. (subdi3): Reorder emitted instructions. + 2003-03-12 Jan Hubicka + + * i386.c (ix86_setup_incoming_varargs): Set stack_alignment_needed to 128. + + 2003-03-12 Daniel Jacobowitz + + Fix PR target/9797 and PR c/9853. + * stmt.c (expand_decl_init): Call push_temp_slots () and + pop_temp_slots (). + + 2003-03-12 Hans-Peter Nilsson + + * configure.in (rlim_t): Define to long if no valid definition + found in sys/resource.h. + * config.in, configure: Regenerate. + 2003-03-12 Eric Botcazou PR c/9928 *************** *** 331,347 **** 2003-03-12 Eric Botcazou PR optimization/9888 - Backport patch from mainline: - - Tue Nov 19 23:50:56 CET 2002 Jan Hubicka - - * i386.md (length_immediate): Do not refer to insn address. - (jcc*, jmp patterns): Compute length explicitly. - (doloop_end_internal pattern): Unconditionally set the type to "ibr". - - 2003-03-12 Eric Botcazou - - PR optimization/9888 * config/i386/i386.md (movsi_1): Remove special alternatives for %eax register. (movhi_1): Likewise. --- 1624,1629 ---- *************** *** 349,371 **** short displacement when there is no base. (ix86_attr_length_address_default): Handle LEA instructions. ! 2003-03-09 Eric Botcazou ! PR optimization/9888 ! Backport patch from mainline: ! 2002-07-03 Eric Botcazou ! Jeff Law ! * i386.md (length_immediate attribute): Fix typo. ! (length_address attribute): Likewise. ! (modrm attribute): Set it to 0 for immediate call instructions. ! (jcc_1 pattern): Set modrm attribute to 0. ! (jcc_2 pattern ): Likewise. ! (jump pattern): Likewise. ! (doloop_end_internal pattern): Explicitly set length. ! (leave pattern): Fix typo. ! (leave_rex64 pattern): Likewise. 2003-03-08 Eric Botcazou --- 1631,1771 ---- short displacement when there is no base. (ix86_attr_length_address_default): Handle LEA instructions. ! 2003-03-11 Loren James Rittle ! (per-port preprocessor fix, concurrent to Neil's cppinit.c fix) ! * config/freebsd-spec.h (FBSD_CPP_PREDEFINES): Remove. ! (FBSD_TARGET_OS_CPP_BUILTINS): New port-specific macro. ! (FBSD_TARGET_CPU_CPP_BUILTINS): New port-specific macro. ! * config/freebsd.h (CPP_PREDEFINES): Remove. ! (TARGET_OS_CPP_BUILTINS): New. ! * config/alpha/freebsd.h: Use overridden FBSD_TARGET_CPU_CPP_BUILTINS ! instead of TARGET_OS_CPP_BUILTINS. ! * config/sparc/freebsd.h (CPP_PREDEFINES): Remove. ! 2003-03-11 Franz Sirl ! PR bootstrap/9994 ! Backport from mainline: ! ! 2003-02-18 Roger Sayle ! ! * sbitmap.c (sbitmap_resize): New function. ! * sbitmap.h (sbitmap_resize): Prototype here. ! * recog.c (split_all_insns): Use sbitmap_resize. ! ! Mon Feb 17 16:16:54 CET 2003 Jan Hubicka ! ! * recog.c (split_all_insns): Fix memory overflow. ! ! 2003-02-15 Richard Henderson ! ! * recog.c (split_all_insns): Include new blocks in life update; ! do a global life update. ! ! 2003-03-11 Hans-Peter Nilsson ! ! * config/cris/cris.md: Remove lingering EGCS reference. ! ("*extopqihi_side_biap"): For HI operation, match ! cris_additive_operand_extend_operator, not ! cris_operand_extend_operator. Adjust condition. ! ("*extopqihi_side", "*extopqihi"): Ditto. ! ("*extopqisi_side_biap"): Correct operand numbers in condition. ! ("*extophisi_side_biap", "*extopqisi_swap_side_biap"): Ditto. ! ("*extophisi_swap_side_biap", "*extopqisi_swap"): Ditto. ! ("*extophisi_swap"): Ditto. ! ("*extopqihi_swap_side_biap"): For HI operation, match a simple ! PLUS, not cris_operand_extend_operator. Adjust condition and ! output template. ! ("*extopqihi_swap_side", "*extopqihi_swap"): Ditto. ! * config/cris/cris.h (PREDICATE_CODES): Add ! cris_additive_operand_extend_operator. ! * config/cris/cris.c (cris_additive_operand_extend_operator): ! New predicate. ! ! * config/cris/aout.h (ENDFILE_SPEC): Undef. ! (CRIS_CPP_SUBTARGET_SPEC): Move -D__AOUT__ to... ! (TARGET_OS_CPP_BUILTINS): New macro. ! (HAVE_GAS_HIDDEN): Undef. ! * config/cris/cris.h: Remove EGCS references. ! (CPP_SPEC): Remove "-$". ! (INIT_CUMULATIVE_ARGS): Correct comment. ! * config/cris/cris.h (CRIS_CPP_SUBTARGET_SPEC): Move -D__ELF__ to... ! (TARGET_OS_CPP_BUILTINS): New macro. ! (CPP_PREDEFINES): Don't define. Move old definitions and... ! (CPP_SPEC): ...move -D__CRIS_ABI_version=2 to... ! (TARGET_CPU_CPP_BUILTINS): New macro. ! * config/cris/linux.h (CRIS_CPP_SUBTARGET_SPEC): Move constant ! definitions and the optional __PIC__, __pic__ and ! __NO_UNDERSCORES__ definitions to... ! (TARGET_OS_CPP_BUILTINS): New macro. ! ! 2003-03-10 Devang Patel ! ! PR c++/9394 ! * gcc.c (DEFAULT_SWITCH_TAKES_ARG): Remove. ! (DEFAULT_WORD_SWITCH_TAKES_ARG): Remove. ! * gcc.h (DEFAULT_SWITCH_TAKES_ARG): Add. ! (DEFAULT_WORD_SWITCH_TAKES_ARG): Add. ! * cppspec.c (DEFAULT_SWTICH_TAKES_ARG): Remove. ! (DEFAULT_WORD_SWITCH_TAKES_ARG): Remove. ! ! 2003-03-10 Stephane Carrez ! ! * config/m68hc11/m68hc11.h (HARD_REGNO_RENAME_OK): Define. ! * config/m68hc11/m68hc11-protos.h (m68hc11_hard_regno_rename_ok): ! Declare. ! * config/m68hc11/m68hc11.c (m68hc11_hard_regno_rename_ok): New function ! for reg rename optimization to avoid using Z and Y registers. ! ! 2003-03-10 Stephane Carrez ! ! * config/m68hc11/m68hc11.md ("*addhi3_68hc12"): Accept any constant ! when adding to X and Y since leax/leay are fast. ! ("*addhi3"): Accept 'I' constraint when adding to address register. ! ("rotlhi3"): Operand 1 must be a register_operand. ! (peephole2): New peephole to optimize some adds. ! * config/m68hc11/m68hc11.h (CONST_OK_FOR_LETTER_P): Use 'I' constraint ! to represent -2 .. 2 small integer range. ! ! 2003-03-10 Stephane Carrez ! ! * config/m68hc11/m68hc11.c (m68hc11_gen_rotate): Set carry before ! each 16-bit rotation. ! ! 2003-03-10 Aldy Hernandez ! ! * config/rs6000/spe.h: Merge from mainline. ! ! 2003-03-10 Jan Hubicka ! ! * toplev.c (rest_of_compilation): Revert the previous patch. ! ! 2003-03-09 John David Anglin ! ! PR middle-end/9986 ! * c-common.c (c_common_nodes_and_builtins): Initialize target builtins ! after the common builtins. ! * pa-hpux.h (DONT_HAVE_FPUTC_UNLOCKED): Define. ! * pa.c (TARGET_INIT_BUILTINS): Define. ! (pa_init_builtins): New function. ! ! * pa.md (call, call_value, sibcall, sibcall_value): When sufficient ! space has been allocated for the outgoing arguments, set the arg ! pointer for a call emitted after virtuals have been instantiated ! using the stack pointer offset, otherwise abort. ! ! 2003-03-06 Jan Hubicka ! ! * toplev.c (rest_of_compilation): Defer RTL compilation only when ! RTL inlining is done. ! ! * i386.c (ix86_expand_vector_move): Do not crash when offloading ! to memory in PIC mode. ! ! 2003-03-08 Neil Booth ! ! * cppinit.c (cpp_finish_options): Set first_unused_line to -1. 2003-03-08 Eric Botcazou *************** *** 383,400 **** * function.c (assign_parms): Don't set pretend_args_size if REG_PARM_STACK_SPACE. ! 2003-03-06 Reinhard Jessich ! PR 9954/other ! * config/i386/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Since this uses ! it should be wrapped in an inhibit_libc conditional ! like the same code in config/i386/linux64.h. 2003-03-05 Eric Botcazou PR c/9799 * c-typeck.c (push_init_level): Add sanity check. 2003-02-28 Bob Wilson Backport following patch: --- 1783,1993 ---- * function.c (assign_parms): Don't set pretend_args_size if REG_PARM_STACK_SPACE. ! 2003-03-06 Kurt Garloff ! Geoffrey Keating ! Dale Johannesen ! * params.def: Introduce parameter max-inline-insns-rtl for ! a separate limit for the RTL inliner. ! * params.h: Likewise. ! * integrate.c (function_cannot_inline_p): Use it. ! * toplev.c (decode_f_option): Set multiple parameters ! controlling inlining with -finline-limit. ! * params.def: Fix orthographic and typographic errors. ! * doc/invoke.texi: Document parameters controlling inlining ! and the way -finline-limit sets multiple of them. ! * tree.h (struct tree_decl): Introduce inlined_function_flag, ! recording whether the function became eligible for inlining ! by a compiler flag rather than the declaration. ! Provide DID_INLINE_FUNC macro to access it. ! * c-decl.c (grokdeclarator): Set DID_INLINE_FUNC. ! * cp/decl.c (grokfndecl): Likewise. ! * toplev.c (rest_of_compilation): Likewise. ! * cp/optimize (maybe_clone_body): Copy DID_INLINE_FUNC. ! * print-tree.c (print_node): Report it. ! * params.def: Introduce new max-inline-insns-auto limit. ! * params.h: Likewise. ! * tree-inline.c (inlinable_function_p): Apply it to functions ! with DID_INLINE_FUNC set. ! * toplev.c (decode_f_option): Initialize it from -finline-limit ! value. ! * doc/invoke.texi: Document new parameter. ! 2003-03-06 Michael Matz ! ! * i386/i386.c (ix86_save_reg): Also test ! current_function_uses_const_pool. ! ! 2003-03-05 John David Anglin ! ! * pa.md (return_external_pic): Add !TARGET_PA_20 to constraint. ! (epilogue): Don't generate return_external_pic when emitting PA 2.0 ! code. ! ! 2003-03-05 Stephane Carrez ! ! * config/m68hc11/m68hc11.h (PAD_VARARGS_DOWN): Define and return ! according to va_arg type. ! (EXPAND_BUILTIN_VA_ARG): Remove. ! * config/m68hc11/m68hc11.c (m68hc11_va_arg): Remove. ! * config/m68hc11/m68hc11-protos.h (m68hc11_va_arg): Remove. ! ! 2003-03-05 Jan Hubicka ! ! * toplev.c (rest_of_compilation): Do duplicate loop headers when ! optimizing for size. ! ! 2003-03-05 Michael Matz ! ! * unwind.h: Add the GPL exception. ! * Makefile.in (USER_H): Add unwind.h. 2003-03-05 Eric Botcazou PR c/9799 * c-typeck.c (push_init_level): Add sanity check. + 2003-03-04 Steve Ellcey + + * expr.c (convert_modes): Check for legal hard register. + + 2003-03-04 Andreas Schwab + + * config/m68k/m68k.c (m68k_output_function_prologue): Fix CFA + offset without frame pointer. + + 2003-03-04 Steve Ellcey + + * expr.c (expand_expr): Call promote_mode to set unsignedp. + + 2003-03-04 Roger Sayle + + PR c++/9367 + * builtin-types.def (DEF_FUNCTION_TYPE_VAR_3): New macro. + (BT_FN_INT_CONST_STRING_VALIST_ARG, + BT_FN_INT_STRING_CONST_STRING_VALIST_ARG, + BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG, + BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG, + BT_FN_INT_STRING_CONST_STRING_VAR, + BT_FN_INT_CONST_STRING_CONST_STRING_VAR, + BT_FN_INT_STRING_SIZE_CONST_STRING_VAR): New built-in types. + * builtin-attrs.def (ATTR_NONNULL_1, ATTR_NONNULL_2, + ATTR_NONNULL_3): Also include the nothrow attribute. + (sprintf, scanf, sscanf, vprintf, vsprintf, snprintf, + vsnprintf, vscanf, vsscanf): Don't define attributes here. + * builtins.def (putchar, puts): Make full C89 built-ins. + (snprintf, sprintf, scanf, sscanf, vprintf, vscanf, + vsscanf, vsnprintf, vsprintf): New built-ins. + * c-common.c (c_common_nodes_and_builtins): Handle new macro + DEF_FUNCTION_TYPE_VAR_3. + + * doc/extend.texi: Document these new built-in functions. + + 2003-03-04 Jan Hubicka + + * calls.c (rtx_for_function_call): Take the address as an argument + (expand_call): Do not modify the expression. + + 2003-03-04 Kevin Buettner + + * dwarf2out.c (rtl_for_decl_location): Don't return NULL_RTX for + global register variables. + + 2003-03-03 Richard Henderson + + * configure.in (HAVE_AS_LTOFFX_LDXMOV_RELOCS): New ia64 test. + * config.in, configure: Rebuild. + * config/ia64/ia64.c (ia64_ld_address_bypass_p): Accept lo_sum. + * config/ia64/ia64.md (load_symptr): Use high/lo_sum for the + paired ldtoffx and ldxmov annotations. + (load_symptr_internal1): Remove. + (load_symptr_high, load_symptr_low): New. + * config/ia64/ia64.h (HAVE_AS_LTOFFX_LDXMOV_RELOCS): Default to 0. + + 2003-03-03 Jason Merrill + + * calls.c (compute_argument_addresses): Give the new MEMs a + minimum alignment of PARM_BOUNDARY. + + 2003-03-03 Geoffrey Keating + + * doc/install.texi (Specific): Update entry for powerpc-darwin. + + 2003-03-03 Jan Hubicka + * toplev.c (rest_of_compilation): Avoid cfg_cleanup calls when not + optimizing. + + 2003-02-28 Jan Hubicka + + * combine.c (gen_lowpart_for_combine): Update handling of subregs_of_mode + * flow.c (life_analysis, mark_used_regs): Likewise. + * regclass.c (subregs_of_mode): Turn into single bitmap. + (cannot_change-mode_set_regs, invalid_mode_change_p): Update + dealing with subregs_of_mode + * regs.h (subregs_of_mode): Update prototype. + + 2003-02-28 Jan Hubicka + + * toplev.c (rest_of_compilation): Rearrange insn splitting + * reg-stack.c (reg_to_stack): Do not split insns. + + 2003-03-02 Kaveh R. Ghazi + + * ggc-common.c (ggc_rlimit_bound): Cast RLIM_INFINITY to avoid + warnings. + + 2003-03-02 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_override_options): Don't enable + min/max instructions by default as may result in reload errors. + + 2003-03-02 Stephane Carrez + + * config/m68hc11/m68hc11.md ("mulqi3"): Allow address register to + avoid reload problems; define split for it. + + 2003-03-02 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_shift_operator): New function. + * config/m68hc11/m68hc11-protos.h (m68hc11_shift_operator): Declare. + * config/m68hc11/m68hc11.h (PREDICATE_CODES): Register. + * config/m68hc11/m68hc11.md ("rotrhi3", "rotlhi3"): New patterns for + rotatert and rotate. + ("rotrhi3_const", "rotlhi3_const"): Rename of old 'rotrhi3' insns. + ("*rotrhi3", "*rotlhi3"): New insn pattern for non-const rotatert. + ("*rotrhi3_addr"): New split for shift insns on address register. + ("*lshrhi3", "*ashrhi3", "*ashlhi3_2"): Use new split. + * config/m68hc11/larith.asm (___rotlhi3): New asm function. + (___rotrhi3): Likewise. + * config/m68hc11/t-m68hc11-gas (LIB1ASMFUNCS): Build them. + + 2003-03-02 Kaveh R. Ghazi + + * fp-bit.h (float_to_usi): Fix condition wrapping prototype. + + 2003-03-02 Ashif Harji + + * gcc.c (default_compilers): Add -no-integrated-cpp flag to invoke + an external cpp during compilation. + (option_map): Likewise. + * objc/lang-specs.h (default_compilers): Similarly. + * doc/invoke.texi: Document -no-integrated-cpp flag. + + 2003-03-01 Jason Thorpe + + * config.gcc (*-*-netbsd[2-9]*, *-*-netbsdelf[2-9]*): Enable + POSIX thread support by default. + + 2003-03-01 Roger Sayle + + PR bootstrap/7389. + * basic-block.h (flow_bb_inside_loop_p): Correct prototype. + + 2003-02-28 Jason Thorpe + + * config/netbsd.h: Update copyright years. + (NETBSD_CPP_SPEC): Define _REENTRANT and _PTHREADS if + -pthread is specified on the command line. + 2003-02-28 Bob Wilson Backport following patch: *************** *** 402,430 **** 2003-02-28 Bob Wilson * config.gcc (xtensa-*-linux*): Add t-slibgcc-elf-ver to tmake_file. ! 2003-02-28 Joel Sherrill PR 9638/other ! * config/i386/i386.c (DEFAULT_PCC_STRUCT_RETURN): Ensure the this constant defaults to 1. 2003-02-27 Alan Modra * config/rs6000/rs6000.md: Add TI constant splitter. 2003-02-26 Jan Hubicka ! PR target/8343 ! * m68k.md (umulsidi, mulsidi expanders): Use register operand. ! 2003-02-26 David Billinghurst ! * fixinc/fixincl.x: Regenerate 2003-02-25 Richard Henderson ! * config/i386/i386.c (function_arg): Pass variable sized ! structures correctly on the stack. 2003-02-25 Franz Sirl --- 1995,2058 ---- 2003-02-28 Bob Wilson * config.gcc (xtensa-*-linux*): Add t-slibgcc-elf-ver to tmake_file. ! 2003-02-27 Joel Sherrill PR 9638/other ! * config/i386/i386.c (DEFAULT_PCC_STRUCT_RETURN): Ensure the this constant defaults to 1. + 2003-02-28 Richard Sandiford + + * config/mips/mips.md: Disable the movstrsi define_split. + + 2003-02-28 Richard Sandiford + + * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Wrap in + #ifndef __mips16. + + 2003-02-27 Geert Bosch + + * toplev.c (print_version): Add indentation for GGC heuristics and + output after printing version information. + + 2003-02-27 James E Wilson + + PR bootstrap/9255 + * combine.c (simplify_comparison): Require integral mode when + permuting SUBREG with AND. + + 2003-02-27 Steve Ellcey + + * config/ia64/hpux.h (STARTFILE_PREFIX_SPEC): Remove. + 2003-02-27 Alan Modra * config/rs6000/rs6000.md: Add TI constant splitter. 2003-02-26 Jan Hubicka ! * expr.c (emit_group_store): Fix crash when converting single ! register into complex register. ! 2003-02-26 Michael Matz ! * ra-colorize.c (merge_moves): Fix list handling. ! ! 2003-02-26 John David Anglin ! ! * pa.c (compute_frame_size): Don't assume PREFERRED_STACK_BOUNDARY ! is 8 * STACK_BOUNDARY. ! * pa.h (PREFERRED_STACK_BOUNDARY): Change to 128 on 64-bit port. ! ! 2003-02-26 Alan Modra ! ! PR target/9681 ! * tlink.c (scan_linker_output): Drop leading '.' from symbol names. 2003-02-25 Richard Henderson ! * config/i386/i386.c (function_arg): Pass variable sized ! structures correctly on the stack. 2003-02-25 Franz Sirl *************** *** 436,481 **** * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Make PIC_OFFSET_TABLE_REGNUM a fixed register for -fPIC. ! 2003-02-25 Matthias Klose ! 2003-02-07 Richard Henderson ! PR 9226 ! * gcse.c (local_cprop_find_used_regs): New. ! (local_cprop_pass): Use it. ! 2003-02-25 Matthias Klose ! * config.gcc (m68k-*-linux*): Add crtbeginT.o to extra_parts. 2003-02-24 Rainer Orth ! * config/alpha/osf.h (CPP_SUBTARGET_SPEC): Rename __EXTERN_PREFIX to __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Tru64 Pragmas): Reflect this. * fixinc/inclhack.def (alpha___extern_prefix): Indicate #pragma ! extern_prefix support for Tru64 UNIX V5 . * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_CHECK]: New testcase. Fixes PR c/5059, c/6126, other/9671. ! 2003-02-24 David Billinghurst ! Fixes PR libgcj/9652. ! Backport patch from mainline: ! 2003-02-12 Rainer Orth ! * fixinc/inclhack.def (irix_socklen_t): Fix broken IRIX 6.5.1[78] ! socklen_t definition. ! * fixinc/fixincl.x: Regenerate. ! * fixinc/tests/base/sys/socket.h: New file. ! 2003-02-23 Hans-Peter Nilsson * regmove.c (optimize_reg_copy_1): Do not replace a hard register in an asm. 2003-02-22 Steven Bosscher PR other/3782 --- 2064,2189 ---- * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Make PIC_OFFSET_TABLE_REGNUM a fixed register for -fPIC. ! 2003-02-25 Richard Henderson ! * real.c (real_to_integer2): Force overflow result only for ! unsigned overflow. ! 2003-02-25 Jan Hubicka ! PR target/8343 ! * m68k.md (umulsidi, mulsidi expanders): Use register operand. ! ! 2003-02-24 Svein E. Seldal ! ! * config/c4x/c4x.h (ASM_FILE_START): Added support for the c33 ! processor. 2003-02-24 Rainer Orth ! * config/mips/iris6.h (TARGET_OS_CPP_BUILTINS): Define __c99 for ! ISO C99 and C++. ! ! * fixinc/inclhack.def (irix___restrict): Don't change __restrict ! for C++ on IRIX 6.5.1[89]. ! * fixinc/tests/base/internal/sgimacros.h: New file. ! ! * fixinc/inclhack.def (irix_wcsftime): Use XPG5 variant for C99. ! * fixinc/tests/base/internal/wchar_core.h: New file. ! ! * fixinc/inclhack.def (irix_socklen_t): Fix broken IRIX 6.5.1[78] ! socklen_t definition. ! * fixinc/fixincl.x: Regenerate. ! * fixinc/tests/base/sys/socket.h: New file. ! Fixes PR libgcj/9652. ! ! 2003-02-24 Rainer Orth ! ! * config/alpha/osf.h (TARGET_OS_CPP_BUILTINS): Rename __EXTERN_PREFIX to __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Tru64 Pragmas): Reflect this. * fixinc/inclhack.def (alpha___extern_prefix): Indicate #pragma ! extern_prefix support for Tru64 UNIX V5 . * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_CHECK]: New testcase. Fixes PR c/5059, c/6126, other/9671. ! 2003-02-24 Alan Modra ! PR 9297, PR 9722 ! * calls.c (store_one_arg): Revert 1999-02-16 change. Revert ! 2000-12-17 change. Pass EXPAND_STACK_PARM to expand_expr. ! * expr.h (enum expand_modifier): Define EXPAND_STACK_PARM. ! (enum block_op_methods): Reorder for better store_expr optimization. ! * expr.c (store_expr): Test bit 1 of "want_value" for call param ! stores, test bit 0 for original want_value meaning. Pass ! BLOCK_OP_CALL_PARM to emit_block_move when bit 1 set. Adjust ! recursive calls, and calls to expand_param. ! (expand_expr): Handle EXPAND_STACK_PARM modifier. When cse ! expected, set target to 0 rather than to subtarget. Formatting. ! 2003-02-23 Kaveh R. Ghazi ! * doc/invoke.texi (ggc-min-expand, ggc-min-heapsize): Document ! new default behavior. ! * ggc-common.c: Include sys/resource.h. ! (ggc_rlimit_bound): New function. ! (ggc_min_expand_heuristic, ggc_min_heapsize_heuristic): Update ! defaults to account for rlimits. ! ! 2003-02-22 Jan Hubicka ! ! * config/linux.h (TARGET_HAS_F_SETLKW): Define. ! * config/alpha/linux.h (TARGET_HAS_F_SETLKW): Likewise ! ! 2003-02-22 Hans-Peter Nilsson * regmove.c (optimize_reg_copy_1): Do not replace a hard register in an asm. + 2003-02-22 Jan Hubicka + + * i386.c (builtin_description): Add __builtin_ia32_paddq and + __builtin_ia32_psubq. Fix __builtin_ia32_paddq128 + and __builtin_ia32_psubq128. + * i386.h (IX86_BUILTIN_PADDQ, IX86_BUILTIN_PSUBQ): New. + * i386.md (addv*, mmx_ior*, mmx_xoe*, mmx_and*): Add missing '%'. + (mmx_adddi3, mmx_subdi3): New. + * mmintrin.h (_mm_add_si64, _mm_sub_si64): New. + * xmmintrin.h (_mm_movepi64_pi64): New. + (_mm_add_epi64, _mm_sub_epi64): fix. + (_mm_mul_pu16): Rename to... + (_mm_mul_su32): ... this one. + + * i386.c (def_builtin): Special case 64bit builtins. + (MASK_SSE164, MASK_SSE264): New constants. + (builtin_description): Add 64bit builtins. + (ix86_init_mmx_sse_builtins): Likewise. + * i386.h (enum ix86_builtins): Likewise. + * i386.md (cvtss2siq, cvttss2siq, cvtsd2siq, cvttsd2siq, cvtsi2sdq, + sse2_movq2dq_rex64, sse2_movsq2q_rex64): New. + (sse2_movq2dq, sse2_movsq2q): Disable for 64bit. + * mmintrin.h (_mm_cvtsi64x_si64, _mm_set_pi64x, _mm_cvtsi64_si64x): New. + * xmmintrin.h (_mm_cvtss_si64x, _mm_cvttss_si64x, _mm_cvtsi64x_ss, + _mm_set_epi64x, _mm_set1_epi64x, _mm_cvtsd_si64x, _mm_cvttsd_si64x, + _mm_cvtsi64x_sd, _mm_cvtsi64x_si128, _mm_cvtsi128_si64x): New. + + * builtins.c (expand_builtin_expect): Do not predict + flag_guess_branch_prob is not set. + * c-semantics.c (expand_stmt): Likewise. + * predict.c (predict_insn): Likewise. + * stmt.c (expand_continue_loop): Likewise. + * toplev.c (rest_of_compilation): Do not call + note_prediction_to_br_prob and note_prediction_to_br_prob + when not optimizing. + + * basic-block.h (tidy_fallthru_edges): Kill. + * cfgrtl.c (tidy_fallthru_edges): Kill. + * cfgbuild.c (find_basic_blocks): Do not call tidy_fallthru_edges. + * cfgcleanup.c (delete_unreachable_blocks): Likewise. + 2003-02-22 Steven Bosscher PR other/3782 *************** *** 486,495 **** * jump.c (never_reached_warning): Don't fall through BARRRIER insns. Update comments to reflect what the function really does. ! 2003-02-21 Richard Henderson ! 2003-01-06 Richard Henderson ! * config/alpha/alpha.md (movdi_er_high_g): Allow all symbols. 2003-02-21 Glen Nakamura --- 2194,2233 ---- * jump.c (never_reached_warning): Don't fall through BARRRIER insns. Update comments to reflect what the function really does. ! 2003-02-21 Kaveh R. Ghazi ! * doc/invoke.texi (ggc-min-expand, ggc-min-heapsize): Update ! documentation. ! * ggc-common.c: Include params.h ! (ggc_min_expand_heuristic, ggc_min_heapsize_heuristic, ! init_ggc_heuristics): New functions. ! * ggc.h (ggc_min_expand_heuristic, ggc_min_heapsize_heuristic, ! init_ggc_heuristics): Prototype. ! * toplev.c (print_version): Output GGC heuristics. ! (parse_options_and_default_flags): Call init_ggc_heuristics. ! ! 2003-02-21 Jan Hubicka ! ! * cfgrtl.c (commit_edge_insertions): Call ! find_many_sub_basic_block only when some code has been emitted. ! (commit_edge_insertions_watch_calls): Bring into sync with ! commit_edge_insertions ! ! 2003-02-21 Zack Weinberg ! ! * cpphash.h (struct lexer_state): Add directive_wants_padding. ! * cpplib.c (_cpp_handle_directive): Set directive_wants_padding ! for directives of type INCL. ! (glue_header_name, parse_include): Use get_token_no_padding. ! * cppmacro.c (replace_args): If directive_wants_padding, ! provide padding tokens. ! ! 2003-02-21 Jan Hubicka ! ! * cfgrtl.c (commit_one_edge_insertion): Only mark BB for splitting. ! (commit_edge_insertions): Call find_many_sub_basic_blocks ! ! * reg-stack.c (convert_regs): Cleax aux for blocks. 2003-02-21 Glen Nakamura *************** *** 497,536 **** * builtins.c (expand_builtin): Emit postincrements before expanding builtin functions. ! 2003-02-20 Randolph Chung ! Eric Botcazou ! PR optimization/9768 ! Backport patch from mainline: ! 2002-03-21 DJ Delorie ! * bb-reorder.c (make_reorder_chain_1): Protect against ! when redundant edges are omitted. ! * predict.c (dump_prediction): Likewise. ! 2003-02-20 BAN Nobuhiro ! PR c/9678 ! * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Fix typo. ! 2003-02-18 Jakub Jelinek ! * real.c (asctoeg): Handle denormals in hexadecimal notation. 2003-02-16 Arend Bayer ! Richard Henderson PR c/8068 * fold-const.c (extract_muldiv_1): Rename from extract_muldiv; rearrange mult arguments for less recursion. (extract_muldiv): New. Prevent runaway recursion. ! 2003-02-14 Falk Hueffner PR optimization/7702 * reload1.c (reload_cse_simplify_set): Honor ! CLASS_CANNOT_CHANGE_MODE_P. 2003-02-13 John David Anglin --- 2235,2388 ---- * builtins.c (expand_builtin): Emit postincrements before expanding builtin functions. ! 2003-02-21 Toon Moene ! PR fortran/9038 ! * c-opts.c (sanitize_cpp_opts): Add Fortran front end ! options to be ignored. ! (c_common_decode_option): Ignore them when preprocessing. ! 2003-02-21 Ben Elliston ! PR other/5634 ! * doc/install.texi (Configuration): Explain using $HOME instead of ! the ~ metacharacter when referring to home directories. ! 2003-02-20 Richard Earnshaw ! * arm.c (arm_reload_in_hi): Ensure that the scratch register does ! not overlap the final result register. ! 2003-02-20 Josef Zlomek ! * combine.c (distribute_notes): Kill REG_EXEC_COUNT. ! * rtl.c (reg_note_name): Likewise. ! * rtl.h (enum reg_note): Likewise. ! * doc/invoke.texi: Likewise. ! * doc/rtl.texi: Likewise. ! ! 2003-01-30 Richard Henderson ! ! * tree-inline.c (walk_tree): Streamline duplicate hash table lookup. ! ! 2003-02-19 Daniel Jacobowitz ! ! * expr.c (expand_expr): Use gen_int_mode for the argument ! to gen_rtx_MULT. ! ! 2003-02-19 Jan Hubicka ! ! * i386.md (cosxf2): Fix conditional. ! ! 2003-02-18 Matt Austern ! * toplev.c, langhooks.c, langhooks-def.h: Move ! write_global_declarations from toplev.c to langhooks.c. ! ! 2003-02-18 Kazu Hirata ! ! * config/h8300/h8300.c (general_operand_src): Always check ! MODE. ! (general_operand_dst): Likewise. ! ! 2003-02-18 Richard Henderson ! ! * c-common.c (handle_used_attribute): Accept static data too. ! ! 2003-02-18 Jim Wilson ! ! * config/ia64/ia64.md (floatdidf2, floatdisf2): Add %, before second ! instruction in output template. ! (bsp_value): Change output template from string to C code, add %, ! before actual instruction. ! (flushrs): Mark as not predicable. ! ! 2003-02-18 Kazu Hirata ! ! * config/h8300/h8300.md (*zero_extendhisi2_h8300): Fix the ! insn length. ! (extendqisi2): Likewise. ! (*extendhisi2_h8300): Likewise. ! ! 2003-02-18 Matt Austern ! ! * langhooks.h, langhooks-def.h: introduce new langhook, ! final_write_globals, with write_global_declarations as default. ! * toplev.c: Move invocation of wrapup_global_declarations from ! compile_file to new function, write_global_declarations. Change ! compile_file to use final_write_globals hook. Change ! wrapup_global_declarations so writing to DECL_DEFER_OUTPUT is ! conditional. ! ! 2003-02-18 John David Anglin ! ! * pa.md: Correct and enhance comment. ! ! 2003-02-16 Kai Henningsen ! Gerald Pfeifer ! ! * doc/install.texi (Specific): Fix link for m68k-att-sysv. ! (Binaries): Ditto for Sinix/Reliant Unix. ! ! 2003-02-16 Zdenek Dvorak ! ! * config/i386/i386-protos.h (function_arg_pass_by_reference): Declare. ! * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use it. ! * config/i386/i386.c (function_arg_pass_by_reference): New. ! (ix86_va_arg): Support arguments passed by reference. 2003-02-16 Arend Bayer ! Richard Henderson PR c/8068 * fold-const.c (extract_muldiv_1): Rename from extract_muldiv; rearrange mult arguments for less recursion. (extract_muldiv): New. Prevent runaway recursion. ! 2003-02-16 Danny Smith ! ! * config/i386/cygwin.h (TARGET_SUBTARGET_DEFAULT): Set ! MASK_ALIGN_DOUBLE. ! ! 2003-02-15 Adam Nemet ! ! PR opt/2391 ! * combine.c: Fix spelling in comment. ! (cached_nonzero_bits): New function. ! (cached_num_sign_bit_copies): New function. ! (nonzero_bits_with_known): New macro. ! (num_sign_bit_copies_with_known): New macro. ! (nonzero_bits1): Rename from nonzero_bits. Add three new ! arguments. Change calls from nonzero_bits to ! nonzero_bits_with_known. ! (num_sign_bit_copies1): Rename from num_sign_bit_copies. Add ! three new arguments. Change calls from num_sign_bit_copies to ! num_sign_bit_copies_with_known. ! (nonzero_bits): New macro. ! (num_sign_bit_copies): New macro. ! (update_table_tick): Don't traverse identical subexpression more ! than once. ! (get_last_value_validate): Likewise. ! ! 2003-02-15 Falk Hueffner PR optimization/7702 * reload1.c (reload_cse_simplify_set): Honor ! CANNOT_CHANGE_MODE_CLASS. ! ! 2003-02-15 Jan Hubicka ! ! PR optimization/9258, PR fortran/7681 ! * global.c (struct allocno): Add no_stack_reg. ! (global_conflicts): Set it. ! (find_reg): Use it. ! ! 2003-02-14 Alexandre Oliva ! ! * config/mn10300/mn10300.c (mn10300_wide_const_load_uses_clr): New ! function. ! * config/mn10300/mn10300-protos.h: Declare it. ! * config/mn10300/mn10300.md (movdi, movdf): Use it to compute ! attribute cc of instructions that may use clr. 2003-02-13 John David Anglin *************** *** 538,572 **** regexp. * fixincl.x: Rebuilt. 2003-02-13 Josef Zlomek * cfgcleanup.c (outgoing_edges_match): When there is single outgoing edge and block ends with a jump insn it must be simple jump. ! 2003-02-12 John David Anglin ! PR9275 and PR8694 ! * inclhack.def (hpux_long_double, hpux10_ctype_declarations1, ! hpux10_ctype_declarations2, hpux_ctype_macros): New hacks. ! * fixincl.x: Rebuilt. ! * tests/base/stdlib.h: Update. ! * tests/base/ctype.h: New file. ! 2003-02-12 Kaveh R. Ghazi ! * mips.h (FP_INC): Define. ! Backport fix for PR6362: ! 2002-10-01 Richard Sandiford ! ! * config/mips/mips-protos.h (mips_emit_fcc_reload): Declare. ! * config/mips/mips.h (PREDICATE_CODES): Add fcc_register_operand. ! * config/mips/mips.c (fcc_register_operand): New function. ! (mips_emit_fcc_reload): New function, extracted from reload_incc. ! * cnfig/mips/mips.md (reload_incc): Change destination prediate ! to fcc_register_operand. Remove misleading source constraint. ! Use mips_emit_fcc_reload. ! (reload_outcc): Duplicate reload_incc. 2003-02-11 Bob Wilson --- 2390,2450 ---- regexp. * fixincl.x: Rebuilt. + 2003-01-30 Richard Henderson + + * ggc-page.c (G.context_depth_allocations): New. + (G.context_depth_collections): New. + (alloc_page): Set G.context_depth_allocations. + (ggc_collect): Set G.context_depth_collections. + (ggc_push_context): Limit to HOST_BITS_PER_LONG contexts. + (ggc_pop_context): Early exit for no allocations or collections. + + 2003-01-25 Segher Boessenkool + + * bitmap.h (BITMAP_WORD): New typedef: fundamental storage + type for bitmaps. Use unsigned long. + (nBITMAP_WORD_BITS): New macro. + (BITMAP_WORD_BITS): New macro. + (rest of file): Use it. + * bitmap.c: Use it. + 2003-02-13 Josef Zlomek * cfgcleanup.c (outgoing_edges_match): When there is single outgoing edge and block ends with a jump insn it must be simple jump. ! 2003-02-13 Robert Lipe ! Gerald Pfeifer ! * doc/install.texi (Specific): Update three SCO-related URLs. ! 2003-02-12 Ranjit Mathew ! * doc/tm.texi (MODIFY_JNI_METHOD_CALL): Document. ! * config/i386/cygwin.h (MODIFY_JNI_METHOD_CALL): New macro. ! 2003-02-11 Gerald Pfeifer ! ! * doc/install.texi (Specific): Update AVR- and Darwin-related URLs. ! ! 2003-02-11 Eric Botcazou ! ! PR c/9100 ! Backport patch from mainline: ! ! 2003-01-12 Mark Mitchell ! ! PR c++/9264 ! * c-lex.c (c_lex): Set the token value to error_mark_node for ! invalid numeric constants. ! ! 2003-02-11 Jan Hubicka ! ! * i386.md (ahi?v*3): Set third operand type to TImode. ! * i386.c (ix86_expand_binop_builtin): Extend operand when needed. ! ! * i386.c (contains_128bit_aligned_vector_p): New function ! (ix86_function_arg_boundary): Properly align vector modes. 2003-02-11 Bob Wilson *************** *** 577,583 **** * config/xtensa/xtensa.md (set_frame_ptr): Change rtl to set reg a7. * config/xtensa/xtensa.c (xtensa_reorg): Search for UNSPECV_SET_FP as a SET pattern. ! 2003-02-10 Eric Botcazou Christian Ehrhardt --- 2455,2511 ---- * config/xtensa/xtensa.md (set_frame_ptr): Change rtl to set reg a7. * config/xtensa/xtensa.c (xtensa_reorg): Search for UNSPECV_SET_FP as a SET pattern. ! ! 2003-02-11 Jan Hubicka ! ! * simplify-rtx.c (simplify_subreg): Fix conversion from vector into ! integer mode. ! ! * rtl.def (VEC_MERGE, VEC_SELECT, VEC_CONCAT, VEC_DUPLICATE): ! Change code so they are arithmetic expressions now. ! * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, ! simplify_ternary_operation): Deal with VEC_* expressions. ! ! 2003-02-11 Richard Henderson ! ! 2003-01-15 Richard Henderson ! * config/alpha/alpha.c (find_lo_sum_using_gp): Rename from find_lo_sum; ! also check that GP is being used. ! (alpha_find_lo_sum_using_gp): New. ! (alpha_does_function_need_gp): Use get_attr_usegp. ! * config/alpha/alpha-protos.h: Update. ! * config/alpha/alpha.md (attr usegp): New. Annotate patterns ! as needed. ! ! 2003-02-11 John David Anglin ! ! * inclhack.def (hpux_long_double, hpux10_ctype_declarations1, ! hpux10_ctype_declarations2, hpux_ctype_macros): New hacks. ! * fixincl.x: Rebuilt. ! * tests/base/stdlib.h: Update. ! * tests/base/ctype.h: New file. ! ! 2003-02-11 Janis Johnson ! ! * config/rs6000/ppc64-fp.c: New file. ! * config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Add ppc64-fp.c. ! ! 2003-02-11 Falk Hueffner ! ! PR optimization/9651 ! * rtlanal.c (may_trap_p): Handle FIX. ! ! 2003-02-11 Jan Hubicka ! ! * predict.c (choose_function_section): Choose sections correctly. ! ! 2003-02-10 John David Anglin ! ! * reload1.c (first_label_num): New. ! (reload): Index offsets_known_at and offsets_at using difference of ! label number and first label number. Don't use offset pointers. ! (set_label_offsets, set_initial_label_offsets): Likewise. ! 2003-02-10 Eric Botcazou Christian Ehrhardt *************** *** 585,608 **** * c-decl.c (duplicate_decls): Discard the initializer of the new decl when the types are conflicting. ! 2003-02-01 Daniel Jacobowitz ! * dwarf2out.c (gen_type_die): Check for typedefs before calling ! for TYPE_MAIN_VARIANT. ! 2003-02-07 John David Anglin ! * pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC ! millicode calls when !TARGET_SOM and TARGET_GAS is true. ! * pa.md (jump): Likewise. 2003-02-06 Eric Botcazou Richard Henderson ! PR c/9530 * config/i386/i386.h (FUNCTION_OK_FOR_SIBCALL): Forbid sibcalls from functions that return a float to functions that don't. 2003-02-03 Bob Wilson * config/xtensa/xtensa.c (order_regs_for_local_alloc): Order the --- 2513,2599 ---- * c-decl.c (duplicate_decls): Discard the initializer of the new decl when the types are conflicting. ! 2003-02-09 Wolfgang Bangerth ! * doc/install.texi: Squeeze and streamline section on ! testing and regression checking. ! 2003-02-07 Jason Thorpe ! * config/t-netbsd (USER_H): Revert previous change. ! ! 2003-02-07 Richard Henderson ! ! PR 9226 ! * gcse.c (local_cprop_find_used_regs): New. ! (local_cprop_pass): Use it. ! ! 2003-02-07 Jan Hubicka ! ! * i386.md (sse2_nandv2di3): Fix. ! ! * i386.md (movdi_rex64_1): Fix mmx<->int move opcode. ! ! 2003-02-07 Andrey Petrov ! ! * optabs.c (expand_float): Search wider integer modes first. ! ! 2003-02-06 John David Anglin ! ! * config.gcc (hppa*-*-linux*): Set MASK_NO_SPACE_REGS in ! target_cpu_default. ! * pa.c (attr_length_call): Add 8 to call length (long indirect PA 1.X) ! if not MASK_NO_SPACE_REGS. ! (output_call): Adjust return pointer, don't load new space register ! into %sr0, and use %sr4 for call if TARGET_NO_SPACE_REGS is true. ! (pa_asm_output_mi_thunk): Don't load new space register into %sr0 if ! TARGET_NO_SPACE_REGS is true. ! * pa.md (return_external_pic): Add TARGET_NO_SPACE_REGS to insn ! conditions. ! (epilogue): Always use return_internal if TARGET_NO_SPACE_REGS is true. ! (interspace_jump): Add new pattern for when TARGET_NO_SPACE_REGS is ! true. Use bve when TARGET_64BIT is true. 2003-02-06 Eric Botcazou Richard Henderson ! PR c/9530 * config/i386/i386.h (FUNCTION_OK_FOR_SIBCALL): Forbid sibcalls from functions that return a float to functions that don't. + 2003-02-04 Ulrich Weigand + + * reload.c (find_reloads): Do not use the mode specified in the insn + pattern as reload mode for address operands. Do not generate optional + reloads for operands where a mandatory reload was already pushed. + + 2003-02-04 Jan Hubicka + + * i386.md (movti_rex64): Fix constraint. + + 2003-02-04 Rodney Brown + + * config/i386/i386.c (x86_function_profiler): Fix typo in format. + + 2003-01-23 Mike Stump + + * regclass.c (init_reg_autoinc): New function. + (regclass): Move initialization of forbidden_inc_dec_class from + here... + (init_regs): to here. Avoids reinitialization for each function, + saving compilation time. + + 2003-02-04 Phil Edwards + + * doc/install.texi (*-*-linux-gnu): Mention glibc requirements + for recent libstdc++. Remove formatting cruft. + + 2003-02-04 Joseph S. Myers + + * doc/gcc.texi, doc/gccint.texi, doc/gcov.texi, + doc/include/fdl.texi, doc/invoke.texi: Update to GFDL 1.2. + * doc/install.texi: Update copyright dates. Update to GFDL 1.2. + 2003-02-03 Bob Wilson * config/xtensa/xtensa.c (order_regs_for_local_alloc): Order the *************** *** 612,730 **** (SPEC_REG_FIRST, SPEC_REG_LAST, SPEC_REG_NUM, COUNT_REGISTER_REGNUM): Delete unused macros. ! 2003-02-05 Gabriel Dos Reis ! ! * doc/include/gcc-common.texi: Bump version. ! * version.c(version_string): Update. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2003-02-03 Chris Lingard ! Dan Osterrath ! * configure.in: Handle binutils versions with 4 dot separated ! numbers. ! * configure: Rebuilt. ! 2003-02-03 Franz Sirl ! Backport following patch: ! 2002-08-01 Richard Henderson ! * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it ! refers to a subroutine parameter. ! 2003-02-03 Eric Botcazou ! PR ice-on-legal-code/9493 ! * cfgcleanup.c (try_forward_edges): Check for null insn. ! 2003-02-03 Franz Sirl ! Eric Botcazou ! PR wrong-code/9492 ! Backport following patches: ! 2002-09-16 Richard Henderson ! * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE ! as well as OFFSET for BITPOS. ! 2002-09-08 Jan Hubicka ! * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref ! handling. ! 2002-07-29 Richard Henderson ! * emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from ! set_mem_attributes and add BITPOS argument. Subtract it from ! OFFSET when same is adjusted. ! (set_mem_attributes): New wrapper function. ! * expr.c (expand_assignment): Use set_mem_attributes_minus_bitpos; ! remove offset adjustment hack. ! * expr.h (set_mem_attributes_minus_bitpos): Declare. ! 2002-07-25 Richard Henderson ! * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos ! in ARRAY_REF of DECL_P case. ! 2002-07-21 Richard Henderson ! * emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL ! when flag_argument_noalias == 2. ! * alias.c (nonoverlapping_memrefs_p): Handle that. ! * print-rtl.c (print_mem_expr): Likewise. ! 2002-06-03 Dan Nicolaescu ! * alias.c (nonoverlapping_memrefs_p): Fix off by one error. ! 2003-02-03 Steve Ellcey ! * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. ! 2003-02-01 Jakub Jelinek ! PR preprocessor/9465 ! * tradcpp.c (fixup_newlines): Use memchr instead of strchr. 2003-01-31 John David Anglin ! * pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move ! updating of total_code_bytes from prologue to epilogue. ! (get_last_nonnote_insn): New function. ! 2003-01-31 Jan Hubicka ! PR c/9506 ! * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN. ! 2003-01-30 Andreas Schwab ! * config/m68k/m68k.md (tablejump+2): Don't sign extend an address ! register. ! * config/m68k/apollo68.h (ASM_RETURN_CASE_JUMP): Likewise. ! * config/m68k/coff.h (ASM_RETURN_CASE_JUMP): Likewise. ! * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Likewise. ! * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise. ! * config/m68k/mot3300.h (ASM_RETURN_CASE_JUMP): Likewise. ! * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise. ! * config/m68k/pbb.h (ASM_RETURN_CASE_JUMP): Likewise. 2003-01-30 Ralf Corsepius ! PR target/9316 * config/rs6000/rtems.h: Add CPP_OS_DEFAULT_SPEC. * config/rs6000/sysv4.h: Add CPP_OS_RTEMS_SPEC. * config/rs6000/t-rtems: New file. multilib variants to match OS. * config.gcc (powerpc-*-rtems*): Use rs6000/t-rtems instead of rs6000/t-ppcgas so we get the desired multilibs. 2003-01-29 Joel Sherrill PR bootstrap/9296 --- 2603,2794 ---- (SPEC_REG_FIRST, SPEC_REG_LAST, SPEC_REG_NUM, COUNT_REGISTER_REGNUM): Delete unused macros. ! 2003-02-03 Jan Hubicka ! * i386.c (ix86_expand_store_builtin): Always force op1 to register. ! (mov*_internal): Fix predicates; require one of operands to not be memory. ! (SSE?MMX move expanders): Fix predicates; force one of operands to register. ! (SSE/MMX push patterns): Reorganize; fix x86-64 code generation. ! (movups/movupd/movdqu patterns): Force one of operands to not be memory. ! 2003-02-03 Jan Hubicka ! * regclass.c (cannot_change_mode_set_regs): Correct argument order. ! 2003-02-02 Kaveh R. Ghazi ! * mips/_tilib.c: Don't include tsystem.h. Don't define ! LIBGCC2_WORDS_BIG_ENDIAN. ! 2003-02-02 John David Anglin ! * doc/install.texi (hppa*-hp-hpux11*): Update installation notes. ! 2003-02-02 John David Anglin ! * pa-protos.h (attr_length_millicode_call): Remove second argument. ! (attr_length_indirect_call, attr_length_indirect_call, ! attr_length_save_restore_dltp): New prototypes. ! * pa.c (attr_length_millicode_call): Remove second argument. Check ! INSN_ADDRESSES_SET_P in distance calculation. ! (output_millicode_call): Check INSN_ADDRESSES_SET_P before using ! INSN_ADDRESSES. ! (attr_length_call): Check INSN_ADDRESSES_SET_P in distance calculation. ! (output_call): Check INSN_ADDRESSES_SET_P before using INSN_ADDRESSES. ! Call attr_length_call directly. ! (attr_length_indirect_call, output_indirect_call, ! attr_length_save_restore_dltp): New functions. ! * pa.md (attr_length_millicode_call): Drop second argument from all ! patterns. ! (return_internal_pic): Delete. ! (return_external_pic): Remove use of PIC register and pic operand and ! flag checks. ! (epilogue): Use return_internal for both normal and pic code. ! (call, call_value): Emit new 32-bit pic patterns for symref and ! indirect calls. Remove uses for arg pointer and pic register. ! (call_symref_pic, call_symref_pic_post_reload, call_reg_pic, ! call_reg_pic_post_reload, call_val_symref_pic, ! call_val_symref_pic_post_reload, call_val_reg_pic, ! call_val_reg_pic_post_reload): New pre and post reload insn patterns. ! Implement define_split and define_peephole2 patterns for pre reload ! patterns. ! (call_symref_64bit, call_internal_reg_64bit, call_value_symref_64bit, ! call_value_internal_reg_64bit): Shorten names. ! (all call patterns): Explicitly indicate registers used and clobbered. ! Use attr_length_indirect_call and attr_length_save_restore_dltp for ! attribute length calculation. Move code generation for indirect calls ! to output_indirect_call. ! (sibcall, sibcall_value): Don't restore PIC register. ! (exception_receiver, builtin_setjmp_receiver): Add blockage after PIC ! register retore. ! 2003-02-02 Gerald Pfeifer ! * doc/install.texi (Testing): Simplify and compress instructions ! concerning Dejagnu. ! 2003-02-01 Daniel Jacobowitz ! * dwarf2out.c (gen_type_die): Check for typedefs before calling ! for TYPE_MAIN_VARIANT. ! 2003-02-01 Ulrich Weigand ! * reload.c: Revert 2003-01-31 change. ! 2003-02-01 Jan Hubicka ! PR c/9506 ! * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN. ! 2003-01-31 John David Anglin ! * pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move ! updating of total_code_bytes from prologue to epilogue. ! 2003-01-31 Ulrich Weigand ! * regclass.c (record_reg_classes): Fix incorrect argument ! to EXTRA_ADDRESS_CONSTRAINT macro. ! 2003-01-31 Ulrich Weigand ! * reload.c (find_reloads): Do not use the mode specified in the insn ! pattern as reload mode for address operands. Do not generate optional ! reloads for operands where a mandatory reload was already pushed. ! Generate optional reloads only in the final pass though find_reloads. ! (have_replacement_p): New function. ! 2003-01-31 Gerald Pfeifer ! * doc/install.texi (Testing): Remove a reference to our obsolete ! /testresults web pages and strip redundant information concerning ! test results. ! (Binaries): Refer to Microsoft Windows instead of listing all ! possible variants. ! 2003-02-01 Jan Hubicka ! * loop.c (emit_prefetch_instructions): Do conversion at right place in ! RTL chain. ! * combine.c (simplify_set): Reverse order of ragumetns to ! REG_CANNOT_CHANGE_MODE_P ! * df.c (df_def_record_1): Likewise. ! * recog.c (register_operand): Likewise. ! * simplify-rtx.c (simplify_subreg): Likewise. ! * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Update use of ! CANNOT_CHANGE_MODE_CLASS. ! * regclass.c (cannot_change_mode_set_regs, invalid_mode_change_p): ! Likewise. ! * reload.c (push_reload): Likewise. ! * alpha.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * ia64.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * mips.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * mips-protos.h (mips_cannot_change_mode_class): Update prototype. ! * mips.c (mips_cannot_change_mode_class): Update. ! * pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * rs6000.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * s390.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * sh.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * sh-protos.h (sh_cannot_change_mode_class): Update prototype. ! * sh.c (sh_cannot_change_mode_class): Update. ! * i386.h (CANNOT_CHANGE_MODE_CLASS): New. ! * tm.texi (CANNOT_CHANGE_MODE_CLASS): Update documentation. 2003-01-31 John David Anglin ! * pa32-regs.h (REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Delete ! duplicated code. ! 2003-01-30 Richard Earnshaw ! * arm.c (arm_compute_initial_elimination_offset): If optimizing for ! size, the link register is always saved if any other register is ! saved. ! 2003-01-30 Jerry Quinn ! * gcc/doc/invoke.texi (Optimization Options): Group together ! optional and experimental flags. Move trapv and bounds-check ! out of this section. Group floating point flags together. ! (Code Gen Options): Move trapv and bounds-check to here. ! ! 2003-01-30 Jerry Quinn ! ! * gcc/doc/invoke.texi (Optimization Options): List -O levels ! for each optimization flag. 2003-01-30 Ralf Corsepius ! PR target/9316 * config/rs6000/rtems.h: Add CPP_OS_DEFAULT_SPEC. * config/rs6000/sysv4.h: Add CPP_OS_RTEMS_SPEC. * config/rs6000/t-rtems: New file. multilib variants to match OS. * config.gcc (powerpc-*-rtems*): Use rs6000/t-rtems instead of rs6000/t-ppcgas so we get the desired multilibs. + 2003-01-30 Alexandre Oliva + + * config/fp-bit.h (__make_dp): Declare if TMODES. + + 2003-01-29 Steve Ellcey + + * config/ia64/ia64.c (ia64_rwreloc_section_type_flags): New. + * config/ia64/hpux.h (TARGET_SECTION_TYPE_FLAGS): New. + + 2003-01-29 Steve Ellcey + + * config/ia64/ia64.c (ia64_rwreloc_select_rtx_section): Rename + from ia64_aix_select_rtx_section. + (ia64_rwreloc_select_section): Simlarly; use default*_1 function + instead of saving and restoring flag_pic. + (ia64_rwreloc_unique_section): Similarly. + * config/ia64/aix.h (TARGET_ASM_SELECT_SECTION, + TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Update. + * config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION, + TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): New. + 2003-01-29 Joel Sherrill PR bootstrap/9296 *************** *** 741,747 **** 2003-01-29 Joel Sherrill PR bootstrap/9293 ! * config/m68k/t-crtstuff: Replace spaces with tabs, add $(MULTILIB_CFLAGS) as compiler option and multilib crtbegin/end.o. 2003-01-29 Joel Sherrill --- 2805,2811 ---- 2003-01-29 Joel Sherrill PR bootstrap/9293 ! * config/m68k/t-crtstuff: Replace spaces with tabs, add $(MULTILIB_CFLAGS) as compiler option and multilib crtbegin/end.o. 2003-01-29 Joel Sherrill *************** *** 751,768 **** RTEMS threads. * config/pa/rtems.h (LIB_SPEC): Use -N when linking. 2003-01-28 Christian Cornelssen * doc/install.texi: Add documentation for installation into tooldirs and with DESTDIR. * Makefile.in (ORDINARY_FLAGS_TO_PASS): Also pass DESTDIR. ! (install-cpp, uninstall-cpp, installdirs, install-common) (install-driver, install-info, install-man) (install-headers, install-include-dir, install-headers-tar) ! (install-headers-cpio, install-headers-cp, install-collect2) ! (uninstall): Prepend $(DESTDIR) to destination paths in all ! (un)installation commands. (install-driver): Rewrite $(LN) commands to support DESTDIR with "ln" as well as with "ln -s". (installdirs): Simply use mkinstalldirs. --- 2815,2929 ---- RTEMS threads. * config/pa/rtems.h (LIB_SPEC): Use -N when linking. + 2003-01-25 Andrew Haley + + * tree-inline.c (walk_tree): Add CHAR_TYPE. + 2003-01-28 Christian Cornelssen * doc/install.texi: Add documentation for installation into tooldirs and with DESTDIR. + 2003-01-28 Andreas Schwab + + * config/m68k/m68k.md (tablejump+2): Don't sign extend an address + register. + * config/m68k/apollo68.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/coff.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/mot3300.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/pbb.h (ASM_RETURN_CASE_JUMP): Likewise. + + 2003-01-28 David Edelsohn + + * config/rs6000/rs6000.md (movti_string): Remove clobber. + * config/rs6000/rs6000.c (rs6000_emit_move, TImode): Explicitly + generate PARALLEL with clobber for TARGET_POWER. + + 2003-01-28 Richard Henderson + + * ifcvt.c (noce_process_if_block): Re-add check vs X being changed + in no-else-block case. Add commentary. + + 2003-01-28 Alexandre Oliva + + * config/mips/mips.h (UNITS_PER_HWFPVALUE): Renamed from... + (UNITS_PER_FPVALUE): Defined as the width of a long double, or + zero if no hardware floating point. + (LONG_DUBLE_TYPE_SIZE): Set to 128 on N32 and N64. + (MAX_FIXED_MODE_SIZE): Define to LONG_DOUBLE_TYPE_SIZE. + (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define. + (BIGGEST_ALIGNMENT): Same as LONG_DOUBLE_TYPE_SIZE. + (FUNCTION_VALUE_REGNO_P): Set for FP_RETURN+2 on N32 and N64. + * config/mips/iris6.h (MIPS_TFMODE_FORMAT): Define. + * config/mips/mips.c (override_options): Use it. + (mips_arg_info): Pass TFmode values in even FP registers on N32 + and N64. + (mips_setup_incoming_varargs): Use UNITS_PER_HWFPVALUE. + (mips_va_start): Adjust alignment of ARG_POINTER_REGNUM. + (mips_va_arg): Use UNITS_PER_HWFPVALUE. Impose additional + even-register-like alignment to 128-bit arguments. + (save_restore_insns): Use UNITS_PER_HWFPVALUE. + (mips_function_value): Likewise. Return TFmode in $f0 and $f2 + on N32 or N64. + * config/mips/_tilib.c (__negti2, __ashlti3, __lshrti3): New. + * config/mips/t-iris6 (LIB2FUNCS_EXTRA): Add _tilib.c. + (TPBIT): Set to tp-bit.c. + (tp-bit.c): Create out of fp-bit.c. + + 2003-01-27 Gabriel Dos_Reis + + * c-parse.in: Remove '%expect 32' directive when in objc mode. + + 2003-01-27 Josef Zlomek + + * gcse.c (constprop_register): Check NEXT_INSN (insn) != NULL. + + 2003-01-27 Richard Earnshaw + + PR optimization/9090 + * function.c (purge_addressof_1): After pushing an addressed register + onto the stack, simplify the result. + + 2003-01-27 Volker Reichelt + + * doc/extend.texi: Fix typo. + + 2003-01-27 Volker Reichelt + + * doc/cppopts.texi: Fix typo. + * doc/objc.texi: Likewise. + * doc/passes.texi: Likewise. + + 2003-01-27 Alexandre Oliva + + * real.c (ibm_extended_format): Add 53 to minimum exponent. + (encode_ibm_extended): Adjust. + + 2003-01-26 Kazu Hirata + + * doc/gccint.texi: Update the copyright. + + 2003-01-26 Kazu Hirata + + * doc/cpp.texi: Fix typos. + * doc/extend.texi: Likewise. + * doc/gty.texi: Likewise. + * doc/install.texi: Likewise. + * doc/passes.texi: Likewise. + * doc/rtl.texi: Likewise. + + 2003-01-26 Christian Cornelssen + * Makefile.in (ORDINARY_FLAGS_TO_PASS): Also pass DESTDIR. ! (install-cpp, installdirs, install-common) (install-driver, install-info, install-man) (install-headers, install-include-dir, install-headers-tar) ! (install-headers-cpio, install-headers-cp, install-mkheaders) ! (install-collect2, uninstall): Prepend $(DESTDIR) to ! destination paths in all (un)installation commands. (install-driver): Rewrite $(LN) commands to support DESTDIR with "ln" as well as with "ln -s". (installdirs): Simply use mkinstalldirs. *************** *** 772,12658 **** * config/alpha/t-osf4 (SHLIB_INSTALL): Prepend $$(DESTDIR) to $$(slibdir) in the installation commands. * config/arm/t-netbsd (SHLIB_INSTALL): Likewise. ! * config/mips/t-iris6 (SHLIB_INSTALL): Likewise. * config/pa/t-hpux-shlib (SHLIB_INSTALL): Likewise. * config/rs6000/t-aix43 (SHLIB_INSTALL): Likewise. * config/t-slibgcc-elf-ver (SHLIB_INSTALL): Likewise. * config/t-slibgcc-sld (SHLIB_INSTALL): Likewise. * config/arc/t-arc (install-multilib-arc): Prepend $(DESTDIR) to $(libsubdir) in the installation commands. ! 2003-01-28 Gerald Pfeifer ! Backport patches ! ! 2002-10-04 Loren J. Rittle ! ! * gcc/ginclude/stddef.h: Support the FreeBSD 5 typedef system. ! ! 2002-08-01 Stan Shebs ! Andreas Tobler ! ! * ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined, ! plays nice with Darwin headers. ! (_BSD_RUNE_T_DEFINED_): Likewise. ! ! 2003-01-27 Gabriel Dos_Reis ! ! PR objc/9267 ! * c-parse.in: Remove '%expect 31' directive in objc mode. ! ! 2003-01-27 Richard Earnshaw ! ! * function.c (purge_addressof_1): After pushing anaddressed register ! onto the stack, simplify the result. ! ! 2003-01-25 Eric Botcazou ! * combine.c (nonzero_bits): Revert 2003-01-25 change. ! (num_sign_bit_copies): Likewise. ! 2003-01-27 Volker Reichelt ! * doc/passes.texi: Fix typo. ! 2003-01-25 Bruce Korb ! * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function ! of *both* the file name and the fix name. ! 2003-01-25 Eric Botcazou ! Christian Ehrhardt ! PR optimization/9279 ! Merge from mainline: ! 2002-07-10 Roger Sayle ! PR c/2454 ! * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply ! to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. 2003-01-25 Jan Hubicka ! PR fortran/9258 ! * global.c (struct allocno): Add no_stack_reg. ! (global_conflicts): Set no_stack_reg. ! (find_reg): Use it. ! ! 2003-01-24 Volker Reichelt ! ! * doc/passes.texi: Fix typo. ! ! 2003-01-24 John David Anglin ! ! * pa.md (call_internal_reg, call_value_internal_reg): If TARGET_GAS and ! not TARGET_SOM, use $PIC_pcrel$0 rather than symbol difference for long ! PIC calls to $$dyncall. ! * pa.c (output_call): Likewise. ! ! 2003-01-23 Franz Sirl ! ! PR java/6748 ! * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Don't destroy ! regs->nip. Fix rt_sigreturn frame layout. Add support for newer ! kernels. ! ! * config/rs6000/rs6000.c (rs6000_binds_local_p): New functiion. ! (rs6000_encode_section_info): Use it. ! 2003-01-23 Volker Reichelt ! PR other/7341 ! * invoke.texi (ftest-coverage): Fix broken cross-reference. ! Change @code to @command for gcov command. ! * gcc.texi: Adjust title of gcov section. ! * gcov.texi: Likewise. ! 2003-01-23 Volker Reichelt ! PR other/7448 ! * doc/passes.texi (fssa-ccp): Remove misplaced line. ! 2003-01-21 Christian Ehrhardt ! PR opt/7507 ! * calls.c (fix_unsafe_tree): Split out from ... ! (expand_call): ... here. Use it on the function address too. ! 2003-01-19 Roger Sayle ! * config/pa/pa.md (muldi3): Avoid invalid sharing of SUBREG RTXs. ! 2003-01-19 John David Anglin ! * pa-linux.h (DWARF2_UNWIND_INFO, INCOMING_RETURN_ADDR_RTX, ! DWARF_FRAME_RETURN_COLUMN): Delete defines. ! (FUNCTION_OK_FOR_SIBCALL): Define to 1. ! 2003-01-17 Jim Wilson ! * dbxout.c (dbxout_fptype_value): New. ! (dbxout_type, case COMPLEX_TYPE): Call it. Use 'R' instead of 'r'. ! 2003-01-15 Stephane Carrez ! * config/m68hc11/m68hc11.md ("return"): Use emit_jump_insn to emit ! the return code. ! 2003-01-12 Alan Modra ! * expr.c (expand_expr ): Correct recursive call args. ! 2003-01-10 Josef Zlomek ! * jump.c (next_nonnote_insn_in_loop): New function. ! (copy_loop_headers): Use next_nonnote_insn_in_loop instead of ! next_nonnote_insn. ! (duplicate_loop_exit_test). Likewise. ! 2003-01-10 Josef Zlomek ! * Makefile.in (optabs.o): Add dependencies on basic-block.h and ! hard-reg-set.h. ! * basic-block.h (control_flow_insn_p): Fuction was exported. ! * cfgbuild.c (control_flow_insn_p): Fuction was made non-static. ! * optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL ! notes only when the region is contained in a single basic block. ! 2003-01-09 Eric Botcazou ! PR inline-asm/8832 ! * tree.h (expand_asm): New prototype. ! * stmt.c (expand_asm): Set the MEM_VOLATILE_P flag if instructed ! to do so. ! * c-semantics (genrtl_asm_stmt): Pass the RID_VOLATILE qualifier ! down to expand_asm. ! * c-typeck.c (simple_asm_stmt): Set the RID_VOLATILE qualifier. ! * rtlanal.c (volatile_insn_p) [ASM_INPUT]: Test the MEM_VOLATILE_P flag. ! (volatile_refs_p) [ASM_INPUT]: Likewise. ! (side_effects_p) [ASM_INPUT]: Likewise. ! 2003-01-09 Eric Botcazou ! PR c/8032 ! * c-typeck.c (process_init_element) [RECORD_TYPE]: For ! an empty element, do not advance the pointer to unfilled ! fields if there are pending initializers. ! 2003-01-07 Janis Johnson ! PR other/8947 ! * doc/invoke.texi (-malign-double): Explain that the option breaks ! binary compatibility. ! 2003-01-07 Benjamin Kosnik ! Sunil Davasam ! PR libstdc++/9076 ! * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, ! DW_CFA_same_value, read next and ignore. ! 2003-01-07 Richard Henderson ! * cfganal.c (flow_call_edges_add): Don't crash on noreturn call. ! 2003-01-01 Neil Booth ! PR preprocessor/8880 ! * gcc.c (cpp_unique_options): Handle -fshort-wchar later so it ! overrides any target CPU specs. ! 2002-12-28 John David Anglin ! * pa.h (TARGET_SOM): Define if not defined. ! * som.h (OBJ_SOM): Rename to TARGET_SOM. ! * pa.c (pa_output_function_prologue): Don't accumulate the total code ! bytes in the translation unit when using gas, som and not the portable ! runtime, or when using function sections. ! 2002-12-21 Eric Botcazou ! PR optimization/8599 ! * doloop.c (doloop_modify_runtime): Fix loop count computation ! for preconditioned unrolled loops. ! 2002-12-21 Eric Botcazou ! PR optimization/8599 ! * doloop.c (doloop_modify_runtime): Revert 2002-11-22 change. ! * loop.c (loop_invariant_p): Likewise. ! 2002-12-19 Eric Botcazou ! PR optimization/8988 ! * loop.c (maybe_eliminate_biv): Kill REG_EQUAL notes mentioning ! the biv when eliminating. ! 2002-12-17 Jakub Jelinek ! PR opt/8794 ! * combine.c (force_to_mode) [MINUS]: Only replace with (not Y) if all ! bits in fuller_mask (not just mask) are set in C. ! 2002-12-12 John David Anglin ! * pa.h (BIGGEST_ALIGNMENT): Change 32-bit value to 64 bits. ! (MAX_PARM_BOUNDARY, STACK_BOUNDARY): Express in terms of ! BIGGEST_ALIGNMENT. ! (PREFERRED_STACK_BOUNDARY): Express in terms of STACK_BOUNDARY. ! (FUNCTION_BOUNDARY): Express in terms of BITS_PER_WORD. ! 2002-12-10 Janis Johnson ! PR other/8882 ! * doc/tm.texi (PUSH_ARGS): Remove misplaced line. ! 2002-12-05 Dale Johannesen ! * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR. ! 2002-12-05 Danny Smith ! * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with ! PROFILE_HOOK. ! * config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef. ! 2002-12-05 Nick Clifton ! * config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Check for frame ! pointer and arg pointer by examining the register number. ! 2002-12-05 Matthias Klose ! * doc/invoke.texi: Remove last reference to -a. ! 2002-12-04 Eric Botcazou ! PR c/7622 ! * c-semantics (genrtl_scope_stmt): Do not output inlined ! nested functions that contain no code. ! 2002-12-04 Jakub Jelinek ! * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one ! of the operands into MINUS_EXPR if code is PLUS_EXPR. ! 2002-12-02 Bob Wilson ! * config/xtensa/xtensa.c (xtensa_emit_call): Use a static buffer. ! * config/xtensa/xtensa.h (MAX_WCHAR_TYPE_SIZE): Delete. ! 2002-12-01 Mark Mitchell ! * builtin-types.def (BT_SIZE): Use size_type_node. ! * builtins.c (fold_builtin): Make the builtin strlen returns a ! size_t, not a sizetype. ! * c-common.c (c_alignof): Use size_type_node, not c_size_type_node. ! (c_alignof_expr): Likewise. ! (c_common_nodes_and_builtins): Likewise. ! * c-common.h (CTI_C_SIZE_TYPE): Remove. ! (c_size_type_node): Likewise. ! * c-format.c (T_ST): Use size_type_node, not c_size_type_node. ! * tree.h (TI_SIZE_TYPE): New enumeral. ! (size_type_node): Likewise. ! ! 2002-11-26 Neil Booth ! PR preprocessor/8524 ! * cpplib.c (run_directive): Remove previous kludge to _Pragma. ! Add a new one in its place, which hopefully works. ! (skip_rest_of_line): Change test for bottom-of-context-stack. ! 2002-11-26 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_flag_pic): New variable. ! (rs6000_override_options): Save original flag_pic value. ! (rs6000_encode_section_info): More accurate test for "local" symbol. ! PR 8362 ! * config/rs6000/rs6000.c (rs6000_outout_load_multiple): New function. ! * config/rs6000/rs6000.md (ldmsi[3-8]): New patterns. ! 2002-11-25 Christian Ehrhardt ! PR c/8639 ! * fold-const.c (extract_muldiv): Don't propagate division unless ! both arguments are multiples of C. ! 2002-11-24 Eric Botcazou ! PR optimization/8275 ! Merge from mainline: ! 2002-09-19 Dale Johannesen ! * combine.c (make_extraction): Don't create ! invalid subreg. ! 2002-11-23 Marek Michalkiewicz ! 2002-09-26 Theodore A. Roth ! * config/avr/avr.c: Eliminate use of _PC_ in pc relative insns. ! * config/avr/avr.md: Ditto. ! 2002-11-23 Eric Botcazou ! PR c/8588 ! * optabs.c (expand_binop): Convert CONST_INTs in shift ! operations too. ! 2002-11-23 Eric Botcazou ! PR c/8518 ! * c-decl.c (duplicate_decls): Outline the second definition ! of an extern inline function in all cases. ! 2002-11-22 Eric Botcazou ! PR c/8439 ! * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only ! if there is something new to be simplified. ! 2002-11-22 Toon Moene ! * c-decl.c (c_init_decl_processing): Move generation of ! decls for g77_integer_type_node and friends from here ... ! * c-common.c (c_common_nodes_and_builtins): ... to here. ! 2002-11-22 Eric Botcazou ! PR optimization/8599 ! Merge from mainline: ! 2002-11-04 Dale Johannesen ! * doloop.c (doloop_modify_runtime): Fix loop count computation ! for unrolled loops. ! * loop.c (loop_invariant_p): Support calling from unroller. ! 2002-11-22 Daniel Jacobowitz ! * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on ! reload_completed. ! 2002-11-21 Bob Wilson ! * config/xtensa/xtensa-protos.h (xtensa_copy_incoming_a7): Declare. ! * config/xtensa/xtensa.c (struct machine_function): Add ! incoming_a7_copied flag. ! (xtensa_copy_incoming_a7): Define. ! (xtensa_emit_move_sequence): Use xtensa_copy_incoming_a7. ! * config/xtensa/xtensa.md (movdi, movsf, movdf): Ditto. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! Sat Nov 16 02:54:29 CET 2002 Jan Hubicka ! * jump.c (tablejump_p): New. ! * cfgcleanup.c (try_optimize_cfg): Do not merge blocks across tablejump. ! * rtl.h (tablejump_p): Declare. ! 2002-11-16 Graham Stott ! * flow.c (life_analysis): Update LABEL_NUSES before purging ! dead jumptables. ! 2002-11-13 Janis Johnson ! * doc/install.texi (Testing): Document extra Java testing. ! * doc/sourcebuild.texi (Test Suites): Document libgcj testing. ! 2002-11-12 Franz Sirl ! * doc/install.texi (powerpc-*-linux-gnu*): Update binutils requirement. ! 2002-11-12 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Use GCJ instead of gcj to refer ! to that entire project. ! 2002-11-12 Rainer Orth ! * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Restore old ! directories. ! 2002-11-11 Janis Johnson ! * doc/contrib.texi: Merge in the list from the libstdc++ web pages. ! 2002-11-11 Franz Sirl ! PR c/8467 ! * stmt.c (tail_recursion_args): Handle DECL_MODE differing from the ! mode of DECL_RTL case. ! 2002-11-11 Neil Booth ! PR preprocessor/4890 ! * tradcpp.c (output_line_command): When leaving a file, ! system_include_depth has not yet been decremented. ! 2002-11-10 Joel Sherrill ! * config/m68k/t-crtstuff (crti.o): Use this... ! ($(T)crti.o): ... instead. ! (crtn.o): Use this... ! ($(T)crtn.o): ... instead. ! 2002-11-10 Ralf Corsepius ! * config/mips/mips.md (movdi_usd): Use %z1 in place of %1. ! 2002-11-11 Graham Stott ! Jan Hubicka ! PR 8502 ! * cfgrtl.c (try_redirect_by_replacing_jump): Do not kill computed ! jumps post reload. ! 2002-11-08 H.J. Lu ! Fix c/5351 and optimization/7591. ! * calls.c (store_one_arg): Remove ATTRIBUTE_UNUSED on ! variable_size. Mark any slots used for the argument as in-use ! only if we can't pass all arguments to a library call in ! registers. ! 2002-11-07 H.J. Lu ! Fix bootstrap/8146 and ! gcc.c-torture/execute/20020307-2.c with -march=i686. ! * calls.c (PUSH_ARGS_REVERSED): Define only if not defined. ! * expr.c (PUSH_ARGS_REVERSED): Likewise. ! * config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1. ! 2002-11-04 Aldy Hernandez ! Fix c/8252. ! * config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow ! vectors from PRE_INC/DEC. ! 2002-11-06 Richard Henderson ! PR optimization/7520 ! * cfganal.c (flow_active_insn_p): New. ! (forwarder_block_p): Use it. ! 2002-11-06 Janis Johnson ! * doc/contrib.texi: Merge in the list from the Java web pages. ! 2002-11-06 David O'Brien ! * config/sparc/freebsd.h: Fix typo. ! 2002-11-05 Bob Wilson ! * config/xtensa/elf.h (LIB_SPEC): Add "-lhal". ! 2002-11-04 Aldy Hernandez ! Backport patch to fix PR c/8451. ! 2002-04-25 Richard Henderson ! * expmed.c (extract_bit_field): Fall through to generic code rather ! than aborting on subreg special case. ! 2002-11-01 Mark Mitchell ! PR c++/8391 ! * toplev.c (rest_of_compilation): Do not refuse to output code for ! an inline function in a local class. ! 2002-11-01 David O'Brien ! * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Define __arch64__. ! Add comment. ! 2002-11-01 David O'Brien ! * config/sparc/freebsd.h (TRANSFER_FROM_TRAMPOLINE): Define ! __enable_execute_stack function. ! 2002-11-01 Richard Earnshaw (rearnsha@arm.com) ! PR target/7856 ! * arm.c (use_return_insn): Don't use a return insn if there are ! saved integer regs, but LR is not one of them. ! Thu Oct 31 18:31:22 CET 2002 Jan Hubicka ! * i386.c (override_options): Set defaults for flag_omit_frame_pointer, ! flag_asynchronous_unwind_tables, flag_pcc_struct_return. ! * i386.c (optimization_options): Set flag_omit_frame_pointer, ! flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2. ! Do not clear -momit-leaf-frame-pointer when profiling. ! (ix86_frame_pointer_required): Frame pointer is allways required when ! profiling. ! 2002-10-30 Mark Mitchell ! * varasm.c (asm_output_aligned_bss): Do not call ! ASM_GLOBALIZE_LABEL. ! 2002-10-29 Janis Johnson ! * doc/invoke.texi (-profile-arcs): Remove references to -a and -ax. ! 2002-10-29 Eric Botcazou ! PR optimization/8334 ! * expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation; ! check for zero operands explicitly. ! 2002-10-21 Dale Johannesen ! PR target/7133 ! * config/rs6000/rs6000.c (rs6000_reverse_condition): Handle ! unsafe math reversals correctly for RTL generation. ! (output_cbranch): Replace rs6000_reverse_condition call ! by its former definition. ! Sun Oct 27 10:12:27 CET 2002 Jan Hubicka ! * linux64.h (DEFAULT_PCC_STRUCT_RETURN): Define. ! PR target/6890 ! * xmmintrin.h (_MM_TRANSPOSE4_PS): New. ! 2002-10-25 Zack Weinberg ! PR middle-end/6994 ! * c-objc-common.c (inline_forbidden_p): Can not inline ! functions containing structures or unions containing VLAs. ! * tree-inline.c (walk_tree): For all class 't' nodes, walk ! TYPE_SIZE and TYPE_SIZE_UNIT. #undef WALK_SUBTREE_TAIL at end. ! (copy_tree_r): Copy types if they are variably modified. ! * hooks.c (hook_tree_bool_false): New. ! * hooks.h: Prototype it. ! * langhooks.h (struct lang_hooks_for_tree_inlining): Add ! var_mod_type_p. ! * langhooks-def.h: Default for tree_inlining.var_mod_type_p is ! hook_tree_bool_false. ! * tree.c (variably_modified_type_p): Moved here from ! cp/tree.c. Use lang_hooks.tree_inlining.var_mod_type_p for ! language-specific cases. Due to this, must weaken some 'if ! and only if' checks to merely 'if'. ! * tree.h: Prototype variably_modified_type_p. ! 2002-10-22 Jim Wilson ! * config/i386/i386.md (subdi3_1): Add call to ix86_binary_operator_ok. ! 2002-10-15 Jim Wilson ! PR target/6981 ! * config/i386/i386.md (adddi3_1): Add call to ix86_binary_operator_ok. ! 2002-10-24 Richard Henderson ! PR opt/7944 ! * reload.c (find_reloads_toplev): Use simplify_gen_subreg; mode ! of X is not important when simplifying subregs of constants. ! 2002-10-23 Robert Lipe ! * config.gcc (i[34567]86-*-sco3.2v5*): Fix tm_file. ! 2002-10-23 Roger Sayle ! PR c/761 ! * doc/invoke.texi: Fix some overfull hboxes in "make dvi". ! Document --version, -fno-sched-interblock, -fno-sched-spec, ! -fsched-spec-load, -fsched-spec-load-dangerous, ! -fsched-verbose=n, -fno-branch-count-reg and -fbounds-check. ! 2002-10-23 Ulrich Weigand ! * config/s390/s390.md ("*movdi_64"): Fix op_type attribute. ! ("*movdf_64"): Likewise. ! ("*lshrdi3_64"): Likewise. ! 2002-10-21 Matthias Klose ! * Backport, without whitespace change: ! 2002-06-19 Akim Demaille ! * c-parse.in (initelt: identifier ':' initval): Add an empty ! action to fix a type clash. ! (aliasdecl, classdef): Add the missing closing `;'. ! Sat Oct 19 15:49:14 CEST 2002 Jan Hubicka ! * mmintrin.h (__m64): typedef it to v2si. ! (_mm_cvtsi32_si64, _mm_cvtsi32_si64_mm_sll_pi16, ! _mm_sll_pi32, _mm_sll_pi64, _mm_slli_pi64, _mm_sra_pi16, ! _mm_sra_pi32, _mm_srl_pi16, _mm_srl_pi32, _mm_srl_pi64, ! _mm_srli_pi64, _mm_and_si64, _mm_andnot_si64, ! _mm_or_si64, _mm_xor_si64): Add neccesary casts. ! * xmmintrin.h (_mm_setzero_si64): Likewise. ! PR target/7693 ! Patch by Shawn Wagner ! * mmintrin.h: Replace pi64 by si64. ! 2002-10-18 Zack Weinberg ! * decl.c (start_decl): Point users of the old initialized- ! typedef extension at __typeof__. ! Thu Oct 17 17:14:07 CEST 2002 Jan Hubicka ! PR opt/7630 ! * reload.c (reload_inner_reg_of_subreg): New argument output; ! (push_reload): Update call. ! PR c++/6419 ! * expr.c (expand_expr): Use DECL_RTL_SET_P. ! Wed Apr 24 23:45:37 2002 J"orn Rennecke ! * calls.c (expand_call): Take current_function_pretend_args_size ! into account when setting argblock for sibcalls. ! Wed Oct 16 19:43:38 CEST 2002 Jan Hubicka ! PR target/7396 ! * i386.c (builtin_description):Drop cmpg[te]s[sd]. ! * xmmintrin.h (__mm_cmpg[te]_s[sd]): Rewrite using ! swapped alternative. ! 2002-10-16 Jakub Jelinek ! * fold-const.c (fold): Fix a typo. ! 2002-10-15 Ulrich Weigand ! PR target/7370 ! * config/s390/s390.md ("*addsi3_inv"): New pattern. ! PR target/8232 ! * config/s390/s390.md ("cmpstrsi"): Convert length operand ! from SImode to Pmode. ! 2002-10-15 Janis Johnson ! * doc/install.texi: Formatting changes for conformance to HTML 4.01. ! 2002-10-15 Ulrich Weigand ! PR opt/7409 ! * loop.c (loop_regs_scan): Mark registers used for function ! argument passing as MAY_NOT_OPTIMIZE. ! 2002-10-14 Neil Booth ! PR preprocessor/7862 ! PR preprocessor/8190 ! * gcc.c (cpp_unique_options): Don't delete .d files. ! Remove stray whitespace. ! 2002-10-14 Jakub Jelinek ! * config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): ! Handle TARGET_64BIT. ! 2002-10-14 Mark Mitchell ! PR optimization/6631 ! * Makefile.in (function.o): Depend on langhooks.h. ! * alias.c (objects_must_conflict_p): Check honor_readonly when ! examining TYPE_READONLY. ! * function.c (assign_stack_temp_for_type): Likewise. ! 2002-10-12 John David Anglin ! * tree.c (tree_size): Revise expressions using TREE_CODE_LENGTH and ! TREE_VEC_LENGTH to ensure values are promoted before doing subtraction. ! 2002-10-11 Janis Johnson ! * doc/compat.texi: Add info about C++ libraries. ! Thu Oct 10 19:47:41 CEST 2002 Jan Hubicka ! PR target/5610 ! * invoke.texi (-msse-math): Kill ! (-msse): Add note to mfpmath=sse. ! Thu Oct 10 17:38:29 CEST 2002 Jan Hubicka ! PR ice/7951 ! * reload1.c (emit_input_reload_insns): Use constrain_operands ! instead of constraint_accepts_reg_p to verify optimization. ! (constraint_accepts_reg_p): Kill ! Thu Oct 10 17:05:22 CEST 2002 Jan Hubicka ! PR target/7723 ! * i386.c (ix86_expand_vector_move): Do not generate const0->mem moves. ! 2002-10-09 Zack Weinberg ! PR c/7353 ! * c-decl.c (start_decl): Unconditionally issue error for ! 'typedef foo = bar'. ! (finish_decl): Remove special case for TYPE_DECL with initializer. ! * doc/extend.texi: Delete "Naming Types" section. Change all ! cross-references to that section to refer to "Typeof" instead. ! Add the useful safe-max()-macro example from "Naming Types" to ! "Typeof", rewritten using that extension. Add some compatibility ! notes to "Typeof." ! 2002-10-02 Richard Henderson ! PR opt/7124 ! * config/i386/i386.c (ix86_register_move_cost): Increase cost ! for secondary_memory_needed pairs. ! Wed Oct 9 19:09:13 CEST 2002 Jan Hubicka ! PR opt/7912 ! PR opt/7390 ! * i386.c (athlon_cost): Fix the move costs. ! 2002-10-09 Alan Modra ! * libgcc2.c (__floatdisf): Properly cure double rounding. ! 2002-10-09 Gabriel Dos Reis ! PR doc/7484 ! * doc/invoke.texi (Option Summary): List ! -Wmissing-declarations as a C only option. ! 2002-10-08 Jakub Jelinek ! * config/sparc/t-linux64 (MULTILIB_OPTIONS): Remove ! mno-app-regs|mcmodel=medany. ! (MULTILIB_DIRNAMES, MULTILIB_OSDIRNAMES): Remove alt. ! (MULTILIB_EXCEPTIONS, MULTILIB_EXCLUSIONS, MULTILIB_MATCHES): Remove. ! (CRTSTUFF_T_CFLAGS): Define. ! 2002-09-25 Eric Botcazou ! Volker Reichelt ! PR c/7411 ! * expr.c (expand_expr) [PLUS]: Simplify after the operands ! have been expanded in EXPAND_NORMAL mode. ! 2002-10-06 Richard Henderson ! * config/rs6000/rs6000.md (load_toc_v4_PIC_2): Fix base constraint. ! 2002-10-06 Roger Sayle ! PR optimization/6627 ! * toplev.c (force_align_functions_log): New global variable. ! * flags.h (force_align_functions_log): Add extern prototype. ! * varasm.c (assemble_start_function): Use it to force minimum ! function alignment. ! * config/i386/i386.h (FUNCTION_BOUNDARY): Set the correct ! minimum function alignment to one byte. ! (TARGET_PTRMEMFUNC_VBIT_LOCATION): Store the virtual bit in ! the least significant bit of vtable member function pointers. ! * tree.h (enum ptrmemfunc_vbit_where_t): Move definition to ! here from cp/cp-tree.h. ! 2002-10-06 Neil Booth ! Debian BTS Bug #157416 ! * cpplib.c (destringize_and_run): Kludge around getting ! tokens from in-progress macros. ! (_cpp_do__Pragma): Simplify. ! 2002-10-06 Frank Ch. Eigler ! * cppinit.c (init_standard_includes, parse_option): Use strncmp. ! 2002-10-05 Jakub Jelinek ! * gcc.c (set_multilib_dir): Don't access *end. ! Use memcpy instead of strncpy. Don't write beyond malloced buffer. ! (print_multilib_info): Don't show paths starting with ".:". ! * genmultilib: Add new option, "yes" if multilibs are enabled. ! Update comments. If multilibs not enabled, print .:${osdirout} ! for each directory. If multilibs are enabled, always print ! ${dirout}:${osdirout}, even if the two are the same. ! * Makefile.in (s-mlib): Pass @enable_multilib@ to genmultilib. ! Pass all MULTILIB_* variables to genmultilib even if ! --disable-multilib but MULTILIB_OSDIRNAMES is not empty. ! * gcc.c (print_multi_os_directory): New variable. ! (option_map): Support --print-multi-os-directory. ! (struct prefix_list): Add os_multilib field. ! (multilib_os_dir): New variable. ! (static_specs): Add multilib_options. ! (find_a_file): Add multilib argument. Search in GCC or OS multilib ! subdirs if non-zero. ! (read_specs, execute): Update callers. ! (find_file): Likewise. Don't prefix name with multilib_dir, instead ! pass 1 as multilib option. ! (display_help): Include --print-multi-os-directory. ! (add_prefix): Add os_multilib argument. Initialize pl->os_multilib. ! (process_command): Update callers. Handle --print-multi-os-directory. ! (do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is ! set. ! (main): Update find_a_file and add_prefix callers. ! Handle print_multi_os_directory. ! (struct mdswitchstr): New. ! (mdswitches, n_mdswitches): New variables. ! (used_arg): Add MULTILIB_DEFAULT switches too if they are not ! present on the command line nor their mutually incompatible ! switches. ! (default_arg): Optimize. ! (set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches ! array. ! (print_multilib_info): Only print GCC multilib dir name, not OS ! multilib dirname. ! * genmultilib: Add osdirnames parameter. Output multilib_options ! variable. If osdirnames is specified, output dirnames as ! dirname:osdirname. ! * mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory ! and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES ! to compute libgcc_s soname and install path. ! * Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of ! SHLIB_SLIBDIR_SUFFIXES to mklibgcc. ! (s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib ! argument. ! * config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64, ! ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove. ! (STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32 ! and -m64. ! * config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! * config/sparc/sol2-bi.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Remove. ! (STARTFILE_ARCH_SPEC): Remove. ! (STARTFILE_SPEC): Add values-X*.o here. ! * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove. ! (STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between m32 and ! !m32. ! * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! 2002-10-05 Neil Booth ! PR preprocessor/8120 ! * doc/cpp.texi: Update documentation of bad use of ##. ! Thu Oct 3 23:15:15 CEST 2002 Jan Hubicka ! * i386.h (CPP_SPECS): fix defines for -msse, -msse2, -mpentium2,3. ! Thu Oct 3 21:35:36 CEST 2002 Jan Hubicka ! * toplev.c (rest_of_compilation): Dump loops before clobbering ! the structure. ! * expr.c (force_operand): Use expand_simple_* to handle more ! cases. ! * i386.c (q_regs_operand): Use ANY_QI_REG_P. ! * i386.c (override_options): Fix stack alignment. ! (classify_argument): Handle variable sized types. ! (ix86_expand_int_movcc): Avoid RTL sharing problem. ! * i386.md (prefetch_sse_rex, prefetch_3dnow_rex): New. ! (prefetch): Properly handle 64bit case. ! * i386.c (classify_argument): Properly compute word size of the analyzed object. ! * jump.c (reg_or_subregno): New function. ! * rtl.h (reg_or_subregno): Declare ! * unroll.c (find_splittable_givs): Handle subregs. ! Richard Sandiford : ! * expr.c (force_operand): Fix reversed move. ! Andreas Jaeger : ! * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): New. ! Janis Johnson : ! * loop.c (emit_prefetch_instructions): Several small fixes. ! Thu Sep 5 00:34:33 2002 J"orn Rennecke ! * loop.c (scan_loop): Don't mark separate insns out of a libcall ! for moving. ! (move_movables): Abort if we see the first insn of a libcall. ! 2002-10-01 David S. Miller ! PR middle-end/7151 ! * config/sparc/sparc.md (movdi_insn_sp32_v9): Accept 'e' regs. ! (movdi reg/reg split): Match only on sparc32, and v9 when int regs. ! 2002-10-01 David S. Miller ! Jan Hubicka ! * reload1.c (gen_reload:SECONDARY_MEMORY_NEEDED): Handle SUBREG. ! * reload.c (push_reload:SECONDARY_MEMORY_NEEDED): Likewise. ! 2002-09-30 Bob Wilson ! * config/xtensa/xtensa.h (REG_CLASS_NAMES, REG_CLASS_CONTENTS): ! Add new RL_REGS register class. ! (PREFERRED_RELOAD_CLASS, PREFERRED_OUTPUT_RELOAD_CLASS): ! Call xtensa_preferred_reload_class for both input and output reloads. ! * config/xtensa/xtensa.c (xtensa_regno_to_class): Use new RL_REGS class. ! (xtensa_preferred_reload_class): Handle output reloads; use RL_REGS ! instead of either AR_REGS or GR_REGS classes. ! (xtensa_secondary_reload_class): Use new RL_REGS class. ! * config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class): Update. ! 2002-08-21 John David Anglin ! * cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value. ! 2002-08-20 John David Anglin ! * cppinit.c (remove_dup_dir): Add head_ptr argument to handle removal ! at head. ! (remove_dup_nonsys_dirs): New function. ! (remove_dup_dirs): Change argument head to head_ptr. Remove warnings. ! (merge_include_chains): Remove non-system include directories from ! quote and bracket include chains when they duplicate equivalent system ! directories. ! * doc/cpp.texi (-I): Update. ! * doc/cppopts.texi (-I): Update. ! * doc/install.texi (--with-local-prefix): Further document usage of ! this option. ! * doc/invoke.texi (-I): Update. ! 2002-09-30 Richard Earnshaw ! * arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb. ! (MODE_BASE_REG_CLASS, case Thumb): Only return BASE_REGS if we know ! that we have a SImode access, and only then if reload hasn't completed; ! for all other cases, use LO_REGS. ! 2002-09-29 David S. Miller ! * config/sparc/linux64.h (STARTFILE_SPEC32, ENDFILE_SPEC32): Kill ! hardcoded paths. ! 2002-09-27 Alexander N. Kabaev ! PR preprocessor/8055 ! * cppmacro.c (stringify_arg): Do not overflow the buffer ! with the terminating NUL when the argument to be stringified ! has no tokens. ! 2002-09-26 David S. Miller ! PR optimization/7335 ! * calls.c (emit_library_call_value_1): Passing args by reference ! converts a CONST function into a PURE one. ! 2002-09-26 Richard Henderson ! PR c/7160 ! * sched-deps.c (sched_analyze_insn): Make clobber insns depend ! on call insns. ! 2002-09-27 Alan Modra ! * doloop.c (doloop_modify_runtime ): Adjust ! by absolute loop increment, not loop increment. ! 2002-09-25 David S. Miller ! PR target/7842 ! * config/sparc/sparc.c (set_extends): SImode ASHIFT does not ! extend. ! 2002-09-20 Jeroen Dobbelaere ! * config/arm/arm.md (sign_extract_onebit, not_signextract_onebit): ! Add clobber of the condition code register. ! 2002-09-18 Richard Earnshaw (rearnsha@arm.com) ! PR optimization/7967 ! * arm.md (ne_zeroextractsi): Add clobber of the condition code ! register. ! 2002-09-17 Richard Henderson ! * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove ! RTX_UNCHANGING_P markers for successful tail-recursive replacement. ! 2002-09-16 Richard Henderson ! PR opt/7515 ! * c-objc-common.c (c_cannot_inline_tree_fn): Don't auto-inline ! functions that don't bind locally. ! 2002-09-17 Alan Modra ! Merge from mainline. ! 2002-07-20 Alan Modra ! PR optimization/7130 ! * loop.h (struct loop_info): Add "preconditioned". ! * unroll.c (unroll_loop): Set it. ! * doloop.c (doloop_modify_runtime): Correct count for unrolled loops. ! 2002-06-24 Alan Modra ! PR optimization/6984 ! * doloop.c (doloop_valid_p): Correct comment. ! (doloop_modify_runtime ): Simplify. ! (doloop_modify_runtime ): Don't emit code when NE. ! 2002-09-16 Jeff Law ! * libgcc2.c: Do not include machmode.h. ! 2002-09-16 Jason Merrill ! Danny Smith ! * config/i386/winnt.c (ix86_handle_dll_attribute): Set ! DECL_EXTERN and TREE_PUBLIC for dllimported variables here... ! (i386_pe_mark_dllimport): Not here. ! 2002-09-14 Stephane Carrez ! * config/m68hc11/m68hc11.md ("movdi_internal"): Allow any offsetable ! memory operand when source is 0 (K constraint). ! ("movsi_internal"): Likewise. ! ("movdf_internal"): Likewise. ! ("movsf_internal"): Likewise. ! 2002-09-14 Alan Modra ! Merge from mainline. ! 2002-09-14 Alan Modra ! * doc/tm.texi (DBX_OUTPUT_NFUN): Describe. ! * dbxout.c (dbxout_function_end): Use DBX_OUTPUT_NFUN. ! * config/rs6000/linux64.h (DBX_OUTPUT_NFUN): Define. ! 2002-08-27 David Edelsohn ! * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define. ! 2002-08-02 Alan Modra ! * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define. ! (DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define. ! * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when ! HOST_BITS_PER_WIDE_INT == 64. ! 2002-07-27 Alan Modra ! * config/rs6000/rs6000.c (output_profile_hook): Don't generate profile ! label reference when NO_PROFILE_COUNTERS. ! 2002-07-11 Alan Modra ! * config/rs6000/linux64.h (ASM_SPEC): Define. ! 2002-09-13 Alan Modra ! Merge from mainline. ! 2002-07-24 Alan Modra ! PR c/7150, target/7380 ! * config/rs6000/rs6000.md: Remove scratch reg on insns using ! addze and similar (plus (comparison r1 r2) r3) insns. Add ! missing scratch reg in one case. Formatting fixes. ! 2002-07-18 Alan Modra ! PR other/7114, target/5967 ! * config/rs6000/rs6000.c (first_reg_to_save): Remove bogus ! adjustments to first_reg for profiling case. ! (output_function_profiler): Correct lr save slot for ABI_AIX_NODESC. ! Disable profiling for 64 bit code on both ABI_V4 and ABI_AIX_NODESC. ! Save static chain reg to sp + 12 on ABI_AIX_NODESC. ! * config/rs6000/sysv4.h (ASM_OUTPUT_REG_PUSH): Define. ! (ASM_OUTPUT_REG_POP): Define. ! * config/rs6000/linux64.h (ASM_OUTPUT_REG_PUSH): Undef. ! (ASM_OUTPUT_REG_POP): Undef. ! 2002-06-30 Alan Modra ! PR optimization/7120 ! * unroll.c (loop_iterations): Handle EQ loops. ! 2002-09-13 Alan Modra ! * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Remove "if" ! nesting. Correct test for non-PowerPC64 ELF ABI_AIX. ! * config/rs6000/rs6000.md (load_toc_v4_PIC*): Disable when ABI_AIX. ! 2002-09-12 Janis Johnson ! * doc/compat.texi: New file with new chapter, Binary Compatibility. ! 2002-09-12 Jason Merrill ! * calls.c (store_one_arg): Use size_in_bytes to determine the ! amount of space to push. ! 2002-09-12 Jakub Jelinek ! * config/sparc/linux64.h (STARTFILE_SPEC32): Fix a typo. ! 2002-09-12 Alan Modra ! * emit-rtl.c (set_mem_size): New function. ! * expr.h (set_mem_size): Declare. ! * config/rs6000/rs6000.c (expand_block_move_mem): Exterminate. ! (expand_block_move): Instead, use adjust_address and ! replace_equiv_address to generate proper aliasing info. ! Move common code out of conditionals. Localize vars. ! 2002-09-11 Alexander Kabaev ! Wed Apr 24 13:48:25 CEST 2002 Jan Hubicka ! * loop.c (canonicalize_condition): Use gen_int_mode. ! 2002-09-11 Janis Johnson ! * Makefile.in (TEXI_GCC_FILES): Add compat.texi. ! * doc/gcc.texi (Top): Add new chapter, Binary Compatibility, and ! include its file, compat.texi. ! * doc/trouble.texi (Interoperation): Update information about C++ ABI ! issues. ! * doc/invoke.texi (-fshort-wchar): Move to Code Generation Options. ! (-fpcc-struct-return, -freg-struct-return, -fshort-enums, ! -fshort-double, -fshort-wchar, -fpack-struct, -fleading-underscore): ! Warn that these options can break ABI compatibility. ! (Many places): Fix overfull hboxes. ! * doc/extend.texi: Fix a broken link; fix overfull hboxes. ! * doc/install.texi: Fix a typo, some formatting directives, and ! overfull hboxes. ! * doc/c-tree.texi: Fix overfull hboxes. ! * doc/cppopts.texi: Ditto. ! * doc/makefile.texi: Ditto. ! * doc/rtl.texi: Ditto. ! * doc/standards.texi: Ditto. ! * doc/tm.texi: Ditto. ! 2002-09-08 Alan Modra ! * reload.c (find_reloads

    ): Pass operand_mode to ! find_reloads_address. ! 2002-09-07 Scott Snyder ! PR target/7374 ! * config/alpha/alpha.md (abstf2): Fix typo: 'neg' for 'abs'. ! 2002-09-07 Glen Nakamura ! PR opt/7814 ! * sched-deps.c (sched_analyze_insn): Make sure to add insn ! to reg_last->sets after flushing the dependency lists to guarantee ! that subsequent clobbers will be dependent on it. ! 2002-09-07 Alan Modra ! * config/rs6000/linux64.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. ! 2002-09-06 Jakub Jelinek ! * configure.in (HAVE_AS_OFFSETABLE_LO10): Use -xarch=v9 ! unconditionally when gcc_cv_as_flags64 checks are gone. ! * configure: Rebuilt. ! 2002-09-04 Eric Botcazou ! PR c/7102 ! * optabs.c (expand_binop): Convert CONST_INTs in all cases. ! 2002-09-04 Jason Thorpe ! * config/sparc/t-netbsd64: Disable multilib for now. ! 2002-09-01 Alexandre Oliva ! * c-tree.h (skip_evaluation): Move declaration... ! * c-common.h: ... here. ! * c-typeck.c (build_external_ref): Don't assemble_external nor ! mark a tree as used if skip_evaluation is set. ! * c-parse.in (typeof): New non-terminal to set skip_evaluation ! around TYPEOF. ! (typespec_nonreserved_nonattr): Use it. ! 2002-09-01 Marek Michalkiewicz ! 2002-08-13 Denis Chertykov ! * config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles ! which can change CC0. ! 2002-08-29 Rodney Brown ! * doc/install.texi (Specific, alpha*-dec-osf*): Add "virtual ! memory exhausted" workarounds. ! 2002-08-29 John David Anglin ! * install.texi (hppa64-hp-hpux11*): Document installation procedure. ! 2002-08-28 Jason Merrill ! * c-common.c (c_expand_expr) [STMT_EXPR]: If the last expression is ! a VAR_DECL with RTL that matches the target, just return that RTL. ! 2002-08-28 Daniel Berlin ! * tree-inline.c (expand_call_inline): Make the statement ! expression we generate have a COMPOUND_STMT. ! 2002-08-27 Mark Mitchell ! * doc/invoke.texi: Document -Wabi. ! 2002-08-23 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_select_section): Treat ! DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly ! default. ! (rs6000_unique_section): Likewise. ! 2002-08-22 Jason Merrill ! * langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro. ! * langhooks.c (lhd_expr_size): Define default. ! * langhooks.h (struct lang_hooks): Add expr_size. ! * explow.c (expr_size): Call it. ! (int_expr_size): New fn. ! * expr.h: Declare it. ! * expr.c (expand_expr) [CONSTRUCTOR]: Use it to calculate how ! much to store. ! 2002-08-23 Alan Modra ! * config/rs6000/rs6000.c (output_mi_thunk): Don't determine insns ! for loading delta with num_insns_constant_wide. Calculate ! delta_low, delta_high without using a conditional. ! 2002-08-20 Andreas Jaeger ! Merge from trunk: ! Wed Jul 17 00:20:48 CEST 2002 Jan Hubicka ! * i386.md (prefetch): Fix for 64bit mode. ! (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. ! 2002-08-11 Andreas Jaeger ! PR target/7531: ! * doc/invoke.texi (i386 and x86-64 Options): Document -mcmodel. ! 2002-06-24 Jeff Law ! * flow.c (propagate_one_insn): When removing an insn ! with a REG_LIBCALL note but not the entire libcall sequence, ! delete the associated REG_RETVAL note. ! 2002-06-04 Jeff Law ! Michael Matz ! * sched-int.h (struct deps): New field libcall_block_tail_insn. ! * sched_deps.c (init_deps): Initialize libcall_block_tail_insn. ! * sched_deps.c (sched_analyze_insn): If libcall_block_tail_insn ! is set, then mark the current insn as being part of a libcall ! scheduling group. ! (sched_analyze): Set and clear libcall_block_tail_insn appropriately. ! * haifa-sched.c (schedule_block): Do not count USE or CLOBBER ! insns against the issue rate. ! 2002-05-30 Jeff Law ! * flow.c (propagate_one_insn): Revise yesterday's patch. Delete ! a dead insn with a REG_RETVAL note when the entire libcall is not ! dead and remove the associated REG_LIBCALL note at the same time. ! 2002-05-29 Jeff Law ! * flow.c (propagate_one_insn): Do not remove a dead insn if it ! contains a REG_RETVAL note. ! * haifa-sched (sched_analyze): Remove another useless clearing ! of SCHED_GROUP_P I missed yesterday. ! 2002-05-28 David Edelsohn ! Jeff Law ! * optabs.c (expand_binop): Fix nwords sign warnings. ! generate pseudo for add_optab. ! * sched-deps.c (sched_analyze): Do not clear SCHED_GROUP_P. ! * haifa-sched.c (move_insn): Clear SCHED_GROUP_P after it is used. ! 2002-08-18 Neil Booth ! PR preprocessor/7602 ! * cppinit.c (path_include): Treat the system environment ! variables as being cxx_aware. ! 2002-08-16 David Edelsohn ! * collect2.c (is_ctor_dtor): Add other possible JOINER values. ! * config/rs6000/rs6000.c (output_mi_thunk): Return to function ! section on TARGET_ELF. ! * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning. ! (Binaries): Update Bull Freeware URL. ! 2002-08-15 Neil Booth ! PR preprocessor/7358 ! PR preprocessor/7357 ! PR preprocessor/7526 ! * cppfiles.c (stack_include_file): Ignore main file if ! appropriate. Correct test of whether a dependency should ! be output. ! * cppinit.c (init_dependency_output): Ignore main file ! for SUNPRO_DEPENDENCIES. ! (struct lang_flags): Rename trigraphs std. ! (set_lang): Update. ! * cpplib.c (run_directive): Kludge so _Pragma dependency works. ! * cpplib.h (struct cpp_options): New members. ! * cppmacro.c (collect_args): Flag whether to swallow a possible ! future comma pasted with varargs. ! (replace_args): Use this flag. ! * doc/cpp.texi: Update varargs extension documentation. ! * doc/cppenv.texi: Update. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-08-08 Jakub Jelinek ! * config/rs6000/rs6000.h, config/rs6000/aix.h, ! config/rs6000/darwin.h, config/rs6000/linux64.h: Revert last ! two patches. ! * config/rs6000/sysv4.h: Likewise, remove #undef ADJUST_FIELD_ALIGN. ! 2002-08-08 Jakub Jelinek ! * config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove. ! * config/rs6000/rs6000.c (rs6000_field_alignment): Move... ! * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): ...inline into the ! macro. ! 2002-08-08 Jakub Jelinek ! * stor-layout.c (place_union_field): For bitfields if ! PCC_BITFIELD_TYPE_MATTERS and TYPE_USER_ALIGN, set record's ! TYPE_USER_ALIGN. ! 2002-08-07 Jakub Jelinek ! Richard Henderson ! * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN ! to type_align when PCC_BITFIELD_TYPE_MATTERS. Only apply ! ADJUST_FIELD_ALIGN if not DECL_USER_ALIGN resp. TYPE_USER_ALIGN. ! (place_field): Likewise. ! * config/i386/i386.c (x86_field_alignment): Don't check ! TARGET_ALIGN_DOUBLE for the second time. ! Apply min for all MODE_INT and MODE_CLASS_INT modes. ! * config/rs6000/rs6000.c (rs6000_field_alignment): New. ! * config/rs6000/rs6000-protos.h (rs6000_field_alignment): New ! prototype. ! * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): Define. ! * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Remove. ! * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Remove. ! * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Remove. ! * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove. ! * doc/tm.texi (ADJUST_FIELD_ALIGN): Update description. ! 2002-08-06 Jakub Jelinek ! * config/i386/mmintrin.h (__m64): Make the type 64-bit aligned. ! 2002-08-06 Jakub Jelinek ! * config.gcc (*-*-linux*): Default to --enable-threads=posix if no ! --{enable,disable}-threads is given to configure. ! (alpha*-*-linux*, hppa*-*-linux*, i[34567]86-*-linux*, ! x86_64-*-linux*, ia64*-*-linux*, m68k-*-linux*, mips*-*-linux*, ! powerpc-*-linux-gnualtivec*, powerpc-*-linux*, s390-*-linux*, ! s390x-*-linux*, sh-*-linux*, sparc-*-linux*, sparc64-*-linux*): ! Remove thread_file setting here. ! 2002-08-04 Mark Mitchell ! * doc/install.texi (Installing GCC): Refer to buildstat.html, ! rather than listing version-specific build status files. ! 2002-08-04 Joseph S. Myers ! * doc/include/gcc-common.texi (version-GCC): Increase to 3.2. ! 2002-08-01 Benjamin Kosnik ! * gcc.c: Set __GXX_ABI_VERSION to 102. ! 2002-07-30 Franz Sirl ! * gcc.c (cpp_unique_options): Define __GXX_ABI_VERSION, bump it to 101. ! 2002-07-24 Frank van der Linden ! PR optimization/7291 ! * config/i386/i386.c (ix86_expand_clrstr): Fix bzero alignment ! problem on x86_64. ! 2002-05-16 Jason Merrill ! * config/mips/mips.c (mips_output_external): Don't do sdata ! optimization for a variable with DECL_COMDAT set. ! 2002-01-03 Jakub Jelinek ! * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE. ! * c-decl.c (build_compound_literal): Defer compound literal decls ! until until file end to emit them only if they are actually used. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. ! 2002-07-21 Nick Clifton ! * Import following patch from mainline: ! 2002-03-18 Bernd Schmidt ! * config/arm/arm.c (arm_gen_movstrqi): Use gen_lowpart ! instead of gen_rtx_SUBREG. ! (arm_reload_out_hi): Use gen_lowpart instead of ! gen_rtx_SUBREG to access QImode components. ! * config/arm/arm.md: Disable zero_extend split for QImode ! subregs in BIG_ENDIAN mode. ! (storehi_bigend): Match use of least significant byte. ! (storeinthi): Remove extraneous SUBREG. ! Add missing construction of operands[2]. ! (movhi): Use gen_lowpart in place of gen_rtx_SUBREG. ! (movqi): Use gen_lowpart in place of gen_rtx_SUBREG. ! Replace gen_rtx (SUBREG) with gen_rtx_SUBREG. ! 2002-07-18 Richard Henderson ! PR optimization/7147 ! * ifcvt.c (noce_get_condition): Make certain that the condition ! is valid at JUMP. ! 2002-07-16 Hans-Peter Nilsson ! * config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC): Don't ! --gc-sections if -r. ! 2002-07-15 Eric Botcazou ! PR optimization/7153 ! * regmove.c (optimize_reg_copy_3): Don't optimize if the register ! dies in more than one insn. ! 2002-07-15 Jason Thorpe ! * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove. ! 2002-07-15 John David Anglin ! * bb-reorder.c (make_reorder_chain_1): Search harder for the vax ! casesi fallthru edge. ! * cfgrtl.c (force_nonfallthru_and_redirect): Place redirection ! block after ADDR_VEC. ! * vax.md (casesi): Use emit_jump_insn. Remove unused constraints. ! 2002-07-15 Jakub Jelinek ! PR middle-end/7245 ! * config/i386/i386.c (const_int_1_31_operand): New. ! * config/i386/i386.h (PREDICATE_CODES): Add it. ! * config/i386/i386.md (ashlsi3_cmp, ashlsi3_cmp_zext, ashlhi3_cmp, ! ashlqi3_cmp, ashrsi3_cmp, ashrsi3_cmp_zext, ashrhi3_cmp, ashrqi3_cmp, ! lshrsi3_cmp, lshrsi3_cmp_zext, lshrhi3_cmp, lshrqi3_cmp): Use it. ! 2002-06-11 Andreas Schwab ! * config/m68k/m68k.h (PREDICATE_CODES): Define. ! 2002-07-15 Alan Modra ! PR target/7282 ! * config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64. ! (floatunssidf2): Likewise. ! (floatsidf_ppc64): New insn_and_split. ! (floatunssidf_ppc64): Likewise. ! 2002-07-12 Stephane Carrez ! * config/m68hc11/m68hc11.md ("zero_extendsidi2"): Use D_REG only for ! the scratch register. ! ("*movhi2_push"): Accept Z_REG because a split pattern can make use ! of it, forbid reload to use it. ! 2002-07-12 Marek Michalkiewicz ! * config/avr/avr.c (test_hard_reg_class): Fix TEST_HARD_REG_BIT ! usage on 64-bit hosts, return value was truncated to 32 bits. ! 2002-07-11 John David Anglin ! * pa.md (adddi3): Change predicate of operand 2 to adddi3_operand. ! Remove comment. Change predicate of 32-bit adddi3 insn pattern to ! arith11_operand. ! * pa-protos.h (adddi3_operand): Add prototype. ! * pa.c (cint_ok_for_move): Fix comment. ! (adddi3_operand): New function. ! (emit_move_sequence): Don't directly split DImode constants on ! 32-bit targets. ! 2002-07-05 Stephane Carrez ! * config/m68hc11/m68hc11.md ("*movqi_68hc12"): Avoid allocating ! QI mode registers in soft registers. ! ("zero_extendqihi2"): Do not take into account soft registers ! for register allocation (use '*' constraint). ! 2002-07-05 Stephane Carrez ! * config/m68hc11/m68hc11.md ("*ashlsi3"): Avoid saving y if we know ! it is dead. ! ("*ashrsi3"): Likewise. ! ("*lshrsi3"): Likewise. ! 2002-07-05 Stephane Carrez ! * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize ! address computation and memory moves. ! 2002-07-03 Mark Mitchell ! PR c++/6706 ! * dwarfout.c (output_reg_number): Fix warning message. ! (output_bound_representation): Check SAVE_EXPR_RTL is not NULL ! before using it. ! 2002-07-03 Richard Henderson ! * config/i386/i386.md (prologue_get_pc): Issue pop here ... ! * config/i386/i386.c (load_pic_register): ... not here. ! 2002-07-03 David Edelsohn ! * config/rs6000/rs6000.md (fix_truncdfsi2_internal): Ignore DImode ! in FPR as preference. ! (fctiwz): Same. ! (floatdidf2, fix_truncdfdi2): Same. ! (floatdisf2, floatditf2, fix_trunctfdi2): Same. ! (floatditf2): Same. ! (floatsitf2, fix_trunctfsi2): SImode in GPR. ! (ctrdi): Remove FPR alternative and splitter. ! 2002-07-02 Hans-Peter Nilsson ! PR target/7177 ! * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Correct number ! of indirections for register inside sign-extended mem part. ! 2002-07-01 John David Anglin ! * emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT. ! 2002-06-30 David Edelsohn ! * config/rs6000/rs6000.md (ctrdi): Allocate pseudo for FPR ! constraint in define_expand, not splitter. ! 2002-06-28 Phil Edwards ! * configure.in (gcc_gxx_include_dir): Change to match versioned ! C++ headers if --enable-version-specific-runtime-libs is used. ! * configure: Regenerate. ! 2002-06-28 Stephane Carrez ! * config/m68hc11/m68hc11.md ("*addsi3"): Use 'o' constraint to ! avoid the auto increment addressing modes. ! ("*subsi3"): Likewise. ! (split for add/sub on address): For 68HC12 push the value on ! the stack and do the operation with a pop. ! 2002-06-28 Stephane Carrez ! * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Define. ! * config/m68hc11/m68hc11-protos.h (m68hc11_optimization_options): ! Declare. ! * config/m68hc11/m68hc11.c (m68hc11_optimization_options): New, ! do not reorder basic blocks at the end when optimizing for size. ! 2002-06-28 Stephane Carrez ! * config/m68hc11/m68hc11.c (autoinc_mode): New function. ! (m68hc11_make_autoinc_notes): New function. ! (m68hc11_split_move): Be very cautious when spliting a move with ! auto increment/decrement modes because this may result in incompatible ! directions; add REG_INC notes to the resulting insn for CSE reg. ! 2002-06-28 Stephane Carrez ! * config/m68hc11/m68hc11.c (register_indirect_p): For 68HC12 a constant ! can be a valid address. ! 2002-06-28 Bob Wilson ! * config/xtensa/xtensa-protos.h (xtensa_return_addr): Declare. ! config/xtensa/xtensa.c (xtensa_return_addr): New function. ! config/xtensa/xtensa.h (RETURN_ADDR_RTX): Use xtensa_return_addr. ! config/xtensa/xtensa.md (fix_return_addr): New pattern. ! 2002-06-28 Bob Wilson ! * config/xtensa/xtensa.h (FUNCTION_PROFILER): Respect flag_pic ! when generating the call to _mcount. ! (NO_PROFILE_COUNTERS): Define. ! 2001-06-08 Bernd Schmidt ! * emit-rtl.c (gen_lowpart_common): Don't create paradoxical FLOAT_MODE ! subregs. ! * recog.c (general_operand, register_operand): Disallow them. ! 2002-06-27 Bob Wilson ! * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Pass ! flag_function_sections as new 3rd arg to resolve_unique_section. ! 2002-06-27 Neil Booth ! PR preprocessor/7070 ! * c-lex.c (cb_def_pragma): Don't try to spell CPP_EOF. ! 2002-06-27 Gerald Pfeifer ! * doc/install.texi (Binaries): Add Sinix/Reliant Unix. Move ! Hitachi entry. Make punctuation more consistent. ! 2002-06-27 Matt Kraai ! * doc/install.texi: Change ` bit' to `-bit'. ! * doc/md.texi: Change `-bits' to `-bit'. ! * doc/tm.texi: Change `-bits' to ` bits'. ! 2002-06-24 David S. Miller ! * config/sparc/sparc.h (INIT_TARGET_OPTABS): If ARCH64, set the ! 32-bit ABI libfuncs to NULL. ! * expmed.c (expand_divmod): Do not set optab1/optab2 to the shift ! optabs if op1 is const0_rtx. ! 2002-06-23 Jan Hubicka ! * reg-stack.c (convert_regs_exit): Push the registers to stack in ! proper order. ! 2002-06-22 Ulrich Weigand ! PR middle-end/6963 ! * function.c (assign_stack_temp_for_type): Do not return ! the same MEM rtx for multiple uses of a stack slot. ! 2002-06-22 David S. Miller ! PR target/6841 target/6770 target/6719 ! * config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Return ! NO_REGS for constant X when CLASS is GENERAL_OR_FP_REGS or ! GENERAL_OR_EXTRA_FP_REGS. ! 2002-06-21 Rainer Orth ! * config/sparc/t-crtfm (crtfastmath.o): Prefix with $(T) for ! multilibs. ! * config/sparc/t-sol2-64 (EXTRA_MULTILIB_PARTS): Add crtfastmath.o. ! * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Likewise. ! Fixes PR other/6836. ! 2002-06-21 Bo Thorsen ! * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Add i386 ! support so multilib works again. And don't define this at all ! when -Dinhibit_libc is used. ! Thu Jun 20 16:41:40 CEST 2002 Jan Hubicka ! * combine.c (gen_lowpart_for_combine): Avoid calling of ! simplify_gen_subreg on VOIDmode. ! * combine.c (subst): Be prepared for simplify_subreg to return VOIDmode. ! 2002-06-20 Richard Henderson ! * c-common.c (c_common_get_alias_set): Correctly handle characters. ! Rearrange order of expressions; don't handle vectors here. ! * alias.c (get_alias_set): Let vectors match their components. ! 2002-06-17 Hans-Peter Nilsson ! PR target/7042 ! * config/cris/cris.c (cris_simple_epilogue): Kludge around reorg.c ! bug by saing that the epilogue isn't simple if there's a ! non-empty current_function_epilogue_delay_list. ! * config/cris/cris.md ("return"): Add sanity check asserting that ! current_function_epilogue_delay_list is empty. ! 2002-06-17 Richard Henderson ! * config/i386/i386.h (BIGGEST_FIELD_ALIGNMENT): Define instead ! of ADJUST_FIELD_ALIGN if IN_TARGET_LIBS. ! 2002-06-17 Richard Henderson ! PR target/6922 ! * expmed.c (make_tree): Handle SIGN_EXTEND/ZERO_EXTEND. ! Mon Jun 17 00:31:46 CEST 2002 Jan Hubicka ! * i386-protos.h (x86_field_alignment): Declare. ! * i386.c (x86_field_alignment): Define. ! * i386.h (ADJUST_FIELD_ALIGNMENT): New. ! (BIGGEST_FIELD_ALIGNMENT): Kill. ! 2002-06-16 Richard Henderson ! PR opt/6722 ! * regclass.c (globalize_reg): Update regs_invalidated_by_call. ! 2002-06-16 Richard Henderson ! PR c/7030 ! * dwarf2out.c (modified_type_die): Don't assign the qualified die ! to the unqualified type. ! 2002-06-14 Jeff Sturm ! * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS): Add ! SPARC_STACK_BIAS. ! 2002-06-14 Eric Botcazou ! * loop.c (check_final_value): Use v->always_executed ! instead of v->always_computable. ! * unroll.c (final_giv_value): Don't calculate the final ! value as a function of the biv if the giv is not computed ! for every loop iteration. ! 2002-06-14 Eric Botcazou ! PR c/6677 ! * convert.c (convert_to_integer) [LSHIFT_EXPR]: Don't pass ! the truncation down when the target type is signed. ! [trunc1]: Use unsigned arithmetic for LSHIFT_EXPR. ! * fold-const.c (extract_muldiv) [NOP_EXPR]: Don't pass through ! the conversion if the target type is a smaller type. ! Thu Jun 13 18:27:05 CEST 2002 Jan Hubicka ! * i386.c (ix86_expand_movstr): Fix pasto. ! Thu Jun 13 18:02:11 CEST 2002 Jan Hubicka ! * reload.c (find_valid_class): Fix thinko in my previous patch. ! 2002-06-13 Hans-Peter Nilsson ! PR target/6997 ! * config/cris/cris.md ("sleu"): Set attribute "cc" to "none". ! 2002-06-12 Daniel Jacobowitz ! * config/mips/elf.h (DWARF2_DEBUG_INFO): Define. ! * config/mips/mips.c (mips_output_filename): Don't print a ! ".file" directive if we are using DWARF-2. ! (mips_output_function_prologue): Do not emit source file ! name for TARGET_GAS. ! 2002-06-11 Ulrich Weigand ! * config/s390/s390.md (movsi): Only use floating point ! register alternatives when operands are already fprs. ! (movdi_31, movdi_64): Likewise. ! 2002-06-11 Ulrich Weigand ! * config/s390/s390.md (reload_base, ltorg): Remove. ! * s390.c (s390_stop_dump_lit_p, s390_dump_literal_pool, ! s390_asm_output_pool_prologue, s390_pool_start_insn): Remove. ! * s390-protos.h (s390_stop_dump_lit_p, s390_dump_literal_pool, ! s390_asm_output_pool_prologue): Likewise. ! * s390.h (s390_pool_start_insn): Likewise. ! * s390.c (s390_output_symbolic_const): Remove support for ! old-style pool chunks. ! (s390_function_epilogue): Likewise. ! (s390_output_constant_pool): Likewise. Also, fix incorrect ! alignment for 64-bit literal pools. ! (print_operand_address): Remove 'y' and 'Y' format flags. ! * s390.h (ASM_OUTPUT_POOL_PROLOGUE): Remove support for ! old-style pool chunks. ! (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Likewise. ! (ASM_OUTPUT_POOL_EPILOGUE): Remove. ! (S390_CHUNK_MAX, S390_CHUNK_OV, S390_POOL_MAX): Remove. ! * s390.c (consttable_operand): New function. ! * s390-protos.h (consttable_operand): Declare it. ! * s390.h (PREDICATE_CODES): Add consttable_operand. ! * s390.md (consttable_qi, consttable_hi, consttable_si, consttable_di, ! consttable_sf, consttable_df, pool_start_31, pool_end_31, ! pool_start_64, pool_end_64, reload_base, reload_base2): New insns. ! * s390.c (struct constant, struct constant_pool): New data types. ! (constant_modes, gen_consttable): New variables. ! (s390_start_pool, s390_end_pool, s390_add_pool, ! s390_dump_pool, s390_free_pool): New functions. ! (s390_chunkify_pool): Completely reimplement literal pool ! overflow handling. ! * s390.c (s390_pool_overflow): New variable. ! * s390.h (s390_pool_overflow): Declare it. ! * s390.md (cjump, icjump): Use it to adapt length for out-of-range ! jumps in literal pool overflow situations. ! * s390.c (s390_decompose_address): Accept new-style pool chunk offsets. ! (s390_frame_info): Account for possible use of RETURN_REGNUM ! by new literal pool overflow code. ! (s390_emit_prologue): Likewise. ! 2002-06-10 Jakub Jelinek ! PR optimization/6759 ! * cse.c (cse_insn): Fold src_eqv just once, store it folded back into ! the REQ_EQUAL note. ! 2002-06-10 Jakub Jelinek ! PR c/6660 ! * c-decl.c (grokfield): Allow user defined types if they declare ! structs or unions for unnamed fields. ! 2002-06-10 Jakub Jelinek ! PR c/6809 ! * print-rtl.c (print_mem_expr): Don't crash on unnamed fields. ! 2002-06-10 Jakub Jelinek ! * varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR. ! (compare_constant): Likewise. ! (output_addressed_constants): Likewise. ! 2002-06-10 Jakub Jelinek ! * cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't ! merge bb with itself. ! 2002-06-07 Jason Thorpe ! * config.gcc (mips*-*-netbsd*): Add mips/t-netbsd to ${tmake_file}. ! * config/mips/t-netbsd: New file. ! 2002-06-07 H.J. Lu (hjl@gnu.org) ! * configure.in: Add --enable-__cxa_atexit. ! * configure: Regenerated. ! * config.in: Likewise. ! * defaults.h (DEFAULT_USE_CXA_ATEXIT): New. Defined to be 0 if ! not defined. ! 2002-06-07 Jason Thorpe ! * config/mips/netbsd.h (CACHE_FLUSH_FUNC): Define. ! Thu Jun 6 07:17:43 2002 Nicola Pero ! PR objc/6834 ! * objc/objc-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define to be ! c_common_get_alias_set. ! (LANG_HOOKS_SAFE_FROM_P): Define to be c_safe_from_p. ! 2002-06-05 Jeff Law ! * pa.h (EXTRA_CONSTRAINT, T case): Further refine so that it ! rejects (mem (lo_sum (reg) (unspec))), but will allow ! (mem (lo_sum (reg) (symbol_ref)) for PA2.0. ! 2002-06-05 Alan Modra ! * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Define. ! Tue Jun 4 18:16:50 CEST 2002 Jan Hubicka ! * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Do not initialize ! fields past the register table. ! * i386.c (classify_argument): Properly handle base classes. ! Tue Jun 4 13:09:18 CEST 2002 Jan Hubicka ! * loop.c (emit_prefetch_instructions): Properly place the address ! computation. ! * dwarf2out.c (output_call_frame_info): Do not skip unwind info ! when flag_asynchronous_unwind_tables is set. ! * i386-protos.h (x86_output_mi_thunk): Declare. ! * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... ! * i386.c (x86_output_mi_thunk): ... here; handle 64bits. ! * config/i386/i386.c (ix86_expand_int_movcc): Truncate to proper ! mode. ! * i386.md (movabsdi): Kill broken alternative. ! * i386.c (dbx64_register_map): Fix typo ! 2002-06-03 Jason Thorpe ! * config/rs6000/netbsd.h (DRAFT_V4_STRUCT_RET): Remove. ! 2002-05-31 John David Anglin ! * pa-linux.h (WCHAR_UNSIGNED): Define to 0. ! * pa.h (WCHAR_UNSIGNED): Define to 1. ! 2002-05-31 John David Anglin ! * pa.c (output_millicode_call): Correct "be,l" insn for TARGET_PA_20. ! (output_call): Likewise. ! 2002-05-30 Richard Henderson ! Eric Botcazou ! PR optimization/6822 ! * config/i386/i386.c (ix86_expand_int_movcc): Don't cast INTVAL ! to unsigned int for op1 comparisons. Use gen_int_mode. ! 2002-05-30 Marc Espie ! * config.gcc (sparc64-*-openbsd*): New. ! * config/sparc/openbsd1-64.h: New. ! * config/sparc/openbsd64.h: New. ! 2002-05-30 Jason Thorpe ! * config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Set to ! 96 if not __mc68010__. ! 2002-05-30 Andreas Schwab ! * config/ia64/sysv4.h (DO_SELECT_SECTION): Also handle ! FUNCTION_DECLs. ! 2002-05-30 Jason Thorpe ! * config/i386/netbsd64.h (CPP_LP64_SPEC): Define. ! (CPP_SUBTARGET_SPEC): Define. ! (SUBTARGET_EXTRA_SPECS): Redefine, adding cpp_lp64 and ! cpp_subtarget specs. ! (CPP_SPEC): Redefine to include %(cpp_subtarget). ! 2002-05-29 Hans-Peter Nilsson ! * doc/md.texi (Patterns): Note pattern condition pitfall ! for unnamed insn. ! 2002-05-29 Jason Thorpe ! * config/sparc/netbsd-elf.c (CPP_SUBTARGET_SPEC64): Remove ! -D__arch64__. Add -D_LP64. ! (CPP_ARCH32_SPEC): Redefine to match the non-bi-arch version ! from sparc.h. ! (CPP_ARCH64_SPEC): Likewise. ! (NO_BUILTIN_PTRDIFF_TYPE): Undef. ! (NO_BUILTIN_SIZE_TYPE): Undef. ! 2002-05-29 Jason Thorpe ! * config.gcc (alpha-*-netbsd*): Don't use crtstuff. ! 2002-05-29 Jason Thorpe ! * config/alpha/netbsd.h (CPP_PREDEFINES): Add -D_LP64. ! 2002-05-29 Richard Henderson ! * config/i386/i386.c (ix86_compute_frame_layout): Do add bottom ! alignment for alloca. ! 2002-05-29 Neil Booth ! PR preprocessor/6844 ! * cppmacro.c (cpp_macro_definition): Reserve space for terminating ! NUL. ! 2002-05-29 Joel Sherrill ! * config/rs6000/rs6000.h (ASM_CPU_SPEC): Use -m403 and -m405. ! 2002-05-29 Hans-Peter Nilsson ! PR target/6838 ! * config/cris/cris.md: Fix typos and thinkos in comments. ! (splitter for mov_sideqi_mem, mov_sidehi_mem, mov_sidesi_mem): ! Remove spurious mode specifier on operand 2. ! 2002-05-29 Ulrich Weigand ! * config/s390/s390.c (legitimate_pic_operand_p): Do not ! accept symbolic LARL operands. ! (s390_emit_epilogue): Do not set FRAME_RELATED_P on ! epilogue insns. ! 2002-05-28 Marc Espie ! * config/i386/openbsd.h (HAVE_GAS_MAX_SKIP_P2ALIGN): Remove, ! inherited from gas.h. ! (ASM_QUAD): Undef. OpenBSD does not support it. ! 2002-05-28 Danny Smith ! * doc/install.texi (binaries): Change mingw binaries ! link to www.mingw.org. ! 2002-05-28 Richard Henderson ! * config/i386/i386.c (ix86_compute_frame_layout): Do not add ! bottom alignment for leaf functions. ! Mon May 27 10:37:28 CEST 2002 Jan Hubicka ! * reload.c (find_valid_class): Accept new argument DEST, ! choose class accordingly. ! (push_reload): Update callers. ! 2002-05-26 Richard Henderson ! 2002-05-25 Richard Henderson ! * c-pragma.c (apply_pragma_weak): Convert value identifier to ! string for decl_attributes. ! (handle_pragma_weak): Call assemble_alias if we're modifying ! an existing decl. ! 2002-05-15 Richard Henderson ! * varasm.c (merge_weak): Remove special case for extern and common. ! 2002-05-15 Richard Henderson ! * varasm.c (merge_weak): Error for any weakening after definition. ! Adjust weakening after use warning to catch more cases. ! (assemble_alias): Set TREE_USED and TREE_ASM_WRITTEN consistently. ! * config/alpha/alpha.c (alpha_encode_section_info): Do not abort. ! 2002-03-02 Richard Henderson ! * attribs.c (handle_alias_attribute): Don't call assemble_alias. ! * toplev.c (rest_of_decl_compilation): Invoke assemble_alias when ! needed. ! 2002-05-26 Jakub Jelinek ! * cse.c (fold_rtx): Don't optimize if SUBREG changes mode class. ! 2002-05-25 Richard Henderson ! PR target/6788 ! * config/sparc/sparc.c (sparc_output_mi_thunk): New implementation ! using rtl instead of fprintf. ! * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Use it. ! * config/sparc/sparc-protos.h: Update. ! 2002-05-25 Marek Michalkiewicz ! * config/avr/avr.c (avr_handle_progmem_attribute): Handle TYPE_DECL. ! * config/avr/avr.c (machine_dependent_reorg): Sign extend the ! CONST_INT operand to the correct mode after adding 1 to it. ! 2002-05-24 Roman Lechtchinsky ! * config/alpha/unicosmk.h (REAL_VALUE_TO_TARGET_SINGLE, ! REAL_VALUE_TO_TARGET_DOUBLE): Define for native builds. ! 2002-05-24 Jakub Jelinek ! PR other/6782 ! * final.c (get_mem_expr_from_op): Return 0 if op is NULL. ! 2002-05-24 David Edelsohn ! * config/rs6000/aix43.h (LINK_SPEC): Add PE initializer. ! (STARTFILE_SPEC): Delete PE crt0.o. ! * config/rs6000/aix51.h: Same. ! * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Append [DS] to ! function descriptor symbol. Use RS6000_OUTPUT_BASENAME. ! (ASM_OUTPUT_DEF_FROM_DECLS): Use RS6000_OUTPUT_BASENAME. ! * config/rs6000/xcoff.h (ASM_OUTPUT_DEF): Define. ! 2002-05-24 Richard Henderson ! * varasm.c (asm_output_bss): Always output one byte. ! * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise. ! 2002-05-24 Neil Booth ! PR preprocessor/6780 ! * cppmacro.c (enter_macro_context): Clear state.angled_headers. ! 2002-05-21 Richard Earnshaw ! * bitmap.c (bitmap_find_bit): Return early if we have the correct ! element cached. ! 2002-05-24 Neil Booth ! * cppinit.c (mark_named_operators): Split out from init_builtins. ! (struct builtin): Remove operator. ! (CPLUS, OPERATOR, O): Kill ! (struct named_op): New. ! (cpp_finish_options): Call it from here instead. ! (init_builtins): Don't do named operators. ! 2002-05-20 David S. Miller ! * cselib.c (max_value_regs): New. ! (cselib_lookup, cselib_invalidate_regno): Initialize it when ! adding new entries to the REG_VALUES table and we are dealing with ! a hard register. ! (clear_table): Initialize it. ! (cselib_invalidate_regno): Use it to determine which hard ! registers to scan when mode is not VOIDmode. ! 2002-05-24 Alan Modra ! * config/rs6000/rs6000.c (output_toc): Mask longs to 32 bits. ! 2002-05-23 Hans Boehm ! * config/ia64/linux.h (IA64_GATE_AREA_END): Adjust for 64K ! pages. ! 2002-05-23 Neil Booth ! PR preprocessor/6517 ! * Makefile.in: Update. ! * c-common.c (c_common_post_options): Add preprocessor ! errors to the error count. ! * c-lang.c (c_post_options): Kill. ! (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. ! * hooks.h: Add header guards. ! * langhooks-def.h: Include hooks.h. ! (LANG_HOOKS_POST_OPTIONS): Update. ! * langhooks.h (struct lang_hooks): Update post_options. ! * toplev.c (parse_options_and_default_flags): Update. ! objc: ! * objc-lang.c (objc_post_options): Kill. ! (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. ! 2002-05-23 Jakub Jelinek ! PR target/6753 ! * config/i386/i386.md (sse_movdfcc, sse_movdfcc_eq): Use Y instead ! of x in constraints for clarity. ! (sse_mov?fcc split): abort if op2 == op3. ! (sse_movsfcc_const0_1, sse_movsfcc_const0_2, sse_movsfcc_const0_3, ! sse_movsfcc_const0_4): Add earlyclobber. ! (sse_movdfcc_const0_1, sse_movdfcc_const0_2, sse_movdfcc_const0_3, ! sse_movdfcc_const0_4): Likewise. Use DFmode, not SFmode. ! Use Y instead of x in constraints. ! 2002-05-23 Jakub Jelinek ! PR c/6643 ! * emit-rtl.c (widen_memory_access): Only call compare_tree_int ! if DECL_SIZE_UNIT is INTEGER_CST. ! 2002-05-23 Jakub Jelinek ! * combine.c (force_to_mode): Use gen_int_mode. ! Don't clear CONST_INT bits outside of mode. ! 2002-05-23 Jakub Jelinek ! * configure.in: Fix as version test for binutils 2.12.1 releases ! (without dates). ! * configure: Rebuilt. ! Wed May 22 14:16:07 CEST 2002 Jan Hubicka ! * i386.c (expand_movstr, expand_clrstr): Fix inline-all-stringops ! sequence. ! (ix86_expand_clrstr): Fix typo. ! 2002-05-22 Duraid Madina ! * tradcpp.c (fixup_newlines): Use old-style function header. ! 2002-05-21 Richard Henderson ! * system.h (BLOCK_PROFILER, BLOCK_PROFILER_CODE, ! FUNCTION_BLOCK_PROFILER, FUNCTION_BLOCK_PROFILER_EXIT, ! MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Poison. ! * toplev.c (display_help): Kill -a -ax help. ! * config/1750a/1750a.h, config/alpha/alpha.h, ! config/clipper/clipper.h, config/dsp16xx/dsp16xx.h, ! config/h8300/h8300.h, config/i960/i960.h, config/m68k/tower-as.h, ! config/m88k/m88k.h, config/vax/vax.h, config/we32k/we32k.h: ! (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Kill. ! * libgcc2.c [L_bb] (BLOCK_PROFILER_CODE): Kill. ! * config/m68k/sun3.h (BLOCK_PROFILER_CODE): Kill. ! * config/i386/i386-protos.h (ix86_output_block_profiler): Kill. ! (ix86_output_function_block_profiler): Kill. ! * config/m68hc11/m68hc11.c (m68hc11_block_profiler): Kill. ! (m68hc11_function_block_profiler): Kill. ! * config/m68hc11/m68hc11-protos.h: Update. ! * config/m88k/m88k.c (output_block_profiler): Kill. ! (output_function_block_profiler): Kill. ! * config/m88k/m88k-protos.h: Update. ! 2002-05-21 NIIBE Yutaka ! * reload1.c (do_output_reload): Run delete_output_reload ! only if optimizing. ! 2002-05-20 Richard Henderson ! * cse.c (canon_hash): Reorder do_not_record test. Always ! allow pic_offset_table_rtx. ! 2002-05-19 Neil Booth ! * doc/contrib.texi: Update my entry. ! 2002-05-19 Kaveh R. Ghazi ! * mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define. ! 2002-05-19 Marek Michalkiewicz ! 2002-02-28 Marek Michalkiewicz ! * config/avr/avr.c (avr_hard_regno_mode_ok): Do not allow r29 ! which may overwrite the high byte of the frame pointer. ! 2002-03-19 Lars Brinkhoff ! * emit-rtl.c (gen_int_mode): New function. ! * rtl.h: Prototype for it. ! Sat May 18 23:09:19 CEST 2002 Jan Hubicka ! * i386.md (pushqi2, ashrqi_*): Fix constraint. ! 2002-05-18 Aldy Hernandez ! * config/rs6000/altivec.h: Cleanups. ! 2002-05-17 Rainer Orth ! * doc/install.texi (Specific, mips-sgi-irix6): Document need to ! bootstrap with -mips3. ! 2002-05-17 David S. Miller ! PR c/6689, PR optimization/6615 ! * local-alloc.c (struct equivalence): Rename 'src' to 'src_p' ! and make it a pointer to rtx. Update comments. ! (update_equiv_regs): When scanning for equivalences, record ! address of SET_SRC (set) in reg_equiv[].src_p. Dereference ! it while making the equiv replacements. ! 2002-05-17 Kurt Wall ! * doc/install.texi (Testing): Mention two common DejaGnu warnings ! that can be ignored. ! 2002-05-16 Gerald Pfeifer ! * doc/install.texi (Final install): Recommend to install into a ! "clean" target directory. ! 2002-05-17 Andreas Schwab ! * config/ia64/sysv4.h (DO_SELECT_SECTION): Factored out of ! SELECT_SECTION. ! (UNIQUE_SECTION): Define to get small data correctly. ! * varasm.c (resolve_unique_section): Add third parameter ! flag_function_or_data_sections and use it instead of ! flag_function_sections. ! (assemble_start_function): Pass flag_function_sections. ! (asm_emit_uninitialised): Pass flag_data_sections. ! (assemble_variable): Likewise. ! 2002-05-15 Eric Botcazou ! * fold-const.c (fold) [LT_EXPR]: Move the transformation of a ! comparison against the highest or lowest integer value before ! the 'X >= CST to X > (CST - 1)' and 'X < CST to X <= (CST - 1)' ! transformation and that of an unsigned comparison against 0 ! right after. ! 2002-05-16 Richard Henderson ! PR c/3467 ! * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays ! for c99. ! 2002-05-16 Mark Mitchell ! * cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH. ! 2002-05-09 David S. Miller ! * config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9. ! 2002-05-07 David S. Miller ! PR target/6103 ! * config/sparc/sparc.h (TARGET_BUGGY_QP_LIB): Define to zero. ! * config/sparc/sol2.h (TARGET_BUGGY_QP_LIB): Override to one. ! * config/sparc/sparc.c (emit_soft_tfmode_libcall): If the Qp ! library implementation clobbers the output before the inputs ! are fully consumed, use stack temporary for the output. ! Wed May 15 10:38:27 CEST 2002 Jan Hubicka ! * invoke.texi (-malign-double): Re-add lost warning. ! 2002-05-14 Gerald Pfeifer ! * doc/install.texi: Remove special markup originally required for ! HTML generation with texi2html. ! 2002-05-14 Gerald Pfeifer ! * doc/install.texi (Specific, *-*-solaris2*): Update passus on ! setting CONFIG_SHELL to /bin/ksh and remove alternate trick to ! (possibly) work around broken /bin/sh. ! 2002-05-08 Jason Merrill ! PR c++/6381 ! * dwarf2out.c (rtl_for_decl_location): Only expand INTEGER_CST and ! REAL_CST. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-10 Rainer Orth ! * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Use mabi=64 and ! . as N64/N32 libgcc_s.so subdirs. ! 2002-05-09 Mark Mitchell ! * config/rs6000/rs6000.h: Revert previous patch. ! 2002-05-09 Joel Sherrill ! * config/rs6000/rs6000.h CPP_CPU_SPEC): Correct ! 403 and 405 arguments for binutils 2.12. ! Thu May 9 12:21:48 2002 Jeffrey A Law (law@redhat.com) ! * pa.c (hppa_profile_hook): Use force_reg to get the address ! of the profile hook into an appropriate pseudo register. ! 2002-05-09 Jakub Jelinek ! * mklibgcc.in: Set shlib_slibdir_qual to empty string if ! SHLIB_SLIBDIR_SUFFIXES is empty. ! 2002-05-09 Rainer Orth ! * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Define. ! (SHLIB_LINK, SHLIB_INSTALL): Adjust. ! 2002-05-09 Jakub Jelinek ! * config/sparc/t-linux64 (SHLIB_MAPFILES): Set. ! * config/sparc/libgcc-sparc-glibc.ver: New file. ! * config/i386/t-linux64 (SHLIB_MAPFILES): Add libgcc-x86_64-glibc.ver. ! * config/i386/libgcc-x86_64-glibc.ver: New file. ! * config/cris/t-linux (SHLIB_MAPFILES): Remove. ! * mklibgcc.in: Preprocess SHLIB_MAPFILES with ml flags. ! 2002-05-09 Jakub Jelinek ! PR target/6429 ! * Makefile.in (libgcc.mk): Pass SHLIB_SLIBDIR_SUFFIXES to mklibgcc. ! * mklibgcc.in: If SHLIB_SLIBDIR_SUFFIXES is defined, put libgcc_s ! shared libraries into multilib dirs, with SONAME libgcc_s.so.1 for ! base multilibs. ! * config/t-slibgcc-elf-ver (SHLIB_LINK): Adjust for the above. ! * config/t-slibgcc-sld (SHLIB_LINK): Likewise. ! * config/i386/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define. ! * config/sparc/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define. ! * config/sparc/t-sol2-64 (SHLIB_SLIBDIR_SUFFIXES): Define. ! 2002-05-08 Mark Mitchell ! PR c/6569. ! * varasm.c (mark_weak): New function. ! (merge_weak): Use it. Do not call declare_weak. ! (declare_weak): Use merge_weak. ! 2002-05-07 Geoffrey Keating ! * configure.in: Don't pass -Wno-long-long to a ADA compiler ! that doesn't support it. ! * configure: Regenerate. ! 2002-05-07 Jason Merrill ! * dwarf2out.c (rtl_for_decl_location): Don't try to extract a ! constant value from DECL_INITIAL. ! 2002-05-07 Richard Henderson ! PR c++/6212 ! * expr.c (highest_pow2_factor_for_type): New. ! (expand_assignment): Use it. ! 2002-05-07 Jakub Jelinek ! * configure.in: If as or ld segfaults, don't clutter with it stdout. ! * configure: Rebuilt. ! 2002-05-05 Jakub Jelinek ! PR target/6561 ! * config/sparc/sparc.md (muldi3_v8plus): Handle %1 equal to %2. ! 2002-05-05 Franz Sirl ! * doc/install.texi (powerpc-*-linux-gnu*): Update build requirements. ! 2002-05-04 David Edelsohn ! PR c/6543 ! * config/rs6000/rs6000.md (sCC pattern and splitter): Remove ! clobber and use result as temporary value. ! 2002-05-03 Jakub Jelinek ! PR target/6542 ! * config/sparc/sparc.h (leaf_reg_remap): Remove const. ! (CONDITIONAL_REGISTER_USAGE): For TARGET_FLAT make ! fill leaf_reg_remap with identity. ! * config/sparc/sparc.c (leaf_reg_remap): Remove const. ! 2002-05-03 Jakub Jelinek ! PR target/6522 ! * dwarf2out.c (simple_decl_align_in_bits): Renamed to... ! (simple_field_decl_align_in_bits): this. Apply ! BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN if defined. ! 2002-05-03 Richard Henderson ! PR opt/6534 ! * ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants, ! noce_try_store_flag_inc, noce_try_store_flag_mask, noce_try_cmove, ! noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Insert new ! code before JUMP, not EARLIEST. ! 2002-05-03 Jakub Jelinek ! PR preprocessor/6489 ! * tradcpp.c (fixup_newlines): New. ! (main, finclude): Use it. ! 2002-05-03 Rainer Orth ! * doc/install.texi (Installing): Mention GCC 3.1 buildstats. ! (Specific): Removed buildstats references. ! (Specific, hppa*-hp-hpux11): Adjust for GCC versions > 3.0. ! (Specific, sparc-sun-solaris2*): Update 64-bit hints for GCC 3.1. ! Accomodate Solaris versions beyond 8. ! (Specific, sparc-sun-solaris2.7): Update as path for GCC 3.1. ! (Specific, *-*-solaris2.8): Removed, obsolete. ! 2002-05-02 Jason Merrill ! * defaults.h (BOOL_TYPE_SIZE): Move default here from cp/decl.c. ! * c-decl.c (c_init_decl_processing): Use it. ! * config/rs6000/darwin.h (BOOL_TYPE_SIZE): Define to INT_TYPE_SIZE. ! * config/i960/i960.h (BOOL_TYPE_SIZE): Don't define. ! * config/mcore/mcore.h (BOOL_TYPE_SIZE): Don't define. ! 2002-05-02 Loren J. Rittle ! * doc/install.texi (*-*-freebsd*): Update to latest status. ! 2002-05-02 Jakub Jelinek ! PR target/6540 ! * config.gcc (sparc*-*-solaris2*): Set float_format to i128. ! * config/float-sparc.h: Assume 128-bit long double if ! __LONG_DOUBLE_128__ is defined. ! PR target/6512, PR target/5628 ! * config/sparc/sparc.md (movdf_insn_v9only_novis): Don't allow >= %f32 ! when memory is not aligned. ! (movdf_insn_v9only_vis): Likewise. ! * config/sparc/sparc.h (SECONDARY_INPUT_RELOAD_CLASS): Request a FP_REGS ! temporary for EXTRA_FP_REGS DFmode load from unaligned memory. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Similarly. ! 2002-05-02 Joseph S. Myers ! * doc/install.texi: State GNAT version requirements. ! 2002-05-01 Jeff Law ! * pa.h (EXTRA_CONSTRAINT): Don't accept PIC addresses for the ! 'T' constraint. ! 2002-05-01 Joel Brobecker ! * dbxout.c (dbxout_type): Emit size information for range types, ! as well, but only when using GDB extensions. ! 2002-05-01 Richard Henderson ! * configure.in (HAVE_GAS_HIDDEN): Replace SPARC feature test with ! target-independent gnu binutils date test. ! 2002-05-01 Jakub Jelinek ! * cppinit.c (cpp_handle_option) [-dM]: Don't set no_output here... ! (cpp_post_options): ...but here. Disable -dD, -dN and -dI when ! -M -or -MM is in effect. ! 2002-05-01 Zack Weinberg ! * config.gcc: Correct test of --enable-obsolete. Obsolete all ! A29k configurations. ! * doc/install.texi: Update to match. ! 2002-05-01 Franz Sirl ! PR bootstrap/6514 ! * varasm.c (globalize_decl): Compare DECL_ASSEMBLER_NAME to check ! for duplicates. Always loop over whole list. ! Wed May 1 10:32:37 2002 Richard Kenner ! * reload.c (find_reloads, case 'p'): Set BADOP to 0. ! 2002-05-01 Joel Sherrill ! * config/sparc/t-elf (sparc-rtems, sparc-elf): Build assembly ! support routines. ! 2002-05-01 Joseph S. Myers ! * doc/install.texi: Update Texinfo version requirement ! documentation. ! 2002-04-30 Richard Henderson ! * config/sparc/sol27-sld.h: Rename from sol26-sld.h. ! (PREFERRED_DEBUGGING_TYPE, ASM_DEBUG_SPEC): Undef. ! * config.gcc (sparc-solaris): Adjust test for native ld bug. ! Add it after the biarch headers. ! 2002-04-30 Richard Henderson ! PR opt/6516 ! * toplev.c (rest_of_compilation): Don't run cross-jump before ! bb-reorder. ! 2002-04-30 Joel Sherrill ! * config/arm/rtems-elf.h: Add #undef TARGET_VERSION to prevent warning. ! 2002-04-30 Richard Henderson ! * config/sparc/sparc.c (emit_soft_tfmode_libcall, ! emit_soft_tfmode_binop, emit_soft_tfmode_unop, emit_soft_tfmode_cvt, ! emit_hard_tfmode_operation, emit_tfmode_binop, emit_tfmode_unop, ! emit_tfmode_cvt): New. ! * config/sparc/sparc.md (extendsftf2, extenddftf2, trunctfsf2, ! trunctfdf2, floatsitf2, floatunssitf2, floatditf2, floatunsditf2, ! fix_trunctfsi2, fixuns_trunctfsi2, fix_trunctfdi2, fixuns_trunctfdi2, ! addtf3, subtf3, multf3, divtf3, sqrttf2): Use them. ! * config/sparc/sparc-protos.h: Update. ! 2002-04-30 John David Anglin ! * config.gcc (hppa1.1-*-pro*, hppa1.1-*-osf*, hppa1.1-*-rtems*, ! hppa1.0-*-osf*, hppa1.1-*-bsd*, hppa1.1-*-hpux10*, hppa2*-*-hpux10*, ! hppa1.0-*-hpux10*, hppa*64*-*-hpux11*, hppa1.1-*-hpux11*, ! hppa2*-*-hpux11*, hppa1.0-*-hpux11*, hppa*-*-lites*): Define xmake_file. ! * ada/Make-lang.in (ADA_FLAGS_TO_PASS): Don't pass ADA_CFLAGS. ! * pa/t-linux, pa/t-pa, pa/t-pa64, t-pro (T_ADAFLAGS): Delete. ! * pa/x-ada: New file. Define ADA_CFLAGS. ! 2002-04-30 Janis Johnson ! * doc/install.texi (Final install): Add to the list of info to include ! in a report of a successful bootstrap, and add link to 3.1 list. ! 2002-04-30 Jakub Jelinek ! PR c++/6396 ! * toplev.c (rest_of_compilation): Only run regrename and copy ! propagation if optimizing. ! 2002-04-30 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Use MIPS instead of Mips and ! mips. Add two missing commas. ! 2002-04-30 Paolo Carlini ! * doc/contrib.texi (Contributors): Update Paolo Carlini's ! and Benjamin Kosnik's entries. ! 2002-04-29 Franz Sirl ! * combine.c (find_split_point): Use trunc_int_for_mode. ! Mon Apr 29 17:19:10 2002 Richard Kenner ! * reload1.c (eliminate_regs, case SUBREG): Fix typo in ! adjust_address_nv call. ! 2002-04-29 Janis Johnson ! * doc/install.texi (Testing): Provide additional information, and ! a stronger encouragement, for running the testsuites. ! 2002-04-29 Rainer Orth ! * fixinc/inclhack.def (solaris_widec): Include in ! Solaris 2 if missing. ! * fixinc/fixincl.x: Regenerate. ! * fixinc/tests/base/widec.h: New file. ! 2002-04-29 Jakub Jelinek ! PR target/6476 ! * configure.in: Check whether linker eh_frame optimizations work ! properly. ! * configure: Rebuilt. ! Mon Apr 29 17:08:09 CEST 2002 Jan Hubicka ! * i386.c (dbx64_register_map): Fix typo. ! Mon Apr 29 14:48:33 CEST 2002 Jan Hubicka ! * i386.md (sse_mov?fcc*): Revert patch of Apr 18th. ! 2002-04-29 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Add Paolo Carlini and ! Janis Johnson. ! Update Richard Henderson, Jakub Jelinek, and Mark Mitchell. ! Refer to Objective-C instead of ObjC, SPARC instead of sparc, ! and CPU instead of cpu. ! 2002-04-29 Alexandre Oliva ! * config.gcc: Revert i386 changes inadvertently brought in ! from mainline along with 2002-04-04's change. ! 2002-04-28 David S. Miller ! PR target/6496 ! * config/sparc/sparc.md (call followed by jump peephole): Do not ! match for TARGET_V9, kill TARGET_ARCH64 variants. ! PR target/6500 ! * config/sparc/sparc.md (prefetch): Emit properly for 32-bit vs. ! 64-bit TARGET_V9. Do not use prefetch page, use prefetch for ! several {reads,writes} instead. ! * config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES): ! Define. ! 2002-04-27 David S. Miller ! PR target/6494 ! * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Be mindful ! of the stack bias. ! * config/sparc/linux.h, config/sparc/linux64.h: Don't bother ! including signal.h and sys/ucontext.h, not needed. ! 2002-04-28 Richard Henderson ! PR c/5154 ! * ggc-common.c (ggc_mark_rtx_children_1): Rename from... ! (ggc_mark_rtx_children): New. ! 2002-04-28 Franz Sirl ! PR c/6497 ! * config/rs6000/rs6000.md (sCC patterns): Remove clobber and use ! result as temporary value. ! 2002-04-28 Jakub Jelinek ! PR optimization/6475 ! * reload1.c (alter_reg): Only call set_mem_expr if I is home pseudo ! register of REGNO_DECL (i). ! * Makefile.in (reload1.o): Add $(TREE_H). ! 2002-04-28 Bruce Korb ! * fixinc/check.tpl (set-writable): verify that it exists before ! invoking. ! 2002-04-28 Franz Sirl ! PR c/6343 ! * c-decl.c (duplicate_decls): Call merge_weak. ! * c-pragma.c (apply_pragma_weak): Warn about misuse. ! * output.h (merge_weak): Prototype merge_weak. ! * varasm.c (merge_weak): New function. ! (declare_weak): Make sure we don't give an error on VAR_DECLs. ! Mark RTL with SYMBOL_REF_WEAK. ! 2002-04-25 David S. Miller ! PR target/6422 ! * reorg.c (optimize_skip): Do not allow exception causing ! instructions to be considered for delay slots. ! (fill_simply_delay_slots, fill_slots_from_thread): Likewise. ! (relax_delay_slots): Do not try to consider exception causing ! instructions as redundant. ! 2002-04-26 Alexandre Oliva ! * tree.c (tree_int_cst_lt): Compare constants whose types differ ! in unsigned-ness correctly. ! 2002-04-26 Chris Demetriou ! * config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): Get closer to ! correct for MEABI (used by mipsisa32-elf). ! 2002-04-26 Mark Mitchell ! PR bootstrap/6445 ! * config/i386/i386.md (untyped_call): Return the value in a float ! register if TARGET_FLOAT_RETURNS_IN_80387, not just if ! TARGET_80387. ! 2002-04-26 Ulrich Weigand ! * config/s390/linux.h: Revert 2002-04-22 change. ! 2002-04-26 John David Anglin ! * pa.h (FUNCTION_OK_FOR_SIBCALL): Don't do sibcalls when using the ! portable runtime model. ! 2002-04-26 David Edelsohn ! Richard Henderson ! * config/rs6000/rs6000.md (sCC pattern): Remove clobber and use ! result as temporary value. ! 2002-04-26 Richard Henderson ! PR c/3581 ! * c-common.c (combine_strings): Use xmalloc, not alloca. ! * c-common.c (combine_strings): Tweak __FUNCTION__ warning text. ! 2002-04-26 Bo Thorsen ! * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Define for ! x86-64. ! 2002-04-25 David S. Miller ! * config/sparc/sparc.h (FUNCTION_OK_FOR_SIBCALL): Add back check ! for DECL being NULL. ! 2002-04-25 Eric Botcazou ! * c-decl.c (grokdeclarator): Remove outdated ??? note ! on invalid declaration of flexible array members. ! 2002-04-25 Richard Henderson ! * doc/invoke.texi: Document -gdwarf{,-2} vs debug level. ! 2002-04-25 Ulrich Weigand ! * config/s390/s390.c (s390_emit_epilogue): Always restore registers ! needed by the compiler, even if they are used as global regs. ! 2002-04-25 Steven Bosscher ! * doc/c-tree.texi: Fix typo in introduction. ! 2002-04-24 Richard Henderson ! * configure.in (HAVE_GAS_HIDDEN): Detect sparc binutils 2.12 ! linker bug. ! 2002-04-24 Jason Merrill ! * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNU_vector. ! * dwarf2out.c (dwarf_attr_name): Support it. ! (gen_array_type_die): Emit it. ! (lookup_type_die): No special handling for VECTOR_TYPE. ! (gen_type_die): Hand VECTOR_TYPE off to gen_array_type_die. ! 2002-04-24 Richard Henderson ! * config/mips/mips.md (movdi_usd): Renumber. ! 2002-04-24 Robert Lipe ! * config/i386/sco5.h(i386.h, att.h): Eliminate double inclusion. ! 2002-04-24 David S. Miller ! * config/sparc/sparc.h (FUNCTION_OK_FOR_SIBCALL): Return false if ! 32-bit Sparc and current_function_returns_struct is true. ! 2002-04-24 Aldy Hernandez ! * config/rs6000/altivec.h: Cleanup file. Add non individual ! variants. ! (vec_vaddubm): New. ! (vec_vadduhm): New. ! (vec_vadduwm): New. ! (vec_vaddfp): New. ! (vec_vaddcuw): New. ! (vec_vaddubs): New. ! (vec_vaddsbs): New. ! (vec_vadduhs): New. ! (vec_vadduws): New. ! (vec_vaddsws): New. ! (vec_vand): New. ! (vec_vandc): New. ! (vec_vavgub): New. ! (vec_vavgsb): New. ! (vec_vavguh): New. ! (vec_vavgsh): New. ! (vec_vavguw): New. ! (vec_vavgsw): New. ! (vec_vrfip): New. ! (vec_vcmpbfp): New. ! (vec_vcmpequb): New. ! (vec_vcmpequh): New. ! (vec_vcmpequw): New. ! (vec_vcmpeqfp): New. ! (vec_vcmpgefp): New. ! (vec_vcmpgtub): New. ! (vec_vcmpgtsb): New. ! (vec_vcmpgtuh): New. ! (vec_vcmpgtsh): New. ! (vec_vcmpgtuw): New. ! (vec_vcmpgtsw): New. ! (vec_vcmpgtfp): New. ! (vec_vcmpgefp): New. ! (vec_vcfux): New. ! (vec_vcfsx): New. ! (vec_vctsxs): New. ! (vec_vctuxs): New. ! (vec_vexptefp): New. ! (vec_vrfim): New. ! (vec_lvx): New. ! (vec_lvebx): New. ! (vec_lvehx): New. ! (vec_lde): Add vector float variant. ! (vec_lvewx): New. ! (vec_lvxl): New. ! (vec_vlogefp): New. ! (vec_vmaddfp): New. ! (vec_vmhaddshs): New. ! (vec_vmaxub): New. ! (vec_vmaxsb): New. ! (vec_vmaxuh): New. ! (vec_vmaxsh): New. ! (vec_vmaxuw): New. ! (vec_vmaxsw): New. ! (vec_vmaxsw): New. ! (vec_vmaxfp): New. ! (vec_vmrghb): New. ! (vec_vmrghh): New. ! (vec_vmrghw): New. ! (vec_vmrglb): New. ! (vec_vmrglh): New. ! (vec_vmrglw): New. ! (vec_vminub): New. ! (vec_vminsb): New. ! (vec_vminuh): New. ! (vec_vminsh): New. ! (vec_vminuw): New. ! (vec_vminsw): New. ! (vec_vminfp): New. ! (vec_vmladduhm): New. ! (vec_vmhraddshs): New. ! (vec_msumubm): New. ! (vec_vmsummbm): New. ! (vec_vmsumuhm): New. ! (vec_vmsumshm): New. ! (vec_vmsumuhs): New. ! (vec_vmsumshs): New. ! (vec_vmuleub): New. ! (vec_vmulesb): New. ! (vec_vmuleuh): New. ! (vec_vmulesh): New. ! (vec_vmuloub): New. ! (vec_mulosb): New. ! (vec_vmulouh): New. ! (vec_vmulosh): New. ! (vec_vnmsubfp): New. ! (vec_vnor): New. ! (vec_vor): New. ! (vec_vpkuhum): New. ! (vec_vpkuwum): New. ! (vec_vpkpx): New. ! (vec_vpkuhus): New. ! (vec_vpkshss): New. ! (vec_vpkuwus): New. ! (vec_vpkswss): New. ! (vec_vpkshus): New. ! (vec_vpkswus): New. ! (vec_vperm): New. ! (vec_vrefp): New. ! (vec_vrlb): New. ! (vec_vrlh): New. ! (vec_vrlw): New. ! (vec_vrfin): New. ! (vec_vrsqrtefp): New. ! (vec_vsel): New. ! (vec_vslb): New. ! (vec_vslh): New. ! (vec_vslw): New. ! (vec_vsldoi): New. ! (vec_vsl): New. ! (vec_vslo): New. ! (vec_vspltb): New. ! (vec_vsplth): New. ! (vec_vspltw): New. ! (vec_vspltisb): New. ! (vec_vspltish): New. ! (vec_vspltisw): New. ! (vec_vsrb): New. ! (vec_vsrh): New. ! (vec_vsrw): New. ! (vec_vsrab): New. ! (vec_vsrah): New. ! (vec_vsraw): New. ! (vec_vsr): New. ! (vec_vsro): New. ! (vec_stvx): New. ! (vec_stvebx): New. ! (vec_stvehx): New. ! (vec_stvewx): New. ! (vec_stvxl): New. ! (vec_vsububm): New. ! (vec_vsubuhm): New. ! (vec_vsubuwm): New. ! (vec_vsubfp): New. ! (vec_vsubcuw): New. ! (vec_vsububs): New. ! (vec_vsubsbs): New. ! (vec_vsubuhs): New. ! (vec_vsubshs): New. ! (vec_vsubuws): New. ! (vec_vsubsws): New. ! (vec_vsum4ubs): New. ! (vec_vsum4sbs): New. ! (vec_vsum4shs): New. ! (vec_vsum2sws): New. ! (vec_vsumsws): New. ! (vec_vrfiz): New. ! (vec_vupkhsb): New. ! (vec_vupkhpx): New. ! (vec_vupkhsh): New. ! (vec_vupklsb): New. ! (vec_vupklpx): New. ! (vec_vupklsh): New. ! (vec_vxor): New. ! 2002-04-23 Zack Weinberg ! * doc/install.texi: Clarify which versions of alpha*-dec-osf* ! are obsoleted. ! 2002-04-23 Eric Botcazou ! PR c/5430 ! * fold-const.c (split_tree): Add MINUS_LITP parameter; separate ! added literals from substracted literals. ! (associate_trees): Don't convert MINUS_EXPR into PLUS_EXPR. ! (fold) [associate]: Preserve MINUS_EXPR if needed. ! 2002-04-23 Tom Tromey ! * gcc.c: Added --resource. For PR java/6314. ! 2002-04-23 David O'Brien ! * config/freebsd.h(OBJECT_FORMAT_ELF): Define. ! 2002-04-23 David O'Brien ! * cp/g++spec.c: Use profiled libstdc++ and libm with -p/-pg. ! * config/freebsd.h (MATH_LIBRARY_PROFILE): Use the _p verions of ! these libraries. ! 2002-04-23 Alan Modra ! PR target/6413 ! * function.h: (struct function): Add profile_label_no field. ! (current_function_profile_label_no): Define. ! * function.c: (profile_label_no): New static var. ! (expand_function_start): Increment it, and copy to ! current_function_profile_label_no. ! * output.h (profile_label_no): Delete. ! * final.c (profile_label_no): Delete. ! (profile_function): Use current_function_profile_label_no. ! (final_end_function): Don't increment profile_label_no here. ! * config/i386/i386.c (ix86_osf_output_function_prologue): Replace ! profile_label_no with current_function_profile_label_no. ! * config/pa/pa.c (current_function_number): Delete. ! (pa_output_function_prologue): Don't output profile label here. ! (hppa_profile_hook): Use label_no param rather than ! current_function_number. ! (FUNC_BEGIN_PROLOG_LABEL): Move to .. ! * config/pa/pa.h: .. here. ! (FUNCTION_PROFILER): Output profile label here. ! 2002-04-23 Aldy Hernandez ! * config/rs6000/altivec.h (vec_step): Remove extraneous ! parentheses. ! (vec_ctu): Cast return. ! 2002-04-22 Aldy Hernandez ! * config/rs6000/rs6000.md ("*movv4si_internal"): Change 'm' ! constraint to 'o' for m=r and r=m alternatives. ! ("*movv8hi_internal1"): Same. ! ("*movv16qi_internal1"): Same. ! ("*movv4sf_internal1"): Same. ! 2002-04-22 Zack Weinberg ! * c-lex.c (lex_charconst): Call convert to get constant in ! proper type; don't just smash the type field. ! Fixes PR c/6300. ! * config.gcc: Add list of obsolete configurations. Disallow ! building these without --enable-obsolete. ! * doc/install.texi: Document --enable-obsolete and obsoletion ! policy. Mention obsoletion of individual targets in ! appropriate places. ! 2002-04-22 Richard Henderson ! * config/sparc/sol2-bi.h (ASM_DEBUG_SPEC): New. ! 2002-04-22 Mark Mitchell ! PR f/6138. ! * function.c (fixup_memory_subreg): Add promoted_mode parameter. ! (walk_fixup_memory_subreg): Likewise. ! (fixup_var_refs_insn): Adjust accordingly. ! (fixup_var_refs_1): Likewise. ! 2002-04-22 Joel Sherrill ! * gthr-rtems.h: Correct prototypes to remove warnings. ! 2002-04-22 Richard Henderson ! PR c/6344 ! * alias.c (canon_true_dependence): Special case (mem:blk (scratch)). ! * gcse.c (free_insn_expr_list_list): New. ! (clear_modify_mem_tables): Use it. Fix bit set usage. ! (canon_list_insert): Use EXPR_LISTs for expressions. ! (record_last_mem_set_info): Factor BLOCK_NUM (insn). ! 2002-04-22 Ulrich Weigand ! * config/s390/linux.h: (LIBPATH_SPEC, LIBPATH_ARCH31_SPEC, ! LIBPATH_ARCH64_SPEC): Define. ! (EXTRA_SPECS): Add libpath, libpath_arch31, libpath_arch64. ! (STARTFILE_SPEC, ENDFILE_SPEC): Define; use libpath. ! (LINK_ARCH31_SPEC): Add libpath_arch31 to search path. ! (LINK_ARCH64_SPEC): Add libpath_arch64 to search path. ! 2002-04-22 Aldy Hernandez ! * config/rs6000/altivec.h (vec_xor): Add variant for both args ! being vector signed int. ! (vec_andc): Same. ! (vec_xor): Add variant for both args being vector signed char. ! Remove redundant variant. ! (vec_andc): Same. ! 2002-04-21 David S. Miller ! * config/sparc/sparc.md (set then compare DI mode peephole2): Fix ! compare mode in output RTL. ! 2002-04-22 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_override_options): Correct ! style and formatting of previous patch. ! 2002-04-22 Alan Modra ! * config/rs6000/rs6000.c (rs6000_override_options): Always clear ! flag_pic for ABI_AIX. ! 2002-04-21 Neil Booth ! * cppmacro.c (funlike_invocation_p): Don't step back ! over CPP_EOF. ! 2002-04-21 David Edelsohn ! * config/rs6000/rs6000.c (output_profile_hook): Do not increment ! labelno. ! 2002-04-20 Joseph S. Myers ! * doc/invoke.texi: Remove Chill references. ! * doc/gcc.texi: Update last modified date. ! 2002-04-19 David S. Miller ! * config/sparc/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define. ! * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise. ! Sat Apr 20 02:17:38 CEST 2002 Jan Hubicka ! * i386.md (movsi_1, movhi_1): Force reload to use more flexible ! alternative. ! 2002-04-19 Jakub Jelinek ! PR c/6358 ! * function.c: Reapply patch for c/6358. ! (expand_function_end): Copy decl_rtl's mode, not ! current_function_return_rtx mode. ! 2002-04-19 Joel Sherrill ! * config/rtems.h (STARTFILE_SPEC, ENDFILE_SPEC): Fix for non-ELF ! targets. ! 2002-04-19 Tom Tromey ! * doc/install.texi (Specific): Update status of Solaris 2.8. ! For PR libgcj/6158. ! 2002-04-19 Dan Nicolaescu ! Gerald Pfeifer ! * doc/install.texi (Specific, sparc-sun-solaris2*): Mention that ! binutils 2.11.2 and higher generate smaller binaries than Sun's ! native tools. ! 2002-04-19 Mark Mitchell ! PR c++/6352 ! * toplev.c (rest_of_compilation): Do not defer functions for which ! TREE_SYMBOL_REFERENCED has already been set. ! 2002-04-18 Richard Henderson ! * function.c: Revert patch for c/6358. ! 2002-04-18 Richard Henderson ! * ifcvt.c (find_cond_trap): Handle cases with no proper THEN or JOIN ! blocks. Handle multiple references to the TRAP block. Handle ! non-adjacent THEN and OTHER blocks. ! 2002-04-18 Richard Henderson ! * config/ia64/ia64.c (ia64_function_arg_pass_by_reference): Don't ! crash with no type for by-mode libcalls. ! * config/ia64/ia64.md (conditional_trap): Fix predicate polarity. ! 2002-04-18 David S. Miller ! * config/sparc/sparc.h (BRANCH_COST): Define. ! * fold-const.c (BRANCH_COST): Don't provide default here, expr.h ! does it. ! 2002-04-18 Richard Henderson ! * config/ia64/ia64.c (ia64_function_arg_pass_by_reference): New. ! (ia64_va_arg): Expect variable sized types by reference. ! * config/ia64/ia64-protos.h: Update. ! * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use ! ia64_function_arg_pass_by_reference. ! 2002-04-18 Hans-Peter Nilsson ! * flow.c (update_life_info): Ignore return value of cleanup_cfg. ! Mask out PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE in ! propagate_block calls after relaxation loop using new variable ! stabilized_prop_flags. ! 2002-04-18 Richard Henderson ! * ifcvt.c: Include except.h. ! (block_has_only_trap): Break out from find_cond_trap. ! (find_cond_trap): Use it. Always delete the trap block. ! (merge_if_block): Allow then block null. Be less simplistic about ! what insns can end a block. ! * Makefile.in (ifcvt.o): Depend on except.h. ! * config/ia64/ia64.md (trap, conditional_trap): New. ! 2002-04-18 Jakub Jelinek ! PR c/6358 ! * function.c (assign_parms): Assign hard current_function_return_rtx ! register here... ! (expand_function_end): ...not here. ! 2002-04-18 Gerald Pfeifer ! * doc/install.texi (Downloading the source): Do not mention Chill ! any longer, but mention Ada. ! (Configuration): Do not mention Chill any longer. ! 2002-04-18 Hans-Peter Nilsson ! * config/cris/cris.h (TARGET_VERSION): Remove local version number. ! Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka ! * i386.h (SSE_FLOAT_MODE_P): Kill bogus TARGET_SSE_MATH check. ! * i386.md (sse_mov?fcc*): Swap operands for cases they will be swapped ! later. ! 2002-04-18 Jakub Jelinek ! PR middle-end/6205 ! * config/i386/i386.md (movsf_1): Use pxor only if TARGET_SSE2, ! otherwise xorps. ! 2002-04-18 Loren J. Rittle ! Revert this change: ! * doc/install.texi (Installing GCC: Configuration): Clarify ! the only supported ways to configure gcc. ! 2002-04-17 Dale Johannesen ! * config/rs6000/rs6000.c (rs6000_emit_cmove): Fail if modes of ! comparison operands do not match each other or if modes of ! conditions do not match result. ! (rs6000_output_function_prologue): Compute instruction addresses. ! (rs6000_output_function_epilogue): Likewise. ! 2002-04-17 Ulrich Weigand ! * config/s390/s390.c (legitimize_pic_address): Do not generate ! illegal address constant without CONST. ! 2002-04-17 Kaveh R. Ghazi ! * sparc/linux64.h (CC1_SPEC): Error for -m32 and -m64. ! * sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise. ! 2002-04-17 Ulrich Weigand ! PR optimization/6305 ! * config/s390/s390.c (s390_expand_plus_operand): Use find_replacement ! to make sure previous reloads are taken into account. Generate ! better code if one operand is an in-range immediate constant. ! 2002-04-16 Andrew Haley ! * doc/install.texi (Building): libgcj requires GNU make. ! 2002-04-17 Jakub Jelinek ! PR bootstrap/6315 ! * config/sparc/sparc.md (movtf reg<-reg split): Allow spliting ! even if hard quad and register is not floating. ! (movtf reg<-mem split): Disallow splitting if hard quad and ! register is floating. ! (movtf mem<-reg split): Likewise. ! * config/sparc/sparc.c (fp_register_operand): New predicate. ! * config/sparc/sparc.h (PREDICATE_CODES): Add fp_register_operand. ! 2002-04-17 Zack Weinberg ! * Makefile.in (PROTO_OBJS): Add cppdefault.o. ! (protoize.o): Take $(PREPROCESSOR_DEFINES) off command line. ! (unprotoize.o): Ditto. Build from protoize.c. Define ! UNPROTOIZE on command line. ! * protoize.c: Include cppdefault.h. Delete include_defaults. ! (in_system_include_dir): Use cpp_include_defaults (defined in ! cppdefault.o). ! * unprotoize.c: Delete file. ! 2002-04-17 Aldy Hernandez ! * config/rs6000/altivec.h (vec_ld): Add array variants. ! (vec_lde): Same. ! (vec_ldl): Same. ! 2002-04-17 Alan Matsuoka ! Aldy Hernandez ! * config/rs6000/altivec.h: Define __ALTIVEC__. ! (bool): New. ! (__pixel): New. ! (pixel): New. ! (vec_cfux): New. ! (vec_vmaddfp): New. ! (vec_vsldoi): New. ! Add parentheses to all macro arguments. ! 2002-04-16 Richard Henderson ! PR c++/6320 ! * except.c (remove_eh_handler): Insert inner regions at beginning ! of sibling chain. Refactor expressions. ! 2002-04-16 Mark Mitchell ! * c-common.h (STMT_EXPR_NO_SCOPE): New macro. ! * c-common.c (c_expand_expr): Respect STMT_EXPR_NO_SCOPE. ! * tree.h (expand_start_stmt_expr): Update prototype. ! * stmt.c (expand_start_stmt_expr): Add has_scope parameter. ! * tree-inline.c (expand_call_inline): Set STMT_EXPR_NO_SCOPE ! on the STMT_EXPR created for the inline function. ! 2002-04-16 Richard Henderson ! * config/sparc/sol2-bi.h (AS_SPARC64_FLAG): New. ! * config/sparc/sol2-gas-bi.h: New file. ! * config.gcc (sparc*-solaris): Add it as needed. ! * configure.in (AS_SPARC64_FLAG): Remove check. ! * config.in, configure: Regenerate. ! * config/sparc/sol2-bi.h (CC1_SPEC): Error for -m32 and -m64. ! 2002-04-16 Richard Henderson ! * config/mips/mips.c (override_options): Don't override N32 for ! a 64-bit ISA. ! PR c/6202 ! * config/mips/mips.md (can_delay): Split out of existing define_delays. ! (HILO_delay): Set can_delay false. ! 2002-04-16 Paolo Carlini ! * c-parse.in (poplevel, compstmt_start, compstmt_primary_start): ! Add ending ';', in accordance with POSIX. ! 2002-04-16 Richard Henderson ! * config.gcc (sparcv9-solaris): Configure for 64-bit default. ! Adjust tm_file order to get TARGET_DEFAULT set properly. ! (sparc-solaris): Configure 2.[78] for 64-bit multilibs. ! * doc/install.texi (sparc-solaris): Update. ! 2002-04-16 Hartmut Penner ! PR target/6305 ! * config/s390/s390.md (mulsidi3): Set both subregs of the ! multiword register. ! 2002-04-16 Aldy Hernandez ! * config/rs6000/altivec.h (vec_addc): Type check. ! 2002-04-16 Jakub Jelinek ! PR middle-end/6279 ! * expr.c (store_expr): Don't copy if DECL_RTL (exp) == target. ! * expr.c (safe_from_p): Cleanup: use DECL_RTL_IF_SET. ! 2002-04-15 Richard Henderson ! * config/mips/abi64.h (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Set ! call_really_used_regs too. ! 2002-04-15 David S. Miller ! * rtlanal.c (note_stores): Don't present PARALLEL SET_DESTs ! as being CLOBBERed. ! 2002-04-16 Jakub Jelinek ! PR c/6290 ! * config/rs6000/rs6000.c (easy_vector_constant): Return 1 if the ! CONST_VECTOR is { 0, ... 0 }. ! 2002-04-15 Loren J. Rittle ! * doc/install.texi (Installing GCC: Configuration): Clarify ! the only supported ways to configure gcc. ! 2002-04-15 Richard Henderson ! * config/alpha/linux.h, config/arm/linux-elf.h, config/i370/linux.h, ! config/i386/linux-aout.h, config/i386/linux-oldld.h, ! config/i386/linux.h, config/i386/linux64.h, config/ia64/linux.h, ! config/m68k/linux-aout.h, config/m68k/linux.h, config/mips/linux.h, ! config/pa/pa-linux.h, config/pj/linux.h, config/s390/linux.h, ! config/sh/linux.h, config/sparc/linux-aout.h, config/sparc/linux.h, ! config/sparc/linux64.h, config/xtensa/linux.h (CPP_PREDEFINES): ! Define __gnu_linux__, not gnu_linux. ! * config/rs6000/sysv4.h (CPP_OS_GNU_SPEC): Likewise for gnu_hurd. ! 2002-04-15 Mark Mitchell ! Remove Chill front end. ! * gcc.c (default_compilers): Remove Chill entries. ! * ch: Remove directory. ! * doc/frontends.texi: Remove information about Chill. ! * doc/sourcebuild.texi: Likewise. ! * doc/standards.texi: Likewise. ! 2002-04-15 Douglas B Rupp ! * config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include. ! (LONGLONG_STANDALONE): Define. ! 2002-04-15 David S. Miller ! * config/sparc/sparc.c (sparc_emit_float_lib_cmp): ! Call emit_library_call with LCT_NORMAL. ! (sparc_initialize_trampoline): Use LCT_foo instead of ! magic constant in emit_library_call invocations. ! (sparc64_initialize_trampoline): Likewise. ! (sparc_profile_hook): Likewise. ! * config/sparc/sparc.md: Likewise. ! * config/sparc/sparc.c (sparc_extra_constraint_check): ! Fix type of argument 'c'. ! * config/sparc/sparc-protos.h (sparc_extra_constraint_check): ! Likewise. ! 2002-04-14 Andreas Schwab ! * config/ia64/linux.h (CPP_PREDEFINES): Fix missing backslash. ! 2002-04-14 Jeroen Dobbelaere ! * config/arm/linux-elf.h (CPLUSPLUS_CPP_SPEC): Define. ! 2002-04-13 Mark Mitchell ! * config/alpha/linux.h (CPP_PREDEFINES): Fix typo. ! * config/i386/gnu.h (CPP_PREDEFINES): Define __gnu_hurd__, ! not gnu_hurd. ! 2002-04-13 Hans-Peter Nilsson ! * config/cris/linux.h (CRIS_CPP_SUBTARGET_SPEC): Fix typo. ! 2002-04-13 Joel Sherrill ! * config/sparc/t-elf: Enable v8 multilibs. Impacts ! sparc-elf and sparc-rtems targets. ! 2002-04-13 Mark Mitchell ! * alpha/linux.h: Define __gnu_linux__ wherever __linux__ is ! defined, and __gnu_hurd__ wherever __GNU__ is defined. ! * arm/linux-elf.h: Likewise. ! * cris/aout.h: Likewise. ! * cris/linux.h: Likewise. ! * i370/linux.h: Likewise. ! * i386/gnu.h: Likewise. ! * i386/linux-aout.h: Likewise. ! * i386/linux-oldld.h: Likewise. ! * i386/linux.h: Likewise. ! * i386/linux64.h: Likewise. ! * ia64/linux.h: Likewise. ! * m68k/linux-aout.h: Likewise. ! * m68k/linux.h: Likewise. ! * mips/linux.h: Likewise. ! * pa/pa-linux.h: Likewise. ! * pj/linux.h: Likewise. ! * rs6000/sysv4.h: Likewise. ! * s390/linux.h: Likewise. ! * sh/linux.h: Likewise. ! * sparc/linux-aout.h: Likewise. ! * sparc/linux.h: Likewise. ! * sparc/linux64.h: Likewise. ! * xtensa/linux.h: Likewise. ! 2002-04-13 Andreas Schwab ! * config/ia64/ia64.h (CPP_SPEC): Include %(cpp_cpu). ! 2002-04-12 Mark Mitchell ! Revert these changes: ! 2002-04-06 Mark Mitchell ! PR c++/5571 ! * stor-layout.c (layout_decl): Reset the RTL for the decl. ! 2002-03-15 Mark Mitchell ! * expr.c (expand_expr): Tidy. ! 2002-04-12 Richard Henderson ! * config.gcc (sparcv9-*-solaris2): Default to 32-bit code. ! (sparc*-*-solaris): Clean up header files. ! * configure.in (AS_SPARC64_FLAG): Error out if can't find it ! and plan on generating 64-bit code. ! * toplev.c (decode_g_option): Remove LINKER_DOES_NOT_WORK_WITH_DWARF2. ! * config/sparc/sol2-64.h: Delete and reuse for default 64-bit code. ! * config/sparc/sol2-sld-64.h: Rename ... ! * config/sparc/sol2-bi.h: ... here. Remove the bits that checked ! for AS_SPARC64_FLAG not defined. ! * config/sparc/sol2-gld-bi.h: New. ! * config/sparc/sol2-sld.h: Remove. ! * config/sparc/sol26-sld.h: New. ! * config/sparc/sol2.h: Tidy comments. ! * doc/install.texi: Document sparc-solaris configury changes. ! 2002-04-12 Richard Henderson ! * recog.c (offsettable_address_p): Match the logic in adjust_address. ! * config/sparc/sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Handle TFmode ! in 64-bit mode only. Use only for 32-bit or MEDLOW. ! 2002-04-12 Rainer Orth ! * config/alpha/osf.h (LINK_SPEC): Pass -S to silence ld warnings. ! Fri Apr 12 15:42:59 2002 Jeffrey A Law (law@redhat.com) ! * pa.c (pa_can_combine_p): Call extract_insn before calling ! constrain_operands. ! 2002-04-12 Douglas B Rupp ! * hwint.h (HAVE___INT64): Correct spelling. ! * config/i386/i386-interix.h (EH_FRAME_IN_DATA_SECTION): Define. ! (TARGET_ASM_NAMED_SECTION, RETURN_IN_MEMORY) Define. ! (DEFAULT_PCC_STRUCT_RETURN): Define as 0. ! (CPP_PREDEFINES): Handle __declspec. ! * config/i386/t-interix (USER_H): Remove. ! 2002-04-12 DJ Delorie ! * integrate.c (compare_blocks): Make comparisons safe for when ! sizeof(int) < sizeof(char *). ! (find_block): Likewise. ! 2002-04-12 Andreas Schwab ! * config/ia64/ia64.h (ASM_SPEC): Moved from here ... ! * config/ia64/sysv4.h (ASM_SPEC): ... to here, so that it ! overrides the definition in config/svr4.h. ! 2002-04-12 Eric Norum ! * config/rtems.h, config/a29k/rtems.h, config/arm/rtems-elf.h, ! config/c4x/rtems.h, config/h8300/rtems.h, config/i386/rtems.h, ! config/i386/rtemself.h, config/i960/rtems.h, config/m68k/rtems.h, ! config/m68k/rtemself.h, config/mips/rtems.h, config/mips/rtems64.h, ! config/pa/rtems.h, config/rs6000/rtems.h, config/sh/rtems.h, ! config/sh/rtemself.h, config/sparc/rtems.h, config/sparc/rtemself.h, ! config/v850/rtems.h (*-rtems*): Cleanup pass to move common ! definitions to config/rtems.h and make the targets more similar. ! Fri Apr 12 08:06:54 2002 Richard Kenner ! * expr.c (expand_assigment): Remove duplicate conversions #ifdef ! POINTERS_EXTEND_UNSIGNED. ! (store_constructor, expand_expr, case COMPONENT_REF): Likewise. ! (store_expr): Use TYPE_MODE (sizetype), not ptr_mode. ! * emit-rtl.c (widen_memory_access): Don't do anything if MEMOFFSET ! not specified. ! 2002-04-12 Hans-Peter Nilsson ! * function.c (fixup_var_refs_1) : ! For paradoxical (subreg VAR), replace VAR, don't try the subreg. ! 2002-04-12 Andreas Schwab ! * config/ia64/ia64.h (EXTRA_SPECS): Fix missing backslash. ! 2002-04-12 Richard Henderson ! PR bootstrap/4191 ! * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef. ! * flow.c (mark_used_reg): Manage reg_cond_dead properly for ! modes spanning multiple hard regs. ! * recog.c (peephole2_optimize): Rebuild jump labels as needed. ! 2002-04-11 John David Anglin ! * pa.c (output_millicode_call): Check attribute type as well as length ! when length is 28. ! 2002-04-11 David O'Brien ! * config/freebsd.h (NO_IMPLICIT_EXTERN_C, SCCS_DIRECTIVE): Give value. ! (DEFAULT_PCC_STRUCT_RETURN) Do not redefine. ! (USER_LABEL_PREFIX, HANDLE_SYSV_PRAGMA, IDENT_ASM_OP, ! DWARF2_DEBUGGING_INFO, DBX_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE): ! elfos.h and dbxelf.h values are fine now. ! * config/i386/freebsd.h, config/alpha/freebsd.h ! (DEFAULT_PCC_STRUCT_RETURN): Define to 0. ! 2002-04-11 David O'Brien ! * config/ia64/aix.h (CPP_PREDEFINES): Do not define _LP64/__LP64__ ! or set Acpu or Amachine. Reformat. ! (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not ! define. ! (LINK_SPEC): Do not need to undef. ! * config/ia64/elf.h (ASM_EXTRA_SPEC): Define. ! * config/ia64/freebsd.h (LINK_SPEC): Do not need to undef. ! (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not ! define. ! * config/ia64/hpux.h (ASM_EXTRA_SPEC): Define. ! (ASM_SPEC): Do not define, use ASM_EXTRA_SPEC instead. ! (LINK_SPEC): Do not need to undef. ! (DONT_USE_BUILTIN_SETJMP): Do not define. ! * config/ia64/ia64.h (ASM_SPEC, ASM_EXTRA_SPEC): Add. ! (CPP_CPU_SPEC): Define _LP64, set Acpu and Amachine. Remove -Dia64. ! (DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Define. ! Remove trailing spaces. ! * config/ia64/linux.h (CPP_PREDEFINES): Do not define _LP64/__LP64__, ! __ELF__, or set Acpu or Amachine. Reformat. ! (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not ! define. ! 2002-04-11 David O'Brien ! * config.gcc (ia64-*-freebsd*): Fix ordering of tm_files to match ! all other *-*-freebsd* targets. ! 2002-04-11 Richard Sandiford ! * doc/extend.texi: Remove old claim that typedefs cannot have ! an alignment attribute. ! 2002-04-11 Jakub Jelinek ! PR optimization/6177 ! * expr.c (expand_expr) [COMPONENT_REF]: Handle op0 CONCAT if ! bitpos is 0 and bitsize CONCAT size. ! 2002-04-11 Jakub Jelinek ! PR c/6223 ! * combine.c (if_then_else_cond): Use trunc_int_for_mode on nz. ! 2002-04-11 David O'Brien ! * config/alpha/freebsd.h: Minor reformatting. ! (CPP_SPEC): Define ELF and add cpp_subtarget. ! (ASM_SPEC): No longer needed. ! 2002-04-11 Richard Henderson ! * config/sparc/sparc.md (movdi_insn_sp32): Add o/J alternative. ! (movdi_insn_sp32_v9): Likewise. Only allow stx with aligned memory. ! (dimode mem/zero splitter): New. ! 2002-04-11 Hans-Peter Nilsson ! * config/cris/cris.c (cris_override_options): Tweak error message ! for PIC not implemented. ! * config/cris/cris.h: Tweak comments related to parameter-passing. ! * config/cris/t-cris (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc here. ! * config/cris/cris.c (cris_target_asm_function_prologue): Cast ! uses of PIC_OFFSET_TABLE_REGNUM to int to silence warnings. ! (cris_target_asm_function_epilogue): Ditto. ! (cris_initial_frame_pointer_offset): Ditto. ! (cris_simple_epilogue): Ditto. ! (cris_expand_builtin_va_arg): Variable-size types come in ! by-reference. ! 2002-04-10 Richard Henderson ! * except.c (add_ehl_entry): Allow duplicates after landing pad ! creation. ! 2002-04-10 David Edelsohn ! * config/rs6000/t-aix43 (SHLIB_NM_FLAGS): Add -X32_64. ! 2002-04-10 Ulrich Weigand ! * reload1.c (choose_reload_regs): HARD_FRAME_POINTER_REGNUM ! is only used as frame pointer when frame_pointer_needed is true. ! 2002-04-10 Richard Earnshaw ! PR target/817 ! * arm.md (arm_movdi): Adjust neg_pool_range attribute to allow ! for the fact that the pool entry uses two words. ! (movdf_hard_insn): Similarly. Also, ADR instruction can span ! 1k bytes. ! (movdf_soft_insn): Similarly. ! (movxf_hard_insn): Adjust neg_pool_range attribute to allow ! for the fact that the pool entry uses three words. ! 2002-04-10 Richard Henderson ! * expr.c (expand_expr) [INTEGER_CST]: Don't force into registers ! if EXPAND_INITIALIZER. ! 2002-04-10 Alan Modra ! PR optimization/6233 ! * rtlanal.c (pure_call_p): New function. ! * rtl.h (pure_call_p): Declare. ! * loop.c (prescan_loop): Use it to set has_nonconst_call. ! * gcse.c (store_killed_in_insn): Use pure_call_p here too. ! 2002-04-09 Richard Henderson ! * config/alpha/alpha.md (movdi_er_maybe_g): New. ! * config/alpha/alpha.c (alpha_expand_mov): Use it. ! 2002-04-09 Richard Henderson ! PR c/5078 ! * expr.c (expand_expr) [INTEGER_CST]: Force overflows into registers. ! 2002-04-09 Andrew MacLeod ! * expr.c (expand_expr): A RESULT_DECL is part of a call. ! 2002-04-09 Richard Henderson ! * cfg.c (expunge_block): Decrement num_elements here ... ! (expunge_block_nocompact): ... not here. ! * cfgcleanup.c (delete_unreachable_blocks): Set num_elements. ! 2002-04-09 Richard Henderson ! * basic-block.h (flow_delete_block_noexpunge): Declare. ! (expunge_block_nocompact): Declare. ! * cfg.c (expunge_block_nocompact): Split out from ... ! (expunge_block): ... here. ! * cfgrtl.c (can_delete_label_p): Don't use exception_handler_labels. ! (flow_delete_block_noexpunge): Split out from ... ! (flow_delete_block): ... here. ! * cfgcleanup.c (delete_unreachable_blocks): Compact while ! removing dead blocks. ! * except.c (exception_handler_labels): Remove. ! (exception_handler_label_map): New. ! (struct eh_region): Add aka member. ! (mark_ehl_map_entry, mark_ehl_map, free_region): New. ! (ehl_hash, ehl_eq, ehl_free, add_ehl_entry): New. ! (for_each_eh_label, for_each_eh_label_1): New. ! (init_eh): Register exception_handler_label_map. ! (free_eh_status): Use free_region. ! (find_exception_handler_labels): Use the map, not the list. ! (remove_exception_handler_label): Likewise. ! (maybe_remove_eh_handler): Likewise. ! (remove_eh_handler): Use the region aka bitmap. ! * except.h (exception_handler_labels): Remove. ! (for_each_eh_label): Declare. ! * jump.c (rebuild_jump_labels): Don't check exception_handler_labels. ! * loop.c (invalidate_loops_containing_label): New. ! (find_and_verify_loops): Use it. Use for_each_eh_label. ! * sched-rgn.c (is_cfg_nonregular): Use ! current_function_has_exception_handlers. ! 2002-04-08 Richard Henderson ! * reorg.c (get_branch_condition): Use reversed_comparison_code. ! 2002-04-08 Stephane Carrez ! * config/m68hc11/larith.asm (__map_data_section): Fix condition ! and optimize for size. ! (__do_global_ctors): Fix pointer comparison. ! (__do_global_dtors): Likewise. ! 2002-04-09 David S. Miller ! * config/sparc/sparc.c (sparc_extra_constraint_check): New ! function, implementing EXTRA_CONSTRAINTS. For memory constraints, ! allow reloading pseudos. ! * config/sparc/sparc.h (EXTRA_CONSTRAINTS): Use it. ! * config/sparc/sparc-protos.h: Declare it. ! * config/sparc/sparc.c (const64_is_2insns): Kill signed vs. ! unsigned comparison warning. ! (output_restore_regs): Mark leaf_function as unused. ! Tue Apr 9 09:35:45 2002 Richard Kenner ! * expr.c (is_aligning_offset): New function. ! (expand_expr, case COMPONENT_EXPR): Call it. ! 2002-04-09 Alan Modra ! * configure.in (auto-build.h): Use target_alias and build_alias ! when running configure. ! (gcc_cv_as): Use $target_alias in directory searchs rather than ! $target. Heed program_prefix and program_transform_name. Search ! for gas in cross-compiler case too. "test -x" rather than "test -f". ! (gcc_cv_ld): Likewise. ! (gcc_cv_nm): Set for cross compilers too. Heed program_prefix and ! program_transform_name. ! (gcc_cv_objdump): Likewise. ! * configure: Regenerate. ! 2002-04-08 Hans-Peter Nilsson ! * config/mmix/t-mmix (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc ! here. ! * config/mmix/mmix.h (INITIAL_ELIMINATION_OFFSET): Remove spurious ! semicolon. ! * config/mmix/mmix.c (mmix_expand_builtin_va_arg): Variable-size ! types come in by-reference. Fix typo in comment. ! 2002-04-08 Richard Henderson ! PR opt/6007 ! * toplev.c (rest_of_compilation): Disable cross-jumping for ! highly connected graphs. ! 2002-04-08 David S. Miller ! PR target/6082 ! * config/sparc/freebsd.h (SPARC_DEFAULT_CMODEL): Set to CM_MEDLOW ! Make init_priority work on Sparc when using GNU ld. ! * config/sparc/linux.h, config/sparc/linux64.h, ! config/sparc/netbsd-elf.h, config/sparc/freebsd.h ! (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Undefine. ! * config/sparc/sol2-gld.h: New file to do the same. ! * config.gcc (sparc*-*-solaris2*): If gnu_ld=yes add ! sparc/sol2-gld.h to tm_file. ! PR optimization/4328 ! * config/sparc/sparc.h (EXTRA_CONSTRAINT): Add new constraint 'W'. ! * doc/md.texi: Document it. ! * config/sparc/sparc.md (movdi_insn_sp64_novis, ! movdi_insn_sp64_vis, movdf_insn_sp32, movdf_insn_v9only_novis, ! movdf_insn_v9only_vis, movdf_insn_sp64_novis, ! movdf_insn_sp64_vis): Use it as MEM constraing with 'e' registers. ! * config/sparc/sparc.c (mem_min_alignment): Fix comment. ! 2002-04-08 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Add John David Anglin and Loren ! J. Rittle (the latter also to Testers). Update David O'Brien's entry. ! 2002-04-07 David S. Miller ! * config.gcc (sparc64-*-linux*): Add t-crtfm to tmake_file. ! 2002-04-07 John David Anglin ! PR 5933 ! * pa.h (ASM_OUTPUT_MI_THUNK): Use indirect jump to target function when ! generating 32-bit pic code. ! 2002-04-07 Franz Sirl ! * config/rs6000/rs6000.h (RS6000_PIC_OFFSET_TABLE_REGNUM): New. ! (PIC_OFFSET_TABLE_REGNUM): Use it and return INVALID_REGNUM if ! !flag_pic. ! (CONDITIONAL_REGISTER_USAGE): Adjust accordingly. ! * config/rs6000/rs6000.h: Use RS6000_PIC_OFFSET_TABLE_REGNUM instead ! of PIC_OFFSET_TABLE_REGNUM thruout. ! * config/rs6000/rs6000.md: Likewise. ! * config/rs6000/darwin.h: Likewise. ! 2002-04-06 John David Anglin ! * reorg.c (dbr_schedule): Don't reposition prologue and epilogue notes. ! 2002-04-06 Mark Mitchell ! PR c++/5571 ! * stor-layout.c (layout_decl): Reset the RTL for the decl. ! PR opt/5120 ! * sibcall.c (optimize_sibling_and_tail_recursive_call): Clear ! RTX_UNCHANGING_P for the functions arguments when a tail call ! is made. ! 2002-04-06 Jason Merrill ! * toplev.c (flag_no_inline, flag_really_no_inline): Default to 2. ! (parse_options_and_default_flags): Set them appropriately. ! * c-common.c (c_common_post_options): Don't set flag_really_no_inline. ! Sat Apr 6 18:26:32 CEST 2002 Jan Hubicka ! * ifcvt.c (if_convert): Clear aux fields of blocks. ! 2002-04-05 David S. Miller ! * config/sparc/freebsd.h (ENDFILE_SPEC): Add crtfastmath bits. ! * config.gcc (sparc64-wrs-vxworks, sparc-*-chorusos, ! sparc-*-rtems*, sparclite-*-elf* sparc86x-*-elf*, sparc64-*-elf*, ! {sparc64,ultrasparc}-*-freebsd*): Add sparc/t-crtfm to tmake_file. ! 2002-04-05 Jan Hubicka ! * optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting ! of libcall regions. ! 2002-04-05 David S. Miller ! * config/sparc/sparc.c (sparc_nonflat_function_epilogue): If we ! are not going to emit return instructions, emit at least a nop ! for the sake of sane backtraces. ! 2002-04-05 Jakub Jelinek ! * mklibgcc.in: Use separate libgcc.map for each multilib. ! * Makefile.in (distclean): Don't remove libgcc.map here. ! 2002-04-05 Jakub Jelinek ! * Makefile.in (s-mlib): Handle --disable-multilib by separate ! genmultilib invocation. ! 2002-04-04 David S. Miller ! * config/sparc/crtfastmath.c: New file. ! * config/sparc/t-crtfm: New file. ! * config/sparc/linux.h (ENDFILE_SPEC): Use crtfastmath.o ! * config/sparc/linux64.h (ENDFILE_SPEC): Likewise. ! * config/sparc/sol2.h (ENDFILE_SPEC): Likewise. ! * config/sparc/sp64-elf.h (ENDFILE_SPEC): Likewise. ! * config/sparc/elf.h (ENDFILE_SPEC): Likewise. ! * config.gcc (sparc*-*-{elf*,linux*,solaris2*}): Add ! sparc/t-crtfm to tmake_file. ! 2002-04-05 Alan Modra ! * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtsavres.o ! Add rules to make null object file. ! 2002-04-04 David S. Miller ! * calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg. ! 2002-04-04 Richard Henderson ! PR opt/6165 ! * alias.c (true_dependence): Force (mem:blk (scratch)) to conflict. ! (write_dependence_p): Likewise. ! 2002-04-04 Richard Henderson ! * predict.c (estimate_bb_frequencies): Do frequency calculation ! with a volatile temporary. ! 2002-04-04 Ulrich Weigand ! * config/s390/linux.h (LOCAL_LABEL_PREFIX): Define. ! 2002-04-04 Jakub Jelinek ! PR c++/6119 ! * final.c (final_start_function): Don't bump profile_label_no here... ! (final_end_function): ...but here. ! 2002-04-04 Jakub Jelinek ! * config/sparc/sparc.md (pic): New attribute. ! (do_builtin_setjmp_setup): Save %fp, %i7 and %l7 for TARGET_V9 ! into stack slots. ! (split after do_builtin_setjmp_setup): New. ! 2002-04-04 Jakub Jelinek ! PR fortran/6106 ! * config/sparc/sparc.h (MIN_UNITS_PER_WORD): Backout 2001-01-01 ! change. ! 2002-04-04 Jakub Jelinek ! * config/sparc/sparc.c (sparc_va_arg): Adjust va_list by ! UNITS_PER_WORD for zero sized aggregates. ! 2002-04-04 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Add David O'Brien. ! 2002-04-03 David S. Miller ! * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): No need for a new ! one-character spec for this, just use %(link_gcc_c_sequence). ! 2002-04-04 Alan Modra ! * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Define. ! 2002-04-03 David S. Miller ! * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): New spec to override the gcc/c ! library sequence passed to the linker. ! (LINK_COMMAND_SPEC): Use it. ! * doc/tm.texi: Document it, and mention from LINK_COMMAND_SPEC as ! a macro a target can use to avoid overriding LINK_COMMAND_SPEC. ! * config/sparc/sparc.h (LINK_GCC_C_SEQUENCE_SPEC): Define. ! 2002-04-03 Jason Merrill ! PR c++/5636 ! * tree.h (CLEANUP_EH_ONLY): New macro. ! * stmt.c (expand_decl_cleanup_eh): New fn. ! (expand_cleanups): Check CLEANUP_EH_ONLY. ! * c-semantics.c (genrtl_decl_cleanup): Just take the CLEANUP_STMT. ! Use expand_decl_cleanup_eh. ! (expand_stmt): Adjust. ! * c-common.h: Adjust prototype. ! 2002-04-03 Jakub Jelinek ! * configure.in (HAVE_SPARC_UA_PCREL_HIDDEN): Test whether %r_disp32() ! works properly with .hidden symbols. ! * configure: Rebuilt. ! * config.in: Rebuilt. ! * config/sparc/sparc.h (ASM_PREFERRED_EH_DATA_FORMAT): Use ! DW_EH_PE_absptr for flag_pic && GLOBAL if %r_disp32() doesn't work ! properly with .hidden symbols. ! 2002-04-03 Jakub Jelinek ! PR middle-end/6102 ! * df.c (df_insn_refs_record): Use XEXP not SET_DEST to access ! USE argument. ! 2002-04-03 Richard Henderson ! PR opt/4120 ! * sched-rgn.c (sets_likely_spilled): New. ! (sets_likely_spilled_1): New. ! (add_branch_dependences): Use it. ! 2002-04-02 Richard Henderson ! PR opt/4311 ! * loop.h (LOOP_FIRST_PASS): New. ! * loop.c (strength_reduce): Mind it when deciding to unroll. ! * toplev.c (rest_of_compilation): Set it. ! 2002-04-02 David S. Miller ! * config/sparc/sparc.md (ldd peephole2s): Fix final arg to ! mems_ok_for_ldd_peep when the order of the loads being examined ! is reversed. ! * config/sparc/sparc.c (mems_ok_for_ldd_peep): Expand upon ! existing comment to increase comprehension of this situation. ! 2002-04-02 Richard Henderson ! * libgcc2.c (__bb_exit_func): Revert 03-31 change. ! 2002-04-02 Eric Botcazou ! Richard Henderson ! PR c/5484 ! * function.c (assign_temp): Accept either type or decl argument. ! Detect variables whose size is too large to fit into an integer. ! * stmt.c (expand_decl): Pass the decl, not the type. ! 2002-04-02 David O'Brien ! * protoize.c: Match include directory usage with cppdefault.c. ! 2002-04-03 Jeffrey A Law (law@redhat.com) ! Hans-Peter Nilsson ! * combine.c (simplify_comparison): Avoid narrowing a comparison ! with a paradoxical subreg when doing so would drop signficant bits. ! 2002-04-02 David Edelsohn ! * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Define. ! 2002-04-02 Alan Modra ! * config/rs6000/rs6000.md (ctrdi*): Add FPR constraint and ! associated splitter. Remove MQ constraint. ! (ctrdi_internal4): Correct CCmode clobber. ! 2002-04-03 Hans-Peter Nilsson ! * config/mmix/mmix.md (define_constants): Remove misleading ! FIXME. Add MMIX_fp_rO_OFFSET. ! ("nonlocal_goto_receiver"): Don't have stack-frame address of ! saved rO as part of the pattern. Remove FIXME. ! ("*nonlocal_goto_receiver_expanded"): Similar. Generate address ! here, at output-time. ! * config/mmix/crti.asm (_init): Register _fini with atexit. ! * config/mmix/crtn.asm (_fini): Add omitted "POP 0,0". ! * config/mmix/mmix.c (mmix_target_asm_function_prologue): Correct ! unwind information when frame_pointer_needed. ! (mmix_assemble_integer): Tweak wording in comment. ! 2002-04-02 Richard Henderson ! PR opt/3967 ! * local-alloc.c (contains_replace_regs): LO_SUM may contain ! replace regs. ! 2002-04-02 Richard Henderson ! * doc/standards.texi: Document required freestanding libc entry points. ! 2002-04-02 Alexandre Oliva ! * config/mips/mips.c (mips_va_arg): Apply big-endianness address ! offset before loading address of argument passed by transparent ! reference. ! 2002-04-02 Richard Henderson ! * fixinc/inclhack.def (AAB_solaris_sys_varargs_h): Move and ! rename solaris_sys_varargs_h. ! Tue Apr 2 06:47:40 2002 Richard Kenner ! * stor-layout.c (layout_type, case ARRAY_TYPE): Give one-element array ! the same mode as its component. ! 2002-04-02 Richard Henderson ! PR opt/420 ! * config/m68k/m68k.md (dbcc peepholes): Match four forms of dbra. ! 2002-04-01 Richard Henderson ! PR target/1538 ! * fixinc/inclhack.def (solaris_sys_varargs_h): New. ! * fixinc/fixincl.x: Rebuild. ! 2002-04-01 Richard Henderson ! * config/ia64/unwind-ia64.c: Include ia64intrin.h. ! (atomic_alloc, atomic_free): New. ! (SIZE, MASK_FOR, PTR_IN): New. ! (emergency_reg_state, emergency_reg_state_free): New. ! (emergency_labeled_state, emergency_labeled_state_free): New. ! (reg_state_alloced, labeled_state_alloced): New. ! (alloc_reg_state, free_reg_state): New. ! (alloc_label_state, free_label_state, free_label_states): New. ! (push, pop, dup_state_stack, free_state_stack): Use them. ! (desc_label_state): Likewise. ! (uw_frame_state_for): Free label states and state stack. ! (uw_update_reg_address): Eliminate warnings. ! 2002-04-01 Loren J. Rittle ! * doc/install.texi (*-*-freebsd*): Update. ! 2002-04-01 Phil Edwards ! * version.c: Fix misplaced leading blanks on first line. ! 2002-04-01 Vladimir Makarov ! * config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON, ! ASM_OUTPUT_ALIGNED_LOCAL): Redefine them. ! 2002-04-01 Jim Blandy ! * cppmacro.c (cpp_macro_definition): Do not emit spaces after ! macro formal parameter names. ! 2002-04-01 Bob Wilson ! * config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning ! in previous change. ! 2002-04-01 Bob Wilson ! * config/xtensa/xtensa.c (xtensa_va_arg): Fix to handle arguments ! for which MUST_PASS_IN_STACK is true (e.g., variable-sized types). ! 2002-03-31 Richard Henderson ! * config/ia64/unwind-ia64.c (alloc_spill_area): Fix offset. ! (desc_frgr_mem): Fix reference to f16-f31. ! Sun Mar 31 14:43:24 2002 Richard Kenner ! * emit-rtl.c (adjust_address_1, offset_address): Cast value to ! unsigned HOST_WIDE_INT, not unsigned int. ! 2002-03-31 Jakub Jelinek ! PR middle-end/6096, middle-end/6098, middle-end/6099 ! * reorg.c (emit_delay_sequence): Only increment LABEL_NUSES for ! CODE_LABELs. ! (fill_slots_from_thread): Likewise. ! 2002-03-31 Jakub Jelinek ! * config/sparc/sparc.c (function_arg_record_value_1): Pass complex ! floating fields in float regs. ! (function_arg_record_value_2): Likewise. ! 2002-03-31 Jakub Jelinek ! PR middle-end/6100 ! * config/sparc/sparc.c (output_cbranch): Use REG_BR_PROB, not ! REG_BR_PRED. ! (output_v9branch): Likewise. ! 2002-03-31 Alexandre Oliva ! * gcc.c: Revert previous patch for now. ! * config/i386/djgpp.h: Likewise. ! 2002-03-31 Richard Henderson ! PR target/3997 ! * config/alpha/elf.h (ASM_OUTPUT_DEF): Tidy. ! (ASM_OUTPUT_DEF_FROM_DECLS): New. ! 2002-03-31 Richard Henderson ! * libgcc2.c (__bb_exit_func): Make static. ! * config/alpha/alpha.md (trap): New. ! 2002-03-31 Alexandre Oliva ! * gcc.c (LIBGCC_SPEC): Folded %L and duplicate %G here... ! (LINK_COMMAND_SPEC): ... from here. ! (init_gcc_specs): Duplicate it here too, omitting ! shared_name in the second copy. ! (init_spec): Test for duplicate ! * config/i386/djgpp.h (LINK_COMMAND_SPEC): Remove `%L %G'. ! 2002-03-31 Richard Henderson ! * builtins.c (expand_builtin_va_arg): Give warnings not errors for ! promoted argument types; build trap. ! (expand_builtin_trap): New. ! (expand_builtin): Use it. ! * stmt.c (expand_nl_goto_receivers): Likewise. ! * expr.h (expand_builtin_trap): Declare. ! * libfuncs.h (LTI_abort, abort_libfunc): New. ! * optabs.c (init_optabs): Init abort_libfunc. ! 2002-03-30 David S. Miller ! * config/sparc/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. ! * config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Likewise. ! 2002-03-30 Roger Sayle ! Richard Henderson ! * regmove.c (combine_stack_adjustments_for_block): Avoid ! emitting a stack adjustment of zero bytes. Let delete_insn ! update bb->head. ! 2002-03-30 Richard Henderson ! * config/sparc/sparc.c: Remove all references to TARGET_EPILOGUE. ! (sparc_emitting_epilogue): New. ! (leaf_label, output_return, sparc_return_peephole_ok): Remove. ! * config/sparc/sparc-protos.h: Update. ! * config/sparc/sparc.h (MASK_EPILOGUE, TARGET_EPILOGUE): Remove. ! (TARGET_SWITCHES): Update. ! * config/sparc/sparc.md (return): Remove. ! (return_*): Use sparc_emitting_epilogue, not !TARGET_EPILOGUE. ! * config/sparc/freebsd.h, config/sparc/linux64.h, config/sparc/lite.h, ! config/sparc/liteelf.h, config/sparc/netbsd-elf.h, ! config/sparc/sol2-sld-64.h, config/sparc/sol2.h, ! config/sparc/sp64-aout.h, config/sparc/sp64-elf.h, ! config/sparc/sp86x-aout.h, config/sparc/sp86x-elf.h, ! config/sparc/splet.h, config/sparc/vxsparc64.h (TARGET_DEFAULT): ! Remove MASK_EPILOGUE. ! * doc/invoke.texi: Update. ! 2002-03-30 Daniel Berlin ! * dwarf2out.c (dwarf2out_define): Remove start_source_file call, ! CPP will start the file for us. ! 2002-03-30 Richard Henderson ! PR target/5446 ! * config/ia64/ia64.c (group_barrier_needed_p): Special case ! prologue_allocate_stack. ! (ia64_single_set): Use insn codes for recognition of special ! cases, not rtl matching. ! * config/ia64/ia64.md (prologue_allocate_stack): Op 3 is in-out. ! 2002-03-30 Richard Henderson ! PR target/6032 ! * config/sparc/sparc.h (OVERRIDE_OPTIONS): Don't override -fpic ! or -fomit-frame-pointer with profiling. ! (SUBTARGET_OVERRIDE_OPTIONS): Remove. ! (FUNCTION_PROFILER): Do nothing. ! (PROFILE_HOOK): New. ! * config/sparc/sparc.c (sparc_override_options): Don't check ! code models for profiling. ! (sparc_function_profiler): Remove. ! (sparc_profile_hook): New. ! * config/sparc/sparc-protos.h: Update. ! 2002-03-30 Jakub Jelinek ! PR optimization/6086 ! * combine.c (combine_simplify_rtx): If simplify_rtx failed because ! of SUBREG of volatile MEM or because the MEM was mode dependent, ! return CLOBBER instead of unmodified SUBREG. ! 2002-03-30 David O'Brien ! * config/i370/linux.h: Update copyright. ! 2002-03-30 Alexandre Oliva ! * config/mips/mips.c (function_arg_pass_by_reference): Force to 0 ! in o32 and o64 ABIs. ! * config/mips/abi64.h (MUST_PASS_IN_STACK): Define as in expr.h, ! but getting fixed-size structs passed in registers regardless of ! padding in o32 and o64 ABIs. ! 2002-03-29 Richard Henderson ! PR target/5672 ! * expr.c (expand_expr): Pass along EXPAND_INITIALIZER one more place. ! 2002-03-29 Franz Sirl ! * config/rs6000/rs6000.c (rs6000_va_arg): Correctly set register count ! for aggregate and TFmode types. ! 2002-03-29 Richard Henderson ! PR target/5886 ! * config/ia64/aix.h (CPP_PREDEFINES): Add -D_LP64. ! * config/ia64/hpux.h, config/ia64/linux.h: Likewise. ! 2002-03-29 Loren J. Rittle ! * doc/install.texi (*-*-freebsd*): Fix last commit. ! 2002-03-29 Richard Henderson ! PR target/6041 ! * config/i386/i386.c (x86_arch_always_fancy_math_387): New. ! (override_options): Disable NO_FANCY_MATH_387 if the arch allows. ! * config/i386/i386.h (x86_arch_always_fancy_math_387): New. ! * config/i386/i386.md (sqrtxf2, sqrtextendsfxf2, sinxf2): Fix ! conditional. ! * docs/invoke.texi: Update -mno-fancy-math-387 docs. ! 2002-03-29 Loren J. Rittle ! * config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so. ! * config/t-slibgcc-elf-ver (SHLIB_LC): Add macro and use it. ! No functional change except ... ! * config/t-slibgcc-nolc-override (SHLIB_LC): Override it. New file. ! * doc/install.texi (*-*-freebsd*): Document port configuration. ! 2002-03-29 Jakub Jelinek ! PR c++/5964 ! * config/sparc/sparc.md (empty_delay_slot, branch_type): New ! attributes. ! (length): Compute variable length for branches/calls/jumps here. ! (branch, inverted_branch, normal_fp_branch, inverted_fp_branch, ! normal_fpe_branch, inverted_fpe_branch): Remove length attribute, ! define branch_type attribute. ! (divsi3_sp32): Maximum length is 6 not 7. ! (call_address_struct_value_sp32, call_symbolic_struct_value_sp32, ! call_address_untyped_struct_value_sp32, ! call_symbolic_untyped_struct_value_sp32): Set length to 3 not 2. ! * config/sparc/sparc.c (empty_delay_slot): New function. ! * config/sparc/sparc.h (ADJUST_INSN_LENGTH): Remove. ! * config/sparc/sparc-protos.h (empty_delay_slot): Add prototype. ! 2002-03-29 Jakub Jelinek ! * combine.c (set_nonzero_bits_and_sign_copies): Don't call ! nonzero_bits if not needed. ! (nonzero_bits) [XOR]: Likewise. ! (nonzero_bits) [REG]: Use reg_last_set_nonzero_bits even if ! reg_last_set_mode and mode are both MODE_INT, but not equal. ! (record_value_for_reg): Compute reg_last_set_nonzero_bits ! in nonzero_bits_mode for MODE_INT modes. ! 2002-03-28 Richard Henderson ! PR target/5715 ! * config/alpha/osf.h (ASM_SPEC): Don't pass any special options ! to GAS. Correct drift between alternatives. ! 2002-03-28 Richard Henderson ! PR target/6087 ! * reload1.c (fixup_abnormal_edges): Move insn to edge via sequence. ! 2002-03-28 Alexandre Oliva ! * config/i386/freebsd.h (LINK_SPEC): Don't pass default ! emulation to the linker. ! 2002-03-28 Loren J. Rittle ! * config/alpha/freebsd.h (LINK_SPEC): Likewise. ! * config/sparc/freebsd.h (LINK_SPEC): Likewise. ! 2002-03-28 John David Anglin ! * pa-linux.h (LOCAL_LABEL_PREFIX): Define. ! Thu Mar 28 16:33:13 2002 Jeffrey A Law (law@redhat.com) ! * combine.c (simplify_and_const_int): Make sure to apply mask ! when force_to_mode returns a constant integer. PR3311. ! 2002-03-28 Gerald Pfeifer ! * doc/invoke.texi (Warning Options): Refer to C++ Dialect Options ! and Objective-C Dialect Options. ! 2002-03-28 Richard Henderson ! * config/alpha/alpha.c (alpha_emit_conditional_branch): TFmode NE ! comparison should be done vs !=0 not >0 return code. Tidy cases. ! 2002-03-28 Richard Henderson ! * c-decl.c (finish_function): New arg can_defer_p. Pass it ! on to c_expand_body. ! * c-tree.h (finish_function): Update decl. ! * c-objc-common.c, c-parse.in, objc/objc-act.c: Update calls. ! 2002-03-27 Andreas Schwab ! * config/i386/i386.c (classify_argument): Also check for ! QUAL_UNION_TYPE. ! 2002-03-27 Rainer Orth ! * doc/install.texi (alpha*-dec-osf*): Don't need --enable-libgcj ! any more. ! Wed Mar 27 22:52:02 CET 2002 Zdenek Dvorak ! * cfgrtl.c (merge_blocks_nomove): Use set_block_for_insn instead of ! assigning to BLOCK_FOR_INSN directly. ! Wed Mar 27 22:46:04 CET 2002 Jan Hubicka ! * i386.c (ix86_output_addr_diff_elt): Remove binutils bug workaround. ! 2002-03-27 Richard Henderson ! * toplev.c (rest_of_compilation): Don't compile if we've had errors. ! 2002-03-27 Richard Henderson ! * config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, ! config/sparc/netbsd-elf.h, config/sparc/pbd.h, config/sparc/sol2.h, ! config/sparc/vxsim.h (LOCAL_LABEL_PREFIX): Define. ! 2002-03-27 Richard Henderson ! PR target/6054 ! * config/ia64/ia64.c (ia64_expand_call): Use pic patterns for ! TARGET_CONST_GP. Simplify conditions. ! 2002-03-26 Vladimir Makarov ! * pa/pa-pro-end.h (CPP_PREDEFINES): Add -D__pro__. ! * pa/lib2funcs.asm: Don't use .SPACE and .SUBSPACE if __pro__ ! or __rtems_ is defined. ! 2002-03-26 Richard Henderson ! * config/alpha/alpha.c (alpha_emit_set_const): Add a REG_EQUAL note ! if a non-trivial load was emitted. ! (alpha_emit_set_const_1): Remove obsolete extension. Fix thinko ! in high+extra+low case. ! 2002-03-26 Richard Henderson ! * config.gcc (sparc*-solaris): Use float_format=sparc. ! 2002-03-26 Richard Henderson ! * config/sparc/sparc.h (MAX_WCHAR_TYPE_SIZE): Don't define. ! * config/sparc/linux-aout.h (MAX_WCHAR_TYPE_SIZE): Don't undef. ! * config/sparc/linux.h, config/sparc/linux64.h: Likewise. ! * config/sparc/sol2.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Redefine. ! (WINT_TYPE_SIZE): Fix at 32. ! 2002-03-26 Richard Henderson ! * toplev.c (rest_of_compilation): Delay emit_initial_value_sets ! until after eh landing pad generation. ! * config/alpha/alpha.c (alpha_gp_save_rtx): Use gen_mem_addressof. ! * config/alpha/alpha.md (exception_receiver_2): Only accept MEMs. ! 2002-03-26 Richard Henderson ! * expr.h (ADD_PARM_SIZE): One more convert for INC. ! 2002-03-26 David Edelsohn ! * config/rs6000/aix51.h (WCHAR_TYPE): Define. ! 2002-03-26 Hans Boehm ! * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR): ! Restore more of the signal context. Set no_reg_stack_frame. ! * config/ia64/unwind-ia64.c (unw_state_record): ! Add no_reg_stack_frame, comments. ! (uw_frame_state_for): Initialize when field to UNW_WHEN_NEVER. ! (uw_update_context): Adjust bsp when unwinding from leaf, ! but not signal frame. ! 2002-03-26 Bob Wilson ! * config/xtensa/xtensa.c (xtensa_va_arg): Handle variable-sized types. ! 2002-03-26 Richard Earnshaw ! PR target/5621 ! * arm.md (define_asm_attributes): Reapply patch of Thu Sep 9, 1999: ! "Add a pool_range attribute", which was lost during the ARM/Thumb ! merge. ! 2002-03-26 Bob Wilson ! * config/xtensa/xtensa.c (xtensa_valid_move): Allow move from ! a register into the MAC16 accumulator. ! 2002-03-26 Hartmut Penner ! * config/s390/s390.c (s390_emit_epilogue): Change epilogue ! code to not restoring global registers. ! 2002-03-26 Richard Henderson ! * expr.h (ADD_PARM_SIZE): Cast INC to ssizetype. ! (SUB_PARM_SIZE): Cast DEC to ssizetype. ! * config/alpha/alpha.c (alpha_va_arg): Read MUST_PASS_IN_STACK ! types from the normal argument frame. ! * config/sparc/sparc.c (function_arg_pass_by_reference): Pass ! variable sized objects by reference. ! (sparc_va_arg): Receive them by reference too. ! 2002-03-25 Bruce Korb ! * Makefile.in(check-fixinc): run "$(MAKE) check" in the fixinc ! directory when autogen is detected. ! 2002-03-25 Richard Henderson ! * recog.c (peephole2_optimize): Distribute EH_REGION -1 notes ! anywhere in the block. Don't refer to insns that have been ! removed from the chain. Iterate backward through the new insns. ! Don't refer to edges that have been removed. ! 2002-03-26 Alan Modra ! * combine.c (simplify_comparison ): Correct ! test for overflow of constant. ! 2002-03-25 Richard Earnshaw ! PR target/2623 ! * arm.md (loadhi_preinc, loadhi_predec, loadhi_shiftpreinc) ! (loadhi_shiftpredec, loadhi-with-writeback peephole): Don't use ! these patterns on arm_archv4. ! 2002-03-22 Nick Clifton ! * config/mcore/mcore.h (CC1_SPEC): Define only if not already ! defined. Do not disable exceptions or rtti. ! * config/mcore/mcore-pe.h (CC1_SPEC): Define before including ! mcore.h. Disable exceptions and rtti, since they are not ! supported by EPOC. ! 2002-03-25 Jakub Jelinek ! * regrename.c (build_def_use): Move recog_memoized ! before extract_insn. ! 2002-03-25 Jakub Jelinek ! PR target/6043 ! * expr.c (emit_group_store): Handle storing into CONCAT. ! 2002-03-25 Jakub Jelinek ! * regrename.c (build_def_use): Share RTL between MATCH_OPERATOR and ! corresponding MATCH_DUP. ! 2002-03-24 Richard Henderson ! * unroll.c (unroll_loop): Zero label_map. ! * gcse.c: Include except.h. ! * Makefile.in (gcse.o): Update. ! 2002-03-24 Richard Henderson ! * varasm.c (asm_emit_uninitialised): Revert 2002-03-14 change. ! Do resolve_unique_section before shared data clause. ! 2002-03-24 Richard Henderson ! * config/alpha/elf.h (STARTFILE_SPEC): Use crtbeginT with -static. ! 2002-03-24 Richard Henderson ! * recog.c (peephole2_optimize): Split blocks when EH insns are ! generated in the middle of a block. Do global life update if ! zapped EH edges. ! 2002-03-24 Richard Henderson ! * mips.c (mips_function_value): Only promote_mode for non-libcalls. ! 2002-03-24 Neil Booth ! preprocessor/3951 ! * gcc.c (cpp_options): Pass -MD through as -MD not -M -MF. ! * cppinit.c (cpp_handle_option): Set no_ouput if -MD or -MMD. ! (init_dependency_output): Don't make no_output decision here. ! 2002-03-24 Stephane Carrez ! * config/m68hc11/m68hc11.c (m68hc11_autoinc_compatible_p): New function. ! (m68hc11_split_move): Call it to see if the source and destination ! operands use the same direction auto inc/dec mode, otherwise make the ! source an offsetable memory operand and generate an add. ! 2002-03-24 Stephane Carrez ! * config/m68hc11/m68hc11.md ("*subsi3_zero_extendhi"): Allow address ! register for operand 2. ! ("*subsi3_zero_extendqi"): Likewise. ! ("*iorhi3_gen"): Do the operation on the upper bits and then lower ! bits so that it is compatible with a pop. ! ("*andhi3_gen"): Likewise. ! ("xorhi3"): Likewise. ! 2002-03-24 Richard Henderson ! PR optimization/5742 ! * machmode.def: Add inner mode field to complex modes. ! * config/mips/mips.c (mips_function_value): Always define. Add ! new argument to handle libcalls. ! * config/mips/mips.h (LIBCALL_VALUE): Use mips_function_value. ! (FUNCTION_VALUE): Likewise. ! * config/mips/abi64.h (FUNCTION_VALUE): Remove. ! * config/mips/mips-protos.h: Update. ! 2002-03-23 Richard Henderson ! * config/sparc/sparc.c (sparc_emit_floatunsdi): New. ! * config/sparc/sparc-protos.h: Update. ! * config/sparc/sparc.md (floatunsdisf2, floatunsdidf2): New. ! 2002-03-23 Richard Henderson ! * config/sparc/gmon-sol2.c (internal_mcount): Assume either ! _start or _init begins the text segment. ! 2002-03-23 Alan Modra ! * combine.c (simplify_comparison): When widening modes, ignore ! sign extension on CONST_INTs. ! 2002-03-22 Bob Wilson ! * config/xtensa/xtensa.c (print_operand): Fix incorrect mode ! passed to adjust_address. Fix comment formatting. ! 2002-03-22 Alexandre Oliva ! * config/mips/mips.h (MASK_RETURN_ADDR): Define. ! (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define. ! 2002-03-22 Richard Henderson ! * c-pragma.c (maybe_apply_renaming_pragma): New. ! (handle_pragma_redefine_extname, pending_redefine_extname): New. ! (handle_pragma_extern_prefix, pragma_extern_prefix): New. ! (init_pragma): Register them. ! * c-pragma.h (maybe_apply_renaming_pragma): Declare. ! * c-decl.c (finish_decl): Call it. ! * cp/decl.c (cp_finish_decl): Likewise. ! * doc/extend.texi: Document the new pragmas. ! * config/alpha/osf.h (CPP_SUBTARGET_SPEC): Add __EXTERN_PREFIX. ! (HANDLE_PRAGMA_EXTERN_PREFIX): New. ! * config/i386/sol2.h (CPP_PREDEFINES): Add __PRAGMA_REDEFINE_EXTNAME. ! (HANDLE_PRAGMA_REDEFINE_EXTNAME): New. ! * config/sparc/sol2.h: Likewise. ! 2002-03-22 Bob Wilson ! * config/xtensa/xtensa-protos.h (non_acc_reg_operand): Remove. ! (xtensa_valid_move, xtensa_preferred_reload_class): Define. ! * config/xtensa/xtensa.c (non_acc_reg_operand): Remove. ! (xtensa_valid_move, xtensa_preferred_reload_class): Define to ! prevent use of sp as a reload register. ! (xtensa_emit_move_sequence): Use xtensa_valid_move instead of ! non_acc_reg_operand. ! * config/xtensa/xtensa.h (PREDICATE_CODES): Remove non_acc_reg_operand. ! (PREFERRED_RELOAD_CLASS): Move code to xtensa_preferred_reload_class. ! * config/xtensa/xtensa.md (movsi_internal, movhi_internal, ! movqi_internal): Use xtensa_valid_move instead of non_acc_reg_operand. ! 2002-03-22 Jakub Jelinek ! PR optimization/5854 ! * config/m68hc11/m68hc11.h (CONST_OK_FOR_LETTER_VALUE_P): Use K for 0. ! Shut up warnings. ! (CONST_DOUBLE_OK_FOR_LETTER_P): Use G for 0.0. ! (EXTRA_CONSTRAINT): Use S for non-push memory operand. ! * config/m68hc11/m68hc11.c (m68hc11_split_move): Handle setting from ! const0 if scratch register was not allocated. ! (m68hc11_reload_operands, m68hc11_gen_lowpart, m68hc11_gen_highpart, ! m68hc11_z_replacement): Replace gen_rtx (CONST_INT, VOIDmode, ...) ! with GEN_INT (...). ! (m68hc11_reorg): Compute BLOCK_FOR_INSN before reload_cse_regs. ! * config/m68hc11/m68hc11.md: Replace gen_rtx (CONST_INT, VOIDmode, ...) ! with GEN_INT (...) everywhere. Remove constraints in define_split ! patterns. ! (movdi_internal, movdf_internal, movsi_internal, movsf_internal): Don't ! require scratch register for setting 0 into regs/non-pushable memory. ! 2002-03-22 Alexandre Oliva ! * flow.c (calculate_global_regs_live): Clear aux fields of ! ENTRY and EXIT. ! 2002-03-22 Jakub Jelinek ! * config/v850/v850.c (v850_reorg): Only call alter_subreg on ! REG or MEM subregs, pass rtx * instead of rtx to it. ! * config/i860/i860.c (output_delayed_branch, output_delay_insn): Pass ! rtx * instead of rtx to alter_subreg. ! * config/m32r/m32r.c (gen_split_move_double): Likewise. ! * config/pj/pj.c (pj_output_rval): Likewise. ! 2002-03-22 Richard Henderson ! PR target/3177 ! * config/ia64/ia64.h (CUMULATIVE_ARGS): Add int_regs. ! (INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Update. ! * config/ia64/ia64.c (ia64_function_arg_advance): Set int_regs. ! (ia64_expand_prologue): Look at int_regs, not words, for number ! of incomming int regs. ! Fri Mar 22 16:00:06 CET 2002 Jan Hubicka ! * cfgcleanup.c (outgoing_edges_math): Fix condition; relax ! frequencies match; avoid match on different loop depths. ! (try_crossjump_to_bb): Kill tests that no longer brings time ! savings. ! * cfgrtl.c (force_nonfallthru_and_redirect): Fix loop_depth ! updating code. ! (split_edge): Likewise. ! 2002-03-21 Richard Henderson ! PR target/5996 ! * fixinc/inclhack.def (solaris_stdio_tag): New. ! * fixinc/fixincl.x: Regenerate. ! 2002-03-21 Eric Botcazou ! PR c/5597 ! * c-typeck.c (process_init_element): Flag non-static ! initialization of a flexible array member as illegal. ! 2002-03-22 Alan Modra ! * config/rs6000/t-linux64: New. ! * config.gcc (powerpc64-*-linux* ): Drop t-ppcos and ! t-ppccomm. Use t-rs6000 and t-linux64. ! (powerpc64-*-gnu* ): Likewise. ! * mklibgcc.in (SHLIB_MKMAP_OPTS): New variable. ! * mkmap-symver.awk (dotsyms): If set, output .foo as well as foo. ! * Makefile.in (SHLIB_MKMAP_OPTS): Pass to mklibgcc. ! 2002-03-21 Aldy Hernandez ! * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check ! flag_really_no_inline instead of optimize == 0. ! * c-objc-common.c (c_cannot_inline_tree_fn): Same. ! * cp/tree.c (cp_cannot_inline_tree_fn): Same. ! * flags.h (flag_really_no_inline): New. ! * c-common.c (c_common_post_options): Initialzie ! flag_really_no_inline. ! * toplev.c (flag_really_no_inline): New. ! 2002-03-21 Jakub Jelinek ! * config/avr/avr.md (length): Fix length computation for ! conditional branches. ! 2002-03-21 Richard Henderson ! * config/rs6000/rs6000.c (rs6000_select_rtx_section): Put symbolic ! constants in .data when -fpic. ! 2002-03-21 Tom Tromey ! * config/i386/sol2.h (ASM_QUAD): Undef. Fixes PR bootstrap/5948. ! 2002-03-21 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Use GNU/Linux instead of Linux ! where appropriate. ! Thu Mar 21 09:50:48 2002 Richard Kenner ! * config/ia64/ia64.c (hfa_element_mode, case ARRAY_TYPE): Recurse. ! * expr.c (emit_group_store): Don't copy const0_rtx to a CONCAT. ! 2002-03-21 Eric Botcazou ! Richard Henderson ! PR c/5354: ! * c-common.c (c_expand_expr): Preserve result of a statement ! expression if needed. ! 2002-03-21 Jakub Jelinek ! PR bootstrap/4195 ! * genrecog.c (maybe_both_true_mode): Remove. ! (maybe_both_true_2, write_switch): Revert 2001-07-17 changes. ! * machmode.def (Pmode): Likewise. ! 2002-03-21 Rainer Orth ! * fixinc/inclhack.def (alpha_assert): Fix assert macro in Tru64 ! UNIX assert.h. ! * fixinc/fixincl.x: Regenerate. ! 2002-03-20 Jason Merrill ! * config/i386/cygwin.h (DWARF2_UNWIND_INFO): Define to 0. ! 2002-03-20 Bob Wilson ! * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Emit a ! ".literal_position" directive before the constant pool. ! 2002-03-20 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Update Geoffrey Keating. ! Add Craig Rodrigues. ! Add Brad Lucier to testers. ! 2002-03-20 Jakub Jelinek ! PR target/4792 ! * config/arc/arc.md (movsicc, movdicc, movsfcc, movdfcc): Add mode ! to if_then_else. ! (movsicc_insn, movdicc_insn, movsfcc_insn, movdfcc_insn): Likewise. ! * config/arc/arc.c (arc_final_prescan_insn): Use extract_insn_cached ! instead of insn_extract. ! 2002-03-20 Jakub Jelinek ! PR bootstrap/4192 ! * config/fr30/fr30.md (jump): Remove clobber of fixed register. ! * genemit.c (output_added_clobbers_hard_reg_p): Only output return ! stmt if some case has been output. ! 2002-03-20 Jakub Jelinek ! PR c/5972 ! * config/i386/i386.md (movdicc_c_rex64, movsicc_noc, movhicc_noc, ! movsfcc_1, movdfcc_1): Add %O2. ! * config/i386/i386.c (print_operand): Handle %ON. ! Print . before float condition codes in Sun as cmov syntax. ! * config/i386/sol2.h (CMOV_SUN_AS_SYNTAX): Define for Sun as. ! * config.gcc (i[34567]86-*-solaris2*): Remove comment which is ! no longer true. ! 2002-03-20 Philip Blundell ! * config/arm/arm.c (arm_output_epilogue): Don't generate separate ! return instruction if PC was popped. ! 2002-03-20 Hans-Peter Nilsson ! * config/mmix/mmix.md ("fixuns_truncdfdi2"): Use (unsigned_fix:DI ! (unsigned_fix:DF op1)), not (unsigned_fix:DI (fix:DF op1)). ! ("truncdfsf2"): Correct operator is float_truncate, not fix. ! ("*truncdfsf2_real"): Ditto. ! ("*nonlocal_goto_receiver_expanded"): Fix output template formatting. ! * config/mmix/mmix.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Don't define. ! 2002-03-19 Jim Blandy ! * c-lex.c (cb_file_change): Pass the #inclusion's line number to ! the start_source_file debug hook, not the current line number. ! * cppmacro.c (cpp_macro_definition): Emit a space after the macro ! name, even if the replacement list contains no tokens, as required ! by Dwarf. ! 2002-03-19 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_override_options): Only warn ! about -fpic/-fPIC if extra_warnings set. ! 2002-03-19 Richard Henderson ! * flow.c (EH_USES): Provide default. ! (calculate_global_regs_live): Use it for EH edges and noreturn calls. ! * doc/tm.texi (EH_USES): New. ! * config/ia64/ia64.c (ia64_eh_uses): New. ! * config/ia64/ia64-protos.h: Update. ! * config/ia64/ia64.h (EH_USES): New. ! 2002-03-20 Alan Modra ! * defaults.h (SUPPORTS_WEAK): Set if ASM_WEAKEN_DECL. ! * varasm.c (assemble_alias): Use ASM_WEAKEN_DECL. ! * doc/tm.texi (ASM_WEAKEN_DECL): Document. ! (ASM_WEAKEN_LABEL): Mention ASM_WEAKEN_DECL. ! (SUPPORTS_WEAK): Likewise. ! 2002-03-19 Richard Henderson ! PR 5879 ! * except.c (current_function_has_exception_handlers): New. ! * except.h: Declare it. ! * sibcall.c (optimize_sibling_and_tail_recursive_call): Use it. ! Combine tests that disable all sibcalls for the function. ! 2002-03-19 Richard Henderson ! PR 5977, 5991 ! * config/ia64/ia64.c: Revert 2002-03-01 patch. ! * config/ia64/ia64.h (INIT_EXPANDERS): New. ! 2002-03-19 Olivier Hainque ! * varasm.c (output_constant_def): Don't call ENCODE_SECTION_INFO ! for INTEGER_CST. ! 2002-03-19 Jason Merrill ! * varasm.c (globalize_decl): Get the name from the RTL, not ! DECL_ASSEMBLER_NAME. ! * Makefile.in (LIBGCC2_DEBUG_CFLAGS): Set to -g. ! 2002-03-19 Dale Johannesen ! PR optimization/5999, middle-end/5731 ! * expr.c (expand_expr) [RDIV_EXPR]: Only convert real divisions into ! multiplications by reciprocals. ! 2002-03-19 Bob Wilson ! * config/xtensa/xtensa.md (adddi3, adddi_carry, subdi3, ! subdi_carry): Define. ! Tue Mar 19 14:12:32 2002 Richard Kenner ! * config/sparc/sparc.h (CAN_ELMINIATE): Can only eliminate FP ! in favor of SP if FRAME_POINTER_REQUIRED is false. ! 2002-03-19 Jakub Jelinek ! PR c/5656 ! * langhooks.h (struct lang_hooks_for_tree_inlining): Add ! convert_parm_for_inlining. ! * c-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): ! Define. ! * langhooks-def.h: Likewise. ! * objc/objc-lang.c: Likewise. ! * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): New ! function. ! * tree-inline.c (initialize_inlined_parameters): ! Call convert_parm_for_inlining lang hook if needed. ! * c-typeck.c (c_convert_parm_for_inlining): New function. ! * c-tree.h (c_convert_parm_for_inlining): Add prototype. ! 2002-03-18 Kaveh R. Ghazi ! * gcse.c (insert_insn_end_bb): Fix typo in last change. ! 2002-03-18 Mark Mitchell ! * calls.c (precompute_arguments): Do not assume that temporaries ! can be destroyed after expanding the argument. ! (expand_call): Likewise. ! 2002-03-18 Ashif Harji ! * gcc.c (struct compiler default_compilers): Add ! -no-integrated-cpp flag to invoke an external cpp. ! (struct option_map option_map[]): Likewise. ! * objc/lang-specs.h (struct compiler default_compilers): Add ! -no-integrated-cpp flag to invoke an external cpp. ! * doc/invoke.texi: Document -no-integrated-cpp flag. ! 2002-03-18 Alan Modra ! David Edelsohn ! * c-pragma.h (HANDLE_PRAGMA_WEAK): Define if ASM_WEAKEN_DECL too. ! * config/rs6000/linux64.h (ASM_DECLARE_FUNCTION_NAME): Don't emit ! .weak for code sym. Do emit .size for descriptor sym. ! (ASM_DECLARE_FUNCTION_SIZE): Define. ! * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Define. ! (ASM_OUTPUT_DEF_FROM_DECLS): Don't emit .weak here. Don't output ! .lglobl unless TARGET_XCOFF. Formatting fixes. ! (PREDICATE_CODES): Add any_operand and zero_constant. ! (HANDLE_PRAGMA_PACK): Delete. ! * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't emit ! .weak for code sym. ! (HANDLE_PRAGMA_WEAK): Remove. ! (ASM_WEAKEN_LABEL): Remove. ! (COLLECT_EXPORT_LIST): Delete. ! * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Define. ! * config/rs6000/darwin.h (HANDLE_SYSV_PRAGMA): Define. ! 2002-03-18 Bob Wilson ! * config/xtensa/xtensa.h (GO_IF_MODE_DEPENDENT_ADDRESS): Treat ! constant-pool addresses as "mode-dependent". ! Mon Mar 18 18:12:48 CET 2002 Jan Hubicka ! * i386.c (override_options): Disallow preferred_stack_boundary to be ! less than 16 bytes ! (construct_container): Fix end of array check. ! (ix86_va_start): Force alignemnt to be 16 bytes. ! * linux64.h (MULTILIB_DEFAULTS): Set to "m64". ! (t-linux64): Add multilibing ! * i386.h (PROMOTE_PROTOTYPES): Set to 0 for x86_64. ! * gcse.c (hash_scan_set): Refuse instructions with EH edges. ! * basic-block.h (fixup_abnormal_edges): Declare. ! * reload1.c (fixup_abnormal_edges): Make global. ! * reg-stack.c (convert_regs): Use it. ! * gcse.c (insert_insn_end_bb): Handle trapping insns. ! * reload1.c (reload_cse_delete_noop_set): Purge dead edges. ! * recog.c (peephole2_optimize): Re-distribute EH edges. ! 2002-03-18 Jason Merrill ! * configure.in: Disable checking by default on release branch. ! 2002-03-18 Jakub Jelinek ! PR target/5740 ! * expr.c (emit_group_load): Use extract_bit_field if ! needed for CONCAT arguments. ! 2002-03-18 Richard Earnshaw ! PR target/4863 ! * arm.md (tablejump): Make this a define_expand. For PIC add the ! offset to the base of the table. ! (thumb_tablejump): Matcher for Thumb tablejump insn. ! * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Output thumb entries ! as the difference of two labels. ! * config/arm/aof.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. ! * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Only put ARM jump ! tables in the code. ! * config/arm/coff.h (JUMP_TABLES_IN_TEXT_SECTION): Likewise. ! * arm.c (get_jump_table_size): If the table is not in the text ! section, return zero. ! 2002-03-17 Richard Henderson ! * config/alpha/alpha.c (alpha_emit_set_const_1): Build add insns ! explicitly. ! 2002-03-17 Kaveh R. Ghazi ! * ifcvt.c (dead_or_predicable): Fix uninitialized variable. ! 2002-03-17 David Edelsohn ! * expr.c (expand_expr): Sign-extend CONST_INT generated from ! TREE_STRING_POINTER. ! 2002-03-16 Richard Henderson ! * config/ia64/ia64.c (ia64_attribute_table): Move before ! targetm definition. Make static. ! 2002-03-16 Neil Booth ! * cppinit.c (print_help): Display -MD and -MMD. ! Don't display usage string. Update assertion syntax and ! typo. ! 2002-03-16 Stephane Carrez ! * config/m68hc11/m68hc11.c (m68hc11_override_options): Don't use ! soft registers by default for 68HC12. ! (m68hc11_conditional_register_usage): Don't use Z register for 68HC12 ! when compiling with -fomit-frame-pointer. ! (expand_prologue): Use push/pop to allocate 4-bytes of locals on 68HC12. ! (expand_epilogue): Likewise. ! (m68hc11_gen_rotate): Use exg when rotating by 8. ! 2002-03-16 Stephane Carrez ! * config/m68hc11/m68hc11-protos.h (ix_reg): Declare. ! * config/m68hc11/m68hc11.md ("addsi3"): Use general_operand for sources. ! (splits): Remove unused add splits. ! ("*addhi3_68hc12"): Tune constraints. ! ("addhi_sp"): Try to use X instead of Y in all cases and if the ! constant fits in 8-bits and D is dead use abx/aby instructions. ! ("*addhi3"): Remove extern declaration of ix_reg. ! ("*subsi3"): Optimize and provide new split. ! ("subhi3"): Cleanup. ! ("*subhi3_sp"): Avoid saving X if we know it is dead. ! (arith splits): For 68hc12 save the address register on the stack ! and do the arithmetic operation with a pop. ! 2002-03-16 Stephane Carrez ! * config/m68hc11/m68hc11.md ("*movqi_68hc12"): Fix constraints, avoid ! allocating QImode in address registers. ! ("*movqi_m68hc11"): Likewise. ! 2002-03-15 Mark Mitchell ! * expr.c (expand_expr): Revert previous change. ! * c-common.c (statement_code_p): Handle CLEANUP_STMT. ! * c-common.def (CLEANUP_STMT): New tree node. ! * c-common.h (CLEANUP_DECL): New macro. ! (CLEANUP_EXPR): Likewise. ! * c-semantics.c (expand_stmt): Handle CLEANUP_STMT. ! * expr.c (expand_expr): Tidy. ! * tree-dump.c (dequeue_and_dump): Handle CLEANUP_STMT. ! * tree-inline.c (initialize_inlined_parameters): Clean up ! new local variables. ! 2002-03-15 Richard Henderson ! * c-decl.c: Include c-pragma.h. ! (start_decl, start_function): Invoke maybe_apply_pragma_weak. ! (finish_function): Tidy. ! * c-pragma.c: Include c-common.h. ! (pending_weaks, apply_pragma_weak, maybe_apply_pragma_weak): New. ! (handle_pragma_weak): Use them. ! (init_pragma): Register pending_weaks. ! * c-pragma.h (maybe_apply_pragma_weak): Declare. ! * print-tree.c (print_node): Print DECL_WEAK. ! * varasm.c (mark_weak_decls): Remove. ! (remove_from_pending_weak_list): Remove. ! (add_weak): Remove. ! (asm_emit_uninitialised): Call globalize_decl for weak commons. ! (weak_decls): Make a tree_list. ! (declare_weak): Cons weak_decls directly. ! (globalize_decl): Remove weak_decls elements directly. ! (weak_finish): Simplify weak_decls walk. Don't weaken unused ! symbols. Don't pretend to handle aliases. ! (init_varasm_once): Update weak_decls registry. ! * Makefile.in: Update dependencies. ! 2002-03-15 Richard Henderson ! * config/alpha/alpha.c (alpha_va_arg): Manipulate the type ! size as a tree. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/m68hc11.md ("tstqi_1"): Try to use ldab instead of tst. ! ("tstqi" split): Avoid using memory for tstqi on address register. ! (splits): Remove constraints. ! ("cmphi_1_hc12"): New from "cmphi_1" and tuned for 68HC12. ! ("cmpdf", "cmpsf"): Remove since not used. ! ("*tbeq", "*tbne", "*tbeq8", "*tbne8"): Also look in cc_status.value2. ! (peephole2): New peepholes to optimize tstqi and pre inc/dec addressing. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/m68hc11.md ("negsi2"): Optimize inline case. ! ("neghi2"): Tighten constraints. ! ("one_cmplsi2"): Optimize and simplify split. ! * config/m68hc11/larith.asm (__negsi2): Likewise for library. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/m68hc11.md ("logicalsi3_zexthi"): Fix constraints ! and split of AND operation to clear the upper bits. ! ("*logicalsi3_zextqi"): Likewise. ! ("*logicallhi3_zexthi_ashift8"): Likewise. ! ("*logicalsi3_silshr16"): Likewise. ! ("logicalsi3_silshl16"): Likewise. ! ("anddi3", "iordi3", "xordi3" splits): Remove constraints. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/m68hc11.c (m68hc11_symbolic_p): New function. ! (m68hc11_indirect_p): New function. ! (m68hc11_override_options): Must set MASK_NO_DIRECT_MODE for 68HC12. ! (m68hc11_gen_highpart): Use TARGET_NO_DIRECT_MODE instead of ! TARGET_M6812. ! (asm_print_register): Likewise. ! * config/m68hc11/m68hc11-protos.h (m68hc11_symbolic_p): Declare. ! (m68hc11_indirect_p): Declare. ! * config/m68hc11/m68hc11.h (EXTRA_CONSTRAINT): New constraint 'R', 'Q'. ! (TARGET_NO_DIRECT_MODE, TARGET_RELAX): New. ! (TARGET_SWITCHES): New option -mrelax. ! * config/m68hc11/m68hc11.md ("andsi3"): Allow soft register for ! destination. ! ("iorsi3", "xorsi3"): Likewise. ! ("andhi3", "andqi3", "iorhi3", "iorqi3"): Use a define_expand. ! ("*andhi3_mem"): New to handle destination in memory with bclr ! and a scratch register. ! ("*andqi3_mem", "*iorhi3_mem", "*iorqi3_mem"): Likewise. ! ("*andhi3_const"): New when operand2 is constant. ! ("*andqi3_const", "*iorhi3_const", "*iorqi3_const"): Likewise. ! ("*andhi3_gen"): Cleanup of the old "andhi3". ! ("*andqi3_gen", "*iorhi3_gen", "*iorqi3_gen"): Likewise. ! ("xorqi3"): Update constraints. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/m68hc11.c (m68hc11_small_indexed_indirect_p): Look ! for reg_equiv_memory_loc when the operand is a register that does ! not get a hard register (stack location). ! (tst_operand): After reload, accept all memory operand. ! (symbolic_memory_operand): Fix detection of symbolic references. ! * config/m68hc11/m68hc11.h (VALID_CONSTANT_OFFSET_P): For 68HC12 ! accept symbols and any constant. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/m68hc11.c (emit_move_after_reload): Add a REG_INC ! note on the insn that sets the soft frame register. ! (must_parenthesize): ix and iy are also reserved names. ! (print_operand_address): One more place where parenthesis are required ! to avoid confusion with register names. ! (m68hc11_gen_movhi): Allow push of stack pointer. ! (m68hc11_check_z_replacement): Fix handling of parallel with a ! clobber. ! (m68hc11_z_replacement): Must update the REG_INC notes to tell what ! the replacement register is. ! * config/m68hc11/m68hc11.h (REG_CLASS_CONTENTS): Switch Z_REGS ! and D8_REGS classes. ! (MODES_TIEABLE_P): All modes are tieable except QImode. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/larith.asm (___adddi3): Optimize saving of result. ! (___subdi3): Likewise. ! (__mulsi3, __mulhi32): Avoid using _.tmp scratch location. ! (__map_data_section): Optimize 68hc11 case. ! 2002-03-15 Stephane Carrez ! * config/m68hc11/m68hc11.c (m6812_cost): Make cost of add higher ! than a shift to avoid adding a register with itself. ! (m68hc11_memory_move_cost): Take into account NO_REGS. ! (m68hc11_register_move_cost): Update and use memory move cost ! for soft registers. ! (m68hc11_address_cost): Make cost of valid offset not 0 so that ! it gives more opportunities to cse to optimize. ! * config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Pass the mode. ! * config/m68hc11/m68hc11-protos.h (m68hc11_register_move_cost): Update. ! 2002-03-15 Jason Merrill ! * varasm.c (globalize_decl): New fn. ! (assemble_start_function): Use it. ! (asm_emit_uninitialized): Use it. ! (assemble_alias): Use it. ! (assemble_variable): Use it. ! 2002-03-15 Jason Merrill ! * varasm.c (assemble_variable): Use zeros for a decl with DECL_INITIAL ! of error_mark_node. ! 2002-03-15 Jakub Jelinek ! PR bootstrap/4128 ! * config/sparc/sparc.c (gen_v9_scc): Move early clobber test ! before movrXX only, use reg_overlap_mentioned_p. ! Only special case NE if just one insn can be generated. ! 2002-03-15 Richard Earnshaw ! PR target/5712 ! * arm.md (movaddr, movaddr_insn): Delete. ! 2002-03-15 Jason Merrill ! * toplev.c (wrapup_global_declarations): Clarify variable handling. ! -fkeep-static-consts doesn't apply to comdats. ! 2002-03-14 Richard Henderson ! PR target/5312 ! * config/ia64/ia64.c: Include tm_p.h last. ! (gen_nop_type): Remove duplicate definition. ! (cycle_end_fill_slots): Set sched_data for second L slot. ! (maybe_rotate): Call cycle_end_fill_slots to fill in nop slots. ! (nop_cycles_until): Fix typos. ! 2002-03-15 Jakub Jelinek ! PR optimization/5891 ! * unroll.c (copy_loop_body) [CALL_INSN]: Copy SIBLING_CALL_P flag. ! 2002-03-14 David Mosberger , Hans Boehm ! * config/ia64/unwind-ia64.c: Handle copy_state and label_state ! descriptors correctly. ! 2002-03-14 Zack Weinberg ! * cpphash.h (struct lexer_state): Remove line_extension member. ! * cpplib.c (dequote_string, do_linemarker): New functions. ! (linemarker_dir): New data object. ! (DIRECTIVE_TABLE): No longer need to interpret #line in ! preprocessed source. Delete obsolete comment about return ! values of handlers. ! (end_directive, directive_diagnostics, _cpp_handle_directive): ! Don't muck with line_extension. ! (directive_diagnostics): No need to issue warnings for ! linemarkers here. ! (_cpp_handle_directive): Issue warnings for linemarkers here, ! when appropriate. Dispatch linemarkers to do_linemarker, not ! do_line. ! (do_line): Code to handle linemarkers split out to do_linemarker. ! Convert escape sequences in filename argument, both places. ! * cppmacro.c (quote_string): Rename cpp_quote_string and ! export. All callers changed. ! * cpplib.h (cpp_quote_string): Prototype. ! * cppmain.c (print_line): Call cpp_quote_string on to_file ! before printing it. ! * doc/cpp.texi: Document that escapes are now interpreted in ! #line and in linemarkers, and that non-printing characters are ! converted to octal escapes when linemarkers are generated. ! 2002-03-14 Richard Earnshaw ! Jeroen Dobbelaere ! PR target/5828 ! * arm.c (arm_output_epilogue): Fix floating-point register save ! adjustment when using a frame pointer. ! 2002-03-13 Hans-Peter Nilsson ! * config/mmix/mmix.c: Improve comments. ! (mmix_target_asm_function_prologue): Drop variable ! empty_stack_frame. Don't allocate unused slot above fp. ! (mmix_target_asm_function_epilogue): Mirror prologue changes. ! (mmix_expand_builtin_va_arg): Do all computations on trees. ! * config/mmix/mmix.h (MMIX_GNU_ABI_REG_ALLOC_ORDER): Don't have ! brace in first column. ! (enum reg_class): Ditto. ! (FIRST_PARM_OFFSET): Now 0. ! (USER_LABEL_PREFIX): Remove #if 0:d definition. ! (LINK_SPEC): Don't defsym __.MMIX.start..text if linking ! relocatably. Always produce ELF, not mmo if linking relocatably. ! 2002-03-13 David Edelsohn ! * config/rs6000/rs6000.h (PAD_VARARGS_DOWN): Define. ! * config/rs6000/rs6000.c (rs6000_va_arg): Use ! std_expand_builtin_va_arg if not ABI_V4. ! 2002-03-13 Jakub Jelinek ! PR target/5626 ! * config/sparc/sparc.md (normal_branch, inverted_branch, ! normal_fp_branch, inverted_fp_branch, normal_fpe_branch, ! inverted_fp_branch): Adjust calls to output_cbranch. ! Set length attribute. ! (normal_int_branch_sp64, inverted_int_branch_sp64): Adjust calls to ! output_v9branch. Set length attribute. ! * config/sparc/sparc.c (fcc0_reg_operand, noov_compare64_op): New ! predicates. ! (noov_compare_op): Handle CCX_NOOVmode the same way as CC_NOOVmode. ! (output_cbranch): Likewise. Handle far branches. ! (output_v9branch): Handle far branches. ! * config/sparc/sparc-protos.h (output_cbranch, output_v9branch): ! Adjust prototypes. ! * config/sparc/sparc.h (PREDICATE_CODES): Add fcc0_reg_operand and ! noov_compare64_op predicates. ! 2002-03-13 Jason Merrill ! * gthr-posix.h (__gthread_active_p): Move __gthread_active_ptr ! into the function and constify it. ! * gthr-dce.h, gthr-solaris.h: Likewise. ! 2002-03-12 Hans-Peter Nilsson ! * config/cris/cris.c (cris_print_operand): Avoid ! traditional-warning for 0xffffffff. ! (cris_expand_builtin_va_arg): Do all computations on trees. ! 2002-03-13 Ulrich Weigand ! * expr.c (expand_expr, case NE_EXPR): Do not call copy_to_reg with ! VOIDmode operand. Add compile-time optimization for constant results. ! 2002-03-13 Hartmut Penner ! * config/s390/s390.h (PROFILE_BEFORE_PROLOGUE): Emit profile code ! before prologue, to avoid scheduling problems. ! 2002-03-13 Jakub Jelinek ! * config/sparc/sparc.h (INITIAL_FRAME_POINTER_OFFSET): Remove. ! (ELIMINABLE_REGS): Add sfp->sp. ! (INITIAL_ELIMINATION_OFFSET): Compute sfp->sp offset too. ! 2002-03-13 Jakub Jelinek ! PR optimization/5892 ! * config/ia64/ia64.c (rotate_one_bundle): Update current packet. ! 2002-03-13 Jakub Jelinek ! * loop.c (basic_induction_var): Don't call convert_modes if mode ! classes are different. ! 2002-03-12 Richard Henderson ! PR optimization/5901 ! * function.c (reposition_prologue_and_epilogue_notes): Position ! the markers after/before the last/first insn not deleted. ! 2002-03-12 Richard Henderson ! PR optimization/5878 ! * config/arc/arc.h, config/cris/cris.h, config/i386/i386.h, ! config/m68k/m68k.h, config/s390/s390.h, config/sparc/sparc.h ! (PIC_OFFSET_TABLE_REGNUM): Conditionalize on flag_pic. ! * config/arm/arm.h config/i386/i386.h, config/m68k/m68k.h, ! config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Set ! PIC_OFFSET_TABLE_REGNUM based on INVALID_REGNUM not flag_pic. ! * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): New. ! * config/arm/arm.c (arm_pic_register): Init to INVALID_REGNUM. ! (arm_override_options): Set arm_pic_register if TARGET_APCS_STACK ! also. Don't set it if not flag_pic. ! * config/i386/i386.c (ix86_save_reg): Trust PIC_OFFSET_TABLE_REGNUM ! to be INVALID_REGNUM when not used. ! 2002-03-13 Aldy Hernandez ! * expmed.c (store_bit_field): Reset alias set for memory. ! (extract_bit_field): Same. ! 2002-03-12 Chris Meyer ! * genflags.c (gen_insn): Use IS_VSPACE. ! * genoutput.c (output_insn_data): Likewise. ! (process_template): Likewise. ! 2002-03-12 Bob Wilson ! * config/xtensa/xtensa.c (xtensa_expand_block_move): Use ! validize_mem() instead of change_address to avoid clobbering ! memory attributes. ! 2002-03-12 Jakub Jelinek ! * c-lex.c (cb_ident, c_lex): Remove unnecessary cast. ! (lex_string): Use unsigned char pointers. ! 2002-03-12 Ulrich Weigand ! * reload1.c (reload): Ignore MEM REG_EQUIV notes if the equivalent ! is not a valid memory_operand. ! 2002-03-12 Bob Wilson ! * config/xtensa/xtensa-config.h: Define XCHAL_HAVE_LOOPS. ! * config/xtensa/lib1funcs.asm: Fix copyright to include ! special case for libgcc files. ! (__udivsi3): Avoid loop instructions when XCHAL_HAVE_LOOPS is 0. ! (__divsi3): Likewise. ! (__umodsi3): Likewise. ! (__modsi3): Likewise. ! * config/xtensa/lib2funcs.S: Fix copyright to include ! special case for libgcc files. ! 2002-03-12 Michael Matz ! * config/rs6000/rs6000.md (ne0+4): Add extra CLOBBER. ! (ne0+5): Use new clobber to generate proper shift pattern. ! 2002-03-12 Bob Wilson ! * config/xtensa/t-xtensa (CRTSTUFF_T_CFLAGS_S): Define. ! 2002-03-12 Bob Wilson ! * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Switch ! to function_section before writing out the constant pool. ! 2002-03-12 Zack Weinberg ! * Makefile.in: Give texi2pod its input file as a command ! line argument, not on stdin. ! 2002-03-12 Andrew MacLeod ! * config/sparc/sparc.h (RETURN_ADDR_RTX): Include v9 stack bias in ! address calculation. ! 2002-03-12 Ulrich Weigand ! * config/s390/s390.md (reload_insi, reload_indi): Change mode of ! scratch register to DImode / TImode. ! config/s390/s390.c (s390_expand_plus_operand): Make sure scratch ! register used does not overlap the target. ! 2002-03-11 Neil Booth ! * Makefile.in: Update. ! doc: ! * cppenv.texi, cppopts.texi: Split out of cpp.texi and gcc.texi. ! Update documentation. ! * gcc.texi: Include cppopts.texi and cppenv.texi. ! * cpp.texi: Include cppopts.texi and cppenv.texi. ! 2002-03-11 Ulrich Weigand ! * config/s390/s390.h (REG_ALLOC_ORDER): Add missing register. ! 2002-03-11 Douglas B Rupp ! * toplev.c (vms_fopen): Remove, not needed. ! * vmsdbgout.c (lookup_filename): Adjust creation date for GMT. ! * config/alpha/xm-vms.h (__UNIX_FWRITE): Define. ! * config/alpha/alpha.c (alpha_sa_size, VMS): Don't reserve space ! for FP, already done later. ! * toplev.c (debug_args): Add entry for VMS_DEBUG. ! * vmsdbgout.c (vmsdbgout_init): Fix typo in call to xmalloc. ! 2002-03-10 Richard Henderson ! PR 5693 ! * reload.c (copy_replacements_1): New. ! (copy_replacements): Use it to recurse through the rtx. ! 2002-03-10 Richard Henderson ! * sched-rgn.c (add_branch_dependences): Don't allow insns that throw ! to move away from the end of the block. ! 2002-03-10 Neil Booth ! PR preprocessor/5899 ! * cppinit.c (init_dependency_output): Don't ignore -dM etc. ! 2002-03-10 Kaveh R. Ghazi ! * combine.c (make_extraction): Fix error in last change. ! 2002-03-09 Jakub Jelinek ! PR optimization/5172, optimization/5200 ! * gcse.c (gcse_main): Disable store_motion. ! 2002-03-09 Andreas Schwab ! * gcc.c (validate_all_switches): Also handle `%W{...}'. ! 2002-03-09 Jakub Jelinek ! PR middle-end/5877 ! * expr.c (highest_pow2_factor): Check TREE_INT_CST_LOW ! even for non-representable constants. ! Sat Mar 9 07:20:01 2002 Richard Kenner ! * emit-rtl.c (copy_most_rtx): Accept EXPR_LIST for may_share. ! * function.c (fixup_var_refs): Add MAY_SHARE parameter. ! (fixup_var_refs_insns, fixup_var_refs_insns_with_has): Likewise. ! (fixup_var_refs_insn, fixup_var_refs_1): Likewise. ! (pop_function_context): Compute MAY_SHARE parameter for ! fixup_var_refs. ! (fixup_var_refs_1, case MEM): Pass MAY_SHARE to copy_most_rtx, not VAR. ! (gen_mem_addressof): Call fixup_var_refs with new parm. ! * combine.c (make_extraction): Don't make extension of CONST_INT. ! 2002-03-08 Kaveh R. Ghazi ! * sparc.c (arith_4096_operand): Fix error in last change. ! 2002-03-08 Aldy Hernandez ! * config/rs6000/rs6000.c (rs6000_va_arg): Fix alignment for ! vectors. ! 2002-03-08 Aldy Hernandez ! * config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Change for altivec. ! 2002-03-08 Craig Rodrigues ! * doc/install.texi (--with-libiconv-prefix): Document. ! 2002-03-08 Michael Y. Brukman ! * doc/sourcebuild.texi: Fix typo. ! 2002-03-08 Jakub Jelinek ! PR c/3711 ! * builtins.c (std_expand_builtin_va_arg): Do all computations on ! trees. ! Fri Mar 8 06:48:45 2002 Richard Kenner ! * rtl.c (copy_most_rtx): Move from here ... ! * emit-rtl.c (copy_most_rtx): ... to here. ! 2002-03-08 Richard Earnshaw ! * combine.c (simplify_comparison): If simplifying a logical shift ! right and compare with constant, force the comparison to unsigned. ! 2002-03-07 Ulrich Weigand ! * genextract.c (walk_rtx): Recurse into MATCH_PAR_DUP. ! genoutput.c (scan_operands): Recurse into MATCH_PAR_DUP ! and MATCH_OP_DUP. ! 2002-03-07 Aldy Hernandez ! * doc/invoke.texi: Add documentation for -mabi=no-altivec. ! * config/rs6000/rs6000.c (rs6000_parse_abi_options): Add ! -mabi=no-altivec ! (alt_reg_names): Remove % for vrsave. ! 2002-03-06 Jeffrey A Law (law@redhat.com) ! * ssa-ccp.c (ssa_fast_dce): Update the DF def-use chains ! after completing fast dead code elimination. ! 2002-03-06 Richard Henderson ! PR optimization/5844 ! * genemit.c (gen_exp): New argument used. Invoke copy_rtx ! if used indicates we've already emitted one copy of an operand. ! (gen_insn, gen_expand, output_add_clobbers): Supply a null used. ! (gen_split): Supply a non-null used. ! 2002-03-06 Ulrich Weigand ! * simplify-rtx.c (simplify_plus_minus): Do not abort, ! but simply fail if the expression is too complex to simplify. ! (simplify_gen_binary): Handle simplify_plus_minus failures. ! 2002-03-06 Ulrich Weigand ! * reload1.c (reload): Unshare all rtl after reload is done. ! 2002-03-06 Jakub Jelinek ! * ssa-ccp.c (ssa_ccp_substitute_constants): Backout 2002-03-05 ! patch. ! 2002-03-05 Zack Weinberg ! * cppmain.c (setup_callbacks): Disable #pragma and #ident ! callbacks when processing assembly language. ! 2002-03-06 John David Anglin ! * pa.h (ASM_FILE_END): Define. ! * som.h (ASM_FILE_END): Delete. ! * pa.c (function_arg): Don't pass floats in general registers in ! indirect calls if TARGET_ELF32. ! 2002-03-05 Richard Henderson ! * config/i386/i386.md (floatsidf2): Conditionalize on hard-float. ! 2002-03-05 Jakub Jelinek ! * mklibgcc.in: Prepend a tab before .hidden, add $flags to gcc ! -r command line. Don't hide any symbols if not building ! shared libgcc. ! 2002-03-05 Jakub Jelinek ! * expmed.c (emit_store_flag): Don't test BITS_PER_WORD * 2 ! wide volatile memory by parts. ! 2002-03-05 Jakub Jelinek ! * ssa-ccp.c (ssa_ccp_substitute_constants): Don't crash if def ! is NULL. ! 2002-03-05 Richard Henderson ! * config/rs6000/rs6000.h (TOTAL_ALTIVEC_REGS): Fix off-by-one error. ! 2002-03-04 Krister Walfridsson ! * config.gcc (*-*-netbsd*): Add t-slibgcc-elf-ver to tmake_file. ! 2002-03-05 Joseph S. Myers ! * configure.in: Increase required makeinfo version to 4.1. ! * configure: Regenerate. ! 2002-03-04 Joseph S. Myers ! * doc/include/texinfo.tex: Update to version 2002-03-01.06. ! * doc/invoke.texi: Fix @math uses. ! 2002-03-02 Per Bothner ! * gcc.c (option_map): Suport new --bootclasspath option. ! --CLASSPATH is now just an alias for --classpath. ! Sat Mar 2 06:30:14 2002 Richard Kenner ! * config/sparc/sparc.c (sparc_initialize_trampoline): Use ! trunc_int_for_mode. ! * emit-rtl.c (offset_address): Call update_temp_slot_address. ! 2002-03-01 Richard Henderson ! * config/ia64/ia64.c (ia64_initial_elimination_offset): Do not ! adjust argument_pointer by pretend_args_size. ! (ia64_va_start): Adjust va_start address by -pretend_args_size. ! 2002-03-01 Zack Weinberg ! * doc/cpp.texi: Clarify documentation of relationship between ! #line and #include. ! 2002-02-28 Richard Henderson ! * expmed.c (store_bit_field): Prevent generation of CONCATs; ! pun complex values as integers; use gen_lowpart instead of ! gen_rtx_SUBREG. ! (extract_bit_field): Likewise. ! 2002-02-28 David O'Brien ! * config.gcc (sparc64-*-freebsd): Explicitly accept a cpu specification ! of "ultrasparc". ! * config/sparc/freebsd.h: Do not use MASK_FASTER_STRUCTS. It appears ! to be broken. ! 2002-02-28 Alexandre Oliva ! * gcc.c (init_gcc_specs): Get -static and -static-libgcc to ! override -shared and -shared-libgcc. ! 2002-02-28 Andrew MacLeod ! * dwarf2out.c (stack_adjust_offset): Add support for POST_INC, ! POST_DEC, and POST_MODIFY. ! 2002-02-28 Joseph S. Myers ! * doc/invoke.texi, doc/standards.texi: Link to ! gcc-3.1/c99status.html. ! 2002-02-28 Richard Henderson ! * config/ia64/ia64.c (ia64_adjust_cost): All non-MM consumers have ! 4 cycle latency from MM producers. ! (ia64_internal_sched_reorder): Likewise with pipeline flush. ! 2002-02-28 Jakub Jelinek ! * mklibgcc.in: Don't use GNU make extension. ! 2002-02-28 Richard Henderson ! * haifa-sched.c (sched_emit_insn): New. ! (schedule_block): Use last_scheduled_insn to track last insn. ! * sched-int.h (sched_emit_insn): Prototype. ! * config/ia64/ia64.c (last_issued): Remove. ! (ia64_variable_issue): Don't set it. ! (nop_cycles_until): Use sched_emit_insn. ! 2002-02-28 Bo Thorsen ! * config/i386/linux64.h (LINK_SPEC): Fix 32/64 bit compilation. ! (STARTFILE_SPEC): Add 64 bit files. ! (ENDFILE_SPEC): Likewise. ! Don Feb 28 16:41:19 CET 2002 Jan Hubicka ! * cfgrtl.c (purge_dead_edges): Fix handling of EH edges. ! * i386.h (CONDITIONAL_REGISTER_USAGE): Do not write to ! PIC_OFFSET_TABLE_REGNUM when it is INVALID_REGNUM ! * x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Always define. ! 2002-02-28 David Edelsohn ! * config/rs6000/aix43.h (THREAD_MODEL_SPEC): Delete. ! * config/rs6000/aix51.h (THREAD_MODEL_SPEC): Delete. ! 2002-02-28 Alan Modra ! * config/rs6000/rs6000.md (load_toc_aix_di): Handle TARGET_RELOCATABLE. ! 2002-02-28 Jason Merrill ! * c-decl.c (finish_function): Only warn about missing return ! statement with -Wreturn-type. ! 2002-02-27 Zack Weinberg ! * mklibgcc.in: Don't use \n in a line subject to ! interpretation by echo. ! 2002-02-27 Ulrich Weigand ! * config/s390/s390.c (s390_chunkify_pool): Do not confuse ! insn UIDs with insn addresses. ! 2002-02-27 Graham Stott ! * config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECL): ! Constify NAME. ! * loop.c (prescan_loop): Handle PARALLEL. ! * unroll.c (loop_iterations): Return 0 if the add_val for ! a BIV is REG. ! * final.c (output_operand_lossage): Constify PFX_STR. ! * df.c (df_insn_refs_record): Use XEXP (x, 0) for USE. ! 2002-02-26 Richard Henderson ! * config/alpha/alpha.md (ashldi_se): Re-enable. ! 2002-02-26 Kelley Cook ! * config/i386/i386.c (print_operand): Don't append ATT-style ! length suffixs to x87 opcodes when in Intel mode. ! 2002-02-26 Ryan T. Sammartino ! * emit-rtl.c (gen_const_vector_0): Remove TYPE argument. ! (init_emit_once): Update calls. ! * fixinc/gnu-regex.c (_GNU_SOURCE): Remove. ! (init_syntax_once): Prototype. ! 2002-02-26 John David Anglin ! * pa-linux.h (LIB_SPEC): Update definition. ! * pa32-linux.h (LINK_COMMAND_SPEC): Delete. ! 2002-02-26 Alexandre Oliva ! * dwarf2out.c (gen_inlined_subroutine_die): If block is abstract, ! generate a die for the lexical block. ! 2002-02-26 Richard Henderson ! * expr.c (expand_expr) [MULT_EXPR]: Do not apply distributive law ! in EXPAND_SUM case. Use host_integerp/tree_low_cst. ! 2002-02-26 Richard Henderson ! * config/ia64/ia64.c (nop_cycles_until): Do init_insn_group_barriers ! if we emitted a stop bit. ! 2002-02-26 Jakub Jelinek ! * configure.in (libgcc_visibility): Substitute. ! * configure: Rebuilt. ! * mklibgcc.in: If libgcc_visibility = yes, make libgcc.a global ! defined symbols .hidden. ! 2002-02-26 Jakub Jelinek ! PR debug/5770 ! * dwarf2out.c (rtl_for_decl_location): Return CONST_STRING for ! STRING_CST initializer spanning the whole variable without ! embedded zeros. ! If expand_expr returned MEM, don't use it. ! 2002-02-25 Jakub Jelinek ! PR target/5755 ! * config/i386/i386.c (ix86_return_pops_args): Only pop ! fake structure return argument if it was passed on the stack. ! 2002-02-25 Jason Merrill ! * attribs.c (decl_attributes): Also re-layout PARM_DECL and ! RESULT_DECL. ! 2002-02-25 Alexandre Oliva ! * gcc.c (init_gcc_specs): Get -shared-libgcc along with -shared to ! link with shared_name only. ! * doc/invoke.texi (Link Options): Document new behavior. ! 2002-02-25 Aldy Hernandez ! * c-typeck.c (push_init_level): Handle vectors. ! 2002-02-25 Alexandre Oliva ! * config/sparc/sparc.c (const64_high_operand): Zero-extend ! operands of SPARC_SETHI_P. ! (input_operand): Likewise. ! (sparc_emit_set_const32): Likewise. ! * config/sparc/sparc.h (SPARC_SETHI_P): Disregard TARGET_ARCH64. ! (SPARC_SETHI32_P): Zero-extend operand from 32 bits. ! (CONST_OK_FOR_LETTER_P): Use SETHI32 for `K'. Add `N' as SETHI. ! * config/sparc/sparc.md (movdi_insn_sp64_novis): Use `N'. ! (movdi_insn_sp64_vis): Likewise. ! (movdi split, movdf split): Use SETHI32. ! * doc/md.texi: Document SPARC constraints L, M and N. ! 2002-02-25 Aldy Hernandez ! * config/rs6000/rs6000.md ("get_vrsave_internal"): New. ! ("*set_vrsave_internal"): use mfspr for Darwin. ! * config/rs6000/rs6000.c (rs6000_emit_prologue): Call ! gen_get_vrsave_internal. ! Sun Feb 24 16:38:56 2002 Richard Kenner ! * optabs.c (widen_operand): Properly handle CONST_INT for NO_EXTEND. ! 2002-02-24 Neil Booth ! * cpplex.c (cpp_interpret_charconst): Get signedness or ! otherwise of wide character constants correct. ! * cppexp.c (lex): Get signedness of wide charconsts correct. ! Sun Feb 24 07:41:31 2002 Richard Kenner ! * optabs.c (widen_operand): Only call convert_modes for ! promoted SUBREG if signedness matches. ! * config/alpha/alpha.md (*addsi_se2, *subsi_se2): New patterns. ! 2002-02-23 Neil Booth ! * cpplib.c (glue_header_name): Use local buffer to build up ! header name. ! 2002-02-23 Neil Booth ! * doc/cpp.texi, doc/invoke.texi: Update documentation for -MM. ! 2002-02-23 Kazu Hirata ! * config/h8300/h8300.c (output_simode_bld): Handle H8/300 and ! H8/300[HS] separately. ! * config/h8300/h8300.md: Remove the early clobber constraint ! from bit field patterns. ! 2002-02-23 Kazu Hirata ! * config/h8300/h8300.md (mulqihi3): Tighten predicates to ! register_operand. ! (mulhisi3): Likewise. ! (umulqisi3): Likewise. ! (umulhisi3): Likewise. ! 2002-02-23 Neil Booth ! * cppinit.c (output_deps): Correct test for stdout output. ! (init_dependency_output): Cure warning. ! Sat Feb 23 08:42:47 2002 Richard Kenner ! * expr.c (store_expr): When converting expression to promoted ! equivalent type, allow using SUBREG_REG of TARGET as the target ! of the expansion of EXP. ! * loop.c (basic_induction_var, case SUBREG): Always look inside. ! * config/alpha/alpha.c (rtx_equiv_function_matters): Delete decl. ! (alpha_emit_set_const): Handle SImode when can't make new pseudos. ! (alpha_emit_set_const_1, alpha_sa_mask): Use no_new_pseudos. ! * config/alpha/alpha.md (addsi3, subsi3): Don't use if optimizing. ! 2002-02-23 Joseph S. Myers ! * doc/contribute.texi, doc/extend.texi, doc/install.texi, ! doc/invoke.texi, doc/md.texi, doc/passes.texi, doc/rtl.texi, ! doc/standards.texi, doc/tm.texi: Remove trailing whitespace. ! 2002-02-23 Jakub Jelinek ! PR optimization/5747 ! * loop.c (scan_loop): Update reg info if move_movables created new ! pseudos. ! 2002-02-23 David Edelsohn ! * gcc.c (init_gcc_spec): Revert last change. ! 2002-02-23 David Edelsohn ! * config/rs6000/rs6000.md (load_toc_aix_{si,di}): Use ! gpc_reg_operand constraint. ! 2002-02-23 Alan Modra ! * config/rs6000/rs6000.c (num_insns_constant): Fix formatting. ! Simplify comparison of `low'. ! (add_operand): Fix formatting. ! (non_add_cint_operand): Use CONST_OK_FOR_LETTER_P. ! (mask_operand): Disallow mask to wrap in 64-bit mode. ! (rs6000_stack_info): Remove redundant test setting push_p. ! (output_toc): Fix formatting. ! * config/rs6000/rs6000.md (boolsi3, boolcsi3 splitters): Use ! cc_reg_not_cr0_operand constraint. ! (booldi3, boolcdi3 splitters): Same. ! 2002-02-23 Aldy Hernandez ! * config/rs6000/altivec.h: Add extra level of parentheses on casts. ! 2002-02-22 David Edelsohn ! * gcc.c (init_gcc_spec): Do not link with static libgcc.a if ! gcc invoked with -shared-libgcc. ! 2002-02-22 Jakub Jelinek ! PR c++/5748 ! * stmt.c (expand_anon_union_decl): Set TREE_USED on the anon union ! decl if any of elements was TREE_USED. ! 2002-02-22 Alexandre Oliva ! * config/sparc/sol2.h: Don't include sys/mman.h. ! * config/sparc/sparc.c (arith_operand): Use SMALL_INT32. ! (arith_4096_operand): Don't throw high bits away. ! (const64_operand): Take sign extension of CONST_INTs into account. ! (const64_high_operand, sparc_emit_set_const32): Likewise. ! (GEN_HIGHINT64): Likewise. ! (sparc_emit_set_const64_quick1): Likewise. ! (const64_is_2insns): Likewise. ! (print_operand): Use trunc_int_for_mode for sign extension. ! * config/sparc/sparc.h (SMALL_INT32): Likewise. ! * config/sparc/sparc.md (movqi): Sign-extend CONST_DOUBLE ! chars. Assume CONST_INT is already properly sign-extended. ! (movdi split): Sign-extend each SImode part. ! (andsi3 split): Don't mask high bits off, so that result ! remains properly sign-extend. ! (iorsi3 split): Likewise. ! (xorsi3 split): Likewise. ! 2002-02-22 Richard Sandiford ! * fold-const.c (fold): Fix typo in comments. ! 2002-02-21 Diego Novillo ! * Makefile.in (langhooks.o): Update dependencies. ! 2002-02-21 Diego Novillo ! * langhooks.c: Include flags.h. ! 2002-02-21 Aldy Hernandez ! * testsuite/gcc.dg/attr-alwaysinline.c: New. ! * c-common.c (c_common_post_options): Set inline trees by ! default. ! * doc/extend.texi (Function Attributes): Document always_inline ! attribute. ! Update documentation about inlining when not optimizing. ! * cp/decl.c (duplicate_decls): Merge always_inline attribute. ! * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 ! unless DECL_ALWAYS_INLINE. ! * c-objc-common.c (c_cannot_inline_tree_fn): Do not inline at -O0 ! unless DECL_ALWAYS_INLINE. ! (c_disregard_inline_limits): Disregard if always_inline set. ! * langhooks.c (lhd_tree_inlining_disregard_inline_limits): ! Disregard if always_inline set. ! (lhd_tree_inlining_cannot_inline_tree_fn): Do not inline at -O0 ! unless DECL_ALWAYS_INLINE. ! * attribs.c (handle_always_inline_attribute): New. ! (c_common_attribute_table): Add always_inline. ! * config/rs6000/altivec.h: Add prototypes for builtins ! requiring the always_inline attribute. ! 2002-02-21 Eric Christopher ! * expmed.c (store_bit_field): Try to simplify the subreg ! before generating a new one when when the mode size of ! value is less than maxmode. ! 2002-02-21 Richard Henderson ! * emit-rtl.c (offset_address): Use simplify_gen_binary rather ! than gen_rtx_PLUS to form the sum. ! * explow.c (force_reg): Rearrange to not allocate new pseudo ! when force_operand returns a register. ! * expr.c (expand_assignment): Allow offset_rtx expansion to ! return a sum. Do not force addresses into registers. ! (expand_expr): Likewise. ! * simplify-rtx.c (simplify_gen_binary): Use simplify_plus_minus ! to canonicalize arithmetic that didn't simpify. ! (simplify_plus_minus): New argument force; update ! all callers. Don't split CONST unless we can do something with it, ! and wouldn't lose the constness of the operands. ! * config/i386/i386.c (legitimize_pic_address): Recognize UNSPECs ! that we generated earlier. ! 2002-02-21 Tom Tromey ! * dwarf2out.c (DWARF_LINE_MIN_INSTR_LENGTH): Removed. ! (output_line_info): Use constant `1', with a long explanatory ! comment. ! * system.h (DWARF_LINE_MIN_INSTR_LENGTH): Poison. ! Thu Feb 21 22:43:44 2002 J"orn Rennecke ! * jump.c (redirect_jump): If old label has no UID, don't try to ! delete it. ! Thu Feb 21 21:17:21 2002 J"orn Rennecke ! * sh.md (insv): Provide byte offsets for gen_rtx_SUBREG. ! If input is constant, do shifts at compile time. ! 2002-02-21 Joseph S. Myers ! * doc/extend.texi: Fix some more overfull hboxes. ! 2002-02-21 Jakub Jelinek ! PR optimization/4994 ! * config/i386/i386.md (movsi_1, movsf_1): Support MMX -> MMX ! register moves. ! 2002-02-21 Jakub Jelinek ! PR c++/4574 ! * expr.h (expand_and): Add mode argument. ! * expmed.c (expand_and): Add mode argument. ! (expand_mult_highpart_adjust, emit_store_flag): Adjust callers. ! * expr.c (store_field, expand_expr, do_store_flag): Likewise. ! * except.c (expand_builtin_extract_return_addr): Likewise. ! * config/alpha/alpha.c (alpha_initialize_trampoline): Likewise. ! * config/sparc/sparc.c (sparc_initialize_trampoline): Likewise. ! * config/c4x/c4x.h (INITIALIZE_TRAMPOLINE): Likewise. ! Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x). ! * config/c4x/c4x.md: Use GEN_INT (x) instead of ! gen_rtx (CONST_INT, VOIDmode, x). ! 2002-02-21 Jakub Jelinek ! PR c/4697: ! * stmt.c (warn_if_unused_value): Move side effects test once more. ! 2002-02-20 Torbjorn Granlund ! * config/avr/avr.md: Add more patterns for mized-mode add and subtract ! (addsi3_zero_extend, subhi3_zero_extend1, subsi3_zero_extend). ! Thu Feb 21 16:20:46 2002 Alexandre Oliva ! * rtlanal.c (replace_rtx): Don't make a CONST_INT the operand of ! SUBREG or ZERO_EXTEND. ! Thu Feb 21 15:35:46 2002 J"orn Rennecke ! * sh.h (current_function_anonymous_args): Remove. ! (SETUP_INCOMING_VARARGS): Don't set it - just check that one ! of current_function_varargs and current_function_stdarg is set. ! * sh.c (sh_expand_prologue): Check current_function_varargs / ! current_function_stdarg / TARGET_SH5 instead of ! current_function_anonymous_args. ! * sh64.h (TARGET_VERSION): Define. ! 2002-02-20 David Edelsohn ! * config/rs6000/rs6000.h (EPILOGUE_USES): Conditionalize ! VRSAVE_REGNO on TARGET_ALTIVEC. ! 2002-02-20 Alan Modra ! * config/rs6000/rs6000.c (includes_lshift_p): Mask irrelevant ! bits of SImode const_int. ! (includes_rshift_p): Likewise. ! (print_operand): Call mask_operand and mask64_operand with correct ! mode. ! (rs6000_output_function_epilogue): Pad traceback table to word. ! * config/rs6000/rs6000.h (MASK_64BIT): Correct comment. ! (EXTRA_CONSTRAINT, 'S' and 'T'): Call mask_operand and ! mask64_operand with correct mode. ! (FUNCTION_ARG_REGNO_P): Correct parentheses. ! 2002-02-20 Jakub Jelinek ! PR debug/4461 ! * varasm.c (get_pool_constant_mark): New. ! * rtl.h (get_pool_constant_mark): Add prototype. ! * dwarf2out.c (mem_loc_descriptor): A pool constant cannot ! be represented if it has not been output. ! 2002-02-20 Alexandre Oliva ! * combine.c (do_SUBST): Sanity check substitutions of ! CONST_INTs, and reject them in SUBREGs and ZERO_EXTENDs. ! (subst): Simplify SUBREG or ZERO_EXTEND instead of SUBSTing a ! CONST_INT into its operand. ! (known_cond): Likewise, for ZERO_EXTEND. ! * simplify-rtx.c (simplify_unary_operation): Fix condition to ! allow for simplification of wide modes. Reject CONST_INTs in ! ZERO_EXTEND when their actual mode is not given. ! 2002-02-20 Alexandre Oliva ! * c-decl.c (pushdecl): If no global declaration is found for an ! extern declaration in block scope, try a limbo one. ! 2002-02-20 Jakub Jelinek ! PR c++/4401 ! * c-common.c (pointer_int_sum): Moved from... ! * c-typeck.c (pointer_int_sum): ...here. ! * c-common.h (pointer_int_sum): Add prototype. ! 2002-02-20 Jakub Jelinek ! PR c++/5713 ! * c-decl.c (duplicate_decls): Return 0 if issued error about ! redeclaration. ! 2002-02-20 Roger Sayle ! Jakub Jelinek ! PR c/4389 ! * tree.c (host_integerp): Ensure that the constant integer is ! representable in a HOST_WIDE_INT or an unsigned HOST_WIDE_INT ! when pos is zero or non-zero respectively. Clarify comment. ! * c-format.c (check_format_info_recurse): Fix host_integerp ! usage; the pos argument should be zero when assigning to a ! signed HOST_WIDE_INT. ! 2002-02-20 Richard Henderson ! * config/i386/i386.c (ix86_expand_vector_move): Use the mode ! of the operand, rather than assuming TImode. ! (ix86_expand_binop_builtin): Cope with commutative patterns ! using nonimmediate_operand for both operands. ! (ix86_expand_timode_binop_builtin): Likewise. ! (ix86_expand_store_builtin): Validate operand 1. ! (ix86_expand_unop1_builtin): Likewise. ! 2002-02-20 Philip Blundell ! PR 5705 ! * config/arm/arm.h (HARD_REGNO_RENAME_OK): New macro. ! 2002-02-20 Richard Henderson ! PR c/5615 ! * expr.h (ARGS_SIZE_TREE): Convert size.var to ssizetype. ! 2002-02-20 Tom Tromey ! * config/fr30/fr30.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. ! * config/sh/sh.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. ! * config/pj/pj.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. ! * config/cris/cris.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. ! * dwarf2out.c (DWARF_LINE_MIN_INSTR_LENGTH): Define ! unconditionally. ! Wed Feb 20 00:03:25 EST 2002 Alan Matsuoka ! * config/rs6000/rs6000.h (LEGITIMATE_OFFSET_ADDRESS_P): Look ! for (const_int 0) in X not just INTVAL. ! 2002-02-20 Joseph S. Myers ! * doc/extend.texi: Avoid or reduce overfull hboxes. ! 2002-02-20 Diego Novillo ! * expmed.c (store_bit_field): Do not store bit fields using SUBREG ! operations if the field does not start at a mode boundary. ! 2001-02-20 Joel Sherrill ! * config/a29k/rtems.h, config/arm/rtems-elf.h, config/h8300/rtems.h, ! config/mips/rtems.h: Use new style of -Asystem= rather than -Asystem(). ! Also done for -Acpu and -Amachine. ! 2002-02-20 Neil Booth ! * cppinit.c (init_dependency_output): Take deps output file ! from -o if none given with -MF. Suppress normal output. ! * gcc.c (cpp_unique_options): Have -M and -MM imply -E. ! * doc/cpp.texi, doc/invoke.texi: Update. ! 2002-02-19 Zack Weinberg ! * toplev.c (output_quoted_string): Write unprintable ! characters with octal escapes. ! 2002-02-19 David Edelsohn ! * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set ! really_call_used[VRSAVE_REGNO] if not Altivec. ! 2002-02-19 Alan Modra ! * config/rs6000/rs6000.c (u_short_cint_operand): Mask op with ! MODE_MASK. ! (constant_pool_expr_1): Fix formatting. ! (rs6000_legitimize_reload_address): Likewise. ! Tue Feb 19 20:13:57 2002 Richard Kenner ! * config/sparc/sparc.md (nonlocal_goto): Use hard_frame_pointer_rtx ! now that we have one. ! 2002-02-19 Zack Weinberg ! * tree.h (struct tree_common): Remove aux. Add unused_0 at ! end of first block of bitfields (which was only seven bits); ! rename dummy to unused_1; remove comment which is no longer true. ! 2002-02-19 Gaute B Strokkenes ! * doc/c-tree.texi (Classes, TYPE_BINFO): Fix typo. ! 2002-02-19 Philip Blundell ! PR 5399 ! * config/arm/arm.h (THUMB_LEGITIMATE_CONSTANT_P): Accept anything ! if generating PIC. ! PR 5054 ! * config/arm/arm.md (call_insn) [TARGET_THUMB]: Use ! arm_is_longcall_p rather than inspecting call-type cookie ! directly. ! (call_value_insn) [TARGET_THUMB]: Likewise. ! 2002-02-19 Graham Stott ! * config/i386/i386.c (ix86_expand_builtin): Fix typo. ! 2002-02-19 David Edelsohn ! * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC): Look in /lib64. ! ({STARTFILE,ENDFILE}_LINUX_SPEC): Define. ! (FP_SAVE_INLINE): Delete. ! * config/rs6000/sysv4.h (ENDFILE_SPEC): Add crtsaveres.o. ! * config/rs6000/eabi.asm: Remove ABI save restore routines. ! * config/rs6000/t-ppccomm: Build crtsavres.o. ! * config/rs6000/crtsavres.asm: New file. ! 2002-02-19 Philip Blundell ! * config/arm/arm.c (use_return_insn): Don't reject interrupt ! functions. ! (arm_compute_save_reg_mask): Save LR for interrupt functions too. ! (output_return_instruction): Allow interrupt functions to return with ! ldmfd sp!, {... pc}^. Use LDR to restore any single register. ! (arm_expand_prologue): Subtract 4 before stacking LR in an ! interrupt function. ! 2002-02-19 Philip Blundell ! * config/arm/arm.c (arm_encode_call_attribute): Operate on any ! decl, not just FUNCTION_DECL. ! (legitimize_pic_address): Handle local SYMBOL_REF like LABEL_REF. ! (arm_assemble_integer): Likewise. ! * config/arm/arm.h (ARM_ENCODE_CALL_TYPE): Allow any decl to be ! marked local. ! 2002-02-19 matthew green ! * config.gcc (sparc-*-netbsdelf*): Enable target. ! (sparc64-*-netbsd*): New target. ! * config/sparc/netbsd-elf.h: New file. ! * config/sparc/t-netbsd64: New file. ! 2002-02-19 Gaute B Strokkenes ! * doc/rtl.texi (Flags, MEM_SCALAR_P): Fix typo. ! 2002-02-19 Ryan T. Sammartino ! * doc/invoke.texi: explicitly list the style guidelines that ! -Weffc++ checks for. ! Tue Feb 19 12:37:23 CET 2002 Jan Hubicka ! * regmove.c (regmove_optimize): Avoid increasing of register pressure. ! 2002-02-19 Neil Booth ! PR other/5718 ! * gcc.c (cpp_unique_options): Treat -o as indicating object file ! only if not -E. If -E, pass -o through to the preprocessor. ! 2002-02-19 Kazu Hirata ! * config/h8300/h8300.h (REGNO_REG_CLASS): Replace a literal ! register number with an appropriate macro. ! 2002-02-19 Bryce McKinlay ! * doc/rtl.texi (Constants): Close @code tag. ! 2002-02-19 Aldy Hernandez ! * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ! ("mmx_uavgv4hi3"): Same. ! ("pmulhrwv4hi3"): Same. ! * tree-inline.c (walk_tree): Handle vectors. ! * c-common.c (constant_expression_warning): Handle vectors. ! (overflow_warning): Same. ! * sched-deps.c (sched_analyze_2): Handle vectors. ! * rtlanal.c (rtx_unstable_p): Handle vectors. ! (rtx_varies_p): Same. ! (count_occurrences): Same. ! (regs_set_between_p): Same. ! (modified_between_p): Same. ! (modified_in_p): Same. ! (volatile_insn_p): Same. ! (volatile_refs_p): Same. ! (side_effects_p): Same. ! (may_trap_p): Same. ! (inequality_comparisons_p): Same. ! (replace_regs): Same. ! (computed_jump_p_1): Same. ! * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th ! argument. ! (inner_mode_array): New. ! (copy_rtx): Handle vectors. ! (copy_most_rtx): Same. ! (rtx_equal_p): Same. ! (get_mode_alignment): Adjust for vectors. ! * resource.c (mark_referenced_resources): Handle vectors. ! (mark_set_resources): Same. ! * reload1.c (eliminate_regs): Handle vectors. ! (elimination_effects): Same. ! (scan_paradoxical_subregs): Same. ! * reload.c (subst_reg_equivs): Handle vectors. ! * regrename.c (scan_rtx): Handle vectors. ! * regclass.c (reg_scan_mark_refs): Handle vectors. ! * recog.c (find_single_use_1): Handle vectors. ! * local-alloc.c (equiv_init_varies_p): Handle vectors. ! (contains_replace_regs): Same. ! (memref_referenced_p): Same. ! * integrate.c (copy_rtx_and_substitute): Handle vectors. ! (subst_constants): Same. ! * genattrtab.c (attr_copy_rtx): Handle vectors. ! (encode_units_mask): Same. ! (clear_struct_flag): Same. ! (count_sub_rtxs): Same. ! * gcse.c (want_to_gcse_p): Handle vectors. ! (oprs_unchanged_p): Same. ! (hash_expr_1): Same. ! (oprs_not_set_p): Same. ! (expr_killed_p): Same. ! (compute_transp): Same. ! (store_ops_ok): Same. ! * function.c (purge_addressof_1): Do not allow paradoxical subregs ! of vectors. ! (fixup_var_refs_1): Same. ! (instantiate_virtual_regs_1): Same. ! * fold-const.c (operand_equal_p): Handle vectors. ! (fold): Same. ! (rtl_expr_nonnegative_p): Same. ! * flow.c (mark_used_regs): Handle vectors. ! * df.c (df_uses_record): Handle vectors. ! * cselib.c (cselib_subst_to_values): Handle vectors. ! (cselib_mem_conflict_p): Same. ! (hash_rtx): Same. ! * cse.c (canon_reg): Handle vectors. ! (fold_rt): Same. ! (cse_process_notes): Same. ! (count_reg_usage): Same. ! (canon_hash): Same. ! * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. ! * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. ! * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. ! (gen_rtx): Handle CONST_VECTOR. ! (gen_const_vector_0): New. ! (copy_rtx_if_shared): CONST_VECTORs can be shared. ! (reset_used_flags): Same. ! (copy_insn_1): Same. ! (initializer_constant_valid_p): Handle VECTOR_CST. ! * doc/c-tree.texi (Expression trees): Document VECTOR_CST. ! * doc/rtl.texi (Constants): Document const_vector. ! (CONST0_RTX): Update for vectors. ! (RTL sharing): Same. ! * print-tree.c (print_node): Add case for VECTOR_CST. ! * tree.h (TREE_VECTOR_CST_ELTS): New. ! (struct tree_vector): New. ! (union tree_node): Add vector node. ! (build_vector): Add prototype. ! * tree.def (VECTOR_CST): New. ! * tree.c (build_vector): New. ! * expmed.c (make_tree): Handle CONST_VECTOR. ! * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. ! (CONST_VECTOR_ELT): New. ! (CONST_VECTOR_NUNITS): New. ! * machmode.h (GET_MODE_INNER): New. ! (DEF_MACHMODE): Accept 8th arg. ! * machmode.def: Add 8th argument for vector inner mode. ! Add inner vector modes for vectors. ! * rtl.def (VEC_CONST): Remove. ! (CONST_VECTOR): New. ! * expr.c (clear_storage): Allow vectors. ! (is_zeros_p): Handle VECTOR_CST. ! * varasm.c (output_constant_pool): Handle vectors. ! (rtx_const): Add veclo and vechi fields. ! (kind): Add RTX_VECTOR. ! (decode_rtx_const): Add case for vector. ! * config/rs6000/rs6000-protos.h: Add zero_constant. ! * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector ! constants. Force easy vector constants into memory. ! (easy_vector_constant): New. ! (emit_easy_vector_constant): New. ! (rs6000_legitimize_reload_address): Do not generate bad reloads on ! darwin. ! * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what ! instruction does. ! ("altivec_lvxl"): Same. ! (altivec_lvebx): Same. ! (altivec_lvehx): Same. ! (altivec_lvewx): Same. ! ("*movv4si_const0"): New. ! ("*movv4sf_const0"): New. ! ("*movv8hi_const0"): New. ! ("*movv16qi_const0"): New. ! 2002-02-18 Kazu Hirata ! * config/h8300/h8300.c (notice_update_cc): Use ! cc_status.value2. ! 2002-02-18 Kazu Hirata ! * config/h8300/h8300.md (divmod patterns): Change the ! constraints for operands[1] to register_operand. ! 2002-02-18 Kazu Hirata ! * config/h8300/h8300-protos.h: Remove the prototype for ! p_operand. ! * config/h8300/h8300.c (p_operand): Remove. ! * config/h8300/h8300.md: Replace p_operand with ! const_int_operand. ! 2002-02-18 Philip Blundell ! * config/arm/arm.c (arm_compute_save_reg_mask): Fix typo in ! comment. ! (output_return_instruction): Allow use of LDR to unstack ! return addresss even for interrupt handlers or when ! interworking. If compiling for ARMv5, use interworking-safe ! return instructions by default. Remove duplicated code and ! lengthy "strcat" sequences. ! 2002-02-18 Franz Sirl ! * config/rs6000/sysv4.h (STARTFILE_SPEC): Use crtbeginT.o for -static. ! (LINK_EH_SPEC): Define. ! * config/rs6000/t-ppccomm (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. ! 2002-02-18 Ulrich Weigand ! * config/s390/s390.c (s390_emit_prologue): Do not set the ! frame_related flag for call-clobbered registers. ! Mon Feb 18 15:07:35 CET 2002 Jan Hubicka ! * i386.c (classify_argument): Properly classify SSE/MMX modes and VOIDmode. ! (construct_container): Fix handling of SSE operands. ! (ix86_expand_builtin): Fix handling of 64bit pointers. ! (mmx_maskmovq_rex): New pattern. ! Mon Feb 18 11:55:55 CET 2002 Jan Hubicka ! * regrename.c (kill_set_value): Handle subregs properly. ! 2002-02-18 David Billinghurst ! * objc/objc-act.c (handle_impent): Remove leading '*' ! from objc_class_name. ! 2002-02-17 Richard Henderson ! * config/alpha/alpha.c (some_small_symbolic_operand, ! some_small_symbolic_operand_1, split_small_symbolic_operand, ! split_small_symbolic_operand_1): Rename from *symbolic_mem_op*. ! Handle small SYMBOL_REFs anywhere, not just inside memories. ! * config/alpha/alpha-protos.h: Update. ! * config/alpha/alpha.h (PREDICATE_CODES): Update. ! * config/alpha/alpha.md (small symbolic operand splitter): Update. ! 2002-02-17 Roland McGrath ! * config.gcc (powerpc-*-gnu-gnualtivec*, ! powerpc-*-gnu*, powerpc64-*-gnu*): New configurations. ! * config/rs6000/gnu.h: New file. ! * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): ! Grok "gnu" in rs6000_abi_name. ! (ASM_SPEC, CC1_SPEC, LINK_START_SPEC, LINK_OS_SPEC, ! CPP_ENDIAN_SPEC, CPP_SPEC, STARTFILE_SPEC, LIB_SPEC, ENDFILE_SPEC): ! Grok -mcall-gnu analogous to -mcall-linux et al. ! (LIB_GNU_SPEC, STARTFILE_GNU_SPEC, ENDFILE_GNU_SPEC, ! LINK_START_GNU_SPEC, LINK_OS_GNU_SPEC, CPP_OS_GNU_SPEC): New macros. ! (SUBTARGET_EXTRA_SPECS): Add *_os_gnu specs using them. ! 2002-02-17 Jakub Jelinek ! PR c/3444: ! * c-typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit ! shortening. ! 2002-02-17 Philipp Thomas ! * config/cris/cris.h: Undefine STARTFILE_SPEC and ! ENDFILE_SPEC before (re)defining them. ! 2002-02-17 Kazu Hirata ! * config/h8300/h8300.c: Fix formatting. ! * config/h8300/h8300.h: Likewise. ! 2002-02-17 Philipp Thomas ! * doc/tm.texi: Explain why empty strings should not be ! marked for translation. ! 2002-02-17 Philipp Thomas ! * final.c (output_operand_lossage): Changed to accept ! printf style arguments. Change calls where necessary. ! * output.h (output_operand_lossage): Change declaration ! accordingly. Update copyright. ! * config/arc/arc.c config/fr30/fr30.c config/m32r/m32r.c ! config/m88k/m88k.c : Adapt all calls to output_operand_lossage. ! Update copyright date where necessary. ! * config/i386/i386.c (print_operand): Likewise. Remove use of ! sprintf. ! * config/cris/cris.c (cris_operand_lossage): Likewise. ! Rename parameter so that exgettext recognizes it as ! translatable message. ! (LOSE_AND_RETURN): Rename parameter to msgid. ! 2002-02-17 Kazu Hirata ! * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Replace a ! hard coded register number with an appropriate macro. ! (HARD_REGNO_MODE_OK): Likewise. ! (ARG_POINTER_REGNUM): Likewise. ! (STATIC_CHAIN_REGNUM): Likewise. ! (RETURN_ADDRESS_POINTER_REGNUM): Likewise. ! * config/h8300/h8300.md (define_constants): Define more ! register numbers. ! 2002-02-17 Philipp Thomas ! * config/i386/i386.h: Don't mark empty strings for translation. ! 2002-02-16 H.J. Lu ! * config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): New. ! 2002-02-16 Zack Weinberg ! * cppinit.c (merge_include_chains): Check for brack being ! NULL before attempting to merge it with qtail. ! 2002-02-16 Andrew Cagney ! * config/rs6000/netbsd.h (PREFERRED_DEBUGGING_TYPE): Set to ! DBX_DEBUG. ! 2002-02-16 John David Anglin ! * pa/t-pa, pa/t-pro, som.h: Revert last patch. ! 2002-02-16 John David Anglin ! * pa/t-pa (LIB2FUNCS_EXTRA): Don't build lib2funcs.asm. ! * pa/t-pro (LIB2FUNCS_EXTRA): Likewise. ! * som.h (DO_GLOBAL_DTORS_BODY): Delete define. ! Sat Feb 16 13:48:50 2002 Richard Kenner ! * config/alpha/alpha.md (*movsi_nt_vms_nofix): Was *movsi_nt_vms; ! now only if !TARGET_FIX. ! (*movsi_nt_vms_fix): New pattern. ! 2002-02-16 Douglas B Rupp ! * config/alpha/alpha.c: Implement null frame procedure types on VMS. ! (alpha_procedure_type): Replaces alpha_is_stack_procedure. ! (alpha_sa_mask, alpha_sa_size): Reflect above change. ! (alpha_pv_save_size, alpha_expand_prologue): Likewise. ! (alpha_start_function, alpha_expand_epilogue): Likewise. ! (unicosmk_gen_dsib): Likewise. ! Sat Feb 16 13:39:09 2002 Richard Kenner ! * expr.c (store_constructor): Handle target REG case for ARRAY_TYPE. ! 2002-02-16 Ulrich Weigand ! * config/s390/s390.c (pool_stop_uid, other_chunk, far_away, ! check_and_change_labels, s390_final_chunkify): Delete. ! (s390_split_branches, s390_chunkify_pool): New functions. ! (s390_function_prologue): Call them. ! * config/s390/s390.h (S390_REL_MAX): Delete. ! (S390_CHUNK_MAX, S390_CHUNK_OV): Adjust values. ! * config/s390/s390.md (cjump, icjump, jump): Fix length ! attribute calculation. ! 2002-02-15 David Edelsohn ! * config/rs6000/linux64.h (STRIP_NAME_ENCODING): Delete. ! * config/rs6000/ppc-asm.h (JUMP_TARGET): Define for powerpc64. ! 2002-02-15 John David Anglin ! * gcc.c (init_gcc_specs): Revert patch from 2002-02-15. ! * config/pa/pa-linux.h (LIB_SPEC): Likewise. ! * config/pa/pa32-linux.h (LINK_COMMAND_SPEC): Likewise. ! 2002-02-15 Richard Sandiford ! * c-decl.c (grokdeclarator): Prevent a segfault on unnamed decls. ! 2002-02-15 Richard Sandiford ! * reload.c (find_dummy_reload): Check that an output register ! is valid for its mode. ! 2002-02-14 Alexandre Oliva ! * combine.c (known_cond): After replacing the REG of a SUBREG, try ! to simplify it. ! * function.c (assign_parms): Demote promoted argument passed by ! transparent reference. ! 2001-02-14 Joel Sherrill ! * config/arm/rtems-elf.h, config/h8300/rtems.h: Removed redundant ! -Acpu() and -Amachine() to eliminate warnings. ! 2002-02-14 Ulrich Weigand ! * config/s390/linux.h (ASM_OUTPUT_ALIGNED_BSS): New. ! 2002-02-14 Kazu Hirata ! * config/h8300/h8300-protos.h: Update the prototype for ! const_costs. ! * config/h8300/h8300.c (const_costs): Treat SET as a little ! more expensive operation. ! * config/h8300/h8300.h (DEFAULT_RTX_COSTS): Update the ! reference to const_costs. ! 2002-02-14 Hans-Peter Nilsson ! * config.gcc (c4x-*-rtems*): Fix typo in tm_file setting. ! 2002-02-14 Jakub Jelinek ! PR c/5503: ! * c-decl.c (duplicate_decls): If builtin type has TYPE_ARG_TYPES NULL, ! use arguments from newtype. ! 2002-02-13 Eric Christopher ! * config/mips/mips.c (override_options): Add check for march/mipsX ! on the same command line. Fix error message in cpu processing. ! Remove architecture and ISA checks. ! 2002-02-14 Aldy Hernandez ! * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Adjust for vectors. ! * config/rs6000/sysv4.h (ROUND_TYPE_ALIGN): Add MAX. ! 2002-02-14 Aldy Hernandez ! * config/rs6000/rs6000.md ("*movv4si_internal"): Add m<-r and r<-r ! alternatives. ! ("*movv8hi_internal1"): Same. ! ("*movv16qi_internal1"): Same. ! ("*movv4sf_internal1"): Same. ! * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Do ! not push_reload for altivec modes. ! 2002-02-13 Joel Sherrill ! * config.gcc (a29k-*-rtems), config/a29k/rtems.h: General cleanup across ! all RTEMS targets including removal of #includes from config/*/rtems*.h ! file and adding them to tm_file setting. Added xm_defines=POSIX to ! many targets. ! * config.gcc (c4x-*-rtems), config/c4x/rtems.h: Ditto. ! * config.gcc (h8300-*-rtems), config/h8300/rtems.h: Ditto. ! * config.gcc (hppa1.1-*-rtems), config/pa/rtems.h: Ditto. ! * config.gcc (i960-*-rtems), config/i960/rtems.h: Ditto. ! * config.gcc (m68k-*-rtems*), config/m68k/rtems.h, ! config/m68k/rtemself.h: Ditto. ! * config.gcc (mips*-*-rtems*), config/mips/rtems.h, ! config/mips/rtems64.h: Ditto. ! * config.gcc (powerpc-*-rtems*), config/rs6000/rtems.h: Ditto. ! * config.gcc (sh-*-rtems*), config/sh/rtems.h, config/sh/rtemself.h: ! Ditto. ! * config.gcc (sparc-*-rtems*), config/sparc/rtems.h, ! config/sparc/rtemself.h: Ditto. ! * config.gcc (v850-*-rtems*), config/v850/rtems.h: Ditto. ! * config.gcc (arm-rtems), config/arm/rtems-elf.h: Ditto plus moved ! arm-rtems stanza closer to other arm-elf targets and made arm-rtems ! more like arm-elf. ! * config.gcc (i[34567]86-*-rtems*), config/i386/djgpp-rtems.h, ! config/i386/rtems.h, config/i386/rtemself.h: Ditto plus i386-rtemself ! target made more similar to i386-elf. ! * config/i386/t-rtems-i386: Added soft float support and multilibs. ! * config/m68k/t-m68kbare: Add 68040 and 68060 as multilib alternatives to ! be similar to config/m68k/t-m68kelf. ! * gthr-rtems.h: Encapsulate with extern "C" for C++. ! Wed Feb 13 23:41:15 CET 2002 Jan Hubicka ! * regmove.c (kill_value): Handle subregs. ! Wed Feb 13 23:34:30 CET 2002 Jan Hubicka ! * i386.md (mul patterns): Allow memory operand to be first; ! add expanders where needed; fix constraints. ! (min?f_nonieee, max?f_nonieee, SSE TImode patterns): ! Allow memory operand to be the first. ! * i386.c (ix86_prepare_fp_compare_args): Fix condition for swapping ! operands. ! 2002-02-13 Jakub Jelinek ! PR c/5681: ! * expr.c (safe_from_p): Pass VOIDmode to true_dependence instead of ! GET_MODE (x). ! 2002-02-13 Jakub Jelinek ! PR optimization/5547: ! * config/i386/i386.c (i386_simplify_dwarf_addr): Simplify ! all valid IA-32 address modes involving non-scaled %ebx and ! GOT/GOTOFF as displacement. ! 2002-02-13 Ulrich Weigand ! * config/s390/s390.c (s390_final_chunkify): Re-run shorten_branches ! after emitting ltorg insns. ! * config/s390/s390.md (*cmpdf_ccs_0, *cmpdf_ccs, *cmpsf_ccs_0, ! *cmpsf_ccs, truncdfsf2_ieee, *adddf3, *addsf3, *subdf3, *subsf3, ! *muldf3, *mulsf3, *divdf3, *divsf3, *negdf2, *negsf2, *absdf2, ! *abssf2): Fix "op_type" attribute. ! 2002-02-13 Douglas B Rupp ! * mkconfig.sh: Avoid using a subshell redirect. ! ($output.T): Change to $(output)T. ! (ENABLE_NLS): Remove unneeded undef. ! * config/alpha/vms.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define. ! * config/alpha/x-vms (libsubdir): Define. ! * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Handle ! register frame procedures. Optimize retrieving context. ! * config/alpha/t-vms (MULTILIB_OPTIONS): Define. ! (MULTILIB_DIRNAME, LIBGCC, INSTALL_LIBGCC): Likewise. ! * config/alpha/vms.h (ASM_FILE_START): Write .arch directive. ! Wed Feb 13 09:45:08 2002 Richard Kenner ! * alias.c (find_base_term, case ZERO_EXTEND, case SIGN_EXTEND): ! Make same change as for find_base_value. ! 2002-02-13 Kazu Hirata ! * config/h8300/h8300.h (MODES_TIEABLE_P): Accept a combination ! of QImode and SImode. ! 2002-02-13 Kazu Hirata ! * config/h8300/h8300.c (h8300_adjust_insn_length): Correct the ! length computation of movsi. ! * config/h8300/h8300.md (movsi_h8300hs): Correct the length. ! 2002-02-13 Kazu Hirata ! * config/h8300/h8300.md (subqi3): Tighten the predicate for ! operands[2] to register_operand. ! Wed Feb 13 10:35:56 CET 2002 Jan Hubicka ! * i386.md (fop_*_comm_*): allow nonimmediate in the first operand. ! 2002-02-12 Aldy Hernandez ! * config/rs6000/rs6000.md: Use predicate altivec_register_operand ! for altivec_lvx* and altivec_stvx*. ! ("*movv4si_internal"): Add constraint for loading from GPRs. ! ("*movv8hi_internal1"): Same. ! ("*movv16qi_internal1"): Same. ! ("*movv4sf_internal1"): Same. ! * config/rs6000/rs6000.c (altivec_register_operand): New. ! * config/rs6000/rs6000.h (PREDICATE_CODES): Add ! altivec_register_operand. ! 2002-02-13 Hans-Peter Nilsson ! * config/mmix/mmix.c (mmix_assemble_integer) : Don't ! handle SYMBOL_REF. ! 2002-02-13 Stan Shebs ! * c-typeck.c (digest_init): Handle vectors. ! (really_start_incremental_init): Same. ! (pop_init_level): Same. ! (process_init_element): Same. ! * varasm.c (output_constant): Same. ! * expr.c (clear_storage): Same. ! (store_constructor): Same. ! 2002-02-12 Eric Christopher ! * explow.c (hard_function_value): Add comment explaining ! signed/unsigned comparison. ! 2002-02-12 Jakub Jelinek ! * jump.c (never_reached_warning): Add finish argument. ! If finish is NULL, stop on CODE_LABEL, otherwise stop before first ! real insn after end. ! * rtl.h (never_reached_warning): Adjust prototype. ! * cse.c (cse_insn): Pass NULL as finish to never_reached_warning. ! * cfgrtl.c (flow_delete_block): Pass b->end as finish to ! never_reached_warning. ! 2002-02-12 Graham Stott ! * config/hp/pa.h (GO_IF_LEGITIMATE_ADDRESS): Fix typos. ! 2002-02-12 Kazu Hirata ! * config/h8300/h8300.c (shift_alg_hi): Improve the 15-bit ! logical shifts on H8/300. ! (shift_alg_si): Improve several shifts on H8/300. ! (get_shift_alg): Likewise. ! 2002-02-12 Graham Stott ! * config/pa/pa.c (compute_movstrsi_length): Fix typos. ! Tue Feb 12 10:12:56 2002 Richard Kenner ! * alias.c (find_base_value, case ZERO_EXTEND, case SIGN_EXTEND): ! Handle #ifdef POINTERS_EXTEND_UNSIGNED. ! 2002-02-11 Hans-Peter Nilsson ! * config/mmix/mmix.c (mmix_assemble_integer) : Handle ! non-CONST_INT through default_assemble_integer. ! : Likewise, for non-CONST_INT, non-SYMBOL_REF. ! : Abort for CONST_DOUBLE. ! 2002-02-11 John David Anglin ! * gcc.c (init_gcc_specs): Add static libgcc to link when "-shared" ! is specified. ! * config/pa/pa-linux.h (LIB_SPEC): Delete. ! * config/pa/pa32-linux.h (LINK_COMMAND_SPEC): Delete. ! 2002-02-11 Andrew Haley ! * config/stormy16/stormy16.md (zero_extendqihi2): New. ! 2002-02-11 Alexandre Oliva ! * regrename.c (regrename_optimize): Don't accept a ! part-clobbered register if the replaced register is not part ! clobbered. ! * calls.c (store_one_arg): In the non-BLKmode non-partial case, ! take padding into account when computing the argument value. ! * config/sh/sh.h (FUNCTION_ARG_REGNO_P): Fix parenthesizing error. ! * combine.c (try_combine): Apply substitutions in ! CALL_INSN_FUNCTION_USAGE too. ! 2002-02-11 Aldy Hernandez ! * config/rs6000/rs6000.c (altivec_init_builtins): Handle ! __builtin_altivec_abs*. ! (bdesc_abs): New. ! * config/rs6000/rs6000.h (rs6000_builtins): Add ! ALTIVEC_BUILTIN_ABS*. ! * config/rs6000/altivec.h: Use const char for builtins expecting ! literals. ! (vec_abs): New versions for C and C++. ! (vec_abss): Same. ! 2002-02-10 Kazu Hirata ! * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Simplify by ! using Pmode. ! 2002-02-10 Kazu Hirata ! * config/h8300/h8300.h (STACK_POINTER_REGNUM): Use the ! constant definition from h8300.md. ! (FRAME_POINTER_REGNUM): Likewise. ! * config/h8300/h8300.md (define_constants): Add FP_REG. ! 2002-02-10 Kazu Hirata ! * config/h8300/h8300.c (print_operand): Remove redundant code. ! 2002-02-10 Kazu Hirata ! * config/h8300/h8300-protos.h: Remove the prototype for byte_reg. ! * config/h8300/h8300.c (byte_reg): Make it static. ! 2002-02-10 Richard Henderson ! PR c/5623 ! * c-typeck.c (incomplete_type_error): Handle flexible array members. ! 2002-02-10 Richard Henderson ! PR c++/5624 ! * tree.c (append_random_chars): Don't abort if main_input_filename ! does not exist. ! 2002-02-10 Hans-Peter Nilsson ! * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): Disable. ! 2002-02-10 Kazu Hirata ! * config/h8300/h8300.md (pushhi1_h8300): Correct the mode used. ! (pushhi1): Likewise. ! 2002-02-10 John David Anglin ! * pa.c (reg_before_reload_operand): Don't accept a SUBREG operand. ! * pa.h (PREDICATE_CODES): Adjust codes for reg_before_reload_operand. ! 2002-02-09 David O'Brien ! * config/sparc/freebsd.h(TARGET_DEFAULT): Add MASK_EPILOGUE setting and ! remove MASK_VIS. ! (ASM_CPU_DEFAULT_SPEC): Remove. Default setting is fine. ! 2002-02-09 Kazu Hirata ! * config/h8300/h8300.c (output_logical_op): Use sub.w to clear ! a half of an SImode register on H8/300. ! Sat Feb 9 18:28:02 CET 2002 Jan Hubicka ! * i386.md (movdi_2): Add missing '!'. ! 2002-02-09 Kazu Hirata ! * config/h8300/h8300.h: Fix formatting. Remove commented-out ! definitions. ! 2002-02-09 Kazu Hirata ! * config/h8300/h8300.md (length): Correct the distance valid ! for the short branch. ! 2002-02-09 Kazu Hirata ! * config/h8300/h8300.md (iorhi3): Tighten the predicates. ! 2002-02-09 Alexandre Oliva ! * config/sh/sh.h (REGISTER_NATURAL_MODE): Save part-clobbered ! registers in SImode. ! (HARD_REGNO_CALL_PART_CLOBBERED) [TARGET_SHMEDIA32]: Set r18 as ! part-clobbered. ! * config/sh/sh.c (expand_prologue): Fix mis-applied 2001-11-09's ! patch. ! Contribute sh64-elf. ! 2002-02-09 Alexandre Oliva ! * config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to... ! (sh_cannot_modify_jumps_p): New function. ! 2002-02-05 Alexandre Oliva ! * config/sh/sh.c (TARGET_MS_BITFIELD_LAYOUT_P): Define to... ! (sh_ms_bitfield_layout_p): New function. ! 2002-02-04 Alexandre Oliva ! Zack Weinberg ! * config/sh/sh.h (TRAMPOLINE_ADJUST_ADDRESS): Use ! expand_simple_binop instead of expand_binop. ! 2002-02-03 Alexandre Oliva ! * config/sh/sh.h (OVERRIDE_OPTIONS) [! TARGET_SH5]: Disable ! use of .quad and .uaquad. ! * config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP, ! TARGET_ASM_ALIGNED_DI_OP): Add comment pointing to the above. ! 2002-01-24 Alexandre Oliva ! * config/sh/sh.md (movdi_const, movdi_const_32bit, ! movdi_const_16bit): Make sure all CONSTs have modes. ! (sym2PIC): Ditto, but by adjusting all callers. ! * config/sh/sh.c (calc_live_regs) [TARGET_SHCOMPACT]: Set pr_live ! if the prologue calls the SHmedia argument decoder or register ! saver. ! 2002-01-24 Alexandre Oliva ! * config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP): Define. ! (TARGET_ASM_ALIGNED_DI_OP): Likewise. ! (sh_expand_epilogue): Don't emit USE of return target register. ! (prepare_move_operands): Legitimize DImode PIC addresses. ! (sh_media_register_for_return): Skip tr0, used to initialize the ! PIC register. ! (sh_expand_prologue): Remove explicit USE of return register. ! (nonpic_symbol_mentioned_p): PC is non-PIC. Don't recurse in ! CONST_DOUBLEs. UNSPEC_GOTPLT is PIC. ! * config/sh/sh.h (ASM_OUTPUT_DOUBLE_INT): Removed, obsolete. ! (OVERRIDE_OPTIONS): Don't disable PIC on SH5. ! (EXTRA_CONSTRAINT_S): Use MOVI_SHORI_BASE_OPERAND_P instead of ! EXTRA_CONSTRAINT_T. ! (GOT_ENTRY_P, GOTPLT_ENTRY_P, GOTOFF_P, PIC_ADDR_P): New. ! (MOVI_SHORI_BASE_OPERAND_P): New. ! (NON_PIC_REFERENCE_P, PIC_REFERENCE_P): New. ! (EXTRA_CONSTRAINT_T): Define in terms of them. ! (OUTPUT_ADDR_CONST_EXTRA): Handle UNSPEC_GOTPLT. ! * config/sh/sh.md (movsi_media, movsi_media_nofpu, ! movdi_media, movdi_media_nofpu): Add SIBCALL_REGS class to ! alternatives supporting TARGET_REGS. ! (UNSPEC_GOTPLT): New constant. ! (movdi split): Move incrementing of LABEL_NUSES... ! (movdi_const, movdi_const_32bit): Here. Use ! MOVI_SHORI_BASE_OPERAND_P instead of EXTRA_CONSTRAINT_T. ! (movdi_const_16bit): New. ! (call, call_value) [flag_pic]: Use GOTPLT. ! (call_pop, call_value_pop): New expands. ! (call_pop_compact, call_pop_rettramp): New insns. ! (call_value_pop_compact, call_value_pop_rettramp): New insns. ! (sibcall) [flag_pic]: Use GOT. ! (builtint_setjmp_receiver): Remove bogus, unused expand. ! (GOTaddr2picreg): Implement for SHcompact and SHmedia. ! (*pt, *ptb, ptrel): New insns. ! (sym2GOT): Handle DImode GOT. ! (sym2GOTPLT, symGOTPLT2reg): New expands. ! (sym2PIC): New expand. ! (shcompact_return_tramp): Use GOTPLT to return trampoline. ! (shcompact_return_tramp_i): Use return register explicitly. ! * config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SHMEDIA]: Don't ! disable flag_reorder_blocks. ! 2002-01-19 Alexandre Oliva ! * config/sh/sh.md (sibcall_compact): Reorder return, uses and ! clobbers, for clarity. ! (sibcall_epilogue) [TARGET_SHCOMPACT]: Mark saving and ! restoring of r0 in macl as MAYBE_DEAD. ! 2002-01-18 Alexandre Oliva ! * config/sh/sh.h (LONG_DOUBLE_TYPE_SIZE): Define. ! * config/sh/sh.md (movv4sf_i, movv16sf_i): Fix uses of ! alter_subreg all over. ! (jump) [TARGET_SHMEDIA]: FAIL to create new jumps after ! reload, instead of emitting instructions that would require ! reloading. ! (casesi_load_media): Add missing modes. ! 2001-11-09 Alexandre Oliva ! * config/sh/sh.c (sh_expand_prologue): Mark the PIC register ! as used if the argument decoder is called. ! 2001-08-28 Alexandre Oliva ! * config/sh/sh.md (udivsi3, divsi3): Load libcall symbol name in ! Pmode, then extend it to DImode if necessary. ! 2001-08-28 Stephen Clarke ! * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Don't accept DFmode ! constants in FPU-enabled SHmedia, let them be loaded from memory. ! 2001-08-28 Alexandre Oliva ! * config/sh/sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): ! Adjust whitespace in assembly output templates. ! 2001-08-28 Stephen Clarke ! * config/sh/sh.md (movdicc_false, movdicc_true, movdicc): Adjust ! mode of if_then_else. ! 2001-08-04 Alexandre Oliva ! * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Override definition in ! sh.h. ! 2001-07-26 Andrew Haley ! Joern Rennecke ! * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): New. ! (SUBTARGET_CPP_PTR_SPEC): New. ! (SUBTARGET_CPP_SPEC): Remove. ! 2001-07-06 Chandrakala Chavva ! * config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1): ! Fix typo in previous checkin. ! 2001-07-11 Chandrakala Chavva ! * config/sh/sh.h (MODES_TIEABLE_P): Fix redact indentations. ! 2001-07-10 Chandrakala Chavva ! Alexandre Oliva ! * config/sh/sh.h (MODES_TIEABLE_P): Don't tie modes wider than ! what single FP register can hold for SHmedia target. ! 2001-07-06 Chandrakala Chavva ! Alexandre Oliva ! * config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1): ! Do not split into SUBREG. ! 2001-06-14 Alexandre Oliva ! * config/sh/ushmedia.h, config/sh/sshmedia.h: Updated signatures ! and added new functions as specified in SH5 ABI r9. ! 2001-06-04 Alexandre Oliva ! * config/sh/lib1funcs.asm (GCC_nested_trampoline): Align to an ! 8-byte boundary. ! 2001-06-03 Alexandre Oliva ! * config/sh/sh.c (dump_table): Add const0_rtx in calls of ! gen_consttable_4 and gen_consttable_8. Emit multiple labels ! and consttable_window_ends. ! 2001-06-03 Graham Stott ! * config/sh/sh.md (movdi split): Remove unused variable last_insn. ! 2001-05-16 Alexandre Oliva ! * config/sh/sh.c (print_operand): Handle floating-point pair, ! vector and matrix registers. ! * config/sh/sh.h (REGISTER_MOVE_COST): Take floating-pointer ! vector modes into account. ! * config/sh/sh.md (movv2sf): Split move between registers into ! movdf. ! (movv4sf, movv16sf): Introduce insns that get split only after ! reload. ! * config/sh/shmedia.h: Fix Copyright dates. ! * config/sh/ushmedia.h: Likewise. Move loop counter ! declarations into conditionals that uses them. ! (sh_media_FVADD_S, sh_media_FVSUB_S): Fix off-by-one error in ! loop boundary. ! * config/sh/sshmedia.h: Fix Copyright dates. ! (sh_media_PUTCFG): Fix constraints. ! 2001-05-12 Alexandre Oliva ! * config/sh/sh.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define to ! ptrmemfunc_vbit_in_delta for SH5. ! 2001-05-08 Alexandre Oliva ! * config/sh/sh.h (TARGET_SWITCHES): Document -m5-*. ! * invoke.texi: Likewise. ! 2001-04-14 Alexandre Oliva ! * config/sh/lib1funcs.asm (GCC_push_shmedia_regs, ! GCC_push_shmedia_regs_nofpu, GCC_pop_shmedia_regs, ! GCC_pop_shmedia_regs_nofpu): New global symbols. ! * config/sh/t-sh64 (LIB1ASMFUNCS): Add them. ! * config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): New macro. ! * config/sh/sh.c (calc_live_regs): Account for PR's saving in ! compact function with nonlocal labels. ! (sh_expand_prologue) [SHcompact]: Push SHmedia regs if needed. ! (sh_expand_epilogue) [SHcompact]: Pop them when appropriate. ! (initial_elimination_offset): Account for their stack space. ! * config/sh/sh.md (shmedia_save_restore_regs_compact): New insn. ! * config/sh/sh.md (movsi_media, movsi_media_nofpu, movqi_media, ! movhi_media, movdi_media, movdi_media_nofpu, movdf_media, ! movdf_media_nofpu, movsf_media, movsf_media_nofpu): Require at ! least one of the operands to be a register. ! (movv2sf): Likewise. Renamed to movv2sf_i. ! (movdi, movdf, movv2sf, movv4sf, movv16sf, movsf): ! prepare_move_operands() before emitting SHmedia insns. ! 2001-04-03 Alexandre Oliva ! * config/sh/crti.asm (init, fini) [__SH5__ && ! __SHMEDIA__]: ! Don't save nor initialize r12. Don't mis-align the stack. ! Pad the code with a nop. ! * config/sh/crti.asm: Don't restore r12. Don't mis-align the ! stack. ! 2001-03-13 Alexandre Oliva ! * gcc/longlong.h (__umulsidi3, count_leading_zeros) ! [__SHMEDIA__]: Implement. ! 2001-03-11 Alexandre Oliva ! * config/sh/sh.md: Set latency of `pt' closer to reality. ! (movsi_media, movsi_media_nofpu, movdi_media, movdi_media_nofpu, ! movdf_media, movdf_media_nofpu, movsf_media, movsf_media_nofpu): ! Set move, load and store type attributes. ! * config/sh/sh.c (sh_loop_align) [TARGET_SH5]: Set to 3. ! * config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SH5]: Disable ! profiling. ! * config/sh/sh.h (PROMOTE_MODE): Sign-extend SImode to DImode. ! * config/sh/sh-protos.h (sh_media_register_for_return): Declare. ! * config/sh/sh.c (sh_media_register_for_return): New function. ! (sh_expand_prologue) [TARGET_SHMEDIA]: Copy r18 to an available ! branch-target register. ! (sh_expand_epilogue) [TARGET_SHMEDIA]: Explicitly USE it. ! * config/sh/sh.md (return_media_i): Use any call-clobbered ! branch-target register. ! (return_media): If r18 wasn't copied in the prologue, copy it ! here. ! * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE) [TARGET_SHMEDIA]: ! Clear class FP0_REGS. ! * config/sh/sh64.h (LINK_SPEC): Removed incorrect default copied ! from elf.h. ! 2001-03-08 DJ Delorie ! * config/sh/sh.h (OVERRIDE_OPTIONS): Disable relaxing for SHMEDIA. ! 2001-02-09 Alexandre Oliva ! * config/sh/sh.md (sibcall_compact): Set fp_mode to single. ! 2001-02-07 Alexandre Oliva ! * config/sh/sh.h (INT_ASM_OP) [SHMEDIA64]: Use `.quad'. ! 2001-02-03 Alexandre Oliva ! * config/sh/sh.h (INIT_CUMULATIVE_ARGS): Compute size of BLKmode ! return value correctly for call_cookie. ! 2001-02-01 Alexandre Oliva ! * config/sh/crt1.asm (start): Modified so as to call ! ___setup_argv_and_call_main. ! 2001-01-26 Alexandre Oliva ! * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't count stack_regs in ! SHmedia mode. ! 2001-01-20 Alexandre Oliva ! * config/sh/sh.h (STRIP_DATALABEL_ENCODING): New macro. ! (STRIP_NAME_ENCODING): Use it. ! (ASM_OUTPUT_LABELREF): Likewise. Don't call assemble_name(). ! 2001-01-19 Alexandre Oliva ! * config/sh/sh.md (sgeu) [! SHMEDIA]: Fix invocation of ! prepare_scc_operands(). ! * config/sh/sh.h (SH_DATALABEL_ENCODING): Change to "#"... ! (DATALABEL_SYMNAME_P): ... so that we don't need memcmp here. ! 2001-01-17 Alexandre Oliva ! * config/sh/sh.h (STRIP_NAME_ENCODING): Strip leading `*'. ! 2001-01-13 Alexandre Oliva ! * config/sh/sh.md (shcompact_incoming_args): Use R0_REG. ! * config/sh/sh.md (R7_REG, R8_REG, R9_REG): Define as constants, ! used in shcompact_incoming_args. ! * config/sh/sh.c (sh_expand_epilogue): Fix thinko in previous ! change. ! * config/sh/crt1.asm (start) [SH5]: Switch to single-precision ! mode. ! * config/sh/lib1funcs.asm (sdivsi3_i4, udivsi3_i4, set_fpscr): ! Adjust accordingly. ! * config/sh/sh.c (sh_expand_prologue, sh_expand_epilogue): ! Simplify. Adjust. Add sanity check. ! * config/sh/sh.h (TARGET_SWITCHES) [5-compact]: Set ! FPU_SINGLE_BIT. ! * config/sh/sh.md (udivsi3_i4_single, divsi3_i4_single): Match ! TARGET_SHCOMPACT. ! (udivsi3, divsi3): Use them. ! (force_mode_for_call): New insn. ! (call, call_value, sibcall_value): Emit it before SHcompact ! calls. ! 2001-01-11 Alexandre Oliva ! * config/sh/sh.md (call, call_value, sibcall): Make sure the ! call cookie is non-NULL before taking its value. ! 2001-01-10 Alexandre Oliva ! * config.gcc (sh64): Set target_requires_64bit_host_wide_int. ! 2001-01-09 Alexandre Oliva ! * config/sh/sh.md (shcompact_incoming_args): Set argument memory ! block. ! * config/sh/sh.h (STATIC_CHAIN_REGNUM) [SH5]: Use r1. ! * config/sh/sh.c (sh_expand_prologue) [SH5]: Use r0 as ! temporary for stack adjusts. Use MACL and MACH to pass ! arguments to shcompact_incoming_args. ! * config/sh/sh.md (shcompact_incoming_args): Adjust. Don't ! clobber r1. ! * config/sh/lib1funcs.asm (shcompact_incoming_args): Likewise. ! (nested_trampoline): Load static chain address into r1. ! * config/sh/sh.md (movdi_media splits): Fix sign-extension. ! 2001-01-07 Alexandre Oliva ! * config/sh/sh.md (casesi): Sign-extend the first two operands, ! and use signed compares for them. ! * config/sh/sh.c (dump_table): Don't emit 8-byte constants after ! 4-byte ones. Instead, inter-leave them, maintaining the 8-byte ! ones properly aligned. ! (find_barrier): Account for extra alignment needed for 8-byte wide ! constants. ! (machine_dependent_reorg): Require a label for the second 4-byte ! constant after an 8-byte one. ! * config/sh/lib1funcs.asm (sdivsi3): Fix typo in yesterday's ! change. ! 2001-01-05 Alexandre Oliva ! * config/sh/sh.c (machine_dependent_reorg) [SHCOMPACT]: Reset ! last_float when switching float modes. ! * config/sh/sh.md (movdf) [SH5]: Don't use stack-pointer ! auto-increment for general-purpose registers. ! * config/sh/lib1funcs.asm (sdivsi3) [SHMEDIA]: Sign-extend the ! result. ! * config/sh/sh.c (sh_expand_prologue) [SH5]: Use r1 as temporary ! for stack adjust. ! * config/sh/sh.c (sh_builtin_saveregs): Support using all ! registers for varargs. ! 2001-01-01 Alexandre Oliva ! * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Simplify. ! * config/sh/sh.h (CALL_COOKIE_STACKSEQ, ! CALL_COOKIE_STACKSEQ_SHIFT, CALL_COOKIE_STACKSEQ_GET): New macros. ! (CALL_COOKIE_INT_REG_SHIFT): Adjust. ! (FUNCTION_ARG_ADVANCE): Use SHCOMPACT_FORCE_ON_STACK. Adjust ! call_cookie accordingly. ! (FUNCTION_ARG): Test SHCOMPACT_FORCE_ON_STACK. ! (SHCOMPACT_BYREF): Likewise. ! (SHCOMPACT_FORCE_ON_STACK): New macro. ! * config/sh/sh.c (sh_expand_prologue): Use new call_cookie format. ! (sh_builtin_saveregs): Likewise. ! * config/sh/lib1funcs.asm (shcompact_call_trampoline, ! shcompact_incoming_args): Use new shift values. Support ! sequences of consecutive and non-consecutive pushes/pops. ! * config/sh/sh.md (return): Don't explicitly use PR_REG. ! 2001-01-05 Hans-Peter Nilsson ! * config/sh/sh.h (TEXT_SECTION): Define. ! * config/sh/elf.h (ASM_FILE_START): Output TEXT_SECTION_ASM_OP. ! 2001-01-05 Alexandre Oliva ! * config/sh/sh.h (INIT_CUMULATIVE_LIBCALL_ARGS): New macro. ! * config/sh/sh.h (BASE_RETURN_VALUE_REG): Use FP regs for ! return values on FPU-enabled SHmedia. ! (FUNCTION_VALUE_REGNO_P): Mark FIRST_FP_RET_REG as used on ! FPU-enabled SHmedia. ! (INIT_CUMULATIVE_ARGS): Set up return trampoline only if ! value is returned in a non-FP reg and is not returned by ! reference. ! * config/sh/sh.md (shcompact_return_tramp_i): Change type to ! jump_ind. ! 2000-01-04 Alexandre Oliva ! * config/sh/sh.h (SH_MIN_ALIGN_FOR_CALLEE_COPY): New. ! (FUNCTION_ARG_CALLEE_COPIES): Require argument to be ! quad-aligned to be passed by callee-copy reference. ! 2001-01-03 Alexandre Oliva ! * config/sh/elf.h (MAX_WCHAR_TYPE_SIZE): Define. ! * config/sh/sh64.h (MAX_WCHAR_TYPE_SIZE): Undefine. ! 2001-01-02 Alexandre Oliva ! * config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix error in ! copying low-numbered FP regs to r7 and r8. ! * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't request copying of ! FP regs to general-purpose regs only if the copy was passed on the ! stack. ! * config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix typo in ! copying FP reg to r9. ! * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to ! copy FP regs to general-purpose regs only in outgoing calls. ! * config/sh/sh.md (movdf_media, movsf_media): Revert incorrect ! change from 2000-10-30. Adjust for 64-bit (or 32-bit) ! HOST_WIDE_INT. ! * config/sh/sh.h (struct sh_args): Document all fields. ! (FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments ! passed partially on the stack should not consider making ! sibcalls. ! * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Add byref regs to ! stack_regs only for incoming calls. When passing FP args, ! make sure there are FP regs available before modifying ! call_cookie. ! (SHCOMPACT_BYREF): Pass double args in general-purpose ! registers by reference. ! 2000-12-30 Alexandre Oliva ! * config/sh/sh.h (FUNCTION_OK_FOR_SIBCALL) [SHCOMPACT]: Don't ! attempt to generate sibcalls if the caller got any arguments ! by reference. ! * config/sh/lib1funcs.asm (set_fpscr) [SH5]: Default to double. ! * config/sh/sh.c (dump_table) [SHCOMPACT]: Align DImode and DFmode ! to 8-byte boundaries. ! * config/sh/sh.md (shcompact_preserve_incoming_args): New insn. ! * config/sh/sh.h (CALL_COOKIE_INT_REG_GET): New macro. ! * config/sh/sh.c (sh_expand_prologue): Preserve args that will be ! stored in the stack. ! * config/sh/lib1funcs.asm (ct_main_table, ia_main_table): Arrange ! for the offsets to have the ISA bit set. ! (shcompact_call_trampoline): Document. Swap r0 and r1, to match ! invocation. Use beq instead of bgt to mark end of sequence of ! loads. ! (shcompact_incoming_args): Fix store of r2. Use beq instead of ! bgt to mark end of sequence of stores. ! * config/sh/sh.c (arith_operand): Don't check whether ! CONST_OK_FOR_J for now. ! * config/sh/sh.md (movdf_media, movsf_media): Use HOST_WIDE_INT ! instead of long for conversion. ! 2000-12-29 Alexandre Oliva ! * config/sh/sh.c (print_operand_address): Convert INTVAL to int ! before passing it to fprintf. ! 2000-12-28 Alexandre Oliva ! * config/sh/crt1.asm (start): Reset SR.FD, to enable the FP unit. ! Call set_fpscr before reading/writing SR. ! * config/sh/crt1.asm (start): Set SR.SZ and SR.PR, but not SR.FR. ! Call set_fpscr. ! * config/sh/lib1funcs.asm: Add `.align 2' directives before ! SHmedia code. ! (FMOVD_WORKS): Define on SH5 with FPU. ! (set_fpscr): Define on SH5. Remove separate _fpscr_values ! setting. ! * config/sh/t-sh64 (LIB1ASMFUNCS): Add _set_fpscr instead of ! _fpscr_values. ! 2000-12-28 Hans-Peter Nilsson ! * config/sh/lib1funcs.asm (ct_main_table): Align contents to even ! address. ! (ia_main_table): Ditto. ! 2000-12-27 Alexandre Oliva ! * config/sh/sh.h (MAX_WCHAR_TYPE_SIZE): Don't define. ! * config/sh/sh64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Reinstate ! the definitions from sh.h. ! * config/sh/sh.h (PTRDIFF_TYPE): Define as conditional on ! TARGET_SH5. ! (SUBTARGET_CPP_SPEC): Arrange for __PTRDIFF_TYPE__ to be defined. ! * config/sh/elf.h (PTRDIFF_TYPE): Likewise. ! * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise. ! 2000-12-26 Alexandre Oliva ! * config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes. ! Increment LABEL_NUSES. ! * config/sh/sh.h (SIZE_TYPE): Define as conditional on ! TARGET_SH5. ! (SUBTARGET_CPP_SPEC): Arrange for __SIZE_TYPE__ to be always ! defined. ! * config/sh/elf.h (SIZE_TYPE): Likewise. ! * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise. ! * config/sh/lib1funcs.asm (shcompact_call_trampoline, ! shcompact_incoming_args): Load switch table addresses using ! datalabel. ! * config/sh/sh.h (SUBTARGET_CPP_SPEC): Define __SIZE_TYPE__. ! (NO_BUILTIN_SIZE_TYPE): Define. ! (SIZE_TYPE): Don't define. ! * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Define __SIZE_TYPE__. ! * config/sh/sh.h (CPP_SPEC): Fixed typo that prevented the ! definition of __SH5__=32 for -m5-compact-nofpu. ! * config/sh/sh.c (barrier_align): Ensure 32-bit alignment after ! ADDR_DIFF_VEC. ! 2000-12-24 Alexandre Oliva ! * config/sh/sh.h (FUNCTION_ARG_PADDING): Removed. ! 2000-12-23 Alexandre Oliva ! * config/sh/sh.h (TARGET_CACHE32): Enable on SH5. ! (FUNCTION_BOUNDARY): Ensure 32-bit alignment for SHmedia. ! (INSN_LENGTH_ALIGNMENT): Likewise. ! 2000-12-22 Alexandre Oliva ! * config/sh/sh.md (call, call_value, sibcall): Simplify ! copying of non-branch-target register. ! 2000-12-22 Alexandre Oliva ! * glimits.h (__LONG_MAX__): Revert 2000-12-13's patch. ! * config/sh/sh.h (CPP_SPEC): Define it here for 64-bit SHmedia. ! 2000-12-22 Alexandre Oliva ! * config/sh/sh.h (GET_SH_ARG_CLASS): Handle complex ! floating-point values as structs. ! (FUNCTION_ARG): Use SH5_PROTOTYPED_FLOAT_ARG. ! (SH5_PROTOTYPELESS_FLOAT_ARG): List FP registers before ! general-purpose register. ! (SH5_PROTOTYPED_FLOAT_ARG): New macro. ! 2000-12-20 Alexandre Oliva ! * config/sh/sh.md (addsi3): Force operand1 to reg for SHmedia. ! * config/sh/sh.md (movsi_media): Split CONST_DOUBLE loads too. ! * config/sh/sh.h (DATALABEL_REF_P): Don't require the CONST. ! (ENCODE_SECTION_INFO): Enclose variables and constants in ! DATALABEL unspecs. ! (SH_DATALABEL_ENCODING, DATALABEL_SYMNAME_P): Define. ! (STRIP_NAME_ENCODING): Strip SH_DATALABEL_ENCODING off. ! (ASM_OUTPUT_LABELREF, AMS_OUTPUT_SYMBOL_REF): Define. ! * config/sh/sh.c (gen_datalabel_ref): Use UNSPEC_DATALABEL ! only for LABEL_REFs. For SYMBOL_REFs, prepend ! SH_DATALABEL_ENCODING to the symbol name. ! * config/sh/sh.md (indirect_jump): Use SUBREG instead of ! convert_mode(). ! 2000-12-20 Alexandre Oliva ! * config/sh/sh.md (casesi): Enclose ADDR_DIFF_VEC address in ! UNSPEC_DATALABEL. ! * config/sh/sh.c (gen_datalabel_ref): Accept LABEL_REFs. ! * config/sh/sh.h (DATALABEL_REF_NO_CONST_P): Likewise. ! (DATALABEL_REF_P): Don't require CONST. ! (ASM_OUTPUT_ADDR_DIFF_ELT): On SH5, output datalabel before ! REL label. ! 2000-12-19 Alexandre Oliva ! * config/sh/sh.md (extendhidi2, extendqidi2): Use arithmetic shift ! right. ! 2000-12-18 Alexandre Oliva ! * config/sh/sh.md (movsi_media, call, call_value, sibcall): ! Use shallow_copy_rtx and PUT_MODE to change the mode of ! SYMBOL_REFs, LABEL_REFs, CONSTs, etc. ! * config/sh/sh.h (PREFERRED_RELOAD_CLASS): Reload SYMBOL_REFs ! on SHmedia using GENERAL_REGs. ! * config/sh/sh.md (ble_media_i, blt_media_i, bleu_media_i, ! bltu_media_i): Fix reversion of conditions. ! 2000-12-18 Alexandre Oliva ! * config/sh/sh.md (zero_extendhidi2): Use logical shift right. ! * config/sh/sh.c (output_far_jump): Save r13 in macl. ! 2000-12-17 Alexandre Oliva ! * config/sh/sh.c (gen_datalabel_ref): Fix mode of the UNSPEC. ! 2000-12-16 Alexandre Oliva ! * config/sh/lib1funcs.asm (ic_invalidate): Define for SH5. ! (GCC_nested_trampoline): Likewise. ! * config/sh/sh-protos.h (gen_datalabel_ref): Declare. ! * config/sh/sh.c (gen_datalabel_ref): Define. ! * config/sh/sh.h (TRAMPOLINE_SIZE): Adjust for SH5. ! (INITIALIZE_TRAMPOLINE): Likewise. ! (TRAMPOLINE_ADJUST_ADDRESS): Define. ! (DATALABEL_REF_NO_CONST_P, DATALABEL_REF_P): Define. ! (EXTRA_CONSTRAINT_T): Match DATALABEL unspecs. ! (OUTPUT_ADDR_CONST_EXTRA): Handle DATALABEL unspecs. ! * config/sh/sh.md (UNSPEC_DATALABEL): New constant. ! (ic_invalidate): Adjust for SH5. ! (ic_invalidate_line_media, ic_invalidate_line_compact): New insns. ! * config/sh/t-sh64 (LIB1ASMFUNCS): Added _ic_invalidate and ! _nested_trampoline. ! 2000-12-15 Alexandre Oliva ! * config/sh/sh.h (MOVE_MAX): Set to 8 for SHmedia, 4 elsewhere. ! (MOVE_MAX_PIECES): Set to 8 on SHmedia too. ! 2000-12-14 Alexandre Oliva ! * config/sh/sh.h (DBX_REGISTER_NUMBER): Adjust for sh64-elf-gdb. ! * config/sh/elf.h (DBX_REGISTER_NUMBER): Likewise. ! 2000-12-14 Alexandre Oliva ! * config/sh/sh.c (target_reg_operand): Match only target-branch ! registers and pseudos that aren't virtual registers. ! * config/sh/sh.md (call, call_value, sibcall) [TARGET_SHMEDIA]: ! Copy operands that don't match target_reg_operand to pseudos. ! (call_media, call_value_media, sibcall_media): Use ! target_reg_operand instead of target_operand. ! 2000-12-13 Alexandre Oliva ! * glimits.h (__LONG_MAX__) [SH5 == 64]: Adjust for 64 bits. ! * config/sh/sh.c (target_reg_operand): Match hardware registers ! other than branch-target registers. ! * config/sh/sh.md (zero_extendqidi2): Input operand is %1. ! * config/sh/lib1funcs.asm (sdivsi3) [SH5]: Make it global. ! (fpscr_values) [SH5 == 32]: Define. ! * config/sh/t-sh64 (LIB1ASMFUNCS): Add fpscr_values. ! * config/sh/sh.md (call, call_value, sibcall) [TARGET_SHMEDIA]: ! Handle function addresses coming in SUBREGs. ! 2000-12-12 Alexandre Oliva ! * config/sh/lib1funcs.asm (shcompact_call_trampoline, ! shcompact_return_trampoline): Use datalabel where appropriate. ! 2000-12-09 Alexandre Oliva ! * config/sh/sh.h (SECONDARY_OUTPUT_RELOAD_CLASS): Use a ! general-purpose register to copy one branch-target register to ! another. ! 2000-12-06 Alexandre Oliva ! * config/sh/sh.c (target_operand): Accept LABEL_REFs and ! SYMBOL_REFs with VOIDmode. ! * config/sh/sh.md (ble_media_i, blt_media_i, bleu_media_i, ! bltu_media_i): New insns. ! 2000-12-06 Alexandre Oliva ! * config/sh/sh.h (RETURN_IN_MEMORY): Adjust for SH5 ABI. ! (INIT_CUMULATIVE_ARGS): Likewise. ! 2000-12-01 Alexandre Oliva ! * machmode.def (V16SFmode): New mode. ! * c-common.c (type_for_mode): Support V2SF and V16SF. ! * tree.c (build_common_tree_nodes_2): Likewise. ! * tree.h (tree_index): Likewise. ! * calls.c (emit_call_1): Take args_so_far. Adjust all ! callers. Introduce CALL_POPS_ARGS. ! * tm.texi (CALL_POPS_ARGS): Document. ! * config/sh/crt1.asm: Implement in SHmedia mode. ! * config/sh/crti.asm, config/sh/crtn.asm: Likewise ! * config/sh/elf.h (ASM_SPEC, LINK_SPEC): Support SH5 flags. ! (DBX_REGISTER_NUMBER): Renumber registers for SH5. ! * config/sh/lib1funcs.asm: Disable functions unused in SH5. ! Implement divsi and udivsi in SHmedia mode. Introduce ! SHcompact trampolines. ! * config/sh/sh.c (GEN_MOV, GEN_ADD3, GEN_SUB3): Use DImode ! only in SHmedia64. ! (regno_reg_class): Rewrite. ! (fp_reg_names): Remove. ! (sh_register_names, sh_additional_register_names): New. ! (print_operand): Added `u'. Support SUBREGs in addresses. ! Add parentheses around shifted CONSTs. ! (output_file_start): Output .mode and .abi directives. ! (shiftcosts, addsubcosts, multcosts): Adjust. ! (output_stack_adjust): Compute alignment. Sanity-check SIZE. ! (push_regs): Take array of HOST_WIDE_INTs. Adjust callers. ! (calc_live_regs): Output to array of HOST_WIDE_INTs. Count ! bytes, not registers. Take into account the need for the ! SHcompact incoming args trampoline. Adjust all callers. ! (sh_expand_prologue): Take stack_regs into account. Call ! incoming args trampoline. Keep stack aligned as per SH5 ABI. ! (sh_expand_epilogue): Take stack_regs into accoutn. Keep ! stack aligned as per SH5 ABI. ! (sh_builtin_saveregs): Support SH5 ABI. ! (sh_build_va_list, sh_va_start): Likewise. ! (initial_elimination_offset): Take alignment into account. ! Compute location of PR according to the SH5 stack frame. ! (arith_reg_operand): Reject branch-target registers. ! (shmedia_6bit_operand): New. ! (logical_operand): Use CONST_OK_FOR_P on SHmedia. ! (target_reg_operand): Match DImode only. Accept SUBREGs. ! (target_operand): New. ! * config/sh/sh.h (CPP_SPEC, SUBTARGET_CPP_SPEC): Support SH5 flags. ! (CONDITIONAL_REGISTER_USAGE): Implement SH5 ABI. Initialize ! SIBCALL_REGS for SHmedia. ! (TARGET_SH3E, TARGET_SH4): Only if SH1_BIT is set too. ! (TARGET_FPU_DOUBLE, TARGET_FPU_ANY): New. ! (TARGET_SHMEDIA32, TARGET_SHMEDIA64): New. ! (TARGET_SWITCHES): New SH5 flags. ! (OVERRIDE_OPTIONS): Set SH5-specific options. Use ! VALID_REGISTER_P to disable unsupported registers. ! (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set. ! (POINTER_SIZE, PARM_BOUNDARY): Adjust. ! (FUNCTION_ARG_PADDING): Define. ! (FASTEST_ALIGNMENT): Adjust. ! (SH_REGISTER_NAMES_INITIALIZER): New. ! (sh_register_names): Declare. ! (DEBUG_REGISTER_NAMES): Define. ! (REGISTER_NAMES): Define based on sh_register_names. ! (SH_ADDITIONAL_REGISTER_NAMES_INITIALIZER): New. ! (sh_additional_register_names): Declare. ! (LAST_GENERAL_REG, LAST_FP_REG, LAST_XD_REG): Adjust for SHmedia. ! (FIRST_TARGET_REG, LAST_TARGET_REG): Define. ! (TARGET_REGISTER_P, SHMEDIA_REGISTER_P, VALID_REGISTER_P): Define. ! (REGISTER_NATURAL_MODE): Define. ! (FIRST_PSEUDO_REGISTER): Adjust. ! (FIXED_REGISTERS, CALL_USED_REGISTERS): Adjust. ! (HARD_REGNO_CALL_PART_CLOBBERED): Define. ! (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK): Adjust. ! (VECTOR_MODE_SUPPORTED_P): Define. ! (REG_CLASS_CONTENTS): Adjust. ! (SMALL_REGISTER_CLASSES): Adjust. ! (REG_ALLOC_ORDER): Adjust. ! (INDEX_REG_CLASS): Adjust. ! (CONST_OK_FOR_O, CONST_OK_FOR_P): New. ! (CONST_OK_FOR_LETTER_P): Adjust. ! (PREFERRED_RELOAD_CLASS): Adjust. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Adjust. ! (SECONDARY_INPUT_RELOAD_CLASS): Adjust. ! (NPARM_REGS, FIRST_PARM_REG, FIRST_RET_REG): Adjust. ! (FIRST_FP_PARM_REG): Adjust. ! (CALL_POPS_ARGS): Define. ! (FUNCTION_ARG_REGNO_P): Adjust. ! (struct sh_args): New fields. ! (GET_SH_ARG_CLASS): Adjust. ! (INIT_CUMULATIVE_ARGS): Adjust. ! (INIT_CUMULATIVE_INCOMING_ARGS): Define. ! (FUNCTION_ARG_ADVANCE): Adjust. ! (FUNCTION_ARG): Adjust. ! (FUNCTION_ARG_PASS_BY_REFERENCE, SHCOMPACT_BYREF): Define. ! (FUNCTION_ARG_CALLEE_COPIES): Define. ! (SH5_PROTOTYPELESS_FLOAT_ARG): Define. ! (STRICT_ARGUMENT_NAMING): Define. ! (PRETEND_OUTGOING_VARARGS_NAMED): Adjust. ! (FUNCTION_ARG_PARTIAL_NREGS): Adjust. ! (SH5_WOULD_BE_PARTIAL_NREGS): Define. ! (SETUP_INCOMING_VARARGS): Adjust. ! (HAVE_POST_INCREMENT, HAVE_PRE_DECREMENT): Adjust. ! (USE_LOAD_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Adjust. ! (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Adjust. ! (SUBREG_OK_FOR_INDEX_P): Adjust. ! (EXTRA_CONSTRAINT_S): Update. ! (EXTRA_CONSTRAINT_T): New. ! (EXTRA_CONSTRAINT): Adjust. ! (GO_IF_LEGITIMATE_INDEX): Adjust. ! (GO_IF_LEGITIMATE_ADDRESS): Adjust. ! (LEGITIMIZE_ADDRESS, LEGITIMIZE_RELOAD_ADDRESS): Adjust. ! (MOVE_MAX): Adjust. ! (MAX_MOVE_MAX): Define. ! (Pmode): Adjust. ! (CONST_COSTS): Adjust. ! (REGISTER_MOVE_COST): Adjust. ! (BRANCH_COST): Adjust. ! (TEXT_SECTION_ASM_OP): Adjust. ! (DBX_REGISTER_NUMBER): Adjust. ! (ASM_OUTPUT_DOUBLE_INT): New. ! (UNALIGNED_DOUBLE_INT_ASM_OP): New. ! (PREDICATE_CODES): Adjust. ! (PROMOTE_MODE): Adjust. ! (CRT_CALL_STATIC_FUNCTION): Do not define for SHmedia. ! * config/sh/sh.md (AP_REG, PR_REG, T_REG, GBR_REG): Renumber. ! (MACH_REG, MACL_REG, FPUL_REG, RAP_REG, FPSCR_REG): Renumber. ! (PR_MEDIA_REG, T_MEDIA_REG, R10_REG): New. ! (DR0_REG, DR2_REG, DR4_REG): Renumber. ! (TR0_REG, TR1_REG, TR2_REG): New. ! (XD0_REG): Renumber. ! (UNSPEC_COMPACT_ARGS): New. ! (type): Added pt and ptabs. ! (length): Default to 4 on SHmedia. Default pt length to 12 ! and 20 on SHmedia32 and SHmedia64, respectively. ! (pt): New function unit. ! (movdi, movsi): Add types pt and ptabs. Don't increment LABEL_NUSES. ! Add whitespace between operands of SHmedia instructions. ! (movdicc): Fix. ! (adddi3_media, addsi3_media): Adjust constraints. ! (subsi3) [SHmedia]: Force operand 1 into a register. ! (udivsi3_i1_media, udivsi3_i4_media): New. ! (udivsi3): Support SHmedia. ! (divsi3_i1_media, divsi3_i4_media): New. ! (divsi3): Support SHmedia. ! (anddi3, iordi3, xordi3): Adjust constraints. ! (zero_extendhidi2, zero_extendqidi2): New. ! (extendsidi2, extendhidi2, extendqidi2): New. ! (push, pop, push_e, push_fpul, push_4): Disable on SH5. ! (pop_e, pop_fpul, pop_4): Likewise. ! (movsi_media): Support FP and BT registers. ! (movsi_media_nofpu): New. Adjust splits to DImode. ! (lduw, ldub): Renamed to zero_extend* above. ! (movqi_media): Fix typo. ! (movdi_media): Support FP and BT registers. ! (movdi_media_nofpu): New. Adjust splits for SHmedia32. ! (movdi_const_32bit): New. ! (shori_media): Require immediate operand. Use `u' for output. ! (movdf_media, movsf_media): Simplified. ! (movdf_media_nofpu, movsf_media_nofpu): New. ! (movdf, movsf): Adjust ! (movv2sf, movv2sf, movv16sf): New. ! (beq_media, beq_media_i): Adjust constraints. Don't use ! scratch BT register. ! (bne_media, bne_media_i): Likewise. ! (bgt_media, bgt_media_i): Likewise. ! (bge_media, bge_media_i): Likewise. ! (bgtu_media, bgtu_media_i): Likewise. ! (bgeu_media, bgeu_media_i): Likewise. ! (beq, bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu, ! bunordered): Emit jump insn. Force operands to registers when ! needed. ! (jump_media, jump): Simplify. ! (call_compact, call_compact_rettramp): New. ! (call_value_compact, call_value_compact_rettramp): New. ! (call_media, call_value_media): Simplify. ! (sibcall_compact, sibcall_media): New. ! (call, call_value): Adjust for SHmedia and SHcompact. ! (sibcall, sibcall_value, untyped_call): Likewise. ! (sibcall_epilogue): Preserve r0 across epilogue for SHcompact. ! (indirect_jump): Adjust for SHmedia. ! (casesi_jump_media): New. ! (nop): Re-enable for SHmedia. ! (call_site): Restrict to SH1. ! (casesi): Adjust for SHmedia. ! (casesi_shift_media, casesi_load_media): New. ! (return): Explicitly use PR register. Call return trampoline ! on SHcompact. ! (return_i): Explicitly use PR register. ! (shcompact_return_tramp, shcompact_return_tramp_i): New. ! (return_media): Adjust. ! (shcompact_incoming_args): New. ! (epilogue): Adjust. ! (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu, sne): Adjust. ! (movstrsi): Disable on SH5. ! (fpu_switch0, fpu_switch1, movpsi): Enable on SH4. ! (addsf3, addsf3_media): Test TARGET_SHMEDIA_FPU. ! (subsf3, subsf3_media): Likewise. ! (mulsf3, mulsf3_media, mac_media): Likewise. ! (divsf3, divsf3_media): Likewise. ! (floatdisf2, floatsisf2_media): Likewise. Adjust constraints. ! (floatsisf2, fux_truncsfsi2): Likewise. ! (fix_truncsfdi2, fix_truncsfsi2_media): Likewise. Adjust ! constraints. ! (cmpeqsf_media, cmpgtsf_media, cmpgesf_media): Likewise. ! (cmpunsf_media, cmpsf): Likewise. ! (negsf2, negsf2_media, sqrtsf2, sqrtsf2_media): Likewise. ! (abssf2, abssf2_media): Likewise. ! (adddf3, adddf3_media, subdf3, subdf3_media): Likewise. ! (muldf3, muldf3_media, divdf3, divdf3_media): Likewise. ! (floatdidf2, floatsidf2_media): Likewise. Adjust constraints. ! (floatsidf2, fix_truncdfsi2): Likewise. ! (fix_truncdfdi2, fix_truncdfsi2_media): Likewise. Adjust ! constraints. ! (cmpeqdf_media, cmpgtdf_media): Likewise. ! (cmpgedf_media, cmpundf_media, cmpdf): Likewise. ! (negdf2, negdf2_media, sqrtdf2, sqrtdf2_media): Likewise. ! (absdf2, absdf2_media): Likewise. ! (extendsfdf2, extendsfdf2_media): Likewise. ! (truncsfdf2, truncsfdf2_media): Likewise. ! * config/sh/sh64.h: New file. ! * config/sh/t-sh64: New file. ! * config/sh/shmedia.h: New file. ! * config/sh/ushmedia.h: New file. ! * config/sh/sshmedia.h: New file. ! * configure.in: Added sh64-*-elf. ! * configure: Rebuilt. ! 2000-10-10 Alexandre Oliva ! * config/sh/sh.c (GEN_MOV, GEN_ADD3, GEN_SUB3): New macros. ! (reg_class_from_letter): Use `b' for TARGET_REGS. ! (print_operand): Support `%M', `%m', `AND' and ! `ASHIFTRT'. Do not precede constants with `#' on SHmedia. ! (andcosts): Adjust for SHmedia. ! (output_stack_adjust, sh_expand_prologue, sh_expand_epilogue): ! Likewise. ! (target_reg_operand): New function. ! * config/sh/sh-protos.h (target_reg_operand): Declare. ! * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Don't disable ! FP registers on SH5. ! (HARD_REGNO_MODE_OK): Accept them whenever they're acceptable ! on SH4. ! (TARGET_REGISTER_P): New macro. ! (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Added TARGET_REGS. ! (FUNCTION_VALUE): Use DImode for promoted types on SHmedia. ! (EXTRA_CONSTRAINT_S): New macro. ! (EXTRA_CONSTRAINT): Adjust. ! (FLOAT_TYPE_SIZE): Define to 32. ! (Pmode): DImode on SHmedia. ! (CONST_COSTS): Adjust for SHmedia literals. ! (PREDICATE_CODES): Added target_reg_operand. ! (PROMOTE_MODE): Promote signed types to DImode on SHmedia. ! * config/sh/sh.md: Remove all attrs from SHmedia insns. ! (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): New insns. ! (cmpdi): Accept SHmedia. ! (movdicc_false, movdicc_true): New insns. ! (movdicc): New expand. ! (adddi3): Accept arith_operand for op2, but FAIL on SH1 if ! no_new_pseudos. ! (addsi3_media): Match `S' constraint. ! (anddi3, andcdi3, iordi3, xordi3, negdi_media): New insns. ! (negdi2): Expand for SHmedia. ! (one_cmpldi2): New expand. ! (zero_extendsidi2): Change from expand to insn. ! (extendsidi2): Add constraints. ! (movdi_media, movsi_media): Change `%x' to `%M'. Use `%m' for ! LD/ST address. Fix SI immediate loading split. ! (movhi_media, movqi_media, lduw, ldub): New insns. ! (movhi, movqi): Accept SHmedia. ! (shori_media, movdi_media): Relax input constraints. Split ! symbolic constants. ! (movdf_media, movsf_media): New insn. New split to movdi. ! (movdf, movsf): Match on SHmedia. ! (beq_media, bne_media, bgt_media, bge_media, bgtu_media, ! bgeu_media): New insns and splits. New insns with `_i' suffix. ! (beq, bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu): Adjust. ! (bunordered): New expand. ! (jump_compact): Renamed from `jump'. ! (jump_media): New insn. ! (jump): New expand. ! (call_media, call_value_media): New insns. ! (call, call_value): Adjust. ! (indirect_jump_compact): Renamed from `indirect_jump'. ! (indirect_jump_media): New insn. ! (indirect_jump): New expand. ! (untyped_call, return): Accept SHmedia. ! (return_media): New insn. ! (prologue, epilogue, blockage): Accept SHmedia. ! (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu, sne): Adjust. ! (sunordered): New expand. ! (addsf3, subsf3, mulsf3, divsf3, floatsisf2, fix_truncsfsi2, ! cmpsf, negsf2, sqrtsf2, abssf2): Adjust for SHmedia. ! (addsf3_media, subsf3_media, mulsf3_media, mac_media, ! divsf3_media, floatdisf2, floatsisf2_media, fix_truncsfdi2, ! fix_truncsfsi2_media, cmpeqsf_media, cmpgtsf_media, ! cmpgesf_media, cmpunsf_media, negsf2_media, sqrtsf2_media, ! abssf2_media): New insns. ! (adddf3, subdf3, muldf3, divdf3, floatsidf2, fix_truncdfsi2, ! cmpdf, negdf2, sqrtdf2, absdf2): Adjust for SHmedia. ! (adddf3_media, subdf3_media, muldf3_media, divdf3_media, ! floatdidf2, floatsidf2_media, fix_truncdfdi2, ! fix_truncdfsi2_media, cmpeqdf_media, cmpgtdf_media, ! cmpgedf_media, cmpundf_media, negdf2_media, sqrtdf2_media, ! absdf2_media): New insns. ! (extendsfdf2, truncdfsf2): Adjust for SHmedia. ! (extendsfdf2_media, truncdfsf2_media): New insns. ! 2000-09-14 Alexandre Oliva ! * config/sh/sh.c (machine_dependent_reorg): On shmedia, skip for now. ! * config/sh/sh.h (CONST_OK_FOR_J): Document. ! (LEGITIMATE_CONSTANT_P): Accept CONST_DOUBLEs on shmedia. ! * config/sh/sh.md (adddi3): New expand. ! (adddi3_media, adddi3z_media): New insns. ! (adddi3_compact): Renamed from adddi3. ! (addsi3_media): Use add.l r63 to add constant zero. ! (subdi3): New expand. ! (subdi3_media): New insn. ! (subdi3_compact): Renamed from subdi3. ! (mulsidi3): New expand. ! (mulsidi3_media): New insn. ! (mulsidi3_compact): Renamed from mulsidi3. ! (umulsidi3): New expand. ! (umulsidi3_media): New insn. ! (umulsidi3_compact): Renamed from umulsidi3. ! (ashlsi3_media, ashrsi3_media, lshrsi3_media): New insns. ! (ashlsi3, ashrsi3, lshrsi3): Use them. ! (ashldi3_media, ashrdi3_media, lshrdi3_media): New insns. ! (ashldi3, ashrdi3, lshrdi3): Use them. ! (zero_extendsidi2): New expand. ! (extendsidi2): New insn. ! (movsi_media): New insn. Split to movdi to load constants. ! (movsi): Enable for shmedia. ! (movdi_media): New insn. Use shori_media to load wide constants. ! (short_media): New insn. ! (movdi): Enable for shmedia. ! 2000-09-08 Alexandre Oliva ! * config/sh/sh.h (CPP_SPEC): Added `m5'. ! (SUBTARGET_CPP_SPEC): Added `!m5'. ! (SH5_BIT, TARGET_SH5, TARGET_SHMEDIA, TARGET_SHCOMPACT): New macros. ! (TARGET_SWITCHES): Added `5' and `5-compact'. Added SH1_BIT ! to all other SH variants. ! (TARGET_DEFAULT): Set to SH1_BIT. ! (OVERRIDE_OPTIONS): Recognize sh5 CPU. ! (BITS_PER_WORD): Raise to 64 on shmedia. ! (MAX_BITS_PER_WORD): Change to 64. ! (MAX_LONG_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): Set to MAX_BITS_PER_WORD. ! (INT_TYPE_SIZE): Keep as 32. ! (UNITS_PER_WORD): Raise to 8 on shmedia. ! (MIN_UNITS_PER_WORD): Keep as 4. ! (POINTER_SIZE): Raise to 64 on shmedia. ! (CONST_OK_FOR_J): New macro. ! (CONST_OK_FOR_LETTER_P): Use it. ! (processor_type): Add PROCESSOR_SH5. ! * config/sh/sh.md: Conditionalize all expands, insns and ! splits to TARGET_SH1. ! (cpu): Added sh5. ! (addsi3_compact): Renamed from... ! (addsi3): Now an expand. ! (addsi3_media, subsi3_media): New insns. ! (subsi3): Don't negate constants with SHmedia. ! * hooks.c: New file. ! * hooks.h: New file. ! * Makefile.in (HOOKS_H): New. ! (TARGET_DEF_H): Added $(HOOKS_H). ! (OBJS): Added hooks.o. ! (cfgcleanup.o, bb-reorder.o): Added target.h. ! (hooks.o): Added dependencies. ! * target-def.h (TARGET_CANNOT_MODIFY_JUMPS_P): New, added to... ! (TARGET_INITIALIZER): this. ! * doc/tm.texi (TARGET_CANNOT_MODIFY_JUMPS_P): Document. ! * target.h (struct gcc_target): Added cannot_modify_jumps_p. ! * bb-reorder.c: Include target.h. ! (reorder_basic_blocks): Skip if cannot modify jumps. ! * cfgcleanup.c: Include target.h. ! (try_optimize_cfg): Skip merge blocking if cannot modify jumps. ! 2002-02-08 Chris Demetriou ! * config/mips/mips.md (casesi_internal, casesi_internal_di): ! Protect jump delay slot instructions with .set noreorder and ! .set nomacro. ! 2002-02-08 Chris Demetriou ! * config/mips/mips.md (casesi_internal_di): Calculate ! the index into the target offset table correctly. ! 2002-02-08 Richard Henderson ! * expr.c (expand_expr): Mind EXPAND_INITIALIZER for truncation also. ! * final.c (output_addr_const): Accept and discard SUBREG. ! * varasm.c (decode_addr_const): Don't abort on unknown expressions -- ! mark them unknown instead. ! (simplify_subtraction): Handle RTX_UNKNOWN. ! (initializer_constant_valid_p): Strip NOP_EXPRs that narrow the mode. ! 2002-02-08 David Edelsohn ! * doc/invoke.texi (RS/6000 and PowerPC Options): Fix typo. ! 2002-02-08 Richard Henderson ! * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_BSS): New. ! 2002-02-08 Andreas Jaeger ! * config.gcc (x86_64-*-linux): Add t-linux64 makefile fragment. ! * config/i386/t-linux64: New file. ! 2002-02-08 Jakub Jelinek ! * c-common.c (c_expand_expr): Revert 2002-02-06 patch. ! * c-parse.in (compstmt): Clear last_expr_type. ! 2002-02-07 Richard Henderson ! * loop.c (strength_reduce): Sink final_value when not ! eliminating a biv. ! 2002-02-07 David O'Brien ! * config/sparc/freebsd.h: Fix mismatched spec {. ! 2002-02-07 Richard Henderson ! * cfgrtl.c: Include recog.h and insn-config.h. ! (keep_with_call_p): Fix general_operand invocation. ! * Makefile.in (cfgrtl.o): Update dependencies. ! 2002-02-07 Kazu Hirata ! * config/h8300/h8300.c (two_insn_adds_subs_operand): Revise a ! comment. Accept HImode only if TARGET_H8300. ! 2002-02-07 Eric Christopher ! * config/mips/crtn.asm: Cleanup #ifdefs. ! 2002-02-07 Eric Christopher ! * config/mips/crti.asm: Add changes for mips16. mips16 uses ! register 7 as RA instead of $31. ! * config/mips/crtn.asm: Ditto. ! * config/mips/mips.c (mips_move_2words): Add case for ! TARGET_MIPS16 when HOST_BITS_PER_WIDE_INT >= 64. ! (compute_frame_size): Fix typo. ! (save_restore_insns): Ditto. Make documentation about using ! register $7 as return register more precise. ! (mips_expand_epilogue): Fix comment. Add code to work around not ! being able to add to the stack pointer directly. ! * config/mips/mips.h (EH_RETURN_DATA_REGNO): Change register number ! to 2 for TARGET_MIPS16 as we need 6 and 7 as clobbers in the ! epilogue. ! 2002-02-07 Tom Rix ! * config/rs6000/rs6000.c (reg_or_aligned_short_operand): New. For ! immediates in ldu and stdu DS opcode field. ! * config/rs6000/rs6000.md (movdi_update, movdi_update1): Use. ! * config/rs6000/rs6000-protos.h: Add reg_or_aligned_short_operand. ! * config/rs6000/rs6000.h (PREDICATE_CODES): Same. ! 2002-02-07 Jeff Sturm ! * config/sparc/sparc.c (compute_frame_size): Don't correct frame ! offset for stack bias. ! 2002-02-07 H.J. Lu ! * config/mips/linux.h (SUBTARGET_ASM_DEBUGGING_SPEC): Defined. ! 2002-02-07 Ulrich Weigand ! * testsuite/gcc.dg/cpp/charconst-2.c: Add -fsigned-char option. ! Thu Feb 7 12:14:17 CET 2002 Jan Hubicka ! * i386-protos.h (x86_order_regs_for_local_alloc): Declare ! * i386.c (x86_order_regs_for_local_alloc): New global function. ! * i386.h (REG_ALLOC_ORDER): CLeanup. ! (ORDER_REGS_FOR_LOCAL_ALLOC): New. ! 2002-02-07 Richard Henderson ! PR optimization/2463 ! * alias.c (find_base_value): Recall base values for fixed hard regs. ! * loop.c (loop_regs_update): Don't use single_set on non-insns. ! 2002-02-07 Alexandre Oliva ! * config/mips/mips.md (define_delay) [mips16]: Adjust required ! length. ! 2002-02-06 Richard Henderson ! PR c/5609 ! * stmt.c (resolve_operand_name_1): Take more care with mixed ! named and unnamed operands. ! 2002-02-06 Janis Johnson ! Jan Hubicka ! * loop.c (remove_constant_addition): Avoid clobbering a shared ! CONST expression. ! 2002-02-06 Ulrich Weigand ! * config.gcc (s390x-*-linux*): Add t-linux64 makefile fragment. ! * config/s390/t-linux64: New file. ! * config/s390/libgcc-glibc.ver: New file. ! 2002-02-06 Ulrich Weigand ! * config/s390/linux64.h: Delete file. ! * config/s390/s390x.h: New file. ! * config.gcc (s390x-*-linux*): Use s390x.h instead of linux64.h ! as target header file. ! * config/s390/linux.h (TARGET_VERSION): Define depending on ! DEFAULT_TARGET_64BIT. ! (CPP_SPEC, ASM_SPEC, LINK_SPEC): Likewise. ! (SIZE_TYPE, PTRDIFF_TYPE): Likewise. ! (NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_PTRDIFF_TYPE): Define. ! (CPP_ARCH31_SPEC, CPP_ARCH64_SPEC): New defines. ! (LINK_ARCH31_SPEC, LINK_ARCH64_SPEC): New defines. ! (EXTRA_SPEC): New define. ! * config/s390/s390.h (TARGET_VERSION): Define depending on ! DEFAULT_TARGET_64BIT. ! (MASK_RETURN_ADDR): Add run-time check for TARGET_64BIT. ! 2002-02-06 Jason Merrill ! * c-decl.c (finish_function): Warn about a non-void function with ! no return statement and no abnormal exit. ! (current_function_returns_abnormally): New variable. ! (start_function): Clear it. ! (struct c_language_function): Add returns_abnormally. ! (push_c_function_context): Save it. ! (pop_c_function_context): Restore it. ! (builtin_function): Set TREE_THIS_VOLATILE on return fns. ! (grokdeclarator): Set C_FUNCTION_IMPLICIT_INT on functions without ! an explicit return type. ! * c-tree.h: Declare current_function_returns_abnormally. ! (C_FUNCTION_IMPLICIT_INT): New macro. ! * c-typeck.c (build_function_call): Set it. ! (c_expand_return): Set current_function_returns_value even if the ! value is erroneous. ! 2002-02-06 Jakub Jelinek ! PR c/5420: ! * c-common.c (c_unsafe_for_reeval): Make COMPOUND_LITERAL_EXPR ! unsafe for reevaluation. ! 2002-02-06 Jakub Jelinek ! PR c/5482: ! * c-common.c (c_expand_expr) [STMT_EXPR]: If last expression is not ! EXPR_STMT, but COMPOUND_STMT, recurse into it. ! 2002-02-06 Richard Henderson ! * cfganal.c (keep_with_call_p): Source for fixed_reg dest must ! be a general_operand. Dest for function value must be a pseudo. ! 2002-02-06 Nick Clifton ! * dbxout.c (dbxout_symbol_location): Accept LABEL_REFs as well ! as SYMBOL_REFs from the constant pool. ! 2002-02-06 Alexandre Oliva ! * dbxout.c (dbxout_parms): Apply DEBUGGER_ARG_OFFSET to parameters ! passed by invisible reference. ! 2002-02-05 Richard Henderson ! * config/sparc/sparc.h (ARG_POINTER_CFA_OFFSET): No stack bias. ! 2002-02-06 Hans-Peter Nilsson ! Implement using "base addresses" in insn operands as default. ! * config/mmix/mmix.c (mmix_conditional_register_usage): if ! -mabi=gnu, modify fixed_regs to fit the GNU ABI. ! (mmix_extra_constraint): Use 'R' to indicate that GETA should be ! used to read the rtx value. ! (mmix_target_asm_function_epilogue): Fix spacing. ! (mmix_constant_address_p): Handle TARGET_BASE_ADDRESSES. ! (mmix_legitimate_address): Ditto. ! (mmix_encode_section_info): Set SYMBOL_REF_FLAG on rtx:es that ! should be loaded with a GETA insn. Don't allocate needless extra ! char for nul termination and fix misleading comment. ! (mmix_print_operand_address): Handle constants if ! TARGET_BASE_ADDRESSES. ! (mmix_output_register_setting): Use base addressing if ! TARGET_BASE_ADDRESSES and the number of insns is 3. ! * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): New. ! * config/mmix/mmix.md ("movdi"): Change the alternative with GETA ! to use R as constraint, add LDA to match s. ! * config/mmix/mmix.h (TARGET_BASE_ADDRESSES): New. ! (TARGET_DEFAULT): Add TARGET_MASK_BASE_ADDRESSES. ! (TARGET_SWITCHES): Add -mbase-addresses, -mno-base-addresses. ! (FIXED_REGISTERS): Make registers $231..$246 fixed by default. ! (MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Move $231..$246 last, in ! order with other fixed registers. ! (MMIX_GNU_ABI_REG_ALLOC_ORDER): Put forward $231, in order with ! other parameter/call-clobbered registers. ! * doc/invoke.texi (Option Summary) : Add ! -mbase-addresses, -mno-base-addresses. ! (MMIX Options): Ditto. ! 2002-02-05 John David Anglin ! * pa.h (PREDICATE_CODES): Add reg_before_reload_operand. ! 2002-02-06 Aldy Hernandez ! * config/rs6000/altivec.h: Change elem to _S_elem. ! 2002-02-05 Jason Thorpe ! * config/netbsd.h (WCHAR_TYPE): Define. ! (WCHAR_TYPE_SIZE): Ditto. ! (WINT_TYPE): Ditto. ! * config/alpha/netbsd.h (WCHAR_TYPE): Remove. ! (WCHAR_UNSIGNED): Ditto. ! (WCHAR_TYPE_SIZE): Ditto. ! (WINT_TYPE): Ditto. ! * config/arm/netbsd.h: Likewise. ! * config/i386/netbsd-elf.h: Likewise. ! * config/i386/netbsd.h: Likewise. ! * config/m68k/netbsd-elf.h: Likewise. ! * config/m68k/netbsd.h: Likewise. ! * config/ns32k/netbsd.h: Likewise. ! * config/sparc/netbsd.h: Likewise. ! * config/vax/netbsd.: Likewise. ! 2002-02-05 Alexandre Oliva ! * target.h (struct gcc_target): Added ms_bitfield_layout_p. ! * target-def.h (TARGET_MS_BITFIELD_LAYOUT_P): New. Added to... ! (TARGET_INITIALIZER): this. ! * doc/tm.texi (TARGET_MS_BITFIELD_LAYOUT_P): Document. ! (BITFIELD_NBYTES_LIMITED): Markup fix. ! * tree.h (default_ms_bitfield_layout_p): Declare. ! (record_layout_info): Added prev_field. ! * tree.c (default_ms_bitfield_layout_p): New fn. ! * c-decl.c (finish_struct): Disregard EMPTY_FIELD_BOUNDARY and ! PCC_BITFIELD_TYPE_MATTERS for MS bit-field layout. ! * stor-layout.c: Include target.h. ! (start_record_layout): Initialize prev_field. ! (place_field): Handle MS bit-field layout, and disregard ! EMPTY_FIELD_BOUNDARY, BITFIELD_NBYTES_LIMITED and ! PCC_BITFIELD_TYPE_MATTERS in this case. Update prev_field. ! * Makefile.in (stor-layout.o): Adjust dependencies. ! 2002-02-05 Jason Merrill ! * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle. ! 2002-02-05 Andreas Jaeger ! * crtstuff.c: Fix comments. ! 2002-02-05 Richard Henderson ! PR fortran/3393 ! * loop.c (loop_iv_add_mult_emit_before): Copy multiplier as well. ! (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. ! PR fortran/3392 ! * config/mips/mips.c (function_arg): Handle TImode. ! (function_arg_advance): Likewise. ! 2002-02-05 Aldy Hernandez ! * config/rs6000/altivec.h (vec_step_help): Rename to ! __vec_step_help. ! 2002-02-05 Aldy Hernandez ! * config/rs6000/altivec.h: Fix typos. ! 2002-02-05 Jason Thorpe ! * config/arm/netbsd.h: Correct a comment. ! 2002-02-05 Aldy Hernandez ! * config/rs6000/rs6000.c (altivec_init_builtins): Fix typo ! building void typed builtins. ! * config/rs6000/altivec.h (vec_ld*): Fix typos. ! (vec_step): Implement for C++. ! Mon Feb 4 19:23:19 2002 Richard Kenner ! * final.c (final_scan_insn): Add case for NOTE_INSN_LOOP_END_TOP_COND. ! 2002-02-04 Richard Henderson ! * combine.c (nonzero_bits): Re-introduce special case for ! sp/fp/ap wrt REGNO_POINTER_ALIGN. ! 2002-02-05 Aldy Hernandez ! * doc/extend.texi: Warn about unsupported usage of altivec ! builtins. ! * config/rs6000/rs6000.md (altivec_vcmp*_p): Remove. ! (altivec_predicate_*): New. ! * config/rs6000/altivec.h: Rewrite predicates to use new builtins. ! Add C++ version of vec_*() functions. ! * config/rs6000/rs6000.c (bdesc_altivec_preds): New. ! (bdesc_2arg): Remove altivec predicates. ! (altivec_expand_builtin): Handle predicates. ! (altivec_init_builtins): Handle predicates. ! (altivec_expand_predicate_builtin): New. ! 2002-02-04 John David Anglin ! * pa.c (DO_FRAME_NOTES): Move forward. ! (store_reg): Revise handling of frame notes. ! (load_reg): Likewise. ! (set_reg_plus_d): Likewise. ! (hppa_expand_prologue): Likewise. ! (hppa_expand_epilogue): Likewise. ! 2002-02-04 John David Anglin ! * unwind-dw2-fde-glibc.c: Define _GNU_SOURCE if not defined. ! 2002-02-04 Jakub Jelinek ! PR c/4475, c++/3780: ! * c-common.def (SWITCH_STMT): Add SWITCH_TYPE operand. ! * c-common.h (SWITCH_TYPE): Define. ! * c-typeck.c (c_start_case): Set SWITCH_TYPE. ! * stmt.c (all_cases_count): Set lastval to thisval at end of loop. ! Rename spareness variable to sparseness. ! (expand_end_case_type): Renamed from expand_end_case, use orig_type ! if non-NULL instead of TREE_TYPE (orig_index). ! * tree.h (expand_end_case_type): Renamed from expand_end_case. ! (expand_end_case): Define using expand_end_case_type. ! * c-semantics.c (genrtl_switch_stmt): Pass SWITCH_TYPE ! to expand_end_case_type. ! * doc/c-tree.texi (SWITCH_STMT): Document SWITCH_TYPE. ! 2002-02-04 John David Anglin ! * pa.h (PREFERRED_STACK_BOUNDARY): Define to match standard rounding. ! (BIGGEST_ALIGNMENT): Change to 128. ! 2002-02-04 John David Anglin ! * pa32-linux.h (LINK_COMMAND_SPEC): Define. ! 2002-02-04 John David Anglin ! * pa.md (call_internal_reg_64bit): Remove unused variable. ! 2002-02-04 Nick Clifton ! * config/arm/arm.h (machine_function): Add uses_anonymous_args ! field. ! (SETUP_INCOMING_VARARGS): Set uses_anonymous_args. ! * config/arm/arm.c (current_function_anonymous_args): Delete, ! replace uses with cfun->machine->uses_anonymous_args. ! (arm_reorg): Do not reset uses_anonymous_args. ! * config/arm/arm.c (arm_hard_regno_mode_ok): Allow any value in ! any geenral register. ! 2001-02-04 Bernd Schmidt ! * cfgrtl.c (force_nonfallthru_and_redirect): Don't try to redirect ! the entry block. ! 2002-02-04 Richard Henderson ! * combine.c (force_to_mode): Remove STACK_BIAS code. ! (nonzero_bits): Likewise. Replace sp/fp special case with ! REGNO_POINTER_ALIGN. ! * config/sparc/sparc.h (FRAME_POINTER_REGNUM): Change to SFP. ! (HARD_FRAME_POINTER_REGNUM): New. ! (FIRST_PSEUDO_REGISTER, REG_CLASS_CONTENTS): Update. ! (FIXED_REGS, CALL_USED_REGS): Update. ! (REG_ALLOC_ORDER, REGISTER_NAMES): Update. ! (CONDITIONAL_REGISTER_USAGE): Update for HFP. ! (HARD_REGNO_NREGS): Update for SFP. ! (STACK_POINTER_OFFSET): Include bias here ... ! (FIRST_PARM_OFFSET): ... not here. ! (STACK_BIAS): Remove. ! (INIT_EXPANDERS): New. ! (STARTING_FRAME_OFFSET): Do not include bias. ! (ELIMINABLE_REGS, CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET): New. ! (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P): Update for SFP. ! (REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P): Likewise. ! * config/sparc/aout.h (DBX_REGISTER_NUMBER): Update for HFP. ! * config/sparc/litecoff.h, config/sparc/sol2.h: Likewise. ! * config/sparc/sparc.c (mem_min_alignment): Update for HFP. ! (sparc_nonflat_function_prologue, epilogue_renumber): Likewise. ! (MUST_SAVE_REGISTER): Likewise. ! (sparc_flat_function_prologue): Likewise. ! (sparc_flat_function_epilogue): Likewise. ! (HARD_FRAME_POINTER_MASK): Rename from FRAME_POINTER_MASK. ! (sparc_init_modes): SFP is GENERAL_REGS. ! (sparc_builtin_saveregs): SFP does not have bias applied. ! 2002-02-04 Richard Henderson ! * config/alpha/alpha.c (current_function_is_thunk): Don't check ! current_function_is_thunk. ! (alpha_sa_mask): Distinguish between current_function_is_thunk ! called from ASM_OUTPUT_MI_THUNK and not. ! (alpha_does_function_need_gp): Thunks always need gp. ! (alpha_start_function, alpha_output_function_end_prologue): Likewise. ! (alpha_output_mi_thunk_osf): New. ! * config/alpha/alpha-protos.h: Update. ! * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): New. ! 2002-02-04 Richard Sandiford ! * c-typeck.c (build_c_cast): Warn when qualifiers are added to ! function types, not when they're taken away. ! Mon Feb 4 09:05:58 2002 Jeffrey A Law (law@redhat.com) ! * cfgrtl.c (try_redirect_by_replacing_jump): Remove associated ! CODE_LABEL and jump table when replacing a table jump with a ! simple jump. ! 2002-02-04 Ulrich Weigand ! * config/s390/s390-protos.h (legitimize_la_operand, ! s390_secondary_input_reload_class, s390_plus_operand, ! s390_expand_plus_operand): Add prototypes. ! config/s390/s390.c (s390_secondary_input_reload_class, ! s390_plus_operand, s390_expand_plus_operand): New functions. ! (struct s390_address): New member 'pointer'. ! (s390_decompose_address): Compute it. ! (legitimate_la_operand_p): Use it. ! (legitimize_la_operand): New function. ! (movti, movdi, movdf splitters): Call it. ! config/s390/s390.h (SECONDARY_INPUT_RELOAD_CLASS): Define. ! (PREDICATE_CODES): Add s390_plus_operand. ! config/s390/s390.md (adddi3_inv_64, addaddr_ccclobber): Delete. ! (la_ccclobber): Allow GENERAL_REGS as output operand. ! (reload_load_address, *reload_load_address_reg_0, *la, *do_la_reg_0, ! *reload_la_64, *reload_la_31 and splitters): Delete, replace by ... ! (*la_64, *la_31, reload_indi, reload_insi): ... these. ! 2002-02-04 Ulrich Weigand ! * gcc/config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Fixed ! register names for regular asm () construct. ! 2002-02-04 Jakub Jelinek ! * config/i386/i386.md (movsf_1): Allow moving SF values in MMX ! registers. ! 2002-02-04 Jakub Jelinek ! * combine.c (recog_for_combine): Create a dummy insn with PATTERN ! pat for recog. ! 2002-02-04 Hartmut Penner ! * varasm.c (decode_rtx_const): Allow unspec (symbol_ref) in ! constant pool to be identical by string address and index. ! 2002-02-04 Anthony Green ! * output.h (SECTION_OVERRIDE): Define. ! * varasm.c (named_section): Obey SECTION_OVERRIDE. ! 2002-02-03 Jason Thorpe ! * config.gcc (arm*-*-netbsdelf*): Placeholder to prevent match ! by existing arm*-*-netbsd* (a.out) target. ! (ns32k-*-netbsdelf*): Likewise. ! (sparc-*-netbsdelf*): Likewise. ! (vax-*-netbsdelf*): Likewise. ! 2002-02-03 Danny Smith ! * gthr-win32.h: Protect against conflicting typedef for BOOL in windows ! headers and libobjc headers. ! 2002-02-03 Mumit Khan ! * gthr-win32.h (__mingwthr_key_dtor): Use extern "C" linkage for C++. ! (_mingw.h): Remove duplicate include. ! 2002-02-03 Jason Thorpe ! * config.gcc: Set cpu_type to m68k for 68010, as well. ! (m68010-*-netbsdelf*): New... ! (m68k*-*-netbsdelf*): ...targets. ! * config/m68k/netbsd-elf.h: New file. ! 2002-02-02 Kazu Hirata ! * config/h8300/h8300.c (hand_list): Move inside function_arg. ! 2002-02-02 Kazu Hirata ! * config/h8300/h8300.c (h8_push_ops): Move inside ! h8300_init_once. ! (h8_pop_ops): Likewise. ! (h8_move_ops): Likewise. ! 2002-02-02 Kazu Hirata ! * config/h8300/h8300.c (os_task): Make it static. ! (monitor): Likewise. ! (pragma_saveall): Likewise. ! 2002-02-02 Alexandre Oliva ! * config/sh/sh.md (ic_invalidate_line): Make sure the immediate ! constant is a valid sign-extension for Pmode. ! 2002-02-02 Kazu Hirata ! * config/h8300/h8300.c: Fix formatting. ! 2002-02-02 Kazu Hirata ! * config/h8300/h8300.md: Fix formatting. ! 2002-02-02 Kazu Hirata ! * config/h8300/h8300.md (one_cmpl patterns): Tighten the ! predicates of operands[1]. Split the patterns for each ! processor variant. ! 2002-02-02 Kazu Hirata ! * config/h8300/h8300.md (xor patterns): Tighten the predicates ! of operands[1] to register_operand. ! 2002-02-02 Neil Booth ! * cpphash.h (struct spec_nodes): Remove n__CHAR_UNSIGNED__. ! * cpphash.c (_cpp_init_hashtable): Similarly. ! * cppinit.c (cpp_create_reader): Default the signed_char flag. ! (init_builtins): Define __CHAR_UNSIGNED__ appropriately. ! (COMMAND_LINE_OPTIONS): Recognise -f{un,}signed-char. ! (cpp_handle_option): Handle the new options. ! * cpplex.c (cpp_interpret_charconst): Use new flag. ! * cpplib.h (struct cpp_options): New member signed_char. ! * gcc.c (cpp_unique_options): Remove %c spec and documentation. ! (cpp_options): Handle -fsigned-char and -funsigned-char. ! (static_specs): Remove signed_char_spec. ! (do_spec1): Don't handle %c. ! * system.h: Poison SIGNED_CHAR_SPEC. ! * tradcif.y (yylex): Use flag_signed_char. ! * tradcpp.h (flag_signed_char): New. ! * tradcpp.c (flag_signed_char): New. ! (main): Handle new command-line options. ! (initialize_builtins): Define __CHAR_UNSIGNED__ if appropriate. ! config: ! * alpha/alpha.h (SIGNED_CHAR_SPEC): Remove. ! * avr/avr.h: Remove old comments. ! * i960/i960.h (CPP_SPEC): Pass -fsigned-char if -mic*. ! (CC1_SPEC): Pass -fsigned-char if -mic*. ! (SIGNED_CHAR_SPEC): Remove. ! doc: ! * tm.texi (SIGNED_CHAR_SPEC): Remove documentation. ! 2002-02-01 Eric Christopher ! From Daniel Jacobowitz ! * config/mips/mips.h (FUNCTION_PROFILER): Fix function profiling. ! * config/mips/linux.h (ASM_OUTPUT_REG_PUSH): Undefine. ! (ASM_OUTPUT_REG_POP): Ditto. ! 2002-02-02 Neil Booth ! * c-decl.c, tree.c, tree.h, objc/objc-act.c: Revert bitfield ! patch. ! 2002-02-02 Jakub Jelinek ! * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Add missing | separators. ! 2002-02-02 Jakub Jelinek ! PR c/5304: ! * expmed.c (expand_mult_highpart): Use immed_double_const for wide_op1 ! unconditionally. ! 2002-02-01 Janis Johnson ! * cfganal.c: Include tm_p.h. ! (keep_with_call_p): Fix the test that determines if a register holds ! the return value of a call. ! 2002-02-01 DJ Delorie ! * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): If ! we are given conflicting registers, switch to the other one we ! had allocated for us. ! * config/sparc/sparc.md (reload_indi, reload_outdi): Pass op[2] ! as TImode so we know when the "other" register is available. ! 2002-02-01 David O'Brien ! * config/sparc/sol2-sld-64.h: Include sparc/biarch64.h rather than ! sparc/sparc_bi.h. ! 2002-02-01 Janis Johnson ! * cfganal.c (keep_with_call_p): New function. ! (flow_call_edges_add): Prevent splitting a block between a call and ! a single-set instruction that should be kept in the same block. ! 2002-02-01 Craig Rodrigues ! * doc/install.texi (avr): Update outdated URL. ! 2002-01-30 Andrew Haley ! * config/stormy16/stormy16.md (pushqi): New. ! (popqi): New. ! (pushhi): New. ! (pophi): New. ! (movhi): Remove stack operands. ! (movqi): Likewise. ! * config/stormy16/stormy16.h (PREDICATE_CODES): Add ! nonimmediate_nonstack_operand. ! * config/stormy16/stormy16.c (nonimmediate_nonstack_operand): ! New. ! * config/stormy16/stormy16-protos.h (nonimmediate_nonstack_operand) ! New. ! 2002-01-31 Jason Merrill ! * Makefile.in (c-parse.c): Handle .output file. ! * objc/Make-lang.in (objc-parse.c): Likewise. ! 2002-02-01 Alexandre Oliva ! * config/mips/mips.h (ENDIAN_SPEC): Output the endianness flag if ! the -me[lb] option is given. Don't output the default flag ! twice. ! 2002-01-31 Zack Weinberg ! * c-lex.c (yyparse): Call debug_hooks->start_source_file for ! the primary source file; this has not been done yet. ! * c-decl.c (c_expand_body): Reset input_filename from ! DECL_SOURCE_FILE (fndecl) before calling init_function_start. ! 2002-01-31 Kazu Hirata ! * rtlanal.c (subreg_regno_offset): Do not use ! SUBREG_REGNO_OFFSET. ! * system.h: Add SUBREG_REGNO_OFFSET to the GCC poison list. ! * doc/tm.texi (SUBREG_REGNO_OFFSET): Remove. ! 2002-01-31 Joseph S. Myers ! * gccbug.in: Follow GNU Coding Standards for --version. Use GCC ! version rather than GNATS version in --version output. ! 2002-01-31 Richard Sandiford ! * ifcvt.c (noce_process_if_block): Make a copy of the destination ! when copying back from a temporary. ! 2002-01-30 Richard Henderson ! * ifcvt.c (dead_or_predicable): Handling merging when other_bb ! and new_dest are the same. ! 2002-01-30 Richard Henderson ! PR opt/5076 ! * rtl.h (NOTE_INSN_LOOP_END_TOP_COND): New. ! * rtl.c (note_insn_name): Update. ! * emit-rtl.c (remove_unnecessary_notes): Kill it. ! * stmt.c (expand_end_loop): Kill jump opt code. Use LOOP_END_TOP_COND ! to perform loop rotation. ! (expand_exit_loop_top_cond): New. ! * tree.h (expand_exit_loop_top_cond): Declare it. ! * c-semantics.c (genrtl_while_stmt): Use it. ! (genrtl_for_stmt): Likewise. ! 2002-01-30 Alexandre Oliva ! * config/mips/mips.h (PARM_BOUNDARY): Guarantee alignment of ! arguments to 64-bit boundaries on 64-bit ABIs. ! 2002-01-30 Steve Ellcey ! * loop.c (loop_invariant_p): Special case pic_offset_table_rtx. ! 2002-01-31 Joseph S. Myers ! * c-decl.c (grokdeclarator): Handle type being a typedef for an ! invalid type. ! 2002-01-30 David O'Brien ! * config.gcc: Include sparc/biarch64.h rather than sparc/sparc_bi.h. ! * config/sparc/sparc_bi.h: Remove file. ! * config/sparc/biarch64.h: New file (rename of sparc_bi.h). ! 2002-01-30 Richard Henderson ! * sched-deps.c (sched_analyze): Make a call read the frame pointer. ! 2002-01-30 Zack Weinberg ! * expmed.c (emit_store_flag): Call protect_from_queue on op0 and op1. ! 2002-01-30 Jason Merrill ! * dwarf2out.c (dwarf_cfi_name): Add other DWARF 3 codes. ! (output_cfi): Likewise. Disable DW_CFA_GNU_negative_offset_extended. ! (reg_save): Use DW_CFA_offset_extended_sf instead. ! * dwarf2out.c (dwarf2out_finish): Don't abort if there were errors. ! 2002-01-29 Jakub Jelinek ! * cselib.c (cselib_record_sets): Use IF_THEN_ELSE result ! in cselib_lookup. ! 2002-01-29 Aldy Hernandez ! * rs6000.md ("*call_value_local32"): Remove constraints. ! ("*call_value_local64"): Same. ! ("*call_value_indirect_nonlocal_aix32"): Same. ! ("*call_value_nonlocal_aix32"): Same. ! ("*call_value_indirect_nonlocal_aix64"): Same. ! ("*call_value_nonlocal_aix64"): Same. ! ("*call_value_nonlocal_sysv"): Same. ! 2002-01-29 Richard Henderson ! * config/alpha/elf.h (SDB_DEBUGGING_INFO): Undef. ! 2002-01-29 Richard Henderson ! * expr.c (force_operand): Ignore flag_pic for detecting pic ! address loads. ! * regclass.c (init_reg_sets_1): Test fixed_regs not flag_pic ! for determining if PIC_OFFSET_TABLE_REGNUM is call-clobbered. ! * resource.c (mark_target_live_regs): Use regs_invalidated_by_call ! instead of open-coded loop. ! * doc/tm.texi (PIC_OFFSET_TABLE_REGNUM): Clarify that it must ! be fixed when in use. ! 2002-01-29 Richard Henderson ! * sched-int.h (struct deps_reg): Add uses_length, clobbers_length. ! * sched-rgn.c (propagate_deps): Update them. ! * sched-deps.c (sched_analyze_insn): Update them. Flush the ! clobbers list when either gets too long. ! 2002-01-29 Jakub Jelinek ! * config/i386/i386.h (LIMIT_RELOAD_CLASS): Handle LEGACY_REGS ! and INDEX_REGS the same as GENERAL_REGS. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. ! 2002-01-29 Neil Booth ! * tree.c (build_nonstandard_integer_type): Correct prototype. ! 2002-01-29 Ulrich Weigand ! * config/s390/s390.md (movstrsico, movstrdix_64, ! movstrsix_31): Remove, replace by ... ! (movstrdi_short, movstrsi_short, movstrdi_long, ! movstrsi_long): ... these. New. ! (movstrdi, movstrsi): Adapt. ! (rotldi3, rotlsi3, ashldi3, *ashldi3_31, *ashldi3_64, ! ashlsi3, lshrdi3, *lshrdi3_31, *lshrdi3_64, lshrsi3): ! Remove unnecessary CC clobber. ! (*ashrdi3_cc_31, *ashrdi3_cconly_31, *ashrdi3_cc_64, ! *ashrdi3_cconly_64, *ashrsi3_cc, *ashrsi3_cconly): New. ! (divmoddi4): Don't partially initialize TImode register. ! 2002-01-29 Geoffrey Keating ! * doc/sourcebuild.texi (C Tests): Document gcc.dg/debug directory. ! 2002-01-29 Richard Henderson ! * flow.c (print_rtl_and_abort): Remove. ! (print_rtl_and_abort_fcn): Remove. ! (verify_local_live_at_start): Use dump_bb instead. ! (verify_wide_reg): Likewise. Take a basic_block, not rtl endpoints. ! (verify_wide_reg_1): Return 2 on mode test failure. ! 2002-01-29 Neil Booth ! PR c/3325, c/3326, c/2511, c/3347 ! * c-decl.c (enum_decl_context): Remove BITFIELD. ! (grokdeclarator): Take bitfield width as an input. ! Ensure bitfields are given the correct type. Perform ! bitfield width validation with build_bitfield_integer_type ! rather than waiting for finish_struct. ! (grok_typename, grok_typename_in_parm_context, start_decl, ! push_parmdecl, grokfield, start_function): Update calls to ! grokdeclarator. ! (build_bitfield_integer_type): New function. ! (finish_struct): Move bitfield validation to grokdeclarator ! and build_bitfield_integer_type. ! * tree.c (build_nonstandard_integer_type): New function. ! * tree.h (build_nonstandard_integer_type): New prototype. ! objc: ! * objc-act.c (objc_copy_list): Remove DECL_INITIAL kludge. ! 2002-01-29 Jakub Jelinek ! PR other/1502: ! * cppinit.c (cpp_handle_option): Add ignore argument, if it is zero, ! don't ignore unrecognized -W* options. ! (cpp_handle_options): Pass 1 as last argument to cpp_handle_option. ! * cpplib.h (cpp_handle_option): Adjust prototype. ! * c-decl.c (c_decode_options): Pass 0 as last argument to ! cpp_handle_option. ! PR c/2896: ! * gcc.c (cpp_unique_options): Split from cpp_options. ! (cpp_options): Source cpp_unique_options. ! (default_compilers): Use cpp_unique_options instead of cpp_options ! when used together with cc1_options. ! (static_specs): Add cpp_unique_options. ! * objc/lang-specs.h: Use cpp_unique_options instead of cpp_options ! when used together with cc1_options. ! 2002-01-29 Kazu Hirata ! * config/h8300/h8300-protos.h: Update the prototype of ! output_a_shift. ! * config/h8300/h8300.c (output_a_shift): Remove an unused ! argument 'insn'. Remove redundant code. ! * config/h8300/h8300.md: Adust to the new prototype of ! output_a_shift. ! 2002-01-29 Kazu Hirata ! * config/h8300/h8300-protos.h: Update the prototypes of ! emit_a_rotate and expand_a_rotate. ! * config/h8300/h8300.c (emit_a_rotate): Change the type of the ! first argument to 'enum rtx_code'. ! (expand_a_rotate): Likewise. ! 2002-01-28 Kazu Hirata ! * config/h8300/h8300-protos.h: Update the prototype of ! output_simode_bld. ! * config/h8300/h8300.c (output_simode_bld): Remove an argumen ! 'log2'. ! * config/h8300/h8300.md: Adjust to the new prototype. ! 2002-01-28 Kazu Hirata ! * conifg/h8300/h8300.c (h8300_adjust_insn_length): Remove ! redundant code. ! 2002-01-28 John David Anglin ! * emit-rtl.c (gen_rtx_REG): Check that the PIC_OFFSET_TABLE_REGNUM ! is a fixed register before returning pic_offset_table_rtx. ! * loop.c (scan_loop): Don't hoist insns that set pic_offset_table_rtx ! when PIC_OFFSET_TABLE_REG_CALL_CLOBBERED is defined. ! 2002-01-28 Jason Merrill ! * dwarf2.h: Sync with src version. ! 2002-01-28 Paul Koning ! * builtin-types.def (BT_FN_VOID_CONST_PTR_VAR): Replace ! BT_FN_VOID_PTR_VAR. ! * builtins.def (BUILT_IN_PREFETCH): Change first argument to be const. ! * doc/extend.texi (__builtin_prefetch): Update documentation: ! first argument is now const void ptr. ! 2002-01-28 Kazu Hirata ! * config/h8300/h8300-protos.h: Remove an unused prototype. ! 2002-01-28 Roman Zippel ! * toplev.c (lang_independent_init): Round up identifier size. ! 2002-01-28 Richard Earnshaw ! * config.gcc: Revert previous change. ! 2002-01-28 Andris Pavenis ! * config/i386/djgpp.h: Use STRIP_NAME_ENCODING in macro UNIQUE_SECTION ! 2002-01-28 Richard Earnshaw ! * config.gcc (*-*-netbsdelf*): Set up generic parameters. ! (*-*-netbsd*): Always use collect2. Remove collect2 settings from ! other non-elf netbsd config frags. ! * config/netbsd-aout.h (STARTFILE_SPEC): Don't pull in c++rt0 since ! collect2 will does that. ! * config/netbsd.h (LIBGCC_SPEC): Add white space before -lgcc, so that ! shared-lib frobbing will work. ! 2002-01-28 Kazu Hirata ! * config/h8300/h8300.h: Fix formatting. ! * config/h8300/h8300.md: Likewise. ! 2002-01-28 Loren J. Rittle ! * fixinc/inclhack.def (strict_ansi_not): Add a bypass based on ! the old, removed AAA_standards fix. ! * fixinc/fixincl.x: Rebuilt. ! 2002-01-28 Hans-Peter Nilsson ! * config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Change to emit ! atexit call in crtbegin, hooked in after call to frame_dummy; ! register EH before registering __fini__start. ! 2002-01-28 Aldy Hernandez ! * config/rs6000/altivec.h: Remove spurious semicolons. ! 2002-01-27 Kazu Hirata ! * config/h8300/h8300.md: Replace dead bit extraction patterns ! with ones that work. ! Sun Jan 27 13:23:40 2002 Richard Kenner ! * emit-rtl.c (get_mem_attrs): Don't default alignment for non-BLKmode ! if not STRICT_ALIGNMENT. ! * rtl.h (MEM_ALIGN): Likewise. ! 2002-01-27 Craig Rodrigues ! * doc/invoke.texi (-fdump-translation-unit): Revert this ! patch: 2001-10-21 Craig Rodrigues ! 2002-01-27 Kazu Hirata ! * config/h8300/h8300.md (define_constants): New. ! (anonymous patterns) Use defined constants appropriately. ! 2002-01-27 Kazu Hirata ! * config/h8300/h8300.c (function_arg): Remove redundant code. ! 2002-01-26 Richard Henderson ! * sched-deps.c (reg_pending_uses_head): New. ! (reg_pending_barrier): Rename from reg_pending_sets_all. ! (find_insn_list): Don't mark inline. ! (find_insn_mem_list): Remove. ! (add_dependence_list, add_dependence_list_and_free): New. ! (flush_pending_lists): Replace only_write param with separate ! for_read and for_write parameters. Update all callers. Use ! add_dependence_list_and_free. ! (sched_analyze_1): Do not add reg dependencies here; just set ! the pending bits. Use add_dependence_list. ! (sched_analyze_2): Likewise. ! (sched_analyze_insn): Replace schedule_barrier_found with ! reg_pending_barrier. Add all dependencies for pending reg ! uses, sets, and clobbers. ! (sched_analyze): Don't add reg dependencies for calls, just ! set pending bits. Use regs_invalidated_by_call. Treat ! sched_before_next_call as a normal list, not a fake insn. ! (init_deps): No funny init for sched_before_next_call. ! (free_deps): Free pending mems lists. Don't zero reg_last. ! (init_deps_global): Init reg_pending_uses. ! (finish_deps_global): Free it. ! * sched-int.h (deps): Make in_post_call_group_p boolean. Update docs. ! (find_insn_mem_list): Remove. ! * sched-rgn.c (concat_INSN_LIST, concat_insn_mem_list): New. ! (propagate_deps): Use them. Zero temp mem lists. ! 2002-01-26 Richard Henderson ! * Makefile.in (CRTSTUFF_CFLAGS): New. ! (crtbegin.o, crtend.o, crtbeginS.o, crtendS.o, crtbeginT.o): Use it. ! * config.gcc (alpha-linux, alpha-freebsd, alpha-netbsd): Use plain ! crtstuff.c instead of alpha assembly version. ! * crtstuff.c (CRT_CALL_STATIC_FUNCTION): Rewrite to assume the ! entire dummy function sequence. Use FORCE_CODE_SECTION_ALIGN ! not FORCE_{INIT,FINI}_SECTION_ALIGN. ! (__do_global_dtors_aux): Mark used. ! (frame_dummy, __do_global_ctors_aux): Mark used. ! (fini_dummy, init_dummy): Remove. ! * config/alpha/crtbegin.asm: Remove file. ! * config/alpha/crtend.asm: Remove file. ! * config/alpha/t-crtbe: Remove file. ! * config/alpha/elf.h (CRT_CALL_STATIC_FUNCTION): New. ! (LINK_EH_SPEC): New. ! * config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Rewrite old ! FORCE_INIT_SECTION_ALIGN hack. Register __fini_start before ! calling constructors. ! * config/cris/linux.h (CRT_CALL_STATIC_FUNCTION): Undef. ! * config/i386/i386.h (CRT_CALL_STATIC_FUNCTION): New. ! * config/i386/linux.h (CRT_CALL_STATIC_FUNCTION): Replace old ! CRT_END_INIT_DUMMY hack. ! * config/i386/sol2.h (FORCE_CODE_SECTION_ALIGN): Replace ! FORCE_{INIT,FINI}_SECTION_ALIGN. ! * config/mcore/mcore-elf.h (FORCE_CODE_SECTION_ALIGN): Replace ! FORCE_{INIT,FINI}_SECTION_ALIGN. ! * config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Update for new ! invocation sequence. ! * config/sh/sh.h (CRT_CALL_STATIC_FUNCTION): Likewise. ! * doc/tm.texi (CRT_CALL_STATIC_FUNCTION): Update. ! (FORCE_CODE_SECTION_ALIGN): New. ! 2002-01-26 Richard Henderson ! * config/cris/cris.c (cris_print_operand): Handle 64-bit CONST_INT. ! 2002-01-26 Richard Henderson ! * config/alpha/alpha.c (alpha_sa_mask): Mark RA for unicos here too. ! (alpha_sa_size): Use alpha_sa_mask to compute size of saved regs. ! 2002-01-26 Kazu Hirata ! * config/h8300/h8300.md: Remove bit extraction patterns that ! cannot be triggered. ! Restrict each bit extraction pattern to a variant on which the ! pattern is tested. ! 2002-01-26 Joseph S. Myers ! * doc/include/texinfo.tex: Update to version 2002-01-04.07. ! 2002-01-26 Kazu Hirata ! * config/h8300/h8300.md: Remove bit test patterns that cannot ! be triggered. ! Restrict each bit test pattern to a variant on which the ! pattern is tested. ! 2002-01-26 Kaveh R. Ghazi ! * builtins.c (expand_builtin_strncat): Remove redundant check for ! INTEGER_CST. ! 2002-01-25 David O'Brien ! * config/i386/x86-64.h (DEFAULT_PCC_STRUCT_RETURN): Do not overide ! default setting. ! * config/i386/freebsd64.h (DEFAULT_PCC_STRUCT_RETURN): Do not override ! existing setting. ! 2002-01-25 Geoffrey Keating ! * dbxout.c (dbxout_init): Use assemble_name rather than just ! stripping off the first character. ! (dbxout_source_file): Likewise. ! 2002-01-25 DJ Delorie ! * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Compare ! using rtx_equal_p, not by comparing pointers. ! 2002-01-25 Steve Ellcey ! * emit-rtl.c (gen_rtx_REG): Always return the same rtx ! for PIC_OFFSET_TABLE_REGNUM. ! (init_emit_once): Use gen_raw_REG to initialize pic_offset_table_rtx. ! 2002-01-25 David O'Brien ! * config.gcc (x86_64-*-freebsd*): New target. ! (x86_64-*-netbsd*,x86_64-*-linux*): Use ${tm_file} rather than its ! value. ! (i[34567]86-*-freebsd*): Don't include svr4.h. ! * config/i386/freebsd64.h: New file. ! 2002-01-25 Douglas B Rupp ! * config/alpha/x-vms (version): Make static. ! * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Fix error ! in previous checkin. ! * Makefile.in (install-headers-cp): New target. ! * config.gcc (alpha-dec-*vms*): Install headers with ! install-headers-cp ! Fri Jan 25 22:42:49 CET 2002 Jan Hubicka ! * unroll.c (unroll_loop): Lower final_value to nonmemory operand; ! avoid it's copies. ! Fri Jan 25 08:26:19 2002 Richard Kenner ! * builtins.c (expand_builtin_strncpy): Use integer_zerop instead ! of compare_tree_int. ! (expand_builtin_strncat): Likewise. ! * c-decl.c (finish_struct): Use tree_low_cst. ! * tree.h (compare_tree_int): Arg is unsigned HOST_WIDE_INT. ! * tree.c (compare_tree_int): Likewise. ! 2002-01-25 Ulrich Weigand ! * reload1.c (eliminate_regs_in_insn): Recognize frame pointer ! adjustments even if they are implemented by more than two insns. ! Fri Jan 25 20:43:56 CET 2002 Jan Hubicka ! * df.c (df_ref_create, df_ref_record_1, df_ref_record): Kill BB arg. ! * df.h (struct ref): Kill B. ! (DF_REF_BB, DF_REF_BBNO): Use BLOCK_FOR_INSN. ! * basic-block.h (PROP_EQUAL_NOTES): New flag. ! * flow.c (propagate_one_insn): Use it. ! (mark_used_regs): Handle NIL. ! 2002-01-25 Geoffrey Keating ! * config/stormy16/stormy16.md (tablejump_pcrel): Use a MEM ! to help folding. ! 2002-01-25 David Edelsohn ! * rs6000.md (prefetch): Make address V4SI mode so that the address ! is restricted to legitimate form for instruction. ! 2002-01-25 Bob Wilson ! * doc/install.texi (xtensa-*-elf): New target. ! (xtensa-*-linux*): New target. ! * doc/contrib.texi: Add myself. ! 2002-01-25 Nick Clifton ! * config/arm/arm.c (arm_hard_regno_mode_ok): Allow any general ! purpose register to hold an SImode (or smaller) value. ! 2002-01-25 Jakub Jelinek ! * unwind-dw2-fde-glibc.c: If inhibit_libc, use __register_frame* ! registry only. ! * crtstuff.c: Likewise. ! 2002-01-25 Kazu Hirata ! * config/h8300/h8300.md (negation patterns): Tighten ! predicates to register_operand. ! 2002-01-24 Aldy Hernandez ! * loop.c (emit_prefetch_instructions): Use the prefetch insn's ! mode, not Pmode. ! * builtins.c (expand_builtin_prefetch): Same. ! 2002-01-24 Alexandre Oliva ! * config/sh/sh.md (sym_label2reg): Make sure all CONSTs have ! modes. ! 2002-01-24 Kazu Hirata ! * config/h8300/h8300.c (print_operand): Remove support for ! operand character 'A'. ! * config/h8300/h8300.md (three anonymous patterns): Replace ! operand character 'A' with either 'T' or 'S'. ! 2002-01-24 Kazu Hirata ! * config/h8300/h8300.c (print_operand): Remove support for ! operand character 'U'. ! 2002-01-24 Andris Pavenis ! * config/i386/t-djgpp: Use NATIVE_SYSTEM_HEADER_DIR. ! 2002-01-24 Nick Clifton ! * config/arm/arm.c (arm_hard_regno_mode_ok): Allow SImode ! values to be assigned to the stack pointer. ! 2002-01-14 Hartmut Penner ! * emit_rtl.c (gen_lowpart_common): Conversion from const_int ! to const_double needs to be done right for big-endian systems. ! 2002-01-24 Jason Merrill ! PR c++/2432 ! * config/sparc/sparc.md (call-jump peepholes): Pass the right insn ! to can_throw_internal. ! 2002-01-23 Richard Henderson ! * fold-const.c (fold): Change UINT_MAX test to check vs precision ! rather than TYPE_MAX_VALUE. Fix indentation and a bogus negation. ! 2002-01-24 Alexandre Oliva ! * config/sh/sh.md (symGOT_load, sym2GOT, sym2GOTOFF): New expands. ! (symGOT2reg): Use them, then set as GOT value as unchanging. ! (symGOTOFF2reg): Set REG_EQUAL note. Use a different pseudo ! as a temporary, if possible. ! (symPLT_label2reg): Enclose (pc) in UNSPEC_PIC. Emit ! sym@PLT-(.LPCS#+2-.) instead of sym@PLT+.-(.LPCS#+2). ! 2002-01-23 Kazu Hirata ! * config/h8300/h8300.md: Fix xorqi and xorqi so that they will ! accept to accept 0x80 as operands[2]. ! 2002-01-24 Alexandre Oliva ! * config/sparc/sparc.md (fix_trunctfdi2): Correct typo in mode. ! 2002-01-23 Richard Henderson ! * config/alpha/alpha.md (call_value_osf_1_er peepholes): Fix typo. ! 2002-01-23 Aldy Hernandez ! * c-parse.in (parmlist_or_identifiers): Add maybe_attribute. ! (parmlist_or_identifiers_1): Verify that only a parmlist follows ! an attribute. ! 2002-01-23 Richard Henderson ! * expr.c (move_by_pieces_1): Extend size before negation. ! * config/m68k/t-m68kbare (MULTILIB_OPTIONS): Add 68040 and 68060. ! (MULTILIB_MATCHES): Remove 68040 and 68060 aliases. ! (MULTILIB_EXCEPTIONS): Ignore 68881 and soft-float for 68040 and 68060. ! * config/m68k/t-m68kelf: Likewise. ! 2002-01-23 Bob Wilson ! * config/xtensa/elf.h: New file. ! * config/xtensa/lib1funcs.asm: New file. ! * config/xtensa/lib2funcs.S: New file. ! * config/xtensa/linux.h: New file. ! * config/xtensa/t-xtensa: New file. ! * config/xtensa/xtensa-config.h: New file. ! * config/xtensa/xtensa-protos.h: New file. ! * config/xtensa/xtensa.c: New file. ! * config/xtensa/xtensa.h: New file. ! * config/xtensa/xtensa.md: New file. ! * config.gcc (xtensa-*-elf*): New target. ! (xtensa-*-linux*): New target. ! * cse.c (canon_hash): Compare rtx pointers instead of register ! numbers. This is required for the Xtensa port. ! * integrate.c (copy_insn_list): Handle case where the static ! chain is in memory and the memory address has to be copied to ! a register. ! * doc/invoke.texi (Option Summary): Add Xtensa options. ! (Xtensa Options): New node. ! * doc/md.texi (Machine Constraints): Add Xtensa machine constraints. ! 2002-01-23 Zack Weinberg ! * diagnostic.c (internal_error): Do ICE suppression only ! when ENABLE_CHECKING is not defined. ! * c-typeck.c (require_complete_type): Return error_mark_node ! if type is error_mark_node. ! 2002-01-23 Janis Johnson ! * toplev.c (process_options): Disable -fprefetch-loop-arrays with ! -Os and issue a warning. ! 2002-01-23 Zack Weinberg ! * doc/fragments.texi, doc/hostconfig.texi: Update to reflect ! current (lack of) need for host configuration by hand. ! * doc/gccint.texi, doc/rtl.texi, doc/tm.texi: Adjust cross ! references. Documentation of some target macros moved from ! hostconfig.texi to tm.texi. ! 2002-01-23 Will Cohen ! * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Define if not currently ! defined. ! 2002-01-23 Kazu Hirata ! * config/h8300/h8300.md (*andorhi3): Accept 0x8000 as an ! operand[3]. ! 2002-01-23 Jason Merrill ! * tree.c (build1): Don't set TREE_READONLY on INDIRECT_REF. ! * function.c (assign_parms): Don't put args of inline functions ! into registers when not optimizing. ! 2002-01-23 Nick Clifton ! * config/arm/arm.md (UNSPEC_PROLOGUE_USE): New unspec constant. ! (prologue_use): New pattern. ! * config/arm/arm.c (expand_prologue): Use gen_prologue_use in ! preference to gen_rtx_USE. ! (thumb_expand_prologue): Use gen_prologue_use in preference to ! gen_rtx_USE. ! (thumb_expand_epilogue): Use gen_prologue_use in preference to ! gen_rtx_USE. ! 2002-01-23 Hans-Peter Nilsson ! * loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0. ! 2002-01-23 Neil Booth ! PR c/3504 ! * doc/extend.texi: Correct documentation of __alignof__. ! 2002-01-22 Zack Weinberg ! * params.h: Rename arguments of DEFPARAM so that it will be ! recognized as a translation keyword. ! 2002-01-22 Aldy Hernandez ! * extend.texi: Document altivec functions. ! Fix N-bit adjectives in X86 builtin documentation. ! 2002-01-22 Alexandre Oliva ! * reload.c (reg_overlap_mentioned_for_reload_p): Handle PLUS and ! auto_inc_dec values. ! 2002-01-22 Richard Earnshaw ! * config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove bogus white space ! after backslash. ! (ASM_DECLARE_OBJECT_NAME): Add missing backslash before final line. ! 2002-01-22 Alexandre Oliva ! * config/i386/freebsd-aout.h (ASM_QUAD): Undefine. ! 2002-01-22 Richard Henderson ! * config/alpha/alpha.c (split_small_symbolic_mem_operand): Use ! copy_insn not copy_rtx. ! 2002-01-23 Alan Modra ! * combine.c (simplify_and_const_int): Don't trunc_int_for_mode ! "nonzero" as that might add "1" bits. Ensure "constop" is ! properly sign extened. ! (force_to_mode): Tweak for sign extended constop. ! 2002-01-22 Richard Henderson ! * config/alpha/alpha.c (some_small_symbolic_mem_operand) Use ! for_each_rtx instead of assuming we're already looking at the MEM. ! (split_small_symbolic_mem_operand): Likewise. ! * config/alpha/alpha.h (PREDICATE_CODES): Update. ! * config/alpha/alpha.md (small symbolic memory splitters): Update. ! 2002-01-22 Richard Henderson ! * config/alpha/alpha.md (divmodsi_internal_er): Generate lituse ! sequence number for the literal. ! (divmoddi_internal_er): Likewise. ! 2002-01-22 Craig Rodrigues ! PR java/4972 ! * aclocal.m4 (AM_ICONV): Put linking flags for libiconv ! in LIBICONV variable. ! * configure: Regenerated. ! 2002-01-22 Krister Walfridsson ! * dependence.c (build_def_use): Remove array_idx. ! * dwarfout.c (last_filename): Remove. ! (output_compile_unit_die): Remove last_filename. ! 2002-01-22 Roger Sayle ! Richard Henderson ! PR opt/3640 ! * fold-const.c (fold): Optimize unsigned comparisons against ! UINT_MAX (and similar unsigned constants). ! 2002-01-22 Janis Johnson ! * Makefile.in (loop.o): Depend on OPTABS_H. ! * loop.c (emit_prefetch_instructions): Check the prefetch operand ! against the predicate. ! PR target/5379 ! * config/i386/i386.md (prefetch_sse): Specify "p" as a constraint ! for the address operand. ! 2002-01-22 Richard Henderson ! * config/alpha/freebsd.h (FUNCTION_PROFILER): Remove. ! 2002-01-22 Craig Rodrigues ! PR other/5450 ! * config/i386/sysv4.h (CPP_SPEC): Define, and add CPU ! preprocessor flags. ! 2002-01-22 Jason Thorpe ! * config.gcc (x86_64-*-netbsd*): New target. ! * config/i386/netbsd64.h: New file. ! 2002-01-22 Aldy Hernandez ! * regrename.c (kill_value): Fix typo. ! 2002-01-22 Aldy Hernandez ! * doc/tm.texi: Remove STARTING_FRAME_PHASE. ! * config/rs6000/rs6000.h: Same. ! * function.c (instantiate_virtual_regs): Remove ! STARTING_FRAME_PHASE. ! (assign_stack_local_1): Same. ! Calculate frame phase. ! 2002-01-22 Nick Clifton ! * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move 'regno' ! variable declaration to outer scope in order to simplify ! future extensions. ! (HARD_REGNO_MODE_OK): Replace macro body with a with a call to ! arm_hard_regno_mode_ok. ! * config/arm/arm-protos.h: Add a prototype for ! arm_hard_regno_mode_ok. ! * config/arm/arm.c (soft_df_operand): Remove now redundant ! check for DImode values using IP_REGNUM. ! (nonimmediate_soft_df_operand): Remove now redundant check for ! DImode values using IP_REGNUM. ! (arm_hard_regno_mode_ok): New function. New check: make sure ! that DImode values are not stored in IP_REGNUM. ! * config/arm/arm.c (arm_expand_prologue): Replace REG_MAYBE_DEAD ! note with a USE. ! (thumb_expand_prologue): Replace REG_MAYBE_DEAD note with a USE. ! 2002-01-22 Jason Merrill ! * c-semantics.c (genrtl_compound_stmt): Only check nesting ! consistency if this COMPOUND_STMT is scoped. ! 2002-01-22 Kazu Hirata ! * predict.c: Fix formatting. ! * print-tree.c: Likewise. ! * protoize.c: Likewise. ! * real.h: Likewise. ! * rtl.h: Likewise. ! * sbitmap.h: Likewise. ! * scan.c: Likewise. ! * sched-deps.c: Likewise. ! * sched-vis.c: Likewise. ! * sdbout.c: Likewise. ! * sibcall.c: Likewise. ! * ssa.c: Likewise. ! * ssa-ccp.c: Likewise. ! * ssa-dce.c: Likewise. ! * stmt.c: Likewise. ! * stor-layout.c: Likewise. ! * system.h: Likewise. ! Tue Jan 22 06:26:33 2002 Richard Kenner ! * tree.c (int_fits_type_p): If bounds of a subtype are variable, see ! if fits in bounds of base type. ! * dwarf2out.c (equate_decl_number_to_die): Add "int" to decls. ! (loc_descriptor_from_tree, case CALL_EXPR, case ADDR_EXPR): New. ! (add_bound_info, default): If can't find a context, make a ! SAVE_EXPR. ! (dwarf2out_finish): Check for SAVE_EXPR in node->created_for. ! 2002-01-22 Hans-Peter Nilsson ! * c-typeck.c (parser_build_binary_op): If result from ! build_binary_op is ERROR_MARK just return error_mark_node without ! further processing. ! 2002-01-21 Jason Thorpe ! * config/netbsd.h (TARGET_HAS_F_SETLKW): define. ! Split a.out-specific bits into... ! * config/netbsd-aout.h: ...this. ! * config/netbsd-elf.h: New file. ! * config/alpha/netbsd-elf.h: Remove. ! * config/alpha/netbsd.h: Rewrite for a NetBSD/alpha ELF target. ! * config/i386/netbsd-elf.h (LIB_SPEC): Remove. ! (STARTFILE_SPEC): Remove redundant definition. ! (ENDFILE_SPEC): Likewise. ! (LINK_SPEC): Likewise. ! (CPP_SPEC): Likewise. ! (ASM_SPEC): Likewise. ! (LIB_SPEC): Likewise. ! (SWITCH_TAKES_ARG): Likewise. ! (TARGET_MEM_FUNCTIONS): Likewise. ! (CPP_PREDEFINES): Redefine. ! (ASM_FINAL_SPEC): Remove redefinition. ! (ASM_COMMENT_START): Redefine. ! (FUNCTION_PROFILER): Define. ! (TARGET_VERSION): Redefine. ! Comment and formatting cleanup. ! * config/i386/netbsd.h: Include . ! * config/m68k/netbsd.h: Include . ! * config/mips/netbsd.h: Rewrite for NetBSD/mips ELF target, ! big- or little-endian. ! * config/ns32k/netbsd.h: Include . ! * config.gcc (*-*-netbsd*): Add definitions common to all ! NetBSD configs. ! (alpha*-*-netbsd*): Remove redundant xm_defines, gas, and ! gnu_ld definitions. Add netbsd-elf.h to and remove ! alpha/netbsd-elf.h from tm_file. Remove alpha/t-crtfm from ! tmake_file, and don't lose previous tmake_file contents. ! (arm*-*-netbsd*): Add netbsd-aout.h to tm_file. ! (i[34567]86-*-netbsdelf*): Remove redundant xm_defines, gas, and ! gnu_ld definitions. Add netbsd-elf.h to tm_file. ! (mips-dec-netbsd*): Remove as alias for mipsel-*-netbsd*. ! (mipsel-*-netbsd*): Rename this to... ! (mips*-*-netbsd*): ...this. Add elfos.h to tm_file. Add ! mips/little.h to tm_file for mips*el-*. ! (powerpc-*-netbsd*): Remove redundant xm_defines definition. ! (sparc-*-netbsd*): Add netbsd-aout.h to tm_file. ! (vax-*-netbsd*): Add netbsd-aout.h to tm_file. ! 2002-01-21 John David Anglin ! * pa-protos.h (reg_before_reload_operand): New function prototype. ! * pa.c (reg_before_reload_operand): New function implementation. ! * pa.md (decrement_and_branch_until_zero, movb): Use it. Change "!*m" ! contraints to "*m". ! 2002-01-21 Franz Sirl ! * combine.c (simplify_and_const_int): Properly sign-extend CONSTOP. ! 2002-01-21 John David Anglin ! * pa64-hpux.h (MD_EXEC_PREFIX): Set to "/usr/ccs/bin". ! (MD_STARTFILE_PREFIX): Set to "/usr/ccs/lib/pa20_64/". ! (MD_STARTFILE_PREFIX_1): Set to "/opt/langtools/lib/pa20_64/". ! (EH_FRAME_IN_DATA_SECTION): Define and update comment on init sections. ! (ENDFILE_SPEC): Undefine. ! (STARTFILE_SPEC): Redefine for PA. ! 2002-01-21 Franz Sirl ! * config/rs6000/t-ppccomm (CRTSTUFF_T_CFLAGS_S): Re-add -fPIC. ! 2002-01-21 Daniel Jacobowitz ! * config.gcc: Add entries to supported PowerPC --with-cpu ! types. ! 2002-01-21 Jakub Jelinek ! * config/i386/i386.c (ix86_function_arg_regno_p): Never return ! true for 64-bit mode only SSE registers in 32-bit mode. ! 2002-01-21 Kazu Hirata ! * unwind-dw2.c: Fix formatting. ! * unwind-dw2-fde.c: Likewise. ! * unwind-dw2-fde.h: Likewise. ! * unwind-pe.h: Likewise. ! * varasm.c: Likewise. ! * varray.h: Likewise. ! 2002-01-21 Hans-Peter Nilsson ! Remove workaround for register stack overwrite bug in mmix. ! * config/mmix/mmix.c (mmix_target_asm_function_prologue): Remove ! support for TARGET_REG_STACK_FILL_BUG. ! * config/mmix/mmix.h: Remove member has_call_without_parameters. ! (TARGET_MASK_REG_STACK_FILL_BUG, TARGET_REG_STACK_FILL_BUG): ! Delete. ! (TARGET_DEFAULT): Remove TARGET_MASK_REG_STACK_FILL_BUG. ! (TARGET_SWITCHES): Remove -mreg-stack-fill-bug-workaround and ! -mno-reg-stack-fill-bug-workaround. ! * config/mmix/mmix.md ("call", "call_value"): Don't set struct ! machine member has_call_without_parameters. ! * doc/invoke.texi (Option Summary) : Remove ! -mreg-stack-fill-bug-workaround and ! -mno-reg-stack-fill-bug-workaround. ! (MMIX Options): Ditto. ! 2002-01-21 Kazu Hirata ! * config/h8300/h8300.c (function_arg): Replace 0 with NULL_RTX ! as appropriate. ! Remove redundant code. ! 2002-01-21 Joseph S. Myers ! * config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h, ! config/c4x/c4x.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, ! config/fr30/fr30.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, ! config/mips/mips.h, config/rs6000/rs6000.h, config/sparc/sparc.h, ! config/stormy16/stormy16.h, config/v850/v850.h: Remove commented ! out target macro definitions and non-target-specific comments ! mostly taken from old versions of the manual. ! 2002-01-20 Kazu Hirata ! * config/h8300/h8300.h: Fix comment formatting. ! * config/ia64/aix.h: Likewise. ! * config/ia64/ia64-protos.h: Likewise. ! * config/ia64/ia64.c: Likewise. ! * config/ia64/ia64.h: Likewise. ! * config/ia64/ia64intrin.h: Likewise. ! * config/ia64/linux.h: Likewise. ! * config/ia64/unwind-aix.c: Likewise. ! * config/ia64/unwind-ia64.c: Likewise. ! 2002-01-20 Kazu Hirata ! * config/h8300/h8300.c: Revise comments about shift code. ! 2002-01-20 Kazu Hirata ! * config/h8300/h8300.c (function_arg): Update a comment. ! 2002-01-20 Kazu Hirata ! * config/h8300/h8300.md: Update the comments at the beginning ! of the file. ! 2002-01-20 Kazu Hirata ! * config/i370/i370.c: Fix comment formatting. ! * config/i370/i370.h: Likewise. ! * config/i370/i370.md: Likewise. ! * config/i370/linux.h: Likewise. ! Sun Jan 20 18:40:14 2002 Richard Kenner ! * reg-stack.c (subst_stack_regs): Properly check for deleted insn. ! * dwarf2out.c (loc_descriptor_from_tree): Add TRUTH_*_EXPR cases. ! (gen_struct_or_union_type_die): Don't SIGSEGV if no TYPE_STUB_DECL ! in incomplete case. ! 2002-01-20 Graham Stott ! * cfgloop.c (flow_loop_preheader_scan): Fix typo. ! 2002-01-19 John David Anglin ! * config.gcc (hppa*64*-*-hpux11*): Fix tmake_file. ! 2002-01-19 Tom Rix ! * config/rs6000/rs6000.md: Fix DF split for 64 bit hosts. ! 2002-01-18 Aldy Hernandez ! * doc/tm.texi (STARTING_FRAME_PHASE): Document. ! * function.c (assign_stack_local_1): Adjust x_frame_offset with ! STARTING_FRAME_PHASE. ! (STARTING_FRAME_PHASE): New. ! (instantiate_virtual_regs): Check saneness of ! STARTING_FRAME_PHASE. ! * config/rs6000/rs6000.h (STARTING_FRAME_PHASE): New. ! 2002-01-19 Alexandre Oliva ! * config/sh/sh.md (movdf_i4 split): Fix alter_subreg calls. ! 2002-01-18 Craig Rodrigues ! * doc/install.texi (hppa*-hp-hpux11): Clarify that GCC 2.95.x cannot ! be used for bootstrapping GCC 3.0. ! 2002-01-18 Kazu Hirata ! * config/h8300/h8300.md: Fix an insn length. ! 2002-01-18 Kazu Hirata ! * bitmap.h: Fix comment formatting. ! * combine.c: Likewise. ! * cppfiles.c: Likewise. ! * c-pragma.h: Likewise. ! * c-typeck.c: Likewise. ! * df.c: Likewise. ! * dwarf2out.c: Likewise. ! * function.c: Likewise. ! * gcc.c: Likewise. ! * genattrtab.c: Likewise. ! * gthr-win32.h: Likewise. ! * haifa-sched.c: Likewise. ! * predict.c: Likewise. ! * rtlanal.c: Likewise. ! * rtl.h: Likewise. ! * unwind-dw2-fde.h: Likewise. ! * unwind-pe.h: Likewise. ! * vmsdbgout.c: Likewise. ! Thu Jan 17 15:28:26 2002 Richard Kenner ! * attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE ! if type_required and passed decl. ! 2002-01-17 Aldy Hernandez ! * config.gcc (cpu_type): Include altivec.h in powerpc ! extra_headers. ! Same for darwin. ! * config/rs6000/altivec.h: New. ! 2002-01-17 David Edelsohn ! * doc/install.texi (*-ibm-aix*): Update assembler and exception ! handling information. ! * doc/trouble.texi (Interoperation): Add libstdc++ information ! for AIX. ! (Misunderstandings): Add template instantiation and static template ! member information for AIX. ! 2002-01-17 Jason Merrill ! * dbxout.c (dbxout_type): Support const and volatile. ! * except.c (add_partial_entry): Remove backwards compatibility code. ! (end_protect_partials): Likewise. ! 2002-01-17 Jakub Jelinek ! * config/ia64/ia64.md (prologue_use): New. ! * config/ia64/ia64.c (ia64_expand_prologue): Use ! gen_prologue_use instead of gen_rtx_USE. ! (group_barrier_needed_p): Handle CODE_FOR_prologue_use the same way ! as CODE_FOR_pred_rel_mutex. ! (ia64_sched_reorder2): Likewise. ! 2002-01-16 Eric Christopher ! * config/mips/r3900.h: Reformat. ! (SUBTARGET_CPP_SIZE_SPEC): Remove. ! * config/mips/isa3264.h (SUBTARGET_CPP_SIZE_SPEC): Ditto. ! * config/mips/mips.h (ABI_GAS_ASM_SPEC): Default to "". ! (SUBTARGET_CPP_SIZE_SPEC): Rewrite. ! * config/mips/t-elf: Remove mips3 multilib. ! 2002-01-16 H.J. Lu ! * config/mips/linux.h: Include "mips/abi64.h". ! 2002-01-16 H.J. Lu ! * config/mips/t-linux: New. ! * config.gcc: Add mips/t-linux to tmake_file for mips*-*-linux*. ! * config/mips/linux.h: Don't include "gofast.h". ! (INIT_SUBTARGET_OPTABS): Removed. ! 2002-01-16 Kazu Hirata ! * config/h8300/h8300-protos.h: Replace emit_a_shift with ! output_a_shift. ! * config/h8300/h8300.c: Likewise. ! * config/h8300/h8300.md: Likewise. ! 2002-01-16 Kazu Hirata ! * config/h8300/h8300.md (pushqi1_h8300): Use a tab instead of ! spaces after an opcode name. ! (pushqi1_h8300hs): Likewise. ! (pushhi1_h8300hs): Likewise. ! 2002-01-16 Kazu Hirata ! * doc/extend.texi: Replace "option" with "attribute" ! appropriately. ! 2002-01-16 Jakub Jelinek ! * config/alpha/alpha.c (some_small_symbolic_mem_operand): Look into ! (and:DI () (const_int -8)). ! (split_small_symbolic_mem_operand): Split ! (mem (and:DI () (const_int -8)). ! 2002-01-16 Jakub Jelinek ! PR target/5309: ! * config/sparc/sparc.c (ultrasparc_adjust_cost): Handle TYPE_IDIV the ! same way as TYPE_IMUL. ! (ultrasparc_sched_reorder): Likewise. ! * config/sparc/sparc.md (type): Add comment to update ! ultrasparc_sched_reorder when making changes. ! 2002-01-16 Kazu Hirata ! * doc/invoke.texi: Change the dump file name of block ! reordering pass from 28.bbro to 29.bbro. ! Mention -dk option. ! Wed Jan 16 17:54:22 CET 2002 Jan Hubicka ! * i386.md (minsf splitter): Fix pasto. ! 2002-01-16 Nick Clifton ! * config/arm/arm.c (arm_expand_prologue): Add REG_MAYBE_DEAD note ! to frame pointer initialisation instruction. ! (thumb_expand_prologue): Add REG_MAYBE_DEAD note to frame pointer ! initialisation instruction. ! (soft_df_operand): Do not accept the IP register. ! (nonimmediate_soft_df_operand): Do not accept the IP register. ! 2002-01-16 Jakub Jelinek ! PR target/5357: ! * config/sparc/sparc.c (sparc_override_options): Avoid MASK_V9 and ! MASK_V8 being both set. ! 2002-01-16 Ulrich Weigand ! * config/s390/s390.c (s390_emit_prologue): Do not emit USE ! insn for GOT register; add REG_MAYBE_DEAD notes instead. ! config/s390/s390.md (call, call_value): Add GOT register to ! CALL_INSN_FUNCTION_USAGE where needed. ! (call_exp, call_value_exp): New. ! 2002-01-16 Nick Clifton ! * config/arm/arm.c: General formatting tidy up. ! 2002-01-16 Graham Stott ! * calls.c (try_to_integrate): Use "(size_t)" intermediate ! cast and when casting an integer literal to "rtx" pointer. ! (expand_call): Likewise. ! * flow.c (try_pre_increment): Likewise. ! (find_use_as_address): Likewise. ! * integrate.c (expand_iline_function): Likewise. ! * regmove.c (try_auto_increment): Likewise. ! 2002-01-16 Graham Stott ! * sched-rgn.c (passed): Use sbitmap_free. ! (header): Likewise. ! (inner): Likewise. ! (in_queue): Likewise. ! (in_stack): Likewise. ! 2002-01-15 Eric Christopher ! * flow.c (propagate_one_insn): Change to use fatal_insn. ! 2002-01-15 Kazu Hirata ! * expmed.c (extract_fixed_bit_field): Remove unused code. ! * system.h: Poison SLOW_ZERO_EXTEND. ! * doc/tm.texi: Remove. ! * config/1750a/1750a.h (SLOW_ZERO_EXTEND): Remove. ! * config/arm/arm.h: Likewise. ! * config/avr/avr.h: Likewise. ! * config/clipper/clipper.h: Likewise. ! * config/convex/convex.h: Likewise. ! * config/d30v/d30v.h: Likewise. ! * config/dsp16xx/dsp16xx.h: Likewise. ! * config/elxsi/elxsi.h: Likewise. ! * config/fr30/fr30.h: Likewise. ! * config/h8300/h8300.h: Likewise. ! * config/i370/i370.h: Likewise. ! * config/i386/i386.h: Likewise. ! * config/m68k/m68k.h: Likewise. ! * config/mips/mips.h: Likewise. ! * config/ns32k/ns32k.h: Likewise. ! * config/pdp11/pdp11.h: Likewise. ! * config/pj/pj.h: Likewise. ! * config/s390/s390.h: Likewise. ! * config/sh/sh.h: Likewise. ! * config/stormy16/stormy16.h: Likewise. ! * config/v850/v850.h: Likewise. ! * config/vax/vax.h: Likewise. ! * config/we32k/we32k.h: Likewise. ! 2002-01-15 Aldy Hernandez ! * config/rs6000/rs6000.md (altivec_stvx): Add parallels to stvx. ! (altivec_lvsl): Change constraint to b. ! (altivec_lvsr): Same. ! (altivec_lvebx): Same. ! (altivec_lvehx): Same. ! (altivec_lvewx): Same. ! (altivec_lvxl): Same. ! (altivec_lvx): Same. ! (altivec_stvx): Add parallel. ! (altivec_stvxl): Same. ! (altivec_stvehx): Same. ! (altivec_stvebx): Same. ! (altivec_stvebx): Same. ! 2002-01-15 Aldy Hernandez ! * config.gcc: Change altivec.h to altivec-defs.h. ! * config/rs6000/altivec.h: Delete. ! * config/rs6000/altivec-defs.h: Add. ! 2002-01-15 John David Anglin ! * vax.c (vax_rtx_cost): Return MAX_COST for unsupported MULT, UDIV ! and UMOD modes. ! * vax.h (INDEX_TERM_P): Restrict indexing to modes which have a size ! less than or equal to eight bytes. ! * vax.md (andsi3): Remove constraints and change SET destination ! operand type to nonimmediate_operand. ! (andhi3, andqi3): Likewise. Don't clear high order bits of operand 1 ! when it is a CONST_INT. ! 2002-01-15 Jason Merrill ! * c-common.def (FILE_STMT): New code. ! * c-common.c (statement_code_p): It's a statement. ! * c-common.h (stmt_tree_s): Add x_last_filename. ! (FILE_STMT_FILENAME_NODE, FILE_STMT_FILENAME): New macros. ! (last_expr_filename): New macro. ! * c-semantics.c (begin_stmt_tree): Initialize it. ! (add_stmt): If the filename changed, also insert a ! FILE_STMT. ! (expand_stmt): Handle seeing one. ! 2002-01-15 Eric Christopher ! * flow.c (propagate_one_insn): Add error message and print out ! insn for debugging. ! 2002-01-15 Joseph S. Myers ! * system.h (ASM_IDENTIFY_GCC, STDC_VALUE, TRAMPOLINE_ALIGN, ! ASM_IDENTIFY_GCC_AFTER_SOURCE): Poison. ! * config/pdp11/pdp11.h (TRAMPOLINE_ALIGN): Rename to ! TRAMPOLINE_ALIGNMENT. ! * config/arm/arm.h, config/mcore/mcore.h: Likewise. Change value ! to be in bits. ! * config/i386/cygwin.h (PCC_BITFIELDS_TYPE_MATTERS): Rename to ! PCC_BITFIELD_TYPE_MATTERS. ! * config/interix.h (STDC_VALUE): Remove. Use ! STDC_0_IN_SYSTEM_HEADERS. ! * config/darwin.h (ASM_IDENTIFY_GCC), config/dsp16xx/dsp16xx.h ! (ASM_IDENTIFY_GCC), config/stormy16/stormy16.h (ASM_IDENTIFY_GCC, ! ASM_IDENTIFY_GCC_AFTER_SOURCE): Remove. ! 2002-01-15 Craig Rodrigues ! * doc/install.texi (hppa*-hp-hpux11): --enable-threads does ! not work on this platform currently. ! 2002-01-15 Joseph S. Myers ! * c-typeck.c (build_unary_op): Don't wrap msgid argument of ! readonly_warning in _(). ! 2002-01-15 Douglas B Rupp ! * gcc.c (delete_if_ordinary): Backout previous change. ! 2002-01-15 Kazu Hirata ! * config/h8300/h8300.c (print_operand): Remove support for ! unused operand characters. ! * read-rtl.c: Fix formatting. ! * real.c: Likewise. ! * recog.c: Likewise. ! * regclass.c: Likewise. ! * regmove.c: Likewise. ! * reg-stack.c: Likewise. ! * reload1.c: Likewise. ! * rtlanal.c: Likewise. ! 2002-01-15 Kazu Hirata ! * config/i386/i386.c: Fix formatting. ! 2002-01-15 Jakub Jelinek ! * c-typeck.c (process_init_element): Don't save_expr ! COMPOUND_LITERAL_EXPR if just its initializer will be used. ! 2002-01-15 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Do not ! emit optional traceback table if optimize_size or TARGET_ELF. ! * config/rs6000/rs6000.md (prefetch): New. ! 2002-01-15 Andreas Jaeger ! * config.gcc (x86_64-*-*): Install mmintrin.h and xmmintrin.h. ! 2002-01-15 Kazu Hirata ! * mips-tfile.c: Fix formatting. ! Tue Jan 15 00:56:11 CET 2002 Jan Hubicka ! * unroll.c (final_reg_note_copy): Fix previous commit. ! 2002-01-14 Kazu Hirata ! * config/h8300/h8300-protos.h: Remove the prototype for ! eq_operator. ! * config/h8300/h8300.c (eq_operator): Remove. ! 2002-01-14 Richard Henderson ! * config/i386/i386.md (prefetch): Tidy. ! (prefetch_3dnow): Fix locality operand. ! 2002-01-14 Richard Henderson ! * config/mips/mips.h (HI_AND_FP_REGS): New register class. ! (CLASS_CANNOT_CHANGE_MODE): Disallow HI in little-endian mode. ! 2002-01-14 Hans-Peter Nilsson ! * reload1.c (reload_combine): Pass reg_sum replacement through ! copy_rtx in loop performing multiple changes. ! 2002-01-14 Jakub Jelinek ! * except.c (remove_unreachable_regions): New. ! (free_eh_status): Clear exception_handler_labels. ! (convert_from_eh_region_ranges): Call remove_unreachable_regions. ! (find_exception_handler_labels): Don't add the same label more than ! once. ! (remove_exception_handler_label): Don't die if ! find_exception_handler_labels hasn't been called for the current ! function yet. ! Mon Jan 14 21:26:13 CET 2002 Jan Hubicka ! * toplev.c (rest_of_compilation): Rebuild jump labels after ! gcse. ! 2002-01-14 Joseph S. Myers ! * doc/extend.texi: Move documentation of X86 built-in functions ! here. ! * doc/invoke.texi: From here. ! * doc/sourcebuild.texi: Document location of documentation for ! machine built-in functions. ! 2002-01-13 Christopher Faylor ! * cppfiles.c (TEST_THRESHOLD): New macro. ! (SHOULD_MMAP): Ditto. ! (read_include_file): Use SHOULD_MMAP macro to decide when mmap should ! be used. ! Mon Jan 14 20:23:34 CET 2002 Jan Hubicka ! * unroll.c (final_reg_note_copy): Properly handle ! REG_LABEL ! (unroll_loops): Fix LOOP_CONDITION heuristics. ! 2002-01-14 Geoffrey Keating ! * doc/invoke.texi (Xstormy16 Options): Add xstormy16 option. ! * doc/md.texi (Machine Constraints): Use @minus{} where appropriate. ! Mon Jan 14 20:18:19 CET 2002 Jan Hubicka ! * cfgcleanup.c (try_forward_edges): Avoid infinite loop at infinite ! threaded loop. ! 2002-01-14 Tom Rix ! * config/rs6000/rs6000.md: Fix typo with sradi. ! 2002-01-14 Ulrich Weigand ! * config/s390/s390.md (movstrdix_64, movstrsix_31, movstrdi_64, ! movstrsi_31, clrstrsi_64, clrstrsi_31): Improve RTL templates. ! (clrstrdi, clrstrsi): Adapt callers. ! (extendsidi2, zero_extendsidi2): Remove no-conflict blocks. ! (movti splitter): Never use register 0 as base register. ! 2002-01-14 Hartmut Penner ! * combine.c (simplify_shift_const): Always generate new rtx ! for shift expression instead of reusing given expression. ! Mon Jan 14 07:08:55 2002 Richard Kenner ! * config/alpha/alpha.c (alpha_expand_mov): Don't call ! alpha_legitimize_address unless mode is Pmode. ! 2002-01-13 Geoffrey Keating ! * doc/md.texi (Modifiers): Document the '*' constraint for the ! user. ! * doc/md.texi (Machine Constraints): Add constraints for xstormy16. ! * doc/extend.texi (Function Attributes): 'interrupt' is valid ! for xstormy16 too. ! 2002-01-13 Richard Henderson ! * reload.c (find_reloads): Use a hard reg destination as reload reg ! for an input reload of the source. ! 2002-01-13 Gerald Pfeifer ! * doc/install.texi (Binaries): Make link to ftp.writtenword.com ! more generic. ! Sun Jan 13 07:23:01 2002 Douglas B Rupp ! * Makefile.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. ! * mklibgcc.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. ! * config/alpha/x-vms (USE_COLLECT2): Set to empty. ! Sun Jan 13 06:55:31 2002 Richard Kenner ! * dwarf2out.c (mem_loc_descriptor, case ADDRESSOF): New case. ! 2002-01-12 Tom Rix ! * config/rs6000/rs6000.c (rs6000_emit_set_long_const): Use ior for ! TARGET_POWERPC64. ! 2002-01-12 Richard Henderson ! * config/i386/i386.c (bdesc_2arg): Mark psadbw MASK_3DNOW_A. ! * doc/invoke.texi: Update Alpha options. ! * doc/invoke.texi: Update i386 built-in function lists. ! Sat Jan 12 17:38:11 CET 2002 Jan Hubicka ! * unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note ! referencing outside. ! Sat Jan 12 08:54:51 2002 Richard Kenner ! * diagnostic.c (warn_deprecated_use): Rework to lower indentation. ! * expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for ! offsets, and change line folding. ! * optabs.c (expand_binop): Remove warnings. ! * sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning. ! 2002-01-12 Graham Stott ! * attribs.c (handle_deprecated_attribute): constify WHAT. ! * diagnostic.c (warn_deprecated_use): Add braces, fixes ! dangling else warning and constify WHAT. ! * except.h (struct function, struct inline_remap): Move ! struct tag forward defs before all prototypes. ! (duplicate_eh_regions): Whitespace. ! 2002-01-12 Nick Clifton ! * config/arm/arm.h (ARM_LEGITIMIZE_RELOAD_ADDRESS): Use ! MODE_BASE_REG_CLASS. ! (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Use MODE_BASE_REG_CLASS. ! 2002-01-12 Richard Henderson ! * config/i386/i386.c (override_options): If SSE, enable sse prefetch. ! (ix86_expand_vector_move): New. ! (bdesc_2arg): Remove andps, andnps, orps, xorps. ! (ix86_init_mmx_sse_builtins): Make static. Remove composite builtins. ! Remove old prefetch builtins. Special case the logicals removed above. ! (ix86_expand_builtin): Likewise. ! (safe_vector_operand): Use V4SFmode, not TImode. ! (ix86_expand_store_builtin): Remove shuffle arg. Update callers. ! (ix86_expand_timode_binop_builtin): New. ! * config/i386/i386-protos.h: Update. ! * config/i386/i386.h (enum ix86_builtins): Update. ! * config/i386/i386.md: Correct predicates on MMX/SSE patterns. ! Use ix86_expand_vector_move in vector move expanders. ! (movti_internal, movti_rex64): Add xorps alternative. ! (sse_clrv4sf): Rename and adjust from sse_clrti. ! (prefetch): Don't work so hard. ! (prefetch_sse, prefetch_3dnow): Use PREFETCH rtx, not UNSPEC. ! * config/i386/xmmintrin.h (__m128): Use V4SFmode. ! (_mm_getcsr, _mm_setcsr): Fix typo in builtin name. ! 2002-01-11 Richard Henderson ! * config/i386/mmintrin.h: New file. ! * config/i386/xmmintrin.h: New file. ! * config.gcc (i?86-*-*): Add extra_headers. ! * simplify-rtx.c (simplify_unary_operation): Handle saturating ! truncation codes. ! (simplify_binary_operation): Handle saturating arithmetic codes. ! * config/i386/i386.c (ix86_expand_sse_comi): Return the full result, ! not the lowpart subreg. ! (ix86_expand_builtin): Return a TImode dummy register instead of 0 ! on error. ! * config/i386/i386.md (mmx_clrdi): Override memory attribute. ! 2002-01-12 Michael Hayes ! * conflict.c (conflict_graph_compute): Free regsets when finished. ! * ssa.c (compute_coalesced_reg_partition): Likewise. ! 2002-01-12 Herman A.J. ten Brugge ! * global.c (find_reg): Check for HARD_REGNO_CALL_PART_CLOBBERED ! every where we allocate a register. ! 2002-01-12 Michael Hayes ! * gcse.c (compute_pre_data, pre_gcse): Use sbitmap_free. ! * lcm.c (compute_earliest, compute_farthest): Likewise. ! 2002-01-11 Janis Johnson ! * expr.c (expand_assignment): Fix misuse of MEM_KEEP_ALIAS_SET. ! 2002-01-11 Janis Johnson ! * doc/rtl.texi (Insns): Fix 2 typos. ! 2002-01-11 Joseph S. Myers ! * doc/invoke.texi: Avoid overfull hboxes. Add summary of D30V ! options. Use @table @gcctabopt for MMIX options. Add index ! entries for MMIX options. Start new paragraph with first ! heading of the machine-dependent options. ! 2002-01-11 Craig Rodrigues ! PR other/5299 ! * config/ns32k/ns32k.md: Fix spelling mistake of "than" in comments. ! * combine.c (force_to_mode): Same. ! * reload1.c (clear_reload_reg_in_use): Same. ! 2002-01-11 Nick Clifton ! * config/arm/arm.c (arm_gen_constant): Correct test of 'remainder' ! and 'subtargets'. ! 2002-01-11 Andreas Jaeger , ! Brad Lucier ! * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove wrong ! mcpu. ! Fri Jan 11 07:35:12 2002 Douglas B Rupp ! * config/alpha/vms.h: (MD_FALLBACK_FRAME_STATE_FOR): Fix errors. ! Protect with IN_LIBGCC. ! (LINK_EH_SPEC): Add required trailing space. ! Fri Jan 11 09:25:05 2002 Nicola Pero ! * c-tree.h: Move function declarations so that they are listed ! under the filename which contains them. ! (check_identifier, finish_decl_top_level, ! lookup_name_current_level_global, shadow_record_fields): Remove. ! 2002-01-11 Andreas Jaeger ! * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove duplicated ! march. ! 2002-01-10 Richard Henderson ! * config/alpha/alpha.c (print_operand): Add 'J'. ! * config/alpha/alpha.md (call_osf_1_er, call_value_osf_1_er): Take a ! new operand with the sequence number for the lituse. When splitting ! the insns, use gen_movdi_er_high_g and generate a sequence number. ! (gen_movdi_er_high_g): Print the sequence number if non-zero. ! 2002-01-10 Aldy Hernandez ! * config/rs6000/rs6000.c (altivec_init_builtins): Add support for ! lvebx, lvehx, lvewx, lvxl, lvx, stvx, stvebx, stvehx, stvewx, ! stvxl. ! (altivec_expand_builtin): Same. ! (altivec_expand_stv_builtin): New. ! * config/rs6000/rs6000.h (rs6000_builtins): Same. ! * config/rs6000/rs6000.md ("altivec_lvebx"): New. ! ("altivec_lvehx"): New. ! ("altivec_lvewx"): New. ! ("altivec_lvxl"): New. ! ("altivec_lvx"): New. ! ("altivec_stvx"): New. ! ("altivec_stvebx"): New. ! ("altivec_stvehx"): New. ! ("altivec_stvewx"): New. ! ("altivec_stvxl"): New. ! 2002-01-10 Richard Henderson ! * cfgrtl.c (delete_insn): Assert insn hasn't been deleted yet. ! * reload1.c (delete_output_reload): Zap spill_reg_store. Take ! care not to delete instructions twice. ! 2002-01-10 Zack Weinberg ! * toplev.c: Don't declare environ (it's not used anywhere). ! * configure.in: Don't check for declaration of environ. ! * config/i386/xm-mingw32.h: Don't #define environ. ! * config.in, configure: Regenerate. ! 2002-01-10 Zack Weinberg ! * configure.in: Set stage1_cflags for powerpc-*-darwin*. ! * configure: Regenerate. ! * config/interix.h: Set DO_GLOBAL_CTORS_BODY and ! DO_GLOBAL_DTORS_BODY here, not in xm-interix.h. ! * config/alpha/vms.h: Set INCLUDE_DEFAULTS here, not in ! alpha/xm-vms.h. ! * config/m68k/t-next: Set OTHER_FIXINCLUDES_DIRS and ! LIMITS_H_TEST here, not in m68k/x-next. ! * config/rs6000/beos.h: Set STANDARD_INCLUDE_DIR and ! SYSTEM_INCLUDE_DIR here, not in rs6000/xm-beos.h. ! * config/x-interix: Don't set RANLIB, RANLIB_TEST, SHELL, ! LIBGCC2_INCLUDES, or SYSTEM_HEADER_DIR. ! * config/alpha/x-vms: Don't set USE_COLLECT2. Add comments. ! * config/i386/x-djgpp: Renamed i386/t-djgpp. ! * config/m88k/x-dolph: Renamed m88k/t-dolph. ! * config/m88k/x-texXD88: Renamed m88k/t-texXD88. ! * config/pa/x-pa-mpeix: Renamed pa/t-mpeix. Update for ! replacement of quadlib.asm with quadlib.c. ! * config/x-interix3, config/xm-interix.h, config/i386/x-beos, ! config/i386/xm-osf1elf.h, config/rs6000/x-darwin, ! config/rs6000/xm-beos.h: Delete file. ! * config.gcc: Update to match above changes. ! 2002-01-10 Kazu Hirata ! * config/h8300/h8300.h: Fix comment typos. ! * config/h8300/h8300.md: Likewise. ! * config/h8300/lib1funcs.asm: Likewise. ! 2002-01-10 Dale Johannesen ! PR optimization/5269 ! * unroll.c (precondition_loop_p): Make *increment be the correct ! sign when n_iterations known, to avoid confusing caller. ! 2002-01-10 Kazu Hirata ! * doc/extend.texi (deprecated): Fix a typo. ! Thu Jan 10 22:35:54 CET 2002 Jan Hubicka ! * basic-block.h (update_br_prob_note): Declare. ! * cfgcleanup.c (try_simplify_condjump): Call update_br_prob_note. ! (try_forward_edges): Care negative frequencies and update note. ! (outgoing_edges_match): Tweek conditional merging heuristics. ! (try_crossjump_to_edge): use update_br_prob_note. ! * cfglayout.c (fixup_reorder_chain): Likewise. ! * cfrtl.c (update_br_prob_note): New. ! * ifcvt.c (dead_or_predicable): Call update_br_prob_note. ! * i386.c (ix86_decompose_address): Return -1 if address contains ! shift. ! (legitimate_address_p): Require ix86_decompose_address to return 1. ! * gcse.c (hash_scan_set): Use CONSTANT_INSN_P. ! (cprop_insn): Likewise. ! 2002-01-10 Kazu Hirata ! * toplev.c: Fix formatting. ! * tree.c: Likewise. ! * tree-dump.c: Likewise. ! * unroll.c: Likewise. ! * unwind-dw2.c: Likewise. ! * unwind-dw2-fde.c: Likewise. ! * unwind-dw2-fde-glibc.c: Likewise. ! * unwind-sjlj.c: Likewise. ! 2002-01-10 Joseph S. Myers ! * doc/invoke.texi: Document PDP-11 options. ! 2002-01-10 Kazu Hirata ! * config/h8300/h8300.h: Fix formatting. ! 2002-01-10 Ira Ruben ! Add __attribute__ ((deprecated)). ! * extend.texi: Document __attribute__ ((deprecated)). ! * invoke.texi: Document -Wno-deprecated-declarations. ! * testsuite/g++.dg/other/deprecated.C: New C++ test. ! * testsuite/gcc.dg/deprecated.c: New C test. ! * attribs.c (enum attrs): Declare handle_deprecated_attribute(). ! (c_common_attribute_table): Add "deprecated" entry. ! (handle_deprecated_attribute): New function. ! * c-decl.c (deprecated_states): New enum. ! deprecated_state: State of "deprecated" handling. ! (start_decl): Set deprecated_state based on attributes. ! (grokdeclarator): Test for deprecated uses, propagate attribute. ! * c-typeck.c (build_component_ref): Test for deprecated fields. ! (build_external_ref): Test for deprecated primaries. ! * diagnostic.c (warn_deprecated_use) New function to issue ! warnings about __attribute__ ((depricated)) references. ! * flags.h (warn_deprecated_decl): Extern declared for ! -W[no-]deprecated-declarations option. ! * print-tree.c (print_node): Show deprecated flag status. ! * toplev.c (warn_deprecated_decl): Defined. ! (W_options): Added "deprecated-declaration". ! * toplev.h (warn_deprecated_use): Extern declared. ! * tree.h (struct tree_common): Define deprecated_flag. ! (TREE_DEPRECATED): New macro to access flag. ! * cp/call.c (build_call): Test for deprecated calls. ! * cp/class.c (add_implicitly_declared_members): Set global ! flag to tell grokdeclarator to not issue deprecated warnings. ! * cp/cp-tree.h: Add extern for adding_implicit_members. ! * cp/decl.c (deprecated_states): New enum. ! (start_decl): Set deprecated_state based on attributes. ! (grokdeclarator): Test for deprecated uses, propagate attribute. ! * cp/lex.c (do_identifier): Test for deprecated primaries. ! * cp/typeck.c (build_component_ref): Test for deprecated fields. ! 2002-01-10 Ira Ruben ! Fix to assign attributes to inline member functions. ! * cp/decl.c (start_method): Handle attrlist. ! 2002-01-10 Kazu Hirata ! * combine.c (expand_field_assignment): Use subreg_lsb(). ! 2002-01-10 David Edelsohn ! * alias.c (find_base_value): Add cases for HIGH, PRE_INC, PRE_DEC, ! POST_INC, POST_DEC, PRE_MODIFY, and POST_MODIFY. ! (find_base_term): Add cases for TRUNCATE, PRE_MODIFY, and POST_MODIFY. ! Recurse for any operand of AND as long as constant is non-zero. ! 2002-01-10 Kazu Hirata ! * config/h8300/h8300.md: Remove constraints from expanders. ! 2002-01-10 Kazu Hirata ! * varasm.c: Fix formatting. ! * varray.c: Likewise. ! * vmsdbgout.c: Likewise. ! * xcoffout.c: Likewise. ! Thu Jan 10 17:19:12 CET 2002 Jan Hubicka ! * cfgcleanup.c (try_forward_edges): Properly initialize nthreaded_edges; ! update edge probabilities to match. ! 2002-01-10 Joseph S. Myers ! * Makefile.in ($(docdir)/gccint.info, gccint.dvi): Add additional ! dependencies. ! * doc/languages.texi, doc/sourcebuild.texi: New files. ! * doc/configfiles.texi: Make a subsubsection. Update. ! * doc/configterms.texi: Add @node. Remove warning that this isn't ! instructions for building GCC. ! * doc/makefile.texi: Make a subsection. ! * doc/gccint.texi: Update. ! Thu Jan 10 16:39:58 CET 2002 Jan Hubicka ! * i386.md (sse_mov?fcc_const0_?): Fix constraints. ! Thu Jan 10 12:45:50 2002 Nicola Pero ! * doc/cpp.texi: Document the __OBJC__ preprocessor macro. ! Thu Jan 10 11:19:18 CET 2002 Jan Hubicka ! * optabs.c (expand_fix): Look for wider integer modes first. ! * i386.md (mov?f): Avoid the fake const double trick for medium ! memory model. ! (min?f*/max?f*): Prohibit memory operands for i387 variant. ! (fop_df_4): Disable for SSE compilation. ! 2002-01-10 Graham Stott ! * dwarf2out.c (indirect_string_alloc, output_indirect_string): ! Move prototype into DWARF2_DEBUGGING_INFO conditional block. ! 2002-01-10 Richard Henderson ! * config/alpha/alpha.md (extendsidi2_fix): Penalize f/f alternative. ! 2002-01-10 Richard Henderson ! * regrename.c (find_oldest_value_reg): Fix typo in mode change check. ! (copyprop_hardreg_forward_1): Likewise. Use mode_change_ok. ! 2002-01-10 Kazu Hirata ! * combine.c (can_combine_p): Fix a comment typo. ! 2002-01-09 Zack Weinberg ! * Makefile.in (s-gencheck, s-options, s-specs): Handle an ! empty list correctly. Change loop index $t to $f for ! consistency with rest of Makefile. ! 2002-01-08 Aldy Hernandez ! * testuite/gcc.dg/altivec-4.c: Add test for mtvscr, dssall, ! mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. ! * config/rs6000/rs6000.c (altivec_expand_builtin): Add support for ! mtvscr, dssall, mfvscr, dss, lvsl, lvsr, dstt, dst, dstst, dststt. ! (altivec_init_builtins): Same. ! (altivec_expand_unop_builtin): Return NULL_RTX on error. ! (altivec_expand_binop_builtin): Same. ! (altivec_expand_ternop_builtin): Same. ! (bdesc_dst): New. ! * config/rs6000/rs6000.md ("altivec_mtvscr"): New. ! ("altivec_vctuxs"): Fix typo. ! ("altivec_vnmsubfp"): Same. ! ("altivec_dssall"): New. ! ("altivec_mfvscr"): New. ! ("altivec_dss"): New. ! ("altivec_lvsl"): New. ! ("altivec_lvsr"): New. ! ("altivec_dstt"): New. ! ("altivec_dstst"): New. ! ("altivec_dststt"): New. ! ("altivec_dst"): New. ! * config/rs6000/rs6000.h (rs6000_builtins): Add mtvscr, dssall, ! mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. ! 2002-01-09 Richard Henderson ! * config/alpha/alpha.md (prologue_mcount): Remove lituse_jsr reloc. ! 2002-01-10 Hans-Peter Nilsson ! * config/mmix/mmix.c (mmix_asm_identify_gcc): Remove unused ! function. ! * config/mmix/mmix-protos.h (mmix_asm_identify_gcc): Don't ! prototype. ! * config/mmix/mmix.h (ASM_IDENTIFY_GCC): Remove unused macro. ! 2002-01-09 Kazu Hirata ! * read-rtl.c: Fix formatting. ! * real.c: Likewise. ! * regclass.c: Likewise. ! * regrename.c: Likewise. ! * reg-stack.c: Likewise. ! * reload1.c: Likewise. ! * reload.c: Likewise. ! * rtl.c: Likewise. ! 2002-01-09 Kazu Hirata ! * rtlanal.c (find_reg_fusage): Use XEXP instead of SET_DEST ! to extract items in the expr_list chain. ! 2002-01-09 Richard Henderson ! * config/vax/vax.c (vax_rtx_cost): Never abort. ! * config/vax/vax.h (REAL_ARITHMETIC): Define. ! 2002-01-09 Jan Hubicka ! * gcse.c (cprop_jump): Delete insn if simplified jump is no-op. ! 2002-01-09 Richard Henderson ! * config/arm/arm.c (arm_gen_constant): Use trunc_int_for_mode. ! Unify code from various alternatives. ! 2002-01-09 Richard Henderson ! * regrename.c (copy_value): Ignore the copy if the source register ! is present in the value chain with a narrower mode. ! 2002-01-09 Herman A.J. ten Brugge ! * real.c (c4xtoe, toc4x): Do some special conversion on long doubles ! for the c4x target. Also improve layout. ! 2002-01-09 Richard Henderson ! * config/m32r/m32r.c (move_src_operand): Fix 32-bit int test. ! * config/m32r/m32r.md (and ior xor splitters): Swap operands ! to match insn patterns. ! 2002-01-09 Richard Henderson ! * regrename.c (find_oldest_value_reg): Use gen_rtx_raw_REG. ! (copyprop_hardreg_forward_1): Likewise. ! 2002-01-09 John David Anglin ! * pa.md (decrement_and_branch_until_zero): Change predicate for ! operand 0 from register_operand to reg_or_nonsymb_mem_operand. ! 2002-01-09 Bryce McKinlay ! * ginclude/stddef.h: Define _BSD_WCHAR_T_DEFINED_ if _BSD_WCHAR_T_ ! gets undefined. For Darwin. ! 2002-01-09 Herman A.J. ten Brugge ! * config/c4x/c4x.h: Use PUSH_ARGS and PUSH_ROUNDING for stack passing. ! 2002-01-09 Michael Hayes ! * config/c4x/c4x/md: Remove extraneous constraints from define_splits. ! 2002-01-08 Richard Henderson ! * regrename.c (copy_value): Ignore overlapping copies. ! 2002-01-08 Richard Henderson ! * config/alpha/alpha.c (alpha_split_conditional_move): Call copy_rtx ! as needed to avoid shared structure. ! 2002-01-08 Kazu Hirata ! * config/h8300/h8300.c (get_shift_alg): Fix 15-bit LSHIFTRT on ! H8/300H and H8/S. ! 2002-01-08 Joseph S. Myers ! * doc/tm.texi (EASY_DIV_EXPR, IMPLICIT_FIX_EXPR, ! LONGJMP_RESTORE_FROM_STACK, MAX_INT_TYPE_SIZE): Remove ! documentation of obsolete macros. ! * system.h: Poison these macros. ! * config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h, ! config/arc/arc.h, config/arm/arm.h, config/avr/avr.h, ! config/c4x/c4x.h, config/clipper/clipper.h, ! config/convex/convex.h, config/cris/cris.h, config/d30v/d30v.h, ! config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h, ! config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h, ! config/i386/i386.h, config/i860/i860.h, config/i960/i960.h, ! config/ia64/ia64.h, config/m32r/m32r.h, config/m68hc11/m68hc11.h, ! config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h, ! config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, ! config/mn10300/mn10300.h, config/ns32k/ns32k.h, config/pa/pa.h, ! config/pdp11/pdp11.h, config/pj/pj.h, config/romp/romp.h, ! config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h, ! config/sparc/sparc.h, config/stormy16/stormy16.h, ! config/v850/v850.h, config/vax/vax.h, config/we32k/we32k.h: Remove ! definitions and commented out definitions of obsolete macros. ! * config/mips/iris5.h (MAX_WCHAR_TYPE_SIZE): Don't define in terms ! of MAX_INT_TYPE_SIZE. ! 2002-01-08 Ulrich Weigand ! * config/s390/s390.c (s390_preferred_reload_class): Never ! return ADDR_REGS if it isn't a subset of the given class. ! * config/s390/s390.h (REGISTER_MOVE_COST): Penalize not just ! FP_REGS, but all superclasses as well. ! * config/s390/s390.c (s390_function_profiler): Fix thinko. ! * config/s390/s390.md (cmpdi_ccu_mem, cmpsi_ccu_mem, ! cmphi_ccu_mem, cmpqi_ccu_mem): First operand of compare ! must not be a const_int. ! 2002-01-08 Richard Henderson ! * Makefile.in (toplev.o): Depend on options.h. ! (gcc.o): Depend on specs.h. ! 2002-01-08 Jakub Jelinek ! * expr.c (store_expr): Convert VOIDmode constants back to target's ! mode. ! 2002-01-08 Gerald Pfeifer ! * doc/invoke.texi: Markup gcc as @command. Refer to ! http://gcc.gnu.org/onlinedocs/gcc/Contributors.html instead ! of http://gcc.gnu.org/thanks.html. ! 2002-01-08 Dale Johannesen ! * config/rs6000/rs6000.md: Add missing int register ! target case to movdf_low. ! 2002-01-08 Zack Weinberg ! * Makefile.in (cs-tconfig.h): Don't depend on $(CONFIG_H) or ! except.h. Remove commands to define USING_SJLJ_EXCEPTIONS. ! (cppinit.o): Depend on except.h. ! (gencheck.h, options.h, specs.h, s-gencheck, s-options, ! s-specs): New rules. ! * configure.in: Don't AC_DEFINE_UNQUOTED PACKAGE or VERSION. ! Don't create specs.h/options.h/gencheck.h here. Remove ! unnecessary variable settings from last argument of AC_OUTPUT. ! * config.in, configure: Regenerate. ! * intl.c: Hardcode package name as "gcc". ! * cppinit.c: Include except.h. ! (builtin_array): Define __USING_SJLJ_EXCEPTIONS__ when ! appropriate. ! * unwind-dw2.c, unwind-sjlj.c, config/ia64/unwind-ia64.c: ! Use #if(n)def __USING_SJLJ_EXCEPTIONS, not #if ! (!)USING_SJLJ_EXCEPTIONS. ! * doc/cpp.texi: Document __USING_SJLJ_EXCEPTIONS__. ! 2002-01-08 Joseph S. Myers ! * doc/tm.texi (ASM_OUTPUT_EH_REGION_BEG, ASM_OUTPUT_EH_REGION_END, ! ASM_OUTPUT_LABELREF_AS_INT, DOESNT_NEED_UNWINDER, EH_TABLE_LOOKUP, ! OBJC_SELECTORS_WITHOUT_LABELS, OMIT_EH_TABLE): Remove ! documentation of obsolete macros. ! * system.h: Poison these macros. ! * config/d30v/d30v.h, config/ns32k/encore.h, ! config/stormy16/stormy16.h: Remove definitions and commented out ! definitions of obsolete macros. ! Tue Jan 8 15:56:41 2002 Nicola Pero ! * objc/objc-act.c (handle_class_ref): Mark the declaration of ! %sobjc_class_ref_%s as used - to prevent unwanted compiler ! warnings. ! 2002-01-08 Ulrich Weigand ! * config/s390/linux.h (ASM_OUTPUT_LABELREF): Remove. ! * config/s390/s390.c (s390_emit_epilog): Add REG_FRAME_RELATED_EXPR ! to insn adjusting stack/frame pointer. ! * config/s390/s390.md (reload_la_64, reload_la_31): Do not ! accept operands that cause the insn to be non-splittable. ! 2002-01-08 Graham Stott ! * c-tree.h (C_TYPE_FIELDS_READONLY): Uppercase macro parameter. ! (C_TYPE_FIELDS_VOLATILE): Likewise. ! (C_TYPE_BEING_DEFINED): Likewise. ! (C_IS_RESERVED_WORD): Likewise. ! (C_TYPE_VARIABLE_SIZE): Likewise. ! (C_DECL_VARIABLE_SIZE): Likewise. ! (C_MISSING_PROTOTYPE_WARNED): Likewise. ! (C_SET_EXP_ORIGINAL_CODE): Likewise. ! (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter and remove ! parenthesis. ! (C_DECL_ANTICIPATED): Likewise. ! (c_build_type_variant): Add parenthesis. ! 2002-01-08 Joseph S. Myers ! * gcc.c (option_map): Remove --version. ! (process_command): Handle -fversion following the GNU Coding ! Standards. Partially addresses PR other/704. ! 2002-01-08 Graham Stott ! * combine.c (combine_instructions): Fix typo. ! 2002-01-08 Graham Stott ! * debug.h: Use "tree" and "rtx" throughout. ! * debug.c: Likewise. ! 2002-01-08 Nick Clifton ! * dbxout.c (dbxout_symbol_location): If a symbol ref is in the ! constant pool, use the pool's version of the symbol instead. ! 2002-01-07 Richard Henderson ! * regrename.c (find_oldest_value_reg): Ignore the value chain if ! the original register was copied in a mode with a fewer number of ! hard registers than the desired mode. ! (copyprop_hardreg_forward_1): Likewise. ! (debug_value_data): Fix loop test. ! * toplev.c (parse_options_and_default_flags): Reenable ! -fcprop-registers at -O1. ! 2002-01-07 Aldy Hernandez ! * config/rs6000/rs6000.c (bdesc_2arg): Add altivec predicates. ! (altivec_init_builtins): New node v4si_ftype_v16qi_v16qi. ! * config/rs6000/rs6000.h (rs6000_builtins): Add enums for altivec ! predicates. ! * config/rs6000/rs6000.md: Add altivec predicate patterns. ! 2002-01-07 John David Anglin ! * pa.c (FUNC_BEGIN_PROLOG_LABEL, current_function_number): Define. ! (pa_output_function_prologue): Output local label at the beginning of ! the prologue when profiling. ! (hppa_profile_hook): Use the local label rather than the function label. ! * pa.h (PROFILE_BEFORE_PROLOGUE): Define. ! 2002-01-07 Aldy Hernandez ! * config/rs6000/rs6000.c (print_operand): Remove extra space. ! (altivec_expand_unop_builtin): Fix thinko. ! (altivec_expand_binop_builtin): Same. ! (altivec_expand_ternop_builtin): Same. ! (altivec_expand_builtin): Same. ! 2002-01-07 Richard Henderson ! * config/rs6000/xcoff.h (ASM_FILE_START): Reverted to profile_flag. ! 2002-01-07 Jason Merrill ! * unwind-dw2.c (execute_cfa_program): Use < again. ! 2002-01-07 Jakub Jelinek ! * predict.c (combine_predictions_for_insn): Avoid division by zero. ! 2002-01-07 Jakub Jelinek ! * simplify-rtx.c (simplify_plus_minus): Bump n_ops for NOT. ! Don't allow -1 - x -> ~x simplifications in the first pass. ! 2002-01-07 Aldy Hernandez ! * rs6000.c (altivec_expand_ternop_builtin): Don't die on invalid ! arguments. ! (altivec_expand_binop_builtin): Same. ! (altivec_expand_unop_builtin): Same. ! (print_operand): Fix typo. ! (bdesc_1arg): Add vupk* variants. ! * rs6000.h (rs6000_builtins): Add vupk* enums. ! * rs6000.md: Add altivec_vupk* variants. ! 2002-01-07 Joseph S. Myers ! * doc/gcc.texi, doc/gccint.texi, doc/cppinternals.texi, ! doc/install.texi, doc/invoke.texi, doc/rtl.texi: Update copyright ! and last update dates. ! 2002-01-07 Janis Johnson ! * doc/rtl.texi (Flags): Clean up documentation of RTL flags ! 2002-01-07 Marek Michalkiewicz ! * config/avr/avr.c (avr_mcu_types): Add new MCU types. ! * config/avr/avr.h (CPP_SPEC): Likewise. ! (LINK_SPEC): Likewise. ! (CRT_BINUTILS_SPECS): Likewise. ! * config/avr/t-avr (MULTILIB_MATCHES): Likewise. ! * doc/invoke.texi (AVR Options): Document them. ! Mon Jan 7 11:59:34 CET 2002 Jan Hubicka ! * unroll.c (copy_loop_body): Always properly update JUMP_LABEL and ! LABEL_NUSES. ! 2002-01-07 Graham Stott ! * config/i386/i386.h: Update copyright date. ! (HALF_PIC_PTR): Add parenthesis. ! (OPTIMIZATION_OPTIONS): Whitespace, add parenthesis and wrap. ! (CONSTANT_ALIGNMENT): Add parenthesis. ! (DATA_ALIGNMENT): Likewise. ! (LOCAL_ALIGNMENT): Likewise. ! (FUNCTION_ARG_BOUNDARY): Whitespace, add parenthesis and wrap. ! (IS_STACK_MODE): Uppercase macro parameter, add parenthesis and wrap. ! (CONDITIONAL_REGISTER_USAGE): Wrap in do {...} while (0). ! (HARD_REGNO_NREGS): Add paranethesis. ! (VALID_SSE_REG_MODE): Whitespace. ! (VALID_MMX_REG_MODE): Whitespace. ! (VALID_FP_MODE_P): Uppercase macros parameter and whitespace. ! (ix86_hard_regno_mode_ok): Add parenthesis. ! (HARD_REGNO_CALLER_SAVE_MODE): Whitespace. ! (RETURN_IN_MEMORY): Whitespace. ! (N_REG_CLASSES): Add parenthesis. ! (INTEGER_CLASS_P): Add parenthesis and wrap. ! (FLOAT_CLASS_P): Likewise. ! (SSE_CLASS_P): Likewise. ! (MMX_CLASS_P): Likewise. ! (MAYBE_INTEGER_CLASS_P): Likewise. ! (MAYBE_FLOAT_CLASS_P): Likewise. ! (MAYBE_SSE_CLASS_P): Likewise. ! (MAYBE_MMX_CLASS_P): Likewise. ! (Q_CLASS_P): Likewise. ! (GENERAL_REGNO_P): Uppercase macro parameter. ! (REX_INT_REGNO_P): Uppercase macro parameter and wrap. ! (FP_REGNO_P): Likewise. ! (ANY_FP_REGNO_P): Uppercase macro parameter. ! (SSE_REGNO_P): Likewise. ! (SSE_REGNO): Likewise. ! (SSE_REG_P): Likewise. ! (SSE_FLOAT_MODE_P): Likewise. ! (MMX_REGNO_P): Likewise. ! (MMX_REG_P):Likewise. ! (STACK_REG_P): Likewise. ! (NON_STACK_REG_P): Likewise. ! (STACK_TOP_P): Likewise. ! (CONVERT_HARD_REGISTER_TO_SSA_P): Add parenthesis. ! (PREFERRED_RELOAD_CLASS): Add parenthesis and whitespace. ! (SECONDARY_MEMORY_NEEDED): Likewise. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Whitespace. ! (MD_ASM_CLOBBERS): Whitespace and wrap. ! (MUST_PASS_IN_STACK): Whitespace and wrap. ! (RETURN_POPS_ARGS): Add parenthesis. ! (INIT_CUMULATIVE_ARGS): Likewise. ! (FUNCTION_ARG): Likewise. ! (FUNCTION_OK_FOR_SIBCALL): Add parenthesis and whitespace. ! (SETUP_INCOMING_VARARGS): Likewise. ! (BUILD_VA_LIST_TYPE): Add parenthesis. ! (EXPAND_BUILTIN_VA_START): Uppercase macro paremeters and add ! parenthsis. ! (EXPAND_BUILTIN_VA_ARG): Likewise. ! (FUNCTION_PROFILER): Wrap in do { ... } while (0) and add parenthesis. ! (INITIALIZE_TRAMPOLINE): Add parenthesis. ! (INITIAL_ELIMINATION_OFFSET): Likewise. ! (REGNO_OK_FOR_INDEX_P): Add parenthesis. ! (REGNO_OK_FOR_BASE_P): Likewise. ! (REGNO_OK_FOR_SIREG_P): Add parenthesis and wrap. ! (REGNO_OK_FOR_DIREG_P): Likewise. ! (REG_OK_FOR_INDEX_P): Whitespace. ! (REG_OK_FOR_BASE_P): Whitespace. ! (GO_IF_LEGITIMATE_ADDRESS): Wrap in do { ... } while (0) and add ! parenthesis. ! (FIND_BASE_TERM): Fix typo. ! (LEGITIMIZE_ADDRESS): Wrap in { .. } while (0) and add parenthesis. ! (REWRITE_ADDRESS): Uppercase macro parameter and whitespace. ! (SYMBOLIC_CONST; Whitespace. ! (GO_IF_MODE_DEPENDENT_ADDRESS):Wrap in { .. } while (0) and wrap. ! (ENCODE_SECTION_INFO): Whitespace. ! (FINALIZE_PIC): Remove do { ... } while (0). ! (PROMOTE_MODE): Wrap in do { ... } while (0). ! (CONST_COSTS): Whitespace. ! (RTX_COSTS): Add paramethesis, whitespace and wrap. ! (REGISTER_MOVE_COST): Add parenthesis. ! (MEMORY_MOVE_COST): Likewise. ! (EXTRA_CC_MODES): Whitespace. ! (SELECT_CC_MODE): Add parenthesis and whitespace. ! (DBX_REGISTER_NUMBER): Uppercase macro parameter and add parenthsis. ! (ASM_PREFERRED_EH_DATA_FORMAT): Add parenthesis and whitespace. ! (ASM_OUTPUT_LABEL): Add paramethesis. ! (ASM_OUTPUT_REG_PUSH): Add parenthesis and whitespace. ! (ASM_OUTPUT_REG_POP): Likewise. ! (ASM_OUTPUT_ADDR_VEC_ELT): Add parenthesis. ! (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. ! * config/i386/i386.c: Update copyright. ! (CHECK_STACK_LIMIT): Add parenthesis. ! (AT_BP): Uppercase macro parameter. ! (x86_64_int_parameter_registers): Constify. ! (x86_64_int_return_registers): Likewise. ! (ix86_compare_op0): Use rtx. ! (construct_container): Constify INTREG parameter. ! (function_arg): Use rtx. ! * diagnostic.h: Update copyright date. ! (output_buffer_state): Add parenthesis. ! (output_buffer_format_args): Likewise. ! * combine.c (combine_instructions): Replace XEXP (links, 0) ! with link. ! 2002-01-06 H.J. Lu ! * cfgcleanup.c (thread_jump): Fix 2 typos. ! 2002-01-06 Aldy Hernandez ! * config.gcc: Add support for --enable-altivec. ! 2002-01-06 Craig Rodrigues ! * emit-rtl.c (gen_highpart): Add check for NULL_RTX. ! 2002-01-06 Jakub Jelinek ! * objc/objc-act.c (handle_impent): Use assemble_variable to emit ! __objc_class_name_*. ! 2002-01-06 Craig Rodrigues ! * doc/install.texi (sparcv9-*-solaris2*): Add documentation. ! 2002-01-06 Richard Henderson ! * reorg.c (emit_delay_sequence): Remove death notes, not merely ! nop them out. Increment label reference count for REG_LABEL. ! (fill_slots_from_thread): Frob label reference count around ! delete_related_insns. ! 2002-01-05 Richard Henderson ! * cfgcleanup.c (try_forward_edges): Detect infinite loops while ! jump threading. ! 2002-01-05 Richard Henderson ! * c-decl.c (c_expand_body): Don't call outlining_inline_function. ! * integrate.c (output_inline_function): Likewise. ! * toplev.c (rest_of_compilation): Do it here instead. Move call ! to remove_unnecessary_notes after emitting abstract instance. ! Force an emitted nested function to have its parent emited as well. ! * dwarf2out.c (loc_descriptor_from_tree): Read mode after checking ! for null. ! (rtl_for_decl_location): Do not look at reload data structures ! before reload has run. ! 2002-01-05 Kazu Hirata ! * cse.c: Fix formatting. ! * dwarf2asm.c: Likewise. ! * dwarf2out.c: Likewise. ! * explow.c: Likewise. ! * expmed.c: Likewise. ! * function.c: Likewise. ! * gcov.c: Likewise. ! * gencheck.c: Likewise. ! * genrecog.c: Likewise. ! * ggc-common.c: Likewise. ! * ggc-page.c: Likewise. ! * global.c: Likewise. ! 2002-01-05 Kazu Hirata ! * combine.c: Fix formatting. ! 2002-01-05 Craig Rodrigues ! PR middle-end/1557 ! * config/ia64/ia64.h (RENAME_EXTENDED_BLOCKS): Remove. ! 2002-01-05 David Edelsohn ! * config/rs6000/rs6000.h (TARGET_POWERPC): For IN_LIBGCC2, define ! as 1 for __powerpc64__ as well. ! * config/rs6000/t-aix43 (T_ADAFLAGS): Define. ! * alias.c (find_base_value, PLUS/MINUS): If we found a base, ! return it. ! 2002-01-05 Daniel Berlin ! * lcm.c: Revert change, due to performance regression it causes on ! SPEC because it's slightly more conservative (sigh, I hate ! edge-based LCM). ! Sat Jan 5 11:52:05 CET 2002 Jan Hubicka ! * cfgcleanup.c (try_forward_edges): Allow multiple jump threading. ! 2002-01-05 Neil Booth ! * doc/cppinternals.texi: Update. ! 2002-01-05 Hans-Peter Nilsson ! * doc/invoke.texi (Option Summary) : Document ! -mbranch-predict, -mreg-stack-fill-bug-workaround and their ! negatives. ! (MMIX Options): Ditto. Fix item/itemx typo for -mno-zero-extend. ! * config/mmix/mmix.c (mmix_target_asm_function_prologue): Rework ! kludge for pre-october-14th mmix versions to handle new-found bug ! with PUSHJ/PUSHGO and the register stack. ! * config/mmix/mmix.h (struct machine_function): Rename member ! has_call_value_without_parameters to has_call_without_parameters. ! All referers changed. ! (TARGET_MASK_REG_STACK_FILL_BUG, TARGET_DEFAULT ! TARGET_MASK_BRANCH_PREDICT): New macros. ! (TARGET_SWITCHES): New options -mreg-stack-fill-bug-workaround, ! -mno-reg-stack-fill-bug-workaround. ! * config/mmix/mmix.md ("call"): Set struct machine member ! has_call_without_parameters. ! Sat Jan 5 02:20:22 CET 2002 Jan Hubicka ! * cfgcleanup.c (thread_jump): Fix handling of reversed branches. ! Sat Jan 5 01:35:29 CET 2002 Jan Hubicka ! * cfgcleanup.c: Include tm_p.h ! (mark_effect): Fix handling of hard register; fix handling of SET ! 2002-01-04 Kazu Hirata ! * config/h8300/h8300.md (anonymous patterns): Check that ! operands are registers before using REGNO on them. ! 2002-01-03 Roland McGrath ! * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcall-gnu. ! 2002-01-04 Jakub Jelinek ! * tree.h (expand_expr_stmt_value): Add maybe_last argument. ! * c-common.h (genrtl_expr_stmt_value): Likewise. ! * stmt.c (expand_expr_stmt): Pass 1 as maybe_last. ! (expand_expr_stmt_value): Add maybe_last argument. ! Don't warn about statement with no effect if it is the last statement ! in expression statement. ! * c-semantics.c (genrtl_expr_stmt): Pass 1 as maybe_last. ! (genrtl_expr_stmt_value): Add maybe_last argument, pass it down to ! expand_expr_stmt_value. ! (expand_stmt) [EXPR_STMT]: Pass 1 as maybe_last to ! genrtl_expr_stmt_value if t is the last EXPR_STMT in its scope. ! * expr.c (expand_expr) [LABELED_BLOCK_EXPR, LOOP_EXPR]: Pass 1 ! as maybe_last to expand_expr_stmt_value. ! Fri Jan 4 11:45:05 2002 Jeffrey A Law (law@redhat.com) ! * c-common.c (c_expand_start_cond): Expect the IF_STMT node to ! be passed in, do not build it. ! (c_begin_if_stmt): New function. ! (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. ! * c-common.h (c_expand_start_cond): Update prototype. ! (c_begin_if_stmt): Prototype new function. ! (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. ! * c-parse.in (if_prefix): Use c_begin_if_stmt, ! c_begin_while_stmt and c_finish_while_stmt_cond. ! 2002-01-04 William Cohen ! * config/pa/elf.h (ASM_FILE_START): Reverted to profile_flag. ! * config/pa/pa-linux.h (ASM_FILE_START): Likewise. ! * config/pa/pa64-hpux.h (ASM_FILE_START): Likewise. ! * config/pa/som.h (ASM_FILE_START): Likewise. ! 2002-01-04 Daniel Berlin ! * lcm.c: Include df.h. ! Add available_transfer_function prototype. ! (compute_available): Rework to use iterative dataflow framework. ! (struct bb_info): s/bb_info/lcm_bb_info/g to avoid conflict ! with bb_info in df.h ! (available_transfer_function): New function. ! * Makefile.in (lcm.o): add df.h to dependencies. ! 2002-01-04 Richard Henderson ! * config/alpha/alpha.c (some_operand): Accept HIGH. ! (input_operand): Likewise; accept simple references to globals. ! (alpha_const_ok_for_letter_p): New, outlined from alpha.h. ! (alpha_const_double_ok_for_letter_p): Likewise. ! (alpha_extra_constraint): Likewise. ! (alpha_preferred_reload_class): Likewise. Do not force ! symbolic constants to memory. ! (alpha_legitimate_address_p): Accept simple references ! to small_symbolic_operand. ! (alpha_legitimize_address): New arg scratch. Be prepared to be ! called when no_new_pseudos. Emit simple symbolic references. ! Split integers into low, high, and rest. ! (alpha_expand_mov): Use alpha_legitimize_address. ! (some_small_symbolic_mem_operand): New. ! (split_small_symbolic_mem_operand): New. ! * config/alpha/alpha-protos.h: Update. ! * config/alpha/alpha.h (CONST_OK_FOR_LETTER_P): Out-line. ! (CONST_DOUBLE_OK_FOR_LETTER_P): Likewise. ! (EXTRA_CONSTRAINT): Likewise. ! (PREFERRED_RELOAD_CLASS): Likewise. ! (LEGITIMIZE_ADDRESS): Update for alpha_legitimize_address change. ! (PREDICATE_CODES): Update. ! * config/alpha/alpha.md: New post-reload splitters to convert ! simplfied symbolic operands to the form that references $29. ! (divide expanders): Use emit_move_insn, not gen_movdi_er_high_g. ! (movdi_er_nofix, movdi_er_fix): Accept any symbolic operand. ! 2002-01-03 Richard Henderson ! * local-alloc.c (function_invariant_p): Update commentary. ! 2002-01-04 H.J. Lu ! * toplev.c (rest_of_compilation): Fix a typo when calling ! cleanup_cfg. ! 2002-01-03 Kazu Hirata ! * c-common.c: Fix formatting. ! * diagnostic.c: Likewise. ! * doloop.c: Likewise. ! * dwarf2out.c: Likewise. ! 2002-01-03 Kazu Hirata ! * config/h8300/h8300.c (output_logical_op): Use 'not.w' instead ! of 'neg.w' when xoring with 0x0000ffff or 0xffff0000. ! 2002-01-03 Neil Booth ! * cpperror.c: Update comments and copyright. ! * cppexp.c, cppfiles.c, cpphash.c, cpphash.h, cppinit.c, ! cpplex.c, cpplib.c, cpplib.h, cppmacro.c, cppmain.c: Similarly. ! 2002-01-03 John David Anglin ! * collect2.c (main): Use strcmp when testing for "-shared". ! 2002-01-03 Neil Booth ! * cppmacro.c: Don't include intl.h. Update comments. ! (new_number_token): Allocate enough buffer for 64-bit unsigned ! integers; update prototype. ! * cppmain.c: Update comments. ! 2002-01-03 William Cohen ! * function.h (struct function): Add profile. ! (current_function_profile): New. ! doc/extend.texi: Update documentation. ! * final.c (final_start_function): Use current_function_profile ! instead of profile_flag. ! (profile_after_prologue): Likewise. ! * function.c (expand_function_start): Likewise. ! (expand_function_start): Likewise. ! * config/alpha/alpha.c (direct_call_operand): ! (alpha_does_function_need_gp): Likewise. ! (alpha_expand_prologue): Likewise. ! * config/arm/arm.c (arm_expand_prologue): Likewise. ! thumb_expand_prologue: Likewise. ! * config/d30v/d30v.c (d30v_stack_info): Likewise. ! * config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Likewise. ! (fr30_expand_prologue): Likewise. ! * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Likewise. ! * config/i386/i386.c (ix86_osf_output_function_prologue): Likewise. ! * config/i386/i386.h (FINALIZE_PIC): Likewise. ! * config/i386/win32.h (SUBTARGET_PROLOGUE): Likewise. ! * config/i960/i960.c (i960_output_function_prologue): Likewise. ! * config/ia64/ia64.c (ia64_compute_frame_size): Likewise. ! * config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Likewise. ! (m32r_expand_prologue): Likewise. ! * config/m88k/m88k.c (m88k_layout_frame): Likewise. ! (m88k_expand_prologue): Likewise. ! * config/m88k/m88k.h (ADJUST_INSN_LENGTH): Likewise. ! * config/mips/mips.c (compute_frame_size): Likewise. ! (mips_expand_prologue): Likewise. ! (mips_can_use_return_insn): Likewise. ! * config/pa/elf.h (ASM_FILE_START): Likewise. ! * config/pa/pa-linux.h (ASM_FILE_START): Likewise. ! * config/pa/pa64-hpux.h (ASM_FILE_START): Likewise. ! * config/pa/som.h (ASM_FILE_START): Likewise. ! * config/romp/romp.c (romp_using_r14): Likewise. ! * config/rs6000/rs6000.c (first_reg_to_save): Likewise. ! (rs6000_stack_info): Likewise. ! * config/rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise. ! * config/rs6000/xcoff.h (ASM_FILE_START): Likewise. ! * config/v850/v850.c (compute_register_save_size): Likewise. ! 2002-01-03 Jakub Jelinek ! * simplify-rtx.c (simplify_binary_operation) [DIV]: If ! gen_lowpart_common fails, use gen_lowpart_SUBREG. ! 2002-01-03 Turly O'Connor ! * darwin.c (machopic_output_possible_stub_label): Don't generate ! stub routines for pseudo-stubs which we've just defined. ! 2002-01-03 Kazu Hirata ! * builtins.c: Fix formatting. ! * c-typeck.c: Likewise. ! * combine.c: Likewise. ! * expr.c: Likewise. ! * loop.c: Likewise. ! 2002-01-03 Andreas Schwab ! * cppfiles.c (_cpp_pop_file_buffer): Change return type to bool ! and return true if _cpp_push_next_buffer pushed a new include ! file. ! * cpplib.c (_cpp_pop_buffer): Only call obstack_free if ! _cpp_pop_file_buffer did not push a new file. ! * cpphash.h (_cpp_pop_file_buffer): Update declaration. ! 2002-01-02 Eric Christopher ! * final.c (final_scan_insn): Change 0 -> NULL_RTX in ! FIND_REG_INC_NOTE call. Update copyright. ! * loop.c (canonicalize_condition): Ditto. ! * reorg.c (delete_scheduled_jump): Ditto. ! 2002-01-03 Kazu Hirata ! * gcse.c: Fix formatting. ! 2002-01-03 Graham Stott ! * mkconfig.sh: Output to config.h, hconfig.h and tconfig.h ! forward defs for struct tags rtx_def, union_tree, rtvec_def ! also output corresponding typedefs for rtx, tree, and rtvec. ! * system.h: Move forward defs for struct tags rtx_def, union_tree, ! rtvec_def along with corresponding typedefs for rtx, tree, and ! rtvec to config.h, hconfig.h, tconfig.h. ! 2002-01-03 Graham Stott ! * tree.h: Update copyright date. ! (IS_EXPR_CODE_CLASS): Add parenthesis. ! (TREE_SET_CODE): Add whitespace. ! (TREE_CHECK): Add parenthesis. ! (TREE_CLASS_CODE): Add parenthesis and wrap long line. ! (CST_OR_CONSTRUCTOR_CHECK): ! (EXPR_CHECK): Add parenthis, whitespace and wrap line. ! (TREE_SYMBOL_REFERENCED): Whitespace. ! (INT_CST_LT): Likewise. ! (INT_CST_LT_UNSIGNED): Likewise. ! (tree_real_cst): Unwrap comment. ! (tree_string): Likewise. ! (tree_complex): Likewise. ! (IDENTIFIER_POINTER): correct cast. ! (SAVE_EXPR_CONTEXT): Whitespace. ! (EXPR_WFL_FILENAME_NODE): Likewise. ! (EXPR_WFL_FILENAME): Remove parenthesis. ! (DECL_ORIGIN): Add parenthesis. ! (DECL_FROM_INLINE): Use NULL_TREE. ! (build_int_2): Whitespace. ! (build_type_variant): Add parenthesis. ! * gcc/jcf-parse.c: Update copyright date. ! (yyparse): Constify resource_filename. ! 2002-01-03 Graham Stott ! * rtl.h: Update copyright date. ! (RTL_CHECK1): Wrap long line. ! (RTL_CHECK2): Likewise. ! (RTL_CHECKC1): Wrap long line and whitespace. ! (RTL_CHECKC2): Likewise. ! (XWINT): Whitespace. ! (XINT): Likewise. ! (XSTR): Likewise. ! (XEXP): Likewise. ! (XVEC): Likewise. ! (XMODE): Likewise. ! (XBITMAP): Likewise. ! (XTREE): Likewise. ! (XBBDEF): Likewise. ! (XTMPL): Likewise. ! (X0WINT): Likewise. ! (X0INT):Likewise. ! (X0UINT): Likewise. ! (X0STR): Likewise. ! (X0EXP): Likewise. ! (X0VEC): Likewise. ! (X0MODE): Likewise. ! (X0BITMAP): Likewise. ! (X0TREE): Likewise. ! (X0BBDEF): Likewise. ! (X0ADVFLAGS): Likewise. ! (X0CSELIB): Likewise. ! (X0MEMATTR): Likewise. ! (XCWINT): Likewise. ! (XCINT): Likewise. ! (XCUINT): Likewise. ! (XCSTR): Likewise. ! (XCEXP): Likewise. ! (XCVEC): Likewise. ! (XCMODE): Likewise. ! (XCBITMAP): Likewise. ! (XCTREE): Likewise. ! (XCBBDEF): Likewise. ! (XCADVFLAGS): Likewise. ! (XCCSELIB): Likewise. ! (XC2EXP): Likewise. ! (INSN_UID): Likewise. ! (PREV_INSN): Likewise. ! (PATTERN): Likewise. ! (INSN_CODE): Likewise. ! (PUT_REG_NOTE_KIND): Likewise. ! (CODE_LABEL_NUMBER): Likewise. ! (NOTE_SOURCE_FILE): Likewise. ! (NOTE_BLOCK): Likewise. ! (NOTE_EH_HANDLER): Likewise. ! (NOTE_RANGE_INFO): Likewise. ! (NOTE_LIVE_INFO): Likewise. ! (NOTE_BASIC_BLOCK): Likewise. ! (NOTE_EXPECTED_VALUE): Likewise. ! (NOTE_LINE_NUMBER): Likewise. ! (LABEL_NAME): Likewise. ! (LABEL_NUSES): Likewise. ! (LABEL_ALTERNATE_NAME): Likewise. ! (ADDRESSOF_DECL): Likewise. ! (JUMP_LABEL): Likewise. ! (LABEL_NEXTREF): Likewise. ! (REGNO): Likewise. ! (ORIGINAL_REGNO: Likewise. ! (HARD_REGISTER_NUM_P): Add parenthesis. ! (SUBREG_REG): Whitespace. ! (SUBREG_BYTE): Likewise. ! (ASM_OPERANDS_TEMPLATE): Remove parenthesis. ! (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. ! (ASM_OPERANDS_OUTPUT_IDX): Likewise. ! (ASM_OPERANDS_INPUT_VEC): Likewise. ! (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. ! (ASM_OPERANDS_INPUT): Likewise. ! (ASM_OPERANDS_INPUT_LENGTH): Likewise. ! (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. ! (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. ! (ASM_OPERANDS_INPUT_MODE): Likewise. ! (ASM_OPERANDS_SOURCE_FILE): Likewise. ! (ASM_OPERANDS_SOURCE_LINE): Likewise. ! (MEM_SET_IN_STRUCT_P): Minor reformat. ! (TRAP_CONDITION): Whitespace. ! (TRAP_CODE): Likewise. ! (COND_EXEC_TEST): Likewise. ! (COND_EXEC_CODE): Likewise. ! (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. ! (PHI_NODE_P): Add parenthesis. ! (plus_constant): Whitespace and add parenthesis. ! 2002-01-03 Kazu Hirata ! * config/avr/avr.c: Fix comment typos. ! * config/c4x/c4x.md: Likewise. ! * config/dsp16xx/dsp16xx.h: Likewise. ! * config/dsp16xx/dsp16xx.md: Likewise. ! * config/i386/i386.md: Likewise. ! * config/ia64/ia64.c: Likewise. ! * config/m32r/m32r.h: Likewise. ! * config/m68hc11/m68hc11.md: Likewise. ! * config/mmix/mmix.c: Likewise. ! * config/mn10200/mn10200.c: Likewise. ! * config/romp/romp.c: Likewise. ! * config/sh/sh.c: Likewise. ! * config/stormy16/stormy16.c: Likewise. ! * config/stormy16/stormy16.h: Likewise. ! * config/stormy16/stormy16.md: Likewise. ! 2002-01-03 Graham Stott ! * loop.h: Update copyright date. ! (LOOP_MOVABLES): Fix typo. ! (LOOP_REGS): Likewise. ! (LOOP_IVS): Likewise. ! 2002-01-03 Graham Stott ! * cppinit.c: Update copyright date. ! Don't include output.h ! * Makefile.in: Update copyright date. ! Update dependency. ! 2002-01-02 Craig Rodrigues ! PR c/5226 ! * invoke.texi (-mthreads): Remove from documented RS/6000 options. ! (-pthread) Add to RS/6000 options. ! 2002-01-02 Kazu Hirata ! * except.c: Fix comment typos. ! * loop.c: Likewise. ! * varasm.c: Likewise. ! * doc/tm.texi: Fix a typo. ! 2002-01-02 Jakub Jelinek ! * c-typeck.c (output_init_element): Allow initializing static storage ! duration objects with compound literals. ! 2002-01-02 Richard Henderson ! * objc/objc-act.c (hack_method_prototype): Clear current_function_decl ! after abusing it. ! 2002-01-02 Kaveh R. Ghazi ! * gcc.c (default_compilers): Const-ify. ! * mips-tdump.c (stab_names): Likewise. ! * mips-tfile.c (map_coff_types, map_coff_storage, ! map_coff_sym_type, map_coff_derived_type, stabs_symbol, ! pseudo_ops_t, pseudo_ops): Likewise. ! * protoize.c (default_include): Likewise ! * real.c (GET_REAL, PUT_REAL): Don't cast away const-ness. ! (ezero, ehalf, eone, etwo, e32, elog2, esqrt2, epi): Const-ify. ! Add array size in declaration. ! (endian, emov, eisneg, eisinf, eisnan, eiisnan, eiisneg, emovi, ! emovo, emovz, eiisinf, ecmpm, eaddm, esubm, m16m, edivm, emulm, ! esub, eadd, eadd1, ediv, emul, e53toe, e64toe, e113toe, e24toe, ! etoe113, etoe64, etoe53, etoe24, ecmp, eround, ltoe, ultoe, ! eifrac, euifrac, e24toasc, e53toasc, e64toasc, e113toasc, etoasc, ! efloor, efrexp, eldexp, eremain, dectoe, etodec, ibmtoe, etoibm, ! c4xtoe, etoc4x, uditoe, ditoe, etoudi, etodi, esqrt, etens, ! emtens, make_nan): Const-ify. ! (TFbignan, TFlittlenan, XFbignan, XFlittlenan, DFbignan, ! DFlittlenan, SFbignan, SFlittlenan): Make static and const-ify. ! 2002-01-02 Joseph S. Myers ! * config.gcc (ia64-*-*): Set extra_headers. ! (alpha*-dec-osf*): Likewise. Don't use alpha/t-osf. ! * config/alpha/t-osf: Remove. ! * config/ia64/t-ia64 (EXTRA_HEADERS): Remove. ! 2002-01-02 David Edelsohn ! * config/rs6000/t-aix43: Revert previous change. ! 2002-01-02 Jason Merrill ! * c-decl.c (c_expand_body): Call outlining_inline_function when ! emitting an inline function out of line. ! 2002-01-02 Richard Henderson ! * dwarf2out.c (limbo_die_node): Add created_for member. ! (new_die): New argument created_for. Update all callers. ! (mark_limbo_die_list): New. ! (dwarf2out_init): Register limbo_die_list as a root. ! (dwarf2out_finish): Force insert limbo dies into their function ! context. ! 2002-01-02 Nathan Sidwell ! PR c++/5089 ! * doc/invoke.texi (-Wold-style-cast): Only warn about non-void casts. ! 2002-01-02 Kazu Hirata ! * config/h8300/fixunssfsi.c: Update copyright. ! Fix comment typos. ! Fix formatting. ! * config/h8300/h8300.c: Update copyright. ! Eliminate warnings. ! 2002-01-02 Kazu Hirata ! * config/romp/romp.c: Fix comment formatting. ! * config/romp/romp.h: Likewise. ! * config/romp/romp.md: Likewise. ! * config/s390/s390.c: Likewise. ! * config/stormy16/stormy16.c: Likewise. ! * config/stormy16/stormy16.h: Likewise. ! 2002-01-02 Alexandre Oliva ! * c-common.h (genrtl_expr_stmt_value): Declare. ! * c-semantics.c (genrtl_goto_stmt): Redirect to... ! (genrtl_goto_stmt_value): ... this new function. Pass new ! argument down to expand_expr_stmt_value, taking ! TREE_ADDRESSABLE into account. ! * c-common.c (c_expand_expr): Mark the last EXPR_STMT of a ! STMT_EXPR as addressable, i.e., one whose result we want. ! * expr.c (expand_expr): Don't save expression statement value ! of labeled_blocks or loop_exprs. ! * stmt.c (expand_expr_stmt): Redirect to... ! (expand_expr_stmt_value): ... this new function. Use new ! argument to tell whether to save expression value. ! (expand_end_stmt_expr): Reset last_expr_type and ! last_expr_value if we don't have either. ! * tree-inline.c (declare_return_variable): Mark its use ! statement as addressable. ! * tree.h: Document new use of TREE_ADDRESSABLE. ! (expand_expr_stmt_value): Declare. ! 2002-01-01 Tom Rix ! * config/rs6000/rs6000.c (rs6000_emit_set_long_const): Fix for use by ! rs6000_emit_allocate_stack. ! 2002-01-01 Joseph S. Myers ! * configure.in: Prepend ${srcdir}/config/${cpu_type}/ instead of ! ${srcdir}/ginclude/ to every entry in extra_headers. ! * configure: Regenerate. ! * ginclude/math-3300.h: Rename to config/m68k/math-3300.h. ! * ginclude/math-68881.h: Rename to config/m68k/math-68881.h. ! * ginclude/ppc-asm.h: Rename to config/rs6000/ppc-asm.h. ! * ginclude/proto.h: Rename to config/convex/proto.h. ! Tue Jan 1 17:12:56 2002 Richard Kenner ! * attribs.c (handle_vector_size_attribute): Use host_integerp ! and tree_int_cst; remove warnings. ! * caller-save.c (insert_restore): Add cast to get rid of warning. ! (insert_save): Likewise. ! * emit-rtl.c (adjust_address_1, offset_address): Likewise. ! * regmove.c (find_matches): Add temporary var to kill a warning. ! 2002-01-01 Douglas B Rupp ! * config/alpha/vms.h (DWARF2_UNWIND_INFO, EH_RETURN_HANDLER_RTX, ! LINK_EH_SPEC, MD_FALLBACK_FRAME_STATE_FOR): Define. ! * config/alpha/t-vms (EXTRA_PARTS): Add vms-dwarf2eh.o ! (vms-dwarf2eh.o): Add Makefile rule. ! * config/alpha/vms-ld.c (main): Handle vms-dwarf2eh.o. ! * config/alpha/vms-dwarf2eh.asm: New file. ! * gcc.c (delete_if_ordinary): Delete all versions. ! 2002-01-01 Hans-Peter Nilsson ! * config/mmix/mmix.md: Update FIXME to not mention ! define_constants. ! (MMIX_rJ_REGNUM): New define_constants constant. ! ("movqi", "movsi", "movdi", "*movdicc_real_foldable", ! "*movdicc_real"): Adjust contraints formatting. ! ("*bCC_foldable"): Add %+ for P in output format and delete FIXME ! for branch prediction. ! ("*bCC", "*bCC_inverted_foldable", "*bCC_inverted"): Add %+ in ! output template. ! ("*call_real", "*call_value_real", "nonlocal_goto_receiver", ! "*nonlocal_goto_receiver_expanded"): Use MMIX_rJ_REGNUM instead of ! number. Delete related FIXMEs. ! * config/mmix/mmix.h (MMIX_INCOMING_RETURN_ADDRESS_REGNUM): Change ! from number to MMIX_rJ_REGNUM. ! (TARGET_MASK_BRANCH_PREDICT): New. ! (TARGET_DEFAULT): Change to TARGET_MASK_BRANCH_PREDICT. ! (TARGET_SWITCHES): Update comment. Correct -mno-toplevel-symbols ! value. Add -mbranch-predict and -mno-branch-predict. ! (TARGET_VERSION): Drop date. ! (ADDITIONAL_REGISTER_NAMES): Use MMIX_rJ_REGNUM, not number. ! * config/mmix/mmix.c (mmix_encode_section_info): Correct condition ! for finding out global symbols. ! (mmix_asm_output_labelref): Revert condition for global symbol. ! (mmix_print_operand): : Emit P for a likely branch. ! (mmix_print_operand_punct_valid_p): A '+' is valid. ! See ChangeLog.6 for earlier changes. --- 2933,15823 ---- * config/alpha/t-osf4 (SHLIB_INSTALL): Prepend $$(DESTDIR) to $$(slibdir) in the installation commands. * config/arm/t-netbsd (SHLIB_INSTALL): Likewise. ! * config/ia64/t-hpux (SHLIB_INSTALL): Likewise. ! * config/mips/t-iris5-6 (SHLIB_INSTALL): Likewise. * config/pa/t-hpux-shlib (SHLIB_INSTALL): Likewise. * config/rs6000/t-aix43 (SHLIB_INSTALL): Likewise. + * config/rs6000/t-aix52 (SHLIB_INSTALL): Likewise. * config/t-slibgcc-elf-ver (SHLIB_INSTALL): Likewise. * config/t-slibgcc-sld (SHLIB_INSTALL): Likewise. * config/arc/t-arc (install-multilib-arc): Prepend $(DESTDIR) to $(libsubdir) in the installation commands. ! 2003-01-26 Alexandre Oliva ! * fp-bit.h: Define macros for TFmode floating-point constants ! in IBM-extended TFmode types. ! (TMODES): Define if __LDBL_MANT_DIG__ has the newly-supported ! widths. ! * config/fp-bit.c (pack_d, unpack_d): Support IBM-extended ! TFmode type. ! * config/fp-bit.h: Define macros for TFmode floating-point ! constants in IEEE quad TFmode type. Declare functions according ! to L_ macros. ! (TMODES): Define if __LDBL_MANT_DIG__ is 113. ! (TFtype, TItype, UTItype): Define if TMODES is defined. ! (MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise. ! (F_T_BITOFF, D_T_BITOFF): Define. ! (IMPLICIT_1, IMPLICIT_2): Cast constants to types that are ! guaranteed to be wide enough. ! * config/fp-bit.c: Check for L_ macros for tf functions. ! (__thenan_tf): New. ! (nan): Adjust. ! (pack_d, unpack_d): Support IEEE 854 quad type. ! (_fpmul_parts): Support TFmode. Compute exponent adjustment ! from FRAC_NBITS, FRAC_BITS and NGARDS. ! (usi_to_float): Cast constants to be shifted to fractype ! instead of assuming long long is wide enough. ! (sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New. ! * Makefile.in (FPBIT_FUNCS): Added _sf_to_tf. ! (DBBIT_FUNCS): Added _df_to_tf. ! (TPBIT_FUNCS): New. ! (libgcc.mk): Pass TPBIT and TPBIT_FUNCS down. ! (LIBGCC_DEPS): Added TPBIT. ! * mklibgcc.in: Support TPBIT and TPBIT_FUNCS. ! * optabs.c (expand_binop) : Return xtarget if we haven't ! been able to move the result to target. ! * expr.c (emit_group_store): Initialize dst with CONST0_RTX ! for the appropriate mode. ! * calls.c (emit_library_call_value_1): Handle return values ! in a PARALLEL. ! * rtl.c (get_mode_alignment): Moved to... ! * stor-layout.c: ... here. ! * print-rtl.c (print_rtx): Don't print MEM details in ! GENERATOR_FILEs. ! 2003-01-26 Michael Hayes ! * df.c (df_uses_record): Handle CC0. 2003-01-25 Jan Hubicka + Eric Botcazou + PR opt/8492 + * gcse.c (one_cprop_pass): Delete unreachable blocks. ! 2003-01-25 Ulrich Weigand ! * reload.c (maybe_memory_address_p): New function. ! (find_reloads_address): Use it instead of memory_address_p. ! 2003-01-25 Kaz Kojima ! * final.c (shorten_branches): Align the address of code label ! when computing initial lengths and addresses. ! 2003-01-25 Richard Henderson ! 2002-02-19 Robert Lipe ! * config/i386/t-sco5gas: (CRTSTUFF_T_CFLAGS_S): Delete -mcoff. ! 2003-01-23 Andreas Schwab ! * config/ia64/crtend.asm [HAVE_INITFINI_ARRAY]: Make ! __do_global_ctors_aux hidden global and don't put it in ! .init_array. ! * config/ia64/crtbegin.asm [HAVE_INITFINI_ARRAY]: Put it here ! instead so that it comes first. ! 2003-01-25 Michael Hayes ! * config/c4x/c4x.h (ASM_SPEC): Fix for new gas format. ! 2003-01-24 Kaveh R. Ghazi ! * calls.c (fix_unsafe_tree): Prototype. ! * loop.c (loop_invariant_p): Avoid signed/unsigned warning. ! 2003-01-24 Richard Henderson ! PR optimization/4382 ! * tree-inline.c (find_builtin_longjmp_call_1): New. ! (find_builtin_longjmp_call): New. ! (inlinable_function_p): Use it. ! 2003-01-24 Ulrich Weigand ! * configure.in (HAVE_AS_TLS): Add s390-*-* and s390x-*-* cases. ! * configure: Regenerate. ! * config/s390/s390-protos.h (tls_symbolic_operand): Add prototype. ! (tls_symbolic_reference_mentioned_p): Add prototype. ! (s390_tls_get_offset): Add prototype. ! (emit_pic_move): Remove prototype, replace by ... ! (emit_symbolic_move): .. this new prototype. ! * config/s390/s390.c (TARGET_HAVE_TLS): Conditionally define. ! (tls_model_chars): New global variable. ! (s390_encode_section_info): Encode TLS model. ! Use targetm.binds_local_p to check for local symbols. ! (s390_strip_name_encoding): New function. ! (TARGET_STRIP_NAME_ENCODING): Define. ! (get_thread_pointer): New function. ! (legitimize_tls_address): New function. ! (legitimize_address): Call it. ! (emit_pic_move): Remove, replace by ... ! (emit_symbolic_move): ... this new function. ! (larl_operand): Handle TLS operands. ! (legitimate_constant_p): Likewise. ! (s390_decompose_address): Likewise. ! (s390_cannot_force_const_mem): New function. ! (TARGET_CANNOT_FORCE_CONST_MEM): Define. ! (s390_output_symbolic_const): Handle TLS unspecs. ! (print_operand): New code 'J'. ! (machine_function): Add struct member 'some_ld_name'. ! (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. ! (enum s390_builtin): New type. ! (code_for_builtin_64, code_for_builtin_31): New global variables. ! (s390_init_builtins, s390_expand_builtin): New functions. ! (TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN): Define. ! * config/s390/s390.h (TLS_SYMBOLIC_CONST): New macro. ! (ASM_OUTPUT_LABELREF): Define. ! (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Handle TLS constants. ! * config/s390/s390.md: Define TLS UNSPEC constants. ! ("movdi", "movsi"): Handle TLS operands. ! ("get_tp_64", "get_tp_31", "set_tp_64", "set_tp_31"): New insns. ! ("*tls_load_64", "*tls_load_31"): New insns. ! ("call_value_tls", "call_value_tls_exp"): New expanders. ! ("brasl_tls", "bras_tls", "basr_tls_64", "basr_tls_31", ! "bas_tls_64", "bas_tls_31"): New insns. ! 2003-01-24 Volker Reichelt ! * doc/passes.texi: Fix typo. ! 2003-02-01 Jan Hubicka ! * loop.c (emit_prefetch_instructions): Do conversion at right place in ! RTL chain. ! * combine.c (simplify_set): Reverse order of ragumetns to ! REG_CANNOT_CHANGE_MODE_P ! * df.c (df_def_record_1): Likewise. ! * recog.c (register_operand): Likewise. ! * simplify-rtx.c (simplify_subreg): Likewise. ! * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Update use of ! CANNOT_CHANGE_MODE_CLASS. ! * regclass.c (cannot_change_mode_set_regs, invalid_mode_change_p): ! Likewise. ! * reload.c (push_reload): Likewise. ! * alpha.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * ia64.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * mips.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * mips-protos.h (mips_cannot_change_mode_class): Update prototype. ! * mips.c (mips_cannot_change_mode_class): Update. ! * pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * rs6000.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * s390.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * sh.h (CANNOT_CHANGE_MODE_CLASS): Update definition. ! * sh-protos.h (sh_cannot_change_mode_class): Update prototype. ! * sh.c (sh_cannot_change_mode_class): Update. ! * i386.h (CANNOT_CHANGE_MODE_CLASS): New. ! * tm.texi (CANNOT_CHANGE_MODE_CLASS): Update documentation. ! 2003-01-24 Gabriel Dos Reis ! * timevar.def (TV_NAME_LOOKUP, TV_OVERLOAD, ! TV_TEMPLATE_INSTANTIATION): New timevar_id eumerations. ! * timevar.h (POP_TIMEVAR_AND_RETURN): New macro. ! * timevar.c (timevar_pop): Be verbose when aborting. Include ! "toplev.h". ! 2003-01-24 Volker Reichelt ! * doc/bugreport.texi: Use @command instead of @code for commands. ! * doc/collect2.texi: Likewise. ! * doc/headerdirs.texi: Likewise. ! * doc/invoke.texi: Likewise. ! * doc/standards.texi: Likewise. ! * doc/tm.texi: Likewise. ! * doc/trouble.texi: Likewise. ! 2003-01-23 Franz Sirl ! PR java/6748 ! * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Don't destroy ! regs->nip. Fix rt_sigreturn frame layout. Add support for newer ! kernels. ! 2003-01-23 Volker Reichelt ! PR other/7341 ! * invoke.texi (ftest-coverage): Fix broken cross-reference. ! Change @code to @command for gcov command. ! * gcc.texi: Adjust title of gcov section. ! Adjust copyright. ! * gcov.texi: Likewise. ! 2003-01-23 Volker Reichelt ! PR other/7448 ! * doc/passes.texi (fssa-ccp): Remove misplaced line. ! 2003-01-22 Ulrich Weigand ! * config/s390/s390.h (HARD_REGNO_MODE_OK): Fix warning regression ! introduced by last change. ! 2003-01-22 Kaveh R. Ghazi ! * configure.in: Make --disable-checking the default. ! * configure: Regenerate. ! 2003-01-22 Ulrich Weigand ! * config/s390/s390-protos.h (preferred_la_operand_p): ! Remove second parameter. ! * config/s390/s390.c (preferred_la_operand_p): Likewise. ! * config/s390/s390.h (FRAME_REGNO_P, FRAME_REG_P): New macros. ! (HARD_REGNO_MODE_OK): Use FRAME_REGNO_P. ! * config/s390/s390.md ("*la_cc_64", "*la_cc_31", splitters): Remove. ! Add peepholes to transform ADD to LOAD ADDRESS. ! 2003-01-20 Jan Hubicka ! * i386.md (SSE cmov splitter): Handle memory operand in operand 5. ! 2003-01-21 Christian Ehrhardt ! PR opt/7507 ! * calls.c (fix_unsafe_tree): Split out from ... ! (expand_call): ... here. Use it on the function address too. ! 2003-01-20 Richard Henderson ! PR opt/7154 ! * stmt.c (expand_asm_operands): Validize memory operands. ! 2003-01-20 Richard Henderson ! PR opt/8848 ! * ifcvt.c (noce_process_if_block): Correct arguments to ! modified_between_p for no-else-block case. ! 2003-01-20 John David Anglin ! * ifcvt.c (noce_emit_store_flag): Don't emit store flag if mode of x ! is not a scalar int mode. ! 2003-01-20 Kazu Hirata ! * config/h8300/h8300.c (notice_update_cc): Don't assume that ! recog_data.operands[0] is always associated with cc0. ! 2003-01-19 Stephane Carrez ! * config/m68hc11/m68hc11.c (stack_push_word, stack_pop_word, ! z_reg, z_reg_qi): Declare static and GTY(). ! (da_reg): Remove. ! (create_regs_rtx): Don't create da_reg. ! ("gt-m68hc11.h"): Include for GTY roots. ! (m68hc11_autoinc_compatible_p): Remove. ! (autoinc_mode): Declare prototype. ! (m68hc11_make_autoinc_notes): Likewise. ! * config/m68hc11/m68hc11.h (ix_reg, iy_reg, d_reg): Declare extern ! and GTY() here. ! (m68hc11_compare_op0, m68hc11_compare_op1): Likewise. ! (m68hc11_soft_tmp_reg): Likewise. ! * config/m68hc11/m68hc11-protos.h: Remove above declarations. ! 2003-01-18 Roger Sayle ! * config/pa/pa.md (muldi3): Avoid invalid sharing of SUBREG RTXs. ! 2003-01-10 Geoffrey Keating ! * varasm.c (struct constant_descriptor_rtx): Remove unused ! `label' field. ! * ggc-page.c (ggc_collect): Avoid overflow computing ! min_expand. ! 2002-12-20 Geoffrey Keating ! * integrate.c (output_inline_function): Don't hold private ! pointers to 'struct function' over GC calls. ! 2003-01-17 Alexandre Oliva ! * config/mips/mips.h: Don't use #elif. Reported by Kaveh ! R. Ghazi. ! 2003-01-16 Kaz Kojima ! * config/sh/sh.c (sh_initialize_trampoline): Emit rotrdi3_mextr ! instead of rotldi3_mextr. ! 2003-01-16 Stephane Carrez ! * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Fix handling ! 68HC12 pre/post inc/dec side effects. ! 2003-01-16 Stephane Carrez ! * config/m68hc11/m68hc11.h (MASK_M6812): Define. ! 2003-01-16 Stephane Carrez ! * config/m68hc11/m68hc11.c (expand_prologue): Use push/pop to ! allocate 4-bytes of locals on 68HC11. ! (expand_epilogue): Likewise. ! (m68hc11_memory_move_cost): Increase cost of HI/QI soft registers. ! 2003-01-15 John David Anglin ! * som.h (SUPPORTS_WEAK, SUPPORTS_ONE_ONLY, MAKE_DECL_ONE_ONLY, ! ASM_WEAKEN_LABEL, GTHREAD_USE_WEAK): Define. ! * pa.h (TARGET_SOM_SDEF): Define. ! * pa-hpux11.h (TARGET_SOM_SDEF): Define. ! 2003-01-15 Stephane Carrez ! * config/m68hc11/m68hc11.h (ASM_SPEC): Handle -m68hcs12; Pass -mshort ! and -mshort-double to the assembler to specify the ABI. ! (LINK_SPEC): Likewise. ! (CPP_SPEC): Pass HCS12 specific define. ! (MASK_M68S12): New define. ! (TARGET_M68S12): Likewise. ! (TARGET_SWITCHES): New options -m68hcs12 and -m68S12. ! (TARGET_VERSION): Update. ! * config/m68hc11/m68hc12.h (CPP_SPEC): Pass HCS12 specific define. ! (LINK_SPEC): Update. ! (ASM_SPEC): Update. ! * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Update. ! * doc/invoke.texi (M68hc1x Options): Document -m68hcs12. ! 2003-01-15 John David Anglin ! * gengtype-lex.l (malloc, realloc): Move defines after include of ! system.h. ! 2003-01-15 Stephane Carrez ! * config/m68hc11/m68hc11.md ("return"): Use emit_jump_insn to emit ! the return code. ! 2003-01-15 Josef Zlomek ! * cfganal.c (set_edge_can_fallthru_flag): Clear the EDGE_CAN_FALLTHRU ! flag before setting it. ! 2003-01-15 Josef Zlomek ! Segher Boessenkool ! * predict.c (real_inv_br_prob_base): New variable. ! (propagate_freq): Use multiply by reciprocal instead of ! division. Don't divide by 1.0 at all. ! (estimate_bb_frequencies): Similar. ! 2003-01-15 Alexandre Oliva ! * configure.in (libgcc_visibility): Force disabled on IRIX 6 too. ! * configure: Rebuilt. ! * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Define so as ! to set $gp before the call. ! 2003-01-10 Andrew Haley ! * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Rename ! registers to be in correct order. Add rip. ! 2003-01-14 Denis Chertykov ! * config/ip2k/ip2k.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. ! (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. ! * config/ip2k/ip2k.c (ip2k_attribute_table): New table of ! attributes. ! (TARGET_ATTRIBUTE_TABLE): New macro. ! (valid_machine_type_attribute): Remove. ! (valid_machine_decl_attribute): Remove. ! (ip2k_handle_progmem_attribute): New function. ! (ip2k_handle_fndecl_attribute): New function. ! 2003-01-14 Eric Botcazou ! PR target/8870, PR target/9195 ! Backport from mainline: ! 2003-01-10 Richard Henderson ! * combine.c (make_compound_operation): Use SCALAR_INT_MODE_P, ! not INTEGRAL_MODE_P when widening extensions. ! 2003-01-13 Alexandre Oliva ! * aclocal.m4 (gcc_AC_PROG_GNAT): Don't try to prepend ! ${ac_tool_prefix} to ADAC or CC. Protect them from word ! splitting. ! * configure: Rebuilt. ! 2003-01-12 Kaveh R. Ghazi ! * unwind-dw2-fde.h (last_fde): Mark parameter with __attribute__ ! ((__unused__)). ! 2003-01-12 Alan Modra ! * expr.c (expand_expr ): Correct recursive call args. ! 2003-01-11 Jan Hubicka ! PR target/9068 ! * i386.c (output_fp_compare): Fix typo ! 2003-01-10 Josef Zlomek ! * jump.c (next_nonnote_insn_in_loop): New function. ! (copy_loop_headers): Use next_nonnote_insn_in_loop instead of ! next_nonnote_insn. ! (duplicate_loop_exit_test). Likewise. ! 2003-01-08 Jan Hubicka ! PR target/8213 ! * i386.c (ix86_expand_int_movcc): Fix RTL sharing problem. ! 2003-01-09 Kazu Hirata ! * config/h8300/h8300.md (*extzv_1_r_h8300): Correct the insn ! length. ! (*extzv_1_r_h8300hs): Likewise. ! (*extzv_1_r_inv_h8300): Likewise. ! (*extzv_1_r_inv_h8300hs): Likewise. ! 2003-01-09 Josef Zlomek ! * Makefile.in (optabs.o): Add dependency on basic-block.h. ! * basic-block.h (control_flow_insn_p): Fuction was exported. ! * cfgbuild.c (control_flow_insn_p): Fuction was made non-static. ! * optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL ! notes only when the region is contained in a single basic block. ! 2003-01-09 Josef Zlomek ! * Makefile.in (PARTITION_H): New. ! (BASIC_BLOCK_H): Added hard-reg-set.h and $(PARTITION_H). ! * basic-block.h: Include hard-reg-set.h. ! 2003-01-09 Eric Botcazou ! PR inline-asm/8832 ! * tree.h (expand_asm): New prototype. ! * stmt.c (expand_asm): Set the MEM_VOLATILE_P flag if instructed ! to do so. ! * c-semantics (genrtl_asm_stmt): Pass the RID_VOLATILE qualifier ! down to expand_asm. ! * c-typeck.c (simple_asm_stmt): Set the RID_VOLATILE qualifier. ! * rtlanal.c (volatile_insn_p) [ASM_INPUT]: Test the MEM_VOLATILE_P flag. ! (volatile_refs_p) [ASM_INPUT]: Likewise. ! (side_effects_p) [ASM_INPUT]: Likewise. ! 2003-01-09 Eric Botcazou ! PR c/8032 ! * c-typeck.c (process_init_element) [RECORD_TYPE]: For ! an empty element, do not advance the pointer to unfilled ! fields if there are pending initializers. ! 2003-01-09 Kaz Kojima ! * config/sh/sh.h (CASE_VECTOR_MODE): Use SImode for a ! non-optimizing compile. ! (ASM_OUTPUT_ADDR_VEC_ELT): Use .long for a non-optimizing ! compile. ! 2003-01-09 Andreas Jaeger ! * unwind-dw2-fde.h (last_fde): Revert last patch. ! 2003-01-08 Danny Smith ! PR optimization/8750 ! * config/i386/i386.c (ix86_expand_prologue): Don't allow ! scheduling pass to move insns across __alloca call. ! 2003-01-08 Jeff Sturm ! PR target/9210 ! * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): ! Set SYMBOL_REF_FLAG on local data sym_ref. ! 2003-01-08 Jan Hubicka ! PR target/8322 ! * i386.c (ix86_init_mmx_sse_builtins): Constify arguments of loads. ! * xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts. ! PR target/7782 ! * reload1.c (delete_output_reload): Avoid repeated attempts ! to delete insn. ! * cselib.c (cselib_current_insn_in_libcall): New static variable. ! (new_elt_loc_list, cselib_process_insn, cselib_init): Keep track on whether ! we are inside libcall. ! * cselib.h (elt_loc_list): Add in_libcall. ! * gcse.c (do_local_cprop): Do not copy propagate using insns ! in libcalls. ! 2003-01-07 Janis Johnson ! PR other/8947 ! * doc/invoke.texi (-malign-double): Explain that the option breaks ! binary compatibility. ! 2003-01-07 Richard Henderson ! * alias.c (find_base_value): Only use new_reg_base_value shortcut ! if the register is set once. ! 2003-01-07 Sylvain Pion ! * config/i386/i386.c (ix86_init_mmx_sse_builtins): ! __builtin_ia32_ldmxcsr and __builtin_ia32_stmxcsr are SSE, not MXX. ! * config/i386/i386.md (ldmxcsr, stmxcsr): SSE, not MMX. ! 2003-01-07 Benjamin Kosnik ! Sunil Davasam ! PR libstdc++/9076 ! * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, ! DW_CFA_same_value, read next and ignore. ! 2003-01-07 Richard Henderson ! * cfganal.c (flow_call_edges_add): Don't crash on noreturn call. ! 2003-01-06 Aldy Hernandez ! Segher Boessenkool ! * config/rs6000/rs6000.c (rs6000_reg_names): Add missing registers. ! (alt_reg_names): Ditto, fix formatting. ! * config/rs6000/rs6000.h (DEBUG_REGISTER_NAMES): Fix formatting. ! 2003-01-06 Bruce Korb ! * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function ! of *both* the file name and the fix name. ! 2003-01-06 Richard Henderson ! * config/alpha/alpha.c (alpha_encode_section_info): Adjust symbol_str ! properly when changing "local-ness". ! * config/alpha/alpha.md (movdi_er_high_g): Allow all symbols. ! 2003-01-05 Andreas Jaeger ! * unwind-dw2-fde.h (last_fde): Add unused attribute for obj. ! 2003-01-05 John David Anglin ! * pa64-hpux.h (JCR_SECTION_NAME): Define. ! (PA_INIT_FRAME_DUMMY_ASM_OP): Check EH_FRAME_SECTION_NAME instead of ! USE_EH_FRAME_REGISTRY when defining. ! 2003-01-04 John David Anglin ! * config.gcc (hppa*64*-*-hpux11*): Define extra_parts. Don't use ! collect2. ! * pa-hpux11.h (LDD_SUFFIX, PARSE_LDD_OUTPUT): Undefine. ! (HAS_INIT_SECTION, LD_INIT_SWITCH, LD_FINI_SWITCH): Define. ! * pa64-hpux.h (HP_INIT_ARRAY_SECTION_ASM_OP, ! GNU_INIT_ARRAY_SECTION_ASM_OP, HP_FINI_ARRAY_SECTION_ASM_OP, ! GNU_FINI_ARRAY_SECTION_ASM_OP): Define. ! (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Define when not using ! elfos.h. ! (EH_FRAME_IN_DATA_SECTION): Delete define. ! (HAS_INIT_SECTION, LD_INIT_SWITCH, LD_FINI_SWITCH): Undefine. ! (STARTFILE_SPEC): Use crtbegin.o. ! (ENDFILE_SPEC): Use crtend.o. ! (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, CRT_CALL_STATIC_FUNCTION, ! SUPPORTS_INIT_PRIORITY, PA_CXA_FINALIZE_STUB, PA_INIT_FINI_HACK, ! PA_INIT_FRAME_DUMMY_ASM_OP, PA_JV_REGISTERCLASSES_STUB, ! DTOR_LIST_BEGIN): Define. ! * pa.c (TARGET_ASM_CONSTRUCTOR): Define. ! (pa_asm_out_constructor, pa_asm_out_destructor): New functions. ! * som.h (SUPPORTS_INIT_PRIORITY): Delete define. ! 2003-01-02 Eric Christopher ! * config/mips/mips.md (movdf_internal2): Fix constraints. ! 2003-01-03 Gerald Pfeifer ! * doc/install.texi (Configuration): Fix markup for reference to ! gcc/config.gcc. ! 2003-01-02 Kazu Hirata ! * config/h8300/h8300.c (stack_pointer_operand): New. ! (const_int_gt_2_operand): Likewise. ! (const_int_ge_8_operand): Likewise. ! * config/h8300/h8300.md (a splitter): Likewise. ! (a peephole2): Likewise. ! * config/h8300/h8300-protos.h: Add prototypes for the new ! functions above. ! 2003-01-02 Neil Booth ! * gccbug.in: Update for new categories. ! 2002-12-31 Tom Tromey ! * doc/install.texi (Testing): Fixed typo. ! 2002-12-31 Jerry Quinn ! * gcc/doc/invoke.texi (Optimization Options): Clean up -O flag ! descriptions. ! 2002-12-31 Jerry Quinn ! * gcc/doc/invoke.texi (Optimization Options): List the options ! enabled by each -O flag. ! 2002-12-31 David Edelsohn ! * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Define. ! 2002-12-31 Gerald Pfeifer ! * doc/install.texi (Configuration): Explicitly refer ! gcc/config.gcc for a list of cpu models. ! 2002-12-30 Joseph S. Myers ! * doc/gcc.texi, doc/gccint.texi: Update last modification dates. ! 2002-12-30 Tom Tromey ! * doc/install.texi (Testing): Mention Jacks. ! 2002-12-30 Joseph S. Myers ! * doc/service.texi: Uncomment and update FAQ link. ! 2002-12-28 Joseph S. Myers ! * doc/cpp.texi, doc/gcc.texi, doc/gccint.texi, doc/install.texi: ! Use @copying. ! 2002-12-28 Joseph S. Myers ! * configure.in: Increase makeinfo version requirement to 4.[2-9]. ! * configure: Regenerate. ! * doc/install.texi: Update Texinfo version requirement. ! 2002-12-27 Joseph S. Myers ! * doc/include/texinfo.tex: Update to version 2002-12-26.16. ! 2002-12-26 Joseph S. Myers ! * doc/standards.texi, doc/invoke.texi: Point to 3.3 version of ! c99status.html. ! 2002-12-26 Kazu Hirata ! * config/h8300/h8300.h (IDENT_ASM_OP): End with a tab. ! 2002-12-23 Larin Hennessy ! * doc/install.texi: Remove i386-*-isc, i860-*-bsd, ! m68k-altos-sysv, m68k-isi-bsd, m68k-sony-bsd entries. ! * doc/invoke.texi: Remove AMD 29K, ARM RISC/iX, Clipper, Convex, ! DG/UX entries. ! * doc/md.texi: Remove AMD 29K entries. ! * doc/trouble.texi: Remove Alliant, DG/UX, Iris 4.0.5F, GAS ! 1.38.1, NewsOS, RT PC, WE32K entries. ! 2002-12-23 Aldy Hernandez ! PR/8763 ! * config/rs6000/altivec.md (mulv4sf3): Rewrite to add -0.0 vector. ! (altivec_vspltisw_v4sf): Name pattern. ! (altivec_vslw_v4sf): New pattern. ! 2002-12-23 Joseph S. Myers ! * doc/include/gcc-common.texi: Clear DEVELOPMENT. ! 2002-12-23 David Edelsohn ! PR middle-end/8784 ! * expr.c (expand_assignment): Apply special treatment to ! ARRAY_TYPE. ! 2002-12-21 Kazu Hirata ! * config/h8300/h8300.md (zero_extendqisi2): Correct the ! length. ! 2002-12-19 Devang Patel ! * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Add support for -dynamic. ! (CPP_SPEC): Define __STATIC__ and __DYNAMIC__ depending on -dynamic. ! (LINK_SPEC): Pass -dynamic to linker. ! * config/rs6000/darwin.h: Reject conflicting -static and -dynamic. ! 2002-12-19 Kazu Hirata ! * config/h8300/h8300.md (pushqi_h8300): Don't push the stack ! pointer. ! (pushqi_h8300hs): Likewise. ! (pushhi_h8300): Likewise. ! (pushhi_h8300hs): Likewise. ! 2002-12-19 Eric Botcazou ! PR optimization/8988 ! * loop.c (maybe_eliminate_biv): Kill REG_EQUAL notes mentioning ! the biv when eliminating. ! 2002-12-19 Aldy Hernandez ! PR 8553 ! * config/rs6000/altivec.md ("absv8hi2"): Add & to clobbered ! registers. ! ("absv16qi2"): Same. ! ("absv4si2"): Same. ! ("absv4sf2"): Same. ! ("altivec_abss_v16qi"): Same. ! ("altivec_abss_v8hi"): Same. ! ("altivec_abss_v4si"): Same. ! 2002-12-19 Ulrich Weigand ! * config/s390/s390.md ("*tsthiCCT", "*tsthiCCT_cconly", ! "*tstqiCCT", "*tstqiCCT_cconly"): New insns. ! 2002-12-18 Aldy Hernandez ! * config/rs6000/altivec.h (vec_cmplt macro): Reverse arguments in ! macro. ! (vec_cmplt C++ functions): Reverse arguments. ! 2002-12-17 Kazu Hirata ! * doc/c-tree.texi: Restore deliberate spelling mistakes. ! 2002-12-17 Kazu Hirata ! * doc/c-tree.texi: Fix typos and follow spelling conventions. ! * doc/cpp.texi: Likewise. ! * doc/extend.texi: Likewise. ! * doc/gty.texi: Likewise. ! * doc/install.texi: Likewise. ! * doc/invoke.texi: Likewise. ! * doc/md.texi: Likewise. ! * doc/passes.texi: Likewise. ! * doc/rtl.texi: Likewise. ! * doc/sourcebuild.texi: Likewise. ! * doc/tm.texi: Likewise. ! 2002-12-17 Jerry Quinn ! * doc/invoke.texi: Minor spelling and grammar fixes. ! 2002-12-16 Mark Mitchell ! * version.c (version_string): Mark as prerelease. ! 2002-12-13 John David Anglin ! * pa.c (output_millicode_call): Correct typo. ! (output_call): Likewise. ! 2002-12-13 Alexandre Oliva ! * config/mn10300/mn10300.c (print_operand) : Check ! operand's range. Print value directly, without aid from ! output_address. ! : New. ! : Make sure argument to fprintf has the right type. ! * config/mn10300/mn10300.h (OK_FOR_T): New macro. ! (EXTRA_CONSTRAINT): Adjust. ! * config/mn10300/mn10300.md: Add new all-QImode pattern for ! bclr. Use %U for immediate operands of bset and bclr. ! (iorqi3): New expand, with insns for AM33 and mn10300. ! 2002-12-13 J"orn Rennecke ! * sh.c (sh_register_operand): New function. ! (prepare_move_operands): Use it. ! * sh.h (PREDICATE_CODES): Add entry for sh_register_operand. ! * sh.md (movsi_media, movsi_media_nofpu): Allow stores of 0. ! (movqi_media, movhi_media, movdi_media, movdi_media_nofpu): Likewise. ! (movdf_media, movdf_media_nofpu, movv4sf_i, movsf_media): Likewise. ! (movsf_media_nofpu, movv2hi_i, movv4hi_i, movv8qi_i): Likewise. ! (movv2si_i): Likewise. ! 2002-12-13 Jim Wilson ! * doc/extend.texi (Complex Numbers): Update info on debug info. ! 2002-12-13 Kazu Hirata ! * config/h8300/h8300.md (addhi3_h8300): Remove the last ! alternative. ! 2002-12-12 Devang Patel ! * doc/invoke.texi: Document Darwin linker options, -bundle ! -bind_at_load, -all_load and -arch_errors_fatal ! 2002-12-12 Jim Wilson ! * dbxout.c (dbxout_fptype_value): New. ! (dbxout_type, case COMPLEX_TYPE): Call it. Use 'R' instead of 'r'. ! 2002-12-12 Kazu Hirata ! * c-decl.c: Fix a comment typo. ! * cfg.c: Likewise. ! * cfgcleanup.c: Likewise. ! * cfglayout.c: Likewise. ! * cfgrtl.c: Likewise. ! * c-typeck.c: Likewise. ! * dominance.c: Likewise. ! * dwarf2asm.c: Likewise. ! * dwarfout.c: Likewise. ! * expmed.c: Likewise. ! * expr.c: Likewise. ! * final.c: Likewise. ! * flow.c: Likewise. ! * function.c: Likewise. ! * gcc.c: Likewise. ! * genautomata.c: Likewise. ! * integrate.c: Likewise. ! * loop.c: Likewise. ! * loop.h: Likewise. ! * output.h: Likewise. ! * profile.c: Likewise. ! * ra.h: Likewise. ! * reload1.c: Likewise. ! * reload.c: Likewise. ! * sched-rgn.c: Likewise. ! * stmt.c: Likewise. ! * tree.h: Likewise. ! * vmsdbgout.c: Likewise. ! 2002-12-12 Kazu Hirata ! * config/h8300/h8300.md: Add a new peephole2. ! 2002-12-12 Kazu Hirata ! * config/h8300/h8300.md (a peephole2): Accept a constant ! that's accepted by CONST_OK_FOR_J. ! 2002-12-12 Kazu Hirata ! * config/h8300/h8300.h (CONST_OK_FOR_J): New. ! (CONST_OK_FOR_LETTER_P): Use CONST_OK_FOR_J. ! * config/h8300/h8300.md (*addhi_h8300): Add a new alternative. ! (*addhi_h8300hs): Likewise. ! 2002-12-12 J"orn Rennecke ! * sh.c (reg_class_from_letter): No longer const. Add 'e' entry. ! (sh_register_move_cost): Add clause for SImode fp-fp moves. ! Increase cost for moves involving multiple general purpose registers. ! * sh.h (OVERRIDE_OPTIONS): Set reg_class_from_letter['e'] according to ! TARGET_FMOVD. ! (HARD_REGNO_MODE_OK): Allow V2SFmode and V4SFmode in general purpose ! registers, and SImode in fp registers, for ! TARGET_SHMEDIA. ! (enum reg_class reg_class_from_letter): No longer const. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Use REGCLASS_HAS_FP_REG / ! REGCLASS_HAS_GENERAL_REG. ! Handle SImode moves from/to fp registers. ! ! TARGET_SHMEDIA && TARGET_FMOVD. ! (SECONDARY_INPUT_RELOAD_CLASS): Use REGCLASS_HAS_FP_REG. ! * sh.md (movsi_ie): Add alternatives to move from / to fp regisyters. ! 2002-12-12 Andreas Schwab ! * config/ia64/ia64.c (ia64_hpux_asm_file_end): Fix typo in last ! change and some warnings. ! 2002-12-12 Kazu Hirata ! * doc/md.texi (pushm): Fix a typo. ! 2002-12-12 Alexandre Oliva ! * config/mips/mips.c (mips_output_conditional_branch): Support ! PIC-safe out-of-range branch and branch-likely. ! * config/mips/mips.md (attr length): PIC-safe out-of-range ! branches are longer. ! ("jump"): Support PIC-safe out-of-range-for-branch jumps. Remove ! unused code to support indirect jumps. ! 2002-12-11 John David Anglin ! * pa.h (BIGGEST_ALIGNMENT): Change 32-bit value to 64 bits. ! (MAX_PARM_BOUNDARY, STACK_BOUNDARY): Express in terms of ! BIGGEST_ALIGNMENT. ! (PREFERRED_STACK_BOUNDARY): Express in terms of STACK_BOUNDARY. ! (FUNCTION_BOUNDARY): Express in terms of BITS_PER_WORD. ! 2002-12-11 Kazu Hirata ! * doc/invoke.texi: Correct dump file names. ! 2002-12-09 Steve Ellcey ! * config/ia64/ia64.c (ia64_hpux_asm_file_end): Don't send stripped ! name to globalize_label or assemble_name. ! 2002-12-11 J"orn Rennecke ! * sh.h (REG_CLASS_HAS_GENERAL_REG): Only true for SIBCALL_REGS ! if not TARGET_SHMEDIA. ! 2002-12-11 J"orn Rennecke ! * sh.h (REG_CLASS_HAS_FP_REG): New. ! (REGISTER_MOVE_COST) Use it. Put body into a function and ! move it into: ! * sh.c (sh_register_move_cost). ! * sh-protos.h (sh_register_move_cost): Declare. ! * sh.c (sh_expand_builtin): Abort for unexpected nop values. ! (sh_adjust_cost): Always return a value. ! 2002-12-11 J"orn Rennecke ! * sh.h (REG_CLASS_HAS_GENERAL_REG): New. ! (REGISTER_MOVE_COST): Use it. ! 2002-12-11 Richard Henderson ! * tree.h (MODULE_LOCAL_P): Kill. ! * varasm.c (default_binds_local_p_1): Use decl_visibility instead. ! 2002-12-11 Kazu Hirata ! * config/h8300/h8300.md (two define_peephole2): New. ! 2002-12-11 Kazu Hirata ! * config/h8300/h8300.h (CONST_OK_FOR_J): Remove. ! (CONST_OK_FOR_K): Likewise. ! (CONST_OK_FOR_M): Likewise. ! (CONST_OK_FOR_LETTER_P): Do not use the above macros. ! 2002-12-11 Neil Booth ! * c-common.c (builtin_define_type_max): Handle unsigned ! types too. ! 2002-12-10 Janis Johnson ! PR other/8882 ! * doc/tm.texi (PUSH_ARGS): Remove misplaced line. ! 2002-12-10 Devang Patel ! * config/darwin.h(LINK_SPEC): Add darwin specific linker options. ! * doc/invoke.texi: Add new "Darwin Options" section. ! 2002-12-10 Jim Wilson ! * rs6000.h (RETURN_IN_MEMORY): If ABI_V4, then TFmode is returned in ! memory. ! 2002-12-10 Andrew Haley ! * cse.c (cse_insn): Don't cse past a basic block boundary. ! 2002-12-10 Jakub Jelinek ! * config/linux.h (LIB_SPEC): If -pthread, add -lpthread even if ! -shared. ! * config/alpha/linux-elf.h (LIB_SPEC): Likewise. ! * config/alpha/linux.h (LIB_SPEC): Likewise. ! * config/arm/linux-elf.h (LIB_SPEC): Likewise. ! * config/pa/pa-linux.h (LIB_SPEC): Likewise. ! * config/sparc/linux.h (LIB_SPEC): Likewise. ! * config/sparc/linux64.h (LIB_SPEC): Likewise. ! 2002-12-09 Larin Hennessy ! * doc/invoke.texi: Document UltraSparc III option. ! 2002-12-09 Richard Henderson ! * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define ! __tune_pentium2__ and __tune_pentium3__ as necessary. ! 2002-12-09 Richard Henderson ! * target.h (gcc_target): Add cannot_force_const_mem. ! * target-def.h (TARGET_CANNOT_FORCE_CONST_MEM): New. ! (TARGET_INITIALIZER): Add it. ! * varasm.c (force_const_mem): Fail if cannot_force_const_mem. ! * expr.c (emit_move_insn): Be prepared for force_const_mem to fail. ! * reload1.c (reload): Likewise. ! * hooks.c (hook_bool_rtx_false): New. ! * hooks.h: Declare it. ! * config/i386/i386.c (ix86_cannot_force_const_mem): New. ! (TARGET_CANNOT_FORCE_CONST_MEM): New. ! (ix86_expand_move): Remove de-const-pooling hack. ! 2002-12-09 Jan Hubicka ! * toplev.c (dump_file): Fix order to match reality. ! 2002-12-08 Geoffrey Keating ! * config/rs6000/rs6000.md (load_multiple): Use adjust_address_nv. ! (store_multiple): Likewise. ! 2002-12-09 John David Anglin ! * pa/fptr.c (__canonicalize_funcptr_for_compare): Don't canonicalize ! function pointers in page 0. ! 2002-12-09 Steve Ellcey ! * config/ia64/hpux.h (TARGET_STRUCT_ARG_REG_LITTLE_ENDIAN): Remove ! definition ! (MEMBER_TYPE_FORCES_BLK): Move. ! * config/ia64/ia64.c (ia64_function_arg): Use PARALLEL to pass ! aggregate arguments. ! (ia64_function_value): Use PARALLEL to return aggregate values. ! 2002-12-09 Steve Ellcey ! * doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition. ! * defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition. ! * calls.c (store_unaligned_arguments_into_pseudos) Remove ! FUNCTION_ARG_REG_LITTLE_ENDIAN. ! * stmt.c (expand_return): Ditto. ! * expr.c (move_block_from_reg): Ditto. ! (copy_blkmode_from_reg): Ditto. ! * expmed.c (store_bit_field): Ditto. ! 2002-12-09 Svein E. Seldal ! * config.gcc: Added tic4x-* target as an alias to c4x-* ! 2002-12-08 Jan Hubicka ! * i386.c (ix86_expand_int_movcc): Use force_operand instead of ! constructing insn directly. ! 2002-12-07 Kazu Hirata ! * config/h8300/h8300.md (*iorhi_shift_8): New. ! 2002-12-06 Bernd Schmidt ! * doc/invoke.texi: Document FRV port options. ! * doc/md.texi: Document FRV register classes. ! 2002-12-07 Gerald Pfeifer ! * doc/install.texi (Configuration): Improve description of cases ! where `make distclean` may fail; clarify --with-gnu-as; fix grammar. ! 2002-12-06 Dhananjay Deshpande ! * gcc/config/sh/sh.c (calc_live_regs): Save fpscr only if target has ! FPU. ! (push): Generate push_fpscr. ! (pop): Generate pop_fpscr. ! * gcc/config/sh/sh.md : Add define_expand "push_fpscr", "pop_fpscr". ! (fpu_switch): Add alternative to push fpscr. Enable for TARGET_SH3E. ! 2002-12-06 J"orn Rennecke ! * sh.c (dump_table): DImode pool constants need only 32 bit alignment. ! DFmode alignment depends on TARGET_FMOVD && TARGET_ALIGN_DOUBLE. ! 2002-12-06 J"orn Rennecke ! * sh.md (movdi_i): Name. Remove inappropriate comment. ! 2002-12-06 J"orn Rennecke ! Merged from basic improvements branch (excerpt): ! 2002-11-19 Kaz Kojima ! * config/sh/sh.h (SH_DBX_REGISTER_NUMBER): Handle PR_MEDIA_REG. ! 2002-12-06 Jakub Jelinek ! * expr.c (expand_expr) : Never modify exp in place. ! 2002-12-05 John David Anglin ! * pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): Move define. ! * pa.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): To here. ! 2002-12-05 Dale Johannesen ! * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR. ! 2002-12-05 Danny Smith ! * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with ! PROFILE_HOOK. ! * config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef. ! 2002-12-05 Aldy Hernandez ! * config/rs6000/spe.h (__ev_mwlufi): Remove. ! (__ev_mwlufia): Remove. ! (__ev_mwlumfaaw): Remove. ! (__ev_mwlusfaaw): Remove. ! (__ev_mwlumfanw): Remove. ! (__ev_mwlusfanw): Remove. ! 2002-12-05 Kazu Hirata ! * config/h8300/h8300.md (*andorsi3_shift_8): New. ! 2002-12-05 Kazu Hirata ! * config/h8300/h8300.c (shift_alg_si): Optimize ashift:HI and ! lshiftrt:SI by 28, 29, and 30 bits when !TARGET_H8300. ! (get_shift_alg): Return optimal assembly instructions for the ! shifts mentioned above. ! 2002-12-04 Kazu Hirata ! * config/h8300/h8300.c (h8300_init_once): Do not use loop to ! implement ashiftrt:HI by 13 bits on H8S. ! 2002-12-04 John David Anglin ! * pa/fptr.c (__canonicalize_funcptr_for_compare): New file and function. ! * pa.md (canonicalize_funcptr_for_compare): Output library call to ! canonicalize_funcptr_for_compare_libfunc on TARGET_ELF32. ! * pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL, ! CTOR_LIST_BEGIN): New defines. ! * pa/t-linux (LIB2FUNCS_EXTRA): New define. ! (fptr.c): Add make rules. ! 2002-12-04 Geoffrey Keating ! * combine.c (combine_simplify_rtx): Add new canonicalizations. ! * doc/md.texi (Insn Canonicalizations): Document new ! canonicalizations for multiply/add combinations. ! * config/rs6000/rs6000.md: Add and modify floating add/multiply ! patterns to ensure they're used whenever they can be. ! 2002-12-04 Kazu Hirata ! * config/h8300/h8300.c: Update the comments related to shifts. ! 2002-12-04 Chris Demetriou ! * config/mips/mips.md (get_fnaddr): Correct length attribute. ! 2002-12-04 Kazu Hirata ! * config/h8300/h8300.md (*extzv_8_8): New. ! (*extzv_8_16): Likewise. ! 2002-12-04 Jason Merrill ! PR c++/8461, c++/8625 ! * integrate.c (copy_decl_for_inlining): Handle explicit invisible ! references. ! * tree-inline.c (initialize_inlined_parameters): Likewise. ! * tree.c (variably_modified_type_p): Just return an error_mark_node. ! 2002-12-04 Chris Demetriou ! * config/mips/mips.md (get_fnaddr): Avoid placing an "la" ! macro instruction in a branch delay slot, to avoid assembler ! warnings. ! 2002-12-04 Eric Botcazou ! PR c/7622 ! * c-semantics (genrtl_scope_stmt): Do not output inlined ! nested functions that contain no code. ! 2002-12-04 Jan Hubicka ! * cfgrtl.c (force_nonfallthru_and_redirect): Allow abnormal edge ! to be forced into nonfallthru. ! 2002-12-03 Jason Thorpe ! * config/t-netbsd (USER_H): Set to $(EXTRA_HEADERS). ! 2002-12-03 Aldy Hernandez ! * config/rs6000/spe.md (*movv1di_const0): New pattern. ! 2002-12-03 Richard Henderson ! * libgcc-std.ver: Inherit GCC_3.3 from GCC_3.0. ! 2002-12-03 Hans-Peter Nilsson ! * bitmap.c (bitmap_ior_and_compl, bitmap_union_of_diff): ! Initialize tmp.using_obstack to 0. ! 2002-12-03 Andreas Schwab ! * config/m68k/m68k.h (EH_RETURN_DATA_REGNO): Define. ! (EH_RETURN_STACKADJ_RTX): Define. ! (EH_RETURN_HANDLER_RTX): Define. ! (ASM_PREFERRED_EH_DATA_FORMAT): Define. ! * config/m68k/m68k.c (m68k_save_reg): New function. Handle eh ! registers and don't save fixed registers. ! (m68k_output_function_prologue): Use it. ! (use_return_insn): Likewise. ! (m68k_output_function_epilogue): Likewise. ! 2002-12-03 Kazu Hirata ! * config/h8300/h8300.c (single_one_operand): Fix a warning. ! (single_zero_operand): Likewise. ! 2002-12-02 Kazu Hirata ! * config/h8300/h8300.c (dosize): Replace argument op with ! sign. ! (h8300_output_function_prologue): Update the call to dosize. ! (h8300_output_function_epilogue): Likewise. ! 2002-12-02 Bob Wilson ! * config/xtensa/xtensa.h: Delete ifndefs with nothing inside them. ! 2002-12-02 Craig Rodrigues ! * configure.in: Use "missing" script to generate warning if ! flex or bison programs not found, instead of invoking "false". ! * configure: Rebuilt. ! 2002-12-02 Jan Hubicka ! * unroll.c (copy_loop_body): Copy CONST_OR_PURE_CALL_P. ! 2002-12-02 Jan Hubicka ! * i386.c (ix86_expand_int_movcc): Avoid overflow. ! 2002-12-02 Kazu Hirata ! * config/h8300/h8300.c (dosize): Output r7/er7 instead of sp. ! (push): Likewise. ! (pop): Likewise. ! (h8300_output_function_prologue): Likewise. ! (h8300_output_function_epilogue): Likewise. ! 2002-12-02 J"orn Rennecke ! * expmed.c (store_bit_field): Use int_mode_for_mode to find ! corresponding mode of non-integer mode, unless it is VOIDmode. ! 2002-12-02 Kazu Hirata ! * config/h8300/h8300.md (stm_h8300s_2): New. ! (stm_h8300s_3): Likewise. ! (stm_h8300s_4): Likewise. ! (five define_peephole2): Likewise. ! 2002-12-02 Kazu Hirata ! * ra-build.c: Fix a comment typo. ! 2002-12-01 Kazu Hirata ! * config/h8300/h8300.c (h8300_output_function_prologue): ! Remove variable idx. ! (h8300_output_function_epilogue): Likewise. ! 2002-12-01 Zack Weinberg ! * config/frv/xm-frv.h: Delete, unnecessary. ! 2002-12-01 Kazu Hirata ! * config/h8300/h8300.md: Add comments for define_peephole2. ! 2002-12-01 Mark Mitchell ! * builtin-types.def (BT_SIZE): Use size_type_node. ! * builtins.c (fold_builtin): Make the builtin strlen returns a ! size_t, not a sizetype. ! * c-common.c (c_sizeof_or_alignof_type): Use size_type_node, not ! c_size_type_node. ! (c_alignof_expr): Likewise. ! (c_common_nodes_and_builtins): Likewise. ! * c-common.h (CTI_C_SIZE_TYPE): Remove. ! (c_size_type_node): Likewise. ! * c-format.c (T_ST): Use size_type_node, not c_size_type_node. ! * tree.h (TI_SIZE_TYPE): New enumeral. ! (size_type_node): Likewise. ! 2002-11-30 John David Anglin ! * cfg.c (dump_flow_info): Use max_reg_num () to determine the largest ! pseudo register number plus 1. ! 2002-11-29 Hans-Peter Nilsson ! * cpplib.c (_cpp_test_assertion): Default *value to 0. ! * cppexp.c (num_part_mul): Initialize result.unsignedp, to 1. ! 2002-11-29 Ulrich Weigand ! * config/s390/t-crtstuff: New target makefile fragment. ! * config.gcc [s390-*-linux, s390x-*-linux]: Use it. ! 2002-11-29 Kazu Hirata ! * config/h8300/h8300.md (movsi_h8300hs): Change the order of ! alternatives to correct the length when the memory operand is ! either pre_dec or post_inc. ! 2002-11-29 Kazu Hirata ! * config/h8300/h8300.md (an anonymous pattern): Give an ! internal name *tst_extzv_bitqi_1_n. ! Accept bit_operand instead of bit_memory_operand. ! Do not accept bit tests with the MSB. ! (*tst_extzv_memqi_1_n): New. ! 2002-11-28 Kazu Hirata ! * config/h8300/h8300.c (h8300_eightbit_constant_address_p): ! Fix a comment typo. ! (h8300_tiny_constant_address_p): Likewise. ! 2002-11-28 Michael Matz ! * doc/passes.texi: Mention the other register allocator. ! 2002-11-28 Kazu Hirata ! * config/h8300/h8300.md (6 new peephole2 patterns): New. ! 2002-11-28 Jakub Jelinek ! * config.gcc (x86_64-*-linux*) [tmake_file]: Remove i386/t-crtstuff. ! * config/t-linux (CRTSTUFF_T_CFLAGS_S): Add $(CRTSTUFF_T_CFLAGS). ! * config/i386/t-linux64 (CRTSTUFF_T_CFLAGS): Define. ! 2002-11-28 Kazu Hirata ! * config/h8300/h8300.c (h8300_and_costs): New. ! * config/h8300/h8300.h (RTX_COSTS): Use h8300_and_costs. ! * config/h8300/h8300-protos.h: Add a prototype for ! h8300_and_costs. ! 2002-11-27 Zack Weinberg ! * config/rs6000/rs6000.c (altivec_init_builtins): Make the ! pointer argument in the prototypes of the following builtins ! be (const TYPE *) rather than (TYPE *): ! + __builtin_altivec_ld_internal_4sf ! + __builtin_altivec_ld_internal_4si ! + __builtin_altivec_ld_internal_8hi ! + __builtin_altivec_ld_internal_16qi ! + __builtin_altivec_lvsl ! + __builtin_altivec_lvsr ! + __builtin_altivec_lvebx ! + __builtin_altivec_lvehx ! + __builtin_altivec_lvewx ! + __builtin_altivec_lvxl ! + __builtin_altivec_lvx ! + __builtin_altivec_dst ! + __builtin_altivec_dstt ! + __builtin_altivec_dstst ! + __builtin_altivec_dststt ! 2002-11-27 Kaveh R. Ghazi ! * except.c (default_exception_section): Move variable into the ! scope where it is used. ! 2002-11-27 Krister Walfridsson ! * config.gcc (*-*-netbsd[2-9]*, *-*-netbsdelf[2-9]*): Test for ! correct version. ! 2002-11-27 Kazu Hirata ! * config/h8300/h8300.h (OK_FOR_U): Remove extra parentheses. ! 2002-11-27 Kazu Hirata ! * config/h8300/h8300.c (h8300_shift_costs): New. ! * config/h8300/h8300.h (RTX_COSTS): Use h8300_shift_costs. ! * config/h8300/h8300-protos.h: Add a prototype for ! h8300_shift_costs. ! 2002-11-27 Jim Wilson ! * config/rs6000/spe.md (spu_evsplatfi, spu_evsplati): Swap operands ! in output template. ! 2002-11-27 Casper S. Hornstrup ! * config/i386/i386.h (DLL_IMPORT_EXPORT_PREFIX): Define. ! * config/i386/winnt.c (i386_pe_dllexport_name_p): Use ! DLL_IMPORT_EXPORT_PREFIX, not '@'. ! (i386_pe_dllimport_name_p): Likewise. ! (i386_pe_mark_dllexport): Likewise. ! (i386_pe_mark_dllimport): Likewise. ! (i386_pe_encode_section_info): Likewise. ! (i386_pe_strip_name_encoding): Likewise. ! 2002-11-27 Richard Henderson ! * mkmap-symver.awk (BEGIN): Set sawsymbol false. ! (nm && NF == 3): Set sawsymbol true. ! (END): Exit if no symbols seen. ! (output): Fix map syntax error if no globals for the version. ! 2002-11-27 Jan Hubicka ! * builtins.def (DEF_C99_BUILTIN): Fix. ! 2002-11-26 Andrew Haley ! * unwind-sjlj.c (_Unwind_FindEnclosingFunction): Rename ! from_Unwind_Find_Enclosing_Function. ! * unwind-dw2.c (_Unwind_FindEnclosingFunction): Likewise. ! * config/ia64/unwind-ia64.c (_Unwind_FindEnclosingFunction): Likewise. ! * libgcc-std.ver (_Unwind_FindEnclosingFunction): Rename from ! _Unwind_Find_Enclosing_Function, export @@GCC_3.3. ! * unwind.h (_Unwind_FindEnclosingFunction): Add. ! 2002-11-26 Hartmut Penner ! * config/s390/s390.c (390_output_constant_pool): Set alignment ! before label in 64 bit mode, behind otherwise. ! 2002-11-26 Richard Henderson ! * c-common.c (handle_visibility_attribute): Accept "default". ! * tree.h (enum symbol_visibility): New. ! (decl_visibility): Declare. ! * target.h (gcc_target.visibility): Take visibility arg as integer. ! * varasm.c (default_assemble_visibility): Likewise. ! (decl_visibility): New. ! (maybe_assemble_visibility): Use it. ! * output.h (default_assemble_visibility): Update prototype. ! * config/rs6000/rs6000.c (rs6000_assemble_visibility): Take ! visibility arg as integer. ! * doc/extend.texi: Document default visibility. ! 2002-11-26 Kazu Hirata ! * config/h8300/h8300.c: Adjust spacing. ! * config/h8300/h8300.h: Likewise. ! 2002-11-26 Richard Henderson ! * hooks.c (hook_bool_void_false, hook_void_tree_int, ! hook_void_FILEptr_constcharptr): Rename so that the return ! type is first. ! (hook_int_tree_tree_1, hook_void_tree, hook_void_tree_treeptr, ! hook_bool_tree_false): New. ! * hooks.h: Update. ! * langhooks-def.h: Update for renames. ! * target-def.h: Likewise. ! * tree.c (default_comp_type_attributes, ! default_set_default_type_attributes, default_insert_attributes, ! default_function_attribute_inlinable_p, ! default_ms_bitfield_layout_p): Remove. ! * tree.h: Update. ! 2002-11-26 John David Anglin ! * pa-protos.h (function_value): New prototype. ! * pa.c (function_value): Use a PARALLEL to return small aggregates on ! TARGET_64BIT. ! * pa.h (FUNCTION_VALUE): Use function_value. ! * pa.md (call_value_internal_symref, call_value_internal_reg_64bit, ! call_value_internal_reg, sibcall_value_internal_symref, ! sibcall_value_internal_symref_64bit): Remove =rf constraint on return ! value. ! 2002-11-26 John David Anglin ! * expr.c (gen_group_rtx, emit_group_move): New functions. ! * expr.h (gen_group_rtx, emit_group_move): Prototype. ! * function.c (expand_function_start): Use gen_group_rtx to create a ! PARALLEL rtx to hold the return value when the real return rtx is a ! PARALLEL. ! (expand_function_end): Use emit_group_move to move the return value ! from a PARALLEL to the real return registers. ! * rtl.h (REG_FUNCTION_VALUE_P): Allow function values to be returned ! in PARALLELs. ! 2002-11-26 Jason Thorpe ! * config/t-libc-ok: Fix typo. ! 2002-11-26 Jakub Jelinek ! * configure.in: Move AC_CANONICAL_SYSTEM and AC_ARG_PROGRAM back ! before AC_PROG_CC. ! * configure: Rebuilt. ! 2002-11-26 Nathan Sidwell ! * c-decl.c: (start_struct): Commonize flag setting. ! 2002-11-26 Jason Thorpe ! * config/rs6000/rs6000.h (RS6000_CPU_CPP_ENDIAN_BUILTINS): New. ! * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Use ! RS6000_CPU_CPP_ENDIAN_BUILTINS. ! * config/rs6000/netbsd.h (RS6000_CPU_CPP_ENDIAN_BUILTINS): Redefine. ! 2002-11-26 Hartmut Penner ! * config/s390/s390.md (literal_pool_64, literal_pool_31 ): New ! insns. ! * config/s390/s390.c (struct machine_function): Introduction of ! struct machine_function. ! (s390_output_symbolic_const): Use of cfun. ! (s390_optimize_prolog): Likewise. ! (s390_fixup_clobbered_return_reg): Likewise. ! (s390_frame_info): Likewise. ! (s390_emit_prologue, s390_emit_epilogue): Likewise. ! (s390_init_machine_status): New function. ! (override_options): call s390_init_machine_status. ! * config/s390/s390-protos.h (s390_output_constant_pool): Changed ! prototype. ! 2002-11-26 Jakub Jelinek ! * varasm.c (output_constant_pool): For pool constants in mergeable ! section ensure each constant is padded to multiple of entity size. ! 2002-11-26 Jakub Jelinek ! * varasm.c (default_exception_section): Move to... ! * except.c (default_exception_section): ... here. Make ! .gcc_except_table read-only if it is not expected to have any ! dynamic relocations and linker handles it. ! * dwarf2out.c (default_eh_frame_section): Make .eh_frame read-only ! if it is not expected to have any dynamic relocations and linker ! handles it. ! * configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Check what ld does ! when linking read-only and read-write sections together. ! * configure, config.in: Rebuilt. ! * crtstuff.c (EH_FRAME_SECTION_CONST): Define. ! (__EH_FRAME_BEGIN__, __FRAME_END__): Add it. ! 2002-11-25 Aldy Hernandez ! * config/rs6000/spe.h (__ev_create_sfix32_fs): Change macro into ! new function. ! (__ev_create_ufix32_fs): Same. ! (__ev_get_sfix32_fs_internal): New. ! (__ev_get_sfix32_fs): Define to use function. ! (__ev_get_ufix32_fs_internal): New. ! (__ev_get_ufix32_fs): Define to use function. ! (__ev_get_upper_ufix32_fs): Call __ev_get_ufix32_fs. ! (__ev_get_lower_ufix32_fs): Same. ! (__ev_get_upper_sfix32_fs): Call __ev_get_sfix32_fs. ! (__ev_get_lower_sfix32_fs): Same. ! (__ev_set_sfix32_fs_internal): New. ! (__ev_set_ufix32_fs_internal): New. ! (__ev_set_sfix32_fs): Call __ev_set_sfix32_fs_internal. ! (__ev_set_ufix32_fs): Call __ev_set_ufix32_fs_internal. ! (__ev_set_upper_sfix32_fs): Call function. ! (__ev_set_lower_sfix32_fs): Same. ! (__ev_set_upper_ufix32_fs): Same. ! (__ev_set_lower_ufix32_fs): Same. ! 2002-11-25 Douglas B Rupp ! * gcc.c (do_spec_1): Reset delete_this_arg to zero. ! 2002-11-25 Jason Thorpe ! * config/elfos.h (HANDLE_SYSV_PRAGMA): Define as 1. ! * config/interix.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/linux-aout.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/lynx-ng.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/lynx.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/netbsd.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/openbsd.h (HANDLE_SYSV_PRAGMA: Likewise. ! * config/alpha/elf.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/arm/netbsd.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/cris/aout.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/d30v/d30v.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/frv/frv.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/i386/djgpp.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/i386/i386-interix.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/i386/vxi386.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/ia64/ia64.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/m88k/m88k.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/mmix/mmix.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/rs6000/darwin.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/sparc/linux-aout.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/sparc/vxsparc64.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/stormy16/stormy16.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/alpha/osf.h (HANDLE_SYSV_PRAGMA): Don't undef before ! defining. ! * config/i386/sco5.h (HANDLE_SYSV_PRAGMA): Likewise. ! * config/mips/iris5.h (HANDLE_SYSV_PRAGMA): Likewise. ! 2002-11-25 Dave Pitts ! * gcc/fixinc/mkfixinc.sh: add i370-*-openedition to bypass fixinc list ! 2002-11-25 Kazu Hirata ! * config/h8300/h8300.md (an anonymous pattern): New. ! 2002-11-25 Richard Henderson ! * alias.c (find_base_value): Use new_reg_base_value if it's live. ! (copying_arguments): Make boolean. ! 2002-11-25 Jason Thorpe ! * gcc.c (static_spec_functions): Add if-exists-else spec ! function. ! (if_exists_else_spec_function): New function. ! * doc/invoke.texi: Document the if-exists-else spec function. ! * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): For -static, use ! "%:if-exists-else(crtbeginT%O%s crtbegin%O%s)". ! 2002-11-25 Jason Thorpe ! * config.gcc (powerpc-*-netbsd*): Replace "svr4.h" with ! "netbsd.h netbsd-elf.h" in tm_file. Set tmake_file to ! "${tmake_file} rs6000/t-netbsd". ! * config/rs6000/netbsd.h: Rewrite. ! * config/rs6000/t-netbsd: New file. ! 2002-11-25 Kazu Hirata ! * config/h8300/h8300.md (an anonymous pattern): Relax the ! condition for the pattern. ! 2002-11-25 Aldy Hernandez ! * config/rs6000/rs6000.h (enum rs6000_builtins): Remove evmwlssf, ! evmwlsmf, evmwlssfa, evmwlsmfa, evmwlssfaaw, evmwlsmfaaw, ! evmwlssfanw, evmwlsmfanw. ! * config/rs6000/rs6000.c (bdesc_2arg): Same. ! * config/rs6000/spe.md: Same for patterns. ! 2002-11-25 Christian Ehrhardt ! PR c/8639 ! * fold-const.c (extract_muldiv): Don't propagate division unless ! both arguments are multiples of C. ! 2002-11-25 Andrew Haley ! * libgcc-std.ver (_Unwind_Find_Enclosing_Function): Add. ! * config/ia64/unwind-ia64.c (_Unwind_Find_Enclosing_Function): New. ! * unwind-sjlj.c (_Unwind_Find_Enclosing_Function): Likewise. ! * unwind-dw2.c (_Unwind_Find_Enclosing_Function): Likewise. ! 2002-11-24 Kazu Hirata ! * config/h8300/h8300.c (h8300_init_once): Fix a typo in the ! target help message. ! 2002-11-24 Jason Thorpe ! * config.gcc (*-*-netbsd*1.[7-9]*, *-*-netbsd*[2-9]*): Set ! extra_parts to "crtbegin.o crtend.o crtbeginS.o crtendS.o ! crtbeginT.o". ! (arm*-*-netbsd*, i[34567]86-*-netbsd*, m68k*-*-netbsd*) ! (ns32k-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Set extra_parts ! to "" for a.out configurations. ! * config/t-netbsd (CRTSTUFF_T_CFLAGS): Set to "-fPIC". ! 2002-11-24 Jason Thorpe ! * config/alpha/netbsd.h (CPP_SUBTARGET_SPEC): Just use ! NETBSD_CPP_SPEC directly. ! (SUBTARGET_EXTRA_SPECS): Remove netbsd_cpp_spec. Add ! netbsd_endfile_spec. ! (ENDFILE_SPEC): Use %(netbsd_endfile_spec). ! 2002-11-24 Jason Thorpe ! * config/netbsd-elf.h (STARTFILE_SPEC): Rename to ! NETBSD_STARTFILE_SPEC. ! (STARTFILE_SPEC): Redefine in terms of NETBSD_STARTFILE_SPEC. ! (ENDFILE_SPEC): Likewise. ! * config/netbsd.h (LIB_SPEC, LIBGCC_SPEC): Likewise. ! 2002-11-24 Andreas Schwab ! * Makefile.in (install-driver): Remove versioned link before ! trying to create it. ! * config/m68k/m68k.c: Fix typo in last change defining ! TARGET_ASM_CAN_OUTPUT_MI_THUNK. ! 2002-11-23 Kazu Hirata ! * config/h8300/h8300.c (print_operand): Update the use of ! h8300_tiny_constant_address_p. ! (h8300_adjust_insn_length): Likewise. ! (h8300_tiny_constant_address_p): Check if the given rtx is a ! variable declared with __attribute__ ((tiny_data)). ! 2002-11-22 Dale Johannesen ! * toplev.c (rest_of_compilation): Fix comments. ! 2002-11-22 Geoffrey Keating ! * aclocal.m4 (ac_cv_func_mmap_dev_zero): Darwin does not ! allow mmap from /dev/zero. Don't make decisions for the host ! based on presence or absence of /dev/zero on the build machine. ! (ac_cv_func_mmap_anon): Darwin does have working MMAP_ANON. ! (AC_FUNC_MMAP_FILE): Darwin does have mmap of a file. ! * configure: Regenerate. ! 2002-11-22 Daniel Jacobowitz ! * gcc.c (make_relative_prefix, split_directories) ! (free_split_directories): Removed. ! 2002-11-22 Daniel Jacobowitz ! * configure.in: Set insn=nop for DWARF-2 tests on ARM. ! * configure: Regenerated. ! 2002-11-22 Kazu Hirata ! * config/h8300/h8300.c (compute_a_shift_length): Fix the insn ! length computation when xor.l is output. ! 2002-11-21 Jim Wilson ! * config/rs6000/rs6000.c (function_arg): Set inner mode of SPE ! vectors to SI. ! 2002-11-21 Bob Wilson ! * config/xtensa/xtensa-protos.h (xtensa_copy_incoming_a7): Declare. ! * config/xtensa/xtensa.c (struct machine_function): Add ! incoming_a7_copied flag. ! (xtensa_copy_incoming_a7): Define. ! (xtensa_emit_move_sequence): Use xtensa_copy_incoming_a7. ! * config/xtensa/xtensa.md (movdi, movsf, movdf): Ditto. ! 2002-11-21 Jan Hubicka ! * i386-protos.h (x86_64_sign_extended_value): Fix prototype. ! * i386.c (x86_64_general_operand, x86_64_szext_general_operand, ! x86_64_nonmemory_operand, x86_64_movabs_operand, ! x86_64_szext_nonmemory_operand, x86_64_immediate_operand, ! ix86_expand_int_movcc): Update call of x86_64_sign_extended_value. ! (local_symbolic_operand): Do not care the 64bit limits. ! (x86_64_sign_extended_value): Remove allow_rip support. ! (legitimate_pic_address_disp_p): Handle all cases allowed ! with RIP addressing. ! (legitimate_address_p): Use legitimate_pic_address_disp_p for PIC. ! (legitimize_pic_address): Reorganize. ! * i386.h (EXTRA_CONSTRAINT): Update call of x86_64_sign_extended_value. ! 2002-11-21 Jason Thorpe ! * config.gcc (arm*-*-netbsdelf*): Enable configuration. ! * config/arm/netbsd-elf.h: New file. ! 2002-11-21 Jason Thorpe ! * config/arm/elf.h (SUBTARGET_EXTRA_SPECS): Add ! subtarget_asm_float_spec. ! (SUBTARGET_ASM_FLOAT_SPEC): Define, moving the ! defaults from... ! (ASM_SPEC): ...here. Use subtarget_asm_float_spec. ! 2002-11-21 Nick Clifton ! * config/fr30/fr30.md (movsf_constant_store): Move code to ! detect 0.0 into fr30.c. ! * config/fr30/fr30-protos.h (fr30_const_double_is_zero): ! Prototype. ! * config/fr30/fr30.c (fr30_const_double_is_zero): New ! function. Return true if the rtx is 0.0. ! 2002-11-21 Jason Thorpe ! * config/arm/elf.h (ASM_SPEC, LINK_SPEC): Pass -EL ! if -mlittle-endian is specified. ! 2002-11-21 Richard Earnshaw ! PR optimization/2903 ! * arm.md (anddi_notzesidi_di): Operand 2 is inverted not operand 1. ! (anddi_notsesidi_di): Likewise. ! 2002-11-21 Kazu Hirata ! * config/h8300/h8300.c (print_operand): Use ! h8300_eightbit_constant_address_p and ! h8300_tiny_constant_address_p. ! (h8300_adjust_insn_length): Likewise. ! * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Remove. ! (TINY_CONSTANT_ADDRESS_P): Likewise. ! (OK_FOR_U): Use eightbit_constant_address_p. ! 2002-11-21 Ulrich Weigand ! * config/s390/libgcc-libc.ver: Add multilib support. ! * config/s390/linux.h (MULTILIB_DEFAULT): Define. ! * config/s390/t-linux64 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES, ! MULTILIB_OSDIRNAMES, LIBGCC, INSTALL_LIBGCC, ! EXTRA_MULTILIB_PARTS): Define. ! 2002-11-21 Richard Earnshaw ! * arm.c (arm_get_frame_size): A leaf function does not need its ! stack padding to an aligned boundary if it has no frame. ! (thumb_get_frame_size): Likewise. ! 2002-11-20 Steve Ellcey ! * emit-rtl.c (gen_reg_rtx): Simplify mapping of Complex type ! to component type using GET_MODE_INNER. ! * expr.c (emit_move_insn_1): Ditto. ! * optabs.c (expand_binop): Ditto. ! (expand_unop): Ditto. ! (expand_complex_abs): Ditto. ! 2002-11-20 Douglas B Rupp ! * hwint.h (HAVE___INT64): Fix typo (was HAVE__INT64). ! 2002-11-20 DJ Delorie ! * config/stormy16/stormy16.c (s16builtins, ! xstormy16_init_builtins, xstormy16_expand_builtin): New. ! * config/stormy16/stormy16.md (divmodhi4, sdivlh, udivlh): New. ! 2002-11-20 Hans-Peter Nilsson ! * Makefile.in (RUN_GEN, VALGRIND_DRIVER_DEFINES): New variables. ! (DRIVER_DEFINES): Add $(VALGRIND_DRIVER_DEFINES). ! (executing gencheck, genconfigs, genconditions, genflags, ! gencodes, genconstants, genemit, genrecog, genopinit, genextract, ! genpeep, genattr, genattrtab, genoutput, gengenrtl, genpreds, ! gengtype, genprotos): Prepend $(RUN_GEN). ! * configure.in: Move host compiler tests before --enable-checking ! tests. ! (--enable-checking=valgrind): New. ! * config.in, configure: Regenerate. ! * cppfiles.c [!ENABLE_VALGRIND_CHECKING] (VALGRIND_DISCARD): ! Define as empty. ! (read_include_file): When doing the mmap+1 trick, ! valgrind-annotate the byte after the mmap:ed area as readable. ! (purge_cache): Remove above annotation. ! * gcc.c (execute) [ENABLE_VALGRIND_CHECKING]: Arrange to prepend ! VALGRIND_PATH -q to each command. ! * ggc-common.c [!ENABLE_VALGRIND_CHECKING] (VALGRIND_DISCARD): ! Define as empty. ! (ggc_realloc): Update valgrind annotations. ! * ggc-page.c [!ENABLE_VALGRIND_CHECKING] (VALGRIND_DISCARD): ! Define as empty. ! (alloc_anon, free_page, ggc_alloc, poison_pages): Add machinery to ! valgrind-annotate memory. ! 2002-11-20 Ulrich Weigand ! * recog.c (constrain_operands): Prefer exact match over reloadable ! EXTRA_MEMORY_CONSTRAINT or EXTRA_ADDRESS_CONSTRAINT. ! * reload.c (find_reloads): Always reload EXTRA_ADDRESS_CONSTRAINT ! operands in Pmode. ! 2002-11-20 Eric Botcazou ! PR c/8518 ! * c-decl.c (duplicate_decls): Outline the second definition ! of an extern inline function in all cases. ! 2002-11-20 Richard Sandiford ! * stor-layout.c (place_field): Update rli->offset as well as ! rli->bitpos. ! 2002-11-20 Richard Sandiford ! * sched-deps.c (sched_analyze): Check HARD_REGNO_CALL_PART_CLOBBERED. ! 2002-11-20 Richard Sandiford ! * config/sh/sh.md (udivsi3): Don't put udivsi3_i4_media instructions ! into a libcall block. ! (divsi3): Likewise divsi3_i4_media. ! 2002-11-20 Richard Sandiford ! * global.c (find_reg): Check HARD_REGNO_NREGS before kicking ! out another register. ! 2002-11-20 Jakub Jelinek ! * combine.c (force_to_mode): Only replace with (not Y) if all bits in fuller_mask ! (not just mask) are set in C. ! 2002-11-19 Andreas Jaeger ! * loop.c (record_giv): Initialize not_replaceable. ! (check_final_value): Likewise. ! 2002-11-19 Kazu Hirata ! * config/h8300/h8300.c (h8300_init_once): Replace 1 with ! MASK_H8300S. ! 2002-11-19 Vijay L. Khuspe ! * config/h8300/h8300.c (h8300_init_once): Allow -mn switch ! only if -mh or -ms present. ! (h8300_eightbit_constant_address_p): Support the normal mode. ! (h8300_tiny_constant_address_p): Likewise. ! * config/h8300/h8300.h (TARGET_NORMAL_MODE): New. ! (POINTER_SIZE): Add 16 bit pointer for the normal mode. ! (Pmode): Evaluate to HImode for the normal mode. ! (SIZE_TYPE): Evaluate to unsigned int for normal mode. ! (PTRDIFF_TYPE): Evaluate to int for the normal mode. ! (ASM_WORD_OP): Evaluate to word for the normal mode. ! * config/h8300/h8300.md (tablejump_normal_mode): New. ! (indirect_jump_normal_mode): New. ! * config/h8300/t-h8300 (MULTILIB_OPTIONS): Pass -mn option to ! directory. ! (MULTILIB_DIRNAMES): Create target dependent directory ! 'normal'. ! (MULTILIB_EXCEPTIONS): Don't turn on -mn on H8/300. ! * doc/invoke.texi (gccoptlist): Describe the new switch -mn. ! 2002-11-19 Jan Hubicka ! * i386.md (length_immediate): Do not refer to insn address. ! (jcc*, jmp patterns): Compute length explicitly. ! 2002-11-19 Eric Botcazou ! PR c/8588 ! * optabs.c (expand_binop): Convert CONST_INTs in shift ! operations too. ! 2002-11-19 Roger Sayle ! * gcse.c (gcse_emit_move_after): Correct typo in REG_EQUAL note. ! 2002-11-19 Kazu Hirata ! * config/h8300/h8300.md (an anonymous pattern): Relax the ! condition to accept the same operands and/or subregs. ! 2002-11-19 Daniel Jacobowitz ! * config/sh/sh.c (gen_shl_and): Revert previous patch. ! * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on ! reload_completed. ! 2002-11-19 Kazu Hirata ! * config/h8300/h8300.c (print_operand): Update the use of ! EIGHTBIT_CONSTANT_ADDRESS_P. ! (h8300_adjust_insn_length): Likewise. ! (h8300_eightbit_constant_address_p): Check if the given rtx is ! a variable with __attribute__((eightbit_data)). ! * config/h8300/h8300.h (OK_FOR_U): Update the use of ! EIGHTBIT_CONSTANT_ADDRESS_P. ! 2002-11-19 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Add self as second contact in ! addition to Jeff Law. ! 2002-11-19 Andreas Jaeger ! * tree-inline.c: Move prototpyes of find_alloca_call_1 and ! find_alloca_call to right place. ! 2002-11-19 Kazu Hirata ! * cppfiles.c: Fix formatting. ! 2002-11-19 Jason Thorpe ! * gcc.c (The Specs Language): Document spec functions. ! (static_spec_functions, lookup_spec_function) ! (eval_spec_function, handle_spec_function) ! (if_exists_spec_function, alloc_args): New. ! (execute): Abort if processing_spec_function is true. ! (do_spec_1): Hand off spec to handle_spec_function if %: ! is encountered. If processing_spec_function is true, ! end any pending argument when the end of the string is reached. ! (main): Use alloc_args to allocate the initial argument vector. ! * gcc.h (struct spec_function): New. ! (lang_specific_spec_functions): New extern. ! * config/netbsd-elf.h (STARTFILE_SPEC): Add if-exists(crti%O%s). ! (ENDFILE_SPEC): Add if-exists(crtn%O%s). ! * config/alpha/netbsd.h (ENDFILE_SPEC): Likewise. ! * doc/invoke.texi: Document spec functions. ! * cppspec.c (lang_specific_spec_functions): New. ! * gccspec.c: Likewise. ! 2002-11-18 Steve Ellcey ! * config/ia64/hpux_longdouble.h (FIXUNS_TRUNCTFSI2_LIBCALL): New. ! (FIXUNS_TRUNCTFDI2_LIBCALL): New. ! (fixunstfsi_libfunc): Change. ! (fixunstfdi_libfunc): Change. ! (sdiv_optab): Don't zero out SImode handler. ! (udiv_optab): Don't zero out SImode handler. ! (smod_optab): Don't zero out SImode handler. ! (umod_optab): Don't zero out SImode handler. ! 2002-11-18 Neil Booth ! PR preprocessor/8524 ! * cpplib.c (run_directive): Remove previous kludge to _Pragma. ! Add a new one in its place, which hopefully works. ! (skip_rest_of_line): Change test for bottom-of-context-stack. ! 2002-11-18 Jan Hubicka ! * i386.md (addqi_1_slp): Fix output template. ! (subqi_1_slp): Fix type. ! 2002-11-17 Jan Hubicka ! * calls.c (alloca_call_p): New global function. ! * tree.h (alloca_call_p): New. ! * tree-inline.c (inlinable_function_p): Do not inline when ! function calls alloca. ! (find_alloca_call, find_alloca_call_1): New functions. ! 2002-11-18 Kazu Hirata ! * config/h8300/h8300.md (*andorqi3): Use bor between bld and ! bst. Update the insn length. ! (*andorhi3): Likewise. ! (*andorsi3): Likewise. ! 2002-11-18 Richard Sandiford ! * config/sh/sh-protos.h (sh_mark_label): Declare. ! * config/sh/sh.c (sh_mark_label): New function, taken from ! movdi_const, but fixing the case when the address has an addend. ! * config/sh/sh.md (movdi_const, movdi_const_32bit): Use it. ! 2002-11-18 Richard Sandiford ! * config/sh/sh.c (pool_node): New field: part_of_sequence_p. ! (add_constant): Set it. ! (dump_table): Don't reorder a constant if part_of_sequence_p. ! (machine_dependent_reorg): Assume that float constants will ! stay in their original order if used as a sequence. ! 2002-11-18 Richard Sandiford ! * config/sh/sh.c (calc_live_regs): Update check for PIC liveness ! in compact code. ! 2002-11-18 Richard Sandiford ! * config/sh/sh.md (initialize_trampoline): Do not force the ! trampoline address into R0_REGS here. ! 2002-11-17 Kazu Hirata ! * df.c: Fix formatting. ! 2002-11-17 Kazu Hirata ! * config/h8300/h8300.md (two anonymous patterns): Fix insn ! lengths. ! 2002-11-17 Daniel Jacobowitz ! * sh.c (gen_shl_and): Don't create a zero_extend if the operand ! is not an arith_reg_operand. ! 2002-11-17 Graham Stott ! * real.c (real_to_decimal): Fix buffer overrun when buffer size ! is smaller than representation. ! 2002-11-17 Kazu Hirata ! * builtins.c: Fix formatting. ! 2002-11-16 Kazu Hirata ! * config/h8300/h8300.md (two anonymous patterns): Fix typos. ! 2002-11-16 Kazu Hirata ! * config/h8300/h8300.md: Fix formatting. ! 2002-11-16 Kazu Hirata ! * config/h8300/h8300.md: Replace spaces with tabs. ! * config/h8300/t-h8300: Remove a trailing empty line. ! 2002-11-16 Kazu Hirata ! * tlink.c: Fix formatting. ! 2002-11-16 David Edelsohn ! PR 8362 ! * config/rs6000/rs6000.c (rs6000_outout_load_multiple): New function. ! * config/rs6000/rs6000.md (movti_string): Remove output modifier ! when scratch register never needed. ! (ldmsi[3-8]): New patterns. ! 2002-11-16 Kazu Hirata ! * hard-reg-set.h: Follow spelling conventions. ! * real.c: Likewise. ! * target.h: Likewise. ! 2002-11-16 Jakub Jelinek ! * config/i386/x86-64.h (MCOUNT_NAME): Change into string literal. ! 2002-11-16 Kazu Hirata ! * optabs.c: Fix formatting. ! 2002-11-16 Jan Hubicka ! * athlon.md, k6.md, pentium.md, ppro.md: Handle shift1, rotate1 ! * i386.md (attribute type): Add type shift1 and rotate1. ! (*_slp): Rewrite to have just two operands to avoid reload problems. ! 2002-11-15 Kazu Hirata ! * config/h8300/h8300.md (4 anonymous patterns): New. ! 2002-11-15 Geoffrey Keating ! * params.def (GGC_MIN_HEAPSIZE): Fix GGC_ALWAYS_COLLECT problem. ! * doc/invoke.texi: Correct description of what needs to be done to ! force collection at every ggc_collect call. ! 2002-11-15 Ulrich Weigand ! * config/s390/s390.c (optimization_options): Set ! flag_asynchronous_unwind_tables to 1 by default. ! 2002-11-15 Ulrich Weigand ! * config/s390/s390.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. ! 2002-11-15 Jan Hubicka ! * i386-protos.h (x86_function_profiler): New function ! * i386.h (MCOUNT_NAME): New. ! (PROFILE_COUNT_REGISTER): New. ! (FUNCTION_PROFILER): Move offline to ... ! * i386.c (x86_function_profiler) ... here; fix 64bit support ! * beos-elf.h (FUNCTION_PROFILER): Kill. ! (MCOUNT_NAME): New. ! * freebsd-aout.h (FUNCTION_PROFILER): Kill. ! (MCOUNT_NAME): New. ! (PROFILE_COUNT_REGISTER): New. ! * linux.h (FUNCTION_PROFILER): Kill. ! (MCOUNT_NAME): New. ! * x86-64.h (FUNCTION_PROFILER): Kill. ! (MCOUNT_NAME): New. ! * freebsd.h (FUNCTION_PROFILER): Kill. ! (MCOUNT_NAME): New. ! 2002-11-14 Jeroen Dobbelaere ! * config/arm/arm.h (EXPAND_BUILTIN_VA_ARG, ! FUNCTION_ARG_PASS_BY_REFERENCE): Define. ! * config/arm/arm.c (arm_va_arg, ! arm_function_arg_pass_by_reference): New. ! * config/arm/arm-protos.h: Add prototypes. ! 2002-11-14 Kazu Hirata ! * gthr-single.h: Fix formatting. ! 2002-11-14 Zack Weinberg ! * tree.c (tree_vec_elt_check_failed): New function. ! * tree.h (TREE_VEC_ELT_CHECK): New checking macro. ! (TREE_VEC_ELT): Use it. ! * tree-inline.c (optimize_inline_calls): Don't copy a ! zero-length vector. ! 2002-11-14 Gabriel Dos Reis ! * diagnostic.c (sorry): Don't repeat "sorry, unimplemented" text. ! 2002-11-14 Jakub Jelinek ! * varasm.c (output_addressed_constants) [MINUS_EXPR]: Clear reloc if ! both operands contain local relocations. ! (categorize_decl_for_section): Don't use mergeable sections if ! initializer has any relocations. ! 2002-11-14 Kazu Hirata ! * gthr-vxworks.h: Fix formatting. ! 2002-11-13 Janis Johnson ! * doc/install.texi (Testing): Document extra Java testing. ! * doc/sourcebuild.texi (Test Suites): Document libgcj testing. ! 2002-11-13 John David Anglin ! * pa64-hpux.h (LINK_SPEC): Move "+Accept TypeMismatch" switch to the ! beginning of the spec. ! (LDD_SUFFIX, PARSE_LDD_OUTPUT): Delete. ! (LD_INIT_SWITCH, LD_FINI_SWITCH): Define but don't enable. Add comment ! regarding problems with global constructors when using GNU ld. ! 2002-11-13 Kazu Hirata ! * gthr-solaris.h: Fix formatting. ! 2002-11-13 Kazu Hirata ! * gthr-posix.h: Fix formatting. ! 2002-11-12 Kazu Hirata ! * config/h8300/h8300.md (*andorsi3): New. ! 2002-11-12 Franz Sirl ! * doc/install.texi (powerpc-*-linux-gnu*): Update binutils requirement. ! 2002-11-12 Kazu Hirata ! * config/h8300/h8300.c (tiny_constant_address_p): Parenthesize ! expressions appropriately. ! 2002-11-12 Kazu Hirata ! * gthr-win32.h: Fix formatting. ! 2002-11-12 Kazu Hirata ! * config/h8300/h8300.c (single_one_operand): Correctly compute ! mask when mode is SImode. ! (single_zero_operand): Likewise. ! * config/h8300/h8300.md (two new anonymous insns): New. ! 2002-11-12 Gerald Pfeifer ! * doc/contrib.texi (Contributors): Use GCJ instead of gcj to refer ! to that entire project. ! 2002-11-12 Rainer Orth ! * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Restore old ! directories. ! 2002-11-11 Zack Weinberg ! * params.def (ggc-min-expand, ggc-min-heapsize): New parameters. ! * doc/invoke.texi: Document them. ! * ggc-page.c: Include params.h. Remove definitions of ! GGC_MIN_EXPAND_FOR_GC, GGC_MIN_LAST_ALLOCATED. Replace ! GGC_POISON with ENABLE_GC_CHECKING in ifdefs, delete #define. ! (init_gcc): Don't set G.allocated_last_gc here. ! (ggc_collect): Use PARAM_VALUE (GGC_MIN_HEAPSIZE) and ! PARAM_VALUE (GGC_MIN_EXPAND) to decide whether or not to ! perform collection. ! * ggc-simple.c: Similarly. ! * Makefile.in (ggc-common.o, ggc-simple.o): Add $(PARAMS_H) to ! dependencies. ! 2002-11-11 Kazu Hirata ! * gthr-dce.h: Fix formatting. ! 2002-11-11 Franz Sirl ! PR c/8467 ! * stmt.c (tail_recursion_args): Handle DECL_MODE differing from the ! mode of DECL_RTL case. ! 2002-11-11 Janis Johnson ! * doc/contrib.texi: Merge in the list from the libstdc++ web pages. ! 2002-11-11 Jan Hubicka ! * i386.c (construct_container): Fix handling of SSE_CLASS. ! 2002-11-10 Joel Sherrill ! * config/m68k/t-crtstuff (crti.o): Use this... ! ($(T)crti.o): ... instead. ! (crtn.o): Use this... ! ($(T)crtn.o): ... instead. ! 2002-11-10 Eric Botcazou ! PR c/8439 ! * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only ! if there is something new to be simplified. ! 2002-11-10 H.J. Lu ! * calls.c (PUSH_ARGS_REVERSED): Define only if not defined. ! * expr.c (PUSH_ARGS_REVERSED): Likewise. ! * config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1. ! 2002-11-10 Zack Weinberg ! * config/rs6000/sysv4.h: Define NO_IMPLICIT_EXTERN_C here... ! * config/rs6000/linux.h, config/rs6000/linux64.h, ! config/rs6000/windiss.h: ... not here. ! 2002-11-10 Jason Thorpe ! * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Define ! __ABICALLS__ if TARGET_ABICALLS. ! 2002-11-10 Jan Hubicka ! * i386.h (MIN_UNITS_PER_WORD): Define to 8 for x86-64 libgcc. ! 2002-11-10 Joseph S. Myers ! * c-decl.c (grokdeclarator): Make error for duplicate type ! qualifiers into a pedwarn, disabled for C99. ! 2002-11-10 Hans-Peter Nilsson ! * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Define the same ! as FUNCTION_ARG_PASS_BY_REFERENCE. ! 2002-11-09 John David Anglin ! * pa.h (STARTING_FRAME_OFFSET): Change offset for TARGET_64BIT to 16. ! * config.gcc (hppa*64*-*-linux*): Shorten lines in tm_file define. ! (hppa*64*-*-hpux11*): Likewise. Use elfos.h with gas. ! * pa.c (output_millicode_call): Use symbol difference rather than ! $PIC_pcrel$0 when using HP assembler. ! * pa64-hpux.h (TARGET_GAS): Define to 1 or 0 depending on whether or ! not elfos.h (i.e., gas) is being used. ! (ASM_FILE_START, STRING_ASM_OP, TEXT_SECTION_ASM_OP, ! DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP, ASM_OUTPUT_ALIGNED_COMMON, ! ASM_OUTPUT_ALIGNED_LOCAL, GLOBAL_ASM_OP, ASM_DECLARE_FUNCTION_NAME, ! ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL, ! ASM_OUTPUT_INTERNAL_LABEL, ASM_GENERATE_INTERNAL_LABEL): Define when ! using elfos.h. ! (TARGET_ASM_GLOBALIZE_LABEL): Undefine when using elfos.h. ! (DWARF2_ASM_LINE_DEBUG_INFO): Delete. ! (ASM_FILE_START): Add standard .SPACE and .SUBSPA defines when not ! using elfos.h. ! (TEXT_SECTION_ASM_OP, READONLY_DATA_SECTION_ASM_OP, DATA_SECTION_ASM_OP, ! BSS_SECTION_ASM_OP): New HP style defines when not using elfos.h. ! (TARGET_ASM_NAMED_SECTION, MAKE_DECL_ONE_ONLY, ASM_WEAKEN_LABEL): ! Don't define when not using elfos.h. ! (ASM_DECLARE_RESULT): Don't define. ! * doc/install.texi (hppa*-hp-hpux*): Remove statement that HP assembler ! doesn't work on hppa64-hp-hpux11. ! (hppa*-hp-hpux11): Update. ! 2002-11-09 Jason Thorpe ! * config/mips/netbsd.h (SUBTARGET_ASM_SPEC): Don't pass -KPIC ! to the assembler if -mno-abicalls was specified. ! 2002-11-09 John David Anglin ! * pa-linux.h (PREFERRED_DEBUGGING_TYPE, DWARF2_ASM_LINE_DEBUG_INFO, ! ASM_OUTPUT_DEF): Delete. ! 2002-11-09 Neil Booth ! * c-opts.c (COMMAND_LINE_OPTIONS): Fix -Wimplicit. ! 2002-11-08 Dale Johannesen ! * dbxout.c (dbxout_type): Fix stabs info for vector types. ! 2002-11-08 Neil Booth ! PR preprocessor/8497 ! PR preprocessor/8501 ! * cpptrad.c (scan_out_logical_line): A '#' from a macro doesn't ! start a directive. In assembler, #NUM is not a line directive. ! 2002-11-08 Neil Booth ! * cppmain.c (cpp_preprocess_file): Loop to pop any -included ! buffers. ! 2002-11-08 Kazu Hirata ! * config/h8300/h8300.md (two anonymous test insns): New. ! 2002-11-08 Jan Hubicka ! * jump.c (mark_jump_label): Handle subregs of label_refs. ! 2002-11-07 David Mosberger ! * config/ia64/crtend.asm: Include "auto-host.h". ! [HAVE_INITFINI_ARRAY]: Invoke __do_global_ctors_aux via .init_array. ! * config/ia64/crtbegin.asm: Similarly. ! * config/ia64/t-ia64 (crtbegin.o): Include from current directory. ! (crtend.o, crtbeginS.o, crtendS.o): Likewise. ! * aclocal.m4 (gcc_AC_INITFINI_ARRAY): New. ! * configure.in: Use it if --enable-initfini-array not specified. ! * doc/install.texi (Configuration): Document --enable-initfini-array. ! * configure, config.in: Rebuild. ! 2002-11-07 Jason Thorpe ! * config/arm/arm-protos.h (arm_get_frame_size) ! (thumb_get_frame_size): New prototypes. ! * config/arm/arm.c (arm_get_frame_size) ! (thumb_get_frame_size): New functions. ! (use_return_insn, arm_output_epilogue, arm_output_function_epilogue) ! (arm_compute_initial_elimination_offset, arm_expand_prologue): Use ! arm_get_frame_size. ! (thumb_expand_prologue, thumb_expand_epilogue): Use ! thumb_get_frame_size. ! * config/arm/arm.h (PREFERRED_STACK_BOUNDARY): Define. ! (machine_function): Add frame_size member. ! (THUMB_INITIAL_ELIMINATION_OFFSET): Use thumb_get_frame_size. ! 2002-11-07 Richard Earnshaw ! * arm.c (bit_count): Make argument unsigned long. Return unsigned. ! Adjust code to use portable unsigned bit manipulation. ! (insn_flags, tune_flags): Change type to unsigned. ! (struct processors): Make flags unsigned long. ! (arm_override_options): Change type of count and current_bit_count ! to unsigned. ! 2002-11-07 Richard Earnshaw ! * arm/elf.h (TYPE_OPERAND_FMT): Prefix type with %. ! 2002-11-07 J"orn Rennecke ! * sh.h (DWARF_FRAME_RETURN_COLUMN): Use DWARF_FRAME_REGNUM. ! 2002-11-07 Jan Hubicka ! * reg-stack.c (compensate_edge): Fix sanity check. ! 2002-11-05 Geoffrey Keating ! * config.gcc: Don't create crtbegin, crtend on Darwin; do create ! crt2.o. Rearrange t-darwin makefiles. ! * crtstuff.c [OBJECT_FORMAT_MACHO]: Delete. ! * unwind-dw2-fde-darwin.c: New. ! * unwind-dw2-fde-glibc.c: Correct comment. ! * unwind-dw2-fde.c (__register_frame_info_bases) ! [DWARF2_OBJECT_END_PTR_EXTENSION]: Clear fde_end. ! (classify_object_over_fdes): Use last_fde. ! (add_fdes): Likewise. ! (linear_search_fdes): Likewise. ! * unwind-dw2-fde.h (struct object) ! [DWARF2_OBJECT_END_PTR_EXTENSION]: Add fde_end field. ! (last_fde): New. ! * config/darwin.h (STARTFILE_SPEC): Include crt2.o not crtbegin.o. ! (ENDFILE_SPEC): No crtend.o. ! * config/t-darwin: New. ! * config/i386/t-darwin: Delete. ! * config/darwin-crt2.c: New. ! * config/rs6000/t-darwin: Delete contents duplicated in t-rs6000 ! or config/t-darwin. ! 2002-11-06 David Edelsohn ! PR target/8480 ! * config/rs6000/rs6000.md (movdi_internal64): Discourage ! FPR to FPR moves. ! 2002-11-06 Janis Johnson ! * doc/contrib.texi: Merge in the list from the Java web pages. ! 2002-11-06 David O'Brien ! * config/sparc/freebsd: Fix typo. ! 2002-11-06 John David Anglin ! * pa64-hpux.h (LDD_SUFFIX, PARSE_LDD_OUTPUT): Define. ! 2002-11-06 Alexandre Oliva ! * config/mips/mips.md (call_value_multiple_internal2): Use dla for ! non-SImode addresses. ! 2002-11-05 Bob Wilson ! * config/xtensa/elf.h (LIB_SPEC): Add "-lhal". ! 2002-11-05 John David Anglin ! * pa64-hpux.h (LIB_SPEC): Fix p and pg options. ! (STARTFILE_SPEC): Remove p and pg options. ! 2002-11-05 Andrew Haley ! * fold-const.c (fold): Don't transform (a0 op compound(a1,a2)) ! to (compound(a1,a0 op a2)) if a0 or a1 have side effects. ! 2002-11-05 Richard Sandiford ! * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Move comment to... ! * config/mips/mips.c (mips_cannot_change_mode_class): ...here. ! 2002-11-04 Dale Johannesen ! * doloop.c (doloop_modify_runtime): Fix loop count computation ! for unrolled loops. ! * loop.c (loop_invariant_p): Support calling from unroller. ! 2002-11-04 Ulrich Weigand ! * config/s390/s390.c (s390_decompose_address): Use arg_pointer_rtx ! for comparison. ! 2002-11-04 Aldy Hernandez ! * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. ! * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. ! (CLASS_CANNOT_CHANGE_MODE): Remove. ! (CANNOT_CHANGE_MODE_CLASS): New. ! * config/alpha/alpha.h: Same. ! * config/ia64/ia64.h: Same. ! * config/mips/mips.h: Same. ! * config/s390/s390.h: Same. ! * config/sh/sh.h: Same. ! * config/pa/pa64-regs.h: Same. ! * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. ! * config/sh/sh.c (sh_cannot_change_mode_class): New. ! * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add ! prototype. ! * config/mips/mips.c (mips_cannot_change_mode_class): New. ! * doc/tm.texi (Register Classes): Remove ! CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. ! Document CANNOT_CHANGE_MODE_CLASS. ! * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. ! (push_reload): Same. ! * simplify-rtx.c (simplify_subreg): Same. ! * reload1.c (choose_reload_regs): Same. ! * recog.c (register_operand): Same. ! * regrename.c (mode_change_ok): Change to use new ! CANNOT_CHANGE_MODE_CLASS infrastructure. ! * regclass.c (cannot_change_mode_set_regs): New. ! Declare subregs_of_mode. ! (regclass): Use subregs_of_mode. ! Remove references to reg_changes_mode. ! (init_reg_sets_1): Remove class_can_change_mode and ! reg_changes_mode code. ! (invalid_mode_change_p): New. ! (dump_regclass): Use invalid_mode_change_p instead of ! class_can_change_mode. ! (regclass): Same. ! (record_operand_costs): Do not set reg_changes_mode. ! * local-alloc.c (struct qty): Remove changes_mode field. ! (alloc_qty): Remove changes_mode initialization. ! (update_qty_class): Remove set of changes_mode. ! (find_free_reg): Use subregs_of_mode. ! * global.c (find_reg): Use subregs_of_mode info. ! * rtl.h (cannot_change_mode_set_regs): New prototype. ! (invalid_mode_change_p): Same. ! (REG_CANNOT_CHANGE_MODE_P): New macro. ! * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove ! REG_CHANGES_MODE. ! (life_analysis): Clear subregs_of_mode. ! * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. ! Remove use of CLASS_CANNOT_CHANGE_MODE. ! (simplify_set): Same. ! (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove ! REG_CHANGES_MODE. ! * regs.h: Add extern for subregs_of_mode; ! Include hard-reg-set and basic-block. ! (REG_CHANGES_MODE): Delete. ! 2002-11-03 John David Anglin ! * jump.c (never_reached_warning): Don't set contains_insn until the ! first line note is seen. ! 2002-11-03 David Edelsohn ! * config/rs6000/rs6000.md (movti_string): Use string instructions. ! 2002-11-03 Roger Sayle ! PR c/7128 ! * c-typeck.c (c_expand_asm_operands): Defend against ! error_mark_nodes in the output argument to avoid ICE. ! 2002-11-03 Eric Botcazou ! PR middle-end/8408 ! * genrecog.c (preds): Handle ADDRESSOF. ! (validate_pattern): Mark it as an lvalue. ! 2002-11-02 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_override_options): Use string ! instructions when optimizing for size. ! 2002-11-02 Kazu Hirata ! * config/h8300/h8300.h: Fix comment typos. ! * config/h8300/h8300.md: Likewise. ! * config/h8300/lib1funcs.asm: Likewise. ! 2002-11-02 Gerald Pfeifer ! Revert this change: ! *doc/install.texi (Installing GCC: Configuration): Clarify ! the only supported ways to configure gcc. ! 2002-11-01 Kazu Hirata ! * config/h8300/h8300.md (anonymous and:QI pattern): Use 'n' ! instead of 'O' for the constraint for the second operand. ! 2002-11-01 Mark Mitchell ! PR c++/8391 ! * toplev.c (rest_of_compilation): Do not refuse to output code for ! an inline function in a local class. ! 2002-11-01 David O'Brien ! * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Define __arch64__. ! (TRANSFER_FROM_TRAMPOLINE): Reformat. ! Add comment. ! 2002-11-01 Kazu Hirata ! * config/h8300/h8300.h (CAN_ELIMINATE): Simplify. ! 2002-11-01 Toshiyasu Morita ! * config/h8300/h8300.h (OPTIMIZATION_OPTIONS): New. ! 2002-11-01 Steve Ellcey ! * config/ia64/ia64.h (MASK_INLINE_DIV_LAT): Remove. ! (MASK_INLINE_DIV_THR): Remove. ! (TARGET_INLINE_DIV_LAT): Remove. ! (TARGET_INLINE_DIV_THR): Remove. ! (TARGET_INLINE_DIV): Remove. ! (MASK_INLINE_FLOAT_DIV_LAT): New macro. ! (MASK_INLINE_FLOAT_DIV_THR): New macro. ! (MASK_INLINE_INT_DIV_LAT): New macro. ! (MASK_INLINE_INT_DIV_THR): New macro. ! (TARGET_INLINE_FLOAT_DIV_LAT): New macro. ! (TARGET_INLINE_FLOAT_DIV_THR): New macro. ! (TARGET_INLINE_INT_DIV_LAT): New macro. ! (TARGET_INLINE_INT_DIV_THR): New macro. ! (TARGET_INLINE_FLOAT_DIV): New macro. ! (TARGET_INLINE_INT_DIV): New macro. ! * config/ia64/ia64.md (divsi3): Change to use new macros. ! (modsi3): Ditto. ! (udivsi3): Ditto. ! (umodsi3): Ditto. ! (divsi3_internal): Ditto. ! (divdi3): Ditto. ! (moddi3): Ditto. ! (udivdi3): Ditto. ! (umoddi3): Ditto. ! (divdi3_internal_lat): Ditto. ! (divdi3_internal_thr): Ditto. ! (divsf3): Ditto. ! (divsf3_internal_lat): Ditto. ! (divsf3_internal_thr): Ditto. ! (divdf3): Ditto. ! (divdf3_internal_lat): Ditto. ! (divdf3_internal_thr): Ditto. ! (divtf3): Ditto. ! (divtf3_internal_lat): Ditto. ! (divtf3_internal_thr): Ditto. ! * config/ia64/ia64.c (ia64_override_options): Change ! to check new macros for conflicts in settings. ! * doc/invoke.texi (-minline-divide-min-latency): Remove. ! (-minline-divide-max-throughput): Remove. ! (-minline-float-divide-min-latency): New. ! (-minline-float-divide-max-throughput): New. ! (-minline-int-divide-min-latency): New. ! (-minline-int-divide-max-throughput): New. ! 2002-11-01 Richard Earnshaw (rearnsha@arm.com) ! PR target/7856 ! * arm.c (use_return_insn): Don't use a return insn if there are ! saved integer regs, but LR is not one of them. ! 2002-11-01 Jan Hubicka ! * expr.c (emit_move_insn): Use SCALAR_FLOAT_MODE_P ! * machmode.h (SCALAR_FLOAT_MODE_P): New macro. ! 2002-10-31 Nathanael Nerode ! PR optimization/6162 ! * doc/md.texi: Document restriction on commutative operand ! specification. ! 2002-10-31 Eric Christopher ! * explow.c (convert_memory_address): Use shallow_copy_rtx. ! 2002-10-31 Steve Ellcey ! * expmed.c (store_bit_field): Check FUNCTION_ARG_REG_LITTLE_ENDIAN. ! 2002-10-31 Steve Ellcey ! * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Set for non-floats. ! Thu Oct 31 Dale Johannesen ! * config/rs6000/darwin.h: Correct formatting in previous. ! Thu Oct 31 Dale Johannesen ! * config/rs6000/darwin.h: Enable -falign-xxx options. ! 2002-10-31 Jan Hubicka ! * i386.c (override_options): Set defaults for flag_omit_frame_pointer, ! flag_asynchronous_unwind_tables, flag_pcc_struct_return. ! * i386.c (optimization_options): Set flag_omit_frame_pointer, ! flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2. ! Do not clear -momit-leaf-frame-pointer when profiling. ! (ix86_frame_pointer_required): Frame pointer is always required when ! profiling. ! 2002-10-31 Jan Hubicka ! * i386.md (negdf2_ifs_rex64): Don't allow GPR operand. ! 2002-10-31 J"orn Rennecke ! * sh.h (binary_logical_operator): Declare. ! * sh.c (binary_logical_operator): New function. ! * sh.md (xordi3+1): New combiner splitter pattern. ! 2002-10-31 David O'Brien ! * config/sparc/freebsd.h (TRANSFER_FROM_TRAMPOLINE): Define ! __enable_execute_stack function. ! 2002-10-30 Aldy Hernandez ! * c-common.c: Add GTY to vector_type_node_list. ! 2002-10-30 John David Anglin ! * pa-linux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Define. ! * pa-protos.h (attr_length_millicode_call, attr_length_call, ! pa_init_machine_status): Declare new global functions. ! * pa.c (void copy_fp_args, length_fp_args, get_plabel): Declare and ! implement new functions. ! (attr_length_millicode_call, attr_length_call): Implement. ! (total_code_bytes): Change type to long. ! (pa_output_function_prologue): Compute total_code_bytes on TARGET_64BIT. ! Reset counter if flag_function_sections. ! (output_deferred_plabels): Set output alignment to 3 for TARGET_64BIT. ! (output_cbranch): Move call to gen_label_rtx. ! (output_millicode_call): Rewrite adding long TARGET_64BIT call, expose ! delay slot in all variants, shorten pc-relative calls. ! (output_call): Rewrite adding long TARGET_64BIT call, improved delay ! slot usage and exposure, various new call variants, and shortened ! sequences for some variants on TARGET_PA_20. ! Miscellaneous format changes. ! * pa.h (total_code_bytes): Change type to long. ! (MASK_LONG_CALLS, TARGET_LONG_CALLS, TARGET_LONG_ABS_CALL, ! TARGET_LONG_PIC_SDIFF_CALL, TARGET_LONG_PIC_PCREL_CALL): Define. ! (TARGET_SWITCHES): Add "-mlong-calls" and "-mno-long-calls" options. ! (EXTRA_CONSTRAINT, GO_IF_LEGITIMATE_ADDRESS, ! LEGITIMIZE_RELOAD_ADDRESS): Don't use long floating point loads and ! stores on TARGET_ELF32. ! *pa.md (define_delay): Allow insns in delay on TARGET_PORTABLE_RUNTIME. ! (unnamed patterns for mulsi3, divsi3, udivsi3, modsi3, umodsi3 and ! canonicalize_funcptr_for_compare expanders): Calculate attribute length ! attr_length_millicode_call(). ! (call_internal_symref, call_value_internal_symref): Clobber register 1. ! Calculate attribute length using attr_length_call(). ! (call_internal_reg_64bit, call_value_internal_reg_64bit): Move gp load ! to delay slot. ! (sibcall, sibcall_value): Rewrite. ! (sibcall_internal_symref, sibcall_value_internal_symref): Clobber ! register 1. Use attr_length_call(). ! (sibcall_internal_symref_64bit, sibcall_value_internal_symref_64bit): ! New patterns. ! (unamed pattern for canonicalize_funcptr_for_compare): Rewrite. ! * som.h (MEMBER_TYPE_FORCES_BLK): Define. ! * t-pa64 (TARGET_LIBGCC2_CFLAGS): Add "-mlong-calls". ! * doc/invoke.texi (mlong-calls): Document. ! 2002-10-30 Roger Sayle ! * fold-const.c (fold_binary_op_with_conditional_arg): Improve ! handling of cases where one or both branches of the conditional ! have void type, i.e. throw an exception or don't return. ! (fold): Only apply (and undo) type conversion to the non-void ! branches of a COND_EXPR. ! 2002-10-30 Mark Mitchell ! PR c++/8333 ! * varasm.c (asm_output_aligned_bss): Do not call ! ASM_GLOBALIZE_LABEL. ! 2002-10-30 David Edelsohn ! Torbjorn Granlund ! * config/rs6000/rs6000.md (load_toc_v4_PIC_1): Use preferred form ! for addressibility. ! (load_toc_v4_PIC_1b): Same. ! 2002-10-30 Kazu Hirata ! * config/h8300/h8300.c (h8300_eightbit_constant_address_p): ! Truncate the addresses for H8/300 using HImode. ! 2002-10-29 Hans-Peter Nilsson ! * toplev.c (rest_of_type_compilation): Return early in case of ! errors. ! (check_global_declarations): Don't call debug_hooks->global_decl ! in case of errors. ! 2002-10-28 Andreas Bauer ! * doc/c-tree.texi (Tree overview): Fix typos. ! 2002-10-29 Phil Edwards ! * Makefile.in (gnucompare*): Only record bad comparisons ! if there really was a bad comparison. ! 2002-10-29 Jan Hubicka ! * i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Remove 'H' ! * i386.md (movsf*, movdf*): Use 'C' instead of 'H' ! * md.texi (machine dependent constraints): Document 'C' ! * simplify-rtx.c (simplify_subreg): Fix const_int->vector subregging. ! * i386.c (ix86_expand_vector_move): Fix. ! * i386.c (ix86_expand_builtin): Use sse2_maskmovdqu_rex64. ! * i386.md (sse2_maskmovdqu_rex64): New pattern ! PR target/8322 ! * xmmintrin.h (_mm_stream_pi, _mm_stream_pd): Fix cast. ! (ix86_init_mmx_sse_builtins): Fix type. ! 2002-10-29 Jason Thorpe ! * gthr-posix.h: Include for feature tests. ! (sched_get_priority_max, sched_get_priority_min) ! (pthread_getschedparam, pthread_setschedparam): Only use ! if _POSIX_THREAD_PRIORITY_SCHEDULING is defined. ! (__gthread_objc_thread_set_priority): Don't treat all non-zero ! returns from sched_get_priority_max and sched_get_priority_min ! as an error. ! 2002-10-29 Kazu Hirata ! * config/h8300/h8300.h (TARGET_DEFAULT): Make it ! MASK_QUICKCALL. ! 2002-10-29 Kazu Hirata ! * config/h8300/h8300.c (h8300_eightbit_constant_address_p): New. ! (h8300_tiny_constant_address_p): Likewise. ! * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Use ! h8300_eightbit_constant_address_p. ! (TINY_CONSTANT_ADDRESS_P): Use h8300_tiny_constant_address_p. ! * config/h8300/h8300-protos.h: Add the prototypes for the two ! new functions. ! 2002-10-29 Kazu Hirata ! * reload1.c (update_eliminables): Unconditionally check if ! frame_pointer_needed has changed. ! 2002-10-29 Jan Hubicka ! * toplev.c (rest_of_compilation): Reorganize way reg_scan is called ! before final pass. ! 2002-10-29 Eric Botcazou ! PR optimization/8334 ! * expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation; ! check for zero operands explicitly. ! 2002-10-29 Richard Sandiford ! * config/mips/mips.md (extv, extzv, insv): Set size of referenced ! memory after adjusting to BLKmode. ! 2002-10-29 Kazu Hirata ! * config/h8300/h8300.h (MASK_*): New. ! (TARGET_*): Use MASK_*. ! 2002-10-28 Jason Thorpe ! * config.gcc (*-*-netbsd*): Add NETBSD_ENABLE_PTHREADS to ! tm_defines if pthreads are enabled. ! * config/netbsd.h (LIB_SPEC): Only support the -pthread option ! if NETBSD_ENABLE_PTHREADS is defined. ! 2002-10-28 Kazu Hirata ! * ChangeLog.1: Fix typos. ! * cse.c: Fix a comment typo. ! * reload1.c: Likewise. ! 2002-10-27 Hans-Peter Nilsson ! * fixinc/inclhack.def (libc1_G_va_list): Correct test_text. ! * fixinc/tests/base/_G_config.h: New file. ! 2002-10-27 Kazu Hirata ! * combine.c: Fix comment formatting. ! * loop.c: Likewise. ! * real.c: Likewise. ! * regclass.c: Likewise. ! * regmove.c: Likewise. ! * regrename.c: Likewise. ! * reg-stack.c: Likewise. ! * reload1.c: Likewise. ! * reload.c: Likewise. ! * reload.h: Likewise. ! * unroll.c: Likewise. ! 2002-10-27 Kazu Hirata ! * reload1.c (reload): Fix a comment typo. ! 2002-10-27 Jan Hubicka ! * linux64.h (DEFAULT_PCC_STRUCT_RETURN): Define. ! 2002-10-27 Zdenek Dvorak ! * Makefile.in (dwarf2out.o): Add dependendcy on hashtab.h. ! * dwarf2out.c: Include hashtab.h. ! (is_main_source): New static variable. ! (attr_checksum, die_checksum): Modified to handle die references. ! (same_loc_p, same_dw_val_p, same_attr_p, same_die_p, same_die_p_wrap, ! unmark_all_dies, htab_cu_hash, htab_cu_eq, htab_cu_del, check_duplicate_cu, ! record_comdat_symbol_number): New static functions. ! (output_comp_unit, compute_section_prefix, is_type_die, break_out_includes, ! mark_dies, unmark_dies, dwarf2out_start_source_file): Modified. ! * toplev.c (rest_of_decl_compilation): Call of dwarf2out_decl for type ! declarations added. ! 2002-10-26 Kazu Hirata ! * config/h8300/h8300.c (initial_offset): Change to ! h8300_initial_elimination_offset. ! * config/h8300/h8300.h (INITIAL_ELIMINATION_OFFSET): Use ! h8300_initial_elimination_offset. ! * config/h8300/h8300-protos.h: Update the prototype. ! 2002-10-26 Hans-Peter Nilsson ! * config/mmix/mmix.h (LIBCALL_VALUE): Use ! MMIX_RETURN_VALUE_REGNUM, not MMIX_OUTGOING_RETURN_VALUE_REGNUM. ! (FUNCTION_VALUE_REGNO_P): Similar, but move code to... ! * config/mmix/mmix.c (mmix_function_value_regno_p): New. ! * config/mmix/mmix-protos.h: Remove needless ifdefs on TREE_CODE ! and RTX_CODE. ! (mmix_function_value_regno_p): Declare. ! * config/mmix/mmix.md ("fixuns_truncdfdi2"): Replace unsigned_fix, ! invalid for floating point mode result, with fix. ! 2002-10-25 Mike Stump ! Fixes gcc.dg/warn-1.c. ! * c-typeck.c (warn_for_assignment): Don't print argument number, if zero. ! 2002-10-26 Jan Hubicka ! * toplev.c (dump_file_index): Add DFI_ce3. ! (dump_file_info): Likewise. ! (rest_of_compilation): Run first ifcvt pass before tracer. ! 2002-10-25 Steve Ellcey ! * config/ia64/hpux.h (BITS_BIG_ENDIAN): Remove. ! 2002-10-25 Richard Henderson ! * real.c (real_to_decimal): If the >1 tens reduction loop results ! in a negative exponent, fall into the <1 pten computation. ! 2002-10-25 Zack Weinberg ! PR middle-end/6994 ! * c-objc-common.c (inline_forbidden_p): Can not inline ! functions containing structures or unions containing VLAs. ! * tree-inline.c (walk_tree): For all class 't' nodes, walk ! TYPE_SIZE and TYPE_SIZE_UNIT. ! (copy_tree_r): Copy types if they are variably modified. ! 2002-10-25 Ulrich Weigand ! * config/s390/s390.md: Remove old-style peepholes. ! 2002-10-25 Ulrich Weigand ! * config/s390/s390.c (s390_decompose_address): Do not range check the ! displacement if base or index is the argument pointer register. ! 2002-10-24 Hans-Peter Nilsson ! PR other/3337 ! PR bootstrap/6763 ! PR bootstrap/8122 ! * fixinc/inclhack.def (libc1_G_va_list): New fix. ! * fixinc/fixincl.x: Regenerate. ! * config/i386/linux.h: Move MD_FALLBACK_FRAME_STATE_FOR inside ! ifndef IN_LIBGCC2. Wrap it together with signal.h and ! sys/ucontext.h inclusion in ifndef USE_GNULIBC_1. ! * configure.in (gcc_AC_CHECK_DECLS): Check vasprintf too. ! * config.in, configure: Regenerate. ! 2002-10-24 Igor Shevlyakov ! * varasm.c (struct rtx_const): Array size 16 for V16QImode. ! 2002-10-24 Richard Henderson ! * config/i386/i386.c (x86_output_mi_thunk): Fix x86_64 pic jump. ! 2002-10-24 Kazu Hirata ! * config/h8300/h8300.c (initial_offset): Simplify by using ! round_frame_size. ! 2002-10-24 Marek Michalkiewicz ! * doc/install.texi (avr): Update required binutils version. ! 2002-10-24 Theodore A. Roth ! * doc/install.texi: Point avr users at more up-to-date information. ! 2002-10-24 Ulrich Weigand ! * config/s390/s390.md (movdi, movsi, movhi, movqi): Add peepholes2 ! to pull operands out of the literal pool where possible. ! 2002-10-24 Denis Chertykov ! * config/avr/avr.c (init_cumulative_args): Test fntype for zero. ! 2002-10-24 Steve Ellcey ! * expr.c (convert_move): If unsignedp is less then zero there ! is no equivalent code. ! 2002-10-24 Zack Weinberg ! * tree.def: Delete mention of nonexistent ARRAY_TYPE fields. ! 2002-10-24 Ulrich Weigand ! * config/s390/s390.h: Rework comments; re-sort target macro definitions ! according to the sequence they are defined in the manual. ! (POINTER_BOUNDARY): Remove. ! 2002-10-24 Kazu Hirata ! * config/h8300/h8300.c (round_frame_size): Replace 8 with ! BITS_PER_UNIT. ! 2002-10-24 Kazu Hirata ! * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Make it ! 64-bit safe. ! (TINY_CONSTANT_ADDRESS_P): Likewise. ! 2002-10-24 Richard Henderson ! * config/ia64/ia64.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): True. ! (ia64_output_mi_thunk): Rewrite to use rtl, and to handle the ! vcall offset. ! 2002-10-24 Richard Henderson ! PR opt/7944 ! * reload.c (find_reloads_toplev): Mode of X is not important ! when simplifying subregs of constants. ! 2002-10-24 Richard Sandiford ! * config.gcc (mips64vr-*-elf*, mips64vrel-*-elf*): Add ! MIPS_MARCH_CONTROLS_SOFT_FLOAT=1 to $tm_defines. ! * config/mips/mips.c (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Default to 0. ! (override_options): Base default setting of MASK_SOFT_FLOAT on -march ! if MIPS_MARCH_CONTROLS_SOFT_FLOAT. ! 2002-10-24 Richard Sandiford ! * optabs.c (expand_binop): Don't reuse the shift target in the ! middle of shift sequences. ! 2002-10-23 Ziemowit Laski ! * objc/objc-act.c (get_static_reference): Remove unneeded ! TYPE_BINFO initialization. ! (get_object-reference): Likewise. ! (build_constructor): Tighten precondition check. ! (finish_message_expr): Likewise. ! 2002-10-23 Jakub Jelinek ! * config/i386/i386.c (local_symbolic_operand): Move LABEL_REF test ! after CONST test. ! 2002-10-23 Steve Ellcey ! * config/ia64/ia64.c (hfa_element_mode): Don't allow 128 bit floats ! in HFAs. ! 2002-10-23 Richard Henderson ! * config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): True. ! (alpha_output_mi_thunk_osf): Handle vcall_offset. ! 2002-10-23 Zack Weinberg ! * langhooks.h (struct lang_hooks_for_tree_inlining): Add ! var_mod_type_p. ! * langhooks-def.h: Default for tree_inlining.var_mod_type_p is ! hook_tree_bool_false. ! * tree.c (variably_modified_type_p): Moved here from ! cp/tree.c. Use lang_hooks.tree_inlining.var_mod_type_p for ! language-specific cases. Due to this, must weaken some 'if ! and only if' checks to merely 'if'. ! * tree.h: Prototype variably_modified_type_p. ! * tree-inline.c (walk_tree): #undef WALK_SUBTREE_TAIL at end. ! 2002-10-23 Ulrich Weigand ! * config/s390/linux.h (CC1_SPEC, CC1PLUS_SPEC): Remove. ! * config/s390/s390.c (optimization_options): Disable -fcaller-saves. ! * config/s390/s390-protos.h (fp_operand): Remove. ! * config/s390/s390.c (fp_operand): Remove. ! * config/s390/s390.md ("movdi"): Replace fp_operand by FP_REG_P. ! ("*movdi_lhi", "*movdi_lli", "*movdi_larl"): Likewise. ! ("movsi", "*movsi_lhi", "*movsi_lli"): Likewise. ! (movdi_31, movdf_31 splitters): Likewise. ! * config/s390/s390.h (IEEE_FLOAT): Remove. ! (TARGET_FLOAT_FORMAT): Define in terms of TARGET_IEEE_FLOAT. ! (INT_REGNO_P): Rename to ... ! (GENERAL_REGNO_P): ... this. ! (FLOAT_REGNO_P): Rename to ... ! (FP_REGNO_P): ... this. ! (ADDR_REGNO_P): New macro. ! (GENERAL_REG_P, ADDR_REG_P, FP_REG_P, CC_REG_P): New macros. ! (REGNO_OK_FOR_DATA_P, REGNO_OK_FOR_FP_P): Remove. ! (DATA_REG_P, FP_REG_P, ADDRESS_REG_P): Likewise. ! (HARD_REGNO_NREGS): Adapt to macro renaming. ! (HARD_REGNO_MODE_OK): Likewise. ! 2002-10-23 David Edelsohn ! Geoff Keating ! * config/rs6000/rs6000.c (rs6000_register_move_cost): New function. ! (rs6000_memory_move_cost): New function. ! * config/rs6000/rs6000-protos.h: Declare them. ! * config/rs6000/rs6000.h: Use them. ! 2002-10-23 Ulrich Weigand ! * libgcc2.c (__udiv_w_sdiv): Use attribute ((always_inline)) when ! inlining it into other libgcc2 routines. ! (__udivmoddi4): Likewise. ! 2002-10-22 Nathanael Nerode ! * doc/sourcebuild.texi (Test Suites): Improve. ! 2002-10-22 Stan Shebs ! * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Add missing ! case for Darwin. ! 2002-10-22 Jim Wilson ! * config/i386/i386.md (subdi3_1): Add call to ix86_binary_operator_ok. ! 2002-10-23 Jan Hubicka ! PR other/8289 ! * xmmintrin.h: Add const to the argument of loads. ! * i386.md (pushv2di): New pattern. ! PR target/6890 ! * xmmintrin.h (_MM_TRANSPOSE4_PS): New. ! 2002-10-22 Richard Henderson ! * target.h (gcc_target.asm_out): Merge output_mi_thunk and ! output_mi_vcall_thunk into a single hook. Add can_output_mi_thunk. ! * target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Don't conditionalize. ! (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove. ! (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. ! (TARGET_ASM_OUT): Update. ! * hooks.c (hook_bool_tree_hwi_hwi_tree_false): New. ! (hook_bool_tree_hwi_hwi_tree_true): New. ! (default_can_output_mi_thunk_no_vcall): New. ! * hooks.h: Declare them. ! * system.h (ASM_OUTPUT_MI_THUNK): Poison. ! * config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. ! (alpha_output_mi_thunk_osf): Add VCALL_OFFSET parameter. ! * config/arm/arm.c, config/cris/cris.c, config/frv/frv.c, ! config/i960/i960.c, config/ia64/ia64.c, config/m68k/m68k.c, ! config/mmix/mmix.c, config/pa/pa.c, config/sparc/sparc.c, ! config/stormy16/stormy16.c: Similarly. ! * config/i386/i386.c (x86_output_mi_thunk): Merge vcall_offset code. ! Handle 64-bit properly. Streamline. ! (x86_output_mi_vcall_thunk): Remove. ! (x86_this_parameter): Rename from ia32_this_parameter; handle 64-bit. ! (x86_can_output_mi_thunk): New. ! (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove. ! (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. ! (override_options): Don't zap targetm.asm_out.output_mi_vcall_thunk. ! * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Rename from ! output_mi_thunk; make static; always use function_section. ! (TARGET_ASM_OUTPUT_MI_THUNK): New. ! (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. ! (rs6000_ra_ever_killed): Test no_new_pseudos not ! targetm.asm_out.output_mi_thunk in conjunction with thunks. ! * config/rs6000/rs6000-protos.h: Update. ! * config/rs6000/sysv4.h (TARGET_ASM_OUTPUT_MI_THUNK): Remove. ! * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't call ! xcoffout_declare_function when using rs6000_output_mi_thunk. ! * config/s390/s390.c (s390_output_mi_thunk): Rename from ! s390_output_mi_vcall_thunk. ! (TARGET_ASM_OUTPUT_MI_THUNK): Remove. ! (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. ! * config/vax/vax.c (vax_output_mi_thunk): Static; add vcall_offset. ! (TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. ! * config/vax/vax-protos.h: Update. ! * config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove. ! 2002-10-23 Jan Hubicka ! * i386.c (standard_sse_constant_p): Accept vector and integer zeros too. ! * i386.h (EXTRA_CONSTRAINT): Recognize 'C' ! * i386.md (movti_internal): Use 'C' ! * xmmintrin.h (_mm_cmplt_epi*): New. ! 2002-10-22 Ulrich Weigand ! * config/s390/s390.md ("*movdi_64"): Fix op_type attribute. ! ("*movdf_64"): Likewise. ! ("*lshrdi3_64"): Likewise. ! ("blockage"): Add length attribute. ! ("lit"): Likewise. ! 2002-10-22 Jan Hubicka ! * i386.md: FIx typo. ! (sse2_cvtsi2sd, sse2_pslrdq): Fix template. ! (sse2_umulv2siv2di3): Fix predicate. ! (sse2_psadbw, ashrv8hi3, ashrv4si3, lshrv8hi3 lshrv4si3, ! lshrv2di3, ashlv8hi3, ashlv4si3, ashlv2di3): Likewise. ! * xmmintrin.h (_mm_mul_epu16): Rename to... ! (_mm_mul_epu32): This one. ! (_mm_cvtsi32_si128, _mm_cvtsi128_si32): New. ! (contains_128bit_aligned_vector_p): Undo accidental checkin. ! 2002-10-22 Eric Christopher ! * config/sparc/sparc.h: Add #error. ! 2002-10-22 Ulrich Weigand ! * config.gcc [s390-*-linux]: Remove s390/t-linux from tmake_file. ! [s390x-*-linux*]: Likewise. ! * config/s390/t-linux: Remove. ! * config/s390/s390.h: Include fixdfdi.h when building libgcc2. ! 2002-10-22 Jan Hubicka ! * i386.c (builtin_description): Add IX86_BUILTIN_PUNPCKHQDQ128. ! (ix86_expand_builtin): Fix MASKMOVDQU expasion. ! * i386.h (ix86_builtins): Add IX86_BUILTIN_PUNPCKHQDQ128. ! * i386.md (mmx_punpck?dq): Simplify. ! (sse2_pubpcklqdq): Fix. ! (sse2_pubpckhqdq): New. ! * xmmintrin.h (_mm_unpackhi_epi32): New. ! * xmmintrin.h (_mm_cvt*, _mm_stream_pd): Fix prototypes. ! (_mm_shufflehi_epi16, _mm_shufflelo_epi16): Fix typo. ! 2002-10-22 Nathan Sidwell ! PR c++/7209 ! * fold_const.c (fold_binary_op_with_conditional_arg): Always ! build compound_expr if we used save_expr. ! 2002-10-22 Alan Modra ! * output.h (SECTION_NOTYPE): Define. ! * varasm.c (default_section_type_flags_1): Set SECTION_NOTYPE for ! init array sections. ! (default_elf_asm_named_section): Mind SECTION_NOTYPE. ! * config/arm/arm.c (arm_elf_asm_named_section): Likewise. Also ! merge TLS support. ! 2002-10-21 Richard Henderson ! * real.c (sticky_rshift_significand): Return inexact, don't ! or it in immediately. ! (sub_significands): Accept incomming carry. ! (div_significands, rtd_divmod): Update for sub_significands change. ! (round_for_format): Update for sticky_rshift_significand change. ! (do_add): Don't involve the inexact bit in addition, do give the ! inexact bit as the subtraction carry-in. ! (encode_internal, decode_internal, real_internal_format): New. ! * real.h (real_internal_format): Declare. ! 2002-10-21 Ulrich Weigand ! * libgcc2.c: Fix __udiv_w_sdiv breakage on platforms that ! don't define sdiv_qrnnd. ! 2002-10-21 Kazu Hirata ! * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Simplify ! using IN_RANGE. ! (TINY_CONSTANT_ADDRESS_P): Likewise. ! 2002-10-22 Jan Hubicka ! * i386.c (builtin_description): Add punpcklqdq and movdq2q ! (ix86_init_mmx_sse_builtins): Add v2di_ftype_void, di_ftype_v2di, ! v16qi_ftype_pchar, void_ftype_pchar_v16qi, v4si_ftype_pchar, ! void_ftype_pchar_v4si; Initialize __builtin_ia32_movdq2q, ! __builtin_ia32_loaddqa, __builtin_ia32_loaddqu, __builtin_ia32_loadd ! __builtin_ia32_storedqa, __builtin_ia32_storedqu, __builtin_ia32_stored ! __builtin_ia32_setzero128. ! (ix86_expand_builtin): Handle IX86_BUILTIN_CLRTI, IX86_BUILTIN_LOADDQA, ! IX86_BUILTIN_LOADDQU, IX86_BUILTIN_LOADD, IX86_BUILTIN_STOREDQA, ! IX86_BUILTIN_STOREDQU, IX86_BUILTIN_STORED, Ix86_BUILTIN_MOVQ. ! * i386.h (ix86_builtins): Add IX86_BUILTIN_LOADDQA, IX86_BUILTIN_LOADDQU, ! IX86_BUILTIN_STOREDQA, IX86_BUILTIN_STOREDQU, IX86_BUILTIN_LOADD, ! IX86_BUILTIN_STORED, IX86_BUILTIN_CLRTI, IX86_BUILTIN_MOVDQ2Q, ! IX86_BUILTIN_PUNPCKLQDQ128, Ix86_BUILTIN_MOVQ. ! * i386.md (sse2_punpcklqdq, sse2_movqsse2_loadd, sse2_stored, ! sse2_movq): New patterns. ! (sse2_movdqa, sse2_movdqu, sse2_movdq2q): Fix. ! * xmmintrin.h (_mm_load_si128, _mm_loadu_si128, _mm_loadl_epi64, ! _mm_store_si128, _mm_storeu_si128, _mm_storel_epi64, ! _mm_setzero_si128, _mm_set_epi64, _mm_set_epi32, _mm_set_epi16, ! _mm_set_epi8, _mm_set1_epi64, _mm_set1_epi32, _mm_set1_epi16, ! _mm_set1_epi8, _mm_setr_epi64, _mm_setr_epi32, _mm_setr_epi16, ! _mm_setr_epi8, _mm_unpacklo_epi64,_mm_set_moveq): New functions. ! (_mm_insert_epi16): Fix. ! 2002-10-21 Dale Johannesen ! * config/rs6000/rs6000.c (rs6000_reverse_condition): Handle ! unsafe math reversals correctly for RTL generation. ! (output_cbranch): Replace rs6000_reverse_condition call ! by its former definition. ! 2002-10-21 Jakub Jelinek ! * config/i386/i386.c (x86_64_sign_extended_value): Add allow_rip ! argument. In CM_SMALL_PIC model consider SYMBOL_REFs binding locally or ! from constant pool or LABEL_REFs as sign extended if allow_rip. ! Change all +-1GB limits to +-16MB. ! (x86_64_general_operand, x86_64_szext_general_operand, ! x86_64_nonmemory_operand, x86_64_movabs_operand, ! x86_64_szext_nonmemory_operand, x86_64_immediate_operand, ! legitimate_address_p, ix86_expand_int_movcc): Update callers. ! (local_symbolic_operand): Don't allow offsets bigger than +-16MB ! in CM_SMALL_PIC model. ! (legitimate_pic_address_disp_p): Don't check offsets before ! calling local_symbolic_operand. ! (legitimize_pic_address): Force offsets bigger than +-16MB into ! register. ! * config/i386/i386.h (EXTRA_CONSTRAINT, CONST_COSTS): Likewise. ! * config/i386/i386-protos.h (x86_64_sign_extended_value): Update ! prototype. ! * configure.in: Test for @GOTNTPOFF and @INDNTPOFF on IA-32 too. ! Add x86-64 test. Set tls_first_minor to 14 on IA-32 and x86-64. ! * configure: Rebuilt. ! * config/i386/i386.c (x86_64_sign_extended_value): Don't allow TLS ! SYMBOL_REFs unless enclosed in UNSPEC. Handle UNSPEC_DTPOFF, ! UNSPEC_GOTNTPOFF and UNSPEC_NTPOFF. ! (legitimate_address_p): Allow foo@dtpoff(base) even on TARGET_64BIT ! -fpic. ! (ix86_encode_section_info): Don't ever generate TLSGD or TLSLD for ! non-pic code if TARGET_64BIT. ! (legitimize_address): Generate 64-bit TLS sequences. ! (output_pic_addr_const): Support x86-64 TLS operators. ! (i386_output_dwarf_dtprel): Output 64-bit DTPOFF as .long f@DTPOFF, 0. ! (print_operand_address): Use %fs instead of %gs on TARGET_64BIT. ! Don't append (%rip) in 64-bit TLSGD and TLSLD sequences. ! (output_addr_const_extra): Support x86-64 TLS operators. ! (maybe_get_pool_constant): Handle TARGET_64BIT -fpic. ! (ix86_tls_get_addr): Use __tls_get_addr on TARGET_64BIT ! unconditionally. ! * config/i386/i386.md (*tls_global_dynamic_gnu): Renamed to... ! (*tls_global_dynamic_32_gnu): ..., add !TARGET_64BIT. ! (*tls_global_dynamic_sun): Renamed to... ! (*tls_global_dynamic_32_sun): ..., add !TARGET_64BIT. ! (tls_global_dynamic): Renamed to... ! (tls_global_dynamic_32): ... this. ! (tls_global_dynamic_64, *tls_global_dynamic_64): New. ! (*tls_local_dynamic_base_dynamic_gnu): Renamed to... ! (*tls_local_dynamic_base_dynamic_32_gnu): ..., add !TARGET_64BIT. ! (*tls_local_dynamic_base_dynamic_sun): Renamed to... ! (*tls_local_dynamic_base_dynamic_32_sun): ..., add !TARGET_64BIT. ! (tls_local_dynamic_base_dynamic): Renamed to... ! (tls_local_dynamic_base_dynamic_32): ... this. ! (tls_local_dynamic_base_dynamic_64, ! *tls_local_dynamic_base_dynamic_64): New. ! (*tls_local_dynamic_once): Renamed to... ! (*tls_local_dynamic_32_once): ... this. ! 2002-10-21 Ulrich Weigand ! * libgcc2.c: Inline __udiv_w_sdiv when compiling __udivdi3, ! __divdi3, __umoddi3, or __moddi3. ! 2002-10-21 Ulrich Weigand ! * c-opts.c (missing_arg): Use cl_options[opt_index].opt_code ! instead of just opt_index as switch expression. ! * calls.c (store_one_arg): Change type of 'excess_align' ! to unsigned int. ! * profile.c (output_gcov_string): Change type of 'temp' ! to size_t. ! 2002-10-21 Ulrich Weigand ! * config/s390/fixdfdi.h (__fixunsdfdi, __fixdfdi): Add prototypes. ! (__fixunssfdi, __fixsfdi): Likewise. ! * config/s390/s390.c (s390_single_hi): Initialize 'value'. ! (s390_single_qi): Likewise. ! (s390_emit_epilogue): Initialize 'offset'. Remove signed vs. ! unsigned comparison warning. ! (s390_return_addr_rtx): New function. ! * config/s390/s390-protos.h (s390_return_addr_rtx): Declare it. ! * config/s390/s390.h (RETURN_ADDR_RTX): Use it. ! (HARD_REGNO_MODE_OK): Rewrite condition to silence warnings. ! 2002-10-21 Ulrich Weigand ! * config/s390/s390.c (s390_output_mi_vcall_thunk): New function. ! (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define target hook. ! (s390_output_mi_thunk): Remove. ! (TARGET_ASM_OUTPUT_MI_THUNK): Remove. ! 2002-10-21 Kazu Hirata ! * config/h8300/h8300.h (N_REG_CLASSES): Parenthesize. ! 2002-10-20 Richard Henderson ! * target.h (struct gcc_target): Line wrap. ! * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Static. ! (TARGET_ASM_OUTPUT_MI_THUNK): Define here... ! * config/alpha/alpha.h: ... not here. ! * config/alpha/alpha-protos.h: Update. ! * config/arm/arm.c, config/arm/arm.h, config/arm/arm-protos.h ! config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, ! config/frv/frv-protos.h, config/frv/frv.c, config/frv/frv.h, ! config/i386/i386-protos.h, config/i386/i386.c, config/i386/openbsd.h, ! config/i386/unix.h, config/i960/i960-protos.h, config/i960/i960.c, ! config/i960/i960.h, config/ia64/ia64-protos.h, config/ia64/ia64.c, ! config/ia64/ia64.h, config/m68k/linux.h, config/m68k/m68k-protos.h, ! config/m68k/m68k.c, config/m68k/netbsd-elf.h, config/m68k/openbsd.h, ! config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h, ! config/pa/pa-protos.h, config/pa/pa.c, config/pa/pa.h, ! config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, ! config/sparc/openbsd.h, config/sparc/sparc-protos.h, ! config/sparc/sparc.c, config/sparc/sparc.h, ! config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, ! config/stormy16/stormy16.h: Similarly. ! * config/m68k/m68k.c (m68k_output_mi_thunk): Replicate mnemonic ! selection logic from call patterns. ! 2002-10-20 Mark Mitchell ! * config/m68k/m68k.c (m68k_output_mi_thunk): Fix typo. ! 2002-10-20 Zdenek Dvorak ! PR other/8202 ! * i386.c (ix86_init_mmx_sse_builtins, ix86_expand_builtin): Define and ! expand __builtin_ia32_pslldqi128 and __builtin_ia32_psrldqi128. ! * i386.h (IX86_BUILTIN_PSLLDQI128, IX86_BUILTIN_PSRLDQI128): New. ! * xmmintrin.h (_mm_srli_si128, _mm_slli_si128): New. ! 2002-10-20 Roger Sayle ! PR c/761 ! * toplev.c (flag_unsafe_profile_arcs): Remove. ! (flag_bounded_pointers): Remove. ! (flag_bounds_check): Correct comments. ! (lang_independent_options): Remove -funsafe-profile-arcs and ! -fbounded-pointers. Correct -fbounds-check comments. ! * flags.h: Correct flag_schedule_interblock comments. ! (flag_bounded_pointers): Remove prototype. ! (flag_bounds_check): Correct comments. ! * c-opts.c (c_common_init_options): No need to mark ! flag_bounds_check as unspecified. ! (c_common_post_options): And no need to set it from ! flag_bounded_pointers if its still unspecified. ! * doc/invoke.texi: Fix some overfull hboxes in "make dvi". ! Document --version, -feliminate-dwarf-2-dups, -fno-sched-interblock, ! -fno-sched-spec, -fsched-spec-load, -fsched-spec-load-dangerous, ! -fsched-verbose=n, -fno-branch-count-reg and -fbounds-check. ! 2002-10-19 Kaveh R. Ghazi ! Mark Mitchell ! * alpha-protos.h (alpha_output_mi_thunk_osf): Update signature to ! match target.h. ! * arm-protos.h, arm.c (arm_output_mi_thunk): Likewise. ! * cris-protos.h, cris.c (cris_asm_output_mi_thunk): Likewise. ! * frv-protos.h, frv.c (frv_asm_output_mi_thunk): Likewise. ! * i386-protos.h, i386.c (x86_output_mi_vcall_thunk, ! x86_output_mi_thunk): Likewise. ! * i960-protos.h, i960.c (i960_output_mi_thunk): Likewise. ! * ia64-protos.h, ia64.c (ia64_output_mi_thunk): Likewise. ! * m68k-protos.h, m68k.c (m68k_output_mi_thunk): Likewise. ! * mmix-protos.h, mmix.c (mmix_asm_output_mi_thunk): Likewise. ! * rs6000-protos.h, rs6000.c (output_mi_thunk): Likewise. ! * s390-protos.h, s390.c (s390_output_mi_thunk): Likewise. ! * stormy16-protos.h, stormy16.c (xstormy16_asm_output_mi_thunk): ! Likewise. ! * vax-protos.h, vax.c (vax_output_mi_thunk): Likewise. ! * target.h (gcc_target): Update output_mi_thunk and ! output_mi_vcall_thunk to take a HOST_WIDE_INT delta and ! vcall_index. ! * config/alpha/alpha.c: Replace ASM_OUTPUT_MI_THUNK with ! TARGET_ASM_OUTPUT_MI_THUNK in comments. ! * config/alpha/vms.h (ASM_OUTPUT_MI_THUNK): Don't #undef it. ! (TARGET_ASM_OUTPUT_MI_THUNK): #undef it. ! * config/frv/frv.h (DEFAULT_VTABLE_THUNKS): Remove definition. ! * config/i386/i386-protos.h (x86_output_mi_vcall_thunk): Update ! signature. ! * config/i386/i386.c (x86_output_mi_vcall_thunk): Likewise. ! * config/i386/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with ! TARGET_ASM_OUTPUT_MI_THUNK in comments. ! * config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Don't define. ! (TARGET_ASM_OUTPUT_MI_THUNK): Do define. ! * config/m68k/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with ! TARGET_ASM_OUTPUT_MI_THUNK in comments. ! * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Remove #ifdef ! ASM_OUTPUT_MI_THUNK and replace with check of targetm. ! * doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Update signature. ! (TARGET_ASM_OUTPU_MI_VCALL_THUNK): Likewise. ! 2002-10-19 Brad Lucier ! * real.c (do_add): Fix 0+0 sign corner case. ! (do_divide): Fix Inf/0 corner case. ! 2002-10-20 Jan Hubicka ! * i386.c (classify_argument): Pass MMX arguments in memory ! (ix86_expand_builtin): Expand proper address mode for cflush. ! * i386.md (movdqa): Fix typo. ! (sse2_cflush): Accept DImode addresses. ! * xmmintrin.h (_mm_sqrt_sd): Accept two arguments. ! (_mm_max_sd): Fix pasto. ! (_mm_storeh_pd, _mm_storel_pd): Fix. ! * i386.c (bdesc_comi): Fix to match specification. ! (ix86_expand_sse_comi): Emit the comparison properly. ! * i386.md (sse_comi, sse2_comi, sse_ucomi, sse2_ucomi): ! Do not use comparison operator. ! (vnmaskcmp): Fix template. ! * xmmintrin.h (_mm_cvtps_pi16): Fix. ! 2002-10-19 Sebastian Pop ! * dependence.c : Removed. ! * Makefile.in : Remove dependence.o. ! 2002-10-19 Jan Hubicka ! * mmintrin.h (__m64): typedef it to v2si. ! (_mm_cvtsi32_si64, _mm_cvtsi32_si64_mm_sll_pi16, ! _mm_sll_pi32, _mm_sll_pi64, _mm_slli_pi64, _mm_sra_pi16, ! _mm_sra_pi32, _mm_srl_pi16, _mm_srl_pi32, _mm_srl_pi64, ! _mm_srli_pi64, _mm_and_si64, _mm_andnot_si64, ! _mm_or_si64, _mm_xor_si64): Add neccesary casts. ! * xmmintrin.h (_mm_setzero_si64): Likewise. ! * i386.h (ALIGN_MODE_128): Update comment; add missing modes ! (SSE_REG_MODE_P, MMX_REG_MODE_P): New macros. ! PR target/7693 ! Patch by Shawn Wagner ! * mmintrin.h: Replace pi64 by si64. ! 2002-10-18 David Edelsohn ! * rs6000.md (movdf_hardfloat32): Order alternatives consistently. ! Use length of 4 not *. ! (movdf_hardfloat64): Same. Support DFmode moves to/from CTR/LR. ! (movdf_softfloat64): Likewise. ! (movdi_internal32): Use length of 4 not *. ! (movti_power): Same. ! (ctrsi, ctrdi): Same. ! 2002-10-18 Zack Weinberg ! * c-decl.c (start_decl): Point users of the old initialized- ! typedef extension at __typeof__. ! 2002-10-18 Richard Henderson ! * real.c (cmp_significand_0, rtd_divmod, ten_to_mptwo): New. ! (real_to_decimal): Re-implement using the logic from the ! gcc 3.2 etoasc. Comment heavily. ! (div_significands): Simplify loop startup and comparison logic. ! 2002-10-18 Mark Mitchell ! * target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Default to NULL. ! (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Likewise. ! (TARGET_ASM_OUT): Add them. ! * target.h (asm_out): Add output_mi_thunk and ! output_mi_vcall_thunk. ! * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/arm/arm-protos.h (arm_output_mi_thunk): Declare. ! * config/arm/arm.c (arm_output_mi_thunk): Define. ! * config/arm/arm.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/cris/cris.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/frv/frv.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/i386/i386-protos.h (x86_output_mi_thunk): Adjust ! prototype. ! (x86_output_mi_vcall_thunk): Declare. ! * config/i386/i386.c (override_options): Clear ! output_mi_vcall_thunk in 64-bit mode. ! (ix86_fntype_regparm): New function. ! (ix86_return_pops_args): Use it. ! (ia32_this_parameter): New function. ! (x86_output_mi_vcall_thunk): New function. ! (x86_output_mi_thunk): Use it ! * config/i386/unix.h (TARGET_ASM_OUTPUT_MI_THUNK): Adjust. ! (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define. ! * config/i960/i960-protos.h (i960_output_mi_thunk): Declare. ! * config/i960/i960.c (i960_output_mi_thunk): New function. ! * config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Adjust. ! * config/ia64/ia64-protos.h (ia64_output_mi_thunk): Declare. ! * config/ia64/ia64.c (ia64_output_mi_thunk): Define. ! * config/ia64/ia64.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/m68k/m68k-protos.h (m68k_output_mi_thunk): New function. ! * config/m68k/linux.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/m68k/netbsd-elf.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/mmix/mmix.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/pa/pa.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/rs6000/sysv4.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/s390/s390-protos.h (s390_output_mi_thunk): Declare. ! * config/s390/s390.c (s390_output_mi_thunk): Define. ! * config/s390/s390.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/stormy16/stormy16.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * config/vax/vax-protos.h (vax_output_mi_thunk): Declare. ! * config/vax/vax.c (vax_output_mi_thunk): Define. ! * config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Rename to ... ! (TARGET_ASM_OUTPUT_MI_THUNK): ... this. ! * doc/tm.texi: Adjust documentation. ! 2002-10-18 Jason Thorpe ! * config/netbsd.h (NETBSD_ENABLE_EXECUTE_STACK): Define ! __enable_execute_stack function. ! * config/alpha/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Define ! as NETBSD_ENABLE_EXECUTE_STACK. ! * config/i386/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Ditto. ! * config/i386/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Ditto. ! * config/i386/netbsd64.h (TRANSFER_FROM_TRAMPOLINE): Ditto. ! * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Ditto. ! * config/sparc/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Ditto. ! 2002-10-18 Jason Thorpe ! * config/i386/i386.c (x86_initialize_trampoline): Emit a call ! to __enable_execute_stack with the address of the trampoline ! if TRANSFER_FROM_TRAMPOLINE is defined. ! * config/i386/i386.h (TARGET_64BIT): Expand to a compile-time ! constant if building libgcc2. ! 2002-10-17 Roger Sayle ! * doc/c-tree.texi: Update description of COND_EXPR tree nodes. ! 2002-10-17 Geoffrey Keating ! * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Allow arbitrary modes ! in CTR/LR/MQ. ! * config/rs6000/rs6000.md (movcc_internal1): Support CCmode moves ! to/from CTR/LR/MQ. ! (movsf_hardfloat): Support SFmode moves to/from CTR/LR/MQ. ! (movsf_softfloat): Likewise. ! 2002-10-17 Janis Johnson ! * Makefile.in (site.exp): Add ALT_CXX_UNDER_TEST and COMPAT_OPTIONS. ! 2002-10-17 Jason Thorpe ! * config/alpha/alpha.c (alpha_initialize_trampoline): Use ! tramp, not addr, to pass the trampoline address to ! __enable_execute_stack. ! 2002-10-17 Jan Hubicka ! * mmintrin.h: Guard by __MMX__ ! * xmmintrin.h: Guard by __SSE__ ! PR other/8062 ! * xmmintrin.h (_MM_SHUFFLE2): New macro. ! (_mm_load*_?d): New functions. ! (_mm_set*_?d): New functions. ! (_mm_store*_?d): New functions. ! 2002-10-16 Jan Hubicka ! Really commit patch announced at Oct 14 ! PR c/7344 ! * predict.c (can_predict_insn_p): New function. ! (estimate_probability): Avoid unnecesary work. ! (process_note_prediction): Likewise. ! * toplev.c (rest_of_compilation): Account early branch prediction pass ! as TV_BRANCH_PROB. ! PR other/8048 ! Found by Ian Ollmann ! * xmmintrin.h (_mm_shuffle_pd): Fix typo. ! (_mm_load?_pd): Likewise. ! (_mm_store?_pd): Likewise. ! PR target/7386 ! * i386.c (builtin_description):Drop cmpg[te]s[sd]. ! * xmmintrin.h (__mm_cmpg[te]_s[sd]): Rewrite using ! swapped alternative. ! PR opt/7630 ! * reload1.c (reload_inner_reg_of_subreg): New argument output; ! (push_reload): Update call. ! 2002-10-17 Richard Sandiford ! * config.gcc (mips*-*-*): Add OBJECT_FORMAT_ELF to $tm_defines ! if using mips/elf.h or mips/elf64.h. ! * config/mips/elf.h (OBJECT_FORMAT_ELF): Remove. ! * config/mips/elf64.h (OBJECT_FORMAT_ELF): Remove. ! 2002-10-16 Aldy Hernandez ! * config/rs6000/rs6000.c (function_arg): Set inner mode of V1DI to ! SI. ! 2002-10-16 Ulrich Weigand ! * config/s390/linux.h (ASM_DOUBLE, _ASM_OUTPUT_LONG): Remove. ! (LPREFIX): Likewise. ! (ASM_COMMENT_START, LOCAL_LABEL_PREFIX, ASM_FORMAT_PRIVATE_NAME, ! ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT, ! ASM_OUTPUT_ALIGN, ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_BSS, ! TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP, ! GLOBAL_ASM_OP, ASM_OUTPUT_MI_THUNK): Move to s390.h. ! * config/s390/s390.h (ASM_COMMENT_START, LOCAL_LABEL_PREFIX, ! ASM_FORMAT_PRIVATE_NAME, ASM_OUTPUT_ALIGN, ASM_OUTPUT_SKIP, ! ASM_OUTPUT_ALIGNED_BSS, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, ! BSS_SECTION_ASM_OP): Move from linux.h. ! (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. ! Also, use ASM_GENERATE_INTERNAL_LABEL instead of LPREFIX. ! * config/s390/s390.c (s390_function_profiler): Use ! ASM_GENERATE_INTERNAL_LABEL instead of LPREFIX. ! 2002-10-15 Richard Henderson ! * real.c (real_to_decimal): Accept BUF_SIZE and CROP_TRAILING_ZEROS ! as arguments. Bound DIGITS by the available buffer size. ! (real_to_hexadecimal): Likewise. ! * real.h (real_to_decimal, real_to_hexadecimal): Update prototypes. ! (REAL_VALUE_TO_DECIMAL): Remove. ! * c-common.c, c-pretty-print.c, print-rtl.c, print-tree.c, ! sched-vis.c, config/arc/arc.c, config/c4x/c4x.c, config/fr30/fr30.c, ! config/i370/i370.h, config/i386/i386.c, config/i960/i960.c, ! config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, ! config/m68k/hp320.h, config/m68k/m68k.h, config/m68k/sun2o4.h, ! config/m68k/sun3.h, config/mips/mips.c, config/ns32k/ns32k.c, ! config/pdp11/pdp11.h, config/vax/vax.h: Update all callers to ! use real_to_decimal directly, and with the proper arguments. ! * doc/tm.texi (REAL_VALUE_TO_DECIMAL): Remove. ! 2002-10-15 Jim Wilson ! * reload1.c (merge_assigned_reloads): After converting overlapping ! reloads to RELOAD_OTHER, abort if there are now conflicting reloads. ! * config/i386/i386.md (adddi3_1): Add call to ix86_binary_operator_ok. ! 2002-10-15 Jan Hubicka ! * expr.c (do_tablejump): Fix typo in my previous commit. ! 2002-10-15 Richard Sandiford ! * config/mips/vr.h (DRIVER_SELF_SPECS): Change % ! * config/s390/s390.c (s390_split_branches): Add return ! value. Add parameters TEMP_REG and TEMP_USED. Use unspec 104. ! (find_base_register_in_addr): New function. ! (find_base_register_ref): New function. ! (replace_base_register_ref): New function. ! (struct constant_pool): Add members pool_insn, insns, and anchor. ! Remove member last_insn. ! (s390_start_pool): Initialize them. ! (s390_end_pool): Emit pool placeholder insn. ! (s390_add_pool_insn): New function. ! (s390_find_pool): Use insns bitmap instead of addresses. ! (s390_dump_pool): Replace placeholder insn. Emit anchor. ! Replace unspec 104 by local-pool-relative references. ! (s390_output_constant_pool): Output anchor label if required. ! (s390_output_symbolic_const): Handle unspec 104 and 105. ! (s390_add_pool): Remove, replace by ... ! (s390_add_constant, s390_find_constant): ... these new functions. ! (s390_add_anchor): New function. ! (s390_chunkify_pool): Delete, replace by ... ! (s390_chunkify_start, s390_chunkify_finish, ! s390_chunkify_cancel): ... these new functions. ! (s390_optimize_prolog): Add parameter TEMP_REGNO. ! Recompute register live data for special registers. ! (s390_fixup_clobbered_return_reg): New function. ! (s390_machine_dependent_reorg): Rewrite to use new ! s390_chunkify_... routines. ! config/s390/s390.md ("reload_base"): Rename to ... ! ("reload_base_31"): ... this. ! ("reload_base_64"): New insn. ! ("reload_base2"): Remove. ! ("reload_anchor"): New insn. ! ("pool"): New insn. ! s390.c (s390_pool_overflow): Remove. ! s390.h (s390_pool_overflow): Likewise. ! s390.md ("cjump", "icjump", "doloop_si"): Remove s390_pool_overflow. ! 2002-10-15 J"orn Rennecke ! * sh.md (movv8qi_i+2): Don't split if source is -1. ! 2002-10-15 Janis Johnson ! * doc/install.texi: Formatting changes for conformance to HTML 4.01. ! 2002-10-15 Ulrich Weigand ! PR opt/7409 ! * loop.c (loop_regs_scan): Mark registers used for function ! argument passing as MAY_NOT_OPTIMIZE. ! 2002-10-14 Jan Hubicka ! * i386.md (movv2di_internal): New pattern. ! (movv2df_internal, movv8hi_internal, movv16qi_internal): Fix predicate. ! (movv2di): New expander. ! * i386.c (ix86_preferred_reload_class): Return NO_REGS for vector operands. ! * i386.c (ix86_expand_timode_binop_builtin): Delete. ! (builtin_description): Add SSE1 logicals; rename SSE2 logicals. ! (ix86_init_mmx_sse_builtins): Kill SSE1 logicals. ! (ix86_expand_builtin): Likewise. ! * i386.h (sse_andti4_df_1, sse_andti3_df_2, sse_andti3_sf_1, sse_andti3_sf_2, ! sse_andti3, ! sse_andnti4_df_1, sse_andti3_df_2, sse_andti3_sf_1, sse_andti3_sf_2, ! sse_andnti3, ! sse_orti4_df_1, sse_orti3_df_2, sse_orti3_sf_1, sse_orti3_sf_2, ! sse_orti3, ! sse_xorti4_df_1, sse_xorti3_df_2, sse_xorti3_sf_1, sse_xorti3_sf_2, ! sse_xorti3): Kill. ! (sse_andv4sf3, sse_andnv4sf3, sse_orv2df3, sse_xorv2df3, sse_andv2df3, ! sse_andnv2df3, sse_orv2df3, sse_xorv2df3): New expanders. ! (*sse_andv4sf3, *sse_andnv2df3, *sse_orv4sf3, *sse_xorv4sf3, *sse_andv2df3, ! *sse_andnv2df3, *sse_orv2df3, *sse_xorv2df3): New patterns. ! (*sse_andsf3, *sse_andndf3, *sse_ordf3, *sse_xordf3, *sse_anddf3, ! *sse_andndf3, *sse_orv2df3, *sse_xorv2df3): New patterns. ! * xmmintrin.h (__m128i): Define as __v2di. ! PR c++/6419 ! (expand_expr): Use DECL_RTL_SET_P. ! 2002-10-14 Roger Sayle ! * combine.c (simplify_set): Treat MODE_CC registers like cc0. ! 2002-10-14 Roger Sayle ! Zack Weinberg ! * config/i386/i386.c (k6_cost): Correct typo. ! 2002-10-14 Mark Mitchell ! PR optimization/6631 ! * alias.c (objects_must_conflict_p): Check honor_readonly when ! examining TYPE_READONLY. ! * function.c (assign_stack_temp_for_type): Likewise. ! 2002-10-14 Falk Hueffner ! * config/alpha/alpha.md (extendsidi2_nofix, extendsidi2_fix): ! Swap zero extension arguments. ! (umaxhi3): Fix instruction class. ! PR target/7211 ! (prefetch): Fix prefetch instructions. ! PR target/7238 ! (pkwb): Fix output constraint. ! 2002-10-14 Alexandre Oliva ! * config/mips/mips.c (print_operand): Increase buffer size for ! real numbers. ! 2002-10-14 Richard Henderson ! PR opt/8165 ! * gcse.c (adjust_libcall_notes): Revert last change. ! * simplify-rtx.c (simplify_replace_rtx): Handle LO_SUM. ! 2002-10-14 Andrew Haley ! * tree-inline.c (remap_block): All local class initialization ! flags go in the outermost scope. ! (expand_call_inline): Call java_inlining_map_static_initializers. ! (expand_call_inline): Call java_inlining_merge_static_initializers. ! * java/lang.c (merge_init_test_initialization): New. ! (java_inlining_merge_static_initializers): New. ! (inline_init_test_initialization): New. ! (java_inlining_map_static_initializers): New. ! * tree-inline.c (expand_call_inline): Convert retvar to expected ! type. ! 2002-10-14 Graham Stott ! * stmt.c (decl_conflicts_with_clobbers_p): Add REG_P check. ! 2002-10-14 Aldy Hernandez ! * stmt.c: Fix typo in comment. ! 2002-10-14 J"orn Rennecke ! * c-common.c (c_common_type_for_mode): Add V2HImode case. ! * tree.c (build_common_tree_nodes_2): Initialize ! unsigned_V2HI_type_node and V2HI_type_node. ! * tree.h (enum tree_index): Add TI_UV2HI_TYPE and TI_V2HI_TYPE. ! (unsigned_V2HI_type_node, V2HI_type_node): Define. ! 2002-10-14 Jakub Jelinek ! * config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): ! Handle TARGET_64BIT. ! 2002-10-14 Richard Sandiford ! * config/mips/vr.h (DRIVER_SELF_SPECS): Define. ! * config/mips/t-vr (MULTILIB_OPTIONS): Remove mlong32. ! (MULTILIB_DIRNAMES): Remove long32. ! (MULTILIB_EXCEPTIONS): Don't build -mabi=32 -mgp32 multilibs. ! (MULTILIB_REDUNDANT_DIRS): Remove. ! 2002-10-14 Richard Sandiford ! * doc/tm.texi (DRIVER_SELF_SPECS): Document. ! * gcc.c (driver_self_specs): New variable. ! (do_self_spec): New function. ! (main): Use it to process driver_self_specs. ! 2002-10-13 Richard Henderson ! * rtl.c (shallow_copy_rtx): Use memcpy for the entire node. ! 2002-10-12 Neil Booth ! PR preprocessor/7862 ! PR preprocessor/8190 ! * gcc.c (cpp_unique_options): Don't delete .d files. ! Remove stray whitespace. ! 2002-10-12 Naohiko Shimizu ! * pdp11.h (ASM_OUTPUT_SKIP): Add preceding 0 for octal constant. ! (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. ! * pdp11.c (pdp11_output_function_prologue): 0%o -> %#o. ! (pdp11_output_function_epilogue, output_ascii): Likewise. ! (output_addr_const_pdp11): Likewise. ! * pdp11.md (movdi): Use offsetable memory for floating store. ! (lshrsi3, negsi2): Delete irrelevant comment. ! 2002-10-11 Geoffrey Keating ! * cse.c (mention_regs): Set SUBREG_TICKED to the register number, ! not the address of the REG. ! (struct cse_reg_info): Make subreg_ticked unsigned. ! 2002-10-11 Janis Johnson ! * doc/compat.texi: Add info about C++ libraries. ! 2002-10-11 Richard Henderson ! PR opt/8165 ! * gcse.c (adjust_libcall_notes): Also adjust notes for INSN. ! 2002-10-11 John David Anglin ! * cfganal.c (dfs_enumerate_from): Use PARAMS. ! * genautomata.c (output_insn_code_cases): Likewise. ! * real.c (real_format): Likewise. ! * tree.c (tree_size): Revise expressions using TREE_CODE_LENGTH to ! ensure value is promoted before doing subtraction. ! 2002-10-11 Jan Hubicka ! * calls.c (expand_call): Simplify noreturn call. ! PR c/7344 ! * cfgbuild.c (make_edges): Create edge cache when we do have ! large jumptable. ! * expr.c (do_tablejump): Note size of maximal jumptable. ! * function.c (prepare_function_start): Zero out size. ! * function.h (function): Add max_jumptable_ents. ! * cfgcleanup.c (insn_match_p): Verify sibcall flag for calls to. ! 2002-10-11 J"orn Rennecke ! * sh.md (movv8qi_i+2): For V8QI destinations, generate V4HI ! register for mperm_w operation. ! 2002-10-11 J"orn Rennecke ! * emit-rtl.c (gen_lowpart_common): When asked to make a vector from ! an integer, use simplify_gen_subreg. ! 2002-10-10 Aldy Hernandez ! * extend.texi (Vector Extensions): Remove comment about single ! element vectors. ! 2002-10-10 Kaveh R. Ghazi ! * fold-const.c (size_htab_hash): Use htab_hash_pointer. ! * function.c (insns_for_mem_hash): Likewise. ! * varasm.c (STRHASH): Likewise. ! 2002-10-10 Stuart Hastings ! * cse.c (struct cse_reg_info): Add subreg_ticked. ! (SUBREG_TICKED): New. ! (get_cse_reg_info): Initialize SUBREG_TICKED. ! (mention_regs): Use it. ! (invalidate): Set SUBREG_TICKED. ! (invalidate_for_call): Likewise. ! (addr_affects_sp_p): Likewise. ! 2002-10-10 Jakub Jelinek ! * config/i386/i386.md (tls_local_dynamic_base): Put pic reg ! into proper operand. ! 2002-10-10 Denis Chertykov ! * config/ip2k/ip2k.c (function_epilogue): Optimize stack ! deallocation. ! * config/ip2k/libgcc.S: Combine routines used by function ! epilogue. ! 2002-10-10 Jim Wilson ! * cse.c (fold_rtx): Don't perform associative optimization for DIV and ! UDIV. ! 2002-10-10 David Edelsohn ! * config/rs6000/aix52.h: New file. ! * config/rs6000/t-aix52: New File. ! * config.gcc (rs6000-ibm-aix5.1.*): New entry. ! (rs6000-ibm-aix[56789].*): Default to AIX 5.2. ! 2002-10-10 Jan Hubicka ! PR target/5610 ! * invoke.texi (-msse-math): Kill ! (-msse): Add note to mfpmath=sse. ! 2002-10-10 Jan Hubicka ! PR target/7723 ! * i386.c (ix86_expand_vector_move): Do not generate const0->mem moves. ! 2002-10-10 Neil Booth ! PR preprocessor/8179 ! * gcc.c (cpp_options): Add {ansi}, move %{m*} to same location ! as cc1_options. ! (default_compilers): Pass debug options when preprocessing ! stdin. ! 2002-10-06 Richard Henderson ! * toplev.c (rest_of_compilation): Revert opt/2960 change. ! 2002-10-09 Zack Weinberg ! PR c/7353 ! * c-decl.c (start_decl): Unconditionally issue error for ! 'typedef foo = bar'. ! (finish_decl): Remove special case for TYPE_DECL with initializer. ! * doc/extend.texi: Delete "Naming Types" section. Change all ! cross-references to that section to refer to "Typeof" instead. ! Add the useful safe-max()-macro example from "Naming Types" to ! "Typeof", rewritten using that extension. Add some compatibility ! notes to "Typeof." ! 2002-10-09 Kaveh R. Ghazi ! * loop.c: Revert 2002-08-15 change. ! (LOOP_REGNO_NREGS): Ensure type is int. ! 2002-10-09 David Edelsohn ! * config/rs6000/rs6000.md (extenddftf2): Change to define_insn ! which copies first FPR and clears second. ! (extendsftf2): Same. ! (floatditf2): Fix typo. ! (floatsitf2): Same. ! (fix_trunctfdi2): Same. ! (fix_trunctfsi2): Same. ! 2002-10-09 Kaveh R. Ghazi ! * conflict.c (arc_hash): Change return type to hashval_t. ! * cselib.c (get_value_hash): Likewise. ! * genautomata.c (automaton_decl_hash, insn_decl_hash, decl_hash, ! state_hash, automata_list_hash): Likewise. ! * read-rtl.c (def_hash): Likewise. ! * tree.c (type_hash_hash): Likewise. ! 2002-10-08 Aldy Hernandez ! * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Call ! prologue_epilogue_contains instead of using REG_MAYBE_DEAD notes. ! 2002-10-09 J"orn Rennecke ! * sh.md (ffssi2): Fix emitted code. ! 2002-10-09 Ulrich Weigand ! * cse.c (insn_live_p): Pass insn pattern, not full insn ! to may_trap_p. ! 2002-10-09 Neil Booth ! * cppmacro.c (paste_tokens): Only allow / to paste with =. ! 2002-10-09 David Edelsohn ! * config/rs6000/rs6000.md (movdf splitter): Use gen_int_mode on ! 64-bit hosts. ! (movtf_internal): Reference correct displacement for second value ! in memory. ! (movtf splitter): Correct generation of constants in 64-bit mode. ! 2002-10-09 Alan Modra ! * libgcc2.c (__floatdisf): Properly cure double rounding. ! 2002-10-09 Gabriel Dos Reis ! * c-common.c (cb_register_builtins): Define __WCHAR_MAX__. ! * doc/cpp.texi (Common Predefined Macros): Document. ! 2002-10-09 Gabriel Dos Reis ! PR doc/7484 ! * doc/invoke.texi (Option Summary): List ! -Wmissing-declarations as a C only option. ! 2002-10-08 Jakub Jelinek ! * config/sparc/t-linux64 (MULTILIB_OPTIONS): Remove ! mno-app-regs|mcmodel=medany. ! (MULTILIB_DIRNAMES, MULTILIB_OSDIRNAMES): Remove alt. ! (MULTILIB_EXCEPTIONS, MULTILIB_EXCLUSIONS, MULTILIB_MATCHES): Remove. ! (CRTSTUFF_T_CFLAGS): Define. ! 2002-10-08 Roger Sayle ! PR target/8087 ! * simplify-rtx.c (avoid_constant_pool_reference): Allow constant ! pool references that are constructed using LO_SUM. ! 2002-10-08 Nathan Sidwell ! * c-opts.c (c_common_decode_option): Add warn_strict_aliasing to ! -Wall. ! * c-typeck.c (build_c_cast): Use warn_strict_aliasing, tweak ! message. ! * flags.h (warn_strict_aliasing): Declare. ! * toplev.c (warn_strict_aliasing): Define. ! (lang_independent_options): Add it. ! * doc/invoke.texi (-Wstrict-aliasing): Document it. ! 2002-10-08 Zack Weinberg ! * system.h (GCCBUGURL): Delete. ! * version.c (bug_report_url): New. Add commentary about ! modifying both these strings in modified distributions. ! * version.h: Declare bug_report_url. ! * diagnostic.c, gcc.c, gcov.c: Globally replace GCCBUGURL with ! bug_report_url. ! 2002-10-08 Nick Clifton ! * config/rs6000/spe.h (__ev_set_acc_u64): Use __ev_create_u64 to ! convert uint64_t into __ev64_opaque__. ! (__ev_set_acc_s64): Likewise, but using signed types. ! 2002-10-08 Ulrich Weigand ! * config/s390/s390.md ("*doloop_si_long"): Add missing operand. ! ("*doloop_di_long"): Likewise. ! 2002-10-08 Jan Hubicka ! * print-rtl.c (print_rtx): Increase buffer size for real numbers. ! 2002-10-08 Richard Sandiford ! * config/mips/mips.md (define_attr cpu): Add r4111. ! 2002-10-08 Anthony Green ! * bitmap.c (bitmap_equal_p): Clear all bitmap_head fields. ! 2002-10-08 Michael Hayes ! * config/c4x/c4x.c (c4x_print_operand): Enlarge buffer ! for REAL_VALUE_TO_DECIMAL output. ! 2002-10-07 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_override_options): Set ! real_format_for_mode for IBM extended format, if enabled. ! (easy_fp_constant): Add TFmode. ! (rs6000_legitimize_address): Add TFmode. ! (rs6000_legitimate_address): Same. ! (function_arg_advance): TFmode uses two FPRs. ! (rs6000_emit_prologue): Fix warning. ! (rs6000_output_function_epilogue): Add TFmode. ! (output_toc): Add TFmode. ! * rs6000.h (SLOW_UNALIGNED_ACCESS): Add TFmode. ! (LEGITIMATE_OFFSET_ADDRESS_P): Add TFmode. ! * rs6000.md (movtf splitter): Load TFmode constant. ! 2002-10-07 Dale Johannesen ! * rtl.h: Add NOTE_PRECONDITIONED. ! * unroll.c: Set it. ! * loop.c: Set loop_info->preconditioned from it. ! * doloop.c: Permit doloop treatment when loop_info->preconditoned. ! 2002-10-07 Richard Henderson ! * config/i960/i960.c (i960_setup_incoming_varargs): Create a ! new rtx for comparing the argument pointer against zero. ! (i960_va_start): Similarly. ! 2002-10-07 Richard Henderson ! * config/i960/i960.md (*): Use TFmode, not XFmode. ! * config/i960/i960.c (*): Likewise. ! (i960_arg_size_and_align): Remove XFmode alignment hack. ! (i960_round_align): Merge code from ROUND_TYPE_ALIGN. ! * config/i960/i960.h (LONG_DOUBLE_TYPE_SIZE): Use 128, not 96. ! (MAX_LONG_DOUBLE_TYPE_SIZE): Likewise. ! (DATA_ALIGNMENT, ROUND_TYPE_SIZE): Remove. ! 2002-10-07 Richard Henderson ! * config/fp-bit.c (EXTENDED_FLOAT_STUBS): Flush out all XF/TFmode ! entry points; use void return value and argument list. ! 2002-10-05 Naohiko Shimizu ! * t-pdp11: Add MULTILIB support for msoft-float. ! * pdp11.h (LEGITIMATE_CONSTANT_P): Fix soft-float case. ! * t-pdp11: Add LIB2FUNCS_EXTRA. ! * pdp11.c (pdp11_output_function_prologue): Restrict offset to 16bit, ! add preceding 0 to the octal constant, rename 'fp' to 'r5', rename ! 'fldd' to 'ldd', rename 'fstd' to 'std'. ! (pdp11_output_function_epilogue): Likewise. ! (output_move_quad): Make the comment gas compatible. ! (output_ascii): Add preceding 0 to the octal constant. ! (print_operand_address): Add pre_modify, post_modify. ! (output_addr_const_pdp11): Add preceding 0 to the octal constant. ! * pdp11.h (GO_IF_LEGITIMATE_ADDRESS) : Add 'movb' pre_modify case ! with the indication of Paul Koning. ! (PRINT_OPERAND): Fix floating constant. ! * pdp11.md (movdi): Restrict matching pattern. ! (movqi): Generalize the matching pattern. ! (movdf): Restrict matching pattern. ! (zero_extendqihi2): Change constant representation. ! (floatsidf2): Fix wrong operands. ! (addqi3): Fix wrong instruction name. ! (subqi3): Fix wrong instruction name. ! (andsi3, andhi3, andqi3): Simplify and fix to use 'bic'. ! (xorsi3): Fix wrong insn. ! (one_cmplqi2): Add two operand pattern. ! (lsrsi3): New. ! (negsi2): New. ! (call): Add register indirect case. ! (mod): Fix wrong subreg. ! 2002-10-06 Eric Botcazou ! Volker Reichelt ! PR c/7411 ! * expr.c (expand_expr) [PLUS]: Simplify after the operands ! have been expanded in EXPAND_NORMAL mode. ! 2002-10-06 Richard Henderson ! * config/rs6000/rs6000.md (load_toc_v4_PIC_2): Fix base constraint. ! 2002-10-06 Richard Henderson ! PR optimization/2960 ! * toplev.c (rest_of_compilation): Don't copy_loop_headers if ! optimize_size. ! 2002-10-06 Alexandre Oliva ! * config/mips/mips.h (SIZE_TYPE, PTRDIFF_TYPE): Override ! previously definitions. ! 2002-10-06 Frank Ch. Eigler ! * cppinit.c (init_standard_includes, parse_option): Use strncmp. ! * c-opts.c (find_opt): Similarly. ! 2002-10-05 Jakub Jelinek ! * gcc.c (set_multilib_dir): Don't access *end. ! Use memcpy instead of strncpy. Don't write beyond malloced buffer. ! (print_multilib_info): Don't show paths starting with ".:". ! * genmultilib: Add new option, "yes" if multilibs are enabled. ! Update comments. If multilibs not enabled, print .:${osdirout} ! for each directory. If multilibs are enabled, always print ! ${dirout}:${osdirout}, even if the two are the same. ! * Makefile.in (s-mlib): Pass @enable_multilib@ to genmultilib. ! Pass all MULTILIB_* variables to genmultilib even if ! --disable-multilib but MULTILIB_OSDIRNAMES is not empty. ! 2002-10-04 Bruce Korb ! * fixinc/inclhack.def(hpux11_abs): use format fix ! * fixinc/fixincl.x: regenerate ! * fixinc/tests/base/stdlib.h: accommodate new fix test ! 2002-10-05 Jan Hubicka ! * c-common.c (cb_register_builtins): Use really_no_inline. ! 2002-10-04 David Edelsohn ! * unroll.c (copy_loop_body): Remove REG_EQUAL note attached to ! copied instruction if the note is not loop invariant. ! 2002-10-04 Loren J. Rittle ! * gcc/ginclude/stddef.h: Support the FreeBSD 5 typedef system. ! 2002-10-04 Steve Ellcey ! * doc/invoke.texi (HPPA): Add -mlinker-opt, -mgnu-ld, ! and -mhp-ld options to list of options. Add -mgnu-ld ! and -mhp-ld option descriptions. ! 2002-10-04 Steve Ellcey ! * fixinc/inclhack.def (hpux11_abs): New. ! (stdio_va_list): change __va_list__ to __gnuc_va_list. ! * fixinc/fixincl.x: Rebuild. ! 2002-10-04 Roger Sayle ! * config/i386/i386.h (processor_costs): Add new fields fadd, ! fmul, fdiv, fabs, fchs and fsqrt to costs structure. ! (RTX_COSTS): Use these fields to determine the RTX costs ! of floating point addition/subtraction, multiplication, ! division, fabs, negation and square root respectively. ! * config/i386/i386.c (size_cost): Provide instruction sizes ! for these new fields. ! (i386_cost, i486_cost, pentium_cost, pentiumpro_cost, ! k6_cost, athlon_cost, pentium4_cost): Provide typical cycle ! counts for these new fields for all x86 processor variants. ! 2002-10-04 Kaveh R. Ghazi ! * mips.c (mips_const_double_ok): Delete unused variable. ! * gengtype.c (rtx_next): Change type to int. ! 2002-10-04 Andreas Jaeger ! * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Fix value. ! 2002-10-04 Richard Henderson ! * real.h (SIGNIFICAND_BITS): Add one more word. ! (CONST_DOUBLE_FORMAT): Accomodate 6 words. ! * real.c (times_pten): New. ! (real_to_decimal, real_from_string): Use it. ! (sticky_rshift_significand): Use & to find modulus. ! (rshift_significand, lshift_significand): Likewise. ! (do_divide): Apply sticky bit after normalization. ! (real_to_decimal, real_to_hexadecimal): Fix sign of Inf and NaN. ! 2002-10-03 Andreas Jaeger ! * gengtype.c (adjust_field_rtx_def): Cast variables of type size_t ! to unsigned long, adjust printf format string. ! (output_mangled_typename): Likewise. ! 2002-10-03 Jason Thorpe ! * config/vax/vax.c (vax_output_function_prologue): Use asm_fprintf. ! * config/vax/vax.h (VAX_FUNCTION_PROFILER_NAME): New. ! (FUNCTION_PROFILER): Rewrite to use ASM_GENERATE_INTERNAL_LABEL, ! assemble_name, asm_fprintf, and VAX_FUNCTION_PROFILER_NAME. ! (ASM_OUTPUT_MI_THUNK): Use asm_fprintf instead of REGISTER_PREFIX. ! (PRINT_OPERAND_PUNCT_VALID_P): Fix comment. ! * config/vax/elf.h (FUNCTION_PROFILER): Remove. ! (VAX_FUNCTION_PROFILER_NAME): Redefine as "__mcount". ! 2002-10-03 Mark Mitchell ! * doc/invoke.texi (-Wabi): Document mangling bug. ! 2002-10-04 Alan Modra ! * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Use a ! name for the tbtab label that depends on the function asm name. ! Don't output tbtab label unless optional_tbtab. ! (output_mi_thunk): Formatting. ! 2002-10-03 Richard Henderson ! * config/m68k/m68k.h (OVERRIDE_OPTIONS): Move additional code ... ! * config/m68k/m68k.c (override_options): ... here. ! * config/m68k/m68kelf.h (OVERRIDE_OPTIONS): Remove. ! * config/m68k/m68kv4.h (OVERRIDE_OPTIONS): Remove. ! * config/m68k/linux.h (SUBTARGET_OVERRIDE_OPTIONS): Remove. ! * config/m68k/netbsd-elf.h (SUBTARGET_OVERRIDE_OPTIONS): Remove. ! 2002-10-03 Richard Henderson ! * real.h (struct real_value): Use ENUM_BITFIELD. ! 2002-10-03 Richard Henderson ! * config/i960/i960.md (call, call_value): Use emit_call_insn. ! 2002-10-03 Steve Ellcey ! * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. ! 2002-10-03 Steve Ellcey ! * config.gcc (hppa*64*-*-hpux11*): Check gnu_ld. ! * config/pa/pa.h (MASK_GNU_LD): New. ! (TARGET_GNU_LD): New. ! * config/pa/pa64-hpux.h (LINK_SPEC): Set based ! on gnu-ld and MASK_GNU_LD. ! (SUBTARGET_SWITCHES): New gnu-ld & hp-ld flags. ! 2002-10-03 Jan Hubicka ! * i386.c (athlon_cost): Fix the move costs. ! 2002-10-03 Jan Hubicka ! * final.c (final): Use symbol name as function name for profiling. ! * profile.c (get_exec_counts): Likewise. ! (branch_prob): Likewise. ! 2002-10-03 Jakub Jelinek ! * longlong.h (__udiv_qrnnd): Remove PARAMS from prototype. ! 2002-10-03 Jakub Jelinek ! * gcc.c (print_multi_os_directory): New variable. ! (option_map): Support --print-multi-os-directory. ! (struct prefix_list): Add os_multilib field. ! (multilib_os_dir): New variable. ! (static_specs): Add multilib_options. ! (find_a_file): Add multilib argument. Search in GCC or OS multilib ! subdirs if non-zero. ! (read_specs, execute): Update callers. ! (find_file): Likewise. Don't prefix name with multilib_dir, instead ! pass 1 as multilib option. ! (display_help): Include --print-multi-os-directory. ! (add_prefix): Add os_multilib argument. Initialize pl->os_multilib. ! (process_command): Update callers. Handle --print-multi-os-directory. ! (do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is ! set. ! (main): Update find_a_file and add_prefix callers. ! Handle print_multi_os_directory. ! (struct mdswitchstr): New. ! (mdswitches, n_mdswitches): New variables. ! (used_arg): Add MULTILIB_DEFAULT switches too if they are not ! present on the command line nor their mutually incompatible ! switches. ! (default_arg): Optimize. ! (set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches ! array. ! (print_multilib_info): Only print GCC multilib dir name, not OS ! multilib dirname. ! * genmultilib: Add osdirnames parameter. Output multilib_options ! variable. If osdirnames is specified, output dirnames as ! dirname:osdirname. ! * mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory ! and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES ! to compute libgcc_s soname and install path. ! * Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of ! SHLIB_SLIBDIR_SUFFIXES to mklibgcc. ! (s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib ! argument. ! * config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64, ! ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove. ! (STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32 ! and -m64. ! * config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! * config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove. ! (STARTFILE_ARCH_SPEC): Remove. ! * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove. ! * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set. ! (SHLIB_SLIBDIR_SUFFIXES): Remove. ! 2002-10-03 Jan Hubicka ! * predict.c (choose_function_section): Avoid choice for linkonce functions. ! 2002-10-03 Jan Hubicka ! * i386.md (lea to mul peep2): Fix condition. ! 2002-10-02 John David Anglin ! * pa-linux.h (FUNCTION_OK_FOR_SIBCALL): Delete macro. ! * pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Define. ! 2002-10-02 Richard Henderson ! PR opt/7124 ! * config/i386/i386.c (ix86_register_move_cost): Increase cost ! for secondary_memory_needed pairs. ! 2002-10-02 Nathanael Nerode ! * doc/vms.texi: Blow away false include file section. ! 2002-10-02 Roger Sayle ! PR optimization/6627 ! * toplev.c (force_align_functions_log): New global variable. ! * flags.h (force_align_functions_log): Add extern prototype. ! * varasm.c (assemble_start_function): Use it to force minimum ! function alignment. ! * config/i386/i386.h (FUNCTION_BOUNDARY): Set the correct ! minimum function alignment to one byte. ! (TARGET_PTRMEMFUNC_VBIT_LOCATION): Store the virtual bit in ! the least significant bit of vtable member function pointers. ! * tree.h (enum ptrmemfunc_vbit_where_t): Move definition to ! here from cp/cp-tree.h. ! 2002-10-02 Jan Hubicka ! * i386.c (print_operand_address): Use RIP addressing for offsetted ! label refs too. ! 2002-09-30 David S. Miller ! PR middle-end/7151 ! * config/sparc/sparc.md (movdi_insn_sp32_v9): Accept 'e' regs. ! (movdi reg/reg split): Match only on sparc32, and v9 when int regs. ! 2002-10-01 Roger Sayle ! * unroll.c (loop_iterations): Revert 2002-09-08 change. ! 2002-10-01 Richard Henderson ! * real.c (real_to_decimal): Crop trailing zeros for DIGITS < 0. ! (real_to_hexadecimal): Likewise. ! * print-rtl.c (print_rtx): If we are linked with real.c, don't ! dump the XWINT fields of a floating point CONST_DOUBLE. ! 2002-10-01 Jason Thorpe ! * config/vax/elf.h (FUNCTION_PROFILER): Fix __mcount call. ! 2002-10-01 Richard Henderson ! * calls.c (precompute_register_parameters): Force non-legitimate ! constants into pseudos. ! 2002-10-01 Nick Clifton ! * config/rs6000/spe.md (spe_evrlwi): Add missing third operand ! to assembler template. ! 2002-10-01 Richard Henderson ! * dwarf2out.c (loc_descriptor_from_tree): Relax requirement ! for TLS debug info to !DECL_EXTERNAL. ! 2002-10-01 Matt Thomas ! Jason Thorpe ! * config.gcc (vax-*-netbsdelf*): Enable configuration. ! * config/elfos.h (PCC_BITFIELD_TYPE_MATTERS): Define only ! if not already defined. ! * config/vax/elf.h: New file. ! * config/vax/netbsd-elf.h: New file. ! * config/vax/vax.c: Include "debug.h". ! (vax_output_function_prologue): Add dwarf2 support. Use ! MAIN_NAME_P when checking for VMS_TARGET stack adjust. ! * config/vax/vax.h (CONST_OK_FOR_LETTER_P): Add cases for ! 'J' [0..63], 'K' [-128..127], 'L' [-32768..32767], ! 'M' [0..255], 'N' [0..65535], and, 'O' [-63..-1]. ! (VAX_ISTREAM_SYNC): Remove. ! (INITIALIZE_TRAMPOLINE): Use gen_sync_istream. ! (JUMP_TABLES_IN_TEXT_SECTION): Define. ! (ASM_OUTPUT_REG_POP): Use reg_names for the stack pointer. ! (ASM_OUTPUT_ADDR_VEC_ELT): Use ASM_GENERATE_INTERNAL_LABEL ! and assemble_name. ! (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. ! (PRINT_OPERAND_PUNCT_VALID_P): Accept '|'. ! (PRINT_OPERAND): Output REGISTER_PREFIX for '|'. ! (INCOMING_RETURN_ADDR_RTX): Define. ! * config/vax/vax.md (VUNSPEC_BLOCKAGE) ! (VUNSPEC_SYNC_ISTREAM): Define. ! (blockage): Use VUNSPEC_BLOCKAGE. ! (sync_istream): New insn. ! 2002-10-01 Richard Henderson ! * config/vax/vax.md (call_pop, *call_pop, call_value_pop) ! (*call_value_pop, call, call_value): Add dwarf2 EH support. ! (*call): New insn. ! 2002-10-01 Nathan Sidwell ! PR c/8083 ! * c-typeck.c (build_c_cast): Warn about type punning which breaks ! type based aliasing. ! 2002-10-01 Mark Mitchell ! * stor-layout.c (update_alignment_for_field): New function. ! (place_union_field): Use it. ! (place_field): Likewise. ! 2002-10-01 Nathan Sidwell ! PR other/8077 ! * gcc.c (cc1_options): Add space on -auxbase-strip. ! 2002-10-01 Jim Wilson ! * config/v850/v850.h (EPILOGUE_USES): Define. ! 2002-09-30 Andrew Haley ! * flow.c (insn_dead_p): When using non-call-exceptions, don't ! eliminate insns that may trap. ! * cse.c (insn_live_p): Likewise. ! 2002-10-01 Richard Sandiford ! * config/mips/mips.h (PROCESSOR_R4121): Rename to PROCESSOR_R4120. ! (TARGET_MIPS4121): Rename to TARGET_MIPS4120. ! * config/mips/mips.c (mips_cpu_info): Rename vr4121 to vr4120. ! * config/mips/mips.md: Apply same renaming here. ! 2002-10-01 Richard Sandiford ! * config/mips/mips.c (PROCESSOR_R4320, TARGET_MIPS4320): Remove. ! (GENERATE_MULT3_SI): Remove use of TARGET_MIPS4320. ! * config/mips/mips.c (mips_cpu_info): Remove vr4320 entry. ! * config/mips/mips.md (define_attr cpu): Remove r4320. ! Remove vr4320 scheduler and uses of TARGET_MIPS4320. ! 2002-10-01 Richard Sandiford ! * config/mips/mips.c (mips16_strings): New variable. ! (mips_output_function_epilogue): Clear the SYMBOL_REF_FLAG of every ! symbol in mips16_strings. Free the list. ! (mips_encode_section_info): Keep track of local strings. ! 2002-10-01 Richard Sandiford ! * config/mips/mips.md (bunge, bltgt, bungt): New define_expands. ! (sordered_df, sordered_sf): Remove. ! * config/mips/mips.c (get_float_compare_codes): New fn. ! (gen_int_relational, gen_conditional_move): Use it. ! 2002-10-01 Richard Sandiford ! * config/mips/mips-protos.h (mips_emit_fcc_reload): Declare. ! * config/mips/mips.h (PREDICATE_CODES): Add fcc_register_operand. ! * config/mips/mips.c (fcc_register_operand): New function. ! (mips_emit_fcc_reload): New function, extracted from reload_incc. ! (override_options): Allow TFmode values in float registers ! if ISA_HAS_8CC. ! * cnfig/mips/mips.md (reload_incc): Change destination prediate ! to fcc_register_operand. Remove misleading source constraint. ! Use mips_emit_fcc_reload. ! (reload_outcc): Duplicate reload_incc. ! 2002-09-30 Ulrich Weigand ! * longlong.h: Partially synchronize with GMP-4.1 version: ! Use i370 definitions also for s390. ! Add generic definition of umul_ppmm in terms of smul_ppmm. ! [s390] (umul_ppmm): Remove. ! [s390] (smul_ppmm): Fix incorrect assembler constraints. ! [s390] (smul_ppmm, sdiv_qrnnd): Rename __xx to __x. ! 2002-09-30 Bob Wilson ! * config/xtensa/xtensa.h (REG_CLASS_NAMES, REG_CLASS_CONTENTS): ! Add new RL_REGS register class. ! (PREFERRED_RELOAD_CLASS, PREFERRED_OUTPUT_RELOAD_CLASS): ! Call xtensa_preferred_reload_class for both input and output reloads. ! * config/xtensa/xtensa.c (xtensa_regno_to_class): Use new RL_REGS class. ! (xtensa_preferred_reload_class): Handle output reloads; use RL_REGS ! instead of either AR_REGS or GR_REGS classes. ! (xtensa_secondary_reload_class): Use new RL_REGS class. ! * config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class): Update. ! 2002-09-30 John David Anglin ! * pa.c (hppa_encode_label): Don't drop '*' from function labels. ! (pa_strip_name_encoding): Strip '@' and '*', in that order. ! * pa.h (ASM_OUTPUT_LABELREF): Output user_label_prefix except when ! there is a '*' prefix in NAME. ! 2002-09-30 Jan Hubicka ! * reload.c (push_reload): Handle subregs and secondary memory. ! * reload1.c (gen_reload): Likewise. ! * jump.c (reg_or_subregno): New function. ! * rtl.h (reg_or_subregno): Declare ! * unroll.c (find_splittable_givs): Handle subregs. ! 2002-09-30 Mark Mitchell ! * store-layout.c (finish_record_layout): Add free_p parameter. ! (layout_type): Pass it. ! * tree.h (finish_record_layout): Update prototype. ! 2002-09-30 Jan Hubicka ! * i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__. ! * gcse.c (cprop_jump): Check that the register has not ! been modified ! (cprop_jump): Likewise. ! 2002-09-30 Richard Earnshaw ! * arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb. ! (MODE_BASE_REG_CLASS, case Thumb): Only return BASE_REGS if we know ! that we have a SImode access, and only then if reload hasn't completed; ! for all other cases, use LO_REGS. ! 2002-09-29 Richard Henderson ! * real.c (real_from_string): Apply sign last. Tidy exponent handling. ! 2002-09-29 Richard Henderson ! PR c/8002 ! * combine.c (force_to_mode): Handle FLOAT_MODE destinations ! for CONST_INT. ! 2002-09-29 David Edelsohn ! * real.h (ibm_extended_format): Declare. ! * real.c (encode_ibm_extended, decode_ibm_extended): New ! functions. ! 2002-09-29 Kaveh R. Ghazi ! * darwin-protos.h (darwin_asm_output_dwarf_delta): Prototype. ! * ia64.c (ia64_hpux_asm_file_end): Const-ify. ! 2002-09-29 John David Anglin ! * expmed.c (extract_bit_field): Fix bit-field extraction from SUBREGs. ! 2002-09-29 Kazu Hirata ! * builtins.def: Fix comment formatting. ! * c-common.def: Likewise. ! * cfgcleanup.c: Likewise. ! * combine.c: Likewise. ! * gengtype.c: Likewise. ! * params.def: Likewise. ! * predict.def: Likewise. ! * rtl.def: Likewise. ! * stab.def: Likewise. ! * stor-layout.c: Likewise. ! * tree.def: Likewise. ! * config/darwin.c: Likewise. ! * config/darwin.h: Likewise. ! * config/dbxcoff.h: Likewise. ! * config/elfos.h: Likewise. ! * config/fp-bit.c: Likewise. ! * config/freebsd-spec.h: Likewise. ! * config/interix.h: Likewise. ! * config/libgloss.h: Likewise. ! * config/linux-aout.h: Likewise. ! * config/linux.h: Likewise. ! * config/lynx-ng.h: Likewise. ! * config/lynx.h: Likewise. ! * config/netbsd-aout.h: Likewise. ! * config/netbsd.h: Likewise. ! * config/netware.h: Likewise. ! * config/psos.h: Likewise. ! * config/ptx4.h: Likewise. ! 2002-09-28 Kazu Hirata ! * ChangeLog.4: Fix typos. ! * ChangeLog.6: Likewise. ! * FSFChangeLog.10: Likewise. ! * genattrtab.c: Fix comment typos. ! * haifa-sched.c: Likewise. ! * real.c: Likewise. ! * tree.h: Likewise. ! * config/arm/arm.c: Likewise. ! * config/arm/crti.asm: Likewise. ! * config/arm/crtn.asm: Likewise. ! * config/frv/frv.c: Likewise. ! * config/frv/frv.md: Likewise. ! * config/h8300/h8300.md: Likewise. ! * config/i386/rtemself.h: Likewise. ! * config/ia64/unwind-ia64.c: Likewise. ! * config/ip2k/ip2k.h: Likewise. ! * config/m88k/m88k.c: Likewise. ! * config/m88k/m88k.md: Likewise. ! * config/mips/sr71k.md: Likewise. ! * config/mmix/mmix.c: Likewise. ! * config/rs6000/rs6000.c: Likewise. ! * config/sh/sh.md: Likewise. ! 2002-09-26 Theodore A. Roth ! * config/avr/avr.c: Eliminate use of _PC_ in pc relative insns. ! * config/avr/avr.md: Ditto. ! 2002-09-27 Alexander N. Kabaev ! PR preprocessor/8055 ! * cppmacro.c (stringify_arg): Do not overflow the buffer ! with the terminating NUL when the argument to be stringified ! has no tokens. ! 2002-09-27 Richard Henderson ! * unroll.c (simplify_cmp_and_jump_insns): New. ! (unroll_loop): Use it. Use simplify_gen_foo+force_operand ! instead of expand_simple_foo. ! 2002-09-27 Richard Henderson ! PR optimization/7520 ! * cfganal.c (flow_active_insn_p): New. ! (forwarder_block_p): Use it. ! 2002-09-27 Richard Henderson ! * emit-rtl.c (active_insn_p): Revert last change. ! 2002-09-27 Jakub Jelinek ! * doc/extend.texi (tls_model): Document. ! * varasm.c (decl_tls_model): New. ! * c-common.c (handle_tls_model_attribute): New. ! (c_common_attribute_table): Add tls_model. ! * config/alpha/alpha.c (alpha_encode_section_info): Use ! decl_tls_model. ! * flags.h (enum tls_model, flag_tls_default): Move... ! * tree.h (enum tls_model, flag_tls_default): ...here. ! (decl_tls_model): New prototype. ! * config/ia64/ia64.c (ia64_encode_section_info): Likewise. ! * config/i386/i386.c (ix86_encode_section_info): Likewise. ! * config/i386/i386.md (tls_global_dynamic, tls_local_dynamic_base): ! Allow !flag_pic. ! 2002-09-27 Kazu Hirata ! * LANGUAGES: Follow spelling conventions. ! * rtl.def: Likewise. ! * sbitmap.c: Likewise. ! * sched-int.h: Likewise. ! * sched-rgn.c: Likewise. ! * sibcall.c: Likewise. ! * simplify-rtx.c: Likewise. ! * ssa.c: Likewise. ! * stab.def: Likewise. ! * stmt.c: Likewise. ! * stor-layout.c: Likewise. ! * target.h: Likewise. ! * timevar.c: Likewise. ! * toplev.c: Likewise. ! * tree-dump.c: Likewise. ! * tree-inline.c: Likewise. ! * tree.c: Likewise. ! * tree.def: Likewise. ! * tree.h: Likewise. ! * unroll.c: Likewise. ! * varasm.c: Likewise. ! * vmsdbgout.c: Likewise. ! * treelang/treelang.texi: Likewise. ! * treelang/treetree.c: Likewise. ! 2002-09-27 Kazu Hirata ! * config/h8300/h8300.c (compute_saved_regs): Use a macro ! instead of a hard register number. ! (get_shift_alg): Use an enumerated type instead of numbers. ! (h8300_shift_needs_scratch_p): Likewise. ! 2002-09-26 David S. Miller ! PR optimization/7335 ! * calls.c (emit_library_call_value_1): Passing args by reference ! converts a CONST function into a PURE one. ! 2002-09-26 David Edelsohn ! * dbxout.c (FORCE_TEXT): Switch to current_function_decl, not ! text_section. ! * xcoffout.h (DBX_STATIC_BLOCK_START): Remove explicit change to ! text section. ! * config/rs6000/rs6000.c (rs6000_override_options): Allow ! function-sections and data-sections functionality on AIX. ! 2002-09-26 David Edelsohn ! Dale Johannesen ! * config/rs6000/rs6000.c (rs6000_emit_move): Insert zero-extend ! in RTL for sub-word loads from memory. ! 2002-09-26 Richard Henderson ! PR c/7160 ! * sched-deps.c (sched_analyze_insn): Make clobber insns depend ! on call insns. ! 2002-09-26 Richard Henderson ! * emit-rtl.c (const_double_htab_eq): Remove unused variable. ! 2002-09-26 Chris Lattner ! * ssa.c (rename_insn_1): Handle RENAME_NO_RTX correctly when ! handling undefined values. ! 2002-09-26 Richard Henderson ! PR opt/7520 ! * emit-rtl.c (active_insn_p): Consider a clobber of the ! function return value to be active even after reload. ! 2002-09-27 Alan Modra ! * doloop.c (doloop_modify_runtime ): Adjust ! by absolute loop increment, not loop increment. ! 2002-09-26 Kazu Hirata ! * c-common.h: Follow spelling conventions. ! * cpplex.c: Likewise. ! * cpplib.h: Likewise. ! * gthr-dce.h: Likewise. ! * gthr-posix.h: Likewise. ! * optabs.c: Likewise. ! * output.h: Likewise. ! * profile.c: Likewise. ! * protoize.c: Likewise. ! * ra-rewrite.c: Likewise. ! * real.c: Likewise. ! * recog.c: Likewise. ! * reg-stack.c: Likewise. ! * regclass.c: Likewise. ! * regmove.c: Likewise. ! * reload.c: Likewise. ! * reload.h: Likewise. ! * reload1.c: Likewise. ! * reorg.c: Likewise. ! * resource.c: Likewise. ! * rtl.h: Likewise. ! * rtlanal.c: Likewise. ! 2002-09-26 Steve Ellcey ! * config/ia64/ia64.c (ia64_expand_load_address): Ensure correct mode ! for symbol address. ! 2002-09-24 Eric Christopher ! * config/mips/elf.h: Add HANDLE_SYSV_PRAGMA. ! * config/mips/elf64.h: Ditto. ! 2002-09-24 Eric Christopher ! * except.c (expand_builtin_extract_return_address): Handle case ! where Pmode != ptr_mode. ! 2002-09-26 Steve Ellcey ! * config/ia64/hpux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): New ! 2002-09-26 Steve Ellcey ! * config/ia64/hpux.h (TARGET_DEFAULT): Include TARGET_ILP32. ! 2002-09-26 Igor Shevlyakov ! * combine.c (simplify_set): Don't call to force_to_mode if size ! of integer type is larger than HOST_BITS_PER_WIDE_INT. ! 2002-09-26 Janis Johnson ! * Makefile.in (qmtest-g++): Fix file path. ! 2002-09-26 Ulrich Weigand ! * expr.c (expand_expr) [MINUS_EXPR]: Convert A - const to ! A + (-const) on RTX level, even for unsigned types. ! 2002-09-26 Ulrich Weigand ! * reload.c (dup_replacements): New function. ! (find_reloads): Use it to duplicate replacements at the top level ! of match_dup operands. ! 2002-09-26 Miles Bader ! * v850.md ("length"): Change default value to 4. ! 2002-09-26 Kazu Hirata ! * ChangeLog.1: Follow spelling conventions. ! * ChangeLog.4: Likewise. ! * ChangeLog.6: Likewise. ! * FSFChangeLog.11: Likewise. ! * doc/cpp.texi: Likewise. ! * doc/invoke.texi: Likewise. ! * doc/tm.texi: Likewise. ! 2002-09-26 Nick Clifton ! * config.gcc: Add x prefix to v850e case for handling ! --with-cpu=v850e. ! 2002-09-25 David S. Miller ! PR target/7842 ! * config/sparc/sparc.c (set_extends): SImode ASHIFT does not ! extend. ! 2002-09-25 Richard Henderson ! * emit-rtl.c (const_double_htab_eq): Distinguish integer and ! fp CONST_DOUBLE; use real_identical. ! 2002-09-25 Mark Mitchell ! * doc/invoke.texi: Add more -Wabi examples. ! 2002-09-25 Richard Sandiford ! * config/mips/mips.h (TARGET_MIPS4100): Add missing bracket. ! 2002-09-24 Denis Chertykov ! * config/ip2k/ip2k.c (function_epilogue): Fix wrong numbers in ! cases of optimizing "add sp,w" to "inc sp". ! 2002-09-24 Adam Nemet ! * config/arm/arm.c (thumb_unexpanded_epilogue): Don't generate ! epilogue for naked functions. ! 2002-09-24 Adam Nemet ! Nick Clifton ! * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Remove. ! (FUNCTION_PROFILER): Only invoke THUMB_FUNCTION_PROFILER if it ! is defined. ! 2002-09-24 Ulrich Weigand ! * config/s390/s390.c (preferred_la_operand_p): New function. ! * config/s390/s390-protos.h (preferred_la_operand_p): Declare it. ! * config/s390/s390.md ("addaddr_esame", "*la_ccclobber"): Replace by ... ! ("*la_64_cc", "*la_31_cc", splitters): ... these. ! ("*la_31"): Deactivate for TARGET_64BIT. ! ("*la_31_and", "*la_31_and_cc"): New. ! 2002-09-24 Kaveh R. Ghazi ! * real.h (real_value): Make `exp' explicitly signed. ! 2002-09-24 Kazu Hirata ! * config/elfos.h: Follow spelling conventions. ! * config/alpha/alpha.h: Likewise. ! * config/arc/arc.h: Likewise. ! * config/arm/arm.md: Likewise. ! * config/avr/avr.h: Likewise. ! * config/cris/cris.md: Likewise. ! * config/d30v/d30v.h: Likewise. ! * config/frv/frv.c: Likewise. ! * config/frv/frv.h: Likewise. ! * config/h8300/h8300.c: Likewise. ! * config/h8300/h8300.h: Likewise. ! * config/h8300/h8300.md: Likewise. ! * config/i386/cygwin.h: Likewise. ! * config/i386/i386.h: Likewise. ! * config/i386/sysv3.h: Likewise. ! * config/i960/i960.h: Likewise. ! * config/ia64/ia64.h: Likewise. ! * config/ia64/ia64.md: Likewise. ! * config/ip2k/ip2k.h: Likewise. ! * config/m32r/m32r.h: Likewise. ! * config/m68k/m68k.h: Likewise. ! * config/m88k/m88k.h: Likewise. ! * config/mcore/mcore.c: Likewise. ! * config/mcore/mcore.h: Likewise. ! * config/mcore/mcore.md: Likewise. ! * config/mips/mips.h: Likewise. ! * config/mmix/mmix.h: Likewise. ! * config/mmix/mmix.md: Likewise. ! * config/ns32k/netbsd.h: Likewise. ! * config/ns32k/ns32k.h: Likewise. ! * config/ns32k/ns32k.md: Likewise. ! * config/pa/pa.h: Likewise. ! * config/romp/romp.h: Likewise. ! * config/rs6000/rs6000.h: Likewise. ! * config/rs6000/rs6000.md: Likewise. ! * config/sparc/sparc.h: Likewise. ! * config/stormy16/stormy-abi: Likewise. ! * config/stormy16/stormy16.h: Likewise. ! * config/vax/vax.h: Likewise. ! 2002-09-23 Zack Weinberg ! * version.c (version_string): Now const char[]. ! * version.h: Update to match. ! 2002-09-23 Richard Henderson ! * config/i386/i386.h (MASK_ACCUMULATE_OUTGOING_ARGS_SET, MASK_MMX_SET, ! MASK_SSE_SET, MASK_SSE2_SET, MASK_3DNOW_SET, MASK_3DNOW_A_SET): Kill. ! (TARGET_SWITCHES): Don't reference them. ! * config/i386/i386.c (override_options): Use target_flags_explicit ! to examine bits set by the user. ! 2002-09-23 Dale Johannesen ! * dbxout.c (dbxout_parms): Set current_sym_code for params ! passed on stack by invisible reference. ! 2002-09-23 Richard Earnshaw ! * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Always allocate ! at least one byte of space. ! 2002-09-23 Mark Mitchell ! * c-common.h (flag_abi_version): Fix typo in comment. ! * doc/invoke.texi (flag_abi_version): Document default value. ! 2002-09-23 Hans-Peter Nilsson ! * doc/extend.texi (Extended Asm): Clarify that overlap between ! asm-declared register variables used in an asm and the asm clobber ! list is not allowed. ! * stmt.c (decl_conflicts_with_clobbers_p): New function. ! (expand_asm_operands): Keep track of clobbered registers. Call ! decl_conflicts_with_clobbers_p for each input and output operand. ! If no conflicts found before, also do conflict sanity check when ! emitting clobbers. ! 2002-09-23 Richard Henderson ! * c-common.c (cpp_define_data_format): Remove. ! (cb_register_builtins): Don't define __WCHAR_BIT__, __SHRT_BIT__, ! __INT_BIT__, __LONG_BIT__, __LONG_LONG_BIT__, __FLOAT_BIT__, ! __DOUBLE_BIT__, __LONG_DOUBLE_BIT__. ! * doc/cpp.texi: Don't document them either. ! (__SCHAR_MAX__, __SHRT_MAX__, __INT_MAX__, __LONG_MAX__, ! __LONG_LONG_MAX__): Document. ! (__TARGET_FLOAT_FORMAT__): Remove. ! 2002-09-23 Richard Henderson ! * real.c (do_multiply): Normalize U before addition. ! 2002-09-23 Mark Mitchell ! * c-common.c (flag_abi_version): New variable. ! * c-common.h (flag_abi_version): Declare it. ! * c-opts.c (missing_arg): Add -fabi-version. ! (c_common_decode_option): Process -fabi-version. ! * doc/invoke.texi (-fabi-version): Document it. ! (-Wabi): Add information about bit-fields in unions. ! 2002-09-22 Jason Thorpe ! * config/mips/netbsd.h (SUBTARGET_ASM_SPEC): Always pass -KPIC ! unless -fno-pic or -fno-PIC is specified. ! 2002-09-22 John David Anglin ! * c-common.c (preprocessing_trad_p): Define. ! * pa-hiux.h, pa-hpux.h, pa-hpux7.h (CPP_PREDEFINES): Delete. ! (TARGET_OS_CPP_BUILTINS, SUBTARGET_SWITCHES): Define. ! * pa-hpux10.h (TARGET_OS_CPP_BUILTINS, CPP_SPEC): Define. ! * pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Define. ! * pa-linux.h (CPP_PREDEFINES): Delete. ! (TARGET_OS_CPP_BUILTINS, CPP_SPEC): Define. ! * pa32-linux.h, pa64-linux.h (CPP_SPEC): Delete. ! * pa-osf.h, pa-pro-end.h, rtems.h (CPP_PREDEFINES): Delete. ! (TARGET_OS_CPP_BUILTINS): Define. ! * pa.h (MASK_SIO, TARGET_SIO, TARGET_PA_10): Define. ! (TARGET_SWITCHES): Reformat. Use N_() macro. Add SUBTARGET_SWITCHES. ! (SUBTARGET_SWITCHES): Provide default definition. ! (TARGET_OPTIONS): Reformat. Use N_() macro. ! (CPP_PA10_SPEC, CPP_PA11_SPEC, CPP_PA20_SPEC, CPP_64BIT_SPEC, ! CPP_CPU_DEFAULT_SPEC, CPP_64BIT_DEFAULT_SPEC, SUBTARGET_EXTRA_SPECS, ! EXTRA_SPECS, CPP_SPEC, CPLUSPLUS_CPP_SPEC, CPP_PREDEFINES): Delete. ! (TARGET_CPU_CPP_BUILTINS): Define. ! (TARGET_OS_CPP_BUILTINS): Define for BSD-like systems. ! * doc/invoke.texi (msio, mwsio): Document new hppa options. ! * doc/tm.texi (TARGET_CPU_CPP_BUILTINS): Document macro ! preprocessing_trad_p(). ! 2002-09-22 Jason Thorpe ! * doc/install.texi: Document behavior of --with-headers and ! --with-libs when arguments are omitted. ! 2002-09-22 Kazu Hirata ! * dbxout.c: Follow spelling conventions. ! * defaults.h: Likewise. ! * df.c: Likewise. ! * diagnostic.h: Likewise. ! * doloop.c: Likewise. ! * dwarf2out.c: Likewise. ! * dwarfout.c: Likewise. ! * emit-rtl.c: Likewise. ! * except.c: Likewise. ! * explow.c: Likewise. ! * expmed.c: Likewise. ! * expr.c: Likewise. ! * expr.h: Likewise. ! * flags.h: Likewise. ! * flow.c: Likewise. ! * fold-const.c: Likewise. ! * function.c: Likewise. ! * function.h: Likewise. ! * gcc.c: Likewise. ! * gcov-io.h: Likewise. ! * gcov.c: Likewise. ! * gcse.c: Likewise. ! * genattrtab.c: Likewise. ! * genconfig.c: Likewise. ! * genrecog.c: Likewise. ! * ggc-page.c: Likewise. ! * ggc.h: Likewise. ! * global.c: Likewise. ! * gthr-win32.h: Likewise. ! * integrate.c: Likewise. ! * jump.c: Likewise. ! * langhooks.c: Likewise. ! * langhooks.h: Likewise. ! * line-map.h: Likewise. ! * local-alloc.c: Likewise. ! * longlong.h: Likewise. ! * loop.c: Likewise. ! * loop.h: Likewise. ! 2002-08-27 Jan Hubicka ! * i386.h (BIGGEST_FIELD_ALIGNMENT): Set proper default for x86_64. ! 2002-08-27 Jan Hubicka ! * i386.c (overwrite_options): Set -mpreferred-stack-boundary to 128 ! for -Os/TARGET_64BIT too. ! 2002-09-21 Kazu Hirata ! * ChangeLog: Follow spelling conventions. ! * ChangeLog.0: Likewise. ! * ChangeLog.1: Likewise. ! * ChangeLog.2: Likewise. ! * ChangeLog.3: Likewise. ! * ChangeLog.4: Likewise. ! * ChangeLog.5: Likewise. ! * ChangeLog.6: Likewise. ! * FSFChangeLog.10: Likewise. ! * FSFChangeLog.11: Likewise. ! * alias.c: Likewise. ! * basic-block.h: Likewise. ! * c-aux-info.c: Likewise. ! * c-common.c: Likewise. ! * c-common.h: Likewise. ! * c-decl.c: Likewise. ! * c-format.c: Likewise. ! * c-semantics.c: Likewise. ! * c-typeck.c: Likewise. ! * calls.c: Likewise. ! * cfganal.c: Likewise. ! * cfgloop.c: Likewise. ! * collect2.c: Likewise. ! * combine.c: Likewise. ! * conflict.c: Likewise. ! * cppexp.c: Likewise. ! * cppfiles.c: Likewise. ! * cpphash.h: Likewise. ! * cppinit.c: Likewise. ! * cpplex.c: Likewise. ! * cpplib.c: Likewise. ! * cpplib.h: Likewise. ! * cppmacro.c: Likewise. ! * cse.c: Likewise. ! 2002-09-21 Richard Earnshaw ! * netbsd-aout.h (NETBSD_LINK_SPEC_AOUT): New, takes old definition of ! LINK_SPEC. ! (LINK_SPEC): Define to NETBSD_LINK_SPEC_AOUT. ! * arm/netbsd.h (SUBTARGET_EXTRA_SEPCS): Add NETBSD_LINK_SPEC_AOUT. ! (LINK_SPEC): Rework to use NETBSD_LINK_SPEC_AOUT). ! 2002-09-21 Richard Earnshaw ! PR opt/7930 ! * cse.c (fold_rtx): Calculate old_cost before we fold each ! operand. ! 2002-09-21 Richard Henderson ! * c-common.c (cpp_define_data_format): Remove __GCC_LITTLE_ENDIAN__, ! __GCC_BIG_ENDIAN__, __TARGET_BITS_ORDER__, __TARGET_BYTES_ORDER__, ! __TARGET_INT_WORDS_ORDER__, __TARGET_FLOAT_WORDS_ORDER__, ! __TARGET_USES_VAX_F_FLOAT__, __TARGET_USES_VAX_D_FLOAT__, ! __TARGET_USES_VAX_G_FLOAT__, __TARGET_USES_VAX_H_FLOAT__. ! * doc/cpp.texi: Don't document them. ! 2002-09-21 Richard Henderson ! * c-common.c (builtin_define_float_constants): Use real_format ! to get the floating-point parameters. ! 2002-09-21 Richard Henderson ! * real.c (struct real_format): Move to real.h. ! (real_format_for_mode): Rename from fmt_for_mode; update all users; ! initialize with ieee defaults. ! (real_to_target_fmt, real_from_target_fmt): New. ! (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ! ieee_extended_intel_96_format, ieee_extended_intel_128_format, ! ieee_quad_format, i370_single_format, i370_double_format, ! c4x_single_format, c4x_extended_format): Rename from s/_format//. ! (ieee_quad_format): Fix emin. ! (format_for_size, init_real_once): Remove. ! * real.h (struct real_format): Move from real.c. ! (real_format_for_mode): Declare. ! (real_to_target_fmt, real_from_target_fmt): Declare. ! (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ! ieee_extended_intel_96_format, ieee_extended_intel_128_format, ! ieee_quad_format, vax_f_format, vax_d_format, vax_g_format, ! i370_single_format, i370_double_format, c4x_single_format, ! c4x_extended_format): Declare. ! * toplev.c (do_compile): Don't call init_real_once. ! * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. ! * doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Remove. ! * config/alpha/alpha.h (TARGET_FLOAT_FORMAT): Define. ! * config/alpha/osf5.h (LONG_DOUBLE_TYPE_SIZE): 64, if vax mode. ! * config/alpha/alpha.c (override_options): Set real_format_for_mode ! for VAX, if enabled. ! * config/c4x/c4x.c (c4x_override_options): Set real_format_for_mode ! for C4X. ! * config/i370/i370.h (OVERRIDE_OPTIONS): New. ! * config/i370/i370.c (override_options): New. ! * config/i370/i370-protos.h: Update. ! * config/i386/i386.c (override_options): Set real_format_for_mode ! for Intel 80-bit extended. ! * config/i386/i386.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. ! * config/i960/i960.h (LONG_DOUBLE_TYPE_SIZE): Mind -mlong-double-64. ! (OVERRIDE_OPTIONS): Move code... ! * config/i960/i960.c (i960_initialize): ... here. Set ! real_format_for_mode for Intel 80-bit extended. ! * config/ia64/ia64.c (ia64_override_options): Set real_format_for_mode ! for Intel 80-bit extended, if enabled. ! * config/m68k/m68k.c (override_options): Set real_format_for_mode ! for Motorola 96-bit extended. ! * config/vax/vax.h (OVERRIDE_OPTIONS): New. ! * config/vax/vax.c (override_options): New. ! * config/vax/vax-protos.h: Update. ! 2002-09-21 Alan Modra ! * config/rs6000/rs6000.md (builtin_setjmp_receiver): Add ! #if TARGET_MACHO. ! * config/rs6000/rs6000.md (floatdisf2_internal2): Combine ! insns. Supply missing clobber of scratch reg. ! 2002-09-20 Kazu Hirata ! * config/m32r/m32r.c: Follow spelling conventions. ! * config/m32r/m32r.h: Likewise. ! * config/m32r/m32r.md: Likewise. ! * config/m68k/m68k.c: Likewise. ! * config/m88k/m88k.c: Likewise. ! * config/mcore/mcore.c: Likewise. ! * config/mips/mips.c: Likewise. ! * config/mips/mips.h: Likewise. ! * config/mmix/mmix.c: Likewise. ! * config/mn10200/mn10200.c: Likewise. ! * config/ns32k/ns32k.h: Likewise. ! * config/pa/pa.c: Likewise. ! * config/pa/pa64-linux.h: Likewise. ! * config/pdp11/pdp11.h: Likewise. ! * config/romp/romp.c: Likewise. ! * config/romp/romp.h: Likewise. ! * config/rs6000/eabi.asm: Likewise. ! * config/rs6000/linux64.h: Likewise. ! * config/rs6000/rs6000.c: Likewise. ! * config/rs6000/rs6000.h: Likewise. ! * config/rs6000/rs6000.md: Likewise. ! * config/rs6000/sysv4.h: Likewise. ! * config/rs6000/xcoff.h: Likewise. ! 2002-09-20 Jim Wilson ! * config/v850/v850/lib1funcs.asm (__muldi3): Change r5 to r28. ! 2002-09-20 Jakub Jelinek ! * config/i386/i386.md (UNSPEC_GOTNTPOFF, UNSPEC_INDNTPOFF): New. ! * config/i386/i386.c (legitimate_pic_address_disp_p): Handle ! UNSPEC_GOTNTPOFF and UNSPEC_INDNTPOFF like UNSPEC_GOTTPOFF. ! (legitimate_address_p): Likewise. ! (legitimize_address): Use @gotntpoff and @indntpoff. ! (output_pic_addr_const): Handle UNSPEC_GOTNTPOFF and UNSPEC_INDNTPOFF. ! (output_addr_const_extra): Likewise. ! 2002-09-20 Jim Wilson ! * combine.c (try_combine): When split an instruction pair, where the ! first has a sign_extend src, verify that the src and dest modes match. ! 2002-09-20 Richard Henderson ! * config/mips/mips.c (dfhigh, dflow, sfhigh, sflow): Remove. ! (override_options): Do not initialize them. ! (mips_const_double_ok): Allow no fp constants except zero, ! and not even that for mips16. ! (const_float_1_operand): Use dconst1. ! * config/mips/mips.md (movsf, movsf_internal1, movsf_internal2, ! movdf, movdf_internal1, movdf_internal1a, movdf_internal2): ! Don't allow arbitrary constants; fix predicates and C constraint. ! 2002-09-20 Neil Booth ! * cppmacro.c: Don't warn about function-like macros without ! '(' during pre-expansion. ! 2002-09-20 Jim Wilson ! * config/v850/v850.c (current_function_anonymous_args): Delete. ! (expand_prologue): Use current_function_args_info.anonymous_args. ! (expand_epilogue): Delete use of current_function_anonymous_args. ! * config/v850/v850.h (struct cum_arg): Add anonymous_args field. ! (INIT_CUMULATIVE_ARGS): Clear anonymous_args field. ! (current_function_anonymous_args): Delete extern declaration. ! (SETUP_INCOMING_VARARGS): Set anonymous_args field. ! 2002-09-20 Geoffrey Keating ! * config/rs6000/rs6000.c (rs6000_emit_prologue): Update for change ! to load_macho_picbase. ! * config/rs6000/rs6000.md: Document Darwin-specific unspec IDs. ! (load_macho_picbase): Take the symbol to use as a parameter. ! (macho_correct_pic): New insn. ! (builtin_setjmp_reciever): On Darwin, restore the PIC register. ! * config/rs6000/rs6000.h (ELIMINABLE_REGS): Use ! RS6000_PIC_OFFSET_TABLE_REGNUM rather than hardcoding 30. ! (CAN_ELIMINATE): Likewise. ! (INITIAL_ELIMINATION_OFFSET): Likewise. ! (TOC_REGISTER): Likewise. ! 2002-09-20 Richard Henderson ! * real.c (real_hash): New. ! * real.h: Declare it. ! * cse.c (canon_hash): Use it. ! * cselib.c (hash_rtx): Likewise. ! * emit-rtl.c (const_double_htab_hash): Likewise. ! * rtl.h (CONST_DOUBLE_REAL_VALUE): New. ! * varasm.c (struct rtx_const): Reduce vector size; separate ! integer and fp vectors. ! (HASHBITS): Remove. ! (const_hash_1): Rename from const_hash. Use real_hash. Do not ! take modulus MAX_HASH_TABLE. ! (const_hash): New. Do take modulus MAX_HASH_TABLE. ! (output_constant_def): Do not take modulus MAX_HASH_TABLE. ! (SYMHASH): Don't use HASHBITS. ! (decode_rtx_const): Copy only active bits from REAL_VALUE_TYPE. ! Fix CONST_VECTOR thinko wrt fp vectors. Fix kind comparison. ! (simplify_subtraction): Fix kind comparison. ! (const_hash_rtx): Return unsigned int. Don't use HASHBITS. ! Use a union to pun integer array. ! * config/rs6000/rs6000.c (rs6000_hash_constant): Use real_hash; ! only hash two words of integral CONST_DOUBLE. ! 2002-09-20 Steve Ellcey ! * config/ia64/hpux.h (STARTFILE_SPEC): Modify. ! (STARTFILE_PREFIX_SPEC): New. ! (LINK_SPEC): Modify. ! (LIB_SPEC): Modify. ! (LIBGCC_SPEC): New. ! 2002-09-20 Jakub Jelinek ! * config/i386/i386.c (legitimate_pic_address_disp_p): Allow ! UNSPEC_NTPOFF and UNSPEC_DTPOFF to be offsetted by constant. ! 2002-09-20 Jeroen Dobbelaere ! * config/arm/arm.md (sign_extract_onebit, not_signextract_onebit): ! Add clobber of the condition code register. ! 2002-09-20 Richard Henderson ! * real.c (do_fix_trunc): Static. ! (encode_ieee_single, encode_ieee_double, encode_ieee_extended, ! encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, ! encode_i370_single, encode_i370_double, encode_c4x_single, ! encode_c4x_extended): Add default abort case. ! 2002-09-20 Richard Henderson ! * real.h (enum real_value_class, SIGNIFICAND_BITS, EXP_BITS, ! MAX_EXP, SIGSZ, SIG_MSB, struct real_value): Move from real.c. ! (struct realvaluetype): Remove. ! (REAL_VALUE_TYPE): Use struct real_value. ! (REAL_VALUE_TYPE_SIZE): Use SIGNIFICAND_BITS. ! (test_real_width): New. ! * real.c: Global replace struct real_value with REAL_VALUE_TYPE. ! (real_arithmetic): Avoid hoops for REAL_VALUE_TYPE parameters. ! (real_compare, real_exponent, real_ldexp, real_isinf, real_isnan, ! real_isneg, real_isnegzero, real_identical, exact_real_inverse, ! real_to_integer, real_to_integer2, real_to_decimal, ! real_to_hexadecimal, real_from_string, real_from_integer, ! real_inf, real_nan, real_2expN, real_convert, real_to_target, ! real_from_target): Likewise. ! * tree.h (struct tree_real_cst): Use real_value not realvaluetype. ! * gengtype-yacc.y (bitfieldopt): Accept an ID as well. ! 2002-09-20 Richard Henderson ! * real.h (UNKNOWN_FLOAT_FORMAT, IEEE_FLOAT_FORMAT, VAX_FLOAT_FORMAT, ! IBM_FLOAT_FORMAT, C4X_FLOAT_FORMAT, TARGET_FLOAT_FORMAT): Move ... ! * defaults.h: ... here. ! * config/arm/arm.h, config/avr/avr.h, config/d30v/d30v.h, ! config/fr30/fr30.h, config/frv/frv.h, config/ia64/ia64.h, ! config/ip2k/ip2k.h, config/mips/mips.h, config/stormy16/stormy16.h, ! config/xtensa/xtensa.h (TARGET_FLOAT_FORMAT): Remove. ! 2002-09-20 Hans-Peter Nilsson ! * config/mmix/mmix.md ("negdf2"): Rewrite. ! ("*expanded_negdf2"): New. ! 2002-09-19 Jim Wilson ! * combine.c (simplify_set): When optimizing a subreg src with a ! cc0 dest, use GET_MODE (src) for mask instead of inner_mode. ! 2002-09-19 Dale Johannesen ! * combine.c (make_extraction): Don't create ! invalid subreg. ! 2002-09-19 Ulrich Weigand ! * config/s390/s390.c (addr_generation_dependency_p): Handle SUBREG ! and STRICT_LOW_PART within SET_DEST. ! * config/s390/s390.md ("*extractqi", "*extracthi"): New insns with ! splitters, replacing pre-reload splitters. ! ("*zero_extendhisi2_31", "*zero_extendqisi2_31", ! "*zero_extendqihi2_31"): New insns. ! ("*zero_extendqihi2_64"): Do not clobber CC. ! 2002-09-19 Steve Ellcey ! * config/ia64/hpux.h (CTORS_SECTION_ASM_OP): New. ! (DTORS_SECTION_ASM_OP): Ditto. ! (READONLY_DATA_SECTION_ASM_OP): Moved. ! (DATA_SECTION_ASM_OP): New. ! (SDATA_SECTION_ASM_OP): New. ! (BSS_SECTION_ASM_OP): New. ! (SBSS_SECTION_ASM_OP): New. ! (TEXT_SECTION_ASM_OP): New. ! 2002-09-19 Kazu Hirata ! * config/fp-bit.c: Follow spelling conventions. ! * config/d30v/d30v.c: Likewise. ! * config/d30v/d30v.h: Likewise. ! * config/fr30/fr30.c: Likewise. ! * config/fr30/fr30.h: Likewise. ! * config/fr30/fr30.md: Likewise. ! * config/frv/frv.c: Likewise. ! * config/frv/frv.h: Likewise. ! * config/h8300/h8300.c: Likewise. ! * config/h8300/lib1funcs.asm: Likewise. ! * config/i370/i370.c: Likewise. ! * config/i386/i386.h: Likewise. ! * config/i386/i386.md: Likewise. ! * config/i386/pentium.md: Likewise. ! * config/i386/winnt.c: Likewise. ! * config/i960/i960.c: Likewise. ! * config/ia64/ia64.h: Likewise. ! * config/ip2k/ip2k.c: Likewise. ! * config/ip2k/ip2k.h: Likewise. ! * config/ip2k/ip2k.md: Likewise. ! * config/ip2k/libgcc.S: Likewise. ! 2002-09-19 Stephen Clarke ! * config/sh/sh.h (UNSPEC_GOTOFF_P): Define. ! (GOTOFF_P): Extend to allow gotoff plus constant. ! 2002-09-18 Richard Henderson ! * ifcvt.c (noce_process_if_block): Correctly detect X modified ! with INSN_B before COND_EARLIEST. Don't check A and B for ! modification in condition range. Reorder INSN_B for A==B properly. ! (if_convert): Iterate until no matches for a block. ! 2002-09-18 Richard Henderson ! * calls.c (store_one_arg): Rename default_align to parm_align; ! always adjust parm_align for downward padding. ! 2002-09-18 Richard Henderson ! * toplev.c (backend_init): Move init_real_once invocation ... ! (do_compile): ... here. ! 2002-09-18 Richard Henderson ! * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove ! RTX_UNCHANGING_P markers for successful tail-recursive replacement. ! 2002-09-18 Richard Henderson ! * real.c (round_for_format): Collect sticky as unsigned long, not bool. ! 2002-09-19 Alan Modra ! * config/rs6000/rs6000.md: (floatdisf2): Rename to ! floatdisf2_internal1. ! (floatdisf2): New define_expand. ! (floatdisf2_internal2): Likewise. ! 2002-09-18 Richard Henderson ! * real.c (sticky_rshift_significand): Collect sticky as ! unsigned long, not bool. ! 2002-09-18 Ulrich Weigand ! * config/s390/s390.c (s390_address_cost): New function. ! config/s390/s390-protos.h (s390_address_cost): Add prototype. ! config/s390/s390.h (ADDRESS_COST): Call s390_address_cost. ! (RTX_COST): Use COSTS_N_INSNS. ! 2002-09-18 Douglas Rupp ! Donn Terry ! * stor-layout.c (place_field): Handle alignment of whole ! structures when MSVC compatible bitfields are involved. ! Change method of computing location of MS bitfields to ! be compatible with #pragma pack(n). ! * tree.h (record_layout_info): Add new field ! remaining_in_alignment. ! * doc/tm.texi: (TARGET_MS_BITFIELD_LAYOUT_P): Update. ! (pragma pack): Add paragraph on MSVC bit-field packing. ! 2002-09-18 Richard Earnshaw (reanrsha@arm.com) ! PR optimization/7967 ! * arm.md (ne_zeroextractsi): Add clobber of the condition code ! register. ! 2002-09-18 Kazu Hirata ! * config/s390/s390.c: Follow spelling conventions. ! * config/sh/lib1funcs.asm: Likewise. ! * config/sh/sh.c: Likewise. ! * config/sh/sh.h: Likewise. ! * config/sparc/sparc.c: Likewise. ! * config/sparc/sparc.h: Likewise. ! * config/sparc/sparc.md: Likewise. ! * config/stormy16/stormy16.c: Likewise. ! * config/stormy16/stormy16.h: Likewise. ! * config/v850/v850.c: Likewise. ! * config/v850/v850.h: Likewise. ! * config/vax/vax.c: Likewise. ! * config/vax/vax.h: Likewise. ! 2002-09-18 Nick Clifton ! * config/rs60000/rs6000.c (rs6000_emit_move): Handle V1DImode moves. ! * config/rs60000/rs6000.c (SPE_VECTOR_MODE): Include V1DImode. ! * config/rs6000/spe.md (movv1di, movv1di_internal): New patterns. ! 2002-09-17 Zack Weinberg ! * ABOUT-GCC-NLS: Remove reference to enquire, and out-of-date ! statement that the only translation is to en_UK. ! 2002-09-17 Kazu Hirata ! * config/alpha/alpha.c: Follow spelling conventions. ! * config/alpha/alpha.h: Likewise. ! * config/alpha/alpha.md: Likewise. ! * config/arc/arc.h: Likewise. ! * config/arm/arm.c: Likewise. ! * config/arm/arm.h: Likewise. ! * config/arm/arm.md: Likewise. ! * config/arm/pe.c: Likewise. ! * config/arm/unknown-elf.h: Likewise. ! * config/avr/avr.c: Likewise. ! * config/avr/avr.h: Likewise. ! * config/c4x/c4x.c: Likewise. ! * config/cris/cris.c: Likewise. ! * config/cris/cris.h: Likewise. ! 2002-09-17 Samuel Figueroa ! * final.c (final_scan_insn): Use new macro ASM_OUTPUT_ALIGN_WITH_NOP. ! * config/sparc/sparc.h (ASM_OUTPUT_ALIGN_WITH_NOP) New macro. ! * doc/tm.texi (ASM_OUTPUT_ALIGN_WITH_NOP) New description. ! 2002-09-17 Dale Johannesen ! * cfgcleanup.c (try_forward_edges): Do not forward a ! branch to just after a loop exit before loop optimization; ! this interfered with doloop detection. ! 2002-09-17 Nick Clifton ! * config/arm/arm.c (output_return_instruction): Do not ! writeback the stack pointer when it is being loaded. ! (arm_output_epilogue): Likewise. ! 2002-09-17 Kazu Hirata ! * optabs.c (prepare_cmp_insn): Let emit_library_call_value ! generate a pseudo reg that receives the result of a libcall. ! (prepare_float_lib_cmp): Likewise. ! 2002-09-17 Steve Ellcey ! * config/ia64/elf.h: Remove CPP_PREDEFINES. ! 2002-09-17 Nicola Pero ! Fix PR/7014 and related objc bugs: ! * c-typeck.c (comp_target_types): Added a reflexive argument. ! Pass it to ObjC when/if calling objc_comptypes(). Updated all ! callers to provide the appropriate reflexive argument. ! * objc/objc-act.c (objc_comptypes): Carefully checked and fixed ! typechecking for all cases of comparisons and assignments, ! particularly the obscure and less common ones involving protocols. ! 2002-09-17 Nick Clifton ! * machmode.def (V1DImode): New mode. A single element vector. ! * tree.h (TI_UV1DI_TYPE, TI_V1DI_TYPE): New tree_index enums. ! (unsigned_V1DI_type_node, V1D1_type_node): New type nodes. ! * tree.c (build_common_tree_nodes_2): Build ! unsigned_V1DI_type_node and V1D1_type_node. ! * c-common.c (c_common_type_for_mode): Return ! unsigned_V1DI_type_node or V1D1_type_node for V1DImode. ! * rtl.c (class_narrowest_): Start integer vector nodes with V1DImode. ! 2002-09-17 Nicola Pero ! * doc/objc.texi (Constant string objects): Extended documentation ! to make clear that the constant string class ivar layout is ! completely fixed. ! 2002-09-17 Roger Sayle ! * cfgrtl.c (flow_delete_block_noexpunge): Delete orphaned ! NOTE_INSN_LOOP_CONT notes when deleting basic blocks. ! 2002-09-16 Richard Henderson ! * expr.c (emit_block_move): Set memory block size as appropriate ! for the copy. ! 2002-09-16 Richard Henderson ! PR fortran/3924 ! * sdbout.c (sdbout_symbol): Don't handle offsets from a symbol. ! 2002-09-16 Richard Henderson ! * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE ! as well as OFFSET for BITPOS. ! 2002-09-16 Jeff Garzik ! * config.gcc: Treat winchip_c6-*|winchip2-*|c3-* as pentium-mmx. ! * config/i386/i386.c (processor_alias_table): Add winchip-c6, ! winchip2 and c3. ! * doc/invoke.texi: Mention new aliases. ! 2002-09-16 John David Anglin ! * calls.c (store_one_arg): Set default alignment for BLKmode arguments ! to BITS_PER_UNIT when ARGS_GROW_DOWNWARD and the padding direction is ! downward. ! * function.c (pad_below): Always compile. ! (locate_and_pad_parm): If defined ARGS_GROW_DOWNWARD, pad argument to ! alignment when it is not in a register or REG_PARM_STACK_SPACE is true. ! Pad below when the argument is not in a register and the padding ! direction is downward. ! * pa-64.h (MUST_PASS_IN_STACK): Move define to pa.h. ! (PAD_VARARGS_DOWN): Define. ! * pa.c (function_arg_padding): Revise padding directions to make them ! compatible with the 32 and 64-bit runtime architecture documentation. ! (hppa_va_arg): Add code to handle variable and size zero arguments ! passed by reference on TARGET_64BIT. Reformat. ! (function_arg): Use a PARALLEL for BLKmode and aggregates args on ! TARGET_64BIT. Use a DImode PARALLEL for BLKmode args 5 to 8 bytes ! wide when !TARGET_64BIT. Move forward check for mode==VOIDmode. ! Add comments. ! * pa.h (MAX_PARM_BOUNDARY): Correct define for TARGET_64BIT. ! (RETURN_IN_MEMORY): Return size zero types in memory. ! (FUNCTION_VALUE): Return TFmode in general registers. ! (MUST_PASS_IN_STACK): Define. ! (FUNCTION_ARG_BOUNDARY): Simplify. ! (FUNCTION_ARG_PASS_BY_REFERENCE): Pass variable and zero sized types ! by reference. ! (FUNCTION_ARG_CALLEE_COPIES): Define to FUNCTION_ARG_PASS_BY_REFERENCE. ! 2002-09-16 Richard Henderson ! * real.c (do_fix_trunc): New. ! (real_arithmetic): Call it. ! * simplify-rtx.c (simplify_unary_operation): Handle FIX ! with a floating-point result mode. ! 2002-09-16 Richard Henderson ! * builtin-types.def (BT_FN_FLOAT_CONST_STRING): New. ! (BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New. ! * builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New. ! (__builtin_nans, __builtin_nansf, __builtin_nansl): New. ! * builtins.c (fold_builtin_nan): New. ! (fold_builtin): Call it. ! * real.c (real_nan): Parse a non-empty string. ! (round_for_format): Fix NaN significand truncation. ! * real.h (real_nan): Return bool. ! * doc/extend.texi: Document new builtins. ! 2002-09-16 Jason Merrill ! Danny Smith ! * config/i386/winnt.c (ix86_handle_dll_attribute): Set ! DECL_EXTERN and TREE_PUBLIC for dllimported variables here... ! (i386_pe_mark_dllimport): Not here. ! 2002-09-16 Nathan Sidwell ! * c-semantics.c (genrtl_do_stmt): Cope with NULL cond. ! 2002-09-16 Geoffrey Keating ! * config/rs6000/rs6000.c (build_mask64_2_operands): Suppress ! warnings about unused operands when HOST_BITS_PER_WIDE_INT is ! < 64. ! (rs6000_emit_cmove): Use real_isinf not target_isinf. ! 2002-09-16 Kazu Hirata ! * calls.c (emit_library_call_value_1): Don't refer to ! hard_libcall_value. ! * optabs.c (prepare_float_lib_cmp): Likewise. ! 2002-09-16 Geoffrey Keating ! * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name ! mangling. ! The following changes are merged from pch-branch: ! * doc/gty.texi (GTY Options): Document %a. ! * gengtype.c (do_scalar_typedef): New function. ! (process_gc_options): Handle `length' option. ! (set_gc_used_type): A pointer to an array of structures doesn't ! qualify as a pointer to a structure. ! (output_escaped_param): Add `%a' escape. ! (write_gc_structure_fields): Allow 'desc' on array of unions. ! (main): Define `uint8', `jword' and `JCF_u2' as scalars; use ! do_scalar_typedef. ! * gengtype.c (enum rtx_code): Make global. ! (rtx_format): Make global. ! (rtx_next): New. ! (gen_rtx_next): New. ! (write_rtx_next): New. ! (adjust_field_rtx_def): Skip fields marked by chain_next. ! (open_base_files): Delete redundant prototype. ! (write_enum_defn): New. ! (output_mangled_typename): Correct abort call. ! (write_gc_marker_routine_for_structure): Handle chain_next and ! chain_prev options. ! (finish_root_table): Don't output redundant \n. ! (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. ! * c-tree.h (union lang_tree_node): Add chain_next option. ! * gengtype.h (NUM_PARAM): New definition. ! (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. ! * gengtype.c (find_param_structure): New. ! (adjust_field_type): Handle param_is option. ! (process_gc_options): Detect use_params option. Update callers. ! (set_gc_used_type): Add 'param' parameter, update callers. Handle ! 'use_params' option. ! (open_base_files): Add splay-tree.h to list of files included. ! (output_mangled_typename): New. ! (write_gc_structure_fields): Update 'param' parameter to support ! multiple parameters. Change name mangling. Allow parameterized ! fields to have an apparent scalar type. Handle param_is options, ! use_param option. ! (write_gc_marker_routine_for_structure): Update for change to name ! mangling. Better guess the output file for parameterized types. ! (write_gc_types): Update for change to name mangling. ! (write_gc_root): Update for change to name mangling. Handle (ignore) ! param_is options. ! * doc/gty.texi (GTY Options): Add description of param_is ! options, use_params option. ! * ggc.h (ggc_mark_rtx): Update for changed name mangling. ! * gengtype-lex.l: Produce token for param_is. ! * gengtype-yacc.y: Parse param_is. ! * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. ! * rtl.c: Update comment describing rtx_format. ! * rtl.h (union rtunion): Separate definition and typedef. ! (struct rtx_def): Use gengtype to mark. ! * Makefile.in (gengtype.o): Also depend on rtl.def. ! * ggc.h (ggc_mark_rtx_children): Delete prototype. ! (ggc_mark_rtx): Change to alias of gengtype-generated routine. ! * ggc-common.c (ggc_mark_rtx_children): Delete. ! (ggc_mark_rtx_children_1): Delete. ! (gt_ggc_m_rtx_def): Delete. ! * gengtype.c (adjust_field_rtx_def): New. ! (adjust_field_type): Call adjust_field_rtx_def. ! (write_gc_structure_fields): Add 'default' case to switch if none ! is specified; remove unused code. ! * tree.h (struct tree_exp): Update for change to meaning ! of special. ! * gengtype.c (adjust_field_tree_exp): New function. ! (adjust_field_type): Handle `tree_exp' special here. ! (write_gc_structure_fields): Don't handle `tree_exp' special here. ! Handle new `dot' option. ! * gengtype.h: Make `info' a pointer-to-const. ! * gengtype-yacc.y (yacc_ids): Use xasprintf. ! * gengtype.c (write_gc_structure_fields): Remove implementation ! of `always' option, add `default' option. ! * doc/gty.texi (GTY Options): Remove documentation of `always', ! add `default'. ! 2002-09-16 Hans-Peter Nilsson ! * output.h: Remove #ifdef RTX_CODE and #ifdef TREE_CODE. ! 2002-09-16 Kaveh R. Ghazi ! * m68hc11.md (addhi_sp): Fix uninitialized variable bug. ! * c4x-c.c, c4x.c, darwin.c, i370-c.c, m32r.c: Include tm_p.h ! instead of the *-protos.h file directly. ! * t-c4x, t-i370, t-v850: Depend on $(TM_P_H). ! * darwin.c (machopic_output_stub): Move prototype ... ! * darwin-protos.h (machopic_output_stub): ... here. ! * rs6000-protos.h (machopic_output_stub): Don't declare. ! 2002-09-16 Richard Henderson ! * c-common.c (builtin_define_float_constants): Emit __FOO_DENORM_MIN__. ! 2002-09-16 Richard Henderson ! * real.c, real.h: Rewrite from scratch. ! * Makefile.in (simplify-rtx.o): Depend on TREE_H. ! (paranoia): New target. ! * builtins.c (fold_builtin_inf): Use new real.h interface. ! * c-common.c (builtin_define_with_hex_fp_value): Likewise. ! * c-lex.c (interpret_float): Likewise. ! * emit-rtl.c (gen_lowpart_common): Likewise. ! * optabs.c (expand_float): Use real_2expN. ! * config/ia64/ia64.md (divsi3, udivsi3): Likewise. ! * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New. ! (FLOAT_WORDS_BIG_ENDIAN): New. ! * cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE ! directly to REAL_VALUE_NEGATIVE. ! * loop.c (canonicalize_condition): Likewise. ! * simplify-rtx.c: Include tree.h. ! (simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX ! with floating-point result modes. ! * toplev.c (backend_init): Call init_real_once. ! * fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE. ! * tree.c (build_real): Likewise. ! * config/alpha/alpha.c, config/vax/vax.c (float_strings, ! float_values, inited_float_values, check_float_value): Remove. ! * config/alpha/alpha.h, config/m68hc11/m68hc11.h, ! config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove. ! * doc/tm.texi (CHECK_FLOAT_VALUE): Remove. ! (VAX_HALFWORD_ORDER): Remove. ! 2002-09-16 Ulrich Weigand ! * config/s390/s390.c: (legitimize_la_operand): Remove, replace by ... ! (s390_load_address): ... this new function. ! (s390_decompose_address): Allow the argument pointer and all ! virtual registers as 'pointer' registers. ! (s390_expand_plus_operand): Use s390_load_address. ! config/s390/s390.md (movti, movdi, movdf splitters): Likewise. ! ("force_la_31"): New insn pattern. ! config/s390/s390-protos.h (legitimize_la_operand): Remove. ! (s390_load_address): Add prototype. ! * config/s390/s390.c: Include "optabs.h". ! (s390_expand_movstr, s390_expand_clrstr, s390_expand_cmpstr): New. ! config/s390/s390-protos.h (s390_expand_movstr, s390_expand_clrstr, ! s390_expand_cmpstr): Add prototypes. ! config/s390/s390.md ("movstrdi", "movstrsi"): Call s390_expand_movstr. ! ("movstrdi_short"): Rename to "movstr_short_64". Change predicates ! for operands 0 and 1 to "memory_operand". Add type attribute. ! ("movstrsi_short"): Rename to "movstr_short_31". Change predicates ! for operands 0 and 1 to "memory_operand". Add type attribute. ! ("movstrdi_long", "movstrsi_long"): Remove. ! ("movstrdi_64"): Rename to "movstr_long_64". Add type attribute. ! ("movstrsi_31"): Rename to "movstr_long_31". Add type attribute. ! ("clrstrdi", "clrstrsi"): Call s390_expand_clrstr. ! ("clrstrsico"): Remove, replace by ... ! ("clrstr_short_64", "clrstr_short_31"): ... these new patterns. ! ("clrstrsi_64"): Rename to "clrstr_long_64". ! ("clrstrsi_31"): Rename to "clrstr_long_31". ! ("cmpstrdi", "cmpstrsi"): Call s390_expand_cmpstr. ! ("cmpstr_const"): Remove, replace by ... ! ("cmpstr_short_64", "cmpstr_short_31"): ... these new patterns. ! ("cmpstr_64"): Rename to "cmpstr_long_64". ! ("cmpstr_31"): Rename to "cmpstr_long_31". ! 2002-09-16 Kazu Hirata ! * ABOUT-NLS: Follow spelling conventions. ! * ChangeLog: Likewise. ! * ChangeLog.1: Likewise. ! * ChangeLog.2: Likewise. ! * ChangeLog.3: Likewise. ! * ChangeLog.4: Likewise. ! * ChangeLog.5: Likewise. ! * ChangeLog.6: Likewise. ! * FSFChangeLog.10: Likewise. ! * FSFChangeLog.11: Likewise. ! * c-common.c: Likewise. ! * c-lex.c: Likewise. ! * c-objc-common.c: Likewise. ! * cppexp.c: Likewise. ! * cppinit.c: Likewise. ! * cpplex.c: Likewise. ! * doloop.c: Likewise. ! * flow.c: Likewise. ! * function.c: Likewise. ! * integrate.c: Likewise. ! * loop.c: Likewise. ! * reg-stack.c: Likewise. ! * reload.h: Likewise. ! * ssa.c: Likewise. ! 2002-09-15 Kazu Hirata ! * ChangeLog: Follow spelling conventions. ! * ChangeLog.0: Likewise. ! * ChangeLog.1: Likewise. ! * ChangeLog.2: Likewise. ! * ChangeLog.4: Likewise. ! * ChangeLog.6: Likewise. ! * config.gcc: Likewise. ! * dwarfout.c: Likewise. ! * reload1.c: Likewise. ! * simplify-rtx.c: Likewise. ! * unwind-sjlj.c: Likewise. ! * config/avr/avr.h: Likewise. ! * config/d30v/d30v.h: Likewise. ! * config/frv/frv.c: Likewise. ! * config/frv/frv.h: Likewise. ! * config/ip2k/ip2k.h: Likewise. ! * config/m88k/m88k-move.sh: Likewise. ! * config/stormy16/stormy16.c: Likewise. ! * config/stormy16/stormy16.h: Likewise. ! * doc/extend.texi: Likewise. ! * doc/interface.texi: Likewise. ! * doc/invoke.texi: Likewise. ! * doc/md.texi: Likewise. ! * doc/rtl.texi: Likewise. ! * doc/tm.texi: Likewise. ! * doc/trouble.texi: Likewise. ! * ginclude/float.h: Likewise. ! * treelang/treelang.texi: Likewise. ! 2002-09-15 Kaveh R. Ghazi ! * i386-protos.h (i386_pe_dllexport_name_p, ! i386_pe_dllimport_name_p, i386_pe_unique_section, ! i386_pe_declare_function_type, i386_pe_record_external_function, ! i386_pe_record_exported_symbol, i386_pe_asm_file_end): Add ! prototype. ! * i386/t-cygwin (winnt.o): Depend on $(TM_P_H). ! * i386/t-interix (winnt.o): Likewise. ! * v850-protos.h (v850_output_addr_const_extra): Prototype. ! 2002-09-15 Jason Thorpe ! * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Add ! MIPS ABI CPP macros. ! (TARGET_CPU_CPP_BUILTINS): Redefine. ! (SUBTARGET_EXTRA_SPECS): Remove subtarget_endian_default. ! (SUBTARGET_ENDIAN_DEFAULT_SPEC): Remove. ! 2002-09-15 Kaveh R. Ghazi ! * ia64/aix.h (TARGET_OS_CPP_BUILTINS): Fix typo. ! 2002-09-15 Kazu Hirata ! * ChangeLog: Follow spelling conventions. ! * ChangeLog.0: Likewise. ! * ChangeLog.1: Likewise. ! * ChangeLog.2: Likewise. ! * ChangeLog.3: Likewise. ! * ChangeLog.4: Likewise. ! * ChangeLog.5: Likewise. ! * ChangeLog.6: Likewise. ! * FSFChangeLog.10: Likewise. ! * FSFChangeLog.11: Likewise. ! * c-common.c: Likewise. ! * c-common.h: Likewise. ! * c-format.c: Likewise. ! * c-opts.c: Likewise. ! * cpplib.c: Likewise. ! * langhooks.h: Likewise. ! * real.c: Likewise. ! * reg-stack.c: Likewise. ! * toplev.c: Likewise. ! * config/arm/arm.c: Likewise. ! * config/arm/arm.md: Likewise. ! * config/arm/linux-gas.h: Likewise. ! * config/arm/netbsd.h: Likewise. ! * config/c4x/c4x.c: Likewise. ! * config/c4x/c4x.h: Likewise. ! * config/c4x/c4x.md: Likewise. ! * config/c4x/libgcc.S: Likewise. ! * config/fr30/fr30.md: Likewise. ! * config/frv/frv.md: Likewise. ! * config/ia64/ia64.md: Likewise. ! * config/mips/mips.h: Likewise. ! * config/mn10300/mn10300.c: Likewise. ! * config/stormy16/stormy16.c: Likewise. ! * config/v850/v850.md: Likewise. ! * doc/extend.texi: Likewise. ! * doc/invoke.texi: Likewise. ! * doc/md.texi: Likewise. ! 2002-09-15 Jason Thorpe ! * config/netbsd.h (LIB_SPEC): Include the appropriate pthread ! library if -pthread is specified. ! 2002-09-15 Jason Thorpe ! * config.gcc (*-*-netbsd*): Set thread_file to 'posix' ! for --enable-threads=yes and --enable-threads=posix. ! 2002-09-15 Kazu Hirata ! * config/sparc/cypress.md: Replace Sparc with SPARC. ! * config/sparc/freebsd.h: Likewise. ! * config/sparc/gmon-sol2.c: Likewise. ! * config/sparc/hypersparc.md: Likewise. ! * config/sparc/lb1spc.asm: Likewise. ! * config/sparc/lb1spl.asm: Likewise. ! * config/sparc/linux.h: Likewise. ! * config/sparc/linux64.h: Likewise. ! * config/sparc/lynx.h: Likewise. ! * config/sparc/sol2.h: Likewise. ! * config/sparc/sparc-modes.def: Likewise. ! * config/sparc/sparc.c: Likewise. ! * config/sparc/sparc.h: Likewise. ! * config/sparc/sparc.md: Likewise. ! * config/sparc/sparclet.md: Likewise. ! * config/sparc/supersparc.md: Likewise. ! * config/sparc/sysv4.h: Likewise. ! * config/sparc/vxsim.h: Likewise. ! * config/sparc/vxsparc64.h: Likewise. ! 2002-09-14 Marek Michalkiewicz ! * config/avr/avr.c (output.h): Move after inclusion of tree.h. ! 2002-09-14 Kazu Hirata ! * ChangeLog: Follow spelling conventions. ! * ChangeLog.0: Likewise. ! * ChangeLog.2: Likewise. ! * ChangeLog.3: Likewise. ! * ChangeLog.4: Likewise. ! * ChangeLog.5: Likewise. ! * ChangeLog.6: Likewise. ! * cppfiles.c: Likewise. ! * cppinit.c: Likewise. ! * cpplib.h: Likewise. ! * cse.c: Likewise. ! * debug.h: Likewise. ! * df.c: Likewise. ! * dominance.c: Likewise. ! * hashtable.c: Likewise. ! * hashtable.h: Likewise. ! * loop.c: Likewise. ! * config/arm/README-interworking: Likewise. ! * config/arm/arm.c: Likewise. ! * config/arm/arm.h: Likewise. ! * config/arm/arm.md: Likewise. ! * config/dsp16xx/dsp16xx.h: Likewise. ! * config/frv/frv.c: Likewise. ! * config/frv/frv.h: Likewise. ! * config/ip2k/ip2k.h: Likewise. ! * config/rs6000/rs6000.c: Likewise. ! * config/stormy16/stormy-abi: Likewise. ! * config/stormy16/stormy16.h: Likewise. ! * config/v850/v850.c: Likewise. ! 2002-09-14 Kazu Hirata ! * loop.c: Fix a comment typo. ! 2002-09-14 Kazu Hirata ! * config/fr30/fr30.h: Fix comment typos. ! * config/frv/frv.c: Likewise. ! * config/i386/xmmintrin.h: Likewise. ! * config/mips/mips.c: Likewise. ! * config/sh/sh.c: Likewise. ! 2002-09-14 Kazu Hirata ! * haifa-sched.c: Follow spelling conventions. ! * regclass.c: Likewise. ! * regrename.c: Likewise. ! * config/fp-bit.c: Likewise. ! * config/frv/frv.h: Likewise. ! * config/m88k/m88k.c: Likewise. ! * config/mcore/mcore.c: Likewise. ! * config/rs6000/darwin.h: Likewise. ! * config/rs6000/gnu.h: Likewise. ! * config/rs6000/linux.h: Likewise. ! * config/rs6000/linux64.h: Likewise. ! * config/rs6000/rs6000.c: Likewise. ! * config/rs6000/rs6000.h: Likewise. ! * config/sh/sh.c: Likewise. ! * config/sparc/sparc.c: Likewise. ! * config/sparc/ultra1_2.md: Likewise. ! 2002-09-14 Stephane Carrez ! * config/m68hc11/m68hc11.md ("movdi_internal"): Allow any offsetable ! memory operand when source is 0 (K constraint). ! ("movsi_internal"): Likewise. ! ("movdf_internal"): Likewise. ! ("movsf_internal"): Likewise. ! 2002-09-14 Alan Modra ! * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Use ! targetm.binds_local_p to set SYMBOL_REF_FLAG. ! (rs6000_xcoff_encode_section_info): Likewise. ! * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise. ! 2002-09-10 Theodore A. Roth ! * gcc/config/avr/avr.h: Set default options for C++ for avr. ! 2002-09-13 Richard Henderson ! * Makefile.in (toplev.o): Depend on real.h. ! (print-rtl.o, varasm.o, ifcvt.o): Likewise. ! 2002-09-14 Alan Modra ! * doc/tm.texi (DBX_OUTPUT_NFUN): Describe. ! * dbxout.c (dbxout_function_end): Use DBX_OUTPUT_NFUN. ! * config/rs6000/linux64.h (DBX_OUTPUT_NFUN): Define. ! 2002-09-13 Nathan Sidwell ! * ggc-common.c (ggc_mark_roots): Don't iterate NULL hash tables. ! 2002-09-13 Steve Ellcey ! * config.gcc (ia64*-*-aix*, ia64*-*-elf*, ia64*-*-freebsd*, ! ia64*-*-linux*): Set extra_parts. ! * config/ia64/t-aix (EXTRA_PARTS): Remove. ! * config/ia64/t-ia64 (EXTRA_PARTS): Remove. ! 2002-09-13 Kazu Hirata ! * config/h8300/fixunssfsi.c: Replace H8/S with H8S. ! * config/h8300/h8300.c: Likewise. ! * config/h8300/h8300.h: Likewise. ! * config/h8300/h8300.md: Likewise. ! * doc/invoke.texi: Likewise. ! 2002-09-13 Kazu Hirata ! * config/h8300/h8300.c (h8300_init_once): Fix formatting. ! 2002-09-13 Richard Henderson ! * config/alpha/alpha.md (attr type): Add callpal. ! (imb, trap, load_tp, set_tp): Use it. ! * config/alpha/ev4.md (ev4_callpal): New. ! * config/alpha/ev5.md (ev5_callpal): New. ! * config/alpha/ev6.md (ev6_ibr): Handle callpal. ! * config/alpha/alpha.c (alphaev4_insn_pipe): Handle TYPE_CALLPAL. ! (alphaev5_insn_pipe): Likewise. ! 2002-09-13 Andreas Jaeger ! * Makefile.in (print-rtl.o): Depend on CONFIG_H. ! 2002-09-13 Steve Ellcey ! * config/ia64/t-hpux (LIBGCC1_TEST, STMP_FIXPROTO, ! LIB2ADDEH): New, set to NULL. ! (SHLIB_EXT, SHLIB_LINK, SHLIB_INSTALL, SHLIB_MKMAP): New. ! 2002-09-13 Steve Ellcey ! * config/ia64/quadlib.c (_U_Qfcmp): Make extern. ! (_U_Qfcnvfxt_quad_to_sgl): Remove declaration. ! (_U_Qfeq, _U_Qfne, _U_Qfgt, _U_Qfge, U_Qflt, U_Qfle, _U_Qfcomp): ! Add declarations. ! (_U_Qfneg): Remove. ! 2002-09-13 Dhananjay Deshpande ! * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Add support ! for H8/300, H8S aa:8 mode. ! (TINY_CONSTANT_ADDRESS_P): Add support for H8S aa:16 mode. ! * config/h8300/h8300.c (h8300_adjust_insn_length): Adjust length ! for H8/300 aa:8 mode. ! 2002-09-13 Hartmut Penner ! * config/s390/s390.md ("trap", "conditional_trap", "*trap"): New ! insns. ! 2002-09-12 Richard Henderson ! * Makefile.in (HOST_PRINT): Use print-rtl1.o ! (print-rtl.o): Don't define GENERATOR_FILE. ! (print-rtl1.o): Rename from $(BUILD_PREFIX_1)print-rtl.o. ! * print-rtl.c (print_rtx): Include CONST_DOUBLE fp decimal output ! unless GENERATOR_FILE. ! 2002-09-12 Stan Shebs ! * config/darwin.h (USER_LABEL_PREFIX): Define here... ! * config/i386/darwin.h: ... instead of here. ! * target.h (struct gcc_target): New field ! terminate_dw2_eh_frame_info. ! * target-def.h (TARGET_TERMINATE_DW2_EH_FRAME_INFO): Define. ! (TARGET_INITIALIZER): Add it. ! * dwarf2out.c (output_call_frame_info): Use target hook. ! * dwarf2asm.c (dw2_asm_output_delta): Use macro ! ASM_OUTPUT_DWARF_DELTA if defined. ! * doc/tm.texi (TARGET_TERMINATE_DW2_EH_FRAME_INFO): Document. ! (ASM_OUTPUT_DWARF_DELTA): Ditto. ! (ASM_OUTPUT_DWARF_OFFSET): Ditto. ! (ASM_OUTPUT_DWARF_PCREL): Ditto. ! * config.gcc (i[34567]86-*-darwin*): Define extra_parts. ! (powerpc-*-darwin*): Ditto. ! * crtstuff.c [OBJECT_FORMAT_MACHO]: Update the Mach-O bits ! to work correctly for Darwin. ! * config/darwin.h (OBJECT_FORMAT_MACHO): Define. ! (STARTFILE_SPEC): Add crtbegin.o. ! (ENDFILE_SPEC): Define. ! (EXTRA_SECTION_FUNCTIONS): Put gcc_except_tab in data segment. ! (ASM_PREFERRED_EH_DATA_FORMAT): Handle more cases. ! (ASM_OUTPUT_DWARF_DELTA): Define. ! (TARGET_TERMINATE_DW2_EH_FRAME_INFO): Define. ! * config/darwin.c (darwin_asm_output_dwarf_delta): New function. ! 2002-09-13 Alan Modra ! * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Remove "if" ! nesting. Correct test for non-PowerPC64 ELF ABI_AIX. ! * config/rs6000/rs6000.md (load_toc_v4_PIC*): Disable when ABI_AIX. ! 2002-09-12 Zack Weinberg ! * toplev.c: Move default definition of USER_LABEL_PREFIX... ! * defaults.h: ... here. ! 2002-09-12 Richard Henderson ! * vax.c: Include tree.h earlier. ! 2002-09-12 Stan Shebs ! * config/darwin.c (machopic_finish): Remove #if 0 chunks. ! (machopic_operand_p): Ditto. ! 2002-09-12 Kazu Hirata ! * config/arm/arm.c (arm_compute_initial_elimination_offset): ! Fix a comment typo. ! 2002-09-12 Kazu Hirata ! * toplev.c (do_abort): Fix a comment typo. ! 2002-09-12 Kazu Hirata ! * cselib.c: Fix comment formatting. ! * gengtype.c: Likewise. ! 2002-09-12 Kazu Hirata ! * config/h8300/h8300.md (udivmodqi4): Do not use an expander. ! (udivmodhi4): Likewise. ! 2002-09-12 Graham Stott ! Roger Sayle ! * i386.c (any_fp_register_operand, fp_register_operand, ! register_and_not_any_fp_reg_operand, register_and_not_fp_reg_operand): ! New predicate functions. ! * i386-protos.h: Add their prototypes. ! * i386.h: Add them to PREDICATE_CODES. ! * i386.md ("*pushsf_rex64"+2, "*pushsf_rex64"+3, "*pushdf_integer"+1, ! "*pushdf_integer"+2, "*pushtf_integer"+1, "*pushtf_integer"+2, ! "*pushtf_integer"+3, "*pushtf_integer"+4, "*dummy_extendsfdf2"+1, ! "*dummy_extendsfdf2"+2, "*dummy_extendsfxf2"+1, ! "*dummy_extendsftf2"+1, "*dummy_extendsftf2"+2, ! "*dummy_extenddfxf2"+1, "*dummy_extenddftf2"+1, ! "*dummy_extenddftf2"+2, "*negsf2_if"+1, "*negsf2_if"+2, ! "*negdf2_if_rex64"+1, "*negdf2_if_rex64"+2, "*negxf2_if"+1, ! "*negxf2_if"+2, "*negtf2_if"+1, "*negtf2_if"+2, "*abssf2_if"+1, ! "*abssf2_if"+2, "*absdf2_if_rex64"+1, "*absdf2_if_rex64"+2, ! "*absxf2_if"+1, "*absxf2_if"+2, "*abstf2_if"+1, "*abstf2_if"+2): ! Use these new predicates to simplify and correct the use of ! FP_REG_P, ANY_FP_REG_P, FP_REGNO_P and any ANY_FP_REGNO_P. ! 2002-09-12 Jason Merrill ! * diagnostic.c (output_add_identifier): New fn. ! * diagnostic.h: Declare it. ! * calls.c (store_one_arg): Use size_in_bytes to determine the ! amount of space to push. ! 2002-09-12 Jakub Jelinek ! * config/sparc/linux64.h (STARTFILE_SPEC32): Fix a typo. ! 2002-09-12 Ulrich Weigand ! * config/s390/s390-modes.def (CCAPmode, CCANmode): New CC modes. ! * config/s390/s390.c (s390_match_ccmode_set): Support new CC modes. ! (s390_select_ccmode): Likewise. ! (s390_branch_condition_mask): Likewise. ! (optimization_options): Do not set flag_branch_on_count. ! (s390_split_branches): Handle doloop branches. ! (s390_chunkify_pool): Likewise. ! * config/s390/s390.md ("*adddi3_imm_cc", "*addsi3_imm_cc"): New insns. ! ("doloop_end"): New expander. ! ("doolop_si", "*doloop_si_long", "doloop_di", "*doloop_di_long", ! associated splitters): New. ! 2002-09-11 Hartmut Penner ! * fold-const.c (make_range): Only narrow to signed range if ! the signed range is smaller than the unsigned range. ! 2002-09-12 Alan Modra ! * emit-rtl.c (set_mem_size): New function. ! * expr.h (set_mem_size): Declare. ! * config/rs6000/rs6000.c (expand_block_move_mem): Exterminate. ! (expand_block_move): Instead, use adjust_address and ! replace_equiv_address to generate proper aliasing info. ! Move common code out of conditionals. Localize vars. ! 2002-09-11 Eric Botcazou ! * optabs.c (expand_binop): Minor cleanup. ! (expand_twoval_binop): Convert CONST_INTs like in expand_binop. ! 2002-09-11 Dan Nicolaescu ! * print-tree.c (print_node): Print the restrict qualifier. ! 2002-09-11 Janis Johnson ! * doc/install.texi: Fix typos. ! 2002-09-11 Zack Weinberg ! * Makefile.in: Remove all references to s-under and underscore.c. ! * collect2.c, tlink.c: Change all uses of prepends_underscore ! to look directly at USER_LABEL_PREFIX. ! 2002-09-11 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Append ! alignment to csect. ! (rs6000_xcoff_unique_section): Only set section name for public ! data. ! (rs6000_xcoff_section_type_flags): Store log2 alignment in flags. ! * config/rs6000/xcoff.h (TARGET_ASM_SELECT_SECTION): Remove ! duplicate definition. ! 2002-09-10 John David Anglin ! * pa.md (extzv): Check predicates before emitting extzv_32. ! (insv): Likewise. ! 2002-09-10 Ulrich Weigand ! * config/s390/s390.h (MOVE_MAX): Define to correct value. ! (MAX_MOVE_MAX): Define. ! (MOVE_BY_PIECES_P): Define. ! (CLEAR_BY_PIECES_P): Define. ! 2002-09-10 Denis Chertykov ! * config/avr/avr.md (movstrhi): Use right operands for conversion. ! 2002-09-10 Richard Earnshaw ! PR c/7873 ! * arm.md (insv): Use reg_or_int_operand for operand[3]. ! 2002-09-10 David Edelsohn ! * rs6000.c (rs6000_assemble_visibility): Protect declaration ! inside macro. Correct function definition typo. ! (rs6000_xcoff_section_type_flags): New function. ! (TARGET_SECTION_TYPE_FLAGS): Remove definition. ! (rs6000_elf_section_type_flags): Call default_section_type_flags_1 ! with appropriate PIC test. ! (rs6000_xcoff_select_section): Use decl_readonly_section_1 to ! determine readonly. ! (rs6000_binds_local_p): Combine PIC flags. ! * sysv4.h (TARGET_SECTION_TYPE_FLAGS): Define. ! * xcoff.h (TARGET_SECTION_TYPE_FLAGS): Define. ! 2002-09-09 Per Bothner ! * print-tree.c (print_node): In a STRING_CST, escape non-ascii ! characters, and only print TREE_STRING_LENGTH chars. ! 2002-09-09 Steve Ellcey ! * config/ia64/hpux.h (TARGET_HPUX_LD): New, define true. ! (ASM_FILE_END) New. ! * config/ia64/ia64.h (TARGET_HPUX_LD): New, define false. ! * config/ia64/ia64-protos.h (ia64_hpux_asm_file_end): New. ! * config/ia64/ia64.c (ia64_asm_output_external): Create list ! of external functions if TARGET_HPUX_LD is true. ! (ia64_hpux_add_extern_decl): New, routine to put names on ! list of external functions. ! (ia64_hpux_asm_file_end): Put out declarations for external ! functions if and only if they are used. ! 2002-09-09 John David Anglin ! * pa.md (exception_receiver, builtin_setjmp_receiver): Add blockage ! on TARGET_64BIT before pic register restore. ! 2002-09-09 David Edelsohn ! * doc/tm.texi (TARGET_HAVE_SRODATA_SECTION): New description. ! (TARGET_HAVE_TLS): New description. ! 2002-09-09 Janis Johnson ! * doc/extend.texi (Statement Exprs): Fix broken link. ! 2002-09-09 Denis Chertykov ! * config/avr/avr.md (movstrhi, clrstrhi): Use gen_int_mode for ! right conversion of operands[1]. ! 2002-09-09 Ulrich Weigand ! * config/s390/s390.md ("*tmdi_reg", "*tmsi_reg"): Do not mark as ! commutative. Use "nonimmediate_operand" instead of "register_operand" ! as predicate for operand 0. Move to after the "*tmXX_mem" insns. ! ("*tmdi_mem", "*tmsi_mem", "*tmhi_mem", "*tmqi_mem"): Do not mark ! as commutative. ! ("*anddi3_ni", "*andsi3_ni", "*iordi3_ni", "*iorsi3_ni"): Do not ! mark as commutative. Use "nonimmediate_operand" instead of ! "register_operand" as predicate for operand 1. ! ("movstrictsi"): Fix typo in insn name. ! 2002-09-09 Jan Hubicka ! * i386.c (index_register_operand): New. ! * i386.h (predicate_codes): Add new predicate. ! * i386.md (lea_general_*): Use index_register_operand ! (ashift to lea splitter): Do not produce invalid leas ! (ashift to mov+ashift split): New. ! 2002-09-09 Nick Clifton ! * config/fr30/fr30.c (output.h): Move after inclusion of tree.h. ! Fix folding marks. ! 2002-09-09 Toshiyasu Morita ! J"orn Rennecke ! * sh/sh.h (OVERRIDE_OPTIONS): align_functions is in bytes, not bits. ! 2002-09-09 Alan Modra ! * config/rs6000/rs6000.c (rs6000_binds_local_p): Return bool. ! (function_ok_for_sibcall): Use binds_local_p. Respect longcall ! attributes. ! 2002-09-08 Kaveh R. Ghazi ! * fr30.c (fr30_print_operand): Fix bug in output of CONST_DOUBLE. ! 2002-09-08 Richard Henderson ! * dwarf2.h (DW_OP_call_ref): Rename from DW_OP_calli. ! (DW_OP_GNU_push_tls_address): New. ! (DW_OP_lo_user): Fix. ! * dwarf2out.c (INTERNAL_DW_OP_tls_addr): New. ! (dwarf_stack_op_name): Handle it, plus other dwarf3 opcodes. ! (size_of_loc_descr): Likewise. ! (output_loc_operands): Handle INTERNAL_DW_OP_tls_addr. ! (add_AT_location_description): Take a dw_loc_descr_ref not an rtx. ! (loc_descriptor_from_tree): Handle TLS variables. ! (rtl_for_decl_location): Do avoid_constant_pool_reference here ... ! (add_location_or_const_value_attribute): ... not here. Defer ! to loc_descriptor_from_tree for TLS variables. ! * config/i386/i386.h (ASM_OUTPUT_DWARF_DTPREL): New. ! * config/i386/i386.c (i386_output_dwarf_dtprel): New. ! * config/i386/i386-protos.h: Update. ! 2002-09-08 Roger Sayle ! PR optimization/6405 ! * unroll.c (loop_iterations): last_loop_insn should be the previous ! non-note instruction before loop->end. ! * loop.c (strength_reduce): The conditional jump is the last ! non-note instruction before loop->end (as above). ! 2002-09-08 Roger Sayle ! * combine.c (try_combine): Handle the case that undobuf.other_insn ! has been turned into a return or unconditional jump, by inserting ! a BARRIER if necessary. ! (simplify_set): Test if a condition code setter has a constant ! comparison at compile time, if so convert this insn to a no-op move ! and update/simplify the condition code user (undobuf.other_insn). ! 2002-09-08 Krister Walfridsson ! * config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Redefine. ! (CLEAR_INSN_CACHE): Define. ! 2002-09-08 Kazu Hirata ! * basic-block.h: Fix comment formatting. ! * c-common.c: Likewise. ! * c-common.h: Likewise. ! * c-lex.c: Likewise. ! * c-pretty-print.c: Likewise. ! * cfglayout.c: Likewise. ! * cfgloop.c: Likewise. ! * defaults.h: Likewise. ! * et-forest.c: Likewise. ! * explow.c: Likewise. ! * function.h: Likewise. ! * gcov.c: Likewise. ! * genattrtab.c: Likewise. ! * gengtype.c: Likewise. ! * ifcvt.c: Likewise. ! * libgcc2.c: Likewise. ! * loop.c: Likewise. ! * profile.c: Likewise. ! * ra-build.c: Likewise. ! * real.c: Likewise. ! * rtl.h: Likewise. ! * tracer.c: Likewise. ! * tree-inline.c: Likewise. ! * varasm.c: Likewise. ! 2002-09-08 Jan Hubicka ! * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref ! handling. ! * loop.c (loop_givs_reduce): Emit addition after. ! 2002-09-08 Alan Modra ! * varasm.c (default_assemble_visibility): Rename from ! assemble_visibility. ! * output.h: Here too. ! * target-def.h (TARGET_ASM_ASSEMBLE_VISIBILITY): And here. ! * config/rs6000/rs6000.c (rs6000_assemble_visibility): And here. ! 2002-09-08 Alan Modra ! * reload.c (find_reloads

    ): Pass operand_mode to ! find_reloads_address. ! 2002-09-08 Kazu Hirata ! * config/h8300/h8300.md (udivmodqi4): Enable on H8/300. ! (anonymous pattern): Likewise. ! 2002-09-07 Scott Snyder ! PR target/7374 ! * config/alpha/alpha.md (abstf2): Fix typo: 'neg' for 'abs'. ! 2002-09-07 Roger Sayle ! * basic-block.h (struct loop): Remove unused cont_dominator field. ! 2002-09-07 Igor Shevlyakov ! * varasm.c (decode_rtx_const): Don't check undefined field for ! CONST_VECTOR. ! 2002-09-07 Glen Nakamura ! PR opt/7814 ! * sched-deps.c (sched_analyze_insn): Make sure to add insn ! to reg_last->sets after flushing the dependency lists to guarantee ! that subsequent clobbers will be dependent on it. ! 2002-09-07 Igor Shevlyakov ! * combine.c (simplify_shift_const): Calculate rotate count ! correctly for vector operands. ! 2002-09-07 Ansgar Esztermann ! * c-typeck.c (c_tree_expr_nonnegative_p): New function. ! (build_binary_op): Call c_tree_expr_nonnegative_p rather than ! tree_expr_nonnegative_p. ! (build_conditional_expr): Likewise. ! * c-tree.h (c_tree_expr_nonnegative_p): Declare. ! 2002-09-07 Richard Henderson ! * builtins.def (inf, inff, infl): Mark const. ! (huge_val, huge_valf, huge_vall): Likewise. ! (BUILT_IN_GETEXP, BUILT_IN_GETMAN): Remove. ! * real.c (ereal_inf): Clear E before use. ! 2002-09-07 Kazu Hirata ! * config/h8300/h8300.md (udivmodqi4): Split the pattern into ! an expander and an anonymous pattern. Zero out the upper half ! of the dividend in the expander. ! (udivmodqi4): Likewise. ! 2002-09-07 Kazu Hirata ! * config/h8300/h8300.c: Fix formatting. ! * config/h8300/h8300.h: Likewise. ! * config/h8300/h8300.md: Likewise. ! 2002-09-07 Zdenek Dvorak ! * cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness ! information. ! 2002-09-07 Graham Stott ! * rtlanal.c (dead_or_set_regno_p): Fix typo. ! 2002-09-07 Alan Modra ! * config/rs6000/linux64.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. ! * doc/tm.texi (TARGET_ASM_ASSEMBLE_VISIBILITY): Describe. ! * target-def.h (TARGET_ASM_ASSEMBLE_VISIBILITY): Define. ! (TARGET_ASM_OUT): Add the above here. ! * target.h (struct gcc_target): Add "visibility" field. ! * varasm.c (maybe_assemble_visibility): Call targetm visibility func. ! * config/rs6000/rs6000.c (rs6000_assemble_visibility): New function. ! (TARGET_ASM_ASSEMBLE_VISIBILITY): Define. ! (rs6000_legitimize_reload_address, first_reg_to_save): Formatting. ! 2002-09-06 Ziemowit Laski ! * c-lang.c (objc_is_id): New stub. ! * c-tree.h (objc_is_id): New forward declaration. ! * c-typeck.c (build_c_cast): Do not strip protocol ! qualifiers from 'id' type. ! * objc/objc-act.c (objc_comptypes): Correct handling ! of protocol qualifiers. ! (objc_is_id): New. ! 2002-09-06 Jeffrey A Law (law@redhat.com) ! * pentium.md (pentium-firstvboth): Fix typo. ! 2002-09-06 Dhananjay Deshpande ! * h8300.c (enum shift_alg): Move to earlier in h8300.c. ! (enum shift_type, enum h8_cpu): Likewise. ! (INL, ROT, LOP, SPC macros): Likewise. ! (shift_alg_qi, shift_alg_hi, shift_alg_si): Likewise. Lose ! const designator. ! (h8300_init_once): Update shift_alg_{qi,hi,si} to use more ! space efficient algorithms when optimize for codesize. ! 2002-09-06 Nicola Pero ! Fix PR/1727 and long-standing failing testcase ! objc/formal-protocol-6.m. ! * objc-act.c (build_protocol_expr): If compiling for the GNU ! runtime, create a list of Protocol statically allocated instances ! if it doesn't exist, then add the Protocol object to this same ! list. ! (get_objc_string_decl): Fixed typo/bug - TREE_VALUE had been used ! instead of TREE_CHAIN. ! 2002-09-06 Nicola Pero ! * objc/objc-act.c (dump_interface): Enlarged the char * buffer to ! 10k. Fixed category dumping - print out category names with the ! proper syntax. Print '@end\n' and not '\n@end' at the end of the ! interface. ! (finish_objc): Fixed the -gen-decls option. It was printing out ! only the last class. Dump an interface declaration of all classes ! being compiled instead. ! 2002-09-06 Jason Thorpe ! * config/arm/arm-protos.h (arm_gen_return_addr_mask): New ! prototype. ! * config/arm/arm.c (arm_gen_return_addr_mask): New function. ! * config/arm/arm.h (MASK_RETURN_ADDR): Use arm_gen_return_addr_mask ! if not APCS26 and not Thumb or ARMv4-or-higher. Use gen_int_mode ! rather than GEN_INT. ! * config/arm/arm.md (UNSPEC_CHECK_ARCH): Define. ! (return_addr_mask, *check_arch2): New. ! 2002-09-06 Ulrich Weigand ! * config/s390/s390.md ("*adddi3_cc", "*adddi3_cconly", ! "*adddi3_cconly2", "*adddi3_64", "*adddi3_31", "adddi3", ! "*addsi3_carry1_cc", "*addsi3_carry1_cconly", ! "*addsi3_carry2_cc", "*addsi3_carry2_cconly", ! "*addsi3_cc", "*addsi3_cconly", "*addsi3_cconly2", "addsi3", ! "adddf3", "*adddf3", "*adddf3_ibm", ! "addsf3", "*addsf3", "*addsf3_ibm", ! "muldi3", "mulsi3", "mulsidi3", ! "muldf3", "*muldf3", "*muldf3_ibm", ! "mulsf3", "*mulsf3", "*mulsf3_ibm", ! "*anddi3_cc", "*anddi3_cconly", "anddi3", ! "*andsi3_cc", "*andsi3_cconly", "andsi3", ! "*iordi3_cc", "*iordi3_cconly", "iordi3", ! "*iorsi3_cc", "*iorsi3_cconly", "iorsi3", ! "*xordi3_cc", "*xordi3_cconly", "xordi3", ! "*xorsi3_cc", "*xorsi3_cconly", "xorsi3"): Use "nonimmediate_operand" ! instead of "register_operand" as predicate for "%0" operand. ! 2002-09-06 Jakub Jelinek ! * configure.in (HAVE_AS_OFFSETABLE_LO10): Use -xarch=v9 ! unconditionally when gcc_cv_as_flags64 checks are gone. ! * configure: Rebuilt. ! 2002-09-06 Alan Modra ! * config/rs6000/rs6000.md (extzvsi_internal2): Revert most of ! 2002-07-26 change. Comment. ! 2002-09-05 Kaveh R. Ghazi ! * frv.c (frv_unique_section, frv_select_section, ! frv_select_rtx_section): Delete. ! (frv_in_small_data_p): New. ! (TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_SECTION, ! TARGET_ASM_SELECT_RTX_SECTION): Delete. ! (TARGET_IN_SMALL_DATA_P): Define. ! 2002-09-05 Dale Johannesen ! * reload1.c (reload): Retain only those memory clobbers ! added for variable-array handling. ! 2002-09-05 Jason Thorpe ! * config/arm/arm.c (arm_return_in_memory): Implement ATPCS ! return-in-memory rules. ! * config/arm/arm.h (ARM_FLAG_ATPCS, TARGET_ATPCS): Define. ! 2002-09-05 David Edelsohn ! * config/rs6000/xcoff.h (HOT_TEXT_SECTION_NAME): Delete. ! (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Delete. ! 2002-09-05 Jason Thorpe ! * real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is ! not a compile-time constant for the non-IBM case. ! * config/arm/arm-protos.h (arm_float_words_big_endian): New ! prototype. ! * config/arm/arm.c (arm_float_words_big_endian): New function. ! * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __VFP_FP__ ! if TARGET_VFP and not TARGET_HARD_FLOAT. ! (ARM_FLAG_VFP, TARGET_VFP): Define. ! (FLOAT_WORDS_BIG_ENDIAN): Use arm_float_words_big_endian. ! 2002-09-05 David Edelsohn ! * doc/install.texi: Correct text of s390-*-linux* and s390x-*-linux* ! URLs. Fix AIX wording. ! 2002-09-05 Stan Shebs ! * config/rs6000/rs6000.c (rs6000_override_options): Make -fpic and ! -fPIC equivalent on Darwin. ! 2002-09-05 J"orn Rennecke ! * sh.c (sh_expand_builtin): Return early if encountering an ! error_mark for a type. ! 2002-09-05 Ulrich Weigand ! * config/s390/s390.c (s390_expand_plus_operand): Do not require ! double-word scratch register. ! config/s390/s390.md ("reload_indi", "reload_insi"): Adapt. ! ("*tmqi_ext", "*tmdi_mem", "*tmsi_mem", "*tmhi_mem", "*tmqi_mem", ! "*cli"): Replace s_operand by memory_operand. ! ("cmpstrdi", "cmpstrsi"): Replace s_operand by general_operand. ! 2002-09-05 Kazu Hirata ! * config/h8300/h8300.c (asm_file_start): Add a missing ! semicolon. ! 2002-09-04 Krister Walfridsson ! * config/i386/i386.h (GOT_SYMBOL_NAME): Define. ! * config/i386/i386.c (output_set_got): Use GOT_SYMBOL_NAME. ! (ix86_output_addr_diff_elt) Likewise. ! (x86_output_mi_thunk) Likewise. ! * config/i386/netbsd.h (GOT_SYMBOL_NAME): Redefine. ! 2002-09-04 Kaveh R. Ghazi ! * frv.c (frv_encode_section_info): Fix error in last change. ! 2002-09-04 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_flag_pic): New variable. ! (rs6000_elf_encode_section_info): ATTRIBUTE_UNUSED. ! (TARGET_BINDS_LOCAL_P): Define. ! (rs6000_override_options): Save original flag_pic value. ! (rs6000_elf_select_section): Call default_elf_select_section_1. ! (rs6000_elf_unique_section): Call default_unique_section_1. ! (rs6000_elf_in_small_data_p): New function. ! (rs6000_xcoff_asm_named_section): Determine storage mapping class. ! (rs6000_xcoff_select_section): Update based on defaults. ! (rs6000_xcoff_unique_section): Set to basic name if not common. ! (rs6000_binds_local_p): New function. ! * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Set ! targetm.have_srodata_section if SDATA_EABI. ! (TARGET_IN_SMALL_DATA_P): Define. ! 2002-09-04 Dale Johannesen ! * varasm.c (struct rtx_const, decode_rtx_const): ! Make veclo and vechi fields not share storage. ! 2002-09-05 J"orn Rennecke ! * loop.c (scan_loop): Don't mark separate insns out of a libcall ! for moving. ! (move_movables): Abort if we see the first insn of a libcall. ! 2002-09-04 Richard Henderson ! * builtin-types.def (BT_FN_FLOAT): New. ! (BT_FN_DOUBLE, BT_FN_LONG_DOUBLE): New. ! * builtins.def (BUILT_IN_INF, BUILT_IN_INFF, BUILT_IN_INFL, ! BUILT_IN_HUGE_VAL, BUILT_IN_HUGE_VALF, BUILT_IN_HUGE_VALL): New. ! * builtins.c (fold_builtin_inf): New. ! (fold_builtin): Call it. ! * real.c (ereal_inf): New. ! * real.h: Declare it. ! * doc/extend.texi: Document new builtins. ! 2002-09-04 Richard Henderson ! * cse.c (cse_insn): Avoid subreg games if the equivalence ! is already in the proper mode. ! 2002-09-04 Eric Botcazou ! PR c/7102 ! * optabs.c (expand_binop): Convert CONST_INTs in all cases. ! 2002-09-04 John David Anglin ! * pa.md (setccfp0, setccfp1): New patterns. ! 2002-09-04 Kaveh R. Ghazi ! * frv-protos.h (frv_init_builtins, frv_expand_builtin, ! frv_select_section, frv_select_rtx_section, ! frv_encode_section_info, frv_unique_section): Delete. ! * frv.c: Update for target hooks. ! * frv.h (STRIP_NAME_ENCODING, SLOW_ZERO_EXTEND, SELECT_SECTION, ! SELECT_RTX_SECTION, ENCODE_SECTION_INFO, UNIQUE_SECTION, ! EASY_DIV_EXPR, MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): Delete. ! 2002-09-04 Kaveh R. Ghazi ! * ip2k-protos.h (function_prologue, function_epilogue, ! encode_section_info): Update to match target hook specification. ! * ip2k.c: Wrap `MDR' code in IP2K_MD_REORG_PASS. ! (function_prologue, function_epilogue, encode_section_info): ! Update to match target hook specification. ! * ip2k.h (SELECT_SECTION, SELECT_RTX_SECTION, ASM_OPEN_PAREN, ! ASM_CLOSE_PAREN, EASY_DIV_EXPR): Delete. ! (NOTICE_UPDATE_CC): Cast to void. ! * ip2k.md: Add defaults in switch statements. ! 2002-09-04 Janis Johnson ! * doc/trouble.texi (Interoperation): Update information about C++ ABI ! issues. ! 2002-09-04 Jason Thorpe ! * config/sparc/t-netbsd64: Disable multilib for now. ! 2002-09-04 David Edelsohn ! * target-def.h (TARGET_HAVE_SRODATA_SECTION): New macro. ! * target.h (gcc_target): Add have_srodata_section member. ! * varasm.c (section_category): Add SECCAT_SRODATA. ! (categorize_decl_for_section): Return SECCAT_SRODATA for sdata if ! READONLY_SDATA_SECTION defined. ! (decl_readonly_section_1): True for SECCAT_SRODATA also. ! (default_elf_select_section_1): Map SECCAT_SRODATA to .sdata2. ! (default_unique_section_1): Likewise. ! 2002-09-04 John David Anglin ! * expr.c (emit_group_load): Revise to allow splitting TCmode source ! into DImode pieces. ! * pa-64.h (LONG_DOUBLE_TYPE_SIZE): Define to 128. ! * pa64-regs.h (CLASS_CANNOT_CHANGE_MODE_P): Inhibit changes from SImode ! for floating-point register class. ! * pa.c (function_arg): Fix handling of modes wider than one word for ! TARGET_64BIT. ! 2002-09-04 J"orn Rennecke ! * combine.c (make_compound_operation): Don't generate zero / sign ! extensions in floating point modes. ! 2002-09-04 Janis Johnson ! * doc/c-tree.texi: Fix overfull hboxes. ! * doc/cppopts.texi: Ditto. ! * doc/extend.texi: Ditto. ! * doc/gty.texi: Ditto. ! * doc/invoke.texi: Ditto. ! * doc/makefile.texi: Ditto. ! * doc/rtl.texi: Ditto. ! * doc/standards.texi: Ditto. ! * doc/tm.texi: Ditto. ! 2002-09-04 Richard Henderson ! * c-common.c (builtin_define_with_hex_fp_value): New. ! (builtin_define_float_constants): Use it. Fix H_FLOAT mant_dig. ! 2002-09-04 Janis Johnson ! * doc/invoke.texi (-fshort-wchar): Move to Code Generation Options. ! (-fpcc-struct-return, -freg-struct-return, -fshort-enums, ! -fshort-double, -fshort-wchar, -fpack-struct, -fleading-underscore): ! Warn that these options can break ABI compatibility. ! 2002-09-04 Richard Henderson ! * real.c (ereal_to_decimal): Add digits parameter. ! * real.h (REAL_VALUE_TO_DECIMAL): Remove format; add digits parameter. ! * c-pretty-print.c (pp_c_real_literal): Update call. ! * print-rtl.c (print_rtx): Likewise. ! * print-tree.c (print_node_brief, print_node): Likewise. ! * sched-vis.c (print_value): Likewise. ! * config/arc/arc.c (arc_print_operand): Likewise. ! * config/c4x/c4x.c (c4x_print_operand): Likewise. ! * config/i370/i370.h (PRINT_OPERAND): Likewise. ! * config/i386/i386.c (print_operand): Likewise. ! * config/i960/i960.c (i960_print_operand): Likewise. ! * config/ip2k/ip2k.c (asm_output_float): Likewise. ! * config/m32r/m32r.c (m32r_print_operand): Likewise. ! * config/m68hc11/m68hc11.c (print_operand): Likewise. ! * config/m68k/hp320.h (PRINT_OPERAND, ASM_OUTPUT_FLOAT_OPERAND, ! ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise. ! * config/m68k/m68k.h (ASM_OUTPUT_FLOAT_OPERAND, ! ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise. ! * config/m68k/sun2o4.h (ASM_OUTPUT_FLOAT_OPERAND, ! ASM_OUTPUT_DOUBLE_OPERAND): Likewise. ! * config/m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND, ! ASM_OUTPUT_DOUBLE_OPERAND): Likewise. ! * config/mips/mips.c (print_operand): Likewise. ! * config/ns32k/ns32k.c (print_operand): Likewise. ! * config/pdp11/pdp11.h (PRINT_OPERAND): Likewise. ! * config/vax/vax.h (PRINT_OPERAND): Likewise. ! * doc/tm.texi (REAL_VALUE_TO_DECIMAL): Update docs. ! 2002-09-04 Bob Wilson ! * config/xtensa/elf.h (TARGET_SECTION_TYPE_FLAGS): Define to ! xtensa_multibss_section_type_flags. ! * config/xtensa/xtensa.c (xtensa_multibss_section_type_flags): Define. ! 2002-09-04 Richard Henderson ! * doc/install-old.texi: Don't mention enquire. ! * doc/sourcebuild.texi: Update float.h description. ! 2002-09-04 J"orn Rennecke ! * sh.md (mperm_w_little, mperm_w_big): Supply mode for zero_extract. ! 2002-09-03 David Edelsohn ! * varasm.c (default_section_type_flags): Append _1 to name with ! shlib parameter. Use original name to call new function with ! implicit flag_pic. ! (decl_readonly_section): Likewise. ! (default_elf_select_section): Likewise. ! (default_unique_section): Likewise. ! (default_bind_local_p): Likewise. ! (categorize_decl_for_section): Add shlib parameter to use in place ! of implicit flag_pic. ! * output.h: Declare new functions with _1 and shlib argument. ! 2002-09-03 Janis Johnson ! * doc/install.texi: Fix typos, formatting problems, and obvious ! overfull/underfull boxes. ! * Makefile.in (TEXI_GCC_FILES): Add compat.texi. ! * doc/gcc.texi (Top): Add new chapter, Binary Compatibility, and ! include its file, compat.texi. ! * doc/compat.texi: New file with new chapter, Binary Compatibility. ! 2002-09-03 Neil Booth ! Debian BTS Bug #157416 ! * cpphash.h (FIRST, LAST, CUR, RLIMIT): Fix definitions. ! * cpplib.c (destringize_and_run): Kludge around getting ! tokens from in-progress macros. ! (_cpp_do__Pragma): Simplify. ! 2002-09-03 Steve Ellcey ! * config/ia64/ia64.h (EXTRA_SPECS): Remove cpp_cpu. ! (CPP_CPU_SPEC): Remove. ! (TARGET_CPU_CPP_BUILTINS): New. ! * config/ia64/hpux.h (CPP_PREDEFINES): Remove. ! (CPP_SPEC): Remove. ! (TARGET_OS_CPP_BUILTINS): New. ! * config/ia64/linux.h (CPP_PREDEFINES): Remove. ! (TARGET_OS_CPP_BUILTINS): New. ! * config/ia64/aix.h (CPP_SPEC): Move some stuff to ! TARGET_OS_CPP_BUILTINS. ! (CPP_PREDEFINES): Remove. ! (CPLUSPLUS_CPP_SPEC): Remove. ! (TARGET_OS_CPP_BUILTINS): New. ! 2002-09-03 Richard Henderson ! * Makefile.in (USER_H): Add ginclude/float.h. ! (FLOAT_H): Remove. ! (stmp-int-hdrs, install-mkheaders): Don't handle FLOAT_H. ! (mostlyclean): Don't remove float.h intermediate files. ! (distclean): Don't remove float.h. ! * config.gcc: Remove all float_format references. ! * configure.in (float_format, float_h_file): Remove. ! * c-common.c: Include tree-inline.h. ! (builtin_define_with_int_value): New. ! (builtin_define_type_precision): Use it. ! (builtin_define_float_constants): New. ! (cb_register_builtins): Use it. Define __FLT_RADIX__ and ! __FLT_EVAL_METHOD__. ! * defaults.h (TARGET_FLT_EVAL_METHOD): New. ! * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): New. ! * config/m68k/m68k.h (TARGET_FLT_EVAL_METHOD): New. ! * doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Mention moto 96-bit format. ! (TARGET_FLT_EVAL_METHOD): New. ! * config/float-c4x.h, config/float-i128.h, config/float-i32.h, ! config/float-i386.h, config/float-i64.h, config/float-m68k.h, ! config/float-sh.h, config/float-sparc.h, config/float-vax.h: Remove. ! * ginclude/float.h: New. ! 2002-09-03 Stan Shebs ! * config/darwin.h (WARN_FOUR_CHAR_CONSTANTS): Remove, never used. ! (DWARF2_DEBUGGING_INFO): Remove until assembler accepts Dwarf-2. ! (PREFERRED_DEBUGGING_TYPE): Ditto. ! (ASM_OUTPUT_IDENT): Remove empty definition. ! 2002-09-03 Steve Ellcey ! * config.gcc (ia64*-*-hpux*): Add ia64-c.o to c_target and ! cxx_target. ! * config/ia64/hpux.h (REGISTER_TARGET_PRAGMAS): Register pragma ! handling routine for builtin pragma. ! * config/ia64/ia64-protos.h (ia64_hpux_handle_builtin_pragma): ! Registered pragma handling routine. ! * ia64-c.c (ia64_hpux_handle_builtin_pragma): Ditto. ! (ia64_hpux_add_pragma_builtin) New subroutine used by above. ! If builtin pragma seen for math routine and C89 conformance is ! requested use different math function in order to set errno. ! * t-ia64 (ia64-c.o): Add new rule for new file. ! 2002-09-03 Ulrich Weigand ! * config/s390/s390.md ("movti"): Add Q->Q alternative. ! ("*movdi_64", "*movdi_31", "*movsi", "movhi", "movqi_64", ! "movqi", "*movdf_64", "*movdf_31", "*movsf"): Likewise. ! ("*movti_ss", "*movdi_ss", "*movsi_ss", "*movdf_ss", ! "*movsf_ss"): Remove. ! 2002-09-03 John David Anglin ! * pa32-regs.h (CLASS_CANNOT_CHANGE_MODE, CLASS_CANNOT_CHANGE_MODE_P): ! Delete macros. ! 2002-09-03 Arati Dikey ! * h8300.c (asm_file_start): Corrected optimization comment. ! 2002-09-03 Stan Shebs ! * c-lang.c (recognize_objc_keyword): Remove, no longer used. ! * c-tree.h (recognize_objc_keyword): Remove decl. ! * c-typeck.c (comp_target_types): Update a comment. ! 2002-09-03 Ulrich Weigand ! * config/s390/s390.c (s390_decompose_address): Remove STRICT parameter ! and register validity checks. ! (general_s_operand): Adapt to s390_decompose_address interface change. ! (q_constraint): Likewise. ! (s390_expand_plus_operand): Likewise. ! (legitimiate_address_p): Likewise. ! (legitimate_la_operand_p): Likewise. ! (legitimize_la_operand): Likewise. ! (print_operand_address): Likewise. ! (print_operand): Likewise. ! 2002-09-03 Nicola Pero ! PR objc/5956: ! * objc/objc-act.c (build_typed_selector_reference): Fix typo which ! was causing the new selector never to match the existing ones ! (Patch by Alexander Malmberg ). ! 2002-09-03 Graham Stott ! * config/i386/i386.md ("femms"): Add "memory" attr "none". ! 2002-09-03 Graham Stott ! * expr.c (expand_expr): Remove extraneous comment and code. ! 2002-08-31 Richard Henderson ! * expr.c (block_move_libcall_safe_for_call_parm): Fix thinko. ! 2002-08-31 John David Anglin ! * pa.c (pa_globalize_label): Add ATTRIBUTE_UNUSED to prototype. ! 2002-08-30 Richard Henderson ! PR opt/7515 ! * c-objc-common.c: Include target.h. ! (c_cannot_inline_tree_fn): Don't auto-inline functions that ! don't bind locally. Factor setting DECL_UNINLINABLE. ! * Makefile.in (c-objc-common.o): Update. ! 2002-08-30 Janis Johnson ! * doc/install.texi (Configuration, Building): Fix a typo and ! some formatting directives. ! 2002-08-30 Paul Koning ! * doc/c-tree.texi (RDIV_EXPR): Fix typo. ! * doc/rtl.texi (post_modify): Remove misplaced text, remove "not ! implemented" note. ! * doc/md.texi (IP2K): Move machine-specific constraints before MIPS ! for alphabetic order. ! * doc/tm.texi (TARGET_FLOAT_FORMAT): Update description for ! VAX_FLOAT_FORMAT. Remove reference to HOST_FLOAT_FORMAT. ! (VAX_HALFWORD_ORDER): Document. ! (LARGEST_EXPONENT_IS_NORMAL): Remove note about being only for ! IEEE float format. ! (TARGET_SCHED_ISSUE_RATE): Reword reference to MAX_DFA_ISSUE_RATE. ! (ASM_OUTPUT_LABEL_REF): Fix font. ! (CASE_VECTOR_SHORTEN_MODE): Ditto. ! 2002-08-30 Denis Chertykov ! * config/ip2k/ip2k.c (ip2k_set_compare): Remove all const_double ! stuff. ! (ip2k_gen_unsigned_comp_branch): Handle CONST_INT and ! CONST_DOUBLE constants. ! 2002-08-30 Jason Thorpe ! * config/alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Move language- ! related defines to... ! (SUBTARGET_LANGUAGE_CPP_BUILTINS): ...here. ! * config/alpha/netbsd.h (SUBTARGET_LANGUAGE_CPP_BUILTINS): Redefine ! as a no-op. ! 2002-08-30 Krister Walfridsson ! * config/arm/arm.c (arm_asm_output_labelref): New function. ! * config/arm/arm.h (ASM_OUTPUT_LABELREF): Call arm_asm_output_labelref. ! * config/arm/arm-protos.h: Add prototype for arm_asm_output_labelref. ! 2002-08-29 Rodney Brown ! * doc/install.texi (Specific, alpha*-dec-osf*): Add "virtual ! memory exhausted" workarounds. ! 2002-08-30 Gabriel Dos Reis ! * diagnostic.c (fancy_abort): Don't repeat "internal error". ! * toplev.c (crash_signal): Likewise. ! 2002-08-30 Nicola Pero ! * doc/cpp.texi (__NEXT_RUNTIME__): Extended documentation. ! * doc/invoke.texi (-fnext-runtime, -Wno-protocol, -Wselector): ! Extended, updated documentation. ! (-Wundeclared-selector): Documented. ! 2002-08-29 Jason Thorpe ! * config/chorus.h: Consistently define *_DEBUGGING_INFO with ! the value 1. Do not undef before defining. ! * config/darwin.h: Likewise. ! * config/dbx.h: Likewise. ! * config/dbxcoff.h: Likewise. ! * config/dbxelf.h: Likewise. ! * config/elfos.h: Likewise. ! * config/interix.h: Likewise. ! * config/lynx-ng.h: Likewise. ! * config/lynx.h: Likewise. ! * config/netware.h: Likewise. ! * config/psos.h: Likewise. ! * config/svr3.h: Likewise. ! * config/alpha/alpha.h: Likewise. ! * config/alpha/elf.h: Likewise. ! * config/alpha/vms.h: Likewise. ! * config/arc/arc.h: Likewise. ! * config/arm/aout.h: Likewise. ! * config/arm/coff.h: Likewise. ! * config/c4x/c4x.h: Likewise. ! * config/h8300/h8300.h: Likewise. ! * config/i386/cygwin.h: Likewise. ! * config/i386/djgpp.h: Likewise. ! * config/i386/gas.h: Likewise. ! * config/i386/gstabs.h: Likewise. ! * config/i386/i386-coff.h: Likewise. ! * config/i386/i386-interix.h: Likewise. ! * config/i386/sco5.h: Likewise. ! * config/i386/svr3dbx.h: Likewise. ! * config/i386/sysv3.h: Likewise. ! * config/i386/win32.h: Likewise. ! * config/i386/x86-64.h: Likewise. ! * config/i960/i960.h: Likewise. ! * config/ia64/ia64.h: Likewise. ! * config/ip2k/ip2k.h: Likewise. ! * config/m32r/m32r.h: Likewise. ! * config/m68k/3b1.h: Likewise. ! * config/m68k/3b1g.h: Likewise. ! * config/m68k/ccur-GAS.h: Likewise. ! * config/m68k/coff.h: Likewise. ! * config/m68k/hp2bsd.h: Likewise. ! * config/m68k/hp310g.h: Likewise. ! * config/m68k/hp320g.h: Likewise. ! * config/m68k/hp3bsd.h: Likewise. ! * config/m68k/hp3bsd44.h: Likewise. ! * config/m68k/linux-aout.h: Likewise. ! * config/m68k/m68k-aout.h: Likewise. ! * config/m68k/mot3300.h: Likewise. ! * config/m68k/netbsd.h: Likewise. ! * config/m68k/openbsd.h: Likewise. ! * config/m68k/pbb.h: Likewise. ! * config/m68k/plexus.h: Likewise. ! * config/m68k/sun2.h: Likewise. ! * config/m68k/sun3.h: Likewise. ! * config/m68k/tower-as.h: Likewise. ! * config/m68k/vxm68k.h: Likewise. ! * config/m88k/aout-dbx.h: Likewise. ! * config/m88k/m88k-aout.h: Likewise. ! * config/mcore/mcore-elf.h: Likewise. ! * config/mcore/mcore-pe.h: Likewise. ! * config/mips/elf.h: Likewise. ! * config/mips/elf64.h: Likewise. ! * config/mips/iris5gas.h: Likewise. ! * config/mips/iris6.h: Likewise. ! * config/mips/mips.h: Likewise. ! * config/mips/sni-gas.h: Likewise. ! * config/mmix/mmix.h: Likewise. ! * config/ns32k/netbsd.h: Likewise. ! * config/pa/pa64-hpux.h: Likewise. ! * config/romp/romp.h: Likewise. ! * config/rs6000/sysv4.h: Likewise. ! * config/rs6000/xcoff.h: Likewise. ! * config/sh/coff.h: Likewise. ! * config/sh/elf.h: Likewise. ! * config/sparc/linux64.h: Likewise. ! * config/sparc/liteelf.h: Likewise. ! * config/sparc/netbsd.h: Likewise. ! * config/sparc/openbsd.h: Likewise. ! * config/sparc/pbd.h: Likewise. ! * config/sparc/sp64-elf.h: Likewise. ! * config/sparc/sp86x-elf.h: Likewise. ! * config/sparc/sparc.h: Likewise. ! * config/vax/vax.h: Likewise. ! * config/vax/vaxv.h: Likewise. ! 2002-08-29 "Dhananjay R. Deshpande" ! * h8300.c (shift_alg_hi): Various tweaks to improve performance ! of HImode shifts. ! (get_shift_alg): Corresponding changes. ! 2002-08-29 John David Anglin ! * som.h (ALWAYS_STRIP_DOTDOT): Define to 1. ! 2002-08-29 Richard Henderson ! * expr.h (enum block_op_methods): New. ! (emit_block_move): Update prototype. ! * expr.c (block_move_libcall_safe_for_call_parm): New. ! (emit_block_move_via_loop): New. ! (emit_block_move): Use them. New argument METHOD. ! (emit_push_insn): Always respect the given alignment. ! (expand_assignment): Update call to emit_block_move. ! (store_expr, store_field, expand_expr): Likewise. ! * builtins.c (expand_builtin_apply): Likewise. ! (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. ! * function.c (expand_function_end): Likewise. ! * config/sh/sh.c (sh_initialize_trampoline): Likewise. ! * config/sparc/sparc.c (sparc_va_arg): Likewise. ! * calls.c (expand_call, emit_library_call_value_1): Likewise. ! (save_fixed_argument_area): Use emit_block_move with ! BLOCK_OP_CALL_PARM instead of move_by_pieces. ! (restore_fixed_argument_area): Likewise. ! (store_one_arg): Fix alignment parameter to emit_push_insn. ! 2002-08-29 John David Anglin ! * install.texi (hppa64-hp-hpux11*): Document installation procedure. ! 2002-08-29 Catherine Moore ! * config/v850/v850.h (MULDI3_LIBCALL, UCMPDI2_LIBCALL, CMPDI2_LIBCALL, ! NEGDI2_LIBCALL, INIT_TARGET_OPTABS, MASK_STRICT_ALIGN): Define. ! (PREDICATE_CODES): Include new predicates. ! (RTX_COSTS): Handle UMOD and UDIV. Tune MULT for v850e. ! (TARGET_SWITCHES): Add strict-align. ! (TARGET_STRICT_ALIGN): New. ! (MASK_DEFAULT, STRICT_ALIGNMENT): Redefine. ! * config/v850/t-v850 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): ! Define. ! (LIB1ASMFUNCS): Add v850_negdi2, v850_cmpdi2, v850_ucmpdi2, ! v850_muldi3. ! * config/v850/lib1funcs.asm (L_callt_save_r2_r29, L_return_r2_r29, ! L_callt_save_r2_r31, L_return_r2_r31, ! L_save_all_interrupt): Change addi to add. ! (L_save_interrupt, L_return_interrupt): Rework. ! (__return_r31): Correct .size directive. ! (mulsi3, divsi3, udivsi3, umodsi3, modsi3): Tune for v850e. ! (v850_negdi2, v850_cmpdi2, v850_ucmpdi2, v850_muldi3): ! New routines. ! * config/v850/v850.c (expand_prologue): Call ! gen_callt_save_interrupt, gen_callt_restore_all_interrupt, ! gen_callt_return_interrupt and gen_callt_save_all_interrupt. ! (reg_or_int9_operand): New predicate. ! (reg_or_const_operand): New routine. ! * config/v850/v850.md (return_interrupt): Changed from ! restore_interrupt. ! (callt_save_all_interrupt): Changed from save_all_interrupt_v850e. ! (callt_save_interrupt): Change save sequence. ! (callt_return_interrupt): New. ! (save_interrupt): Don't use runtime function for LONG_CALLS ! and TARGET_PROLOG_FUNCTION. ! (save_all_interrupt): Likewise. ! (mulsi3): Use new predicate. ! (moviscc): Disallow some combination of constants. ! Fix define_split for sasf insns, so that it will not generate bad ! code if operand0 and operand5 are the same. ! * config/v850/v850-protos.h: Prototype new predicates. ! 2002-08-28 Gabriel Dos Reis ! * c-common.c (builtin_define_type_precision): New function. ! (cb_register_builtins): Use it. Define __WCHAR_UNSIGNED__ is ! wchar_t is unsigned in C++. ! * doc/cpp.texi (Common Predefined Macros): Document ! __WCHAR_UNSIGNED__, __CHAR_BIT__, __WCHAR_BIT__, __SHRT_BIT__, ! __INT_BIT__, __LONG_BIT__, __LONG_LONG_BIT__, __FLOAT_BIT__, ! __DOUBLE_BIT__, __LONG_DOUBLE_BIT__. ! 2002-08-28 Sylvain Pion ! * doc/invoke.texi (-Wreorder): Remove remaining pieces from the generic ! section. Mention that it is enabled by -Wall. ! (-Wall): Mention that there can be language-specific warnings as well. ! (-Wctor-dtor-privacy): Mention that it is enabled by default. ! (-Wnon-virtual-dtor): Mention that it is enabled by -Wall. ! 2002-08-28 J"orn Rennecke ! * sh.c (calc_live_regs): Save FPSCR_REG in an interrupt handler ! if it is ever live. ! * sh.c (sh_handle_interrupt_handler_attribute): Reject interrupt_handler ! attribute for SHCOMPACT. ! * sh.h (OVERRIDE_OPTIONS): If align_function isn't set, set it ! appropriately. ! (FUNCTION_BOUNDARY): Specify only the minimum alignment required ! by the ABI. ! * sh.h (SH5_WOULD_BE_PARTIAL_NREGS): Also handle TImode case. ! 2002-08-28 Jason Thorpe ! * config.gcc (mips*-*-netbsd*): Set target_cpu_default to ! "MASK_GAS|MASK_ABICALLS". ! * config/mips/netbsd.h (TARGET_ENDIAN_DEFAULT) ! (TARGET_DEFAULT): Remove. ! (MACHINE_TYPE): Undefine before defining. ! (DBX_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE): Remove. ! 2002-08-27 Mark Mitchell ! * c-common.c (warn_abi): New variable. ! * c-common.h (warn_abi): Likewise. ! * c-opts.c (COMMAND_LINE_OPTIONS): Add -Wabi. ! (c_common_decode_option): Handle it. ! * doc/invoke.texi: Document -Wabi. ! 2002-08-27 Nicola Pero ! * c-common.c (warn_undeclared_selector): New variable. ! * c-common.h (warn_undeclared_selector): Idem. ! * c-opts.c (c_common_decode_option): Set warn_undeclared_selector ! to on when -Wundeclared-selector is found. ! (COMMAND_LINE_OPTIONS): Added -Wundeclared-selector. ! * objc/objc-act.c (build_selector_expr): If ! warn_undeclared_selector is set, check that the selector has ! already been defined, and emit a warning if not. ! 2002-08-27 Nick Clifton ! Catherine Moore ! Jim Wilson ! * config.gcc: Add v850e-*-* target. ! Add --with-cpu= support for v850. ! * config/v850/lib1funcs.asm: Add v850e callt functions. ! * config/v850/v850.h: Add support for v850e target. ! * config/v850/v850.c: Add functions to support v850e target. ! * config/v850/v850-protos.h: Add prototypes for new functions in v850.c. ! * config/v850/v850.md: Add patterns for v850e instructions. ! * doc/invoke.texi: Document new v850e command line switches. ! 2002-08-27 J"orn Rennecke ! Aldy Hernandez ! * doc/tm.texi: Applied numerous fixes to the automaton based ! scheduler descrition. ! 2002-08-27 Jan Hubicka ! * i386.c (classify_argument): Handle variable sized objects. ! 2002-08-27 Jan Hubicka ! * i386.c (ix86_expand_int_movcc): Fix RTL sharing problem ! 2002-08-27 Jan Hubicka ! * libgcc2.c (__bb_exit_func): Properly write the summarized statistics. ! 2002-08-27 Jan Hubicka ! * i386.c (classify_argument): Properly compute word size of the analyzed object. ! 2002-08-27 J"orn Rennecke ! * sh.md (attribute type): Add types mt_group, fload, pcfload, fpul_gp, ! mac_gp ftrc_s and cwb. Add / Adjust definitions in individual insn ! accordingly. ! (attribute insn_class): Provide default definitions based on type. ! Remove all insn-specific settings. ! (various function units): Remove old SH4 scheduling. ! (branch_zero, dfp_comp, late_fp_use, any_fp_comp, any_int_load): ! New attributes. Set them where appropriate. ! (cpu unit FS): Don't define / use. ! (F3, load_store): New cpu units. ! (F01): New reservation. ! (all insn_reservations): Make dependent on sh4 pipeline model. ! Fix latencies. ! (nil, reg_mov, freg_mov, sh4_fpul_gp, sh4_call): New insn_reservations. ! (sh4_mac_gp, fp_arith_ftrc, arith3, arith3b): Likewise. ! (mt insn_reservation): Use type mt_group. ! (insn_reservation load_store): Split into sh4_load, sh4_load_si, ! sh4_fload and sh4_store. ! (insn_reservation branch_zero and branch): Replace with sh4_branch. ! (insn_reservation branch_far): Replace with sh4_return. ! (insn_reservation return_from_exp): Rename to: ! (sh4_return_from_exp). Change to be just d_lock*5. ! (insn_reservation lds_to_pr): Rename to: ! (sh4_lds_to_pr). Change to be just d_lock*2. ! (insn_reservation ldsmem_to_pr, sts_from_pr): Change to be just ! d_lock*2. ! (insn_reservation prload_mem): Rename to: ! (sh4_prstore_mem). Change to d_lock*2,nothing,memory. ! (insn_reservation fpscr_store): Rename to: ! (fpscr_load). Change to d_lock,nothing,F1*3. ! (insn_reservation fpscr_store_mem): Rename to: ! (fpscr_load_mem). Change to d_lock,nothing,(F1+memory),F1*2. ! (insn_reservation multi): Change to ! d_lock,(d_lock+f1_1),(f1_1|f1_2)*3,F2. ! (insn_reservation fp_arith): Change to issue,F01,F2. ! (insn_reservation fp_div: Change to issue,F01+F3,F2+F3,F3*7,F1+F3,F2. ! (insn_reservation dp_float): Change to issue,F01,F1+F2,F2. ! (insn_reservation fp_double_arith): Change to issue,F01,F1+F2,fpu*4,F2. ! (insn_reservation fp_double_cmp): Change to ! d_lock,(d_lock+F01),F1+F2,F2. ! (insn_reservation dp_div): Change to ! issue,F01+F3,F1+F2+F3,F2+F3,F3*16,F1+F3,(fpu+F3)*2,F2. ! * sh.c (flow_dependent_p, flow_dependent_p_1): New functions. ! (sh_adjust_cost, SHcompact): Differentiate between different ! kinds of dependencies. Drop factor of ten for superscalar. ! Use new instruction types. Add new exception rules. ! * sh.md (mulhisi3, umulhisi3: Add a REG_EQUAL note. ! * sh.md (mperm_w): Add DONE. ! 2002-08-27 David Edelsohn ! * longlong.h: Import current PowerPC defintion from GMP-4.1. ! * config/rs6000/rs6000.h (MIN_UNITS_PER_WORD): Add IN_LIBGCC2 case. ! * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define. ! 2002-08-27 J"orn Rennecke ! * sh.h (MAX_FIXED_MODE_SIZE): Define. + 2002-08-27 Gabriel Dos Reis ! * doc/cpp.texi (Common Predefined Macros): Don't mess with table ! delimiter. ! 2002-08-27 Gabriel Dos Reis ! * c-common.c (cpp_define_data_format): New function. ! (cb_register_builtins): Call it. ! * doc/cpp.texi (Common Predefined Macros): Document ! __TARGET_BITS_ORDER__, __TARGET_BYTES_ORDER__, ! __TARGET_INT_WORDS_ORDER__, __TARGET_FLOAT_WORDS_ORDER__, ! __TARGET_FLOAT_FORMAT__, __TARGET_USES_VAX_F_FLOAT__, ! __TARGET_USES_VAX_D_FLOAT__, __TARGET_USES_VAX_G_FLOAT__, ! __TARGET_USES_VAX_H_FLOAT__. ! 2002-08-26 Ziemowit Laski ! * objc/objc-act.c (get_super_receiver): If inside a class method ! of a category, cast the receiver to 'id' before accessing the 'isa' ! field so that is not needed. For NeXT runtime. ! 2002-08-26 Ulrich Weigand ! * config/s390/s390-protos.h (s390_function_prologue, ! s390_function_epilogue): Remove. ! config/s390/s390.c (s390_function_prologue, s390_function_epilogue, ! TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE): Remove. ! config/s390/s390.c (s390_machine_dependent_recorg): New function. ! config/s390/s390-protos.h (s390_machine_dependent_reorg): Declare it. ! config/s390/s390.h (MACHINE_DEPENDENT_REORG): Call it. ! config/s390/s390.c (s390_split_branches, s390_chunkify_pool): Adapt ! to being called from MACHINE_DEPENDENT_REORG. Update regs_ever_live. ! config/s390/s390.c (s390_frame_info): Inline save_fprs_p. Always ! assume BASE_REGISTER and RETURN_REGNUM need to be saved. ! (s390_emit_prologue): Assume RETURN_REGNUM to be saved iff ! function is not a leaf function. Use save_gprs and restore_gprs. ! (s390_emit_epilogue): Likewise. ! (save_gprs, restore_gprs): New functions. ! (struct s390_frame): Remove return_reg_saved_p member. ! (save_fprs_p): Remove. ! (s390_optimize_prolog): New function. ! (s390_legitimate_reload_constant): Remove now unnecessary check. ! (s390_function_count): Remove. ! (s390_output_symbolic_const): Replace s390_function_count by ! current_function_funcdef_no. ! (s390_output_constant_pool): Likewise. ! (legitimize_pic_address): Use regs_ever_live to track PIC register ! instead of current_function_uses_pic_offset_table. ! (s390_emit_prologue): Likewise. ! config/s390/s390.md ("call", "call_value"): Likewise. ! 2002-08-26 Neil Booth ! * c-opts.c (find_opt): Don't complain about wrong languages ! here. Return exact matches even for wrong language. ! (c_common_decode_option): Complain about wrong languages ! here. ! 2002-08-24 Stuart Hastings ! * function.h (struct function): Add flag ! all_throwers_are_sibcalls. ! * except.c (set_nothrow_function_flags): Replaces ! nothrow_function_p. Set new flag. ! * except.h (set_nothrow_function_flags): Replaces ! nothrow_function_p. ! * dwarf2out.c (struct dw_fde_struct): Add flag ! all_throwers_are_sibcalls. ! (output_call_frame_info): Test it. ! (dwarf2out_begin_prologue) Propagate it from cfun to ! dw_fde_struct. ! * toplev.c (rest_of_compilation): Update calls to ! nothrow_function_p. ! 2002-08-23 Zack Weinberg ! * ggc-page.c (compute_inverse): Short circuit calculation for ! object sizes larger than half a page. ! 2002-08-23 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_elf_select_section): Treat ! DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly ! default. ! (rs6000_elf_unique_section): Likewise. ! 2002-08-23 Kaveh R. Ghazi ! * ns32k.c (ns32k_globalize_label): Delete. ! * ns32k.h (ASM_OUTPUT_LABEL, TARGET_ASM_GLOBALIZE_LABEL): Delete. ! 2002-08-23 Alan Modra ! * config/rs6000/rs6000.c (output_mi_thunk): Don't determine insns ! for loading delta with num_insns_constant_wide. Calculate ! delta_low, delta_high without using a conditional. ! 2002-08-22 Jason Merrill ! * c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR. ! * c-common.def: Adjust. ! * c-dump.c (c_dump_tree): Adjust. ! * c-semantics.c (genrtl_return_stmt): Adjust. ! * c-pretty-print.c (pp_c_statement): Adjust. ! * tree-inline.c (copy_body_r): Adjust. ! 2002-08-22 Zack Weinberg ! * ggc-page.c: Avoid division in ggc_set_mark. ! (DIV_MULT, DIV_SHIFT, OFFSET_TO_BIT, inverse_table, ! compute_inverse): New. ! (ggc_set_mark, ggc_marked_p): Use OFFSET_TO_BIT. ! (init_ggc): Initialize inverse_table. ! 2002-08-22 Tom Tromey ! * doc/install.texi (Configuration): Document --datadir. ! 2002-08-22 Alexandre Oliva ! * Makefile.in ($(BUILD_PREFIX_1)varray.o): Depend on $(GGC_H). ! 2002-08-22 Hans-Peter Nilsson ! * gengtype-lex.l (ID): Allow underscore as first character. ! 2002-08-21 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_xcoff_asm_globalize_label): New ! function. ! (rs6000_xcoff_asm_named_section): Rename. ! * config/rs6000/xcoff.h (TARGET_ASM_GLOBALIZE_LABEL): Define. ! 2002-08-21 Tom Tromey ! For PR java/6005 and PR java/7611: ! * fold-const.c (fold_truthop): Use can_use_bit_fields_p. ! (fold): Likewise. ! * langhooks.c (lhd_can_use_bit_fields_p): New function. ! * langhooks-def.h (lhd_can_use_bit_fields_p): Declare. ! (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): New define. ! (LANG_HOOKS_INITIALIZER): Use it. ! * langhooks.h (struct lang_hooks) [can_use_bit_fields_p]: New ! field. ! 2002-08-21 Stan Shebs ! * tree.c (finish_vector_type): Fix a typo in a comment. ! * Makefile.in: Fix "the the" stutters in comments. ! * genautomata.c: Ditto. ! * ifcvt.c: Ditto. ! * regrename.c: Ditto. ! * config/alpha/alpha.c: Ditto. ! * config/alpha/vms-crt0-64.c: Ditto. ! * config/alpha/vms-crt0.c: Ditto. ! * config/alpha/vms-psxcrt0-64.c: Ditto. ! * config/alpha/vms-psxcrt0.c: Ditto. ! * config/d30v/d30v.h: Ditto. ! * config/fr30/fr30.h: Ditto. ! * config/rs6000/rs6000.c: Ditto. ! * config/stormy16/stormy16.h: Ditto. ! * doc/md.texi: Ditto. ! 2002-08-21 John David Anglin ! * cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value. ! 2002-08-21 Joseph S. Myers ! * c-decl.c (grokdeclarator): Make invalid combinations with long, ! short, signed or unsigned into hard errors. Fixes PR c/4319. ! Also make duplicate modifiers such as "short short" into hard ! errors. ! 2002-08-21 Andrew Pinski ! Kaveh R. Ghazi ! * doc/tm.texi (TARGET_ASM_GLOBALIZE_LABEL): Move '@end deftypefn' ! to the actual end. Add '@end table' and '@table @code'. ! 2002-08-20 Geoffrey Keating ! * doc/tm.texi (Label Output): Add missing '@end deftypefn'. ! * unroll.c (biv_total_increment): Don't try to compute the total ! increment for FP BIVs. ! 2002-08-20 Kaveh R. Ghazi ! * alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk. ! * alpha/elf.h (ASM_OUTPUT_EXTERNAL_LIBCALL, ! ASM_OUTPUT_ALIGNED_BSS): Use target hook. ! * alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS): Likewise. ! * alpha/unicosmk.h (ASM_GLOBALIZE_LABEL): Delete. ! * arm/aof.h (ASM_GLOBALIZE_LABEL): Likewise. ! (GLOBAL_ASM_OP): Define. ! * arm.c (aof_globalize_label): New function. ! (TARGET_ASM_GLOBALIZE_LABEL): Define for AOF. ! * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. ! * c4x.c (c4x_globalize_label): New function. ! (TARGET_ASM_GLOBALIZE_LABEL): Define for c4x. ! * c4x.h (ASM_GLOBALIZE_LABEL): Delete. ! (GLOBAL_ASM_OP): Define. ! * cris/aout.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. ! * darwin-protos.h (darwin_globalize_label): Declare. ! * darwin.c (darwin_globalize_label): New function. ! * darwin.h (ASM_DECLARE_CLASS_REFERENCE): Use target hook. ! (ASM_GLOBALIZE_LABEL): Delete. ! (GLOBAL_ASM_OP, TARGET_ASM_GLOBALIZE_LABEL): Define. ! * dsp16xx.c (asm_output_common): Use target hook. ! * elfos.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. ! * frv.h (ASM_GLOBALIZE_LABEL): Delete. ! (GLOBAL_ASM_OP): Define. ! * i370.c (i370_globalize_label): New function. ! (TARGET_ASM_GLOBALIZE_LABEL): Define for i370. ! * i370.h (ASM_GLOBALIZE_LABEL): Delete. ! * i386.c (ix86_asm_file_end): Use target hook. ! * i386/sco5.h (ASM_GLOBALIZE_LABEL): Don't undef. ! (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. ! * ia64.c (ia64_asm_output_external): Likewise. ! * ia64/sysv4.h: Update comment. ! * m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. ! * mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. ! * mips/iris5.h (ASM_OUTPUT_WEAK_ALIAS): Use target hook. ! * mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. ! * mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use target hook. ! * mmix-protos.h (mmix_asm_globalize_label): Delete. ! * mmix.c (mmix_asm_globalize_label): Likewise. ! * mmix.h (ASM_GLOBALIZE_LABEL): Likewise. ! (GLOBAL_ASM_OP): Define. ! * ns32k.c (ns32k_globalize_label): New function. ! * ns32k.h (TARGET_ASM_GLOBALIZE_LABEL): Define for ns32k. ! (ASM_GLOBALIZE_LABEL): Delete. ! * pa/pa-linux.h (ASM_GLOBALIZE_LABEL): Don't undef. ! (TARGET_ASM_GLOBALIZE_LABEL): Undefine. ! * pa.c (pa_globalize_label): New function. ! * pa.h (ASM_GLOBALIZE_LABEL): Delete. ! (TARGET_ASM_GLOBALIZE_LABEL): Define for pa. ! * rs6000/darwin.h (ASM_GLOBALIZE_LABEL): Delete. ! (GLOBAL_ASM_OP): Define. ! (TARGET_ASM_GLOBALIZE_LABEL): Undef. ! * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. ! * rs6000/xcoff.h (ASM_GLOBALIZE_LABEL): Delete. ! (GLOBAL_ASM_OP): Define. ! * v850.c (v850_output_aligned_bss): Use target hook. ! * vax.c (vms_globalize_label): New function. ! (TARGET_ASM_GLOBALIZE_LABEL): Define for vms. ! * vax/vms.h (ASM_GLOBALIZE_LABEL): Delete. ! (GLOBAL_ASM_OP): Define. ! * defaults.h (ASM_GLOBALIZE_LABEL): Delete. ! * doc/tm.texi: Update docs. ! * dwarf2out.c (default_eh_frame_section, output_die_symbol): Use ! target hook. ! * final.c (output_alternate_entry_point): Likewise. ! * hooks.c (hook_FILEptr_constcharptr_void): New function. ! * hooks.h (hook_FILEptr_constcharptr_void): Declare. ! * output.h (assemble_global): Delete. ! (default_globalize_label): Declare. ! * system.h (ASM_GLOBALIZE_LABEL): Poison. ! * target-def.h (TARGET_ASM_GLOBALIZE_LABEL): Define. ! (TARGET_ASM_OUT): Add TARGET_ASM_GLOBALIZE_LABEL. ! * target.h (gcc_target): Add globalize_label member. ! * varasm.c (asm_output_bss, asm_output_aligned_bss, ! globalize_decl): Use target hook. ! (assemble_global): Delete. ! (default_globalize_label): New function. ! 2002-08-20 Kaveh R. Ghazi ! * dsp16xx.h (dsp16xx_umulhi3_libcall): Delete. ! 2002-08-20 Devang Patel ! * tree.c (get_qualified_type): Add TYPE_CONTEXT check. ! 2002-08-20 Kaveh R. Ghazi ! * arc.c (output_shift): Use stdio instead of asm_fprintf. ! * arm.c (thumb_output_function_prologue): Likewise. ! * avr.c (print_operand): Likewise. ! * c4x.c (c4x_print_operand): Likewise. ! * c4x.h (ASM_OUTPUT_INTERNAL_LABEL, TRAMPOLINE_TEMPLATE, ! ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Likewise. ! * cris.c (cris_target_asm_function_prologue, ! cris_asm_output_mi_thunk): Likewise. ! * h8300.c (print_operand): Likewise. ! * h8300.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. ! * ip2k.c (print_operand): Likewise. Fix format specifier. ! * m68hc11.c (asm_print_register, print_operand, ! print_operand_address): Use stdio instead of asm_fprintf. ! (print_operand_address): Fix format specifier. ! * m68hc11.h (FUNCTION_PROFILER, ASM_OUTPUT_ADDR_DIFF_ELT, ! ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ALIGN): Use stdio instead of ! asm_fprintf. ! * m68k/amix.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. ! * m68k/atari.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. ! * m68k.c (m68k_output_function_prologue, ! m68k_output_function_epilogue, print_operand): Likewise. ! * mmix.c (mmix_asm_output_mi_thunk, mmix_asm_weaken_label): ! Likewise. Fix format specifier. ! * mn10200.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. ! * mn10300.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. ! * v850.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. ! 2002-08-15 Eric Christopher ! Jeff Knaggs ! * config.gcc (mipsisa64sr71k-elf): New target. ! * config/mips/sr71k.md: New file. ! * config/mips/mips.md: Use it. ! (rot*): Add sr71k specifics. ! * config/mips/t-sr71k: New file. ! * config/mips/mips.h (sr71k): New cpu. ! (TARGET_SR71K): Use it. ! (TUNE_SR71K): Ditto. ! (GENERATE_BRANCHLIKELY): Ditto. ! (ISA_HAS_MULHI, ISA_HAS_MULS, ISA_HAS_MSAC, ISA_HAS_MACC, ! ISA_HAS_ROTR_SIISA_HAS_ROTR_DI): Ditto. ! * config/mips/mips.c (sr71k): New cpu. ! (mips_use_dfa_pipeline_interface): Use. ! 2002-08-15 Eric Christopher ! Richard Sandiford ! Aldy Hernandez ! Graham Stott ! Michael Meissner ! Gavin Romig-Koch ! Ken Raeburn ! Alexandre Oliva ! * config.gcc (mips64vr-elf): New target. ! * config/mips/5400.md: New file. ! * config/mips/5500.md: Ditto. ! * config/mips/mips.md: Use them. ! (frsqrt): New. ! * config/mips/mips.c (vr4111, vr4121, vr4320, vr5400, vr5500): New ! cpus. ! (mips_issue_rate): Use them. ! (mips_use_dfa_pipeline_interface): New function. Use for 5400 and 5500. ! (TARGET_SCHEDUSE_DFA_PIPELINE_INTERFACE): Define. Use above. ! * config/mips/mips.h (vr4111, vr4121, vr4320, vr5400, vr5500): New ! cpus. ! (TARGET_MIPSx): Use them. ! (TUNE_MIPSx): Ditto. ! (GETNATE_MULT3_SI): Ditto. ! (ISA_HAS_BRANCHLIKELY): Ditto. ! (ISA_HAS_CONDMOVE): Ditto. ! (ISA_HAS_NMADD_NMSUB): Ditto. ! (ISA_HAS_MULHI): New. Ditto. ! (ISA_HAS_MULS): Ditto. ! (ISA_HAS_MSAC): Ditto. ! (ISA_HAS_MACC): Ditto. ! (ISA_HAS_ROTR_SI): Ditto. ! (ISA_HAS_ROTR_DI): Ditto. ! (RTX_COSTS): Use. ! 2002-08-20 John David Anglin ! * cppinit.c (remove_dup_dir): Add head_ptr argument to handle removal ! at head. ! (remove_dup_nonsys_dirs): New function. ! (remove_dup_dirs): Change argument head to head_ptr. Remove warnings. ! (merge_include_chains): Remove non-system include directories from ! quote and bracket include chains when they duplicate equivalent system ! directories. ! * doc/cpp.texi (-I): Update. ! * doc/cppopts.texi (-I): Update. ! * doc/install.texi (--with-local-prefix): Further document usage of ! this option. ! * doc/invoke.texi (-I): Update. ! 2002-08-20 Richard Henderson ! * expr.c (TARGET_MEM_FUNCTIONS): Transform to boolean. ! (emit_block_move): Split out subroutines. ! (emit_block_move_via_movstr): New. ! (emit_block_move_via_libcall): New. Emit bcopy via normal call also. ! (emit_block_move_libcall_fn): New. Construct function prototype for ! bcopy as well. ! (clear_storage): Split out subroutines. ! (clear_storage_via_clrstr): New. ! (clear_storage_via_libcall): New. Emit bzero as a normal call also. ! (clear_storage_libcall_fn): New. Construct function prototype for ! bzero as well. ! (emit_push_insn): Use emit_block_move. ! (expand_assignment): Booleanize TARGET_MEM_FUNCTIONS. ! (store_constructor): Likewise. ! 2002-08-19 Ziemowit Laski ! * objc/objc-act.c (building_objc_message_expr): Rename to ! current_objc_message_selector. ! 2002-08-19 Ziemowit Laski ! * objc/objc-act.c (build_ivar_chain): Remove. ! (objc_copy_list): Likewise. ! (get_class_ivars): Inline call to removed build_ivar_chain ! function. Save off a clean copy of ivars in the CLASS_OWN_IVARS ! slot; use that slot (rather than CLASS_IVARS) when accessing ! ivars for base classes. Call copy_list and chainon instead of ! objc_copy_list. ! (build_private_template): Call get_class_ivars instead of ! build_ivar_chain. ! (start_class): Allocate room for the CLASS_OWN_IVARS slot. ! (continue_class): Call get_class_ivars instead of ! build_ivar_chain. ! (encode_field_decl): Check for DECL_BIT_FIELD_TYPE instead ! of DECL_BIT_FIELD (which may have been cleared). ! * objc/objc-act.h (CLASS_OWN_IVARS): New accessor macro. ! 2002-08-19 Kaveh R. Ghazi ! * genautomata.c (output_translate_vect, output_state_ainsn_table, ! output_min_issue_delay_table): Mark variable with ATTRIBUTE_UNUSED ! in output file. ! (output_internal_min_issue_delay_func): Initialize variable in ! output file. ! 2002-08-19 Alexandre Oliva ! * Makefile.in (GCC_FOR_TARGET): Prepend STAGE_CC_WRAPPER. ! (stage2_build, stage3_build, stage4_build): Likewise, to CC. ! 2002-08-19 Geoffrey Keating ! Steve Ellcey ! * machmode.h (SCALAR_INT_MODE_P): New macro to test for ! scaler integer mode (MODE_INT or MODE_PARTIAL_INT). ! * explow.c (trunc_int_for_mode): Abort when the mode is not ! a scaler integer mode. ! * combine.c (expand_compound_operation): Don't expand Vector ! or Complex modes into shifts. ! (expand_field_assignment): Don't do bitwise arithmatic and ! shifts on Vector or Complex modes. ! (simplify_comparison): Don't call trunc_int_for_mode ! for VOIDmode. ! * recog.c (general_operand): Likewise. ! (immediate_operand): Likewise. ! (nonmemory_operand): Likewise. ! 2002-08-19 David Edelsohn ! * config/rs6000/rs6000.c (rs6000_emit_set_const): Inline ! multi-instruction SImode constant. Add REG_EQUAL note. ! * config/rs6000/rs6000.md (movsi splitter): Use ! rs6000_emit_set_const. ! 2002-08-19 Kaveh R. Ghazi ! * tree-inline.c (initialize_inlined_parameters): Wrap variable in ! the macro test controlling its use. ! 2002-08-18 H.J. Lu (hjl@gnu.org) ! * config.gcc (*-*-linux*): Set extra_parts="crtbegin.o ! crtbeginS.o crtbeginT.o crtend.o crtendS.o", gas=yes and ! gnu_ld=yes. ! (alpha*-*-linux*, cris-*-linux*, i370-*-linux*, ! i[34567]86-*-linux*, x86_64-*-linux*, mips*-*-linux*, ! s390-*-linux*, s390x-*-linux*, sparc-*-linux*, sparc64-*-linux*, ! xtensa-*-linux*): Remove setting extra_parts, gas, and gnu_ld ! here. ! (cris-*-linux*): Remove setting thread_file here. ! 2002-08-18 Neil Booth ! PR preprocessor/7602 ! * cppinit.c (path_include): Treat the system environment ! variables as being cxx_aware. ! 2002-08-17 Joseph S. Myers ! * c-decl.c (flexible_array_type_p): New function. ! (grokdeclarator, finish_struct): Use it. ! * doc/extend.texi: Document constraints on use of structures with ! flexible array members. ! 2002-08-17 Richard Sandiford ! * config/mips/t-coff, config/mips/t-elf, config/mips/t-isa3264, ! config/mips/t-r3900 (MULTILIB_MATCHES): Define. ! * config/mips/mips.h (ASM_SPEC): Use %(endian_spec). ! 2002-08-16 Stan Shebs ! * c-common.c (cb_register_builds): Define __NEXT_RUNTIME__ ! for ObjC with -fnext-runtime. ! * doc/cpp.texi: Document it. ! 2002-08-16 Janis Johnson ! * doc/install.texi (Final installation): Replace links to individual ! build status pages with a link to a common page that lists them all. ! 2002-08-16 Sylvain Pion ! * doc/invoke.texi: Fix typo. ! 2002-08-16 David Edelsohn ! * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning. ! 2002-08-16 Andrew Haley ! * tree-inline.c: Add includes for Java inliner. ! (remap_decl): Don't handle anonymous types for Java. ! (remap_block): Add handling for Java trees. ! (copy_scope_stmt): Conditionalize for non-Java use only. ! (copy_body_r): Handle Java trees. Add handling for ! LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, Java blocks. ! (initialize_inlined_parameters): Handle Java trees. ! (declare_return_variable): Likewise. ! (expand_call_inline): Handle Java trees. ! (walk_tree): Likewise. ! (copy_tree_r): Don't handle SCOPE_STMTs for Java. ! (add_stmt_to_compound): New function. ! 2002-08-15 Richard Henderson ! * Makefile.in (LOOSE_WARN): Remove -fno-common. ! (NOCOMMON_FLAG): New substitution point. ! (GCC_WARN_CFLAGS): Include it. ! * configure.in (ac_checking): Set nocommon_flag. ! (nocommon_flag): New substitution point. ! 2002-08-15 Alexandre Oliva ! * c-tree.h (skip_evaluation): Move declaration... ! * c-common.h: ... here. ! * c-typeck.c (build_external_ref): Don't assemble_external nor ! mark a tree as used if skip_evaluation is set. ! * c-parse.in (typeof): New non-terminal to set skip_evaluation ! around TYPEOF. ! (typespec_nonreserved_nonattr): Use it. ! 2002-08-15 Douglas B Rupp ! * dbxout.c (dbx_debug_hooks): Update end_prologue, end_epilogue. ! (xcoff_debug_hooks): Update end_prologue. ! * debug.c (do_nothing_debug_hooks): Update end_prologue, end_epilogue. ! * debug.h (end_prologue): Add file arg. ! (end_epilogue): Add line and file args. ! (dwarf2out_end_epilogue): Add line and file args. ! (vmsdbgout_after_prologue): Remove. ! * dwarf2out.c (dwarf2out_end_epilogue): Add line and file args. ! (dwarf2_debug_hooks): Update end_prologue. ! * dwarfout.c (dwarfout_end_epilogue): Add line and file args. ! (dwarfout_end_prologue): Add file arg. ! * final.c (vmsdbgout_after_prologue): Remove ! (final_end_function): Update end_epilogue call. ! (final_scan_insn): Update end_prologue call. ! * sdbout.c (sdbout_end_epilogue): Add line and file args. ! (sdbout_end_prologue): Add file arg. ! (sdb_debug_hooks): Update end_prologue. ! (sdb_begin_prologue): Update sdbout_end_prologue call. ! * vmsdbgout.c (vmsdbg_debug_hooks): Add vmsdbgout_end_prologue, ! vmsdbgout_end_function. ! (vmsdbgout_end_prologue): New function renamed from ! vmsdbgout_after_prologue. Call vmsdbgout_source_line. ! (vmsdbgout_end_function): New function. ! (vmsdbgout_end_epilogue): Add line and file args. Call ! vmsdbgout_source_line. ! (write_pclines): Write only valid line numbers. ! (write_srccorr): Don't write source correlation records if 0 lines. ! * xcoffout.c (xcoffout_end_epilogue): Add line and file args. ! 2002-08-15 Steve Ellcey ! * gcc/unwind.h (_Unwind_Ptr): Make 64 bits on IA64 HP-UX. ! (_Unwind_Internal_Ptr): 32 bit version for use in ! read_encoded_value_with_base. ! * gcc/unwind-pe.h (read_encoded_value_with_base): Use ! _Unwind_Internal_Ptr instead of _Unwind_Ptr in order to get the ! right size. ! 2002-08-15 Kaveh R. Ghazi ! * loop.c (scan_loop, move_movables, count_one_set): Cast to avoid ! signed/unsigned warnings. ! * regclass.c (init_reg_sets_1, choose_hard_reg_mode, ! record_reg_classes): Likewise. ! * reload.c (reload_inner_reg_of_subreg, push_reload, ! find_reloads_address_1): Likewise. ! 2002-08-15 David Edelsohn ! * rs6000.c (output_mi_thunk): Return to function section on ! TARGET_ELF. ! * rs6000-c.c (rs6000_cpu_cpp_builtins): Define __PPC405__ if PPC405. ! 2002-08-15 Ulrich Weigand ! * config/s390/s390.c (legitimize_address): Optimize loading ! of large displacements. ! 2002-08-14 Douglas B Rupp ! * config/alpha/alpha-protos.h: Update. ! * config/alpha/alpha.c: (LINKAGE_SYMBOL_REF_P): New macro. ! (alpha_legitimate_address_p): Test LINKAGE_SYMBOL_REF_P. ! (alpha_linkage_symbol_p): New static function. ! (print_operand_address): Print linkage operand. ! (alpha_funcs_num, alpha_funcs_tree, alpha_links_tree): New static ! variables. ! (reloc_kind): New enum. ! (struct alpha_funcs): New struct. ! (struct alpha_links): Add reloc_kind field. Rename links_kind field. ! (alpha_need_linkage): Rewrite. ! (alpha_use_linkage): New global function. ! (alpha_write_linkage): Rewrite and make static. ! (alpha_write_one_linkage): Rewrite ! (alpha_start_function): Remove procedure descriptor output. ! (alpha_end_function): Write linkages at end of each function. ! * config/alpha/alpha.md (call_vms, call_value_vms): Rewrite. ! (call_vms_1, call_value_vms_1): Rewrite. ! * config/alpha/vms.h (ASM_FILE_END): Remove. ! 2002-08-14 Richard Henderson ! * ggc-page.c (RTL_SIZE): New. ! (extra_order_size_table): Add specializations for 2 and 10 rtl slots. ! * rtl.def (BARRIER, NOTE): Pad to 9 slots. ! 2002-08-14 Richard Henderson ! * calls.c: Include target.h. ! * Makefile.in (calls.o): Update. ! * config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p. ! * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise. ! 2002-08-14 Richard Henderson ! * Makefile.in (LOOSE_WARN): Add -fno-common. ! * c-common.h (constant_string_class_name): Add missing extern. ! 2002-08-15 Neil Booth ! PR preprocessor/7358 ! * c-opts.c (check_deps_environment_vars): Ignore main file ! for SUNPRO_DEPENDENCIES. ! * cppfiles.c (stack_include_file): Ignore main file if ! appropriate. ! * cpplib.h (struct cpp_options): New member in deps. ! * doc/cppenv.texi: Update. ! 2002-08-14 Neil Booth ! PR preprocessor/7526 ! * cpplib.c (run_directive): Kludge so _Pragma dependency works. ! 2002-08-14 Nathan Sidwell ! * doc/invoke.texi (-a): Remove documentation. ! (-fprofile-arcs): Remove reference to -a, -ax options. ! * doc/gcov.texi (Gcov Data Files): Data might be merged. ! 2002-08-14 Gabriel Dos Reis ! Fix PR/7566 ! * c-semantics.c (genrtl_case_label): Don't (mis)use ! warning_with_decl. ! 2002-08-14 Dale Johannesen ! * explow.c (emit_stack_restore): Emit memory clobbers ! preceding the stack pop, to prevent the scheduler from ! moving refs to variable arrays below this pop. ! * reload1.c (reload): Preserve these clobbers for sched2. ! * doc/rtl.texi: Document clobber (mem:BLK (scratch)). ! 2002-08-14 Neil Booth ! * c-opts.c (c_common_post_options): Correct test. ! 2002-08-14 Kaveh R. Ghazi ! * m88k.h (ASM_OUTPUT_SOURCE_FILENAME): Fix incorrect argument ! order in call to fprintf. ! 2002-08-14 Rainer Orth ! * config/sparc/sol2.h (SUBTARGET_EXTRA_SPECS): Define. ! 2002-08-14 Ulrich Weigand ! * reload.c (find_reloads): Handle constraint letters marked by ! EXTRA_ADDRESS_CONSTRAINT and EXTRA_MEMORY_CONSTRAINT. ! (alternative_allows_memconst): Likewise. ! * reload1.c (maybe_fix_stack_asms): Likewise. ! * recog.c (asm_operand_ok, preprocess_constraints, ! constrain_operands): Likewise. ! * regclass.c (record_operand_costs, record_reg_classes): Likewise. ! * local-alloc.c (block_alloc, requires_inout): Likewise. ! * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. ! * defaults.h (EXTRA_MEMORY_CONSTRAINT): Provide a default. ! (EXTRA_ADDRESS_CONSTRAINT): Likewise. ! * doc/tm.texi: Document these two new target macros. ! * config/s390/s390.c (s390_expand_plus_operand): Accept already ! valid operands. ! (q_constraint): New function. ! config/s390/s390-protos.h (q_constraint): Declare it. ! config/s390/s390.h (EXTRA_CONSTRAINT): Use it. ! (EXTRA_MEMORY_CONSTRAINT): New macro. ! * config/s390/s390.md: Throughout the machine description, ! replace all instances of the constraint combinations 'Qo' ! or 'oQ' with simply 'Q'. ! 2002-08-14 Stephane Carrez ! * config/m68hc11/m68hc11.h (LINK_SPEC): Support -mrelax. ! * config/m68hc11/t-m68hc11-gas (LIBGCC2_DEBUG_CFLAGS): Can use -g now. ! (LIBGCC2_CFLAGS): Compile with -mrelax. ! 2002-08-14 Stephane Carrez ! * doc/invoke.texi: Document -minmax for 68HC12. ! * config/m68hc11/m68hc11.md ("umaxqi3"): Use TARGET_MIN_MAX. ! ("uminqi3"): Likewise. ! ("uminhi3", "umaxhi3"): Likewise. ! * config/m68hc11/m68hc11.h (MASK_MIN_MAX): Define. ! (TARGET_MIN_MAX): Define. ! (TARGET_SWITCHES): New option -minmax/-mnominmax. ! 2002-08-14 Stephane Carrez ! * config/m68hc11/t-m68hc11-gas (LIB1ASMFUNCS): Build __far_trampoline. ! (MULTILIB_OPTIONS): Must also generate for -mlong-calls. ! * config/m68hc11/larith.asm: Put a mode for ELF ABI flags. ! (ret, declare, farsym): New gas macros. ! (__premain, exit, abort, _cleanup, memcpy, memset, ___adddi3, ! ___subdi3, ___notdi2, __mulhi32, __mulsi3): Use them to use 'rtc' ! and declare the symbol far when compiled with -mlong-calls. ! (__far_trampoline): New for 68HC12 trampoline code to invoke a ! far handler using jsr/bsr. ! * config/m68hc11/m68hc11-crt0.S: Put a mode for ELF ABI flags. ! (jsr): New macro to transform a 'jsr' into a 'call'. ! 2002-08-14 Stephane Carrez ! * doc/invoke.texi: Document -mlong-calls for 68HC12. ! * config/m68hc11/m68hc11.h (CPP_SPEC): Pass -D__USE_RTC__ when ! -mlong-calls is specified. ! (ASM_DECLARE_FUNCTION_NAME): Define to generate .far and .interrupt ! assembler directives. ! (TARGET_LONG_CALL, MASK_LONG_CALL): Declare. ! (TARGET_SWITCHES): Add -mlong-calls options. ! (current_function_far): Declare. ! * config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset): Take ! into account the page register saved on the stack. ! (m68hc11_override_options): Take into account -mlong-calls option. ! (m68hc11_asm_file_start): Put a mode for the ELF flags ABI. ! * config/m68hc11/m68hc11.md ("*return_32bit"): Return rtc ! if the function is going to be in 68HC12 banked memory (-mlong-calls). ! ("*return_16bit"): Likewise. ! ("*return_void"): Likewise. ! ("call", "call_value"): Use call for a far function call. ! 2002-08-14 Neil Booth ! * toplev.c (parse_options_and_default_flags): Don't call ! post_options here. ! (general_init): Initialize GC, pools and tree hash here, ! instead of lang_independent_init. ! (lang_independent_init): Rename backend_init. ! (do_compile): Call post_options hook; exit early if there ! have been errors after switch processing. ! (toplev_main): Update. ! 2002-08-14 Gabriel Dos Reis ! * c-pretty-print.h: Guard against multiple inclusion. ! Robustify macros. ! (pp_c_attributes): Declare. ! * c-pretty-print.c (pp_c_attributes): New function. ! 2002-08-13 Kaveh R. Ghazi ! * m68k.c (m68k_output_function_prologue, ! m68k_output_function_epilogue): Delete versions for DPX2/MOTOROLA ! and NEWS/MOTOROLA. ! * genattrtab.c: Remove dpx2 comment. ! * libgcc2.c (__enable_execute_stack): Delete versions for ! NeXT/__MACH__, __convex__, __sysV88__, __pyr__ and ! sony_news/SYSTYPE_BSD. ! * longlong.h: Delete code for __a29k__, _AM29K, __clipper__, ! __gmicro__, __i860__, __NeXT__ and __pyr__. ! * rtl.h: Remove convex comment. ! * varasm.c: Likewise. ! 2002-08-13 Kaveh R. Ghazi ! * c-opts.c (lang_flags): Const-ify. ! * ra-build.c (undef_table): Likewise. ! * ra.c (eliminables): Likewise. ! 2002-08-14 Gabriel Dos Reis ! * tree.h: Guard against multiple inclusion. ! 2002-08-14 Hans-Peter Nilsson ! * reload1.c (reload_cse_simplify): Before checking ! REG_FUNCTION_VALUE_P, check REG_P. ! 2002-08-13 Geoffrey Keating ! * Makefile.in (attribs.o): Remove $(OBSTACK_H) dependency. ! 2002-08-13 Neil Booth ! * c-opts.c (c_common_init_options): Extra braces needed. ! 2002-08-13 J"orn Rennecke ! * sh.c (sh_init_builtins): Add PARAMS to declaration. ! (sh_media_init_builtins, sh_expand_builtin): Likewise. ! (sh_expand_unop_v2sf): Use PARAMS for variable declaration. ! (sh_expand_binop_v2sf): Likewise. ! * sh-protos.h (sh_expand_unop_v2sf): Add PARAMS to declaration. ! (sh_expand_binop_v2sf, sh_cfun_interrupt_handler_p): Likewise. ! (sh_initialize_trampoline): Likewise. ! 2002-08-13 Ulrich Weigand ! * s390-modes.def [CCL1, CCL2, CCT1, CCT2, CCT3, CCUR, CCSR]: Declare ! new condition code modes. ! s390.c (s390_match_ccmode_set): Handle those new CC modes. ! (s390_select_ccmode): Likewise. ! (s390_branch_condition_mask): Likewise. ! * s390-protos.h (s390_tm_ccmode): Declare. ! s390.c (s390_tm_ccmode): New function. ! (s390_match_ccmode): Allow VOIDmode as REQ_MODE. ! * s390.md ("*cmpdi_tm2"): Rename to "*tmdi_ext". ! ("*cmpsi_tm2"): Rename to "*tmsi_ext". ! ("*cmpqi_tm2"): Rename to "*tmqi_ext". ! ("*cmpdi_tm_reg", "*cmpdi_tm_mem", "*cmpsi_tm_reg", "*cmpsi_tm_mem", ! "*cmphi_tm_sub","*cmphi_cct_0", "*cmpqi_tm", "*cmpqi_tm_sub", ! "*cmpqi_cct_0", "*tm_0"): Remove, replace by ... ! ("*tmdi_reg", "*tmsi_reg", "*tmdi_mem", "*tmsi_mem", "*tmhi_mem", ! "*tmqi_mem", "*tmhi_full", "*tmqi_full"): ... these new patterns. ! ("*ltgr", "*cmpdi_ccs_0_64", "*cmpdi_ccs_0_31", "*ltr", "*icm15", ! "*icm15_cconly", "*cmpsi_ccs_0", "*icm3", "*cmphi_ccs_0", "*icm1", ! "*cmpqi_ccs_0"): Remove, replace by ... ! ("*tstdi_sign", "*tstdi", "*tstdi_cconly", "*tstdi_cconly_31", ! "*tstsi", "*tstsi_cconly", "*tstsi_cconly2", "*tsthi", "*tsthi_cconly", ! "*tstqi", "*tstqi_cconly"): ... these new patterns. ! ("*cmpsidi_ccs"): Remove, replace by ... ! ("*cmpsi_ccs_sign"): ... this new pattern. ! ("*cmpdi_ccs_sign", "*cmpdi_ccu_zero"): New patterns. ! ("*cmpqi_ccu_0", "*cmpqi_ccu_immed"): Remove, replace by ... ! ("*cli"): ... this new pattern. ! ("*adddi3_sign", "*adddi3_zero_cc", "*adddi3_zero_cconly", ! "*adddi3_zero", "*adddi3_cc", "*adddi3_cconly", "*adddi3_cconly2"): ! New patterns. ! ("adddi3_64"): Rename to "*adddi3_64". ! ("adddi3_31"): Replace by insn and splitter "*adddi3_31". ! ("adddi3"): Adapt expander. ! ("*addsi3_cc"): Allow "general_operand" for operand 2. ! ("*addsi3_carry1_cc", "*addsi3_carry1_cconly", ! "*addsi3_carry2_cc", "*addsi3_carry2_cconly"): New patterns. ! ("addhi3", "addqi3"): Remove, replace by ... ! ("*addsi3_sign", "*addsi3_sub"): ... these new patterns. ! ("*subdi3_sign", "*subdi3_zero_cc", "*subdi3_zero_cconly", ! "*subdi3_zero", "*subdi3_cc", "*subdi3_cconly"): New patterns. ! ("subdi3"): Replace by insn and splitter "*subdi3_31". ! ("subdi3"): New expander. ! ("*subsi3_borrow_cc", "*subsi3_borrow_cconly"): New patterns. ! ("subhi3", "subqi3"): Remove, replace by ... ! ("*subsi3_sign", "*subsi3_sub"): ... these new patterns. ! ("*muldi3_sign"): New pattern. ! ("muldi3"): Do not clobber CC. ! ("mulsi3"): Likewise. ! ("mulsi_6432"): Likewise. ! 2002-08-13 Denis Chertykov ! * config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles ! which can change CC0. ! 2002-08-13 J"orn Rennecke ! * gcse.c (adjust_libcall_notes): New function. ! (do_local_cprop): Use it. Add fourth parameter. Changed caller. ! 2002-08-13 Nathan Sidwell ! * libgcc2.c (L_bb): Remove unneeded #includes. ! (__global_counters, __gthreads_active): Remove unused globals. ! (__bb_exit_func): Merge counts into files rather than appending. ! * Makefile.in (INTERNAL_CFLAGS): Move COVERAGE_FLAGS from here ... ! (ALL_CFLAGS): ... to here. ! 2002-08-13 Denis Chertykov ! * config/ip2k/ip2k.c (commands_in_file): Variable removed. ! (function_epilogue): Don't calculate function size. ! (ip2k_set_compare): Don't use lookup_const_double. ! (asm_file_start): Initialization of commands_in_file removed. ! (asm_file_end): Output of commands_in_file removed. ! * config/ip2k/ip2k.c (CPP_PREDEFINES): Remove definition of ! __INT_MAX__. ! 2002-08-13 Neil Booth ! * c-opts.c (c_common_init_options): Check option array is ! sorted if checking enabled. ! 2002-08-13 Gabriel Dos Reis ! * c-pretty-print.c: #include "c-tree.h". ! (pp_c_simple_type_specifier): Tweak. ! (pp_c_storage_class_specifier): New. ! (pp_c_function_specifier): Likewise. ! (pp_c_declaration_specifiers): Likewise. ! (pp_c_init_declarator): Likewise. ! (pp_c_declaration): Likewise. ! (pp_c_direct_declarator): Stub. ! (pp_c_declarator): Likewise. ! (pp_c_parameter_declaration): Likewise. ! 2002-08-13 Neil Booth ! * c-opts.c (deps_seen, deps_file, deferred_count, deferred_size, ! handle_deferred_opts, sanitize_cpp_opts, defer_opt, ! struct deferred_opt): New. ! (COMMAND_LINE_OPTIONS): Add -M*. ! (missing_arg): Update. ! (c_common_decode_option): Handle -M*. ! (c_common_post_options): Handle -M*. Use sanitize_cpp_opts; ! don't call cpp_post_options. ! (c_common_finish, check_deps_environment_vars): Update. ! * cppfiles.c (stack_include_file, handle_missing_header): Update. ! * cpphash.h (CPP_PRINT_DEPS): Remove. ! * cppinit.c: Don't include version.h. ! (cpp_create_reader): Don't call deps_init. Initialize ! warn_long_long. ! (cpp_read_main_file): Init deps if necessary. ! (cpp_destroy): Conditionally free deps. ! (cpp_finish): Update. ! (no_tgt): Remove. ! (COMMAND_LINE_OPTIONS, cpp_handle_option): Remove -M*. ! (cpp_post_options): Rename post_options. ! * cpplib.h (struct cpp_options): Remove some dependency options; ! move others to a new structure. ! (cpp_post_options): Remove. ! (cpp_finish): Comment. ! * fix-header.c (read_scan_file): Don't call cpp_post_options. ! 2002-08-12 Hans-Peter Nilsson ! * config/mmix/mmix.md (define_constants): Add MMIX_rR_REGNUM. ! ("divdi3", "*divdi3_nonknuth", "moddi3", "*moddi3_nonknuth"): Mark ! MMIX_rR_REGNUM as clobbered. ! * config/mmix/mmix.h (MMIX_REMAINDER_REGNUM): Use MMIX_rR_REGNUM. ! 2002-08-12 Gabriel Dos Reis ! * diagnostic.h (output_formatted_scalar): Rename from ! output_formatted_integer. ! * diagnostic.def: Add DK_DEBUG. ! * diagnostic.c (output_decimal): Adjust. ! (output_long_decimal): Likewise. ! (output_unsigned_decimal): Likewise. ! (output_octal): Likewise. ! (output_long_octal): Likewise. ! (output_hexadecimal): Likewise. ! (output_long_hexadecimal): Likewise. ! * c-pretty-print.c (pp_c_type_specifier): New function. ! (pp_c_specifier_qualifier_list): Likewise. ! (pp_c_abstract_declarator): Likewise. ! (pp_c_char): Replace pp_format_integer with pp_format_scalar. ! 2002-08-12 David Edelsohn ! * doc/trouble.texi (Disappointments): Add static constructor and ! destructor dependency information for AIX. ! 2002-08-12 Neil Booth ! * cpphash.h (struct printer): New from cppmain.c. ! (cpp_reader): New member. ! * cppmain.c (struct printer): Move to cpphash.h. ! (options, print): Remove. ! (account_for_newlines, print_line, maybe_print_line, ! cpp_preprocess_file, setup_callbacks, scan_translation_unit, ! scan_translation_unit_trad, cb_line_change, cb_ident, ! cb_define, cb_undef, cb_include, cb_file_change, dump_macro, ! cb_def_pragma): Make reentrant. ! 2002-08-12 Kaveh R. Ghazi ! * real.c (ieee_64): Always define. ! (ieee_113): Guard with INTEL_EXTENDED_IEEE_FORMAT == 0. ! (dec_h): Not used yet, hide it. ! (emdnorm): Mark parameter in ATTRIBUTE_UNUSED. Guard label with ! macro controlling use. ! (TFbignan, TFlittlenan): Guard with INTEL_EXTENDED_IEEE_FORMAT == 0. ! 2002-08-12 Jan Hubicka ! * i386.md (tablejump): Sign extend the operand. ! * i386.c (classify_argument): Fix missed case from previous patch. ! 2002-08-12 Neil Booth ! * c-common.c (STDC_0_IN_SYSTEM_HEADERS, c_common_init): Move ! to c-copts.c. ! (warn_multichar): Die. ! (cb_register_builtins): Export. ! * c-common.h (warn_multichar, preprocess_file): Remove. ! (cb_register_builtins): New. ! * c-lang.c (c_init): Remove. ! (LANG_HOOKS_INIT): Use c_objc_common_init. ! * c-lex.c (init_c_lex): Don't canonicalize filename. ! * c-opts.c (in_fname, STDC_0_IN_SYSTEM_HEADERS): New. ! (preprocess_file): Make static. Update for cpplib. ! (c_common_decode_option): Remove warn_multichar. Use in_fname. ! (c_common_post_options): Set some cpp options here. ! (c_common_init): Move from c-common.c. ! * cppinit.c (cpp_post_options): Don't canonicalize in_fname. ! * cpplib.h (struct cpp_options): Remove in_fname. ! (cpp_preprocess_file): Update. ! * cppmain.c (cpp_preprocess_file): Update for new prototypes. ! 2002-08-11 Kaveh R. Ghazi ! * config.gcc (mips*-*-netbsd*): Include ${tm_file}. ! 2002-08-11 Kaveh R. Ghazi ! * i370.h (TARGET_CPU_CPP_BUILTINS): Remove spurious trailing ! backslash in comment preceeding macro definition. ! * i370/linux.h (TARGET_OS_CPP_BUILTINS): Likewise. ! * i370/mvs.h (TARGET_OS_CPP_BUILTINS): Likewise. ! * i370/oe.h (TARGET_OS_CPP_BUILTINS): Likewise. ! 2002-08-12 Hans-Peter Nilsson ! * expr.c (store_expr): In condition for checking if value is ! generated in TARGET, move call to expr_size last. ! 2002-08-11 Neil Booth ! * c-common.c (c_common_init): Call preprocess_file instead. ! (c_common_finish): Move to c-opts.c. ! * c-common.h (preprocess_file): new. ! * c-opts.c (out_fname, out_stream, deps_append, preprocess_file, ! check_deps_environment_vars, c_common_finish): New. ! (c_common_decode_option): Update for out_fname and dependencies. ! * cppinit.c (init_dependency_output, output_deps): Remove. ! (cpp_destroy): Update prototype. ! (cpp_add_dependency_target): New. ! (cpp_read_main_file): Don't overlay a buffer. ! (cpp_finish): Take a deps output stream and write deps to it. ! Return the error count. ! (cpp_post_options): Don't canonicalize out_fname, or do anything ! with dependencies. ! * cpplib.h (struct cpp_options): Remove out_fname and ! preprocess_only. ! (cpp_add_dependency_target): New. ! (cpp_destroy, cpp_finish, cpp_preprocess_file): Update. ! * cppmain.c (cpp_preprocess_file): Update prototype. Don't ! set preprocess_only. Don't handle the output stream directly. ! 2002-08-11 Kaveh R. Ghazi ! * dsp16xx.c (print_operand): Fix format specifier. ! * dsp16xx.md: Avoid automatic aggregate initialization. ! * frv.h (REG_CLASS_FROM_LETTER): Avoid char as array index. ! * h8300.c (emit_a_rotate, h8300_adjust_insn_length): Avoid U ! integer constant modifier. ! * ip2k.c (ip2k_set_compare): Avoid signed/unsigned warning. ! * mmix-protos.h (mmix_use_simple_return): Move outside TREE_CODE ! guards. ! * sh/netbsd-elf.h (FUNCTION_PROFILER): Fix format specifier. ! * v850.c (v850_select_section): Mark parameter with ! ATTRIBUTE_UNUSED. ! * global.c (global_alloc): Const-ify. ! * ra-colorize.c (hardregset_to_string): Fix format specifier. ! 2002-08-11 Kaveh R. Ghazi ! * darwin-c.c (darwin_pragma_options): Const-ify. ! * darwin.c (machopic_non_lazy_ptr_name, ! machopic_validate_stub_or_non_lazy_ptr): Likewise. ! (machopic_indirect_data_reference): Wrap variables in macros ! controlling their use. ! (machopic_finish, update_non_lazy_ptrs, update_stubs): Const-ify. ! (machopic_select_section): Use parentheses around && within ||. ! * i386/darwin.h (ASM_OUTPUT_ALIGN): Avoid ambiguous-else. ! 2002-08-11 Kaveh R. Ghazi ! * ip2k.c (mdr_resequence_xy_yx, mdr_propagate_reg_equivs, ! mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ! ip2k_adjust_stack_ref, mdr_try_move_pushes, mdr_try_propagate_clr, ! ip2k_xexp_not_uses_reg_for_mem, mdr_try_propagate_move, ! mdr_try_remove_redundant_insns, track_w_reload, ! mdr_try_wreg_elim): Make function static to match prototype. ! * mmix.c (mmix_target_asm_function_epilogue): Likewise. Mark ! parameter with ATTRIBUTE_UNUSED. ! 2002-08-11 Kaveh R. Ghazi ! * arc.c (arc_init): Don't use ISO C style function definitions. ! * arm.c (count_insns_for_constant, thumb_far_jump_used_p, ! arm_get_strip_length, arm_strip_name_encoding): Likewise. ! * avr.h (progmem_section): Likewise. ! * h8300.c h8300_asm_insn_count): Likewise. ! * m32r.c (init_idents): Likewise. ! * s390.c (s390_split_branches, s390_chunkify_pool): Likewise. ! * sh.c (sh_cfun_interrupt_handler_p): Likewise. ! * xtensa.c (xtensa_build_va_list): Likewise. ! 2002-08-11 Neil Booth ! * c-common.h (enum c_language_kind): Emphasize that clk_c is 0. ! * c-opts.c (parse_option): Rename find_opt. ! (set_std_c99): New function. ! (COMMAND_LINE_OPTIONS): Handle -remap and -o. Remove OPT_std_bad. ! (missing_arg): Remove OPT_std_bad. Handle -o. ! (c_common_decode_option): Handle input and output file names, ! -o and -remap. Clean up -std= handling. ! * cppinit.c (COMMAND_LINE_OPTIONS): Remove OPT_o and OPT_remap. ! (cpp_handle_option): Similarly. Don't handle filenames. ! 2002-08-11 Jan Hubicka ! * i386.c (classify_argument): Fix computing of field's offsets. ! 2002-08-11 Andreas Jaeger ! PR target/7531: ! * doc/invoke.texi (i386 and x86-64 Options): Document -mcmodel. ! 2002-08-10 Ziemowit Laski ! * config/alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Replace ! reference to clk_objective_c with flag_objc. ! * config/i386/i386-interix.h (TARGET_OS_CPP_BUILTINS): ! Likewise. ! * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Likewise. ! 2002-08-10 Neil Booth ! * c-opts.c (set_std_cxx98, set_std_c89): New. ! (COMMAND_LINE_OPTIONS): Move more from cppinit.c. ! (c_common_decode_option): Handle new switches from cppinit.c. ! Add -std=gnu++98. ! * cppinit.c (set_lang): Rename cpp_set_lang. Export. ! (no_arg, no_num): Remove. ! (COMMAND_LINE_OPTIONS): Move more to c-opts.c. Drop all lang- ! switches apart from -lang-objc and lang-asm. ! (cpp_handle_option): Similarly. ! * cpplib.h (cpp_set_lang): New. ! * doc/cppopts.texi, doc/invoke.texi: Document -std=c++98, ! -std=gnu++98. ! * objc/lang-specs.h: Remove -ansi. ! 2002-08-10 Jan Hubicka ! Graham Stott ! * cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff ! errors. ! 2002-08-10 Kaveh R. Ghazi ! * emit-rtl.c (emit_jump_insn_before, emit_call_insn_before, ! emit_jump_insn): Fix uninitialized variable. ! * gcov.c (init_line_info): Likewise. ! * genautomata.c (transform_3): Add braces around ambiguous ! else. ! * ifcvt.c (cond_exec_process_insns): Mark parameter with ! ATTRIBUTE_UNUSED. ! * ra-build.c (parts_to_webs_1): Fix uninitialized variable. ! * regrename.c (copyprop_hardreg_forward): Fix uninitialized ! variable. ! * gengtype.c (write_gc_structure_fields): Avoid signed/unsigned ! warnings in output files. ! 2002-08-09 Ziemowit Laski ! * c-common.c (flag_objc): New. ! * c-common.h (c_language_kind): Get rid of clk_objective_c ! enum value. ! (flag_objc): New extern declaration. ! * c-decl.c (implicitly_declare): Call objc_check_decl ! instead of maybe_objc_check_decl. ! (finish_decl): Likewise. ! (grokfield): Likewise. ! (finish_struct): Likewise. ! * c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl. ! (maybe_objc_comptypes): Rename to objc_comptypes. ! (maybe_building_objc_message_expr): Rename to ! objc_message_selector. ! * c-lex.c (lex_charconst): Remove uses of clk_objective_c, ! replace with flag_objc as needed. ! * c-opts.c (c_common_init_options): Likewise. ! (c_common_decode_option): Likewise. ! * c-parse.in (init_reswords): Likewise. ! * c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl. ! (maybe_objc_comptypes): Rename to objc_comptypes. ! (maybe_building_objc_message_expr): Rename to ! objc_message_selector. ! * c-typeck.c (comptypes): Call objc_comptypes instead of ! maybe_objc_comptypes, and/or objc_message_selector instead of ! maybe_building_objc_message_expr. ! (comp_target_types): Likewise. ! (convert_for_assignment): Likewise. ! (warn_for_assignment): Likewise. ! * cppinit.c (init_builtins): Set __OBJC__ manifest constant ! independently of those for other languages. ! * objc/objc-act.c (maybe_objc_comptypes): Delete. ! (maybe_objc_check_decl): Delete. ! (maybe_building_objc_message_expr): Rename to ! objc_message_selector. ! * objc/objc-lang.c (objc_init_options): Use clk_c instead of ! clk_objective_c; set flag_objc flag. ! 2002-08-09 Toshiyasu Morita ! * ifcvt.c (find_if_case_2): Test correct basic block for size. ! 2002-08-09 Dale Johannesen ! * config/rs6000/rs6000.md: Add sibcall patterns. ! * config/rs6000/rs6000.h (FUNCTION_OK_FOR_SIBCALL): Define. ! * config/rs6000/rs6000.c (rs6000_ra_ever_killed): ! Rewritten to handle sibcalls. ! * config/rs6000/rs6000.c (function_ok_for_sibcall): New. ! * config/rs6000/rs6000-protos.h (function_ok_for_sibcall): New. ! 2002-08-08 Nathan Sidwell ! * profile.c (da_file_name): New static var. ! (init_branch_prob): Initialize it. ! (end_branch_prob): Remove da file. ! * Makefile.in (stage1_build): Pass empty COVERAGE_FLAGS. ! * configure.in (coverage_flags): Default to nothing. ! * configure: Rebuilt. ! 2002-08-09 Neil Booth ! * Makefile.in (c-opts.o): Update ! * c-opts.c: Include intl.h. ! (print_help): Move from cppinit.c. Remove unused options. ! (COMMAND_LINE_OPTIONS): Move more from cppinit.c. ! (missing_arg): Complain for switches without an argument. ! (c_common_decode_option): Reject missing joined arguments. ! Handle new switches from cppinit.c. ! * cppinit.c (COMMAND_LINE_OPTIONS): Move some switches to c-opts.c. ! (cpp_handle_option): Similarly. ! (print_help): Moved to c-opts.c. ! * cpplib.h (struct cpp_options): Remove help_only. ! * gcc.c (cpp_unique_options): Remove -$. ! * doc/cppopts.texi: Undocument -h. ! 2002-08-08 Jakub Jelinek ! * config/i386/i386.c (legitimate_constant_p): UNSPEC_TP is not ! legitimate constant. ! (legitimate_pic_operand_p): Neither pic operand. ! (legitimate_address_p): But legitimate address. ! (get_thread_pointer): Generate MEM/u instead of CONST around ! UNSPEC_TP. ! (print_operand): Remove printing of UNSPEC_TP. ! (print_operand_address): And print it here. ! 2002-08-08 Devang Patel ! * objc/objc-act.c (build_selector_translation_table): Issue warning, ! when -Wselector is used,if method for which selector is being ! created does not exist. ! 2002-08-08 Stephen Clarke ! * config/sh/sh.c (prepare_move_operands): Only call ! target_reg_operand if TARGET_SHMEDIA. ! 2002-08-08 Jakub Jelinek ! * config/rs6000/rs6000.h, config/rs6000/aix.h, ! config/rs6000/darwin.h, config/rs6000/linux64.h: Revert last ! two patches. ! * config/rs6000/sysv4.h: Likewise, remove #undef ADJUST_FIELD_ALIGN. ! 2002-08-08 Lars Brinkhoff ! Richard Henderson ! * emit-rtl.c (gen_rtx_REG): After reload, only return ! frame_pointer_rtx or hard_frame_pointer_rtx if frame_pointer_needed. ! 2002-08-08 Jakub Jelinek ! * config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove. ! * config/rs6000/rs6000.c (rs6000_field_alignment): Move... ! * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): ...inline into the ! macro. ! 2002-08-08 Adam Nemet ! * config/arm/arm.c (thumb_unexpanded_epilogue): Stack the PIC ! register. ! (thumb_expand_prologue): Likewise. ! (thumb_output_function_prologue): Likewise. ! * config/arm/arm.h (THUMB_INITIAL_ELIMINATION_OFFSET): Account for ! the additional push of the PIC register. ! 2002-08-08 Nathan Sidwell ! * configure.in (enable_coverage): New enable switch. ! * configure: Rebuilt. ! * Makefile.in (COVERAGE_FLAGS, coverageexts): New variables. ! (INTERNAL_CFLAGS): Append COVERAGE_FLAGS. ! (ALL_FLAGS): Reorder so INTERNAL_CFLAGS comes after CFLAGS. ! (mostlyclean): Remove coverage files. ! * doc/install.texi: Document enable_coverage. ! * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. ! * ada/Make-lang.in (ada.mostlyclean): Remove coverage files. ! * f/Make-lang.in (f.mostlyclean): Remove coverage files. ! * java/Make-lang.in (java.mostlyclean): Remove coverage files. ! * objc/Make-lang.in (objc.mostlyclean): Remove coverage files. ! * treelang/Make-lang.in (treelang.mostlyclean): Remove coverage ! files. ! 2002-08-08 Neil Booth ! * c-opts.c (cpp_opts): New. ! (COMMAND_LINE_OPTIONS): Add switches from cppinit.c. ! (c_common_decode_options): Handle cpplib switches. ! (c_common_init_options): Set cpp_opts. ! * cppinit.c (COMMAND_LINE_OPTIONS): Move some switches to c-opts.c. ! (cpp_handle_option): Similarly. ! 2002-08-08 David Edelsohn ! * config/rs6000/aix.h (TARGET_ALTIVEC): Define to 0. ! (TARGET_ALTIVEC_ABI): Same. ! (TARGET_ALTIVEC_VRSAVE): Same. ! * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Check ! icode not CODE_FOR_nothing. Change switch to if. ! 2002-08-08 Alan Modra ! * config/rs6000/rs6000.h (ASM_CPU_SPEC): Pass -mpower4 when cpu=power4. ! 2002-08-08 Jakub Jelinek ! * stor-layout.c (place_union_field): For bitfields if ! PCC_BITFIELD_TYPE_MATTERS and TYPE_USER_ALIGN, set record's ! TYPE_USER_ALIGN. ! 2002-08-07 John David Anglin ! * pa.c (struct deferred_plabel): Constify name field. ! 2002-08-07 Neil Booth ! * cppmacro.c (_cpp_builtin_macro_text): Remove unused variable. ! 2002-08-07 John David Anglin ! * configure.in (PREFIX_INCLUDE_DIR): Don't define if prefix and ! local_prefix are the same. ! * configure: Rebuilt. ! 2002-08-07 Jakub Jelinek ! Richard Henderson ! * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN ! to type_align when PCC_BITFIELD_TYPE_MATTERS. Only apply ! ADJUST_FIELD_ALIGN if not DECL_USER_ALIGN resp. TYPE_USER_ALIGN. ! (place_field): Likewise. ! * config/i386/i386.c (x86_field_alignment): Don't check ! DECL_USER_ALIGN here. ! * config/rs6000/rs6000.c (rs6000_field_alignment): New. ! * config/rs6000/rs6000-protos.h (rs6000_field_alignment): New ! prototype. ! * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): Define. ! * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Remove. ! * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Remove. ! * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Remove. ! * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove. ! * doc/tm.texi (ADJUST_FIELD_ALIGN): Update description. ! 2002-08-07 Neil Booth ! * Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update. ! * c-common.c: Don't include tree-inline.h. ! (c_common_init_options, c_common_post_options): Move to c-opts.c. ! * c-common.h (c_common_decode_option): New. ! * c-decl.c (c_decode_option): Remove. ! * c-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. ! * c-opts.c: New file. ! * c-tree.h (c_decode_option): Remove. ! * doc/passes.texi: Update. ! * objc/objc-act.c (objc_decode_option): Remove. ! * objc/objc-act.h (objc_decode_option): Remove. ! * objc/ojbc-lang.c (LANG_HOOKS_DECODE_OPTION): Use ! c_common_decode_option. ! 2002-08-07 Chris Demetriou ! * config/mips/mips.md (sunlt_sf, suneq_sf, sunle_sf): Remove ! dependency on TARGET_DOUBLE_FLOAT. ! 2002-08-07 Stephen Clarke ! * config/sh/lib1funcs.asm (GCC_shcompact_incoming_args): Don't ! overwrite callee-save registers. Fix comment. ! 2002-08-06 Chris Demetriou ! * config/mips/mips.c (override_options): Set MASK_BRANCHLIKELY ! in target_flags based on ISA, if it was not set on the command ! line. Warn if MASK_BRANCHLIKLEY is set but the ISA does not ! support Branch Likely instructions. ! * config/mips/mips.h (MASK_BRANCHLIKLEY): New macro. ! (TARGET_BRANCHLIKELY): Likewise. ! (TARGET_SWITCHES): Add -mbranch-likely and -mno-branch-likely. ! (GENERATE_BRANCHLIKELY): Use TARGET_BRANCHLIKELY rather than ! ISA_HAS_BRANCHLIKELY. ! (ISA_HAS_BRANCHLIKELY): Do not include MIPS16 check. ! * doc/invoke.texi: Document new MIPS -mbranch-likely and ! -mno-branch-likely options. ! 2002-08-06 Kaveh R. Ghazi ! * ip2k.c (ip2k_set_compare): Add missing iteration variable. ! * Makefile.in (dummy-conditions.o): Depend on $(HCONFIG_H) not ! $(GCONFIG_H). ! 2002-08-06 Aldy Hernandez ! * c-decl.c (duplicate_decls): Error out for incompatible TLS ! declarations. ! * testsuite/gcc.dg/tls/diag-3.c: New. ! 2002-08-06 Dale Johannesen ! * c-common.c (fname_decl): Use line number 0 for ! __func__, to avoid confusing debuggers. ! 2002-08-06 Nathan Sidwell ! * gcov.c: Tidy. ! (struct line_info, struct coverage): New structures. ! (gcov_file_name, gcov_file): Remove globals. ! (output_data): Take source file parameter. Fix memory leak. Break ! up into ... ! (init_line_info, output_line_info, make_gcov_file_name, ! accumulate_branch_counts): ... here. ! (calculate_branch_probs, function_summary): Adjust. ! (main): Adjust. ! (function_*): Remove global variables. ! 2002-08-06 Neil Booth ! * dwarf2out.c: Remove unused macros. ! 2002-08-06 Neil Booth ! * function.c (TRAMPOLINE_ALIGNMENT): Always defined. ! 2002-08-06 Neil Booth ! * cppinit.c (struct lang_flags): Rename trigraphs std. ! (set_lang): Update. ! * cpplib.h (struct cpp_options): New member std. ! * cppmacro.c (_cpp_builtin_macro_text): Use std. ! (collect_args): Flag whether to swallow a possible future ! comma pasted with varargs. ! (replace_args): Use this flag. ! * doc/cpp.texi: Update varargs extension documentation. ! 2002-08-06 Jakub Jelinek ! * config/i386/mmintrin.h (__m64): Make the type 64-bit aligned. ! 2002-08-06 Jakub Jelinek ! * config/i386/i386.c (x86_field_alignment): Apply min for all MODE_INT ! and MODE_CLASS_INT modes. ! 2002-08-06 Jakub Jelinek ! * config.gcc (*-*-linux*): Default to --enable-threads=posix if no ! --{enable,disable}-threads is given to configure. ! (alpha*-*-linux*, hppa*-*-linux*, i[34567]86-*-linux*, ! x86_64-*-linux*, ia64*-*-linux*, m68k-*-linux*, mips*-*-linux*, ! powerpc-*-linux-gnualtivec*, powerpc-*-linux*, s390-*-linux*, ! s390x-*-linux*, sh-*-linux*, sparc-*-linux*, sparc64-*-linux*): ! Remove thread_file setting here. ! 2002-08-06 David Edelsohn ! * doc/install.texi (Binaries): Update Bull Freeware URL. ! 2002-08-06 Gerald Pfeifer ! * doc/gcc.texi (Top): Rename Index to Keyword Index. ! 2002-08-05 Nathan Sidwell ! * gcov.c (output_data): Round to % to nearest, tweak formatting. ! 2002-08-05 Jakub Jelinek ! * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one ! of the operands into MINUS_EXPR if code is PLUS_EXPR. ! 2002-08-05 Douglas B Rupp ! * config.gcc (i[34567]86-*-interix*): Replace interix.o with winnt.o ! * config/i386/i386-interix.h (TARGET_NOP_FUN_DLLIMPORT, ! drectve_section): Define. ! * config/i386/t-interix: Replace interix.o rule with winnt.o. ! * config/i386/interix.c: Remove. ! 2002-08-05 Geoffrey Keating ! * attribs.c: Don't include obstack.h. ! * builtins.c: Likewise. ! * cfganal.c: Likewise. ! * cfgbuild.c: Likewise. ! * cfgcleanup.c: Likewise. ! * emit-rtl.c: Likewise. ! * loop.c: Likewise. ! * stmt.c: Likewise. ! * Makefile.in (s-gtype): Re-add dependency on $(GTFILES). ! 2002-08-05 Gabriel Dos Reis ! * doc/c-tree.texi (Expression trees): Document VA_ARG_EXPR ! 2002-08-04 Chris Demetriou ! * doc/invoke.texi: Remove duplicated paragraph describing ! TARGET_SWITCHES. ! 2002-08-04 Geoffrey Keating ! * Makefile.in (sdbout.o): Doesn't need $(OBSTACK_H). ! * collect2.h (permanent_obstack): Delete declaration. ! * collect2.c (permanent_obstack): Delete definition. ! (main): Don't initialize permanent_obstack. Use xstrdup instead. ! * expr.c: Don't include obstack.h. ! (permanent_obstack): Delete declaration. ! * function.c: Don't include obstack.h. ! (permanent_obstack): Delete declaration. ! * integrate.c: Don't include obstack.h. ! (function_maybepermanent_obstack): Delete declaration. ! * print-tree.c (debug_tree): Use x*alloc not permalloc. ! * sdbout.c (gen_fake_label): Use x*alloc not permalloc. ! * tlink.c (pfgets): Use xstrdup not permanent_obstack. ! * toplev.c (lang_independent_init): Rename init_obstacks to init_ttree. ! * tree.h: Rename init_obstacks to init_ttree. Remove declarations ! of permalloc, expralloc, perm_calloc. ! * tree.c (permanent_obstack): Delete definition. ! (init_ttree): Rename from init_obstacks. ! (permalloc): Delete. ! (perm_calloc): Delete. ! (dump_tree_statistics): Don't print information about ! permanent_obstack. ! * varasm.c (assemble_start_function): Use xstrdup instead of ! permalloc/strcpy. ! (assemble_variable): Likewise. ! * config/alpha/alpha.c (unicosmk_need_dex): Use xmalloc instead of ! permalloc. ! (unicosmk_add_extern): Likewise. ! * config/c4x/c4x.c (c4x_external_ref): Likewise. ! (c4x_global_label): Likewise. ! * config/frv/frv.c (frv_encode_section_info): Likewise. ! * config/i386/winnt.c (i386_pe_record_external_function): Likewise. ! (i386_pe_record_exported_symbol): Likewise. ! * config/mips/mips.c (mips_output_external): Likewise. ! (mips_output_external_libcall): Likewise. ! * config/pa/pa.c: (permanent_obstack): Delete declaration. ! (output_call): Use ggc_strdup instead of allocating on ! permanent_obstack. ! * config/romp/romp.c: Include ggc.h. ! (get_symref): Don't declare permanent_obstack, use ggc_strdup ! intead of permanent_obstack. ! * config/rs6000/aix31.h (ASM_OUTPUT_EXTERNAL): Use concat ! instead of permalloc. ! * config/rs6000/rs6000.c (rs6000_gen_section_name): Use xmalloc ! instead of permalloc ! * config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Use concat ! instead of permalloc. ! * config/vax/vax.c (vms_check_external): Use xmalloc instead of ! permalloc. ! 2002-08-04 Bernd Schmidt ! Contribute a port developed primarily by Michael Meissner, ! Catherine Moore, and Richard Sandiford . ! * config.gcc: Add frv-elf target. ! * config/frv/cmovd.c: New file. ! * config/frv/cmovh.c: New file. ! * config/frv/cmovw.c: New file. ! * config/frv/frv-abi.h: New file. ! * config/frv/frv-asm.h: New file. ! * config/frv/frv-modes.def: New file. ! * config/frv/frv-protos.h: New file. ! * config/frv/frv.c: New file. ! * config/frv/frv.h: New file. ! * config/frv/frv.md: New file. ! * config/frv/frvbegin.c: New file. ! * config/frv/frvend.c: New file. ! * config/frv/lib1funcs.asm: New file. ! * config/frv/media.h: New file. ! * config/frv/modi.c: New file. ! * config/frv/t-frv: New file. ! * config/frv/uitod.c: New file. ! * config/frv/uitof.c: New file. ! * config/frv/ulltod.c: New file. ! * config/frv/ulltof.c: New file. ! * config/frv/umodi.c: New file. ! * config/frv/xm-frv.h: New file. ! * config/frv/media.h: Removed again. ! 2002-08-04 Nathan Sidwell ! * gcov.c (bb_file_time): New static variable. ! (object_directory): May also be object file. ! (preserve_paths): New static variable. ! (print_usage): Adjust. ! (options): Adjust. ! (process_args): Adjust. ! (open_files): Simplify. Cope when OBJECT_DIRECTORY is an object ! file. Find modification date on bb file. ! (read_profile): Don't rewind a NULL file. ! (format_hwint): New static function. ! (function_summary): Use format_hwint. ! (output_data): SOURCE_FILE_NAME is never relative to ! OBJECT_DIRECTORY. Use format_hwint. Adjust gcov file name ! mangling. Adjust output format to make it more machine readable. ! * doc/gcov.texi: Document & clarify semantics. ! 2002-08-04 Joseph S. Myers ! * doc/include/gcc-common.texi (version-GCC): Increase to 3.3. ! 2002-08-04 Nathan Sidwell ! * gcc.c (cc1_options): Pass output file as auxbase when ! appropriate. ! * profile.c (init_branch_prob): FILENAME has already had ending ! stripped. ! * final.c (end_final): Likewise. ! * toplev.c (aux_base_name): New global. ! (compile_file): Pass aux_base_name to init init_branch_prob and ! end_final. ! (independent_decode_option, case 'a'): New auxinfo options. ! (case 'd'): Protect against mising basename. ! (do_compile): Initialize aux_base_name. ! * toplev.h (aux_base_name): New global. ! * doc/invoke.texi: Adjust documentation. ! 2002-08-04 Nathan Sidwell ! * config/i386/i386.c (x86_field_alignment): Remove duplicate test ! of TARGET_ALIGN_DOUBLE. ! 2002-08-04 Gabriel Dos Reis ! * diagnostic.c (inform): New function. ! * diagnostic.h (inform): Declare. ! 2002-08-03 David Edelsohn ! * config/rs6000/rs6000.md (movsi_internal1): Add nop mnemonic. ! (movhi_internal): Same. ! (movqi_internal): Same. ! (movdi_internal64): Same. ! * config/rs6000/t-ppccomm (MULTILIB_MATCHES_FLOAT): Add mcpu=405. ! * config/rs6000/xcoff.h (SKIP_ASM_OP): Define. ! (ASM_OUTPUT_SKIP): Use it. SIZE unsigned. ! (COMMON_ASM_OP): Define. ! (ASM_OUTPUT_ALIGNED_COMMON): Use it. SIZE unsigned. ! Use ALIGN parameter. ! (LOCAL_COMMON_ASM_OP): Define. ! (ASM_OUTPUT_LOCAL): Use it. SIZE unsigned. ! 2002-08-03 Roger Sayle ! * builtins.def: Define new builtin functions exp, expf, expl, ! log, logf and logl (and their __builtin_* variants). ! * optabs.h (enum optab_index): Add new OTI_exp and OTI_log. ! Define exp_optab and log_optab. ! * optabs.c (init_optans): Initialize exp_optab and log_optab. ! * genopinit.c (optabs): Implement exp_optab and log_optab ! using exp?f2 and log?f2 patterns. ! * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP* ! and BUILT_IN_LOG* using exp_optab and log_optab respectively. ! (expand_builtin): Ignore the new builtins (and all cos and ! sin variants) when not optimizing. Expand new builtins via ! expand_builtin_mathfn when flag_unsafe_math_optimizations. ! * doc/extend.texi: Document new exp and log builtins. ! * doc/md.texi: Document new exp?f2 and log?f2 patterns ! (and previously undocumented cos?f2 and sin?f2 patterns). ! 2002-08-03 Jason Merrill ! * explow.c (int_expr_size): New fn. ! * expr.c (expand_expr) [CONSTRUCTOR]: Use it. ! * expr.h: Declare it. ! 2002-08-02 Krister Walfridsson ! * Makefile.in (gengtype-lex.o, gengtype-yacc.o): Add path to ! gengtype-* dependencies. ! 2002-08-02 Eric Christopher ! * config.gcc (mips*-*-linux*): Fix ordering of tm_file. ! * config/mips/mips.h (READONLY_DATA_SECTION_ASM_OP): Change ! #ifndef to #undef. ! (TARGET_MEM_FUNCTIONS): Define instead of define to 1. ! 2002-08-02 David Edelsohn ! PR optimize/7067 ! * config/rs6000/rs6000.h (RTX_COSTS): Artificially make MULT ! small if optimizing for size. ! 2002-08-02 Daniel Jacobowitz ! * configure.in (FORBUILD): Use $build_alias. ! * configure: Regenerated. ! 2002-08-02 Richard Sandiford ! * config.gcc: Don't include mips/abi64.h in $tm_file. ! * hard-reg-set.h (call_really_used_regs): Declare. ! * config/mips/abi64.h: Remove file. ! * config/mips/linux.h, ! * config/mips/iris6.h: Don't include it. ! * config/mips/mips-protos.h (mips_conditional_register_usage): Declare. ! * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Use it. ! (REG_PARM_STACK_SPACE, STACK_BOUNDARY, STRICT_ARGUMENT_NAMING, ! FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_PADDING, ! FUNCTION_ARG_CALLEE_COPIES, MUST_PASS_IN_STACK, MIPS_STACK_ALIGN): ! Bring across definitions from abi64.h. ! (GP_ARG_LAST, FP_ARG_LAST): Use MAX_ARGS_IN_REGISTERS. ! (BIGGEST_MAX_ARGS_IN_REGISTERS): New. ! (struct mips_args): Use it. ! * config/mips/mips.c (mips_conditional_register_usage): Define. ! 2002-08-02 Jason Merrill ! * langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro. ! * langhooks.c (lhd_expr_size): Define default. ! * langhooks.h (struct lang_hooks): Add expr_size. ! * explow.c (expr_size): Call it. ! * expr.c (store_expr): Don't copy an expression of size zero. ! (expand_expr) [CONSTRUCTOR]: Use expr_size to calculate how much ! to store. ! * Makefile.in (builtins.o): Depend on langhooks.h. ! 2002-08-02 Kaveh R. Ghazi ! * Makefile.in (ra-debug.o): Depend on $(TM_P_H). ! * ra-debug.c: Include "tm_p.h". ! * ra-rewrite.c (is_partly_live_1): Change return type to bool. ! 2002-08-02 Toon Moene ! * simplify-rtx.c (simplify_binary_operation): x * 1 is allowed ! when not honoring signalling NaNs. ! (simplify_ternary_operation): a == b has a definite value ! when not honoring NaNs. ! 2002-08-02 Jason Merrill ! * gdbinit.in (pct): New macro. ! 2002-08-01 Stan Shebs ! Andreas Tobler ! * ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined, ! plays nice with Darwin headers. ! (_BSD_RUNE_T_DEFINED_): Likewise. ! 2002-08-01 Zack Weinberg ! * c-common.c (c_common_init): -Wtraditional also implies -Wlong-long. ! * cppinit.c (cpp_post_options): Likewise. ! * cppexp.c (cpp_classify_number): Suppress -Wtraditional ! warning about 'LL' suffix (but not 'ULL' etc) when ! -Wno-long-long is in effect. ! * cppmacro.c (_cpp_builtin_macro_text) [BT_TIME, BT_DATE]: ! Check for failing time()/localtime(), issue a warning, and ! make __TIME__ and __DATE__ expand to fallback strings. ! * doc/cpp.texi, doc/extend.texi: Document behavior of __DATE__ ! and __TIME__ when the date and time cannot be determined. ! 2002-08-02 Alan Modra ! * config/rs6000/rs6000.c (output_cbranch): Hint differently for power4. ! 2002-08-01 Daniel Jacobowitz ! * Makefile.in ($(BUILD_PREFIX_1)ggc-none.o): Use $(GGC_H). ! 2002-08-01 Chris Demetriou ! * config.gcc (mipsisa64sb1-*-elf*): New configuration. ! (mipsisa64sb1el-*-elf*): Likewise. ! * config/mips/mips.c (mips_cpu_info_table): Add sb1. ! * config/mips/mips.h (processor_type): Add PROCESSOR_SB1. ! (TARGET_SB1, TUNE_SB1): New macros. ! * doc/invoke.texi: Add sb1 to documentation for MIPS -march and ! -mtune flags. ! 2002-08-01 David Edelsohn ! * varasm.c (asm_emit_uninitialized): Return false if global BSS ! and ASM_EMIT_BSS not supported by target. ! (assemble_variable): Do not duplicate uninitialized logic. ! Fall through if asm_emit_uninitialized failed. ! 2002-08-01 Chris Demetriou ! * config/mips/mips.h (BRANCH_LIKELY_P): Remove unused macro. ! 2002-08-02 Alan Modra ! * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define. ! (DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define. ! * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when ! HOST_BITS_PER_WIDE_INT == 64. ! 2002-08-01 Kaveh R. Ghazi ! * df.c (df_insn_table_realloc): Change parameter to unsigned. ! * optabs.c (expand_binop): Make variable unsigned. ! * simplify-rtx.c (simplify_subreg): Likewise. ! * unroll.c (unroll_loop): Cast to avoid signed/unsigned warnings. ! 2002-08-01 Franz Sirl ! * c-common.c (cb_register_builtins): Always define __GXX_ABI_VERSION. ! 2002-08-01 Richard Henderson ! * toplev.c (parse_options_and_default_flags): Don't set ! flag_reorder_blocks for -Os. ! * config/avr/avr.c (avr_optimization_options): Remove. ! * config/avr/avr.h (OPTIMIZATION_OPTIONS): Remove. ! * config/m68hc11/m68hc11.c (m68hc11_optimization_options): Remove. ! * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Remove. ! 2002-08-01 H.J. Lu ! Richard Henderson ! * output.h (DECL_READONLY_SECTION): Remove. ! (decl_readonly_section): Declare. ! * varasm.c (decl_readonly_section): New. ! (default_section_type_flags, default_select_section): Use it. ! * config/arm/pe.c (arm_pe_unique_section): Likewise. ! * config/i386/interix.c (i386_pe_unique_section): Likewise. ! * config/i386/winnt.c (i386_pe_unique_section): Likewise. ! * config/mcore/mcore.c (mcore_unique_section): Likewise. ! * config/mips/mips.c (mips_unique_section): Likewise. ! 2002-08-01 Richard Henderson ! * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it ! refers to a subroutine parameter. ! 2002-08-01 Jakub Jelinek ! * varasm.c (assemble_visibility): Strip name encoding. ! 2002-08-01 Ian Dall ! * config/ns32k/ns32k.h (TARGET_IEEE_COMPARE): Correct earlier patch. ! (RETURN_ADDR_RTX): Cannot determine return address for FRAME > 0 ! when there is no frame pointer. ! (INITIAL_FRAME_POINTER_OFFSET): Count stack space for saved fp ! registers properly. ! * config/ns32k/__unorddf2.c: New file. ! * config/ns32k/__unordsf2.c: New file. ! * config/ns32k/t-ns32k: New file. ! * config.gcc (ns32k-*-netbsd*): Use it. ! 2002-08-01 Aldy Hernandez ! * config/rs6000/rs6000.h (SPU_CONST_OFFSET_OK): Change to 0xff. ! 2002-08-01 Neil Booth ! * c-common.c (__GXX_ABI_VERSION): Correct spelling. ! 2002-08-01 Benjamin Kosnik ! * c-common.c (cb_register_builtins): Set __GXX_ABI_VERSION__ to 102. ! 2002-08-01 Richard Sandiford ! * config/mips/mips.md: Add [!]TARGET_MIPS16 to sgtu conditions. ! 2002-08-01 Zdenek Dvorak ! * gcse.c (expr_hash_table_size, n_exprs, set_hash_table_size, ! n_sets): Removed. ! (expr_hash_table, set_hash_table): Type changed to ... ! (struct hash_table): New type. ! (hash_scan_insn, hash_scan_set, hash_scan_clobber, hash_scan_call, ! insert_expr_in_table, insert_set_in_table, compute_hash_table, ! dump_hash_table, lookup_expr, lookup_set, compute_local_properties, ! compute_ae_gen, compute_ae_kill): Modified to pass the table explicitly. ! (alloc_set_hash_table, alloc_expr_hash_table): Merged to ... ! (alloc_hash_table): New. ! (free_set_hash_table, free_expr_hash_table): Merged to ... ! (free_hash_table): New. ! (compute_set_hash_table, compute_expr_hash_table): Merged to ... ! (compute_hash_table_work): New. ! (classic_gcse, one_classic_gcse_pass, compute_cprop_data, ! find_avail_set, one_cprop_pass, find_bypass_set, compute_pre_data, ! pre_edge_insert, pre_insert_copies, pre_delete, pre_gcse, ! one_pre_gcse_pass, compute_transpout, compute_code_hoist_vbeinout, ! hoist_code, one_code_hoisting_pass, ! trim_ld_motion_mems): Altered due to changed type of hash tables. ! 2002-08-01 Zack Weinberg ! * final.c (output_alternate_entry_point): ! If ASM_OUTPUT_TYPE_DIRECTIVE is defined, use it. ! 2002-08-01 Kaveh R. Ghazi ! * objc/objc-act.c (encode_complete_bitfield): Add prototype and ! avoid ISO C style function definition. ! * expr.c (expand_assignment): Delete unused variable. ! 2002-08-01 Toon Moene ! * c-common.c (cb_register_builtins): Set ! __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only ! is given, and to 0 otherwise. ! * combine.c (simplify_if_then_else): HONOR_NANS ! implies FLOAT_MODE_P. ! 2002-08-01 Neil Booth ! * cppinit.c (COMMAND_LINE_OPTIONS): Remove OPT_dollar. ! (cpp_handle_option): Don't handle it. ! (print_help): Update. ! * doc/cppopts.texi: Update. ! 2002-08-01 Neil Booth ! * c-common.c (cb_register_builtins): If C++, define ! __EXCEPTIONS, __DEPRECATED and __GXX_ABI_VERSION as appropriate. ! * gcc.c (cpp_unique_options): Remove __GXX_ABI_VERSION. ! cp: ! * lang-specs.h: Simplify in accordance with new code in ! c-common.c. ! 2002-08-01 Neil Booth ! * c-common.c: Define all C/ObjC/C++ warning and flag variables. ! * c-common.h: Declare all C/ObjC/C++ warning and flag variables. ! * c-decl.c: Move all warning and flag variables to c-common.c. ! * c-format.c: Move all warning variables to c-common.c. ! * c-tree.h: Move all warning and flag declarations to c-common.h. ! * objc/objc-act.c: Move all warning variables to c-common.c. ! (flag_warn_protocol): Rename warn_protocol. ! 2002-07-31 John David Anglin ! * pa-linux.h (GLOBAL_ASM_OP): Fix typo. ! 2002-07-31 Graham Stott ! * config/stormy16/stormy16.h (BSS_SECTION_ASM_OP): Add missing ! .section prefix. ! 2002-07-31 Stan Shebs ! * config.gcc (i[34567]86-*-darwin*): New configuration. ! * config/darwin.h (TARGET_ENCODE_SECTION_INFO): Undefine before ! defining. ! (TARGET_ENCODE_SECTION_INFO): Ditto. ! (ASM_PREFERRED_EH_DATA_FORMAT): Ditto. ! * config/darwin.c (machopic_indirect_data_reference): Remove ! setting of RTX_UNCHANGING_P. ! (machopic_legitimize_pic_address): Move RTX_UNCHANGING_P up so as ! not to be applied to sums. ! * config/i386/t-darwin: New file. ! * config/i386/darwin.h: New file. ! * config/i386/i386.h (TARGET_MACHO): Add default definition. ! * config/i386/i386.md (tablejump): Add TARGET_MACHO case. ! * config/i386/i386.c (output_set_got): For Mach-O, output Mach-O ! label and not the GOT add. ! (constant_address_p): For Mach-O, seeing a CONST is enough. ! (legitimate_pic_address_disp_p): Add a Mach-O case. ! (legitimate_address_p): Also test machopic_operand_p if Mach-O. ! (legitimize_pic_address): Use generic Mach-O code to legitimize. ! (output_pic_addr_const): Suppress @PLT if Mach-O, and parens ! if outputting a difference. ! (ix86_output_addr_diff_elt): Add Mach-O case. ! (ix86_expand_move): Similarly. ! (ix86_expand_call): Similarly. ! (current_machopic_label_num): New global. ! (machopic_output_stub): New function. ! (ix86_value_regno): New function. ! (ix86_function_value): Use it instead of VALUE_REGNO. ! (ix86_libcall_value): Ditto. ! * config/i386/unix.h (VALUE_REGNO): Remove. ! 2002-07-31 Graham Stott ! * config/rs6000/rs6000.c(rs6000_hash_constant): Fix ! hash for LABEL_REF's. ! 2002-07-31 Graham Stott ! * config/rs6000/rs6000.c (spe_init_builtins, ! altivec_init_builtins, rs6000_common_init_builtins): ! Replace ANSI with K&R function def. ! 2002-07-31 David Edelsohn ! * rs6000.c (validate_condition_mode): Test flag_finite_math_only ! for CCFPmode. ! 2002-07-31 Richard Sandiford ! * config/mips/crtn.asm: Don't use __mips16 to determine the ! return-address offset. Define RA to a suitable temporary ! register for the return address. ! 2002-07-31 Richard Sandiford ! * config/mips/mips.md (eh_set_lr_si, eh_set_lr_di): Change ! constraints to 'd'. ! 2002-07-30 Chris Demetriou ! * config/mips/elf.h (STARTFILE_SPEC): Define differently if ! default ABI is MEABI. (Undoes incorrect change in Eric Christopher's ! patch on 2002-07-29.) ! * config/mips/elf64.h (STARTFILE_SPEC): Likewise. ! 2002-07-30 Kaveh R. Ghazi ! * alpha.h, arc.h, arm/aout.h, avr.h, cris.h, d30v.h, dsp16xx.h, ! fr30.h, h8300.h, i370.h, i386/sco5.h, i386/unix.h, i960.h, ia64.h, ! ip2k.h, m32r.h, mcore.h, mips.h, mn10200.h, mn10300.h, ns32k.h, ! openbsd.h, pa/pa-linux.h, pdp11.h, romp.h, rs6000/sysv4.h, ! s390/linux.h, sh.h, sparc.h, stormy16.h, v850.h, vax.h, xtensa.h: ! (ASM_GLOBALIZE_LABEL): Delete. ! (GLOBAL_ASM_OP): Define. ! * m68hc11.h, m68k.h, m88k.h (ASM_GLOBALIZE_LABEL): Delete. ! * defaults.h (ASM_GLOBALIZE_LABEL): Provide a default. ! * doc/tm.texi (ASM_GLOBALIZE_LABEL): Update docs. ! 2002-07-30 Geoffrey Keating ! * doc/extend.texi (Hints implementation): Document that GCC ! mostly ignores `register'. ! 2002-07-30 Toon Moene ! * flags.h: Declare flag_finite_math_only. ! Use it in definition of HONOR_NANS and ! HONOR_INFINITIES. ! * c-common.c (cb_register_builtins): Emit ! __FINITE_MATH_ONLY__ when flag_finite_math_only ! is set. ! * combine.c (simplify_if_then_else): If ! flag_finite_math_only is set, a == b has a ! definite value. ! * toplev.c: Initialize flag_finite_math_only. ! (set_flags_fast_math): Set it on -ffast-math. ! (flag_fast_math_set_p): Test it. ! * doc/invoke.texi: Document -ffinite-math-only. ! 2002-07-30 Richard Henderson ! * ifcvt.c (noce_get_alt_condition): Use reg_overlap_mentioned_p. ! (noce_process_if_block): Likewise. ! 2002-07-30 Bernd Schmidt ! * ifcvt.c (cond_exec_process_if_block): Fix a merging error. ! Bail out early if false_expr is NULL and we'd crash due to this. ! * genemit.c (gen_expand): Recognize return insns even if the return ! appears in a parallel. ! * libgcc2.c: Expand macro DECLARE_LIBRARY_RENAMES if it is defined. ! * config/fp-bit.c: Likewise. ! * doc/tm.texi: Document it. ! 2002-07-30 David Edelsohn ! Zack Weinberg ! * rs6000.c (rs6000_expand_unop_builtin): Check icode not ! CODE_FOR_nothing. Change switch to if. ! (rs6000_expand_binop_builtin): Same. ! (rs6000_expand_builtin): Expand builtin if target support enabled. ! (rs6000_init_builtins): Init builtin if target support enabled. ! (rs6000_common_init_builtins): Check icode not CODE_FOR_nothing. ! 2002-07-30 Franz Sirl ! * gcc.c (cpp_unique_options): Define __GXX_ABI_VERSION, bump it to 101. ! 2002-07-30 Richard Sandiford ! * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Fix typo. ! 2002-07-30 J"orn Rennecke ! * sh.md (cond_delay_slot): New attribute. ! (cbranch delay): Use it for anulled-true case. ! (stuff_delay_slot): New pattern. ! * sh.c (print_operand, case '.'): Don't print .s / /s fore zero-length ! delay slot insn. ! (gen_far_branch): Emit stuff_delay_slot pattern. ! 2002-07-30 J"orn Rennecke ! * unroll.c (copy_loop_body): Don't copy NOTE_INSN_LOOP_CONT. ! 2002-07-30 Kazu Hirata ! * fold-const.c: Fix comment typos. ! * gcse.c: Likewise. ! * reload1.c: Likewise. ! 2002-07-29 Aldy Hernandez ! * config/rs6000/rs6000.md: Disallow CCEQ compare with crnor/crnot ! for TARGET_SPE. ! 2002-07-30 Gabriel Dos Reis ! * c-pretty-print.h (pp_c_statement): Declare. ! * c-pretty-print.c (pp_c_postfix_expression): #if 0 support for SRCLOC. ! (pp_c_statement): Define. ! 2002-07-30 Kaveh R. Ghazi ! * alpha.h, arc.h, arm/aout.h, avr.h, c4x.h, cris.h, d30v.h, ! darwin.h, dsp16xx.h, fr30.h, h8300.h, i370.h, i386.h, i960.h, ! ip2k.h, m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h, mips.h, ! mn10200.h, mn10300.h, ns32k.h, pa/pa-linux.h, pdp11.h, romp.h, ! rs6000/sysv4.h, s390/linux.h, sh.h, sparc.h, stormy16.h, ! v850.h, vax.h, xtensa.h (ASM_OUTPUT_LABEL): Delete definition. ! * defaults.h (ASM_OUTPUT_LABEL): Provide a default. ! * doc/tm.texi (ASM_OUTPUT_LABEL): Update docs. ! 2002-07-30 Gabriel Dos Reis ! * c-pretty-print.c (pp_c_primary_expression): Handle STMT_EXPR. ! (pp_c_postfix_expression): Handle ARROW_EXPR, FFS_EXPR, ! COMPOUND_LITERAL_EXPR, VA_ARG_EXPR. ! (pp_c_expression): Update. ! 2002-07-29 Kaveh R. Ghazi ! * alpha/vms-cc.c (preprocess_args, main): Use xstrdup and/or ! concat in lieu of xmalloc/strcpy/memcpy/sprintf. ! * alpha/vms-ld.c (main): Likewise. ! * dsp16xx.c (double_reg_to_memory): Likewise. ! * mcore.c (mcore_expand_prolog): Likewise. ! * cppfiles.c (read_name_map): Likewise. ! * gensupport.c (process_rtx, identify_predicable_attribute, ! alter_test_for_insn): Likewise. ! * vmsdbgout.c (write_rtnbeg, vmsdbgout_init): Likewise. ! 2002-07-29 Roger Sayle ! * builtins.c (expand_builtin): Change the default behavior to ! only issue an error if the builtin function doesn't have a ! fallback library call. Remove several cases handled by the ! new default. ! 2002-07-29 John David Anglin ! * real.c (ieee_24, ieee_53, ieee_64, ieee_113): Define only if the ! floating point format of the target is IEEE. ! * (dec_f, dec_d, dec_g, dec_h): Define only if the floating point ! format of the target is DEC. ! 2002-07-29 Richard Henderson ! * unroll.c (verify_addresses): Remove. ! (find_splittable_givs): Never split DEST_ADDR givs. ! 2002-07-29 Geoffrey Keating ! * doc/gty.texi (GGC Roots): Clarify that the list of syntaxes ! is exhaustive. ! (Files): Improve documentation on generated source files. ! * doc/extend.texi (Translation implementation): Document what ! diagnostics look like. ! (Identifiers implementation): Document that there's normally no ! limit on identifier names. ! (Integers implementation): Document two's complement. ! (Hints implementation): Document that GCC honors 'inline', mostly. ! (Preprocessing directives implementation): Document that GCC ! requires the current time. ! 2002-07-30 Gabriel Dos Reis ! * c-pretty-print.h (struct c_pretty_print_info): Add new member. ! (pp_initializer): New macro. ! (pp_c_initializer): Declare. ! * c-pretty-print.c (pp_c_primary_expression): HAndle TARGET_EXPR. ! (pp_c_initializer): Define. ! (pp_c_initializer_list): New function. ! (pp_c_postfix_expression): Handle ABS_EXPR, COMPLEX_CST, ! VECTOR_CST, CONSTRUCTOR. ! (pp_c_unary_expression): Handle CONJ_EXPR, REALPART_EXPR, ! IMAGPART_EXPR. ! (pp_c_cast_expression): Handle FLOAT_EXPR. ! (pp_c_assignment_expression): Handle INIT_EXPR. ! (pp_c_expression): Update. ! 2002-07-30 Neil Booth ! * objc/objc-act.c (objc_init): Return immediately if filename ! is NULL. ! 2002-07-29 Eric Christopher ! * config/mips/elf.h: Remove ecoff.h and gofast includes. ! (DWARF2_DEBUGGING_INFO, DBX_DEBUGGING_INFO): Define unconditionally. ! (SDB_DEBUGGING_INFO): Undefine. ! (PREFERRED_DEBUGGING_TYPE): Set to DWARF2_DEBUG. ! (PUT_SDB_SIZE): Remove. ! (SUBTARGET_ASM_DEBUGGING_SPEC): Redefine. ! (STARTFILE_SPEC): Add isa3264 define. ! * config/mips/elf64.h: Ditto. Move TARGET_MEM_FUNCTIONS from here... ! * config/mips/ecoff.h: Remove. and here... ! * config/mips/iris3.h: and here... ! * config/mips/sni-svr4.h: and here... ! * config/mips/mips.h: To here. Remove OBJECT_FORMAT_ROSE ifdefs. ! Add assembler -mmdebug options for non-dwarf debugging. ! * config/mips/r3900.h: Remove debug info defines. ! * config/mips/isa32-linux.h: Remove, move functionality to config.gcc. ! * config/mips/isa3264.h: Ditto. ! * config/mips/t-isa3264: Fix up for file removal and gofast configure ! change. ! * config/mips/t-elf: Ditto. ! * config/mips/t-ecoff: Ditto. ! * config/mips/t-r3900: Ditto. ! * config/mips/t-iris5-6: Ditto. ! * config/mips/t-isa3264: Ditto. ! * config/mips/t-linux: Remove. ! * config/mips/t-netbsd: Remove. ! * config/mips/t-mips: New file. ! * config/mips/t-gofast: Ditto. ! * config/mips/netbsd.h: Remove unnecessary undefines. ! * config/mips/linux.h: Remove #include of mips.h. ! * config.gcc: Add mips.h include for elf targets. Remove tm_file ! for ecoff. Add gofast configure option for mips. ! 2002-07-29 Chris Demetriou ! * configure.in (mips*-*-*): Add a test to see if MIPS libgloss ! linker scripts use STARTUP directives consistently. ! * configure: Regenerate. ! * config.in: Regenerate. ! * config/mips/elf.h (STARTFILE_SPEC): Define conditionally, based ! on whether HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES is defined. ! * config/mips/elf64.h (STARTFILE_SPEC): Likewise. ! * config/mips/isa3264.h (STARTFILE_SPEC): Do not redefine if ! HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES is set; the result ! will be the same. ! 2002-07-29 Aldy Hernandez ! * config/rs6000/rs6000.md ("cpu"): Add ppc8540 to attribute. ! 2002-07-29 Aldy Hernandez ! * config/rs6000/rs6000.h (RTX_COSTS): Add MULT case for 8540. ! 2002-07-29 Aldy Hernandez ! * config/rs6000/rs6000.md: Move altivec patterns from here... ! * config/rs6000/altivec.md: ...to here. ! 2002-07-29 Aldy Hernandez ! * config/rs6000/spe.md ("spe_evmra"): Change to unspec. ! 2002-07-29 Richard Henderson ! * emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from ! set_mem_attributes and add BITPOS argument. Subtract it from ! OFFSET when same is adjusted. ! (set_mem_attributes): New wrapper function. ! * expr.c (expand_assignment): Use set_mem_attributes_minus_bitpos; ! remove offset adjustment hack. ! * expr.h (set_mem_attributes_minus_bitpos): Declare. ! 2002-07-29 Gabriel Dos Reis ! * Makefile.in (C_OBJS): Include c-pretty-print.o ! (c-pretty-print.o): Add depency rule. ! * pretty-print.h: Add more macros. ! * c-pretty-print.c: New file. ! * c-pretty-print.h: Likewise. ! 2002-07-29 Aldy Hernandez ! * config/rs6000/spe.h (__internal_ev_mwhgumian): Cast vector ! constants to __ev64_s32__. ! (__internal_ev_mwhgsmian): Same. ! (__internal_ev_mwhgsmfan): Same. ! (__internal_ev_mwhgssfan): Same. ! (__internal_ev_mwhgumiaa): Same. ! (__internal_ev_mwhgsmiaa): Same. ! (__internal_ev_mwhgsmfaa): Same. ! (__internal_ev_mwhgssfaa): Same. ! 2002-07-29 David Edelsohn ! * varasm.c (assemble_variable): Narrow test for uninitialized ! without BSS target support. ! 2002-07-29 Nathan Sidwell ! * profile.c: Add file comment describing the overall algorithm and ! structures. ! (struct edge_info): Add comments. ! (struct bb_info): Add comments. ! * basic-block.h (EDGE_*): Add comments. ! * doc/gcov.texi (Gcov Data Files): Document bit flags. ! 2002-07-29 Bob Wilson ! * config/xtensa/elf.h, config/xtensa/linux.h ! (TARGET_OS_CPP_BUILTINS): Define. ! (CPP_PREDEFINES): Remove. ! * config/xtensa/xtensa.h (TARGET_CPU_CPP_BUILTINS): Define. ! (CPP_SPEC): Remove. ! 2002-07-29 Zack Weinberg ! * gensupport.c: Include hashtab.h. ! (insn_elision, condition_table, hash_c_test, cmp_c_test, ! maybe_eval_c_test): New routines and data structures to ! support insn elision. ! (init_md_reader): Read and initialize the condition_table. ! (read_md_rtx): Discard insn patterns whose C test is provably ! always false. ! * gensupport.h: Declare new functions and data structures. ! * genconditions.c, dummy-conditions.c: New files. ! * Makefile.in: Build genconditions; run it to construct ! insn-conditions.c; build that and link it into most gen* ! programs. ! (HOST_SUPPORT, HOST_EARLY_SUPPORT): New variables. ! (GEN): Delete, unused. ! (STAGESTUFF): Update. ! * gencodes.c: (gen_insn): #define CODE_FOR_xxx equal to ! CODE_FOR_nothing for all elided patterns. ! (main): Tweaked to support this. ! * genflags.c (gen_proto): Emit a static inline generator ! function here for all elided patterns, which simply returns ! NULL_RTX. ! (gen_insn): Do not define HAVE_xxx for elided patterns. ! (main): Tweaked to support this. No need to forward-declare ! struct rtx_def. ! * genrecog.c: Do not bother emitting the C test if it's known ! to be true at compile time. ! 2002-07-29 Mike Stump ! * config.gcc (target_gtfiles): Initialize, as otherwise cross ! compilers hosted on powerpc-apple-darwin6.0 won't even build. ! 2002-07-29 Richard Earnshaw ! * arm.md (sibcall, sibcall_value): Add RETURN as part of the pattern, ! remove clobber of LR. ! (sibcall_insn, sibcall_value_insn): Update accordingly. ! (sibcall_epilogue): Remove debugging comment from assembler stream. ! 2002-07-29 Gabriel Dos Reis ! * pretty-print.h: Define more macros. ! * diagnostic.h (output_formatted_integer): Moved from... ! * diagnostic.c: ... here. ! 2002-07-28 Kaveh R. Ghazi ! * stormy16.h (ASM_OUTPUT_SYMBOL_REF): Use ASM_OUTPUT_LABEL_REF. ! 2002-07-28 Zack Weinberg ! * defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two ! arguments. Always use ".-symbol" as expression argument. ! * doc/tm.texi: Update to match. Document requirement for ! ".size symbol, .-symbol" to be acceptable to assembler. ! * config/elfos.h, config/netbsd-aout.h, config/openbsd.h, ! config/arm/elf.h, config/avr/avr.h, config/cris/aout.h, ! config/i386/freebsd-aout.h, config/i386/sco5.h, ! config/ip2k/ip2k.h, config/m88k/m88k.h, config/xtensa/elf.h, ! config/xtensa/linux.h: Update uses of ASM_OUTPUT_MEASURED_SIZE. ! 2002-07-28 Kaveh R. Ghazi ! * Makefile.in (gengtype-lex.c): Fix error in last change. ! * alpha/freebsd.h (TARGET_OS_CPP_BUILTINS): Add missing ! backslash. ! * Makefile.in (vmsdbgout.o): Depend on function.h. ! * vmsdbgout.c: Include function.h. ! 2002-07-28 Alan Modra ! * prefix.c (update_path): Don't strip single `.' path components ! unless stripping a later `..' component. Exit loop as soon as ! a valid path is found. ! 2002-07-27 Roger Sayle ! * builtins.def [DEF_GCC_BUILTIN]: Require an explicit ATTRS ! argument. Mark BUILT_IN_RETURN, BUILT_IN_EH_RETURN, ! BUILT_IN_LONGJMP and BUILT_IN_TRAP as noreturn, the ISO C99 ! floating point unordered comparisons (e.g. __builtin_isgreater) ! as const, and leave the remaining GCC_BUILTINs unchanged. ! * c-decl.c (builtin_function): No need to explicitly mark ! BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. ! 2002-07-27 Roger Sayle ! * Makefile.in: rtlanal.o now depends upon real.h. ! * flags.h [flag_signaling_nans]: New flag. ! [HONOR_SNANS]: New macro. ! * toplev.c [flag_signaling_nans]: Initialize to false. ! (f_options): Add processing for "-fsignaling-nans". ! (set_fast_math_flags): Clear flag_signaling_nans with -ffast-math. ! (process_options): flag_signaling_nans implies flag_trapping_math. ! * c-common.c (cb_register_builtins): Define __SUPPORT_SNAN__ ! when -fsignaling-nans. First step to implementing WG14's N965. ! * fold-const.c (fold) [MULT_EXPR]: Conditionalize transforming ! 1.0 * x into x, and -1.0 * x into -x on !HONOR_SNANS. ! [RDIV_EXPR]: Conditionalize x/1.0 into x on !HONOR_SNANS. ! * simplify-rtx.c (simplify_relational_operation): Conditionalize ! transforming abs(x) < 0.0 into false on !HONOR_SNANS. ! * rtlanal.c: #include real.c for TARGET_FLOAT_FORMAT definitions ! required by HONOR_SNANS. (may_trap_p): Floating point DIV, MOD, ! UDIV, UMOD, GE, GT, LE, LT and COMPARE may always trap with ! -fsignaling_nans. EQ and NE only trap for flag_signaling_nans ! not flag_trapping_math (i.e. HONOR_SNANS but not HONOR_NANS). ! * doc/invoke.texi: Document new -fsignaling-nans compiler option. ! 2002-07-27 Kaveh R. Ghazi ! * Makefile.in (gengtype-lex.c): Work around a bug in flex. ! * gengtype-lex.l (YY_USE_PROTOS): Undef. ! (YY_DECL): Define. ! 2002-07-27 Roger Sayle ! * doc/invoke.texi: Document that both -fno-builtin-foo and ! -fno-builtin are supported by the g++ front-end. ! 2002-07-27 Stan Shebs ! * configure.in: Rename config_gtfiles to target_gtfiles. ! * configure: Regenerate. ! * doc/gty.texi: Update reference. ! * config.gcc (powerpc-*-darwin*): Set target_gtfiles ! instead of appending to it. ! 2002-07-25 Aldy Hernandez ! * config/rs6000/rs6000.c (function_arg_advance): SPE vararg ! vectors are split into two registers. ! (function_arg): Same. ! 2002-07-26 J"orn Rennecke ! * pa.md (extv): Check predicates before emitting extv_32. ! 2002-07-27 Alan Modra ! * config/rs6000/rs6000.c (rs6000_traceback_name): New var. ! (rs6000_traceback): New var. ! (rs6000_override_options): Set rs6000_traceback. ! (rs6000_output_function_epilogue): Implement traceback options. ! * config/rs6000/rs6000.h (TARGET_OPTIONS): Add "traceback=". ! (rs6000_traceback_name): Declare. ! * config/rs6000/rs6000.c (output_profile_hook): Don't generate profile ! label reference when NO_PROFILE_COUNTERS. ! 2002-07-26 Jason Merrill ! * function.c (assign_parms): Handle frontend-directed pass by ! invisible reference. ! 2002-07-26 Neil Booth ! * doc/cppopts.texi: Update. ! 2002-07-26 Neil Booth ! * cppmacro.c (_cpp_create_definition): Don't attempt redefinition ! warnings on assertions. ! 2002-07-26 Neil Booth ! * c-common.h (RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ, ! RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, RID_BITAND, RID_BITOR, ! RID_COMPL): Remove. ! * c-parse.in (rid_to_yy): Similarly. ! 2002-07-26 Jason Merrill ! * c-dump.c: Resurrect. ! * tree-dump.c: Move C-specific stuff to c-dump.c. ! * c-common.h: Declare c_dump_tree. ! * c-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN): Define. ! * Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o. ! (c-dump.o): New rule. ! 2002-07-26 Alan Modra ! * config/rs6000/rs6000.md: Enable patterns using rlwinm for ! PowerPC64. Replace "T" and "S" constraints with "n" when the ! predicate will do. Formatting fixes. ! (extzvsi_internal2): Use "andi.", "andis." and attr type of "compare" ! as for extzvsi_internal1. ! 2002-07-25 Neil Booth ! * dwarfout.c (VERSION_ASM_OP, DERIV_BEGIN_LABEL_FMT, ! DERIV_END_LABEL_FMT): Remove. ! (SL_BEGIN_LABEL_FMT, SL_END_LABEL_FMT): Move. ! 2002-07-25 Neil Booth ! * objc/objc-act.c (UTAG_STATICS, UTAG_PROTOCOL_LIST, USERTYPE): ! Remove. ! 2002-07-25 Stan Shebs ! * config/rs6000/rs6000.c (rs6000_emit_prologue): Remove unused ! local var dwarfp. ! (output_compiler_stub): Remove unused locals. ! (output_call): Always initialize line number. ! 2002-07-25 J"orn Rennecke ! * sh.h (LOAD_EXTEND_OP): QImode zero-extends on SHmedia. ! * sh.md (truncdiqi2, movqi_media): Likewise. ! 2002-07-25 Neil Booth ! * gcse.c (obstack_chunk_alloc): Remove. ! (gcse_alloc): Fix to count allocated bytes. ! * collect2.c (SYMBOL__MAIN): Remove. ! 2002-07-25 Neil Booth ! * gcc.c (TARGET_EXECUTABLE_SUFFIX): Only used if ! HAVE_TARGET_EXECUTABLE_SUFFIX. ! 2002-07-25 J"orn Rennecke ! * rtl.h (mem_attrs): Spell out more clearly the roles of ALIGN, ! SIZE, EXPR and OFFSET. ! 2002-07-25 Richard Henderson ! * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos ! in ARRAY_REF of DECL_P case. ! 2002-07-25 Richard Sandiford ! * doc/invoke.texi: Document -mabi=meabi, and expand on the EABI ! description. Document -mips32, -mips64, and the associated -march ! values. Describe the "mipsN" arguments to -march. Say that the ! -mipsN options are equivalent to -march. Reword the description ! of default type sizes. ! * toplev.h (target_flags_explicit): Declare. ! * toplev.c (target_flags_explicit): New var. ! (set_target_switch): Update target_flags_explicit. ! * config/mips/abi64.h (SUBTARGET_TARGET_OPTIONS): Undefine. ! * config/mips/elf64.h (MIPS_ISA_DEFAULT): Undefine. ! * config/mips/iris6.h (SUBTARGET_ASM_SPEC): -mabi=64 implies -mips3. ! * config/mips/isa3264.h (MIPS_ENABLE_EMBEDDED_O32): Undefine. ! * config/mips/mips.h (mips_cpu_info): New struct. ! (mips_cpu_string, mips_explicit_type_size_string): Remove. ! (mips_cpu_info_table, mips_arch_info, mips_tune_info): Declare. ! (MIPS_CPP_SET_PROCESSOR): New macro. ! (TARGET_CPP_BUILTINS): Declare a macro for each supported processor. ! Define _MIPS_ARCH and _MIPS_TUNE. ! (MIPS_ISA_DEFAULT): Don't provide a default value. Instead... ! (MIPS_CPU_STRING_DEFAULT): Set to "from-abi" if neither it nor ! MIPS_ISA_DEFAULT were already defined. ! (MULTILIB_DEFAULTS): Add MULTILIB_ABI_DEFAULT. ! (TARGET_OPTIONS): Remove -mcpu and -mexplicit-type-size. ! (ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New. ! (GAS_ASM_SPEC): Remove -march, -mcpu, -mgp* and -mabi rules. ! (ABI_GAS_ASM_SPEC): Remove. ! (MULTILIB_ABI_DEFAULT, ASM_ABI_DEFAULT_SPEC): New macros. ! (ASM_SPEC): Add -mgp32, -mgp64, -march, -mabi=eabi and -mabi=o64. ! Invoke %(asm_abi_default_spec) if no ABI was specified. ! (CC1_SPEC): Remove ISA -> register-size rules. ! (EXTRA_SPECS): Remove abi_gas_asm_spec. Add asm_abi_default_spec. ! * config/mips/mips.c (mips_arch_info, mips_tune_info): New vars. ! (mips_cpu_string, mips_explicit_type_size_string): Remove. ! (mips_cpu_info_table): New array. ! (mips_set_architecture, mips_set_tune): New fns. ! (override_options): Rework to make -mipsN equivalent to -march. ! Detect more erroneous cases, including those removed from CC1_SPEC. ! Don't change the ABI based on architecture, or vice versa. ! Unify logic with GAS. ! (mips_asm_file_start): Get architecture name from mips_arch_info. ! (mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns. ! (mips_parse_cpu): Take the name of the option as argument. Handle ! 'from-abi'. Raise an error if the option is wrong. ! (mips_cpu_info_from_isa): New fn. ! 2002-07-25 Richard Sandiford ! * config/mips/mips.md (tablejump_mips161): Use gen_rtx_LABEL_REF. ! (tablejump_mips162): Likewise. ! 2002-07-25 J"orn Rennecke ! * simpify-rtx.c (simplify_subreg): Don't pass MODE_CC mode to ! int_mode_for_mode. ! 2002-07-25 Gabriel Dos Reis ! * c-common.c (c_sizeof_or_alignof_type): Take a third argument for ! complaining. ! * c-common.h (c_sizeof): Adjust definition. ! (c_alignof): Likewise. ! * c-tree.h (c_sizeof_nowarn): Now macro. ! * c-typeck.c (c_sizeof_nowarn): Remove definition. ! 2002-07-25 Neil Booth ! * c-decl.c (c_decode_option): No need to handle switches ! cpplib handles. ! 2002-07-24 Zack Weinberg ! * defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE, ! ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros. ! * doc/tm.texi: Document them. Also document SIZE_ASM_OP, ! TYPE_ASM_OP, and TYPE_OPERAND_FMT. ! * config/elfos.h, config/netbsd-aout.h, config/openbsd.h, ! config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h, ! config/cris/aout.h, config/i386/freebsd-aout.h, ! config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h, ! config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h, ! config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h, ! config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h, ! config/pa/pa64-hpux.h, config/rs6000/sysv4.h, ! config/xtensa/elf.h, config/xtensa/linux.h: ! Use the new macros. ! Where possible, remove redundant definitions of SIZE_ASM_OP, ! TYPE_ASM_OP, and TYPE_OPERAND_FMT. ! 2002-07-24 Aldy Hernandez ! * config/rs6000/eabi.h: Define TARGET_SPE_ABI, TARGET_SPE, ! TARGET_ISEL, and TARGET_FPRS. ! * doc/invoke.texi (RS/6000 and PowerPC Options): Document ! -mabi=spe, -mabi=no-spe, and -misel=. ! * config/rs6000/rs6000-protos.h: Add output_isel. ! Move vrsave_operation prototype here. ! * config/rs6000/rs6000.md (sminsi3): Allow pattern for TARGET_ISEL. ! (smaxsi3): Same. ! (uminsi3): Same. ! (umaxsi3): Same. ! (abssi2_nopower): Disallow when TARGET_ISEL. ! (*ne0): Same. ! (negsf2): Change to expand and rename old pattern to *negsf2. ! (abssf2): Change to expand and rename old pattern to *abssf2. ! New expanders: fix_truncsfsi2, floatunssisf2, floatsisf2, ! fixunssfsi2. ! Change patterns that check for TARGET_HARD_FLOAT or ! TARGET_SOFT_FLOAT to also check TARGET_FPRS. ! * config/rs6000/rs6000.c: New globals: rs6000_spe_abi, ! rs6000_isel, rs6000_fprs, rs6000_isel_string. ! (rs6000_override_options): Add 8540 case to ! processor_target_table. ! Set rs6000_isel for the 8540. ! Call rs6000_parse_isel_option. ! (enable_mask_for_builtins): New. ! (rs6000_parse_isel_option): New. ! (rs6000_parse_abi_options): Add spe and no-spe. ! (easy_fp_constant): Treat !TARGET_FPRS as soft-float. ! (rs6000_legitimize_address): Check for TARGET_FPRS when checking ! for TARGET_HARD_FLOAT. ! Add case for SPE_VECTOR_MODE. ! (rs6000_legitimize_reload_address): Handle SPE vector modes. ! (rs6000_legitimate_address): Disallow PRE_INC/PRE_DEC for SPE ! vector modes. ! Check for TARGET_FPRS when checking for TARGET_HARD_FLOAT. ! (rs6000_emit_move): Check for TARGET_FPRS. ! Add cases for SPE vector modes. ! (function_arg_boundary): Return 64 for SPE vector modes. ! (function_arg_advance): Check for TARGET_FPRS and ! Handle SPE vectors. ! (function_arg): Same. ! (setup_incoming_varargs): Check for TARGET_FPRS. ! (rs6000_va_arg): Same. ! (struct builtin_description): Un-constify mask field. Move up in ! file. ! (bdesc_2arg): Un-constify and add SPE builtins. ! (bdesc_1arg): Same. ! (bdesc_spe_predicates): New. ! (bdesc_spe_evsel): New. ! (rs6000_expand_unop_builtin): Add SPE 5-bit literal builtins. ! (rs6000_expand_binop_builtin): Same. ! (bdesc_2arg_spe): New. ! (spe_expand_builtin): New. ! (spe_expand_predicate_builtin): New. ! (spe_expand_evsel_builtin): New. ! (rs6000_expand_builtin): Call spe_expand_builtin for SPE. ! (rs6000_init_builtins): Initialize SPE builtins. Call ! rs6000_common_init_builtins. ! (altivec_init_builtins): Move all non-altivec builtin code to... ! (rs6000_common_init_builtins): ...here. New function. ! (branch_positive_comparison_operator): Allow NE code for SPE. ! (ccr_bit): Return correct ccr bit for SPE fp. ! (print_operand): Emit crnor in 'D' case for SPE. ! New case 't'. ! Add SPE code for 'y' case. ! (rs6000_generate_compare): Generate rtl for SPE fp. ! (output_cbranch): Handle SPE hard floats. ! (rs6000_emit_cmove): Handle isel. ! (rs6000_emit_int_cmove): New. ! (output_isel): New. ! (rs6000_stack_info): Adjust stack frame so GPRs are saved in ! 64-bits for SPE. ! (debug_stack_info): Add SPE info. ! (gen_frame_mem_offset): New. ! (rs6000_emit_prologue): Save GPRs in 64-bits for SPE abi. ! Change mode of frame pointer, when saving it, to Pmode. ! (rs6000_emit_epilogue): Restore GPRs in 64-bits for SPE abi. ! Misc cleanups and use gen_frame_mem_offset when appropriate. ! * config/rs6000/rs6000.h (processor_type): Add PROCESSOR_PPC8540. ! (TARGET_SPE_ABI): New. ! (TARGET_SPE): New. ! (TARGET_ISEL): New. ! (TARGET_FPRS): New. ! (FIXED_SCRATCH): New. ! (RTX_COSTS): Add PROCESSOR_PPC8540. ! (ASM_CPU_SPEC): Add case for 8540. ! (TARGET_OPTIONS): Add isel= case. ! (rs6000_spe_abi): New. ! (rs6000_isel): New. ! (rs6000_fprs): New. ! (rs6000_isel_string): New. ! (UNITS_PER_SPE_WORD): New. ! (LOCAL_ALIGNMENT): Adjust for SPE. ! (HARD_REGNO_MODE_OK): Same. ! (DATA_ALIGNMENT): Same. ! (MEMBER_TYPE_FORCES_BLK): New. ! (FIRST_PSEUDO_REGISTER): Set to 113. ! (FIXED_REGISTERS): Add SPE registers. ! (reg_class): Same. ! (REG_CLASS_NAMES): Same. ! (REG_CLASS_CONTENTS): Same. ! (REGNO_REG_CLASS): Same. ! (REGISTER_NAMES): Same. ! (DEBUG_REGISTER_NAMES): Same. ! (ADDITIONAL_REGISTER_NAMES): Same. ! (CALL_USED_REGISTERS): Same. ! (CALL_REALLY_USED_REGISTERS): Same. ! (SPE_ACC_REGNO): New. ! (SPEFSCR_REGNO): New. ! (SPE_SIMD_REGNO_P): New. ! (HARD_REGNO_NREGS): Adjust for SPE. ! (VECTOR_MODE_SUPPORTED_P): Same. ! (REGNO_REG_CLASS): Same. ! (FUNCTION_VALUE): Same. ! (LIBCALL_VALUE): Same. ! (LEGITIMATE_OFFSET_ADDRESS_P): Same. ! (SPE_VECTOR_MODE): New. ! (CONDITIONAL_REGISTER_USAGE): Disable FPRs when target does FP on ! the GPRs. Set FIXED_SCRATCH fixed in SPE case. ! (rs6000_stack): Add spe_gp_size, spe_padding_size, ! spe_gp_save_offset. ! (USE_FP_FOR_ARG_P): Check for TARGET_FPRS. ! (LEGITIMATE_LO_SUM_ADDRESS_P): Same. ! (SPE_CONST_OFFSET_OK): New. ! (rs6000_builtins): Add SPE builtins. ! * testsuite/gcc.dg/ppc-spe.c: New. ! * config/rs6000/eabispe.h: New. ! * config/rs6000/spe.h: New. ! * config/rs600/spe.md: New. ! * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define ! __SIMD__ for TARGET_SPE. ! * config.gcc: Add powerpc-*-eabispe* case. ! Add spe.h to user headers for powerpc. ! 2002-07-24 Chris Demetriou ! * config/mips/elf.h (STARTFILE_SPEC): Undo previous change. ! * config/mips/elf64.h (STARTFILE_SPEC): Likewise. ! * config/mips/isa3264.h (STARTFILE_SPEC): Likewise. ! 2002-07-24 Richard Henderson ! * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Use GOTO_SUBROUTINE_EXPR ! form when not optimizing. ! 2002-07-24 David Mosberger ! * config/ia64/ia64.c (gen_thread_pointer): Fix typo in marking ! thread_pointer_rtx as unchanging. ! 2002-07-24 Michael Matz ! * ra-colorize.c (INV_REG_ALLOC_ORDER): New macro. ! (free_reg): Use it. ! 2002-07-24 Richard Earnshaw ! * arm.md (arm_buneq, arm_bltgt): put '\' before ';' in output ! pattern. ! (arm_buneq_reversed, arm_bltgt_reversed): Likewise. ! (movsicc, movsfcc, movdfcc): FAIL if UNEQ or LTGT. ! 2002-07-24 Chris Demetriou ! * config/mips/elf.h (STARTFILE_SPEC): Never include crt0.o. ! * config/mips/elf64.h (STARTFILE_SPEC): Likewise. ! * config/mips/isa3264.h (STARTFILE_SPEC): Do not redefine. ! 2002-07-24 Jan Hubicka ! * toplev.c (rest_of_compilation): Dump loops before clobbering ! the structure. ! 2002-07-24 Jan Hubicka ! * rtlanal.c (keep_with_call_p): Avoid overflow in fixed_regs. ! 2002-07-24 Frank van der Linden ! PR optimization/7291 ! * config/i386/i386.c (ix86_expand_clrstr): Fix bzero alignment ! problem on x86_64. ! 2002-07-24 Gabriel Dos Reis ! * pretty-print.h: Add macros from cp/error.c ! 2002-07-24 Alan Modra ! * config/rs6000/rs6000-protos.h (mask_operand_wrap): Declare. ! (mask64_2_operand): Declare. ! (build_mask64_2_operands): Declare. ! (and64_2_operand): Declare. ! (extract_MB): Declare. ! (extract_ME): Declare. ! * config/rs6000/rs6000.c (mask64_operand): Allow all ones. Remove ! CONST_DOUBLE code. ! (mask_operand_wrap): New insn predicate. ! (mask64_2_operand): Likewise. ! (and64_2_operand): Likewise. ! (build_mask64_2_operands): New function. ! (extract_MB): New function. ! (extract_ME): New function. ! (print_operand ): Use extract_MB and extract_ME. ! (print_operand ): Allow all ones. Remove CONST_DOUBLE support. ! * config/rs6000/rs6000.h (EXTRA_CONSTRAINT): Add 't'. ! (PREDICATE_CODES): Add and64_2_operand, mask_operand_wrap and ! mask64_2_operand. Remove CONST_DOUBLE from mask64_operand. ! * config/rs6000/rs6000.md (andsi3_internal3): New ! (andsi3_internal3+1): Enable split for powerpc64. ! (andsi3_internal3+2): New split. ! (andsi3_internal4): Renamed old andsi3_internal3. ! (andsi3_internal5): New. ! (andsi3_internal5+1): Enable split for powerpc64. ! (andsi3_internal5+2): New split. ! (andsi3_internal6, andsi3_internal7, andsi3_internal8): New. ! (anddi3): Handle 't' constraint. ! (anddi3+1): New split. ! (anddi3_internal2): Handle 't' constraint. ! (anddi3_internal2+1): New split. ! (anddi3_internal3): Handle 't' constraint. ! (anddi3_internal3+1): New split. ! 2002-07-24 Alan Modra ! * config/rs6000/rs6000.md: Remove scratch reg on insns using ! addze and similar (plus (comparison r1 r2) r3) insns. Add ! missing scratch reg in one case. Formatting fixes. ! 2002-07-24 Neil Booth ! * cppexp.c (parse_defined): Mark macro used. ! * cpphash.h (struct cpp_macro): New member "used". ! (_cpp_mark_macro_used, _cpp_warn_if_unused_macro): New. ! (struct cpp_reader): New member. ! * cppinit.c (cpp_finish_options): Set first_unused_line. ! (cpp_finish): Warn of unused macros if requested. ! (OPT_TABLE): New switches. ! (cpp_handle_option): Handle them. ! * cpplib.c (do_undef): Warn if macro unused. ! (do_ifdef, do_ifndef): Mark macro used. ! * cpplib.h (struct cpp_options): New member. ! * cppmacro.c (_cpp_warn_if_unused_macro): New. ! (enter_macro_context): Mark macro used. ! (_cpp_create_definition): Mark macro unused; warn if unused ! when redefined. ! * cpptrad.c (scan_out_logcial_line, push_replacement_text): ! Mark macros used. ! * doc/cppopts.texi: Update. ! 2002-07-23 Neil Booth ! * dwarf2out.c (SECTION_ASM_OP, ! ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. ! * system.h (SECTION_ASM_OP): Poison. ! * tree.c (FILE_FUNCTION_PREFIX_LEN): Remove. ! * config/alpha/alpha-interix.h, config/mips/linux.h ! (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. ! * config/mmix/mmix-protos.h, config/mmix/mmix.c ! (mmix_asm_output_define_label_difference_symbol): Remove. ! * config/mmix/mmix.h ! (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. ! * doc/tm.texi: Remove documentation. ! 2002-07-23 J"orn Rennecke ! * recog.c (asm_operand_ok): Allow float CONST_VECTORs for 'F'. ! (constrain_operands): Likewise. ! * regclass.c (record_reg_classes): Likewise. ! * reload.c (find_reloads): Likewise. ! * doc/md.texi: Likewise. ! * reload.c (find_reloads_toplev): Use simplify_gen_subreg. ! * simplify-rtx.c (simplify_subreg): When converting to a non-int ! mode, try to convert to an integer mode of matching size first. ! * simplify-rtx.x (simplify_subreg): When constructing a CONST_VECTOR ! from individual subregs, check that each subreg has been generated ! sucessfully. ! 2002-07-23 Neil Booth ! * genautomata.c (VLA_HWINT_SHORTEN, VLA_HWINT_LAST): Remove. ! * df.c (HANDLE_SUBREG, FOR_EACH_BB_IN_BITMAP_REV, ! FOR_EACH_BB_IN_SBITMAP): Remove. ! * gcse.c (NEVER_SET, FOLLOW_BACK_EDGES): Remove. ! * haifa-sched.c (DONE_PRIORITY, MAX_PRIORITY, TAIL_PRIORITY, ! LAUNCH_PRIORITY, DONE_PRIORITY_P, LOW_PRIORITY_P): Remove. ! * loop.c (PREFETCH_BLOACK_IN_LOOP_MIN, ! PREFETCH_LIMIT_TO_SIMULTANEOUS): Remove. ! * regrename.c (REGNO_MODE_OK_FOR_BASE_P): Remove. ! 2002-07-23 Gabriel Dos Reis ! * pretty-print.h: New file. ! 2002-07-23 Paul Koning ! * real.c (REAL_WORDS_BIG_ENDIAN): Make 1 for DEC. ! (LARGEST_EXPONENT_IS_NORMAL): Ditto. ! (VAX_HALFWORD_ORDER): Define (1 for DEC VAX, 0 otherwise). ! (TARGET_G_FLOAT): Default to 0 if not defined. ! (ieeetoe): New, common routine to convert target format floats ! to internal form. ! (e24toe, e53toe): Change to use ieeetoe, distinguish DEC ! vs. others. ! (e113toe): Change to use ieeetoe. ! 2002-07-23 Roman Lechtchinsky ! * real.c (REAL_WORDS_BIG_ENDIAN): Make sure it is 0 for DEC and 1 for ! IBM. ! (e53toe): Assume IEEE if non of DEC, IBM and C4X is defined. ! (e64toe): Remove special cases for DEC and IBM. Remove support for ! ARM_EXTENDED_IEEE_FORMAT. ! (e24toe): Remove special cases for DEC. ! (significand_size): Simplify. Indent. ! (ieee_format, ieee_24, ieee_53, ieee_64, ieee_113): New. ! (etoieee, toieee): New. ! (etoe113, toe113, etoe64, toe64, etoe53, toe53, etoe24, toe24): Use ! etoieee and toieee for IEEE arithmetic. ! 2002-07-23 Gabriel Dos Reis ! * doc/extend.texi: Say ISO C90, not ISO C89. ! * doc/invoke.texi: Likewise. ! * doc/standards.texi: Likewise. ! 2002-07-23 Steve Ellcey ! * gcc/explow.c (convert_memory_address): Fix conversion of CONSTs. ! Fix permutation of conversion and plus/mult. ! * gcc/builtins.c (expand_builtin_memcpy) Ensure return pointer is ! ptr_mode and not Pmode when POINTERS_EXTEND_UNSIGNED is defined. ! (expand_builtin_strncpy) Ditto. ! (expand_builtin_memset) Ditto. ! 2002-07-23 Gabriel Dos Reis ! Fix PR/7363: ! * c-common.c (c_sizeof_or_alignof_type): New function. ! (c_alignof): Remove definition. ! * c-common.h (c_sizeof, c_alignof): Define as macros. ! (c_sizeof_or_alignof_type): Declare. ! (my_friendly_assert): Moved from cp/cp-tree.h ! * c-typeck.c (c_sizeof): Remove definition. ! 2002-07-23 Jan Hubicka ! * gcse.c (try_replace_reg): Use num_changes_pending. ! * recog.c (num_changes_pending): New function. ! (validate_replace_src): Use validate_repalce_src_group. ! (validate_replace_src_group): New. ! * recog.h (validate_repalce_src_group): New. ! (num_changes_pending): Likewise. ! 2002-07-23 J"orn Rennecke ! * calls.c (emit_library_call_value_1): If ! FUNCTION_ARG_PASS_BY_REFERENCE is true, pretend this is neither ! libcall, const call nor pure call. ! 2002-07-23 Neil Booth ! * config/m88k/m88k.h (SECTION_ASM_OP): Remove. ! 2002-07-23 Neil Booth ! * vmsdbgout.c (SECTION_ASM_OP): Remove. ! 2002-07-23 Neil Booth ! * config/i386/i386.c (AT_BP): Remove. ! 2002-07-23 Neil Booth ! * defaults.h (obstack_chunk_alloc, obstack_chunk_free): ! Default definition. ! * gcse.c: Don't define obstack_chunk_free. ! * collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c, ! flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c, ! integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c, ! reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c: ! Don't define obstack macros. ! 2002-07-22 Stephane Carrez ! PR target/6744 ! * config/m68hc11/m68hc11.c (m68hc11_z_replacement): Also replace ! ASM_OPERANDS instructions. ! 2002-07-22 Stephane Carrez ! PR target/7361 ! * config/m68hc11/m68hc11.c (go_if_legitimate_address_internal): Accept ! constant addresses only on 68HC12. ! 2002-07-22 Neil Booth ! * cppfiles.c (stack_include_file): Correct test of whether ! a dependency should be output. ! 2002-07-22 David Edelsohn ! * collect2.c (is_ctor_dtor): Add other possible JOINER values. ! 2002-07-22 Richard Earnshaw ! * arm.md (movqi): If optimizing and we can create pseudos, use ! a ZERO_EXTEND to load from memory, then copy the result into the ! target. ! (movhi): Likewise, but only for ARMv4. ! 2002-07-22 Neil Booth ! * ssa-ccp.c (PHI_PARMS): Remove. ! 2002-07-22 Richard Sandiford ! * config/mips/mips.h (CLASS_CANNOT_CHANGE_MODE): Include FP_REGS ! on big-endian targets. ! 2002-07-22 Kaveh R. Ghazi ! * hwint.h (HOST_WIDE_INT_PRINT_DEC_SPACE, ! HOST_WIDE_INT_PRINT_UNSIGNED_SPACE, ! HOST_WIDEST_INT_PRINT_DEC_SPACE, HOST_WIDEST_INT_PRINT_DEC_SPACE): ! New formatting macros. ! * ra-debug.c (dump_static_insn_cost): Avoid string concatenation. ! 2002-07-22 J"orn Rennecke ! * rtlanal.c (subreg_regno_offset): Return correct offset for ! big endian paradoxical subregs. ! * optabs.c (expand_vector_unop): Don't expand using sub_optab ! if we got the wrong mode. ! * hwint.c (define HOST_WIDE_INT_PRINT_DEC_C): New define. ! * genrecog.c (write_switch, write_cond): Use it. ! * genemit.c (gen_exp): Likewise. ! 2002-07-22 Jakub Jelinek ! * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE. ! 2002-07-22 Jakub Jelinek ! * c-decl.c (build_compound_literal): Defer compound literal decls ! until until file end to emit them only if they are actually used. ! 2002-07-21 Kaveh R. Ghazi ! * ra-build.c (check_conflict_numbers): Hide unused function. ! (livethrough_conflicts_bb): Avoid automatic aggregate ! initialization. ! (parts_to_webs_1): Avoid `U' integer constant modifier. ! (conflicts_between_webs): Wrap a variable in the macro controlling ! its usage. ! * ra-debug.c (ra_debug_msg): Use VA_OPEN/VA_CLOSE. ! (dump_igraph, dump_graph_cost): Avoid string concatenation ! (dump_static_insn_cost): Avoid automatic aggregate ! initialization. ! * ra-rewrite.c (insert_stores): Avoid automatic aggregate ! initialization. ! (dump_cost): Avoid string concatenation ! 2002-07-21 Richard Henderson ! * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Don't use ! GOTO_SUBROUTINE_EXPR when finally_block can be re-expanded. ! 2002-07-21 Richard Henderson ! * unroll.c (find_splittable_givs): Do not split DEST_ADDR givs ! that are not unrolled completely. ! 2002-07-21 Richard Henderson ! * loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS. ! * loop.c (strength_reduce): Update. ! * toplev.c (rest_of_compilation): Do unrolling in the first ! loop pass, not the second. ! 2002-07-21 Richard Henderson ! * emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL ! when flag_argument_noalias == 2. ! * alias.c (nonoverlapping_memrefs_p): Handle that. ! * print-rtl.c (print_mem_expr): Likewise. ! 2002-07-21 Hartmut Schirmer ! * libgcc2.c (__divdi3, __moddi3): Use unary minus operator ! instead of __negdi2 directly. ! 2002-07-21 Neil Booth ! * gengenrtl.c (gencode): Don't define obstack_alloc_rtx. ! * function.c (SYMBOL__MAIN): Remove definition. ! * global.c (SET_CONFLICT, REGBITP, ALLOCNO_LIVE_P): Remove. ! * predict.c (PROB_NEVER, PROB_LIKELY, PROB_UNLIKELY): Remove. ! * profile.c (GCOV_INDEX_TO_BB): Remove. ! * sched-rgn.c (ABS_VALUE, MIN_DIFF_PRIORITY, MIN_PROB_DIFF): Remove. ! * simplify-rtx.c (FIXED_BASE_PLUS_P): Remove. ! 2002-07-21 Neil Booth ! * c-lex.c (GET_ENVIRONMENT): Remove. ! * collect2.c (GET_ENV_PATH_LIST): Remove. ! (prefix_from_env): Use GET_ENVIRONMENT. ! * cppinit.c (GET_ENV_PATH_LIST): Remove. ! (init_standard_includes): Use GET_ENVIRONMENT. ! * defaults.h (GET_ENVIRONMENT): Define here if not already. ! * gcc.c (GET_ENV_PATH_LIST): Remove. ! (make_relative_prefix, process_command): Update. ! * protoize.c (GET_ENV_PATH_LIST): Remove. ! (do_processing): Update. ! 2002-07-21 Gabriel Dos Reis ! * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. ! (grokdeclarator): Likewise. ! * c-format.c (C_STD_NAME): Likewise. ! * c-lex.c (interpret_integer): Likewise. ! * c-typeck.c (build_array_ref): Likewise. ! * cpplex.c (_cpp_lex_direct): Likewise. ! * toplev.c (documented_lang_options): Likewise. ! 2002-07-21 Neil Booth ! * c-format.c (T99_I, T99_UI): Remove. ! 2002-07-21 Neil Booth ! * c-typeck.c (SAVE_SPELLING_DEPTH): Remove. ! 2002-07-21 Jan Hubicka ! * gcse.c (do_local_cprop): Do not extend lifetimes of registers set by ! do_local_cprop. ! 2002-07-21 Andreas Jaeger ! * reload1.c (fixup_abnormal_edges): Remove unused variable. ! 2002-07-21 Bernd Schmidt ! Improvements for the ifcvt pass from Michael Meissner, with patches ! by Richard Sandiford ! * basic-block.h (struct ce_if_block, ce_if_block_t): New types. ! * ifcvt.c (cond_exec_changed_p): New static variable. ! (last_active_insn): New function, renamed from last_active_insn_p ! and changed to return the last active insn in a basic block. All ! callers updated. ! (block_fallthru): New function. ! (cond_exec_process_insns): New argument CE_INFO. Pass it to ! IFCVT_MODIFY_INSN. All callers updated. ! Return false if START or END are NULL. ! Handle case where we're processing an insn that is already ! conditional. ! (noce_process_if_block): CE_INFO argument rather than ! multiple args containing the involved basic blocks. All callers ! changed. ! (process_if_block, merge_if_block, find_if_block, ! cond_exec_process_if_block): Likewise. ! (cond_exec_process_if_block): New arg DO_MULTIPLE_P. All callers ! changed. ! Use new function last_active_insn to simplify some code. ! New code to handle multiple tests. ! Call IFCVT_MODIFY_CANCEL in all failure cases, otherwise set ! cond_exec_changed_p to TRUE. ! (process_if_block): New code to handle multiple tests. ! (merge_if_block): Likewise. ! (find_if_header): New arg PASS. Changed to return the currently ! processed basic block or NULL instead of true/false. All callers ! changed. ! Call IFCVT_INIT_EXTRA_FIELDS. ! (block_jumps_and_fallthru_p): New function. ! (find_if_block): Discover opportunities to convert multiple tests. ! Add additional debugging output. ! Update the ce_info structure before returning. ! (if_convert): Run multiple passes of if-conversion. ! * doc/tm.texi (IFCVT_MODIFY_TESTS, IFCVT_MODIFY_INSN, ! IFCVT_MODIFY_FINAL, IFCVT_MODIFY_CANCEL, IFCVT_MODIFY_MULTIPLE_TESTS, ! IFCVT_INIT_EXTRA_FIELDS, IFCVT_EXTRA_FIELDS): Update documentation for ! these macros. ! 2002-07-21 Jan Hubicka ! * gcse.c: Include cselib.h ! (constptop_register): Break out from ... ! (cprop_insn): ... here; kill basic_block argument. ! (do_local_cprop, local_cprop_pass): New functions. ! (one_cprop_pass): Call local_cprop_pass. ! 2002-07-20 Roger Sayle ! * simplify-rtx.c (simplify_relational_operation): Optimize ! abs(x) < 0.0 (and abs(x) >= 0.0 when using -ffast-math). ! 2002-07-20 Michae Matz ! * ra-build.c: (remember_web_was_spilled): Use GENERAL_REGS. ! 2002-07-20 Neil Booth ! * cppexp.c (struct op): Add token pointer. ! (check_promotion, CHECK_PROMOTION): New. ! (optab): Update. ! (_cpp_parse_expr): Update, use token pointer of struct op. ! (reduce): Warn about change of sign owing to promotion. ! * cppinit.c (cpp_handle_option): New warning if -Wall. ! * cpplib.h (struct cpp_options): New member. ! 2002-07-19 David Edelsohn ! * config/rs6000/rs6000.md: Remove ppc630 fpcompare from single ! fpu list. Separate Power4 compare and delayed_compare. Correct ! Power4 fpcompare. ! (fix_truncdfsi2_internal): Restore FPR preference. ! * config/rs6000/t-aix43 (MULTILIB_MATCHES): Add mcpu?power3, ! mcpu?power4, mcpu?604e. Remove mpower, mpower2, mpowerpc. ! 2002-07-19 Momchil Velikov ! * reload1.c (reload_as_needed): Duplicate oldpat. ! 2002-07-20 Alan Modra ! PR optimization/7130 ! * loop.h (struct loop_info): Add "preconditioned". ! * unroll.c (unroll_loop): Set it. ! * doloop.c (doloop_modify_runtime): Correct count for unrolled loops. ! 2002-07-19 Zack Weinberg ! * rtl.def (CODE_LABEL): Remove slot 8. ! * rtl.h (struct rtx_def): Document new uses of jump and call fields. ! (LABEL_ALTERNATE_NAME): Delete. ! (LABEL_KIND, SET_LABEL_KIND, LABEL_ALT_ENTRY_P): New. ! * defaults.h: Remove default for ASM_OUTPUT_ALTERNATE_LABEL_NAME. ! * final.c (output_alternate_entry_point): New. ! (final_scan_insn): Use it instead of ! ASM_OUTPUT_ALTERNATE_LABEL_NAME. Do not consider possibility ! of a case label being an alternate entry point. ! * cfgbuild.c (make_edges, find_bb_boundaries): Use LABEL_ALT_ENTRY_P. ! * emit-rtl.c (gen_label_rtx): Adjust call to gen_rtx_CODE_LABEL. ! Do not clear LABEL_NUSES (unnecessary) or LABEL_ALTERNATE_NAME ! (field deleted). ! * print-rtl.c, ra-debug.c: Update code to output CODE_LABELs. ! * doc/rtl.texi: Document LABEL_KIND, SET_LABEL_KIND, and ! LABEL_ALT_ENTRY_P; not LABEL_ALTERNATE_NAME. ! * doc/tm.texi: Delete documentation of ! ASM_OUTPUT_ALTERNATE_LABEL_NAME. ! 2002-07-19 Rainer Orth ! * config/mips/iris5gas.h (DWARF2_DEBUGGING_INFO): Define. ! (PREFERRED_DEBUGGING_TYPE): Use DWARF2_DEBUG. ! (LINK_SPEC): Define. ! (STARTFILE_SPEC): Define. ! (ENDFILE_SPEC): Define. ! * config/mips/iris6-o32.h (LINK_SPEC): Move ... ! * config/mips/iris6-o32-as.h (LINK_SPEC): ... here. ! * config/mips/iris6-o32-gas.h: New file. ! * config.gcc (mips-sgi-irix6*o32): Use it. ! * config/mips/t-iris5-gas: New file. ! * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. ! 2002-07-19 Neil Booth ! * cppexp.c (ALWAYS_EVAL): Remove. ! (optab, reduce): Always evaluate. ! (num_unary_op, num_binary_op, num_div_op): Issue diagnostics ! only if not skipping evaluation. ! 2002-07-19 Marek Michalkiewicz ! * config/avr/avr.c (debug_hard_reg_set): Remove. ! 2002-07-19 Chris Demetriou ! * gcc.c (cpp_options): Include "%1" (cc1_spec). ! 2002-07-19 Richard Henderson ! * loop.c (loop_givs_rescan): Delete the REG_EQUAL note, not the insn. ! 2002-07-19 Alan Modra ! * prefix.c (update_path): Don't zap single `.' path components ! unless followed by another `.' and fix typo last patch. ! 2002-07-18 Neil Booth ! * cppexp.c (cpp_num_mul): Remove unused parameter. ! (UNARY, BINARY, OTHER, binary_handler): Remove. ! (ALWAYS_EVAL): New. ! (optab): Update. ! (reduce): Refactor to a large switch, don't use a function ! pointer. ! 2002-07-18 Bo Thorsen ! * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Define this always. ! 2002-07-18 J"orn Rennecke ! * sh-protos.h (sh_expand_unop_v2sf): Move inside #ifdef RTX_CODE guard. ! (sh_expand_binop_v2sf): Likewise. ! * sh.c (machine_dependent_reorg): Add move for UNSPEC_MOVA. ! (int_gpr_dest, trunc_hi_operand): New functions. ! * sh.h (PREDICATE_CODES): Add any_register_operand, int_gpr_dest and ! trunc_hi_operand. ! (SPECIAL_MODE_PREDICATES, any_register_operand): Define. ! * sh.md (cmpeqdi_t+1): Remove comments that genrecog warns about. ! (adddi3_compact+1, subdi3_compact+1, ashlsi3_n+1, ashlhi3+1): Likewise. ! (ashrsi2_16+1, ashrsi2_31+1, lshrsi3_n+1, ashrdi3+[12]): Likewise. ! (and_shl_scratch+[12], zero_extendhidi2+1): Likewise. ! (zero_extendhisi2_media+1, extendhidi2+1, extendqidi2+1): Likewise. ! (extendhisi2_media+1, extendqisi2_media+1): Likewise. ! (movsi_media_nofpu+[12], movhi_media+1, movdi_media_nofpu+1): Likewise. ! (movdi_const_16bit+[12], movdf_i4+[123], reload_outdf+[2-5]): Likewise. ! (movsf_ie+1): Likewise. ! (loaddi_trunc): Use int_gpr_dest predicate. ! (use_sfunc_addr, indirect_jump_scratch, sibcall_compact): Add mode(s). ! (mova, mova_const, GOTaddr2picreg, ptrel, casesi_worker_0): Likewise. ! (casesi_worker_0+[12], casesi_worker): Likewise. ! (shcompact_preserve_incoming_args): Likewise. ! (mov_nop): Use any_register_operand predicate. ! (mperm_w0): Use trunc_hi_operand predicate. ! 2002-07-18 John David Anglin ! * pa-linux.h (DWARF2_UNWIND_INFO): Delete define. ! * pa.h (EH_RETURN_DATA_REGNO): Revise TARGET_64BIT and correct ! numbering. ! 2002-07-18 John David Anglin ! * pa.c (output_deferred_plabels): Remove unused millicode enum mulU. ! 2002-07-18 Richard Henderson ! PR optimization/7147 ! * ifcvt.c (noce_get_condition): Make certain that the condition ! is valid at JUMP. ! 2002-07-18 J"orn Rennecke ! * sh.c (barrier_align, push): Shut up compiler warnings. ! (initial_elimination_offset,sh_media_init_builtins): Likewise. ! (reg_no_subreg_operand): Delete. ! 2002-07-17 Bo Thorsen ! * config/i386/linux64.h (LINK_SPEC): Remove bogus -Y option. ! (STARTFILE_PREFIX_SPEC): Define for NATIVE_CROSS compilations. ! (STARTFILE_SPEC): Remove hardcoded library paths. ! (ENDFILE_SPEC): Likewise. ! 2002-07-18 Jan Hubicka ! * gcse.c (hoist_expr_reaches_here_p): Stop once expr_bb is reached. ! * gcse.c (try_replace_reg): Do not return false positives. ! 2002-07-18 Alan Modra ! * prefix.c: (update_path): Strip ".." components when prior dir ! doesn't exist. Pass correct var to UPDATE_PATH_HOST_CANONICALIZE. ! * config/rs6000/sysv4.h (ASM_OUTPUT_REG_PUSH): Remove 64-bit support. ! (ASM_OUTPUT_REG_POP): Likewise. ! 2002-07-18 Alan Modra ! * config/rs6000/rs6000.c (first_reg_to_save): Remove bogus ! adjustments to first_reg for profiling case. ! (output_function_profiler): Correct lr save slot for ABI_AIX_NODESC. ! Disable profiling for 64 bit code on both ABI_V4 and ABI_AIX_NODESC. ! Save static chain reg to sp + 12 on ABI_AIX_NODESC. ! * config/rs6000/sysv4.h (ASM_OUTPUT_REG_PUSH): Define. ! (ASM_OUTPUT_REG_POP): Define. ! * config/rs6000/linux64.h (ASM_OUTPUT_REG_PUSH): Undef. ! (ASM_OUTPUT_REG_POP): Undef. ! 2002-07-17 Neil Booth ! * cpplib.c (do_sccs): Handle #sccs on all systems. ! * system.h (SCCS_DIRECTIVE): Poison. ! * config/darwin.h, config/freebsd.h, config/netbsd.h, ! config/ptx4.h, config/svr3.h, config/svr4.h, config/alpha/elf.h, ! config/arm/linux-elf.h, config/c4x/c4x.h, config/d30v/d30v.h, ! config/i370/i370.h, config/i386/gas.h, config/i386/sco5.h, ! config/i960/i960.h, config/m68hc11/m68hc11.h, config/m68k/3b1.h, ! config/m68k/3b1g.h, config/m68k/crds.h, config/m68k/mot3300.h, ! config/m68k/pbb.h, config/m88k/m88k.h, config/mips/mips.h, ! config/sparc/pbd.h, config/stormy16/stormy16.h, config/vax/vaxv.h: ! Remove all references to SCCS_DIRECTIVE. ! * doc/cpp.texi, doc/tm.texi: Update. ! 2002-07-17 J"orn Rennecke ! * regrename.c (maybe_mode_change): New function. ! (find_oldest_value_reg, copyprop_hardreg_forward_1): Use it. ! 2002-07-17 Rodney Brown ! * config/i386/i386.c (ix86_expand_int_movcc): In the general case ! suppress addition when either ct or cf are zero. ! 2002-07-17 Eric Botcazou ! Glen Nakamura ! PR optimization/6713 ! * loop.c (loop_givs_rescan): Explicitly delete the insn that ! sets a non-replaceable giv after issuing the new one. ! 2002-07-17 Neil Booth ! * cppexp.c (cpp_interpret_integer, append_digit, parse_defined, ! eval_token): Clarify and correct use of "bool" variables. ! * cpplib.h (struct cpp_options): Similarly. ! * cppmacro.c (parse_params, _cpp_save_parameter): Ditto. ! * cpptrad.c (recursive_macro): Similarly. ! 2002-07-17 J"orn Rennecke ! * config/sh/lib1funcs.asm (udivsi3_i4): Implement SHcompact version in ! SHmedia code. ! * sh.md (cmpgtudi_media): Remove spurious @. ! * config/sh/lib1funcs.asm (FMOVD_WORKS): Don't define for little endian. ! * sh.h (OVERRIDE_OPTIONS): Don't set FMOVD_BIT for little endian. ! * config/sh/lib1funcs.asm (init_trampoline): New entry point. ! * sh-protos.h (sh_initialize_trampoline): Declare. ! * sh.c (sh_initialize_trampoline): New function. ! * sh.h (TRAMPOLINE_SIZE): Only 24 for TARGET_SHMEDIA32. ! (TRAMPOLINE_ALIGNMENT): Need cache-line alignment for TARGET_SHMEDIA. ! (INITIALIZE_TRAMPOLINE): Call sh_initialize_trampoline. ! (TRAMPOLINE_ADJUST_ADDRESS): Not needed for SHcompact. ! * sh.md (initialize_trampoline, double_shori): New patterns. ! (initialize_trampoline_compact): Likewise. ! (shmedia32_initialize_trampoline_big): Remove. ! (shmedia32_initialize_trampoline_little): Likewise. ! * sh-protos.h (binary_float_operator): Remove declaration. ! (sh_expand_unop_v2sf, sh_expand_binop_v2sf): Declare. ! * sh.c (print_operand, case 'N'): Check against CONST0_RTX. ! (unary_float_operator, sh_expand_unop_v2sf): New functions. ! (sh_expand_binop_v2sf): Likewise. ! (zero_vec_operand): Delete. ! (SH_BLTIN_UDI): New builtin shared signature define. Renumbered ! all non-shared ones. ! (bdesc): Change all the mextr builtins to use SH_BLTIN_UDI. ! Enable nsb and byterev. ! * sh.h (CONDITIONAL_REGISTER_USAGE): Initialize DF_HI_REGS. ! (HARD_REGNO_MODE_OK): Allow TImode in fp regs. Allow V2SFmode ! in general regs. ! (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Add DF_HI_REGS. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. Remove clause for ! immediate operands. ! (SECONDARY_INPUT_RELOAD_CLASS): Add clause for immediate operands. ! Add DF_HI_REGS. ! (CLASS_CANNOT_CHANGE_MODE, CLASS_CANNOT_CHANGE_MODE_P): Allow ! lowpart fp regs - only for big endian for now. ! (LEGITIMATE_CONSTANT_P): Don't allow nonzero float vectors ! when FPU is in use. ! (EXTRA_CONTRAINT_U): Check against CONST0_RTX. ! (LOAD_EXTEND_OP): NIL for SImode. ! (REGISTER_MOVE_COST): Add DF_HI_REGS. Const for moves between ! general and fp registers is 4. ! PREDICATE_CODES: Amend binary_float_operator entry. ! Remove zero_vec_operand. Add unary_float_operator. ! * sh.md (udivsi3_i4_media): Use truncate instead of paradoxical ! subreg SET_DEST. ! (truncdisi2, truncdihi2, movv2sf): Allow memory destinations. ! (truncdiqi2): Do sign extension. ! (movsi_media, movdi_media): Allow to use r63 to an fp register. ! (movdf_media, movsf_media): Likewise. ! (movv2sf_i, movv2sf_i+1): Don't use f{ld,st}.p or SUBREGS. ! Collapse to one define_insn_and_split. Allow immediate sources. ! (addv2sf3, subv2sf3, mulv2sf3, divv2sf3): New patterns. ! (movv4sf_i): Allow immediate sources. Use simplify_gen_subreg. ! (movv4sf): Allow immediate sources. ! (movsf_media_nofpu+1): Don't split moves to FP registers. ! (unary_sf_op, binary_sf_op, mshflo_w_x, concat_v2sf): New patterns. ! (movv8qi_i+3): Check against CONST0_RTX. ! (mextr1, mextr2. mextr3. mextr4, mextr5, mextr6, mextr7): Use DImode ! for input and output operands. Fix argument 3 to gen_mextr_rl. ! (mmul23_wl, mmul01_wl, mmulsum_wq_i): s/const_vector/parallel/ ! (msad_ubq_i, mshf4_b, mshf0_b, mshf4_l, mshf0_l, mshf4_w): Likewise. ! (mshf0_w, fipr, ftrv): Likewise. ! (mshfhi_l_di): Now insn_and_split. Can handle FP regs. ! 2002-07-17 Jeroen Dobbelaere ! * arm.h (ARM_NUM_INTS, ARM_NUM_REGS, ARM_NUM_REGS2): Renamed from ! NUM_INTS, NUM_REGS and ARM_NUM_REGS2 respectively. All uses changed. ! * arm.c: Similarly. ! 2002-07-17 Richard Sandiford ! * config/mips/mips-protos.h (mips_sign_extend): Declare. ! * config/mips/mips.h (MASK_DEBUG_H, TARGET_DEBUG_H_MODE): Remove. ! (TARGET_SWITCHES): Remove debugh. ! (ISA_HAS_TRUNC_W): New macro. ! (CLASS_CANNOT_CHANGE_MODE): Include FP_REGS if TARGET_FLOAT64. ! (PREDICATE_CODES): Remove se_nonimmediate_operand. ! * config/mips/mips.c (movdi_operand): Allow sign-extensions of ! any SImode move_operand. ! (se_nonimmediate_operand): Remove. ! (mips_sign_extend): New. ! (mips_move_2words): Use it for sign-extended source operands. ! (override_options): Allow integers to be put into single FPRs. ! (mips_secondary_reload_class): Handle integers in float registers. ! * config/mips/mips.md (extendsidi2): Turn into a define_expand. ! (fix_truncsfsi2, fix_truncdfsi2): Likewise. ! (fix_truncdfsi2_insn, fix_truncdfsi2_macro): New. ! (fix_truncsfsi2_insn, fix_truncsfsi2_macro): New. ! (fix_truncdfdi2): Provide only a single alternative, in which the ! integer is in a float register. Depend on TARGET_FLOAT64 rather ! than TARGET_64BIT. ! (fix_truncsfdi2, floatdidf2, floatdisf2): Likewise. ! (floatsidf2, floatsisf2): Likewise, but no TARGET_FLOAT64 dependency. ! (movdi_internal2): Don't allow the source operand to be sign-extended. ! Add alternatives for float registers. ! (*movdi_internal2_extend): New. Version of movdi_internal2 that ! allows sign-extension. ! (*movdi_internal2_mips16): Name the existing mips16 movdi pattern. ! (movsi_internal2): Rename to movsi_internal. Add alternatives for ! float registers. Remove TARGET_DEBUG_H_MODE test. ! (movhi_internal1): Rename to movhi_internal. Don't check ! TARGET_DEBUG_H_MODE. Fix transposed *d and *f source constraints. ! (movqi_internal1): Rename to movqi_internal and remove ! TARGET_DEBUG_H_MODE dependency. ! (movsi_internal1, movhi_internal2, movqi_internal2): Remove. ! 2002-07-16 Jim Wilson ! * toplev.c (lang_dependent_init): Create function context for ! init_expr_once. ! 2002-07-16 Hans-Peter Nilsson ! * config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC): Don't ! --gc-sections if -r. ! * config/cris/cris.h: Ditto. ! 2002-07-16 Rodney Brown ! * config/i386/i386.c (ix86_expand_int_movcc): In the case where ! the comparison directly gives a mask suppress addition when cf is ! zero by complementing the mask. ! 2002-07-16 Nathanael Nerode ! * Makefile.in: Delete references to enquire. ! * enquire.c: Move to contrib. ! 2002-07-16 Stan Shebs ! * config/darwin.h (ASM_OUTPUT_LABEL): Move to here from ! config/rs6000/darwin.h. ! (ASM_OUTPUT_SKIP): Ditto. ! (TEXT_SECTION_ASM_OP): Ditto. ! (DATA_SECTION_ASM_OP): Ditto. ! (ASM_APP_ON): Define. ! (ASM_APP_OFF): Define. ! * config/rs6000/darwin.h (ASM_OUTPUT_LABEL, ASM_OUTPUT_SKIP, ! TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Remove. ! * config/darwin.c (func_name_maybe_scoped): Remove unused decl. ! (machopic_function_base_name): Declare result to be const. ! (machopic_non_lazy_ptr_name): Ditto. ! (machopic_stub_name): Ditto. ! * config/darwin-protos.h: Ditto for the prototypes. ! 2002-07-17 Jan Hubicka ! * m68hc11.c (m68hc11_reorg): Do not rebuild CFG. ! 2002-07-17 Jan Hubicka ! * i386.md (prefetch): Fix for 64bit mode. ! (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. ! 2002-07-17 Jan Hubicka ! * i386.h (MACHINE_DEPENDENT_REORG): New macro. ! * i386.c (x86_machine_dependent_reorg): New function. ! * i386-protos.h (x86_machine_dependent_reorg): Declare. ! 2002-07-16 Zack Weinberg ! * builtins.c (std_expand_builtin_va_start): Remove unused ! first argument. ! (expand_builtin_va_start): Call EXPAND_BUILTIN_VA_START and ! std_expand_builtin_va_start with just two arguments. ! * expr.h: Update prototypes. ! * alpha-protos.h, alpha.h, alpha.c, arc-protos.h, arc.h, ! arc.c, d30v-protos.h, d30v.h, d30v.c, i386-protos.h, i386.h, ! i386.c, i960-protos.h, i960.h, i960.c, m88k-protos.h, m88k.h, ! m88k.c, mips-protos.h, mips.h, mips.c, mn10300-protos.h, ! mn10300.h, mn10300.c, pa-protos.h, pa.h, pa.c, ! rs6000-protos.h, rs6000.h, rs6000.c, s390-protos.h, s390.h, ! s390.c, sh-protos.h, sh.h, sh.c, sparc-protos.h, sparc.h, ! sparc.c, stormy16-protos.h, stormy16.h, stormy16.c, ! xtensa-protos.h, xtensa.h, xtensa.c: Remove unused first ! argument from all implementations of EXPAND_BUILTIN_VA_START ! and all uses of std_expand_builtin_va_start. ! 2002-07-16 J"orn Rennecke ! * regrename.c (copy_value): Don't record high part copies. ! 2002-07-16 Steve Ellcey ! * gcc/config/pa/long_double.h (FIXUNS_TRUNCTFDI2_LIBCALL): New define. ! (fixunstfdi_libfunc): Change to use FIXUNS_TRUNCTFDI2_LIBCALL. ! * gcc/config/pa/quadlib.c (_U_Qfcnvfxt_quad_to_udbl): New function. ! 2002-07-16 Ian Dall ! * doc/invoke.texi (NS32K Options): Document -mieee-compare option ! * config/ns32k/ns32k.md (addsi3, *frame_addr, *stack_addr): merge ! into addsi3 using register class "x" and "y". ! * config/ns32k/ns32k.md (*madddf, *maddsf, *msubdf, *msubsf): ! "earlyclobber" constraint modifier for some alternative. ! * config/ns32k/ns32k.md (tstdf, tstsf, cmpdf, cmpsf, blt, ble) ! (*ble, *blt): Flag to indicate bCOND and sCOND should check for ! unordered. ! config/ns32k/ns32k.h (CC_UNORD): define corresponding mask. ! * config/ns32k/ns32k.h (TARGET_IEEE_COMPARE, MASK_IEEE_COMPARE) ! (TARGET_SWITCHES): Add -mieee-compare option. ! (OVERRIDE_OPTIONS): 32332 is a subset of ! 32532. Don't use IEEE_COMPARE -funsafe-math-optimizations. ! (TARGET_SWITCHES): Fix description of bit-field option. ! * config/ns32k/netbsd.h (TARGET_DEFAULT): Add ! -mieee-compare option. Remove 32332 flag. ! 2002-07-16 Steve Ellcey ! * explow.c (convert_memory_address): Remove special handling ! when POINTERS_EXTEND_UNSIGNED < 0. ! * config/ia64.md (movsi_symbolic): New instruction for ILP32 mode. ! (movedi_symbolic): Fix typo. ! (load_fptr): Remove mode restriction so it works for SI and DI. ! (load_fptr_internal1): Ditto. ! (load_gprel): Ditto. ! (load_symptr_internal1): Ditto. ! (call_pic): Ditto. ! * config/ia64.c (call_operand): Modify mode check. ! (ia64_expand_load_address): Handle DI and SI addresses and symbols. ! (ia64_expand_move): Ditto. ! (ia64_assemble_integer): Handle SImode function pointers. ! (ia64_expand_fetch_and_op): Handle SImode mem addresses. ! (ia64_expand_op_and_fetch): Ditto. ! (ia64_expand_compare_and_swap): Ditto. ! (ia64_expand_lock_test_and_set): Ditto. ! (ia64_expand_lock_release): Ditto. ! 2002-07-16 Jeroen Dobbelaere ! * arm.c (emit_sfm): Don't set RTX_FRAME_RELATED_P on DWARF. ! 2002-07-16 Jeroen Dobbelaere ! Richard Earnshaw ! * arm.h (LEGITIMATE_PIC_OPERAND_P): Only test ! CONSTANT_POOL_ADDRESS_P if a SYMBOL_REF. Simplify logic. ! 2002-07-16 Richard Earnshaw ! * arm.md (stack_tie): New insn. Use an idiom that the alias code ! understands to be a memory clobber. ! * arm.c (arm_expand_prologue): Use it. ! 2002-07-16 Daniel Berlin ! * ra-rewrite.c: #include reload.h, insn-config.h ! * ra-build.c: #include reload.h ! * Makefile.in: Update ra-rewrite.o, ra-build.o dependencies to ! depend on reload.h, insn-config.h. ! 2002-07-16 J"orn Rennecke ! * expr.c (emit_move_insn_1): Handle arbitrary moves that are ! the same size as a word. ! * regrename.c (find_oldest_value_reg): Take WORDS_BIG_ENDIAN / ! BYTES_BIG_ENDIAN into account. ! 2002-07-16 Jan Hubicka ! * i386.md (prefetch): Fix for 64bit mode. ! (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. ! * i386.md (movss, movsd): Use xorps/xorpd for Athlon. ! 2002-07-16 Marek Michalkiewicz ! * hard-reg-set.h (TEST_HARD_REG_BIT): Return 1 if the bit is set. ! 2002-07-15 Zack Weinberg ! * ginclude/varargs.h: Replace with stub which issues #error. ! * ginclude/stdarg.h: __builtin_stdarg_start is renamed ! __builtin_va_start. ! * builtins.def (BUILT_IN_VARARGS_START): Delete. ! (BUILT_IN_VA_START): New. ! * builtins.c (expand_builtin_va_start): Eliminate first ! argument and code to implement pre-ISO varargs. ! (std_expand_builtin_va_start): Ignore first argument; it is ! always 1. ! (expand_builtin): Handle BUILT_IN_VA_START and ! BUILT_IN_STDARG_START identically. Delete ! BUILT_IN_VARARGS_START case. ! * function.c (assign_parms): Delete hide_last_arg and all ! its uses. ! (mark_varargs): Delete function. ! * function.h (struct function): Delete 'varargs' bit. ! (current_function_varargs): Delete macro. ! * tree.h: Don't declare mark_varargs. ! * c-decl.c (c_function_varargs, c_mark_varargs): Delete. ! (c_expand_body): Don't call mark_varargs. ! * c-objc-common.c: Handle BUILT_IN_VA_START and ! BUILT_IN_STDARG_START identically. Delete ! BUILT_IN_VARARGS_START case. ! * c-tree.h: Don't declare c_mark_varargs. ! * c-parse.in: Remove grammar rules for '&...' (which has been ! commented out since before 2.7.2) and for '...' in K+R ! argument declarations. ! * builtins.c, function.c, integrate.c, sibcall.c, ! config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h, ! config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c, ! config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c, ! config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h, ! config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, ! config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c, ! config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h, ! config/stormy16/stormy16.c: Delete all references to ! current_function_varargs, and code predicated on that flag. ! * config/alpha/alpha.c (alpha_va_start), ! config/arc/arc.c (arc_va_start), ! config/i386/i386.c (ix86_va_start), ! config/mips/mips.c (mips_va_start), ! config/mn10300/mn10300.c (mn10300_va_start), ! config/rs6000/rs6000.c (rs6000_va_start), ! config/s390/s390.c (s390_va_start), ! config/sh/sh.c (sh_va_start), ! Ignore first argument; it is always 1. ! * config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start. ! * config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start. ! * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c: ! Delete m68hc11_va_start. ! * config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h: ! No need to define EXPAND_BUILTIN_VA_START. ! * doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi, ! doc/trouble.texi: Remove references to GCC-provided . ! 2002-07-15 Eric Botcazou ! PR optimization/7153 ! * regmove.c (optimize_reg_copy_3): Don't optimize if the register ! dies in more than one insn. ! 2002-07-15 Jason Thorpe ! * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove. ! 2002-07-15 Michael Matz , ! Daniel Berlin , ! Denis Chertykov ! Add a new register allocator. ! * ra.c: New file. ! * ra.h: New file. ! * ra-build.c: New file. ! * ra-colorize.c: New file. ! * ra-debug.c: New file. ! * ra-rewrite.c: New file. ! * Makefile.in (ra.o, ra-build.o, ra-colorize.o, ra-debug.o, ! (ra-rewrite.o): New .o files for libbackend.a. ! (GTFILES): Add basic-block.h. ! * toplev.c (flag_new_regalloc): New. ! (f_options): New option "new-ra". ! (rest_of_compilation): Call initialize_uninitialized_subregs() ! only for the old allocator. If flag_new_regalloc is set, call ! new allocator, instead of local_alloc(), global_alloc() and ! friends. ! * doc/invoke.texi: Document -fnew-ra. ! * basic-block.h (FOR_ALL_BB): New. ! * config/rs6000/rs6000.c (print_operand): Write small constants ! as @l+80. ! * df.c (read_modify_subreg_p): Narrow down cases for a rmw subreg. ! (df_reg_table_realloc): Make size at least as large as max_reg_num(). ! (df_insn_table_realloc): Size argument now is absolute, not relative. ! Changed all callers. ! * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". ! * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. ! 2002-06-20 Michael Matz ! * df.h (struct ref.id): Make unsigned. ! * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. ! 2002-06-13 Michael Matz ! * df.h (DF_REF_MODE_CHANGE): New flag. ! * df.c (df_def_record_1, df_uses_record): Set this flag for refs ! involving subregs with invalid mode changes, when ! CLASS_CANNOT_CHANGE_MODE is defined. ! 2002-05-07 Michael Matz ! * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. ! 2002-05-03 Michael Matz ! * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. ! Sat Feb 2 18:58:07 2002 Denis Chertykov ! * regclass.c (regclass): Work with all regs which have sets or ! refs. ! (reg_scan_mark_refs): Count regs inside (clobber ...). ! 2002-01-04 Michael Matz ! * df.c (df_ref_record): Correctly calculate SUBREGs of hardregs. ! (df_bb_reg_def_chain_create, df_bb_reg_use_chain_create): Only ! add new refs. ! (df_bb_refs_update): Don't clear insns_modified here, ... ! (df_analyse): ... but here. ! * sbitmap.c (dump_sbitmap_file): New. ! (debug_sbitmap): Use it. ! * sbitmap.h (dump_sbitmap_file): Add prototype. ! 2001-08-07 Daniel Berlin ! * df.c (df_insn_modify): Grow the UID table if necessary, rather ! than assume all emits go through df_insns_modify. ! 2001-07-26 Daniel Berlin ! * regclass.c (reg_scan_mark_refs): When we increase REG_N_SETS, ! increase REG_N_REFS (like flow does), so that regclass doesn't ! think a reg is useless, and thus, not calculate a class, when it ! really should have. ! 2001-01-28 Daniel Berlin ! * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for ! dataflow analysis. ! 2002-07-15 Jakub Jelinek ! PR middle-end/7245 ! * config/i386/i386.c (const_int_1_31_operand): New. ! * config/i386/i386.h (PREDICATE_CODES): Add it. ! * config/i386/i386.md (ashlsi3_cmp, ashlsi3_cmp_zext, ashlhi3_cmp, ! ashlqi3_cmp, ashrsi3_cmp, ashrsi3_cmp_zext, ashrhi3_cmp, ashrqi3_cmp, ! lshrsi3_cmp, lshrsi3_cmp_zext, lshrhi3_cmp, lshrqi3_cmp): Use it. ! 2002-07-14 Alan Modra ! PR target/7282 ! * config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64. ! (floatunssidf2): Likewise. ! (floatsidf_ppc64): New insn_and_split. ! (floatunssidf_ppc64): Likewise. ! 2002-07-14 Andreas Jaeger ! * config.gcc (sh64): Remove unused ! target_requires_64bit_host_wide_int. ! 2002-07-12 Roger Sayle ! * expr.c [CLEAR_RATIO]: New macro defining the maximum number ! of move instructions to use when clearing memory, c.f. MOVE_RATIO. ! [CLEAR_BY_PIECES]: New macro, using CLEAR_RATIO, to determine ! whether clear_by_pieces should be used to clear storage. ! (clear_storage): Use CLEAR_BY_PIECES instead of MOVE_BY_PIECES. ! * doc/tm.texi: Document these two new target macros. ! 2002-07-12 Stephane Carrez ! * config/m68hc11/m68hc11.md ("zero_extendsidi2"): Use D_REG only for ! the scratch register. ! ("*movhi2_push"): Accept Z_REG because a split pattern can make use ! of it, forbid reload to use it. ! 2002-07-12 Marek Michalkiewicz ! * config/avr/avr.c (test_hard_reg_class): Fix TEST_HARD_REG_BIT ! usage on 64-bit hosts, return value was truncated to 32 bits. ! 2002-07-12 J"orn Rennecke ! * simplify-rtx.c (simplify_subreg): Handle floating point ! CONST_DOUBLEs. When an integer subreg of a smaller mode than ! the element mode is requested, compute a subreg with an ! integer mode of the same size as the element mode first. ! 2002-07-11 J"orn Rennecke ! * combine.c (try_combine): When converting a paradoxical subreg ! to an extension, take LOAD_EXTEND_OP into account. ! 2002-07-11 Rainer Orth ! * config.gcc (mips-sgi-irix6*o32): New configuration. ! * configure.in (libgcc_visibility): Disable for mips-sgi-irix6*o32 ! configurations. ! * configure: Regenerate. ! * config/mips/iris6-o32-as.h: New file. ! * config/mips/iris6-o32.h: New file. ! * config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Define. ! (NM_FLAGS): Define. ! (HAVE_AS_SHF_MERGE): Undefine. ! * config/mips/t-iris5-as: New file. ! * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. ! * config/mips/t-iris6 (SHLIB_EXT, SHLIB_SOLINK, SHLIB_SONAME, ! SHLIB_NAME, SHLIB_MAP, SHLIB_OBJS, SHLIB_SLIBDIR_QUAL, SHLIB_LINK, ! SHLIB_INSTALL, SHLIB_MKMAP, SHLIB_MAPFILES, FPBIT, DPBIT, ! dp-bit.c, fp-bit.c): Move ... ! * config/mips/t-iris5-6: ... here. ! New file, shared by IRIX 5 and IRIX 6. ! * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix6*, ! mips-sgi-irix5*): Use it. ! * config/mips/iris6.h: Remove duplicate comment. ! * config/mips/mips.c (TARGET_ASM_UNALIGNED_DI_OP) [TARGET_IRIX5 && ! !TARGET_IRIX6]: Define. ! (mips_asm_file_start): Don't emit mdebug. sections on IRIX 5/6. ! * config/mips/mips.h (ASM_DECLARE_FUNCTION_NAME): Fix comment. ! 2002-07-11 John David Anglin ! * pa.md (adddi3): Change predicate of operand 2 to adddi3_operand ! and delete code to force constant to register. ! * pa-protos.h (adddi3_operand): Add prototype. ! * pa.c (adddi3_operand): New function. ! 2002-07-11 Roger Sayle ! * c-decl.c (duplicate_decls): Preserve the noreturn attribute on ! non-ANSI builtin functions. ! 2002-07-11 J"orn Rennecke ! * rtl.h (gen_rtx_CONST_VECTOR): Declare. ! * gengenrtl.c (special_rtx): Check for CONST_VECTOR. ! * emit-rtl.c (gen_rtx_CONST_VECTOR): New function. ! (gen_const_vector_0): Use it. ! 2002-07-11 John David Anglin ! * pa.md (adddi3): For 32-bit targets, force constants to a register ! if they don't fit in an 11-bit immediate. Change insn predicate to ! arith11_operand. Remove comment. ! * pa.c (cint_ok_for_move): Fix comment. ! (emit_move_sequence): Don't directly split DImode constants on 32-bit ! targets. ! 2002-07-11 Tim Josling ! Remove front end hard coding from gengtype.c. ! * Makefile.in ! (STAGESTUFF): add gtyp-gen.h ! (GTFILES): Remove front end specific files. ! (GTFILES_FILES_LANGS): New, from configure.. ! (GTFILES_FILES_FILES): Likewise. ! (GTFILES_LANG_DIR_NAMES): Likewise. ! (GTFILES_SRCDIR): Likewise. ! (gtyp-gen.h): Build from configure information. ! (s-gtype): Remove command line parameters from gengtype. ! (gengtype.o): Remove dependency on GTFILES. Depend on gtyp-gen.h. ! (mostlyclean): Delete files generated by and for gengtype. ! * c-config-lang.in: New file. ! * configure.in (all_gtfiles_files_langs): New. Accumulate files ! for each language. ! (all_gtfiles_files_files): New. Accumulate language for each file ! accumulated. ! (gtfiles): Pick up value for C. ! (srcdir): AC-SUBST this variable. ! (all_gtfiles_files_langs): AC-SUBST this variable. ! (all_gtfiles_files_files): AC-SUBST this variable. ! * configure: Regenerate. ! * gengtype-lex.l (parse_file): Make parameter const. ! * gengtype.c (toplevel): include gtyp-gen.h. ! (BASE_FILE_ unnamed enum): Delete. ! (lang_names): Delete (replaced by gtyp-gen.h) ! (lang_dir_names): From gtyp-gen.h, replaces lang_names; changed ! all references. ! (NUM_GT_FILES): New. ! (NUM_LANG_FILES): New. ! (srcdir_len): New. ! (NUM_BASE_FILES): Change calculation. ! (open_base_files): Change prototype to avoid warning. ! (startswith): Delete. ! (get_file_basename): Iterate through generated language list not ! hard coded list. ! (get_base_file_bitmap): Use generated list of files and languages. ! (close_output_files): Add prototype to rmove warning. ! (main): Iterate through list of generated files from gtyp-gen.h ! rather than command line paramaters. Ignore duplicated file ! names. ! * gengtype.h (parse_file): Amend prototype for const parameter. ! * doc/sourcebuild.texi: Document gtfiles variable. ! * doc/gty.texi: Document changes to gtfiles variable for front ! ends. ! * objc/config-lang.in (gtfiles): Add files needed for objc front ! end. ! 2002-07-10 Roger Sayle ! PR c/2454 ! * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply ! to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. ! 2002-07-10 Roger Sayle ! Zack Weinberg ! * builtins.def: Make the argument types of abort and exit ! independent of the front-end. ! 2002-07-11 Alan Modra ! * config/rs6000/linux64.h (ASM_SPEC): Define. ! 2002-07-10 Aldy Hernandez ! * config/rs6000/rs6000.c (emit_frame_save): New. ! (rs6000_frame_related): Replace reg2 before reg. ! (rs6000_emit_prologue): Use emit_frame_save for saving gprs, fprs, ! and eh_return registers. ! 2002-07-10 Toon Moene ! Revert all patches for optimization of Complex .op. Real. ! * complex_part_zero_p: Remove ! * expand_cmplxdiv_straight: Replace complex_part_zero_p(x) ! with x. ! * expand_cmplxdiv_wide: Ditto. ! * expand_binop: Ditto. ! 2002-07-10 Marek Michalkiewicz ! * config/avr/avr.md: Fix two 0x80000000 constants to make them ! negative also on 64-bit hosts. ! Default to -fno-reorder-blocks when optimizing for size. ! * config/avr/avr-protos.h (avr_optimization_options): Declare. ! * config/avr/avr.c (avr_optimization_options): New function. ! * config/avr/avr.h (OPTIMIZATION_OPTIONS): New. ! Optimize returning from simple functions. ! * config/avr/avr-protos.h (avr_simple_epilogue): Declare. ! * config/avr/avr.c (avr_simple_epilogue): New function. ! * config/avr/avr.md (return): New insn. ! 2002-07-10 Douglas B Rupp ! * config/i386/i386.c (ix86_svr3_asm_out_constructor): Add ! HAS_INIT_SECTION to protection. ! 2002-07-10 Mark Mitchell ! * doc/invoke.texi (Debugging Options): Mention that -gdwarf is ! deprecated. ! 2002-07-10 J"orn Rennecke ! * combine.c (gen_lowpart_for_combine): Handle vector modes. ! Supply non-VOID mode to simplify_gen_subreg. ! 2002-07-10 Jan Hubicka ! * i386.c (ix86_init_mmx_sse_builtins): Fix thinko. ! 2002-07-10 Jeffrey A Law ! * mn10200.c (expand_prologue): Create REG_MAYBE_DEAD notes ! as appropriate. ! * mn10200.c (expand_epilogue): Fix test to determine which scratch ! register to use. ! 2002-07-10 J"orn Rennecke ! * cse.c (cse_insn): Supply proper SUBREG_BYTE to simplify_gen_subreg. ! Get mode from dest. ! If simplify_gen_subreg fails, try next equivalent. ! 2002-07-09 Gabriel Dos Reis ! * diagnostic.h: #include location.h ! (location_t): Move definition to.. ! * location.h: ... here. New file. ! * tree.h: #include location.h ! (DECL_SOURCE_LOCATION): New macro. ! (DECL_SOURCE_FILE): Use. ! (DECL_SOURCE_LINE): Likewise. ! (struct tree_decl): REplace filename and linenum with locus. ! * Makefile.in (TREE_H): add location.h ! (diagnostic.o): Depends on gt-location.h ! (gt-location.h): Depends on s-gtype ! 2002-07-09 Matt Kraai ! * config/rs6000/aix.h: Convert CPP_PREDEFINES to ! TARGET_OS_CPP_BUILTINS. ! * config/rs6000/aix31.h: Likewise. ! * config/rs6000/aix41.h: Likewise. ! * config/rs6000/aix43.h: Likewise. ! * config/rs6000/aix51.h: Likewise. ! * config/rs6000/beos.h: Likewise. ! * config/rs6000/darwin.h: Likewise. ! * config/rs6000/eabi.h: Likewise. ! * config/rs6000/eabisim.h: Likewise. ! * config/rs6000/linux.h: Likewise. ! * config/rs6000/linux64.h: Likewise. ! * config/rs6000/lynx.h: Likewise. ! * config/rs6000/mach.h: Likewise. ! * config/rs6000/rtems.h: Likewise. ! * config/rs6000/sysv4.h: Likewise. ! * config/rs6000/vxppc.h: Likewise. ! 2002-07-09 Devang Patel ! * objc/objc-act.c (adjust_type_for_id_default): Fix my previous patch. ! Do not allow ObjC objects as a parameter type for Objective-C methods. ! My previous patch restricted 'struct' also. ! 2002-07-09 Neil Booth ! * cpperror.c (cpp_error): Default to directive_line within ! directives here. ! * cppexp.c (cpp_interpret_integer): Only use traditional ! number semantics in directives. ! * cpplib.c (prepare_directive_trad): Don't reset pfile->line. ! (do_include_common): Similarly. ! * cpptrad.c (scan_out_logical_line): Implement accurate ! quoting of <> in #include. ! * doc/cpp.texi: Update. ! 2002-07-09 Stephen Clarke ! J"orn Rennecke ! * sh.c (sh_adjust_cost): Special handling of SHMEDIA code. ! * sh.md (attribute issues): Replace with: ! (attribute pipe_model). All users changed. ! (attribute type): Change pt / ptabs to pt_media / ptabs_media. ! All users changed. ! (function units sh5issue, sh5fds): New. ! (attribute is_mac_media): New. ! (adddi3_media, subdi3_media, divsi3_i1_media, anddi3): Add type. ! (andcdi3, iordi3, xordi3, ashldi3_media, lshrdi3_media): Likewise. ! (ashrdi3_media, negdi_media, extendsidi2, movqi_media): Likewise. ! (movhi_media, shori_media, movv2sf_i, jump_media): Likewise. ! (call_media, call_value_media, sibcall_media): Likewise. ! (casesi_jump_media, casesi_shift_media, casesi_load_media): Likewise. ! (return_media_i, addsf3_media, subsf3_media, mulsf3_media): Likewise. ! (mac_media, divsf3_media, floatdisf2, floatsisf2_media): Likewise. ! (fix_truncsfdi2, fix_truncsfsi2_media, cmpeqsf_media): Likewise. ! (cmpgtsf_media, cmpgesf_media, cmpunsf_media, negsf2_media): Likewise. ! (sqrtsf2_media, abssf2_media, adddf3_media, subdf3_media): Likewise. ! (muldf3_media, divdf3_media, floatdidf2, floatsidf2_media): Likewise. ! (fix_truncdfdi2, fix_truncdfsi2_media, cmpeqdf_media): Likewise. ! (cmpgtdf_media, cmpgedf_media,cmpundf_media, negdf2_media): Likewise. ! (sqrtdf2_media, absdf2_media, extendsfdf2_media): Likewise. ! (truncdfsf2_media): Likewise. ! (movsi_media, movsi_media_nofpu, movdi_media): Use new types. ! (movdi_media_nofpui, movdf_media, movdf_media_nofpu): Likewise. ! 2002-07-09 J"orn Rennecke ! * sh.h (PREDICATE_CODES): Add general_extend_operand and inqhi_operand. ! * sh.c (general_extend_operand, inqhi_operand): New functions. ! * sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): Collapse ! alternatives using 'N' modifier. Add type. ! (adddi3z_media): Likewise. Enable generator function generation. ! (movdicc_false, movdicc_true, addsi3_media, subsi3_media): Use more ! exact predicates / constraints. Add type. ! (subsi3): Allow 0 for SHMEDIA. ! (udivsi3_i4_media): Use match_operand for input values ! rather than hard registers. ! (udivsi3 - TARGET_SHMEDIA_FPU case): Don't ferry values ! unnecessarily through hard registers. Keep copies of pseudo ! registers outside of the libcall sequence. ! (mulsidi3_media, umulsidi3_media): Use more exact predicates. Add type. ! (ashlsi3_media, ashrsi3_media, lshrsi3_media): Likewise. ! (zero_extendsidi2, zero_extendhidi2, zero_extendqidi2): Likewise. ! (extendhidi2, extendqidi2): Likewise. ! (andsi3_compact): Name. ! (andcdi3): Enable generator function generation. ! (zero_extendhisi2, zero_extendqisi2): Rename to ! (zero_extendhisi2_compact, zero_extendqisi2_compact). ! (extendhisi2, extendqisi2): Rename to ! (extendhisi2_compact, extendqisi2_compact). ! (rotldi3, rotldi3_mextr, rotrdi3, rotrdi3_mextr): New patterns. ! (loaddi_trunc, zero_extendhisi2, zero_extendhisi2_media): Likewise. ! (zero_extendhisi2_media+1, zero_extendqisi2): Likewise. ! (zero_extendqisi2_media, extendhisi2, extendhisi2_media): Likewise. ! (extendhisi2_media, extendhisi2_media+1, extendqisi2): Likewise. ! (extendqisi2_media, extendqisi2_media+1, truncdisi2): Likewise. ! (truncdihi2, truncdiqi2, reload_inqi, reload_inhi): Likewise. ! (shmedia32_initialize_trampoline_big): Likewise. ! (shmedia32_initialize_trampoline_little): Likewise. ! (nsb, nsbsi, nsbdi, ffsdi2, ffssi2, byterev): Likewise. ! (negdi2): Remove spurious T clobber. ! (zero_extendhidi2+1, extendhidi2+1, extendqidi2+1): Handle TRUNCATE. ! (movsi_media, movsi_media_nofpu): Remove spurious *k after b. ! (movdi_media, movdi_media_nofpu, pt, ptb): Likewise. ! (movsi_media_nofpu+2, movhi_media+1): Only do split after reload. ! (ic_invalidate_line_media): Write back data cache before invalidating ! instruction cache. Add type. ! (movsf_media): Sign-extend when the destination is a general ! purpose register. Add type. ! (bgt_media, bge_media, bgtu_media, bgeu_media, blt_media_i): Allow 0. ! (casesi_worker_0+1): Only increment ref count for proper label. ! (casesi_worker_0+2): Likewise. ! 2002-07-09 Mark Mitchell ! * dwarfout.c (dwarfout_init): Warn that DWARF1 is deprecated. ! 2002-07-09 Steve Ellcey ! * gcc/except.c (expand_eh_region_end_cleanup): Change exception pointer ! from Pmode to ptr_mode. ! (get_exception_pointer): Ditto. ! (connect_post_landing_pads): Ditto. ! (dw2_build_landing_pads): Ditto. ! 2002-07-08 Steve Ellcey ! * gcc/c-pragma.h (add_to_renaming_pragma_list): New function. ! * gcc/c-pragma.c (add_to_renaming_pragma_list): New function. ! (handle_pragma_redefine_extname): Change to use new function. ! 2002-07-08 Roger Sayle ! * combine.c (combine_simplify_rtx): Add an explicit cast ! to avoid signed/unsigned comparison warning. ! (simplify_if_then_else): Likewise. ! (extended_count): Likewise. ! (simplify_shift_const): Likewise. ! (simplify_comparison): Likewise. ! 2002-07-08 Richard Sandiford ! * config/mips/mips.md: Add imadd type. Update scheduler description ! to use imadd as well as imul. ! (*mul_acc_si, *madsi): Change imul alternatives to imadd. ! (*mul_acc_di, *mul_acc_64bit_di): Likewise. ! (*mul_sub_si): Likewise for first alternative. Change second ! alternative from imul to multi. ! 2002-07-07 Neil Booth ! * c-common.c (c_common_post_options): Update prototype; ! don't init backends if preprocessing only. ! * langhooks-def.h (LANG_HOOKS_POST_OPTIONS): Update. ! * langhooks.h (struct lang_hooks): Update post_options to ! return a boolean. ! * toplev.c (parse_options_and_default_flags, do_compile, ! lang_independent_init): Update prototypes. Allow the ! front end to specify that there is no need to initialize ! the back end. ! (general_init): Move call to hex_init here... ! (toplev_main): ...from here. Pass flag for back end init ! suppression. ! 2002-07-07 J"orn Rennecke ! * sh.h (PRINT_OPERAND_PUNCT_VALID_P): Allow '\''. ! (PREDICATE_CODES): Add entries for equality_comparison_operator, ! greater_comparison_operator and less_comparison_operator. ! * sh.c (print_operand): Add '\'' code. Make 'o' handle ! more operators. ! (equality_comparison_operator): New function. ! (greater_comparison_operator, less_comparison_operator): Likewise. ! * sh.md (beq_media_i): Disable generator function generation. ! Use match_operator to handle a whole class of comparisons. Add ! modifier in output template to provide branch prediction. Add type. ! (bgt_media_i, ble_media_i): Likewise. Allow zero operands. ! (bne_media_i, bge_media_i, bgtu_media_i, bgeu_media_i): Delete. ! (blt_media_i, bleu_media_i, bltu_media_i): Likewise. ! (bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu): Allow zero operands. ! 2002-07-07 Hans-Peter Nilsson ! Emit MMIX function prologue and epilogue as rtl. ! * config/mmix/mmix.md ("call"): Use mmix_get_hard_reg_initial_val, ! not unprototyped get_hard_reg_initial_val. ! ("call_value", "nonlocal_goto_receiver"): Ditto. ! ("return"): Make define_expand. Move real insn to... ! ("*expanded_return"): New pattern. ! ("prologue", "epilogue"): New define_expands. ! * config/mmix/mmix.h (MMIX_rO_REGNUM): New macro. ! (struct machine_function): New member in_prologue. ! (FIRST_PSEUDO_REGISTER): Adjust for including rO as register. ! (FIXED_REGISTERS, CALL_USED_REGISTERS): Ditto. ! (MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Ditto. ! (MMIX_GNU_ABI_REG_ALLOC_ORDER, REG_CLASS_CONTENTS): Ditto. ! (REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): Ditto. ! (LOCAL_REGNO): Define. Adjust comment. ! * config/mmix/mmix.c (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): ! Consider regs_ever_live[MMIX_rJ_REGNUM], not just ! leaf_function_p. ! (MMIX_OUTPUT_REGNO): Don't translate registers while outputting ! the prologue. ! (mmix_target_asm_function_prologue): Make static. Just mark that ! the prologue is being emitted. Move guts to... ! (mmix_expand_prologue): New function. Adjust for emitting ! prologue as rtl. For sizes, use HOST_WIDE_INT only. ! (mmix_target_asm_function_epilogue): Make static. Simply emit a ! \n. Move guts to... ! (mmix_expand_epilogue): New function. Adjust for emitting ! epilogue as rtl. For sizes, use HOST_WIDE_INT only. ! (mmix_target_asm_function_end_prologue): Mark that the prologue ! has ended. ! (TARGET_ASM_FUNCTION_END_PROLOGUE): Define. ! (mmix_conditional_register_usage): Improve comments. ! (mmix_local_regno): New function. ! (mmix_emit_sp_add, mmix_get_hard_reg_initial_val): Ditto. ! * config/mmix/mmix-protos.h (mmix_local_regno): Prototype. ! (mmix_expand_prologue, mmix_expand_epilogue): Ditto. ! (mmix_get_hard_reg_initial_val): Ditto. ! 2002-07-06 Andreas Jaeger ! * toplev.c (set_fast_math_flags): Don't use ISO C style function ! definitions. ! * gengtype.c (open_base_files): Likewise. ! (close_output_files): Likewise. ! * tracer.c (find_best_predecessor): Likewise. ! (find_best_successor): Likewise. ! (ignore_bb_p): Likewise. ! 2002-07-05 Roger Sayle ! PR c++/7099 ! * builtin-attrs.def: Define new attribute lists for use in ! builtins.def. ! * builtins.def [DEF_BUILTIN]: Modify to take an additional ! ATTRS argument, an enumerated value defined in builtin-attrs.def ! that represents the attribute list for the builtins. Modify ! all builtin functions to pass an appropriate attribute list. ! Specify "abort", "exit", "_exit" and "_Exit" builtins here with ! their required noreturn attributes. ! * tree.h (enum_builtin_function): Ignore the additional parameter ! to DEF_BUILTIN. ! * builtins.c (built_in_names): Likewise. ! * c-common.c: (builtin_function_2): Replace the "int noreturn_p" ! argument with a tree representing the functions attribute list. ! Pass this "attrs" argument to builtin_function. No longer handle ! the noreturn_p processing manually. ! (built_in_attributes): Move the definitions from builtin-attrs.def ! before c_common_nodes_and_builtins. ! (c_common_nodes_and_builtins): Handle the new ATTRS parameter in ! DEF_BUILTIN, passing it to both builtin_function and the changed ! builtin_function_2. ! * doc/extend.texi: Document __builtin_abort, __builtin_exit, ! __builtin__exit and __builtin__Exit. ! 2002-07-05 Stephane Carrez ! * config/m68hc11/m68hc11.md ("*movqi_68hc12"): Avoid allocating ! QI mode registers in soft registers. ! ("zero_extendqihi2"): Do not take into account soft registers ! for register allocation (use '*' constraint). ! 2002-07-05 Stephane Carrez ! * config/m68hc11/m68hc11.md ("*ashlsi3"): Avoid saving y if we know ! it is dead. ! ("*ashrsi3"): Likewise. ! ("*lshrsi3"): Likewise. ! 2002-07-05 Vladimir Makarov ! * genautomata.c (output_max_insn_queue_index_def): Take latencies ! into account. ! 2002-07-05 Stephane Carrez ! * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize ! address computation and memory moves. ! 2002-07-03 Mark Mitchell ! PR c++/6706 ! * dwarfout.c (output_reg_number): Fix warning message. ! (output_bound_representation): Check SAVE_EXPR_RTL is not NULL ! before using it. ! 2002-07-05 Rainer Orth ! * gcc/gcc.c (asm_debug): Move initialization ... ! (init_spec): ... here. ! 2002-07-05 Nathan Sidwell ! * c-parse.in (extdef): Append ';'. ! (old_style_parm_decls): Append ';'. ! 2002-07-04 Daniel Jacobowitz ! * configure.in: Correct typos: gcc_cv_as_gdwarf2_debug_flag to ! gcc_cv_as_gdwarf2_flag and gcc_cv_as_gstabs_debug_flag ! to gcc_cv_as_gstabs_flag. ! * configure: Rebuilt. ! 2002-07-04 Geoffrey Keating ! * ggc.h (ggc_add_root): Document as obsolete. ! 2002-07-04 J"orn Rennecke ! * sh.md (mshfhi_b, mshflo_b, mshfhi_l, mshflo_l, mshfhi_w): Add DONE. ! (mshflo_w): Likewise. ! 2002-07-04 J"orn Rennecke ! * simplify-rtx.c (simplify_subreg): Reduce problem of finding ! vector mode subregs of constants to finding integer mode ! subregs of constants. ! * cse.c (cse_insn): Use simplify_gen_subreg. ! * convert.c (convert_to_integer): Don't strip a NOP_EXPR ! From a vector mode expression of different size than the ! target mode. ! 2002-07-03 Eric Christopher ! * config/mips/linux.h: Add #undef for SUBTARGET_CPP_SPEC. ! * config/mips/mips.h: Remove deprecated -m options ! and cc1_cpu_spec associated. ! (CONSTANT_ADDRESS_P): Fix last patch. ! (ASM_DECLARE_FUNCTION_NAME): Declare. Fix comment. ! * config/mips/mips.md (bungt, bunge, sungt_df, sungt_sf, sunge_df, ! sunge_sf): Remove. ! 2002-07-03 Stan Shebs ! * config/darwin.h (APPLE_CC): Remove, not meaningful in FSF GCC. ! (STRINGIFY_THIS, REALLY_STRINGIFY): Remove. ! (CPP_SPEC): Remove insertion of APPLE_CC definition. ! 2002-07-03 Roger Sayle ! * combine.c (struct_undo): Change types of recorded substitutions ! to be either "int" or "rtx", instead of "unsigned int" and "rtx". ! (do_SUBST_INT): Change types of the substitution from unsigned int ! to int, to avoid compilation warning from SUBST_INT's only caller. ! (make_extraction): Add cast to avoid compilation warning. ! (force_to_mode): Remove cast to avoid compilation warning. ! 2002-07-03 Eric Botcazou ! Jeff Law ! * i386.md (length_immediate attribute): Fix typo. ! (length_address attribute): Likewise. ! (modrm attribute): Set it to 0 for immediate call instructions. ! (jcc_1 pattern): Set modrm attribute to 0. ! (jcc_2 pattern ): Likewise. ! (jump pattern): Likewise. ! (doloop_end_internal pattern): Explicitly set length. ! (leave pattern): Fix typo. ! (leave_rex64 pattern): Likewise. ! 2002-07-03 David Edelsohn ! * config/rs6000/rs6000.md (fix_truncdfsi2_internal): Ignore DImode ! in FPR as preference. ! (fctiwz): Same. ! (floatdidf2, fix_truncdfdi2): Same. ! (floatdisf2, floatditf2, fix_trunctfdi2): Same. ! (floatditf2): Same. ! (floatsitf2, fix_trunctfsi2): SImode in GPR. ! (ctrdi): Remove FPR alternative and splitter. ! 2002-07-03 Will Cohen ! * config/i386/i386.c (x86_integer_DFmode_moves): Disable for PPro. ! 2002-07-03 J"orn Rennecke ! * optabs.c (expand_vector_binop): Don't store using a SUBREG smaller ! than UNITS_PER_WORD, unless this is little endian and the first unit ! in this word. Let extract_bit_field decide how to load an element. ! Force arguments to matching mode. ! (expand_vector_unop): Likewise. ! * simplify-rtx.c (simplify_subreg): Don't assume that all vectors ! consist of word_mode elements. ! * c-typeck.c (build_binary_op): Allow vector types for BIT_AND_EXPR, ! BIT_ANDTC_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR. ! (build_unary_op): Allow vector types for BIT_NOT_EPR. ! * emit-rtl.c (gen_lowpart_common): Use simplify_gen_subreg for ! CONST_VECTOR. ! * optabs.c (expand_vector_binop): Try to perform operation in ! smaller vector modes with same inner size. Add handling of AND, IOR ! and XOR. Reject expansion to inner-mode sized scalars when using ! OPTAB_DIRECT. Use simplify_gen_subreg on constants. ! (expand_vector_unop): Try to perform operation in smaller vector ! modes with same inner size. Add handling of one's complement. ! When there is no vector negate operation, try a vector subtract ! operation. Use simplify_gen_subreg on constants. ! * simplify-rtx.c (simplify_subreg): Add capability to convert vector ! constants into smaller vectors with same inner mode, and to ! integer CONST_DOUBLEs. ! 2002-07-02 Kaveh R. Ghazi ! * c-parse.in (parsing_iso_function_signature): New variable. ! (extdef_1): New, copied from... ! (extdef): ... here. Reset parsing_iso_function_signature. ! (old_style_parm_decls): Reset parsing_iso_function_signature. ! (old_style_parm_decls_1): New, copied from old_style_parm_decls. ! Warn about ISO C style function definitions. ! (nested_function, notype_nested_function): Reset ! parsing_iso_function_signature. ! (parmlist_2): Set parsing_iso_function_signature. ! * doc/invoke.texi (-Wtraditional): Document new behavior. ! 2002-07-02 Chris Demetriou ! * config.gcc (mips*el-*-*): Use tm_defines to set ! TARGET_ENDIAN_DEFAULT, rather than including mips/little.h. ! * config/mips/little.h: Remove. ! 2002-07-02 Devang Patel ! * objc/objc-act.c (adjust_type_for_id_default): Do not allow an ! object as parameter. Prevent something like 'NSObject' to be ! used as the type for a method argument. ! 2002-07-03 Neil Booth ! * cpptrad.c: Update comment. ! 2002-07-02 Neil Booth ! * doc/cpp.texi: Update for traditional preprocessing changes. ! * goc/cppopts.texi: Similarly. ! 2002-07-02 Ziemowit Laski ! * c-parse.in (designator): Enable designated initializers if ObjC. ! (objcmessageexpr): Remove references to objc_receiver_context. ! * objc/objc-act.h (objc_receiver_context): Remove decl. ! * objc/objc-act.c (objc_receiver_context): Remove. ! (lookup_objc_ivar): Test objc_method_context instead of ! objc_receiver_context. ! 2002-07-02 J"orn Rennecke ! * sh.c (print_operand, case 'N'): Allow zero vector. ! (arith_reg_or_0_operand): Likewise. ! (zero_vec_operand): Check for CONST_VECTOR, not PARALLEL. ! * sh.h (CONST_COSTS): 0 has 0 cost. Check OUTER_CODE for ! IOR, XOR, PLUS and SET and take their respective constant ! ranges into account. ! (PREDICATE_CODES, arith_reg_or_0_operand): Can be CONST_VECTOR. ! * sh.md (subdi3, subdi3_media): Allow zero operand. ! (movv8qi_i+3): Only vector that is not split is the zero vector. ! Fix operand 3 to simplify_subreg. ! (movv2si_i): Split alternative 1. ! (mshfhi_l_di_rev+1): New splitter. ! 2002-07-02 Neil Booth ! PR preprocessor/7029 ! * cppinit.c (cpp_handle_option): Suppress warnings with an ! implicit "-w" for "-M" and "-MM". ! * doc/cppopts.texi: Update. ! 2002-07-01 Roger Sayle ! * config/sh/sh.c (sh_media_init_builtins): Change use of poisoned ! identifier "bzero" to "memset". Pass extra NULL_TREE argument to ! builtin_function. ! 2002-07-02 Alan Modra ! * README.Portability: Fix typos. ! 2002-07-01 Hans-Peter Nilsson ! PR target/7177 ! * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Correct number ! of indirections for register inside sign-extended mem part. ! 2002-07-01 Roger Sayle ! * tree.h: Modify builtin_function interface to take an extra ! argument ATTRS, which is a tree representing an attribute list. ! * c-decl.c (builtin_function): Accept additional parameter. ! * objc/objc-act.c (builtin_function): Likewise. ! * f/com.c (builtin_function): Likewise. ! * java/decl.c (builtin_function): Likewise. ! * ada/utils.c (builtin_function): Likewise. ! * cp/decl.c (builtin_function): Likewise. ! (builtin_function_1): Likewise. ! * c-common.c (c_common_nodes_and_builtins): Pass an additional ! NULL_TREE argument to builtin_function. (builtin_function_2): ! Likewise. ! * cp/call.c (build_java_interface_fn_ref): Likewise. ! * objc/objc-act.c (synth_module_prologue): Likewise. ! * java/decl.c (java_init_decl_processing): Likewise. ! * f/com.c (ffe_com_init_0): Likewise. ! * config/alpha/alpha.c (alpha_init_builtins): Pass an additional ! NULL_TREE argument to builtin_function. ! * config/arm/arm.c (def_builtin): Likewise. ! * config/c4x/c4x.c (c4x_init_builtins): Likewise. ! * config/i386/i386.c (def_builtin): Likewise. ! * config/ia64/ia64.c (def_builtin): Likewise. ! * config/rs6000/rs6000.c (def_builtin): Likewise. ! 2002-07-01 Zack Weinberg ! * config/ip2k/t-ip2k: Remove LIBGCC1, CROSS_LIBGCC1, and LIBGCC1_TEST. ! * config/mips/t-isa3264: Likewise. ! * config/mmix/t-mmix: Likewise. ! 2002-07-01 John David Anglin ! * emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT. ! 2002-07-01 Roger Sayle ! PR opt/4046 ! * fold-const.c (fold) [COND_EXPR]: Simplify A ? 0 : 1 to !A, ! A ? B : 0 to A && B and A ? B : 1 into !A || B if both A and ! B are truth values. ! 2002-07-01 Nathanael Nerode ! * config/mmix/t-mmix: Eliminate last reference to LIBGCC1_TEST. ! 2002-07-01 Matt Kraai ! * README.Portability (Function prototypes): Give an example of ! declaring and defining a function with no arguments. ! * README.Portability (Function prototypes): Document new ! variable-argument function macros. ! 2002-07-01 J"orn Rennecke ! * sh.c (langhooks.h): Include. ! (sh_init_builtins, sh_media_init_builtins): New functions. ! (sh_expand_builtin, arith_reg_dest,and_operand): Likewise. ! (mextr_bit_offset, extend_reg_operand, zero_vec_operand): Likewise. ! (sh_rep_vec, sh_1el_vec, sh_const_vec): Likewise. ! (builtin_description): New struct tag. ! (signature_args, bdesc): New arrays. ! (TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN): Undef / define. ! (print_operand): Add 'N' modifier. ! * sh.h (VECTOR_MODE_SUPPORTED_P): Add SHmedia vector modes. ! (EXTRA_CONSTRAINT_U, EXTRA_CONSTRAINT_W): New macros. ! (EXTRA_CONSTRAINT): Add 'U' and 'W' cases. ! (CONST_COSTS): Add special case for SHmedia AND. ! (PREDICATE_CODES): Add and_operand, arith_reg_dest, ! extend_reg_operand, extend_reg_or_0_operand, mextr_bit_offset, ! sh_const_vec, sh_1el_vec, sh_rep_vec, zero_vec_operand. ! target_operand can also be const or unspec. ! * sh.md (UNSPEC_INIT_TRAMP, UNSPEC_FCOSA UNSPEC_FSRRA): New constants. ! (UNSPEC_FSINA, UNSPEC_NSB, UNSPEC_ALLOCO): Likewise. ! (attribute type): Add new types. ! (anddi3): Add splitter. ! (movdi_const_16bit+1): Add code to handle vector constants and ! bitmasks efficiently. ! (shori_media): Have generator function made. ! (movv8qi, movv8qi_i, movv8qi_i+1, movv8qi_i+2): New patterns. ! (movv8qi_i+3, movv2hi, movv2hi_i, movv4hi, movv4hi_i): Likewise. ! (movv2si, movv2si_i, absv2si2, absv4hi2, addv2si3, addv4hi3): Likewise. ! (ssaddv2si3, usaddv8qi3, ssaddv4hi3, negcmpeqv8qi): Likewise. ! (negcmpeqv2si, negcmpeqv4hi, negcmpgtuv8qi, negcmpgtv2si): Likewise. ! (negcmpgtv4hi, mcmv, mcnvs_lw, mcnvs_wb, mcnvs_wub): Likewise. ! (mextr_rl, mextr_lr, mextr1, mextr2, mextr3, mextr4, mextr5): Likewise. ! (mextr6, mextr7, mmacfx_wl, mmacfx_wl_i, mmacnfx_wl): Likewise. ! (mmacnfx_wl_i, mulv2si3, mulv4hi3, mmulfx_l, mmulfx_w): Likewise. ! (mmulfxrp_w, mmulhi_wl, mmullo_wl, mmul23_wl, mmul01_wl): Likewise. ! (mmulsum_wq, mmulsum_wq_i, mperm_w, mperm_w_little): LIkewise. ! (mperm_w_big, mperm_w0, msad_ubq, msad_ubq_i, mshalds_l): Likewise. ! (mshalds_w, ashrv2si3, ashrv4hi3, mshards_q, mshfhi_b): Likewise. ! (mshflo_b, mshf4_b, mshf0_b, mshfhi_l, mshflo_l, mshf4_l): Likewsie. ! (mshf0_l, mshfhi_w, mshflo_w, mshf4_w, mshf0_w, mshfhi_l_di): Likewise. ! (mshfhi_l_di_rev, mshflo_l_di, mshflo_l_di_rev): Likewise. ! (mshflo_l_di_x, mshflo_l_di_x_rev, ashlv2si3, ashlv4hi3): Likewise. ! (lshrv2si3, lshrv4hi3, subv2si3, subv4hi3, sssubv2si3): Likewise. ! (ussubv8qi3, sssubv4hi3, fcosa_s, fsina_s, fipr, fsrra_s): Likewise. ! (ftrv): Likewise. ! (fpu_switch+1, fpu_switch+2): Remove constraint. ! 2002-07-01 Aldy Hernandez ! * tree.c (build_function_type_list): Update function comment. ! Rename first argument to return_type. ! 2002-07-01 Neil Booth ! * Makefile.in: Remove all trace of tradcpp.c, tradcpp.h, ! tradcif.y and related files. ! 2002-07-01 Neil Booth ! * cpptrad.c (skip_whitespace): Pass pointer to prior char. ! 2002-07-01 Kaveh R. Ghazi ! * mips.h (FUNCTION_ARG_REGNO_P): Fix parentheses. ! See ChangeLog.7 for earlier changes. diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.0 gcc-3.3/gcc/ChangeLog.0 *** gcc-3.2.3/gcc/ChangeLog.0 2001-11-23 02:05:05.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.0 2002-09-22 02:03:12.000000000 +0000 *************** Thu Jun 4 01:26:57 1998 Craig Burley *** 2670,2676 **** Thu Jun 4 00:54:21 1998 Graham ! * loop.c (check_dbra_loop): Initialise final_value before normalizing the loop. Wed Jun 3 20:00:04 1998 J"orn Rennecke --- 2670,2676 ---- Thu Jun 4 00:54:21 1998 Graham ! * loop.c (check_dbra_loop): Initialize final_value before normalizing the loop. Wed Jun 3 20:00:04 1998 J"orn Rennecke *************** Sun May 3 23:57:25 1998 Robert Lipe < *** 4435,4441 **** Sun May 3 13:51:34 1998 Richard Henderson ! Support for official Sparc V9 ABI: * sparc.c (sparc_override_options): Force stack bias off for !arch64. Care for flag_pcc_struct_return default. (output_move_quad): Rewrite to move by halves on v9 and in the --- 4435,4441 ---- Sun May 3 13:51:34 1998 Richard Henderson ! Support for official SPARC V9 ABI: * sparc.c (sparc_override_options): Force stack bias off for !arch64. Care for flag_pcc_struct_return default. (output_move_quad): Rewrite to move by halves on v9 and in the *************** Wed Mar 11 12:05:20 1998 Teemu Torma < *** 6574,6581 **** * gthr.h: Changed the comment about return values. * gthr-solaris.h (__gthread_once): Do not use errno; return the error number instead of -1. ! (__gthread_key_create): Any non-zero return value is an error. ! * libgcc2.c (eh_context_initialize): Check for non-zero return value from __gthread_once. Check that the value of get_eh_context was really changed. --- 6574,6581 ---- * gthr.h: Changed the comment about return values. * gthr-solaris.h (__gthread_once): Do not use errno; return the error number instead of -1. ! (__gthread_key_create): Any nonzero return value is an error. ! * libgcc2.c (eh_context_initialize): Check for nonzero return value from __gthread_once. Check that the value of get_eh_context was really changed. *************** Tue Nov 4 20:36:50 1997 Richard Hender *** 10440,10446 **** * alpha.c (alpha_handle_trap_shadows): Init sum.defd to zero. ! * alpha.md (attr trap): Make TRAP_YES non-zero for sanity's sake. Tue Nov 4 18:49:42 1997 Jeffrey A Law (law@cygnus.com) --- 10440,10446 ---- * alpha.c (alpha_handle_trap_shadows): Init sum.defd to zero. ! * alpha.md (attr trap): Make TRAP_YES nonzero for sanity's sake. Tue Nov 4 18:49:42 1997 Jeffrey A Law (law@cygnus.com) *************** Wed Sep 10 11:49:20 1997 Jason Merrill *** 12000,12006 **** EXCEPTION_SECTION, mark the start of the frame info with a collectible tag. * collect2.c (frame_tables): New list. ! (is_ctor_dtor): Recognise frame entries. (scan_prog_file): Likewise. (main): Pass -fno-exceptions to sub-compile. Also do collection if there are any frame entries. --- 12000,12006 ---- EXCEPTION_SECTION, mark the start of the frame info with a collectible tag. * collect2.c (frame_tables): New list. ! (is_ctor_dtor): Recognize frame entries. (scan_prog_file): Likewise. (main): Pass -fno-exceptions to sub-compile. Also do collection if there are any frame entries. diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.1 gcc-3.3/gcc/ChangeLog.1 *** gcc-3.2.3/gcc/ChangeLog.1 2001-10-28 20:08:50.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.1 2002-10-28 14:07:45.000000000 +0000 *************** Sun May 2 15:16:42 1999 Joseph S. Myer *** 469,475 **** (ASSEMBLER_DIALECT): Define. (CONDITIONAL_REGISTER_USAGE): Rename floating point registers if required for the UNIX assembler. ! (ASM_OUTPUT_INT): Remove. The compiler will synthesise it. (ASM_OUTPUT_ADDR_VEC_PROLOGUE): Remove. (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Change to "[" and "]". (TRAMPOLINE_TEMPLATE): Use ASM_OUTPUT_SHORT. --- 469,475 ---- (ASSEMBLER_DIALECT): Define. (CONDITIONAL_REGISTER_USAGE): Rename floating point registers if required for the UNIX assembler. ! (ASM_OUTPUT_INT): Remove. The compiler will synthesize it. (ASM_OUTPUT_ADDR_VEC_PROLOGUE): Remove. (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Change to "[" and "]". (TRAMPOLINE_TEMPLATE): Use ASM_OUTPUT_SHORT. *************** Fri Apr 9 10:40:10 1999 Kaveh R. Ghazi *** 1732,1738 **** Thu Apr 8 19:20:18 1999 Jeffrey A Law (law@cygnus.com) * expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF): ! Do not try to optimize a aggregate address which has VOIDmode. Mirrors March 23 change to expand_assignment. * flow.c (delete_unreachable_blocks): Do not require EDGE_FALLTHRU --- 1732,1738 ---- Thu Apr 8 19:20:18 1999 Jeffrey A Law (law@cygnus.com) * expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF): ! Do not try to optimize an aggregate address which has VOIDmode. Mirrors March 23 change to expand_assignment. * flow.c (delete_unreachable_blocks): Do not require EDGE_FALLTHRU *************** Fri Apr 2 12:58:26 1999 Michael Hayes *** 2152,2158 **** Fri Apr 2 12:19:17 1999 Michael Hayes * config/c4x/c4x.md (*db): Enable pattern if TARGET_LOOP_UNSIGNED ! is non-zero. (movstrqi_small, movstrqi_large, *cmpstrqi): Add + modifier to address register constraints. (*movhi_clobber+1): Modify splitter pattern to handle destination --- 2152,2158 ---- Fri Apr 2 12:19:17 1999 Michael Hayes * config/c4x/c4x.md (*db): Enable pattern if TARGET_LOOP_UNSIGNED ! is nonzero. (movstrqi_small, movstrqi_large, *cmpstrqi): Add + modifier to address register constraints. (*movhi_clobber+1): Modify splitter pattern to handle destination *************** Tue Mar 23 23:32:14 1999 Jeffrey A Law *** 2625,2631 **** left using a variable rotate right. Provide anonymous pattern for rotate left by a constant value. ! * expr.c (expand_assignment): Do not try to optimize a aggregate address which has VOIDmode. Tue Mar 23 22:51:48 1999 Mumit Khan --- 2625,2631 ---- left using a variable rotate right. Provide anonymous pattern for rotate left by a constant value. ! * expr.c (expand_assignment): Do not try to optimize an aggregate address which has VOIDmode. Tue Mar 23 22:51:48 1999 Mumit Khan *************** Thu Feb 25 21:52:54 1999 J"orn Rennecke *** 4287,4293 **** in registers. * expr.h (PRETEND_OUTGOING_VARARGS_NAMED): Provide default definition. ! * function.c (assign_parms): Honour PRETEND_OUTGOING_VARARGS_NAMED. * calls.c (expand_call): Likewise. * sh.c (sh_expand_prologue): For TARGET_HITACHI, don't push varargs / --- 4287,4293 ---- in registers. * expr.h (PRETEND_OUTGOING_VARARGS_NAMED): Provide default definition. ! * function.c (assign_parms): Honor PRETEND_OUTGOING_VARARGS_NAMED. * calls.c (expand_call): Likewise. * sh.c (sh_expand_prologue): For TARGET_HITACHI, don't push varargs / *************** Mon Feb 22 19:36:33 1999 Andrew Cagney *** 4454,4460 **** StrongARM. (arm_is_6_or_7): New variable: true iff the target processor is an ARM6 or and ARM7. ! (arm_select): Fields reorganised. (struct processors): processor_type field removed. (all_procs): Remove. (all_cores): New array: Definitions of all known ARM cpu cores. --- 4454,4460 ---- StrongARM. (arm_is_6_or_7): New variable: true iff the target processor is an ARM6 or and ARM7. ! (arm_select): Fields reorganized. (struct processors): processor_type field removed. (all_procs): Remove. (all_cores): New array: Definitions of all known ARM cpu cores. *************** Mon Feb 8 21:31:06 1999 Richard Hender *** 5184,5193 **** (scan_loop): ... moved out of here. Always initialize. Test loop_has_call instead of reg_single_usage not zero. Free reg_single_usage after strength reduction. ! (count_loop_regs_set): Assume single_usage non-zero. (combine_givs_used_by_other): Test reg_single_usage. (load_mems_and_recount_loop_regs_set): Remove reg_single_usage ! as a parameter. Assume non-zero. 1999-02-08 Zack Weinberg --- 5184,5193 ---- (scan_loop): ... moved out of here. Always initialize. Test loop_has_call instead of reg_single_usage not zero. Free reg_single_usage after strength reduction. ! (count_loop_regs_set): Assume single_usage nonzero. (combine_givs_used_by_other): Test reg_single_usage. (load_mems_and_recount_loop_regs_set): Remove reg_single_usage ! as a parameter. Assume nonzero. 1999-02-08 Zack Weinberg *************** Thu Jan 7 03:08:17 1999 Richard Hender *** 7018,7024 **** Thu Jan 7 03:03:42 1999 Stan Cox Richard Henderson ! Support for Hypersparc and Sparclite86x: * sparc.h (TARGET_CPU_hypersparc, TARGET_CPU_sparclite86x): New. (CPP_CPU32_DEFAULT_SPEC): Fix up for the new targets. (ASM_CPU32_DEFAULT_SPEC): Likewise. --- 7018,7024 ---- Thu Jan 7 03:03:42 1999 Stan Cox Richard Henderson ! Support for HyperSPARC and SPARClite86x: * sparc.h (TARGET_CPU_hypersparc, TARGET_CPU_sparclite86x): New. (CPP_CPU32_DEFAULT_SPEC): Fix up for the new targets. (ASM_CPU32_DEFAULT_SPEC): Likewise. *************** Wed Oct 28 16:46:07 1998 Andreas Schwab *** 10282,10288 **** Wed Oct 28 14:06:49 1998 Jim Wilson * dwarfout.c (dwarfout_file_scope_decl): If DECL_CONTEXT, don't abort ! if pending_types is non-zero. (dwarfout_finish): Verify pending_types is zero before finishing. Wed Oct 28 10:29:09 1998 Nick Clifton --- 10282,10288 ---- Wed Oct 28 14:06:49 1998 Jim Wilson * dwarfout.c (dwarfout_file_scope_decl): If DECL_CONTEXT, don't abort ! if pending_types is nonzero. (dwarfout_finish): Verify pending_types is zero before finishing. Wed Oct 28 10:29:09 1998 Nick Clifton *************** Fri Oct 9 14:26:44 1998 Jeffrey A Law *** 11967,11973 **** Fri Oct 9 11:44:47 1998 David Edelsohn ! * loop.c (insert_bct): Ensure loop_iteration_var non-zero before use. Thu Oct 8 21:59:47 1998 Dave Brolley --- 11967,11973 ---- Fri Oct 9 11:44:47 1998 David Edelsohn ! * loop.c (insert_bct): Ensure loop_iteration_var nonzero before use. Thu Oct 8 21:59:47 1998 Dave Brolley *************** Sat Sep 19 12:05:09 1998 Richard Hender *** 13059,13065 **** Sat Sep 19 07:33:36 1998 Richard Earnshaw (rearnsha@arm.com) * arm.c (add_constant): New parameter address_only, change caller. ! Set it non-zero if taking the address of an item in the pool. (arm_reorg): Handle cases where we need the address of an item in the pool. --- 13059,13065 ---- Sat Sep 19 07:33:36 1998 Richard Earnshaw (rearnsha@arm.com) * arm.c (add_constant): New parameter address_only, change caller. ! Set it nonzero if taking the address of an item in the pool. (arm_reorg): Handle cases where we need the address of an item in the pool. *************** Sun Sep 13 08:13:39 1998 Ben Elliston *** 13371,13377 **** runtime library will do this. * objc/Make-lang.in: Do not build the runtime library or install ! the Objective C header files. The Makefile for the runtime library will do this. * objc/Makefile.in (all.indirect): Only build the front-end. --- 13371,13377 ---- runtime library will do this. * objc/Make-lang.in: Do not build the runtime library or install ! the Objective-C header files. The Makefile for the runtime library will do this. * objc/Makefile.in (all.indirect): Only build the front-end. *************** Mon Aug 10 19:02:55 1998 John Carr Richard Henderson ! Rewrite Sparc backend for better code generation and improved sparc64 support. * config/sparc/sp64-elf.h: Set JUMP_TABLES_IN_TEXT_SECTION to zero. --- 15068,15074 ---- Mon Aug 10 04:28:13 1998 David S. Miller Richard Henderson ! Rewrite SPARC backend for better code generation and improved sparc64 support. * config/sparc/sp64-elf.h: Set JUMP_TABLES_IN_TEXT_SECTION to zero. *************** Mon Aug 10 04:28:13 1998 David S. Mille *** 15155,15161 **** (define_function_unit ieu1): New, executes compare, call, and uncond_branch type insns. (define_function_units for type fdivs, fdivd, fsqrt): These ! execute in the fpu multiply unit not the adder on UltraSparc. (define_expand cmpdi): Disallow TARGET_V8PLUS. (define_insn cmpsi_insn): Rename to cmpsi_insn_sp32. (define_insn cmpsi_insn_sp64): New, same as sp32 variant except it --- 15155,15161 ---- (define_function_unit ieu1): New, executes compare, call, and uncond_branch type insns. (define_function_units for type fdivs, fdivd, fsqrt): These ! execute in the fpu multiply unit not the adder on UltraSPARC. (define_expand cmpdi): Disallow TARGET_V8PLUS. (define_insn cmpsi_insn): Rename to cmpsi_insn_sp32. (define_insn cmpsi_insn_sp64): New, same as sp32 variant except it *************** Mon Jul 27 14:22:36 1998 Dave Brolley *** 15570,15576 **** Mon Jul 27 11:43:54 1998 Stan Cox ! * longlong.h (count_leading_zeros): Sparclite scan instruction was being invoked incorrectly. * i386.c (ix86_prologue): Added SUBTARGET_PROLOGUE invocation. --- 15570,15576 ---- Mon Jul 27 11:43:54 1998 Stan Cox ! * longlong.h (count_leading_zeros): SPARClite scan instruction was being invoked incorrectly. * i386.c (ix86_prologue): Added SUBTARGET_PROLOGUE invocation. diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.2 gcc-3.3/gcc/ChangeLog.2 *** gcc-3.2.3/gcc/ChangeLog.2 2001-12-09 20:13:00.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.2 2002-09-22 02:03:12.000000000 +0000 *************** Fri Dec 24 12:34:26 1999 Richard Kenner *** 262,268 **** Thu Dec 23 23:15:22 1999 J"orn Rennecke ! * reload1.c (emit_input_reload_insns): Restore old behaviour wrt. 'special' reloads. 1999-12-23 Zack Weinberg --- 262,268 ---- Thu Dec 23 23:15:22 1999 J"orn Rennecke ! * reload1.c (emit_input_reload_insns): Restore old behavior wrt. 'special' reloads. 1999-12-23 Zack Weinberg *************** Thu Dec 2 18:59:48 1999 J"orn Rennecke *** 1531,1537 **** 1999-12-02 Nick Clifton ! * config/fp-bit.c: Initialise all fields of the NAN constants. * c-lex.c (check_newline): Pass pragma_getc and pragma_ungetc --- 1531,1537 ---- 1999-12-02 Nick Clifton ! * config/fp-bit.c: Initialize all fields of the NAN constants. * c-lex.c (check_newline): Pass pragma_getc and pragma_ungetc *************** Thu Nov 18 11:10:03 1999 Jan Hubicka < *** 2434,2443 **** 1999-11-18 Nick Clifton ! * toplev.c (main): Correctly detect an unrecognised option. * cppinit.c (cpp_handle_option): Do not claim to have consumed ! a -f option if it has not been recognised. Thu Nov 18 00:59:11 1999 Michael Gschwind --- 2434,2443 ---- 1999-11-18 Nick Clifton ! * toplev.c (main): Correctly detect an unrecognized option. * cppinit.c (cpp_handle_option): Do not claim to have consumed ! a -f option if it has not been recognized. Thu Nov 18 00:59:11 1999 Michael Gschwind *************** Wed Nov 3 15:11:27 1999 David S. Mille *** 3184,3196 **** * config/sparc/sparc.md: Remove insn type fpsqrt, add fpsqrts and fpsqrtd. Use them and create fdiv function unit to more ! accurately represent fpu sqrt pipeline semantics on UltraSparc. * config/sparc/sparc.c: Account for fpsqrt{s,d} changes. Wed Nov 3 15:11:27 1999 Matteo Frigo * config/sparc/sparc.md: Adjust FADD/FMUL result latencies to ! 3 on UltraSparc. * config/sparc/sparc.c (ultra_schedule_insn): Insert launched insn into ready list, do not use just a raw swap. --- 3184,3196 ---- * config/sparc/sparc.md: Remove insn type fpsqrt, add fpsqrts and fpsqrtd. Use them and create fdiv function unit to more ! accurately represent fpu sqrt pipeline semantics on UltraSPARC. * config/sparc/sparc.c: Account for fpsqrt{s,d} changes. Wed Nov 3 15:11:27 1999 Matteo Frigo * config/sparc/sparc.md: Adjust FADD/FMUL result latencies to ! 3 on UltraSPARC. * config/sparc/sparc.c (ultra_schedule_insn): Insert launched insn into ready list, do not use just a raw swap. *************** Sat Oct 30 14:31:48 1999 Richard Hender *** 3567,3573 **** (ggc_alloc_obj): Likewise. Use a different pattern than poison_pages. (ggc_collect): Poison before sweeping. * ggc-simple.c: Update pre-function commentary. ! (ggc_alloc_obj): Poison non-zeroed memory. Sat Oct 30 14:28:52 1999 Mark Mitchell --- 3567,3573 ---- (ggc_alloc_obj): Likewise. Use a different pattern than poison_pages. (ggc_collect): Poison before sweeping. * ggc-simple.c: Update pre-function commentary. ! (ggc_alloc_obj): Poison nonzeroed memory. Sat Oct 30 14:28:52 1999 Mark Mitchell *************** Mon Oct 18 21:16:06 1999 Fred Fish ! * config/arm/arm.c: Initialise arm_structure_size_boundary to DEFAULT_STRUCTURE_SIZE_BOUNDARY. * config/arm/arm.h (DEFAULT_STRUCTURE_SIZE_BOUNDARY): Define to the value 32 if it has not already been defined. --- 4002,4008 ---- Thu Oct 28 10:00:48 1999 Nick Clifton ! * config/arm/arm.c: Initialize arm_structure_size_boundary to DEFAULT_STRUCTURE_SIZE_BOUNDARY. * config/arm/arm.h (DEFAULT_STRUCTURE_SIZE_BOUNDARY): Define to the value 32 if it has not already been defined. *************** Tue Oct 19 15:26:11 1999 Richard Earnsh *** 4782,4788 **** Tue Oct 19 14:01:34 1999 Nick Clifton * toplev.c (main): Do not generate an error message if an ! unrecognised command line switch is recognisable by another language. If extra_warnings are enabled, then generate a warning message instead. --- 4782,4788 ---- Tue Oct 19 14:01:34 1999 Nick Clifton * toplev.c (main): Do not generate an error message if an ! unrecognized command line switch is recognisable by another language. If extra_warnings are enabled, then generate a warning message instead. *************** Sat Oct 16 13:42:29 1999 Michael Hayes *** 4960,4966 **** Sat Oct 16 13:37:46 1999 Michael Hayes ! * config/c4x/c4x.md (movstrqi_small): Utilise parallel move instructions. Sat Oct 16 13:26:47 1999 Michael Hayes --- 4960,4966 ---- Sat Oct 16 13:37:46 1999 Michael Hayes ! * config/c4x/c4x.md (movstrqi_small): Utilize parallel move instructions. Sat Oct 16 13:26:47 1999 Michael Hayes *************** Sat Sep 25 09:03:17 1999 Kaveh R. Ghazi *** 6509,6523 **** Sat Sep 25 13:42:15 1999 Nick Clifton * varasm.c (asm_emit_uninitialised): New function: Generate ! the assembler statements necessary to declare an uninitialised variable. ! (ASM_EMIT_LOCAL): New macro: Emit a local, uninitialised variable. (ASM_EMIT_BSS): New macro: Emit an entry in the bss section. (ASM_EMIT_COMMON): New macro: Emit an entry in the common section. (assemble_variable): Use asm_emit_uninitialised to emit an ! uninitialised variable. Fri Sep 24 17:10:56 1999 Nick Clifton --- 6509,6523 ---- Sat Sep 25 13:42:15 1999 Nick Clifton * varasm.c (asm_emit_uninitialised): New function: Generate ! the assembler statements necessary to declare an uninitialized variable. ! (ASM_EMIT_LOCAL): New macro: Emit a local, uninitialized variable. (ASM_EMIT_BSS): New macro: Emit an entry in the bss section. (ASM_EMIT_COMMON): New macro: Emit an entry in the common section. (assemble_variable): Use asm_emit_uninitialised to emit an ! uninitialized variable. Fri Sep 24 17:10:56 1999 Nick Clifton *************** Thu Sep 9 13:46:06 1999 Geoffrey Keati *** 8316,8322 **** * cppexp.c (cpp_lex): Handle `defined (xxx)' for poisoned xxx. Include cpphash.h. * cpphash.c (special_symbol): Handle plain `xxx' for poisoned xxx. ! * cpplib.c (do_define): Generalise to handle poisoned definitions, redefining poisoned identifiers, etc. (do_undef): Don't allow poisoned identifiers to be undefined. (do_pragma): Add #pragma poison. --- 8316,8322 ---- * cppexp.c (cpp_lex): Handle `defined (xxx)' for poisoned xxx. Include cpphash.h. * cpphash.c (special_symbol): Handle plain `xxx' for poisoned xxx. ! * cpplib.c (do_define): Generalize to handle poisoned definitions, redefining poisoned identifiers, etc. (do_undef): Don't allow poisoned identifiers to be undefined. (do_pragma): Add #pragma poison. *************** Thu Sep 9 13:46:06 1999 Geoffrey Keati *** 8325,8331 **** * cccp.c: Add T_POISON node type. (special_symbol): Handle `defined(xxx)' and plain `xxx' for poisoned xxx. ! (do_define): Generalise to handle poisoned definitions, redefining poisoned identifiers, etc. (do_undef): Don't allow poisoned identifiers to be undefined. (do_pragma): Add #pragma poison. --- 8325,8331 ---- * cccp.c: Add T_POISON node type. (special_symbol): Handle `defined(xxx)' and plain `xxx' for poisoned xxx. ! (do_define): Generalize to handle poisoned definitions, redefining poisoned identifiers, etc. (do_undef): Don't allow poisoned identifiers to be undefined. (do_pragma): Add #pragma poison. *************** Sun Aug 29 04:30:52 1999 John Wehle (j *** 9759,9765 **** All uses updated. (prescan_loop, strength_reduce): New argument loop_info. All callers updated. ! (scan_loop): New variable loop_info, initialise to address of this_loop_info. (prescan_loop): Set loop_info->vtop if find NOTE_INSN_LOOP_VTOP. Delete variable loop_has_multiple_exit targets and replace with --- 9759,9765 ---- All uses updated. (prescan_loop, strength_reduce): New argument loop_info. All callers updated. ! (scan_loop): New variable loop_info, initialize to address of this_loop_info. (prescan_loop): Set loop_info->vtop if find NOTE_INSN_LOOP_VTOP. Delete variable loop_has_multiple_exit targets and replace with *************** Wed Jun 2 12:25:55 1999 Richard Hender *** 14093,14099 **** Wed Jun 2 08:42:55 1999 Nick Clifton ! * config/arm/tcoff.h (USER_LABEL_PREFIX): Synchronise with definition in config/arm/coff.h * config/arm/coff.h: Add comment about USER_LABEL_PREFIX. --- 14093,14099 ---- Wed Jun 2 08:42:55 1999 Nick Clifton ! * config/arm/tcoff.h (USER_LABEL_PREFIX): Synchronize with definition in config/arm/coff.h * config/arm/coff.h: Add comment about USER_LABEL_PREFIX. diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.3 gcc-3.3/gcc/ChangeLog.3 *** gcc-3.2.3/gcc/ChangeLog.3 2001-12-09 20:13:01.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.3 2002-09-22 02:03:12.000000000 +0000 *************** Wed Jun 7 20:34:33 2000 Denis Chertyko *** 1353,1359 **** * c-common.h (c_language_kind): New type. (c_language): New variab.e * c-common.c (lang_get_alias_set): Don't put structures in ! non-zero alias sets in C++. * c-decl.c (c_language): Define it. * c-lex.c (doing_objc_thang): Remove. * c-tree.h (doing_objc_thang): Make it a macro. --- 1353,1359 ---- * c-common.h (c_language_kind): New type. (c_language): New variab.e * c-common.c (lang_get_alias_set): Don't put structures in ! nonzero alias sets in C++. * c-decl.c (c_language): Define it. * c-lex.c (doing_objc_thang): Remove. * c-tree.h (doing_objc_thang): Make it a macro. *************** Mon Jun 5 06:46:28 2000 Richard Kenner *** 1538,1544 **** 2000-06-04 Kaveh R. Ghazi ! * Makefile.in (intl.*): Honor non-zero exit codes in the intl subdir. 2000-06-03 Geoff Keating --- 1538,1544 ---- 2000-06-04 Kaveh R. Ghazi ! * Makefile.in (intl.*): Honor nonzero exit codes in the intl subdir. 2000-06-03 Geoff Keating *************** Sun May 28 18:37:07 2000 Clinton Popetz *** 2036,2042 **** Sun May 28 23:26:59 2000 Philippe De Muyter ! * mklibgcc.in (all): Variable initialised to `libgcc'. 2000-05-28 Gabriel Dos Reis --- 2036,2042 ---- Sun May 28 23:26:59 2000 Philippe De Muyter ! * mklibgcc.in (all): Variable initialized to `libgcc'. 2000-05-28 Gabriel Dos Reis *************** Sun May 28 23:26:59 2000 Philippe De Mu *** 2088,2097 **** * regclass.c [CLASS_CANNOT_CHANGE_SIZE] (class_can_change_size): New variable. (reg_changes_size): New variable. ! (init_reg_sets_1): Initialise class_can_change_size. (record_operand_costs): Remove subreg_changes_size. Don't pass it around. Instead update reg_changes_size. ! (regclass): Initialise and free reg_changes_size. If a register changes size, don't preference it to a class that contains registers that can't change size. (record_reg_classes): Don't look at subreg_changes_size. --- 2088,2097 ---- * regclass.c [CLASS_CANNOT_CHANGE_SIZE] (class_can_change_size): New variable. (reg_changes_size): New variable. ! (init_reg_sets_1): Initialize class_can_change_size. (record_operand_costs): Remove subreg_changes_size. Don't pass it around. Instead update reg_changes_size. ! (regclass): Initialize and free reg_changes_size. If a register changes size, don't preference it to a class that contains registers that can't change size. (record_reg_classes): Don't look at subreg_changes_size. *************** Sun May 28 23:26:59 2000 Philippe De Mu *** 2161,2167 **** * reload.c (get_secondary_mem): Don't widen floating-point modes. ! * combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when substituting the REG in a (subreg:X (reg:Y ...)). 2000-05-28 Neil Booth --- 2161,2167 ---- * reload.c (get_secondary_mem): Don't widen floating-point modes. ! * combine.c (subst): Honor CLASS_CANNOT_CHANGE_SIZE when substituting the REG in a (subreg:X (reg:Y ...)). 2000-05-28 Neil Booth *************** Sun May 28 23:26:59 2000 Philippe De Mu *** 2174,2180 **** 2000-05-28 Neil Booth ! * cpplex.c (_cpp_init_toklist): No comment space to initialise. (_cpp_free_toklist): No comment space to free. (expand_comment_space): Remove. (save_comment_space): Place the comment in the current token and --- 2174,2180 ---- 2000-05-28 Neil Booth ! * cpplex.c (_cpp_init_toklist): No comment space to initialize. (_cpp_free_toklist): No comment space to free. (expand_comment_space): Remove. (save_comment_space): Place the comment in the current token and *************** Sat May 27 11:01:27 2000 Richard Kenner *** 2340,2346 **** boolean_operator for the boolean patterns without NOTs. * config/rs6000/rs6000.c (reg_or_logical_cint_operand): Rename ! from reg_or_u_cint_operand. Change comment and behaviour. (logical_operand): Clean up, add assertion. (non_logical_cint_operand): Also check for reg_or_logical_cint_operand. --- 2340,2346 ---- boolean_operator for the boolean patterns without NOTs. * config/rs6000/rs6000.c (reg_or_logical_cint_operand): Rename ! from reg_or_u_cint_operand. Change comment and behavior. (logical_operand): Clean up, add assertion. (non_logical_cint_operand): Also check for reg_or_logical_cint_operand. *************** Fri May 19 06:49:35 2000 Richard Kenner *** 3133,3139 **** 2000-05-18 Nick Clifton * config/arm/unknown-elf.h (UNIQUE_SECTION): Place constant, ! uninitialised data in .rodata not .bss, and do not interpret an error in the initialisation value as meaning that the variable should be placed in the .bss section. --- 3133,3139 ---- 2000-05-18 Nick Clifton * config/arm/unknown-elf.h (UNIQUE_SECTION): Place constant, ! uninitialized data in .rodata not .bss, and do not interpret an error in the initialisation value as meaning that the variable should be placed in the .bss section. *************** Thu May 18 12:10:18 2000 Philippe De Mu *** 3225,3231 **** 2000-05-18 Neil Booth ! * cppinit.c (cpp_reader_init): Initialise col_adjust and default tab stop size. (no_num, OPT_ftabstop): New. (handle_option): Handle "ftabstop=" command-line option. --- 3225,3231 ---- 2000-05-18 Neil Booth ! * cppinit.c (cpp_reader_init): Initialize col_adjust and default tab stop size. (no_num, OPT_ftabstop): New. (handle_option): Handle "ftabstop=" command-line option. *************** Wed Apr 5 18:03:31 2000 Toshiyasu Mori *** 7957,7963 **** 2000-04-05 Chris Demetriou * mips.h (MASK_DEBUG_A, MASK_DEBUG_B, MASK_DEBUG_C): Zero the ! remaining non-zero debugging masks. Wed Apr 5 09:44:07 2000 Jeffrey A Law (law@cygnus.com) --- 7957,7963 ---- 2000-04-05 Chris Demetriou * mips.h (MASK_DEBUG_A, MASK_DEBUG_B, MASK_DEBUG_C): Zero the ! remaining nonzero debugging masks. Wed Apr 5 09:44:07 2000 Jeffrey A Law (law@cygnus.com) *************** Thu Mar 16 02:14:16 2000 Hans-Peter Nil *** 10256,10262 **** 2000-02-03 Geoff Keating * rs6000.c (rs6000_sr_alias_set): New variable. ! (rs6000_override_options): Initialise rs6000_sr_alias_set. (rs6000_emit_stack_tie): New function. (rs6000_emit_allocate_stack): Specify RTX_FRAME_RELATED_P in a way that dwarf2out can understand. --- 10256,10262 ---- 2000-02-03 Geoff Keating * rs6000.c (rs6000_sr_alias_set): New variable. ! (rs6000_override_options): Initialize rs6000_sr_alias_set. (rs6000_emit_stack_tie): New function. (rs6000_emit_allocate_stack): Specify RTX_FRAME_RELATED_P in a way that dwarf2out can understand. *************** Wed Feb 23 13:00:06 CET 2000 Jan Hubick *** 10804,10811 **** 2000-03-14 Nick Clifton * gcc.c (do_spec_1): Catch the case where %* is used in a ! substitution pattern, but it has not been initialised. ! Issue a meaningful error message if an unrecognised operator is encountered in a spec string. 2000-03-14 Richard Earnshaw --- 10804,10811 ---- 2000-03-14 Nick Clifton * gcc.c (do_spec_1): Catch the case where %* is used in a ! substitution pattern, but it has not been initialized. ! Issue a meaningful error message if an unrecognized operator is encountered in a spec string. 2000-03-14 Richard Earnshaw *************** Mon Jan 24 16:50:08 MET 2000 Jan Hubick *** 15005,15011 **** * basic-block.h (struct loops): New field `levels'. * flow.c (flow_loops_level_compute): Traverse all outer loops. ! (flow_loop_level_compute): Initialise level to 1. (flow_loops_find): Set loops->levels. (flow_loops_dump): Print loops->levels. --- 15005,15011 ---- * basic-block.h (struct loops): New field `levels'. * flow.c (flow_loops_level_compute): Traverse all outer loops. ! (flow_loop_level_compute): Initialize level to 1. (flow_loops_find): Set loops->levels. (flow_loops_dump): Print loops->levels. *************** Mon Jan 24 16:50:08 MET 2000 Jan Hubick *** 15047,15053 **** 2000-01-22 Alan Modra ! * config/elfos.h (UNIQUE_SECTION): Restore uninitialised data section naming to that prior to 2000-01-07 patch. * config/mips/elf.h (UNIQUE_SECTION): Ditto. * config/mips/elf64.h (UNIQUE_SECTION): Ditto. --- 15047,15053 ---- 2000-01-22 Alan Modra ! * config/elfos.h (UNIQUE_SECTION): Restore uninitialized data section naming to that prior to 2000-01-07 patch. * config/mips/elf.h (UNIQUE_SECTION): Ditto. * config/mips/elf64.h (UNIQUE_SECTION): Ditto. *************** Wed Jan 19 19:12:36 2000 J"orn Rennecke *** 15242,15248 **** * loop.c (current_loop_info): Renamed from loop_info_data and changed to a pointer. (loop_optimize): Allocate loop_info structure for each loop ! and initialise to zero. (scan_loop): Set current_loop_info. * unroll.c (loop_iterations): Don't abort if REG_USERVAR_P set --- 15242,15248 ---- * loop.c (current_loop_info): Renamed from loop_info_data and changed to a pointer. (loop_optimize): Allocate loop_info structure for each loop ! and initialize to zero. (scan_loop): Set current_loop_info. * unroll.c (loop_iterations): Don't abort if REG_USERVAR_P set *************** Wed Jan 19 19:12:36 2000 J"orn Rennecke *** 15281,15287 **** (expand_end_bindings): Likewise. (expand_decl): Likewise. Consult optimize not obey_regdecls. * toplev.c (obey_regdecls): Remove. ! (rest_of_compilation): Don't set it. Kill stupid in favour of flow1, local-alloc, and reload. (main): Don't set obey_regdecls. --- 15281,15287 ---- (expand_end_bindings): Likewise. (expand_decl): Likewise. Consult optimize not obey_regdecls. * toplev.c (obey_regdecls): Remove. ! (rest_of_compilation): Don't set it. Kill stupid in favor of flow1, local-alloc, and reload. (main): Don't set obey_regdecls. *************** Thu Jan 6 13:44:59 CET 2000 Jan Hubick *** 16500,16524 **** uninitialized data decls. * config/i386/winnt.c (i386_pe_unique_section): Cope with ! being called for uninitialised data. * config/i386/interix.c (i386_pe_unique_section): Cope with ! being called for uninitialised data. * config/mips/elf.h (UNIQUE_SECTION): Cope with being called ! for uninitialised data. * config/mips/elf64.h (UNIQUE_SECTION): Cope with being called ! for uninitialised data. * config/mips/iri6gld.h (UNIQUE_SECTION): Cope with being called ! for uninitialised data. * config/arm/unknown-elf.h (IN_NAMED_SECTION): Define. (UNIQUE_SECTION_P): Always generate a unique section if flag_data_sections is true. (UNIQUE_SECTION): Also generate unique sections for ! uninitialised data. (ASM_OUTPUT_ALIGNED_BSS): Redefine to use named_section(). (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Redefine to use named_section(). --- 16500,16524 ---- uninitialized data decls. * config/i386/winnt.c (i386_pe_unique_section): Cope with ! being called for uninitialized data. * config/i386/interix.c (i386_pe_unique_section): Cope with ! being called for uninitialized data. * config/mips/elf.h (UNIQUE_SECTION): Cope with being called ! for uninitialized data. * config/mips/elf64.h (UNIQUE_SECTION): Cope with being called ! for uninitialized data. * config/mips/iri6gld.h (UNIQUE_SECTION): Cope with being called ! for uninitialized data. * config/arm/unknown-elf.h (IN_NAMED_SECTION): Define. (UNIQUE_SECTION_P): Always generate a unique section if flag_data_sections is true. (UNIQUE_SECTION): Also generate unique sections for ! uninitialized data. (ASM_OUTPUT_ALIGNED_BSS): Redefine to use named_section(). (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Redefine to use named_section(). *************** Tue Jan 4 22:30:16 2000 Jeffrey A Law *** 16611,16617 **** 2000-01-05 Michael Hayes ! * config/c4x/c4x.h (IS_XXX_REG, IS_XXX_REGNO): Swap behaviour of macros so that they're consistent with their names. * config/c4x/c4x.c (IS_XXX_REG, IS_XXX_REGNO): Likewise. * config/c4x/c4x.md (IS_XXX_REG, IS_XXX_REGNO): Likewise. --- 16611,16617 ---- 2000-01-05 Michael Hayes ! * config/c4x/c4x.h (IS_XXX_REG, IS_XXX_REGNO): Swap behavior of macros so that they're consistent with their names. * config/c4x/c4x.c (IS_XXX_REG, IS_XXX_REGNO): Likewise. * config/c4x/c4x.md (IS_XXX_REG, IS_XXX_REGNO): Likewise. diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.4 gcc-3.3/gcc/ChangeLog.4 *** gcc-3.2.3/gcc/ChangeLog.4 2001-11-23 02:05:07.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.4 2002-09-28 15:29:33.000000000 +0000 *************** *** 142,148 **** * c-parse.in (select_or_iter_stmt): Use truthvalue_conversion on the condition of a FOR statement, so that it gets typechecked ! and optimised. 2000-12-29 Alexandre Oliva --- 142,148 ---- * c-parse.in (select_or_iter_stmt): Use truthvalue_conversion on the condition of a FOR statement, so that it gets typechecked ! and optimized. 2000-12-29 Alexandre Oliva *************** *** 300,306 **** scavenging it. * dwarf2out_frame_debug_expr: Allow the (scratch) frame ! pointer to be initialised from the stack pointer plus a constant. 2000-12-22 Bernd Schmidt --- 300,306 ---- scavenging it. * dwarf2out_frame_debug_expr: Allow the (scratch) frame ! pointer to be initialized from the stack pointer plus a constant. 2000-12-22 Bernd Schmidt *************** *** 355,361 **** * reload.c (update_auto_inc_notes): New, broken out from ... (find_reloads_address_1): ... use here, also correct possible ! use of uninitialised reloadnum. 2000-12-21 David O'Brien --- 355,361 ---- * reload.c (update_auto_inc_notes): New, broken out from ... (find_reloads_address_1): ... use here, also correct possible ! use of uninitialized reloadnum. 2000-12-21 David O'Brien *************** Mon Dec 11 13:51:09 2000 Jeffrey A Law *** 1235,1241 **** arm_compute_save_reg_mask. (arm_expand_prologue): Use arm_current_func_type and arm_compute_save_reg_mask. ! (arm_init_machine_status): Initialise func_type field, if necessary. (thumb_expand_prologue): Use arm_current_func_type. (output_thumb_prologue): Use arm_current_func_type. --- 1235,1241 ---- arm_compute_save_reg_mask. (arm_expand_prologue): Use arm_current_func_type and arm_compute_save_reg_mask. ! (arm_init_machine_status): Initialize func_type field, if necessary. (thumb_expand_prologue): Use arm_current_func_type. (output_thumb_prologue): Use arm_current_func_type. *************** Tue Dec 5 20:09:14 2000 Jeffrey A Law *** 2120,2126 **** (expand_builtin_strrchr): Use it. (builtin_memset_read_str): New function. (expand_builtin_memset): Use target_char_cast. ! Try to optimize memset with second argument non-zero using store_by_pieces. 2000-11-30 Marek Michalkiewicz --- 2120,2126 ---- (expand_builtin_strrchr): Use it. (builtin_memset_read_str): New function. (expand_builtin_memset): Use target_char_cast. ! Try to optimize memset with second argument nonzero using store_by_pieces. 2000-11-30 Marek Michalkiewicz *************** Sun Nov 26 10:02:37 2000 Richard Kenner *** 2923,2931 **** (cxx_target_objs): Substitute in the makefile. * configure: Regenerate. ! * Makefile.in (C_TARGET_OBJS): Define and initialise from c_target_objs. ! (CXX_TARGET_OBJS): Define and initialise from cxx_target_objs. (C_AND_OBJC_OBJS): Include C_TARGET_OBJS. --- 2923,2931 ---- (cxx_target_objs): Substitute in the makefile. * configure: Regenerate. ! * Makefile.in (C_TARGET_OBJS): Define and initialize from c_target_objs. ! (CXX_TARGET_OBJS): Define and initialize from cxx_target_objs. (C_AND_OBJC_OBJS): Include C_TARGET_OBJS. *************** Fri Nov 24 19:48:09 2000 J"orn Rennecke *** 3046,3052 **** 2000-11-23 Graham Stott ! * cse.c (cse_insn): Initialise all regcost variables. Fix a typo add missing '='. Only compare costs if there is a replacement insn. --- 3046,3052 ---- 2000-11-23 Graham Stott ! * cse.c (cse_insn): Initialize all regcost variables. Fix a typo add missing '='. Only compare costs if there is a replacement insn. *************** Wed Nov 22 00:52:55 2000 J"orn Rennecke *** 3247,3253 **** 2000-11-21 Jakub Jelinek ! * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): Sparc has .file/.loc support in as as well. * configure: Regenerate. --- 3247,3253 ---- 2000-11-21 Jakub Jelinek ! * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): SPARC has .file/.loc support in as as well. * configure: Regenerate. *************** Tue Nov 14 12:34:56 2000 Richard Kenner *** 3811,3817 **** 2000-11-14 Jakub Jelinek ! * reload1.c (emit_input_reload_insns): Honour forcing of constants into memory by PREFERRED_RELOAD_CLASS NO_REGS. 2000-11-14 Michael Matz --- 3811,3817 ---- 2000-11-14 Jakub Jelinek ! * reload1.c (emit_input_reload_insns): Honor forcing of constants into memory by PREFERRED_RELOAD_CLASS NO_REGS. 2000-11-14 Michael Matz *************** Tue Oct 31 15:33:27 2000 J"orn Rennecke *** 5216,5228 **** hash table. * cppinit.c (cpp_reader_init): Move cpp_init_completed test to top. ! Initialise various members of cpp_reader, memory pools, and the special nodes. (cpp_printer_init): Delete. (cpp_cleanup): Update. (struct builtin, builtin_array, initialize_builtins): Update for new hashnode definition and builtin handling. ! (cpp_start_read, cpp_finish): Don't take or initialise a printer. Update. * cpplib.h (cpp_printer, cpp_toklist, CPP_DEFINED, BOL, --- 5216,5228 ---- hash table. * cppinit.c (cpp_reader_init): Move cpp_init_completed test to top. ! Initialize various members of cpp_reader, memory pools, and the special nodes. (cpp_printer_init): Delete. (cpp_cleanup): Update. (struct builtin, builtin_array, initialize_builtins): Update for new hashnode definition and builtin handling. ! (cpp_start_read, cpp_finish): Don't take or initialize a printer. Update. * cpplib.h (cpp_printer, cpp_toklist, CPP_DEFINED, BOL, *************** Fri Sep 29 13:20:42 MET DST 2000 Jan Hu *** 7147,7153 **** error" tests. * cppinit.c (cpp_handle_option): Remove surplus \n. * cpplex.c (ON_REST_ARG): Delete. ! (skip_block_comment): Initialise prevc. (parse_args): Improve error messages. (maybe_paste_with_next): Use CONTEXT_VARARGS rather than ON_REST_ARG. --- 7147,7153 ---- error" tests. * cppinit.c (cpp_handle_option): Remove surplus \n. * cpplex.c (ON_REST_ARG): Delete. ! (skip_block_comment): Initialize prevc. (parse_args): Improve error messages. (maybe_paste_with_next): Use CONTEXT_VARARGS rather than ON_REST_ARG. *************** Mon 18-Sep-2000 19:21:35 BST Neil Booth *** 8018,8031 **** * cpplib.c (_cpp_check_directive, _cpp_check_linemarker): New implementations. (do_assert): Don't bother setting the answer's list's line. ! (cpp_push_buffer): Initialise new pfile and read_ahead members of struct cpp_buffer. * cpplib.h (cppchar_t): New typedef. (struct cpp_buffer): read_ahead, pfile and col_adjust are new members. (struct lexer_state): New structure that determines the state ! and behaviour of the lexer. (IN_DIRECTIVE, KNOWN_DIRECTIVE): New macros. (struct cpp_reader): New member "state". Rename multiline_string_line and multiline_string_column. Delete --- 8018,8031 ---- * cpplib.c (_cpp_check_directive, _cpp_check_linemarker): New implementations. (do_assert): Don't bother setting the answer's list's line. ! (cpp_push_buffer): Initialize new pfile and read_ahead members of struct cpp_buffer. * cpplib.h (cppchar_t): New typedef. (struct cpp_buffer): read_ahead, pfile and col_adjust are new members. (struct lexer_state): New structure that determines the state ! and behavior of the lexer. (IN_DIRECTIVE, KNOWN_DIRECTIVE): New macros. (struct cpp_reader): New member "state". Rename multiline_string_line and multiline_string_column. Delete *************** Mon 18-Sep-2000 19:21:35 BST Neil Booth *** 8101,8107 **** 2000-09-18 Joseph S. Myers ! * c-common.c (check_format_types): Reorganise and clean up, checking earlier for ERROR_MARKs and making cur_type into its TYPE_MAIN_VARIANT where convenient. --- 8101,8107 ---- 2000-09-18 Joseph S. Myers ! * c-common.c (check_format_types): Reorganize and clean up, checking earlier for ERROR_MARKs and making cur_type into its TYPE_MAIN_VARIANT where convenient. *************** Fri 15-Sep-2000 06:49:07 BST Neil Booth *** 8547,8555 **** * config/h8300.h (TARGET_MAC): New. (TARGET_SWITCHES): Add -ms2600 and -mno-s2600. (CONDITIONA_REGISTER_USAGE): Disable the mac register on any ! machine other than H8/S2600. ! * config/h8300.md: Accept mac instructions on the H8/S2600 instead ! of the H8/S2000. 2000-09-14 Alexandre Oliva , Bernd Schmidt --- 8547,8555 ---- * config/h8300.h (TARGET_MAC): New. (TARGET_SWITCHES): Add -ms2600 and -mno-s2600. (CONDITIONA_REGISTER_USAGE): Disable the mac register on any ! machine other than H8S/2600. ! * config/h8300.md: Accept mac instructions on the H8S/2600 instead ! of the H8S/2000. 2000-09-14 Alexandre Oliva , Bernd Schmidt *************** Thu 07-Sep-2000 21:29:00 BST Neil Booth *** 9445,9451 **** yy_lim, or yy_get_token. Don't define get_directive_line if USE_CPPLIB. * c-common.h: Add multiple include guard. Define RID values ! for every keyword in C, C++, and Objective C. Put all the modifiers first. (struct c_fileinfo, get_fileinfo, dump_time_statistics): New. * c-decl.c (c_decode_option): Handle -lang-objc here. --- 9445,9451 ---- yy_lim, or yy_get_token. Don't define get_directive_line if USE_CPPLIB. * c-common.h: Add multiple include guard. Define RID values ! for every keyword in C, C++, and Objective-C. Put all the modifiers first. (struct c_fileinfo, get_fileinfo, dump_time_statistics): New. * c-decl.c (c_decode_option): Handle -lang-objc here. *************** Sun 20-Aug-2000 09:25:45 BST Neil Booth *** 11108,11114 **** instructions in it before checking for indirect jumps. * ifcvt.c (find_if_block): Do not consider a THEN block that ends ! in a indirect jump as a potential for conditional execution. * d30v.h (d30v_init_expanders): Don't declare here. * d30v-protos.h (d30v_init_expanders): Declare here with a valid --- 11108,11114 ---- instructions in it before checking for indirect jumps. * ifcvt.c (find_if_block): Do not consider a THEN block that ends ! in an indirect jump as a potential for conditional execution. * d30v.h (d30v_init_expanders): Don't declare here. * d30v-protos.h (d30v_init_expanders): Declare here with a valid *************** Mon Aug 14 18:51:44 2000 J"orn Rennecke *** 11556,11562 **** rather than DECL_OFFSET_ALIGN. (place_field): Likewise. * expmed.c (store_bit_field): Abort on align==0 to avoid ! antisocial machine behaviour. 2000-08-12 Richard Henderson --- 11556,11562 ---- rather than DECL_OFFSET_ALIGN. (place_field): Likewise. * expmed.c (store_bit_field): Abort on align==0 to avoid ! antisocial machine behavior. 2000-08-12 Richard Henderson *************** Thu Aug 3 15:53:03 2000 J"orn Rennecke *** 12487,12493 **** 2000-08-03 Kazu Hirata * h8300.c: Fix a comment typo. ! * h8300.h (OK_FOR_U): Accept a 32-bit constant address on H8/S. * jump.c: Fix formatting. --- 12487,12493 ---- 2000-08-03 Kazu Hirata * h8300.c: Fix a comment typo. ! * h8300.h (OK_FOR_U): Accept a 32-bit constant address on H8S. * jump.c: Fix formatting. *************** Mon Jul 31 20:35:50 2000 Denis Chertyko *** 12911,12917 **** * h8300.h (MODES_TIEABLE_P): Accept a combination of QImode and HImode on all architectures and a combination of HImode and SImode ! on H8/300H and H8/S. * h8300.c (split_adds_subs): Rearrange code for conciseness. --- 12911,12917 ---- * h8300.h (MODES_TIEABLE_P): Accept a combination of QImode and HImode on all architectures and a combination of HImode and SImode ! on H8/300H and H8S. * h8300.c (split_adds_subs): Rearrange code for conciseness. *************** Wed Jul 19 01:22:15 CEST 2000 Marc Espi *** 13799,13805 **** 2000-07-18 Jakub Jelinek ! * calls.c (store_arg): Return non-zero if sibcall_failure is desired. (expand_call): Adjust caller. 2000-07-17 Gabriel Dos Reis --- 13799,13805 ---- 2000-07-18 Jakub Jelinek ! * calls.c (store_arg): Return nonzero if sibcall_failure is desired. (expand_call): Adjust caller. 2000-07-17 Gabriel Dos Reis *************** Fri Jul 14 10:25:53 2000 Clinton Popetz *** 14169,14175 **** * c-common.h (flag_digraphs): New. * c-decl.c (c_decode_option): Set flag_digraphs as appropriate. * c-lex.c (yylex): Use flag_digraphs to decide whether to ! honour digraphs. 2000-07-13 Zack Weinberg --- 14169,14175 ---- * c-common.h (flag_digraphs): New. * c-decl.c (c_decode_option): Set flag_digraphs as appropriate. * c-lex.c (yylex): Use flag_digraphs to decide whether to ! honor digraphs. 2000-07-13 Zack Weinberg *************** Tue Jul 11 16:26:17 2000 Clinton Popetz *** 14482,14488 **** (handle_option): Set digraphs according to standard. Merge OPT_lang_c89 handler with OPT_std_c89. ! * cpplex.c: (lex_line, can_paste): Honour digraphs in accordance with the digraphs flag. * cpplib.h: (struct cpp_options): New option digraphs. --- 14482,14488 ---- (handle_option): Set digraphs according to standard. Merge OPT_lang_c89 handler with OPT_std_c89. ! * cpplex.c: (lex_line, can_paste): Honor digraphs in accordance with the digraphs flag. * cpplib.h: (struct cpp_options): New option digraphs. diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.5 gcc-3.3/gcc/ChangeLog.5 *** gcc-3.2.3/gcc/ChangeLog.5 2001-12-09 20:13:01.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.5 2002-09-22 02:03:13.000000000 +0000 *************** *** 24,30 **** * gcc.c (process_command): Append a DIR_SEPARATOR to a path specified by the -B switch, if doing so would create a valid directory name. ! * doc/invoke.texi: Document changed behaviour of -B. 2001-06-29 DJ Delorie --- 24,30 ---- * gcc.c (process_command): Append a DIR_SEPARATOR to a path specified by the -B switch, if doing so would create a valid directory name. ! * doc/invoke.texi: Document changed behavior of -B. 2001-06-29 DJ Delorie *************** Fri Jun 29 12:27:24 2001 Jeffrey A Law *** 77,83 **** * config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h (arc_comp_type_attributes, arc_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove ! functions and macros with default behaviour. * config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h (m32r_comp_type_attributes, m32r_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, --- 77,83 ---- * config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h (arc_comp_type_attributes, arc_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove ! functions and macros with default behavior. * config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h (m32r_comp_type_attributes, m32r_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, *************** Mon Jun 18 15:43:10 CEST 2001 Jan Hubic *** 1070,1076 **** 2001-06-18 Ben Elliston ! * except.c (resolve_fixup_regions): Initialise "cleanup". 2001-06-17 Neil Booth --- 1070,1076 ---- 2001-06-18 Ben Elliston ! * except.c (resolve_fixup_regions): Initialize "cleanup". 2001-06-17 Neil Booth *************** Fri Jun 15 18:05:22 2001 Richard Kenner *** 1131,1137 **** Fri Jun 15 19:35:38 CEST 2001 Jan Hubicka ! * optabs.c (expand_twoval_binop): Avoid undefined behaviour. 2001-06-15 Rainer Orth --- 1131,1137 ---- Fri Jun 15 19:35:38 CEST 2001 Jan Hubicka ! * optabs.c (expand_twoval_binop): Avoid undefined behavior. 2001-06-15 Rainer Orth *************** Thu May 24 15:56:48 CEST 2001 Jan Hubic *** 2885,2891 **** 2001-05-22 Richard Henderson ! * unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favour of... (__deregister_frame_info_bases): New. * unwind-dw2-fde.h: Declare it. * libgcc-std.ver: Export it. --- 2885,2891 ---- 2001-05-22 Richard Henderson ! * unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favor of... (__deregister_frame_info_bases): New. * unwind-dw2-fde.h: Declare it. * libgcc-std.ver: Export it. *************** Thu May 24 15:56:48 CEST 2001 Jan Hubic *** 2903,2909 **** * config/ia64/ia64.md (nonlocal_goto): Reverse label and frame pointer parameters to __ia64_nonlocal_goto. Flag as NO_RETURN. * config/ia64/ia64.c (ia64_expand_epilogue): Make sure we are issuing ! "r2" to the assembly file. Only issue allocs with non-zero parameters. 2001-05-22 Loren J. Rittle David O'Brien --- 2903,2909 ---- * config/ia64/ia64.md (nonlocal_goto): Reverse label and frame pointer parameters to __ia64_nonlocal_goto. Flag as NO_RETURN. * config/ia64/ia64.c (ia64_expand_epilogue): Make sure we are issuing ! "r2" to the assembly file. Only issue allocs with nonzero parameters. 2001-05-22 Loren J. Rittle David O'Brien *************** Fri May 4 13:10:03 CEST 2001 Jan Hubic *** 4498,4504 **** (ix86_align_loops): Delete. (ix86_align_jumps): Delete. (override_options): Mark -malign-* as obsolete. Emulate their ! behaviour with the -falign-* options. Default -falign-* from the processor table. * i386.h (FUNCTION_BOUNDARY): Define to 16; revert Richard Kenner's patch of Wed May 2 13:09:36 2001. --- 4498,4504 ---- (ix86_align_loops): Delete. (ix86_align_jumps): Delete. (override_options): Mark -malign-* as obsolete. Emulate their ! behavior with the -falign-* options. Default -falign-* from the processor table. * i386.h (FUNCTION_BOUNDARY): Define to 16; revert Richard Kenner's patch of Wed May 2 13:09:36 2001. *************** Wed Apr 25 17:09:50 2001 J"orn Rennecke *** 5194,5200 **** 2001-04-25 Jakub Jelinek * emit-rtl.c (subreg_hard_regno): Only do HARD_REGNO_MODE_OK check ! if check_mode is non-zero. 2001-04-25 Jakub Jelinek --- 5194,5200 ---- 2001-04-25 Jakub Jelinek * emit-rtl.c (subreg_hard_regno): Only do HARD_REGNO_MODE_OK check ! if check_mode is nonzero. 2001-04-25 Jakub Jelinek *************** Fri Feb 9 15:05:27 2001 Christopher Fa *** 10795,10801 **** * config/i386/i386.c (ix86_frame_pointer_required): New. (ix86_setup_frame_addresses): New. ! (struct machine_funciton): Add accesses_prev_frame. * config/i386/i386.h (FRAME_POINTER_REQUIRED): Call ix86_frame_pointer_required. (SUBTARGET_FRAME_POINTER_REQUIRED): New. --- 10795,10801 ---- * config/i386/i386.c (ix86_frame_pointer_required): New. (ix86_setup_frame_addresses): New. ! (struct machine_function): Add accesses_prev_frame. * config/i386/i386.h (FRAME_POINTER_REQUIRED): Call ix86_frame_pointer_required. (SUBTARGET_FRAME_POINTER_REQUIRED): New. *************** Mon Jan 29 20:38:19 2001 Christopher Fa *** 11536,11542 **** 2001-01-27 Michael Sokolov ! * fixproto: Correctly install synthesised unistd.h and stdlib.h when they didn't need fixing. 2001-01-27 Janis Johnson --- 11536,11542 ---- 2001-01-27 Michael Sokolov ! * fixproto: Correctly install synthesized unistd.h and stdlib.h when they didn't need fixing. 2001-01-27 Janis Johnson *************** Mon Jan 29 20:38:19 2001 Christopher Fa *** 11558,11564 **** (really_start_incremental_init): Clear it. (push_init_level): Save constructor_range_stack and clear it if pushing explicit braces. ! (pop_init_level): abort if constructor_range_stack is non-zero at explicit closing brace. Restore saved constructor_range_stack if not implicit. --- 11558,11564 ---- (really_start_incremental_init): Clear it. (push_init_level): Save constructor_range_stack and clear it if pushing explicit braces. ! (pop_init_level): abort if constructor_range_stack is nonzero at explicit closing brace. Restore saved constructor_range_stack if not implicit. *************** Mon Jan 29 20:38:19 2001 Christopher Fa *** 11587,11596 **** * loop.c (loop_giv_reduce_benefit): Copy mode size into int variable. ! (check_ext_dependant_givs): Initialise u_start_val and u_end_val. (load_mems): Make last_max_reg unsigned. ! (try_swap_copy_prop): Use INSN_P and initialise set. Fri Jan 26 23:22:58 2001 Denis Chertykov --- 11587,11596 ---- * loop.c (loop_giv_reduce_benefit): Copy mode size into int variable. ! (check_ext_dependant_givs): Initialize u_start_val and u_end_val. (load_mems): Make last_max_reg unsigned. ! (try_swap_copy_prop): Use INSN_P and initialize set. Fri Jan 26 23:22:58 2001 Denis Chertykov *************** Wed Jan 24 23:51:55 2001 J"orn Rennecke *** 11700,11706 **** * cppinit.c (cpp_start_read): Remove deps_add_dep call. * tradcpp.c (main): Add -imacros or -include'd dependencies for -M*. ! * cpp.texi (-M, -MM): Document -M -include behaviour. 2001-01-24 Roger Collins --- 11700,11706 ---- * cppinit.c (cpp_start_read): Remove deps_add_dep call. * tradcpp.c (main): Add -imacros or -include'd dependencies for -M*. ! * cpp.texi (-M, -MM): Document -M -include behavior. 2001-01-24 Roger Collins *************** Sun Jan 21 09:44:17 2001 Denis Chertyko *** 11922,11928 **** * config/avr/avr.c (ret_cond_branch): New argument (reverse) added. If REVERSE nonzero then condition code in X must be reversed. ! (encode_section_info): Optimise if/else. (avr_function_value): Fix formatting. * config/avr/avr.md (branch): Call to ret_cond_branch changed. --- 11922,11928 ---- * config/avr/avr.c (ret_cond_branch): New argument (reverse) added. If REVERSE nonzero then condition code in X must be reversed. ! (encode_section_info): Optimize if/else. (avr_function_value): Fix formatting. * config/avr/avr.md (branch): Call to ret_cond_branch changed. *************** Sat Jan 13 09:53:32 MET 2001 Jan Hubick *** 12652,12658 **** (pending_init_member): Rename to... (find_init_member): ...this function. Call set_nonincremental_init if necessary. Compare values of purpose index trees, not the trees ! themselves. Return the actual value, not just non-zero if something is found. (output_init_element): Remove checks for duplicates. If field has zero size, only check the initializer for correctness. --- 12652,12658 ---- (pending_init_member): Rename to... (find_init_member): ...this function. Call set_nonincremental_init if necessary. Compare values of purpose index trees, not the trees ! themselves. Return the actual value, not just nonzero if something is found. (output_init_element): Remove checks for duplicates. If field has zero size, only check the initializer for correctness. *************** Fri Jan 12 00:04:00 MET 2001 Jan Hubick *** 12892,12898 **** 2001-01-10 Nick Clifton ! * config/d30v/d30v.c (d30v_init_machine_status): Initialise machine_function structure to zero. Add prototypes for machine_status functions. --- 12892,12898 ---- 2001-01-10 Nick Clifton ! * config/d30v/d30v.c (d30v_init_machine_status): Initialize machine_function structure to zero. Add prototypes for machine_status functions. *************** Wed Jan 10 16:38:31 MET 2001 Jan Hubick *** 13097,13103 **** * config/d30v/d30v.h (struct_machine): Move here. Add eh_epilogue_sp_ofs field. ! *config/d30v/d30v.md (epilogue): Initialise eh_epilogue_sp_ofs field in cfun->machine structure. Tue Jan 9 21:34:57 2001 John David Anglin --- 13097,13103 ---- * config/d30v/d30v.h (struct_machine): Move here. Add eh_epilogue_sp_ofs field. ! *config/d30v/d30v.md (epilogue): Initialize eh_epilogue_sp_ofs field in cfun->machine structure. Tue Jan 9 21:34:57 2001 John David Anglin *************** Tue Jan 9 21:25:19 2001 Jeffrey A Law *** 13179,13185 **** (emit_a_shift): Adopt to the new calling prototype of get_shift_alg. (function_prologue): Fix code for a monitor ! function. Support H8/S. (function_epilogue): Do not output pop for a monitor function. 2001-01-09 Nick Clifton --- 13179,13185 ---- (emit_a_shift): Adopt to the new calling prototype of get_shift_alg. (function_prologue): Fix code for a monitor ! function. Support H8S. (function_epilogue): Do not output pop for a monitor function. 2001-01-09 Nick Clifton *************** Tue Jan 9 21:25:19 2001 Jeffrey A Law *** 13264,13270 **** 20001-01-09 Graham Stott * cppfiles.c (_cpp_execute_include): Move `len` initialisation ! after `ptr` is initialised. 2001-01-09 Alexandre Oliva --- 13264,13270 ---- 20001-01-09 Graham Stott * cppfiles.c (_cpp_execute_include): Move `len` initialisation ! after `ptr` is initialized. 2001-01-09 Alexandre Oliva *************** Fri Jan 5 16:29:49 MET 2001 Jan Hubick *** 13876,13882 **** 2001-01-05 Neil Booth ! * cpp.texi: Update for -MP. Clarify behaviour of -MT. * cppinit.c (initialize_dependency_output): Update. (cpp_finish): Output dummy targets for -MP. (OPT_MP): New. --- 13876,13882 ---- 2001-01-05 Neil Booth ! * cpp.texi: Update for -MP. Clarify behavior of -MT. * cppinit.c (initialize_dependency_output): Update. (cpp_finish): Output dummy targets for -MP. (OPT_MP): New. diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.6 gcc-3.3/gcc/ChangeLog.6 *** gcc-3.2.3/gcc/ChangeLog.6 2002-01-04 00:19:27.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.6 2002-09-28 15:29:33.000000000 +0000 *************** Mon Dec 17 18:27:52 CET 2001 Jan Hubick *** 995,1001 **** Mon Dec 17 17:57:05 CET 2001 Jan Hubicka ! * Makefile.in (cfgcleanup.o): Add cselib.h dependancy. * basic-block.h (CLEANUP_THREADING): New constant. * cfgcleanup.c: Include cselib.h (thread_jump, mark_effect): New functions. --- 995,1001 ---- Mon Dec 17 17:57:05 CET 2001 Jan Hubicka ! * Makefile.in (cfgcleanup.o): Add cselib.h dependency. * basic-block.h (CLEANUP_THREADING): New constant. * cfgcleanup.c: Include cselib.h (thread_jump, mark_effect): New functions. *************** Mon Dec 17 17:57:05 CET 2001 Jan Hubick *** 1020,1029 **** * target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op, asm_out.integer): New fields. * target-def.h (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_[HSDT]I_OP, ! TARGET_ASM_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initialisers. (TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect ! the individual initialisers together. ! (TARGET_ASM_OUT): Add the new initialisers. * output.h (assemble_integer): Return bool. (integer_asm_op): Declare. (default_assemble_integer): Declare. --- 1020,1029 ---- * target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op, asm_out.integer): New fields. * target-def.h (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_[HSDT]I_OP, ! TARGET_ASM_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initializers. (TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect ! the individual initializers together. ! (TARGET_ASM_OUT): Add the new initializers. * output.h (assemble_integer): Return bool. (integer_asm_op): Declare. (default_assemble_integer): Declare. *************** Wed Nov 14 06:37:54 2001 Richard Kenner *** 5339,5347 **** 2001-11-13 Kazu Hirata * config/h8300/h8300.c (shift_alg_si): Use special code for ! 25-bit shifts on H8/S. (get_shift_alg): Generate special code for 25-bit shifts on ! H8/S. 2001-11-13 Jakub Jelinek --- 5339,5347 ---- 2001-11-13 Kazu Hirata * config/h8300/h8300.c (shift_alg_si): Use special code for ! 25-bit shifts on H8S. (get_shift_alg): Generate special code for 25-bit shifts on ! H8S. 2001-11-13 Jakub Jelinek *************** Tue Nov 13 05:45:40 2001 Richard Kenner *** 5449,5458 **** 2001-11-12 Kazu Hirata * config/h8300/h8300.c (shift_alg_qi): Use rotations when ! doing 6-bit logical shifts on H8/S. ! (shift_alg_qi): Use special code for 21-bit shifts on H8/S. (get_shift_alg): Generate special code for 21-bit shifts on ! H8/S. 2001-11-12 Kazu Hirata --- 5449,5458 ---- 2001-11-12 Kazu Hirata * config/h8300/h8300.c (shift_alg_qi): Use rotations when ! doing 6-bit logical shifts on H8S. ! (shift_alg_qi): Use special code for 21-bit shifts on H8S. (get_shift_alg): Generate special code for 21-bit shifts on ! H8S. 2001-11-12 Kazu Hirata *************** Sat Nov 3 10:37:56 2001 Richard Kenner *** 6891,6897 **** 2001-11-01 David S. Miller * doc/install.texi (Specific, sparc-sun-solaris2*): Bring ! 64-bit Sparc description more in line with reality. 2001-11-01 Joseph S. Myers --- 6891,6897 ---- 2001-11-01 David S. Miller * doc/install.texi (Specific, sparc-sun-solaris2*): Bring ! 64-bit SPARC description more in line with reality. 2001-11-01 Joseph S. Myers *************** Fri Sep 28 14:59:34 CEST 2001 Jan Hubic *** 9881,9887 **** 2001-09-27 Richard Henderson * dwarf2out.c (dwarf2out_frame_finish): Never elide .debug_frame ! in favour of .eh_frame. 2001-09-27 Aldy Hernandez --- 9881,9887 ---- 2001-09-27 Richard Henderson * dwarf2out.c (dwarf2out_frame_finish): Never elide .debug_frame ! in favor of .eh_frame. 2001-09-27 Aldy Hernandez *************** Tue Sep 25 17:13:56 CEST 2001 Jan Hubic *** 10036,10042 **** (builtin_decsription): Add new field mask which is used to determine when to define the builtin via the macro def_builtin. ! (bdesc_comi): Initialise new mask fields. (bdesc_2srg): Likewise. (bdesc_1arg): Likewise. --- 10036,10042 ---- (builtin_decsription): Add new field mask which is used to determine when to define the builtin via the macro def_builtin. ! (bdesc_comi): Initialize new mask fields. (bdesc_2srg): Likewise. (bdesc_1arg): Likewise. *************** Thu Aug 30 10:21:43 2001 J"orn Rennecke *** 12374,12380 **** (INIT_SECTION_ASM_OP): Define. (FINI_SECTION_ASM_OP): Define. (SUBTARGET_EXTRA_SECTIONS): Remove trailing comma. ! (RDATA_SECTION_FUNCITON): Provide prototype. 2001-08-29 Geoffrey Keating --- 12374,12380 ---- (INIT_SECTION_ASM_OP): Define. (FINI_SECTION_ASM_OP): Define. (SUBTARGET_EXTRA_SECTIONS): Remove trailing comma. ! (RDATA_SECTION_FUNCTION): Provide prototype. 2001-08-29 Geoffrey Keating *************** Thu Jul 26 14:04:03 EDT 2001 John Wehle *** 16219,16225 **** * flow.c (update_life_info): Simplify the CFG and recalculate the global regs which are alive when removing dead code during a global update. ! (propagate_block): Return non-zero if an INSN is deleted. 2001-07-26 Rainer Orth --- 16219,16225 ---- * flow.c (update_life_info): Simplify the CFG and recalculate the global regs which are alive when removing dead code during a global update. ! (propagate_block): Return nonzero if an INSN is deleted. 2001-07-26 Rainer Orth *************** Sun Jul 22 21:31:04 CEST 2001 Jan Hubic *** 16689,16695 **** (xcoff_debug_hooks, dbx_debug_hooks): Use it. * sdbout.c (sdbout_finish): New. (sdbout_debug_hooks): Use it, add comments. ! (sdbout_global_decl): Defer initialised public vars to sdbout_finish. * varasm.c (assemble_variable): Don't output debug information for file-scope variables. --- 16689,16695 ---- (xcoff_debug_hooks, dbx_debug_hooks): Use it. * sdbout.c (sdbout_finish): New. (sdbout_debug_hooks): Use it, add comments. ! (sdbout_global_decl): Defer initialized public vars to sdbout_finish. * varasm.c (assemble_variable): Don't output debug information for file-scope variables. *************** Sun Jul 22 21:31:04 CEST 2001 Jan Hubic *** 16721,16727 **** (xcoff_debug_hooks, dbx_debug_hooks): Use it. * sdbout.c (sdbout_finish): New. (sdbout_debug_hooks): Use it, add comments. ! (sdbout_global_decl): Defer initialised public vars to sdbout_finish. * varasm.c (assemble_variable): Don't output debug information for file-scope variables. --- 16721,16727 ---- (xcoff_debug_hooks, dbx_debug_hooks): Use it. * sdbout.c (sdbout_finish): New. (sdbout_debug_hooks): Use it, add comments. ! (sdbout_global_decl): Defer initialized public vars to sdbout_finish. * varasm.c (assemble_variable): Don't output debug information for file-scope variables. *************** Fri Jul 20 13:24:16 CEST 2001 Jan Hubic *** 16990,16996 **** * Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on dwarfout.h. ! * dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move to conditionally compiled block. (dbx_debug_hooks, xcoff_debug_hooks): Update. * dbxout.h (dbxout_function): Remove. --- 16990,16996 ---- * Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on dwarfout.h. ! * dbxout.c (dbxout_function): Rename dbxout_function_decl, move to conditionally compiled block. (dbx_debug_hooks, xcoff_debug_hooks): Update. * dbxout.h (dbxout_function): Remove. *************** Mon Jul 9 06:41:07 2001 Richard Kenner *** 18418,18424 **** * config/ia64/ia64.c (ia64_output_end_prologue): Rename to ia64_output_function_end_prologue. Use in target struct and make static. ! (ia64_function_prologue, ia64_funciton_epilogue): Rename mistyped prototypes. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete. * config/m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): --- 18418,18424 ---- * config/ia64/ia64.c (ia64_output_end_prologue): Rename to ia64_output_function_end_prologue. Use in target struct and make static. ! (ia64_function_prologue, ia64_function_epilogue): Rename mistyped prototypes. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete. * config/m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): *************** Sun Jul 1 11:53:52 2001 Richard Kenner *** 19186,19198 **** * c-parse.in (OBJC_STRING): Kill. (objc_string): Decompose to [objc_string] '@' STRING. ! (reswords): Take the leading '@' off all the Objective C keywords. (objc_rid_sans_at): Kill. (init_reswords): Don't initialize it. (yylexname): Use OBJC_IS_AT_KEYWORD and OBJC_IS_PQ_KEYWORD. (_yylex): Kill reconsider label. Look ahead one token after an '@'; if we get an identifier, check whether it's an ! Objective C @-keyword. If so, return the keyword. Otherwise, put back the token and return the '@' as a terminal. * cpplib.c (lex_macro_node): Remove unnecessary check for --- 19186,19198 ---- * c-parse.in (OBJC_STRING): Kill. (objc_string): Decompose to [objc_string] '@' STRING. ! (reswords): Take the leading '@' off all the Objective-C keywords. (objc_rid_sans_at): Kill. (init_reswords): Don't initialize it. (yylexname): Use OBJC_IS_AT_KEYWORD and OBJC_IS_PQ_KEYWORD. (_yylex): Kill reconsider label. Look ahead one token after an '@'; if we get an identifier, check whether it's an ! Objective-C @-keyword. If so, return the keyword. Otherwise, put back the token and return the '@' as a terminal. * cpplib.c (lex_macro_node): Remove unnecessary check for diff -Nrc3pad gcc-3.2.3/gcc/ChangeLog.7 gcc-3.3/gcc/ChangeLog.7 *** gcc-3.2.3/gcc/ChangeLog.7 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/ChangeLog.7 2002-11-15 13:53:41.000000000 +0000 *************** *** 0 **** --- 1,21543 ---- + 2002-06-30 Devang Patel + + * objc/objc-act.c (finish_file): Avoid finish_objc() if + -fsyntax-only. + + Fri Jun 28 17:22:37 2002 Denis Chertykov + Frank Ch. Eigler + Matthew Green + Richard Henderson + Dave Hudson + Jeff Johnston + Alan Lehotsky + Bernd Schmidt + Graham Stott + + * doc/extend.texi: Add ip2k port to description of attribute + naked. + * doc/install.texi (Specific): Add ip2k description. + * doc/install-old.texi (Configurations): Add ip2k to possible + cpu types. + * doc/md.texi: Document ip2k constraints. + * config/ip2k/crt0.S: New file. + * config/ip2k/ip2k-protos.h: New file. + * config/ip2k/ip2k.c: New file. + * config/ip2k/ip2k.h: New file. + * config/ip2k/ip2k.md: New file. + * config/ip2k/libgcc.S: New file. + * config/ip2k/t-ip2k: New file. + + 2002-06-30 Hans-Peter Nilsson + + * config/mmix/mmix.md ("return"): New pattern. + * config/mmix/mmix.h (TARGET_MASK_USE_RETURN_INSN) + (TARGET_USE_RETURN_INSN): New macros. + (TARGET_DEFAULT): Include TARGET_MASK_USE_RETURN_INSN. + (TARGET_SWITCHES): Add -msingle-exit and -mno-single-exit. + * config/mmix/mmix.c (MMIX_OUTPUT_REGNO): Fix spacing. + (MMIX_POP_ARGUMENT): New macro. + (mmix_target_asm_function_prologue): When no epilogue is executed, + just emit a blank line. Use MMIX_POP_ARGUMENT with final POP insn. + (mmix_print_operand) : New case. + (mmix_print_operand_punct_valid_p): Match '.'. + (mmix_use_simple_return): New function. + * config/mmix/mmix-protos.h (mmix_use_simple_return): Prototype. + * doc/invoke.texi (Option Summary) : Add + -msingle-exit, -mno-single-exit. + (MMIX Options): Ditto. + + 2002-06-30 Aldy Hernandez + + * config/i386/i386.c (ix86_init_mmx_sse_builtins): Fix typos. + + 2002-06-30 Kaveh R. Ghazi + + * gengtype.c (oprintf): Move VA_CLOSE after all fixedarg uses. + + 2002-06-30 Alan Modra + + * unroll.c (loop_iterations): Handle EQ loops. + + 2002-06-29 David Edelsohn + + * config/rs6000/rs6000.md (ctrdi): Allocate pseudo for FPR + constraint in define_expand, not splitter. + Formatting. + + 2002-06-29 Aldy Hernandez + + * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use + build_function_type_list instead of build_function_type. + + * config/ia64/ia64.c (ia64_init_builtins): Same. + + * config/alpha/alpha.c (alpha_init_builtins): Same. + + * config/rs6000/rs6000.c (altivec_init_builtins): Same. + + * config/arm/arm.c (arm_init_builtins): Same. + + * tree.h: Add build_function_type_list prototype. + + * tree.c (build_function_type_list): New. + + 2002-06-29 Kaveh R. Ghazi + + * collect2.c (scan_prog_file): Fix typo in message. + + 2002-06-28 Aaron Lehmann + + * fold-cont.c: Remove unused CHARMASK. + + 2002-06-29 Neil Booth + + PR preprocessor/7150 + * cppmain.c (scan_translation_unit_trad): Simplify. + * cppmacro.c (cpp_scan_nooutput): Handle traditional case. + + 2002-06-29 Neil Booth + + * config/i386/crtdll.h: Define EXTRA_OS_CPP_BUILTINS. + Don't use CPP_PREDEFINES. + * config/i386/cygwin.h (EXTRA_OS_CPP_BUILTINS): New. + Used TARGET_OS_CPP_BUILTINS in preference to CPP_PREDEFINES. + * config/i386/djgpp.h, config/i386/i386-coff.h, + config/i386/i386-interix.h, config/i386/i386-interix3.h, + config/i386/lynx-ng.h, config/i386/lynx.h, config/i386/mingw32.h, + config/i386/openbsd.h, config/i386/ptx4-i.h, config/i386/sysv3.h, + config/i386/uwin.h: Similarly. + + 2002-06-29 Herman A.J. ten Brugge + + * c4x.h: (TARGET_CPU_CPP_BUILTINS): Check flag_inline_functions and + flag_inline_trees to enable inlining. + + 2002-06-28 Phil Edwards + + * configure.in (gcc_gxx_include_dir): Change to match versioned + C++ headers if --enable-version-specific-runtime-libs is used. + * configure: Regenerate. + + 2002-06-28 Jan Hubicka + + * gcse.c (gcse_emit_move_after): Use gen_move_insn to produce the move. + + 2002-06-28 Stephen Clarke + + * combine.c (combine_simplify_rtx): Pass the mode of the + shift count, not the shift operation when trying to simplify + a shift on a SHIFT_COUNT_TRUNCATED target. + + 2002-06-28 Stephane Carrez + + * config/m68hc11/m68hc11.md ("*addsi3"): Use 'o' constraint to + avoid the auto increment addressing modes. + ("*subsi3"): Likewise. + (split for add/sub on address): For 68HC12 push the value on + the stack and do the operation with a pop. + + 2002-06-28 Neil Booth + + * cpplib.c (_cpp_handle_directive): Move #define-specific + code to the #define handler... + (do_define): ...here. + (lex_macro_node): No longer a need to check for comments here. + + 2002-06-28 Stephane Carrez + + * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Define. + * config/m68hc11/m68hc11-protos.h (m68hc11_optimization_options): + Declare. + * config/m68hc11/m68hc11.c (m68hc11_optimization_options): New, + do not reorder basic blocks at the end when optimizing for size. + + 2002-06-28 Stephane Carrez + + * config/m68hc11/m68hc11.c (autoinc_mode): New function. + (m68hc11_make_autoinc_notes): New function. + (m68hc11_split_move): Be very cautious when spliting a move with + auto increment/decrement modes because this may result in incompatible + directions; add REG_INC notes to the resulting insn for CSE reg. + + 2002-06-28 Stephane Carrez + + * config/m68hc11/m68hc11.c (register_indirect_p): For 68HC12 a constant + can be a valid address. + + 2002-06-28 Aldy Hernandez + + * config/rs6000/rs6000.c: Remove unusued variables from last + patch. + + 2002-06-27 Aldy Hernandez + + Revert: + * config/rs6000/rs6000.c (rs6000_override_options): Move + *SUBTARGET_OVERRIDE_OPTIONS before the -m options. + + 2002-06-27 Aldy Hernandez + + * config/rs6000/rs6000.c (altivec_expand_builtin): Move + lvx/stv/dst builtins... + (altivec_expand_ld_builtin): ...to here. + (altivec_expand_st_builtin): ...here. + (altivec_expand_dst_builtin): ...and here (respectively). + + 2002-06-28 Bob Wilson + + * config/xtensa/xtensa.h (RETURN_IN_MEMORY): Update comment. + + 2001-06-08 Bernd Schmidt + + * emit-rtl.c (gen_lowpart_common): Don't create paradoxical FLOAT_MODE + subregs. + * recog.c (general_operand, register_operand): Disallow them. + + 2002-06-28 Neil Booth + + PR preprocessor/7138 + * cpplib.c (_cpp_handle_directive): Do traditional + preparation after setting state.angled_headers. + * cpptrad.c (scan_out_logical_line): Fix potential + quote bug. + + 2002-06-27 Aldy Hernandez + + * config/rs6000/rs6000.c (rs6000_override_options): Move + *SUBTARGET_OVERRIDE_OPTIONS before the -m options. + + 2002-06-27 Bob Wilson + + * config/xtensa/xtensa.md: Give "*xxx" names to all unnamed insn's. + (*lsiu, *ssiu, movstrsi_internal, zero_cost_loop_start, + zero_cost_loop_end): Remove unnecessary "parallel" from insns. + + 2002-06-27 Roger Sayle + + * config/d30v/d30v.h: Remove commented out STACK_REGS #defines. + * config/stormy16/stormy16.h: Likewise. + + * config/stormy16/stormy16.h (CUMULATIVE_ARGS): Replace typedef + with #define. + + 2002-06-26 Gerald Pfeifer + + * doc/install.texi (Binaries): Add Sinix/Reliant Unix. Move + Hitachi entry. Make punctuation more consistent. + + 2002-06-27 Matt Kraai + + * doc/install.texi: Change ` bit' to `-bit'. + * doc/md.texi: Change `-bits' to `-bit'. + * doc/tm.texi: Change `-bits' to ` bits'. + + 2002-06-27 Daniel Berlin + + * gcse.c (hoist_code): Rewrite to only get list of dominated + blocks once per BB. Also fix reversed test (by removing need for + the test at all). + + 2002-06-27 Neil Booth + + * cpphash.h (_cpp_set_trad_context): Remove. + * cpplib.c (prepare_directive_trad): Do nothing for #define. + (cpp_push_buffer, _cpp_pop_buffer): Don't call _cpp_set_trad_context. + * cpptrad.c: Update comments. + (_cpp_read_logical_line_trad): Let scan_logical_line handle + updating the current context. + (scan_logical_line): Update the current context. + (_cpp_create_trad_definition): Similarly. + (_cpp_set_trad_context): Remove. + + 2002-06-27 Neil Booth + + PR preprocessor/7070 + * c-lex.c (cb_def_pragma): Don't try to spell CPP_EOF. + + 2002-06-26 Bob Wilson + + * config/xtensa/xtensa-protos.h (xtensa_return_addr): Declare. + config/xtensa/xtensa.c (xtensa_return_addr): New function. + config/xtensa/xtensa.h (RETURN_ADDR_RTX): Use xtensa_return_addr. + config/xtensa/xtensa.md (fix_return_addr): New pattern. + + 2002-06-26 Kaveh R. Ghazi + + * mips.c (coprocessor_operand, coprocessor2_operand, + symbolic_operand): Move prototypes from here... + * mips-protos.h (coprocessor_operand, coprocessor2_operand, + symbolic_operand): ...to here. + + Wed Jun 26 16:32:57 2002 J"orn Rennecke + + * config/sh/crt1.asm: remove _stack label definition + and sentinel value. + + 2002-06-26 Kaveh R. Ghazi + + * varasm.c: Include real.h before output.h. + + 2002-06-26 Aldy Hernandez + + * config/rs6000/rs6000.h (ALTIVEC_VECTOR_MODE): Revert change to + check for TARGET_ALTIVEC. + + 2002-06-26 Nathanael Nerode + + * config.gcc (vax-*-vms*): Make obselete. + + 2002-06-25 Kaveh R. Ghazi + + * gcc.c (warn_std): Delete. + + 2002-06-25 Loren J. Rittle + + * doc/extend.texi: Fix formatting of last checkin. + + 2002-06-25 Rainer Orth + + * config/alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Remove leading + underscore from __IEEE_FP and __IEEE_FP_INEXACT. + + 2002-06-25 Aldy Hernandez + + * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document + discrepancies from motorola's documentation. + + Tue Jun 25 21:51:13 2002 J"orn Rennecke + + * optabs.c (expand_vector_binop, expand_vector_unop): Don't assume + GET_MODE_UNIT_SIZE (mode) == UNITS_PER_WORD. + + * config/sh/lib1funcs.asm (udivdi3): Make first divide step + produce a 32 bit result before normalization, then normalize with a + left shift. Compute approximative error of 2nd reciprocal + approximation in 2's complement. Fix mask generation from upper + longword of second divide stage result. + For large divisor, fix shift count used to truncate first stage + divide result; make decision if to adjust upwards based on comparison + of higher parts of normalized values. + (udivdi): Likewise. Undo normalization of result for large divisor + case. + + 2002-06-25 David S. Miller + + * config/sparc/sparc.md: Change \\{t,n} to \{t,n}. + + 2002-06-25 Neil Booth + + * cpplib.c (do_include_common): Revert to correct line number + if -traditional. + * cpptrad.c (scan_out_logical_line): Treat null directive as + white space. Invlidate MI optimization for non-whitespace + text outside a directive. + + 2002-06-24 Kaveh R. Ghazi + + * Makefile.in (SHELL): Set to @SHELL@. + * fixinc/Makefile.in (SHELL): Likewise. + + * mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2, + fixuns_truncsfsi2, fixuns_truncsfdi2): Avoid automatic aggregate + initialization. + + 2002-06-24 Jeff Law + + * flow.c (propagate_one_insn): When removing an insn + with a REG_LIBCALL note but not the entire libcall sequence, + delete the associated REG_RETVAL note. + + Mon Jun 24 21:05:09 2002 J"orn Rennecke + + * lib1funcs.asm (sdivsi3): Add optimized SH64 implementations. + (udivsi3): Likewise. Rewrite SH1 implementation. + (udivdi3, divdi3, umoddi3, moddi3): New SHmedia functions. + * sh.md (R20_REG, R21_REG, R22_REG, R23_REG, FR23_REG): New constants. + (udivsi3_i1_media, divsi3_i1_media): Fix clobber list. + * config/sh/t-sh64 (LIB1ASMFUNCS): (_udivdi3, _divdi3, _umoddi3): Add. + (_moddi3): Likewise. + + * lib1funcs.asm (ic_invalidate): Add data cache line writeback. + + * sh.h (FUNCTION_ARG_ADVANCE): Take SHCOMPACT_FORCE_ON_STACK + arguments into account for stack_regs. + + 2002-06-24 Matt Kraai + + * doc/extend.texi: Change `@dots{}' to `/* @r{@dots{}} */' + in examples. + + 2002-06-24 Art Haas + + * doc/extend.texi (Other Builtins): Change `...' to `@dots{}'. + * doc/tm.texi (Frame Layout): Likewise. + + 2002-06-20 Steve Ellcey + + * gcc/config.gcc (ia64*-*-hpux*): Set use_collect2 to no. + Set float_format to i128. + + 2002-06-24 David S. Miller + + * config/sparc/sparc.c (INIT_TARGET_OPTABS): If ARCH64, set the + 32-bit ABI libfuncs to NULL. + + * config/sparc/sparc.md: Use define_insn_and_split. Use braced + strings instead of quoted strings for code blocks. + + * expmed.c (expand_divmod): Do not set optab1/optab2 to the shift + optabs if op1 is const0_rtx. + + * Makefile.in (GTFILES): Add basic-block.h + * basic-block.h (label_value_list, tail_recursion_label_list): + Mark with GTY. + + 2002-06-24 Neil Booth + + * cpptrad.c (scan_out_logical_line): Check recursing only when + we know we have a macro invocation in the function-like case. + Only call _cpp_handle_directive if we know we have a good + directive, or we want to reject a bad directive. + + 2002-06-24 Alan Modra + + * doloop.c (doloop_valid_p): Correct comment. + (doloop_modify_runtime ): Simplify. + (doloop_modify_runtime ): Don't emit code when NE. + + Thu Jun 20 00:26:53 2002 Denis Chertykov + + * config.gcc: Add support for ip2k. + + 2002-06-23 Jan Hubicka + Jeff Law + + * function.h (struct emit_status): Clarify potential contents + of regno_reg_rtx array. + * integrate.c (copy_rtx_and_substitute): Update comments. Make + sure entry in regno_reg_rtx is a REG before checking REG_POINTER. + + * reg-stack.c (convert_regs_exit): Push the registers to stack in + proper order. + + 2002-06-22 Ulrich Weigand + + PR middle-end/6963 + * function.c (assign_stack_temp_for_type): Do not return + the same MEM rtx for multiple uses of a stack slot. + + 2002-06-22 David S. Miller + + PR target/6841 target/6770 target/6719 + * config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Return + NO_REGS for constant X when CLASS is GENERAL_OR_FP_REGS or + GENERAL_OR_EXTRA_FP_REGS. + + 2002-06-22 Neil Booth + + * cpptrad.c (struct fun_macro): Add line number. + (scan_out_logical_line): Set it, and use it to report unterminated + macro invocations. + + 2002-06-21 Kaveh R. Ghazi + + * genautomata.c (copy_node, VLA_PTR_CREATE, VLA_PTR_EXPAND, + VLA_PTR_ADD, VLA_HWINT_CREATE, VLA_HWINT_EXPAND, VLA_HWINT_ADD, + DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, DECL_EXCL, DECL_PRESENCE, + DECL_ABSENCE, DECL_RESERV, DECL_INSN_RESERV, REGEXP_UNIT, + REGEXP_RESERV, REGEXP_SEQUENCE, REGEXP_REPEAT, REGEXP_ALLOF, + REGEXP_ONEOF, check_name): Const-ify. + + 2002-06-21 Matt Thomas + + * config/vax/vax.c (vax_output_function_prologue): Use + REGISTER_PREFIX. Fix some indentation. + * config/vax/vax.h (FUNCTION_PROFILER): Use reg_names[]. + (VAX_ISTREAM_SYNC): Define. + (INITIALIZE_TRAMPOLINE): Use VAX_ISTREAM_SYNC. Move the + i-stream sync to the end. + (REGISTER_PREFIX): Define as "". + (ASM_OUTPUT_MI_THUNK): Use REGISTER_PREFIX. + + 2002-06-21 Jason Thorpe + + * config.gcc (ns32k-*-netbsd*): Remove from list of obsolete + configurations. + + 2002-06-21 Kaveh R. Ghazi + + * tree.c (tree_node_kind, tree_node_counts, tree_node_sizes, + tree_node_kind_names): Wrap in GATHER_STATISTICS macro. + + 2002-06-21 Matt Thomas + + * config/vax/netbsd.h: Adjust a comment. + (TARGET_DEFAULT): Redefine as 0. + + 2002-06-21 Richard Henderson + + * bb-reorder.c (make_reorder_chain_1): Search harder for the + vax casesi fallthru edge. + * cfglayout.c (cleanup_unconditional_jumps): Use + redirect_edge_succ_nodup. Do not delete ADDR_VEC insns as dead. + * cfgrtl.c (force_nonfallthru_and_redirect): Place redirection + block after ADDR_VEC. + + 2002-06-21 Rainer Orth + + * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtfastmath.o. + + 2002-06-21 Neil Booth + + * cpperror.c (cpp_error): For traditional CPP, default to + diagnostics on pfile->line. + * cpplib.c (prepare_directive_trad): Set line number for + diagnostics for #define too. + * cpptrad.c (skip_whitespace): Skip comments properly. + (_cpp_expansions_different_trad): Initialize quote2. + + 2002-06-21 Hans-Peter Nilsson + + * config/mmix/mmix.md: Change GNU CC to GCC in file header comment. + * config/mmix/mmix.h: Ditto. + * config/mmix/mmix-protos.h: Ditto. + * config/mmix/mmix.c: Ditto. Fix typo in comment. + * config/mmix/mmix-modes.def: Change GNU CC to GCC in file header + comment. Comment extra CC modes. + + 2002-06-20 Jan Hubicka + + * cfglayout.c (scope_to_insns_initialize): Call set_block_levels. + (scope_to_insns_finalize): Do not call set_block_levels; handle + sequences. + (choose_inner_scope): New. + * rtl.h (choose_inner_scope): Declare. + + 2002-06-20 John David Anglin + + * pa-protos.h (pa_asm_output_mi_thunk): Change third argument to + HOST_WIDE_INT. + * pa.c (pa_asm_output_mi_thunk): Likewise. + (n_deferred_plabels): Change type to size_t. + (output_deferred_plabels, output_call): Use size_t instead of int. + + 2002-06-20 Richard Henderson + + PR target/4041 + * config/m68k/m68k.md (zero_extendsidi2): Create expander; duplicate + pattern and adjust constraints for coldfire. + + 2002-06-20 Richard Henderson + + * explow.c (probe_stack_range): Use gen_rtx_fmt_ee. + + 2002-06-20 Chris Demetriou + + * config.gcc (mipsisa64-*-elf*, mipsisa64el-*-elf*): New targets. + + 2002-06-20 Chris Demetriou + + * config/mips/mips.h (ISA_HAS_FP4): Fix comment to reflect use. + + 2002-06-20 Stan Shebs + + * dominance.c: Include errors.h instead of error.h. + + 2002-06-20 Neil Booth + + * cppexp.c (cpp_interpret_integer): Don't force traditional + numbers to be unsigned. + * cpplib.c (prepare_directive_trad): Set line number for + diagnostics. + * cpptrad.c (scan_out_logical_line): Continue scanning out + at start of buffer. + * gcc.c (trad_capable_cpp): Use cc1 always. + + 2002-06-20 Jeffrey Law + + * i386.h (TARGET_DEFAULT): Do not turn on frame pointer + elimination in leaf functions by default yet. + + 2002-06-20 Richard Sandiford + + * combine.c (make_extraction): Reapply to the argument of an ASHIFT. + + 2002-06-20 Rainer Orth + + * config/sparc/t-crtfm (crtfastmath.o): Prefix with $(T) for + multilibs. + * config/sparc/t-sol2-64 (EXTRA_MULTILIB_PARTS): Add crtfastmath.o. + Fixes PR other/6836. + + Thu Jun 20 19:42:21 CEST 2002 Jan Hubicka + Pavel Nejedly + + Mon Jun 10 20:42:34 CEST 2002 Jan Hubicka + + * basic-block.h: Do not include et-forest.h + (dominance_info): Declare as struct dominance-info. + * cfglayout.c (cleanup_unconditional_jumps): Remove the edge before + deleting block. + * dominance.c (struct dominance_info): Define. + (BB_NODE, SET_BB_NODE): New macros. + (bb_hash_func, bb_eq_func): Kill. + (calculate_dominace_info, free_dominacne_info, set_immediate_dominator, + nearest_common_dominator, dominated_by_p, recount_dominator, + add_to_dominance_info, delete_from_dominance_info): update for new + representation. + (get_dominated_by, redirect_immediate_dominators): Rewrite using + enumerate_sons. + * ifcvt.c (process_double_test_block, merge_if_block, find_cond_trap, + find_if_case_1, find_if_case_2): Remove killed blocks from dominance + structure. + + * et-forest.h: Update copyright; revamp all function to operate on + nodes + (et_forest_value): Kill. + (et_forest_enumerate_sons, et_forest_node_value): New. + * et-forest.c: Update copyright. + * et-forest.h: Update copyright; revamp all function to operate on + nodes + (et_forest_value): Kill. + (et_forest_enumerate_sons, et_forest_node_value): New. + + Thu Jun 6 22:43:43 CEST 2002 Jan Hubicka + + * basic-block.h: Inlude et-forest.h + (basic_block_def): Kill dominator. + (dominance_info): New type. + (loops): Use dominace_info. + (dominace handling functions): Take dominace_info as argument + instead of bitmaps. + (create_preheader): Likewise. + * cfg.c (entry_exit_blocks): Kill dominator. + (dump_flow_info): Do not dump dominators. + * cfglayout.c (cleanup_unconditonal_jumps): Delete deleted block from + dominators. + * cfgloop.c (flow_pre_header_find): Use dominacne_info. + (flow_loops_pre_header_scan, make_forwarder_block, + canonicale_loop_headers, flow_loops_find): Likewise. + * dominance.c: Include error.h + (idoms_to_doms): Kill. + (bb_hash_func, bb_eq_func): New static functions. + (debug_dominace_info): New global function. + (calculate_dominance_info): Use new et forest structure. + (free_dominace_info, get_immediate_dominator, set_immediate_dominator, + get_dominated_by, redirect_immediate_dominators, + nearest_common_dominator, dominated_by_p, verify_dominators, + recount_dominator, iterate_fix_dominators, add_to_dominace_info, + delete_from_dominance_info): New global functions. + * gcse.c (domnators): CHange to dominance_info. + (alloc_hoist_mem): Do not alloc dominators + (free_code_hoist_mem): Use free_dominance_info. + (compute_code_hoist_data): Use dominance_info. + (hoist_code): Likewise. + * ifcvt.c (post_dominators): Likewise. + (find_if_case_2, if_convert): Likewise. + * predict.c (process_note_predictions, process_note_prediction, + estimate-probability): Likewise. + * sched-rgn.c (find_rgns, init_regions): Likewise. + * ssa-dce.c (find_all_control_dependences, fint_control_depemndence, + find_pdom, delete_insn_bb, ssa_eliminate_dead_code): Likewise. + * ssa.c (compute_dominance_frontiers_1, rename_block, rename_registers, + find_evaluations, convert_to_ssa): Likewise. + * ssa.h (compute_dominance_frontiers): Likewise. + + Thu Jun 6 22:57:34 CEST 2002 Pavel Nejedly + + * Makefile.in (et-forest.c): Add. + * et-forest.c: New file. + * at-forest.h: New file. + + 2002-06-20 Kaveh R. Ghazi + + * c-decl.c (c_decode_option): Use ARRAY_SIZE in lieu of explicit + array size calculation. + * gengtype.c (NUM_BASE_FILES, create_file, write_gc_root): + Likewise. + + * diagnostic.c (diagnostic_kind_text): Const-ify. + * gengtype.c (lang_names): Likewise. + + Thu Jun 20 17:25:29 CEST 2002 JAn HUbicka + + * combine.c (subst): Be prepared for simplify_subreg to return VOIDmode. + + 2002-06-20 Rainer Orth + + * config/sol2.h: New file. + * config.gcc (i?86-*-solaris2*): Include it before i386/sol2.h. + (sparc64-wrs-vxworks*): Include it before sparc/sol2.h. + (sparc-*-chorusos*): Likewise. + (sparc-*-elf*): Likewise. + (sparc-*-rtems*, sparc-*-rtemself*): Likewise. + (sparc64-*-solaris2*, sparcv9-*-solaris2*): Likewise. + (sparc-hal-solaris2*): Likewise. + (sparc-*-solaris2*): Likewise. + (sparclite-*-elf*): Likewise. + (sparc86x-*-elf*): Likewise. + (sparc64-*-elf*): Likewise. + + * config/i386/sol2.h (PREFERRED_DEBUGGING_TYPE): Moved to + config/sol2.h. + (ASM_SPEC): Override config/sol2.h version for now. + Removed obsolete GAS_REJECTS_MINUS_S variant. + (WINT_TYPE, WINT_TYPE_SIZE): Moved to config/sol2.h. + (HANDLE_PRAGMA_REDEFINE_EXTNAME): Likewise. + (TARGET_OS_CPP_BUILTINS): Likewise. + Assert system=unix. + (CPP_SPEC): Simplified using new CPP_SUBTARGET_SPEC. + (LIB_SPEC, ENDFILE_SPEC, STARTFILE_SPEC, LINK_SPEC): Moved to + config/sol2.h. + (SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise. + (ASM_CPU_SPEC): Define. + (SUBTARGET_EXTRA_SPECS): Define. + + * config/sparc/sol2-bi.h (LONG_DOUBLE_TYPE_SIZE): Removed, already + in config/sparc/sol2.h. + (ASM_SPEC): Moved to config/sol2.h. + (CPP_CPU_SPEC): Simplified. + (STARTFILE_SPEC32): Likewise, renamed to STARTFILE_ARCH32_SPEC for + consistency. + (STARTFILE_SPEC64): Renamed to STARTFILE_ARCH64_SPEC. + (STARTFILE_ARCH_SPEC): Use new names STARTFILE_ARCH32_SPEC, + STARTFILE_ARCH64_SPEC. + (STARTFILE_SPEC): Moved to config/sol2.h + (SUBTARGET_EXTRA_SPECS): Add startfile_arch. + (LINK_ARCH32_SPEC): Moved to config/sol2.h. + (LINK_ARCH64_SPEC): Simplified. + (LINK_ARCH_SPEC): Redefined config/sol2.h version for 64-bit support. + (LINK_SPEC): Moved to config/sol2.h + + * config/sparc/sol2.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Moved to + config/sol2.h. + Use BITS_PER_WORD for size. + (WINT_TYPE, WINT_TYPE_SIZE): Likewise. + (HANDLE_PRAGMA_REDEFINE_EXTNAME): Likewise. + (CPP_PREDEFINES): Removed OS-specific part handled by + TARGET_OS_CPP_BUILTINS. + (CPP_SUBTARGET_SPEC): Moved to config/sol2.h. + (CPLUSPLUS_CPP_SPEC): Removed, handled by TARGET_OS_CPP_BUILTINS. + (ASM_SPEC): Moved to config/sol2.h. + (PREFERRED_DEBUGGING_TYPE): Likewise. + (STARTFILE_SPEC, LIB_SPEC, LINK_SPEC): Likewise. + (SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise. + (TARGET_DEFAULT): Reordered to match config/sparc/sol2-bi.h version. + (TRANSFER_FROM_TRAMPOLINE): Moved to config/sol2.h + + * config.gcc (i?86-*-solaris2*): Removed obsolete gas support. + * config/i386/sol2gas.h: Removed. + + Thu Jun 20 12:14:01 CEST 2002 Jan Hubicka + + * i386.md (xorqi_1_slp, xorqi_2_slp): New patterns. + + 2002-06-16 Aldy Hernandez + + * gcc.c-torture/execute/simd-1.c: New. + + * gcc.dg/simd-1.c: New. + + * doc/extend.texi (Vector Extensions): Document that we can + specify simd types not specifically supported by the hardware. + Document that simd types can be used as function arguments. + Document that signness does make a difference in SIMD types. + Misc cleanups and revisions to the vector extensions section. + + * simplify-rtx.c (simplify_subreg): Simplify subregs of vector + constants. + + * expr.c (vector_mode_valid_p): New. + + * expr.h: Add vector_mode_valid_p. + + * defaults.h (VECTOR_MODE_SUPPORTED_P): Set default. + + * c-common.c (type_for_mode): Always build vector nodes regardless + of VECTOR_MODE_SUPPORTED_P. + (handle_mode_attribute): Error if we can't emulate a nonexisting + vector mode. + (handle_vector_size_attribute): Same. + + * optabs.c (expand_binop): Open-code vector operations. + (expand_unop): Open-code vector unops. + (expand_vector_binop): New. + (expand_vector_unop): New. + + * c-typeck.c (build_binary_op): Allow vectors in binops. + Allow vectors in conditional operatiors. + (build_unary_op): Allow vectors in unary minus. + + * config/rs6000/rs6000.h (ALTIVEC_VECTOR_MODE): Conditionalize on + TARGET_ALTIVEC. + + 2002-05-20 Richard Henderson + + * c-common.c (c_common_get_alias_set): Correctly handle characters. + Rearrange order of expressions; don't handle vectors here. + * alias.c (get_alias_set): Let vectors match their components. + + 2002-06-19 Chris Demetriou + + * config/mips/mips.c (mips_emit_prefetch): Use hints which + match desired locality. + + 2002-06-19 Dhananjay R. Deshpande + + * config/h8300/h8300.c (TARGET_INSERT_ATTRIBUTES): Define. + (h8300_insert_attributes): New. + + 2002-06-19 Akim Demaille + + * c-parse.in (initelt: identifier ':' initval): Add an empty + action to fix a type clash. + (aliasdecl, classdef): Add the missing closing `;'. + Whitespace changes. + * gengtype-yacc.y (typedef_struct): Add an empty action to preevnt + $$ = $1 type clashes. + + 2002-06-19 Eric Christopher + + * config/mips/mips.c (symbol_operand): New function. + (mips_emit_prefetch): Ditto. + * config/mips/mips-protos.h: Define. + * config/mips/mips.h (ISA_HAS_PREFETCH): Define. + (CONSTANT_ADDRESS_P): Adjust, use TARGET_GAS. + (LEGITIMIZE_ADDRESS): Ditto. + * config/mips/mips.md (prefetch, prefetch_si_address, + prefetch_si, prefetch_di_address, prefetch_di): New patterns. + + 2002-06-19 Eric Christopher + + * config/fp-bit.h: Add unordered defines for gofast. + + 2002-06-19 Vladimir Makarov + + * genautomata.c (DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, + DECL_EXCL, DECL_PRESENCE, DECL_ABSENCE, DECL_RESERV, + DECL_INSN_RESERV, REGEXP_UNIT, REGEXP_RESERV, REGEXP_SEQUENCE, + REGEXP_REPEAT, REGEXP_ALLOF, REGEXP_ONEOF): New macros with + checking and without it. + (decl_name, decl_mode_check_failed, regexp_name, + regexp_mode_check_failed): New functions. + (gen_cpu_unit, gen_query_cpu_unit, gen_bypass, gen_excl_set, + gen_presence_set, gen_absence_set, gen_automaton, + gen_regexp_repeat, gen_regexp_allof, gen_regexp_oneof, + gen_regexp_sequence, gen_reserv, gen_insn_reserv, + automaton_decl_hash, automaton_decl_eq_p): Use the macros. + (find_automaton_decl): Ditto. Set up mode of work_automaton_decl. + (insn_decl_hash, insn_decl_hash, insn_decl_eq_p): Use the macros. + (find_insn_decl): Ditto. Set up mode of work_insn_decl. + (decl_hash, decl_eq_p): Use the macros. + (find_decl): Ditto. Set up mode of work_decl. + (process_excls, process_presence_absence, process_decls, + check_automaton_usage, process_regexp, process_regexp_decls, + check_usage, loop_in_regexp, check_loops_in_regexps, + process_regexp_cycles, add_advance_cycle_insn_decl, + initiate_states, initiate_excl_sets, + initiate_presence_absence_sets, copy_insn_regexp, transform_1, + transform_2): Use the macros. + (transform_3): Ditto. Check mode before making transformations of + ALLOF. + (regexp_transform_func, transform_insn_regexps, + process_unit_to_form_the_same_automaton_unit_lists, + form_the_same_automaton_unit_lists_from_regexp, + form_the_same_automaton_unit_lists, + process_seq_for_forming_states, process_alts_for_forming_states, + create_alt_states, form_ainsn_with_same_reservs, make_automaton, + form_arcs_marked_by_insn, NDFA_to_DFA, set_new_cycle_flags, + estimate_one_automaton_bound, compare_max_occ_cycle_nums, + units_to_automata_heuristic_distr, create_ainsns, + units_to_automata_distr, create_automata): Use the macros. + (form_regexp): Ditto. Fix typo in access to fields of ALLOF. + (longest_path_length, min_issue_delay_pass_states, + output_dead_lock_vect, output_tables, output_insn_code_cases, + output_internal_insn_latency_func, output_print_reservation_func, + output_description, output_automaton_units, generate): Use the + macros. + (make_insn_alts_attr): Ditto. Check case when there are not + alternatives in the reservation. + (make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, + make_bypass_attr, form_important_insn_automata_lists, + expand_automata): Use the macros. + + 2002-06-20 Tim Josling + + * Makefile.in: Clean up code to check for misspecified languages + in enable-languages. + + 2002-06-19 Andrew Pinski + + * cpptrad.c (_cpp_replacement_text_len): initialize len. + + 2002-06-19 Jason Merrill + + * Makefile.in (unstrap, restrap): New targets. + (bootstrap): Mention restrap. + + 2002-06-19 Matt Kraai + + * except.c (ehl_free): Remove. + + * doc/tm.texi (TARGET_CPU_CPP_BUILTINS): Correct misnamings of + builtin_define and builtin_define_std. + + 2002-06-19 Ian Dall + + * config/ns32k/ns32k.md: Give "*xxx" names to all unnamed insn's. + (sCOND): Restrict operand class so that gcc knows how to reload them. + (bitfield_set): Merge two unnamed insn's using alternatives. + (call_value): Remove constraint on unused uperand. + (udivmodhi4, udivmodsi4, udivmoddihi4_internal): Remove. + (udivmoddiqi4_internal, udivmoddihi4, udivmoddiqi4): Remove. + + * longlong.h (count_trailing_zeros): Escape newline and beautify. + + 2002-06-19 Mark Mitchell + + * Makefile.in (QMTEST_DIR): Simplify definition. + + 2002-06-19 Nick Clifton + + * config/d30v/d30v.h (CUMULATIVE_ARGS): Replace typedef with + #define. + + 2002-06-19 Neil Booth + + * cpphash.h (struct cpp_reader): Make date and time strings. + (_cpp_builtin_macro_text, _cpp_copy_replacement_text, + _cpp_replacement_text_len): New. + * cppinit.c (cpp_create_reader): Update. + (init_builtins): Register appropriate builtins for -traditional-cpp. + * cppmacro.c (new_number_token): Remove. + (_cpp_builtin_macro_text): New. + (builtin_macro): Use it. + (cpp_macro_definition): Update to handle traditional macros. + * cppmain.c (cb_line_change): Don't do column positioning for + traditional output. + * cpptrad.c (enum ls): Rename ls_fun_macro to ls_fun_open. New + state ls_fun_close. + (skip_whitespace): Fix. + (maybe_start_funlike): Don't set state.parsing_args. + (scan_out_logical_line): Remove duplicate error. Use lex_state + rather than state.parsing_args. + (push_replacement_text): Handle builtins. + (_cpp_replacement_text_len, _cpp_copy_replacement_text): New. + + 2002-06-18 Hans-Peter Nilsson + Kaveh R. Ghazi + + * config/fp-bit.c (_fpmul_parts, _fpdiv_parts): Mark with + attribute __always_inline__. + + 2002-06-18 Bob Wilson + + * config/xtensa/xtensa.h (FUNCTION_PROFILER): Respect flag_pic + when generating the call to _mcount. + (NO_PROFILE_COUNTERS): Define. + + 2002-06-18 Richard Henderson + + * print-rtl.c (print_rtx): Adjust NOTE argument numbers for + 2002-06-02 change. + + Tue Jun 18 20:53:32 2002 J"orn Rennecke + + * t-sh (MULTILIB_EXCEPTIONS): Set to ml. + config/sh/t-linux (MULTILIB_EXCEPTIONS): Clear. + * config/sh/t-netbsd (MULTILIB_EXCEPTIONS): Likewise. + * config/sh/t-sh64 (MULTILIB_EXCEPTIONS): Likewise. + + * sh-protos.h (sh_pr_interrupt): Declare. + * sh.c (sh_pr_interrupt): New function. + (print_operand, calc_live_regs, sh_expand_prologue): Use it. + (sh_hard_regno_rename_ok): Likewise. + * sh.h (NORMAL_MODE): FP_MODE_NONE for interupt handlers. + + 2002-06-18 Vladimir Makarov + + * rtl.def (DEFINE_AUTOMATON): Add description of new options + `time' and `v'. Fix incorrect description of option `w'. + + * doc/md.texi: Ditto. + + * genautomata.c (TIME_OPTION, V_OPTION): New macros. + (gen_automata_option): Process the new options. + (transform_2, transform_3): Initialize some variables. + (initiate_automaton_gen): Use the new macros. + + 2002-06-18 Richard Sandiford + + * config/mips/mips-protos.h (mips_initial_elimination_offset): Declare. + (mips_set_return_address, mips_restore_gp): Declare. + * config/mips/mips.h (struct mips_frame_info): Move to mips.c + (current_frame_info): Remove. + (INITIAL_ELIMINATION_OFFSET): Use mips_initial_elimination_offset. + * config/mips/mips.c: Remove uses of current_frame_info. + (struct mips_frame_info): Moved from mips.h. Remove 'insns_len'. + (struct machine_function): Add 'frame' and 'insns_len'. + (current_frame_info, zero_frame_info): Remove. + (mips_restore_gp, mips_set_return_address): New. + (mips_initial_elimination_offset): New. + * config/mips/mips.md (exception_receiver): Use mips_restore_gp. + (eh_return define_split): Use mips_set_return_address. + + 2002-06-18 Neil Booth + + * cpplib.c (dtable): Update. + (end_directive): Decrement expansion prevention count. + Clear state.in_expression. + (prepare_directive_trad): Set state.in_expression. + Increment expansion prevention count. + * cpptrad.c (enum ls): New. + (_cpp_overlay_buffer): Set overlaid_buffer. + (_cpp_remove_overlay): Use overlaid_buffer. + (_cpp_read_logcial_line_trad): Update buffer when it might + have changed. + (scan_out_logical_line): Handle state transitions for assertions + and defined() in #if, and for funlike invocations including the + directive case. Handle '<' and '>' as a quote mechanism in + #include. Warn about unterminated macro invocations. + * cpphash.h (struct lexer_state): New member in_expression. + (struct cpp_reader): New member overlaid buffer. + + 2002-06-18 Hans-Peter Nilsson + + * config/cris/arit.c (do_31div, __Udiv, __Umod): Mark prototype + __always_inline__. + + 2002-06-18 Alan Modra + + * config/ia64/ia64.md (doloop_end_internal): Correct rtl. + + * doloop.c (doloop_optimize): Extract pattern from insn. + + 2002-06-17 Matt Kraai + + * doc/extend.texi (Function Attributes): Remove `,...' from @var. + + 2002-06-17 Jeff Law + + * libgcc2.c: Do not include symcat.h or machmode.h. + + 2002-06-17 Richard Henderson + + PR target/6922 + * expmed.c (make_tree): Handle SIGN_EXTEND/ZERO_EXTEND. + + 2002-06-17 Tom Tromey + + * dwarfout.c: Include function.h. + + 2002-06-17 Andreas Schwab + + * print-rtl.c (print_rtx): Print space before vector, not after. + (debug_rtx): Clear sawclose before printing. + (debug_rtx_list): Print newline after each list element. + (debug_rtx_range): Likewise. + + 2002-06-17 Richard Henderson + + * function.h (struct function) [funcdef_no]: Rename profile_label_no. + (current_function_funcdef_no): Similarly. + * function.c (funcdef_no): Similarly. + (prepare_function_start): Set current_function_funcdef_no. + (expand_function_start): Don't set current_function_profile_label_no. + * dwarf2out.h (current_funcdef_number): Remove. + * dwarf2out.c (current_funcdef_number): Remove. Replace with + current_function_funcdef_no throughout. + * dwarfout.c, vmsdbgout.c: Similarly. + * except.c (sjlj_funcdef_number): Remove. + (sjlj_emit_function_enter): Use current_function_funcdef_no instead. + (output_function_exception_table): Likewise. + * final.c (profile_function): Use current_function_funcdef_no + instead of current_function_profile_label_no. + + 2002-06-17 Vladimir Makarov + + * sched-ebb.c (init_ready_list): Check INSN_P first. + + Mon Jun 17 17:26:15 2002 J"orn Rennecke + + * sh.md (divsi3): Update way how to find insns in a sequence. + + * reload1.c (merge_assigned_reloads): Don't change reloads + other than RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS + to RELOAD_OTHER when there are conflicting input reloads. + + 2002-06-17 Richard Earnshaw (rearnsha@arm.com) + + * function.c (epilogue_done): Correctly build a sequence of insns for + a sibcall epilogue. + + 2002-06-17 Nick Clifton + + * config/fr30/fr30.h (CUMULATIVE_ARGS): Replace typedef with + #define. + + * config/m32r/m32r.md: Replace gen_sequence with get_insns. + + 2002-06-16 Richard Henderson + + * config/i386/i386.h (BIGGEST_FIELD_ALIGNMENT): Define instead + of ADJUST_FIELD_ALIGN if IN_TARGET_LIBS. + + 2002-06-16 Richard Henderson + + PR opt/6722 + * regclass.c (globalize_reg): Update regs_invalidated_by_call. + + 2002-06-16 Neil Booth + + * config.gcc: Add i386/sysv4-cpp.h; remove i386-aout.h from vxworks. + * config/i386/i386-aout.h, config/i386/i386elf.h, + config/i386/sysv4.h: Remove CPP_PREDEFINES. + * config/i386/linux64.h, config/i386/i386elf.h, config/i386/mach.h, + config/i386/netware.h, config/i386/rtemself.h, config/i386/sco5.h, + config/i386/sol2.h, config/i386/vsta.h, config/i386/vxi386.h, + config/i386/win32.h: Use TARGET_OS_CPP_BUILTINS rather than + CPP_PREDEFINES and part of CPP_SPEC. + * config/i386/sysv4-cpp.h: New. + + 2002-06-16 Richard Henderson + + PR c/7030 + * dwarf2out.c (modified_type_die): Don't assign the qualified die + to the unqualified type. + + Sun Jun 16 22:16:10 CEST 2002 Jan Hubicka + + * i386-protos.h (x86_field_alignment): Declare. + * i386.c (x86_field_alignment): Define. + * i386.h (ADJUST_FIELD_ALIGNMENT): New. + (BIGGEST_FIELD_ALIGNMENT): Kill. + + 2002-06-16 Richard Henderson + + * vax.md (casesi): Use emit_jump_insn. Tidy expander pattern. + + 2002-06-16 Richard Henderson + + * c-common.c (flag_ms_extensions): Move from c++ front end. + * c-common.h (flag_ms_extensions): Declare. + * c-decl.c (c_decode_option): Add -fms-extensions. + (grokfield): Don't accept anonymous structures in ISO C mode; + accept only unnamed anonymous structures in GNU C mode; accept + Plan 9 extensions in MS mode. + * c-parse.in (SAVE_EXT_FLAGS, RESTORE_EXT_FLAGS): Rename from + SAVE/RESTORE_WARN_FLAGS; add flag_iso frobbing; update all callers. + (extension): Clear flag_iso. + * doc/invoke.texi (C Dialect Options): Add -fms-extensions. + + 2002-06-16 Hans-Peter Nilsson + + PR target/7042 + * reorg.c (make_return_insns) [DELAY_SLOTS_FOR_EPILOGUE]: Exit + early if current_function_epilogue_delay_list is non-empty. + * config/cris/cris.md ("return"): Add sanity check asserting that + current_function_epilogue_delay_list is empty. + + 2002-06-16 Jeff Law + + * emit-rtl.c (gen_rtx_REG): Temporarily turn off automatic + sharing of hard registers. + + * toplev.c (rest_of_compilation): Remove redundant conditional. + + * toplev.c (rest_of_compilation): Perform a simpler, less costly + cleanup of the CFG when not optimizing. + + 2002-06-16 Alan Modra + + * gcc.c (main): Correct startfile_prefix_spec check. + + 2002-06-12 Geoffrey Keating + + * config.gcc: Revert rth's patch of 2002-05-18. Instead, + include both darwin.o and rs6000-c.o. + + 2002-06-15 Roger Sayle + + * expr.c (compare_from_rtx): Call simplify_relational_operation + on all comparisons, not just those between integer constants, + with the correct (possibly unsigned) comparison code. + (do_compare_rtx_and_jump): Likewise. + + 2002-06-15 John David Anglin + + * Makefile.in (tm_defines): New configuration variable. + (cs-config.h, cs-hconfig.h, cs-tconfig.h): Rename DEFINES to XM_DEFINES. + Pass tm_defines in TM_DEFINES. + (cs-tm_p.h): Rename DEFINES to XM_DEFINES. Pass TM_DEFINES. + * config.gcc (tm_defines): New configuration variable. + (hppa*-*-* | parisc*-*-*): Use tm_defines instead of pa-700.h and + pa-7100.h headers. Change hppa1* scheduling default to 7100LC. + * configure.in: Substitute tm_defines. + * configure: Rebuilt. + * mkconfig.sh: Rename DEFINES to XM_DEFINES. Output TM_DEFINES. + * doc/install.texi: Update. + * pa/pa-700.h: Delete file. + * pa/pa-7100.h: Delete file. + + 2002-06-15 Roger Sayle + + * fold-const.c (comparison_to_compcode): New function to convert + an comparison TREE CODE into a bit-based representation. + (compcode_to_comparison): New function to convert from this bit + based representation back to a comparison TREE CODE. + (fold_truthop): Simplify (x + + * tm.texi (MEMBER_TYPE_FORCES_BLK): Document MODE argument. + + * stor-layout.c (compute_record_mode): Remove check for + FUNCTION_ARG_REG_LITTLE_ENDIAN and VOIDmode when checking for + MEMBER_TYPE_FORCES_BLK. Pass new mode field to + MEMBER_TYPE_FORCES_BLK. + + * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Same. + + * config/c4x/c4x.h (MEMBER_TYPE_FORCES_BLK): Same. + + 2002-06-14 Jeff Sturm + + * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS): Add SPARC_STACK_BIAS. + + 2002-06-14 Steve Ellcey + + * configure.in (USE_UNWIND_EXCEPTIONS): Add support to set + USE_UNWIND_EXCEPTIONS if --enable-libunwind-exceptions is set. + * configure, config.in: Regenerate. + + 2002-06-14 Eric Botcazou + + * loop.c (check_final_value): Use v->always_executed + instead of v->always_computable. + * unroll.c (final_giv_value): Don't calculate the final + value as a function of the biv if the giv is not computed + for every loop iteration. + + 2002-06-14 Eric Botcazou + + * loop.c (for_each_insn_in_loop): Fix formatting and comments. + + 2002-06-14 Eric Botcazou + + PR c/6677 + * convert.c (convert_to_integer) [LSHIFT_EXPR]: Don't pass + the truncation down when the target type is signed. + [trunc1]: Use unsigned arithmetic for LSHIFT_EXPR. + * fold-const.c (extract_muldiv) [NOP_EXPR]: Don't pass through + the conversion if the target type is a smaller type. + + 2002-06-14 Richard Henderson + + * fold-const.c (fold) [compare ops]: Move X>=C / X + + * config/alpha/alpha.md (builtin_zapnot): Fix op2 mode. + + 2002-06-14 Franz Sirl + + * rtl.h (SCHED_GROUP_P): Disallow CODE_LABEL, BARRIER and NOTE. + * sched-deps.c (add_dependence): Likewise. + (group_leader): Likewise. + * sched-rgn.c (init_ready_list): Likewise. + * doc/rtl.texi: Adjust accordingly. + + 2002-06-13 Jeffrey Law + + * gcse.c (delete_null_pointer_checks_1): Inform caller if any + null pointer checks were eliminated. Update prototype. + (delete_null_pointer_checks): Similarly. + * rtl.h (delete_null_pointer_checks): Update prototype. + * toplev.c (rest_of_compilation): Only run cleanup_cfg if + delete_null_pointer_checks deletes one or more null + pointer checks. Do not run cleanup_cfg before gcse, the + CFG is accurate and optimized at that point.. + + * rs6000.c (rs6000_frame_related): Avoid unwanted sharing + of hard registers. + + 2002-06-14 Ulrich Weigand + + * Makefile.in (libgcc.mk): Depend on specs. + + Fri Jun 14 12:15:11 2002 J"orn Rennecke + + * sh.md (mulsi3): Update way how to find insns in a sequence. + + Fri Jun 14 12:04:02 2002 Dhananjay R. Deshpande + + * sh.h: Define HARD_REGNO_RENAME_OK + * sh.c: sh_hard_regno_rename_ok: New. If current function has + interrupt_handler attribute, only registers saved on stack are OK. + * sh-protos.h: Declare sh_hard_regno_rename_ok. + + 2002-06-14 Kaz Kojima + + * config/sh/sh.md (jump): Emit jump insn. + (call_pcrel): Get pattern of the result of gen_call_site. + (call_value_pcrel, sibcall_pcrel, GOTaddr2picreg): Likewise. + + 2002-06-14 Neil Booth + + * cpphash.h (struct cpp_buffer): Remove saved_line_base. + * cpptrad.c: Update comments. + (skip_whitespace, copy_comment): Take a new parameter. + (skip_escaped_newlines): Don't duplicate escaped newline test. + (copy_comment): Different location for CUR, decide here how + to copy / replace the comment. + (skip_whitespace): Copy whitespace. + (_cpp_overlay_buffer, _cpp_remove_overlay): Don't play with line_base. + (scan_out_logical_line): Let copy comment handle keeping or + replacing comments. + (scan_parameters, _cpp_create_trad_definition): Update. + + 2002-06-13 Alan Lehotsky + + * reload.c (get_secondary_mem,find_reloads_address, + find_reloads_address_1): Pass reference to MEM to find_reloads_address + so that LEGITIMIZE_RELOAD_ADDRESS will be called. + + 2002-06-13 Jessica Han + + * defaults.h (TARGET_VTABLE_ENTRY_ALIGN): New. + (TARGET_VTABLE_DATA_ENTRY_DISTANCE): New. + * doc/tm.texi: Document them. + * config/ia64/ia64.h (TARGET_VTABLE_ENTRY_ALIGN): New. + (TARGET_VTABLE_DATA_ENTRY_DISTANCE): New. + (TARGET_VTABLE_USES_DESCRIPTORS): 4 word descriptors for 32-bit mode. + (ASM_OUTPUT_FDESC): Likewise. + + 2002-06-13 Eric Christopher + + * diagnostic.c (output_format): Fix thinko. + + Thu Jun 13 22:34:33 2002 J"orn Rennecke + + * config/sh/coff.h (HAS_INIT_SECTION, INVOKE__MAIN): Don't define. + (DWARF2_UNWIND_INFO): Define to 0. + + * config/sh/sh.c (calc_live_regs): Don't use initial_value + optimization for PR_MEDIA_REG. + + 2002-06-13 Neil Booth + + * cpphash.h (_cpp_lex_identifier_trad): Remove. + * cpplib.c (end_directive): Don't skip, always remove overlay + apart from #define. + (prepare_directive_trad): Handle NULL pfile->directive. + (_cpp_handle_directive): Always call prepare_directive_trad + if traditional. + * cppmain.c (check_multiline_token): Rename account_for_newlines, + generalize inputs. + (scan_translation_unit_trad): Use it. + * cpptrad.c (skip_comment): Rename copy_comment, copy comment to + output, get escaped newline in comment close correct. + (check_output_buffer, skip_whitespace): Update. + (_cpp_lex_identifier_trad): Remove. + (scan_out_logical_line): Handle -C and comments in directives + properly. + + Thu Jun 13 20:18:38 2002 J"orn Rennecke + + * config.gcc: Add support for sh[234]*-*-elf*, sh[2346lbe]*-*-linux*. + * config/sh/linux.h (TARGET_DEFAULT): Use TARGET_CPU_DEFAULT. + * sh.h (SELECT_SH1, SELECT_SH2, SELECT_SH3, SELECT_SH3E): New macros. + (SELECT_SH4_NOFPU, SELECT_SH4_SINGLE_ONLY, SELECT_SH4): Likewise. + (SELECT_SH4_SINGLE, SELECT_SH5_64, SELECT_SH5_64_NOFPU): Likewise. + (SELECT_SH5_32, SELECT_SH5_32_NOFPU, SELECT_SH5_COMPACT): Likewise. + (SELECT_SH5_COMPACT_NOFPU): Likewise. + (TARGET_SWITCHES): Use them. + (TARGET_CPU_DEFAULT): Define if not already defined. + (TARGET_DEFAULT): Use it. + (LINK_DEFAULT_CPU_EMUL): Value now depends on TARGET_CPU_DEFAULT. + * config/sh/t-linux (MULTILIB_OPTIONS): Use MULTILIB_ENDIAN. + * config/sh/t-monolib: New file. + + 2002-06-13 Roger Sayle + + * toplev.c (rest_of_compilation): Simplify (and correct) the + logic of the first delete-null-pointer-checks pass. + + Thu Jun 13 18:24:17 CEST 2002 Jan Hubicka + + * i386.c (ix86_expand_movstr): Fix pasto. + + Thu Jun 13 18:18:17 CEST 2002 Jan Hubicka + + * reload.c (find_valid_class): Fix thinko in my previous patch. + + 2002-06-13 Ulrich Weigand + + * config/s390/s390.h (TARGET_CPU_CPP_BUILTINS): New macro. + * config/s390/linux.h (TARGET_OS_CPP_BUILTINS): New macro. + (CPP_PREDEFINES, CPP_SPEC, CPP_ARCH31_SPEC, CPP_ARCH64_SPEC): Remove. + (EXTRA_SPECS): Remove cpp_arch31 and cpp_arch64. + + 2002-06-13 Gabriel Dos Reis + + * tree-inline.c (expand_call_inline): Don' mess with _DECL + fields. + + 2002-06-13 Gabriel Dos Reis + + * diagnostic.c (output_format): Recognize "%H" as a format + specifier for a location_t. + (text_specifies_location): New function. + (diagnostic_set_info): Use it. + + 2002-06-13 Jeffrey Law + + * emit-rtl.c (static_regno_reg_rtx): Define. + (init_emit_once): Initialize static_regno_reg_rtx. + (init_emit): Copy static_regno_reg_rtx into regno_reg_rtx instead + of building new hard reg objects once per function. + (gen_rtx_REG): Try to share hard regs. + * regclass.c (init_fake_stack_mems): New function broken out from + init_regs. + * rtl.h (init_fake_stack_mems): Declare. + * toplev.c (lang_independent_init): Call init_regs before + init_emit_once. Call init_fake_stack_mems after init_emit_once. + + * i386.md (extenddfxf2, extenddftf2): Fix typo/thinko. + + * alias.c (argument_registers): Remove. + (init_alias_once): Initialize static_reg_base_value here. Remove + initialization of argument_registers. + (init_alias_once_per_function): Remove. + (init_alias_analysis): Copy all the entries from static_reg_base_value + into new_reg_base_value all at once. + * rtl.h (init_alias_once_per_function): Remove declaration. + * function.c (prepare_function_start): Do not call + init_alias_once_per_function. + + * caller-save.c (init_caller_save): Use gen_rtx_INSN instead of + starting a sequence and emitting an INSN. + + 2002-06-13 Richard Sandiford + + * config/mips/r3900.h (MIPS_CPU_STRING_DEFAULT): Make lower case. + + 2002-06-13 David S. Miller + + * expmed.c (init_expmed): Remove duplicate init of 'reg'. + + 2002-06-13 Neil Booth + + * cpplib.c (end_directive): Handle line skipping. Only remove + the rest of the line if the directive was valid. + * cppmacro.c (_cpp_push_text_context): Set NODE_DISABLED when + expanding a traditional macro. + * cpptrad.c (recursive_macro): New. + (read_logical_line_trad): Handle skipping. + (scan_out_logical_line): Continue after a successful directive. + Don't expand macros whilst skipping, or if recursing. + (_cpp_create_trad_definition): scan_out_logical_line now sets + the output current position. + + 2002-06-12 Eric Christopher + + From Chris Demetriou + * config/mips/mips.h (ISA_HAS_FP4): Add ISA_MIPS64 and fix + comment. + (ISA_HAS_MADD_MSUB): Ditto. + (ISA_HAS_NMADD_NMSUB): Ditto. + + 2002-06-12 Eric Christopher + + * config.gcc: Consolidate little endian handling and + little/big endian targets. + * config/mips/elfl.h: Remove file. + * config/mips/elfl64.h: Ditto. + * config/mips/ecoffl.h: Ditto. + * config/mips/r3900.h (SUBTARGET_CPP_SPEC): Remove. + + 2002-06-12 Geoffrey Keating + + * gengtype.h (xvasprintf): New prototype. + (xasprintf): New prototype. + (struct outf): New. + (get_output_file): Return an outf_p. + (header_file): Is now an outf_p. + (base_files): Now are outf_p. + (oprintf): New. + * gengtype.c: Replace all output FILE * with outf_p; use oprintf + rather than stdio operations. Use xasprintf in a few places, + when appropriate. + (xvasprintf): New. + (xasprintf): New. + (struct filemap): Delete. + (files): Delete. + (output_files): New. + (oprintf): New. + (create_file): Create an outf_p. Add parameter to indicate output + file name, change all callers. + (open_base_files): Create gtype-desc.c here. + (get_output_file_with_visibility): Rewrite. + (get_output_file_name): Just look at 'name' field in struct outf. + (close_output_files): Rewrite. + + 2002-06-12 Jason Thorpe + + * config/vax/vax.h (MASK_UNIX_ASM, MASK_VAXC_ALIGNMENT) + (MASK_G_FLOAT): Define. + (TARGET_UNIX_ASM, TARGET_VAXC_ALIGNMENT, TARGET_G_FLOAT): Use them. + (TARGET_SWITCHES): Likewise. + (TARGET_DEFAULT): Likewise. + + 2002-06-12 Daniel Jacobowitz + + * config/mips/elf.h (DWARF2_DEBUG_INFO): Define. + * config/mips/mips.c (mips_output_filename): Don't print a + ".file" directive if we are using DWARF-2. + (mips_output_function_prologue): Do not emit source file + name for TARGET_GAS. + + Wed Jun 12 16:45:13 CEST 2002 Jan Hubicka + + * i386.md (shift patterns): Use (TARGET_SHIFT1 || optimize_size) to + decide whether emit the short opcode. + * i386.h (x86_shift1): Declare. + (TARGET_SHIFT1): New macro. + * i386.c (x86_shift1): New global variable. + + * toplev.c (rest_of_compilation): Call find_basic_block pre-loop + unconditionally; make loop to rebuild CFG; kill unnecesary + find_basic_block calls; kill compute_bb_for_insn call. + * cfgbuild.c (find_basic_blocks): Kill compute_bb_for_insn call. + * haifa-sched.c (sched_init): Likewise. + * ssa-ccp.c (ssa_const_prop): Likewise. + * ssa-dce.c (ssa_eliminate_dead_code): Likewise. + + 2002-06-11 David S. Miller + + * emit-rtl.c (emit_*_scope): Only access INSN_SCOPE if + active_insn_p. + + 2002-06-11 Richard Henderson + + * c-common.c (builtin_define_type_max): New. + (cb_register_builtins): Define __SCHAR_MAX__, __SHRT_MAX__, + __INT_MAX__, __LONG_MAX__, __LONG_LONG_MAX__, __CHAR_BIT__. + + From Joseph S. Myers: + * glimits.h: Rewrite to expect the double underscore definitions + from the compiler. + + * config/alpha/unicosmk.h, config/avr/avr.h, config/h8300/h8300.h, + config/i386/linux64.h, config/ia64/aix.h, config/ia64/hpux.h, + config/ia64/ia64.h, config/m68hc11/m68hc11.h, config/m68hc11/m68hc12.h, + config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, + config/pa/pa.h, config/rs6000/aix43.h, config/rs6000/aix51.h, + config/rs6000/linux64.h, config/s390/linux.h, config/sh/sh.h, + config/stormy16/stormy16.h: Don't define any of __SHRT_MAX__, + __INT_MAX__, __LONG_MAX__, or __LONG_LONG_MAX__. + + 2002-06-11 Richard Henderson + + * config/alpha/alpha.c (ALPHA_BUILTIN_THREAD_POINTER): New. + (ALPHA_BUILTIN_SET_THREAD_POINTER): New. + (code_for_builtns): Update. + (alpha_init_builtins): Add __builtin_thread_pointer and + __builtin_set_thread_pointer. + (alpha_expand_builtin): Handle void builtins. + * doc/extend.texi (Alpha Built-in Functions): Update. + + 2002-06-11 Hans-Peter Nilsson + + PR target/6997 + * config/cris/cris.md ("sleu"): Set attribute "cc" to "none". + + 2002-06-11 Zack Weinberg + + * config.gcc: Make the name of the extra-modes file adjustable + by target stanzas. + (s390x, strongarm, xscale stanzas): Use this facility. + * configure.in: Update to match. + * configure: Regenerate. + + 2002-06-11 Aldy Hernandez + + * config/rs6000/rs6000.c (rs6000_emit_minmax): Treat unsigned + max/mins as unsigned GE compares. + + 2002-06-11 Jason Thorpe + + * config.gcc (vax-*-bsd*): Add vax/bsd.h to ${tm_file}. + * config/vax/bsd.h: New file. + * config/vax/netbsd.h: Add missing notice. + (CPP_PREDEFINES): Remove. + (TARGET_OS_CPP_BUILTINS): Define. + (CPP_SPEC): Use NETBSD_CPP_SPEC. + * config/vax/openbsd.h: Update copyright years. + (CPP_PREDEFINES): Remove. + (TARGET_OS_CPP_BUILTINS): Define. + * config/vax/ultrix.h: Likewise. + * config/vax/vaxv.h: Likewise. + * config/vax/vms.h: Likewise. + * config/vax/vax.h (TARGET_CPU_CPP_BUILTINS): Define. + (CPP_PREDEFINES, CPP_SPEC): Remove. + + Wed Jun 12 01:50:28 CEST 2002 Jan Hubicka + + * i386.md (addqi_1_slp, subqi_1_slp + (andqi_ext0, testqi_ext0): Remove unnecesary check. + (addhi*, addqi*): Simplify "dec" condition. + (testsi to testqi splitters): Remove TARGET_PROMOTE_QImode check. + (and, or, xor to QImode splitters): New. + (iorqi_ext*): New. + (xorqi_ext_0): New. + (xorqi_ext_1): Rename to xorqi_ext_2; bring to sync with and versions. + (andqi_ext_1_rex64): New. + (ashrqi*_slp): New. + (ashlqi*_slp): New. + (lshlqi*_slp): New. + (rotrqi3*_slp): New. + (rotlqi3*_slp): New. + + 2002-06-11 Geoffrey Keating + + * config.gcc (powerpc*-*-*, rs6000-*-*-*): Don't bother including + softfloat.h. + * config/rs6000/vxppc.h (CPP_ENDIAN_BIG_SPEC): Delete. + (CPP_ENDIAN_LITTLE_SPEC): Delete. + * config/rs6000/sysv4le.h (CPP_ENDIAN_DEFAULT_SPEC): Delete. + * config/rs6000/sysv4.h (CPP_SYSV_SPEC): Delete _SOFT_FLOAT setting, + __LONG_DOUBLE_128__ setting, _CALL_* setting. + (CPP_DEFAULT_SPEC): Delete. + (CPP_FLOAT_DEFAULT_SPEC): Delete. + (CPP_LONGDOUBLE_DEFAULT_SPEC): Delete. + (CPP_SYSV_DEFAULT_SPEC): Delete. + (CPP_ENDIAN_BIG_SPEC): Delete. + (CPP_ENDIAN_LITTLE_SPEC): Delete. + (CPP_ENDIAN_SPEC): Delete. + (CPP_SPEC): Don't include cpp_endian, cpp_cpu. + (SUBTARGET_EXTRA_SPECS): Delete cpp_sysv_default, cpp_endian_default, + cpp_endian, cpp_endian_big, cpp_endian_little, cpp_float_default, + cpp_longdouble_default. + * config/rs6000/softfloat.h: Delete. + * config/rs6000/rs6000.h (CPP_CPU_SPEC): Delete. + (EXTRA_SPECS): Delete cpp_cpu. + (TARGET_CPU_CPP_BUILTINS): New. + * config/rs6000/rs6000-protos.h (rs6000_cpu_cpp_builtins): New + prototype. + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): New. + * config/rs6000/linux64.h (CPP_PREDEFINES): Remove endianness defines. + (CPP_DEFAULT_SPEC): Delete. + * config/rs6000/eabiaix.h (CPP_SYSV_DEFAULT_SPEC): Delete. + * config/rs6000/darwin.h (CPP_PREDEFINES): Don't define __BIG_ENDIAN__. + * config/rs6000/beos.h (CPP_SPEC): Remove cpp_cpu. + (CPP_DEFAULT_SPEC): Delete. + * config/rs6000/aix51.h (CPP_SPEC): Remove cpp_cpu, -D_ARCH_PPC. + (CPLUSPLUS_CPP_SPEC): Likewise. + (CPP_CPU_SPEC): Delete. + (CPP_DEFAULT_SPEC): Delete. + * config/rs6000/aix43.h (CPP_SPEC): Remove cpp_cpu, -D_ARCH_PPC. + (CPLUSPLUS_CPP_SPEC): Likewise. + (CPP_CPU_SPEC): Delete. + (CPP_DEFAULT_SPEC): Delete. + * config/rs6000/aix41.h (CPP_SPEC): Remove cpp_cpu. + (CPP_DEFAULT_SPEC): Delete. + * config/rs6000/aix.h (CPP_SPEC): Remove cpp_cpu. + (CPP_DEFAULT_SPEC): Delete. + + * doc/gty.texi: Small updates. + + 2002-06-12 Gabriel Dos Reis + + * objc/objc-act.c (warn_with_ivar): Adjust calls to + diagnostic_count_error. + (warn_with_method): Likewise. + + * diagnostic.h (warnings_are_errors_message): New field of + diagnostic_context. + (diagnostic_count_error): Rename to diagnostic_count_diagnostic to + match semantics. + * diagnostic.c: Adjust calls to diagnostic_count_error through out. + (diagnostic_count_diagnostic): Make aware of other kinds of + diagnostics. + (diagnostic_initialize): Initialize warnings_are_errors_message field. + + 2002-06-11 Tom Tromey + + For PR java/6520: + * fold-const.c (fold_convert): Don't modify existing tree's type. + + 2002-06-11 Geoffrey Keating + + * config/rs6000/ppc-asm.h: Remove some Windows NT leftovers. + + 2002-06-11 Richard Henderson + + * caller-save.c (init_caller_save): Clear INSN_CODE each iteration. + + 2002-06-11 Richard Henderson + + * defaults.h (EH_FRAME_SECTION_NAME): Don't define if + DWARF2_UNWIND_INFO is false. + + 2002-06-11 Bob Wilson + + * config/xtensa/t-xtensa (LIBGCC1_TEST, CROSS_LIBGCC1): Delete. + + * config/s390/s390.c (emit_prologue): gen_store_multiple + returns an insn now, not a pattern. + + 2002-06-11 Rainer Orth + + * Makefile.in (gccinstall.dvi): Pass absolute pathnames to + $(TEXI2DVI) -o. + + Tue Jun 11 21:53:37 CEST 2002 Jan Hubicka + + * i386.c (x86_promote_QImode): Set for Athlon + (x86_fast_prefix): New global variable. + (x86_arch_always_fancy_math_387): Fix formating. + * i386.h (x86_fast_prefix): Declare + (TARGET_FAST_PREFIX): define. + * i386.md (and to strict_low_part, HI to SI + promoting splitter): Use new macro. + + * i386.h (RTX_COSTS): float_extend is not for free for SSE. + + 2002-06-11 Zack Weinberg + + * Makefile.in (distclean): Delete junk left in testsuite + directory, too. + + 2002-06-11 Jeffrey Law + + * emit-rtl.c (try_split): Use INSN_LAST, not LAST_INSN to get the + last insn created by the splitter. + + * caller-save.c (init_caller_save): Move creation of SAVEINSN + and RESTINSN into into the scope of the sequence. + + * mips.c (mips_expand_prologue): Use emit_jump_insn for trivial + RETURN insns. + + * loop.c (loop_regs_scan): Avoid useless generation of REG objects. + + * mips.c (function_arg_advance): gen_ashldi3 returns an INSN now, + not the pattern. So extract the pattern from the insn. + + * mips.c (embedded_pic_fnaddr_reg): Fix typo. + + 2002-06-11 Ulrich Weigand + + * config/s390/s390.md (movsi): Only use floating point + register alternatives when operands are already fprs. + (movdi_31, movdi_64): Likewise. + + 2002-06-11 David S. Miller + + * emit-rtl.c (try_split): Do not abort on non-INSN_P. + Only run RTX equality checks on INSN_P rtl. + + 2002-06-11 Ulrich Weigand + + * config/s390/s390.md (reload_base, ltorg): Remove. + * s390.c (s390_stop_dump_lit_p, s390_dump_literal_pool, + s390_asm_output_pool_prologue, s390_pool_start_insn): Remove. + * s390-protos.h (s390_stop_dump_lit_p, s390_dump_literal_pool, + s390_asm_output_pool_prologue): Likewise. + * s390.h (s390_pool_start_insn): Likewise. + + * s390.c (s390_output_symbolic_const): Remove support for + old-style pool chunks. + (s390_function_epilogue): Likewise. + (s390_output_constant_pool): Likewise. Also, fix incorrect + alignment for 64-bit literal pools. + (print_operand_address): Remove 'y' and 'Y' format flags. + * s390.h (ASM_OUTPUT_POOL_PROLOGUE): Remove support for + old-style pool chunks. + (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Likewise. + (ASM_OUTPUT_POOL_EPILOGUE): Remove. + (S390_CHUNK_MAX, S390_CHUNK_OV, S390_POOL_MAX): Remove. + + * s390.c (consttable_operand): New function. + * s390-protos.h (consttable_operand): Declare it. + * s390.h (PREDICATE_CODES): Add consttable_operand. + * s390.md (consttable_qi, consttable_hi, consttable_si, consttable_di, + consttable_sf, consttable_df, pool_start_31, pool_end_31, + pool_start_64, pool_end_64, reload_base, reload_base2): New insns. + * s390.c (struct constant, struct constant_pool): New data types. + (constant_modes, gen_consttable): New variables. + (s390_start_pool, s390_end_pool, s390_add_pool, + s390_dump_pool, s390_free_pool): New functions. + (s390_chunkify_pool): Completely reimplement literal pool + overflow handling. + + * s390.c (s390_pool_overflow): New variable. + * s390.h (s390_pool_overflow): Declare it. + * s390.md (cjump, icjump): Use it to adapt length for out-of-range + jumps in literal pool overflow situations. + + * s390.c (s390_decompose_address): Accept new-style pool chunk offsets. + (s390_frame_info): Account for possible use of RETURN_REGNUM + by new literal pool overflow code. + (s390_emit_prologue): Likewise. + + 2002-06-05 David S. Miller + + Delete SEQUENCE rtl usage outside of reorg and ssa passes. + * rtl.h (gen_sequence, emit_insns, emit_insns_before, + emit_insns_before_scope, emit_insns_after, + emit_insns_after_scope): Delete declaration. + * ada/misc.c (insert_code_for): Use emit_insn* instead of + emit_insns_foo. + * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. + (alpha_set_memflags): Fix comment. + (set_frame_related_p): Use get_insns instead of gen_sequence. + * config/alpha/alpha.md (setjmp receiver splitter): Avoid + emitting no insns. + * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of + gen_sequence. + (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. + * config/fr30/fr30.c (fr30_move_double): Likewise. + * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): + Likewise. + * config/ia64/ia64.c (spill_restore_mem): Likewise. + * config/ia64/ia64.md (conditional move spliiter): Avoid emitting + no insns. + * config/m32r/m32r.c (gen_split_move_double): Use get_insns + instead of gen_sequence. + * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. + (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. + * config/sh/sh.c (sh_need_epilogue): Likewise. + * config/sparc/sparc.md (current_function_calls_alloca, flat): New + attributes. + (setjmp pattern and split): Use them to avoid splitter which emits + no RTL. + * genattrtab.c (main): Emit include of function.h + * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use + get_insns instead of gen_sequence. + * config/cris/cris.c (cris_split_movdx): Likewise. + * emit-rtl.c (emit_insns*): Kill. + (try_split): Expect insn list instead of SEQUENCE. + (make_jump_insn_raw, make_call_insn_raw): Fix comments. + (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. + Make them abort if a SEQUENCE is given and RTL checking is + enabled. + (emit_*_scope): Don't forget to set scope on final insn. + (gen_sequence): Move from here... + * ssa.c (gen_sequence): To here as private function. + * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix + comments. + (expand_builtin_return, expand_builtin_mathfn): Likewise. + (expand_builtin_strlen): Use get_insns instead of gen_sequence. + (expand_builtin_saveregs): Use emit_insn_foo, fix comments. + (expand_builtin_expect_jump): Use get_insns and fix comments. + * calls.c (try_to_integrate): Use emit_insn_foo. + (expand_call, emit_library_call_value_1): Likewise. + * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. + (emit_move_insn_1): Use get_insns instead of gen_sequence. + (expand_expr): Use emit_insn_foo. + * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. + * except.c (build_post_landing_pads): Likewise. + * flow.c (attempt_auto_inc): Likewise. + * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, + expand_nl_goto_receivers, expand_decl_cleanup): Likewise. + * function.c (fixup_var_refs_insn): Use get_insns instead of + gen_sequence. + (fixup_var_refs_1): Likewise and expect insn list from gen_foo. + (fixup_memory_subreg): Use get_insns instead of gen_sequence. + (fixup_stack_1, purge_addressof_1, expand_main_function, + get_arg_pointer_save_area): Likewise. + (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, + expand_function_end): Use emit_insn_foo. + (record_insns, keep_stack_depressed): Work with insn list instead + of SEQUENCE, fix comments. + * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, + noce_try_store_flag_constants, noce_try_store_flag_inc, + noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, + noce_try_minmax, noce_try_abs): Use emit_insn_foo. + (noce_process_if_block): Use get_insns instead of gen_sequence. + * optabs.c (add_equal_note): Work with insn list, fix comments. + (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. + (expand_unop, expand_complex_abs, expand_unop_insn, + expand_no_conflict_block): Likewise. + (gen_move_insn): Use get_insns instead of gen_sequence. + (gen_cond_trap): Likewise. + * integrate.c (copy_rtx_and_substitute): Likewise. + (emit_initial_value_sets): Use emit_insn_foo. + * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. + (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently + now that RTL generators give insn lists. + * sibcall.c (replace_call_placeholder): Use emit_insn_foo. + * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns + instead of gen_sequence. + (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. + * explow.c (emit_stack_save, emit_stack_restore): Use get_insns + instead of gen_sequence. + * loop.c (move_movables, emit_prefetch_instructions, + gen_add_mult, check_dbra_loop, gen_load_of_final_value): + Likewise. + (loop_regs_update): Work with insn list instead of SEQUENCE rtl. + (product_cheap_p): Likewise, and add commentary about RTL wastage + here. + * lcm.c (optimize_mode_switching): Use get_insns instead of + gen_sequence. + * profile.c (gen_edge_profiler): Likewise. + * regmove.c (copy_src_to_dest): Likewise. + * reg-stack.c (compensate_edge): Likewise and fix comment. + * gcse.c (process_insert_insn): Likewise. + (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. + * jump.c (delete_prior_computation): Update comment. + * genemit.c (gen_expand, gen_split, main): Use get_insns instead + of gen_sequence, update comments to match. + * recog.c (peephole2_optimize): Work with insn lists instead of + SEQUENCE rtl. + * sched-vis.c (print_pattern): Abort on SEQUENCE. + * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): + Use get_insns instead of gen_sequence. + (copy_loop_body): Likewise and don't emit dummy NOTE. + * genrecog.c: Don't mention SEQUENCE rtl in comments. + * combine.c (try_combine): Expect insn lists from split generator. + * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by + hand. + + 2002-06-11 Roger Sayle + Andreas Jaeger + + * cfgbuild.c: Update copyright years. + + 2002-06-11 Andreas Schwab + + * config/m68k/m68k.h (PREDICATE_CODES): Define. + + 2002-06-11 Eric Christopher + + * doc/tm.texi (Run-time Target): Add comment about flag_iso + and strict ANSI. + * config/mips/ecoff.h (CPP_PREDEFINES): Remove. + * config/mips/ecoffl.h: Ditto. + * config/mips/elf64.h (SUBTARGET_CPP_SPEC): Remove. + (CPP_PREDEFINES): Ditto. + * config/mips/elfl64.h: Ditto. + * config/mips/elfl.h: Ditto. + * config/mips/iris3.h (CPP_PREDEFINES, SUBTARGET_CPP_SPEC): #if 0 + out until irix header consolidation. + * config/mips/iris5.h (CPP_PREDEFINES, SUBTARGET_CPP_SPEC): Replace + with SUBTARGET_OS_CPP_BUILTINS. + * config/mips/iris6.h: Ditto. + (CPLUSPLUS_CPP_SPEC): Remove. + * config/mips/linux.h: Ditto. + * config/mips/netbsd.h: Ditto. + * config/mips/openbsd.h: Ditto. + * config/mips/rtems.h: Ditto. + * config/mips/rtems64.h: Ditto. + * config/mips/sni-svr4.h: Ditto. + * config/mips/mips.h (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, + ISA_MIPS32, ISA_MIPS64): New defines. + (GENERATE_MULT3_SI, HAVE_SQRT_P, ISA_HAS_64BIT_REGS, + ISA_HAS_BRANCHLIKELY, ISA_HAS_CONDMOVE, ISA_HAS_8CC, ISA_HAS_FP4, + ISA_HAS_COND_TRAP, ISA_HAS_MADD_MSUB, ISA_HAS_NMADD_NMSUB, + ISA_HAS_CLZ_CLO, ISA_HAS_DCLZ_DCLO): Use. + (TARGET_CPU_CPP_BUILTINS): Define. + (CPP_PREDEFINES, LONG_MAX_SPEC, CPP_FPR_SPEC, CPP_SPEC): Remove. + * config/mips/mips.md (mulsi3_mult3): Use ISA_MIPS32/64. + (movdicc): Remove check for ISA_MIPS32. + (bunordered, bordered, bungt, bunlt, buneq, bunge, bunle, + sunordered_df, sunordered_sf, sordered_df, sordered_sf, + sunlt_df, sunlt_sf, sungt_df, sungt_sf, suneq_df, suneq_sf, sunge_df, + sunge_sf, sunle_df, sunle_sf): New patterns. + + 2002-06-11 Neil Booth + + * Makefile.in: Update cppmain.o. + * cpphash.h (struct cpp_reader): Move some members to a + nested structure. + (trad_line): Rename saved_line. + (_cpp_read_logical_line_trad): Update. + (_cpp_remove_overlay): New. + * cppinit.c (cpp_create_reader): No need to set saved_line. + (cpp_destroy): Update. + (cpp_read_main_file): Only overlay if compiling. + * cpplex.c (continue_after_nul): Return false if in directive. + * cpplib.c (EXPAND): New. + (directive_table, SEEN_EOL): Update. + (end_directive): Remove overlay if traditional; don't skip + line in traditional #define. + (prepare_directive_trad): New. + (_cpp_handle_directive, run_directive): Update for traditional + directives. + (lex_macro_node): Simplify, don't use lex_identifier_trad. + * cpplib.h (struct options): Add preprocess_only. + * cppmain.c: Don't include intl.h. + (cpp_preprocess_file): Set options->preprocess_only. + (scan_translation_unit_trad): Fix, and print line numbers. + * cpptrad.c (check_output_buffer, lex_identifier, scan_parameters, + maybe_start_funlike, scan_out_logical_line, replace_args_and_push, + save_replacement_text, _cpp_create_trad_definition): Update for + variable renaming. + (_cpp_overlay_buffer): Save line number. + (_cpp_remove_overlay): Rename from restore_buff, restore line. + (_cpp_read_logical_line_trad): Don't handle overlays here. + (scan_out_logical_line): Process directives. + + 2002-06-11 Danny Smith + + * gthr-win32.h: Wrap functions in extern "C". + (__gthread_key_t): Typedef as unsigned long, + not win32 DWORD. + (__GTHREAD_ONCE_INIT): Use 0, not win32 FALSE. + (__gthread_mutex_t): Typedef as void*, not win32 HANDLE. + (__gthr_win32_once, __gthr_win32_key_create, + __gthr_win32_key_delete, __gthr_win32_getspecific, + __gthr_win32_setspecific, __gthr_win32_mutex_init_function, + __gthr_win32_mutex_lock,__gthr_win32_mutex_trylock, + __gthr_win32_mutex_unlock): Declare. + (__gthread_once,__gthread_key_create, + __gthread_key_delete, __gthread_getspecific, + __gthread_setspecific, __gthread_mutex_init_function, + __gthread_mutex_lock,__gthread_mutex_trylock, + __gthread_mutex_unlock): Call corresponding + __gthr_win32_* extern implementations if #defined + __GTHREAD_HIDE_WIN32API. + * config/i386/t-mingw32 (LIB2FUNCS_EXTRA): Set to + $(srcdir)/config/i386/gthr-win32.c + * config/i386/gthr-win32.c: New implementation file. + (__gthr_win32_once, __gthr_win32_key_create, + __gthr_win32_key_delete, __gthr_win32_getspecific, + __gthr_win32_setspecific, __gthr_win32_mutex_init_function, + __gthr_win32_mutex_lock,__gthr_win32_mutex_trylock, + __gthr_win32_mutex_unlock): New functions, based on + static inlines in gthr-win32.h. + + 2002-06-10 Bob Wilson + + * config/xtensa/xtensa.c (override_options): Don't warn about + using -fpic or -fPIC when PIC is enabled by default. + + 2002-06-10 Roger Sayle + + * toplev.c (rest_of_compilation): Revert flag_if_conversion change. + + 2002-06-10 Zack Weinberg + + * Makefile.in (MACHMODE_H): Add @extra_modes_file@. + * configure.in: If $srcdir/config/${cpu_type}/${cpu_type}-modes.def + exists, substitute its pathname as @extra_modes_file@, define + EXTRA_MODES_FILE to be an appropriate string to #include it + with, and define EXTRA_CC_MODES to 1. + + * machmode.def: Update comments. Include EXTRA_MODES_FILE if + it's defined. Get rid of redundancy in calling sequence for + CC; don't use it to define CCmode, to avoid a warning. + * libgcc2.c: Include symcat.h for the sake of machmode.def. + + * arc-modes.def, arm-modes.def, c4x-modes.def, i386-modes.def, + i960-modes.def, ia64-modes.def, m88k-modes.def, mmix-modes.def, + pa-modes.def, pdp11-modes.def, rs6000-modes.def, sparc-modes.def: + New files. + * arc.h, arm.h, c4x.h, i386.h, i960.h, ia64.h, m88k.h, mmix.h, + pa.h, pdp11.h, rs6000.h, sparc.h: Don't define EXTRA_CC_MODES. + + * doc/sourcebuild.texi, doc/tm.texi: Document new scheme for + defining extra CC modes. + + 2002-06-10 Roger Sayle + Andreas Jaeger + + * cfgrtl.c (create_basic_block_structure): Remove index argument + and use last_basic_block++ instead. (create_basic_block): Update. + * cfgbuild.c (find_basic_blocks_1): Likewise. + + * cfgrtl.c (compute_bb_for_insn): Remove unused "max" argument. + * haifa-sched.c (sched_init): Update compute_bb_for_insn caller. + * sched-ebb.c (schedule_ebbs): Likewise. + * sched-rgn.c (schedule_insns): Likewise. + * ssa-ccp.c (ssa_const_prop): Likewise. + * ssa-dcs.c (ssa_eliminate_dead_code): Likewise. + * toplev.c (rest_of_compilation): Likewise. + * config/ia64/ia64.c (ia64_reorg): Likewise. + + 2002-06-10 Roger Sayle + + * simplify-rtx.c (simplify_replace_rtx): Allow replacement + of matching registers. + + 2002-06-10 Roger Sayle + + * toplev.c (rest_of_compilation): Disable early if-conversion pass. + * gcse.c (bypass_conditional_jumps): Fix typo in setcc test. + + 2002-06-10 Hans-Peter Nilsson + + * config/mmix/mmix.h: Improve comments. + (CPP_SPEC, CPP_PREDEFINES): Don't define. + (TARGET_CPU_CPP_BUILTINS): Define. + (CANONICALIZE_COMPARISON): Don't define, replace with comment. + (PREDICATE_CODES) <"mmix_reg_or_8bit_or_256_operand">: Remove + unused predicate. + * config/mmix/mmix.c (MMIX_OUTPUT_REGNO): Add cast to avoid + compiler warning. + (mmix_constant_address_p): Remove another + redundant test before case. + (mmix_canonicalize_comparison): Remove unused function. + (mmix_print_operand_address): Don't test and adjust for operand in + non-canonical format. + (mmix_reg_or_8bit_or_256_operand): Remove unused predicate. + (mmix_gen_compare_reg): Don't use CANONICALIZE_COMPARISON. + + 2002-06-10 Zack Weinberg + + * config/m32r/m32r.h: Don't define SELECT_CC_MODE. + * config/m32r/m32r-protos.h: Don't prototype m32r_select_cc_mode. + * config/m32r/m32r.c: Don't define m32r_select_cc_mode. + (gen_compare): Use CCmode unconditionally. + + 2002-06-10 Jakub Jelinek + + PR optimization/6759 + * cse.c (cse_insn): Fold src_eqv just once, store it folded back into + the REQ_EQUAL note. + + 2002-06-10 Jakub Jelinek + + PR c/6660 + * c-decl.c (grokfield): Allow user defined types if they declare + structs or unions for unnamed fields. + + 2002-06-10 Jakub Jelinek + + PR c/6809 + * print-rtl.c (print_mem_expr): Don't crash on unnamed fields. + + 2002-06-10 Jakub Jelinek + + PR optimization/6842 + * combine.c (combine_simplify_rtx) [SUBREG]: Don't ICE if VOIDmode + operand subreg cannot be simplified. + + 2002-06-10 Jakub Jelinek + + * varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR. + (compare_constant): Likewise. + (output_addressed_constants): Likewise. + + 2002-06-10 Jakub Jelinek + + * cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't + merge bb with itself. + + 2002-06-10 Richard Henderson + + * config/alpha/alpha.md (builtin_zap): Fix thinkos expanding mask. + (builtin_zapnot): Likewise. + + * config/alpha/ev5.md: Don't combine shift and mvi insns in one + reservation. + + 2002-06-10 Eric Christopher + + * config/i386/i386.c (ix86_osf_output_function_prologue): Remove + prototype and function. + (TARGET_ASM_FUNCTION_PROLOGUE): Remove OSF version. + (call_insn_operand): Remove half pic references. + (legitimate_address_p): Ditto. + * config/i386/i386.h: Remove half pic defines. + + 2002-06-10 Eric Christopher + + * doc/extend.texi (Return Address): Add note explaining the side- + effects of inlining on __builtin_return_address. + + 2002-06-10 Tom Tromey + + * Makefile.in (LANGHOOKS_DEF_H): Include langhooks-def.h. + (c-common.o): Depend on langhooks.h. + + 2002-06-10 Neil Booth + + * cpphash.h (_cpp_read_logical_line_trad, + _cpp_expansions_different_trad): Update prototypes. + * cpplex.c (continue_after_nul): New. + * cppmain.c: Include cpphash.h. + (scan_translation_unit_trad): New. + (cpp_preprocess_file): Call it. + * cpptrad.c (_cpp_read_logical_line_trad): Take new parameter + overlay. + (_cpp_expansions_different_trad): Update prototype. + + Mon Jun 10 18:02:24 2002 J"orn Rennecke + + Fix cfi generation for SH[1-4]: + + * sh.c (frame_insn): New function. + (output_stack_adjust): Add parameter emit_fn. All callers changed. + (push): Now returns rtx. Use frame_insn. + (sh_expand_prologue): Clear RTX_FRAME_RELATED_P for second push + of a DF register. + * sh.h (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_RETURN_COLUMN): Define. + + 2002-06-10 Zack Weinberg + + * Makefile.in (STAGESTUFF): Add s-gtype, gt-*.h, gtype-*.h, + and gtype-desc.c. + (mostlyclean): Delete specs.h, options.h, gencheck.h here... + (distclean): ... not here. But do delete all testsuite/*.log, + testsuite/*.sum files here. Delete mkheaders. Delete + po/*.gmo and the testsuite directory in a split tree build. + + 2002-06-10 Jeffrey Law + + * alias.c (static_reg_base_value): New to hold RTL for + items allocated once per function for the aliasing code. + (init_alias_once_per_function): Initialize static_reg_base_value. + (init_alias_analysis): Avoid throw-away allocations of RTL by + using pre-computed values in static_reg_base_value. + * function.c (prepare_function_start): Call + init_alias_once_per_function appropriately. + * rtl.h (init_alias_once_per_function): Declare. + * caller-save (init_caller_save): Restructure slightly to + avoid lots of silly RTL generation. + * expr.c (init_expr_once): Likewise. + * reload1.c (reload_cse_regs_1): Allocate throw-away register + RTL object here. Pass it into children. + (reload_cse_simplify_operands): Use passed-in register RTL + object. + (reload_cse_simplify): Pass through throw-away register + RTL object. + + 2002-06-10 Daniel Berlin + + * Makefile.in (ssa.o): Add dependency on $(RTL_H), which was missing. + + 2002-06-10 Richard Sandiford + + * gcc.c (process_command): Avoid assignment to read-only location. + Fix sizeof calculation. + + 2002-06-10 Neil Booth + + * cpphash.h (struct cpp_macro): Put comments on their own lines. + (_cpp_expansions_different_trad): New. + * cppmacro.c (warn_of_redefinition): Fix for traditional case. + * cpptrad.c (canonicalize_text): New. + (scan_out_logical_line): Handle no arguments correctly. + (save_replacement_text): Commit memory when finished. + (_cpp_expansions_different_trad): New. + + 2002-06-10 Tim Josling + + * gengtype.c (unnamed enum containing BASE_FILE_*): Add languages + TREELANG and COBOL. + (lang_names): Add treelang and cobol. + (get_file_basename): Add code to support treelang and cobol as + 4th and 5th users of c-common.c. + + 2002-06-09 Geoffrey Keating + + * Makefile.in (install-driver): Install driver as + $(target_alias)-gcc-$(version). + * gcc.c (spec_version): Make const. + (process_command): Handle -V and -b by using exec. + * doc/invoke.texi (Target Options): Restore -V option, + update docs for -b option. + + 2002-06-10 Tim Josling + + * configure.in (remaining_languages_check): + Added check that all languages specified were found. + Exit if not found. Previous behavior was silent failure. + * configure: Regenerated. + + 2002-06-10 Tim Josling + + First steps to making treelang documentation compliant, based on + instructions in sourcebuild.texi. Also add to gcc.c list of + default languages. + + * doc/contrib.texi: Add self as contributor of treelang. + + * doc/frontends.texi: Add mention of treelang. + + * doc/invoke.texi (Overall Options): Add mention of treelang. + + * doc/standards.texi: Add mention of treelang. + + 2002-06-09 Hans-Peter Nilsson + + * config/cris/cris.c: Include ggc.h + + 2002-06-09 Neil Booth + + * cpphash.h (_cpp_push_text_context): Update. + (_cpp_arguments_ok): New. + * cppmacro.c (_cpp_arguments_ok): New, split out from... + (collect_args): ...here. + (_cpp_push_text_context): Change inputs. + * cpptrad.c (struct fun_macro, maybe_start_funlike, save_argument, + replace_args_and_push): New. + (lex_identifier, _cpp_lex_identifier_trad, scan_parameters): + Don't use IS macros directly. + (scan_out_logical_line): Handle function-like macro argument + collection. + (push_replacement_text): Update. + (replacement_length): Remove. + (_cpp_create_trad_definition): Don't skip whitespace before + checking for '('. + + 2002-06-09 Marek Michalkiewicz + + * config/avr/avr.c (avr_mcu_types): Update for new devices. + * config/avr/avr.h (TARGET_SWITCHES, AVR_MEGA): Add -mshort-calls. + (LINK_SPEC, CRT_BINUTILS_SPECS): Update for new devices. + * config/avr/avr.md ("type" and "length" attributes): New type + "xcall", length 1 or 2 if AVR_MEGA. Use in all patterns that + output a single "call" or "rcall" insn depending on device size. + * config/avr/t-avr (MULTILIB_MATCHES): Update for new devices. + + 2002-06-09 David Edelsohn + + * config/rs6000/{aix43.h,aix5.1} (ASM_CPU_SPEC): Add power3 + synonym for 630. Add power4. Remove embedded processors. Use -m604 + assembler option. + (CPP_CPU_SPEC): Add power3 and power4. + (PROCESSOR_DEFAULT): Change to 604e. + * config/rs6000/rs6000.h (ASM_CPU_SPEC): Similar additions. + (CPP_CPU_SPEC): Similar additions. + (enum process_type): Add POWER4. + (RTX_COSTS): Add POWER4. + (CPP_CPU_SPEC): Similar additions. + * config/rs6000/linux64.h (PROCESSOR_DEFAULT): Define. + (PROCESSOR_DEFAULT64): Define. + * config/rs6000/rs6000.c (rs6000_override_options): Add power4. + (rs6000_adjust_cost): Add 603, 604, 604e, 620, 630, Power4 to + branch adjustment. + (rs6000_issue_rate): Add Power4. + * config/rs6000/rs6000.md (cpu attr): Add power4. + (iu compare): Remove 604, 604e, 620, 630. + Add basic Power4 scheduling information. + (mfcr/mtcrf): Change type attribute to cr_logical. + + 2002-06-08 Kaveh R. Ghazi + + * gengtype.h (error_at_line): Use PARAMS, not VPARAMS. Add + ATTRIBUTE_PRINTF_2. + * gengtype-lex.l: Fix format specifier warning. + + * genautomata.c: Don't include ctype.h or limits.h. Use ISSPACE, + not isspace. + * gengtype-lex.l: Don't include ctype.h and use ISSPACE/ISIDNUM in + lieu of isspace/IDchar. + * gengtype.c: Likewise for ctype.h and ISALNUM vs isalnum. + * read-rtl.c: Likewise for ctype.h. Don't define ISDIGIT or + ISSPACE. + + 2002-06-08 Zack Weinberg + + * Makefile.in (LIBCPP_OBJS): Take out version.o. + * cpphash.h (cpp_reader): Take out print_version member. + * cppinit.c: (cpp_handle_option): Don't do anything with + -version. Just set help_only for --version, --target-help. + Just set verbose option for -v. + (cpp_post_options): Don't print a version string. + + 2002-06-08 Marek Michalkiewicz + + * config/avr/avr.c (TARGET_SECTION_TYPE_FLAGS): New. + (avr_section_type_flags): New, handle .noinit* sections. + + 2002-06-08 Jason Thorpe + + * config/sh/netbsd-elf.h (SUBTARGET_EXTRA_SPECS): Define + and include netbsd_entry_point. + (SUBTARGET_LINK_SPEC): Define as NETBSD_LINK_SPEC_ELF. + (NETBSD_ENTRY_POINT): Define. + + 2002-06-08 Jason Thorpe + + * config/sh/sh.h (SUBTARGET_EXTRA_SPECS): Define empty + if not already defined. + (EXTRA_SPECS): Add SUBTARGET_EXTRA_SPECS. + + 2002-06-08 Marek Michalkiewicz + + * config/avr/avr.c (avr_regs_to_save): No need to save any registers + in a noreturn function. + (avr_output_function_prologue, avr_output_function_epilogue): + Correct function size calculation. Do not crash on empty function. + (avr_output_function_epilogue): No need for epilogue after a BARRIER. + + 2002-06-08 Jason Thorpe + + * config/mips/netbsd.h (SUBTARGET_EXTRA_SPECS): Add + netbsd_link_spec and netbsd_entry_point. + (LINK_SPEC): Use %(netbsd_link_spec). + (NETBSD_ENTRY_POINT): Define. + + 2002-06-08 Jason Thorpe + + * config/sparc/netbsd-elf.h (LINK_ARCH32_SPEC): Only specify + linker emulation. + (LINK_ARCH64_SPEC): Likewise. + (LINK_SPEC, NETBSD_ENTRY_POINT): Define. + (SUBTARGET_EXTRA_SPECS): Add netbsd_link_spec and netbsd_entry_point. + + 2002-06-08 Marc Espie + + * lists.c (free_list): Fix typo in comment. + + 2002-06-08 Andreas Jaeger + + * lcm.c (optimize_mode_switching): Add unused attribute for + variable. + + * sched-deps.c (sched_analyze): Remove unused variable. + + 2002-06-08 Gabriel Dos Reis + + * diagnostic.def: Don't capitalize diagnostict descriptors. + + 2002-06-08 Jason Thorpe + + * config/m68k/netbsd-elf.h (EXTRA_SPECS): Add netbsd_entry_point. + (LINK_SPEC): Define as NETBSD_LINK_SPEC_ELF. + (NETBSD_ENTRY_POINT): Define. + + 2002-06-08 Jason Thorpe + + * config/i386/netbsd-elf.h (LINK_SPEC): Define as + NETBSD_LINK_SPEC_ELF. + (SUBTARGET_EXTRA_SPECS): Add netbsd_entry_point. + (NETBSD_ENTRY_POINT): Define. + * config/i386/netbsd64.h (LINK_SPEC): Use %(netbsd_link_spec). + (SUBTARGET_EXTRA_SPECS): Add netbsd_link_spec and + netbsd_entry_point. + (NETBSD_ENTRY_POINT): Define. + + 2002-06-08 Jason Thorpe + + * config/alpha/netbsd.h (SUBTARGET_EXTRA_SPECS): Add + netbsd_link_spec and netbsd_entry_point. + (LINK_SPEC): Use %(netbsd_link_spec). + (NETBSD_ENTRY_POINT): Define. + + 2002-06-08 Jason Thorpe + + * config/netbsd-elf.h (LINK_SPEC): Rename to... + (NETBSD_LINK_SPEC_ELF): ...this. Use %(netbsd_entry_point) + to specify program entry point. + + 2002-06-07 Jeff Law + + * simplify-rtx.c (simplify_gen_relational): Simplify RTL of the form + (ne (comp x y) 0) into (comp x y) where comp is a comparison code. + Simplify (eq (comp x y) 0) into (revcomp x y) if the sense of the + comparison code comp can be reversed. + + 2002-06-07 Roger Sayle + + * fold-const.c (fold) [EQ_EXPR]: Place both integer and real + constants last in comparisons. Optimize (x+1.0)>0.0 into the + equivalent x > -1.0 when -ffast-math. + + 2002-06-07 Jason Thorpe + + * config.gcc (mips*-*-netbsd*): Add mips/t-netbsd to ${tmake_file}. + * config/mips/t-netbsd: New file. + + 2002-06-07 Zack Weinberg + + * cppinit.c (COMMAND_LINE_OPTIONS): Give all relevant -W + options their own entries. + (parse_option): Clarify comment. + (cpp_handle_option): Remove 'ignore' parameter and OPT_W + special case. Replace if/strcmp chain for -W options with + use of new OPT_* entries for them. + (cpp_handle_options): Update to match. + * cpplib.h: Remove last parameter to cpp_handle_option from prototype. + * c-decl.c: Update call to cpp_handle_option. + + 2002-06-07 Akim Demaille + + * gengtype-yacc.y (optionseqopt): Add the ending `;' to the action. + Whitespace changes. + + 2002-06-07 Jeffrey Law + + * sched-deps.c (free_deps): Avoid calling free_INSN_LIST_list + on empty lists. + + 2002-06-07 H.J. Lu (hjl@gnu.org) + + * configure.in: Add --enable-__cxa_atexit. + * configure: Regenerated. + * config.in: Likewise. + + * defaults.h (DEFAULT_USE_CXA_ATEXIT): New. Defined to be 0 if + not defined. + + 2002-06-07 Gabriel Dos Reis + + * diagnostic.c (diagnostic_build_prefix): Fix initialization. + + 2002-06-07 Jason Thorpe + + * config/mips/netbsd.h (CACHE_FLUSH_FUNC): Define. + + 2002-06-07 Jason Merrill + + * cppexp.c (num_equality_op): Use a temporary variable to work + around gcc 3.0.4 bug. + + 2002-06-07 Gabriel Dos Reis + + * diagnostic.c (diagnostic_build_prefix): Tidy. + + 2002-06-07 Neil Booth + + * cpptrad.c (struct block, BLOCK_HEADER_LEN, BLOCK_LEN, + scan_parameters, save_replacement_text, replacement_length): New. + (scan_out_logical_line): Take a macro and save parameters if + non-NULL. + (_cpp_logical_line_trad): Update. + (_cpp_create_trad_definition): Update to handle function-like + macros. + * cpplex.c (new_buff): Update. + (struct dummy, DEFAULT_ALIGNMENT, CPP_ALIGN): Move... + * cpphash.h: ...here. + (CPP_ALIGN2, _cpp_save_parameter): New. + * cppmacro.c (save_parameter): Rename, export. + (parse_params): Update. + + 2002-06-07 Andreas Jaeger + + * config/mmix/mmix.c: Remove extra broken prototype for + mmix_init_machine_status. + + 2002-06-06 Geoffrey Keating + + * gengtype.c: Add comments before all the routines. + + 2002-06-07 Jason Thorpe + + * config.gcc (sh5*-*-netbsd*): Remove sh/t-netbsd-sh5-32 + from and add t-sh64 to ${tmake_file}. + (sh64*-*-netbsd*): Add t-sh64 to ${tmake_file}. + * config/sh/t-netbsd-sh5 (LIB1ASMFUNCS): Remove. + * config/sh/t-netbsd-sh5-32: Remove. + * config/sh/t-netbsd-sh5-64 (MULTILIB_OPTIONS): Use + MULTILIB_ENDIAN. + (MULTILIB_DIRNAMES): Define. + + Thu Jun 6 23:14:46 CEST 2002 Jan Hubicka + + * i386.md (and promoting splitters): Disable QI to SImode promoting + when doing so changes immediate to be 32bit. + + * rtl.h (emit_*_scope): Declare. + * emit-rtl.c (emit_*_scope): New global functions. + (try_split): Copy scope. + * ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants, + noce_try_flag_inc, noce_try_store_flag_mask, noce_try_cmove, + noce_try_cmove_arith, noce_try_minmax, noce_try_abs, + noce_process_if_block, find_cond_trap): Copy scopes. + * recog.c (peephole2_optimize): likewise. + + 2002-06-06 Jeffrey Law + + * h8300.h (OK_FOR_U): Fix thinko exposed by flag checking. + + Thu Jun 6 21:06:25 2002 J"orn Rennecke + + * gengtype-lex.l (INITIAL): New rule for "'"("\\".|[^\\])"'". + + 2002-06-06 Rainer Orth + + * Makefile.in (TEXI_GCCINSTALL_FILES): Define. + ($(docdir)/gccinstall.info): New target. + (info): Depend on it. + (gccinstall.dvi): New target. + (dvi): Depend on it. + * doc/.cvsignore: Ignore new info files. + * doc/install.texi (@setfilename): Reflect new info filename. + + Thu Jun 6 15:57:23 2002 J"orn Rennecke + + * sh.c (machine_dependent_reorg): Don't set RTX_UNCHANGING_P + on an UNSPEC. + + Thu Jun 6 07:17:43 2002 Nicola Pero + + PR objc/6834 + * objc/objc-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define to be + c_common_get_alias_set. + (LANG_HOOKS_SAFE_FROM_P): Define to be c_safe_from_p. + + 2002-06-06 John David Anglin + + * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn): New + functions. + * rtl.h (get_first_nonnote_insn, get_last_nonnote_insn): Declare. + * avr/avr.c (avr_output_function_epilogue): Use above to determine + function size. + * pa/pa.c (pa_output_function_prologue): Likewise. + + 2002-06-05 David S. Miller + + * integrate.c (subst_constants): Handle 'B' RTL format. + + 2002-06-05 Eric Christopher + + * varasm.c (make_decl_rtl): Fix comment for removed + halfpic.c. + + 2002-06-05 Eric Christopher + + * Makefile.in: Remove missed halfpic bits. + + 2002-06-05 Eric Christopher + + * toplev.c: Remove half-pic. + * config/mips/mips.c: Ditto. + * config/mips/mips.h: Ditto. Remove unused defines. + * config/mips/openbsd.h: Update comment to reflect above. + * config/mips/mips.md: Remove half-pic constraints. + * halfpic.h: Delete. + * halfpic.c: Ditto. + + 2002-06-05 Jeffrey Law + + * pa.h (EXTRA_CONSTRAINT, T case): Further refine so that it + rejects (mem (lo_sum (reg) (unspec))), but will allow + (mem (lo_sum (reg) (symbol_ref)) for PA2.0. + + 2002-06-05 Neil Booth + + * cpphash.h (_cpp_create_definition): Update prototype. + (_cpp_push_text_context, _cpp_create_trad_definition): New. + ( cpp_lex_identifier_trad): New. + (_cpp_set_trad_context): New. + * cppinit.c (cpp_finish_options): Don't conditionalize builtins. + * cpplib.c (SEEN_EOL): Update. + (lex_macro_node): Update for -traditional. + (cpp_push_buffer, _cpp_pop_buffer): Similarly. + * cppmacro.c (_cpp_create_definition): Split into + create_iso_definition() and _cpp_create_trad_definition(). + (warn_of_redefinition): Update prototype; handle traditional + macros. + (_cpp_push_text_context): New. + * cpptrad.c (skip_whitespace, push_replacement_text): New. + (lex_identifier): Call ht_lookup with correct start. + (_cpp_lex_identifier_tradm _cpp_create_trad_definition, + _cpp_set_trad_context): New. + (scan_out_logical_line): Update to handle changing contexts. + + Wed Jun 5 20:42:31 2002 J"orn Rennecke + + * config.gcc (sh-*-elf*, sh64*-*-elf*): Unify. + (shl*-*-elf*): Add. + * config/sh/t-be (MULTILIB_ENDIAN): Set. + * config/sh/t-le (MULTILIB_ENDIAN): Likewise. + * t-sh (MULTILIB_ENDIAN): Set. + (MULTILIB_OPTIONS): Use it. + * t-sh64 (MULTILIB_OPTIONS): Likewise. + (MULTILIB_DIRNAMES): Likewise. + + 2002-06-05 Gabriel Dos Reis + + * toplev.h (report_error_function): Remove. + + * diagnostic.h (location_t): New datatype. + (text_info): Likewise. + (diagnostic_info): Likewise. + (output_prefix): New macro. + (diagnostic_last_function_changed): Likewise. + (diagnostic_set_last_function): Likewise. + (diagnostic_last_module_changed): Likewise. + (diagnostic_set_last_module): Likewise. + (report_diagnostic): Now macro. + (diagnostic_set_info): Declare. + + * diagnostic.c (report_problematic_module): Rename to + diagnostic_repor_current_module. + (set_diagnostic_context): Remove. + (count_error): Rename to diagnostic_error_count. + (error_function_changed): Remove. + (record_last_error_function): Likewise. + (error_module_changed): Likewise. + (record_last_error_module): Likewise. + (context_as_prefix): Rename to diagnostic_build_prefix. + (flush_diagnostic_buffer): Rename to diagnostic_flush_buffer. + (diagnostic_set_info): New function. + + * objc/objc-act.c: #include diagnostic.h + (error_with_ivar): Adjust call to count_error. + (warn_with_method): Likewise. + * objc/Make-lang.in (objc-act.o): Depend on diagnostic.h + + 2002-06-05 Bob Wilson + + * config/xtensa/xtensa.c (xtensa_build_va_list): Use + lang_hooks.types.make_type instead of make_node; set up + __va_list_tag type decl. + (xtensa_builtin_saveregs): Remove broken use of + RTX_UNCHANGING_P and unnecessary use of MEM_IN_STRUCT_P + for saved registers; add varargs alias set. + + 2002-06-05 Neil Booth + + config: + * alpha/gnu.h: Undef TARGET_OS_CPP_BUILTINS. + * i386/beos-elf.h: Use TARGET_OS_CPP_BUILTINS rather than + CPP_PREDEFINES and part of CPP_SPEC. + i386/freebsd-aout.h, i386/gas.h, i386/gnu.h, i386/linux-aout.h, + i386/linux.h, i386/moss.h, i386/xm-vsta.h: Similarly. + + Wed Jun 5 15:20:58 CEST 2002 Jan Hubicka + + * reg-stack.c (reg_to_stack): Do not call find_basic_blocks. + + 2002-06-05 Alan Modra + + * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Define. + + 2002-06-04 Zack Weinberg + + * gengtype-yacc.y: Make sure all rules end with a semicolon. + + 2002-06-04 Bob Wilson + + * config/xtensa/xtensa.c (xtensa_init_machine_status): Fix + typo in function prototype and include "ggc.h" header. + + 2002-06-04 Richard Henderson + + * config/alpha/alpha.c (mode_mask_operand): Simplify without ifdefs. + (print_operand) ['U']: Likewise. + (alpha_expand_unaligned_store): Correct constants for 32-bit cross. + (alpha_expand_unaligned_store_words): Likewise. + (alpha_expand_builtin_vector_binop): Fix typo. + (enum alpha_builtin, code_for_builtin): Add remaining ext, ins, msk, + umulh, and cix insns. + (one_arg_builtins): Add cix builtins. + (two_arg_builtins): Add ext, ins, msk, umulh builtins. + (alpha_expand_builtin): Fix typo in arity. + * config/alpha/alpha.md (UNSPEC_CTLZ, UNSPEC_CTPOP): New. + (builtin_extbl, builtin_extwl, builtin_extll, builtin_extwh, + builtin_extlh, builtin_insbl, builtin_inswl, builtin_insll, + builtin_insql, builtin_inswh, builtin_inslh, builtin_insqh, + builtin_mskbl, builtin_mskwl, builtin_mskll, builtin_mskql, + builtin_mskwh, builtin_msklh, builtin_mskqh, builtin_cttz, + builtin_ctlz, builtin_ctpop): New. + * doc/extend.texi (Alpha Built-in Functions): Update. + + 2002-06-04 Geoffrey Keating + + * gengtype.c (write_gc_root): Don't unnecessarily prevent + global variable-length arrays being roots. + + * config.gcc (powerpc-*-darwin*): Set config_gtfiles. + * configure.in (config_gtfiles): New variable. + (all_gtfiles): Initialize from config_gtfiles. + * configure: Regenerate. + + 2002-06-04 Neil Booth + + config/i386: + * beos-elf.h, cygwin.h, djgpp.h, gas.h, gnu.h, i386-interix.h, + i386-interix3.h, i386elf.h, linux-aout.h, linux.h, linux64.h, + mingw32.h, netbsd-elf.h, netbsd.h, netbsd64.h, rtemself.h, + sco5.h, sol2.h, sysv3.h, sysv4.h, sysv5.h, uwin.h, vxi386.h, + win32.h (CPP_SPEC): Remove cpp_cpu. + * i386.h (TARGET_CPU_CPP_BUILTINS): Use. + (CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Die! + + 2002-06-04 Janis Johnson + + * config/ia64/ia64.c (gen_thread_pointer): Fix variable name. + + 2002-06-04 Jeff Law + Michael Matz + + * sched-int.h (struct deps): New field libcall_block_tail_insn. + * sched_deps.c (init_deps): Initialize libcall_block_tail_insn. + * sched_deps.c (sched_analyze_insn): If libcall_block_tail_insn + is set, then mark the current insn as being part of a libcall + scheduling group. + (sched_analyze): Set and clear libcall_block_tail_insn appropriately. + + * haifa-sched.c (schedule_block): Do not count USE or CLOBBER + insns against the issue rate. + + Tue Jun 4 19:29:42 CEST 2002 Jan Hubicka + + * cfglayout.c (duplicate_insn_chain): Kill NOTE_INSN_RANGE notes. + * final.c (final_scan_insn): Likewise. + * ggc-common.c (ggc_mark_rtx_children_1): Likewise; use + NOTE_EXPECTED_VALUE instead of NOTE_RANGE. + * haifa-sched.c (unlink_other_notes): Likeewise. + (reemit_notes): Likewise. + * print-rtl.c (print_rtx): Likewise. + * sched-deps (sched-analyze): Likewise. + * rtl.c (note_insn_name): Likewise. + * rtl.h (NOTE_RANGE_INFO, NOTE_LIVE_INFO): Kill. + (enum insn_note): Kill NOTE_INSN_RANGE_*, NOTE_INSN_LIVE. + (RANGE_*): Kill. + + 2002-06-04 Jason Thorpe + + * varasm.c (mark_constants): Handle RTX format 'B'. + + 2002-06-04 Neil Booth + + * cpphash.h (FIRST, LAST, CUR, RLIMIT): New. + (struct cpp_context): Add traditional fields. + * cppmacro.c (paste_all_tokens, push_ptoken_context, + push_token_context, cpp_get_token, _cpp_backup_tokens): Update. + * cpptrad.c (skip_comment, lex_identifier, + _cpp_read_logical_line_trad, scan_out_logical_line): Update. + + 2002-06-04 Kazu Hirata + + * gbl-ctors.h: Fix formatting. + * gcc.c: Likewise. + * gccspec.c: Likewise. + * gcov.c: Likewise. + * gcov-io.h: Likewise. + * gcse.c: Likewise. + * ggc-common.c: Likewise. + * ggc.h: Likewise. + * ggc-page.c: Likewise. + * ggc-simple.c: Likewise. + * global.c: Likewise. + * graph.h: Likewise. + * gthr-dce.h: Likewise. + * gthr.h: Likewise. + * gthr-posix.h: Likewise. + * gthr-rtems.h: Likewise. + * gthr-solaris.h: Likewise. + * gthr-win32.h: Likewise. + + 2002-06-03 Geoffrey Keating + + Merge from pch-branch: + + * gengtype.h (UNION_OR_STRUCT_P): New macro. + * gengtype.c (write_gc_structure_fields): Use it. + (write_gc_root): Use it here too. + + * gengtype.c (write_gc_structure_fields): Assume that lengths + of typenames fit into an 'int'; don't pass a size_t to "%d" in + printf. + (write_gc_marker_routine_for_structure): Likewise. + (write_gc_types): Likewise. + (write_gc_root): Likewise. + + * varray.h (VARRAY_CLEAR): New. + (varray_clear): Prototype. + * varray.c (varray_clear): New. + * cselib.c (reg_values_old): New. + (used_regs_old): New. + (cselib_init): Use cached varrays if available to avoid + generating large amounts of garbage. + (cselib_finish): Don't throw away old varrays. + + * final.c (insn_addresses_): Move out of ifdef. + + * varray.c (uses_ggc): Make more varray kinds GCable. + * varray.h (union varray_data_tag): Let gengtype see + fields 'generic' and 'te'. + * reg-stack.c: Include gt-reg-stack.h, ggc.h. + (stack_regs_mentioned_data): Move out of ifdef; mark with gengtype. + (reg_to_stack): Don't call VARRAY_FREE. + * insn-addr.h (INSN_ADDRESSES_FREE): Don't use VARRAY_FREE. + (insn_addresses_): Use gengtype to mark. + * gengtype.c (write_gc_structure_fields): Handle arrays of generic + pointers; handle generic pointers in unused union fields. + (get_output_file_with_visibility): Include cselib.h, + insn-addr.h in gtype-desc.c. + * function.c (prologue): Use gengtype to mark. + (epilogue): Likewise. + (sibcall_epilogue): Likewise. + * dependence.c: Include gt-dependence.h, ggc.h. + (struct def_use): Use gengtype to mark. + (struct loop): Likewise. + (struct induction): Likewise. + (struct dependence): Likewise. + (def_use_chain): Likewise. + (dep_chain): Likewise. + (loop_chain): Likewise. + (induction_chain): Likewise. + (init_dependence_analysis): Don't free anything, just clear pointers. + (build_def_use): Use GGC to allocate def_use. + (add_loop): Use GGC to allocate loop. + (find_induction_variable): Use GGC to allocate induction. + (check_node_dependence): Use GGC to allocate induction, dependence. + (dump_node_dependence): Don't free varrays. + (end_dependence_analysis): Likewise. + * cselib.h (struct cselib_val_struct): Use gengtype to mark. + (struct elt_loc_list): Likewise. + (struct elt_list): Likewise. + * cselib.c: Don't include obstack.h. + (hash_table): Use gengtype to mark. + (reg_values): Use gengtype to mark. + (used_regs): Use gengtype to mark. + (cselib_obstack): Delete. + (cselib_startobj): Delete. + (empty_vals): Mark as deletable. + (empty_elt_lists): Mark as deletable. + (empty_elt_loc_lists): Mark as deletable. + (new_elt_list): Use GGC to allocate struct elt_list. + (new_elt_loc_list): Use GGC to allocate struct elt_loc_list. + (clear_table): Don't delete obstack; don't unnecessarily clear + deletable variables. + (new_cselib_val): Use GGC to allocate struct cselib_val. + (cselib_init): Don't set up obstacks. Use GGC to allocate + hash table. + (cselib_finish): Just clear variables, don't free anything. + * Makefile.in (cselib.o): Remove dependency on $(OBSTACK_H). + (reg-stack.o): Add dependency on gt-reg-stack.h, $(GGC_H). + (dependence.o): Add dependency on gt-dependence.h, $(GGC_H). + (GTFILES): Add insn-addr.h, cselib.h, dependence.c, reg-stack.c. + (gt-reg-stack.h): New rule. + (gt-dependence.h): New rule. + (gtype-desc.o): Add cselib.h, insn-addr.h. + + * varray.c: Use only necessary headers. + (element_size): New. + (uses_ggc): New. + (varray_init): Take type, not size. Use GGC if appropriate. + (varray_grow): Update for change to struct varray_head_tag. + Use GGC if appropriate. + * varray.h (struct const_equiv_data): Use gengtype. + (enum varray_data_enum): New. + (union varray_data_tag): Use gengtype. + (struct varray_head_tag): Use gengtype. Replace size field with + enum varray_data_enum. + (varray_init): Update prototype. + (VARRAY_SCHED_INIT): Delete. + (VARRAY_*_INIT): Update for change to varray_init. + (VARRAY_SCHED): Delete. + (VARRAY_PUSH_SCHED): Delete. + (VARRAY_TOP_SCHED): Delete. + * tree.h: Update for change to length specifier. + * tree-inline.c (optimize_inline_calls): Don't use VARRAY_FREE. + (clone_body): Likewise. + * ssa.h (ssa_definition): Use gengtype to mark. + * ssa.c (convert_from_ssa): Don't use VARRAY_FREE. + * ssa-dce.c (ssa_eliminate_dead_code): Don't use VARRAY_FREE. + * rtl.h (struct rtvec_def): Update for change to length specifier. + * integrate.c (expand_inline_function): Don't use VARRAY_FREE. + (struct initial_value_struct): Update for change to length specifier. + * ggc.h (ggc_add_rtx_varray_root): Delete prototype. + (ggc_add_tree_varray_root): Delete prototype. + (ggc_mark_rtx_varray): Delete prototype. + (ggc_mark_tree_varray): Delete prototype. + * ggc-common.c (ggc_add_rtx_varray_root): Delete. + (ggc_add_tree_varray_root): Delete. + (ggc_mark_rtx_varray): Delete. + (ggc_mark_tree_varray): Delete. + (ggc_mark_rtx_varray_ptr): Delete. + (ggc_mark_tree_varray_ptr): Delete. + * gengtype.h (enum typekind): Remove TYPE_VARRAY. + (create_varray): Delete prototype. + * gengtype.c (varrays): Delete. + (create_varray): Delete. + (adjust_field_type): Detect array of string pointers. + (process_gc_options): Remove code to handle varray_type option. + (set_gc_used_type): Remove TYPE_VARRAY case. + (output_escaped_param): New. + (write_gc_structure_fields): Use output_escaped_param on all + parameters. Handle 'skip' with 'use_param' option. Handle + arrays of strings. Remove TYPE_VARRAY handling. + (write_gc_roots): Use boolean to detect 'length' option. + * gengtype-yacc.y (VARRAY_TYPE): Delete token. + (struct_fields): Call adjust_field_type on array fields. + (type): Remove VARRAY_TYPE case. + (type_option): Likewise. + * gengtype-lex.l: Don't consider varray_type a keyword. + * function.h: Update for change to length specifier. + (free_eh_status): Delete prototype. + * function.c (free_after_compilation): Don't call free_eh_status. + (reorder_blocks): Don't use VARRAY_FREE. + * except.c (struct eh_status): Update for change to length specifier. + remove varray_type specifier. + (free_eh_status): Delete. + * dwarf2out.c: Include gt-dwarf2out.h. + (used_rtx_varray): Use gengtype to mark, move + outside ifdefs. + (incomplete_types): Likewise. + (decl_scope_table): Likewise. + (dwarf2out_init): Don't call ggc_add_tree_varray_root. + * cfglayout.c (scope_to_insns_finalize): Don't use VARRAY_FREE. + * c-tree.h (struct lang_type): Update for change to length specifier. + * c-parse.in (yylexstring): Don't use VARRAY_FREE. + * c-objc-common.c: Include gt-c-objc-common.h. + (deferred_fns): Mark for gengtype. + (c_objc_common_init): Don't call ggc_add_tree_varray_root. + (expand_deferred_fns): Just set deferred_fns to 0 to free it. + * Makefile.in (c-objc-common.o): Add gt-c-objc-common.h. + (gtype-desc.o): Update dependencies. + (dwarf2out.o): Add gt-dwarf2out.h. + (varray.o): Update dependencies. + (GTFILES): Add varray.h, ssa.h, dwarf2out.c, c-objc-common.c. + (gt-c-objc-common.h): New rule. + (gt-dwarf2out.h): New rule. + * objc/objc-act.c (build_objc_string_object): Don't use VARRAY_FREE. + + * doc/gty.texi (GTY Options): Correct spelling. + (GGC Roots): Likewise. + * Makefile.in (TEXI_CPP_FILES): New. + (TEXI_GCC_FILES): New. + (TEXI_GCCINT_FILES): New. + (TEXI_CPPINT_FILES): New. + ($(docdir)/cpp.info): Use new macros. + ($(docdir)/gcc.info): Likewise. + ($(docdir)/gccint.info): Likewise. + ($(docdir)/cppinternals.info): Likewise. + (cpp.dvi): Likewise. + (gcc.dvi): Likewise. + (gccint.dvi): Likewise. + (cppinternals.dvi): Likewise. + + * Makefile.in ($(docdir)/gccint.info): Depend on gty.texi. + * doc/gccint.texi (Top): Include gty.texi. + * doc/gty.texi: New file. + + * bitmap.c: Include ggc.h, gt-bitmap.h. + (bitmap_ggc_free): New. + (bitmap_elem_to_freelist): New. + (bitmap_element_free): Use bitmap_elem_to_freelist. + (bitmap_element_allocate): Allow use of GGC. + (bitmap_clear): Use bitmap_elem_to_freelist. + (bitmap_copy): Update for change to bitmap_element_allocate. + (bitmap_set_bit): Likewise. + (bitmap_operation): Update for changes elsewhere. + (bitmap_initialize): Allow to create bitmaps that will use GGC. + * bitmap.h (struct bitmap_element_def): Use gengtype. + (struct bitmap_head_def): Likewise. Also add 'using_obstack' field. + (bitmap_initialize): Add extra parameter. + (BITMAP_OBSTACK_ALLOC): Update for change to bitmap_initialize. + (BITMAP_ALLOCA): Delete. + (BITMAP_XMALLOC): Update for change to bitmap_initialize. + (BITMAP_GGC_ALLOC): New. + * Makefile.in (gtype-desc.o): Add bitmap.h. + (bitmap.o): Add gt-bitmap.h, $(GGC_H). + (GTFILES): Add bitmap.c. + (gt-bitmap.h): New rule. + ($(HOST_PREFIX_1)bitmap.o): Add gt-bitmap.h. + * basic-block.h: Update for changes to bitmap_initialize. + * except.c (exception_handler_label_map): Move into... + (struct eh_status): Here. + (struct eh_region): Make 'aka' GCable. + (free_eh_status): Don't need to specially handle + exception_handler_label_map. + (add_ehl_entry): Update for changes to exception_handler_label_map. + (find_exception_handler_labels): Likewise. + (remove_exception_handler_label): Likewise. + (maybe_remove_eh_handler): Likewise. + (for_each_eh_label): Likewise. + (remove_eh_handler): Allocate 'aka' using GGC. + * gengtype.c (get_output_file_with_visibility): Add bitmap.h + to list of includes. + + * gengtype.c (write_gc_marker_routine_for_structure): Name + the routines 'gt_ggc_mx_*' instead of 'gt_ggc_m_*'. + (write_gc_types): Arrange for the tests with NULL to be inlined. + (write_gc_roots): Update uses of procedure pointers. + * ggc-common.c (gt_ggc_mx_rtx_def): Rename from gt_ggc_m_rtx_def. + + * Makefile.in (explow.o): Add dependency on gt-explow.h. + (sdbout.o): Add dependency on gt-sdbout.h. + + * emit-rtl.c (const_int_htab): Use gengtype to clear unused entries. + (mem_attrs_htab): Likewise. + (init_emit_once): Don't call ggc_add_deletable_htab. + * fold-const.c (size_htab): Use gengtype to clear unused entries. + (size_int_type_wide): Don't call ggc_add_deletable_htab. + * gengtype.c (finish_root_table): Add LASTNAME and TNAME + parameters, use them, change callers. + (write_gc_root): Add IF_MARKED parameter, use it, change callers. + (write_gc_roots): Handle 'if_marked' option. + (main): Don't need to call set_gc_used_type any more. + * ggc.h (ggc_htab_marked_p): Delete. + (ggc_htab_mark): Delete. + (struct ggc_cache_tab): New. + (gt_ggc_cache_rtab): New declaration. + * ggc-common.c (struct d_htab_root): Delete. + (d_htab_roots): Delete. + (ggc_add_deletable_htab): Delete. + (ggc_htab_delete): Handle new htab-deleting mechanism. + (ggc_mark_roots): Use new htab-deleting mechanism. + * tree.c (type_hash_table): Use gengtype to clear unused entries. + Make static. + (init_obstacks): Don't call ggc_add_deletable_htab. + + * objc/objc-act.h (struct hashed_attribute): Use gengtype. + (struct hashed_entry): Likewise. + (nst_method_hash_list): Likewise. + (cls_method_hash_list): Likewise. + (HASH_ALLOC_LIST_SIZE): Delete. + (ATTR_ALLOC_LIST_SIZE): Delete. + * objc/objc-act.c (hash_init): Use ggc to allocate + nst_method_hash_list, cls_method_hash_list. + (hash_enter): Use ggc to allocate; allocate one entry at a time. + (hash_add_attr): Likewise. + (ggc_mark_hash_table): Delete. + (objc_act_parse_init): Delete. + (objc_init): Delete reference to objc_act_parse_init. + * tlink.c: Replace hash.h with hashtab.h. Explicitly include + obstack.h. Replace references to 'struct hash_table' with htab_t. + (struct symbol_hash_entry): Replace hash header with key field. + (struct file_hash_entry): Replace hash header with key field. + (struct demangled_hash_entry): Replace hash header with key field. + (hash_string_eq): New. + (hash_string_hash): New. + (symbol_hash_newfunc): Delete. + (symbol_hash_lookup): Modify to use htab_t. + (file_hash_newfunc): Delete. + (file_hash_lookup): Modify to use htab_t. + (demangled_hash_newfunc): Delete. + (demangled_hash_lookup): Modify to use htab_t. + (tlink_init): Modify to use htab_t. + * hash.h: Delete. + * hash.c: Delete. + * ggc.h: Delete forward structure declarations. + Delete prototypes for deleted functions. + * ggc-common.c: Don't include hash.h. + (ggc_add_tree_hash_table_root): Delete. + (ggc_mark_tree_hash_table_entry): Delete. + (ggc_mark_tree_hash_table): Delete. + (ggc_mark_tree_hash_table_ptr): Delete. + * gengtype.c (write_gc_structure_fields): Allow param_is option. + (write_gc_marker_routine_for_structure): Use visibility of + the parameter if there is one. + * function.c: Replace hash.h with hashtab.h. Replace references + to 'struct hash_table *' with htab_t. + (struct insns_for_mem_entry): Include a plain key. + (fixup_var_refs_insns_with_hash): Update to use htab_t. + (insns_for_mem_newfunc): Delete. + (insns_for_mem_hash): Update to use htab_t. + (insns_for_mem_comp): Likewise. + (insns_for_mem_walk): Likewise. + * c-lang.c: Include ggc.h. + * Makefile.in (OBJS): Remove hash.o. + (c-lang.o): Add GGC_H. + (COLLECT2_OBJS): Remove hash.o. + (tlink.o): Remove hash.h, add HASHTAB_H and OBSTACK_H. + (ggc-common.o): Remove hash.h. + (function.o): Remove hash.h, add HASHTAB_H. + (genautomata.o): Remove hash.h, add HASHTAB_H. + + * varasm.c (mark_const_str_htab_1): Delete. + (mark_const_str_htab): Delete. + (const_str_htab_del): Delete. + (const_str_htab): Use gengtype to mark. + (init_varasm_once): Use gengtype to mark hashtables. Use GC to + allocate them. + * tree.c (mark_tree_hashtable_entry): Delete. + (mark_tree_hashtable): Delete. + * tree.h (mark_tree_hashtable): Delete prototype. + * ggc.h (ggc_test_and_set_mark): Treat (void *)1 like NULL. + (ggc_mark): Likewise. + (ggc_calloc): New. + (htab_create_ggc): New. + * ggc-common.c (ggc_calloc): New. + * gengtype.h (enum typekind): Add TYPE_PARAM_STRUCT. + (struct type): Add param_struct structure. + * gengtype.c (param_structs): New. + (adjust_field_type): Handle param_is option. + (set_gc_used_type): Handle TYPE_PARAM_STRUCT. + (get_output_file_with_visibility): Include hashtab.h in gtype-desc.c. + (write_gc_structure_fields): Add new PARAM parameter. Update + callers. Handle use_param option. Handle TYPE_PARAM_STRUCT. + (write_gc_marker_routine_for_structure): Add new PARAM parameter. + Use it to generate function name. Update callers. + (write_gc_types): Add new PARAM_STRUCTS parameter. Update callers. + Process them. + (write_gc_roots): Handle TYPE_PARAM_STRUCT. Allow param_is + option. + (main): Define PTR as pointer-to-scalar. Don't specially + mark deferred_string or ehl_map_entry. + * gengtype-yacc.y (PARAM_IS): Add new token. + (externstatic): Use adjust_field_type. + (type_option): Add PARAM_IS. + * gengtype-lex.l: Add rule for typedef of function pointers. + Add rule for PARAM_IS. + (IWORD): Add size_t. + * except.c (exception_handler_label_map): Use gengtype to mark. + (type_to_runtime_map): Likewise. + (mark_ehl_map_entry): Delete. + (mark_ehl_map): Delete. + (init_eh): Use gengtype for roots; use GC to allocate hash tables. + (t2r_mark_1): Delete. + (t2r_mark): Delete. + * Makefile.in (gtype-desc.o): Correct dependencies. + (GTFILES): Add hashtab.h. + (genautomata.o): Actually uses hashtab.h. + + * Makefile.in (stringpool.o): Add $(GGC_H). + (dwarf2asm.o): Likewise. + (GTFILES): Add hashtable.h. + * c-common.h (struct c_common_identifier): Use gengtype. + * c-decl.h (c_mark_tree): Delete. + * c-lang.c (LANG_HOOKS_MARK_TREE): Delete. + * c-tree.h (struct lang_identifier): Use gengtype. + (union lang_tree_node): New. + (c_mark_tree): Delete prototype. + * dwarf2out.c [!DWARF2_DEBUGGING_INFO]: Define dummy + dwarf2_debug_hooks. + * gengtype-lex.l (IWORD): Allow 'bool'. + (ptr_alias): Match. + * gengtype-yacc.y (ALIAS): New token. + (type_option): New rule. + (option): Use type_option. + * gengtype.c (process_gc_options): New. + (set_gc_used_type): Use it. + (write_gc_structure_fields): Add 'bitmap' parameter, change callers. + Add new variable 't' to hold the type of the field being processed. + Add more error checking. Use UNION_P when looking at 'desc' option. + Handle language-specific structures containing other + language-specific structures. + (write_gc_types): Handle 'ptr_alias' option. + (main): Don't need to specially output lang_type, lang_decl, lang_id2. + * ggc-common.c (ggc_pending_trees): Delete. + (ggc_mark_roots): Don't manipulate ggc_pending_trees. + (ggc_mark_trees): Delete. + (gt_ggc_m_tree_node): Delete. + * ggc.h (ggc_pending_trees): Delete. + (ggc_mark_tree): Make alias of gt_ggc_m_tree_node. + * hashtable.h (ht_identifier): Use gengtype. + * langhooks-def.h (LANG_HOOKS_MARK_TREE): Delete. + * langhooks.h (struct lang_hooks): Delete mark_tree. + * sdbout.c [! SDB_DEBUGGING_INFO]: Define dummy sdb_debug_hooks + anyway. + * system.h: Poison LANG_HOOKS_MARK_TREE. + * tree.c (tree_node_structure): New. + * tree.h (struct tree_common): Use gengtype. + (struct tree_int_cst): Likewise. + (struct tree_real_cst): Likewise. + (struct tree_string): Likewise. + (struct tree_complex): Likewise. + (struct tree_vector): Likewise. + (struct tree_identifier): Likewise. + (struct tree_list): Likewise. + (struct tree_vec): Likewise. + (struct tree_exp): Likewise. + (struct tree_block): Likewise. + (struct tree_type): Likewise. + (struct tree_decl): Likewise. + (enum tree_structure_enum): New. + (union tree_node): Use gengtype, with an alias. + (tree_node_structure): Prototype. + * objc/objc-lang.c (LANG_HOOKS_MARK_TREE): Delete. + + Merge to tag pch-merge-20020430. The LANG_HOOKS_FUNCTION_MARK + macro was deleted. The LANG_HOOKS_FUNCTION_FREE macro was renamed + to LANG_HOOKS_FUNCTION_FINAL. + * Makefile.in (GTFILES): Add bitmap.h. + * except.c (struct eh_region): Mark field 'aka' to be skipped. + + * config/alpha/alpha.c [TARGET_ABI_UNICOSMK] + (alpha_init_machine_status): Give proper type. + * Makefile.in (c-lang.o): Depend on gtype-c.h. + (optabs.o): Depend on gt-optabs.h. + (GTFILES): Add optabs.o. + (gt-optabs.h): Add rule. + * optabs.c: Include gt-optabs.h. + + * gengtype.c (set_gc_used_type): Correct some errors in last change. + (write_gc_structure_fields): If a field which should be NULL is + not, abort. + * c-pragma.c: Move struct align_stack and variable alignment_stack + out from the ifdef. + + * config/xtensa/t-xtensa: Add dependencies for gt-xtensa.h. + * config/xtensa/xtensa.c: Include gt-cris.h. + (struct machine_function): Use gengtype to mark. + * config/mmix/mmix.h (struct machine_function): Use gengtype + to mark. + * config/cris/t-cris: Add dependencies for gt-cris.h. + * config/cris/cris.c: Include gt-cris.h. + (struct machine_function): Use gengtype to mark. + * config/rs6000/rs6000.h (struct machine_function): Use gengtype + to mark. + * doc/tm.texi (Per-Function Data): Delete references to + mark_machine_status. + * config/ia64/ia64.c (ia64_override_options): Don't set + mark_machine_status. + * config/i386/i386.c (override_options): Likewise. + * config/d30v/d30v.c (d30v_init_expanders): Likewise. + * config/arm/arm.c (arm_init_expanders): Likewise. + * config/alpha/alpha.c (override_options): Likewise. + * gengtype.h (enum gc_used_enum): Add GC_MAYBE_POINTED_TO. + * gengtype.c (set_gc_used_type): Handle 'maybe_null' option. + (write_gc_structure_fields): Don't handle 'really' option. + Handle 'maybe_null' option. + (write_gc_types): Handle 'maybe_null' option. + * function.h (struct function): Don't use "really". + (mark_machine_status): Delete declaration. + (mark_lang_status): Delete declaration. + (gt_ggc_mr_machine_function): Delete prototype. + (gt_ggc_mr_language_function): Delete prototype. + * function.c (mark_machine_status): Delete. + (mark_lang_status): Delete. + (gt_ggc_mr_machine_function): Delete. + (gt_ggc_mr_language_function): Delete. + * c-tree.h (mark_c_function_context): Delete prototype. + * c-objc-common.c (c_objc_common_init): Don't set mark_lang_status. + * c-decl.c (struct language_function): Rename from struct + c_language_function. Update uses. Use gengtype to mark. + (mark_c_function_context): Delete. + * c-common.h (struct c_language_function): Rename from struct + language_function. + (mark_stmt_tree): Delete prototype. + (c_mark_lang_decl): Delete prototype. + (mark_c_language_function): Delete prototype. + * c-common.c (mark_stmt_tree): Delete. + (c_mark_lang_decl): Delete. + (mark_c_language_function): Delete. + + * gengtype.h (enum typekind): Add TYPE_LANG_STRUCT. + (lang_bitmap): New typedef. Use where appropriate. + (struct type): Add gc_used field, lang_struct field. + (UNION_P): New macro. + (new_structure): New prototype. + (find_structure): Remove 'pos' parameter. Change all callers. + * gengtype-lex.l: Update for changes to find_structure. + * gengtype-yacc.y (typedef_struct): Use new_structure. + (yacc_ids): Suppress warning. + (type): Use new_structure. + * gengtype.c (string_type): Update for changes to struct type. + (find_structure): Just find a structure, don't worry about + creating one. + (new_structure): New. + (note_yacc_type): Use new_structure. + (set_gc_used_type): New. + (set_gc_used): New. + (write_gc_structure_fields): Allow for pointers to TYPE_LANG_STRUCT. + (write_gc_types): Handle TYPE_LANG_STRUCT. + (write_gc_marker_routine_for_structure): New. + (main): Call set_gc_used. Add some calls to set_gc_used_type + for places where GCC doesn't use gengtype properly yet. + * ggc.h (gt_ggc_m_rtx_def): Don't prototype. + (gt_ggc_m_tree_node): Likewise. + + * varasm.c (copy_constant): Call expand_constant if we hit + something we can't recognize. + + * ggc-common.c (ggc_mark_rtvec_children): Delete. + (ggc_mark_rtx_children): Use generic name for ggc_mark_rtvec. + (lang_mark_false_label_stack): Delete. + * rtl.h (struct rtvec_def): Use gengtype to mark. + * ggc.h (ggc_mark_rtvec): Delete. + (gt_ggc_m_rtvec_def): Delete. + (ggc_mark_nonnull_tree): Delete. + (ggc_mark_rtvec_children): Delete prototype. + (lang_mark_false_label_stack): Delete declaration. + + * gengtype.h (note_yacc_type): Add prototype. + * gengtype.c (note_yacc_type): New function. + * gengtype-lex.l: Add lexer support for yacc files. + * gengtype-yacc.y (start): Extract union from yacc files. + (yacc_union): New rule. + (yacc_typematch): New rule. + (yacc_ids): New rule. + (enum_items): Tweak for efficiency. + (optionseq): Likewise. + + * c-common.h (struct language_function): Use gengtype. + (struct c_lang_decl): Likewise. + * c-tree.h (struct lang_decl): Likewise. + (struct lang_type): Likewise. + * c-decl.c (lang_mark_tree): Use generated marker routines to mark + tree language substructures. + + * stringpool.c (mark_ident): Replace ggc_mark_nonnull_tree with + ggc_mark_tree. + * dwarf2asm.c (mark_indirect_pool_entry): Likewise. + + * varasm.c (struct rtx_const): Remove 'skip' tags for scalar arrays. + + * stmt.c (struct nesting): Add discriminator. Use gengtype to + mark. Remove 'data.block.cleanup_ptr' field. + (struct stmt_status): Use usual technique to mark struct nesting. + (gt_ggc_mr_nesting_cond): Delete. + (gt_ggc_mr_nesting_loop): Delete. + (gt_ggc_mr_nesting_block): Delete. + (gt_ggc_mr_nesting_case_stmt): Delete. + (expand_start_cond): Set discriminator. + (expand_start_loop): Likewise. + (expand_start_null_loop): Likewise. + (expand_start_bindings_and_block): Set discriminator. Don't set + deleted fields. + (expand_decl_cleanup): Replace 'cleanup_ptr' with + &thisblock->data.block.cleanups. + (expand_start_case): Set discriminator. + (expand_start_case_dummy): Set discriminator. + + * ggc-callbacks.c: Remove. + + * gengtype.h (struct type): Add 'u.s.bitmap' field. + (find_structure): Add 'pos' parameter. + * gengtype-lex.l: Update callers to find_structure. + * gengtype-yacc.y: Likewise. + * gengtype.c (find_structure): Allow for structures to be defined + in multiple language backends. + (get_output_file_with_visibility): Include debug.h in gtype-desc.c. + (counter): Rename to gc_counter. + (write_gc_structure_fields): Fail when writing out fields for + an incomplete structure. Ignore arrays of scalars. Handle + 'tree_vec' special. + (write_gc_types): Reset counter for each procedure written. + + * stmt.c (add_case_node): Use GGC to allocate struct case_node. + (free_case_nodes): Delete. + (expand_end_case_type): Delete call to free_case_nodes. + + * Makefile.in (cselib.o): Include gt-.h. + (gcse.o): Likewise. + (profile.o): Likewise. + (alias.o): Likewise. + (GTFILES): Add alias.c, cselib.c, gcse.c, profile.c, and + alphabetize backend files. + (gt-alias.h, gt-cselib.h, gt-gcse.h, gt-profile.h): New rules. + * alias.c: Use gengtype for roots. + * c-common.h (struct stmt_tree_s): Use gengtype. + * c-decl.c: Use gengtype for roots. + * cselib.c: Use gengtype for roots. + * expr.c: Use gengtype for roots. + * fold-const.c: Use gengtype for roots. + * gcse.c: Use gengtype for roots. + * gengtype-lex.l: Handle typedefs of function types. + Allow for empty array bounds. + Allow processing to stop on initializers. + * gengtype-yacc.y (externstatic): Stop processing on initializers. + (semiequal): New rule. + * gengtype.c (create_file): Tidy output files. + (get_output_file_with_visibility): Fix paren warning. Fix bug + involving multiple input files mapping to one output file. + (write_gc_structure_fields): Skip arrays of scalars. + (write_gc_types): Tidy output files. + (write_gc_root): New function. + (write_gc_roots): Fix bugs, add support for roots that are + structures. + * ggc-common.c (ggc_mark_rtx_ptr): Delete. + (ggc_mark_tree_ptr): Delete. + (ggc_add_rtx_root): Delete. + (ggc_add_tree_root): Delete. + (ggc_del_root): Delete. + * integrate.c (get_func_hard_reg_initial_val): Use ggc_alloc to + allocate struct initial_value_struct. + * profile.c: Use gengtype for roots. + * sdbout.c: Use gengtype for roots. + * varasm.c (mark_weak_decls): Delete unused prototype. + (mark_const_hash_entry): Delete unused function. + * config/darwin-protos.h: Use gengtype for roots. + (machopic_add_gc_roots): Delete. + * config/arm/arm.c: Use gengtype for roots. + * config/arm/arm.h: Use gengtype for roots. + * config/c4x/c4x-protos.h: Use gengtype for roots. + * config/c4x/c4x.c (c4x_add_gc_roots): Delete. + * config/d30v/d30v-protos.h: Use gengtype for roots. + * config/d30v/d30v.c (d30v_add_gc_roots): Delete. + * config/dsp16xx/dsp16xx.c (override_options): Use gengtype for roots. + * config/dsp16xx/dsp16xx.h: Use gengtype for roots. + * config/ia64/ia64-protos.h: Use gengtype for roots. + * config/ia64/ia64.c (ia64_add_gc_roots): Delete. + * config/m68hc11/m68hc11-protos.h: Use gengtype for roots. + * config/m68hc11/m68hc11.c (z_reg): Make global. + (z_reg_qi): Make global. + (m68hc11_add_gc_roots): Delete. + * config/mcore/mcore-protos.h: Use gengtype for roots. + * config/mcore/mcore.c (mcore_add_gc_roots): Delete. + * config/mips/mips.c (mips_add_gc_roots): Delete. + * config/mips/mips.h: Use gengtype for roots. + * config/mmix/mmix.c (override_options): Use gengtype for roots. + * config/mmix/mmix.h: Use gengtype for roots. + * config/mn10200/mn10200.c (asm_file_start): Use gengtype for roots. + * config/mn10200/mn10200.h: Use gengtype for roots. + * config/pa/pa.c: Use gengtype for roots, marking. + (struct deferred_plabel): Use GGC, gengtype. + (pa_add_gc_roots): Delete. + (mark_deferred_plabels): Delete. + * config/pj/pj-protos.h: Use gengtype for roots. + * config/pj/pj.h (OVERRIDE_OPTIONS): Don't define. + * config/rs6000/rs6000.c: Use gengtype for roots. Don't call + machopic_add_gc_roots. + * config/rs6000/rs6000.h: Use gengtype for roots. + * config/rs6000/t-darwin (darwin.o): Add dependency on gt-darwin.h. + (gt-darwin.h): Add rule. + * config/sh/sh.c: Use gengtype for roots. + * config/sh/t-sh ($(out_object_file)): Add dependency on gt-sh.h. + (gt-sh.h): Add rule. + * config/sparc/sparc.c: Use gengtype for roots. + (sparc_add_gc_roots): Delete. + (struct ultrasparc_pipeline_state): Use GGC, gengtype. + (mark_ultrasparc_pipeline_state): Delete. + * config/sparc/sparc.h: Use gengtype for roots. + + * Makefile.in (c-parse.o): Update dependencies. + (c-common.o): Likewise. + (GTFILES): Add c-common.h, c-tree.h, c-common.c, c-parse.in. + Add dependencies for the files they generate. + * c-common.c: Replace ggc_add_* uses with GTY annotations. + * c-common.h: Likewise. + * c-decl.c: Likewise. + (gt_ggc_mp_binding_level): Delete. + * c-lang.c: Include gtype-c.h. + * c-parse.in: Replace ggc_add_* uses with GTY annotations. Include + gt-c-parse.h. + * c-pragma.h: Replace ggc_add_* uses with GTY annotations. + (gt_ggc_mp_align_stack): Delete. + * c-tree.h: Replace ggc_add_* uses with GTY annotations. + * function.c: Replace ggc_add_* uses with GTY annotations. + (gt_ggc_mp_function): Delete. + * function.h: Replace ggc_add_* uses with GTY annotations. + * gengtype.c (lang_names): New. + (NUM_BASE_FILES): New. + (open_base_files): Create language base files. + (startswith): New. + (get_file_basename): New. + (get_base_file_bitmap): New. + (get_output_file_with_visibility): Rename from get_output_file. + Add more mappings for various C/Objc filenames. + (finish_root_table): New. + (write_gc_roots): Handle dependencies and scoping properly. + * gengtype.h: Add prototypes for new functions. + * ggc-common.c (struct deletable_root): Delete. + (deletables): Delete. + (ggc_add_deletable_root): Delete. + (ggc_mark_roots): No need to deal with deleted functionality. + * ggc.h (ggc_add_deletable_root): Delete prototype. + * objc/Make-lang.in (objc-act.o): Add gtype-objc.h dependency. + (gtype-objc.h): Add rule to create. + * objc/config-lang.in (gtfiles): New. + * objc/objc-act.c: Allocate imp_list using GGC. Replace uses of + ggc_add_* with GTY markers. Include gtype-objc.h. + (ggc_mark_imp_list): Delete. + * objc/objc-act.h: Replace uses of ggc_add_* with GTY markers. + * objc/objc-lang.c: Random Whitespace Change. + + * except.h (exception_handler_labels): Delete. + (get_exception_handler_labels): New. + * except.c (exception_handler_labels): Delete. + (struct eh_status): Add exception_handler_labels field. + (doing_eh): Don't add exception_handler_labels as root. + (free_eh_status): Don't need to free exception_handler_labels. + (get_exception_handler_labels): New. + (find_exception_handler_labels): Update for move of + exception_handler_labels. + (remove_exception_handler_label): Likewise. + * cfgrtl.c (can_delete_label_p): Use get_exception_handler_labels. + * jump.c (rebuild_jump_labels): Likewise. + * loop.c (find_and_verify_loops): Likewise. + * sched-rgn.c (is_cfg_nonregular): Likewise. + + * gengtype.c (write_gc_structure_fields): Handle variable-length + TYPE_ARRAYs. + + * varasm.c (struct weak_syms): Use GGC, gengtype. + (mark_weak_decls): Delete. + (weak_decls): Likewise. + (add_weak): Likewise. + (remove_from_pending_weak_list): Likewise. + (init_varasm_once): Likewise. + + * Makefile.in (gtype-desc.o): Add libfuncs.h dependency. + (GTFILES): Add tree.h, libfuncs.h, emit-rtl.c, explow.c, + stor-layout.c, regclass.c, and lists.c. + Add dependencies of gt-emit-rtl.h gt-explow.h gt-stor-layout.h + gt-regclass.h and gt-lists.h on s-gtype. + * emit-rtl.c: Use gengtype for roots. Include gt-emit-rtl.h. + * except.c: Use gengtype for roots. + * explow.c: Use gengtype for roots. Include gt-explow.h. + * expr.h (init_stor_layout_once): Delete prototype. + * function.c: Use gengtype for roots. + * gengtype-lex.l: Add ENT_EXTERNSTATIC lexing. + * gengtype-yacc.y (start): Can also be an externstatic. + (externstatic): New production. + (struct_fields): Correct array bounds inversion for 2-d arrays. + * gengtype.c (variables): New variable. + (note_variable): New function. + (get_output_file): Include libfuncs.h into gtype-desc.c. + (get_output_file_name): New function. + (write_gc_structure_fields): Suppress warnings. + (write_gc_types): Make static. + (put_mangled_filename): New function. + (write_gc_roots): New function. + (main): Call write_gc_roots. + * gengtype.h (note_variable): Prototype. + (get_output_file_name): Prototype. + (write_gc_types): Delete prototype. + * ggc.h: Clean up unnecessary structure predefinitions. + (struct ggc_root_tab): Define. + (gt_ggc_m_rtx_def): Make function, not macro. + (gt_ggc_m_tree_node): Likewise. + * libfuncs.h: Use gengtype for roots. + * lists.c: Use gengtype for roots. Include gt-lists.h. + (init_EXPR_INSN_LIST_cache): Delete. + * optabs.c: Use gengtype for roots. + (gt_ggc_mp_optab): Delete. + * optabs.h: Use gengtype for roots. + * regclass.c: Use gengtype for roots. Include gt-regclass.h. + * rtl.h: Use gengtype for roots. + (init_EXPR_INSN_LIST_cache): Delete prototype. + * stor-layout.c: Use gengtype for roots. + Include gt-stor-layout.h. + (init_stor_layout_once): Delete. + * toplev.c: Use gengtype for roots. Delete calls to deleted + routines. + * tree.c: Use gengtype for roots. + * tree.h: Use gengtype for roots. + * varasm.c: Use gengtype for roots. + + * Makefile.in (GTFILES): Add @all_gtfiles@. + * configure: Regenerate. + * configure.in: Construct all_gtfiles from the gtfiles definitions + in config-lang.in. + * gengtype-yacc.y (type): Warn about duplicate structure names. + * gengtype.c (get_output_file): Handle .c files in language + subdirectories. + + * Makefile.in (GTFILES): Run gengtype on all the config files + and on the target .c file. + * except.c (mark_eh_region): Delete. + (init_eh_for_function): Use GGC on struct eh_status. + (mark_eh_status): Delete. + (free_eh_status): Use GGC. + (expand_eh_region_start): Use GGC to + (collect_eh_region_array): Allocate last_region_number using GGC. + (duplicate_eh_region_1): Use GGC to allocate struct eh_region. + (remove_eh_handler): Let GGC free struct eh_region. + (add_call_site): Use GGC to reallocate call_site_record array. + * function.c (init_machine_status): Update calling sequence. + (mark_machine_status): Likewise. + (mark_lang_status): Likewise. + (prepare_function_start): Update init_machine_status call. + (mark_function_status): Delete. + (maybe_mark_struct_function): Delete. + (ggc_mark_struct_function): Delete. + (gt_ggc_mp_function): New. + (gt_ggc_mr_machine_function): New. + (gt_ggc_mr_language_function): New. + (init_function_once): Use canonical names. + * function.h (struct function): Use gengtype. + (init_machine_status): Return the structure. + (mark_machine_status): Take a 'void *'. + (mark_lang_status): Likewise. + * ggc-common.c (ggc_mark_trees): Use canonical name for + ggc_mark_struct_function. + * tree.h (ggc_mark_struct_function): Delete prototype. + * config/alpha/alpha.c (alpha_mark_machine_status): Delete. + (alpha_init_machine_status): Likewise. + (override_options): Use canonical name for alpha_mark_machine_status. + * config/alpha/unicosmk.h (struct machine_function): Use gengtype. + * config/arm/arm.h (struct machine_function): Use gengtype. + * config/arm/arm.c (arm_mark_machine_status): Delete. + (arm_init_machine_status): Update calling sequence. + (arm_init_expanders): Use canonical name for arm_mark_machine_status. + * config/cris/cris.c (cris_init_machine_status): Update + calling sequence. + * config/d30v/d30v.h (struct machine_function): Use gengtype. + * config/d30v/d30v.c (d30v_init_machine_status): Update + calling sequence. + (d30v_mark_machine_status): Delete. + * config/i386/i386.c: Include gt-i386.h. + (struct machine_function): Use gengtype. + (ix86_init_machine_status): Update calling sequence. + (ix86_mark_machine_status): Delete. + (override_options): Use canonical namke for ix86_mark_machine_status. + * config/ia64/ia64.h (struct machine_function): Use gengtype. + * config/ia64/ia64.c (ia64_init_machine_status): Update calling + sequence. + (ia64_mark_machine_status): Delete. + (ia64_override_options): Use canonical name for + ia64_mark_machine_status. + * config/mmix/mmix.c (mmix_init_machine_status): Update calling + sequence. + * config/rs6000/rs6000.c (rs6000_init_machine_status): Likewise. + * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. + * gengtype.c (get_output_file): Fix warning. + (main): Add prototype to suppress warning. + * tree.c: Remove tree_hash_mark prototype. + + * tree.h (init_stmt): Delete prototype. + * toplev.c (lang_independent_init): Don't call init_stmt. + * stmt.c (ALLOC_NESTING): Use GGC for 'struct nesting'. + (stmt_obstack): Delete. + (POPSTACK): No need to free 'struct nesting'. + (gt_ggc_mr_nesting_cond): Use canonical names. + (gt_ggc_mr_nesting_loop): Use canonical names. + (gt_ggc_mr_nesting_block): Use canonical names. + (gt_ggc_mr_nesting_case_stmt): Use canonical names. + (mark_stmt_status): Delete. + (init_stmt): Delete. + (clear_last_expr): Clear both last_expr_type and last_expr_value. + Use it everywhere that last_expr_type was cleared. + * lists.c (init_EXPR_INSN_LIST_cache): Use ggc_add_deletable_root. + (zap_lists): Delete. + * ggc.h (ggc_add_deletable_root): Prototype. + (mark_stmt_status): Remove prototype. + * ggc-common.c (ggc_add_deletable_root): New. + (ggc_mark_roots): Handle deletable roots. + * function.c (ggc_mark_struct_function): Use canonical name + for mark_stmt_status. + * emit-rtl.c (free_sequence_stack): New. + (start_sequence): Use a freelist for sequences. + (end_sequence): Likewise. + (init_emit_once): Add free_sequence_stack as a deleteable root. + * c-pragma.c Include gt-c-pragma.h. + (struct align_stack): Use gengtype. + (push_alignment): Use GGC for struct align_stack. + (mark_align_stack): Delete. + (gt_ggc_mp_align_stack): New. + (init_pragma): Use canonical name for mark_align_stack. + * c-decl.c: Include gt-c-decl.h. + (struct binding_level): Use gengtype. + (make_binding_level): Use GGC; handle the freelist here. + (pop_binding_level): New. + (pushlevel): Move code into make_binding_level. + (push_label_level): Likewise. + (poplevel): Move code into pop_binding_level. + (pop_label_level): Likewise. + (mark_binding_level): Delete. + (gt_ggc_mp_binding_level): New. + (c_init_decl_processing): Use canonical name for mark_binding_level. + Add free_binding_level as deletable root. + (mark_c_function_context): Use canonical name for mark_binding_level. + * Makefile.in (c-decl.o): Add gt-c-decl.h. + (c-pragma.o): Add gt-c-pragma.h. + (GTFILES): Add c-decl.c and c-pragma.c. + (gt-c-decl.h, gt-c-pragma.h): Create using gengtype. + + * tree.c (struct type_hash): Use gengtype. + (init_obstacks): Use canonical name for type_hash_mark. + (type_hash_mark): Delete. + Include gt-tree.h. + * rtl.h (struct mem_attrs): Use gengtype. + * optabs.h (struct optab): Use gengtype. + * optabs.c (expand_binop): Squish signed/unsigned warning. + (mark_optab): Make local, use canonical name, use autogenerated + marker procedure. + (init_optabs): Use canonical name for mark_optab. + (new_optab): Use GGC to allocate optabs. + * ggc.h: Delete mark_optab prototype. + * ggc-common.c (ggc_mark_rtx_children): Use canonical name for + mem_attrs marker procedure. + * gengtype.c (get_output_file): Include headers in gtype-desc.c + explicitly rather than deducing them from file names. + (write_gc_structure_fields): Handle arrays of structures. + (main): Return nonzero exit code if errors occur during output. + * emit-rtl.c (mem_attrs_mark): Delete. + (init_emit_once): Use canonical name for mem_attrs marker procedure. + * Makefile.in (gtype-desc.o): Explicitly name dependencies. + (tree.o): Depend on gt-tree.h. + (GTFILES): Add rtl.h, optabs.h, tree.c. + (gt-tree.h): Add it to s-gtype rule. + + * .cvsignore: Ignore gengtype flex/bison generated files. + * Makefile.in (GGC_H): Add gtype-desc.h. + (OBJS): Add gtype-desc.o. + (GEN): Add gengtype. + (STAGESTUFF): Add gengtype. + (varasm.o): Add gt-varasm.h. + (stmt.o): Add gt-stmt.h. + (except.o): Add gt-except.h. + (integrate.o): Add gt-integrate.h. + (GTFILES): New. + Add new rules for new files. + * configure: Regenerate. + * configure.in: Correct defaults.h paths. + * emit-rtl.c (mark_sequence_stack): Delete. + (mark_emit_status): Delete. + (start_sequence): Allocate sequence structures using GGC. + (end_sequence): Allocate sequence structures using GGC. + * except.c: Use gengtype for various structures. Include + gt-except.h. + * expr.c (mark_expr_status): Delete. + * function.c: Use gengtype for various structures. Include + gt-function.h. + (mark_function_status): Use standard gt_ggc names for marker functions. + (ggc_mark_struct_function): Likewise. + * function.h: Use gengtype for various structures. + * gengtype-lex.l: New file. + * gengtype-yacc.y: New file. + * gengtype.c: New file. + * gengtype.h: New file. + * ggc.h: Include gtype-desc.h. Alias some marker procedures to + the standard names. Remove some now-unnecessary prototypes. + * integrate.c: Use gengtype for various structures. Include + gt-integrate.h. + (mark_hard_reg_initial_vals): Delete. + * integrate.h (mark_hard_reg_initial_vals): Delete. + * stmt.c: Use gengtype for various structures. Include + gt-stmt.h. + (mark_case_node): Delete. + (mark_goto_fixup): Delete. + (mark_stmt_status): Use standard gt_ggc names for marker functions. + * system.h: Define GTY to empty. In flex/bison files, + don't poison malloc or realloc, instead just define them to + xmalloc and xrealloc. + * varasm.c: Use gengtype for various structures. Include + gt-varasm.h. Use standard gt_ggc names for marker functions. + (mark_pool_constant): Delete. + (mark_varasm_status): Delete. + (decode_rtx_const): #if 0 out non-typesafe hack. + + * function.h (free_lang_status): Mark as obsolete. + * function.c (free_lang_status): Mark as obsolete. + * c-decl.c (push_c_function_context): Use GC to allocate and free + struct language_function. + (pop_c_function_context): Likewise. + * c-common.c (mark_c_language_function): Mark struct + language_function. + + * doc/tm.texi (Per-Function Data): Don't document free_machine_status. + Document that the machine_function structures must be allocated + using GC. Update mark_machine_status documentation. + * function.h: Don't declare free_machine_status. + * function.c (free_machine_status): Don't define. + (free_after_compilation): Don't call free_machine_status. + (ggc_mark_struct_function): Mark f->machine. Call + mark_machine_status only on non-NULL pointers. + * system.h: Poison free_machine_status. + * config/xtensa/xtensa.c (xtensa_init_machine_status): Use GC on + struct machine_function. + (xtensa_free_machine_status): Delete. + (override_options): Don't set free_machine_status. + * config/rs6000/rs6000.c (rs6000_override_options): Don't set + free_machine_status. + (rs6000_init_machine_status): Use GC on struct machine_function. + (rs6000_free_machine_status): Delete. + * config/ia64/ia64.c (ia64_init_machine_status): Use GC on struct + machine_function. + (ia64_mark_machine_status): Likewise. + (ia64_free_machine_status): Delete. + (ia64_override_options): Don't set free_machine_status. + * config/i386/i386.c (override_options): Don't set + free_machine_status. + (ix86_init_machine_status): Use GC on struct machine_function. + (ix86_mark_machine_status): Likewise. + (ix86_free_machine_status): Delete. + * config/d30v/d30v.c: (d30v_init_machine_status): Use GC on struct + machine_function. + (d30v_mark_machine_status): Likewise. + (d30v_free_machine_status): Delete. + (d30v_init_expanders): Don't set free_machine_status. + * config/arm/arm.c (arm_mark_machine_status): Use GC on struct + machine_function. + (arm_init_machine_status): Likewise. + (arm_free_machine_status): Delete. + (arm_init_expanders): Don't set free_machine_status. + * config/alpha/alpha.c (override_options): Don't set + free_machine_status. + (alpha_init_machine_status): Use GC on struct machine_function. + (alpha_mark_machine_status): Likewise. + (alpha_free_machine_status): Delete. + + * varasm.c (compare_constant): Fix typo. + + * varasm.c: Don't include obstack.h. + (struct varasm_status): x_const_rtx_hash_table is a hash of rtxes. + (struct rtx_const): Give substructures names, improve formatting. + (struct constant_descriptor): Delete. + (struct constant_descriptor_tree): New, based on constant_descriptor. + (const_hash_table): Is a hash table of trees. + (mark_const_hash_entry): Is used for hashes of trees. Mark + constant_descriptor_tree structure. + (mark_const_str_htab_1): Mark deferred_string structure. + (compare_constant): Rewrite to compare trees. + (compare_constant_1): Delete. + (record_constant): Delete. + (record_constant_1): Delete. + (output_constant_def): Use struct constant_descriptor_tree. + Don't duplicate trees twice. + (struct constant_descriptor_rtx): New. + (struct pool_constant): Used for rtx constants. + (init_varasm_status): Update for change to struct varasm_status. + (mark_varasm_status): Likewise. + (free_varasm_status): Delete. + (compare_constant_rtx): Rewrite to handle constant_descriptor_rtx. + (record_constant_rtx): Likewise. + (mem_for_const_double): Update to use struct constant_descriptor_rtx. + (force_const_mem): Likewise. + * Makefile.in (varasm.o): Doesn't depend on obstack.h. + * function.c (free_after_compilation): Don't use free_varasm_status. + * function.h: Don't prototype free_varasm_status. + + * ggc-common.c (ggc_realloc): Handle X being NULL. + + * ggc-common.c (ggc_realloc): New function. + * ggc.h: Prototype it. + * emit-rtl.c (free_emit_status): Delete. + (init_emit): Allocate emit subarrays using GC. + (gen_reg_rtx): Reallocate subarrays using GC. + (init_emit): Use GC to allocate 'struct emit_status' and its + subarrays. + (mark_emit_status): Mark structure and its subarrays. + * stmt.c (free_stmt_status): Delete. + * expr.c (free_expr_status): Delete. + * function.h: Remove prototypes for deleted functions. + * function.c (free_after_compilation): Don't use deleted functions. + Don't call free() on x_parm_reg_stack_loc. + (free_after_parsing): Don't use free_stmt_status. + (assign_parms): Use GC to allocate and resize x_parm_reg_stack_loc. + (mark_function_status): Mark x_parm_reg_stack_loc. + + * varasm.c (init_varasm_status): Use GC to allocate + 'struct varasm_status' and its fields x_const_rtx_hash_table + and x_const_rtx_sym_hash_table. + (mark_varasm_status): Mark them. + (free_varasm_status): Use GC to free them. + * expr.c (init_expr): Use GC to allocate 'struct expr_status'. + (mark_expr_status): Mark the structure itself. + (free_expr_status): Use GC to free the structure. + * stmt.c (free_stmt_status): Use GC to free 'struct stmt_status'. + (mark_stmt_status): Mark the 'struct stmt_status' itself. + (init_stmt_for_function): Allocate the structure for GC. + + * dwarf2out.c (lookup_type_die): Use TYPE_SYMTAB_DIE. + (equate_type_number_to_die): Likewise. + * tree.h (TYPE_SYMTAB_DIE): New macro. + (struct die_struct): Predeclare. + (struct tree_type): Add field symtab.die. Add a tag + to the union type of field symtab. + + * varray.h (VARRAY_RTVEC_INIT): A varray of rtvec contains + 'struct rtvec_def *', not 'struct rtvec_def'. + + * function.h (original_arg_vector): Make a real rtvec. + * function.c (ggc_mark_struct_function): Adjust. + * integrate.c (expand_inline_function): Adjust. + + 2002-06-04 Jason Thorpe + + * config.gcc (sh5-*-netbsd*, sh5l*-*-netbsd*) + (sh64-*-netbsd*, sh64l*-*-netbsd*): New targets. + * config/sh/netbsd-elf.h (TARGET_VERSION_ENDIAN) + (TARGET_VERSION_CPU): Define according to the + default target. + (TARGET_VERSION): Use TARGET_VERSION_ENDIAN and + TARGET_VERSION_CPU. + (TARGET_OS_CPP_BUILTINS): Use NETBSD_OS_CPP_BUILTINS_LP64 + if TARGET_SHMEDIA64. + (LINK_DEFAULT_CPU_EMUL): Define according to the + default target. + (SUBTARGET_LINK_EMUL_SUFFIX): Define. + (SUBTARGET_LINK_SPEC): Define. + (LINK_SPEC): Use SH_LINK_SPEC. + (ASM_SPEC): Remove. + (TARGET_DEFAULT): Use TARGET_CPU_DEFAULT. + (FUNCTION_PROFILER): Add cases for TARGET_SHMEDIA32 + and TARGET_SHMEDIA64 which abort, for now. + * config/sh/t-netbsd-sh5: New file. + * config/sh/t-netbsd-sh5-32: New file. + * config/sh/t-netbsd-sh5-64: New file. + + 2002-06-03 Falk Hueffner + Richard Henderson + + * config/alpha/alpha.c (reg_or_const_int_operand): New. + (some_operand, input_operand): Accept CONST_VECTOR. + (alpha_extra_constraint): Add 'W'. + (alpha_expand_zap_mask): New. + (alpha_expand_builtin_vector_binop): New. + (enum alpha_builtin): New. + (zero_arg_builtins, one_arg_builtins, two_arg_builtins): New. + (alpha_init_builtins, alpha_expand_builtin): New. + (TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN): New. + * config/alpha/alpha.h (VECTOR_MODE_SUPPORTED_P): New. + (PREDICATE_CODES): Update. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.md (UNSPEC_CMPBGE, UNSPEC_ZAP, + UNSPEC_AMASK, UNSPEC_IMPLVER, UNSPEC_PERR, UNSPECV_RPCC): New. + (movv8qi, movv8qi_fix, movv8qi_nofix): New. + (movv4hi, movv4hi_fix, movv4hi_nofix): New. + (movv2si, movv2si_fix, movv2si_nofix): New. + (uminv8qi3, sminv8qi3, uminv4hi3, sminv4hi3): New. + (umaxv8qi3, smaxv8qi3, umaxv4hi3, smaxv4hi3): New. + (builtin_cmpbge, builtin_extql, builtin_extqh, builtin_zap, + builtin_zap_1, builtin_zapnot, builtin_zapnot_1, builtin_amask, + builtin_implver, builtin_rpcc, builtin_minub8, builtin_minsb8, + builtin_minuw4, builtin_minsw4, builtin_maxub8, builtin_maxsb8, + builtin_maxuw4, builtin_maxsw4, builtin_perr, builtin_pklb, + pklb, builtin_pkwb, pkwb, builtin_unpkbl, unpkbl, + builtin_unpkbw, unpkbw): New. + * doc/extend.texi (Alpha Built-in Functions): New. + + 2002-06-03 Richard Henderson + + * crtstuff.c (__EH_FRAME_BEGIN__): Conditionalize on + USE_EH_FRAME_REGISTRY, not EH_FRAME_SECTION_NAME. + + 2002-06-03 Richard Henderson + + * config/alpha/alpha-protos.h: Eliminate unneeded ifdefs. + + * config/alpha/alpha.c (reg_or_0_operand): Use CONST0_RTX. + (const0_operand): New. + (reg_or_fp0_operand, fp0_operand): Remove. + * config/alpha/alpha.h (PREDICATE_CODES): Update. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.md: Replace all uses of reg_or_fp0_operand + and fp0_operand with reg_or_0_operand and const0_operand. + + 2002-06-03 Dan Nicolaescu + + * alias.c (nonoverlapping_memrefs_p): Fix off by one error. + + 2002-06-03 Roger Sayle + + * gcse.c (cprop_jump): Use single_set to get the pattern + from the setcc argument. + + 2002-06-03 Gabriel Dos Reis + + * diagnostic.h (diagnostic_count): Move from output_buffer to + diagnostic_context. + (diagnostic_kind_count): Adjust definition. + + Mon Jun 3 19:11:53 CEST 2002 Jan Hubicka + + * except.c (except.c): Do not rebuild CFG. + * toplev.c (rest_of_compilation): Recompute CFG after sibcall + optimization. + + Mon Jun 3 11:53:01 CEST 2002 Jan Hubicka + + * integrate.c (copy_insn_list): Properly pace the INSN_SCOPE copies. + * toplev.c: Include cfglahout.h + * Makefile.in (toplev.c): Add dependnecy. + + 2002-06-03 Neil Booth + + * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): New. + (CPP_CPU32_SPEC, CPP_CPU64_SPEC): Kill. + (CPP_CPUCOMMON_SPEC): Rename CPP_CPU_SPEC. + + 2002-06-03 Jason Thorpe + + * config/ns32k/netbsd.h: Update copyright years. + (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES): Remove. + * config/ns32k/ns32k.h (CPP_PREDEFINES): Remove. + (TARGET_CPU_CPP_BUILTINS): Define. + + 2002-06-02 Kazu Hirata + + * emit-rtl.c: Fix formatting. + * errors.h: Likewise. + * except.c: Likewise. + * explow.c: Likewise. + * expmed.c: Likewise. + * expr.c: Likewise. + * expr.h: Likewise. + + 2002-06-02 Kazu Hirata + + * config/h8300/elf.h: Fix formatting. + * config/h8300/rtems.h: Likewise. + + 2002-06-03 Jason Thorpe + + * config/rs6000/netbsd.h (DRAFT_V4_STRUCT_RET): Remove. + + 2002-06-02 Tom Tromey + + * fixinc/fixincl.x: Rebuilt. + * fixinc/inclhack.def (thread_keyword): Match `*__thread'. + + 2002-06-02 Neil Booth + + config/i370: + * i370.h (TARGET_CPU_CPP_BUILTINS): Use. + * linux.h: Use TARGET_OS_CPP_BUILTINS rather than CPP_PREDEFINES. + * mvs.h: Similarly. + * oe.h: Similarly. + + Mon Jun 3 00:18:20 CEST 2002 Jan Hubicka + + * final.c (final): Allow notes to not have computed addresses; + kill no longer needed STACK_REGS ifdef. + + 2002-06-02 Richard Henderson + + * gcse.c (bypass_conditional_jumps): Fix typo last change. + + Sun Jun 2 23:02:11 CEST 2002 Jan Hubicka + + * loop.c (emit_prefetch_instructions): Properly place the address + computation. + + Sun Jun 2 22:56:48 CEST 2002 Jan Hubicka + + * basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill. + (set_block_for_insn): Turn into macro. + * cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn. + * cfglayout.c (insn_scopes): Kill. + (scope_to_insns_initialize): Do not use insn_scopes. + (scope_to_insns_finalize): Likewise. + (duplicate_insn_chain): Likewise. + (cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes. + * cfgrtl.c (basic_block_for_insn): Kill. + (delete_insn_and_edges, delete_insn_chain_and_edges): Simplify. + (create_basic_block_structure): Use reorder_insns. + (compute_bb_for_insn): Do not use basic_block_for_insn. + (merge_blocks_nomove): Likewise. + (update_bb_for_insn): Likewise. + (verify_flow_info): Likewise. + (set_block_for_insn): Kill. + * combine.c (try_combine): Update gen_rtx_INSN call. + * emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call. + (mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear + scopes and BBs. + (add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify. + (emit_note_before, emit_note_after, emit_line_note_after, emit_note): + Clear BB. + (emit_insns_after): Simplify. + (emit_copy_of_insn_after): Copy scope. + * final.c (final_start_function): Lower scopes. + * flow.c (check_function_return_warnings): Do not rely on deleted insn. + * integrate.c (copy_insn_list): Cope scopes. + * jump.c (duplicate_loop_exit_test): LIkewise; simplify. + * loop.c (loop_optimize): Do not care block notes. + * print-rtl.c (print_rtx): Print BB. + * recog.c (apply_change_group): Simplify. + * rtl.c (copy_rtx): Handle 'B'. + * rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields. + * rtl.h (Field accessors): Update indexes. + * sched-ebb.c (schedule_ebbs): Do not lower notes. + * sched-rgn.c (schedule_insns): Likewise. + * toplev.c (rest_of_compilation): Lower notes. + * unroll.c (unroll_loop): Do not care scoping notes. + (copy_loop_body): Copy scopes. + + 2002-06-02 Neil Booth + + config/h8300: + * elf.h: Use TARGET_OS_CPP_BUILTINS rather than + SUBTARGET_SPEC. + * rtems.h: Similarly. + * h8300.h (CPP_PREDEFINES, CPP_SPEC, SUBTARGET_CPP_SPEC, + EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): Remove. + (TARGET_CPU_CPP_BUILTINS): Use. + + 2002-06-02 Richard Henderson + + * alias.c: Include target.h. + (mark_constant_function): Use targetm.binds_local_p instead + of checking TREE_PUBLIC ourselves. + * Makefile.in (alias.o): Add TARGET_H. + + 2002-06-02 Neil Booth + + * c-lex.c: Update copyright and file description. + + 2002-06-02 Neil Booth + + * config/fr30/fr30.h: Update to new CPP macros. + + 2002-06-02 Neil Booth + + * config/dsp16xx/dsp16xx.h: Update to new CPP macros. + + 2002-06-02 Neil Booth + Zack Weinberg + + * c-common.c (c_common_init): Override cpplib's default + warn_long_long setting. + * c-lex.c (lex_number): Replace with interpret_integer, + interpret_float, narrowest_unsigned_type and + narrowest_signed_type, taking advantage of the new + cpplib functionality. + * cpperror.c (_cpp_begin_message): If a warning is turned + into an error, avoid printing "warning:". + * cppexp.c (cpp_num_sign_extend): New. + * cppinit.c: Update comment. + * cpplib.h (cpp_num_sign_extend): New. + * tree.h: Update comment. + + 2002-06-02 Gabriel Dos Reis + + * diagnostic.h (struct diagnostic_context): Add new member + internal_error. + (internal_error_function): Remove declaration. + * diagnostic.c (internal_error_function): Remove definition.. + (internal_error): Adjust use. + + 2002-06-02 Richard Henderson + + * rtl.h (CC0_P): New. + * gcse.c (cprop_jump): Use it with single_set. Tweak dump text. + (cprop_insn): Allow any mode register; use CC0_P. CSE out single_set. + (bypass_block): Save old dest block for dump text. + (bypass_conditional_jumps): Allow any mode register; use CC0_P. + Allow only true SET insns, not single_set. + + 2002-06-02 Gabriel Dos Reis + + * diagnostic.c (diagnostic_finish): Rename to output_flush. + (clear_disgnostic_info): Rename to output_clear_data. Use false + instead of 0 for boolean value. + Adjust function call throughout. + + Sun Jun 2 19:15:27 CEST 2002 Jan Hubicka + + * cfgrtl.c (commit_one_edge_insertion): Fix warning. + * gcse.c (bypass_conditional_jumps): CSE out single_set call. + + 2002-06-02 Neil Booth + + * d30v.h (CPP_PREDEFINES): Replace with + (TARGET_CPU_CPP_BUILTINS): New. + + 2002-06-02 Roger Sayle + + * config/alpha/alpha.h [ASM_OUTPUT_LABELREF]: Fix typo. + + Sun Jun 2 12:11:52 CEST 2002 Jan Hubicka + + * gcse.c (bypass_conditional_jumps): Use single set to obtain set. + + 2002-06-02 Richard Henderson + + * rtlanal.c (volatile_refs_p): Not automatically true for CALL. + + 2002-06-02 Marek Michalkiewicz + + Support for C++ constructors/destructors. + * config/avr/avr.c (avr_output_function_epilogue): Jump to exit() + instead of looping if main() returns. + (asm_file_start): Output global symbols that cause .data and .bss + initialization code to be linked in, unconditionally for now. + (avr_asm_out_ctor, avr_asm_out_dtor): New functions. + * config/avr/avr.h (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): New. + (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. + (LIBSTDCXX): New. + * config/avr/libgcc.S (_exit): Split in .fini9 and .fini0 sections. + (__tablejump__): New. + (__do_copy_data, __do_clear_bss): New. + (__do_global_ctors, __do_global_dtors): New. + * config/avr/t-avr (LIB1ASMFUNCS): Add _copy_data, _clear_bss, + _ctors, _dtors. + + 2002-06-02 Neil Booth + + * c4x/c4x.h (TARGET_CPU_CPP_BUILTINS): New. + (CPP_SPEC, CPP_PREDEFINES): Kill. + * c4x/rtems.h (CPP_PREDEFINES): Kill. + (TARGET_OS_CPP_BUILTINS): New. + + Sat Jun 1 23:29:51 CEST 2002 Jan Hubicka + + * Makefile.in (tracer.o): New. + * params.def (TRACER_*): New options. + * rtl.h (tracer): Declare. + * timevar.def (TV_TRACER): New. + * toplev.c (dump_file_index): Add DFI_tracer. + (dump_file_info): Add tracer. + (flag_tracer): New. + (lang_indepdenent_options): Add tracer. + (rest_of_compilation): Call tracer. + * tracer.c: New file. + * invoke.texi (-ftracer): Document. + (--param tracer-*): Document. + + 2002-06-01 Daniel Berlin + + * tree-inline.c (expand_call_inline): Make the statement + expression we generate have a COMPOUND_STMT. + + 2002-06-01 Roger Sayle + + * gcse.c (cprop_cc0_jump): Function deleted. + (cprop_jump): Take an additional argument which is the possibly + NULL cc setting insn immediately before the conditional jump. + When a MODE_CC set is present, substitute it into the JUMP_INSN + before attempting the constant propagation. + (cprop_insn): Recognize cc setters followed by conditional jumps + as a special case. Use cprop_jump instead of cprop_cc0_jump. + (cprop_one_pass): Call bypass_conditional_jumps if altering jumps. + (find_bypass_set): New function based upon find_avail_set used by + cprop, but finds constant expressions available at the end of + basic blocks. + (bypass_block): New function. Given a basic block that begins + with a conditional jump and multiple incoming edges, perform + the jump bypass optimization. + (bypass_conditional_jumps): New function. Call bypass_block with + each suitable basic block in the CFG using a simple single pass. + + 2002-06-01 Roger Sayle + + * tree.c (real_minus_onep): New function to test for -1.0. + * fold-const.c (fold) [MULT_EXPR]: Optimize -1.0*x into -x. + + 2002-06-01 Roger Sayle + + * fold-const.c (fold_truthop): Transform "a || b" into "(a|b) != 0" + and "!p && !q" into "(p|q) == 0" under suitable conditions. + + 2002-06-01 Andreas Jaeger + + * cppexp.c (cpp_classify_number): Cast precission to int for + correct printf format. + + 2002-06-01 Marek Michalkiewicz + + * config/avr/avr.c (avr_mcu_types): Remove devices that were once + expected, but don't really exist: atmega83, atmega85, attiny10. + * config/avr/avr.h (LINK_SPEC): Update to use the new avr[1-5] ld + emulations for all devices. + (CRT_BINUTILS_SPECS): Remove atmega83, atmega85, attiny10. + * config/avr/t-avr (MULTILIB_MATCHES): Remove atmega83, atmega85. + + 2002-06-01 Kazu Hirata + + * config/h8300/h8300-protos.h: Add a prototype for + h8300_shift_needs_scratch_p. + * config/h8300/h8300.c (h8300_shift_needs_scratch_p): New. + * config/h8300/h8300.h (OK_FOR_R): New. + (OK_FOR_S): Likewise. + (OK_FOR_T): Likewise. + (EXTRA_CONSTRAINT): Call OK_FOR_R, OK_FOR_S, and OK_FOR_T. + * config/h8300/h8300.md (anonymous shift patterns): Use + constraints R, S, and T. + + Sat Jun 1 11:23:22 CEST 2002 Zdenek Dvorak + + * basic-block.h (struct basic_block_def): New field loop_father. + (BB_VISITED): New flag. + (struct loop): New field pred, removed field shared. + (struct loops): New field parray. + (LOOP_EXITS_DOMS): Removed. + (flow_loop_tree_node_add, flow_loop_tree_node_remove, + flow_loop_nested_p, flow_bb_inside_loop_p, get_loop_body, + dfs_enumerate_from, loop_preheader_edge, loop_latch_edge, + add_bb_to_loop, remove_bb_from_loops, find_common_loop, + verify_loop_structure): Declare. + * cfg.c (entry_exit_blocks): Initialize loop_father field. + * cfganal.c (dfs_enumerate_from): New function. + * cfgloop.c (HEAVY_EDGE_RATIO): New constant. + (flow_loop_entry_edges_find, flow_loop_exit_edges_find, + flow_loop_nodes_find, flow_loop_level_compute, flow_loop_nested_p, + flow_loop_dump, flow_loops_dump, flow_loops_free, + flow_loop_tree_node_add, flow_loop_level_compute, + flow_loops_level_compute, flow_loop_scan, flow_loops_update, + flow_loop_outside_edge_p): Modified for new infrastructure. + (make_forwarder_block, canonicalize_loop_headers, glb_enum_p, + redirect_edge_with_latch_update, flow_loop_free): New static functions. + (flow_loop_tree_node_remove, flow_bb_inside_loop_p, + get_loop_body, add_bb_to_loop, remove_bb_from_loops, + find_common_loop, verify_loop_structure, loop_latch_edge, + loop_preheader_edge): New functions. + (flow_loops_cfg_dump): Do not show dominators, as this information + does not remain up to date long. + (flow_loops_find): Store results in new format. + * predict.c (propagate_freq, estimate_probability, + estimate_loops_at_level, estimate_bb_frequencies): Use new loop + infrastructure. + + 2002-06-01 Alan Lehotsky + + * except.c (nothrow_function_p): Walk epilogue delay list + checking the insn, not the chain for potential throws. + + 2002-05-31 Zack Weinberg + + * Makefile.in (INSTALL_CPP, UNINSTALL_CPP): Remove. + (install): Refer to install-cpp directly. + (uninstall-cpp): Folded into uninstall rule. + * configure.in: Delete all code relating to --disable-cpp. + * configure: Regenerate. + * config/t-install-cpp: Delete. + + 2002-05-31 Richard Henderson + + * configure.in (HAVE_AS_TLS): Add alpha tests. + * configure: Rebuild. + * config/alpha/alpha.c (TARGET_AS_TLS): New. + (alpha_tls_size, alpha_tls_size_string): New. + (overide_options): Set it. Always install machine_status hooks. + (input_operand): Accept got tls predicates. + (local_symbol_p): Merge into ... + (local_symbolic_operand): ... here. Reject tls symbols. + (global_symbolic_operand): Likewise. + (tls_symbolic_operand_1, dtp16_symbolic_operand): New. + (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. + (tp16_symbolic_operand, tp32_symbolic_operand): New. + (gottp_symbolic_operand, tls_symbolic_operand_type): New. + (alpha_encode_section_info): Handle TLS symbols. + (alpha_strip_name_encoding): Likewise. + (alpha_legitimate_address_p): Likewise. + (alpha_legitimize_address): Likewise. + (alpha_expand_mov): Early exit to avoid nop moves. + (struct machine_function): Move from unicosmk.h. Add some_ld_name. + (alpha_init_machine_status, alpha_mark_machine_status, + alpha_free_machine_status): Always define. + (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. + (print_operand, print_operand_address): Add TLS relocs. + * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. + (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. + (TARGET_SWITCHES): Add -mtls-kernel. + (alpha_tls_size, alpha_tls_size_string): New. + (TARGET_OPTIONS): Add -mtls-size=. + (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, + REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. + (ASM_OUTPUT_LABELREF): Skip %. + (PRINT_OPERAND_PUNCT_VALID_P): Add &. + (PREDICATE_CODES): Update. + * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, + UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, + UNSPEC_TP, UNSPECV_SET_TP): New. + (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, + adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, + set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, + movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. + (call_value_osf_2_er): Accept anything as op4. + * config/alpha/alpha-protos.h: Update. + * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. + + 2002-05-31 Zack Weinberg + + * cppinit.c (append_include_chain): Always pay attention to + cxx_aware when setting new->sysp. Remove ATTRIBUTE_UNUSED + marker on argument. + + 2002-05-31 Kazu Hirata + + * target.h: Fix formatting. + * timevar.h: Likewise. + * tlink.c: Likewise. + * toplev.c: Likewise. + * toplev.h: Likewise. + * tree.c: Likewise. + * tree-dump.h: Likewise. + * tree.h: Likewise. + * tree-inline.h: Likewise. + * unroll.c: Likewise. + * unwind-dw2.c: Likewise. + * unwind-dw2-fde.c: Likewise. + * unwind-dw2-fde-glibc.c: Likewise. + * unwind-dw2-fde.h: Likewise. + * unwind.h: Likewise. + * unwind-sjlj.c: Likewise. + * varasm.c: Likewise. + * varray.h: Likewise. + * vmsdbg.h: Likewise. + * vmsdbgout.c: Likewise. + * xcoffout.h: Likewise. + + 2002-05-31 Igor Shevlyakov + + * expr.c (compare_from_rtx): Generate comparison between op0 and op1 + rather than cc0 and 0 in a case when HAVE_cc0 is not defined. + + 2002-05-31 Matthew Woodcraft + + * gcc.c (cpp_unique_options): Remove "-d" options. + (cpp_debug_options): New spec string. + (default_compilers): Use it. + * objc/lang-specs.h: Likewise. + + 2002-05-31 Nathanael Nerode + + * gcc/Makefile.in: Replace HOST_PREFIX, HOST_PREFIX_1 with + BUILD_PREFIX, BUILD_PREFIX_1, to correct nomenclature. + * gcc/mklibgcc.in: Likewise. + * gcc/config/arc/t-arc: Likewise. + * gcc/configure.in: Likewise. + * gcc/configure: Regenerate. + + 2002-05-31 Stan Shebs + Turly O'Connor + + * c-decl.c (struct binding_level): Change int field n_incomplete + to tree list incomplete_list. + (clear_binding_level): Init field with NULL. + (pushdecl): Add incomplete type to list. + (mark_binding_level): Mark the incomplete list. + (finish_struct): Scan the incomplete list for types instead + of all decls in the current binding level. + + 2002-05-31 John David Anglin + + * pa.c (output_millicode_call): Add missing '%' characters. + (output_call): Likewise. + + 2002-05-31 David Edelsohn + + * config/rs6000/xcoff.h (HOT_TEXT_SECTION_NAME): Define. + (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Define. + + 2002-05-31 Alan Lehotsky + + * varasm.c (mark_constant_pool): Walk epilogue delay list + checking the insn, not the chain for potential constants. + + Fri May 31 12:38:43 2002 J"orn Rennecke + + * config/sh/elf.h (ASM_SPEC): Use subtarget_endian_asm_spec. + + Fri May 31 13:50:19 CEST 2002 Jan Hubicka + + * i386.c (classify_argument): Properly handle base types. + + * dwarf2out.c (expand_builin_init_dwarf_reg_sizes): + Store first DWARF_FRAME_REGISTERS dwarf registers, not pseudo + registers. + + Fri May 31 13:37:54 CEST 2002 Jan Hubicka + + * gcse.c (gcse_emit_move_after): New. + (pre_delete, hoist_store): Use it. + + * reload1.c (emit_input_reload_insns): Use constrain_operands + instead of constraint_accepts_reg_p to verify optimization. + (constraint_accepts_reg_p): Kill. + + * reload1.c (reload_cse_delete_noop_set): Kill. + (reload_cse_simplify): Use delete_insn_and_edges. + + 2002-05-31 Zdenek Dvorak + + * cfgloop.c (flow_loops_find): Initialize first and last fields + correctly. + + 2002-05-31 Neil Booth + + * c-common.c (builtin_define_std): Correct logic. + + 2002-05-31 John David Anglin + + * pa.c (output_millicode_call): Correct "be,l" insn for TARGET_PA_20. + (output_call): Likewise. + + 2002-05-31 John David Anglin + + * pa.c: Move output.h include after tree.h include. + (pa_asm_output_mi_thunk): Constify identifier lab. + + 2002-05-31 Jason Thorpe + + * config/ns32k/ns32k.h: Define named constants for the + bits in target_flags and use them. + * config/ns32k/netbsd.h (TARGET_DEFAULT): Use named constants. + + 2002-05-30 John David Anglin + + * config.gcc (tm_file): Prefix pa/pa-700.h to tm_file list for PA1.0 + architecture and pa/pa-7100.h for PA1.1 architecture, respectively. + * pa/pa.c (override_options): Use TARGET_SCHED_DEFAULT to select + default scheduling model. + * pa/pa.h (TARGET_SCHED_DEFAULT): Define if not defined to "8000". + * pa/pa-700.h (TARGET_SCHED_DEFAULT): New file for "700" scheduling. + * pa/pa-7100.h (TARGET_SCHED_DEFAULT): New file for "7100" scheduling. + * doc/install.texi (hppa*-*-*): Document default scheduling. + + 2002-05-30 John David Anglin + + * pa.c (following_call): Check TARGET_JUMP_IN_DELAY. + + 2002-05-31 Jason Thorpe + + * config.gcc (ns32k-*-netbsd*): Set tm_file to + "${tm_file} netbsd.h netbsd-aout.h ns32k/netbsd.h" + * config/ns32k/netbsd.h: Don't include ns32k/ns32k.h, + netbsd.h, or netbsd-aout.h. + + 2002-05-31 Jason Thorpe + + * longlong.h (count_trailing_zeros): Add missing \, and clean up + whitespace in __ns32000__ case. + + 2002-05-31 Aldy Hernandez + + * expr.c (expand_expr): Output partially zeroed out vectors with + output_constant_def. + + 2002-05-30 Jason Thorpe + + * config.gcc (sh[123456789l]*-*-*): Set cpu_type to sh. + (sh-*-netbsdelf*) + (shl*-*-netbsdelf*): New targets. + * config/sh/netbsd-elf.h: New file. + * config/sh/t-netbsd: New file. + + 2002-05-30 Richard Henderson + Eric Botcazou + + PR optimization/6822 + * config/i386/i386.c (ix86_expand_int_movcc): Don't cast INTVAL + to unsigned int for op1 comparisons. Use gen_int_mode. + + 2002-05-30 Eric Botcazou + + * expmed.c (const_mult_add_overflow_p): New. + * expr.h: Declare it. + * loop.c (maybe_eliminate_biv_1) [COMPARE]: Use it. + Don't eliminate the biv if the giv has a constant multiplier and + the rhs argument of the comparison does satisfy the predicate. + Use expand_mult_add to compute the replacement constant. + + 2002-05-30 Osku Salerma + + * c-common.c (c_common_attribute_table): Add "may_alias" entry. + (c_common_get_alias_set): Handle it. + * doc/extend.texi: Document it. + + 2002-05-30 Richard Henderson + + * defaults.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): Kill. + * toplev.c (process_options): Don't check it. + * doc/tm.texi: Don't document it. + * config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): New. + (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): Kill. + * config/i386/i386.c (ix86_frame_pointer_required): Suppress leaf + frame pointer optimization if current_function_profile. + + 2002-05-30 Kazu Hirata + + * langhooks.c: Fix formatting. + * langhooks.h: Likewise. + * lcm.c: Likewise. + * libgcc2.c: Likewise. + * lists.c: Likewise. + * local-alloc.c: Likewise. + * loop.c: Likewise. + * loop.h: Likewise. + + 2002-05-30 Marc Espie + + * config.gcc (sparc64-*-openbsd*): New. + * config/sparc/openbsd1-64.h: New. + * config/sparc/openbsd64.h: New. + + 2002-05-30 Jeff Law + + * flow.c (propagate_one_insn): Revise yesterday's patch. Delete + a dead insn with a REG_RETVAL note when the entire libcall is not + dead and remove the associated REG_LIBCALL note at the same time. + + Thu May 30 19:54:30 2002 J"orn Rennecke + + * lcm.c (output.h): #include. + (compute_earliest): Remove hack to treat renumbered EXIT_BLOCK + as an ordinary block. + (optimize_mode_switching): Don't pretend that the exit block is + an ordinary block, or handle sucessors of entry block specially. + Instead, split edges from entry block and to exit block, and + put a computing definition on the thus gained post-entry-block, + and a need on the pre-exit-block. + + Thu May 30 20:28:01 CEST 2002 Jan Hubicka + + * gengenrtl.c (type_from_format, accessor_from_format): Support 'B'. + * rtl.texi: Document 'B' + + 2002-05-30 Jason Thorpe + + * config/m68k/netbsd-elf.h (LONG_DOUBLE_TYPE_SIZE): Compute + at run-time. + (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Set to 96 if not __mc68010__. + + 2002-05-30 Aldy Hernandez + + * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return + const0_rtx instead of NULL_RTX when in error. + (altivec_expand_abs_builtin): Same. + (rs6000_expand_binop_builtin): Same. + (altivec_expand_predicate_builtin): Same. + (altivec_expand_stv_builtin): Same. + (rs6000_expand_ternop_builtin): Same. + (altivec_expand_builtin): Same. + + 2002-05-29 David S. Miller + + * rtl.h (clear_emit_caches): Delete. + * integrate.c (output_inline_function): Don't call it. + * emit-rtl.c (restore_emit_status, init_emit): Likewise. + (clear_emit_caches): Delete definition. + (SEQUENCE_RESULT_SIZE, sequence_result, free_insn): Likewise. + + 2002-05-30 Hans-Peter Nilsson + + * config/mmix/mmix.c: Include real.h. + (mmix_constant_address_p): Remove redundant test before switch. + + 2002-05-29 Jason Thorpe + + * config/mips/mips.h (READONLY_DATA_SECTION_ASM_OP): Define + only if not already defined. + + 2002-05-29 Kazu Hirata + + * config/h8300/h8300-protos.h: Remove prototypes for + ok_for_bclr and small_power_of_two. + * config/h8300/h8300.c (small_power_of_two): Remove. + (ok_for_blcr): Likewise. + (fix_bit_operand): Make WHAT deal with an integer instead of a + constraint character. + * config/h8300/h8300.h (CONST_OK_FOR_O): Remove. + (CONST_OK_FOR_P): Likewise. + (CONST_OK_FOR_LETTER_P): Do not call CONST_OK_FOR_O or + CONST_OK_FOR_P any more. + * config/h8300/h8300.md (andqi3): Adjust to the new prototype + of fix_bit_operand. + (iorqi3): Likewise. + (xorqi3): Likewise. + + 2002-05-29 Jason Thorpe + + * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES): Make sure this is undefined. + (CPP_SPEC): Place -D__mips=1 at the beginning of the spec, + since it is no longer in CPP_PREDEFINES. Don't -U__MIPSEL__ + or -U__MIPSEB__ before defining one or the other. Instead, + use %(subtarget_endian_default) if neither -EB nor -EL are + specified. + (SUBTARGET_EXTRA_SPECS): Define. + (SUBTARGET_CPP_SPEC): Remove __LONG64 handling. Use + %(netbsd_cpp_spec). + + 2002-05-29 Hans-Peter Nilsson + + * doc/md.texi (Patterns): Note pattern condition pitfall + for unnamed insn. + + 2002-05-29 Aldy Hernandez + + * rs6000.c: (altivec_expand_builtin): Only expand altivec builtins + when TARGET_ALTIVEC. Move handling of generic unary, binary, and + ternary operations from here... + (rs6000_expand_builtin): ...to here. + New argument expandedp. + Change all instances of altivec_expand_binop_builtin to + rs6000_expand_binop_builtin. + (altivec_expand_unop_builtin): Rename to + rs6000_expand_unop_builtin. + (altivec_expand_binop_builtin): Rename to + rs6000_expand_binop_builtin. + (altivec_expand_ternop_builtin): Rename to + rs6000_expand_ternop_builtin. + + 2002-05-29 Richard Henderson + + * config/i386/biarch64.h (TARGET_64BIT_DEFAULT): Define with value. + (TARGET_BI_ARCH): Likewise. + * config/i386/i386.h: Test TARGET_64BIT_DEFAULT by value. + (TARGET_SWITCHES): Combine target defaults here not in TARGET_DEFAULT. + (TARGET_64BIT_DEFAULT): Default to 0. + (TARGET_DEFAULT): Default to MASK_OMIT_LEAF_FRAME_POINTER. + + 2002-05-29 Richard Henderson + + * config/i386/i386.c (USE_HIDDEN_LINKONCE): New. + (get_pc_thunk_name): New. + (output_set_got): Use it. + (ix86_asm_file_end): If USE_HIDDEN_LINKONCE, emit get_pc thunks + into linkonce sections. + + 2002-05-29 Jason Thorpe + + * config/sparc/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES): Make sure this is undefined. + (CPP_SUBTARGET_SPEC64, CPP_SUBTARGET_SPEC32): Remove. + (CPP_SUBTARGET_SPEC): Don't provide different versions for + default-32 and default-64. Just always use %(netbsd_cpp_spec). + (SUBTARGET_EXTRA_SPECS): Remove cpp_subtarget_spec32 and + cpp_subtarget_spec64. Add netbsd_cpp_spec. + * config/sparc/netbsd.h (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES): Make sure this is undefined. + (SUBTARGET_EXTRA_SPECS): Define. + (CPP_SPEC): Use %(netbsd_cpp_spec). + + 2002-05-29 Jeff Law + + * pa.h (ASM_OUTPUT_MI_THUNK): Remove unwanted semi-colon. + + * flow.c (propagate_one_insn): Do not remove a dead insn if it + contains a REG_RETVAL note. + + * haifa-sched (sched_analyze): Remove another useless clearing + of SCHED_GROUP_P I missed yesterday. + + * pa.h (ASM_OUTPUT_MI_THUNK): Move implementation into pa.c. + * pa.c (pa_asm_output_mi_thunk): New function. + * pa-protos.h (pa_asm_output_mi_thunk): Declare. + + 2002-05-29 Neil Booth + Marek Michalkiewicz + + * config/avr/avr.c (avr_base_arch_macro, avr_extra_arch_macro): New. + (avr_asm_only_p): Make non-static. + (enum avr_arch): Remove. + (avr_arch_types): New. + (avr_mcu_types): Update. + (avr_override_options): Use avr_arch_types table instead of switch. + * avr.h (CPP_PREDEFINES): Die. + (avr_base_arch_macro, avr_extra_arch_macro): New. + (TARGET_CPU_CPP_BUILTINS): New. + (CPP_SPEC, EXTRA_SPECS): Simplify. + (CPP_AVR1_SPEC, CPP_AVR2_SPEC, CPP_AVR3_SPEC, CPP_AVR4_SPEC, + CPP_AVR5_SPEC): Die. + + 2002-05-29 Jason Thorpe + + * config/arm/netbsd.h (TARGET_OS_CPP_BUILTINS): Use + NETBSD_OS_CPP_BUILTINS_AOUT. + (SUBTARGET_EXTRA_SPECS): Define. + (CPP_SPEC): Use %(netbsd_cpp_spec). + + 2002-05-29 Richard Henderson + + * config/i386/i386.c (ix86_output_function_epilogue): New. + (TARGET_ASM_FUNCTION_EPILOGUE): New. + (pic_label_name): Remove. + (pic_labels_used): New. + (ix86_asm_file_end): Emit one pc load stub for each register used. + (output_set_got): Generate deep pc load to any register. + (ix86_select_alt_pic_regnum): New. + (ix86_save_reg): Don't save pic register if we can find a valid + call-clobbered replacement. + (ix86_expand_prologue): If we found a valid replacement, renumber + pic_offset_table_rtx. + * config/i386/i386.h (PIC_OFFSET_TABLE_REGNUM): Look at + pic_offset_table_rtx after reload. + (REAL_PIC_OFFSET_TABLE_REGNUM): New. + * config/i386/i386.md (set_got): Make insn, not expander. + (set_got_nopic, set_got_deep, set_got_nodeep): Remove. + + 2002-05-29 Richard Henderson + + * config/i386/i386.c (ix86_compute_frame_layout): Do add bottom + alignment for alloca. + + 2002-05-29 Richard Henderson + + * config/i386/i386.c (output_pic_addr_const): Lowercase rip. + (print_operand_address): Only add rip for symbolic addresses + for which we do not have another relocation type. + + 2002-05-29 Jason Thorpe + + * config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define. + (EXTRA_SPECS): Add netbsd_cpp_spec. + (CPP_SPEC): Use %(netbsd_cpp_spec). + (CPP_PREDEFINES): Remove. + * config/m68k/netbsd.h (TARGET_OS_CPP_BUILTINS): Define. + (EXTRA_SPECS): Define. + (CPP_SPEC): Use %(netbsd_cpp_spec). + (CPP_PREDEFINES): Remove. + + 2002-05-29 Neil Booth + + PR preprocessor/6844 + * cppmacro.c (cpp_macro_definition): Reserve space for terminating + NUL. + + 2002-05-29 Eric Christopher + + * config/mips/linux.h (SUBTARGET_CPP_SPEC): Add support for + mips5/mips32/mips64 and _MIPS_ISA_MIPSXX. + + 2002-05-29 Nick Clifton + + * config/fr30/fr30.md: Remove previous restriction on splits. + Enforce conformance through gen_lowpart and cont_int_operand. + * config/fr30/fr30.h (BSS_SECTION_ASM_OP): Use ".section .bss" + as the assembler does not support ".bss". + + 2002-05-29 Jason Thorpe + + * config/i386/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES): Remove. + (SUBTARGET_EXTRA_SPECS): Define. + (CPP_SPEC): Use %(netbsd_cpp_spec). + * config/i386/netbsd.h (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES): Remove. + (SUBTARGET_EXTRA_SPECS): Define. + (CPP_SPEC): Use %(netbsd_cpp_spec). + * config/i386/netbsd64.h (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES, CPP_LP64_SPEC, CPP_SUBTARGET_SPEC): Remove. + (SUBTARGET_EXTRA_SPECS): Remove cpp_lp64 and cpp_subtarget. + Add netbsd_cpp_spec. + (CPP_SPEC): Remove %(cpp_subtarget), add %(netbsd_cpp_spec). + + 2002-05-29 Neil Booth + Zack Weinberg + + * cppexp.c (cpp_num): Move to cpplib.h. + (CPP_ERROR): Remove. + (interpret_float_suffix, interpret_int_suffix): New. + (struct suffix, vsuf_1, vsuf_2, vsuf_3): Remove. + (cpp_classify_number, cpp_interpret_integer): New. + (interpret_number): Remove. + (eval_token): Update to use new routines. + * cpphash.h (cpp_num_part): Move to cpplib.h. + * cppinit.c (cpp_post_options): Set warn_long_long. + * cpplib.h (struct cpp_options): Add warn_long_long. + (cpp_num, cpp_num_part, CPP_N_CATEGORY, CPP_N_INVALID, + CPP_N_INTEGER, CPP_N_FLOATING, CPP_N_WIDTH, CPP_N_SMALL, + CPP_N_MEDIUM, CPP_N_LARGE, CPP_N_RADIX, CPP_N_DEC, CPP_N_HEX, + CPP_N_OCTAL, CPP_N_UNSIGNED, CPP_N_IMAGINARY, cpp_classify_number, + cpp_interpret_integer): New. + + 2002-05-29 Joel Sherrill + + * config/rs6000/rs6000.h (ASM_CPU_SPEC): Use -m403 and -m405. + + 2002-05-29 Jason Thorpe + + * config/alpha/netbsd.h (TARGET_OS_CPP_BUILTINS): Use + NETBSD_OS_CPP_BUILTINS_ELF and NETBSD_OS_CPP_BUILTINS_LP64. + (CPP_SUBTARGET_SPEC): Define. + (SUBTARGET_EXTRA_SPECS): Define. + (CPP_SPEC): Remove. + + 2002-05-29 Chris Lattner + + * ssa.c (rename_insn_1): Rename uses of undefined registers to + prevent confusion if/when the register is defined. + + 2002-05-29 Hans-Peter Nilsson + + PR target/6838 + * config/cris/cris.md: Fix typos and thinkos in comments. + ("*mov_sideqi_biap_mem"): Remove '*' in constraint for operand 4, + second alternative. + ("*mov_sidehi_biap_mem", "*mov_sidesi_biap_mem"): Ditto. + ("*mov_sideqi_mem"): Similar, but for operand 3. + ("*mov_sidehi_mem", "*mov_sidesi_mem"): Ditto. + (splitter for mov_sideqi_mem, mov_sidehi_mem, mov_sidesi_mem): + Remove spurious mode specifier on operand 2. + + 2002-05-29 Kazu Hirata + + * config/h8300/h8300-protos.h: Remove the prototype for + o_operand. + Add prototypes for single_one_operand and single_zero_operand. + * config/h8300/h8300.c (o_operand): Remove. + (single_one_operand): New. + (single_zero_operand): Likewise. + (print_operand): For 'V' operand, and the operand with 0xff. + For 'V' and 'W' operands, do not and the bit position with 7. + * config/h8300/h8300.md (various anonymous patterns): Replace + use of exact_log2 with single_one_operand/single_zero_operand. + + 2002-05-29 Ulrich Weigand + + * config/s390/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New. + + 2002-05-29 Ulrich Weigand + + * config/s390/s390.c (legitimate_pic_operand_p): Do not + accept symbolic LARL operands. + (s390_emit_epilogue): Do not set FRAME_RELATED_P on + epilogue insns. + + 2002-05-29 Hartmut Penner + + * config/s390/s390.md (cmpstr_64/31): Mark whole + input registers as used. + + 2002-05-28 Richard Henderson + + * config/i386/i386.c (ix86_save_reg): Examine regs_ever_live, + not current_function_uses_pic_offset_table and + current_function_uses_const_pool; examine current_function_profile. + (ix86_expand_prologue): Likewise. Add pic_offset_table_rtx as + input to blockage if needed. + (ix86_expand_call): Do not set current_function_uses_pic_offset_table. + (legitimize_pic_address): Likewise. Set regs_ever_live for + pic_offset_table_rtx when invoked during reload. + * config/i386/i386.h (FINALIZE_PIC): Remove. + * config/i386/i386.md (tablejump): Reformat. Do not set + current_function_uses_pic_offset_table. + (tls_global_dynamic, tls_local_dynamic_base): Likewise. + (blockage): Accept anything as operand 0. + + 2002-05-28 Jason Thorpe + + * config/netbsd-aout.h (NETBSD_OS_CPP_BUILTINS_AOUT): Define + common CPP built-ins for all NetBSD a.out targets. + * config/netbsd-elf.h (NETBSD_OS_CPP_BUILTINS_ELF): Define + common CPP built-ins for all NetBSD ELF targets. + * config/netbsd.h: Add missing notice. + (NETBSD_OS_CPP_BUILTINS_COMMON): Define common CPP built-ins + for all NetBSD targets. + (NETBSD_OS_CPP_BUILTINS_LP64): Define common CPP built-ins + for all NetBSD targets using an LP64 code model. + (NETBSD_CPP_SPEC): Define CPP_SPEC parts common to all + NetBSD targets. + + 2002-05-28 Richard Henderson + + * flow.c (update_life_info_in_dirty_blocks): Only do a partial + update if UPDATE_LIFE_LOCAL. + + 2002-05-28 Toshiyasu Morita + + * config/sh/sh.c: Include real.h for REAL_VALUE_TYPE. + + Tue May 28 21:16:18 2002 J"orn Rennecke + Jason R. Thorpe + + config/sh reorganization to factor out endianness and coff: + + * config/sh/little.h: New file. + * config/sh/sh.h (TARGET_ENDIAN_DEFAULT): If not already + defined, define to 0 to select big-endian. + (SUBTARGET_ASM_ENDIAN_SPEC): Define according to TARGET_ENDIAN_DEFAULT. + (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. + * config/sh/sh64.h (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. + * config/sh/t-be: New file. + * config/sh/t-le: New file. + + * sh.h (SDB_DEBUGGING_INFO, #include "dbxcoff.h"): Moved to sh/coff.h. + (SDB_DELIM, MAX_OFILE_ALIGNMENT, IDENT_ASM_OP): Likewise. + (TARGET_ASM_NAMED_SECTION, ASM_OUTPUT_SKIP): Likewise. + (USER_LABEL_PREFIX, LOCAL_LABEL_PREFIX): Likewise. + (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Likewise. + (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. + (ASM_FILE_END, ASM_DECLARE_FUNCTION_NAME): Deleted. + (CPP_SPEC, SUBTARGET_CPP_ENDIAN_SPEC): Likewise. + (SUBTARGET_CPP_SPEC, CPP_DEFAULT_CPU_SPEC, CPP_PREDEFINES): Likewise. + (EXTRA_SPECS): Remove SUBTARGET_CPP_ENDIAN_SPEC and + CPP_DEFAULT_CPU_SPEC. Add LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL, + SUBTARGET_LINK_EMUL_SUFFIX and SUBTARGET_LINK_SPEC. + (LINK_SPEC): Define to SH_LINK_SPEC. + (TARGET_CPU_CPP_BUILTINS, SH_LINK_SPEC): Define. + (LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL): Likewise. + (SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise. + (CPP_SPEC): Reduce to %(subtarget_cpp_spec). + (TARGET_ENDIAN_DEFAULT): Define if not already defined. + * config/sh/coff.h: New file. + (TARGET_ASM_NAMED_SECTION): Now default_coff_asm_named_section + (TARGET_OBJFMT_CPP_BUILTINS): Define. + * config/sh/elf.h (IDENT_ASM_OP): No need to #undef at the start. + (ASM_FILE_END, ASM_OUTPUT_SOURCE_LINE): Likewise. + (DBX_OUTPUT_MAIN_SOURCE_FILE_END, TARGET_ASM_NAMED_SECTION): Likewise. + (ASM_DECLARE_FUNCTION_NAME, MAX_OFILE_ALIGNMENT, SIZE_TYPE): Likewise. + (PTRDIFF_TYPE): Likewise. + ("dbxelf.h", "elfos.h", "svr4.h"): Don't #include. + (CPP_PREDEFINES): Don't define. + (TARGET_OBJFMT_CPP_BUILTINS): Define. + (LINK_SPEC): Define to SH_LINK_SPEC. + (LINK_EMUL_PREFIX): Redefine. + * config/sh/linux.h: (SUBTARGET_CPP_SPEC): Remove -fpic / -fPIC cases. + (SUBTARGET_CPP_ENDIAN_SPEC, CPP_DEFAULT_CPU_SPEC): Remove redefinition. + (CPP_PREDEFINES, SUBTARGET_ASM_ENDIAN_SPEC): Likewise. + (CC1_SPEC, CC1PLUS_SPEC, LINK_SPEC): Likewise. + (TARGET_OS_CPP_BUILTINS): Define. + (TARGET_DEFAULT): Redefine. + (SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise. + * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Remove. + (LINK_SPEC): Don't redefine. + (LINK_DEFAULT_CPU_EMUL): Redefine. + (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. + * sh.c (sh_asm_named_section): Don't declare / define. + * t-linux (MULTILIB_OPTIONS): Rely on pre-set endianness option. + * config.gcc (sh-*-elf* tm_file): Add dbxelf.h elfos.h svr4.h. + (sh64-*-elf* tm_file): Likewise. + (sh-*-rtemself* tm_file): Likewise. + (sh-*-linux* tm_file): Likewise. Add sh/little.h. + (sh-*-linux* tmake_file): Add sh/t-le. + (sh-*-rtems* tm_file): Add sh/coff.h + (sh-*-* tm_file): Likewise. + + Tue May 28 21:16:18 2002 J"orn Rennecke + + * sh.h (LEGITIMATE_PIC_OPERAND_P): Check for SYMBOL_REF before using + CONSTANT_POOL_ADDRESS_P. + + * coff.h (HAS_INIT_SECTION, INVOKE__MAIN): Define. + + 2002-05-28 David Edelsohn + Jeff Law + + * optabs.c (expand_binop): Fix nwords sign warnings. + generate pseudo for add_optab. + + * sched-deps.c (sched_analyze): Do not clear SCHED_GROUP_P. + * haifa-sched.c (move_insn): Clear SCHED_GROUP_P after it is used. + + 2002-05-28 Marc Espie + + * config/i386/openbsd.h (HAVE_GAS_MAX_SKIP_P2ALIGN): Remove, + inherited from gas.h. + (ASM_QUAD): Undef. OpenBSD does not support it. + + 2002-05-28 Danny Smith + + * doc/install.texi (binaries): Change mingw binaries + link to www.mingw.org. + + 2002-05-28 Zdenek Dvorak + + * cfgloop.c (flow_loops_cfg_dump): Use bb->index, not i. + + 2002-05-28 Richard Henderson + + * config/i386/i386.c (ix86_compute_frame_layout): Do not add + bottom alignment for leaf functions. + + 2002-05-28 Zack Weinberg + + * config/pa/milli32.S, config/pa/lib1funcs.asm, + config/sparc/sol2-g1.asm: Delete unused files. + + 2002-05-28 Richard Henderson + + * cfg.c (dump_flow_info): Print bb->index, not i, for block number. + + * flow.c (calculate_global_regs_live): Rename call_used to + invalidated_by_call. Initialize from regs_invalidated_by_call + instead of call_used_regs. + + * varasm.c (default_binds_local_p): Check TREE_PUBLIC before + DECL_EXTERNAL. + + 2002-05-28 Zack Weinberg + + * tree.h: Don't include real.h. + Forward-declare struct realvaluetype. + (struct tree_real_cst): Point to the REAL_VALUE_TYPE, do not + contain it. + (TREE_REAL_CST_PTR): New accessor. + (TREE_REAL_CST): Update. + * real.h: Include machmode.h. + (realvaluetype): Make it struct realvaluetype, not a typedef. + (build_real): Prototype here. + + * tree.c: Include real.h. + (build_real): Allocate the REAL_VALUE_TYPE as a separate + object in GC memory, set TREE_REAL_CST_PTR to point to it. + (build_real_from_int_cst): Use build_real. + * ggc-common.c (ggc_mark_trees): Mark TREE_REAL_CST_PTR of a + REAL_CST. + + * builtins.c, c-common.c, c-lex.c, dwarf2out.c, expr.c, + fold-const.c, print-tree.c, real.c: Include real.h. + * Makefile.in: Update dependency lists. + + 2002-05-28 Zdenek Dvorak + + * basic-block.h (last_basic_block): Declare. + (expunge_block_nocompact): Declaration removed. + (compact_blocks): Declare. + * cfg.c (last_basic_block): New variable. + (expunge_block_nocompact): Removed. + (expunge_block): Do not compact basic blocks. + (compact_blocks): New. + * cfganal.c (flow_call_edges_add): Use the fact that bb indices no + longer change. + * cfgbuild.c (find_basic_blocks_1, find_basic_blocks): Set + last_basic_block. + * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Do not change + real positions of blocks. + (delete_unreachable_blocks): Simplified -- quadratic behavior now + cannot occur. + (cleanup_cfg): Compact blocks. + * cfgrtl.c (create_basic_block): Insert basic blocks to the end of + basic_block_info varray. + (flow_delete_block): Comment update. + (back_edge_of_syntactic_loop_p): Modify position check code. + (verify_flow_info): Update checking. + * flow.c (calculate_global_regs_live): Use FOR_EACH_BB. + * ifcvt.c (SET_ORIG_INDEX, ORIG_INDEX): Removed. + (find_if_case_1, find_if_case_2, if_convert): Use the fact that bb + indices no longer change. + * lcm.c (optimize_mode_switching): Replace n_basic_blocks with + last_basic_block. + * predict.c (estimate_bb_frequencies): Remove unneccessary code. + * profile.c (branch_prob): Compact blocks. + * sched-rgn.c (find_rgns): Replace n_basic_blocks with + last_basic_block. + + 2002-05-28 Kazu Hirata + + * config/h8300/h8300.md (two anonymous patterns): New. + + 2002-05-28 David S. Miller + + * config/sparc/sparc.md (cpu): Tidy. + (type): Delete 'return', add 'ialuX', 'flushw', 'iflush', and + 'trap'. + (in_call_delay): Delete reference to 'return' type. + (eligible_for_return_delay, in_return_delay, define_delay + referencing those): Delete. + (rest of file): Use new type attributes as appropriate. + * config/sparc/sparc-protos.h (eligible_for_return_delay): Delete. + * config/sparc/sparc.c (eligible_for_return_delay): Likewise. + * config/sparc/ultra1_2.md (us1_single): New reservation. + (us1_ialuX): Likewise. + * config/sparc/ultra3.md (us3_single): Likewise. + (us3_ialuX): Likewise. + (us3_imul, us3_idiv): Tweak. + + 2002-05-28 Richard Henderson + + * config/alpha/alpha.c (alpha_in_small_data_p): Return false for + STRING_CST. + + 2002-05-28 Richard Henderson + + * config.gcc: Obsolete mn10200. + + 2002-05-28 Neil Booth + + * cppexp.c (interpret_number): Optimize for single-digit + and less-than-half-precision cases. + (num_trim, num_positive, num_div_op): Cast constants. + + 2002-05-27 Bo Thorsen + + * config/i386/libgcc-x86_64-glibc.ver: Copy this file from the + 3.1 branch. The file was made by Jakub Jelinek. + * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Add i386 + support so multilib doesn't break. And don't define this at all + when -Dinhibit_libc is used. + (MULTILIB_DEFAULTS): Always set default to 64 bit compilation. + * config/i386/t-linux64: Implement full multilib support. Patch + originally done by Andreas Jaeger and Jakub Jelinek. + + 2002-05-27 Roger Sayle + + * c-common.c: Add support for __attribute__((nothrow)) to specify + that a function cannot throw an exception (using TREE_NOTHROW). + (handle_nothrow_attribute): New function to process this attribute. + + * doc/extend.texi: Document the new nothrow function attribute. + + 2002-05-27 H.J. Lu (hjl@gnu.org) + + * cppexp.c (num_trim): Use 1UL instead of 1 for long int. + (num_positive): Likewise. + (num_div_op): Likewise. + + 2002-05-27 Neil Booth + + * c-common.c (c_common_init): Always use intmax_t. + + 2002-05-27 Neil Booth + + * c-common.c (c_common_init): Use intmax_t for now. + + 2002-05-24 Andrew Haley + + * fold-const.c (fold): Don't convert (T)(x & c) into (T)x & (T)c + if T is a boolean type. + + 2002-05-27 Zdenek Dvorak + + * basic-block.h (last_basic_block): Defined as synonym for + n_basic_blocks. + * cfganal.c (mark_dfs_back_edges, flow_reverse_top_sort_order_compute, + flow_depth_first_order_compute, flow_preorder_transversal_compute, + flow_dfs_compute_reverse_init): Replaced relevant occurences of + n_basic_blocks with last_basic_block. + * cfgbuild.c (make_edges): Likewise. + * cfgloop.c (flow_loop_scan, flow_loops_find): Likewise. + * cfgrtl.c (verify_flow_info, purge_all_dead_edges): Likewise. + * combine.c (combine_instructions): Likewise. + * df.c (df_alloc, df_analyse_1, df_analyse, iterative_dataflow_sbitmap, + iterative_dataflow_bitmap): Likewise. + * dominance.c (init_dom_info, calc_dfs_tree_nonrec, calc_dfs_tree, + calc_idoms, idoms_to_doms): Likewise. + * flow.c (update_life_info_in_dirty_blocks, free_basic_block_vars): + Likewise. + * gcse.c (gcse_main, alloc_gcse_mem, compute_local_properties, + compute_hash_table, expr_reaches_here_p, one_classic_gcse_pass, + one_cprop_pass, compute_pre_data, pre_expr_reaches_here_p, + one_pre_gcse_pass, compute_transpout, delete_null_pointer_checks_1, + delete_null_pointer_checks, compute_code_hoist_vbeinout, + hoist_expr_reaches_here_p, hoist_code, one_code_hoisting_pass, + compute_store_table, build_store_vectors): Likewise. + * haifa-sched.c (sched_init): Likewise. + * ifcvt.c (if_convert): Likewise. + * lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete, + pre_edge_lcm, compute_available, compute_nearerout, + compute_rev_insert_delete, pre_edge_rev_lcm, optimize_mode_switching): + Likewise. + * predict.c (estimate_probability, process_note_prediction, + note_prediction_to_br_prob): Likewise. + * profile.c (GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): Likewise. + * recog.c (split_all_insns, peephole2_optimize): Likewise. + * regrename.c (copyprop_hardreg_forward): Likewise. + * resource.c (init_resource_info): Likewise. + * sched-rgn.c (build_control_flow, find_rgns, compute_trg_info, + init_regions, schedule_insns): Likewise. + * ssa-ccp.c (ssa_const_prop): Likewise. + * ssa-dce.c (ssa_eliminate_dead_code): Likewise. + * ssa.c (compute_dominance_frontiers, + compute_iterated_dominance_frontiers, convert_to_ssa): Likewise. + + * df.c (df_refs_unlink): Fix FOR_EACH_BB usage (in #if 0'ed code) + * gcse.c (alloc_rd_mem, alloc_avail_expr_mem): Use n_blocks for vector + sizes consistently. + + Mon May 27 14:28:12 CEST 2002 Jan Hubicka + + * basic-block.h (can_hoist_p, hoist_insn_after, hoist_insn_to_edge): + new. + * rtlanal.c (hoist_test_store, can_hoist_insn_p, hoist_update_store, + hoist_insn_after, hoist_insn_to_edge): New. + + Mon May 27 12:14:02 CEST 2002 Jan Hubicka + + * basic-block.h (PEOP_SCAN_DEAD_STORES): New. + (PROP_FINAL): Include. + * flow.c (life_analysis, update_life_info, + init_propagate_block_info, mark_set_1, mark_used_rgs): + Support SCAN_DEAD_STORE. + + 2002-05-27 Neil Booth + + * c-common.c (c_common_init): Set CPP arithmetic precision. + * cppexp.c (cpp_num_part): Move typedef ... + * cpphash.h: ...here; make unsigned HOST_WIDE_INT. + * cppinit.c (cpp_create_reader): Default to host long arithmetic. + (sanity_checks): Update. + + 2002-05-26 Geoffrey Keating + + * Makefile.in (INSTALL_HEADERS): Add 'install-mkheaders'. + (mkheaders): New rule. + (install-mkheaders): New rule. + * configure.in (all_outputs): Add mkheaders. + * configure: Regenerate. + * mkheaders.in: New file. + + 2002-05-26 Jakub Jelinek + + * cse.c (fold_rtx): Don't optimize if SUBREG changes mode class. + + 2002-05-26 Andreas Jaeger + + * cfg.c (dump_flow_info): Remove extra argument to fprintf. + + 2002-05-26 Neil Booth + + * cppexp.c (possible_sum_sign, integer_overflow, left_shift, + right_shift): Remove. + (cpp_num, cpp_num_part, PART_PRECISION, HALF_MASK, LOW_PART, + HIGH_PART): New. + (struct op): Use cpp_num. + (num_zerop, num_eq, num_positive, num_greater_freq, num_trim, + num_part_mul, num_unary_op, num_binary_op, num_negate, + num_bitwise_op, num_inequality_op, num_equality_op, num_mul, + num_div_op, num_lshift, num_rshift, append_digit): New. + (interpret_number, parse_defined, eval_token, reduce): Update + for two-integer arithmetic. + (binary_handler): New typedef. + (optab): Update. + (COMPARE, EQUALITY, BITWISE, MINMAX, UNARY, SHIFT): Delete. + (_cpp_parse_expr, reduce): Update to handle two-integers. + * cpplib.c (_cpp_test_assertion): Back up on CPP_EOF. + + 2002-05-26 Marek Michalkiewicz + + * config/avr/avr-protos.h (avr_out_sbxx_branch): Declare. + * config/avr/avr.c (jump_over_one_insn_p): Take length of the + branch insn into account, do not assume 1. + (avr_out_sbxx_branch): New function. Optimize cases of skipping + over single word insn. Handle upper half of I/O space too. + * config/avr/avr.md (*sbrx_branch): Use it. + (*sbrx_and_branchhi, *sbrx_and_branchsi): Likewise. + (*sbix_branch, *sbix_branch_bit7): Likewise. + (*sbix_branch_tmp, *sbix_branch_tmp_bit7): New. + Use RTL peepholes to optimize register operand sign tests. + + 2002-05-26 Marek Michalkiewicz + + * config/avr/avr.c (avr_asm_only_p): New variable. + (avr_override_options): Set it here if AVR1. + (asm_file_start): Test it here, report an error if set. + + 2002-05-26 Kazu Hirata + + * alias.c: Fix formatting. + * attribs.c: Likewise. + * bb-reorder.c: Likewise. + * bitmap.c: Likewise. + * bitmap.h: Likewise. + * builtins.c: Likewise. + + Sun May 26 14:00:44 CEST 2002 Jan Hubicka + + * reload.c (find_valid_class): Accept new argument DEST, + choose class accordingly. + (push_reload): Update callers. + + 2002-05-26 Andreas Jaeger + + * combine.c (combine_instructions): Do not indent #if for + traditional C. + + 2002-05-25 Richard Henderson + + * c-pragma.c (apply_pragma_weak): Convert value identifier to + string for decl_attributes. + (handle_pragma_weak): Call assemble_alias if we're modifying + an existing decl. + + 2002-05-25 Richard Henderson + + PR target/6788 + * config/sparc/sparc.c (sparc_output_mi_thunk): New implementation + using rtl instead of fprintf. + * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Use it. + * config/sparc/sparc-protos.h: Update. + + 2002-05-25 Neil Booth + + * Makefile.in (C_COMMON_H): Fix. + Update other targets. + * c-common.c: Don't include c-lex.h. + (builtin_define_with_value): Make static and prototype. + (builtin_define_std): Move from c-lex.h. + * c-common.h (init_c_lex): Move from c-lex.h. + * c-decl.c: Don't include c-lex.h. + (make_pointer_declarator): Move from c-parse.in. + * c-lex.c: Don't include c-lex.h. + * c-lex.h: Remove. + * c-parse.in: Don't include c-lex.h; include c-pragma.h. + (make_pointer_declarator): Move to c-decl.c. + * c-pragma.c: Don't include c-lex.h. + * c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h. + * c-tree.h (make_pointer_declarator): New. + doc: + * passes.texi, tm.texi: Update. + objc: + * Make-lang.in: Update and correct. + * objc-act.c: Don't include c-lex.h or cpplib.h. + treelang: + * treetree.c: Don't include c-lex.h. + config: + * darwin-c.c: Don't include c-lex.h. + * c4x/c4x-c.c: Don't include c-lex.h. + * c4x/t-c4x: Update. + * i370/i370-c.c: Don't include c-lex.h. + * i370/t-i370: Update. + * i960/i960-c.c: Don't include c-lex.h. + * i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h. + * i960/t-960bare: Update. + * i960/t-vxworks: Update. + * rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h. + * rs6000/t-darwin: Update. + * rs6000/t-rs6000-c-rule: Update. + * v850/v850-c.c: Don't include c-lex.h. + * v850/v850.c: Don't include c-lex.h or cpplib.h. + + + 2002-05-25 Kazu Hirata + + * tree.def: Fix typos. + * doc/install.texi: Likewise. + + 2002-05-25 Richard Henderson + + * configure.in (HAVE_AS_TLS): Add ia64 test. + * configure: Rebuild. + * config/ia64/ia64.c (ia64_tls_size_string, ia64_tls_size): New. + (override_options): Set it. + (TARGET_HAVE_TLS): New. + (sdata_symbolic_operand): Look for 's'. + (tls_symbolic_operand): New. + (ia64_expand_load_address): Abort for tls symbols. + (gen_tls_get_addr): New. + (gen_thread_pointer): New. + (ia64_expand_move): Split out from movdi. Handle tls symbols. + (rtx_needs_barrier): Add new unspecs. + (ia64_encode_section_info): Handle tls symbols. + (ia64_strip_name_encoding): Strip two encoding chars. + * config/ia64/ia64.h (ia64_tls_size, ia64_tls_size_string): New. + (TARGET_TLS14, TARGET_TLS22, TARGET_TLS64): New. + (TARGET_OPTIONS): Add tls-size. + (ENCODE_SECTION_INFO_CHAR): Rename from SDATA_NAME_FLAG_CHAR. + * config/ia64/ia64.md (UNSPEC_LTOFF_DTPMOD, UNSPEC_LTOFF_DTPREL, + UNSPEC_DTPREL, UNSPEC_LTOFF_TPREL, UNSPEC_TPREL, UNSPEC_LD_BASE): New. + (movqi, movhi, movsi, movdi, movti): Use ia64_expand_move. + (movsf, movdf): Likewise. + (movdi_symbolic): Use match_scratch. Don't split if we won't + have a scratch availiable. + (load_ltoff_dtpmod, load_dtprel, load_dtprel64, load_dtprel22, + add_dtprel, add_dtprel14, add_dtprel22, load_ltoff_tprel, load_tprel, + load_tprel64, load_tprel22, add_tprel, add_tprel14, add_tprel22): New. + * config/ia64/ia64-protos.h: Update. + * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use + sdata_symbolic_operand. + (ASM_OUTPUT_LABELREF): Strip two characters. + + 2002-05-25 Kazu Hirata + + * combine.c (simplify_set): Remove an unnecessary subreg. + + 2002-05-25 Marek Michalkiewicz + + * config/avr/avr.c (avr_handle_progmem_attribute): Handle TYPE_DECL. + + * config/avr/avr.h (BSS_SECTION_ASM_OP, ASM_OUTPUT_BSS): New. + + 2002-05-25 Gabriel Dos Reis + + * toplev.c (output_clean_symbol_name): Fix another thinko. Gosh. + + 2002-05-25 Roger Sayle + + * simplify-rtx.c (simplify_gen_relational): Simplify the RTX + (cond (compare x y) 0) into the equivalent (cond x y). + + 2002-05-25 Gabriel Dos Reis + + * toplev.c (output_clean_symbol_name): Use xstrdup. Fix thinko. + + 2002-05-24 Zack Weinberg + + * config.gcc: Remove all stanzas for previously obsoleted + systems. Where necessary, add explicit error stanzas to + prevent removed systems from being misidentified as something + else. Begin a fresh obsoletions list, with the systems that + were reprieved last round. + * doc/install.texi: Remove all mention of dead targets. + * fixinc/mkfixinc.sh: Likewise. + + * config/arm/arm.h: Bit 31 of target_flags is no longer + reserved. + + * config/1750a/1750a-protos.h, config/1750a/1750a.c, + config/1750a/1750a.h, config/1750a/1750a.md, config/1750a/ms1750.inc, + config/a29k/a29k-protos.h, config/a29k/a29k.c, config/a29k/a29k.h, + config/a29k/a29k.md, config/a29k/rtems.h, config/a29k/t-a29kbare, + config/a29k/t-vx29k, config/a29k/unix.h, config/a29k/vx29k.h, + config/alpha/osf12.h, config/alpha/osf2or3.h, + config/arm/arm-wince-pe.h, config/arm/arm.h, config/arm/riscix.h, + config/arm/riscix1-1.h, config/arm/rix-gas.h, config/arm/t-riscix, + config/clipper/clipper-protos.h, config/clipper/clipper.c, + config/clipper/clipper.h, config/clipper/clipper.md, + config/clipper/clix.h, config/convex/convex-protos.h, + config/convex/convex.c, config/convex/convex.h, + config/convex/convex.md, config/convex/fixinc.convex, + config/convex/proto.h, config/elxsi/elxsi-protos.h, + config/elxsi/elxsi.c, config/elxsi/elxsi.h, config/elxsi/elxsi.md, + config/i386/386bsd.h, config/i386/aix386.h, config/i386/aix386ng.h, + config/i386/bsd386.h, config/i386/dgux.h, config/i386/djgpp-rtems.h, + config/i386/isc.h, config/i386/iscdbx.h, config/i386/linux-oldld.h, + config/i386/next.h, config/i386/osf1-ci.asm, config/i386/osf1-cn.asm, + config/i386/osf1elf.h, config/i386/osf1elfgdb.h, config/i386/osfelf.h, + config/i386/osfrose.h, config/i386/rtems.h, config/i386/seq-gas.h, + config/i386/seq-sysv3.h, config/i386/seq2-sysv3.h, + config/i386/sequent.h, config/i386/sun.h, config/i386/sun386.h, + config/i386/t-dgux, config/i386/t-next, config/i386/t-osf, + config/i386/t-osf1elf, config/i860/bsd-gas.h, config/i860/bsd.h, + config/i860/fx2800.h, config/i860/i860-protos.h, config/i860/i860.c, + config/i860/i860.h, config/i860/i860.md, config/i860/mach.h, + config/i860/paragon.h, config/i860/sysv3.h, config/i860/sysv4.h, + config/i860/t-fx2800, config/i860/varargs.asm, config/m68k/a-ux.h, + config/m68k/altos3068.h, config/m68k/apollo68.h, + config/m68k/aux-crt1.c, config/m68k/aux-crt2.asm, + config/m68k/aux-crtn.asm, config/m68k/aux-exit.c, + config/m68k/aux-low.gld, config/m68k/aux-mcount.c, + config/m68k/auxas.h, config/m68k/auxgas.h, config/m68k/auxgld.h, + config/m68k/auxld.h, config/m68k/ctix.h, config/m68k/dpx2.h, + config/m68k/dpx2.ifile, config/m68k/dpx2cdbx.h, config/m68k/dpx2g.h, + config/m68k/isi-nfp.h, config/m68k/isi.h, config/m68k/lynx-ng.h, + config/m68k/lynx.h, config/m68k/math-3300.h, config/m68k/news.h, + config/m68k/news3.h, config/m68k/news3gas.h, config/m68k/newsgas.h, + config/m68k/next.h, config/m68k/next21.h, config/m68k/rtems.h, + config/m68k/t-aux, config/m68k/t-lynx, config/m68k/t-next, + config/m68k/x-next, config/m88k/dgux.h, config/m88k/dgux.ld, + config/m88k/dguxbcs.h, config/m88k/dolph.h, config/m88k/dolphin.ld, + config/m88k/luna.h, config/m88k/m88k-coff.h, config/m88k/sysv3.h, + config/m88k/t-bug, config/m88k/t-dgux, config/m88k/t-dgux-gas, + config/m88k/t-dguxbcs, config/m88k/t-dolph, config/m88k/t-m88k-gas, + config/m88k/t-tekXD88, config/m88k/tekXD88.h, config/m88k/tekXD88.ld, + config/mips/bsd-4.h, config/mips/bsd-5.h, config/mips/dec-bsd.h, + config/mips/dec-osf1.h, config/mips/elflorion.h, + config/mips/iris4loser.h, config/mips/mips-5.h, config/mips/news4.h, + config/mips/news5.h, config/mips/nws3250v4.h, config/mips/osfrose.h, + config/mips/svr3-4.h, config/mips/svr3-5.h, config/mips/svr4-4.h, + config/mips/svr4-5.h, config/mips/svr4-t.h, config/mips/t-bsd, + config/mips/t-bsd-gas, config/mips/t-svr3, config/mips/t-svr3-gas, + config/mips/t-svr4, config/mips/t-svr4-gas, config/mips/t-ultrix, + config/mips/ultrix.h, config/nextstep-protos.h, config/nextstep.c, + config/nextstep.h, config/nextstep21.h, config/ns32k/encore.h, + config/ns32k/merlin.h, config/ns32k/pc532-mach.h, + config/ns32k/pc532-min.h, config/ns32k/pc532.h, + config/ns32k/sequent.h, config/ns32k/tek6000.h, + config/ns32k/tek6100.h, config/ns32k/tek6200.h, config/pj/lib1funcs.S, + config/pj/linux.h, config/pj/pj-protos.h, config/pj/pj.c, + config/pj/pj.h, config/pj/pj.md, config/pj/pjl.h, config/pj/t-pj, + config/sparc/rtems.h, config/we32k/we32k-protos.h, + config/we32k/we32k.c, config/we32k/we32k.h, config/we32k/we32k.md: + Delete file. + + 2002-05-24 Richard Henderson + + * flags.h (TLS_MODEL_GLOBAL_DYNAMIC): Set to 1. + * toplev.c (flag_tls_default) Set to TLS_MODEL_GLOBAL_DYNAMIC. + * config/i386/i386.c (tls_model_chars): Add leading space. + (tls_symbolic_operand): Don't bias by 1. + (legitimize_address): Don't unbias by 1. + + 2002-05-24 Toshiyasu Morita + + * lcm.c (optimize_mode_switching): Change bb used as indices + to bb->index. + + 2002-05-24 Richard Henderson + + * config/ia64/ia64.c (ia64_reorg): Use update_life_info instead + of update_life_info_in_dirty_blocks. + + 2002-05-24 Jakub Jelinek + + PR other/6782 + * final.c (get_mem_expr_from_op): Return 0 if op is NULL. + + 2002-05-24 Neil Booth + + PR preprocessor/6780 + * cppmacro.c (enter_macro_context): Clear state.angled_headers. + + 2002-05-24 Jim Blandy + + * dwarf2out.c (dwarf2out_finish): Don't forget to emit a final + entry with a type code of zero, marking the end of the compilation + unit's macro info. + + 2002-05-24 Richard Henderson + + * varasm.c (asm_output_bss): Always output one byte. + * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise. + + 2002-05-24 Bryce McKinlay + + * tree.c (decl_type_context): Return NULL_TREE if decl's context is a + namespace. + + 2002-05-24 Andreas Jaeger + + * ggc-page.c (alloc_page): Cast variables of type size_t to + unsigned long, adjust printf format string. + (ggc_alloc): Likewise. + (ggc_print_statistics): Likewise. + (ggc_print_statistics): Correct printf format string for SCALE to + use unsigned long. + + 2002-05-24 Danny Smith + + * config/i386/mingw32.h (CPP_SPEC): Remove -remap. + + 2002-05-23 Gabriel Dos Reis + Zack Weinberg + + * config/i386/mingw32.h (OUTPUT_QUOTED_STRING): Properly output + quoted strings. + * dwarf2out.c (lookup_filename): Properly quote filename in .file + directive in assembly file. + * config/m68k/dpx2.h (ASM_OUTPUT_SOURCE_FILENAME): Likewise. + * config/m88k/m88k.h (ASM_OUTPUT_SOURCE_FILENAME): Likewise. + * config/pj/pj.h (ASM_FILE_START): Likewise. + * config/rs6000/xcoff.h (ASM_FILE_START): Likewise. + * config/avr/avr.c (asm_file_end): Likewise. + * toplev.c (output_quoted_string): Handle possibly signed plain + char. + * toplev.h (output_clean_symbol_name): Declare + * toplev.c (output_clean_symbol_name): Define. + * config/alpha/alpha.c (unicosmk_output_module_name): Use it. + * config/1750a/1750a.h (ASM_FILE_START): Likewise. + + 2002-05-24 Alan Modra + + * config/rs6000/rs6000.c (output_toc): Mask longs to 32 bits. + + 2002-05-23 Vladimir Makarov + + * genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4 + of size of unsigned. + + 2002-05-23 Richard Henderson + + * configure.in (HAVE_AS_TLS): New test. + * config.in, configure: Rebuild. + * config/i386/i386.c (TARGET_HAVE_TLS): Set if HAVE_AS_TLS. + (ix86_tls_dialect_string, ix86_tls_dialect): New. + (override_options): Set it. + (tls_model_chars, tls_symbolic_operand): New. + (tls_symbolic_operand_1, global_dynamic_symbolic_operand): New. + (local_dynamic_symbolic_operand, initial_exec_symbolic_operand): New. + (local_exec_symbolic_operand): New. + (get_pic_label_name): Merge into output_set_got. + (ix86_asm_file_end): Emit pic_label_name if defined. + (legitimate_constant_p, constant_address_p): New. + (legitimate_pic_operand_p): New. + (legitimate_pic_address_disp_p): Handle GOTTPOFF, NTPOFF, DTPOFF. + (legitimate_address_p): Likewise. + (ix86_encode_section_info): Rename from i386_; handle tls decls. + (ix86_strip_name_encoding): New. + (get_thread_pointer): New. + (legitimize_address): Handle tls symbols. + (output_pic_addr_const): Handle GOTTPOFF, TPOFF, NTPOFF, DTPOFF. + Remove UNSPEC_PLT. + (struct machine_function): Add some_ld_name. + (get_some_local_dynamic_name, get_some_local_dynamic_name_1): Set it. + (print_operand) [&]: Use it. Handle UNSPEC_TP. + (output_addr_const_extra): New. + (maybe_get_pool_constant): New. + (ix86_split_to_parts): Use it. + (ix86_expand_move): Handle tls symbols. + (ix86_tls_get_addr): New. + * config/i386/i386.h (TARGET_GNU_TLS, TARGET_SUN_TLS): New. + (TARGET_OPTIONS): Add tls-dialect. + (CONSTANT_ADDRESS_P): Use new out-of-line function. + (LEGITIMATE_CONSTANT_P): Likewise. + (LEGITIMATE_PIC_OPERAND_P): Likewise. + (TARGET_STRIP_NAME_ENCODING): New. + (ASM_OUTPUT_LABELREF): New. + (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. + (OUTPUT_ADDR_CONST_EXTRA): New. + (PREDICATE_CODES): Update. + (ix86_tls_dialect, ix86_tls_dialect_string): New. + * config/i386/i386.md: Regroup and renumber unspec constants. + (tls_global_dynamic_gnu, tls_global_dynamic_sun): New. + (tls_local_dynamic_base_gnu, tls_local_dynamic_base_sun): New. + (tls_global_dynamic, tls_local_dynamic_base): New. + (tls_local_dynamic_once): New. + * config/i386/i386-protos.h: Update. + + 2002-05-23 Richard Henderson + + * genemit.c (gen_insn): Print file:lineno comment before function. + (main): likewise. + * gensupport.c (struct queue_elem): Add filename member. + (queue_pattern): Initialize it; update all callers. + (process_include): Don't free filename. + (read_md_rtx): Set read_rtx_filename. + + 2002-05-23 Hans Boehm + + * config/ia64/linux.h (IA64_GATE_AREA_END): Adjust for 64K pages. + + 2002-05-23 Richard Henderson + + * config/i386/i386.c (output_set_got): Fix typo in pic no-deep case. + + 2002-05-23 Richard Henderson + + * doc/extend.texi (C++98 Thread-Local Edits): Update with + commentary from Mark. + + 2002-05-23 Zdenek Dvorak + + * bb-reorder.c (make_reorder_chain, make_reorder_chain_1): + Use FOR_EACH_BB macros to iterate over basic block chain. + * cfg.c (clear_edges, clear_bb_flags, dump_flow_info, + alloc_aux_for_blocks, clear_aux_for_blocks, alloc_aux_for_edges): + Likewise. + * cfganal.c (set_edge_can_fallthru_flag, flow_call_edges_add, + find_unreachable_blocks, create_edge_list, verify_edge_list, + remove_fake_edges, add_noreturn_fake_exit_edges, + flow_preorder_transversal_compute, flow_dfs_compute_reverse_execute): + Likewise. + * cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks, + find_sub_basic_blocks): Likewise. + * cfgcleanup.c (try_optimize_cfg, delete_unreachable_blocks): + Likewise. + * cfglayout.c (record_effective_endpoints, cleanup_unconditional_jumps): + Likewise. + * cfgloop.c (flow_loops_cfg_dump, flow_loops_find): + Likewise. + * cfgrtl.c (compute_bb_for_insn, tidy_fallthru_edges, + commit_edge_insertions, commit_edge_insertions_watch_calls, + print_rtl_with_bb, verify_flow_info, purge_all_dead_edges): Likewise. + * combine.c (combine_instructions, reg_dead_at_p): Likewise. + * conflict.c (conflict_graph_compute): Likewise. + * df.c (df_bitmaps_alloc, df_bitmaps_free, df_alloc, df_analyse_1, + df_modified_p, df_refs_unlink, df_dump): Likewise. + * dominance.c (calc_dfs_tree, calculate_dominance_info): Likewise. + * final.c (compute_alignments): Likewise. + * flow.c (update_life_info, update_life_info_in_dirty_blocks, + delete_noop_moves, calculate_global_regs_live, allocate_bb_life_data, + count_or_remove_death_notes): Likewise. + * gcse.c (oprs_unchanged_p, record_last_reg_set_info, + compute_hash_table, compute_kill_rd, compute_rd, compute_ae_kill, + classic_gcse, compute_transp, cprop, compute_pre_data, + compute_transpout, invalidate_nonnull_info, + delete_null_pointer_checks_1, delete_null_pointer_checks, + compute_code_hoist_vbeinout, hoist_code, compute_ld_motion_mems, + compute_store_table, build_store_vectors, store_motion): Likewise. + * global.c (global_conflicts, mark_elimination): Likewise. + * graph.c (print_rtl_graph_with_bb): Likewise. + * haifa-sched.c (sched_init): Likewise. + * ifcvt.c (if_convert): Likewise. + * lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete, + compute_available, compute_nearerout, compute_rev_insert_delete, + optimize_mode_switching): Likewise. + * local-alloc.c (local_alloc, update_equiv_regs): Likewise. + * predict.c (estimate_probability, note_prediction_to_br_prob, + propagate_freq, counts_to_freqs, expensive_function_p, + estimate_bb_frequencies): Likewise. + * profile.c (instrument_edges, get_exec_counts, + compute_branch_probabilities, compute_checksum, branch_prob, + find_spanning_tree): Likewise. + * recog.c (split_all_insns, peephole2_optimize): Likewise. + * reg-stack.c (reg_to_stack, convert_regs_entry, convert_regs): + Likewise. + * regclass.c (scan_one_insn, regclass): Likewise. + * regmove.c (mark_flags_life_zones, regmove_optimize, + record_stack_memrefs): Likewise. + * regrename.c (regrename_optimize, copyprop_hardreg_forward): Likewise. + * reload1.c (reload, reload_combine, fixup_abnormal_edges): Likewise. + * resource.c (find_basic_block): Likewise. + * sched-ebb.c (schedule_ebbs): Likewise. + * sched-rgn.c (is_cfg_nonregular, build_control_flow, + find_single_block_region, find_rgns, schedule_insns) + * sibcall.c (optimize_sibling_and_tail_recursive_call) + * ssa-ccp.c (optimize_unexecutable_edges, + ssa_ccp_df_delete_unreachable_insns): Likewise. + * ssa-dce.c (ssa_eliminate_dead_code): Likewise. + * ssa.c (find_evaluations, compute_dominance_frontiers_1, + rename_block, convert_to_ssa, compute_conservative_reg_partition, + compute_coalesced_reg_partition, rename_equivalent_regs, + convert_from_ssa): Likewise. + * config/ia64/ia64.c (emit_predicate_relation_info, process_epilogue, + process_for_unwind_directive): Likewise. + + * df.c (FOR_ALL_BBS): Removed. + * gcse.c (struct null_pointer_info): Type of current_block field + changed. + (struct reg_avail_info): Type of last_bb field changed. + * config/ia64/ia64.c (block_num): Removed. + (need_copy_state): Type changed. + (last_block): New. + + 2002-05-23 Neil Booth + + * cppinit.c (mark_named_operators): Split out from init_builtins. + (cpp_finish_options): Call it from here instead. + + 2002-05-23 Jason Thorpe + + * builtin-attrs.def: Update copyright years. + (ATTR_NONNULL): New attribute identifier. + (ATTR_NONNULL_1, ATTR_NONNULL_2, ATTR_NONNULL_3): New + attribute tree lists. + (DEF_FORMAT_ATTRIBUTE): Chain a nonnull attribute for the + format operand. + (ATTR_FORMAT_ARG_1, ATTR_FORMAT_ARG_2): Use... + (DEF_FORMAT_ARG_ATTRIBUTE): ...this to generate format_arg + attribute lists. Chain the appropriate nonnull attribute. + * c-format.c (check_format_arg): Remove null format string + warning. + * testsuite/gcc.dg/format/null-1.c: New test. + + 2002-05-23 Rainer Orth + + * Makefile.in (ADAC): Define. + (SYSLIBS): Define. + (.SUFFIXES): Move before language makefile fragments. + (STAGE2_FLAGS_TO_PASS): Use stage CC as ADAC. + + 2002-05-23 Mark Mitchell + + * varasm.c (make_decl_rtl): Don't allow weak variables to be + placed in common. + + Thu May 23 19:43:41 CEST 2002 Jan Hubicka + + * cfg.c (dump_flow_info): Print results of + maybe_hot/probably_never_executed predicates. + * toplev.c (open_dump_file): Print function frequency. + + 2002-05-23 David S. Miller + + * cse.c (approx_reg_cost_1, approx_reg_cost): Recode to not use + regsets. + + 2002-05-23 Jason Thorpe + + * c-common.c (warn_nonnull): Declare. + (c_common_attribute_table): Add "nonnull" attribute. + (handle_nonnull_attribute, check_function_nonnull, nonnull_check_p, + check_nonnull_arg, get_nonnull_operand, check_function_arguments, + check_function_arguments_recurse): New functions. + * c-common.h (warn_nonnull): Declare extern. + (check_function_arguments, check_function_arguments_recurse): New + prototypes. + * c-decl.c (c_decode_option): Add -Wnonnull option. + * c-format.c (set_Wformat): Set warn_nonnull if enabling + format checking. + (format_check_context): New structure. + (check_format_info_recurse): Remove recursion and rename to... + (check_format_arg): ...this. Update comment. + (check_format_info): Use check_function_arguments_recurse. + * c-typeck.c (build_function_call): Call check_function_arguments + instead of check_function_format. + * doc/extend.texi: Document "nonnull" attribute. + * doc/invoke.texi: Docuemnt -Wnonnull option. + * testsuite/gcc.dg/nonnull-1.c: New test. + * testsuite/gcc.dg/nonnull-2.c: New test. + + 2002-05-23 David S. Miller + + * basic-block.h (CLEANUP_NO_INSN_DEL): Define it. + * cfgcleanup.c (cleanup_cfg): If it is set do not + attempt to delete trivially dead insns. + * except.c (finish_eh_generation): Pass it to cleanup_cfg. + * toplev.c (rest_of_compilation): Document non-trivial aspect + the RTL before optimize_save_area_alloca is run. + + 2002-05-23 Neil Booth + + * c-lex.c (indent_level): Remove. + (cb_file_change, c_lex): Remove indent level handling. + * c-lex.h (indent_level): Remove. + * input.h (struct file_stack): Remove indent_level. + * toplev.c (push_srcloc): Remove indent_level handling. + + 2002-05-23 Jakub Jelinek + + PR target/6753 + * config/i386/i386.md (sse_movdfcc, sse_movdfcc_eq): Use Y instead + of x in constraints for clarity. + (sse_mov?fcc split): abort if op2 == op3. + (sse_movsfcc_const0_1, sse_movsfcc_const0_2, sse_movsfcc_const0_3, + sse_movsfcc_const0_4): Add earlyclobber. + (sse_movdfcc_const0_1, sse_movdfcc_const0_2, sse_movdfcc_const0_3, + sse_movdfcc_const0_4): Likewise. Use DFmode, not SFmode. + Use Y instead of x in constraints. + + 2002-05-23 Richard Henderson + + * doc/extend.texi (C99 Thread-Local Edits): New subsection. + (C++98 Thread-Local Edits): New subsection. + + * config/i386/i386.c, config/i386/i386.h: Tidy comments and whitespace. + (ix86_arch): Set type to enum processor_type. + + * config/i386/i386.md (movsi_1, movdi_1_rex64): Use + LEGITIMATE_PIC_OPERAND_P not SYMBOLIC_CONST. + + 2002-05-23 Jakub Jelinek + + * configure.in: Fix as version test for binutils 2.12.1 releases + (without dates). + * configure: Rebuilt. + + 2002-05-23 Richard Henderson + + * config/i386/i386.c (get_pic_label_name): New. + (load_pic_register): Remove. + (output_set_got): New. + (ix86_expand_prologue): Use gen_set_got; mark insn REG_MAYBE_DEAD. + * config/i386/i386.md (UNSPEC_SET_GOT): New. + (UNSPECV_PROLOGUE_SET_GOT, UNSPECV_PROLOGUE_GET_PC): Remove. + (prologue_set_got, prologue_get_pc): Remove. + (set_got, set_got_nopic, set_got_deep, set_got_nodeep): New. + (builtin_setjmp_receiver): Use gen_set_got. + * config/i386/i386-protos.h: Update. + + Thu May 23 09:22:23 CEST 2002 Jan Hubicka + + * gcse.c (hash_expr): Do not use alias set for hashing. + + 2002-05-22 Kevin Buettner + + * dbxout.c (dbxout_class_name_qualifiers): New function. + (dbxout_symbol): Output class/struct qualifiers for a .stabs entry. + + 2002-05-23 Neil Booth + + * cpperror.c (_cpp_begin_message): No special casing + of CPP_FATAL_LIMIT. + * cppinit.c (sanity_checks): s/DL_FATAL/DL_ICE/. + (output_deps, cpp_handle_option, cpp_post_options): Use DL_ERROR. + * cpplib.c (do_include_common): Use DL_ERROR. + * cpplib.h (CPP_FATAL_LIMIT, CPP_FATAL_ERRORS, DL_FATAL): Remove. + (DL_ICE): Renumber. + * fix-header.c (read_scan_file): Update. + + 2002-05-22 Richard Henderson + + * config/i386/i386.c (ix86_expand_call): New function, extracted + from md call patterns. Add pic_offset_table_rtx to + CALL_INSN_FUNCTION_USAGE when needed. + * config/i386/i386.md (call_pop, call): Use ix86_expand_call. + (call_value_pop, call_value, untyped_call): Likewise. + (call_exp, call_value_exp): Remove. + * config/i386/i386-protos.h: Update. + + 2002-05-22 Richard Henderson + + * varasm.c (default_section_type_flags): Check for VAR_DECL + before using DECL_THREAD_LOCAL. + + 2002-05-22 David Edelsohn + + * config/rs6000/aix43.h (LINK_SPEC): Add PE initializer. + (STARTFILE_SPEC): Delete PE crt0.o. + * config/rs6000/aix51.h: Same. + * config/rs6000/rs6000.c: Use TARGET_XCOFF, not OBJECT_FORMAT_COFF. + * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Append [DS] to + function descriptor symbol. Use RS6000_OUTPUT_BASENAME. + (ASM_OUTPUT_DEF_FROM_DECLS): Use RS6000_OUTPUT_BASENAME. + * config/rs6000/xcoff.h (ASM_OUTPUT_DEF): Define. + + 2002-05-22 Richard Henderson + + * varasm.c (default_section_type_flags): Handle tls data and + default sections. + (default_unique_section): Handle tls sections. + + 2002-05-23 Alan Modra + + * configure.in (CROSS): Define NATIVE_CROSS. + * configure: Regenerate. + * gcc.c (STARTFILE_PREFIX_SPEC): Define. + (startfile_prefix_spec): New var. + (static_specs): Add startfile_prefix_spec. + (do_spec_2): Split out from.. + (do_spec): ..here. + (main): Process startfile_prefix_spec. + * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC) Change name of + dynamic linker. + (STARTFILE_PREFIX_SPEC): Define. + (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Rewrite without + absolute paths. + + 2002-05-22 Kazu Hirata + + * cpperror.c: Fix formatting. + * cppexp.c: Likewise. + * cppfiles.c: Likewise. + * cpphash.c: Likewise. + * cpphash.h: Likewise. + * cppinit.c: Likewise. + * cpplex.c: Likewise. + * cpplib.c: Likewise. + * cppmacro.c: Likewise. + * cppmain.c: Likewise. + * cppspec.c: Likewise. + + 2002-05-22 Jakub Jelinek + + * combine.c (force_to_mode): Use gen_int_mode. + Don't clear CONST_INT bits outside of mode. + + 2002-05-22 Richard Henderson + + * fixinc/inclhack.def (thread_keyword): Match __thread as last arg. + * fixinc/fixincl.x, fixinc/tests/base/pthread.h: Rebuild. + + 2002-05-22 Jakub Jelinek + + PR c/6643 + * emit-rtl.c (widen_memory_access): Only call compare_tree_int + if DECL_SIZE_UNIT is INTEGER_CST. + + 2002-05-22 Richard Henderson + + * flow.c (life_analysis): Delete broken reg_label check. + + 2002-05-22 Richard Henderson + + * fixinc/inclhack.def (thread_keyword): Allow as any prototype arg. + * fixinc/fixincl.x, fixinc/tests/base/pthread.h: Rebuild. + + Wed May 22 18:39:57 2002 J"orn Rennecke + + * t-sh (LIB2FUNCS_EXTRA): Now embed-bb.c. + (embed-bb.c): New rule. + * t-sh64 (LIB2FUNCS_EXTRA): Don't change. + * config/sh/embed_bb.c: Delete. + + Wed May 22 18:25:29 2002 J"orn Rennecke + + * c-common.c (cb_register_builtins): Don't indent '#' of #define. + + 2002-05-22 Kazu Hirata + + * config/h8300/h8300.md (*andorqi3): New. + + 2002-05-22 Neil Booth + + PR preprocessor/6517 + * Makefile.in: Update. + * c-common.c (c_common_post_options): Add preprocessor + errors to the error count. + * c-lang.c (c_post_options): Kill. + (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. + * hooks.h: Add header guards. + * langhooks-def.h: Include hooks.h. + (LANG_HOOKS_POST_OPTIONS): Update. + * langhooks.h (struct lang_hooks): Update post_options. + * toplev.c (parse_options_and_default_flags): Update. + objc: + * objc-lang.c (objc_post_options): Kill. + (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. + + 2002-05-21 Bruce Korb + + * fixinc/tests/base/pthread.h(THREAD_KEYWORD_CHECK): add fix check + * fixinc/inclhack.def(thread_keyword): use c_fix = format. + * fixinc/fixincl.x: regen. + + 2002-05-21 Kazu Hirata + + * cfgbuild.c: Fix formatting. + * cfg.c: Likewise. + * cfgcleanup.c: Likewise. + * cfglayout.c: Likewise. + * cfgloop.c: Likewise. + * cfgrtl.c: Likewise. + + 2002-05-21 Richard Henderson + + * c-common.h (enum rid): Add RID_THREAD. + * c-decl.c (start_decl): Do not set DECL_COMMON for tls variables. + (grokdeclarator): Grok __thread. + * c-parse.in (reswords): Add __thread. + (rid_to_yy): Add RID_THREAD. + + * tree.h (DECL_THREAD_LOCAL): New. + (struct tree_decl): Add thread_local_flag. + * print-tree.c (print_node): Dump DECL_THREAD_LOCAL. + * tree.c (staticp): TLS variables are not static. + + * target-def.h (TARGET_HAVE_TLS): New. + * target.h (have_tls): New. + * output.h (SECTION_TLS): New. + * varasm.c (assemble_variable): TLS variables can't be common for now. + (default_section_type_flags): Handle .tdata and .tbss. + (default_elf_asm_named_section): Handle SECTION_TLS. + (categorize_decl_for_section): Handle DECL_THREAD_LOCAL. + + * flags.h (flag_tls_default): Declare. + * toplev.c (flag_tls_default): Define. + (display_help): Display help for it. + (decode_f_option): Set it. + + * doc/extend.texi (Thread-Local): New node describing language-level + thread-local storage. + * doc/invoke.texi (-ftls-model): Document. + + * fixinc/inclhack.def (thread_keyword): New. + * fixinc/fixincl.x: Rebuild. + + 2002-05-21 Jeffrey A Law + + * optabs.c (expand_binop): For double-word integer multiplies, + do not compute intermediate results into something that is + not a register (such as a SUBREG or MEM). + + * i386.c (ix86_sched_reorder_ppro): Fix typo/thinko. + (ix86_sched_reorder): Make sure to initialize scheduling + data even when there's only one insn in the ready queue. + + 2002-05-21 Vladimir Makarov + + * genautomata.c (reserv_sets_hash_value): Fix a typo. + + 2002-05-21 Vladimir Makarov + + * genautomata.c (reserv_sets_hash_value): Define hash_value as + set_el_t. Transform the hash value into unsigned. + (output_cycle_reservs): Fix bug with output of repeated `nothing'. + (transform_3): Add code to process `(A,B)+(D,E)'. + + 2002-05-21 NIIBE Yutaka + + * reload1.c (do_output_reload): Run delete_output_reload + only if optimizing. + + 2002-05-21 Roger Sayle + + PR middle-end/6600 + * expr.c (STORE_MAX_PIECES): New macro to avoid immediate constants + larger than INTEGER_CST. (store_by_pieces_1): Use it here... + (can_store_by_pieces): ... and here to limit the largest mode used. + Add a comment to document this function. + + 2002-05-21 Richard Henderson + + * flow.c (life_analysis): Fix test for deleted label. + + 2002-05-21 Neil Booth + + * doc/tm.texi: Fix typo. + + 2002-05-21 Zack Weinberg + + * c-common.c (c_common_init): Set options->unsigned_char from + flag_signed_char. + (cb_register_builtins): Define __STRICT_ANSI__ and + __CHAR_UNSIGNED__ here... + * cppinit.c (init_builtins): Not here. + (cpp_create_reader): unsigned_char option defaults to 0, not + !DEFAULT_SIGNED_CHAR. + (COMMAND_LINE_OPTIONS, cpp_handle_option): Lose -fsigned-char + and -funsigned-char. + + * cpphash.h (struct spec_nodes): Kill n__STRICT_ANSI__. + * cpphash.c (_cpp_init_hashtable): Don't set it. + * cppmacro.c (builtin_macro) [BT_STDC]: Use the language setting + directly. Clarify comment. + + 2002-05-21 Zdenek Dvorak + + * bb-reorder.c (make_reorder_chain_1): Use prev_bb/next_bb to get to + neighboring basic blocks. Use ENTRY_BLOCK_PTR->next_bb instead of + BASIC_BLOCK (0). Use EXIT_BLOCK_PTR->prev_bb instead of + BASIC_BLOCK (n_basic_blocks - 1). + * cfganal.c (can_fallthru, flow_call_edges_add, + flow_preorder_transversal_compute): Too. + * cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks, + find_sub_basic_blocks): Too. + * cfgcleanup.c (try_simplify_condjump, try_optimize_cfg): Too. + * cfglayout.c (skip_insns_after_block, fixup_reorder_chain, + fixup_fallthru_exit_predecessor, cfg_layout_redirect_edge): Too. + * cfgrtl.c (tidy_fallthru_edges, verify_flow_info): Too. + * combine.c (this_basic_block): Type changed to basic_block. + (combine_instructions, set_nonzero_bits_and_sign_copies, try_combine, + nonzero_bits, num_sign_bit_copies, get_last_value_validate, + get_last_value, distribute_notes, distribute_links): Too. + * final.c (compute_alignments): Too. + * flow.c (regno_uninitialized, regno_clobbered_at_setjmp): Too. + * function.c (thread_prologue_and_epilogue_insns): Too. + * gcse.c (compute_code_hoist_vbeinout): Too. + * global.c (build_insn_chain): Too. + * ifcvt.c (find_if_block, find_cond_trap): Too. + * predict.c (last_basic_block_p, note_prediction_to_br_prob): Too. + * regmove.c (regmove_optimize): Too. + * resource.c (find_basic_block): Too. + * sched-ebb.c (schedule_ebbs): Too. + * ssa-dce.c (find_control_dependence, find_pdom): Too. + + 2002-05-21 Andreas Jaeger + + * cppinit.c (sanity_checks): Avoid printf mismatch warnings. + + 2002-05-21 Richard Henderson + + * reg-stack.c (swap_rtx_condition, subst_stack_regs_pat): Use + unspec names, not numbers. + + 2002-05-21 Joseph S. Myers + + * doc/sourcebuild.texi: Mention snapshot-README and + snapshot-index.html as needing updating for new front ends. + + 2002-05-21 Kaveh R. Ghazi + + * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): Avoid warnings when + disabling checking, and avoid multiple evaluation of RTX. + + 2002-05-21 Richard Earnshaw + + * bitmap.c (bitmap_find_bit): Return early if we have the correct + element cached. + + Tue May 21 10:51:54 CEST 2002 Jan Hubicka + + * profile.c (gen_edge_profiler): Set alias set before the memory is + used. + + 2002-05-20 David S. Miller + + * cselib.c (max_value_regs): New. + (cselib_lookup, cselib_invalidate_regno): Initialize it when + adding new entries to the REG_VALUES table and we are dealing with + a hard register. + (clear_table): Initialize it. + (cselib_invalidate_regno): Use it to determine which hard + registers to scan when mode is not VOIDmode. + + 2002-05-20 Duraid Madina + + * tradcpp.c (fixup_newlines): Use old-style function header. + + 2002-05-20 Krister Walfridsson + + * reload1.c (reload_cse_simplify): Fix typo in rtx code check. + + 2002-05-20 H.J. Lu (hjl@gnu.org) + + Base on suggestions from Zhang Fuxin : + + * config/mips/mips.h (DFMODE_NAN): Defined. + (SFMODE_NAN): Likewise. + + 2002-05-20 Dale Johannesen + + * combine.c (cant_combine_insn_p): Back out my + previous patch. + + 2002-05-20 Kazu Hirata + + * params.c: Fix formatting. + * params.h: Likewise. + * predict.c: Likewise. + * prefix.c: Likewise. + * print-rtl.c: Likewise. + * print-tree.c: Likewise. + * profile.c: Likewise. + + 2002-05-20 H.J. Lu (hjl@gnu.org) + + * gcc/config/mips/linux.h (SDB_DEBUGGING_INFO): Undefine. + + 2002-05-20 Nick Clifton + + * config/arm/arm-wince-pe.h (ASM_SPEC): Pass -mcpu and -march + switches straight on to the assembler, do not abbreviate them. + * config/arm/elf.h (ASM_SPEC): As above. + * config/arm/semi.h (ASM_SPEC): As above. + * config/arm/unknown-elf-oabi.h (ASM_SPEC): As above. + * config/arm/xscale-coff.h (SUBTARGET_ASM_SPEC): Pass + -mcpu=xscale on to the assembler by default. + * config/arm/xscale-elf.h (SUBTARGET_ASM_SPEC): As above. + + 2002-05-20 Richard Henderson + + * cse.c (canon_hash): Reorder do_not_record test. Always + allow pic_offset_table_rtx. + + 2002-05-19 Toon Moene + + * optabs.c (expand_cmplxdiv_wide): Use complex_part_zero_p. + (expand_binop): Ditto (3 times). + + 2002-05-19 Mark Mitchell + + * Makefile.in (distclean): Remove QMTest stuff. + (QMTEST_PATH): New variable. + (QMTESTFLAGS): Likewise. + (QMTESTRUNFLAGS): Likewise. + (QMTEST): Likewise. + (QMTEST_GPP_TESTS): Likewise. + (QMTEST_DIR): Likewise. + (QMTEST_DIR/context): New target. + (qmtest-g++): Likeise. + (qmtest-gui): Likewise. + (QMTEST_DIR/gpp-expected.qmr): Likewise. + + 2002-05-19 Aldy Hernandez + + * config/rs6000/rs6000.h (FUNCTION_VALUE): Only return vectors in + an altivec register if TARGET_ALTIVEC. + + * config/rs600/rs6000.c (rs6000_emit_move): Change VECTOR_MODE_P + to ALTIVEC_VECTOR_MODE. + (rs6000_va_arg): Only vectors of type AltiVec are 16 byte aligned. + (rs6000_va_arg): Vectors may go in registers if they are not + altivec vectors. + + 2002-05-19 Kazu Hirata + + * protoize.c: Fix formatting. + + 2002-05-19 Richard Henderson + + * gensupport.c (init_include_reader): Merge into ... + (process_include): ... here. Simplify composite path creation. + Plug memory leaks. Fix file/line number tracking. Do not + process_define_cond_exec. Return void. + (process_rtx): Don't check process_include return value. + + 2002-05-20 Zdenek Dvorak + + * basic_block.h (struct basic_block_def): Added prev_bb and next_bb + fields. + (FOR_BB_BETWEEN, FOR_ALL_BB, FOR_ALL_BB_REVERSE): New macros for + traversing basic block chain. + (create_basic_block_structure, create_basic_block): Declaration changed. + (link_block, unlink_block): Declare. + * cfg.c (entry_exit_blocks): Initialize new fields. + (link_block, unlink_block): New. + (expunge_block_nocompact): Unlink basic block. + (dump_flow_info): Print prev_bb/next_bb fields. + * cfgbuild.c (find_basic_blocks_1, find_basic_blocks): Modified. + * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Modified. + * cfglayout.c (fixup_reorder_chain, cfg_layout_duplicate_bb): Modified. + * cfgrtl.c (create_basic_block_structure, create_basic_block, + split_block, force_nonfallthru_and_redirect, split_edge): Modified. + (verify_flow_info): Check that list agrees with numbering. + + 2002-05-19 Neil Booth + + * c-common.c (preprocessing_asm): New macro. + * c-lex.h (builtin_define, builtin_assert): Use pfile. + doc: + * tm.texi: Update. + config/alpha: + * alpha.h (CPLUSPLUS_CPP_SPEC): Remove. + (CPP_SPEC): Simplify. + (TARGET_CPU_CPP_BUILTINS): Update. + * freebsd.h (TARGET_OS_CPP_BUILTINS): New. + (CPP_SPEC): Simplify. + * linux.h (CPLUSPLUS_CPP_SPEC): Remove. + (TARGET_OS_CPP_BUILTINS): Update. + * osf.h (CPP_XFLOAT_SPEC): Kill. + (TARGET_OS_CPP_BUILTINS): Update. + (CPP_SUBTARGET_SPEC, SUBTARGET_EXTRA_SPECS): Simplify. + * osf5.h (CPP_XFLOAT_SPEC): Kill. + * vms.h (CPP_SUBTARGET_SPEC): Kill. + (TARGET_OS_CPP_BUILTINS): Update. + + 2002-05-19 Richard Henderson + + * varasm.c (default_binds_local_p): Fix typo. + + 2002-05-19 Marek Michalkiewicz + + * config/avr/avr.c (machine_dependent_reorg): Sign extend the + CONST_INT operand to the correct mode after adding 1 to it. + + 2002-05-19 Mark Mitchell + + * config.gcc (powerpc-wrs-windiss*): New target. + + 2002-05-19 Franz Sirl + + * config/rs6000/rs6000.md (ashrdi3_no_power): New. + (ashrdi3): Use it. + + 2002-05-18 Mark Mitchell + + * configure.in (AC_CHECK_FUNCS): Add checks for scandir and + alphasort. + * config.in: Regenerated. + * configure: Regenerated. + + 2002-05-19 Richard Henderson + + * target-def.h (TARGET_BINDS_LOCAL_P): New. + * target.h (struct gcc_target): Move boolean fields to the end. + Add binds_local_p. + * varasm.c (default_binds_local_p): New. + * output.h: Declare it. + + * config/alpha/alpha.c (alpha_encode_section_info): Use the new hook. + * config/cris/cris.c (cris_encode_section_info): Likewise. + * config/i386/i386.c (i386_encode_section_info): Likewise. + * config/ia64/ia64.c (ia64_encode_section_info): Likewise. + * config/sh/sh.c (sh_encode_section_info): Likewise. + + * doc/tm.texi (TARGET_IN_SMALL_DATA_P): New. + (TARGET_BINDS_LOCAL_P): New. + + 2002-05-19 Richard Henderson + + * system.h (BLOCK_PROFILER, BLOCK_PROFILER_CODE, + FUNCTION_BLOCK_PROFILER, FUNCTION_BLOCK_PROFILER_EXIT, + MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Poison. + + * toplev.c (display_help): Kill -a -ax help. + + * config/1750a/1750a.h, config/alpha/alpha.h, + config/clipper/clipper.h, config/dsp16xx/dsp16xx.h, + config/h8300/h8300.h, config/i960/i960.h, config/m68k/tower-as.h, + config/m88k/m88k.h, config/vax/vax.h, config/we32k/we32k.h: + (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Kill. + + * libgcc2.c [L_bb] (BLOCK_PROFILER_CODE): Kill. + * config/m68k/sun3.h (BLOCK_PROFILER_CODE): Kill. + + * config/i386/i386-protos.h (ix86_output_block_profiler): Kill. + (ix86_output_function_block_profiler): Kill. + * config/m68hc11/m68hc11.c (m68hc11_block_profiler): Kill. + (m68hc11_function_block_profiler): Kill. + * config/m68hc11/m68hc11-protos.h: Update. + * config/m88k/m88k.c (output_block_profiler): Kill. + (output_function_block_profiler): Kill. + * config/m88k/m88k-protos.h: Update. + + 2002-05-19 Richard Henderson + + * system.h (STRIP_NAME_ENCODING): Poison it. + * output.h (STRIP_NAME_ENCODING): Remove. + (default_strip_name_encoding): Declare. + * target-def.h (TARGET_STRIP_NAME_ENCODING): New. + * target.h (strip_name_encoding): New. + * varasm.c (default_strip_name_encoding): New. + + * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, + config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, + config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, + config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, + config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, + config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, + config/pa/pa.c, config/pa/pa.h, config/pa/som.h, + config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, + config/v850/v850.h: Use the hook, not the macro. + + * config/darwin-protos.h, config/darwin.c, config/darwin.h, + config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, + config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, + config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, + config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, + config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, + config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, + config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, + config/v850/v850.c, config/v850/v850.h: + Move STRIP_NAME_ENCODING to out-of-line function and add + TARGET_STRIP_NAME_ENCODING. + + * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, + config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING + with TARGET_STRIP_NAME_ENCODING referencing existing function; + make function static. + + * xcoffout.c: Include target.h + * Makefile.in (xcoffout.o): Update. + + * config/avr/avr.c (avr_encode_section_info): Correct prototype. + * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. + * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark + reloc argument unused. + * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. + + * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous + STRIP_NAME_ENCODING docs. + + 2002-05-19 Andreas Jaeger + + * gengenrtl.c: Add prototype for excluded_rtx. + + * real.h: Add prototype for exact_real_truncate. + + 2002-05-18 Richard Henderson + + * system.h (ENCODE_SECTION_INFO): Poison it. + * target-def.h (TARGET_ENCODE_SECTION_INFO): New. + * target.h (encode_section_info): New. + * varasm.c (make_decl_rtl, output_constant_def): Use it. + * hooks.c (hook_tree_int_void): New. + * hooks.h: Declare it. + + * config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, + config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h, + config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, + config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, + config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h, + config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c, + config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, + config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, + config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, + config/mcore/mcore-protos.h, config/mcore/mcore.c, + config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, + config/mmix/mmix.h, config/rs6000/rs6000-protos.h, + config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h, + config/stormy16/stormy16.c, config/stormy16/stormy16.h: + Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO + referencing existing function. Make function static. + + * config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c, + config/arc/arc.h, config/arm/arm.c, config/arm/arm.h, + config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, + config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c, + config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c, + config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h, + config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, + config/pa/pa.h, config/romp/romp.c, config/romp/romp.h, + config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c, + config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, + config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c, + config/v850/v850.h, config/vax/vax.c, config/vax/vms.h, + config/xtensa/xtensa.c, config/xtensa/xtensa.h: + Move ENCODE_SECTION_INFO to out-of-line function and add + TARGET_ENCODE_SECTION_INFO. + + * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro. + (ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. + + * config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename + from SUBTARGET_* + (switch_to_section): Replace in_rdata case with in_readonly_data. + + * config/h8300/h8300.c (h8300_encode_label): Make static. + * config/h8300/h8300-protos.h: Update. + + * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename + from rs6000_encode_section_info; make static. + (rs6000_xcoff_encode_section_info): New. + + * config/v850/v850.c (v850_encode_data_area): Make static. + * config/v850/v850-protos.h: Update. + + * config/vax/vax.c: Include flags.h. + (vms_select_section): Fix typo. + + * doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous + ENCODE_SECTION_INFO docs. + + 2002-05-18 Richard Henderson + + * config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Rename from + REGISTER_TARGET_PRAGMAS. + * config/rs6000/darwin.h (REGISTER_TARGET_PRAGMAS): Redefine. + + * config.gcc: Do not use rs6000-c.c on powerpc-darwin. + + 2002-05-18 Richard Henderson + + * system.h (SELECT_RTX_SECTION): Poison. + * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. + * target.h (select_rtx_section): New. + * varasm.c (output_constant_pool): Use it. + (default_select_rtx_section, default_elf_select_rtx_section): New. + * output.h: Declare them. + + * config/darwin.h (SELECT_RTX_SECTION): Move ... + * config/darwin.c (machopic_select_rtx_section): ... here. + * config/darwin-protos.h: Update. + + * config/nextstep.h (SELECT_RTX_SECTION): Move ... + * config/nextstep.c (machopic_select_rtx_section): ... here. + (nextstep_select_section): Rename variable to avoid macro clash. + * config/nextstep-protos.h: Update. + + * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, + config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, + config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, + config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, + config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, + config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, + config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, + config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, + config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h + (SELECT_RTX_SECTION): Remove. + + * config/darwin.h, config/elfos.h, config/nextstep.h, + config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, + config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, + config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, + config/sparc/lynx.h, config/xtensa/xtensa.c + (TARGET_ASM_SELECT_RTX_SECTION): New. + + * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... + * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. + * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... + * config/ia64/ia64.c (ia64_select_rtx_section): ... here. + (ia64_aix_select_rtx_section): New. + * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before + redefining. + * config/mips/mips.c (mips_select_rtx_section): Make static. + Support ELF SHF_MERGE features. + * config/mips/mips-protos.h: Update. + * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... + * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. + (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; + make static, fall back to default_elf_select_rtx_section. + * config/rs6000/rs6000-protos.h: Update. + * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... + * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. + * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. + * config/romp/romp.c (romp_select_rtx_section): New. + * config/s390/s390.c (s390_select_rtx_section): New. + * config/xtensa/xtensa.c: Include output.h. Shuffle local function + declarations before target macro definition. + (xtensa_emit_call): Use static buffer. + (xtensa_select_rtx_section): New. + * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. + (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. + (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. + + * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from + SELECT_RTX_SECTION docs. + + Sun May 19 00:24:23 CEST 2002 Jan Hubicka + + * i386.md (movsi/movdi): Fix template. + (sse2 patterns): Set attributes consistently. + + * i386.md (pushqi2, ashrqi_*): Fix constraint. + + 2002-05-18 Toon Moene + + * optabs.c (complex_part_zero_p): New. + * (expand_cmplxdiv_straight): Use it. + * (expand_cmplxdiv_wide): Ditto. + * (expand_binop): Ditto. + + 2002-05-18 Richard Henderson + + * final.c (HAVE_READONLY_DATA_SECTION): New. + (shorten_branches): Use it instead of ifdefs. + * varasm.c (enum in_section): Add in_readonly_data. + (text_section, data_section): Tidy. + (readonly_data_section): Use READONLY_DATA_SECTION_ASM_OP if present. + + * config/darwin.h, config/nextstep.h, config/h8300/elf.h, + config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h + (READONLY_DATA_SECTION): Don't undef. + + * config/alpha/unicosmk.h, config/h8300/elf.h, config/i386/aix386ng.h, + config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h, + config/rs6000/lynx.h (READONLY_DATA_SECTION_ASM_OP): Undef. + + * config/elfos.h, config/svr3.h, config/alpha/alpha-interix.h, + config/alpha/elf.h, config/c4x/c4x.h, config/i386/i386-interix.h, + config/i386/sco5.h, config/i386/svr3gas.h, config/i860/sysv3.h, + config/m88k/m88k.h, config/pa/pa64-hpux.h (USE_CONST_SECTION): Remove. + + * config/elfos.h, config/netware.h, config/alpha/alpha-interix.h, + config/alpha/elf.h, config/alpha/vms.h, config/arc/arc.h, + config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, + config/i386/dgux.h, config/i386/i386-interix.h, config/i386/sco5.h, + config/ia64/hpux.h, config/m32r/m32r.h, config/m68k/tower-as.h, + config/m88k/m88k.h, config/mcore/mcore-pe.h, config/mips/iris6.h, + config/mips/mips.h, config/mmix/mmix.h, config/pa/pa64-hpux.h, + config/sparc/sysv4.h (READONLY_DATA_SECTION_ASM_OP): Rename from + CONST_SECTION_ASM_OP/READONLY_SECTION_ASM_OP/RDATA_SECTION_ASM_OP. + + * config/elfos.h, config/netware.h, config/1750a/1750a.h, + config/a29k/a29k.h, config/alpha/alpha-interix.h, config/alpha/alpha.h, + config/arm/coff.h, config/h8300/h8300.h, config/i386/aix386ng.h, + config/i386/i386-interix.h, config/i386/osfrose.h, config/mmix/mmix.h, + config/pa/pa64-hpux.h, config/sparc/litecoff.h + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove. + + * config/elfos.h, config/netware.h, config/svr3.h, + config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h, + config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, + config/h8300/h8300.h, config/i386/i386-interix.h, + config/i386/osfrose.h, config/i386/svr3gas.h, config/mmix/mmix.h, + config/pa/pa64-hpux.h (READONLY_DATA_SECTION): Remove. + + * config/elfos.h, config/netware.h, config/svr3.h, + config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h, + config/c4x/c4x.h, config/i386/aix386ng.h, config/i386/i386-interix.h, + config/i386/sco5.h, config/i386/svr3gas.h, config/mmix/mmix.h, + config/pa/pa64-hpux.h (CONST_SECTION_FUNCTION): Remove. + + * config/lynx.h, config/svr3.h, config/alpha/elf.h, config/alpha/vms.h, + config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, config/i386/sco5.h, + config/i386/svr3gas.h, config/i860/sysv3.h, config/i860/sysv4.h, + config/ia64/sysv4.h, config/m32r/m32r.h, config/m88k/m88k.h, + config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mips/elf.h, + config/mips/elf64.h, config/mips/iris6.h, config/mips/linux.h, + config/mips/mips.h, config/mips/rtems64.h, config/mips/vxworks.h, + config/rs6000/sysv4.h, config/v850/v850.h + (EXTRA_SECTIONS): Remove in_const/in_rdata. + (EXTRA_SECTION_FUNCTIONS): Remove accompanying function. + + * config/svr3.h, config/c4x/c4x.h, config/i386/dgux.h, + config/i386/sco5.h, config/i386/svr3gas.h, config/ia64/aix.h, + config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mmix/mmix.h, + config/sparc/sysv4.h (SELECT_RTX_SECTION): Use readonly_data_section. + * config/alpha/alpha.c (alpha_start_function): Likewise. + (alpha_write_linkage): Likewise. + * config/m32r/m32r.c (m32r_select_section): Likewise. + * config/m88k/m88k.c (m88k_select_section): Likewise. + * config/mips/mips.c (mips_select_rtx_section): Likewise. + * config/rs6000/rs6000.c (rs6000_select_rtx_section): Likewise. + (rs6000_elf_select_section): Likewise. + * config/v850/v850.c (v850_select_section): Likewise. + + * config/1750a/1750a.h, config/i860/sysv3.h + (READONLY_DATA_SECTION_ASM_OP): New. + READONLY_DATA_SECTION_ASM_OP. + * config/i386/interix.c, config/i386/winnt.c + (i386_pe_unique_section): Always use .rdata prefix. + * config/pa/som.h (readonly_data): Always switch to read-only section. + (READONLY_DATA_SECTION): Predicate on flag_pic. + * config/we32k/we32k.h (READONLY_DATA_SECTION): Remove parenthesis. + * doc/tm.texi (READONLY_DATA_SECTION_ASM_OP): New. + (READONLY_DATA_SECTION): Update. + + 2002-05-18 Jason Thorpe + + * c-common.c (c_common_post_options): Warn if -Wformat-zero-length + is used without -Wformat. + * c-common.h (warn_format_zero_length): Declare extern. + * c-decl.c (warn_options): Add "format-zero-length". + * c-format.c (warn_format_zero_length): Declare. + (set_Wformat): Set warn_format_zero_length for -Wformat. + (check_format_info): Only warn about zero-length formats if + warn_format_zero_length is true. Include the format type + name in the warning message. + * doc/invoke.texi: Document -Wformat-zero-length. + * testsuite/gcc.dg/format/zero-length-1.c: New test. + + 2002-05-18 Kazu Hirata + + * timevar.c: Fix formatting. + * tlink.c: Likewise. + * toplev.c: Likewise. + * tree-dump.c: Likewise. + * tree-inline.c: Likewise. + + 2002-05-18 Neil Booth + + * cppinit.c (cpp_post_options): If preprocessed, turn off + traditional. If traditional, turn off column numbers. + * cpplib.c (cpp_push_buffer): Lex from stage 3 if traditional. + * cpptrad.c (handle_newline): Update line_base. + (skip_comment): Handle -Wcomment. + + 2002-05-17 Zack Weinberg + + * cppinit.c (struct builtin): Remove unused fields. + (CPLUS, BUILTIN, OPERATOR, O, builtin_array_end): Kill. + (operator_array): New - was second half of builtin_array. + (init_builtins): Simplify loop over builtin_array/operator_array. + + 2002-05-18 Neil Booth + + * defaults.h (UNIQUE_SECTION): Remove. + * system.h (UNIQUE_SECTION, SELECT_SECTION): Poison. + + 2002-05-17 Richard Henderson + + * expr.c (init_expr_once): Don't use start/end_sequence. + Use rtx_alloc instead of emit_insn. + * toplev.c (lang_dependent_init): Run init_expr_once here ... + (lang_independent_init): ... not here. + + 2002-05-17 Jason Thorpe + + * config/sh/lib1funcs.asm (GLOBAL): Use __USER_LABEL_PREFIX__. + + 2002-05-17 Marek Michalkiewicz + + * config/avr/avr.c (avr_regs_to_save): New function. Also check + for fixed registers, possibly used for global register variables. + (initial_elimination_offset, avr_output_function_prologue, + avr_output_function_epilogue): Move common code to avr_regs_to_save. + + 2002-05-17 Neil Booth + + * Makefile.in: Update for cpptrad.c. + * cpphash.h (struct cpp_buffer): New members for buffer + overlays. + (struct cpp_reader): New members for traditional output. + (_cpp_read_logical_line, _cpp_overlay_buffer): New. + * cppinit.c (cpp_create_reader): Set trad_line. + (cpp_destroy): Free trad_out_base if used. + (cpp_read_main_file): Overlay an empty buffer if traditional. + (cpp_finish_options): Don't do builtins. + (COMMAND_LINE_OPTIONS): Add -traditional-cpp. + (cpp_handle_option): Handle it. + * cpplex.c (continue_after_nul): New. + (_cpp_lex_direct): Use handle_nul. + * cpplib.h (struct cpp_options): New traditional option. + * cpptrad.c: New file. + + 2002-05-17 Neil Booth + + * c-common.c (c_common_init_options): Use C89 for Objective-C, + and set the options flag. + * cppinit.c (lang_flags): Remove objc. + (lang_defaults): Remove OBJC and OBJCXX. + (set_lang): Update. + (COMMAND_LINE_OPTIONS): Remove -+ and -lang-objc++. + (cpp_handle_option): Remove -+ and -lang-objc++. + For ObjC, just set a flag. + (print_help): Update. + * cpplib.h (enum c_lang): Remove CLK_OBJC and CLK_OBJCXX. + + 2002-05-17 Rainer Orth + + * doc/install.texi (Specific, mips-sgi-irix6): Document need to + bootstrap with -mips3. + + 2002-05-17 Kazu Hirata + + * final.c: Fix formatting. + * fix-header.c: Likewise. + * flow.c: Likewise. + * fold-const.c: Likewise. + * function.c: Likewise. + + 2002-05-17 David S. Miller + + PR c/6689, PR optimization/6615 + * local-alloc.c (struct equivalence): Rename 'src' to 'src_p' + and make it a pointer to rtx. Update comments. + (update_equiv_regs): When scanning for equivalences, record + address of SET_SRC (set) in reg_equiv[].src_p. Dereference + it while making the equiv replacements. + + 2002-05-17 Rainer Orth + + * config/sparc/sparc.c (sparc_aout_select_section): Fixed typo. + + 2002-05-17 kaz Kojima + + * config/sh/sh.h (ENCODE_SECTION_INFO): Consider MODULE_LOCAL_P + when encoding visibility into SYMBOL_REF_FLAG. + + 2002-05-17 Richard Sandiford + + * expr.c (force_operand): Fix reversed move. + + 2002-05-17 Kurt Wall + + * doc/install.texi (Testing): Mention two common DejaGnu warnings + that can be ignored. + + 2002-05-16 Gerald Pfeifer + + * doc/install.texi (Final install): Recommend to install into a + "clean" target directory. + + 2002-05-17 Richard Henderson + + * config/ia64/ia64.md: Use braced strings instead of quoted strings + for code blocks. Tidy whitespace. + + 2002-05-17 Richard Henderson + + * hooks.c (hook_tree_bool_false): New. + * hooks.h: Declare it. + * target-def.h (TARGET_ASM_SELECT_SECTION): New. + (TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New. + * target.h (select_section, unique_section): New. + (in_small_data_p): New. + * varasm.c (resolve_unique_section): Use hooks instead of macros. + (variable_section, output_constant_def_contents): Likewise. + (default_select_section, default_unique_section): New. + (categorize_decl_for_section, default_elf_select_section): New. + * output.h: Declare them. + + * config/darwin.h (ALIAS_SECTION, try_section_alias): Remove. + (TARGET_ASM_SELECT_SECTION): New. + (SELECT_SECTION): Move ... + * config/darwin.c (machopic_select_section): ... here. + * config/darwin-protos.h: Update. + + * config/nextstep.h (TARGET_ASM_SELECT_SECTION): New. + (SELECT_SECTION): Move ... + * config/nextstep.c (nextstep_select_section): ... here. + * config/nextstep-protos.h: Update. + + * config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove. + (TARGET_ASM_SELECT_SECTION): New. + * config/svr3.h (SELECT_SECTION): Remove. + + * config/alpha/alpha.c (unicosmk_unique_section): Make static. + (TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New. + (TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New. + (alpha_encode_section_info): Use it. + * config/alpha/alpha-protos.h: Update. + * config/alpha/elf.h (DO_SELECT_SECTION): Remove. + (SELECT_SECTION, UNIQUE_SECTION): Remove. + (TARGET_ASM_SELECT_SECTION): New. + * config/alpha/unicosmk.h (UNIQUE_SECTION): Remove. + + * config/arm/pe.h (UNIQUE_SECTION): Remove. + (TARGET_ASM_UNIQUE_SECTION): New. + + * config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New. + (avr_unique_section): Rename from unique_section; make static. + * config/avr/avr-protos.h: Update. + * config/avr/avr.h (UNIQUE_SECTION): Remove. + + * config/c4x/c4x.h (SELECT_SECTION): Remove. + + * config/i386/cygwin.h (UNIQUE_SECTION): Remove. + (TARGET_ASM_UNIQUE_SECTION): New. + * config/i386/i386-interix.h: Likewise. + * config/i386/win32.h: Likewise. + * config/i386/djgpp.h (UNIQUE_SECTION): Remove. + * config/i386/i386.c (ix86_asm_file_end): Use target hook not macro. + * config/i386/sco5.h (SELECT_SECTION): Remove. + (TARGET_ASM_SELECT_SECTION): New. + * config/i386/svr3gas.h (SELECT_SECTION): Remove. + + * config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION + instead of SELECT_SECTION. + * config/m68k/dpx2.h: Likewise. + * config/rs6000/lynx.h: Likewise. + + * config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. + (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. + * config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New. + (ia64_in_small_data_p): New. + (ia64_encode_section_info): Use it. Reorganize overlarge conditional. + (ia64_aix_select_section, ia64_aix_unique_section): New. + * config/ia64/sysv4.h (DO_SELECT_SECTION): Remove. + (SELECT_SECTION, UNIQUE_SECTION): Remove. + + * config/m32r/m32r.h (SELECT_SECTION): Remove. + (TARGET_ASM_SELECT_SECTION): New. + * config/m32r/m32r.c (m32r_select_section): Take align argument. + * config/m32r/m32r-protos.h: Update. + + * config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New. + (SELECT_SECTION): Move ... + * config/m88k/m88k.c (m88k_select_section): ... here. + + * config/mcore/mcore-pe.h (SELECT_SECTION): Remove. + * config/mcore/mcore.h (UNIQUE_SECTION): Remove. + * config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New. + (mcore_unique_section): Make static. + * config/mcore/mcore-protos.h: Update. + + * config/mips/elf.h (UNIQUE_SECTION): Remove. + (TARGET_ASM_UNIQUE_SECTION): New. + * config/mips/elf64.h: Likewise. + * config/mips/iris6gld.h: Likewise. + * config/mips/linux.h: Likewise. + * config/mips/mips-protos.h: Update. + * config/mips/mips.c (mips_select_section): Add align argument. + * config/mips/mips.h (SELECT_SECTION): Remove. + (TARGET_ASM_SELECT_SECTION): New. + + * config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. + * config/mmix/mmix.c (mmix_select_section): Remove. + (mmix_unique_section): Remove. + * config/mmix/mmix-protos.h: Update. + + * config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New. + (SELECT_SECTION): Move ... + * config/pa/pa.c (pa_select_section): ... here. + * config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove. + + * config/rs6000/rs6000.c (rs6000_elf_select_section): Rename + from rs6000_select_section and make static. + (rs6000_elf_unique_section): Similarly. + (rs6000_xcoff_select_section): From xcoff.h. + (rs6000_xcoff_unique_section): Likewise. + * config/rs6000/rs6000-protos.h: Update. + * config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove. + (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. + * config/rs6000/xcoff.h: Likewise. + + * config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New. + (SELECT_SECTION): Move ... + * config/sparc/sparc.c (sparc_aout_select_section): ... here. + + * config/v850/v850.h (SELECT_SECTION): Move ... + * config/v850/v850.c (v850_select_section): ... here. + (TARGET_ASM_SELECT_SECTION): New. + + * config/vax/vms.h (SELECT_SECTION): Move ... + * config/vax/vax.c (vms_select_section): ... here. + (TARGET_ASM_SELECT_SECTION): New. + + * doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs + for the target hooks. + + 2002-05-17 Nick Clifton + + * config/arm/arm.c (emit_multi_reg_push): Do not set + RTX_FRAME_RELATED_P on the SEQUENCE. + + 2002-05-16 Richard Henderson + + * config/ia64/ia64.c (ia64_reorg): Rebuild bb_for_insn before + splitting. Use split_all_insns; update_life_info_in_dirty_blocks. + + 2002-05-16 Richard Henderson + + * config/alpha/unicosmk.h (TARGET_OS_CPP_BUILTINS): Fix typo. + + * config/ia64/ia64.c (saveable_obstack): Do not declare. + + 2002-05-16 Richard Henderson + + * basic-block.h, bb-reorder.c, cfg.c, cfganal.c, cfgbuild.c, + cfgcleanup.c, cfglayout.c, cfgloop.c, cfgrtl.c, combine.c, + conflict.c, df.c, df.h, dominance.c, final.c, flow.c, function.c, + gcse.c, global.c, graph.c, haifa-sched.c, ifcvt.c, lcm.c, + local-alloc.c, loop.c, predict.c, print-rtl.c, profile.c, + recog.c, reg-stack.c, regclass.c, regmove.c, regrename.c, + reload1.c, reorg.c, resource.c, sbitmap.c, sched-deps.c, + sched-ebb.c, sched-rgn.c, sibcall.c, ssa-ccp.c, ssa-dce.c, ssa.c: + Revert "Basic block renumbering removal", and two followup patches. + + 2002-05-16 Jason Thorpe + + * lcm.c (optimize_mode_switching): Revert previous change. + + 2002-05-16 Zdenek Dvorak + + * sched-rgn.c (schedule_insns): Initialize large_region_blocks + with only extant block numbers. + + 2002-05-16 Jason Thorpe + + * lcm.c (optimize_mode_switching): Fix typo. + + 2002-05-16 Zdenek Dvorak + + * flow.c (calculate_global_regs_live): Queue blocks in program order. + + 2002-05-16 Rainer Orth + + * doc/install.texi (Configuration): Document PWDCMD. + + 2002-05-16 Dale Johannesen + + * combine.c (cant_combine_insn_p): Reenable combinations + involving hard regs unless CLASS_LIKELY_SPILLED_P. + + 2002-05-16 Neil Booth + + * c-common.c (cb_register_builtins): Handle more built-ins + here rather than in gcc.c specs. + * gcc.c (cpp_unique_options): Move many built-ins to c-common.c. + (cpp_options): Pass -O flags even when only preprocessing. + * toplev.c (set_fast_math_flags): New prototype. + (fast_math_flags_set_p): New. + (set_no_fast_math_flags): Remove. + (decode_f_option): Update. + * toplev.h (set_fast_math_flags): Update. + (fast_math_flags_set_p): New. + (set_no_fast_math_flags): Remove. + config: + * c4x/c4x.c (c4x_override_options): Update. + + 2002-05-16 Zack Weinberg + + * c-common.c (STDC_0_IN_SYSTEM_HEADERS, REGISTER_PREFIX): + Default-define here. + (builtin_define_with_value): Can now wrap the expansion in + quotation marks if such is wanted. + (cb_register_builtins): Update calls to builtin_define_with_value. + Define __REGISTER_PREFIX__, __USER_LABEL_PREFIX__, and __VERSION__ + here. + (c_common_init): Set options->stdc_0_in_system_headers. + * c-lex.h: Update prototype of builtin_define_with_value. + * cppdefault.h: Remove default definitions of USER_LABEL_PREFIX + and REGISTER_PREFIX. + + * cppinit.c (VERS, ULP, C, X): Kill. + (builtin_array): Remove entries for __VERSION__, + __USER_LABEL_PREFIX__, __REGISTER_PREFIX__, and + __HAVE_BUILTIN_SETJMP__. Make __STDC__ always a builtin, not + a constant. + (init_builtins): Kill off a bunch of now-dead code. + (COMMAND_LINE_OPTIONS): Remove -fleading-underscore and + -fno-leading-underscore. + (cpp_handle_option): Remove code to set user_label_prefix. + (cpp_post_options): Likewise. + + * cpplib.h (struct cpp_options): Remove user_label_prefix. + (stdc_0_in_system_headers): New. + * cppmacro.c (builtin_macro): Check CPP_OPTION (pfile, + stdc_0_in_system_headers) too to decide the value of __STDC__. + + * tradcpp.c (user_label_prefix): Kill. + (main): Remove code handling -f(no-)leading-underscore. + (initialize_builtins): Don't define __REGISTER_PREFIX__ + or __USER_LABEL_PREFIX__. + (install_value): Wrap compound statement in dummy loop so the + macro works properly in an if statement. + + + 2002-05-16 Janis Johnson + + * loop.h (struct loop_info): Add member has_prefetch. + * loop.c (PREFETCH_CONDITIONAL): Change default to 1. + (prescan_loop): Initialize has_prefetch. + (struct prefetch_info): Change prefetch_in_loop and + prefetch_before_loop from bit fields to ints. + (emit_prefetch_instructions): Several small fixes. + (check_dbra_loop): Don't reverse loop that uses prefetch. + + 2002-05-16 Rainer Orth + + * Makefile.in: Allow for PWDCMD to override hardcoded pwd. + * configure.in: Likewise. + * fixinc/check.tpl: Likewise. + * fixinc/fixinc.dgux: Likewise. + * fixinc/fixinc.svr4: Likewise. + * fixinc/fixinc.winnt: Likewise. + * fixinc/fixincl.sh: Likewise. + * fixproto: Likewise. + * configure: Regenerate. + + 2002-05-16 Zdenek Dvorak + + Basic block renumbering removal: + * basic_block.h (struct basic_block_def): Renamed index to sindex, + added prev_bb and next_bb fields. + (n_basic_blocks): Renamed to num_basic_blocks. + (last_basic_block): New, index of last basic block. + (FOR_BB_BETWEEN, FOR_ALL_BB, FOR_ALL_BB_REVERSE): New macros for + traversing basic block chain. + (BLOCK_NUM): index -> sindex. + (create_basic_block_structure, create_basic_block): Declaration changed. + (debug_num2bb): Declare. + (expunge_block_nocompact): Declaration removed. + (link_block, unlink_block, compact_blocks): Declare. + * bb-reorder.c (make_reorder_chain, make_reorder_chain_1): Modified. + * cfg.c (entry_exit_blocks): Initialize new fields. + (clear_edges, alloc_block, expunge_block, cached_make_edge, + redirect_edge_pred, dump_flow_info, dump_edge_info, + alloc_aux_for_blocks, clear_aux_for_blocks, alloc_aux_for_edges, + free_aux_for_edges): Modified. + (link_block, unlink_block, compact_blocks, debug_num2bb): New. + (expunge_block_nocompact): Removed. + * cfganal.c (can_fallthru, mark_dfs_back_edges, flow_call_edges_add, + find_unreachable_blocks, create_edge_list, print_edge_list, + verify_edge_list, flow_edge_list_print, remove_fake_successors, + remove_fake_edges, flow_reverse_top_sort_order_compute, + flow_depth_first_order_compute, flow_preorder_transversal_compute, + flow_dfs_compute_reverse_init, flow_dfs_compute_reverse_add_bb, + flow_dfs_compute_reverse_execute): Modified. + * cfgbuild.c (make_edges, make_eh_edge, find_basic_blocks_1, + find_basic_blocks, find_many_sub_basic_blocks, find_sub_basic_blocks): + Modified. + * cfgcleanup.c (try_simplify_condjump, try_forward_edges, + merge_blocks_move_predecessor_nojumps, + merge_blocks_move_successor_nojumps, merge_blocks, + outgoing_edges_match, try_crossjump_to_edge, try_crossjump_bb, + try_optimize_cfg, delete_unreachable_blocks, cleanup_cfg): Modified. + * cfglayout.c (skip_insns_after_block, label_for_bb, + record_effective_endpoints, scope_to_insns_finalize, + fixup_reorder_chain, verify_insn_chain, cleanup_unconditional_jumps, + fixup_fallthru_exit_predecessor, cfg_layout_redirect_edge, + cfg_layout_duplicate_bb): Modified. + * cfgloop.c (flow_loops_cfg_dump, flow_loop_dump, flow_loops_dump, + flow_loop_entry_edges_find, flow_loop_exit_edges_find, + flow_loop_nodes_find, flow_loop_pre_header_find, flow_loop_scan, + flow_loops_find, flow_loop_outside_edge_p): Modified. + * cfgrtl.c (create_basic_block_structure, create_basic_block, + flow_delete_block, compute_bb_for_insn, split_block, + try_redirect_by_replacing_jump, redirect_edge_and_branch, + force_nonfallthru_and_redirect, tidy_fallthru_edge, + back_edge_of_syntactic_loop_p, split_edge, commit_one_edge_insertion, + commit_edge_insertions, commit_edge_insertions_watch_calls, + dump_bb, print_rtl_with_bb, verify_flow_info, purge_dead_edges, + purge_all_dead_edges): Modified. + * combine.c (combine_instructions, set_nonzero_bits_and_sign_copies, + try_combine, nonzero_bits, num_sign_bit_copies, get_last_value_validate, + get_last_value, reg_dead_at_p, distribute_notes, distribute_links): + Modified. + * conflict.c (conflict_graph_compute): Modified. + * df.c (FOR_ALL_BBS): Removed. + (df_bitmaps_alloc, df_bitmaps_free, df_alloc, df_analyse_1, + df_modified_p, df_analyse, df_refs_unlink, df_insn_modify, + df_dump, hybrid_search_bitmap, iterative_dataflow_sbitmap): Modified. + * df.h (DF_BB_INFO, DF_REF_BBNO): Modified. + * dominance.c (init_dom_info, calc_dfs_tree_nonrec, calc_dfs_tree, + calc_idoms, idoms_to_doms, calculate_dominance_info): Modified. + * final.c (compute_alignments, final_scan_insn): Modified. + * flow.c (verify_local_live_at_start, update_life_info, + update_life_info_in_dirty_blocks, free_basic_block_vars, + delete_noop_moves, calculate_global_regs_live, + initialize_uninitialized_subregs, allocate_bb_life_data, + regno_uninitialized, regno_clobbered_at_setjmp, mark_set_1, + mark_used_reg, count_or_remove_death_notes): Modified. + * function.c (thread_prologue_and_epilogue_insns): Modified. + * gcse.c (struct null_pointer_info): Change typo of current_block + to basic_block. + (gcse_main, alloc_gcse_mem, compute_local_properties, compute_sets, + oprs_unchanged_p, load_killed_in_block_p, record_last_reg_set_info, + compute_hash_table, alloc_rd_mem, handle_rd_kill_set, compute_kill_rd, + alloc_avail_expr_mem, expr_killed_p, compute_ae_kill, + expr_reaches_here_p_work, expr_reaches_here_p, handle_avail_expr, + classic_gcse, one_classic_gcse_pass, compute_transp, cprop, + one_cprop_pass, compute_pre_data, pre_expr_reaches_here_p_work, + pre_expr_reaches_here_p, insert_insn_end_bb, pre_edge_insert, + pre_delete, one_pre_gcse_pass, compute_transpout, + invalidate_nonnull_info, delete_null_pointer_checks_1, + free_code_hoist_mem, compute_code_hoist_vbeinout, + hoist_expr_reaches_here_p, hoist_code, one_code_hoisting_pass, + compute_ld_motion_mems, store_ops_ok, find_moveable_store, + compute_store_table, build_store_vectors, insert_insn_start_bb, + insert_store, replace_store_insn, free_store_memory, store_motion): + Modified. + * global.c (global_alloc, global_conflicts, mark_elimination, + build_insn_chain): Modified. + * graph.c (print_rtl_graph_with_bb): Modified. + * haifa-sched.c (sched_init): Modified. + * ifcvt.c (SET_ORIG_INDEX, ORIG_INDEX): Removed. + (find_if_block, find_cond_trap, find_if_case_1, find_if_case_2, + if_convert): Modified. + * lcm.c (compute_antinout_edge, compute_earliest, compute_laterin, + compute_insert_delete, pre_edge_lcm, compute_available, + compute_farthest, compute_nearerout, compute_rev_insert_delete, + pre_edge_rev_lcm, make_preds_opaque, optimize_mode_switching): + Modified. + * local-alloc.c (alloc_qty, local_alloc, update_equiv_regs): Modified. + * loop.c (loop_dump_aux): Modified. + * predict.c (combine_predictions_for_insn, estimate_probability, + last_basic_block_p, process_note_prediction, process_note_predictions, + note_prediction_to_br_prob, propagate_freq, counts_to_freqs, + expensive_function_p, estimate_bb_frequencies, + compute_function_frequency): Modified. + * print-rtl.c (print_rtx): Modified. + * profile.c (GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX, instrument_edges, + get_exec_counts, compute_branch_probabilities, compute_checksum, + branch_prob, find_spanning_tree): Modified. + * recog.c (split_all_insns, peephole2_optimize): Modified. + * reg-stack.c (reg_to_stack, convert_regs_entry, compensate_edge, + convert_regs_1, convert_regs_2, convert_regs): Modified. + * regclass.c (scan_one_insn, regclass): Modified. + * regmove.c (mark_flags_life_zones, regmove_optimize, + combine_stack_adjustments): Modified. + * regrename.c (regrename_optimize, copyprop_hardreg_forward): Modified. + * reload1.c (reload, reload_combine, copy_eh_notes): Modified. + * reorg.c (dbr_schedule): Modified. + * resource.c (find_basic_block, init_resource_info): Modified. + * sbitmap.c (sbitmap_intersection_of_succs, + sbitmap_intersection_of_preds, sbitmap_union_of_succs, + sbitmap_union_of_preds): Modified. + * sched-deps.c (init_dependency_caches): Modified. + * sched-ebb.c (schedule_ebbs): Modified. + * sched-rgn.c (is_cfg_nonregular, build_control_flow, debug_regions, + find_rgns, compute_trg_info, init_regions, schedule_insns): Modified. + * sibcall.c (optimize_sibling_and_tail_recursive_call): Modified. + * ssa-ccp.c (examine_flow_edges, optimize_unexecutable_edges, + ssa_ccp_substitute_constants, ssa_ccp_df_delete_unreachable_insns, + ssa_const_prop): Modified. + * ssa-dce.c (set_control_dependent_block_to_edge_map_, + find_control_dependence, find_pdom, ssa_eliminate_dead_code): Modified. + * ssa.c (remove_phi_alternative, find_evaluations, + compute_dominance_frontiers_1, compute_iterated_dominance_frontiers, + insert_phi_node, rename_block, convert_to_ssa, eliminate_phi, + make_regs_equivalent_over_bad_edges, + make_equivalent_phi_alternatives_equival, + compute_conservative_reg_partition, + coalesce_regs_in_successor_phi_nodes, compute_coalesced_reg_partition, + rename_equivalent_regs, convert_from_ssa, for_each_successor_phi): + Modified. + + 2002-05-16 Mark Mitchell + + * cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH. + + 2002-05-16 Nick Clifton + + * config/arm/arm.c (arm_rtx_costs): Check for RTX being a + SYMBOL_REF before calling CONSTANT_POOL_ADDRESS_P. + (arm_adjust_cost): Check for RTX being a SYMBOL_REF before + calling CONSTANT_POOL_ADDRESS_P. + * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix typo in code + to decide whether to define __arm__ or __thumb. + (THUMB_GO_IF_LEGITIMATE_ADDRESS): Check for RTX being a + SYMBOL_REF before calling CONSTANT_POOL_ADDRESS_P. + + 2002-05-16 Neil Booth + + * config/arc/arc.h (CPP_PREDEFINES): Remove. + (CPP_SPEC): Update. + (TARGET_CPU_CPP_BUILTINS): New. + + 2002-05-16 Neil Booth + + * cpphash.h (cpp_macro): Move here, and make expansion a union. + * cppmacro.c (cpp_macro): Remove. + (enter_macro_context, replace_args, warn_of_redefinition, + _cpp_create_definition, cpp_macro_definition): Update. + + 2002-05-16 Jason Merrill + + * config/mips/mips.c (mips_output_external): Don't do sdata + optimization for a variable with DECL_COMDAT set. + + 2002-05-15 Aldy Hernandez + + * config/rs6000/altivec.h: Cleanups for tighter typechecking. + Cleanups for accepting modifiers on pointers. + Fix predicate typos. + Allow long pointers as well as int pointers. + + 2002-05-15 Richard Henderson + + * varasm.c (merge_weak): Remove special case for extern and common. + + 2002-05-15 Matt Hiller + + * testsuite/gcc.c-torture/compile/20000804-1.x: Don't return 1 if + XFAILing. + * testsuite/gcc.c-torture/compile/20001226-1.x: Ditto. + * testsuite/gcc.c-torture/compile/920520-1.x: Ditto. + * testsuite/gcc.c-torture/compile/mipscop-1.x: XFAIL for now. + * testsuite/gcc.c-torture/compile/mipscop-2.x: Ditto. + * testsuite/gcc.c-torture/compile/mipscop-3.x: Ditto. + * testsuite/gcc.c-torture/compile/mipscop-4.x: Ditto. + + 2002-05-15 Aldy Hernandez + + * reload1.c (forget_old_reloads_1): Do not use subreg offset. + + 2002-05-15 Aldy Hernandez + + * config/rs6000/rs6000.md ("altivec_mtvscr"): Set VSCR register. + ("altivec_mfvscr"): Read from VSCR. + + Add vscr sets for the following insns: altivec_vctuxs, + altivec_vaddubs, altivec_vaddsbs, altivec_vadduhs, + altivec_vaddshs, altivec_vadduws, altivec_vaddsws, altivec_vctsxs, + altivec_vmhaddshs, altivec_vmhraddshs, altivec_vmsumuhs, + altivec_vmsumshs, altivec_vpkuhss, altivec_vpkshss, + altivec_vpkuwss, altivec_vpkswss, altivec_vpkuhus, + altivec_vpkshus, altivec_vpkuwus, altivec_vpkswus, + altivec_vsububs, altivec_vsubsbs, altivec_vsubuhs, + altivec_vsubshs, altivec_vsubuws, altivec_vsubsws, + altivec_vsum4ubs, altivec_vsum4sbs, altivec_vsum4shs, + altivec_vsum2sws, altivec_vsumsws. + + * config/rs6000/rs6000.h: Add VSCR fixed register. + (CALL_REALLY_USED_REGISTERS): Add vscr. + (CALL_USED_REGISTERS): Same. + (FIXED_REGISTERS): Same. + (REG_ALLOC_ORDER): Same. + (reg_class): Add VSCR_REGS. + (REG_CLASS_NAMES): Same. + (REG_CLASS_CONTENTS): Same. + (VSCR_REGNO): New. + (REGISTER_NAMES): Add vscr. + (DEBUG_REGISTER_NAMES): Same. + (ADDITIONAL_REGISTER_NAMES): Same. + (FIRST_PSEUDO_REGISTER): Increment. + (CONDITIONAL_REGISTER_USAGE): Set VSCR as a global register. + + 2002-05-15 Jakub Jelinek + + * fold-const.c (fold): Fix a typo. + + 2002-05-15 Eric Botcazou + + * fold-const.c (fold) [LT_EXPR]: Move the transformation of a + comparison against the highest or lowest integer value before + the 'X >= CST to X > (CST - 1)' and 'X < CST to X <= (CST - 1)' + transformation and that of an unsigned comparison against 0 + right after. + + 2002-05-15 Richard Henderson + + * varasm.c (merge_weak): Error for any weakening after definition. + Adjust weakening after use warning to catch more cases. + (assemble_alias): Set TREE_USED and TREE_ASM_WRITTEN consistently. + * config/alpha/alpha.c (alpha_encode_section_info): Do not abort. + + Wed May 15 10:38:27 CEST 2002 Jan Hubicka + + * invoke.texi (-malign-double): Re-add lost warning. + + * i386-protos.h (x86_output_mi_thunk): Declare. + * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... + * i386.c (x86_output_mi_thunk): ... here; handle 64bits. + + * dwarf2out.c (output_call_frame_info): Do not skip unwind info + when flag_asynchronous_unwind_tables is set. + + * flags.h (flag_reorder_functions): Declare. + * function.c (prepare_function_start): Initialize frequnecy. + * params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New. + * Makefile.in (predict.o): Add dependency on target.h and params.h + * defaults.h (HOT_TEXT_SECTION_NAME, + UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros. + * predict.c (choose_function_section): New function. + (estimate_bb_frequencies): Use it. + * toplev.c (flag_reorder_functions): New global variable. + (lang_independent_options): New. + (parse_options_and_default_flags): Set. + * varasm.c (assemble_start_function): Bypass functdion alignment + for never executed functions. + * invoke.texi (-freorder-blocks, -freorder-functions): Document. + (param hot-bb-count-fraction, hot-bb-frequency-fraction): New. + * tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): + Document. + + Thu Jan 3 21:52:09 CET 2002 Jan Hubicka + + * predict.c: Inlude profile.h + (MIN_COUNT): Rename to MIN_COUNT_FRACTION + (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): + Use the information about maximal counter in the program. + + Thu Dec 20 22:14:00 CET 2001 Jan Hubicka + + * basic-block.h (maybe_hot_bb_p, probably_cold_bb_p, + probably_never_executed_bb_p): New functions. + * cfgcleanup.c (outgoing_edges_match): Use them. + * predict.c (MIN_COUNT, MIN_FREQUENCY): New macros. + (maybe_hot_bb_p, probably_cold_bb_p, + probably_never_executed_bb_p): New functions. + + * function.h (function): Add new field function_frequency. + * predict.c (compute_function_frequency): New function. + (estimate_probability): Call it. + + 2002-03-09 Jakub Jelinek + + PR optimization/5172, optimization/5200 + * gcse.c (gcse_main): Disable store_motion. + + 2002-05-14 Zack Weinberg + + * c-parse.in (MODIFIED_WCHAR_TYPE): New macro. + (c_common_nodes_and_builtins): Use it. + (builtin_define_with_value): New function. + (cb_register_builtins): Define __SIZE_TYPE__, + __PTRDIFF_TYPE__, __WCHAR_TYPE__, and __WINT_TYPE__ here, + using builtin_define_with_value. Use consistent notation when + defining __GXX_WEAK__. + (WCHAR_TYPE_SIZE): Don't redefine. + (combine_strings): Don't use WCHAR_TYPE_SIZE. + + * cppdefault.h: Don't provide defaults for SIZE_TYPE, + PTRDIFF_TYPE, WCHAR_TYPE, or WINT_TYPE. + * cppinit.c (builtin_array): Remove entries for __SIZE_TYPE__ etc. + * tradcpp.c (initialize_builtins): Likewise. + * gcc.c (cpp_unique_options): Don't muck with __WCHAR_TYPE__. + + * c-lex.h (builtin_define_with_value): Prototype. + * system.h: Poison NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_WCHAR_TYPE, + NO_BUILTIN_PTRDIFF_TYPE, and NO_BUILTIN_WINT_TYPE. + * doc/tm.texi: Remove mention of NO_BUILTIN_SIZE_TYPE etc. + + * config/avr/avr.h, config/h8300/h8300.h, config/i386/i386.h, + config/ia64/ia64.h, config/mips/dec-osf1.h, config/mips/iris6.h, + config/mips/linux.h, config/mips/mips.h, config/mips/netbsd.h, + config/mips/osfrose.h, config/mips/sni-svr4.h, config/rs6000/aix51.h, + config/s390/linux.h, config/sh/sh.h, config/sh/sh64.h, + config/sparc/linux64.h, config/sparc/netbsd-elf.h, + config/sparc/sol2-bi.h, config/sparc/sparc.h: + Do not define NO_BUILTIN_SIZE_TYPE etc. Remove all references + to __SIZE_TYPE__ etc from all spec strings. When this makes + extra specs empty, delete them. + + 2002-05-14 John David Anglin + + * pa.c (override_options): Override TARGET_JUMP_IN_DELAY when scheduling + for PA8000 or generating dwarf2 call frame information. + (output_call): Remove DO_FRAME_NOTES check from return pointer + optimization. + (following_call): Return 0 when scheduling for PA8000 or generating + dwarf2 call frame information. Revise comment. + + 2002-05-14 Neil Booth + + config/alpha: + * alpha.h (TARGET_CPU_CPP_BUILTINS): Define __IEEE_FP + and __IEEE_FP_INEXACT as appropriate. + (CPLUSPLUS_CPP_SPEC): Don't define __cplusplus. + (CPP_SPEC): Remove ieee defines. + * freebsd.h, netbsd.h: Remove ieee defines and cpp_cpu. + + 2002-05-14 Richard Henderson + + * config/i386/i386.c (ix86_save_reg): Make regno unsigned. + (ix86_safe_length, ix86_safe_length_prefix, ix86_safe_memory): Kill. + + 2002-05-14 Neil Booth + + * arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define. + (CPP_SPEC): Update. + (CPP_APCS_PC_SPEC, CPP_APCS_PC_DEFAULT_SPEC, + CPP_FLOAT_SPEC, CPP_FLOAT_DEFAULT_SPEC, CPP_ENDIAN_SPEC, + CPP_ENDIAN_DEFAULT_SPEC, CPP_INTERWORK_DEFAULT_SPEC, + CPP_INTERWORK_SPEC, CPP_PREDEFINES): Remove. + (EXTRA_SPECS): Update. + * arm/conix-elf.h, arm/linux-elf.h, arm/netbsd.h, arm/riscix.h, + arm/riscix1-1.h, arm/rtems-elf.h, arm/semiaof.h, arm/unknown-elf.h, + arm/unknown-elf-oabi.h, arm/vxarm.h: Remove CPP_PREDEFINES and + define TARGET_OS_CPP_BUILTINS if necessary. + + 2002-05-14 Neil Booth + + * gcc.c (cpp_options): Must pass -m* and -f* options + to the front end even when only preprocessing. + (cc1_options): Remove redundant -lang-c. + * tradcpp.c (main): Ignore -m options. + objc: + * lang-specs.h: Similarly. + + 2002-05-14 Vladimir Makarov + + * genautomata.c (transform_3): Add code for transformation + `(A,B,...)+C -> A+C,B,...'. + + Tue May 14 12:48:22 CEST 2002 Jan Hubicka + + * final.c (end_final): Do not output profile_arcs constructor, when + no functions are instrumented. + + Tue May 14 12:38:30 CEST 2002 Jan Hubicka + + * i386.md (testsi to testqi_zext_1 splitter): Fix typo. + + 2002-05-14 Gerald Pfeifer + + * doc/install.texi: Remove special markup originally required for + HTML generation with texi2html. + + 2002-05-14 Andreas Schwab + + * config/ia64/sysv4.h (DO_SELECT_SECTION): Factored out of + SELECT_SECTION. + (UNIQUE_SECTION): Define to get small data correctly. + + * varasm.c (resolve_unique_section): Add third parameter + flag_function_or_data_sections and use it instead of + flag_function_sections. + (assemble_start_function): Pass flag_function_sections. + (asm_emit_uninitialised): Pass flag_data_sections. + (assemble_variable): Likewise. + + 2002-05-14 Richard Henderson + + * config/i386/i386.md: Use define_constants for unspec numbers. + * config/i386/i386.c: Likewise. + + 2002-05-13 Neil Booth + + * doc/contrib.texi: Update my entry. + + 2002-05-13 Mark Mitchell + + * fixinc/inclhack.def (winidss_valist): Limit applicability. + * fixinc/fixincl.x: Regenerated. + * fixinc/tests/base/math.h: Update. + * fixinc/tests/base/testing.h: Likewise. + + 2002-05-13 Zack Weinberg + + * genattr.c (gen_attr): Don't emit a comma after the last + enumerator. + + 2002-05-13 Richard Henderson + + * cfgrtl.c (purge_dead_edges): Handle abnormal call edges created + by non-local gotos. + * recog.c (peephole2_optimize): Likewise. + + 2002-05-13 Andris Pavenis + + * cppfiles.c (open_file): Change mode (DJGPP only) of redirected + input to O_BINARY. + + 2002-05-13 Jeffrey A Law (law@redhat.com) + + * flow.c (invalidate_mems_from_autoinc): Rewrite to use for_each_rtx. + Update prototype and callers. + (propagate_one_insn): Stack pointer adjustments kill MEMs on + the mem_set_list which reference the stack pointer, as do + calls to constant functions as they may clobber outgoing + argument space. + + * i386.c (ia32_multipass_dfa_lookahead): Prototype. + + * i386.c (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD): Define. + (ia32_multipass_dfa_lookahead): New function. + + 2002-05-13 Neil Booth + + * gcc.c (SWITCH_TAKES_ARG): Remove 'V'. + (translate_options): Remove 'V'. + (process_command): Similarly. + doc: + * invoke.texi: Remove documentation of 'V'. + + 2002-05-13 Ulrich Weigand + + * config/s390/linux.h: Revert 2002-04-22 changes. + + 2002-05-13 Scott Marks + + * config/fr30/fr30.md: Only allow splits of immediate loads + if the destination is a register. + + 2002-05-13 Neil Booth + + * Makefile.in (c-common.o, cppinit.o): Update. + * c-common.c: Include except.h. + (cb_register_builtins): Handle __USING_SJLJ_EXCEPTIONS__. + Call TARGET_CPU_CPP_BUILTINS and TARGET_OS_CPP_BUILTINS. + * cppinit.c (__USING_SJLJ_EXCEPTIONS): Not here. + * defaults.h (TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS, + CPP_PREDEFINES): Handle here. + config: + * alpha/alpha-interix.h, alpha/gnu.h, alpha/linux.h, + alpha/netbsd.h, alpha/openbsd.h, alpha/osf.h, alpha/unicosmk.h, + alpha/vms.h, alpha/vxworks.h: Remove CPP_PREDEFINES, define + TARGET_OS_CPP_BUILTINS. + * alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Define. + (CPP_SPEC, EXTRA_SPECS): Update. + (CPP_AM_BWX_SPEC, CPP_AM_MAX_SPEC, CPP_AM_FIX_SPEC, + CPP_AM_CIX_SPEC, CPP_IM_EV4_SPEC, CPP_IM_EV5_SPEC, + CPP_IM_EV6_SPEC, CPP_CPU_EV4_SPEC, CPP_CPU_EV5_SPEC, + CPP_CPU_EV56_SPEC, CPP_CPU_PCA56_SPEC, CPP_CPU_EV6_SPEC, + CPP_CPU_EV67_SPEC, CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Remove. + doc: + * tm.texi (TARGET_REGISTER_CPP_BUILTINS): Remove. + (TARGET_OS_CPP_BUILTINS, TARGET_CPU_CPP_BUILTINS): Define. + + 2002-05-12 Zack Weinberg + + * emit-rtl.c (global_rtl): Update comment. + (const_double_htab, const_double_htab_hash, + const_double_htab_hash, lookup_const_double): New. + (const_int_htab_hash, const_int_htab_eq): Remove const + qualifiers, which cause tons of warnings with RTL checking on. + (gen_rtx_CONST_DOUBLE): Deleted. + (const_double_from_real_value): New function - bears some + resemblance to the former immed_real_const_1. + (immed_double_const): Moved here from varasm.c and + simplified. + (gen_rtx_REG): Make REGNO unsigned to squelch warnings. + (gen_rtx_SUBREG): Use gen_rtx_raw_SUBREG. + (gen_rtx): Use immed_double_const. + (init_emit_once): Initialize the const_double_htab. Use + REAL_VALUE_FROM_INT where possible. Can now use + CONST_DOUBLE_FROM_REAL_VALUE when setting up const_tiny_rtx. + * varasm.c (struct varasm_status): Remove x_const_double_chain. + (const_double_chain, immed_real_const, clear_const_double_mem): Delete. + (immed_double_const, immed_real_const_1): Moved to emit-rtl.c. + (init_varasm_status, mark_varasm_status): Don't touch + x_const_double_chain. + + * output.h: Delete prototype for clear_const_double_mem. + * real.h: Make REAL_VALUE_TYPE a macro again. Remove leading + '0' slot from all CONST_DOUBLE_FORMAT definitions. Prototype + const_double_from_real_value, not immed_real_const_1, and use + it to define CONST_DOUBLE_FROM_REAL_VALUE. Define new macro + CONST_DOUBLE_ATOF. + * rtl.h (CONST_DOUBLE_CHAIN): Kill. + (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH): Adjust. + (gen_rtx_CONST_DOUBLE, immed_real_const): Delete prototypes. + (gen_rtx_REG): Second arg is unsigned. + + * gengenrtl.c (special_rtx): Take out CONST_DOUBLE. + (excluded_rtx): New, return true for CONST_DOUBLE. + (genmacro): Write nothing for excluded codes. + * combine.c (combine_simplify_rtx): Use CONST_DOUBLE_FROM_REAL_VALUE. + * expr.c (expand_expr): Likewise. + * ggc-common.c (ggc_mark_rtx_children_1): Don't mark the + CONST_DOUBLE_CHAIN. + * toplev.c (rest_of_compilation): Don't call + clear_const_double_mem. + + * config/rs6000/rs6000.c (rs6000_float_const): Delete. + (rs6000_hash_constant): Remove CONST_DOUBLE special case. + (toc_hash_eq): Remove CONST_DOUBLE and LABEL_REF special cases. + * config/rs6000/rs6000-protos.h: Don't prototype rs6000_float_const. + * config/c4x/c4x.md, config/rs6000/rs6000.md: Use CONST_DOUBLE_ATOF. + * config/dsp16xx/dsp16xx.md, config/mips/mips.md, + config/pa/pa.md: Use CONST_DOUBLE_FROM_REAL_VALUE. + * config/sparc/sparc.md, config/sparc/sparc.c: Use immed_double_const. + + 2002-05-12 Kaveh R. Ghazi + + * mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define. + + 2002-05-12 Tom Tromey + + * tree.h (copy_node): Don't mention TREE_PERMANENT. + + 2002-05-12 Zack Weinberg + + * gensupport.c (n_comma_elts): Moved here from genattrtab.c. + (scan_comma_elt): New function. Accepts whitespace in comma lists. + * gensupport.h: Prototype new routines. + * genattr.c (gen_attr): Use scan_comma_elt. Avoid unnecessary + use of printf. + * genattrtab.c (n_comma_elts): Moved to gensupport.c. + (next_comma_elt): Use scan_comma_elt. + + * config/i386/i386.md: Use new attribute notation to break up + long lines in define_attr forms. + + 2002-05-12 Richard Henderson + + * expr.c (compress_float_constant): New. + (emit_move_insn): Use it. + (float_extend_from_mem): New. + (init_expr_once): Initialize it. + * real.c (exact_real_truncate): New. + + * config/i386/i386.h (CONST_COSTS): Assume CONST_DOUBLE gets + dropped into memory; penalize for size. + (RTX_COSTS): FLOAT_EXTEND is free. + * config/i386/i386.md (extendsfdf2, extendsfxf2, extendsftf2, + extenddfxf2, extenddftf2): Accept constants and drop them to memory. + + 2002-05-12 Richard Henderson + + * profile.h (profile_info): Add missing extern to declaration. + * profile.c (profile_info): Define it. + + 2002-05-11 John David Anglin + + * pa/pa32-regs.h (HARD_REGNO_MODE_OK): Revise sets of general registers + used for DImode and TImode. + + 2002-05-11 Neil Booth + + * cpplex.c (_cpp_lex_direct): When in a directive at EOF + fake a newline. + + 2002-05-11 Zack Weinberg + + * config/rs6000/rs6000.c (rs6000_default_long_calls, + rs6000_longcall_switch, rs6000_set_default_type_attributes): New. + (TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Set it. + (rs6000_override_options): Handle -m(no-)longcall. + (init_cumulative_args, output_mi_thunk): Check for both + longcall and shortcall attributes on the function. + (rs6000_attribute_table): Add "shortcall". + (rs6000_handle_longcall_attribute): Update comment. + (altivec_expand_unop_builtin, altivec_expand_binop_builtin, + altivec_expand_ternop_builtin): Add default clauses to switches + to silence warnings. + + * config/rs6000/rs6000.h: Declare rs6000_longcall_switch and + rs6000_default_long_calls. Define REGISTER_TARGET_PRAGMAS. + (TARGET_OPTIONS): Add longcall and no-longcall. + + * config/rs6000/rs6000.md (call_nonlocal_sysv, + call_value_nonlocal_sysv): Split by alternatives. One pair + accepts only SYMBOL_REFs and rejects if CALL_LONG is set in + the call cookie. The other pair accepts only LR/CTR and has + no restriction. + + * config.gcc (rs6000-*-* | powerpc*-*-* trailer stanza): + Set c_target_objs, cxx_target_objs; add t-rs6000-c-rule to + tmake_file. + * config/rs6000/rs6000-c.c: New file. + * config/rs6000/t-rs6000-c-rule: New file. + * config/rs6000/rs6000-protos.c: Add multiple-include guard. + Prototype rs6000_pragma_longcall. + + * doc/extend.texi: Document shortcall attribute. + * doc/invoke.texi: Document -mlongcall, -mno-longcall. + + 2002-05-11 John David Anglin + + * reorg.c (dbr_schedule): Remove unnecessary test. + + Sat May 11 14:34:35 CEST 2002 Jan Hubicka + + * i386.md (testsi to testqi spliters): New. + + 2002-01-14 Josef Zlomek + + cfg.c (dump_edge_info): added dumping of EDGE_CAN_FALLTHRU. + + Wed Jan 9 2002 Josef Zlomek + + * basic-block.h: New flag EDGE_CAN_FALLTHRU + * cfganal.c (set_edge_can_fallthru_flag): New function; marks the edges + that can be made fallthru. + + Mon Nov 12 16:25:53 CET 2001 Jan Hubicka + + * cfglayout.c (cleanup_unconditional_jumps): New static function. + (cfg_layout_initialize): Use it. + + 2002-05-11 Marek Michalkiewicz + + * config/avr/avr.c (avr_mcu_types): Update supported devices. + * config/avr/avr.h (CPP_SPEC, LINK_SPEC, CRT_BINUTILS_SPECS): Likewise. + * config/avr/t-avr (MULTILIB_MATCHES): Likewise. + + 2002-05-11 Kazu Hirata + + * dbxout.c: Fix formatting. + * dependence.c: Likewise. + * df.c: Likewise. + * diagnostic.c: Likewise. + * doloop.c: Likewise. + * dominance.c: Likewise. + * doschk.c: Likewise. + * dwarf2asm.c: Likewise. + * dwarf2out.c: Likewise. + * dwarfout.c: Likewise. + + 2002-05-10 Richard Henderson + + * final.c (end_final): Tidy whitespace. Don't honor flag_pack_struct. + Convert integers constants as needed. Replace "nwords" field with + "sizeof_bb". + (final): Save profile data if cfun->arc_profile, not profile_arc_flag. + * function.h: Fix typo in comment. + * libgcc2.c (struct bb): Replace "nwords" with "sizeof_bb". + + 2002-05-10 Roger Sayle + + * fold-const.c (build_range_check): Optimize (c>=1) && (c<=127) + into the equivalent (signed char)c > 0. + + 2002-05-10 Janis Johnson + + * loop.c: (PREFETCH_EXTREME_DIFFERENCE, PREFETCH_BEFORE_LOOP): New. + (PREFETCH_CONDITIONAL): Renamed from PREFETCH_NOT_ALWAYS. + (struct prefetch_info): Fix spelling of member bytes_accessed. + (emit_prefetch_instructions): Make dump messages more regular; + restructure code to add more dump messages; use new macros for + heuristics. (There are no code generation changes in any of this). + + 2002-05-10 David S. Miller + + * rtl.h (INSN_ANNULLED_BRANCH_P): Accept INSN too, update comment. + (struct rtx_def): Update unchanging flag comment. + * doc/rtl.texi (INSN_ANNULLED_BRANCH_P): Update description. + * reorg.c (delete_from_delay_list): INSN_ANNULLED_BRANCH_P needs + to be handled to INSN too. + (dbr_schedule): Likewise. + * resource.c (next_insn_no_annul): Likewise. + + * cse.c (rtx_cost): Remove multiplication by power of 2 special + casing. + + 2002-05-14 Gerald Pfeifer + + * doc/install.texi (Specific, *-*-solaris2*): Update passus on + setting CONFIG_SHELL to /bin/ksh and remove alternate trick to + (possibly) work around broken /bin/sh. + + 2002-05-10 Rainer Orth + + * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Use mabi=64 and + . as N64/N32 libgcc_s.so subdirs. + + 2002-05-10 David S. Miller + + * config/sparc/sparc.md: Use define_constants for unspec numbers. + + * rtl.h (struct rtx_def): Document unchanging and in_struct flags + more accurately. + (INSN_ANNULLED_BRANCH_P): Only valid for JUMP_INSN and CALL_INSN, fix + comment. + (INSN_FROM_TARGET_P): Valid also for CALL_INSN. + * doc/rtl.texi: Document these macros more accurately. + * recog.c (whole file): Only mess with INSN_ANNULLED_BRANCH_P for + JUMP_INSNs and CALL_INSNs. + * resource.c (whole file): Only mess with INSN_ANNULLED_BRANCH_P + or INSN_FROM_TARGET_P if the code is appropriate. + + 2002-05-10 Marek Michalkiewicz + + * config/avr/avr.c (print_operand): Check that addr is a SYMBOL_REF + before using SYMBOL_REF_FLAG (addr). + + * config/avr/avr-protos.h (avr_io_address_p): Declare. + * config/avr/avr.c (io_address_p): Rename to avr_io_address_p. + Make non-static. Update all callers. + * config/avr/avr.md (*cbi, *sbi, *sbix_branch, *sbix_branch_bit7): + New insns to clear/set/test a single bit in I/O address space. + + 2002-05-09 Kaveh R. Ghazi + + * rtl.h (ENABLE_RTL_FLAG_CHECKING): Also check for gcc >= 2.7. + + 2002-05-09 Neil Booth + + * Makefile.in: Update. + * c-common.c (flag_iso, flag_undef, cb_register_builtins, + builtin_define_std): New. + (c_common_init): Register CPP builtins callback. + * c-common.h (flag_iso, flag_undef): New. + * c-decl.c (c_decode_option): Set flag_iso and flag_undef. + * c-lex.c: Don't include target.h. + (cb_register_builtins): Move to c-common.c. + (init_c_lex): Don't register hook here. + * c-lex.h (builtin_define, builtin_assert, builtin_define_std): New. + (cpp_define, cpp_assert): Remove. + * gcc.c (cc1_options): Pass -undef to front end. + * target-def.h (TARGET_REGISTER_CPP_BUILTINS): Remove. + (TARGET_INITIALIZER): Update. + * target.h (struct cpp_reader): Don't predeclare. + (struct gcc_target): Remove cpp builtin hook. + * tree.c (default_register_cpp_builtins): Remove. + doc: + * tm.texi: Update. + + 2002-05-09 Neil Booth + + * cppexp.c (_cpp_expand_op_stack): Set op_limit. + + 2002-05-09 Rainer Orth + + * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Define. + (SHLIB_LINK, SHLIB_INSTALL): Adjust. + + 2002-05-09 Jakub Jelinek + + * config/sparc/t-linux64 (SHLIB_MAPFILES): Set. + * config/sparc/libgcc-sparc-glibc.ver: New file. + * config/cris/t-linux (SHLIB_MAPFILES): Remove. + * mklibgcc.in: Preprocess SHLIB_MAPFILES with ml flags. + + 2002-05-09 Jakub Jelinek + + PR target/6429 + * Makefile.in (libgcc.mk): Pass SHLIB_SLIBDIR_SUFFIXES to mklibgcc. + * mklibgcc.in: If SHLIB_SLIBDIR_SUFFIXES is defined, put libgcc_s + shared libraries into multilib dirs, with SONAME libgcc_s.so.1 for + base multilibs. + * config/t-slibgcc-elf-ver (SHLIB_LINK): Adjust for the above. + * config/t-slibgcc-sld (SHLIB_LINK): Likewise. + * config/sparc/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define. + * config/sparc/t-sol2-64 (SHLIB_SLIBDIR_SUFFIXES): Define. + + 2002-05-09 Richard Henderson + + * config/ia64/ia64.md: Use define_constants for unspec numbers. + * config/ia64/ia64.c: Likewise. + + 2002-05-09 Richard Sandiford + + * config/mips/mips.c (mips_add_large_offset_to_sp): Remove FILE arg. + (save_restore_insns): Likewise. + (mips_expand_prologue, mips_expand_epilogue): Update callers. + (highpart_shift_operator): Attach ATTRIBUTE_UNUSED to mode argument. + + Thu May 9 11:50:09 2002 Jeffrey A Law (law@redhat.com) + + * athlon.md, k6.md, pentium.md, ppro.md): New files. + * i386.md: Move scheduling information into new files. + + * i386.md (type attribute): Add "rotate" for rotate insns. + (rotate insns): Set type to "rotate". + (various attributes and function units): Treat rotate like shift. + (pent_pair attribute): Only rotates by one bit position are + pairable. + (sbb insns): Explicitly set pent_pair attribute on a couple + that were missing it. + + Thu May 9 18:29:24 2002 J"orn Rennecke + + * sh.c (sh_builtin_saveregs): If starting with an odd fp register, + make sure that buffer starts on odd word address. + (sh_va_arg): Skip odd fp registers when reading a double precision + value. + + 2002-05-09 Neil Booth + + * tree.h (preserve_data, object_permanent_p, type_precision): + Remove. + + 2002-05-09 Neil Booth + + * cpplib.c (cpp_init_internal_pragmas): Remove #pragma poison. + * cppmacro.c (paste_all_tokens): Bad pastes are a hard error. + doc: + * cpp.texi: Update for removal of obsolete features. + + Thu May 9 07:46:18 2002 Jan Hubicka + Jeffrey A Law (law@redhat.com) + + * i386.c (ia32_use_dfa_pipeline_interface): New function. Use + the DFA interface for Pentium processors. + (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE): DEFINE. + (attr_pent_pair, ix86_pent_find_pair): Remove. + (ix86_sched_reorder_pentium): Remove. + (ix86_sched_reorder): Remove reordering for Pentium. + * i386.md (Pentium scheduling): Rewrite using DFA description. + + Thu May 9 14:55:39 CEST 2002 Jan Hubicka + + * cfganal.c (can_fallthru): Fix fast path. + * cfgrtl.c (verify_flow_info): Avoid crash on conditionals + with edges to the next block. + + Thu May 9 14:52:45 CEST 2002 Jan Hubicka + Pavel Nejedly + + * final.c (end_final): Use C trees to output data structures for profiling. + + * Makefile.in (LIBGCC_DEPS): Added missing dependency on gcov-io.h + (profile.o): New dependency profile.h + (final.o): New dependency profile.h + * profile.h: New file. New global structure profile_info. + * final.h (count_edges_instrumented_now): Declare. + (current_function_cfg_checksum): Declare. + (function_list): New structure. + (functions_head, functions_tail): New static variables. + (end_final): Emits more data, removed some -ax stuff. + (final): Stores function names and chcksums. + * gcov-io.h (__write_gcov_string): New function. + (__read_gcov_string): New function. + * gcov.c (read_profile): New function. + (create_program_flow_graph): Uses read_profile instead of reading + da_file. + (read_files): Removed da_file checking, it's done by read_profile now. + * libgcc2.c (bb_function_info): New structure. + (bb): New field in structure, removed some -ax stuff. + (__bb_exit_func): Changed structure of da_file. + * profile.c (count_edges_instrumented_now): New global variable. + (current_function_cfg_checksum): New global variable. + (max_counter_in_program): New global variable. + (get_exec_counts): New function. + (compute_checksum): New function. + (instrument_edges): Sets count_edges_instrumented_now. + (compute_branch_probabilities): Uses get_exec_counts instead of + reading da_file. + (branch_prob): Calls compute_checksum and writes extra data to bbg_file. + (init_branch_prob): Removed da_file checking, done in get_exec_counts + now. + (end_branch_prob): Removed da_file checking, done in get_exec_counts + now. + * gcov.texi: Updated information about gcov file format. + + 2002-05-09 Kazu Hirata + + * sbitmap.c: Fix formatting. + * scan.c: Likewise. + * scan-decls.c: Likewise. + * sched-deps.c: Likewise. + * sched-ebb.c: Likewise. + * sched-rgn.c: Likewise. + * sched-vis.c: Likewise. + * sdbout.c: Likewise. + * sibcall.c: Likewise. + * simplify-rtx.c: Likewise. + * ssa.c: Likewise. + * ssa-ccp.c: Likewise. + * ssa-dce.c: Likewise. + * stmt.c: Likewise. + * stor-layout.c: Likewise. + * stringpool.c: Likewise. + + 2002-05-09 David S. Miller + + * config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9. + + 2002-05-07 David S. Miller + + * config/sparc/sparc.h (TARGET_BUGGY_QP_LIB): Define to zero. + * config/sparc/sol2.h (TARGET_BUGGY_QP_LIB): Override to one. + * config/sparc/sparc.c (emit_soft_tfmode_libcall): If the Qp + library implementation clobbers the output before the inputs + are fully consumed, use stack temporary for the output. + + 2002-05-09 Jason Thorpe + + * config/netbsd.h (CPP_SPEC): Remove. + * config/i386/netbsd-elf.h (CPP_SPEC): Define. + * config/i386/netbsd.h (CPP_SPEC): Define. + * config/ns32k/netbsd.h (CPP_SPEC): Define. + * config/sparc/netbsd-elf.h (CPP_SPEC): Remove. + * config/sparc/netbsd.h (CPP_SPEC): Define. + * config/vax/netbsd.h (CPP_SPEC): Define. + + 2002-05-08 Kazu Hirata + + * read-rtl.c: Fix formatting. + * real.c: Likewise. + * recog.c: Likewise. + * regclass.c: Likewise. + * regmove.c: Likewise. + * reg-stack.c: Likewise. + * reload1.c: Likewise. + * reload.c: Likewise. + * resource.c: Likewise. + * rtlanal.c: Likewise. + * rtl.c: Likewise. + * rtl-error.c: Likewise. + + 2002-05-08 John David Anglin + + * pa/pa-64.h (MAX_WCHAR_TYPE_SIZE): Delete. + * pa/pa.h (MAX_WCHAR_TYPE_SIZE): Delete. + + 2002-05-08 Bernd Schmidt + + * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Tweak previous change to + use __SSE2__ macro instead. + * config/i386/xmmintrin.h: Likewise. + + 2002-05-08 Janis Johnson + + * rtl.h (RTL_FLAG_CHECK*): Add an argument for the macro name, + and use it in all invocations of these macros. Clean up comments. + * rtl.c (rtl_check_failed_flag): Add an argument for the name + of the flag access macro whose check failed. + * doc/rtl.texi (Flags): Document additional flag uses. + + 2002-05-08 Robert Spier + Neil Booth + + PR preprocessor/6521 + * cppfiles.c (handle_missing_header): Don't do anything + different for <> includes. + doc: + * cppopts.texi: Update documentation for -MG. + + 2002-05-08 Neil Booth + + * cpplex.c (cpp_interpret_charconst): Truncate as well as + sign-extend. + doc: + * cpp.texi: Clarify multichar charconst valuation. + + 2002-05-08 Mark Mitchell + + * doc/invoke.texi: Document -mwindiss option. + + 2002-05-08 Jason Merrill + + * dwarf2out.c (output_call_frame_info): Don't emit a CIE with no FDEs. + + * dwarf2out.c (gen_type_die): Abort on broken recursion. + + PR c++/6381 + * dwarf2out.c (rtl_for_decl_location): Only expand INTEGER_CST and + REAL_CST. + + 2002-05-08 Nick Clifton + + * config/arm/t-arm-elf (MULTILIB): Do not allow big-endian/ + little-endian multilibs to override arm/thumb multilibs. + Do not build hardware floating point multilibs, nor apcs-26 + multilibs for the Thumb. + + 2002-05-08 Mark Mitchell + + PR c/6569. + * varasm.c (mark_weak): New function. + (merge_weak): Use it. Do not call declare_weak. + (declare_weak): Use merge_weak. + + Wed May 8 13:12:11 CEST 2002 Jan Hubicka + + * cse.c (dead_libcall_p): Update counts. + (delete_trivially_dead_insns): Update call of dead_libcall_p. + + Wed May 8 11:08:50 CEST 2002 Jan Hubicka + + * cfglayout.c (function_tail_eff_head): Rename to ... + (function_footer): ... this one. + (unlink_insn_chain): New functions. + (label_for_bb): Only call block_label and emit debug message. + (record_effective_endpoints): Actually unlink the headers and footers. + (fixup_reorder_cahin): Re-insert the unlinked sequences. + (cfg_layout_duplicate_bb): Use duplicate_insn_chain. + * cfglayout.h (struct reorder_block_def): New fields footer/header; + remove eff_head/eff_end. + * rtl.h (set_first_insn): Declare. + * emit-rtl.c (set_first_insn): New function. + + * cfglayout.c (fixup_reorder_chain): Dump duplicated + (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge, + cfg_layout_duplicate_bb): New global function. + (duplicate_insn_chain): New static function. + * cfglayout.h (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge, + cfg_layout_duplicate_bb): Declare. + (struct reorder_block_def): Add "original" field. + * emit-rtl.c (emit_copy_of_insn_after): New function. + * rtl.h (emit_copy_of_insn_after): Declare. + + * cfglayout.c (fixup_fallthru_exit_predecessor): Kill. + (fixup_reorder_chain): properly handle edges to exit block. + + Wed May 8 11:10:31 CEST 2002 Zdenek Dvorak + Jan Hubicka + + * basic-block.h (note_prediction_to_br_prob): declare. + * c-semantics.c: Inlucde predit.h + (expand_stmt): predict GOTO_STMT as not taken. + * cfgcleanup.c: (delete_unreachable_blocks): Make global. + (cleanup_cfg): Do not free tail_recursion_list. + * cfgrtl.c (can_delete_note_p): Delete NOTE_INSN_PREDICTION. + (flow_delete_block): Kill predictions past end of basic block. + * output.h (delete_unreachable_blocks): Declare. + * predict.c (predicted_by_p, process_note_predictions, + process_note_prediction, last_block_p): New function. + (estimate_probability): Bypass loop on PRED_CONTINUE; + do not handle noreturn heuristics; kill PRED_RETURN; add + PRED_EARLY_RETURN. + * predict.def (PRED_CONTINUE, PRED_EARLY_RETURN, PRED_GOTO, + PRED_CONST_RETURN, PRED_NEGATIVE_RETURN, PRED_NULL_RETURN): New. + * predict.h (IS_TAKEN): New constant. + * print-rtl.c (print_rtx): Pretty print NOTE_INSN_PREDICTION. + * rtl.c (NOTE_INSN_PREDICTION): New. + * rtl.h (NOTE_PREDICTION, NOTE_PREDICTION_ALG, NOTE_PREDICTION_FLAGS): + New macro. + (insn_note): add NOTE_INSN_PREDICTION. + * sibcall.c (optimize_sibling_and_tail_recursive_call): Do not build + CFG; free tail_recursion_label_list. + * stmt.c: Include predict.h; + (return_prediction): New. + (expand_value_return): Use it. + * toplev.c: Lower NOTE_INSN_PREDICTION before sibcall. + + 2002-05-08 Richard Sandiford + + * config/mips/mips.md: Name the unspecs with define_constant. + (*HILO_delay): Rename to 'hilo_delay' (no star). + (reload_indi): Replace gen_rtx_UNSPEC with gen_hilo_delay. + (reload_outdi, reload_outsi): Likewise. + + 2002-05-07 Kazu Hirata + + * toplev.c: Fix formatting. + + 2002-05-07 Janis Johnson + + * config.in (ENABLE_RTL_FLAG_CHECKING): New. + * configure.in (ac_rtlflag_checking): New. + * doc/install.texi (--enable-checking): Document RTL flag checking. + + 2002-05-07 Neil Booth + + * c-common.c (c_common_init): Set options->unsigned_wchar. + * cppinit.c (cpp_create_reader): Default unsigned_wchar, + group target dependencies. + (init_builtins, cpp_handle_option): Update. + * cpplex.c (cpp_interpret_charconst): Update. + * cpplib.h (struct cpp_options): Add unsigned_wchar, rename + signed_char to unsigned_char, group target dependencies. + * defaults.h (WCHAR_UNSIGNED): Remove. + * system.h (WCHAR_UNSIGNED, MAX_CHAR_TYPE_SIZE): Poison. + config: + * freebsd.h, interix.h, alpha/freebsd.h, arm/freebsd.h, + i386/386bsd.h, i386/beos-elf.h, i386/bsd386.h, i386/cygwin.h, + i386/djgpp.h, i386/freebsd-aout.h, i386/i386-interix.h, + i386/win32.h, ia64/freebsd.h, mips/netbsd.h, rs6000/freebsd.h, + sh/elf.h, sh/sh.h, sparc/freebsd.h: Remove WCHAR_UNSIGNED. + doc: + * tm.texi: Remove MAX_CHAR_TYPE_SIZE. + + 2002-05-07 Mark Mitchell + + * fixinc/inclhack.def (windiss_math1): New fix. + (windiss_math2): Likewise. + (windiss_valist): Likewise. + * fixinc/fixincl.x: Regenerated. + + 2002-05-07 Andreas Jaeger + + * genautomata.c (output_internal_min_issue_delay_func): Add + ATTRIBUTE_UNUSED to avoid warning with empty dfa. + (output_internal_trans_func): Likewise. + + Tue May 7 10:06:22 2002 Jeffrey A Law (law@redhat.com) + + * pa.c (hppa_profile_hook): Use force_reg to get the address + of the profile hook into an appropriate pseudo register. + + 2002-05-07 Mark Mitchell + + * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -mwindiss. + (LINK_START_SPEC): Handle it. + (LINK_OS_SPEC): Likewise. + (CPP_SPEC): Likewise. + (STARTFILE_SPEC): Likewise. + (LIB_SPEC): Likewise. + (ENDFILE_SPEC): Likewise. Do not assume crtsavres.o is used on + all platforms. + (CRTSAVRES_DEFAULT_SPEC): New macro. + (LIB_WINDISS_SPEC): New macro. + (CPP_OS_WINDISS_SPEC): Likewise. + (STARTFILE_WINDISS_SPEC): Likewise. + (ENDFILE_WINDISS_SPEC): Likewise. + (LINK_START_WINDISS_SPEC): Likewise. + (LINK_OS_WINDISS_SPEC): Likewise. + * config/rs6000/windiss.h: New file. + + 2002-05-07 Aldy Hernandez + + * config/rs6000/rs6000.c (bdesc_2arg): Fix vmax typos. + + 2002-05-06 David S. Miller + + * config/sparc/sparc.md (shift insns): Do not mask off + second operand, 'I' constraint and SHIFT_COUNT_TRUNCATED + take care of it. + + 2002-05-06 Richard Henderson + + PR c++/6212 + * expr.c (highest_pow2_factor_for_type): New. + (expand_assignment): Use it. + + 2002-05-06 Aldy Hernandez + + * config/rs6000/rs6000.md ("altivec_mtvscr"): Change to + unspec_volatile. + ("altivec_mfvscr"): Same. + + 2002-05-06 Janis Johnson + + * rtl.h (struct rtx_def): Update comments. + (RTL_FLAG_CHECK[12345678]): New. (rtl_check_failed_flag): Declare. + (RTL_FLAG): New. (CLEAR_RTX_FLAGS): New. (flag access macros): Use + RTL_FLAG_CHECK macros with list of expected RTL codes. + * rtl.c (copy_rtx, shallow_copy_rtx): Use RTX_FLAG macro. + (rtl_check_failed_flag): New. + * reload1.c (reload): Use REG macro before changing rtx to MEM. + (reload_cse_noop_set_p): Check rtx code before using access macro. + * config/ia64/ia64.c (process_for_unwind_directive): Check rtx code + before using access macro. + + 2002-05-06 Janis Johnson + + * doc/rtl.texi (Flags): Update to reflect current usage. + + 2002-05-06 Roger Sayle + + PR opt/3995 + * fold-const.c (sign_bit_p): New function. + (fold) [EQ_EXPR]: Use this to convert (A & C) == 0 into A >= 0 and + (A & C) != 0 into A < 0, when constant C is the sign bit of A's type. + Reapply fold when converting (A & C) == C into (A & C) != 0. + (fold_binary_op_with_conditional_arg): Fix typo in comment. + + 2002-05-07 Neil Booth + + * c-common.c (warn_multichar): New. + (c_common_init): Set CPP's warn_multichar. + * c-common.h (warn_multichar): New. + * c-decl.c (warn_multichar): Remove. + * c-lex.c (lex_charconst): Update. + * c-tree.h (warn_multichar): Remove. + * cppexp.c (eval_token): Sign-extend charconst value. + * cppinit.c (cpp_create_reader): Set warn_multichar. + * cpplex.c (cpp_interpret_charconst): Don't sign-extend + each character. Update prototype. Sign-extend the result. + * cpplib.h: Fix conditions. + (struct cpp_options): Add new warning flag. + (cpp_interpret_charconst): Update prototype. + doc: + * cpp.texi: Update documentation. + + 2002-05-06 Vladimir Makarov + + * genautomata.c (form_the_same_automaton_unit_lists_from_regexp): + Fix typo in usage of allof instead of unit. + + 2002-05-06 Richard Henderson + + * recog.c (if_test_bypass_p): Accept multiple set insns for OUT, + and any jump or call for IN. + + 2002-05-06 Bernd Schmidt + + * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Define __SSE2_BUILTINS__ if + -msse2. + * config/i386/xmmintrin.h: Use it to conditionalize SSE2 support. + + 2002-05-06 Roger Sayle + + * fold-const.c (lshift-double): Cast the high word to an unsigned + HOST_WIDE_INT when extracting sign bit to avoid compiler warning. + (div_and_round_double): Cast carry to a signed HOST_WIDE_INT to + avoid compiler warning. (fold): Remove redundant code from + BIT_AND_EXPR as integer operands are canonicalized to be arg1. + + 2002-05-06 Jeff Law + + * pa-protos.h (hppa_fpstore_bypass_p): Declare. + * pa.c (pa_adjust_cost): Remove all true dependency cost + adjustments. Also remove support for non-DFA scheduling. + * pa.md (700, 7100, 7100lc, 7200, 7300): Use bypass mechanism + to adjust true dependency costs. Update various comments. + (7100lc, 7200, 7300 scheduling): Simplify by combining the + FP ALU & MPY units into a single unit. + + 2002-05-06 Catherine Moore + + * config/v850/v850.c (compute_register_save_size): Make sure + to count all of the registers that will be saved. + + Mon May 6 18:03:11 CEST 2002 Jan Hubicka + + * i386.c (q_regs_operand): Use ANY_QI_REGS_P. + + 2002-05-06 David S. Miller + + * config/sparc/sparc.c (emit_soft_tfmode_libcall): Do not + allow result to overlap input operands in memory. + + 2002-05-06 Neil Booth + + doc: + * cpp.texi: Update multichar charconst docs. + + 2002-05-06 Neil Booth + + * cpplex.c (cpp_interpret_charconst): Sign-extend each + character. Don't ignore excess characters. Treat + multicharacter character constants as signed. + (cpp_parse_escape): Clarify diagnostic. + + 2002-05-05 Jakub Jelinek + + * config/sparc/sparc.md (ashlsi3): If shift count is const1_rtx, + use add instead of shift. + (ashldi3_sp64): Likewise. + (ashlsi3_const1, ashldi3_const1): Remove. + * config/sparc/sparc.h (PREDICATE_CODES): Add const1_operand. + * config/sparc/sparc.c (const1_operand): New. + + 2002-05-05 Jason Thorpe + + * config.gcc (alpha*-*-netbsd*): Don't use crtstuff. + + 2002-05-05 Jakub Jelinek + + PR target/6561 + * config/sparc/sparc.md (muldi3_v8plus): Handle %1 equal to %2. + + 2002-05-05 Richard Henderson + + * config/alpha/alpha.c (alpha_adjust_cost): Remove everything but + memory latency adjustments. + (alpha_variable_issue): Remove. + (alpha_use_dfa_pipeline_interface): New. + (alpha_multipass_dfa_lookahead): New. + * config/alpha/alpha.md: Remove define_function_unit scheduling; + include new dfa scheduling. + (attr type): Add none. + (blockage): Use it. + * config/alpha/ev4.md: New. + * config/alpha/ev5.md: New. + * config/alpha/ev6.md: New. + + 2002-05-05 David S. Miller + + * recog.c (store_data_bypass_p): Handle CLOBBER inside PARALLEL. + + 2002-05-05 Kazu Hirata + + * cse.c: Fix formatting. + * emit-rtl.c: Likewise. + + 2002-05-05 Vladimir Makarov + + * genautomata.c (initiate_states): Add additional guard to + initialize `units_array'. + + 2002-05-05 Vladimir Makarov + + * genautomata.c (form_the_same_automaton_unit_lists_from_regexp, + process_unit_to_form_the_same_automaton_unit_lists, + form_the_same_automaton_unit_lists + check_unit_distributions_to_automata): New prototypes and + functions. + (check_automata): Rename it into `check_automata_insn_issues'. + (unit_decl): New fields `the_same_automaton_unit' and + `the_same_automaton_message_reported_p'. + (unit_decl_t): New typedef. + (the_same_automaton_lists): New gloval variable. + (unit_regexp, unit_set_el, units_array, units_cmp, + output_get_cpu_unit_code_func): Use the typedef. + (evaluate_max_reserv_cycles): Increment + `description->max_insn_reserv_cycles'. + (initiate_states): Don't increment `max_cycles_num'. + (transform_insn_regexps): Move code around transformation of + regexps from `generate'. + (generate): Remove call of `transform_insn_regexps'. + (expand_automata): Call `transform_insn_regexps' and + `check_unit_distributions_to_automata'. Check errors before + `generate'. + + * config/sparc/ultra3.md (us3_a0, us3_a1): Move the units into + automaton `ultrasparc3_1'. + + 2002-05-05 Neil Booth + + * c-common.c (c_common_init): Set up CPP arithmetic. + * cppinit.c (cpp_create_reader): Default CPP arithmetic to + something reasonable for the host. + (sanity_checks): Add checks. + (cpp_read_main_file): Call sanity_checks() from here... + (cpp_post_options): ... not here. + * cpplex.c (cpp_interpret_charconst): Get max_chars right. + * cpplib.h (struct cpp_options): New member int_precision. + + 2002-05-05 Franz Sirl + + * doc/install.texi (powerpc-*-linux-gnu*): Update build requirements. + + 2002-05-04 David S. Miller + + * config/sparc/linux.h, config/sparc/linux64.h + (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define twice. + + * config/sparc/sparc.c (sparc_rtx_costs): Describe costs of + more RTX codes. + * config/sparc/sparc.h (RTX_COSTS_CASES): List those new codes. + + * recog.c (store_data_bypass_p): Handle out_insn being a PARALLEL + of SETs. + + 2002-05-05 Tim Josling + + * treelang; New directory for new sample language treelang. + + 2002-05-04 Neil Booth + + * Makefile.in (c-lex.o): Update. + * c-lex.c: Include target.h. + (cb_register_builtins): New. + (init_c_lex): Set builtins callback. + * c-lex.h (cpp_define, cpp_assert): New prototypes. + * cppinit.c (init_builtins): Use callback, including for + GXX_WEAK. + * cpplib.h (struct cpp_callbacks): New member. + * target-def.h (TARGET_REGISTER_CPP_BUILTINS): New. + (TARGET_INITIALIZER): Update. + * target.h (struct gcc_target): New hook. + * tree.c (default_register_cpp_builtins): New. + * tree.h (default_register_cpp_builtins): New. + doc: + * tm.texi (TARGET_REGISTER_CPP_BUILTINS): Document. + + 2002-05-04 Neil Booth + + * cppinit.c (MAX_WCHAR_TYPE_SIZE): Move to cpplib.h + (cpp_post_options): Move sanity checks to... + (sanity_checks): New. + * cpplex.c (maybe_read_ucs): Fix prototype. + (parse_string, cpp_parse_escape): Cast for %c format specifier. + * cpplib.h (cppchar_t): Use unsigned long or unsigned long long + if necessary. + + 2002-05-04 Bernd Schmidt + + * config/i386/i386.c (bdesc_2arg): Add a couple of missing SSE2 + builtins. Use V2DI patterns instead of TI for logical operations. + (ix86_init_mmx_sse_builtins): Add a couple of missing SSE2 builtins. + Correct definitions of psadbw, pmovmskb128, movntdq, cvtdq2ps. + (ix86_expand_builtins): Change the pattern used for movntdq. + * config/i386/i386.md (sse2_andv2di3, sse2_iorv2di3, sse2_xorv2di3, + sse2_nandv2di3): New patterns. + (sse2_anddf3, sse2_nanddf3, sse2_iordf3, sse2_xordf3): Correct modes + on operands. + (sse2_movntv2di): Renamed from sse2_movntti and modes adjusted. + (cvtdq2pd): Correct mode on operand 1. + (sse2_umulsidi3): Describe without unspec. + (sse2_psadbw, mmx_psadbw): Describe with unspec; use more appropriate + machine modes. + (lshrv2di3): Renamed from sse2_lshrv2di3 and removed unspec. + (ashlv2di3): Likewise, from sse2_ashlv2di3. + (ashrv8hi3, ashrv4si3, lshrv8hi3, lshrv4si3, lshrv2di3, ashlv8hi3, + ashlv4si3, ashlv2di3): Use SImode for shift count. + (ashrv8hi3_ti, ashrv4si3_ti, lshrv8hi3_ti, lshrv4si3_ti, lshrv2di3_ti, + lshrv4si3_ti, lshrv2di3_ti, ashlv8hi3_ti, ashlv4si3_ti, ashlv2di3_ti): + New patterns. + * config/i386/xmmintrin.h (__v2df, __v2di, __v4si, __v8hi, __v16qi): + New typedefs. + (__m128i, __m128d): New macros. + (_mm_add_pd, _mm_add_sd, _mm_sub_pd, _mm_sub_sd, _mm_mul_pd, + _mm_mul_sd, _mm_div_pd, _mm_div_sd, _mm_sqrt_pd, _mm_sqrt_sd, + _mm_min_pd, _mm_min_sd, _mm_max_sd, _mm_max_pd, _mm_and_pd, + _mm_andnot_pd, _mm_xor_pd, _mm_or_pd, _mm_cmpeq_pd, _mm_cmplt_pd, + _mm_cmple_pd, _mm_cmpgt_pd, _mm_cmpge_pd, _mm_cmpneq_pd, + _mm_cmpnlt_pd, _mm_cmpnle_pd, _mm_cmpngt_pd, _mm_cmpnge_pd, + _mm_cmpord_pd, _mm_cmpunord_pd, _mm_cmpeq_sd, _mm_cmplt_sd, + _mm_cmple_sd, _mm_cmpgt_sd, _mm_cmpge_sd, _mm_cmpneq_sd, + _mm_cmpnlt_sd, _mm_cmpnle_sd, _mm_cmpngt_sd, _mm_cmpnge_sd, + _mm_cmpord_sd, _mm_cmpunord_sd, _mm_comieq_sd, _mm_comilt_sd, + _mm_comile_sd, _mm_comigt_sd, _mm_comige_sd, _mm_comineq_sd, + _mm_ucomieq_sd, _mm_ucomieq_sd, _mm_ucomilt_sd, _mm_ucomile_sd, + _mm_ucomigt_sd, _mm_ucomige_sd, _mm_ucomineq_sd, _mm_cvtepi32_pd, + _mm_cvtepi32_ps, _mm_cvtpd_epi32, _mm_cvtpd_pi32, _mm_cvtpd_ps, + _mm_cvttpd_epi32, _mm_cvttpd_pi32, _mm_cvtpi32_pd, _mm_cvtps_epi32, + _mm_cvttps_epi32, _mm_cvtps_pd, _mm_cvtsd_si32, _mm_cvttsd_si32, + _mm_cvtsd_ss, _mm_cvtsi32_sd, _mm_cvtss_sd, _mm_unpackhi_pd, + _mm_unpacklo_pd, _mm_loadh_pd, _mm_storeh_pd, _mm_storel_pd, + _mm_movemask_pd, _mm_packs_epi16, _mm_packs_epi32, _mm_packus_epi16, + _mm_unpackhi_epi8, _mm_unpackhi_epi16, _mm_unpackhi_epi32, + _mm_unpacklo_epi8, _mm_unpacklo_epi16, _mm_unpacklo_epi32, + _mm_add_epi8, _mm_add_epi16, _mm_add_epi32, _mm_add_epi64, + _mm_adds_epi8, _mm_adds_epi16, _mm_adds_epu8, _mm_adds_epu16, + _mm_sub_epi8, _mm_sub_epi16, _mm_sub_epi32, _mm_sub_epi64, + _mm_subs_epi8, _mm_subs_epi16, _mm_subs_epu8, _mm_subs_epu16, + _mm_madd_epi16, _mm_mulhi_epi16, _mm_mullo_epi16, _mm_mul_pu16, + _mm_mul_epu16, _mm_sll_epi16, _mm_sll_epi32, _mm_sll_epi64, + _mm_sra_epi16, _mm_sra_epi32, _mm_srl_epi16, _mm_srl_epi32, + _mm_srl_epi64, _mm_slli_epi16, _mm_slli_epi32, _mm_slli_epi64, + _mm_srai_epi16, _mm_srai_epi32, _mm_srli_epi16, _mm_srli_epi32, + _mm_srli_epi64, _mm_and_si128, _mm_andnot_si128, _mm_or_si128, + _mm_xor_si128, _mm_cmpeq_epi8, _mm_cmpeq_epi16, _mm_cmpeq_epi32, + _mm_cmpgt_epi8, _mm_cmpgt_epi16, _mm_cmpgt_epi32, _mm_max_epi16, + _mm_max_epu8, _mm_min_epi16, _mm_min_epu8, _mm_movemask_epi8, + _mm_mulhi_epu16, _mm_maskmoveu_si128, _mm_avg_epu8, _mm_avg_epu16, + _mm_sad_epu8, _mm_stream_si32, _mm_stream_si128, _mm_stream_pd, + _mm_movpi64_epi64, _mm_clflush, _mm_lfence, _mm_mfence): New + functions. + (_mm_shufflehi_epi16, _mm_shufflelo_epi16, _mm_shuffle_epi32, + _mm_extract_epi16, _mm_insert_epi16, _mm_shuffle_pd): New macros. + + 2002-05-04 Kazu Hirata + + * dwarf2out.c: Fix formatting. + * varasm.c: Likewise. + + 2002-05-04 David Edelsohn + + PR c/6543 + * config/rs6000/rs6000.md (sCC pattern and splitter): Remove + clobber and use result as temporary value. + + Sat May 4 13:20:54 CEST 2002 Jan Hubicka + + * expr.c (force_operand): Use expand_simple_* to handle more + cases. + + 2002-05-04 Neil Booth + + * c-lex.c (lex_string): Let cpp_parse_escape handles truncation + and sign-extension. + (lex_charconst): Update for change in prototype of + cpp_interpret_charconst. Extend from cppchar_t to HOST_WIDE_INT + appropriately. + * cpphash.h (BITS_PER_CPPCHAR_T): New. + * cppinit.c (cpp_create_reader): Initialize them for no + change in semantics. + (cpp_post_options): Add sanity checks. + * cpplex.c (cpp_parse_escape): Handle precision, sign-extension + and truncation issues. Calculate in type cppchar_t. + (MAX_CHAR_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): Remove. + (cpp_interpret_charconst): Calculate in type cppchar_t. Handle + run-time dependent precision correctly. Return whether the + result is signed or not. + * cpplib.c (dequote_string): Use cppchar_t; update. + * cpplib.h (cppchar_signed_t): New. + struct cpp_options): New precision members. + (cpp_interpret_charconst, cpp_parse_escape): Update prototypes. + * cppexp.c (eval_token): Update. + + 2002-05-03 David S. Miller + + * config/sparc/sparc-protos.h (sparc_rtx_costs): New. + * config/sparc/sparc.c (sparc_rtx_costs): New function + implementing RTX_COSTS and CONST_COSTS. + * config/sparc/sparc.h (CONST_COSTS): Delete. + (RTX_COSTS_CASES): Define. + (RTX_COSTS): Expand RTX_COSTS_CASES and use sparc_rtx_costs to do + the work. + + * config/sparc/sparc.md (DFA schedulers): Split out... + * config/sparc/cypress.md, config/sparc/hypersparc.md, + config/sparc/sparclet.md, config/sparc/supersparc.md, + config/sparc/ultra1_2.md, config/sparc/ultra3.md: ... into here. + + * config/sparc/sparc.c (LEAF_REGISTERS): Do not do ifdef + checks on it, always defined for SPARC. + + * config/sparc/sparc.h (REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): + Tweak, and add more detailed comments. + + 2002-05-03 Zack Weinberg + + * Re-apply patch accidentally reverted with + DFA scheduler merge: remove all rules and variables to slurp + source files out of libiberty and rebuild them with HOST_CC. + ($(HOST_PREFIX_1)varray.o): New rule. + (genattrtab rule): Word wrap. + + 2002-05-03 Jason Thorpe + + * config/i386/netbsd64.h (CPP_LP64_SPEC): Define. + (CPP_SUBTARGET_SPEC): Define. + (SUBTARGET_EXTRA_SPECS): Redefine, adding cpp_lp64 and + cpp_subtarget specs. + (CPP_SPEC): Redefine to include %(cpp_subtarget). + + 2002-05-03 David S. Miller + + * target-defs.h (TARGET_SCHED_CYCLE_DISPLAY): Delete. + * target.h (struct gcc_target): Delete cycle_display member. + + * config/ia64/ia64.c (ia64_emit_insn_before): Put it back. + (rtx_needs_barrier): Delete reference to cycle_display unspec. + (ia64_sched_reorder2): Mention need for cycle display handling + once such notes exist. + + 2002-05-03 Richard Henderson + + * real.c (etoasc): Strip most trailing zeros for clarity. + * sched-vis.c: Include real.h. + (print_value): Use REAL_VALUE_TO_DECIMAL as needed. + * Makefile.in (sched-vis.o): Add real.h. + + 2002-05-03 David S. Miller + + * haifa-sched.c (rank_for_schedule): Revert 2002-05-02 change, + no longer needed. + + 2002-05-03 Aldy Hernandez + + * config/rs6000/rs6000.c (altivec_expand_binop_builtin): Error out + when we get an out of range literal. + (altivec_expand_ternop_builtin): Same. + (altivec_expand_unop_builtin): Same. + (altivec_expand_builtin): Same, for dss. + (altivec_expand_builtin): Use trees instead of rtl when + determining literal argument validity. + + 2002-05-03 David S. Miller + + Delete cycle display scheduling hook. + * config/ia64/ia64.c (ia64_cycle_display, + TARGET_SCHED_CYCLE_DISPLAY, ia64_emit_insn_before): Delete. + (ia64_sched_reorder2): Don't check for CODE_FOR_cycle_display + and use emit_insn_before instead of ia64_emit_insn_before. + * config/ia64/ia64.md (unspec usage): Delete cycle display. + (cycle_display): Delete insn pattern. + * config/sparc/sparc.md (unspec usage): Delete cycle display. + (cycle_display): Delete insn pattern. + * config/sparc/sparc.c (sparc_cycle_display, + TARGET_SCHED_CYCLE_DISPLAY): Delete. + * doc/md.texi (cycle_display): Don't mention. + * doc/tm.texi (TARGET_SCHED_CYCLE_DISPLAY): Likewise. + + 2002-05-03 Richard Henderson + + * recog.c (store_data_bypass_p, if_test_bypass_p): New. + * recog.h: Declare them. + + * config/sparc/sparc.c (ultrasparc_store_bypass_p): Remove. + * config/sparc/sparc.md: Use store_data_bypass_p instead. + * config/sparc/sparc-protos.h: Update. + + 2002-05-03 Jason Thorpe + + * config/sparc/netbsd-elf.c (CPP_SUBTARGET_SPEC64): Remove + -D__arch64__. Add -D_LP64. + (CPP_ARCH32_SPEC): Redefine to match the non-bi-arch version + from sparc.h. + (CPP_ARCH64_SPEC): Likewise. + (NO_BUILTIN_PTRDIFF_TYPE): Undef. + (NO_BUILTIN_SIZE_TYPE): Undef. + + 2002-05-03 Vladimir Makarov + + * genautomata.c (min_issue_delay_pass_states): Change return type + in the prototype. + (min_issue_delay_pass_states): Change the algorithm. + (min_issue_delay): Set up min_insn_issue_delay for the state. + (output_min_issue_delay_table): Interchange the nested loops and + and initiate min_insn_issue_delay for states. + + Fri May 3 22:59:15 CEST 2002 Jan Hubicka + + * cfgcleanup.c (try_optimize_cfg): Call merge_block only when + jump is simplejump. + + Fri May 3 22:53:37 CEST 2002 Jan Hubicka + + * i386.c (expand_movstr, expand_clrstr): Fix inline-all-stringops + sequence. + + 2002-05-03 Richard Henderson + + PR opt/6534 + * ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants, + noce_try_store_flag_inc, noce_try_store_flag_mask, noce_try_cmove, + noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Insert new + code before JUMP, not EARLIEST. + + 2002-05-03 Joseph S. Myers + + * c-format.c (check_format_info_main): Don't check for presence of + parameter for * width until after operand number has been read, + and only check for it if format parameters are available. + Fixes PR c/6547. + + 2002-05-03 Jason Thorpe + + * config/alpha/netbsd.h (CPP_PREDEFINES): Add -D_LP64. + (LINK_SPEC): Undef before defining. + + 2002-05-03 Jakub Jelinek + + PR preprocessor/6489 + * tradcpp.c (fixup_newlines): New. + (main, finclude): Use it. + + 2002-05-03 Richard Sandiford + + * config/mips/elf64.h (UNIQUE_SECTION): Use mips_unique_section. + * config/mips/mips.c (mips_unique_section): Strip encoding from + decl name. + + 2002-05-03 Jakub Jelinek + + * config/i386/i386.c (ix86_expand_int_movcc): Truncate to proper + mode. + + 2002-05-03 Rainer Orth + + * doc/install.texi (Installing): Mention GCC 3.1 buildstats. + (Specific): Removed buildstats references. + (Specific, hppa*-hp-hpux11): Adjust for GCC versions > 3.0. + (Specific, sparc-sun-solaris2*): Update 64-bit hints for GCC 3.1. + Accomodate Solaris versions beyond 8. + (Specific, sparc-sun-solaris2.7): Update as path for GCC 3.1. + (Specific, *-*-solaris2.8): Removed, obsolete. + + 2002-05-03 Jakub Jelinek + + PR target/6542 + * config/sparc/sparc.h (leaf_reg_remap): Remove const. + (CONDITIONAL_REGISTER_USAGE): For TARGET_FLAT make + fill leaf_reg_remap with identity. + * config/sparc/sparc.c (leaf_reg_remap): Remove const. + + 2002-05-03 Kazu Hirata + + * config/h8300/crti.asm: Remove trailing spaces. + * config/h8300/h8300.c: Likewise. + * config/h8300/lib1funcs.asm: Likewise. + + 2002-05-02 Jason Merrill + + * defaults.h (BOOL_TYPE_SIZE): Move default here from cp/decl.c. + * c-decl.c (c_init_decl_processing): Use it. + * config/rs6000/darwin.h (BOOL_TYPE_SIZE): Define to INT_TYPE_SIZE. + * config/i960/i960.h (BOOL_TYPE_SIZE): Don't define. + * config/mcore/mcore.h (BOOL_TYPE_SIZE): Don't define. + + 2002-05-03 Kazu Hirata + + * regrename.c: Fix formatting. + * tree.c: Likewise. + + Fri May 3 13:34:43 CEST 2002 Jan Hubicka + + * i386.md (attribute memory): Handle compares properly. + + Fri May 3 10:51:38 CEST 2002 Jan Hubicka + + * i386.md (sse_clrsf, sse_clrsi): Set memory attribute + to none. + + 2002-05-02 Kazu Hirata + + * function.c: Fix formatting. + + 2002-05-02 Jan Hubicka + + * haifa-sched.c (schedule_insn): Print table of instructions and + reservations. + (sched_block): Do not print ready list at verbosity level 1. + * sched-vis.c (print_insn): Make global. + * sched-ebb.c (ebb_print_insn): Rename from... + (print_insn): ... this one. + * sched-int.h (print_insn): Declare + + 2002-05-02 Richard Henderson + + * haifa-sched.c (rank_for_schedule): Skip past last_scheduled_insn + emitted by cycle_display. + + 2002-05-02 Loren J. Rittle + + * doc/install.texi (*-*-freebsd*): Update to latest status. + + 2002-05-02 Jakub Jelinek + + PR target/6540 + * config.gcc (sparc*-*-solaris2*): Set float_format to i128. + * config/float-sparc.h: Assume 128-bit long double if + __LONG_DOUBLE_128__ is defined. + + 2002-05-02 Vladimir Makarov + + * genattrtab.c (write_function_unit_info): Add a dummy element + when num_units == 0. + + 2002-05-02 Herman A.J. ten Brugge + + * predict.c: (propagate_freq, estimate_bb_frequencies): Use + TYPE_MODE (double_type_node) instead of DFmode. + + Thu May 2 19:50:04 CEST 2002 Jan Hubicka + + * cfgrtl.c (try_redirect_by_replacing_jump): Do not kill computed + jumps post reload. + * toplev.c (rest_of_compilation): Revert Richard's patch. + + 2001-05-02 John David Anglin + + * pa/x-ada (ADA_CFLAGS): Rename to X_ADA_CFLAGS. + + 2002-05-02 Catherine Moore + + * config/v850/v850.h (TRAMPOLINE_TEMPLATE): Change r5 to r20. + + 2002-05-02 Kazu Hirata + + * combine.c: Fix comment typos. + * expr.c: Likewise. + * genautomata.c: Likewise. + * stmt.c: Likewise. + * tree.h: Likewise. + + 2002-05-02 Joseph S. Myers + + * doc/install.texi: State GNAT version requirements. + + 2002-05-02 Nick Clifton + + * config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Accept any form + of the frame pointer or arg pointer register which strict register + checking is not enabled. + + 2002-05-02 Aldy Hernandez + + * gcc.dg/altivec-8.c: New. + + * config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow + PRE_INC and PRE_DEC for altivec modes. + + 2002-05-01 Bruce Korb + + * fixinc/check.tpl(set-writable): make sure the function exists first + * fixinc/inclhack.def(alpha_assert): fix test_text + * fixinc/tests/base/assert.h: add in missing result + + 2002-05-01 Jeff Law + + * pa.h (EXTRA_CONSTRAINT): Don't accept PIC addresses for the + 'T' constraint. + + 2002-05-01 Joel Brobecker + + * dbxout.c (dbxout_type): Emit size information for range types, + as well, but only when using GDB extensions. + + 2002-05-01 Richard Henderson + + * configure.in (HAVE_GAS_HIDDEN): Replace SPARC feature test with + target-independent gnu binutils date test. + + 2002-05-01 Richard Henderson + + * cfgcleanup.c (merge_blocks_move_successor_nojumps): Emit dump + info before expunging the block. + + 2002-05-01 Jakub Jelinek + + * cppinit.c (cpp_handle_option) [-dM]: Don't set no_output here... + (cpp_post_options): ...but here. Disable -dD, -dN and -dI when + -M -or -MM is in effect. + + 2002-05-01 Zack Weinberg + + * config.gcc: Correct test of --enable-obsolete. Obsolete all + A29k configurations. + * doc/install.texi: Update to match. + + 2002-05-01 Franz Sirl + + PR bootstrap/6514 + * varasm.c (globalize_decl): Compare DECL_ASSEMBLER_NAME to check + for duplicates. Always loop over whole list. + + Wed May 1 10:32:37 2002 Richard Kenner + + * reload.c (find_reloads, case 'p'): Set BADOP to 0. + + 2002-05-01 Joel Sherrill + + * config/sparc/t-elf (sparc-rtems, sparc-elf): Build assembly + support routines. + + 2002-05-01 Joel Sherrill + + * config/arm/rtems-elf.h: Add #undef TARGET_VERSION to prevent warning. + + 2002-05-01 David Edelsohn + + * rs6000.md (abssi2_nopower): Convert to define_insn_and_split. + (nabs_nopower): Same. + (floatdisf2): New pattern. + (absdi2): Convert to define_insn_and_split. + (nabsdi2): Same. + (trunctfsf2): Same. + (floatditf2): Same. + (floatsitf2): Same. + (fix_trunctfdi2): Same. + (fix_trunctfsi2): Same. + + 2002-05-01 Joseph S. Myers + + * doc/install.texi: Update Texinfo version requirement + documentation. + + 2002-05-01 Jakub Jelinek + + PR target/6512, PR target/5628 + * config/sparc/sparc.md (movdf_insn_v9only_novis): Don't allow >= %f32 + when memory is not aligned. + (movdf_insn_v9only_vis): Likewise. + * config/sparc/sparc.h (SECONDARY_INPUT_RELOAD_CLASS): Request a FP_REGS + temporary for EXTRA_FP_REGS DFmode load from unaligned memory. + (SECONDARY_OUTPUT_RELOAD_CLASS): Similarly. + + 2002-05-01 Aldy Hernandez + + * gcc.dg/altivec-7.c: New. + + * config/rs6000/altivec.h: Cleanup. + + 2002-04-30 Aldy Hernandez + + * doc/invoke.texi (Option Summary): Add -mvrsave=. + (RS/6000 and PowerPC Options): Document -mvrsave=. + + * config/rs6000/rs6000.c (rs6000_altivec_vrsave): New global. + (rs6000_altivec_vrsave_string): Same. + (rs6000_override_options): Call rs6000_parse_vrsave_option. + (rs6000_parse_vrsave_option): New. + (rs6000_stack_info): Only generate vrsave instructions when + TARGET_ALTIVEC_VRSAVE. + + * config/rs6000/rs6000.h (TARGET_OPTIONS): Add -mvrsave= option. + (rs6000_altivec_vrsave_string): Define extern. + (rs6000_altivec_vrsave): Same. + (TARGET_ALTIVEC_VRSAVE): New. + + 2002-04-30 Richard Henderson + + PR opt/6516 + * toplev.c (rest_of_compilation): Don't run cross-jump before + bb-reorder. + + 2002-04-30 Tom Rix + + * regrename.c (build_def_use, copyprop_hardreg_forward_1): Sanity + check which_alternative. + + 2002-04-30 Kazu Hirata + + * cpplex.c: Fix comment formatting. + * function.c: Likewise. + * integrate.c: Likewise. + * regrename.c: Likewise. + * sibcall.c: Likewise. + * simplify-rtx.c: Likewise. + * tree-inline.c: Likewise. + + 2002-04-30 John David Anglin + + * config.gcc (hppa1.1-*-pro*, hppa1.1-*-osf*, hppa1.1-*-rtems*, + hppa1.0-*-osf*, hppa1.1-*-bsd*, hppa1.1-*-hpux10*, hppa2*-*-hpux10*, + hppa1.0-*-hpux10*, hppa*64*-*-hpux11*, hppa1.1-*-hpux11*, + hppa2*-*-hpux11*, hppa1.0-*-hpux11*, hppa*-*-lites*): Define xmake_file. + * pa/t-linux, pa/t-pa, pa/t-pa64, t-pro (T_ADAFLAGS): Delete. + * pa/x-ada: New file. Define ADA_CFLAGS. + + 2002-04-30 Hans-Peter Nilsson + + * config/mmix/mmix.h (MMIX_LAST_STACK_REGISTER_REGNUM): Renamed + from MMIX_LAST_REGISTER_FILE_REGNUM. + (NO_IMPLICIT_EXTERN_C): Remove cryptic obsolete comment. + (struct machine_function): New member highest_saved_stack_register + previously static variable in mmix.c. + (MACHINE_DEPENDENT_REORG): Define. + * config/mmix/mmix.c (highest_saved_stack_register): Deleted. + (MMIX_OUTPUT_REGNO): New. + (mmix_target_asm_function_prologue): Move calculation of last used + saved-stack-register into... + (mmix_machine_dependent_reorg): New function. Update to also handle + !TARGET_ABI_GNU. + (mmix_print_operand): Apply MMIX_OUTPUT_REGNO when emitting + register names, simplify somewhat by new variable regno. + : Remove fixed FIXME. Always emit highest used saved + register. + (mmix_print_operand_address): Apply MMIX_OUTPUT_REGNO when + emitting register names. + (mmix_asm_output_reg_push, mmix_asm_output_reg_pop): Ditto. + (mmix_dbx_register_number): Apply MMIX_OUTPUT_REGNO here too. + Remove fixed FIXME. + * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): + Declare. + + * config/mmix/mmix.md ("divmoddi4"): Update head comment. + + 2002-04-30 Richard Henderson + + * config/sparc/sparc.c (emit_soft_tfmode_libcall, + emit_soft_tfmode_binop, emit_soft_tfmode_unop, emit_soft_tfmode_cvt, + emit_hard_tfmode_operation, emit_tfmode_binop, emit_tfmode_unop, + emit_tfmode_cvt): New. + * config/sparc/sparc.md (extendsftf2, extenddftf2, trunctfsf2, + trunctfdf2, floatsitf2, floatunssitf2, floatditf2, floatunsditf2, + fix_trunctfsi2, fixuns_trunctfsi2, fix_trunctfdi2, fixuns_trunctfdi2, + addtf3, subtf3, multf3, divtf3, sqrttf2): Use them. + * config/sparc/sparc-protos.h: Update. + + 2002-04-30 Janis Johnson + + * install.texi (Final install): Add to the list of info to include + in a report of a successful bootstrap, and add link to 3.1 list. + + Tue Apr 30 19:15:36 CEST 2002 Jan Hubicka + + * i386.md (type): Add new SSE/MMX subtypes, remove usused fop1. + (mode): Add vector modes + (i387): Kill attribute. + (unit): New attribute. + (length_immediate): Grok new types. + (prefix_data16, prefix_rep, prefix_0f): Fix for SSE/MMX. + (modrm): Use "unit". + (memory): Handle MMX/SSE properly. + (scheduling descriptions): Kill uses of fop1. + (sse, mmx, fp patterns): Set type and mode properly. + + Tue Apr 30 09:31:59 2002 Jeffrey A Law (law@redhat.com) + + * pa.c (override_options): Default to PA8000 scheduling. + * doc/invoke.texi (HP-PA options): Mention newly added 7300 + scheduling parameter. + + * pa.md (7100lc, 7200, 7300 scheduling): Slightly refine + handling of double precision multiplies. + + * pa.md (7100lc, 7200, 7300 scheduling): Refine handling of + fpdiv and fpsqrt instructions. + (7200 & 7300 scheduling): Fix typo in handling of + store-load and store-store penalties. + + 2002-04-30 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Use MIPS instead of Mips and + mips. Add two missing commas. + + 2002-04-30 Paolo Carlini + + * doc/contrib.texi (Contributors): Update Paolo Carlini's + and Benjamin Kosnik's entries. + + 2002-04-29 David S. Miller + + * config/sparc/sparc.h (BRANCH_COST, PREFETCH_BLOCK, + SIMULTANEOUS_PREFETCHES): Tune for UltraSPARC-III. + * config/sparc/sparc.md (call + jmp 32-bit peepholes): Likewise. + * config/sparc/sparc.c (sparc_initialize_trampoline): Likewise. + + 2002-04-29 Franz Sirl + + * combine.c (find_split_point): Use gen_int_mode. + + 2002-04-29 Vladimir Makarov + + Merging code from dfa-branch: + + 2002-04-24 Vladimir Makarov + + * genautomata.c (output_reserv_sets): Fix typo. + + 2002-04-23 Vladimir Makarov + + * genautomata.c (output_reserv_sets): Remove + next_cycle_output_flag. + + Thu Apr 18 08:57:06 2002 Jeffrey A Law (law@redhat.com) + + * sched-rgn.c (init_ready_list): Make the DFA code handle + USE/CLOBBER insns in the same way as the traditional + scheduler. + (new_ready): Similarly.. + + 2002-04-17 Vladimir Makarov + + * haifa-sched.c (schedule_block): Change the DFA state only after + issuing insn. + + Wed Apr 17 15:38:36 2002 Jeffrey A Law (law@redhat.com) + + * pa.c (hppa_use_dfa_pipeline_interface): New function. + (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE): Define. + (override_options): Add PA7300 scheduling support. + (pa_adjust_cost): Update various comments. Properly + handle anti and output dependencies when using the + DFA scheduler. + (pa_issue_rate): Add PA7300 scheduling support. + (pa_can_combine_p): Call extract_insn before calling + constrain_operands (taken from mainline tree). + * pa.h (enum processor_type): Add PROCESSOR_PA7300. + * pa.md (cpu attr): Add 7300. Rewrite pipeline + descriptions using DFA descriptions. Add PA7300 + scheduling support. + + 2002-03-30 David S. Miller + + Add UltraSPARC-III DFA scheduling support. + * config/sparc/sparc.md (define_attr type): Add fpcrmove. + Update FP conditional move on register insn patterns to use it, as + appropriate. + (define_attr cpu): Add ultrasparc3. + (define_attr us3load_type): New, update integer load patterns to + set it, as appropriate. + (define_automaton): Add ultrasparc3_0 and ultrasparc3_1. + (rest): Add UltraSPARC3 scheduling description. + * config/sparc/sparc.h (TARGET_CPU_ultrasparc3): New. + (PROCESSOR_ULTRASPARC3): New. + ({ASM,CPP}_CPU64_DEFAULT_SPEC): Handle ultrasparc3. + ({ASM,CPP}_CPU_SPEC): Likewise. + (REGISTER_MOVE_COST): Likewise. + (RTX_COSTS): Likewise. + * config/sparc/sparc.c (sparc_override_options, + sparc_initialize_trampoline, sparc64_initialize_trampoline, + sparc_use_dfa_pipeline_interface, sparc_use_sched_lookahead, + sparc_issue_rate): Likewise. + * config/sparc/sol2.h: Likewise. + * config/sparc/sol2-sld-64.h: Likewise. + * config/sparc/linux64.h: Likewise. + + 2002-03-22 Vladimir Makarov + + * doc/md.texi: Add comments about usage the latency time for the + different dependencies and about case when two or more conditions + in different define_insn_reservations returns TRUE for an insn. + + * doc/md.texi: Add reference for automaton based pipeline + description. + + 2002-03-04 Vladimir Makarov + + * doc/passes.texi: Add missed information about genattrtab. + + 2002-03-01 Vladimir Makarov + + * genautomata.c (output_automata_list_transition_code): Check + automata_list on NULL. + + 2002-02-28 Vladimir Makarov + + * genautomata.c (output_insn_code_cases, + output_automata_list_min_issue_delay_code, + output_automata_list_transition_code, + output_automata_list_state_alts_code): Comment the functions. + + 2002-02-22 Vladimir Makarov + + * genautomata.c (automata_list_el_t): New typedef. + (get_free_automata_list_el,free_automata_list_el, + free_automata_list, automata_list_hash, automata_list_eq_p, + initiate_automata_lists, automata_list_start, automata_list_add, + automata_list_finish, finish_automata_lists, + output_insn_code_cases, output_automata_list_min_issue_delay_code, + output_automata_list_transition_code, + output_automata_list_state_alts_code, add_automaton_state, + form_important_insn_automata_lists): New functions and prototypes. + (insn_reserv_decl): Add members important_automata_list and + processed_p. + (ainsn): Add members important_p. + (automata_list_el): New structure. + (first_free_automata_list_el, current_automata_list, + automata_list_table): New global variables. + (create_ainsns): Initiate member important_p. + (output_internal_min_issue_delay_func): Generate the switch and + call output_insn_code_cases. + (output_internal_trans_func, output_internal_state_alts_func): + Ditto. + (generate): Call initiate_automata_lists. + (automaton_states): New global variable. + (expand_automata): Call form_important_insn_automata_lists. + (write_automata): Call finish_automata_lists. + + 2002-02-21 Vladimir Makarov + + * genautomata.c (add_excls, add_presence_absence): Check that + cpu units in the sets belong the same automaton. + + * rtl.def (EXCLUSION_SET, PRESENCE_SET, ABSENCE_SET): Add comment + about that cpu units in the sets belong the same automaton. + + * doc/md.texi: Ditto. + + 2001-12-20 Naveen Sharma + Nitin Gupta + + * config/sh/sh.c (sh_use_dfa_interface): New function. + + (sh_issue_rate): New Function. + TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE: define. + TARGET_SCHED_ISSUE_RATE: define. + + * config/sh/sh.md: Add DFA based pipeline description for SH4. + + (define_attr insn_class): New attribute used for DFA + scheduling. + (define_insn cmpgtsi_t): Set attribute insn_class mt_group. + (cmpgesi_t,cmpgtusi_t,cmpgeusi_t,cmpeqsi_t, + cmpeqdi_t): Likewise. + + (add,addc1,addsi3,subc,subc1,*subsi3_internal, + negc,negsi2,ashldi3_k,lshrdi3_k,ashrdi3_k): Set insn_class + ex_group. + (iorsi3,rotlsi3_1,rotlsi3_31,rotlsi3_16): Likewise. + + 2001-10-03 Vladimir Makarov + + * haifa-sched.c (queue_to_ready): Remove unnecessary condition for + break. + + 2001-10-03 Vladimir Makarov + + * genautomata.c (DFA_INSN_CODES_LENGTH_VARIABLE_NAME): New macro. + (output_dfa_insn_code_func): Expand dfa_insn_codes if it is + necessary. + (output_dfa_start_func): Initiate new variable insn_codes_length, + (write_automata): Output definition of the new variable. + + 2001-10-02 David S. Miller + + * haifa-sched.c (advance_one_cycle): New function. + (schedule_block): Use it. + (queue_to_ready): Use it, and also make sure to advance the DFA + state on all stall cycles, not just those where insn_queue links + are found. + + 2001-10-02 Richard Sandiford + + * haifa-sched.c (max_issue): Remove last_p argument. Only return + nonzero if the highest-priority instruction could be scheduled. + (choose_ready): Remove last argument from max_issue call. + + 2001-09-28 David S. Miller + + * config/sparc/sparc.c (sparc_use_sched_lookahead): Use 4 for + ultrasparc and 3 for other multi-issue sparcs. + + 2001-09-27 David S. Miller + + * config/sparc/sparc.md (cycle_display): New pattern. + * config/sparc/sparc.c (sparc_cycle_display): New. + (TARGET_SCHED_CYCLE_DISPLAY): Set it. + + 2001-09-25 David S. Miller + + Convert all of SPARC scheduling to DFA + * config/sparc/sparc.md: Kill all define_function_unit + directives and replace with DFA equivalent. + * config/sparc/sparc.c (ultrasparc_adjust_cost, + mark_ultrasparc_pipeline_state, ultra_cmove_results_ready_p, + ultra_fpmode_conflict_exists, ultra_find_type, + ultra_build_types_avail, ultra_flush_pipeline, + ultra_rescan_pipeline_state, ultrasparc_sched_reorder, + ultrasparc_variable_issue, ultrasparc_sched_init, + sparc_variable_issue, sparc_sched_reorder, ultra_code_from_mask, + ultra_schedule_insn, ultra_code_names, ultra_pipe_hist, + ultra_cur_hist, ultra_cycles_elapsed): Kill. + (sparc_use_dfa_pipeline_interface, sparc_use_sched_lookahead, + ultrasparc_store_bypass_p): New. + * config/sparc/sparc-protos.h (ultrasparc_store_bypass_p): + Declare. + + 2001-09-24 David S. Miller + + * haifa-sched.c (ready_remove): Fix thinko, we want to copy around + ready->vec[foo] not ready[foo]. + + 2001-09-07 Vladimir Makarov + + * doc/md.texi: Correct examples for define_insn_reservations + `mult' and `div'. + + 2001-09-07 Vladimir Makarov + + * genautomata.c (create_automata): Print message about creation of + each automaton. + (generate): Remove printing meease about creation of + automata. + + 2001-09-05 David S. Miller + + * config/sparc/linux.h: Set CPLUSPLUS_CPP_SPEC. + * config/sparc/linux64.h: Likewise. + + 2001-08-31 Vladimir Makarov + + * haifa-sched.c (insn_cost, schedule_insn, queue_to_ready, + schedule_block, sched_init, sched_finish): Add missed calls of + use_dfa_pipeline_interface. + + * sched-rgn.c (init_ready_list, new_ready, debug_dependencies): + Ditto. + + * sched-vis.c (get_visual_tbl_length): Ditto. + + 2001-08-27 Richard Henderson + + * genattr.c (main): Emit state_t even when not doing scheduling. + + 2001-08-27 Richard Henderson + + * genautomata.c (expand_automata): Always create a description. + + 2001-08-27 Vladimir Makarov + + * rtl.def (DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT, EXCLUSION_SET, + PRESENCE_SET, ABSENCE_SET, DEFINE_BYPASS, DEFINE_AUTOMATON, + AUTOMATA_OPTION, DEFINE_RESERVATION, DEFINE_INSN_RESERVATION): New + RTL constructions. + + * genattr.c (main): New variable num_insn_reservations. Increase + it if there is DEFINE_INSN_RESERVATION. Output automaton based + pipeline hazard recognizer interface. + + * genattrtab.h: New file. + + * genattrtab.c: Include genattrtab.h. + (attr_printf, check_attr_test, make_internal_attr, + make_numeric_value): Move protypes into genattrtab.h. Define them + as external. + (num_dfa_decls): New global variable. + (main): Process DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT, + DEFINE_BYPASS, EXCLUSION_SET, PRESENCE_SET, ABSENCE_SET, + DEFINE_AUTOMATON, AUTOMATA_OPTION, DEFINE_RESERVATION, + DEFINE_INSN_RESERVATION. Call expand_automata and write_automata. + + * genautomata.c: New file. + + * rtl.h (LINK_COST_ZERO, LINK_COST_FREE): Remove them. + + * sched-int.h: (curr_state): Add the external definition for + automaton pipeline interface. + (haifa_insn_data): Add comments for members blockage and units. + + * target-def.h (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, + TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN, + TARGET_SCHED_DFA_PRE_CYCLE_INSN, + TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN, + TARGET_SCHED_DFA_POST_CYCLE_INSN, + TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, + TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): New + macros. + (TARGET_SCHED): Use the new macros. + + * target.h (use_dfa_pipeline_interface, init_dfa_pre_cycle_insn, + dfa_pre_cycle_insn, init_dfa_post_cycle_insn, dfa_post_cycle_insn, + first_cycle_multipass_dfa_lookahead, init_dfa_bubbles, + dfa_bubble): New members in gcc_target.sched. + + * haifa-sched.c (insert_schedule_bubbles_p): New variable. + (MAX_INSN_QUEUE_INDEX): New macro for automaton interface. + (insn_queue): Redefine it as pointer to array. + (NEXT_Q, NEXT_Q_AFTER): Use MAX_INSN_QUEUE_INDEX instead of + INSN_QUEUE_SIZE. + (max_insn_queue_index_macro_value): New variable. + (curr_state, dfa_state_size, ready_try): New varaibles for + automaton interface. + (ready_element, ready_remove, max_issue): New function prototypes + for automaton interface. + (choose_ready): New function prototype. + (insn_unit, blockage_range): Add comments. + (unit_last_insn, unit_tick, unit_n_insns): Define them for case + FUNCTION_UNITS_SIZE == 0. + (insn_issue_delay, actual_hazard_this_instance, schedule_unit, + actual_hazard, potential_hazard): Add comments. + (insn_cost): Use cost -1 as undefined value. Remove + LINK_COST_ZERO and LINK_COST_FREE. Add new code for automaton + pipeline interface. + (ready_element, ready_remove): New functions for automaton + interface. + (schedule_insn): Add new code for automaton pipeline interface. + (queue_to_ready): Add new code for automaton pipeline interface. + Use MAX_INSN_QUEUE_INDEX instead of INSN_QUEUE_SIZE. + (debug_ready_list): Print newline when the queue is empty. + (max_issue): New function for automaton pipeline interface. + (choose_ready): New function. + (schedule_block): Add new code for automaton pipeline interface. + Print ready list before scheduling each insn. + (sched_init): Add new code for automaton pipeline interface. + Initiate insn cost by -1. + (sched_finish): Free the current automaton state and finalize + automaton pipeline interface. + + * sched-rgn.c: Include target.h. + (init_ready_list, new_ready, debug_dependencies): Add new code for + automaton pipeline interface. + + * sched-vis.c: Include target.h. + (get_visual_tbl_length): Add code for automaton interface. + (target_units, print_block_visualization): Add comments. + + * Makefile.in (GETRUNTIME, HASHTAB, HOST_GETRUNTIME, HOST_HASHTAB, + USE_HOST_GETRUNTIME, USE_HOST_HASHTAB, HOST_VARRAY): New variables. + (sched-rgn.o, sched-vis.o): Add new dependency file target.h. + (getruntime.o, genautomata.o): New entries. + (genattrtab.o): Add new dependency file genattrtab.h. + (genattrtab): Add new dependencies. Link it with `libm.a'. + (getruntime.o, hashtab.o): New entries for canadian cross. + + * doc/md.texi: Description of automaton based model. + + * doc/tm.texi (TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_ADJUST_COST): + Add comments. + (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, + TARGET_SCHED_DFA_PRE_CYCLE_INSN, + TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN, + TARGET_SCHED_DFA_POST_CYCLE_INSN, + TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN, + TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, + TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): The new + hook descriptions. + (TRADITIONAL_PIPELINE_INTERFACE, DFA_PIPELINE_INTERFACE, + MAX_DFA_ISSUE_RATE): New macro descriptions. + + * doc/contrib.texi: Add dfa based scheduler contribution. + + * doc/gcc.texi: Add more information about genattrtab. + + Mon Apr 29 17:19:10 2002 Richard Kenner + + * reload1.c (eliminate_regs, case SUBREG): Fix typo in + adjust_address_nv call. + + 2002-04-29 Janis Johnson + + * doc/install.texi (Testing): Provide additional information, and + a stronger encouragement, for running the testsuites. + + 2002-04-29 DJ Delorie + + * config/mips/mips.c (mips_parse_cpu): Warn if the CPU name is + given in upper case. + + 2002-04-29 Rainer Orth + + * fixinc/inclhack.def (solaris_widec): Include in + Solaris 2 if missing. + * fixinc/fixincl.x: Regenerate. + * fixinc/tests/base/widec.h: New file. + + 2002-04-29 Nick Clifton + + * toplev.c (f_options): Add "profile" switch so that + -fno-profile can be used to disable -p. + + 2002-04-29 Bernd Schmidt + + * c-common.c (type_for_mode): Add support for V2DFmode, V2DImode, + UV2DImode. + * tree.c (build_common_tree_nodes_2): Likewise. + * tree.h (enum tree_index): Likewise. + (V2DF_type_node, V2DI_type_node, unsigned_V2DI_type_node): Define. + + * config/i386/i386.c (bdesc_comi, bdesc_2arg, bdesc_1arg): Add SSE2 + entries. + (init_mmx_sse_builtins): Initialize SSE2 builtins. + (ix86_expand_builtin): Add support for SSE2 builtins. + * config/i386/i386.h (VALID_SSE2_REG_MODE): New macro. + (VALID_SSE_REG_MODE): Use it. + (VECTOR_MODE_SUPPORTED_P): Allow SSE2 modes here as well. + (enum ix86_builtins): Add SSE2 builtins. + * config/i386/i386.md (movv2df_internal, movv2df, movv8hi_internal, + movv8hi, movv16qi_internal, movv16qi, pushv2df, pushv8hi, pushv16qi, + addv2df3, vmaddv2df3, subv2df3, vmsubv2df3, mulv2df3, vmmulv2df3, + divv2df3, vmdivv2df3, smaxv2df3, vmsmaxv2df3, sminv2df3, vmsminv2df3, + sse2_anddf3, sse2_nanddf3, sse2_iordf3, sse2_xordf3, sqrtv2df2, + vmsqrtv2df2, maskcmpv2df3, maskncmpv2df3, vmmaskcmpv2df3, + vmmaskncmpv2df3, sse2_comi, sse2_ucomi, sse2_movmskpd, sse2_pmovmskb, + sse2_maskmovdqu, sse2_movntv2df, sse2_movntti, sse2_movntsi, cvtdq2ps, + cvtps2dq, cvttps2dq, cvtdq2pd, cvtpd2dq, cvttpd2dq, cvtpd2pi, + cvttpd2pi, cvtpi2pd, cvtsd2si, cvttsd2si, cvtsi2sd, cvtsd2ss, + cvtss2sd, cvtpd2ps, cvtps2pd, addv16qi3, addv8hi3, addv4si3, addv2di3, + ssaddv16qi3, ssaddv8hi3, usaddv16qi3, usaddv8hi3, subv16qi3, subv8hi3, + subv4si3, subv2di3, sssubv16qi3, sssubv8hi3, ussubv16qi3, ussubv8hi3, + mulv8hi3, smulv8hi3_highpart, umulv8hi3_highpart, sse2_umulsidi3, + sse2_umulv2siv2di3, sse2_pmaddwd, sse2_clrti, sse2_uavgv16qi3, + sse2_uavgv8hi3, sse2_psadbw, sse2_pinsrw, sse2_pextrw, sse2_pshufd, + sse2_pshuflw, sse2_pshufhw, eqv16qi3, eqv8hi3, eqv4si3, gtv16qi3, + gtv8hi3, gtv4si3, umaxv16qi3, smaxv8hi3, uminv16qi3, sminv8hi3, + ashrv8hi3, ashrv4si3, lshrv8hi3, lshrv4si3, sse2_lshrv2di3, + ashlv8hi3, ashlv4si3, sse2_ashlv2di3, sse2_ashlti3, sse2_lshrti3, + sse2_unpckhpd, sse2_unpcklpd, sse2_packsswb, sse2_packssdw, + sse2_packuswb, sse2_punpckhbw, sse2_punpckhwd, sse2_punpckhdq, + sse2_punpcklbw, sse2_punpcklwd, sse2_punpckldq, sse2_movapd, + sse2_movupd, sse2_movdqa, sse2_movdqu, sse2_movdq2q, sse2_movq2dq, + sse2_movhpd, sse2_movlpd, sse2_loadsd, sse2_movsd, sse2_storesd, + sse2_shufpd, sse2_clflush, sse2_mfence, mfence_insn, sse2_lfence, + lfence_insn): New patterns. + (sse2_andti3, sse2_nandti3, sse2_iorti3, sse2_xorti3): Renamed from + sse_andti3_sse2, sse_nandti3_sse2, sse_iorti3_sse2, sse_xorti3_sse2. + + Mon Apr 29 17:03:24 CEST 2002 Jan Hubicka + + * i386.md (sse_mov?fcc*): Revert patch of Mar 14th. + + 2002-04-29 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add Paolo Carlini and + Janis Johnson. + Update Richard Henderson, Jakub Jelinek, and Mark Mitchell. + Refer to Objective-C instead of ObjC, SPARC instead of sparc, + and CPU instead of cpu. + + Mon Apr 29 13:36:41 CEST 2002 Jan Hubicka + + * toplev.c (flag_if_conversion, flag_if_conversion2): New static + variables. + (lang_independent_options): Add -fif-conversion, -fif-conversion2 + (rest_of_compilation): Do if conversion only when asked for. + (parse_options_and_default_flags): Set new variables to 1 for -O1 + * invoke.texi (-fif-conversion, -fif-conversion2): Document. + + Mon Apr 29 13:02:50 CEST 2002 Jan Hubicka + + * i386.c (dbx64_register_map): Fix typo. + + Mon Apr 29 12:18:35 CEST 2002 Jan Hubicka + + * predict.c (real_zero, real_one, real_almost_one, real_br_prob_base, + real_one_half, real_bb_freq_max): New static variables. + (debug_profile_bbauxs): Kill. + (process_note_predictions): Kill unused variable. + (block_info_def, edge_info_def): Use REAL_VALUE_TYPE instead of + volatile double. + (propagate_freq): Use REAL_ARITHMETICS. + (estimate_bb_frequencies): Likevise; init new static variables. + * Makefile.in (predict.o): Add dependency on real.h + + 2002-04-28 David S. Miller + + PR target/6500 + * config/sparc/sparc.md (prefetch): Emit properly for 32-bit vs. + 64-bit TARGET_V9. Do not use prefetch page, use prefetch for + several {reads,writes} instead. + * config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES): + Define. + + 2002-04-27 David S. Miller + + PR target/6494 + * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Be mindful + of the stack bias. + + * config/sparc/linux.h, config/sparc/linux64.h: Don't bother + including signal.h and sys/ucontext.h, not needed. + + 2002-04-29 Hans-Peter Nilsson + + * varasm.c (output_constant_def): Correct test for not calling + ENCODE_SECTION_INFO for INTEGER_CST. + + 2002-04-29 Neil Booth + + * cppexp.c (lex): Move some code to _cpp_parse_expr, but + keep most cases as function eval_token. + (eval_token): New function. + (_cpp_parse_expr): Read token here for improved diagnostics. + Don't use op_as_text. Detect bad ':' here. + (reduce): Don't detect bad ':' here. + (op_as_text): Remove. + * cpphash.h (_cpp_test_assertion): Change prototype. + * cpplib.c (_cpp_test_assertion): Change prototype. + + 2002-04-28 Richard Henderson + + PR c/5154 + * ggc-common.c (ggc_mark_rtx_children_1): Rename from... + (ggc_mark_rtx_children): New. + + 2002-04-28 Jakub Jelinek + + PR target/6496 + * config/sparc/sparc.md (call + jump 32-bit peepholes): Disable jump + after call peepholes for UltraSPARC. + (call + jump 64-bit peepholes): Remove. + + 2002-04-28 Franz Sirl + + PR c/6497 + * config/rs6000/rs6000.md (sCC patterns): Remove clobber and use + result as temporary value. + + 2002-04-28 Jakub Jelinek + + PR c++/6396 + * toplev.c (rest_of_compilation): Only run regrename and copy + propagation if optimizing. + + 2002-04-28 Jakub Jelinek + + PR optimization/6475 + * reload1.c (alter_reg): Only call set_mem_expr if I is home pseudo + register of REGNO_DECL (i). + * Makefile.in (reload1.o): Add $(TREE_H). + + 2002-04-28 Neil Booth + + * cppexp.c (lex): Update to use state.skip_eval. + (struct op): Remove prio and flags members. + (FLAG_BITS, FLAG_MASK, PRIO_SHIFT, EXTRACT_PRIO, EXTRACT_FLAGS, + SHORT_CIRCUIT, RIGHT_ASSOC, ..._PRIO, op_to_prio): Remove. + (LEFT_ASSOC): New macro. + (optab): New table of operator priorities and flags. + (SHIFT): Update. + (_cpp_parse_expr): Clean up logic. Return bool. Use a + malloc-ed parser stack. + (reduce): New; reduce the operator stack. + (_cpp_expand_op_stack): Expand the operator stack as necessary. + * cpphash.h (struct op): Predeclare. + (struct cpp_reader): New members op_stack, op_limit. + (struct lexer_state): New member skip_eval. + (_cpp_parse_expr): Update. + (_cpp_expand_op_stack): New. + * cpplib.c (do_if): Update. + * cppinit.c (cpp_create_reader): Create op stack. + (cpp_destroy): And destroy it. + * cpplib.h (CPP_LAST_CPP_OP): Correct. + (TTYPE_TABLE): Correct. + + 2002-04-28 Franz Sirl + + PR c/6343 + * c-decl.c (duplicate_decls): Call merge_weak. + * c-pragma.c (apply_pragma_weak): Warn about misuse. + * output.h (merge_weak): Prototype merge_weak. + * varasm.c (merge_weak): New function. + (declare_weak): Make sure we don't give an error on VAR_DECLs. + Mark RTL with SYMBOL_REF_WEAK. + + 2002-04-27 Kurt Garloff + + * tree-inline.c (inlinable_function_p): Improve heuristics + by using a smoother function to cut down allowable inlinable size. + * param.def: Add parameters max-inline-insns-single, + max-inline-slope, min-inline-insns that determine the exact + shape of the above function. + * param.h: Likewise. + + 2002-04-26 Richard Henderson + + * c-parse.in (malloced_yyss, malloced_yyvs): New. + (yyoverflow): Re-add. Set them. + (free_parser_stacks): New. + * c-common.h: Declare it. + * c-lex.c (c_common_parse_file): Call it. + + 2002-04-26 Richard Henderson + + * cfgrtl.c (tidy_fallthru_edge): Don't use next_real_insn + for fallthru search. + + 2002-04-26 Eric Christopher + + PR optimization/3700 + * config/mips/mips.c (mips_issue_rate): Define. New function. + (TARGET_SCHED_ISSUE_RATE): Use. + + 2002-04-25 David S. Miller + + PR target/6422 + * reorg.c (optimize_skip): Do not allow exception causing + instructions to be considered for delay slots. + (fill_simply_delay_slots, fill_slots_from_thread): Likewise. + (relax_delay_slots): Do not try to consider exception causing + instructions as redundant. + + 2002-04-26 Richard Henderson + + PR c/5225 + * c-typeck.c (build_unary_op) [CONVERT_EXPR]: Invoke non_lvalue. + + 2002-04-26 Mark Mitchell + + PR bootstrap/6445 + * config/i386/i386.md (untyped_call): Return the value in a float + register if TARGET_FLOAT_RETURNS_IN_80387, not just if + TARGET_80387. + + 2002-04-26 Alexandre Oliva + + * tree.c (tree_int_cst_lt): Compare constants whose types differ + in unsigned-ness correctly. + + 2002-04-26 John David Anglin + + * pa.h (FUNCTION_OK_FOR_SIBCALL): Don't do sibcalls when using the + portable runtime model. + + 2002-04-26 Richard Henderson + + * c-parse.in (yyoverflow): Revert. + + 2002-04-26 David Edelsohn + Richard Henderson + + * config/rs6000/rs6000.md (sCC pattern): Remove clobber and use + result as temporary value. + + 2002-04-26 Richard Henderson + + PR c/3581 + * c-common.c (fix_string_type): Split out of ... + (combine_strings): ... here. Take a varray, not a tree list. + (c_expand_builtin_printf): Use fix_string_type. + * c-common.h: Update decls. + * c-parse.in (string): Remove. Update all uses to use STRING + instead, and not call combine_strings. + (yylexstring): New. + (_yylex): Use it. + * c-typeck.c (simple_asm_stmt): Don't call combine_strings. + (build_asm_stmt): Likewise. + * objc/objc-act.c (my_build_string): Use fix_string_type. + (build_objc_string_object): Build varray for combine_strings. + + 2002-04-26 Bo Thorsen + + * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Define for + x86-64. + + 2002-04-26 Neil Booth + + * cppexp.c (CPP_UMINUS, CPP_UPLUS): New. + (HAVE_NO_R_OPERAND): Remove. + (HAVE_VALUE): Remove. + (op_to_prio): Update. + (UNARY): Don't alter flags. + (_cpp_parse_expr): want_value used to indicate whether + a number or unary operator is expected next. Distinguish + unary and binary +/-. + (op_as_text): Update for unary operators. + + 2002-04-25 Richard Henderson + + PR c/2161 + * c-parse.in (yyoverflow): New. + + 2002-04-25 Richard Henderson + + PR c/2098 + * c-common.c (shorten_compare): Simplfy conditions leading to + the generation of a warning. + + 2002-04-25 Richard Henderson + + PR c/2035 + * expmed.c (extract_bit_field): Fall through to generic code rather + than aborting on subreg special case. + + 2002-04-25 David S. Miller + + * config/sparc/sparc.h (FUNCTION_OK_FOR_SIBCALL): Add back check + for DECL being NULL. + + 2002-04-25 Steve Christiansen + + * doc/md.texi (Machine Constraints): Add IA-64 constraints. + + 2002-04-25 Eric Botcazou + + * c-decl.c (grokdeclarator): Remove outdated ??? note + on invalid declaration of flexible array members. + + 2002-04-25 Richard Henderson + + * doc/invoke.texi: Document -gdwarf{,-2} vs debug level. + + 2002-04-25 Ulrich Weigand + + * config/s390/s390.c (s390_emit_epilogue): Always restore registers + needed by the compiler, even if they are used as global regs. + + 2002-04-25 Matt Hiller + + * mips.c (mips_class_max_nregs, mips_register_move_cost): New + functions. + * mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls + of the corresponding functions. + * mips-protos.h (mips_class_max_nregs, mips_register_move_cost): + New prototypes. + + 2002-04-25 Matt Hiller + + * config/mips/mips.h (mips_sw_reg_names): Declare as extern. + + (ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro. + (FIRST_PSEUDO_REGISTER): Redefine considering coprocessor + registers, adjust comment accordingly. + (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS, + reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES, + DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries + for coprocessor registers. + (ADDITIONAL_REGISTER_NAMES): Include + ALL_COP_ADDITIONAL_REGISTER_NAMES. + + (COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM, + COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM, + COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM, + COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P, + COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros. + + (mips_char_to_class): Adjust comment to include coprocessor + constraint letters. + + * config/mips/mips.c (coprocessor_operand, coprocessor2_operand): + New functions. + (mips_reg_names, mips_regno_to_class): Include coprocessor + information. + (mips_sw_reg_names): Ditto, make non-static. + (mips_move_1word): Handle moves to and from coprocessor registers. + (mips_move_2words): Handle moves to and from coprocessor + registers. + (mips_class_max_nregs, mips_register_move_cost): Handle + coprocessor register classes. + (override_options): Initialize mips_char_to_class and + mips_hard_regno_mode_ok properly for coprocessor registers. + + * config/mips/mips.md (movdi_internal, movdi_internal2, + movsi_internal1, movsi_internal2): Add constraint-sets for + coprocessor registers. + * testsuite/gcc.c-torture/mipscop-1.c: New testcase. + * testsuite/gcc.c-torture/mipscop-1.x: Disable above if target + isn't mips. + * testsuite/gcc.c-torture/mipscop-2.c: New testcase. + * testsuite/gcc.c-torture/mipscop-2.x: Disable above if target + isn't mips. + * testsuite/gcc.c-torture/mipscop-3.c: New testcase. + * testsuite/gcc.c-torture/mipscop-3.x: Disable above if target + isn't mips. + * testsuite/gcc.c-torture/mipscop-4.c: New testcase. + * testsuite/gcc.c-torture/mipscop-4.x: Disable above if target + isn't mips. + + * doc/tm.texi: Document feature. + + 2002-04-25 Neil Booth + + * integrate.c (function_attribute_inlinable_p): Simplify. + Check the table pointer is not NULL. + + 2002-04-25 Steven Bosscher + + * doc/c-tree.texi: Fix typo in introduction. + + 2002-04-25 Neil Booth + + * c-common.h (c_common_parse_file): Update. + * c-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. + * c-lex.c (YYDEBUG): Get from c-lex.h. + (c_common_parse_file): Update. + * c-lex.h (YYDEBUG, yydebug): New. + * c-parse.in (YYDEBUG): Get from c-lex.h. + (c_set_yydebug): Remove. + * c-tree.h (c_set_yydebug): Remove. + * langhooks-def.h (lhd_do_nothing_i): New. + (lhd_set_yydebug, LANG_HOOKS_SET_YYDEBUG): Remove. + (LANG_HOOKS_PARSE_FILE, LANG_HOOKS_INITIALIZER): Update. + * langhooks.c (lhd_do_nothing_i): New. + (lhd_set_yydebug): Remove. + * langhooks.h (struct lang_hooks): Update. + * toplev.c (set_yydebug): New. + (compile_file): Update call to parse_file hook. + (decode_d_option): Update. + objc: + * objc-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. + + Wed Apr 24 23:45:37 2002 J"orn Rennecke + + * loop.c (load_mems): Don't change the interface of called functions. + + * calls.c (expand_call): Take current_function_pretend_args_size + into account when setting argblock for sibcalls. + + 2002-04-24 Matt Hiller + + * cpplex.c: Remove conditional #undef of MULTIBYTE_CHARS. + * c-lex.c: Ditto. + + * cpplex.c (skip_line_comment): Process comment one multibyte + character at a time rather than one char at a time, if + appropriate. + (parse_string): Process string one multibyte character at a time + rather than one char at a time, if appropriate. + * c-lex.c (lex_string): Lex and copy multibyte strings + appropriately. + * cpplib.h (cppchar_t): Change to unsigned. + + 2002-04-24 Richard Henderson + + PR c/3467 + * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays + for c99. + + Wed Apr 24 21:51:54 2002 J"orn Rennecke + + * sh.c (sh_va_arg): If argument was passed by reference, + dereference the pointer. + + * sh.h (PIC_OFFSET_TABLE_REGNUM): Conditionalize on flag_pic. + + * sh.md (divsi3_i4_media): Use match_operand for input values + rather than hard registers. + (divsi3 - TARGET_SHMEDIA_FPU case): Don't ferry values + unnecessarily through hard registers. Keep copies of pseudo + registers outside of the libcall sequence. + + * sh.md (casesi_shift_media): Add modes. + + * sh.h (RETURN_IN_MEMORY): Return variable size BLKmode + values in memory. + + 2002-04-24 Neil Booth + + * attribs.c (c_common_attribute_table): Move table and handlers + to c-common.c. + (format_attribute_table, lang_attribute_table, + lang_attribute_common): Remove. + (init_attributes): Replace NULL pointers with pointers to the + empty table. + (handle_packed_attribute, handle_nocommon_attribute, + handle_common_attribute, handle_noreturn_attribute, + handle_noinline_attribute, handle_always_inline_attribute, + handle_used_attribute, handle_unused_attribute, + handle_const_attribute, handle_transparent_union_attribute, + handle_constructor_attribute, handle_destructor_attribute, + handle_mode_attribute, handle_section_attribute, + handle_aligned_attribute, handle_weak_attribute, + handle_alias_attribute, handle_visibility_attribute, + handle_no_instrument_function_attribute, handle_malloc_attribute, + handle_no_limit_stack_attribute, handle_pure_attribute, + handle_deprecated_attribute, handle_vector_size_attribute, + vector_size_helper): Move to c-common.c. + * c-common.c (c_common_attribute_table, + handle_packed_attribute, handle_nocommon_attribute, + handle_common_attribute, handle_noreturn_attribute, + handle_noinline_attribute, handle_always_inline_attribute, + handle_used_attribute, handle_unused_attribute, + handle_const_attribute, handle_transparent_union_attribute, + handle_constructor_attribute, handle_destructor_attribute, + handle_mode_attribute, handle_section_attribute, + handle_aligned_attribute, handle_weak_attribute, + handle_alias_attribute, handle_visibility_attribute, + handle_no_instrument_function_attribute, handle_malloc_attribute, + handle_no_limit_stack_attribute, handle_pure_attribute, + handle_deprecated_attribute, handle_vector_size_attribute, + vector_size_helper): Move from attribs.c. + * c-common.h (c_common_attribute_table, + c_common_format_attribute_table): New. + * c-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, + LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Redefine. + * langhooks-def.h (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, + LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (struct lang_hooks): 3 new attribute hooks. + * target-def.h (TARGET_ATTRIBUTE_TABLE): Default to NULL. + * target.h: Update comment. + * tree.c (default_target_attribute_table): Remove. + * tree.h (default_target_attribute_table, format_attribute_table, + lang_attribute_table, lang_attribute_common): Remove. + objc: + * objc-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, + LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Redefine. + + 2002-04-24 Jason Merrill + + * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNU_vector. + * dwarf2out.c (dwarf_attr_name): Support it. + (gen_array_type_die): Emit it. + (lookup_type_die): No special handling for VECTOR_TYPE. + (gen_type_die): Hand VECTOR_TYPE off to gen_array_type_die. + + 2002-04-24 Richard Henderson + + * config/mips/mips.md (movdi_usd): Renumber. + + 2002-04-24 David S. Miller + + PR target/6420 + * config/sparc/sparc.h (FUNCTION_OK_FOR_SIBCALL): Return false if + 32-bit SPARC and current_function_returns_struct is true. + + Wed Apr 24 13:48:25 CEST 2002 Jan Hubicka + + * loop.c (canonicalize_condition): Use gen_int_mode. + + 2002-04-24 Aldy Hernandez + + * config/rs6000/altivec.h: Cleanup file. Add non individual + variants. + (vec_vaddubm): New. + (vec_vadduhm): New. + (vec_vadduwm): New. + (vec_vaddfp): New. + (vec_vaddcuw): New. + (vec_vaddubs): New. + (vec_vaddsbs): New. + (vec_vadduhs): New. + (vec_vadduws): New. + (vec_vaddsws): New. + (vec_vand): New. + (vec_vandc): New. + (vec_vavgub): New. + (vec_vavgsb): New. + (vec_vavguh): New. + (vec_vavgsh): New. + (vec_vavguw): New. + (vec_vavgsw): New. + (vec_vrfip): New. + (vec_vcmpbfp): New. + (vec_vcmpequb): New. + (vec_vcmpequh): New. + (vec_vcmpequw): New. + (vec_vcmpeqfp): New. + (vec_vcmpgefp): New. + (vec_vcmpgtub): New. + (vec_vcmpgtsb): New. + (vec_vcmpgtuh): New. + (vec_vcmpgtsh): New. + (vec_vcmpgtuw): New. + (vec_vcmpgtsw): New. + (vec_vcmpgtfp): New. + (vec_vcmpgefp): New. + (vec_vcfux): New. + (vec_vcfsx): New. + (vec_vctsxs): New. + (vec_vctuxs): New. + (vec_vexptefp): New. + (vec_vrfim): New. + (vec_lvx): New. + (vec_lvebx): New. + (vec_lvehx): New. + (vec_lde): Add vector float variant. + (vec_lvewx): New. + (vec_lvxl): New. + (vec_vlogefp): New. + (vec_vmaddfp): New. + (vec_vmhaddshs): New. + (vec_vmaxub): New. + (vec_vmaxsb): New. + (vec_vmaxuh): New. + (vec_vmaxsh): New. + (vec_vmaxuw): New. + (vec_vmaxsw): New. + (vec_vmaxsw): New. + (vec_vmaxfp): New. + (vec_vmrghb): New. + (vec_vmrghh): New. + (vec_vmrghw): New. + (vec_vmrglb): New. + (vec_vmrglh): New. + (vec_vmrglw): New. + (vec_vminub): New. + (vec_vminsb): New. + (vec_vminuh): New. + (vec_vminsh): New. + (vec_vminuw): New. + (vec_vminsw): New. + (vec_vminfp): New. + (vec_vmladduhm): New. + (vec_vmhraddshs): New. + (vec_msumubm): New. + (vec_vmsummbm): New. + (vec_vmsumuhm): New. + (vec_vmsumshm): New. + (vec_vmsumuhs): New. + (vec_vmsumshs): New. + (vec_vmuleub): New. + (vec_vmulesb): New. + (vec_vmuleuh): New. + (vec_vmulesh): New. + (vec_vmuloub): New. + (vec_mulosb): New. + (vec_vmulouh): New. + (vec_vmulosh): New. + (vec_vnmsubfp): New. + (vec_vnor): New. + (vec_vor): New. + (vec_vpkuhum): New. + (vec_vpkuwum): New. + (vec_vpkpx): New. + (vec_vpkuhus): New. + (vec_vpkshss): New. + (vec_vpkuwus): New. + (vec_vpkswss): New. + (vec_vpkshus): New. + (vec_vpkswus): New. + (vec_vperm): New. + (vec_vrefp): New. + (vec_vrlb): New. + (vec_vrlh): New. + (vec_vrlw): New. + (vec_vrfin): New. + (vec_vrsqrtefp): New. + (vec_vsel): New. + (vec_vslb): New. + (vec_vslh): New. + (vec_vslw): New. + (vec_vsldoi): New. + (vec_vsl): New. + (vec_vslo): New. + (vec_vspltb): New. + (vec_vsplth): New. + (vec_vspltw): New. + (vec_vspltisb): New. + (vec_vspltish): New. + (vec_vspltisw): New. + (vec_vsrb): New. + (vec_vsrh): New. + (vec_vsrw): New. + (vec_vsrab): New. + (vec_vsrah): New. + (vec_vsraw): New. + (vec_vsr): New. + (vec_vsro): New. + (vec_stvx): New. + (vec_stvebx): New. + (vec_stvehx): New. + (vec_stvewx): New. + (vec_stvxl): New. + (vec_vsububm): New. + (vec_vsubuhm): New. + (vec_vsubuwm): New. + (vec_vsubfp): New. + (vec_vsubcuw): New. + (vec_vsububs): New. + (vec_vsubsbs): New. + (vec_vsubuhs): New. + (vec_vsubshs): New. + (vec_vsubuws): New. + (vec_vsubsws): New. + (vec_vsum4ubs): New. + (vec_vsum4sbs): New. + (vec_vsum4shs): New. + (vec_vsum2sws): New. + (vec_vsumsws): New. + (vec_vrfiz): New. + (vec_vupkhsb): New. + (vec_vupkhpx): New. + (vec_vupkhsh): New. + (vec_vupklsb): New. + (vec_vupklpx): New. + (vec_vupklsh): New. + (vec_vxor): New. + + 2002-04-23 Eric Botcazou + + PR c/5430 + * fold-const.c (split_tree): Add MINUS_LITP parameter; separate + added literals from substracted literals. + (associate_trees): Don't convert MINUS_EXPR into PLUS_EXPR. + (fold) [associate]: Preserve MINUS_EXPR if needed. + + 2002-04-23 Zack Weinberg + + * doc/install.texi: Clarify which versions of alpha*-dec-osf* + are obsoleted. + + 2002-04-23 Tom Tromey + + * gcc.c: Added --resource. For PR java/6314. + + 2002-04-23 David O'Brien + + * cp/g++spec.c: Use profiled libstdc++ and libm with -p/-pg. + * config/freebsd.h (MATH_LIBRARY_PROFILE): Use the _p verions of + these libraries. + + 2002-04-23 David O'Brien + + * config/freebsd.h(OBJECT_FORMAT_ELF): Define. + + Tue Apr 23 14:24:25 CEST 2002 Jan Hubicka + + * i386.c (ix86_output_addr_diff_elt): Avoid x86_64 binutils bug + workaround. + (ix86_expand_int_movcc): Avoid x86_64 compilation chrash. + (ix86_expand_clrstr): Fix typo. + * loop.c (gen_load_of_final_value): New. + (loop_givs_rescan, strength_reduce, check_dbra_loop): + Use it. + + 2002-04-23 Roger Sayle + + * builtins.c (builtin_memset_gen_str): New function. + (expand_builtin_memset): Optimize the case of constant length, but + unknown value. + + 2002-04-23 Aldy Hernandez + + * config/rs6000/altivec.h (vec_step): Remove extraneous + parentheses. + (vec_ctu): Cast return. + + 2002-04-23 Alan Modra + + PR target/6413 + * function.h: (struct function): Add profile_label_no field. + (current_function_profile_label_no): Define. + * function.c: (profile_label_no): New static var. + (expand_function_start): Increment it, and copy to + current_function_profile_label_no. + * output.h (profile_label_no): Delete. + * final.c (profile_label_no): Delete. + (profile_function): Use current_function_profile_label_no. + (final_end_function): Don't increment profile_label_no here. + * config/i386/i386.c (ix86_osf_output_function_prologue): Replace + profile_label_no with current_function_profile_label_no. + * config/pa/pa.c (current_function_number): Delete. + (pa_output_function_prologue): Don't output profile label here. + (hppa_profile_hook): Use label_no param rather than + current_function_number. + (FUNC_BEGIN_PROLOG_LABEL): Move to .. + * config/pa/pa.h: .. here. + (FUNCTION_PROFILER): Output profile label here. + + 2002-04-22 Eric Christopher + + * config/mips/mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Revert + patch of 2002-04-09 due to binutils issues. + (FUNCTION_ARG_REGNO_P): Ensure even numbered float register. + + 2002-04-22 Aldy Hernandez + + * config/rs6000/rs6000.md ("*movv4si_internal"): Change 'm' + constraint to 'o' for m=r and r=m alternatives. + ("*movv8hi_internal1"): Same. + ("*movv16qi_internal1"): Same. + ("*movv4sf_internal1"): Same. + + 2002-04-22 Janis Johnson + + * rtl.h (RTX_FLAG): New macro. + * emit-rtl.c (copy_most_rtx): Use macros to access rtx flags. + * final.c (alter_subreg): Use macro to access rtx flag. + * integrate.c (copy_rtx_and_substitute): Use new access macro. + * print-rtl.c (print_rtx): Use new access macro. + + * cse.c (insert): Check rtx code before accessing flag. + + * genattrtab.c (ATTR_IND_SIMPLIFIED_P, ATTR_CURR_SIMPLIFIED_P, + ATTR_PERMANENT_P, ATTR_EQ_ATTR_P): New. + (attr_hash_add_string, attr_rtx_1, attr_copy_rtx, check_attr_test, + convert_const_symbol_ref, make_canonical, make_alternative_compare, + evaluate_eq_attr, attr_rtx_cost, simplify_test_exp_in_temp, + simplify_test_exp, optimize_attrs, simplify_by_exploding, + find_and_mark_used_attributes, unmark_used_attributes, + add_values_to_cover, simplify_with_current_value, + simplify_with_current_value_aux, clear_struct_flag, walk_attr_value, + copy_rtx_unchanging, main): Use new access macros. + + 2002-04-22 Tom Rix + + * expmed.c (init_expmed): Generate shifted constant once. + + 2002-04-22 Zack Weinberg + + * c-lex.c (lex_charconst): Call convert to get constant in + proper type; don't just smash the type field. + Fixes PR c/6300. + + * config.gcc: Add list of obsolete configurations. Disallow + building these without --enable-obsolete. + * doc/install.texi: Document --enable-obsolete and obsoletion + policy. Mention obsoletion of individual targets in + appropriate places. + + 2002-04-22 Richard Henderson + + * config/sparc/sol2-bi.h (ASM_DEBUG_SPEC): New. + + 2002-04-22 Mark Mitchell + + PR f/6138. + * function.c (fixup_memory_subreg): Add promoted_mode parameter. + (walk_fixup_memory_subreg): Likewise. + (fixup_var_refs_insn): Adjust accordingly. + (fixup_var_refs_1): Likewise. + + 2002-04-22 Ulrich Weigand + + * config/s390/linux.h: (LIBPATH_SPEC, LIBPATH_ARCH31_SPEC, + LIBPATH_ARCH64_SPEC): Define. + (EXTRA_SPECS): Add libpath, libpath_arch31, libpath_arch64. + (STARTFILE_SPEC, ENDFILE_SPEC): Define; use libpath. + (LINK_ARCH31_SPEC): Add libpath_arch31 to search path. + (LINK_ARCH64_SPEC): Add libpath_arch64 to search path. + + 2002-04-22 Joel Sherrill + + * gthr-rtems.h: Correct prototypes to remove warnings. + + 2002-04-22 Richard Henderson + + PR c/6344 + * alias.c (canon_true_dependence): Special case (mem:blk (scratch)). + + * gcse.c (free_insn_expr_list_list): New. + (clear_modify_mem_tables): Use it. Fix bit set usage. + (canon_list_insert): Use EXPR_LISTs for expressions. + (record_last_mem_set_info): Factor BLOCK_NUM (insn). + + 2002-04-22 Neil Booth + + * cppfiles.c (_cpp_pop_file_buffer): Return void. Move + file change and include code to _cpp_pop_buffer. + * cpphash.h (struct pending_option): Predeclare. + (struct cpp_reader): New member next_include_file. + (_cpp_pop_file_buffer): Update. + (_cpp_push_next_buffer): Update, rename. + * cppinit.c (cpp_destroy): Free include chain and pending here. + (cpp_finish_options): Simplify. + (_cpp_push_next_buffer): Rename and clean up. + * cpplib.c (cpp_pop_buffer): Move code from _cpp_pop_file_buffer. + Clarify. + * cppmacro.c (cpp_scan_nooutput): Set return_at_eof here. + + 2002-04-22 Aldy Hernandez + + * config/rs6000/altivec.h (vec_xor): Add variant for both args + being vector signed int. + (vec_andc): Same. + (vec_xor): Add variant for both args being vector signed char. + Remove redundant variant. + (vec_andc): Same. + + 2002-04-21 David S. Miller + + * config/sparc/sparc.md (set then compare DI mode peephole2): Fix + compare mode in output RTL. + + 2002-04-22 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_override_options): Correct + style and formatting of previous patch. + + 2002-04-22 Alan Modra + + * config/rs6000/rs6000.c (rs6000_override_options): Always clear + flag_pic for ABI_AIX. + + 2002-04-21 Neil Booth + + * cppexp.c (struct op, parse_number): Replace U_CHAR with uchar. + * cppfiles.c (read_include_file): Similarly. + * cpphash.h (DSC, U_CHAR, ustrcmp, ustrncmp, ustrlen, + uxstrdup ustrchr, ufputs): Similarly. + * cppinit.c (TRIGRAPH_MAP, cpp_destroy): Similarly. + * cpplex.c (parse_slow, unescaped_terminator_p, save_comment, + cpp_ideq, parse_identifier, parse_number): Similarly. + * cpplib.c (struct directive, dequote_string, D, run_directive, + cpp_push_buffer): Similarly. + * cppmacro.c (new_string_token, builtin_macro, cpp_quote_string, + _cpp_create_definition, check_trad_stringification, + cpp_macro_definition): Similarly. + + 2002-04-21 Neil Booth + + * cppmacro.c (funlike_invocation_p): Don't step back + over CPP_EOF. + + 2002-04-21 David Edelsohn + + * config/rs6000/rs6000.c (output_profile_hook): Do not increment + labelno. + + 2002-04-20 Joseph S. Myers + + * doc/invoke.texi: Remove Chill references. + * doc/gcc.texi: Update last modified date. + + 2002-04-20 Kazu Hirata + + * config/h8300/lib1funcs.asm (___mulsi3): Remove unnecessary + push and pop. Replace add.l with add.w. + + 2002-04-20 Toshiyasu Morita + + * config/h8300/lib1funcs.asm (___mulsi3): Use hardware + multiply instructions for H8/300H case. + + 2002-04-20 Toshiyasu Morita + + * config/h8300/lib1funcs.asm (___cmpsi2, ___ucmpsi2): + Bum three instructions from each routine. + + 2002-04-20 Neil Booth + + * Makefile.in: Update. + * decl.c (push_c_function_context, pop_c_function_context, + mark_c_function_context): Rename for consistency. + * c-objc-common.c (c_objc_common_init): Langhooks set elsewhere. + * c-tree.h (push_c_function_context, pop_c_function_context, + mark_c_function_context): Rename for consistency. + * c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, + LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. + * function.c (init_lang_status, save_lang_status, + restore_lang_status, mark_lang_status, free_lang_status): + Move to langhooks.h. + (push_function_context_to, pop_function_context_from, + free_after_parsing, prepare_function_start, ggc_mark_struct_function): + Update. + * function.h (init_lang_status, save_lang_status, + restore_lang_status, mark_lang_status, free_lang_status): + Move to langhooks.h. + * langhooks-def.h (LANG_HOOKS_FUNCTION_INIT, + LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED, + LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK, + LANG_HOOKS_FUNCTION_INITIALIZER): New. + (LANG_HOOKS_INITIALIZER): Update. + (lhd_do_nothing_f): New. + * langhooks.h (struct lang_hooks_for_functions): New. + (struct lang_hooks): New hooks. + * langhooks.c (lhd_do_nothing_f): New. + objc: + * objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, + LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. + + 2002-04-19 David S. Miller + + * config/sparc/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define. + * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise. + + 2002-04-19 Jakub Jelinek + + PR optimization/3756 + * config/i386/i386.c (ix86_expand_int_movcc): Optimize + x = ((int) y < 0) ? cst1 : cst2. + + 2002-04-19 Jakub Jelinek + + PR c/6358 + * function.c: Reapply patch for c/6358. + (expand_function_end): Copy decl_rtl's mode, not + current_function_return_rtx mode. + + 2002-04-19 Joel Sherrill + + * config/rtems.h (STARTFILE_SPEC, ENDFILE_SPEC): Fix for non-ELF + targets. + + 2002-04-19 Tom Tromey + + * doc/install.texi (Specific): Update status of Solaris 2.8. + For PR libgcj/6158. + + 2002-04-19 Andreas Schwab + + * real.c: Allow sizeof (REAL_VALUE_TYPE) > 2*NE. + (PUT_REAL): Restore old definition. + + 2002-04-19 Dan Nicolaescu + Gerald Pfeifer + + * doc/install.texi (Specific, sparc-sun-solaris2*): Mention that + binutils 2.11.2 and higher generate smaller binaries than Sun's + native tools. + + 2002-04-19 Mark Mitchell + + PR c++/6352 + * toplev.c (rest_of_compilation): Do not defer functions for which + TREE_SYMBOL_REFERENCED has already been set. + + Fri Apr 19 15:53:03 CEST 2002 Jan Hubicka + + * i386.md (movsi_1, movhi_1): Force reload to use more flexible + alternative. + + 2002-04-19 Neil Booth + + * builtins.c: Include langhooks.h. + (lang_type_promotes_to): Remove. + (expand_builtin_va_arg): Use new hook. + * c-common.c (c_common_nodes_and_builtins): Don't set hook. + (simple_type_promotes_to): Move to c-typeck.c. + * c-common.h (simple_type_promotes_to): Remove. + * c-decl.c (duplicate_decls, grokdeclarator): Update. + * c-format.c: Include langhooks.h. + (check_format_types): Update. + * c-tree.h (c_type_promotes_to): New. + * c-typeck.c (c_type_promotes_to): Move from c-common.c. + (type_lists_compatible_p): Update. + * langhooks-def.h (lhd_type_promotes_to): New. + (LANG_HOOKS_TYPE_PROMOTES_TO): New. + (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. + * langhooks.c (lhd_type_promotes_to): New. + * langhooks.h (struct lang_hooks_for_types): New hook. + * tree.h (lang_type_promotes_to): Remove. + objc: + * objc-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. + + 2002-04-18 Richard Henderson + + * function.c: Revert patch for c/6358. + + 2002-04-18 Richard Henderson + + * ifcvt.c (find_cond_trap): Handle cases with no proper THEN or JOIN + blocks. Handle multiple references to the TRAP block. Handle + non-adjacent THEN and OTHER blocks. + + 2002-04-18 Richard Henderson + + * config/ia64/ia64.c (ia64_function_arg_pass_by_reference): Don't + crash with no type for by-mode libcalls. + + * config/ia64/ia64.md (conditional_trap): Fix predicate polarity. + + 2002-04-18 Bob Wilson + + * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill, + __xtensa_nonlocal_goto): Use a syscall instructions to flush + the register windows. + + 2002-04-18 Zack Weinberg + + * real.h: Define REAL_VALUE_TYPE_SIZE as 96 or 160, as + appropriate. Document need for extended precision even when + MAX_LONG_DOUBLE_TYPE_SIZE is smaller. Define REAL_WIDTH here, + based on REAL_VALUE_TYPE_SIZE. Use REAL_WIDTH to size + REAL_VALUE_TYPE. Define CONST_DOUBLE_FORMAT here. Use #error + instead of relying on later syntax error when REAL_WIDTH > 5. + * real.c: Define NE based only on whether or not we have a + full 128-bit extended type (not INTEL_EXTENDED_IEEE_FORMAT). + Require sizeof(REAL_VALUE_TYPE) == 2*NE. Unconditionally + define GET_REAL and PUT_REAL as simple memcpy operations; no + need to byteswap or round. + Use #error instead of #ifdef-ing out the entire file, for + prompt error detection. + + * rtl.c, gengenrtl.c: No need to calculate CONST_DOUBLE_FORMAT here. + + 2002-04-18 David S. Miller + + * config/sparc/sparc.h (BRANCH_COST): Define. + + * fold-const.c (BRANCH_COST): Don't provide default here, expr.h + does it. + + 2002-04-18 Hans-Peter Nilsson + + * flow.c (update_life_info): Ignore return value of cleanup_cfg. + Mask out PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE in + propagate_block calls after relaxation loop using new variable + stabilized_prop_flags. + + 2002-04-18 Richard Henderson + + * config/ia64/ia64.c (ia64_function_arg_pass_by_reference): New. + (ia64_va_arg): Expect variable sized types by reference. + * config/ia64/ia64-protos.h: Update. + * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use + ia64_function_arg_pass_by_reference. + + 2002-04-18 Richard Henderson + + * ifcvt.c: Include except.h. + (block_has_only_trap): Break out from find_cond_trap. + (find_cond_trap): Use it. Always delete the trap block. + (merge_if_block): Allow then block null. Be less simplistic about + what insns can end a block. + * Makefile.in (ifcvt.o): Depend on except.h. + + * config/ia64/ia64.md (trap, conditional_trap): New. + + 2002-04-18 Jakub Jelinek + + PR c/6358 + * function.c (assign_parms): Assign hard current_function_return_rtx + register here... + (expand_function_end): ...not here. + + 2002-04-18 Neil Booth + + * c-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. + * c-tree.h (c_incomplete_type_error): New. + * c-typeck.c (require_complete_type, build_component_ref): Update. + (incomplete_type_error): Rename. + * langhooks-def.h (lhd_incomplete_type_error): New. + (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): New. + (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. + * langhooks.c (lhd_incomplete_type_error): New. + * langhooks.h (struct lang_hooks_for_types): New hook. + * tree.c (size_in_bytes): Use new hook. + * tree.h (incomplete_type_error): Remove. + objc: + * objc-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. + + 2002-04-18 Zack Weinberg + + * config/arc/arc.md: Remove #if HOST_FLOAT_FORMAT != + TARGET_FLOAT_FORMAT blocks. + + 2002-04-18 Gerald Pfeifer + + * doc/install.texi (Downloading the source): Do not mention Chill + any longer, but mention Ada. + (Configuration): Do not mention Chill any longer. + + 2002-04-18 Hans-Peter Nilsson + + * config/cris/cris.h (TARGET_VERSION): Remove local version number. + + Thu Apr 18 17:14:08 CEST 2002 Jan Hubicka + + * i386.h (SSE_FLOAT_MODE_P): Fix bogus conflict resolution + in last patch. + + 2002-04-18 Jakub Jelinek + + * fold-const.c (fold): Use (*lang_hooks.types.unsigned_type) + instead of unsigned_type. + + Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka + + * i386.h (SSE_FLOAT_MODE_P): Kill bogus TARGET_SSE_MATH check. + * i386.md (sse_mov?fcc*): Swap operands for cases they will be swapped + later. + + 2002-04-18 Bernd Schmidt + + * attribs.c (vector_type_node_list): New static variable. + (handle_vector_size_attribute): Use it to avoid generating a + new type node each time we are called. + + * combine.c (subst): Avoid trying to make a vector mode subreg of + an integer constant. + (gen_lowpart_for_combine): Likewise. + + 2002-04-18 Roger Sayle + Jakub Jelinek + + * fold-const.c (fold) [NOP_EXPR]: Convert (T)(x&c) into ((T)x&(T)c) + for integer constant c (if x has unsigned type or sign bit is not + set in c). This folds the zero/sign extension into the bit-wise and + operation. + + 2002-04-18 Jakub Jelinek + + PR middle-end/6205 + * config/i386/i386.md (movsf_1): Use pxor only if TARGET_SSE2, + otherwise xorps. + + 2002-04-17 NIIBE Yutaka + + * config/sh/elf.h: Undefine ASM_OUTPUT_CASE_LABEL. + + 2002-04-17 Nick Clifton + + * gcc.c (read_specs): Detect and fail if an attempt is made to + rename a spec string to an already existing string. + + 2002-04-17 Ulrich Weigand + + * config/s390/s390.c (legitimize_pic_address): Do not generate + illegal address constant without CONST. + + 2002-04-17 Kaveh R. Ghazi + + * sparc/linux64.h (CC1_SPEC): Error for -m32 and -m64. + * sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise. + + 2002-04-17 Ulrich Weigand + + PR optimization/6305 + * config/s390/s390.c (s390_expand_plus_operand): Use find_replacement + to make sure previous reloads are taken into account. Generate + better code if one operand is an in-range immediate constant. + + 2002-04-16 Andrew Haley + + * doc/install.texi (Building): libgcj requires GNU make. + + 2002-04-17 Jakub Jelinek + + PR bootstrap/6315 + * config/sparc/sparc.md (movtf reg<-reg split): Allow spliting + even if hard quad and register is not floating. + (movtf reg<-mem split): Disallow splitting if hard quad and + register is floating. + (movtf mem<-reg split): Likewise. + * config/sparc/sparc.c (fp_register_operand): New predicate. + * config/sparc/sparc.h (PREDICATE_CODES): Add fp_register_operand. + + 2002-04-17 Zack Weinberg + + * Makefile.in (PROTO_OBJS): Add cppdefault.o. + (protoize.o): Take $(PREPROCESSOR_DEFINES) off command line. + (unprotoize.o): Ditto. Build from protoize.c. Define + UNPROTOIZE on command line. + * protoize.c: Include cppdefault.h. Delete include_defaults. + (in_system_include_dir): Use cpp_include_defaults (defined in + cppdefault.o). + * unprotoize.c: Delete file. + + 2002-04-17 Aldy Hernandez + + * config/rs6000/altivec.h (vec_ld): Add array variants. + (vec_lde): Same. + (vec_ldl): Same. + + 2002-04-17 Alan Matsuoka + Aldy Hernandez + + * config/rs6000/altivec.h: Define __ALTIVEC__. + (bool): New. + (__pixel): New. + (pixel): New. + (vec_cfux): New. + (vec_vmaddfp): New. + (vec_vsldoi): New. + Add parentheses to all macro arguments. + + 2002-04-16 Richard Henderson + + PR c++/6320 + * except.c (remove_eh_handler): Insert inner regions at beginning + of sibling chain. Refactor expressions. + + 2002-04-16 Richard Henderson + + * config/sparc/sol2-bi.h (AS_SPARC64_FLAG): New. + * config/sparc/sol2-gas-bi.h: New file. + * config.gcc (sparc*-solaris): Add it as needed. + * configure.in (AS_SPARC64_FLAG): Remove check. + * config.in, configure: Regenerate. + + * config/sparc/sol2-bi.h (CC1_SPEC): Error for -m32 and -m64. + + 2002-04-16 Richard Henderson + + * config/mips/mips.c (override_options): Don't override N32 for + a 64-bit ISA. + + PR 6202 + * config/mips/mips.md (can_delay): Split out of existing define_delays. + (HILO_delay): Set can_delay false. + + 2002-04-16 Dale Johannesen + + * config/rs6000/rs6000.c (rs6000_output_function_prologue): Compute + instruction addresses. + (rs6000_output_function_epilogue): Likewise. + + 2002-04-16 Paolo Carlini + + * c-parse.in (poplevel, compstmt_start, + compstmt_primary_start): Add ending ';', in accordance + with POSIX. + + 2002-04-16 Richard Henderson + + * config.gcc (sparcv9-solaris): Configure for 64-bit default. + Adjust tm_file order to get TARGET_DEFAULT set properly. + (sparc-solaris): Configure 2.[78] for 64-bit multilibs. + * doc/install.texi (sparc-solaris): Update. + + 2002-04-16 Dale Johannesen + + * config/rs6000/rs6000.c (rs6000_emit_cmove): Fail if modes of + comparison operands do not match each other or if modes of + conditions do not match result. + + 2002-04-16 Hartmut Penner + + PR target/6305 + * config/s390/s390.md (mulsidi3): Set both subregs of the + multiword register. + + 2002-04-16 Aldy Hernandez + + * config/rs6000/altivec.h (vec_addc): Type check. + + 2002-04-16 Jakub Jelinek + + PR middle-end/6279 + * expr.c (store_expr): Don't copy if DECL_RTL (exp) == target. + + * expr.c (safe_from_p): Cleanup: use DECL_RTL_IF_SET. + + 2002-04-15 Richard Henderson + + * config/mips/abi64.h (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Set + call_really_used_regs too. + + 2002-04-15 Richard Henderson + + * config/alpha/gnu.h (CPP_PREDEFINES): Underscores for gnu_hurd. + + 2002-04-15 David S. Miller + + * rtlanal.c (note_stores): Don't present PARALLEL SET_DESTs + as being CLOBBERed. + + 2002-04-16 Jakub Jelinek + + PR c/6290 + * config/rs6000/rs6000.c (easy_vector_constant): Return 1 if the + CONST_VECTOR is { 0, ... 0 }. + + 2002-04-15 Loren J. Rittle + + * doc/install.texi (Installing GCC: Configuration): Clarify + the only supported ways to configure gcc. + + 2002-04-15 Roland McGrath + + * config.gcc (alpha*-*-gnu*): New target configuration. + * config/alpha/gnu.h: New file for it. + * config/gnu.h (TARGET_MEM_FUNCTIONS): #undef before #define. + + 2002-04-16 Mark Mitchell + + * c-common.h (STMT_EXPR_NO_SCOPE): New macro. + * c-common.c (c_expand_expr): Respect STMT_EXPR_NO_SCOPE. + * tree.h (expand_start_stmt_expr): Update prototype. + * stmt.c (expand_start_stmt_expr): Add has_scope parameter. + * tree-inline.c (expand_call_inline): Set STMT_EXPR_NO_SCOPE + on the STMT_EXPR created for the inline function. + + 2002-04-15 Richard Henderson + + * config/alpha/linux.h, config/arm/linux-elf.h, config/i370/linux.h, + config/i386/linux-aout.h, config/i386/linux-oldld.h, + config/i386/linux.h, config/i386/linux64.h, config/ia64/linux.h, + config/m68k/linux-aout.h, config/m68k/linux.h, config/mips/linux.h, + config/pa/pa-linux.h, config/pj/linux.h, config/s390/linux.h, + config/sh/linux.h, config/sparc/linux-aout.h, config/sparc/linux.h, + config/sparc/linux64.h, config/xtensa/linux.h (CPP_PREDEFINES): + Define __gnu_linux__, not gnu_linux. + * config/rs6000/sysv4.h (CPP_OS_GNU_SPEC): Likewise for gnu_hurd. + + 2002-04-15 Mark Mitchell + + Remove Chill front end. + * gcc.c (default_compilers): Remove Chill entries. + * ch: Remove directory. + * doc/frontends.texi: Remove information about Chill. + * doc/sourcebuild.texi: Likewise. + * doc/standards.texi: Likewise. + + 2002-04-15 Douglas B Rupp + + * config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include. + (LONGLONG_STANDALONE): Define. + + 2002-04-15 David S. Miller + + * config/sparc/sparc.c (sparc_emit_float_lib_cmp): + Call emit_library_call with LCT_NORMAL. + (sparc_initialize_trampoline): Use LCT_foo instead of + magic constant in emit_library_call invocations. + (sparc64_initialize_trampoline): Likewise. + (sparc_profile_hook): Likewise. + * config/sparc/sparc.md: Likewise. + + * config/sparc/sparc.c (sparc_extra_constraint_check): + Fix type of argument 'c'. + * config/sparc/sparc-protos.h (sparc_extra_constraint_check): + Likewise. + + 2002-04-15 Gabriel Dos Reis + + * diagnostic.h (output_buffer_state): Redefine. + (output_format_decoder): New macro. + (output_prefixing_rule): Likewise. + (output_line_cutoff): Likewise. + (diagnostic_format_decoder): Adjust. + (diagnostic_prefixing_rule): Likewise. + (diagnostic_line_cutoff): Likewise. + (diagnostic_state): Likewise. + (diagnostic_kind_count): Likewise. + (diagnostic_buffer): Now a macro. + + * diagnostic.c (diagnostic_buffer): Remove definition. + (output_is_line_wrapping): Adjust. + (set_real_maximum_length): Likewise. + (output_set_maximum_length): Likewise. + (init_output_buffer): Likewise. + (lhd_print_error_function): Likewise. + (output_do_verbatim): Likewise. + + 2002-04-14 Neil Booth + + * cpperror.c (print_location): Don't print include chain + if line == 0. + (cpp_begin_message): Update to use DL_ macros. + (cpp_ice, cpp_fatal, cpp_error_from_errno, cpp_warning, + cpp_warning_with_line, cpp_pedwarn, cpp_pedwarn_with_line, + cpp_notice, cpp_notice_from_errno): Remove. + (cpp_error, cpp_error_with_line): Update to take a diagnostic + level. + (cpp_errno): New. + * cppexp.c (CPP_ICE): Remove. + (SYNTAX_ERROR, SYNTAX_ERROR2, parse_number, parse_defined, + lex, integer_overflow, _cpp_parse_expr): Update. + * cppfiles.c (read_include_file, find_include_file, + handle_missing_header, _cpp_read_file, remap_filename): Update. + * cpphash.h (enum error_type): Remove. + (_cpp_begin_message): Update. + * cppinit.c (append_include_chain, remove_dup_dirs, output_deps, + cpp_handle_option, cpp_post_options): Update. + * cpplex.c (trigraph_p, skip_escaped_newlines, skip_block_comment, + skip_whitespace, parse_identifier, parse_slow, parse_string, + _cpp_lex_direct, cpp_spell_token, maybe_read_ucs, cpp_parse_escape, + cpp_interpret_charconst): Update. + * cpplib.c (check_eol, directive_diagnostics, _cpp_handle_directive, + lex_macro_node, do_undef, glue_header_name, parse_include, + do_include_common, read_flag, do_line, do_linemarker, do_ident, + cpp_register_pragma, do_pragma_once, do_pragma_system_header, + do_pragma_poison, do_pragma_dependency, _cpp_do__Pragma, do_else, + do_elif, do_endif, parse_answer, parse_assertion, do_assert, + _cpp_pop_buffer, do_diagnostic): Update. + * cpplib.h (DL_WARNING, DL_WARNING_SYSHDR, DL_PEDWARN, DL_ERROR, + DL_FATAL, DL_ICE, DL_EXTRACT, DL_WARNING_P): New. + (cpp_ice, cpp_fatal, cpp_error_from_errno, cpp_warning, + cpp_warning_with_line, cpp_pedwarn, cpp_pedwarn_with_line, + cpp_notice, cpp_notice_from_errno): Remove. + (cpp_error, cpp_error_with_line): Update to take a diagnostic + level. + (cpp_errno): New. + * cppmacro.c (builtin_macro, stringify_arg, paste_all_tokens, + collect_args, enter_macro_context, save_parameter, parse_params, + _cpp_create_definition, check_trad_stringification, + cpp_macro_definition): Update. + * cppmain.c (cpp_preprocess_file): Update. + * fix-header.c (read_scan_file): Update. + + 2002-04-14 Andreas Schwab + + * config/ia64/linux.h (CPP_PREDEFINES): Fix missing backslash. + + 2002-04-14 Jeroen Dobbelaere + + * config/arm/linux-elf.h (CPLUSPLUS_CPP_SPEC): Define. + + 2002-04-13 Mark Mitchell + + * config/i386/gnu.h (CPP_PREDEFINES): Define __gnu_hurd__, + not gnu_hurd. + + 2002-04-13 Hans-Peter Nilsson + + * config/cris/linux.h (CRIS_CPP_SUBTARGET_SPEC): Fix typo. + + 2002-04-13 Joel Sherrill + + * config/sparc/t-elf: Enable v8 multilibs. Impacts + sparc-elf and sparc-rtems targets. + + 2002-04-13 Mark Mitchell + + * alpha/linux.h: Define __gnu_linux__ wherever __linux__ is + defined, and __gnu_hurd__ wherever __GNU__ is defined. + * arm/linux-elf.h: Likewise. + * cris/aout.h: Likewise. + * cris/linux.h: Likewise. + * i370/linux.h: Likewise. + * i386/gnu.h: Likewise. + * i386/linux-aout.h: Likewise. + * i386/linux-oldld.h: Likewise. + * i386/linux.h: Likewise. + * i386/linux64.h: Likewise. + * ia64/linux.h: Likewise. + * m68k/linux-aout.h: Likewise. + * m68k/linux.h: Likewise. + * mips/linux.h: Likewise. + * pa/pa-linux.h: Likewise. + * pj/linux.h: Likewise. + * rs6000/sysv4.h: Likewise. + * s390/linux.h: Likewise. + * sh/linux.h: Likewise. + * sparc/linux-aout.h: Likewise. + * sparc/linux.h: Likewise. + * sparc/linux64.h: Likewise. + * xtensa/linux.h: Likewise. + + 2002-04-13 Richard Sandiford + + * stmt.c (check_unique_operand_names): Expect operand names to + be strings rather than identifiers. Use simple_cst_equal to + compare them. + (resolve_operand_name_1): Make same identifier to string change here. + * c-parse.in (asm_operand): Convert a named operand into a string. + * cp/parse.y (asm_operand): Likewise. + + 2002-04-13 Andreas Schwab + + * config/ia64/ia64.h (CPP_SPEC): Include %(cpp_cpu). + + 2002-04-12 Mark Mitchell + + Revert these changes: + + 2002-04-06 Mark Mitchell + + PR c++/5571 + * stor-layout.c (layout_decl): Reset the RTL for the decl. + + 2002-04-12 Richard Henderson + + * config.gcc (sparcv9-*-solaris2): Default to 32-bit code. + (sparc*-*-solaris): Clean up header files. + * configure.in (AS_SPARC64_FLAG): Error out if can't find it + and plan on generating 64-bit code. + * toplev.c (decode_g_option): Remove LINKER_DOES_NOT_WORK_WITH_DWARF2. + * config/sparc/sol2-64.h: Delete and reuse for default 64-bit code. + * config/sparc/sol2-sld-64.h: Rename ... + * config/sparc/sol2-bi.h: ... here. Remove the bits that checked + for AS_SPARC64_FLAG not defined. + * config/sparc/sol2-gld-bi.h: New. + * config/sparc/sol2-sld.h: Remove. + * config/sparc/sol26-sld.h: New. + * config/sparc/sol2.h: Tidy comments. + * doc/install.texi: Document sparc-solaris configury changes. + + 2002-04-12 Richard Henderson + + * recog.c (offsettable_address_p): Match the logic in adjust_address. + + * config/sparc/sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Handle TFmode + in 64-bit mode only. Use only for 32-bit or MEDLOW. + + 2002-04-12 Rainer Orth + + * config/alpha/osf.h (LINK_SPEC): Pass -S to silence ld warnings. + + Fri Apr 12 15:42:59 2002 Jeffrey A Law (law@redhat.com) + + * pa.c (pa_can_combine_p): Call extract_insn before calling + constrain_operands. + + 2002-04-12 Douglas B Rupp + + * config/i386/i386-interix.h (EH_FRAME_IN_DATA_SECTION): Define. + (TARGET_ASM_NAMED_SECTION, RETURN_IN_MEMORY) Define. + (DEFAULT_PCC_STRUCT_RETURN): Define as 0. + (CPP_PREDEFINES): Handle __declspec. + * config/i386/t-interix (USER_H): Remove. + + 2002-04-12 DJ Delorie + + * integrate.c (compare_blocks): Make comparisons safe for when + sizeof(int) < sizeof(char *). + (find_block): Likewise. + + 2002-04-12 Jan Hubicka + David Edelsohn + + * config/rs6000/rs6000.c (call_operand): Allow LINK and COUNT + registers. + (symbol_ref_operand): New. + * config/rs6000/rs6000.h (PREDICATE_CODES): Add symbol_ref_operand. + * config/rs6000/rs6000.md (call_nonlocal_aix): Use symbol_ref_operand. + + 2002-04-12 Andreas Schwab + + * config/ia64/ia64.h (ASM_SPEC): Moved from here ... + * config/ia64/sysv4.h (ASM_SPEC): ... to here, so that it + overrides the definition in config/svr4.h. + + 2002-04-12 Eric Norum + + * config/rtems.h, config/a29k/rtems.h, config/arm/rtems-elf.h, + config/c4x/rtems.h, config/h8300/rtems.h, config/i386/rtems.h, + config/i386/rtemself.h, config/i960/rtems.h, config/m68k/rtems.h, + config/m68k/rtemself.h, config/mips/rtems.h, config/mips/rtems64.h, + config/pa/rtems.h, config/rs6000/rtems.h, config/sh/rtems.h, + config/sh/rtemself.h, config/sparc/rtems.h, config/sparc/rtemself.h, + config/v850/rtems.h (*-rtems*): Cleanup pass to move common + definitions to config/rtems.h and make the targets more similar. + + Fri Apr 12 08:06:54 2002 Richard Kenner + + * expr.c (expand_assigment): Remove duplicate conversions #ifdef + POINTERS_EXTEND_UNSIGNED. + (store_constructor, expand_expr, case COMPONENT_REF): Likewise. + (store_expr): Use TYPE_MODE (sizetype), not ptr_mode. + + * emit-rtl.c (widen_memory_access): Don't do anything if MEMOFFSET + not specified. + + Fri Apr 12 12:11:26 2002 J"orn Rennecke + + * sh.c (calc_live_regs, sh_pr_n_sets): Use of PR_MEDIA_REG / PR_REG + depends on TARGET_SHMEDIA, not TARGET_SH5. + + 2002-04-12 Hans-Peter Nilsson + + * function.c (fixup_var_refs_1) : + For paradoxical (subreg VAR), replace VAR, don't try the subreg. + + Fri Apr 12 10:51:38 2002 J"orn Rennecke + + * sh.c (broken_move): Constant 0. / 1. load is OK if there is + no r0 clobber. + + 2002-04-12 Andreas Schwab + + * config/ia64/ia64.h (EXTRA_SPECS): Fix missing backslash. + + 2002-04-12 Richard Henderson + + PR bootstrap/4191 + * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef. + + * flow.c (mark_used_reg): Manage reg_cond_dead properly for + modes spanning multiple hard regs. + + * recog.c (peephole2_optimize): Rebuild jump labels as needed. + + 2002-04-11 John David Anglin + + * pa.c (pa_output_function_prologue): Don't accumulate the total + number of code bytes when using TARGET_64BIT, or gas, SOM and not + the portable runtime. + (output_deferred_plabels): Handle 64bit plabels. + (output_cbranch): Use $PIC_pcrel$0 for pc relative relocations when + generating pic code using the GAS assembler for object formats that + are not SOM (ie., ELF32 and ELF64). + (output_millicode_call): Check attribute type if attribute length is 28. + Likewise use $PIC_pcrel$0. Only call get_attr_length and + dbr_sequence_length once. + (output_call): Likewise use $PIC_pcrel$0, and call get_attr_length and + dbr_sequence_length once. + * pa.h (TARGET_SOM): Define if not defined. + * pa.md (pattern to load address of label): Likewise use $PIC_pcrel$0 + with GAS and not SOM. + (jump, call_internal_reg, call_value_internal_reg): Likewise. + * som.h (OBJ_SOM): Rename to TARGET_SOM. Undefine before defining. + + 2002-04-11 David O'Brien + + * config/freebsd.h (NO_IMPLICIT_EXTERN_C, SCCS_DIRECTIVE): Give value. + (DEFAULT_PCC_STRUCT_RETURN) Do not redefine. + (USER_LABEL_PREFIX, HANDLE_SYSV_PRAGMA, IDENT_ASM_OP, + DWARF2_DEBUGGING_INFO, DBX_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE): + elfos.h and dbxelf.h values are fine now. + * config/i386/freebsd.h, config/alpha/freebsd.h + (DEFAULT_PCC_STRUCT_RETURN): Define to 0. + + 2002-04-11 David O'Brien + + * config/ia64/aix.h (CPP_PREDEFINES): Do not define _LP64/__LP64__ + or set Acpu or Amachine. Reformat. + (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not + define. + (LINK_SPEC): Do not need to undef. + * config/ia64/elf.h (ASM_EXTRA_SPEC): Define. + * config/ia64/freebsd.h (LINK_SPEC): Do not need to undef. + (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not + define. + * config/ia64/hpux.h (ASM_EXTRA_SPEC): Define. + (ASM_SPEC): Do not define, use ASM_EXTRA_SPEC instead. + (LINK_SPEC): Do not need to undef. + (DONT_USE_BUILTIN_SETJMP): Do not define. + * config/ia64/ia64.h (ASM_SPEC, ASM_EXTRA_SPEC): Add. + (CPP_CPU_SPEC): Define _LP64, set Acpu and Amachine. Remove -Dia64. + (DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Define. + Remove trailing spaces. + * config/ia64/linux.h (CPP_PREDEFINES): Do not define _LP64/__LP64__, + __ELF__, or set Acpu or Amachine. Reformat. + (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not + define. + + 2002-04-11 David O'Brien + + * config.gcc (ia64-*-freebsd*): Fix ordering of tm_files to match + all other *-*-freebsd* targets. + + 2002-04-11 Richard Henderson + + * config.gcc (alpha*-*-linux*ecoff): Detect and reject. + + 2002-04-11 David O'Brien + + * config.gcc (alpha*-*-openbsd, alpha64-dec-*vms,alpha*-dec-*vms): + Include {cpu}/{cpu}.h thru tm_file. + (alpha*-*-linux*ecoff): Remove target. + * config/alpha/elf.h (CPP_SUBTARGET_SPEC): Define __ELF__. + (LINK_SPEC): Remove, is not OS independent. + * config/alpha/freebsd.h (CPP_SPEC): Do not define __ELF__. + (LINK_SPEC): Do not need to #undef any longer. + * config/alpha/linux-ecoff.h (LINK_SPEC): Do not need to #undef + any longer. + * config/alpha/linux-elf.h (SUB_CPP_PREDEFINES): Do not define + __ELF__. + (LINK_SPEC): Moved here from alpha/elf.h. + * config/alpha/linux.h (CPP_PREDEFINES): No longer consumer of + SUB_CPP_PREDEFINES. + * config/alpha/linux-ecoff.h: Remove. + * config/alpha/netbsd.h (CPP_PREDEFINES): Do not define __ELF__. + (CPP_SPEC): Define _POSIX_SOURCE as needed. + (CPP_SUBTARGET_SPEC): Do not define. + (LINK_SPEC): Do not need to #undef any longer. + * config/alpha/openbsd.h: Do not directly include alpha/alpha.h. + * config/alpha/vms.h: Likewise. + + 2002-04-11 Richard Sandiford + + * doc/extend.texi: Remove old claim that typedefs cannot have + an alignment attribute. + + 2002-04-11 Jakub Jelinek + + PR optimization/6177 + * expr.c (expand_expr) [COMPONENT_REF]: Handle op0 CONCAT if + bitpos is 0 and bitsize CONCAT size. + + 2002-04-11 Jakub Jelinek + + PR c/6223 + * combine.c (if_then_else_cond): Use trunc_int_for_mode on nz. + + 2002-04-10 David O'Brien + + * config/alpha/freebsd.h: Minor reformatting. + (CPP_SPEC): Define ELF and add cpp_subtarget. + (ASM_SPEC): No longer needed. + + 2002-04-11 Richard Henderson + + * config/sparc/sparc.md (movdi_insn_sp32): Add o/J alternative. + (movdi_insn_sp32_v9): Likewise. Only allow stx with aligned memory. + (dimode mem/zero splitter): New. + + 2002-04-11 Hans-Peter Nilsson + + * config/cris/cris.c (cris_override_options): Tweak error message + for PIC not implemented. + + * config/cris/cris.h: Tweak comments related to parameter-passing. + + * t-cris (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc here. + + 2002-04-10 Richard Henderson + + * except.c (add_ehl_entry): Allow duplicates after landing pad + creation. + + 2002-04-10 David Edelsohn + + * config/rs6000/t-aix43 (SHLIB_NM_FLAGS): Add -X32_64. + + 2002-04-10 Toon Moene + + * c-decl.c (c_init_decl_processing): Move generation of + decls for g77_integer_type_node and friends from here ... + * c-common.c (c_common_nodes_and_builtins): ... to here. + + 2002-04-10 Ulrich Weigand + + * reload1.c (choose_reload_regs): HARD_FRAME_POINTER_REGNUM + is only used as frame pointer when frame_pointer_needed is true. + + 2002-04-10 Richard Earnshaw + + PR target/817 + * arm.md (arm_movdi): Adjust neg_pool_range attribute to allow + for the fact that the pool entry uses two words. + (movdf_hard_insn): Similarly. Also, ADR instruction can span + 1k bytes. + (movdf_soft_insn): Similarly. + (movxf_hard_insn): Adjust neg_pool_range attribute to allow + for the fact that the pool entry uses three words. + + 2002-04-10 Richard Sandiford + + * config/mips/mips.c (mips_va_arg): When using the struct version + of the EABI va_list, allow arguments in the register save area to + take up less room than a stack argument. + + 2002-04-10 Richard Henderson + + * expr.c (expand_expr) [INTEGER_CST]: Don't force into registers + if EXPAND_INITIALIZER. + + 2002-04-09 Richard Henderson + + * config/alpha/alpha.md (movdi_er_maybe_g): New. + * config/alpha/alpha.c (alpha_expand_mov): Use it. + + 2002-04-10 Alan Modra + + PR optimization/6233 + * rtlanal.c (pure_call_p): New function. + * rtl.h (pure_call_p): Declare. + * loop.c (prescan_loop): Use it to set has_nonconst_call. + * gcse.c (store_killed_in_insn): Use pure_call_p here too. + + 2002-04-09 Eric Christopher + + * config/mips/mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Add additional + information to .comm directive. + + 2002-04-09 Richard Henderson + + PR c/5078 + * expr.c (expand_expr) [INTEGER_CST]: Force overflows into registers. + + 2002-04-09 Richard Henderson + + * basic-block.h (flow_delete_block_noexpunge): Declare. + (expunge_block_nocompact): Declare. + * cfg.c (expunge_block_nocompact): Split out from ... + (expunge_block): ... here. + * cfgrtl.c (can_delete_label_p): Don't use exception_handler_labels. + (flow_delete_block_noexpunge): Split out from ... + (flow_delete_block): ... here. + * cfgcleanup.c (delete_unreachable_blocks): Compact while + removing dead blocks. + * except.c (exception_handler_labels): Remove. + (exception_handler_label_map): New. + (struct eh_region): Add aka member. + (mark_ehl_map_entry, mark_ehl_map, free_region): New. + (ehl_hash, ehl_eq, ehl_free, add_ehl_entry): New. + (for_each_eh_label, for_each_eh_label_1): New. + (init_eh): Register exception_handler_label_map. + (free_eh_status): Use free_region. + (find_exception_handler_labels): Use the map, not the list. + (remove_exception_handler_label): Likewise. + (maybe_remove_eh_handler): Likewise. + (remove_eh_handler): Use the region aka bitmap. + * except.h (exception_handler_labels): Remove. + (for_each_eh_label): Declare. + * jump.c (rebuild_jump_labels): Don't check exception_handler_labels. + * loop.c (invalidate_loops_containing_label): New. + (find_and_verify_loops): Use it. Use for_each_eh_label. + * sched-rgn.c (is_cfg_nonregular): Use + current_function_has_exception_handlers. + + 2002-04-09 Richard Henderson + + * sbitmap.c (sbitmap_union_of_diff, sbitmap_a_and_b, sbitmap_a_xor_b, + sbitmap_a_or_b, sbitmap_a_or_b_and_c, sbitmap_a_and_b_or_c): + Do not return changed status. + (sbitmap_union_of_diff_cg, sbitmap_a_and_b_cg, sbitmap_a_xor_b_cg, + sbitmap_a_or_b_cg, sbitmap_a_or_b_and_c_cg, sbitmap_a_and_b_or_c_cg): + New functions that do return changed status. + * sbitmap.h: Update decls. + * gcse.c, lcm.c: Use _cg functions as needed. + + Tue Apr 9 19:15:57 2002 J"orn Rennecke + + * config.gcc (sh-*-elf*): Use sh/embed-elf.h instead of sh/elf.h. + (sh64-*-elf*, sh-*-rtemself*): Likewise. + * config/sh/embed_bb.c: New file. + * config/sh/embed-elf.h: New file. + * sh.h (CPP_SPEC): Supply __SIZE_TYPE__ and __PTRDIFF_TYPE__ + if -m[12345]* option is given. Don't use subtarget_cpp_ptr_spec. + (CPP_DEFAULT_CPU_SPEC): Add settings for __SIZE_TYPE__ and + __PTRDIFF_TYPE__ . + (SUBTARGET_CPP_PTR_SPEC): Don't define. + (EXTRA_SPECS): Remove subtarget_cpp_ptr_spec. + Add subtarget_asm_endian_spec. + (ASM_SPEC): Use subtarget_asm_endian_spec. + (SUBTARGET_ASM_ENDIAN_SPEC): Define. + (RETURN_ADDR_RTX): Use PR_MEDIA_REG for TARGET_SH5. + (WCHAR_UNSIGNED): Define. + (SH_ELF_WCHAR_TYPE, SH_DBX_REGISTER_NUMBER): Define. + (DBX_REGISTER_NUMBER): Use SH_DBX_REGISTER_NUMBER. + (ALLOCATE_INITIAL_VALUE): Use PR_MEDIA_REG for TARGET_SH5. + Fix value. + * sh.c (calc_live_regs): Use PR_MEDIA_REG for TARGET_SH5. + (sh_adjust_cost): Likewise. + sh64.h (CPP_DEFAULT_CPU_SPEC): Add settings for __SIZE_TYPE__ and + __PTRDIFF_TYPE__ . + (SUBTARGET_CPP_PTR_SPEC, WCHAR_TYPE): Don't #undef/ #define. + (WCHAR_TYPE_SIZE): Likewise. + (ASM_SPEC): Use subtarget_asm_endian_spec. + (SH_ELF_WCHAR_TYPE): #undef/ #define. + (MAX_WCHAR_TYPE_SIZE): Don't #undef. + * config/sh/elf.h (WCHAR_UNSIGNED): #undef . + (MAX_WCHAR_TYPE_SIZE): Don't #define . + (WCHAR_TYPE, WCHAR_TYPE_SIZE): #undef / #define . + (USER_LABEL_PREFIX): Don't #undef /#define . + (DBX_REGISTER_NUMBER): Use SH_DBX_REGISTER_NUMBER. + * config/elf/linux.h (USER_LABEL_PREFIX): Don't #undef /#define . + (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE): Likewise. + (ASM_SPEC): Likewise. + (SUBTARGET_ASM_ENDIAN_SPEC): #undef / #define . + (CC1_SPEC): don't supply -m3 for -m4*, -m5*. + * t-sh: (LIB1ASMFUNCS): Use LIB1ASMFUNCS_CACHE. + (LIB2FUNCS_EXTRA): Define. + * t-sh64 (LIB2FUNCS_EXTRA): Define. + * config/sh/t-linux (LIB1ASMFUNCS): Don't redefine. + (LIB1ASMFUNCS_CACHE): Define. + (LIB2FUNCS_EXTRA): Redefine empty. + + 2002-04-08 Richard Henderson + + * reorg.c (get_branch_condition): Use reversed_comparison_code. + + 2002-04-09 Stephane Carrez + + * config/m68hc11/larith.asm (__map_data_section): Fix condition + and optimize for size. + (__do_global_ctors): Fix pointer comparison. + (__do_global_dtors): Likewise. + + 2002-04-09 David S. Miller + + * config/sparc/sparc.c (sparc_extra_constraint_check): New + function, implementing EXTRA_CONSTRAINTS. For memory constraints, + allow reloading pseudos. + * config/sparc/sparc.h (EXTRA_CONSTRAINTS): Use it. + * config/sparc/sparc-protos.h: Declare it. + + * config/sparc/sparc.c (const64_is_2insns): Kill signed vs. + unsigned comparison warning. + (output_restore_regs): Mark leaf_function as unused. + + Tue Apr 9 09:35:45 2002 Richard Kenner + + * expr.c (is_aligning_offset): New function. + (expand_expr, case COMPONENT_EXPR): Call it. + + 2002-04-08 David S. Miller + + PR target/6082 + * config/sparc/freebsd.h (SPARC_DEFAULT_CMODEL): Set to CM_MEDLOW + + Make init_priority work on SPARC when using GNU ld. + * config/sparc/linux.h, config/sparc/linux64.h, + config/sparc/netbsd-elf.h, config/sparc/freebsd.h + (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Undefine. + * config/sparc/sol2-gld.h: New file to do the same. + * config.gcc (sparc*-*-solaris2*): If gnu_ld=yes add + sparc/sol2-gld.h to tm_file. + + PR optimization/4328 + * config/sparc/sparc.h (EXTRA_CONSTRAINT): Add new constraint 'W'. + * doc/md.texi: Document it. + * config/sparc/sparc.md (movdi_insn_sp64_novis, + movdi_insn_sp64_vis, movdf_insn_sp32, movdf_insn_v9only_novis, + movdf_insn_v9only_vis, movdf_insn_sp64_novis, + movdf_insn_sp64_vis): Use it as MEM constraing with 'e' registers. + * config/sparc/sparc.c (mem_min_alignment): Fix comment. + + 2002-04-08 Andreas Jaeger + + * stmt.c (expand_asm_operands): Revert last patch from Richard + Henderson. + + 2002-04-08 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add John David Anglin and Loren + J. Rittle (the latter also to Testers). Update David O'Brien's entry. + + 2002-04-08 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add David O'Brien. + + 2002-04-08 Alan Modra + + * configure.in (auto-build.h): Use target_alias and build_alias + when running configure. + (gcc_cv_as, gcc_cv_ld): Search install paths when build != host too. + (gcc_cv_nm, gcc_cv_objdump): Set for build != host too. + * configure: Regenerate. + + 2002-04-07 David S. Miller + + * config.gcc (sparc64-*-linux*): Add t-crtfm to tmake_file. + + 2002-04-07 John David Anglin + + PR 5933 + * pa.h (ASM_OUTPUT_MI_THUNK): Use indirect jump to target function when + generating 32-bit pic code. + + 2002-04-06 Jason Thorpe + + * cppinit.c (cpp_create_reader): Initialize + discard_comments_in_macro_exp. + (COMMAND_LINE_OPTIONS): Add "-CC" option. + (cpp_handle_option): Handle "-CC" option. + * cpplex.c (save_comment): If saving a C++ comment in + a directive, convert it to a C comment. + (_cpp_lex_direct): Pass second comment start character to + save_comment to indicate comment type. + * cpplib.c (_cpp_handle_directive): If processing + a "#define" directive and discard_comments_in_macro_exp + is false, re-enable saving of comments. + (lex_macro_node): If discard_comments_in_macro_exp is false, + discard any comments before the macro identifier. + * cpplib.h (struct cpp_options): Add discard_comments_in_macro_exp + member. + * cppmacro.c (cpp_get_token): If expanding a macro while + processing a directive, discard any comments we might encounter. + (parse_params): If discard_comments_in_macro_exp is false, + ignore comments in the macro parameter list. + * gcc.c (cpp_unique_options): Add "-CC" option. + (option_map): Map "--comments-in-macros" to "-CC". + * doc/cppopts.texi: Document "-CC" option. + * f/lang-specs.h: Add "-CC" option. + * testsuite/gcc.dg/cpp/maccom1.c: New test. + * testsuite/gcc.dg/cpp/maccom2.c: New test. + * testsuite/gcc.dg/cpp/maccom3.c: New test. + * testsuite/gcc.dg/cpp/maccom4.c: New test. + * testsuite/gcc.dg/cpp/maccom5.c: New test. + * testsuite/gcc.dg/cpp/maccom6.c: New test. + + 2002-04-06 John David Anglin + + PR middle-end/6180 + * reorg.c (dbr_schedule): Don't reposition prologue and epilogue notes. + + 2002-04-06 Mark Mitchell + + PR c++/5571 + * stor-layout.c (layout_decl): Reset the RTL for the decl. + + PR opt/5120 + * sibcall.c (optimize_sibling_and_tail_recursive_call): Clear + RTX_UNCHANGING_P for the functions arguments when a tail call + is made. + + 2002-04-06 Jason Merrill + + * toplev.c (flag_no_inline, flag_really_no_inline): Default to 2. + (parse_options_and_default_flags): Set them appropriately. + * c-common.c (c_common_post_options): Don't set flag_really_no_inline. + + 2002-04-06 Hans-Peter Nilsson + + * config/mmix/t-mmix (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc + here. + + * config/mmix/mmix.h (INITIAL_ELIMINATION_OFFSET): Remove spurious + semicolon. + + * config/mmix/mmix.c (mmix_expand_builtin_va_arg): Variable-size + types come in by-reference. Fix typo in comment. + + 2002-04-05 David S. Miller + + * config/sparc/freebsd.h (ENDFILE_SPEC): Add crtfastmath bits. + * config.gcc (sparc64-wrs-vxworks, sparc-*-chorusos, + sparc-*-rtems*, sparclite-*-elf* sparc86x-*-elf*, sparc64-*-elf*, + {sparc64,ultrasparc}-*-freebsd*): Add sparc/t-crtfm to tmake_file. + + 2002-04-05 David S. Miller + + * config/sparc/sparc.c (sparc_nonflat_function_epilogue): If we + are not going to emit return instructions, emit at least a nop + for the sake of sane backtraces. + + 2002-04-05 Richard Henderson + + * doc/rtl.texi (Regs and Memory): Document (mem:BLK (scratch)). + + 2002-04-05 Jakub Jeilnek + + * mklibgcc.in: Use $tmpmapfile, not tmp-$@. + + 2002-04-05 Alexandre Oliva + + * config/mips/mips.h (ISA_HAS_BRANCHLIKELY, ISA_HAS_CONDMOVE, + ISA_HAS_FP4, ISA_HAS_MADD_MSUB, ISA_HAS_NMADD_NMSUB, + ISA_HAS_CLZ_CLO, ISA_HAS_DCLZ_DCLO): Disable if TARGET_MIPS16. + + 2002-04-05 Andreas Schwab + + * c-convert.c: Include c-common.h. + * Makefile.in (c-convert.o): Updated. + + 2002-04-05 Jakub Jelinek + + * mklibgcc.in: Use separate libgcc.map for each multilib. + * Makefile.in (distclean): Don't remove libgcc.map here. + + 2002-04-05 Jakub Jelinek + + * Makefile.in (s-mlib): Handle --disable-multilib by separate + genmultilib invocation. + + 2002-04-04 Richard Sandiford + + * config/mips/mips.h (CUMULATIVE_ARGS): Rename fp_regs to num_fprs + to avoid clash with Irix header file sys/ucontext.h. Rename gp_regs + to num_gprs for symmetry. + * config/mips/mips.c: Adjust accordingly. + + 2002-04-04 Neil Booth + + * c-common.c (truthvalue_conversion): Rename, update. + * c-common.h (c_common_truthvalue_conversion): New. + * c-convert.c (convert): Update. + * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. + * c-parse.in (expr_no_commas, if_prefix, select_or_iter_stmt): Update. + * c-typeck.c (build_binary_op, build_unary_op, + build_conditional_expr): Update. + * fold-const.c (constant_boolean_node, fold): Use langhook. + * langhooks-def.h (LANGHOOK_INITIALIZER): Update. + * langhooks.h (struct lang_hooks): New hook. + * stmt.c (expand_decl_cleanup): Use langhook. + * tree.h (truthvalue_conversion): Remove. + objc: + * objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. + + 2002-04-05 Alan Modra + + * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtsavres.o + Add rules to make null object file. + + 2002-04-04 Jim Blandy + + * cppmacro.c (cpp_macro_definition): Do not emit spaces after + macro formal parameter names. + + 2002-04-04 David S. Miller + + * calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg. + + 2002-04-04 Richard Henderson + + PR middle-end/5099 + * stmt.c (expand_asm_operands): Validate outputs vs asm_operand_ok. + Support copies into and out of memory. Don't accept allows_reg + and allows_mem as gospel. + + 2002-04-04 Richard Henderson + + PR opt/6165 + * alias.c (true_dependence): Force (mem:blk (scratch)) to conflict. + (write_dependence_p): Likewise. + + 2002-04-04 Richard Henderson + + * predict.c (estimate_bb_frequencies): Do frequency calculation + with a volatile temporary. + + 2002-04-04 Ulrich Weigand + + * config/s390/linux.h (LOCAL_LABEL_PREFIX): Define. + + 2002-04-04 Jakub Jelinek + + PR c++/6119 + * final.c (final_start_function): Don't bump profile_label_no here... + (final_end_function): ...but here. + + 2002-04-04 Jakub Jelinek + + * config/sparc/sparc.md (pic): New attribute. + (do_builtin_setjmp_setup): Save %fp, %i7 and %l7 for TARGET_V9 + into stack slots. + (split after do_builtin_setjmp_setup): New. + + 2002-04-04 Jakub Jelinek + + PR fortran/6106 + * config/sparc/sparc.h (MIN_UNITS_PER_WORD): Backout 2001-01-01 + change. + + 2002-04-04 Jakub Jelinek + + * config/sparc/sparc.c (sparc_va_arg): Adjust va_list by + UNITS_PER_WORD for zero sized aggregates. + + 2002-04-03 David S. Miller + + * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): No need for a new + one-character spec for this, just use %(link_gcc_c_sequence). + + 2002-04-03 David S. Miller + + * config/sparc/crtfastmath.c (FPRS_NS): Delete bogus little-endian + handling. + + 2002-04-03 John David Anglin + + * pa-linux.h (INCOMING_RETURN_ADDR_RTX): Move. + (DWARF_FRAME_RETURN_COLUMN): Move. + (ASM_PREFERRED_EH_DATA_FORMAT): Define. + (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Define. + * pa.c (except.h, predict.h): Include. + (FRP): Delete. + (store_reg_modify, set_reg_plus_d): Revise prototypes. + (output_ascii): Add cast. + (store_reg_modify): Revise to add frame notes. + (set_reg_plus_d): Likewise. + (compute_frame_size): Include space for eh data registers in frame if + the current function calls eh_return. + (hppa_expand_prologue): Ensure register %r2 is saved if the current + function calls eh_return. Save eh data registers if the current + function calls eh_return. Fix code to add frame notes. Emit + blockage to prevent insns with frame notes being scheduled in the + delay slot of calls. + (hppa_expand_epilogue): Restore eh data registers and do final stack + adjustment if the current function calls eh_return. Don't add frame + notes. + (output_call): Revise for change in length of call insn. Don't do + return pointer adjustment for an unconditional jump in the delay slot + of a call when using frame notes. + * pa.h (EH_RETURN_DATA_REGNO): Revise for TARGET_64BIT compatibility. + (EH_RETURN_HANDLER_RTX): Use saved value on stack. + (ARG_POINTER_CFA_OFFSET): Define. + * pa.md (return_external_pic): New pattern. + (prologue): Correct formatting. Use return_external_pic if current + function calls eh_return. + (call_internal_symref, call_value_internal_symref, + sibcall_internal_symref, sibcall_value_internal_symref): Change default + lengths of short, long non-pic, and long pic calls to 8, 68, and 84, + respectively. + (exception_receiver): Use hppa_pic_save_rtx () to restore pic register. + + * configure.in ("assembler dwarf2 debug_line support"): Add hppa*-*-* to + list of targets to check using "nop" insn. + * configure: Rebuilt. + + 2002-04-04 Alan Modra + + * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Define. + + 2002-04-03 David S. Miller + + * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): New spec to override the gcc/c + library sequence passed to the linker. + (LINK_COMMAND_SPEC): Use it. + * doc/tm.texi: Document it, and mention from LINK_COMMAND_SPEC as + a macro a target can use to avoid overriding LINK_COMMAND_SPEC. + * config/sparc/sparc.h (LINK_GCC_C_SEQUENCE_SPEC): Define. + + 2002-04-03 Jason Merrill + + * except.c (struct eh_status): Remove protect_list. + (begin_protect_partials, end_protect_partials): Remove. + (add_partial_entry): Remove. + * except.h: Remove prototypes. + + * expr.c (expand_expr) [WITH_CLEANUP_EXPR, TARGET_EXPR]: Use + expand_decl_cleanup_eh. + + PR c++/5636 + * tree.h (CLEANUP_EH_ONLY): New macro. + * stmt.c (expand_decl_cleanup_eh): New fn. + (expand_cleanups): Check CLEANUP_EH_ONLY. + * c-semantics.c (genrtl_decl_cleanup): Just take the CLEANUP_STMT. + Use expand_decl_cleanup_eh. + (expand_stmt): Adjust. + * c-common.h: Adjust prototype. + + 2002-04-04 Hans-Peter Nilsson + + * config/cris/cris.c (cris_target_asm_function_prologue): Cast + uses of PIC_OFFSET_TABLE_REGNUM to int to silence warnings. + (cris_target_asm_function_epilogue): Ditto. + (cris_initial_frame_pointer_offset): Ditto. + (cris_simple_epilogue): Ditto. + (cris_expand_builtin_va_arg): Variable-size types come in + by-reference. + + 2002-04-03 David S. Miller + + * config/sparc/crtfastmath.c (FPRS_NS): Get it right for + little-endian. + (set_fast_math): Correct 'fsr' type. + + 2002-04-03 Richard Henderson + + PR opt/3569 + * langhooks.h (lang_hooks.decls.warn_unused_global): New. + * toplev.c (check_global_declarations): Use it. + * langhooks-def.h (lhd_warn_unused_global_decl): Declare. + (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. + (LANG_HOOKS_DECLS): Add it. + * langhooks.c (lhd_warn_unused_global_decl): New. + * c-decl.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. + * c-objc-common.c (c_warn_unused_global_decl): New. + * c-tree.h (c_warn_unused_global_decl): Declare. + * objc/objc-lang.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. + + 2002-04-03 Neil Booth + + * langhooks-def.h (lhd_set_decl_assembler_name, + LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.c (lhd_set_decl_assembler_name): New, from tree.c + * langhooks.h (struct lang_hooks): New hook. + * tree.c (set_decl_assembler_name): Move to langhooks.c. + (lang_set_decl_assembler_name): Remove. + (init_obstacks): Don't set hook. + (decl_assembler_name): New function. + * tree.h (DECL_ASSEMBLER_NAME): Turn into a function call. + (decl_assembler_name): New. + (lang_set_decl_assembler_name): Remove. + + 2002-04-03 Jakub Jelinek + + * configure.in (HAVE_SPARC_UA_PCREL_HIDDEN): Test whether %r_disp32() + works properly with .hidden symbols. + * configure: Rebuilt. + * config.in: Rebuilt. + * config/sparc/sparc.h (ASM_PREFERRED_EH_DATA_FORMAT): Use + DW_EH_PE_absptr for flag_pic && GLOBAL if %r_disp32() doesn't work + properly with .hidden symbols. + + 2002-04-03 Jakub Jelinek + + PR middle-end/6102 + * df.c (df_insn_refs_record): Use XEXP not SET_DEST to access + USE argument. + + 2002-04-03 Richard Henderson + + PR opt/4120 + * sched-rgn.c (sets_likely_spilled): New. + (sets_likely_spilled_1): New. + (add_branch_dependences): Use it. + + 2002-04-02 Richard Henderson + + PR opt/4311 + * loop.h (LOOP_FIRST_PASS): New. + * loop.c (strength_reduce): Mind it when deciding to unroll. + * toplev.c (rest_of_compilation): Set it. + + 2002-04-02 David S. Miller + + * config/sparc/sparc.md (ldd peephole2s): Fix final arg to + mems_ok_for_ldd_peep when the order of the loads being examined + is reversed. + * config/sparc/sparc.c (mems_ok_for_ldd_peep): Expand upon + existing comment to increase comprehension of this situation. + + 2002-04-02 Zack Weinberg + + * config/sh/sh.md: Don't use union real_extract. + + 2002-04-02 Richard Henderson + + * libgcc2.c (__bb_exit_func): Revert 03-31 change. + + 2002-04-02 David O'Brien + + * config.gcc (i386-dg-dgux, i386-go32-msdos , i386-go32-rtems, + i386-ibm-aix, i386-moss-msdos, i386-ncr-sysv4, i386-next-, + i386-pc-msdosdjgpp, i386-sequent-bsd, i386-sequent-ptx1, + i386-sequent-ptx2, i386-sequent-ptx4, i386-sun-sunos, + i386-wrs-vxworks, i386-*-aout, i386-*-beoself, i386-*-bsd, + i386-*-bsdi, i386-*-chorusos, i386-*-coff, i386-*-elf, + i386-*-freebsd5, i386-*-freebsd-aout, i386-*-gnu, i386-*-interix, + i386-*-interix3, i386-*-isc, i386-*-linux, i386-*-linuxaout, + i386-*-linuxoldld, i386-*-lynxos, i386-*-mach, i386-*-mingw32, + i386-*-netbsd, i386-*-netbsdelf, i386-*-netware, i386-*-openbsd, + i386-*-osf1, i386-*-osfrose, i386-*-pe , i386-*-rtems, + i386-*-rtemscoff, i386-*-sco3.2v5, i386-*-solaris2, i386-*-sysv, + i386-*-sysv4, i386-*-sysv5, i386-*-udk, i386-*-uwin, i386-*-vsta, + i386-*-win32, x86_64-*-freebsd5, x86_64-*-linux, x86_64-*-netbsd): + Include as many configury headers via tm_file as possible. This + includes among others i386/unix.h, i386/bsd.h, i386/gas.h. + * config/openbsd-oldgas.h: New file. + * config/i386/386bsd.h, config/i386/aix386ng.h, config/i386/att.h, + config/i386/bsd.h, config/i386/djgpp.h, config/i386/freebsd-aout.h, + config/i386/gas.h, config/i386/gstabs.h, config/i386/i386-aout.h, + config/i386/i386-coff.h, config/i386/i386-interix.h, + config/i386/iscdbx.h, config/i386/linux-aout.h, + config/i386/linux-oldld.h, config/i386/lynx-ng.h, config/i386/lynx.h, + config/i386/mach.h, config/i386/netbsd.h, config/i386/next.h, + config/i386/openbsd.h, config/i386/osfelf.h, config/i386/osfrose.h, + config/i386/sco5.h, config/i386/seq-gas.h, config/i386/seq-sysv3.h, + config/i386/seq2-sysv3.h, config/i386/sequent.h, config/i386/sun.h, + config/i386/sun386.h, config/i386/svr3dbx.h, config/i386/svr3gas.h, + config/i386/sysv3.h, config/i386/uwin.h, config/i386/vsta.h, + config/i386/vxi386.h: Do not directly include configury headers. + * config/i386/cygwin.h, config/i386/djgpp.h, config/i386/win32.h: + Directly include configury headers that are no longer automatically + included by the above headers. + * config/i386/att.h, config/i386/bsd.h (TARGET_VERSION): Do not define. + * config/i386/386bsd.h, config/i386/aix386ng.h, config/i386/cygwin.h, + config/i386/djgpp.h, config/i386/i386-aout.h, config/i386/i386-coff.h, + config/i386/lynx-ng.h, config/i386/lynx.h, config/i386/mach.h, + config/i386/netbsd.h, config/i386/openbsd.h, config/i386/rtems.h, + config/i386/seq-sysv3.h, config/i386/sequent.h, config/i386/svr3gas.h, + config/i386/sysv3.h, config/i386/vsta.h, config/i386/vxi386.h + (TARGET_VERSION): Define. + * config/i386/beos-elf.h, config/i386/freebsd.h, + config/i386/i386-interix.h, config/i386/i386elf.h, config/i386/linux.h, + config/i386/linux64.h, config/i386/netbsd-elf.h, config/i386/netbsd64.h, + config/i386/osfelf.h, config/i386/osfrose.h, config/i386/ptx4-i.h, + config/i386/sco5.h, config/i386/sysv4.h + (TARGET_VERSION): Do not need to protect. + * config/i386/freebsd64.h (TARGET_VERSION): Fix style. + * config/i386/386bsd.h, config/i386/cygwin.h, config/i386/djgpp.h, + config/i386/freebsd-aout.h, config/i386/i386-aout.h, + config/i386/i386-interix.h, config/i386/linux-aout.h, + config/i386/linux-oldld.h, config/i386/mach.h, config/i386/netbsd.h, + config/i386/openbsd.h, config/i386/vsta.h, config/i386/win32.h + (YES_UNDERSCORES): Do not define - not needed. + * config/i386/bsd.h, config/i386/gas.h (LPREFIX, + ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL, + USER_LABEL_PREFIX): Do not handle the "NO_UNDERSCORES" case. + * config/i386/i386-coff.h, config/i386/lynx.h, config/i386/lynx-ng.h + (LPREFIX, ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL, + USER_LABEL_PREFIX): Define. (handles the "NO_UNDERSCORES" case) + * config/i386/isc.h: Preserve comment from config/i386/isccoff.h. + * config/i386/isccoff.h, config/i386/v3gas.h: Remove. + + 2002-04-02 Eric Botcazou + Richard Henderson + + PR c/5484 + * function.c (assign_temp): Accept either type or decl argument. + Detect variables whose size is too large to fit into an integer. + * stmt.c (expand_decl): Pass the decl, not the type. + + 2002-04-02 David O'Brien + + * protoize.c: Match include directory usage with cppdefault.c. + + 2002-04-03 Jeffrey A Law (law@redhat.com) + Hans-Peter Nilsson + + * combine.c (simplify_comparison): Avoid narrowing a comparison + with a paradoxical subreg when doing so would drop signficant bits. + + 2002-04-02 Steve Ellcey + + * builtins.c (expand_builtin_prefetch): Force op0 pointer to Pmode + if POINTERS_EXTEND_UNSIGNED is defined. + + 2002-04-02 Richard Henderson + + PR opt/3967 + * local-alloc.c (contains_replace_regs): LO_SUM may contain + replace regs. + + 2002-04-02 Richard Henderson + + * doc/standards.texi: Document required freestanding libc entry points. + + 2002-04-02 Alan Modra + + * config/rs6000/rs6000.md (ctrdi*): Add FPR constraint and + associated splitter. Remove MQ constraint. + (ctrdi_internal4): Correct CCmode clobber. + + 2002-04-02 John David Anglin + + * milli64.S ($$dyncall): New function. + * t-linux (LIB1ASMFUNCS): Revise module list. + (LIB1ASMSRC): Use pa/milli64.S. + + 2002-04-02 Richard Henderson + + * fixinc/inclhack.def (AAB_solaris_sys_varargs_h): Move and + rename solaris_sys_varargs_h. + + Tue Apr 2 06:47:40 2002 Richard Kenner + + * stor-layout.c (layout_type, case ARRAY_TYPE): Give one-element array + the same mode as its component. + + 2002-04-02 Richard Henderson + + PR opt/190 + * final.c (this_is_asm_operands): Export. + * output.h (this_is_asm_operands): Declare. + * config/i386/i386.c (print_operand): Error odd asm operands. + + 2002-04-02 Richard Henderson + + PR opt/420 + * config/m68k/m68k.md (dbcc peepholes): Match four forms of dbra. + + 2002-04-01 Richard Henderson + + PR target/1538 + * fixinc/inclhack.def (solaris_sys_varargs_h): New. + * fixinc/fixincl.x: Rebuild. + + 2002-04-01 Richard Henderson + + * config/ia64/unwind-ia64.c: Include ia64intrin.h. + (atomic_alloc, atomic_free): New. + (SIZE, MASK_FOR, PTR_IN): New. + (emergency_reg_state, emergency_reg_state_free): New. + (emergency_labeled_state, emergency_labeled_state_free): New. + (reg_state_alloced, labeled_state_alloced): New. + (alloc_reg_state, free_reg_state): New. + (alloc_label_state, free_label_state, free_label_states): New. + (push, pop, dup_state_stack, free_state_stack): Use them. + (desc_label_state): Likewise. + (uw_frame_state_for): Free label states and state stack. + (uw_update_reg_address): Eliminate warnings. + + 2002-04-01 Vladimir Makarov + + * config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON, + ASM_OUTPUT_ALIGNED_LOCAL): Redefine them. + + 2002-04-01 Neil Booth + + * c-decl.c (grokdeclarator): Update. + * c-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. + * c-tree.h (c_mark_addressable): New. + * c-typeck.c (default_function_array_conversion, build_unary_op, + build_array_ref, convert_for_assignment): Update. + (mark_addressable): Rename. + * calls.c (try_to_integrate, expand_call): Use langhook. + * expr.c (expand_expr): Use langhook. + * langhooks-def.h (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (struct lang_hooks): New hook. + * stmt.c (expand_asm_operands): Use langhook. + * tree.h (mark_addressable): Remove. + objc: + * objc-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. + + 2002-04-01 Bob Wilson + + * config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning + in previous change. + + 2002-04-01 Bob Wilson + + * config/xtensa/xtensa.c (xtensa_va_arg): Fix to handle arguments + for which MUST_PASS_IN_STACK is true (e.g., variable-sized types). + + 2002-04-01 Neil Booth + + * c-common.c (unsigned_conversion_warning, convert_and_check, + unsigned_type, signed_type, shorten_compare, + c_common_get_alias_set, c_common_nodes_and_builtins): Use new hooks. + (unsigned_type, signed_type, signed_or_unsigned_type): Rename. + * c-common.h (unsigned_type, signed_type, signed_or_unsigned_type): + New. + * c-decl.c (grokdeclarator): Update. + * c-format.c (check_format_types): Update. + * c-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, + LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. + * c-typeck.c (build_binary_op, convert_for_assignment): Update. + * convert.c (convert_to_integer): Use new hooks. + * expmed.c (make_tree): Use new hooks. + * expr.c (store_expr): Use new hooks. + * fold-const.c (operand_equal_for_comparison_p, build_range_check, + all_ones_mask_p, unextend, fold): Use new hooks. + * langhooks.h (struct lang_hooks_for_types): New hooks. + * tree.h (signed_or_unsigned_type, signed_type, + unsigned_type): Remove. + objc: + * objc-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, + LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. + + 2002-03-31 Richard Henderson + + * config/ia64/unwind-ia64.c (alloc_spill_area): Fix offset. + (desc_frgr_mem): Fix reference to f16-f31. + + 2002-03-31 Kaveh R. Ghazi + + * rtl.h (RTL_CHECK1, RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2, + RTVEC_ELT): Const-ify. + * varray.h (VARRAY_CHECK): Const-ify. + * ggc.h (ggc_mark_rtx, ggc_mark_tree, ggc_mark_nonnull_tree, + ggc_mark_rtvec, ggc_mark): Const-ify. + + 2002-04-01 Neil Booth + + * diagnostic.c: Include langhooks-def.h. + * Makefile.in (diagnostic.o): Update. + + 2002-03-31 Neil Booth + + * c-common.c (c_unsafe_for_reeval): Rename. + * c-common.h (c_unsafe_for_reeval): Rename. + * c-decl.c (finish_incomplete_decl): Rename. + (c_init_decl_processing): Don't set langhook. + * c-lang.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL, + LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. + * c-objc-common.c (c_objc_common_init): Don't set langhook. + * c-tree.h (finish_incomplete_decl): Rename. + * langhooks-def.h (lhd_unsafe_for_reeval): New. + (LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.c (lhd_unsafe_For_reeval): New. + * langhooks.h (struct langhooks): New hooks. + * toplev.c (incomplete_decl_finalize_hook): Remove. + (wrapup_global_declarations): Update. + * tree.c (lang_unsafe_for_reeval): Remove. + (unsafe_for_reeval): Update. + * tree.h (lang_unsafe_for_reeval, incomplete_decl_finalize_hook): + Remove. + objc: + * objc-lang.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL, + LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. + + 2002-03-31 Neil Booth + + * diagnostic.c (print_error_function): Remove. + (default_print_error_function): Rename. + (report_error_function): Update. + * diagnostic.h (print_error_function): Remove. + (default_print_error_function): Remove. + * langhooks-def.h (struct diagnostic_context): Predeclare. + (lhd_print_error_function, LANG_HOOKS_PRINT_ERROR_FUNCTION): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (struct diagnostic context): Predeclare. + (struct lang_hooks): New hook. + + 2002-03-31 Franz Sirl + + * config/rs6000/rs6000.h (RS6000_PIC_OFFSET_TABLE_REGNUM): New. + (PIC_OFFSET_TABLE_REGNUM): Use it and return INVALID_REGNUM if + !flag_pic. + (CONDITIONAL_REGISTER_USAGE): Adjust accordingly. + * config/rs6000/rs6000.h: Use RS6000_PIC_OFFSET_TABLE_REGNUM instead + of PIC_OFFSET_TABLE_REGNUM thruout. + * config/rs6000/rs6000.md: Likewise. + * config/rs6000/darwin.h: Likewise. + + Sun Mar 31 14:43:24 2002 Richard Kenner + + * emit-rtl.c (adjust_address_1, offset_address): Cast value to + unsigned HOST_WIDE_INT, not unsigned int. + + 2002-03-31 Jakub Jelinek + + PR middle-end/6096, middle-end/6098, middle-end/6099 + * reorg.c (emit_delay_sequence): Only increment LABEL_NUSES for + CODE_LABELs. + (fill_slots_from_thread): Likewise. + + 2002-03-31 Jakub Jelinek + + * config/sparc/sparc.c (function_arg_record_value_1): Pass complex + floating fields in float regs. + (function_arg_record_value_2): Likewise. + + 2002-03-31 Hans-Peter Nilsson + + * config/mmix/mmix.md (define_constants): Remove misleading + FIXME. Add MMIX_fp_rO_OFFSET. + ("nonlocal_goto_receiver"): Don't have stack-frame address of + saved rO as part of the pattern. Remove FIXME. + ("*nonlocal_goto_receiver_expanded"): Similar. Generate address + here, at output-time. + + 2002-03-31 Jakub Jelinek + + PR middle-end/6100 + * config/sparc/sparc.c (output_cbranch): Use REG_BR_PROB, not + REG_BR_PRED. + (output_v9branch): Likewise. + + 2002-03-31 Alexandre Oliva + + * gcc.c: Revert previous patch for now. + * config/i386/djgpp.h: Likewise. + + 2002-03-31 Hans-Peter Nilsson + + * config/mmix/crti.asm (_init): Register _fini with atexit. + * config/mmix/crtn.asm (_fini): Add omitted "POP 0,0". + + 2002-03-31 Richard Henderson + + PR target/3997 + * config/alpha/elf.h (ASM_OUTPUT_DEF): Tidy. + (ASM_OUTPUT_DEF_FROM_DECLS): New. + + 2002-03-31 Richard Henderson + + * libgcc2.c (__bb_exit_func): Make static. + + * config/alpha/alpha.md (trap): New. + + 2002-03-31 Richard Henderson + + * builtins.c (expand_builtin_va_arg): Give warnings not errors for + promoted argument types; build trap. + (expand_builtin_trap): New. + (expand_builtin): Use it. + * stmt.c (expand_nl_goto_receivers): Likewise. + * expr.h (expand_builtin_trap): Declare. + * libfuncs.h (LTI_abort, abort_libfunc): New. + * optabs.c (init_optabs): Init abort_libfunc. + + 2002-03-31 Alexandre Oliva + + * gcc.c (LIBGCC_SPEC): Folded %L and duplicate %G here... + (LINK_COMMAND_SPEC): ... from here. + (init_gcc_specs): Duplicate it here too, omitting + shared_name in the second copy. + (init_spec): Test for duplicate + * config/i386/djgpp.h (LINK_COMMAND_SPEC): Remove `%L %G'. + + 2002-03-30 David S. Miller + + * config/sparc/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. + * config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Likewise. + + 2002-03-30 Roger Sayle + Richard Henderson + + * regmove.c (combine_stack_adjustments_for_block): Avoid + emitting a stack adjustment of zero bytes. Let delete_insn + update bb->head. + + 2002-03-30 Richard Henderson + + * config/sparc/sparc.c: Remove all references to TARGET_EPILOGUE. + (sparc_emitting_epilogue): New. + (leaf_label, output_return, sparc_return_peephole_ok): Remove. + * config/sparc/sparc-protos.h: Update. + * config/sparc/sparc.h (MASK_EPILOGUE, TARGET_EPILOGUE): Remove. + (TARGET_SWITCHES): Update. + * config/sparc/sparc.md (return): Remove. + (return_*): Use sparc_emitting_epilogue, not !TARGET_EPILOGUE. + * config/sparc/freebsd.h, config/sparc/linux64.h, config/sparc/lite.h, + config/sparc/liteelf.h, config/sparc/netbsd-elf.h, + config/sparc/sol2-sld-64.h, config/sparc/sol2.h, + config/sparc/sp64-aout.h, config/sparc/sp64-elf.h, + config/sparc/sp86x-aout.h, config/sparc/sp86x-elf.h, + config/sparc/splet.h, config/sparc/vxsparc64.h (TARGET_DEFAULT): + Remove MASK_EPILOGUE. + * doc/invoke.texi: Update. + + 2002-03-30 Daniel Berlin + + * dwarf2out.c (dwarf2out_define): Remove start_source_file call, + CPP will start the file for us. + + 2002-03-30 Richard Henderson + + PR target/5446 + * config/ia64/ia64.c (group_barrier_needed_p): Special case + prologue_allocate_stack. + (ia64_single_set): Use insn codes for recognition of special + cases, not rtl matching. + * config/ia64/ia64.md (prologue_allocate_stack): Op 3 is in-out. + + Sat Mar 30 23:48:41 CET 2002 Jan Hubicka + + * cfgbuild.c (find_basic_blocks_1): Clear aux for blocks. + + 2002-03-30 Richard Henderson + + PR target/6032 + * config/sparc/sparc.h (OVERRIDE_OPTIONS): Don't override -fpic + or -fomit-frame-pointer with profiling. + (SUBTARGET_OVERRIDE_OPTIONS): Remove. + (FUNCTION_PROFILER): Do nothing. + (PROFILE_HOOK): New. + * config/sparc/sparc.c (sparc_override_options): Don't check + code models for profiling. + (sparc_function_profiler): Remove. + (sparc_profile_hook): New. + * config/sparc/sparc-protos.h: Update. + + 2002-03-30 Jakub Jelinek + + PR optimization/6086 + * combine.c (combine_simplify_rtx): If simplify_rtx failed because + of SUBREG of volatile MEM or because the MEM was mode dependent, + return CLOBBER instead of unmodified SUBREG. + + Sat Mar 30 14:08:55 CET 2002 Jan Hubicka + + * local-alloc.c (local_alloc): Avoid call of update_equiv_regs + when not optimizing. + + * toplev.c (rest_of_compilation): Cann mark_constant_function + only when optimizing. + + * flow.c (calculate_global_regs_live): Ensure that all AUX fields + are NULL. + + * cfgcleanup.c (bb_flags): Add BB_NONTHREADABLE_BLOCK. + (thread_jump): Set BB_NONTHREADABLE_BLOCK, check it. + (try_optimize_cfg): clear all AUX fields. + + * i386.c (aligned_operand): Be prepared for SUBREGed registers. + (ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG. + (ix86_address_cost): Be prepared for SUBREGed registers. + (legitimate_address_p): Accept SUBREGed registers. + + 2002-03-29 Richard Henderson + + PR target/5672 + * expr.c (expand_expr): Pass along EXPAND_INITIALIZER one more place. + + 2002-03-29 Franz Sirl + + * config/rs6000/rs6000.c (rs6000_va_arg): Correctly set register count + for aggregate and TFmode types. + + 2002-03-29 Hans-Peter Nilsson + + * cfg.c (dump_flow_info): Guard against NULL regno_reg_rtx[i]. + + 2002-03-29 Richard Henderson + + PR target/5886 + * config/ia64/aix.h (CPP_PREDEFINES): Add -D_LP64. + * config/ia64/hpux.h, config/ia64/linux.h: Likewise. + + 2002-03-29 Richard Henderson + + PR target/6041 + * config/i386/i386.c (x86_arch_always_fancy_math_387): New. + (override_options): Disable NO_FANCY_MATH_387 if the arch allows. + * config/i386/i386.h (x86_arch_always_fancy_math_387): New. + * config/i386/i386.md (sqrtxf2, sqrtextendsfxf2, sinxf2): Fix + conditional. + * docs/invoke.texi: Update -mno-fancy-math-387 docs. + + 2002-03-29 Dale Johannesen + + * loop.c (combine_movables): Do allow combination of pseudos. + + 2002-03-29 Loren J. Rittle + + * config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so. + * config/t-slibgcc-elf-ver (SHLIB_LC): Add macro and use it. + No functional change except ... + * config/t-slibgcc-nolc-override (SHLIB_LC): Override it. New file. + * doc/install.texi (*-*-freebsd*): Document port configuration. + + 2002-03-29 Neil Booth + + * Makefile.in (convert.o, calls.o, expmed.o): Update. + * attribs.c (handle_mode_attribute, handle_vector_size_attribute): + Use new hooks. + * builtin-types.def (BT_PTRMODE): Update. + * c-common.c (type_for_size): Rename c_common_type_for_size. + (type_for_mode): Similarly. + (shorten_compare, pointer_int_sum, c_common_nodes_and_builtins): + Use new hook. + * c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New. + * c-decl.c (finish_enum, build_enumerator): Use new hooks. + * c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): + Redefine. + * c-typeck.c (common_type, comptypes, default_conversion): + Use new hooks. + * calls.c: Include langhooks.h. + (emit_library_call_value_1): Use new hooks. Avoid redundant + calls. + * convert.c: Include langhooks.h + (convert_to_pointer, convert_to_integer): Use new hooks. + * except.c (init_eh): Similarly. + * expmed.c: Include langhooks.h. + (expand_mult_add): Use new hooks. + * expr.c (store_expr, store_constructor, expand_expr, do_jump, + try_casesi): Similarly. + * fold-const.c (optimize_bit_field_compare, make_range, + decode_field_reference, fold_truthop, fold): Similarly. + * function.c (assign_stack_local_1, assign_stack_temp_for_type, + put_var_into_stack): Similarly. + * langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE, + LANG_HOOKS_TYPE_FOR_SIZE): New. + (LANG_HOOKS_TYPES_INITIALIZER): Update. + * langhooks.h (lang_hooks_for_types): New hooks. + * stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks. + * tree.c (get_unwidened, get_narrower): Similarly. + * tree.h (type_for_mode, type_for_size): Remove. + * varasm.c (force_const_mem): Use new hooks. + * utils2.c (nonbinary_modular_operation): Update. + objc: + * objc-act.c (handle_impent): Update. + * objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): + Redefine. + + 2002-03-29 Steve Ellcey + + * config/ia64/ia64.md (*ptr_extend_plus_1, *ptr_extend_plus_2): New. + * config/ia64/ia64.c (basereg_operand): New. + * config/ia64/ia64-protos.h (basereg_operand): Declare. + * config/ia64/ia64.h (PREDICATE_CODES): Add basereg_operand. + + 2002-03-29 Hans-Peter Nilsson + + * config/mmix/mmix.c (mmix_target_asm_function_prologue): Correct + unwind information when frame_pointer_needed. + (mmix_assemble_integer): Tweak wording in comment. + + 2002-03-29 Neil Booth + + * Makefile.in (except.o): Update. + * except.c: Include langhooks.h. + (init_eh): Use langhook. + * langhooks-def.h (LANG_HOOKS_MAKE_TYPE, + LANG_HOOKS_FOR_TYPES_INITIALIZER): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (lang_hooks_for_types): New. + (struct lang_hooks): Add it. + * tree.c (make_lang_type_fn, make_lang_type): Remove. + * tree.h (make_lang_type_fn, make_lang_type): Remove. + config: + * alpha/alpha.c: Include langhooks.h. + (alpha_build_va_list): Use langhook. + * d30v/d30v.c: Include langhooks.h. + (d30v_build_va_list): Use langhook. + * i386/i386.c: Include langhooks.h. + (ix86_build_va_list): Use langhook. + * rs6000/rs6000.c (rs6000_build_va_list): Use langhook. + * s390/s390.c: Include langhooks.h. + (s390_build_va_list): Use langhook. + * stormy16/stormy16.c: Include langhooks.h. + (stormy16_build_va_list): Use langhook. + + 2002-03-29 Jakub Jelinek + + PR c++/5964 + * config/sparc/sparc.md (empty_delay_slot, branch_type): New + attributes. + (length): Compute variable length for branches/calls/jumps here. + (branch, inverted_branch, normal_fp_branch, inverted_fp_branch, + normal_fpe_branch, inverted_fpe_branch): Remove length attribute, + define branch_type attribute. + (divsi3_sp32): Maximum length is 6 not 7. + (call_address_struct_value_sp32, call_symbolic_struct_value_sp32, + call_address_untyped_struct_value_sp32, + call_symbolic_untyped_struct_value_sp32): Set length to 3 not 2. + * config/sparc/sparc.c (empty_delay_slot): New function. + * config/sparc/sparc.h (ADJUST_INSN_LENGTH): Remove. + * config/sparc/sparc-protos.h (empty_delay_slot): Add prototype. + + 2002-03-29 Jakub Jelinek + + * combine.c (set_nonzero_bits_and_sign_copies): Don't call + nonzero_bits if not needed. + (nonzero_bits) [XOR]: Likewise. + (nonzero_bits) [REG]: Use reg_last_set_nonzero_bits even if + reg_last_set_mode and mode are both MODE_INT, but not equal. + (record_value_for_reg): Compute reg_last_set_nonzero_bits + in nonzero_bits_mode for MODE_INT modes. + + 2002-03-28 Richard Henderson + + PR target/5715 + * config/alpha/osf.h (ASM_SPEC): Don't pass any special options + to GAS. Correct drift between alternatives. + + 2002-03-28 Richard Henderson + + PR target/6087 + * reload1.c (fixup_abnormal_edges): Move insn to edge via sequence. + + 2002-03-28 Alexandre Oliva + + * config/i386/freebsd.h (LINK_SPEC): Don't pass default + emulation to the linker. + + 2002-03-28 Loren J. Rittle + + * config/alpha/freebsd.h (LINK_SPEC): Likewise. + * config/sparc/freebsd.h (LINK_SPEC): Likewise. + + Thu Mar 28 16:35:31 2002 Jeffrey A Law (law@redhat.com) + + * combine.c (simplify_and_const_int): Make sure to apply mask + when force_to_mode returns a constant integer. PR3311. + + 2002-03-28 John David Anglin + + * pa-linux.h (LOCAL_LABEL_PREFIX): Define. + + 2002-03-28 Gerald Pfeifer + + * doc/invoke.texi (Warning Options): Refer to C++ Dialect Options + and Objective-C Dialect Options. + + 2002-03-28 Richard Henderson + + * config/alpha/alpha.c (alpha_emit_conditional_branch): TFmode NE + comparison should be done vs !=0 not >0 return code. Tidy cases. + + 2002-03-28 Richard Henderson + + * c-decl.c (finish_function): New arg can_defer_p. Pass it + on to c_expand_body. + * c-tree.h (finish_function): Update decl. + * c-objc-common.c, c-parse.in, objc/objc-act.c: Update calls. + + Thu Mar 28 19:13:36 CET 2002 Jan Hubicka + + * ifcvt.c (if_convert): Clear aux_for_blocks early enought. + + Thu Mar 28 13:21:53 CET 2002 Jan Hubicka + + * rtlanal.c: Include flags.h + (may_trap_p): Do not mark FP operations if trapping + if !flag_trapping_math + * Makefile.in (rtlanal.o): Add dependency on flag.h + * ifcvt.c (noce_operand_ok): Avoid the lameness. + + 2002-03-27 Zack Weinberg + + * mips.md: Use dconst1, not 1.0, as first argument of + REAL_VALUE_LDEXP. Don't use union real_extract. + + 2002-03-28 Alan Modra + + * configure.in (gcc_cv_as): Use $target_alias in directory searchs + rather than $target. Heed program_prefix and + program_transform_name. Search for gas in cross-compiler case too. + "test -x" rather than "test -f". + (gcc_cv_ld): Likewise. + (gcc_cv_nm): Heed program_prefix and program_transform_name. + (gcc_cv_objdump): Likewise. + * configure: Regenerate. + + 2002-03-27 Neil Booth + + * Makefile.in (attribs.o): Update. + * attribs.c: Include langhooks.h. + (decl_attributes): Use langhook. + * c-decl.c (insert_default_attributes): Rename. + * c-tree.h (c_insert_default_attributes): New. + * langhooks-def.h (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES):New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (struct lang_hooks): New hook. + * tree.h (insert_default_attributes): Remove. + objc: + * objc-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. + + 2002-03-27 Andreas Schwab + + * config/i386/i386.c (classify_argument): Also check for + QUAL_UNION_TYPE. + + 2002-03-27 Rainer Orth + + * doc/install.texi (alpha*-dec-osf*): Don't need --enable-libgcj + any more. + + Wed Mar 27 23:19:30 CET 2002 Jan Hubicka + + * i960.md (ret): Set PC. + (nonlocal_goto): Fix expander. + * builtins.c (epxand_builin_longjmp): Check that we've emitted + some jump or call. + + Wed Mar 27 23:11:35 CET 2002 Jan Hubicka + + * optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting + of libcall regions. + + Wed Mar 27 22:54:14 CET 2002 Zdenek Dvorak + + * cfgrtl.c (merge_blocks_nomove): Use set_block_for_insn instead of + assigning to BLOCK_FOR_INSN directly. + + Wed Mar 27 22:33:05 CET 2002 Jan Hubicka + + * i386.c (ix86_output_addr_diff_elt): Remove binutils bug workaround. + + 2002-03-27 Neil Booth + + * c-common.c (c_expand_expr): Fix prototype. + * c-common.h (c_expand_expr): Always declare, update. + * c-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. + * c-objc-common.c (c_objc_common_init): No global hook. + * expr.c (expand_expr): Use langhook. + * expr.h (enum expand_modifier): Conditionally declare. + * langhooks-def.h (lhd_expand_expr, LANG_HOOKS_EXPAND_EXPR): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.c (lhd_expand_expr): New. + * langhooks.h (struct lang_hooks): New hook. + * toplev.c (lang_expand_expr_t, lang_expand_expr): Delete. + (lang_independent_init): Don't default hook. + objc: + * objc-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. + + 2002-03-27 Richard Henderson + + PR target/6054 + * config/ia64/ia64.c (ia64_expand_call): Use pic patterns for + TARGET_CONST_GP. Simplify conditions. + + 2002-03-27 Richard Henderson + + * config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, + config/sparc/netbsd-elf.h, config/sparc/pbd.h, config/sparc/sol2.h, + config/sparc/vxsim.h (LOCAL_LABEL_PREFIX): Define. + + 2002-03-27 Danny Smith + + * config/i386/cygwin.h (TARGET_DLL, TARGET_WIN32, + TARGET_CYGWIN, TARGET_WINDOWS): Remove unused switches. + (MASK_DLL, MASK_WIN32, MASK_CYGWIN, MASK_WINDOWS): + Remove unnecessary masks. + (MASK_NOP_FUN_DLLIMPORT): Use an unused an bit. + (SUBTARGET_SWITCHES): Use empty masks for -mwin32, -mcygwin, + -mwindows, -mdll switches and their negations. + + 2002-03-27 Neil Booth + + * gcc-common.c (lang_mark_false_label_stack): Remove. + * ggc.h (lang_mark_false_label_stack): Similarly. + + 2002-03-26 Vladimir Makarov + + * pa/pa-pro-end.h (CPP_PREDEFINES): Add -D__pro__. + + * pa/lib2funcs.asm: Don't use .SPACE and .SUBSPACE if __pro__ + or __rtems_ is defined. + + 2002-03-26 Richard Henderson + + * config/alpha/alpha.c (alpha_emit_set_const): Add a REG_EQUAL note + if a non-trivial load was emitted. + (alpha_emit_set_const_1): Remove obsolete extension. Fix thinko + in high+extra+low case. + + 2002-03-26 Richard Henderson + + * config.gcc (sparc*-solaris): Use float_format=sparc. + + 2002-03-26 Richard Henderson + + * config/sparc/sparc.h (MAX_WCHAR_TYPE_SIZE): Don't define. + * config/sparc/linux-aout.h (MAX_WCHAR_TYPE_SIZE): Don't undef. + * config/sparc/linux.h, config/sparc/linux64.h: Likewise. + * config/sparc/sol2.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Redefine. + (WINT_TYPE_SIZE): Fix at 32. + + 2002-03-26 Richard Henderson + + * toplev.c (rest_of_compilation): Delay emit_initial_value_sets + until after eh landing pad generation. + * config/alpha/alpha.c (alpha_gp_save_rtx): Use gen_mem_addressof. + * config/alpha/alpha.md (exception_receiver_2): Only accept MEMs. + + 2002-03-26 Richard Henderson + + * expr.h (ADD_PARM_SIZE): One more convert for INC. + + 2002-03-26 Phil Edwards + + * gcc.c (cpp_options): Preserve relative ordering of -pedantic + and warning switches. + (cc1_options): Likewise. + + 2002-03-26 Hans Boehm + + * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR): + Restore more of the signal context. Set no_reg_stack_frame. + * config/ia64/unwind-ia64.c (unw_state_record): + Add no_reg_stack_frame, comments. + (uw_frame_state_for): Initialize when field to UNW_WHEN_NEVER. + (uw_update_context): Adjust bsp when unwinding from leaf, + but not signal frame. + + 2002-03-26 David Edelsohn + + * config/rs6000/aix51.h (WCHAR_TYPE): Define. + + 2002-03-26 Bob Wilson + + * config/xtensa/xtensa.c (xtensa_va_arg): Handle variable-sized types. + + 2002-03-26 Richard Earnshaw + + PR target/5621 + * arm.md (define_asm_attributes): Reapply patch of Thu Sep 9, 1999: + "Add a pool_range attribute", which was lost during the ARM/Thumb + merge. + + 2002-03-26 Bob Wilson + + * config/xtensa/xtensa.c (xtensa_valid_move): Allow move from + a register into the MAC16 accumulator. + + 2002-03-26 Andrew Cagney + + * doc/invoke.texi (Option Summary): Mention -Wswitch-enum. + (Warning Options): Document -Wswitch-enum. + * toplev.c (W_options): Add -Wswitch-enum. Update comment on + -Wswitch. + (warn_switch_enum): Define variables. + * flags.h (warn_switch_enum): Declare variables. + * stmt.c (expand_end_case_type): When warn_switch_enum / + -Wswitch-enum, perform switch checks. + Fix PR c/5044. + + 2002-03-26 Richard Earnshaw + + * arm.md (reload_mulsi3, reload_mulsi_compare0, reload_muladdsi) + (reload_mulsi_compare0_scratch, reload_muladdsi_compare0) + (reload_muladdsi_compare0_scratch): Delete. + + 2002-03-26 Loren J. Rittle + + * doc/install.texi (*-*-freebsd*): Update. + + 2002-03-26 Richard Henderson + + * expr.h (ADD_PARM_SIZE): Cast INC to ssizetype. + (SUB_PARM_SIZE): Cast DEC to ssizetype. + + * config/alpha/alpha.c (alpha_va_arg): Read MUST_PASS_IN_STACK + types from the normal argument frame. + + * config/sparc/sparc.c (function_arg_pass_by_reference): Pass + variable sized objects by reference. + (sparc_va_arg): Receive them by reference too. + + 2002-03-26 Hartmut Penner + + * config/s390/s390.c (s390_emit_epilogue): Change epilogue + code to not restoring global registers. + + 2002-03-26 Neil Booth + + * Makefile.in (ggc-common.o): Update. + * c-decl.c (lang_mark_tree): Rename c_mark_tree. + * c-lang.c (LANG_HOOKS_MARK_TREE): Redefine. + * c-tree.h (c_mark_tree): New. + * ggc-common.c: Include langhooks.h. + (gcc_mark_trees): Use new langhook. + * ggc-callbacks.c: Delete file. + * ggc.h (lang_mark_tree): Remove. + * langhooks-def.h (LANG_HOOKS_MARK_TREE): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (struct lang_hooks): New hook. + objc: + * objc-lang.c (LANG_HOOKS_MARK_TREE): Redefine. + + 2002-03-25 Zack Weinberg + + * doc/cpp.texi: Exclude entire Top node from printed manual. + Move option index after directive index. Insert page breaks + before GFDL and concept index. Index environment variables + with command line options. + * doc/cppenv.texi: Use @vtable for environment variable list. + Add paragraph explaining semantics of empty elements in path + variables. Exclude a cross-reference to Fishkill from the + manpage. Remove an unnecessary cross-reference of the entry + right above the referer. Don't use @anchor in text that goes + into manpage. + * doc/cppopts.texi: Cross-reference the environment variables + section, not the specific environment variable, for consistency. + + 2002-03-25 Richard Henderson + + * recog.c (peephole2_optimize): Distribute EH_REGION -1 notes + anywhere in the block. Don't refer to insns that have been + removed from the chain. Iterate backward through the new insns. + Don't refer to edges that have been removed. + + 2002-03-26 Alan Modra + + * combine.c (simplify_comparison ): Correct + test for overflow of constant. + + 2002-03-25 Richard Earnshaw + + PR target/2623 + * arm.md (loadhi_preinc, loadhi_predec, loadhi_shiftpreinc) + (loadhi_shiftpredec, loadhi-with-writeback peephole): Don't use + these patterns on arm_archv4. + + 2002-03-25 Danny Smith + + * config/i386/mingw32.h (WINT_TYPE): Define as "short unsigned + int". + + 2002-03-25 Zack Weinberg + + * toplev.c: Don't include setjmp.h. Kill float_handler_set, + float_handled, float_handler, float_signal, set_float_handler, + and do_float_handler. Set handler for SIGFPE to crash_signal. + * toplev.h: Don't prototype do_float_handler. + + * c-lex.c: Fold parse_float into lex_number. Make warning + about portability of hex float constants more informative, and + don't issue it on top of a syntax error. + * fold-const.c: Fold const_binop_1 and fold_convert_1 into + their callers. + * real.h: Define REAL_VALUE_ABS here... + * simplify-rtx.c: ... not here. Fold check_fold_consts, + simplify_unary_real, simplify_binary_real, and + simplify_binary_is2orm1 into their callers. + * tree.c: Fold build_real_from_int_cst_1 into caller. + + * doc/tm.texi: Document REAL_VALUE_ABS and REAL_VALUE_NEGATIVE. + + * tsystem.h: Include float.h here... + * libgcc2.c: ... not here. + + 2002-03-25 Nick Clifton + + Fixes for: PR bootstrap/3591, target/5676 + * config/mcore/mcore.h (CC1_SPEC): Define only if not already + defined. Do not disable exceptions or rtti. + * config/mcore/mcore-pe.h (CC1_SPEC): Define before including + mcore.h. Disable exceptions and rtti, since they are not + supported by EPOC. + + 2002-03-25 Neil Booth + + * c-decl.c (maybe_build_cleanup): Remove. + * expr.c (expand_expr): Use langhook. + * langhooks-def.h (lhd_return_null_tree, + LANG_HOOKS_MAYBE_BUILD_CLEANUP): New. + (LANGHOOKS_INITIALIZER): Update. + * langhooks.c (lhd_return_null_tree): New. + * langhooks.h (struct lang_hooks): New hook. + * tree-inline.c (initialize_inlined_parameters): Use langhook. + * tree.h (maybe_build_cleanup): Remove. + + 2002-03-25 Jakub Jelinek + + * regrename.c (build_def_use): Move recog_memoized + before extract_insn. + + 2002-03-25 Jakub Jelinek + + PR target/6043 + * expr.c (emit_group_store): Handle storing into CONCAT. + + 2002-03-25 Jakub Jelinek + + * regrename.c (build_def_use): Share RTL between MATCH_OPERATOR and + corresponding MATCH_DUP. + + 2002-03-24 Richard Henderson + + * unroll.c (unroll_loop): Zero label_map. + + * gcse.c: Include except.h. + * Makefile.in (gcse.o): Update. + + 2002-03-24 Richard Henderson + + * varasm.c (asm_emit_uninitialised): Revert 2002-03-14 change. + Do resolve_unique_section before shared data clause. + + 2002-03-24 Richard Henderson + + * config/alpha/elf.h (STARTFILE_SPEC): Use crtbeginT with -static. + + 2002-03-24 Richard Henderson + + * recog.c (peephole2_optimize): Split blocks when EH insns are + generated in the middle of a block. Do global life update if + zapped EH edges. + + 2002-03-24 Richard Henderson + + * mips.c (mips_function_value): Only promote_mode for non-libcalls. + + 2002-03-24 Neil Booth + + preprocessor/3951 + * gcc.c (cpp_options): Pass -MD through as -MD not -M -MF. + * cppinit.c (cpp_handle_option): Set no_ouput if -MD or -MMD. + (init_dependency_output): Don't make no_output decision here. + + 2002-03-24 Andrew Cagney + + * stmt.c (check_for_full_enumeration_handling): Remove tests of + warn_switch. Update description. + (expand_end_case_type): Call check_for_full_enumeration_handling + when warn_switch. + + 2002-03-24 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_autoinc_compatible_p): New function. + (m68hc11_split_move): Call it to see if the source and destination + operands use the same direction auto inc/dec mode, otherwise make the + source an offsetable memory operand and generate an add. + + 2002-03-24 Stephane Carrez + + * config/m68hc11/m68hc11.md ("*subsi3_zero_extendhi"): Allow address + register for operand 2. + ("*subsi3_zero_extendqi"): Likewise. + ("*iorhi3_gen"): Do the operation on the upper bits and then lower + bits so that it is compatible with a pop. + ("*andhi3_gen"): Likewise. + ("xorhi3"): Likewise. + + 2002-03-24 Neil Booth + + * cppinit.c (cpp_handle_option): Set warn_endif_labels if + -pedantic here... + (cpp_post_options): ... not here. + + 2002-03-24 Neil Booth + Aldy Hernandez + + Removal of separate preprocessor cpp0. + + * Makefile.in (GCC_PASSES, STAGESTUFF, LIBCPP_OBJS, + cpp0, install-common): Update. + * c-common.c (flag_preprocess_only): New. + (c_common_init): Preprocess for -E. + * c-common.h (flag_preprocess_only): New. + * c-decl.c (c_decode_option): Handle -E and -std=c++98. + * c-objc-common.c (c_init_decl_processing): Exit quickly + for NULL return from c_common_init. + * cpplib.h (cpp_preprocess_file): New. + * cppmain.c (main, general_init, pfile, progname): Remove. + (do_preprocessing): Rename cpp_preprocess_file, don't call + cpp_finish. Don't close stdout here. + (setup_callbacks): Update prototype. + * gcc.c (trad_capable_cpp, cpp_unique_options, default_compilers): + Update. + * tradcpp.c (main): Ignore -quiet. + objc: + * lang-specs.h (default_compilers): Preprocess with cc1obj. + + 2002-03-24 Richard Henderson + + PR optimization/5742 + * machmode.def: Add inner mode field to complex modes. + * config/mips/mips.c (mips_function_value): Always define. Add + new argument to handle libcalls. + * config/mips/mips.h (LIBCALL_VALUE): Use mips_function_value. + (FUNCTION_VALUE): Likewise. + * config/mips/abi64.h (FUNCTION_VALUE): Remove. + * config/mips/mips-protos.h: Update. + + 2002-03-23 Richard Henderson + + * config/sparc/sparc.c (sparc_emit_floatunsdi): New. + * config/sparc/sparc-protos.h: Update. + * config/sparc/sparc.md (floatunsdisf2, floatunsdidf2): New. + + 2002-03-23 Richard Henderson + + * config/sparc/gmon-sol2.c (internal_mcount): Assume either + _start or _init begins the text segment. + + 2002-03-23 David Edelsohn + + * config/rs6000/rs6000.h (RETURN_IN_MEMORY): Cast to HOST_WIDE_INT + not HOST_WIDEST_INT. + (RS6000_ARG_SIZE): Remove unsigned cast of int_size_in_bytes. + + 2002-03-23 Richard Earnshaw + + PR java/5489 + * arm.md (return, sibcall_epilogue): Pass const_true_rtx as the + operand argument to output_return_instruction. + * arm.c (arm_print_operand, case 'd'): If the operand is + const_true_rtx then just return. + (arm_print_operand, case 'D'): If the operand is const_true_rtx + then abort. + + 2002-03-23 Andrew Cagney + + * doc/invoke.texi (Option Summary): Mention -Wswitch-default. + (Warning Options): Document -Wswitch-default. + * toplev.c (W_options): Add -Wswitch-default. Update comment on + -Wswitch. + (warn_switch_default): Define variable. + (warn_switch): Update comment. + * flags.h (warn_switch_default): Declare variable. + (warn_switch): Update comment. + * stmt.c (expand_end_case): Check for and, when + warn_switch_no_default, warn of a missing default case. + + 2002-03-23 Alan Modra + + * real.h (N): Special case 128 bit doubles. + + * combine.c (simplify_comparison): When widening modes, ignore + sign extension on CONST_INTs. + + 2002-03-22 Bob Wilson + + * config/xtensa/xtensa.c (print_operand): Fix incorrect mode + passed to adjust_address. Fix comment formatting. + + + 2002-03-22 Zack Weinberg + + * real.h: Don't define REAL_INFINITY or REAL_IS_NOT_DOUBLE. + Always make REAL_VALUE_TYPE a struct containing an array of + HOST_WIDE_INT, not a double. Tidy up the code deciding how + big it is. Don't declare or use union real_extract. + + * emit-rtl.c (init_emit_once), varasm.c (immed_real_const_1, + decode_rtx_const, output_constant_pool), config/a29k/a29k.c + (print_operand), config/arm/arm.c (output_move_double), + config/arm/arm.md (consttable_4, consttable_8), + config/romp/romp.c (output_fpops), config/s390/s390.h + (ASM_OUTPUT_SPECIAL_POOL_ENTRY), config/xtensa/xtensa.c + (xtensa_output_literal): Don't use union real_extract. + + * config/dsp16xx/dsp16xx.c (print_operand), config/i860/i860.c + (sfmode_constant_to_ulong), config/ns32k/merlin.h + (PRINT_OPERAND), config/ns32k/ns32k.c (print_operand), + config/pdp11/pdp11.h (PRINT_OPERAND), config/we32k/we32k.h + (PRINT_OPERAND): Don't use local version of union + real_extract. + + * config/convex/convex.c (check_float_value), config/vax/vax.c + (vax_float_literal), config/m88k/m88k.md (divdf3), + config/dsp16xx/dsp16xx.md (fixuns_trunchfhi2), + config/pdp11/pdp11.c (output_move_quad): Don't do host + arithmetic on target floating point quantities. + + * config/a29k/a29k.md, config/dsp16xx/dsp16xx.c + (output_dsp16xx_float_const): Don't test HOST_FLOAT_FORMAT. + + * fold-const.c (fold), simplify-rtx.c (simplify_binary_real): + Use MODE_HAS_INFINITIES rather than #ifdef REAL_INFINITY. + + * real.c (earith): Test INFINITY rather than REAL_INFINITY; + NANS implies INFINITY, so can drop #ifdef NANS inside #ifndef + INFINITY. + * print-rtl.c (print_rtx): Disable code which needs + floating-point emulator. + * libgcc2.c: Include float.h and use DBL_MANT_DIG, + FLT_MANT_DIG, to define DF_SIZE and SF_SIZE, rather than + depending on HOST_FLOAT_FORMAT to be defined properly. + + * config/1750a/1750a.c (get_double, float_label): Delete. + (print_operand): Delete huge commented-out chunk. Use + REAL_VALUE_TO_DECIMAL. + * config/1750a/1750a-protos.h: Delete prototypes of deleted + functions. + * config/convex/convex.h: Always set TARGET_FLOAT_FORMAT to + IEEE_FLOAT_FORMAT. + * config/i370/i370.h (PRINT_OPERAND [TARGET_HLASM version]): + Use REAL_VALUE_TO_DECIMAL as ELF version does. + * config/m88k/m88k.c (real_power_of_2_operand, + legitimize_operand): Take the REAL_VALUE_TYPE and/or union + real_extract out of the union; run the input through + REAL_VALUE_TO_TARGET_DOUBLE, then plug the pair of longwords + from that into the union. + * config/pdp11/pdp11.c (output_move_double): Rearrange + parentheses to make automatic indenter happy. + + * doc/tm.texi (Cross-compilation): Rename node to "Floating + Point" and rewrite to describe current situation. Also adjust + documentation of REAL_VALUE_TO_TARGET_SINGLE and friends to + match code. + * doc/rtl.texi: Adjust cross reference. + + 2002-03-22 Bob Wilson + + * config/xtensa/xtensa-protos.h (non_acc_reg_operand): Remove. + (xtensa_valid_move, xtensa_preferred_reload_class): Define. + * config/xtensa/xtensa.c (non_acc_reg_operand): Remove. + (xtensa_valid_move, xtensa_preferred_reload_class): Define to + prevent use of sp as a reload register. + (xtensa_emit_move_sequence): Use xtensa_valid_move instead of + non_acc_reg_operand. + * config/xtensa/xtensa.h (PREDICATE_CODES): Remove non_acc_reg_operand. + (PREFERRED_RELOAD_CLASS): Move code to xtensa_preferred_reload_class. + * config/xtensa/xtensa.md (movsi_internal, movhi_internal, + movqi_internal): Use xtensa_valid_move instead of non_acc_reg_operand. + + 2002-03-22 Neil Booth + + * cpphash.h (struct cpp_reader): Remove mls_line and mls_col. + * cpplex.c (unterminated): Delete. + (parse_string): No string literal may extend over multiple + lines. Suppress the error when preprocessing assembly. + * cppmain.c (scan_translation_unit): Strings are single-line. + + * doc/cpp.texi: Update to match. + + 2002-03-22 Jakub Jelinek + + PR optimization/5854 + * config/m68hc11/m68hc11.h (CONST_OK_FOR_LETTER_VALUE_P): Use K for 0. + Shut up warnings. + (CONST_DOUBLE_OK_FOR_LETTER_P): Use G for 0.0. + (EXTRA_CONSTRAINT): Use S for non-push memory operand. + * config/m68hc11/m68hc11.c (m68hc11_split_move): Handle setting from + const0 if scratch register was not allocated. + (m68hc11_reload_operands, m68hc11_gen_lowpart, m68hc11_gen_highpart, + m68hc11_z_replacement): Replace gen_rtx (CONST_INT, VOIDmode, ...) + with GEN_INT (...). + (m68hc11_reorg): Compute BLOCK_FOR_INSN before reload_cse_regs. + * config/m68hc11/m68hc11.md: Replace gen_rtx (CONST_INT, VOIDmode, ...) + with GEN_INT (...) everywhere. Remove constraints in define_split + patterns. + (movdi_internal, movdf_internal, movsi_internal, movsf_internal): Don't + require scratch register for setting 0 into regs/non-pushable memory. + + 2002-03-22 Alexandre Oliva + + * config/mips/mips.h (MASK_RETURN_ADDR): Define. + (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define. + + 2002-03-22 Phil Edwards + + * cpplib.h (struct cpp_options): New member, warn_endif_labels. + * cppinit.c (cpp_create_reader): On by default. + (cpp_handle_option): Handle -W[no-]endif-labels. + (cpp_post_options): Also enable if -pedantic. + * cpplib.c (do_else): Use it. + (do_endif): Likewise. + * doc/cppopts.texi: Document new option. + * doc/invoke.texi: Document new option. + + 2002-03-22 Lars Brinkhoff + + * config/i386/i386.c, config/i386/i386.md: Change all occurences + of GEN_INT (trunc_int_for_mode (...)) to gen_int_mode (...). + + 2002-03-22 Alexandre Oliva + + * flow.c (calculate_global_regs_live): Clear aux fields of + ENTRY and EXIT. + + 2002-03-22 Jakub Jelinek + + * config/v850/v850.c (v850_reorg): Only call alter_subreg on + REG or MEM subregs, pass rtx * instead of rtx to it. + * config/i860/i860.c (output_delayed_branch, output_delay_insn): Pass + rtx * instead of rtx to alter_subreg. + * config/m32r/m32r.c (gen_split_move_double): Likewise. + * config/pj/pj.c (pj_output_rval): Likewise. + + 2002-03-22 Richard Henderson + + PR target/3177 + * config/ia64/ia64.h (CUMULATIVE_ARGS): Add int_regs. + (INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Update. + * config/ia64/ia64.c (ia64_function_arg_advance): Set int_regs. + (ia64_expand_prologue): Look at int_regs, not words, for number + of incomming int regs. + + 2002-03-22 Andrew MacLeod + + * expr.c (expand_expr): A RESULT_DECL is part of a call. + + Fri Mar 22 16:30:42 CET 2002 Jan Hubicka + + * toplev.c (flag_loop_optimize, flag_crossjumping): + New static variables. + (rest_of_compilation): Conditionalize crossjumping and + loop optimizer. + (parse_options_and_default_flags): Default loop_optimize and + crossjumping. + (lang_independent_options): Add -fcrossjumping and -floop-optimize + * invoke.texi (crossjumping, loop-optimize): Document. + + 2002-03-22 Richard Sandiford + + * real.c (eiisneg): Move outside #ifdef NANS. + + Fri Mar 22 12:08:36 CET 2002 Jan Hubicka + + * cfgcleanup.c (outgoing_edges_math): Fix condition; relax + frequencies match; avoid match on different loop depths. + (try_crossjump_to_bb): Kill tests that no longer brings time + savings. + * cfgrtl.c (force_nonfallthru_and_redirect): Fix loop_depth + updating code. + (split_edge): Likewise. + + * flow.c (update_life_info_in_dirty_blocks): Fix uninitialized + variable. + + * Makefile.in (cfgrtl): Add insn-config.h depenendency. + * cfgrtl.c: Include insn-config.h + (split_block) Dirtify block in presence of conditional execution + + 2002-03-22 Richard Sandiford + + * config/mips/abi64.h (SETUP_INCOMING_VARARGS): Undefine. + * config/mips/mips-protos.h (mips_setup_incoming_varargs): Declare. + (function_arg): Constify CUMULATIVE_ARGS. + (function_arg_partial_nregs, function_arg_pass_by_reference): Likewise. + * config/mips/mips.h (UNITS_PER_FPVALUE): Zero when TARGET_SOFT_FLOAT. + (UNITS_PER_DOUBLE): New macro. + (SETUP_INCOMING_VARARGS): Define. Use mips_setup_incoming_varargs. + (CUMULATIVE_ARGS): Reformat. Remove num_adjusts workaround and + last_arg_fp field. Replace arg_words and fp_arg_words with gp_regs, + fp_regs and stack_words. + (EABI_FLOAT_VARARGS_P): New macro. + * config/mips/mips.c (struct mips_arg_info): New. + (mips_arg_info): New function. + (function_arg_advance): Use it. Add adjustment instructions here + rather than in function_arg. + (function_arg): Constify CUMULATIVE_ARGS. Use mips_arg_info. Check + for VOIDmode at the beginning of the function. + (function_partial_nregs): Constify CUMULATIVE_ARGS. Use mips_arg_info. + (function_arg_pass_by_reference): Likewise. + (mips_setup_incoming_varags): New, largely based on old abi64.h code. + (mips_build_va_list): Test EABI_FLOAT_VARARGS_P. + (mips_va_start): Likewise. Use the new stack_words field of + CUMULATIVE_ARGS to set up overflow area. Reformat. + (mips_va_arg): Test EABI_FLOAT_VARARGS_P. Unify EABI handling of + doubles and other types, aligning the overflow pointer for non-doubles + too. Remove some code duplication. Replace hard-coded constants. + + 2002-03-22 Richard Sandiford + + * config/mips/mips.h (FUNCTION_ARG_REGNO_P): Simplify. + (CLASS_UNITS): Undefine. + (CLASS_MAX_NREGS): Use FP_INC. + * config/mips/mips.c (compute_frame_size): Likewise. + (override_options): Use FP_INC and UNITS_PER_FPVALUE. + + 2002-03-22 Neil Booth + + * cpplex.c (parse_identifier_slow): Rename parse_slow, adjust + prototype, and handle lexing numbers and identifiers. + (parse_identifier): Update to new form of parse_slow. + (parse_number): Fast path only, use parse_slow otherwise. + (_cpp_lex_direct): Update calls to parse_number. + + 2002-03-21 DJ Delorie + + * bb-reorder.c (make_reorder_chain_1): Protect against + when redundant edges are omitted. + * predict.c (dump_prediction): Likewise. + + 2002-03-21 Richard Henderson + + PR target/5996 + * fixinc/inclhack.def (solaris_stdio_tag): New. + * fixinc/fixincl.x: Regenerate. + + 2002-03-21 Eric Botcazou + + PR c/5597 + * c-typeck.c (process_init_element): Flag non-static + initialization of a flexible array member as illegal. + + 2002-03-22 Alan Modra + + * config/rs6000/t-linux64: New. + * config.gcc (powerpc64-*-linux* ): Drop t-ppcos and + t-ppccomm. Use t-rs6000 and t-linux64. + (powerpc64-*-gnu* ): Likewise. + * mklibgcc.in (SHLIB_MKMAP_OPTS): New variable. + * mkmap-symver.awk (dotsyms): If set, output .foo as well as foo. + * Makefile.in (SHLIB_MKMAP_OPTS): Pass to mklibgcc. + + 2002-03-21 Aldy Hernandez + + * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check + flag_really_no_inline instead of optimize == 0. + + * c-objc-common.c (c_cannot_inline_tree_fn): Same. + + * cp/tree.c (cp_cannot_inline_tree_fn): Same. + + * flags.h (flag_really_no_inline): New. + + * c-common.c (c_common_post_options): Initialize + flag_really_no_inline. + + * toplev.c (flag_really_no_inline): New. + + 2002-03-21 Jakub Jelinek + + * config/avr/avr.md (length): Fix length computation for + conditional branches. + + 2002-03-21 Neil Booth + + * Makefile.in (fold-const.o, stor-layout.o, stmt.o, + sdbout.o, profile.o): Update. + * c-common.c (c_common_nodes_and_builtins): Use pushdecl + langhook. + * c-common.h (gettags): Move here from tree.h. + * c-tree.h (pushdecl, pushlevel, poplevel, set_block, + insert_block, getdecls, kept_level_p, global_bindings_p): New. + * dbxout.c (dbxout_init): Use getdecls langhook. + * expr.c (expand_expr): Use insert_block langhook. + * fold-const.c: Include langhooks.h. + (fold_range_test, fold_binary_op_with_conditional_arg, + fold): Use global_bindings_p langhook. + * integrate.c (expand_inline_function): Use insert_block langhook. + * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, + LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, + LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, + LANG_HOOKS_GETDECLS): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p + langhook. + * langhooks.h (struct lang_hooks_for_decls): New. + (struct lang_hooks): Update. + * profile.c: Include langhooks.h. + (output_func_start_profiler): Use new langhooks. + * sdbout.c: Include langhooks.h. + (sdbout_init, sdbout_finish): Use getdecls langhook. + * stmt.c: Include langhooks.h. + (expand_fixup, fixup_gotos): Use new langhooks. + * stor-layout.c: Include langhooks.h. + (variable_size): Use global_bindings_p langhook. + * toplev.c (compile_file): Use getdecls langhook. + * tree-inline.c (remap_block): Use insert_block langhook. + * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, + insert_block, getdecls, kept_level_p, global_bindings_p): Remove. + + 2002-03-21 Richard Henderson + + * config/rs6000/rs6000.c (rs6000_select_rtx_section): Put symbolic + constants in .data when -fpic. + + 2002-03-21 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Use GNU/Linux instead of Linux + where appropriate. + + 2002-03-21 Tom Tromey + + * config/i386/sol2.h (ASM_QUAD): Undef. Fixes PR bootstrap/5948. + + Thu Mar 21 09:50:48 2002 Richard Kenner + + * config/ia64/ia64.c (hfa_element_mode, case ARRAY_TYPE): Recurse. + + * expr.c (emit_group_store): Don't copy const0_rtx to a CONCAT. + + 2002-03-21 Eric Botcazou + Richard Henderson + + PR c/5354 + * c-common.c (c_expand_expr): Preserve result of a statement + expression if needed. + + 2002-03-21 Jakub Jelinek + + PR bootstrap/4195 + * genrecog.c (maybe_both_true_mode): Remove. + (maybe_both_true_2, write_switch): Revert 2001-07-17 changes. + * machmode.def (Pmode): Likewise. + + Thu Mar 21 01:55:06 EST 2002 John Wehle (john@feith.com) + + * alias.c: (nonlocal_mentioned_p): Use for_each_rtx. + (nonlocal_mentioned_p_1): New function. + (nonlocal_referenced_p, nonlocal_referenced_p_1): Likewise. + (nonlocal_set_p, nonlocal_set_p_1): Likewise. + (mark_constant_function): Recognize pure functions. + * rtl.h (global_reg_mentioned_p): New prototype. + * rtlanal.c (global_reg_mentioned_p, + global_reg_mentioned_p_1): New function. + + 2002-03-21 Rainer Orth + + * fixinc/inclhack.def (alpha_assert): Fix assert macro in Tru64 + UNIX assert.h. + * fixinc/fixincl.x: Regenerate. + + 2002-03-20 Jason Merrill + + * config/i386/cygwin.h (DWARF2_UNWIND_INFO): Define to 0. + + 2002-03-20 Michael Meissner + + * doc/invoke.texi (Optimize Options): Document that -O2 sets + -fstrict-aliasing. + + 2002-03-20 Bob Wilson + + * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Emit a + ".literal_position" directive before the constant pool. + + 2002-03-20 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Update Geoffrey Keating. + Add Craig Rodrigues. + Add Brad Lucier to testers. + + 2002-03-20 Jakub Jelinek + + PR target/4792 + * config/arc/arc.md (movsicc, movdicc, movsfcc, movdfcc): Add mode + to if_then_else. + (movsicc_insn, movdicc_insn, movsfcc_insn, movdfcc_insn): Likewise. + * config/arc/arc.c (arc_final_prescan_insn): Use extract_insn_cached + instead of insn_extract. + + 2002-03-20 Jakub Jelinek + + PR bootstrap/4192 + * config/fr30/fr30.md (jump): Remove clobber of fixed register. + + * genemit.c (output_added_clobbers_hard_reg_p): Only output return + stmt if some case has been output. + + 2002-03-20 Jakub Jelinek + + PR c/5972 + * config/i386/i386.md (movdicc_c_rex64, movsicc_noc, movhicc_noc, + movsfcc_1, movdfcc_1): Add %O2. + * config/i386/i386.c (print_operand): Handle %ON. + Print . before float condition codes in Sun as cmov syntax. + * config/i386/sol2.h (CMOV_SUN_AS_SYNTAX): Define for Sun as. + * config.gcc (i[34567]86-*-solaris2*): Remove comment which is + no longer true. + + 2002-03-20 Philip Blundell + + * config/arm/arm.c (arm_output_epilogue): Don't generate separate + return instruction if PC was popped. + + 2002-03-20 Bob Wilson + + * config/xtensa/xtensa.md: Remove unused type attributes. + (adddi_carry, subddi_carry): Change type attribute to "multi". + + 2002-03-19 Dale Johannesen + + PR optimization/5999, middle-end/5731 + * expr.c (expand_expr) [RDIV_EXPR]: Only convert real divisions into + multiplications by reciprocals. + + 2002-03-20 Neil Booth + + * Makefile.in: Update. + * c-common.c: Include langhooks.h. + (inline_forbidden_p): Use new hook. + * diagnostic.c: Include langhooks.h. + (format_with_decl, announce_function, + default_print_error_function): Use new hook. + * dwarf2out.c (dwarf2_name): Use new hook. + * function.c: Include langhooks.h. + (init_function_start): Use new hook. + * langhooks-def.h (lhd_decl_printable_name): New. + (LANGHOOKS_DECL_PRINTABLE_NAME): New. + (LANGHOOKS_INITIALIZER): Update. + * langhooks.c (lhd_decl_printable_name): New. + * langhooks.h (struct lang_hooks): New hook. + * toplev.c (decl_name, decl_printable_name): Remove. + (open_dump_file): Use new hook. + (process_options): Remove old hook. + * tree.h (decl_printable_name): Remove. + objc: + * objc-act.c (objc_init): Remove old hook. + (objc_printable_name): Export. + * objc-act.h (objc_printable_name): New. + * objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. + + 2002-03-19 Jim Blandy + + * c-lex.c (cb_file_change): Pass the #inclusion's line number to + the start_source_file debug hook, not the current line number. + + 2002-03-19 Richard Henderson + + * flow.c (EH_USES): Provide default. + (calculate_global_regs_live): Use it for EH edges and noreturn calls. + * doc/tm.texi (EH_USES): New. + + * config/ia64/ia64.c (ia64_eh_uses): New. + * config/ia64/ia64-protos.h: Update. + * config/ia64/ia64.h (EH_USES): New. + + 2002-03-19 Richard Henderson + + * varasm.c (output_constant_def): Fix stupid typo. + + 2002-03-19 Richard Henderson + + PR 5879 + * except.c (current_function_has_exception_handlers): New. + * except.h: Declare it. + * sibcall.c (optimize_sibling_and_tail_recursive_call): Use it. + Combine tests that disable all sibcalls for the function. + + 2002-03-19 Olivier Hainque + + * varasm.c (output_constant_def): Don't call ENCODE_SECTION_INFO + for INTEGER_CST. + + 2002-03-19 Richard Henderson + + PR 5977, 5991 + * config/ia64/ia64.c: Revert 2002-03-01 patch. + * config/ia64/ia64.h (INIT_EXPANDERS): New. + + 2002-03-19 Jim Blandy + + * cppmacro.c (cpp_macro_definition): Emit a space after the macro + name, even if the replacement list contains no tokens, as required + by Dwarf. + + 2002-03-19 Jason Merrill + + * varasm.c (globalize_decl): Get the name from the RTL, not + DECL_ASSEMBLER_NAME. + + * Makefile.in (LIBGCC2_DEBUG_CFLAGS): Set to -g. + + 2002-03-19 Bob Wilson + + * config/xtensa/xtensa.md (adddi3, adddi_carry, subdi3, + subdi_carry): Define. + + 2002-03-19 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_override_options): Only warn + about -fpic/-fPIC if extra_warnings set. + + 2002-03-19 David Edelsohn + + * expr.c (expand_expr): Sign-extend CONST_INT generated from + TREE_STRING_POINTER. + * fold-const.c (fold): Delete #if 0 ARRAY_REF case. + + Tue Mar 19 14:12:32 2002 Richard Kenner + + * config/sparc/sparc.h (CAN_ELMINIATE): Can only eliminate FP + in favor of SP if FRAME_POINTER_REQUIRED is false. + + 2002-03-19 Lars Brinkhoff + + * emit-rtl.c (gen_int_mode): New function. + * rtl.h: Prototype for it. + * combine.c (make_extraction, simplify_comparison), expmed.c + (store_bit_field, expand_mult_highpart, expand_divmod), expr.c + (convert_modes, store_field), optabs.c (expand_fix), + simplify-rtx.c (neg_const_int, simplify_unary_real), + + * config/rs6000/rs6000.c, config/rs6000/rs6000.md: + Use it instead of GEN_INT (trunc_int_for_mode (...)). + + 2002-03-19 Jakub Jelinek + + PR c/5656 + * langhooks.h (struct lang_hooks_for_tree_inlining): Add + convert_parm_for_inlining. + * c-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): + Define. + * langhooks-def.h: Likewise. + * objc/objc-lang.c: Likewise. + * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): New + function. + * tree-inline.c (initialize_inlined_parameters): + Call convert_parm_for_inlining lang hook if needed. + * c-typeck.c (c_convert_parm_for_inlining): New function. + * c-tree.h (c_convert_parm_for_inlining): Add prototype. + + 2002-03-18 Mark Mitchell + + * calls.c (precompute_arguments): Do not assume that temporaries + can be destroyed after expanding the argument. + (expand_call): Likewise. + + 2002-03-15 Eric Christopher + + * config/mips/mips.md (movdf_internal2): Add two new move constraints. + Fix register preference on last change. + * config/mips/mips.c (mips_return_in_memory): New function. + * config/mips/mips.h (RETURN_IN_MEMORY): Use. + * config/mips/mips-protos.h: Declare. + * config/mips/abi64.h (RETURN_IN_MEMORY): Remove. Add to above. + * config/mips/elf64.h: Add #ifndef/#endif brackets around defaults. + + 2002-03-18 Alexandre Oliva + + * config/mips/mips.md (andsi3) [TARGET_MIPS16]: Force operand 1 to + a register too. + (anddi3, iorsi3): Likewise. + + * config/mips/mips.h (ENCODE_SECTION_INFO) [TARGET_MIPS16]: Don't + use %gprel for symbols that are going to be placed in linkonce + sections. + + * config/mips/mips.h (ELIMINABLE_REGS): Can't eliminate + RETURN_ADDRESS_POINTER_REGNUM to $ra. + (CAN_ELIMINATE): Only eliminate it to $sp if a frame pointer is + not needed. Disregard leaf_function_p(). + (INITIAL_ELIMINATION_OFFSET): Adjust for elimination of rap to + mips16 frame pointer. + * config/mips/mips.md (store ra): Only to small SP offsets. + 2001-08-22 Graham Stott + * config/mips/mips.h (RETURN_ADDR_RTX): For a leaf function + return a REG rtx for the return address register. + + 2002-03-18 Bob Wilson + + * config/xtensa/xtensa.h (GO_IF_MODE_DEPENDENT_ADDRESS): Treat + constant-pool addresses as "mode-dependent". + (GO_IF_LEGITIMATE_ADDRESS): Rename macro arguments. + + 2002-03-18 Jakub Jelinek + + PR target/5740 + * expr.c (emit_group_load): Use extract_bit_field if + needed for CONCAT arguments. + + 2002-03-18 Richard Earnshaw + + PR target/4863 + * arm.md (tablejump): Make this a define_expand. For PIC add the + offset to the base of the table. + (thumb_tablejump): Matcher for Thumb tablejump insn. + * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Output thumb entries + as the difference of two labels. + * config/arm/aof.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. + * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Only put ARM jump + tables in the code. + * config/arm/coff.h (JUMP_TABLES_IN_TEXT_SECTION): Likewise. + * arm.c (get_jump_table_size): If the table is not in the text + section, return zero. + + 2002-03-18 Bernd Schmidt + + * config/arm/arm.c (arm_gen_movstrqi): Use gen_lowpart instead + of gen_rtx_SUBREG. + (arm_reload_out_hi): Use gen_lowpart instead of + gen_rtx_SUBREG to access QImode components. + * config/arm/arm.md: Disable zero_extend split for QImode + subregs in BIG_ENDIAN mode. + (storehi_bigend): Match use of least significant byte. + (storeinthi): Remove extraneous SUBREG. + Add missing construction of operands[2]. + (movhi): Use gen_lowpart in place of gen_rtx_SUBREG. + (movqi): Use gen_lowpart in place of gen_rtx_SUBREG. + Replace gen_rtx (SUBREG) with gen_rtx_SUBREG. + + 2002-03-18 Aldy Hernandez + + * config/rs6000/rs6000.h (PREDICATE_CODES): Add PARALLEL to + any_operand. + + 2002-03-17 Richard Henderson + + * config/alpha/alpha.c (alpha_emit_set_const_1): Build add insns + explicitly. + + 2002-03-17 Hans-Peter Nilsson + + * config/mmix/mmix.md ("fixuns_truncdfdi2"): Use (unsigned_fix:DI + (unsigned_fix:DF op1)), not (unsigned_fix:DI (fix:DF op1)). + + 2002-03-17 Kaveh R. Ghazi + + * ifcvt.c (dead_or_predicable): Fix uninitialized variable. + + * predict.c (estimate_bb_frequencies): Delete unused variables. + + 2002-03-17 Richard Henderson + + * config/ia64/ia64.c (ia64_attribute_table): Move before + targetm definition. Make static. + + 2002-03-17 Neil Booth + + * c-common.h (yyparse, c_common_parse_file): New. + * c-lang.c: Include c-common.h. + (LANG_HOOKS_PARSE_FILE): Redefine. + * c-lex.c: Include c-common.h. + (yyparse): Rename c_common_parse_file. Call yyparse. + * c-parse.in (yyparse): Remove macro. + * c-tree.h (yyparse_1): Remove. + * langhooks-def.h (LANG_HOOKS_PARSE_FILE): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (struct lang_hoooks): New hook parse_file. + * toplev.c (compile_file): Use parse_file hook. + * tree.h (yyparse): Remove. + * objc/objc-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. + + 2002-03-17 Hans-Peter Nilsson + + * config/mmix/mmix.md ("truncdfsf2"): Correct operator is + float_truncate, not fix. + ("*truncdfsf2_real"): Ditto. + ("*nonlocal_goto_receiver_expanded"): Fix output template formatting. + + * config/mmix/mmix.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Don't define. + + 2002-03-16 Alexandre Oliva + + * config/mips/mips.h (CAN_ELIMINATE): Don't eliminate rap to $fp + (s8), but rather HARD_FRAME_POINTER_REGNUM. Add parentheses + where appropriate. Make the second reference to + leaf_function_p a function call, as intended. Reindented. + + * config/mips/mips.h (ISA_HAS_COND_TRAP): Not available on MIPS16. + * config/mips/mips.md (trap) [TARGET_MIPS16]: Emit `break 0'. + + * config/mips/mips.md (addsi3, adddi3): Use scratch register to + add register to non-constant into sp. + + * config/mips/mips-protos.h (embedded_pic_fnaddr_reg): New. + * config/mips/mips.h (embedded_pic_fnaddr_rtx): Lose. + (mips16_gp_pseudo_rtx): Lose. + (INIT_EXPANDERS): Deleted. + * config/mips/mips.c (mips_init_machine_status): New. + (mips_free_machine_status): New. + (mips_mark_machine_status): New. + (override_options): Set them. + (embedded_pic_fnaddr_rtx, mips16_gp_pseudo_rtx): Moved to... + (struct machine_function): ... new. Replaced all references. + (mips_add_gc_roots): Don't mark them. + (embedded_pic_fnaddr_reg): New, extracted from... + (embedded_pic_offset): ... here. + * config/mips/mips.md (movdi): Call embedded_pic_fnaddr_reg. + (movsi): Likewise. + + 2002-03-16 Neil Booth + + * cppinit.c: Revert -MD removal. + + 2002-03-16 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_override_options): Don't use + soft registers by default for 68HC12. + (m68hc11_conditional_register_usage): Don't use Z register for 68HC12 + when compiling with -fomit-frame-pointer. + (expand_prologue): Use push/pop to allocate 4-bytes of locals on 68HC12. + (expand_epilogue): Likewise. + (m68hc11_gen_rotate): Use exg when rotating by 8. + + 2002-03-16 Stephane Carrez + + * config/m68hc11/m68hc11-protos.h (ix_reg): Declare. + * config/m68hc11/m68hc11.md ("addsi3"): Use general_operand for sources. + (splits): Remove unused add splits. + ("*addhi3_68hc12"): Tune constraints. + ("addhi_sp"): Try to use X instead of Y in all cases and if the + constant fits in 8-bits and D is dead use abx/aby instructions. + ("*addhi3"): Remove extern declaration of ix_reg. + ("*subsi3"): Optimize and provide new split. + ("subhi3"): Cleanup. + ("*subhi3_sp"): Avoid saving X if we know it is dead. + (arith splits): For 68hc12 save the address register on the stack + and do the arithmetic operation with a pop. + + 2002-03-16 Stephane Carrez + + * config/m68hc11/m68hc11.md ("*movqi_68hc12"): Fix constraints, avoid + allocating QImode in address registers. + ("*movqi_m68hc11"): Likewise. + + Sat Mar 16 12:57:28 CET 2002 Jan HUbicka + + * cfgcleanup.c (cleanup_cfg): Fix updating of liveness. + + 2002-03-16 Neil Booth + + * cppinit.c (print_help): Display -MD and -MMD. + Don't display usage string. Update assertion syntax and + typo. + (COMMAND_LINE_OPTIONS): Remove OPT_MD, OPT_MMD. + (cpp_handle_option): Update. + + 2002-03-15 Chris Demetriou + + * config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): Provide an + MEABI case for each definition of SUBTARGET_CPP_SIZE_SPEC, + and define it so that regardless of target CPU size, + __SIZE_TYPE__ and __PTRDIFF_TYPE__ are defined in terms + of "int" rather than "long." + + 2002-03-15 Richard Henderson + + * config/alpha/alpha.c (alpha_va_arg): Manipulate the type + size as a tree. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/m68hc11.md ("tstqi_1"): Try to use ldab instead of tst. + ("tstqi" split): Avoid using memory for tstqi on address register. + (splits): Remove constraints. + ("cmphi_1_hc12"): New from "cmphi_1" and tuned for 68HC12. + ("cmpdf", "cmpsf"): Remove since not used. + ("*tbeq", "*tbne", "*tbeq8", "*tbne8"): Also look in cc_status.value2. + (peephole2): New peepholes to optimize tstqi and pre inc/dec addressing. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/m68hc11.md ("negsi2"): Optimize inline case. + ("neghi2"): Tighten constraints. + ("one_cmplsi2"): Optimize and simplify split. + * config/m68hc11/larith.asm (__negsi2): Likewise for library. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/m68hc11.md ("logicalsi3_zexthi"): Fix constraints + and split of AND operation to clear the upper bits. + ("*logicalsi3_zextqi"): Likewise. + ("*logicallhi3_zexthi_ashift8"): Likewise. + ("*logicalsi3_silshr16"): Likewise. + ("logicalsi3_silshl16"): Likewise. + ("anddi3", "iordi3", "xordi3" splits): Remove constraints. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_symbolic_p): New function. + (m68hc11_indirect_p): New function. + (m68hc11_override_options): Must set MASK_NO_DIRECT_MODE for 68HC12. + (m68hc11_gen_highpart): Use TARGET_NO_DIRECT_MODE instead of + TARGET_M6812. + (asm_print_register): Likewise. + * config/m68hc11/m68hc11-protos.h (m68hc11_symbolic_p): Declare. + (m68hc11_indirect_p): Declare. + * config/m68hc11/m68hc11.h (EXTRA_CONSTRAINT): New constraint 'R', 'Q'. + (TARGET_NO_DIRECT_MODE, TARGET_RELAX): New. + (TARGET_SWITCHES): New option -mrelax. + * config/m68hc11/m68hc11.md ("andsi3"): Allow soft register for + destination. + ("iorsi3", "xorsi3"): Likewise. + ("andhi3", "andqi3", "iorhi3", "iorqi3"): Use a define_expand. + ("*andhi3_mem"): New to handle destination in memory with bclr + and a scratch register. + ("*andqi3_mem", "*iorhi3_mem", "*iorqi3_mem"): Likewise. + ("*andhi3_const"): New when operand2 is constant. + ("*andqi3_const", "*iorhi3_const", "*iorqi3_const"): Likewise. + ("*andhi3_gen"): Cleanup of the old "andhi3". + ("*andqi3_gen", "*iorhi3_gen", "*iorqi3_gen"): Likewise. + ("xorqi3"): Update constraints. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_small_indexed_indirect_p): Look + for reg_equiv_memory_loc when the operand is a register that does + not get a hard register (stack location). + (tst_operand): After reload, accept all memory operand. + (symbolic_memory_operand): Fix detection of symbolic references. + * config/m68hc11/m68hc11.h (VALID_CONSTANT_OFFSET_P): For 68HC12 + accept symbols and any constant. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/m68hc11.c (emit_move_after_reload): Add a REG_INC + note on the insn that sets the soft frame register. + (must_parenthesize): ix and iy are also reserved names. + (print_operand_address): One more place where parenthesis are required + to avoid confusion with register names. + (m68hc11_gen_movhi): Allow push of stack pointer. + (m68hc11_check_z_replacement): Fix handling of parallel with a + clobber. + (m68hc11_z_replacement): Must update the REG_INC notes to tell what + the replacement register is. + * config/m68hc11/m68hc11.h (REG_CLASS_CONTENTS): Switch Z_REGS + and D8_REGS classes. + (MODES_TIEABLE_P): All modes are tieable except QImode. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/larith.asm (___adddi3): Optimize saving of result. + (___subdi3): Likewise. + (__mulsi3, __mulhi32): Avoid using _.tmp scratch location. + (__map_data_section): Optimize 68hc11 case. + + 2002-03-15 Stephane Carrez + + * config/m68hc11/m68hc11.c (m6812_cost): Make cost of add higher + than a shift to avoid adding a register with itself. + (m68hc11_memory_move_cost): Take into account NO_REGS. + (m68hc11_register_move_cost): Update and use memory move cost + for soft registers. + (m68hc11_address_cost): Make cost of valid offset not 0 so that + it gives more opportunities to cse to optimize. + * config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Pass the mode. + * config/m68hc11/m68hc11-protos.h (m68hc11_register_move_cost): Update. + + 2002-03-15 Mark Mitchell + + * c-common.c (statement_code_p): Handle CLEANUP_STMT. + * c-common.def (CLEANUP_STMT): New tree node. + * c-common.h (CLEANUP_DECL): New macro. + (CLEANUP_EXPR): Likewise. + * c-semantics.c (expand_stmt): Handle CLEANUP_STMT. + * expr.c (expand_expr): Tidy. + * tree-dump.c (dequeue_and_dump): Handle CLEANUP_STMT. + * tree-inline.c (initialize_inlined_parameters): Clean up + new local variables. + + 2002-03-15 Jakub Jelinek + + PR bootstrap/4128 + * config/sparc/sparc.c (gen_v9_scc): Move early clobber test + before movrXX only, use reg_overlap_mentioned_p. + Only special case NE if just one insn can be generated. + + 2002-03-15 Jason Merrill + + * varasm.c (assemble_variable): Call resolve_unique_section before + checking DECL_SECTION_NAME. Use zeros for a decl with DECL_INITIAL + of error_mark_node. + + 2002-03-15 Richard Earnshaw + + PR target/5170 + * arm.md (split pattern for thumb shiftable immediates): Add comment + explaining non-obvious test. + + 2002-03-15 Richard Earnshaw + + PR target/5712 + * arm.md (movaddr, movaddr_insn): Delete. + + 2002-03-15 Jason Merrill + + * toplev.c (wrapup_global_declarations): Clarify variable handling. + -fkeep-static-consts doesn't apply to comdats. + + 2002-03-14 Richard Henderson + + * c-decl.c: Include c-pragma.h. + (start_decl, start_function): Invoke maybe_apply_pragma_weak. + (finish_function): Tidy. + * c-pragma.c: Include c-common.h. + (pending_weaks, apply_pragma_weak, maybe_apply_pragma_weak): New. + (handle_pragma_weak): Use them. + (init_pragma): Register pending_weaks. + * c-pragma.h (maybe_apply_pragma_weak): Declare. + * print-tree.c (print_node): Print DECL_WEAK. + * varasm.c (mark_weak_decls): Remove. + (remove_from_pending_weak_list): Remove. + (add_weak): Remove. + (asm_emit_uninitialised): Call globalize_decl for weak commons. + (weak_decls): Make a tree_list. + (declare_weak): Cons weak_decls directly. + (globalize_decl): Remove weak_decls elements directly. + (weak_finish): Simplify weak_decls walk. Don't weaken unused + symbols. Don't pretend to handle aliases. + (init_varasm_once): Update weak_decls registry. + * Makefile.in: Update dependencies. + + 2002-03-14 Richard Henderson + + PR target/5312 + * config/ia64/ia64.c: Include tm_p.h last. + (gen_nop_type): Remove duplicate definition. + (cycle_end_fill_slots): Set sched_data for second L slot. + (maybe_rotate): Call cycle_end_fill_slots to fill in nop slots. + (nop_cycles_until): Fix typos. + + 2002-03-15 Jakub Jelinek + + PR optimization/5891 + * unroll.c (copy_loop_body) [CALL_INSN]: Copy SIBLING_CALL_P flag. + + 2002-03-14 David Mosberger , Hans Boehm + + * config/ia64/unwind-ia64.c: Handle copy_state and label_state + descriptors correctly. + + 2002-03-14 Michael Meissner + + * params.def (PARAM_MAX_UNROLLED_INSNS): New macro, default to + 100, allowing MAX_UNROLLED_INSNS to be overridden. + + * params.h (MAX_UNROLLED_INSNS): Define so it can be overridden by + --param. + + * unroll.c (params.h): Include. + (MAX_UNROLLED_INSNS): Delete, now in params.h. + + * doc/invoke.texi (--param max-unroll-insns): Document. + + * Makefile.in (unroll.o): Add $(PARAMS_H) dependency. + + 2002-03-14 Richard Earnshaw + + * arm.md: Fix warnings about constraints in peepholes and splits. + + 2002-03-14 Zack Weinberg + + * cpphash.h (struct lexer_state): Remove line_extension member. + * cpplib.c (dequote_string, do_linemarker): New functions. + (linemarker_dir): New data object. + (DIRECTIVE_TABLE): No longer need to interpret #line in + preprocessed source. Delete obsolete comment about return + values of handlers. + (end_directive, directive_diagnostics, _cpp_handle_directive): + Don't muck with line_extension. + (directive_diagnostics): No need to issue warnings for + linemarkers here. + (_cpp_handle_directive): Issue warnings for linemarkers here, + when appropriate. Dispatch linemarkers to do_linemarker, not + do_line. + (do_line): Code to handle linemarkers split out to do_linemarker. + Convert escape sequences in filename argument, both places. + + * cppmacro.c (quote_string): Rename cpp_quote_string and + export. All callers changed. + * cpplib.h (cpp_quote_string): Prototype. + * cppmain.c (print_line): Call cpp_quote_string on to_file + before printing it. + + * doc/cpp.texi: Document that escapes are now interpreted in + #line and in linemarkers, and that non-printing characters are + converted to octal escapes when linemarkers are generated. + + Thu Mar 14 19:04:29 CET 2002 Jan Hubicka + + * emit-rtl.c (try_split): Use delete_insns. + * recog.c (split_all_insns): Fix terminating condition. + + 2002-03-14 Richard Earnshaw + Jeroen Dobbelaere + + PR target/5828 + * arm.c (arm_output_epilogue): Fix floating-point register save + adjustment when using a frame pointer. + + 2002-03-14 Richard Sandiford + + * config/mips/mips.h (FP_INC, UNITS_PER_FPVALUE): New macros. + * config/mips/mips.c (compute_frame_size): Retrofit them here. + (save_restore_insns, mips_expand_epilogue): And here. + (build_mips16_call_stub): And here. + (mips_function_value): Use the new macros to decide whether a single + or complex float can be returned in floating-point registers. Return + a parallel rtx in the complex case. + + Thu Mar 14 11:03:12 CET 2002 Jan Hubicka + + * toplev.c (rest_of_compilation): Add CLEANUP_UPDATE_LIFE to cfg_cleanup + call after liveness analysis. + + * recog.c (split_insn): Use delete_insn_and_edges. + + * cfgrtl.c (verify_flow_info): Be permisive about non-any_condjump + instructions to have branch prediction notes. + * ia64reorg.c (ia64_reorg): Do not rebuild CFG. + + 2002-03-14 Geoffrey Keating + + * configure.in: Don't pass -Wno-long-long to a ADA compiler + that doesn't support it. + * configure: Regenerate. + + 2002-03-13 Jakub Jelinek + + PR target/5626 + * config/sparc/sparc.md (normal_branch, inverted_branch, + normal_fp_branch, inverted_fp_branch, normal_fpe_branch, + inverted_fp_branch): Adjust calls to output_cbranch. + Set length attribute. + (normal_int_branch_sp64, inverted_int_branch_sp64): Adjust calls to + output_v9branch. Set length attribute. + * config/sparc/sparc.c (fcc0_reg_operand, noov_compare64_op): New + predicates. + (noov_compare_op): Handle CCX_NOOVmode the same way as CC_NOOVmode. + (output_cbranch): Likewise. Handle far branches. + (output_v9branch): Handle far branches. + * config/sparc/sparc-protos.h (output_cbranch, output_v9branch): + Adjust prototypes. + * config/sparc/sparc.h (PREDICATE_CODES): Add fcc0_reg_operand and + noov_compare64_op predicates. + + 2002-03-13 Jason Merrill + + * gthr-posix.h (__gthread_active_p): Move __gthread_active_ptr + into the function and constify it. + * gthr-dce.h, gthr-solaris.h: Likewise. + + 2002-03-13 David Edelsohn + + * config/rs6000/rs6000.h (PAD_VARARGS_DOWN): Define. + * config/rs6000/rs6000.c (rs6000_va_arg): Use + std_expand_builtin_va_arg if not ABI_V4. + + 2002-03-13 Jason Merrill + + * varasm.c (globalize_decl): New fn. + (assemble_start_function): Use it. + (asm_emit_uninitialized): Use it. + (assemble_alias): Use it. + (assemble_variable): Use it. + + 2002-03-13 Hans-Peter Nilsson + + * config/cris/cris.c (cris_target_asm_function_prologue): Revert + 2002-03-12 internal visibility change. + (cris_encode_section_info): Consider MODULE_LOCAL_P when encoding + visibility into SYMBOL_REF_FLAG. + + 2002-03-13 Ulrich Weigand + + * expr.c (expand_expr, case NE_EXPR): Do not call copy_to_reg with + VOIDmode operand. Add compile-time optimization for constant results. + + 2002-03-12 Jason Merrill + + * c-typeck.c (convert_for_assignment): Don't allow conversions + between pointers and references. Only allow lvalues to convert to + reference. + + 2002-03-13 Hartmut Penner + + * config/s390/s390.h (PROFILE_BEFORE_PROLOGUE): Emit profile code + before prologue, to avoid scheduling problems. + + 2002-03-13 Jakub Jelinek + + * config/sparc/sparc.h (INITIAL_FRAME_POINTER_OFFSET): Remove. + (ELIMINABLE_REGS): Add sfp->sp. + (INITIAL_ELIMINATION_OFFSET): Compute sfp->sp offset too. + + 2002-03-13 Jakub Jelinek + + PR optimization/5892 + * config/ia64/ia64.c (rotate_one_bundle): Update current packet. + + 2002-03-13 Jakub Jelinek + + * loop.c (basic_induction_var): Don't call convert_modes if mode + classes are different. + + 2002-03-12 Richard Henderson + + PR optimization/5901 + * function.c (reposition_prologue_and_epilogue_notes): Position + the markers after/before the last/first insn not deleted. + + 2002-03-12 Richard Henderson + + PR optimization/5878 + * config/arc/arc.h, config/cris/cris.h, config/i386/i386.h, + config/m68k/m68k.h, config/s390/s390.h, config/sparc/sparc.h + (PIC_OFFSET_TABLE_REGNUM): Conditionalize on flag_pic. + + * config/arm/arm.h config/i386/i386.h, config/m68k/m68k.h, + config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Set + PIC_OFFSET_TABLE_REGNUM based on INVALID_REGNUM not flag_pic. + + * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): New. + * config/arm/arm.c (arm_pic_register): Init to INVALID_REGNUM. + (arm_override_options): Set arm_pic_register if TARGET_APCS_STACK + also. Don't set it if not flag_pic. + * config/i386/i386.c (ix86_save_reg): Trust PIC_OFFSET_TABLE_REGNUM + to be INVALID_REGNUM when not used. + + 2002-03-13 Aldy Hernandez + + * expmed.c (store_bit_field): Reset alias set for memory. + (extract_bit_field): Same. + + 2002-03-12 Kaveh R. Ghazi + + * c-common.c (c_tree_code_type, c_tree_code_length, + c_tree_code_name, add_c_tree_codes): Delete. + * c-common.h (add_c_tree_codes): Delete. + * c-lang.c (tree_code_type, tree_code_length, tree_code_name): + Define. + * c-objc-common.c (c_objc_common_init): Don't call + add_c_tree_codes, instead set lang_unsafe_for_reeval. + * objc/objc-act.c (objc_tree_code_type, objc_tree_code_length, + objc_tree_code_name, add_objc_tree_codes): Delete. + (objc_init): Don't call add_objc_tree_codes. + * objc/objc-lang.c (tree_code_type, tree_code_length, + tree_code_name): Define. + * toplev.c (lang_independent_init): Don't set + tree_code_length[IDENTIFIER_NODE]. + * tree.c (tree_code_type, tree_code_length, tree_code_name): + Delete definitions, moved to language front-ends. + * tree.def (IDENTIFIER_NODE): Hardwire the length. + * tree.h (tree_code_type, tree_code_length, tree_code_name): + Const-ify. + (tree_code_length): Change type to unsigned char. + + 2002-03-12 Richard Henderson + + * config/i386/i386.c (ix86_expand_prologue): Revert 2002-03-03 + internal visibility change. + + 2002-03-12 Bob Wilson + + * config/xtensa/xtensa.c (xtensa_expand_block_move): Use + validize_mem() instead of change_address to avoid clobbering + memory attributes. + + 2002-03-12 Neil Booth + + * c-lex.h (position_after_whitespace): Remove. + + 2002-03-12 Jakub Jelinek + + * c-lex.c (cb_ident, c_lex): Remove unnecessary cast. + (lex_string): Use unsigned char pointers. + + 2002-03-12 Ulrich Weigand + + * reload1.c (reload): Ignore MEM REG_EQUIV notes if the equivalent + is not a valid memory_operand. + + 2002-03-12 Bob Wilson + + * config/xtensa/xtensa-config.h: Define XCHAL_HAVE_LOOPS. + * config/xtensa/lib1funcs.asm: Fix copyright to include + special case for libgcc files. + (__udivsi3): Avoid loop instructions when XCHAL_HAVE_LOOPS is 0. + (__divsi3): Likewise. + (__umodsi3): Likewise. + (__modsi3): Likewise. + * config/xtensa/lib2funcs.S: Fix copyright to include + special case for libgcc files. + + 2002-03-12 Tom Rix + + * collect2.c (resolve_lib_name): Move outside of + OBJECT_FORMAT_COFF ifdef. + (ignore_library): Same. + + 2002-03-12 Bob Wilson + + * config/xtensa/t-xtensa (CRTSTUFF_T_CFLAGS_S): Define. + + 2002-03-12 Bob Wilson + + * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Switch + to function_section before writing out the constant pool. + + 2002-03-12 David Edelsohn + + * config/rs6000/rs6000.h (PREDICATE_CODES): Add any_operand and + zero_constant. + * config/rs6000/rs6000.c (easy_fp_constant): Fix formatting. + + 2002-03-12 Alan Modra + + * config/rs6000/rs6000.md (addsi3): Optimize sign extension. + (adddi3): Likewise. + (movdf): Likewise. + (movdi): Likewise. + (cmpsi splitter): Likewise. + (modsi3): Fail if <= 0. + * config/rs6000/rs6000.c (reg_or_add_cint64_operand): Remove + redundant test when HOST_BITS_PER_WIDE_INT != 32. + (reg_or_sub_cint64_operand): Likewise. + (num_insns_constant_wide): Optimize sign extension. + (rs6000_legitimize_address): Likewise. + + 2002-03-12 Andrew MacLeod + + * config/sparc/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. + * config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. + + 2002-03-12 Andrew MacLeod + + * config/sparc/sparc.h (RETURN_ADDR_RTX): Include v9 stack bias in + address calculation. + + 2002-03-12 Ulrich Weigand + + * config/s390/s390.md (reload_insi, reload_indi): Change mode of + scratch register to DImode / TImode. + config/s390/s390.c (s390_expand_plus_operand): Make sure scratch + register used does not overlap the target. + + 2002-03-12 Kaveh R. Ghazi + + * Makefile.in (debug.o): Depend on debug.h. + * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Const-ify. + * debug.c (do_nothing_debug_hooks): Likewise. + * debug.h (debug_hooks, do_nothing_debug_hooks, dbx_debug_hooks, + sdb_debug_hooks, xcoff_debug_hooks, dwarf_debug_hooks, + dwarf2_debug_hooks, vmsdbg_debug_hooks): Likewise. + * dwarf2out.c (dwarf2_debug_hooks): Likewise. + * dwarfout.c (dwarf_debug_hooks): Likewise. + * integrate.c (output_inline_function): Likewise. + * objc/objc-act.c (synth_module_prologue): Likewise. + * sdbout.c (sdb_debug_hooks): Likewise. + * toplev.c (debug_hooks): Likewise. + * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. + + 2002-03-12 Kaveh R. Ghazi + + * 1750a.h, a29k.h, arc.h, arm.h, c4x.h, clipper.h, cris.h, d30v.h, + dsp16xx.h, fr30.h, h8300.h, i370.h, i386.h, i860.h, i960.h, + m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h, mmix.h, mn10300.h, + ns32k.h, pa.h, pdp11.h, pj.h, romp.h, s390.h, stormy16.h, + v850.h, vax.h, we32k.h, xtensa.h (POINTER_SIZE): Delete. + * defaults.h (POINTER_SIZE): Define. + * doc/tm.texi (POINTER_SIZE): Document default. + + 2002-03-12 Kaveh R. Ghazi + + * mn10200.h (PTRDIFF_TYPE): Change it to a signed type. + + 2002-03-11 Richard Henderson + + * toplev.c (rest_of_compilation): Call purge_all_dead_edges + if rebuild_label_notes_after_reload. + + 2002-03-12 Hans-Peter Nilsson + + * config/cris/cris.c (cris_target_asm_function_prologue): Do not + emit pic register load if "internal" visibility. + (cris_print_operand): Avoid traditional-warning for 0xffffffff. + (cris_expand_builtin_va_arg): Do all computations on trees. + + 2002-03-11 Richard Henderson + + * rtlanal.c: Include recog.h. + (keep_with_call_p): Fix thinko. + * Makefile.in (rtlanal.o): Update dependencies. + + 2002-03-11 Chris Meyer + + * genflags.c (gen_insn): Use IS_VSPACE. + * genoutput.c (output_insn_data): Likewise. + (process_template): Likewise. + + 2002-03-11 Richard Henderson + + * toplev.c (rest_of_compilation): Don't compile if we've had errors. + + 2002-03-11 Neil Booth + + * Makefile.in: Update. + * doc/cppenv.texi, cppopts.texi: Split out of cpp.texi and gcc.texi. + Update documentation. + * doc/gcc.texi: Include cppopts.texi and cppenv.texi. + * doc/cpp.texi: Include cppopts.texi and cppenv.texi. + + 2002-03-11 Zack Weinberg + + * Makefile.in: Give texi2pod its input file as a command line + argument, not on stdin. + + 2002-03-11 Dan Nicolaescu + Daniel Berlin + + C++ alias analysis improvement. + * alias.c (record_component_aliases): Record aliases for base + classes too. + + 2002-03-11 Ulrich Weigand + + * config/s390/s390.h (REG_ALLOC_ORDER): Add missing register. + + 2002-03-11 Douglas B Rupp + + * toplev.c (vms_fopen): Remove, not needed. + + * vmsdbgout.c (lookup_filename): Adjust creation date for GMT. + + * config/alpha/xm-vms.h (__UNIX_FWRITE): Define. + + * config/alpha/alpha.c (alpha_sa_size, VMS): Don't reserve space + for FP, already done later. + + * toplev.c (debug_args): Add entry for VMS_DEBUG. + * vmsdbgout.c (vmsdbgout_init): Fix typo in call to xmalloc. + + 2002-03-11 Richard Sandiford + + * defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): New. + (MODE_HAS_NANS, MODE_HAS_INFINITIES): Evaluate to false if + LARGEST_EXPONENT_IS_NORMAL for the given mode. + (MODE_HAS_SIGN_DEPENDENT_ROUNDING): False when ROUND_TOWARDS_ZERO. + * real.c (eadd1): Make rounding dependent on !ROUND_TOWARDS_ZERO. + (ediv, emul, eldexp, esqrt): Likewise. + (etoe113, etoe64, etoe53, etoe24, etodec, etoibm, etoc4x): Likewise. + (e24toe): Only check NaNs & infinities if !LARGEST_EXPONENT_IS_NORMAL. + (saturate): New function. + (toe53, toe24): Saturate on overflow if LARGEST_EXPONENT_IS_NORMAL. + (make_nan): Use a saturation value instead of a NaN if + LARGEST_EXPONENT_IS_NORMAL. Warn when this happens. + * fp-bit.c (pack_d): Saturate on NaN, infinite or overflowing + inputs if LARGEST_EXPONENT_IS_NORMAL. Represent subnormals as + zero if NO_DENORMALS. Only round to nearest if !ROUND_TOWARDS_ZERO. + (unpack_d): No NaNs or infinities if LARGEST_EXPONENT_IS_NORMAL. + (_fpmul_parts, _fpdiv_parts): Only round to nearest if + !ROUND_TOWARDS_ZERO. + * doc/tm.texi (LARGEST_EXPONENT_IS_NORMAL): Document. + (ROUND_TOWARDS_ZERO): Document. + + 2002-03-11 Andreas Jaeger + + * cfg.c (dump_flow_info): Remove unused variable. + + 2002-03-11 Hans-Peter Nilsson + + * config/mmix/mmix.c (mmix_expand_builtin_va_arg): Do all + computations on trees. + + 2002-03-10 Richard Henderson + + PR 5693: + * reload.c (copy_replacements_1): New. + (copy_replacements): Use it to recurse through the rtx. + + 2002-03-10 Richard Henderson + + * loop.c (strength_reduce): Compute number of iterations as + unsigned HOST_WIDE_INT. + + 2002-03-10 Richard Henderson + + * sched-rgn.c (add_branch_dependences): Don't allow insns that throw + to move away from the end of the block. + + 2002-03-10 Neil Booth + + PR preprocessor/5899 + * cppinit.c (init_dependency_output): Don't ignore -dM etc. + + 2002-03-10 Kaveh R. Ghazi + + * mbchar.c (JIS_state_table, JIS_action_table): Const-ify. + + * attribs.c (decl_attributes): Fix signed/unsigned warning. + + 2002-03-10 Hans-Peter Nilsson + + * config/mmix/mmix.c: Improve comments. + (mmix_target_asm_function_prologue): Drop variable + empty_stack_frame. Don't allocate unused slot above fp. + (mmix_target_asm_function_epilogue): Mirror prologue changes. + * config/mmix/mmix.h (MMIX_GNU_ABI_REG_ALLOC_ORDER): Don't have + brace in first column. + (enum reg_class): Ditto. + (FIRST_PARM_OFFSET): Now 0. + (USER_LABEL_PREFIX): Remove #if 0:d definition. + + 2002-03-10 Kaveh R. Ghazi + + * combine.c (make_extraction): Fix error in last change. + + 2002-03-09 Kaveh R. Ghazi + + * c4x.c (c4x_fp_reglist): Const-ify. + * cris.c (cris_print_operand): Likewise. + * i386.c (ix86_va_arg): Likewise. + * ia64/unwind-ia64.c (unw_decode_table): Likewise. + * m32r.c (m32r_hard_regno_mode_ok): Likewise. + * m32r.h (m32r_hard_regno_mode_ok): Likewise. + * mcore.c (regno_reg_class, mcore_unique_section): Likewise. + * mcore.h (regno_reg_class): Likewise. + * mips.c (gen_int_relational): Likewise. + * ns32k.c (ns32k_reg_class_contents, regclass_map): Likewise. + * ns32k.h (ns32k_reg_class_contents, regclass_map): Likewise. + * pdp11.c (move_costs): Likewise. + * pj.h (INITIALIZE_TRAMPOLINE): Likewise. + * s390.c (s390_branch_condition_mnemonic, regclass_map): + Likewise. + * s390.h (regclass_map): Likewise. + * sh.c (shift_amounts): Likewise. + * sh.md (rotlsi3): Likewise. + + 2002-03-09 Geoffrey Keating + + * config/rs6000/rs6000.md (ne0+4): Add extra CLOBBER. + (ne0+5): Use new clobber to generate proper shift pattern. + Patch by Michael Matz . + + 2002-03-09 Andreas Schwab + + * gcc.c (validate_all_switches): Also handle `%W{...}'. + + 2002-03-09 Geoffrey Keating + + * config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Don't define. + + 2002-03-09 Jakub Jelinek + + PR middle-end/5877 + * expr.c (highest_pow2_factor): Check TREE_INT_CST_LOW + even for non-representable constants. + + Sat Mar 9 07:20:01 2002 Richard Kenner + + * emit-rtl.c (copy_most_rtx): Accept EXPR_LIST for may_share. + * function.c (fixup_var_refs): Add MAY_SHARE parameter. + (fixup_var_refs_insns, fixup_var_refs_insns_with_has): Likewise. + (fixup_var_refs_insn, fixup_var_refs_1): Likewise. + (pop_function_context): Compute MAY_SHARE parameter for + fixup_var_refs. + (fixup_var_refs_1, case MEM): Pass MAY_SHARE to copy_most_rtx, not VAR. + (gen_mem_addressof): Call fixup_var_refs with new parm. + + * combine.c (make_extraction): Don't make extension of CONST_INT. + + 2002-03-09 Alexandre Oliva + + * config/mips/mips.c (function_arg_pass_by_reference): Force to 0 + in o32 and o64 ABIs. + * config/mips/abi64.h (MUST_PASS_IN_STACK): Define as in expr.h, + but getting fixed-size structs passed in registers regardless of + padding in o32 and o64 ABIs. + + * config/mips/mips.c (mips_va_arg): Apply big-endianness address + offset before loading address of argument passed by transparent + reference. + + 2002-03-08 John David Anglin + + * t-pa64 (LIB1ASMFUNCS, LIB1ASMSRC): Delete. + + 2002-03-09 Alexandre Oliva + + * config/mips/mips.c (mips_expand_prologue): Set regno of vararg + marker such that registers after it are saved. + + 2002-03-08 Kaveh R. Ghazi + + * sparc.c (arith_4096_operand): Fix error in last change. + + 2002-03-08 Alexandre Oliva + + * config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): Remove duplicate + defaults for MEABI. + + 2002-03-08 Aldy Hernandez + + * config/rs6000/rs6000.c (rs6000_va_arg): Fix alignment for + vectors. + + 2002-03-08 Aldy Hernandez + + * config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Change for altivec. + + Fri Mar 8 21:27:49 CET 2002 Jan Hubicka + + * cfgrtl.c (purge_dead_edges): Set BB_DRITY flags if edge has been + removed; fix return value. + * combine.c (combine_instructions): Dirtify blocks where we failed to + update liveness; purge dead edges; use update_life_info_in_dirty_blocks. + * toplev.c (rest_of_compilation): Do not purge_dead_edges after combine. + + 2002-03-08 Kaveh R. Ghazi + + * gcse.c (insert_insn_end_bb): Fix typo in last change. + + Fri Mar 8 21:08:52 CET 2002 Jan Hubicka + + * recog.c (peephole2_optimize): Re-distribute EH edges. + + 2002-03-08 Neil Booth + + * expr.c (expand_expr): Use unsave lang hook. + * langhooks-def.h (LANG_HOOKS_UNSAVE): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.h (struct lang_hooks): New hook unsave. + * tree.c (lang_unsave, lang_unsave_expr_now): Remove. + (unsave_expr_1): Remove unused lang_unsave_expr_now. + (unsave_expr_now_r): Rename lhd_unsave. Update. Return input. + (unsave_expr_now): Remove. + * tree.h (unsave_expr_now, lang_unsave, + lang_unsave_expr_now): Remove. + (lhd_unsave): New. + + 2002-03-08 Andreas Jaeger + + * flow.c (propagate_block_delete_insn): Remove unused variable. + + 2002-03-08 Kazu Hirata + + * config/h8300/h8300.c (h8300_adjust_insn_length): Tighten + insn length for memory load/store. + + 2002-03-08 Craig Rodrigues + + * doc/install.texi (--with-libiconv-prefix): Document. + + 2002-03-08 Michael Y. Brukman + + * doc/sourcebuild.texi: Fix typo. + + 2002-03-08 Jakub Jelinek + + PR c/3711 + * builtins.c (std_expand_builtin_va_arg): Do all computations on + trees. + + Fri Mar 8 06:48:45 2002 Richard Kenner + + * rtl.c (copy_most_rtx): Move from here ... + * emit-rtl.c (copy_most_rtx): ... to here. + + 2002-03-08 Alexandre Oliva + + * config/mips/mips.h (LONG_MAX_SPEC): Rewrite, along with + SUBTARGET_CPP_SIZE_SPEC. + * config/mips/abi64.h (LONG_MAX_SPEC): Delete. + + * config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): Simplify. + + 2002-03-07 Matt Hiller + + * gensupport.c (first_dir_md_include): Renamed from include; + change all references. + (last_dir_md_include): Renamed from last_include; change all + references. + (init_md_reader): Unconditionally initialize base_dir whether or + not filename is a relative path. + + 2002-03-07 Alexandre Oliva + + * config/fp-bit.c (_unord_f2): Compile it in even if + US_SOFTWARE_GOFAST is enabled. + + * config/gofast.h (GOFAST_RENAME_LIBCALLS): Set gt and ge as + NULL_RTX. Set all HFmode operations as NULL_RTX. + * optabs.c (prepare_float_lib_cmp) : If libfunc is + NULL_RTX, try reversing the comparison and the operands. + + 2002-03-06 Ulrich Weigand + + * genextract.c (walk_rtx): Recurse into MATCH_PAR_DUP. + genoutput.c (scan_operands): Recurse into MATCH_PAR_DUP + and MATCH_OP_DUP. + + Thu Mar 7 16:54:10 CET 2002 Jan Hubicka + + * reload1.c (reload_cse_delete_noop_set): Purge dead edges. + + Thu Mar 7 16:33:54 CET 2002 Jan Hubicka + + * basic-block.h (fixup_abnormal_edges): Declare. + * reload1.c (fixup_abnormal_edges): New function. + * reg-stack.c (convert_regs): Use it. + + * gcse.c (insert_insn_end_bb): Handle trapping insns. + + * gcse.c (hash_scan_set): Refuse instructions with EH edges. + + 2002-03-07 Richard Sandiford + + * defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES): New. + (MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): New. + * flags.h (HONOR_NANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS): New. + (HONOR_SIGN_DEPENDENT_ROUNDING): New. + * builtins.c (expand_builtin_mathfn): Use HONOR_NANS. + * c-common.c (truthvalue_conversion): Reduce x - y != 0 to x != y + unless x and y could be infinite. + (expand_unordered_cmp): New, mostly split from expand_tree_builtin. + Check that the common type of both arguments is a real, even for + targets without unordered comparisons. Allow an integer argument + to be compared against a real. + (expand_tree_builtin): Use expand_unordered_cmp. + * combine.c (combine_simplify_rtx): Use the new HONOR_... macros. + * cse.c (fold_rtx): Likewise. Fix indentation. + * fold-const.c (fold_real_zero_addition_p): New. + (fold): Use it, and the new HONOR_... macros. + * ifcvt.c (noce_try_minmax): Use the new HONOR_... macros. + * jump.c (reversed_comparison_code_parts): After searching for + the true comparison mode, use HONOR_NANS to decide whether it + can be safely reversed. + (reverse_condition_maybe_unordered): Remove IEEE check. + * simplify-rtx.c (simplify_binary_operation): Use the new macros + to decide which simplifications are valid. Allow the following + simplifications for IEEE: (-a + b) to (b - a), (a + -b) to (a - b), + and (a - -b) to (a + b). + (simplify_relational_operation): Use HONOR_NANS. + * doc/tm.texi: Document the MODE_HAS_... macros. + + 2002-03-07 Richard Earnshaw + + * combine.c (simplify_comparison): If simplifying a logical shift + right and compare with constant, force the comparison to unsigned. + + 2002-03-07 Aldy Hernandez + + * doc/invoke.texi: Add documentation for -mabi=no-altivec. + + * config/rs6000/rs6000.c (rs6000_parse_abi_options): Add + -mabi=no-altivec + (alt_reg_names): Remove % for vrsave. + + 2002-03-06 Richard Henderson + + PR optimization/5844 + * genemit.c (gen_exp): New argument used. Invoke copy_rtx + if used indicates we've already emitted one copy of an operand. + (gen_insn, gen_expand, output_add_clobbers): Supply a null used. + (gen_split): Supply a non-null used. + + 2002-03-06 Ulrich Weigand + + * reload1.c (reload): Unshare all rtl after reload is done. + + * simplify-rtx.c (simplify_plus_minus): Do not abort, + but simply fail if the expression is too complex to simplify. + (simplify_gen_binary): Handle simplify_plus_minus failures. + + Wed Mar 6 20:32:09 CET 2002 Jan Hubicka + + * toplev.c (rest_of_compilation): Do jump threading before SSA path; + consistently call delete_trivially_dead_insns after CSE and GCSE; + fix DFI_life dumping; do jump threading after liveness; do crossjumping + after liveness2; update comment in last crossjumping. + * cfgcleanup.c (try_crossjump_to_edge): Dirtify block. + + Wed Mar 6 12:27:10 2002 Jeffrey A Law (law@redhat.com) + + * ssa-ccp.c (ssa_fast_dce): Update the DF def-use chains + after completing fast dead code elimination. + + * m68k.h (CONST_COSTS): Lower cost of 0.0 when used inside a + COMPARE operator. + + 2002-03-06 Phil Edwards + + * version.c: Fix misplaced leading blanks on first line. + + Wed Mar 6 19:08:03 CET 2002 Jan Hubicka + + * cfgrtl.c (verify_flow_info): Accept RESX as EH edge source. + + Wed Mar 6 18:14:43 CET 2002 Jan Hubicka + + * cfgcleanup.c (mentions_nonequal_regs): New function. + (thread_jump): Use it. + * toplev.c (rest_of_compilation): Run jump threading after + liveness. + + 2002-03-06 Jakub Jelinek + + * ssa-ccp.c (ssa_ccp_substitute_constants): Backout 2002-03-05 + patch. + + Wed Mar 6 11:28:19 CET 2002 Jan Hubicka + + * predict.c (estimate_bb_frequencies): Do not reload the + frequencies from notes. + + Wed Mar 6 10:59:39 CET 2002 Jan Hubicka + + * cfgrtl.c (delete_insn_and_edges, delete_insn_chain_and_edges): New. + * rtl.h (delete_insn_and_edges, delete_insn_chain_and_edges): Declare + + * basic-block.h (update_life_info, update_life_info_in_dirty_blocks, + delete_noop_moves): Return indeger. + * flow.c (ndead): New variable. + (propagate_block_delete_insn): Use delete_insn_and_edges; remove + BB argument; update callers. + (propagate_block_delete_libcall): Use delete_insn_chain_and_edges. + (life_analysis): Do not call purge_all_dead_edges. + (update_life_info): Return number of deleted insns; print statistics. + (update_life_info_in_dirty_blocks): likewise. + (delete_noop_moves): Use delete_insn_and_edges; print statistics; + return number of insns deleted. + + * cse.c: Include timevar.h + (delete_trivially_dead_insns): Kill preserve_basic_blocks argument; + iterate until stabilizes; print statistics; return number of killed + insns. + * Makefile.in: (cse.o): Add timevar.h dependency + * rtl.h (delete_trivially_dead_insns): New. + * timever.def: Add TV_DELETE_TRIVIALLY_DEAD timer. + * toplev.c (rest_of_compilation): Update callers. + + * cfgcleanup.c (try_optimize_cfg): Kill blocks. + (try_optimize_cfg): Do not update liveness. + (cleanup-cfg): Loop until try_optimize_cfg and dead code + removal stabilizes; use delete_trivially_dead_insns. + + * cfgrtl.c (verify_flow_info): Sanity check outgoing edges. + + 2002-03-05 Zack Weinberg + + * cppmain.c (setup_callbacks): Disable #pragma and #ident + callbacks when processing assembly language. + + 2002-03-05 John David Anglin + + * pa.h (ASM_FILE_END): Define. + * som.h (ASM_FILE_END): Delete. + + * pa.c (function_arg): Don't pass floats in general registers in + indirect calls if TARGET_ELF32. + + 2002-03-05 Richard Henderson + + * config/i386/i386.md (floatsidf2): Conditionalize on hard-float. + + 2002-03-05 Danny Smith + + * gthr-win32.h (__GTHREAD_MUTEX_INIT_DEFAULT): Define. + + 2002-03-05 Jakub Jelinek + + * mklibgcc.in: Prepend a tab before .hidden, add $flags to gcc + -r command line. Don't hide any symbols if not building + shared libgcc. + + Tue Mar 5 18:31:27 CET 2002 Jan Hubicka + + * cfg.c (dump_flow_info): Warn about profile mismatches. + * cfgrtl.c (verify_flow_info): Few aditional sanity checks. + (purge_dead_edges): Remove REG_BR_PROB notes on simplejumps. + + 2002-03-05 Jakub Jelinek + + * expmed.c (emit_store_flag): Don't test BITS_PER_WORD * 2 + wide volatile memory by parts. + + 2002-03-05 Jakub Jelinek + + * ssa-ccp.c (ssa_ccp_substitute_constants): Don't crash if def + is NULL. + + 2002-03-05 Richard Henderson + + * rs6000.h (TOTAL_ALTIVEC_REGS): Fix off-by-one error. + + 2002-03-04 Geoffrey Keating + + * toplev.c (documented_lang_options): Document more + language-specific options. + * doc/invoke.texi (Warning Options): Correct documentation for + -Wno-multichar, -Wno-div-by-zero, and -Wsystem-headers. + * c-decl.c (c_decode_option): Use a table to handle warning options. + + 2002-03-05 Hans-Peter Nilsson + + * config/mmix/mmix.h (ENCODE_SECTION_INFO): Pass on new second + parameter to mmix_encode_section_info. + (LINK_SPEC): Don't defsym __.MMIX.start..text if linking + relocatably. Always produce ELF, not mmo if linking relocatably. + * config/mmix/mmix.c (mmix_encode_section_info): If new parameter + first is nonzero, don't add symbol prefix. + * config/mmix/mmix-protos.h (mmix_encode_section_info): Tweak + prototype accordingly. + + 2002-03-04 Krister Walfridsson + + * config.gcc (*-*-netbsd*): Add t-slibgcc-elf-ver to tmake_file. + + 2002-03-05 Joseph S. Myers + + * configure.in: Increase required makeinfo version to 4.1. + * configure: Regenerate. + + 2002-03-04 Geoffrey Keating + + * .cvsignore: Remove *.info* and genrtl*; these files are generated + elsewhere now. + + 2002-03-04 Joseph S. Myers + + * doc/include/texinfo.tex: Update to version 2002-03-01.06. + * doc/invoke.texi: Fix @math uses. + + Mon Mar 4 15:33:54 CET 2002 Jan Hubicka + + * toplev.c (rest_of_compilation): Cleanup CFG after dead jumptables + removal + + 2002-03-03 Aldy Hernandez + + * config.gcc (powerpc-*-eabialtivec*): Use t-ppcendian. + (powerpc-*-eabisimaltivec*): Same. + + * config/rs6000/t-ppcendian: New. + + 2002-03-04 Herman A.J. ten Brugge + + * c4x-protos.h, c4x.h, c4x.c, c4x.md: Add new functions + nonimmediate_src_operand and nonimmediate_lsrc_operand to + disallow ZERO_EXTEND with CONST_INT or CONST_DOUBLE. + + 2002-03-03 Richard Henderson + + * toplev.c (rest_of_decl_compilation): Revert last two changes. + + 2002-03-03 Zack Weinberg + + * emit-rtl.c, final.c, fold-const.c, gengenrtl.c, optabs.c, + print-tree.c, real.c, real.h, recog.c, rtl.c, simplify-rtx.c, + tree.c, config/m68k/m68k.c: + Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef + REAL_ARITHMETIC blocks unconditional. Delete some further + #ifdef blocks predicated on REAL_ARITHMETIC. + * flags.h, toplev.c: Delete remaining references to + flag_pretend_float. + + * doc/invoke.texi: Remove documentation of -fpretend-float. + * doc/tm.texi: Describe the various REAL_* macros as provided by + real.h, not by the target configuration files. + + * config/alpha/alpha.h, config/alpha/unicosmk.h, config/arm/arm.h, + config/avr/avr.h, config/c4x/c4x.h, config/convex/convex.h, + config/cris/cris.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, + config/h8300/h8300.h, config/i370/i370.h, config/i386/i386.h, + config/i386/osf1elf.h, config/i960/i960.h, config/ia64/ia64.h, + config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/dpx2.h, + config/m68k/linux-aout.h, config/m68k/linux.h, config/m68k/m68k.h, + config/m68k/sun3.h, config/m68k/vxm68k.h, config/mcore/mcore.h, + config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, + config/mn10300/mn10300.h, config/pa/pa.h, config/pj/pj.h, + config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h, + config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, + config/sparc/sol2.h, config/sparc/sparc.h, config/sparc/vxsim.h, + config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h, + config/xtensa/xtensa.h: + Do not define, undefine, or mention in comments any of + REAL_ARITHMETIC, REAL_VALUE_ATOF, REAL_VALUE_HTOF, + REAL_VALUE_ISNAN, REAL_VALUE_ISINF, + REAL_VALUE_TO_TARGET_SINGLE, REAL_VALUE_TO_TARGET_DOUBLE, + REAL_VALUE_TO_TARGET_LONG_DOUBLE, REAL_VALUE_TO_DECIMAL, + REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS, + REAL_VALUE_LDEXP, REAL_VALUE_FIX, REAL_VALUE_UNSIGNED_FIX, + REAL_VALUE_RNDZINT, REAL_VALUE_UNSIGNED_RNDZINT, + REAL_INFINITY, REAL_VALUE_NEGATE, REAL_VALUE_TRUNCATE, + REAL_VALUE_TO_INT, or REAL_VALUE_FROM_INT. + + 2002-03-03 Kaveh R. Ghazi + + * 1750a.h, a29k.h, alpha.h, arc.h, arm.h, avr.h, c4x.h, clipper.h, + convex.h, cris.h, d30v.h, dsp16xx.h, elxsi.h, fr30.h, h8300.h, + i370.h, i386.h, i860.h, i960.h, ia64.h, m32r.h, m68hc11.h, m68k.h, + m88k.h, mcore.h, mips.h, mmix.h, mn10200.h, mn10300.h, ns32k.h, + pa.h, pdp11.h, pj.h, romp.h, rs6000.h, s390.h, sh.h, sparc.h, + stormy16.h, v850.h, vax.h, we32k.h, xtensa.h (BITS_PER_WORD): + Delete. + * defaults.h (BITS_PER_WORD): Define. + * doc/tm.texi (BITS_PER_WORD): Document default value. + + * 1750a.h, avr.h, convex.h, d30v.h, dsp16xx.h, fr30.h, ia64.h, + m68hc11.h, m88k.h, mips.h, pdp11.h, rs6000.h, sparc.c, + stormy16.h, xtensa.h, vmsdbgout.c (CHAR_TYPE_SIZE): Delete. + + 2002-03-03 Kaveh R. Ghazi + + * attribs.c (init_attributes, decl_attributes): Use ARRAY_SIZE in + lieu of explicit sizeof/sizeof. + * i386.c (override_options, ix86_init_mmx_sse_builtins, + ix86_expand_builtin): Likewise. + * mips.c (mips_add_gc_roots): Likewise. + * mmix.c (mmix_output_condition): Likewise. + * rs6000.c (rs6000_override_options, altivec_expand_builtin, + altivec_init_builtins): Likewise. + * sparc.c (mark_ultrasparc_pipeline_state): Likewise. + * cppexp.c (Nsuff, parse_number): Likewise. + * cppinit.c (builtin_array_end): Likewise. + * gcc.c (n_default_compilers, process_command): Likewise. + * genpreds.c (output_predicate_decls): Likewise. + * ggc-page.c (NUM_EXTRA_ORDERS): Likewise. + * lcm.c (N_ENTITIES): Likewise. + * stor-layout.c (set_sizetype): Likewise. + + 2002-03-03 Richard Henderson + + * toplev.c (rest_of_decl_compilation): Do not invoke make_decl_rtl + for types or labels. + + 2002-03-03 Richard Henderson + + * c-decl.c (start_decl): Initialized variables are not common. + + 2002-03-02 Per Bothner + + * gcc.c (option_map): Suport new --bootclasspath option. + --CLASSPATH is now just an alias for --classpath. + + 2002-03-02 Richard Henderson + + * config/i386/i386.h (ix86_expand_prologue): Do not emit pic register + load if "internal" visibility. + * doc/extend.texi: Document visibility meanings. + + 2002-03-02 Richard Henderson + + * config/i386/i386.h (ENCODE_SECTION_INFO): MODULE_LOCAL_P applies + to functions as well. + + 2002-03-02 Richard Henderson + + * attribs.c (handle_alias_attribute): Don't call assemble_alias. + (handle_visibility_attribute): Don't call assemble_visibility. + * toplev.c (rest_of_decl_compilation): Invoke make_decl_rtl even + without asmspec. Invoke assemble_alias when needed. + * varasm.c (maybe_assemble_visibility): New. + (assemble_start_function, assemble_variable, assemble_alias): Use it. + + 2002-03-02 Richard Henderson + + * varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; + invoke ENCODE_SECTION_INFO with first call flag. + + * config/darwin-protos.h, config/darwin.c, config/darwin.h, + config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, + config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h, + config/arm/arm.h, config/arm/pe.c, config/arm/pe.h, + config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, + config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, + config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, + config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h, + config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h, + config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c, + config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, + config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, + config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, + config/m68hc11/m68hc11.h, config/m88k/m88k.h, + config/mcore/mcore-protos.h, config/mcore/mcore.c, + config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h, + config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h, + config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, + config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h, + config/sh/sh.h, config/sparc/sparc.h, + config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, + config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h, + config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes + FIRST argument. As needed, examine it and do nothing. + + * config/darwin.h, config/alpha/alpha.h, config/arm/pe.h, + config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, + config/mcore/mcore.h: Remove REDO_SECTION_INFO_P. + + * config/arm/t-pe (pe.o): Add dependencies. + + 2002-03-02 Kaveh R. Ghazi + + * a29k.h, alpha.h, arc.h, arm.h, avr.h, clipper.h, convex.h, + cris.h, d30v.h, elxsi.h, fr30.h, h8300.h, i370.h, i386.h, i860.h, + i960.h, ia64.h, m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h, + mips.h, mmix.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pdp11.h, + pj.h, romp.h, rs6000.h, s390.h, sh.h, sparc.h, stormy16.h, v850.h, + vax.h, we32k.h, xtensa.h: (BITS_PER_UNIT): Delete. + * defaults.h (BITS_PER_UNIT): Define. + * doc/tm.texi (BITS_PER_UNIT): Document default value. + + 2002-03-02 Kazu Hirata + + * config/h8300/h8300-protos.h: Add a prototype for + compute_a_shift_length. + * config/h8300/h8300.c (h8300_asm_insn_count): New. + (compute_a_shift_length): Likewise. + (h8300_adjust_insn_length): Do not adjust insn length of shift + insns. + * config/h8300/h8300.md (anonymous shift patterns): Use + compute_a_shift_length. + + Sat Mar 2 06:30:14 2002 Richard Kenner + + * config/sparc/sparc.c (sparc_initialize_trampoline): Use + trunc_int_for_mode. + + * emit-rtl.c (offset_address): Call update_temp_slot_address. + + 2002-03-01 Kaveh R. Ghazi + + * Makefile.in (CRTSTUFF_CFLAGS): Add -fno-zero-initialized-in-bss. + * doc/invoke.texi (-fno-zero-initialized-in-bss): Document. + * flags.h (flag_zero_initialized_in_bss): Declare. + * toplev.c (flag_zero_initialized_in_bss): New flag. + (lang_independent_options): Add flag_zero_initialized_in_bss. + * tree.c (initializer_zerop): New function. + * tree.h (initializer_zerop): Declare. + * varasm.c (assemble_variable): If we can emit bss, put zero + initializers in the bss section. + + 2002-03-02 Alan Modra + + * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): AIX assembler doesn't + like more than one symbol per .weak directive. + + 2002-03-01 Richard Henderson + + * config/ia64/ia64.c (ia64_initial_elimination_offset): Do not + adjust argument_pointer by pretend_args_size. + (ia64_va_start): Adjust va_start address by -pretend_args_size. + + 2002-03-01 Kazu Hirata + + * config/h8300/h8300.c (h8300_adjust_insn_length): Clean up. + + Fri Mar 1 20:59:14 CET 2002 Jan Hubicka + + * toplev.c (rest_of_compilation): Delete dead jumptables before + loop. + * flow.c (delete_dead_jumptables): Make global. + * rtl.h (delete_dead_jumptables): Declare. + + 2002-03-01 David Edelsohn + + * config/rs6000/rs6000.h (HANDLE_PRAGMA_PACK): Delete. + * config/rs6000/darwin.h (HANDLE_SYSV_PRAGMA): Define. + * config/rs6000/xcoff.h (COLLECT_EXPORT_LIST): Delete. + + 2002-03-01 Kazu Hirata + + * config/h8300/h8300-protos.h: Fix formatting. + * config/h8300/h8300.c: Likewise. + * config/h8300/h8300.h: Likewise. + + 2002-03-01 Kazu Hirata + + * config/h8300/h8300.c (print_operand): Support 16-bit + constant addresses. + * config/h8300/h8300.h (TINY_CONSTANT_ADDRESS_P): New. + + 2002-02-28 Richard Henderson + + * expmed.c (store_bit_field): Prevent generation of CONCATs; + pun complex values as integers; use gen_lowpart instead of + gen_rtx_SUBREG. + (extract_bit_field): Likewise. + + 2002-03-01 Alan Modra + David Edelsohn + + * doc/tm.texi (ASM_WEAKEN_DECL): Document. + (ASM_WEAKEN_LABEL): Mention ASM_WEAKEN_DECL. + (SUPPORTS_WEAK): Likewise. + * output.h (add_weak): Add tree param. + * varasm.c (add_weak): Likewise. Save decl. + (struct weak_syms): Add decl field. + (mark_weak_decls): New function. + (init_varasm_once): ggc_add_root mark_weak_decls. + (assemble_start_function): Use ASM_WEAKEN_DECL. + (assemble_variable): Likewise. + (assemble_alias): Likewise. + (declare_weak): Pass decl to add_weak. + (weak_finish): Use ASM_WEAKEN_DECL. Try to find decl. + (remove_from_pending_weak_list): Declare and define for + ASM_WEAKEN_DECL. + * c-pragma.c (handle_pragma_weak): Adjust add_weak call. + * c-pragma.h (HANDLE_PRAGMA_WEAK): Define if ASM_WEAKEN_DECL too. + * defaults.h (SUPPORTS_WEAK): Likewise. + * config/rs6000/linux64.h (ASM_DECLARE_FUNCTION_NAME): Don't emit + .weak for code sym. Do emit .size for descriptor sym. + (ASM_DECLARE_FUNCTION_SIZE): Define. + * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Define. + (ASM_OUTPUT_DEF_FROM_DECLS): Don't emit .weak here. Don't output + .lglobl unless TARGET_XCOFF. Formatting fixes. + * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't emit + .weak for code sym. + (HANDLE_PRAGMA_WEAK): Remove. + (ASM_WEAKEN_LABEL): Remove. + * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Define. + + 2002-03-01 Jason Merrill + + * tree.h (TARGET_EXPR_SLOT, TARGET_EXPR_INITIAL): New macros. + (TARGET_EXPR_CLEANUP): New macro. + + 2002-02-28 Steve Ellcey + + * doc/rtl.texi (SUBREG_PROMOTED_UNSIGNED_P): Change definition + to take ptr_extend into account as third type of extension. + (SUBREG_PROMOTED_UNSIGNED_SET): Definition of new macro to set bit + fields used by SUBREG_PROMOTED_UNSIGNED_P. + * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): New macro. + (SUBREG_PROMOTED_UNSIGNED_P): Change to return -1 as well as 0 or 1. + * calls.c (precompute_arguments): Use new macro. + (expand_call): Ditto. + * combine.c (nonzero_bits): Ditto. + (record_promoted_value): Ditto. + * expr.c (store_expr): Ditto. + (expand_expr): Ditto. + * function.c (assign_parms): Ditto. + + 2002-02-28 Alexandre Oliva + + * gcc.c (init_gcc_specs): Get -static and -static-libgcc to + override -shared and -shared-libgcc. + + 2002-02-28 David O'Brien + + * config.gcc (sparc64-*-freebsd): Explicitly accept a cpu specification + of "ultrasparc". + * config/sparc/freebsd.h: Do not use MASK_FASTER_STRUCTS. It appears + to be broken. + + 2002-02-28 Richard Henderson + + * config/ia64/ia64.c (ia64_adjust_cost): All non-MM consumers have + 4 cycle latency from MM producers. + (ia64_internal_sched_reorder): Likewise with pipeline flush. + + 2002-02-28 Jakub Jelinek + + * mklibgcc.in: Don't use GNU make extension. + + 2002-02-28 Neil Booth + + * c-parse.in (STATIC): New terminal. + (scspec): New non-terminal. Update productions accordingly. + (program): Remove bogus ifc / end ifc. + (array_declarator): Simplify production using STATIC. + + 2002-02-28 Jim Meyering + + * cpplex.c (cpp_parse_escape): Restore mistakenly-removed code: + \a still means TARGET_BELL. + + 2002-02-28 Richard Henderson + + * haifa-sched.c (sched_emit_insn): New. + (schedule_block): Use last_scheduled_insn to track last insn. + * sched-int.h (sched_emit_insn): Prototype. + * config/ia64/ia64.c (last_issued): Remove. + (ia64_variable_issue): Don't set it. + (nop_cycles_until): Use sched_emit_insn. + + 2002-02-28 Andrew MacLeod + + * config/sparc/sparc.c (sparc64_initialize_trampoline): Generate sign + extended constants. + + 2002-02-28 Kazu Hirata + + * config/h8300/h8300.c: Fix formatting. + * config/h8300/h8300.h: Likewise. + + 2002-02-28 Marek Michalkiewicz + + * config/avr/avr.c (avr_hard_regno_mode_ok): Do not allow r29 + which may overwrite the high byte of the frame pointer. + + 2002-02-28 Bo Thorsen + + * config/i386/linux64.h (LINK_SPEC): Fix 32/64 bit compilation. + (STARTFILE_SPEC): Add 64 bit files. + (ENDFILE_SPEC): Likewise. + + 2002-02-28 Jason Merrill + + * c-decl.c (finish_function): Only warn about missing return + statement with -Wreturn-type. + + Don Feb 28 11:24:30 CET 2002 Jan Hubicka + + * cfgrtl.c (purge_dead_edges): Fix handling of EH edges. + + * i386.h (CONDITIONAL_REGISTER_USAGE): Do not write to + PIC_OFFSET_TABLE_REGNUM when it is INVALID_REGNUM + + Don Feb 28 11:07:36 CET 2002 Jan Hubicka + + * basic-block.h (BB_REACHABLE): Renumber. + (BB_DIRTY, BB_NEW): New flags. + (clear_bb_flags): Declare. + (update_life_info_in_dirty_blocks): Declare. + * cfg.c (clear_bb_flags): New function. + * cfgrtl.c (create_basic_block_structure): Set flags to BB_NEW. + * emit-rtl.c (add_insn_after, add_insn_before, remove_insn, + reorder_insns, emit_insn_after): Mark block as dirty. + * flow.c (update_life_info): Fix clearing of PROP_LOG_LINKS. + (update_life_info_in_dirty_blocks): New function. + * recog.c (apply_change_group): Dirtify block. + + * cse.c (cse_insn): Reorder emitting of jump insn to keep + cfg consistent. + * gcse.c (delete_null_pointer_checks): Likewise. + + * toplev.c (dump_file_index): Move cse2 after bp, + add DFI_null + (dump_file_info): Similary. + (rest_of_compilation): Avoid most of CFG rebuilds; + do first if converision after null pointer checks, do cse2 + after branch prediction; avoid full liveness rebuild after + initializing subregs. + * invoke.texi (-d options): Document -du, renumber. + + * cfgcleanup.c (bb_flags): Remove BB_UPDATE_LIFE. + (notice_new_block): Do not set BB_UPDATE_LIFE. + (try_forward_edges, merge_blocks_move_predecessor_nojumps, + merge_blocks_move_successor_nojumps, merge_blocks, + try_crossjump_to_edge): Likewise. + (try_optimize_cfg): Likewise; use update_life_info_in_dirty_blocks. + * cfgrtl.c (merge_blocks_nomove): Copy b's flags to a. + * ifcvt.c (SET_UPDATE_LIFE, UPDATE_LIFE): Kill. + (merge_of_block): Do not use life_data_ok. + (find_if_case_1): Do not use SET_UPDATE_LIFE. + (if_convert): Use BB_DIRTY mechanizm to update life. + * lcm.c (optimize_mode_switching): Update + update_life_info_in_dirty_blocks + + 2002-02-28 Neil Booth + + * Makefile.in (integrate.o): Update. + * c-decl.c (copy_lang_decl): Rename. + * c-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. + * integrate.c: Include langhooks.h. + (copy_decl_for_inlining): Update to use langhook. + * langhooks-def.h (lhd_do_nothing_t, + LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): New. + (LANG_HOOKS_INITIALIZER): Update. + * langhooks.c (lhd_do_nothing_t): New. + * langhooks.h (struct lang_hooks): Add dup_lang_specific_decl. + * tree.h (copy_lang_decl): Remove. + objc: + * objc-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. + + 2002-02-27 Andrew MacLeod + + * dwarf2out.c (stack_adjust_offset): Add support for POST_INC, + POST_DEC, and POST_MODIFY. + + 2002-02-27 Zack Weinberg + + * c-typeck.c (digest_init): Remove unused parameter; all + callers changed. + + 2002-02-27 Geoffrey Keating + + * expmed.c (expand_shift): Correctly test for low part of a + subreg. + + 2002-02-27 Ulrich Weigand + + * config/s390/s390.c (s390_chunkify_pool): Do not confuse + insn UIDs with insn addresses. + + 2002-02-27 Zack Weinberg + + * c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in, + c-tree.h, c-typeck.c, cppexp.c, cpplex.c, cpplib.c, cpplib.h, + cppmacro.c, objc/lang-specs.h, objc/objc-act.c, + builtin-types.def, builtins.def, dwarf2out.c, dwarfout.c, + gcc.c, toplev.c: Delete code implementing -traditional mode. + + * doc/bugreport.texi, doc/cpp.texi, doc/extend.texi, + doc/invoke.texi, doc/standards.texi, doc/trouble.texi: + Document removal of -traditional mode for compilation, and + remove documentation only relevant to that mode. + + * config/nextstep.h, config/ptx4.h, config/svr4.h, + config/convex/convex.h, config/d30v/d30v.h, + config/i386/dgux.h, config/i386/osf1elf.h, + config/i386/osfelf.h, config/i386/osfrose.h, + config/i386/sco5.h, config/i386/sol2.h, config/m68k/a-ux.h, + config/m68k/hp310.h, config/m88k/dgux.h, + config/m88k/dguxbcs.h, config/m88k/luna.h, config/m88k/m88k.c, + config/m88k/m88k.h, config/m88k/openbsd.h, + config/mips/abi64.h, config/mips/osfrose.h, + config/mips/svr4-5.h, config/mips/svr4-t.h, + config/sparc/sol2-sld-64.h, config/sparc/sol2.h, + config/stormy16/stormy16.h: Remove all references to + -traditional from target specs. Delete all mention of the + no-longer-necessary TRADITIONAL_RETURN_FLOAT macro. Also + delete a couple of commented-out definitions of + DOLLARS_IN_IDENTIFIERS, with (incorrect) commentary referring + to -traditional. + + * system.h: Poison TRADITIONAL_RETURN_FLOAT. + * doc/tm.texi: Remove mention of TRADITIONAL_RETURN_FLOAT macro. + + 2002-02-27 Zack Weinberg + + * mklibgcc.in: Don't use \n in a line subject to + interpretation by echo. + + 2002-02-27 Graham Stott + + * config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DELC): + Constify NAME. + + * loop.c (prescan_loop): Handle PARALLEL. + + * unroll.c (loop_iterations): Return 0 if the add_val for + a BIV is REG. + + * final.c (output_operand_lossage): Constify PFX_STR. + + * df.c (df_insn_refs_record): Use XEXP (x, 0) for USE. + + Wed Feb 27 10:45:19 CET 2002 Jan Hubicka + + * linux64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove. + * x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Allways define. + + Wed Feb 27 10:39:20 CET 2002 Jan Hubicka + + * linux64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Define. + + 2002-02-27 Neil Booth + + * cpplex.c (_cpp_lex_token): Handle directives in macro + arguments. + * cpplib.c (_cpp_handle_directive): Save and restore state + if parsing macro args when entering a directive. + * cppmacro.c (collect_args): No need to handle directives + in macro arguments. + (enter_macro_context, replace_args): Use the original macro + definition in case it was redefined whilst collecting arguments. + doc: + * cpp.texi: Update. + + 2002-02-26 David Edelsohn + + * config/rs6000/aix43.h (THREAD_MODEL_SPEC): Delete. + * config/rs6000/aix51.h (THREAD_MODEL_SPEC): Delete. + * config/rs6000/rs6000.c (rs6000_return_addr): Use efficient + method on AIX. + * config/rs6000/rs6000.md (movsi_low): Use gpc_reg_operand. + (movsi_low_st, movdf_low, movdf_low_st, movsf_low, movsf_low_st): Same. + (load_toc_v4_PIC_2): Same. + + 2002-02-26 Alan Modra + + * config/rs6000/rs6000.md (load_toc_aix_di): Handle TARGET_RELOCATABLE. + + 2002-02-26 Richard Henderson + + * config/alpha/alpha.md (ashldi_se): Re-enable. + + 2002-02-26 Richard Henderson + + * config/alpha/alpha.c (alpha_encode_section_info): Examine + MODULE_LOCAL_P; improve commentary. + + 2002-02-26 Zack Weinberg + + * doc/cpp.texi: Clarify documentation of relationship between + #line and #include. + + 2002-02-26 Kazu Hirata + + * config/h8300/h8300-protos.h: Update the prototype for + compute_logical_op_length. Add the prototype for + compute_logical_op_cc. + * config/h8300/h8300.c (compute_logical_op_length): Figure out + code from operands. + (compute_logical_op_cc): New. + * config/h8300/h8300.md: Combine all the logical op patterns + in HImode and SImode. Use compute_logical_op_cc. + + 2002-02-26 Kelley Cook + + * config/i386/i386.c (print_operand): Don't append ATT-style + length suffixs to x87 opcodes when in Intel mode. + + 2002-02-26 Ryan T. Sammartino + + * emit-rtl.c (gen_const_vector_0): Remove TYPE argument. + (init_emit_once): Update calls. + * fixinc/gnu-regex.c (_GNU_SOURCE): Remove. + (init_syntax_once): Prototype. + + 2002-02-26 John David Anglin + + * pa-linux.h (LIB_SPEC): Update definition. + * pa32-linux.h (LINK_COMMAND_SPEC): Delete. + + 2002-02-26 Richard Henderson + + * config/ia64/ia64.c (nop_cycles_until): Do init_insn_group_barriers + if we emitted a stop bit. + + 2002-02-26 Jakub Jelinek + + * configure.in (libgcc_visibility): Substitute. + * configure: Rebuilt. + * mklibgcc.in: If libgcc_visibility = yes, make libgcc.a global + defined symbols .hidden. + + 2002-02-26 Jakub Jelinek + + * attribs.c (c_common_attribute_table): Add visibility. + (handle_visibility_attribute): New function. + * varasm.c (assemble_visibility): New function. + * output.h (assemble_visibility): Add prototype. + * tree.h (MODULE_LOCAL_P): Define. + * crtstuff.c (__dso_handle): Use visibility attribute. + * config/i386/i386.h (ENCODE_SECTION_INFO): Set SYMBOL_REF_FLAG + for MODULE_LOCAL_P symbols too. + * config/ia64/ia64.c (ia64_encode_section_info): Handle + MODULE_LOCAL_P symbols the same way as local symbols. + Add SDATA_NAME_FLAG_CHAR even if decl was explicitely forced + into .sdata/.sbss by the user. + * doc/extend.texi (Function Attributes): Document visibility + attribute. + + 2002-02-26 Jakub Jelinek + + PR debug/5770 + * dwarf2out.c (rtl_for_decl_location): Return CONST_STRING for + STRING_CST initializer spanning the whole variable without + embedded zeros. + If expand_expr returned MEM, don't use it. + + 2002-02-26 Alexandre Oliva + + * dwarf2out.c (gen_inlined_subroutine_die): If block is abstract, + generate a die for the lexical block. + + 2002-02-26 Kazu Hirata + + * config/h8300/h8300-protos.h: Add a prototype for + compute_logical_op_length. + * config/h8300/h8300.c (compute_logical_op_length): New. + * config/h8300/h8300.md (anonymous logical patterns): Use + compute_logical_op_length for length. + + 2002-02-26 Aldy Hernandez + + * dwarf2out.c (modified_type_die): Do not call type_main_variant + for vectors. + (gen_type_die): Same. + + * attribs.c (handle_vector_size_attribute): Set debug information. + + 2002-02-26 Daniel Egger + + * config/rs6000/rs6000.md: Swap define_insn attributes to + fix incorrect generation of merge high instructions instead + of merge low. + + 2002-02-26 Aldy Hernandez + + * c-typeck.c (really_start_incremental_init): Use + bitsize_zero_node for vectors. + + 2002-02-26 Aldy Hernandez + + * config/rs6000/rs6000.md (get_vrsave_internal): Fix typo. + ("*set_vrsave_internal"): Same. + + 2002-02-25 Richard Henderson + + * expr.c (expand_expr) [MULT_EXPR]: Do not apply distributive law + in EXPAND_SUM case. Use host_integerp/tree_low_cst. + + 2002-02-25 Jakub Jelinek + + PR target/5755 + * config/i386/i386.c (ix86_return_pops_args): Only pop + fake structure return argument if it was passed on the stack. + + 2002-02-25 Jason Merrill + + * attribs.c (decl_attributes): Also re-layout PARM_DECL and + RESULT_DECL. + + 2002-02-25 Alexandre Oliva + + * gcc.c (init_gcc_specs): Get -shared-libgcc along with -shared to + link with shared_name only. + * doc/invoke.texi (Link Options): Document new behavior. + + 2002-02-25 Aldy Hernandez + + * c-typeck.c (push_init_level): Handle vectors. + + 2002-02-25 Alexandre Oliva + + * config/sparc/sparc.c (const64_high_operand): Zero-extend + operands of SPARC_SETHI_P. + (input_operand): Likewise. + (sparc_emit_set_const32): Likewise. + * config/sparc/sparc.h (SPARC_SETHI_P): Disregard TARGET_ARCH64. + (SPARC_SETHI32_P): Zero-extend operand from 32 bits. + (CONST_OK_FOR_LETTER_P): Use SETHI32 for `K'. Add `N' as SETHI. + * config/sparc/sparc.md (movdi_insn_sp64_novis): Use `N'. + (movdi_insn_sp64_vis): Likewise. + (movdi split, movdf split): Use SETHI32. + * doc/md.texi: Document SPARC constraints L, M and N. + + 2002-02-25 Aldy Hernandez + + * config/rs6000/rs6000.md ("get_vrsave_internal"): New. + ("*set_vrsave_internal"): use mfspr for Darwin. + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Call + gen_get_vrsave_internal. + + Sun Feb 24 16:38:56 2002 Richard Kenner + + * optabs.c (widen_operand): Properly handle CONST_INT for NO_EXTEND. + + 2002-02-24 Neil Booth + + * cpplex.c (cpp_interpret_charconst): Get signedness or + otherwise of wide character constants correct. + * cppexp.c (lex): Get signedness of wide charconsts correct. + + Sun Feb 24 07:41:31 2002 Richard Kenner + + * optabs.c (widen_operand): Only call convert_modes for + promoted SUBREG if signedness matches. + * config/alpha/alpha.md (*addsi_se2, *subsi_se2): New patterns. + + 2002-02-23 Neil Booth + + * cpplib.c (glue_header_name): Use local buffer to build up + header name. + + 2002-02-23 Neil Booth + + * doc/cpp.texi, doc/invoke.texi: Update documentation for -MM. + + 2002-02-23 Kazu Hirata + + * config/h8300/h8300.c (output_simode_bld): Handle H8/300 and + H8/300[HS] separately. + * config/h8300/h8300.md: Remove the early clobber constraint + from bit field patterns. + + 2002-02-23 Kazu Hirata + + * config/h8300/h8300.md (mulqihi3): Tighten predicates to + register_operand. + (mulhisi3): Likewise. + (umulqisi3): Likewise. + (umulhisi3): Likewise. + + 2002-02-23 Neil Booth + + * cppinit.c (output_deps): Correct test for stdout output. + (init_dependency_output): Cure warning. + + Sat Feb 23 08:42:47 2002 Richard Kenner + + * expr.c (store_expr): When converting expression to promoted + equivalent type, allow using SUBREG_REG of TARGET as the target + of the expansion of EXP. + * loop.c (basic_induction_var, case SUBREG): Always look inside. + * config/alpha/alpha.c (rtx_equiv_function_matters): Delete decl. + (alpha_emit_set_const): Handle SImode when can't make new pseudos. + (alpha_emit_set_const_1, alpha_sa_mask): Use no_new_pseudos. + * config/alpha/alpha.md (addsi3, subsi3): Don't use if optimizing. + + 2002-02-23 Joseph S. Myers + + * doc/contribute.texi, doc/extend.texi, doc/install.texi, + doc/invoke.texi, doc/md.texi, doc/passes.texi, doc/rtl.texi, + doc/standards.texi, doc/tm.texi: Remove trailing whitespace. + + 2002-02-23 Jakub Jelinek + + PR optimization/5747 + * loop.c (scan_loop): Update reg info if move_movables created new + pseudos. + + 2002-02-23 David Edelsohn + + * gcc.c (init_gcc_spec): Revert last change. + + 2002-02-23 David Edelsohn + + * config/rs6000/rs6000.md (load_toc_aix_{si,di}): Use + gpc_reg_operand constraint. + + 2002-02-23 Alan Modra + + * config/rs6000/rs6000.c (num_insns_constant): Fix formatting. + Simplify comparison of `low'. + (add_operand): Fix formatting. + (non_add_cint_operand): Use CONST_OK_FOR_LETTER_P. + (mask_operand): Disallow mask to wrap in 64-bit mode. + (rs6000_stack_info): Remove redundant test setting push_p. + (output_toc): Fix formatting. + * config/rs6000/rs6000.md (boolsi3, boolcsi3 splitters): Use + cc_reg_not_cr0_operand constraint. + (booldi3, boolcdi3 splitters): Same. + + 2002-02-23 Aldy Hernandez + + * config/rs6000/altivec.h: Add extra level of parentheses on casts. + + 2002-02-22 David Edelsohn + + * gcc.c (init_gcc_spec): Do not link with static libgcc.a if + gcc invoked with -shared-libgcc. + + 2002-02-22 Jakub Jelinek + + PR c++/5748 + * stmt.c (expand_anon_union_decl): Set TREE_USED on the anon union + decl if any of elements was TREE_USED. + + 2002-02-22 Alexandre Oliva + + * config/sparc/sol2.h: Don't include sys/mman.h. + * config/sparc/sparc.c (arith_operand): Use SMALL_INT32. + (arith_4096_operand): Don't throw high bits away. + (const64_operand): Take sign extension of CONST_INTs into account. + (const64_high_operand, sparc_emit_set_const32): Likewise. + (GEN_HIGHINT64): Likewise. + (sparc_emit_set_const64_quick1): Likewise. + (const64_is_2insns): Likewise. + (print_operand): Use trunc_int_for_mode for sign extension. + * config/sparc/sparc.h (SMALL_INT32): Likewise. + * config/sparc/sparc.md (movqi): Sign-extend CONST_DOUBLE + chars. Assume CONST_INT is already properly sign-extended. + (movdi split): Sign-extend each SImode part. + (andsi3 split): Don't mask high bits off, so that result + remains properly sign-extend. + (iorsi3 split): Likewise. + (xorsi3 split): Likewise. + + 2002-02-22 Richard Sandiford + + * fold-const.c (fold): Fix typo in comments. + + 2002-02-21 Diego Novillo + + * Makefile.in (langhooks.o): Update dependencies. + + 2002-02-21 Diego Novillo + + * langhooks.c: Include flags.h. + + 2002-02-21 Aldy Hernandez + + * testsuite/gcc.dg/attr-alwaysinline.c: New. + + * c-common.c (c_common_post_options): Set inline trees by + default. + + * doc/extend.texi (Function Attributes): Document always_inline + attribute. + Update documentation about inlining when not optimizing. + + * cp/decl.c (duplicate_decls): Merge always_inline attribute. + + * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 + unless DECL_ALWAYS_INLINE. + + * c-objc-common.c (c_cannot_inline_tree_fn): Do not inline at -O0 + unless DECL_ALWAYS_INLINE. + (c_disregard_inline_limits): Disregard if always_inline set. + + * langhooks.c (lhd_tree_inlining_disregard_inline_limits): + Disregard if always_inline set. + (lhd_tree_inlining_cannot_inline_tree_fn): Do not inline at -O0 + unless DECL_ALWAYS_INLINE. + + * attribs.c (handle_always_inline_attribute): New. + (c_common_attribute_table): Add always_inline. + + * config/rs6000/altivec.h: Add prototypes for builtins + requiring the always_inline attribute. + + 2002-02-21 Eric Christopher + + * expmed.c (store_bit_field): Try to simplify the subreg + before generating a new one when when the mode size of + value is less than maxmode. + + 2002-02-21 Richard Henderson + + * emit-rtl.c (offset_address): Use simplify_gen_binary rather + than gen_rtx_PLUS to form the sum. + * explow.c (force_reg): Rearrange to not allocate new pseudo + when force_operand returns a register. + * expr.c (expand_assignment): Allow offset_rtx expansion to + return a sum. Do not force addresses into registers. + (expand_expr): Likewise. + * simplify-rtx.c (simplify_gen_binary): Use simplify_plus_minus + to canonicalize arithmetic that didn't simpify. + (simplify_plus_minus): New argument force; update + all callers. Don't split CONST unless we can do something with it, + and wouldn't lose the constness of the operands. + + * config/i386/i386.c (legitimize_pic_address): Recognize UNSPECs + that we generated earlier. + + 2002-02-21 Tom Tromey + + * dwarf2out.c (DWARF_LINE_MIN_INSTR_LENGTH): Removed. + (output_line_info): Use constant `1', with a long explanatory + comment. + * system.h (DWARF_LINE_MIN_INSTR_LENGTH): Poison. + + Thu Feb 21 22:43:44 2002 J"orn Rennecke + + * jump.c (redirect_jump): If old label has no UID, don't try to + delete it. + + Thu Feb 21 21:17:21 2002 J"orn Rennecke + + * sh.md (insv): Provide byte offsets for gen_rtx_SUBREG. + If input is constant, do shifts at compile time. + + 2002-02-21 Joseph S. Myers + + * doc/extend.texi: Fix some more overfull hboxes. + + 2002-02-21 Jakub Jelinek + + PR optimization/4994 + * config/i386/i386.md (movsi_1, movsf_1): Support MMX -> MMX + register moves. + + 2002-02-21 Jakub Jelinek + + PR c++/4574 + * expr.h (expand_and): Add mode argument. + * expmed.c (expand_and): Add mode argument. + (expand_mult_highpart_adjust, emit_store_flag): Adjust callers. + * expr.c (store_field, expand_expr, do_store_flag): Likewise. + * except.c (expand_builtin_extract_return_addr): Likewise. + * config/alpha/alpha.c (alpha_initialize_trampoline): Likewise. + * config/sparc/sparc.c (sparc_initialize_trampoline): Likewise. + * config/c4x/c4x.h (INITIALIZE_TRAMPOLINE): Likewise. + Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x). + * config/c4x/c4x.md: Use GEN_INT (x) instead of + gen_rtx (CONST_INT, VOIDmode, x). + + 2002-02-21 Jakub Jelinek + + PR c/4697: + * stmt.c (warn_if_unused_value): Move side effects test once more. + + 2002-02-20 Torbjorn Granlund + + * config/avr/avr.md: Add more patterns for mized-mode add and subtract + (addsi3_zero_extend, subhi3_zero_extend1, subsi3_zero_extend). + + Thu Feb 21 16:20:46 2002 Alexandre Oliva + + * rtlanal.c (replace_rtx): Don't make a CONST_INT the operand of + SUBREG or ZERO_EXTEND. + + Thu Feb 21 15:35:46 2002 J"orn Rennecke + + * sh.h (current_function_anonymous_args): Remove. + (SETUP_INCOMING_VARARGS): Don't set it - just check that one + of current_function_varargs and current_function_stdarg is set. + * sh.c (sh_expand_prologue): Check current_function_varargs / + current_function_stdarg / TARGET_SH5 instead of + current_function_anonymous_args. + + * sh64.h (TARGET_VERSION): Define. + + 2002-02-20 David Edelsohn + + * config/rs6000/rs6000.h (EPILOGUE_USES): Conditionalize + VRSAVE_REGNO on TARGET_ALTIVEC. + + 2002-02-20 Alan Modra + + * config/rs6000/rs6000.c (includes_lshift_p): Mask irrelevant + bits of SImode const_int. + (includes_rshift_p): Likewise. + (print_operand): Call mask_operand and mask64_operand with correct + mode. + (rs6000_output_function_epilogue): Pad traceback table to word. + * config/rs6000/rs6000.h (MASK_64BIT): Correct comment. + (EXTRA_CONSTRAINT, 'S' and 'T'): Call mask_operand and + mask64_operand with correct mode. + (FUNCTION_ARG_REGNO_P): Correct parentheses. + + 2002-02-20 Jakub Jelinek + + PR debug/4461 + * varasm.c (get_pool_constant_mark): New. + * rtl.h (get_pool_constant_mark): Add prototype. + * dwarf2out.c (mem_loc_descriptor): A pool constant cannot + be represented if it has not been output. + + 2002-02-20 Alexandre Oliva + + * combine.c (do_SUBST): Sanity check substitutions of + CONST_INTs, and reject them in SUBREGs and ZERO_EXTENDs. + (subst): Simplify SUBREG or ZERO_EXTEND instead of SUBSTing a + CONST_INT into its operand. + (known_cond): Likewise, for ZERO_EXTEND. + * simplify-rtx.c (simplify_unary_operation): Fix condition to + allow for simplification of wide modes. Reject CONST_INTs in + ZERO_EXTEND when their actual mode is not given. + + 2002-02-20 Alexandre Oliva + + * c-decl.c (pushdecl): If no global declaration is found for an + extern declaration in block scope, try a limbo one. + + 2002-02-20 Jakub Jelinek + + PR c++/4401 + * c-common.c (pointer_int_sum): Moved from... + * c-typeck.c (pointer_int_sum): ...here. + * c-common.h (pointer_int_sum): Add prototype. + + 2002-02-20 Jakub Jelinek + + PR c++/5713 + * c-decl.c (duplicate_decls): Return 0 if issued error about + redeclaration. + + 2002-02-20 Roger Sayle + Jakub Jelinek + + PR c/4389 + * tree.c (host_integerp): Ensure that the constant integer is + representable in a HOST_WIDE_INT or an unsigned HOST_WIDE_INT + when pos is zero or nonzero respectively. Clarify comment. + * c-format.c (check_format_info_recurse): Fix host_integerp + usage; the pos argument should be zero when assigning to a + signed HOST_WIDE_INT. + + 2002-02-20 Richard Henderson + + * config/i386/i386.c (ix86_expand_vector_move): Use the mode + of the operand, rather than assuming TImode. + (ix86_expand_binop_builtin): Cope with commutative patterns + using nonimmediate_operand for both operands. + (ix86_expand_timode_binop_builtin): Likewise. + (ix86_expand_store_builtin): Validate operand 1. + (ix86_expand_unop1_builtin): Likewise. + + 2002-02-20 Philip Blundell + + PR 5705 + * config/arm/arm.h (HARD_REGNO_RENAME_OK): New macro. + + 2002-02-20 Richard Henderson + + PR c/5615 + * expr.h (ARGS_SIZE_TREE): Convert size.var to ssizetype. + + 2002-02-20 Tom Tromey + + * config/fr30/fr30.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. + * config/sh/sh.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. + * config/pj/pj.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. + * config/cris/cris.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. + * dwarf2out.c (DWARF_LINE_MIN_INSTR_LENGTH): Define + unconditionally. + + Wed Feb 20 00:03:25 EST 2002 Alan Matsuoka + + * config/rs6000/rs6000.h (LEGITIMATE_OFFSET_ADDRESS_P): Look + for (const_int 0) in X not just INTVAL. + + 2002-02-20 Joseph S. Myers + + * doc/extend.texi: Avoid or reduce overfull hboxes. + + 2002-02-20 Diego Novillo + + * expmed.c (store_bit_field): Do not store bit fields using SUBREG + operations if the field does not start at a mode boundary. + + 2001-02-20 Joel Sherrill + + * config/a29k/rtems.h, config/arm/rtems-elf.h, config/h8300/rtems.h, + config/mips/rtems.h: Use new style of -Asystem= rather than -Asystem(). + Also done for -Acpu and -Amachine. + + 2002-02-20 Neil Booth + + * cppinit.c (init_dependency_output): Take deps output file + from -o if none given with -MF. Suppress normal output. + * gcc.c (cpp_unique_options): Have -M and -MM imply -E. + * doc/cpp.texi, doc/invoke.texi: Update. + + 2002-02-19 Zack Weinberg + + * toplev.c (output_quoted_string): Write unprintable + characters with octal escapes. + + 2002-02-19 David Edelsohn + + * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set + really_call_used[VRSAVE_REGNO] if not Altivec. + + 2002-02-19 Alan Modra + + * config/rs6000/rs6000.c (u_short_cint_operand): Mask op with + MODE_MASK. + (constant_pool_expr_1): Fix formatting. + (rs6000_legitimize_reload_address): Likewise. + + Tue Feb 19 20:13:57 2002 Richard Kenner + + * config/sparc/sparc.md (nonlocal_goto): Use hard_frame_pointer_rtx + now that we have one. + + 2002-02-19 Zack Weinberg + + * tree.h (struct tree_common): Remove aux. Add unused_0 at + end of first block of bitfields (which was only seven bits); + rename dummy to unused_1; remove comment which is no longer true. + + 2002-02-19 Gaute B Strokkenes + + * doc/c-tree.texi (Classes, TYPE_BINFO): Fix typo. + + 2002-02-19 Philip Blundell + + PR 5399 + * config/arm/arm.h (THUMB_LEGITIMATE_CONSTANT_P): Accept anything + if generating PIC. + + PR 5054 + * config/arm/arm.md (call_insn) [TARGET_THUMB]: Use + arm_is_longcall_p rather than inspecting call-type cookie + directly. + (call_value_insn) [TARGET_THUMB]: Likewise. + + 2002-02-19 Graham Stott + + * config/i386/i386.c (ix86_expand_builtin): Fix typo. + + 2002-02-19 David Edelsohn + + * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC): Look in /lib64. + ({STARTFILE,ENDFILE}_LINUX_SPEC): Define. + (FP_SAVE_INLINE): Delete. + + * config/rs6000/sysv4.h (ENDFILE_SPEC): Add crtsaveres.o. + * config/rs6000/eabi.asm: Remove ABI save restore routines. + * config/rs6000/t-ppccomm: Build crtsavres.o. + * config/rs6000/crtsavres.asm: New file. + + 2002-02-19 Philip Blundell + + * config/arm/arm.c (use_return_insn): Don't reject interrupt + functions. + (arm_compute_save_reg_mask): Save LR for interrupt functions too. + (output_return_instruction): Allow interrupt functions to return with + ldmfd sp!, {... pc}^. Use LDR to restore any single register. + (arm_expand_prologue): Subtract 4 before stacking LR in an + interrupt function. + + 2002-02-19 Philip Blundell + + * config/arm/arm.c (arm_encode_call_attribute): Operate on any + decl, not just FUNCTION_DECL. + (legitimize_pic_address): Handle local SYMBOL_REF like LABEL_REF. + (arm_assemble_integer): Likewise. + * config/arm/arm.h (ARM_ENCODE_CALL_TYPE): Allow any decl to be + marked local. + + 2002-02-19 matthew green + + * config.gcc (sparc-*-netbsdelf*): Enable target. + (sparc64-*-netbsd*): New target. + * config/sparc/netbsd-elf.h: New file. + * config/sparc/t-netbsd64: New file. + + 2002-02-19 Gaute B Strokkenes + + * doc/rtl.texi (Flags, MEM_SCALAR_P): Fix typo. + + 2002-02-19 Ryan T. Sammartino + + * doc/invoke.texi: explicitly list the style guidelines that + -Weffc++ checks for. + + Tue Feb 19 12:37:23 CET 2002 Jan Hubicka + + * regmove.c (regmove_optimize): Avoid increasing of register pressure. + + 2002-02-19 Neil Booth + + PR other/5718 + * gcc.c (cpp_unique_options): Treat -o as indicating object file + only if not -E. If -E, pass -o through to the preprocessor. + + 2002-02-19 Kazu Hirata + + * config/h8300/h8300.h (REGNO_REG_CLASS): Replace a literal + register number with an appropriate macro. + + 2002-02-19 Bryce McKinlay + + * doc/rtl.texi (Constants): Close @code tag. + + 2002-02-19 Aldy Hernandez + + * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. + ("mmx_uavgv4hi3"): Same. + ("pmulhrwv4hi3"): Same. + + * tree-inline.c (walk_tree): Handle vectors. + + * c-common.c (constant_expression_warning): Handle vectors. + (overflow_warning): Same. + + * sched-deps.c (sched_analyze_2): Handle vectors. + + * rtlanal.c (rtx_unstable_p): Handle vectors. + (rtx_varies_p): Same. + (count_occurrences): Same. + (regs_set_between_p): Same. + (modified_between_p): Same. + (modified_in_p): Same. + (volatile_insn_p): Same. + (volatile_refs_p): Same. + (side_effects_p): Same. + (may_trap_p): Same. + (inequality_comparisons_p): Same. + (replace_regs): Same. + (computed_jump_p_1): Same. + + * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th + argument. + (inner_mode_array): New. + (copy_rtx): Handle vectors. + (copy_most_rtx): Same. + (rtx_equal_p): Same. + (get_mode_alignment): Adjust for vectors. + + * resource.c (mark_referenced_resources): Handle vectors. + (mark_set_resources): Same. + + * reload1.c (eliminate_regs): Handle vectors. + (elimination_effects): Same. + (scan_paradoxical_subregs): Same. + + * reload.c (subst_reg_equivs): Handle vectors. + + * regrename.c (scan_rtx): Handle vectors. + + * regclass.c (reg_scan_mark_refs): Handle vectors. + + * recog.c (find_single_use_1): Handle vectors. + + * local-alloc.c (equiv_init_varies_p): Handle vectors. + (contains_replace_regs): Same. + (memref_referenced_p): Same. + + * integrate.c (copy_rtx_and_substitute): Handle vectors. + (subst_constants): Same. + + * genattrtab.c (attr_copy_rtx): Handle vectors. + (encode_units_mask): Same. + (clear_struct_flag): Same. + (count_sub_rtxs): Same. + + * gcse.c (want_to_gcse_p): Handle vectors. + (oprs_unchanged_p): Same. + (hash_expr_1): Same. + (oprs_not_set_p): Same. + (expr_killed_p): Same. + (compute_transp): Same. + (store_ops_ok): Same. + + * function.c (purge_addressof_1): Do not allow paradoxical subregs + of vectors. + (fixup_var_refs_1): Same. + (instantiate_virtual_regs_1): Same. + + * fold-const.c (operand_equal_p): Handle vectors. + (fold): Same. + (rtl_expr_nonnegative_p): Same. + + * flow.c (mark_used_regs): Handle vectors. + + * df.c (df_uses_record): Handle vectors. + + * cselib.c (cselib_subst_to_values): Handle vectors. + (cselib_mem_conflict_p): Same. + (hash_rtx): Same. + + * cse.c (canon_reg): Handle vectors. + (fold_rt): Same. + (cse_process_notes): Same. + (count_reg_usage): Same. + (canon_hash): Same. + + * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. + + * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. + + * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. + (gen_rtx): Handle CONST_VECTOR. + (gen_const_vector_0): New. + (copy_rtx_if_shared): CONST_VECTORs can be shared. + (reset_used_flags): Same. + (copy_insn_1): Same. + (initializer_constant_valid_p): Handle VECTOR_CST. + + * doc/c-tree.texi (Expression trees): Document VECTOR_CST. + + * doc/rtl.texi (Constants): Document const_vector. + (CONST0_RTX): Update for vectors. + (RTL sharing): Same. + + * print-tree.c (print_node): Add case for VECTOR_CST. + + * tree.h (TREE_VECTOR_CST_ELTS): New. + (struct tree_vector): New. + (union tree_node): Add vector node. + (build_vector): Add prototype. + + * tree.def (VECTOR_CST): New. + + * tree.c (build_vector): New. + + * expmed.c (make_tree): Handle CONST_VECTOR. + + * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. + (CONST_VECTOR_ELT): New. + (CONST_VECTOR_NUNITS): New. + + * machmode.h (GET_MODE_INNER): New. + (DEF_MACHMODE): Accept 8th arg. + + * machmode.def: Add 8th argument for vector inner mode. + Add inner vector modes for vectors. + + * rtl.def (VEC_CONST): Remove. + (CONST_VECTOR): New. + + * expr.c (clear_storage): Allow vectors. + (is_zeros_p): Handle VECTOR_CST. + + * varasm.c (output_constant_pool): Handle vectors. + (rtx_const): Add veclo and vechi fields. + (kind): Add RTX_VECTOR. + (decode_rtx_const): Add case for vector. + + * config/rs6000/rs6000-protos.h: Add zero_constant. + + * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector + constants. Force easy vector constants into memory. + (easy_vector_constant): New. + (emit_easy_vector_constant): New. + (rs6000_legitimize_reload_address): Do not generate bad reloads on + darwin. + + * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what + instruction does. + ("altivec_lvxl"): Same. + (altivec_lvebx): Same. + (altivec_lvehx): Same. + (altivec_lvewx): Same. + ("*movv4si_const0"): New. + ("*movv4sf_const0"): New. + ("*movv8hi_const0"): New. + ("*movv16qi_const0"): New. + + 2002-02-18 Kazu Hirata + + * config/h8300/h8300.c (notice_update_cc): Use + cc_status.value2. + + 2002-02-18 Kazu Hirata + + * config/h8300/h8300.md (divmod patterns): Change the + constraints for operands[1] to register_operand. + + 2002-02-18 Kazu Hirata + + * config/h8300/h8300-protos.h: Remove the prototype for + p_operand. + * config/h8300/h8300.c (p_operand): Remove. + * config/h8300/h8300.md: Replace p_operand with + const_int_operand. + + 2002-02-18 Philip Blundell + + * config/arm/arm.c (arm_compute_save_reg_mask): Fix typo in + comment. + (output_return_instruction): Allow use of LDR to unstack + return addresss even for interrupt handlers or when + interworking. If compiling for ARMv5, use interworking-safe + return instructions by default. Remove duplicated code and + lengthy "strcat" sequences. + + 2002-02-18 Franz Sirl + + * config/rs6000/sysv4.h (STARTFILE_SPEC): Use crtbeginT.o for -static. + (LINK_EH_SPEC): Define. + * config/rs6000/t-ppccomm (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. + + 2002-02-18 Ulrich Weigand + + * config/s390/s390.c (s390_emit_prologue): Do not set the + frame_related flag for call-clobbered registers. + + Mon Feb 18 15:07:35 CET 2002 Jan Hubicka + + * i386.c (classify_argument): Properly classify SSE/MMX modes and VOIDmode. + (construct_container): Fix handling of SSE operands. + (ix86_expand_builtin): Fix handling of 64bit pointers. + (mmx_maskmovq_rex): New pattern. + + Mon Feb 18 11:55:55 CET 2002 Jan Hubicka + + * regrename.c (kill_set_value): Handle subregs properly. + + 2002-02-18 David Billinghurst + + * objc/objc-act.c (handle_impent): Remove leading '*' + from objc_class_name. + + 2002-02-17 Richard Henderson + + * config/alpha/alpha.c (some_small_symbolic_operand, + some_small_symbolic_operand_1, split_small_symbolic_operand, + split_small_symbolic_operand_1): Rename from *symbolic_mem_op*. + Handle small SYMBOL_REFs anywhere, not just inside memories. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.h (PREDICATE_CODES): Update. + * config/alpha/alpha.md (small symbolic operand splitter): Update. + + 2002-02-17 Roland McGrath + + * config.gcc (powerpc-*-gnu-gnualtivec*, + powerpc-*-gnu*, powerpc64-*-gnu*): New configurations. + * config/rs6000/gnu.h: New file. + * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): + Grok "gnu" in rs6000_abi_name. + (ASM_SPEC, CC1_SPEC, LINK_START_SPEC, LINK_OS_SPEC, + CPP_ENDIAN_SPEC, CPP_SPEC, STARTFILE_SPEC, LIB_SPEC, ENDFILE_SPEC): + Grok -mcall-gnu analogous to -mcall-linux et al. + (LIB_GNU_SPEC, STARTFILE_GNU_SPEC, ENDFILE_GNU_SPEC, + LINK_START_GNU_SPEC, LINK_OS_GNU_SPEC, CPP_OS_GNU_SPEC): New macros. + (SUBTARGET_EXTRA_SPECS): Add *_os_gnu specs using them. + + 2002-02-17 Jakub Jelinek + + PR c/3444: + * c-typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit + shortening. + + 2002-02-17 Philipp Thomas + + * config/cris/cris.h: Undefine STARTFILE_SPEC and + ENDFILE_SPEC before (re)defining them. + + 2002-02-17 Kazu Hirata + + * config/h8300/h8300.c: Fix formatting. + * config/h8300/h8300.h: Likewise. + + 2002-02-17 Philipp Thomas + + * doc/tm.texi: Explain why empty strings should not be + marked for translation. + + 2002-02-17 Philipp Thomas + + * final.c (output_operand_lossage): Changed to accept + printf style arguments. Change calls where necessary. + * output.h (output_operand_lossage): Change declaration + accordingly. Update copyright. + * config/arc/arc.c config/fr30/fr30.c config/m32r/m32r.c + config/m88k/m88k.c : Adapt all calls to output_operand_lossage. + Update copyright date where necessary. + + * config/i386/i386.c (print_operand): Likewise. Remove use of + sprintf. + + * config/cris/cris.c (cris_operand_lossage): Likewise. + Rename parameter so that exgettext recognizes it as + translatable message. + (LOSE_AND_RETURN): Rename parameter to msgid. + + 2002-02-17 Kazu Hirata + + * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Replace a + hard coded register number with an appropriate macro. + (HARD_REGNO_MODE_OK): Likewise. + (ARG_POINTER_REGNUM): Likewise. + (STATIC_CHAIN_REGNUM): Likewise. + (RETURN_ADDRESS_POINTER_REGNUM): Likewise. + * config/h8300/h8300.md (define_constants): Define more + register numbers. + + 2002-02-17 Philipp Thomas + + * config/i386/i386.h: Don't mark empty strings for translation. + + 2002-02-16 H.J. Lu + + * config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): New. + + 2002-02-16 Zack Weinberg + + * cppinit.c (merge_include_chains): Check for brack being + NULL before attempting to merge it with qtail. + + 2002-02-16 Andrew Cagney + + * config/rs6000/netbsd.h (PREFERRED_DEBUGGING_TYPE): Set to + DBX_DEBUG. + + 2002-02-16 John David Anglin + + * pa/t-pa, pa/t-pro, som.h: Revert last patch. + + 2002-02-16 John David Anglin + + * pa/t-pa (LIB2FUNCS_EXTRA): Don't build lib2funcs.asm. + * pa/t-pro (LIB2FUNCS_EXTRA): Likewise. + * som.h (DO_GLOBAL_DTORS_BODY): Delete define. + + Sat Feb 16 13:48:50 2002 Richard Kenner + + * config/alpha/alpha.md (*movsi_nt_vms_nofix): Was *movsi_nt_vms; + now only if !TARGET_FIX. + (*movsi_nt_vms_fix): New pattern. + + 2002-02-16 Douglas B Rupp + + * config/alpha/alpha.c: Implement null frame procedure types on VMS. + (alpha_procedure_type): Replaces alpha_is_stack_procedure. + (alpha_sa_mask, alpha_sa_size): Reflect above change. + (alpha_pv_save_size, alpha_expand_prologue): Likewise. + (alpha_start_function, alpha_expand_epilogue): Likewise. + (unicosmk_gen_dsib): Likewise. + + Sat Feb 16 13:39:09 2002 Richard Kenner + + * expr.c (store_constructor): Handle target REG case for ARRAY_TYPE. + + 2002-02-16 Ulrich Weigand + + * config/s390/s390.c (pool_stop_uid, other_chunk, far_away, + check_and_change_labels, s390_final_chunkify): Delete. + (s390_split_branches, s390_chunkify_pool): New functions. + (s390_function_prologue): Call them. + + * config/s390/s390.h (S390_REL_MAX): Delete. + (S390_CHUNK_MAX, S390_CHUNK_OV): Adjust values. + + * config/s390/s390.md (cjump, icjump, jump): Fix length + attribute calculation. + + + 2002-02-15 David Edelsohn + + * config/rs6000/linux64.h (STRIP_NAME_ENCODING): Delete. + * config/rs6000/ppc-asm.h (JUMP_TARGET): Define for powerpc64. + + 2002-02-15 John David Anglin + + * gcc.c (init_gcc_specs): Revert patch from 2002-02-15. + * config/pa/pa-linux.h (LIB_SPEC): Likewise. + * config/pa/pa32-linux.h (LINK_COMMAND_SPEC): Likewise. + + 2002-02-15 Richard Sandiford + + * c-decl.c (grokdeclarator): Prevent a segfault on unnamed decls. + + 2002-02-15 Richard Sandiford + + * reload.c (find_dummy_reload): Check that an output register + is valid for its mode. + + 2002-02-14 Alexandre Oliva + + * combine.c (known_cond): After replacing the REG of a SUBREG, try + to simplify it. + + * function.c (assign_parms): Demote promoted argument passed by + transparent reference. + + 2001-02-14 Joel Sherrill + + * config/arm/rtems-elf.h, config/h8300/rtems.h: Removed redundant + -Acpu() and -Amachine() to eliminate warnings. + + 2002-02-14 Ulrich Weigand + + * config/s390/linux.h (ASM_OUTPUT_ALIGNED_BSS): New. + + 2002-02-14 Kazu Hirata + + * config/h8300/h8300-protos.h: Update the prototype for + const_costs. + * config/h8300/h8300.c (const_costs): Treat SET as a little + more expensive operation. + * config/h8300/h8300.h (DEFAULT_RTX_COSTS): Update the + reference to const_costs. + + 2002-02-14 Hans-Peter Nilsson + + * config.gcc (c4x-*-rtems*): Fix typo in tm_file setting. + + 2002-02-14 Jakub Jelinek + + PR c/5503: + * c-decl.c (duplicate_decls): If builtin type has TYPE_ARG_TYPES NULL, + use arguments from newtype. + + 2002-02-13 Eric Christopher + + * config/mips/mips.c (override_options): Add check for march/mipsX + on the same command line. Fix error message in cpu processing. + Remove architecture and ISA checks. + + 2002-02-14 Aldy Hernandez + + * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Adjust for vectors. + + * config/rs6000/sysv4.h (ROUND_TYPE_ALIGN): Add MAX. + + 2002-02-14 Aldy Hernandez + + * config/rs6000/rs6000.md ("*movv4si_internal"): Add m<-r and r<-r + alternatives. + ("*movv8hi_internal1"): Same. + ("*movv16qi_internal1"): Same. + ("*movv4sf_internal1"): Same. + + * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Do + not push_reload for altivec modes. + + 2002-02-13 Joel Sherrill + + * config.gcc (a29k-*-rtems), config/a29k/rtems.h: General cleanup across + all RTEMS targets including removal of #includes from config/*/rtems*.h + file and adding them to tm_file setting. Added xm_defines=POSIX to + many targets. + * config.gcc (c4x-*-rtems), config/c4x/rtems.h: Ditto. + * config.gcc (h8300-*-rtems), config/h8300/rtems.h: Ditto. + * config.gcc (hppa1.1-*-rtems), config/pa/rtems.h: Ditto. + * config.gcc (i960-*-rtems), config/i960/rtems.h: Ditto. + * config.gcc (m68k-*-rtems*), config/m68k/rtems.h, + config/m68k/rtemself.h: Ditto. + * config.gcc (mips*-*-rtems*), config/mips/rtems.h, + config/mips/rtems64.h: Ditto. + * config.gcc (powerpc-*-rtems*), config/rs6000/rtems.h: Ditto. + * config.gcc (sh-*-rtems*), config/sh/rtems.h, config/sh/rtemself.h: + Ditto. + * config.gcc (sparc-*-rtems*), config/sparc/rtems.h, + config/sparc/rtemself.h: Ditto. + * config.gcc (v850-*-rtems*), config/v850/rtems.h: Ditto. + * config.gcc (arm-rtems), config/arm/rtems-elf.h: Ditto plus moved + arm-rtems stanza closer to other arm-elf targets and made arm-rtems + more like arm-elf. + * config.gcc (i[34567]86-*-rtems*), config/i386/djgpp-rtems.h, + config/i386/rtems.h, config/i386/rtemself.h: Ditto plus i386-rtemself + target made more similar to i386-elf. + * config/i386/t-rtems-i386: Added soft float support and multilibs. + * config/m68k/t-m68kbare: Add 68040 and 68060 as multilib alternatives to + be similar to config/m68k/t-m68kelf. + * gthr-rtems.h: Encapsulate with extern "C" for C++. + + Wed Feb 13 23:41:15 CET 2002 Jan Hubicka + + * regmove.c (kill_value): Handle subregs. + + Wed Feb 13 23:34:30 CET 2002 Jan Hubicka + + * i386.md (mul patterns): Allow memory operand to be first; + add expanders where needed; fix constraints. + (min?f_nonieee, max?f_nonieee, SSE TImode patterns): + Allow memory operand to be the first. + + * i386.c (ix86_prepare_fp_compare_args): Fix condition for swapping + operands. + + 2002-02-13 Jakub Jelinek + + PR c/5681: + * expr.c (safe_from_p): Pass VOIDmode to true_dependence instead of + GET_MODE (x). + + 2002-02-13 Jakub Jelinek + + PR optimization/5547: + * config/i386/i386.c (i386_simplify_dwarf_addr): Simplify + all valid IA-32 address modes involving non-scaled %ebx and + GOT/GOTOFF as displacement. + + 2002-02-13 Ulrich Weigand + + * config/s390/s390.c (s390_final_chunkify): Re-run shorten_branches + after emitting ltorg insns. + + * config/s390/s390.md (*cmpdf_ccs_0, *cmpdf_ccs, *cmpsf_ccs_0, + *cmpsf_ccs, truncdfsf2_ieee, *adddf3, *addsf3, *subdf3, *subsf3, + *muldf3, *mulsf3, *divdf3, *divsf3, *negdf2, *negsf2, *absdf2, + *abssf2): Fix "op_type" attribute. + + 2002-02-13 Douglas B Rupp + + * mkconfig.sh: Avoid using a subshell redirect. + ($output.T): Change to $(output)T. + (ENABLE_NLS): Remove unneeded undef. + + * config/alpha/vms.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define. + * config/alpha/x-vms (libsubdir): Define. + + * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Handle + register frame procedures. Optimize retrieving context. + + * config/alpha/t-vms (MULTILIB_OPTIONS): Define. + (MULTILIB_DIRNAME, LIBGCC, INSTALL_LIBGCC): Likewise. + * config/alpha/vms.h (ASM_FILE_START): Write .arch directive. + + Wed Feb 13 09:45:08 2002 Richard Kenner + + * alias.c (find_base_term, case ZERO_EXTEND, case SIGN_EXTEND): + Make same change as for find_base_value. + + 2002-02-13 Kazu Hirata + + * config/h8300/h8300.h (MODES_TIEABLE_P): Accept a combination + of QImode and SImode. + + 2002-02-13 Kazu Hirata + + * config/h8300/h8300.c (h8300_adjust_insn_length): Correct the + length computation of movsi. + * config/h8300/h8300.md (movsi_h8300hs): Correct the length. + + 2002-02-13 Kazu Hirata + + * config/h8300/h8300.md (subqi3): Tighten the predicate for + operands[2] to register_operand. + + Wed Feb 13 10:35:56 CET 2002 Jan Hubicka + + * i386.md (fop_*_comm_*): allow nonimmediate in the first operand. + + 2002-02-12 Aldy Hernandez + + * config/rs6000/rs6000.md: Use predicate altivec_register_operand + for altivec_lvx* and altivec_stvx*. + ("*movv4si_internal"): Add constraint for loading from GPRs. + ("*movv8hi_internal1"): Same. + ("*movv16qi_internal1"): Same. + ("*movv4sf_internal1"): Same. + + * config/rs6000/rs6000.c (altivec_register_operand): New. + + * config/rs6000/rs6000.h (PREDICATE_CODES): Add + altivec_register_operand. + + 2002-02-13 Hans-Peter Nilsson + + * config/mmix/mmix.c (mmix_assemble_integer) : Don't + handle SYMBOL_REF. + + 2002-02-13 Stan Shebs + + * c-typeck.c (digest_init): Handle vectors. + (really_start_incremental_init): Same. + (pop_init_level): Same. + (process_init_element): Same. + + * varasm.c (output_constant): Same. + + * expr.c (clear_storage): Same. + (store_constructor): Same. + + 2002-02-12 Eric Christopher + + * explow.c (hard_function_value): Add comment explaining + signed/unsigned comparison. + + 2002-02-12 Jakub Jelinek + + * jump.c (never_reached_warning): Add finish argument. + If finish is NULL, stop on CODE_LABEL, otherwise stop before first + real insn after end. + * rtl.h (never_reached_warning): Adjust prototype. + * cse.c (cse_insn): Pass NULL as finish to never_reached_warning. + * cfgrtl.c (flow_delete_block): Pass b->end as finish to + never_reached_warning. + + 2002-02-12 Graham Stott + + * config/hp/pa.h (GO_IF_LEGITIMATE_ADDRESS): Fix typos. + + 2002-02-12 Kazu Hirata + + * config/h8300/h8300.c (shift_alg_hi): Improve the 15-bit + logical shifts on H8/300. + (shift_alg_si): Improve several shifts on H8/300. + (get_shift_alg): Likewise. + + 2002-02-12 Graham Stott + + * config/pa/pa.c (compute_movstrsi_length): Fix typos. + + Tue Feb 12 10:12:56 2002 Richard Kenner + + * alias.c (find_base_value, case ZERO_EXTEND, case SIGN_EXTEND): + Handle #ifdef POINTERS_EXTEND_UNSIGNED. + + 2002-02-11 Hans-Peter Nilsson + + * config/mmix/mmix.c (mmix_assemble_integer) : Handle + non-CONST_INT through default_assemble_integer. + : Likewise, for non-CONST_INT, non-SYMBOL_REF. + : Abort for CONST_DOUBLE. + + 2002-02-11 John David Anglin + + * gcc.c (init_gcc_specs): Add static libgcc to link when "-shared" + is specified. + * config/pa/pa-linux.h (LIB_SPEC): Delete. + * config/pa/pa32-linux.h (LINK_COMMAND_SPEC): Delete. + + 2002-02-11 Andrew Haley + + * config/stormy16/stormy16.md (zero_extendqihi2): New. + + 2002-02-11 Alexandre Oliva + + * regrename.c (regrename_optimize): Don't accept a + part-clobbered register if the replaced register is not part + clobbered. + + * calls.c (store_one_arg): In the non-BLKmode non-partial case, + take padding into account when computing the argument value. + + * config/sh/sh.h (FUNCTION_ARG_REGNO_P): Fix parenthesizing error. + + * combine.c (try_combine): Apply substitutions in + CALL_INSN_FUNCTION_USAGE too. + + 2002-02-11 Aldy Hernandez + + * config/rs6000/rs6000.c (altivec_init_builtins): Handle + __builtin_altivec_abs*. + (bdesc_abs): New. + + * config/rs6000/rs6000.h (rs6000_builtins): Add + ALTIVEC_BUILTIN_ABS*. + + * config/rs6000/altivec.h: Use const char for builtins expecting + literals. + (vec_abs): New versions for C and C++. + (vec_abss): Same. + + 2002-02-10 Kazu Hirata + + * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Simplify by + using Pmode. + + 2002-02-10 Kazu Hirata + + * config/h8300/h8300.h (STACK_POINTER_REGNUM): Use the + constant definition from h8300.md. + (FRAME_POINTER_REGNUM): Likewise. + * config/h8300/h8300.md (define_constants): Add FP_REG. + + 2002-02-10 Kazu Hirata + + * config/h8300/h8300.c (print_operand): Remove redundant code. + + 2002-02-10 Kazu Hirata + + * config/h8300/h8300-protos.h: Remove the prototype for byte_reg. + * config/h8300/h8300.c (byte_reg): Make it static. + + 2002-02-10 Richard Henderson + + PR c/5623 + * c-typeck.c (incomplete_type_error): Handle flexible array members. + + 2002-02-10 Richard Henderson + + PR c++/5624 + * tree.c (append_random_chars): Don't abort if main_input_filename + does not exist. + + 2002-02-10 Hans-Peter Nilsson + + * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): Disable. + + 2002-02-10 Kazu Hirata + + * config/h8300/h8300.md (pushhi1_h8300): Correct the mode used. + (pushhi1): Likewise. + + 2002-02-10 John David Anglin + + * pa.c (reg_before_reload_operand): Don't accept a SUBREG operand. + * pa.h (PREDICATE_CODES): Adjust codes for reg_before_reload_operand. + + 2002-02-09 David O'Brien + + * config/sparc/freebsd.h(TARGET_DEFAULT): Add MASK_EPILOGUE setting and + remove MASK_VIS. + (ASM_CPU_DEFAULT_SPEC): Remove. Default setting is fine. + + 2002-02-09 Kazu Hirata + + * config/h8300/h8300.c (output_logical_op): Use sub.w to clear + a half of an SImode register on H8/300. + + Sat Feb 9 18:28:02 CET 2002 Jan Hubicka + + * i386.md (movdi_2): Add missing '!'. + + 2002-02-09 Kazu Hirata + + * config/h8300/h8300.h: Fix formatting. Remove commented-out + definitions. + + 2002-02-09 Kazu Hirata + + * config/h8300/h8300.md (length): Correct the distance valid + for the short branch. + + 2002-02-09 Kazu Hirata + + * config/h8300/h8300.md (iorhi3): Tighten the predicates. + + 2002-02-09 Alexandre Oliva + + * config/sh/sh.h (REGISTER_NATURAL_MODE): Save part-clobbered + registers in SImode. + (HARD_REGNO_CALL_PART_CLOBBERED) [TARGET_SHMEDIA32]: Set r18 as + part-clobbered. + + * config/sh/sh.c (expand_prologue): Fix mis-applied 2001-11-09's + patch. + + Contribute sh64-elf. + 2002-02-09 Alexandre Oliva + * config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to... + (sh_cannot_modify_jumps_p): New function. + 2002-02-05 Alexandre Oliva + * config/sh/sh.c (TARGET_MS_BITFIELD_LAYOUT_P): Define to... + (sh_ms_bitfield_layout_p): New function. + 2002-02-04 Alexandre Oliva + Zack Weinberg + * config/sh/sh.h (TRAMPOLINE_ADJUST_ADDRESS): Use + expand_simple_binop instead of expand_binop. + 2002-02-03 Alexandre Oliva + * config/sh/sh.h (OVERRIDE_OPTIONS) [! TARGET_SH5]: Disable + use of .quad and .uaquad. + * config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP, + TARGET_ASM_ALIGNED_DI_OP): Add comment pointing to the above. + 2002-01-24 Alexandre Oliva + * config/sh/sh.md (movdi_const, movdi_const_32bit, + movdi_const_16bit): Make sure all CONSTs have modes. + (sym2PIC): Ditto, but by adjusting all callers. + * config/sh/sh.c (calc_live_regs) [TARGET_SHCOMPACT]: Set pr_live + if the prologue calls the SHmedia argument decoder or register + saver. + 2002-01-24 Alexandre Oliva + * config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP): Define. + (TARGET_ASM_ALIGNED_DI_OP): Likewise. + (sh_expand_epilogue): Don't emit USE of return target register. + (prepare_move_operands): Legitimize DImode PIC addresses. + (sh_media_register_for_return): Skip tr0, used to initialize the + PIC register. + (sh_expand_prologue): Remove explicit USE of return register. + (nonpic_symbol_mentioned_p): PC is non-PIC. Don't recurse in + CONST_DOUBLEs. UNSPEC_GOTPLT is PIC. + * config/sh/sh.h (ASM_OUTPUT_DOUBLE_INT): Removed, obsolete. + (OVERRIDE_OPTIONS): Don't disable PIC on SH5. + (EXTRA_CONSTRAINT_S): Use MOVI_SHORI_BASE_OPERAND_P instead of + EXTRA_CONSTRAINT_T. + (GOT_ENTRY_P, GOTPLT_ENTRY_P, GOTOFF_P, PIC_ADDR_P): New. + (MOVI_SHORI_BASE_OPERAND_P): New. + (NON_PIC_REFERENCE_P, PIC_REFERENCE_P): New. + (EXTRA_CONSTRAINT_T): Define in terms of them. + (OUTPUT_ADDR_CONST_EXTRA): Handle UNSPEC_GOTPLT. + * config/sh/sh.md (movsi_media, movsi_media_nofpu, + movdi_media, movdi_media_nofpu): Add SIBCALL_REGS class to + alternatives supporting TARGET_REGS. + (UNSPEC_GOTPLT): New constant. + (movdi split): Move incrementing of LABEL_NUSES... + (movdi_const, movdi_const_32bit): Here. Use + MOVI_SHORI_BASE_OPERAND_P instead of EXTRA_CONSTRAINT_T. + (movdi_const_16bit): New. + (call, call_value) [flag_pic]: Use GOTPLT. + (call_pop, call_value_pop): New expands. + (call_pop_compact, call_pop_rettramp): New insns. + (call_value_pop_compact, call_value_pop_rettramp): New insns. + (sibcall) [flag_pic]: Use GOT. + (builtint_setjmp_receiver): Remove bogus, unused expand. + (GOTaddr2picreg): Implement for SHcompact and SHmedia. + (*pt, *ptb, ptrel): New insns. + (sym2GOT): Handle DImode GOT. + (sym2GOTPLT, symGOTPLT2reg): New expands. + (sym2PIC): New expand. + (shcompact_return_tramp): Use GOTPLT to return trampoline. + (shcompact_return_tramp_i): Use return register explicitly. + * config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SHMEDIA]: Don't + disable flag_reorder_blocks. + 2002-01-19 Alexandre Oliva + * config/sh/sh.md (sibcall_compact): Reorder return, uses and + clobbers, for clarity. + (sibcall_epilogue) [TARGET_SHCOMPACT]: Mark saving and + restoring of r0 in macl as MAYBE_DEAD. + 2002-01-18 Alexandre Oliva + * config/sh/sh.h (LONG_DOUBLE_TYPE_SIZE): Define. + * config/sh/sh.md (movv4sf_i, movv16sf_i): Fix uses of + alter_subreg all over. + (jump) [TARGET_SHMEDIA]: FAIL to create new jumps after + reload, instead of emitting instructions that would require + reloading. + (casesi_load_media): Add missing modes. + 2001-11-09 Alexandre Oliva + * config/sh/sh.c (sh_expand_prologue): Mark the PIC register + as used if the argument decoder is called. + 2001-08-28 Alexandre Oliva + * config/sh/sh.md (udivsi3, divsi3): Load libcall symbol name in + Pmode, then extend it to DImode if necessary. + 2001-08-28 Stephen Clarke + * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Don't accept DFmode + constants in FPU-enabled SHmedia, let them be loaded from memory. + 2001-08-28 Alexandre Oliva + * config/sh/sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): + Adjust whitespace in assembly output templates. + 2001-08-28 Stephen Clarke + * config/sh/sh.md (movdicc_false, movdicc_true, movdicc): Adjust + mode of if_then_else. + 2001-08-04 Alexandre Oliva + * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Override definition in + sh.h. + 2001-07-26 Andrew Haley + Joern Rennecke + * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): New. + (SUBTARGET_CPP_PTR_SPEC): New. + (SUBTARGET_CPP_SPEC): Remove. + 2001-07-06 Chandrakala Chavva + * config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1): + Fix typo in previous checkin. + 2001-07-11 Chandrakala Chavva + * config/sh/sh.h (MODES_TIEABLE_P): Fix redact indentations. + 2001-07-10 Chandrakala Chavva + Alexandre Oliva + * config/sh/sh.h (MODES_TIEABLE_P): Don't tie modes wider than + what single FP register can hold for SHmedia target. + 2001-07-06 Chandrakala Chavva + Alexandre Oliva + * config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1): + Do not split into SUBREG. + 2001-06-14 Alexandre Oliva + * config/sh/ushmedia.h, config/sh/sshmedia.h: Updated signatures + and added new functions as specified in SH5 ABI r9. + 2001-06-04 Alexandre Oliva + * config/sh/lib1funcs.asm (GCC_nested_trampoline): Align to an + 8-byte boundary. + 2001-06-03 Alexandre Oliva + * config/sh/sh.c (dump_table): Add const0_rtx in calls of + gen_consttable_4 and gen_consttable_8. Emit multiple labels + and consttable_window_ends. + 2001-06-03 Graham Stott + * config/sh/sh.md (movdi split): Remove unused variable last_insn. + 2001-05-16 Alexandre Oliva + * config/sh/sh.c (print_operand): Handle floating-point pair, + vector and matrix registers. + * config/sh/sh.h (REGISTER_MOVE_COST): Take floating-pointer + vector modes into account. + * config/sh/sh.md (movv2sf): Split move between registers into + movdf. + (movv4sf, movv16sf): Introduce insns that get split only after + reload. + * config/sh/shmedia.h: Fix Copyright dates. + * config/sh/ushmedia.h: Likewise. Move loop counter + declarations into conditionals that uses them. + (sh_media_FVADD_S, sh_media_FVSUB_S): Fix off-by-one error in + loop boundary. + * config/sh/sshmedia.h: Fix Copyright dates. + (sh_media_PUTCFG): Fix constraints. + 2001-05-12 Alexandre Oliva + * config/sh/sh.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define to + ptrmemfunc_vbit_in_delta for SH5. + 2001-05-08 Alexandre Oliva + * config/sh/sh.h (TARGET_SWITCHES): Document -m5-*. + * invoke.texi: Likewise. + 2001-04-14 Alexandre Oliva + * config/sh/lib1funcs.asm (GCC_push_shmedia_regs, + GCC_push_shmedia_regs_nofpu, GCC_pop_shmedia_regs, + GCC_pop_shmedia_regs_nofpu): New global symbols. + * config/sh/t-sh64 (LIB1ASMFUNCS): Add them. + * config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): New macro. + * config/sh/sh.c (calc_live_regs): Account for PR's saving in + compact function with nonlocal labels. + (sh_expand_prologue) [SHcompact]: Push SHmedia regs if needed. + (sh_expand_epilogue) [SHcompact]: Pop them when appropriate. + (initial_elimination_offset): Account for their stack space. + * config/sh/sh.md (shmedia_save_restore_regs_compact): New insn. + * config/sh/sh.md (movsi_media, movsi_media_nofpu, movqi_media, + movhi_media, movdi_media, movdi_media_nofpu, movdf_media, + movdf_media_nofpu, movsf_media, movsf_media_nofpu): Require at + least one of the operands to be a register. + (movv2sf): Likewise. Renamed to movv2sf_i. + (movdi, movdf, movv2sf, movv4sf, movv16sf, movsf): + prepare_move_operands() before emitting SHmedia insns. + 2001-04-03 Alexandre Oliva + * config/sh/crti.asm (init, fini) [__SH5__ && ! __SHMEDIA__]: + Don't save nor initialize r12. Don't mis-align the stack. + Pad the code with a nop. + * config/sh/crti.asm: Don't restore r12. Don't mis-align the + stack. + 2001-03-13 Alexandre Oliva + * gcc/longlong.h (__umulsidi3, count_leading_zeros) + [__SHMEDIA__]: Implement. + 2001-03-11 Alexandre Oliva + * config/sh/sh.md: Set latency of `pt' closer to reality. + (movsi_media, movsi_media_nofpu, movdi_media, movdi_media_nofpu, + movdf_media, movdf_media_nofpu, movsf_media, movsf_media_nofpu): + Set move, load and store type attributes. + * config/sh/sh.c (sh_loop_align) [TARGET_SH5]: Set to 3. + * config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SH5]: Disable + profiling. + * config/sh/sh.h (PROMOTE_MODE): Sign-extend SImode to DImode. + * config/sh/sh-protos.h (sh_media_register_for_return): Declare. + * config/sh/sh.c (sh_media_register_for_return): New function. + (sh_expand_prologue) [TARGET_SHMEDIA]: Copy r18 to an available + branch-target register. + (sh_expand_epilogue) [TARGET_SHMEDIA]: Explicitly USE it. + * config/sh/sh.md (return_media_i): Use any call-clobbered + branch-target register. + (return_media): If r18 wasn't copied in the prologue, copy it + here. + * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE) [TARGET_SHMEDIA]: + Clear class FP0_REGS. + * config/sh/sh64.h (LINK_SPEC): Removed incorrect default copied + from elf.h. + 2001-03-08 DJ Delorie + * config/sh/sh.h (OVERRIDE_OPTIONS): Disable relaxing for SHMEDIA. + 2001-02-09 Alexandre Oliva + * config/sh/sh.md (sibcall_compact): Set fp_mode to single. + 2001-02-07 Alexandre Oliva + * config/sh/sh.h (INT_ASM_OP) [SHMEDIA64]: Use `.quad'. + 2001-02-03 Alexandre Oliva + * config/sh/sh.h (INIT_CUMULATIVE_ARGS): Compute size of BLKmode + return value correctly for call_cookie. + 2001-02-01 Alexandre Oliva + * config/sh/crt1.asm (start): Modified so as to call + ___setup_argv_and_call_main. + 2001-01-26 Alexandre Oliva + * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't count stack_regs in + SHmedia mode. + 2001-01-20 Alexandre Oliva + * config/sh/sh.h (STRIP_DATALABEL_ENCODING): New macro. + (STRIP_NAME_ENCODING): Use it. + (ASM_OUTPUT_LABELREF): Likewise. Don't call assemble_name(). + 2001-01-19 Alexandre Oliva + * config/sh/sh.md (sgeu) [! SHMEDIA]: Fix invocation of + prepare_scc_operands(). + * config/sh/sh.h (SH_DATALABEL_ENCODING): Change to "#"... + (DATALABEL_SYMNAME_P): ... so that we don't need memcmp here. + 2001-01-17 Alexandre Oliva + * config/sh/sh.h (STRIP_NAME_ENCODING): Strip leading `*'. + 2001-01-13 Alexandre Oliva + * config/sh/sh.md (shcompact_incoming_args): Use R0_REG. + * config/sh/sh.md (R7_REG, R8_REG, R9_REG): Define as constants, + used in shcompact_incoming_args. + * config/sh/sh.c (sh_expand_epilogue): Fix thinko in previous + change. + * config/sh/crt1.asm (start) [SH5]: Switch to single-precision + mode. + * config/sh/lib1funcs.asm (sdivsi3_i4, udivsi3_i4, set_fpscr): + Adjust accordingly. + * config/sh/sh.c (sh_expand_prologue, sh_expand_epilogue): + Simplify. Adjust. Add sanity check. + * config/sh/sh.h (TARGET_SWITCHES) [5-compact]: Set + FPU_SINGLE_BIT. + * config/sh/sh.md (udivsi3_i4_single, divsi3_i4_single): Match + TARGET_SHCOMPACT. + (udivsi3, divsi3): Use them. + (force_mode_for_call): New insn. + (call, call_value, sibcall_value): Emit it before SHcompact + calls. + 2001-01-11 Alexandre Oliva + * config/sh/sh.md (call, call_value, sibcall): Make sure the + call cookie is non-NULL before taking its value. + 2001-01-10 Alexandre Oliva + * config.gcc (sh64): Set target_requires_64bit_host_wide_int. + 2001-01-09 Alexandre Oliva + * config/sh/sh.md (shcompact_incoming_args): Set argument memory + block. + * config/sh/sh.h (STATIC_CHAIN_REGNUM) [SH5]: Use r1. + * config/sh/sh.c (sh_expand_prologue) [SH5]: Use r0 as + temporary for stack adjusts. Use MACL and MACH to pass + arguments to shcompact_incoming_args. + * config/sh/sh.md (shcompact_incoming_args): Adjust. Don't + clobber r1. + * config/sh/lib1funcs.asm (shcompact_incoming_args): Likewise. + (nested_trampoline): Load static chain address into r1. + * config/sh/sh.md (movdi_media splits): Fix sign-extension. + 2001-01-07 Alexandre Oliva + * config/sh/sh.md (casesi): Sign-extend the first two operands, + and use signed compares for them. + * config/sh/sh.c (dump_table): Don't emit 8-byte constants after + 4-byte ones. Instead, inter-leave them, maintaining the 8-byte + ones properly aligned. + (find_barrier): Account for extra alignment needed for 8-byte wide + constants. + (machine_dependent_reorg): Require a label for the second 4-byte + constant after an 8-byte one. + * config/sh/lib1funcs.asm (sdivsi3): Fix typo in yesterday's + change. + 2001-01-05 Alexandre Oliva + * config/sh/sh.c (machine_dependent_reorg) [SHCOMPACT]: Reset + last_float when switching float modes. + * config/sh/sh.md (movdf) [SH5]: Don't use stack-pointer + auto-increment for general-purpose registers. + * config/sh/lib1funcs.asm (sdivsi3) [SHMEDIA]: Sign-extend the + result. + * config/sh/sh.c (sh_expand_prologue) [SH5]: Use r1 as temporary + for stack adjust. + * config/sh/sh.c (sh_builtin_saveregs): Support using all + registers for varargs. + 2001-01-01 Alexandre Oliva + * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Simplify. + * config/sh/sh.h (CALL_COOKIE_STACKSEQ, + CALL_COOKIE_STACKSEQ_SHIFT, CALL_COOKIE_STACKSEQ_GET): New macros. + (CALL_COOKIE_INT_REG_SHIFT): Adjust. + (FUNCTION_ARG_ADVANCE): Use SHCOMPACT_FORCE_ON_STACK. Adjust + call_cookie accordingly. + (FUNCTION_ARG): Test SHCOMPACT_FORCE_ON_STACK. + (SHCOMPACT_BYREF): Likewise. + (SHCOMPACT_FORCE_ON_STACK): New macro. + * config/sh/sh.c (sh_expand_prologue): Use new call_cookie format. + (sh_builtin_saveregs): Likewise. + * config/sh/lib1funcs.asm (shcompact_call_trampoline, + shcompact_incoming_args): Use new shift values. Support + sequences of consecutive and non-consecutive pushes/pops. + * config/sh/sh.md (return): Don't explicitly use PR_REG. + 2001-01-05 Hans-Peter Nilsson + * config/sh/sh.h (TEXT_SECTION): Define. + * config/sh/elf.h (ASM_FILE_START): Output TEXT_SECTION_ASM_OP. + 2001-01-05 Alexandre Oliva + * config/sh/sh.h (INIT_CUMULATIVE_LIBCALL_ARGS): New macro. + * config/sh/sh.h (BASE_RETURN_VALUE_REG): Use FP regs for + return values on FPU-enabled SHmedia. + (FUNCTION_VALUE_REGNO_P): Mark FIRST_FP_RET_REG as used on + FPU-enabled SHmedia. + (INIT_CUMULATIVE_ARGS): Set up return trampoline only if + value is returned in a non-FP reg and is not returned by + reference. + * config/sh/sh.md (shcompact_return_tramp_i): Change type to + jump_ind. + 2000-01-04 Alexandre Oliva + * config/sh/sh.h (SH_MIN_ALIGN_FOR_CALLEE_COPY): New. + (FUNCTION_ARG_CALLEE_COPIES): Require argument to be + quad-aligned to be passed by callee-copy reference. + 2001-01-03 Alexandre Oliva + * config/sh/elf.h (MAX_WCHAR_TYPE_SIZE): Define. + * config/sh/sh64.h (MAX_WCHAR_TYPE_SIZE): Undefine. + 2001-01-02 Alexandre Oliva + * config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix error in + copying low-numbered FP regs to r7 and r8. + * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't request copying of + FP regs to general-purpose regs only if the copy was passed on the + stack. + * config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix typo in + copying FP reg to r9. + * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to + copy FP regs to general-purpose regs only in outgoing calls. + * config/sh/sh.md (movdf_media, movsf_media): Revert incorrect + change from 2000-10-30. Adjust for 64-bit (or 32-bit) + HOST_WIDE_INT. + * config/sh/sh.h (struct sh_args): Document all fields. + (FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments + passed partially on the stack should not consider making + sibcalls. + * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Add byref regs to + stack_regs only for incoming calls. When passing FP args, + make sure there are FP regs available before modifying + call_cookie. + (SHCOMPACT_BYREF): Pass double args in general-purpose + registers by reference. + 2000-12-30 Alexandre Oliva + * config/sh/sh.h (FUNCTION_OK_FOR_SIBCALL) [SHCOMPACT]: Don't + attempt to generate sibcalls if the caller got any arguments + by reference. + * config/sh/lib1funcs.asm (set_fpscr) [SH5]: Default to double. + * config/sh/sh.c (dump_table) [SHCOMPACT]: Align DImode and DFmode + to 8-byte boundaries. + * config/sh/sh.md (shcompact_preserve_incoming_args): New insn. + * config/sh/sh.h (CALL_COOKIE_INT_REG_GET): New macro. + * config/sh/sh.c (sh_expand_prologue): Preserve args that will be + stored in the stack. + * config/sh/lib1funcs.asm (ct_main_table, ia_main_table): Arrange + for the offsets to have the ISA bit set. + (shcompact_call_trampoline): Document. Swap r0 and r1, to match + invocation. Use beq instead of bgt to mark end of sequence of + loads. + (shcompact_incoming_args): Fix store of r2. Use beq instead of + bgt to mark end of sequence of stores. + * config/sh/sh.c (arith_operand): Don't check whether + CONST_OK_FOR_J for now. + * config/sh/sh.md (movdf_media, movsf_media): Use HOST_WIDE_INT + instead of long for conversion. + 2000-12-29 Alexandre Oliva + * config/sh/sh.c (print_operand_address): Convert INTVAL to int + before passing it to fprintf. + 2000-12-28 Alexandre Oliva + * config/sh/crt1.asm (start): Reset SR.FD, to enable the FP unit. + Call set_fpscr before reading/writing SR. + * config/sh/crt1.asm (start): Set SR.SZ and SR.PR, but not SR.FR. + Call set_fpscr. + * config/sh/lib1funcs.asm: Add `.align 2' directives before + SHmedia code. + (FMOVD_WORKS): Define on SH5 with FPU. + (set_fpscr): Define on SH5. Remove separate _fpscr_values + setting. + * config/sh/t-sh64 (LIB1ASMFUNCS): Add _set_fpscr instead of + _fpscr_values. + 2000-12-28 Hans-Peter Nilsson + * config/sh/lib1funcs.asm (ct_main_table): Align contents to even + address. + (ia_main_table): Ditto. + 2000-12-27 Alexandre Oliva + * config/sh/sh.h (MAX_WCHAR_TYPE_SIZE): Don't define. + * config/sh/sh64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Reinstate + the definitions from sh.h. + * config/sh/sh.h (PTRDIFF_TYPE): Define as conditional on + TARGET_SH5. + (SUBTARGET_CPP_SPEC): Arrange for __PTRDIFF_TYPE__ to be defined. + * config/sh/elf.h (PTRDIFF_TYPE): Likewise. + * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise. + 2000-12-26 Alexandre Oliva + * config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes. + Increment LABEL_NUSES. + + * config/sh/sh.h (SIZE_TYPE): Define as conditional on + TARGET_SH5. + (SUBTARGET_CPP_SPEC): Arrange for __SIZE_TYPE__ to be always + defined. + * config/sh/elf.h (SIZE_TYPE): Likewise. + * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise. + * config/sh/lib1funcs.asm (shcompact_call_trampoline, + shcompact_incoming_args): Load switch table addresses using + datalabel. + * config/sh/sh.h (SUBTARGET_CPP_SPEC): Define __SIZE_TYPE__. + (NO_BUILTIN_SIZE_TYPE): Define. + (SIZE_TYPE): Don't define. + * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Define __SIZE_TYPE__. + * config/sh/sh.h (CPP_SPEC): Fixed typo that prevented the + definition of __SH5__=32 for -m5-compact-nofpu. + * config/sh/sh.c (barrier_align): Ensure 32-bit alignment after + ADDR_DIFF_VEC. + 2000-12-24 Alexandre Oliva + * config/sh/sh.h (FUNCTION_ARG_PADDING): Removed. + 2000-12-23 Alexandre Oliva + * config/sh/sh.h (TARGET_CACHE32): Enable on SH5. + (FUNCTION_BOUNDARY): Ensure 32-bit alignment for SHmedia. + (INSN_LENGTH_ALIGNMENT): Likewise. + 2000-12-22 Alexandre Oliva + * config/sh/sh.md (call, call_value, sibcall): Simplify + copying of non-branch-target register. + 2000-12-22 Alexandre Oliva + * glimits.h (__LONG_MAX__): Revert 2000-12-13's patch. + * config/sh/sh.h (CPP_SPEC): Define it here for 64-bit SHmedia. + 2000-12-22 Alexandre Oliva + * config/sh/sh.h (GET_SH_ARG_CLASS): Handle complex + floating-point values as structs. + (FUNCTION_ARG): Use SH5_PROTOTYPED_FLOAT_ARG. + (SH5_PROTOTYPELESS_FLOAT_ARG): List FP registers before + general-purpose register. + (SH5_PROTOTYPED_FLOAT_ARG): New macro. + 2000-12-20 Alexandre Oliva + * config/sh/sh.md (addsi3): Force operand1 to reg for SHmedia. + * config/sh/sh.md (movsi_media): Split CONST_DOUBLE loads too. + * config/sh/sh.h (DATALABEL_REF_P): Don't require the CONST. + (ENCODE_SECTION_INFO): Enclose variables and constants in + DATALABEL unspecs. + (SH_DATALABEL_ENCODING, DATALABEL_SYMNAME_P): Define. + (STRIP_NAME_ENCODING): Strip SH_DATALABEL_ENCODING off. + (ASM_OUTPUT_LABELREF, AMS_OUTPUT_SYMBOL_REF): Define. + * config/sh/sh.c (gen_datalabel_ref): Use UNSPEC_DATALABEL + only for LABEL_REFs. For SYMBOL_REFs, prepend + SH_DATALABEL_ENCODING to the symbol name. + * config/sh/sh.md (indirect_jump): Use SUBREG instead of + convert_mode(). + 2000-12-20 Alexandre Oliva + * config/sh/sh.md (casesi): Enclose ADDR_DIFF_VEC address in + UNSPEC_DATALABEL. + * config/sh/sh.c (gen_datalabel_ref): Accept LABEL_REFs. + * config/sh/sh.h (DATALABEL_REF_NO_CONST_P): Likewise. + (DATALABEL_REF_P): Don't require CONST. + (ASM_OUTPUT_ADDR_DIFF_ELT): On SH5, output datalabel before + REL label. + 2000-12-19 Alexandre Oliva + * config/sh/sh.md (extendhidi2, extendqidi2): Use arithmetic shift + right. + 2000-12-18 Alexandre Oliva + * config/sh/sh.md (movsi_media, call, call_value, sibcall): + Use shallow_copy_rtx and PUT_MODE to change the mode of + SYMBOL_REFs, LABEL_REFs, CONSTs, etc. + * config/sh/sh.h (PREFERRED_RELOAD_CLASS): Reload SYMBOL_REFs + on SHmedia using GENERAL_REGs. + * config/sh/sh.md (ble_media_i, blt_media_i, bleu_media_i, + bltu_media_i): Fix reversion of conditions. + 2000-12-18 Alexandre Oliva + * config/sh/sh.md (zero_extendhidi2): Use logical shift right. + * config/sh/sh.c (output_far_jump): Save r13 in macl. + 2000-12-17 Alexandre Oliva + * config/sh/sh.c (gen_datalabel_ref): Fix mode of the UNSPEC. + 2000-12-16 Alexandre Oliva + * config/sh/lib1funcs.asm (ic_invalidate): Define for SH5. + (GCC_nested_trampoline): Likewise. + * config/sh/sh-protos.h (gen_datalabel_ref): Declare. + * config/sh/sh.c (gen_datalabel_ref): Define. + * config/sh/sh.h (TRAMPOLINE_SIZE): Adjust for SH5. + (INITIALIZE_TRAMPOLINE): Likewise. + (TRAMPOLINE_ADJUST_ADDRESS): Define. + (DATALABEL_REF_NO_CONST_P, DATALABEL_REF_P): Define. + (EXTRA_CONSTRAINT_T): Match DATALABEL unspecs. + (OUTPUT_ADDR_CONST_EXTRA): Handle DATALABEL unspecs. + * config/sh/sh.md (UNSPEC_DATALABEL): New constant. + (ic_invalidate): Adjust for SH5. + (ic_invalidate_line_media, ic_invalidate_line_compact): New insns. + * config/sh/t-sh64 (LIB1ASMFUNCS): Added _ic_invalidate and + _nested_trampoline. + 2000-12-15 Alexandre Oliva + * config/sh/sh.h (MOVE_MAX): Set to 8 for SHmedia, 4 elsewhere. + (MOVE_MAX_PIECES): Set to 8 on SHmedia too. + 2000-12-14 Alexandre Oliva + * config/sh/sh.h (DBX_REGISTER_NUMBER): Adjust for sh64-elf-gdb. + * config/sh/elf.h (DBX_REGISTER_NUMBER): Likewise. + 2000-12-14 Alexandre Oliva + * config/sh/sh.c (target_reg_operand): Match only target-branch + registers and pseudos that aren't virtual registers. + * config/sh/sh.md (call, call_value, sibcall) [TARGET_SHMEDIA]: + Copy operands that don't match target_reg_operand to pseudos. + (call_media, call_value_media, sibcall_media): Use + target_reg_operand instead of target_operand. + 2000-12-13 Alexandre Oliva + * glimits.h (__LONG_MAX__) [SH5 == 64]: Adjust for 64 bits. + * config/sh/sh.c (target_reg_operand): Match hardware registers + other than branch-target registers. + * config/sh/sh.md (zero_extendqidi2): Input operand is %1. + * config/sh/lib1funcs.asm (sdivsi3) [SH5]: Make it global. + (fpscr_values) [SH5 == 32]: Define. + * config/sh/t-sh64 (LIB1ASMFUNCS): Add fpscr_values. + * config/sh/sh.md (call, call_value, sibcall) [TARGET_SHMEDIA]: + Handle function addresses coming in SUBREGs. + 2000-12-12 Alexandre Oliva + * config/sh/lib1funcs.asm (shcompact_call_trampoline, + shcompact_return_trampoline): Use datalabel where appropriate. + 2000-12-09 Alexandre Oliva + * config/sh/sh.h (SECONDARY_OUTPUT_RELOAD_CLASS): Use a + general-purpose register to copy one branch-target register to + another. + 2000-12-06 Alexandre Oliva + * config/sh/sh.c (target_operand): Accept LABEL_REFs and + SYMBOL_REFs with VOIDmode. + * config/sh/sh.md (ble_media_i, blt_media_i, bleu_media_i, + bltu_media_i): New insns. + 2000-12-06 Alexandre Oliva + * config/sh/sh.h (RETURN_IN_MEMORY): Adjust for SH5 ABI. + (INIT_CUMULATIVE_ARGS): Likewise. + 2000-12-01 Alexandre Oliva + * machmode.def (V16SFmode): New mode. + * c-common.c (type_for_mode): Support V2SF and V16SF. + * tree.c (build_common_tree_nodes_2): Likewise. + * tree.h (tree_index): Likewise. + * calls.c (emit_call_1): Take args_so_far. Adjust all + callers. Introduce CALL_POPS_ARGS. + * tm.texi (CALL_POPS_ARGS): Document. + * config/sh/crt1.asm: Implement in SHmedia mode. + * config/sh/crti.asm, config/sh/crtn.asm: Likewise + * config/sh/elf.h (ASM_SPEC, LINK_SPEC): Support SH5 flags. + (DBX_REGISTER_NUMBER): Renumber registers for SH5. + * config/sh/lib1funcs.asm: Disable functions unused in SH5. + Implement divsi and udivsi in SHmedia mode. Introduce + SHcompact trampolines. + * config/sh/sh.c (GEN_MOV, GEN_ADD3, GEN_SUB3): Use DImode + only in SHmedia64. + (regno_reg_class): Rewrite. + (fp_reg_names): Remove. + (sh_register_names, sh_additional_register_names): New. + (print_operand): Added `u'. Support SUBREGs in addresses. + Add parentheses around shifted CONSTs. + (output_file_start): Output .mode and .abi directives. + (shiftcosts, addsubcosts, multcosts): Adjust. + (output_stack_adjust): Compute alignment. Sanity-check SIZE. + (push_regs): Take array of HOST_WIDE_INTs. Adjust callers. + (calc_live_regs): Output to array of HOST_WIDE_INTs. Count + bytes, not registers. Take into account the need for the + SHcompact incoming args trampoline. Adjust all callers. + (sh_expand_prologue): Take stack_regs into account. Call + incoming args trampoline. Keep stack aligned as per SH5 ABI. + (sh_expand_epilogue): Take stack_regs into accoutn. Keep + stack aligned as per SH5 ABI. + (sh_builtin_saveregs): Support SH5 ABI. + (sh_build_va_list, sh_va_start): Likewise. + (initial_elimination_offset): Take alignment into account. + Compute location of PR according to the SH5 stack frame. + (arith_reg_operand): Reject branch-target registers. + (shmedia_6bit_operand): New. + (logical_operand): Use CONST_OK_FOR_P on SHmedia. + (target_reg_operand): Match DImode only. Accept SUBREGs. + (target_operand): New. + * config/sh/sh.h (CPP_SPEC, SUBTARGET_CPP_SPEC): Support SH5 flags. + (CONDITIONAL_REGISTER_USAGE): Implement SH5 ABI. Initialize + SIBCALL_REGS for SHmedia. + (TARGET_SH3E, TARGET_SH4): Only if SH1_BIT is set too. + (TARGET_FPU_DOUBLE, TARGET_FPU_ANY): New. + (TARGET_SHMEDIA32, TARGET_SHMEDIA64): New. + (TARGET_SWITCHES): New SH5 flags. + (OVERRIDE_OPTIONS): Set SH5-specific options. Use + VALID_REGISTER_P to disable unsupported registers. + (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set. + (POINTER_SIZE, PARM_BOUNDARY): Adjust. + (FUNCTION_ARG_PADDING): Define. + (FASTEST_ALIGNMENT): Adjust. + (SH_REGISTER_NAMES_INITIALIZER): New. + (sh_register_names): Declare. + (DEBUG_REGISTER_NAMES): Define. + (REGISTER_NAMES): Define based on sh_register_names. + (SH_ADDITIONAL_REGISTER_NAMES_INITIALIZER): New. + (sh_additional_register_names): Declare. + (LAST_GENERAL_REG, LAST_FP_REG, LAST_XD_REG): Adjust for SHmedia. + (FIRST_TARGET_REG, LAST_TARGET_REG): Define. + (TARGET_REGISTER_P, SHMEDIA_REGISTER_P, VALID_REGISTER_P): Define. + (REGISTER_NATURAL_MODE): Define. + (FIRST_PSEUDO_REGISTER): Adjust. + (FIXED_REGISTERS, CALL_USED_REGISTERS): Adjust. + (HARD_REGNO_CALL_PART_CLOBBERED): Define. + (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK): Adjust. + (VECTOR_MODE_SUPPORTED_P): Define. + (REG_CLASS_CONTENTS): Adjust. + (SMALL_REGISTER_CLASSES): Adjust. + (REG_ALLOC_ORDER): Adjust. + (INDEX_REG_CLASS): Adjust. + (CONST_OK_FOR_O, CONST_OK_FOR_P): New. + (CONST_OK_FOR_LETTER_P): Adjust. + (PREFERRED_RELOAD_CLASS): Adjust. + (SECONDARY_OUTPUT_RELOAD_CLASS): Adjust. + (SECONDARY_INPUT_RELOAD_CLASS): Adjust. + (NPARM_REGS, FIRST_PARM_REG, FIRST_RET_REG): Adjust. + (FIRST_FP_PARM_REG): Adjust. + (CALL_POPS_ARGS): Define. + (FUNCTION_ARG_REGNO_P): Adjust. + (struct sh_args): New fields. + (GET_SH_ARG_CLASS): Adjust. + (INIT_CUMULATIVE_ARGS): Adjust. + (INIT_CUMULATIVE_INCOMING_ARGS): Define. + (FUNCTION_ARG_ADVANCE): Adjust. + (FUNCTION_ARG): Adjust. + (FUNCTION_ARG_PASS_BY_REFERENCE, SHCOMPACT_BYREF): Define. + (FUNCTION_ARG_CALLEE_COPIES): Define. + (SH5_PROTOTYPELESS_FLOAT_ARG): Define. + (STRICT_ARGUMENT_NAMING): Define. + (PRETEND_OUTGOING_VARARGS_NAMED): Adjust. + (FUNCTION_ARG_PARTIAL_NREGS): Adjust. + (SH5_WOULD_BE_PARTIAL_NREGS): Define. + (SETUP_INCOMING_VARARGS): Adjust. + (HAVE_POST_INCREMENT, HAVE_PRE_DECREMENT): Adjust. + (USE_LOAD_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Adjust. + (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Adjust. + (SUBREG_OK_FOR_INDEX_P): Adjust. + (EXTRA_CONSTRAINT_S): Update. + (EXTRA_CONSTRAINT_T): New. + (EXTRA_CONSTRAINT): Adjust. + (GO_IF_LEGITIMATE_INDEX): Adjust. + (GO_IF_LEGITIMATE_ADDRESS): Adjust. + (LEGITIMIZE_ADDRESS, LEGITIMIZE_RELOAD_ADDRESS): Adjust. + (MOVE_MAX): Adjust. + (MAX_MOVE_MAX): Define. + (Pmode): Adjust. + (CONST_COSTS): Adjust. + (REGISTER_MOVE_COST): Adjust. + (BRANCH_COST): Adjust. + (TEXT_SECTION_ASM_OP): Adjust. + (DBX_REGISTER_NUMBER): Adjust. + (ASM_OUTPUT_DOUBLE_INT): New. + (UNALIGNED_DOUBLE_INT_ASM_OP): New. + (PREDICATE_CODES): Adjust. + (PROMOTE_MODE): Adjust. + (CRT_CALL_STATIC_FUNCTION): Do not define for SHmedia. + * config/sh/sh.md (AP_REG, PR_REG, T_REG, GBR_REG): Renumber. + (MACH_REG, MACL_REG, FPUL_REG, RAP_REG, FPSCR_REG): Renumber. + (PR_MEDIA_REG, T_MEDIA_REG, R10_REG): New. + (DR0_REG, DR2_REG, DR4_REG): Renumber. + (TR0_REG, TR1_REG, TR2_REG): New. + (XD0_REG): Renumber. + (UNSPEC_COMPACT_ARGS): New. + (type): Added pt and ptabs. + (length): Default to 4 on SHmedia. Default pt length to 12 + and 20 on SHmedia32 and SHmedia64, respectively. + (pt): New function unit. + (movdi, movsi): Add types pt and ptabs. Don't increment LABEL_NUSES. + Add whitespace between operands of SHmedia instructions. + (movdicc): Fix. + (adddi3_media, addsi3_media): Adjust constraints. + (subsi3) [SHmedia]: Force operand 1 into a register. + (udivsi3_i1_media, udivsi3_i4_media): New. + (udivsi3): Support SHmedia. + (divsi3_i1_media, divsi3_i4_media): New. + (divsi3): Support SHmedia. + (anddi3, iordi3, xordi3): Adjust constraints. + (zero_extendhidi2, zero_extendqidi2): New. + (extendsidi2, extendhidi2, extendqidi2): New. + (push, pop, push_e, push_fpul, push_4): Disable on SH5. + (pop_e, pop_fpul, pop_4): Likewise. + (movsi_media): Support FP and BT registers. + (movsi_media_nofpu): New. Adjust splits to DImode. + (lduw, ldub): Renamed to zero_extend* above. + (movqi_media): Fix typo. + (movdi_media): Support FP and BT registers. + (movdi_media_nofpu): New. Adjust splits for SHmedia32. + (movdi_const_32bit): New. + (shori_media): Require immediate operand. Use `u' for output. + (movdf_media, movsf_media): Simplified. + (movdf_media_nofpu, movsf_media_nofpu): New. + (movdf, movsf): Adjust + (movv2sf, movv2sf, movv16sf): New. + (beq_media, beq_media_i): Adjust constraints. Don't use + scratch BT register. + (bne_media, bne_media_i): Likewise. + (bgt_media, bgt_media_i): Likewise. + (bge_media, bge_media_i): Likewise. + (bgtu_media, bgtu_media_i): Likewise. + (bgeu_media, bgeu_media_i): Likewise. + (beq, bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu, + bunordered): Emit jump insn. Force operands to registers when + needed. + (jump_media, jump): Simplify. + (call_compact, call_compact_rettramp): New. + (call_value_compact, call_value_compact_rettramp): New. + (call_media, call_value_media): Simplify. + (sibcall_compact, sibcall_media): New. + (call, call_value): Adjust for SHmedia and SHcompact. + (sibcall, sibcall_value, untyped_call): Likewise. + (sibcall_epilogue): Preserve r0 across epilogue for SHcompact. + (indirect_jump): Adjust for SHmedia. + (casesi_jump_media): New. + (nop): Re-enable for SHmedia. + (call_site): Restrict to SH1. + (casesi): Adjust for SHmedia. + (casesi_shift_media, casesi_load_media): New. + (return): Explicitly use PR register. Call return trampoline + on SHcompact. + (return_i): Explicitly use PR register. + (shcompact_return_tramp, shcompact_return_tramp_i): New. + (return_media): Adjust. + (shcompact_incoming_args): New. + (epilogue): Adjust. + (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu, sne): Adjust. + (movstrsi): Disable on SH5. + (fpu_switch0, fpu_switch1, movpsi): Enable on SH4. + (addsf3, addsf3_media): Test TARGET_SHMEDIA_FPU. + (subsf3, subsf3_media): Likewise. + (mulsf3, mulsf3_media, mac_media): Likewise. + (divsf3, divsf3_media): Likewise. + (floatdisf2, floatsisf2_media): Likewise. Adjust constraints. + (floatsisf2, fux_truncsfsi2): Likewise. + (fix_truncsfdi2, fix_truncsfsi2_media): Likewise. Adjust + constraints. + (cmpeqsf_media, cmpgtsf_media, cmpgesf_media): Likewise. + (cmpunsf_media, cmpsf): Likewise. + (negsf2, negsf2_media, sqrtsf2, sqrtsf2_media): Likewise. + (abssf2, abssf2_media): Likewise. + (adddf3, adddf3_media, subdf3, subdf3_media): Likewise. + (muldf3, muldf3_media, divdf3, divdf3_media): Likewise. + (floatdidf2, floatsidf2_media): Likewise. Adjust constraints. + (floatsidf2, fix_truncdfsi2): Likewise. + (fix_truncdfdi2, fix_truncdfsi2_media): Likewise. Adjust + constraints. + (cmpeqdf_media, cmpgtdf_media): Likewise. + (cmpgedf_media, cmpundf_media, cmpdf): Likewise. + (negdf2, negdf2_media, sqrtdf2, sqrtdf2_media): Likewise. + (absdf2, absdf2_media): Likewise. + (extendsfdf2, extendsfdf2_media): Likewise. + (truncsfdf2, truncsfdf2_media): Likewise. + * config/sh/sh64.h: New file. + * config/sh/t-sh64: New file. + * config/sh/shmedia.h: New file. + * config/sh/ushmedia.h: New file. + * config/sh/sshmedia.h: New file. + * configure.in: Added sh64-*-elf. + * configure: Rebuilt. + 2000-10-10 Alexandre Oliva + * config/sh/sh.c (GEN_MOV, GEN_ADD3, GEN_SUB3): New macros. + (reg_class_from_letter): Use `b' for TARGET_REGS. + (print_operand): Support `%M', `%m', `AND' and + `ASHIFTRT'. Do not precede constants with `#' on SHmedia. + (andcosts): Adjust for SHmedia. + (output_stack_adjust, sh_expand_prologue, sh_expand_epilogue): + Likewise. + (target_reg_operand): New function. + * config/sh/sh-protos.h (target_reg_operand): Declare. + * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Don't disable + FP registers on SH5. + (HARD_REGNO_MODE_OK): Accept them whenever they're acceptable + on SH4. + (TARGET_REGISTER_P): New macro. + (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Added TARGET_REGS. + (FUNCTION_VALUE): Use DImode for promoted types on SHmedia. + (EXTRA_CONSTRAINT_S): New macro. + (EXTRA_CONSTRAINT): Adjust. + (FLOAT_TYPE_SIZE): Define to 32. + (Pmode): DImode on SHmedia. + (CONST_COSTS): Adjust for SHmedia literals. + (PREDICATE_CODES): Added target_reg_operand. + (PROMOTE_MODE): Promote signed types to DImode on SHmedia. + * config/sh/sh.md: Remove all attrs from SHmedia insns. + (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): New insns. + (cmpdi): Accept SHmedia. + (movdicc_false, movdicc_true): New insns. + (movdicc): New expand. + (adddi3): Accept arith_operand for op2, but FAIL on SH1 if + no_new_pseudos. + (addsi3_media): Match `S' constraint. + (anddi3, andcdi3, iordi3, xordi3, negdi_media): New insns. + (negdi2): Expand for SHmedia. + (one_cmpldi2): New expand. + (zero_extendsidi2): Change from expand to insn. + (extendsidi2): Add constraints. + (movdi_media, movsi_media): Change `%x' to `%M'. Use `%m' for + LD/ST address. Fix SI immediate loading split. + (movhi_media, movqi_media, lduw, ldub): New insns. + (movhi, movqi): Accept SHmedia. + (shori_media, movdi_media): Relax input constraints. Split + symbolic constants. + (movdf_media, movsf_media): New insn. New split to movdi. + (movdf, movsf): Match on SHmedia. + (beq_media, bne_media, bgt_media, bge_media, bgtu_media, + bgeu_media): New insns and splits. New insns with `_i' suffix. + (beq, bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu): Adjust. + (bunordered): New expand. + (jump_compact): Renamed from `jump'. + (jump_media): New insn. + (jump): New expand. + (call_media, call_value_media): New insns. + (call, call_value): Adjust. + (indirect_jump_compact): Renamed from `indirect_jump'. + (indirect_jump_media): New insn. + (indirect_jump): New expand. + (untyped_call, return): Accept SHmedia. + (return_media): New insn. + (prologue, epilogue, blockage): Accept SHmedia. + (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu, sne): Adjust. + (sunordered): New expand. + (addsf3, subsf3, mulsf3, divsf3, floatsisf2, fix_truncsfsi2, + cmpsf, negsf2, sqrtsf2, abssf2): Adjust for SHmedia. + (addsf3_media, subsf3_media, mulsf3_media, mac_media, + divsf3_media, floatdisf2, floatsisf2_media, fix_truncsfdi2, + fix_truncsfsi2_media, cmpeqsf_media, cmpgtsf_media, + cmpgesf_media, cmpunsf_media, negsf2_media, sqrtsf2_media, + abssf2_media): New insns. + (adddf3, subdf3, muldf3, divdf3, floatsidf2, fix_truncdfsi2, + cmpdf, negdf2, sqrtdf2, absdf2): Adjust for SHmedia. + (adddf3_media, subdf3_media, muldf3_media, divdf3_media, + floatdidf2, floatsidf2_media, fix_truncdfdi2, + fix_truncdfsi2_media, cmpeqdf_media, cmpgtdf_media, + cmpgedf_media, cmpundf_media, negdf2_media, sqrtdf2_media, + absdf2_media): New insns. + (extendsfdf2, truncdfsf2): Adjust for SHmedia. + (extendsfdf2_media, truncdfsf2_media): New insns. + 2000-09-14 Alexandre Oliva + * config/sh/sh.c (machine_dependent_reorg): On shmedia, skip for now. + * config/sh/sh.h (CONST_OK_FOR_J): Document. + (LEGITIMATE_CONSTANT_P): Accept CONST_DOUBLEs on shmedia. + * config/sh/sh.md (adddi3): New expand. + (adddi3_media, adddi3z_media): New insns. + (adddi3_compact): Renamed from adddi3. + (addsi3_media): Use add.l r63 to add constant zero. + (subdi3): New expand. + (subdi3_media): New insn. + (subdi3_compact): Renamed from subdi3. + (mulsidi3): New expand. + (mulsidi3_media): New insn. + (mulsidi3_compact): Renamed from mulsidi3. + (umulsidi3): New expand. + (umulsidi3_media): New insn. + (umulsidi3_compact): Renamed from umulsidi3. + (ashlsi3_media, ashrsi3_media, lshrsi3_media): New insns. + (ashlsi3, ashrsi3, lshrsi3): Use them. + (ashldi3_media, ashrdi3_media, lshrdi3_media): New insns. + (ashldi3, ashrdi3, lshrdi3): Use them. + (zero_extendsidi2): New expand. + (extendsidi2): New insn. + (movsi_media): New insn. Split to movdi to load constants. + (movsi): Enable for shmedia. + (movdi_media): New insn. Use shori_media to load wide constants. + (short_media): New insn. + (movdi): Enable for shmedia. + 2000-09-08 Alexandre Oliva + * config/sh/sh.h (CPP_SPEC): Added `m5'. + (SUBTARGET_CPP_SPEC): Added `!m5'. + (SH5_BIT, TARGET_SH5, TARGET_SHMEDIA, TARGET_SHCOMPACT): New macros. + (TARGET_SWITCHES): Added `5' and `5-compact'. Added SH1_BIT + to all other SH variants. + (TARGET_DEFAULT): Set to SH1_BIT. + (OVERRIDE_OPTIONS): Recognize sh5 CPU. + (BITS_PER_WORD): Raise to 64 on shmedia. + (MAX_BITS_PER_WORD): Change to 64. + (MAX_LONG_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): Set to MAX_BITS_PER_WORD. + (INT_TYPE_SIZE): Keep as 32. + (UNITS_PER_WORD): Raise to 8 on shmedia. + (MIN_UNITS_PER_WORD): Keep as 4. + (POINTER_SIZE): Raise to 64 on shmedia. + (CONST_OK_FOR_J): New macro. + (CONST_OK_FOR_LETTER_P): Use it. + (processor_type): Add PROCESSOR_SH5. + * config/sh/sh.md: Conditionalize all expands, insns and + splits to TARGET_SH1. + (cpu): Added sh5. + (addsi3_compact): Renamed from... + (addsi3): Now an expand. + (addsi3_media, subsi3_media): New insns. + (subsi3): Don't negate constants with SHmedia. + + * hooks.c: New file. + * hooks.h: New file. + * Makefile.in (HOOKS_H): New. + (TARGET_DEF_H): Added $(HOOKS_H). + (OBJS): Added hooks.o. + (cfgcleanup.o, bb-reorder.o): Added target.h. + (hooks.o): Added dependencies. + * target-def.h (TARGET_CANNOT_MODIFY_JUMPS_P): New, added to... + (TARGET_INITIALIZER): this. + * doc/tm.texi (TARGET_CANNOT_MODIFY_JUMPS_P): Document. + * target.h (struct gcc_target): Added cannot_modify_jumps_p. + * bb-reorder.c: Include target.h. + (reorder_basic_blocks): Skip if cannot modify jumps. + * cfgcleanup.c: Include target.h. + (try_optimize_cfg): Skip merge blocking if cannot modify jumps. + + 2002-02-08 Chris Demetriou + + * config/mips/mips.md (casesi_internal, casesi_internal_di): + Protect jump delay slot instructions with .set noreorder and + .set nomacro. + + 2002-02-08 Chris Demetriou + + * config/mips/mips.md (casesi_internal_di): Calculate + the index into the target offset table correctly. + + 2002-02-08 Richard Henderson + + * expr.c (expand_expr): Mind EXPAND_INITIALIZER for truncation also. + * final.c (output_addr_const): Accept and discard SUBREG. + * varasm.c (decode_addr_const): Don't abort on unknown expressions -- + mark them unknown instead. + (simplify_subtraction): Handle RTX_UNKNOWN. + (initializer_constant_valid_p): Strip NOP_EXPRs that narrow the mode. + + 2002-02-08 David Edelsohn + + * doc/invoke.texi (RS/6000 and PowerPC Options): Fix typo. + + 2002-02-08 Richard Henderson + + * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_BSS): New. + + 2002-02-08 Andreas Jaeger + + * config.gcc (x86_64-*-linux): Add t-linux64 makefile fragment. + * config/i386/t-linux64: New file. + + 2002-02-08 Jakub Jelinek + + * c-common.c (c_expand_expr): Revert 2002-02-06 patch. + * c-parse.in (compstmt): Clear last_expr_type. + + 2002-02-07 Richard Henderson + + * loop.c (strength_reduce): Sink final_value when not + eliminating a biv. + + 2002-02-07 David O'Brien + + * config/sparc/freebsd.h: Fix mismatched spec {. + + 2002-02-07 Richard Henderson + + * cfgrtl.c: Include recog.h and insn-config.h. + (keep_with_call_p): Fix general_operand invocation. + * Makefile.in (cfgrtl.o): Update dependencies. + + 2002-02-07 Kazu Hirata + + * config/h8300/h8300.c (two_insn_adds_subs_operand): Revise a + comment. Accept HImode only if TARGET_H8300. + + 2002-02-07 Eric Christopher + + * config/mips/crtn.asm: Cleanup #ifdefs. + + 2002-02-07 Eric Christopher + + * config/mips/crti.asm: Add changes for mips16. mips16 uses + register 7 as RA instead of $31. + * config/mips/crtn.asm: Ditto. + * config/mips/mips.c (mips_move_2words): Add case for + TARGET_MIPS16 when HOST_BITS_PER_WIDE_INT >= 64. + (compute_frame_size): Fix typo. + (save_restore_insns): Ditto. Make documentation about using + register $7 as return register more precise. + (mips_expand_epilogue): Fix comment. Add code to work around not + being able to add to the stack pointer directly. + * config/mips/mips.h (EH_RETURN_DATA_REGNO): Change register number + to 2 for TARGET_MIPS16 as we need 6 and 7 as clobbers in the + epilogue. + + 2002-02-07 Tom Rix + + * config/rs6000/rs6000.c (reg_or_aligned_short_operand): New. For + immediates in ldu and stdu DS opcode field. + * config/rs6000/rs6000.md (movdi_update, movdi_update1): Use. + * config/rs6000/rs6000-protos.h: Add reg_or_aligned_short_operand. + * config/rs6000/rs6000.h (PREDICATE_CODES): Same. + + 2002-02-07 Jeff Sturm + + * config/sparc/sparc.c (compute_frame_size): Don't correct frame + offset for stack bias. + + 2002-02-07 H.J. Lu + + * config/mips/linux.h (SUBTARGET_ASM_DEBUGGING_SPEC): Defined. + + 2002-02-07 Ulrich Weigand + + * testsuite/gcc.dg/cpp/charconst-2.c: Add -fsigned-char option. + + Thu Feb 7 12:14:17 CET 2002 Jan Hubicka + + * i386-protos.h (x86_order_regs_for_local_alloc): Declare + * i386.c (x86_order_regs_for_local_alloc): New global function. + * i386.h (REG_ALLOC_ORDER): CLeanup. + (ORDER_REGS_FOR_LOCAL_ALLOC): New. + + 2002-02-07 Richard Henderson + + PR optimization/2463 + * alias.c (find_base_value): Recall base values for fixed hard regs. + * loop.c (loop_regs_update): Don't use single_set on non-insns. + + 2002-02-07 Alexandre Oliva + + * config/mips/mips.md (define_delay) [mips16]: Adjust required + length. + + 2002-02-06 Richard Henderson + + PR c/5609 + * stmt.c (resolve_operand_name_1): Take more care with mixed + named and unnamed operands. + + 2002-02-06 Janis Johnson + Jan Hubicka + + * loop.c (remove_constant_addition): Avoid clobbering a shared + CONST expression. + + 2002-02-06 Ulrich Weigand + + * config.gcc (s390x-*-linux*): Add t-linux64 makefile fragment. + * config/s390/t-linux64: New file. + * config/s390/libgcc-glibc.ver: New file. + + 2002-02-06 Ulrich Weigand + + * config/s390/linux64.h: Delete file. + * config/s390/s390x.h: New file. + * config.gcc (s390x-*-linux*): Use s390x.h instead of linux64.h + as target header file. + * config/s390/linux.h (TARGET_VERSION): Define depending on + DEFAULT_TARGET_64BIT. + (CPP_SPEC, ASM_SPEC, LINK_SPEC): Likewise. + (SIZE_TYPE, PTRDIFF_TYPE): Likewise. + (NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_PTRDIFF_TYPE): Define. + (CPP_ARCH31_SPEC, CPP_ARCH64_SPEC): New defines. + (LINK_ARCH31_SPEC, LINK_ARCH64_SPEC): New defines. + (EXTRA_SPEC): New define. + * config/s390/s390.h (TARGET_VERSION): Define depending on + DEFAULT_TARGET_64BIT. + (MASK_RETURN_ADDR): Add run-time check for TARGET_64BIT. + + 2002-02-06 Jason Merrill + + * c-decl.c (finish_function): Warn about a non-void function with + no return statement and no abnormal exit. + (current_function_returns_abnormally): New variable. + (start_function): Clear it. + (struct c_language_function): Add returns_abnormally. + (push_c_function_context): Save it. + (pop_c_function_context): Restore it. + (builtin_function): Set TREE_THIS_VOLATILE on return fns. + (grokdeclarator): Set C_FUNCTION_IMPLICIT_INT on functions without + an explicit return type. + * c-tree.h: Declare current_function_returns_abnormally. + (C_FUNCTION_IMPLICIT_INT): New macro. + * c-typeck.c (build_function_call): Set it. + (c_expand_return): Set current_function_returns_value even if the + value is erroneous. + + 2002-02-06 Jakub Jelinek + + PR c/5420: + * c-common.c (c_unsafe_for_reeval): Make COMPOUND_LITERAL_EXPR + unsafe for reevaluation. + + 2002-02-06 Jakub Jelinek + + PR c/5482: + * c-common.c (c_expand_expr) [STMT_EXPR]: If last expression is not + EXPR_STMT, but COMPOUND_STMT, recurse into it. + + 2002-02-06 Richard Henderson + + * cfganal.c (keep_with_call_p): Source for fixed_reg dest must + be a general_operand. Dest for function value must be a pseudo. + + 2002-02-06 Nick Clifton + + * dbxout.c (dbxout_symbol_location): Accept LABEL_REFs as well + as SYMBOL_REFs from the constant pool. + + 2002-02-06 Alexandre Oliva + + * dbxout.c (dbxout_parms): Apply DEBUGGER_ARG_OFFSET to parameters + passed by invisible reference. + + 2002-02-05 Richard Henderson + + * config/sparc/sparc.h (ARG_POINTER_CFA_OFFSET): No stack bias. + + 2002-02-06 Hans-Peter Nilsson + + Implement using "base addresses" in insn operands as default. + * config/mmix/mmix.c (mmix_conditional_register_usage): if + -mabi=gnu, modify fixed_regs to fit the GNU ABI. + (mmix_extra_constraint): Use 'R' to indicate that GETA should be + used to read the rtx value. + (mmix_target_asm_function_epilogue): Fix spacing. + (mmix_constant_address_p): Handle TARGET_BASE_ADDRESSES. + (mmix_legitimate_address): Ditto. + (mmix_encode_section_info): Set SYMBOL_REF_FLAG on rtx:es that + should be loaded with a GETA insn. Don't allocate needless extra + char for nul termination and fix misleading comment. + (mmix_print_operand_address): Handle constants if + TARGET_BASE_ADDRESSES. + (mmix_output_register_setting): Use base addressing if + TARGET_BASE_ADDRESSES and the number of insns is 3. + * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): New. + * config/mmix/mmix.md ("movdi"): Change the alternative with GETA + to use R as constraint, add LDA to match s. + * config/mmix/mmix.h (TARGET_BASE_ADDRESSES): New. + (TARGET_DEFAULT): Add TARGET_MASK_BASE_ADDRESSES. + (TARGET_SWITCHES): Add -mbase-addresses, -mno-base-addresses. + (FIXED_REGISTERS): Make registers $231..$246 fixed by default. + (MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Move $231..$246 last, in + order with other fixed registers. + (MMIX_GNU_ABI_REG_ALLOC_ORDER): Put forward $231, in order with + other parameter/call-clobbered registers. + * doc/invoke.texi (Option Summary) : Add + -mbase-addresses, -mno-base-addresses. + (MMIX Options): Ditto. + + 2002-02-05 John David Anglin + + * pa.h (PREDICATE_CODES): Add reg_before_reload_operand. + + 2002-02-06 Aldy Hernandez + + * config/rs6000/altivec.h: Change elem to _S_elem. + + 2002-02-05 Jason Thorpe + + * config/netbsd.h (WCHAR_TYPE): Define. + (WCHAR_TYPE_SIZE): Ditto. + (WINT_TYPE): Ditto. + * config/alpha/netbsd.h (WCHAR_TYPE): Remove. + (WCHAR_UNSIGNED): Ditto. + (WCHAR_TYPE_SIZE): Ditto. + (WINT_TYPE): Ditto. + * config/arm/netbsd.h: Likewise. + * config/i386/netbsd-elf.h: Likewise. + * config/i386/netbsd.h: Likewise. + * config/m68k/netbsd-elf.h: Likewise. + * config/m68k/netbsd.h: Likewise. + * config/ns32k/netbsd.h: Likewise. + * config/sparc/netbsd.h: Likewise. + * config/vax/netbsd.: Likewise. + + 2002-02-05 Alexandre Oliva + + * target.h (struct gcc_target): Added ms_bitfield_layout_p. + * target-def.h (TARGET_MS_BITFIELD_LAYOUT_P): New. Added to... + (TARGET_INITIALIZER): this. + * doc/tm.texi (TARGET_MS_BITFIELD_LAYOUT_P): Document. + (BITFIELD_NBYTES_LIMITED): Markup fix. + * tree.h (default_ms_bitfield_layout_p): Declare. + (record_layout_info): Added prev_field. + * tree.c (default_ms_bitfield_layout_p): New fn. + * c-decl.c (finish_struct): Disregard EMPTY_FIELD_BOUNDARY and + PCC_BITFIELD_TYPE_MATTERS for MS bit-field layout. + * stor-layout.c: Include target.h. + (start_record_layout): Initialize prev_field. + (place_field): Handle MS bit-field layout, and disregard + EMPTY_FIELD_BOUNDARY, BITFIELD_NBYTES_LIMITED and + PCC_BITFIELD_TYPE_MATTERS in this case. Update prev_field. + * Makefile.in (stor-layout.o): Adjust dependencies. + + 2002-02-05 Jason Merrill + + * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle. + + 2002-02-05 Andreas Jaeger + + * crtstuff.c: Fix comments. + + 2002-02-05 Richard Henderson + + PR fortran/3393 + * loop.c (loop_iv_add_mult_emit_before): Copy multiplier as well. + (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. + + PR fortran/3392 + * config/mips/mips.c (function_arg): Handle TImode. + (function_arg_advance): Likewise. + + 2002-02-05 Aldy Hernandez + + * config/rs6000/altivec.h (vec_step_help): Rename to + __vec_step_help. + + 2002-02-05 Aldy Hernandez + + * config/rs6000/altivec.h: Fix typos. + + 2002-02-05 Jason Thorpe + + * config/arm/netbsd.h: Correct a comment. + + 2002-02-05 Aldy Hernandez + + * config/rs6000/rs6000.c (altivec_init_builtins): Fix typo + building void typed builtins. + + * config/rs6000/altivec.h (vec_ld*): Fix typos. + (vec_step): Implement for C++. + + Mon Feb 4 19:23:19 2002 Richard Kenner + + * final.c (final_scan_insn): Add case for NOTE_INSN_LOOP_END_TOP_COND. + + 2002-02-04 Richard Henderson + + * combine.c (nonzero_bits): Re-introduce special case for + sp/fp/ap wrt REGNO_POINTER_ALIGN. + + 2002-02-05 Aldy Hernandez + + * doc/extend.texi: Warn about unsupported usage of altivec + builtins. + + * config/rs6000/rs6000.md (altivec_vcmp*_p): Remove. + (altivec_predicate_*): New. + + * config/rs6000/altivec.h: Rewrite predicates to use new builtins. + Add C++ version of vec_*() functions. + + * config/rs6000/rs6000.c (bdesc_altivec_preds): New. + (bdesc_2arg): Remove altivec predicates. + (altivec_expand_builtin): Handle predicates. + (altivec_init_builtins): Handle predicates. + (altivec_expand_predicate_builtin): New. + + 2002-02-04 John David Anglin + + * pa.c (DO_FRAME_NOTES): Move forward. + (store_reg): Revise handling of frame notes. + (load_reg): Likewise. + (set_reg_plus_d): Likewise. + (hppa_expand_prologue): Likewise. + (hppa_expand_epilogue): Likewise. + + 2002-02-04 John David Anglin + + * unwind-dw2-fde-glibc.c: Define _GNU_SOURCE if not defined. + + 2002-02-04 Jakub Jelinek + + PR c/4475, c++/3780: + * c-common.def (SWITCH_STMT): Add SWITCH_TYPE operand. + * c-common.h (SWITCH_TYPE): Define. + * c-typeck.c (c_start_case): Set SWITCH_TYPE. + * stmt.c (all_cases_count): Set lastval to thisval at end of loop. + Rename spareness variable to sparseness. + (expand_end_case_type): Renamed from expand_end_case, use orig_type + if non-NULL instead of TREE_TYPE (orig_index). + * tree.h (expand_end_case_type): Renamed from expand_end_case. + (expand_end_case): Define using expand_end_case_type. + * c-semantics.c (genrtl_switch_stmt): Pass SWITCH_TYPE + to expand_end_case_type. + * doc/c-tree.texi (SWITCH_STMT): Document SWITCH_TYPE. + + 2002-02-04 John David Anglin + + * pa.h (PREFERRED_STACK_BOUNDARY): Define to match standard rounding. + (BIGGEST_ALIGNMENT): Change to 128. + + 2002-02-04 John David Anglin + + * pa32-linux.h (LINK_COMMAND_SPEC): Define. + + 2002-02-04 John David Anglin + + * pa.md (call_internal_reg_64bit): Remove unused variable. + + 2002-02-04 Nick Clifton + + * config/arm/arm.h (machine_function): Add uses_anonymous_args + field. + (SETUP_INCOMING_VARARGS): Set uses_anonymous_args. + * config/arm/arm.c (current_function_anonymous_args): Delete, + replace uses with cfun->machine->uses_anonymous_args. + (arm_reorg): Do not reset uses_anonymous_args. + + * config/arm/arm.c (arm_hard_regno_mode_ok): Allow any value in + any geenral register. + + 2001-02-04 Bernd Schmidt s + + * cfgrtl.c (force_nonfallthru_and_redirect): Don't try to redirect + the entry block. + + 2002-02-04 Richard Henderson + + * combine.c (force_to_mode): Remove STACK_BIAS code. + (nonzero_bits): Likewise. Replace sp/fp special case with + REGNO_POINTER_ALIGN. + + * config/sparc/sparc.h (FRAME_POINTER_REGNUM): Change to SFP. + (HARD_FRAME_POINTER_REGNUM): New. + (FIRST_PSEUDO_REGISTER, REG_CLASS_CONTENTS): Update. + (FIXED_REGS, CALL_USED_REGS): Update. + (REG_ALLOC_ORDER, REGISTER_NAMES): Update. + (CONDITIONAL_REGISTER_USAGE): Update for HFP. + (HARD_REGNO_NREGS): Update for SFP. + (STACK_POINTER_OFFSET): Include bias here ... + (FIRST_PARM_OFFSET): ... not here. + (STACK_BIAS): Remove. + (INIT_EXPANDERS): New. + (STARTING_FRAME_OFFSET): Do not include bias. + (ELIMINABLE_REGS, CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET): New. + (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P): Update for SFP. + (REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P): Likewise. + * config/sparc/aout.h (DBX_REGISTER_NUMBER): Update for HFP. + * config/sparc/litecoff.h, config/sparc/sol2.h: Likewise. + * config/sparc/sparc.c (mem_min_alignment): Update for HFP. + (sparc_nonflat_function_prologue, epilogue_renumber): Likewise. + (MUST_SAVE_REGISTER): Likewise. + (sparc_flat_function_prologue): Likewise. + (sparc_flat_function_epilogue): Likewise. + (HARD_FRAME_POINTER_MASK): Rename from FRAME_POINTER_MASK. + (sparc_init_modes): SFP is GENERAL_REGS. + (sparc_builtin_saveregs): SFP does not have bias applied. + + 2002-02-04 Richard Henderson + + * config/alpha/alpha.c (current_function_is_thunk): Don't check + current_function_is_thunk. + (alpha_sa_mask): Distinguish between current_function_is_thunk + called from ASM_OUTPUT_MI_THUNK and not. + (alpha_does_function_need_gp): Thunks always need gp. + (alpha_start_function, alpha_output_function_end_prologue): Likewise. + (alpha_output_mi_thunk_osf): New. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): New. + + 2002-02-04 Richard Sandiford + + * c-typeck.c (build_c_cast): Warn when qualifiers are added to + function types, not when they're taken away. + + Mon Feb 4 09:05:58 2002 Jeffrey A Law (law@redhat.com) + + * cfgrtl.c (try_redirect_by_replacing_jump): Remove associated + CODE_LABEL and jump table when replacing a table jump with a + simple jump. + + 2002-02-04 Ulrich Weigand + + * config/s390/s390-protos.h (legitimize_la_operand, + s390_secondary_input_reload_class, s390_plus_operand, + s390_expand_plus_operand): Add prototypes. + + config/s390/s390.c (s390_secondary_input_reload_class, + s390_plus_operand, s390_expand_plus_operand): New functions. + + (struct s390_address): New member 'pointer'. + (s390_decompose_address): Compute it. + (legitimate_la_operand_p): Use it. + (legitimize_la_operand): New function. + (movti, movdi, movdf splitters): Call it. + + config/s390/s390.h (SECONDARY_INPUT_RELOAD_CLASS): Define. + (PREDICATE_CODES): Add s390_plus_operand. + + config/s390/s390.md (adddi3_inv_64, addaddr_ccclobber): Delete. + (la_ccclobber): Allow GENERAL_REGS as output operand. + + (reload_load_address, *reload_load_address_reg_0, *la, *do_la_reg_0, + *reload_la_64, *reload_la_31 and splitters): Delete, replace by ... + (*la_64, *la_31, reload_indi, reload_insi): ... these. + + 2002-02-04 Ulrich Weigand + + * gcc/config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Fixed + register names for regular asm () construct. + + 2002-02-04 Jakub Jelinek + + * config/i386/i386.md (movsf_1): Allow moving SF values in MMX + registers. + + 2002-02-04 Jakub Jelinek + + * combine.c (recog_for_combine): Create a dummy insn with PATTERN + pat for recog. + + 2002-02-04 Hartmut Penner + + * varasm.c (decode_rtx_const): Allow unspec (symbol_ref) in + constant pool to be identical by string address and index. + + 2002-02-04 Anthony Green + + * output.h (SECTION_OVERRIDE): Define. + * varasm.c (named_section): Obey SECTION_OVERRIDE. + + 2002-02-03 Jason Thorpe + + * config.gcc (arm*-*-netbsdelf*): Placeholder to prevent match + by existing arm*-*-netbsd* (a.out) target. + (ns32k-*-netbsdelf*): Likewise. + (sparc-*-netbsdelf*): Likewise. + (vax-*-netbsdelf*): Likewise. + + 2002-02-03 Danny Smith + + * gthr-win32.h: Protect against conflicting typedef for BOOL in windows + headers and libobjc headers. + + 2002-02-03 Mumit Khan + + * gthr-win32.h (__mingwthr_key_dtor): Use extern "C" linkage for C++. + (_mingw.h): Remove duplicate include. + + 2002-02-03 Jason Thorpe + + * config.gcc: Set cpu_type to m68k for 68010, as well. + (m68010-*-netbsdelf*): New... + (m68k*-*-netbsdelf*): ...targets. + * config/m68k/netbsd-elf.h: New file. + + 2002-02-02 Kazu Hirata + + * config/h8300/h8300.c (hand_list): Move inside function_arg. + + 2002-02-02 Kazu Hirata + + * config/h8300/h8300.c (h8_push_ops): Move inside + h8300_init_once. + (h8_pop_ops): Likewise. + (h8_move_ops): Likewise. + + 2002-02-02 Kazu Hirata + + * config/h8300/h8300.c (os_task): Make it static. + (monitor): Likewise. + (pragma_saveall): Likewise. + + 2002-02-02 Alexandre Oliva + + * config/sh/sh.md (ic_invalidate_line): Make sure the immediate + constant is a valid sign-extension for Pmode. + + 2002-02-02 Kazu Hirata + + * config/h8300/h8300.c: Fix formatting. + + 2002-02-02 Kazu Hirata + + * config/h8300/h8300.md: Fix formatting. + + 2002-02-02 Kazu Hirata + + * config/h8300/h8300.md (one_cmpl patterns): Tighten the + predicates of operands[1]. Split the patterns for each + processor variant. + + 2002-02-02 Kazu Hirata + + * config/h8300/h8300.md (xor patterns): Tighten the predicates + of operands[1] to register_operand. + + 2002-02-02 Neil Booth + + * cpphash.h (struct spec_nodes): Remove n__CHAR_UNSIGNED__. + * cpphash.c (_cpp_init_hashtable): Similarly. + * cppinit.c (cpp_create_reader): Default the signed_char flag. + (init_builtins): Define __CHAR_UNSIGNED__ appropriately. + (COMMAND_LINE_OPTIONS): Recognize -f{un,}signed-char. + (cpp_handle_option): Handle the new options. + * cpplex.c (cpp_interpret_charconst): Use new flag. + * cpplib.h (struct cpp_options): New member signed_char. + * gcc.c (cpp_unique_options): Remove %c spec and documentation. + (cpp_options): Handle -fsigned-char and -funsigned-char. + (static_specs): Remove signed_char_spec. + (do_spec1): Don't handle %c. + * system.h: Poison SIGNED_CHAR_SPEC. + * tradcif.y (yylex): Use flag_signed_char. + * tradcpp.h (flag_signed_char): New. + * tradcpp.c (flag_signed_char): New. + (main): Handle new command-line options. + (initialize_builtins): Define __CHAR_UNSIGNED__ if appropriate. + config: + * alpha/alpha.h (SIGNED_CHAR_SPEC): Remove. + * avr/avr.h: Remove old comments. + * i960/i960.h (CPP_SPEC): Pass -fsigned-char if -mic*. + (CC1_SPEC): Pass -fsigned-char if -mic*. + (SIGNED_CHAR_SPEC): Remove. + doc: + * tm.texi (SIGNED_CHAR_SPEC): Remove documentation. + + 2002-02-01 Eric Christopher + + From Daniel Jacobowitz + * config/mips/mips.h (FUNCTION_PROFILER): Fix function profiling. + * config/mips/linux.h (ASM_OUTPUT_REG_PUSH): Undefine. + (ASM_OUTPUT_REG_POP): Ditto. + + 2002-02-02 Neil Booth + + * c-decl.c, tree.c, tree.h, objc/objc-act.c: Revert bitfield + patch. + + 2002-02-02 Jakub Jelinek + + * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Add missing | separators. + + 2002-02-02 Jakub Jelinek + + PR c/5304: + * expmed.c (expand_mult_highpart): Use immed_double_const for wide_op1 + unconditionally. + + 2002-02-01 Janis Johnson + + * cfganal.c: Include tm_p.h. + (keep_with_call_p): Fix the test that determines if a register holds + the return value of a call. + + 2002-02-01 DJ Delorie + + * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): If + we are given conflicting registers, switch to the other one we + had allocated for us. + * config/sparc/sparc.md (reload_indi, reload_outdi): Pass op[2] + as TImode so we know when the "other" register is available. + + 2002-02-01 David O'Brien + + * config/sparc/sol2-sld-64.h: Include sparc/biarch64.h rather than + sparc/sparc_bi.h. + + 2002-02-01 Janis Johnson + + * cfganal.c (keep_with_call_p): New function. + (flow_call_edges_add): Prevent splitting a block between a call and + a single-set instruction that should be kept in the same block. + + 2002-02-01 Craig Rodrigues + + * doc/install.texi (avr): Update outdated URL. + + 2002-01-30 Andrew Haley + + * config/stormy16/stormy16.md (pushqi): New. + (popqi): New. + (pushhi): New. + (pophi): New. + (movhi): Remove stack operands. + (movqi): Likewise. + * config/stormy16/stormy16.h (PREDICATE_CODES): Add + nonimmediate_nonstack_operand. + * config/stormy16/stormy16.c (nonimmediate_nonstack_operand): + New. + * config/stormy16/stormy16-protos.h (nonimmediate_nonstack_operand) + New. + + 2002-01-31 Jason Merrill + + * Makefile.in (c-parse.c): Handle .output file. + * objc/Make-lang.in (objc-parse.c): Likewise. + + 2002-02-01 Alexandre Oliva + + * config/mips/mips.h (ENDIAN_SPEC): Output the endianness flag if + the -me[lb] option is given. Don't output the default flag + twice. + + 2002-01-31 Zack Weinberg + + * c-lex.c (yyparse): Call debug_hooks->start_source_file for + the primary source file; this has not been done yet. + * c-decl.c (c_expand_body): Reset input_filename from + DECL_SOURCE_FILE (fndecl) before calling init_function_start. + + 2002-01-31 Kazu Hirata + + * rtlanal.c (subreg_regno_offset): Do not use + SUBREG_REGNO_OFFSET. + * system.h: Add SUBREG_REGNO_OFFSET to the GCC poison list. + * doc/tm.texi (SUBREG_REGNO_OFFSET): Remove. + + 2002-01-31 Joseph S. Myers + + * gccbug.in: Follow GNU Coding Standards for --version. Use GCC + version rather than GNATS version in --version output. + + 2002-01-31 Richard Sandiford + + * ifcvt.c (noce_process_if_block): Make a copy of the destination + when copying back from a temporary. + + 2002-01-30 Richard Henderson + + * ifcvt.c (dead_or_predicable): Handling merging when other_bb + and new_dest are the same. + + 2002-01-30 Richard Henderson + + PR opt/5076 + * rtl.h (NOTE_INSN_LOOP_END_TOP_COND): New. + * rtl.c (note_insn_name): Update. + * emit-rtl.c (remove_unnecessary_notes): Kill it. + * stmt.c (expand_end_loop): Kill jump opt code. Use LOOP_END_TOP_COND + to perform loop rotation. + (expand_exit_loop_top_cond): New. + * tree.h (expand_exit_loop_top_cond): Declare it. + * c-semantics.c (genrtl_while_stmt): Use it. + (genrtl_for_stmt): Likewise. + + 2002-01-30 Alexandre Oliva + + * config/mips/mips.h (PARM_BOUNDARY): Guarantee alignment of + arguments to 64-bit boundaries on 64-bit ABIs. + + 2002-01-30 Steve Ellcey + + * loop.c (loop_invariant_p): Special case pic_offset_table_rtx. + + 2002-01-31 Joseph S. Myers + + * c-decl.c (grokdeclarator): Handle type being a typedef for an + invalid type. + + 2002-01-30 David O'Brien + + * config.gcc: Include sparc/biarch64.h rather than sparc/sparc_bi.h. + * config/sparc/sparc_bi.h: Remove file. + * config/sparc/biarch64.h: New file (rename of sparc_bi.h). + + 2002-01-30 Richard Henderson + + * sched-deps.c (sched_analyze): Make a call read the frame pointer. + + 2002-01-30 Zack Weinberg + + * expmed.c (emit_store_flag): Call protect_from_queue on op0 and op1. + + 2002-01-30 Jason Merrill + + * dwarf2out.c (dwarf_cfi_name): Add other DWARF 3 codes. + (output_cfi): Likewise. Disable DW_CFA_GNU_negative_offset_extended. + (reg_save): Use DW_CFA_offset_extended_sf instead. + + * dwarf2out.c (dwarf2out_finish): Don't abort if there were errors. + + 2002-01-29 Jakub Jelinek + + * cselib.c (cselib_record_sets): Use IF_THEN_ELSE result + in cselib_lookup. + + 2002-01-29 Aldy Hernandez + + * rs6000.md ("*call_value_local32"): Remove constraints. + ("*call_value_local64"): Same. + ("*call_value_indirect_nonlocal_aix32"): Same. + ("*call_value_nonlocal_aix32"): Same. + ("*call_value_indirect_nonlocal_aix64"): Same. + ("*call_value_nonlocal_aix64"): Same. + ("*call_value_nonlocal_sysv"): Same. + + 2002-01-29 Richard Henderson + + * config/alpha/elf.h (SDB_DEBUGGING_INFO): Undef. + + 2002-01-29 Richard Henderson + + * expr.c (force_operand): Ignore flag_pic for detecting pic + address loads. + * regclass.c (init_reg_sets_1): Test fixed_regs not flag_pic + for determining if PIC_OFFSET_TABLE_REGNUM is call-clobbered. + * resource.c (mark_target_live_regs): Use regs_invalidated_by_call + instead of open-coded loop. + * doc/tm.texi (PIC_OFFSET_TABLE_REGNUM): Clarify that it must + be fixed when in use. + + 2002-01-29 Richard Henderson + + * sched-int.h (struct deps_reg): Add uses_length, clobbers_length. + * sched-rgn.c (propagate_deps): Update them. + * sched-deps.c (sched_analyze_insn): Update them. Flush the + clobbers list when either gets too long. + + 2002-01-29 Jakub Jelinek + + * config/i386/i386.h (LIMIT_RELOAD_CLASS): Handle LEGACY_REGS + and INDEX_REGS the same as GENERAL_REGS. + (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. + + 2002-01-29 Neil Booth + + * tree.c (build_nonstandard_integer_type): Correct prototype. + + 2002-01-29 Ulrich Weigand + + * config/s390/s390.md (movstrsico, movstrdix_64, + movstrsix_31): Remove, replace by ... + (movstrdi_short, movstrsi_short, movstrdi_long, + movstrsi_long): ... these. New. + (movstrdi, movstrsi): Adapt. + + (rotldi3, rotlsi3, ashldi3, *ashldi3_31, *ashldi3_64, + ashlsi3, lshrdi3, *lshrdi3_31, *lshrdi3_64, lshrsi3): + Remove unnecessary CC clobber. + (*ashrdi3_cc_31, *ashrdi3_cconly_31, *ashrdi3_cc_64, + *ashrdi3_cconly_64, *ashrsi3_cc, *ashrsi3_cconly): New. + + (divmoddi4): Don't partially initialize TImode register. + + 2002-01-29 Geoffrey Keating + + * doc/sourcebuild.texi (C Tests): Document gcc.dg/debug directory. + + 2002-01-29 Richard Henderson + + * flow.c (print_rtl_and_abort): Remove. + (print_rtl_and_abort_fcn): Remove. + (verify_local_live_at_start): Use dump_bb instead. + (verify_wide_reg): Likewise. Take a basic_block, not rtl endpoints. + (verify_wide_reg_1): Return 2 on mode test failure. + + 2002-01-29 Neil Booth + + PR c/3325, c/3326, c/2511, c/3347 + * c-decl.c (enum_decl_context): Remove BITFIELD. + (grokdeclarator): Take bitfield width as an input. + Ensure bitfields are given the correct type. Perform + bitfield width validation with build_bitfield_integer_type + rather than waiting for finish_struct. + (grok_typename, grok_typename_in_parm_context, start_decl, + push_parmdecl, grokfield, start_function): Update calls to + grokdeclarator. + (build_bitfield_integer_type): New function. + (finish_struct): Move bitfield validation to grokdeclarator + and build_bitfield_integer_type. + * tree.c (build_nonstandard_integer_type): New function. + * tree.h (build_nonstandard_integer_type): New prototype. + objc: + * objc-act.c (objc_copy_list): Remove DECL_INITIAL kludge. + + 2002-01-29 Jakub Jelinek + + PR other/1502: + * cppinit.c (cpp_handle_option): Add ignore argument, if it is zero, + don't ignore unrecognized -W* options. + (cpp_handle_options): Pass 1 as last argument to cpp_handle_option. + * cpplib.h (cpp_handle_option): Adjust prototype. + * c-decl.c (c_decode_options): Pass 0 as last argument to + cpp_handle_option. + + PR c/2896: + * gcc.c (cpp_unique_options): Split from cpp_options. + (cpp_options): Source cpp_unique_options. + (default_compilers): Use cpp_unique_options instead of cpp_options + when used together with cc1_options. + (static_specs): Add cpp_unique_options. + * objc/lang-specs.h: Use cpp_unique_options instead of cpp_options + when used together with cc1_options. + + 2002-01-29 Kazu Hirata + + * config/h8300/h8300-protos.h: Update the prototype of + output_a_shift. + * config/h8300/h8300.c (output_a_shift): Remove an unused + argument 'insn'. Remove redundant code. + * config/h8300/h8300.md: Adust to the new prototype of + output_a_shift. + + 2002-01-29 Kazu Hirata + + * config/h8300/h8300-protos.h: Update the prototypes of + emit_a_rotate and expand_a_rotate. + * config/h8300/h8300.c (emit_a_rotate): Change the type of the + first argument to 'enum rtx_code'. + (expand_a_rotate): Likewise. + + 2002-01-28 Kazu Hirata + + * config/h8300/h8300-protos.h: Update the prototype of + output_simode_bld. + * config/h8300/h8300.c (output_simode_bld): Remove an argumen + 'log2'. + * config/h8300/h8300.md: Adjust to the new prototype. + + 2002-01-28 Kazu Hirata + + * conifg/h8300/h8300.c (h8300_adjust_insn_length): Remove + redundant code. + + 2002-01-28 John David Anglin + + * emit-rtl.c (gen_rtx_REG): Check that the PIC_OFFSET_TABLE_REGNUM + is a fixed register before returning pic_offset_table_rtx. + * loop.c (scan_loop): Don't hoist insns that set pic_offset_table_rtx + when PIC_OFFSET_TABLE_REG_CALL_CLOBBERED is defined. + + 2002-01-28 Jason Merrill + + * dwarf2.h: Sync with src version. + + 2002-01-28 Paul Koning + + * builtin-types.def (BT_FN_VOID_CONST_PTR_VAR): Replace + BT_FN_VOID_PTR_VAR. + * builtins.def (BUILT_IN_PREFETCH): Change first argument to be const. + * doc/extend.texi (__builtin_prefetch): Update documentation: + first argument is now const void ptr. + + 2002-01-28 Kazu Hirata + + * config/h8300/h8300-protos.h: Remove an unused prototype. + + 2002-01-28 Roman Zippel + + * toplev.c (lang_independent_init): Round up identifier size. + + 2002-01-28 Richard Earnshaw + + * config.gcc: Revert previous change. + + 2002-01-28 Andris Pavenis + + * config/i386/djgpp.h: Use STRIP_NAME_ENCODING in macro UNIQUE_SECTION + + 2002-01-28 Richard Earnshaw + + * config.gcc (*-*-netbsdelf*): Set up generic parameters. + (*-*-netbsd*): Always use collect2. Remove collect2 settings from + other non-elf netbsd config frags. + * config/netbsd-aout.h (STARTFILE_SPEC): Don't pull in c++rt0 since + collect2 will does that. + * config/netbsd.h (LIBGCC_SPEC): Add white space before -lgcc, so that + shared-lib frobbing will work. + + 2002-01-28 Kazu Hirata + + * config/h8300/h8300.h: Fix formatting. + * config/h8300/h8300.md: Likewise. + + 2002-01-28 Loren J. Rittle + + * fixinc/inclhack.def (strict_ansi_not): Add a bypass based on + the old, removed AAA_standards fix. + * fixinc/fixincl.x: Rebuilt. + + 2002-01-28 Hans-Peter Nilsson + + * config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Change to emit + atexit call in crtbegin, hooked in after call to frame_dummy; + register EH before registering __fini__start. + + 2002-01-28 Aldy Hernandez + + * config/rs6000/altivec.h: Remove spurious semicolons. + + 2002-01-27 Kazu Hirata + + * config/h8300/h8300.md: Replace dead bit extraction patterns + with ones that work. + + Sun Jan 27 13:23:40 2002 Richard Kenner + + * emit-rtl.c (get_mem_attrs): Don't default alignment for non-BLKmode + if not STRICT_ALIGNMENT. + * rtl.h (MEM_ALIGN): Likewise. + + 2002-01-27 Craig Rodrigues + + * doc/invoke.texi (-fdump-translation-unit): Revert this + patch: 2001-10-21 Craig Rodrigues + + 2002-01-27 Kazu Hirata + + * config/h8300/h8300.md (define_constants): New. + (anonymous patterns) Use defined constants appropriately. + + 2002-01-27 Kazu Hirata + + * config/h8300/h8300.c (function_arg): Remove redundant code. + + 2002-01-26 Richard Henderson + + * sched-deps.c (reg_pending_uses_head): New. + (reg_pending_barrier): Rename from reg_pending_sets_all. + (find_insn_list): Don't mark inline. + (find_insn_mem_list): Remove. + (add_dependence_list, add_dependence_list_and_free): New. + (flush_pending_lists): Replace only_write param with separate + for_read and for_write parameters. Update all callers. Use + add_dependence_list_and_free. + (sched_analyze_1): Do not add reg dependencies here; just set + the pending bits. Use add_dependence_list. + (sched_analyze_2): Likewise. + (sched_analyze_insn): Replace schedule_barrier_found with + reg_pending_barrier. Add all dependencies for pending reg + uses, sets, and clobbers. + (sched_analyze): Don't add reg dependencies for calls, just + set pending bits. Use regs_invalidated_by_call. Treat + sched_before_next_call as a normal list, not a fake insn. + (init_deps): No funny init for sched_before_next_call. + (free_deps): Free pending mems lists. Don't zero reg_last. + (init_deps_global): Init reg_pending_uses. + (finish_deps_global): Free it. + * sched-int.h (deps): Make in_post_call_group_p boolean. Update docs. + (find_insn_mem_list): Remove. + * sched-rgn.c (concat_INSN_LIST, concat_insn_mem_list): New. + (propagate_deps): Use them. Zero temp mem lists. + + 2002-01-26 Richard Henderson + + * Makefile.in (CRTSTUFF_CFLAGS): New. + (crtbegin.o, crtend.o, crtbeginS.o, crtendS.o, crtbeginT.o): Use it. + * config.gcc (alpha-linux, alpha-freebsd, alpha-netbsd): Use plain + crtstuff.c instead of alpha assembly version. + * crtstuff.c (CRT_CALL_STATIC_FUNCTION): Rewrite to assume the + entire dummy function sequence. Use FORCE_CODE_SECTION_ALIGN + not FORCE_{INIT,FINI}_SECTION_ALIGN. + (__do_global_dtors_aux): Mark used. + (frame_dummy, __do_global_ctors_aux): Mark used. + (fini_dummy, init_dummy): Remove. + + * config/alpha/crtbegin.asm: Remove file. + * config/alpha/crtend.asm: Remove file. + * config/alpha/t-crtbe: Remove file. + * config/alpha/elf.h (CRT_CALL_STATIC_FUNCTION): New. + (LINK_EH_SPEC): New. + + * config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Rewrite old + FORCE_INIT_SECTION_ALIGN hack. Register __fini_start before + calling constructors. + * config/cris/linux.h (CRT_CALL_STATIC_FUNCTION): Undef. + + * config/i386/i386.h (CRT_CALL_STATIC_FUNCTION): New. + * config/i386/linux.h (CRT_CALL_STATIC_FUNCTION): Replace old + CRT_END_INIT_DUMMY hack. + * config/i386/sol2.h (FORCE_CODE_SECTION_ALIGN): Replace + FORCE_{INIT,FINI}_SECTION_ALIGN. + + * config/mcore/mcore-elf.h (FORCE_CODE_SECTION_ALIGN): Replace + FORCE_{INIT,FINI}_SECTION_ALIGN. + + * config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Update for new + invocation sequence. + * config/sh/sh.h (CRT_CALL_STATIC_FUNCTION): Likewise. + + * doc/tm.texi (CRT_CALL_STATIC_FUNCTION): Update. + (FORCE_CODE_SECTION_ALIGN): New. + + 2002-01-26 Richard Henderson + + * config/cris/cris.c (cris_print_operand): Handle 64-bit CONST_INT. + + 2002-01-26 Richard Henderson + + * config/alpha/alpha.c (alpha_sa_mask): Mark RA for unicos here too. + (alpha_sa_size): Use alpha_sa_mask to compute size of saved regs. + + 2002-01-26 Kazu Hirata + + * config/h8300/h8300.md: Remove bit extraction patterns that + cannot be triggered. + Restrict each bit extraction pattern to a variant on which the + pattern is tested. + + 2002-01-26 Joseph S. Myers + + * doc/include/texinfo.tex: Update to version 2002-01-04.07. + + 2002-01-26 Kazu Hirata + + * config/h8300/h8300.md: Remove bit test patterns that cannot + be triggered. + Restrict each bit test pattern to a variant on which the + pattern is tested. + + 2002-01-26 Kaveh R. Ghazi + + * builtins.c (expand_builtin_strncat): Remove redundant check for + INTEGER_CST. + + 2002-01-25 David O'Brien + + * config/i386/x86-64.h (DEFAULT_PCC_STRUCT_RETURN): Do not overide + default setting. + * config/i386/freebsd64.h (DEFAULT_PCC_STRUCT_RETURN): Do not override + existing setting. + + 2002-01-25 Geoffrey Keating + + * dbxout.c (dbxout_init): Use assemble_name rather than just + stripping off the first character. + (dbxout_source_file): Likewise. + + 2002-01-25 DJ Delorie + + * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Compare + using rtx_equal_p, not by comparing pointers. + + 2002-01-25 Steve Ellcey + + * emit-rtl.c (gen_rtx_REG): Always return the same rtx + for PIC_OFFSET_TABLE_REGNUM. + (init_emit_once): Use gen_raw_REG to initialize pic_offset_table_rtx. + + 2002-01-25 David O'Brien + + * config.gcc (x86_64-*-freebsd*): New target. + (x86_64-*-netbsd*,x86_64-*-linux*): Use ${tm_file} rather than its + value. + (i[34567]86-*-freebsd*): Don't include svr4.h. + * config/i386/freebsd64.h: New file. + + 2002-01-25 Douglas B Rupp + + * config/alpha/x-vms (version): Make static. + + * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Fix error + in previous checkin. + + * Makefile.in (install-headers-cp): New target. + * config.gcc (alpha-dec-*vms*): Install headers with + install-headers-cp + + Fri Jan 25 22:42:49 CET 2002 Jan Hubicka + + * unroll.c (unroll_loop): Lower final_value to nonmemory operand; + avoid it's copies. + + Fri Jan 25 08:26:19 2002 Richard Kenner + + * builtins.c (expand_builtin_strncpy): Use integer_zerop instead + of compare_tree_int. + (expand_builtin_strncat): Likewise. + * c-decl.c (finish_struct): Use tree_low_cst. + * tree.h (compare_tree_int): Arg is unsigned HOST_WIDE_INT. + * tree.c (compare_tree_int): Likewise. + + 2002-01-25 Ulrich Weigand + + * reload1.c (eliminate_regs_in_insn): Recognize frame pointer + adjustments even if they are implemented by more than two insns. + + Fri Jan 25 20:43:56 CET 2002 Jan Hubicka + + * df.c (df_ref_create, df_ref_record_1, df_ref_record): Kill BB arg. + * df.h (struct ref): Kill B. + (DF_REF_BB, DF_REF_BBNO): Use BLOCK_FOR_INSN. + + * basic-block.h (PROP_EQUAL_NOTES): New flag. + * flow.c (propagate_one_insn): Use it. + (mark_used_regs): Handle NIL. + + 2002-01-25 Geoffrey Keating + + * config/stormy16/stormy16.md (tablejump_pcrel): Use a MEM + to help folding. + + 2002-01-25 David Edelsohn + + * rs6000.md (prefetch): Make address V4SI mode so that the address + is restricted to legitimate form for instruction. + + 2002-01-25 Bob Wilson + + * doc/install.texi (xtensa-*-elf): New target. + (xtensa-*-linux*): New target. + * doc/contrib.texi: Add myself. + + 2002-01-25 Nick Clifton + + * config/arm/arm.c (arm_hard_regno_mode_ok): Allow any general + purpose register to hold an SImode (or smaller) value. + + 2002-01-25 Jakub Jelinek + + * unwind-dw2-fde-glibc.c: If inhibit_libc, use __register_frame* + registry only. + * crtstuff.c: Likewise. + + 2002-01-25 Kazu Hirata + + * config/h8300/h8300.md (negation patterns): Tighten + predicates to register_operand. + + 2002-01-24 Aldy Hernandez + + * loop.c (emit_prefetch_instructions): Use the prefetch insn's + mode, not Pmode. + + * builtins.c (expand_builtin_prefetch): Same. + + 2002-01-24 Alexandre Oliva + + * config/sh/sh.md (sym_label2reg): Make sure all CONSTs have + modes. + + 2002-01-24 Kazu Hirata + + * config/h8300/h8300.c (print_operand): Remove support for + operand character 'A'. + * config/h8300/h8300.md (three anonymous patterns): Replace + operand character 'A' with either 'T' or 'S'. + + 2002-01-24 Kazu Hirata + + * config/h8300/h8300.c (print_operand): Remove support for + operand character 'U'. + + 2002-01-24 Andris Pavenis + + * config/i386/t-djgpp: Use NATIVE_SYSTEM_HEADER_DIR. + + 2002-01-24 Nick Clifton + + * config/arm/arm.c (arm_hard_regno_mode_ok): Allow SImode + values to be assigned to the stack pointer. + + 2002-01-14 Hartmut Penner + + * emit_rtl.c (gen_lowpart_common): Conversion from const_int + to const_double needs to be done right for big-endian systems. + + 2002-01-24 Jason Merrill + + PR c++/2432 + * config/sparc/sparc.md (call-jump peepholes): Pass the right insn + to can_throw_internal. + + 2002-01-23 Richard Henderson + + * fold-const.c (fold): Change UINT_MAX test to check vs precision + rather than TYPE_MAX_VALUE. Fix indentation and a bogus negation. + + 2002-01-24 Alexandre Oliva + + * config/sh/sh.md (symGOT_load, sym2GOT, sym2GOTOFF): New expands. + (symGOT2reg): Use them, then set as GOT value as unchanging. + (symGOTOFF2reg): Set REG_EQUAL note. Use a different pseudo + as a temporary, if possible. + (symPLT_label2reg): Enclose (pc) in UNSPEC_PIC. Emit + sym@PLT-(.LPCS#+2-.) instead of sym@PLT+.-(.LPCS#+2). + + 2002-01-23 Kazu Hirata + + * config/h8300/h8300.md: Fix xorqi and xorqi so that they will + accept to accept 0x80 as operands[2]. + + 2002-01-24 Alexandre Oliva + + * config/sparc/sparc.md (fix_trunctfdi2): Correct typo in mode. + + 2002-01-23 Richard Henderson + + * config/alpha/alpha.md (call_value_osf_1_er peepholes): Fix typo. + + 2002-01-23 Aldy Hernandez + + * c-parse.in (parmlist_or_identifiers): Add maybe_attribute. + (parmlist_or_identifiers_1): Verify that only a parmlist follows + an attribute. + + 2002-01-23 Richard Henderson + + * expr.c (move_by_pieces_1): Extend size before negation. + + * config/m68k/t-m68kbare (MULTILIB_OPTIONS): Add 68040 and 68060. + (MULTILIB_MATCHES): Remove 68040 and 68060 aliases. + (MULTILIB_EXCEPTIONS): Ignore 68881 and soft-float for 68040 and 68060. + * config/m68k/t-m68kelf: Likewise. + + 2002-01-23 Bob Wilson + + * config/xtensa/elf.h: New file. + * config/xtensa/lib1funcs.asm: New file. + * config/xtensa/lib2funcs.S: New file. + * config/xtensa/linux.h: New file. + * config/xtensa/t-xtensa: New file. + * config/xtensa/xtensa-config.h: New file. + * config/xtensa/xtensa-protos.h: New file. + * config/xtensa/xtensa.c: New file. + * config/xtensa/xtensa.h: New file. + * config/xtensa/xtensa.md: New file. + * config.gcc (xtensa-*-elf*): New target. + (xtensa-*-linux*): New target. + * cse.c (canon_hash): Compare rtx pointers instead of register + numbers. This is required for the Xtensa port. + * integrate.c (copy_insn_list): Handle case where the static + chain is in memory and the memory address has to be copied to + a register. + * doc/invoke.texi (Option Summary): Add Xtensa options. + (Xtensa Options): New node. + * doc/md.texi (Machine Constraints): Add Xtensa machine constraints. + + 2002-01-23 Zack Weinberg + + * diagnostic.c (internal_error): Do ICE suppression only + when ENABLE_CHECKING is not defined. + + * c-typeck.c (require_complete_type): Return error_mark_node + if type is error_mark_node. + + 2002-01-23 Janis Johnson + + * toplev.c (process_options): Disable -fprefetch-loop-arrays with + -Os and issue a warning. + + 2002-01-23 Zack Weinberg + + * doc/fragments.texi, doc/hostconfig.texi: Update to reflect + current (lack of) need for host configuration by hand. + + * doc/gccint.texi, doc/rtl.texi, doc/tm.texi: Adjust cross + references. Documentation of some target macros moved from + hostconfig.texi to tm.texi. + + 2002-01-23 Will Cohen + + * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Define if not currently + defined. + + 2002-01-23 Kazu Hirata + + * config/h8300/h8300.md (*andorhi3): Accept 0x8000 as an + operand[3]. + + 2002-01-23 Jason Merrill + + * tree.c (build1): Don't set TREE_READONLY on INDIRECT_REF. + + * function.c (assign_parms): Don't put args of inline functions + into registers when not optimizing. + + 2002-01-23 Nick Clifton + + * config/arm/arm.md (UNSPEC_PROLOGUE_USE): New unspec constant. + (prologue_use): New pattern. + * config/arm/arm.c (expand_prologue): Use gen_prologue_use in + preference to gen_rtx_USE. + (thumb_expand_prologue): Use gen_prologue_use in preference to + gen_rtx_USE. + (thumb_expand_epilogue): Use gen_prologue_use in preference to + gen_rtx_USE. + + 2002-01-23 Hans-Peter Nilsson + + * loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0. + + 2002-01-23 Neil Booth + + PR c/3504 + * doc/extend.texi: Correct documentation of __alignof__. + + 2002-01-22 Zack Weinberg + + * params.h: Rename arguments of DEFPARAM so that it will be + recognized as a translation keyword. + + 2002-01-22 Aldy Hernandez + + * extend.texi: Document altivec functions. + Fix N-bit adjectives in X86 builtin documentation. + + 2002-01-22 Alexandre Oliva + + * reload.c (reg_overlap_mentioned_for_reload_p): Handle PLUS and + auto_inc_dec values. + + 2002-01-22 Richard Earnshaw + + * config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove bogus white space + after backslash. + (ASM_DECLARE_OBJECT_NAME): Add missing backslash before final line. + + 2002-01-22 Alexandre Oliva + + * config/i386/freebsd-aout.h (ASM_QUAD): Undefine. + + 2002-01-22 Richard Henderson + + * config/alpha/alpha.c (split_small_symbolic_mem_operand): Use + copy_insn not copy_rtx. + + 2002-01-23 Alan Modra + + * combine.c (simplify_and_const_int): Don't trunc_int_for_mode + "nonzero" as that might add "1" bits. Ensure "constop" is + properly sign extened. + (force_to_mode): Tweak for sign extended constop. + + 2002-01-22 Richard Henderson + + * config/alpha/alpha.c (some_small_symbolic_mem_operand) Use + for_each_rtx instead of assuming we're already looking at the MEM. + (split_small_symbolic_mem_operand): Likewise. + * config/alpha/alpha.h (PREDICATE_CODES): Update. + * config/alpha/alpha.md (small symbolic memory splitters): Update. + + 2002-01-22 Richard Henderson + + * config/alpha/alpha.md (divmodsi_internal_er): Generate lituse + sequence number for the literal. + (divmoddi_internal_er): Likewise. + + 2002-01-22 Craig Rodrigues + + PR java/4972 + * aclocal.m4 (AM_ICONV): Put linking flags for libiconv + in LIBICONV variable. + * configure: Regenerated. + + 2002-01-22 Krister Walfridsson + + * dependence.c (build_def_use): Remove array_idx. + + * dwarfout.c (last_filename): Remove. + (output_compile_unit_die): Remove last_filename. + + 2002-01-22 Roger Sayle + Richard Henderson + + PR opt/3640 + * fold-const.c (fold): Optimize unsigned comparisons against + UINT_MAX (and similar unsigned constants). + + 2002-01-22 Janis Johnson + + * Makefile.in (loop.o): Depend on OPTABS_H. + * loop.c (emit_prefetch_instructions): Check the prefetch operand + against the predicate. + + PR target/5379 + * config/i386/i386.md (prefetch_sse): Specify "p" as a constraint + for the address operand. + + 2002-01-22 Richard Henderson + + * config/alpha/freebsd.h (FUNCTION_PROFILER): Remove. + + 2002-01-22 Craig Rodrigues + + PR other/5450 + * config/i386/sysv4.h (CPP_SPEC): Define, and add CPU + preprocessor flags. + + 2002-01-22 Jason Thorpe + + * config.gcc (x86_64-*-netbsd*): New target. + * config/i386/netbsd64.h: New file. + + 2002-01-22 Aldy Hernandez + + * regrename.c (kill_value): Fix typo. + + 2002-01-22 Aldy Hernandez + + * doc/tm.texi: Remove STARTING_FRAME_PHASE. + + * config/rs6000/rs6000.h: Same. + + * function.c (instantiate_virtual_regs): Remove + STARTING_FRAME_PHASE. + (assign_stack_local_1): Same. + Calculate frame phase. + + 2002-01-22 Nick Clifton + + * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move 'regno' + variable declaration to outer scope in order to simplify + future extensions. + (HARD_REGNO_MODE_OK): Replace macro body with a with a call to + arm_hard_regno_mode_ok. + * config/arm/arm-protos.h: Add a prototype for + arm_hard_regno_mode_ok. + * config/arm/arm.c (soft_df_operand): Remove now redundant + check for DImode values using IP_REGNUM. + (nonimmediate_soft_df_operand): Remove now redundant check for + DImode values using IP_REGNUM. + (arm_hard_regno_mode_ok): New function. New check: make sure + that DImode values are not stored in IP_REGNUM. + + * config/arm/arm.c (arm_expand_prologue): Replace REG_MAYBE_DEAD + note with a USE. + (thumb_expand_prologue): Replace REG_MAYBE_DEAD note with a USE. + + 2002-01-22 Jason Merrill + + * c-semantics.c (genrtl_compound_stmt): Only check nesting + consistency if this COMPOUND_STMT is scoped. + + 2002-01-22 Kazu Hirata + + * predict.c: Fix formatting. + * print-tree.c: Likewise. + * protoize.c: Likewise. + * real.h: Likewise. + * rtl.h: Likewise. + * sbitmap.h: Likewise. + * scan.c: Likewise. + * sched-deps.c: Likewise. + * sched-vis.c: Likewise. + * sdbout.c: Likewise. + * sibcall.c: Likewise. + * ssa.c: Likewise. + * ssa-ccp.c: Likewise. + * ssa-dce.c: Likewise. + * stmt.c: Likewise. + * stor-layout.c: Likewise. + * system.h: Likewise. + + Tue Jan 22 06:26:33 2002 Richard Kenner + + * tree.c (int_fits_type_p): If bounds of a subtype are variable, see + if fits in bounds of base type. + + * dwarf2out.c (equate_decl_number_to_die): Add "int" to decls. + (loc_descriptor_from_tree, case CALL_EXPR, case ADDR_EXPR): New. + (add_bound_info, default): If can't find a context, make a + SAVE_EXPR. + (dwarf2out_finish): Check for SAVE_EXPR in node->created_for. + + 2002-01-22 Hans-Peter Nilsson + + * c-typeck.c (parser_build_binary_op): If result from + build_binary_op is ERROR_MARK just return error_mark_node without + further processing. + + 2002-01-21 Jason Thorpe + + * config/netbsd.h (TARGET_HAS_F_SETLKW): define. + Split a.out-specific bits into... + * config/netbsd-aout.h: ...this. + * config/netbsd-elf.h: New file. + * config/alpha/netbsd-elf.h: Remove. + * config/alpha/netbsd.h: Rewrite for a NetBSD/alpha ELF target. + * config/i386/netbsd-elf.h (LIB_SPEC): Remove. + (STARTFILE_SPEC): Remove redundant definition. + (ENDFILE_SPEC): Likewise. + (LINK_SPEC): Likewise. + (CPP_SPEC): Likewise. + (ASM_SPEC): Likewise. + (LIB_SPEC): Likewise. + (SWITCH_TAKES_ARG): Likewise. + (TARGET_MEM_FUNCTIONS): Likewise. + (CPP_PREDEFINES): Redefine. + (ASM_FINAL_SPEC): Remove redefinition. + (ASM_COMMENT_START): Redefine. + (FUNCTION_PROFILER): Define. + (TARGET_VERSION): Redefine. + Comment and formatting cleanup. + * config/i386/netbsd.h: Include . + * config/m68k/netbsd.h: Include . + * config/mips/netbsd.h: Rewrite for NetBSD/mips ELF target, + big- or little-endian. + * config/ns32k/netbsd.h: Include . + * config.gcc (*-*-netbsd*): Add definitions common to all + NetBSD configs. + (alpha*-*-netbsd*): Remove redundant xm_defines, gas, and + gnu_ld definitions. Add netbsd-elf.h to and remove + alpha/netbsd-elf.h from tm_file. Remove alpha/t-crtfm from + tmake_file, and don't lose previous tmake_file contents. + (arm*-*-netbsd*): Add netbsd-aout.h to tm_file. + (i[34567]86-*-netbsdelf*): Remove redundant xm_defines, gas, and + gnu_ld definitions. Add netbsd-elf.h to tm_file. + (mips-dec-netbsd*): Remove as alias for mipsel-*-netbsd*. + (mipsel-*-netbsd*): Rename this to... + (mips*-*-netbsd*): ...this. Add elfos.h to tm_file. Add + mips/little.h to tm_file for mips*el-*. + (powerpc-*-netbsd*): Remove redundant xm_defines definition. + (sparc-*-netbsd*): Add netbsd-aout.h to tm_file. + (vax-*-netbsd*): Add netbsd-aout.h to tm_file. + + 2002-01-21 John David Anglin + + * pa-protos.h (reg_before_reload_operand): New function prototype. + * pa.c (reg_before_reload_operand): New function implementation. + * pa.md (decrement_and_branch_until_zero, movb): Use it. Change "!*m" + contraints to "*m". + + 2002-01-21 Franz Sirl + + * combine.c (simplify_and_const_int): Properly sign-extend CONSTOP. + + 2002-01-21 John David Anglin + + * pa64-hpux.h (MD_EXEC_PREFIX): Set to "/usr/ccs/bin". + (MD_STARTFILE_PREFIX): Set to "/usr/ccs/lib/pa20_64/". + (MD_STARTFILE_PREFIX_1): Set to "/opt/langtools/lib/pa20_64/". + (EH_FRAME_IN_DATA_SECTION): Define and update comment on init sections. + (ENDFILE_SPEC): Undefine. + (STARTFILE_SPEC): Redefine for PA. + + 2002-01-21 Franz Sirl + + * config/rs6000/t-ppccomm (CRTSTUFF_T_CFLAGS_S): Re-add -fPIC. + + 2002-01-21 Daniel Jacobowitz + + * config.gcc: Add entries to supported PowerPC --with-cpu + types. + + 2002-01-21 Jakub Jelinek + + * config/i386/i386.c (ix86_function_arg_regno_p): Never return + true for 64-bit mode only SSE registers in 32-bit mode. + + 2002-01-21 Kazu Hirata + + * unwind-dw2.c: Fix formatting. + * unwind-dw2-fde.c: Likewise. + * unwind-dw2-fde.h: Likewise. + * unwind-pe.h: Likewise. + * varasm.c: Likewise. + * varray.h: Likewise. + + 2002-01-21 Hans-Peter Nilsson + + Remove workaround for register stack overwrite bug in mmix. + * config/mmix/mmix.c (mmix_target_asm_function_prologue): Remove + support for TARGET_REG_STACK_FILL_BUG. + * config/mmix/mmix.h: Remove member has_call_without_parameters. + (TARGET_MASK_REG_STACK_FILL_BUG, TARGET_REG_STACK_FILL_BUG): + Delete. + (TARGET_DEFAULT): Remove TARGET_MASK_REG_STACK_FILL_BUG. + (TARGET_SWITCHES): Remove -mreg-stack-fill-bug-workaround and + -mno-reg-stack-fill-bug-workaround. + * config/mmix/mmix.md ("call", "call_value"): Don't set struct + machine member has_call_without_parameters. + * doc/invoke.texi (Option Summary) : Remove + -mreg-stack-fill-bug-workaround and + -mno-reg-stack-fill-bug-workaround. + (MMIX Options): Ditto. + + 2002-01-21 Kazu Hirata + + * config/h8300/h8300.c (function_arg): Replace 0 with NULL_RTX + as appropriate. + Remove redundant code. + + 2002-01-21 Joseph S. Myers + + * config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h, + config/c4x/c4x.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, + config/fr30/fr30.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, + config/mips/mips.h, config/rs6000/rs6000.h, config/sparc/sparc.h, + config/stormy16/stormy16.h, config/v850/v850.h: Remove commented + out target macro definitions and non-target-specific comments + mostly taken from old versions of the manual. + + 2002-01-20 Kazu Hirata + + * config/h8300/h8300.h: Fix comment formatting. + * config/ia64/aix.h: Likewise. + * config/ia64/ia64-protos.h: Likewise. + * config/ia64/ia64.c: Likewise. + * config/ia64/ia64.h: Likewise. + * config/ia64/ia64intrin.h: Likewise. + * config/ia64/linux.h: Likewise. + * config/ia64/unwind-aix.c: Likewise. + * config/ia64/unwind-ia64.c: Likewise. + + 2002-01-20 Kazu Hirata + + * config/h8300/h8300.c: Revise comments about shift code. + + 2002-01-20 Kazu Hirata + + * config/h8300/h8300.c (function_arg): Update a comment. + + 2002-01-20 Kazu Hirata + + * config/h8300/h8300.md: Update the comments at the beginning + of the file. + + 2002-01-20 Kazu Hirata + + * config/i370/i370.c: Fix comment formatting. + * config/i370/i370.h: Likewise. + * config/i370/i370.md: Likewise. + * config/i370/linux.h: Likewise. + + Sun Jan 20 18:40:14 2002 Richard Kenner + + * reg-stack.c (subst_stack_regs): Properly check for deleted insn. + + * dwarf2out.c (loc_descriptor_from_tree): Add TRUTH_*_EXPR cases. + (gen_struct_or_union_type_die): Don't SIGSEGV if no TYPE_STUB_DECL + in incomplete case. + + 2002-01-20 Graham Stott + + * cfgloop.c (flow_loop_preheader_scan): Fix typo. + + 2002-01-19 John David Anglin + + * config.gcc (hppa*64*-*-hpux11*): Fix tmake_file. + + 2002-01-19 Tom Rix + + * config/rs6000/rs6000.md: Fix DF split for 64 bit hosts. + + 2002-01-18 Aldy Hernandez + + * doc/tm.texi (STARTING_FRAME_PHASE): Document. + + * function.c (assign_stack_local_1): Adjust x_frame_offset with + STARTING_FRAME_PHASE. + (STARTING_FRAME_PHASE): New. + (instantiate_virtual_regs): Check saneness of + STARTING_FRAME_PHASE. + + * config/rs6000/rs6000.h (STARTING_FRAME_PHASE): New. + + 2002-01-19 Alexandre Oliva + + * config/sh/sh.md (movdf_i4 split): Fix alter_subreg calls. + + 2002-01-18 Craig Rodrigues + + * doc/install.texi (hppa*-hp-hpux11): Clarify that GCC 2.95.x cannot + be used for bootstrapping GCC 3.0. + + 2002-01-18 Kazu Hirata + + * config/h8300/h8300.md: Fix an insn length. + + 2002-01-18 Kazu Hirata + + * bitmap.h: Fix comment formatting. + * combine.c: Likewise. + * cppfiles.c: Likewise. + * c-pragma.h: Likewise. + * c-typeck.c: Likewise. + * df.c: Likewise. + * dwarf2out.c: Likewise. + * function.c: Likewise. + * gcc.c: Likewise. + * genattrtab.c: Likewise. + * gthr-win32.h: Likewise. + * haifa-sched.c: Likewise. + * predict.c: Likewise. + * rtlanal.c: Likewise. + * rtl.h: Likewise. + * unwind-dw2-fde.h: Likewise. + * unwind-pe.h: Likewise. + * vmsdbgout.c: Likewise. + + Thu Jan 17 15:28:26 2002 Richard Kenner + + * attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE + if type_required and passed decl. + + 2002-01-17 Aldy Hernandez + + * config.gcc (cpu_type): Include altivec.h in powerpc + extra_headers. + Same for darwin. + + * config/rs6000/altivec.h: New. + + 2002-01-17 David Edelsohn + + * doc/install.texi (*-ibm-aix*): Update assembler and exception + handling information. + * doc/trouble.texi (Interoperation): Add libstdc++ information + for AIX. + (Misunderstandings): Add template instantiation and static template + member information for AIX. + + 2002-01-17 Jason Merrill + + * dbxout.c (dbxout_type): Support const and volatile. + + * except.c (add_partial_entry): Remove backwards compatibility code. + (end_protect_partials): Likewise. + + 2002-01-17 Jakub Jelinek + + * config/ia64/ia64.md (prologue_use): New. + * config/ia64/ia64.c (ia64_expand_prologue): Use + gen_prologue_use instead of gen_rtx_USE. + (group_barrier_needed_p): Handle CODE_FOR_prologue_use the same way + as CODE_FOR_pred_rel_mutex. + (ia64_sched_reorder2): Likewise. + + 2002-01-16 Eric Christopher + + * config/mips/r3900.h: Reformat. + (SUBTARGET_CPP_SIZE_SPEC): Remove. + * config/mips/isa3264.h (SUBTARGET_CPP_SIZE_SPEC): Ditto. + * config/mips/mips.h (ABI_GAS_ASM_SPEC): Default to "". + (SUBTARGET_CPP_SIZE_SPEC): Rewrite. + * config/mips/t-elf: Remove mips3 multilib. + + 2002-01-16 H.J. Lu + + * config/mips/linux.h: Include "mips/abi64.h". + + 2002-01-16 H.J. Lu + + * config/mips/t-linux: New. + + * config.gcc: Add mips/t-linux to tmake_file for mips*-*-linux*. + + * config/mips/linux.h: Don't include "gofast.h". + (INIT_SUBTARGET_OPTABS): Removed. + + 2002-01-16 Kazu Hirata + + * config/h8300/h8300-protos.h: Replace emit_a_shift with + output_a_shift. + * config/h8300/h8300.c: Likewise. + * config/h8300/h8300.md: Likewise. + + 2002-01-16 Kazu Hirata + + * config/h8300/h8300.md (pushqi1_h8300): Use a tab instead of + spaces after an opcode name. + (pushqi1_h8300hs): Likewise. + (pushhi1_h8300hs): Likewise. + + 2002-01-16 Kazu Hirata + + * doc/extend.texi: Replace "option" with "attribute" + appropriately. + + 2002-01-16 Jakub Jelinek + + * config/alpha/alpha.c (some_small_symbolic_mem_operand): Look into + (and:DI () (const_int -8)). + (split_small_symbolic_mem_operand): Split + (mem (and:DI () (const_int -8)). + + 2002-01-16 Jakub Jelinek + + PR target/5309: + * config/sparc/sparc.c (ultrasparc_adjust_cost): Handle TYPE_IDIV the + same way as TYPE_IMUL. + (ultrasparc_sched_reorder): Likewise. + * config/sparc/sparc.md (type): Add comment to update + ultrasparc_sched_reorder when making changes. + + 2002-01-16 Kazu Hirata + + * doc/invoke.texi: Change the dump file name of block + reordering pass from 28.bbro to 29.bbro. + Mention -dk option. + + Wed Jan 16 17:54:22 CET 2002 Jan Hubicka + + * i386.md (minsf splitter): Fix pasto. + + 2002-01-16 Nick Clifton + + * config/arm/arm.c (arm_expand_prologue): Add REG_MAYBE_DEAD note + to frame pointer initialisation instruction. + (thumb_expand_prologue): Add REG_MAYBE_DEAD note to frame pointer + initialisation instruction. + (soft_df_operand): Do not accept the IP register. + (nonimmediate_soft_df_operand): Do not accept the IP register. + + 2002-01-16 Jakub Jelinek + + PR target/5357: + * config/sparc/sparc.c (sparc_override_options): Avoid MASK_V9 and + MASK_V8 being both set. + + 2002-01-16 Ulrich Weigand + + * config/s390/s390.c (s390_emit_prologue): Do not emit USE + insn for GOT register; add REG_MAYBE_DEAD notes instead. + config/s390/s390.md (call, call_value): Add GOT register to + CALL_INSN_FUNCTION_USAGE where needed. + (call_exp, call_value_exp): New. + + 2002-01-16 Nick Clifton + + * config/arm/arm.c: General formatting tidy up. + + 2002-01-16 Graham Stott + + * calls.c (try_to_integrate): Use "(size_t)" intermediate + cast and when casting an integer literal to "rtx" pointer. + (expand_call): Likewise. + * flow.c (try_pre_increment): Likewise. + (find_use_as_address): Likewise. + * integrate.c (expand_iline_function): Likewise. + * regmove.c (try_auto_increment): Likewise. + + 2002-01-16 Graham Stott + + * sched-rgn.c (passed): Use sbitmap_free. + (header): Likewise. + (inner): Likewise. + (in_queue): Likewise. + (in_stack): Likewise. + + 2002-01-15 Eric Christopher + + * flow.c (propagate_one_insn): Change to use fatal_insn. + + 2002-01-15 Kazu Hirata + + * expmed.c (extract_fixed_bit_field): Remove unused code. + * system.h: Poison SLOW_ZERO_EXTEND. + * doc/tm.texi: Remove. + * config/1750a/1750a.h (SLOW_ZERO_EXTEND): Remove. + * config/arm/arm.h: Likewise. + * config/avr/avr.h: Likewise. + * config/clipper/clipper.h: Likewise. + * config/convex/convex.h: Likewise. + * config/d30v/d30v.h: Likewise. + * config/dsp16xx/dsp16xx.h: Likewise. + * config/elxsi/elxsi.h: Likewise. + * config/fr30/fr30.h: Likewise. + * config/h8300/h8300.h: Likewise. + * config/i370/i370.h: Likewise. + * config/i386/i386.h: Likewise. + * config/m68k/m68k.h: Likewise. + * config/mips/mips.h: Likewise. + * config/ns32k/ns32k.h: Likewise. + * config/pdp11/pdp11.h: Likewise. + * config/pj/pj.h: Likewise. + * config/s390/s390.h: Likewise. + * config/sh/sh.h: Likewise. + * config/stormy16/stormy16.h: Likewise. + * config/v850/v850.h: Likewise. + * config/vax/vax.h: Likewise. + * config/we32k/we32k.h: Likewise. + + 2002-01-15 Aldy Hernandez + + * config/rs6000/rs6000.md (altivec_stvx): Add parallels to stvx. + (altivec_lvsl): Change constraint to b. + (altivec_lvsr): Same. + (altivec_lvebx): Same. + (altivec_lvehx): Same. + (altivec_lvewx): Same. + (altivec_lvxl): Same. + (altivec_lvx): Same. + (altivec_stvx): Add parallel. + (altivec_stvxl): Same. + (altivec_stvehx): Same. + (altivec_stvebx): Same. + (altivec_stvebx): Same. + + 2002-01-15 Aldy Hernandez + + * config.gcc: Change altivec.h to altivec-defs.h. + + * config/rs6000/altivec.h: Delete. + + * config/rs6000/altivec-defs.h: Add. + + 2002-01-15 John David Anglin + + * vax.c (vax_rtx_cost): Return MAX_COST for unsupported MULT, UDIV + and UMOD modes. + + * vax.h (INDEX_TERM_P): Restrict indexing to modes which have a size + less than or equal to eight bytes. + + * vax.md (andsi3): Remove constraints and change SET destination + operand type to nonimmediate_operand. + (andhi3, andqi3): Likewise. Don't clear high order bits of operand 1 + when it is a CONST_INT. + + 2002-01-15 Jason Merrill + + * c-common.def (FILE_STMT): New code. + * c-common.c (statement_code_p): It's a statement. + * c-common.h (stmt_tree_s): Add x_last_filename. + (FILE_STMT_FILENAME_NODE, FILE_STMT_FILENAME): New macros. + (last_expr_filename): New macro. + * c-semantics.c (begin_stmt_tree): Initialize it. + (add_stmt): If the filename changed, also insert a + FILE_STMT. + (expand_stmt): Handle seeing one. + + 2002-01-15 Eric Christopher + + * flow.c (propagate_one_insn): Add error message and print out + insn for debugging. + + 2002-01-15 Joseph S. Myers + + * system.h (ASM_IDENTIFY_GCC, STDC_VALUE, TRAMPOLINE_ALIGN, + ASM_IDENTIFY_GCC_AFTER_SOURCE): Poison. + * config/pdp11/pdp11.h (TRAMPOLINE_ALIGN): Rename to + TRAMPOLINE_ALIGNMENT. + * config/arm/arm.h, config/mcore/mcore.h: Likewise. Change value + to be in bits. + * config/i386/cygwin.h (PCC_BITFIELDS_TYPE_MATTERS): Rename to + PCC_BITFIELD_TYPE_MATTERS. + * config/interix.h (STDC_VALUE): Remove. Use + STDC_0_IN_SYSTEM_HEADERS. + * config/darwin.h (ASM_IDENTIFY_GCC), config/dsp16xx/dsp16xx.h + (ASM_IDENTIFY_GCC), config/stormy16/stormy16.h (ASM_IDENTIFY_GCC, + ASM_IDENTIFY_GCC_AFTER_SOURCE): Remove. + + 2002-01-15 Craig Rodrigues + + * doc/install.texi (hppa*-hp-hpux11): --enable-threads does + not work on this platform currently. + + 2002-01-15 Joseph S. Myers + + * c-typeck.c (build_unary_op): Don't wrap msgid argument of + readonly_warning in _(). + + 2002-01-15 Douglas B Rupp + + * gcc.c (delete_if_ordinary): Backout previous change. + + 2002-01-15 Kazu Hirata + + * config/h8300/h8300.c (print_operand): Remove support for + unused operand characters. + + * read-rtl.c: Fix formatting. + * real.c: Likewise. + * recog.c: Likewise. + * regclass.c: Likewise. + * regmove.c: Likewise. + * reg-stack.c: Likewise. + * reload1.c: Likewise. + * rtlanal.c: Likewise. + + 2002-01-15 Kazu Hirata + + * config/i386/i386.c: Fix formatting. + + 2002-01-15 Jakub Jelinek + + * c-typeck.c (process_init_element): Don't save_expr + COMPOUND_LITERAL_EXPR if just its initializer will be used. + + 2002-01-15 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Do not + emit optional traceback table if optimize_size or TARGET_ELF. + * config/rs6000/rs6000.md (prefetch): New. + + 2002-01-15 Andreas Jaeger + + * config.gcc (x86_64-*-*): Install mmintrin.h and xmmintrin.h. + + 2002-01-15 Kazu Hirata + + * mips-tfile.c: Fix formatting. + + Tue Jan 15 00:56:11 CET 2002 Jan Hubicka + + * unroll.c (final_reg_note_copy): Fix previous commit. + + 2002-01-14 Kazu Hirata + + * config/h8300/h8300-protos.h: Remove the prototype for + eq_operator. + * config/h8300/h8300.c (eq_operator): Remove. + + 2002-01-14 Richard Henderson + + * config/i386/i386.md (prefetch): Tidy. + (prefetch_3dnow): Fix locality operand. + + 2002-01-14 Richard Henderson + + * config/mips/mips.h (HI_AND_FP_REGS): New register class. + (CLASS_CANNOT_CHANGE_MODE): Disallow HI in little-endian mode. + + 2002-01-14 Hans-Peter Nilsson + + * reload1.c (reload_combine): Pass reg_sum replacement through + copy_rtx in loop performing multiple changes. + + 2002-01-14 Jakub Jelinek + + * except.c (remove_unreachable_regions): New. + (free_eh_status): Clear exception_handler_labels. + (convert_from_eh_region_ranges): Call remove_unreachable_regions. + (find_exception_handler_labels): Don't add the same label more than + once. + (remove_exception_handler_label): Don't die if + find_exception_handler_labels hasn't been called for the current + function yet. + + Mon Jan 14 21:26:13 CET 2002 Jan Hubicka + + * toplev.c (rest_of_compilation): Rebuild jump labels after + gcse. + + 2002-01-14 Joseph S. Myers + + * doc/extend.texi: Move documentation of X86 built-in functions + here. + * doc/invoke.texi: From here. + * doc/sourcebuild.texi: Document location of documentation for + machine built-in functions. + + 2002-01-13 Christopher Faylor + + * cppfiles.c (TEST_THRESHOLD): New macro. + (SHOULD_MMAP): Ditto. + (read_include_file): Use SHOULD_MMAP macro to decide when mmap should + be used. + + Mon Jan 14 20:23:34 CET 2002 Jan Hubicka + + * unroll.c (final_reg_note_copy): Properly handle + REG_LABEL + (unroll_loops): Fix LOOP_CONDITION heuristics. + + 2002-01-14 Geoffrey Keating + + * doc/invoke.texi (Xstormy16 Options): Add xstormy16 option. + * doc/md.texi (Machine Constraints): Use @minus{} where appropriate. + + Mon Jan 14 20:18:19 CET 2002 Jan Hubicka + + * cfgcleanup.c (try_forward_edges): Avoid infinite loop at infinite + threaded loop. + + 2002-01-14 Tom Rix + + * config/rs6000/rs6000.md: Fix typo with sradi. + + 2002-01-14 Ulrich Weigand + + * config/s390/s390.md (movstrdix_64, movstrsix_31, movstrdi_64, + movstrsi_31, clrstrsi_64, clrstrsi_31): Improve RTL templates. + (clrstrdi, clrstrsi): Adapt callers. + + (extendsidi2, zero_extendsidi2): Remove no-conflict blocks. + + (movti splitter): Never use register 0 as base register. + + 2002-01-14 Hartmut Penner + + * combine.c (simplify_shift_const): Always generate new rtx + for shift expression instead of reusing given expression. + + Mon Jan 14 07:08:55 2002 Richard Kenner + + * config/alpha/alpha.c (alpha_expand_mov): Don't call + alpha_legitimize_address unless mode is Pmode. + + 2002-01-13 Geoffrey Keating + + * doc/md.texi (Modifiers): Document the '*' constraint for the + user. + + * doc/md.texi (Machine Constraints): Add constraints for xstormy16. + * doc/extend.texi (Function Attributes): 'interrupt' is valid + for xstormy16 too. + + 2002-01-13 Richard Henderson + + * reload.c (find_reloads): Use a hard reg destination as reload reg + for an input reload of the source. + + 2002-01-13 Gerald Pfeifer + + * doc/install.texi (Binaries): Make link to ftp.writtenword.com + more generic. + + Sun Jan 13 07:23:01 2002 Douglas B Rupp + + * Makefile.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. + * mklibgcc.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. + + * config/alpha/x-vms (USE_COLLECT2): Set to empty. + + Sun Jan 13 06:55:31 2002 Richard Kenner + + * dwarf2out.c (mem_loc_descriptor, case ADDRESSOF): New case. + + 2002-01-12 Tom Rix + + * config/rs6000/rs6000.c (rs6000_emit_set_long_const): Use ior for + TARGET_POWERPC64. + + 2002-01-12 Richard Henderson + + * config/i386/i386.c (bdesc_2arg): Mark psadbw MASK_3DNOW_A. + + * doc/invoke.texi: Update Alpha options. + + * doc/invoke.texi: Update i386 built-in function lists. + + Sat Jan 12 17:38:11 CET 2002 Jan Hubicka + + * unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note + referencing outside. + + Sat Jan 12 08:54:51 2002 Richard Kenner + + * diagnostic.c (warn_deprecated_use): Rework to lower indentation. + * expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for + offsets, and change line folding. + * optabs.c (expand_binop): Remove warnings. + * sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning. + + 2002-01-12 Graham Stott + + * attribs.c (handle_deprecated_attribute): constify WHAT. + * diagnostic.c (warn_deprecated_use): Add braces, fixes + dangling else warning and constify WHAT. + * except.h (struct function, struct inline_remap): Move + struct tag forward defs before all prototypes. + (duplicate_eh_regions): Whitespace. + + 2002-01-12 Nick Clifton + + * config/arm/arm.h (ARM_LEGITIMIZE_RELOAD_ADDRESS): Use + MODE_BASE_REG_CLASS. + (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Use MODE_BASE_REG_CLASS. + + 2002-01-12 Richard Henderson + + * config/i386/i386.c (override_options): If SSE, enable sse prefetch. + (ix86_expand_vector_move): New. + (bdesc_2arg): Remove andps, andnps, orps, xorps. + (ix86_init_mmx_sse_builtins): Make static. Remove composite builtins. + Remove old prefetch builtins. Special case the logicals removed above. + (ix86_expand_builtin): Likewise. + (safe_vector_operand): Use V4SFmode, not TImode. + (ix86_expand_store_builtin): Remove shuffle arg. Update callers. + (ix86_expand_timode_binop_builtin): New. + * config/i386/i386-protos.h: Update. + * config/i386/i386.h (enum ix86_builtins): Update. + * config/i386/i386.md: Correct predicates on MMX/SSE patterns. + Use ix86_expand_vector_move in vector move expanders. + (movti_internal, movti_rex64): Add xorps alternative. + (sse_clrv4sf): Rename and adjust from sse_clrti. + (prefetch): Don't work so hard. + (prefetch_sse, prefetch_3dnow): Use PREFETCH rtx, not UNSPEC. + * config/i386/xmmintrin.h (__m128): Use V4SFmode. + (_mm_getcsr, _mm_setcsr): Fix typo in builtin name. + + 2002-01-11 Richard Henderson + + * config/i386/mmintrin.h: New file. + * config/i386/xmmintrin.h: New file. + * config.gcc (i?86-*-*): Add extra_headers. + * simplify-rtx.c (simplify_unary_operation): Handle saturating + truncation codes. + (simplify_binary_operation): Handle saturating arithmetic codes. + * config/i386/i386.c (ix86_expand_sse_comi): Return the full result, + not the lowpart subreg. + (ix86_expand_builtin): Return a TImode dummy register instead of 0 + on error. + * config/i386/i386.md (mmx_clrdi): Override memory attribute. + + 2002-01-12 Michael Hayes + + * conflict.c (conflict_graph_compute): Free regsets when finished. + * ssa.c (compute_coalesced_reg_partition): Likewise. + + 2002-01-12 Herman A.J. ten Brugge + + * global.c (find_reg): Check for HARD_REGNO_CALL_PART_CLOBBERED + every where we allocate a register. + + 2002-01-12 Michael Hayes + + * gcse.c (compute_pre_data, pre_gcse): Use sbitmap_free. + * lcm.c (compute_earliest, compute_farthest): Likewise. + + 2002-01-11 Janis Johnson + + * expr.c (expand_assignment): Fix misuse of MEM_KEEP_ALIAS_SET. + + 2002-01-11 Janis Johnson + + * doc/rtl.texi (Insns): Fix 2 typos. + + 2002-01-11 Joseph S. Myers + + * doc/invoke.texi: Avoid overfull hboxes. Add summary of D30V + options. Use @table @gcctabopt for MMIX options. Add index + entries for MMIX options. Start new paragraph with first + heading of the machine-dependent options. + + 2002-01-11 Craig Rodrigues + + PR other/5299 + * config/ns32k/ns32k.md: Fix spelling mistake of "than" in comments. + * combine.c (force_to_mode): Same. + * reload1.c (clear_reload_reg_in_use): Same. + + 2002-01-11 Nick Clifton + + * config/arm/arm.c (arm_gen_constant): Correct test of 'remainder' + and 'subtargets'. + + 2002-01-11 Andreas Jaeger , + Brad Lucier + + * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove wrong + mcpu. + + Fri Jan 11 07:35:12 2002 Douglas B Rupp + + * config/alpha/vms.h: (MD_FALLBACK_FRAME_STATE_FOR): Fix errors. + Protect with IN_LIBGCC. + (LINK_EH_SPEC): Add required trailing space. + + Fri Jan 11 09:25:05 2002 Nicola Pero + + * c-tree.h: Move function declarations so that they are listed + under the filename which contains them. + (check_identifier, finish_decl_top_level, + lookup_name_current_level_global, shadow_record_fields): Remove. + + 2002-01-11 Andreas Jaeger + + * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove duplicated + march. + + 2002-01-10 Richard Henderson + + * config/alpha/alpha.c (print_operand): Add 'J'. + * config/alpha/alpha.md (call_osf_1_er, call_value_osf_1_er): Take a + new operand with the sequence number for the lituse. When splitting + the insns, use gen_movdi_er_high_g and generate a sequence number. + (gen_movdi_er_high_g): Print the sequence number if nonzero. + + 2002-01-10 Aldy Hernandez + + * config/rs6000/rs6000.c (altivec_init_builtins): Add support for + lvebx, lvehx, lvewx, lvxl, lvx, stvx, stvebx, stvehx, stvewx, + stvxl. + (altivec_expand_builtin): Same. + (altivec_expand_stv_builtin): New. + + * config/rs6000/rs6000.h (rs6000_builtins): Same. + + * config/rs6000/rs6000.md ("altivec_lvebx"): New. + ("altivec_lvehx"): New. + ("altivec_lvewx"): New. + ("altivec_lvxl"): New. + ("altivec_lvx"): New. + ("altivec_stvx"): New. + ("altivec_stvebx"): New. + ("altivec_stvehx"): New. + ("altivec_stvewx"): New. + ("altivec_stvxl"): New. + + 2002-01-10 Richard Henderson + + * cfgrtl.c (delete_insn): Assert insn hasn't been deleted yet. + * reload1.c (delete_output_reload): Zap spill_reg_store. Take + care not to delete instructions twice. + + 2002-01-10 Zack Weinberg + + * toplev.c: Don't declare environ (it's not used anywhere). + * configure.in: Don't check for declaration of environ. + * config/i386/xm-mingw32.h: Don't #define environ. + * config.in, configure: Regenerate. + + 2002-01-10 Zack Weinberg + + * configure.in: Set stage1_cflags for powerpc-*-darwin*. + * configure: Regenerate. + + * config/interix.h: Set DO_GLOBAL_CTORS_BODY and + DO_GLOBAL_DTORS_BODY here, not in xm-interix.h. + * config/alpha/vms.h: Set INCLUDE_DEFAULTS here, not in + alpha/xm-vms.h. + * config/m68k/t-next: Set OTHER_FIXINCLUDES_DIRS and + LIMITS_H_TEST here, not in m68k/x-next. + * config/rs6000/beos.h: Set STANDARD_INCLUDE_DIR and + SYSTEM_INCLUDE_DIR here, not in rs6000/xm-beos.h. + + * config/x-interix: Don't set RANLIB, RANLIB_TEST, SHELL, + LIBGCC2_INCLUDES, or SYSTEM_HEADER_DIR. + * config/alpha/x-vms: Don't set USE_COLLECT2. Add comments. + + * config/i386/x-djgpp: Renamed i386/t-djgpp. + * config/m88k/x-dolph: Renamed m88k/t-dolph. + * config/m88k/x-texXD88: Renamed m88k/t-texXD88. + * config/pa/x-pa-mpeix: Renamed pa/t-mpeix. Update for + replacement of quadlib.asm with quadlib.c. + + * config/x-interix3, config/xm-interix.h, config/i386/x-beos, + config/i386/xm-osf1elf.h, config/rs6000/x-darwin, + config/rs6000/xm-beos.h: Delete file. + + * config.gcc: Update to match above changes. + + 2002-01-10 Kazu Hirata + + * config/h8300/h8300.h: Fix comment typos. + * config/h8300/h8300.md: Likewise. + * config/h8300/lib1funcs.asm: Likewise. + + 2002-01-10 Dale Johannesen + + PR optimization/5269 + * unroll.c (precondition_loop_p): Make *increment be the correct + sign when n_iterations known, to avoid confusing caller. + + 2002-01-10 Kazu Hirata + + * doc/extend.texi (deprecated): Fix a typo. + + Thu Jan 10 22:35:54 CET 2002 Jan Hubicka + + * basic-block.h (update_br_prob_note): Declare. + * cfgcleanup.c (try_simplify_condjump): Call update_br_prob_note. + (try_forward_edges): Care negative frequencies and update note. + (outgoing_edges_match): Tweek conditional merging heuristics. + (try_crossjump_to_edge): use update_br_prob_note. + * cfglayout.c (fixup_reorder_chain): Likewise. + * cfrtl.c (update_br_prob_note): New. + * ifcvt.c (dead_or_predicable): Call update_br_prob_note. + + * i386.c (ix86_decompose_address): Return -1 if address contains + shift. + (legitimate_address_p): Require ix86_decompose_address to return 1. + + * gcse.c (hash_scan_set): Use CONSTANT_INSN_P. + (cprop_insn): Likewise. + + 2002-01-10 Kazu Hirata + + * toplev.c: Fix formatting. + * tree.c: Likewise. + * tree-dump.c: Likewise. + * unroll.c: Likewise. + * unwind-dw2.c: Likewise. + * unwind-dw2-fde.c: Likewise. + * unwind-dw2-fde-glibc.c: Likewise. + * unwind-sjlj.c: Likewise. + + 2002-01-10 Joseph S. Myers + + * doc/invoke.texi: Document PDP-11 options. + + 2002-01-10 Kazu Hirata + + * config/h8300/h8300.h: Fix formatting. + + 2002-01-10 Ira Ruben + + Add __attribute__ ((deprecated)). + * extend.texi: Document __attribute__ ((deprecated)). + * invoke.texi: Document -Wno-deprecated-declarations. + * testsuite/g++.dg/other/deprecated.C: New C++ test. + * testsuite/gcc.dg/deprecated.c: New C test. + * attribs.c (enum attrs): Declare handle_deprecated_attribute(). + (c_common_attribute_table): Add "deprecated" entry. + (handle_deprecated_attribute): New function. + * c-decl.c (deprecated_states): New enum. + deprecated_state: State of "deprecated" handling. + (start_decl): Set deprecated_state based on attributes. + (grokdeclarator): Test for deprecated uses, propagate attribute. + * c-typeck.c (build_component_ref): Test for deprecated fields. + (build_external_ref): Test for deprecated primaries. + * diagnostic.c (warn_deprecated_use) New function to issue + warnings about __attribute__ ((depricated)) references. + * flags.h (warn_deprecated_decl): Extern declared for + -W[no-]deprecated-declarations option. + * print-tree.c (print_node): Show deprecated flag status. + * toplev.c (warn_deprecated_decl): Defined. + (W_options): Added "deprecated-declaration". + * toplev.h (warn_deprecated_use): Extern declared. + * tree.h (struct tree_common): Define deprecated_flag. + (TREE_DEPRECATED): New macro to access flag. + * cp/call.c (build_call): Test for deprecated calls. + * cp/class.c (add_implicitly_declared_members): Set global + flag to tell grokdeclarator to not issue deprecated warnings. + * cp/cp-tree.h: Add extern for adding_implicit_members. + * cp/decl.c (deprecated_states): New enum. + (start_decl): Set deprecated_state based on attributes. + (grokdeclarator): Test for deprecated uses, propagate attribute. + * cp/lex.c (do_identifier): Test for deprecated primaries. + * cp/typeck.c (build_component_ref): Test for deprecated fields. + + 2002-01-10 Ira Ruben + + Fix to assign attributes to inline member functions. + * cp/decl.c (start_method): Handle attrlist. + + 2002-01-10 Kazu Hirata + + * combine.c (expand_field_assignment): Use subreg_lsb(). + + 2002-01-10 David Edelsohn + + * alias.c (find_base_value): Add cases for HIGH, PRE_INC, PRE_DEC, + POST_INC, POST_DEC, PRE_MODIFY, and POST_MODIFY. + (find_base_term): Add cases for TRUNCATE, PRE_MODIFY, and POST_MODIFY. + Recurse for any operand of AND as long as constant is nonzero. + + 2002-01-10 Kazu Hirata + + * config/h8300/h8300.md: Remove constraints from expanders. + + 2002-01-10 Kazu Hirata + + * varasm.c: Fix formatting. + * varray.c: Likewise. + * vmsdbgout.c: Likewise. + * xcoffout.c: Likewise. + + Thu Jan 10 17:19:12 CET 2002 Jan Hubicka + + * cfgcleanup.c (try_forward_edges): Properly initialize nthreaded_edges; + update edge probabilities to match. + + 2002-01-10 Joseph S. Myers + + * Makefile.in ($(docdir)/gccint.info, gccint.dvi): Add additional + dependencies. + * doc/languages.texi, doc/sourcebuild.texi: New files. + * doc/configfiles.texi: Make a subsubsection. Update. + * doc/configterms.texi: Add @node. Remove warning that this isn't + instructions for building GCC. + * doc/makefile.texi: Make a subsection. + * doc/gccint.texi: Update. + + Thu Jan 10 16:39:58 CET 2002 Jan Hubicka + + * i386.md (sse_mov?fcc_const0_?): Fix constraints. + + Thu Jan 10 12:45:50 2002 Nicola Pero + + * doc/cpp.texi: Document the __OBJC__ preprocessor macro. + + Thu Jan 10 11:19:18 CET 2002 Jan Hubicka + + * optabs.c (expand_fix): Look for wider integer modes first. + + * i386.md (mov?f): Avoid the fake const double trick for medium + memory model. + (min?f*/max?f*): Prohibit memory operands for i387 variant. + (fop_df_4): Disable for SSE compilation. + + 2002-01-10 Graham Stott + + * dwarf2out.c (indirect_string_alloc, output_indirect_string): + Move prototype into DWARF2_DEBUGGING_INFO conditional block. + + 2002-01-10 Richard Henderson + + * config/alpha/alpha.md (extendsidi2_fix): Penalize f/f alternative. + + 2002-01-10 Richard Henderson + + * regrename.c (find_oldest_value_reg): Fix typo in mode change check. + (copyprop_hardreg_forward_1): Likewise. Use mode_change_ok. + + 2002-01-10 Kazu Hirata + + * combine.c (can_combine_p): Fix a comment typo. + + 2002-01-09 Zack Weinberg + + * Makefile.in (s-gencheck, s-options, s-specs): Handle an + empty list correctly. Change loop index $t to $f for + consistency with rest of Makefile. + + 2002-01-08 Aldy Hernandez + + * testuite/gcc.dg/altivec-4.c: Add test for mtvscr, dssall, + mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. + + * config/rs6000/rs6000.c (altivec_expand_builtin): Add support for + mtvscr, dssall, mfvscr, dss, lvsl, lvsr, dstt, dst, dstst, dststt. + (altivec_init_builtins): Same. + (altivec_expand_unop_builtin): Return NULL_RTX on error. + (altivec_expand_binop_builtin): Same. + (altivec_expand_ternop_builtin): Same. + (bdesc_dst): New. + + * config/rs6000/rs6000.md ("altivec_mtvscr"): New. + ("altivec_vctuxs"): Fix typo. + ("altivec_vnmsubfp"): Same. + ("altivec_dssall"): New. + ("altivec_mfvscr"): New. + ("altivec_dss"): New. + ("altivec_lvsl"): New. + ("altivec_lvsr"): New. + ("altivec_dstt"): New. + ("altivec_dstst"): New. + ("altivec_dststt"): New. + ("altivec_dst"): New. + + * config/rs6000/rs6000.h (rs6000_builtins): Add mtvscr, dssall, + mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. + + 2002-01-09 Richard Henderson + + * config/alpha/alpha.md (prologue_mcount): Remove lituse_jsr reloc. + + 2002-01-10 Hans-Peter Nilsson + + * config/mmix/mmix.c (mmix_asm_identify_gcc): Remove unused + function. + * config/mmix/mmix-protos.h (mmix_asm_identify_gcc): Don't + prototype. + * config/mmix/mmix.h (ASM_IDENTIFY_GCC): Remove unused macro. + + 2002-01-09 Kazu Hirata + + * read-rtl.c: Fix formatting. + * real.c: Likewise. + * regclass.c: Likewise. + * regrename.c: Likewise. + * reg-stack.c: Likewise. + * reload1.c: Likewise. + * reload.c: Likewise. + * rtl.c: Likewise. + + 2002-01-09 Kazu Hirata + + * rtlanal.c (find_reg_fusage): Use XEXP instead of SET_DEST + to extract items in the expr_list chain. + + 2002-01-09 Richard Henderson + + * config/vax/vax.c (vax_rtx_cost): Never abort. + + * config/vax/vax.h (REAL_ARITHMETIC): Define. + + 2002-01-09 Jan Hubicka + + * gcse.c (cprop_jump): Delete insn if simplified jump is no-op. + + 2002-01-09 Richard Henderson + + * config/arm/arm.c (arm_gen_constant): Use trunc_int_for_mode. + Unify code from various alternatives. + + 2002-01-09 Richard Henderson + + * regrename.c (copy_value): Ignore the copy if the source register + is present in the value chain with a narrower mode. + + 2002-01-09 Herman A.J. ten Brugge + + * real.c (c4xtoe, toc4x): Do some special conversion on long doubles + for the c4x target. Also improve layout. + + 2002-01-09 Richard Henderson + + * config/m32r/m32r.c (move_src_operand): Fix 32-bit int test. + * config/m32r/m32r.md (and ior xor splitters): Swap operands + to match insn patterns. + + 2002-01-09 Richard Henderson + + * regrename.c (find_oldest_value_reg): Use gen_rtx_raw_REG. + (copyprop_hardreg_forward_1): Likewise. + + 2002-01-09 John David Anglin + + * pa.md (decrement_and_branch_until_zero): Change predicate for + operand 0 from register_operand to reg_or_nonsymb_mem_operand. + + 2002-01-09 Bryce McKinlay + + * ginclude/stddef.h: Define _BSD_WCHAR_T_DEFINED_ if _BSD_WCHAR_T_ + gets undefined. For Darwin. + + 2002-01-09 Herman A.J. ten Brugge + + * config/c4x/c4x.h: Use PUSH_ARGS and PUSH_ROUNDING for stack passing. + + 2002-01-09 Michael Hayes + + * config/c4x/c4x/md: Remove extraneous constraints from define_splits. + + 2002-01-08 Richard Henderson + + * regrename.c (copy_value): Ignore overlapping copies. + + 2002-01-08 Richard Henderson + + * config/alpha/alpha.c (alpha_split_conditional_move): Call copy_rtx + as needed to avoid shared structure. + + 2002-01-08 Kazu Hirata + + * config/h8300/h8300.c (get_shift_alg): Fix 15-bit LSHIFTRT on + H8/300H and H8S. + + 2002-01-08 Joseph S. Myers + + * doc/tm.texi (EASY_DIV_EXPR, IMPLICIT_FIX_EXPR, + LONGJMP_RESTORE_FROM_STACK, MAX_INT_TYPE_SIZE): Remove + documentation of obsolete macros. + * system.h: Poison these macros. + * config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h, + config/arc/arc.h, config/arm/arm.h, config/avr/avr.h, + config/c4x/c4x.h, config/clipper/clipper.h, + config/convex/convex.h, config/cris/cris.h, config/d30v/d30v.h, + config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h, + config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h, + config/i386/i386.h, config/i860/i860.h, config/i960/i960.h, + config/ia64/ia64.h, config/m32r/m32r.h, config/m68hc11/m68hc11.h, + config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h, + config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, + config/mn10300/mn10300.h, config/ns32k/ns32k.h, config/pa/pa.h, + config/pdp11/pdp11.h, config/pj/pj.h, config/romp/romp.h, + config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h, + config/sparc/sparc.h, config/stormy16/stormy16.h, + config/v850/v850.h, config/vax/vax.h, config/we32k/we32k.h: Remove + definitions and commented out definitions of obsolete macros. + * config/mips/iris5.h (MAX_WCHAR_TYPE_SIZE): Don't define in terms + of MAX_INT_TYPE_SIZE. + + 2002-01-08 Ulrich Weigand + + * config/s390/s390.c (s390_preferred_reload_class): Never + return ADDR_REGS if it isn't a subset of the given class. + * config/s390/s390.h (REGISTER_MOVE_COST): Penalize not just + FP_REGS, but all superclasses as well. + + * config/s390/s390.c (s390_function_profiler): Fix thinko. + + * config/s390/s390.md (cmpdi_ccu_mem, cmpsi_ccu_mem, + cmphi_ccu_mem, cmpqi_ccu_mem): First operand of compare + must not be a const_int. + + 2002-01-08 Richard Henderson + + * Makefile.in (toplev.o): Depend on options.h. + (gcc.o): Depend on specs.h. + + 2002-01-08 Jakub Jelinek + + * expr.c (store_expr): Convert VOIDmode constants back to target's + mode. + + 2002-01-08 Gerald Pfeifer + + * doc/invoke.texi: Markup gcc as @command. Refer to + http://gcc.gnu.org/onlinedocs/gcc/Contributors.html instead + of http://gcc.gnu.org/thanks.html. + + 2002-01-08 Dale Johannesen + + * config/rs6000/rs6000.md: Add missing int register + target case to movdf_low. + + 2002-01-08 Zack Weinberg + + * Makefile.in (cs-tconfig.h): Don't depend on $(CONFIG_H) or + except.h. Remove commands to define USING_SJLJ_EXCEPTIONS. + (cppinit.o): Depend on except.h. + (gencheck.h, options.h, specs.h, s-gencheck, s-options, + s-specs): New rules. + + * configure.in: Don't AC_DEFINE_UNQUOTED PACKAGE or VERSION. + Don't create specs.h/options.h/gencheck.h here. Remove + unnecessary variable settings from last argument of AC_OUTPUT. + * config.in, configure: Regenerate. + * intl.c: Hardcode package name as "gcc". + + * cppinit.c: Include except.h. + (builtin_array): Define __USING_SJLJ_EXCEPTIONS__ when + appropriate. + * unwind-dw2.c, unwind-sjlj.c, config/ia64/unwind-ia64.c: + Use #if(n)def __USING_SJLJ_EXCEPTIONS, not #if + (!)USING_SJLJ_EXCEPTIONS. + * doc/cpp.texi: Document __USING_SJLJ_EXCEPTIONS__. + + 2002-01-08 Joseph S. Myers + + * doc/tm.texi (ASM_OUTPUT_EH_REGION_BEG, ASM_OUTPUT_EH_REGION_END, + ASM_OUTPUT_LABELREF_AS_INT, DOESNT_NEED_UNWINDER, EH_TABLE_LOOKUP, + OBJC_SELECTORS_WITHOUT_LABELS, OMIT_EH_TABLE): Remove + documentation of obsolete macros. + * system.h: Poison these macros. + * config/d30v/d30v.h, config/ns32k/encore.h, + config/stormy16/stormy16.h: Remove definitions and commented out + definitions of obsolete macros. + + Tue Jan 8 15:56:41 2002 Nicola Pero + + * objc/objc-act.c (handle_class_ref): Mark the declaration of + %sobjc_class_ref_%s as used - to prevent unwanted compiler + warnings. + + 2002-01-08 Ulrich Weigand + + * config/s390/linux.h (ASM_OUTPUT_LABELREF): Remove. + * config/s390/s390.c (s390_emit_epilog): Add REG_FRAME_RELATED_EXPR + to insn adjusting stack/frame pointer. + * config/s390/s390.md (reload_la_64, reload_la_31): Do not + accept operands that cause the insn to be non-splittable. + + 2002-01-08 Graham Stott + + * c-tree.h (C_TYPE_FIELDS_READONLY): Uppercase macro parameter. + (C_TYPE_FIELDS_VOLATILE): Likewise. + (C_TYPE_BEING_DEFINED): Likewise. + (C_IS_RESERVED_WORD): Likewise. + (C_TYPE_VARIABLE_SIZE): Likewise. + (C_DECL_VARIABLE_SIZE): Likewise. + (C_MISSING_PROTOTYPE_WARNED): Likewise. + (C_SET_EXP_ORIGINAL_CODE): Likewise. + (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter and remove + parenthesis. + (C_DECL_ANTICIPATED): Likewise. + (c_build_type_variant): Add parenthesis. + + 2002-01-08 Joseph S. Myers + + * gcc.c (option_map): Remove --version. + (process_command): Handle -fversion following the GNU Coding + Standards. Partially addresses PR other/704. + + 2002-01-08 Graham Stott + + * combine.c (combine_instructions): Fix typo. + + 2002-01-08 Graham Stott + + * debug.h: Use "tree" and "rtx" throughout. + + * debug.c: Likewise. + + 2002-01-08 Nick Clifton + + * dbxout.c (dbxout_symbol_location): If a symbol ref is in the + constant pool, use the pool's version of the symbol instead. + + 2002-01-07 Richard Henderson + + * regrename.c (find_oldest_value_reg): Ignore the value chain if + the original register was copied in a mode with a fewer number of + hard registers than the desired mode. + (copyprop_hardreg_forward_1): Likewise. + (debug_value_data): Fix loop test. + * toplev.c (parse_options_and_default_flags): Reenable + -fcprop-registers at -O1. + + 2002-01-07 Aldy Hernandez + + * config/rs6000/rs6000.c (bdesc_2arg): Add altivec predicates. + (altivec_init_builtins): New node v4si_ftype_v16qi_v16qi. + + * config/rs6000/rs6000.h (rs6000_builtins): Add enums for altivec + predicates. + + * config/rs6000/rs6000.md: Add altivec predicate patterns. + + 2002-01-07 John David Anglin + + * pa.c (FUNC_BEGIN_PROLOG_LABEL, current_function_number): Define. + (pa_output_function_prologue): Output local label at the beginning of + the prologue when profiling. + (hppa_profile_hook): Use the local label rather than the function label. + * pa.h (PROFILE_BEFORE_PROLOGUE): Define. + + 2002-01-07 Aldy Hernandez + + * config/rs6000/rs6000.c (print_operand): Remove extra space. + (altivec_expand_unop_builtin): Fix thinko. + (altivec_expand_binop_builtin): Same. + (altivec_expand_ternop_builtin): Same. + (altivec_expand_builtin): Same. + + 2002-01-07 Richard Henderson + + * config/rs6000/xcoff.h (ASM_FILE_START): Reverted to profile_flag. + + 2002-01-07 Jason Merrill + + * unwind-dw2.c (execute_cfa_program): Use < again. + + 2002-01-07 Jakub Jelinek + + * predict.c (combine_predictions_for_insn): Avoid division by zero. + + 2002-01-07 Jakub Jelinek + + * simplify-rtx.c (simplify_plus_minus): Bump n_ops for NOT. + Don't allow -1 - x -> ~x simplifications in the first pass. + + 2002-01-07 Aldy Hernandez + + * rs6000.c (altivec_expand_ternop_builtin): Don't die on invalid + arguments. + (altivec_expand_binop_builtin): Same. + (altivec_expand_unop_builtin): Same. + (print_operand): Fix typo. + (bdesc_1arg): Add vupk* variants. + + * rs6000.h (rs6000_builtins): Add vupk* enums. + + * rs6000.md: Add altivec_vupk* variants. + + 2002-01-07 Joseph S. Myers + + * doc/gcc.texi, doc/gccint.texi, doc/cppinternals.texi, + doc/install.texi, doc/invoke.texi, doc/rtl.texi: Update copyright + and last update dates. + + 2002-01-07 Janis Johnson + + * doc/rtl.texi (Flags): Clean up documentation of RTL flags + + 2002-01-07 Marek Michalkiewicz + + * config/avr/avr.c (avr_mcu_types): Add new MCU types. + * config/avr/avr.h (CPP_SPEC): Likewise. + (LINK_SPEC): Likewise. + (CRT_BINUTILS_SPECS): Likewise. + * config/avr/t-avr (MULTILIB_MATCHES): Likewise. + * doc/invoke.texi (AVR Options): Document them. + + Mon Jan 7 11:59:34 CET 2002 Jan Hubicka + + * unroll.c (copy_loop_body): Always properly update JUMP_LABEL and + LABEL_NUSES. + + 2002-01-07 Graham Stott + + * config/i386/i386.h: Update copyright date. + (HALF_PIC_PTR): Add parenthesis. + (OPTIMIZATION_OPTIONS): Whitespace, add parenthesis and wrap. + (CONSTANT_ALIGNMENT): Add parenthesis. + (DATA_ALIGNMENT): Likewise. + (LOCAL_ALIGNMENT): Likewise. + (FUNCTION_ARG_BOUNDARY): Whitespace, add parenthesis and wrap. + (IS_STACK_MODE): Uppercase macro parameter, add parenthesis and wrap. + (CONDITIONAL_REGISTER_USAGE): Wrap in do {...} while (0). + (HARD_REGNO_NREGS): Add paranethesis. + (VALID_SSE_REG_MODE): Whitespace. + (VALID_MMX_REG_MODE): Whitespace. + (VALID_FP_MODE_P): Uppercase macros parameter and whitespace. + (ix86_hard_regno_mode_ok): Add parenthesis. + (HARD_REGNO_CALLER_SAVE_MODE): Whitespace. + (RETURN_IN_MEMORY): Whitespace. + (N_REG_CLASSES): Add parenthesis. + (INTEGER_CLASS_P): Add parenthesis and wrap. + (FLOAT_CLASS_P): Likewise. + (SSE_CLASS_P): Likewise. + (MMX_CLASS_P): Likewise. + (MAYBE_INTEGER_CLASS_P): Likewise. + (MAYBE_FLOAT_CLASS_P): Likewise. + (MAYBE_SSE_CLASS_P): Likewise. + (MAYBE_MMX_CLASS_P): Likewise. + (Q_CLASS_P): Likewise. + (GENERAL_REGNO_P): Uppercase macro parameter. + (REX_INT_REGNO_P): Uppercase macro parameter and wrap. + (FP_REGNO_P): Likewise. + (ANY_FP_REGNO_P): Uppercase macro parameter. + (SSE_REGNO_P): Likewise. + (SSE_REGNO): Likewise. + (SSE_REG_P): Likewise. + (SSE_FLOAT_MODE_P): Likewise. + (MMX_REGNO_P): Likewise. + (MMX_REG_P):Likewise. + (STACK_REG_P): Likewise. + (NON_STACK_REG_P): Likewise. + (STACK_TOP_P): Likewise. + (CONVERT_HARD_REGISTER_TO_SSA_P): Add parenthesis. + (PREFERRED_RELOAD_CLASS): Add parenthesis and whitespace. + (SECONDARY_MEMORY_NEEDED): Likewise. + (SECONDARY_OUTPUT_RELOAD_CLASS): Whitespace. + (MD_ASM_CLOBBERS): Whitespace and wrap. + (MUST_PASS_IN_STACK): Whitespace and wrap. + (RETURN_POPS_ARGS): Add parenthesis. + (INIT_CUMULATIVE_ARGS): Likewise. + (FUNCTION_ARG): Likewise. + (FUNCTION_OK_FOR_SIBCALL): Add parenthesis and whitespace. + (SETUP_INCOMING_VARARGS): Likewise. + (BUILD_VA_LIST_TYPE): Add parenthesis. + (EXPAND_BUILTIN_VA_START): Uppercase macro paremeters and add + parenthsis. + (EXPAND_BUILTIN_VA_ARG): Likewise. + (FUNCTION_PROFILER): Wrap in do { ... } while (0) and add parenthesis. + (INITIALIZE_TRAMPOLINE): Add parenthesis. + (INITIAL_ELIMINATION_OFFSET): Likewise. + (REGNO_OK_FOR_INDEX_P): Add parenthesis. + (REGNO_OK_FOR_BASE_P): Likewise. + (REGNO_OK_FOR_SIREG_P): Add parenthesis and wrap. + (REGNO_OK_FOR_DIREG_P): Likewise. + (REG_OK_FOR_INDEX_P): Whitespace. + (REG_OK_FOR_BASE_P): Whitespace. + (GO_IF_LEGITIMATE_ADDRESS): Wrap in do { ... } while (0) and add + parenthesis. + (FIND_BASE_TERM): Fix typo. + (LEGITIMIZE_ADDRESS): Wrap in { .. } while (0) and add parenthesis. + (REWRITE_ADDRESS): Uppercase macro parameter and whitespace. + (SYMBOLIC_CONST; Whitespace. + (GO_IF_MODE_DEPENDENT_ADDRESS):Wrap in { .. } while (0) and wrap. + (ENCODE_SECTION_INFO): Whitespace. + (FINALIZE_PIC): Remove do { ... } while (0). + (PROMOTE_MODE): Wrap in do { ... } while (0). + (CONST_COSTS): Whitespace. + (RTX_COSTS): Add paramethesis, whitespace and wrap. + (REGISTER_MOVE_COST): Add parenthesis. + (MEMORY_MOVE_COST): Likewise. + (EXTRA_CC_MODES): Whitespace. + (SELECT_CC_MODE): Add parenthesis and whitespace. + (DBX_REGISTER_NUMBER): Uppercase macro parameter and add parenthsis. + (ASM_PREFERRED_EH_DATA_FORMAT): Add parenthesis and whitespace. + (ASM_OUTPUT_LABEL): Add paramethesis. + (ASM_OUTPUT_REG_PUSH): Add parenthesis and whitespace. + (ASM_OUTPUT_REG_POP): Likewise. + (ASM_OUTPUT_ADDR_VEC_ELT): Add parenthesis. + (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. + + * config/i386/i386.c: Update copyright. + (CHECK_STACK_LIMIT): Add parenthesis. + (AT_BP): Uppercase macro parameter. + (x86_64_int_parameter_registers): Constify. + (x86_64_int_return_registers): Likewise. + (ix86_compare_op0): Use rtx. + (construct_container): Constify INTREG parameter. + (function_arg): Use rtx. + + * diagnostic.h: Update copyright date. + (output_buffer_state): Add parenthesis. + (output_buffer_format_args): Likewise. + + * combine.c (combine_instructions): Replace XEXP (links, 0) + with link. + + 2002-01-06 H.J. Lu + + * cfgcleanup.c (thread_jump): Fix 2 typos. + + 2002-01-06 Aldy Hernandez + + * config.gcc: Add support for --enable-altivec. + + 2002-01-06 Craig Rodrigues + + * emit-rtl.c (gen_highpart): Add check for NULL_RTX. + + 2002-01-06 Jakub Jelinek + + * objc/objc-act.c (handle_impent): Use assemble_variable to emit + __objc_class_name_*. + + 2002-01-06 Craig Rodrigues + + * doc/install.texi (sparcv9-*-solaris2*): Add documentation. + + 2002-01-06 Richard Henderson + + * reorg.c (emit_delay_sequence): Remove death notes, not merely + nop them out. Increment label reference count for REG_LABEL. + (fill_slots_from_thread): Frob label reference count around + delete_related_insns. + + 2002-01-05 Richard Henderson + + * cfgcleanup.c (try_forward_edges): Detect infinite loops while + jump threading. + + 2002-01-05 Richard Henderson + + * c-decl.c (c_expand_body): Don't call outlining_inline_function. + * integrate.c (output_inline_function): Likewise. + * toplev.c (rest_of_compilation): Do it here instead. Move call + to remove_unnecessary_notes after emitting abstract instance. + Force an emitted nested function to have its parent emited as well. + * dwarf2out.c (loc_descriptor_from_tree): Read mode after checking + for null. + (rtl_for_decl_location): Do not look at reload data structures + before reload has run. + + 2002-01-05 Kazu Hirata + + * cse.c: Fix formatting. + * dwarf2asm.c: Likewise. + * dwarf2out.c: Likewise. + * explow.c: Likewise. + * expmed.c: Likewise. + * function.c: Likewise. + * gcov.c: Likewise. + * gencheck.c: Likewise. + * genrecog.c: Likewise. + * ggc-common.c: Likewise. + * ggc-page.c: Likewise. + * global.c: Likewise. + + 2002-01-05 Kazu Hirata + + * combine.c: Fix formatting. + + 2002-01-05 Craig Rodrigues + + PR middle-end/1557 + * config/ia64/ia64.h (RENAME_EXTENDED_BLOCKS): Remove. + + 2002-01-05 David Edelsohn + + * config/rs6000/rs6000.h (TARGET_POWERPC): For IN_LIBGCC2, define + as 1 for __powerpc64__ as well. + + * config/rs6000/t-aix43 (T_ADAFLAGS): Define. + + * alias.c (find_base_value, PLUS/MINUS): If we found a base, + return it. + + 2002-01-05 Daniel Berlin + + * lcm.c: Revert change, due to performance regression it causes on + SPEC because it's slightly more conservative (sigh, I hate + edge-based LCM). + + Sat Jan 5 11:52:05 CET 2002 Jan Hubicka + + * cfgcleanup.c (try_forward_edges): Allow multiple jump threading. + + 2002-01-05 Neil Booth + + * doc/cppinternals.texi: Update. + + 2002-01-05 Hans-Peter Nilsson + + * doc/invoke.texi (Option Summary) : Document + -mbranch-predict, -mreg-stack-fill-bug-workaround and their + negatives. + (MMIX Options): Ditto. Fix item/itemx typo for -mno-zero-extend. + * config/mmix/mmix.c (mmix_target_asm_function_prologue): Rework + kludge for pre-october-14th mmix versions to handle new-found bug + with PUSHJ/PUSHGO and the register stack. + * config/mmix/mmix.h (struct machine_function): Rename member + has_call_value_without_parameters to has_call_without_parameters. + All referers changed. + (TARGET_MASK_REG_STACK_FILL_BUG, TARGET_DEFAULT + TARGET_MASK_BRANCH_PREDICT): New macros. + (TARGET_SWITCHES): New options -mreg-stack-fill-bug-workaround, + -mno-reg-stack-fill-bug-workaround. + * config/mmix/mmix.md ("call"): Set struct machine member + has_call_without_parameters. + + Sat Jan 5 02:20:22 CET 2002 Jan Hubicka + + * cfgcleanup.c (thread_jump): Fix handling of reversed branches. + + Sat Jan 5 01:35:29 CET 2002 Jan Hubicka + + * cfgcleanup.c: Include tm_p.h + (mark_effect): Fix handling of hard register; fix handling of SET + + 2002-01-04 Kazu Hirata + + * config/h8300/h8300.md (anonymous patterns): Check that + operands are registers before using REGNO on them. + + 2002-01-03 Roland McGrath + + * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcall-gnu. + + 2002-01-04 Jakub Jelinek + + * tree.h (expand_expr_stmt_value): Add maybe_last argument. + * c-common.h (genrtl_expr_stmt_value): Likewise. + * stmt.c (expand_expr_stmt): Pass 1 as maybe_last. + (expand_expr_stmt_value): Add maybe_last argument. + Don't warn about statement with no effect if it is the last statement + in expression statement. + * c-semantics.c (genrtl_expr_stmt): Pass 1 as maybe_last. + (genrtl_expr_stmt_value): Add maybe_last argument, pass it down to + expand_expr_stmt_value. + (expand_stmt) [EXPR_STMT]: Pass 1 as maybe_last to + genrtl_expr_stmt_value if t is the last EXPR_STMT in its scope. + * expr.c (expand_expr) [LABELED_BLOCK_EXPR, LOOP_EXPR]: Pass 1 + as maybe_last to expand_expr_stmt_value. + + Fri Jan 4 11:45:05 2002 Jeffrey A Law (law@redhat.com) + + * c-common.c (c_expand_start_cond): Expect the IF_STMT node to + be passed in, do not build it. + (c_begin_if_stmt): New function. + (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. + * c-common.h (c_expand_start_cond): Update prototype. + (c_begin_if_stmt): Prototype new function. + (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. + * c-parse.in (if_prefix): Use c_begin_if_stmt, + c_begin_while_stmt and c_finish_while_stmt_cond. + + 2002-01-04 William Cohen + + * config/pa/elf.h (ASM_FILE_START): Reverted to profile_flag. + * config/pa/pa-linux.h (ASM_FILE_START): Likewise. + * config/pa/pa64-hpux.h (ASM_FILE_START): Likewise. + * config/pa/som.h (ASM_FILE_START): Likewise. + + 2002-01-04 Daniel Berlin + + * lcm.c: Include df.h. + Add available_transfer_function prototype. + (compute_available): Rework to use iterative dataflow framework. + (struct bb_info): s/bb_info/lcm_bb_info/g to avoid conflict + with bb_info in df.h + (available_transfer_function): New function. + + * Makefile.in (lcm.o): add df.h to dependencies. + + 2002-01-04 Richard Henderson + + * config/alpha/alpha.c (some_operand): Accept HIGH. + (input_operand): Likewise; accept simple references to globals. + (alpha_const_ok_for_letter_p): New, outlined from alpha.h. + (alpha_const_double_ok_for_letter_p): Likewise. + (alpha_extra_constraint): Likewise. + (alpha_preferred_reload_class): Likewise. Do not force + symbolic constants to memory. + (alpha_legitimate_address_p): Accept simple references + to small_symbolic_operand. + (alpha_legitimize_address): New arg scratch. Be prepared to be + called when no_new_pseudos. Emit simple symbolic references. + Split integers into low, high, and rest. + (alpha_expand_mov): Use alpha_legitimize_address. + (some_small_symbolic_mem_operand): New. + (split_small_symbolic_mem_operand): New. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.h (CONST_OK_FOR_LETTER_P): Out-line. + (CONST_DOUBLE_OK_FOR_LETTER_P): Likewise. + (EXTRA_CONSTRAINT): Likewise. + (PREFERRED_RELOAD_CLASS): Likewise. + (LEGITIMIZE_ADDRESS): Update for alpha_legitimize_address change. + (PREDICATE_CODES): Update. + * config/alpha/alpha.md: New post-reload splitters to convert + simplfied symbolic operands to the form that references $29. + (divide expanders): Use emit_move_insn, not gen_movdi_er_high_g. + (movdi_er_nofix, movdi_er_fix): Accept any symbolic operand. + + 2002-01-03 Richard Henderson + + * local-alloc.c (function_invariant_p): Update commentary. + + 2002-01-04 H.J. Lu + + * toplev.c (rest_of_compilation): Fix a typo when calling + cleanup_cfg. + + 2002-01-03 Kazu Hirata + + * c-common.c: Fix formatting. + * diagnostic.c: Likewise. + * doloop.c: Likewise. + * dwarf2out.c: Likewise. + + 2002-01-03 Kazu Hirata + + * config/h8300/h8300.c (output_logical_op): Use 'not.w' instead + of 'neg.w' when xoring with 0x0000ffff or 0xffff0000. + + 2002-01-03 Neil Booth + + * cpperror.c: Update comments and copyright. + * cppexp.c, cppfiles.c, cpphash.c, cpphash.h, cppinit.c, + cpplex.c, cpplib.c, cpplib.h, cppmacro.c, cppmain.c: Similarly. + + 2002-01-03 John David Anglin + + * collect2.c (main): Use strcmp when testing for "-shared". + + 2002-01-03 Neil Booth + + * cppmacro.c: Don't include intl.h. Update comments. + (new_number_token): Allocate enough buffer for 64-bit unsigned + integers; update prototype. + * cppmain.c: Update comments. + + 2002-01-03 William Cohen + + * function.h (struct function): Add profile. + (current_function_profile): New. + doc/extend.texi: Update documentation. + * final.c (final_start_function): Use current_function_profile + instead of profile_flag. + (profile_after_prologue): Likewise. + * function.c (expand_function_start): Likewise. + (expand_function_start): Likewise. + * config/alpha/alpha.c (direct_call_operand): + (alpha_does_function_need_gp): Likewise. + (alpha_expand_prologue): Likewise. + * config/arm/arm.c (arm_expand_prologue): Likewise. + thumb_expand_prologue: Likewise. + * config/d30v/d30v.c (d30v_stack_info): Likewise. + * config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Likewise. + (fr30_expand_prologue): Likewise. + * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Likewise. + * config/i386/i386.c (ix86_osf_output_function_prologue): Likewise. + * config/i386/i386.h (FINALIZE_PIC): Likewise. + * config/i386/win32.h (SUBTARGET_PROLOGUE): Likewise. + * config/i960/i960.c (i960_output_function_prologue): Likewise. + * config/ia64/ia64.c (ia64_compute_frame_size): Likewise. + * config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Likewise. + (m32r_expand_prologue): Likewise. + * config/m88k/m88k.c (m88k_layout_frame): Likewise. + (m88k_expand_prologue): Likewise. + * config/m88k/m88k.h (ADJUST_INSN_LENGTH): Likewise. + * config/mips/mips.c (compute_frame_size): Likewise. + (mips_expand_prologue): Likewise. + (mips_can_use_return_insn): Likewise. + * config/pa/elf.h (ASM_FILE_START): Likewise. + * config/pa/pa-linux.h (ASM_FILE_START): Likewise. + * config/pa/pa64-hpux.h (ASM_FILE_START): Likewise. + * config/pa/som.h (ASM_FILE_START): Likewise. + * config/romp/romp.c (romp_using_r14): Likewise. + * config/rs6000/rs6000.c (first_reg_to_save): Likewise. + (rs6000_stack_info): Likewise. + * config/rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise. + * config/rs6000/xcoff.h (ASM_FILE_START): Likewise. + * config/v850/v850.c (compute_register_save_size): Likewise. + + 2002-01-03 Jakub Jelinek + + * simplify-rtx.c (simplify_binary_operation) [DIV]: If + gen_lowpart_common fails, use gen_lowpart_SUBREG. + + 2002-01-03 Turly O'Connor + + * darwin.c (machopic_output_possible_stub_label): Don't generate + stub routines for pseudo-stubs which we've just defined. + + 2002-01-03 Kazu Hirata + + * builtins.c: Fix formatting. + * c-typeck.c: Likewise. + * combine.c: Likewise. + * expr.c: Likewise. + * loop.c: Likewise. + + 2002-01-03 Andreas Schwab + + * cppfiles.c (_cpp_pop_file_buffer): Change return type to bool + and return true if _cpp_push_next_buffer pushed a new include + file. + * cpplib.c (_cpp_pop_buffer): Only call obstack_free if + _cpp_pop_file_buffer did not push a new file. + * cpphash.h (_cpp_pop_file_buffer): Update declaration. + + 2002-01-02 Eric Christopher + + * final.c (final_scan_insn): Change 0 -> NULL_RTX in + FIND_REG_INC_NOTE call. Update copyright. + * loop.c (canonicalize_condition): Ditto. + * reorg.c (delete_scheduled_jump): Ditto. + + 2002-01-03 Kazu Hirata + + * gcse.c: Fix formatting. + + 2002-01-03 Graham Stott + + * mkconfig.sh: Output to config.h, hconfig.h and tconfig.h + forward defs for struct tags rtx_def, union_tree, rtvec_def + also output corresponding typedefs for rtx, tree, and rtvec. + + * system.h: Move forward defs for struct tags rtx_def, union_tree, + rtvec_def along with corresponding typedefs for rtx, tree, and + rtvec to config.h, hconfig.h, tconfig.h. + + 2002-01-03 Graham Stott + + * tree.h: Update copyright date. + (IS_EXPR_CODE_CLASS): Add parenthesis. + (TREE_SET_CODE): Add whitespace. + (TREE_CHECK): Add parenthesis. + (TREE_CLASS_CODE): Add parenthesis and wrap long line. + (CST_OR_CONSTRUCTOR_CHECK): + (EXPR_CHECK): Add parenthis, whitespace and wrap line. + (TREE_SYMBOL_REFERENCED): Whitespace. + (INT_CST_LT): Likewise. + (INT_CST_LT_UNSIGNED): Likewise. + (tree_real_cst): Unwrap comment. + (tree_string): Likewise. + (tree_complex): Likewise. + (IDENTIFIER_POINTER): correct cast. + (SAVE_EXPR_CONTEXT): Whitespace. + (EXPR_WFL_FILENAME_NODE): Likewise. + (EXPR_WFL_FILENAME): Remove parenthesis. + (DECL_ORIGIN): Add parenthesis. + (DECL_FROM_INLINE): Use NULL_TREE. + (build_int_2): Whitespace. + (build_type_variant): Add parenthesis. + + * gcc/jcf-parse.c: Update copyright date. + (yyparse): Constify resource_filename. + + 2002-01-03 Graham Stott + + * rtl.h: Update copyright date. + (RTL_CHECK1): Wrap long line. + (RTL_CHECK2): Likewise. + (RTL_CHECKC1): Wrap long line and whitespace. + (RTL_CHECKC2): Likewise. + (XWINT): Whitespace. + (XINT): Likewise. + (XSTR): Likewise. + (XEXP): Likewise. + (XVEC): Likewise. + (XMODE): Likewise. + (XBITMAP): Likewise. + (XTREE): Likewise. + (XBBDEF): Likewise. + (XTMPL): Likewise. + (X0WINT): Likewise. + (X0INT):Likewise. + (X0UINT): Likewise. + (X0STR): Likewise. + (X0EXP): Likewise. + (X0VEC): Likewise. + (X0MODE): Likewise. + (X0BITMAP): Likewise. + (X0TREE): Likewise. + (X0BBDEF): Likewise. + (X0ADVFLAGS): Likewise. + (X0CSELIB): Likewise. + (X0MEMATTR): Likewise. + (XCWINT): Likewise. + (XCINT): Likewise. + (XCUINT): Likewise. + (XCSTR): Likewise. + (XCEXP): Likewise. + (XCVEC): Likewise. + (XCMODE): Likewise. + (XCBITMAP): Likewise. + (XCTREE): Likewise. + (XCBBDEF): Likewise. + (XCADVFLAGS): Likewise. + (XCCSELIB): Likewise. + (XC2EXP): Likewise. + (INSN_UID): Likewise. + (PREV_INSN): Likewise. + (PATTERN): Likewise. + (INSN_CODE): Likewise. + (PUT_REG_NOTE_KIND): Likewise. + (CODE_LABEL_NUMBER): Likewise. + (NOTE_SOURCE_FILE): Likewise. + (NOTE_BLOCK): Likewise. + (NOTE_EH_HANDLER): Likewise. + (NOTE_RANGE_INFO): Likewise. + (NOTE_LIVE_INFO): Likewise. + (NOTE_BASIC_BLOCK): Likewise. + (NOTE_EXPECTED_VALUE): Likewise. + (NOTE_LINE_NUMBER): Likewise. + (LABEL_NAME): Likewise. + (LABEL_NUSES): Likewise. + (LABEL_ALTERNATE_NAME): Likewise. + (ADDRESSOF_DECL): Likewise. + (JUMP_LABEL): Likewise. + (LABEL_NEXTREF): Likewise. + (REGNO): Likewise. + (ORIGINAL_REGNO: Likewise. + (HARD_REGISTER_NUM_P): Add parenthesis. + (SUBREG_REG): Whitespace. + (SUBREG_BYTE): Likewise. + (ASM_OPERANDS_TEMPLATE): Remove parenthesis. + (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. + (ASM_OPERANDS_OUTPUT_IDX): Likewise. + (ASM_OPERANDS_INPUT_VEC): Likewise. + (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. + (ASM_OPERANDS_INPUT): Likewise. + (ASM_OPERANDS_INPUT_LENGTH): Likewise. + (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. + (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. + (ASM_OPERANDS_INPUT_MODE): Likewise. + (ASM_OPERANDS_SOURCE_FILE): Likewise. + (ASM_OPERANDS_SOURCE_LINE): Likewise. + (MEM_SET_IN_STRUCT_P): Minor reformat. + (TRAP_CONDITION): Whitespace. + (TRAP_CODE): Likewise. + (COND_EXEC_TEST): Likewise. + (COND_EXEC_CODE): Likewise. + (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. + (PHI_NODE_P): Add parenthesis. + (plus_constant): Whitespace and add parenthesis. + + 2002-01-03 Kazu Hirata + + * config/avr/avr.c: Fix comment typos. + * config/c4x/c4x.md: Likewise. + * config/dsp16xx/dsp16xx.h: Likewise. + * config/dsp16xx/dsp16xx.md: Likewise. + * config/i386/i386.md: Likewise. + * config/ia64/ia64.c: Likewise. + * config/m32r/m32r.h: Likewise. + * config/m68hc11/m68hc11.md: Likewise. + * config/mmix/mmix.c: Likewise. + * config/mn10200/mn10200.c: Likewise. + * config/romp/romp.c: Likewise. + * config/sh/sh.c: Likewise. + * config/stormy16/stormy16.c: Likewise. + * config/stormy16/stormy16.h: Likewise. + * config/stormy16/stormy16.md: Likewise. + + 2002-01-03 Graham Stott + + * loop.h: Update copyright date. + (LOOP_MOVABLES): Fix typo. + (LOOP_REGS): Likewise. + (LOOP_IVS): Likewise. + + 2002-01-03 Graham Stott + + * cppinit.c: Update copyright date. + Don't include output.h + * Makefile.in: Update copyright date. + Update dependency. + + 2002-01-02 Craig Rodrigues + + PR c/5226 + * invoke.texi (-mthreads): Remove from documented RS/6000 options. + (-pthread) Add to RS/6000 options. + + 2002-01-02 Kazu Hirata + + * except.c: Fix comment typos. + * loop.c: Likewise. + * varasm.c: Likewise. + * doc/tm.texi: Fix a typo. + + 2002-01-02 Jakub Jelinek + + * c-typeck.c (output_init_element): Allow initializing static storage + duration objects with compound literals. + + 2002-01-02 Richard Henderson + + * objc/objc-act.c (hack_method_prototype): Clear current_function_decl + after abusing it. + + 2002-01-02 Kaveh R. Ghazi + + * gcc.c (default_compilers): Const-ify. + * mips-tdump.c (stab_names): Likewise. + * mips-tfile.c (map_coff_types, map_coff_storage, + map_coff_sym_type, map_coff_derived_type, stabs_symbol, + pseudo_ops_t, pseudo_ops): Likewise. + * protoize.c (default_include): Likewise + + * real.c (GET_REAL, PUT_REAL): Don't cast away const-ness. + (ezero, ehalf, eone, etwo, e32, elog2, esqrt2, epi): Const-ify. + Add array size in declaration. + (endian, emov, eisneg, eisinf, eisnan, eiisnan, eiisneg, emovi, + emovo, emovz, eiisinf, ecmpm, eaddm, esubm, m16m, edivm, emulm, + esub, eadd, eadd1, ediv, emul, e53toe, e64toe, e113toe, e24toe, + etoe113, etoe64, etoe53, etoe24, ecmp, eround, ltoe, ultoe, + eifrac, euifrac, e24toasc, e53toasc, e64toasc, e113toasc, etoasc, + efloor, efrexp, eldexp, eremain, dectoe, etodec, ibmtoe, etoibm, + c4xtoe, etoc4x, uditoe, ditoe, etoudi, etodi, esqrt, etens, + emtens, make_nan): Const-ify. + (TFbignan, TFlittlenan, XFbignan, XFlittlenan, DFbignan, + DFlittlenan, SFbignan, SFlittlenan): Make static and const-ify. + + 2002-01-02 Joseph S. Myers + + * config.gcc (ia64-*-*): Set extra_headers. + (alpha*-dec-osf*): Likewise. Don't use alpha/t-osf. + * config/alpha/t-osf: Remove. + * config/ia64/t-ia64 (EXTRA_HEADERS): Remove. + + 2002-01-02 David Edelsohn + + * config/rs6000/t-aix43: Revert previous change. + + 2002-01-02 Jason Merrill + + * c-decl.c (c_expand_body): Call outlining_inline_function when + emitting an inline function out of line. + + 2002-01-02 Richard Henderson + + * dwarf2out.c (limbo_die_node): Add created_for member. + (new_die): New argument created_for. Update all callers. + (mark_limbo_die_list): New. + (dwarf2out_init): Register limbo_die_list as a root. + (dwarf2out_finish): Force insert limbo dies into their function + context. + + 2002-01-02 Nathan Sidwell + + PR c++/5089 + * doc/invoke.texi (-Wold-style-cast): Only warn about non-void casts. + + 2002-01-02 Kazu Hirata + + * config/h8300/fixunssfsi.c: Update copyright. + Fix comment typos. + Fix formatting. + * config/h8300/h8300.c: Update copyright. + Eliminate warnings. + + 2002-01-02 Kazu Hirata + + * config/romp/romp.c: Fix comment formatting. + * config/romp/romp.h: Likewise. + * config/romp/romp.md: Likewise. + * config/s390/s390.c: Likewise. + * config/stormy16/stormy16.c: Likewise. + * config/stormy16/stormy16.h: Likewise. + + 2002-01-02 Alexandre Oliva + + * c-common.h (genrtl_expr_stmt_value): Declare. + * c-semantics.c (genrtl_goto_stmt): Redirect to... + (genrtl_goto_stmt_value): ... this new function. Pass new + argument down to expand_expr_stmt_value, taking + TREE_ADDRESSABLE into account. + * c-common.c (c_expand_expr): Mark the last EXPR_STMT of a + STMT_EXPR as addressable, i.e., one whose result we want. + * expr.c (expand_expr): Don't save expression statement value + of labeled_blocks or loop_exprs. + * stmt.c (expand_expr_stmt): Redirect to... + (expand_expr_stmt_value): ... this new function. Use new + argument to tell whether to save expression value. + (expand_end_stmt_expr): Reset last_expr_type and + last_expr_value if we don't have either. + * tree-inline.c (declare_return_variable): Mark its use + statement as addressable. + * tree.h: Document new use of TREE_ADDRESSABLE. + (expand_expr_stmt_value): Declare. + + 2002-01-01 Tom Rix + + * config/rs6000/rs6000.c (rs6000_emit_set_long_const): Fix for use by + rs6000_emit_allocate_stack. + + 2002-01-01 Joseph S. Myers + + * configure.in: Prepend ${srcdir}/config/${cpu_type}/ instead of + ${srcdir}/ginclude/ to every entry in extra_headers. + * configure: Regenerate. + * ginclude/math-3300.h: Rename to config/m68k/math-3300.h. + * ginclude/math-68881.h: Rename to config/m68k/math-68881.h. + * ginclude/ppc-asm.h: Rename to config/rs6000/ppc-asm.h. + * ginclude/proto.h: Rename to config/convex/proto.h. + + Tue Jan 1 17:12:56 2002 Richard Kenner + + * attribs.c (handle_vector_size_attribute): Use host_integerp + and tree_int_cst; remove warnings. + * caller-save.c (insert_restore): Add cast to get rid of warning. + (insert_save): Likewise. + * emit-rtl.c (adjust_address_1, offset_address): Likewise. + * regmove.c (find_matches): Add temporary var to kill a warning. + + 2002-01-01 Douglas B Rupp + + * config/alpha/vms.h (DWARF2_UNWIND_INFO, EH_RETURN_HANDLER_RTX, + LINK_EH_SPEC, MD_FALLBACK_FRAME_STATE_FOR): Define. + * config/alpha/t-vms (EXTRA_PARTS): Add vms-dwarf2eh.o + (vms-dwarf2eh.o): Add Makefile rule. + * config/alpha/vms-ld.c (main): Handle vms-dwarf2eh.o. + * config/alpha/vms-dwarf2eh.asm: New file. + + * gcc.c (delete_if_ordinary): Delete all versions. + + 2002-01-01 Hans-Peter Nilsson + + * config/mmix/mmix.md: Update FIXME to not mention + define_constants. + (MMIX_rJ_REGNUM): New define_constants constant. + ("movqi", "movsi", "movdi", "*movdicc_real_foldable", + "*movdicc_real"): Adjust contraints formatting. + ("*bCC_foldable"): Add %+ for P in output format and delete FIXME + for branch prediction. + ("*bCC", "*bCC_inverted_foldable", "*bCC_inverted"): Add %+ in + output template. + ("*call_real", "*call_value_real", "nonlocal_goto_receiver", + "*nonlocal_goto_receiver_expanded"): Use MMIX_rJ_REGNUM instead of + number. Delete related FIXMEs. + * config/mmix/mmix.h (MMIX_INCOMING_RETURN_ADDRESS_REGNUM): Change + from number to MMIX_rJ_REGNUM. + (TARGET_MASK_BRANCH_PREDICT): New. + (TARGET_DEFAULT): Change to TARGET_MASK_BRANCH_PREDICT. + (TARGET_SWITCHES): Update comment. Correct -mno-toplevel-symbols + value. Add -mbranch-predict and -mno-branch-predict. + (TARGET_VERSION): Drop date. + (ADDITIONAL_REGISTER_NAMES): Use MMIX_rJ_REGNUM, not number. + * config/mmix/mmix.c (mmix_encode_section_info): Correct condition + for finding out global symbols. + (mmix_asm_output_labelref): Revert condition for global symbol. + (mmix_print_operand): : Emit P for a likely branch. + (mmix_print_operand_punct_valid_p): A '+' is valid. + + See ChangeLog.6 for earlier changes. diff -Nrc3pad gcc-3.2.3/gcc/c-lang.c gcc-3.3/gcc/c-lang.c *** gcc-3.2.3/gcc/c-lang.c 2002-05-23 17:57:26.000000000 +0000 --- gcc-3.3/gcc/c-lang.c 2002-09-06 23:32:12.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 24,33 **** #include "system.h" #include "tree.h" #include "c-tree.h" #include "langhooks.h" #include "langhooks-def.h" - static const char *c_init PARAMS ((const char *)); static void c_init_options PARAMS ((void)); /* ### When changing hooks, consider if ObjC needs changing too!! ### */ --- 24,34 ---- #include "system.h" #include "tree.h" #include "c-tree.h" + #include "c-common.h" + #include "ggc.h" #include "langhooks.h" #include "langhooks-def.h" static void c_init_options PARAMS ((void)); /* ### When changing hooks, consider if ObjC needs changing too!! ### */ *************** static void c_init_options PARAMS ((void *** 35,59 **** #undef LANG_HOOKS_NAME #define LANG_HOOKS_NAME "GNU C" #undef LANG_HOOKS_INIT ! #define LANG_HOOKS_INIT c_init #undef LANG_HOOKS_FINISH #define LANG_HOOKS_FINISH c_common_finish #undef LANG_HOOKS_INIT_OPTIONS #define LANG_HOOKS_INIT_OPTIONS c_init_options #undef LANG_HOOKS_DECODE_OPTION ! #define LANG_HOOKS_DECODE_OPTION c_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS c_common_post_options #undef LANG_HOOKS_GET_ALIAS_SET #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set #undef LANG_HOOKS_SAFE_FROM_P #define LANG_HOOKS_SAFE_FROM_P c_safe_from_p #undef LANG_HOOKS_STATICP #define LANG_HOOKS_STATICP c_staticp #undef LANG_HOOKS_PRINT_IDENTIFIER #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier ! #undef LANG_HOOKS_SET_YYDEBUG ! #define LANG_HOOKS_SET_YYDEBUG c_set_yydebug #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \ --- 36,86 ---- #undef LANG_HOOKS_NAME #define LANG_HOOKS_NAME "GNU C" #undef LANG_HOOKS_INIT ! #define LANG_HOOKS_INIT c_objc_common_init #undef LANG_HOOKS_FINISH #define LANG_HOOKS_FINISH c_common_finish #undef LANG_HOOKS_INIT_OPTIONS #define LANG_HOOKS_INIT_OPTIONS c_init_options #undef LANG_HOOKS_DECODE_OPTION ! #define LANG_HOOKS_DECODE_OPTION c_common_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS c_common_post_options #undef LANG_HOOKS_GET_ALIAS_SET #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set #undef LANG_HOOKS_SAFE_FROM_P #define LANG_HOOKS_SAFE_FROM_P c_safe_from_p + #undef LANG_HOOKS_EXPAND_EXPR + #define LANG_HOOKS_EXPAND_EXPR c_expand_expr + #undef LANG_HOOKS_MARK_ADDRESSABLE + #define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable + #undef LANG_HOOKS_PARSE_FILE + #define LANG_HOOKS_PARSE_FILE c_common_parse_file + #undef LANG_HOOKS_TRUTHVALUE_CONVERSION + #define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion + #undef LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES + #define LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES c_insert_default_attributes + #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL + #define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl + #undef LANG_HOOKS_UNSAFE_FOR_REEVAL + #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval #undef LANG_HOOKS_STATICP #define LANG_HOOKS_STATICP c_staticp + #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL + #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl #undef LANG_HOOKS_PRINT_IDENTIFIER #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier ! #undef LANG_HOOKS_FUNCTION_ENTER_NESTED ! #define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context ! #undef LANG_HOOKS_FUNCTION_LEAVE_NESTED ! #define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context ! #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL ! #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl ! ! /* Attribute hooks. */ ! #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE ! #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table ! #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE ! #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \ *************** static void c_init_options PARAMS ((void *** 67,91 **** #undef LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \ c_convert_parm_for_inlining /* ### When changing hooks, consider if ObjC needs changing too!! ### */ /* Each front end provides its own. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; static void c_init_options () { c_common_init_options (clk_c); } - static const char * - c_init (filename) - const char *filename; - { - return c_objc_common_init (filename); - } - /* Used by c-lex.c, but only for objc. */ tree --- 94,163 ---- #undef LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \ c_convert_parm_for_inlining + #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN + #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN c_dump_tree + + #undef LANG_HOOKS_TYPE_FOR_MODE + #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode + #undef LANG_HOOKS_TYPE_FOR_SIZE + #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size + #undef LANG_HOOKS_SIGNED_TYPE + #define LANG_HOOKS_SIGNED_TYPE c_common_signed_type + #undef LANG_HOOKS_UNSIGNED_TYPE + #define LANG_HOOKS_UNSIGNED_TYPE c_common_unsigned_type + #undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE + #define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE c_common_signed_or_unsigned_type + #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR + #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR c_incomplete_type_error + #undef LANG_HOOKS_TYPE_PROMOTES_TO + #define LANG_HOOKS_TYPE_PROMOTES_TO c_type_promotes_to /* ### When changing hooks, consider if ObjC needs changing too!! ### */ /* Each front end provides its own. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; + /* Tree code classes. */ + + #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, + + const char tree_code_type[] = { + #include "tree.def" + 'x', + #include "c-common.def" + }; + #undef DEFTREECODE + + /* Table indexed by tree code giving number of expression + operands beyond the fixed part of the node structure. + Not used for types or decls. */ + + #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, + + const unsigned char tree_code_length[] = { + #include "tree.def" + 0, + #include "c-common.def" + }; + #undef DEFTREECODE + + /* Names of tree components. + Used for printing out the tree and error messages. */ + #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, + + const char *const tree_code_name[] = { + #include "tree.def" + "@@dummy", + #include "c-common.def" + }; + #undef DEFTREECODE + static void c_init_options () { c_common_init_options (clk_c); } /* Used by c-lex.c, but only for objc. */ tree *************** is_class_name (arg) *** 102,115 **** return 0; } void ! maybe_objc_check_decl (decl) tree decl ATTRIBUTE_UNUSED; { } int ! maybe_objc_comptypes (lhs, rhs, reflexive) tree lhs ATTRIBUTE_UNUSED; tree rhs ATTRIBUTE_UNUSED; int reflexive ATTRIBUTE_UNUSED; --- 174,194 ---- return 0; } + tree + objc_is_id (arg) + tree arg ATTRIBUTE_UNUSED; + { + return 0; + } + void ! objc_check_decl (decl) tree decl ATTRIBUTE_UNUSED; { } int ! objc_comptypes (lhs, rhs, reflexive) tree lhs ATTRIBUTE_UNUSED; tree rhs ATTRIBUTE_UNUSED; int reflexive ATTRIBUTE_UNUSED; *************** maybe_objc_comptypes (lhs, rhs, reflexiv *** 118,130 **** } tree ! maybe_building_objc_message_expr () ! { ! return 0; ! } ! ! int ! recognize_objc_keyword () { return 0; } --- 197,203 ---- } tree ! objc_message_selector () { return 0; } *************** finish_file () *** 143,145 **** --- 216,220 ---- { c_objc_common_finish_file (); } + + #include "gtype-c.h" diff -Nrc3pad gcc-3.2.3/gcc/c-lex.c gcc-3.3/gcc/c-lex.c *** gcc-3.2.3/gcc/c-lex.c 2002-06-27 22:27:09.000000000 +0000 --- gcc-3.3/gcc/c-lex.c 2003-02-11 22:49:52.000000000 +0000 *************** *** 1,6 **** ! /* Lexical analyzer for C and Objective C. Copyright (C) 1987, 1988, 1989, 1992, 1994, 1995, 1996, 1997 ! 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GCC. --- 1,6 ---- ! /* Mainly the interface between cpplib and the C front ends. Copyright (C) 1987, 1988, 1989, 1992, 1994, 1995, 1996, 1997 ! 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 22,34 **** #include "config.h" #include "system.h" #include "rtl.h" #include "tree.h" #include "expr.h" #include "input.h" #include "output.h" - #include "c-lex.h" #include "c-tree.h" #include "flags.h" #include "timevar.h" #include "cpplib.h" --- 22,35 ---- #include "config.h" #include "system.h" + #include "real.h" #include "rtl.h" #include "tree.h" #include "expr.h" #include "input.h" #include "output.h" #include "c-tree.h" + #include "c-common.h" #include "flags.h" #include "timevar.h" #include "cpplib.h" *************** Software Foundation, 59 Temple Place - S *** 39,58 **** #include "splay-tree.h" #include "debug.h" - /* MULTIBYTE_CHARS support only works for native compilers. - ??? Ideally what we want is to model widechar support after - the current floating point support. */ - #ifdef CROSS_COMPILE - #undef MULTIBYTE_CHARS - #endif - #ifdef MULTIBYTE_CHARS #include "mbchar.h" #include #endif /* MULTIBYTE_CHARS */ - #ifndef GET_ENVIRONMENT - #define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ((ENV_VALUE) = getenv (ENV_NAME)) - #endif /* The current line map. */ static const struct line_map *map; --- 40,49 ---- *************** static unsigned int src_lineno; *** 64,72 **** static int header_time, body_time; static splay_tree file_info_tree; - /* Cause the `yydebug' variable to be defined. */ - #define YYDEBUG 1 - /* File used for outputting assembler code. */ extern FILE *asm_out_file; --- 55,60 ---- *************** extern FILE *asm_out_file; *** 76,90 **** /* Number of bytes in a wide character. */ #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT) - int indent_level; /* Number of { minus number of }. */ int pending_lang_change; /* If we need to switch languages - C++ only */ int c_header_level; /* depth in C headers - C++ only */ /* Nonzero tells yylex to ignore \ in string constants. */ static int ignore_escape_flag; ! static void parse_float PARAMS ((PTR)); ! static tree lex_number PARAMS ((const char *, unsigned int)); static tree lex_string PARAMS ((const unsigned char *, unsigned int, int)); static tree lex_charconst PARAMS ((const cpp_token *)); --- 64,81 ---- /* Number of bytes in a wide character. */ #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT) int pending_lang_change; /* If we need to switch languages - C++ only */ int c_header_level; /* depth in C headers - C++ only */ /* Nonzero tells yylex to ignore \ in string constants. */ static int ignore_escape_flag; ! static tree interpret_integer PARAMS ((const cpp_token *, unsigned int)); ! static tree interpret_float PARAMS ((const cpp_token *, unsigned int)); ! static enum integer_type_kind ! narrowest_unsigned_type PARAMS ((tree, unsigned int)); ! static enum integer_type_kind ! narrowest_signed_type PARAMS ((tree, unsigned int)); static tree lex_string PARAMS ((const unsigned char *, unsigned int, int)); static tree lex_charconst PARAMS ((const cpp_token *)); *************** init_c_lex (filename) *** 144,152 **** /* Start it at 0. */ lineno = 0; - if (filename == NULL || !strcmp (filename, "-")) - filename = ""; - return cpp_read_main_file (parse_in, filename, ident_hash); } --- 135,140 ---- *************** init_c_lex (filename) *** 155,167 **** Also, make sure the start_source_file debug hook gets called for the primary source file. */ ! int ! yyparse() { (*debug_hooks->start_source_file) (lineno, input_filename); cpp_finish_options (parse_in); ! return yyparse_1(); } struct c_fileinfo * --- 143,163 ---- Also, make sure the start_source_file debug hook gets called for the primary source file. */ ! void ! c_common_parse_file (set_yydebug) ! int set_yydebug ATTRIBUTE_UNUSED; { + #if YYDEBUG != 0 + yydebug = set_yydebug; + #else + warning ("YYDEBUG not defined"); + #endif + (*debug_hooks->start_source_file) (lineno, input_filename); cpp_finish_options (parse_in); ! yyparse (); ! free_parser_stacks (); } struct c_fileinfo * *************** dump_time_statistics () *** 227,235 **** splay_tree_foreach (file_info_tree, dump_one_header, 0); } - /* Not yet handled: #pragma, #define, #undef. - No need to deal with linemarkers under normal conditions. */ - static void cb_ident (pfile, line, str) cpp_reader *pfile ATTRIBUTE_UNUSED; --- 223,228 ---- *************** cb_file_change (pfile, new_map) *** 276,282 **** lineno = included_at; push_srcloc (new_map->to_file, 1); - input_file_stack->indent_level = indent_level; (*debug_hooks->start_source_file) (included_at, new_map->to_file); #ifndef NO_IMPLICIT_EXTERN_C if (c_header_level) --- 269,274 ---- *************** cb_file_change (pfile, new_map) *** 299,314 **** --pending_lang_change; } #endif - #if 0 - if (indent_level != input_file_stack->indent_level) - { - warning_with_file_and_line - (input_filename, lineno, - "this file contains more '%c's than '%c's", - indent_level > input_file_stack->indent_level ? '{' : '}', - indent_level > input_file_stack->indent_level ? '}' : '{'); - } - #endif pop_srcloc (); (*debug_hooks->end_source_file) (to_line); --- 291,296 ---- *************** utf8_extend_token (c) *** 682,769 **** while (shift); } #endif - - #if 0 - struct try_type - { - tree *const node_var; - const char unsigned_flag; - const char long_flag; - const char long_long_flag; - }; - - struct try_type type_sequence[] = - { - { &integer_type_node, 0, 0, 0}, - { &unsigned_type_node, 1, 0, 0}, - { &long_integer_type_node, 0, 1, 0}, - { &long_unsigned_type_node, 1, 1, 0}, - { &long_long_integer_type_node, 0, 1, 1}, - { &long_long_unsigned_type_node, 1, 1, 1} - }; - #endif /* 0 */ - struct pf_args - { - /* Input */ - const char *str; - int fflag; - int lflag; - int base; - /* Output */ - int conversion_errno; - REAL_VALUE_TYPE value; - tree type; - }; - - static void - parse_float (data) - PTR data; - { - struct pf_args * args = (struct pf_args *) data; - const char *typename; - - args->conversion_errno = 0; - args->type = double_type_node; - typename = "double"; - - /* The second argument, machine_mode, of REAL_VALUE_ATOF - tells the desired precision of the binary result - of decimal-to-binary conversion. */ - - if (args->fflag) - { - if (args->lflag) - error ("both 'f' and 'l' suffixes on floating constant"); - - args->type = float_type_node; - typename = "float"; - } - else if (args->lflag) - { - args->type = long_double_type_node; - typename = "long double"; - } - else if (flag_single_precision_constant) - { - args->type = float_type_node; - typename = "float"; - } - - errno = 0; - if (args->base == 16) - args->value = REAL_VALUE_HTOF (args->str, TYPE_MODE (args->type)); - else - args->value = REAL_VALUE_ATOF (args->str, TYPE_MODE (args->type)); - - args->conversion_errno = errno; - /* A diagnostic is required here by some ISO C testsuites. - This is not pedwarn, because some people don't want - an error for this. */ - if (REAL_VALUE_ISINF (args->value) && pedantic) - warning ("floating point number exceeds range of '%s'", typename); - } - int c_lex (value) tree *value; --- 664,670 ---- *************** c_lex (value) *** 785,793 **** *value = NULL_TREE; switch (tok->type) { - case CPP_OPEN_BRACE: indent_level++; break; - case CPP_CLOSE_BRACE: indent_level--; break; - /* Issue this error here, where we can get at tok->val.c. */ case CPP_OTHER: if (ISGRAPH (tok->val.c)) --- 686,691 ---- *************** c_lex (value) *** 801,807 **** break; case CPP_NUMBER: ! *value = lex_number ((const char *)tok->val.str.text, tok->val.str.len); break; case CPP_CHAR: --- 699,726 ---- break; case CPP_NUMBER: ! { ! unsigned int flags = cpp_classify_number (parse_in, tok); ! ! switch (flags & CPP_N_CATEGORY) ! { ! case CPP_N_INVALID: ! /* cpplib has issued an error. */ ! *value = error_mark_node; ! break; ! ! case CPP_N_INTEGER: ! *value = interpret_integer (tok, flags); ! break; ! ! case CPP_N_FLOATING: ! *value = interpret_float (tok, flags); ! break; ! ! default: ! abort (); ! } ! } break; case CPP_CHAR: *************** c_lex (value) *** 827,1302 **** return tok->type; } ! #define ERROR(msgid) do { error(msgid); goto syntax_error; } while(0) ! ! static tree ! lex_number (str, len) ! const char *str; ! unsigned int len; { ! int base = 10; ! int count = 0; ! int largest_digit = 0; ! int numdigits = 0; ! int overflow = 0; ! int c; ! tree value; ! const char *p; ! enum anon1 { NOT_FLOAT = 0, AFTER_POINT, AFTER_EXPON } floatflag = NOT_FLOAT; ! ! /* We actually store only HOST_BITS_PER_CHAR bits in each part. ! The code below which fills the parts array assumes that a host ! int is at least twice as wide as a host char, and that ! HOST_BITS_PER_WIDE_INT is an even multiple of HOST_BITS_PER_CHAR. ! Two HOST_WIDE_INTs is the largest int literal we can store. ! In order to detect overflow below, the number of parts (TOTAL_PARTS) ! must be exactly the number of parts needed to hold the bits ! of two HOST_WIDE_INTs. */ ! #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2) ! unsigned int parts[TOTAL_PARTS]; ! ! /* Optimize for most frequent case. */ ! if (len == 1) ! { ! if (*str == '0') ! return integer_zero_node; ! else if (*str == '1') ! return integer_one_node; ! else ! return build_int_2 (*str - '0', 0); ! } ! ! for (count = 0; count < TOTAL_PARTS; count++) ! parts[count] = 0; ! ! /* len is known to be >1 at this point. */ ! p = str; ! ! if (len > 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) ! { ! base = 16; ! p = str + 2; ! } ! /* The ISDIGIT check is so we are not confused by a suffix on 0. */ ! else if (str[0] == '0' && ISDIGIT (str[1])) ! { ! base = 8; ! p = str + 1; ! } ! ! do ! { ! c = *p++; ! ! if (c == '.') ! { ! if (floatflag == AFTER_POINT) ! ERROR ("too many decimal points in floating constant"); ! else if (floatflag == AFTER_EXPON) ! ERROR ("decimal point in exponent - impossible!"); ! else ! floatflag = AFTER_POINT; ! ! if (base == 8) ! base = 10; ! } ! else if (c == '_') ! /* Possible future extension: silently ignore _ in numbers, ! permitting cosmetic grouping - e.g. 0x8000_0000 == 0x80000000 ! but somewhat easier to read. Ada has this? */ ! ERROR ("underscore in number"); ! else ! { ! int n; ! /* It is not a decimal point. ! It should be a digit (perhaps a hex digit). */ ! ! if (ISDIGIT (c) ! || (base == 16 && ISXDIGIT (c))) ! { ! n = hex_value (c); ! } ! else if (base <= 10 && (c == 'e' || c == 'E')) ! { ! base = 10; ! floatflag = AFTER_EXPON; ! break; ! } ! else if (base == 16 && (c == 'p' || c == 'P')) ! { ! floatflag = AFTER_EXPON; ! break; /* start of exponent */ ! } ! else ! { ! p--; ! break; /* start of suffix */ ! } ! ! if (n >= largest_digit) ! largest_digit = n; ! numdigits++; ! ! for (count = 0; count < TOTAL_PARTS; count++) ! { ! parts[count] *= base; ! if (count) ! { ! parts[count] ! += (parts[count-1] >> HOST_BITS_PER_CHAR); ! parts[count-1] ! &= (1 << HOST_BITS_PER_CHAR) - 1; ! } ! else ! parts[0] += n; ! } ! ! /* If the highest-order part overflows (gets larger than ! a host char will hold) then the whole number has ! overflowed. Record this and truncate the highest-order ! part. */ ! if (parts[TOTAL_PARTS - 1] >> HOST_BITS_PER_CHAR) ! { ! overflow = 1; ! parts[TOTAL_PARTS - 1] &= (1 << HOST_BITS_PER_CHAR) - 1; ! } ! } ! } ! while (p < str + len); ! ! /* This can happen on input like `int i = 0x;' */ ! if (numdigits == 0) ! ERROR ("numeric constant with no digits"); ! ! if (largest_digit >= base) ! ERROR ("numeric constant contains digits beyond the radix"); ! ! if (floatflag != NOT_FLOAT) ! { ! tree type; ! int imag, fflag, lflag, conversion_errno; ! REAL_VALUE_TYPE real; ! struct pf_args args; ! char *copy; ! ! if (base == 16 && pedantic && !flag_isoc99) ! pedwarn ("floating constant may not be in radix 16"); ! ! if (base == 16 && floatflag != AFTER_EXPON) ! ERROR ("hexadecimal floating constant has no exponent"); ! /* Read explicit exponent if any, and put it in tokenbuf. */ ! if ((base == 10 && ((c == 'e') || (c == 'E'))) ! || (base == 16 && (c == 'p' || c == 'P'))) ! { ! if (p < str + len) ! c = *p++; ! if (p < str + len && (c == '+' || c == '-')) ! c = *p++; ! /* Exponent is decimal, even if string is a hex float. */ ! if (! ISDIGIT (c)) ! ERROR ("floating constant exponent has no digits"); ! while (p < str + len && ISDIGIT (c)) ! c = *p++; ! if (! ISDIGIT (c)) ! p--; ! } ! /* Copy the float constant now; we don't want any suffixes in the ! string passed to parse_float. */ ! copy = alloca (p - str + 1); ! memcpy (copy, str, p - str); ! copy[p - str] = '\0'; ! /* Now parse suffixes. */ ! fflag = lflag = imag = 0; ! while (p < str + len) ! switch (*p++) ! { ! case 'f': case 'F': ! if (fflag) ! ERROR ("more than one 'f' suffix on floating constant"); ! else if (warn_traditional && !in_system_header ! && ! cpp_sys_macro_p (parse_in)) ! warning ("traditional C rejects the 'f' suffix"); ! fflag = 1; ! break; ! case 'l': case 'L': ! if (lflag) ! ERROR ("more than one 'l' suffix on floating constant"); ! else if (warn_traditional && !in_system_header ! && ! cpp_sys_macro_p (parse_in)) ! warning ("traditional C rejects the 'l' suffix"); ! lflag = 1; ! break; ! case 'i': case 'I': ! case 'j': case 'J': ! if (imag) ! ERROR ("more than one 'i' or 'j' suffix on floating constant"); ! else if (pedantic) ! pedwarn ("ISO C forbids imaginary numeric constants"); ! imag = 1; ! break; ! default: ! ERROR ("invalid suffix on floating constant"); ! } ! /* Setup input for parse_float() */ ! args.str = copy; ! args.fflag = fflag; ! args.lflag = lflag; ! args.base = base; ! /* Convert string to a double, checking for overflow. */ ! if (do_float_handler (parse_float, (PTR) &args)) ! { ! /* Receive output from parse_float() */ ! real = args.value; ! } ! else ! /* We got an exception from parse_float() */ ! ERROR ("floating constant out of range"); ! /* Receive output from parse_float() */ ! conversion_errno = args.conversion_errno; ! type = args.type; ! ! #ifdef ERANGE ! /* ERANGE is also reported for underflow, ! so test the value to distinguish overflow from that. */ ! if (conversion_errno == ERANGE && !flag_traditional && pedantic ! && (REAL_VALUES_LESS (dconst1, real) ! || REAL_VALUES_LESS (real, dconstm1))) ! warning ("floating point number exceeds range of 'double'"); ! #endif ! /* Create a node with determined type and value. */ ! if (imag) ! value = build_complex (NULL_TREE, convert (type, integer_zero_node), ! build_real (type, real)); ! else ! value = build_real (type, real); ! } else { ! tree trad_type, ansi_type, type; ! HOST_WIDE_INT high, low; ! int spec_unsigned = 0; ! int spec_long = 0; ! int spec_long_long = 0; ! int spec_imag = 0; ! int suffix_lu = 0; ! int warn = 0, i; ! trad_type = ansi_type = type = NULL_TREE; ! while (p < str + len) { ! c = *p++; ! switch (c) ! { ! case 'u': case 'U': ! if (spec_unsigned) ! error ("two 'u' suffixes on integer constant"); ! else if (warn_traditional && !in_system_header ! && ! cpp_sys_macro_p (parse_in)) ! warning ("traditional C rejects the 'u' suffix"); ! ! spec_unsigned = 1; ! if (spec_long) ! suffix_lu = 1; ! break; ! case 'l': case 'L': ! if (spec_long) { ! if (spec_long_long) ! error ("three 'l' suffixes on integer constant"); ! else if (suffix_lu) ! error ("'lul' is not a valid integer suffix"); ! else if (c != spec_long) ! error ("'Ll' and 'lL' are not valid integer suffixes"); ! else if (pedantic && ! flag_isoc99 ! && ! in_system_header && warn_long_long) ! pedwarn ("ISO C89 forbids long long integer constants"); ! spec_long_long = 1; } ! spec_long = c; ! break; ! ! case 'i': case 'I': case 'j': case 'J': ! if (spec_imag) ! error ("more than one 'i' or 'j' suffix on integer constant"); ! else if (pedantic) ! pedwarn ("ISO C forbids imaginary numeric constants"); ! spec_imag = 1; ! break; ! ! default: ! ERROR ("invalid suffix on integer constant"); } } ! /* If the literal overflowed, pedwarn about it now. */ ! if (overflow) ! { ! warn = 1; ! pedwarn ("integer constant is too large for this configuration of the compiler - truncated to %d bits", HOST_BITS_PER_WIDE_INT * 2); ! } ! ! /* This is simplified by the fact that our constant ! is always positive. */ ! ! high = low = 0; ! for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR; i++) ! { ! high |= ((HOST_WIDE_INT) parts[i + (HOST_BITS_PER_WIDE_INT ! / HOST_BITS_PER_CHAR)] ! << (i * HOST_BITS_PER_CHAR)); ! low |= (HOST_WIDE_INT) parts[i] << (i * HOST_BITS_PER_CHAR); ! } ! value = build_int_2 (low, high); ! TREE_TYPE (value) = long_long_unsigned_type_node; ! /* If warn_traditional, calculate both the ISO type and the ! traditional type, then see if they disagree. ! Otherwise, calculate only the type for the dialect in use. */ ! if (warn_traditional || flag_traditional) ! { ! /* Calculate the traditional type. */ ! /* Traditionally, any constant is signed; but if unsigned is ! specified explicitly, obey that. Use the smallest size ! with the right number of bits, except for one special ! case with decimal constants. */ ! if (! spec_long && base != 10 ! && int_fits_type_p (value, unsigned_type_node)) ! trad_type = spec_unsigned ? unsigned_type_node : integer_type_node; ! /* A decimal constant must be long if it does not fit in ! type int. I think this is independent of whether the ! constant is signed. */ ! else if (! spec_long && base == 10 ! && int_fits_type_p (value, integer_type_node)) ! trad_type = spec_unsigned ? unsigned_type_node : integer_type_node; ! else if (! spec_long_long) ! trad_type = (spec_unsigned ! ? long_unsigned_type_node ! : long_integer_type_node); ! else if (int_fits_type_p (value, ! spec_unsigned ! ? long_long_unsigned_type_node ! : long_long_integer_type_node)) ! trad_type = (spec_unsigned ! ? long_long_unsigned_type_node ! : long_long_integer_type_node); ! else ! trad_type = (spec_unsigned ! ? widest_unsigned_literal_type_node ! : widest_integer_literal_type_node); ! } ! if (warn_traditional || ! flag_traditional) ! { ! /* Calculate the ISO type. */ ! if (! spec_long && ! spec_unsigned ! && int_fits_type_p (value, integer_type_node)) ! ansi_type = integer_type_node; ! else if (! spec_long && (base != 10 || spec_unsigned) ! && int_fits_type_p (value, unsigned_type_node)) ! ansi_type = unsigned_type_node; ! else if (! spec_unsigned && !spec_long_long ! && int_fits_type_p (value, long_integer_type_node)) ! ansi_type = long_integer_type_node; ! else if (! spec_long_long ! && int_fits_type_p (value, long_unsigned_type_node)) ! ansi_type = long_unsigned_type_node; ! else if (! spec_unsigned ! && int_fits_type_p (value, long_long_integer_type_node)) ! ansi_type = long_long_integer_type_node; ! else if (int_fits_type_p (value, long_long_unsigned_type_node)) ! ansi_type = long_long_unsigned_type_node; ! else if (! spec_unsigned ! && int_fits_type_p (value, widest_integer_literal_type_node)) ! ansi_type = widest_integer_literal_type_node; ! else ! ansi_type = widest_unsigned_literal_type_node; ! } ! type = flag_traditional ? trad_type : ansi_type; ! /* We assume that constants specified in a non-decimal ! base are bit patterns, and that the programmer really ! meant what they wrote. */ ! if (warn_traditional && !in_system_header ! && base == 10 && trad_type != ansi_type) ! { ! if (TYPE_PRECISION (trad_type) != TYPE_PRECISION (ansi_type)) ! warning ("width of integer constant changes with -traditional"); ! else if (TREE_UNSIGNED (trad_type) != TREE_UNSIGNED (ansi_type)) ! warning ("integer constant is unsigned in ISO C, signed with -traditional"); ! else ! warning ("width of integer constant may change on other systems with -traditional"); ! } ! if (pedantic && !flag_traditional && (flag_isoc99 || !spec_long_long) ! && !warn ! && ((flag_isoc99 ! ? TYPE_PRECISION (long_long_integer_type_node) ! : TYPE_PRECISION (long_integer_type_node)) < TYPE_PRECISION (type))) ! { ! warn = 1; ! pedwarn ("integer constant larger than the maximum value of %s", ! (flag_isoc99 ! ? (TREE_UNSIGNED (type) ! ? _("an unsigned long long int") ! : _("a long long int")) ! : _("an unsigned long int"))); ! } ! if (base == 10 && ! spec_unsigned && TREE_UNSIGNED (type)) ! warning ("decimal constant is so large that it is unsigned"); ! if (spec_imag) ! { ! if (TYPE_PRECISION (type) ! <= TYPE_PRECISION (integer_type_node)) ! value = build_complex (NULL_TREE, integer_zero_node, ! convert (integer_type_node, value)); ! else ! ERROR ("complex integer constant is too wide for 'complex int'"); ! } ! else if (flag_traditional && !int_fits_type_p (value, type)) ! /* The traditional constant 0x80000000 is signed ! but doesn't fit in the range of int. ! This will change it to -0x80000000, which does fit. */ ! { ! TREE_TYPE (value) = unsigned_type (type); ! value = convert (type, value); ! TREE_OVERFLOW (value) = TREE_CONSTANT_OVERFLOW (value) = 0; ! } ! else ! TREE_TYPE (value) = type; ! /* If it's still an integer (not a complex), and it doesn't ! fit in the type we choose for it, then pedwarn. */ ! if (! warn ! && TREE_CODE (TREE_TYPE (value)) == INTEGER_TYPE ! && ! int_fits_type_p (value, TREE_TYPE (value))) ! pedwarn ("integer constant is larger than the maximum value for its type"); ! } ! if (p < str + len) ! error ("missing white space after number '%.*s'", (int) (p - str), str); return value; - - syntax_error: - return integer_zero_node; } static tree --- 746,948 ---- return tok->type; } ! /* Returns the narrowest C-visible unsigned type, starting with the ! minimum specified by FLAGS, that can fit VALUE, or itk_none if ! there isn't one. */ ! static enum integer_type_kind ! narrowest_unsigned_type (value, flags) ! tree value; ! unsigned int flags; { ! enum integer_type_kind itk; ! if ((flags & CPP_N_WIDTH) == CPP_N_SMALL) ! itk = itk_unsigned_int; ! else if ((flags & CPP_N_WIDTH) == CPP_N_MEDIUM) ! itk = itk_unsigned_long; ! else ! itk = itk_unsigned_long_long; ! /* int_fits_type_p must think the type of its first argument is ! wider than its second argument, or it won't do the proper check. */ ! TREE_TYPE (value) = widest_unsigned_literal_type_node; ! for (; itk < itk_none; itk += 2 /* skip unsigned types */) ! if (int_fits_type_p (value, integer_types[itk])) ! return itk; ! return itk_none; ! } ! /* Ditto, but narrowest signed type. */ ! static enum integer_type_kind ! narrowest_signed_type (value, flags) ! tree value; ! unsigned int flags; ! { ! enum integer_type_kind itk; ! if ((flags & CPP_N_WIDTH) == CPP_N_SMALL) ! itk = itk_int; ! else if ((flags & CPP_N_WIDTH) == CPP_N_MEDIUM) ! itk = itk_long; ! else ! itk = itk_long_long; ! /* int_fits_type_p must think the type of its first argument is ! wider than its second argument, or it won't do the proper check. */ ! TREE_TYPE (value) = widest_unsigned_literal_type_node; ! for (; itk < itk_none; itk += 2 /* skip signed types */) ! if (int_fits_type_p (value, integer_types[itk])) ! return itk; ! return itk_none; ! } ! /* Interpret TOKEN, an integer with FLAGS as classified by cpplib. */ ! static tree ! interpret_integer (token, flags) ! const cpp_token *token; ! unsigned int flags; ! { ! tree value, type; ! enum integer_type_kind itk; ! cpp_num integer; ! cpp_options *options = cpp_get_options (parse_in); ! integer = cpp_interpret_integer (parse_in, token, flags); ! integer = cpp_num_sign_extend (integer, options->precision); ! value = build_int_2_wide (integer.low, integer.high); ! /* The type of a constant with a U suffix is straightforward. */ ! if (flags & CPP_N_UNSIGNED) ! itk = narrowest_unsigned_type (value, flags); else { ! /* The type of a potentially-signed integer constant varies ! depending on the base it's in, the standard in use, and the ! length suffixes. */ ! enum integer_type_kind itk_u = narrowest_unsigned_type (value, flags); ! enum integer_type_kind itk_s = narrowest_signed_type (value, flags); ! /* In both C89 and C99, octal and hex constants may be signed or ! unsigned, whichever fits tighter. We do not warn about this ! choice differing from the traditional choice, as the constant ! is probably a bit pattern and either way will work. */ ! if ((flags & CPP_N_RADIX) != CPP_N_DECIMAL) ! itk = MIN (itk_u, itk_s); ! else { ! /* In C99, decimal constants are always signed. ! In C89, decimal constants that don't fit in long have ! undefined behavior; we try to make them unsigned long. ! In GCC's extended C89, that last is true of decimal ! constants that don't fit in long long, too. */ ! itk = itk_s; ! if (itk_s > itk_u && itk_s > itk_long) ! { ! if (!flag_isoc99) { ! if (itk_u < itk_unsigned_long) ! itk_u = itk_unsigned_long; ! itk = itk_u; ! warning ("this decimal constant is unsigned only in ISO C90"); } ! else if (warn_traditional) ! warning ("this decimal constant would be unsigned in ISO C90"); } } + } ! if (itk == itk_none) ! /* cpplib has already issued a warning for overflow. */ ! type = ((flags & CPP_N_UNSIGNED) ! ? widest_unsigned_literal_type_node ! : widest_integer_literal_type_node); ! else ! type = integer_types[itk]; ! if (itk > itk_unsigned_long ! && (flags & CPP_N_WIDTH) != CPP_N_LARGE ! && ! in_system_header && ! flag_isoc99) ! pedwarn ("integer constant is too large for \"%s\" type", ! (flags & CPP_N_UNSIGNED) ? "unsigned long" : "long"); ! TREE_TYPE (value) = type; ! /* Convert imaginary to a complex type. */ ! if (flags & CPP_N_IMAGINARY) ! value = build_complex (NULL_TREE, convert (type, integer_zero_node), value); ! return value; ! } ! /* Interpret TOKEN, a floating point number with FLAGS as classified ! by cpplib. */ ! static tree ! interpret_float (token, flags) ! const cpp_token *token; ! unsigned int flags; ! { ! tree type; ! tree value; ! REAL_VALUE_TYPE real; ! char *copy; ! size_t copylen; ! const char *typename; ! /* FIXME: make %T work in error/warning, then we don't need typename. */ ! if ((flags & CPP_N_WIDTH) == CPP_N_LARGE) ! { ! type = long_double_type_node; ! typename = "long double"; ! } ! else if ((flags & CPP_N_WIDTH) == CPP_N_SMALL ! || flag_single_precision_constant) ! { ! type = float_type_node; ! typename = "float"; ! } ! else ! { ! type = double_type_node; ! typename = "double"; ! } ! /* Copy the constant to a nul-terminated buffer. If the constant ! has any suffixes, cut them off; REAL_VALUE_ATOF/ REAL_VALUE_HTOF ! can't handle them. */ ! copylen = token->val.str.len; ! if ((flags & CPP_N_WIDTH) != CPP_N_MEDIUM) ! /* Must be an F or L suffix. */ ! copylen--; ! if (flags & CPP_N_IMAGINARY) ! /* I or J suffix. */ ! copylen--; ! copy = alloca (copylen + 1); ! memcpy (copy, token->val.str.text, copylen); ! copy[copylen] = '\0'; ! real_from_string (&real, copy); ! real_convert (&real, TYPE_MODE (type), &real); ! /* A diagnostic is required for "soft" overflow by some ISO C ! testsuites. This is not pedwarn, because some people don't want ! an error for this. ! ??? That's a dubious reason... is this a mandatory diagnostic or ! isn't it? -- zw, 2001-08-21. */ ! if (REAL_VALUE_ISINF (real) && pedantic) ! warning ("floating constant exceeds range of \"%s\"", typename); ! /* Create a node with determined type and value. */ ! value = build_real (type, real); ! if (flags & CPP_N_IMAGINARY) ! value = build_complex (NULL_TREE, convert (type, integer_zero_node), value); return value; } static tree *************** lex_string (str, len, wide) *** 1309,1317 **** char *buf = alloca ((len + 1) * (wide ? WCHAR_BYTES : 1)); char *q = buf; const unsigned char *p = str, *limit = str + len; ! unsigned int c; ! unsigned width = wide ? WCHAR_TYPE_SIZE ! : TYPE_PRECISION (char_type_node); #ifdef MULTIBYTE_CHARS /* Reset multibyte conversion state. */ --- 955,961 ---- char *buf = alloca ((len + 1) * (wide ? WCHAR_BYTES : 1)); char *q = buf; const unsigned char *p = str, *limit = str + len; ! cppchar_t c; #ifdef MULTIBYTE_CHARS /* Reset multibyte conversion state. */ *************** lex_string (str, len, wide) *** 1341,1359 **** #endif if (c == '\\' && !ignore_escape_flag) ! { ! unsigned int mask; ! ! if (width < HOST_BITS_PER_INT) ! mask = ((unsigned int) 1 << width) - 1; ! else ! mask = ~0; ! c = cpp_parse_escape (parse_in, &p, limit, ! mask, flag_traditional); ! } ! /* Add this single character into the buffer either as a wchar_t ! or as a single byte. */ if (wide) { unsigned charwidth = TYPE_PRECISION (char_type_node); --- 985,994 ---- #endif if (c == '\\' && !ignore_escape_flag) ! c = cpp_parse_escape (parse_in, &p, limit, wide); ! /* Add this single character into the buffer either as a wchar_t, ! a multibyte sequence, or as a single byte. */ if (wide) { unsigned charwidth = TYPE_PRECISION (char_type_node); *************** lex_string (str, len, wide) *** 1374,1379 **** --- 1009,1024 ---- } q += WCHAR_BYTES; } + #ifdef MULTIBYTE_CHARS + else if (char_len > 1) + { + /* We're dealing with a multibyte character. */ + for ( ; char_len >0; --char_len) + { + *q++ = *(p - char_len); + } + } + #endif else { *q++ = c; *************** static tree *** 1407,1451 **** lex_charconst (token) const cpp_token *token; { ! HOST_WIDE_INT result; tree type, value; unsigned int chars_seen; ! ! result = cpp_interpret_charconst (parse_in, token, warn_multichar, ! flag_traditional, &chars_seen); ! if (token->type == CPP_WCHAR) ! { ! value = build_int_2 (result, 0); ! type = wchar_type_node; ! } ! else ! { ! if (result < 0) ! value = build_int_2 (result, -1); ! else ! value = build_int_2 (result, 0); ! ! /* In C, a character constant has type 'int'. ! In C++ 'char', but multi-char charconsts have type 'int'. */ ! if (c_language == clk_cplusplus && chars_seen <= 1) ! type = char_type_node; ! else ! type = integer_type_node; ! } ! /* cpp_interpret_charconst issues a warning if the constant ! overflows, but if the number fits in HOST_WIDE_INT anyway, it ! will return it un-truncated, which may cause problems down the ! line. So set the type to widest_integer_literal_type, call ! convert to truncate it to the proper type, then clear ! TREE_OVERFLOW so we don't get a second warning. ! FIXME: cpplib's assessment of overflow may not be accurate on a ! platform where the final type can change at (compiler's) runtime. */ ! TREE_TYPE (value) = widest_integer_literal_type_node; ! value = convert (type, value); ! TREE_OVERFLOW (value) = 0; return value; } --- 1052,1081 ---- lex_charconst (token) const cpp_token *token; { ! cppchar_t result; tree type, value; unsigned int chars_seen; ! int unsignedp; ! result = cpp_interpret_charconst (parse_in, token, ! &chars_seen, &unsignedp); ! /* Cast to cppchar_signed_t to get correct sign-extension of RESULT ! before possibly widening to HOST_WIDE_INT for build_int_2. */ ! if (unsignedp || (cppchar_signed_t) result >= 0) ! value = build_int_2 (result, 0); ! else ! value = build_int_2 ((cppchar_signed_t) result, -1); ! if (token->type == CPP_WCHAR) ! type = wchar_type_node; ! /* In C, a character constant has type 'int'. ! In C++ 'char', but multi-char charconsts have type 'int'. */ ! else if ((c_language == clk_c) || chars_seen > 1) ! type = integer_type_node; ! else ! type = char_type_node; + TREE_TYPE (value) = type; return value; } diff -Nrc3pad gcc-3.2.3/gcc/c-lex.h gcc-3.3/gcc/c-lex.h *** gcc-3.2.3/gcc/c-lex.h 2001-08-22 14:34:45.000000000 +0000 --- gcc-3.3/gcc/c-lex.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,35 **** - /* Define constants for communication with c-parse.y. - Copyright (C) 1987, 1992, 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2, or (at your option) any later - version. - - GCC is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - - #ifndef GCC_C_LEX_H - #define GCC_C_LEX_H - - extern tree make_pointer_declarator PARAMS ((tree, tree)); - extern void position_after_white_space PARAMS ((void)); - - extern int c_lex PARAMS ((tree *)); - extern const char *init_c_lex PARAMS ((const char *)); - - extern int indent_level; - - struct cpp_reader; - extern struct cpp_reader* parse_in; - - #endif /* ! GCC_C_LEX_H */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/c-objc-common.c gcc-3.3/gcc/c-objc-common.c *** gcc-3.2.3/gcc/c-objc-common.c 2002-10-25 22:11:08.000000000 +0000 --- gcc-3.3/gcc/c-objc-common.c 2003-05-02 19:52:02.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 33,46 **** #include "tree-inline.h" #include "varray.h" #include "ggc.h" ! static int c_tree_printer PARAMS ((output_buffer *)); static tree inline_forbidden_p PARAMS ((tree *, int *, void *)); static void expand_deferred_fns PARAMS ((void)); static tree start_cdtor PARAMS ((int)); static void finish_cdtor PARAMS ((tree)); ! static varray_type deferred_fns; int c_missing_noreturn_ok_p (decl) --- 33,48 ---- #include "tree-inline.h" #include "varray.h" #include "ggc.h" + #include "langhooks.h" + #include "target.h" ! static bool c_tree_printer PARAMS ((output_buffer *, text_info *)); static tree inline_forbidden_p PARAMS ((tree *, int *, void *)); static void expand_deferred_fns PARAMS ((void)); static tree start_cdtor PARAMS ((int)); static void finish_cdtor PARAMS ((tree)); ! static GTY(()) varray_type deferred_fns; int c_missing_noreturn_ok_p (decl) *************** inline_forbidden_p (nodep, walk_subtrees *** 90,96 **** { /* We cannot inline functions that take a variable number of arguments. */ ! case BUILT_IN_VARARGS_START: case BUILT_IN_STDARG_START: #if 0 /* Functions that need information about the address of the --- 92,98 ---- { /* We cannot inline functions that take a variable number of arguments. */ ! case BUILT_IN_VA_START: case BUILT_IN_STDARG_START: #if 0 /* Functions that need information about the address of the *************** inline_forbidden_p (nodep, walk_subtrees *** 119,125 **** /* We will not inline a function which uses computed goto. The addresses of its local labels, which may be tucked into global storage, are of course not constant across ! instantiations, which causes unexpected behaviour. */ if (TREE_CODE (t) != LABEL_DECL) return node; --- 121,127 ---- /* We will not inline a function which uses computed goto. The addresses of its local labels, which may be tucked into global storage, are of course not constant across ! instantiations, which causes unexpected behavior. */ if (TREE_CODE (t) != LABEL_DECL) return node; *************** c_cannot_inline_tree_fn (fnp) *** 167,183 **** /* Don't auto-inline anything that might not be bound within this unit of translation. */ ! if (!DECL_DECLARED_INLINE_P (fn) && flag_pic && TREE_PUBLIC (fn)) ! { ! DECL_UNINLINABLE (fn) = 1; ! return 1; ! } if (! function_attribute_inlinable_p (fn)) ! { ! DECL_UNINLINABLE (fn) = 1; ! return 1; ! } /* If a function has pending sizes, we must not defer its compilation, and we can't inline it as a tree. */ --- 169,179 ---- /* Don't auto-inline anything that might not be bound within this unit of translation. */ ! if (!DECL_DECLARED_INLINE_P (fn) && !(*targetm.binds_local_p) (fn)) ! goto cannot_inline; if (! function_attribute_inlinable_p (fn)) ! goto cannot_inline; /* If a function has pending sizes, we must not defer its compilation, and we can't inline it as a tree. */ *************** c_cannot_inline_tree_fn (fnp) *** 187,196 **** put_pending_sizes (t); if (t) ! { ! DECL_UNINLINABLE (fn) = 1; ! return 1; ! } } if (DECL_CONTEXT (fn)) --- 183,189 ---- put_pending_sizes (t); if (t) ! goto cannot_inline; } if (DECL_CONTEXT (fn)) *************** c_cannot_inline_tree_fn (fnp) *** 198,207 **** /* If a nested function has pending sizes, we may have already saved them. */ if (DECL_LANG_SPECIFIC (fn)->pending_sizes) ! { ! DECL_UNINLINABLE (fn) = 1; ! return 1; ! } } else { --- 191,197 ---- /* If a nested function has pending sizes, we may have already saved them. */ if (DECL_LANG_SPECIFIC (fn)->pending_sizes) ! goto cannot_inline; } else { *************** c_cannot_inline_tree_fn (fnp) *** 223,235 **** return 0; } ! if (walk_tree (&DECL_SAVED_TREE (fn), inline_forbidden_p, fn, NULL)) ! { ! DECL_UNINLINABLE (fn) = 1; ! return 1; ! } return 0; } /* Initialization common to C and Objective-C front ends. */ --- 213,241 ---- return 0; } ! if (walk_tree_without_duplicates ! (&DECL_SAVED_TREE (fn), inline_forbidden_p, fn)) ! goto cannot_inline; return 0; + + cannot_inline: + DECL_UNINLINABLE (fn) = 1; + return 1; + } + + /* Called from check_global_declarations. */ + + bool + c_warn_unused_global_decl (decl) + tree decl; + { + if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl)) + return false; + if (DECL_IN_SYSTEM_HEADER (decl)) + return false; + + return true; } /* Initialization common to C and Objective-C front ends. */ *************** c_objc_common_init (filename) *** 240,252 **** c_init_decl_processing (); filename = c_common_init (filename); - add_c_tree_codes (); - - save_lang_status = &push_c_function_context; - restore_lang_status = &pop_c_function_context; - mark_lang_status = &mark_c_function_context; - lang_expand_expr = c_expand_expr; lang_expand_decl_stmt = c_expand_decl_stmt; /* These were not defined in the Objective-C front end, but I'm --- 246,254 ---- c_init_decl_processing (); filename = c_common_init (filename); + if (filename == NULL) + return NULL; lang_expand_decl_stmt = c_expand_decl_stmt; /* These were not defined in the Objective-C front end, but I'm *************** c_objc_common_init (filename) *** 266,272 **** } VARRAY_TREE_INIT (deferred_fns, 32, "deferred_fns"); - ggc_add_tree_varray_root (&deferred_fns, 1); return filename; } --- 268,273 ---- *************** expand_deferred_fns () *** 304,310 **** } } ! VARRAY_FREE (deferred_fns); } static tree --- 305,311 ---- } } ! deferred_fns = 0; } static tree *************** c_objc_common_finish_file () *** 403,428 **** by the C++ front-end. Please notice when called, the `%' part was already skipped by the diagnostic machinery. */ ! static int ! c_tree_printer (buffer) output_buffer *buffer; { ! tree t = va_arg (output_buffer_format_args (buffer), tree); ! switch (*output_buffer_text_cursor (buffer)) { case 'D': case 'F': case 'T': { const char *n = DECL_NAME (t) ! ? (*decl_printable_name) (t, 2) : "({anonymous})"; output_add_string (buffer, n); } ! return 1; default: ! return 0; } } --- 404,432 ---- by the C++ front-end. Please notice when called, the `%' part was already skipped by the diagnostic machinery. */ ! static bool ! c_tree_printer (buffer, text) output_buffer *buffer; + text_info *text; { ! tree t = va_arg (*text->args_ptr, tree); ! switch (*text->format_spec) { case 'D': case 'F': case 'T': { const char *n = DECL_NAME (t) ! ? (*lang_hooks.decl_printable_name) (t, 2) : "({anonymous})"; output_add_string (buffer, n); } ! return true; default: ! return false; } } + + #include "gt-c-objc-common.h" diff -Nrc3pad gcc-3.2.3/gcc/collect2.c gcc-3.3/gcc/collect2.c *** gcc-3.2.3/gcc/collect2.c 2003-03-31 01:14:02.000000000 +0000 --- gcc-3.3/gcc/collect2.c 2003-03-31 01:12:20.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 57,66 **** #include "obstack.h" #include "intl.h" #include "version.h" - - /* Obstack allocation and deallocation routines. */ - #define obstack_chunk_alloc xmalloc - #define obstack_chunk_free free /* On certain systems, we have code that works by scanning the object file directly. But this code uses system-specific header files and library --- 57,62 ---- *************** Software Foundation, 59 Temple Place - S *** 144,154 **** /* Some systems use __main in a way incompatible with its use in gcc, in these cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to ! give the same symbol without quotes for an alternative entry point. You ! must define both, or neither. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" - #define SYMBOL__MAIN __main #endif /* This must match tree.h. */ --- 140,148 ---- /* Some systems use __main in a way incompatible with its use in gcc, in these cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to ! give the same symbol without quotes for an alternative entry point. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" #endif /* This must match tree.h. */ *************** static struct head exports; /* list of *** 237,255 **** static struct head frame_tables; /* list of frame unwind info tables */ struct obstack temporary_obstack; - struct obstack permanent_obstack; char * temporary_firstobj; /* Holds the return value of pexecute. */ int pexecute_pid; - /* Defined in the automatically-generated underscore.c. */ - extern int prepends_underscore; - - #ifndef GET_ENV_PATH_LIST - #define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0) - #endif - /* Structure to hold all the directories in which to search for files to execute. */ --- 231,241 ---- *************** dump_file (name) *** 526,533 **** if (*word == '.') ++word, putc ('.', stderr); p = word; ! if (*p == '_' && prepends_underscore) ! ++p; if (no_demangle) result = 0; --- 512,519 ---- if (*word == '.') ++word, putc ('.', stderr); p = word; ! if (!strncmp (p, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX))) ! p += strlen (USER_LABEL_PREFIX); if (no_demangle) result = 0; *************** prefix_from_env (env, pprefix) *** 762,768 **** struct path_prefix *pprefix; { const char *p; ! GET_ENV_PATH_LIST (p, env); if (p) prefix_from_string (p, pprefix); --- 748,754 ---- struct path_prefix *pprefix; { const char *p; ! GET_ENVIRONMENT (p, env); if (p) prefix_from_string (p, pprefix); *************** main (argc, argv) *** 926,932 **** #endif obstack_begin (&temporary_obstack, 0); - obstack_begin (&permanent_obstack, 0); temporary_firstobj = (char *) obstack_alloc (&temporary_obstack, 0); current_demangling_style = auto_demangling; --- 912,917 ---- *************** main (argc, argv) *** 1086,1103 **** { const char *q = extract_string (&p); if (*q == '-' && (q[1] == 'm' || q[1] == 'f')) ! *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); if (strcmp (q, "-EL") == 0 || strcmp (q, "-EB") == 0) ! *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); if (strcmp (q, "-shared") == 0) shared_obj = 1; if (*q == '-' && q[1] == 'B') { ! *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); if (q[2] == 0) { q = extract_string (&p); ! *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); } } } --- 1071,1088 ---- { const char *q = extract_string (&p); if (*q == '-' && (q[1] == 'm' || q[1] == 'f')) ! *c_ptr++ = xstrdup (q); if (strcmp (q, "-EL") == 0 || strcmp (q, "-EB") == 0) ! *c_ptr++ = xstrdup (q); if (strcmp (q, "-shared") == 0) shared_obj = 1; if (*q == '-' && q[1] == 'B') { ! *c_ptr++ = xstrdup (q); if (q[2] == 0) { q = extract_string (&p); ! *c_ptr++ = xstrdup (q); } } } *************** main (argc, argv) *** 1506,1512 **** } ! /* Wait for a process to finish, and exit if a non-zero status is found. */ int collect_wait (prog) --- 1491,1497 ---- } ! /* Wait for a process to finish, and exit if a nonzero status is found. */ int collect_wait (prog) *************** scan_prog_file (prog_name, which_pass) *** 2144,2150 **** fatal_perror ("close %d", pipe_fd[1]); execv (nm_file_name, real_nm_argv); ! fatal_perror ("execvp %s", nm_file_name); } /* Parent context from here on. */ --- 2129,2135 ---- fatal_perror ("close %d", pipe_fd[1]); execv (nm_file_name, real_nm_argv); ! fatal_perror ("execv %s", nm_file_name); } /* Parent context from here on. */ *************** scan_prog_file (prog_name, which_pass) *** 2870,2876 **** (void) ldclose(ldptr); #endif } ! #ifdef COLLECT_EXPORT_LIST /* Given a library name without "lib" prefix, this function --- 2855,2861 ---- (void) ldclose(ldptr); #endif } ! #endif /* OBJECT_FORMAT_COFF */ #ifdef COLLECT_EXPORT_LIST /* Given a library name without "lib" prefix, this function *************** ignore_library (name) *** 2950,2958 **** if (! strcmp (name, *p)) return 1; return 0; } ! #endif ! ! #endif /* OBJECT_FORMAT_COFF */ /* --- 2935,2941 ---- if (! strcmp (name, *p)) return 1; return 0; } ! #endif /* COLLECT_EXPORT_LIST */ /* diff -Nrc3pad gcc-3.2.3/gcc/collect2.h gcc-3.3/gcc/collect2.h *** gcc-3.2.3/gcc/collect2.h 2001-08-22 14:34:47.000000000 +0000 --- gcc-3.3/gcc/collect2.h 2002-08-04 22:45:18.000000000 +0000 *************** extern int file_exists PARAMS ((const ch *** 36,42 **** extern const char *ldout; extern const char *c_file_name; extern struct obstack temporary_obstack; - extern struct obstack permanent_obstack; extern char *temporary_firstobj; extern int vflag, debug; --- 36,41 ---- diff -Nrc3pad gcc-3.2.3/gcc/combine.c gcc-3.3/gcc/combine.c *** gcc-3.2.3/gcc/combine.c 2003-03-19 01:36:16.000000000 +0000 --- gcc-3.3/gcc/combine.c 2003-03-24 11:37:32.000000000 +0000 *************** static int max_uid_cuid; *** 137,142 **** --- 137,148 ---- #define UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD(val) \ (((unsigned HOST_WIDE_INT) (val) << (BITS_PER_WORD - 1)) << 1) + #define nonzero_bits(X, M) \ + cached_nonzero_bits (X, M, NULL_RTX, VOIDmode, 0) + + #define num_sign_bit_copies(X, M) \ + cached_num_sign_bit_copies (X, M, NULL_RTX, VOIDmode, 0) + /* Maximum register number, which is the size of the tables below. */ static unsigned int combine_max_regno; *************** static HARD_REG_SET newpat_used_regs; *** 192,199 **** static rtx added_links_insn; ! /* Basic block number of the block in which we are performing combines. */ ! static int this_basic_block; /* A bitmap indicating which blocks had registers go dead at entry. After combine, we'll need to re-do global life analysis with --- 198,205 ---- static rtx added_links_insn; ! /* Basic block in which we are performing combines. */ ! static basic_block this_basic_block; /* A bitmap indicating which blocks had registers go dead at entry. After combine, we'll need to re-do global life analysis with *************** static sbitmap refresh_blocks; *** 202,208 **** static int need_refresh; /* The next group of arrays allows the recording of the last value assigned ! to (hard or pseudo) register n. We use this information to see if a operation being processed is redundant given a prior operation performed on the register. For example, an `and' with a constant is redundant if all the zero bits are already known to be turned off. --- 208,214 ---- static int need_refresh; /* The next group of arrays allows the recording of the last value assigned ! to (hard or pseudo) register n. We use this information to see if an operation being processed is redundant given a prior operation performed on the register. For example, an `and' with a constant is redundant if all the zero bits are already known to be turned off. *************** static int need_refresh; *** 221,227 **** register was assigned reg_last_set_table_tick records the value of label_tick when a value using the register is assigned ! reg_last_set_invalid set to non-zero when it is not valid to use the value of this register in some register's value --- 227,233 ---- register was assigned reg_last_set_table_tick records the value of label_tick when a value using the register is assigned ! reg_last_set_invalid set to nonzero when it is not valid to use the value of this register in some register's value *************** static int need_refresh; *** 230,236 **** and the register being validly contained in some other expression in the table. ! Entry I in reg_last_set_value is valid if it is non-zero, and either reg_n_sets[i] is 1 or reg_last_set_label[i] == label_tick. Register I may validly appear in any expression returned for the value --- 236,242 ---- and the register being validly contained in some other expression in the table. ! Entry I in reg_last_set_value is valid if it is nonzero, and either reg_n_sets[i] is 1 or reg_last_set_label[i] == label_tick. Register I may validly appear in any expression returned for the value *************** static int need_refresh; *** 242,248 **** not validly appear in an expression, the register is replaced by something that won't match, (clobber (const_int 0)). ! reg_last_set_invalid[i] is set non-zero when register I is being assigned to and reg_last_set_table_tick[i] == label_tick. */ /* Record last value assigned to (hard or pseudo) register n. */ --- 248,254 ---- not validly appear in an expression, the register is replaced by something that won't match, (clobber (const_int 0)). ! reg_last_set_invalid[i] is set nonzero when register I is being assigned to and reg_last_set_table_tick[i] == label_tick. */ /* Record last value assigned to (hard or pseudo) register n. */ *************** static int *reg_last_set_label; *** 259,265 **** static int *reg_last_set_table_tick; ! /* Set non-zero if references to register n in expressions should not be used. */ static char *reg_last_set_invalid; --- 265,271 ---- static int *reg_last_set_table_tick; ! /* Set nonzero if references to register n in expressions should not be used. */ static char *reg_last_set_invalid; *************** struct undo *** 314,321 **** { struct undo *next; int is_int; ! union {rtx r; unsigned int i;} old_contents; ! union {rtx *r; unsigned int *i;} where; }; /* Record a bunch of changes to be undone, up to MAX_UNDO of them. --- 320,327 ---- { struct undo *next; int is_int; ! union {rtx r; int i;} old_contents; ! union {rtx *r; int *i;} where; }; /* Record a bunch of changes to be undone, up to MAX_UNDO of them. *************** static struct undobuf undobuf; *** 339,346 **** static int n_occurrences; static void do_SUBST PARAMS ((rtx *, rtx)); ! static void do_SUBST_INT PARAMS ((unsigned int *, ! unsigned int)); static void init_reg_last_arrays PARAMS ((void)); static void setup_incoming_promotions PARAMS ((void)); static void set_nonzero_bits_and_sign_copies PARAMS ((rtx, rtx, void *)); --- 345,351 ---- static int n_occurrences; static void do_SUBST PARAMS ((rtx *, rtx)); ! static void do_SUBST_INT PARAMS ((int *, int)); static void init_reg_last_arrays PARAMS ((void)); static void setup_incoming_promotions PARAMS ((void)); static void set_nonzero_bits_and_sign_copies PARAMS ((rtx, rtx, void *)); *************** static rtx make_field_assignment PARAMS *** 376,383 **** static rtx apply_distributive_law PARAMS ((rtx)); static rtx simplify_and_const_int PARAMS ((rtx, enum machine_mode, rtx, unsigned HOST_WIDE_INT)); ! static unsigned HOST_WIDE_INT nonzero_bits PARAMS ((rtx, enum machine_mode)); ! static unsigned int num_sign_bit_copies PARAMS ((rtx, enum machine_mode)); static int merge_outer_ops PARAMS ((enum rtx_code *, HOST_WIDE_INT *, enum rtx_code, HOST_WIDE_INT, enum machine_mode, int *)); --- 381,400 ---- static rtx apply_distributive_law PARAMS ((rtx)); static rtx simplify_and_const_int PARAMS ((rtx, enum machine_mode, rtx, unsigned HOST_WIDE_INT)); ! static unsigned HOST_WIDE_INT cached_nonzero_bits ! PARAMS ((rtx, enum machine_mode, rtx, ! enum machine_mode, ! unsigned HOST_WIDE_INT)); ! static unsigned HOST_WIDE_INT nonzero_bits1 ! PARAMS ((rtx, enum machine_mode, rtx, ! enum machine_mode, ! unsigned HOST_WIDE_INT)); ! static unsigned int cached_num_sign_bit_copies ! PARAMS ((rtx, enum machine_mode, rtx, ! enum machine_mode, unsigned int)); ! static unsigned int num_sign_bit_copies1 ! PARAMS ((rtx, enum machine_mode, rtx, ! enum machine_mode, unsigned int)); static int merge_outer_ops PARAMS ((enum rtx_code *, HOST_WIDE_INT *, enum rtx_code, HOST_WIDE_INT, enum machine_mode, int *)); *************** do_SUBST (into, newval) *** 472,481 **** static void do_SUBST_INT (into, newval) ! unsigned int *into, newval; { struct undo *buf; ! unsigned int oldval = *into; if (oldval == newval) return; --- 489,498 ---- static void do_SUBST_INT (into, newval) ! int *into, newval; { struct undo *buf; ! int oldval = *into; if (oldval == newval) return; *************** do_SUBST_INT (into, newval) *** 498,504 **** /* Main entry point for combiner. F is the first insn of the function. NREGS is the first unused pseudo-reg number. ! Return non-zero if the combiner has turned an indirect jump instruction into a direct jump. */ int combine_instructions (f, nregs) --- 515,521 ---- /* Main entry point for combiner. F is the first insn of the function. NREGS is the first unused pseudo-reg number. ! Return nonzero if the combiner has turned an indirect jump instruction into a direct jump. */ int combine_instructions (f, nregs) *************** combine_instructions (f, nregs) *** 578,584 **** setup_incoming_promotions (); ! refresh_blocks = sbitmap_alloc (n_basic_blocks); sbitmap_zero (refresh_blocks); need_refresh = 0; --- 595,601 ---- setup_incoming_promotions (); ! refresh_blocks = sbitmap_alloc (last_basic_block); sbitmap_zero (refresh_blocks); need_refresh = 0; *************** combine_instructions (f, nregs) *** 610,752 **** /* Now scan all the insns in forward order. */ - this_basic_block = -1; label_tick = 1; last_call_cuid = 0; mem_last_set = 0; init_reg_last_arrays (); setup_incoming_promotions (); ! for (insn = f; insn; insn = next ? next : NEXT_INSN (insn)) { ! next = 0; ! ! /* If INSN starts a new basic block, update our basic block number. */ ! if (this_basic_block + 1 < n_basic_blocks ! && BLOCK_HEAD (this_basic_block + 1) == insn) ! this_basic_block++; ! if (GET_CODE (insn) == CODE_LABEL) ! label_tick++; ! else if (INSN_P (insn)) ! { ! /* See if we know about function return values before this ! insn based upon SUBREG flags. */ ! check_promoted_subreg (insn, PATTERN (insn)); ! /* Try this insn with each insn it links back to. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! if ((next = try_combine (insn, XEXP (links, 0), ! NULL_RTX, &new_direct_jump_p)) != 0) ! goto retry; ! /* Try each sequence of three linked insns ending with this one. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! { ! rtx link = XEXP (links, 0); ! /* If the linked insn has been replaced by a note, then there ! is no point in pursuing this chain any further. */ ! if (GET_CODE (link) == NOTE) ! continue; ! for (nextlinks = LOG_LINKS (link); ! nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, link, ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! } #ifdef HAVE_cc0 ! /* Try to combine a jump insn that uses CC0 ! with a preceding insn that sets CC0, and maybe with its ! logical predecessor as well. ! This is how we make decrement-and-branch insns. ! We need this special code because data flow connections ! via CC0 do not get entered in LOG_LINKS. */ ! if (GET_CODE (insn) == JUMP_INSN ! && (prev = prev_nonnote_insn (insn)) != 0 ! && GET_CODE (prev) == INSN ! && sets_cc0_p (PATTERN (prev))) ! { ! if ((next = try_combine (insn, prev, ! NULL_RTX, &new_direct_jump_p)) != 0) ! goto retry; ! for (nextlinks = LOG_LINKS (prev); nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, prev, ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! } ! /* Do the same for an insn that explicitly references CC0. */ ! if (GET_CODE (insn) == INSN ! && (prev = prev_nonnote_insn (insn)) != 0 ! && GET_CODE (prev) == INSN ! && sets_cc0_p (PATTERN (prev)) ! && GET_CODE (PATTERN (insn)) == SET ! && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (insn)))) ! { ! if ((next = try_combine (insn, prev, ! NULL_RTX, &new_direct_jump_p)) != 0) ! goto retry; ! for (nextlinks = LOG_LINKS (prev); nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, prev, ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! } ! /* Finally, see if any of the insns that this insn links to ! explicitly references CC0. If so, try this insn, that insn, ! and its predecessor if it sets CC0. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! if (GET_CODE (XEXP (links, 0)) == INSN ! && GET_CODE (PATTERN (XEXP (links, 0))) == SET ! && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (XEXP (links, 0)))) ! && (prev = prev_nonnote_insn (XEXP (links, 0))) != 0 ! && GET_CODE (prev) == INSN ! && sets_cc0_p (PATTERN (prev)) ! && (next = try_combine (insn, XEXP (links, 0), ! prev, &new_direct_jump_p)) != 0) ! goto retry; #endif ! /* Try combining an insn with two different insns whose results it ! uses. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! for (nextlinks = XEXP (links, 1); nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, XEXP (links, 0), ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! if (GET_CODE (insn) != NOTE) ! record_dead_and_set_regs (insn); ! retry: ! ; } } delete_noop_moves (f); ! if (need_refresh) ! { ! update_life_info (refresh_blocks, UPDATE_LIFE_GLOBAL_RM_NOTES, ! PROP_DEATH_NOTES); ! } /* Clean up. */ sbitmap_free (refresh_blocks); --- 627,770 ---- /* Now scan all the insns in forward order. */ label_tick = 1; last_call_cuid = 0; mem_last_set = 0; init_reg_last_arrays (); setup_incoming_promotions (); ! FOR_EACH_BB (this_basic_block) { ! for (insn = this_basic_block->head; ! insn != NEXT_INSN (this_basic_block->end); ! insn = next ? next : NEXT_INSN (insn)) ! { ! next = 0; ! if (GET_CODE (insn) == CODE_LABEL) ! label_tick++; ! else if (INSN_P (insn)) ! { ! /* See if we know about function return values before this ! insn based upon SUBREG flags. */ ! check_promoted_subreg (insn, PATTERN (insn)); ! /* Try this insn with each insn it links back to. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! if ((next = try_combine (insn, XEXP (links, 0), ! NULL_RTX, &new_direct_jump_p)) != 0) ! goto retry; ! /* Try each sequence of three linked insns ending with this one. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! { ! rtx link = XEXP (links, 0); ! /* If the linked insn has been replaced by a note, then there ! is no point in pursuing this chain any further. */ ! if (GET_CODE (link) == NOTE) ! continue; ! for (nextlinks = LOG_LINKS (link); ! nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, link, ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! } #ifdef HAVE_cc0 ! /* Try to combine a jump insn that uses CC0 ! with a preceding insn that sets CC0, and maybe with its ! logical predecessor as well. ! This is how we make decrement-and-branch insns. ! We need this special code because data flow connections ! via CC0 do not get entered in LOG_LINKS. */ ! if (GET_CODE (insn) == JUMP_INSN ! && (prev = prev_nonnote_insn (insn)) != 0 ! && GET_CODE (prev) == INSN ! && sets_cc0_p (PATTERN (prev))) ! { ! if ((next = try_combine (insn, prev, ! NULL_RTX, &new_direct_jump_p)) != 0) ! goto retry; ! for (nextlinks = LOG_LINKS (prev); nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, prev, ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! } ! /* Do the same for an insn that explicitly references CC0. */ ! if (GET_CODE (insn) == INSN ! && (prev = prev_nonnote_insn (insn)) != 0 ! && GET_CODE (prev) == INSN ! && sets_cc0_p (PATTERN (prev)) ! && GET_CODE (PATTERN (insn)) == SET ! && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (insn)))) ! { ! if ((next = try_combine (insn, prev, ! NULL_RTX, &new_direct_jump_p)) != 0) ! goto retry; ! for (nextlinks = LOG_LINKS (prev); nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, prev, ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! } ! /* Finally, see if any of the insns that this insn links to ! explicitly references CC0. If so, try this insn, that insn, ! and its predecessor if it sets CC0. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! if (GET_CODE (XEXP (links, 0)) == INSN ! && GET_CODE (PATTERN (XEXP (links, 0))) == SET ! && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (XEXP (links, 0)))) ! && (prev = prev_nonnote_insn (XEXP (links, 0))) != 0 ! && GET_CODE (prev) == INSN ! && sets_cc0_p (PATTERN (prev)) ! && (next = try_combine (insn, XEXP (links, 0), ! prev, &new_direct_jump_p)) != 0) ! goto retry; #endif ! /* Try combining an insn with two different insns whose results it ! uses. */ ! for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) ! for (nextlinks = XEXP (links, 1); nextlinks; ! nextlinks = XEXP (nextlinks, 1)) ! if ((next = try_combine (insn, XEXP (links, 0), ! XEXP (nextlinks, 0), ! &new_direct_jump_p)) != 0) ! goto retry; ! if (GET_CODE (insn) != NOTE) ! record_dead_and_set_regs (insn); ! retry: ! ; ! } } } + clear_bb_flags (); + EXECUTE_IF_SET_IN_SBITMAP (refresh_blocks, 0, i, + BASIC_BLOCK (i)->flags |= BB_DIRTY); + new_direct_jump_p |= purge_all_dead_edges (0); delete_noop_moves (f); ! update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES, ! PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE ! | PROP_KILL_DEAD_CODE); /* Clean up. */ sbitmap_free (refresh_blocks); *************** set_nonzero_bits_and_sign_copies (x, set *** 858,864 **** && REGNO (x) >= FIRST_PSEUDO_REGISTER /* If this register is undefined at the start of the file, we can't say what its contents were. */ ! && ! REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, REGNO (x)) && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT) { if (set == 0 || GET_CODE (set) == CLOBBER) --- 876,882 ---- && REGNO (x) >= FIRST_PSEUDO_REGISTER /* If this register is undefined at the start of the file, we can't say what its contents were. */ ! && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, REGNO (x)) && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT) { if (set == 0 || GET_CODE (set) == CLOBBER) *************** sets_function_arg_p (pat) *** 1285,1297 **** case, we would be getting the wrong value of I2DEST into I3, so we must reject the combination. This case occurs when I2 and I1 both feed into I3, rather than when I1 feeds into I2, which feeds into I3. ! If I1_NOT_IN_SRC is non-zero, it means that finding I1 in the source of a SET must prevent combination from occurring. Before doing the above check, we first try to expand a field assignment into a set of logical operations. ! If PI3_DEST_KILLED is non-zero, it is a pointer to a location in which we place a register that is both set and used within I3. If more than one such register is detected, we fail. --- 1303,1315 ---- case, we would be getting the wrong value of I2DEST into I3, so we must reject the combination. This case occurs when I2 and I1 both feed into I3, rather than when I1 feeds into I2, which feeds into I3. ! If I1_NOT_IN_SRC is nonzero, it means that finding I1 in the source of a SET must prevent combination from occurring. Before doing the above check, we first try to expand a field assignment into a set of logical operations. ! If PI3_DEST_KILLED is nonzero, it is a pointer to a location in which we place a register that is both set and used within I3. If more than one such register is detected, we fail. *************** cant_combine_insn_p (insn) *** 1497,1503 **** If we did the combination, return the insn at which combine should resume scanning. ! Set NEW_DIRECT_JUMP_P to a non-zero value if try_combine creates a new direct jump instruction. */ static rtx --- 1515,1521 ---- If we did the combination, return the insn at which combine should resume scanning. ! Set NEW_DIRECT_JUMP_P to a nonzero value if try_combine creates a new direct jump instruction. */ static rtx *************** try_combine (i3, i2, i1, new_direct_jump *** 1754,1759 **** --- 1772,1778 ---- subst_prev_insn = i1 = gen_rtx_INSN (VOIDmode, INSN_UID (i2), NULL_RTX, i2, + BLOCK_FOR_INSN (i2), INSN_SCOPE (i2), XVECEXP (PATTERN (i2), 0, 1), -1, NULL_RTX, NULL_RTX); *************** try_combine (i3, i2, i1, new_direct_jump *** 2165,2194 **** } } ! /* If we've split a jump pattern, we'll wind up with a sequence even ! with one instruction. We can handle that below, so extract it. */ ! if (m_split && GET_CODE (m_split) == SEQUENCE ! && XVECLEN (m_split, 0) == 1) ! m_split = PATTERN (XVECEXP (m_split, 0, 0)); ! ! if (m_split && GET_CODE (m_split) != SEQUENCE) { insn_code_number = recog_for_combine (&m_split, i3, &new_i3_notes); if (insn_code_number >= 0) newpat = m_split; } ! else if (m_split && GET_CODE (m_split) == SEQUENCE ! && XVECLEN (m_split, 0) == 2 && (next_real_insn (i2) == i3 ! || ! use_crosses_set_p (PATTERN (XVECEXP (m_split, 0, 0)), ! INSN_CUID (i2)))) { rtx i2set, i3set; ! rtx newi3pat = PATTERN (XVECEXP (m_split, 0, 1)); ! newi2pat = PATTERN (XVECEXP (m_split, 0, 0)); ! i3set = single_set (XVECEXP (m_split, 0, 1)); ! i2set = single_set (XVECEXP (m_split, 0, 0)); /* In case we changed the mode of I2DEST, replace it in the pseudo-register table here. We can't do it above in case this --- 2184,2206 ---- } } ! if (m_split && NEXT_INSN (m_split) == NULL_RTX) { + m_split = PATTERN (m_split); insn_code_number = recog_for_combine (&m_split, i3, &new_i3_notes); if (insn_code_number >= 0) newpat = m_split; } ! else if (m_split && NEXT_INSN (NEXT_INSN (m_split)) == NULL_RTX && (next_real_insn (i2) == i3 ! || ! use_crosses_set_p (PATTERN (m_split), INSN_CUID (i2)))) { rtx i2set, i3set; ! rtx newi3pat = PATTERN (NEXT_INSN (m_split)); ! newi2pat = PATTERN (m_split); ! i3set = single_set (NEXT_INSN (m_split)); ! i2set = single_set (m_split); /* In case we changed the mode of I2DEST, replace it in the pseudo-register table here. We can't do it above in case this *************** try_combine (i3, i2, i1, new_direct_jump *** 2289,2296 **** /* If *SPLIT is a paradoxical SUBREG, when we split it, it should be written as a ZERO_EXTEND. */ if (split_code == SUBREG && GET_CODE (SUBREG_REG (*split)) == MEM) ! SUBST (*split, gen_rtx_ZERO_EXTEND (split_mode, ! SUBREG_REG (*split))); #endif newi2pat = gen_rtx_SET (VOIDmode, newdest, *split); --- 2301,2319 ---- /* If *SPLIT is a paradoxical SUBREG, when we split it, it should be written as a ZERO_EXTEND. */ if (split_code == SUBREG && GET_CODE (SUBREG_REG (*split)) == MEM) ! { ! #ifdef LOAD_EXTEND_OP ! /* Or as a SIGN_EXTEND if LOAD_EXTEND_OP says that that's ! what it really is. */ ! if (LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (*split))) ! == SIGN_EXTEND) ! SUBST (*split, gen_rtx_SIGN_EXTEND (split_mode, ! SUBREG_REG (*split))); ! else ! #endif ! SUBST (*split, gen_rtx_ZERO_EXTEND (split_mode, ! SUBREG_REG (*split))); ! } #endif newi2pat = gen_rtx_SET (VOIDmode, newdest, *split); *************** try_combine (i3, i2, i1, new_direct_jump *** 2311,2316 **** --- 2334,2343 ---- copy. This saves at least one insn, more if register allocation can eliminate the copy. + We cannot do this if the destination of the first assignment is a + condition code register or cc0. We eliminate this case by making sure + the SET_DEST and SET_SRC have the same mode. + We cannot do this if the destination of the second assignment is a register that we have already assumed is zero-extended. Similarly for a SUBREG of such a register. */ *************** try_combine (i3, i2, i1, new_direct_jump *** 2320,2325 **** --- 2347,2354 ---- && XVECLEN (newpat, 0) == 2 && GET_CODE (XVECEXP (newpat, 0, 0)) == SET && GET_CODE (SET_SRC (XVECEXP (newpat, 0, 0))) == SIGN_EXTEND + && (GET_MODE (SET_DEST (XVECEXP (newpat, 0, 0))) + == GET_MODE (SET_SRC (XVECEXP (newpat, 0, 0)))) && GET_CODE (XVECEXP (newpat, 0, 1)) == SET && rtx_equal_p (SET_SRC (XVECEXP (newpat, 0, 1)), XEXP (SET_SRC (XVECEXP (newpat, 0, 0)), 0)) *************** try_combine (i3, i2, i1, new_direct_jump *** 2386,2393 **** which we know will be a NOTE. */ for (insn = NEXT_INSN (i3); ! insn && (this_basic_block == n_basic_blocks - 1 ! || insn != BLOCK_HEAD (this_basic_block + 1)); insn = NEXT_INSN (insn)) { if (INSN_P (insn) && reg_referenced_p (ni2dest, PATTERN (insn))) --- 2415,2422 ---- which we know will be a NOTE. */ for (insn = NEXT_INSN (i3); ! insn && (this_basic_block->next_bb == EXIT_BLOCK_PTR ! || insn != this_basic_block->next_bb->head); insn = NEXT_INSN (insn)) { if (INSN_P (insn) && reg_referenced_p (ni2dest, PATTERN (insn))) *************** try_combine (i3, i2, i1, new_direct_jump *** 2604,2611 **** && ! find_reg_note (i2, REG_UNUSED, SET_DEST (XVECEXP (PATTERN (i2), 0, i)))) for (temp = NEXT_INSN (i2); ! temp && (this_basic_block == n_basic_blocks - 1 ! || BLOCK_HEAD (this_basic_block) != temp); temp = NEXT_INSN (temp)) if (temp != i3 && INSN_P (temp)) for (link = LOG_LINKS (temp); link; link = XEXP (link, 1)) --- 2633,2640 ---- && ! find_reg_note (i2, REG_UNUSED, SET_DEST (XVECEXP (PATTERN (i2), 0, i)))) for (temp = NEXT_INSN (i2); ! temp && (this_basic_block->next_bb == EXIT_BLOCK_PTR ! || this_basic_block->head != temp); temp = NEXT_INSN (temp)) if (temp != i3 && INSN_P (temp)) for (link = LOG_LINKS (temp); link; link = XEXP (link, 1)) *************** try_combine (i3, i2, i1, new_direct_jump *** 2818,2824 **** BARRIER following it since it may have initially been a conditional jump. It may also be the last nonnote insn. */ ! if (GET_CODE (newpat) == RETURN || any_uncondjump_p (i3)) { *new_direct_jump_p = 1; --- 2847,2853 ---- BARRIER following it since it may have initially been a conditional jump. It may also be the last nonnote insn. */ ! if (returnjump_p (i3) || any_uncondjump_p (i3)) { *new_direct_jump_p = 1; *************** try_combine (i3, i2, i1, new_direct_jump *** 2826,2831 **** --- 2855,2872 ---- || GET_CODE (temp) != BARRIER) emit_barrier_after (i3); } + + if (undobuf.other_insn != NULL_RTX + && (returnjump_p (undobuf.other_insn) + || any_uncondjump_p (undobuf.other_insn))) + { + *new_direct_jump_p = 1; + + if ((temp = next_nonnote_insn (undobuf.other_insn)) == NULL_RTX + || GET_CODE (temp) != BARRIER) + emit_barrier_after (undobuf.other_insn); + } + /* An NOOP jump does not need barrier, but it does need cleaning up of CFG. */ if (GET_CODE (newpat) == SET *************** find_split_point (loc, insn) *** 2958,2977 **** we can make put both sources together and make a split point in the middle. */ ! if (seq && XVECLEN (seq, 0) == 2 ! && GET_CODE (XVECEXP (seq, 0, 0)) == INSN ! && GET_CODE (PATTERN (XVECEXP (seq, 0, 0))) == SET ! && SET_DEST (PATTERN (XVECEXP (seq, 0, 0))) == reg && ! reg_mentioned_p (reg, ! SET_SRC (PATTERN (XVECEXP (seq, 0, 0)))) ! && GET_CODE (XVECEXP (seq, 0, 1)) == INSN ! && GET_CODE (PATTERN (XVECEXP (seq, 0, 1))) == SET ! && SET_DEST (PATTERN (XVECEXP (seq, 0, 1))) == reg && memory_address_p (GET_MODE (x), ! SET_SRC (PATTERN (XVECEXP (seq, 0, 1))))) { ! rtx src1 = SET_SRC (PATTERN (XVECEXP (seq, 0, 0))); ! rtx src2 = SET_SRC (PATTERN (XVECEXP (seq, 0, 1))); /* Replace the placeholder in SRC2 with SRC1. If we can find where in SRC2 it was placed, that can become our --- 2999,3020 ---- we can make put both sources together and make a split point in the middle. */ ! if (seq ! && NEXT_INSN (seq) != NULL_RTX ! && NEXT_INSN (NEXT_INSN (seq)) == NULL_RTX ! && GET_CODE (seq) == INSN ! && GET_CODE (PATTERN (seq)) == SET ! && SET_DEST (PATTERN (seq)) == reg && ! reg_mentioned_p (reg, ! SET_SRC (PATTERN (seq))) ! && GET_CODE (NEXT_INSN (seq)) == INSN ! && GET_CODE (PATTERN (NEXT_INSN (seq))) == SET ! && SET_DEST (PATTERN (NEXT_INSN (seq))) == reg && memory_address_p (GET_MODE (x), ! SET_SRC (PATTERN (NEXT_INSN (seq))))) { ! rtx src1 = SET_SRC (PATTERN (seq)); ! rtx src2 = SET_SRC (PATTERN (NEXT_INSN (seq))); /* Replace the placeholder in SRC2 with SRC1. If we can find where in SRC2 it was placed, that can become our *************** find_split_point (loc, insn) *** 3062,3072 **** SUBST (SET_SRC (x), gen_binary (IOR, mode, gen_binary (AND, mode, dest, ! GEN_INT ! ( ! trunc_int_for_mode ! (~(mask << pos) ! & GET_MODE_MASK (mode), mode))), GEN_INT (src << pos))); SUBST (SET_DEST (x), dest); --- 3105,3112 ---- SUBST (SET_SRC (x), gen_binary (IOR, mode, gen_binary (AND, mode, dest, ! gen_int_mode (~(mask << pos), ! mode)), GEN_INT (src << pos))); SUBST (SET_DEST (x), dest); *************** find_split_point (loc, insn) *** 3085,3091 **** case AND: /* If we are AND'ing with a large constant that is only a single bit and the result is only being used in a context where we ! need to know if it is zero or non-zero, replace it with a bit extraction. This will avoid the large constant, which might have taken more than one insn to make. If the constant were not a valid argument to the AND but took only one insn to make, --- 3125,3131 ---- case AND: /* If we are AND'ing with a large constant that is only a single bit and the result is only being used in a context where we ! need to know if it is zero or nonzero, replace it with a bit extraction. This will avoid the large constant, which might have taken more than one insn to make. If the constant were not a valid argument to the AND but took only one insn to make, *************** find_split_point (loc, insn) *** 3313,3322 **** `n_occurrences' is incremented each time FROM is replaced. ! IN_DEST is non-zero if we are processing the SET_DEST of a SET. ! UNIQUE_COPY is non-zero if each substitution must be unique. We do this ! by copying if `n_occurrences' is non-zero. */ static rtx subst (x, from, to, in_dest, unique_copy) --- 3353,3362 ---- `n_occurrences' is incremented each time FROM is replaced. ! IN_DEST is nonzero if we are processing the SET_DEST of a SET. ! UNIQUE_COPY is nonzero if each substitution must be unique. We do this ! by copying if `n_occurrences' is nonzero. */ static rtx subst (x, from, to, in_dest, unique_copy) *************** subst (x, from, to, in_dest, unique_copy *** 3497,3511 **** ) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); ! #ifdef CLASS_CANNOT_CHANGE_MODE if (code == SUBREG && GET_CODE (to) == REG && REGNO (to) < FIRST_PSEUDO_REGISTER ! && (TEST_HARD_REG_BIT ! (reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE], ! REGNO (to))) ! && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (to), ! GET_MODE (x))) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); #endif --- 3537,3549 ---- ) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); ! #ifdef CANNOT_CHANGE_MODE_CLASS if (code == SUBREG && GET_CODE (to) == REG && REGNO (to) < FIRST_PSEUDO_REGISTER ! && REG_CANNOT_CHANGE_MODE_P (REGNO (to), ! GET_MODE (to), ! GET_MODE (x))) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); #endif *************** subst (x, from, to, in_dest, unique_copy *** 3540,3546 **** if (GET_CODE (new) == CONST_INT && GET_CODE (x) == SUBREG) { enum machine_mode mode = GET_MODE (x); ! x = simplify_subreg (mode, new, GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); if (! x) --- 3578,3585 ---- if (GET_CODE (new) == CONST_INT && GET_CODE (x) == SUBREG) { enum machine_mode mode = GET_MODE (x); ! ! x = simplify_subreg (GET_MODE (x), new, GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); if (! x) *************** combine_simplify_rtx (x, op0_mode, last, *** 3772,3778 **** if (temp == const0_rtx) temp = CONST0_RTX (mode); else ! temp = immed_real_const_1 (FLOAT_STORE_FLAG_VALUE (mode), mode); } #endif break; --- 3811,3818 ---- if (temp == const0_rtx) temp = CONST0_RTX (mode); else ! temp = CONST_DOUBLE_FROM_REAL_VALUE (FLOAT_STORE_FLAG_VALUE (mode), ! mode); } #endif break; *************** combine_simplify_rtx (x, op0_mode, last, *** 3864,3870 **** /* simplify_subreg can't use gen_lowpart_for_combine. */ if (CONSTANT_P (SUBREG_REG (x)) ! && subreg_lowpart_offset (mode, op0_mode) == SUBREG_BYTE (x)) return gen_lowpart_for_combine (mode, SUBREG_REG (x)); if (GET_MODE_CLASS (GET_MODE (SUBREG_REG (x))) == MODE_CC) --- 3904,3915 ---- /* simplify_subreg can't use gen_lowpart_for_combine. */ if (CONSTANT_P (SUBREG_REG (x)) ! && subreg_lowpart_offset (mode, op0_mode) == SUBREG_BYTE (x) ! /* Don't call gen_lowpart_for_combine if the inner mode ! is VOIDmode and we cannot simplify it, as SUBREG without ! inner mode is invalid. */ ! && (GET_MODE (SUBREG_REG (x)) != VOIDmode ! || gen_lowpart_common (mode, SUBREG_REG (x)))) return gen_lowpart_for_combine (mode, SUBREG_REG (x)); if (GET_MODE_CLASS (GET_MODE (SUBREG_REG (x))) == MODE_CC) *************** combine_simplify_rtx (x, op0_mode, last, *** 3991,4005 **** if (GET_CODE (XEXP (x, 0)) == NOT) return plus_constant (XEXP (XEXP (x, 0), 0), 1); ! /* (neg (minus X Y)) can become (minus Y X). */ if (GET_CODE (XEXP (x, 0)) == MINUS ! && (! FLOAT_MODE_P (mode) ! /* x-y != -(y-x) with IEEE floating point. */ ! || TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT ! || flag_unsafe_math_optimizations)) return gen_binary (MINUS, mode, XEXP (XEXP (x, 0), 1), XEXP (XEXP (x, 0), 0)); /* (neg (xor A 1)) is (plus A -1) if A is known to be either 0 or 1. */ if (GET_CODE (XEXP (x, 0)) == XOR && XEXP (XEXP (x, 0), 1) == const1_rtx && nonzero_bits (XEXP (XEXP (x, 0), 0), mode) == 1) --- 4036,4070 ---- if (GET_CODE (XEXP (x, 0)) == NOT) return plus_constant (XEXP (XEXP (x, 0), 0), 1); ! /* (neg (minus X Y)) can become (minus Y X). This transformation ! isn't safe for modes with signed zeros, since if X and Y are ! both +0, (minus Y X) is the same as (minus X Y). If the rounding ! mode is towards +infinity (or -infinity) then the two expressions ! will be rounded differently. */ if (GET_CODE (XEXP (x, 0)) == MINUS ! && !HONOR_SIGNED_ZEROS (mode) ! && !HONOR_SIGN_DEPENDENT_ROUNDING (mode)) return gen_binary (MINUS, mode, XEXP (XEXP (x, 0), 1), XEXP (XEXP (x, 0), 0)); + /* (neg (plus A B)) is canonicalized to (minus (neg A) B). */ + if (GET_CODE (XEXP (x, 0)) == PLUS + && !HONOR_SIGNED_ZEROS (mode) + && !HONOR_SIGN_DEPENDENT_ROUNDING (mode)) + { + temp = simplify_gen_unary (NEG, mode, XEXP (XEXP (x, 0), 0), mode); + temp = combine_simplify_rtx (temp, mode, last, in_dest); + return gen_binary (MINUS, mode, temp, XEXP (XEXP (x, 0), 1)); + } + + /* (neg (mult A B)) becomes (mult (neg A) B). + This works even for floating-point values. */ + if (GET_CODE (XEXP (x, 0)) == MULT) + { + temp = simplify_gen_unary (NEG, mode, XEXP (XEXP (x, 0), 0), mode); + return gen_binary (MULT, mode, temp, XEXP (XEXP (x, 0), 1)); + } + /* (neg (xor A 1)) is (plus A -1) if A is known to be either 0 or 1. */ if (GET_CODE (XEXP (x, 0)) == XOR && XEXP (XEXP (x, 0), 1) == const1_rtx && nonzero_bits (XEXP (XEXP (x, 0), 0), mode) == 1) *************** combine_simplify_rtx (x, op0_mode, last, *** 4102,4108 **** if (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))) && num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0))) ! >= GET_MODE_BITSIZE (mode) + 1 && ! (GET_CODE (XEXP (x, 0)) == LSHIFTRT && GET_CODE (XEXP (XEXP (x, 0), 0)) == MULT)) return gen_lowpart_for_combine (mode, XEXP (x, 0)); --- 4167,4173 ---- if (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))) && num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0))) ! >= (unsigned int) (GET_MODE_BITSIZE (mode) + 1) && ! (GET_CODE (XEXP (x, 0)) == LSHIFTRT && GET_CODE (XEXP (XEXP (x, 0), 0)) == MULT)) return gen_lowpart_for_combine (mode, XEXP (x, 0)); *************** combine_simplify_rtx (x, op0_mode, last, *** 4158,4167 **** if (XEXP (x, 1) == const0_rtx) return XEXP (x, 0); ! /* In IEEE floating point, x-0 is not the same as x. */ ! if ((TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT ! || ! FLOAT_MODE_P (GET_MODE (XEXP (x, 0))) ! || flag_unsafe_math_optimizations) && XEXP (x, 1) == CONST0_RTX (GET_MODE (XEXP (x, 0)))) return XEXP (x, 0); break; --- 4223,4233 ---- if (XEXP (x, 1) == const0_rtx) return XEXP (x, 0); ! /* x - 0 is the same as x unless x's mode has signed zeros and ! allows rounding towards -infinity. Under those conditions, ! 0 - 0 is -0. */ ! if (!(HONOR_SIGNED_ZEROS (GET_MODE (XEXP (x, 0))) ! && HONOR_SIGN_DEPENDENT_ROUNDING (GET_MODE (XEXP (x, 0)))) && XEXP (x, 1) == CONST0_RTX (GET_MODE (XEXP (x, 0)))) return XEXP (x, 0); break; *************** combine_simplify_rtx (x, op0_mode, last, *** 4187,4192 **** --- 4253,4271 ---- #endif case PLUS: + /* Canonicalize (plus (mult (neg B) C) A) to (minus A (mult B C)). + */ + if (GET_CODE (XEXP (x, 0)) == MULT + && GET_CODE (XEXP (XEXP (x, 0), 0)) == NEG) + { + rtx in1, in2; + + in1 = XEXP (XEXP (XEXP (x, 0), 0), 0); + in2 = XEXP (XEXP (x, 0), 1); + return gen_binary (MINUS, mode, XEXP (x, 1), + gen_binary (MULT, mode, in1, in2)); + } + /* If we have (plus (plus (A const) B)), associate it so that CONST is outermost. That's because that's the way indexed addresses are supposed to appear. This code used to check many more cases, but *************** combine_simplify_rtx (x, op0_mode, last, *** 4293,4298 **** --- 4372,4403 ---- return simplify_and_const_int (NULL_RTX, mode, XEXP (x, 0), -INTVAL (XEXP (XEXP (x, 1), 1)) - 1); + /* Canonicalize (minus A (mult (neg B) C)) to (plus (mult B C) A). + */ + if (GET_CODE (XEXP (x, 1)) == MULT + && GET_CODE (XEXP (XEXP (x, 1), 0)) == NEG) + { + rtx in1, in2; + + in1 = XEXP (XEXP (XEXP (x, 1), 0), 0); + in2 = XEXP (XEXP (x, 1), 1); + return gen_binary (PLUS, mode, gen_binary (MULT, mode, in1, in2), + XEXP (x, 0)); + } + + /* Canonicalize (minus (neg A) (mult B C)) to + (minus (mult (neg B) C) A). */ + if (GET_CODE (XEXP (x, 1)) == MULT + && GET_CODE (XEXP (x, 0)) == NEG) + { + rtx in1, in2; + + in1 = simplify_gen_unary (NEG, mode, XEXP (XEXP (x, 1), 0), mode); + in2 = XEXP (XEXP (x, 1), 1); + return gen_binary (MINUS, mode, gen_binary (MULT, mode, in1, in2), + XEXP (XEXP (x, 0), 0)); + } + /* Canonicalize (minus A (plus B C)) to (minus (minus A B) C) for integers. */ if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode)) *************** combine_simplify_rtx (x, op0_mode, last, *** 4579,4585 **** #ifdef SHIFT_COUNT_TRUNCATED else if (SHIFT_COUNT_TRUNCATED && GET_CODE (XEXP (x, 1)) != REG) SUBST (XEXP (x, 1), ! force_to_mode (XEXP (x, 1), GET_MODE (x), ((HOST_WIDE_INT) 1 << exact_log2 (GET_MODE_BITSIZE (GET_MODE (x)))) - 1, --- 4684,4690 ---- #ifdef SHIFT_COUNT_TRUNCATED else if (SHIFT_COUNT_TRUNCATED && GET_CODE (XEXP (x, 1)) != REG) SUBST (XEXP (x, 1), ! force_to_mode (XEXP (x, 1), GET_MODE (XEXP (x, 1)), ((HOST_WIDE_INT) 1 << exact_log2 (GET_MODE_BITSIZE (GET_MODE (x)))) - 1, *************** simplify_if_then_else (x) *** 4761,4772 **** /* Convert a == b ? b : a to "a". */ if (true_code == EQ && ! side_effects_p (cond) ! && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) && rtx_equal_p (XEXP (cond, 0), false_rtx) && rtx_equal_p (XEXP (cond, 1), true_rtx)) return false_rtx; else if (true_code == NE && ! side_effects_p (cond) ! && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) && rtx_equal_p (XEXP (cond, 0), true_rtx) && rtx_equal_p (XEXP (cond, 1), false_rtx)) return true_rtx; --- 4866,4877 ---- /* Convert a == b ? b : a to "a". */ if (true_code == EQ && ! side_effects_p (cond) ! && !HONOR_NANS (mode) && rtx_equal_p (XEXP (cond, 0), false_rtx) && rtx_equal_p (XEXP (cond, 1), true_rtx)) return false_rtx; else if (true_code == NE && ! side_effects_p (cond) ! && !HONOR_NANS (mode) && rtx_equal_p (XEXP (cond, 0), true_rtx) && rtx_equal_p (XEXP (cond, 1), false_rtx)) return true_rtx; *************** simplify_if_then_else (x) *** 4827,4833 **** neither 1 or -1, but it isn't worth checking for. */ if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) ! && comparison_p && mode != VOIDmode && ! side_effects_p (x)) { rtx t = make_compound_operation (true_rtx, SET); rtx f = make_compound_operation (false_rtx, SET); --- 4932,4940 ---- neither 1 or -1, but it isn't worth checking for. */ if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) ! && comparison_p ! && GET_MODE_CLASS (mode) == MODE_INT ! && ! side_effects_p (x)) { rtx t = make_compound_operation (true_rtx, SET); rtx f = make_compound_operation (false_rtx, SET); *************** simplify_if_then_else (x) *** 4862,4868 **** && subreg_lowpart_p (XEXP (XEXP (t, 0), 0)) && rtx_equal_p (SUBREG_REG (XEXP (XEXP (t, 0), 0)), f) && (num_sign_bit_copies (f, GET_MODE (f)) ! > (GET_MODE_BITSIZE (mode) - GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (t, 0), 0)))))) { c1 = XEXP (XEXP (t, 0), 1); z = f; op = GET_CODE (XEXP (t, 0)); --- 4969,4976 ---- && subreg_lowpart_p (XEXP (XEXP (t, 0), 0)) && rtx_equal_p (SUBREG_REG (XEXP (XEXP (t, 0), 0)), f) && (num_sign_bit_copies (f, GET_MODE (f)) ! > (unsigned int) ! (GET_MODE_BITSIZE (mode) - GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (t, 0), 0)))))) { c1 = XEXP (XEXP (t, 0), 1); z = f; op = GET_CODE (XEXP (t, 0)); *************** simplify_if_then_else (x) *** 4877,4883 **** && subreg_lowpart_p (XEXP (XEXP (t, 0), 1)) && rtx_equal_p (SUBREG_REG (XEXP (XEXP (t, 0), 1)), f) && (num_sign_bit_copies (f, GET_MODE (f)) ! > (GET_MODE_BITSIZE (mode) - GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (t, 0), 1)))))) { c1 = XEXP (XEXP (t, 0), 0); z = f; op = GET_CODE (XEXP (t, 0)); --- 4985,4992 ---- && subreg_lowpart_p (XEXP (XEXP (t, 0), 1)) && rtx_equal_p (SUBREG_REG (XEXP (XEXP (t, 0), 1)), f) && (num_sign_bit_copies (f, GET_MODE (f)) ! > (unsigned int) ! (GET_MODE_BITSIZE (mode) - GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (t, 0), 1)))))) { c1 = XEXP (XEXP (t, 0), 0); z = f; op = GET_CODE (XEXP (t, 0)); *************** simplify_set (x) *** 4977,4983 **** simplify the expression for the object knowing that we only need the low-order bits. */ ! if (GET_MODE_CLASS (mode) == MODE_INT) { src = force_to_mode (src, mode, ~(HOST_WIDE_INT) 0, NULL_RTX, 0); SUBST (SET_SRC (x), src); --- 5086,5093 ---- simplify the expression for the object knowing that we only need the low-order bits. */ ! if (GET_MODE_CLASS (mode) == MODE_INT ! && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT) { src = force_to_mode (src, mode, ~(HOST_WIDE_INT) 0, NULL_RTX, 0); SUBST (SET_SRC (x), src); *************** simplify_set (x) *** 4986,4996 **** /* If we are setting CC0 or if the source is a COMPARE, look for the use of the comparison result and try to simplify it unless we already have used undobuf.other_insn. */ ! if ((GET_CODE (src) == COMPARE ! #ifdef HAVE_cc0 ! || dest == cc0_rtx ! #endif ! ) && (cc_use = find_single_use (dest, subst_insn, &other_insn)) != 0 && (undobuf.other_insn == 0 || other_insn == undobuf.other_insn) && GET_RTX_CLASS (GET_CODE (*cc_use)) == '<' --- 5096,5104 ---- /* If we are setting CC0 or if the source is a COMPARE, look for the use of the comparison result and try to simplify it unless we already have used undobuf.other_insn. */ ! if ((GET_MODE_CLASS (mode) == MODE_CC ! || GET_CODE (src) == COMPARE ! || CC0_P (dest)) && (cc_use = find_single_use (dest, subst_insn, &other_insn)) != 0 && (undobuf.other_insn == 0 || other_insn == undobuf.other_insn) && GET_RTX_CLASS (GET_CODE (*cc_use)) == '<' *************** simplify_set (x) *** 4998,5012 **** { enum rtx_code old_code = GET_CODE (*cc_use); enum rtx_code new_code; ! rtx op0, op1; int other_changed = 0; enum machine_mode compare_mode = GET_MODE (dest); if (GET_CODE (src) == COMPARE) op0 = XEXP (src, 0), op1 = XEXP (src, 1); else op0 = src, op1 = const0_rtx; /* Simplify our comparison, if possible. */ new_code = simplify_comparison (old_code, &op0, &op1); --- 5106,5149 ---- { enum rtx_code old_code = GET_CODE (*cc_use); enum rtx_code new_code; ! rtx op0, op1, tmp; int other_changed = 0; enum machine_mode compare_mode = GET_MODE (dest); + enum machine_mode tmp_mode; if (GET_CODE (src) == COMPARE) op0 = XEXP (src, 0), op1 = XEXP (src, 1); else op0 = src, op1 = const0_rtx; + /* Check whether the comparison is known at compile time. */ + if (GET_MODE (op0) != VOIDmode) + tmp_mode = GET_MODE (op0); + else if (GET_MODE (op1) != VOIDmode) + tmp_mode = GET_MODE (op1); + else + tmp_mode = compare_mode; + tmp = simplify_relational_operation (old_code, tmp_mode, op0, op1); + if (tmp != NULL_RTX) + { + rtx pat = PATTERN (other_insn); + undobuf.other_insn = other_insn; + SUBST (*cc_use, tmp); + + /* Attempt to simplify CC user. */ + if (GET_CODE (pat) == SET) + { + rtx new = simplify_rtx (SET_SRC (pat)); + if (new != NULL_RTX) + SUBST (SET_SRC (pat), new); + } + + /* Convert X into a no-op move. */ + SUBST (SET_DEST (x), pc_rtx); + SUBST (SET_SRC (x), pc_rtx); + return x; + } + /* Simplify our comparison, if possible. */ new_code = simplify_comparison (old_code, &op0, &op1); *************** simplify_set (x) *** 5136,5148 **** && (GET_MODE_SIZE (GET_MODE (src)) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (src)))) #endif ! #ifdef CLASS_CANNOT_CHANGE_MODE && ! (GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER ! && (TEST_HARD_REG_BIT ! (reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE], ! REGNO (dest))) ! && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (src), ! GET_MODE (SUBREG_REG (src)))) #endif && (GET_CODE (dest) == REG || (GET_CODE (dest) == SUBREG --- 5273,5283 ---- && (GET_MODE_SIZE (GET_MODE (src)) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (src)))) #endif ! #ifdef CANNOT_CHANGE_MODE_CLASS && ! (GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER ! && REG_CANNOT_CHANGE_MODE_P (REGNO (dest), ! GET_MODE (SUBREG_REG (src)), ! GET_MODE (src))) #endif && (GET_CODE (dest) == REG || (GET_CODE (dest) == SUBREG *************** simplify_set (x) *** 5156,5161 **** --- 5291,5320 ---- src = SET_SRC (x), dest = SET_DEST (x); } + #ifdef HAVE_cc0 + /* If we have (set (cc0) (subreg ...)), we try to remove the subreg + in SRC. */ + if (dest == cc0_rtx + && GET_CODE (src) == SUBREG + && subreg_lowpart_p (src) + && (GET_MODE_BITSIZE (GET_MODE (src)) + < GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (src))))) + { + rtx inner = SUBREG_REG (src); + enum machine_mode inner_mode = GET_MODE (inner); + + /* Here we make sure that we don't have a sign bit on. */ + if (GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_WIDE_INT + && (nonzero_bits (inner, inner_mode) + < ((unsigned HOST_WIDE_INT) 1 + << (GET_MODE_BITSIZE (GET_MODE (src)) - 1)))) + { + SUBST (SET_SRC (x), inner); + src = SET_SRC (x); + } + } + #endif + #ifdef LOAD_EXTEND_OP /* If we have (set FOO (subreg:M (mem:N BAR) 0)) with M wider than N, this would require a paradoxical subreg. Replace the subreg with a *************** expand_compound_operation (x) *** 5594,5602 **** if (GET_MODE_SIZE (GET_MODE (XEXP (x, 0))) > UNITS_PER_WORD) return x; len = GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))); /* If the inner object has VOIDmode (the only way this can happen ! is if it is a ASM_OPERANDS), we can't do anything since we don't know how much masking to do. */ if (len == 0) return x; --- 5753,5767 ---- if (GET_MODE_SIZE (GET_MODE (XEXP (x, 0))) > UNITS_PER_WORD) return x; + /* Reject MODEs that aren't scalar integers because turning vector + or complex modes into shifts causes problems. */ + + if (! SCALAR_INT_MODE_P (GET_MODE (XEXP (x, 0)))) + return x; + len = GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))); /* If the inner object has VOIDmode (the only way this can happen ! is if it is an ASM_OPERANDS), we can't do anything since we don't know how much masking to do. */ if (len == 0) return x; *************** expand_compound_operation (x) *** 5615,5620 **** --- 5780,5791 ---- || GET_MODE (XEXP (x, 0)) == VOIDmode) return x; + /* Reject MODEs that aren't scalar integers because turning vector + or complex modes into shifts causes problems. */ + + if (! SCALAR_INT_MODE_P (GET_MODE (XEXP (x, 0)))) + return x; + len = INTVAL (XEXP (x, 1)); pos = INTVAL (XEXP (x, 2)); *************** expand_field_assignment (x) *** 5822,5833 **** compute_mode = GET_MODE (inner); ! /* Don't attempt bitwise arithmetic on non-integral modes. */ ! if (! INTEGRAL_MODE_P (compute_mode)) { enum machine_mode imode; ! /* Something is probably seriously wrong if this matches. */ if (! FLOAT_MODE_P (compute_mode)) break; --- 5993,6004 ---- compute_mode = GET_MODE (inner); ! /* Don't attempt bitwise arithmetic on non scalar integer modes. */ ! if (! SCALAR_INT_MODE_P (compute_mode)) { enum machine_mode imode; ! /* Don't do anything for vector or complex integral types. */ if (! FLOAT_MODE_P (compute_mode)) break; *************** expand_field_assignment (x) *** 5881,5895 **** code that understands the USE is this routine. If it is not removed, it will cause the resulting insn not to match. ! UNSIGNEDP is non-zero for an unsigned reference and zero for a signed reference. ! IN_DEST is non-zero if this is a reference in the destination of a ! SET. This is used when a ZERO_ or SIGN_EXTRACT isn't needed. If non-zero, a STRICT_LOW_PART will be used, if zero, ZERO_EXTEND or SIGN_EXTEND will be used. ! IN_COMPARE is non-zero if we are in a COMPARE. This means that a ZERO_EXTRACT should be built even for bits starting at bit 0. MODE is the desired mode of the result (if IN_DEST == 0). --- 6052,6066 ---- code that understands the USE is this routine. If it is not removed, it will cause the resulting insn not to match. ! UNSIGNEDP is nonzero for an unsigned reference and zero for a signed reference. ! IN_DEST is nonzero if this is a reference in the destination of a ! SET. This is used when a ZERO_ or SIGN_EXTRACT isn't needed. If nonzero, a STRICT_LOW_PART will be used, if zero, ZERO_EXTEND or SIGN_EXTEND will be used. ! IN_COMPARE is nonzero if we are in a COMPARE. This means that a ZERO_EXTRACT should be built even for bits starting at bit 0. MODE is the desired mode of the result (if IN_DEST == 0). *************** make_extraction (mode, inner, pos, pos_r *** 5940,5945 **** --- 6111,6131 ---- is_mode = GET_MODE (SUBREG_REG (inner)); inner = SUBREG_REG (inner); } + else if (GET_CODE (inner) == ASHIFT + && GET_CODE (XEXP (inner, 1)) == CONST_INT + && pos_rtx == 0 && pos == 0 + && len > (unsigned HOST_WIDE_INT) INTVAL (XEXP (inner, 1))) + { + /* We're extracting the least significant bits of an rtx + (ashift X (const_int C)), where LEN > C. Extract the + least significant (LEN - C) bits of X, giving an rtx + whose mode is MODE, then shift it left C times. */ + new = make_extraction (mode, XEXP (inner, 0), + 0, 0, len - INTVAL (XEXP (inner, 1)), + unsignedp, in_dest, in_compare); + if (new != 0) + return gen_rtx_ASHIFT (mode, new, XEXP (inner, 1)); + } inner_mode = GET_MODE (inner); *************** make_extraction (mode, inner, pos, pos_r *** 6017,6023 **** - GET_MODE_SIZE (tmode)) % UNITS_PER_WORD; /* Avoid creating invalid subregs, for example when ! simplifying (x>>32)&255. */ if (final_word >= GET_MODE_SIZE (inner_mode)) return NULL_RTX; --- 6203,6209 ---- - GET_MODE_SIZE (tmode)) % UNITS_PER_WORD; /* Avoid creating invalid subregs, for example when ! simplifying (x>>32)&255. */ if (final_word >= GET_MODE_SIZE (inner_mode)) return NULL_RTX; *************** make_extraction (mode, inner, pos, pos_r *** 6046,6052 **** return new; if (GET_CODE (new) == CONST_INT) ! return GEN_INT (trunc_int_for_mode (INTVAL (new), mode)); /* If we know that no extraneous bits are set, and that the high bit is not set, convert the extraction to the cheaper of --- 6232,6238 ---- return new; if (GET_CODE (new) == CONST_INT) ! return gen_int_mode (INTVAL (new), mode); /* If we know that no extraneous bits are set, and that the high bit is not set, convert the extraction to the cheaper of *************** make_compound_operation (x, in_code) *** 6362,6368 **** : in_code == COMPARE ? SET : in_code); /* Process depending on the code of this operation. If NEW is set ! non-zero, it will be returned. */ switch (code) { --- 6548,6554 ---- : in_code == COMPARE ? SET : in_code); /* Process depending on the code of this operation. If NEW is set ! nonzero, it will be returned. */ switch (code) { *************** make_compound_operation (x, in_code) *** 6567,6573 **** if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (tem)) || (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (XEXP (tem, 0))))) ! tem = gen_rtx_fmt_e (GET_CODE (tem), mode, XEXP (tem, 0)); else tem = gen_lowpart_for_combine (mode, XEXP (tem, 0)); return tem; --- 6753,6763 ---- if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (tem)) || (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (XEXP (tem, 0))))) ! { ! if (! SCALAR_INT_MODE_P (mode)) ! break; ! tem = gen_rtx_fmt_e (GET_CODE (tem), mode, XEXP (tem, 0)); ! } else tem = gen_lowpart_for_combine (mode, XEXP (tem, 0)); return tem; *************** get_pos_from_mask (m, plen) *** 6635,6641 **** Return a possibly simplified expression, but always convert X to MODE. If X is a CONST_INT, AND the CONST_INT with MASK. ! Also, if REG is non-zero and X is a register equal in value to REG, replace X with REG. If JUST_SELECT is nonzero, don't optimize by noticing that bits in MASK --- 6825,6831 ---- Return a possibly simplified expression, but always convert X to MODE. If X is a CONST_INT, AND the CONST_INT with MASK. ! Also, if REG is nonzero and X is a register equal in value to REG, replace X with REG. If JUST_SELECT is nonzero, don't optimize by noticing that bits in MASK *************** force_to_mode (x, mode, mask, reg, just_ *** 6698,6709 **** /* If none of the bits in X are needed, return a zero. */ if (! just_select && (nonzero & mask) == 0) ! return const0_rtx; /* If X is a CONST_INT, return a new one. Do this here since the test below will fail. */ if (GET_CODE (x) == CONST_INT) ! return gen_int_mode (INTVAL (x) & mask, mode); /* If X is narrower than MODE and we want all the bits in X's mode, just get X in the proper mode. */ --- 6888,6907 ---- /* If none of the bits in X are needed, return a zero. */ if (! just_select && (nonzero & mask) == 0) ! x = const0_rtx; /* If X is a CONST_INT, return a new one. Do this here since the test below will fail. */ if (GET_CODE (x) == CONST_INT) ! { ! if (SCALAR_INT_MODE_P (mode)) ! return gen_int_mode (INTVAL (x) & mask, mode); ! else ! { ! x = GEN_INT (INTVAL (x) & mask); ! return gen_lowpart_common (mode, x); ! } ! } /* If X is narrower than MODE and we want all the bits in X's mode, just get X in the proper mode. */ *************** force_to_mode (x, mode, mask, reg, just_ *** 6776,6782 **** if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT && ((INTVAL (XEXP (x, 1)) & GET_MODE_MASK (GET_MODE (x))) ! == (HOST_WIDE_INT) mask)) x = XEXP (x, 0); /* If it remains an AND, try making another AND with the bits --- 6974,6980 ---- if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT && ((INTVAL (XEXP (x, 1)) & GET_MODE_MASK (GET_MODE (x))) ! == mask)) x = XEXP (x, 0); /* If it remains an AND, try making another AND with the bits *************** force_to_mode (x, mode, mask, reg, just_ *** 7058,7064 **** } } ! /* If MASK is 1, convert this to a LSHIFTRT. This can be done even if the shift count isn't a constant. */ if (mask == 1) x = gen_binary (LSHIFTRT, GET_MODE (x), XEXP (x, 0), XEXP (x, 1)); --- 7256,7262 ---- } } ! /* If MASK is 1, convert this to an LSHIFTRT. This can be done even if the shift count isn't a constant. */ if (mask == 1) x = gen_binary (LSHIFTRT, GET_MODE (x), XEXP (x, 0), XEXP (x, 1)); *************** if_then_else_cond (x, ptrue, pfalse) *** 7246,7252 **** } /* See if we have PLUS, IOR, XOR, MINUS or UMAX, where one of the ! operands is zero when the other is non-zero, and vice-versa, and STORE_FLAG_VALUE is 1 or -1. */ if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) --- 7444,7450 ---- } /* See if we have PLUS, IOR, XOR, MINUS or UMAX, where one of the ! operands is zero when the other is nonzero, and vice-versa, and STORE_FLAG_VALUE is 1 or -1. */ if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) *************** if_then_else_cond (x, ptrue, pfalse) *** 7368,7374 **** && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT && exact_log2 (nz = nonzero_bits (x, mode)) >= 0) { ! *ptrue = GEN_INT (trunc_int_for_mode (nz, mode)), *pfalse = const0_rtx; return x; } --- 7566,7572 ---- && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT && exact_log2 (nz = nonzero_bits (x, mode)) >= 0) { ! *ptrue = gen_int_mode (nz, mode), *pfalse = const0_rtx; return x; } *************** simplify_and_const_int (x, mode, varop, *** 7867,7873 **** return const0_rtx; /* If VAROP is a NEG of something known to be zero or 1 and CONSTOP is ! a power of two, we can replace this with a ASHIFT. */ if (GET_CODE (varop) == NEG && nonzero_bits (XEXP (varop, 0), mode) == 1 && (i = exact_log2 (constop)) >= 0) return simplify_shift_const (NULL_RTX, ASHIFT, mode, XEXP (varop, 0), i); --- 8065,8071 ---- return const0_rtx; /* If VAROP is a NEG of something known to be zero or 1 and CONSTOP is ! a power of two, we can replace this with an ASHIFT. */ if (GET_CODE (varop) == NEG && nonzero_bits (XEXP (varop, 0), mode) == 1 && (i = exact_log2 (constop)) >= 0) return simplify_shift_const (NULL_RTX, ASHIFT, mode, XEXP (varop, 0), i); *************** simplify_and_const_int (x, mode, varop, *** 7943,7965 **** return x; } /* We let num_sign_bit_copies recur into nonzero_bits as that is useful. We don't let nonzero_bits recur into num_sign_bit_copies, because that is less useful. We can't allow both, because that results in exponential run time recursion. There is a nullstone testcase that triggered this. This macro avoids accidental uses of num_sign_bit_copies. */ ! #define num_sign_bit_copies() ! /* Given an expression, X, compute which bits in X can be non-zero. We don't care about bits outside of those defined in MODE. For most X this is simply GET_MODE_MASK (GET_MODE (MODE)), but if X is a shift, AND, or zero_extract, we can do better. */ static unsigned HOST_WIDE_INT ! nonzero_bits (x, mode) rtx x; enum machine_mode mode; { unsigned HOST_WIDE_INT nonzero = GET_MODE_MASK (mode); unsigned HOST_WIDE_INT inner_nz; --- 8141,8216 ---- return x; } + #define nonzero_bits_with_known(X, MODE) \ + cached_nonzero_bits (X, MODE, known_x, known_mode, known_ret) + + /* The function cached_nonzero_bits is a wrapper around nonzero_bits1. + It avoids exponential behavior in nonzero_bits1 when X has + identical subexpressions on the first or the second level. */ + + static unsigned HOST_WIDE_INT + cached_nonzero_bits (x, mode, known_x, known_mode, known_ret) + rtx x; + enum machine_mode mode; + rtx known_x; + enum machine_mode known_mode; + unsigned HOST_WIDE_INT known_ret; + { + if (x == known_x && mode == known_mode) + return known_ret; + + /* Try to find identical subexpressions. If found call + nonzero_bits1 on X with the subexpressions as KNOWN_X and the + precomputed value for the subexpression as KNOWN_RET. */ + + if (GET_RTX_CLASS (GET_CODE (x)) == '2' + || GET_RTX_CLASS (GET_CODE (x)) == 'c') + { + rtx x0 = XEXP (x, 0); + rtx x1 = XEXP (x, 1); + + /* Check the first level. */ + if (x0 == x1) + return nonzero_bits1 (x, mode, x0, mode, + nonzero_bits_with_known (x0, mode)); + + /* Check the second level. */ + if ((GET_RTX_CLASS (GET_CODE (x0)) == '2' + || GET_RTX_CLASS (GET_CODE (x0)) == 'c') + && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1))) + return nonzero_bits1 (x, mode, x1, mode, + nonzero_bits_with_known (x1, mode)); + + if ((GET_RTX_CLASS (GET_CODE (x1)) == '2' + || GET_RTX_CLASS (GET_CODE (x1)) == 'c') + && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1))) + return nonzero_bits1 (x, mode, x0, mode, + nonzero_bits_with_known (x0, mode)); + } + + return nonzero_bits1 (x, mode, known_x, known_mode, known_ret); + } + /* We let num_sign_bit_copies recur into nonzero_bits as that is useful. We don't let nonzero_bits recur into num_sign_bit_copies, because that is less useful. We can't allow both, because that results in exponential run time recursion. There is a nullstone testcase that triggered this. This macro avoids accidental uses of num_sign_bit_copies. */ ! #define cached_num_sign_bit_copies() ! /* Given an expression, X, compute which bits in X can be nonzero. We don't care about bits outside of those defined in MODE. For most X this is simply GET_MODE_MASK (GET_MODE (MODE)), but if X is a shift, AND, or zero_extract, we can do better. */ static unsigned HOST_WIDE_INT ! nonzero_bits1 (x, mode, known_x, known_mode, known_ret) rtx x; enum machine_mode mode; + rtx known_x; + enum machine_mode known_mode; + unsigned HOST_WIDE_INT known_ret; { unsigned HOST_WIDE_INT nonzero = GET_MODE_MASK (mode); unsigned HOST_WIDE_INT inner_nz; *************** nonzero_bits (x, mode) *** 7997,8003 **** && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT && GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (GET_MODE (x))) { ! nonzero &= nonzero_bits (x, GET_MODE (x)); nonzero |= GET_MODE_MASK (mode) & ~GET_MODE_MASK (GET_MODE (x)); return nonzero; } --- 8248,8254 ---- && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT && GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (GET_MODE (x))) { ! nonzero &= nonzero_bits_with_known (x, GET_MODE (x)); nonzero |= GET_MODE_MASK (mode) & ~GET_MODE_MASK (GET_MODE (x)); return nonzero; } *************** nonzero_bits (x, mode) *** 8050,8056 **** && (reg_last_set_label[REGNO (x)] == label_tick || (REGNO (x) >= FIRST_PSEUDO_REGISTER && REG_N_SETS (REGNO (x)) == 1 ! && ! REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, REGNO (x)))) && INSN_CUID (reg_last_set[REGNO (x)]) < subst_low_cuid) return reg_last_set_nonzero_bits[REGNO (x)] & nonzero; --- 8301,8307 ---- && (reg_last_set_label[REGNO (x)] == label_tick || (REGNO (x) >= FIRST_PSEUDO_REGISTER && REG_N_SETS (REGNO (x)) == 1 ! && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, REGNO (x)))) && INSN_CUID (reg_last_set[REGNO (x)]) < subst_low_cuid) return reg_last_set_nonzero_bits[REGNO (x)] & nonzero; *************** nonzero_bits (x, mode) *** 8079,8085 **** | ((HOST_WIDE_INT) (-1) << GET_MODE_BITSIZE (GET_MODE (x)))); #endif ! return nonzero_bits (tem, mode) & nonzero; } else if (nonzero_sign_valid && reg_nonzero_bits[REGNO (x)]) { --- 8330,8336 ---- | ((HOST_WIDE_INT) (-1) << GET_MODE_BITSIZE (GET_MODE (x)))); #endif ! return nonzero_bits_with_known (tem, mode) & nonzero; } else if (nonzero_sign_valid && reg_nonzero_bits[REGNO (x)]) { *************** nonzero_bits (x, mode) *** 8154,8164 **** break; case TRUNCATE: ! nonzero &= (nonzero_bits (XEXP (x, 0), mode) & GET_MODE_MASK (mode)); break; case ZERO_EXTEND: ! nonzero &= nonzero_bits (XEXP (x, 0), mode); if (GET_MODE (XEXP (x, 0)) != VOIDmode) nonzero &= GET_MODE_MASK (GET_MODE (XEXP (x, 0))); break; --- 8405,8416 ---- break; case TRUNCATE: ! nonzero &= (nonzero_bits_with_known (XEXP (x, 0), mode) ! & GET_MODE_MASK (mode)); break; case ZERO_EXTEND: ! nonzero &= nonzero_bits_with_known (XEXP (x, 0), mode); if (GET_MODE (XEXP (x, 0)) != VOIDmode) nonzero &= GET_MODE_MASK (GET_MODE (XEXP (x, 0))); break; *************** nonzero_bits (x, mode) *** 8166,8173 **** case SIGN_EXTEND: /* If the sign bit is known clear, this is the same as ZERO_EXTEND. Otherwise, show all the bits in the outer mode but not the inner ! may be non-zero. */ ! inner_nz = nonzero_bits (XEXP (x, 0), mode); if (GET_MODE (XEXP (x, 0)) != VOIDmode) { inner_nz &= GET_MODE_MASK (GET_MODE (XEXP (x, 0))); --- 8418,8425 ---- case SIGN_EXTEND: /* If the sign bit is known clear, this is the same as ZERO_EXTEND. Otherwise, show all the bits in the outer mode but not the inner ! may be nonzero. */ ! inner_nz = nonzero_bits_with_known (XEXP (x, 0), mode); if (GET_MODE (XEXP (x, 0)) != VOIDmode) { inner_nz &= GET_MODE_MASK (GET_MODE (XEXP (x, 0))); *************** nonzero_bits (x, mode) *** 8182,8200 **** break; case AND: ! nonzero &= (nonzero_bits (XEXP (x, 0), mode) ! & nonzero_bits (XEXP (x, 1), mode)); break; case XOR: case IOR: case UMIN: case UMAX: case SMIN: case SMAX: { ! unsigned HOST_WIDE_INT nonzero0 = nonzero_bits (XEXP (x, 0), mode); /* Don't call nonzero_bits for the second time if it cannot change anything. */ if ((nonzero & nonzero0) != nonzero) ! nonzero &= (nonzero0 | nonzero_bits (XEXP (x, 1), mode)); } break; --- 8434,8454 ---- break; case AND: ! nonzero &= (nonzero_bits_with_known (XEXP (x, 0), mode) ! & nonzero_bits_with_known (XEXP (x, 1), mode)); break; case XOR: case IOR: case UMIN: case UMAX: case SMIN: case SMAX: { ! unsigned HOST_WIDE_INT nonzero0 = ! nonzero_bits_with_known (XEXP (x, 0), mode); /* Don't call nonzero_bits for the second time if it cannot change anything. */ if ((nonzero & nonzero0) != nonzero) ! nonzero &= (nonzero0 ! | nonzero_bits_with_known (XEXP (x, 1), mode)); } break; *************** nonzero_bits (x, mode) *** 8204,8214 **** case MOD: case UMOD: /* We can apply the rules of arithmetic to compute the number of high- and low-order zero bits of these operations. We start by ! computing the width (position of the highest-order non-zero bit) and the number of low-order zero bits for each value. */ { ! unsigned HOST_WIDE_INT nz0 = nonzero_bits (XEXP (x, 0), mode); ! unsigned HOST_WIDE_INT nz1 = nonzero_bits (XEXP (x, 1), mode); int width0 = floor_log2 (nz0) + 1; int width1 = floor_log2 (nz1) + 1; int low0 = floor_log2 (nz0 & -nz0); --- 8458,8470 ---- case MOD: case UMOD: /* We can apply the rules of arithmetic to compute the number of high- and low-order zero bits of these operations. We start by ! computing the width (position of the highest-order nonzero bit) and the number of low-order zero bits for each value. */ { ! unsigned HOST_WIDE_INT nz0 = ! nonzero_bits_with_known (XEXP (x, 0), mode); ! unsigned HOST_WIDE_INT nz1 = ! nonzero_bits_with_known (XEXP (x, 1), mode); int width0 = floor_log2 (nz0) + 1; int width1 = floor_log2 (nz1) + 1; int low0 = floor_log2 (nz0 & -nz0); *************** nonzero_bits (x, mode) *** 8290,8298 **** been zero-extended, we know that at least the high-order bits are zero, though others might be too. */ ! if (SUBREG_PROMOTED_VAR_P (x) && SUBREG_PROMOTED_UNSIGNED_P (x)) nonzero = (GET_MODE_MASK (GET_MODE (x)) ! & nonzero_bits (SUBREG_REG (x), GET_MODE (x))); /* If the inner mode is a single word for both the host and target machines, we can compute this from which bits of the inner --- 8546,8554 ---- been zero-extended, we know that at least the high-order bits are zero, though others might be too. */ ! if (SUBREG_PROMOTED_VAR_P (x) && SUBREG_PROMOTED_UNSIGNED_P (x) > 0) nonzero = (GET_MODE_MASK (GET_MODE (x)) ! & nonzero_bits_with_known (SUBREG_REG (x), GET_MODE (x))); /* If the inner mode is a single word for both the host and target machines, we can compute this from which bits of the inner *************** nonzero_bits (x, mode) *** 8301,8317 **** && (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) <= HOST_BITS_PER_WIDE_INT)) { ! nonzero &= nonzero_bits (SUBREG_REG (x), mode); #if defined (WORD_REGISTER_OPERATIONS) && defined (LOAD_EXTEND_OP) /* If this is a typical RISC machine, we only have to worry about the way loads are extended. */ ! if (LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND ! ? (((nonzero ! & (((unsigned HOST_WIDE_INT) 1 ! << (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) - 1)))) ! != 0)) ! : LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) != ZERO_EXTEND) #endif { /* On many CISC machines, accessing an object in a wider mode --- 8557,8574 ---- && (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) <= HOST_BITS_PER_WIDE_INT)) { ! nonzero &= nonzero_bits_with_known (SUBREG_REG (x), mode); #if defined (WORD_REGISTER_OPERATIONS) && defined (LOAD_EXTEND_OP) /* If this is a typical RISC machine, we only have to worry about the way loads are extended. */ ! if ((LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND ! ? (((nonzero ! & (((unsigned HOST_WIDE_INT) 1 ! << (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) - 1)))) ! != 0)) ! : LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) != ZERO_EXTEND) ! || GET_CODE (SUBREG_REG (x)) != MEM) #endif { /* On many CISC machines, accessing an object in a wider mode *************** nonzero_bits (x, mode) *** 8343,8349 **** unsigned int width = GET_MODE_BITSIZE (inner_mode); int count = INTVAL (XEXP (x, 1)); unsigned HOST_WIDE_INT mode_mask = GET_MODE_MASK (inner_mode); ! unsigned HOST_WIDE_INT op_nonzero = nonzero_bits (XEXP (x, 0), mode); unsigned HOST_WIDE_INT inner = op_nonzero & mode_mask; unsigned HOST_WIDE_INT outer = 0; --- 8600,8607 ---- unsigned int width = GET_MODE_BITSIZE (inner_mode); int count = INTVAL (XEXP (x, 1)); unsigned HOST_WIDE_INT mode_mask = GET_MODE_MASK (inner_mode); ! unsigned HOST_WIDE_INT op_nonzero = ! nonzero_bits_with_known (XEXP (x, 0), mode); unsigned HOST_WIDE_INT inner = op_nonzero & mode_mask; unsigned HOST_WIDE_INT outer = 0; *************** nonzero_bits (x, mode) *** 8378,8385 **** break; case IF_THEN_ELSE: ! nonzero &= (nonzero_bits (XEXP (x, 1), mode) ! | nonzero_bits (XEXP (x, 2), mode)); break; default: --- 8636,8643 ---- break; case IF_THEN_ELSE: ! nonzero &= (nonzero_bits_with_known (XEXP (x, 1), mode) ! | nonzero_bits_with_known (XEXP (x, 2), mode)); break; default: *************** nonzero_bits (x, mode) *** 8390,8406 **** } /* See the macro definition above. */ ! #undef num_sign_bit_copies /* Return the number of bits at the high-order end of X that are known to be equal to the sign bit. X will be used in mode MODE; if MODE is VOIDmode, X will be used in its own mode. The returned value will always be between 1 and the number of bits in MODE. */ static unsigned int ! num_sign_bit_copies (x, mode) rtx x; enum machine_mode mode; { enum rtx_code code = GET_CODE (x); unsigned int bitwidth; --- 8648,8721 ---- } /* See the macro definition above. */ ! #undef cached_num_sign_bit_copies + #define num_sign_bit_copies_with_known(X, M) \ + cached_num_sign_bit_copies (X, M, known_x, known_mode, known_ret) + + /* The function cached_num_sign_bit_copies is a wrapper around + num_sign_bit_copies1. It avoids exponential behavior in + num_sign_bit_copies1 when X has identical subexpressions on the + first or the second level. */ + + static unsigned int + cached_num_sign_bit_copies (x, mode, known_x, known_mode, known_ret) + rtx x; + enum machine_mode mode; + rtx known_x; + enum machine_mode known_mode; + unsigned int known_ret; + { + if (x == known_x && mode == known_mode) + return known_ret; + + /* Try to find identical subexpressions. If found call + num_sign_bit_copies1 on X with the subexpressions as KNOWN_X and + the precomputed value for the subexpression as KNOWN_RET. */ + + if (GET_RTX_CLASS (GET_CODE (x)) == '2' + || GET_RTX_CLASS (GET_CODE (x)) == 'c') + { + rtx x0 = XEXP (x, 0); + rtx x1 = XEXP (x, 1); + + /* Check the first level. */ + if (x0 == x1) + return + num_sign_bit_copies1 (x, mode, x0, mode, + num_sign_bit_copies_with_known (x0, mode)); + + /* Check the second level. */ + if ((GET_RTX_CLASS (GET_CODE (x0)) == '2' + || GET_RTX_CLASS (GET_CODE (x0)) == 'c') + && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1))) + return + num_sign_bit_copies1 (x, mode, x1, mode, + num_sign_bit_copies_with_known (x1, mode)); + + if ((GET_RTX_CLASS (GET_CODE (x1)) == '2' + || GET_RTX_CLASS (GET_CODE (x1)) == 'c') + && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1))) + return + num_sign_bit_copies1 (x, mode, x0, mode, + num_sign_bit_copies_with_known (x0, mode)); + } + + return num_sign_bit_copies1 (x, mode, known_x, known_mode, known_ret); + } + /* Return the number of bits at the high-order end of X that are known to be equal to the sign bit. X will be used in mode MODE; if MODE is VOIDmode, X will be used in its own mode. The returned value will always be between 1 and the number of bits in MODE. */ static unsigned int ! num_sign_bit_copies1 (x, mode, known_x, known_mode, known_ret) rtx x; enum machine_mode mode; + rtx known_x; + enum machine_mode known_mode; + unsigned int known_ret; { enum rtx_code code = GET_CODE (x); unsigned int bitwidth; *************** num_sign_bit_copies (x, mode) *** 8423,8429 **** /* For a smaller object, just ignore the high bits. */ if (bitwidth < GET_MODE_BITSIZE (GET_MODE (x))) { ! num0 = num_sign_bit_copies (x, GET_MODE (x)); return MAX (1, num0 - (int) (GET_MODE_BITSIZE (GET_MODE (x)) - bitwidth)); } --- 8738,8744 ---- /* For a smaller object, just ignore the high bits. */ if (bitwidth < GET_MODE_BITSIZE (GET_MODE (x))) { ! num0 = num_sign_bit_copies_with_known (x, GET_MODE (x)); return MAX (1, num0 - (int) (GET_MODE_BITSIZE (GET_MODE (x)) - bitwidth)); } *************** num_sign_bit_copies (x, mode) *** 8465,8478 **** && (reg_last_set_label[REGNO (x)] == label_tick || (REGNO (x) >= FIRST_PSEUDO_REGISTER && REG_N_SETS (REGNO (x)) == 1 ! && ! REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, REGNO (x)))) && INSN_CUID (reg_last_set[REGNO (x)]) < subst_low_cuid) return reg_last_set_sign_bit_copies[REGNO (x)]; tem = get_last_value (x); if (tem != 0) ! return num_sign_bit_copies (tem, mode); if (nonzero_sign_valid && reg_sign_bit_copies[REGNO (x)] != 0 && GET_MODE_BITSIZE (GET_MODE (x)) == bitwidth) --- 8780,8793 ---- && (reg_last_set_label[REGNO (x)] == label_tick || (REGNO (x) >= FIRST_PSEUDO_REGISTER && REG_N_SETS (REGNO (x)) == 1 ! && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, REGNO (x)))) && INSN_CUID (reg_last_set[REGNO (x)]) < subst_low_cuid) return reg_last_set_sign_bit_copies[REGNO (x)]; tem = get_last_value (x); if (tem != 0) ! return num_sign_bit_copies_with_known (tem, mode); if (nonzero_sign_valid && reg_sign_bit_copies[REGNO (x)] != 0 && GET_MODE_BITSIZE (GET_MODE (x)) == bitwidth) *************** num_sign_bit_copies (x, mode) *** 8505,8511 **** if (SUBREG_PROMOTED_VAR_P (x) && ! SUBREG_PROMOTED_UNSIGNED_P (x)) { ! num0 = num_sign_bit_copies (SUBREG_REG (x), mode); return MAX ((int) bitwidth - (int) GET_MODE_BITSIZE (GET_MODE (x)) + 1, num0); --- 8820,8826 ---- if (SUBREG_PROMOTED_VAR_P (x) && ! SUBREG_PROMOTED_UNSIGNED_P (x)) { ! num0 = num_sign_bit_copies_with_known (SUBREG_REG (x), mode); return MAX ((int) bitwidth - (int) GET_MODE_BITSIZE (GET_MODE (x)) + 1, num0); *************** num_sign_bit_copies (x, mode) *** 8514,8520 **** /* For a smaller object, just ignore the high bits. */ if (bitwidth <= GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x)))) { ! num0 = num_sign_bit_copies (SUBREG_REG (x), VOIDmode); return MAX (1, (num0 - (int) (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) - bitwidth))); --- 8829,8835 ---- /* For a smaller object, just ignore the high bits. */ if (bitwidth <= GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x)))) { ! num0 = num_sign_bit_copies_with_known (SUBREG_REG (x), VOIDmode); return MAX (1, (num0 - (int) (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) - bitwidth))); *************** num_sign_bit_copies (x, mode) *** 8534,8541 **** if ((GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! && LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND) ! return num_sign_bit_copies (SUBREG_REG (x), mode); #endif #endif break; --- 8849,8857 ---- if ((GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! && LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND ! && GET_CODE (SUBREG_REG (x)) == MEM) ! return num_sign_bit_copies_with_known (SUBREG_REG (x), mode); #endif #endif break; *************** num_sign_bit_copies (x, mode) *** 8547,8562 **** case SIGN_EXTEND: return (bitwidth - GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) ! + num_sign_bit_copies (XEXP (x, 0), VOIDmode)); case TRUNCATE: /* For a smaller object, just ignore the high bits. */ ! num0 = num_sign_bit_copies (XEXP (x, 0), VOIDmode); return MAX (1, (num0 - (int) (GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) - bitwidth))); case NOT: ! return num_sign_bit_copies (XEXP (x, 0), mode); case ROTATE: case ROTATERT: /* If we are rotating left by a number of bits less than the number --- 8863,8878 ---- case SIGN_EXTEND: return (bitwidth - GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) ! + num_sign_bit_copies_with_known (XEXP (x, 0), VOIDmode)); case TRUNCATE: /* For a smaller object, just ignore the high bits. */ ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), VOIDmode); return MAX (1, (num0 - (int) (GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) - bitwidth))); case NOT: ! return num_sign_bit_copies_with_known (XEXP (x, 0), mode); case ROTATE: case ROTATERT: /* If we are rotating left by a number of bits less than the number *************** num_sign_bit_copies (x, mode) *** 8566,8572 **** && INTVAL (XEXP (x, 1)) >= 0 && INTVAL (XEXP (x, 1)) < (int) bitwidth) { ! num0 = num_sign_bit_copies (XEXP (x, 0), mode); return MAX (1, num0 - (code == ROTATE ? INTVAL (XEXP (x, 1)) : (int) bitwidth - INTVAL (XEXP (x, 1)))); } --- 8882,8888 ---- && INTVAL (XEXP (x, 1)) >= 0 && INTVAL (XEXP (x, 1)) < (int) bitwidth) { ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); return MAX (1, num0 - (code == ROTATE ? INTVAL (XEXP (x, 1)) : (int) bitwidth - INTVAL (XEXP (x, 1)))); } *************** num_sign_bit_copies (x, mode) *** 8577,8583 **** is known to be positive, the number of sign bit copies is the same as that of the input. Finally, if the input has just one bit that might be nonzero, all the bits are copies of the sign bit. */ ! num0 = num_sign_bit_copies (XEXP (x, 0), mode); if (bitwidth > HOST_BITS_PER_WIDE_INT) return num0 > 1 ? num0 - 1 : 1; --- 8893,8899 ---- is known to be positive, the number of sign bit copies is the same as that of the input. Finally, if the input has just one bit that might be nonzero, all the bits are copies of the sign bit. */ ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); if (bitwidth > HOST_BITS_PER_WIDE_INT) return num0 > 1 ? num0 - 1 : 1; *************** num_sign_bit_copies (x, mode) *** 8595,8602 **** case SMIN: case SMAX: case UMIN: case UMAX: /* Logical operations will preserve the number of sign-bit copies. MIN and MAX operations always return one of the operands. */ ! num0 = num_sign_bit_copies (XEXP (x, 0), mode); ! num1 = num_sign_bit_copies (XEXP (x, 1), mode); return MIN (num0, num1); case PLUS: case MINUS: --- 8911,8918 ---- case SMIN: case SMAX: case UMIN: case UMAX: /* Logical operations will preserve the number of sign-bit copies. MIN and MAX operations always return one of the operands. */ ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); ! num1 = num_sign_bit_copies_with_known (XEXP (x, 1), mode); return MIN (num0, num1); case PLUS: case MINUS: *************** num_sign_bit_copies (x, mode) *** 8614,8621 **** : bitwidth - floor_log2 (nonzero) - 1); } ! num0 = num_sign_bit_copies (XEXP (x, 0), mode); ! num1 = num_sign_bit_copies (XEXP (x, 1), mode); result = MAX (1, MIN (num0, num1) - 1); #ifdef POINTERS_EXTEND_UNSIGNED --- 8930,8937 ---- : bitwidth - floor_log2 (nonzero) - 1); } ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); ! num1 = num_sign_bit_copies_with_known (XEXP (x, 1), mode); result = MAX (1, MIN (num0, num1) - 1); #ifdef POINTERS_EXTEND_UNSIGNED *************** num_sign_bit_copies (x, mode) *** 8637,8644 **** to be positive, we must allow for an additional bit since negating a negative number can remove one sign bit copy. */ ! num0 = num_sign_bit_copies (XEXP (x, 0), mode); ! num1 = num_sign_bit_copies (XEXP (x, 1), mode); result = bitwidth - (bitwidth - num0) - (bitwidth - num1); if (result > 0 --- 8953,8960 ---- to be positive, we must allow for an additional bit since negating a negative number can remove one sign bit copy. */ ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); ! num1 = num_sign_bit_copies_with_known (XEXP (x, 1), mode); result = bitwidth - (bitwidth - num0) - (bitwidth - num1); if (result > 0 *************** num_sign_bit_copies (x, mode) *** 8661,8677 **** & ((HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0) return 1; else ! return num_sign_bit_copies (XEXP (x, 0), mode); case UMOD: /* The result must be <= the second operand. */ ! return num_sign_bit_copies (XEXP (x, 1), mode); case DIV: /* Similar to unsigned division, except that we have to worry about the case where the divisor is negative, in which case we have to add 1. */ ! result = num_sign_bit_copies (XEXP (x, 0), mode); if (result > 1 && (bitwidth > HOST_BITS_PER_WIDE_INT || (nonzero_bits (XEXP (x, 1), mode) --- 8977,8993 ---- & ((HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0) return 1; else ! return num_sign_bit_copies_with_known (XEXP (x, 0), mode); case UMOD: /* The result must be <= the second operand. */ ! return num_sign_bit_copies_with_known (XEXP (x, 1), mode); case DIV: /* Similar to unsigned division, except that we have to worry about the case where the divisor is negative, in which case we have to add 1. */ ! result = num_sign_bit_copies_with_known (XEXP (x, 0), mode); if (result > 1 && (bitwidth > HOST_BITS_PER_WIDE_INT || (nonzero_bits (XEXP (x, 1), mode) *************** num_sign_bit_copies (x, mode) *** 8681,8687 **** return result; case MOD: ! result = num_sign_bit_copies (XEXP (x, 1), mode); if (result > 1 && (bitwidth > HOST_BITS_PER_WIDE_INT || (nonzero_bits (XEXP (x, 1), mode) --- 8997,9003 ---- return result; case MOD: ! result = num_sign_bit_copies_with_known (XEXP (x, 1), mode); if (result > 1 && (bitwidth > HOST_BITS_PER_WIDE_INT || (nonzero_bits (XEXP (x, 1), mode) *************** num_sign_bit_copies (x, mode) *** 8693,8699 **** case ASHIFTRT: /* Shifts by a constant add to the number of bits equal to the sign bit. */ ! num0 = num_sign_bit_copies (XEXP (x, 0), mode); if (GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) > 0) num0 = MIN ((int) bitwidth, num0 + INTVAL (XEXP (x, 1))); --- 9009,9015 ---- case ASHIFTRT: /* Shifts by a constant add to the number of bits equal to the sign bit. */ ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); if (GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) > 0) num0 = MIN ((int) bitwidth, num0 + INTVAL (XEXP (x, 1))); *************** num_sign_bit_copies (x, mode) *** 8707,8718 **** || INTVAL (XEXP (x, 1)) >= (int) bitwidth) return 1; ! num0 = num_sign_bit_copies (XEXP (x, 0), mode); return MAX (1, num0 - INTVAL (XEXP (x, 1))); case IF_THEN_ELSE: ! num0 = num_sign_bit_copies (XEXP (x, 1), mode); ! num1 = num_sign_bit_copies (XEXP (x, 2), mode); return MIN (num0, num1); case EQ: case NE: case GE: case GT: case LE: case LT: --- 9023,9034 ---- || INTVAL (XEXP (x, 1)) >= (int) bitwidth) return 1; ! num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); return MAX (1, num0 - INTVAL (XEXP (x, 1))); case IF_THEN_ELSE: ! num0 = num_sign_bit_copies_with_known (XEXP (x, 1), mode); ! num1 = num_sign_bit_copies_with_known (XEXP (x, 2), mode); return MIN (num0, num1); case EQ: case NE: case GE: case GT: case LE: case LT: *************** extended_count (x, mode, unsignedp) *** 8768,8775 **** return (unsignedp ? (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT ! ? (GET_MODE_BITSIZE (mode) - 1 ! - floor_log2 (nonzero_bits (x, mode))) : 0) : num_sign_bit_copies (x, mode) - 1); } --- 9084,9091 ---- return (unsignedp ? (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT ! ? (unsigned int) (GET_MODE_BITSIZE (mode) - 1 ! - floor_log2 (nonzero_bits (x, mode))) : 0) : num_sign_bit_copies (x, mode) - 1); } *************** merge_outer_ops (pop0, pconst0, op1, con *** 8912,8918 **** } /* Simplify a shift of VAROP by COUNT bits. CODE says what kind of shift. ! The result of the shift is RESULT_MODE. X, if non-zero, is an expression that we started with. The shift is normally computed in the widest mode we find in VAROP, as --- 9228,9234 ---- } /* Simplify a shift of VAROP by COUNT bits. CODE says what kind of shift. ! The result of the shift is RESULT_MODE. X, if nonzero, is an expression that we started with. The shift is normally computed in the widest mode we find in VAROP, as *************** simplify_shift_const (x, code, result_mo *** 8979,8985 **** /* Convert ROTATERT to ROTATE. */ if (code == ROTATERT) ! code = ROTATE, count = GET_MODE_BITSIZE (result_mode) - count; /* We need to determine what mode we will do the shift in. If the shift is a right shift or a ROTATE, we must always do it in the mode --- 9295,9308 ---- /* Convert ROTATERT to ROTATE. */ if (code == ROTATERT) ! { ! unsigned int bitsize = GET_MODE_BITSIZE (result_mode);; ! code = ROTATE; ! if (VECTOR_MODE_P (result_mode)) ! count = bitsize / GET_MODE_NUNITS (result_mode) - count; ! else ! count = bitsize - count; ! } /* We need to determine what mode we will do the shift in. If the shift is a right shift or a ROTATE, we must always do it in the mode *************** simplify_shift_const (x, code, result_mo *** 8999,9005 **** multiple operations, each of which are defined, we know what the result is supposed to be. */ ! if (count > GET_MODE_BITSIZE (shift_mode) - 1) { if (code == ASHIFTRT) count = GET_MODE_BITSIZE (shift_mode) - 1; --- 9322,9328 ---- multiple operations, each of which are defined, we know what the result is supposed to be. */ ! if (count > (unsigned int) (GET_MODE_BITSIZE (shift_mode) - 1)) { if (code == ASHIFTRT) count = GET_MODE_BITSIZE (shift_mode) - 1; *************** simplify_shift_const (x, code, result_mo *** 9037,9044 **** /* We simplify the tests below and elsewhere by converting ASHIFTRT to LSHIFTRT if we know the sign bit is clear. ! `make_compound_operation' will convert it to a ASHIFTRT for ! those machines (such as VAX) that don't have a LSHIFTRT. */ if (GET_MODE_BITSIZE (shift_mode) <= HOST_BITS_PER_WIDE_INT && code == ASHIFTRT && ((nonzero_bits (varop, shift_mode) --- 9360,9367 ---- /* We simplify the tests below and elsewhere by converting ASHIFTRT to LSHIFTRT if we know the sign bit is clear. ! `make_compound_operation' will convert it to an ASHIFTRT for ! those machines (such as VAX) that don't have an LSHIFTRT. */ if (GET_MODE_BITSIZE (shift_mode) <= HOST_BITS_PER_WIDE_INT && code == ASHIFTRT && ((nonzero_bits (varop, shift_mode) *************** simplify_shift_const (x, code, result_mo *** 9115,9123 **** if (subreg_lowpart_p (varop) && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (varop))) > GET_MODE_SIZE (GET_MODE (varop))) ! && (((GET_MODE_SIZE (GET_MODE (SUBREG_REG (varop))) ! + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) ! == mode_words)) { varop = SUBREG_REG (varop); if (GET_MODE_SIZE (GET_MODE (varop)) > GET_MODE_SIZE (mode)) --- 9438,9446 ---- if (subreg_lowpart_p (varop) && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (varop))) > GET_MODE_SIZE (GET_MODE (varop))) ! && (unsigned int) ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (varop))) ! + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) ! == mode_words) { varop = SUBREG_REG (varop); if (GET_MODE_SIZE (GET_MODE (varop)) > GET_MODE_SIZE (mode)) *************** simplify_shift_const (x, code, result_mo *** 9158,9164 **** bit of a wider mode may be different from what would be interpreted as the sign bit in a narrower mode, so, if the result is narrower, don't discard the shift. */ ! if (code == LSHIFTRT && count == GET_MODE_BITSIZE (result_mode) - 1 && (GET_MODE_BITSIZE (result_mode) >= GET_MODE_BITSIZE (GET_MODE (varop)))) { --- 9481,9488 ---- bit of a wider mode may be different from what would be interpreted as the sign bit in a narrower mode, so, if the result is narrower, don't discard the shift. */ ! if (code == LSHIFTRT ! && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) && (GET_MODE_BITSIZE (result_mode) >= GET_MODE_BITSIZE (GET_MODE (varop)))) { *************** simplify_shift_const (x, code, result_mo *** 9192,9199 **** (ashiftrt:M1 (ashift:M1 (and:M1 (subreg:M1 FOO 0 C2) C3) C1). This simplifies certain SIGN_EXTEND operations. */ if (code == ASHIFT && first_code == ASHIFTRT ! && (GET_MODE_BITSIZE (result_mode) ! - GET_MODE_BITSIZE (GET_MODE (varop))) == count) { /* C3 has the low-order C1 bits zero. */ --- 9516,9524 ---- (ashiftrt:M1 (ashift:M1 (and:M1 (subreg:M1 FOO 0 C2) C3) C1). This simplifies certain SIGN_EXTEND operations. */ if (code == ASHIFT && first_code == ASHIFTRT ! && count == (unsigned int) ! (GET_MODE_BITSIZE (result_mode) ! - GET_MODE_BITSIZE (GET_MODE (varop)))) { /* C3 has the low-order C1 bits zero. */ *************** simplify_shift_const (x, code, result_mo *** 9211,9217 **** /* If this was (ashiftrt (ashift foo C1) C2) and FOO has more than C1 high-order bits equal to the sign bit, we can convert ! this to either an ASHIFT or a ASHIFTRT depending on the two counts. We cannot do this if VAROP's mode is not SHIFT_MODE. */ --- 9536,9542 ---- /* If this was (ashiftrt (ashift foo C1) C2) and FOO has more than C1 high-order bits equal to the sign bit, we can convert ! this to either an ASHIFT or an ASHIFTRT depending on the two counts. We cannot do this if VAROP's mode is not SHIFT_MODE. */ *************** simplify_shift_const (x, code, result_mo *** 9349,9355 **** && XEXP (XEXP (varop, 0), 1) == constm1_rtx && (STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) && (code == LSHIFTRT || code == ASHIFTRT) ! && count == GET_MODE_BITSIZE (GET_MODE (varop)) - 1 && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; --- 9674,9681 ---- && XEXP (XEXP (varop, 0), 1) == constm1_rtx && (STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) && (code == LSHIFTRT || code == ASHIFTRT) ! && count == (unsigned int) ! (GET_MODE_BITSIZE (GET_MODE (varop)) - 1) && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; *************** simplify_shift_const (x, code, result_mo *** 9404,9410 **** if (code == LSHIFTRT && XEXP (varop, 1) == const0_rtx && GET_MODE (XEXP (varop, 0)) == result_mode ! && count == GET_MODE_BITSIZE (result_mode) - 1 && GET_MODE_BITSIZE (result_mode) <= HOST_BITS_PER_WIDE_INT && ((STORE_FLAG_VALUE & ((HOST_WIDE_INT) 1 --- 9730,9736 ---- if (code == LSHIFTRT && XEXP (varop, 1) == const0_rtx && GET_MODE (XEXP (varop, 0)) == result_mode ! && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) && GET_MODE_BITSIZE (result_mode) <= HOST_BITS_PER_WIDE_INT && ((STORE_FLAG_VALUE & ((HOST_WIDE_INT) 1 *************** simplify_shift_const (x, code, result_mo *** 9423,9429 **** case NEG: /* (lshiftrt (neg A) C) where A is either 0 or 1 and C is one less than the number of bits in the mode is equivalent to A. */ ! if (code == LSHIFTRT && count == GET_MODE_BITSIZE (result_mode) - 1 && nonzero_bits (XEXP (varop, 0), result_mode) == 1) { varop = XEXP (varop, 0); --- 9749,9756 ---- case NEG: /* (lshiftrt (neg A) C) where A is either 0 or 1 and C is one less than the number of bits in the mode is equivalent to A. */ ! if (code == LSHIFTRT ! && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) && nonzero_bits (XEXP (varop, 0), result_mode) == 1) { varop = XEXP (varop, 0); *************** simplify_shift_const (x, code, result_mo *** 9447,9453 **** /* (lshiftrt (plus A -1) C) where A is either 0 or 1 and C is one less than the number of bits in the mode is equivalent to (xor A 1). */ ! if (code == LSHIFTRT && count == GET_MODE_BITSIZE (result_mode) - 1 && XEXP (varop, 1) == constm1_rtx && nonzero_bits (XEXP (varop, 0), result_mode) == 1 && merge_outer_ops (&outer_op, &outer_const, XOR, --- 9774,9781 ---- /* (lshiftrt (plus A -1) C) where A is either 0 or 1 and C is one less than the number of bits in the mode is equivalent to (xor A 1). */ ! if (code == LSHIFTRT ! && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) && XEXP (varop, 1) == constm1_rtx && nonzero_bits (XEXP (varop, 0), result_mode) == 1 && merge_outer_ops (&outer_op, &outer_const, XOR, *************** simplify_shift_const (x, code, result_mo *** 9512,9521 **** if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) && GET_CODE (XEXP (varop, 0)) == ASHIFTRT ! && count == GET_MODE_BITSIZE (GET_MODE (varop)) - 1 && (code == LSHIFTRT || code == ASHIFTRT) && GET_CODE (XEXP (XEXP (varop, 0), 1)) == CONST_INT ! && INTVAL (XEXP (XEXP (varop, 0), 1)) == count && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; --- 9840,9851 ---- if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) && GET_CODE (XEXP (varop, 0)) == ASHIFTRT ! && count == (unsigned int) ! (GET_MODE_BITSIZE (GET_MODE (varop)) - 1) && (code == LSHIFTRT || code == ASHIFTRT) && GET_CODE (XEXP (XEXP (varop, 0), 1)) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (varop, 0), 1)) ! == count && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; *************** simplify_shift_const (x, code, result_mo *** 9579,9585 **** if (x && GET_RTX_CLASS (GET_CODE (x)) == '2' && GET_CODE (XEXP (x, 1)) == CONST_INT ! && INTVAL (XEXP (x, 1)) == count) const_rtx = XEXP (x, 1); else const_rtx = GEN_INT (count); --- 9909,9915 ---- if (x && GET_RTX_CLASS (GET_CODE (x)) == '2' && GET_CODE (XEXP (x, 1)) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) == count) const_rtx = XEXP (x, 1); else const_rtx = GEN_INT (count); *************** simplify_shift_const (x, code, result_mo *** 9611,9617 **** x = simplify_shift_const (x, code, shift_mode, XEXP (x, 0), INTVAL (XEXP (x, 1))); ! /* If we were doing a LSHIFTRT in a wider mode than it was originally, turn off all the bits that the shift would have turned off. */ if (orig_code == LSHIFTRT && result_mode != shift_mode) x = simplify_and_const_int (NULL_RTX, shift_mode, x, --- 9941,9947 ---- x = simplify_shift_const (x, code, shift_mode, XEXP (x, 0), INTVAL (XEXP (x, 1))); ! /* If we were doing an LSHIFTRT in a wider mode than it was originally, turn off all the bits that the shift would have turned off. */ if (orig_code == LSHIFTRT && result_mode != shift_mode) x = simplify_and_const_int (NULL_RTX, shift_mode, x, *************** gen_lowpart_for_combine (mode, x) *** 9797,9810 **** } result = gen_lowpart_common (mode, x); ! #ifdef CLASS_CANNOT_CHANGE_MODE if (result != 0 && GET_CODE (result) == SUBREG && GET_CODE (SUBREG_REG (result)) == REG ! && REGNO (SUBREG_REG (result)) >= FIRST_PSEUDO_REGISTER ! && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (result), ! GET_MODE (SUBREG_REG (result)))) ! REG_CHANGES_MODE (REGNO (SUBREG_REG (result))) = 1; #endif if (result) --- 10127,10140 ---- } result = gen_lowpart_common (mode, x); ! #ifdef CANNOT_CHANGE_MODE_CLASS if (result != 0 && GET_CODE (result) == SUBREG && GET_CODE (SUBREG_REG (result)) == REG ! && REGNO (SUBREG_REG (result)) >= FIRST_PSEUDO_REGISTER) ! bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (result)) ! * MAX_MACHINE_MODE ! + GET_MODE (result)); #endif if (result) *************** gen_lowpart_for_combine (mode, x) *** 9852,9866 **** { int offset = 0; rtx res; ! /* We can't handle VOIDmodes. We can get here when generating vector ! modes since these, unlike integral and floating point modes are not ! handled earlier. */ ! if (GET_MODE (x) == VOIDmode) ! return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); ! ! offset = subreg_lowpart_offset (mode, GET_MODE (x)); ! res = simplify_gen_subreg (mode, x, GET_MODE (x), offset); if (res) return res; return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); --- 10182,10196 ---- { int offset = 0; rtx res; + enum machine_mode sub_mode = GET_MODE (x); ! offset = subreg_lowpart_offset (mode, sub_mode); ! if (sub_mode == VOIDmode) ! { ! sub_mode = int_mode_for_mode (mode); ! x = gen_lowpart_common (sub_mode, x); ! } ! res = simplify_gen_subreg (mode, x, sub_mode, offset); if (res) return res; return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); *************** simplify_comparison (code, pop0, pop1) *** 10119,10125 **** /* Get the constant we are comparing against and turn off all bits not on in our mode. */ ! const_op = trunc_int_for_mode (INTVAL (op1), mode); op1 = GEN_INT (const_op); /* If we are comparing against a constant power of two and the value --- 10449,10457 ---- /* Get the constant we are comparing against and turn off all bits not on in our mode. */ ! const_op = INTVAL (op1); ! if (mode != VOIDmode) ! const_op = trunc_int_for_mode (const_op, mode); op1 = GEN_INT (const_op); /* If we are comparing against a constant power of two and the value *************** simplify_comparison (code, pop0, pop1) *** 10491,10497 **** & ~GET_MODE_MASK (mode)) || (num_sign_bit_copies (XEXP (SUBREG_REG (op0), 0), GET_MODE (SUBREG_REG (op0))) ! > (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) - GET_MODE_BITSIZE (mode))))) { op0 = SUBREG_REG (op0); --- 10823,10830 ---- & ~GET_MODE_MASK (mode)) || (num_sign_bit_copies (XEXP (SUBREG_REG (op0), 0), GET_MODE (SUBREG_REG (op0))) ! > (unsigned int) ! (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) - GET_MODE_BITSIZE (mode))))) { op0 = SUBREG_REG (op0); *************** simplify_comparison (code, pop0, pop1) *** 10575,10581 **** of bits in X minus 1, is one iff X > 0. */ if (sign_bit_comparison_p && GET_CODE (XEXP (op0, 0)) == ASHIFTRT && GET_CODE (XEXP (XEXP (op0, 0), 1)) == CONST_INT ! && INTVAL (XEXP (XEXP (op0, 0), 1)) == mode_width - 1 && rtx_equal_p (XEXP (XEXP (op0, 0), 0), XEXP (op0, 1))) { op0 = XEXP (op0, 1); --- 10908,10915 ---- of bits in X minus 1, is one iff X > 0. */ if (sign_bit_comparison_p && GET_CODE (XEXP (op0, 0)) == ASHIFTRT && GET_CODE (XEXP (XEXP (op0, 0), 1)) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (op0, 0), 1)) ! == mode_width - 1 && rtx_equal_p (XEXP (XEXP (op0, 0), 0), XEXP (op0, 1))) { op0 = XEXP (op0, 1); *************** simplify_comparison (code, pop0, pop1) *** 10644,10650 **** break; case IOR: ! /* The sign bit of (ior (plus X (const_int -1)) X) is non-zero iff X <= 0. */ if (sign_bit_comparison_p && GET_CODE (XEXP (op0, 0)) == PLUS && XEXP (XEXP (op0, 0), 1) == constm1_rtx --- 10978,10984 ---- break; case IOR: ! /* The sign bit of (ior (plus X (const_int -1)) X) is nonzero iff X <= 0. */ if (sign_bit_comparison_p && GET_CODE (XEXP (op0, 0)) == PLUS && XEXP (XEXP (op0, 0), 1) == constm1_rtx *************** simplify_comparison (code, pop0, pop1) *** 10730,10735 **** --- 11064,11072 ---- represents the low part, permute the SUBREG and the AND and try again. */ if (GET_CODE (XEXP (op0, 0)) == SUBREG + /* Require an integral mode, to avoid creating something like + (AND:SF ...). */ + && SCALAR_INT_MODE_P (GET_MODE (SUBREG_REG (XEXP (op0, 0)))) && (0 #ifdef WORD_REGISTER_OPERATIONS || ((mode_width *************** simplify_comparison (code, pop0, pop1) *** 10810,10816 **** unsigned HOST_WIDE_INT temp = const_op & GET_MODE_MASK (mode); temp >>= INTVAL (XEXP (op0, 1)); ! op1 = GEN_INT (trunc_int_for_mode (temp, mode)); op0 = XEXP (op0, 0); continue; } --- 11147,11153 ---- unsigned HOST_WIDE_INT temp = const_op & GET_MODE_MASK (mode); temp >>= INTVAL (XEXP (op0, 1)); ! op1 = gen_int_mode (temp, mode); op0 = XEXP (op0, 0); continue; } *************** simplify_comparison (code, pop0, pop1) *** 10833,10839 **** low-order bit. */ if (const_op == 0 && equality_comparison_p && GET_CODE (XEXP (op0, 1)) == CONST_INT ! && INTVAL (XEXP (op0, 1)) == mode_width - 1) { op0 = simplify_and_const_int (NULL_RTX, mode, XEXP (op0, 0), (HOST_WIDE_INT) 1); --- 11170,11177 ---- low-order bit. */ if (const_op == 0 && equality_comparison_p && GET_CODE (XEXP (op0, 1)) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1)) ! == mode_width - 1) { op0 = simplify_and_const_int (NULL_RTX, mode, XEXP (op0, 0), (HOST_WIDE_INT) 1); *************** simplify_comparison (code, pop0, pop1) *** 10930,10936 **** if (const_op == 0 && (equality_comparison_p || sign_bit_comparison_p) && GET_CODE (XEXP (op0, 1)) == CONST_INT ! && INTVAL (XEXP (op0, 1)) == mode_width - 1) { op0 = XEXP (op0, 0); code = (code == NE || code == GT ? LT : GE); --- 11268,11275 ---- if (const_op == 0 && (equality_comparison_p || sign_bit_comparison_p) && GET_CODE (XEXP (op0, 1)) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1)) ! == mode_width - 1) { op0 = XEXP (op0, 0); code = (code == NE || code == GT ? LT : GE); *************** simplify_comparison (code, pop0, pop1) *** 11031,11039 **** if (zero_extended || ((num_sign_bit_copies (op0, tmode) ! > GET_MODE_BITSIZE (tmode) - GET_MODE_BITSIZE (mode)) && (num_sign_bit_copies (op1, tmode) ! > GET_MODE_BITSIZE (tmode) - GET_MODE_BITSIZE (mode)))) { /* If OP0 is an AND and we don't have an AND in MODE either, make a new AND in the proper mode. */ --- 11370,11380 ---- if (zero_extended || ((num_sign_bit_copies (op0, tmode) ! > (unsigned int) (GET_MODE_BITSIZE (tmode) ! - GET_MODE_BITSIZE (mode))) && (num_sign_bit_copies (op1, tmode) ! > (unsigned int) (GET_MODE_BITSIZE (tmode) ! - GET_MODE_BITSIZE (mode))))) { /* If OP0 is an AND and we don't have an AND in MODE either, make a new AND in the proper mode. */ *************** update_table_tick (x) *** 11143,11149 **** /* Note that we can't have an "E" in values stored; see get_last_value_validate. */ if (fmt[i] == 'e') ! update_table_tick (XEXP (x, i)); } /* Record that REG is set to VALUE in insn INSN. If VALUE is zero, we --- 11484,11528 ---- /* Note that we can't have an "E" in values stored; see get_last_value_validate. */ if (fmt[i] == 'e') ! { ! /* Check for identical subexpressions. If x contains ! identical subexpression we only have to traverse one of ! them. */ ! if (i == 0 ! && (GET_RTX_CLASS (code) == '2' ! || GET_RTX_CLASS (code) == 'c')) ! { ! /* Note that at this point x1 has already been ! processed. */ ! rtx x0 = XEXP (x, 0); ! rtx x1 = XEXP (x, 1); ! ! /* If x0 and x1 are identical then there is no need to ! process x0. */ ! if (x0 == x1) ! break; ! ! /* If x0 is identical to a subexpression of x1 then while ! processing x1, x0 has already been processed. Thus we ! are done with x. */ ! if ((GET_RTX_CLASS (GET_CODE (x1)) == '2' ! || GET_RTX_CLASS (GET_CODE (x1)) == 'c') ! && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1))) ! break; ! ! /* If x1 is identical to a subexpression of x0 then we ! still have to process the rest of x0. */ ! if ((GET_RTX_CLASS (GET_CODE (x0)) == '2' ! || GET_RTX_CLASS (GET_CODE (x0)) == 'c') ! && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1))) ! { ! update_table_tick (XEXP (x0, x1 == XEXP (x0, 0) ? 1 : 0)); ! break; ! } ! } ! ! update_table_tick (XEXP (x, i)); ! } } /* Record that REG is set to VALUE in insn INSN. If VALUE is zero, we *************** record_promoted_value (insn, subreg) *** 11391,11397 **** if (reg_last_set[regno] == insn) { ! if (SUBREG_PROMOTED_UNSIGNED_P (subreg)) reg_last_set_nonzero_bits[regno] &= GET_MODE_MASK (mode); } --- 11770,11776 ---- if (reg_last_set[regno] == insn) { ! if (SUBREG_PROMOTED_UNSIGNED_P (subreg) > 0) reg_last_set_nonzero_bits[regno] &= GET_MODE_MASK (mode); } *************** check_promoted_subreg (insn, x) *** 11441,11447 **** mentioned in *LOC are valid when *LOC was part of a value set when label_tick == TICK. Return 0 if some are not. ! If REPLACE is non-zero, replace the invalid reference with (clobber (const_int 0)) and return 1. This replacement is useful because we often can get useful information about the form of a value (e.g., if it was produced by a shift that always produces -1 or 0) even though --- 11820,11826 ---- mentioned in *LOC are valid when *LOC was part of a value set when label_tick == TICK. Return 0 if some are not. ! If REPLACE is nonzero, replace the invalid reference with (clobber (const_int 0)) and return 1. This replacement is useful because we often can get useful information about the form of a value (e.g., if it was produced by a shift that always produces -1 or 0) even though *************** get_last_value_validate (loc, insn, tick *** 11474,11480 **** || (! (regno >= FIRST_PSEUDO_REGISTER && REG_N_SETS (regno) == 1 && (! REGNO_REG_SET_P ! (BASIC_BLOCK (0)->global_live_at_start, regno))) && reg_last_set_label[j] > tick)) { if (replace) --- 11853,11859 ---- || (! (regno >= FIRST_PSEUDO_REGISTER && REG_N_SETS (regno) == 1 && (! REGNO_REG_SET_P ! (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno))) && reg_last_set_label[j] > tick)) { if (replace) *************** get_last_value_validate (loc, insn, tick *** 11496,11506 **** } for (i = 0; i < len; i++) ! if ((fmt[i] == 'e' ! && get_last_value_validate (&XEXP (x, i), insn, tick, replace) == 0) ! /* Don't bother with these. They shouldn't occur anyway. */ ! || fmt[i] == 'E') ! return 0; /* If we haven't found a reason for it to be invalid, it is valid. */ return 1; --- 11875,11926 ---- } for (i = 0; i < len; i++) ! { ! if (fmt[i] == 'e') ! { ! /* Check for identical subexpressions. If x contains ! identical subexpression we only have to traverse one of ! them. */ ! if (i == 1 ! && (GET_RTX_CLASS (GET_CODE (x)) == '2' ! || GET_RTX_CLASS (GET_CODE (x)) == 'c')) ! { ! /* Note that at this point x0 has already been checked ! and found valid. */ ! rtx x0 = XEXP (x, 0); ! rtx x1 = XEXP (x, 1); ! ! /* If x0 and x1 are identical then x is also valid. */ ! if (x0 == x1) ! return 1; ! ! /* If x1 is identical to a subexpression of x0 then ! while checking x0, x1 has already been checked. Thus ! it is valid and so as x. */ ! if ((GET_RTX_CLASS (GET_CODE (x0)) == '2' ! || GET_RTX_CLASS (GET_CODE (x0)) == 'c') ! && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1))) ! return 1; ! ! /* If x0 is identical to a subexpression of x1 then x is ! valid iff the rest of x1 is valid. */ ! if ((GET_RTX_CLASS (GET_CODE (x1)) == '2' ! || GET_RTX_CLASS (GET_CODE (x1)) == 'c') ! && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1))) ! return ! get_last_value_validate (&XEXP (x1, ! x0 == XEXP (x1, 0) ? 1 : 0), ! insn, tick, replace); ! } ! ! if (get_last_value_validate (&XEXP (x, i), insn, tick, ! replace) == 0) ! return 0; ! } ! /* Don't bother with these. They shouldn't occur anyway. */ ! else if (fmt[i] == 'E') ! return 0; ! } /* If we haven't found a reason for it to be invalid, it is valid. */ return 1; *************** get_last_value (x) *** 11548,11554 **** && (regno < FIRST_PSEUDO_REGISTER || REG_N_SETS (regno) != 1 || (REGNO_REG_SET_P ! (BASIC_BLOCK (0)->global_live_at_start, regno))))) return 0; /* If the value was set in a later insn than the ones we are processing, --- 11968,11974 ---- && (regno < FIRST_PSEUDO_REGISTER || REG_N_SETS (regno) != 1 || (REGNO_REG_SET_P ! (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno))))) return 0; /* If the value was set in a later insn than the ones we are processing, *************** reg_dead_at_p_1 (dest, x, data) *** 11654,11660 **** reg_dead_flag = (GET_CODE (x) == CLOBBER) ? 1 : -1; } ! /* Return non-zero if REG is known to be dead at INSN. We scan backwards from INSN. If we hit a REG_DEAD note or a CLOBBER referencing REG, it is dead. If we hit a SET referencing REG, it is --- 12074,12080 ---- reg_dead_flag = (GET_CODE (x) == CLOBBER) ? 1 : -1; } ! /* Return nonzero if REG is known to be dead at INSN. We scan backwards from INSN. If we hit a REG_DEAD note or a CLOBBER referencing REG, it is dead. If we hit a SET referencing REG, it is *************** reg_dead_at_p (reg, insn) *** 11667,11673 **** rtx reg; rtx insn; { ! int block; unsigned int i; /* Set variables for reg_dead_at_p_1. */ --- 12087,12093 ---- rtx reg; rtx insn; { ! basic_block block; unsigned int i; /* Set variables for reg_dead_at_p_1. */ *************** reg_dead_at_p (reg, insn) *** 11700,11720 **** return 1; } ! /* Get the basic block number that we were in. */ if (insn == 0) ! block = 0; else { ! for (block = 0; block < n_basic_blocks; block++) ! if (insn == BLOCK_HEAD (block)) break; ! if (block == n_basic_blocks) return 0; } for (i = reg_dead_regno; i < reg_dead_endregno; i++) ! if (REGNO_REG_SET_P (BASIC_BLOCK (block)->global_live_at_start, i)) return 0; return 1; --- 12120,12140 ---- return 1; } ! /* Get the basic block that we were in. */ if (insn == 0) ! block = ENTRY_BLOCK_PTR->next_bb; else { ! FOR_EACH_BB (block) ! if (insn == block->head) break; ! if (block == EXIT_BLOCK_PTR) return 0; } for (i = reg_dead_regno; i < reg_dead_endregno; i++) ! if (REGNO_REG_SET_P (block->global_live_at_start, i)) return 0; return 1; *************** mark_used_regs_combine (x) *** 11765,11771 **** { unsigned int endregno, r; ! /* None of this applies to the stack, frame or arg pointers */ if (regno == STACK_POINTER_REGNUM #if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM || regno == HARD_FRAME_POINTER_REGNUM --- 12185,12191 ---- { unsigned int endregno, r; ! /* None of this applies to the stack, frame or arg pointers. */ if (regno == STACK_POINTER_REGNUM #if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM || regno == HARD_FRAME_POINTER_REGNUM *************** move_deaths (x, maybe_kill_insn, from_cu *** 11873,11879 **** rtx where_dead = reg_last_death[regno]; rtx before_dead, after_dead; ! /* Don't move the register if it gets killed in between from and to */ if (maybe_kill_insn && reg_set_p (x, maybe_kill_insn) && ! reg_referenced_p (x, maybe_kill_insn)) return; --- 12293,12299 ---- rtx where_dead = reg_last_death[regno]; rtx before_dead, after_dead; ! /* Don't move the register if it gets killed in between from and to. */ if (maybe_kill_insn && reg_set_p (x, maybe_kill_insn) && ! reg_referenced_p (x, maybe_kill_insn)) return; *************** move_deaths (x, maybe_kill_insn, from_cu *** 11921,11927 **** if (i < regno || i >= ourend) REG_NOTES (where_dead) = gen_rtx_EXPR_LIST (REG_DEAD, ! gen_rtx_REG (reg_raw_mode[i], i), REG_NOTES (where_dead)); } --- 12341,12347 ---- if (i < regno || i >= ourend) REG_NOTES (where_dead) = gen_rtx_EXPR_LIST (REG_DEAD, ! regno_reg_rtx[i], REG_NOTES (where_dead)); } *************** move_deaths (x, maybe_kill_insn, from_cu *** 11948,11954 **** offset = 1; for (i = regno + offset; i < ourend; i++) ! move_deaths (gen_rtx_REG (reg_raw_mode[i], i), maybe_kill_insn, from_cuid, to_insn, &oldnotes); } --- 12368,12374 ---- offset = 1; for (i = regno + offset; i < ourend; i++) ! move_deaths (regno_reg_rtx[i], maybe_kill_insn, from_cuid, to_insn, &oldnotes); } *************** distribute_notes (notes, from_insn, i3, *** 12108,12114 **** { case REG_BR_PROB: case REG_BR_PRED: - case REG_EXEC_COUNT: /* Doesn't matter much where we put this, as long as it's somewhere. It is preferable to keep these notes on branches, which is most likely to be i3. */ --- 12528,12533 ---- *************** distribute_notes (notes, from_insn, i3, *** 12328,12334 **** case REG_DEAD: /* If the register is used as an input in I3, it dies there. ! Similarly for I2, if it is non-zero and adjacent to I3. If the register is not used as an input in either I3 or I2 and it is not one of the registers we were supposed to eliminate, --- 12747,12753 ---- case REG_DEAD: /* If the register is used as an input in I3, it dies there. ! Similarly for I2, if it is nonzero and adjacent to I3. If the register is not used as an input in either I3 or I2 and it is not one of the registers we were supposed to eliminate, *************** distribute_notes (notes, from_insn, i3, *** 12357,12363 **** if (place == 0) { ! basic_block bb = BASIC_BLOCK (this_basic_block); for (tem = PREV_INSN (i3); place == 0; tem = PREV_INSN (tem)) { --- 12776,12782 ---- if (place == 0) { ! basic_block bb = this_basic_block; for (tem = PREV_INSN (i3); place == 0; tem = PREV_INSN (tem)) { *************** distribute_notes (notes, from_insn, i3, *** 12501,12507 **** && REGNO_REG_SET_P (bb->global_live_at_start, REGNO (XEXP (note, 0)))) { ! SET_BIT (refresh_blocks, this_basic_block); need_refresh = 1; } } --- 12920,12926 ---- && REGNO_REG_SET_P (bb->global_live_at_start, REGNO (XEXP (note, 0)))) { ! SET_BIT (refresh_blocks, this_basic_block->index); need_refresh = 1; } } *************** distribute_notes (notes, from_insn, i3, *** 12521,12527 **** after we remove them in delete_noop_moves. */ if (noop_move_p (place)) { ! SET_BIT (refresh_blocks, this_basic_block); need_refresh = 1; } --- 12940,12946 ---- after we remove them in delete_noop_moves. */ if (noop_move_p (place)) { ! SET_BIT (refresh_blocks, this_basic_block->index); need_refresh = 1; } *************** distribute_notes (notes, from_insn, i3, *** 12570,12577 **** for (i = regno; i < endregno; i += HARD_REGNO_NREGS (i, reg_raw_mode[i])) { ! rtx piece = gen_rtx_REG (reg_raw_mode[i], i); ! basic_block bb = BASIC_BLOCK (this_basic_block); if (! dead_or_set_p (place, piece) && ! reg_bitfield_target_p (piece, --- 12989,12996 ---- for (i = regno; i < endregno; i += HARD_REGNO_NREGS (i, reg_raw_mode[i])) { ! rtx piece = regno_reg_rtx[i]; ! basic_block bb = this_basic_block; if (! dead_or_set_p (place, piece) && ! reg_bitfield_target_p (piece, *************** distribute_notes (notes, from_insn, i3, *** 12594,12600 **** if (tem == bb->head) { SET_BIT (refresh_blocks, ! this_basic_block); need_refresh = 1; break; } --- 13013,13019 ---- if (tem == bb->head) { SET_BIT (refresh_blocks, ! this_basic_block->index); need_refresh = 1; break; } *************** distribute_links (links) *** 12699,12706 **** since most links don't point very far away. */ for (insn = NEXT_INSN (XEXP (link, 0)); ! (insn && (this_basic_block == n_basic_blocks - 1 ! || BLOCK_HEAD (this_basic_block + 1) != insn)); insn = NEXT_INSN (insn)) if (INSN_P (insn) && reg_overlap_mentioned_p (reg, PATTERN (insn))) { --- 13118,13125 ---- since most links don't point very far away. */ for (insn = NEXT_INSN (XEXP (link, 0)); ! (insn && (this_basic_block->next_bb == EXIT_BLOCK_PTR ! || this_basic_block->next_bb->head != insn)); insn = NEXT_INSN (insn)) if (INSN_P (insn) && reg_overlap_mentioned_p (reg, PATTERN (insn))) { diff -Nrc3pad gcc-3.2.3/gcc/config/1750a/1750a.c gcc-3.3/gcc/config/1750a/1750a.c *** gcc-3.2.3/gcc/config/1750a/1750a.c 2001-12-20 17:36:33.000000000 +0000 --- gcc-3.3/gcc/config/1750a/1750a.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1014 **** - /* Subroutines for insn-output.c for MIL-STD-1750. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, - 2000 Free Software Foundation, Inc. - Contributed by O.M.Kellogg, DASA (kellogg@space.otn.dasa.de) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define __datalbl - #include "config.h" - #include "system.h" - #include "rtl.h" - #include "tree.h" - #include "function.h" - #include "expr.h" - #define HAVE_cc0 - #include "conditions.h" - #include "real.h" - #include "regs.h" - #include "output.h" - #include "flags.h" - #include "tm_p.h" - #include "target.h" - #include "target-def.h" - - struct datalabel_array datalbl[DATALBL_ARRSIZ]; - int datalbl_ndx = -1; - struct jumplabel_array jmplbl[JMPLBL_ARRSIZ]; - int jmplbl_ndx = -1; - int label_pending = 0, program_counter = 0; - enum section current_section = Normal; - const char *const sectname[4] = - {"Init", "Normal", "Konst", "Static"}; - - static int which_bit PARAMS ((int)); - static bool assemble_integer_1750a PARAMS ((rtx, unsigned int, int)); - static void output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - static void output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); - - /* Initialize the GCC target structure. */ - #undef TARGET_ASM_BYTE_OP - #define TARGET_ASM_BYTE_OP "\tdata\t" - #undef TARGET_ASM_ALIGNED_HI_OP - #define TARGET_ASM_ALIGNED_HI_OP "\tdatal\t" - #undef TARGET_ASM_ALIGNED_SI_OP - #define TARGET_ASM_ALIGNED_SI_OP NULL - #undef TARGET_ASM_INTEGER - #define TARGET_ASM_INTEGER assemble_integer_1750a - - #undef TARGET_ASM_FUNCTION_PROLOGUE - #define TARGET_ASM_FUNCTION_PROLOGUE output_function_prologue - #undef TARGET_ASM_FUNCTION_EPILOGUE - #define TARGET_ASM_FUNCTION_EPILOGUE output_function_epilogue - - struct gcc_target targetm = TARGET_INITIALIZER; - - /* Generate the assembly code for function entry. FILE is a stdio - stream to output the code to. SIZE is an int: how many units of - temporary storage to allocate. - - Refer to the array `regs_ever_live' to determine which registers to - save; `regs_ever_live[I]' is nonzero if register number I is ever - used in the function. This function is responsible for knowing - which registers should not be saved even if used. */ - - static void - output_function_prologue (file, size) - FILE *file; - HOST_WIDE_INT size; - { - if (flag_verbose_asm) - { - int regno, regs_used = 0; - - fprintf (file, "\t; registers used: "); - for (regno = 0; regno < 14; regno++) - if (regs_ever_live[regno]) - { - fprintf (file, " %s", reg_names[regno]); - regs_used++; - } - - if (regs_used == 0) - fprintf (file, "(none)"); - } - - if (size > 0) - { - fprintf (file, "\n\t%s\tr15,%d", - (size <= 16 ? "sisp" : "sim"), size); - if (flag_verbose_asm) - fprintf (file, " ; reserve local-variable space"); - } - - if (frame_pointer_needed) - { - fprintf(file, "\n\tpshm\tr14,r14"); - if (flag_verbose_asm) - fprintf (file, " ; push old frame"); - fprintf (file, "\n\tlr\tr14,r15"); - if (flag_verbose_asm) - fprintf (file, " ; set new frame"); - } - - fprintf (file, "\n"); - program_counter = 0; - jmplbl_ndx = -1; - } - - /* This function generates the assembly code for function exit. - Args are as for output_function_prologue (). - - The function epilogue should not depend on the current stack - pointer! It should use the frame pointer only. This is mandatory - because of alloca; we also take advantage of it to omit stack - adjustments before returning. */ - - static void - output_function_epilogue (file, size) - FILE *file; - HOST_WIDE_INT size; - { - if (frame_pointer_needed) - { - fprintf (file, "\tlr\tr15,r14"); - if (flag_verbose_asm) - fprintf (file, " ; set stack ptr to frame ptr"); - fprintf (file, "\n\tpopm\tr14,r14"); - if (flag_verbose_asm) - fprintf (file, " ; restore previous frame ptr"); - fprintf (file, "\n"); - } - - if (size > 0) - { - fprintf (file, "\t%s\tr15,%d", - (size <= 16 ? "aisp" : "aim"), size); - if (flag_verbose_asm) - fprintf (file, " ; free up local-var space"); - fprintf (file, "\n"); - } - - fprintf (file, "\turs\tr15\n\n"); - } - - void - notice_update_cc (exp) - rtx exp; - { - if (GET_CODE (exp) == SET) - { - enum rtx_code src_code = GET_CODE (SET_SRC (exp)); - /* Jumps do not alter the cc's. */ - if (SET_DEST (exp) == pc_rtx) - return; - /* Moving a register or constant into memory doesn't alter the cc's. */ - if (GET_CODE (SET_DEST (exp)) == MEM - && (src_code == REG || src_code == CONST_INT)) - return; - /* Function calls clobber the cc's. */ - if (src_code == CALL) - { - CC_STATUS_INIT; - return; - } - /* Emulated longword bit-ops leave cc's incorrect */ - if (GET_MODE (SET_DEST (exp)) == HImode ? - src_code == AND || src_code == IOR || - src_code == XOR || src_code == NOT : 0) - { - CC_STATUS_INIT; - return; - } - /* Tests and compares set the cc's in predictable ways. */ - if (SET_DEST (exp) == cc0_rtx) - { - CC_STATUS_INIT; - cc_status.value1 = SET_SRC (exp); - return; - } - /* Anything else will set cc_status. */ - cc_status.flags = CC_NO_OVERFLOW; - cc_status.value1 = SET_SRC (exp); - cc_status.value2 = SET_DEST (exp); - return; - } - else if (GET_CODE (exp) == PARALLEL - && GET_CODE (XVECEXP (exp, 0, 0)) == SET) - { - if (SET_DEST (XVECEXP (exp, 0, 0)) == pc_rtx) - return; - if (SET_DEST (XVECEXP (exp, 0, 0)) == cc0_rtx) - { - CC_STATUS_INIT; - cc_status.value1 = SET_SRC (XVECEXP (exp, 0, 0)); - return; - } - CC_STATUS_INIT; - } - else - { - CC_STATUS_INIT; - } - } - - - rtx - function_arg (cum, mode, type, named) - int cum; - enum machine_mode mode; - tree type; - int named ATTRIBUTE_UNUSED; - { - int size; - - if (MUST_PASS_IN_STACK (mode, type)) - return (rtx) 0; - if (mode == BLKmode) - size = int_size_in_bytes (type); - else - size = GET_MODE_SIZE (mode); - if (cum + size < 12) - return gen_rtx_REG (mode, cum); - else - return (rtx) 0; - } - - - double - get_double (x) - rtx x; - { - union - { - double d; - long i[2]; - } - du; - - du.i[0] = CONST_DOUBLE_LOW (x); - du.i[1] = CONST_DOUBLE_HIGH (x); - return du.d; - } - - char * - float_label (code, value) - int code; - double value; - { - static char label[32]; - char *p; - - label[0] = code; - p = label + 1; - sprintf (p, "%f", value); - while (*p) - { - *p = (*p == '+') ? 'p' : - (*p == '-') ? 'm' : *p; - p++; - } - return xstrdup (label); - } - - - const char * - movcnt_regno_adjust (op) - rtx *op; - { - static char outstr[80]; - int op0r = REGNO (op[0]), op1r = REGNO (op[1]), op2r = REGNO (op[2]); - #define dstreg op0r - #define srcreg op1r - #define cntreg op2r - #define cntreg_1750 (op0r + 1) - - if (cntreg == cntreg_1750) - sprintf (outstr, "mov r%d,r%d", op0r, op1r); - else if (dstreg + 1 == srcreg && cntreg > srcreg) - sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op2r, op1r, op0r, op2r); - else if (dstreg == cntreg + 1) - sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op0r, op2r, op2r, op1r); - else if (dstreg == srcreg + 1) - sprintf (outstr, "xwr r%d,r%d\n\txwr r%d,r%d\n\tmov r%d,r%d", - op0r, op1r, op0r, op2r, op1r, op2r); - else if (cntreg + 1 == srcreg) - sprintf (outstr, "xwr r%d,r%d\n\txwr r%d,r%d\n\tmov r%d,r%d", - op2r, op1r, op0r, op2r, op2r, op0r); - else if (cntreg == srcreg + 1) - sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op0r, op1r, op1r, op0r); - else - sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d\n\txwr r%d,r%d", - op2r, cntreg_1750, op0r, op1r, op2r, cntreg_1750); - return outstr; - } - - const char * - mod_regno_adjust (instr, op) - const char *instr; - rtx *op; - { - static char outstr[40]; - const char *const r = (!strncmp (instr, "dvr", 3) ? "r" : ""); - int modregno_gcc = REGNO (op[3]), modregno_1750 = REGNO (op[0]) + 1; - - if (modregno_gcc == modregno_1750 - || (reg_renumber != NULL - && reg_renumber[modregno_gcc] >= 0 - && reg_renumber[modregno_gcc] == reg_renumber[modregno_1750])) - sprintf (outstr, "%s r%%0,%s%%2", instr, r); - else - sprintf (outstr, "lr r%d,r%d\n\t%s r%%0,%s%%2\n\txwr r%d,r%d", - modregno_gcc, modregno_1750, instr, r, modregno_1750, - modregno_gcc); - return outstr; - } - - - /* Check if op is a valid memory operand for 1750A Load/Store instructions - (memory indirection permitted.) */ - - int - memop_valid (op) - rtx op; - { - static int recurred = 0; - int valid_operand; - - if (GET_MODE (op) != Pmode && GET_MODE (op) != VOIDmode - && GET_MODE (op) != QImode) - return 0; - switch (GET_CODE (op)) - { - case MEM: - if (!recurred && GET_CODE (XEXP (op, 0)) == REG) - return 1; - case MINUS: - case MULT: - case DIV: - return 0; - case PLUS: - recurred = 1; - valid_operand = memop_valid (XEXP (op, 0)); - if (valid_operand) - valid_operand = memop_valid (XEXP (op, 1)); - recurred = 0; - return valid_operand; - case REG: - if (REGNO (op) > 0) - return 1; - return 0; - case CONST: - case CONST_INT: - case SYMBOL_REF: - case SUBREG: - return 1; - default: - printf ("memop_valid: code=%d\n", (int) GET_CODE (op)); - return 1; - } - } - - - /* predicate for the MOV instruction: */ - int - mov_memory_operand (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - return (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == REG); - } - - /* predicate for the STC instruction: */ - int - small_nonneg_const (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - if (GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) <= 15) - return 1; - return 0; - } - - /* predicate for constant zero: */ - int - zero_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return op == CONST0_RTX (mode); - } - - - /* predicate for 1750 `B' addressing mode (Base Register with Offset) - memory operand */ - int - b_mode_operand (op) - rtx op; - { - if (GET_CODE (op) == MEM) - { - rtx inner = XEXP (op, 0); - if (GET_CODE (inner) == REG && REG_OK_FOR_INDEX_P (inner)) - return 1; - if (GET_CODE (inner) == PLUS) - { - rtx plus_op0 = XEXP (inner, 0); - if (GET_CODE (plus_op0) == REG && REG_OK_FOR_INDEX_P (plus_op0)) - { - rtx plus_op1 = XEXP (inner, 1); - if (GET_CODE (plus_op1) == CONST_INT - && INTVAL (plus_op1) >= 0 - && INTVAL (plus_op1) <= 255) - return 1; - } - } - } - return 0; - } - - - /* Decide whether to output a conditional jump as a "Jump Conditional" - or as a "Branch Conditional": */ - - int - find_jmplbl (labelnum) - int labelnum; - { - int i, found = 0; - - for (i = 0; i <= jmplbl_ndx; i++) - if (labelnum == jmplbl[i].num) - { - found = 1; - break; - } - if (found) - return i; - return -1; - } - - const char * - branch_or_jump (condition, targetlabel_number) - const char *condition; - int targetlabel_number; - { - static char buf[30]; - int index; - - if ((index = find_jmplbl (targetlabel_number)) >= 0) - if (program_counter - jmplbl[index].pc < 128) - { - sprintf (buf, "b%s %%l0", condition); - return buf; - } - sprintf (buf, "jc %s,%%l0", condition); - return buf; - } - - - int - unsigned_comparison_operator (insn) - rtx insn; - { - switch (GET_CODE (insn)) - { - case GEU: - case GTU: - case LEU: - case LTU: - return 1; - default: - return 0; - } - } - - int - next_cc_user_is_unsigned (insn) - rtx insn; - { - if ( !(insn = next_cc0_user (insn))) - abort (); - else if (GET_CODE (insn) == JUMP_INSN - && GET_CODE (PATTERN (insn)) == SET - && GET_CODE (SET_SRC (PATTERN (insn))) == IF_THEN_ELSE) - return unsigned_comparison_operator (XEXP (SET_SRC (PATTERN (insn)), 0)); - else if (GET_CODE (insn) == INSN - && GET_CODE (PATTERN (insn)) == SET) - return unsigned_comparison_operator (SET_SRC (PATTERN (insn))); - else - abort (); - } - - - static int addr_inc; - - /* A C compound statement to output to stdio stream STREAM the - assembler syntax for an instruction operand X. X is an RTL - expression. - - CODE is a value that can be used to specify one of several ways - of printing the operand. It is used when identical operands - must be printed differently depending on the context. CODE - comes from the `%' specification that was used to request - printing of the operand. If the specification was just `%DIGIT' - then CODE is 0; if the specification was `%LTR DIGIT' then CODE - is the ASCII code for LTR. - - If X is a register, this macro should print the register's name. - The names can be found in an array `reg_names' whose type is - `char *[]'. `reg_names' is initialized from `REGISTER_NAMES'. - - When the machine description has a specification `%PUNCT' (a `%' - followed by a punctuation character), this macro is called with - a null pointer for X and the punctuation character for CODE. - - The 1750 specific codes are: - 'J' for the negative of a constant - 'Q' for printing addresses in B mode syntax - 'd' for the second register in a pair - 't' for the third register in a triple - 'b' for the bit number (using 1750 test bit convention) - 'B' for the bit number of the 1's complement (for bit clear) - 'w' for int - 16 - */ - - void - print_operand (file, x, letter) - FILE *file; - rtx x; - int letter; - { - switch (GET_CODE (x)) - { - case REG: - if (letter == 'd') - fprintf (file, "%d", REGNO (x) + 1); - else if (letter == 't') - fprintf (file, "%d", REGNO (x) + 2); - else - fprintf (file, "%d", REGNO (x)); - break; - - case SYMBOL_REF: - fprintf (file, "%s", XSTR (x, 0)); - if (letter == 'A') - fprintf (file, "+1"); - break; - - case LABEL_REF: - case CONST: - case MEM: - if (letter == 'Q') - { - rtx inner = XEXP (x, 0); - switch (GET_CODE (inner)) - { - case REG: - fprintf (file, "r%d,0", REGNO (inner)); - break; - case PLUS: - fprintf (file, "r%d,%d", REGNO (XEXP (inner, 0)), - INTVAL (XEXP (inner, 1))); - break; - default: - fprintf (file, "[ill Q code=%d]", GET_CODE (inner)); - } - } - else - { - addr_inc = (letter == 'A' ? 1 : 0); - output_address (XEXP (x, 0)); - } - break; - - case CONST_DOUBLE: - /* { - double value = get_double (x); - char fltstr[32]; - sprintf (fltstr, "%f", value); - - if (letter == 'D' || letter == 'E') - { - int i, found = 0; - for (i = 0; i <= datalbl_ndx; i++) - if (strcmp (fltstr, datalbl[i].value) == 0) - { - found = 1; - break; - } - if (!found) - { - strcpy (datalbl[i = ++datalbl_ndx].value, fltstr); - datalbl[i].name = float_label (letter, value); - datalbl[i].size = (letter == 'E') ? 3 : 2; - check_section (Konst); - fprintf (file, "K%s \tdata%s %s ;p_o\n", datalbl[i].name, - (letter == 'E' ? "ef" : "f"), fltstr); - check_section (Normal); - } - } - else if (letter == 'F' || letter == 'G') - { - int i, found = 0; - for (i = 0; i <= datalbl_ndx; i++) - if (strcmp (fltstr, datalbl[i].value) == 0) - { - found = 1; - break; - } - if (!found) - { - fprintf (stderr, - "float value %f not found upon label reference\n", value); - strcpy (datalbl[i = ++datalbl_ndx].value, fltstr); - datalbl[i].name = float_label (letter, value); - datalbl[i].size = (letter == 'G') ? 3 : 2; - check_section (Konst); - fprintf (file, "K%s \tdata%s %s ;p_o\n", datalbl[i].name, - (letter == 'G' ? "ef" : "f"), fltstr); - check_section (Normal); - } - fprintf (file, "%s ;P_O 'F'", datalbl[i].name); - } - else - fprintf (file, " %s ;P_O cst_dbl ", fltstr); - } - */ - fprintf (file, "%f", get_double (x)); - break; - - case CONST_INT: - if (letter == 'J') - fprintf (file, HOST_WIDE_INT_PRINT_DEC, -INTVAL (x)); - else if (letter == 'b') - fprintf (file, "%d", which_bit (INTVAL (x))); - else if (letter == 'B') - fprintf (file, "%d", which_bit (~INTVAL (x))); - else if (letter == 'w') - fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) - 16); - else - fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); - break; - - case CODE_LABEL: - fprintf (file, "L%d", XINT (x, 3)); - break; - - case CALL: - fprintf (file, "CALL nargs="); - fprintf (file, HOST_PTR_PRINTF, (PTR) XEXP (x, 1)); - fprintf (file, ", func is either '%s' or '%s'", - XSTR (XEXP (XEXP (x, 0), 1), 0), XSTR (XEXP (x, 0), 1)); - break; - - case PLUS: - { - rtx op0 = XEXP (x, 0), op1 = XEXP (x, 1); - int op0code = GET_CODE (op0), op1code = GET_CODE (op1); - if (op1code == CONST_INT) - switch (op0code) - { - case REG: - fprintf (file, "%d,r%d ; p_o_PLUS for REG and CONST_INT", - INTVAL (op1), REGNO (op0)); - break; - case SYMBOL_REF: - fprintf (file, "%d+%s", INTVAL (op1), XSTR (op0, 0)); - break; - case MEM: - fprintf (file, "%d,[mem:", INTVAL (op1)); - output_address (XEXP (op0, 0)); - fprintf (file, "] ;P_O plus"); - break; - default: - fprintf (file, "p_o_PLUS UFO, code=%d, with CONST=%d", - (int) op0code, INTVAL (op1)); - } - else if (op1code == SYMBOL_REF && op0code == REG) - fprintf (file, "%s,r%d ; P_O: (plus reg sym)", - XSTR (op1, 0), REGNO (op0)); - else - fprintf (file, "p_o_+: op0code=%d, op1code=%d", op0code, op1code); - } - break; - - default: - fprintf (file, "p_o_UFO code=%d", GET_CODE (x)); - } - - addr_inc = 0; - } - - void - print_operand_address (file, addr) - FILE *file; - rtx addr; - { - switch (GET_CODE (addr)) - { - case REG: - fprintf (file, "%d,r%d ; P_O_A", addr_inc, REGNO (addr)); - break; - case PLUS: - { - register rtx x = XEXP (addr, 0), y = XEXP (addr, 1); - switch (GET_CODE (x)) - { - case REG: - switch (GET_CODE (y)) - { - case CONST: - output_address (XEXP (y, 0)); - fprintf (file, ",r%d ;P_O_A reg + const expr", REGNO (x)); - break; - case CONST_INT: - fprintf (file, "%d,r%d", INTVAL (y) + addr_inc, REGNO (x)); - break; - case SYMBOL_REF: - fprintf (file, "%s", XSTR (y, 0)); - if (addr_inc) - fprintf (file, "+%d", addr_inc); - fprintf (file, ",r%d ; P_O_A reg + sym", REGNO (x)); - break; - case LABEL_REF: - output_address (XEXP (y, 0)); - fprintf (file, ",r%d ; P_O_A reg + label", REGNO (x)); - break; - default: - fprintf (file, "[P_O_A reg%d+UFO code=%d]", - REGNO (x), GET_CODE (y)); - } - break; - case LABEL_REF: - output_address (XEXP (x, 0)); - break; - case SYMBOL_REF: - switch (GET_CODE (y)) - { - case CONST_INT: - fprintf (file, "%d+%s", INTVAL (y) + addr_inc, XSTR (x, 0)); - break; - case REG: - fprintf (file, "%s,r%d ;P_O_A sym + reg", - XSTR (x, 0), REGNO (y)); - break; - default: - fprintf (file, "P_O_A sym/lab+UFO[sym=%s,code(y)=%d]", - XSTR (x, 0), GET_CODE (y)); - } - break; - case CONST: - output_address (XEXP (x, 0)); - if (GET_CODE (y) == REG) - fprintf (file, ",r%d ;P_O_A const + reg", REGNO (x)); - else - fprintf (file, "P_O_A const+UFO code(y)=%d]", GET_CODE (y)); - break; - case MEM: - output_address (y); - fprintf (file, ",[mem:"); - output_address (XEXP (x, 0)); - fprintf (file, "] ;P_O_A plus"); - break; - default: - fprintf (file, "P_O_A plus op1_UFO[code1=%d,code2=%d]", - GET_CODE (x), GET_CODE (y)); - } - } - break; - case CONST_INT: - if (INTVAL (addr) < 0x10000 && INTVAL (addr) >= -0x10000) - fprintf (file, "%d ; p_o_a const addr?!", INTVAL (addr)); - else - { - fprintf (file, "[p_o_a=ILLEGAL_CONST]"); - output_addr_const (file, addr); - } - break; - case LABEL_REF: - case SYMBOL_REF: - fprintf (file, "%s", XSTR (addr, 0)); - if (addr_inc) - fprintf (file, "+%d", addr_inc); - break; - case MEM: - fprintf (file, "[memUFO:"); - output_address (XEXP (addr, 0)); - fprintf (file, "]"); - break; - case CONST: - output_address (XEXP (addr, 0)); - fprintf (file, " ;P_O_A const"); - break; - case CODE_LABEL: - fprintf (file, "L%d", XINT (addr, 3)); - break; - default: - fprintf (file, " p_o_a UFO, code=%d val=0x%x", - (int) GET_CODE (addr), INTVAL (addr)); - break; - } - addr_inc = 0; - } - - /* Target hook for assembling integer objects. The 1750a version needs to - keep track of how many bytes have been written. */ - - static bool - assemble_integer_1750a (x, size, aligned_p) - rtx x; - unsigned int size; - int aligned_p; - { - if (default_assemble_integer (x, size, aligned_p)) - { - if (label_pending) - label_pending = 0; - datalbl[datalbl_ndx].size += size; - return true; - } - return false; - } - - - /* - * Return non zero if the LS 16 bits of the given value has just one bit set, - * otherwise return zero. Note this function may be used to detect one - * bit clear by inverting the param. - */ - int - one_bit_set_p (x) - int x; - { - x &= 0xffff; - return x && (x & (x - 1)) == 0; - } - - - /* - * Return the number of the least significant bit set, using the same - * convention for bit numbering as in the MIL-STD-1750 sb instruction. - */ - static int - which_bit (x) - int x; - { - int b = 15; - - while (b > 0 && (x & 1) == 0) - { - b--; - x >>= 1; - } - - return b; - } - - - /* Convert a REAL_VALUE_TYPE to the target float format: - - MSB LSB MSB LSB - ------------------------------------------------------ - |S| Mantissa | Exponent | - ------------------------------------------------------ - 0 1 23 24 31 - - */ - - long - real_value_to_target_single(in) - REAL_VALUE_TYPE in; - { - union { - double d; - struct { - #if HOST_WORDS_BIG_ENDIAN - unsigned int negative:1; - unsigned int exponent:11; - unsigned int mantissa0:20; - unsigned int mantissa1:32; - #else - unsigned int mantissa1:32; - unsigned int mantissa0:20; - unsigned int exponent:11; - unsigned int negative:1; - #endif - } s; - } ieee; - - unsigned int mant; - int exp; - - if (HOST_FLOAT_FORMAT != IEEE_FLOAT_FORMAT) - abort (); - - ieee.d = in; - - /* Don't bother with NaN, Inf, 0 special cases, since they'll be handled - by the over/underflow code below. */ - exp = ieee.s.exponent - 0x3ff; - mant = 1 << 23 | ieee.s.mantissa0 << 3 | ieee.s.mantissa1 >> 29; - - /* The sign is actually part of the mantessa. Since we're comming from - IEEE we know that either bit 23 is set or we have a zero. */ - if (! ieee.s.negative) - { - mant >>= 1; - exp += 1; - } - - /* Check for overflow. Crop to FLT_MAX. */ - if (exp > 127) - { - exp = 127; - mant = (ieee.s.negative ? 0xffffff : 0x7fffff); - } - /* Underflow to zero. */ - else if (exp < -128) - { - exp = 0; - mant = 0; - } - - return mant << 8 | (exp & 0xff); - } - - /* Convert a REAL_VALUE_TYPE to the target 1750a extended float format: - - ---------------------------------------------------- - | | Mantissa | | Mantissa | - |S| MS |Exponent| LS | - ---------------------------------------------------- - 0 1 23 24 31 32 47 - - */ - - void - real_value_to_target_double(in, out) - REAL_VALUE_TYPE in; - long out[]; - { - union { - double d; - struct { - #if HOST_WORDS_BIG_ENDIAN - unsigned int negative:1; - unsigned int exponent:11; - unsigned int mantissa0:20; - unsigned int mantissa1:32; - #else - unsigned int mantissa1:32; - unsigned int mantissa0:20; - unsigned int exponent:11; - unsigned int negative:1; - #endif - } s; - } ieee; - - unsigned int mant_h24, mant_l16; - int exp; - - if (HOST_FLOAT_FORMAT != IEEE_FLOAT_FORMAT) - abort (); - - ieee.d = in; - - /* Don't bother with NaN, Inf, 0 special cases, since they'll be handled - by the over/underflow code below. */ - exp = ieee.s.exponent - 0x3ff; - mant_h24 = 1 << 23 | ieee.s.mantissa0 << 3 | ieee.s.mantissa1 >> 29; - mant_l16 = (ieee.s.mantissa1 >> 13) & 0xffff; - - /* The sign is actually part of the mantessa. Since we're comming from - IEEE we know that either bit 23 is set or we have a zero. */ - if (! ieee.s.negative) - { - mant_l16 = mant_l16 >> 1 | (mant_h24 & 1) << 15; - mant_h24 >>= 1; - exp += 1; - } - - /* Check for overflow. Crop to DBL_MAX. */ - if (exp > 127) - { - exp = 127; - mant_h24 = (ieee.s.negative ? 0xffffff : 0x7fffff); - mant_l16 = 0xffff; - } - /* Underflow to zero. */ - else if (exp < -128) - { - exp = 0; - mant_h24 = 0; - mant_l16 = 0; - } - - out[0] = mant_h24 << 8 | (exp & 0xff); - out[1] = mant_l16; - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/1750a/1750a.h gcc-3.3/gcc/config/1750a/1750a.h *** gcc-3.2.3/gcc/config/1750a/1750a.h 2002-05-21 23:44:47.000000000 +0000 --- gcc-3.3/gcc/config/1750a/1750a.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1156 **** - /* Definitions of target machine for GNU compiler. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by O.M.Kellogg, DASA (oliver.kellogg@space.otn.dasa.de) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* Names to predefine in the preprocessor for this target machine. */ - - /* See tm-sun3.h, tm-sun2.h, tm-isi68.h for different CPP_PREDEFINES. */ - #define CPP_PREDEFINES "" - - /* Print subsidiary information on the compiler version in use. */ - #ifdef IEEE - #define TARGET_VERSION fprintf (stderr, " (1750A, IEEE syntax)"); - #else - #define TARGET_VERSION fprintf (stderr, " (MIL-STD-1750A)"); - #endif - - /* Run-time compilation parameters selecting different hardware subsets. */ - - #define TARGET_SWITCHES \ - { {"vaxc-alignment", 2, N_("Use VAX-C alignment")}, \ - { "", TARGET_DEFAULT, NULL}} - - /* Default target_flags if no switches specified. */ - - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT 1 - #endif - - /*****************************************************************************/ - - /* SPECIAL ADDITION FOR MIL-STD-1750A by O.M.Kellogg, 15-Apr-1993 */ - /* See file aux-output.c for the actual data instances. */ - struct datalabel_array { - char *name; - char value[14]; - int size; - }; - struct jumplabel_array { - int pc; - int num; - }; - enum section { Init, Normal, Konst, Static }; - #define DATALBL_ARRSIZ 256 - #define JMPLBL_ARRSIZ 256 - #ifndef __datalbl - extern struct datalabel_array datalbl[DATALBL_ARRSIZ]; - extern struct jumplabel_array jmplbl[JMPLBL_ARRSIZ]; - extern int datalbl_ndx, jmplbl_ndx, label_pending, program_counter; - extern enum section current_section; - extern const char *const sectname[4]; - #endif - /*--------------------------------------------------------------------*/ - - /* target machine storage layout */ - - /* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. - Though 1750 actually counts bits in big-endian fashion, the sign bit - is still the most significant bit, which is leftmost. Therefore leaving - this little-endian. Adjust short before assembler output when needed: - e.g. in QImode, a GCC bit n is a 1750 bit (15-n). */ - #define BITS_BIG_ENDIAN 0 - - /* Define this if most significant byte of a word is the lowest numbered. */ - /* For 1750 we can decide arbitrarily - since there are no machine instructions for them. */ - #define BYTES_BIG_ENDIAN 0 - - /* Define this if most significant word of a multiword value is lowest - numbered. - True for 1750. */ - #define WORDS_BIG_ENDIAN 1 - - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 16 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 16 - - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD 1 - - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 16 - - #define PTRDIFF_TYPE "int" - - /* Type to use for `size_t'. If undefined, uses `long unsigned int'. */ - #define SIZE_TYPE "int" - - /* 1750a preliminary. Ought to properly define the format in real.c. */ - #define TARGET_FLOAT_FORMAT UNKNOWN_FLOAT_FORMAT - - /* Allocation boundary (in *bits*) for storing pointers in memory. */ - #define POINTER_BOUNDARY 16 - - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - /* 1750: should have had to make this 32 when BITS_PER_WORD is 32. */ - #define PARM_BOUNDARY 16 - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #define STACK_BOUNDARY 16 - - /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 16 - - /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 16 - - /* No data type wants to be aligned rounder than this. */ - #define BIGGEST_ALIGNMENT 16 - - /* Define this to 1 if move instructions will actually fail to work - when given unaligned data. */ - #define STRICT_ALIGNMENT 0 - - /* Define number of bits in most basic integer type. - (If undefined, default is BITS_PER_WORD). - #define INT_TYPE_SIZE 16 */ - - /* Define number of bits in short integer type. - (If undefined, default is half of BITS_PER_WORD). */ - #define SHORT_TYPE_SIZE 16 - - /* Define number of bits in long integer type. - (If undefined, default is BITS_PER_WORD). */ - #define LONG_TYPE_SIZE 32 - - /* Define number of bits in long long integer type. - (If undefined, default is twice BITS_PER_WORD). */ - /* 1750 PRELIMINARY : no processor support for `long long', therefore - need to check out the long-long opencodings ! */ - #define LONG_LONG_TYPE_SIZE 64 - - /* Define number of bits in char type. - (If undefined, default is one fourth of BITS_PER_WORD). */ - #define CHAR_TYPE_SIZE 16 - - /* Define number of bits in float type. - (If undefined, default is BITS_PER_WORD). */ - #define FLOAT_TYPE_SIZE 32 - - /* Define number of bits in double type. - (If undefined, default is twice BITS_PER_WORD). */ - #define DOUBLE_TYPE_SIZE 48 - - /*****************************************************************************/ - - /* Standard register usage. */ - - /* Number of actual hardware registers. - The hardware registers are assigned numbers for the compiler - from 0 to just below FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. */ - #define FIRST_PSEUDO_REGISTER 16 - - /* 1 for registers that have pervasive standard uses - and are not available for the register allocator. - R15 is the 1750A stack pointer. R14 is the frame pointer. */ - - #define FIXED_REGISTERS \ - { 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 1, 1 } - - /* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. - 1750: return value in R0 foll. (depending on size of retval). - Should be possible to refine this (how many regs are actually used) */ - - #define CALL_USED_REGISTERS \ - { 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1 } - - /* Order in which to allocate registers. Each register must be - listed once, even those in FIXED_REGISTERS. List frame pointer - late and fixed registers last. Note that, in general, we prefer - registers listed in CALL_USED_REGISTERS, keeping the others - available for storage of persistent values. */ - - /* #define REG_ALLOC_ORDER \ - { 2, 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } - */ - - /* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. - All 1750 registers are one word long. */ - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */ - #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 - - /* Value is 1 if it is a good idea to tie two pseudo registers - when one has mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. */ - #define MODES_TIEABLE_P(MODE1, MODE2) 1 - - /* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - - /* 1750A pc isn't overloaded on a register. */ - /* #define PC_REGNUM */ - - /* Register to use for pushing function arguments. */ - #define STACK_POINTER_REGNUM 15 - - /* Base register for access to local variables of the function. */ - #define FRAME_POINTER_REGNUM 14 - - /* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. */ - #define FRAME_POINTER_REQUIRED 0 - - /* Base register for access to arguments of the function. */ - #define ARG_POINTER_REGNUM 14 - - /* Define this if successive args to a function occupy decreasing addresses - on the stack. - #define ARGS_GROW_DOWNWARD - */ - - /* Register in which static-chain is passed to a function. */ - #define STATIC_CHAIN_REGNUM 13 - - /* Place in which caller passes the structure value address. - 0 means push the value on the stack like an argument. - #define STRUCT_VALUE 0 - */ - - /* Register in which address to store a structure value - arrives in the function. - #define STRUCT_VALUE_INCOMING 0 - */ - - /* Register in which address to store a structure value - is passed to a function. */ - #define STRUCT_VALUE_REGNUM 12 - - /* Define this to be 1 if all structure return values must be in memory. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 - - /*****************************************************************************/ - - /* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. */ - - /* 1750 note: The names (BASE_REGS/INDEX_REGS) are used in their *gcc sense* - (i.e. *opposite* to the MIL-STD-1750A defined meanings). This means that - R1..R15 are called "base" regs and R12..R15 are "index" regs. - Index reg mode (in the gcc sense) is not yet implemented (these are the - 1750 "Base with Index Reg" instructions, LBX etc. See 1750.md) - - Here's an example to drive this point home: in "LBX B12,R5" - B12 shall be called the "index" reg and R5 shall be the "base" reg. - This naming inversion is due to the GCC defined capabilities of - "Base" vs. "Index" regs. */ - - enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLASSES }; - - #define N_REG_CLASSES (int) LIM_REG_CLASSES - - /* Since GENERAL_REGS is the same class as ALL_REGS, - don't give it a different class number; just make it an alias. */ - #define GENERAL_REGS ALL_REGS - - /* Give names of register classes as strings for dump file. */ - - #define REG_CLASS_NAMES \ - { "NO_REGS", "R2", "R0_1", "INDEX_REGS", "BASE_REGS", "ALL_REGS" } - - /* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. - 1750 "index" (remember, in the *GCC* sense!) regs are R12 through R15. - The only 1750 register not usable as BASE_REG is R0. */ - - #define REG_CLASS_CONTENTS { {0}, {0x0004}, {0x0003}, {0xf000}, {0xfffe}, {0xffff} } - - /* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - #define REGNO_REG_CLASS(REGNO) ((REGNO) == 2 ? R2 : (REGNO) == 0 ? R0_1 : \ - (REGNO) >= 12 ? INDEX_REGS : (REGNO) > 0 ? BASE_REGS : ALL_REGS) - - /* The class value for index registers, and the one for base regs. */ - - #define BASE_REG_CLASS BASE_REGS - #define INDEX_REG_CLASS INDEX_REGS - - /* Get reg_class from a letter such as appears in the machine description. - For the 1750, we have 'z' for R0_1, 't' for R2, 'b' for gcc Base regs - and 'x' for gcc Index regs. */ - - #define REG_CLASS_FROM_LETTER(C) ((C) == 't' ? R2 : \ - (C) == 'z' ? R0_1 : \ - (C) == 'b' ? BASE_REGS : \ - (C) == 'x' ? INDEX_REGS : NO_REGS) - - /* The letters I,J,K,.. to P in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. - - For the 1750A, - `I' is used for ISP mode instructions, - `J' is used for ISN mode instructions, - `K' is used for the STC instruction's constant range, - `L' is used for unsigned 8-bit address displacements in instructions - of addressing mode "Base Relative", - `M' is for IM mode instructions et al., - `O' is a synonym for (const_int 0). */ - - #define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'I' ? (VALUE) > 0 && (VALUE) <= 16 : \ - (C) == 'J' ? (VALUE) < 0 && (VALUE) >= -16 : \ - (C) == 'K' ? (VALUE) >= 0 && (VALUE) <= 15 : \ - (C) == 'L' ? (VALUE) >= 0 && (VALUE) <= 0xFF : \ - (C) == 'M' ? (VALUE) >= -0x8000 && (VALUE) <= 0x7FFF : \ - (C) == 'O' ? (VALUE) == 0 : 0) - - /* Similar, but for floating constants, and defining letter 'G'. - Here VALUE is the CONST_DOUBLE rtx itself. */ - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'G' ? ((VALUE) == CONST0_RTX (HFmode) \ - || (VALUE) == CONST0_RTX (TQFmode)) : 0) - - /* Optional extra constraints for this machine. - - For the 1750, `Q' means that this is a memory operand consisting - of the sum of an Index Register (in the GCC sense, i.e. R12..R15) - and a constant in the range 0..255. This constraint is used for - the Base Register with Offset address mode instructions (LB,STB,AB,..) */ - - #define EXTRA_CONSTRAINT(OP, C) \ - ((C) == 'Q' && b_mode_operand (OP)) - - /* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. */ - - #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS - - /* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. - On the 1750A, this is the size of MODE in words, - since class doesn't make any difference. */ - #define CLASS_MAX_NREGS(CLASS,MODE) GET_MODE_SIZE(MODE) - - /*****************************************************************************/ - - /* Stack layout; function entry, exit and calling. */ - - /* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ - #define STACK_GROWS_DOWNWARD 1 - - /* Define this if the nominal address of the stack frame - is at the high-address end of the local variables; - goes at a more negative offset in the frame. - #define FRAME_GROWS_DOWNWARD - */ - - /* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. - */ - #define STARTING_FRAME_OFFSET 1 - - /* This is the default anyway: - #define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) FRAMEADDR - */ - - /* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. - 1750 note: what GCC calls a "byte" is really a 16-bit word, - because BITS_PER_UNIT is 16. */ - - #define PUSH_ROUNDING(BYTES) (BYTES) - - /* Define this macro if functions should assume that stack space has - been allocated for arguments even when their values are passed in - registers. - Size, in bytes, of the area reserved for arguments passed in - registers for the function represented by FNDECL. - #define REG_PARM_STACK_SPACE(FNDECL) 14 */ - - /* Define this if it is the responsibility of the caller to allocate - the area reserved for arguments passed in registers. - #define OUTGOING_REG_PARM_STACK_SPACE */ - - /* Offset of first parameter from the argument pointer register value. - 1750 note: - Parameters appear in reversed order on the frame (so when they are - popped, they come off in the normal left-to-right order.) - Computed as follows: - one word for the caller's (PC+1) (i.e. the return address) - plus total size of called function's "auto" variables - plus one word for the caller's frame pointer (i.e. the old FP) */ - - #define FIRST_PARM_OFFSET(FNDECL) \ - (1 + get_frame_size() + 1) - - /* Value is 1 if returning from a function call automatically - pops the arguments described by the number-of-args field in the call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - */ - - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 - - /* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), 0) - - /* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - /* 1750 note: no libcalls yet */ - - #define LIBCALL_VALUE(MODE) printf("LIBCALL_VALUE called!\n"), \ - gen_rtx_REG (MODE, 0) - - /* 1 if N is a possible register number for a function value. */ - - #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0) - - /* 1 if the tree TYPE should be returned in memory instead of in regs. - #define RETURN_IN_MEMORY(TYPE) \ - (int_size_in_bytes(TYPE) > 12) - */ - - /* Define this if PCC uses the nonreentrant convention for returning - structure and union values. - #define PCC_STATIC_STRUCT_RETURN */ - - /* 1 if N is a possible register number for function argument passing. */ - - #define FUNCTION_ARG_REGNO_P(N) ((N) < 12) - - /*****************************************************************************/ - - /* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - For 1750A, this is a single integer, which is a number of words - of arguments scanned so far. */ - - #define CUMULATIVE_ARGS int - - /* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. - - For 1750A, the offset starts at 0. */ - - #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) ((CUM) = 0) - - /* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be available.) - - 1750 note: "int_size_in_bytes()" returns a unit relative to - BITS_PER_UNIT, so in our case not bytes, but 16-bit words. */ - - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - ((CUM) += (MODE) == BLKmode ? int_size_in_bytes(TYPE) : GET_MODE_SIZE(MODE)) - - /* Define where to put the arguments to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). */ - - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) function_arg (CUM,MODE,TYPE,NAMED) - - /* Define the following macro if function calls on the target machine - do not preserve any registers; in other words, if `CALL_USED_REGISTERS' - has 1 for all registers. This macro enables `-fcaller-saves' by - default. Eventually that option will be enabled by default on all - machines and both the option and this macro will be eliminated. */ - - #define DEFAULT_CALLER_SAVES - - /************* 1750: PROFILER HANDLING NOT YET DONE !!!!!!! *************/ - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "; got into FUNCTION_PROFILER with label # %d\n", (LABELNO)) - - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - - #define EXIT_IGNORE_STACK 0 - - /* If the memory address ADDR is relative to the frame pointer, - correct it to be relative to the stack pointer instead. - This is for when we don't use a frame pointer. - ADDR should be a variable name. - - #define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH) - */ - - /* Store in the variable DEPTH the initial difference between the - frame pointer reg contents and the stack pointer reg contents, - as of the start of the function body. This depends on the layout - of the fixed parts of the stack frame and on how registers are saved. - #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) DEPTH = 0 - */ - - #define ELIMINABLE_REGS { \ - { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ - { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }, \ - { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM } } - - #define CAN_ELIMINATE(FROM, TO) 1 - - #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - OFFSET = (TO == STACK_POINTER_REGNUM) ? -1 : 0 - - - /* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. */ - - #define TRAMPOLINE_TEMPLATE(FILE) fprintf(FILE,"TRAMPOLINE_TEMPLATE called\n") - - /* Length in units of the trampoline for entering a nested function. */ - - #define TRAMPOLINE_SIZE 2 - - /* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. */ - - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) printf("INITIALIZE_TRAMPO called\n") - /* { \ - emit_move_insn (gen_rtx_MEM (QImode, plus_constant (TRAMP, 1)), CXT); \ - emit_move_insn (gen_rtx_MEM (QImode, plus_constant (TRAMP, 6)), FNADDR); \ - } */ - - - /*****************************************************************************/ - - /* Addressing modes, and classification of registers for them. */ - - /* 1750 doesn't have a lot of auto-incr./decr. - just for the stack ptr. */ - - /* #define HAVE_POST_INCREMENT 0 just for R15 (stack pointer) */ - /* #define HAVE_POST_DECREMENT 0 */ - /* #define HAVE_PRE_DECREMENT 0 just for R15 (stack pointer) */ - /* #define HAVE_PRE_INCREMENT 0 */ - - /* Macros to check register numbers against specific register classes. */ - - /* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. - 1750 note: The words BASE and INDEX are used in their GCC senses: - The "Index Registers", R12 through R15, are used in the 1750 - instructions LB,STB,AB,SBB,MB,DB,LBX,STBX,... - */ - - #define REGNO_OK_FOR_BASE_P(REGNO) \ - (((REGNO) > 0 && (REGNO) <= 15) || \ - (reg_renumber[REGNO] > 0 && reg_renumber[REGNO] <= 15)) - #define REGNO_OK_FOR_INDEX_P(REGNO) \ - (((REGNO) >= 12 && (REGNO) <= 15) || \ - (reg_renumber[REGNO] >= 12 && reg_renumber[REGNO] <= 15)) - - /* Now macros that check whether X is a register and also, - strictly, whether it is in a specified class. */ - - /* 1 if X is an address register */ - - #define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X))) - - /* Maximum number of registers that can appear in a valid memory address. */ - #define MAX_REGS_PER_ADDRESS 1 - - /* Recognize any constant value that is a valid address. */ - - #define CONSTANT_ADDRESS_P(X) CONSTANT_P(X) - - /* Nonzero if the constant value X is a legitimate general operand. - It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ - - #define LEGITIMATE_CONSTANT_P(X) 1 - - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - - #ifdef REG_OK_STRICT - - /* Nonzero if X is a hard reg that can be used as an index. */ - #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P(REGNO(X)) - /* Nonzero if X is a hard reg that can be used as a base reg. */ - #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P(REGNO(X)) - - #else - - /* Nonzero if X is a hard reg that can be used as an index - or if it is a pseudo reg. */ - #define REG_OK_FOR_INDEX_P(X) (REGNO (X) >= 12) - /* Nonzero if X is a hard reg that can be used as a base reg - or if it is a pseudo reg. */ - #define REG_OK_FOR_BASE_P(X) (REGNO (X) > 0) - - #endif - - - /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. - The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS. - - 1750 note: Currently we don't implement address expressions that use - GCC "Index"-class regs. To be expanded to handle the 1750 "Base with Index" - instructions (see also MAX_REGS_PER_ADDRESS and others). */ - - #define GO_IF_BASED_ADDRESS(X, ADDR) { \ - if ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P(X))) \ - goto ADDR; \ - if (GET_CODE (X) == PLUS) \ - { register rtx x0 = XEXP(X,0), x1 = XEXP(X,1); \ - if ((REG_P(x0) && REG_OK_FOR_BASE_P(x0) && CONSTANT_ADDRESS_P(x1)) \ - || (REG_P(x1) && REG_OK_FOR_BASE_P(x1) && CONSTANT_ADDRESS_P(x0))) \ - goto ADDR; } } - - #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) { \ - if (CONSTANT_ADDRESS_P(X)) goto ADDR; \ - GO_IF_BASED_ADDRESS(X,ADDR) } - - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. - On the 68000, only predecrement and postincrement address depend thus - (the amount of decrement or increment being the length of the operand). */ - /* 1750: not used. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) - - /*****************************************************************************/ - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE QImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - Do not define this if the table should contain absolute addresses. */ - /* #define CASE_VECTOR_PC_RELATIVE 1 */ - - /* Define this as 1 if `char' should by default be signed; else as 0. */ - #define DEFAULT_SIGNED_CHAR 1 - - /* Max number of bytes we can move from memory to memory - in one reasonably fast instruction. */ - #define MOVE_MAX 65536 - - /* If a memory-to-memory move would take MOVE_RATIO or more simple - move-instruction pairs, we will do a movstr or libcall instead. */ - #define MOVE_RATIO 4 - - /* Nonzero if access to memory by bytes is slow and undesirable. */ - #define SLOW_BYTE_ACCESS 0 - - /* Define if shifts truncate the shift count - which implies one can omit a sign-extension or zero-extension - of a shift count. */ - /* #define SHIFT_COUNT_TRUNCATED 1 */ - - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ - #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* We assume that the store-condition-codes instructions store 0 for false - and some other value for true. This is the value stored for true. */ - - #define STORE_FLAG_VALUE 1 - - /* When a prototype says `char' or `short', really pass an `int'. - 1750: for now, `char' is 16 bits wide anyway. */ - #define PROMOTE_PROTOTYPES 0 - - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ - #define Pmode QImode - - /* A function address in a call instruction - is a 16-bit address (for indexing purposes) */ - #define FUNCTION_MODE QImode - - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - - #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST_INT: \ - return (INTVAL(RTX) >= -16 && INTVAL(RTX) <= 16) ? 1 : 3; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 3; \ - case CONST_DOUBLE: \ - return 4; - - #define ADDRESS_COST(ADDRESS) (memop_valid (ADDRESS) ? 3 : 10) - - #define REGISTER_MOVE_COST(MODE,FROM,TO) 2 - - #define MEMORY_MOVE_COST(M,C,I) 4 - - /* Tell final.c how to eliminate redundant test instructions. */ - - /* Here we define machine-dependent flags and fields in cc_status - (see `conditions.h'). */ - /* MIL-STD-1750: none -- just has the garden variety C,P,Z,N flags. */ - - /* Store in cc_status the expressions - that the condition codes will describe - after execution of an instruction whose pattern is EXP. - Do not alter them if the instruction would not alter the cc's. - 1750: See file out-1750a.c for notice_update_cc(). */ - - #define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP) - - /**********************************************/ - /* Produce debugging info in the DWARF format - #define DWARF_DEBUGGING_INFO - */ - - /*****************************************************************************/ - - /* Control the assembler format that we output. */ - - /* Output at beginning of assembler file. */ - - #define ASM_FILE_START(FILE) { \ - char *p2, name[40]; \ - const char *p; \ - if ((p = strrchr(main_input_filename,'/')) != NULL ? 1 : \ - (p = strrchr(main_input_filename,']')) != NULL) \ - p++; \ - else \ - p = main_input_filename; \ - strcpy(name,p); \ - if ((p2 = strchr(name,'.'))) \ - *p2 = '\0'; \ - fprintf(FILE,"\tname %s\n",name); \ - fprintf(FILE,"\tnolist\n\tinclude \"ms1750.inc\"\n\tlist\n\n"); \ - fprintf(FILE,"\tglobal\t__main\n\n"); } - - /* Output at end of assembler file. - For 1750, we copy the data labels accrued in datalbl[] from the Constants - section (Konst) to the Writable-Data section (Static). */ - - #define ASM_FILE_END(FILE) \ - do { \ - if (datalbl_ndx >= 0) { \ - int i, cum_size=0; \ - fprintf(FILE,"\n\tstatic\ninit_srel\n"); \ - for (i = 0; i <= datalbl_ndx; i++) { \ - if (datalbl[i].name == NULL) \ - { \ - fprintf(stderr, "asm_file_end internal datalbl err\n"); \ - exit (0); \ - } \ - fprintf(FILE,"%s \tblock %d\n", \ - datalbl[i].name,datalbl[i].size); \ - cum_size += datalbl[i].size; \ - } \ - fprintf(FILE,"\n\tinit\n"); \ - fprintf(FILE,"\tlim\tr0,init_srel\n"); /* destin. */ \ - fprintf(FILE,"\tlim\tr1,%d\n",cum_size); /* count */ \ - fprintf(FILE,"\tlim\tr2,K%s\n",datalbl[0].name); /* source */ \ - fprintf(FILE,"\tmov\tr0,r2\n"); \ - fprintf(FILE,"\n\tnormal\n"); \ - datalbl_ndx = -1; /* reset stuff */ \ - for (i = 0; i < DATALBL_ARRSIZ; i++) \ - datalbl[i].size = 0; \ - } \ - fprintf(FILE,"\n\tend\n"); \ - } while (0) - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #define ASM_APP_ON "; ASM_APP_ON\n" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #define ASM_APP_OFF "; ASM_APP_OFF\n" - - - #define EXTRA_SECTIONS in_readonly_data - - #define EXTRA_SECTION_FUNCTIONS \ - extern void const_section PARAMS ((void)); \ - void const_section() \ - { \ - fprintf(asm_out_file,"\tkonst\n"); \ - current_section = Konst; \ - } \ - void check_section(sect) \ - enum section sect; \ - { \ - if (current_section != sect) { \ - fprintf(asm_out_file,"\t%s\n",sectname[(int)sect]); \ - current_section = sect; \ - } \ - switch (sect) { \ - case Init: \ - case Normal: \ - in_section = in_text; \ - break; \ - case Static: \ - in_section = in_data; \ - break; \ - case Konst: \ - in_section = in_readonly_data; \ - break; \ - } \ - } - - - /* Function that switches to the read-only data section (optional) */ - #define READONLY_DATA_SECTION const_section - - /* Output before program init section */ - #define INIT_SECTION_ASM_OP "\n\tinit ; init_section\n" - - /* Output before program text section */ - #define TEXT_SECTION_ASM_OP "\n\tnormal ; text_section\n" - - /* Output before writable data. - 1750 Note: This is actually read-only data. The copying from read-only - to writable memory is done elsewhere (in ASM_FILE_END.) - */ - #define DATA_SECTION_ASM_OP "\n\tkonst ; data_section\n" - - /* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - - #define REGISTER_NAMES \ - { "0", "1", "2", "3", "4", "5", "6", "7", \ - "8", "9","10","11","12","13","14","15" } - - /****************** Assembler output formatting **********************/ - - #define ASM_COMMENT_START ";" - - #define ASM_OUTPUT_OPCODE(FILE,PTR) do { \ - while (*(PTR) != '\0' && *(PTR) != ' ') { \ - putc (*(PTR), FILE); \ - (PTR)++; \ - } \ - while (*(PTR) == ' ') \ - (PTR)++; \ - putc ('\t', FILE); \ - program_counter += 2; \ - } while (0) - - #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ - fprintf(FILE,"%s\n",NAME) - - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - /* 1750 note: Labels are prefixed with a 'K'. This is because handling - has been changed for labels to be output in the "Constants" section - (named "Konst"), and special initialization code takes care of copying - the Const-section data into the writable data section (named "Static"). - In the Static section we therefore have the true label names (i.e. - not prefixed with 'K'). */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { if (NAME[0] == '.') { \ - fprintf(stderr,"Oops! label %s can't begin with '.'\n",NAME); \ - abort(); \ - } \ - else { \ - check_section(Konst); \ - fprintf(FILE,"K%s\n",NAME); \ - fflush(FILE); \ - datalbl[++datalbl_ndx].name = (char *)xstrdup (NAME);\ - datalbl[datalbl_ndx].size = 0; \ - label_pending = 1; \ - } \ - } while (0) - - - /* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - - #define ASM_GLOBALIZE_LABEL(FILE,NAME) do { \ - fprintf (FILE, "\tglobal %s\t; export\n", NAME); \ - } while (0) - - /* The prefix to add to user-visible assembler symbols. */ - - #define USER_LABEL_PREFIX "" - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - do { \ - if (strcmp(PREFIX,"LC") == 0) { \ - label_pending = 1; \ - datalbl[++datalbl_ndx].name = (char *) xmalloc (9);\ - sprintf(datalbl[datalbl_ndx].name,"LC%d",NUM); \ - datalbl[datalbl_ndx].size = 0; \ - check_section(Konst); \ - fprintf(FILE,"K%s%d\n",PREFIX,NUM); \ - } \ - else if (find_jmplbl(NUM) < 0) { \ - jmplbl[++jmplbl_ndx].num = NUM; \ - jmplbl[jmplbl_ndx].pc = program_counter; \ - fprintf(FILE, "%s%d\n", PREFIX, NUM); \ - } \ - fflush(FILE); \ - } while (0) - - - /* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "%s%d", PREFIX, NUM) - - /* Output at the end of a jump table. - 1750: To be uncommented when we can put jump tables in Konst. - #define ASM_OUTPUT_CASE_END(FILE,NUM,INSN) \ - fprintf (FILE, "\tnormal\t; case_end\n") - */ - - /* Currently, it is not possible to put jump tables in section Konst. - This is because there is a one-to-one relation between sections Konst - and Static (i.e., all Konst data are copied to Static, and the order - of data is the same between the two sections.) However, jump tables are - not copied to Static, which destroys the equivalence between Konst and - Static. When a more intelligent Konst-to-Static copying mechanism is - implemented (i.e. one that excludes the copying of jumptables), then - ASM_OUTPUT_CASE_END shall be defined, and JUMP_LABELS_IN_TEXT_SECTION - shall be undefined. */ - - #define JUMP_TABLES_IN_TEXT_SECTION 1 - - /* This is how to output an assembler line defining a string constant. */ - - #define ASM_OUTPUT_ASCII(FILE, PTR, LEN) do { \ - int i; \ - if (label_pending) \ - label_pending = 0; \ - datalbl[datalbl_ndx].size += LEN; \ - for (i = 0; i < (int) LEN; i++) { \ - if ((i % 15) == 0) { \ - if (i != 0) \ - fprintf(FILE,"\n"); \ - fprintf(FILE,"\tdata\t"); \ - } \ - else \ - fprintf(FILE,","); \ - if (PTR[i] >= 32 && PTR[i] < 127) \ - fprintf(FILE,"'%c'",PTR[i]); \ - else \ - fprintf(FILE,"%d",PTR[i]); \ - } \ - fprintf(FILE,"\n"); \ - } while (0) - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tPSHM R%s,R%s\n", reg_names[REGNO], "FIXME: missing arg") - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tPOPM R%s,R%s\n", reg_names[REGNO], "FIXME: missing arg") - - /* This is how to output an element of a case-vector that is absolute. */ - - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\tdata\tL%d ;addr_vec_elt\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. */ - - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\tdata\tL%d-L%d ;addr_diff_elt\n", VALUE,REL) - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - fprintf(FILE,"; in ASM_OUTPUT_ALIGN: pwr_of_2_bytcnt=%d\n",LOG) - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf(FILE,"; in ASM_OUTPUT_SKIP: size=%d\n",SIZE) - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) do { \ - check_section(Static); \ - fprintf (FILE, "\tcommon %s,%d\n", NAME, SIZE); \ - } while (0) - - #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) do { \ - fprintf (FILE, "\tglobal %s\t; import\n", NAME); \ - } while (0) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) do { \ - check_section (Static); \ - fprintf(FILE,"%s \tblock %d\t; local common\n",NAME,SIZE); \ - } while (0) - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - - /* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. - For `%' followed by punctuation, CODE is the punctuation and X is null. - 1750 note: there are three special CODE characters: - 'D', 'E': print a reference to a floating point constant (D=double, - E=single precision) label name - 'F': print a label defining a floating-point constant value - 'J': print the absolute value of a negative INT_CONST - (this is used in LISN/CISN/MISN/SISP and others) - 'Q': print a 1750 Base-Register-with-offset instruction's operands - */ - - #define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,CODE) - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE,ADDR) - - /* Convert a REAL_VALUE_TYPE to the target 1750a float format. */ - #define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) \ - ((OUT) = real_value_to_target_single(IN)) - - /* Convert a REAL_VALUE_TYPE to the target 1750a extended float format. */ - #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \ - real_value_to_target_double((IN), (OUT)) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/1750a/1750a.md gcc-3.3/gcc/config/1750a/1750a.md *** gcc-3.2.3/gcc/config/1750a/1750a.md 2001-12-09 16:31:47.000000000 +0000 --- gcc-3.3/gcc/config/1750a/1750a.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1436 **** - ;;- Machine description for GNU compiler - ;;- MIL-STD-1750A version. - ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, - ;; 2000 Free Software Foundation, Inc. - ;; Contributed by O.M.Kellogg, DASA (oliver.kellogg@space.otn.dasa.de). - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - - ;;- instruction definitions - - ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - - ;;- When naming insn's (operand 0 of define_insn) be careful about using - ;;- names from other targets machine descriptions. - - ;; MIL-STD-1750 specific remarks: - ;; - ;; 1) BITS_PER_UNIT = 16 - ;; - ;; 2) GCC to MIL-STD-1750 data type mappings: - ;; QImode => single integer (16 bits or 1 reg). - ;; HImode => double integer (32 bits or 2 regs). - ;; HFmode => single precision float (32 bits or 2 regs). - ;; TQFmode => extended precision float (48 bits or 3 regs). - ;; - ;; 3) Immediate integer operands Constraints: - ;; 'I' 1 .. 16 - ;; 'J' -1 ..-16 - ;; 'K' 0 .. 15 - ;; 'L' 0 .. 255 - ;; 'M' -32768 .. 32767 - ;; 'O' => 0 (for optimizations and GCC quirks) - ;; - ;; Further notes: - ;;- Assembly output ending in ".M" are macros in file M1750.INC - - - ;; stackpush - (define_insn "" - [(set (match_operand:QI 0 "push_operand" "=<") - (match_operand:QI 1 "general_operand" "r"))] - "" - "pshm r%1,r%1") - - (define_insn "" - [(set (match_operand:HI 0 "push_operand" "=<") - (match_operand:HI 1 "general_operand" "r"))] - "" - "pshm r%1,r%d1") - - (define_insn "" - [(set (match_operand:HF 0 "push_operand" "=<") - (match_operand:HF 1 "general_operand" "r"))] - "" - "pshm r%1,r%d1") - - (define_insn "" - [(set (match_operand:TQF 0 "push_operand" "=<") - (match_operand:TQF 1 "general_operand" "r"))] - "" - "pshm r%1,r%t1") - - ;; stackpop - (define_insn "" - [(set (match_operand:QI 0 "general_operand" "=r") - (match_operand:QI 1 "push_operand" ">"))] - "" - "popm r%1,r%1") - - (define_insn "" - [(set (match_operand:HI 0 "general_operand" "=r") - (match_operand:HI 1 "push_operand" ">"))] - "" - "popm r%1,r%d1") - - (define_insn "" - [(set (match_operand:HF 0 "general_operand" "=r") - (match_operand:HF 1 "push_operand" ">"))] - "" - "popm r%1,r%d1") - - (define_insn "" - [(set (match_operand:TQF 0 "general_operand" "=r") - (match_operand:TQF 1 "push_operand" ">"))] - "" - "popm r%1,r%t1") - - - ;; Test operations. - - (define_insn "tstqi" - [(set (cc0) - (match_operand:QI 0 "register_operand" "r"))] - "" - "lr r%0,r%0 ; from tstqi") - - (define_insn "tsthi" - [(set (cc0) - (match_operand:HI 0 "register_operand" "r"))] - "" - "dlr r%0,r%0 ; from tsthi") - - ; With 1750A floats, testing the most significant word suffices. - - (define_insn "tsthf" - [(set (cc0) - (match_operand:HF 0 "register_operand" "r"))] - "" - "lr r%0,r%0 ; tsthf") - - (define_insn "tsttqf" - [(set (cc0) - (match_operand:TQF 0 "register_operand" "r"))] - "" - "lr r%0,r%0 ; tsttqf") - - - ;; block move. - - (define_insn "movstrqi" - [(set (match_operand:BLK 0 "mov_memory_operand" "=m") - (match_operand:BLK 1 "mov_memory_operand" "m")) - (use (match_operand:QI 2 "general_operand" "r")) - (match_operand 3 "" "") - (clobber (match_dup 0)) - (clobber (match_dup 1)) - (clobber (match_dup 2))] - "" - "* - { - rtx regops[3]; - - regops[0] = XEXP (operands[0], 0); - regops[1] = XEXP (operands[1], 0); - regops[2] = operands[2]; - - return movcnt_regno_adjust (regops); - } ") - - - ;; compare instructions. - - (define_insn "cmpqi" - [(set (cc0) - (compare (match_operand:QI 0 "register_operand" "r,r,r,r,r") - (match_operand:QI 1 "general_operand" "I,J,i,r,m")))] - "" - "* - { - if (next_cc_user_is_unsigned (insn)) - switch (which_alternative) - { - case 0: - case 1: - case 2: - return \"ucim.m %0,%1\"; - case 3: - return \"ucr.m %0,%1\"; - case 4: - return \"uc.m %0,%1\"; - default: - abort(); - } - else - switch (which_alternative) - { - case 0: - return \"cisp r%0,%1\"; - case 1: - return \"cisn r%0,%J1\"; - case 2: - return \"cim r%0,%1\"; - case 3: - return \"cr r%0,r%1\"; - case 4: - return \"c r%0,%1\"; - default: - abort(); - } - } ") - - (define_insn "cmphi" - [(set (cc0) - (compare (match_operand:HI 0 "general_operand" "r,r") - (match_operand:HI 1 "general_operand" "r,m")))] - "" - "* - { - if (next_cc_user_is_unsigned (insn)) - { - if (which_alternative == 0) - return \"ducr.m %0,%1\"; - return \"duc.m %0,%1\"; - } - else - { - if (which_alternative == 0) - return \"dcr r%0,r%1\"; - return \"dc r%0,%1\"; - } - } ") - - (define_insn "cmphf" - [(set (cc0) - (compare (match_operand:HF 0 "general_operand" "r,r") - (match_operand:HF 1 "general_operand" "r,m")))] - "" - "@ - fcr r%0,r%1 - fc r%0,%1 ") - - (define_insn "cmptqf" - [(set (cc0) - (compare (match_operand:TQF 0 "general_operand" "r,r") - (match_operand:TQF 1 "general_operand" "r,m")))] - "" - "@ - efcr r%0,r%1 - efc r%0,%1 ") - - - ;; truncation instructions - ;;- 1750: any needed? - - (define_insn "trunchiqi2" - [(set (match_operand:QI 0 "register_operand" "=r") - (truncate:QI (match_operand:HI 1 "register_operand" "r")))] - "" - "lr r%0,r%d1") - - - ;; zero extension instructions: not defined, GCC can synthesize - - ;; sign extension instructions - - (define_insn "extendqihi2" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (sign_extend:HI (match_operand:QI 1 "general_operand" "r,m")) )] - "" - "* - if (which_alternative == 0) - { - if (REGNO (operands [0]) != REGNO (operands [1])) - output_asm_insn (\"lr r%0,r%1\", operands); - } - else - output_asm_insn (\"l r%0,%1\", operands); - return \"dsra r%0,16 ;extendqihi2\"; - ") - - - ;; Conversions between float and double. - - ; 1750 HF-to-TQF extend: just append 16 bits (least signif.) with all bits zero - (define_insn "extendhftqf2" - [(set (match_operand:TQF 0 "register_operand" "=r,r") - (float_extend:TQF (match_operand:HF 1 "general_operand" "r,m")))] - "" - "* - output_asm_insn(\"xorr r%t0,r%t0 ;extendhftqf2\", operands); - if (which_alternative == 0) - { - if (REGNO (operands[1]) != REGNO (operands[0])) - return \"dlr r%0,r%1\"; - else - return \";\"; - } - else - return \"dl r%0,%1\"; - ") - - ; 1750 TQF-to-HF truncate is a no-op: just leave away the least signif. 16 bits - (define_insn "trunctqfhf2" - [(set (match_operand:HF 0 "register_operand" "=r,r") - (float_truncate:HF - (match_operand:TQF 1 "general_operand" "r,m")))] - "" - "@ - dlr r%0,r%1 ;trunctqfhf2 - dl r%0,%1 ;trunctqfhf2 ") - - - ;; Conversion between fixed point and floating point. - - (define_insn "floatqihf2" - [(set (match_operand:HF 0 "register_operand" "=r") - (float:HF (match_operand:QI 1 "register_operand" "r")))] - "" - "flt r%0,r%1") - - (define_insn "floathitqf2" - [(set (match_operand:TQF 0 "register_operand" "=r") - (float:TQF (match_operand:HI 1 "register_operand" "r")))] - "" - "eflt r%0,r%1") - - - ;; Convert floats to ints - - (define_insn "fix_trunchfqi2" - [(set (match_operand:QI 0 "register_operand" "=r") - (fix:QI (fix:HF (match_operand:HF 1 "register_operand" "r"))))] - "" - "fix r%0,r%1") - - (define_insn "fix_trunctqfhi2" - [(set (match_operand:HI 0 "register_operand" "=r") - (fix:HI (fix:TQF (match_operand:TQF 1 "register_operand" "r"))))] - "" - "efix r%0,r%1") - - - ;; Move instructions - - ;; We can't deal with normal byte-size characters, only with WIDE characters! - ;; This may appear as a serious restriction, but it also opens the doors - ;; for ISO 10646 :-) - - ;; 16-bit moves - - ; memory indirect to reg - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (mem:QI (match_operand 1 "memory_operand" "m")))] - "" - "li r%0,%1") - - ; reg/const to memory indirect - (define_insn "" - [(set (mem:QI (match_operand 0 "memory_operand" "=m,m")) - (match_operand:QI 1 "nonmemory_operand" "r,K"))] - "" - "@ - sti r%1,%0 - stci %1,%0") - - ; general case - (define_insn "movqi" - [(set (match_operand:QI 0 "general_operand" "=r,r,r,r,r,r,m,m") - (match_operand:QI 1 "general_operand" "O,I,J,i,r,m,r,K"))] - "" - "@ - xorr r%0,r%0 - lisp r%0,%1 - lisn r%0,%J1 - lim r%0,%1 - lr r%0,r%1 - l r%0,%1 - st r%1,%0 - stc %1,%0 ") - - ;; 32-bit moves - - ; memory indirect to reg - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (mem:HI (match_operand 1 "memory_operand" "m")))] - "" - "dli r%0,%1") - - ; reg to memory indirect - (define_insn "" - [(set (mem:HI (match_operand 0 "memory_operand" "=m")) - (match_operand:HI 1 "register_operand" "r"))] - "" - "dsti r%1,%0") - - ; general case - (define_insn "" - [(set (match_operand:HI 0 "general_operand" "=r,r,r,r,r,m,m") - (match_operand:HI 1 "general_operand" "O,I,J,r,m,r,K"))] - "" - "@ - xorr r%0,r%0\;xorr r%d0,r%d0 - xorr r%0,r%0\;lisp r%d0,%1 - lisn r%0,1 \;lisn r%d0,%J1 - dlr r%0,r%1 - dl r%0,%1 - dst r%1,%0 - stc 0,%0 \;stc %1,%A0 ") - - (define_expand "movhi" - [(set (match_operand:HI 0 "general_operand" "=g") - (match_operand:HI 1 "general_operand" "g"))] - "" - " - { - rtx op1 = operands[1]; - if (GET_CODE (operands[0]) == MEM) - { - if (GET_CODE (op1) == MEM - || (GET_CODE (op1) == CONST_INT - && (INTVAL (op1) < 0 || INTVAL (op1) > 15))) - operands[1] = force_reg (HImode, operands[1]); - } - else if (GET_CODE (op1) == CONST_INT - && (INTVAL (op1) < -16 || INTVAL (op1) > 16)) - operands[1] = force_const_mem (HImode, operands[1]); - }") - - - ;; Single-Float moves - - (define_insn "" - [(set (match_operand:HF 0 "general_operand" "=r,r,m,m") - (match_operand:HF 1 "general_operand" "r,m,r,G"))] - "" - "@ - dlr r%0,r%1 - dl r%0,%1 - dst r%1,%0 - stc 0,%0 \;stc 0,%A0 ") - - (define_expand "movhf" - [(set (match_operand:HF 0 "general_operand" "") - (match_operand:HF 1 "general_operand" ""))] - "" - " - { - enum rtx_code op1code = GET_CODE (operands[1]); - if (GET_CODE (operands[0]) == MEM) - { - if (op1code == MEM || (op1code == CONST_DOUBLE - && !rtx_equal_p (operands[1], CONST0_RTX (HFmode)))) - operands[1] = force_reg (HFmode, operands[1]); - } - else if (op1code == CONST_DOUBLE) - operands[1] = force_const_mem (HFmode, operands[1]); - }") - - - ;; Longfloat moves - - (define_insn "" - [(set (match_operand:TQF 0 "general_operand" "=r,r,m") - (match_operand:TQF 1 "general_operand" "r,m,r"))] - "" - "@ - eflr.m %0,%1 - efl r%0,%1 - efst r%1,%0 ") - - (define_expand "movtqf" - [(set (match_operand:TQF 0 "general_operand" "") - (match_operand:TQF 1 "general_operand" ""))] - "" - " - { - enum rtx_code op1code = GET_CODE (operands[1]); - if (GET_CODE (operands[0]) == MEM) - { - if (op1code == MEM || op1code == CONST_DOUBLE) - operands[1] = force_reg (TQFmode, operands[1]); - } - else if (op1code == CONST_DOUBLE) - operands[1] = force_const_mem (TQFmode, operands[1]); - }") - - - ;; add instructions - - ;; single integer - - (define_insn "addqi3" - [(set (match_operand:QI 0 "general_operand" "=r,r,r,r,r,m,m") - (plus:QI (match_operand:QI 1 "general_operand" "%0,0,0,0,0,0,0") - (match_operand:QI 2 "general_operand" "I,J,i,r,m,I,J")))] - "" - "* - switch (which_alternative) - { - case 0: - return \"aisp r%0,%2\"; - case 1: - return \"sisp r%0,%J2\"; - case 2: - if (INTVAL(operands[2]) < 0) - return \"sim r%0,%J2\"; - else - return \"aim r%0,%2\"; - case 3: - return \"ar r%0,r%2\"; - case 4: - return \"a r%0,%2\"; - case 5: - return \"incm %2,%0\"; - case 6: - return \"decm %J2,%0\"; - default: - abort(); - } ") - - ;; double integer - (define_insn "addhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (plus:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "general_operand" "r,m")))] - "" - "@ - dar r%0,r%2 - da r%0,%2 ") - - (define_insn "addhf3" - [(set (match_operand:HF 0 "register_operand" "=r,r") - (plus:HF (match_operand:HF 1 "register_operand" "%0,0") - (match_operand:HF 2 "general_operand" "r,m")))] - "" - "@ - far r%0,r%2 - fa r%0,%2 ") - - (define_insn "addtqf3" - [(set (match_operand:TQF 0 "register_operand" "=r,r") - (plus:TQF (match_operand:TQF 1 "register_operand" "%0,0") - (match_operand:TQF 2 "general_operand" "r,m")))] - "" - "@ - efar r%0,r%2 - efa r%0,%2 ") - - - ;; subtract instructions - - ;; single integer - (define_insn "subqi3" - [(set (match_operand:QI 0 "general_operand" "=r,r,r,r,m") - (minus:QI (match_operand:QI 1 "general_operand" "0,0,0,0,0") - (match_operand:QI 2 "general_operand" "I,i,r,m,I")))] - "" - "@ - sisp r%0,%2 - sim r%0,%2 - sr r%0,r%2 - s r%0,%2 - decm %2,%0 ") - - ;; double integer - (define_insn "subhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (minus:HI (match_operand:HI 1 "register_operand" "0,0") - (match_operand:HI 2 "general_operand" "r,m")))] - "" - "@ - dsr r%0,r%2 - ds r%0,%2 ") - - (define_insn "subhf3" - [(set (match_operand:HF 0 "register_operand" "=r,r") - (minus:HF (match_operand:HF 1 "register_operand" "0,0") - (match_operand:HF 2 "general_operand" "r,m")))] - "" - "@ - fsr r%0,r%2 - fs r%0,%2 ") - - (define_insn "subtqf3" - [(set (match_operand:TQF 0 "register_operand" "=r,r") - (minus:TQF (match_operand:TQF 1 "register_operand" "0,0") - (match_operand:TQF 2 "general_operand" "r,m")))] - "" - "@ - efsr r%0,r%2 - efs r%0,%2 ") - - - ;; multiply instructions - - (define_insn "mulqi3" - [(set (match_operand:QI 0 "register_operand" "=r,r,r,r,r") - (mult:QI (match_operand:QI 1 "register_operand" "%0,0,0,0,0") - (match_operand:QI 2 "general_operand" "I,J,M,r,m")))] - "" - "@ - misp r%0,%2 - misn r%0,%J2 - msim r%0,%2 - msr r%0,r%2 - ms r%0,%2 ") - - - ; 32-bit product - (define_insn "mulqihi3" - [(set (match_operand:HI 0 "register_operand" "=r,r,r") - (mult:HI (sign_extend:HI (match_operand:QI 1 "register_operand" "%r,r,r")) - (sign_extend:HI (match_operand:QI 2 "general_operand" "r,m,i"))))] - "" - "* - if (REGNO (operands[1]) != REGNO (operands[0])) - output_asm_insn (\"lr r%0,r%1\", operands); - - switch (which_alternative) - { - case 0: - return \"mr r%0,r%2\"; - case 1: - return \"m r%0,%2\"; - case 2: - return \"mim r%0,%2\"; - default: - abort(); - } - ") - - - (define_insn "mulhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (mult:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "general_operand" "r,m")))] - "" - "@ - dmr r%0,r%2 - dm r%0,%2 ") - - ; not available on 1750: "umulhi3","umulhisi3","umulsi3" (unsigned multiply's) - - (define_insn "mulhf3" - [(set (match_operand:HF 0 "register_operand" "=r,r") - (mult:HF (match_operand:HF 1 "register_operand" "%0,0") - (match_operand:HF 2 "general_operand" "r,m")))] - "" - "@ - fmr r%0,r%2 - fm r%0,%2 ") - - (define_insn "multqf3" - [(set (match_operand:TQF 0 "register_operand" "=r,r") - (mult:TQF (match_operand:TQF 1 "register_operand" "%0,0") - (match_operand:TQF 2 "general_operand" "r,m")))] - "" - "@ - efmr r%0,r%2 - efm r%0,%2 ") - - - ;; divide instructions - ;; The 1750 16bit integer division instructions deliver a 16-bit - ;; quotient and a 16-bit remainder, where the remainder is in the next higher - ;; register number above the quotient. For now, we haven't found a way - ;; to give the reload pass knowledge of this property. So we make do with - ;; whatever registers the allocator wants, and willy-nilly output a pair of - ;; register-copy ops when needed. (See mod_regno_adjust() in file aux-output.c) - ;; A comment in the description of `divmodM4' suggests that one leave the divM3 - ;; undefined when there is a divmodM4 available. - - (define_insn "divmodqi4" - [(set (match_operand:QI 0 "register_operand" "=r,r,r,r,r") - (div:QI (match_operand:QI 1 "register_operand" "0,0,0,0,0") - (match_operand:QI 2 "general_operand" "I,J,M,r,m"))) - (set (match_operand:QI 3 "register_operand" "=r,r,r,r,r") - (mod:QI (match_dup 1) (match_dup 2)))] - "" - "* - { - const char *istr; - switch(which_alternative) - { - case 0: - istr = \"disp\"; - break; - case 1: - { - rtx new_opnds[4]; - new_opnds[0] = operands[0]; - new_opnds[1] = operands[1]; - new_opnds[2] = GEN_INT (-INTVAL(operands[2])); - new_opnds[3] = operands[3]; - istr = \"disn\"; - return mod_regno_adjust (istr, new_opnds); - } - break; - case 2: - istr = \"dvim\"; - break; - case 3: - istr = \"dvr \"; - break; - case 4: - istr = \"dv \"; - break; - default: - abort(); - } - return mod_regno_adjust (istr, operands); - }") - - ;; Division for other types is straightforward. - - (define_insn "divhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (div:HI (match_operand:HI 1 "register_operand" "0,0") - (match_operand:HI 2 "general_operand" "r,m")))] - "" - "@ - ddr r%0,r%2 - dd r%0,%2 ") - - (define_insn "divhf3" - [(set (match_operand:HF 0 "register_operand" "=r,r") - (div:HF (match_operand:HF 1 "register_operand" "0,0") - (match_operand:HF 2 "general_operand" "r,m")))] - "" - "@ - fdr r%0,r%2 - fd r%0,%2 ") - - (define_insn "divtqf3" - [(set (match_operand:TQF 0 "register_operand" "=r,r") - (div:TQF (match_operand:TQF 1 "register_operand" "0,0") - (match_operand:TQF 2 "general_operand" "r,m")))] - "" - "@ - efdr r%0,r%2 - efd r%0,%2 ") - - - ;; Other arithmetic instructions: - - ;; Absolute value - - (define_insn "absqi2" - [(set (match_operand:QI 0 "register_operand" "=r") - (abs:QI (match_operand:QI 1 "register_operand" "r")))] - "" - "abs r%0,r%1") - - (define_insn "abshi2" - [(set (match_operand:HI 0 "register_operand" "=r") - (abs:HI (match_operand:HI 1 "register_operand" "r")))] - "" - "dabs r%0,r%1") - - (define_insn "abshf2" - [(set (match_operand:HF 0 "register_operand" "=r") - (abs:HF (match_operand:HF 1 "register_operand" "r")))] - "" - "fabs r%0,r%1") - - - ;; Negation - - (define_insn "negqi2" - [(set (match_operand:QI 0 "register_operand" "=r") - (neg:QI (match_operand:QI 1 "register_operand" "r")))] - "" - "neg r%0,r%1") - - (define_insn "neghi2" - [(set (match_operand:HI 0 "register_operand" "=r") - (neg:HI (match_operand:HI 1 "register_operand" "r")))] - "" - "dneg r%0,r%1") - - (define_insn "neghf2" - [(set (match_operand:HF 0 "register_operand" "=r") - (neg:HF (match_operand:HF 1 "register_operand" "r")))] - "" - "fneg r%0,r%1") - - ; The 1750A does not have an extended float negate instruction, so simulate. - (define_expand "negtqf2" - [(set (match_operand:TQF 0 "register_operand" "=&r") - (neg:TQF (match_operand:TQF 1 "register_operand" "r")))] - "" - " - emit_insn (gen_rtx_SET (VOIDmode, operands[0], CONST0_RTX (TQFmode))); - emit_insn (gen_rtx_SET (VOIDmode, operands[0], - gen_rtx_MINUS (TQFmode, operands[0], operands[1]))); - DONE; - ") - - - ;; bit-logical instructions - - ;; Set Bit - (define_insn "" - [(set (match_operand:QI 0 "general_operand" "=r,m") - (ior:QI (match_operand:QI 1 "general_operand" "0,0") - (match_operand:QI 2 "const_int_operand" "i,i")))] - "one_bit_set_p (INTVAL (operands [2]))" - "@ - sbr %b2,r%0 - sb %b2,%0") - - ;; Reset Bit - (define_insn "" - [(set (match_operand:QI 0 "general_operand" "=r,m") - (and:QI (match_operand:QI 1 "general_operand" "0,0") - (match_operand:QI 2 "const_int_operand" "i,i")))] - "one_bit_set_p ((~INTVAL (operands [2])) & 0xffff)" - "@ - rbr %B2,r%0 - rb %B2,%0") - - ;; Set Variable Bit - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (ior:QI (match_operand:QI 1 "register_operand" "0") - (lshiftrt:QI (const_int 32768) - (match_operand:QI 2 "register_operand" "r"))))] - "" - "svbr r%2,%r0") - - ;; Reset Variable Bit - (define_insn "" - [(set (match_operand:QI 0 "general_operand" "=r") - (and:QI (match_operand:QI 1 "general_operand" "0") - (not:QI (lshiftrt:QI (const_int 32768) - (match_operand:QI 2 "register_operand" "r")))))] - "" - "rvbr r%2,%r0") - - - ;; AND - - (define_insn "andqi3" - [(set (match_operand:QI 0 "general_operand" "=r,r,r") - (and:QI (match_operand:QI 1 "general_operand" "%0,0,0") - (match_operand:QI 2 "general_operand" "M,r,m")))] - "" - "@ - andm r%0,%2 - andr r%0,r%2 - and r%0,%2 ") - - ; This sets incorrect condition codes. See notice_update_cc() - (define_insn "andhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (and:HI (match_operand:HI 1 "register_operand" "%0") - (match_operand:HI 2 "register_operand" "r")))] - "" - "danr.m %0,%2") - - ;; OR - - (define_insn "iorqi3" - [(set (match_operand:QI 0 "general_operand" "=r,r,r") - (ior:QI (match_operand:QI 1 "general_operand" "%0,0,0") - (match_operand:QI 2 "general_operand" "M,r,m")))] - "" - "@ - orim r%0,%2 - orr r%0,r%2 - or r%0,%2 ") - - ; This sets incorrect condition codes. See notice_update_cc() - (define_insn "iorhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (ior:HI (match_operand:HI 1 "register_operand" "%0") - (match_operand:HI 2 "register_operand" "r")))] - "" - "dorr.m %0,%2") - - ;; XOR - - (define_insn "xorqi3" - [(set (match_operand:QI 0 "register_operand" "=r,r,r") - (xor:QI (match_operand:QI 1 "register_operand" "%0,0,0") - (match_operand:QI 2 "general_operand" "M,r,m")))] - "" - "@ - xorm r%0,%2 - xorr r%0,r%2 - xor r%0,%2 ") - - ; This sets incorrect condition codes. See notice_update_cc() - (define_insn "xorhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (xor:HI (match_operand:HI 1 "register_operand" "%0") - (match_operand:HI 2 "register_operand" "r")))] - "" - "dxrr.m %0,%2") - - ;; NAND - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r,r,r") - (ior:QI (not:QI (match_operand:QI 1 "register_operand" "%0,0,0")) - (not:QI (match_operand:QI 2 "general_operand" "M,r,m"))))] - "" - "@ - nim r%0,%2 - nr r%0,r%2 - n r%0,%2 ") - - ; This sets incorrect condition codes. See notice_update_cc() - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (ior:HI (not:HI (match_operand:HI 1 "register_operand" "%0")) - (not:HI (match_operand:HI 2 "register_operand" "r"))))] - "" - "dnr.m %0,%2") - - ;; NOT - - (define_insn "one_cmplqi2" - [(set (match_operand:QI 0 "register_operand" "=r") - (not:QI (match_operand:QI 1 "register_operand" "0")))] - "" - "nr r%0,r%0") - - ; This sets incorrect condition codes. See notice_update_cc() - (define_insn "one_cmplhi2" - [(set (match_operand:HI 0 "register_operand" "=r") - (not:HI (match_operand:HI 1 "register_operand" "0")))] - "" - "dnr.m %0,%0") - - - ;; Shift instructions - - ; (What to the 1750 is logical-shift-left, GCC likes to call "arithmetic") - (define_insn "ashlqi3" - [(set (match_operand:QI 0 "register_operand" "=r,r") - (ashift:QI (match_operand:QI 1 "register_operand" "0,0") - (match_operand:QI 2 "nonmemory_operand" "I,r")))] - "" - "@ - sll r%0,%2 - slr r%0,r%2 ") - - (define_insn "ashlhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (ashift:HI (match_operand:HI 1 "register_operand" "0,0") - (match_operand:QI 2 "nonmemory_operand" "L,r")))] - "" ; the 'L' constraint is a slight imprecise... - "* - if (which_alternative == 1) - return \"dslr r%0,r%2\"; - else if (INTVAL(operands[2]) <= 16) - return \"dsll r%0,%2\"; - else - { - output_asm_insn (\"dsll r%0,16 ; ashlhi3 shiftcnt > 16\", operands); - return \"sll r%0,%w2\"; - } - ") - - - ;; Right shift by a variable shiftcount works by negating the shift count, - ;; then emitting a right shift with the shift count negated. This means - ;; that all actual shift counts in the RTL will be positive. This - ;; prevents converting shifts to ZERO_EXTRACTs with negative positions, - ;; which isn't valid. - (define_expand "lshrqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (lshiftrt:QI (match_operand:QI 1 "register_operand" "0") - (match_operand:QI 2 "nonmemory_operand" "g")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (lshiftrt:QI (match_operand:QI 1 "register_operand" "0") - (match_operand:QI 2 "immediate_operand" "I")))] - "" - "srl r%0,%2") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (lshiftrt:QI (match_operand:QI 1 "register_operand" "0") - (neg:QI (match_operand:QI 2 "register_operand" "r"))))] - "" - "slr r%0,r%2 ") - - ;; Same thing for HImode. - - (define_expand "lshrhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (lshiftrt:HI (match_operand:HI 1 "register_operand" "0") - (match_operand:QI 2 "nonmemory_operand" "g")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (lshiftrt:HI (match_operand:HI 1 "register_operand" "0") - (match_operand:QI 2 "immediate_operand" "L")))] - "" - "* - if (INTVAL (operands[2]) <= 16) - return \"dsrl r%0,%2\"; - output_asm_insn (\"dsrl r%0,16 ; lshrhi3 shiftcount > 16\", operands); - return \"srl r%d0,%w2\"; - ") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (lshiftrt:HI (match_operand:HI 1 "register_operand" "0") - (neg:QI (match_operand:QI 2 "register_operand" "r"))))] - "" - "dslr r%0,r%2 ") - - ;; Same applies for arithmetic shift right. - (define_expand "ashrqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (ashiftrt:QI (match_operand:QI 1 "register_operand" "0") - (match_operand:QI 2 "nonmemory_operand" "g")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (ashiftrt:QI (match_operand:QI 1 "register_operand" "0") - (match_operand:QI 2 "immediate_operand" "I")))] - "" - "sra r%0,%2") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (ashiftrt:QI (match_operand:QI 1 "register_operand" "0") - (neg:QI (match_operand:QI 2 "register_operand" "r"))))] - "" - "sar r%0,r%2 ") - - ;; HImode arithmetic shift right. - (define_expand "ashrhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (ashiftrt:HI (match_operand:HI 1 "register_operand" "0") - (match_operand:QI 2 "nonmemory_operand" "g")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (ashiftrt:HI (match_operand:HI 1 "register_operand" "0") - (match_operand:QI 2 "immediate_operand" "L")))] - "" - "* - if (INTVAL (operands[2]) <= 16) - return \"dsra r%0,%2\"; - output_asm_insn (\"dsra r%0,16 ; ashrhi3 shiftcount > 16\", operands); - return \"sra r%d0,%w2\"; - ") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (ashiftrt:HI (match_operand:HI 1 "register_operand" "0") - (neg:QI (match_operand:QI 2 "register_operand" "r"))))] - "" - "dsar r%0,r%2 ") - - - ;; rotate instructions - - (define_insn "rotlqi3" - [(set (match_operand:QI 0 "register_operand" "=r,r") - (rotate:QI (match_operand:QI 1 "register_operand" "0,0") - (match_operand:QI 2 "nonmemory_operand" "I,r")))] - "" - "@ - slc r%0,%2 - scr r%0,r%2 ") - - (define_insn "rotlhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (rotate:HI (match_operand:HI 1 "register_operand" "0,0") - (match_operand:QI 2 "nonmemory_operand" "I,r")))] - "" - "@ - dslc r%0,%2 - dscr r%0,r%2 ") - - (define_insn "rotrqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (rotatert:QI (match_operand:QI 1 "register_operand" "0") - (match_operand:QI 2 "register_operand" "r")))] - "" - "neg r%2,r%2\;scr r%0,r%2 ") - - (define_insn "rotrhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (rotatert:HI (match_operand:HI 1 "register_operand" "0") - (match_operand:QI 2 "nonmemory_operand" "r")))] - "" - "neg r%2,r%2\;dscr r%0,r%2 ") - - - - ;; Special cases of bit-field insns which we should - ;; recognize in preference to the general case. - ;; These handle aligned 8-bit and 16-bit fields, - ;; which can usually be done with move instructions. - ; 1750: t.b.d. - ;******************** - - ;; Bit field instructions, general cases. - ;; "o,d" constraint causes a nonoffsettable memref to match the "o" - ;; so that its address is reloaded. - - ;; (define_insn "extv" ... - - ;; (define_insn "extzv" ... - - ;; (define_insn "insv" ... - - ;; Now recognize bit field insns that operate on registers - ;; (or at least were intended to do so). - ;[unnamed only] - - ;; Special patterns for optimizing bit-field instructions. - ;************************************** - - ; cc status test ops n.a. on 1750 ......... e.g. "sleu" on 68k: - ; [(set (match_operand:QI 0 "general_operand" "=d") - ; (leu (cc0) (const_int 0)))] - ; "" - ; "* cc_status = cc_prev_status; - ; return \"sls %0\"; ") - - - ;; Basic conditional jump instructions. - - (define_insn "beq" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return branch_or_jump (\"ez\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "bne" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return branch_or_jump (\"nz\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "bgt" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return branch_or_jump (\"gt\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "blt" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return branch_or_jump (\"lt\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "bge" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return branch_or_jump (\"ge\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "ble" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return branch_or_jump (\"le\", CODE_LABEL_NUMBER (operands[0])); - ") - - - ; no unsigned branches available on 1750. But GCC still needs them, so faking: - - (define_insn "bgtu" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jc gt,%l0 ; Warning: this should be an *unsigned* test!") - - (define_insn "bltu" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jc lt,%l0 ; Warning: this should be an *unsigned* test!") - - (define_insn "bgeu" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jc ge,%l0 ; Warning: this should be an *unsigned* test!") - - (define_insn "bleu" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jc le,%l0 ; Warning: this should be an *unsigned* test!") - - - ;; Negated conditional jump instructions. - - (define_insn "" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return branch_or_jump (\"nz\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return branch_or_jump (\"ez\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return branch_or_jump (\"le\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return branch_or_jump (\"ge\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return branch_or_jump (\"lt\", CODE_LABEL_NUMBER (operands[0])); - ") - - (define_insn "" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return branch_or_jump (\"gt\", CODE_LABEL_NUMBER (operands[0])); - ") - - - ;; Negated unsigned conditional jump instructions (faked for 1750). - - (define_insn "" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jc le,%l0 ;inv.cond. ;Warning: this should be an *unsigned* test!") - - (define_insn "" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jc ge,%l0 ;inv.cond. ;Warning: this should be an *unsigned* test!") - - (define_insn "" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jc lt,%l0 ;inv.cond. ;Warning: this should be an *unsigned* test!") - - (define_insn "" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jc gt,%l0 ;inv.cond. ;Warning: this should be an *unsigned* test!") - - ;; Tablejump - ;; 1750 note: CASE_VECTOR_PC_RELATIVE is not defined - (define_insn "tablejump" - [(set (pc) - (match_operand:QI 0 "register_operand" "b")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jc 15,0,r%0 ; tablejump label_ref=%1") - - - ;; Unconditional jump - (define_insn "jump" - [(set (pc) - (label_ref (match_operand 0 "" "")))] - "" - "jc 15,%0") - - ;; Call subroutine, returning value in operand 0 - ;; (which must be a hard register). - (define_insn "call_value" - [(set (match_operand 0 "register_operand" "=r") - (call (match_operand:QI 1 "memory_operand" "m") - (match_operand:QI 2 "general_operand" "g")))] - ;; Operand 2 not really used for 1750. - "" - "sjs r15,%1 ; return value in R0") - - ;; Call subroutine with no return value. - - ;; Operand 1 not really used in MIL-STD-1750. - (define_insn "" - [(call (match_operand:QI 0 "memory_operand" "mp") - (match_operand:QI 1 "general_operand" ""))] - "" - "sjs r15,%0 ; no return value") - - ;;;;;;;;;;;; 1750: NOT READY YET. - (define_insn "call" - [(call (match_operand:QI 0 "" "") - (match_operand:QI 1 "" ""))] - "" - "ANYCALL %0") - - (define_insn "indirect_jump" - [(set (pc) (match_operand:QI 0 "address_operand" "p"))] - "" - "jci 15,%0") - - (define_insn "nop" - [(const_int 0)] - "" - "nop") - - - ;; Subtract One and Jump (if non-zero) - (define_peephole - [(set (match_operand:QI 0 "register_operand" "=r") - (plus:QI (match_operand:QI 1 "register_operand" "%0") - (match_operand:QI 2 "immediate_operand" "J"))) - (set (cc0) (match_dup 0)) - (set (pc) - (if_then_else (ne (cc0) (const_int 0)) - (label_ref (match_operand 3 "" "")) - (pc))) - ] - "INTVAL(operands[2]) == -1" - "soj r%0,%3") - - ;; Combine a Load Register with subsequent increment/decrement into a LIM - (define_peephole - [(set (match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "register_operand" "b")) - (set (match_dup 0) - (plus:QI (match_dup 0) - (match_operand:QI 2 "immediate_operand" "i")))] - "REGNO(operands[1]) > 0" - "lim r%0,%2,r%1 ; LR,inc/dec peephole") - - ;; Eliminate the redundant load in a store/load sequence - (define_peephole - [(set (mem:QI (plus:QI (match_operand:QI 0 "register_operand" "r") - (match_operand:QI 1 "immediate_operand" "i"))) - (match_operand:QI 2 "register_operand" "r")) - (set (match_operand:QI 3 "register_operand" "=r") - (mem:QI (plus:QI (match_dup 0) - (match_dup 1)))) - ] - "REGNO(operands[2]) == REGNO(operands[3])" - "st r%2,%1,r%0 ; eliminated previous redundant load") - - ;;;End. --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/1750a/1750a-protos.h gcc-3.3/gcc/config/1750a/1750a-protos.h *** gcc-3.2.3/gcc/config/1750a/1750a-protos.h 2001-12-20 17:36:33.000000000 +0000 --- gcc-3.3/gcc/config/1750a/1750a-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,48 **** - /* Definitions of target machine for GNU compiler. - Copyright (C) 2000 Free Software Foundation, Inc. - Contributed by O.M.Kellogg, DASA (oliver.kellogg@space.otn.dasa.de) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #ifdef RTX_CODE - #ifdef TREE_CODE - extern struct rtx_def *function_arg PARAMS ((int, enum machine_mode, tree, int)); - #endif /* TREE_CODE */ - extern const char *movcnt_regno_adjust PARAMS ((rtx *)); - extern const char *mod_regno_adjust PARAMS ((const char *, rtx *)); - extern void notice_update_cc PARAMS ((rtx)); - extern double get_double PARAMS ((rtx)); - extern int memop_valid PARAMS ((rtx)); - extern int mov_memory_operand PARAMS ((rtx, enum machine_mode)); - extern int small_nonneg_const PARAMS ((rtx, enum machine_mode)); - extern int zero_operand PARAMS ((rtx, enum machine_mode)); - extern int b_mode_operand PARAMS ((rtx)); - extern int unsigned_comparison_operator PARAMS ((rtx)); - extern int next_cc_user_is_unsigned PARAMS ((rtx)); - extern void print_operand PARAMS ((FILE *, rtx, int)); - extern void print_operand_address PARAMS ((FILE *, rtx)); - #endif /* RTX_CODE */ - - extern char *float_label PARAMS ((int, double)); - extern const char *branch_or_jump PARAMS ((const char *, int)); - extern int find_jmplbl PARAMS ((int)); - extern int one_bit_set_p PARAMS ((int)); - extern void check_section PARAMS ((enum section)); - - extern long real_value_to_target_single PARAMS((double)); - extern void real_value_to_target_double PARAMS((double, long[])); --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/1750a/ms1750.inc gcc-3.3/gcc/config/1750a/ms1750.inc *** gcc-3.2.3/gcc/config/1750a/ms1750.inc 1998-12-16 21:00:33.000000000 +0000 --- gcc-3.3/gcc/config/1750a/ms1750.inc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,158 **** - ;; GCC assembler includefile for AS1750 - ;; - ;; Macros defined: - ;; EFLR.M #d,#s Load the three regs starting at R#s to R#d following. - ;; RET.M #fs Return from function (uses the framesize #fs) - - - UC SET 15 - - ; Return from function ; parameter: framesize - MACRO RET.M - IF `1` > 0 - IF `1` <= 16 - AISP R14,`1` - ELSE - AIM R14,`1` - ENDIF - ENDIF - LR R15,R14 - URS R15 - ENDMACRO - - ; Useful instructions missing from the 1750A standard: - - ; Extended Float Load from Registers - MACRO EFLR.M ; args : #1=dest-regno, #2=source-regno - ONE SET `1` + 2 - TWO SET `2` + 2 - IF `1` >= `2` || `1`+2 < `2` - LR R`ONE`,R`TWO` - DLR R`1`,R`2` - ELSE - DLR R`1`,R`2` - LR R`ONE`,R`TWO` - DLR R`1`,R`1` ; Just to update condition codes - ENDIF - ENDMACRO - - ; The following leave the condition codes haywire. But that is - ; accounted for (see notice_update_cc in config/1750a.c.) - - ; Double ANd Register with Register - MACRO DANR.M - ONE SET `1` + 1 - TWO SET `2` + 1 - ANDR R`1`,R`2` - ANDR R`ONE`,R`TWO` - ENDMACRO - - ; Double OR Register with Register - MACRO DORR.M - ONE SET `1` + 1 - TWO SET `2` + 1 - ORR R`1`,R`2` - ORR R`ONE`,R`TWO` - ENDMACRO - - ; Double eXoR Register with Register - MACRO DXRR.M - ONE SET `1` + 1 - TWO SET `2` + 1 - XORR R`1`,R`2` - XORR R`ONE`,R`TWO` - ENDMACRO - - ; Double Nand Register with register - MACRO DNR.M - ONE SET `1` + 1 - TWO SET `2` + 1 - NR R`1`,R`2` - NR R`ONE`,R`TWO` - ENDMACRO - - ; Unsigned Compare Immediate - - MACRO UCIM.M - LAST SET `1` + 3 - PSHM R`1`,R`LAST` - LO SET `1` + 1 - LR R`LO`,R`1` - XORR R`1`,R`1` - HI SET `1` + 2 - XORR R`HI`,R`HI` - LIM R`LAST`,`2` - DCR R`1`,R`HI` - POPM R`1`,R`LAST` - ENDMACRO - - - ; Unsigned Compare Register with register - - MACRO UCR.M - PSHM R10,R13 ; R12 and R13 are assumed not to be input parameters - LR R13,R`2` - LR R11,R`1` - XORR R12,R12 - XORR R10,R10 - DCR R10,R12 - POPM R10,R13 - ENDMACRO - - - ; Unsigned Compare register with memory - - MACRO UC.M - PSHM R10,R13 - L R13,`2` - LR R11,R`1` - XORR R12,R12 - XORR R10,R10 - DCR R10,R12 - POPM R10,R13 - ENDMACRO - - - ; Double Unsigned Compare Register with register - - MACRO DUCR.M - PSHM R13,R14 ; R13 and R14 are assumed not to be input parameters - LOW1 SET `1` + 1 - LOW2 SET `2` + 1 - PSHM R`1`,R`LOW1` - PSHM R`2`,R`LOW2` - LR R13,R`LOW1` - LR R14,R`LOW2` - DSRL R`1`,1 - DSRL R`2`,1 - DCR R`1`,R`2` - BNE +6 - ANDM R13,1 - ANDM R14,1 - CR R13,R14 - POPM R`2`,R`LOW2` - POPM R`1`,R`LOW1` - POPM R13,R14 - ENDMACRO - - - ; Double Unsigned Compare register with memory - - MACRO DUC.M - PSHM R13,R14 ; R13 and R14 are assumed not to be input parameters - LOW1 SET `1` + 1 - PSHM R`1`,R`LOW1` - DL R13,`2` - DSRL R`1`,1 - DSRL R13,1 - DCR R`1`,R13 - BNE +10 ; done, go pop the saved regs - DL R13,`2` ; interested in the *low* word (R14) - L R13,1,R15 - ANDM R13,1 - ANDM R14,1 - CR R13,R14 - POPM R`1`,R`LOW1` - POPM R13,R14 - ENDMACRO - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/a29k.c gcc-3.3/gcc/config/a29k/a29k.c *** gcc-3.2.3/gcc/config/a29k/a29k.c 2001-12-17 15:05:25.000000000 +0000 --- gcc-3.3/gcc/config/a29k/a29k.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1606 **** - /* Subroutines used for code generation on AMD Am29000. - Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, - 1999, 2000 Free Software - Foundation, Inc. - Contributed by Richard Kenner (kenner@nyu.edu) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "config.h" - #include "system.h" - #include "rtl.h" - #include "tree.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "real.h" - #include "insn-config.h" - #include "conditions.h" - #include "output.h" - #include "insn-attr.h" - #include "flags.h" - #include "recog.h" - #include "function.h" - #include "expr.h" - #include "obstack.h" - #include "reload.h" - #include "tm_p.h" - #include "target.h" - #include "target-def.h" - - static int shift_constant_operand PARAMS ((rtx, enum machine_mode, int)); - static void a29k_set_memflags_1 PARAMS ((rtx, int, int, int, int)); - static void compute_regstack_size PARAMS ((void)); - static void check_epilogue_internal_label PARAMS ((FILE *)); - static void output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - static void output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); - static void a29k_asm_named_section PARAMS ((const char *, unsigned int)); - static int a29k_adjust_cost PARAMS ((rtx, rtx, rtx, int)); - - #define min(A,B) ((A) < (B) ? (A) : (B)) - - /* This gives the size in words of the register stack for the current - procedure. */ - - static int a29k_regstack_size; - - /* True if the current procedure has a call instruction. */ - - static int a29k_makes_calls; - - /* This points to the last insn of the insn prologue. It is set when - an insn without a filled delay slot is found near the start of the - function. */ - - static char *a29k_last_prologue_insn; - - /* This points to the first insn that will be in the epilogue. It is null if - no epilogue is required. */ - - static char *a29k_first_epilogue_insn; - - /* This is nonzero if a a29k_first_epilogue_insn was put in a delay slot. It - indicates that an intermediate label needs to be written. */ - - static int a29k_first_epilogue_insn_used; - - /* Location to hold the name of the current function. We need this prolog to - contain the tag words prior to the declaration. So the name must be stored - away. */ - - const char *a29k_function_name; - - /* Mapping of registers to debug register numbers. The only change is - for the frame pointer and the register numbers used for the incoming - arguments. */ - - int a29k_debug_reg_map[FIRST_PSEUDO_REGISTER]; - - /* Save information from a "cmpxx" operation until the branch or scc is - emitted. */ - - rtx a29k_compare_op0, a29k_compare_op1; - int a29k_compare_fp_p; - - /* Initialize the GCC target structure. */ - #undef TARGET_ASM_ALIGNED_HI_OP - #define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t" - #undef TARGET_ASM_ALIGNED_SI_OP - #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" - - #undef TARGET_ASM_FUNCTION_PROLOGUE - #define TARGET_ASM_FUNCTION_PROLOGUE output_function_prologue - #undef TARGET_ASM_FUNCTION_EPILOGUE - #define TARGET_ASM_FUNCTION_EPILOGUE output_function_epilogue - #undef TARGET_SCHED_ADJUST_COST - #define TARGET_SCHED_ADJUST_COST a29k_adjust_cost - - struct gcc_target targetm = TARGET_INITIALIZER; - - /* Returns 1 if OP is a 8-bit constant. */ - - int - cint_8_operand (op, mode) - register rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - return GET_CODE (op) == CONST_INT && (INTVAL (op) & 0xffffff00) == 0; - } - - /* Returns 1 if OP is a 16-bit constant. */ - - int - cint_16_operand (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - return GET_CODE (op) == CONST_INT && (INTVAL (op) & 0xffff0000) == 0; - } - - /* Returns 1 if OP is a constant that cannot be moved in a single insn. */ - - int - long_const_operand (op, mode) - register rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - if (! CONSTANT_P (op)) - return 0; - - if (TARGET_29050 && GET_CODE (op) == CONST_INT - && (INTVAL (op) & 0xffff) == 0) - return 0; - - return (GET_CODE (op) != CONST_INT - || ((INTVAL (op) & 0xffff0000) != 0 - && (INTVAL (op) & 0xffff0000) != 0xffff0000 - && INTVAL (op) != 0x80000000)); - } - - /* The following four functions detect constants of 0, 8, 16, and 24 used as - a position in ZERO_EXTRACT operations. They can either be the appropriate - constant integer or a shift (which will be produced by combine). */ - - static int - shift_constant_operand (op, mode, val) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - int val; - { - return ((GET_CODE (op) == CONST_INT && INTVAL (op) == val) - || (GET_CODE (op) == ASHIFT - && GET_CODE (XEXP (op, 0)) == CONST_INT - && INTVAL (XEXP (op, 0)) == val / 8 - && GET_CODE (XEXP (op, 1)) == CONST_INT - && INTVAL (XEXP (op, 1)) == 3)); - } - - int - const_0_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return shift_constant_operand (op, mode, 0); - } - - int - const_8_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return shift_constant_operand (op, mode, 8); - } - - int - const_16_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return shift_constant_operand (op, mode, 16); - } - - int - const_24_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return shift_constant_operand (op, mode, 24); - } - - /* Returns 1 if OP is a floating-point constant of the proper mode. */ - - int - float_const_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == mode; - } - - /* Returns 1 if OP is a floating-point constant of the proper mode or a - general-purpose register. */ - - int - gpc_reg_or_float_constant_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return float_const_operand (op, mode) || gpc_reg_operand (op, mode); - } - - /* Returns 1 if OP is an integer constant of the proper mode or a - general-purpose register. */ - - int - gpc_reg_or_integer_constant_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return ((GET_MODE (op) == VOIDmode - && (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE)) - || gpc_reg_operand (op, mode)); - } - - /* Returns 1 if OP is a special machine register. */ - - int - spec_reg_operand (op, mode) - rtx op; - enum machine_mode mode; - { - if (GET_CODE (op) != REG || GET_MODE (op) != mode) - return 0; - - switch (GET_MODE_CLASS (mode)) - { - case MODE_PARTIAL_INT: - return REGNO (op) >= R_BP && REGNO (op) <= R_CR; - case MODE_INT: - return REGNO (op) >= R_Q && REGNO (op) <= R_EXO; - default: - return 0; - } - } - - /* Returns 1 if OP is an accumulator register. */ - - int - accum_reg_operand (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - return (GET_CODE (op) == REG - && REGNO (op) >= R_ACU (0) && REGNO (op) <= R_ACU (3)); - } - - /* Returns 1 if OP is a normal data register. */ - - int - gpc_reg_operand (op, mode) - rtx op; - enum machine_mode mode; - { - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return 0; - - if (GET_CODE (op) == REG) - regno = REGNO (op); - else if (GET_CODE (op) == SUBREG && GET_CODE (SUBREG_REG (op)) == REG) - { - if (REGNO (SUBREG_REG (op)) < FIRST_PSEUDO_REGISTER) - regno = subreg_regno (op); - else - regno = REGNO (SUBREG_REG (op)); - } - else - return 0; - - return (regno >= FIRST_PSEUDO_REGISTER || regno < R_BP - || (regno >= R_KR (0) && regno <= R_KR (31))); - } - - /* Returns 1 if OP is either an 8-bit constant integer or a general register. - If a register, it must be in the proper mode unless MODE is VOIDmode. */ - - int - srcb_operand (op, mode) - register rtx op; - enum machine_mode mode; - { - if (GET_CODE (op) == CONST_INT - && (mode == QImode - || (INTVAL (op) & 0xffffff00) == 0)) - return 1; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return 0; - - return gpc_reg_operand (op, mode); - } - - int - cmplsrcb_operand (op, mode) - register rtx op; - enum machine_mode mode; - { - if (GET_CODE (op) == CONST_INT - && (mode == QImode - || (INTVAL (op) & 0xffffff00) == 0xffffff00)) - return 1; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return 0; - - return gpc_reg_operand (op, mode); - } - - /* Return 1 if OP is either an immediate or a general register. This is used - for the input operand of mtsr/mtrsim. */ - - int - gpc_reg_or_immediate_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return gpc_reg_operand (op, mode) || immediate_operand (op, mode); - } - - /* Return 1 if OP can be used as the second operand of and AND insn. This - includes srcb_operand and a constant whose complement fits in 8 bits. */ - - int - and_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (srcb_operand (op, mode) - || (GET_CODE (op) == CONST_INT - && ((unsigned) ((~ INTVAL (op)) & GET_MODE_MASK (mode)) < 256))); - } - - /* Return 1 if OP can be used as the second operand of an ADD insn. - This is the same as above, except we use negative, rather than - complement. */ - - int - add_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (srcb_operand (op, mode) - || (GET_CODE (op) == CONST_INT - && ((unsigned) ((- INTVAL (op)) & GET_MODE_MASK (mode)) < 256))); - } - - /* Return 1 if OP is a valid address in a CALL_INSN. These are a SYMBOL_REF - to the current function, all SYMBOL_REFs if TARGET_SMALL_MEMORY, or - a sufficiently-small constant. */ - - int - call_operand (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - switch (GET_CODE (op)) - { - case SYMBOL_REF: - return (TARGET_SMALL_MEMORY - || (! TARGET_LARGE_MEMORY - && ((GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FLAG (op)) - || ! strcmp (XSTR (op, 0), current_function_name)))); - - case CONST_INT: - return (unsigned HOST_WIDE_INT) INTVAL (op) < 0x40000; - - default: - return 0; - } - } - - /* Return 1 if OP can be used as the input operand for a move insn. */ - - int - in_operand (op, mode) - rtx op; - enum machine_mode mode; - { - if (! general_operand (op, mode)) - return 0; - - while (GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - - switch (GET_CODE (op)) - { - case REG: - return 1; - - case MEM: - return (GET_MODE_SIZE (mode) >= UNITS_PER_WORD || TARGET_DW_ENABLE); - - case CONST_INT: - if (GET_MODE_CLASS (mode) != MODE_INT - && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) - return 0; - - return 1; - - case CONST: - case SYMBOL_REF: - case LABEL_REF: - return (GET_MODE (op) == mode - || mode == SImode || mode == HImode || mode == QImode); - - case CONST_DOUBLE: - return ((GET_MODE_CLASS (mode) == MODE_FLOAT - && mode == GET_MODE (op)) - || (GET_MODE (op) == VOIDmode - && GET_MODE_CLASS (mode) == MODE_INT)); - - default: - return 0; - } - } - - /* Return 1 if OP can be used as the output operand for a move insn. */ - - int - out_operand (op, mode) - rtx op; - enum machine_mode mode; - { - rtx orig_op = op; - - if (! general_operand (op, mode)) - return 0; - - while (GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - - if (GET_CODE (op) == REG) - return (gpc_reg_operand (orig_op, mode) - || spec_reg_operand (orig_op, mode) - || (GET_MODE_CLASS (mode) == MODE_FLOAT - && accum_reg_operand (orig_op, mode))); - - else if (GET_CODE (op) == MEM) - return (GET_MODE_SIZE (mode) >= UNITS_PER_WORD || TARGET_DW_ENABLE); - else - return 0; - } - - /* Return 1 if OP is an item in memory, given that we are in reload. */ - - int - reload_memory_operand (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - int regno = true_regnum (op); - - return (! CONSTANT_P (op) - && (regno == -1 - || (GET_CODE (op) == REG - && REGNO (op) >= FIRST_PSEUDO_REGISTER))); - } - - /* Given an object for which reload_memory_operand is true, return the address - of the operand, taking into account anything that reload may do. */ - - rtx - a29k_get_reloaded_address (op) - rtx op; - { - if (GET_CODE (op) == SUBREG) - { - if (SUBREG_BYTE (op) != 0) - abort (); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) == REG) - op = reg_equiv_mem[REGNO (op)]; - - return find_replacement (&XEXP (op, 0)); - } - - /* Subfunction of the following function. Update the flags of any MEM - found in part of X. */ - - static void - a29k_set_memflags_1 (x, in_struct_p, scalar_p, volatile_p, unchanging_p) - rtx x; - int in_struct_p, scalar_p, volatile_p, unchanging_p; - { - int i; - - switch (GET_CODE (x)) - { - case SEQUENCE: - case PARALLEL: - for (i = XVECLEN (x, 0) - 1; i >= 0; i--) - a29k_set_memflags_1 (XVECEXP (x, 0, i), in_struct_p, scalar_p, - volatile_p, unchanging_p); - break; - - case INSN: - a29k_set_memflags_1 (PATTERN (x), in_struct_p, scalar_p, volatile_p, - unchanging_p); - break; - - case SET: - a29k_set_memflags_1 (SET_DEST (x), in_struct_p, scalar_p, volatile_p, - unchanging_p); - a29k_set_memflags_1 (SET_SRC (x), in_struct_p, scalar_p, volatile_p, - unchanging_p); - break; - - case MEM: - MEM_IN_STRUCT_P (x) = in_struct_p; - MEM_SCALAR_P (x) = scalar_p; - MEM_VOLATILE_P (x) = volatile_p; - RTX_UNCHANGING_P (x) = unchanging_p; - break; - - default: - break; - } - } - - /* Given INSN, which is either an INSN or a SEQUENCE generated to - perform a memory operation, look for any MEMs in either a SET_DEST or - a SET_SRC and copy the in-struct, unchanging, and volatile flags from - REF into each of the MEMs found. If REF is not a MEM, don't do - anything. */ - - void - a29k_set_memflags (insn, ref) - rtx insn; - rtx ref; - { - /* Note that it is always safe to get these flags, though they won't - be what we think if REF is not a MEM. */ - int in_struct_p = MEM_IN_STRUCT_P (ref); - int scalar_p = MEM_SCALAR_P (ref); - int volatile_p = MEM_VOLATILE_P (ref); - int unchanging_p = RTX_UNCHANGING_P (ref); - - if (GET_CODE (ref) != MEM - || (! in_struct_p && ! volatile_p && ! unchanging_p)) - return; - - a29k_set_memflags_1 (insn, in_struct_p, scalar_p, volatile_p, unchanging_p); - } - - /* Return 1 if OP is a comparison operator that we have in floating-point. */ - - int - fp_comparison_operator (op, mode) - rtx op; - enum machine_mode mode; - { - return ((mode == VOIDmode || mode == GET_MODE (op)) - && (GET_CODE (op) == EQ || GET_CODE (op) == GT || - GET_CODE (op) == GE)); - } - - /* Return 1 if OP is a valid branch comparison. */ - - int - branch_operator (op, mode) - rtx op; - enum machine_mode mode; - { - return ((mode == VOIDmode || mode == GET_MODE (op)) - && (GET_CODE (op) == GE || GET_CODE (op) == LT)); - } - - /* Return 1 if OP is a load multiple operation. It is known to be a - PARALLEL and the first three sections will be tested. */ - - int - load_multiple_operation (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - int count = XVECLEN (op, 0) - 2; - int dest_regno; - rtx src_addr; - int i; - - /* Perform a quick check so we don't blow up below. */ - if (count <= 1 - || GET_CODE (XVECEXP (op, 0, 0)) != SET - || GET_CODE (SET_DEST (XVECEXP (op, 0, 0))) != REG - || GET_CODE (SET_SRC (XVECEXP (op, 0, 0))) != MEM) - return 0; - - dest_regno = REGNO (SET_DEST (XVECEXP (op, 0, 0))); - src_addr = XEXP (SET_SRC (XVECEXP (op, 0, 0)), 0); - - for (i = 1; i < count; i++) - { - rtx elt = XVECEXP (op, 0, i + 2); - - if (GET_CODE (elt) != SET - || GET_CODE (SET_DEST (elt)) != REG - || GET_MODE (SET_DEST (elt)) != SImode - || REGNO (SET_DEST (elt)) != dest_regno + i - || GET_CODE (SET_SRC (elt)) != MEM - || GET_MODE (SET_SRC (elt)) != SImode - || GET_CODE (XEXP (SET_SRC (elt), 0)) != PLUS - || ! rtx_equal_p (XEXP (XEXP (SET_SRC (elt), 0), 0), src_addr) - || GET_CODE (XEXP (XEXP (SET_SRC (elt), 0), 1)) != CONST_INT - || INTVAL (XEXP (XEXP (SET_SRC (elt), 0), 1)) != i * 4) - return 0; - } - - return 1; - } - - /* Similar, but tests for store multiple. */ - - int - store_multiple_operation (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - int num_special = TARGET_NO_STOREM_BUG ? 2 : 1; - int count = XVECLEN (op, 0) - num_special; - int src_regno; - rtx dest_addr; - int i; - - /* Perform a quick check so we don't blow up below. */ - if (count <= 1 - || GET_CODE (XVECEXP (op, 0, 0)) != SET - || GET_CODE (SET_DEST (XVECEXP (op, 0, 0))) != MEM - || GET_CODE (SET_SRC (XVECEXP (op, 0, 0))) != REG) - return 0; - - src_regno = REGNO (SET_SRC (XVECEXP (op, 0, 0))); - dest_addr = XEXP (SET_DEST (XVECEXP (op, 0, 0)), 0); - - for (i = 1; i < count; i++) - { - rtx elt = XVECEXP (op, 0, i + num_special); - - if (GET_CODE (elt) != SET - || GET_CODE (SET_SRC (elt)) != REG - || GET_MODE (SET_SRC (elt)) != SImode - || REGNO (SET_SRC (elt)) != src_regno + i - || GET_CODE (SET_DEST (elt)) != MEM - || GET_MODE (SET_DEST (elt)) != SImode - || GET_CODE (XEXP (SET_DEST (elt), 0)) != PLUS - || ! rtx_equal_p (XEXP (XEXP (SET_DEST (elt), 0), 0), dest_addr) - || GET_CODE (XEXP (XEXP (SET_DEST (elt), 0), 1)) != CONST_INT - || INTVAL (XEXP (XEXP (SET_DEST (elt), 0), 1)) != i * 4) - return 0; - } - - return 1; - } - - /* Given a special register REG and MASK, a value being masked against a - quantity to which the special register is set, return 1 if the masking - operation is built-in to the setting of that special register. */ - - int - masks_bits_for_special (reg, mask) - rtx reg; - rtx mask; - { - int needed_mask_value; - - if (GET_CODE (reg) != REG || GET_CODE (mask) != CONST_INT) - abort (); - - switch (REGNO (reg)) - { - case R_BP: - case R_INT: - needed_mask_value = 3; - break; - - case R_FC: - needed_mask_value = 31; - break; - - case R_CR: - case R_LRU: - needed_mask_value = 255; - break; - - case R_FPE: - needed_mask_value = 511; - break; - - case R_MMU: - needed_mask_value = 0x3ff; - break; - - case R_OPS: - case R_CPS: - case R_RBP: - case R_FPS: - needed_mask_value = 0xffff; - break; - - case R_VAB: - needed_mask_value = 0xffff0000; - break; - - case R_Q: - case R_CFG: - case R_CHA: - case R_CHD: - case R_CHC: - case R_TMC: - case R_TMR: - case R_PC0: - case R_PC1: - case R_PC2: - return 0; - - default: - abort (); - } - - return (INTVAL (mask) & ~ needed_mask_value) == 0; - } - - /* Return nonzero if this label is that of the return point, but there is - a non-null epilogue. */ - - int - epilogue_operand (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - return next_active_insn (op) == 0 && a29k_first_epilogue_insn != 0; - } - - /* Return the register class of a scratch register needed to copy IN into - or out of a register in CLASS in MODE. If it can be done directly, - NO_REGS is returned. */ - - enum reg_class - secondary_reload_class (class, mode, in) - enum reg_class class; - enum machine_mode mode; - rtx in; - { - int regno = -1; - enum rtx_code code = GET_CODE (in); - - if (! CONSTANT_P (in)) - { - regno = true_regnum (in); - - /* A pseudo is the same as memory. */ - if (regno == -1 || regno >= FIRST_PSEUDO_REGISTER) - code = MEM; - } - - /* If we are transferring between memory and a multi-word mode, we need - CR. */ - - if (code == MEM && GET_MODE_SIZE (mode) > UNITS_PER_WORD) - return CR_REGS; - - /* If between memory and a mode smaller than a word without DW being - enabled, we need BP. */ - - if (code == MEM && ! TARGET_DW_ENABLE - && GET_MODE_SIZE (mode) < UNITS_PER_WORD) - return BP_REGS; - - /* Otherwise, we can place anything into GENERAL_REGS and can put - GENERAL_REGS into anything. */ - if (class == GENERAL_REGS - || (regno != -1 - && (regno < R_BP - || (regno >= R_KR (0) && regno <= R_KR (31))))) - return NO_REGS; - - /* We can place 16-bit constants into a special register. */ - if (code == CONST_INT - && (GET_MODE_BITSIZE (mode) <= 16 || (unsigned) INTVAL (in) <= 65535) - && (class == BP_REGS || class == Q_REGS || class == SPECIAL_REGS)) - return NO_REGS; - - /* Otherwise, we need GENERAL_REGS. */ - return GENERAL_REGS; - } - - /* START is the zero-based incoming argument register index used (0 is 160, - i.e., the first incoming argument register) and COUNT is the number used. - - Mark the corresponding incoming registers as neither fixed nor call used. - For each register used for incoming arguments, we have one less local - register that can be used. So also mark some high-numbered registers as - fixed. - - Return the first register number to use for the argument. */ - - int - incoming_reg (start, count) - int start; - int count; - { - int i; - - /* We only use 16 argument registers, so truncate at the end of the - area. */ - if (start + count > 16) - count = 16 - start; - - if (! TARGET_NO_REUSE_ARGS) - /* Mark all the used registers as not fixed and saved over calls. */ - for (i = R_AR (start); i < R_AR (start + count); i++) - { - fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 0; - CLEAR_HARD_REG_BIT (fixed_reg_set, i); - CLEAR_HARD_REG_BIT (call_used_reg_set, i); - CLEAR_HARD_REG_BIT (call_fixed_reg_set, i); - } - - /* Shorten the maximum size of the frame. - Remember that R_AR(-1,-2) are place holders for the caller's lr0,lr1. - Make sure to keep the frame rounded to an even boundary. Rounding up - to an 8 byte boundary will use a slot. Otherwise a frame with 121 local - regs and 5 arguments will overrun the stack (121+1 + 5 + 2 > 128). */ - /* ??? An alternative would be to never allocate one reg. */ - for (i = (R_AR (0) - 2 - start - count) & ~1; i < R_AR (0) - 2 - start; i++) - { - fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; - SET_HARD_REG_BIT (fixed_reg_set, i); - SET_HARD_REG_BIT (call_used_reg_set, i); - SET_HARD_REG_BIT (call_fixed_reg_set, i); - } - - return R_AR (start); - } - - /* Add CLOBBERs to CALL_INSN_FUNCTION_USAGE chain of INSN indicating - that LR2 up to, but not including, OP are clobbered. If OP is - zero, indicate all parameter registers are clobbered. */ - - void - a29k_clobbers_to (insn, op) - rtx insn; - rtx op; - { - int i; - int high_regno; - - if (op == 0) - high_regno = R_LR (18); - else if (GET_CODE (op) != REG || REGNO (op) < R_LR (0) - || REGNO (op) > R_LR (18)) - abort (); - else - high_regno = REGNO (op); - - for (i = R_LR (2); i < high_regno; i++) - CALL_INSN_FUNCTION_USAGE (insn) - = gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_CLOBBER (VOIDmode, - gen_rtx (REG, SImode, i)), - CALL_INSN_FUNCTION_USAGE (insn)); - } - - /* These routines are used in finding insns to fill delay slots in the - epilogue. */ - - /* Return 1 if the current function will adjust the register stack. */ - - int - needs_regstack_p () - { - int i; - rtx insn; - - if (frame_pointer_needed) - return 1; - - /* If any local register is used, we need to adjust the regstack. */ - for (i = R_LR (127); i >= R_LR (0); i --) - if (regs_ever_live[i]) - return 1; - - /* We need a register stack if we make any calls. */ - for (insn = get_insns (); insn; insn = next_insn (insn)) - if (GET_CODE (insn) == CALL_INSN - || (GET_CODE (insn) == INSN - && GET_CODE (PATTERN (insn)) == SEQUENCE - && GET_CODE (XVECEXP (PATTERN (insn), 0, 0)) == CALL_INSN)) - return 1; - - /* Otherwise, we don't. */ - return 0; - } - - /* Return 1 if X uses a local register. */ - - int - uses_local_reg_p (x) - rtx x; - { - const char *fmt; - int i, j; - - switch (GET_CODE (x)) - { - case REG: - return REGNO (x) >= R_LR (0) && REGNO (x) <= R_FP; - - case CONST_INT: - case CONST: - case PC: - case CC0: - case LABEL_REF: - case SYMBOL_REF: - return 0; - - default: - break; - } - - fmt = GET_RTX_FORMAT (GET_CODE (x)); - for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) - { - if (fmt[i] == 'e') - { - if (uses_local_reg_p (XEXP (x, i))) - return 1; - } - else if (fmt[i] == 'E') - { - for (j = XVECLEN (x, i) - 1; j >= 0; j--) - if (uses_local_reg_p (XVECEXP (x, i, j))) - return 1; - } - } - - return 0; - } - - /* Returns 1 if this function is known to have a null epilogue. */ - - int - null_epilogue () - { - return (reload_completed && ! needs_regstack_p () - && get_frame_size () == 0 - && current_function_pretend_args_size == 0); - } - - /* Write out the assembler form of an operand. Recognize the following - special options: - - %N means write the low-order 8 bits of the negative of the constant - %Q means write a QImode operand (truncate constants to 8 bits) - %M means write the low-order 16 bits of the constant - %m means write the low-order 16 bits shifted left 16 bits - %C means write the low-order 8 bits of the complement of the constant - %b means write `f' is this is a reversed condition, `t' otherwise - %B means write `t' is this is a reversed condition, `f' otherwise - %J means write the 29k opcode part for a comparison operation - %e means write the label with an extra `X' is this is the epilogue - otherwise the normal label name - %E means write nothing if this insn has a delay slot, - a nop unless this is the epilogue label, in which case - write the first epilogue insn - %F means write just the normal operand if the insn has a delay slot; - otherwise, this is a recursive call so output the - symbol + 4 and write the first prologue insn in the - delay slot. - %L means write the register number plus one ("low order" register) - or the low-order part of a multi-word constant - %O means write the register number plus two - %P means write the register number plus three ("low order" of TImode) - %S means write the number of words in the mode of the operand, - minus one (for CR) - %V means write the number of elements in a PARALLEL minus 1 - %# means write nothing if we have a delay slot, "\n\tnop" otherwise - %* means write the register name for TPC. */ - - void - print_operand (file, x, code) - FILE *file; - rtx x; - char code; - { - char buf[100]; - - /* These macros test for integers and extract the low-order bits. */ - #define INT_P(X) \ - ((GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST_DOUBLE) \ - && GET_MODE (X) == VOIDmode) - - #define INT_LOWPART(X) \ - (GET_CODE (X) == CONST_INT ? INTVAL (X) : CONST_DOUBLE_LOW (X)) - - switch (code) - { - case 'Q': - if (GET_CODE (x) == REG) - break; - else if (! INT_P (x)) - output_operand_lossage ("invalid %%Q value"); - fprintf (file, "%d", INT_LOWPART (x) & 0xff); - return; - - case 'C': - if (! INT_P (x)) - output_operand_lossage ("invalid %%C value"); - fprintf (file, "%d", (~ INT_LOWPART (x)) & 0xff); - return; - - case 'N': - if (! INT_P (x)) - output_operand_lossage ("invalid %%N value"); - fprintf (file, "%d", (- INT_LOWPART (x)) & 0xff); - return; - - case 'M': - if (! INT_P (x)) - output_operand_lossage ("invalid %%M value"); - fprintf (file, "%d", INT_LOWPART (x) & 0xffff); - return; - - case 'm': - if (! INT_P (x)) - output_operand_lossage ("invalid %%m value"); - fprintf (file, "%d", (INT_LOWPART (x) & 0xffff) << 16); - return; - - case 'b': - if (GET_CODE (x) == GE) - fprintf (file, "f"); - else - fprintf (file, "t"); - return; - - case 'B': - if (GET_CODE (x) == GE) - fprintf (file, "t"); - else - fprintf (file, "f"); - return; - - case 'J': - /* It so happens that the RTX names for the conditions are the same as - the 29k's insns except for "ne", which requires "neq". */ - fprintf (file, GET_RTX_NAME (GET_CODE (x))); - if (GET_CODE (x) == NE) - fprintf (file, "q"); - return; - - case 'e': - if (optimize && flag_delayed_branch - && a29k_last_prologue_insn == 0 && epilogue_operand (x, VOIDmode) - && dbr_sequence_length () == 0) - { - /* We need to output the label number of the last label in the - function, which is not necessarily X since there might be - a USE insn in between. First go forward to the last insn, then - back up to a label. */ - while (NEXT_INSN (x) != 0) - x = NEXT_INSN (x); - - while (GET_CODE (x) != CODE_LABEL) - x = PREV_INSN (x); - - ASM_GENERATE_INTERNAL_LABEL (buf, "LX", CODE_LABEL_NUMBER (x)); - assemble_name (file, buf); - } - else - output_asm_label (x); - return; - - case 'E': - if (dbr_sequence_length ()) - ; - else if (a29k_last_prologue_insn) - { - fprintf (file, "\n\t%s", a29k_last_prologue_insn); - free (a29k_last_prologue_insn); - a29k_last_prologue_insn = 0; - } - else if (optimize && flag_delayed_branch - && epilogue_operand (x, VOIDmode)) - { - fprintf (file, "\n\t%s", a29k_first_epilogue_insn); - a29k_first_epilogue_insn_used = 1; - } - else - fprintf (file, "\n\tnop"); - return; - - case 'F': - output_addr_const (file, x); - if (dbr_sequence_length () == 0) - { - /* If this doesn't have its delay slot filled, see if we need to - put the last insn of the prolog in it. If not, see if this is - a recursive call. If so, we can put the first insn of its - prolog in the delay slot. Otherwise, write a nop. */ - if (a29k_last_prologue_insn) - { - fprintf (file, "\n\t%s", a29k_last_prologue_insn); - free (a29k_last_prologue_insn); - a29k_last_prologue_insn = 0; - } - else if (GET_CODE (x) == SYMBOL_REF - && ! strcmp (XSTR (x, 0), current_function_name)) - fprintf (file, "+4\n\t%s,%d", - a29k_regstack_size >= 64 ? "const gr121" : "sub gr1,gr1", - a29k_regstack_size * 4); - else - fprintf (file, "\n\tnop"); - } - return; - - case 'L': - if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode) - { - union real_extract u; - - memcpy ((char *) &u, (char *) &CONST_DOUBLE_LOW (x), sizeof u); - fprintf (file, "$double1(%.20e)", u.d); - } - else if (GET_CODE (x) == REG) - fprintf (file, "%s", reg_names[REGNO (x) + 1]); - else - output_operand_lossage ("invalid %%L value"); - return; - - case 'O': - if (GET_CODE (x) != REG) - output_operand_lossage ("invalid %%O value"); - fprintf (file, "%s", reg_names[REGNO (x) + 2]); - return; - - case 'P': - if (GET_CODE (x) != REG) - output_operand_lossage ("invalid %%P value"); - fprintf (file, "%s", reg_names[REGNO (x) + 3]); - return; - - case 'S': - fprintf (file, "%d", (GET_MODE_SIZE (GET_MODE (x)) / UNITS_PER_WORD)-1); - return; - - case 'V': - if (GET_CODE (x) != PARALLEL) - output_operand_lossage ("invalid %%V value"); - fprintf (file, "%d", XVECLEN (x, 0) - 2); - return; - - case '#': - if (dbr_sequence_length () == 0) - { - if (a29k_last_prologue_insn) - { - fprintf (file, "\n\t%s", a29k_last_prologue_insn); - free (a29k_last_prologue_insn); - a29k_last_prologue_insn = 0; - } - else - fprintf (file, "\n\tnop"); - } - return; - - case '*': - fprintf (file, "%s", reg_names [R_TPC]); - return; - } - - if (GET_CODE (x) == REG) - fprintf (file, "%s", reg_names [REGNO (x)]); - - else if (GET_CODE (x) == MEM) - output_address (XEXP (x, 0)); - - else if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == SUBREG - && GET_CODE (SUBREG_REG (XEXP (x, 0))) == CONST_DOUBLE) - { - union real_extract u; - - if (GET_MODE (SUBREG_REG (XEXP (x, 0))) == SFmode) - fprintf (file, "$float"); - else - fprintf (file, "$double%d", - (SUBREG_BYTE (XEXP (x, 0)) / GET_MODE_SIZE (GET_MODE (x)))); - memcpy ((char *) &u, - (char *) &CONST_DOUBLE_LOW (SUBREG_REG (XEXP (x, 0))), sizeof u); - fprintf (file, "(%.20e)", u.d); - } - - else if (GET_CODE (x) == CONST_DOUBLE - && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) - { - union real_extract u; - - memcpy ((char *) &u, (char *) &CONST_DOUBLE_LOW (x), sizeof u); - fprintf (file, "$%s(%.20e)", - GET_MODE (x) == SFmode ? "float" : "double0", u.d); - } - - else - output_addr_const (file, x); - } - - /* This page contains routines to output function prolog and epilog code. */ - - /* Compute the size of the register stack, and determine if there are any - call instructions. */ - - static void - compute_regstack_size () - { - int i; - rtx insn; - - /* See if we make any calls. We need to set lr1 if so. */ - a29k_makes_calls = 0; - for (insn = get_insns (); insn; insn = next_insn (insn)) - if (GET_CODE (insn) == CALL_INSN - || (GET_CODE (insn) == INSN - && GET_CODE (PATTERN (insn)) == SEQUENCE - && GET_CODE (XVECEXP (PATTERN (insn), 0, 0)) == CALL_INSN)) - { - a29k_makes_calls = 1; - break; - } - - /* Find the highest local register used. */ - for (i = R_LR (127); i >= R_LR (0); i--) - if (regs_ever_live[i]) - break; - - a29k_regstack_size = i - (R_LR (0) - 1); - - /* If calling routines, ensure we count lr0 & lr1. */ - if (a29k_makes_calls && a29k_regstack_size < 2) - a29k_regstack_size = 2; - - /* Count frame pointer and align to 8 byte boundary (even number of - registers). */ - a29k_regstack_size += frame_pointer_needed; - if (a29k_regstack_size & 1) a29k_regstack_size++; - } - - /* Sets register names for incoming arguments and frame pointer. - This can't be computed until after register allocation. */ - - void - a29k_compute_reg_names () - { - int i; - - compute_regstack_size (); - - /* Set the names and numbers of the frame pointer and incoming argument - registers. */ - - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - a29k_debug_reg_map[i] = i; - - reg_names[FRAME_POINTER_REGNUM] = reg_names[R_LR (a29k_regstack_size - 1)]; - a29k_debug_reg_map[FRAME_POINTER_REGNUM] = R_LR (a29k_regstack_size - 1); - - for (i = 0; i < 16; i++) - { - reg_names[R_AR (i)] = reg_names[R_LR (a29k_regstack_size + i + 2)]; - a29k_debug_reg_map[R_AR (i)] = R_LR (a29k_regstack_size + i + 2); - } - - /* If using kernel register map, swap numbers for kernel and user - registers. */ - if (TARGET_KERNEL_REGISTERS) - for (i = 0; i < 32; i++) - { - int tem = a29k_debug_reg_map[i]; - a29k_debug_reg_map[i] = a29k_debug_reg_map[R_KR (i)]; - a29k_debug_reg_map[R_KR (i)] = tem; - } - } - - /* Output function prolog code to file FILE. Memory stack size is SIZE. */ - - static void - output_function_prologue (file, size) - FILE *file; - HOST_WIDE_INT size; - { - int i; - int arg_count = 0; - rtx insn; - unsigned int tag_word; - - /* See how many incoming arguments we have in registers. */ - for (i = R_AR (0); i < R_AR (16); i++) - if (! fixed_regs[i]) - arg_count++; - - /* The argument count includes the caller's lr0 and lr1. */ - arg_count += 2; - - /* Compute memory stack size. Add in number of bytes that the we should - push and pretend the caller did and the size of outgoing arguments. - Then round to a doubleword boundary. */ - size += (current_function_pretend_args_size - + current_function_outgoing_args_size); - size = (size + 7) & ~7; - - /* Write header words. See if one or two word form. */ - tag_word = (frame_pointer_needed ? 0x400000 : 0) + (arg_count << 16); - - if (size / 8 > 0xff) - fprintf (file, "\t.word %d, 0x%0x\n", (size / 8) << 2, - 0x800000 + tag_word); - else - fprintf (file, "\t.word 0x%0x\n", tag_word + ((size / 8) << 3)); - - /* Define the function name. */ - assemble_name (file, a29k_function_name); - fprintf (file, ":\n"); - - /* Push the register stack by the proper amount. There are two possible - ways to do this. */ - if (a29k_regstack_size >= 256/4) - fprintf (file, "\tconst %s,%d\n\tsub gr1,gr1,%s\n", - reg_names[R_TAV], a29k_regstack_size * 4, reg_names[R_TAV]); - else if (a29k_regstack_size) - fprintf (file, "\tsub gr1,gr1,%d\n", a29k_regstack_size * 4); - - /* Test that the registers are available. */ - if (a29k_regstack_size) - fprintf (file, "\tasgeu V_%sSPILL,gr1,%s\n", - TARGET_KERNEL_REGISTERS ? "K" : "", reg_names[R_RAB]); - - /* Set up frame pointer, if one is needed. */ - if (frame_pointer_needed) - fprintf (file, "\tsll %s,%s,0\n", reg_names[FRAME_POINTER_REGNUM], - reg_names[R_MSP]); - - /* Make room for any frame space. There are three ways to do this. */ - if (size >= 256) - { - fprintf (file, "\tconst %s,%d\n", reg_names[R_TAV], size); - if (size >= 65536) - fprintf (file, "\tconsth %s,%d\n", reg_names[R_TAV], size); - if (TARGET_STACK_CHECK) - fprintf (file, "\tcall %s,__msp_check\n", reg_names[R_TPC]); - fprintf (file, "\tsub %s,%s,%s\n", - reg_names[R_MSP], reg_names[R_MSP], reg_names[R_TAV]); - } - else if (size) - { - if (TARGET_STACK_CHECK) - fprintf (file, "\tcall %s,__msp_check\n", reg_names[R_TPC]); - fprintf (file, "\tsub %s,%s,%d\n", - reg_names[R_MSP], reg_names[R_MSP], size); - } - - /* If this routine will make calls, set lr1. If we see an insn that - can use a delay slot before a call or jump, save this insn for that - slot (this condition is equivalent to seeing if we have an insn that - needs delay slots before an insn that has a filled delay slot). */ - a29k_last_prologue_insn = 0; - if (a29k_makes_calls) - { - i = (a29k_regstack_size + arg_count) * 4; - if (i >= 256) - fprintf (file, "\tconst %s,%d\n\tadd lr1,gr1,%s\n", - reg_names[R_TAV], i, reg_names[R_TAV]); - else - { - if (optimize && flag_delayed_branch) - for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - { - if (GET_CODE (insn) == CODE_LABEL - || (GET_CODE (insn) == INSN - && GET_CODE (PATTERN (insn)) == SEQUENCE)) - break; - - if (GET_CODE (insn) == NOTE - || (GET_CODE (insn) == INSN - && (GET_CODE (PATTERN (insn)) == USE - || GET_CODE (PATTERN (insn)) == CLOBBER))) - continue; - - if (num_delay_slots (insn) > 0) - { - a29k_last_prologue_insn = (char *) xmalloc (100); - sprintf (a29k_last_prologue_insn, "add lr1,gr1,%d", i); - break; - } - } - - if (a29k_last_prologue_insn == 0) - fprintf (file, "\tadd lr1,gr1,%d\n", i); - } - } - - /* Compute the first insn of the epilogue. */ - a29k_first_epilogue_insn_used = 0; - - if (size == 0 && a29k_regstack_size == 0 && ! frame_pointer_needed) - a29k_first_epilogue_insn = 0; - else - a29k_first_epilogue_insn = (char *) xmalloc (100); - - if (frame_pointer_needed) - sprintf (a29k_first_epilogue_insn, "sll %s,%s,0", - reg_names[R_MSP], reg_names[FRAME_POINTER_REGNUM]); - else if (a29k_regstack_size) - { - if (a29k_regstack_size >= 256 / 4) - sprintf (a29k_first_epilogue_insn, "const %s,%d", - reg_names[R_TAV], a29k_regstack_size * 4); - else - sprintf (a29k_first_epilogue_insn, "add gr1,gr1,%d", - a29k_regstack_size * 4); - } - else if (size) - { - if (size >= 256) - sprintf (a29k_first_epilogue_insn, "const %s,%d", - reg_names[R_TAV], size); - else - sprintf (a29k_first_epilogue_insn, "add %s,%s,%d", - reg_names[R_MSP], reg_names[R_MSP], size); - } - } - - /* Call this after writing what might be the first instruction of the - epilogue. If that first insn was used in a delay slot, an intermediate - label is written. */ - - static void - check_epilogue_internal_label (file) - FILE *file; - { - rtx insn; - - if (! a29k_first_epilogue_insn_used) - return; - - for (insn = get_last_insn (); - GET_CODE (insn) != CODE_LABEL; - insn = PREV_INSN (insn)) - ; - - ASM_OUTPUT_INTERNAL_LABEL (file, "LX", CODE_LABEL_NUMBER (insn)); - a29k_first_epilogue_insn_used = 0; - } - - /* Output the epilog of the last procedure to file FILE. SIZE is the memory - stack size. The register stack size is in the variable - A29K_REGSTACK_SIZE. */ - - static void - output_function_epilogue (file, size) - FILE *file; - HOST_WIDE_INT size; - { - rtx insn; - int locals_unavailable = 0; /* True until after first insn - after gr1 update. */ - - /* If we hit a BARRIER before a real insn or CODE_LABEL, we don't - need to do anything because we are never jumped to. */ - insn = get_last_insn (); - if (GET_CODE (insn) == NOTE) - insn = prev_nonnote_insn (insn); - - if (insn && GET_CODE (insn) == BARRIER) - return; - - /* If a frame pointer was needed we must restore the memory stack pointer - before adjusting the register stack. */ - if (frame_pointer_needed) - { - fprintf (file, "\tsll %s,%s,0\n", - reg_names[R_MSP], reg_names[FRAME_POINTER_REGNUM]); - check_epilogue_internal_label (file); - } - - /* Restore the register stack. There are two ways to do this. */ - if (a29k_regstack_size) - { - if (a29k_regstack_size >= 256/4) - { - fprintf (file, "\tconst %s,%d\n", - reg_names[R_TAV], a29k_regstack_size * 4); - check_epilogue_internal_label (file); - fprintf (file, "\tadd gr1,gr1,%s\n", reg_names[R_TAV]); - } - else - { - fprintf (file, "\tadd gr1,gr1,%d\n", a29k_regstack_size * 4); - check_epilogue_internal_label (file); - } - locals_unavailable = 1; - } - - /* Restore the memory stack pointer if there is no frame pointer. - Adjust the size to include any pretend arguments and pushed - arguments and round to doubleword boundary. */ - size += (current_function_pretend_args_size - + current_function_outgoing_args_size); - size = (size + 7) & ~7; - - if (size && ! frame_pointer_needed) - { - if (size >= 256) - { - fprintf (file, "\tconst %s,%d\n", reg_names[R_TAV], size); - check_epilogue_internal_label (file); - locals_unavailable = 0; - if (size >= 65536) - fprintf (file, "\tconsth %s,%d\n", reg_names[R_TAV], size); - fprintf (file, "\tadd %s,%s,%s\n", - reg_names[R_MSP], reg_names[R_MSP], reg_names[R_TAV]); - } - else - { - fprintf (file, "\tadd %s,%s,%d\n", - reg_names[R_MSP], reg_names[R_MSP], size); - check_epilogue_internal_label (file); - locals_unavailable = 0; - } - } - - if (locals_unavailable) - { - /* If we have an insn for this delay slot, write it. */ - if (current_function_epilogue_delay_list) - final_scan_insn (XEXP (current_function_epilogue_delay_list, 0), - file, 1, -2, 1); - else - fprintf (file, "\tnop\n"); - } - - fprintf (file, "\tjmpi lr0\n"); - if (a29k_regstack_size) - fprintf (file, "\tasleu V_%sFILL,lr1,%s\n", - TARGET_KERNEL_REGISTERS ? "K" : "", reg_names[R_RFB]); - else if (current_function_epilogue_delay_list) - final_scan_insn (XEXP (current_function_epilogue_delay_list, 0), - file, 1, -2, 1); - else - fprintf (file, "\tnop\n"); - - if (a29k_first_epilogue_insn) - free (a29k_first_epilogue_insn); - a29k_first_epilogue_insn = 0; - } - - static void - a29k_asm_named_section (name, flags) - const char *name; - unsigned int flags ATTRIBUTE_UNUSED; - { - /* ??? Is it really correct to mark all sections as "bss"? */ - fprintf (asm_out_file, "\t.sect %s, bss\n\t.use %s\n", name, name); - } - - /* Return a new value for COST based on the relationship between INSN - that is dependent on DEP_INSN through the dependence LINK. The - default is to make no adjustment to COST. - - On the a29k, ignore the cost of anti- and output-dependencies. */ - static int - a29k_adjust_cost (insn, link, dep_insn, cost) - rtx insn ATTRIBUTE_UNUSED; - rtx link; - rtx dep_insn ATTRIBUTE_UNUSED; - int cost; - { - if (REG_NOTE_KIND (link) != 0) - return 0; /* Anti or output dependence. */ - - return cost; - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/a29k.h gcc-3.3/gcc/config/a29k/a29k.h *** gcc-3.2.3/gcc/config/a29k/a29k.h 2002-01-08 22:51:20.000000000 +0000 --- gcc-3.3/gcc/config/a29k/a29k.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1579 **** - /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU. - Copyright (C) 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@nyu.edu) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-D_AM29K -D_AM29000 -D_EPI -Acpu=a29k -Amachine=a29k" - - /* Print subsidiary information on the compiler version in use. */ - #define TARGET_VERSION - - /* Pass -w to assembler. */ - #define ASM_SPEC "-w" - - /* Run-time compilation parameters selecting different hardware subsets. */ - - extern int target_flags; - - /* Macro to define tables used to set the flags. - This is a list in braces of pairs in braces, - each pair being { "NAME", VALUE } - where VALUE is the bits to set or minus the bits to clear. - An empty string NAME is used to identify the default VALUE. */ - - /* This means that the DW bit will be enabled, to allow direct loads - of bytes. */ - - #define TARGET_DW_ENABLE (target_flags & 1) - - /* This means that the external hardware does supports byte writes. */ - - #define TARGET_BYTE_WRITES (target_flags & 2) - - /* This means that a "small memory model" has been selected where all - function addresses are known to be within 256K. This allows CALL to be - used. */ - - #define TARGET_SMALL_MEMORY (target_flags & 4) - - /* This means that we must always used on indirect call, even when - calling a function in the same file, since the file might be > 256KB. */ - - #define TARGET_LARGE_MEMORY (target_flags & 8) - - /* This means that we are compiling for a 29050. */ - - #define TARGET_29050 (target_flags & 16) - - /* This means that we are compiling for the kernel which means that we use - gr64-gr95 instead of gr96-126. */ - - #define TARGET_KERNEL_REGISTERS (target_flags & 32) - - /* This means that a call to "__msp_check" should be inserted after each stack - adjustment to check for stack overflow. */ - - #define TARGET_STACK_CHECK (target_flags & 64) - - /* This handles 29k processors which cannot handle the separation - of a mtsrim insns and a storem insn (most 29000 chips to date, but - not the 29050. */ - - #define TARGET_NO_STOREM_BUG (target_flags & 128) - - /* This forces the compiler not to use incoming argument registers except - for copying out arguments. It helps detect problems when a function is - called with fewer arguments than it is declared with. */ - - #define TARGET_NO_REUSE_ARGS (target_flags & 256) - - /* This means that neither builtin nor emulated float operations are - available, and that GCC should generate libcalls instead. */ - - #define TARGET_SOFT_FLOAT (target_flags & 512) - - /* This means that we should not emit the multm or mutmu instructions - that some embedded systems' trap handlers don't support. */ - - #define TARGET_MULTM ((target_flags & 1024) == 0) - - #define TARGET_SWITCHES \ - { {"dw", 1, N_("Generate code assuming DW bit is set")}, \ - {"ndw", -1, N_("Generate code assuming DW bit is not set")}, \ - {"bw", 2, N_("Generate code using byte writes")}, \ - {"nbw", - (1|2), N_("Do not generate byte writes")}, \ - {"small", 4, N_("Use small memory model")}, \ - {"normal", - (4|8), N_("Use normal memory model")}, \ - {"large", 8, N_("Use large memory model")}, \ - {"29050", 16+128, N_("Generate 29050 code")}, \ - {"29000", -16, N_("Generate 29000 code")}, \ - {"kernel-registers", 32, N_("Use kernel global registers")}, \ - {"user-registers", -32, N_("Use user global registers")}, \ - {"stack-check", 64, N_("Emit stack checking code")}, \ - {"no-stack-check", - 74, N_("Do not emit stack checking code")}, \ - {"storem-bug", -128, N_("Work around storem hardware bug")}, \ - {"no-storem-bug", 128, N_("Do not work around storem hardware bug")}, \ - {"reuse-arg-regs", -256, N_("Store locals in argument registers")}, \ - {"no-reuse-arg-regs", 256, N_("Do not store locals in arg registers")}, \ - {"soft-float", 512, N_("Use software floating point")}, \ - {"no-multm", 1024, N_("Do not generate multm instructions")}, \ - {"", TARGET_DEFAULT, NULL}} - - #define TARGET_DEFAULT 3 - - /* Show we can debug even without a frame pointer. */ - #define CAN_DEBUG_WITHOUT_FP - - /* target machine storage layout */ - - /* Define the types for size_t, ptrdiff_t, and wchar_t. These are the - same as those used by EPI. The type for wchar_t does not make much - sense, but is what is used. */ - - #define SIZE_TYPE "unsigned int" - #define PTRDIFF_TYPE "int" - #define WCHAR_TYPE "char" - #define WCHAR_TYPE_SIZE BITS_PER_UNIT - - /* Define this macro if it is advisable to hold scalars in registers - in a wider mode than that declared by the program. In such cases, - the value is constrained to be within the bounds of the declared - type, but kept valid in the wider mode. The signedness of the - extension may differ from that of the type. */ - - #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < 4) \ - (MODE) = SImode; - - /* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. - This is arbitrary on the 29k since it has no actual bit-field insns. - It is better to define this as TRUE because BYTES_BIG_ENDIAN is TRUE - and we want to be able to convert BP position to bit position with - just a shift. */ - #define BITS_BIG_ENDIAN 1 - - /* Define this if most significant byte of a word is the lowest numbered. - This is true on 29k. */ - #define BYTES_BIG_ENDIAN 1 - - /* Define this if most significant word of a multiword number is lowest - numbered. - - For 29k we can decide arbitrarily since there are no machine instructions - for them. Might as well be consistent with bytes. */ - #define WORDS_BIG_ENDIAN 1 - - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD 4 - - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - #define PARM_BOUNDARY 32 - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #define STACK_BOUNDARY 64 - - /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 32 - - /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 32 - - /* Every structure's size must be a multiple of this. */ - #define STRUCTURE_SIZE_BOUNDARY 8 - - /* A bitfield declared as `int' forces `int' alignment for the struct. */ - #define PCC_BITFIELD_TYPE_MATTERS 1 - - /* No data type wants to be aligned rounder than this. */ - #define BIGGEST_ALIGNMENT 32 - - /* Make strings word-aligned so strcpy from constants will be faster. */ - #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ - (TREE_CODE (EXP) == STRING_CST \ - && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) - - /* Make arrays of chars word-aligned for the same reasons. */ - #define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ - && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) - - /* Set this non-zero if move instructions will actually fail to work - when given unaligned data. */ - #define STRICT_ALIGNMENT 0 - - /* Set this non-zero if unaligned move instructions are extremely slow. - - On the 29k, they trap. */ - #define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) 1 - - /* Standard register usage. */ - - /* Number of actual hardware registers. - The hardware registers are assigned numbers for the compiler - from 0 to just below FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. - - 29k has 256 registers, of which 62 are not defined. gr0 and gr1 are - not produced in generated RTL so we can start at gr96, and call it - register zero. - - So 0-31 are gr96-gr127, lr0-lr127 are 32-159. To represent the input - arguments, whose register numbers we won't know until we are done, - use register 160-175. They cannot be modified. Similarly, 176 is used - for the frame pointer. It is assigned the last local register number - once the number of registers used is known. - - We use 177, 178, 179, and 180 for the special registers BP, FC, CR, and Q, - respectively. Registers 181 through 199 are used for the other special - registers that may be used by the programmer, but are never used by the - compiler. - - Registers 200-203 are the four floating-point accumulator register in - the 29050. - - Registers 204-235 are the 32 global registers for kernel mode when - -mkernel-registers is not specified, and the 32 global user registers - when it is. - - When -mkernel-registers is specified, we still use the same register - map but change the names so 0-31 print as gr64-gr95. */ - - #define FIRST_PSEUDO_REGISTER 236 - - /* Because of the large number of registers on the 29k, we define macros - to refer to each group of registers and then define the number for some - registers used in the calling sequence. */ - - #define R_GR(N) ((N) - 96) /* gr96 is register number 0 */ - #define R_LR(N) ((N) + 32) /* lr0 is register number 32 */ - #define R_FP 176 /* frame pointer is register 176 */ - #define R_AR(N) ((N) + 160) /* first incoming arg reg is 160 */ - #define R_KR(N) ((N) + 204) /* kernel registers (gr64 to gr95) */ - - /* Define the numbers of the special registers. */ - #define R_BP 177 - #define R_FC 178 - #define R_CR 179 - #define R_Q 180 - - /* These special registers are not used by the compiler, but may be referenced - by the programmer via asm declarations. */ - - #define R_VAB 181 - #define R_OPS 182 - #define R_CPS 183 - #define R_CFG 184 - #define R_CHA 185 - #define R_CHD 186 - #define R_CHC 187 - #define R_RBP 188 - #define R_TMC 189 - #define R_TMR 190 - #define R_PC0 191 - #define R_PC1 192 - #define R_PC2 193 - #define R_MMU 194 - #define R_LRU 195 - #define R_FPE 196 - #define R_INT 197 - #define R_FPS 198 - #define R_EXO 199 - - /* Define the number for floating-point accumulator N. */ - #define R_ACU(N) ((N) + 200) - - /* Now define the registers used in the calling sequence. */ - #define R_TAV R_GR (121) - #define R_TPC R_GR (122) - #define R_LRP R_GR (123) - #define R_SLP R_GR (124) - #define R_MSP R_GR (125) - #define R_RAB R_GR (126) - #define R_RFB R_GR (127) - - /* 1 for registers that have pervasive standard uses - and are not available for the register allocator. */ - - #define FIXED_REGISTERS \ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, \ - 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, \ - 0, 0, 0, 0, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - - /* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. */ - #define CALL_USED_REGISTERS \ - {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - - /* List the order in which to allocate registers. Each register must be - listed once, even those in FIXED_REGISTERS. - - We allocate in the following order: - gr116-gr120 (not used for anything but temps) - gr96-gr111 (function return values, reverse order) - argument registers (160-175) - lr0-lr127 (locals, saved) - acc3-0 (acc0 special) - everything else */ - - #define REG_ALLOC_ORDER \ - {R_GR (116), R_GR (117), R_GR (118), R_GR (119), R_GR (120), \ - R_GR (111), R_GR (110), R_GR (109), R_GR (108), R_GR (107), \ - R_GR (106), R_GR (105), R_GR (104), R_GR (103), R_GR (102), \ - R_GR (101), R_GR (100), R_GR (99), R_GR (98), R_GR (97), R_GR (96), \ - R_AR (0), R_AR (1), R_AR (2), R_AR (3), R_AR (4), R_AR (5), \ - R_AR (6), R_AR (7), R_AR (8), R_AR (9), R_AR (10), R_AR (11), \ - R_AR (12), R_AR (13), R_AR (14), R_AR (15), \ - R_LR (0), R_LR (1), R_LR (2), R_LR (3), R_LR (4), R_LR (5), \ - R_LR (6), R_LR (7), R_LR (8), R_LR (9), R_LR (10), R_LR (11), \ - R_LR (12), R_LR (13), R_LR (14), R_LR (15), R_LR (16), R_LR (17), \ - R_LR (18), R_LR (19), R_LR (20), R_LR (21), R_LR (22), R_LR (23), \ - R_LR (24), R_LR (25), R_LR (26), R_LR (27), R_LR (28), R_LR (29), \ - R_LR (30), R_LR (31), R_LR (32), R_LR (33), R_LR (34), R_LR (35), \ - R_LR (36), R_LR (37), R_LR (38), R_LR (39), R_LR (40), R_LR (41), \ - R_LR (42), R_LR (43), R_LR (44), R_LR (45), R_LR (46), R_LR (47), \ - R_LR (48), R_LR (49), R_LR (50), R_LR (51), R_LR (52), R_LR (53), \ - R_LR (54), R_LR (55), R_LR (56), R_LR (57), R_LR (58), R_LR (59), \ - R_LR (60), R_LR (61), R_LR (62), R_LR (63), R_LR (64), R_LR (65), \ - R_LR (66), R_LR (67), R_LR (68), R_LR (69), R_LR (70), R_LR (71), \ - R_LR (72), R_LR (73), R_LR (74), R_LR (75), R_LR (76), R_LR (77), \ - R_LR (78), R_LR (79), R_LR (80), R_LR (81), R_LR (82), R_LR (83), \ - R_LR (84), R_LR (85), R_LR (86), R_LR (87), R_LR (88), R_LR (89), \ - R_LR (90), R_LR (91), R_LR (92), R_LR (93), R_LR (94), R_LR (95), \ - R_LR (96), R_LR (97), R_LR (98), R_LR (99), R_LR (100), R_LR (101), \ - R_LR (102), R_LR (103), R_LR (104), R_LR (105), R_LR (106), \ - R_LR (107), R_LR (108), R_LR (109), R_LR (110), R_LR (111), \ - R_LR (112), R_LR (113), R_LR (114), R_LR (115), R_LR (116), \ - R_LR (117), R_LR (118), R_LR (119), R_LR (120), R_LR (121), \ - R_LR (122), R_LR (123), R_LR (124), R_LR (124), R_LR (126), \ - R_LR (127), \ - R_ACU (3), R_ACU (2), R_ACU (1), R_ACU (0), \ - R_GR (112), R_GR (113), R_GR (114), R_GR (115), R_GR (121), \ - R_GR (122), R_GR (123), R_GR (124), R_GR (125), R_GR (126), \ - R_GR (127), \ - R_FP, R_BP, R_FC, R_CR, R_Q, \ - R_VAB, R_OPS, R_CPS, R_CFG, R_CHA, R_CHD, R_CHC, R_RBP, R_TMC, \ - R_TMR, R_PC0, R_PC1, R_PC2, R_MMU, R_LRU, R_FPE, R_INT, R_FPS, \ - R_EXO, \ - R_KR (0), R_KR (1), R_KR (2), R_KR (3), R_KR (4), R_KR (5), \ - R_KR (6), R_KR (7), R_KR (8), R_KR (9), R_KR (10), R_KR (11), \ - R_KR (12), R_KR (13), R_KR (14), R_KR (15), R_KR (16), R_KR (17), \ - R_KR (18), R_KR (19), R_KR (20), R_KR (21), R_KR (22), R_KR (23), \ - R_KR (24), R_KR (25), R_KR (26), R_KR (27), R_KR (28), R_KR (29), \ - R_KR (30), R_KR (31) } - - /* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. */ - - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((REGNO) >= R_ACU (0) && (REGNO) <= R_ACU (3)? 1 \ - : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. - On 29k, the cpu registers can hold any mode. But a double-precision - floating-point value should start at an even register. The special - registers cannot hold floating-point values, BP, CR, and FC cannot - hold integer or floating-point values, and the accumulators cannot - hold integer values. - - DImode and larger values should start at an even register just like - DFmode values, even though the instruction set doesn't require it, in order - to prevent reload from aborting due to a modes_equiv_for_class_p failure. - - (I'd like to use the "?:" syntax to make this more readable, but Sun's - compiler doesn't seem to accept it.) */ - #define HARD_REGNO_MODE_OK(REGNO, MODE) \ - (((REGNO) >= R_ACU (0) && (REGNO) <= R_ACU (3) \ - && (GET_MODE_CLASS (MODE) == MODE_FLOAT \ - || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT)) \ - || ((REGNO) >= R_BP && (REGNO) <= R_CR \ - && GET_MODE_CLASS (MODE) == MODE_PARTIAL_INT) \ - || ((REGNO) >= R_Q && (REGNO) < R_ACU (0) \ - && GET_MODE_CLASS (MODE) != MODE_FLOAT \ - && GET_MODE_CLASS (MODE) != MODE_COMPLEX_FLOAT) \ - || (((REGNO) < R_BP || (REGNO) >= R_KR (0)) \ - && ((((REGNO) & 1) == 0) \ - || GET_MODE_UNIT_SIZE (MODE) <= UNITS_PER_WORD))) - - /* Value is 1 if it is a good idea to tie two pseudo registers - when one has mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. - - On the 29k, normally we'd just have problems with DFmode because of the - even alignment. However, we also have to be a bit concerned about - the special register's restriction to non-floating and the floating-point - accumulator's restriction to only floating. This probably won't - cause any great inefficiencies in practice. */ - - #define MODES_TIEABLE_P(MODE1, MODE2) \ - ((MODE1) == (MODE2) \ - || (GET_MODE_CLASS (MODE1) == MODE_INT \ - && GET_MODE_CLASS (MODE2) == MODE_INT)) - - /* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - - /* 29k pc isn't overloaded on a register that the compiler knows about. */ - /* #define PC_REGNUM */ - - /* Register to use for pushing function arguments. */ - #define STACK_POINTER_REGNUM R_GR (125) - - /* Base register for access to local variables of the function. */ - #define FRAME_POINTER_REGNUM R_FP - - /* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. */ - #define FRAME_POINTER_REQUIRED 0 - - /* Base register for access to arguments of the function. */ - #define ARG_POINTER_REGNUM R_FP - - /* Register in which static-chain is passed to a function. */ - #define STATIC_CHAIN_REGNUM R_SLP - - /* Register in which address to store a structure value - is passed to a function. */ - #define STRUCT_VALUE_REGNUM R_LRP - - /* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. - - The 29k has nine registers classes: LR0_REGS, GENERAL_REGS, SPECIAL_REGS, - BP_REGS, FC_REGS, CR_REGS, Q_REGS, ACCUM_REGS, and ACCUM0_REGS. - LR0_REGS, BP_REGS, FC_REGS, CR_REGS, and Q_REGS contain just the single - register. The latter two classes are used to represent the floating-point - accumulator registers in the 29050. We also define the union class - FLOAT_REGS to represent any register that can be used to hold a - floating-point value. The union of SPECIAL_REGS and ACCUM_REGS isn't - useful as the former cannot contain floating-point and the latter can only - contain floating-point. */ - - enum reg_class { NO_REGS, LR0_REGS, GENERAL_REGS, BP_REGS, FC_REGS, CR_REGS, - Q_REGS, SPECIAL_REGS, ACCUM0_REGS, ACCUM_REGS, FLOAT_REGS, - ALL_REGS, LIM_REG_CLASSES }; - - #define N_REG_CLASSES (int) LIM_REG_CLASSES - - /* Give names of register classes as strings for dump file. */ - - #define REG_CLASS_NAMES \ - {"NO_REGS", "LR0_REGS", "GENERAL_REGS", "BP_REGS", "FC_REGS", "CR_REGS", \ - "Q_REGS", "SPECIAL_REGS", "ACCUM0_REGS", "ACCUM_REGS", "FLOAT_REGS", \ - "ALL_REGS" } - - /* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. */ - - #define REG_CLASS_CONTENTS \ - { {0, 0, 0, 0, 0, 0, 0, 0}, \ - {0, 1, 0, 0, 0, 0, 0, 0}, \ - {~0, ~0, ~0, ~0, ~0, ~ 0xfffe0000, ~ 0xfff, 0xfff}, \ - {0, 0, 0, 0, 0, 0x20000, 0, 0}, \ - {0, 0, 0, 0, 0, 0x40000, 0, 0}, \ - {0, 0, 0, 0, 0, 0x80000, 0, 0}, \ - {0, 0, 0, 0, 0, 0x100000, 0, 0}, \ - {0, 0, 0, 0, 0, 0xfffe0000, 0xff, 0}, \ - {0, 0, 0, 0, 0, 0, 0x100, 0}, \ - {0, 0, 0, 0, 0, 0, 0xf00, 0}, \ - {~0, ~0, ~0, ~0, ~0, ~ 0xfffe0000, ~ 0xff, 0xfff}, \ - {~0, ~0, ~0, ~0, ~0, ~0, ~0, 0xfff} } - - /* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - - #define REGNO_REG_CLASS(REGNO) \ - ((REGNO) == R_BP ? BP_REGS \ - : (REGNO) == R_FC ? FC_REGS \ - : (REGNO) == R_CR ? CR_REGS \ - : (REGNO) == R_Q ? Q_REGS \ - : (REGNO) > R_BP && (REGNO) <= R_EXO ? SPECIAL_REGS \ - : (REGNO) == R_ACU (0) ? ACCUM0_REGS \ - : (REGNO) >= R_KR (0) ? GENERAL_REGS \ - : (REGNO) > R_ACU (0) ? ACCUM_REGS \ - : (REGNO) == R_LR (0) ? LR0_REGS \ - : GENERAL_REGS) - - /* The class value for index registers, and the one for base regs. */ - #define INDEX_REG_CLASS NO_REGS - #define BASE_REG_CLASS GENERAL_REGS - - /* Get reg_class from a letter such as appears in the machine description. */ - - #define REG_CLASS_FROM_LETTER(C) \ - ((C) == 'r' ? GENERAL_REGS \ - : (C) == 'l' ? LR0_REGS \ - : (C) == 'b' ? BP_REGS \ - : (C) == 'f' ? FC_REGS \ - : (C) == 'c' ? CR_REGS \ - : (C) == 'q' ? Q_REGS \ - : (C) == 'h' ? SPECIAL_REGS \ - : (C) == 'a' ? ACCUM_REGS \ - : (C) == 'A' ? ACCUM0_REGS \ - : (C) == 'f' ? FLOAT_REGS \ - : NO_REGS) - - /* Define this macro to change register usage conditional on target flags. - - On the 29k, we use this to change the register names for kernel mapping. */ - - #define CONDITIONAL_REGISTER_USAGE \ - { \ - const char *p; \ - int i; \ - \ - if (TARGET_KERNEL_REGISTERS) \ - for (i = 0; i < 32; i++) \ - { \ - p = reg_names[i]; \ - reg_names[i] = reg_names[R_KR (i)]; \ - reg_names[R_KR (i)] = p; \ - } \ - } - - /* The letters I, J, K, L, M, N, O, and P in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. - - For 29k: - `I' is used for the range of constants most insns can contain. - `J' is for the few 16-bit insns. - `K' is a constant whose high-order 24 bits are all one - `L' is a HImode constant whose high-order 8 bits are all one - `M' is a 32-bit constant whose high-order 16 bits are all one (for CONSTN) - `N' is a 32-bit constant whose negative is 8 bits - `O' is the 32-bit constant 0x80000000, any constant with low-order - 16 bits zero for 29050. - `P' is a HImode constant whose negative is 8 bits */ - - #define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'I' ? (unsigned) (VALUE) < 0x100 \ - : (C) == 'J' ? (unsigned) (VALUE) < 0x10000 \ - : (C) == 'K' ? ((VALUE) & 0xffffff00) == 0xffffff00 \ - : (C) == 'L' ? ((VALUE) & 0xff00) == 0xff00 \ - : (C) == 'M' ? ((VALUE) & 0xffff0000) == 0xffff0000 \ - : (C) == 'N' ? ((VALUE) < 0 && (VALUE) > -256) \ - : (C) == 'O' ? ((VALUE) == 0x80000000 \ - || (TARGET_29050 && ((VALUE) & 0xffff) == 0)) \ - : (C) == 'P' ? (((VALUE) | 0xffff0000) < 0 \ - && ((VALUE) | 0xffff0000) > -256) \ - : 0) - - /* Similar, but for floating constants, and defining letters G and H. - Here VALUE is the CONST_DOUBLE rtx itself. - All floating-point constants are valid on 29k. */ - - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 1 - - /* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. */ - - #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS - - /* Return the register class of a scratch register needed to copy IN into - or out of a register in CLASS in MODE. If it can be done directly, - NO_REGS is returned. */ - - #define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \ - secondary_reload_class (CLASS, MODE, IN) - - /* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. - - On 29k, this is the size of MODE in words except that the floating-point - accumulators only require one word for anything they can hold. */ - - #define CLASS_MAX_NREGS(CLASS, MODE) \ - (((CLASS) == ACCUM_REGS || (CLASS) == ACCUM0_REGS) ? 1 \ - : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Define the cost of moving between registers of various classes. Everything - involving a general register is cheap, but moving between the other types - (even within a class) is two insns. */ - - #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ - ((CLASS1) == GENERAL_REGS || (CLASS2) == GENERAL_REGS ? 2 : 4) - - /* A C expressions returning the cost of moving data of MODE from a register to - or from memory. - - It takes extra insns on the 29k to form addresses, so we want to make - this higher. In addition, we need to keep it more expensive than the - most expensive register-register copy. */ - - #define MEMORY_MOVE_COST(MODE,CLASS,IN) 6 - - /* Stack layout; function entry, exit and calling. */ - - /* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ - #define STACK_GROWS_DOWNWARD - - /* Define this if the nominal address of the stack frame - is at the high-address end of the local variables; - that is, each additional local variable allocated - goes at a more negative offset in the frame. */ - #define FRAME_GROWS_DOWNWARD - - /* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. */ - - #define STARTING_FRAME_OFFSET (- current_function_pretend_args_size) - - /* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. - On 29k, don't define this because there are no push insns. */ - /* #define PUSH_ROUNDING(BYTES) */ - - /* Define this if the maximum size of all the outgoing args is to be - accumulated and pushed during the prologue. The amount can be - found in the variable current_function_outgoing_args_size. */ - #define ACCUMULATE_OUTGOING_ARGS 1 - - /* Offset of first parameter from the argument pointer register value. */ - - #define FIRST_PARM_OFFSET(FNDECL) (- current_function_pretend_args_size) - - /* Define this if stack space is still allocated for a parameter passed - in a register. */ - /* #define REG_PARM_STACK_SPACE */ - - /* Value is the number of bytes of arguments automatically - popped when returning from a subroutine call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - SIZE is the number of bytes of arguments passed on the stack. */ - - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 - - /* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. - - On 29k the value is found in gr96. */ - - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), R_GR (96)) - - /* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - - #define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, R_GR (96)) - - /* 1 if N is a possible register number for a function value - as seen by the caller. - On 29k, gr96-gr111 are used. */ - - #define FUNCTION_VALUE_REGNO_P(N) ((N) == R_GR (96)) - - /* 1 if N is a possible register number for function argument passing. - On 29k, these are lr2-lr17. */ - - #define FUNCTION_ARG_REGNO_P(N) ((N) <= R_LR (17) && (N) >= R_LR (2)) - - /* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - On 29k, this is a single integer, which is a number of words - of arguments scanned so far. - Thus 16 or more means all following args should go on the stack. */ - - #define CUMULATIVE_ARGS int - - /* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. */ - - #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) (CUM) = 0 - - /* Same, but called for incoming args. - - On the 29k, we use this to set all argument registers to fixed and - set the last 16 local regs, less two, (lr110-lr125) to available. Some - will later be changed to call-saved by FUNCTION_INCOMING_ARG. - lr126,lr127 are always fixed, they are place holders for the caller's - lr0,lr1. */ - - #define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,IGNORE) \ - { int i; \ - for (i = R_AR (0) - 2; i < R_AR (16); i++) \ - { \ - fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; \ - SET_HARD_REG_BIT (fixed_reg_set, i); \ - SET_HARD_REG_BIT (call_used_reg_set, i); \ - SET_HARD_REG_BIT (call_fixed_reg_set, i); \ - } \ - for (i = R_LR (110); i < R_LR (126); i++) \ - { \ - fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 0; \ - CLEAR_HARD_REG_BIT (fixed_reg_set, i); \ - CLEAR_HARD_REG_BIT (call_used_reg_set, i); \ - CLEAR_HARD_REG_BIT (call_fixed_reg_set, i); \ - } \ - (CUM) = 0; \ - } - - /* Define intermediate macro to compute the size (in registers) of an argument - for the 29k. */ - - #define A29K_ARG_SIZE(MODE, TYPE, NAMED) \ - (! (NAMED) ? 0 \ - : (MODE) != BLKmode \ - ? (GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD \ - : (int_size_in_bytes (TYPE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) - - /* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be available.) */ - - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - if (MUST_PASS_IN_STACK (MODE, TYPE)) \ - (CUM) = 16; \ - else \ - (CUM) += A29K_ARG_SIZE (MODE, TYPE, NAMED) - - /* Determine where to put an argument to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). - - On 29k the first 16 words of args are normally in registers - and the rest are pushed. */ - - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - ((CUM) < 16 && (NAMED) && ! MUST_PASS_IN_STACK (MODE, TYPE) \ - ? gen_rtx_REG ((MODE), R_LR (2) + (CUM)) : 0) - - /* Define where a function finds its arguments. - This is different from FUNCTION_ARG because of register windows. - - On the 29k, we hack this to call a function that sets the used registers - as non-fixed and not used by calls. */ - - #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ - ((CUM) < 16 && (NAMED) && ! MUST_PASS_IN_STACK (MODE, TYPE) \ - ? gen_rtx_REG (MODE, \ - incoming_reg (CUM, A29K_ARG_SIZE (MODE, TYPE, NAMED))) \ - : 0) - - /* This indicates that an argument is to be passed with an invisible reference - (i.e., a pointer to the object is passed). - - On the 29k, we do this if it must be passed on the stack. */ - - #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - (MUST_PASS_IN_STACK (MODE, TYPE)) - - /* Specify the padding direction of arguments. - - On the 29k, we must pad upwards in order to be able to pass args in - registers. */ - - #define FUNCTION_ARG_PADDING(MODE, TYPE) upward - - /* For an arg passed partly in registers and partly in memory, - this is the number of registers used. - For args passed entirely in registers or entirely in memory, zero. */ - - #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ - ((CUM) < 16 && 16 < (CUM) + A29K_ARG_SIZE (MODE, TYPE, NAMED) && (NAMED) \ - ? 16 - (CUM) : 0) - - /* Perform any needed actions needed for a function that is receiving a - variable number of arguments. - - CUM is as above. - - MODE and TYPE are the mode and type of the current parameter. - - PRETEND_SIZE is a variable that should be set to the amount of stack - that must be pushed by the prolog to pretend that our caller pushed - it. - - Normally, this macro will push all remaining incoming registers on the - stack and set PRETEND_SIZE to the length of the registers pushed. */ - - #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ - { if ((CUM) < 16) \ - { \ - int first_reg_offset = (CUM); \ - \ - if (MUST_PASS_IN_STACK (MODE, TYPE)) \ - first_reg_offset += A29K_ARG_SIZE (TYPE_MODE (TYPE), TYPE, 1); \ - \ - if (first_reg_offset > 16) \ - first_reg_offset = 16; \ - \ - if (! (NO_RTL) && first_reg_offset != 16) \ - move_block_from_reg \ - (R_AR (0) + first_reg_offset, \ - gen_rtx_MEM (BLKmode, virtual_incoming_args_rtx), \ - 16 - first_reg_offset, (16 - first_reg_offset) * UNITS_PER_WORD); \ - PRETEND_SIZE = (16 - first_reg_offset) * UNITS_PER_WORD; \ - } \ - } - - /* Define the information needed to generate branch and scc insns. This is - stored from the compare operation. Note that we can't use "rtx" here - since it hasn't been defined! */ - - extern struct rtx_def *a29k_compare_op0, *a29k_compare_op1; - extern int a29k_compare_fp_p; - - /* This macro produces the initial definition of a function name. - - For the 29k, we need the prolog to contain one or two words prior to - the declaration of the function name. So just store away the name and - write it as part of the prolog. This also computes the register names, - which can't be done until after register allocation, but must be done - before final_start_function is called. */ - - extern const char *a29k_function_name; - - #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ - a29k_function_name = NAME; \ - a29k_compute_reg_names (); - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #define FUNCTION_PROFILER(FILE, LABELNO) - - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - - #define EXIT_IGNORE_STACK 1 - - /* Define the number of delay slots needed for the function epilogue. - - On the 29k, we need a slot except when we have a register stack adjustment, - have a memory stack adjustment, and have no frame pointer. */ - - #define DELAY_SLOTS_FOR_EPILOGUE \ - (! (needs_regstack_p () \ - && (get_frame_size () + current_function_pretend_args_size \ - + current_function_outgoing_args_size) != 0 \ - && ! frame_pointer_needed)) - - /* Define whether INSN can be placed in delay slot N for the epilogue. - - On the 29k, we must be able to place it in a delay slot, it must - not use sp if the frame pointer cannot be eliminated, and it cannot - use local regs if we need to push the register stack. - If this is a SET with a memory as source, it might load from - a stack slot, unless the address is constant. */ - - #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN,N) \ - (get_attr_in_delay_slot (INSN) == IN_DELAY_SLOT_YES \ - && ! (frame_pointer_needed \ - && reg_mentioned_p (stack_pointer_rtx, PATTERN (INSN))) \ - && ! (needs_regstack_p () && uses_local_reg_p (PATTERN (INSN))) \ - && (GET_CODE (PATTERN (INSN)) != SET \ - || GET_CODE (SET_SRC (PATTERN (INSN))) != MEM \ - || ! rtx_varies_p (XEXP (SET_SRC (PATTERN (INSN)), 0), 0))) - - /* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. - - The trampoline should set the static chain pointer to value placed - into the trampoline and should branch to the specified routine. We - use gr121 (tav) as a temporary. */ - - #define TRAMPOLINE_TEMPLATE(FILE) \ - { \ - fprintf (FILE, "\tconst %s,0\n", reg_names[R_TAV]); \ - fprintf (FILE, "\tconsth %s,0\n", reg_names[R_TAV]); \ - fprintf (FILE, "\tconst %s,0\n", reg_names[R_SLP]); \ - fprintf (FILE, "\tjmpi %s\n", reg_names[R_TAV]); \ - fprintf (FILE, "\tconsth %s,0\n", reg_names[R_SLP]); \ - } - - /* Length in units of the trampoline for entering a nested function. */ - - #define TRAMPOLINE_SIZE 20 - - /* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. - - We do this on the 29k by writing the bytes of the addresses into the - trampoline one byte at a time. */ - - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - { \ - INITIALIZE_TRAMPOLINE_VALUE (TRAMP, FNADDR, 0, 4); \ - INITIALIZE_TRAMPOLINE_VALUE (TRAMP, CXT, 8, 16); \ - } - - /* Define a sub-macro to initialize one value into the trampoline. - We specify the offsets of the CONST and CONSTH instructions, respectively - and copy the value a byte at a time into these instructions. */ - - #define INITIALIZE_TRAMPOLINE_VALUE(TRAMP, VALUE, CONST, CONSTH) \ - { \ - rtx _addr, _temp; \ - rtx _val = force_reg (SImode, VALUE); \ - \ - _addr = memory_address (QImode, plus_constant (TRAMP, (CONST) + 3)); \ - emit_move_insn (gen_rtx_MEM (QImode, _addr), \ - gen_lowpart (QImode, _val)); \ - \ - _temp = expand_shift (RSHIFT_EXPR, SImode, _val, \ - build_int_2 (8, 0), 0, 1); \ - _addr = memory_address (QImode, plus_constant (TRAMP, (CONST) + 1)); \ - emit_move_insn (gen_rtx_MEM (QImode, _addr), \ - gen_lowpart (QImode, _temp)); \ - \ - _temp = expand_shift (RSHIFT_EXPR, SImode, _temp, \ - build_int_2 (8, 0), _temp, 1); \ - _addr = memory_address (QImode, plus_constant (TRAMP, (CONSTH) + 3)); \ - emit_move_insn (gen_rtx_MEM (QImode, _addr), \ - gen_lowpart (QImode, _temp)); \ - \ - _temp = expand_shift (RSHIFT_EXPR, SImode, _temp, \ - build_int_2 (8, 0), _temp, 1); \ - _addr = memory_address (QImode, plus_constant (TRAMP, (CONSTH) + 1)); \ - emit_move_insn (gen_rtx_MEM (QImode, _addr), \ - gen_lowpart (QImode, _temp)); \ - } - - /* Addressing modes, and classification of registers for them. */ - - /* #define HAVE_POST_INCREMENT 0 */ - /* #define HAVE_POST_DECREMENT 0 */ - - /* #define HAVE_PRE_DECREMENT 0 */ - /* #define HAVE_PRE_INCREMENT 0 */ - - /* Macros to check register numbers against specific register classes. */ - - /* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. */ - - #define REGNO_OK_FOR_INDEX_P(REGNO) 0 - #define REGNO_OK_FOR_BASE_P(REGNO) 1 - - /* Given the value returned from get_frame_size, compute the actual size - of the frame we will allocate. We include the pretend and outgoing - arg sizes and round to a doubleword. */ - - #define ACTUAL_FRAME_SIZE(SIZE) \ - (((SIZE) + current_function_pretend_args_size \ - + current_function_outgoing_args_size + 7) & ~7) - - /* Define the initial offset between the frame and stack pointer. */ - - #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \ - (DEPTH) = ACTUAL_FRAME_SIZE (get_frame_size ()) - - /* Maximum number of registers that can appear in a valid memory address. */ - #define MAX_REGS_PER_ADDRESS 1 - - /* Recognize any constant value that is a valid address. */ - - #define CONSTANT_ADDRESS_P(X) \ - (GET_CODE (X) == CONST_INT && (unsigned) INTVAL (X) < 0x100) - - /* Include all constant integers and constant doubles */ - #define LEGITIMATE_CONSTANT_P(X) 1 - - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - - #ifndef REG_OK_STRICT - - /* Nonzero if X is a hard reg that can be used as an index - or if it is a pseudo reg. */ - #define REG_OK_FOR_INDEX_P(X) 0 - /* Nonzero if X is a hard reg that can be used as a base reg - or if it is a pseudo reg. */ - #define REG_OK_FOR_BASE_P(X) 1 - - #else - - /* Nonzero if X is a hard reg that can be used as an index. */ - #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) - /* Nonzero if X is a hard reg that can be used as a base reg. */ - #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) - - #endif - - /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. - - On the 29k, a legitimate address is a register and so is a - constant of less than 256. */ - - #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ - { if (REG_P (X) && REG_OK_FOR_BASE_P (X)) \ - goto ADDR; \ - if (GET_CODE (X) == CONST_INT \ - && (unsigned) INTVAL (X) < 0x100) \ - goto ADDR; \ - } - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. - - For the 29k, we need not do anything. However, if we don't, - `memory_address' will try lots of things to get a valid address, most of - which will result in dead code and extra pseudos. So we make the address - valid here. - - This is easy: The only valid addresses are an offset from a register - and we know the address isn't valid. So just call either `force_operand' - or `force_reg' unless this is a (plus (reg ...) (const_int 0)). */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ - { if (GET_CODE (X) == PLUS && XEXP (X, 1) == const0_rtx) \ - X = XEXP (x, 0); \ - if (GET_CODE (X) == MULT || GET_CODE (X) == PLUS) \ - X = force_operand (X, 0); \ - else \ - X = force_reg (Pmode, X); \ - goto WIN; \ - } - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. - On the 29k this is never true. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) - - /* Compute the cost of an address. For the 29k, all valid addresses are - the same cost. */ - - #define ADDRESS_COST(X) 0 - - /* Define this if some processing needs to be done immediately before - emitting code for an insn. */ - - /* #define FINAL_PRESCAN_INSN(INSN,OPERANDS,NOPERANDS) */ - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE SImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - Do not define this if the table should contain absolute addresses. */ - /* #define CASE_VECTOR_PC_RELATIVE 1 */ - - /* Define this as 1 if `char' should by default be signed; else as 0. */ - #define DEFAULT_SIGNED_CHAR 0 - - /* This flag, if defined, says the same insns that convert to a signed fixnum - also convert validly to an unsigned one. - - We actually lie a bit here as overflow conditions are different. But - they aren't being checked anyway. */ - - #define FIXUNS_TRUNC_LIKE_FIX_TRUNC - - /* Max number of bytes we can move to of from memory - in one reasonably fast instruction. - - For the 29k, we will define movti, so put this at 4 words. */ - #define MOVE_MAX 16 - - /* Largest number of bytes of an object that can be placed in a register. - On the 29k we have plenty of registers, so use TImode. */ - #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TImode) - - /* Nonzero if access to memory by bytes is no faster than for words. - Also non-zero if doing byte operations (specifically shifts) in registers - is undesirable. - - On the 29k, large masks are expensive, so we want to use bytes to - manipulate fields. */ - #define SLOW_BYTE_ACCESS 0 - - /* Define if operations between registers always perform the operation - on the full register even if a narrower mode is specified. */ - #define WORD_REGISTER_OPERATIONS - - /* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD - will either zero-extend or sign-extend. The value of this macro should - be the code that says which one of the two operations is implicitly - done, NIL if none. */ - #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND - - /* Define if the object format being used is COFF or a superset. */ - #define OBJECT_FORMAT_COFF - - /* This uses COFF, so it wants SDB format. */ - #define SDB_DEBUGGING_INFO - - /* Define this to be the delimiter between SDB sub-sections. The default - is ";". */ - #define SDB_DELIM "\n" - - /* Do not break .stabs pseudos into continuations. */ - #define DBX_CONTIN_LENGTH 0 - - /* Don't try to use the `x' type-cross-reference character in DBX data. - Also has the consequence of putting each struct, union or enum - into a separate .stabs, containing only cross-refs to the others. */ - #define DBX_NO_XREFS - - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ - #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* We assume that the store-condition-codes instructions store 0 for false - and some other value for true. This is the value stored for true, which - is just the sign bit. */ - - #define STORE_FLAG_VALUE (-2147483647 - 1) - - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ - #define Pmode SImode - - /* Mode of a function address in a call instruction (for indexing purposes). - - Doesn't matter on 29k. */ - #define FUNCTION_MODE SImode - - /* Define this if addresses of constant functions - shouldn't be put through pseudo regs where they can be cse'd. - Desirable on machines where ordinary constants are expensive - but a CALL with constant address is cheap. */ - #define NO_FUNCTION_CSE - - /* Define this to be nonzero if shift instructions ignore all but the low-order - few bits. */ - #define SHIFT_COUNT_TRUNCATED 1 - - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. - - We only care about the cost if it is valid in an insn. The only - constants that cause an insn to generate more than one machine - instruction are those involving floating-point or address. So - only these need be expensive. */ - - #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST_INT: \ - return 0; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 6; \ - case CONST_DOUBLE: \ - return GET_MODE (RTX) == SFmode ? 6 : 8; - - /* Provide the costs of a rtl expression. This is in the body of a - switch on CODE. - - All MEMs cost the same if they are valid. This is used to ensure - that (mem (symbol_ref ...)) is placed into a CALL when valid. - - The multiply cost depends on whether this is a 29050 or not. */ - - #define RTX_COSTS(X,CODE,OUTER_CODE) \ - case MULT: \ - return TARGET_29050 ? COSTS_N_INSNS (2) : COSTS_N_INSNS (40); \ - case DIV: \ - case UDIV: \ - case MOD: \ - case UMOD: \ - return COSTS_N_INSNS (50); \ - case MEM: \ - return COSTS_N_INSNS (2); - - /* Control the assembler format that we output. */ - - /* Output at beginning of assembler file. */ - - #define ASM_FILE_START(FILE) \ - { const char *p, *after_dir = main_input_filename; \ - if (TARGET_29050) \ - fprintf (FILE, "\t.cputype 29050\n"); \ - for (p = main_input_filename; *p; p++) \ - if (*p == '/') \ - after_dir = p + 1; \ - fprintf (FILE, "\t.file "); \ - output_quoted_string (FILE, after_dir); \ - fprintf (FILE, "\n"); \ - fprintf (FILE, "\t.sect .lit,lit\n"); } - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #define ASM_APP_ON "" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #define ASM_APP_OFF "" - - /* The next few macros don't have tabs on most machines, but - at least one 29K assembler wants them. */ - - /* Output before instructions. */ - - #define TEXT_SECTION_ASM_OP "\t.text" - - /* Output before read-only data. */ - - #define READONLY_DATA_SECTION_ASM_OP "\t.use .lit" - - /* Output before writable data. */ - - #define DATA_SECTION_ASM_OP "\t.data" - - /* Define an extra section for read-only data, a routine to enter it, and - indicate that it is for read-only data. */ - - #define EXTRA_SECTIONS readonly_data - - #define EXTRA_SECTION_FUNCTIONS \ - void \ - literal_section () \ - { \ - if (in_section != readonly_data) \ - { \ - fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \ - in_section = readonly_data; \ - } \ - } \ - - #define READONLY_DATA_SECTION literal_section - - /* If we are referencing a function that is static or is known to be - in this file, make the SYMBOL_REF special. We can use this to indicate - that we can branch to this function without emitting a no-op after the - call. */ - - #define ENCODE_SECTION_INFO(DECL) \ - if (TREE_CODE (DECL) == FUNCTION_DECL \ - && (TREE_ASM_WRITTEN (DECL) || ! TREE_PUBLIC (DECL))) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; - - /* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - - #define REGISTER_NAMES \ - {"gr96", "gr97", "gr98", "gr99", "gr100", "gr101", "gr102", "gr103", "gr104", \ - "gr105", "gr106", "gr107", "gr108", "gr109", "gr110", "gr111", "gr112", \ - "gr113", "gr114", "gr115", "gr116", "gr117", "gr118", "gr119", "gr120", \ - "gr121", "gr122", "gr123", "gr124", "gr125", "gr126", "gr127", \ - "lr0", "lr1", "lr2", "lr3", "lr4", "lr5", "lr6", "lr7", "lr8", "lr9", \ - "lr10", "lr11", "lr12", "lr13", "lr14", "lr15", "lr16", "lr17", "lr18", \ - "lr19", "lr20", "lr21", "lr22", "lr23", "lr24", "lr25", "lr26", "lr27", \ - "lr28", "lr29", "lr30", "lr31", "lr32", "lr33", "lr34", "lr35", "lr36", \ - "lr37", "lr38", "lr39", "lr40", "lr41", "lr42", "lr43", "lr44", "lr45", \ - "lr46", "lr47", "lr48", "lr49", "lr50", "lr51", "lr52", "lr53", "lr54", \ - "lr55", "lr56", "lr57", "lr58", "lr59", "lr60", "lr61", "lr62", "lr63", \ - "lr64", "lr65", "lr66", "lr67", "lr68", "lr69", "lr70", "lr71", "lr72", \ - "lr73", "lr74", "lr75", "lr76", "lr77", "lr78", "lr79", "lr80", "lr81", \ - "lr82", "lr83", "lr84", "lr85", "lr86", "lr87", "lr88", "lr89", "lr90", \ - "lr91", "lr92", "lr93", "lr94", "lr95", "lr96", "lr97", "lr98", "lr99", \ - "lr100", "lr101", "lr102", "lr103", "lr104", "lr105", "lr106", "lr107", \ - "lr108", "lr109", "lr110", "lr111", "lr112", "lr113", "lr114", "lr115", \ - "lr116", "lr117", "lr118", "lr119", "lr120", "lr121", "lr122", "lr123", \ - "lr124", "lr125", "lr126", "lr127", \ - "AI0", "AI1", "AI2", "AI3", "AI4", "AI5", "AI6", "AI7", "AI8", "AI9", \ - "AI10", "AI11", "AI12", "AI13", "AI14", "AI15", "FP", \ - "bp", "fc", "cr", "q", \ - "vab", "ops", "cps", "cfg", "cha", "chd", "chc", "rbp", "tmc", "tmr", \ - "pc0", "pc1", "pc2", "mmu", "lru", "fpe", "int", "fps", "exo", \ - "0", "1", "2", "3", \ - "gr64", "gr65", "gr66", "gr67", "gr68", "gr69", "gr70", "gr71", \ - "gr72", "gr73", "gr74", "gr75", "gr76", "gr77", "gr78", "gr79", \ - "gr80", "gr81", "gr82", "gr83", "gr84", "gr85", "gr86", "gr87", \ - "gr88", "gr89", "gr90", "gr91", "gr92", "gr93", "gr94", "gr95" } - - /* How to renumber registers for dbx and gdb. */ - - extern int a29k_debug_reg_map[FIRST_PSEUDO_REGISTER]; - #define DBX_REGISTER_NUMBER(REGNO) a29k_debug_reg_map[REGNO] - - /* Switch into a generic section. */ - #define TARGET_ASM_NAMED_SECTION a29k_asm_named_section - - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - - /* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) - - /* The prefix to add to user-visible assembler symbols. */ - - #undef USER_LABEL_PREFIX - #define USER_LABEL_PREFIX "_" - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, "%s%d:\n", PREFIX, NUM) - - /* This is how to output a label for a jump table. Arguments are the same as - for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is - passed. */ - - #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \ - { ASM_OUTPUT_ALIGN (FILE, 2); ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); } - - /* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*%s%d", PREFIX, NUM) - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tsub %s,%s,4\n\tstore 0,0,%s,%s\n", \ - reg_names[R_MSP], reg_names[R_MSP], reg_names[REGNO], \ - reg_names[R_MSP]); - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tload 0,0,%s,%s\n\tadd %s,%s,4\n", \ - reg_names[REGNO], reg_names[R_MSP], reg_names[R_MSP], \ - reg_names[R_MSP]); - - /* This is how to output an element of a case-vector that is absolute. */ - - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.word L%d\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. - Don't define this if it is not supported. */ - - /* #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) */ - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG) != 0) \ - fprintf (FILE, "\t.align %d\n", 1 << (LOG)) - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\t.block %d\n", (SIZE)) - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\t.comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (SIZE))) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \ - ( fputs ("\t.lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (SIZE))) - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - - /* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. - For `%' followed by punctuation, CODE is the punctuation and X is null. */ - - #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE) - - /* Determine which codes are valid without a following integer. These must - not be alphabetic. - - We support `#' which is null if a delay slot exists, otherwise - "\n\tnop" and `*' which prints the register name for TPC (gr122). */ - - #define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '#' || (CODE) == '*') - - /* Print a memory address as an operand to reference that memory location. */ - - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - { register rtx addr = ADDR; \ - if (!REG_P (addr) \ - && ! (GET_CODE (addr) == CONST_INT \ - && INTVAL (addr) >= 0 && INTVAL (addr) < 256)) \ - abort (); \ - output_operand (addr, 0); \ - } - /* Define the codes that are matched by predicates in a29k.c. */ - - #define PREDICATE_CODES \ - {"cint_8_operand", {CONST_INT}}, \ - {"cint_16_operand", {CONST_INT}}, \ - {"long_const_operand", {CONST_INT, CONST, CONST_DOUBLE, \ - LABEL_REF, SYMBOL_REF}}, \ - {"const_0_operand", {CONST_INT, ASHIFT}}, \ - {"const_8_operand", {CONST_INT, ASHIFT}}, \ - {"const_16_operand", {CONST_INT, ASHIFT}}, \ - {"const_24_operand", {CONST_INT, ASHIFT}}, \ - {"float_const_operand", {CONST_DOUBLE}}, \ - {"gpc_reg_operand", {SUBREG, REG}}, \ - {"gpc_reg_or_float_constant_operand", {SUBREG, REG, CONST_DOUBLE}}, \ - {"gpc_reg_or_integer_constant_operand", {SUBREG, REG, \ - CONST_INT, CONST_DOUBLE}}, \ - {"gpc_reg_or_immediate_operand", {SUBREG, REG, CONST_INT, \ - CONST_DOUBLE, CONST, \ - SYMBOL_REF, LABEL_REF}}, \ - {"spec_reg_operand", {REG}}, \ - {"accum_reg_operand", {REG}}, \ - {"srcb_operand", {SUBREG, REG, CONST_INT}}, \ - {"cmplsrcb_operand", {SUBREG, REG, CONST_INT}}, \ - {"reg_or_immediate_operand", {SUBREG, REG, CONST_INT, CONST, \ - CONST_DOUBLE, CONST, SYMBOL_REF, LABEL_REF}}, \ - {"reg_or_u_short_operand", {SUBREG, REG, CONST_INT}}, \ - {"and_operand", {SUBREG, REG, CONST_INT}}, \ - {"add_operand", {SUBREG, REG, CONST_INT}}, \ - {"call_operand", {SYMBOL_REF, CONST_INT}}, \ - {"in_operand", {SUBREG, MEM, REG, CONST_INT, CONST, SYMBOL_REF, \ - LABEL_REF, CONST_DOUBLE}}, \ - {"out_operand", {SUBREG, REG, MEM}}, \ - {"reload_memory_operand", {SUBREG, REG, MEM}}, \ - {"fp_comparison_operator", {EQ, GT, GE}}, \ - {"branch_operator", {GE, LT}}, \ - {"load_multiple_operation", {PARALLEL}}, \ - {"store_multiple_operation", {PARALLEL}}, \ - {"epilogue_operand", {CODE_LABEL}}, --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/a29k.md gcc-3.3/gcc/config/a29k/a29k.md *** gcc-3.2.3/gcc/config/a29k/a29k.md 2001-10-19 19:39:57.000000000 +0000 --- gcc-3.3/gcc/config/a29k/a29k.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2875 **** - ;;- Machine description for AMD Am29000 for GNU C compiler - ;; Copyright (C) 1991, 1992, 1994, 1998, 1999, 2001 - ;; Free Software Foundation, Inc. - ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - - ;; The insns in this file are presented in the same order as the AMD 29000 - ;; User's Manual (i.e., alphabetical by machine op-code). - ;; - ;; DEFINE_EXPAND's are located near the first occurrence of the major insn - ;; that they generate. - - ;; The only attribute we have is the type. We only care about calls, branches, - ;; loads, stores, floating-point operations, and multi-word insns. - ;; Everything else is miscellaneous. - - (define_attr "type" - "call,branch,load,store,fadd,fmul,fam,fdiv,fsqrt,dmul,dam,ddiv,dsqrt,multi,misc" - (const_string "misc")) - - ;; ASM insns cannot go into a delay slot, so call them "multi". - (define_asm_attributes [(set_attr "type" "multi")]) - - (define_attr "in_delay_slot" "yes,no" - (if_then_else (eq_attr "type" "call,branch,multi") (const_string "no") - (const_string "yes"))) - - ;; Branch and call insns require a single delay slot. Annulling is not - ;; supported. - (define_delay (eq_attr "type" "call,branch") - [(eq_attr "in_delay_slot" "yes") (nil) (nil)]) - - ;; Define the function unit usages. We first define memory as a unit. - (define_function_unit "memory" 1 0 (eq_attr "type" "load") 6 5 - [(eq_attr "type" "load")]) - (define_function_unit "memory" 1 0 (eq_attr "type" "load") 6 6 - [(eq_attr "type" "store")]) - (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0) - - ;; Now define the function units for the floating-point support. Most - ;; units are pipelined and can accept an input every cycle. - ;; - ;; Note that we have an inaccuracy here. If a fmac insn is issued, followed - ;; 2 cycles later by a fadd, there will be a conflict for the floating - ;; adder that we can't represent. Also, all insns will conflict for the - ;; floating-point rounder. It isn't clear how to represent this. - - (define_function_unit "multiplier" 1 0 (eq_attr "type" "fmul") 3 0) - (define_function_unit "multiplier" 1 0 (eq_attr "type" "dmul") 6 4) - (define_function_unit "multiplier" 1 0 (eq_attr "type" "fam") 6 0) - (define_function_unit "multiplier" 1 0 (eq_attr "type" "dam") 9 4) - - (define_function_unit "adder" 1 0 (eq_attr "type" "fadd,fam,dam") 3 0) - - (define_function_unit "divider" 1 0 (eq_attr "type" "fdiv") 11 10) - (define_function_unit "divider" 1 0 (eq_attr "type" "fsqrt") 28 27) - (define_function_unit "divider" 1 0 (eq_attr "type" "ddiv") 18 17) - (define_function_unit "divider" 1 0 (eq_attr "type" "dsqrt") 57 56) - - ;; ADD - (define_insn "addsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (plus:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r") - (match_operand:SI 2 "add_operand" "rI,N")))] - "" - "@ - add %0,%1,%2 - sub %0,%1,%n2") - - (define_insn "adddi3" - [(set (match_operand:DI 0 "gpc_reg_operand" "=r") - (plus:DI (match_operand:DI 1 "gpc_reg_operand" "%r") - (match_operand:DI 2 "gpc_reg_operand" "r")))] - "" - "add %L0,%L1,%L2\;addc %0,%1,%2" - [(set_attr "type" "multi")]) - - ;; AND/ANDN - (define_insn "andsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r") - (match_operand:SI 2 "and_operand" "rI,K")))] - "" - "@ - and %0,%1,%2 - andn %0,%1,%C2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r,r")) - (match_operand:SI 2 "cmplsrcb_operand" "r,K")))] - "" - "@ - andn %0,%2,%1 - nor %0,%1,%C2") - - ;; CALLI - ;; - ;; Each call pattern is duplicated so that we can add CLOBBERs to the - ;; resulting insn. - ;; - ;; We indicate that LR0 is clobbered in the CALL_INSN itself. Otherwise, - ;; reorg will think it is just clobbered by the called function. - - (define_expand "call" - [(use (match_operand:SI 0 "" "")) - (use (match_operand 1 "" "")) - (use (match_operand 2 "" ""))] - "" - " - { rtx insn = emit_call_insn (gen_call_internal (operands[0], operands[1])); - a29k_clobbers_to (insn, operands[2]); - - DONE; - }") - - (define_expand "call_internal" - [(parallel [(call (match_operand:SI 0 "" "") - (match_operand 1 "" "")) - (clobber (scratch:SI))])] - "" - " - { - if (GET_CODE (operands[0]) != MEM) - abort (); - - /* We tell here whether this is a recursive call, since this insn may - later be inlined into another function. */ - if (! TARGET_SMALL_MEMORY - && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF) - operands[0] = gen_rtx_MEM (SImode, - force_reg (Pmode, XEXP (operands[0], 0))); - }") - - (define_expand "call_value" - [(use (match_operand:SI 0 "gpc_reg_operand" "")) - (use (match_operand:SI 1 "" "")) - (use (match_operand 2 "" "")) - (use (match_operand 3 "" ""))] - "" - " - { rtx insn = emit_call_insn (gen_call_value_internal (operands[0], operands[1], - operands[2])); - - a29k_clobbers_to (insn, operands[3]); - DONE; - }") - - (define_expand "call_value_internal" - [(parallel [(set (match_operand:SI 0 "gpc_reg_operand" "") - (call (match_operand:SI 1 "" "") - (match_operand 2 "" ""))) - (clobber (scratch:SI))])] - "" - " - { - if (GET_CODE (operands[1]) != MEM) - abort (); - - /* We tell here whether this is a recursive call, since this insn may - later be inlined into another function. */ - if (! TARGET_SMALL_MEMORY - && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF) - operands[1] = gen_rtx_MEM (SImode, - force_reg (Pmode, XEXP (operands[1], 0))); - }") - - (define_insn "" - [(call (match_operand:SI 0 "memory_operand" "m") - (match_operand 1 "" "")) - (clobber (match_scratch:SI 2 "=&l"))] - "GET_CODE (XEXP (operands[0], 0)) != CONST_INT" - "calli lr0,%0%#" - [(set_attr "type" "call")]) - - (define_insn "" - [(call (mem:SI (match_operand:SI 0 "call_operand" "i")) - (match_operand:SI 1 "general_operand" "g")) - (clobber (match_scratch:SI 2 "=&l"))] - "" - "call lr0,%F0" - [(set_attr "type" "call")]) - - (define_insn "" - [(set (match_operand 0 "gpc_reg_operand" "=r") - (call (match_operand:SI 1 "memory_operand" "m") - (match_operand 2 "" ""))) - (clobber (match_scratch:SI 3 "=&l"))] - "GET_CODE (XEXP (operands[1], 0)) != CONST_INT" - "calli lr0,%1%#" - [(set_attr "type" "call")]) - - (define_insn "" - [(set (match_operand 0 "gpc_reg_operand" "=r") - (call (mem:SI (match_operand:SI 1 "call_operand" "i")) - (match_operand:SI 2 "general_operand" "g"))) - (clobber (match_scratch:SI 3 "=&l"))] - "" - "call lr0,%F1" - [(set_attr "type" "call")]) - - (define_expand "probe" - [(call (mem:SI (symbol_ref:SI "_msp_check")) - (const_int 1))] - "TARGET_STACK_CHECK" - "") - - ;; This is used for internal routine calls via TPC. Currently used only - ;; in probe, above. - (define_insn "" - [(call (mem:SI (match_operand:SI 0 "immediate_operand" "s")) - (const_int 1))] - "" - "call %*,%0" - [(set_attr "type" "call")]) - - ;; CONST, CONSTH, CONSTN - ;; - ;; Many of these are generated from move insns. - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (and:SI (match_operand:SI 1 "immediate_operand" "i") - (const_int 65535)))] - "" - "const %0,%1") - - (define_insn "" - [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") - (const_int 16) - (match_operand:SI 1 "const_0_operand" "")) - (ashiftrt:SI (match_operand:SI 2 "immediate_operand" "i") - (const_int 16)))] - "" - "consth %0,%2") - - (define_insn "" - [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") - (const_int 16) - (match_operand:SI 1 "const_0_operand" "")) - (match_operand:SI 2 "cint_16_operand" "J"))] - "" - "consth %0,%m2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (zero_extend:SI (match_operand:HI 1 "gpc_reg_operand" "0")) - (match_operand:SI 2 "const_int_operand" "n")))] - "(INTVAL (operands[2]) & 0xffff) == 0" - "consth %0,%2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (zero_extend:SI (match_operand:HI 1 "gpc_reg_operand" "0")) - (and:SI (match_operand:SI 2 "immediate_operand" "i") - (const_int -65536))))] - "" - "consth %0,%2") - - ;; CONVERT - (define_insn "fix_truncsfsi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (fix:SI (match_operand:SF 1 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,0,3,0,1") - - (define_insn "fix_truncdfsi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (fix:SI (match_operand:DF 1 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,0,3,0,2") - - (define_insn "fixuns_truncsfsi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (unsigned_fix:SI (match_operand:SF 1 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,1,3,0,1") - - (define_insn "fixuns_truncdfsi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (unsigned_fix:SI (match_operand:DF 1 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,1,3,0,2") - - (define_insn "truncdfsf2" - [(set (match_operand:SF 0 "register_operand" "=r") - (float_truncate:SF (match_operand:DF 1 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,0,4,1,2") - - (define_insn "extendsfdf2" - [(set (match_operand:DF 0 "register_operand" "=r") - (float_extend:DF (match_operand:SF 1 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,0,4,2,1") - - (define_insn "floatsisf2" - [(set (match_operand:SF 0 "register_operand" "=r") - (float:SF (match_operand:SI 1 "gpc_reg_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,0,4,1,0") - - (define_insn "floatsidf2" - [(set (match_operand:DF 0 "register_operand" "=r") - (float:DF (match_operand:SI 1 "gpc_reg_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,0,4,2,0") - - (define_insn "floatunssisf2" - [(set (match_operand:SF 0 "register_operand" "=r") - (unsigned_float:SF (match_operand:SI 1 "gpc_reg_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,1,4,1,0") - - (define_insn "floatunssidf2" - [(set (match_operand:DF 0 "register_operand" "=r") - (unsigned_float:DF (match_operand:SI 1 "gpc_reg_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "convert %0,%1,1,4,2,0") - - ;; CPxxx, DEQ, DGT, DGE, FEQ, FGT, FGE - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (match_operator:SI 3 "comparison_operator" - [(match_operand:SI 1 "gpc_reg_operand" "r") - (match_operand:SI 2 "srcb_operand" "rI")]))] - "" - "cp%J3 %0,%1,%2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (match_operator:SI 3 "fp_comparison_operator" - [(match_operand:SF 1 "register_operand" "r") - (match_operand:SF 2 "register_operand" "r")]))] - "! TARGET_SOFT_FLOAT" - "f%J3 %0,%1,%2" - [(set_attr "type" "fadd")]) - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (match_operator:SI 3 "fp_comparison_operator" - [(match_operand:DF 1 "register_operand" "r") - (match_operand:DF 2 "register_operand" "r")]))] - "! TARGET_SOFT_FLOAT" - "d%J3 %0,%1,%2" - [(set_attr "type" "fadd")]) - - ;; DADD - (define_expand "adddf3" - [(set (match_operand:DF 0 "register_operand" "") - (plus:DF (match_operand:DF 1 "register_operand" "") - (match_operand:DF 2 "register_operand" "")))] - "! TARGET_SOFT_FLOAT" - "") - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r") - (plus:DF (match_operand:DF 1 "register_operand" "%r") - (match_operand:DF 2 "register_operand" "r")))] - "! TARGET_29050 " - "dadd %0,%1,%2" - [(set_attr "type" "fadd")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r,a") - (plus:DF (match_operand:DF 1 "register_operand" "%r,r") - (match_operand:DF 2 "register_operand" "r,0")))] - "TARGET_29050" - "@ - dadd %0,%1,%2 - dmac 8,%0,%1,%1" - [(set_attr "type" "fadd,dam")]) - - ;; DDIV - (define_insn "divdf3" - [(set (match_operand:DF 0 "register_operand" "=r") - (div:DF (match_operand:DF 1 "register_operand" "=r") - (match_operand:DF 2 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "ddiv %0,%1,%2" - [(set_attr "type" "ddiv")]) - - ;; DIVIDE - ;; - ;; We must set Q to the sign extension of the dividend first. For MOD, we - ;; must get the remainder from Q. - ;; - ;; For divmod: operand 1 is divided by operand 2; quotient goes to operand - ;; 0 and remainder to operand 3. - (define_expand "divmodsi4" - [(set (match_dup 4) - (ashiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "") - (const_int 31))) - (parallel [(set (match_operand:SI 0 "gpc_reg_operand" "") - (div:SI (match_dup 1) - (match_operand:SI 2 "gpc_reg_operand" ""))) - (set (match_operand:SI 3 "gpc_reg_operand" "") - (mod:SI (match_dup 1) - (match_dup 2))) - (use (match_dup 4))])] - "" - " - { - operands[4] = gen_reg_rtx (SImode); - }") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (div:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (match_operand:SI 2 "gpc_reg_operand" "r"))) - (set (match_operand:SI 3 "register_operand" "=q") - (mod:SI (match_dup 1) - (match_dup 2))) - (use (match_operand:SI 4 "register_operand" "3"))] - "" - "divide %0,%1,%2") - - ;; DIVIDU - ;; - ;; Similar to DIVIDE. - (define_expand "udivmodsi4" - [(parallel [(set (match_operand:SI 0 "gpc_reg_operand" "") - (udiv:SI (match_operand:SI 1 "gpc_reg_operand" "") - (match_operand:SI 2 "gpc_reg_operand" ""))) - (set (match_operand:SI 3 "gpc_reg_operand" "") - (umod:SI (match_dup 1) - (match_dup 2))) - (use (const_int 0))])] - "" - "") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (udiv:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (match_operand:SI 2 "gpc_reg_operand" "r"))) - (set (match_operand:SI 3 "register_operand" "=q") - (umod:SI (match_dup 1) - (match_dup 2))) - (use (match_operand:SI 4 "const_int_operand" "3"))] - "" - "dividu %0,%1,%2") - - ;; DMAC/DMSM - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=a,*r") - (plus:DF (mult:DF (match_operand:DF 1 "register_operand" "%r,A") - (match_operand:DF 2 "register_operand" "r,r")) - (match_operand:DF 3 "register_operand" "0,*r")))] - "TARGET_29050" - "@ - dmac 0,%0,%1,%2 - dmsm %0,%2,%3" - [(set_attr "type" "dam")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=a") - (plus:DF (mult:DF (neg:DF (match_operand:DF 1 "register_operand" "r")) - (match_operand:DF 2 "register_operand" "r")) - (match_operand:DF 3 "register_operand" "0")))] - "TARGET_29050" - "dmac 1,%0,%2,%1" - [(set_attr "type" "dam")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=a") - (minus:DF (mult:DF (match_operand:DF 1 "register_operand" "%r") - (match_operand:DF 2 "register_operand" "r")) - (match_operand:DF 3 "register_operand" "0")))] - "TARGET_29050" - "dmac 2,%0,%1,%2" - [(set_attr "type" "dam")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=a") - (minus:DF (mult:DF (match_operand:DF 1 "register_operand" "r") - (neg:DF (match_operand:DF 2 "register_operand" "r"))) - (match_operand:DF 3 "register_operand" "0")))] - "TARGET_29050" - "dmac 3,%0,%1,%2" - [(set_attr "type" "dam")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=a") - (mult:DF (neg:DF (match_operand:DF 1 "register_operand" "r")) - (match_operand:DF 2 "register_operand" "r")))] - "TARGET_29050" - "dmac 5,%0,%2,%1" - [(set_attr "type" "dam")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=a") - (minus:DF (neg:DF (match_operand:DF 1 "register_operand" "r")) - (match_operand:DF 2 "register_operand" "0")))] - "TARGET_29050" - "dmac 11,%0,%1,%1" - [(set_attr "type" "dam")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=a") - (neg:DF (plus:DF (match_operand:DF 1 "register_operand" "%r") - (match_operand:DF 2 "register_operand" "0"))))] - "TARGET_29050" - "dmac 11,%0,%1,%1" - [(set_attr "type" "dam")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r,r,a") - (neg:DF (match_operand:DF 1 "register_operand" "0,r,r"))) - (clobber (match_scratch:SI 2 "=&r,&r,X"))] - "TARGET_29050" - "@ - cpeq %2,gr1,gr1\;xor %0,%1,%2 - cpeq %2,gr1,gr1\;xor %0,%1,%2\;sll %L0,%L1,0 - dmac 13,%0,%1,%1" - [(set_attr "type" "multi,multi,dam")]) - - ;; DMUL - (define_expand "muldf3" - [(set (match_operand:DF 0 "register_operand" "") - (mult:DF (match_operand:DF 1 "register_operand" "") - (match_operand:DF 2 "register_operand" "")))] - "! TARGET_SOFT_FLOAT" - "") - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r") - (mult:DF (match_operand:DF 1 "register_operand" "%r") - (match_operand:DF 2 "register_operand" "r")))] - "! TARGET_29050" - "dmul %0,%1,%2" - [(set_attr "type" "dmul")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r,a") - (mult:DF (match_operand:DF 1 "register_operand" "%r,r") - (match_operand:DF 2 "register_operand" "r,r")))] - "TARGET_29050" - "@ - dmul %0,%1,%2 - dmac 4,%0,%1,%2" - [(set_attr "type" "dmul,dam")]) - - ;; DSUB - (define_expand "subdf3" - [(set (match_operand:DF 0 "register_operand" "=r") - (minus:DF (match_operand:DF 1 "register_operand" "r") - (match_operand:DF 2 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "") - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r") - (minus:DF (match_operand:DF 1 "register_operand" "r") - (match_operand:DF 2 "register_operand" "r")))] - "! TARGET_29050" - "dsub %0,%1,%2" - [(set_attr "type" "fadd")]) - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r,a,a") - (minus:DF (match_operand:DF 1 "register_operand" "r,0,r") - (match_operand:DF 2 "register_operand" "r,r,0")))] - "TARGET_29050" - "@ - dsub %0,%1,%2 - dmac 9,%0,%2,%2 - dmac 10,%0,%1,%1" - [(set_attr "type" "fadd,dam,dam")]) - - ;; EXBYTE - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (and:SI (match_operand:SI 1 "srcb_operand" "rI") - (const_int -256)) - (zero_extract:SI (match_operand:SI 2 "gpc_reg_operand" "r") - (const_int 8) - (ashift:PSI - (match_operand:PSI 3 "register_operand" "b") - (const_int 3)))))] - "" - "exbyte %0,%2,%1") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (const_int 8) - (ashift:PSI - (match_operand:PSI 2 "register_operand" "b") - (const_int 3))))] - "" - "exbyte %0,%1,0") - - (define_insn "" - [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") - (const_int 8) - (match_operand:PSI 1 "const_24_operand" "")) - (zero_extract:SI (match_operand:SI 2 "gpc_reg_operand" "r") - (const_int 8) - (ashift:PSI - (match_operand:PSI 3 "register_operand" "b") - (const_int 3))))] - "" - "exbyte %0,%2,%0") - - (define_expand "extzv" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "") - (match_operand:SI 2 "general_operand" "") - (match_operand:SI 3 "general_operand" "")))] - "" - " - { - int size, pos; - - if (GET_CODE (operands[2]) != CONST_INT - || GET_CODE (operands[3]) != CONST_INT) - FAIL; - - size = INTVAL (operands[2]); - pos = INTVAL (operands[3]); - - /* Can't do this unless a byte extraction. If extracting the high - or low byte, don't do this because a shift or AND is shorter. - Don't do 16-bit extracts, since the only two are the high and low - ends, and it is faster to do them with CONSTH and SRL. */ - - if (size != 8 || (pos != 8 && pos != 16)) - FAIL; - - operands[3] = gen_rtx_ASHIFT (PSImode, - force_reg (PSImode, GEN_INT (pos / 8)), - GEN_INT (3)); - - }") - - ;; EXHW - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (and:SI (match_operand:SI 1 "srcb_operand" "rI") - (const_int -65536)) - (zero_extract:SI (match_operand:SI 2 "gpc_reg_operand" "r") - (const_int 16) - (ashift:PSI - (match_operand:PSI 3 "register_operand" "b") - (const_int 3)))))] - "" - "exhw %0,%2,%1") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (const_int 16) - (ashift:PSI - (match_operand:PSI 2 "register_operand" "b") - (const_int 3))))] - "" - "exhw %0,%1,0") - - (define_insn "" - [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") - (const_int 16) - (match_operand:PSI 1 "const_16_operand" "")) - (zero_extract:SI (match_operand:SI 2 "gpc_reg_operand" "r") - (const_int 16) - (ashift:PSI - (match_operand:PSI 3 "register_operand" "b") - (const_int 3))))] - "" - "exhw %0,%2,%0") - - ;; EXHWS - ;; - ;; This is probably unused. The high-order 16-bits are obtained with an SRA - ;; insn. The low-order 16 bits are a sign-extend, which is a pair of - ;; shifts. Setting BP followed by the insn is equivalent, so we don't - ;; bother going to any trouble to generate this insn. - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (sign_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (const_int 16) - (ashift:PSI - (match_operand:PSI 2 "register_operand" "b") - (const_int 3))))] - "" - "exhws %0,%1") - - ;; EXTRACT - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (match_operand:PSI 2 "register_operand" "f")))] - "" - "extract %0,%1,%1") - - (define_expand "rotlsi3" - [(set (match_dup 3) - (match_operand:SI 2 "gpc_reg_or_immediate_operand" "")) - (set (match_operand:SI 0 "gpc_reg_operand" "") - (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "") - (match_dup 3)))] - "" - " - { operands[2] = gen_lowpart (PSImode, operands[2]); - operands[3] = gen_reg_rtx (PSImode); - }") - - ;; It would be nice to be able to have a define_split corresponding to the - ;; above, but there is no way to tell combine we need a PSImode temporary. - ;; If we put a (clobber (scratch:PSI)) there, combine would merge the above - ;; two insns. This is bad because it then thinks only one insn is needed. - - ;; FADD - (define_expand "addsf3" - [(set (match_operand:SF 0 "register_operand" "") - (plus:SF (match_operand:SF 1 "register_operand" "") - (match_operand:SF 2 "register_operand" "")))] - "! TARGET_SOFT_FLOAT" - "") - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r") - (plus:SF (match_operand:SF 1 "register_operand" "%r") - (match_operand:SF 2 "register_operand" "r")))] - "! TARGET_29050" - "fadd %0,%1,%2" - [(set_attr "type" "fadd")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r,a") - (plus:SF (match_operand:SF 1 "register_operand" "%r,r") - (match_operand:SF 2 "register_operand" "r,0")))] - "TARGET_29050" - "@ - fadd %0,%1,%2 - fmac 8,%0,%1,%1" - [(set_attr "type" "fadd,fam")]) - - ;; FDIV - (define_insn "divsf3" - [(set (match_operand:SF 0 "register_operand" "=r") - (div:SF (match_operand:SF 1 "register_operand" "=r") - (match_operand:SF 2 "register_operand" "r")))] - "! TARGET_SOFT_FLOAT" - "fdiv %0,%1,%2" - [(set_attr "type" "fdiv")]) - - ;; FDMUL - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r") - (mult:DF (float_extend:DF (match_operand:SF 1 "register_operand" "%r")) - (float_extend:DF (match_operand:SF 2 "register_operand" "r"))))] - "! TARGET_SOFT_FLOAT" - "fdmul %0,%1,%2") - - ;; FMAC/FMSM - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=a,*r") - (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "%r,A") - (match_operand:SF 2 "register_operand" "r,r")) - (match_operand:SF 3 "register_operand" "0,*r")))] - "TARGET_29050" - "@ - fmac 0,%0,%1,%2 - fmsm %0,%2,%3" - [(set_attr "type" "fam")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=a") - (plus:SF (mult:SF (neg:SF (match_operand:SF 1 "register_operand" "r")) - (match_operand:SF 2 "register_operand" "r")) - (match_operand:SF 3 "register_operand" "0")))] - "TARGET_29050" - "fmac 1,%0,%2,%1" - [(set_attr "type" "fam")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=a") - (minus:SF (mult:SF (match_operand:SF 1 "register_operand" "%r") - (match_operand:SF 2 "register_operand" "r")) - (match_operand:SF 3 "register_operand" "0")))] - "TARGET_29050" - "fmac 2,%0,%1,%2" - [(set_attr "type" "fam")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=a") - (minus:SF (mult:SF (neg:SF (match_operand:SF 1 "register_operand" "r")) - (match_operand:SF 2 "register_operand" "r")) - (match_operand:SF 3 "register_operand" "0")))] - "TARGET_29050" - "fmac 3,%0,%2,%1" - [(set_attr "type" "fam")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=a") - (mult:SF (neg:SF (match_operand:SF 1 "register_operand" "r")) - (match_operand:SF 2 "register_operand" "r")))] - "TARGET_29050" - "fmac 5,%0,%2,%1" - [(set_attr "type" "fam")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=a") - (minus:SF (neg:SF (match_operand:SF 1 "register_operand" "%r")) - (match_operand:SF 2 "register_operand" "0")))] - "TARGET_29050" - "fmac 11,%0,%1,%1" - [(set_attr "type" "fam")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=a") - (neg:SF (plus:SF (match_operand:SF 1 "register_operand" "%r") - (match_operand:SF 2 "register_operand" "0"))))] - "TARGET_29050" - "fmac 11,%0,%1,%1" - [(set_attr "type" "fam")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r,a") - (neg:SF (match_operand:SF 1 "register_operand" "r,r"))) - (clobber (match_scratch:SI 2 "=&r,X"))] - "TARGET_29050" - "@ - cpeq %2,gr1,gr1\;xor %0,%1,%2 - fmac 13,%0,%1,%1" - [(set_attr "type" "multi,fam")]) - - ;; FMUL - (define_expand "mulsf3" - [(set (match_operand:SF 0 "register_operand" "") - (mult:SF (match_operand:SF 1 "register_operand" "") - (match_operand:SF 2 "register_operand" "")))] - "! TARGET_SOFT_FLOAT" - "") - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r") - (mult:SF (match_operand:SF 1 "register_operand" "%r") - (match_operand:SF 2 "register_operand" "r")))] - "! TARGET_29050" - "fmul %0,%1,%2" - [(set_attr "type" "fmul")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r,a") - (mult:SF (match_operand:SF 1 "register_operand" "%r,r") - (match_operand:SF 2 "register_operand" "r,r")))] - "TARGET_29050" - "@ - fmul %0,%1,%2 - fmac 4,%0,%1,%2" - [(set_attr "type" "fmul,fam")]) - - ;; FSUB - (define_expand "subsf3" - [(set (match_operand:SF 0 "register_operand" "") - (minus:SF (match_operand:SF 1 "register_operand" "") - (match_operand:SF 2 "register_operand" "")))] - "! TARGET_SOFT_FLOAT" - "") - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r") - (minus:SF (match_operand:SF 1 "register_operand" "r") - (match_operand:SF 2 "register_operand" "r")))] - "! TARGET_29050" - "fsub %0,%1,%2" - [(set_attr "type" "fadd")]) - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r,a,a") - (minus:SF (match_operand:SF 1 "register_operand" "r,0,r") - (match_operand:SF 2 "register_operand" "r,r,0")))] - "TARGET_29050" - "@ - fsub %0,%1,%2 - fmac 9,%0,%2,%2 - fmac 10,%0,%1,%1" - [(set_attr "type" "fadd,fam,fam")]) - - ;; INBYTE - (define_insn "" - [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") - (const_int 8) - (ashift:PSI - (match_operand:PSI 2 "register_operand" "b") - (const_int 3))) - (match_operand:SI 1 "srcb_operand" "rI"))] - "" - "inbyte %0,%0,%1") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (and:SI - (not:SI - (ashift:SI (const_int 255) - (ashift:PSI - (match_operand:PSI 3 "register_operand" "b") - (const_int 3)))) - (match_operand:SI 1 "gpc_reg_operand" "r")) - (ashift:SI (zero_extend:SI - (match_operand:QI 2 "srcb_operand" "rI")) - (ashift:PSI (match_dup 3) (const_int 3)))))] - "" - "inbyte %0,%1,%2") - - ;; INHW - (define_insn "" - [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") - (const_int 16) - (ashift:PSI - (match_operand:PSI 2 "register_operand" "b") - (const_int 3))) - (match_operand:SI 1 "srcb_operand" "rI"))] - "" - "inhw %0,%0,%1") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (and:SI - (not:SI - (ashift:SI (const_int 65535) - (ashift:PSI - (match_operand:PSI 3 "register_operand" "b") - (const_int 3)))) - (match_operand:SI 1 "gpc_reg_operand" "r")) - (ashift:SI (zero_extend:SI - (match_operand:HI 2 "srcb_operand" "rI")) - (ashift:PSI (match_dup 3) (const_int 3)))))] - "" - "inhw %0,%1,%2") - - (define_expand "insv" - [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "") - (match_operand:SI 1 "general_operand" "") - (match_operand:SI 2 "general_operand" "")) - (match_operand:SI 3 "srcb_operand" ""))] - "" - " - { - int size, pos; - - if (GET_CODE (operands[1]) != CONST_INT - || GET_CODE (operands[2]) != CONST_INT) - FAIL; - - size = INTVAL (operands[1]); - pos = INTVAL (operands[2]); - if ((size != 8 && size != 16) || pos % size != 0) - FAIL; - - operands[2] = gen_rtx_ASHIFT (PSImode, - force_reg (PSImode, GEN_INT (pos / 8)), - GEN_INT (3)); - }") - - ;; LOAD (also used by move insn). - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (mem:SI (and:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (const_int -4)))) - (set (match_operand:PSI 2 "register_operand" "=b") - (truncate:PSI (match_dup 1)))] - "! TARGET_DW_ENABLE" - "load 0,16,%0,%1" - [(set_attr "type" "load")]) - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (zero_extend:SI (match_operand:QI 1 "memory_operand" "m")))] - "TARGET_DW_ENABLE" - "load 0,1,%0,%1" - [(set_attr "type" "load")]) - - (define_insn "" - [(set (match_operand:HI 0 "gpc_reg_operand" "=r") - (zero_extend:HI (match_operand:QI 1 "memory_operand" "m")))] - "TARGET_DW_ENABLE" - "load 0,1,%0,%1" - [(set_attr "type" "load")]) - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))] - "TARGET_DW_ENABLE" - "load 0,2,%0,%1" - [(set_attr "type" "load")]) - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))) - (clobber (match_scratch:PSI 2 "=&b"))] - "TARGET_DW_ENABLE" - "load 0,17,%0,%1" - [(set_attr "type" "load")]) - - (define_insn "" - [(set (match_operand:HI 0 "gpc_reg_operand" "=r") - (sign_extend:HI (match_operand:QI 1 "memory_operand" "m"))) - (clobber (match_scratch:PSI 2 "=&b"))] - "TARGET_DW_ENABLE" - "load 0,17,%0,%1" - [(set_attr "type" "load")]) - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))) - (clobber (match_scratch:PSI 2 "=&b"))] - "TARGET_DW_ENABLE" - "load 0,18,%0,%1" - [(set_attr "type" "load")]) - - ;; LOADM - (define_expand "load_multiple" - [(set (match_dup 4) - (match_operand:PSI 2 "const_int_operand" "")) - (match_par_dup 3 [(set (match_operand:SI 0 "" "") - (match_operand:SI 1 "" ""))])] - "" - " - { - int regno; - int count; - rtx from; - int i; - - /* Support only loading a constant number of hard registers from memory. */ - if (GET_CODE (operands[2]) != CONST_INT - || operands[2] == const1_rtx - || GET_CODE (operands[1]) != MEM - || GET_CODE (operands[0]) != REG - || REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER) - FAIL; - - count = INTVAL (operands[2]); - regno = REGNO (operands[0]); - - /* CR gets set to the number of registers minus one. */ - operands[2] = GEN_INT(count - 1); - - operands[3] = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count + 2)); - from = memory_address (SImode, XEXP (operands[1], 0)); - XVECEXP (operands[3], 0, 0) = gen_rtx_SET (VOIDmode, - gen_rtx_REG (SImode, regno), - gen_rtx_MEM (SImode, from)); - operands[4] = gen_reg_rtx (PSImode); - - XVECEXP (operands[3], 0, 1) = gen_rtx_USE (VOIDmode, operands[4]); - XVECEXP (operands[3], 0, 2) = gen_rtx_CLOBBER (VOIDmode, operands[4]); - - for (i = 1; i < count; i++) - XVECEXP (operands[3], 0, i + 2) - = gen_rtx_SET (VOIDmode, gen_rtx (REG, SImode, regno + i), - gen_rtx_MEM (SImode, plus_constant (from, i * 4))); - }") - - ;; Indicate that CR is used and is then clobbered. - (define_insn "" - [(set (match_operand 0 "gpc_reg_operand" "=r") - (match_operand 1 "memory_operand" "m")) - (use (match_operand:PSI 2 "register_operand" "+c")) - (clobber (match_dup 2))] - "GET_MODE (operands[0]) == GET_MODE (operands[1]) - && GET_MODE_SIZE (GET_MODE (operands[0])) > UNITS_PER_WORD" - "loadm 0,0,%0,%1" - [(set_attr "type" "load")]) - - (define_insn "" - [(match_parallel 0 "load_multiple_operation" - [(set (match_operand:SI 1 "gpc_reg_operand" "=r") - (match_operand:SI 2 "memory_operand" "m")) - (use (match_operand:PSI 3 "register_operand" "+c")) - (clobber (match_dup 3))])] - "" - "loadm 0,0,%1,%2" - [(set_attr "type" "load")]) - - ;; MTSR (used also by move insn) - (define_insn "" - [(set (match_operand:SI 0 "spec_reg_operand" "=*h,*h") - (and:SI (match_operand:SI 1 "gpc_reg_or_immediate_operand" "r,i") - (match_operand:SI 2 "const_int_operand" "n,n")))] - "masks_bits_for_special (operands[0], operands[2])" - "@ - mtsr %0,%1 - mtsrim %0,%1") - - (define_insn "" - [(set (match_operand:PSI 0 "register_operand" "=h,h") - (truncate:PSI - (match_operand:SI 1 "gpc_reg_or_immediate_operand" "r,i")))] - "" - "@ - mtsr %0,%1 - mtsrim %0,%1") - - ;; MULTIPLY, MULTM, MULTMU - (define_insn "mulsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (mult:SI (match_operand:SI 1 "gpc_reg_operand" "%r") - (match_operand:SI 2 "gpc_reg_operand" "r"))) - (clobber (match_scratch:SI 3 "=&q"))] - "" - "multiply %0,%1,%2") - - (define_insn "mulsidi3" - [(set (match_operand:DI 0 "gpc_reg_operand" "=r") - (mult:DI (sign_extend:DI (match_operand:SI 1 "gpc_reg_operand" "r")) - (sign_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r")))) - (clobber (match_scratch:SI 3 "=&q"))] - "TARGET_MULTM" - "multiply %L0,%1,%2\;multm %0,%1,%2" - [(set_attr "type" "multi")]) - - (define_split - [(set (match_operand:DI 0 "gpc_reg_operand" "") - (mult:DI (sign_extend:DI (match_operand:SI 1 "gpc_reg_operand" "")) - (sign_extend:DI (match_operand:SI 2 "gpc_reg_operand" "")))) - (clobber (reg:SI 180))] - "reload_completed" - [(parallel [(set (match_dup 3) - (mult:SI (match_dup 1) (match_dup 2))) - (clobber (reg:SI 180))]) - (parallel [(set (match_dup 4) - (truncate:SI - (lshiftrt:DI - (mult:DI (sign_extend:DI (match_dup 1)) - (sign_extend:DI (match_dup 2))) - (const_int 32)))) - (clobber (reg:SI 180))])] - " - { operands[3] = operand_subword (operands[0], 1, 1, DImode); - operands[4] = operand_subword (operands[0], 0, 1, DImode); } ") - - (define_insn "umulsidi3" - [(set (match_operand:DI 0 "gpc_reg_operand" "=r") - (mult:DI (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "r")) - (zero_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r")))) - (clobber (match_scratch:SI 3 "=&q"))] - "TARGET_MULTM" - "multiplu %L0,%1,%2\;multmu %0,%1,%2" - [(set_attr "type" "multi")]) - - (define_split - [(set (match_operand:DI 0 "gpc_reg_operand" "") - (mult:DI (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "")) - (zero_extend:DI (match_operand:SI 2 "gpc_reg_operand" "")))) - (clobber (reg:SI 180))] - "reload_completed" - [(parallel [(set (match_dup 3) - (mult:SI (match_dup 1) (match_dup 2))) - (clobber (reg:SI 180))]) - (parallel [(set (match_dup 4) - (truncate:SI - (lshiftrt:DI - (mult:DI (zero_extend:DI (match_dup 1)) - (zero_extend:DI (match_dup 2))) - (const_int 32)))) - (clobber (reg:SI 180))])] - " - { operands[3] = operand_subword (operands[0], 1, 1, DImode); - operands[4] = operand_subword (operands[0], 0, 1, DImode); } ") - - (define_insn "smulsi3_highpart" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (truncate:SI - (lshiftrt:DI - (mult:DI (sign_extend:DI (match_operand:SI 1 "gpc_reg_operand" "%r")) - (sign_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r"))) - (const_int 32)))) - (clobber (match_scratch:SI 3 "=&q"))] - "TARGET_MULTM" - "multm %0,%1,%2") - - (define_insn "umulsi3_highpart" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (truncate:SI - (lshiftrt:DI - (mult:DI (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "%r")) - (zero_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r"))) - (const_int 32)))) - (clobber (match_scratch:SI 3 "=&q"))] - "TARGET_MULTM" - "multmu %0,%1,%2") - - ;; NAND - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) - (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))))] - "" - "nand %0,%1,%2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")) - (match_operand:SI 2 "const_int_operand" "K")))] - ; Match TARGET_29050 in "orn" pattern for slightly better reload. - "! TARGET_29050 && ((unsigned) ~ INTVAL (operands[2])) < 256" - "nand %0,%1,%C2") - - ;; NOR - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "%r")) - (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))))] - "" - "nor %0,%1,%2") - - (define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (not:SI (match_operand:SI 1 "gpc_reg_operand" "r")))] - "" - "nor %0,%1,0") - - ;; OR/ORN - (define_expand "iorsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (ior:SI (match_operand:SI 1 "gpc_reg_operand" "") - (match_operand:SI 2 "srcb_operand" "")))] - "" - "") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ior:SI (match_operand:SI 1 "gpc_reg_operand" "%r") - (match_operand:SI 2 "srcb_operand" "rI")))] - "! TARGET_29050" - "or %0,%1,%2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (ior:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r") - (match_operand:SI 2 "and_operand" "rI,K")))] - "TARGET_29050" - "@ - or %0,%1,%2 - orn %0,%1,%C2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r,r")) - (match_operand:SI 2 "cmplsrcb_operand" "r,K")))] - "TARGET_29050" - "@ - orn %0,%2,%1 - nand %0,%1,%C2") - - - ;; SLL (also used by move insn) - (define_insn "nop" - [(const_int 0)] - "" - "aseq 0x40,gr1,gr1") - - (define_insn "ashlsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ashift:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (match_operand:QI 2 "srcb_operand" "rn")))] - "" - "sll %0,%1,%Q2") - - ;; SQRT - (define_insn "sqrtsf2" - [(set (match_operand:SF 0 "gpc_reg_operand" "=r") - (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "r")))] - "TARGET_29050" - "sqrt %0,%1,1" - [(set_attr "type" "fsqrt")]) - - (define_insn "sqrtdf2" - [(set (match_operand:DF 0 "gpc_reg_operand" "=r") - (sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "r")))] - "TARGET_29050" - "sqrt %0,%1,2" - [(set_attr "type" "dsqrt")]) - - ;; SRA - (define_insn "ashrsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (ashiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (match_operand:QI 2 "srcb_operand" "rn")))] - "" - "sra %0,%1,%Q2") - - ;; SRL - (define_insn "lshrsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r") - (match_operand:QI 2 "srcb_operand" "rn")))] - "" - "srl %0,%1,%Q2") - - ;; STORE - ;; - ;; These somewhat bogus patterns exist to set OPT = 001/010 for partial-word - ;; stores on systems with DW not set. - (define_insn "" - [(set (mem:SI (and:SI (match_operand:SI 0 "gpc_reg_operand" "r") - (const_int -4))) - (match_operand:SI 1 "gpc_reg_operand" "r"))] - "! TARGET_DW_ENABLE" - "store 0,1,%1,%0" - [(set_attr "type" "store")]) - - (define_insn "" - [(set (mem:SI (and:SI (match_operand:SI 0 "gpc_reg_operand" "r") - (const_int -3))) - (match_operand:SI 1 "gpc_reg_operand" "r"))] - "! TARGET_DW_ENABLE" - "store 0,2,%1,%0" - [(set_attr "type" "store")]) - - ;; STOREM - (define_expand "store_multiple" - [(use (match_operand 0 "" "")) - (use (match_operand 1 "" "")) - (use (match_operand 2 "" ""))] - "" - " - { rtx pat; - - if (TARGET_NO_STOREM_BUG) - pat = gen_store_multiple_no_bug (operands[0], operands[1], operands[2]); - else - pat = gen_store_multiple_bug (operands[0], operands[1], operands[2]); - - if (pat) - emit_insn (pat); - else - FAIL; - - DONE; - }") - - (define_expand "store_multiple_no_bug" - [(set (match_dup 4) - (match_operand:PSI 2 "const_int_operand" "")) - (match_par_dup 3 [(set (match_operand:SI 0 "" "") - (match_operand:SI 1 "" ""))])] - "" - " - { - int regno; - int count; - rtx from; - int i; - - /* Support only storing a constant number of hard registers to memory. */ - if (GET_CODE (operands[2]) != CONST_INT - || operands[2] == const1_rtx - || GET_CODE (operands[0]) != MEM - || GET_CODE (operands[1]) != REG - || REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER) - FAIL; - - count = INTVAL (operands[2]); - regno = REGNO (operands[1]); - - /* CR gets set to the number of registers minus one. */ - operands[2] = GEN_INT(count - 1); - - operands[3] = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count + 2)); - from = memory_address (SImode, XEXP (operands[0], 0)); - XVECEXP (operands[3], 0, 0) = gen_rtx_SET (VOIDmode, - gen_rtx_MEM (SImode, from), - gen_rtx_REG (SImode, regno)); - operands[4] = gen_reg_rtx (PSImode); - XVECEXP (operands[3], 0, 1) = gen_rtx_USE (VOIDmode, operands[4]); - XVECEXP (operands[3], 0, 2) = gen_rtx_CLOBBER (VOIDmode, operands[4]); - - for (i = 1; i < count; i++) - XVECEXP (operands[3], 0, i + 2) - = gen_rtx_SET (VOIDmode, - gen_rtx_MEM (SImode, plus_constant (from, i * 4)), - gen_rtx_REG (SImode, regno + i)); - }") - - (define_expand "store_multiple_bug" - [(match_par_dup 3 [(set (match_operand:SI 0 "" "") - (match_operand:SI 1 "" "")) - (use (match_operand:SI 2 "" ""))])] - "" - " - { - int regno; - int count; - rtx from; - int i; - - /* Support only storing a constant number of hard registers to memory. */ - if (GET_CODE (operands[2]) != CONST_INT - || operands[2] == const1_rtx - || GET_CODE (operands[0]) != MEM - || GET_CODE (operands[1]) != REG - || REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER) - FAIL; - - count = INTVAL (operands[2]); - regno = REGNO (operands[1]); - - operands[3] = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count + 1)); - from = memory_address (SImode, XEXP (operands[0], 0)); - XVECEXP (operands[3], 0, 0) = gen_rtx_SET (VOIDmode, - gen_rtx_MEM (SImode, from), - gen_rtx_REG (SImode, regno)); - XVECEXP (operands[3], 0, 1) - = gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (PSImode)); - - for (i = 1; i < count; i++) - XVECEXP (operands[3], 0, i + 1) - = gen_rtx_SET (VOIDmode, - gen_rtx_MEM (SImode, plus_constant (from, i * 4)), - gen_rtx_REG (SImode, regno + i)); - }") - - (define_insn "" - [(set (match_operand 0 "memory_operand" "=m") - (match_operand 1 "gpc_reg_operand" "r")) - (clobber (match_scratch:PSI 2 "=&c"))] - "!TARGET_NO_STOREM_BUG - && GET_MODE (operands[0]) == GET_MODE (operands[1]) - && GET_MODE_SIZE (GET_MODE (operands[0])) > UNITS_PER_WORD" - "mtsrim cr,%S1\;storem 0,0,%1,%0" - [(set_attr "type" "multi")]) - - (define_insn "" - [(match_parallel 0 "store_multiple_operation" - [(set (match_operand:SI 1 "memory_operand" "=m") - (match_operand:SI 2 "gpc_reg_operand" "r")) - (clobber (match_scratch:PSI 3 "=&c"))])] - "!TARGET_NO_STOREM_BUG" - "mtsrim cr,%V0\;storem 0,0,%2,%1" - [(set_attr "type" "multi")]) - - (define_insn "" - [(set (match_operand 0 "memory_operand" "=m") - (match_operand 1 "gpc_reg_operand" "r")) - (use (match_operand:PSI 2 "register_operand" "+c")) - (clobber (match_dup 2))] - "TARGET_NO_STOREM_BUG - && GET_MODE (operands[0]) == GET_MODE (operands[1]) - && GET_MODE_SIZE (GET_MODE (operands[0])) > UNITS_PER_WORD" - "storem 0,0,%1,%0" - [(set_attr "type" "store")]) - - (define_insn "" - [(match_parallel 0 "store_multiple_operation" - [(set (match_operand:SI 1 "memory_operand" "=m") - (match_operand:SI 2 "gpc_reg_operand" "r")) - (use (match_operand:PSI 3 "register_operand" "+c")) - (clobber (match_dup 3))])] - "TARGET_NO_STOREM_BUG" - "storem 0,0,%2,%1" - [(set_attr "type" "store")]) - - ;; SUB - ;; - ;; Either operand can be a register or an 8-bit constant, but both cannot be - ;; constants (can't usually occur anyway). - (define_expand "subsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (minus:SI (match_operand:SI 1 "srcb_operand" "") - (match_operand:SI 2 "srcb_operand" "")))] - "" - " - { - if (GET_CODE (operands[0]) == CONST_INT - && GET_CODE (operands[1]) == CONST_INT) - operands[1] = force_reg (SImode, operands[1]); - }") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (minus:SI (match_operand:SI 1 "srcb_operand" "r,I") - (match_operand:SI 2 "srcb_operand" "rI,r")))] - "register_operand (operands[1], SImode) - || register_operand (operands[2], SImode)" - "@ - sub %0,%1,%2 - subr %0,%2,%1") - - (define_insn "subdi3" - [(set (match_operand:DI 0 "gpc_reg_operand" "=r") - (minus:DI (match_operand:DI 1 "gpc_reg_operand" "r") - (match_operand:DI 2 "gpc_reg_operand" "r")))] - "" - "sub %L0,%L1,%L2\;subc %0,%1,%2" - [(set_attr "type" "multi")]) - - ;; SUBR (also used above in SUB) - (define_insn "negdi2" - [(set (match_operand:DI 0 "gpc_reg_operand" "=r") - (neg:DI (match_operand:DI 1 "gpc_reg_operand" "r")))] - "" - "subr %L0,%L1,0\;subrc %0,%1,0" - [(set_attr "type" "multi")]) - - (define_insn "negsi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (neg:SI (match_operand:SI 1 "gpc_reg_operand" "r")))] - "" - "subr %0,%1,0") - - ;; XNOR - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (not:SI (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r") - (match_operand:SI 2 "gpc_reg_operand" "r"))))] - "" - "xnor %0,%1,%2") - - ;; XOR - - (define_insn "xorsi3" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r") - (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r") - (match_operand:SI 2 "and_operand" "rI,K")))] - "" - "@ - xor %0,%1,%2 - xnor %0,%1,%C2") - - ;; Can use XOR to negate floating-point values, but we are better off not doing - ;; it that way on the 29050 so it can combine with the fmac insns. - (define_expand "negsf2" - [(parallel [(set (match_operand:SF 0 "register_operand" "") - (neg:SF (match_operand:SF 1 "register_operand" ""))) - (clobber (match_scratch:SI 2 ""))])] - "! TARGET_SOFT_FLOAT" - " - { - rtx result; - rtx target; - - if (! TARGET_29050) - { - target = operand_subword_force (operands[0], 0, SFmode); - result = expand_binop (SImode, xor_optab, - operand_subword_force (operands[1], 0, SFmode), - GEN_INT(0x80000000), target, 0, OPTAB_WIDEN); - if (result == 0) - abort (); - - if (result != target) - emit_move_insn (result, target); - - /* Make a place for REG_EQUAL. */ - emit_move_insn (operands[0], operands[0]); - DONE; - } - }") - - (define_expand "negdf2" - [(parallel [(set (match_operand:DF 0 "register_operand" "") - (neg:DF (match_operand:DF 1 "register_operand" ""))) - (clobber (match_scratch:SI 2 ""))])] - "! TARGET_SOFT_FLOAT" - " - { - rtx result; - rtx target; - rtx insns; - - if (! TARGET_29050) - { - start_sequence (); - target = operand_subword (operands[0], 0, 1, DFmode); - result = expand_binop (SImode, xor_optab, - operand_subword_force (operands[1], 0, DFmode), - GEN_INT(0x80000000), target, 0, OPTAB_WIDEN); - if (result == 0) - abort (); - - if (result != target) - emit_move_insn (result, target); - - emit_move_insn (operand_subword (operands[0], 1, 1, DFmode), - operand_subword_force (operands[1], 1, DFmode)); - - insns = get_insns (); - end_sequence (); - - emit_no_conflict_block (insns, operands[0], operands[1], 0, 0); - DONE; - } - }") - - ;; Sign extend and truncation operations. - (define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "gpc_reg_operand" "=r") - (zero_extend:HI (match_operand:QI 1 "gpc_reg_operand" "r")))] - "" - "and %0,%1,255") - - (define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (zero_extend:SI (match_operand:QI 1 "gpc_reg_operand" "r")))] - "" - "and %0,%1,255") - - (define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (zero_extend:SI (match_operand:HI 1 "gpc_reg_operand" "0")))] - "" - "consth %0,0") - - (define_expand "extendqihi2" - [(set (match_dup 2) - (ashift:SI (match_operand:QI 1 "gpc_reg_operand" "") - (const_int 24))) - (set (match_operand:HI 0 "gpc_reg_operand" "") - (ashiftrt:SI (match_dup 2) - (const_int 24)))] - "" - " - { operands[0] = gen_lowpart (SImode, operands[0]); - operands[1] = gen_lowpart (SImode, operands[1]); - operands[2] = gen_reg_rtx (SImode); }") - - (define_expand "extendqisi2" - [(set (match_dup 2) - (ashift:SI (match_operand:QI 1 "gpc_reg_operand" "") - (const_int 24))) - (set (match_operand:SI 0 "gpc_reg_operand" "") - (ashiftrt:SI (match_dup 2) - (const_int 24)))] - "" - " - { operands[1] = gen_lowpart (SImode, operands[1]); - operands[2] = gen_reg_rtx (SImode); }") - - (define_expand "extendhisi2" - [(set (match_dup 2) - (ashift:SI (match_operand:HI 1 "gpc_reg_operand" "") - (const_int 16))) - (set (match_operand:SI 0 "gpc_reg_operand" "") - (ashiftrt:SI (match_dup 2) - (const_int 16)))] - "" - " - { operands[1] = gen_lowpart (SImode, operands[1]); - operands[2] = gen_reg_rtx (SImode); }") - - ;; Define the methods used to move data around. - ;; - ;; movsi: - ;; - ;; If storing into memory, force source into register. - (define_expand "movsi" - [(set (match_operand:SI 0 "general_operand" "") - (match_operand:SI 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM && ! gpc_reg_operand (operands[1], SImode)) - operands[1] = copy_to_mode_reg (SImode, operands[1]); - else if (spec_reg_operand (operands[0], SImode) - && ! (register_operand (operands[1], SImode) - || cint_16_operand (operands[1], SImode))) - operands[1] = force_reg (SImode, operands[1]); - }") - - (define_expand "movpsi" - [(set (match_operand:PSI 0 "general_operand" "") - (match_operand:PSI 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM - && ! gpc_reg_operand (operands[1], PSImode)) - operands[1] = copy_to_mode_reg (PSImode, operands[1]); - else if (spec_reg_operand (operands[0], PSImode) - && ! (register_operand (operands[1], PSImode) - || cint_16_operand (operands[1], PSImode))) - operands[1] = force_reg (PSImode, operands[1]); - }") - - (define_split - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (match_operand:SI 1 "long_const_operand" ""))] - "" - [(set (match_dup 0) - (and:SI (match_dup 1) - (const_int 65535))) - (set (match_dup 0) - (ior:SI (zero_extend:SI (match_dup 2)) - (and:SI (match_dup 1) - (const_int -65536))))] - " operands[2] = gen_lowpart (HImode, operands[0]); ") - - ;; Subroutines to load/store halfwords. Operands 0 and 1 are the output and - ;; input, respectively, except that the address is passed for a MEM instead - ;; of the MEM itself and the short item is passed in QImode. - ;; - ;; Operand 2 is a scratch general register and operand 3 is a scratch register - ;; used for BP. When called before reload, pseudos are passed for both - ;; operands. During reload, R_TAV is used for the general register, and - ;; a reload register of class BR_REGS (R_VP) for BP. - ;; - ;; We have two versions of the store operations, for when halfword writes are - ;; supported and when they are not. - (define_expand "loadhi" - [(parallel [(set (match_operand:SI 2 "gpc_reg_operand" "") - (mem:SI (and:SI (match_operand:SI 1 "gpc_reg_operand" "") - (const_int -4)))) - (set (match_operand:PSI 3 "register_operand" "") - (truncate:PSI (match_dup 1)))]) - (set (match_operand:SI 0 "gpc_reg_operand" "") - (zero_extract:SI (match_dup 2) - (const_int 16) - (ashift:PSI (match_dup 3) (const_int 3))))] - "" - "") - - (define_expand "storehinhww" - [(parallel [(set (match_operand:SI 2 "gpc_reg_operand" "") - (mem:SI (and:SI (match_operand:SI 0 "gpc_reg_operand" "") - (const_int -4)))) - (set (match_operand:PSI 3 "register_operand" "") - (truncate:PSI (match_dup 0)))]) - (set (zero_extract:SI (match_dup 2) - (const_int 16) - (ashift:PSI (match_dup 3) (const_int 3))) - (match_operand:SI 1 "gpc_reg_operand" "")) - (set (mem:SI (match_dup 0)) - (match_dup 2))] - "" - "") - - (define_expand "storehihww" - [(set (match_operand:PSI 3 "register_operand" "") - (truncate:PSI (match_operand:SI 0 "gpc_reg_operand" ""))) - (set (match_operand:SI 2 "gpc_reg_operand" "") - (ior:SI (and:SI (not:SI (ashift:SI (const_int 65535) - (ashift:PSI (match_dup 3) - (const_int 3)))) - (match_operand:SI 1 "gpc_reg_operand" "")) - (ashift:SI (zero_extend:SI (match_dup 4)) - (ashift:PSI (match_dup 3) (const_int 3))))) - (set (mem:SI (and:SI (match_dup 0) - (const_int -3))) - (match_dup 2))] - "" - " - { operands[4] = gen_lowpart (HImode, operands[1]); }") - - (define_expand "movhi" - [(set (match_operand:HI 0 "general_operand" "") - (match_operand:HI 1 "general_operand" ""))] - "" - " - { if (GET_CODE (operands[0]) == MEM) - { - if (! gpc_reg_operand (operands[1], HImode)) - operands[1] = copy_to_mode_reg (HImode, operands[1]); - if (! TARGET_DW_ENABLE) - { - rtx general = gen_reg_rtx (SImode); - rtx bp = gen_reg_rtx (PSImode); - rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx)) - = TARGET_BYTE_WRITES ? gen_storehihww : gen_storehinhww; - rtx seq = (*fcn) (XEXP (operands[0], 0), - gen_lowpart (SImode, operands[1]), - general, bp); - - a29k_set_memflags (seq, operands[0]); - emit_insn (seq); - DONE; - } - } - else if (GET_CODE (operands[1]) == MEM) - { - if (! TARGET_DW_ENABLE) - { - rtx general = gen_reg_rtx (SImode); - rtx bp = gen_reg_rtx (PSImode); - rtx seq = gen_loadhi (gen_lowpart (SImode, operands[0]), - XEXP (operands[1], 0), general, bp); - - a29k_set_memflags (seq, operands[1]); - emit_insn (seq); - DONE; - } - } - }") - - (define_expand "reload_inhi" - [(parallel [(match_operand:SI 0 "register_operand" "=r") - (match_operand:SI 1 "reload_memory_operand" "m") - (match_operand:PSI 2 "register_operand" "=b")])] - "! TARGET_DW_ENABLE" - " - { rtx seq = gen_loadhi (gen_lowpart (SImode, operands[0]), - a29k_get_reloaded_address (operands[1]), - gen_rtx_REG (SImode, R_TAV), - operands[2]); - - a29k_set_memflags (seq, operands[1]); - emit_insn (seq); - DONE; - }") - - (define_expand "reload_outhi" - [(parallel [(match_operand:SI 0 "reload_memory_operand" "=m") - (match_operand:SI 1 "register_operand" "m") - (match_operand:PSI 2 "register_operand" "=b")])] - "! TARGET_DW_ENABLE" - " - { rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx)) = - TARGET_BYTE_WRITES ? gen_storehihww : gen_storehinhww; - rtx seq = (*fcn) (a29k_get_reloaded_address (operands[0]), - gen_lowpart (SImode, operands[1]), - gen_rtx_REG (SImode, R_TAV), operands[2]); - - a29k_set_memflags (seq, operands[0]); - emit_insn (seq); - DONE; - }") - - ;; Subroutines to load/store bytes. Operands 0 and 1 are the output and - ;; input, respectively, except that the address is passed for a MEM instead - ;; of the MEM itself and the short item is passed in QImode. - ;; - ;; Operand 2 is a scratch general register and operand 3 is a scratch register - ;; used for BP. When called before reload, pseudos are passed for both - ;; operands. During reload, R_TAV is used for the general register, and - ;; a reload register of class BR_REGS (R_VP) for BP. - ;; - ;; We have two versions of the store operations, for when byte writes are - ;; supported and when they are not. - (define_expand "loadqi" - [(parallel [(set (match_operand:SI 2 "gpc_reg_operand" "") - (mem:SI (and:SI (match_operand:SI 1 "gpc_reg_operand" "") - (const_int -4)))) - (set (match_operand:PSI 3 "register_operand" "") - (truncate:PSI (match_dup 1)))]) - (set (match_operand:SI 0 "gpc_reg_operand" "") - (zero_extract:SI (match_dup 2) - (const_int 8) - (ashift:PSI (match_dup 3) (const_int 3))))] - "" - "") - - (define_expand "storeqinhww" - [(parallel [(set (match_operand:SI 2 "gpc_reg_operand" "") - (mem:SI (and:SI (match_operand:SI 0 "gpc_reg_operand" "") - (const_int -4)))) - (set (match_operand:PSI 3 "register_operand" "") - (truncate:PSI (match_dup 0)))]) - (set (zero_extract:SI (match_dup 2) - (const_int 8) - (ashift:PSI (match_dup 3) - (const_int 3))) - (match_operand:SI 1 "gpc_reg_operand" "")) - (set (mem:SI (match_dup 0)) - (match_dup 2))] - "" - "") - - (define_expand "storeqihww" - [(set (match_operand:PSI 3 "register_operand" "") - (truncate:PSI (match_operand:SI 0 "gpc_reg_operand" ""))) - (set (match_operand:SI 2 "gpc_reg_operand" "") - (ior:SI (and:SI (not:SI (ashift:SI (const_int 255) - (ashift:PSI (match_dup 3) - (const_int 3)))) - (match_operand:SI 1 "gpc_reg_operand" "")) - (ashift:SI (zero_extend:SI (match_dup 4)) - (ashift:PSI (match_dup 3) - (const_int 3))))) - (set (mem:SI (and:SI (match_dup 0) - (const_int -4))) - (match_dup 2))] - "" - " - { operands[4] = gen_lowpart (QImode, operands[1]); }") - - (define_expand "movqi" - [(set (match_operand:QI 0 "general_operand" "") - (match_operand:QI 1 "general_operand" ""))] - "" - " - { if (GET_CODE (operands[0]) == MEM) - { - if (! gpc_reg_operand (operands[1], QImode)) - operands[1] = copy_to_mode_reg (QImode, operands[1]); - if (! TARGET_DW_ENABLE) - { - rtx general = gen_reg_rtx (SImode); - rtx bp = gen_reg_rtx (PSImode); - rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx)) - = TARGET_BYTE_WRITES ? gen_storeqihww : gen_storeqinhww; - rtx seq = (*fcn) (XEXP (operands[0], 0), - gen_lowpart (SImode, operands[1]), - general, bp); - - a29k_set_memflags (seq, operands[0]); - emit_insn (seq); - DONE; - } - } - else if (GET_CODE (operands[1]) == MEM) - { - if (! TARGET_DW_ENABLE) - { - rtx general = gen_reg_rtx (SImode); - rtx bp = gen_reg_rtx (PSImode); - rtx seq = gen_loadqi (gen_lowpart (SImode, operands[0]), - XEXP (operands[1], 0), general, bp); - - a29k_set_memflags (seq, operands[1]); - emit_insn (seq); - DONE; - } - } - }") - - (define_expand "reload_inqi" - [(parallel [(match_operand:SI 0 "register_operand" "=r") - (match_operand:SI 1 "reload_memory_operand" "m") - (match_operand:PSI 2 "register_operand" "=b")])] - "! TARGET_DW_ENABLE" - " - { rtx seq = gen_loadqi (gen_lowpart (SImode, operands[0]), - a29k_get_reloaded_address (operands[1]), - gen_rtx_REG (SImode, R_TAV), - operands[2]); - - a29k_set_memflags (seq, operands[1]); - emit_insn (seq); - DONE; - }") - - (define_expand "reload_outqi" - [(parallel [(match_operand:SI 0 "reload_memory_operand" "=m") - (match_operand:SI 1 "register_operand" "m") - (match_operand:PSI 2 "register_operand" "=b")])] - "! TARGET_DW_ENABLE" - " - { rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx)) = - TARGET_BYTE_WRITES ? gen_storeqihww : gen_storeqinhww; - rtx seq = (*fcn) (a29k_get_reloaded_address (operands[0]), - gen_lowpart (SImode, operands[1]), - gen_rtx_REG (SImode, R_TAV), operands[2]); - - a29k_set_memflags (seq, operands[0]); - emit_insn (seq); - DONE; - }") - - ;; Now the actual insns used to move data around. We include here the - ;; DEFINE_SPLITs that may be needed. In some cases these will be - ;; split again. For floating-point, if we can look inside the constant, - ;; always split it. This can eliminate unnecessary insns. - (define_insn "" - [(set (match_operand:SF 0 "out_operand" "=r,r,r,r,m") - (match_operand:SF 1 "in_operand" "r,E,F,m,r"))] - "(gpc_reg_operand (operands[0], SFmode) - || gpc_reg_operand (operands[1], SFmode)) - && ! TARGET_29050" - "@ - sll %0,%1,0 - # - const %0,%1\;consth %0,%1 - load 0,0,%0,%1 - store 0,0,%1,%0" - [(set_attr "type" "misc,multi,multi,load,store")]) - - (define_insn "" - [(set (match_operand:SF 0 "out_operand" "=r,r,r,r,m,*a,r") - (match_operand:SF 1 "in_operand" "r,E,F,m,r,r,*a"))] - "(gpc_reg_operand (operands[0], SFmode) - || gpc_reg_operand (operands[1], SFmode)) - && TARGET_29050" - "@ - sll %0,%1,0 - # - const %0,%1\;consth %0,%1 - load 0,0,%0,%1 - store 0,0,%1,%0 - mtacc %1,1,%0 - mfacc %0,1,%1" - [(set_attr "type" "misc,multi,multi,load,store,fadd,fadd")]) - - ;; Turn this into SImode. It will then be split up that way. - (define_split - [(set (match_operand:SF 0 "register_operand" "") - (match_operand:SF 1 "float_const_operand" ""))] - "HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT" - [(set (match_dup 0) - (match_dup 1))] - " - { operands[0] = operand_subword (operands[0], 0, 0, SFmode); - operands[1] = operand_subword (operands[1], 0, 0, SFmode); - - if (operands[0] == 0 || operands[1] == 0) - FAIL; - }") - - (define_insn "" - [(set (match_operand:DF 0 "out_operand" "=?r,?r,r,m") - (match_operand:DF 1 "in_operand" "rE,F,m,r")) - (clobber (match_scratch:PSI 2 "=X,X,&c,&c"))] - "(gpc_reg_operand (operands[0], DFmode) - || gpc_reg_operand (operands[1], DFmode)) - && ! TARGET_29050" - "@ - # - const %0,%1\;consth %0,%1\;const %L0,%L1\;consth %L0,%L1 - mtsrim cr,1\;loadm 0,0,%0,%1 - mtsrim cr,1\;storem 0,0,%1,%0" - [(set_attr "type" "multi")]) - - (define_insn "" - [(set (match_operand:DF 0 "out_operand" "=?r,?r,r,m,?*a,?r") - (match_operand:DF 1 "in_operand" "rE,F,m,r,r,*a")) - (clobber (match_scratch:PSI 2 "=X,X,&c,&c,X,X"))] - "(gpc_reg_operand (operands[0], DFmode) - || gpc_reg_operand (operands[1], DFmode)) - && TARGET_29050" - "@ - # - const %0,%1\;consth %0,%1\;const %L0,%L1\;consth %L0,%L1 - mtsrim cr,1\;loadm 0,0,%0,%1 - mtsrim cr,1\;storem 0,0,%1,%0 - mtacc %1,2,%0 - mfacc %0,2,%1" - [(set_attr "type" "multi,multi,multi,multi,fadd,fadd")]) - - ;; Split register-register copies and constant loads into two SImode loads, - ;; one for each word. In the constant case, they will get further split. - ;; Don't so this until register allocation, though, since it will - ;; interfere with register allocation. Normally copy the lowest-addressed - ;; word first; the exception is if we are copying register to register and - ;; the lowest register of the first operand is the highest register of the - ;; second operand. - (define_split - [(set (match_operand:DF 0 "gpc_reg_operand" "") - (match_operand:DF 1 "gpc_reg_or_float_constant_operand" "")) - (clobber (match_scratch:PSI 2 ""))] - "reload_completed" - [(set (match_dup 3) (match_dup 4)) - (set (match_dup 5) (match_dup 6))] - " - { if (GET_CODE (operands[1]) == REG - && REGNO (operands[0]) == REGNO (operands[1]) + 1) - { - operands[3] = operand_subword (operands[0], 1, 1, DFmode); - operands[4] = operand_subword (operands[1], 1, 1, DFmode); - operands[5] = operand_subword (operands[0], 0, 1, DFmode); - operands[6] = operand_subword (operands[1], 0, 1, DFmode); - } - else - { - operands[3] = operand_subword (operands[0], 0, 1, DFmode); - operands[4] = operand_subword (operands[1], 0, 1, DFmode); - operands[5] = operand_subword (operands[0], 1, 1, DFmode); - operands[6] = operand_subword (operands[1], 1, 1, DFmode); - } - - if (operands[3] == 0 || operands[4] == 0 - || operands[5] == 0 || operands[6] == 0) - FAIL; - }") - - ;; Split memory loads and stores into the MTSR and LOADM/STOREM. - (define_split - [(set (match_operand:DF 0 "out_operand" "") - (match_operand:DF 1 "in_operand" "")) - (clobber (reg:PSI 179))] - "TARGET_NO_STOREM_BUG - && (memory_operand (operands[0], DFmode) - || memory_operand (operands[1], DFmode))" - [(set (reg:PSI 179) (const_int 1)) - (parallel [(set (match_dup 0) (match_dup 1)) - (use (reg:PSI 179)) - (clobber (reg:PSI 179))])] - "") - - ;; DI move is similar to DF move. - (define_insn "" - [(set (match_operand:DI 0 "out_operand" "=?r,r,m") - (match_operand:DI 1 "in_operand" "rn,m,r")) - (clobber (match_scratch:PSI 2 "=X,&c,&c"))] - "(gpc_reg_operand (operands[0], DImode) - || gpc_reg_operand (operands[1], DImode))" - "@ - # - mtsrim cr,1\;loadm 0,0,%0,%1 - mtsrim cr,1\;storem 0,0,%1,%0" - [(set_attr "type" "multi")]) - - (define_split - [(set (match_operand:DI 0 "gpc_reg_operand" "") - (match_operand:DI 1 "gpc_reg_or_integer_constant_operand" "")) - (clobber (match_scratch:PSI 2 ""))] - "reload_completed" - [(set (match_dup 3) (match_dup 4)) - (set (match_dup 5) (match_dup 6))] - " - { if (GET_CODE (operands[1]) == REG - && REGNO (operands[0]) == REGNO (operands[1]) + 1) - { - operands[3] = operand_subword (operands[0], 1, 1, DImode); - operands[4] = operand_subword (operands[1], 1, 1, DImode); - operands[5] = operand_subword (operands[0], 0, 1, DImode); - operands[6] = operand_subword (operands[1], 0, 1, DImode); - } - else - { - operands[3] = operand_subword (operands[0], 0, 1, DImode); - operands[4] = operand_subword (operands[1], 0, 1, DImode); - operands[5] = operand_subword (operands[0], 1, 1, DImode); - operands[6] = operand_subword (operands[1], 1, 1, DImode); - } - }") - - (define_split - [(set (match_operand:DI 0 "out_operand" "") - (match_operand:DI 1 "in_operand" "")) - (clobber (reg:PSI 179))] - "TARGET_NO_STOREM_BUG - && (memory_operand (operands[0], DImode) - || memory_operand (operands[1], DImode))" - [(set (reg:PSI 179) (const_int 1)) - (parallel [(set (match_dup 0) (match_dup 1)) - (use (reg:PSI 179)) - (clobber (reg:PSI 179))])] - "") - - ;; TImode moves are very similar to DImode moves, except that we can't - ;; have constants. - (define_insn "" - [(set (match_operand:TI 0 "out_operand" "=?r,r,m") - (match_operand:TI 1 "in_operand" "r,m,r")) - (clobber (match_scratch:PSI 2 "=X,&c,&c"))] - "(gpc_reg_operand (operands[0], TImode) - || gpc_reg_operand (operands[1], TImode))" - "@ - # - mtsrim cr,3\;loadm 0,0,%0,%1 - mtsrim cr,3\;storem 0,0,%1,%0" - [(set_attr "type" "multi,multi,multi")]) - - (define_split - [(set (match_operand:TI 0 "gpc_reg_operand" "") - (match_operand:TI 1 "gpc_reg_operand" "")) - (clobber (match_scratch:PSI 2 ""))] - "reload_completed" - [(set (match_dup 3) (match_dup 4)) - (set (match_dup 5) (match_dup 6)) - (set (match_dup 7) (match_dup 8)) - (set (match_dup 9) (match_dup 10))] - " - { - if (REGNO (operands[0]) >= REGNO (operands[1]) + 1 - && REGNO (operands[0]) <= REGNO (operands[1]) + 3) - { - operands[3] = gen_rtx_REG (SImode, REGNO (operands[0]) + 3); - operands[4] = gen_rtx_REG (SImode, REGNO (operands[1]) + 3); - operands[5] = gen_rtx_REG (SImode, REGNO (operands[0]) + 2); - operands[6] = gen_rtx_REG (SImode, REGNO (operands[1]) + 2); - operands[7] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - operands[8] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - operands[9] = gen_rtx_REG (SImode, REGNO (operands[0])); - operands[10] = gen_rtx_REG (SImode, REGNO (operands[1])); - } - else - { - operands[3] = gen_rtx_REG (SImode, REGNO (operands[0])); - operands[4] = gen_rtx_REG (SImode, REGNO (operands[1])); - operands[5] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - operands[6] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - operands[7] = gen_rtx_REG (SImode, REGNO (operands[0]) + 2); - operands[8] = gen_rtx_REG (SImode, REGNO (operands[1]) + 2); - operands[9] = gen_rtx_REG (SImode, REGNO (operands[0]) + 3); - operands[10] = gen_rtx_REG (SImode, REGNO (operands[1]) + 3); - } - }") - - (define_split - [(set (match_operand:TI 0 "out_operand" "") - (match_operand:TI 1 "in_operand" "")) - (clobber (reg:PSI 179))] - "TARGET_NO_STOREM_BUG - && (memory_operand (operands[0], TImode) - || memory_operand (operands[1], TImode))" - [(set (reg:PSI 179) (const_int 3)) - (parallel [(set (match_dup 0) (match_dup 1)) - (use (reg:PSI 179)) - (clobber (reg:PSI 179))])] - "") - - (define_insn "" - [(set (match_operand:SI 0 "out_operand" "=r,r,r,r,r,r,r,m,*h,*h") - (match_operand:SI 1 "in_operand" "r,J,M,O,i,m,*h,r,r,J"))] - "(gpc_reg_operand (operands[0], SImode) - || gpc_reg_operand (operands[1], SImode) - || (spec_reg_operand (operands[0], SImode) - && cint_16_operand (operands[1], SImode))) - && ! TARGET_29050" - "@ - sll %0,%1,0 - const %0,%1 - constn %0,%M1 - cpeq %0,gr1,gr1 - # - load 0,0,%0,%1 - mfsr %0,%1 - store 0,0,%1,%0 - mtsr %0,%1 - mtsrim %0,%1" - [(set_attr "type" "misc,misc,misc,misc,multi,load,misc,store,misc,misc")]) - - (define_insn "" - [(set (match_operand:SI 0 "out_operand" "=r,r,r,r,r,r,r,m,*h,*h") - (match_operand:SI 1 "in_operand" "r,J,M,O,i,m,*h,r,r,J"))] - "(gpc_reg_operand (operands[0], SImode) - || gpc_reg_operand (operands[1], SImode) - || (spec_reg_operand (operands[0], SImode) - && cint_16_operand (operands[1], SImode))) - && TARGET_29050" - "@ - sll %0,%1,0 - const %0,%1 - constn %0,%M1 - consthz %0,%1 - # - load 0,0,%0,%1 - mfsr %0,%1 - store 0,0,%1,%0 - mtsr %0,%1 - mtsrim %0,%1" - [(set_attr "type" "misc,misc,misc,misc,multi,load,misc,store,misc,misc")]) - - (define_insn "" - [(set (match_operand:PSI 0 "out_operand" "=*r,*r,*r,*r,m,h,h") - (match_operand:PSI 1 "in_operand" "r,i,m,h,r,r,J"))] - "(gpc_reg_operand (operands[0], PSImode) - || gpc_reg_operand (operands[1], PSImode) - || (spec_reg_operand (operands[0], PSImode) - && cint_16_operand (operands[1], PSImode)))" - "@ - sll %0,%1,0 - const %0,%1 - load 0,0,%0,%1 - mfsr %0,%1 - store 0,0,%1,%0 - mtsr %0,%1 - mtsrim %0,%1" - [(set_attr "type" "misc,multi,load,misc,store,misc,misc")]) - - (define_insn "" - [(set (match_operand:HI 0 "out_operand" "=r,r,r,m,r,*h,*h") - (match_operand:HI 1 "in_operand" "r,i,m,r,*h,r,i"))] - "gpc_reg_operand (operands[0], HImode) - || gpc_reg_operand (operands[1], HImode) - || (spec_reg_operand (operands[0], HImode) - && cint_16_operand (operands[1], HImode))" - "@ - sll %0,%1,0 - const %0,%1 - load 0,2,%0,%1 - store 0,2,%1,%0 - mfsr %0,%1 - mtsr %0,%1 - mtsrim %0,%1" - [(set_attr "type" "misc,misc,load,store,misc,misc,misc")]) - - (define_insn "" - [(set (match_operand:QI 0 "out_operand" "=r,r,r,m,r,*h,*h") - (match_operand:QI 1 "in_operand" "r,i,m,r,*h,r,i"))] - "gpc_reg_operand (operands[0], QImode) - || gpc_reg_operand (operands[1], QImode) - || (spec_reg_operand (operands[0], HImode) - && cint_16_operand (operands[1], HImode))" - "@ - sll %0,%1,0 - const %0,%1 - load 0,1,%0,%1 - store 0,1,%1,%0 - mfsr %0,%1 - mtsr %0,%1 - mtsrim %0,%1" - [(set_attr "type" "misc,misc,load,store,misc,misc,misc")]) - - ;; Define move insns for DI, TI, SF, and DF. - ;; - ;; In no case do we support mem->mem directly. - ;; - ;; For DI move of constant to register, split apart at this time since these - ;; can require anywhere from 2 to 4 insns and determining which is complex. - ;; - ;; In other cases, handle similarly to SImode moves. - ;; - ;; However, indicate that DI, TI, and DF moves may clobber CR (reg 179). - (define_expand "movdi" - [(parallel [(set (match_operand:DI 0 "general_operand" "") - (match_operand:DI 1 "general_operand" "")) - (clobber (scratch:PSI))])] - "" - " - { - if (GET_CODE (operands[0]) == MEM) - operands[1] = force_reg (DImode, operands[1]); - }") - - (define_expand "movsf" - [(set (match_operand:SF 0 "general_operand" "") - (match_operand:SF 1 "general_operand" ""))] - "" - " - { if (GET_CODE (operands[0]) == MEM) - operands[1] = force_reg (SFmode, operands[1]); - }") - - (define_expand "movdf" - [(parallel [(set (match_operand:DF 0 "general_operand" "") - (match_operand:DF 1 "general_operand" "")) - (clobber (scratch:PSI))])] - "" - " - { if (GET_CODE (operands[0]) == MEM) - operands[1] = force_reg (DFmode, operands[1]); - }") - - (define_expand "movti" - [(parallel [(set (match_operand:TI 0 "general_operand" "") - (match_operand:TI 1 "general_operand" "")) - (clobber (scratch:PSI))])] - "" - " - { - if (GET_CODE (operands[0]) == MEM) - operands[1] = force_reg (TImode, operands[1]); - - /* We can't handle constants in general because there is no rtl to represent - 128 bit constants. Splitting happens to work for CONST_INTs so we split - them for good code. Other constants will get forced to memory. */ - - if (GET_CODE (operands[1]) == CONST_INT) - { - rtx part0, part1, part2, part3; - - part0 = operand_subword (operands[0], 0, 1, TImode); - part1 = operand_subword (operands[0], 1, 1, TImode); - part2 = operand_subword (operands[0], 2, 1, TImode); - part3 = operand_subword (operands[0], 3, 1, TImode); - - emit_move_insn (part0, const0_rtx); - emit_move_insn (part1, const0_rtx); - emit_move_insn (part2, const0_rtx); - emit_move_insn (part3, const0_rtx); - - DONE; - } - else if (CONSTANT_P (operands[1])) - { - operands[1] = force_const_mem (TImode, operands[1]); - if (! memory_address_p (TImode, XEXP (operands[1], 0)) - && ! reload_in_progress) - operands[1] = adjust_address (operands[1], TImode, 0); - } - }") - - ;; Here are the variants of the above for use during reload. - - (define_expand "reload_indf" - [(parallel [(set (match_operand:DF 0 "register_operand" "=r") - (match_operand:DF 1 "reload_memory_operand" "m")) - (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] - "" - "") - - (define_expand "reload_outdf" - [(parallel [(set (match_operand:DF 0 "reload_memory_operand" "=m") - (match_operand:DF 1 "register_operand" "r")) - (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] - "" - "") - - (define_expand "reload_indi" - [(parallel [(set (match_operand:DI 0 "register_operand" "=r") - (match_operand:DI 1 "reload_memory_operand" "m")) - (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] - "" - "") - - (define_expand "reload_outdi" - [(parallel [(set (match_operand:DI 0 "reload_memory_operand" "=m") - (match_operand:DI 1 "register_operand" "r")) - (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] - "" - "") - - (define_expand "reload_inti" - [(parallel [(set (match_operand:TI 0 "register_operand" "=r") - (match_operand:TI 1 "reload_memory_operand" "m")) - (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] - "" - "") - - (define_expand "reload_outti" - [(parallel [(set (match_operand:TI 0 "reload_memory_operand" "=m") - (match_operand:TI 1 "register_operand" "r")) - (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] - "" - "") - - ;; For compare operations, we simply store the comparison operands and - ;; do nothing else. The following branch or scc insn will output whatever - ;; is needed. - (define_expand "cmpsi" - [(set (cc0) - (compare (match_operand:SI 0 "gpc_reg_operand" "") - (match_operand:SI 1 "srcb_operand" "")))] - "" - " - { - a29k_compare_op0 = operands[0]; - a29k_compare_op1 = operands[1]; - a29k_compare_fp_p = 0; - DONE; - }") - - (define_expand "cmpsf" - [(set (cc0) - (compare (match_operand:SF 0 "gpc_reg_operand" "") - (match_operand:SF 1 "gpc_reg_operand" "")))] - "! TARGET_SOFT_FLOAT" - " - { - a29k_compare_op0 = operands[0]; - a29k_compare_op1 = operands[1]; - a29k_compare_fp_p = 1; - DONE; - }") - - (define_expand "cmpdf" - [(set (cc0) - (compare (match_operand:DF 0 "gpc_reg_operand" "") - (match_operand:DF 1 "gpc_reg_operand" "")))] - "! TARGET_SOFT_FLOAT" - " - { - a29k_compare_op0 = operands[0]; - a29k_compare_op1 = operands[1]; - a29k_compare_fp_p = 1; - DONE; - }") - - ;; We can generate bit-tests better if we use NE instead of EQ, but we - ;; don't have an NE for floating-point. So we have to have two patterns - ;; for EQ and two for NE. - - (define_expand "beq" - [(set (match_dup 1) (ne:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (ge (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (a29k_compare_op0)) == MODE_FLOAT) - { - emit_insn (gen_beq_fp (operands[0])); - DONE; - } - - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "beq_fp" - [(set (match_dup 1) (eq:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "bne" - [(set (match_dup 1) (ne:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (a29k_compare_op0)) == MODE_FLOAT) - { - emit_insn (gen_bne_fp (operands[0])); - DONE; - } - - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "bne_fp" - [(set (match_dup 1) (eq:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (ge (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - ;; We don't have a floating-point "lt" insn, so we have to use "gt" in that - ;; case with the operands swapped. The operands must both be registers in - ;; the floating-point case, so we know that swapping them is OK. - (define_expand "blt" - [(set (match_dup 1) (match_dup 2)) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - if (a29k_compare_fp_p) - operands[2] = gen_rtx_GT (SImode, a29k_compare_op1, a29k_compare_op0); - else - operands[2] = gen_rtx_LT (SImode, a29k_compare_op0, a29k_compare_op1); - }") - - ;; Similarly for "le". - (define_expand "ble" - [(set (match_dup 1) (match_dup 2)) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - if (a29k_compare_fp_p) - operands[2] = gen_rtx_GE (SImode, a29k_compare_op1, a29k_compare_op0); - else - operands[2] = gen_rtx_LE (SImode, a29k_compare_op0, a29k_compare_op1); - }") - - (define_expand "bltu" - [(set (match_dup 1) (ltu:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "bleu" - [(set (match_dup 1) (leu:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "bgt" - [(set (match_dup 1) (gt:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "bge" - [(set (match_dup 1) (ge:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "bgtu" - [(set (match_dup 1) (gtu:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "bgeu" - [(set (match_dup 1) (geu:SI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (lt (match_dup 1) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - operands[1] = gen_reg_rtx (SImode); - operands[2] = a29k_compare_op0; - operands[3] = a29k_compare_op1; - }") - - (define_expand "seq" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (eq:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - }") - - ;; This is the most complicated case, because we don't have a floating-point - ;; "ne" insn. If integer, handle normally. If floating-point, write the - ;; compare and then write an insn to reverse the test. - (define_expand "sne_fp" - [(set (match_dup 3) - (eq:SI (match_operand 1 "gpc_reg_operand" "") - (match_operand 2 "gpc_reg_operand" ""))) - (set (match_operand:SI 0 "gpc_reg_operand" "") - (ge:SI (match_dup 3) (const_int 0)))] - "! TARGET_SOFT_FLOAT" - " - { operands[3] = gen_reg_rtx (SImode); - }"); - - (define_expand "sne" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (ne:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - - if (a29k_compare_fp_p) - { - emit_insn (gen_sne_fp (operands[0], operands[1], operands[2])); - DONE; - } - }") - - ;; We don't have a floating-point "lt" insn, so use "gt" and swap the - ;; operands, the same as we do "blt". - (define_expand "slt" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (match_dup 1))] - "" - " - { - if (a29k_compare_fp_p) - operands[1] = gen_rtx_GT (SImode, a29k_compare_op1, a29k_compare_op0); - else - operands[1] = gen_rtx_LT (SImode, a29k_compare_op0, a29k_compare_op1); - }") - - ;; Similarly for "le" - (define_expand "sle" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (match_dup 1))] - "" - " - { - if (a29k_compare_fp_p) - operands[1] = gen_rtx_GE (SImode, a29k_compare_op1, a29k_compare_op0); - else - operands[1] = gen_rtx_LE (SImode, a29k_compare_op0, a29k_compare_op1); - }") - - (define_expand "sltu" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (ltu:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - }") - - (define_expand "sleu" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (leu:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - }") - - (define_expand "sgt" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (gt:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - }") - - (define_expand "sge" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (ge:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - }") - - (define_expand "sgtu" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (gtu:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - }") - - (define_expand "sgeu" - [(set (match_operand:SI 0 "gpc_reg_operand" "") - (geu:SI (match_dup 1) (match_dup 2)))] - "" - " - { - operands[1] = a29k_compare_op0; - operands[2] = a29k_compare_op1; - }") - - ;; Now define the actual jump insns. - (define_insn "" - [(set (pc) - (if_then_else (match_operator 0 "branch_operator" - [(match_operand:SI 1 "gpc_reg_operand" "r") - (const_int 0)]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "jmp%b0 %1,%l2%#" - [(set_attr "type" "branch")]) - - (define_insn "" - [(set (pc) - (if_then_else (match_operator 0 "branch_operator" - [(match_operand:SI 1 "gpc_reg_operand" "r") - (const_int 0)]) - (return) - (pc)))] - "null_epilogue ()" - "jmp%b0i %1,lr0%#" - [(set_attr "type" "branch")]) - - (define_insn "" - [(set (pc) - (if_then_else (match_operator 0 "branch_operator" - [(match_operand:SI 1 "gpc_reg_operand" "r") - (const_int 0)]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "jmp%B0 %1,%l2%#" - [(set_attr "type" "branch")]) - - (define_insn "" - [(set (pc) - (if_then_else (match_operator 0 "branch_operator" - [(match_operand:SI 1 "gpc_reg_operand" "r") - (const_int 0)]) - (pc) - (return)))] - "null_epilogue ()" - "jmp%B0i %1,lr0%#" - [(set_attr "type" "branch")]) - - (define_insn "jump" - [(set (pc) - (label_ref (match_operand 0 "" "")))] - "" - "jmp %e0%E0" - [(set_attr "type" "branch")]) - - (define_insn "return" - [(return)] - "null_epilogue ()" - "jmpi lr0%#" - [(set_attr "type" "branch")]) - - (define_insn "indirect_jump" - [(set (pc) - (match_operand:SI 0 "gpc_reg_operand" "r"))] - "" - "jmpi %0%#" - [(set_attr "type" "branch")]) - - (define_insn "tablejump" - [(set (pc) - (match_operand:SI 0 "gpc_reg_operand" "r")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jmpi %0%#" - [(set_attr "type" "branch")]) - - ;; JMPFDEC - (define_insn "" - [(set (pc) - (if_then_else (ge (match_operand:SI 0 "gpc_reg_operand" "+r") - (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc))) - (set (match_dup 0) - (plus:SI (match_dup 0) - (const_int -1)))] - "" - "jmpfdec %0,%l1%#" - [(set_attr "type" "branch")]) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/a29k-protos.h gcc-3.3/gcc/config/a29k/a29k-protos.h *** gcc-3.2.3/gcc/config/a29k/a29k-protos.h 2001-10-19 19:39:57.000000000 +0000 --- gcc-3.3/gcc/config/a29k/a29k-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,65 **** - /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU. - Copyright (C) 2000 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@nyu.edu) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #ifdef RTX_CODE - /* This function is used to get the address of an object. */ - extern struct rtx_def *a29k_get_reloaded_address PARAMS ((rtx)); - extern int gpc_reg_operand PARAMS ((rtx, enum machine_mode)); - extern int long_const_operand PARAMS ((rtx, enum machine_mode)); - extern int cint_8_operand PARAMS ((rtx, enum machine_mode)); - extern int cint_16_operand PARAMS ((rtx, enum machine_mode)); - extern int const_0_operand PARAMS ((rtx, enum machine_mode)); - extern int const_8_operand PARAMS ((rtx, enum machine_mode)); - extern int const_16_operand PARAMS ((rtx, enum machine_mode)); - extern int const_24_operand PARAMS ((rtx, enum machine_mode)); - extern int float_const_operand PARAMS ((rtx, enum machine_mode)); - extern int gpc_reg_or_float_constant_operand PARAMS ((rtx, enum machine_mode)); - extern int gpc_reg_or_integer_constant_operand PARAMS ((rtx, enum machine_mode)); - extern int spec_reg_operand PARAMS ((rtx, enum machine_mode)); - extern int accum_reg_operand PARAMS ((rtx, enum machine_mode)); - extern int srcb_operand PARAMS ((rtx, enum machine_mode)); - extern int cmplsrcb_operand PARAMS ((rtx, enum machine_mode)); - extern int gpc_reg_or_immediate_operand PARAMS ((rtx, enum machine_mode)); - extern int and_operand PARAMS ((rtx, enum machine_mode)); - extern int add_operand PARAMS ((rtx, enum machine_mode)); - extern int call_operand PARAMS ((rtx, enum machine_mode)); - extern int in_operand PARAMS ((rtx, enum machine_mode)); - extern int out_operand PARAMS ((rtx, enum machine_mode)); - extern int reload_memory_operand PARAMS ((rtx, enum machine_mode)); - extern void a29k_set_memflags PARAMS ((rtx, rtx)); - extern int fp_comparison_operator PARAMS ((rtx, enum machine_mode)); - extern int branch_operator PARAMS ((rtx, enum machine_mode)); - extern int load_multiple_operation PARAMS ((rtx, enum machine_mode)); - extern int store_multiple_operation PARAMS ((rtx, enum machine_mode)); - extern int masks_bits_for_special PARAMS ((rtx, rtx)); - extern int epilogue_operand PARAMS ((rtx, enum machine_mode)); - extern enum reg_class secondary_reload_class PARAMS ((enum reg_class, - enum machine_mode, rtx)); - extern int incoming_reg PARAMS ((int, int)); - extern void a29k_clobbers_to PARAMS ((rtx, rtx)); - extern int needs_regstack_p PARAMS ((void)); - extern int uses_local_reg_p PARAMS ((rtx)); - extern int null_epilogue PARAMS ((void)); - extern void print_operand PARAMS ((FILE *, rtx, int)); - extern void a29k_compute_reg_names PARAMS ((void)); - #endif /* RTX_CODE */ - - extern void literal_section PARAMS ((void)); --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/rtems.h gcc-3.3/gcc/config/a29k/rtems.h *** gcc-3.2.3/gcc/config/a29k/rtems.h 2002-04-12 13:09:22.000000000 +0000 --- gcc-3.3/gcc/config/a29k/rtems.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,26 **** - /* Definitions for rtems targeting a AMD A29K using COFF. - Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. - Contributed by Joel Sherrill (joel@OARcorp.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Specify predefined symbols in preprocessor. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-D_AM29K -D_AM29000 -D_EPI -D__rtems__ \ - -Asystem=rtems -Acpu=a29k -Amachine=a29k" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/t-a29kbare gcc-3.3/gcc/config/a29k/t-a29kbare *** gcc-3.2.3/gcc/config/a29k/t-a29kbare 2001-05-17 03:15:45.000000000 +0000 --- gcc-3.3/gcc/config/a29k/t-a29kbare 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,13 **** - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/t-vx29k gcc-3.3/gcc/config/a29k/t-vx29k *** gcc-3.2.3/gcc/config/a29k/t-vx29k 2001-05-17 03:15:45.000000000 +0000 --- gcc-3.3/gcc/config/a29k/t-vx29k 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,15 **** - # We don't want to put exit in libgcc.a for VxWorks, because VxWorks - # does not have _exit. - TARGET_LIBGCC2_CFLAGS = -Dexit=unused_exit - - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/unix.h gcc-3.3/gcc/config/a29k/unix.h *** gcc-3.2.3/gcc/config/a29k/unix.h 2001-11-19 18:29:59.000000000 +0000 --- gcc-3.3/gcc/config/a29k/unix.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,92 **** - /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU, Unix. - Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* We define unix instead of EPI and define unix-style machine names. */ - - /* Set our default target to be the 29050; that is the more interesting chip - for Unix systems. */ - - #undef TARGET_DEFAULT - #define TARGET_DEFAULT (1+2+16+128) - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dam29k -Da29k -Dam29000 -Asystem=unix -Acpu=a29k -Amachine=a29k" - - #undef CPP_SPEC - #define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}" - - /* Use a default linker configuration file. */ - #undef LINK_SPEC - #define LINK_SPEC "-T default.gld%s" - - /* Define the magic numbers that we recognize as COFF. */ - - #define MY_ISCOFF(magic) ((magic) == SIPFBOMAGIC || (magic) == SIPRBOMAGIC) - - /* For some systems, it is best if double-word objects are aligned on a - doubleword boundary. We want to maintain compatibility with MetaWare in - a29k.h, but do not feel constrained to do so here. */ - - #undef BIGGEST_ALIGNMENT - #define BIGGEST_ALIGNMENT 64 - - /* Add shared data as a kludge for now. */ - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - { const char *p, *after_dir = main_input_filename; \ - if (TARGET_29050) \ - fprintf (FILE, "\t.cputype 29050\n"); \ - for (p = main_input_filename; *p; p++) \ - if (*p == '/') \ - after_dir = p + 1; \ - fprintf (FILE, "\t.file "); \ - output_quoted_string (FILE, after_dir); \ - fprintf (FILE, "\n"); \ - if (flag_shared_data) \ - fprintf (FILE, "\t.sect .shdata,data\n"); \ - fprintf (FILE, "\t.sect .lit,lit\n"); } - - /* Output before shared data. */ - - #define SHARED_SECTION_ASM_OP "\t.use .shdata" - - /* If we want shared data, we have to turn off commons. */ - - #define OVERRIDE_OPTIONS if (flag_shared_data) flag_no_common = 1; - - /* Default to -fno-pcc-struct-return, since we don't have to worry about - compatibility. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 - - #if 0 /* This would be needed except that the 29k doesn't have strict - alignment requirements. */ - - #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ - (((TYPE) != 0) \ - ? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY) \ - ? PARM_BOUNDARY \ - : TYPE_ALIGN(TYPE)) \ - : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \ - ? PARM_BOUNDARY \ - : GET_MODE_ALIGNMENT(MODE))) - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/a29k/vx29k.h gcc-3.3/gcc/config/a29k/vx29k.h *** gcc-3.2.3/gcc/config/a29k/vx29k.h 2000-11-02 23:29:07.000000000 +0000 --- gcc-3.3/gcc/config/a29k/vx29k.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - /* Definitions of target machine for GNU compiler. Vxworks 29k version. - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This file just exists to give specs for the 29k running on VxWorks. */ - - /* Names to predefine in the preprocessor for this target machine. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-D_AM29K -D_AM29000 -Acpu=a29k -Amachine=a29k -D__vxworks -D__vxworks_5" - - /* Vxworks header files require that the macro CPU be set. - We could define it in CPP_PREDEFINES, but the value is (or will be) - dependent upon GCC options. */ - - #undef CPP_SPEC - #define CPP_SPEC "-DCPU=AM29200" - - /* VxWorks does all the library stuff itself. */ - - #undef LIB_SPEC - #define LIB_SPEC "" - - /* VxWorks provides the functionality of crt0.o and friends itself. */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "crtbegin.o%s" - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtend.o%s" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/alpha.c gcc-3.3/gcc/config/alpha/alpha.c *** gcc-3.2.3/gcc/config/alpha/alpha.c 2002-05-27 05:48:16.000000000 +0000 --- gcc-3.3/gcc/config/alpha/alpha.c 2003-03-24 17:59:37.000000000 +0000 *************** *** 1,6 **** /* Subroutines used for code generation on the DEC Alpha. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! 2000, 2001 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. --- 1,6 ---- /* Subroutines used for code generation on the DEC Alpha. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 47,52 **** --- 47,53 ---- #include "target.h" #include "target-def.h" #include "debug.h" + #include "langhooks.h" /* Specify which cpu to schedule for. */ *************** enum alpha_fp_rounding_mode alpha_fprm; *** 68,73 **** --- 69,78 ---- enum alpha_fp_trap_mode alpha_fptm; + /* Specify bit size of immediate TLS offsets. */ + + int alpha_tls_size = 32; + /* Strings decoded into the above options. */ const char *alpha_cpu_string; /* -mcpu= */ *************** const char *alpha_tp_string; /* -mtrap-p *** 76,88 **** const char *alpha_fprm_string; /* -mfp-rounding-mode=[n|m|c|d] */ const char *alpha_fptm_string; /* -mfp-trap-mode=[n|u|su|sui] */ const char *alpha_mlat_string; /* -mmemory-latency= */ /* Save information from a "cmpxx" operation until the branch or scc is emitted. */ struct alpha_compare alpha_compare; ! /* Non-zero if inside of a function, because the Alpha asm can't handle .files inside of functions. */ static int inside_function = FALSE; --- 81,94 ---- const char *alpha_fprm_string; /* -mfp-rounding-mode=[n|m|c|d] */ const char *alpha_fptm_string; /* -mfp-trap-mode=[n|u|su|sui] */ const char *alpha_mlat_string; /* -mmemory-latency= */ + const char *alpha_tls_size_string; /* -mtls-size=[16|32|64] */ /* Save information from a "cmpxx" operation until the branch or scc is emitted. */ struct alpha_compare alpha_compare; ! /* Nonzero if inside of a function, because the Alpha asm can't handle .files inside of functions. */ static int inside_function = FALSE; *************** int alpha_this_literal_sequence_number; *** 112,125 **** int alpha_this_gpdisp_sequence_number; /* Declarations of static functions. */ static bool decl_in_text_section PARAMS ((tree)); static int some_small_symbolic_operand_1 PARAMS ((rtx *, void *)); static int split_small_symbolic_operand_1 PARAMS ((rtx *, void *)); - static bool local_symbol_p - PARAMS ((rtx)); static void alpha_set_memflags_1 PARAMS ((rtx, int, int, int)); static rtx alpha_emit_set_const_1 --- 118,139 ---- int alpha_this_gpdisp_sequence_number; /* Declarations of static functions. */ + static int tls_symbolic_operand_1 + PARAMS ((rtx, enum machine_mode, int, int)); + static enum tls_model tls_symbolic_operand_type + PARAMS ((rtx)); static bool decl_in_text_section PARAMS ((tree)); + static bool alpha_in_small_data_p + PARAMS ((tree)); + static void alpha_encode_section_info + PARAMS ((tree, int)); + static const char *alpha_strip_name_encoding + PARAMS ((const char *)); static int some_small_symbolic_operand_1 PARAMS ((rtx *, void *)); static int split_small_symbolic_operand_1 PARAMS ((rtx *, void *)); static void alpha_set_memflags_1 PARAMS ((rtx, int, int, int)); static rtx alpha_emit_set_const_1 *************** static void alpha_expand_unaligned_load_ *** 128,136 **** PARAMS ((rtx *out_regs, rtx smem, HOST_WIDE_INT words, HOST_WIDE_INT ofs)); static void alpha_expand_unaligned_store_words PARAMS ((rtx *out_regs, rtx smem, HOST_WIDE_INT words, HOST_WIDE_INT ofs)); static void alpha_sa_mask PARAMS ((unsigned long *imaskP, unsigned long *fmaskP)); ! static int find_lo_sum PARAMS ((rtx *, void *)); static int alpha_does_function_need_gp PARAMS ((void)); --- 142,154 ---- PARAMS ((rtx *out_regs, rtx smem, HOST_WIDE_INT words, HOST_WIDE_INT ofs)); static void alpha_expand_unaligned_store_words PARAMS ((rtx *out_regs, rtx smem, HOST_WIDE_INT words, HOST_WIDE_INT ofs)); + static void alpha_init_builtins + PARAMS ((void)); + static rtx alpha_expand_builtin + PARAMS ((tree, rtx, rtx, enum machine_mode, int)); static void alpha_sa_mask PARAMS ((unsigned long *imaskP, unsigned long *fmaskP)); ! static int find_lo_sum_using_gp PARAMS ((rtx *, void *)); static int alpha_does_function_need_gp PARAMS ((void)); *************** static const char *get_trap_mode_suffix *** 140,145 **** --- 158,167 ---- PARAMS ((void)); static const char *get_round_mode_suffix PARAMS ((void)); + static const char *get_some_local_dynamic_name + PARAMS ((void)); + static int get_some_local_dynamic_name_1 + PARAMS ((rtx *, void *)); static rtx set_frame_related_p PARAMS ((void)); static const char *alpha_lookup_xfloating_lib_func *************** static int alpha_adjust_cost *** 156,173 **** PARAMS ((rtx, rtx, rtx, int)); static int alpha_issue_rate PARAMS ((void)); ! static int alpha_variable_issue ! PARAMS ((FILE *, int, rtx, int)); ! #if TARGET_ABI_UNICOSMK ! static void alpha_init_machine_status ! PARAMS ((struct function *p)); ! static void alpha_mark_machine_status ! PARAMS ((struct function *p)); ! static void alpha_free_machine_status ! PARAMS ((struct function *p)); #endif static void unicosmk_output_deferred_case_vectors PARAMS ((FILE *)); static void unicosmk_gen_dsib PARAMS ((unsigned long *imaskP)); static void unicosmk_output_ssib PARAMS ((FILE *, const char *)); --- 178,208 ---- PARAMS ((rtx, rtx, rtx, int)); static int alpha_issue_rate PARAMS ((void)); ! static int alpha_use_dfa_pipeline_interface ! PARAMS ((void)); ! static int alpha_multipass_dfa_lookahead ! PARAMS ((void)); ! #ifdef OBJECT_FORMAT_ELF ! static void alpha_elf_select_rtx_section ! PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT)); #endif + #if TARGET_ABI_OPEN_VMS + static bool alpha_linkage_symbol_p + PARAMS ((const char *symname)); + static void alpha_write_linkage + PARAMS ((FILE *, const char *, tree)); + #endif + + #if TARGET_ABI_OSF + static void alpha_output_mi_thunk_osf + PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree)); + #endif + + static struct machine_function * alpha_init_machine_status + PARAMS ((void)); + static void unicosmk_output_deferred_case_vectors PARAMS ((FILE *)); static void unicosmk_gen_dsib PARAMS ((unsigned long *imaskP)); static void unicosmk_output_ssib PARAMS ((FILE *, const char *)); *************** static void vms_asm_out_destructor PARAM *** 196,210 **** --- 231,257 ---- # define TARGET_SECTION_TYPE_FLAGS vms_section_type_flags #endif + #undef TARGET_IN_SMALL_DATA_P + #define TARGET_IN_SMALL_DATA_P alpha_in_small_data_p + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO alpha_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING alpha_strip_name_encoding + #if TARGET_ABI_UNICOSMK static void unicosmk_asm_named_section PARAMS ((const char *, unsigned int)); static void unicosmk_insert_attributes PARAMS ((tree, tree *)); static unsigned int unicosmk_section_type_flags PARAMS ((tree, const char *, int)); + static void unicosmk_unique_section PARAMS ((tree, int)); # undef TARGET_INSERT_ATTRIBUTES # define TARGET_INSERT_ATTRIBUTES unicosmk_insert_attributes # undef TARGET_SECTION_TYPE_FLAGS # define TARGET_SECTION_TYPE_FLAGS unicosmk_section_type_flags + # undef TARGET_ASM_UNIQUE_SECTION + # define TARGET_ASM_UNIQUE_SECTION unicosmk_unique_section + # undef TARGET_ASM_GLOBALIZE_LABEL + # define TARGET_ASM_GLOBALIZE_LABEL hook_FILEptr_constcharptr_void #endif #undef TARGET_ASM_ALIGNED_HI_OP *************** static unsigned int unicosmk_section_typ *** 223,228 **** --- 270,280 ---- #define TARGET_ASM_UNALIGNED_DI_OP "\t.align 0\n\t.quad\t" #endif + #ifdef OBJECT_FORMAT_ELF + #undef TARGET_ASM_SELECT_RTX_SECTION + #define TARGET_ASM_SELECT_RTX_SECTION alpha_elf_select_rtx_section + #endif + #undef TARGET_ASM_FUNCTION_END_PROLOGUE #define TARGET_ASM_FUNCTION_END_PROLOGUE alpha_output_function_end_prologue *************** static unsigned int unicosmk_section_typ *** 230,237 **** #define TARGET_SCHED_ADJUST_COST alpha_adjust_cost #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE alpha_issue_rate ! #undef TARGET_SCHED_VARIABLE_ISSUE ! #define TARGET_SCHED_VARIABLE_ISSUE alpha_variable_issue struct gcc_target targetm = TARGET_INITIALIZER; --- 282,308 ---- #define TARGET_SCHED_ADJUST_COST alpha_adjust_cost #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE alpha_issue_rate ! #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE ! #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \ ! alpha_use_dfa_pipeline_interface ! #undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD ! #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \ ! alpha_multipass_dfa_lookahead ! ! #undef TARGET_HAVE_TLS ! #define TARGET_HAVE_TLS HAVE_AS_TLS ! ! #undef TARGET_INIT_BUILTINS ! #define TARGET_INIT_BUILTINS alpha_init_builtins ! #undef TARGET_EXPAND_BUILTIN ! #define TARGET_EXPAND_BUILTIN alpha_expand_builtin ! ! #if TARGET_ABI_OSF ! #undef TARGET_ASM_OUTPUT_MI_THUNK ! #define TARGET_ASM_OUTPUT_MI_THUNK alpha_output_mi_thunk_osf ! #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK ! #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_true ! #endif struct gcc_target targetm = TARGET_INITIALIZER; *************** override_options () *** 352,357 **** --- 423,440 ---- error ("bad value `%s' for -mfp-trap-mode switch", alpha_fptm_string); } + if (alpha_tls_size_string) + { + if (strcmp (alpha_tls_size_string, "16") == 0) + alpha_tls_size = 16; + else if (strcmp (alpha_tls_size_string, "32") == 0) + alpha_tls_size = 32; + else if (strcmp (alpha_tls_size_string, "64") == 0) + alpha_tls_size = 64; + else + error ("bad value `%s' for -mtls-size switch", alpha_tls_size_string); + } + alpha_cpu = TARGET_CPU_DEFAULT & MASK_CPU_EV6 ? PROCESSOR_EV6 : (TARGET_CPU_DEFAULT & MASK_CPU_EV5 ? PROCESSOR_EV5 : PROCESSOR_EV4); *************** override_options () *** 494,505 **** /* Register variables and functions with the garbage collector. */ - #if TARGET_ABI_UNICOSMK /* Set up function hooks. */ init_machine_status = alpha_init_machine_status; ! mark_machine_status = alpha_mark_machine_status; ! free_machine_status = alpha_free_machine_status; ! #endif } /* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */ --- 577,592 ---- /* Register variables and functions with the garbage collector. */ /* Set up function hooks. */ init_machine_status = alpha_init_machine_status; ! ! /* Tell the compiler when we're using VAX floating point. */ ! if (TARGET_FLOAT_VAX) ! { ! real_format_for_mode[SFmode - QFmode] = &vax_f_format; ! real_format_for_mode[DFmode - QFmode] = &vax_g_format; ! real_format_for_mode[TFmode - QFmode] = NULL; ! } } /* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */ *************** reg_or_0_operand (op, mode) *** 526,532 **** register rtx op; enum machine_mode mode; { ! return op == const0_rtx || register_operand (op, mode); } /* Return 1 if OP is a constant in the range of 0-63 (for a shift) or --- 613,619 ---- register rtx op; enum machine_mode mode; { ! return op == CONST0_RTX (mode) || register_operand (op, mode); } /* Return 1 if OP is a constant in the range of 0-63 (for a shift) or *************** reg_or_8bit_operand (op, mode) *** 555,560 **** --- 642,657 ---- || register_operand (op, mode)); } + /* Return 1 if OP is a constant or any register. */ + + int + reg_or_const_int_operand (op, mode) + register rtx op; + enum machine_mode mode; + { + return GET_CODE (op) == CONST_INT || register_operand (op, mode); + } + /* Return 1 if OP is an 8-bit constant. */ int *************** mode_mask_operand (op, mode) *** 661,684 **** register rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; { ! #if HOST_BITS_PER_WIDE_INT == 32 ! if (GET_CODE (op) == CONST_DOUBLE) ! return (CONST_DOUBLE_LOW (op) == -1 ! && (CONST_DOUBLE_HIGH (op) == -1 ! || CONST_DOUBLE_HIGH (op) == 0)); ! #else ! if (GET_CODE (op) == CONST_DOUBLE) ! return (CONST_DOUBLE_LOW (op) == -1 && CONST_DOUBLE_HIGH (op) == 0); ! #endif ! return (GET_CODE (op) == CONST_INT ! && (INTVAL (op) == 0xff ! || INTVAL (op) == 0xffff ! || INTVAL (op) == (HOST_WIDE_INT)0xffffffff ! #if HOST_BITS_PER_WIDE_INT == 64 ! || INTVAL (op) == -1 ! #endif ! )); } /* Return 1 if OP is a multiple of 8 less than 64. */ --- 758,783 ---- register rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; { ! if (GET_CODE (op) == CONST_INT) ! { ! HOST_WIDE_INT value = INTVAL (op); ! if (value == 0xff) ! return 1; ! if (value == 0xffff) ! return 1; ! if (value == 0xffffffff) ! return 1; ! if (value == -1) ! return 1; ! } ! else if (HOST_BITS_PER_WIDE_INT == 32 && GET_CODE (op) == CONST_DOUBLE) ! { ! if (CONST_DOUBLE_LOW (op) == 0xffffffff && CONST_DOUBLE_HIGH (op) == 0) ! return 1; ! } ! ! return 0; } /* Return 1 if OP is a multiple of 8 less than 64. */ *************** mul8_operand (op, mode) *** 693,717 **** && (INTVAL (op) & 7) == 0); } ! /* Return 1 if OP is the constant zero in floating-point. */ ! ! int ! fp0_operand (op, mode) ! register rtx op; ! enum machine_mode mode; ! { ! return (GET_MODE (op) == mode ! && GET_MODE_CLASS (mode) == MODE_FLOAT && op == CONST0_RTX (mode)); ! } ! ! /* Return 1 if OP is the floating-point constant zero or a register. */ int ! reg_or_fp0_operand (op, mode) register rtx op; enum machine_mode mode; { ! return fp0_operand (op, mode) || register_operand (op, mode); } /* Return 1 if OP is a hard floating-point register. */ --- 792,805 ---- && (INTVAL (op) & 7) == 0); } ! /* Return 1 if OP is the zero constant for MODE. */ int ! const0_operand (op, mode) register rtx op; enum machine_mode mode; { ! return op == CONST0_RTX (mode); } /* Return 1 if OP is a hard floating-point register. */ *************** some_operand (op, mode) *** 769,776 **** switch (GET_CODE (op)) { ! case REG: case MEM: case CONST_DOUBLE: case CONST_INT: case LABEL_REF: ! case SYMBOL_REF: case CONST: case HIGH: return 1; case SUBREG: --- 857,871 ---- switch (GET_CODE (op)) { ! case REG: ! case MEM: ! case CONST_INT: ! case CONST_DOUBLE: ! case CONST_VECTOR: ! case LABEL_REF: ! case SYMBOL_REF: ! case CONST: ! case HIGH: return 1; case SUBREG: *************** input_operand (op, mode) *** 824,830 **** symbolic operands to be reconstructed from their high/lo_sum form. */ return (small_symbolic_operand (op, mode) ! || global_symbolic_operand (op, mode)); } /* This handles both the Windows/NT and OSF cases. */ --- 919,927 ---- symbolic operands to be reconstructed from their high/lo_sum form. */ return (small_symbolic_operand (op, mode) ! || global_symbolic_operand (op, mode) ! || gotdtp_symbolic_operand (op, mode) ! || gottp_symbolic_operand (op, mode)); } /* This handles both the Windows/NT and OSF cases. */ *************** input_operand (op, mode) *** 847,853 **** && general_operand (op, mode)); case CONST_DOUBLE: ! return GET_MODE_CLASS (mode) == MODE_FLOAT && op == CONST0_RTX (mode); case CONST_INT: return mode == QImode || mode == HImode || add_operand (op, mode); --- 944,951 ---- && general_operand (op, mode)); case CONST_DOUBLE: ! case CONST_VECTOR: ! return op == CONST0_RTX (mode); case CONST_INT: return mode == QImode || mode == HImode || add_operand (op, mode); *************** direct_call_operand (op, mode) *** 911,941 **** } /* Return true if OP is a LABEL_REF, or SYMBOL_REF or CONST referencing ! a variable known to be defined in this file. */ ! ! static bool ! local_symbol_p (op) ! rtx op; ! { ! const char *str = XSTR (op, 0); ! ! /* ??? SYMBOL_REF_FLAG is set for local function symbols, but we ! run into problems with the rtl inliner in that the symbol was ! once external, but is local after inlining, which results in ! unrecognizable insns. */ ! ! return (CONSTANT_POOL_ADDRESS_P (op) ! /* If @, then ENCODE_SECTION_INFO sez it's local. */ ! || str[0] == '@' ! /* If *$, then ASM_GENERATE_INTERNAL_LABEL sez it's local. */ ! || (str[0] == '*' && str[1] == '$')); ! } int local_symbolic_operand (op, mode) rtx op; enum machine_mode mode; { if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) return 0; --- 1009,1023 ---- } /* Return true if OP is a LABEL_REF, or SYMBOL_REF or CONST referencing ! a (non-tls) variable known to be defined in this file. */ int local_symbolic_operand (op, mode) rtx op; enum machine_mode mode; { + const char *str; + if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) return 0; *************** local_symbolic_operand (op, mode) *** 950,956 **** if (GET_CODE (op) != SYMBOL_REF) return 0; ! return local_symbol_p (op); } /* Return true if OP is a SYMBOL_REF or CONST referencing a variable --- 1032,1057 ---- if (GET_CODE (op) != SYMBOL_REF) return 0; ! /* Easy pickings. */ ! if (CONSTANT_POOL_ADDRESS_P (op) || STRING_POOL_ADDRESS_P (op)) ! return 1; ! ! /* ??? SYMBOL_REF_FLAG is set for local function symbols, but we ! run into problems with the rtl inliner in that the symbol was ! once external, but is local after inlining, which results in ! unrecognizable insns. */ ! ! str = XSTR (op, 0); ! ! /* If @[LS], then alpha_encode_section_info sez it's local. */ ! if (str[0] == '@' && (str[1] == 'L' || str[1] == 'S')) ! return 1; ! ! /* If *$, then ASM_GENERATE_INTERNAL_LABEL sez it's local. */ ! if (str[0] == '*' && str[1] == '$') ! return 1; ! ! return 0; } /* Return true if OP is a SYMBOL_REF or CONST referencing a variable *************** small_symbolic_operand (op, mode) *** 982,988 **** else { str = XSTR (op, 0); ! return str[0] == '@' && str[1] == 's'; } } --- 1083,1089 ---- else { str = XSTR (op, 0); ! return str[0] == '@' && str[1] == 'S'; } } *************** global_symbolic_operand (op, mode) *** 994,999 **** --- 1095,1102 ---- rtx op; enum machine_mode mode; { + const char *str; + if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) return 0; *************** global_symbolic_operand (op, mode) *** 1005,1011 **** if (GET_CODE (op) != SYMBOL_REF) return 0; ! return ! local_symbol_p (op); } /* Return 1 if OP is a valid operand for the MEM of a CALL insn. */ --- 1108,1119 ---- if (GET_CODE (op) != SYMBOL_REF) return 0; ! if (local_symbolic_operand (op, mode)) ! return 0; ! ! /* Also verify that it's not a TLS symbol. */ ! str = XSTR (op, 0); ! return str[0] != '%' && str[0] != '@'; } /* Return 1 if OP is a valid operand for the MEM of a CALL insn. */ *************** symbolic_operand (op, mode) *** 1058,1063 **** --- 1166,1275 ---- return 0; } + /* Return true if OP is valid for a particular TLS relocation. */ + + static int + tls_symbolic_operand_1 (op, mode, size, unspec) + rtx op; + enum machine_mode mode; + int size, unspec; + { + const char *str; + int letter; + + if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) + return 0; + + if (GET_CODE (op) != CONST) + return 0; + op = XEXP (op, 0); + + if (GET_CODE (op) != UNSPEC || XINT (op, 1) != unspec) + return 0; + op = XVECEXP (op, 0, 0); + + if (GET_CODE (op) != SYMBOL_REF) + return 0; + str = XSTR (op, 0); + + if (str[0] == '%') + { + if (size != 64) + return 0; + } + else if (str[0] == '@') + { + if (alpha_tls_size > size) + return 0; + } + else + return 0; + + letter = (unspec == UNSPEC_DTPREL ? 'D' : 'T'); + + return str[1] == letter; + } + + /* Return true if OP is valid for 16-bit DTP relative relocations. */ + + int + dtp16_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return tls_symbolic_operand_1 (op, mode, 16, UNSPEC_DTPREL); + } + + /* Return true if OP is valid for 32-bit DTP relative relocations. */ + + int + dtp32_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return tls_symbolic_operand_1 (op, mode, 32, UNSPEC_DTPREL); + } + + /* Return true if OP is valid for 64-bit DTP relative relocations. */ + + int + gotdtp_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return tls_symbolic_operand_1 (op, mode, 64, UNSPEC_DTPREL); + } + + /* Return true if OP is valid for 16-bit TP relative relocations. */ + + int + tp16_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return tls_symbolic_operand_1 (op, mode, 16, UNSPEC_TPREL); + } + + /* Return true if OP is valid for 32-bit TP relative relocations. */ + + int + tp32_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return tls_symbolic_operand_1 (op, mode, 32, UNSPEC_TPREL); + } + + /* Return true if OP is valid for 64-bit TP relative relocations. */ + + int + gottp_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return tls_symbolic_operand_1 (op, mode, 64, UNSPEC_TPREL); + } + /* Return 1 if OP is a valid Alpha comparison operator. Here we know which comparisons are valid in which insn. */ *************** alpha_extra_constraint (value, c) *** 1455,1461 **** return GET_CODE (value) == HIGH; case 'U': return TARGET_ABI_UNICOSMK && symbolic_operand (value, VOIDmode); ! default: return false; } --- 1667,1675 ---- return GET_CODE (value) == HIGH; case 'U': return TARGET_ABI_UNICOSMK && symbolic_operand (value, VOIDmode); ! case 'W': ! return (GET_CODE (value) == CONST_VECTOR ! && value == CONST0_RTX (GET_MODE (value))); default: return false; } *************** alpha_tablejump_best_label (insn) *** 1528,1533 **** --- 1742,1795 ---- return best_label ? best_label : const0_rtx; } + + /* Return the TLS model to use for SYMBOL. */ + + static enum tls_model + tls_symbolic_operand_type (symbol) + rtx symbol; + { + const char *str; + + if (GET_CODE (symbol) != SYMBOL_REF) + return 0; + str = XSTR (symbol, 0); + + if (str[0] == '%') + { + /* ??? Be prepared for -ftls-model=local-dynamic. Perhaps we shouldn't + have separately encoded local-ness. On well, maybe the user will use + attribute visibility next time. At least we don't crash... */ + if (str[1] == 'G' || str[1] == 'D') + return TLS_MODEL_GLOBAL_DYNAMIC; + if (str[1] == 'T') + return TLS_MODEL_INITIAL_EXEC; + } + else if (str[0] == '@') + { + if (str[1] == 'D') + { + /* Local dynamic is a waste if we're not going to combine + the __tls_get_addr calls. So avoid it if not optimizing. */ + if (optimize) + return TLS_MODEL_LOCAL_DYNAMIC; + else + return TLS_MODEL_GLOBAL_DYNAMIC; + } + if (str[1] == 'T') + { + /* 64-bit local exec is the same as initial exec except without + the dynamic relocation. In either case we use a got entry. */ + if (alpha_tls_size == 64) + return TLS_MODEL_INITIAL_EXEC; + else + return TLS_MODEL_LOCAL_EXEC; + } + } + + return 0; + } + /* Return true if the function DECL will be placed in the default text section. */ *************** decl_in_text_section (decl) *** 1545,1550 **** --- 1807,1842 ---- && DECL_ONE_ONLY (decl)))); } + /* Return true if EXP should be placed in the small data section. */ + + static bool + alpha_in_small_data_p (exp) + tree exp; + { + /* We want to merge strings, so we never consider them small data. */ + if (TREE_CODE (exp) == STRING_CST) + return false; + + if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp)) + { + const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); + if (strcmp (section, ".sdata") == 0 + || strcmp (section, ".sbss") == 0) + return true; + } + else + { + HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); + + /* If this is an incomplete type with size 0, then we can't put it + in sdata because it might be too big when completed. */ + if (size > 0 && size <= g_switch_value) + return true; + } + + return false; + } + /* If we are referencing a function that is static, make the SYMBOL_REF special. We use this to see indicate we can branch to this function without setting PV or restoring GP. *************** decl_in_text_section (decl) *** 1553,1577 **** to the name. If in addition the variable is to go in .sdata/.sbss, then add "@s" instead. */ ! void ! alpha_encode_section_info (decl) tree decl; { const char *symbol_str; ! bool is_local, is_small; if (TREE_CODE (decl) == FUNCTION_DECL) { /* We mark public functions once they are emitted; otherwise we don't know that they exist in this unit of translation. */ if (TREE_PUBLIC (decl)) return; /* Do not mark functions that are not in .text; otherwise we don't know that they are near enough for a direct branch. */ if (! decl_in_text_section (decl)) return; ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; return; } --- 1845,1882 ---- to the name. If in addition the variable is to go in .sdata/.sbss, then add "@s" instead. */ ! static void ! alpha_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { const char *symbol_str; ! bool is_local; ! char encoding = 0; ! rtx rtl, symbol; ! ! rtl = DECL_P (decl) ? DECL_RTL (decl) : TREE_CST_RTL (decl); + /* Careful not to prod global register variables. */ + if (GET_CODE (rtl) != MEM) + return; + symbol = XEXP (rtl, 0); + if (GET_CODE (symbol) != SYMBOL_REF) + return; + if (TREE_CODE (decl) == FUNCTION_DECL) { /* We mark public functions once they are emitted; otherwise we don't know that they exist in this unit of translation. */ if (TREE_PUBLIC (decl)) return; + /* Do not mark functions that are not in .text; otherwise we don't know that they are near enough for a direct branch. */ if (! decl_in_text_section (decl)) return; ! SYMBOL_REF_FLAG (symbol) = 1; return; } *************** alpha_encode_section_info (decl) *** 1579,1676 **** if (! TARGET_EXPLICIT_RELOCS) return; ! /* Careful not to prod global register variables. */ ! if (TREE_CODE (decl) != VAR_DECL ! || GET_CODE (DECL_RTL (decl)) != MEM ! || GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF) ! return; ! ! symbol_str = XSTR (XEXP (DECL_RTL (decl), 0), 0); /* A variable is considered "local" if it is defined in this module. */ ! if (DECL_EXTERNAL (decl)) ! is_local = false; ! /* Linkonce and weak data is never local. */ ! else if (DECL_ONE_ONLY (decl) || DECL_WEAK (decl)) ! is_local = false; ! else if (! TREE_PUBLIC (decl)) ! is_local = true; ! /* If PIC, then assume that any global name can be overridden by ! symbols resolved from other modules. */ ! else if (flag_pic) ! is_local = false; ! /* Uninitialized COMMON variable may be unified with symbols ! resolved from other modules. */ ! else if (DECL_COMMON (decl) ! && (DECL_INITIAL (decl) == NULL ! || DECL_INITIAL (decl) == error_mark_node)) ! is_local = false; ! /* Otherwise we're left with initialized (or non-common) global data ! which is of necessity defined locally. */ ! else ! is_local = true; ! ! /* Determine if DECL will wind up in .sdata/.sbss. */ ! ! is_small = false; ! if (DECL_SECTION_NAME (decl)) { ! const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); ! if (strcmp (section, ".sdata") == 0 ! || strcmp (section, ".sbss") == 0) ! is_small = true; } ! else { ! HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl)); ! ! /* If the variable has already been defined in the output file, then it ! is too late to put it in sdata if it wasn't put there in the first ! place. The test is here rather than above, because if it is already ! in sdata, then it can stay there. */ ! ! if (TREE_ASM_WRITTEN (decl)) ! ; ! ! /* If this is an incomplete type with size 0, then we can't put it in ! sdata because it might be too big when completed. */ ! else if (size > 0 && size <= g_switch_value) ! is_small = true; } /* Finally, encode this into the symbol string. */ ! if (is_local) { - const char *string; char *newstr; size_t len; ! if (symbol_str[0] == '@') { ! if (symbol_str[1] == (is_small ? 's' : 'v')) return; symbol_str += 2; } len = strlen (symbol_str) + 1; newstr = alloca (len + 2); ! newstr[0] = '@'; ! newstr[1] = (is_small ? 's' : 'v'); memcpy (newstr + 2, symbol_str, len); ! string = ggc_alloc_string (newstr, len + 2 - 1); ! XSTR (XEXP (DECL_RTL (decl), 0), 0) = string; ! } ! else if (symbol_str[0] == '@') ! { ! /* We're hosed. This can happen when the user adds a weak ! attribute after rtl generation. They should have gotten ! a warning about unspecified behaviour from varasm.c. */ } } /* legitimate_address_p recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. --- 1884,1983 ---- if (! TARGET_EXPLICIT_RELOCS) return; ! symbol_str = XSTR (symbol, 0); /* A variable is considered "local" if it is defined in this module. */ + is_local = (*targetm.binds_local_p) (decl); ! /* Care for TLS variables. */ ! if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl)) { ! switch (decl_tls_model (decl)) ! { ! case TLS_MODEL_GLOBAL_DYNAMIC: ! encoding = 'G'; ! break; ! case TLS_MODEL_LOCAL_DYNAMIC: ! encoding = 'D'; ! break; ! case TLS_MODEL_INITIAL_EXEC: ! case TLS_MODEL_LOCAL_EXEC: ! encoding = 'T'; ! break; ! } } ! else if (is_local) { ! /* Determine if DECL will wind up in .sdata/.sbss. */ ! if (alpha_in_small_data_p (decl)) ! encoding = 'S'; ! else ! encoding = 'L'; } /* Finally, encode this into the symbol string. */ ! if (encoding) { char *newstr; size_t len; + char want_prefix = (is_local ? '@' : '%'); + char other_prefix = (is_local ? '%' : '@'); ! if (symbol_str[0] == want_prefix) { ! if (symbol_str[1] == encoding) return; symbol_str += 2; } + else if (symbol_str[0] == other_prefix) + symbol_str += 2; len = strlen (symbol_str) + 1; newstr = alloca (len + 2); ! newstr[0] = want_prefix; ! newstr[1] = encoding; memcpy (newstr + 2, symbol_str, len); ! XSTR (symbol, 0) = ggc_alloc_string (newstr, len + 2 - 1); } } + /* Undo the effects of the above. */ + + static const char * + alpha_strip_name_encoding (str) + const char *str; + { + if (str[0] == '@' || str[0] == '%') + str += 2; + if (str[0] == '*') + str++; + return str; + } + + #if TARGET_ABI_OPEN_VMS + static bool + alpha_linkage_symbol_p (symname) + const char *symname; + { + int symlen = strlen (symname); + + if (symlen > 4) + return strcmp (&symname [symlen - 4], "..lk") == 0; + + return false; + } + + #define LINKAGE_SYMBOL_REF_P(X) \ + ((GET_CODE (X) == SYMBOL_REF \ + && alpha_linkage_symbol_p (XSTR (X, 0))) \ + || (GET_CODE (X) == CONST \ + && GET_CODE (XEXP (X, 0)) == PLUS \ + && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF \ + && alpha_linkage_symbol_p (XSTR (XEXP (XEXP (X, 0), 0), 0)))) + #endif + /* legitimate_address_p recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. *************** alpha_legitimate_address_p (mode, x, str *** 1710,1715 **** --- 2017,2027 ---- if (CONSTANT_ADDRESS_P (x)) return true; + #if TARGET_ABI_OPEN_VMS + if (LINKAGE_SYMBOL_REF_P (x)) + return true; + #endif + /* Register plus a small constant offset is valid. */ if (GET_CODE (x) == PLUS) { *************** alpha_legitimate_address_p (mode, x, str *** 1765,1771 **** return false; /* The symbol must be local. */ ! if (local_symbolic_operand (ofs, Pmode)) return true; } } --- 2077,2085 ---- return false; /* The symbol must be local. */ ! if (local_symbolic_operand (ofs, Pmode) ! || dtp32_symbolic_operand (ofs, Pmode) ! || tp32_symbolic_operand (ofs, Pmode)) return true; } } *************** alpha_legitimize_address (x, scratch, mo *** 1831,1836 **** --- 2145,2244 ---- /* If this is a local symbol, split the address into HIGH/LO_SUM parts. */ if (TARGET_EXPLICIT_RELOCS && symbolic_operand (x, Pmode)) { + rtx r0, r16, eqv, tga, tp, insn, dest, seq; + + switch (tls_symbolic_operand_type (x)) + { + case TLS_MODEL_GLOBAL_DYNAMIC: + start_sequence (); + + r0 = gen_rtx_REG (Pmode, 0); + r16 = gen_rtx_REG (Pmode, 16); + tga = gen_rtx_SYMBOL_REF (Pmode, "__tls_get_addr"); + dest = gen_reg_rtx (Pmode); + seq = GEN_INT (alpha_next_sequence_number++); + + emit_insn (gen_movdi_er_tlsgd (r16, pic_offset_table_rtx, x, seq)); + insn = gen_call_value_osf_tlsgd (r0, tga, seq); + insn = emit_call_insn (insn); + CONST_OR_PURE_CALL_P (insn) = 1; + use_reg (&CALL_INSN_FUNCTION_USAGE (insn), r16); + + insn = get_insns (); + end_sequence (); + + emit_libcall_block (insn, dest, r0, x); + return dest; + + case TLS_MODEL_LOCAL_DYNAMIC: + start_sequence (); + + r0 = gen_rtx_REG (Pmode, 0); + r16 = gen_rtx_REG (Pmode, 16); + tga = gen_rtx_SYMBOL_REF (Pmode, "__tls_get_addr"); + scratch = gen_reg_rtx (Pmode); + seq = GEN_INT (alpha_next_sequence_number++); + + emit_insn (gen_movdi_er_tlsldm (r16, pic_offset_table_rtx, seq)); + insn = gen_call_value_osf_tlsldm (r0, tga, seq); + insn = emit_call_insn (insn); + CONST_OR_PURE_CALL_P (insn) = 1; + use_reg (&CALL_INSN_FUNCTION_USAGE (insn), r16); + + insn = get_insns (); + end_sequence (); + + eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), + UNSPEC_TLSLDM_CALL); + emit_libcall_block (insn, scratch, r0, eqv); + + eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), UNSPEC_DTPREL); + eqv = gen_rtx_CONST (Pmode, eqv); + + if (alpha_tls_size == 64) + { + dest = gen_reg_rtx (Pmode); + emit_insn (gen_rtx_SET (VOIDmode, dest, eqv)); + emit_insn (gen_adddi3 (dest, dest, scratch)); + return dest; + } + if (alpha_tls_size == 32) + { + insn = gen_rtx_HIGH (Pmode, eqv); + insn = gen_rtx_PLUS (Pmode, scratch, insn); + scratch = gen_reg_rtx (Pmode); + emit_insn (gen_rtx_SET (VOIDmode, scratch, insn)); + } + return gen_rtx_LO_SUM (Pmode, scratch, eqv); + + case TLS_MODEL_INITIAL_EXEC: + eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), UNSPEC_TPREL); + eqv = gen_rtx_CONST (Pmode, eqv); + tp = gen_reg_rtx (Pmode); + scratch = gen_reg_rtx (Pmode); + dest = gen_reg_rtx (Pmode); + + emit_insn (gen_load_tp (tp)); + emit_insn (gen_rtx_SET (VOIDmode, scratch, eqv)); + emit_insn (gen_adddi3 (dest, tp, scratch)); + return dest; + + case TLS_MODEL_LOCAL_EXEC: + eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), UNSPEC_TPREL); + eqv = gen_rtx_CONST (Pmode, eqv); + tp = gen_reg_rtx (Pmode); + + emit_insn (gen_load_tp (tp)); + if (alpha_tls_size == 32) + { + insn = gen_rtx_HIGH (Pmode, eqv); + insn = gen_rtx_PLUS (Pmode, tp, insn); + tp = gen_reg_rtx (Pmode); + emit_insn (gen_rtx_SET (VOIDmode, tp, insn)); + } + return gen_rtx_LO_SUM (Pmode, tp, eqv); + } + if (local_symbolic_operand (x, Pmode)) { if (small_symbolic_operand (x, Pmode)) *************** alpha_set_memflags_1 (x, in_struct_p, vo *** 2156,2161 **** --- 2564,2571 ---- switch (GET_CODE (x)) { case SEQUENCE: + abort (); + case PARALLEL: for (i = XVECLEN (x, 0) - 1; i >= 0; i--) alpha_set_memflags_1 (XVECEXP (x, 0, i), in_struct_p, volatile_p, *************** alpha_set_memflags_1 (x, in_struct_p, vo *** 2190,2200 **** } } ! /* Given INSN, which is either an INSN or a SEQUENCE generated to ! perform a memory operation, look for any MEMs in either a SET_DEST or ! a SET_SRC and copy the in-struct, unchanging, and volatile flags from ! REF into each of the MEMs found. If REF is not a MEM, don't do ! anything. */ void alpha_set_memflags (insn, ref) --- 2600,2610 ---- } } ! /* Given INSN, which is an INSN list or the PATTERN of a single insn ! generated to perform a memory operation, look for any MEMs in either ! a SET_DEST or a SET_SRC and copy the in-struct, unchanging, and ! volatile flags from REF into each of the MEMs found. If REF is not ! a MEM, don't do anything. */ void alpha_set_memflags (insn, ref) *************** alpha_expand_mov (mode, operands) *** 2555,2560 **** --- 2965,2972 ---- tmp = alpha_legitimize_address (operands[1], operands[0], mode); if (tmp) { + if (tmp == operands[0]) + return true; operands[1] = tmp; return false; } *************** alpha_expand_mov (mode, operands) *** 2603,2609 **** } /* Otherwise we've nothing left but to drop the thing to memory. */ ! operands[1] = force_const_mem (DImode, operands[1]); if (reload_in_progress) { emit_move_insn (operands[0], XEXP (operands[1], 0)); --- 3015,3021 ---- } /* Otherwise we've nothing left but to drop the thing to memory. */ ! operands[1] = force_const_mem (mode, operands[1]); if (reload_in_progress) { emit_move_insn (operands[0], XEXP (operands[1], 0)); *************** alpha_emit_conditional_branch (code) *** 2907,2913 **** } else { ! /* ??? We mark the the branch mode to be CCmode to prevent the compare and branch from being combined, since the compare insn follows IEEE rules that the branch does not. */ branch_mode = CCmode; --- 3319,3325 ---- } else { ! /* ??? We mark the branch mode to be CCmode to prevent the compare and branch from being combined, since the compare insn follows IEEE rules that the branch does not. */ branch_mode = CCmode; *************** alpha_emit_setcc (code) *** 3075,3081 **** /* Rewrite a comparison against zero CMP of the form (CODE (cc0) (const_int 0)) so it can be written validly in a conditional move (if_then_else CMP ...). ! If both of the operands that set cc0 are non-zero we must emit an insn to perform the compare (it can't be done within the conditional move). */ rtx --- 3487,3493 ---- /* Rewrite a comparison against zero CMP of the form (CODE (cc0) (const_int 0)) so it can be written validly in a conditional move (if_then_else CMP ...). ! If both of the operands that set cc0 are nonzero we must emit an insn to perform the compare (it can't be done within the conditional move). */ rtx *************** alpha_emit_conditional_move (cmp, mode) *** 3107,3113 **** /* If we have fp<->int register move instructions, do a cmov by performing the comparison in fp registers, and move the ! zero/non-zero value to integer registers, where we can then use a normal cmov, or vice-versa. */ switch (code) --- 3519,3525 ---- /* If we have fp<->int register move instructions, do a cmov by performing the comparison in fp registers, and move the ! zero/nonzero value to integer registers, where we can then use a normal cmov, or vice-versa. */ switch (code) *************** alpha_split_tfmode_frobsign (operands, o *** 3639,3645 **** alpha_split_tfmode_pair (operands); ! /* Detect three flavours of operand overlap. */ move = 1; if (rtx_equal_p (operands[0], operands[2])) move = 0; --- 4051,4057 ---- alpha_split_tfmode_pair (operands); ! /* Detect three flavors of operand overlap. */ move = 1; if (rtx_equal_p (operands[0], operands[2])) move = 0; *************** alpha_expand_unaligned_store (dst, src, *** 3885,3901 **** emit_insn (gen_mskxl_be (dsth, dsth, GEN_INT (0xffff), addr)); break; case 4: - emit_insn (gen_mskxl_be (dsth, dsth, GEN_INT (0xffffffff), addr)); - break; - case 8: { ! #if HOST_BITS_PER_WIDE_INT == 32 ! rtx msk = immed_double_const (0xffffffff, 0xffffffff, DImode); ! #else ! rtx msk = constm1_rtx; ! #endif emit_insn (gen_mskxl_be (dsth, dsth, msk, addr)); } break; } --- 4297,4309 ---- emit_insn (gen_mskxl_be (dsth, dsth, GEN_INT (0xffff), addr)); break; case 4: { ! rtx msk = immed_double_const (0xffffffff, 0, DImode); emit_insn (gen_mskxl_be (dsth, dsth, msk, addr)); + break; } + case 8: + emit_insn (gen_mskxl_be (dsth, dsth, constm1_rtx, addr)); break; } *************** alpha_expand_unaligned_store (dst, src, *** 3932,3948 **** emit_insn (gen_mskxl_le (dstl, dstl, GEN_INT (0xffff), addr)); break; case 4: - emit_insn (gen_mskxl_le (dstl, dstl, GEN_INT (0xffffffff), addr)); - break; - case 8: { ! #if HOST_BITS_PER_WIDE_INT == 32 ! rtx msk = immed_double_const (0xffffffff, 0xffffffff, DImode); ! #else ! rtx msk = constm1_rtx; ! #endif emit_insn (gen_mskxl_le (dstl, dstl, msk, addr)); } break; } } --- 4340,4352 ---- emit_insn (gen_mskxl_le (dstl, dstl, GEN_INT (0xffff), addr)); break; case 4: { ! rtx msk = immed_double_const (0xffffffff, 0, DImode); emit_insn (gen_mskxl_le (dstl, dstl, msk, addr)); + break; } + case 8: + emit_insn (gen_mskxl_le (dstl, dstl, constm1_rtx, addr)); break; } } *************** alpha_expand_unaligned_store_words (data *** 4068,4078 **** { rtx const im8 = GEN_INT (-8); rtx const i64 = GEN_INT (64); - #if HOST_BITS_PER_WIDE_INT == 32 - rtx const im1 = immed_double_const (0xffffffff, 0xffffffff, DImode); - #else - rtx const im1 = constm1_rtx; - #endif rtx ins_tmps[MAX_MOVE_WORDS]; rtx st_tmp_1, st_tmp_2, dreg; rtx st_addr_1, st_addr_2, dmema; --- 4472,4477 ---- *************** alpha_expand_unaligned_store_words (data *** 4136,4148 **** /* Split and merge the ends with the destination data. */ if (WORDS_BIG_ENDIAN) { ! emit_insn (gen_mskxl_be (st_tmp_2, st_tmp_2, im1, dreg)); emit_insn (gen_mskxh (st_tmp_1, st_tmp_1, i64, dreg)); } else { emit_insn (gen_mskxh (st_tmp_2, st_tmp_2, i64, dreg)); ! emit_insn (gen_mskxl_le (st_tmp_1, st_tmp_1, im1, dreg)); } if (data_regs != NULL) --- 4535,4547 ---- /* Split and merge the ends with the destination data. */ if (WORDS_BIG_ENDIAN) { ! emit_insn (gen_mskxl_be (st_tmp_2, st_tmp_2, constm1_rtx, dreg)); emit_insn (gen_mskxh (st_tmp_1, st_tmp_1, i64, dreg)); } else { emit_insn (gen_mskxh (st_tmp_2, st_tmp_2, i64, dreg)); ! emit_insn (gen_mskxl_le (st_tmp_1, st_tmp_1, constm1_rtx, dreg)); } if (data_regs != NULL) *************** alpha_expand_block_clear (operands) *** 4807,4812 **** --- 5206,5280 ---- return 1; } + + /* Returns a mask so that zap(x, value) == x & mask. */ + + rtx + alpha_expand_zap_mask (value) + HOST_WIDE_INT value; + { + rtx result; + int i; + + if (HOST_BITS_PER_WIDE_INT >= 64) + { + HOST_WIDE_INT mask = 0; + + for (i = 7; i >= 0; --i) + { + mask <<= 8; + if (!((value >> i) & 1)) + mask |= 0xff; + } + + result = gen_int_mode (mask, DImode); + } + else if (HOST_BITS_PER_WIDE_INT == 32) + { + HOST_WIDE_INT mask_lo = 0, mask_hi = 0; + + for (i = 7; i >= 4; --i) + { + mask_hi <<= 8; + if (!((value >> i) & 1)) + mask_hi |= 0xff; + } + + for (i = 3; i >= 0; --i) + { + mask_lo <<= 8; + if (!((value >> i) & 1)) + mask_lo |= 0xff; + } + + result = immed_double_const (mask_lo, mask_hi, DImode); + } + else + abort (); + + return result; + } + + void + alpha_expand_builtin_vector_binop (gen, mode, op0, op1, op2) + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + enum machine_mode mode; + rtx op0, op1, op2; + { + op0 = gen_lowpart (mode, op0); + + if (op1 == const0_rtx) + op1 = CONST0_RTX (mode); + else + op1 = gen_lowpart (mode, op1); + + if (op2 == const0_rtx) + op2 = CONST0_RTX (mode); + else + op2 = gen_lowpart (mode, op2); + + emit_insn ((*gen) (op0, op1, op2)); + } /* Adjust the cost of a scheduling dependency. Return the new cost of a dependency LINK or INSN on DEP_INSN. COST is the current cost. */ *************** alpha_adjust_cost (insn, link, dep_insn, *** 4818,4832 **** rtx dep_insn; int cost; { - rtx set, set_src; enum attr_type insn_type, dep_insn_type; /* If the dependence is an anti-dependence, there is no cost. For an output dependence, there is sometimes a cost, but it doesn't seem worth handling those few cases. */ - if (REG_NOTE_KIND (link) != 0) ! return 0; /* If we can't recognize the insns, we can't really do anything. */ if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0) --- 5286,5298 ---- rtx dep_insn; int cost; { enum attr_type insn_type, dep_insn_type; /* If the dependence is an anti-dependence, there is no cost. For an output dependence, there is sometimes a cost, but it doesn't seem worth handling those few cases. */ if (REG_NOTE_KIND (link) != 0) ! return cost; /* If we can't recognize the insns, we can't really do anything. */ if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0) *************** alpha_adjust_cost (insn, link, dep_insn, *** 4841,4962 **** || dep_insn_type == TYPE_LDSYM) cost += alpha_memory_latency-1; ! switch (alpha_cpu) ! { ! case PROCESSOR_EV4: ! /* On EV4, if INSN is a store insn and DEP_INSN is setting the data ! being stored, we can sometimes lower the cost. */ ! ! if ((insn_type == TYPE_IST || insn_type == TYPE_FST) ! && (set = single_set (dep_insn)) != 0 ! && GET_CODE (PATTERN (insn)) == SET ! && rtx_equal_p (SET_DEST (set), SET_SRC (PATTERN (insn)))) ! { ! switch (dep_insn_type) ! { ! case TYPE_ILD: ! case TYPE_FLD: ! /* No savings here. */ ! return cost; ! ! case TYPE_IMUL: ! /* In these cases, we save one cycle. */ ! return cost - 1; ! ! default: ! /* In all other cases, we save two cycles. */ ! return MAX (0, cost - 2); ! } ! } ! ! /* Another case that needs adjustment is an arithmetic or logical ! operation. It's cost is usually one cycle, but we default it to ! two in the MD file. The only case that it is actually two is ! for the address in loads, stores, and jumps. */ ! ! if (dep_insn_type == TYPE_IADD || dep_insn_type == TYPE_ILOG) ! { ! switch (insn_type) ! { ! case TYPE_ILD: ! case TYPE_IST: ! case TYPE_FLD: ! case TYPE_FST: ! case TYPE_JSR: ! return cost; ! default: ! return 1; ! } ! } ! ! /* The final case is when a compare feeds into an integer branch; ! the cost is only one cycle in that case. */ ! ! if (dep_insn_type == TYPE_ICMP && insn_type == TYPE_IBR) ! return 1; ! break; ! ! case PROCESSOR_EV5: ! /* And the lord DEC saith: "A special bypass provides an effective ! latency of 0 cycles for an ICMP or ILOG insn producing the test ! operand of an IBR or ICMOV insn." */ ! ! if ((dep_insn_type == TYPE_ICMP || dep_insn_type == TYPE_ILOG) ! && (set = single_set (dep_insn)) != 0) ! { ! /* A branch only has one input. This must be it. */ ! if (insn_type == TYPE_IBR) ! return 0; ! /* A conditional move has three, make sure it is the test. */ ! if (insn_type == TYPE_ICMOV ! && GET_CODE (set_src = PATTERN (insn)) == SET ! && GET_CODE (set_src = SET_SRC (set_src)) == IF_THEN_ELSE ! && rtx_equal_p (SET_DEST (set), XEXP (set_src, 0))) ! return 0; ! } ! ! /* "The multiplier is unable to receive data from IEU bypass paths. ! The instruction issues at the expected time, but its latency is ! increased by the time it takes for the input data to become ! available to the multiplier" -- which happens in pipeline stage ! six, when results are comitted to the register file. */ ! ! if (insn_type == TYPE_IMUL) ! { ! switch (dep_insn_type) ! { ! /* These insns produce their results in pipeline stage five. */ ! case TYPE_ILD: ! case TYPE_ICMOV: ! case TYPE_IMUL: ! case TYPE_MVI: ! return cost + 1; ! ! /* Other integer insns produce results in pipeline stage four. */ ! default: ! return cost + 2; ! } ! } ! break; ! ! case PROCESSOR_EV6: ! /* There is additional latency to move the result of (most) FP ! operations anywhere but the FP register file. */ ! ! if ((insn_type == TYPE_FST || insn_type == TYPE_FTOI) ! && (dep_insn_type == TYPE_FADD || ! dep_insn_type == TYPE_FMUL || ! dep_insn_type == TYPE_FCMOV)) ! return cost + 2; ! ! break; ! } - /* Otherwise, return the default cost. */ return cost; } ! /* Function to initialize the issue rate used by the scheduler. */ static int alpha_issue_rate () { --- 5307,5319 ---- || dep_insn_type == TYPE_LDSYM) cost += alpha_memory_latency-1; ! /* Everything else handled in DFA bypasses now. */ return cost; } ! /* The number of instructions that can be issued per cycle. */ ! static int alpha_issue_rate () { *************** alpha_issue_rate () *** 4964,5020 **** } static int ! alpha_variable_issue (dump, verbose, insn, cim) ! FILE *dump ATTRIBUTE_UNUSED; ! int verbose ATTRIBUTE_UNUSED; ! rtx insn; ! int cim; { ! if (recog_memoized (insn) < 0 || get_attr_type (insn) == TYPE_MULTI) ! return 0; ! ! return cim - 1; } ! ! /* Register global variables and machine-specific functions with the ! garbage collector. */ ! #if TARGET_ABI_UNICOSMK ! static void ! alpha_init_machine_status (p) ! struct function *p; ! { ! p->machine = ! (struct machine_function *) xcalloc (1, sizeof (struct machine_function)); ! p->machine->first_ciw = NULL_RTX; ! p->machine->last_ciw = NULL_RTX; ! p->machine->ciw_count = 0; ! p->machine->addr_list = NULL_RTX; } ! static void ! alpha_mark_machine_status (p) ! struct function *p; { ! struct machine_function *machine = p->machine; ! if (machine) ! { ! ggc_mark_rtx (machine->first_ciw); ! ggc_mark_rtx (machine->addr_list); ! } ! } ! static void ! alpha_free_machine_status (p) ! struct function *p; { ! free (p->machine); ! p->machine = NULL; } - #endif /* TARGET_ABI_UNICOSMK */ /* Functions to save and restore alpha_return_addr_rtx. */ --- 5321,5370 ---- } static int ! alpha_use_dfa_pipeline_interface () { ! return true; } ! /* How many alternative schedules to try. This should be as wide as the ! scheduling freedom in the DFA, but no wider. Making this value too ! large results extra work for the scheduler. ! For EV4, loads can be issued to either IB0 or IB1, thus we have 2 ! alternative schedules. For EV5, we can choose between E0/E1 and ! FA/FM. For EV6, an arithmatic insn can be issued to U0/U1/L0/L1. */ ! static int ! alpha_multipass_dfa_lookahead () ! { ! return (alpha_cpu == PROCESSOR_EV6 ? 4 : 2); } + + /* Machine-specific function data. */ ! struct machine_function GTY(()) { ! /* For unicosmk. */ ! /* List of call information words for calls from this function. */ ! struct rtx_def *first_ciw; ! struct rtx_def *last_ciw; ! int ciw_count; ! /* List of deferred case vectors. */ ! struct rtx_def *addr_list; ! /* For OSF. */ ! const char *some_ld_name; ! }; ! ! /* How to allocate a 'struct machine_function'. */ ! ! static struct machine_function * ! alpha_init_machine_status () { ! return ((struct machine_function *) ! ggc_alloc_cleared (sizeof (struct machine_function))); } /* Functions to save and restore alpha_return_addr_rtx. */ *************** alpha_gp_save_rtx () *** 5039,5045 **** { rtx r = get_hard_reg_initial_val (DImode, 29); if (GET_CODE (r) != MEM) ! r = gen_mem_addressof (r, NULL_TREE); return r; } --- 5389,5395 ---- { rtx r = get_hard_reg_initial_val (DImode, 29); if (GET_CODE (r) != MEM) ! r = gen_mem_addressof (r, NULL_TREE, /*rescan=*/true); return r; } *************** get_round_mode_suffix () *** 5158,5163 **** --- 5508,5552 ---- abort (); } + /* Locate some local-dynamic symbol still in use by this function + so that we can print its name in some movdi_er_tlsldm pattern. */ + + static const char * + get_some_local_dynamic_name () + { + rtx insn; + + if (cfun->machine->some_ld_name) + return cfun->machine->some_ld_name; + + for (insn = get_insns (); insn ; insn = NEXT_INSN (insn)) + if (INSN_P (insn) + && for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0)) + return cfun->machine->some_ld_name; + + abort (); + } + + static int + get_some_local_dynamic_name_1 (px, data) + rtx *px; + void *data ATTRIBUTE_UNUSED; + { + rtx x = *px; + + if (GET_CODE (x) == SYMBOL_REF) + { + const char *str = XSTR (x, 0); + if (str[0] == '@' && str[1] == 'D') + { + cfun->machine->some_ld_name = str; + return 1; + } + } + + return 0; + } + /* Print an operand. Recognize special options, documented below. */ void *************** print_operand (file, x, code) *** 5175,5180 **** --- 5564,5573 ---- assemble_name (file, alpha_fnname); break; + case '&': + assemble_name (file, get_some_local_dynamic_name ()); + break; + case '/': { const char *trap = get_trap_mode_suffix (); *************** print_operand (file, x, code) *** 5216,5228 **** break; case 'J': ! if (GET_CODE (x) == CONST_INT) ! { ! if (INTVAL (x) != 0) ! fprintf (file, "\t\t!lituse_jsr!%d", (int) INTVAL (x)); ! } ! else ! output_operand_lossage ("invalid %%J value"); break; case 'r': --- 5609,5638 ---- break; case 'J': ! { ! const char *lituse; ! ! if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSGD_CALL) ! { ! x = XVECEXP (x, 0, 0); ! lituse = "lituse_tlsgd"; ! } ! else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSLDM_CALL) ! { ! x = XVECEXP (x, 0, 0); ! lituse = "lituse_tlsldm"; ! } ! else if (GET_CODE (x) == CONST_INT) ! lituse = "lituse_jsr"; ! else ! { ! output_operand_lossage ("invalid %%J value"); ! break; ! } ! ! if (x != const0_rtx) ! fprintf (file, "\t\t!%s!%d", lituse, (int) INTVAL (x)); ! } break; case 'r': *************** print_operand (file, x, code) *** 5330,5360 **** case 'U': /* Similar, except do it from the mask. */ ! if (GET_CODE (x) == CONST_INT && INTVAL (x) == 0xff) ! fprintf (file, "b"); ! else if (GET_CODE (x) == CONST_INT && INTVAL (x) == 0xffff) ! fprintf (file, "w"); ! else if (GET_CODE (x) == CONST_INT && INTVAL (x) == 0xffffffff) ! fprintf (file, "l"); ! #if HOST_BITS_PER_WIDE_INT == 32 ! else if (GET_CODE (x) == CONST_DOUBLE ! && CONST_DOUBLE_HIGH (x) == 0 ! && CONST_DOUBLE_LOW (x) == -1) ! fprintf (file, "l"); ! else if (GET_CODE (x) == CONST_DOUBLE ! && CONST_DOUBLE_HIGH (x) == -1 ! && CONST_DOUBLE_LOW (x) == -1) ! fprintf (file, "q"); ! #else ! else if (GET_CODE (x) == CONST_INT && INTVAL (x) == -1) ! fprintf (file, "q"); ! else if (GET_CODE (x) == CONST_DOUBLE ! && CONST_DOUBLE_HIGH (x) == 0 ! && CONST_DOUBLE_LOW (x) == -1) ! fprintf (file, "q"); ! #endif ! else ! output_operand_lossage ("invalid %%U value"); break; case 's': --- 5740,5779 ---- case 'U': /* Similar, except do it from the mask. */ ! if (GET_CODE (x) == CONST_INT) ! { ! HOST_WIDE_INT value = INTVAL (x); ! ! if (value == 0xff) ! { ! fputc ('b', file); ! break; ! } ! if (value == 0xffff) ! { ! fputc ('w', file); ! break; ! } ! if (value == 0xffffffff) ! { ! fputc ('l', file); ! break; ! } ! if (value == -1) ! { ! fputc ('q', file); ! break; ! } ! } ! else if (HOST_BITS_PER_WIDE_INT == 32 ! && GET_CODE (x) == CONST_DOUBLE ! && CONST_DOUBLE_LOW (x) == 0xffffffff ! && CONST_DOUBLE_HIGH (x) == 0) ! { ! fputc ('l', file); ! break; ! } ! output_operand_lossage ("invalid %%U value"); break; case 's': *************** print_operand (file, x, code) *** 5456,5461 **** --- 5875,5893 ---- fprintf (file, "%s", reg_names[REGNO (x)]); else if (GET_CODE (x) == MEM) output_address (XEXP (x, 0)); + else if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == UNSPEC) + { + switch (XINT (XEXP (x, 0), 1)) + { + case UNSPEC_DTPREL: + case UNSPEC_TPREL: + output_addr_const (file, XVECEXP (XEXP (x, 0), 0, 0)); + break; + default: + output_operand_lossage ("unknown relocation unspec"); + break; + } + } else output_addr_const (file, x); break; *************** print_operand_address (file, addr) *** 5485,5491 **** if (GET_CODE (addr) == LO_SUM) { ! output_addr_const (file, XEXP (addr, 1)); if (offset) { fputc ('+', file); --- 5917,5952 ---- if (GET_CODE (addr) == LO_SUM) { ! const char *reloc16, *reloclo; ! rtx op1 = XEXP (addr, 1); ! ! if (GET_CODE (op1) == CONST && GET_CODE (XEXP (op1, 0)) == UNSPEC) ! { ! op1 = XEXP (op1, 0); ! switch (XINT (op1, 1)) ! { ! case UNSPEC_DTPREL: ! reloc16 = NULL; ! reloclo = (alpha_tls_size == 16 ? "dtprel" : "dtprello"); ! break; ! case UNSPEC_TPREL: ! reloc16 = NULL; ! reloclo = (alpha_tls_size == 16 ? "tprel" : "tprello"); ! break; ! default: ! output_operand_lossage ("unknown relocation unspec"); ! return; ! } ! ! output_addr_const (file, XVECEXP (op1, 0, 0)); ! } ! else ! { ! reloc16 = "gprel"; ! reloclo = "gprellow"; ! output_addr_const (file, op1); ! } ! if (offset) { fputc ('+', file); *************** print_operand_address (file, addr) *** 5502,5508 **** abort (); fprintf (file, "($%d)\t\t!%s", basereg, ! (basereg == 29 ? "gprel" : "gprellow")); return; } --- 5963,5969 ---- abort (); fprintf (file, "($%d)\t\t!%s", basereg, ! (basereg == 29 ? reloc16 : reloclo)); return; } *************** print_operand_address (file, addr) *** 5513,5518 **** --- 5974,5997 ---- basereg = subreg_regno (addr); else if (GET_CODE (addr) == CONST_INT) offset = INTVAL (addr); + + #if TARGET_ABI_OPEN_VMS + else if (GET_CODE (addr) == SYMBOL_REF) + { + fprintf (file, "%s", XSTR (addr, 0)); + return; + } + else if (GET_CODE (addr) == CONST + && GET_CODE (XEXP (addr, 0)) == PLUS + && GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF) + { + fprintf (file, "%s+%d", + XSTR (XEXP (XEXP (addr, 0), 0), 0), + INTVAL (XEXP (XEXP (addr, 0), 1))); + return; + } + #endif + else abort (); *************** alpha_initialize_trampoline (tramp, fnad *** 5577,5583 **** #ifdef TRANSFER_FROM_TRAMPOLINE emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), ! 0, VOIDmode, 1, addr, Pmode); #endif if (jmpofs >= 0) --- 6056,6062 ---- #ifdef TRANSFER_FROM_TRAMPOLINE emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), ! 0, VOIDmode, 1, tramp, Pmode); #endif if (jmpofs >= 0) *************** alpha_build_va_list () *** 5723,5729 **** if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK) return ptr_type_node; ! record = make_lang_type (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); TREE_CHAIN (record) = type_decl; TYPE_NAME (record) = type_decl; --- 6202,6208 ---- if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK) return ptr_type_node; ! record = (*lang_hooks.types.make_type) (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); TREE_CHAIN (record) = type_decl; TYPE_NAME (record) = type_decl; *************** alpha_build_va_list () *** 5746,5753 **** } void ! alpha_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg ATTRIBUTE_UNUSED; { --- 6225,6231 ---- } void ! alpha_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { *************** alpha_va_start (stdarg_p, valist, nextar *** 5758,5764 **** return; if (TARGET_ABI_UNICOSMK) ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); /* For Unix, SETUP_INCOMING_VARARGS moves the starting address base up by 48, storing fp arg registers in the first 48 bytes, and the --- 6236,6242 ---- return; if (TARGET_ABI_UNICOSMK) ! std_expand_builtin_va_start (valist, nextarg); /* For Unix, SETUP_INCOMING_VARARGS moves the starting address base up by 48, storing fp arg registers in the first 48 bytes, and the *************** alpha_va_start (stdarg_p, valist, nextar *** 5767,5778 **** If no integer registers need be stored, then we must subtract 48 in order to account for the integer arg registers which are counted ! in argsize above, but which are not actually stored on the stack. */ ! if (NUM_ARGS <= 5 + stdarg_p) offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD; else ! offset = -6 * UNITS_PER_WORD; if (TARGET_ABI_OPEN_VMS) { --- 6245,6259 ---- If no integer registers need be stored, then we must subtract 48 in order to account for the integer arg registers which are counted ! in argsize above, but which are not actually stored on the stack. ! Must further be careful here about structures straddling the last ! integer argument register; that futzes with pretend_args_size, ! which changes the meaning of AP. */ ! if (NUM_ARGS <= 6) offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD; else ! offset = -6 * UNITS_PER_WORD + current_function_pretend_args_size; if (TARGET_ABI_OPEN_VMS) { *************** alpha_va_arg (valist, type) *** 5897,5902 **** --- 6378,6687 ---- return addr; } + /* Builtins. */ + + enum alpha_builtin + { + ALPHA_BUILTIN_CMPBGE, + ALPHA_BUILTIN_EXTBL, + ALPHA_BUILTIN_EXTWL, + ALPHA_BUILTIN_EXTLL, + ALPHA_BUILTIN_EXTQL, + ALPHA_BUILTIN_EXTWH, + ALPHA_BUILTIN_EXTLH, + ALPHA_BUILTIN_EXTQH, + ALPHA_BUILTIN_INSBL, + ALPHA_BUILTIN_INSWL, + ALPHA_BUILTIN_INSLL, + ALPHA_BUILTIN_INSQL, + ALPHA_BUILTIN_INSWH, + ALPHA_BUILTIN_INSLH, + ALPHA_BUILTIN_INSQH, + ALPHA_BUILTIN_MSKBL, + ALPHA_BUILTIN_MSKWL, + ALPHA_BUILTIN_MSKLL, + ALPHA_BUILTIN_MSKQL, + ALPHA_BUILTIN_MSKWH, + ALPHA_BUILTIN_MSKLH, + ALPHA_BUILTIN_MSKQH, + ALPHA_BUILTIN_UMULH, + ALPHA_BUILTIN_ZAP, + ALPHA_BUILTIN_ZAPNOT, + ALPHA_BUILTIN_AMASK, + ALPHA_BUILTIN_IMPLVER, + ALPHA_BUILTIN_RPCC, + ALPHA_BUILTIN_THREAD_POINTER, + ALPHA_BUILTIN_SET_THREAD_POINTER, + + /* TARGET_MAX */ + ALPHA_BUILTIN_MINUB8, + ALPHA_BUILTIN_MINSB8, + ALPHA_BUILTIN_MINUW4, + ALPHA_BUILTIN_MINSW4, + ALPHA_BUILTIN_MAXUB8, + ALPHA_BUILTIN_MAXSB8, + ALPHA_BUILTIN_MAXUW4, + ALPHA_BUILTIN_MAXSW4, + ALPHA_BUILTIN_PERR, + ALPHA_BUILTIN_PKLB, + ALPHA_BUILTIN_PKWB, + ALPHA_BUILTIN_UNPKBL, + ALPHA_BUILTIN_UNPKBW, + + /* TARGET_CIX */ + ALPHA_BUILTIN_CTTZ, + ALPHA_BUILTIN_CTLZ, + ALPHA_BUILTIN_CTPOP, + + ALPHA_BUILTIN_max + }; + + static unsigned int const code_for_builtin[ALPHA_BUILTIN_max] = { + CODE_FOR_builtin_cmpbge, + CODE_FOR_builtin_extbl, + CODE_FOR_builtin_extwl, + CODE_FOR_builtin_extll, + CODE_FOR_builtin_extql, + CODE_FOR_builtin_extwh, + CODE_FOR_builtin_extlh, + CODE_FOR_builtin_extqh, + CODE_FOR_builtin_insbl, + CODE_FOR_builtin_inswl, + CODE_FOR_builtin_insll, + CODE_FOR_builtin_insql, + CODE_FOR_builtin_inswh, + CODE_FOR_builtin_inslh, + CODE_FOR_builtin_insqh, + CODE_FOR_builtin_mskbl, + CODE_FOR_builtin_mskwl, + CODE_FOR_builtin_mskll, + CODE_FOR_builtin_mskql, + CODE_FOR_builtin_mskwh, + CODE_FOR_builtin_msklh, + CODE_FOR_builtin_mskqh, + CODE_FOR_umuldi3_highpart, + CODE_FOR_builtin_zap, + CODE_FOR_builtin_zapnot, + CODE_FOR_builtin_amask, + CODE_FOR_builtin_implver, + CODE_FOR_builtin_rpcc, + CODE_FOR_load_tp, + CODE_FOR_set_tp, + + /* TARGET_MAX */ + CODE_FOR_builtin_minub8, + CODE_FOR_builtin_minsb8, + CODE_FOR_builtin_minuw4, + CODE_FOR_builtin_minsw4, + CODE_FOR_builtin_maxub8, + CODE_FOR_builtin_maxsb8, + CODE_FOR_builtin_maxuw4, + CODE_FOR_builtin_maxsw4, + CODE_FOR_builtin_perr, + CODE_FOR_builtin_pklb, + CODE_FOR_builtin_pkwb, + CODE_FOR_builtin_unpkbl, + CODE_FOR_builtin_unpkbw, + + /* TARGET_CIX */ + CODE_FOR_builtin_cttz, + CODE_FOR_builtin_ctlz, + CODE_FOR_builtin_ctpop + }; + + struct alpha_builtin_def + { + const char *name; + enum alpha_builtin code; + unsigned int target_mask; + }; + + static struct alpha_builtin_def const zero_arg_builtins[] = { + { "__builtin_alpha_implver", ALPHA_BUILTIN_IMPLVER, 0 }, + { "__builtin_alpha_rpcc", ALPHA_BUILTIN_RPCC, 0 } + }; + + static struct alpha_builtin_def const one_arg_builtins[] = { + { "__builtin_alpha_amask", ALPHA_BUILTIN_AMASK, 0 }, + { "__builtin_alpha_pklb", ALPHA_BUILTIN_PKLB, MASK_MAX }, + { "__builtin_alpha_pkwb", ALPHA_BUILTIN_PKWB, MASK_MAX }, + { "__builtin_alpha_unpkbl", ALPHA_BUILTIN_UNPKBL, MASK_MAX }, + { "__builtin_alpha_unpkbw", ALPHA_BUILTIN_UNPKBW, MASK_MAX }, + { "__builtin_alpha_cttz", ALPHA_BUILTIN_CTTZ, MASK_CIX }, + { "__builtin_alpha_ctlz", ALPHA_BUILTIN_CTLZ, MASK_CIX }, + { "__builtin_alpha_ctpop", ALPHA_BUILTIN_CTPOP, MASK_CIX } + }; + + static struct alpha_builtin_def const two_arg_builtins[] = { + { "__builtin_alpha_cmpbge", ALPHA_BUILTIN_CMPBGE, 0 }, + { "__builtin_alpha_extbl", ALPHA_BUILTIN_EXTBL, 0 }, + { "__builtin_alpha_extwl", ALPHA_BUILTIN_EXTWL, 0 }, + { "__builtin_alpha_extll", ALPHA_BUILTIN_EXTLL, 0 }, + { "__builtin_alpha_extql", ALPHA_BUILTIN_EXTQL, 0 }, + { "__builtin_alpha_extwh", ALPHA_BUILTIN_EXTWH, 0 }, + { "__builtin_alpha_extlh", ALPHA_BUILTIN_EXTLH, 0 }, + { "__builtin_alpha_extqh", ALPHA_BUILTIN_EXTQH, 0 }, + { "__builtin_alpha_insbl", ALPHA_BUILTIN_INSBL, 0 }, + { "__builtin_alpha_inswl", ALPHA_BUILTIN_INSWL, 0 }, + { "__builtin_alpha_insll", ALPHA_BUILTIN_INSLL, 0 }, + { "__builtin_alpha_insql", ALPHA_BUILTIN_INSQL, 0 }, + { "__builtin_alpha_inswh", ALPHA_BUILTIN_INSWH, 0 }, + { "__builtin_alpha_inslh", ALPHA_BUILTIN_INSLH, 0 }, + { "__builtin_alpha_insqh", ALPHA_BUILTIN_INSQH, 0 }, + { "__builtin_alpha_mskbl", ALPHA_BUILTIN_MSKBL, 0 }, + { "__builtin_alpha_mskwl", ALPHA_BUILTIN_MSKWL, 0 }, + { "__builtin_alpha_mskll", ALPHA_BUILTIN_MSKLL, 0 }, + { "__builtin_alpha_mskql", ALPHA_BUILTIN_MSKQL, 0 }, + { "__builtin_alpha_mskwh", ALPHA_BUILTIN_MSKWH, 0 }, + { "__builtin_alpha_msklh", ALPHA_BUILTIN_MSKLH, 0 }, + { "__builtin_alpha_mskqh", ALPHA_BUILTIN_MSKQH, 0 }, + { "__builtin_alpha_umulh", ALPHA_BUILTIN_UMULH, 0 }, + { "__builtin_alpha_zap", ALPHA_BUILTIN_ZAP, 0 }, + { "__builtin_alpha_zapnot", ALPHA_BUILTIN_ZAPNOT, 0 }, + { "__builtin_alpha_minub8", ALPHA_BUILTIN_MINUB8, MASK_MAX }, + { "__builtin_alpha_minsb8", ALPHA_BUILTIN_MINSB8, MASK_MAX }, + { "__builtin_alpha_minuw4", ALPHA_BUILTIN_MINUW4, MASK_MAX }, + { "__builtin_alpha_minsw4", ALPHA_BUILTIN_MINSW4, MASK_MAX }, + { "__builtin_alpha_maxub8", ALPHA_BUILTIN_MAXUB8, MASK_MAX }, + { "__builtin_alpha_maxsb8", ALPHA_BUILTIN_MAXSB8, MASK_MAX }, + { "__builtin_alpha_maxuw4", ALPHA_BUILTIN_MAXUW4, MASK_MAX }, + { "__builtin_alpha_maxsw4", ALPHA_BUILTIN_MAXSW4, MASK_MAX }, + { "__builtin_alpha_perr", ALPHA_BUILTIN_PERR, MASK_MAX } + }; + + static void + alpha_init_builtins () + { + const struct alpha_builtin_def *p; + tree ftype; + size_t i; + + ftype = build_function_type (long_integer_type_node, void_list_node); + + p = zero_arg_builtins; + for (i = 0; i < ARRAY_SIZE (zero_arg_builtins); ++i, ++p) + if ((target_flags & p->target_mask) == p->target_mask) + builtin_function (p->name, ftype, p->code, BUILT_IN_MD, + NULL, NULL_TREE); + + ftype = build_function_type_list (long_integer_type_node, + long_integer_type_node, NULL_TREE); + + p = one_arg_builtins; + for (i = 0; i < ARRAY_SIZE (one_arg_builtins); ++i, ++p) + if ((target_flags & p->target_mask) == p->target_mask) + builtin_function (p->name, ftype, p->code, BUILT_IN_MD, + NULL, NULL_TREE); + + ftype = build_function_type_list (long_integer_type_node, + long_integer_type_node, + long_integer_type_node, NULL_TREE); + + p = two_arg_builtins; + for (i = 0; i < ARRAY_SIZE (two_arg_builtins); ++i, ++p) + if ((target_flags & p->target_mask) == p->target_mask) + builtin_function (p->name, ftype, p->code, BUILT_IN_MD, + NULL, NULL_TREE); + + ftype = build_function_type (ptr_type_node, void_list_node); + builtin_function ("__builtin_thread_pointer", ftype, + ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD, + NULL, NULL_TREE); + + ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); + builtin_function ("__builtin_set_thread_pointer", ftype, + ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD, + NULL, NULL_TREE); + } + + /* Expand an expression EXP that calls a built-in function, + with result going to TARGET if that's convenient + (and in mode MODE if that's convenient). + SUBTARGET may be used as the target for computing one of EXP's operands. + IGNORE is nonzero if the value is to be ignored. */ + + static rtx + alpha_expand_builtin (exp, target, subtarget, mode, ignore) + tree exp; + rtx target; + rtx subtarget ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + int ignore ATTRIBUTE_UNUSED; + { + #define MAX_ARGS 2 + + tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); + unsigned int fcode = DECL_FUNCTION_CODE (fndecl); + tree arglist = TREE_OPERAND (exp, 1); + enum insn_code icode; + rtx op[MAX_ARGS], pat; + int arity; + bool nonvoid; + + if (fcode >= ALPHA_BUILTIN_max) + internal_error ("bad builtin fcode"); + icode = code_for_builtin[fcode]; + if (icode == 0) + internal_error ("bad builtin fcode"); + + nonvoid = TREE_TYPE (TREE_TYPE (fndecl)) != void_type_node; + + for (arglist = TREE_OPERAND (exp, 1), arity = 0; + arglist; + arglist = TREE_CHAIN (arglist), arity++) + { + const struct insn_operand_data *insn_op; + + tree arg = TREE_VALUE (arglist); + if (arg == error_mark_node) + return NULL_RTX; + if (arity > MAX_ARGS) + return NULL_RTX; + + insn_op = &insn_data[icode].operand[arity + nonvoid]; + + op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, 0); + + if (!(*insn_op->predicate) (op[arity], insn_op->mode)) + op[arity] = copy_to_mode_reg (insn_op->mode, op[arity]); + } + + if (nonvoid) + { + enum machine_mode tmode = insn_data[icode].operand[0].mode; + if (!target + || GET_MODE (target) != tmode + || !(*insn_data[icode].operand[0].predicate) (target, tmode)) + target = gen_reg_rtx (tmode); + } + + switch (arity) + { + case 0: + pat = GEN_FCN (icode) (target); + break; + case 1: + if (nonvoid) + pat = GEN_FCN (icode) (target, op[0]); + else + pat = GEN_FCN (icode) (op[0]); + break; + case 2: + pat = GEN_FCN (icode) (target, op[0], op[1]); + break; + default: + abort (); + } + if (!pat) + return NULL_RTX; + emit_insn (pat); + + if (nonvoid) + return target; + else + return const0_rtx; + } + /* This page contains routines that are used to determine what the function prologue and epilogue code will do and write them out. */ *************** alpha_sa_mask (imaskP, fmaskP) *** 5934,5943 **** unsigned int i; /* Irritatingly, there are two kinds of thunks -- those created with ! ASM_OUTPUT_MI_THUNK and those with DECL_THUNK_P that go through ! the regular part of the compiler. In the ASM_OUTPUT_MI_THUNK case ! we don't have valid register life info, but assemble_start_function ! wants to output .frame and .mask directives. */ if (current_function_is_thunk && !no_new_pseudos) { *imaskP = 0; --- 6719,6729 ---- unsigned int i; /* Irritatingly, there are two kinds of thunks -- those created with ! TARGET_ASM_OUTPUT_MI_THUNK and those with DECL_THUNK_P that go ! through the regular part of the compiler. In the ! TARGET_ASM_OUTPUT_MI_THUNK case we don't have valid register life ! info, but assemble_start_function wants to output .frame and ! .mask directives. */ if (current_function_is_thunk && !no_new_pseudos) { *imaskP = 0; *************** alpha_sa_size () *** 6012,6018 **** alpha_procedure_type = (sa_size || get_frame_size() != 0 ! || current_function_outgoing_args_size || current_function_varargs || current_function_stdarg || current_function_calls_alloca || frame_pointer_needed) ? PT_STACK : PT_REGISTER; --- 6798,6804 ---- alpha_procedure_type = (sa_size || get_frame_size() != 0 ! || current_function_outgoing_args_size || current_function_stdarg || current_function_calls_alloca || frame_pointer_needed) ? PT_STACK : PT_REGISTER; *************** const struct attribute_spec vms_attribut *** 6111,6121 **** #endif static int ! find_lo_sum (px, data) rtx *px; void *data ATTRIBUTE_UNUSED; { ! return GET_CODE (*px) == LO_SUM; } static int --- 6897,6914 ---- #endif static int ! find_lo_sum_using_gp (px, data) rtx *px; void *data ATTRIBUTE_UNUSED; { ! return GET_CODE (*px) == LO_SUM && XEXP (*px, 0) == pic_offset_table_rtx; ! } ! ! int ! alpha_find_lo_sum_using_gp (insn) ! rtx insn; ! { ! return for_each_rtx (&PATTERN (insn), find_lo_sum_using_gp, NULL) > 0; } static int *************** alpha_does_function_need_gp () *** 6144,6158 **** for (; insn; insn = NEXT_INSN (insn)) if (INSN_P (insn) && GET_CODE (PATTERN (insn)) != USE ! && GET_CODE (PATTERN (insn)) != CLOBBER) ! { ! enum attr_type type = get_attr_type (insn); ! if (type == TYPE_LDSYM || type == TYPE_JSR) ! return 1; ! if (TARGET_EXPLICIT_RELOCS ! && for_each_rtx (&PATTERN (insn), find_lo_sum, NULL) > 0) ! return 1; ! } return 0; } --- 6937,6945 ---- for (; insn; insn = NEXT_INSN (insn)) if (INSN_P (insn) && GET_CODE (PATTERN (insn)) != USE ! && GET_CODE (PATTERN (insn)) != CLOBBER ! && get_attr_usegp (insn)) ! return 1; return 0; } *************** alpha_write_verstamp (file) *** 6179,6200 **** static rtx set_frame_related_p () { ! rtx seq = gen_sequence (); end_sequence (); ! if (GET_CODE (seq) == SEQUENCE) { ! int i = XVECLEN (seq, 0); ! while (--i >= 0) ! RTX_FRAME_RELATED_P (XVECEXP (seq, 0, i)) = 1; ! return emit_insn (seq); } else { seq = emit_insn (seq); RTX_FRAME_RELATED_P (seq) = 1; - return seq; } } #define FRP(exp) (start_sequence (), exp, set_frame_related_p ()) --- 6966,6995 ---- static rtx set_frame_related_p () { ! rtx seq = get_insns (); ! rtx insn; ! end_sequence (); ! if (!seq) ! return NULL_RTX; ! ! if (INSN_P (seq)) { ! insn = seq; ! while (insn != NULL_RTX) ! { ! RTX_FRAME_RELATED_P (insn) = 1; ! insn = NEXT_INSN (insn); ! } ! seq = emit_insn (seq); } else { seq = emit_insn (seq); RTX_FRAME_RELATED_P (seq) = 1; } + return seq; } #define FRP(exp) (start_sequence (), exp, set_frame_related_p ()) *************** alpha_start_function (file, fnname, decl *** 6698,6723 **** } #if TARGET_ABI_OPEN_VMS ! /* Ifdef'ed cause readonly_section and link_section are only ! available then. */ ! readonly_section (); fprintf (file, "\t.align 3\n"); assemble_name (file, fnname); fputs ("..na:\n", file); fputs ("\t.ascii \"", file); assemble_name (file, fnname); fputs ("\\0\"\n", file); - - link_section (); - fprintf (file, "\t.align 3\n"); - fputs ("\t.name ", file); - assemble_name (file, fnname); - fputs ("..na\n", file); - ASM_OUTPUT_LABEL (file, fnname); - fprintf (file, "\t.pdesc "); - assemble_name (file, fnname); - fprintf (file, "..en,%s\n", - alpha_procedure_type == PT_STACK ? "stack" - : alpha_procedure_type == PT_REGISTER ? "reg" : "null"); alpha_need_linkage (fnname, 1); text_section (); #endif --- 7493,7505 ---- } #if TARGET_ABI_OPEN_VMS ! /* Ifdef'ed cause link_section are only available then. */ ! readonly_data_section (); fprintf (file, "\t.align 3\n"); assemble_name (file, fnname); fputs ("..na:\n", file); fputs ("\t.ascii \"", file); assemble_name (file, fnname); fputs ("\\0\"\n", file); alpha_need_linkage (fnname, 1); text_section (); #endif *************** alpha_expand_epilogue () *** 7003,7008 **** --- 7785,7823 ---- } } } + + #if TARGET_ABI_OPEN_VMS + #include + + /* Structure to collect function names for final output + in link section. */ + + enum links_kind {KIND_UNUSED, KIND_LOCAL, KIND_EXTERN}; + enum reloc_kind {KIND_LINKAGE, KIND_CODEADDR}; + + struct alpha_funcs + { + int num; + splay_tree links; + }; + + struct alpha_links + { + int num; + rtx linkage; + enum links_kind lkind; + enum reloc_kind rkind; + }; + + static splay_tree alpha_funcs_tree; + static splay_tree alpha_links_tree; + + static int mark_alpha_links_node PARAMS ((splay_tree_node, void *)); + static void mark_alpha_links PARAMS ((void *)); + static int alpha_write_one_linkage PARAMS ((splay_tree_node, void *)); + + static int alpha_funcs_num; + #endif /* Output the rest of the textual info surrounding the epilogue. */ *************** void *** 7010,7016 **** alpha_end_function (file, fnname, decl) FILE *file; const char *fnname; ! tree decl ATTRIBUTE_UNUSED; { /* End the function. */ if (!TARGET_ABI_UNICOSMK && !flag_inhibit_size_directive) --- 7825,7831 ---- alpha_end_function (file, fnname, decl) FILE *file; const char *fnname; ! tree decl; { /* End the function. */ if (!TARGET_ABI_UNICOSMK && !flag_inhibit_size_directive) *************** alpha_end_function (file, fnname, decl) *** 7021,7040 **** } inside_function = FALSE; ! /* Show that we know this function if it is called again. ! Don't do this for global functions in object files destined for a ! shared library because the function may be overridden by the application ! or other libraries. Similarly, don't do this for weak functions. Don't do this for functions not defined in the .text section, as otherwise it's not unlikely that the destination is out of range for a direct branch. */ ! if (!DECL_WEAK (current_function_decl) ! && (!flag_pic || !TREE_PUBLIC (current_function_decl)) ! && decl_in_text_section (current_function_decl)) ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1; /* Output jump tables and the static subroutine information block. */ if (TARGET_ABI_UNICOSMK) --- 7836,7855 ---- } inside_function = FALSE; ! #if TARGET_ABI_OPEN_VMS ! alpha_write_linkage (file, fnname, decl); ! #endif ! /* Show that we know this function if it is called again. ! ! Do this only for functions whose symbols bind locally. Don't do this for functions not defined in the .text section, as otherwise it's not unlikely that the destination is out of range for a direct branch. */ ! if ((*targetm.binds_local_p) (decl) && decl_in_text_section (decl)) ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; /* Output jump tables and the static subroutine information block. */ if (TARGET_ABI_UNICOSMK) *************** alpha_end_function (file, fnname, decl) *** 7044,7050 **** } } ! /* Emit a tail call to FUNCTION after adjusting THIS by DELTA. In order to avoid the hordes of differences between generated code with and without TARGET_EXPLICIT_RELOCS, and to avoid duplicating --- 7859,7866 ---- } } ! #if TARGET_ABI_OSF ! /* Emit a tail call to FUNCTION after adjusting THIS by DELTA. In order to avoid the hordes of differences between generated code with and without TARGET_EXPLICIT_RELOCS, and to avoid duplicating *************** alpha_end_function (file, fnname, decl) *** 7053,7063 **** Not sure why this idea hasn't been explored before... */ ! void ! alpha_output_mi_thunk_osf (file, thunk_fndecl, delta, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; HOST_WIDE_INT delta; tree function; { HOST_WIDE_INT hi, lo; --- 7869,7880 ---- Not sure why this idea hasn't been explored before... */ ! static void ! alpha_output_mi_thunk_osf (file, thunk_fndecl, delta, vcall_offset, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset; tree function; { HOST_WIDE_INT hi, lo; *************** alpha_output_mi_thunk_osf (file, thunk_f *** 7092,7097 **** --- 7909,7945 ---- emit_insn (gen_adddi3 (this, this, tmp)); } + /* Add a delta stored in the vtable at VCALL_OFFSET. */ + if (vcall_offset) + { + rtx tmp, tmp2; + + tmp = gen_rtx_REG (Pmode, 0); + emit_move_insn (tmp, gen_rtx_MEM (Pmode, this)); + + lo = ((vcall_offset & 0xffff) ^ 0x8000) - 0x8000; + hi = (((vcall_offset - lo) & 0xffffffff) ^ 0x80000000) - 0x80000000; + if (hi + lo == vcall_offset) + { + if (hi) + emit_insn (gen_adddi3 (tmp, tmp, GEN_INT (hi))); + } + else + { + tmp2 = alpha_emit_set_long_const (gen_rtx_REG (Pmode, 1), + vcall_offset, -(vcall_offset < 0)); + emit_insn (gen_adddi3 (tmp, tmp, tmp2)); + lo = 0; + } + if (lo) + tmp2 = gen_rtx_PLUS (Pmode, tmp, GEN_INT (lo)); + else + tmp2 = tmp; + emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp2)); + + emit_insn (gen_adddi3 (this, this, tmp)); + } + /* Generate a tail call to the target function. */ if (! TREE_USED (function)) { *************** alpha_output_mi_thunk_osf (file, thunk_f *** 7113,7118 **** --- 7961,7967 ---- final (insn, file, 1, 0); final_end_function (); } + #endif /* TARGET_ABI_OSF */ /* Debugging support. */ *************** alphaev4_insn_pipe (insn) *** 7575,7580 **** --- 8424,8430 ---- case TYPE_MISC: case TYPE_IBR: case TYPE_JSR: + case TYPE_CALLPAL: case TYPE_FCPYS: case TYPE_FCMOV: case TYPE_FADD: *************** alphaev5_insn_pipe (insn) *** 7617,7622 **** --- 8467,8473 ---- case TYPE_IBR: case TYPE_JSR: + case TYPE_CALLPAL: return EV5_E1; case TYPE_FCPYS: *************** alpha_reorg (insns) *** 8077,8158 **** } } ! /* Check a floating-point value for validity for a particular machine mode. */ ! ! static const char * const float_strings[] = ! { ! /* These are for FLOAT_VAX. */ ! "1.70141173319264430e+38", /* 2^127 (2^24 - 1) / 2^24 */ ! "-1.70141173319264430e+38", ! "2.93873587705571877e-39", /* 2^-128 */ ! "-2.93873587705571877e-39", ! /* These are for the default broken IEEE mode, which traps ! on infinity or denormal numbers. */ ! "3.402823466385288598117e+38", /* 2^128 (1 - 2^-24) */ ! "-3.402823466385288598117e+38", ! "1.1754943508222875079687e-38", /* 2^-126 */ ! "-1.1754943508222875079687e-38", ! }; ! static REAL_VALUE_TYPE float_values[8]; ! static int inited_float_values = 0; ! int ! check_float_value (mode, d, overflow) enum machine_mode mode; ! REAL_VALUE_TYPE *d; ! int overflow ATTRIBUTE_UNUSED; { ! ! if (TARGET_IEEE || TARGET_IEEE_CONFORMANT || TARGET_IEEE_WITH_INEXACT) ! return 0; ! ! if (inited_float_values == 0) ! { ! int i; ! for (i = 0; i < 8; i++) ! float_values[i] = REAL_VALUE_ATOF (float_strings[i], DFmode); ! ! inited_float_values = 1; ! } ! ! if (mode == SFmode) ! { ! REAL_VALUE_TYPE r; ! REAL_VALUE_TYPE *fvptr; ! ! if (TARGET_FLOAT_VAX) ! fvptr = &float_values[0]; ! else ! fvptr = &float_values[4]; ! ! memcpy (&r, d, sizeof (REAL_VALUE_TYPE)); ! if (REAL_VALUES_LESS (fvptr[0], r)) ! { ! memcpy (d, &fvptr[0], sizeof (REAL_VALUE_TYPE)); ! return 1; ! } ! else if (REAL_VALUES_LESS (r, fvptr[1])) ! { ! memcpy (d, &fvptr[1], sizeof (REAL_VALUE_TYPE)); ! return 1; ! } ! else if (REAL_VALUES_LESS (dconst0, r) ! && REAL_VALUES_LESS (r, fvptr[2])) ! { ! memcpy (d, &dconst0, sizeof (REAL_VALUE_TYPE)); ! return 1; ! } ! else if (REAL_VALUES_LESS (r, dconst0) ! && REAL_VALUES_LESS (fvptr[3], r)) ! { ! memcpy (d, &dconst0, sizeof (REAL_VALUE_TYPE)); ! return 1; ! } ! } ! ! return 0; } #if TARGET_ABI_OPEN_VMS --- 8928,8952 ---- } } ! #ifdef OBJECT_FORMAT_ELF ! /* Switch to the section to which we should output X. The only thing ! special we do here is to honor small data. */ ! static void ! alpha_elf_select_rtx_section (mode, x, align) enum machine_mode mode; ! rtx x; ! unsigned HOST_WIDE_INT align; { ! if (TARGET_SMALL_DATA && GET_MODE_SIZE (mode) <= g_switch_value) ! /* ??? Consider using mergable sdata sections. */ ! sdata_section (); ! else ! default_elf_select_rtx_section (mode, x, align); } + + #endif /* OBJECT_FORMAT_ELF */ #if TARGET_ABI_OPEN_VMS *************** alpha_arg_info_reg_val (cum) *** 8189,8213 **** return GEN_INT (regval); } - #include - - /* Structure to collect function names for final output - in link section. */ - - enum links_kind {KIND_UNUSED, KIND_LOCAL, KIND_EXTERN}; - - struct alpha_links - { - rtx linkage; - enum links_kind kind; - }; - - static splay_tree alpha_links; - - static int mark_alpha_links_node PARAMS ((splay_tree_node, void *)); - static void mark_alpha_links PARAMS ((void *)); - static int alpha_write_one_linkage PARAMS ((splay_tree_node, void *)); - /* Protect alpha_links from garbage collection. */ static int --- 8983,8988 ---- *************** alpha_need_linkage (name, is_local) *** 8241,8286 **** { splay_tree_node node; struct alpha_links *al; if (name[0] == '*') name++; ! if (alpha_links) { /* Is this name already defined? */ ! node = splay_tree_lookup (alpha_links, (splay_tree_key) name); if (node) { al = (struct alpha_links *) node->value; if (is_local) { /* Defined here but external assumed. */ ! if (al->kind == KIND_EXTERN) ! al->kind = KIND_LOCAL; } else { /* Used here but unused assumed. */ ! if (al->kind == KIND_UNUSED) ! al->kind = KIND_LOCAL; } return al->linkage; } } else { ! alpha_links = splay_tree_new ((splay_tree_compare_fn) strcmp, ! (splay_tree_delete_key_fn) free, ! (splay_tree_delete_key_fn) free); ! ggc_add_root (&alpha_links, 1, 1, mark_alpha_links); } al = (struct alpha_links *) xmalloc (sizeof (struct alpha_links)); name = xstrdup (name); /* Assume external if no definition. */ ! al->kind = (is_local ? KIND_UNUSED : KIND_EXTERN); /* Ensure we have an IDENTIFIER so assemble_name can mark it used. */ get_identifier (name); --- 9016,9082 ---- { splay_tree_node node; struct alpha_links *al; + struct alpha_funcs *cfaf; if (name[0] == '*') name++; ! if (is_local) ! { ! alpha_funcs_tree = splay_tree_new ! ((splay_tree_compare_fn) splay_tree_compare_pointers, ! (splay_tree_delete_key_fn) free, ! (splay_tree_delete_key_fn) free); ! ! cfaf = (struct alpha_funcs *) xmalloc (sizeof (struct alpha_funcs)); ! ! cfaf->links = 0; ! cfaf->num = ++alpha_funcs_num; ! ! splay_tree_insert (alpha_funcs_tree, ! (splay_tree_key) current_function_decl, ! (splay_tree_value) cfaf); ! ! } ! ! if (alpha_links_tree) { /* Is this name already defined? */ ! node = splay_tree_lookup (alpha_links_tree, (splay_tree_key) name); if (node) { al = (struct alpha_links *) node->value; if (is_local) { /* Defined here but external assumed. */ ! if (al->lkind == KIND_EXTERN) ! al->lkind = KIND_LOCAL; } else { /* Used here but unused assumed. */ ! if (al->lkind == KIND_UNUSED) ! al->lkind = KIND_LOCAL; } return al->linkage; } } else { ! alpha_links_tree = splay_tree_new ! ((splay_tree_compare_fn) strcmp, ! (splay_tree_delete_key_fn) free, ! (splay_tree_delete_key_fn) free); ! ! ggc_add_root (&alpha_links_tree, 1, 1, mark_alpha_links); } al = (struct alpha_links *) xmalloc (sizeof (struct alpha_links)); name = xstrdup (name); /* Assume external if no definition. */ ! al->lkind = (is_local ? KIND_UNUSED : KIND_EXTERN); /* Ensure we have an IDENTIFIER so assemble_name can mark it used. */ get_identifier (name); *************** alpha_need_linkage (name, is_local) *** 8296,8345 **** ggc_alloc_string (linksym, name_len + 5)); } ! splay_tree_insert (alpha_links, (splay_tree_key) name, (splay_tree_value) al); return al->linkage; } static int alpha_write_one_linkage (node, data) splay_tree_node node; void *data; { const char *const name = (const char *) node->key; ! struct alpha_links *links = (struct alpha_links *) node->value; FILE *stream = (FILE *) data; ! if (links->kind == KIND_UNUSED ! || ! TREE_SYMBOL_REFERENCED (get_identifier (name))) ! return 0; ! ! fprintf (stream, "$%s..lk:\n", name); ! if (links->kind == KIND_LOCAL) { ! /* Local and used, build linkage pair. */ ! fprintf (stream, "\t.quad %s..en\n", name); ! fprintf (stream, "\t.quad %s\n", name); } else { ! /* External and used, request linkage pair. */ ! fprintf (stream, "\t.linkage %s\n", name); } return 0; } ! void ! alpha_write_linkage (stream) ! FILE *stream; { ! if (alpha_links) { ! readonly_section (); ! fprintf (stream, "\t.align 3\n"); ! splay_tree_foreach (alpha_links, alpha_write_one_linkage, stream); } } --- 9092,9256 ---- ggc_alloc_string (linksym, name_len + 5)); } ! splay_tree_insert (alpha_links_tree, (splay_tree_key) name, (splay_tree_value) al); return al->linkage; } + rtx + alpha_use_linkage (linkage, cfundecl, lflag, rflag) + rtx linkage; + tree cfundecl; + int lflag; + int rflag; + { + splay_tree_node cfunnode; + struct alpha_funcs *cfaf; + struct alpha_links *al; + const char *name = XSTR (linkage, 0); + + cfaf = (struct alpha_funcs *) 0; + al = (struct alpha_links *) 0; + + cfunnode = splay_tree_lookup (alpha_funcs_tree, (splay_tree_key) cfundecl); + cfaf = (struct alpha_funcs *) cfunnode->value; + + if (cfaf->links) + { + splay_tree_node lnode; + + /* Is this name already defined? */ + + lnode = splay_tree_lookup (cfaf->links, (splay_tree_key) name); + if (lnode) + al = (struct alpha_links *) lnode->value; + } + else + { + cfaf->links = splay_tree_new + ((splay_tree_compare_fn) strcmp, + (splay_tree_delete_key_fn) free, + (splay_tree_delete_key_fn) free); + ggc_add_root (&cfaf->links, 1, 1, mark_alpha_links); + } + + if (!al) + { + size_t name_len; + size_t buflen; + char buf [512]; + char *linksym; + splay_tree_node node = 0; + struct alpha_links *anl; + + if (name[0] == '*') + name++; + + name_len = strlen (name); + + al = (struct alpha_links *) xmalloc (sizeof (struct alpha_links)); + al->num = cfaf->num; + + node = splay_tree_lookup (alpha_links_tree, (splay_tree_key) name); + if (node) + { + anl = (struct alpha_links *) node->value; + al->lkind = anl->lkind; + } + + sprintf (buf, "$%d..%s..lk", cfaf->num, name); + buflen = strlen (buf); + linksym = alloca (buflen + 1); + memcpy (linksym, buf, buflen + 1); + + al->linkage = gen_rtx_SYMBOL_REF + (Pmode, ggc_alloc_string (linksym, buflen + 1)); + + splay_tree_insert (cfaf->links, (splay_tree_key) name, + (splay_tree_value) al); + } + + if (rflag) + al->rkind = KIND_CODEADDR; + else + al->rkind = KIND_LINKAGE; + + if (lflag) + return gen_rtx_MEM (Pmode, plus_constant (al->linkage, 8)); + else + return al->linkage; + } + static int alpha_write_one_linkage (node, data) splay_tree_node node; void *data; { const char *const name = (const char *) node->key; ! struct alpha_links *link = (struct alpha_links *) node->value; FILE *stream = (FILE *) data; ! fprintf (stream, "$%d..%s..lk:\n", link->num, name); ! if (link->rkind == KIND_CODEADDR) { ! if (link->lkind == KIND_LOCAL) ! { ! /* Local and used */ ! fprintf (stream, "\t.quad %s..en\n", name); ! } ! else ! { ! /* External and used, request code address. */ ! fprintf (stream, "\t.code_address %s\n", name); ! } } else { ! if (link->lkind == KIND_LOCAL) ! { ! /* Local and used, build linkage pair. */ ! fprintf (stream, "\t.quad %s..en\n", name); ! fprintf (stream, "\t.quad %s\n", name); ! } ! else ! { ! /* External and used, request linkage pair. */ ! fprintf (stream, "\t.linkage %s\n", name); ! } } return 0; } ! static void ! alpha_write_linkage (stream, funname, fundecl) ! FILE *stream; ! const char *funname; ! tree fundecl; { ! splay_tree_node node; ! struct alpha_funcs *func; ! ! link_section (); ! fprintf (stream, "\t.align 3\n"); ! node = splay_tree_lookup (alpha_funcs_tree, (splay_tree_key) fundecl); ! func = (struct alpha_funcs *) node->value; ! ! fputs ("\t.name ", stream); ! assemble_name (stream, funname); ! fputs ("..na\n", stream); ! ASM_OUTPUT_LABEL (stream, funname); ! fprintf (stream, "\t.pdesc "); ! assemble_name (stream, funname); ! fprintf (stream, "..en,%s\n", ! alpha_procedure_type == PT_STACK ? "stack" ! : alpha_procedure_type == PT_REGISTER ? "reg" : "null"); ! ! if (func->links) { ! splay_tree_foreach (func->links, alpha_write_one_linkage, stream); ! /* splay_tree_delete (func->links); */ } } *************** alpha_need_linkage (name, is_local) *** 8432,8437 **** --- 9343,9358 ---- return NULL_RTX; } + rtx + alpha_use_linkage (linkage, cfundecl, lflag, rflag) + rtx linkage ATTRIBUTE_UNUSED; + tree cfundecl ATTRIBUTE_UNUSED; + int lflag ATTRIBUTE_UNUSED; + int rflag ATTRIBUTE_UNUSED; + { + return NULL_RTX; + } + #endif /* TARGET_ABI_OPEN_VMS */ #if TARGET_ABI_UNICOSMK *************** unicosmk_output_module_name (file) *** 8495,8503 **** prefix the module name with a '$' if necessary. */ if (!ISALPHA (*name)) ! fprintf (file, "$%s", name); ! else ! fputs (name, file); } /* Output text that to appear at the beginning of an assembler file. */ --- 9416,9423 ---- prefix the module name with a '$' if necessary. */ if (!ISALPHA (*name)) ! putc ('$', file); ! output_clean_symbol_name (file, name); } /* Output text that to appear at the beginning of an assembler file. */ *************** unicosmk_section_type_flags (decl, name, *** 8636,8642 **** /* Generate a section name for decl and associate it with the declaration. */ ! void unicosmk_unique_section (decl, reloc) tree decl; int reloc ATTRIBUTE_UNUSED; --- 9556,9562 ---- /* Generate a section name for decl and associate it with the declaration. */ ! static void unicosmk_unique_section (decl, reloc) tree decl; int reloc ATTRIBUTE_UNUSED; *************** unicosmk_unique_section (decl, reloc) *** 8648,8654 **** abort (); name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! STRIP_NAME_ENCODING (name, name); len = strlen (name); if (TREE_CODE (decl) == FUNCTION_DECL) --- 9568,9574 ---- abort (); name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! name = alpha_strip_name_encoding (name); len = strlen (name); if (TREE_CODE (decl) == FUNCTION_DECL) *************** unicosmk_insert_attributes (decl, attr_p *** 8716,8722 **** { if (DECL_P (decl) && (TREE_PUBLIC (decl) || TREE_CODE (decl) == FUNCTION_DECL)) ! UNIQUE_SECTION (decl, 0); } /* Output an alignment directive. We have to use the macro 'gcc@code@align' --- 9636,9642 ---- { if (DECL_P (decl) && (TREE_PUBLIC (decl) || TREE_CODE (decl) == FUNCTION_DECL)) ! unicosmk_unique_section (decl, 0); } /* Output an alignment directive. We have to use the macro 'gcc@code@align' *************** unicosmk_ssib_name () *** 8879,8886 **** x = XEXP (x, 0); if (GET_CODE (x) != SYMBOL_REF) abort (); ! fnname = XSTR (x, 0); ! STRIP_NAME_ENCODING (fnname, fnname); len = strlen (fnname); if (len + SSIB_PREFIX_LEN > 255) --- 9799,9805 ---- x = XEXP (x, 0); if (GET_CODE (x) != SYMBOL_REF) abort (); ! fnname = alpha_strip_name_encoding (XSTR (x, 0)); len = strlen (fnname); if (len + SSIB_PREFIX_LEN > 255) *************** unicosmk_output_externs (file) *** 9055,9061 **** /* We have to strip the encoding and possibly remove user_label_prefix from the identifier in order to handle -fleading-underscore and explicit asm names correctly (cf. gcc.dg/asm-names-1.c). */ ! STRIP_NAME_ENCODING (real_name, p->name); if (len && p->name[0] == '*' && !memcmp (real_name, user_label_prefix, len)) real_name += len; --- 9974,9980 ---- /* We have to strip the encoding and possibly remove user_label_prefix from the identifier in order to handle -fleading-underscore and explicit asm names correctly (cf. gcc.dg/asm-names-1.c). */ ! real_name = alpha_strip_name_encoding (p->name); if (len && p->name[0] == '*' && !memcmp (real_name, user_label_prefix, len)) real_name += len; *************** unicosmk_add_extern (name) *** 9080,9086 **** struct unicosmk_extern_list *p; p = (struct unicosmk_extern_list *) ! permalloc (sizeof (struct unicosmk_extern_list)); p->next = unicosmk_extern_head; p->name = name; unicosmk_extern_head = p; --- 9999,10005 ---- struct unicosmk_extern_list *p; p = (struct unicosmk_extern_list *) ! xmalloc (sizeof (struct unicosmk_extern_list)); p->next = unicosmk_extern_head; p->name = name; unicosmk_extern_head = p; *************** unicosmk_need_dex (x) *** 9162,9168 **** --i; } ! dex = (struct unicosmk_dex *) permalloc (sizeof (struct unicosmk_dex)); dex->name = name; dex->next = unicosmk_dex_list; unicosmk_dex_list = dex; --- 10081,10087 ---- --i; } ! dex = (struct unicosmk_dex *) xmalloc (sizeof (struct unicosmk_dex)); dex->name = name; dex->next = unicosmk_dex_list; unicosmk_dex_list = dex; *************** unicosmk_need_dex (x) *** 9230,9232 **** --- 10149,10154 ---- } #endif /* TARGET_ABI_UNICOSMK */ + + #include "gt-alpha.h" + diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/alpha.h gcc-3.3/gcc/config/alpha/alpha.h *** gcc-3.2.3/gcc/config/alpha/alpha.h 2002-05-21 23:44:50.000000000 +0000 --- gcc-3.3/gcc/config/alpha/alpha.h 2003-01-31 23:51:22.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,43 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* For C++ we need to ensure that __LANGUAGE_C_PLUS_PLUS is defined independent ! of the source file extension. */ ! #define CPLUSPLUS_CPP_SPEC "\ ! -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus \ ! %(cpp) \ ! " ! /* Write out the correct language type definition for the header files. ! Unless we have assembler language, write out the symbols for C. */ ! #define CPP_SPEC "\ ! %{!undef:\ ! %{.S:-D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY }}\ ! %{.m:-D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C }\ ! %{!.S:%{!.cc:%{!.cxx:%{!.cpp:%{!.cp:%{!.c++:%{!.C:%{!.m:-D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C }}}}}}}}}\ ! %{mieee:-D_IEEE_FP }\ ! %{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT }}\ ! %(cpp_cpu) %(cpp_subtarget)" #ifndef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "" --- 20,100 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* Target CPU builtins. */ + #define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__alpha"); \ + builtin_define ("__alpha__"); \ + builtin_assert ("cpu=alpha"); \ + builtin_assert ("machine=alpha"); \ + if (TARGET_CIX) \ + { \ + builtin_define ("__alpha_cix__"); \ + builtin_assert ("cpu=cix"); \ + } \ + if (TARGET_FIX) \ + { \ + builtin_define ("__alpha_fix__"); \ + builtin_assert ("cpu=fix"); \ + } \ + if (TARGET_BWX) \ + { \ + builtin_define ("__alpha_bwx__"); \ + builtin_assert ("cpu=bwx"); \ + } \ + if (TARGET_MAX) \ + { \ + builtin_define ("__alpha_max__"); \ + builtin_assert ("cpu=max"); \ + } \ + if (TARGET_CPU_EV6) \ + { \ + builtin_define ("__alpha_ev6__"); \ + builtin_assert ("cpu=ev6"); \ + } \ + else if (TARGET_CPU_EV5) \ + { \ + builtin_define ("__alpha_ev5__"); \ + builtin_assert ("cpu=ev5"); \ + } \ + else /* Presumably ev4. */ \ + { \ + builtin_define ("__alpha_ev4__"); \ + builtin_assert ("cpu=ev4"); \ + } \ + if (TARGET_IEEE || TARGET_IEEE_WITH_INEXACT) \ + builtin_define ("_IEEE_FP"); \ + if (TARGET_IEEE_WITH_INEXACT) \ + builtin_define ("_IEEE_FP_INEXACT"); \ + \ + /* Macros dependent on the C dialect. */ \ + SUBTARGET_LANGUAGE_CPP_BUILTINS(); \ + } while (0) ! #ifndef SUBTARGET_LANGUAGE_CPP_BUILTINS ! #define SUBTARGET_LANGUAGE_CPP_BUILTINS() \ ! do \ ! { \ ! if (preprocessing_asm_p ()) \ ! builtin_define_std ("LANGUAGE_ASSEMBLY"); \ ! else if (c_language == clk_c) \ ! builtin_define_std ("LANGUAGE_C"); \ ! else if (c_language == clk_cplusplus) \ ! { \ ! builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \ ! builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \ ! } \ ! if (flag_objc) \ ! { \ ! builtin_define ("__LANGUAGE_OBJECTIVE_C"); \ ! builtin_define ("__LANGUAGE_OBJECTIVE_C__"); \ ! } \ ! } \ ! while (0) ! #endif ! #define CPP_SPEC "%(cpp_subtarget)" #ifndef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "" *************** extern int target_flags; *** 89,94 **** --- 146,152 ---- extern enum alpha_trap_precision alpha_tp; extern enum alpha_fp_rounding_mode alpha_fprm; extern enum alpha_fp_trap_mode alpha_fptm; + extern int alpha_tls_size; /* This means that floating-point support exists in the target implementation of the Alpha architecture. This is usually the default. */ *************** extern enum alpha_fp_trap_mode alpha_fpt *** 160,165 **** --- 218,227 ---- #define MASK_SMALL_DATA (1 << 13) #define TARGET_SMALL_DATA (target_flags & MASK_SMALL_DATA) + /* This means emit thread pointer loads for kernel not user. */ + #define MASK_TLS_KERNEL (1 << 14) + #define TARGET_TLS_KERNEL (target_flags & MASK_TLS_KERNEL) + /* This means that the processor is an EV5, EV56, or PCA56. Unlike alpha_cpu this is not affected by -mtune= setting. */ #define MASK_CPU_EV5 (1 << 28) *************** extern enum alpha_fp_trap_mode alpha_fpt *** 203,208 **** --- 265,273 ---- #ifndef TARGET_FIXUP_EV5_PREFETCH #define TARGET_FIXUP_EV5_PREFETCH 0 #endif + #ifndef HAVE_AS_TLS + #define HAVE_AS_TLS 0 + #endif /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** extern enum alpha_fp_trap_mode alpha_fpt *** 245,250 **** --- 310,317 ---- N_("Emit 16-bit relocations to the small data areas")}, \ {"large-data", -MASK_SMALL_DATA, \ N_("Emit 32-bit relocations to the small data areas")}, \ + {"tls-kernel", MASK_TLS_KERNEL, \ + N_("Emit rdval instead of rduniq for thread pointer")}, \ {"", TARGET_DEFAULT | TARGET_CPU_DEFAULT \ | TARGET_DEFAULT_EXPLICIT_RELOCS, ""} } *************** extern const char *alpha_fprm_string; /* *** 268,273 **** --- 335,341 ---- extern const char *alpha_fptm_string; /* For -mfp-trap-mode=[n|u|su|sui] */ extern const char *alpha_tp_string; /* For -mtrap-precision=[p|f|i] */ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ + extern const char *alpha_tls_size_string; /* For -mtls-size= */ #define TARGET_OPTIONS \ { \ *************** extern const char *alpha_mlat_string; /* *** 283,349 **** N_("Control the precision given to fp exceptions")}, \ {"memory-latency=", &alpha_mlat_string, \ N_("Tune expected memory latency")}, \ } - /* Attempt to describe CPU characteristics to the preprocessor. */ - - /* Corresponding to amask... */ - #define CPP_AM_BWX_SPEC "-D__alpha_bwx__ -Acpu=bwx" - #define CPP_AM_MAX_SPEC "-D__alpha_max__ -Acpu=max" - #define CPP_AM_FIX_SPEC "-D__alpha_fix__ -Acpu=fix" - #define CPP_AM_CIX_SPEC "-D__alpha_cix__ -Acpu=cix" - - /* Corresponding to implver... */ - #define CPP_IM_EV4_SPEC "-D__alpha_ev4__ -Acpu=ev4" - #define CPP_IM_EV5_SPEC "-D__alpha_ev5__ -Acpu=ev5" - #define CPP_IM_EV6_SPEC "-D__alpha_ev6__ -Acpu=ev6" - - /* Common combinations. */ - #define CPP_CPU_EV4_SPEC "%(cpp_im_ev4)" - #define CPP_CPU_EV5_SPEC "%(cpp_im_ev5)" - #define CPP_CPU_EV56_SPEC "%(cpp_im_ev5) %(cpp_am_bwx)" - #define CPP_CPU_PCA56_SPEC "%(cpp_im_ev5) %(cpp_am_bwx) %(cpp_am_max)" - #define CPP_CPU_EV6_SPEC \ - "%(cpp_im_ev6) %(cpp_am_bwx) %(cpp_am_max) %(cpp_am_fix)" - #define CPP_CPU_EV67_SPEC \ - "%(cpp_im_ev6) %(cpp_am_bwx) %(cpp_am_max) %(cpp_am_fix) %(cpp_am_cix)" - - #ifndef CPP_CPU_DEFAULT_SPEC - # if TARGET_CPU_DEFAULT & MASK_CPU_EV6 - # if TARGET_CPU_DEFAULT & MASK_CIX - # define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV67_SPEC - # else - # define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV6_SPEC - # endif - # else - # if TARGET_CPU_DEFAULT & MASK_CPU_EV5 - # if TARGET_CPU_DEFAULT & MASK_MAX - # define CPP_CPU_DEFAULT_SPEC CPP_CPU_PCA56_SPEC - # else - # if TARGET_CPU_DEFAULT & MASK_BWX - # define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV56_SPEC - # else - # define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV5_SPEC - # endif - # endif - # else - # define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV4_SPEC - # endif - # endif - #endif /* CPP_CPU_DEFAULT_SPEC */ - - #ifndef CPP_CPU_SPEC - #define CPP_CPU_SPEC "\ - %{!undef:-Acpu=alpha -Amachine=alpha -D__alpha -D__alpha__ \ - %{mcpu=ev4|mcpu=21064:%(cpp_cpu_ev4) }\ - %{mcpu=ev5|mcpu=21164:%(cpp_cpu_ev5) }\ - %{mcpu=ev56|mcpu=21164a:%(cpp_cpu_ev56) }\ - %{mcpu=pca56|mcpu=21164pc|mcpu=21164PC:%(cpp_cpu_pca56) }\ - %{mcpu=ev6|mcpu=21264:%(cpp_cpu_ev6) }\ - %{mcpu=ev67|mcpu=21264a:%(cpp_cpu_ev67) }\ - %{!mcpu*:%(cpp_cpu_default) }}" - #endif - /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition is an initializer with a subgrouping for each command option. --- 351,360 ---- N_("Control the precision given to fp exceptions")}, \ {"memory-latency=", &alpha_mlat_string, \ N_("Tune expected memory latency")}, \ + {"tls-size=", &alpha_tls_size_string, \ + N_("Specify bit size of immediate TLS offsets")}, \ } /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition is an initializer with a subgrouping for each command option. *************** extern const char *alpha_mlat_string; /* *** 359,379 **** #endif #define EXTRA_SPECS \ - { "cpp_am_bwx", CPP_AM_BWX_SPEC }, \ - { "cpp_am_max", CPP_AM_MAX_SPEC }, \ - { "cpp_am_fix", CPP_AM_FIX_SPEC }, \ - { "cpp_am_cix", CPP_AM_CIX_SPEC }, \ - { "cpp_im_ev4", CPP_IM_EV4_SPEC }, \ - { "cpp_im_ev5", CPP_IM_EV5_SPEC }, \ - { "cpp_im_ev6", CPP_IM_EV6_SPEC }, \ - { "cpp_cpu_ev4", CPP_CPU_EV4_SPEC }, \ - { "cpp_cpu_ev5", CPP_CPU_EV5_SPEC }, \ - { "cpp_cpu_ev56", CPP_CPU_EV56_SPEC }, \ - { "cpp_cpu_pca56", CPP_CPU_PCA56_SPEC }, \ - { "cpp_cpu_ev6", CPP_CPU_EV6_SPEC }, \ - { "cpp_cpu_ev67", CPP_CPU_EV67_SPEC }, \ - { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \ - { "cpp_cpu", CPP_CPU_SPEC }, \ { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \ SUBTARGET_EXTRA_SPECS --- 370,375 ---- *************** extern const char *alpha_mlat_string; /* *** 409,423 **** /* target machine storage layout */ - /* Define to enable software floating point emulation. */ - #define REAL_ARITHMETIC - /* Define the size of `int'. The default is the same as the word size. */ #define INT_TYPE_SIZE 32 /* Define the size of `long long'. The default is the twice the word size. */ #define LONG_LONG_TYPE_SIZE 64 /* The two floating-point formats we support are S-floating, which is 4 bytes, and T-floating, which is 8 bytes. `float' is S and `double' and `long double' are T. */ --- 405,420 ---- /* target machine storage layout */ /* Define the size of `int'. The default is the same as the word size. */ #define INT_TYPE_SIZE 32 /* Define the size of `long long'. The default is the twice the word size. */ #define LONG_LONG_TYPE_SIZE 64 + /* We're IEEE unless someone says to use VAX. */ + #define TARGET_FLOAT_FORMAT \ + (TARGET_FLOAT_VAX ? VAX_FLOAT_FORMAT : IEEE_FLOAT_FORMAT) + /* The two floating-point formats we support are S-floating, which is 4 bytes, and T-floating, which is 8 bytes. `float' is S and `double' and `long double' are T. */ *************** extern const char *alpha_mlat_string; /* *** 474,488 **** for them. Might as well be consistent with bytes. */ #define WORDS_BIG_ENDIAN 0 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 64 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 8 --- 471,476 ---- *************** extern const char *alpha_mlat_string; /* *** 505,511 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ --- 493,499 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ *************** extern const char *alpha_mlat_string; /* *** 524,537 **** #define DATA_ALIGNMENT(EXP, ALIGN) MAX ((ALIGN), BITS_PER_WORD) #endif ! /* Set this non-zero if move instructions will actually fail to work when given unaligned data. Since we get an error message when we do one, call them invalid. */ #define STRICT_ALIGNMENT 1 ! /* Set this non-zero if unaligned move instructions are extremely slow. On the Alpha, they trap. */ --- 512,525 ---- #define DATA_ALIGNMENT(EXP, ALIGN) MAX ((ALIGN), BITS_PER_WORD) #endif ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. Since we get an error message when we do one, call them invalid. */ #define STRICT_ALIGNMENT 1 ! /* Set this nonzero if unaligned move instructions are extremely slow. On the Alpha, they trap. */ *************** extern const char *alpha_mlat_string; /* *** 640,645 **** --- 628,639 ---- ? GET_MODE_UNIT_SIZE (MODE) == 8 || GET_MODE_UNIT_SIZE (MODE) == 4 \ : 1) + /* Value is 1 if MODE is a supported vector mode. */ + + #define VECTOR_MODE_SUPPORTED_P(MODE) \ + (TARGET_MAX \ + && ((MODE) == V8QImode || (MODE) == V4HImode || (MODE) == V2SImode)) + /* A C expression that is nonzero if a value of mode MODE1 is accessible in mode MODE2 without copying. *************** extern const char *alpha_mlat_string; /* *** 719,725 **** class that represents their union. */ enum reg_class { ! NO_REGS, R24_REG, R25_REG, R27_REG, GENERAL_REGS, FLOAT_REGS, ALL_REGS, LIM_REG_CLASSES }; --- 713,719 ---- class that represents their union. */ enum reg_class { ! NO_REGS, R0_REG, R24_REG, R25_REG, R27_REG, GENERAL_REGS, FLOAT_REGS, ALL_REGS, LIM_REG_CLASSES }; *************** enum reg_class { *** 728,735 **** /* Give names of register classes as strings for dump file. */ ! #define REG_CLASS_NAMES \ ! {"NO_REGS", "R24_REG", "R25_REG", "R27_REG", \ "GENERAL_REGS", "FLOAT_REGS", "ALL_REGS" } /* Define which registers fit in which classes. --- 722,729 ---- /* Give names of register classes as strings for dump file. */ ! #define REG_CLASS_NAMES \ ! {"NO_REGS", "R0_REG", "R24_REG", "R25_REG", "R27_REG", \ "GENERAL_REGS", "FLOAT_REGS", "ALL_REGS" } /* Define which registers fit in which classes. *************** enum reg_class { *** 738,743 **** --- 732,738 ---- #define REG_CLASS_CONTENTS \ { {0x00000000, 0x00000000}, /* NO_REGS */ \ + {0x00000001, 0x00000000}, /* R0_REG */ \ {0x01000000, 0x00000000}, /* R24_REG */ \ {0x02000000, 0x00000000}, /* R25_REG */ \ {0x08000000, 0x00000000}, /* R27_REG */ \ *************** enum reg_class { *** 751,757 **** or could index an array. */ #define REGNO_REG_CLASS(REGNO) \ ! ((REGNO) == 24 ? R24_REG \ : (REGNO) == 25 ? R25_REG \ : (REGNO) == 27 ? R27_REG \ : (REGNO) >= 32 && (REGNO) <= 62 ? FLOAT_REGS \ --- 746,753 ---- or could index an array. */ #define REGNO_REG_CLASS(REGNO) \ ! ((REGNO) == 0 ? R0_REG \ ! : (REGNO) == 24 ? R24_REG \ : (REGNO) == 25 ? R25_REG \ : (REGNO) == 27 ? R27_REG \ : (REGNO) >= 32 && (REGNO) <= 62 ? FLOAT_REGS \ *************** enum reg_class { *** 768,773 **** --- 764,770 ---- : (C) == 'b' ? R25_REG \ : (C) == 'c' ? R27_REG \ : (C) == 'f' ? FLOAT_REGS \ + : (C) == 'v' ? R0_REG \ : NO_REGS) /* Define this macro to change register usage conditional on target flags. */ *************** enum reg_class { *** 811,817 **** 'T' is a HIGH. ! 'U' is a symbolic operand. */ #define EXTRA_CONSTRAINT alpha_extra_constraint --- 808,816 ---- 'T' is a HIGH. ! 'U' is a symbolic operand. ! ! 'W' is a vector zero. */ #define EXTRA_CONSTRAINT alpha_extra_constraint *************** enum reg_class { *** 858,872 **** #define CLASS_MAX_NREGS(CLASS, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* If defined, gives a class of registers that cannot be used as the ! operand of a SUBREG that changes the mode of the object illegally. */ ! ! #define CLASS_CANNOT_CHANGE_MODE FLOAT_REGS ! ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ ! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) /* Define the cost of moving between registers of various classes. Moving between FLOAT_REGS and anything else except float regs is expensive. --- 857,867 ---- #define CLASS_MAX_NREGS(CLASS, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* Return the class of registers that cannot change mode from FROM to TO. */ ! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ ! ? reg_classes_intersect_p (FLOAT_REGS, CLASS) : 0) /* Define the cost of moving between registers of various classes. Moving between FLOAT_REGS and anything else except float regs is expensive. *************** extern int alpha_memory_latency; *** 1172,1183 **** /* We do not allow indirect calls to be optimized into sibling calls, nor can we allow a call to a function in a different compilation unit to ! be optimized into a sibcall. Except if the function is known not to ! return, in which case our caller doesn't care what the gp is. */ #define FUNCTION_OK_FOR_SIBCALL(DECL) \ (DECL \ ! && ((TREE_ASM_WRITTEN (DECL) && !flag_pic) \ ! || ! TREE_PUBLIC (DECL))) /* Try to output insns to set TARGET equal to the constant C if it can be done in less than N insns. Do all computations in MODE. Returns the place --- 1167,1177 ---- /* We do not allow indirect calls to be optimized into sibling calls, nor can we allow a call to a function in a different compilation unit to ! be optimized into a sibcall. */ #define FUNCTION_OK_FOR_SIBCALL(DECL) \ (DECL \ ! && (! TREE_PUBLIC (DECL) \ ! || (TREE_ASM_WRITTEN (DECL) && (*targetm.binds_local_p) (DECL)))) /* Try to output insns to set TARGET equal to the constant C if it can be done in less than N insns. Do all computations in MODE. Returns the place *************** do { \ *** 1474,1480 **** #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TImode) /* Nonzero if access to memory by bytes is no faster than for words. ! Also non-zero if doing byte operations (specifically shifts) in registers is undesirable. On the Alpha, we want to not use the byte operation and instead use --- 1468,1474 ---- #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TImode) /* Nonzero if access to memory by bytes is no faster than for words. ! Also nonzero if doing byte operations (specifically shifts) in registers is undesirable. On the Alpha, we want to not use the byte operation and instead use *************** do { \ *** 1730,1789 **** #define DATA_SECTION_ASM_OP "\t.data" - /* Define an extra section for read-only data, a routine to enter it, and - indicate that it is for read-only data. - - The first time we enter the readonly data section for a file, we write - eight bytes of zero. This works around a bug in DEC's assembler in - some versions of OSF/1 V3.x. */ - - #define EXTRA_SECTIONS readonly_data - - #define EXTRA_SECTION_FUNCTIONS \ - void \ - literal_section () \ - { \ - if (in_section != readonly_data) \ - { \ - static int firsttime = 1; \ - \ - fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \ - if (firsttime) \ - { \ - firsttime = 0; \ - assemble_aligned_integer (8, const0_rtx); \ - } \ - \ - in_section = readonly_data; \ - } \ - } \ - - #define READONLY_DATA_SECTION literal_section - - /* Define this macro if references to a symbol must be treated differently - depending on something about the variable or function named by the symbol - (such as what section it is in). */ - - #define ENCODE_SECTION_INFO(DECL) alpha_encode_section_info (DECL) - - /* If a variable is weakened, made one only or moved into a different - section, it may be necessary to redo the section info to move the - variable out of sdata. */ - - #define REDO_SECTION_INFO_P(DECL) \ - ((TREE_CODE (DECL) == VAR_DECL) \ - && (DECL_ONE_ONLY (DECL) || DECL_WEAK (DECL) || DECL_COMMON (DECL) \ - || DECL_SECTION_NAME (DECL) != 0)) - - #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ - do { \ - (VAR) = (SYMBOL_NAME); \ - if ((VAR)[0] == '@') \ - (VAR) += 2; \ - if ((VAR)[0] == '*') \ - (VAR)++; \ - } while (0) - /* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */ --- 1724,1729 ---- *************** do { \ *** 1802,1808 **** #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ do { \ const char *name_ = NAME; \ ! if (*name_ == '@') \ name_ += 2; \ if (*name_ == '*') \ name_++; \ --- 1742,1748 ---- #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ do { \ const char *name_ = NAME; \ ! if (*name_ == '@' || *name_ == '%') \ name_ += 2; \ if (*name_ == '*') \ name_++; \ *************** do { \ *** 1811,1827 **** fputs (name_, STREAM); \ } while (0) ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) /* The prefix to add to user-visible assembler symbols. */ --- 1751,1758 ---- fputs (name_, STREAM); \ } while (0) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* The prefix to add to user-visible assembler symbols. */ *************** do { \ *** 1848,1858 **** #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM)) - /* Check a floating-point value for validity for a particular machine mode. */ - - #define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \ - ((OVERFLOW) = check_float_value (MODE, &D, OVERFLOW)) - /* We use the default ASCII-output routine, except that we don't write more than 50 characters since the assembler doesn't support very long lines. */ --- 1779,1784 ---- *************** do { \ *** 1985,1991 **** #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \ ! || (CODE) == '#' || (CODE) == '*') /* Print a memory address as an operand to reference that memory location. */ --- 1911,1917 ---- #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \ ! || (CODE) == '#' || (CODE) == '*' || (CODE) == '&') /* Print a memory address as an operand to reference that memory location. */ *************** do { \ *** 1995,2003 **** /* Define the codes that are matched by predicates in alpha.c. */ #define PREDICATE_CODES \ ! {"reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \ {"reg_or_6bit_operand", {SUBREG, REG, CONST_INT}}, \ {"reg_or_8bit_operand", {SUBREG, REG, CONST_INT}}, \ {"cint8_operand", {CONST_INT}}, \ {"reg_or_cint_operand", {SUBREG, REG, CONST_INT}}, \ {"add_operand", {SUBREG, REG, CONST_INT}}, \ --- 1921,1931 ---- /* Define the codes that are matched by predicates in alpha.c. */ #define PREDICATE_CODES \ ! {"reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, \ ! CONST_VECTOR}}, \ {"reg_or_6bit_operand", {SUBREG, REG, CONST_INT}}, \ {"reg_or_8bit_operand", {SUBREG, REG, CONST_INT}}, \ + {"reg_or_const_int_operand", {SUBREG, REG, CONST_INT}}, \ {"cint8_operand", {CONST_INT}}, \ {"reg_or_cint_operand", {SUBREG, REG, CONST_INT}}, \ {"add_operand", {SUBREG, REG, CONST_INT}}, \ *************** do { \ *** 2008,2031 **** {"mode_mask_operand", {CONST_INT}}, \ {"mul8_operand", {CONST_INT}}, \ {"mode_width_operand", {CONST_INT}}, \ - {"reg_or_fp0_operand", {SUBREG, REG, CONST_DOUBLE}}, \ {"alpha_comparison_operator", {EQ, LE, LT, LEU, LTU}}, \ {"alpha_zero_comparison_operator", {EQ, NE, LE, LT, LEU, LTU}}, \ {"alpha_swapped_comparison_operator", {EQ, GE, GT, GEU, GTU}}, \ {"signed_comparison_operator", {EQ, NE, LE, LT, GE, GT}}, \ {"alpha_fp_comparison_operator", {EQ, LE, LT, UNORDERED}}, \ {"divmod_operator", {DIV, MOD, UDIV, UMOD}}, \ ! {"fp0_operand", {CONST_DOUBLE}}, \ {"current_file_function_operand", {SYMBOL_REF}}, \ {"direct_call_operand", {SYMBOL_REF}}, \ {"local_symbolic_operand", {SYMBOL_REF, CONST, LABEL_REF}}, \ {"small_symbolic_operand", {SYMBOL_REF, CONST}}, \ {"global_symbolic_operand", {SYMBOL_REF, CONST}}, \ {"call_operand", {REG, SYMBOL_REF}}, \ {"input_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \ ! SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \ {"some_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \ ! SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \ {"some_ni_operand", {SUBREG, REG, MEM}}, \ {"aligned_memory_operand", {MEM}}, \ {"unaligned_memory_operand", {MEM}}, \ --- 1936,1964 ---- {"mode_mask_operand", {CONST_INT}}, \ {"mul8_operand", {CONST_INT}}, \ {"mode_width_operand", {CONST_INT}}, \ {"alpha_comparison_operator", {EQ, LE, LT, LEU, LTU}}, \ {"alpha_zero_comparison_operator", {EQ, NE, LE, LT, LEU, LTU}}, \ {"alpha_swapped_comparison_operator", {EQ, GE, GT, GEU, GTU}}, \ {"signed_comparison_operator", {EQ, NE, LE, LT, GE, GT}}, \ {"alpha_fp_comparison_operator", {EQ, LE, LT, UNORDERED}}, \ {"divmod_operator", {DIV, MOD, UDIV, UMOD}}, \ ! {"const0_operand", {CONST_INT, CONST_DOUBLE, CONST_VECTOR}}, \ {"current_file_function_operand", {SYMBOL_REF}}, \ {"direct_call_operand", {SYMBOL_REF}}, \ {"local_symbolic_operand", {SYMBOL_REF, CONST, LABEL_REF}}, \ {"small_symbolic_operand", {SYMBOL_REF, CONST}}, \ {"global_symbolic_operand", {SYMBOL_REF, CONST}}, \ + {"dtp16_symbolic_operand", {CONST}}, \ + {"dtp32_symbolic_operand", {CONST}}, \ + {"gotdtp_symbolic_operand", {CONST}}, \ + {"tp16_symbolic_operand", {CONST}}, \ + {"tp32_symbolic_operand", {CONST}}, \ + {"gottp_symbolic_operand", {CONST}}, \ {"call_operand", {REG, SYMBOL_REF}}, \ {"input_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \ ! CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}},\ {"some_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \ ! CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \ {"some_ni_operand", {SUBREG, REG, MEM}}, \ {"aligned_memory_operand", {MEM}}, \ {"unaligned_memory_operand", {MEM}}, \ *************** do { \ *** 2045,2052 **** (VALIST) = alpha_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! alpha_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 1978,1985 ---- (VALIST) = alpha_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! alpha_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** do { \ *** 2061,2069 **** /* Definitions for debugging. */ ! #define SDB_DEBUGGING_INFO /* generate info for mips-tfile */ ! #define DBX_DEBUGGING_INFO /* generate embedded stabs */ ! #define MIPS_DEBUGGING_INFO /* MIPS specific debugging info */ #ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG --- 1994,2002 ---- /* Definitions for debugging. */ ! #define SDB_DEBUGGING_INFO 1 /* generate info for mips-tfile */ ! #define DBX_DEBUGGING_INFO 1 /* generate embedded stabs */ ! #define MIPS_DEBUGGING_INFO 1 /* MIPS specific debugging info */ #ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG *************** do { \ *** 2201,2208 **** /* Generate calls to memcpy, etc., not bcopy, etc. */ #define TARGET_MEM_FUNCTIONS 1 - - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - alpha_output_mi_thunk_osf (FILE, THUNK_FNDECL, DELTA, FUNCTION) --- 2134,2136 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/alpha-interix.h gcc-3.3/gcc/config/alpha/alpha-interix.h *** gcc-3.2.3/gcc/config/alpha/alpha-interix.h 2001-11-15 17:55:26.000000000 +0000 --- gcc-3.3/gcc/config/alpha/alpha-interix.h 2002-07-23 21:58:56.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler, for DEC Alpha running Windows/NT. ! Copyright (C) 1995, 1996, 1999, 2000 Free Software Foundation, Inc. Donn Terry, Softway Systems, Inc. From code --- 1,6 ---- /* Definitions of target machine for GNU compiler, for DEC Alpha running Windows/NT. ! Copyright (C) 1995, 1996, 1999, 2000, 2002 Free Software Foundation, Inc. Donn Terry, Softway Systems, Inc. From code *************** Boston, MA 02111-1307, USA. */ *** 25,39 **** /* cpp handles __STDC__ */ /* The three "Alpha" defines on the first such line are from the CLAXP spec */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES " \ ! -D__INTERIX \ ! -D__OPENNT \ ! -D__Alpha_AXP -D_M_ALPHA -D_ALPHA_ \ ! -D__alpha -D__alpha__\ ! -D__stdcall= \ ! -D__cdecl= \ ! -Asystem=unix -Asystem=interix -Acpu=alpha -Amachine=alpha" #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "\ --- 25,42 ---- /* cpp handles __STDC__ */ /* The three "Alpha" defines on the first such line are from the CLAXP spec */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__INTERIX"); \ ! builtin_define ("__OPENNT"); \ ! builtin_define ("__Alpha_AXP"); \ ! builtin_define ("_M_ALPHA"); \ ! builtin_define ("_ALPHA_"); \ ! builtin_define ("__stdcall="); \ ! builtin_define ("__cdecl="); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=interix"); \ ! } while (0) #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "\ *************** Boston, MA 02111-1307, USA. */ *** 64,80 **** /* The following are needed for C++, but also needed for profiling */ ! /* Support const sections and the ctors and dtors sections for g++. ! Note that there appears to be two different ways to support const ! sections at the moment. You can either #define the symbol ! READONLY_DATA_SECTION (giving it some code which switches to the ! readonly data section) or else you can #define the symbols ! EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and ! SELECT_RTX_SECTION. We do both here just to be on the safe side. */ ! ! #define USE_CONST_SECTION 1 ! #define CONST_SECTION_ASM_OP "\t.rdata" /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. --- 67,75 ---- /* The following are needed for C++, but also needed for profiling */ ! /* Support const sections and the ctors and dtors sections for g++. */ ! #define READONLY_DATA_SECTION_ASM_OP "\t.rdata" /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. *************** Boston, MA 02111-1307, USA. */ *** 94,131 **** #define CTORS_SECTION_ASM_OP "\t.ctors" #define DTORS_SECTION_ASM_OP "\t.dtors" - /* A default list of other sections which we might be "in" at any given - time. For targets that use additional sections (e.g. .tdesc) you - should override this definition in the target-specific file which - includes this file. */ - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS in_const - - /* A default list of extra section function definitions. For targets - that use additional sections (e.g. .tdesc) you should override this - definition in the target-specific file which includes this file. */ - - #undef EXTRA_SECTION_FUNCTIONS - #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION - - #undef READONLY_DATA_SECTION - #define READONLY_DATA_SECTION() const_section () - - #define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - if (!USE_CONST_SECTION) \ - text_section(); \ - else if (in_section != in_const) \ - { \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ - in_section = in_const; \ - } \ - } - /* The linker will take care of this, and having them causes problems with ld -r (specifically -rU). */ #define CTOR_LISTS_DEFINED_EXTERNALLY 1 --- 89,94 ---- *************** while (0) *** 185,199 **** fprintf (FILE, "\t.globl\t__fltused\n"); \ ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \ } - - /* The current Interix assembler (consistent with the DEC documentation) - uses a=b NOT .set a,b; .set is for assembler options. */ - #undef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL - #define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \ - do { \ - assemble_name (FILE, SY); \ - fputc ('=', FILE); \ - assemble_name (FILE, HI); \ - fputc ('-', FILE); \ - assemble_name (FILE, LO); \ - } while (0) --- 148,150 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/alpha.md gcc-3.3/gcc/config/alpha/alpha.md *** gcc-3.2.3/gcc/config/alpha/alpha.md 2003-02-22 01:58:21.000000000 +0000 --- gcc-3.3/gcc/config/alpha/alpha.md 2003-03-30 19:02:56.000000000 +0000 *************** *** 1,6 **** ;; Machine description for DEC Alpha for GNU C compiler ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! ;; 2000, 2001, 2003 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; ;; This file is part of GNU CC. --- 1,6 ---- ;; Machine description for DEC Alpha for GNU C compiler ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! ;; 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; ;; This file is part of GNU CC. *************** *** 40,45 **** --- 40,63 ---- (UNSPEC_LITUSE 12) (UNSPEC_SIBCALL 13) (UNSPEC_SYMBOL 14) + + ;; TLS Support + (UNSPEC_TLSGD_CALL 15) + (UNSPEC_TLSLDM_CALL 16) + (UNSPEC_TLSGD 17) + (UNSPEC_TLSLDM 18) + (UNSPEC_DTPREL 19) + (UNSPEC_TPREL 20) + (UNSPEC_TP 21) + + ;; Builtins + (UNSPEC_CMPBGE 22) + (UNSPEC_ZAP 23) + (UNSPEC_AMASK 24) + (UNSPEC_IMPLVER 25) + (UNSPEC_PERR 26) + (UNSPEC_CTLZ 27) + (UNSPEC_CTPOP 28) ]) ;; UNSPEC_VOLATILE: *************** *** 57,62 **** --- 75,82 ---- (UNSPECV_FORCE_MOV 9) (UNSPECV_LDGP1 10) (UNSPECV_PLDGP2 11) ; prologue ldgp + (UNSPECV_SET_TP 12) + (UNSPECV_RPCC 13) ]) ;; Where necessary, the suffixes _le and _be are used to distinguish between *************** *** 77,84 **** ;; separately. (define_attr "type" ! "ild,fld,ldsym,ist,fst,ibr,fbr,jsr,iadd,ilog,shift,icmov,fcmov,icmp,imul,\ ! fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (const_string "iadd")) ;; Describe a user's asm statement. --- 97,104 ---- ;; separately. (define_attr "type" ! "ild,fld,ldsym,ist,fst,ibr,callpal,fbr,jsr,iadd,ilog,shift,icmov,fcmov,icmp,imul,\ ! fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" (const_string "iadd")) ;; Describe a user's asm statement. *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 122,435 **** (define_attr "length" "" (const_int 4)) - - ;; On EV4 there are two classes of resources to consider: resources needed - ;; to issue, and resources needed to execute. IBUS[01] are in the first - ;; category. ABOX, BBOX, EBOX, FBOX, IMUL & FDIV make up the second. - ;; (There are a few other register-like resources, but ...) ! ; First, describe all of the issue constraints with single cycle delays. ! ; All insns need a bus, but all except loads require one or the other. ! (define_function_unit "ev4_ibus0" 1 0 ! (and (eq_attr "cpu" "ev4") ! (eq_attr "type" "fst,fbr,iadd,imul,ilog,shift,icmov,icmp")) ! 1 1) ! ! (define_function_unit "ev4_ibus1" 1 0 ! (and (eq_attr "cpu" "ev4") ! (eq_attr "type" "ist,ibr,jsr,fadd,fcmov,fcpys,fmul,fdiv,misc")) ! 1 1) ! ! ; Memory delivers its result in three cycles. Actually return one and ! ; take care of this in adjust_cost, since we want to handle user-defined ! ; memory latencies. ! (define_function_unit "ev4_abox" 1 0 ! (and (eq_attr "cpu" "ev4") ! (eq_attr "type" "ild,fld,ldsym,ist,fst")) ! 1 1) ! ! ; Branches have no delay cost, but do tie up the unit for two cycles. ! (define_function_unit "ev4_bbox" 1 1 ! (and (eq_attr "cpu" "ev4") ! (eq_attr "type" "ibr,fbr,jsr")) ! 2 2) ! ! ; Arithmetic insns are normally have their results available after ! ; two cycles. There are a number of exceptions. They are encoded in ! ; ADJUST_COST. Some of the other insns have similar exceptions. ! (define_function_unit "ev4_ebox" 1 0 ! (and (eq_attr "cpu" "ev4") ! (eq_attr "type" "iadd,ilog,shift,icmov,icmp,misc")) ! 2 1) ! ! (define_function_unit "imul" 1 0 ! (and (eq_attr "cpu" "ev4") ! (and (eq_attr "type" "imul") ! (eq_attr "opsize" "si"))) ! 21 19) ! ! (define_function_unit "imul" 1 0 ! (and (eq_attr "cpu" "ev4") ! (and (eq_attr "type" "imul") ! (eq_attr "opsize" "!si"))) ! 23 21) ! ! (define_function_unit "ev4_fbox" 1 0 ! (and (eq_attr "cpu" "ev4") ! (eq_attr "type" "fadd,fmul,fcpys,fcmov")) ! 6 1) ! ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ev4") ! (and (eq_attr "type" "fdiv") ! (eq_attr "opsize" "si"))) ! 34 30) ! ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ev4") ! (and (eq_attr "type" "fdiv") ! (eq_attr "opsize" "di"))) ! 63 59) ! ! ;; EV5 scheduling. EV5 can issue 4 insns per clock. ! ;; ! ;; EV5 has two asymetric integer units. Model this with E0 & E1 along ! ;; with the combined resource EBOX. ! ! (define_function_unit "ev5_ebox" 2 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "!fbr,fcmov,fadd,fmul,fcpys,fdiv")) ! 1 1) ! ! ; Memory takes at least 2 clocks. Return one from here and fix up with ! ; user-defined latencies in adjust_cost. ! (define_function_unit "ev5_ebox" 2 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "ild,fld,ldsym")) ! 1 1) ! ! ; Loads can dual issue with one another, but loads and stores do not mix. ! (define_function_unit "ev5_e0" 1 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "ild,fld,ldsym")) ! 1 1 ! [(eq_attr "type" "ist,fst")]) ! ! ; Stores, shifts, multiplies can only issue to E0 ! (define_function_unit "ev5_e0" 1 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "ist,fst,shift,imul")) ! 1 1) ! ! ; Motion video insns also issue only to E0, and take two ticks. ! (define_function_unit "ev5_e0" 1 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "mvi")) ! 2 1) ! ! ; Conditional moves always take 2 ticks. ! (define_function_unit "ev5_ebox" 2 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "icmov")) ! 2 1) ! ! ; Branches can only issue to E1 ! (define_function_unit "ev5_e1" 1 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "ibr,jsr")) ! 1 1) ! ! ; Multiplies also use the integer multiplier. ! ; ??? How to: "No instruction can be issued to pipe E0 exactly two ! ; cycles before an integer multiplication completes." ! (define_function_unit "imul" 1 0 ! (and (eq_attr "cpu" "ev5") ! (and (eq_attr "type" "imul") ! (eq_attr "opsize" "si"))) ! 8 4) ! ! (define_function_unit "imul" 1 0 ! (and (eq_attr "cpu" "ev5") ! (and (eq_attr "type" "imul") ! (eq_attr "opsize" "di"))) ! 12 8) ! ! (define_function_unit "imul" 1 0 ! (and (eq_attr "cpu" "ev5") ! (and (eq_attr "type" "imul") ! (eq_attr "opsize" "udi"))) ! 14 8) ! ! ;; Similarly for the FPU we have two asymetric units. But fcpys can issue ! ;; on either so we have to play the game again. ! ! (define_function_unit "ev5_fbox" 2 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "fadd,fcmov,fmul,fcpys,fbr,fdiv")) ! 4 1) ! ! (define_function_unit "ev5_fm" 1 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "fmul")) ! 4 1) ! ! ; Add and cmov as you would expect; fbr never produces a result; ! ; fdiv issues through fa to the divider, ! (define_function_unit "ev5_fa" 1 0 ! (and (eq_attr "cpu" "ev5") ! (eq_attr "type" "fadd,fcmov,fbr,fdiv")) ! 4 1) ! ; ??? How to: "No instruction can be issued to pipe FA exactly five ! ; cycles before a floating point divide completes." ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ev5") ! (and (eq_attr "type" "fdiv") ! (eq_attr "opsize" "si"))) ! 15 15) ; 15 to 31 data dependent - (define_function_unit "fdiv" 1 0 - (and (eq_attr "cpu" "ev5") - (and (eq_attr "type" "fdiv") - (eq_attr "opsize" "di"))) - 22 22) ; 22 to 60 data dependent ! ;; EV6 scheduling. EV6 can issue 4 insns per clock. ! ;; ! ;; EV6 has two symmetric pairs ("clusters") of two asymetric integer units ! ;; ("upper" and "lower"), yielding pipe names U0, U1, L0, L1. ! ! ;; Conditional moves decompose into two independent primitives, each ! ;; taking one cycle. Since ev6 is out-of-order, we can't see anything ! ;; but two cycles. ! (define_function_unit "ev6_ebox" 4 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "icmov")) ! 2 1) ! ! (define_function_unit "ev6_ebox" 4 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "!fbr,fcmov,fadd,fmul,fcpys,fdiv,fsqrt")) ! 1 1) ! ! ;; Integer loads take at least 3 clocks, and only issue to lower units. ! ;; Return one from here and fix up with user-defined latencies in adjust_cost. ! (define_function_unit "ev6_l" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "ild,ldsym,ist,fst")) ! 1 1) ! ! ;; FP loads take at least 4 clocks. Return two from here... ! (define_function_unit "ev6_l" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "fld")) ! 2 1) ! ! ;; Motion video insns also issue only to U0, and take three ticks. ! (define_function_unit "ev6_u0" 1 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "mvi")) ! 3 1) ! ! (define_function_unit "ev6_u" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "mvi")) ! 3 1) ! ! ;; Shifts issue to either upper pipe. ! (define_function_unit "ev6_u" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "shift")) ! 1 1) ! ! ;; Multiplies issue only to U1, and all take 7 ticks. ! ;; Rather than create a new function unit just for U1, reuse IMUL ! (define_function_unit "imul" 1 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "imul")) ! 7 1) ! ! (define_function_unit "ev6_u" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "imul")) ! 7 1) ! ! ;; Branches issue to either upper pipe ! (define_function_unit "ev6_u" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "ibr")) ! 3 1) ! ! ;; Calls only issue to L0. ! (define_function_unit "ev6_l0" 1 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "jsr")) ! 1 1) ! ! (define_function_unit "ev6_l" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "jsr")) ! 1 1) ! ! ;; Ftoi/itof only issue to lower pipes ! (define_function_unit "ev6_l" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "ftoi")) ! 3 1) ! ! (define_function_unit "ev6_l" 2 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "itof")) ! 4 1) ! ! ;; For the FPU we are very similar to EV5, except there's no insn that ! ;; can issue to fm & fa, so we get to leave that out. ! ! (define_function_unit "ev6_fm" 1 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "fmul")) ! 4 1) ! ! (define_function_unit "ev6_fa" 1 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "fadd,fcpys,fbr,fdiv,fsqrt")) ! 4 1) ! ! (define_function_unit "ev6_fa" 1 0 ! (and (eq_attr "cpu" "ev6") ! (eq_attr "type" "fcmov")) ! 8 1) ! ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ev6") ! (and (eq_attr "type" "fdiv") ! (eq_attr "opsize" "si"))) ! 12 10) ! ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ev6") ! (and (eq_attr "type" "fdiv") ! (eq_attr "opsize" "di"))) ! 15 13) ! ! (define_function_unit "fsqrt" 1 0 ! (and (eq_attr "cpu" "ev6") ! (and (eq_attr "type" "fsqrt") ! (eq_attr "opsize" "si"))) ! 16 14) ! ! (define_function_unit "fsqrt" 1 0 ! (and (eq_attr "cpu" "ev6") ! (and (eq_attr "type" "fsqrt") ! (eq_attr "opsize" "di"))) ! 32 30) ! ! ; ??? The FPU communicates with memory and the integer register file ! ; via two fp store units. We need a slot in the fst immediately, and ! ; a slot in LOW after the operand data is ready. At which point the ! ; data may be moved either to the store queue or the integer register ! ; file and the insn retired. ! ;; First define the arithmetic insns. Note that the 32-bit forms also ;; sign-extend. --- 142,165 ---- (define_attr "length" "" (const_int 4)) ! ;; The USEGP attribute marks instructions that have relocations that use ! ;; the GP. ! (define_attr "usegp" "no,yes" ! (cond [(eq_attr "type" "ldsym,jsr") ! (const_string "yes") ! (eq_attr "type" "ild,fld,ist,fst") ! (symbol_ref "alpha_find_lo_sum_using_gp(insn)") ! ] ! (const_string "no"))) ! ;; Include scheduling descriptions. ! ! (include "ev4.md") ! (include "ev5.md") ! (include "ev6.md") ;; First define the arithmetic insns. Note that the 32-bit forms also ;; sign-extend. *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 453,459 **** (match_operand:SI 1 "nonimmediate_operand" "r,m,*f,m")))] "! TARGET_FIX" "@ ! addl %1,$31,%0 ldl %0,%1 cvtlq %1,%0 lds %0,%1\;cvtlq %0,%0" --- 183,189 ---- (match_operand:SI 1 "nonimmediate_operand" "r,m,*f,m")))] "! TARGET_FIX" "@ ! addl $31,%1,%0 ldl %0,%1 cvtlq %1,%0 lds %0,%1\;cvtlq %0,%0" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 466,472 **** (match_operand:SI 1 "nonimmediate_operand" "r,m,*f,*f,m")))] "TARGET_FIX" "@ ! addl %1,$31,%0 ldl %0,%1 ftois %1,%0 cvtlq %1,%0 --- 196,202 ---- (match_operand:SI 1 "nonimmediate_operand" "r,m,*f,*f,m")))] "TARGET_FIX" "@ ! addl $31,%1,%0 ldl %0,%1 ftois %1,%0 cvtlq %1,%0 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 637,648 **** "" "") (define_insn "*adddi_er_high_l" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "register_operand" "r") (high:DI (match_operand:DI 2 "local_symbolic_operand" ""))))] "TARGET_EXPLICIT_RELOCS" ! "ldah %0,%2(%1)\t\t!gprelhigh") (define_split [(set (match_operand:DI 0 "register_operand" "") --- 367,421 ---- "" "") + (define_insn "*adddi_er_lo16_dtp" + [(set (match_operand:DI 0 "register_operand" "=r") + (lo_sum:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "dtp16_symbolic_operand" "")))] + "HAVE_AS_TLS" + "lda %0,%2(%1)\t\t!dtprel") + + (define_insn "*adddi_er_hi32_dtp" + [(set (match_operand:DI 0 "register_operand" "=r") + (plus:DI (match_operand:DI 1 "register_operand" "r") + (high:DI (match_operand:DI 2 "dtp32_symbolic_operand" ""))))] + "HAVE_AS_TLS" + "ldah %0,%2(%1)\t\t!dtprelhi") + + (define_insn "*adddi_er_lo32_dtp" + [(set (match_operand:DI 0 "register_operand" "=r") + (lo_sum:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "dtp32_symbolic_operand" "")))] + "HAVE_AS_TLS" + "lda %0,%2(%1)\t\t!dtprello") + + (define_insn "*adddi_er_lo16_tp" + [(set (match_operand:DI 0 "register_operand" "=r") + (lo_sum:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "tp16_symbolic_operand" "")))] + "HAVE_AS_TLS" + "lda %0,%2(%1)\t\t!tprel") + + (define_insn "*adddi_er_hi32_tp" + [(set (match_operand:DI 0 "register_operand" "=r") + (plus:DI (match_operand:DI 1 "register_operand" "r") + (high:DI (match_operand:DI 2 "tp32_symbolic_operand" ""))))] + "HAVE_AS_TLS" + "ldah %0,%2(%1)\t\t!tprelhi") + + (define_insn "*adddi_er_lo32_tp" + [(set (match_operand:DI 0 "register_operand" "=r") + (lo_sum:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "tp32_symbolic_operand" "")))] + "HAVE_AS_TLS" + "lda %0,%2(%1)\t\t!tprello") + (define_insn "*adddi_er_high_l" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "register_operand" "r") (high:DI (match_operand:DI 2 "local_symbolic_operand" ""))))] "TARGET_EXPLICIT_RELOCS" ! "ldah %0,%2(%1)\t\t!gprelhigh" ! [(set_attr "usegp" "yes")]) (define_split [(set (match_operand:DI 0 "register_operand" "") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 977,993 **** "mulqv %r1,%2,%0" [(set_attr "type" "imul")]) ! (define_insn "umuldi3_highpart" [(set (match_operand:DI 0 "register_operand" "=r") (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI ! (match_operand:DI 1 "reg_or_0_operand" "%rJ")) (zero_extend:TI ! (match_operand:DI 2 "reg_or_8bit_operand" "rI"))) (const_int 64))))] "" ! "umulh %r1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "udi")]) --- 750,780 ---- "mulqv %r1,%2,%0" [(set_attr "type" "imul")]) ! (define_expand "umuldi3_highpart" ! [(set (match_operand:DI 0 "register_operand" "") ! (truncate:DI ! (lshiftrt:TI ! (mult:TI (zero_extend:TI ! (match_operand:DI 1 "register_operand" "")) ! (match_operand:DI 2 "reg_or_8bit_operand" "")) ! (const_int 64))))] ! "" ! { ! if (REG_P (operands[2])) ! operands[2] = gen_rtx_ZERO_EXTEND (TImode, operands[2]); ! }) ! ! (define_insn "*umuldi3_highpart_reg" [(set (match_operand:DI 0 "register_operand" "=r") (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI ! (match_operand:DI 1 "register_operand" "r")) (zero_extend:TI ! (match_operand:DI 2 "register_operand" "r"))) (const_int 64))))] "" ! "umulh %1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "udi")]) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 1973,1979 **** "ext%M2l %r1,%3,%0" [(set_attr "type" "shift")]) ! ;; Combine has some strange notion of preserving existing undefined behaviour ;; in shifts larger than a word size. So capture these patterns that it ;; should have turned into zero_extracts. --- 1760,1766 ---- "ext%M2l %r1,%3,%0" [(set_attr "type" "shift")]) ! ;; Combine has some strange notion of preserving existing undefined behavior ;; in shifts larger than a word size. So capture these patterns that it ;; should have turned into zero_extracts. *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2346,2380 **** (define_insn "abssf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (abs:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "cpys $f31,%R1,%0" [(set_attr "type" "fcpys")]) (define_insn "*nabssf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (neg:SF (abs:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG"))))] "TARGET_FP" "cpysn $f31,%R1,%0" [(set_attr "type" "fadd")]) (define_insn "absdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (abs:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "cpys $f31,%R1,%0" [(set_attr "type" "fcpys")]) (define_insn "*nabsdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (neg:DF (abs:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG"))))] "TARGET_FP" "cpysn $f31,%R1,%0" [(set_attr "type" "fadd")]) (define_expand "abstf2" [(parallel [(set (match_operand:TF 0 "register_operand" "") ! (abs:TF (match_operand:TF 1 "reg_or_fp0_operand" ""))) (use (match_dup 2))])] "TARGET_HAS_XFLOATING_LIBS" { --- 2133,2167 ---- (define_insn "abssf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (abs:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cpys $f31,%R1,%0" [(set_attr "type" "fcpys")]) (define_insn "*nabssf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (neg:SF (abs:SF (match_operand:SF 1 "reg_or_0_operand" "fG"))))] "TARGET_FP" "cpysn $f31,%R1,%0" [(set_attr "type" "fadd")]) (define_insn "absdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (abs:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cpys $f31,%R1,%0" [(set_attr "type" "fcpys")]) (define_insn "*nabsdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (neg:DF (abs:DF (match_operand:DF 1 "reg_or_0_operand" "fG"))))] "TARGET_FP" "cpysn $f31,%R1,%0" [(set_attr "type" "fadd")]) (define_expand "abstf2" [(parallel [(set (match_operand:TF 0 "register_operand" "") ! (abs:TF (match_operand:TF 1 "reg_or_0_operand" ""))) (use (match_dup 2))])] "TARGET_HAS_XFLOATING_LIBS" { *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2387,2393 **** (define_insn_and_split "*abstf_internal" [(set (match_operand:TF 0 "register_operand" "=r") ! (abs:TF (match_operand:TF 1 "reg_or_fp0_operand" "rG"))) (use (match_operand:DI 2 "register_operand" "r"))] "TARGET_HAS_XFLOATING_LIBS" "#" --- 2174,2180 ---- (define_insn_and_split "*abstf_internal" [(set (match_operand:TF 0 "register_operand" "=r") ! (abs:TF (match_operand:TF 1 "reg_or_0_operand" "rG"))) (use (match_operand:DI 2 "register_operand" "r"))] "TARGET_HAS_XFLOATING_LIBS" "#" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2397,2417 **** (define_insn "negsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (neg:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "cpysn %R1,%R1,%0" [(set_attr "type" "fadd")]) (define_insn "negdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (neg:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "cpysn %R1,%R1,%0" [(set_attr "type" "fadd")]) (define_expand "negtf2" [(parallel [(set (match_operand:TF 0 "register_operand" "") ! (neg:TF (match_operand:TF 1 "reg_or_fp0_operand" ""))) (use (match_dup 2))])] "TARGET_HAS_XFLOATING_LIBS" { --- 2184,2204 ---- (define_insn "negsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (neg:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cpysn %R1,%R1,%0" [(set_attr "type" "fadd")]) (define_insn "negdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (neg:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cpysn %R1,%R1,%0" [(set_attr "type" "fadd")]) (define_expand "negtf2" [(parallel [(set (match_operand:TF 0 "register_operand" "") ! (neg:TF (match_operand:TF 1 "reg_or_0_operand" ""))) (use (match_dup 2))])] "TARGET_HAS_XFLOATING_LIBS" { *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2424,2430 **** (define_insn_and_split "*negtf_internal" [(set (match_operand:TF 0 "register_operand" "=r") ! (neg:TF (match_operand:TF 1 "reg_or_fp0_operand" "rG"))) (use (match_operand:DI 2 "register_operand" "r"))] "TARGET_HAS_XFLOATING_LIBS" "#" --- 2211,2217 ---- (define_insn_and_split "*negtf_internal" [(set (match_operand:TF 0 "register_operand" "=r") ! (neg:TF (match_operand:TF 1 "reg_or_0_operand" "rG"))) (use (match_operand:DI 2 "register_operand" "r"))] "TARGET_HAS_XFLOATING_LIBS" "#" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2434,2441 **** (define_insn "*addsf_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (plus:SF (match_operand:SF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "add%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2221,2228 ---- (define_insn "*addsf_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (plus:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "add%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2445,2452 **** (define_insn "addsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (plus:SF (match_operand:SF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "add%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2232,2239 ---- (define_insn "addsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (plus:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "add%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2456,2463 **** (define_insn "*adddf_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (plus:DF (match_operand:DF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2243,2250 ---- (define_insn "*adddf_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (plus:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2467,2474 **** (define_insn "adddf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (plus:DF (match_operand:DF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2254,2261 ---- (define_insn "adddf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (plus:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2479,2486 **** (define_insn "*adddf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") (plus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG")) ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2266,2273 ---- (define_insn "*adddf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") (plus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG")) ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2491,2499 **** (define_insn "*adddf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") (plus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "%fG")) (float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2278,2286 ---- (define_insn "*adddf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") (plus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "%fG")) (float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "add%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2519,2525 **** (define_insn "*cvtql" [(set (match_operand:SI 0 "register_operand" "=f") ! (unspec:SI [(match_operand:DI 1 "reg_or_fp0_operand" "fG")] UNSPEC_CVTQL))] "TARGET_FP" "cvtql%/ %R1,%0" --- 2306,2312 ---- (define_insn "*cvtql" [(set (match_operand:SI 0 "register_operand" "=f") ! (unspec:SI [(match_operand:DI 1 "reg_or_0_operand" "fG")] UNSPEC_CVTQL))] "TARGET_FP" "cvtql%/ %R1,%0" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2529,2535 **** (define_insn_and_split "*fix_truncdfsi_ieee" [(set (match_operand:SI 0 "memory_operand" "=m") ! (subreg:SI (fix:DI (match_operand:DF 1 "reg_or_fp0_operand" "fG")) 0)) (clobber (match_scratch:DI 2 "=&f")) (clobber (match_scratch:SI 3 "=&f"))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" --- 2316,2322 ---- (define_insn_and_split "*fix_truncdfsi_ieee" [(set (match_operand:SI 0 "memory_operand" "=m") ! (subreg:SI (fix:DI (match_operand:DF 1 "reg_or_0_operand" "fG")) 0)) (clobber (match_scratch:DI 2 "=&f")) (clobber (match_scratch:SI 3 "=&f"))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2544,2550 **** (define_insn_and_split "*fix_truncdfsi_internal" [(set (match_operand:SI 0 "memory_operand" "=m") ! (subreg:SI (fix:DI (match_operand:DF 1 "reg_or_fp0_operand" "fG")) 0)) (clobber (match_scratch:DI 2 "=f"))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "#" --- 2331,2337 ---- (define_insn_and_split "*fix_truncdfsi_internal" [(set (match_operand:SI 0 "memory_operand" "=m") ! (subreg:SI (fix:DI (match_operand:DF 1 "reg_or_0_operand" "fG")) 0)) (clobber (match_scratch:DI 2 "=f"))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "#" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2559,2565 **** (define_insn "*fix_truncdfdi_ieee" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=&f") ! (fix:DI (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") --- 2346,2352 ---- (define_insn "*fix_truncdfdi_ieee" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=&f") ! (fix:DI (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2569,2575 **** (define_insn "fix_truncdfdi2" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=f") ! (fix:DI (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") --- 2356,2362 ---- (define_insn "fix_truncdfdi2" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=f") ! (fix:DI (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2582,2588 **** (define_insn_and_split "*fix_truncsfsi_ieee" [(set (match_operand:SI 0 "memory_operand" "=m") (subreg:SI (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG"))) 0)) (clobber (match_scratch:DI 2 "=&f")) (clobber (match_scratch:SI 3 "=&f"))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" --- 2369,2375 ---- (define_insn_and_split "*fix_truncsfsi_ieee" [(set (match_operand:SI 0 "memory_operand" "=m") (subreg:SI (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG"))) 0)) (clobber (match_scratch:DI 2 "=&f")) (clobber (match_scratch:SI 3 "=&f"))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2598,2604 **** (define_insn_and_split "*fix_truncsfsi_internal" [(set (match_operand:SI 0 "memory_operand" "=m") (subreg:SI (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG"))) 0)) (clobber (match_scratch:DI 2 "=f"))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "#" --- 2385,2391 ---- (define_insn_and_split "*fix_truncsfsi_internal" [(set (match_operand:SI 0 "memory_operand" "=m") (subreg:SI (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG"))) 0)) (clobber (match_scratch:DI 2 "=f"))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "#" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2614,2620 **** (define_insn "*fix_truncsfdi_ieee" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=&f") (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") --- 2401,2407 ---- (define_insn "*fix_truncsfdi_ieee" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=&f") (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2625,2631 **** (define_insn "fix_truncsfdi2" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=f") (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG"))))] "TARGET_FP" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") --- 2412,2418 ---- (define_insn "fix_truncsfdi2" [(set (match_operand:DI 0 "reg_no_subreg_operand" "=f") (fix:DI (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG"))))] "TARGET_FP" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2752,2758 **** (define_insn "*truncdfsf2_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (float_truncate:SF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cvt%-%,%/ %R1,%0" [(set_attr "type" "fadd") --- 2539,2545 ---- (define_insn "*truncdfsf2_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (float_truncate:SF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cvt%-%,%/ %R1,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2762,2768 **** (define_insn "truncdfsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (float_truncate:SF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "cvt%-%,%/ %R1,%0" [(set_attr "type" "fadd") --- 2549,2555 ---- (define_insn "truncdfsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (float_truncate:SF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cvt%-%,%/ %R1,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2804,2811 **** (define_insn "*divsf3_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (div:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "div%,%/ %R1,%R2,%0" [(set_attr "type" "fdiv") --- 2591,2598 ---- (define_insn "*divsf3_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (div:SF (match_operand:SF 1 "reg_or_0_operand" "fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "div%,%/ %R1,%R2,%0" [(set_attr "type" "fdiv") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2816,2823 **** (define_insn "divsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (div:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "div%,%/ %R1,%R2,%0" [(set_attr "type" "fdiv") --- 2603,2610 ---- (define_insn "divsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (div:SF (match_operand:SF 1 "reg_or_0_operand" "fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "div%,%/ %R1,%R2,%0" [(set_attr "type" "fdiv") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2828,2835 **** (define_insn "*divdf3_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (div:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") --- 2615,2622 ---- (define_insn "*divdf3_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (div:DF (match_operand:DF 1 "reg_or_0_operand" "fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2839,2846 **** (define_insn "divdf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") --- 2626,2633 ---- (define_insn "divdf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (match_operand:DF 1 "reg_or_0_operand" "fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2850,2857 **** (define_insn "*divdf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG")) ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") --- 2637,2644 ---- (define_insn "*divdf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG")) ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2861,2869 **** (define_insn "*divdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") (float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") --- 2648,2656 ---- (define_insn "*divdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (match_operand:DF 1 "reg_or_0_operand" "fG") (float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2873,2880 **** (define_insn "*divdf_ext3" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG")) ! (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") --- 2660,2667 ---- (define_insn "*divdf_ext3" [(set (match_operand:DF 0 "register_operand" "=f") ! (div:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG")) ! (float_extend:DF (match_operand:SF 2 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "div%-%/ %R1,%R2,%0" [(set_attr "type" "fdiv") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2891,2898 **** (define_insn "*mulsf3_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (mult:SF (match_operand:SF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "mul%,%/ %R1,%R2,%0" [(set_attr "type" "fmul") --- 2678,2685 ---- (define_insn "*mulsf3_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (mult:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "mul%,%/ %R1,%R2,%0" [(set_attr "type" "fmul") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2902,2909 **** (define_insn "mulsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (mult:SF (match_operand:SF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "mul%,%/ %R1,%R2,%0" [(set_attr "type" "fmul") --- 2689,2696 ---- (define_insn "mulsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (mult:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "mul%,%/ %R1,%R2,%0" [(set_attr "type" "fmul") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2913,2920 **** (define_insn "*muldf3_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (mult:DF (match_operand:DF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") --- 2700,2707 ---- (define_insn "*muldf3_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (mult:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2924,2931 **** (define_insn "muldf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (mult:DF (match_operand:DF 1 "reg_or_fp0_operand" "%fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") --- 2711,2718 ---- (define_insn "muldf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (mult:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2936,2943 **** (define_insn "*muldf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") (mult:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG")) ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") --- 2723,2730 ---- (define_insn "*muldf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") (mult:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG")) ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2948,2956 **** (define_insn "*muldf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") (mult:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "%fG")) (float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") --- 2735,2743 ---- (define_insn "*muldf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") (mult:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "%fG")) (float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "mul%-%/ %R1,%R2,%0" [(set_attr "type" "fmul") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2967,2974 **** (define_insn "*subsf3_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (minus:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "sub%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2754,2761 ---- (define_insn "*subsf3_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (minus:SF (match_operand:SF 1 "reg_or_0_operand" "fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "sub%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2978,2985 **** (define_insn "subsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (minus:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG") ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "sub%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2765,2772 ---- (define_insn "subsf3" [(set (match_operand:SF 0 "register_operand" "=f") ! (minus:SF (match_operand:SF 1 "reg_or_0_operand" "fG") ! (match_operand:SF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "sub%,%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 2989,2996 **** (define_insn "*subdf3_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (minus:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2776,2783 ---- (define_insn "*subdf3_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (minus:DF (match_operand:DF 1 "reg_or_0_operand" "fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3000,3007 **** (define_insn "subdf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (minus:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2787,2794 ---- (define_insn "subdf3" [(set (match_operand:DF 0 "register_operand" "=f") ! (minus:DF (match_operand:DF 1 "reg_or_0_operand" "fG") ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3012,3019 **** (define_insn "*subdf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG")) ! (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2799,2806 ---- (define_insn "*subdf_ext1" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG")) ! (match_operand:DF 2 "reg_or_0_operand" "fG")))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3023,3031 **** (define_insn "*subdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") ! (minus:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") (float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2810,2818 ---- (define_insn "*subdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") ! (minus:DF (match_operand:DF 1 "reg_or_0_operand" "fG") (float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3036,3044 **** (define_insn "*subdf_ext3" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_fp0_operand" "fG")) (float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") --- 2823,2831 ---- (define_insn "*subdf_ext3" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (float_extend:DF ! (match_operand:SF 1 "reg_or_0_operand" "fG")) (float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "sub%-%/ %R1,%R2,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3055,3061 **** (define_insn "*sqrtsf2_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (sqrt:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && TARGET_FIX && alpha_fptm >= ALPHA_FPTM_SU" "sqrt%,%/ %R1,%0" [(set_attr "type" "fsqrt") --- 2842,2848 ---- (define_insn "*sqrtsf2_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") ! (sqrt:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && TARGET_FIX && alpha_fptm >= ALPHA_FPTM_SU" "sqrt%,%/ %R1,%0" [(set_attr "type" "fsqrt") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3066,3072 **** (define_insn "sqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (sqrt:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && TARGET_FIX" "sqrt%,%/ %R1,%0" [(set_attr "type" "fsqrt") --- 2853,2859 ---- (define_insn "sqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (sqrt:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && TARGET_FIX" "sqrt%,%/ %R1,%0" [(set_attr "type" "fsqrt") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3077,3083 **** (define_insn "*sqrtdf2_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (sqrt:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && TARGET_FIX && alpha_fptm >= ALPHA_FPTM_SU" "sqrt%-%/ %R1,%0" [(set_attr "type" "fsqrt") --- 2864,2870 ---- (define_insn "*sqrtdf2_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") ! (sqrt:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && TARGET_FIX && alpha_fptm >= ALPHA_FPTM_SU" "sqrt%-%/ %R1,%0" [(set_attr "type" "fsqrt") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3087,3093 **** (define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (sqrt:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && TARGET_FIX" "sqrt%-%/ %1,%0" [(set_attr "type" "fsqrt") --- 2874,2880 ---- (define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (sqrt:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && TARGET_FIX" "sqrt%-%/ %1,%0" [(set_attr "type" "fsqrt") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3462,3468 **** (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "maxuw4 %r1,%2,%0" ! [(set_attr "type" "shift")]) (define_expand "smaxdi3" [(set (match_dup 3) --- 3249,3255 ---- (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "maxuw4 %r1,%2,%0" ! [(set_attr "type" "mvi")]) (define_expand "smaxdi3" [(set (match_dup 3) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3647,3654 **** (define_insn "*cmpdf_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_fp0_operand" "fG") ! (match_operand:DF 3 "reg_or_fp0_operand" "fG")]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3434,3441 ---- (define_insn "*cmpdf_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_0_operand" "fG") ! (match_operand:DF 3 "reg_or_0_operand" "fG")]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3658,3665 **** (define_insn "*cmpdf_internal" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_fp0_operand" "fG") ! (match_operand:DF 3 "reg_or_fp0_operand" "fG")]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3445,3452 ---- (define_insn "*cmpdf_internal" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_0_operand" "fG") ! (match_operand:DF 3 "reg_or_0_operand" "fG")]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3670,3677 **** [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")) ! (match_operand:DF 3 "reg_or_fp0_operand" "fG")]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3457,3464 ---- [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG")) ! (match_operand:DF 3 "reg_or_0_operand" "fG")]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3682,3689 **** [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")) ! (match_operand:DF 3 "reg_or_fp0_operand" "fG")]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3469,3476 ---- [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG")) ! (match_operand:DF 3 "reg_or_0_operand" "fG")]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3693,3701 **** (define_insn "*cmpdf_ieee_ext2" [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_fp0_operand" "fG") (float_extend:DF ! (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3480,3488 ---- (define_insn "*cmpdf_ieee_ext2" [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_0_operand" "fG") (float_extend:DF ! (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3705,3713 **** (define_insn "*cmpdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_fp0_operand" "fG") (float_extend:DF ! (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3492,3500 ---- (define_insn "*cmpdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" ! [(match_operand:DF 2 "reg_or_0_operand" "fG") (float_extend:DF ! (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3718,3726 **** [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")) (float_extend:DF ! (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3505,3513 ---- [(set (match_operand:DF 0 "register_operand" "=&f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG")) (float_extend:DF ! (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3731,3739 **** [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")) (float_extend:DF ! (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") --- 3518,3526 ---- [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_fp_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG")) (float_extend:DF ! (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "cmp%-%C1%/ %R2,%R3,%0" [(set_attr "type" "fadd") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3744,3753 **** [(set (match_operand:DF 0 "register_operand" "=f,f") (if_then_else:DF (match_operator 3 "signed_comparison_operator" ! [(match_operand:DF 4 "reg_or_fp0_operand" "fG,fG") ! (match_operand:DF 2 "fp0_operand" "G,G")]) ! (match_operand:DF 1 "reg_or_fp0_operand" "fG,0") ! (match_operand:DF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 --- 3531,3540 ---- [(set (match_operand:DF 0 "register_operand" "=f,f") (if_then_else:DF (match_operator 3 "signed_comparison_operator" ! [(match_operand:DF 4 "reg_or_0_operand" "fG,fG") ! (match_operand:DF 2 "const0_operand" "G,G")]) ! (match_operand:DF 1 "reg_or_0_operand" "fG,0") ! (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3758,3767 **** [(set (match_operand:SF 0 "register_operand" "=f,f") (if_then_else:SF (match_operator 3 "signed_comparison_operator" ! [(match_operand:DF 4 "reg_or_fp0_operand" "fG,fG") ! (match_operand:DF 2 "fp0_operand" "G,G")]) ! (match_operand:SF 1 "reg_or_fp0_operand" "fG,0") ! (match_operand:SF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 --- 3545,3554 ---- [(set (match_operand:SF 0 "register_operand" "=f,f") (if_then_else:SF (match_operator 3 "signed_comparison_operator" ! [(match_operand:DF 4 "reg_or_0_operand" "fG,fG") ! (match_operand:DF 2 "const0_operand" "G,G")]) ! (match_operand:SF 1 "reg_or_0_operand" "fG,0") ! (match_operand:SF 5 "reg_or_0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3772,3781 **** [(set (match_operand:DF 0 "register_operand" "=f,f") (if_then_else:DF (match_operator 3 "signed_comparison_operator" ! [(match_operand:DF 4 "reg_or_fp0_operand" "fG,fG") ! (match_operand:DF 2 "fp0_operand" "G,G")]) ! (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG,0")) ! (match_operand:DF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 --- 3559,3568 ---- [(set (match_operand:DF 0 "register_operand" "=f,f") (if_then_else:DF (match_operator 3 "signed_comparison_operator" ! [(match_operand:DF 4 "reg_or_0_operand" "fG,fG") ! (match_operand:DF 2 "const0_operand" "G,G")]) ! (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG,0")) ! (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3787,3796 **** (if_then_else:DF (match_operator 3 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 4 "reg_or_fp0_operand" "fG,fG")) ! (match_operand:DF 2 "fp0_operand" "G,G")]) ! (match_operand:DF 1 "reg_or_fp0_operand" "fG,0") ! (match_operand:DF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 --- 3574,3583 ---- (if_then_else:DF (match_operator 3 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 4 "reg_or_0_operand" "fG,fG")) ! (match_operand:DF 2 "const0_operand" "G,G")]) ! (match_operand:DF 1 "reg_or_0_operand" "fG,0") ! (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3802,3811 **** (if_then_else:SF (match_operator 3 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 4 "reg_or_fp0_operand" "fG,fG")) ! (match_operand:DF 2 "fp0_operand" "G,G")]) ! (match_operand:SF 1 "reg_or_fp0_operand" "fG,0") ! (match_operand:SF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 --- 3589,3598 ---- (if_then_else:SF (match_operator 3 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 4 "reg_or_0_operand" "fG,fG")) ! (match_operand:DF 2 "const0_operand" "G,G")]) ! (match_operand:SF 1 "reg_or_0_operand" "fG,0") ! (match_operand:SF 5 "reg_or_0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3817,3826 **** (if_then_else:DF (match_operator 3 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 4 "reg_or_fp0_operand" "fG,fG")) ! (match_operand:DF 2 "fp0_operand" "G,G")]) ! (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG,0")) ! (match_operand:DF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 --- 3604,3613 ---- (if_then_else:DF (match_operator 3 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 4 "reg_or_0_operand" "fG,fG")) ! (match_operand:DF 2 "const0_operand" "G,G")]) ! (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG,0")) ! (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3829,3836 **** (define_expand "maxdf3" [(set (match_dup 3) ! (le:DF (match_operand:DF 1 "reg_or_fp0_operand" "") ! (match_operand:DF 2 "reg_or_fp0_operand" ""))) (set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (eq (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] --- 3616,3623 ---- (define_expand "maxdf3" [(set (match_dup 3) ! (le:DF (match_operand:DF 1 "reg_or_0_operand" "") ! (match_operand:DF 2 "reg_or_0_operand" ""))) (set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (eq (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3842,3849 **** (define_expand "mindf3" [(set (match_dup 3) ! (lt:DF (match_operand:DF 1 "reg_or_fp0_operand" "") ! (match_operand:DF 2 "reg_or_fp0_operand" ""))) (set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (ne (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] --- 3629,3636 ---- (define_expand "mindf3" [(set (match_dup 3) ! (lt:DF (match_operand:DF 1 "reg_or_0_operand" "") ! (match_operand:DF 2 "reg_or_0_operand" ""))) (set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (ne (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3855,3862 **** (define_expand "maxsf3" [(set (match_dup 3) ! (le:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "")) ! (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "")))) (set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (eq (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] --- 3642,3649 ---- (define_expand "maxsf3" [(set (match_dup 3) ! (le:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "")) ! (float_extend:DF (match_operand:SF 2 "reg_or_0_operand" "")))) (set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (eq (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3868,3875 **** (define_expand "minsf3" [(set (match_dup 3) ! (lt:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "")) ! (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "")))) (set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (ne (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] --- 3655,3662 ---- (define_expand "minsf3" [(set (match_dup 3) ! (lt:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "")) ! (float_extend:DF (match_operand:SF 2 "reg_or_0_operand" "")))) (set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (ne (match_dup 3) (match_dup 4)) (match_dup 1) (match_dup 2)))] *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3883,3890 **** [(set (pc) (if_then_else (match_operator 1 "signed_comparison_operator" ! [(match_operand:DF 2 "reg_or_fp0_operand" "fG") ! (match_operand:DF 3 "fp0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" --- 3670,3677 ---- [(set (pc) (if_then_else (match_operator 1 "signed_comparison_operator" ! [(match_operand:DF 2 "reg_or_0_operand" "fG") ! (match_operand:DF 3 "const0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3896,3903 **** (if_then_else (match_operator 1 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_fp0_operand" "fG")) ! (match_operand:DF 3 "fp0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" --- 3683,3690 ---- (if_then_else (match_operator 1 "signed_comparison_operator" [(float_extend:DF ! (match_operand:SF 2 "reg_or_0_operand" "fG")) ! (match_operand:DF 3 "const0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 3908,3915 **** ;; and compares. (define_expand "cmpdf" ! [(set (cc0) (compare (match_operand:DF 0 "reg_or_fp0_operand" "") ! (match_operand:DF 1 "reg_or_fp0_operand" "")))] "TARGET_FP" { alpha_compare.op0 = operands[0]; --- 3695,3702 ---- ;; and compares. (define_expand "cmpdf" ! [(set (cc0) (compare (match_operand:DF 0 "reg_or_0_operand" "") ! (match_operand:DF 1 "reg_or_0_operand" "")))] "TARGET_FP" { alpha_compare.op0 = operands[0]; *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 4669,4679 **** emit_move_insn (gen_rtx_REG (DImode, 25), operands[1]); if (GET_CODE (operands[0]) == SYMBOL_REF) { ! rtx linkage = alpha_need_linkage (XSTR (operands[0], 0), 0); ! emit_move_insn (gen_rtx_REG (Pmode, 26), gen_rtx_MEM (Pmode, linkage)); ! operands[2] ! = validize_mem (gen_rtx_MEM (Pmode, plus_constant (linkage, 8))); } else { --- 4456,4464 ---- emit_move_insn (gen_rtx_REG (DImode, 25), operands[1]); if (GET_CODE (operands[0]) == SYMBOL_REF) { ! alpha_need_linkage (XSTR (operands[0], 0), 0); ! operands[2] = const0_rtx; } else { *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 4771,4781 **** emit_move_insn (gen_rtx_REG (DImode, 25), operands[2]); if (GET_CODE (operands[1]) == SYMBOL_REF) { ! rtx linkage = alpha_need_linkage (XSTR (operands[1], 0), 0); ! emit_move_insn (gen_rtx_REG (Pmode, 26), gen_rtx_MEM (Pmode, linkage)); ! operands[3] ! = validize_mem (gen_rtx_MEM (Pmode, plus_constant (linkage, 8))); } else { --- 4556,4564 ---- emit_move_insn (gen_rtx_REG (DImode, 25), operands[2]); if (GET_CODE (operands[1]) == SYMBOL_REF) { ! alpha_need_linkage (XSTR (operands[1], 0), 0); ! operands[3] = const0_rtx; } else { *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 4960,4976 **** [(set_attr "type" "jsr") (set_attr "length" "*,*,12")]) (define_insn "*call_vms_1" [(call (mem:DI (match_operand:DI 0 "call_operand" "r,s")) (match_operand 1 "" "")) ! (use (match_operand:DI 2 "nonimmediate_operand" "r,m")) (use (reg:DI 25)) (use (reg:DI 26)) (clobber (reg:DI 27))] "TARGET_ABI_OPEN_VMS" ! "@ ! mov %2,$27\;jsr $26,0\;ldq $27,0($29) ! ldq $27,%2\;jsr $26,%0\;ldq $27,0($29)" [(set_attr "type" "jsr") (set_attr "length" "12,16")]) --- 4743,4773 ---- [(set_attr "type" "jsr") (set_attr "length" "*,*,12")]) + ; GAS relies on the order and position of instructions output below in order + ; to generate relocs for VMS link to potentially optimize the call. + ; Please do not molest. (define_insn "*call_vms_1" [(call (mem:DI (match_operand:DI 0 "call_operand" "r,s")) (match_operand 1 "" "")) ! (use (match_operand:DI 2 "nonmemory_operand" "r,n")) (use (reg:DI 25)) (use (reg:DI 26)) (clobber (reg:DI 27))] "TARGET_ABI_OPEN_VMS" ! "* ! { ! switch (which_alternative) ! { ! case 0: ! return \"mov %2,$27\;jsr $26,0\;ldq $27,0($29)\"; ! case 1: ! operands [2] = alpha_use_linkage (operands [0], cfun->decl, 1, 0); ! operands [3] = alpha_use_linkage (operands [0], cfun->decl, 0, 0); ! return \"ldq $26,%3\;ldq $27,%2\;jsr $26,%0\;ldq $27,0($29)\"; ! default: ! abort(); ! } ! }" [(set_attr "type" "jsr") (set_attr "length" "12,16")]) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5018,5024 **** [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] "" "" ! [(set_attr "length" "0")]) (define_insn "jump" [(set (pc) --- 4815,4822 ---- [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] "" "" ! [(set_attr "length" "0") ! (set_attr "type" "none")]) (define_insn "jump" [(set (pc) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5095,5101 **** [(unspec_volatile [(const_int 0)] UNSPECV_IMB)] "" "call_pal 0x86" ! [(set_attr "type" "ibr")]) ;; BUGCHK is documented common to OSF/1 and VMS PALcode. ;; NT does not document anything at 0x81 -- presumably it would generate --- 4893,4899 ---- [(unspec_volatile [(const_int 0)] UNSPECV_IMB)] "" "call_pal 0x86" ! [(set_attr "type" "callpal")]) ;; BUGCHK is documented common to OSF/1 and VMS PALcode. ;; NT does not document anything at 0x81 -- presumably it would generate *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5105,5111 **** [(trap_if (const_int 1) (const_int 0))] "!TARGET_ABI_WINDOWS_NT" "call_pal 0x81" ! [(set_attr "type" "ibr")]) ;; Finally, we have the basic data motion insns. The byte and word insns ;; are done via define_expand. Start with the floating-point insns, since --- 4903,4946 ---- [(trap_if (const_int 1) (const_int 0))] "!TARGET_ABI_WINDOWS_NT" "call_pal 0x81" ! [(set_attr "type" "callpal")]) ! ! ;; For userland, we load the thread pointer from the TCB. ! ;; For the kernel, we load the per-cpu private value. ! ! (define_insn "load_tp" ! [(set (match_operand:DI 0 "register_operand" "=v") ! (unspec:DI [(const_int 0)] UNSPEC_TP))] ! "TARGET_ABI_OSF" ! { ! if (TARGET_TLS_KERNEL) ! return "call_pal 0x32"; ! else ! return "call_pal 0x9e"; ! } ! [(set_attr "type" "callpal")]) ! ! ;; For completeness, and possibly a __builtin function, here's how to ! ;; set the thread pointer. Since we don't describe enough of this ! ;; quantity for CSE, we have to use a volatile unspec, and then there's ! ;; not much point in creating an R16_REG register class. ! ! (define_expand "set_tp" ! [(set (reg:DI 16) (match_operand:DI 0 "input_operand" "")) ! (unspec_volatile [(reg:DI 16)] UNSPECV_SET_TP)] ! "TARGET_ABI_OSF" ! "") ! ! (define_insn "*set_tp" ! [(unspec_volatile [(reg:DI 16)] UNSPECV_SET_TP)] ! "TARGET_ABI_OSF" ! { ! if (TARGET_TLS_KERNEL) ! return "call_pal 0x31"; ! else ! return "call_pal 0x9f"; ! } ! [(set_attr "type" "callpal")]) ;; Finally, we have the basic data motion insns. The byte and word insns ;; are done via define_expand. Start with the floating-point insns, since *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5116,5122 **** (match_operand:SF 1 "input_operand" "fG,m,*rG,m,fG,*r"))] "TARGET_FPREGS && ! TARGET_FIX && (register_operand (operands[0], SFmode) ! || reg_or_fp0_operand (operands[1], SFmode))" "@ cpys %R1,%R1,%0 ld%, %0,%1 --- 4951,4957 ---- (match_operand:SF 1 "input_operand" "fG,m,*rG,m,fG,*r"))] "TARGET_FPREGS && ! TARGET_FIX && (register_operand (operands[0], SFmode) ! || reg_or_0_operand (operands[1], SFmode))" "@ cpys %R1,%R1,%0 ld%, %0,%1 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5131,5137 **** (match_operand:SF 1 "input_operand" "fG,m,*rG,m,fG,*r,*r,f"))] "TARGET_FPREGS && TARGET_FIX && (register_operand (operands[0], SFmode) ! || reg_or_fp0_operand (operands[1], SFmode))" "@ cpys %R1,%R1,%0 ld%, %0,%1 --- 4966,4972 ---- (match_operand:SF 1 "input_operand" "fG,m,*rG,m,fG,*r,*r,f"))] "TARGET_FPREGS && TARGET_FIX && (register_operand (operands[0], SFmode) ! || reg_or_0_operand (operands[1], SFmode))" "@ cpys %R1,%R1,%0 ld%, %0,%1 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5148,5154 **** (match_operand:SF 1 "input_operand" "rG,m,r"))] "! TARGET_FPREGS && (register_operand (operands[0], SFmode) ! || reg_or_fp0_operand (operands[1], SFmode))" "@ bis $31,%r1,%0 ldl %0,%1 --- 4983,4989 ---- (match_operand:SF 1 "input_operand" "rG,m,r"))] "! TARGET_FPREGS && (register_operand (operands[0], SFmode) ! || reg_or_0_operand (operands[1], SFmode))" "@ bis $31,%r1,%0 ldl %0,%1 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5160,5166 **** (match_operand:DF 1 "input_operand" "fG,m,*rG,m,fG,*r"))] "TARGET_FPREGS && ! TARGET_FIX && (register_operand (operands[0], DFmode) ! || reg_or_fp0_operand (operands[1], DFmode))" "@ cpys %R1,%R1,%0 ld%- %0,%1 --- 4995,5001 ---- (match_operand:DF 1 "input_operand" "fG,m,*rG,m,fG,*r"))] "TARGET_FPREGS && ! TARGET_FIX && (register_operand (operands[0], DFmode) ! || reg_or_0_operand (operands[1], DFmode))" "@ cpys %R1,%R1,%0 ld%- %0,%1 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5175,5181 **** (match_operand:DF 1 "input_operand" "fG,m,*rG,m,fG,*r,*r,f"))] "TARGET_FPREGS && TARGET_FIX && (register_operand (operands[0], DFmode) ! || reg_or_fp0_operand (operands[1], DFmode))" "@ cpys %R1,%R1,%0 ld%- %0,%1 --- 5010,5016 ---- (match_operand:DF 1 "input_operand" "fG,m,*rG,m,fG,*r,*r,f"))] "TARGET_FPREGS && TARGET_FIX && (register_operand (operands[0], DFmode) ! || reg_or_0_operand (operands[1], DFmode))" "@ cpys %R1,%R1,%0 ld%- %0,%1 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5192,5198 **** (match_operand:DF 1 "input_operand" "rG,m,r"))] "! TARGET_FPREGS && (register_operand (operands[0], DFmode) ! || reg_or_fp0_operand (operands[1], DFmode))" "@ bis $31,%r1,%0 ldq %0,%1 --- 5027,5033 ---- (match_operand:DF 1 "input_operand" "rG,m,r"))] "! TARGET_FPREGS && (register_operand (operands[0], DFmode) ! || reg_or_0_operand (operands[1], DFmode))" "@ bis $31,%r1,%0 ldq %0,%1 *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5206,5212 **** [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o") (match_operand:TF 1 "input_operand" "roG,rG"))] "register_operand (operands[0], TFmode) ! || reg_or_fp0_operand (operands[1], TFmode)" "#" "reload_completed" [(set (match_dup 0) (match_dup 2)) --- 5041,5047 ---- [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o") (match_operand:TF 1 "input_operand" "roG,rG"))] "register_operand (operands[0], TFmode) ! || reg_or_0_operand (operands[1], TFmode)" "#" "reload_completed" [(set (match_dup 0) (match_dup 2)) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5227,5233 **** "" { if (GET_CODE (operands[0]) == MEM ! && ! reg_or_fp0_operand (operands[1], SFmode)) operands[1] = force_reg (SFmode, operands[1]); }) --- 5062,5068 ---- "" { if (GET_CODE (operands[0]) == MEM ! && ! reg_or_0_operand (operands[1], SFmode)) operands[1] = force_reg (SFmode, operands[1]); }) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5237,5243 **** "" { if (GET_CODE (operands[0]) == MEM ! && ! reg_or_fp0_operand (operands[1], DFmode)) operands[1] = force_reg (DFmode, operands[1]); }) --- 5072,5078 ---- "" { if (GET_CODE (operands[0]) == MEM ! && ! reg_or_0_operand (operands[1], DFmode)) operands[1] = force_reg (DFmode, operands[1]); }) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5247,5253 **** "" { if (GET_CODE (operands[0]) == MEM ! && ! reg_or_fp0_operand (operands[1], TFmode)) operands[1] = force_reg (TFmode, operands[1]); }) --- 5082,5088 ---- "" { if (GET_CODE (operands[0]) == MEM ! && ! reg_or_0_operand (operands[1], TFmode)) operands[1] = force_reg (TFmode, operands[1]); }) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5497,5503 **** return "lda %0,%2(%1)\t\t!gprel"; else return "lda %0,%2(%1)\t\t!gprellow"; ! }) (define_split [(set (match_operand:DI 0 "register_operand" "") --- 5332,5339 ---- return "lda %0,%2(%1)\t\t!gprel"; else return "lda %0,%2(%1)\t\t!gprellow"; ! } ! [(set_attr "usegp" "yes")]) (define_split [(set (match_operand:DI 0 "register_operand" "") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5585,5590 **** --- 5421,5497 ---- } }) + (define_insn "movdi_er_tlsgd" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "symbolic_operand" "") + (match_operand 3 "const_int_operand" "")] + UNSPEC_TLSGD))] + "HAVE_AS_TLS" + { + if (INTVAL (operands[3]) == 0) + return "lda %0,%2(%1)\t\t!tlsgd"; + else + return "lda %0,%2(%1)\t\t!tlsgd!%3"; + }) + + (define_insn "movdi_er_tlsldm" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r") + (match_operand 2 "const_int_operand" "")] + UNSPEC_TLSLDM))] + "HAVE_AS_TLS" + { + if (INTVAL (operands[2]) == 0) + return "lda %0,%&(%1)\t\t!tlsldm"; + else + return "lda %0,%&(%1)\t\t!tlsldm!%2"; + }) + + (define_insn "*movdi_er_gotdtp" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "symbolic_operand" "")] + UNSPEC_DTPREL))] + "HAVE_AS_TLS" + "ldq %0,%2(%1)\t\t!gotdtprel" + [(set_attr "type" "ild") + (set_attr "usegp" "yes")]) + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "gotdtp_symbolic_operand" ""))] + "HAVE_AS_TLS && reload_completed" + [(set (match_dup 0) + (unspec:DI [(match_dup 2) + (match_dup 1)] UNSPEC_DTPREL))] + { + operands[1] = XVECEXP (XEXP (operands[1], 0), 0, 0); + operands[2] = pic_offset_table_rtx; + }) + + (define_insn "*movdi_er_gottp" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "symbolic_operand" "")] + UNSPEC_TPREL))] + "HAVE_AS_TLS" + "ldq %0,%2(%1)\t\t!gottprel" + [(set_attr "type" "ild") + (set_attr "usegp" "yes")]) + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "gottp_symbolic_operand" ""))] + "HAVE_AS_TLS && reload_completed" + [(set (match_dup 0) + (unspec:DI [(match_dup 2) + (match_dup 1)] UNSPEC_TPREL))] + { + operands[1] = XVECEXP (XEXP (operands[1], 0), 0, 0); + operands[2] = pic_offset_table_rtx; + }) + (define_insn "*movdi_er_nofix" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m,*f,*f,Q") (match_operand:DI 1 "input_operand" "rJ,K,L,T,s,m,rJ,*fJ,Q,*f"))] *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5602,5608 **** fmov %R1,%0 ldt %0,%1 stt %R1,%0" ! [(set_attr "type" "ilog,iadd,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst")]) ;; The 'U' constraint matches symbolic operands on Unicos/Mk. Those should ;; have been split up by the rules above but we shouldn't reject the --- 5509,5516 ---- fmov %R1,%0 ldt %0,%1 stt %R1,%0" ! [(set_attr "type" "ilog,iadd,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst") ! (set_attr "usegp" "*,*,*,yes,*,*,*,*,*,*")]) ;; The 'U' constraint matches symbolic operands on Unicos/Mk. Those should ;; have been split up by the rules above but we shouldn't reject the *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 5649,5655 **** stt %R1,%0 ftoit %1,%0 itoft %1,%0" ! [(set_attr "type" "ilog,iadd,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst,ftoi,itof")]) (define_insn "*movdi_fix" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,r,m,*f,*f,Q,r,*f") --- 5557,5564 ---- stt %R1,%0 ftoit %1,%0 itoft %1,%0" ! [(set_attr "type" "ilog,iadd,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst,ftoi,itof") ! (set_attr "usegp" "*,*,*,yes,*,*,*,*,*,*,*,*")]) (define_insn "*movdi_fix" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,r,m,*f,*f,Q,r,*f") *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 6256,6261 **** --- 6165,6359 ---- DONE; }) + ;; Vector operations + + (define_expand "movv8qi" + [(set (match_operand:V8QI 0 "nonimmediate_operand" "") + (match_operand:V8QI 1 "general_operand" ""))] + "" + { + if (alpha_expand_mov (V8QImode, operands)) + DONE; + }) + + (define_insn "*movv8qi_fix" + [(set (match_operand:V8QI 0 "nonimmediate_operand" "=r,r,m,*f,*f,m,r,*f") + (match_operand:V8QI 1 "input_operand" "rW,m,rW,*fW,m,*f,*f,r"))] + "TARGET_FIX + && (register_operand (operands[0], V8QImode) + || reg_or_0_operand (operands[1], V8QImode))" + "@ + bis $31,%r1,%0 + ldq %0,%1 + stq %r1,%0 + cpys %R1,%R1,%0 + ldt %0,%1 + stt %R1,%0 + ftoit %1,%0 + itoft %1,%0" + [(set_attr "type" "ilog,ild,ist,fcpys,fld,fst,ftoi,itof")]) + + (define_insn "*movv8qi_nofix" + [(set (match_operand:V8QI 0 "nonimmediate_operand" "=r,r,m,*f,*f,m") + (match_operand:V8QI 1 "input_operand" "rW,m,rW,*fW,m,*f"))] + "! TARGET_FIX + && (register_operand (operands[0], V8QImode) + || reg_or_0_operand (operands[1], V8QImode))" + "@ + bis $31,%r1,%0 + ldq %0,%1 + stq %r1,%0 + cpys %R1,%R1,%0 + ldt %0,%1 + stt %R1,%0" + [(set_attr "type" "ilog,ild,ist,fcpys,fld,fst")]) + + (define_expand "movv4hi" + [(set (match_operand:V4HI 0 "nonimmediate_operand" "") + (match_operand:V4HI 1 "general_operand" ""))] + "" + { + if (alpha_expand_mov (V4HImode, operands)) + DONE; + }) + + (define_insn "*movv4hi_fix" + [(set (match_operand:V4HI 0 "nonimmediate_operand" "=r,r,m,*f,*f,m,r,*f") + (match_operand:V4HI 1 "input_operand" "rW,m,rW,*fW,m,*f,*f,r"))] + "TARGET_FIX + && (register_operand (operands[0], V4HImode) + || reg_or_0_operand (operands[1], V4HImode))" + "@ + bis $31,%r1,%0 + ldq %0,%1 + stq %r1,%0 + cpys %R1,%R1,%0 + ldt %0,%1 + stt %R1,%0 + ftoit %1,%0 + itoft %1,%0" + [(set_attr "type" "ilog,ild,ist,fcpys,fld,fst,ftoi,itof")]) + + (define_insn "*movv4hi_nofix" + [(set (match_operand:V4HI 0 "nonimmediate_operand" "=r,r,m,*f,*f,m") + (match_operand:V4HI 1 "input_operand" "rW,m,rW,*fW,m,*f"))] + "! TARGET_FIX + && (register_operand (operands[0], V4HImode) + || reg_or_0_operand (operands[1], V4HImode))" + "@ + bis $31,%r1,%0 + ldq %0,%1 + stq %r1,%0 + cpys %R1,%R1,%0 + ldt %0,%1 + stt %R1,%0" + [(set_attr "type" "ilog,ild,ist,fcpys,fld,fst")]) + + (define_expand "movv2si" + [(set (match_operand:V2SI 0 "nonimmediate_operand" "") + (match_operand:V2SI 1 "general_operand" ""))] + "" + { + if (alpha_expand_mov (V2SImode, operands)) + DONE; + }) + + (define_insn "*movv2si_fix" + [(set (match_operand:V2SI 0 "nonimmediate_operand" "=r,r,m,*f,*f,m,r,*f") + (match_operand:V2SI 1 "input_operand" "rW,m,rW,*fW,m,*f,*f,r"))] + "TARGET_FIX + && (register_operand (operands[0], V2SImode) + || reg_or_0_operand (operands[1], V2SImode))" + "@ + bis $31,%r1,%0 + ldq %0,%1 + stq %r1,%0 + cpys %R1,%R1,%0 + ldt %0,%1 + stt %R1,%0 + ftoit %1,%0 + itoft %1,%0" + [(set_attr "type" "ilog,ild,ist,fcpys,fld,fst,ftoi,itof")]) + + (define_insn "*movv2si_nofix" + [(set (match_operand:V2SI 0 "nonimmediate_operand" "=r,r,m,*f,*f,m") + (match_operand:V2SI 1 "input_operand" "rW,m,rW,*fW,m,*f"))] + "! TARGET_FIX + && (register_operand (operands[0], V2SImode) + || reg_or_0_operand (operands[1], V2SImode))" + "@ + bis $31,%r1,%0 + ldq %0,%1 + stq %r1,%0 + cpys %R1,%R1,%0 + ldt %0,%1 + stt %R1,%0" + [(set_attr "type" "ilog,ild,ist,fcpys,fld,fst")]) + + (define_insn "uminv8qi3" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (umin:V8QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (match_operand:V8QI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "minub8 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_insn "sminv8qi3" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (smin:V8QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (match_operand:V8QI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "minsb8 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_insn "uminv4hi3" + [(set (match_operand:V4HI 0 "register_operand" "=r") + (umin:V4HI (match_operand:V4HI 1 "reg_or_0_operand" "rW") + (match_operand:V4HI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "minuw4 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_insn "sminv4hi3" + [(set (match_operand:V4HI 0 "register_operand" "=r") + (smin:V4HI (match_operand:V4HI 1 "reg_or_0_operand" "rW") + (match_operand:V4HI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "minsw4 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_insn "umaxv8qi3" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (umax:V8QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (match_operand:V8QI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "maxub8 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_insn "smaxv8qi3" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (smax:V8QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (match_operand:V8QI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "maxsb8 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_insn "umaxv4hi3" + [(set (match_operand:V4HI 0 "register_operand" "=r") + (umax:V4HI (match_operand:V4HI 1 "reg_or_0_operand" "rW") + (match_operand:V4HI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "maxuw4 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_insn "smaxv4hi3" + [(set (match_operand:V4HI 0 "register_operand" "=r") + (smax:V4HI (match_operand:V4HI 1 "reg_or_0_operand" "rW") + (match_operand:V4HI 2 "reg_or_0_operand" "rW")))] + "TARGET_MAX" + "maxsw4 %r1,%r2,%0" + [(set_attr "type" "mvi")]) + ;; Bit field extract patterns which use ext[wlq][lh] (define_expand "extv" *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 6686,6692 **** "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && prev_nonnote_insn (insn) == operands[0]" [(const_int 0)] ! "DONE;") (define_insn "*builtin_setjmp_receiver_1" [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] --- 6784,6794 ---- "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && prev_nonnote_insn (insn) == operands[0]" [(const_int 0)] ! " ! { ! emit_note (NULL, NOTE_INSN_DELETED); ! DONE; ! }") (define_insn "*builtin_setjmp_receiver_1" [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 6866,6877 **** and leave the LRU eviction counter pointing to that block. */ static const char * const alt[2][2] = { { ! "lds $f31,%a0", /* read, evict next */ "ldl $31,%a0", /* read, evict last */ }, { "ldt $f31,%a0", /* write, evict next */ ! "ldq $31,%a0", /* write, evict last */ } }; --- 6968,6979 ---- and leave the LRU eviction counter pointing to that block. */ static const char * const alt[2][2] = { { ! "ldq $31,%a0", /* read, evict next */ "ldl $31,%a0", /* read, evict last */ }, { "ldt $f31,%a0", /* write, evict next */ ! "lds $f31,%a0", /* write, evict last */ } }; *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 6924,6930 **** --- 7026,7712 ---- else return ".align %0 #realign"; }) + + ;; Instructions to be emitted from __builtins. + + (define_insn "builtin_cmpbge" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rJ") + (match_operand:DI 2 "reg_or_8bit_operand" "rI")] + UNSPEC_CMPBGE))] + "" + "cmpbge %r1,%2,%0" + ;; The EV6 data sheets list this as ILOG. OTOH, EV6 doesn't + ;; actually differentiate between ILOG and ICMP in the schedule. + [(set_attr "type" "icmp")]) + + (define_expand "builtin_extbl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (8), operands[2])); + DONE; + }) + (define_expand "builtin_extwl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (16), operands[2])); + DONE; + }) + + (define_expand "builtin_extll" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (32), operands[2])); + DONE; + }) + + (define_expand "builtin_extql" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (64), operands[2])); + DONE; + }) + + (define_expand "builtin_extwh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extwh_be; + else + gen = gen_extwh_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; + }) + + (define_expand "builtin_extlh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extlh_be; + else + gen = gen_extlh_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; + }) + + (define_expand "builtin_extqh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extqh_be; + else + gen = gen_extqh_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; + }) + + (define_expand "builtin_insbl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_insbl_be; + else + gen = gen_insbl_le; + operands[1] = gen_lowpart (QImode, operands[1]); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; + }) + + (define_expand "builtin_inswl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_inswl_be; + else + gen = gen_inswl_le; + operands[1] = gen_lowpart (HImode, operands[1]); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; + }) + + (define_expand "builtin_insll" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_insll_be; + else + gen = gen_insll_le; + operands[1] = gen_lowpart (SImode, operands[1]); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; + }) + + (define_expand "builtin_insql" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_insql_be; + else + gen = gen_insql_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; + }) + + (define_expand "builtin_inswh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + emit_insn (gen_insxh (operands[0], operands[1], GEN_INT (16), operands[2])); + DONE; + }) + + (define_expand "builtin_inslh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + emit_insn (gen_insxh (operands[0], operands[1], GEN_INT (32), operands[2])); + DONE; + }) + + (define_expand "builtin_insqh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + emit_insn (gen_insxh (operands[0], operands[1], GEN_INT (64), operands[2])); + DONE; + }) + + (define_expand "builtin_mskbl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = GEN_INT (0xff); + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; + }) + + (define_expand "builtin_mskwl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = GEN_INT (0xffff); + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; + }) + + (define_expand "builtin_mskll" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = immed_double_const (0xffffffff, 0, DImode); + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; + }) + + (define_expand "builtin_mskql" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = constm1_rtx; + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; + }) + + (define_expand "builtin_mskwh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (16), operands[2])); + DONE; + }) + + (define_expand "builtin_msklh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (32), operands[2])); + DONE; + }) + + (define_expand "builtin_mskqh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" + { + emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (64), operands[2])); + DONE; + }) + + (define_expand "builtin_zap" + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(match_operand:DI 2 "reg_or_const_int_operand" "")] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_const_int_operand" "")))] + "" + { + if (GET_CODE (operands[2]) == CONST_INT) + { + rtx mask = alpha_expand_zap_mask (INTVAL (operands[2])); + + if (mask == const0_rtx) + { + emit_move_insn (operands[0], const0_rtx); + DONE; + } + if (mask == constm1_rtx) + { + emit_move_insn (operands[0], operands[1]); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + emit_insn (gen_anddi3 (operands[0], operands[1], mask)); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + operands[2] = gen_lowpart (QImode, operands[2]); + }) + + (define_insn "*builtin_zap_1" + [(set (match_operand:DI 0 "register_operand" "=r,r,r,r") + (and:DI (unspec:DI + [(match_operand:QI 2 "reg_or_const_int_operand" "n,n,r,r")] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_const_int_operand" "n,r,J,r")))] + "" + "@ + # + # + bis $31,$31,%0 + zap %r1,%2,%0" + [(set_attr "type" "shift,shift,ilog,shift")]) + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(match_operand:QI 2 "const_int_operand" "")] + UNSPEC_ZAP) + (match_operand:DI 1 "const_int_operand" "")))] + "" + [(const_int 0)] + { + rtx mask = alpha_expand_zap_mask (INTVAL (operands[2])); + if (HOST_BITS_PER_WIDE_INT >= 64 || GET_CODE (mask) == CONST_INT) + operands[1] = gen_int_mode (INTVAL (operands[1]) & INTVAL (mask), DImode); + else + { + HOST_WIDE_INT c_lo = INTVAL (operands[1]); + HOST_WIDE_INT c_hi = (c_lo < 0 ? -1 : 0); + operands[1] = immed_double_const (c_lo & CONST_DOUBLE_LOW (mask), + c_hi & CONST_DOUBLE_HIGH (mask), + DImode); + } + emit_move_insn (operands[0], operands[1]); + DONE; + }) + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(match_operand:QI 2 "const_int_operand" "")] + UNSPEC_ZAP) + (match_operand:DI 1 "register_operand" "")))] + "" + [(set (match_dup 0) + (and:DI (match_dup 1) (match_dup 2)))] + { + operands[2] = alpha_expand_zap_mask (INTVAL (operands[2])); + if (operands[2] == const0_rtx) + { + emit_move_insn (operands[0], const0_rtx); + DONE; + } + if (operands[2] == constm1_rtx) + { + emit_move_insn (operands[0], operands[1]); + DONE; + } + }) + + (define_expand "builtin_zapnot" + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(not:QI (match_operand:DI 2 "reg_or_const_int_operand" ""))] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_const_int_operand" "")))] + "" + { + if (GET_CODE (operands[2]) == CONST_INT) + { + rtx mask = alpha_expand_zap_mask (~ INTVAL (operands[2])); + + if (mask == const0_rtx) + { + emit_move_insn (operands[0], const0_rtx); + DONE; + } + if (mask == constm1_rtx) + { + emit_move_insn (operands[0], operands[1]); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + emit_insn (gen_anddi3 (operands[0], operands[1], mask)); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + operands[2] = gen_lowpart (QImode, operands[2]); + }) + + (define_insn "*builtin_zapnot_1" + [(set (match_operand:DI 0 "register_operand" "=r") + (and:DI (unspec:DI + [(not:QI (match_operand:QI 2 "register_operand" "r"))] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_0_operand" "rJ")))] + "" + "zapnot %r1,%2,%0" + [(set_attr "type" "shift")]) + + (define_insn "builtin_amask" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "reg_or_8bit_operand" "rI")] + UNSPEC_AMASK))] + "" + "amask %1,%0" + [(set_attr "type" "ilog")]) + + (define_insn "builtin_implver" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(const_int 0)] UNSPEC_IMPLVER))] + "" + "implver %0" + [(set_attr "type" "ilog")]) + + (define_insn "builtin_rpcc" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec_volatile:DI [(const_int 0)] UNSPECV_RPCC))] + "" + "rpcc %0" + [(set_attr "type" "ilog")]) + + (define_expand "builtin_minub8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_uminv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_expand "builtin_minsb8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_sminv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_expand "builtin_minuw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_uminv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_expand "builtin_minsw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_sminv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_expand "builtin_maxub8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_umaxv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_expand "builtin_maxsb8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_smaxv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_expand "builtin_maxuw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_umaxv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_expand "builtin_maxsw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" + { + alpha_expand_builtin_vector_binop (gen_smaxv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; + }) + + (define_insn "builtin_perr" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "%rJ") + (match_operand:DI 2 "reg_or_8bit_operand" "rJ")] + UNSPEC_PERR))] + "TARGET_MAX" + "perr %r1,%r2,%0" + [(set_attr "type" "mvi")]) + + (define_expand "builtin_pklb" + [(set (match_operand:DI 0 "register_operand" "") + (vec_concat:V8QI + (vec_concat:V4QI + (truncate:V2QI (match_operand:DI 1 "register_operand" "")) + (match_dup 2)) + (match_dup 3)))] + "TARGET_MAX" + { + operands[0] = gen_lowpart (V8QImode, operands[0]); + operands[1] = gen_lowpart (V2SImode, operands[1]); + operands[2] = CONST0_RTX (V2QImode); + operands[3] = CONST0_RTX (V4QImode); + }) + + (define_insn "*pklb" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (vec_concat:V8QI + (vec_concat:V4QI + (truncate:V2QI (match_operand:V2SI 1 "register_operand" "r")) + (match_operand:V2QI 2 "const0_operand" "")) + (match_operand:V4QI 3 "const0_operand" "")))] + "TARGET_MAX" + "pklb %r1,%0" + [(set_attr "type" "mvi")]) + + (define_expand "builtin_pkwb" + [(set (match_operand:DI 0 "register_operand" "") + (vec_concat:V8QI + (truncate:V4QI (match_operand:DI 1 "register_operand" "")) + (match_dup 2)))] + "TARGET_MAX" + { + operands[0] = gen_lowpart (V8QImode, operands[0]); + operands[1] = gen_lowpart (V4HImode, operands[1]); + operands[2] = CONST0_RTX (V4QImode); + }) + + (define_insn "*pkwb" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (vec_concat:V8QI + (truncate:V4QI (match_operand:V4HI 1 "register_operand" "r")) + (match_operand:V4QI 2 "const0_operand" "")))] + "TARGET_MAX" + "pkwb %r1,%0" + [(set_attr "type" "mvi")]) + + (define_expand "builtin_unpkbl" + [(set (match_operand:DI 0 "register_operand" "") + (zero_extend:V2SI + (vec_select:V2QI (match_operand:DI 1 "register_operand" "") + (parallel [(const_int 0) (const_int 1)]))))] + "TARGET_MAX" + { + operands[0] = gen_lowpart (V2SImode, operands[0]); + operands[1] = gen_lowpart (V8QImode, operands[1]); + }) + + (define_insn "*unpkbl" + [(set (match_operand:V2SI 0 "register_operand" "=r") + (zero_extend:V2SI + (vec_select:V2QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (parallel [(const_int 0) (const_int 1)]))))] + "TARGET_MAX" + "unpkbl %r1,%0" + [(set_attr "type" "mvi")]) + + (define_expand "builtin_unpkbw" + [(set (match_operand:DI 0 "register_operand" "") + (zero_extend:V4HI + (vec_select:V4QI (match_operand:DI 1 "register_operand" "") + (parallel [(const_int 0) + (const_int 1) + (const_int 2) + (const_int 3)]))))] + "TARGET_MAX" + { + operands[0] = gen_lowpart (V4HImode, operands[0]); + operands[1] = gen_lowpart (V8QImode, operands[1]); + }) + + (define_insn "*unpkbw" + [(set (match_operand:V4HI 0 "register_operand" "=r") + (zero_extend:V4HI + (vec_select:V4QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (parallel [(const_int 0) + (const_int 1) + (const_int 2) + (const_int 3)]))))] + "TARGET_MAX" + "unpkbw %r1,%0" + [(set_attr "type" "mvi")]) + + (define_expand "builtin_cttz" + [(set (match_operand:DI 0 "register_operand" "") + (unspec:DI [(match_operand:DI 1 "register_operand" "")] + UNSPEC_CTTZ))] + "TARGET_CIX" + "") + + (define_insn "builtin_ctlz" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r")] + UNSPEC_CTLZ))] + "TARGET_CIX" + "ctlz %1,%0" + [(set_attr "type" "mvi")]) + + (define_insn "builtin_ctpop" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r")] + UNSPEC_CTPOP))] + "TARGET_CIX" + "ctpop %1,%0" + [(set_attr "type" "mvi")]) + ;; The call patterns are at the end of the file because their ;; wildcard operand0 interferes with nice recognition. *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 7023,7029 **** (plus:DI (pc) (const_int 4))) (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) (use (match_operand 3 "" "")) ! (use (match_operand 4 "const_int_operand" ""))] "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" "jsr $26,(%1),%3%J4" [(set_attr "type" "jsr")]) --- 7805,7811 ---- (plus:DI (pc) (const_int 4))) (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) (use (match_operand 3 "" "")) ! (use (match_operand 4 "" ""))] "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" "jsr $26,(%1),%3%J4" [(set_attr "type" "jsr")]) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 7043,7048 **** --- 7825,7894 ---- [(set_attr "type" "jsr") (set_attr "length" "*,*,8")]) + (define_insn_and_split "call_value_osf_tlsgd" + [(set (match_operand 0 "" "") + (call (mem:DI (match_operand:DI 1 "symbolic_operand" "")) + (const_int 0))) + (unspec [(match_operand:DI 2 "const_int_operand" "")] UNSPEC_TLSGD_CALL) + (use (reg:DI 29)) + (clobber (reg:DI 26))] + "HAVE_AS_TLS" + "#" + "&& reload_completed" + [(set (match_dup 3) + (unspec:DI [(match_dup 5) + (match_dup 1) + (match_dup 2)] UNSPEC_LITERAL)) + (parallel [(set (match_dup 0) + (call (mem:DI (match_dup 3)) + (const_int 0))) + (set (reg:DI 26) (plus:DI (pc) (const_int 4))) + (unspec_volatile [(match_dup 5)] UNSPECV_BLOCKAGE) + (use (match_dup 1)) + (use (unspec [(match_dup 2)] UNSPEC_TLSGD_CALL))]) + (set (match_dup 5) + (unspec_volatile:DI [(reg:DI 26) (match_dup 4)] UNSPECV_LDGP1)) + (set (match_dup 5) + (unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP2))] + { + operands[3] = gen_rtx_REG (Pmode, 27); + operands[4] = GEN_INT (alpha_next_sequence_number++); + operands[5] = pic_offset_table_rtx; + } + [(set_attr "type" "multi")]) + + (define_insn_and_split "call_value_osf_tlsldm" + [(set (match_operand 0 "" "") + (call (mem:DI (match_operand:DI 1 "symbolic_operand" "")) + (const_int 0))) + (unspec [(match_operand:DI 2 "const_int_operand" "")] UNSPEC_TLSLDM_CALL) + (use (reg:DI 29)) + (clobber (reg:DI 26))] + "HAVE_AS_TLS" + "#" + "&& reload_completed" + [(set (match_dup 3) + (unspec:DI [(match_dup 5) + (match_dup 1) + (match_dup 2)] UNSPEC_LITERAL)) + (parallel [(set (match_dup 0) + (call (mem:DI (match_dup 3)) + (const_int 0))) + (set (reg:DI 26) (plus:DI (pc) (const_int 4))) + (unspec_volatile [(match_dup 5)] UNSPECV_BLOCKAGE) + (use (match_dup 1)) + (use (unspec [(match_dup 2)] UNSPEC_TLSLDM_CALL))]) + (set (reg:DI 29) + (unspec_volatile:DI [(reg:DI 26) (match_dup 4)] UNSPECV_LDGP1)) + (set (reg:DI 29) + (unspec:DI [(reg:DI 29) (match_dup 4)] UNSPEC_LDGP2))] + { + operands[3] = gen_rtx_REG (Pmode, 27); + operands[4] = GEN_INT (alpha_next_sequence_number++); + operands[5] = pic_offset_table_rtx; + } + [(set_attr "type" "multi")]) + (define_insn "*call_value_osf_1" [(set (match_operand 0 "" "") (call (mem:DI (match_operand:DI 1 "call_operand" "c,R,s")) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 7094,7111 **** [(set_attr "type" "jsr") (set_attr "length" "*,*,12")]) (define_insn "*call_value_vms_1" [(set (match_operand 0 "" "") (call (mem:DI (match_operand:DI 1 "call_operand" "r,s")) (match_operand 2 "" ""))) ! (use (match_operand:DI 3 "nonimmediate_operand" "r,m")) (use (reg:DI 25)) (use (reg:DI 26)) (clobber (reg:DI 27))] "TARGET_ABI_OPEN_VMS" ! "@ ! mov %3,$27\;jsr $26,0\;ldq $27,0($29) ! ldq $27,%3\;jsr $26,%1\;ldq $27,0($29)" [(set_attr "type" "jsr") (set_attr "length" "12,16")]) --- 7940,7971 ---- [(set_attr "type" "jsr") (set_attr "length" "*,*,12")]) + ; GAS relies on the order and position of instructions output below in order + ; to generate relocs for VMS link to potentially optimize the call. + ; Please do not molest. (define_insn "*call_value_vms_1" [(set (match_operand 0 "" "") (call (mem:DI (match_operand:DI 1 "call_operand" "r,s")) (match_operand 2 "" ""))) ! (use (match_operand:DI 3 "nonmemory_operand" "r,n")) (use (reg:DI 25)) (use (reg:DI 26)) (clobber (reg:DI 27))] "TARGET_ABI_OPEN_VMS" ! "* ! { ! switch (which_alternative) ! { ! case 0: ! return \"mov %3,$27\;jsr $26,0\;ldq $27,0($29)\"; ! case 1: ! operands [3] = alpha_use_linkage (operands [1], cfun->decl, 1, 0); ! operands [4] = alpha_use_linkage (operands [1], cfun->decl, 0, 0); ! return \"ldq $26,%4\;ldq $27,%3\;jsr $26,%1\;ldq $27,0($29)\"; ! default: ! abort(); ! } ! }" [(set_attr "type" "jsr") (set_attr "length" "12,16")]) *************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi *** 7118,7121 **** "TARGET_ABI_UNICOSMK" "jsr $26,(%1)" [(set_attr "type" "jsr")]) - --- 7978,7980 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/alpha-protos.h gcc-3.3/gcc/config/alpha/alpha-protos.h *** gcc-3.2.3/gcc/config/alpha/alpha-protos.h 2002-02-18 01:07:52.000000000 +0000 --- gcc-3.3/gcc/config/alpha/alpha-protos.h 2003-02-11 22:11:58.000000000 +0000 *************** *** 1,5 **** /* Prototypes for alpha.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Prototypes for alpha.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** extern void alpha_expand_epilogue PARAMS *** 34,43 **** extern void alpha_output_filename PARAMS ((FILE *, const char *)); extern void alpha_output_lineno PARAMS ((FILE *, int)); - #ifdef RTX_CODE extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode)); extern int reg_or_6bit_operand PARAMS ((rtx, enum machine_mode)); extern int reg_or_8bit_operand PARAMS ((rtx, enum machine_mode)); extern int cint8_operand PARAMS ((rtx, enum machine_mode)); extern int add_operand PARAMS ((rtx, enum machine_mode)); extern int sext_add_operand PARAMS ((rtx, enum machine_mode)); --- 34,43 ---- extern void alpha_output_filename PARAMS ((FILE *, const char *)); extern void alpha_output_lineno PARAMS ((FILE *, int)); extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode)); extern int reg_or_6bit_operand PARAMS ((rtx, enum machine_mode)); extern int reg_or_8bit_operand PARAMS ((rtx, enum machine_mode)); + extern int reg_or_const_int_operand PARAMS ((rtx, enum machine_mode)); extern int cint8_operand PARAMS ((rtx, enum machine_mode)); extern int add_operand PARAMS ((rtx, enum machine_mode)); extern int sext_add_operand PARAMS ((rtx, enum machine_mode)); *************** extern int or_operand PARAMS ((rtx, enum *** 47,54 **** extern int mode_width_operand PARAMS ((rtx, enum machine_mode)); extern int mode_mask_operand PARAMS ((rtx, enum machine_mode)); extern int mul8_operand PARAMS ((rtx, enum machine_mode)); ! extern int fp0_operand PARAMS ((rtx, enum machine_mode)); ! extern int reg_or_fp0_operand PARAMS ((rtx, enum machine_mode)); extern int hard_fp_register_operand PARAMS ((rtx, enum machine_mode)); extern int hard_int_register_operand PARAMS ((rtx, enum machine_mode)); extern int reg_or_cint_operand PARAMS ((rtx, enum machine_mode)); --- 47,53 ---- extern int mode_width_operand PARAMS ((rtx, enum machine_mode)); extern int mode_mask_operand PARAMS ((rtx, enum machine_mode)); extern int mul8_operand PARAMS ((rtx, enum machine_mode)); ! extern int const0_operand PARAMS ((rtx, enum machine_mode)); extern int hard_fp_register_operand PARAMS ((rtx, enum machine_mode)); extern int hard_int_register_operand PARAMS ((rtx, enum machine_mode)); extern int reg_or_cint_operand PARAMS ((rtx, enum machine_mode)); *************** extern int local_symbolic_operand PARAMS *** 61,66 **** --- 60,71 ---- extern int small_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int some_small_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int global_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int dtp16_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int dtp32_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int gotdtp_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int tp16_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int tp32_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int gottp_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int call_operand PARAMS ((rtx, enum machine_mode)); extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int alpha_comparison_operator PARAMS ((rtx, enum machine_mode)); *************** extern rtx alpha_emit_set_long_const PAR *** 108,120 **** extern bool alpha_expand_mov PARAMS ((enum machine_mode, rtx *)); extern bool alpha_expand_mov_nobwx PARAMS ((enum machine_mode, rtx *)); extern void alpha_emit_floatuns PARAMS ((rtx[])); - extern rtx alpha_emit_conditional_branch PARAMS ((enum rtx_code)); - extern rtx alpha_emit_setcc PARAMS ((enum rtx_code)); extern rtx alpha_emit_conditional_move PARAMS ((rtx, enum machine_mode)); - extern int alpha_split_conditional_move PARAMS ((enum rtx_code, rtx, rtx, - rtx, rtx)); - extern void alpha_emit_xfloating_arith PARAMS ((enum rtx_code, rtx[])); - extern void alpha_emit_xfloating_cvt PARAMS ((enum rtx_code, rtx[])); extern void alpha_split_tfmode_pair PARAMS ((rtx[])); extern void alpha_split_tfmode_frobsign PARAMS ((rtx[], rtx (*)(rtx, rtx, rtx))); --- 113,119 ---- *************** extern void alpha_expand_unaligned_store *** 124,184 **** HOST_WIDE_INT)); extern int alpha_expand_block_move PARAMS ((rtx [])); extern int alpha_expand_block_clear PARAMS ((rtx [])); extern rtx alpha_return_addr PARAMS ((int, rtx)); extern rtx alpha_gp_save_rtx PARAMS ((void)); extern void print_operand PARAMS ((FILE *, rtx, int)); extern void print_operand_address PARAMS ((FILE *, rtx)); extern void alpha_initialize_trampoline PARAMS ((rtx, rtx, rtx, int, int, int)); extern void alpha_reorg PARAMS ((rtx)); ! #endif /* RTX_CODE */ #ifdef REAL_VALUE_TYPE extern int check_float_value PARAMS ((enum machine_mode, ! REAL_VALUE_TYPE *, int)); #endif - #if TARGET_ABI_OPEN_VMS - #ifdef HAVE_MACHINE_MODES - extern enum avms_arg_type alpha_arg_type PARAMS ((enum machine_mode)); - #endif #ifdef RTX_CODE ! extern rtx alpha_arg_info_reg_val PARAMS ((CUMULATIVE_ARGS)); ! #endif ! #ifdef BUFSIZ ! extern void alpha_write_linkage PARAMS ((FILE *)); #endif - #endif /* TARGET_ABI_OPEN_VMS */ - #ifdef RTX_CODE extern rtx alpha_need_linkage PARAMS ((const char *, int)); ! #endif ! #ifdef TREE_CODE ! extern tree alpha_build_va_list PARAMS ((void)); ! #ifdef RTX_CODE ! extern void alpha_va_start PARAMS ((int, tree, rtx)); ! extern rtx alpha_va_arg PARAMS ((tree, tree)); ! extern rtx function_arg PARAMS ((CUMULATIVE_ARGS, enum machine_mode, ! tree, int)); #endif ! extern void alpha_start_function PARAMS ((FILE *, const char *, tree)); ! extern void alpha_end_function PARAMS ((FILE *, const char *, tree)); ! extern void alpha_output_mi_thunk_osf PARAMS ((FILE *, tree, ! HOST_WIDE_INT, tree)); ! extern void alpha_encode_section_info PARAMS ((tree)); ! #endif /* TREE CODE */ - #ifdef RTX_CODE extern rtx unicosmk_add_call_info_word PARAMS ((rtx)); - #endif #if TARGET_ABI_UNICOSMK - #ifdef RTX_CODE extern void unicosmk_defer_case_vector PARAMS ((rtx, rtx)); - #endif - #ifdef TREE_CODE - extern void unicosmk_unique_section PARAMS ((tree, int)); - #endif extern void unicosmk_add_extern PARAMS ((const char *)); extern void unicosmk_output_align PARAMS ((FILE *, int)); extern char * unicosmk_text_section PARAMS ((void)); --- 123,177 ---- HOST_WIDE_INT)); extern int alpha_expand_block_move PARAMS ((rtx [])); extern int alpha_expand_block_clear PARAMS ((rtx [])); + extern rtx alpha_expand_zap_mask PARAMS ((HOST_WIDE_INT)); + extern void alpha_expand_builtin_vector_binop PARAMS ((rtx (*)(rtx, rtx, rtx), + enum machine_mode, + rtx, rtx, rtx)); extern rtx alpha_return_addr PARAMS ((int, rtx)); extern rtx alpha_gp_save_rtx PARAMS ((void)); extern void print_operand PARAMS ((FILE *, rtx, int)); extern void print_operand_address PARAMS ((FILE *, rtx)); extern void alpha_initialize_trampoline PARAMS ((rtx, rtx, rtx, int, int, int)); extern void alpha_reorg PARAMS ((rtx)); ! ! extern tree alpha_build_va_list PARAMS ((void)); ! extern void alpha_va_start PARAMS ((tree, rtx)); ! extern rtx alpha_va_arg PARAMS ((tree, tree)); ! extern rtx function_arg PARAMS ((CUMULATIVE_ARGS, enum machine_mode, ! tree, int)); ! extern void alpha_start_function PARAMS ((FILE *, const char *, tree)); ! extern void alpha_end_function PARAMS ((FILE *, const char *, tree)); ! ! extern int alpha_find_lo_sum_using_gp PARAMS ((rtx)); #ifdef REAL_VALUE_TYPE extern int check_float_value PARAMS ((enum machine_mode, ! REAL_VALUE_TYPE *, int)); #endif #ifdef RTX_CODE ! extern rtx alpha_emit_conditional_branch PARAMS ((enum rtx_code)); ! extern rtx alpha_emit_setcc PARAMS ((enum rtx_code)); ! extern int alpha_split_conditional_move PARAMS ((enum rtx_code, rtx, rtx, ! rtx, rtx)); ! extern void alpha_emit_xfloating_arith PARAMS ((enum rtx_code, rtx[])); ! extern void alpha_emit_xfloating_cvt PARAMS ((enum rtx_code, rtx[])); #endif extern rtx alpha_need_linkage PARAMS ((const char *, int)); ! extern rtx alpha_use_linkage PARAMS ((rtx, tree, int, int)); ! #if TARGET_ABI_OPEN_VMS ! #ifdef HAVE_MACHINE_MODES ! extern enum avms_arg_type alpha_arg_type PARAMS ((enum machine_mode)); #endif ! extern rtx alpha_arg_info_reg_val PARAMS ((CUMULATIVE_ARGS)); ! #endif /* TARGET_ABI_OPEN_VMS */ extern rtx unicosmk_add_call_info_word PARAMS ((rtx)); #if TARGET_ABI_UNICOSMK extern void unicosmk_defer_case_vector PARAMS ((rtx, rtx)); extern void unicosmk_add_extern PARAMS ((const char *)); extern void unicosmk_output_align PARAMS ((FILE *, int)); extern char * unicosmk_text_section PARAMS ((void)); diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/elf.h gcc-3.3/gcc/config/alpha/elf.h *** gcc-3.2.3/gcc/config/alpha/elf.h 2002-05-24 19:22:11.000000000 +0000 --- gcc-3.3/gcc/config/alpha/elf.h 2002-11-26 04:54:47.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 27,56 **** /* ??? Move all SDB stuff from alpha.h to osf.h. */ #undef SDB_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG #undef ASM_FINAL_SPEC #undef CC1_SPEC #define CC1_SPEC "%{G*}" #undef ASM_SPEC #define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" - #undef LINK_SPEC - #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ - %{O*:-O3} %{!O*:-O1} \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}} \ - %{static:-static}}" - /* Output at beginning of assembler file. */ #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ --- 27,49 ---- /* ??? Move all SDB stuff from alpha.h to osf.h. */ #undef SDB_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO 1 ! #define DWARF2_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG #undef ASM_FINAL_SPEC + #undef CPP_SUBTARGET_SPEC + #define CPP_SUBTARGET_SPEC "-D__ELF__" + #undef CC1_SPEC #define CC1_SPEC "%{G*}" #undef ASM_SPEC #define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" /* Output at beginning of assembler file. */ #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ *************** do { \ *** 75,83 **** #undef IDENT_ASM_OP #define IDENT_ASM_OP "\t.ident\t" - /* Allow #sccs in preprocessor. */ - #define SCCS_DIRECTIVE - /* Output #ident as a .ident. */ #undef ASM_OUTPUT_IDENT #define ASM_OUTPUT_IDENT(FILE, NAME) \ --- 68,73 ---- *************** do { \ *** 122,128 **** #undef ASM_OUTPUT_EXTERNAL_LIBCALL #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0)) /* This says how to output assembler code to declare an uninitialized external linkage data object. Under SVR4, --- 112,118 ---- #undef ASM_OUTPUT_EXTERNAL_LIBCALL #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)) /* This says how to output assembler code to declare an uninitialized external linkage data object. Under SVR4, *************** do { \ *** 152,168 **** sbss_section(); \ else \ bss_section(); \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ if (!flag_inhibit_size_directive) \ ! { \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", (SIZE)); \ ! } \ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL(FILE, NAME); \ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ --- 142,150 ---- sbss_section(); \ else \ bss_section(); \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL(FILE, NAME); \ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ *************** do { \ *** 174,180 **** #undef ASM_OUTPUT_ALIGNED_BSS #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! ASM_GLOBALIZE_LABEL (FILE, NAME); \ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ } while (0) --- 156,162 ---- #undef ASM_OUTPUT_ALIGNED_BSS #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! (*targetm.asm_out.globalize_label) (FILE, NAME); \ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ } while (0) *************** do { \ *** 198,217 **** #undef ASCII_DATA_ASM_OP #define ASCII_DATA_ASM_OP "\t.ascii\t" ! /* Support const sections and the ctors and dtors sections for g++. ! Note that there appears to be two different ways to support const ! sections at the moment. You can either #define the symbol ! READONLY_DATA_SECTION (giving it some code which switches to the ! readonly data section) or else you can #define the symbols ! EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and ! SELECT_RTX_SECTION. We do both here just to be on the safe side. */ ! ! #undef USE_CONST_SECTION ! #define USE_CONST_SECTION 1 ! ! #undef CONST_SECTION_ASM_OP ! #define CONST_SECTION_ASM_OP "\t.section\t.rodata" ! #undef BSS_SECTION_ASM_OP #define BSS_SECTION_ASM_OP "\t.section\t.bss" #undef SBSS_SECTION_ASM_OP --- 180,187 ---- #undef ASCII_DATA_ASM_OP #define ASCII_DATA_ASM_OP "\t.ascii\t" ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata" #undef BSS_SECTION_ASM_OP #define BSS_SECTION_ASM_OP "\t.section\t.bss" #undef SBSS_SECTION_ASM_OP *************** do { \ *** 246,252 **** includes this file. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_sbss, in_sdata /* A default list of extra section function definitions. For targets that use additional sections (e.g. .tdesc) you should override this --- 216,222 ---- includes this file. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sbss, in_sdata /* A default list of extra section function definitions. For targets that use additional sections (e.g. .tdesc) you should override this *************** do { \ *** 254,283 **** #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) extern void sbss_section PARAMS ((void)); extern void sdata_section PARAMS ((void)); - #undef READONLY_DATA_SECTION - #define READONLY_DATA_SECTION() const_section () - - #undef CONST_SECTION_FUNCTION - #define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - if (!USE_CONST_SECTION) \ - text_section(); \ - else if (in_section != in_const) \ - { \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ - in_section = in_const; \ - } \ - } - #undef SECTION_FUNCTION_TEMPLATE #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ --- 224,235 ---- *************** void FN () \ *** 291,467 **** /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section ! ! /* A C statement or statements to switch to the appropriate ! section for output of DECL. DECL is either a `VAR_DECL' node ! or a constant of some sort. RELOC indicates whether forming ! the initial value of DECL requires link-time relocations. ! ! Set SECNUM to: ! 0 .text ! 1 .rodata ! 2 .data ! 3 .sdata ! 4 .bss ! 5 .sbss ! */ ! ! #define DO_SELECT_SECTION(SECNUM, DECL, RELOC) \ ! do \ ! { \ ! HOST_WIDE_INT size; \ ! SECNUM = 1; \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! { \ ! SECNUM = 0; \ ! break; \ ! } \ ! else if (TREE_CODE (DECL) == STRING_CST) \ ! { \ ! if (flag_writable_strings) \ ! SECNUM = 2; \ ! else \ ! SECNUM = 0x101; \ ! break; \ ! } \ ! else if (TREE_CODE (DECL) == VAR_DECL) \ ! { \ ! if (DECL_INITIAL (DECL) == NULL \ ! || DECL_INITIAL (DECL) == error_mark_node) \ ! SECNUM = 4; \ ! else if ((flag_pic && RELOC) \ ! || ! TREE_READONLY (DECL) \ ! || TREE_SIDE_EFFECTS (DECL) \ ! || ! TREE_CONSTANT (DECL_INITIAL (DECL))) \ ! SECNUM = 2; \ ! else if (flag_merge_constants >= 2) \ ! { \ ! /* C and C++ don't allow different variables to \ ! share the same location. -fmerge-all-constants\ ! allows even that (at the expense of not \ ! conforming). */ \ ! if (TREE_CODE (DECL_INITIAL (DECL)) == STRING_CST)\ ! SECNUM = 0x201; \ ! else \ ! SECNUM = 0x301; \ ! } \ ! } \ ! else if (TREE_CODE (DECL) == CONSTRUCTOR) \ ! { \ ! if ((flag_pic && RELOC) \ ! || TREE_SIDE_EFFECTS (DECL) \ ! || ! TREE_CONSTANT (DECL)) \ ! SECNUM = 2; \ ! } \ ! \ ! /* Select small data sections based on size. */ \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! if (size >= 0 && size <= g_switch_value) \ ! { \ ! if ((SECNUM & 0xff) >= 2) \ ! SECNUM += 1; \ ! /* Move readonly data to .sdata only if -msmall-data. */ \ ! /* ??? Consider .sdata.{lit4,lit8} as \ ! SHF_MERGE|SHF_ALPHA_GPREL. */ \ ! else if (TARGET_SMALL_DATA) \ ! SECNUM = 3; \ ! } \ ! } \ ! while (0) ! ! #undef SELECT_SECTION ! #define SELECT_SECTION(DECL, RELOC, ALIGN) \ ! do \ ! { \ ! typedef void (*sec_fn) PARAMS ((void)); \ ! static sec_fn const sec_functions[6] = \ ! { \ ! text_section, \ ! const_section, \ ! data_section, \ ! sdata_section, \ ! bss_section, \ ! sbss_section \ ! }; \ ! \ ! int sec; \ ! \ ! DO_SELECT_SECTION (sec, DECL, RELOC); \ ! \ ! switch (sec) \ ! { \ ! case 0x101: \ ! mergeable_string_section (DECL, ALIGN, 0); \ ! break; \ ! case 0x201: \ ! mergeable_string_section (DECL_INITIAL (DECL),\ ! ALIGN, 0); \ ! break; \ ! case 0x301: \ ! mergeable_constant_section (DECL_MODE (DECL), \ ! ALIGN, 0); \ ! break; \ ! default: \ ! (*sec_functions[sec]) (); \ ! break; \ ! } \ ! } \ ! while (0) #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) - #undef UNIQUE_SECTION - #define UNIQUE_SECTION(DECL, RELOC) \ - do \ - { \ - static const char * const prefixes[6][2] = \ - { \ - { ".text.", ".gnu.linkonce.t." }, \ - { ".rodata.", ".gnu.linkonce.r." }, \ - { ".data.", ".gnu.linkonce.d." }, \ - { ".sdata.", ".gnu.linkonce.s." }, \ - { ".bss.", ".gnu.linkonce.b." }, \ - { ".sbss.", ".gnu.linkonce.sb." } \ - }; \ - \ - int nlen, plen, sec; \ - const char *name, *prefix; \ - char *string; \ - \ - DO_SELECT_SECTION (sec, DECL, RELOC); \ - \ - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ - STRIP_NAME_ENCODING (name, name); \ - nlen = strlen (name); \ - \ - prefix = prefixes[sec & 0xff][DECL_ONE_ONLY(DECL)]; \ - plen = strlen (prefix); \ - \ - string = alloca (nlen + plen + 1); \ - \ - memcpy (string, prefix, plen); \ - memcpy (string + plen, name, nlen + 1); \ - \ - DECL_SECTION_NAME (DECL) = build_string (nlen + plen, string); \ - } \ - while (0) - - /* A C statement or statements to switch to the appropriate - section for output of RTX in mode MODE. RTX is some kind - of constant in RTL. The argument MODE is redundant except - in the case of a `const_int' rtx. Currently, these always - go into the const section. */ - - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) \ - do { \ - if (TARGET_SMALL_DATA && GET_MODE_SIZE (MODE) <= g_switch_value) \ - /* ??? Consider .sdata.{lit4,lit8} as SHF_MERGE|SHF_ALPHA_GPREL. */ \ - sdata_section (); \ - else \ - mergeable_constant_section((MODE), (ALIGN), 0); \ - } while (0) - /* Define the strings used for the special svr4 .type and .size directives. These strings generally do not vary from one system running svr4 to another, but if a given system (e.g. m88k running svr) needs to use --- 243,252 ---- /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section ! #define TARGET_ASM_SELECT_SECTION default_elf_select_section #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) /* Define the strings used for the special svr4 .type and .size directives. These strings generally do not vary from one system running svr4 to another, but if a given system (e.g. m88k running svr) needs to use *************** do { \ *** 538,559 **** #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ HOST_WIDE_INT size; \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ size_directive_output = 0; \ if (!flag_inhibit_size_directive \ && DECL_SIZE (DECL) \ && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fputc (',', FILE); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size); \ ! fputc ('\n', FILE); \ } \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) --- 323,336 ---- #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ HOST_WIDE_INT size; \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ size_directive_output = 0; \ if (!flag_inhibit_size_directive \ && DECL_SIZE (DECL) \ && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \ { \ size_directive_output = 1; \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) *************** do { \ *** 577,587 **** && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fputc (',', FILE); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size); \ ! fputc ('\n', FILE); \ } \ } while (0) --- 354,360 ---- && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \ { \ size_directive_output = 1; \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) *************** do { \ *** 653,659 **** %{shared:crtendS.o%s}%{!shared:crtend.o%s} crtn.o%s" /* We support #pragma. */ ! #define HANDLE_SYSV_PRAGMA /* Select a format to encode pointers in exception handling data. CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is --- 426,432 ---- %{shared:crtendS.o%s}%{!shared:crtend.o%s} crtn.o%s" /* We support #pragma. */ ! #define HANDLE_SYSV_PRAGMA 1 /* Select a format to encode pointers in exception handling data. CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/ev4.md gcc-3.3/gcc/config/alpha/ev4.md *** gcc-3.2.3/gcc/config/alpha/ev4.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/alpha/ev4.md 2002-09-13 18:01:09.000000000 +0000 *************** *** 0 **** --- 1,147 ---- + ;; Scheduling description for Alpha EV4. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ; On EV4 there are two classes of resources to consider: resources needed + ; to issue, and resources needed to execute. IBUS[01] are in the first + ; category. ABOX, BBOX, EBOX, FBOX, IMUL & FDIV make up the second. + ; (There are a few other register-like resources, but ...) + + (define_automaton "ev4_0,ev4_1,ev4_2") + (define_cpu_unit "ev4_ib0,ev4_ib1,ev4_abox,ev4_bbox" "ev4_0") + (define_cpu_unit "ev4_ebox,ev4_imul" "ev4_1") + (define_cpu_unit "ev4_fbox,ev4_fdiv" "ev4_2") + (define_reservation "ev4_ib01" "ev4_ib0|ev4_ib1") + + ; Assume type "multi" single issues. + (define_insn_reservation "ev4_multi" 1 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "multi")) + "ev4_ib0+ev4_ib1") + + ; Loads from L0 completes in three cycles. adjust_cost still factors + ; in user-specified memory latency, so return 1 here. + (define_insn_reservation "ev4_ld" 1 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "ild,fld,ldsym")) + "ev4_ib01+ev4_abox") + + ; Stores can issue before the data (but not address) is ready. + (define_insn_reservation "ev4_ist" 1 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "ist")) + "ev4_ib1+ev4_abox") + + (define_insn_reservation "ev4_fst" 1 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "fst")) + "ev4_ib0+ev4_abox") + + ; Branches have no delay cost, but do tie up the unit for two cycles. + (define_insn_reservation "ev4_ibr" 2 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "ibr,jsr")) + "ev4_ib1+ev4_bbox,ev4_bbox") + + (define_insn_reservation "ev4_callpal" 2 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "callpal")) + "ev4_ib1+ev4_bbox,ev4_bbox") + + (define_insn_reservation "ev4_fbr" 2 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "fbr")) + "ev4_ib0+ev4_bbox,ev4_bbox") + + ; Arithmetic insns are normally have their results available after + ; two cycles. There are a number of exceptions. + + (define_insn_reservation "ev4_iaddlog" 2 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "iadd,ilog")) + "ev4_ib0+ev4_ebox") + + (define_bypass 1 + "ev4_iaddlog" + "ev4_ibr,ev4_iaddlog,ev4_shiftcm,ev4_icmp,ev4_imulsi,ev4_imuldi") + + (define_insn_reservation "ev4_shiftcm" 2 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "shift,icmov")) + "ev4_ib0+ev4_ebox") + + (define_insn_reservation "ev4_icmp" 2 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "icmp")) + "ev4_ib0+ev4_ebox") + + (define_bypass 1 "ev4_icmp" "ev4_ibr") + + (define_bypass 0 + "ev4_iaddlog,ev4_shiftcm,ev4_icmp" + "ev4_ist" + "store_data_bypass_p") + + ; Multiplies use a non-piplined imul unit. Also, "no [ebox] insn can + ; be issued exactly three cycles before an integer multiply completes". + + (define_insn_reservation "ev4_imulsi" 21 + (and (eq_attr "cpu" "ev4") + (and (eq_attr "type" "imul") + (eq_attr "opsize" "si"))) + "ev4_ib0+ev4_imul,ev4_imul*18,ev4_ebox") + + (define_bypass 20 "ev4_imulsi" "ev4_ist" "store_data_bypass_p") + + (define_insn_reservation "ev4_imuldi" 23 + (and (eq_attr "cpu" "ev4") + (and (eq_attr "type" "imul") + (eq_attr "opsize" "!si"))) + "ev4_ib0+ev4_imul,ev4_imul*20,ev4_ebox") + + (define_bypass 22 "ev4_imuldi" "ev4_ist" "store_data_bypass_p") + + ; Most FP insns have a 6 cycle latency, but with a 4 cycle bypass back in. + (define_insn_reservation "ev4_fpop" 6 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "fadd,fmul,fcpys,fcmov")) + "ev4_ib1+ev4_fbox") + + (define_bypass 4 "ev4_fpop" "ev4_fpop") + + ; The floating point divider is not pipelined. Also, "no FPOP insn can be + ; issued exactly five or exactly six cycles before an fdiv insn completes". + + (define_insn_reservation "ev4_fdivsf" 34 + (and (eq_attr "cpu" "ev4") + (and (eq_attr "type" "fdiv") + (eq_attr "opsize" "si"))) + "ev4_ib1+ev4_fdiv,ev4_fdiv*28,ev4_fdiv+ev4_fbox,ev4_fbox") + + (define_insn_reservation "ev4_fdivdf" 63 + (and (eq_attr "cpu" "ev4") + (and (eq_attr "type" "fdiv") + (eq_attr "opsize" "di"))) + "ev4_ib1+ev4_fdiv,ev4_fdiv*57,ev4_fdiv+ev4_fbox,ev4_fbox") + + ; Traps don't consume or produce data. + (define_insn_reservation "ev4_misc" 1 + (and (eq_attr "cpu" "ev4") + (eq_attr "type" "misc")) + "ev4_ib1") diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/ev5.md gcc-3.3/gcc/config/alpha/ev5.md *** gcc-3.2.3/gcc/config/alpha/ev5.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/alpha/ev5.md 2002-09-13 18:01:09.000000000 +0000 *************** *** 0 **** --- 1,190 ---- + ;; Scheduling description for Alpha EV5. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; EV5 has two asymetric integer units, E0 and E1, plus separate + ;; FP add and multiply units. + + (define_automaton "ev5_0,ev5_1") + (define_cpu_unit "ev5_e0,ev5_e1,ev5_fa,ev5_fm" "ev5_0") + (define_reservation "ev5_e01" "ev5_e0|ev5_e1") + (define_reservation "ev5_fam" "ev5_fa|ev5_fm") + (define_cpu_unit "ev5_imul" "ev5_0") + (define_cpu_unit "ev5_fdiv" "ev5_1") + + ; Assume type "multi" single issues. + (define_insn_reservation "ev5_multi" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "multi")) + "ev5_e0+ev5_e1+ev5_fa+ev5_fm") + + ; Stores can only issue to E0, and may not issue with loads. + ; Model this with some fake units. + + (define_cpu_unit "ev5_l0,ev5_l1,ev5_st" "ev5_0") + (define_reservation "ev5_ld" "ev5_l0|ev5_l1") + (exclusion_set "ev5_l0,ev5_l1" "ev5_st") + + (define_insn_reservation "ev5_st" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "ist,fst")) + "ev5_e0+ev5_st") + + ; Loads from L0 complete in two cycles. adjust_cost still factors + ; in user-specified memory latency, so return 1 here. + (define_insn_reservation "ev5_ld" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "ild,fld,ldsym")) + "ev5_e01+ev5_ld") + + ; Integer branches slot only to E1. + (define_insn_reservation "ev5_ibr" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "ibr")) + "ev5_e1") + + (define_insn_reservation "ev5_callpal" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "callpal")) + "ev5_e1") + + (define_insn_reservation "ev5_jsr" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "jsr")) + "ev5_e1") + + (define_insn_reservation "ev5_shift" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "shift")) + "ev5_e0") + + (define_insn_reservation "ev5_mvi" 2 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "mvi")) + "ev5_e0") + + (define_insn_reservation "ev5_cmov" 2 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "icmov")) + "ev5_e01") + + (define_insn_reservation "ev5_iadd" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "iadd")) + "ev5_e01") + + (define_insn_reservation "ev5_ilogcmp" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "ilog,icmp")) + "ev5_e01") + + ; Conditional move and branch can issue the same cycle as the test. + (define_bypass 0 "ev5_ilogcmp" "ev5_ibr,ev5_cmov" "if_test_bypass_p") + + ; Multiplies use a non-piplined imul unit. Also, "no insn can be issued + ; to E0 exactly two cycles before an integer multiply completes". + + (define_insn_reservation "ev5_imull" 8 + (and (eq_attr "cpu" "ev5") + (and (eq_attr "type" "imul") + (eq_attr "opsize" "si"))) + "ev5_e0+ev5_imul,ev5_imul*3,nothing,ev5_e0") + + (define_insn_reservation "ev5_imulq" 12 + (and (eq_attr "cpu" "ev5") + (and (eq_attr "type" "imul") + (eq_attr "opsize" "di"))) + "ev5_e0+ev5_imul,ev5_imul*7,nothing,ev5_e0") + + (define_insn_reservation "ev5_imulh" 14 + (and (eq_attr "cpu" "ev5") + (and (eq_attr "type" "imul") + (eq_attr "opsize" "udi"))) + "ev5_e0+ev5_imul,ev5_imul*7,nothing*3,ev5_e0") + + ; The multiplier is unable to receive data from Ebox bypass paths. The + ; instruction issues at the expected time, but its latency is increased + ; by the time it takes for the input data to become available to the + ; multiplier. For example, an IMULL instruction issued one cycle later + ; than an ADDL instruction, which produced one of its operands, has a + ; latency of 10 (8 + 2). If the IMULL instruction is issued two cycles + ; later than the ADDL instruction, the latency is 9 (8 + 1). + ; + ; Model this instead with increased latency on the input instruction. + + (define_bypass 3 + "ev5_ld,ev5_shift,ev5_mvi,ev5_cmov,ev5_iadd,ev5_ilogcmp" + "ev5_imull,ev5_imulq,ev5_imulh") + + (define_bypass 9 "ev5_imull" "ev5_imull,ev5_imulq,ev5_imulh") + (define_bypass 13 "ev5_imulq" "ev5_imull,ev5_imulq,ev5_imulh") + (define_bypass 15 "ev5_imulh" "ev5_imull,ev5_imulq,ev5_imulh") + + ; Similarly for the FPU we have two asymetric units. + + (define_insn_reservation "ev5_fadd" 4 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "fadd,fcmov")) + "ev5_fa") + + (define_insn_reservation "ev5_fbr" 1 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "fbr")) + "ev5_fa") + + (define_insn_reservation "ev5_fcpys" 4 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "fcpys")) + "ev5_fam") + + (define_insn_reservation "ev5_fmul" 4 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "fmul")) + "ev5_fm") + + ; The floating point divider is not pipelined. Also, "no insn can be issued + ; to FA exactly five before an fdiv insn completes". + ; + ; ??? Do not model this late reservation due to the enormously increased + ; size of the resulting DFA. + ; + ; ??? Putting ev5_fa and ev5_fdiv alone into the same automata produces + ; a DFA of acceptable size, but putting ev5_fm and ev5_fa into separate + ; automata produces incorrect results for insns that can choose one or + ; the other, i.e. ev5_fcpys. + + (define_insn_reservation "ev5_fdivsf" 15 + (and (eq_attr "cpu" "ev5") + (and (eq_attr "type" "fdiv") + (eq_attr "opsize" "si"))) + ; "ev5_fa+ev5_fdiv,ev5_fdiv*9,ev5_fa+ev5_fdiv,ev5_fdiv*4" + "ev5_fa+ev5_fdiv,ev5_fdiv*14") + + (define_insn_reservation "ev5_fdivdf" 22 + (and (eq_attr "cpu" "ev5") + (and (eq_attr "type" "fdiv") + (eq_attr "opsize" "di"))) + ; "ev5_fa+ev5_fdiv,ev5_fdiv*17,ev5_fa+ev5_fdiv,ev5_fdiv*4" + "ev5_fa+ev5_fdiv,ev5_fdiv*21") + + ; Traps don't consume or produce data; rpcc is latency 2 if we ever add it. + (define_insn_reservation "ev5_misc" 2 + (and (eq_attr "cpu" "ev5") + (eq_attr "type" "misc")) + "ev5_e0") diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/ev6.md gcc-3.3/gcc/config/alpha/ev6.md *** gcc-3.2.3/gcc/config/alpha/ev6.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/alpha/ev6.md 2002-09-13 18:01:09.000000000 +0000 *************** *** 0 **** --- 1,173 ---- + ;; Scheduling description for Alpha EV6. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ; EV6 can issue 4 insns per clock. It's out-of-order, so this isn't + ; expected to help over-much, but a precise description can be important + ; for software pipelining. + ; + ; EV6 has two symmetric pairs ("clusters") of two asymetric integer + ; units ("upper" and "lower"), yielding pipe names U0, U1, L0, L1. + ; + ; ??? The clusters have independent register files that are re-synced + ; every cycle. Thus there is one additional cycle of latency between + ; insns issued on different clusters. Possibly model that by duplicating + ; all EBOX insn_reservations that can issue to either cluster, increasing + ; all latencies by one, and adding bypasses within the cluster. + ; + ; ??? In addition, instruction order affects cluster issue. + + (define_automaton "ev6_0,ev6_1") + (define_cpu_unit "ev6_u0,ev6_u1,ev6_l0,ev6_l1" "ev6_0") + (define_reservation "ev6_u" "ev6_u0|ev6_u1") + (define_reservation "ev6_l" "ev6_l0|ev6_l1") + (define_reservation "ev6_ebox" "ev6_u|ev6_l") + + (define_cpu_unit "ev6_fa" "ev6_1") + (define_cpu_unit "ev6_fm,ev6_fst0,ev6_fst1" "ev6_0") + (define_reservation "ev6_fst" "ev6_fst0|ev6_fst1") + + ; Assume type "multi" single issues. + (define_insn_reservation "ev6_multi" 1 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "multi")) + "ev6_u0+ev6_u1+ev6_l0+ev6_l1+ev6_fa+ev6_fm+ev6_fst0+ev6_fst1") + + ; Integer loads take at least 3 clocks, and only issue to lower units. + ; adjust_cost still factors in user-specified memory latency, so return 1 here. + (define_insn_reservation "ev6_ild" 1 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "ild,ldsym")) + "ev6_l") + + (define_insn_reservation "ev6_ist" 1 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "ist")) + "ev6_l") + + ; FP loads take at least 4 clocks. adjust_cost still factors + ; in user-specified memory latency, so return 2 here. + (define_insn_reservation "ev6_fld" 2 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "fld")) + "ev6_l") + + ; The FPU communicates with memory and the integer register file + ; via two fp store units. We need a slot in the fst immediately, and + ; a slot in LOW after the operand data is ready. At which point the + ; data may be moved either to the store queue or the integer register + ; file and the insn retired. + + (define_insn_reservation "ev6_fst" 3 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "fst")) + "ev6_fst,nothing,ev6_l") + + ; Arithmetic goes anywhere. + (define_insn_reservation "ev6_arith" 1 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "iadd,ilog,icmp")) + "ev6_ebox") + + ; Motion video insns also issue only to U0, and take three ticks. + (define_insn_reservation "ev6_mvi" 3 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "mvi")) + "ev6_u0") + + ; Shifts issue to upper units. + (define_insn_reservation "ev6_shift" 1 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "shift")) + "ev6_u") + + ; Multiplies issue only to U1, and all take 7 ticks. + (define_insn_reservation "ev6_imul" 7 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "imul")) + "ev6_u1") + + ; Conditional moves decompose into two independent primitives, each taking + ; one cycle. Since ev6 is out-of-order, we can't see anything but two cycles. + (define_insn_reservation "ev6_icmov" 2 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "icmov")) + "ev6_ebox,ev6_ebox") + + ; Integer branches issue to upper units + (define_insn_reservation "ev6_ibr" 1 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "ibr,callpal")) + "ev6_u") + + ; Calls only issue to L0. + (define_insn_reservation "ev6_jsr" 1 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "jsr")) + "ev6_l0") + + ; Ftoi/itof only issue to lower pipes. + (define_insn_reservation "ev6_itof" 3 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "itof")) + "ev6_l") + + (define_insn_reservation "ev6_ftoi" 3 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "ftoi")) + "ev6_fst,nothing,ev6_l") + + (define_insn_reservation "ev6_fmul" 4 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "fmul")) + "ev6_fm") + + (define_insn_reservation "ev6_fadd" 4 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "fadd,fcpys,fbr")) + "ev6_fa") + + (define_insn_reservation "ev6_fcmov" 8 + (and (eq_attr "cpu" "ev6") + (eq_attr "type" "fcmov")) + "ev6_fa,nothing*3,ev6_fa") + + (define_insn_reservation "ev6_fdivsf" 12 + (and (eq_attr "cpu" "ev6") + (and (eq_attr "type" "fdiv") + (eq_attr "opsize" "si"))) + "ev6_fa*9") + + (define_insn_reservation "ev6_fdivdf" 15 + (and (eq_attr "cpu" "ev6") + (and (eq_attr "type" "fdiv") + (eq_attr "opsize" "di"))) + "ev6_fa*12") + + (define_insn_reservation "ev6_sqrtsf" 18 + (and (eq_attr "cpu" "ev6") + (and (eq_attr "type" "fsqrt") + (eq_attr "opsize" "si"))) + "ev6_fa*15") + + (define_insn_reservation "ev6_sqrtdf" 33 + (and (eq_attr "cpu" "ev6") + (and (eq_attr "type" "fsqrt") + (eq_attr "opsize" "di"))) + "ev6_fa*30") diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/freebsd.h gcc-3.3/gcc/config/alpha/freebsd.h *** gcc-3.2.3/gcc/config/alpha/freebsd.h 2002-04-12 01:58:39.000000000 +0000 --- gcc-3.3/gcc/config/alpha/freebsd.h 2003-03-12 02:38:01.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 20,37 **** Boston, MA 02111-1307, USA. */ ! /* Provide a CPP_SPEC appropriate for FreeBSD/alpha. Besides the dealing with the GCC option `-posix', and PIC issues as on all FreeBSD platforms, we must deal with the Alpha's FP issues. */ #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) -D__ELF__ \ ! %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ ! %{posix:-D_POSIX_SOURCE} \ ! %{mieee:-D_IEEE_FP} \ ! %{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT}" - #undef LINK_SPEC #define LINK_SPEC "%{G*} %{relax:-relax} \ %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ %{Wl,*:%*} \ --- 20,45 ---- Boston, MA 02111-1307, USA. */ ! /* Provide a FBSD_TARGET_CPU_CPP_BUILTINS and CPP_SPEC appropriate for ! FreeBSD/alpha. Besides the dealing with the GCC option `-posix', and PIC issues as on all FreeBSD platforms, we must deal with the Alpha's FP issues. */ + #undef FBSD_TARGET_CPU_CPP_BUILTINS + #define FBSD_TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + if (flag_pic) \ + { \ + builtin_define ("__PIC__"); \ + builtin_define ("__pic__"); \ + } \ + } \ + while (0) + #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}" #define LINK_SPEC "%{G*} %{relax:-relax} \ %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ %{Wl,*:%*} \ *************** Boston, MA 02111-1307, USA. */ *** 54,62 **** /* alpha.h gets this wrong for FreeBSD. We use the GCC defaults instead. */ #undef WCHAR_TYPE - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 --- 62,67 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/gnu.h gcc-3.3/gcc/config/alpha/gnu.h *** gcc-3.2.3/gcc/config/alpha/gnu.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/alpha/gnu.h 2002-06-05 18:33:25.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + /* Configuration for an Alpha running GNU with ELF as the target machine. */ + + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (Alpha GNU)"); + + #undef TARGET_OS_CPP_BUILTINS /* config.gcc includes alpha/linux.h. */ + #define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define ("__GNU__"); \ + builtin_define ("__ELF__"); \ + builtin_define ("__gnu_hurd__"); \ + builtin_define ("_LONGLONG"); \ + builtin_define_std ("unix"); \ + builtin_assert ("system=gnu"); \ + } while (0) + + #undef ELF_DYNAMIC_LINKER + #define ELF_DYNAMIC_LINKER "/lib/ld.so" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ + "%{!shared: \ + %{!static: \ + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \ + %{static:crt0.o%s}} \ + crti.o%s \ + %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" + + /* FIXME: Is a Hurd-specific fallback mechanism necessary? */ + #undef MD_FALLBACK_FRAME_STATE_FOR diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/linux-ecoff.h gcc-3.3/gcc/config/alpha/linux-ecoff.h *** gcc-3.2.3/gcc/config/alpha/linux-ecoff.h 1999-01-11 13:33:52.000000000 +0000 --- gcc-3.3/gcc/config/alpha/linux-ecoff.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,37 **** - /* Definitions of target machine for GNU compiler - for Alpha Linux-based GNU systems using ECOFF. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. - Contributed by Bob Manson. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ECOFF)"); - - #undef CPP_SUBTARGET_SPEC - #define CPP_SUBTARGET_SPEC "-D__ECOFF__" - - #undef LINK_SPEC - #define LINK_SPEC "-G 8 %{O*:-O3} %{!O*:-O1}" - - /* stabs get slurped by the assembler into a queer ecoff format. */ - #undef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - - /* We support #pragma. */ - #define HANDLE_SYSV_PRAGMA --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/linux-elf.h gcc-3.3/gcc/config/alpha/linux-elf.h *** gcc-3.2.3/gcc/config/alpha/linux-elf.h 2001-07-21 09:42:19.000000000 +0000 --- gcc-3.3/gcc/config/alpha/linux-elf.h 2002-12-10 10:55:31.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 27,43 **** #define SUBTARGET_EXTRA_SPECS \ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, - #undef SUB_CPP_PREDEFINES - #define SUB_CPP_PREDEFINES "-D__ELF__" - #ifdef USE_GNULIBC_1 #define ELF_DYNAMIC_LINKER "/lib/ld.so.1" #else #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" #endif #ifndef USE_GNULIBC_1 #undef LIB_SPEC #define LIB_SPEC \ ! "%{shared:-lc}%{!shared:%{pthread:-lpthread }%{profile:-lc_p}%{!profile:-lc}} " #endif --- 27,49 ---- #define SUBTARGET_EXTRA_SPECS \ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, #ifdef USE_GNULIBC_1 #define ELF_DYNAMIC_LINKER "/lib/ld.so.1" #else #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" #endif + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}} \ + %{static:-static}}" + #ifndef USE_GNULIBC_1 #undef LIB_SPEC #define LIB_SPEC \ ! "%{pthread:-lpthread }%{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}} " #endif diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/linux.h gcc-3.3/gcc/config/alpha/linux.h *** gcc-3.2.3/gcc/config/alpha/linux.h 2002-04-15 20:27:24.000000000 +0000 --- gcc-3.3/gcc/config/alpha/linux.h 2003-02-22 18:35:00.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,42 **** #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS) ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-D__gnu_linux__ -Dlinux -Dunix -Asystem=linux -D_LONGLONG -D__alpha__ " \ ! SUB_CPP_PREDEFINES ! ! /* The GNU C++ standard library requires that these macros be defined. */ ! #undef CPLUSPLUS_CPP_SPEC ! #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" #undef LIB_SPEC #define LIB_SPEC \ ! "%{shared: -lc} \ ! %{!shared: %{pthread:-lpthread} \ ! %{profile:-lc_p} %{!profile: -lc}}" /* Show that we need a GP when profiling. */ #undef TARGET_PROFILING_NEEDS_GP --- 23,45 ---- #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS) ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__gnu_linux__"); \ ! builtin_define ("_LONGLONG"); \ ! builtin_define_std ("linux"); \ ! builtin_define_std ("unix"); \ ! builtin_assert ("system=linux"); \ ! /* The GNU C++ standard library requires this. */ \ ! if (c_language == clk_cplusplus) \ ! builtin_define ("_GNU_SOURCE"); \ ! } while (0) #undef LIB_SPEC #define LIB_SPEC \ ! "%{pthread:-lpthread} \ ! %{shared:-lc} \ ! %{!shared: %{profile:-lc_p}%{!profile:-lc}}" /* Show that we need a GP when profiling. */ #undef TARGET_PROFILING_NEEDS_GP *************** SUB_CPP_PREDEFINES *** 56,61 **** --- 59,66 ---- /* Define this so that all GNU/Linux targets handle the same pragmas. */ #define HANDLE_PRAGMA_PACK_PUSH_POP + #define TARGET_HAS_F_SETLKW + /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/netbsd.h gcc-3.3/gcc/config/alpha/netbsd.h *** gcc-3.2.3/gcc/config/alpha/netbsd.h 2002-05-29 22:12:47.000000000 +0000 --- gcc-3.3/gcc/config/alpha/netbsd.h 2002-11-24 23:19:19.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 22,30 **** #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS) ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-D__NetBSD__ -D__ELF__ -D_LP64 -Asystem=unix -Asystem=NetBSD" /* Show that we need a GP when profiling. */ --- 22,37 ---- #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS) ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! NETBSD_OS_CPP_BUILTINS_ELF(); \ ! NETBSD_OS_CPP_BUILTINS_LP64(); \ ! } while (0) ! ! ! /* NetBSD doesn't use the LANGUAGE* built-ins. */ ! #undef SUBTARGET_LANGUAGE_CPP_BUILTINS ! #define SUBTARGET_LANGUAGE_CPP_BUILTINS() /* nothing */ /* Show that we need a GP when profiling. */ *************** Boston, MA 02111-1307, USA. */ *** 32,70 **** #define TARGET_PROFILING_NEEDS_GP 1 ! /* Provide a CPP_SPEC appropriate for NetBSD/alpha. In addition to ! the standard NetBSD specs, we also handle Alpha FP mode indications. */ ! ! #undef CPP_SPEC ! #define CPP_SPEC \ ! "%{mieee:-D_IEEE_FP} \ ! %{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT} \ ! %(cpp_cpu) %(cpp_subtarget)" #undef CPP_SUBTARGET_SPEC ! #define CPP_SUBTARGET_SPEC \ ! "%{posix:-D_POSIX_SOURCE}" ! /* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target. ! This is a copy of LINK_SPEC from tweaked for ! the alpha target. */ #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{G*} %{relax:-relax} \ ! %{O*:-O3} %{!O*:-O1} \ ! %{assert*} %{R*} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dc -dp \ ! %{!nostdlib: \ ! %{!r*: \ ! %{!e*:-e __start}}} \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ ! %{static:-static}}" /* Provide an ENDFILE_SPEC appropriate for NetBSD/alpha ELF. Here we --- 39,66 ---- #define TARGET_PROFILING_NEEDS_GP 1 ! /* Provide a CPP_SUBTARGET_SPEC appropriate for NetBSD/alpha. We use ! this to pull in CPP specs that all NetBSD configurations need. */ #undef CPP_SUBTARGET_SPEC ! #define CPP_SUBTARGET_SPEC NETBSD_CPP_SPEC + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ + { "netbsd_entry_point", NETBSD_ENTRY_POINT }, \ + { "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC }, ! ! /* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target. */ #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{G*} %{relax:-relax} \ ! %{O*:-O3} %{!O*:-O1} \ ! %(netbsd_link_spec)" ! ! #define NETBSD_ENTRY_POINT "__start" /* Provide an ENDFILE_SPEC appropriate for NetBSD/alpha ELF. Here we *************** Boston, MA 02111-1307, USA. */ *** 76,82 **** #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{ffast-math|funsafe-math-optimizations:crtfm%O%s} \ ! %{!shared:crtend%O%s} %{shared:crtendS%O%s}" #undef TARGET_VERSION --- 72,83 ---- #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{ffast-math|funsafe-math-optimizations:crtfm%O%s} \ ! %(netbsd_endfile_spec)" ! ! ! /* Attempt to enable execute permissions on the stack. */ ! ! #define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK #undef TARGET_VERSION diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/openbsd.h gcc-3.3/gcc/config/alpha/openbsd.h *** gcc-3.2.3/gcc/config/alpha/openbsd.h 2000-11-02 23:29:08.000000000 +0000 --- gcc-3.3/gcc/config/alpha/openbsd.h 2002-05-13 05:57:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 21,28 **** /* We settle for little endian for now. */ #define TARGET_ENDIAN_DEFAULT 0 - #include - #define OBSD_NO_DYNAMIC_LIBRARIES #define OBSD_HAS_DECLARE_FUNCTION_NAME #define OBSD_HAS_DECLARE_FUNCTION_SIZE --- 21,26 ---- *************** Boston, MA 02111-1307, USA. */ *** 41,48 **** "%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{assert*}" /* run-time target specifications */ ! #define CPP_PREDEFINES "-D__unix__ -D__ANSI_COMPAT -Asystem=unix \ ! -D__OpenBSD__ -D__alpha__ -D__alpha" /* Layout of source language data types. */ --- 39,51 ---- "%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{assert*}" /* run-time target specifications */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__OpenBSD__"); \ ! builtin_define ("__ANSI_COMPAT"); \ ! builtin_define ("__unix__"); \ ! builtin_assert ("system=unix"); \ ! } while (0) /* Layout of source language data types. */ diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/osf12.h gcc-3.3/gcc/config/alpha/osf12.h *** gcc-3.2.3/gcc/config/alpha/osf12.h 1998-12-16 21:01:03.000000000 +0000 --- gcc-3.3/gcc/config/alpha/osf12.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,33 **** - /* Definitions of target machine for GNU compiler, for DEC Alpha. - Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@nyu.edu) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* In OSF 1.2, there is a linker bug that prevents use of -O3 to - the linker. */ - - #undef LINK_SPEC - #define LINK_SPEC \ - "-G 8 -O1 %{static:-non_shared} %{rpath*} \ - %{!static:%{shared:-shared} %{!shared:-call_shared}} %{taso}" - - #undef WCHAR_TYPE - #define WCHAR_TYPE "short unsigned int" - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE 16 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/osf2or3.h gcc-3.3/gcc/config/alpha/osf2or3.h *** gcc-3.2.3/gcc/config/alpha/osf2or3.h 1999-09-16 23:48:09.000000000 +0000 --- gcc-3.3/gcc/config/alpha/osf2or3.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,32 **** - /* Definitions of target machine for GNU compiler, for DEC Alpha, osf[23]. - Copyright (C) 1997 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* In OSF 2 or 3, linking with -lprof1 doesn't require -lpdf. */ - - #undef LIB_SPEC - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc" - - /* As of OSF 3.2, as still can't subtract adjacent labels. */ - #undef TARGET_AS_CAN_SUBTRACT_LABELS - #define TARGET_AS_CAN_SUBTRACT_LABELS 0 - - /* The frame unwind data requires the ability to subtract labels. */ - #undef DWARF2_UNWIND_INFO - #define DWARF2_UNWIND_INFO 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/osf5.h gcc-3.3/gcc/config/alpha/osf5.h *** gcc-3.2.3/gcc/config/alpha/osf5.h 2001-06-11 19:51:59.000000000 +0000 --- gcc-3.3/gcc/config/alpha/osf5.h 2002-09-21 16:10:32.000000000 +0000 *************** *** 18,32 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE 128 ! ! /* Tru64 UNIX V5 has a 16 byte long double type and requires __X_FLOAT to be ! defined to get the appropriate prototypes for the long double functions ! in . */ ! ! #undef CPP_XFLOAT_SPEC ! #define CPP_XFLOAT_SPEC "-D__X_FLOAT" /* In Tru64 UNIX V5.1, Compaq introduced a new assembler (/usr/lib/cmplrs/cc/adu) which currently (versions between 3.04.29 and --- 18,29 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* Tru64 5.1 uses IEEE QUAD format. */ + /* ??? However, since there is no support for VAX H_floating, we must + drop back to a 64-bit long double to avoid a crash looking for the + format associated with TFmode. */ #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE (TARGET_FLOAT_VAX ? 64 : 128) /* In Tru64 UNIX V5.1, Compaq introduced a new assembler (/usr/lib/cmplrs/cc/adu) which currently (versions between 3.04.29 and diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/osf.h gcc-3.3/gcc/config/alpha/osf.h *** gcc-3.2.3/gcc/config/alpha/osf.h 2003-03-17 14:52:14.000000000 +0000 --- gcc-3.3/gcc/config/alpha/osf.h 2003-03-17 14:43:12.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,45 **** /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "\ ! -Dunix -D__osf__ -D__digital__ -D__arch64__ -D_LONGLONG -DSYSTYPE_BSD \ ! -D_SYSTYPE_BSD -Asystem=unix -Asystem=xpg4" ! ! /* Tru64 UNIX V5 requires additional definitions for 16 byte long double ! support. Empty by default. */ ! ! #define CPP_XFLOAT_SPEC "" /* Accept DEC C flags for multithreaded programs. We use _PTHREAD_USE_D4 instead of PTHREAD_USE_D4 since both have the same effect and the former --- 32,55 ---- /* Names to predefine in the preprocessor for this target machine. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("SYSTYPE_BSD"); \ ! builtin_define ("_SYSTYPE_BSD"); \ ! builtin_define ("__osf__"); \ ! builtin_define ("__digital__"); \ ! builtin_define ("__arch64__"); \ ! builtin_define ("_LONGLONG"); \ ! builtin_define ("__PRAGMA_EXTERN_PREFIX"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=xpg4"); \ ! /* Tru64 UNIX V5 has a 16 byte long \ ! double type and requires __X_FLOAT \ ! to be defined for . */ \ ! if (LONG_DOUBLE_TYPE_SIZE == 128) \ ! builtin_define ("__X_FLOAT"); \ ! } while (0) /* Accept DEC C flags for multithreaded programs. We use _PTHREAD_USE_D4 instead of PTHREAD_USE_D4 since both have the same effect and the former *************** Boston, MA 02111-1307, USA. */ *** 47,54 **** #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC \ ! "%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4} %(cpp_xfloat) \ ! -D__PRAGMA_EXTERN_PREFIX" /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */ --- 57,63 ---- #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC \ ! "%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}" /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */ *************** Boston, MA 02111-1307, USA. */ *** 136,144 **** #endif #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "cpp_xfloat", CPP_XFLOAT_SPEC }, \ ! { "asm_oldas", ASM_OLDAS_SPEC } /* Indicate that we have a stamp.h to use. */ #ifndef CROSS_COMPILE --- 145,151 ---- #endif #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS { "asm_oldas", ASM_OLDAS_SPEC } /* Indicate that we have a stamp.h to use. */ #ifndef CROSS_COMPILE *************** __enable_execute_stack (addr) \ *** 193,199 **** #define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ do \ { \ ! ASM_GLOBALIZE_LABEL (FILE, NAME); \ fputs ("\t.weakext\t", FILE); \ assemble_name (FILE, NAME); \ if (VALUE) \ --- 200,206 ---- #define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ do \ { \ ! (*targetm.asm_out.globalize_label) (FILE, NAME); \ fputs ("\t.weakext\t", FILE); \ assemble_name (FILE, NAME); \ if (VALUE) \ *************** __enable_execute_stack (addr) \ *** 208,214 **** #define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0) /* Handle #pragma weak and #pragma pack. */ - #undef HANDLE_SYSV_PRAGMA #define HANDLE_SYSV_PRAGMA 1 /* Handle #pragma extern_prefix. Technically only needed for Tru64 5.x, --- 215,220 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/unicosmk.h gcc-3.3/gcc/config/alpha/unicosmk.h *** gcc-3.2.3/gcc/config/alpha/unicosmk.h 2002-05-24 23:04:18.000000000 +0000 --- gcc-3.3/gcc/config/alpha/unicosmk.h 2002-08-21 02:41:45.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler, for DEC Alpha on Cray T3E running Unicos/Mk. ! Copyright (C) 2001 Free Software Foundation, Inc. Contributed by Roman Lechtchinsky (rl@cs.tu-berlin.de) --- 1,6 ---- /* Definitions of target machine for GNU compiler, for DEC Alpha on Cray T3E running Unicos/Mk. ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Roman Lechtchinsky (rl@cs.tu-berlin.de) *************** Boston, MA 02111-1307, USA. */ *** 32,46 **** /* The following defines are necessary for the standard headers to work correctly. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__unix=1 -D_UNICOS=205 -D_CRAY=1 -D_CRAYT3E=1 -D_CRAYMPP=1 -D_CRAYIEEE=1 -D_ADDR64=1 -D_LD64=1 -D__UNICOSMK__ -D__INT_MAX__=9223372036854775807 -D__SHRT_MAX__=2147483647" ! ! /* Disable software floating point emulation because it requires a 16-bit ! type which we do not have. */ ! ! #ifndef __GNUC__ ! #undef REAL_ARITHMETIC ! #endif #define SHORT_TYPE_SIZE 32 --- 32,49 ---- /* The following defines are necessary for the standard headers to work correctly. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__unix"); \ ! builtin_define ("_UNICOS=205"); \ ! builtin_define ("_CRAY"); \ ! builtin_define ("_CRAYT3E"); \ ! builtin_define ("_CRAYMPP"); \ ! builtin_define ("_CRAYIEEE"); \ ! builtin_define ("_ADDR64"); \ ! builtin_define ("_LD64"); \ ! builtin_define ("__UNICOSMK__"); \ ! } while (0) #define SHORT_TYPE_SIZE 32 *************** do { \ *** 234,243 **** On Unicos/Mk, the standard subroutine __T3E_MISMATCH stores all register arguments on the stack. Unfortunately, it doesn't always store the first one (i.e. the one that arrives in $16 or $f16). This is not a problem ! with stdargs as we always have at least one named argument there. This is ! not always the case when varargs.h is used, however. In such cases, we ! have to store the first argument ourselves. We use the information from ! the CIW to determine whether the first argument arrives in $16 or $f16. */ #undef SETUP_INCOMING_VARARGS #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ --- 237,243 ---- On Unicos/Mk, the standard subroutine __T3E_MISMATCH stores all register arguments on the stack. Unfortunately, it doesn't always store the first one (i.e. the one that arrives in $16 or $f16). This is not a problem ! with stdargs as we always have at least one named argument there. */ #undef SETUP_INCOMING_VARARGS #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ *************** do { \ *** 245,280 **** { \ if (! (NO_RTL)) \ { \ ! int start; \ ! \ ! start = (CUM).num_reg_words; \ ! if (!current_function_varargs || start == 0) \ ! ++start; \ \ emit_insn (gen_umk_mismatch_args (GEN_INT (start))); \ - if (current_function_varargs && (CUM).num_reg_words == 0) \ - { \ - rtx tmp; \ - rtx int_label, end_label; \ - \ - tmp = gen_reg_rtx (DImode); \ - emit_move_insn (tmp, \ - gen_rtx_ZERO_EXTRACT (DImode, \ - gen_rtx_REG (DImode, 2),\ - (GEN_INT (1)), \ - (GEN_INT (7)))); \ - int_label = gen_label_rtx (); \ - end_label = gen_label_rtx (); \ - emit_insn (gen_cmpdi (tmp, GEN_INT (0))); \ - emit_jump_insn (gen_beq (int_label)); \ - emit_move_insn (gen_rtx_MEM (DFmode, virtual_incoming_args_rtx),\ - gen_rtx_REG (DFmode, 48)); \ - emit_jump (end_label); \ - emit_label (int_label); \ - emit_move_insn (gen_rtx_MEM (DImode, virtual_incoming_args_rtx),\ - gen_rtx_REG (DImode, 16)); \ - emit_label (end_label); \ - } \ emit_insn (gen_arg_home_umk ()); \ } \ \ --- 245,253 ---- { \ if (! (NO_RTL)) \ { \ ! int start = (CUM).num_reg_words + 1; \ \ emit_insn (gen_umk_mismatch_args (GEN_INT (start))); \ emit_insn (gen_arg_home_umk ()); \ } \ \ *************** do { \ *** 288,306 **** #undef EPILOGUE_USES #define EPILOGUE_USES(REGNO) ((REGNO) == 26 || (REGNO) == 15) - /* Machine-specific function data. */ - - struct machine_function - { - /* List of call information words for calls from this function. */ - struct rtx_def *first_ciw; - struct rtx_def *last_ciw; - int ciw_count; - - /* List of deferred case vectors. */ - struct rtx_def *addr_list; - }; - /* Would have worked, only the stack doesn't seem to be executable #undef TRAMPOLINE_TEMPLATE #define TRAMPOLINE_TEMPLATE(FILE) \ --- 261,266 ---- *************** do { fprintf (FILE, "\tbr $1,0\n"); \ *** 342,350 **** #undef DATA_SECTION_ASM_OP #define DATA_SECTION_ASM_OP unicosmk_data_section () ! /* There are ni read-only sections on Unicos/Mk. */ ! #undef READONLY_DATA_SECTION #define READONLY_DATA_SECTION data_section /* Define extra sections for common data and SSIBs (static subroutine --- 302,310 ---- #undef DATA_SECTION_ASM_OP #define DATA_SECTION_ASM_OP unicosmk_data_section () ! /* There are no read-only sections on Unicos/Mk. */ ! #undef READONLY_DATA_SECTION_ASM_OP #define READONLY_DATA_SECTION data_section /* Define extra sections for common data and SSIBs (static subroutine *************** ssib_section () \ *** 375,390 **** in_section = in_ssib; \ } - /* A C expression which evaluates to true if declshould be placed into a - unique section for some target-specific reason. On Unicos/Mk, functions - and public variables are always placed in unique sections. */ - - /* - #define UNIQUE_SECTION_P(DECL) (TREE_PUBLIC (DECL) \ - || TREE_CODE (DECL) == FUNCTION_DECL) - */ - #define UNIQUE_SECTION(DECL, RELOC) unicosmk_unique_section (DECL, RELOC) - /* This outputs text to go at the start of an assembler file. */ #undef ASM_FILE_START --- 335,340 ---- *************** ssib_section () \ *** 399,410 **** #undef ASM_OUTPUT_SOURCE_FILENAME - /* There is no directive for declaring a label as global. Instead, an - additional colon must be appended when the label is defined. */ - - #undef ASM_GLOBALIZE_LABEL - #define ASM_GLOBALIZE_LABEL(FILE,NAME) - /* This is how to output a label for a jump table. Arguments are the same as for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is passed. */ --- 349,354 ---- *************** ssib_section () \ *** 568,605 **** #undef ASM_OUTPUT_MAX_SKIP_ALIGN #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,POWER,MAXSKIP) - /* We have to define these because we do not use the floating-point - emulation. Unfortunately, atof does not accept hex literals. */ - - #ifndef REAL_ARITHMETIC - #define REAL_VALUE_ATOF(x,s) atof(x) - #define REAL_VALUE_HTOF(x,s) atof(x) - - #define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) \ - do { \ - union { \ - float f; \ - HOST_WIDE_INT l; \ - } u; \ - \ - u.f = (IN); \ - (OUT) = (u.l >> 32) & 0xFFFFFFFF; \ - } while (0) - - #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \ - do { \ - union { \ - REAL_VALUE_TYPE f; \ - HOST_WIDE_INT l; \ - } u; \ - \ - u.f = (IN); \ - (OUT)[0] = (u.l >> 32) & 0xFFFFFFFF; \ - (OUT)[1] = (u.l & 0xFFFFFFFF); \ - } while (0) - - #endif - #undef NM_FLAGS #undef OBJECT_FORMAT_COFF --- 512,517 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vms-cc.c gcc-3.3/gcc/config/alpha/vms-cc.c *** gcc-3.2.3/gcc/config/alpha/vms-cc.c 2001-12-13 11:55:26.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vms-cc.c 2002-07-30 02:24:16.000000000 +0000 *************** preprocess_args (p_argc, argv) *** 109,124 **** if (strcmp (argv[i], "-o") == 0) { char *buff, *ptr; - int out_len; i++; ptr = to_host_file_spec (argv[i]); objfilename = xstrdup (ptr); ! out_len = strlen (ptr); ! buff = xmalloc (out_len + 6); ! ! strcpy (buff, "/obj="); ! strcat (buff, ptr); addarg (buff); } } --- 109,119 ---- if (strcmp (argv[i], "-o") == 0) { char *buff, *ptr; i++; ptr = to_host_file_spec (argv[i]); objfilename = xstrdup (ptr); ! buff = concat ("/obj=", ptr, NULL); addarg (buff); } } *************** main (argc, argv) *** 202,212 **** strncpy (cwdev, cwd, devlen); cwdev [devlen] = '\0'; ! search_dirs = xmalloc (strlen (system_search_dirs) + 1); ! strcpy (search_dirs, system_search_dirs); ! ! defines = xmalloc (strlen (default_defines) + 1); ! strcpy (defines, default_defines); addarg ("cc"); preprocess_args (&argc , argv); --- 197,204 ---- strncpy (cwdev, cwd, devlen); cwdev [devlen] = '\0'; ! search_dirs = xstrdup (system_search_dirs); ! defines = xstrdup (default_defines); addarg ("cc"); preprocess_args (&argc , argv); *************** main (argc, argv) *** 251,257 **** { /* Assume filename arg */ char buff [256], *ptr; - int buff_len; ptr = to_host_file_spec (argv[i]); arg_len = strlen (ptr); --- 243,248 ---- *************** main (argc, argv) *** 263,272 **** else sprintf (buff, "%s%s", cwd, ptr); ! buff_len = strlen (buff); ! ptr = xmalloc (buff_len + 1); ! ! strcpy (ptr, buff); addarg (ptr); } } --- 254,260 ---- else sprintf (buff, "%s%s", cwd, ptr); ! ptr = xstrdup (buff); addarg (ptr); } } diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vms-crt0-64.c gcc-3.3/gcc/config/alpha/vms-crt0-64.c *** gcc-3.2.3/gcc/config/alpha/vms-crt0-64.c 2001-12-14 12:55:07.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vms-crt0-64.c 2002-08-21 23:24:11.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due the the call to lib$establish and the pragmas pointer_size. */ #pragma __pointer_size short --- 32,38 ---- You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due to the call to lib$establish and the pragmas pointer_size. */ #pragma __pointer_size short diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vms-crt0.c gcc-3.3/gcc/config/alpha/vms-crt0.c *** gcc-3.2.3/gcc/config/alpha/vms-crt0.c 2001-12-10 03:07:22.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vms-crt0.c 2002-08-21 23:24:11.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due the the call to lib$establish. */ #include --- 32,38 ---- You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due to the call to lib$establish. */ #include diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vms.h gcc-3.3/gcc/config/alpha/vms.h *** gcc-3.2.3/gcc/config/alpha/vms.h 2002-04-15 10:52:24.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vms.h 2002-10-20 18:51:56.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 29,45 **** #define NO_EXTERNAL_INDIRECT_ADDRESS ! #include "alpha/alpha.h" ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-D__ALPHA -Dvms -DVMS -D__vms__ -D__VMS__ -Asystem=vms" ! ! #undef CPP_SUBTARGET_SPEC ! #define CPP_SUBTARGET_SPEC "\ ! %{mfloat-ieee:-D__IEEE_FLOAT} \ ! %{mfloat-vax:-D__G_FLOAT} \ ! %{!mfloat-vax:-D__IEEE_FLOAT}" /* By default, allow $ to be part of an identifier. */ #define DOLLARS_IN_IDENTIFIERS 2 --- 29,45 ---- #define NO_EXTERNAL_INDIRECT_ADDRESS ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("vms"); \ ! builtin_define_std ("VMS"); \ ! builtin_define ("__ALPHA"); \ ! builtin_assert ("system=vms"); \ ! if (TARGET_FLOAT_VAX) \ ! builtin_define ("__G_FLOAT"); \ ! else \ ! builtin_define ("__IEEE_FLOAT"); \ ! } while (0) /* By default, allow $ to be part of an identifier. */ #define DOLLARS_IN_IDENTIFIERS 2 *************** typedef struct {int num_args; enum avms_ *** 261,286 **** } #define LINK_SECTION_ASM_OP "\t.link" ! #define READONLY_SECTION_ASM_OP "\t.rdata" #define LITERALS_SECTION_ASM_OP "\t.literals" #define CTORS_SECTION_ASM_OP "\t.ctors" #define DTORS_SECTION_ASM_OP "\t.dtors" #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_link, in_rdata, in_literals #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ void \ - readonly_section () \ - { \ - if (in_section != in_rdata) \ - { \ - fprintf (asm_out_file, "%s\n", READONLY_SECTION_ASM_OP); \ - in_section = in_rdata; \ - } \ - } \ - void \ link_section () \ { \ if (in_section != in_link) \ --- 261,277 ---- } #define LINK_SECTION_ASM_OP "\t.link" ! #define READONLY_DATA_SECTION_ASM_OP "\t.rdata" #define LITERALS_SECTION_ASM_OP "\t.literals" #define CTORS_SECTION_ASM_OP "\t.ctors" #define DTORS_SECTION_ASM_OP "\t.dtors" #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_link, in_literals #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ void \ link_section () \ { \ if (in_section != in_link) \ *************** literals_section () \ *** 299,305 **** } \ } - extern void readonly_section PARAMS ((void)); extern void link_section PARAMS ((void)); extern void literals_section PARAMS ((void)); --- 290,295 ---- *************** extern void literals_section PARAMS ((vo *** 310,320 **** #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ fprintf (FILE, "\t.quad $L%d\n", (VALUE)) - #undef READONLY_DATA_SECTION - #define READONLY_DATA_SECTION readonly_section - - #define ASM_FILE_END(FILE) alpha_write_linkage (FILE); - #undef CASE_VECTOR_MODE #define CASE_VECTOR_MODE DImode #undef CASE_VECTOR_PC_RELATIVE --- 300,305 ---- *************** do { \ *** 379,386 **** #undef MIPS_DEBUGGING_INFO #undef DBX_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO ! #define VMS_DEBUGGING_INFO #define DWARF2_UNWIND_INFO 1 --- 364,371 ---- #undef MIPS_DEBUGGING_INFO #undef DBX_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO 1 ! #define VMS_DEBUGGING_INFO 1 #define DWARF2_UNWIND_INFO 1 *************** do { \ *** 469,475 **** sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO))) /* ??? VMS uses different linkage. */ ! #undef ASM_OUTPUT_MI_THUNK #undef ASM_SPEC #undef ASM_FINAL_SPEC --- 454,460 ---- sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO))) /* ??? VMS uses different linkage. */ ! #undef TARGET_ASM_OUTPUT_MI_THUNK #undef ASM_SPEC #undef ASM_FINAL_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vms-ld.c gcc-3.3/gcc/config/alpha/vms-ld.c *** gcc-3.2.3/gcc/config/alpha/vms-ld.c 2002-01-01 22:15:20.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vms-ld.c 2002-07-30 02:24:16.000000000 +0000 *************** main (argc, argv) *** 396,403 **** strncpy (cwdev, cwd, devlen); cwdev [devlen] = '\0'; ! search_dirs = xmalloc (strlen (system_search_dirs) + 1); ! strcpy (search_dirs, system_search_dirs); addarg ("link"); --- 396,402 ---- strncpy (cwdev, cwd, devlen); cwdev [devlen] = '\0'; ! search_dirs = xstrdup (system_search_dirs); addarg ("link"); diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vms-psxcrt0-64.c gcc-3.3/gcc/config/alpha/vms-psxcrt0-64.c *** gcc-3.2.3/gcc/config/alpha/vms-psxcrt0-64.c 2001-12-14 12:55:07.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vms-psxcrt0-64.c 2002-08-21 23:24:11.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due the the call to lib$establish and the pragmas pointer_size. */ #pragma __pointer_size short --- 32,38 ---- You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due to the call to lib$establish and the pragmas pointer_size. */ #pragma __pointer_size short diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vms-psxcrt0.c gcc-3.3/gcc/config/alpha/vms-psxcrt0.c *** gcc-3.2.3/gcc/config/alpha/vms-psxcrt0.c 2001-12-10 03:07:22.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vms-psxcrt0.c 2002-08-21 23:24:11.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due the the call to lib$establish. */ #include --- 32,38 ---- You Lose! This file can only be compiled with DEC C. #else ! /* This file can only be compiled with DEC C, due to the call to lib$establish. */ #include diff -Nrc3pad gcc-3.2.3/gcc/config/alpha/vxworks.h gcc-3.3/gcc/config/alpha/vxworks.h *** gcc-3.2.3/gcc/config/alpha/vxworks.h 2000-11-02 23:29:08.000000000 +0000 --- gcc-3.3/gcc/config/alpha/vxworks.h 2002-05-13 05:57:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 26,35 **** %{!mvxsim: %{!mcpu*|mcpu=21064:-DCPU=21064} %{mcpu=21164:-DCPU=21164}} \ %{posix: -D_POSIX_SOURCE}" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "\ ! -D__vxworks -D__alpha_vxworks -Asystem=vxworks \ ! -Asystem=embedded -D_LONGLONG" /* VxWorks does all the library stuff itself. */ --- 26,39 ---- %{!mvxsim: %{!mcpu*|mcpu=21064:-DCPU=21064} %{mcpu=21164:-DCPU=21164}} \ %{posix: -D_POSIX_SOURCE}" ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__vxworks"); \ ! builtin_define ("__alpha_vxworks"); \ ! builtin_define ("_LONGLONG"); \ ! builtin_assert ("system=vxworks"); \ ! builtin_assert ("system=embedded"); \ ! } while (0) /* VxWorks does all the library stuff itself. */ diff -Nrc3pad gcc-3.2.3/gcc/config/arc/arc.c gcc-3.3/gcc/config/arc/arc.c *** gcc-3.2.3/gcc/config/arc/arc.c 2002-03-20 22:00:38.000000000 +0000 --- gcc-3.3/gcc/config/arc/arc.c 2002-10-16 00:40:28.000000000 +0000 *************** static tree arc_handle_interrupt_attribu *** 92,97 **** --- 92,98 ---- static bool arc_assemble_integer PARAMS ((rtx, unsigned int, int)); static void arc_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void arc_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void arc_encode_section_info PARAMS ((tree, int)); /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP *************** static void arc_output_function_epilogue *** 107,119 **** #define TARGET_ASM_FUNCTION_EPILOGUE arc_output_function_epilogue #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE arc_attribute_table struct gcc_target targetm = TARGET_INITIALIZER; /* Called by OVERRIDE_OPTIONS to initialize various things. */ void ! arc_init (void) { char *tmp; --- 108,122 ---- #define TARGET_ASM_FUNCTION_EPILOGUE arc_output_function_epilogue #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE arc_attribute_table + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO arc_encode_section_info struct gcc_target targetm = TARGET_INITIALIZER; /* Called by OVERRIDE_OPTIONS to initialize various things. */ void ! arc_init () { char *tmp; *************** arc_setup_incoming_varargs (cum, mode, t *** 799,810 **** if (mode == BLKmode) abort (); ! /* We must treat `__builtin_va_alist' as an anonymous arg. */ ! if (current_function_varargs) ! first_anon_arg = *cum; ! else ! first_anon_arg = *cum + ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) ! / UNITS_PER_WORD); if (first_anon_arg < MAX_ARC_PARM_REGS && !no_rtl) { --- 802,809 ---- if (mode == BLKmode) abort (); ! first_anon_arg = *cum + ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) ! / UNITS_PER_WORD); if (first_anon_arg < MAX_ARC_PARM_REGS && !no_rtl) { *************** output_shift (operands) *** 1554,1577 **** output_asm_insn ("sr %4,[lp_end]", operands); output_asm_insn ("nop\n\tnop", operands); if (flag_pic) ! asm_fprintf (asm_out_file, "\t%s single insn loop\n", ! ASM_COMMENT_START); else ! asm_fprintf (asm_out_file, "1:\t%s single insn loop\n", ! ASM_COMMENT_START); output_asm_insn (shift_one, operands); } else { ! asm_fprintf (asm_out_file, "1:\t%s begin shift loop\n", ! ASM_COMMENT_START); output_asm_insn ("sub.f %4,%4,1", operands); output_asm_insn ("nop", operands); output_asm_insn ("bn.nd 2f", operands); output_asm_insn (shift_one, operands); output_asm_insn ("b.nd 1b", operands); ! asm_fprintf (asm_out_file, "2:\t%s end shift loop\n", ! ASM_COMMENT_START); } } } --- 1553,1576 ---- output_asm_insn ("sr %4,[lp_end]", operands); output_asm_insn ("nop\n\tnop", operands); if (flag_pic) ! fprintf (asm_out_file, "\t%s single insn loop\n", ! ASM_COMMENT_START); else ! fprintf (asm_out_file, "1:\t%s single insn loop\n", ! ASM_COMMENT_START); output_asm_insn (shift_one, operands); } else { ! fprintf (asm_out_file, "1:\t%s begin shift loop\n", ! ASM_COMMENT_START); output_asm_insn ("sub.f %4,%4,1", operands); output_asm_insn ("nop", operands); output_asm_insn ("bn.nd 2f", operands); output_asm_insn (shift_one, operands); output_asm_insn ("b.nd 1b", operands); ! fprintf (asm_out_file, "2:\t%s end shift loop\n", ! ASM_COMMENT_START); } } } *************** arc_print_operand (file, x, code) *** 1742,1755 **** return; case 'A' : { - REAL_VALUE_TYPE d; char str[30]; if (GET_CODE (x) != CONST_DOUBLE || GET_MODE_CLASS (GET_MODE (x)) != MODE_FLOAT) abort (); ! REAL_VALUE_FROM_CONST_DOUBLE (d, x); ! REAL_VALUE_TO_DECIMAL (d, "%.20e", str); fprintf (file, "%s", str); return; } --- 1741,1753 ---- return; case 'A' : { char str[30]; if (GET_CODE (x) != CONST_DOUBLE || GET_MODE_CLASS (GET_MODE (x)) != MODE_FLOAT) abort (); ! ! real_to_decimal (str, CONST_DOUBLE_REAL_VALUE (x), sizeof (str), 0, 1); fprintf (file, "%s", str); return; } *************** arc_ccfsm_record_branch_deleted () *** 2262,2269 **** } void ! arc_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg; { --- 2260,2266 ---- } void ! arc_va_start (valist, nextarg) tree valist; rtx nextarg; { *************** arc_va_start (stdarg_p, valist, nextarg) *** 2272,2278 **** && (current_function_args_info & 1)) nextarg = plus_constant (nextarg, UNITS_PER_WORD); ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); } rtx --- 2269,2275 ---- && (current_function_args_info & 1)) nextarg = plus_constant (nextarg, UNITS_PER_WORD); ! std_expand_builtin_va_start (valist, nextarg); } rtx *************** arc_va_arg (valist, type) *** 2347,2349 **** --- 2344,2360 ---- return addr_rtx; } + + /* On the ARC, function addresses are not the same as normal addresses. + Branch to absolute address insns take an address that is right-shifted + by 2. We encode the fact that we have a function here, and then emit a + special assembler op when outputting the address. */ + + static void + arc_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (TREE_CODE (decl) == FUNCTION_DECL) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } diff -Nrc3pad gcc-3.2.3/gcc/config/arc/arc.h gcc-3.3/gcc/config/arc/arc.h *** gcc-3.2.3/gcc/config/arc/arc.h 2002-03-13 05:35:49.000000000 +0000 --- gcc-3.3/gcc/config/arc/arc.h 2002-09-24 12:48:51.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 43,55 **** #define TARGET_VERSION fprintf (stderr, " (arc)") /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-Acpu=arc -Amachine=arc -D__arc__" ! ! /* Additional flags for the preprocessor. */ ! #define CPP_SPEC "\ ! %{!mcpu=*:-D__base__} %{mcpu=base:-D__base__} \ ! %{EB:-D__big_endian__} \ ! " /* Pass -mmangle-cpu if we get -mcpu=*. Doing it this way lets one have it on as default with -mcpu=*, --- 43,59 ---- #define TARGET_VERSION fprintf (stderr, " (arc)") /* Names to predefine in the preprocessor for this target machine. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__arc__"); \ ! if (TARGET_BIG_ENDIAN) \ ! builtin_define ("__big_endian__"); \ ! if (arc_cpu_type == 0) \ ! builtin_define ("__base__"); \ ! builtin_assert ("cpu=arc"); \ ! builtin_assert ("machine=arc"); \ ! } while (0) /* Pass -mmangle-cpu if we get -mcpu=*. Doing it this way lets one have it on as default with -mcpu=*, *************** extern int target_flags; *** 127,133 **** /* Instruction set characteristics. These are internal macros, set by the appropriate -mcpu= option. */ ! /* Non-zero means the cpu has a barrel shifter. */ #define TARGET_SHIFTER 0 extern const char *arc_cpu_string; --- 131,137 ---- /* Instruction set characteristics. These are internal macros, set by the appropriate -mcpu= option. */ ! /* Nonzero means the cpu has a barrel shifter. */ #define TARGET_SHIFTER 0 extern const char *arc_cpu_string; *************** extern const char *arc_text_string,*arc_ *** 145,151 **** extern int arc_cpu_type; /* Check if CPU is an extension and set `arc_cpu_type' and `arc_mangle_cpu' ! appropriately. The result should be non-zero if the cpu is recognized, otherwise zero. This is intended to be redefined in a cover file. This is used by arc_init. */ #define ARC_EXTENSION_CPU(cpu) 0 --- 149,155 ---- extern int arc_cpu_type; /* Check if CPU is an extension and set `arc_cpu_type' and `arc_mangle_cpu' ! appropriately. The result should be nonzero if the cpu is recognized, otherwise zero. This is intended to be redefined in a cover file. This is used by arc_init. */ #define ARC_EXTENSION_CPU(cpu) 0 *************** do { \ *** 168,177 **** /* Target machine storage layout. */ - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN 1 --- 172,177 ---- *************** do { \ *** 191,205 **** #define LIBGCC2_WORDS_BIG_ENDIAN 0 #endif - /* Number of bits in an addressable storage unit. */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 --- 191,196 ---- *************** if (GET_MODE_CLASS (MODE) == MODE_INT \ *** 222,231 **** /* Likewise, if the function return value is promoted. */ #define PROMOTE_FUNCTION_RETURN - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 --- 213,218 ---- *************** if (GET_MODE_CLASS (MODE) == MODE_INT \ *** 244,250 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ --- 231,237 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ *************** extern enum reg_class arc_regno_reg_clas *** 678,692 **** a reg. This includes arguments that have to be passed by reference as the pointer to them is passed in a reg if one is available (and that is what we're given). - When passing arguments NAMED is always 1. When receiving arguments NAMED - is 1 for each argument except the last in a stdarg/varargs function. In - a stdarg function we want to treat the last named arg as named. In a - varargs function we want to treat the last named arg (which is - `__builtin_va_alist') as unnamed. This macro is only used in this file. */ ! #define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \ ! ((!current_function_varargs || (NAMED)) \ ! && (CUM) < MAX_ARC_PARM_REGS \ && ((ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \ + ROUND_ADVANCE_ARG ((MODE), (TYPE)) \ <= MAX_ARC_PARM_REGS))) --- 665,673 ---- a reg. This includes arguments that have to be passed by reference as the pointer to them is passed in a reg if one is available (and that is what we're given). This macro is only used in this file. */ ! #define PASS_IN_REG_P(CUM, MODE, TYPE) \ ! ((CUM) < MAX_ARC_PARM_REGS \ && ((ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \ + ROUND_ADVANCE_ARG ((MODE), (TYPE)) \ <= MAX_ARC_PARM_REGS))) *************** extern enum reg_class arc_regno_reg_clas *** 706,712 **** /* On the ARC the first MAX_ARC_PARM_REGS args are normally in registers and the rest are pushed. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! (PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED)) \ ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \ : 0) --- 687,693 ---- /* On the ARC the first MAX_ARC_PARM_REGS args are normally in registers and the rest are pushed. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! (PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \ ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \ : 0) *************** do { \ *** 1003,1023 **** goto LABEL; \ } - /* Condition code usage. */ - - /* Some insns set all condition code flags, some only set the ZNC flags, and - some only set the ZN flags. */ - - #define EXTRA_CC_MODES \ - CC(CCZNCmode, "CCZNC") \ - CC(CCZNmode, "CCZN") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. */ #define SELECT_CC_MODE(OP, X, Y) \ arc_select_cc_mode (OP, X, Y) ! /* Return non-zero if SELECT_CC_MODE will never return MODE for a floating point inequality comparison. */ #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/ --- 984,995 ---- goto LABEL; \ } /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. */ #define SELECT_CC_MODE(OP, X, Y) \ arc_select_cc_mode (OP, X, Y) ! /* Return nonzero if SELECT_CC_MODE will never return MODE for a floating point inequality comparison. */ #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/ *************** extern const char *arc_text_section, *ar *** 1119,1130 **** #if defined (CRT_INIT) || defined (CRT_FINI) #define TEXT_SECTION_ASM_OP "\t.section .text" #else ! #define TEXT_SECTION_ASM_OP arc_text_section /*"\t.section .text"*/ #endif ! #define DATA_SECTION_ASM_OP arc_data_section /*"\t.section .data"*/ ! #undef CONST_SECTION_ASM_OP ! #define CONST_SECTION_ASM_OP arc_rodata_section /*"\t.section .rodata"*/ #define BSS_SECTION_ASM_OP "\t.section .bss" --- 1091,1102 ---- #if defined (CRT_INIT) || defined (CRT_FINI) #define TEXT_SECTION_ASM_OP "\t.section .text" #else ! #define TEXT_SECTION_ASM_OP arc_text_section #endif ! #define DATA_SECTION_ASM_OP arc_data_section ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP arc_rodata_section #define BSS_SECTION_ASM_OP "\t.section .bss" *************** extern const char *arc_text_section, *ar *** 1134,1168 **** This macro is irrelevant if there is no separate readonly data section. */ /*#define JUMP_TABLES_IN_TEXT_SECTION*/ - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or - function named by the symbol (such as what section it is in). - - The macro definition, if any, is executed immediately after the - rtl for DECL or other node is created. - The value of the rtl will be a `mem' whose address is a - `symbol_ref'. - - The usual thing for this macro to do is to store a flag in the - `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified - name string in the `symbol_ref' (if one bit is not enough - information). */ - - /* On the ARC, function addresses are not the same as normal addresses. - Branch to absolute address insns take an address that is right-shifted - by 2. We encode the fact that we have a function here, and then emit a - special assembler op when outputting the address. */ - #define ENCODE_SECTION_INFO(DECL) \ - do { \ - if (TREE_CODE (DECL) == FUNCTION_DECL) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - } while (0) - - /* Decode SYM_NAME and store the real name part in VAR, sans - the characters that encode section info. Define this macro if - ENCODE_SECTION_INFO alters the symbol's name string. */ - /*#define STRIP_NAME_ENCODING(VAR, SYM_NAME)*/ - /* For DWARF. Marginally different than default so output is "prettier" (and consistent with above). */ #define PUSHSECTION_ASM_OP "\t.section " --- 1106,1111 ---- *************** do { \ *** 1231,1249 **** no longer contain unusual constructs. */ #define ASM_APP_OFF "" ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! #define ASM_OUTPUT_LABEL(FILE, NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do { \ ! fputs ("\t.global\t", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE); \ ! } while (0) /* A C statement (sans semicolon) to output on FILE an assembler pseudo-op to declare a library function name external. The name of the library function --- 1174,1181 ---- no longer contain unusual constructs. */ #define ASM_APP_OFF "" ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global\t" /* A C statement (sans semicolon) to output on FILE an assembler pseudo-op to declare a library function name external. The name of the library function *************** arc_print_operand (FILE, X, CODE) *** 1337,1348 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on ! the section that the address refers to. On these machines, ! define the macro `ENCODE_SECTION_INFO' to store the information ! into the `symbol_ref', and then check for it here. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ arc_print_operand_address (FILE, ADDR) --- 1269,1275 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ arc_print_operand_address (FILE, ADDR) *************** do { if ((LOG) != 0) fprintf (FILE, "\t. *** 1384,1395 **** /* Debugging information. */ /* Generate DBX and DWARF debugging information. */ ! #ifndef DBX_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO ! #endif ! #ifndef DWARF_DEBUGGING_INFO ! #define DWARF_DEBUGGING_INFO ! #endif /* Prefer STABS (for now). */ #undef PREFERRED_DEBUGGING_TYPE --- 1311,1318 ---- /* Debugging information. */ /* Generate DBX and DWARF debugging information. */ ! #define DBX_DEBUGGING_INFO 1 ! #define DWARF_DEBUGGING_INFO 1 /* Prefer STABS (for now). */ #undef PREFERRED_DEBUGGING_TYPE *************** enum arc_function_type { *** 1472,1479 **** /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! arc_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 1395,1402 ---- /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! arc_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ diff -Nrc3pad gcc-3.2.3/gcc/config/arc/arc.md gcc-3.3/gcc/config/arc/arc.md *** gcc-3.2.3/gcc/config/arc/arc.md 2002-03-20 22:00:37.000000000 +0000 --- gcc-3.3/gcc/config/arc/arc.md 2002-04-18 17:38:23.000000000 +0000 *************** *** 325,336 **** " { /* Everything except mem = const or mem = mem can be done easily. */ - - #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT - if (GET_CODE (operands[1]) == CONST_DOUBLE) - operands[1] = force_const_mem (SFmode, operands[1]); - #endif - if (GET_CODE (operands[0]) == MEM) operands[1] = force_reg (SFmode, operands[1]); }") --- 325,330 ---- *************** *** 354,365 **** " { /* Everything except mem = const or mem = mem can be done easily. */ - - #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT - if (GET_CODE (operands[1]) == CONST_DOUBLE) - operands[1] = force_const_mem (DFmode, operands[1]); - #endif - if (GET_CODE (operands[0]) == MEM) operands[1] = force_reg (DFmode, operands[1]); }") --- 348,353 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/arc/arc-modes.def gcc-3.3/gcc/config/arc/arc-modes.def *** gcc-3.2.3/gcc/config/arc/arc-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/arc/arc-modes.def 2002-06-10 22:35:45.000000000 +0000 *************** *** 0 **** --- 1,25 ---- + /* Definitions of target machine for GNU compiler, Argonaut ARC cpu. + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Some insns set all condition code flags, some only set the ZNC flags, and + some only set the ZN flags. */ + + CC (CCZNC) + CC (CCZN) diff -Nrc3pad gcc-3.2.3/gcc/config/arc/arc-protos.h gcc-3.3/gcc/config/arc/arc-protos.h *** gcc-3.2.3/gcc/config/arc/arc-protos.h 2001-07-06 18:40:01.000000000 +0000 --- gcc-3.3/gcc/config/arc/arc-protos.h 2002-07-16 20:58:57.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 20,26 **** #ifdef RTX_CODE #ifdef TREE_CODE ! extern void arc_va_start PARAMS ((int, tree, rtx)); extern rtx arc_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ --- 20,26 ---- #ifdef RTX_CODE #ifdef TREE_CODE ! extern void arc_va_start PARAMS ((tree, rtx)); extern rtx arc_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ diff -Nrc3pad gcc-3.2.3/gcc/config/arc/t-arc gcc-3.3/gcc/config/arc/t-arc *** gcc-3.2.3/gcc/config/arc/t-arc 2003-01-28 21:57:41.000000000 +0000 --- gcc-3.3/gcc/config/arc/t-arc 2003-01-26 11:35:07.000000000 +0000 *************** stmp-multilib-arc: stmp-multilib *** 51,57 **** flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ CC="$(CC)" CFLAGS="$(CFLAGS)" \ ! HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ GCC_CFLAGS="$(GCC_CFLAGS) $${flags}" \ INCLUDES="$(INCLUDES)" CRTSTUFF_T_CFLAGS=$(CRTSTUFF_T_CFLAGS) \ dir="$${dir}" x-crtinit.o x-crtfini.o; \ --- 51,57 ---- flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ CC="$(CC)" CFLAGS="$(CFLAGS)" \ ! BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \ GCC_CFLAGS="$(GCC_CFLAGS) $${flags}" \ INCLUDES="$(INCLUDES)" CRTSTUFF_T_CFLAGS=$(CRTSTUFF_T_CFLAGS) \ dir="$${dir}" x-crtinit.o x-crtfini.o; \ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/aof.h gcc-3.3/gcc/config/arm/aof.h *** gcc-3.2.3/gcc/config/arm/aof.h 2002-03-18 13:45:33.000000000 +0000 --- gcc-3.3/gcc/config/arm/aof.h 2002-08-21 02:41:45.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 54,61 **** addressing across such boundaries. */ #define TEXT_SECTION_ASM_OP aof_text_section () - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) text_section (); - #define DATA_SECTION_ASM_OP aof_data_section () #define EXTRA_SECTIONS in_zero_init, in_common --- 54,59 ---- *************** do \ *** 222,235 **** extern int arm_main_function; ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do { \ ! fprintf ((STREAM), "\tEXPORT\t"); \ ! assemble_name ((STREAM), (NAME)); \ ! fputc ('\n', (STREAM)); \ ! if ((NAME)[0] == 'm' && ! strcmp ((NAME), "main")) \ ! arm_main_function = 1; \ ! } while (0) #define ASM_OUTPUT_LABEL(STREAM,NAME) \ do { \ --- 220,227 ---- extern int arm_main_function; ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\tEXPORT\t" #define ASM_OUTPUT_LABEL(STREAM,NAME) \ do { \ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/aout.h gcc-3.3/gcc/config/arm/aout.h *** gcc-3.2.3/gcc/config/arm/aout.h 2002-03-18 13:45:31.000000000 +0000 --- gcc-3.3/gcc/config/arm/aout.h 2002-08-29 21:40:09.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 111,119 **** /* Generate DBX debugging information. riscix.h will undefine this because the native assembler does not support stabs. */ ! #ifndef DBX_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO 1 ! #endif /* Acorn dbx moans about continuation chars, so don't use any. */ #ifndef DBX_CONTIN_LENGTH --- 111,117 ---- /* Generate DBX debugging information. riscix.h will undefine this because the native assembler does not support stabs. */ ! #define DBX_DEBUGGING_INFO 1 /* Acorn dbx moans about continuation chars, so don't use any. */ #ifndef DBX_CONTIN_LENGTH *************** Boston, MA 02111-1307, USA. */ *** 144,170 **** while (0) #endif ! #ifndef ASM_OUTPUT_LABEL ! #define ASM_OUTPUT_LABEL(STREAM, NAME) \ ! do \ ! { \ ! assemble_name (STREAM,NAME); \ ! fputs (":\n", STREAM); \ ! } \ ! while (0) ! #endif ! ! /* Output a globalising directive for a label. */ ! #ifndef ASM_GLOBALIZE_LABEL ! #define ASM_GLOBALIZE_LABEL(STREAM, NAME) \ ! do \ ! { \ ! fprintf (STREAM, "\t.global\t"); \ ! assemble_name (STREAM, NAME); \ ! fputc ('\n',STREAM); \ ! } \ ! while (0) ! #endif /* Make an internal label into a string. */ #ifndef ASM_GENERATE_INTERNAL_LABEL --- 142,149 ---- while (0) #endif ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global\t" /* Make an internal label into a string. */ #ifndef ASM_GENERATE_INTERNAL_LABEL diff -Nrc3pad gcc-3.2.3/gcc/config/arm/arm.c gcc-3.3/gcc/config/arm/arm.c *** gcc-3.2.3/gcc/config/arm/arm.c 2002-11-01 14:40:23.000000000 +0000 --- gcc-3.3/gcc/config/arm/arm.c 2003-02-20 16:59:02.000000000 +0000 *************** const struct attribute_spec arm_attribut *** 65,71 **** /* Forward function declarations. */ static void arm_add_gc_roots PARAMS ((void)); static int arm_gen_constant PARAMS ((enum rtx_code, Mmode, Hint, rtx, rtx, int, int)); ! static Ulong bit_count PARAMS ((signed int)); static int const_ok_for_op PARAMS ((Hint, enum rtx_code)); static int eliminate_lr2ip PARAMS ((rtx *)); static rtx emit_multi_reg_push PARAMS ((int)); --- 65,71 ---- /* Forward function declarations. */ static void arm_add_gc_roots PARAMS ((void)); static int arm_gen_constant PARAMS ((enum rtx_code, Mmode, Hint, rtx, rtx, int, int)); ! static unsigned bit_count PARAMS ((Ulong)); static int const_ok_for_op PARAMS ((Hint, enum rtx_code)); static int eliminate_lr2ip PARAMS ((rtx *)); static rtx emit_multi_reg_push PARAMS ((int)); *************** static Ccstar output_multi_immediate *** 82,90 **** static void print_multi_reg PARAMS ((FILE *, Ccstar, int, int)); static Mmode select_dominance_cc_mode PARAMS ((rtx, rtx, Hint)); static Ccstar shift_op PARAMS ((rtx, Hint *)); ! static void arm_init_machine_status PARAMS ((struct function *)); ! static void arm_mark_machine_status PARAMS ((struct function *)); ! static void arm_free_machine_status PARAMS ((struct function *)); static int number_of_first_bit_set PARAMS ((int)); static void replace_symbols_in_block PARAMS ((tree, rtx, rtx)); static void thumb_exit PARAMS ((FILE *, int, rtx)); --- 82,88 ---- static void print_multi_reg PARAMS ((FILE *, Ccstar, int, int)); static Mmode select_dominance_cc_mode PARAMS ((rtx, rtx, Hint)); static Ccstar shift_op PARAMS ((rtx, Hint *)); ! static struct machine_function * arm_init_machine_status PARAMS ((void)); static int number_of_first_bit_set PARAMS ((int)); static void replace_symbols_in_block PARAMS ((tree, rtx, rtx)); static void thumb_exit PARAMS ((FILE *, int, rtx)); *************** static void thumb_output_function_prolo *** 117,125 **** --- 115,134 ---- static int arm_comp_type_attributes PARAMS ((tree, tree)); static void arm_set_default_type_attributes PARAMS ((tree)); static int arm_adjust_cost PARAMS ((rtx, rtx, rtx, int)); + static int count_insns_for_constant PARAMS ((HOST_WIDE_INT, int)); + static int arm_get_strip_length PARAMS ((int)); #ifdef OBJECT_FORMAT_ELF static void arm_elf_asm_named_section PARAMS ((const char *, unsigned int)); #endif + #ifndef ARM_PE + static void arm_encode_section_info PARAMS ((tree, int)); + #endif + #ifdef AOF_ASSEMBLER + static void aof_globalize_label PARAMS ((FILE *, const char *)); + #endif + static void arm_output_mi_thunk PARAMS ((FILE *, tree, + HOST_WIDE_INT, + HOST_WIDE_INT, tree)); #undef Hint #undef Mmode *************** static void arm_elf_asm_named_section P *** 142,147 **** --- 151,158 ---- #define TARGET_ASM_ALIGNED_HI_OP "\tDCW\t" #undef TARGET_ASM_ALIGNED_SI_OP #define TARGET_ASM_ALIGNED_SI_OP "\tDCD\t" + #undef TARGET_ASM_GLOBALIZE_LABEL + #define TARGET_ASM_GLOBALIZE_LABEL aof_globalize_label #else #undef TARGET_ASM_ALIGNED_SI_OP #define TARGET_ASM_ALIGNED_SI_OP NULL *************** static void arm_elf_asm_named_section P *** 170,184 **** #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST arm_adjust_cost struct gcc_target targetm = TARGET_INITIALIZER; /* Obstack for minipool constant handling. */ static struct obstack minipool_obstack; static char * minipool_startobj; - #define obstack_chunk_alloc xmalloc - #define obstack_chunk_free free - /* The maximum number of insns skipped which will be conditionalised if possible. */ static int max_insns_skipped = 5; --- 181,207 ---- #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST arm_adjust_cost + #undef TARGET_ENCODE_SECTION_INFO + #ifdef ARM_PE + #define TARGET_ENCODE_SECTION_INFO arm_pe_encode_section_info + #else + #define TARGET_ENCODE_SECTION_INFO arm_encode_section_info + #endif + + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING arm_strip_name_encoding + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK arm_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + struct gcc_target targetm = TARGET_INITIALIZER; /* Obstack for minipool constant handling. */ static struct obstack minipool_obstack; static char * minipool_startobj; /* The maximum number of insns skipped which will be conditionalised if possible. */ static int max_insns_skipped = 5; *************** int arm_structure_size_boundary = DEF *** 223,235 **** /* The bits in this mask specify which instructions we are allowed to generate. */ ! static int insn_flags = 0; /* The bits in this mask specify which instruction scheduling options should be used. Note - there is an overlap with the FL_FAST_MULT. For some hardware we want to be able to generate the multiply instructions, but to tune as if they were not present in the architecture. */ ! static int tune_flags = 0; /* The following are used in the arm.md file as equivalents to bits in the above two flag variables. */ --- 246,258 ---- /* The bits in this mask specify which instructions we are allowed to generate. */ ! static unsigned long insn_flags = 0; /* The bits in this mask specify which instruction scheduling options should be used. Note - there is an overlap with the FL_FAST_MULT. For some hardware we want to be able to generate the multiply instructions, but to tune as if they were not present in the architecture. */ ! static unsigned long tune_flags = 0; /* The following are used in the arm.md file as equivalents to bits in the above two flag variables. */ *************** static const char * const arm_condition_ *** 301,307 **** struct processors { const char *const name; ! const unsigned int flags; }; /* Not all of these give usefully different compilation alternatives, --- 324,330 ---- struct processors { const char *const name; ! const unsigned long flags; }; /* Not all of these give usefully different compilation alternatives, *************** static const struct processors all_cores *** 355,361 **** {"arm10tdmi", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 }, {"arm1020t", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 }, {"xscale", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_STRONG | FL_ARCH5 | FL_ARCH5E | FL_XSCALE }, ! {NULL, 0} }; --- 378,384 ---- {"arm10tdmi", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 }, {"arm1020t", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 }, {"xscale", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_STRONG | FL_ARCH5 | FL_ARCH5E | FL_XSCALE }, ! {NULL, 0} }; *************** struct arm_cpu_select arm_select[] = *** 389,405 **** { NULL, "-mtune=", all_cores } }; ! /* Return the number of bits set in value' */ ! static unsigned long bit_count (value) ! signed int value; { unsigned long count = 0; while (value) { ! value &= ~(value & -value); ! ++count; } return count; --- 412,428 ---- { NULL, "-mtune=", all_cores } }; ! /* Return the number of bits set in VALUE. */ ! static unsigned bit_count (value) ! unsigned long value; { unsigned long count = 0; while (value) { ! count++; ! value &= value - 1; /* Clear the least-significant set bit. */ } return count; *************** arm_override_options () *** 526,532 **** if (sel->name == NULL) { ! unsigned int current_bit_count = 0; const struct processors * best_fit = NULL; /* Ideally we would like to issue an error message here --- 549,555 ---- if (sel->name == NULL) { ! unsigned current_bit_count = 0; const struct processors * best_fit = NULL; /* Ideally we would like to issue an error message here *************** arm_override_options () *** 545,551 **** for (sel = all_cores; sel->name != NULL; sel++) if ((sel->flags & sought) == sought) { ! unsigned int count; count = bit_count (sel->flags & insn_flags); --- 568,574 ---- for (sel = all_cores; sel->name != NULL; sel++) if ((sel->flags & sought) == sought) { ! unsigned count; count = bit_count (sel->flags & insn_flags); *************** arm_override_options () *** 570,576 **** architecture has been selected. */ if (tune_flags == 0) tune_flags = insn_flags; ! /* Make sure that the processor choice does not conflict with any of the other command line choices. */ if (TARGET_APCS_32 && !(insn_flags & FL_MODE32)) --- 593,599 ---- architecture has been selected. */ if (tune_flags == 0) tune_flags = insn_flags; ! /* Make sure that the processor choice does not conflict with any of the other command line choices. */ if (TARGET_APCS_32 && !(insn_flags & FL_MODE32)) *************** arm_override_options () *** 657,663 **** if (TARGET_APCS_FLOAT) warning ("passing floating point arguments in fp regs not yet supported"); ! /* Initialise boolean versions of the flags, for use in the arm.md file. */ arm_fast_multiply = (insn_flags & FL_FAST_MULT) != 0; arm_arch4 = (insn_flags & FL_ARCH4) != 0; arm_arch5 = (insn_flags & FL_ARCH5) != 0; --- 680,686 ---- if (TARGET_APCS_FLOAT) warning ("passing floating point arguments in fp regs not yet supported"); ! /* Initialize boolean versions of the flags, for use in the arm.md file. */ arm_fast_multiply = (insn_flags & FL_FAST_MULT) != 0; arm_arch4 = (insn_flags & FL_ARCH4) != 0; arm_arch5 = (insn_flags & FL_ARCH5) != 0; *************** arm_override_options () *** 714,720 **** if (arm_pic_register_string != NULL) { int pic_register = decode_reg_name (arm_pic_register_string); ! if (!flag_pic) warning ("-mpic-register= is useless without -fpic"); --- 737,743 ---- if (arm_pic_register_string != NULL) { int pic_register = decode_reg_name (arm_pic_register_string); ! if (!flag_pic) warning ("-mpic-register= is useless without -fpic"); *************** arm_override_options () *** 759,768 **** static void arm_add_gc_roots () { - ggc_add_rtx_root (&arm_compare_op0, 1); - ggc_add_rtx_root (&arm_compare_op1, 1); - ggc_add_rtx_root (&arm_target_insn, 1); /* Not sure this is really a root. */ - gcc_obstack_init(&minipool_obstack); minipool_startobj = (char *) obstack_alloc (&minipool_obstack, 0); } --- 782,787 ---- *************** arm_isr_value (argument) *** 820,826 **** if (streq (arg, ptr->arg)) return ptr->return_value; ! /* An unrecognised interrupt type. */ return ARM_FT_UNKNOWN; } --- 839,845 ---- if (streq (arg, ptr->arg)) return ptr->return_value; ! /* An unrecognized interrupt type. */ return ARM_FT_UNKNOWN; } *************** use_return_insn (iscond) *** 909,915 **** /* Of if the function calls __builtin_eh_return () */ || ARM_FUNC_TYPE (func_type) == ARM_FT_EXCEPTION_HANDLER /* Or if there is no frame pointer and there is a stack adjustment. */ ! || ((get_frame_size () + current_function_outgoing_args_size != 0) && !frame_pointer_needed)) return 0; --- 928,934 ---- /* Of if the function calls __builtin_eh_return () */ || ARM_FUNC_TYPE (func_type) == ARM_FT_EXCEPTION_HANDLER /* Or if there is no frame pointer and there is a stack adjustment. */ ! || ((arm_get_frame_size () + current_function_outgoing_args_size != 0) && !frame_pointer_needed)) return 0; *************** arm_split_constant (code, mode, val, tar *** 1032,1038 **** && REGNO (target) != REGNO (source))) { /* After arm_reorg has been called, we can't fix up expensive ! constants by pushing them into memory so we must synthesise them in-line, regardless of the cost. This is only likely to be more costly on chips that have load delay slots and we are compiling without running the scheduler (so no splitting --- 1051,1057 ---- && REGNO (target) != REGNO (source))) { /* After arm_reorg has been called, we can't fix up expensive ! constants by pushing them into memory so we must synthesize them in-line, regardless of the cost. This is only likely to be more costly on chips that have load delay slots and we are compiling without running the scheduler (so no splitting *************** arm_split_constant (code, mode, val, tar *** 1073,1079 **** } static int ! count_insns_for_constant (HOST_WIDE_INT remainder, int i) { HOST_WIDE_INT temp1; int num_insns = 0; --- 1092,1100 ---- } static int ! count_insns_for_constant (remainder, i) ! HOST_WIDE_INT remainder; ! int i; { HOST_WIDE_INT temp1; int num_insns = 0; *************** int *** 1752,1760 **** --- 1773,1792 ---- arm_return_in_memory (type) tree type; { + HOST_WIDE_INT size; + if (!AGGREGATE_TYPE_P (type)) /* All simple types are returned in registers. */ return 0; + + size = int_size_in_bytes (type); + + if (TARGET_ATPCS) + { + /* ATPCS returns aggregate types in memory only if they are + larger than a word (or are variable size). */ + return (size < 0 || size > UNITS_PER_WORD); + } /* For the arm-wince targets we choose to be compitable with Microsoft's ARM and Thumb compilers, which always return aggregates in memory. */ *************** arm_return_in_memory (type) *** 1763,1769 **** Also catch the case where int_size_in_bytes returns -1. In this case the aggregate is either huge or of varaible size, and in either case we will want to return it via memory and not in a register. */ ! if (((unsigned int) int_size_in_bytes (type)) > UNITS_PER_WORD) return 1; if (TREE_CODE (type) == RECORD_TYPE) --- 1795,1801 ---- Also catch the case where int_size_in_bytes returns -1. In this case the aggregate is either huge or of varaible size, and in either case we will want to return it via memory and not in a register. */ ! if (size < 0 || size > UNITS_PER_WORD) return 1; if (TREE_CODE (type) == RECORD_TYPE) *************** arm_return_in_memory (type) *** 1841,1846 **** --- 1873,1899 ---- return 1; } + /* Indicate whether or not words of a double are in big-endian order. */ + + int + arm_float_words_big_endian () + { + + /* For FPA, float words are always big-endian. For VFP, floats words + follow the memory system mode. */ + + if (TARGET_HARD_FLOAT) + { + /* FIXME: TARGET_HARD_FLOAT currently implies FPA. */ + return 1; + } + + if (TARGET_VFP) + return (TARGET_BIG_END ? 1 : 0); + + return 1; + } + /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. For a library call, FNTYPE is NULL. */ *************** arm_function_arg (pcum, mode, type, name *** 1899,1904 **** --- 1952,1986 ---- return gen_rtx_REG (mode, pcum->nregs); } + + /* Variable sized types are passed by reference. This is a GCC + extension to the ARM ABI. */ + + int + arm_function_arg_pass_by_reference (cum, mode, type, named) + CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + tree type; + int named ATTRIBUTE_UNUSED; + { + return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST; + } + + /* Implement va_arg. */ + + rtx + arm_va_arg (valist, type) + tree valist, type; + { + /* Variable sized types are passed by reference. */ + if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) + { + rtx addr = std_expand_builtin_va_arg (valist, build_pointer_type (type)); + return gen_rtx_MEM (ptr_mode, force_reg (Pmode, addr)); + } + + return std_expand_builtin_va_arg (valist, type); + } /* Encode the current state of the #pragma [no_]long_calls. */ typedef enum *************** current_file_function_operand (sym_ref) *** 2171,2177 **** return 0; } ! /* Return non-zero if a 32 bit "long_call" should be generated for this call. We generate a long_call if the function: a. has an __attribute__((long call)) --- 2253,2259 ---- return 0; } ! /* Return nonzero if a 32 bit "long_call" should be generated for this call. We generate a long_call if the function: a. has an __attribute__((long call)) *************** arm_is_longcall_p (sym_ref, call_cookie, *** 2224,2230 **** || TARGET_LONG_CALLS; } ! /* Return non-zero if it is ok to make a tail-call to DECL. */ int arm_function_ok_for_sibcall (decl) --- 2306,2312 ---- || TARGET_LONG_CALLS; } ! /* Return nonzero if it is ok to make a tail-call to DECL. */ int arm_function_ok_for_sibcall (decl) *************** arm_finalize_pic (prologue) *** 2442,2448 **** emit_insn (gen_pic_add_dot_plus_four (pic_offset_table_rtx, l1)); } ! seq = gen_sequence (); end_sequence (); if (prologue) emit_insn_after (seq, get_insns ()); --- 2524,2530 ---- emit_insn (gen_pic_add_dot_plus_four (pic_offset_table_rtx, l1)); } ! seq = get_insns (); end_sequence (); if (prologue) emit_insn_after (seq, get_insns ()); *************** arm_rtx_costs (x, code, outer) *** 2558,2564 **** /* Memory costs quite a lot for the first word, but subsequent words load at the equivalent of a single insn each. */ return (10 + 4 * ((GET_MODE_SIZE (mode) - 1) / UNITS_PER_WORD) ! + (CONSTANT_POOL_ADDRESS_P (x) ? 4 : 0)); case IF_THEN_ELSE: /* XXX a guess. */ --- 2640,2647 ---- /* Memory costs quite a lot for the first word, but subsequent words load at the equivalent of a single insn each. */ return (10 + 4 * ((GET_MODE_SIZE (mode) - 1) / UNITS_PER_WORD) ! + ((GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x)) ! ? 4 : 0)); case IF_THEN_ELSE: /* XXX a guess. */ *************** arm_rtx_costs (x, code, outer) *** 2606,2612 **** /* Memory costs quite a lot for the first word, but subsequent words load at the equivalent of a single insn each. */ return (10 + 4 * ((GET_MODE_SIZE (mode) - 1) / UNITS_PER_WORD) ! + (CONSTANT_POOL_ADDRESS_P (x) ? 4 : 0)); case DIV: case MOD: --- 2689,2696 ---- /* Memory costs quite a lot for the first word, but subsequent words load at the equivalent of a single insn each. */ return (10 + 4 * ((GET_MODE_SIZE (mode) - 1) / UNITS_PER_WORD) ! + (GET_CODE (x) == SYMBOL_REF ! && CONSTANT_POOL_ADDRESS_P (x) ? 4 : 0)); case DIV: case MOD: *************** arm_adjust_cost (insn, link, dep, cost) *** 2914,2929 **** && (d_pat = single_set (dep)) != NULL && GET_CODE (SET_DEST (d_pat)) == MEM) { /* This is a load after a store, there is no conflict if the load reads from a cached area. Assume that loads from the stack, and from the constant pool are cached, and that others will miss. This is a hack. */ ! if (CONSTANT_POOL_ADDRESS_P (XEXP (SET_SRC (i_pat), 0)) ! || reg_mentioned_p (stack_pointer_rtx, XEXP (SET_SRC (i_pat), 0)) ! || reg_mentioned_p (frame_pointer_rtx, XEXP (SET_SRC (i_pat), 0)) ! || reg_mentioned_p (hard_frame_pointer_rtx, ! XEXP (SET_SRC (i_pat), 0))) return 1; } --- 2998,3013 ---- && (d_pat = single_set (dep)) != NULL && GET_CODE (SET_DEST (d_pat)) == MEM) { + rtx src_mem = XEXP (SET_SRC (i_pat), 0); /* This is a load after a store, there is no conflict if the load reads from a cached area. Assume that loads from the stack, and from the constant pool are cached, and that others will miss. This is a hack. */ ! if ((GET_CODE (src_mem) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (src_mem)) ! || reg_mentioned_p (stack_pointer_rtx, src_mem) ! || reg_mentioned_p (frame_pointer_rtx, src_mem) ! || reg_mentioned_p (hard_frame_pointer_rtx, src_mem)) return 1; } *************** arm_gen_load_multiple (base_regno, count *** 4319,4325 **** if (write_back) emit_move_insn (from, plus_constant (from, count * 4 * sign)); ! seq = gen_sequence (); end_sequence (); return seq; --- 4403,4409 ---- if (write_back) emit_move_insn (from, plus_constant (from, count * 4 * sign)); ! seq = get_insns (); end_sequence (); return seq; *************** arm_gen_store_multiple (base_regno, coun *** 4386,4392 **** if (write_back) emit_move_insn (to, plus_constant (to, count * 4 * sign)); ! seq = gen_sequence (); end_sequence (); return seq; --- 4470,4476 ---- if (write_back) emit_move_insn (to, plus_constant (to, count * 4 * sign)); ! seq = get_insns (); end_sequence (); return seq; *************** arm_gen_movstrqi (operands) *** 4449,4455 **** fin_dst = dst = copy_to_mode_reg (SImode, st_dst); fin_src = src = copy_to_mode_reg (SImode, st_src); ! in_words_to_go = NUM_INTS (INTVAL (operands[2])); out_words_to_go = INTVAL (operands[2]) / 4; last_bytes = INTVAL (operands[2]) & 3; --- 4533,4539 ---- fin_dst = dst = copy_to_mode_reg (SImode, st_dst); fin_src = src = copy_to_mode_reg (SImode, st_src); ! in_words_to_go = ARM_NUM_INTS (INTVAL (operands[2])); out_words_to_go = INTVAL (operands[2]) / 4; last_bytes = INTVAL (operands[2]) & 3; *************** arm_gen_compare_reg (code, x, y) *** 4876,4881 **** --- 4960,4978 ---- return cc_reg; } + /* Generate a sequence of insns that will generate the correct return + address mask depending on the physical architecture that the program + is running on. */ + + rtx + arm_gen_return_addr_mask () + { + rtx reg = gen_reg_rtx (Pmode); + + emit_insn (gen_return_addr_mask (reg)); + return reg; + } + void arm_reload_in_hi (operands) rtx * operands; *************** arm_reload_in_hi (operands) *** 4956,4962 **** } } ! scratch = gen_rtx_REG (SImode, REGNO (operands[2])); emit_insn (gen_zero_extendqisi2 (scratch, gen_rtx_MEM (QImode, plus_constant (base, --- 5053,5066 ---- } } ! /* Operands[2] may overlap operands[0] (though it won't overlap ! operands[1]), that's why we asked for a DImode reg -- so we can ! use the bit that does not overlap. */ ! if (REGNO (operands[2]) == REGNO (operands[0])) ! scratch = gen_rtx_REG (SImode, REGNO (operands[2]) + 1); ! else ! scratch = gen_rtx_REG (SImode, REGNO (operands[2])); ! emit_insn (gen_zero_extendqisi2 (scratch, gen_rtx_MEM (QImode, plus_constant (base, *************** get_jump_table_size (insn) *** 5349,5355 **** /* ADDR_VECs only take room if read-only data does into the text section. */ if (JUMP_TABLES_IN_TEXT_SECTION ! #if !defined(READONLY_DATA_SECTION) || 1 #endif ) --- 5453,5459 ---- /* ADDR_VECs only take room if read-only data does into the text section. */ if (JUMP_TABLES_IN_TEXT_SECTION ! #if !defined(READONLY_DATA_SECTION) && !defined(READONLY_DATA_SECTION_ASM_OP) || 1 #endif ) *************** output_move_double (operands) *** 6543,6553 **** { if (GET_MODE (operands[1]) == DFmode) { long l[2]; - union real_extract u; ! memcpy (&u, &CONST_DOUBLE_LOW (operands[1]), sizeof (u)); ! REAL_VALUE_TO_TARGET_DOUBLE (u.d, l); otherops[1] = GEN_INT (l[1]); operands[1] = GEN_INT (l[0]); } --- 6647,6657 ---- { if (GET_MODE (operands[1]) == DFmode) { + REAL_VALUE_TYPE r; long l[2]; ! REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); ! REAL_VALUE_TO_TARGET_DOUBLE (r, l); otherops[1] = GEN_INT (l[1]); operands[1] = GEN_INT (l[0]); } *************** output_return_instruction (operand, real *** 7190,7196 **** int reg; unsigned long live_regs_mask; unsigned long func_type; ! func_type = arm_current_func_type (); if (IS_NAKED (func_type)) --- 7294,7300 ---- int reg; unsigned long live_regs_mask; unsigned long func_type; ! func_type = arm_current_func_type (); if (IS_NAKED (func_type)) *************** output_return_instruction (operand, real *** 7218,7224 **** if (current_function_calls_alloca && !really_return) abort (); - /* Construct the conditional part of the instruction(s) to be emitted. */ sprintf (conditional, "%%?%%%c0", reverse ? 'D' : 'd'); return_used_this_function = 1; --- 7322,7327 ---- *************** output_return_instruction (operand, real *** 7275,7280 **** --- 7378,7385 ---- /* Generate the load multiple instruction to restore the registers. */ if (frame_pointer_needed) sprintf (instr, "ldm%sea\t%%|fp, {", conditional); + else if (live_regs_mask & (1 << SP_REGNUM)) + sprintf (instr, "ldm%sfd\t%%|sp, {", conditional); else sprintf (instr, "ldm%sfd\t%%|sp!, {", conditional); *************** output_return_instruction (operand, real *** 7332,7338 **** really_return = 0; } } ! if (really_return) { switch ((int) ARM_FUNC_TYPE (func_type)) --- 7437,7443 ---- really_return = 0; } } ! if (really_return) { switch ((int) ARM_FUNC_TYPE (func_type)) *************** arm_output_epilogue (really_return) *** 7495,7501 **** frame that is $fp + 4 for a non-variadic function. */ int floats_offset = 0; rtx operands[3]; ! int frame_size = get_frame_size (); FILE * f = asm_out_file; rtx eh_ofs = cfun->machine->eh_epilogue_sp_ofs; --- 7600,7606 ---- frame that is $fp + 4 for a non-variadic function. */ int floats_offset = 0; rtx operands[3]; ! int frame_size = arm_get_frame_size (); FILE * f = asm_out_file; rtx eh_ofs = cfun->machine->eh_epilogue_sp_ofs; *************** arm_output_epilogue (really_return) *** 7686,7692 **** asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM); } else if (saved_regs_mask) ! print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask); if (current_function_pretend_args_size) { --- 7791,7806 ---- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM); } else if (saved_regs_mask) ! { ! if (saved_regs_mask & (1 << SP_REGNUM)) ! /* Note - write back to the stack register is not enabled ! (ie "ldmfd sp!..."). We know that the stack pointer is ! in the list of registers and if we add writeback the ! instruction becomes UNPREDICTABLE. */ ! print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask); ! else ! print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask); ! } if (current_function_pretend_args_size) { *************** arm_output_function_epilogue (file, fram *** 7768,7773 **** --- 7882,7890 ---- } else { + /* We need to take into account any stack-frame rounding. */ + frame_size = arm_get_frame_size (); + if (use_return_insn (FALSE) && return_used_this_function && (frame_size + current_function_outgoing_args_size) != 0 *************** emit_multi_reg_push (mask) *** 7809,7815 **** num_dwarf_regs--; /* For the body of the insn we are going to generate an UNSPEC in ! parallel with several USEs. This allows the insn to be recognised by the push_multi pattern in the arm.md file. The insn looks something like this: --- 7926,7932 ---- num_dwarf_regs--; /* For the body of the insn we are going to generate an UNSPEC in ! parallel with several USEs. This allows the insn to be recognized by the push_multi pattern in the arm.md file. The insn looks something like this: *************** emit_multi_reg_push (mask) *** 7842,7848 **** par = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (num_regs)); dwarf = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (num_dwarf_regs + 1)); - RTX_FRAME_RELATED_P (dwarf) = 1; dwarf_par_index = 1; for (i = 0; i <= LAST_ARM_REGNUM; i++) --- 7959,7964 ---- *************** emit_sfm (base_reg, count) *** 7924,7930 **** par = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count)); dwarf = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count)); - RTX_FRAME_RELATED_P (dwarf) = 1; reg = gen_rtx_REG (XFmode, base_reg++); --- 8040,8045 ---- *************** emit_sfm (base_reg, count) *** 7996,8006 **** current stack pointer -> | | / -- ! For a given funciton some or all of these stack compomnents may not be needed, giving rise to the possibility of eliminating some of the registers. ! The values returned by this function must reflect the behaviour of arm_expand_prologue() and arm_compute_save_reg_mask(). The sign of the number returned reflects the direction of stack --- 8111,8121 ---- current stack pointer -> | | / -- ! For a given function some or all of these stack components may not be needed, giving rise to the possibility of eliminating some of the registers. ! The values returned by this function must reflect the behavior of arm_expand_prologue() and arm_compute_save_reg_mask(). The sign of the number returned reflects the direction of stack *************** arm_compute_initial_elimination_offset ( *** 8012,8018 **** unsigned int from; unsigned int to; { ! unsigned int local_vars = (get_frame_size () + 3) & ~3; unsigned int outgoing_args = current_function_outgoing_args_size; unsigned int stack_frame; unsigned int call_saved_registers; --- 8127,8133 ---- unsigned int from; unsigned int to; { ! unsigned int local_vars = arm_get_frame_size (); unsigned int outgoing_args = current_function_outgoing_args_size; unsigned int stack_frame; unsigned int call_saved_registers; *************** arm_compute_initial_elimination_offset ( *** 8041,8050 **** reg_mask = reg_mask & ~ (reg_mask & - reg_mask); } ! if (regs_ever_live[LR_REGNUM] ! /* If a stack frame is going to be created, the LR will ! be saved as part of that, so we do not need to allow ! for it here. */ && ! frame_pointer_needed) call_saved_registers += 4; --- 8156,8169 ---- reg_mask = reg_mask & ~ (reg_mask & - reg_mask); } ! if ((regs_ever_live[LR_REGNUM] ! /* If optimizing for size, then we save the link register if ! any other integer register is saved. This gives a smaller ! return sequence. */ ! || (optimize_size && call_saved_registers > 0)) ! /* But if a stack frame is going to be created, the LR will ! be saved as part of that, so we do not need to allow for ! it here. */ && ! frame_pointer_needed) call_saved_registers += 4; *************** arm_compute_initial_elimination_offset ( *** 8133,8138 **** --- 8252,8330 ---- } } + /* Calculate the size of the stack frame, taking into account any + padding that is required to ensure stack-alignment. */ + + HOST_WIDE_INT + arm_get_frame_size () + { + int regno; + + int base_size = ROUND_UP (get_frame_size ()); + int entry_size = 0; + unsigned long func_type = arm_current_func_type (); + int leaf; + + if (! TARGET_ARM) + abort(); + + if (! TARGET_ATPCS) + return base_size; + + /* We need to know if we are a leaf function. Unfortunately, it + is possible to be called after start_sequence has been called, + which causes get_insns to return the insns for the sequence, + not the function, which will cause leaf_function_p to return + the incorrect result. + + To work around this, we cache the computed frame size. This + works because we will only be calling RTL expanders that need + to know about leaf functions once reload has completed, and the + frame size cannot be changed after that time, so we can safely + use the cached value. */ + + if (reload_completed) + return cfun->machine->frame_size; + + leaf = leaf_function_p (); + + /* A leaf function does not need any stack alignment if it has nothing + on the stack. */ + if (leaf && base_size == 0) + { + cfun->machine->frame_size = 0; + return 0; + } + + /* We know that SP will be word aligned on entry, and we must + preserve that condition at any subroutine call. But those are + the only constraints. */ + + /* Space for variadic functions. */ + if (current_function_pretend_args_size) + entry_size += current_function_pretend_args_size; + + /* Space for saved registers. */ + entry_size += bit_count (arm_compute_save_reg_mask ()) * 4; + + /* Space for saved FPA registers. */ + if (! IS_VOLATILE (func_type)) + { + for (regno = FIRST_ARM_FP_REGNUM; regno <= LAST_ARM_FP_REGNUM; regno++) + if (regs_ever_live[regno] && ! call_used_regs[regno]) + entry_size += 12; + } + + if ((entry_size + base_size + current_function_outgoing_args_size) & 7) + base_size += 4; + if ((entry_size + base_size + current_function_outgoing_args_size) & 7) + abort (); + + cfun->machine->frame_size = base_size; + + return base_size; + } + /* Generate the prologue instructions for entry into an ARM function. */ void *************** arm_expand_prologue () *** 8368,8374 **** } } ! amount = GEN_INT (-(get_frame_size () + current_function_outgoing_args_size)); if (amount != const0_rtx) --- 8560,8566 ---- } } ! amount = GEN_INT (-(arm_get_frame_size () + current_function_outgoing_args_size)); if (amount != const0_rtx) *************** arm_expand_prologue () *** 8389,8403 **** will prevent the scheduler from moving stores to the frame before the stack adjustment. */ if (frame_pointer_needed) ! { ! rtx unspec = gen_rtx_UNSPEC (SImode, ! gen_rtvec (2, stack_pointer_rtx, ! hard_frame_pointer_rtx), ! UNSPEC_PRLG_STK); ! ! insn = emit_insn (gen_rtx_CLOBBER (VOIDmode, ! gen_rtx_MEM (BLKmode, unspec))); ! } } /* If we are profiling, make sure no instructions are scheduled before --- 8581,8588 ---- will prevent the scheduler from moving stores to the frame before the stack adjustment. */ if (frame_pointer_needed) ! insn = emit_insn (gen_stack_tie (stack_pointer_rtx, ! hard_frame_pointer_rtx)); } /* If we are profiling, make sure no instructions are scheduled before *************** arm_print_operand (stream, x, code) *** 8573,8583 **** case 'M': asm_fprintf (stream, "{%r-%r}", REGNO (x), ! REGNO (x) + NUM_REGS (GET_MODE (x)) - 1); return; case 'd': ! if (!x) return; if (TARGET_ARM) --- 8758,8769 ---- case 'M': asm_fprintf (stream, "{%r-%r}", REGNO (x), ! REGNO (x) + ARM_NUM_REGS (GET_MODE (x)) - 1); return; case 'd': ! /* CONST_TRUE_RTX means always -- that's the default. */ ! if (x == const_true_rtx) return; if (TARGET_ARM) *************** arm_print_operand (stream, x, code) *** 8588,8595 **** return; case 'D': ! if (!x) ! return; if (TARGET_ARM) fputs (arm_condition_codes[ARM_INVERSE_CONDITION_CODE --- 8774,8783 ---- return; case 'D': ! /* CONST_TRUE_RTX means not always -- ie never. We shouldn't ever ! want to do that. */ ! if (x == const_true_rtx) ! abort (); if (TARGET_ARM) fputs (arm_condition_codes[ARM_INVERSE_CONDITION_CODE *************** arm_assemble_integer (x, size, aligned_p *** 8642,8648 **** if (NEED_GOT_RELOC && flag_pic && making_const_table && (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)) { ! if (GET_CODE (x) == SYMBOL_REF && (CONSTANT_POOL_ADDRESS_P (x) || ENCODED_SHORT_CALL_ATTR_P (XSTR (x, 0)))) fputs ("(GOTOFF)", asm_out_file); --- 8830,8836 ---- if (NEED_GOT_RELOC && flag_pic && making_const_table && (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)) { ! if (GET_CODE (x) == SYMBOL_REF && (CONSTANT_POOL_ADDRESS_P (x) || ENCODED_SHORT_CALL_ATTR_P (XSTR (x, 0)))) fputs ("(GOTOFF)", asm_out_file); *************** arm_hard_regno_mode_ok (regno, mode) *** 9171,9177 **** register available to hold the upper part of the value. We probably we ought to ensure that the register is the start of an even numbered register pair. */ ! return (NUM_REGS (mode) < 2) || (regno < LAST_LO_REGNUM); if (regno <= LAST_ARM_REGNUM) /* We allow any value to be stored in the general regisetrs. */ --- 9359,9365 ---- register available to hold the upper part of the value. We probably we ought to ensure that the register is the start of an even numbered register pair. */ ! return (ARM_NUM_REGS (mode) < 2) || (regno < LAST_LO_REGNUM); if (regno <= LAST_ARM_REGNUM) /* We allow any value to be stored in the general regisetrs. */ *************** arm_debugger_arg_offset (value, addr) *** 9251,9257 **** held in the register into an offset from the frame pointer. We do this by searching through the insns for the function looking to see where this register gets its value. If the ! register is initialised from the frame pointer plus an offset then we are in luck and we can continue, otherwise we give up. This code is exercised by producing debugging information --- 9439,9445 ---- held in the register into an offset from the frame pointer. We do this by searching through the insns for the function looking to see where this register gets its value. If the ! register is initialized from the frame pointer plus an offset then we are in luck and we can continue, otherwise we give up. This code is exercised by producing debugging information *************** arm_debugger_arg_offset (value, addr) *** 9302,9308 **** } #define def_builtin(NAME, TYPE, CODE) \ ! builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL) void arm_init_builtins () --- 9490,9496 ---- } #define def_builtin(NAME, TYPE, CODE) \ ! builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, NULL_TREE) void arm_init_builtins () *************** arm_init_builtins () *** 9313,9322 **** tree int_ftype_int, void_ftype_pchar; ! /* void func (void *) */ void_ftype_pchar ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pchar_type_node, endlink)); /* int func (int) */ int_ftype_int --- 9501,9509 ---- tree int_ftype_int, void_ftype_pchar; ! /* void func (char *) */ void_ftype_pchar ! = build_function_type_list (void_type_node, pchar_type_node, NULL_TREE); /* int func (int) */ int_ftype_int *************** arm_expand_builtin (exp, target, subtarg *** 9373,9379 **** emit_insn (pat); return target; } ! /* @@@ Should really do something sensible here. */ return NULL_RTX; } --- 9560,9566 ---- emit_insn (pat); return target; } ! /* @@@ Should really do something sensible here. */ return NULL_RTX; } *************** thumb_shiftable_const (val) *** 9818,9828 **** return 0; } ! /* Returns non-zero if the current function contains, or might contain a far jump. */ int ! thumb_far_jump_used_p (int in_prologue) { rtx insn; --- 10005,10016 ---- return 0; } ! /* Returns nonzero if the current function contains, or might contain a far jump. */ int ! thumb_far_jump_used_p (in_prologue) ! int in_prologue; { rtx insn; *************** thumb_far_jump_used_p (int in_prologue) *** 9887,9893 **** return 0; } ! /* Return non-zero if FUNC must be entered in ARM mode. */ int is_called_in_ARM_mode (func) --- 10075,10081 ---- return 0; } ! /* Return nonzero if FUNC must be entered in ARM mode. */ int is_called_in_ARM_mode (func) *************** thumb_unexpanded_epilogue () *** 9922,9938 **** if (return_used_this_function) return ""; for (regno = 0; regno <= LAST_LO_REGNUM; regno++) ! if (regs_ever_live[regno] && !call_used_regs[regno] ! && !(TARGET_SINGLE_PIC_BASE && (regno == arm_pic_register))) live_regs_mask |= 1 << regno; for (regno = 8; regno < 13; regno++) ! { ! if (regs_ever_live[regno] && !call_used_regs[regno] ! && !(TARGET_SINGLE_PIC_BASE && (regno == arm_pic_register))) ! high_regs_pushed++; ! } /* The prolog may have pushed some high registers to use as work registers. eg the testuite file: --- 10110,10125 ---- if (return_used_this_function) return ""; + if (IS_NAKED (arm_current_func_type ())) + return ""; + for (regno = 0; regno <= LAST_LO_REGNUM; regno++) ! if (THUMB_REG_PUSHED_P (regno)) live_regs_mask |= 1 << regno; for (regno = 8; regno < 13; regno++) ! if (THUMB_REG_PUSHED_P (regno)) ! high_regs_pushed++; /* The prolog may have pushed some high registers to use as work registers. eg the testuite file: *************** thumb_unexpanded_epilogue () *** 9977,9984 **** ("no low registers available for popping high registers"); for (next_hi_reg = 8; next_hi_reg < 13; next_hi_reg++) ! if (regs_ever_live[next_hi_reg] && !call_used_regs[next_hi_reg] ! && !(TARGET_SINGLE_PIC_BASE && (next_hi_reg == arm_pic_register))) break; while (high_regs_pushed) --- 10164,10170 ---- ("no low registers available for popping high registers"); for (next_hi_reg = 8; next_hi_reg < 13; next_hi_reg++) ! if (THUMB_REG_PUSHED_P (next_hi_reg)) break; while (high_regs_pushed) *************** thumb_unexpanded_epilogue () *** 10007,10016 **** regno); for (next_hi_reg++; next_hi_reg < 13; next_hi_reg++) ! if (regs_ever_live[next_hi_reg] ! && !call_used_regs[next_hi_reg] ! && !(TARGET_SINGLE_PIC_BASE ! && (next_hi_reg == arm_pic_register))) break; } } --- 10193,10199 ---- regno); for (next_hi_reg++; next_hi_reg < 13; next_hi_reg++) ! if (THUMB_REG_PUSHED_P (next_hi_reg)) break; } } *************** thumb_unexpanded_epilogue () *** 10084,10120 **** /* Functions to save and restore machine-specific function data. */ ! static void ! arm_mark_machine_status (p) ! struct function * p; ! { ! machine_function *machine = p->machine; ! ! if (machine) ! ggc_mark_rtx (machine->eh_epilogue_sp_ofs); ! } ! ! static void ! arm_init_machine_status (p) ! struct function * p; { ! p->machine = ! (machine_function *) xcalloc (1, sizeof (machine_function)); ! #if ARM_FT_UNKNOWWN != 0 ! ((machine_function *) p->machine)->func_type = ARM_FT_UNKNOWN; #endif ! } ! ! static void ! arm_free_machine_status (p) ! struct function * p; ! { ! if (p->machine) ! { ! free (p->machine); ! p->machine = NULL; ! } } /* Return an RTX indicating where the return address to the --- 10267,10282 ---- /* Functions to save and restore machine-specific function data. */ ! static struct machine_function * ! arm_init_machine_status () { ! struct machine_function *machine; ! machine = (machine_function *) ggc_alloc_cleared (sizeof (machine_function)); ! #if ARM_FT_UNKNOWN != 0 ! machine->func_type = ARM_FT_UNKNOWN; #endif ! return machine; } /* Return an RTX indicating where the return address to the *************** arm_init_expanders () *** 10145,10152 **** { /* Arrange to initialize and mark the machine per-function status. */ init_machine_status = arm_init_machine_status; ! mark_machine_status = arm_mark_machine_status; ! free_machine_status = arm_free_machine_status; } /* Generate the rest of a function's prologue. */ --- 10307,10398 ---- { /* Arrange to initialize and mark the machine per-function status. */ init_machine_status = arm_init_machine_status; ! } ! ! HOST_WIDE_INT ! thumb_get_frame_size () ! { ! int regno; ! ! int base_size = ROUND_UP (get_frame_size ()); ! int count_regs = 0; ! int entry_size = 0; ! int leaf; ! ! if (! TARGET_THUMB) ! abort (); ! ! if (! TARGET_ATPCS) ! return base_size; ! ! /* We need to know if we are a leaf function. Unfortunately, it ! is possible to be called after start_sequence has been called, ! which causes get_insns to return the insns for the sequence, ! not the function, which will cause leaf_function_p to return ! the incorrect result. ! ! To work around this, we cache the computed frame size. This ! works because we will only be calling RTL expanders that need ! to know about leaf functions once reload has completed, and the ! frame size cannot be changed after that time, so we can safely ! use the cached value. */ ! ! if (reload_completed) ! return cfun->machine->frame_size; ! ! leaf = leaf_function_p (); ! ! /* A leaf function does not need any stack alignment if it has nothing ! on the stack. */ ! if (leaf && base_size == 0) ! { ! cfun->machine->frame_size = 0; ! return 0; ! } ! ! /* We know that SP will be word aligned on entry, and we must ! preserve that condition at any subroutine call. But those are ! the only constraints. */ ! ! /* Space for variadic functions. */ ! if (current_function_pretend_args_size) ! entry_size += current_function_pretend_args_size; ! ! /* Space for pushed lo registers. */ ! for (regno = 0; regno <= LAST_LO_REGNUM; regno++) ! if (THUMB_REG_PUSHED_P (regno)) ! count_regs++; ! ! /* Space for backtrace structure. */ ! if (TARGET_BACKTRACE) ! { ! if (count_regs == 0 && regs_ever_live[LAST_ARG_REGNUM] != 0) ! entry_size += 20; ! else ! entry_size += 16; ! } ! ! if (count_regs || !leaf || thumb_far_jump_used_p (1)) ! count_regs++; /* LR */ ! ! entry_size += count_regs * 4; ! count_regs = 0; ! ! /* Space for pushed hi regs. */ ! for (regno = 8; regno < 13; regno++) ! if (THUMB_REG_PUSHED_P (regno)) ! count_regs++; ! ! entry_size += count_regs * 4; ! ! if ((entry_size + base_size + current_function_outgoing_args_size) & 7) ! base_size += 4; ! if ((entry_size + base_size + current_function_outgoing_args_size) & 7) ! abort (); ! ! cfun->machine->frame_size = base_size; ! ! return base_size; } /* Generate the rest of a function's prologue. */ *************** arm_init_expanders () *** 10154,10160 **** void thumb_expand_prologue () { ! HOST_WIDE_INT amount = (get_frame_size () + current_function_outgoing_args_size); unsigned long func_type; --- 10400,10406 ---- void thumb_expand_prologue () { ! HOST_WIDE_INT amount = (thumb_get_frame_size () + current_function_outgoing_args_size); unsigned long func_type; *************** thumb_expand_prologue () *** 10200,10213 **** been pushed at the start of the prologue and so we can corrupt it now. */ for (regno = LAST_ARG_REGNUM + 1; regno <= LAST_LO_REGNUM; regno++) ! if (regs_ever_live[regno] ! && !call_used_regs[regno] /* Paranoia */ ! && !(TARGET_SINGLE_PIC_BASE && (regno == arm_pic_register)) && !(frame_pointer_needed && (regno == THUMB_HARD_FRAME_POINTER_REGNUM))) break; ! if (regno > LAST_LO_REGNUM) /* Very unlikely */ { rtx spare = gen_rtx (REG, SImode, IP_REGNUM); --- 10446,10457 ---- been pushed at the start of the prologue and so we can corrupt it now. */ for (regno = LAST_ARG_REGNUM + 1; regno <= LAST_LO_REGNUM; regno++) ! if (THUMB_REG_PUSHED_P (regno) && !(frame_pointer_needed && (regno == THUMB_HARD_FRAME_POINTER_REGNUM))) break; ! if (regno > LAST_LO_REGNUM) /* Very unlikely. */ { rtx spare = gen_rtx (REG, SImode, IP_REGNUM); *************** thumb_expand_prologue () *** 10251,10257 **** void thumb_expand_epilogue () { ! HOST_WIDE_INT amount = (get_frame_size () + current_function_outgoing_args_size); /* Naked functions don't have prologues. */ --- 10495,10501 ---- void thumb_expand_epilogue () { ! HOST_WIDE_INT amount = (thumb_get_frame_size () + current_function_outgoing_args_size); /* Naked functions don't have prologues. */ *************** thumb_output_function_prologue (f, size) *** 10322,10334 **** #define STUB_NAME ".real_start_of" ! asm_fprintf (f, "\t.code\t16\n"); #ifdef ARM_PE if (arm_dllexport_name_p (name)) name = arm_strip_name_encoding (name); #endif asm_fprintf (f, "\t.globl %s%U%s\n", STUB_NAME, name); ! asm_fprintf (f, "\t.thumb_func\n"); asm_fprintf (f, "%s%U%s:\n", STUB_NAME, name); } --- 10566,10578 ---- #define STUB_NAME ".real_start_of" ! fprintf (f, "\t.code\t16\n"); #ifdef ARM_PE if (arm_dllexport_name_p (name)) name = arm_strip_name_encoding (name); #endif asm_fprintf (f, "\t.globl %s%U%s\n", STUB_NAME, name); ! fprintf (f, "\t.thumb_func\n"); asm_fprintf (f, "%s%U%s:\n", STUB_NAME, name); } *************** thumb_output_function_prologue (f, size) *** 10338,10346 **** { int num_pushes; ! asm_fprintf (f, "\tpush\t{"); ! num_pushes = NUM_INTS (current_function_pretend_args_size); for (regno = LAST_ARG_REGNUM + 1 - num_pushes; regno <= LAST_ARG_REGNUM; --- 10582,10590 ---- { int num_pushes; ! fprintf (f, "\tpush\t{"); ! num_pushes = ARM_NUM_INTS (current_function_pretend_args_size); for (regno = LAST_ARG_REGNUM + 1 - num_pushes; regno <= LAST_ARG_REGNUM; *************** thumb_output_function_prologue (f, size) *** 10348,10354 **** asm_fprintf (f, "%r%s", regno, regno == LAST_ARG_REGNUM ? "" : ", "); ! asm_fprintf (f, "}\n"); } else asm_fprintf (f, "\tsub\t%r, %r, #%d\n", --- 10592,10598 ---- asm_fprintf (f, "%r%s", regno, regno == LAST_ARG_REGNUM ? "" : ", "); ! fprintf (f, "}\n"); } else asm_fprintf (f, "\tsub\t%r, %r, #%d\n", *************** thumb_output_function_prologue (f, size) *** 10357,10364 **** } for (regno = 0; regno <= LAST_LO_REGNUM; regno++) ! if (regs_ever_live[regno] && !call_used_regs[regno] ! && !(TARGET_SINGLE_PIC_BASE && (regno == arm_pic_register))) live_regs_mask |= 1 << regno; if (live_regs_mask || !leaf_function_p () || thumb_far_jump_used_p (1)) --- 10601,10607 ---- } for (regno = 0; regno <= LAST_LO_REGNUM; regno++) ! if (THUMB_REG_PUSHED_P (regno)) live_regs_mask |= 1 << regno; if (live_regs_mask || !leaf_function_p () || thumb_far_jump_used_p (1)) *************** thumb_output_function_prologue (f, size) *** 10459,10469 **** thumb_pushpop (f, live_regs_mask, 1); for (regno = 8; regno < 13; regno++) ! { ! if (regs_ever_live[regno] && !call_used_regs[regno] ! && !(TARGET_SINGLE_PIC_BASE && (regno == arm_pic_register))) ! high_regs_pushed++; ! } if (high_regs_pushed) { --- 10702,10709 ---- thumb_pushpop (f, live_regs_mask, 1); for (regno = 8; regno < 13; regno++) ! if (THUMB_REG_PUSHED_P (regno)) ! high_regs_pushed++; if (high_regs_pushed) { *************** thumb_output_function_prologue (f, size) *** 10472,10491 **** int next_hi_reg; for (next_hi_reg = 12; next_hi_reg > LAST_LO_REGNUM; next_hi_reg--) ! { ! if (regs_ever_live[next_hi_reg] && !call_used_regs[next_hi_reg] ! && !(TARGET_SINGLE_PIC_BASE ! && (next_hi_reg == arm_pic_register))) ! break; ! } pushable_regs = mask; if (pushable_regs == 0) { /* Desperation time -- this probably will never happen. */ ! if (regs_ever_live[LAST_ARG_REGNUM] ! || !call_used_regs[LAST_ARG_REGNUM]) asm_fprintf (f, "\tmov\t%r, %r\n", IP_REGNUM, LAST_ARG_REGNUM); mask = 1 << LAST_ARG_REGNUM; } --- 10712,10726 ---- int next_hi_reg; for (next_hi_reg = 12; next_hi_reg > LAST_LO_REGNUM; next_hi_reg--) ! if (THUMB_REG_PUSHED_P (next_hi_reg)) ! break; pushable_regs = mask; if (pushable_regs == 0) { /* Desperation time -- this probably will never happen. */ ! if (THUMB_REG_PUSHED_P (LAST_ARG_REGNUM)) asm_fprintf (f, "\tmov\t%r, %r\n", IP_REGNUM, LAST_ARG_REGNUM); mask = 1 << LAST_ARG_REGNUM; } *************** thumb_output_function_prologue (f, size) *** 10501,10515 **** high_regs_pushed--; if (high_regs_pushed) ! for (next_hi_reg--; next_hi_reg > LAST_LO_REGNUM; ! next_hi_reg--) ! { ! if (regs_ever_live[next_hi_reg] ! && !call_used_regs[next_hi_reg] ! && !(TARGET_SINGLE_PIC_BASE ! && (next_hi_reg == arm_pic_register))) break; ! } else { mask &= ~((1 << regno) - 1); --- 10736,10747 ---- high_regs_pushed--; if (high_regs_pushed) ! { ! for (next_hi_reg--; next_hi_reg > LAST_LO_REGNUM; ! next_hi_reg--) ! if (THUMB_REG_PUSHED_P (next_hi_reg)) break; ! } else { mask &= ~((1 << regno) - 1); *************** thumb_output_function_prologue (f, size) *** 10522,10529 **** } if (pushable_regs == 0 ! && (regs_ever_live[LAST_ARG_REGNUM] ! || !call_used_regs[LAST_ARG_REGNUM])) asm_fprintf (f, "\tmov\t%r, %r\n", LAST_ARG_REGNUM, IP_REGNUM); } } --- 10754,10760 ---- } if (pushable_regs == 0 ! && (THUMB_REG_PUSHED_P (LAST_ARG_REGNUM))) asm_fprintf (f, "\tmov\t%r, %r\n", LAST_ARG_REGNUM, IP_REGNUM); } } *************** thumb_reload_in_hi (operands) *** 10821,10827 **** that starts with the character 'c'. */ static int ! arm_get_strip_length (char c) { switch (c) { --- 11052,11059 ---- that starts with the character 'c'. */ static int ! arm_get_strip_length (c) ! int c; { switch (c) { *************** arm_get_strip_length (char c) *** 10834,10840 **** and all prefix encodings stripped from it. */ const char * ! arm_strip_name_encoding (const char * name) { int skip; --- 11066,11073 ---- and all prefix encodings stripped from it. */ const char * ! arm_strip_name_encoding (name) ! const char * name; { int skip; *************** arm_strip_name_encoding (const char * na *** 10844,10853 **** return name; } #ifdef AOF_ASSEMBLER /* Special functions only needed when producing AOF syntax assembler. */ - rtx aof_pic_label = NULL_RTX; struct pic_chain { struct pic_chain * next; --- 11077,11111 ---- return name; } + /* If there is a '*' anywhere in the name's prefix, then + emit the stripped name verbatim, otherwise prepend an + underscore if leading underscores are being used. */ + + void + arm_asm_output_labelref (stream, name) + FILE * stream; + const char * name; + { + int skip; + int verbatim = 0; + + while ((skip = arm_get_strip_length (* name))) + { + verbatim |= (*name == '*'); + name += skip; + } + + if (verbatim) + fputs (name, stream); + else + asm_fprintf (stream, "%U%s", name); + } + + rtx aof_pic_label; + #ifdef AOF_ASSEMBLER /* Special functions only needed when producing AOF syntax assembler. */ struct pic_chain { struct pic_chain * next; *************** aof_pic_entry (x) *** 10865,10874 **** if (aof_pic_label == NULL_RTX) { - /* We mark this here and not in arm_add_gc_roots() to avoid - polluting even more code with ifdefs, and because it never - contains anything useful until we assign to it here. */ - ggc_add_rtx_root (&aof_pic_label, 1); aof_pic_label = gen_rtx_SYMBOL_REF (Pmode, "x$adcons"); } --- 11123,11128 ---- *************** aof_dump_imports (f) *** 11003,11008 **** --- 11257,11272 ---- imports_list = imports_list->next; } } + + static void + aof_globalize_label (stream, name) + FILE *stream; + const char *name; + { + default_globalize_label (stream, name); + if (! strcmp (name, "main")) + arm_main_function = 1; + } #endif /* AOF_ASSEMBLER */ #ifdef OBJECT_FORMAT_ELF *************** arm_elf_asm_named_section (name, flags) *** 11018,11025 **** const char *name; unsigned int flags; { ! char flagchars[8], *f = flagchars; ! const char *type; if (!(flags & SECTION_DEBUG)) *f++ = 'a'; --- 11282,11294 ---- const char *name; unsigned int flags; { ! char flagchars[10], *f = flagchars; ! ! if (! named_section_first_declaration (name)) ! { ! fprintf (asm_out_file, "\t.section\t%s\n", name); ! return; ! } if (!(flags & SECTION_DEBUG)) *f++ = 'a'; *************** arm_elf_asm_named_section (name, flags) *** 11033,11050 **** *f++ = 'M'; if (flags & SECTION_STRINGS) *f++ = 'S'; *f = '\0'; ! if (flags & SECTION_BSS) ! type = "nobits"; ! else ! type = "progbits"; ! if (flags & SECTION_ENTSIZE) ! fprintf (asm_out_file, "\t.section\t%s,\"%s\",%%%s,%d\n", ! name, flagchars, type, flags & SECTION_ENTSIZE); ! else ! fprintf (asm_out_file, "\t.section\t%s,\"%s\",%%%s\n", ! name, flagchars, type); } #endif --- 11302,11404 ---- *f++ = 'M'; if (flags & SECTION_STRINGS) *f++ = 'S'; + if (flags & SECTION_TLS) + *f++ = 'T'; *f = '\0'; ! fprintf (asm_out_file, "\t.section\t%s,\"%s\"", name, flagchars); ! if (!(flags & SECTION_NOTYPE)) ! { ! const char *type; ! ! if (flags & SECTION_BSS) ! type = "nobits"; ! else ! type = "progbits"; ! ! fprintf (asm_out_file, ",%%%s", type); ! ! if (flags & SECTION_ENTSIZE) ! fprintf (asm_out_file, ",%d", flags & SECTION_ENTSIZE); ! } ! ! putc ('\n', asm_out_file); } #endif + + #ifndef ARM_PE + /* Symbols in the text segment can be accessed without indirecting via the + constant pool; it may take an extra binary operation, but this is still + faster than indirecting via memory. Don't do this when not optimizing, + since we won't be calculating al of the offsets necessary to do this + simplification. */ + + static void + arm_encode_section_info (decl, first) + tree decl; + int first; + { + /* This doesn't work with AOF syntax, since the string table may be in + a different AREA. */ + #ifndef AOF_ASSEMBLER + if (optimize > 0 && TREE_CONSTANT (decl) + && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) + { + rtx rtl = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' + ? TREE_CST_RTL (decl) : DECL_RTL (decl)); + SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; + } + #endif + + /* If we are referencing a function that is weak then encode a long call + flag in the function name, otherwise if the function is static or + or known to be defined in this file then encode a short call flag. */ + if (first && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd') + { + if (TREE_CODE (decl) == FUNCTION_DECL && DECL_WEAK (decl)) + arm_encode_call_attribute (decl, LONG_CALL_FLAG_CHAR); + else if (! TREE_PUBLIC (decl)) + arm_encode_call_attribute (decl, SHORT_CALL_FLAG_CHAR); + } + } + #endif /* !ARM_PE */ + + /* Output code to add DELTA to the first argument, and then jump + to FUNCTION. Used for C++ multiple inheritance. */ + + static void + arm_output_mi_thunk (file, thunk, delta, vcall_offset, function) + FILE *file; + tree thunk ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; + tree function; + { + int mi_delta = delta; + const char *const mi_op = mi_delta < 0 ? "sub" : "add"; + int shift = 0; + int this_regno = (aggregate_value_p (TREE_TYPE (TREE_TYPE (function))) + ? 1 : 0); + if (mi_delta < 0) + mi_delta = - mi_delta; + while (mi_delta != 0) + { + if ((mi_delta & (3 << shift)) == 0) + shift += 2; + else + { + asm_fprintf (file, "\t%s\t%r, %r, #%d\n", + mi_op, this_regno, this_regno, + mi_delta & (0xff << shift)); + mi_delta &= ~(0xff << shift); + shift += 8; + } + } + fputs ("\tb\t", file); + assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); + if (NEED_PLT_RELOC) + fputs ("(PLT)", file); + fputc ('\n', file); + } + diff -Nrc3pad gcc-3.2.3/gcc/config/arm/arm.h gcc-3.3/gcc/config/arm/arm.h *** gcc-3.2.3/gcc/config/arm/arm.h 2002-09-30 11:54:00.000000000 +0000 --- gcc-3.3/gcc/config/arm/arm.h 2002-11-15 11:21:36.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 26,31 **** --- 26,77 ---- #ifndef GCC_ARM_H #define GCC_ARM_H + /* Target CPU builtins. */ + #define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + if (TARGET_ARM) \ + builtin_define ("__arm__"); \ + else \ + builtin_define ("__thumb__"); \ + \ + if (TARGET_BIG_END) \ + { \ + builtin_define ("__ARMEB__"); \ + if (TARGET_THUMB) \ + builtin_define ("__THUMBEB__"); \ + if (TARGET_LITTLE_WORDS) \ + builtin_define ("__ARMWEL__"); \ + } \ + else \ + { \ + builtin_define ("__ARMEL__"); \ + if (TARGET_THUMB) \ + builtin_define ("__THUMBEL__"); \ + } \ + \ + if (TARGET_APCS_32) \ + builtin_define ("__APCS_32__"); \ + else \ + builtin_define ("__APCS_26__"); \ + \ + if (TARGET_SOFT_FLOAT) \ + builtin_define ("__SOFTFP__"); \ + \ + /* FIXME: TARGET_HARD_FLOAT currently implies \ + FPA. */ \ + if (TARGET_VFP && !TARGET_HARD_FLOAT) \ + builtin_define ("__VFP_FP__"); \ + \ + /* Add a define for interworking. \ + Needed when building libgcc.a. */ \ + if (TARGET_INTERWORK) \ + builtin_define ("__THUMB_INTERWORK__"); \ + \ + builtin_assert ("cpu=arm"); \ + builtin_assert ("machine=arm"); \ + } while (0) + #define TARGET_CPU_arm2 0x0000 #define TARGET_CPU_arm250 0x0000 #define TARGET_CPU_arm3 0x0000 *************** extern arm_cc arm_current_cc; *** 66,86 **** extern int arm_target_label; extern int arm_ccfsm_state; ! extern struct rtx_def * arm_target_insn; /* Run-time compilation parameters selecting different hardware subsets. */ extern int target_flags; /* The floating point instruction architecture, can be 2 or 3 */ extern const char * target_fp_name; /* Define the information needed to generate branch insns. This is ! stored from the compare operation. Note that we can't use "rtx" here ! since it hasn't been defined! */ ! extern struct rtx_def * arm_compare_op0; ! extern struct rtx_def * arm_compare_op1; /* The label of the current constant pool. */ ! extern struct rtx_def * pool_vector_label; /* Set to 1 when a return insn is output, this means that the epilogue is not needed. */ extern int return_used_this_function; /* Just in case configure has failed to define anything. */ #ifndef TARGET_CPU_DEFAULT --- 112,133 ---- extern int arm_target_label; extern int arm_ccfsm_state; ! extern GTY(()) rtx arm_target_insn; /* Run-time compilation parameters selecting different hardware subsets. */ extern int target_flags; /* The floating point instruction architecture, can be 2 or 3 */ extern const char * target_fp_name; /* Define the information needed to generate branch insns. This is ! stored from the compare operation. */ ! extern GTY(()) rtx arm_compare_op0; ! extern GTY(()) rtx arm_compare_op1; /* The label of the current constant pool. */ ! extern rtx pool_vector_label; /* Set to 1 when a return insn is output, this means that the epilogue is not needed. */ extern int return_used_this_function; + /* Used to produce AOF syntax assembler. */ + extern GTY(()) rtx aof_pic_label; /* Just in case configure has failed to define anything. */ #ifndef TARGET_CPU_DEFAULT *************** Unrecognized value in TARGET_CPU_DEFAULT *** 126,141 **** #endif #undef CPP_SPEC ! #define CPP_SPEC "\ ! %(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) \ ! %(cpp_endian) %(subtarget_cpp_spec) %(cpp_isa) %(cpp_interwork)" ! ! #define CPP_ISA_SPEC "%{mthumb:-D__thumb__} %{!mthumb:-D__arm__}" /* Set the architecture define -- if -march= is set, then it overrides the -mcpu= setting. */ #define CPP_CPU_ARCH_SPEC "\ - -Acpu=arm -Amachine=arm \ %{march=arm2:-D__ARM_ARCH_2__} \ %{march=arm250:-D__ARM_ARCH_2__} \ %{march=arm3:-D__ARM_ARCH_2__} \ --- 173,189 ---- #endif #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu_arch) %(subtarget_cpp_spec) \ ! %{mapcs-32:%{mapcs-26: \ ! %e-mapcs-26 and -mapcs-32 may not be used together}} \ ! %{msoft-float:%{mhard-float: \ ! %e-msoft-float and -mhard_float may not be used together}} \ ! %{mbig-endian:%{mlittle-endian: \ ! %e-mbig-endian and -mlittle-endian may not be used together}}" /* Set the architecture define -- if -march= is set, then it overrides the -mcpu= setting. */ #define CPP_CPU_ARCH_SPEC "\ %{march=arm2:-D__ARM_ARCH_2__} \ %{march=arm250:-D__ARM_ARCH_2__} \ %{march=arm3:-D__ARM_ARCH_2__} \ *************** Unrecognized value in TARGET_CPU_DEFAULT *** 206,263 **** %{!mcpu*:%(cpp_cpu_arch_default)}} \ " - /* Define __APCS_26__ if the PC also contains the PSR */ - #define CPP_APCS_PC_SPEC "\ - %{mapcs-32:%{mapcs-26:%e-mapcs-26 and -mapcs-32 may not be used together} \ - -D__APCS_32__} \ - %{mapcs-26:-D__APCS_26__} \ - %{!mapcs-32: %{!mapcs-26:%(cpp_apcs_pc_default)}} \ - " - - #ifndef CPP_APCS_PC_DEFAULT_SPEC - #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_26__" - #endif - - #define CPP_FLOAT_SPEC "\ - %{msoft-float:\ - %{mhard-float:%e-msoft-float and -mhard_float may not be used together} \ - -D__SOFTFP__} \ - %{!mhard-float:%{!msoft-float:%(cpp_float_default)}} \ - " - - /* Default is hard float, which doesn't define anything */ - #define CPP_FLOAT_DEFAULT_SPEC "" - - #define CPP_ENDIAN_SPEC "\ - %{mbig-endian: \ - %{mlittle-endian: \ - %e-mbig-endian and -mlittle-endian may not be used together} \ - -D__ARMEB__ %{mwords-little-endian:-D__ARMWEL__} %{mthumb:-D__THUMBEB__}}\ - %{mlittle-endian:-D__ARMEL__ %{mthumb:-D__THUMBEL__}} \ - %{!mlittle-endian:%{!mbig-endian:%(cpp_endian_default)}} \ - " - - /* Default is little endian. */ - #define CPP_ENDIAN_DEFAULT_SPEC "-D__ARMEL__ %{mthumb:-D__THUMBEL__}" - - /* Add a define for interworking. Needed when building libgcc.a. - This must define __THUMB_INTERWORK__ to the pre-processor if - interworking is enabled by default. */ - #ifndef CPP_INTERWORK_DEFAULT_SPEC - #define CPP_INTERWORK_DEFAULT_SPEC "" - #endif - - #define CPP_INTERWORK_SPEC " \ - %{mthumb-interwork: \ - %{mno-thumb-interwork: %eincompatible interworking options} \ - -D__THUMB_INTERWORK__} \ - %{!mthumb-interwork:%{!mno-thumb-interwork:%(cpp_interwork_default)}} \ - " - - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES "" - #endif - #ifndef CC1_SPEC #define CC1_SPEC "" #endif --- 254,259 ---- *************** Unrecognized value in TARGET_CPU_DEFAULT *** 274,288 **** #define EXTRA_SPECS \ { "cpp_cpu_arch", CPP_CPU_ARCH_SPEC }, \ { "cpp_cpu_arch_default", CPP_ARCH_DEFAULT_SPEC }, \ - { "cpp_apcs_pc", CPP_APCS_PC_SPEC }, \ - { "cpp_apcs_pc_default", CPP_APCS_PC_DEFAULT_SPEC }, \ - { "cpp_float", CPP_FLOAT_SPEC }, \ - { "cpp_float_default", CPP_FLOAT_DEFAULT_SPEC }, \ - { "cpp_endian", CPP_ENDIAN_SPEC }, \ - { "cpp_endian_default", CPP_ENDIAN_DEFAULT_SPEC }, \ - { "cpp_isa", CPP_ISA_SPEC }, \ - { "cpp_interwork", CPP_INTERWORK_SPEC }, \ - { "cpp_interwork_default", CPP_INTERWORK_DEFAULT_SPEC }, \ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ SUBTARGET_EXTRA_SPECS --- 270,275 ---- *************** Unrecognized value in TARGET_CPU_DEFAULT *** 383,388 **** --- 370,381 ---- destination is non-Thumb aware. */ #define THUMB_FLAG_CALLER_SUPER_INTERWORKING (1 << 20) + /* Nonzero means target uses VFP FP. */ + #define ARM_FLAG_VFP (1 << 21) + + /* Nonzero means to use ARM/Thumb Procedure Call Standard conventions. */ + #define ARM_FLAG_ATPCS (1 << 22) + #define TARGET_APCS_FRAME (target_flags & ARM_FLAG_APCS_FRAME) #define TARGET_POKE_FUNCTION_NAME (target_flags & ARM_FLAG_POKE) #define TARGET_FPE (target_flags & ARM_FLAG_FPE) *************** Unrecognized value in TARGET_CPU_DEFAULT *** 390,398 **** --- 383,393 ---- #define TARGET_APCS_STACK (target_flags & ARM_FLAG_APCS_STACK) #define TARGET_APCS_FLOAT (target_flags & ARM_FLAG_APCS_FLOAT) #define TARGET_APCS_REENT (target_flags & ARM_FLAG_APCS_REENT) + #define TARGET_ATPCS (target_flags & ARM_FLAG_ATPCS) #define TARGET_MMU_TRAPS (target_flags & ARM_FLAG_MMU_TRAPS) #define TARGET_SOFT_FLOAT (target_flags & ARM_FLAG_SOFT_FLOAT) #define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) + #define TARGET_VFP (target_flags & ARM_FLAG_VFP) #define TARGET_BIG_END (target_flags & ARM_FLAG_BIG_END) #define TARGET_INTERWORK (target_flags & ARM_FLAG_INTERWORK) #define TARGET_LITTLE_WORDS (target_flags & ARM_FLAG_LITTLE_WORDS) *************** Unrecognized value in TARGET_CPU_DEFAULT *** 409,416 **** ? (target_flags & THUMB_FLAG_LEAF_BACKTRACE) \ : (target_flags & THUMB_FLAG_BACKTRACE)) ! /* SUBTARGET_SWITCHES is used to add flags on a per-config basis. ! Bit 31 is reserved. See riscix.h. */ #ifndef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES #endif --- 404,410 ---- ? (target_flags & THUMB_FLAG_LEAF_BACKTRACE) \ : (target_flags & THUMB_FLAG_BACKTRACE)) ! /* SUBTARGET_SWITCHES is used to add flags on a per-config basis. */ #ifndef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES #endif *************** extern int arm_is_6_or_7; *** 647,654 **** /* This is required to ensure that push insns always push a word. */ #define PROMOTE_FUNCTION_ARGS - /* Define for XFmode extended real floating point support. - This will automatically cause REAL_ARITHMETIC to be defined. */ /* For the ARM: I think I have added all the code to make this work. Unfortunately, early releases of the floating point emulation code on RISCiX used a --- 641,646 ---- *************** extern int arm_is_6_or_7; *** 663,674 **** /* Disable XFmode patterns in md file */ #define ENABLE_XF_PATTERNS 0 - /* Define if you don't want extended real, but do want to use the - software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - /* See comment above */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN 0 --- 655,660 ---- *************** extern int arm_is_6_or_7; *** 693,714 **** #endif /* Define this if most significant word of doubles is the lowest numbered. ! This is always true, even when in little-endian mode. */ ! #define FLOAT_WORDS_BIG_ENDIAN 1 ! ! /* Number of bits in an addressable storage unit */ ! #define BITS_PER_UNIT 8 ! ! #define BITS_PER_WORD 32 #define UNITS_PER_WORD 4 - #define POINTER_SIZE 32 - #define PARM_BOUNDARY 32 #define STACK_BOUNDARY 32 #define FUNCTION_BOUNDARY 32 /* The lowest bit is used to indicate Thumb-mode functions, so the --- 679,696 ---- #endif /* Define this if most significant word of doubles is the lowest numbered. ! The rules are different based on whether or not we use FPA-format or ! VFP-format doubles. */ ! #define FLOAT_WORDS_BIG_ENDIAN (arm_float_words_big_endian ()) #define UNITS_PER_WORD 4 #define PARM_BOUNDARY 32 #define STACK_BOUNDARY 32 + #define PREFERRED_STACK_BOUNDARY (TARGET_ATPCS ? 64 : 32) + #define FUNCTION_BOUNDARY 32 /* The lowest bit is used to indicate Thumb-mode functions, so the *************** extern int arm_is_6_or_7; *** 737,743 **** #define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary extern int arm_structure_size_boundary; ! /* This is the value used to initialise arm_structure_size_boundary. If a particular arm target wants to change the default value it should change the definition of this macro, not STRUCTRUE_SIZE_BOUNDARY. See netbsd.h for an example of this. */ --- 719,725 ---- #define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary extern int arm_structure_size_boundary; ! /* This is the value used to initialize arm_structure_size_boundary. If a particular arm target wants to change the default value it should change the definition of this macro, not STRUCTRUE_SIZE_BOUNDARY. See netbsd.h for an example of this. */ *************** extern int arm_structure_size_boundary; *** 748,759 **** /* Used when parsing command line option -mstructure_size_boundary. */ extern const char * structure_size_string; ! /* Non-zero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 1 - - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - /* Standard register usage. */ --- 730,738 ---- /* Used when parsing command line option -mstructure_size_boundary. */ extern const char * structure_size_string; ! /* Nonzero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 1 /* Standard register usage. */ *************** extern const char * structure_size_strin *** 889,903 **** #define ROUND_UP(X) (((X) + 3) & ~3) /* Convert fron bytes to ints. */ ! #define NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) /* The number of (integer) registers required to hold a quantity of type MODE. */ ! #define NUM_REGS(MODE) \ ! NUM_INTS (GET_MODE_SIZE (MODE)) /* The number of (integer) registers required to hold a quantity of TYPE MODE. */ ! #define NUM_REGS2(MODE, TYPE) \ ! NUM_INTS ((MODE) == BLKmode ? \ int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE)) /* The number of (integer) argument register available. */ --- 868,882 ---- #define ROUND_UP(X) (((X) + 3) & ~3) /* Convert fron bytes to ints. */ ! #define ARM_NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) /* The number of (integer) registers required to hold a quantity of type MODE. */ ! #define ARM_NUM_REGS(MODE) \ ! ARM_NUM_INTS (GET_MODE_SIZE (MODE)) /* The number of (integer) registers required to hold a quantity of TYPE MODE. */ ! #define ARM_NUM_REGS2(MODE, TYPE) \ ! ARM_NUM_INTS ((MODE) == BLKmode ? \ int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE)) /* The number of (integer) argument register available. */ *************** extern const char * structure_size_strin *** 1001,1007 **** && REGNO >= FIRST_ARM_FP_REGNUM \ && REGNO != FRAME_POINTER_REGNUM \ && REGNO != ARG_POINTER_REGNUM) \ ! ? 1 : NUM_REGS (MODE)) /* Return true if REGNO is suitable for holding a quantity of type MODE. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ --- 980,986 ---- && REGNO >= FIRST_ARM_FP_REGNUM \ && REGNO != FRAME_POINTER_REGNUM \ && REGNO != ARG_POINTER_REGNUM) \ ! ? 1 : ARM_NUM_REGS (MODE)) /* Return true if REGNO is suitable for holding a quantity of type MODE. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ *************** enum reg_class *** 1324,1330 **** needed to represent mode MODE in a register of class CLASS. ARM regs are UNITS_PER_WORD bits while FPU regs can hold any FP mode */ #define CLASS_MAX_NREGS(CLASS, MODE) \ ! ((CLASS) == FPU_REGS ? 1 : NUM_REGS (MODE)) /* Moves between FPU_REGS and GENERAL_REGS are two memory insns. */ #define REGISTER_MOVE_COST(MODE, FROM, TO) \ --- 1303,1309 ---- needed to represent mode MODE in a register of class CLASS. ARM regs are UNITS_PER_WORD bits while FPU regs can hold any FP mode */ #define CLASS_MAX_NREGS(CLASS, MODE) \ ! ((CLASS) == FPU_REGS ? 1 : ARM_NUM_REGS (MODE)) /* Moves between FPU_REGS and GENERAL_REGS are two memory insns. */ #define REGISTER_MOVE_COST(MODE, FROM, TO) \ *************** enum reg_class *** 1420,1426 **** Note value 7 is currently unassigned. Also note that the interrupt function types all have bit 2 set, so that they can be tested for easily. Note that 0 is deliberately chosen for ARM_FT_UNKNOWN so that when the ! machine_function structure is initialised (to zero) func_type will default to unknown. This will force the first use of arm_current_func_type to call arm_compute_func_type. */ #define ARM_FT_UNKNOWN 0 /* Type has not yet been determined. */ --- 1399,1405 ---- Note value 7 is currently unassigned. Also note that the interrupt function types all have bit 2 set, so that they can be tested for easily. Note that 0 is deliberately chosen for ARM_FT_UNKNOWN so that when the ! machine_function structure is initialized (to zero) func_type will default to unknown. This will force the first use of arm_current_func_type to call arm_compute_func_type. */ #define ARM_FT_UNKNOWN 0 /* Type has not yet been determined. */ *************** enum reg_class *** 1449,1464 **** /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ ! typedef struct machine_function { /* Additionsl stack adjustment in __builtin_eh_throw. */ ! struct rtx_def *eh_epilogue_sp_ofs; /* Records if LR has to be saved for far jumps. */ int far_jump_used; /* Records if ARG_POINTER was ever live. */ int arg_pointer_live; /* Records if the save of LR has been eliminated. */ int lr_save_eliminated; /* Records the type of the current function. */ unsigned long func_type; /* Record if the function has a variable argument list. */ --- 1428,1445 ---- /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ ! typedef struct machine_function GTY(()) { /* Additionsl stack adjustment in __builtin_eh_throw. */ ! rtx eh_epilogue_sp_ofs; /* Records if LR has to be saved for far jumps. */ int far_jump_used; /* Records if ARG_POINTER was ever live. */ int arg_pointer_live; /* Records if the save of LR has been eliminated. */ int lr_save_eliminated; + /* The size of the stack frame. Only valid after reload. */ + int frame_size; /* Records the type of the current function. */ unsigned long func_type; /* Record if the function has a variable argument list. */ *************** typedef struct *** 1503,1511 **** For args passed entirely in registers or entirely in memory, zero. */ #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ( NUM_ARG_REGS > (CUM).nregs \ ! && (NUM_ARG_REGS < ((CUM).nregs + NUM_REGS2 (MODE, TYPE))) \ ? NUM_ARG_REGS - (CUM).nregs : 0) /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. For a library call, FNTYPE is 0. --- 1484,1500 ---- For args passed entirely in registers or entirely in memory, zero. */ #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ( NUM_ARG_REGS > (CUM).nregs \ ! && (NUM_ARG_REGS < ((CUM).nregs + ARM_NUM_REGS2 (MODE, TYPE))) \ ? NUM_ARG_REGS - (CUM).nregs : 0) + /* A C expression that indicates when an argument must be passed by + reference. If nonzero for an argument, a copy of that argument is + made in memory and a pointer to the argument is passed instead of + the argument itself. The pointer is passed in whatever way is + appropriate for passing a pointer to that type. */ + #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ + arm_function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED) + /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. For a library call, FNTYPE is 0. *************** typedef struct *** 1517,1528 **** of mode MODE and data type TYPE. (TYPE is null for libcalls where that information may not be available.) */ #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ! (CUM).nregs += NUM_REGS2 (MODE, TYPE) /* 1 if N is a possible register number for function argument passing. On the ARM, r0-r3 are used to pass args. */ #define FUNCTION_ARG_REGNO_P(REGNO) (IN_RANGE ((REGNO), 0, 3)) /* Tail calling. */ --- 1506,1521 ---- of mode MODE and data type TYPE. (TYPE is null for libcalls where that information may not be available.) */ #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ! (CUM).nregs += ARM_NUM_REGS2 (MODE, TYPE) /* 1 if N is a possible register number for function argument passing. On the ARM, r0-r3 are used to pass args. */ #define FUNCTION_ARG_REGNO_P(REGNO) (IN_RANGE ((REGNO), 0, 3)) + /* Implement `va_arg'. */ + #define EXPAND_BUILTIN_VA_ARG(valist, type) \ + arm_va_arg (valist, type) + /* Tail calling. */ *************** typedef struct *** 1572,1578 **** will output the .text section. The ``mov ip,lr'' seems like a good idea to stick with cc convention. ! ``prof'' doesn't seem to mind about this! */ #ifndef ARM_FUNCTION_PROFILER #define ARM_FUNCTION_PROFILER(STREAM, LABELNO) \ { \ --- 1565,1574 ---- will output the .text section. The ``mov ip,lr'' seems like a good idea to stick with cc convention. ! ``prof'' doesn't seem to mind about this! ! ! Note - this version of the code is designed to work in both ARM and ! Thumb modes. */ #ifndef ARM_FUNCTION_PROFILER #define ARM_FUNCTION_PROFILER(STREAM, LABELNO) \ { \ *************** typedef struct *** 1589,1608 **** } #endif ! #ifndef THUMB_FUNCTION_PROFILER ! #define THUMB_FUNCTION_PROFILER(STREAM, LABELNO) \ ! { \ ! fprintf (STREAM, "\tmov\tip, lr\n"); \ ! fprintf (STREAM, "\tbl\tmcount\n"); \ ! fprintf (STREAM, "\t.word\tLP%d\n", LABELNO); \ ! } ! #endif ! #define FUNCTION_PROFILER(STREAM, LABELNO) \ if (TARGET_ARM) \ ARM_FUNCTION_PROFILER (STREAM, LABELNO) \ else \ THUMB_FUNCTION_PROFILER (STREAM, LABELNO) /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in --- 1585,1600 ---- } #endif ! #ifdef THUMB_FUNCTION_PROFILER #define FUNCTION_PROFILER(STREAM, LABELNO) \ if (TARGET_ARM) \ ARM_FUNCTION_PROFILER (STREAM, LABELNO) \ else \ THUMB_FUNCTION_PROFILER (STREAM, LABELNO) + #else + #define FUNCTION_PROFILER(STREAM, LABELNO) \ + ARM_FUNCTION_PROFILER (STREAM, LABELNO) + #endif /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in *************** typedef struct *** 1657,1663 **** ((TO) == ARM_HARD_FRAME_POINTER_REGNUM && TARGET_THUMB) ? 0 : \ ((TO) == THUMB_HARD_FRAME_POINTER_REGNUM && TARGET_ARM) ? 0 : \ 1) ! /* Define the offset between two registers, one to be eliminated, and the other its replacement, at the start of a routine. */ #define ARM_INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ --- 1649,1661 ---- ((TO) == ARM_HARD_FRAME_POINTER_REGNUM && TARGET_THUMB) ? 0 : \ ((TO) == THUMB_HARD_FRAME_POINTER_REGNUM && TARGET_ARM) ? 0 : \ 1) ! ! #define THUMB_REG_PUSHED_P(reg) \ ! (regs_ever_live [reg] \ ! && (! call_used_regs [reg] \ ! || (flag_pic && (reg) == PIC_OFFSET_TABLE_REGNUM)) \ ! && !(TARGET_SINGLE_PIC_BASE && ((reg) == arm_pic_register))) ! /* Define the offset between two registers, one to be eliminated, and the other its replacement, at the start of a routine. */ #define ARM_INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ *************** typedef struct *** 1676,1688 **** int count_regs = 0; \ int regno; \ for (regno = 8; regno < 13; regno ++) \ ! if (regs_ever_live[regno] && ! call_used_regs[regno]) \ ! count_regs ++; \ if (count_regs) \ (OFFSET) += 4 * count_regs; \ count_regs = 0; \ for (regno = 0; regno <= LAST_LO_REGNUM; regno ++) \ ! if (regs_ever_live[regno] && ! call_used_regs[regno]) \ count_regs ++; \ if (count_regs || ! leaf_function_p () || thumb_far_jump_used_p (0))\ (OFFSET) += 4 * (count_regs + 1); \ --- 1674,1686 ---- int count_regs = 0; \ int regno; \ for (regno = 8; regno < 13; regno ++) \ ! if (THUMB_REG_PUSHED_P (regno)) \ ! count_regs ++; \ if (count_regs) \ (OFFSET) += 4 * count_regs; \ count_regs = 0; \ for (regno = 0; regno <= LAST_LO_REGNUM; regno ++) \ ! if (THUMB_REG_PUSHED_P (regno)) \ count_regs ++; \ if (count_regs || ! leaf_function_p () || thumb_far_jump_used_p (0))\ (OFFSET) += 4 * (count_regs + 1); \ *************** typedef struct *** 1697,1703 **** if ((TO) == STACK_POINTER_REGNUM) \ { \ (OFFSET) += current_function_outgoing_args_size; \ ! (OFFSET) += ROUND_UP (get_frame_size ()); \ } \ } --- 1695,1701 ---- if ((TO) == STACK_POINTER_REGNUM) \ { \ (OFFSET) += current_function_outgoing_args_size; \ ! (OFFSET) += thumb_get_frame_size (); \ } \ } *************** typedef struct *** 1884,1939 **** case '*': return 1; \ SUBTARGET_NAME_ENCODING_LENGTHS - /* This has to be handled by a function because more than part of the - ARM backend uses function name prefixes to encode attributes. */ - #undef STRIP_NAME_ENCODING - #define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \ - (VAR) = arm_strip_name_encoding (SYMBOL_NAME) - /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! asm_fprintf (FILE, "%U%s", arm_strip_name_encoding (NAME)) ! ! /* If we are referencing a function that is weak then encode a long call ! flag in the function name, otherwise if the function is static or ! or known to be defined in this file then encode a short call flag. ! This macro is used inside the ENCODE_SECTION macro. */ ! #define ARM_ENCODE_CALL_TYPE(decl) \ ! if (TREE_CODE_CLASS (TREE_CODE (decl)) == 'd') \ ! { \ ! if (TREE_CODE (decl) == FUNCTION_DECL && DECL_WEAK (decl)) \ ! arm_encode_call_attribute (decl, LONG_CALL_FLAG_CHAR); \ ! else if (! TREE_PUBLIC (decl)) \ ! arm_encode_call_attribute (decl, SHORT_CALL_FLAG_CHAR); \ ! } ! ! /* Symbols in the text segment can be accessed without indirecting via the ! constant pool; it may take an extra binary operation, but this is still ! faster than indirecting via memory. Don't do this when not optimizing, ! since we won't be calculating al of the offsets necessary to do this ! simplification. */ ! /* This doesn't work with AOF syntax, since the string table may be in ! a different AREA. */ ! #ifndef AOF_ASSEMBLER ! #define ENCODE_SECTION_INFO(decl) \ ! { \ ! if (optimize > 0 && TREE_CONSTANT (decl) \ ! && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) \ ! { \ ! rtx rtl = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' \ ! ? TREE_CST_RTL (decl) : DECL_RTL (decl)); \ ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; \ ! } \ ! ARM_ENCODE_CALL_TYPE (decl) \ ! } ! #else ! #define ENCODE_SECTION_INFO(decl) \ ! { \ ! ARM_ENCODE_CALL_TYPE (decl) \ ! } ! #endif #define ARM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \ arm_encode_call_attribute (DECL, SHORT_CALL_FLAG_CHAR) --- 1882,1892 ---- case '*': return 1; \ SUBTARGET_NAME_ENCODING_LENGTHS /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! arm_asm_output_labelref (FILE, NAME) #define ARM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \ arm_encode_call_attribute (DECL, SHORT_CALL_FLAG_CHAR) *************** typedef struct *** 2168,2174 **** goto WIN; \ /* This is PC relative data before MACHINE_DEPENDENT_REORG runs. */ \ else if (GET_MODE_SIZE (MODE) >= 4 && CONSTANT_P (X) \ ! && CONSTANT_POOL_ADDRESS_P (X) && ! flag_pic) \ goto WIN; \ /* This is PC relative data after MACHINE_DEPENDENT_REORG runs. */ \ else if (GET_MODE_SIZE (MODE) >= 4 && reload_completed \ --- 2121,2128 ---- goto WIN; \ /* This is PC relative data before MACHINE_DEPENDENT_REORG runs. */ \ else if (GET_MODE_SIZE (MODE) >= 4 && CONSTANT_P (X) \ ! && GET_CODE (X) == SYMBOL_REF \ ! && CONSTANT_POOL_ADDRESS_P (X) && ! flag_pic) \ goto WIN; \ /* This is PC relative data after MACHINE_DEPENDENT_REORG runs. */ \ else if (GET_MODE_SIZE (MODE) >= 4 && reload_completed \ *************** extern const char * arm_pic_register_str *** 2477,2488 **** /* We can't directly access anything that contains a symbol, nor can we indirect via the constant pool. */ #define LEGITIMATE_PIC_OPERAND_P(X) \ ! ( ! symbol_mentioned_p (X) \ ! && ! label_mentioned_p (X) \ ! && (! CONSTANT_POOL_ADDRESS_P (X) \ ! || ( ! symbol_mentioned_p (get_pool_constant (X)) \ ! && ! label_mentioned_p (get_pool_constant (X))))) ! /* We need to know when we are making a constant pool; this determines whether data needs to be in the GOT or can be referenced via a GOT offset. */ --- 2431,2443 ---- /* We can't directly access anything that contains a symbol, nor can we indirect via the constant pool. */ #define LEGITIMATE_PIC_OPERAND_P(X) \ ! (!(symbol_mentioned_p (X) \ ! || label_mentioned_p (X) \ ! || (GET_CODE (X) == SYMBOL_REF \ ! && CONSTANT_POOL_ADDRESS_P (X) \ ! && (symbol_mentioned_p (get_pool_constant (X)) \ ! || label_mentioned_p (get_pool_constant (X)))))) ! /* We need to know when we are making a constant pool; this determines whether data needs to be in the GOT or can be referenced via a GOT offset. */ *************** extern int making_const_table; *** 2497,2526 **** /* Condition code information. */ /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, ! return the mode to be used for the comparison. ! CCFPEmode should be used with floating inequalities, ! CCFPmode should be used with floating equalities. ! CC_NOOVmode should be used with SImode integer equalities. ! CC_Zmode should be used if only the Z flag is set correctly ! CCmode should be used otherwise. */ ! ! #define EXTRA_CC_MODES \ ! CC(CC_NOOVmode, "CC_NOOV") \ ! CC(CC_Zmode, "CC_Z") \ ! CC(CC_SWPmode, "CC_SWP") \ ! CC(CCFPmode, "CCFP") \ ! CC(CCFPEmode, "CCFPE") \ ! CC(CC_DNEmode, "CC_DNE") \ ! CC(CC_DEQmode, "CC_DEQ") \ ! CC(CC_DLEmode, "CC_DLE") \ ! CC(CC_DLTmode, "CC_DLT") \ ! CC(CC_DGEmode, "CC_DGE") \ ! CC(CC_DGTmode, "CC_DGT") \ ! CC(CC_DLEUmode, "CC_DLEU") \ ! CC(CC_DLTUmode, "CC_DLTU") \ ! CC(CC_DGEUmode, "CC_DGEU") \ ! CC(CC_DGTUmode, "CC_DGTU") \ ! CC(CC_Cmode, "CC_C") #define SELECT_CC_MODE(OP, X, Y) arm_select_cc_mode (OP, X, Y) --- 2452,2458 ---- /* Condition code information. */ /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, ! return the mode to be used for the comparison. */ #define SELECT_CC_MODE(OP, X, Y) arm_select_cc_mode (OP, X, Y) *************** extern int making_const_table; *** 2779,2817 **** else \ THUMB_PRINT_OPERAND_ADDRESS (STREAM, X) - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - do \ - { \ - int mi_delta = (DELTA); \ - const char *const mi_op = mi_delta < 0 ? "sub" : "add"; \ - int shift = 0; \ - int this_regno = (aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION))) \ - ? 1 : 0); \ - if (mi_delta < 0) \ - mi_delta = - mi_delta; \ - while (mi_delta != 0) \ - { \ - if ((mi_delta & (3 << shift)) == 0) \ - shift += 2; \ - else \ - { \ - asm_fprintf (FILE, "\t%s\t%r, %r, #%d\n", \ - mi_op, this_regno, this_regno, \ - mi_delta & (0xff << shift)); \ - mi_delta &= ~(0xff << shift); \ - shift += 8; \ - } \ - } \ - fputs ("\tb\t", FILE); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - if (NEED_PLT_RELOC) \ - fputs ("(PLT)", FILE); \ - fputc ('\n', FILE); \ - } \ - while (0) - /* A C expression whose value is RTL representing the value of the return address for the frame COUNT steps up from the current frame. */ --- 2711,2716 ---- *************** extern int making_const_table; *** 2835,2842 **** in 26 bit mode, the condition codes must be masked out of the \ return address. This does not apply to ARM6 and later processors \ when running in 32 bit mode. */ \ ! ((!TARGET_APCS_32) ? (GEN_INT (RETURN_ADDR_MASK26)) \ ! : (GEN_INT ((unsigned long)0xffffffff))) /* Define the codes that are matched by predicates in arm.c */ --- 2734,2743 ---- in 26 bit mode, the condition codes must be masked out of the \ return address. This does not apply to ARM6 and later processors \ when running in 32 bit mode. */ \ ! ((!TARGET_APCS_32) ? (gen_int_mode (RETURN_ADDR_MASK26, Pmode)) \ ! : (arm_arch4 || TARGET_THUMB) ? \ ! (gen_int_mode ((unsigned long)0xffffffff, Pmode)) \ ! : arm_gen_return_addr_mask ()) /* Define the codes that are matched by predicates in arm.c */ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/arm.md gcc-3.3/gcc/config/arm/arm.md *** gcc-3.2.3/gcc/config/arm/arm.md 2002-09-20 14:01:24.000000000 +0000 --- gcc-3.3/gcc/config/arm/arm.md 2003-03-20 22:03:17.000000000 +0000 *************** *** 59,65 **** (UNSPEC_PIC_SYM 3) ; A symbol that has been treated properly for pic ; usage, that is, we will add the pic_register ; value to it before trying to dereference it. ! (UNSPEC_PRLG_STK 4) ; A special barrier that prevents frame accesses ; being scheduled before the stack adjustment insn. (UNSPEC_CLZ 5) ; `clz' instruction, count leading zeros (SImode): ; operand 0 is the result, --- 59,69 ---- (UNSPEC_PIC_SYM 3) ; A symbol that has been treated properly for pic ; usage, that is, we will add the pic_register ; value to it before trying to dereference it. ! (UNSPEC_PIC_BASE 4) ; Adding the PC value to the offset to the ! ; GLOBAL_OFFSET_TABLE. The operation is fully ! ; described by the RTL but must be wrapped to ! ; prevent combine from trying to rip it apart. ! (UNSPEC_PRLG_STK 5) ; A special barrier that prevents frame accesses ; being scheduled before the stack adjustment insn. (UNSPEC_CLZ 5) ; `clz' instruction, count leading zeros (SImode): ; operand 0 is the result, *************** *** 69,74 **** --- 73,79 ---- ; instructions setting registers for EH handling ; and stack frame generation. Operand 0 is the ; register to "use". + (UNSPEC_CHECK_ARCH 7); Set CCs to indicate 26-bit or 32-bit mode. ] ) *************** *** 179,185 **** (const_string "normal")) ; Load scheduling, set from the arm_ld_sched variable ! ; initialised by arm_override_options() (define_attr "ldsched" "no,yes" (const (symbol_ref "arm_ld_sched"))) ; condition codes: this one is used by final_prescan_insn to speed up --- 184,190 ---- (const_string "normal")) ; Load scheduling, set from the arm_ld_sched variable ! ; initialized by arm_override_options() (define_attr "ldsched" "no,yes" (const (symbol_ref "arm_ld_sched"))) ; condition codes: this one is used by final_prescan_insn to speed up *************** *** 600,609 **** ;; Reloading and elimination of the frame pointer can ;; sometimes cause this optimization to be missed. (define_peephole2 ! [(set (match_operand:SI 0 "register_operand" "=l") ! (match_operand:SI 1 "const_int_operand" "M")) (set (match_dup 0) ! (plus:SI (match_dup 0) (match_operand:SI 2 "register_operand" "k")))] "TARGET_THUMB && REGNO (operands[2]) == STACK_POINTER_REGNUM && (unsigned HOST_WIDE_INT) (INTVAL (operands[1])) < 1024 --- 605,614 ---- ;; Reloading and elimination of the frame pointer can ;; sometimes cause this optimization to be missed. (define_peephole2 ! [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "const_int_operand" "")) (set (match_dup 0) ! (plus:SI (match_dup 0) (match_operand:SI 2 "register_operand" "")))] "TARGET_THUMB && REGNO (operands[2]) == STACK_POINTER_REGNUM && (unsigned HOST_WIDE_INT) (INTVAL (operands[1])) < 1024 *************** *** 1857,1865 **** ;;; ??? This pattern is bogus. If operand3 has bits outside the range ;;; represented by the bitfield, then this will produce incorrect results. ;;; Somewhere, the value needs to be truncated. On targets like the m68k, ! ;;; which have a real bitfield insert instruction, the truncation happens ! ;;; in the bitfield insert instruction itself. Since arm does not have a ! ;;; bitfield insert instruction, we would have to emit code here to truncate ;;; the value before we insert. This loses some of the advantage of having ;;; this insv pattern, so this pattern needs to be reevalutated. --- 1862,1870 ---- ;;; ??? This pattern is bogus. If operand3 has bits outside the range ;;; represented by the bitfield, then this will produce incorrect results. ;;; Somewhere, the value needs to be truncated. On targets like the m68k, ! ;;; which have a real bit-field insert instruction, the truncation happens ! ;;; in the bit-field insert instruction itself. Since arm does not have a ! ;;; bit-field insert instruction, we would have to emit code here to truncate ;;; the value before we insert. This loses some of the advantage of having ;;; this insv pattern, so this pattern needs to be reevalutated. *************** *** 1867,1873 **** [(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "") (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")) ! (match_operand:SI 3 "nonmemory_operand" ""))] "TARGET_ARM" " { --- 1872,1878 ---- [(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "") (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")) ! (match_operand:SI 3 "reg_or_int_operand" ""))] "TARGET_ARM" " { *************** *** 2035,2041 **** "TARGET_ARM && reload_completed && operands[0] != operands[1]" ! [(set (match_dup 0) (and:SI (not:SI (match_dup 1)) (match_dup 2))) (set (match_dup 3) (match_dup 4))] " { --- 2040,2046 ---- "TARGET_ARM && reload_completed && operands[0] != operands[1]" ! [(set (match_dup 0) (and:SI (not:SI (match_dup 2)) (match_dup 1))) (set (match_dup 3) (match_dup 4))] " { *************** *** 2052,2062 **** [(set (match_operand:DI 0 "s_register_operand" "=&r,&r") (and:DI (not:DI (sign_extend:DI (match_operand:SI 2 "s_register_operand" "r,r"))) ! (match_operand:DI 1 "s_register_operand" "?r,0")))] "TARGET_ARM" "#" "TARGET_ARM && reload_completed" ! [(set (match_dup 0) (and:SI (not:SI (match_dup 1)) (match_dup 2))) (set (match_dup 3) (and:SI (not:SI (ashiftrt:SI (match_dup 2) (const_int 31))) (match_dup 4)))] --- 2057,2067 ---- [(set (match_operand:DI 0 "s_register_operand" "=&r,&r") (and:DI (not:DI (sign_extend:DI (match_operand:SI 2 "s_register_operand" "r,r"))) ! (match_operand:DI 1 "s_register_operand" "0,r")))] "TARGET_ARM" "#" "TARGET_ARM && reload_completed" ! [(set (match_dup 0) (and:SI (not:SI (match_dup 2)) (match_dup 1))) (set (match_dup 3) (and:SI (not:SI (ashiftrt:SI (match_dup 2) (const_int 31))) (match_dup 4)))] *************** *** 2339,2349 **** ; insns. (define_split ! [(set (match_operand:SI 0 "s_register_operand" "=r") ! (ior:SI (and:SI (not:SI (match_operand:SI 1 "s_register_operand" "r")) ! (not:SI (match_operand:SI 2 "arm_rhs_operand" "rI"))) ! (match_operand:SI 3 "arm_rhs_operand" "rI"))) ! (clobber (match_operand:SI 4 "s_register_operand" "=r"))] "TARGET_ARM" [(set (match_dup 4) (and:SI (ior:SI (match_dup 1) (match_dup 2)) (not:SI (match_dup 3)))) --- 2344,2354 ---- ; insns. (define_split ! [(set (match_operand:SI 0 "s_register_operand" "") ! (ior:SI (and:SI (not:SI (match_operand:SI 1 "s_register_operand" "")) ! (not:SI (match_operand:SI 2 "arm_rhs_operand" ""))) ! (match_operand:SI 3 "arm_rhs_operand" ""))) ! (clobber (match_operand:SI 4 "s_register_operand" ""))] "TARGET_ARM" [(set (match_dup 4) (and:SI (ior:SI (match_dup 1) (match_dup 2)) (not:SI (match_dup 3)))) *************** *** 3913,3919 **** ;; DONE; ;;}") ! ;; Recognise garbage generated above. ;;(define_insn "" ;; [(set (match_operand:TI 0 "general_operand" "=r,r,r,<,>,m") --- 3918,3924 ---- ;; DONE; ;;}") ! ;; Recognize garbage generated above. ;;(define_insn "" ;; [(set (match_operand:TI 0 "general_operand" "=r,r,r,<,>,m") *************** *** 4129,4134 **** --- 4134,4140 ---- if ((val & (mask << i)) == val) break; + /* Shouldn't happen, but we don't want to split if the shift is zero. */ if (i == 0) FAIL; *************** *** 4200,4206 **** (define_insn "pic_add_dot_plus_four" [(set (match_operand:SI 0 "register_operand" "+r") ! (plus:SI (match_dup 0) (const (plus:SI (pc) (const_int 4))))) (use (label_ref (match_operand 1 "" "")))] "TARGET_THUMB && flag_pic" "* --- 4206,4214 ---- (define_insn "pic_add_dot_plus_four" [(set (match_operand:SI 0 "register_operand" "+r") ! (unspec:SI [(plus:SI (match_dup 0) ! (const (plus:SI (pc) (const_int 4))))] ! UNSPEC_PIC_BASE)) (use (label_ref (match_operand 1 "" "")))] "TARGET_THUMB && flag_pic" "* *************** *** 4213,4219 **** (define_insn "pic_add_dot_plus_eight" [(set (match_operand:SI 0 "register_operand" "+r") ! (plus:SI (match_dup 0) (const (plus:SI (pc) (const_int 8))))) (use (label_ref (match_operand 1 "" "")))] "TARGET_ARM && flag_pic" "* --- 4221,4229 ---- (define_insn "pic_add_dot_plus_eight" [(set (match_operand:SI 0 "register_operand" "+r") ! (unspec:SI [(plus:SI (match_dup 0) ! (const (plus:SI (pc) (const_int 8))))] ! UNSPEC_PIC_BASE)) (use (label_ref (match_operand 1 "" "")))] "TARGET_ARM && flag_pic" "* *************** *** 4417,4422 **** --- 4427,4440 ---- emit_insn (gen_movsi (reg, GEN_INT (val))); operands[1] = gen_lowpart (HImode, reg); } + else if (arm_arch4 && !no_new_pseudos && optimize > 0 + && GET_CODE (operands[1]) == MEM) + { + rtx reg = gen_reg_rtx (SImode); + + emit_insn (gen_zero_extendhisi2 (reg, operands[1])); + operands[1] = gen_lowpart (HImode, reg); + } else if (!arm_arch4) { /* Note: We do not have to worry about TARGET_MMU_TRAPS *************** *** 4673,4679 **** " ) ! ;; Pattern to recognise insn generated default case above (define_insn "*movhi_insn_arch4" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r") (match_operand:HI 1 "general_operand" "rI,K,r,m"))] --- 4691,4697 ---- " ) ! ;; Pattern to recognize insn generated default case above (define_insn "*movhi_insn_arch4" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r") (match_operand:HI 1 "general_operand" "rI,K,r,m"))] *************** *** 4814,4822 **** emit_insn (gen_movsi (reg, operands[1])); operands[1] = gen_lowpart (QImode, reg); } ! if (GET_CODE (operands[0]) == MEM) ! operands[1] = force_reg (QImode, operands[1]); ! } } else /* TARGET_THUMB */ { --- 4832,4847 ---- emit_insn (gen_movsi (reg, operands[1])); operands[1] = gen_lowpart (QImode, reg); } ! if (GET_CODE (operands[1]) == MEM && optimize > 0) ! { ! rtx reg = gen_reg_rtx (SImode); ! ! emit_insn (gen_zero_extendqisi2 (reg, operands[1])); ! operands[1] = gen_lowpart (QImode, reg); ! } ! if (GET_CODE (operands[0]) == MEM) ! operands[1] = force_reg (QImode, operands[1]); ! } } else /* TARGET_THUMB */ { *************** *** 6014,6020 **** if (arm_ccfsm_state != 0) abort (); ! return \"bvs\\t%l0;beq\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] --- 6039,6045 ---- if (arm_ccfsm_state != 0) abort (); ! return \"bvs\\t%l0\;beq\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] *************** *** 6031,6037 **** if (arm_ccfsm_state != 0) abort (); ! return \"bmi\\t%l0;bgt\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] --- 6056,6062 ---- if (arm_ccfsm_state != 0) abort (); ! return \"bmi\\t%l0\;bgt\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] *************** *** 6066,6072 **** if (arm_ccfsm_state != 0) abort (); ! return \"bmi\\t%l0;bgt\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] --- 6091,6097 ---- if (arm_ccfsm_state != 0) abort (); ! return \"bmi\\t%l0\;bgt\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] *************** *** 6083,6089 **** if (arm_ccfsm_state != 0) abort (); ! return \"bvs\\t%l0;beq\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] --- 6108,6114 ---- if (arm_ccfsm_state != 0) abort (); ! return \"bvs\\t%l0\;beq\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] *************** *** 6288,6295 **** " { enum rtx_code code = GET_CODE (operands[1]); ! rtx ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1); operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx); }" ) --- 6313,6324 ---- " { enum rtx_code code = GET_CODE (operands[1]); ! rtx ccreg; ! ! if (code == UNEQ || code == LTGT) ! FAIL; + ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1); operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx); }" ) *************** *** 6305,6310 **** --- 6334,6342 ---- enum rtx_code code = GET_CODE (operands[1]); rtx ccreg; + if (code == UNEQ || code == LTGT) + FAIL; + /* When compiling for SOFT_FLOAT, ensure both arms are in registers. Otherwise, ensure it is a valid FP add operand */ if ((!TARGET_HARD_FLOAT) *************** *** 6325,6332 **** " { enum rtx_code code = GET_CODE (operands[1]); ! rtx ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1); operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx); }" ) --- 6357,6368 ---- " { enum rtx_code code = GET_CODE (operands[1]); ! rtx ccreg; ! ! if (code == UNEQ || code == LTGT) ! FAIL; + ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1); operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx); }" ) *************** *** 6665,6672 **** (define_expand "sibcall" [(parallel [(call (match_operand 0 "memory_operand" "") (match_operand 1 "general_operand" "")) ! (use (match_operand 2 "" "")) ! (use (reg:SI LR_REGNUM))])] "TARGET_ARM" " { --- 6701,6708 ---- (define_expand "sibcall" [(parallel [(call (match_operand 0 "memory_operand" "") (match_operand 1 "general_operand" "")) ! (return) ! (use (match_operand 2 "" ""))])] "TARGET_ARM" " { *************** *** 6679,6686 **** [(parallel [(set (match_operand 0 "register_operand" "") (call (match_operand 1 "memory_operand" "") (match_operand 2 "general_operand" ""))) ! (use (match_operand 3 "" "")) ! (use (reg:SI LR_REGNUM))])] "TARGET_ARM" " { --- 6715,6722 ---- [(parallel [(set (match_operand 0 "register_operand" "") (call (match_operand 1 "memory_operand" "") (match_operand 2 "general_operand" ""))) ! (return) ! (use (match_operand 3 "" ""))])] "TARGET_ARM" " { *************** *** 6692,6699 **** (define_insn "*sibcall_insn" [(call (mem:SI (match_operand:SI 0 "" "X")) (match_operand 1 "" "")) ! (use (match_operand 2 "" "")) ! (use (reg:SI LR_REGNUM))] "TARGET_ARM && GET_CODE (operands[0]) == SYMBOL_REF" "* return NEED_PLT_RELOC ? \"b%?\\t%a0(PLT)\" : \"b%?\\t%a0\"; --- 6728,6735 ---- (define_insn "*sibcall_insn" [(call (mem:SI (match_operand:SI 0 "" "X")) (match_operand 1 "" "")) ! (return) ! (use (match_operand 2 "" ""))] "TARGET_ARM && GET_CODE (operands[0]) == SYMBOL_REF" "* return NEED_PLT_RELOC ? \"b%?\\t%a0(PLT)\" : \"b%?\\t%a0\"; *************** *** 6705,6712 **** [(set (match_operand 0 "s_register_operand" "=r,f") (call (mem:SI (match_operand:SI 1 "" "X,X")) (match_operand 2 "" ""))) ! (use (match_operand 3 "" "")) ! (use (reg:SI LR_REGNUM))] "TARGET_ARM && GET_CODE (operands[1]) == SYMBOL_REF" "* return NEED_PLT_RELOC ? \"b%?\\t%a1(PLT)\" : \"b%?\\t%a1\"; --- 6741,6748 ---- [(set (match_operand 0 "s_register_operand" "=r,f") (call (mem:SI (match_operand:SI 1 "" "X,X")) (match_operand 2 "" ""))) ! (return) ! (use (match_operand 3 "" ""))] "TARGET_ARM && GET_CODE (operands[1]) == SYMBOL_REF" "* return NEED_PLT_RELOC ? \"b%?\\t%a1(PLT)\" : \"b%?\\t%a1\"; *************** *** 6725,6731 **** arm_ccfsm_state += 2; return \"\"; } ! return output_return_instruction (NULL, TRUE, FALSE); }" [(set_attr "type" "load") (set_attr "predicable" "yes")] --- 6761,6767 ---- arm_ccfsm_state += 2; return \"\"; } ! return output_return_instruction (const_true_rtx, TRUE, FALSE); }" [(set_attr "type" "load") (set_attr "predicable" "yes")] *************** *** 6771,6776 **** --- 6807,6839 ---- (set_attr "type" "load")] ) + ;; Generate a sequence of instructions to determine if the processor is + ;; in 26-bit or 32-bit mode, and return the appropriate return address + ;; mask. + + (define_expand "return_addr_mask" + [(set (match_dup 1) + (compare:CC_NOOV (unspec [(const_int 0)] UNSPEC_CHECK_ARCH) + (const_int 0))) + (set (match_operand:SI 0 "s_register_operand" "") + (if_then_else:SI (eq (match_dup 1) (const_int 0)) + (const_int -1) + (const_int 67108860)))] ; 0x03fffffc + "TARGET_ARM" + " + operands[1] = gen_rtx_REG (CC_NOOVmode, 24); + ") + + (define_insn "*check_arch2" + [(set (match_operand:CC_NOOV 0 "cc_register" "") + (compare:CC_NOOV (unspec [(const_int 0)] UNSPEC_CHECK_ARCH) + (const_int 0)))] + "TARGET_ARM" + "teq\\t%|r0, %|r0\;teq\\t%|pc, %|pc" + [(set_attr "length" "8") + (set_attr "conds" "set")] + ) + ;; Call subroutine returning any type. (define_expand "untyped_call" *************** *** 7015,7153 **** ] ) - ;; These variants of the above insns can occur if the first operand is the - ;; frame pointer and we eliminate that. This is a kludge, but there doesn't - ;; seem to be a way around it. Most of the predicates have to be null - ;; because the format can be generated part way through reload, so - ;; if we don't match it as soon as it becomes available, reload doesn't know - ;; how to reload pseudos that haven't got hard registers; the constraints will - ;; sort everything out. - - (define_insn "*reload_mulsi3" - [(set (match_operand:SI 0 "" "=&r") - (plus:SI (plus:SI (match_operator:SI 5 "shift_operator" - [(match_operand:SI 3 "" "r") - (match_operand:SI 4 "" "rM")]) - (match_operand:SI 2 "" "r")) - (match_operand:SI 1 "const_int_operand" "n")))] - "TARGET_ARM && reload_in_progress" - "* - output_asm_insn (\"add%?\\t%0, %2, %3%S5\", operands); - operands[2] = operands[1]; - operands[1] = operands[0]; - return output_add_immediate (operands); - " - [ - ; we have no idea how long the add_immediate is, it could be up to 4. - (set_attr "length" "20")] - ) - - (define_insn "*reload_mulsi_compare0" - [(set (reg:CC_NOOV CC_REGNUM) - (compare:CC_NOOV (plus:SI - (plus:SI - (match_operator:SI 5 "shift_operator" - [(match_operand:SI 3 "" "r") - (match_operand:SI 4 "" "rM")]) - (match_operand:SI 1 "" "r")) - (match_operand:SI 2 "const_int_operand" "n")) - (const_int 0))) - (set (match_operand:SI 0 "" "=&r") - (plus:SI (plus:SI (match_op_dup 5 [(match_dup 3) (match_dup 4)]) - (match_dup 1)) - (match_dup 2)))] - "TARGET_ARM && reload_in_progress && !arm_is_xscale" - "* - output_add_immediate (operands); - return \"add%?s\\t%0, %0, %3%S5\"; - " - [(set_attr "conds" "set") - (set_attr "shift" "3") - (set_attr "length" "20")] - ) - - (define_insn "*reload_mulsi_compare0_scratch" - [(set (reg:CC_NOOV CC_REGNUM) - (compare:CC_NOOV (plus:SI - (plus:SI - (match_operator:SI 5 "shift_operator" - [(match_operand:SI 3 "" "r") - (match_operand:SI 4 "" "rM")]) - (match_operand:SI 1 "" "r")) - (match_operand:SI 2 "const_int_operand" "n")) - (const_int 0))) - (clobber (match_scratch:SI 0 "=&r"))] - "TARGET_ARM && reload_in_progress && !arm_is_xscale" - "* - output_add_immediate (operands); - return \"add%?s\\t%0, %0, %3%S5\"; - " - [(set_attr "conds" "set") - (set_attr "shift" "3") - (set_attr "length" "20")] - ) - - ;; These are similar, but are needed when the mla pattern contains the - ;; eliminated register as operand 3. - - (define_insn "*reload_muladdsi" - [(set (match_operand:SI 0 "" "=&r,&r") - (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "" "%0,r") - (match_operand:SI 2 "" "r,r")) - (match_operand:SI 3 "" "r,r")) - (match_operand:SI 4 "const_int_operand" "n,n")))] - "TARGET_ARM && reload_in_progress" - "* - output_asm_insn (\"mla%?\\t%0, %2, %1, %3\", operands); - operands[2] = operands[4]; - operands[1] = operands[0]; - return output_add_immediate (operands); - " - [(set_attr "length" "20") - (set_attr "type" "mult")] - ) - - (define_insn "*reload_muladdsi_compare0" - [(set (reg:CC_NOOV CC_REGNUM) - (compare:CC_NOOV (plus:SI (plus:SI (mult:SI - (match_operand:SI 3 "" "r") - (match_operand:SI 4 "" "r")) - (match_operand:SI 1 "" "r")) - (match_operand:SI 2 "const_int_operand" "n")) - (const_int 0))) - (set (match_operand:SI 0 "" "=&r") - (plus:SI (plus:SI (mult:SI (match_dup 3) (match_dup 4)) (match_dup 1)) - (match_dup 2)))] - "TARGET_ARM && reload_in_progress && !arm_is_xscale" - "* - output_add_immediate (operands); - output_asm_insn (\"mla%?s\\t%0, %3, %4, %0\", operands); - return \"\"; - " - [(set_attr "length" "20") - (set_attr "conds" "set") - (set_attr "type" "mult")] - ) - - (define_insn "*reload_muladdsi_compare0_scratch" - [(set (reg:CC_NOOV CC_REGNUM) - (compare:CC_NOOV (plus:SI (plus:SI (mult:SI - (match_operand:SI 3 "" "r") - (match_operand:SI 4 "" "r")) - (match_operand:SI 1 "" "r")) - (match_operand:SI 2 "const_int_operand" "n")) - (const_int 0))) - (clobber (match_scratch:SI 0 "=&r"))] - "TARGET_ARM && reload_in_progress" - "* - output_add_immediate (operands); - return \"mla%?s\\t%0, %3, %4, %0\"; - " - [(set_attr "length" "20") - (set_attr "conds" "set") - (set_attr "type" "mult")] - ) - (define_insn "*and_scc" --- 7078,7083 ---- *************** *** 8506,8512 **** ; We must watch to see that the source/destination register isn't also the ; same as the base address register, and that if the index is a register, ; that it is not the same as the base address register. In such cases the ! ; instruction that we would generate would have UNPREDICTABLE behaviour so ; we cannot use it. (define_peephole --- 8436,8442 ---- ; We must watch to see that the source/destination register isn't also the ; same as the base address register, and that if the index is a register, ; that it is not the same as the base address register. In such cases the ! ; instruction that we would generate would have UNPREDICTABLE behavior so ; we cannot use it. (define_peephole *************** *** 8763,8771 **** [(unspec_volatile [(const_int 0)] VUNSPEC_EPILOGUE)] "TARGET_ARM" "* - output_asm_insn (\"%@ Sibcall epilogue\", operands); if (USE_RETURN_INSN (FALSE)) ! return output_return_instruction (NULL, FALSE, FALSE); return arm_output_epilogue (FALSE); " ;; Length is absolute worst case --- 8693,8700 ---- [(unspec_volatile [(const_int 0)] VUNSPEC_EPILOGUE)] "TARGET_ARM" "* if (USE_RETURN_INSN (FALSE)) ! return output_return_instruction (const_true_rtx, FALSE, FALSE); return arm_output_epilogue (FALSE); " ;; Length is absolute worst case *************** *** 9018,9023 **** --- 8947,8962 ---- [(set_attr "type" "store4")] ) + (define_insn "stack_tie" + [(set (mem:BLK (scratch)) + (unspec:BLK [(match_operand:SI 0 "s_register_operand" "r") + (match_operand:SI 1 "s_register_operand" "r")] + UNSPEC_PRLG_STK))] + "" + "" + [(set_attr "length" "0")] + ) + ;; Similarly for the floating point registers (define_insn "*push_fp_multi" [(match_parallel 2 "multi_register_push" *************** *** 9090,9098 **** { case MODE_FLOAT: { ! union real_extract u; ! memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u); ! assemble_real (u.d, GET_MODE (operands[0]), BITS_PER_WORD); break; } default: --- 9029,9037 ---- { case MODE_FLOAT: { ! REAL_VALUE_TYPE r; ! REAL_VALUE_FROM_CONST_DOUBLE (r, operands[0]); ! assemble_real (r, GET_MODE (operands[0]), BITS_PER_WORD); break; } default: *************** *** 9114,9122 **** { case MODE_FLOAT: { ! union real_extract u; ! memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u); ! assemble_real (u.d, GET_MODE (operands[0]), BITS_PER_WORD); break; } default: --- 9053,9061 ---- { case MODE_FLOAT: { ! REAL_VALUE_TYPE r; ! REAL_VALUE_FROM_CONST_DOUBLE (r, operands[0]); ! assemble_real (r, GET_MODE (operands[0]), BITS_PER_WORD); break; } default: diff -Nrc3pad gcc-3.2.3/gcc/config/arm/arm-modes.def gcc-3.3/gcc/config/arm/arm-modes.def *** gcc-3.2.3/gcc/config/arm/arm-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/arm/arm-modes.def 2002-06-10 22:35:45.000000000 +0000 *************** *** 0 **** --- 1,46 ---- + /* Definitions of target machine for GNU compiler, for ARM. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) + and Martin Simmons (@harleqn.co.uk). + More major hacks by Richard Earnshaw (rearnsha@arm.com) + Minor hacks by Nick Clifton (nickc@cygnus.com) + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* CCFPEmode should be used with floating inequalities, + CCFPmode should be used with floating equalities. + CC_NOOVmode should be used with SImode integer equalities. + CC_Zmode should be used if only the Z flag is set correctly + CCmode should be used otherwise. */ + + CC (CC_NOOV) + CC (CC_Z) + CC (CC_SWP) + CC (CCFP) + CC (CCFPE) + CC (CC_DNE) + CC (CC_DEQ) + CC (CC_DLE) + CC (CC_DLT) + CC (CC_DGE) + CC (CC_DGT) + CC (CC_DLEU) + CC (CC_DLTU) + CC (CC_DGEU) + CC (CC_DGTU) + CC (CC_C) diff -Nrc3pad gcc-3.2.3/gcc/config/arm/arm-protos.h gcc-3.3/gcc/config/arm/arm-protos.h *** gcc-3.2.3/gcc/config/arm/arm-protos.h 2002-01-22 17:35:26.000000000 +0000 --- gcc-3.3/gcc/config/arm/arm-protos.h 2002-11-15 11:21:36.000000000 +0000 *************** *** 1,5 **** /* Prototypes for exported functions defined in arm.c and pe.c ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rearnsha@arm.com) Minor hacks by Nick Clifton (nickc@cygnus.com) --- 1,5 ---- /* Prototypes for exported functions defined in arm.c and pe.c ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rearnsha@arm.com) Minor hacks by Nick Clifton (nickc@cygnus.com) *************** extern void arm_finalize_pic PARAMS ( *** 31,39 **** --- 31,41 ---- extern int arm_volatile_func PARAMS ((void)); extern const char * arm_output_epilogue PARAMS ((int)); extern void arm_expand_prologue PARAMS ((void)); + extern HOST_WIDE_INT arm_get_frame_size PARAMS ((void)); /* Used in arm.md, but defined in output.c. */ extern void assemble_align PARAMS ((int)); extern const char * arm_strip_name_encoding PARAMS ((const char *)); + extern void arm_asm_output_labelref PARAMS ((FILE *, const char *)); extern unsigned long arm_current_func_type PARAMS ((void)); extern unsigned int arm_compute_initial_elimination_offset PARAMS ((unsigned int, unsigned int)); *************** extern void arm_encode_call_attribute *** 43,49 **** extern int arm_function_ok_for_sibcall PARAMS ((tree)); #endif #ifdef RTX_CODE ! extern int arm_hard_regno_mode_ok PARAMS ((unsigned int, enum machine_mode)); extern int const_ok_for_arm PARAMS ((HOST_WIDE_INT)); extern int arm_split_constant PARAMS ((RTX_CODE, enum machine_mode, HOST_WIDE_INT, rtx, rtx, int)); --- 45,52 ---- extern int arm_function_ok_for_sibcall PARAMS ((tree)); #endif #ifdef RTX_CODE ! extern int arm_hard_regno_mode_ok PARAMS ((unsigned int, ! enum machine_mode)); extern int const_ok_for_arm PARAMS ((HOST_WIDE_INT)); extern int arm_split_constant PARAMS ((RTX_CODE, enum machine_mode, HOST_WIDE_INT, rtx, rtx, int)); *************** extern int arm_gen_movstrqi PARAMS ( *** 106,111 **** --- 109,115 ---- extern rtx arm_gen_rotated_half_load PARAMS ((rtx)); extern enum machine_mode arm_select_cc_mode PARAMS ((RTX_CODE, rtx, rtx)); extern rtx arm_gen_compare_reg PARAMS ((RTX_CODE, rtx, rtx)); + extern rtx arm_gen_return_addr_mask PARAMS ((void)); extern void arm_reload_in_hi PARAMS ((rtx *)); extern void arm_reload_out_hi PARAMS ((rtx *)); extern void arm_reorg PARAMS ((rtx)); *************** extern const char * output_move_double P *** 121,127 **** extern const char * output_mov_immediate PARAMS ((rtx *)); extern const char * output_add_immediate PARAMS ((rtx *)); extern const char * arithmetic_instr PARAMS ((rtx, int)); ! extern void output_ascii_pseudo_op PARAMS ((FILE *, const unsigned char *, int)); extern const char * output_return_instruction PARAMS ((rtx, int, int)); extern void arm_poke_function_name PARAMS ((FILE *, const char *)); extern void arm_print_operand PARAMS ((FILE *, rtx, int)); --- 125,132 ---- extern const char * output_mov_immediate PARAMS ((rtx *)); extern const char * output_add_immediate PARAMS ((rtx *)); extern const char * arithmetic_instr PARAMS ((rtx, int)); ! extern void output_ascii_pseudo_op PARAMS ((FILE *, const unsigned char *, ! int)); extern const char * output_return_instruction PARAMS ((rtx, int, int)); extern void arm_poke_function_name PARAMS ((FILE *, const char *)); extern void arm_print_operand PARAMS ((FILE *, rtx, int)); *************** extern rtx arm_function_arg PARAMS ( *** 136,141 **** --- 141,151 ---- enum machine_mode, tree, int)); extern void arm_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int)); + extern rtx arm_va_arg PARAMS ((tree, tree)); + extern int arm_function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); + #endif #if defined AOF_ASSEMBLER *************** extern void common_section PARAMS ((v *** 152,161 **** --- 162,174 ---- #endif /* RTX_CODE */ + extern int arm_float_words_big_endian PARAMS ((void)); + /* Thumb functions. */ extern void arm_init_expanders PARAMS ((void)); extern int thumb_far_jump_used_p PARAMS ((int)); extern const char * thumb_unexpanded_epilogue PARAMS ((void)); + extern HOST_WIDE_INT thumb_get_frame_size PARAMS ((void)); extern void thumb_expand_prologue PARAMS ((void)); extern void thumb_expand_epilogue PARAMS ((void)); #ifdef TREE_CODE *************** extern int arm_dllimport_name_p PARAMS *** 185,191 **** #ifdef TREE_CODE extern void arm_pe_unique_section PARAMS ((tree, int)); ! extern void arm_pe_encode_section_info PARAMS ((tree)); extern int arm_dllexport_p PARAMS ((tree)); extern int arm_dllimport_p PARAMS ((tree)); extern void arm_mark_dllexport PARAMS ((tree)); --- 198,204 ---- #ifdef TREE_CODE extern void arm_pe_unique_section PARAMS ((tree, int)); ! extern void arm_pe_encode_section_info PARAMS ((tree, int)); extern int arm_dllexport_p PARAMS ((tree)); extern int arm_dllimport_p PARAMS ((tree)); extern void arm_mark_dllexport PARAMS ((tree)); diff -Nrc3pad gcc-3.2.3/gcc/config/arm/arm-wince-pe.h gcc-3.3/gcc/config/arm/arm-wince-pe.h *** gcc-3.2.3/gcc/config/arm/arm-wince-pe.h 2000-02-29 00:34:46.000000000 +0000 --- gcc-3.3/gcc/config/arm/arm-wince-pe.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,66 **** - /* Definitions of target machine for GNU compiler, - for ARM with PE obj format running under the WinCE operating system. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define ARM_WINCE 1 - - #include "pe.h" - - #undef USER_LABEL_PREFIX - #define USER_LABEL_PREFIX "" - - #undef TARGET_VERSION - #define TARGET_VERSION fputs (" (ARM/WinCE/PE)", stderr); - - /* The next three definitions are defined in pe.h, - undefined in arm/arm-pe.h and then redefined back here! */ - #undef LIB_SPEC - #define LIB_SPEC "-lcoredll -lcorelibc" - - #define MATH_LIBRARY "" - - #define LIBSTDCXX "-lc" - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "" - #define ENDFILE_SPEC "" - - #undef CPP_APCS_PC_DEFAULT_SPEC - #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" - - #undef CC1_SPEC - #define CC1_SPEC "%{!mapcs-32:%{!mapcs-26:-mapcs-32}}" - - #undef ASM_SPEC - #define ASM_SPEC " \ - %{mbig-endian:-EB} \ - %{mcpu=*:-m%*} \ - %{march=*:-m%*} \ - %{mapcs-*:-mapcs-%*} \ - %{mthumb-interwork:-mthumb-interwork} \ - %{!mapcs-32:%{!mapcs-26:-mapcs-32}} \ - " - - /* WinCE headers require -DARM */ - #undef PE_SUBTARGET_CPP_SPEC - #define PE_SUBTARGET_CPP_SPEC "-D__pe__ -DARM -D__unaligned=__attribute__((aligned(1))) " - - #undef SIZE_TYPE - #define SIZE_TYPE "long unsigned int" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/arm/coff.h gcc-3.3/gcc/config/arm/coff.h *** gcc-3.2.3/gcc/config/arm/coff.h 2002-03-18 13:45:33.000000000 +0000 --- gcc-3.3/gcc/config/arm/coff.h 2002-08-29 21:40:09.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. For ARM with COFF object format. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Doug Evans (devans@cygnus.com). --- 1,6 ---- /* Definitions of target machine for GNU compiler. For ARM with COFF object format. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Doug Evans (devans@cygnus.com). *************** Boston, MA 02111-1307, USA. */ *** 40,46 **** #endif /* This is COFF, but prefer stabs. */ ! #define SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 40,46 ---- #endif /* This is COFF, but prefer stabs. */ ! #define SDB_DEBUGGING_INFO 1 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG *************** Boston, MA 02111-1307, USA. */ *** 76,117 **** more efficient, but for Thumb it's better to put them out of band. */ #define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ARM) ! #undef READONLY_DATA_SECTION ! #define READONLY_DATA_SECTION rdata_section ! #undef RDATA_SECTION_ASM_OP ! #define RDATA_SECTION_ASM_OP "\t.section .rdata" #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP "\t.section .ctors,\"x\"" #undef DTORS_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP "\t.section .dtors,\"x\"" - - /* A list of other sections which the compiler might be "in" at any - given time. */ - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS SUBTARGET_EXTRA_SECTIONS in_rdata - - #define SUBTARGET_EXTRA_SECTIONS - - /* A list of extra section function definitions. */ - - #undef EXTRA_SECTION_FUNCTIONS - #define EXTRA_SECTION_FUNCTIONS \ - RDATA_SECTION_FUNCTION \ - SUBTARGET_EXTRA_SECTION_FUNCTIONS - - #define SUBTARGET_EXTRA_SECTION_FUNCTIONS - - #define RDATA_SECTION_FUNCTION \ - void \ - rdata_section () \ - { \ - if (in_section != in_rdata) \ - { \ - fprintf (asm_out_file, "%s\n", RDATA_SECTION_ASM_OP); \ - in_section = in_rdata; \ - } \ - } /* Support the ctors/dtors sections for g++. */ --- 76,87 ---- more efficient, but for Thumb it's better to put them out of band. */ #define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ARM) ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata" #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP "\t.section .ctors,\"x\"" #undef DTORS_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP "\t.section .dtors,\"x\"" /* Support the ctors/dtors sections for g++. */ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/conix-elf.h gcc-3.3/gcc/config/arm/conix-elf.h *** gcc-3.2.3/gcc/config/arm/conix-elf.h 2001-12-13 00:27:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/conix-elf.h 2002-05-14 17:35:48.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 39,44 **** #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi #endif ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-D__arm__ -D__CONIX__ -D__ELF__" --- 39,46 ---- #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi #endif ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__CONIX__"); \ ! builtin_define ("__ELF__"); \ ! } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/arm/crti.asm gcc-3.3/gcc/config/arm/crti.asm *** gcc-3.2.3/gcc/config/arm/crti.asm 2001-11-29 16:04:14.000000000 +0000 --- gcc-3.3/gcc/config/arm/crti.asm 2002-09-28 15:29:36.000000000 +0000 *************** *** 35,41 **** # .init sections. Users may put any desired instructions in those # sections. ! # Note - this macro is complimented by the FUNC_END macro # in crtn.asm. If you change this macro you must also change # that macro match. .macro FUNC_START --- 35,41 ---- # .init sections. Users may put any desired instructions in those # sections. ! # Note - this macro is complemented by the FUNC_END macro # in crtn.asm. If you change this macro you must also change # that macro match. .macro FUNC_START diff -Nrc3pad gcc-3.2.3/gcc/config/arm/crtn.asm gcc-3.3/gcc/config/arm/crtn.asm *** gcc-3.2.3/gcc/config/arm/crtn.asm 2001-09-14 10:19:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/crtn.asm 2002-09-28 15:29:36.000000000 +0000 *************** *** 35,41 **** # fact return. Users may put any desired instructions in those sections. # This file is the last thing linked into any executable. ! # Note - this macro is complimented by the FUNC_START macro # in crti.asm. If you change this macro you must also change # that macro match. # --- 35,41 ---- # fact return. Users may put any desired instructions in those sections. # This file is the last thing linked into any executable. ! # Note - this macro is complemented by the FUNC_START macro # in crti.asm. If you change this macro you must also change # that macro match. # diff -Nrc3pad gcc-3.2.3/gcc/config/arm/elf.h gcc-3.3/gcc/config/arm/elf.h *** gcc-3.2.3/gcc/config/arm/elf.h 2002-03-18 13:45:32.000000000 +0000 --- gcc-3.3/gcc/config/arm/elf.h 2002-11-21 21:29:24.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 36,56 **** #ifndef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ ! { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, #endif #ifndef SUBTARGET_EXTRA_ASM_SPEC #define SUBTARGET_EXTRA_ASM_SPEC "" #endif #ifndef ASM_SPEC #define ASM_SPEC "\ %{mbig-endian:-EB} \ ! %{mcpu=*:-m%*} \ ! %{march=*:-m%*} \ %{mapcs-*:-mapcs-%*} \ ! %{mapcs-float:-mfloat} \ ! %{msoft-float:-mno-fpu} \ %{mthumb-interwork:-mthumb-interwork} \ %(subtarget_extra_asm_spec)" #endif --- 36,62 ---- #ifndef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ ! { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \ ! { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, #endif #ifndef SUBTARGET_EXTRA_ASM_SPEC #define SUBTARGET_EXTRA_ASM_SPEC "" #endif + #ifndef SUBTARGET_ASM_FLOAT_SPEC + #define SUBTARGET_ASM_FLOAT_SPEC "\ + %{mapcs-float:-mfloat} %{msoft-float:-mno-fpu}" + #endif + #ifndef ASM_SPEC #define ASM_SPEC "\ %{mbig-endian:-EB} \ ! %{mlittle-endian:-EL} \ ! %{mcpu=*:-mcpu=%*} \ ! %{march=*:-march=%*} \ %{mapcs-*:-mapcs-%*} \ ! %(subtarget_asm_float_spec) \ %{mthumb-interwork:-mthumb-interwork} \ %(subtarget_extra_asm_spec)" #endif *************** Boston, MA 02111-1307, USA. */ *** 58,79 **** /* The ARM uses @ are a comment character so we need to redefine TYPE_OPERAND_FMT. */ #undef TYPE_OPERAND_FMT ! #define TYPE_OPERAND_FMT "%s" /* We might need a ARM specific header to function declarations. */ #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! ARM_DECLARE_FUNCTION_NAME (FILE, NAME, DECL); \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ while (0) /* We might need an ARM specific trailer for function declarations. */ --- 64,81 ---- /* The ARM uses @ are a comment character so we need to redefine TYPE_OPERAND_FMT. */ #undef TYPE_OPERAND_FMT ! #define TYPE_OPERAND_FMT "%%%s" /* We might need a ARM specific header to function declarations. */ #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! ARM_DECLARE_FUNCTION_NAME (FILE, NAME, DECL); \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ while (0) /* We might need an ARM specific trailer for function declarations. */ *************** Boston, MA 02111-1307, USA. */ *** 83,102 **** { \ ARM_DECLARE_FUNCTION_SIZE (FILE, FNAME, DECL); \ if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno; \ ! labelno ++; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ","); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ } \ while (0) --- 85,91 ---- { \ ARM_DECLARE_FUNCTION_SIZE (FILE, FNAME, DECL); \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } \ while (0) *************** Boston, MA 02111-1307, USA. */ *** 108,114 **** #define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ARM) #ifndef LINK_SPEC ! #define LINK_SPEC "%{mbig-endian:-EB} -X" #endif /* Run-time Target Specification. */ --- 97,103 ---- #define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ARM) #ifndef LINK_SPEC ! #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" #endif /* Run-time Target Specification. */ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/freebsd.h gcc-3.3/gcc/config/arm/freebsd.h *** gcc-3.2.3/gcc/config/arm/freebsd.h 2001-12-13 00:27:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/freebsd.h 2002-05-07 21:07:17.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 41,49 **** /* We use the GCC defaults here. */ #undef WCHAR_TYPE - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 --- 41,46 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/arm/linux-elf.h gcc-3.3/gcc/config/arm/linux-elf.h *** gcc-3.2.3/gcc/config/arm/linux-elf.h 2002-04-15 20:27:24.000000000 +0000 --- gcc-3.3/gcc/config/arm/linux-elf.h 2002-12-10 10:55:31.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 48,56 **** /* Now we define the strings used to build the spec file. */ #define LIB_SPEC \ ! "%{shared: -lc} \ ! %{!shared: %{pthread:-lpthread} \ ! %{profile:-lc_p} %{!profile: -lc}}" #define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" --- 48,56 ---- /* Now we define the strings used to build the spec file. */ #define LIB_SPEC \ ! "%{pthread:-lpthread} \ ! %{shared:-lc} \ ! %{!shared:%{profile:-lc_p}%{!profile:-lc}}" #define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" *************** Boston, MA 02111-1307, USA. */ *** 89,101 **** %{mbig-endian:-EB}" \ SUBTARGET_EXTRA_LINK_SPEC ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-Dunix -D__gnu_linux__ -Dlinux -D__ELF__ \ ! -Asystem=unix -Asystem=posix" ! ! /* Allow #sccs in preprocessor. */ ! #define SCCS_DIRECTIVE /* This is how we tell the assembler that two symbols have the same value. */ #define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \ --- 89,103 ---- %{mbig-endian:-EB}" \ SUBTARGET_EXTRA_LINK_SPEC ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("linux"); \ ! builtin_define ("__gnu_linux__"); \ ! builtin_define ("__ELF__"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=posix"); \ ! } while (0) /* This is how we tell the assembler that two symbols have the same value. */ #define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/linux-gas.h gcc-3.3/gcc/config/arm/linux-gas.h *** gcc-3.2.3/gcc/config/arm/linux-gas.h 2001-09-14 10:19:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/linux-gas.h 2002-09-15 18:24:04.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 45,51 **** #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD ! /* Emit code to set up a trampoline and synchronise the caches. */ #undef INITIALIZE_TRAMPOLINE #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ --- 45,51 ---- #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD ! /* Emit code to set up a trampoline and synchronize the caches. */ #undef INITIALIZE_TRAMPOLINE #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/netbsd-elf.h gcc-3.3/gcc/config/arm/netbsd-elf.h *** gcc-3.2.3/gcc/config/arm/netbsd-elf.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/arm/netbsd-elf.h 2002-11-21 21:39:17.000000000 +0000 *************** *** 0 **** --- 1,177 ---- + /* Definitions of target machine for GNU compiler, NetBSD/arm ELF version. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Wasabi Systems, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Run-time Target Specification. */ + #undef TARGET_VERSION + #define TARGET_VERSION fputs (" (NetBSD/arm ELF)", stderr); + + /* This is used in ASM_FILE_START. */ + #undef ARM_OS_NAME + #define ARM_OS_NAME "NetBSD" + + /* arm.h defaults to ARM6 CPU. */ + + /* This defaults us to little-endian. */ + #ifndef TARGET_ENDIAN_DEFAULT + #define TARGET_ENDIAN_DEFAULT 0 + #endif + + #undef MULTILIB_DEFAULTS + + /* Default it to use ATPCS with soft-VFP. */ + #undef TARGET_DEFAULT + #define TARGET_DEFAULT \ + (ARM_FLAG_APCS_32 \ + | ARM_FLAG_SOFT_FLOAT \ + | ARM_FLAG_APCS_FRAME \ + | ARM_FLAG_ATPCS \ + | ARM_FLAG_VFP \ + | ARM_FLAG_MMU_TRAPS \ + | TARGET_ENDIAN_DEFAULT) + + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + NETBSD_OS_CPP_BUILTINS_ELF(); \ + } \ + while (0) + + #undef SUBTARGET_CPP_SPEC + #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC + + #undef SUBTARGET_EXTRA_ASM_SPEC + #define SUBTARGET_EXTRA_ASM_SPEC \ + "-matpcs %{fpic:-k} %{fPIC:-k}" + + /* Default floating point model is soft-VFP. + FIXME: -mhard-float currently implies FPA. */ + #undef SUBTARGET_ASM_FLOAT_SPEC + #define SUBTARGET_ASM_FLOAT_SPEC \ + "%{mhard-float:-mfpu=fpa} \ + %{msoft-float:-mfpu=softvfp} \ + %{!mhard-float: \ + %{!msoft-float:-mfpu=softvfp}}" + + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \ + { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, \ + { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ + { "netbsd_entry_point", NETBSD_ENTRY_POINT }, + + #define NETBSD_ENTRY_POINT "__start" + + #undef LINK_SPEC + #define LINK_SPEC \ + "-X %{mbig-endian:-EB} %{mlittle-endian:-EL} \ + %(netbsd_link_spec)" + + /* Make GCC agree with . */ + + #undef SIZE_TYPE + #define SIZE_TYPE "long unsigned int" + + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "long int" + + /* We don't have any limit on the length as out debugger is GDB. */ + #undef DBX_CONTIN_LENGTH + + /* NetBSD does its profiling differently to the Acorn compiler. We + don't need a word following the mcount call; and to skip it + requires either an assembly stub or use of fomit-frame-pointer when + compiling the profiling functions. Since we break Acorn CC + compatibility below a little more won't hurt. */ + + #undef ARM_FUNCTION_PROFILER + #define ARM_FUNCTION_PROFILER(STREAM,LABELNO) \ + { \ + asm_fprintf (STREAM, "\tmov\t%Rip, %Rlr\n"); \ + asm_fprintf (STREAM, "\tbl\t__mcount%s\n", \ + NEED_PLT_RELOC ? "(PLT)" : ""); \ + } + + /* VERY BIG NOTE: Change of structure alignment for NetBSD/arm. + There are consequences you should be aware of... + + Normally GCC/arm uses a structure alignment of 32 for compatibility + with armcc. This means that structures are padded to a word + boundary. However this causes problems with bugged NetBSD kernel + code (possibly userland code as well - I have not checked every + binary). The nature of this bugged code is to rely on sizeof() + returning the correct size of various structures rounded to the + nearest byte (SCSI and ether code are two examples, the vm system + is another). This code breaks when the structure alignment is 32 + as sizeof() will report a word=rounded size. By changing the + structure alignment to 8. GCC will conform to what is expected by + NetBSD. + + This has several side effects that should be considered. + 1. Structures will only be aligned to the size of the largest member. + i.e. structures containing only bytes will be byte aligned. + structures containing shorts will be half word alinged. + structures containing ints will be word aligned. + + This means structures should be padded to a word boundary if + alignment of 32 is required for byte structures etc. + + 2. A potential performance penalty may exist if strings are no longer + word aligned. GCC will not be able to use word load/stores to copy + short strings. + + This modification is not encouraged but with the present state of the + NetBSD source tree it is currently the only solution that meets the + requirements. */ + + #undef DEFAULT_STRUCTURE_SIZE_BOUNDARY + #define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8 + + /* Emit code to set up a trampoline and synchronize the caches. */ + #undef INITIALIZE_TRAMPOLINE + #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ + do \ + { \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \ + (CXT)); \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 12)), \ + (FNADDR)); \ + emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \ + 0, VOIDmode, 2, TRAMP, Pmode, \ + plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \ + } \ + while (0) + + /* Clear the instruction cache from `BEG' to `END'. This makes a + call to the ARM_SYNC_ICACHE architecture specific syscall. */ + #define CLEAR_INSN_CACHE(BEG, END) \ + do \ + { \ + extern int sysarch(int number, void *args); \ + struct \ + { \ + unsigned int addr; \ + int len; \ + } s; \ + s.addr = (unsigned int)(BEG); \ + s.len = (END) - (BEG); \ + (void) sysarch (0, &s); \ + } \ + while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/arm/netbsd.h gcc-3.3/gcc/config/arm/netbsd.h *** gcc-3.2.3/gcc/config/arm/netbsd.h 2002-02-05 19:01:48.000000000 +0000 --- gcc-3.3/gcc/config/arm/netbsd.h 2002-11-26 04:54:47.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 44,59 **** /* Some defines for CPP. arm32 is the NetBSD port name, so we always define arm32 and __arm32__. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "\ ! -Dunix -Driscbsd -Darm32 -D__arm32__ -D__arm__ -D__NetBSD__ \ ! -Asystem=unix -Asystem=NetBSD" - /* Define _POSIX_SOURCE if necessary. */ #undef CPP_SPEC #define CPP_SPEC "\ ! %(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) \ ! %{posix:-D_POSIX_SOURCE} \ " /* Because TARGET_DEFAULT sets ARM_FLAG_APCS_32 */ --- 44,65 ---- /* Some defines for CPP. arm32 is the NetBSD port name, so we always define arm32 and __arm32__. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! NETBSD_OS_CPP_BUILTINS_AOUT(); \ ! builtin_define_std ("arm32"); \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("riscbsd"); \ ! } while (0) ! ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ ! { "netbsd_link_spec", NETBSD_LINK_SPEC_AOUT }, #undef CPP_SPEC #define CPP_SPEC "\ ! %(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) %(netbsd_cpp_spec) \ " /* Because TARGET_DEFAULT sets ARM_FLAG_APCS_32 */ *************** Boston, MA 02111-1307, USA. */ *** 66,75 **** /* Pass -X to the linker so that it will strip symbols starting with 'L' */ #undef LINK_SPEC ! #define LINK_SPEC "\ ! -X %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} \ ! %{static:-Bstatic}} %{shared} %{assert*} \ ! " #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" --- 72,78 ---- /* Pass -X to the linker so that it will strip symbols starting with 'L' */ #undef LINK_SPEC ! #define LINK_SPEC "-X %(netbsd_link_spec)" #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" *************** Boston, MA 02111-1307, USA. */ *** 77,83 **** #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" ! #define HANDLE_SYSV_PRAGMA /* We don't have any limit on the length as out debugger is GDB. */ #undef DBX_CONTIN_LENGTH --- 80,86 ---- #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" ! #define HANDLE_SYSV_PRAGMA 1 /* We don't have any limit on the length as out debugger is GDB. */ #undef DBX_CONTIN_LENGTH *************** Boston, MA 02111-1307, USA. */ *** 142,144 **** --- 145,174 ---- requirements. */ #undef DEFAULT_STRUCTURE_SIZE_BOUNDARY #define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8 + + /* Emit code to set up a trampoline and synchronize the caches. */ + #undef INITIALIZE_TRAMPOLINE + #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ + { \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \ + (CXT)); \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 12)), \ + (FNADDR)); \ + emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \ + 0, VOIDmode, 2, TRAMP, Pmode, \ + plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \ + } + + /* Clear the instruction cache from `BEG' to `END'. This makes a + call to the ARM32_SYNC_ICACHE architecture specific syscall. */ + #define CLEAR_INSN_CACHE(BEG, END) \ + { \ + extern int sysarch(int number, void *args); \ + struct { \ + unsigned int addr; \ + int len; \ + } s; \ + s.addr = (unsigned int)(BEG); \ + s.len = (END) - (BEG); \ + (void)sysarch(0, &s); \ + } diff -Nrc3pad gcc-3.2.3/gcc/config/arm/pe.c gcc-3.3/gcc/config/arm/pe.c *** gcc-3.2.3/gcc/config/arm/pe.c 2001-10-20 00:24:14.000000000 +0000 --- gcc-3.3/gcc/config/arm/pe.c 2002-09-17 23:10:03.000000000 +0000 *************** *** 1,5 **** /* Routines for GCC for ARM/pe. ! Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc. Contributed by Doug Evans (dje@cygnus.com). This file is part of GNU CC. --- 1,5 ---- /* Routines for GCC for ARM/pe. ! Copyright (C) 1995, 1996, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Doug Evans (dje@cygnus.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** extern int current_function_anonymous_args; ! /* Return non-zero if DECL is a dllexport'd object. */ tree current_class_type; /* FIXME */ --- 32,38 ---- extern int current_function_anonymous_args; ! /* Return nonzero if DECL is a dllexport'd object. */ tree current_class_type; /* FIXME */ *************** arm_dllexport_p (decl) *** 52,58 **** return 0; } ! /* Return non-zero if DECL is a dllimport'd object. */ int arm_dllimport_p (decl) --- 52,58 ---- return 0; } ! /* Return nonzero if DECL is a dllimport'd object. */ int arm_dllimport_p (decl) *************** arm_dllimport_p (decl) *** 74,80 **** return 0; } ! /* Return non-zero if SYMBOL is marked as being dllexport'd. */ int arm_dllexport_name_p (symbol) --- 74,80 ---- return 0; } ! /* Return nonzero if SYMBOL is marked as being dllexport'd. */ int arm_dllexport_name_p (symbol) *************** arm_dllexport_name_p (symbol) *** 83,89 **** return symbol[0] == ARM_PE_FLAG_CHAR && symbol[1] == 'e' && symbol[2] == '.'; } ! /* Return non-zero if SYMBOL is marked as being dllimport'd. */ int arm_dllimport_name_p (symbol) --- 83,89 ---- return symbol[0] == ARM_PE_FLAG_CHAR && symbol[1] == 'e' && symbol[2] == '.'; } ! /* Return nonzero if SYMBOL is marked as being dllimport'd. */ int arm_dllimport_name_p (symbol) *************** arm_mark_dllimport (decl) *** 204,216 **** XEXP (DECL_RTL (decl), 0) = newrtl; } - /* Cover function to implement ENCODE_SECTION_INFO. */ - void ! arm_pe_encode_section_info (decl) tree decl; { ! /* This bit is copied from arm.h. */ if (optimize > 0 && TREE_CONSTANT (decl) && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) { --- 204,215 ---- XEXP (DECL_RTL (decl), 0) = newrtl; } void ! arm_pe_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { ! /* This bit is copied from arm_encode_section_info. */ if (optimize > 0 && TREE_CONSTANT (decl) && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) { *************** arm_pe_encode_section_info (decl) *** 247,254 **** } } - /* Cover function for UNIQUE_SECTION. */ - void arm_pe_unique_section (decl, reloc) tree decl; --- 246,251 ---- *************** arm_pe_unique_section (decl, reloc) *** 260,274 **** const char * prefix; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! /* Strip off any encoding in fnname. */ ! STRIP_NAME_ENCODING (name, name); /* The object is put in, for example, section .text$foo. The linker will then ultimately place them in .text (everything from the $ on is stripped). */ if (TREE_CODE (decl) == FUNCTION_DECL) prefix = ".text$"; ! else if (DECL_READONLY_SECTION (decl, reloc)) prefix = ".rdata$"; else prefix = ".data$"; --- 257,270 ---- const char * prefix; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! name = arm_strip_name_encoding (name); /* The object is put in, for example, section .text$foo. The linker will then ultimately place them in .text (everything from the $ on is stripped). */ if (TREE_CODE (decl) == FUNCTION_DECL) prefix = ".text$"; ! else if (decl_readonly_section (decl, reloc)) prefix = ".rdata$"; else prefix = ".data$"; diff -Nrc3pad gcc-3.2.3/gcc/config/arm/pe.h gcc-3.3/gcc/config/arm/pe.h *** gcc-3.2.3/gcc/config/arm/pe.h 2001-11-16 21:23:16.000000000 +0000 --- gcc-3.3/gcc/config/arm/pe.h 2002-05-19 05:23:00.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for ARM with PE obj format. ! Copyright (C) 1995, 1996, 1999, 2000 Free Software Foundation, Inc. Contributed by Doug Evans (dje@cygnus.com). This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for ARM with PE obj format. ! Copyright (C) 1995, 1996, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Doug Evans (dje@cygnus.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 94,123 **** 1,1,1 \ } - /* In addition to the stuff done in arm.h, we must mark dll symbols specially. - Definitions of dllexport'd objects install some info in the .drectve - section. References to dllimport'd objects are fetched indirectly via - __imp_. If both are declared, dllexport overrides. - This is also needed to implement one-only vtables: they go into their own - section and we need to set DECL_SECTION_NAME so we do that here. - Note that we can be called twice on the same decl. */ - #undef ENCODE_SECTION_INFO - #define ENCODE_SECTION_INFO(DECL) \ - arm_pe_encode_section_info (DECL) - - /* Used to implement dllexport overriding dllimport semantics. It's also used - to handle vtables - the first pass won't do anything because - DECL_CONTEXT (DECL) will be 0 so arm_dll{ex,im}port_p will return 0. - It's also used to handle dllimport override semantics. */ - #define REDO_SECTION_INFO_P(DECL) 1 - /* Define this macro if in some cases global symbols from one translation unit may not be bound to undefined symbols in another translation unit without user intervention. For instance, under Microsoft Windows symbols must be explicitly imported from shared libraries (DLLs). */ #define MULTIPLE_SYMBOL_SPACES ! #define UNIQUE_SECTION(DECL, RELOC) arm_pe_unique_section (DECL, RELOC) #define SUPPORTS_ONE_ONLY 1 --- 94,106 ---- 1,1,1 \ } /* Define this macro if in some cases global symbols from one translation unit may not be bound to undefined symbols in another translation unit without user intervention. For instance, under Microsoft Windows symbols must be explicitly imported from shared libraries (DLLs). */ #define MULTIPLE_SYMBOL_SPACES ! #define TARGET_ASM_UNIQUE_SECTION arm_pe_unique_section #define SUPPORTS_ONE_ONLY 1 *************** Boston, MA 02111-1307, USA. */ *** 206,218 **** /* A list of other sections which the compiler might be "in" at any given time. */ ! #undef SUBTARGET_EXTRA_SECTIONS ! #define SUBTARGET_EXTRA_SECTIONS in_drectve, /* A list of extra section function definitions. */ ! #undef SUBTARGET_EXTRA_SECTION_FUNCTIONS ! #define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ DRECTVE_SECTION_FUNCTION \ SWITCH_TO_SECTION_FUNCTION --- 189,201 ---- /* A list of other sections which the compiler might be "in" at any given time. */ ! #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_drectve /* A list of extra section function definitions. */ ! #undef EXTRA_SECTION_FUNCTIONS ! #define EXTRA_SECTION_FUNCTIONS \ DRECTVE_SECTION_FUNCTION \ SWITCH_TO_SECTION_FUNCTION *************** switch_to_section (section, decl) \ *** 245,251 **** case in_text: text_section (); break; \ case in_data: data_section (); break; \ case in_named: named_section (decl, NULL, 0); break; \ ! case in_rdata: rdata_section (); break; \ case in_ctors: ctors_section (); break; \ case in_dtors: dtors_section (); break; \ case in_drectve: drectve_section (); break; \ --- 228,234 ---- case in_text: text_section (); break; \ case in_data: data_section (); break; \ case in_named: named_section (decl, NULL, 0); break; \ ! case in_readonly_data: readonly_data_section (); break; \ case in_ctors: ctors_section (); break; \ case in_dtors: dtors_section (); break; \ case in_drectve: drectve_section (); break; \ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/README-interworking gcc-3.3/gcc/config/arm/README-interworking *** gcc-3.2.3/gcc/config/arm/README-interworking 1998-12-16 21:01:25.000000000 +0000 --- gcc-3.3/gcc/config/arm/README-interworking 2002-09-14 15:51:42.000000000 +0000 *************** processing is enabled. *** 235,241 **** When the -mthumb-interwork command line switch is specified, gcc arranges for all functions to return to their caller by using the BX instruction. Thus provided that the return address has the bottom bit ! correctly initialised to indicate the instruction set of the caller, correct operation will ensue. When a function is called explicitly (rather than via a function --- 235,241 ---- When the -mthumb-interwork command line switch is specified, gcc arranges for all functions to return to their caller by using the BX instruction. Thus provided that the return address has the bottom bit ! correctly initialized to indicate the instruction set of the caller, correct operation will ensue. When a function is called explicitly (rather than via a function diff -Nrc3pad gcc-3.2.3/gcc/config/arm/riscix1-1.h gcc-3.3/gcc/config/arm/riscix1-1.h *** gcc-3.2.3/gcc/config/arm/riscix1-1.h 2001-12-13 00:27:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/riscix1-1.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,103 **** - /* Definitions of target machine for GNU compiler. ARM RISCiX 1.1x version. - Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc. - Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original - work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) - and Martin Simmons (@harleqn.co.uk). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* RISCiX 1.1x is basically the same as 1.2x except that it doesn't have - symrename or atexit. */ - - /* Translation to find startup files. On RISCiX boxes, gcrt0.o is in - /usr/lib. */ - #define STARTFILE_SPEC \ - "%{pg:/usr/lib/gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES "-Darm -Driscix -Dunix -Asystem=unix" - #endif - - /* Riscix 1.1 doesn't have X/OPEN support, so only accept -mbsd (but ignore - it). - By not having -mxopen and -mno-symrename, we get warning messages, - but everything still compiles. */ - /* None of these is actually used in cc1, so they modify bit 31 */ - #define SUBTARGET_SWITCHES \ - {"bsd", 0x80000000, ""}, - - - /* Run-time Target Specification. */ - #define TARGET_VERSION \ - fputs (" (ARM/RISCiX)", stderr); - - /* This is used in ASM_FILE_START */ - #define ARM_OS_NAME "RISCiX" - - #ifdef riscos - #define TARGET_WHEN_DEBUGGING 3 - #else - #define TARGET_WHEN_DEBUGGING 1 - #endif - - /* 'char' is signed by default on RISCiX, unsigned on RISCOS. */ - #ifdef riscos - #define DEFAULT_SIGNED_CHAR 0 - #else - #define DEFAULT_SIGNED_CHAR 1 - #endif - - /* Define this if the target system lacks the function atexit from the - ANSI C standard. If this is defined, and ON_EXIT is not - defined, a default exit function will be provided to support C++. - The man page only describes on_exit, but atexit is also there. - This seems to be missing in early versions. - - FIXME Should we define ON_EXIT here? */ - #define NEED_ATEXIT - - /* Some systems use __main in a way incompatible with its use in gcc, in these - cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to - give the same symbol without quotes for an alternative entry point. You - must define both, or neither. */ - #ifndef NAME__MAIN - #define NAME__MAIN "__gccmain" - #define SYMBOL__MAIN __gccmain - #endif - - /* Override the normal default CPU */ - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2 - - /* r10 is reserved by RISCiX */ - #define SUBTARGET_CONDITIONAL_REGISTER_USAGE \ - fixed_regs[10] = 1; \ - call_used_regs[10] = 1; - - - #include "arm/aout.h" - - #define SUBTARGET_CPP_SPEC "%{!ansi: -D_BSD_C}" - - - /* The native RISCiX assembler does not support stabs of any kind; because - the native assembler is not used by the compiler, Acorn didn't feel it was - necessary to put them in! */ - - #ifdef DBX_DEBUGGING_INFO - #undef DBX_DEBUGGING_INFO - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/arm/riscix.h gcc-3.3/gcc/config/arm/riscix.h *** gcc-3.2.3/gcc/config/arm/riscix.h 2001-12-13 00:27:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/riscix.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,144 **** - /* Definitions of target machine for GNU compiler. ARM RISCiX version. - Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000 - Free Software Foundation, Inc. - Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original - work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) - and Martin Simmons (@harleqn.co.uk). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Translation to find startup files. On RISC iX boxes, - crt0, mcrt0 and gcrt0.o are in /usr/lib. */ - #define STARTFILE_SPEC "\ - %{pg:/usr/lib/gcrt0.o%s}\ - %{!pg:%{p:/usr/lib/mcrt0.o%s}\ - %{!p:/usr/lib/crt0.o%s}}" - - /* RISC iX has no concept of -lg */ - /* If -static is specified then link with -lc_n */ - - #ifndef LIB_SPEC - #define LIB_SPEC "\ - %{g*:-lg}\ - %{!p:%{!pg:%{!static:-lc}%{static:-lc_n}}}\ - %{p:-lc_p}\ - %{pg:-lc_p}" - #endif - - /* The RISC iX assembler never deletes any symbols from the object module; - and, by default, ld doesn't either. -X causes local symbols starting - with 'L' to be deleted, which is what we want. */ - #ifndef LINK_SPEC - #define LINK_SPEC "-X" - #endif - - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-Darm -Driscix -Dunix -Asystem=unix" - #endif - - - /* RISCiX has some weird symbol name munging, that is done to the object module - after assembly, which enables multiple libraries to be supported within - one (possibly shared) library. It basically changes the symbol name of - certain symbols (for example _bcopy is converted to _$bcopy if using BSD) - Symrename's parameters are determined as follows: - -mno-symrename Don't run symrename - -mbsd symrename -BSD - -mxopen symrename -XOPEN - -ansi symrename - - symrename -BSD - */ - - #ifndef ASM_FINAL_SPEC - #if !defined (CROSS_COMPILE) - #define ASM_FINAL_SPEC "\ - %{!mno-symrename: \ - \n /usr/bin/symrename \ - -%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible}BSD}\ - %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible}\ - %{pedantic:%e-mxopen and -pedantic incompatible}XOPEN}\ - %{!mbsd:%{!mxopen:%{!ansi:BSD}}} %{c:%{o*:%*}%{!o*:%b.o}}%{!c:%U.o}}" - #endif - #endif - - /* None of these is actually used in cc1. If we don't define them in target - switches cc1 complains about them. For the sake of argument lets allocate - bit 31 of target flags for such options. */ - #define SUBTARGET_SWITCHES \ - {"bsd", 0x80000000, N_("Do symbol renaming for BSD")}, \ - {"xopen", 0x80000000, N_("Do symbol renaming for X/OPEN")}, \ - {"no-symrename", 0x80000000, N_("Don't do symbol renaming")}, - - - /* Run-time Target Specification. */ - #define TARGET_VERSION \ - fputs (" (ARM/RISCiX)", stderr); - - /* This is used in ASM_FILE_START */ - #define ARM_OS_NAME "RISCiX" - - /* Unsigned chars produces much better code than signed. */ - #define DEFAULT_SIGNED_CHAR 0 - - /* Some systems use __main in a way incompatible with its use in gcc, in these - cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to - give the same symbol without quotes for an alternative entry point. You - must define both, or neither. */ - #ifndef NAME__MAIN - #define NAME__MAIN "__gccmain" - #define SYMBOL__MAIN __gccmain - #endif - - /* size_t is "unsigned int" in RISCiX */ - #define SIZE_TYPE "unsigned int" - - /* ptrdiff_t is "int" in RISCiX */ - #define PTRDIFF_TYPE "int" - - /* Maths operation domain error number, EDOM */ - #define TARGET_EDOM 33 - - /* Override the normal default CPU */ - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2 - - /* r10 is reserved by RISCiX */ - #define SUBTARGET_CONDITIONAL_REGISTER_USAGE \ - fixed_regs[10] = 1; \ - call_used_regs[10] = 1; - - #include "arm/aout.h" - - /* The RISCiX assembler does not understand .set */ - #undef SET_ASM_OP - - /* Add to CPP_SPEC, we want to add the right #defines when using the include - files. */ - #define SUBTARGET_CPP_SPEC "\ - %{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible} -D_BSD_C} \ - %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible} \ - %{pedantic:%e-mxopen and -pedantic incompatible} -D_XOPEN_C} \ - %{!mbsd:%{!mxopen:%{!ansi: -D_BSD_C}}}" - - /* The native RISCiX assembler does not support stabs of any kind; because - the native assembler is not used by the compiler, Acorn didn't feel it was - necessary to put them in! */ - - #ifdef DBX_DEBUGGING_INFO - #undef DBX_DEBUGGING_INFO - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/arm/rix-gas.h gcc-3.3/gcc/config/arm/rix-gas.h *** gcc-3.2.3/gcc/config/arm/rix-gas.h 2001-11-16 21:23:16.000000000 +0000 --- gcc-3.3/gcc/config/arm/rix-gas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,42 **** - /* Definitions of target machine for GNU compiler. ARM RISCiX(stabs) version. - Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original - work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) - and Martin Simmons (@harleqn.co.uk). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Limit the length of a stabs entry (for the broken Acorn assembler) */ - #undef DBX_CONTIN_LENGTH - #define DBX_CONTIN_LENGTH 80 - - /* The native RISCiX assembler does not support stabs of any kind; because - the native assembler is not used by the compiler, Acorn didn't feel it was - necessary to put them in! - However, this file assumes that we have an assembler that does have stabs, - so we put them back in. */ - - #define DBX_DEBUGGING_INFO - - /* Unfortunately dbx doesn't understand these */ - /* Dbx on RISCiX is so broken that I've given up trying to support it. - lets just support gdb. */ - /* #define DEFAULT_GDB_EXTENSIONS 0 */ - /* RISCiX dbx doesn't accept xrefs */ - /* #define DBX_NO_XREFS 1 */ - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/arm/rtems-elf.h gcc-3.3/gcc/config/arm/rtems-elf.h *** gcc-3.2.3/gcc/config/arm/rtems-elf.h 2002-04-30 19:58:55.000000000 +0000 --- gcc-3.3/gcc/config/arm/rtems-elf.h 2002-05-14 17:35:49.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,28 **** #define HAS_INIT_SECTION ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__rtems__ -D__ELF__ -Asystem=rtems" --- 24,32 ---- #define HAS_INIT_SECTION ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__rtems__"); \ ! builtin_define ("__ELF__"); \ ! builtin_assert ("system=rtems"); \ ! } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/arm/semiaof.h gcc-3.3/gcc/config/arm/semiaof.h *** gcc-3.2.3/gcc/config/arm/semiaof.h 2001-12-13 00:27:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/semiaof.h 2002-05-14 17:35:49.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,27 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define CPP_PREDEFINES \ ! "-Darm -Dsemi" #define ASM_SPEC "%{g -g} -arch 4 \ -apcs 3%{mapcs-32:/32bit}%{mapcs-26:/26bit}%{!mapcs-26:%{!macps-32:/32bit}}" --- 20,30 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("arm"); \ ! builtin_define_std ("semi"); \ ! } while (0) #define ASM_SPEC "%{g -g} -arch 4 \ -apcs 3%{mapcs-32:/32bit}%{mapcs-26:/26bit}%{!mapcs-26:%{!macps-32:/32bit}}" diff -Nrc3pad gcc-3.2.3/gcc/config/arm/semi.h gcc-3.3/gcc/config/arm/semi.h *** gcc-3.2.3/gcc/config/arm/semi.h 2001-11-16 21:23:16.000000000 +0000 --- gcc-3.3/gcc/config/arm/semi.h 2002-05-20 17:07:04.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 61,68 **** #define ASM_SPEC "\ %{fpic: -k} %{fPIC: -k} \ %{mbig-endian:-EB} \ ! %{mcpu=*:-m%*} \ ! %{march=*:-m%*} \ %{mapcs-float:-mfloat} \ %{msoft-float:-mno-fpu} \ %{mthumb-interwork:-mthumb-interwork} \ --- 61,68 ---- #define ASM_SPEC "\ %{fpic: -k} %{fPIC: -k} \ %{mbig-endian:-EB} \ ! %{mcpu=*:-mcpu=%*} \ ! %{march=*:-march=%*} \ %{mapcs-float:-mfloat} \ %{msoft-float:-mno-fpu} \ %{mthumb-interwork:-mthumb-interwork} \ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/t-arm-elf gcc-3.3/gcc/config/arm/t-arm-elf *** gcc-3.2.3/gcc/config/arm/t-arm-elf 2001-09-14 10:19:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/t-arm-elf 2002-05-08 15:01:13.000000000 +0000 *************** MULTILIB_OPTIONS = marm/mthumb *** 25,40 **** MULTILIB_DIRNAMES = arm thumb MULTILIB_EXCEPTIONS = ! # MULTILIB_OPTIONS = mlittle-endian/mbig-endian ! # MULTILIB_DIRNAMES = le be # MULTILIB_EXCEPTIONS = # MULTILIB_MATCHES = mbig-endian=mbe mlittle-endian=mle # # MULTILIB_OPTIONS += mhard-float/msoft-float # MULTILIB_DIRNAMES += fpu soft # # MULTILIB_OPTIONS += mapcs-32/mapcs-26 # MULTILIB_DIRNAMES += 32bit 26bit # # MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork # MULTILIB_DIRNAMES += normal interwork --- 25,42 ---- MULTILIB_DIRNAMES = arm thumb MULTILIB_EXCEPTIONS = ! # MULTILIB_OPTIONS += mlittle-endian/mbig-endian ! # MULTILIB_DIRNAMES += le be # MULTILIB_EXCEPTIONS = # MULTILIB_MATCHES = mbig-endian=mbe mlittle-endian=mle # # MULTILIB_OPTIONS += mhard-float/msoft-float # MULTILIB_DIRNAMES += fpu soft + # MULTILIB_EXCEPTIONS += *mthumb/*mhard-float* # # MULTILIB_OPTIONS += mapcs-32/mapcs-26 # MULTILIB_DIRNAMES += 32bit 26bit + # MULTILIB_EXCEPTIONS += *mthumb/*mapcs-26* # # MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork # MULTILIB_DIRNAMES += normal interwork diff -Nrc3pad gcc-3.2.3/gcc/config/arm/t-pe gcc-3.3/gcc/config/arm/t-pe *** gcc-3.2.3/gcc/config/arm/t-pe 2001-05-17 03:15:49.000000000 +0000 --- gcc-3.3/gcc/config/arm/t-pe 2002-03-03 04:23:02.000000000 +0000 *************** dp-bit.c: $(srcdir)/config/fp-bit.c *** 20,26 **** echo '#endif' >> dp-bit.c cat $(srcdir)/config/fp-bit.c >> dp-bit.c ! pe.o: $(srcdir)/config/arm/pe.c $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/arm/pe.c MULTILIB_OPTIONS = mhard-float mthumb --- 20,27 ---- echo '#endif' >> dp-bit.c cat $(srcdir)/config/fp-bit.c >> dp-bit.c ! pe.o: $(srcdir)/config/arm/pe.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) output.h \ ! flags.h $(TREE_H) $(EXPR_H) toplev.h $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/arm/pe.c MULTILIB_OPTIONS = mhard-float mthumb diff -Nrc3pad gcc-3.2.3/gcc/config/arm/t-riscix gcc-3.3/gcc/config/arm/t-riscix *** gcc-3.2.3/gcc/config/arm/t-riscix 2001-11-15 13:05:53.000000000 +0000 --- gcc-3.3/gcc/config/arm/t-riscix 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,6 **** - # Just for these, we omit the frame pointer since it makes such a big - # difference. It is then pointless adding debugging. - TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer - LIBGCC2_DEBUG_CFLAGS = -g0 - - FIXPROTO_DEFINES= -D_POSIX_SOURCE -D_XOPEN_C -D_BSD_C -D_XOPEN_SOURCE --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/arm/unknown-elf.h gcc-3.3/gcc/config/arm/unknown-elf.h *** gcc-3.2.3/gcc/config/arm/unknown-elf.h 2001-12-15 16:46:57.000000000 +0000 --- gcc-3.3/gcc/config/arm/unknown-elf.h 2002-09-23 15:14:14.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 47,53 **** #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! /* Return a non-zero value if DECL has a section attribute. */ #define IN_NAMED_SECTION(DECL) \ ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \ && DECL_SECTION_NAME (DECL) != NULL_TREE) --- 47,53 ---- #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! /* Return a nonzero value if DECL has a section attribute. */ #define IN_NAMED_SECTION(DECL) \ ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \ && DECL_SECTION_NAME (DECL) != NULL_TREE) *************** Boston, MA 02111-1307, USA. */ *** 61,67 **** else \ bss_section (); \ \ ! ASM_GLOBALIZE_LABEL (FILE, NAME); \ \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ \ --- 61,67 ---- else \ bss_section (); \ \ ! (*targetm.asm_out.globalize_label) (FILE, NAME); \ \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ \ *************** Boston, MA 02111-1307, USA. */ *** 82,95 **** \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL (FILE, NAME); \ ! fprintf (FILE, "\t.space\t%d\n", SIZE); \ } \ while (0) - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__ELF__" - #endif - #ifndef CPP_APCS_PC_DEFAULT_SPEC #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" #endif --- 82,91 ---- \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL (FILE, NAME); \ ! fprintf (FILE, "\t.space\t%d\n", SIZE ? SIZE : 1); \ } \ while (0) #ifndef CPP_APCS_PC_DEFAULT_SPEC #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" #endif diff -Nrc3pad gcc-3.2.3/gcc/config/arm/unknown-elf-oabi.h gcc-3.3/gcc/config/arm/unknown-elf-oabi.h *** gcc-3.2.3/gcc/config/arm/unknown-elf-oabi.h 2001-09-14 10:19:30.000000000 +0000 --- gcc-3.3/gcc/config/arm/unknown-elf-oabi.h 2002-05-20 17:07:04.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,32 **** #undef TARGET_VERSION #define TARGET_VERSION fputs (" (ARM/ELF non-Linux old abi)", stderr); - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Darm_oabi -Darm -Darm_elf -Acpu=arm -Amachine=arm -D__ELF__" - #undef ASM_SPEC ! #define ASM_SPEC "-moabi %{mbig-endian:-EB} %{mcpu=*:-m%*} %{march=*:-m%*} \ %{mapcs-*:-mapcs-%*} %{mthumb-interwork:-mthumb-interwork}" --- 23,29 ---- #undef TARGET_VERSION #define TARGET_VERSION fputs (" (ARM/ELF non-Linux old abi)", stderr); #undef ASM_SPEC ! #define ASM_SPEC "-moabi %{mbig-endian:-EB} %{mcpu=*:-mcpu=%*} %{march=*:-march=%*} \ %{mapcs-*:-mapcs-%*} %{mthumb-interwork:-mthumb-interwork}" diff -Nrc3pad gcc-3.2.3/gcc/config/arm/vxarm.h gcc-3.3/gcc/config/arm/vxarm.h *** gcc-3.2.3/gcc/config/arm/vxarm.h 2001-11-16 21:23:16.000000000 +0000 --- gcc-3.3/gcc/config/arm/vxarm.h 2002-05-14 17:35:50.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 37,44 **** %{!mcpu*:%{!march=*:-DCPU=ARM710A}} \ " ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__vxworks -Acpu=arm -Amachine=arm" /* VxWorks does all the library stuff itself. */ #undef LIB_SPEC --- 37,46 ---- %{!mcpu*:%{!march=*:-DCPU=ARM710A}} \ " ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__vxworks"); \ ! } while (0) /* VxWorks does all the library stuff itself. */ #undef LIB_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/arm/xscale-coff.h gcc-3.3/gcc/config/arm/xscale-coff.h *** gcc-3.2.3/gcc/config/arm/xscale-coff.h 2001-11-23 09:13:14.000000000 +0000 --- gcc-3.3/gcc/config/arm/xscale-coff.h 2002-05-20 17:07:04.000000000 +0000 *************** *** 24,30 **** #define SUBTARGET_CPU_DEFAULT TARGET_CPU_xscale #undef SUBTARGET_EXTRA_ASM_SPEC ! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mxscale}" #undef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ --- 24,30 ---- #define SUBTARGET_CPU_DEFAULT TARGET_CPU_xscale #undef SUBTARGET_EXTRA_ASM_SPEC ! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale}" #undef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ diff -Nrc3pad gcc-3.2.3/gcc/config/arm/xscale-elf.h gcc-3.3/gcc/config/arm/xscale-elf.h *** gcc-3.2.3/gcc/config/arm/xscale-elf.h 2001-12-19 15:27:22.000000000 +0000 --- gcc-3.3/gcc/config/arm/xscale-elf.h 2002-05-20 17:07:04.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 28,34 **** #define SUBTARGET_CPU_DEFAULT TARGET_CPU_xscale #endif ! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mxscale} %{!mhard-float:-mno-fpu}" #ifndef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ --- 28,34 ---- #define SUBTARGET_CPU_DEFAULT TARGET_CPU_xscale #endif ! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} %{!mhard-float:-mno-fpu}" #ifndef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ diff -Nrc3pad gcc-3.2.3/gcc/config/avr/avr.c gcc-3.3/gcc/config/avr/avr.c *** gcc-3.2.3/gcc/config/avr/avr.c 2002-11-23 22:16:52.000000000 +0000 --- gcc-3.3/gcc/config/avr/avr.c 2002-10-24 20:07:21.000000000 +0000 *************** *** 27,37 **** #include "real.h" #include "insn-config.h" #include "conditions.h" - #include "output.h" #include "insn-attr.h" #include "flags.h" #include "reload.h" #include "tree.h" #include "expr.h" #include "toplev.h" #include "obstack.h" --- 27,37 ---- #include "real.h" #include "insn-config.h" #include "conditions.h" #include "insn-attr.h" #include "flags.h" #include "reload.h" #include "tree.h" + #include "output.h" #include "expr.h" #include "toplev.h" #include "obstack.h" *************** *** 47,52 **** --- 47,53 ---- static int avr_naked_function_p PARAMS ((tree)); static int interrupt_function_p PARAMS ((tree)); static int signal_function_p PARAMS ((tree)); + static int avr_regs_to_save PARAMS ((HARD_REG_SET *)); static int sequent_regs_live PARAMS ((void)); static const char * ptrreg_to_str PARAMS ((int)); static const char * cond_string PARAMS ((enum rtx_code)); *************** static int out_set_stack_ptr PARAM *** 56,69 **** static RTX_CODE compare_condition PARAMS ((rtx insn)); static int compare_sign_p PARAMS ((rtx insn)); static int reg_was_0 PARAMS ((rtx insn, rtx op)); - static int io_address_p PARAMS ((rtx x, int size)); - void debug_hard_reg_set PARAMS ((HARD_REG_SET set)); static tree avr_handle_progmem_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree avr_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, bool *)); const struct attribute_spec avr_attribute_table[]; static bool avr_assemble_integer PARAMS ((rtx, unsigned int, int)); static void avr_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void avr_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); /* Allocate registers from r25 to r8 for parameters for function calls */ #define FIRST_CUM_REG 26 --- 57,74 ---- static RTX_CODE compare_condition PARAMS ((rtx insn)); static int compare_sign_p PARAMS ((rtx insn)); static int reg_was_0 PARAMS ((rtx insn, rtx op)); static tree avr_handle_progmem_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree avr_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, bool *)); const struct attribute_spec avr_attribute_table[]; static bool avr_assemble_integer PARAMS ((rtx, unsigned int, int)); static void avr_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void avr_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void avr_unique_section PARAMS ((tree, int)); + static void avr_encode_section_info PARAMS ((tree, int)); + static unsigned int avr_section_type_flags PARAMS ((tree, const char *, int)); + + static void avr_asm_out_ctor PARAMS ((rtx, int)); + static void avr_asm_out_dtor PARAMS ((rtx, int)); /* Allocate registers from r25 to r8 for parameters for function calls */ #define FIRST_CUM_REG 26 *************** const char *avr_init_stack = "__stack"; *** 106,128 **** /* Default MCU name */ const char *avr_mcu_name = "avr2"; /* More than 8K of program memory: use "call" and "jmp". */ int avr_mega_p = 0; /* Enhanced core: use "movw", "mul", ... */ int avr_enhanced_p = 0; ! enum avr_arch { ! AVR1 = 1, ! AVR2, ! AVR3, ! AVR4, ! AVR5 }; struct mcu_type_s { const char *const name; ! const enum avr_arch arch; }; /* List of all known AVR MCU types - if updated, it has to be kept --- 111,150 ---- /* Default MCU name */ const char *avr_mcu_name = "avr2"; + /* Preprocessor macros to define depending on MCU type. */ + const char *avr_base_arch_macro; + const char *avr_extra_arch_macro; + /* More than 8K of program memory: use "call" and "jmp". */ int avr_mega_p = 0; /* Enhanced core: use "movw", "mul", ... */ int avr_enhanced_p = 0; ! /* Assembler only. */ ! int avr_asm_only_p = 0; ! ! struct base_arch_s { ! int asm_only; ! int enhanced; ! int mega; ! const char *const macro; ! }; ! ! static const struct base_arch_s avr_arch_types[] = { ! { 1, 0, 0, NULL }, /* unknown device specified */ ! { 1, 0, 0, "__AVR_ARCH__=1" }, ! { 0, 0, 0, "__AVR_ARCH__=2" }, ! { 0, 0, 1, "__AVR_ARCH__=3" }, ! { 0, 1, 0, "__AVR_ARCH__=4" }, ! { 0, 1, 1, "__AVR_ARCH__=5" } }; struct mcu_type_s { const char *const name; ! int arch; /* index in avr_arch_types[] */ ! /* Must lie outside user's namespace. NULL == no macro. */ ! const char *const macro; }; /* List of all known AVR MCU types - if updated, it has to be kept *************** struct mcu_type_s { *** 135,183 **** static const struct mcu_type_s avr_mcu_types[] = { /* Classic, <= 8K. */ ! { "avr2", AVR2 }, ! { "at90s2313", AVR2 }, ! { "at90s2323", AVR2 }, ! { "attiny22", AVR2 }, ! { "at90s2333", AVR2 }, ! { "at90s2343", AVR2 }, ! { "at90s4414", AVR2 }, ! { "at90s4433", AVR2 }, ! { "at90s4434", AVR2 }, ! { "at90s8515", AVR2 }, ! { "at90c8534", AVR2 }, ! { "at90s8535", AVR2 }, /* Classic, > 8K. */ ! { "avr3", AVR3 }, ! { "atmega103", AVR3 }, ! { "atmega603", AVR3 }, ! { "at43usb320", AVR3 }, ! { "at76c711", AVR3 }, /* Enhanced, <= 8K. */ ! { "avr4", AVR4 }, ! { "atmega8", AVR4 }, ! { "atmega83", AVR4 }, ! { "atmega85", AVR4 }, /* Enhanced, > 8K. */ ! { "avr5", AVR5 }, ! { "atmega16", AVR5 }, ! { "atmega161", AVR5 }, ! { "atmega163", AVR5 }, ! { "atmega32", AVR5 }, ! { "atmega323", AVR5 }, ! { "atmega64", AVR5 }, ! { "atmega128", AVR5 }, ! { "at43usb355", AVR5 }, ! { "at94k", AVR5 }, /* Assembler only. */ ! { "avr1", AVR1 }, ! { "at90s1200", AVR1 }, ! { "attiny10", AVR1 }, ! { "attiny11", AVR1 }, ! { "attiny12", AVR1 }, ! { "attiny15", AVR1 }, ! { "attiny28", AVR1 }, ! { NULL, 0 } }; int avr_case_values_threshold = 30000; --- 157,208 ---- static const struct mcu_type_s avr_mcu_types[] = { /* Classic, <= 8K. */ ! { "avr2", 2, NULL }, ! { "at90s2313", 2, "__AVR_AT90S2313__" }, ! { "at90s2323", 2, "__AVR_AT90S2323__" }, ! { "at90s2333", 2, "__AVR_AT90S2333__" }, ! { "at90s2343", 2, "__AVR_AT90S2343__" }, ! { "attiny22", 2, "__AVR_ATtiny22__" }, ! { "attiny26", 2, "__AVR_ATtiny26__" }, ! { "at90s4414", 2, "__AVR_AT90S4414__" }, ! { "at90s4433", 2, "__AVR_AT90S4433__" }, ! { "at90s4434", 2, "__AVR_AT90S4434__" }, ! { "at90s8515", 2, "__AVR_AT90S8515__" }, ! { "at90c8534", 2, "__AVR_AT90C8534__" }, ! { "at90s8535", 2, "__AVR_AT90S8535__" }, ! { "at86rf401", 2, "__AVR_AT86RF401__" }, /* Classic, > 8K. */ ! { "avr3", 3, NULL }, ! { "atmega103", 3, "__AVR_ATmega103__" }, ! { "atmega603", 3, "__AVR_ATmega603__" }, ! { "at43usb320", 3, "__AVR_AT43USB320__" }, ! { "at43usb355", 3, "__AVR_AT43USB355__" }, ! { "at76c711", 3, "__AVR_AT76C711__" }, /* Enhanced, <= 8K. */ ! { "avr4", 4, NULL }, ! { "atmega8", 4, "__AVR_ATmega8__" }, ! { "atmega8515", 4, "__AVR_ATmega8515__" }, ! { "atmega8535", 4, "__AVR_ATmega8535__" }, /* Enhanced, > 8K. */ ! { "avr5", 5, NULL }, ! { "atmega16", 5, "__AVR_ATmega16__" }, ! { "atmega161", 5, "__AVR_ATmega161__" }, ! { "atmega162", 5, "__AVR_ATmega162__" }, ! { "atmega163", 5, "__AVR_ATmega163__" }, ! { "atmega169", 5, "__AVR_ATmega169__" }, ! { "atmega32", 5, "__AVR_ATmega32__" }, ! { "atmega323", 5, "__AVR_ATmega323__" }, ! { "atmega64", 5, "__AVR_ATmega64__" }, ! { "atmega128", 5, "__AVR_ATmega128__" }, ! { "at94k", 5, "__AVR_AT94K__" }, /* Assembler only. */ ! { "avr1", 1, NULL }, ! { "at90s1200", 1, "__AVR_AT90S1200__" }, ! { "attiny11", 1, "__AVR_ATtiny11__" }, ! { "attiny12", 1, "__AVR_ATtiny12__" }, ! { "attiny15", 1, "__AVR_ATtiny15__" }, ! { "attiny28", 1, "__AVR_ATtiny28__" }, ! { NULL, 0, NULL } }; int avr_case_values_threshold = 30000; *************** int avr_case_values_threshold = 30000; *** 194,199 **** --- 219,230 ---- #define TARGET_ASM_FUNCTION_EPILOGUE avr_output_function_epilogue #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE avr_attribute_table + #undef TARGET_ASM_UNIQUE_SECTION + #define TARGET_ASM_UNIQUE_SECTION avr_unique_section + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO avr_encode_section_info + #undef TARGET_SECTION_TYPE_FLAGS + #define TARGET_SECTION_TYPE_FLAGS avr_section_type_flags struct gcc_target targetm = TARGET_INITIALIZER; *************** void *** 201,206 **** --- 232,238 ---- avr_override_options () { const struct mcu_type_s *t; + const struct base_arch_s *base; for (t = avr_mcu_types; t->name; t++) if (strcmp (t->name, avr_mcu_name) == 0) *************** avr_override_options () *** 214,230 **** fprintf (stderr," %s\n", t->name); } ! switch (t->arch) ! { ! case AVR1: ! default: ! error ("MCU `%s' not supported", avr_mcu_name); ! /* ... fall through ... */ ! case AVR2: avr_enhanced_p = 0; avr_mega_p = 0; break; ! case AVR3: avr_enhanced_p = 0; avr_mega_p = 1; break; ! case AVR4: avr_enhanced_p = 1; avr_mega_p = 0; break; ! case AVR5: avr_enhanced_p = 1; avr_mega_p = 1; break; ! } if (optimize && !TARGET_NO_TABLEJUMP) avr_case_values_threshold = (!AVR_MEGA || TARGET_CALL_PROLOGUES) ? 8 : 17; --- 246,257 ---- fprintf (stderr," %s\n", t->name); } ! base = &avr_arch_types[t->arch]; ! avr_asm_only_p = base->asm_only; ! avr_enhanced_p = base->enhanced; ! avr_mega_p = base->mega; ! avr_base_arch_macro = base->macro; ! avr_extra_arch_macro = t->macro; if (optimize && !TARGET_NO_TABLEJUMP) avr_case_values_threshold = (!AVR_MEGA || TARGET_CALL_PROLOGUES) ? 8 : 17; *************** avr_reg_class_from_letter (c) *** 311,317 **** return NO_REGS; } ! /* Return non-zero if FUNC is a naked function. */ static int avr_naked_function_p (func) --- 338,344 ---- return NO_REGS; } ! /* Return nonzero if FUNC is a naked function. */ static int avr_naked_function_p (func) *************** signal_function_p (func) *** 358,363 **** --- 385,431 ---- return a != NULL_TREE; } + /* Return the number of hard registers to push/pop in the prologue/epilogue + of the current function, and optionally store these registers in SET. */ + + static int + avr_regs_to_save (set) + HARD_REG_SET *set; + { + int reg, count; + int int_or_sig_p = (interrupt_function_p (current_function_decl) + || signal_function_p (current_function_decl)); + int leaf_func_p = leaf_function_p (); + + if (set) + CLEAR_HARD_REG_SET (*set); + count = 0; + + /* No need to save any registers if the function never returns. */ + if (TREE_THIS_VOLATILE (current_function_decl)) + return 0; + + for (reg = 0; reg < 32; reg++) + { + /* Do not push/pop __tmp_reg__, __zero_reg__, as well as + any global register variables. */ + if (fixed_regs[reg]) + continue; + + if ((int_or_sig_p && !leaf_func_p && call_used_regs[reg]) + || (regs_ever_live[reg] + && (int_or_sig_p || !call_used_regs[reg]) + && !(frame_pointer_needed + && (reg == REG_Y || reg == (REG_Y+1))))) + { + if (set) + SET_HARD_REG_BIT (*set, reg); + count++; + } + } + return count; + } + /* Compute offset between arg_pointer and frame_pointer */ int *************** initial_elimination_offset (from, to) *** 365,395 **** int from; int to; { - int reg; if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) return 0; else { ! int interrupt_func_p = interrupt_function_p (current_function_decl); ! int signal_func_p = signal_function_p (current_function_decl); ! int leaf_func_p = leaf_function_p (); ! int offset= frame_pointer_needed ? 2 : 0; ! for (reg = 0; reg < 32; ++reg) ! { ! if ((!leaf_func_p && (call_used_regs[reg] ! && (interrupt_func_p || signal_func_p))) ! || (regs_ever_live[reg] ! && (!call_used_regs[reg] || interrupt_func_p || signal_func_p) ! && ! (frame_pointer_needed ! && (reg == REG_Y || reg == (REG_Y+1))))) ! { ! ++offset; ! } ! } return get_frame_size () + 2 + 1 + offset; } ! return 0; } /* This function checks sequence of live registers */ --- 433,462 ---- int from; int to; { if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) return 0; else { ! int offset = frame_pointer_needed ? 2 : 0; ! offset += avr_regs_to_save (NULL); return get_frame_size () + 2 + 1 + offset; } ! } ! ! /* Return 1 if the function epilogue is just a single "ret". */ ! ! int ! avr_simple_epilogue () ! { ! return (! frame_pointer_needed ! && get_frame_size () == 0 ! && avr_regs_to_save (NULL) == 0 ! && ! interrupt_function_p (current_function_decl) ! && ! signal_function_p (current_function_decl) ! && ! avr_naked_function_p (current_function_decl) ! && ! MAIN_NAME_P (DECL_NAME (current_function_decl)) ! && ! TREE_THIS_VOLATILE (current_function_decl)); } /* This function checks sequence of live registers */ *************** avr_output_function_prologue (file, size *** 564,599 **** int reg; int interrupt_func_p; int signal_func_p; - int leaf_func_p; int main_p; int live_seq; int minimize; ! if (avr_naked_function_p (current_function_decl)) { ! fprintf (file, "/* prologue: naked */\n"); ! return; } interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); - leaf_func_p = leaf_function_p (); main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES && !interrupt_func_p && !signal_func_p && live_seq); - last_insn_address = 0; - jump_tables_size = 0; - prologue_size = 0; - fprintf (file, "/* prologue: frame size=%d */\n", size); - if (interrupt_func_p) { fprintf (file,"\tsei\n"); ++prologue_size; } ! if (interrupt_func_p | signal_func_p) { fprintf (file, "\t" AS1 (push,__zero_reg__) CR_TAB --- 631,664 ---- int reg; int interrupt_func_p; int signal_func_p; int main_p; int live_seq; int minimize; ! ! last_insn_address = 0; ! jump_tables_size = 0; ! prologue_size = 0; ! fprintf (file, "/* prologue: frame size=%d */\n", size); ! if (avr_naked_function_p (current_function_decl)) { ! fputs ("/* prologue: naked */\n", file); ! goto out; } interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES && !interrupt_func_p && !signal_func_p && live_seq); if (interrupt_func_p) { fprintf (file,"\tsei\n"); ++prologue_size; } ! if (interrupt_func_p || signal_func_p) { fprintf (file, "\t" AS1 (push,__zero_reg__) CR_TAB *************** avr_output_function_prologue (file, size *** 642,661 **** } else { for (reg = 0; reg < 32; ++reg) { ! if ((!leaf_func_p ! && (call_used_regs[reg] ! && (interrupt_func_p || signal_func_p) ! && !(reg == TMP_REGNO || reg == ZERO_REGNO))) ! || (regs_ever_live[reg] ! && (!call_used_regs[reg] ! || interrupt_func_p || signal_func_p) ! && ! (frame_pointer_needed ! && (reg == REG_Y || reg == (REG_Y+1))))) { fprintf (file, "\t" AS1 (push,%s) "\n", avr_regnames[reg]); - ++prologue_size; } } if (frame_pointer_needed) --- 707,720 ---- } else { + HARD_REG_SET set; + + prologue_size += avr_regs_to_save (&set); for (reg = 0; reg < 32; ++reg) { ! if (TEST_HARD_REG_BIT (set, reg)) { fprintf (file, "\t" AS1 (push,%s) "\n", avr_regnames[reg]); } } if (frame_pointer_needed) *************** avr_output_function_prologue (file, size *** 688,693 **** --- 747,754 ---- } } } + + out: fprintf (file, "/* prologue end (size=%d) */\n", prologue_size); } *************** avr_output_function_epilogue (file, size *** 701,735 **** int reg; int interrupt_func_p; int signal_func_p; - int leaf_func_p; int main_p; int function_size; int live_seq; int minimize; if (avr_naked_function_p (current_function_decl)) { ! fprintf (file, "/* epilogue: naked */\n"); ! return; } interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); - leaf_func_p = leaf_function_p (); main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); - function_size = (INSN_ADDRESSES (INSN_UID (get_last_insn ())) - - INSN_ADDRESSES (INSN_UID (get_insns ()))); - function_size += jump_tables_size; live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES && !interrupt_func_p && !signal_func_p && live_seq); - epilogue_size = 0; - fprintf (file, "/* epilogue: frame size=%d */\n", size); if (main_p) { ! fprintf (file, "__stop_progIi__:\n\trjmp __stop_progIi__\n"); ! ++epilogue_size; } else if (minimize && (frame_pointer_needed || live_seq > 4)) { --- 762,818 ---- int reg; int interrupt_func_p; int signal_func_p; int main_p; int function_size; int live_seq; int minimize; + rtx last = get_last_nonnote_insn (); + + function_size = jump_tables_size; + if (last) + { + rtx first = get_first_nonnote_insn (); + function_size += (INSN_ADDRESSES (INSN_UID (last)) - + INSN_ADDRESSES (INSN_UID (first))); + function_size += get_attr_length (last); + } + + fprintf (file, "/* epilogue: frame size=%d */\n", size); + epilogue_size = 0; if (avr_naked_function_p (current_function_decl)) { ! fputs ("/* epilogue: naked */\n", file); ! goto out; ! } ! ! if (last && GET_CODE (last) == BARRIER) ! { ! fputs ("/* epilogue: noreturn */\n", file); ! goto out; } interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES && !interrupt_func_p && !signal_func_p && live_seq); if (main_p) { ! /* Return value from main() is already in the correct registers ! (r25:r24) as the exit() argument. */ ! if (AVR_MEGA) ! { ! fputs ("\t" AS1 (jmp,exit) "\n", file); ! epilogue_size += 2; ! } ! else ! { ! fputs ("\t" AS1 (rjmp,exit) "\n", file); ! ++epilogue_size; ! } } else if (minimize && (frame_pointer_needed || live_seq > 4)) { *************** avr_output_function_epilogue (file, size *** 761,766 **** --- 844,851 ---- } else { + HARD_REG_SET set; + if (frame_pointer_needed) { if (size) *************** avr_output_function_epilogue (file, size *** 768,774 **** fputs ("\t", file); epilogue_size += out_adj_frame_ptr (file, -size); ! if (interrupt_func_p | signal_func_p) { epilogue_size += out_set_stack_ptr (file, -1, 0); } --- 853,859 ---- fputs ("\t", file); epilogue_size += out_adj_frame_ptr (file, -size); ! if (interrupt_func_p || signal_func_p) { epilogue_size += out_set_stack_ptr (file, -1, 0); } *************** avr_output_function_epilogue (file, size *** 783,806 **** epilogue_size += 2; } for (reg = 31; reg >= 0; --reg) { ! if ((!leaf_func_p ! && (call_used_regs[reg] ! && (interrupt_func_p || signal_func_p) ! && !(reg == TMP_REGNO || reg == ZERO_REGNO))) ! || (regs_ever_live[reg] ! && (!call_used_regs[reg] ! || interrupt_func_p || signal_func_p) ! && ! (frame_pointer_needed ! && (reg == REG_Y || reg == (REG_Y+1))))) { fprintf (file, "\t" AS1 (pop,%s) "\n", avr_regnames[reg]); - ++epilogue_size; } } ! ! if (interrupt_func_p | signal_func_p) { fprintf (file, "\t" AS1 (pop,__tmp_reg__) CR_TAB --- 868,883 ---- epilogue_size += 2; } + epilogue_size += avr_regs_to_save (&set); for (reg = 31; reg >= 0; --reg) { ! if (TEST_HARD_REG_BIT (set, reg)) { fprintf (file, "\t" AS1 (pop,%s) "\n", avr_regnames[reg]); } } ! ! if (interrupt_func_p || signal_func_p) { fprintf (file, "\t" AS1 (pop,__tmp_reg__) CR_TAB *************** avr_output_function_epilogue (file, size *** 814,820 **** fprintf (file, "\tret\n"); ++epilogue_size; } ! fprintf (file, "/* epilogue end (size=%d) */\n", epilogue_size); fprintf (file, "/* function %s size %d (%d) */\n", current_function_name, prologue_size + function_size + epilogue_size, function_size); --- 891,898 ---- fprintf (file, "\tret\n"); ++epilogue_size; } ! ! out: fprintf (file, "/* epilogue end (size=%d) */\n", epilogue_size); fprintf (file, "/* function %s size %d (%d) */\n", current_function_name, prologue_size + function_size + epilogue_size, function_size); *************** print_operand_address (file, addr) *** 1001,1007 **** default: if (CONSTANT_ADDRESS_P (addr) ! && (SYMBOL_REF_FLAG (addr) || GET_CODE (addr) == LABEL_REF)) { fprintf (file, "pm("); output_addr_const (file,addr); --- 1079,1086 ---- default: if (CONSTANT_ADDRESS_P (addr) ! && ((GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_FLAG (addr)) ! || GET_CODE (addr) == LABEL_REF)) { fprintf (file, "pm("); output_addr_const (file,addr); *************** print_operand (file, x, code) *** 1077,1088 **** fatal_insn ("internal compiler error. Unknown mode:", x); REAL_VALUE_FROM_CONST_DOUBLE (rv, x); REAL_VALUE_TO_TARGET_SINGLE (rv, val); ! asm_fprintf (file, "0x%lx", val); } else if (code == 'j') ! asm_fprintf (file, cond_string (GET_CODE (x))); else if (code == 'k') ! asm_fprintf (file, cond_string (reverse_condition (GET_CODE (x)))); else print_operand_address (file, x); } --- 1156,1167 ---- fatal_insn ("internal compiler error. Unknown mode:", x); REAL_VALUE_FROM_CONST_DOUBLE (rv, x); REAL_VALUE_TO_TARGET_SINGLE (rv, val); ! fprintf (file, "0x%lx", val); } else if (code == 'j') ! fputs (cond_string (GET_CODE (x)), file); else if (code == 'k') ! fputs (cond_string (reverse_condition (GET_CODE (x))), file); else print_operand_address (file, x); } *************** init_cumulative_args (cum, fntype, libna *** 1408,1414 **** { cum->nregs = 18; cum->regno = FIRST_CUM_REG; ! if (!libname) { int stdarg = (TYPE_ARG_TYPES (fntype) != 0 && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) --- 1487,1493 ---- { cum->nregs = 18; cum->regno = FIRST_CUM_REG; ! if (!libname && fntype) { int stdarg = (TYPE_ARG_TYPES (fntype) != 0 && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) *************** out_movqi_r_mr (insn, op, l) *** 1802,1808 **** if (CONSTANT_ADDRESS_P (x)) { ! if (io_address_p (x, 1)) { *l = 1; return AS2 (in,%0,%1-0x20); --- 1881,1887 ---- if (CONSTANT_ADDRESS_P (x)) { ! if (avr_io_address_p (x, 1)) { *l = 1; return AS2 (in,%0,%1-0x20); *************** out_movhi_r_mr (insn, op, l) *** 1971,1977 **** } else if (CONSTANT_ADDRESS_P (base)) { ! if (io_address_p (base, 2)) { *l = 2; return (AS2 (in,%A0,%A1-0x20) CR_TAB --- 2050,2056 ---- } else if (CONSTANT_ADDRESS_P (base)) { ! if (avr_io_address_p (base, 2)) { *l = 2; return (AS2 (in,%A0,%A1-0x20) CR_TAB *************** out_movqi_mr_r (insn, op, l) *** 2514,2520 **** if (CONSTANT_ADDRESS_P (x)) { ! if (io_address_p (x, 1)) { *l = 1; return AS2 (out,%0-0x20,%1); --- 2593,2599 ---- if (CONSTANT_ADDRESS_P (x)) { ! if (avr_io_address_p (x, 1)) { *l = 1; return AS2 (out,%0-0x20,%1); *************** out_movhi_mr_r (insn, op, l) *** 2592,2598 **** l = &tmp; if (CONSTANT_ADDRESS_P (base)) { ! if (io_address_p (base, 2)) { *l = 2; return (AS2 (out,%B0-0x20,%B1) CR_TAB --- 2671,2677 ---- l = &tmp; if (CONSTANT_ADDRESS_P (base)) { ! if (avr_io_address_p (base, 2)) { *l = 2; return (AS2 (out,%B0-0x20,%B1) CR_TAB *************** frame_pointer_required_p () *** 2697,2703 **** { return (current_function_calls_alloca || current_function_args_info.nregs == 0 - || current_function_varargs || get_frame_size () > 0); } --- 2776,2781 ---- *************** adjust_insn_length (insn, len) *** 4355,4361 **** return len; } ! /* Return non-zero if register REG dead after INSN */ int reg_unused_after (insn, reg) --- 4433,4439 ---- return len; } ! /* Return nonzero if register REG dead after INSN */ int reg_unused_after (insn, reg) *************** reg_unused_after (insn, reg) *** 4366,4372 **** || (REG_P(reg) && _reg_unused_after (insn, reg))); } ! /* Return non-zero if REG is not used after INSN. We assume REG is a reload reg, and therefore does not live past labels. It may live past calls or jumps though. */ --- 4444,4450 ---- || (REG_P(reg) && _reg_unused_after (insn, reg))); } ! /* Return nonzero if REG is not used after INSN. We assume REG is a reload reg, and therefore does not live past labels. It may live past calls or jumps though. */ *************** avr_assemble_integer (x, size, aligned_p *** 4495,4511 **** /* Sets section name for declaration DECL */ ! void ! unique_section (decl, reloc) tree decl; int reloc ATTRIBUTE_UNUSED; { int len; const char *name, *prefix; char *string; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! /* Strip off any encoding in name. */ ! STRIP_NAME_ENCODING (name, name); if (TREE_CODE (decl) == FUNCTION_DECL) { --- 4573,4589 ---- /* Sets section name for declaration DECL */ ! static void ! avr_unique_section (decl, reloc) tree decl; int reloc ATTRIBUTE_UNUSED; { int len; const char *name, *prefix; char *string; + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! name = (* targetm.strip_name_encoding) (name); if (TREE_CODE (decl) == FUNCTION_DECL) { *************** avr_handle_progmem_attribute (node, name *** 4681,4687 **** TYPE_MAIN_VARIANT (newtype) = TYPE_MAIN_VARIANT (type); TREE_TYPE (*node) = newtype; *no_add_attrs = true; ! } else if (TREE_STATIC (*node) || DECL_EXTERNAL (*node)) { if (DECL_INITIAL (*node) == NULL_TREE && !DECL_EXTERNAL (*node)) --- 4759,4765 ---- TYPE_MAIN_VARIANT (newtype) = TYPE_MAIN_VARIANT (type); TREE_TYPE (*node) = newtype; *no_add_attrs = true; ! } else if (TREE_STATIC (*node) || DECL_EXTERNAL (*node)) { if (DECL_INITIAL (*node) == NULL_TREE && !DECL_EXTERNAL (*node)) *************** avr_progmem_p (decl) *** 4751,4765 **** return 0; } ! /* Encode section information about tree DECL */ ! void ! encode_section_info (decl) tree decl; { if (TREE_CODE (decl) == FUNCTION_DECL) SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; ! else if ((TREE_STATIC (decl) || DECL_EXTERNAL (decl)) && TREE_CODE (decl) == VAR_DECL && avr_progmem_p (decl)) { --- 4829,4845 ---- return 0; } ! /* Encode section information about tree DECL. */ ! static void ! avr_encode_section_info (decl, first) tree decl; + int first; { if (TREE_CODE (decl) == FUNCTION_DECL) SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; ! else if (first ! && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)) && TREE_CODE (decl) == VAR_DECL && avr_progmem_p (decl)) { *************** encode_section_info (decl) *** 4767,4773 **** DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec); TREE_READONLY (decl) = 1; } ! } /* Outputs to the stdio stream FILE some appropriate text to go at the start of an assembler file. */ --- 4847,4874 ---- DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec); TREE_READONLY (decl) = 1; } ! } ! ! static unsigned int ! avr_section_type_flags (decl, name, reloc) ! tree decl; ! const char *name; ! int reloc; ! { ! unsigned int flags = default_section_type_flags (decl, name, reloc); ! ! if (strncmp (name, ".noinit", 7) == 0) ! { ! if (decl && TREE_CODE (decl) == VAR_DECL ! && DECL_INITIAL (decl) == NULL_TREE) ! flags |= SECTION_BSS; /* @nobits */ ! else ! warning ("only uninitialized variables can be placed in the " ! ".noinit section"); ! } ! ! return flags; ! } /* Outputs to the stdio stream FILE some appropriate text to go at the start of an assembler file. */ *************** void *** 4776,4781 **** --- 4877,4885 ---- asm_file_start (file) FILE *file; { + if (avr_asm_only_p) + error ("MCU `%s' supported for assembler only", avr_mcu_name); + output_file_directive (file, main_input_filename); fprintf (file, "\t.arch %s\n", avr_mcu_name); fputs ("__SREG__ = 0x3f\n" *************** asm_file_start (file) *** 4783,4790 **** "__SP_L__ = 0x3d\n", file); fputs ("__tmp_reg__ = 0\n" ! "__zero_reg__ = 1\n", file); ! commands_in_file = 0; commands_in_prologues = 0; commands_in_epilogues = 0; --- 4887,4900 ---- "__SP_L__ = 0x3d\n", file); fputs ("__tmp_reg__ = 0\n" ! "__zero_reg__ = 1\n", file); ! ! /* FIXME: output these only if there is anything in the .data / .bss ! sections - some code size could be saved by not linking in the ! initialization code from libgcc if one or both sections are empty. */ ! fputs ("\t.global __do_copy_data\n", file); ! fputs ("\t.global __do_clear_bss\n", file); ! commands_in_file = 0; commands_in_prologues = 0; commands_in_epilogues = 0; *************** void *** 4797,4805 **** asm_file_end (file) FILE *file; { fprintf (file, ! "/* File %s: code %4d = 0x%04x (%4d), prologues %3d, epilogues %3d */\n", ! main_input_filename, commands_in_file, commands_in_file, commands_in_file - commands_in_prologues - commands_in_epilogues, --- 4907,4916 ---- asm_file_end (file) FILE *file; { + fputs ("/* File ", file); + output_quoted_string (file, main_input_filename); fprintf (file, ! ": code %4d = 0x%04x (%4d), prologues %3d, epilogues %3d */\n", commands_in_file, commands_in_file, commands_in_file - commands_in_prologues - commands_in_epilogues, *************** avr_address_cost (x) *** 4937,4943 **** return 18; if (CONSTANT_ADDRESS_P (x)) { ! if (io_address_p (x, 1)) return 2; return 4; } --- 5048,5054 ---- return 18; if (CONSTANT_ADDRESS_P (x)) { ! if (avr_io_address_p (x, 1)) return 2; return 4; } *************** avr_function_value (type, func) *** 5138,5144 **** return gen_rtx (REG, BLKmode, RET_REGISTER + 2 - offs); } ! /* Returns non-zero if the number MASK has only one bit set. */ int mask_one_bit_p (mask) --- 5249,5255 ---- return gen_rtx (REG, BLKmode, RET_REGISTER + 2 - offs); } ! /* Returns nonzero if the number MASK has only one bit set. */ int mask_one_bit_p (mask) *************** test_hard_reg_class (class, x) *** 5188,5207 **** return 0; } - void - debug_hard_reg_set (set) - HARD_REG_SET set; - { - int i; - for (i=0; i < FIRST_PSEUDO_REGISTER; ++i) - { - if (TEST_HARD_REG_BIT (set, i)) - { - fprintf (stderr, "r%-2d ", i); - } - } - fprintf (stderr, "\n"); - } int jump_over_one_insn_p (insn, dest) --- 5299,5304 ---- *************** jump_over_one_insn_p (insn, dest) *** 5213,5219 **** : dest); int jump_addr = INSN_ADDRESSES (INSN_UID (insn)); int dest_addr = INSN_ADDRESSES (uid); ! return dest_addr - jump_addr == 2; } /* Returns 1 if a value of mode MODE can be stored starting with hard --- 5310,5316 ---- : dest); int jump_addr = INSN_ADDRESSES (INSN_UID (insn)); int dest_addr = INSN_ADDRESSES (uid); ! return dest_addr - jump_addr == get_attr_length (insn) + 1; } /* Returns 1 if a value of mode MODE can be stored starting with hard *************** reg_was_0 (insn, op) *** 5260,5269 **** } /* Returns 1 if X is a valid address for an I/O register of size SIZE ! (1 or 2). Used for lds/sts -> in/out optimization. */ ! static int ! io_address_p (x, size) rtx x; int size; { --- 5357,5367 ---- } /* Returns 1 if X is a valid address for an I/O register of size SIZE ! (1 or 2). Used for lds/sts -> in/out optimization. Add 0x20 to SIZE ! to check for the lower half of I/O space (for cbi/sbi/sbic/sbis). */ ! int ! avr_io_address_p (x, size) rtx x; int size; { *************** avr_peep2_scratch_safe (scratch) *** 5430,5432 **** --- 5528,5622 ---- } return 1; } + + /* Output a branch that tests a single bit of a register (QI, HI or SImode) + or memory location in the I/O space (QImode only). + + Operand 0: comparison operator (must be EQ or NE, compare bit to zero). + Operand 1: register operand to test, or CONST_INT memory address. + Operand 2: bit number (for QImode operand) or mask (HImode, SImode). + Operand 3: label to jump to if the test is true. */ + + const char * + avr_out_sbxx_branch (insn, operands) + rtx insn; + rtx operands[]; + { + enum rtx_code comp = GET_CODE (operands[0]); + int long_jump = (get_attr_length (insn) >= 4); + int reverse = long_jump || jump_over_one_insn_p (insn, operands[3]); + + if (comp == GE) + comp = EQ; + else if (comp == LT) + comp = NE; + + if (reverse) + comp = reverse_condition (comp); + + if (GET_CODE (operands[1]) == CONST_INT) + { + if (INTVAL (operands[1]) < 0x40) + { + if (comp == EQ) + output_asm_insn (AS2 (sbis,%1-0x20,%2), operands); + else + output_asm_insn (AS2 (sbic,%1-0x20,%2), operands); + } + else + { + output_asm_insn (AS2 (in,__tmp_reg__,%1-0x20), operands); + if (comp == EQ) + output_asm_insn (AS2 (sbrs,__tmp_reg__,%2), operands); + else + output_asm_insn (AS2 (sbrc,__tmp_reg__,%2), operands); + } + } + else /* GET_CODE (operands[1]) == REG */ + { + if (GET_MODE (operands[1]) == QImode) + { + if (comp == EQ) + output_asm_insn (AS2 (sbrs,%1,%2), operands); + else + output_asm_insn (AS2 (sbrc,%1,%2), operands); + } + else /* HImode or SImode */ + { + static char buf[] = "sbrc %A1,0"; + int bit_nr = exact_log2 (INTVAL (operands[2]) + & GET_MODE_MASK (GET_MODE (operands[1]))); + + buf[3] = (comp == EQ) ? 's' : 'c'; + buf[6] = 'A' + (bit_nr >> 3); + buf[9] = '0' + (bit_nr & 7); + output_asm_insn (buf, operands); + } + } + + if (long_jump) + return (AS1 (rjmp,.+4) CR_TAB + AS1 (jmp,%3)); + if (!reverse) + return AS1 (rjmp,%3); + return ""; + } + + static void + avr_asm_out_ctor (symbol, priority) + rtx symbol; + int priority; + { + fputs ("\t.global __do_global_ctors\n", asm_out_file); + default_ctor_section_asm_out_constructor (symbol, priority); + } + + static void + avr_asm_out_dtor (symbol, priority) + rtx symbol; + int priority; + { + fputs ("\t.global __do_global_dtors\n", asm_out_file); + default_dtor_section_asm_out_destructor (symbol, priority); + } + diff -Nrc3pad gcc-3.2.3/gcc/config/avr/avr.h gcc-3.3/gcc/config/avr/avr.h *** gcc-3.2.3/gcc/config/avr/avr.h 2002-02-02 18:56:36.000000000 +0000 --- gcc-3.3/gcc/config/avr/avr.h 2002-09-24 12:48:52.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 22,29 **** /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-DAVR" ! /* This declaration should be present. */ extern int target_flags; --- 22,45 ---- /* Names to predefine in the preprocessor for this target machine. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("AVR"); \ ! if (avr_base_arch_macro) \ ! builtin_define (avr_base_arch_macro); \ ! if (avr_extra_arch_macro) \ ! builtin_define (avr_extra_arch_macro); \ ! if (avr_asm_only_p) \ ! builtin_define ("__AVR_ASM_ONLY__"); \ ! if (avr_enhanced_p) \ ! builtin_define ("__AVR_ENHANCED__"); \ ! if (avr_mega_p) \ ! builtin_define ("__AVR_MEGA__"); \ ! if (TARGET_NO_INTERRUPTS) \ ! builtin_define ("__NO_INTERRUPTS__"); \ ! } \ ! while (0) /* This declaration should be present. */ extern int target_flags; *************** extern int target_flags; *** 38,43 **** --- 54,60 ---- #define MASK_NO_INTERRUPTS 0x00020000 #define MASK_CALL_PROLOGUES 0x00040000 #define MASK_TINY_STACK 0x00080000 + #define MASK_SHORT_CALLS 0x00100000 #define TARGET_ORDER_1 (target_flags & MASK_ORDER_1) #define TARGET_ORDER_2 (target_flags & MASK_ORDER_2) *************** extern int target_flags; *** 47,52 **** --- 64,70 ---- #define TARGET_CALL_PROLOGUES (target_flags & MASK_CALL_PROLOGUES) #define TARGET_TINY_STACK (target_flags & MASK_TINY_STACK) #define TARGET_NO_TABLEJUMP (target_flags & MASK_NO_TABLEJUMP) + #define TARGET_SHORT_CALLS (target_flags & MASK_SHORT_CALLS) /* Dump each assembler insn's rtl into the output file. This is for debugging the compiler itself. */ *************** extern int target_flags; *** 54,62 **** #define TARGET_RTL_DUMP (target_flags & MASK_RTL_DUMP) #define TARGET_ALL_DEBUG (target_flags & MASK_ALL_DEBUG) - - - #define TARGET_SWITCHES { \ { "order1", MASK_ORDER_1, NULL }, \ { "order2", MASK_ORDER_2, NULL }, \ --- 72,77 ---- *************** extern int target_flags; *** 69,74 **** --- 84,91 ---- N_("Change only the low 8 bits of the stack pointer") }, \ { "no-tablejump", MASK_NO_TABLEJUMP, \ N_("Do not generate tablejump insns") }, \ + { "short-calls", MASK_SHORT_CALLS, \ + N_("Use rjmp/rcall (limited range) on >8K devices") }, \ { "rtl", MASK_RTL_DUMP, NULL }, \ { "size", MASK_INSN_SIZE_DUMP, \ N_("Output instruction sizes to the asm file") }, \ *************** extern int target_flags; *** 77,86 **** extern const char *avr_init_stack; extern const char *avr_mcu_name; extern int avr_mega_p; extern int avr_enhanced_p; ! #define AVR_MEGA (avr_mega_p) #define AVR_ENHANCED (avr_enhanced_p) #define TARGET_OPTIONS { \ --- 94,107 ---- extern const char *avr_init_stack; extern const char *avr_mcu_name; + + extern const char *avr_base_arch_macro; + extern const char *avr_extra_arch_macro; extern int avr_mega_p; extern int avr_enhanced_p; + extern int avr_asm_only_p; ! #define AVR_MEGA (avr_mega_p && !TARGET_SHORT_CALLS) #define AVR_ENHANCED (avr_enhanced_p) #define TARGET_OPTIONS { \ *************** extern int avr_enhanced_p; *** 100,106 **** fprintf (stderr, " (68k, MIT syntax)"); #endif */ ! #define OVERRIDE_OPTIONS avr_override_options() /* `OVERRIDE_OPTIONS' Sometimes certain combinations of command options do not make sense on a particular target machine. You can define a macro --- 121,127 ---- fprintf (stderr, " (68k, MIT syntax)"); #endif */ ! #define OVERRIDE_OPTIONS avr_override_options () /* `OVERRIDE_OPTIONS' Sometimes certain combinations of command options do not make sense on a particular target machine. You can define a macro *************** extern int avr_enhanced_p; *** 126,138 **** numbered. */ #define WORDS_BIG_ENDIAN 0 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; */ - #define BITS_PER_WORD 8 - #ifdef IN_LIBGCC2 /* This is to get correct SI and DI modes in libgcc2.c (32 and 64 bits). */ #define UNITS_PER_WORD 4 --- 147,152 ---- *************** extern int avr_enhanced_p; *** 197,208 **** of macro must be at least 64. */ - #define CHAR_TYPE_SIZE 8 - /* A C expression for the size in bits of the type `char' on the - target machine. If you don't define this, the default is one - quarter of a word. (If this would be less than one storage unit, - it is rounded up to one unit.) */ - #define FLOAT_TYPE_SIZE 32 /* A C expression for the size in bits of the type `float' on the target machine. If you don't define this, the default is one word. */ --- 211,216 ---- *************** enum reg_class { *** 667,673 **** machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the Sparc when compiling PIC). In some cases, both an intermediate and a scratch register are required. --- 675,681 ---- machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the SPARC when compiling PIC). In some cases, both an intermediate and a scratch register are required. *************** enum reg_class { *** 723,729 **** /* `SECONDARY_MEMORY_NEEDED (CLASS1, CLASS2, M)' Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this ! macro on those machines to be a C expression that is non-zero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. --- 731,737 ---- /* `SECONDARY_MEMORY_NEEDED (CLASS1, CLASS2, M)' Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this ! macro on those machines to be a C expression that is nonzero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. *************** enum reg_class { *** 747,762 **** classes that there would not be enough registers to use as spill registers if this were done. ! Define `SMALL_REGISTER_CLASSES' to be an expression with a non-zero ! value on these machines. When this macro has a non-zero value, the compiler allows registers explicitly used in the rtl to be used as spill registers but avoids extending the lifetime of these registers. ! It is always safe to define this macro with a non-zero value, but if you unnecessarily define it, you will reduce the amount of optimizations that can be performed in some cases. If you do not ! define this macro with a non-zero value when it is required, the compiler will run out of spill registers and print a fatal error message. For most machines, you should not define this macro at all. */ --- 755,770 ---- classes that there would not be enough registers to use as spill registers if this were done. ! Define `SMALL_REGISTER_CLASSES' to be an expression with a nonzero ! value on these machines. When this macro has a nonzero value, the compiler allows registers explicitly used in the rtl to be used as spill registers but avoids extending the lifetime of these registers. ! It is always safe to define this macro with a nonzero value, but if you unnecessarily define it, you will reduce the amount of optimizations that can be performed in some cases. If you do not ! define this macro with a nonzero value when it is required, the compiler will run out of spill registers and print a fatal error message. For most machines, you should not define this macro at all. */ *************** enum reg_class { *** 991,997 **** || (FROM) == FRAME_POINTER_REGNUM+1) \ && ! FRAME_POINTER_REQUIRED \ )) ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the --- 999,1005 ---- || (FROM) == FRAME_POINTER_REGNUM+1) \ && ! FRAME_POINTER_REQUIRED \ )) ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the *************** enum reg_class { *** 1107,1113 **** You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' ! is not defined and `FUNCTION_ARG' returns non-zero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ --- 1115,1121 ---- You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' ! is not defined and `FUNCTION_ARG' returns nonzero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ *************** extern int avr_reg_order[]; *** 1335,1398 **** #endif /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine ! for a memory operand of mode MODE. ! ! It usually pays to define several simpler macros to serve as ! subroutines for this one. Otherwise it may be too complicated to ! understand. ! ! This macro must exist in two variants: a strict variant and a ! non-strict one. The strict variant is used in the reload pass. It ! must be defined so that any pseudo-register that has not been ! allocated a hard register is considered a memory reference. In ! contexts where some kind of register is required, a pseudo-register ! with no hard register must be rejected. ! ! The non-strict variant is used in other passes. It must be ! defined to accept all pseudo-registers in every context where some ! kind of register is required. ! ! Compiler source files that want to use the strict variant of this ! macro define the macro `REG_OK_STRICT'. You should use an `#ifdef ! REG_OK_STRICT' conditional to define the strict variant in that ! case and the non-strict variant otherwise. ! ! Subroutines to check for acceptable registers for various purposes ! (one for base registers, one for index registers, and so on) are ! typically among the subroutines used to define ! `GO_IF_LEGITIMATE_ADDRESS'. Then only these subroutine macros ! need have two variants; the higher levels of macros may be the ! same whether strict or not. ! ! Normally, constant addresses which are the sum of a `symbol_ref' ! and an integer are stored inside a `const' RTX to mark them as ! constant. Therefore, there is no need to recognize such sums ! specifically as legitimate addresses. Normally you would simply ! recognize any `const' as legitimate. ! ! Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant ! sums that are not marked with `const'. It assumes that a naked ! `plus' indicates indexing. If so, then you *must* reject such ! naked constant sums as illegitimate addresses, so that none of ! them will be given to `PRINT_OPERAND_ADDRESS'. ! ! On some machines, whether a symbolic address is legitimate depends ! on the section that the address refers to. On these machines, ! define the macro `ENCODE_SECTION_INFO' to store the information ! into the `symbol_ref', and then check for it here. When you see a ! `const', you will have to look inside it to find the `symbol_ref' ! in order to determine the section. *Note Assembler Format::. ! ! The best way to modify the name string is by adding text to the ! beginning, with suitable punctuation to prevent any ambiguity. ! Allocate the new name in `saveable_obstack'. You will have to ! modify `ASM_OUTPUT_LABELREF' to remove and decode the added text ! and output the name accordingly, and define `STRIP_NAME_ENCODING' ! to access the original name string. ! ! You can check the information stored here into the `symbol_ref' in ! the definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and ! `PRINT_OPERAND_ADDRESS'. */ /* `REG_OK_FOR_BASE_P (X)' A C expression that is nonzero if X (assumed to be a `reg' RTX) is --- 1343,1349 ---- #endif /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine ! for a memory operand of mode MODE. */ /* `REG_OK_FOR_BASE_P (X)' A C expression that is nonzero if X (assumed to be a `reg' RTX) is *************** do { \ *** 1728,1737 **** cost many times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is non-zero, the compiler will act as if ! `STRICT_ALIGNMENT' were non-zero when generating code for block moves. This can cause significantly more instructions to be ! produced. Therefore, do not set this macro non-zero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. --- 1679,1688 ---- cost many times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is nonzero, the compiler will act as if ! `STRICT_ALIGNMENT' were nonzero when generating code for block moves. This can cause significantly more instructions to be ! produced. Therefore, do not set this macro nonzero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. *************** do { \ *** 1768,1773 **** --- 1719,1751 ---- operation to identify the following data as writable initialized data. Normally `"\t.data"' is right. */ + #define BSS_SECTION_ASM_OP "\t.section .bss" + /* If defined, a C expression whose value is a string, including + spacing, containing the assembler operation to identify the + following data as uninitialized global data. If not defined, and + neither `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined, + uninitialized global data will be output in the data section if + `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be + used. */ + + /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. + There are no shared libraries on this target, and these sections are + placed in the read-only program memory, so they are not writable. */ + + #undef CTORS_SECTION_ASM_OP + #define CTORS_SECTION_ASM_OP "\t.section .ctors,\"a\",@progbits" + + #undef DTORS_SECTION_ASM_OP + #define DTORS_SECTION_ASM_OP "\t.section .dtors,\"a\",@progbits" + + #define TARGET_ASM_CONSTRUCTOR avr_asm_out_ctor + /* If defined, a function that outputs assembler code to arrange to + call the function referenced by SYMBOL at initialization time. */ + + #define TARGET_ASM_DESTRUCTOR avr_asm_out_dtor + /* This is like `TARGET_ASM_CONSTRUCTOR' but used for termination + functions rather than initialization functions. */ + #define EXTRA_SECTIONS in_progmem /* A list of names for sections other than the standard two, which are `in_text' and `in_data'. You need not define this macro on a *************** do { \ *** 1776,1782 **** #define EXTRA_SECTION_FUNCTIONS \ \ void \ ! progmem_section (void) \ { \ if (in_section != in_progmem) \ { \ --- 1754,1760 ---- #define EXTRA_SECTION_FUNCTIONS \ \ void \ ! progmem_section () \ { \ if (in_section != in_progmem) \ { \ *************** progmem_section (void) \ *** 1804,1830 **** If these items should be placed in the text section, this macro should not be defined. */ - /* `SELECT_SECTION (EXP, RELOC, ALIGN)' - A C statement or statements to switch to the appropriate section - for output of EXP. You can assume that EXP is either a `VAR_DECL' - node or a constant of some sort. RELOC indicates whether the - initial value of EXP requires link-time relocations. Select the - section by calling `text_section' or one of the alternatives for - other sections. - - Do not define this macro if you put all read-only variables and - constants in the read-only data section (usually the text section). */ - - /* `SELECT_RTX_SECTION (MODE, RTX, ALIGN)' - A C statement or statements to switch to the appropriate section - for output of RTX in mode MODE. You can assume that RTX is some - kind of constant in RTL. The argument MODE is redundant except in - the case of a `const_int' rtx. Select the section by calling - `text_section' or one of the alternatives for other sections. - - Do not define this macro if you put all constants in the read-only - data section. */ - #define JUMP_TABLES_IN_TEXT_SECTION 0 /* Define this macro if jump tables (for `tablejump' insns) should be output in the text section, along with the assembler instructions. --- 1782,1787 ---- *************** progmem_section (void) \ *** 1833,1868 **** This macro is irrelevant if there is no separate readonly data section. */ - #define ENCODE_SECTION_INFO(DECL) encode_section_info(DECL) - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or function - named by the symbol (such as what section it is in). - - The macro definition, if any, is executed immediately after the - rtl for DECL has been created and stored in `DECL_RTL (DECL)'. - The value of the rtl will be a `mem' whose address is a - `symbol_ref'. - - The usual thing for this macro to do is to record a flag in the - `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified - name string in the `symbol_ref' (if one bit is not enough - information). */ - - #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ - (VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' || (SYMBOL_NAME)[0] == '@'); - /* `STRIP_NAME_ENCODING (VAR, SYM_NAME)' - Decode SYM_NAME and store the real name part in VAR, sans the - characters that encode section info. Define this macro if - `ENCODE_SECTION_INFO' alters the symbol's name string. */ - - #define UNIQUE_SECTION(DECL, RELOC) unique_section (DECL, RELOC) - /* `UNIQUE_SECTION (DECL, RELOC)' - A C statement to build up a unique section name, expressed as a - STRING_CST node, and assign it to `DECL_SECTION_NAME (DECL)'. - RELOC indicates whether the initial value of EXP requires - link-time relocations. If you do not define this macro, GNU CC - will use the symbol name prefixed by `.' as the section name. */ - #define ASM_FILE_START(STREAM) asm_file_start (STREAM) /* A C expression which outputs to the stdio stream STREAM some appropriate text to go at the start of an assembler file. --- 1790,1795 ---- *************** progmem_section (void) \ *** 1918,1926 **** #define OBJC_PROLOGUE {} /* A C statement to output any assembler statements which are ! required to precede any Objective C object definitions or message sending. The statement is executed only when compiling an ! Objective C program. */ #define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE) --- 1845,1853 ---- #define OBJC_PROLOGUE {} /* A C statement to output any assembler statements which are ! required to precede any Objective-C object definitions or message sending. The statement is executed only when compiling an ! Objective-C program. */ #define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE) *************** do { \ *** 1963,1968 **** --- 1890,1902 ---- This macro controls how the assembler definitions of uninitialized common global variables are output. */ + #define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \ + asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED)) + /* A C statement (sans semicolon) to output to the stdio stream + STREAM the assembler definition of uninitialized global DECL named + NAME whose size is SIZE bytes. The variable ROUNDED is the size + rounded up to whatever alignment the caller wants. */ + #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \ do { \ fputs ("\t.lcomm ", (STREAM)); \ *************** do { \ *** 1981,1997 **** This macro controls how the assembler definitions of uninitialized static variables are output. */ - #define ASM_OUTPUT_LABEL(STREAM, NAME) \ - { \ - assemble_name (STREAM, NAME); \ - fprintf (STREAM, ":\n"); \ - } - /* A C statement (sans semicolon) to output to the stdio stream - STREAM the assembler definition of a label named NAME. Use the - expression `assemble_name (STREAM, NAME)' to output the name - itself; before and after that, output the additional assembler - syntax for defining the name, and a newline. */ - #undef TYPE_ASM_OP #undef SIZE_ASM_OP #undef WEAK_ASM_OP --- 1915,1920 ---- *************** do { \ *** 2013,2028 **** is just a default. You may need to override it in your machine- specific tm.h file (depending upon the particulars of your assembler). */ ! ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of a function which is being defined. This macro is responsible for --- 1936,1947 ---- is just a default. You may need to override it in your machine- specific tm.h file (depending upon the particulars of your assembler). */ ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ } while (0) + /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of a function which is being defined. This macro is responsible for *************** do { \ *** 2036,2055 **** #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno; \ ! labelno++; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ","); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the size of a function --- 1955,1961 ---- #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the size of a function *************** do { \ *** 2060,2081 **** If this macro is not defined, then the function size is not defined. */ ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of an --- 1966,1982 ---- If this macro is not defined, then the function size is not defined. */ ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of an *************** do { \ *** 2090,2106 **** #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ } \ } while (0) /* A C statement (sans semicolon) to finish up declaring a variable name once the compiler has processed its initializer fully and thus has had a chance to determine the size of an array when --- 1991,2008 ---- #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) + /* A C statement (sans semicolon) to finish up declaring a variable name once the compiler has processed its initializer fully and thus has had a chance to determine the size of an array when *************** do { \ *** 2147,2166 **** If your target assembler doesn't support the .string directive, you should define this to zero. */ ! #define ASM_GLOBALIZE_LABEL(STREAM, NAME) \ ! do { \ ! fprintf (STREAM, ".global\t"); \ ! assemble_name (STREAM, NAME); \ ! fprintf (STREAM, "\n"); \ ! } \ ! while (0) ! ! /* A C statement (sans semicolon) to output to the stdio stream ! STREAM some commands that will make the label NAME global; that ! is, available for reference from other files. Use the expression ! `assemble_name (STREAM, NAME)' to output the name itself; before ! and after that, output the additional assembler syntax for making ! that name global, and a newline. */ #define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ --- 2049,2056 ---- If your target assembler doesn't support the .string directive, you should define this to zero. */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP ".global\t" #define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ *************** sprintf (STRING, "*.%s%d", PREFIX, NUM) *** 2349,2361 **** #define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X) /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is X. X is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on the ! section that the address refers to. On these machines, define the ! macro `ENCODE_SECTION_INFO' to store the information into the ! `symbol_ref', and then check for it here. *Note Assembler ! Format::. */ #define USER_LABEL_PREFIX "" /* `LOCAL_LABEL_PREFIX' --- 2239,2245 ---- #define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X) /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is X. X is an RTL expression. */ #define USER_LABEL_PREFIX "" /* `LOCAL_LABEL_PREFIX' *************** extern int avr_case_values_threshold; *** 2624,2695 **** (and ANSI C) library functions `memcpy' and `memset' rather than the BSD functions `bcopy' and `bzero'. */ ! #define CPP_SPEC "\ ! %{!mmcu*|mmcu=avr2:%(cpp_avr2)} \ ! %{mmcu=at90s2313:%(cpp_avr2) -D__AVR_AT90S2313__} \ ! %{mmcu=at90s2323:%(cpp_avr2) -D__AVR_AT90S2323__} \ ! %{mmcu=at90s2333:%(cpp_avr2) -D__AVR_AT90S2333__} \ ! %{mmcu=at90s2343:%(cpp_avr2) -D__AVR_AT90S2343__} \ ! %{mmcu=attiny22: %(cpp_avr2) -D__AVR_ATtiny22__} \ ! %{mmcu=at90s4433:%(cpp_avr2) -D__AVR_AT90S4433__} \ ! %{mmcu=at90s4414:%(cpp_avr2) -D__AVR_AT90S4414__} \ ! %{mmcu=at90s4434:%(cpp_avr2) -D__AVR_AT90S4434__} \ ! %{mmcu=at90s8515:%(cpp_avr2) -D__AVR_AT90S8515__} \ ! %{mmcu=at90s8535:%(cpp_avr2) -D__AVR_AT90S8535__} \ ! %{mmcu=at90c8534:%(cpp_avr2) -D__AVR_AT90C8534__} \ ! %{mmcu=avr3:%(cpp_avr3)} \ ! %{mmcu=atmega603:%(cpp_avr3) -D__AVR_ATmega603__} \ ! %{mmcu=atmega103:%(cpp_avr3) -D__AVR_ATmega103__} \ ! %{mmcu=at43usb320:%(cpp_avr3) -D__AVR_AT43USB320__} \ ! %{mmcu=at76c711: %(cpp_avr3) -D__AVR_AT76C711__} \ ! %{mmcu=avr4:%(cpp_avr4)} \ ! %{mmcu=atmega8: %(cpp_avr4) -D__AVR_ATmega8__} \ ! %{mmcu=atmega83: %(cpp_avr4) -D__AVR_ATmega83__} \ ! %{mmcu=atmega85: %(cpp_avr4) -D__AVR_ATmega85__} \ ! %{mmcu=avr5:%(cpp_avr5)} \ ! %{mmcu=atmega16: %(cpp_avr5) -D__AVR_ATmega16__} \ ! %{mmcu=atmega161:%(cpp_avr5) -D__AVR_ATmega161__} \ ! %{mmcu=atmega163:%(cpp_avr5) -D__AVR_ATmega163__} \ ! %{mmcu=atmega32: %(cpp_avr5) -D__AVR_ATmega32__} \ ! %{mmcu=atmega323:%(cpp_avr5) -D__AVR_ATmega323__} \ ! %{mmcu=atmega64: %(cpp_avr5) -D__AVR_ATmega64__} \ ! %{mmcu=atmega128:%(cpp_avr5) -D__AVR_ATmega128__} \ ! %{mmcu=at43usb355:%(cpp_avr5) -D__AVR_AT43USB355__} \ ! %{mmcu=at94k: %(cpp_avr5) -D__AVR_AT94K__} \ ! %{mmcu=avr1:%(cpp_avr1)} \ ! %{mmcu=at90s1200:%(cpp_avr1) -D__AVR_AT90S1200__} \ ! %{mmcu=attiny10|mmcu=attiny11: %(cpp_avr1) -D__AVR_ATtiny11__} \ ! %{mmcu=attiny12: %(cpp_avr1) -D__AVR_ATtiny12__} \ ! %{mmcu=attiny15: %(cpp_avr1) -D__AVR_ATtiny15__} \ ! %{mmcu=attiny28: %(cpp_avr1) -D__AVR_ATtiny28__} \ ! %{mno-interrupts:-D__NO_INTERRUPTS__} \ ! %{mint8:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long -D__INT_MAX__=127} \ ! %{!mint*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767} \ ! %{posix:-D_POSIX_SOURCE}" /* A C string constant that tells the GNU CC driver program options to pass to CPP. It can also specify how to translate options you give to GNU CC into options for GNU CC to pass to the CPP. Do not define this macro if it does not need to do anything. */ - #define NO_BUILTIN_SIZE_TYPE - /* If this macro is defined, the preprocessor will not define the - builtin macro `__SIZE_TYPE__'. The macro `__SIZE_TYPE__' must - then be defined by `CPP_SPEC' instead. - - This should be defined if `SIZE_TYPE' depends on target dependent - flags which are not accessible to the preprocessor. Otherwise, it - should not be defined. */ - - #define NO_BUILTIN_PTRDIFF_TYPE - /* If this macro is defined, the preprocessor will not define the - builtin macro `__PTRDIFF_TYPE__'. The macro `__PTRDIFF_TYPE__' - must then be defined by `CPP_SPEC' instead. - - This should be defined if `PTRDIFF_TYPE' depends on target - dependent flags which are not accessible to the preprocessor. - Otherwise, it should not be defined. */ - #define CC1_SPEC "%{profile:-p}" /* A C string constant that tells the GNU CC driver program options to pass to `cc1'. It can also specify how to translate options you --- 2508,2521 ---- (and ANSI C) library functions `memcpy' and `memset' rather than the BSD functions `bcopy' and `bzero'. */ ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" ! /* A C string constant that tells the GNU CC driver program options to pass to CPP. It can also specify how to translate options you give to GNU CC into options for GNU CC to pass to the CPP. Do not define this macro if it does not need to do anything. */ #define CC1_SPEC "%{profile:-p}" /* A C string constant that tells the GNU CC driver program options to pass to `cc1'. It can also specify how to translate options you *************** extern int avr_case_values_threshold; *** 2697,2702 **** --- 2523,2534 ---- Do not define this macro if it does not need to do anything. */ + #define CC1PLUS_SPEC "%{!frtti:-fno-rtti} \ + %{!fenforce-eh-specs:-fno-enforce-eh-specs} \ + %{!fexceptions:-fno-exceptions}" + /* A C string constant that tells the GNU CC drvier program options to + pass to `cc1plus'. */ + #define ASM_SPEC "%{mmcu=*:-mmcu=%*}" /* A C string constant that tells the GNU CC driver program options to pass to the assembler. It can also specify how to translate *************** extern int avr_case_values_threshold; *** 2713,2749 **** Do not define this macro if it does not need to do anything. */ ! #define LINK_SPEC "\ ! %{!mmcu*:-m avr85xx} \ ! %{mmcu=atmega603:-m avrmega603} \ ! %{mmcu=atmega103:-m avrmega103} \ ! %{mmcu=at43usb320:-m avr3} \ ! %{mmcu=at76c711:-m avr3} \ ! %{mmcu=atmega16:-m avrmega161} \ ! %{mmcu=atmega161:-m avrmega161} \ ! %{mmcu=atmega163:-m avrmega161} \ ! %{mmcu=atmega32:-m avr5} \ ! %{mmcu=atmega323:-m avr5} \ ! %{mmcu=atmega64:-m avr5} \ ! %{mmcu=atmega128:-m avr5} \ ! %{mmcu=at43usb355:-m avr5} \ ! %{mmcu=at94k:-m avr5} \ ! %{mmcu=atmega8:-m avr4} \ ! %{mmcu=atmega83:-m avr4} \ ! %{mmcu=atmega85:-m avr4} \ ! %{mmcu=at90s1200|mmcu=attiny1*:-m avr1200} \ ! %{mmcu=attiny28:-m avr1} \ ! %{mmcu=at90s2313:-m avr23xx} \ ! %{mmcu=at90s2323:-m avr23xx} \ ! %{mmcu=attiny22:-m avr23xx} \ ! %{mmcu=at90s2333:-m avr23xx} \ ! %{mmcu=at90s2343:-m avr23xx} \ ! %{mmcu=at90s4433:-m avr4433} \ ! %{mmcu=at90s4414:-m avr44x4} \ ! %{mmcu=at90s4434:-m avr44x4} \ ! %{mmcu=at90c8534:-m avr85xx} \ ! %{mmcu=at90s8535:-m avr85xx} \ ! %{mmcu=at90s8515:-m avr85xx}" /* A C string constant that tells the GNU CC driver program options to pass to the linker. It can also specify how to translate options --- 2545,2557 ---- Do not define this macro if it does not need to do anything. */ ! #define LINK_SPEC " %{!mmcu*:-m avr2}\ ! %{mmcu=at90s1200|mmcu=attiny1*|mmcu=attiny28:-m avr1} \ ! %{mmcu=attiny22|mmcu=attiny26|mmcu=at90s2*|mmcu=at90s4*|mmcu=at90s8*|mmcu=at90c8*|mmcu=at86rf401:-m avr2}\ ! %{mmcu=atmega103|mmcu=atmega603|mmcu=at43*|mmcu=at76*:-m avr3}\ ! %{mmcu=atmega8*:-m avr4}\ ! %{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64|mmcu=atmega128|mmcu=at94k:-m avr5}\ ! %{mmcu=atmega64|mmcu=atmega128|mmcu=atmega162|mmcu=atmega169: -Tdata 0x800100} " /* A C string constant that tells the GNU CC driver program options to pass to the linker. It can also specify how to translate options *************** extern int avr_case_values_threshold; *** 2760,2765 **** --- 2568,2576 ---- If this macro is not defined, a default is provided that loads the standard C library from the usual place. See `gcc.c'. */ + #define LIBSTDCXX "-lgcc" + /* No libstdc++ for now. Empty string doesn't work. */ + #define LIBGCC_SPEC \ "%{!mmcu=at90s1*:%{!mmcu=attiny1*:%{!mmcu=attiny28: -lgcc }}}" /* Another C string constant that tells the GNU CC driver program how *************** extern int avr_case_values_threshold; *** 2788,2881 **** #define CRT_BINUTILS_SPECS "\ %{mmcu=at90s1200|mmcu=avr1:crts1200.o%s} \ ! %{mmcu=attiny10|mmcu=attiny11:crttn11.o%s} \ %{mmcu=attiny12:crttn12.o%s} \ %{mmcu=attiny15:crttn15.o%s} \ %{mmcu=attiny28:crttn28.o%s} \ %{!mmcu*|mmcu=at90s8515|mmcu=avr2:crts8515.o%s} \ %{mmcu=at90s2313:crts2313.o%s} \ %{mmcu=at90s2323:crts2323.o%s} \ - %{mmcu=attiny22:crttn22.o%s} \ %{mmcu=at90s2333:crts2333.o%s} \ %{mmcu=at90s2343:crts2343.o%s} \ %{mmcu=at90s4433:crts4433.o%s} \ %{mmcu=at90s4414:crts4414.o%s} \ %{mmcu=at90s4434:crts4434.o%s} \ %{mmcu=at90c8534:crtc8534.o%s} \ %{mmcu=at90s8535:crts8535.o%s} \ %{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \ %{mmcu=atmega603:crtm603.o%s} \ %{mmcu=at43usb320:crt43320.o%s} \ ! %{mmcu=at76c711:crt76711.o%s } \ ! %{mmcu=atmega8:crtm8.o%s} \ ! %{mmcu=atmega83|mmcu=avr4:crtm83.o%s} \ ! %{mmcu=atmega85:crtm85.o%s} \ %{mmcu=atmega16:crtm16.o%s} \ %{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \ %{mmcu=atmega163:crtm163.o%s} \ %{mmcu=atmega32:crtm32.o%s} \ %{mmcu=atmega323:crtm323.o%s} \ %{mmcu=atmega64:crtm64.o%s} \ %{mmcu=atmega128:crtm128.o%s} \ - %{mmcu=at43usb355:crt43355.o%s} \ %{mmcu=at94k:crtat94k.o%s}" ! #define CPP_AVR1_SPEC "-D__AVR_ARCH__=1 -D__AVR_ASM_ONLY__ " ! #define CPP_AVR2_SPEC "-D__AVR_ARCH__=2 " ! #define CPP_AVR3_SPEC "-D__AVR_ARCH__=3 -D__AVR_MEGA__ " ! #define CPP_AVR4_SPEC "-D__AVR_ARCH__=4 -D__AVR_ENHANCED__ " ! #define CPP_AVR5_SPEC "-D__AVR_ARCH__=5 -D__AVR_ENHANCED__ -D__AVR_MEGA__ " - #define EXTRA_SPECS \ - {"cpp_avr1", CPP_AVR1_SPEC}, \ - {"cpp_avr2", CPP_AVR2_SPEC}, \ - {"cpp_avr3", CPP_AVR3_SPEC}, \ - {"cpp_avr4", CPP_AVR4_SPEC}, \ - {"cpp_avr5", CPP_AVR5_SPEC}, \ - {"crt_binutils", CRT_BINUTILS_SPECS}, /* Define this macro to provide additional specifications to put in the `specs' file that can be used in various specifications like ! `CC1_SPEC'. ! ! The definition should be an initializer for an array of structures, ! containing a string constant, that defines the specification name, ! and a string constant that provides the specification. ! ! Do not define this macro if it does not need to do anything. ! ! `EXTRA_SPECS' is useful when an architecture contains several ! related targets, which have various `..._SPECS' which are similar ! to each other, and the maintainer would like one central place to ! keep these definitions. ! ! For example, the PowerPC System V.4 targets use `EXTRA_SPECS' to ! define either `_CALL_SYSV' when the System V calling sequence is ! used or `_CALL_AIX' when the older AIX-based calling sequence is ! used. ! ! The `config/rs6000/rs6000.h' target file defines: ! ! #define EXTRA_SPECS \ ! { "cpp_sysv_default", CPP_SYSV_DEFAULT }, ! ! #define CPP_SYS_DEFAULT "" ! ! The `config/rs6000/sysv.h' target file defines: ! #undef CPP_SPEC ! #define CPP_SPEC \ ! "%{posix: -D_POSIX_SOURCE } \ ! %{mcall-sysv: -D_CALL_SYSV } %{mcall-aix: -D_CALL_AIX } \ ! %{!mcall-sysv: %{!mcall-aix: %(cpp_sysv_default) }} \ ! %{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}" ! ! #undef CPP_SYSV_DEFAULT ! #define CPP_SYSV_DEFAULT "-D_CALL_SYSV" ! ! while the `config/rs6000/eabiaix.h' target file defines ! `CPP_SYSV_DEFAULT' as: ! ! #undef CPP_SYSV_DEFAULT ! #define CPP_SYSV_DEFAULT "-D_CALL_AIX" */ /* This is the default without any -mmcu=* option (AT90S*). */ #define MULTILIB_DEFAULTS { "mmcu=avr2" } --- 2599,2645 ---- #define CRT_BINUTILS_SPECS "\ %{mmcu=at90s1200|mmcu=avr1:crts1200.o%s} \ ! %{mmcu=attiny11:crttn11.o%s} \ %{mmcu=attiny12:crttn12.o%s} \ %{mmcu=attiny15:crttn15.o%s} \ %{mmcu=attiny28:crttn28.o%s} \ %{!mmcu*|mmcu=at90s8515|mmcu=avr2:crts8515.o%s} \ %{mmcu=at90s2313:crts2313.o%s} \ %{mmcu=at90s2323:crts2323.o%s} \ %{mmcu=at90s2333:crts2333.o%s} \ %{mmcu=at90s2343:crts2343.o%s} \ + %{mmcu=attiny22:crttn22.o%s} \ + %{mmcu=attiny26:crttn26.o%s} \ %{mmcu=at90s4433:crts4433.o%s} \ %{mmcu=at90s4414:crts4414.o%s} \ %{mmcu=at90s4434:crts4434.o%s} \ %{mmcu=at90c8534:crtc8534.o%s} \ %{mmcu=at90s8535:crts8535.o%s} \ + %{mmcu=at86rf401:crt86401.o%s} \ %{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \ %{mmcu=atmega603:crtm603.o%s} \ %{mmcu=at43usb320:crt43320.o%s} \ ! %{mmcu=at43usb355:crt43355.o%s} \ ! %{mmcu=at76c711:crt76711.o%s} \ ! %{mmcu=atmega8|mmcu=avr4:crtm8.o%s} \ ! %{mmcu=atmega8515:crtm8515.o%s} \ ! %{mmcu=atmega8535:crtm8535.o%s} \ %{mmcu=atmega16:crtm16.o%s} \ %{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \ + %{mmcu=atmega162:crtm162.o%s} \ %{mmcu=atmega163:crtm163.o%s} \ + %{mmcu=atmega169:crtm169.o%s} \ %{mmcu=atmega32:crtm32.o%s} \ %{mmcu=atmega323:crtm323.o%s} \ %{mmcu=atmega64:crtm64.o%s} \ %{mmcu=atmega128:crtm128.o%s} \ %{mmcu=at94k:crtat94k.o%s}" ! #define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS}, /* Define this macro to provide additional specifications to put in the `specs' file that can be used in various specifications like ! `CC1_SPEC'. */ /* This is the default without any -mmcu=* option (AT90S*). */ #define MULTILIB_DEFAULTS { "mmcu=avr2" } *************** extern struct rtx_def *tmp_reg_rtx; *** 2926,2937 **** extern struct rtx_def *zero_reg_rtx; extern struct rtx_def *ldi_reg_rtx; - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG /* Get the standard ELF stabs definitions. */ --- 2690,2695 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/avr/avr.md gcc-3.3/gcc/config/avr/avr.md *** gcc-3.2.3/gcc/config/avr/avr.md 2002-11-23 22:16:53.000000000 +0000 --- gcc-3.3/gcc/config/avr/avr.md 2003-04-20 13:27:07.000000000 +0000 *************** *** 39,45 **** (define_attr "cc" "none,set_czn,set_zn,set_n,compare,clobber" (const_string "none")) ! (define_attr "type" "branch,branch1,arith" (const_string "arith")) (define_attr "mcu_enhanced" "yes,no" --- 39,45 ---- (define_attr "cc" "none,set_czn,set_zn,set_n,compare,clobber" (const_string "none")) ! (define_attr "type" "branch,branch1,arith,xcall" (const_string "arith")) (define_attr "mcu_enhanced" "yes,no" *************** *** 80,86 **** (le (minus (pc) (match_dup 0)) (const_int 2043))) (const_int 3) ! (const_int 4)))] (const_int 2))) (define_insn "*pop1" --- 80,90 ---- (le (minus (pc) (match_dup 0)) (const_int 2043))) (const_int 3) ! (const_int 4))) ! (eq_attr "type" "xcall") ! (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))] (const_int 2))) (define_insn "*pop1" *************** *** 352,364 **** "{ rtx addr0, addr1; int cnt8; if (GET_CODE (operands[2]) != CONST_INT) FAIL; cnt8 = byte_immediate_operand (operands[2], GET_MODE (operands[2])); ! operands[2] = copy_to_mode_reg (cnt8 ? QImode : HImode, operands[2]); operands[4] = operands[2]; - addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); --- 356,370 ---- "{ rtx addr0, addr1; int cnt8; + enum machine_mode mode; if (GET_CODE (operands[2]) != CONST_INT) FAIL; cnt8 = byte_immediate_operand (operands[2], GET_MODE (operands[2])); ! mode = cnt8 ? QImode : HImode; ! operands[2] = copy_to_mode_reg (mode, ! gen_int_mode (INTVAL (operands[2]), mode)); operands[4] = operands[2]; addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); *************** *** 424,435 **** "{ rtx addr0; int cnt8; if (GET_CODE (operands[1]) != CONST_INT) FAIL; cnt8 = byte_immediate_operand (operands[1], GET_MODE (operands[1])); ! operands[1] = copy_to_mode_reg (cnt8 ? QImode : HImode, operands[1]); operands[3] = operands[1]; addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); --- 430,444 ---- "{ rtx addr0; int cnt8; + enum machine_mode mode; if (GET_CODE (operands[1]) != CONST_INT) FAIL; cnt8 = byte_immediate_operand (operands[1], GET_MODE (operands[1])); ! mode = cnt8 ? QImode : HImode; ! operands[1] = copy_to_mode_reg (mode, ! gen_int_mode (INTVAL (operands[1]), mode)); operands[3] = operands[1]; addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); *************** *** 718,726 **** (clobber (reg:QI 22))] "!AVR_ENHANCED" "%~call __mulqi3" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) (define_insn "mulqihi3" --- 727,733 ---- (clobber (reg:QI 22))] "!AVR_ENHANCED" "%~call __mulqi3" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) (define_insn "mulqihi3" *************** *** 790,798 **** (clobber (reg:QI 21))] "!AVR_ENHANCED" "%~call __mulhi3" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) ;; Operand 2 (reg:SI 18) not clobbered on the enhanced core. --- 797,803 ---- (clobber (reg:QI 21))] "!AVR_ENHANCED" "%~call __mulhi3" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) ;; Operand 2 (reg:SI 18) not clobbered on the enhanced core. *************** *** 813,821 **** (clobber (reg:HI 30))] "AVR_ENHANCED" "%~call __mulsi3" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) ; / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % --- 818,824 ---- (clobber (reg:HI 30))] "AVR_ENHANCED" "%~call __mulsi3" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) ; / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % / % *************** *** 845,853 **** (clobber (reg:QI 23))] "" "%~call __divmodqi4" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) (define_expand "udivmodqi4" --- 848,854 ---- (clobber (reg:QI 23))] "" "%~call __divmodqi4" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) (define_expand "udivmodqi4" *************** *** 867,875 **** (clobber (reg:QI 23))] "" "%~call __udivmodqi4" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) (define_expand "divmodhi4" --- 868,874 ---- (clobber (reg:QI 23))] "" "%~call __udivmodqi4" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) (define_expand "divmodhi4" *************** *** 891,899 **** (clobber (reg:QI 21))] "" "%~call __divmodhi4" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) (define_expand "udivmodhi4" --- 890,896 ---- (clobber (reg:QI 21))] "" "%~call __divmodhi4" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) (define_expand "udivmodhi4" *************** *** 915,923 **** (clobber (reg:QI 21))] "" "%~call __udivmodhi4" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) (define_expand "divmodsi4" --- 912,918 ---- (clobber (reg:QI 21))] "" "%~call __udivmodhi4" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) (define_expand "divmodsi4" *************** *** 939,947 **** (clobber (reg:HI 30))] "" "%~call __divmodsi4" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) (define_expand "udivmodsi4" --- 934,940 ---- (clobber (reg:HI 30))] "" "%~call __divmodsi4" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) (define_expand "udivmodsi4" *************** *** 963,971 **** (clobber (reg:HI 30))] "" "%~call __udivmodsi4" ! [(set (attr "length") (if_then_else (eq_attr "mcu_mega" "no") ! (const_int 1) ! (const_int 2))) (set_attr "cc" "clobber")]) ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& --- 956,962 ---- (clobber (reg:HI 30))] "" "%~call __udivmodsi4" ! [(set_attr "type" "xcall") (set_attr "cc" "clobber")]) ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *************** *** 1646,1653 **** [(set (cc0) (compare (sign_extend:HI (match_operand:QI 0 "register_operand" "d")) ! (match_operand:HI 1 "immediate_operand" "M")))] ! "" "cpi %0,lo8(%1)" [(set_attr "cc" "compare") (set_attr "length" "1")]) --- 1637,1644 ---- [(set (cc0) (compare (sign_extend:HI (match_operand:QI 0 "register_operand" "d")) ! (match_operand:HI 1 "const_int_operand" "n")))] ! "INTVAL (operands[1]) >= -128 && INTVAL (operands[1]) <= 127" "cpi %0,lo8(%1)" [(set_attr "cc" "compare") (set_attr "length" "1")]) *************** *** 1850,1855 **** --- 1841,1847 ---- "" "") + ;; Test a single bit in a QI/HI/SImode register. (define_insn "*sbrx_branch" [(set (pc) (if_then_else *************** *** 1857,1880 **** [(zero_extract (match_operand:QI 1 "register_operand" "r") (const_int 1) ! (match_operand 2 "immediate_operand" "n")) (const_int 0)]) (label_ref (match_operand 3 "" "")) (pc)))] ! "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE)" ! "* { ! int comp = ((get_attr_length (insn) == 4) ! ? reverse_condition (GET_CODE (operands[0])) ! : GET_CODE (operands[0])); ! if (comp == EQ) ! output_asm_insn (AS2 (sbrs,%1,%2), operands); ! else ! output_asm_insn (AS2 (sbrc,%1,%2), operands); ! if (get_attr_length (insn) != 4) ! return AS1 (rjmp,%3); ! return (AS1 (rjmp,.+4) CR_TAB ! AS1 (jmp,%3)); ! }" [(set (attr "length") (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) (le (minus (pc) (match_dup 3)) (const_int 2046))) --- 1849,1860 ---- [(zero_extract (match_operand:QI 1 "register_operand" "r") (const_int 1) ! (match_operand 2 "const_int_operand" "n")) (const_int 0)]) (label_ref (match_operand 3 "" "")) (pc)))] ! "GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE" ! "* return avr_out_sbxx_branch (insn, operands);" [(set (attr "length") (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) (le (minus (pc) (match_dup 3)) (const_int 2046))) *************** *** 1884,1917 **** (const_int 4)))) (set_attr "cc" "clobber")]) ! (define_insn "*sbrx_and_branchsi" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" ! [(and:SI ! (match_operand:SI 1 "register_operand" "r") ! (match_operand:SI 2 "immediate_operand" "n")) (const_int 0)]) (label_ref (match_operand 3 "" "")) (pc)))] "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE) ! && mask_one_bit_p(INTVAL (operands[2]))" ! "* { ! int comp = ((get_attr_length (insn) == 4) ! ? reverse_condition (GET_CODE (operands[0])) ! : GET_CODE (operands[0])); ! int bit = mask_one_bit_p(INTVAL (operands[2])) - 1; ! static char buf[] = \"sbrc %A1,0\"; ! buf[3] = (comp == EQ ? 's' : 'c'); ! buf[6] = bit / 8 + 'A'; ! buf[9] = bit % 8 + '0'; ! output_asm_insn (buf, operands); ! ! if (get_attr_length (insn) != 4) ! return AS1 (rjmp,%3); ! return (AS1 (rjmp,.+4) CR_TAB ! AS1 (jmp,%3)); ! }" [(set (attr "length") (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) (le (minus (pc) (match_dup 3)) (const_int 2046))) --- 1864,1882 ---- (const_int 4)))) (set_attr "cc" "clobber")]) ! (define_insn "*sbrx_and_branchhi" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" ! [(and:HI ! (match_operand:HI 1 "register_operand" "r") ! (match_operand:HI 2 "const_int_operand" "n")) (const_int 0)]) (label_ref (match_operand 3 "" "")) (pc)))] "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE) ! && exact_log2 (INTVAL (operands[2]) & 0xffff) >= 0" ! "* return avr_out_sbxx_branch (insn, operands);" [(set (attr "length") (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) (le (minus (pc) (match_dup 3)) (const_int 2046))) *************** *** 1921,1954 **** (const_int 4)))) (set_attr "cc" "clobber")]) ! (define_insn "*sbrx_and_branchhi" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" ! [(and:HI ! (match_operand:HI 1 "register_operand" "r") ! (match_operand:HI 2 "immediate_operand" "n")) (const_int 0)]) (label_ref (match_operand 3 "" "")) (pc)))] "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE) ! && mask_one_bit_p(INTVAL (operands[2]))" ! "* { ! int comp = ((get_attr_length (insn) == 4) ! ? reverse_condition (GET_CODE (operands[0])) ! : GET_CODE (operands[0])); ! int bit = mask_one_bit_p(INTVAL (operands[2])) - 1; ! static char buf[] = \"sbrc %A1,0\"; ! buf[3] = (comp == EQ ? 's' : 'c'); ! buf[6] = bit / 8 + 'A'; ! buf[9] = bit % 8 + '0'; ! output_asm_insn (buf, operands); ! ! if (get_attr_length (insn) != 4) ! return AS1 (rjmp,%3); ! return (AS1 (rjmp,.+4) CR_TAB ! AS1 (jmp,%3)); ! }" [(set (attr "length") (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) (le (minus (pc) (match_dup 3)) (const_int 2046))) --- 1886,1904 ---- (const_int 4)))) (set_attr "cc" "clobber")]) ! (define_insn "*sbrx_and_branchsi" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" ! [(and:SI ! (match_operand:SI 1 "register_operand" "r") ! (match_operand:SI 2 "const_int_operand" "n")) (const_int 0)]) (label_ref (match_operand 3 "" "")) (pc)))] "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE) ! && exact_log2 (INTVAL (operands[2]) & 0xffffffff) >= 0" ! "* return avr_out_sbxx_branch (insn, operands);" [(set (attr "length") (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) (le (minus (pc) (match_dup 3)) (const_int 2046))) *************** *** 1958,1963 **** --- 1908,1990 ---- (const_int 4)))) (set_attr "cc" "clobber")]) + ;; Convert sign tests to bit 7/15/31 tests that match the above insns. + (define_peephole2 + [(set (cc0) (match_operand:QI 0 "register_operand" "")) + (set (pc) (if_then_else (ge (cc0) (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + [(set (pc) (if_then_else (eq (zero_extract (match_dup 0) + (const_int 1) + (const_int 7)) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "") + + (define_peephole2 + [(set (cc0) (match_operand:QI 0 "register_operand" "")) + (set (pc) (if_then_else (lt (cc0) (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + [(set (pc) (if_then_else (ne (zero_extract (match_dup 0) + (const_int 1) + (const_int 7)) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "") + + (define_peephole2 + [(set (cc0) (match_operand:HI 0 "register_operand" "")) + (set (pc) (if_then_else (ge (cc0) (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + [(set (pc) (if_then_else (eq (and:HI (match_dup 0) (const_int -32768)) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "") + + (define_peephole2 + [(set (cc0) (match_operand:HI 0 "register_operand" "")) + (set (pc) (if_then_else (lt (cc0) (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + [(set (pc) (if_then_else (ne (and:HI (match_dup 0) (const_int -32768)) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "") + + (define_peephole2 + [(set (cc0) (match_operand:SI 0 "register_operand" "")) + (set (pc) (if_then_else (ge (cc0) (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + [(set (pc) (if_then_else (eq (and:SI (match_dup 0) (match_dup 2)) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "operands[2] = GEN_INT (-2147483647 - 1);") + + (define_peephole2 + [(set (cc0) (match_operand:SI 0 "register_operand" "")) + (set (pc) (if_then_else (lt (cc0) (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + [(set (pc) (if_then_else (ne (and:SI (match_dup 0) (match_dup 2)) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "operands[2] = GEN_INT (-2147483647 - 1);") + ;; ************************************************************************ ;; Implementation of conditional jumps here. ;; Compare with 0 (test) jumps *************** *** 2121,2126 **** --- 2148,2160 ---- (const_int 2) (const_int 1))])]) + (define_insn "return" + [(return)] + "reload_completed && avr_simple_epilogue ()" + "ret" + [(set_attr "cc" "none") + (set_attr "length" "1")]) + (define_insn "nop" [(const_int 0)] "" *************** *** 2230,2235 **** --- 2264,2393 ---- [(set_attr "length" "1") (set_attr "cc" "compare")]) + ;; Clear/set/test a single bit in I/O address space. + + (define_insn "*cbi" + [(set (mem:QI (match_operand 0 "const_int_operand" "n")) + (and:QI (mem:QI (match_dup 0)) + (match_operand 1 "const_int_operand" "n")))] + "avr_io_address_p (operands[0], 1 + 0x20) + && exact_log2 (~INTVAL (operands[1]) & 0xff) >= 0" + { + operands[2] = GEN_INT (exact_log2 (~INTVAL (operands[1]) & 0xff)); + return AS2 (cbi,%0-0x20,%2); + } + [(set_attr "length" "1") + (set_attr "cc" "none")]) + + (define_insn "*sbi" + [(set (mem:QI (match_operand 0 "const_int_operand" "n")) + (ior:QI (mem:QI (match_dup 0)) + (match_operand 1 "const_int_operand" "n")))] + "avr_io_address_p (operands[0], 1 + 0x20) + && exact_log2 (INTVAL (operands[1]) & 0xff) >= 0" + { + operands[2] = GEN_INT (exact_log2 (INTVAL (operands[1]) & 0xff)); + return AS2 (sbi,%0-0x20,%2); + } + [(set_attr "length" "1") + (set_attr "cc" "none")]) + + ;; Lower half of the I/O space - use sbic/sbis directly. + (define_insn "*sbix_branch" + [(set (pc) + (if_then_else + (match_operator 0 "comparison_operator" + [(zero_extract + (mem:QI (match_operand 1 "const_int_operand" "n")) + (const_int 1) + (match_operand 2 "const_int_operand" "n")) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE) + && avr_io_address_p (operands[1], 1 + 0x20)" + "* return avr_out_sbxx_branch (insn, operands);" + [(set (attr "length") + (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) + (le (minus (pc) (match_dup 3)) (const_int 2046))) + (const_int 2) + (if_then_else (eq_attr "mcu_mega" "no") + (const_int 2) + (const_int 4)))) + (set_attr "cc" "clobber")]) + + ;; Tests of bit 7 are pessimized to sign tests, so we need this too... + (define_insn "*sbix_branch_bit7" + [(set (pc) + (if_then_else + (match_operator 0 "comparison_operator" + [(mem:QI (match_operand 1 "const_int_operand" "n")) + (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "(GET_CODE (operands[0]) == GE || GET_CODE (operands[0]) == LT) + && avr_io_address_p (operands[1], 1 + 0x20)" + { + operands[3] = operands[2]; + operands[2] = GEN_INT (7); + return avr_out_sbxx_branch (insn, operands); + } + [(set (attr "length") + (if_then_else (and (ge (minus (pc) (match_dup 2)) (const_int -2046)) + (le (minus (pc) (match_dup 2)) (const_int 2046))) + (const_int 2) + (if_then_else (eq_attr "mcu_mega" "no") + (const_int 2) + (const_int 4)))) + (set_attr "cc" "clobber")]) + + ;; Upper half of the I/O space - read port to __tmp_reg__ and use sbrc/sbrs. + (define_insn "*sbix_branch_tmp" + [(set (pc) + (if_then_else + (match_operator 0 "comparison_operator" + [(zero_extract + (mem:QI (match_operand 1 "const_int_operand" "n")) + (const_int 1) + (match_operand 2 "const_int_operand" "n")) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE) + && avr_io_address_p (operands[1], 1) && INTVAL (operands[1]) >= 0x40" + "* return avr_out_sbxx_branch (insn, operands);" + [(set (attr "length") + (if_then_else (and (ge (minus (pc) (match_dup 3)) (const_int -2046)) + (le (minus (pc) (match_dup 3)) (const_int 2045))) + (const_int 3) + (if_then_else (eq_attr "mcu_mega" "no") + (const_int 3) + (const_int 5)))) + (set_attr "cc" "clobber")]) + + (define_insn "*sbix_branch_tmp_bit7" + [(set (pc) + (if_then_else + (match_operator 0 "comparison_operator" + [(mem:QI (match_operand 1 "const_int_operand" "n")) + (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "(GET_CODE (operands[0]) == GE || GET_CODE (operands[0]) == LT) + && avr_io_address_p (operands[1], 1) && INTVAL (operands[1]) >= 0x40" + { + operands[3] = operands[2]; + operands[2] = GEN_INT (7); + return avr_out_sbxx_branch (insn, operands); + } + [(set (attr "length") + (if_then_else (and (ge (minus (pc) (match_dup 2)) (const_int -2046)) + (le (minus (pc) (match_dup 2)) (const_int 2045))) + (const_int 3) + (if_then_else (eq_attr "mcu_mega" "no") + (const_int 3) + (const_int 5)))) + (set_attr "cc" "clobber")]) ;; ************************* Peepholes ******************************** *************** *** 2336,2395 **** return (AS1 (brcs,.+4) CR_TAB AS1 (jmp,%1)); }") - - (define_peephole - [(set (cc0) (match_operand:QI 0 "register_operand" "")) - (set (pc) - (if_then_else (lt (cc0) (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc)))] - "jump_over_one_insn_p (insn, operands[1])" - "sbrs %0,7") - - (define_peephole - [(set (cc0) (match_operand:QI 0 "register_operand" "")) - (set (pc) - (if_then_else (ge (cc0) (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc)))] - "jump_over_one_insn_p (insn, operands[1])" - "sbrc %0,7") - - (define_peephole - [(set (cc0) (match_operand:HI 0 "register_operand" "")) - (set (pc) - (if_then_else (lt (cc0) (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc)))] - "jump_over_one_insn_p (insn, operands[1])" - "sbrs %B0,7") - - (define_peephole - [(set (cc0) (match_operand:HI 0 "register_operand" "")) - (set (pc) - (if_then_else (ge (cc0) (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc)))] - "jump_over_one_insn_p (insn, operands[1])" - "sbrc %B0,7") - - (define_peephole - [(set (cc0) (match_operand:SI 0 "register_operand" "")) - (set (pc) - (if_then_else (lt (cc0) (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc)))] - "jump_over_one_insn_p (insn, operands[1])" - "sbrs %D0,7") - - (define_peephole - [(set (cc0) (match_operand:SI 0 "register_operand" "")) - (set (pc) - (if_then_else (ge (cc0) (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc)))] - "jump_over_one_insn_p (insn, operands[1])" - "sbrc %D0,7") (define_peephole [(set (cc0) (match_operand:QI 0 "register_operand" "")) --- 2494,2499 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/avr/avr-protos.h gcc-3.3/gcc/config/avr/avr-protos.h *** gcc-3.2.3/gcc/config/avr/avr-protos.h 2001-12-17 15:05:27.000000000 +0000 --- gcc-3.3/gcc/config/avr/avr-protos.h 2002-07-10 21:08:41.000000000 +0000 *************** *** 1,6 **** /* Prototypes for exported functions defined in avr.c ! Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by Denis Chertykov (denisc@overta.ru) This file is part of GNU CC. --- 1,6 ---- /* Prototypes for exported functions defined in avr.c ! Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Denis Chertykov (denisc@overta.ru) This file is part of GNU CC. *************** extern void asm_file_start *** 26,31 **** --- 26,32 ---- extern void asm_file_end PARAMS ((FILE *file)); extern void avr_init_once PARAMS ((void)); extern void avr_override_options PARAMS ((void)); + extern void avr_optimization_options PARAMS ((int level, int size)); extern char * avr_change_section PARAMS ((char *sect_name)); extern int avr_ret_register PARAMS ((void)); extern enum reg_class class_likely_spilled_p PARAMS ((int c)); *************** extern int frame_pointer_required_p *** 35,40 **** --- 36,42 ---- extern void asm_globalize_label PARAMS ((FILE *file, const char *name)); extern void order_regs_for_local_alloc PARAMS ((void)); extern int initial_elimination_offset PARAMS ((int from, int to)); + extern int avr_simple_epilogue PARAMS ((void)); extern void progmem_section PARAMS ((void)); extern int mask_one_bit_p PARAMS ((HOST_WIDE_INT mask)); extern void gas_output_limited_string PARAMS ((FILE *file, const char *str)); *************** extern void gas_output_ascii *** 43,50 **** #ifdef TREE_CODE extern void asm_output_external PARAMS ((FILE *file, tree decl, char *name)); - extern void unique_section PARAMS ((tree decl, int reloc)); - extern void encode_section_info PARAMS ((tree decl)); extern int avr_progmem_p PARAMS ((tree decl)); --- 45,50 ---- *************** extern const char * lshrsi3_out PARAMS ( *** 100,105 **** --- 100,106 ---- extern void avr_output_bld PARAMS ((rtx operands[], int bit_nr)); extern void avr_output_addr_vec_elt PARAMS ((FILE *stream, int value)); + extern const char *avr_out_sbxx_branch PARAMS ((rtx insn, rtx operands[])); extern enum reg_class preferred_reload_class PARAMS ((rtx x, enum reg_class class)); *************** extern int compare_eq_p PAR *** 141,146 **** --- 142,148 ---- extern void out_shift_with_cnt PARAMS ((const char *template, rtx insn, rtx operands[], int *len, int t_len)); + extern int avr_io_address_p PARAMS ((rtx x, int size)); extern int const_int_pow2_p PARAMS ((rtx x)); extern int avr_peep2_scratch_safe PARAMS ((rtx reg_rtx)); #endif /* RTX_CODE */ diff -Nrc3pad gcc-3.2.3/gcc/config/avr/libgcc.S gcc-3.3/gcc/config/avr/libgcc.S *** gcc-3.2.3/gcc/config/avr/libgcc.S 2001-03-31 16:24:16.000000000 +0000 --- gcc-3.3/gcc/config/avr/libgcc.S 2002-06-01 23:33:47.000000000 +0000 *************** __epilogue_restores__: *** 637,647 **** #endif /* defined (L_epilogue) */ #ifdef L_exit ! .weak _exit .func _exit _exit: ! rjmp _exit ! .endfunc #endif /* defined (L_exit) */ #ifdef L_cleanup --- 637,655 ---- #endif /* defined (L_epilogue) */ #ifdef L_exit ! .section .fini9,"ax",@progbits ! .global _exit .func _exit _exit: ! .weak exit ! exit: ! ! /* Code from .fini8 ... .fini1 sections inserted by ld script. */ ! ! .section .fini0,"ax",@progbits ! __stop_program: ! rjmp __stop_program ! .endfunc #endif /* defined (L_exit) */ #ifdef L_cleanup *************** _cleanup: *** 658,663 **** --- 666,673 ---- __tablejump2__: lsl r30 rol r31 + .global __tablejump__ + __tablejump__: #if defined (__AVR_ENHANCED__) lpm __tmp_reg__, Z+ lpm r31, Z *************** __tablejump2__: *** 665,676 **** ijmp #else lpm push r0 - inc r30 ; table is word aligned, no carry to high byte lpm push r0 ret #endif ! .endfunc #endif /* defined (L_tablejump) */ --- 675,778 ---- ijmp #else lpm + adiw r30, 1 push r0 lpm push r0 ret #endif ! .endfunc #endif /* defined (L_tablejump) */ + /* __do_copy_data is only necessary if there is anything in .data section. + Does not use RAMPZ - crt*.o provides a replacement for >64K devices. */ + + #ifdef L_copy_data + .section .init4,"ax",@progbits + .global __do_copy_data + __do_copy_data: + ldi r17, hi8(__data_end) + ldi r26, lo8(__data_start) + ldi r27, hi8(__data_start) + ldi r30, lo8(__data_load_start) + ldi r31, hi8(__data_load_start) + rjmp .do_copy_data_start + .do_copy_data_loop: + #if defined (__AVR_ENHANCED__) + lpm r0, Z+ + #else + lpm + adiw r30, 1 + #endif + st X+, r0 + .do_copy_data_start: + cpi r26, lo8(__data_end) + cpc r27, r17 + brne .do_copy_data_loop + #endif /* L_copy_data */ + + /* __do_clear_bss is only necessary if there is anything in .bss section. */ + + #ifdef L_clear_bss + .section .init4,"ax",@progbits + .global __do_clear_bss + __do_clear_bss: + ldi r17, hi8(__bss_end) + ldi r26, lo8(__bss_start) + ldi r27, hi8(__bss_start) + rjmp .do_clear_bss_start + .do_clear_bss_loop: + st X+, __zero_reg__ + .do_clear_bss_start: + cpi r26, lo8(__bss_end) + cpc r27, r17 + brne .do_clear_bss_loop + #endif /* L_clear_bss */ + + /* __do_global_ctors and __do_global_dtors are only necessary + if there are any constructors/destructors. */ + + #if defined (__AVR_MEGA__) + #define XCALL call + #else + #define XCALL rcall + #endif + + #ifdef L_ctors + .section .init6,"ax",@progbits + .global __do_global_ctors + __do_global_ctors: + ldi r17, hi8(__ctors_start) + ldi r28, lo8(__ctors_end) + ldi r29, hi8(__ctors_end) + rjmp .do_global_ctors_start + .do_global_ctors_loop: + sbiw r28, 2 + mov_h r31, r29 + mov_l r30, r28 + XCALL __tablejump__ + .do_global_ctors_start: + cpi r28, lo8(__ctors_start) + cpc r29, r17 + brne .do_global_ctors_loop + #endif /* L_ctors */ + + #ifdef L_dtors + .section .fini6,"ax",@progbits + .global __do_global_dtors + __do_global_dtors: + ldi r17, hi8(__dtors_end) + ldi r28, lo8(__dtors_start) + ldi r29, hi8(__dtors_start) + rjmp .do_global_dtors_start + .do_global_dtors_loop: + mov_h r31, r29 + mov_l r30, r28 + XCALL __tablejump__ + adiw r28, 2 + .do_global_dtors_start: + cpi r28, lo8(__dtors_end) + cpc r29, r17 + brne .do_global_dtors_loop + #endif /* L_dtors */ + diff -Nrc3pad gcc-3.2.3/gcc/config/avr/t-avr gcc-3.3/gcc/config/avr/t-avr *** gcc-3.2.3/gcc/config/avr/t-avr 2002-01-07 15:04:34.000000000 +0000 --- gcc-3.3/gcc/config/avr/t-avr 2003-02-27 21:49:51.000000000 +0000 *************** LIB1ASMFUNCS = \ *** 17,23 **** _epilogue \ _exit \ _cleanup \ ! _tablejump # We do not have the DF type. # Most of the C functions in libgcc2 use almost all registers, --- 17,27 ---- _epilogue \ _exit \ _cleanup \ ! _tablejump \ ! _copy_data \ ! _clear_bss \ ! _ctors \ ! _dtors # We do not have the DF type. # Most of the C functions in libgcc2 use almost all registers, *************** MULTILIB_DIRNAMES = avr2 avr3 avr4 avr5 *** 43,55 **** # The many avr2 matches are not listed here - this is the default. MULTILIB_MATCHES = \ mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \ ! mmcu?avr3=mmcu?at43usb320 mmcu?avr3=mmcu?at76c711 \ ! mmcu?avr4=mmcu?atmega83 mmcu?avr4=mmcu?atmega85 \ ! mmcu?avr4=mmcu?atmega8 mmcu?avr5=mmcu?atmega16 \ ! mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega163 \ mmcu?avr5=mmcu?atmega64 mmcu?avr5=mmcu?atmega128 \ ! mmcu?avr5=mmcu?at43usb355 mmcu?avr5=mmcu?atmega323 \ ! mmcu?avr5=mmcu?atmega32 mmcu?avr5=mmcu?at94k MULTILIB_EXCEPTIONS = --- 47,62 ---- # The many avr2 matches are not listed here - this is the default. MULTILIB_MATCHES = \ mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \ ! mmcu?avr3=mmcu?at43usb320 mmcu?avr3=mmcu?at43usb355 \ ! mmcu?avr3=mmcu?at76c711 \ ! mmcu?avr4=mmcu?atmega8515 mmcu?avr4=mmcu?atmega8535 \ ! mmcu?avr4=mmcu?atmega8 \ ! mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega162 \ ! mmcu?avr5=mmcu?atmega163 mmcu?avr5=mmcu?atmega169 \ ! mmcu?avr5=mmcu?atmega16 \ ! mmcu?avr5=mmcu?atmega323 mmcu?avr5=mmcu?atmega32 \ mmcu?avr5=mmcu?atmega64 mmcu?avr5=mmcu?atmega128 \ ! mmcu?avr5=mmcu?at94k MULTILIB_EXCEPTIONS = diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/c4x.c gcc-3.3/gcc/config/c4x/c4x.c *** gcc-3.2.3/gcc/config/c4x/c4x.c 2001-12-17 15:05:27.000000000 +0000 --- gcc-3.3/gcc/config/c4x/c4x.c 2003-03-24 17:59:37.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 46,52 **** #include "ggc.h" #include "cpplib.h" #include "toplev.h" ! #include "c4x-protos.h" #include "target.h" #include "target-def.h" --- 46,52 ---- #include "ggc.h" #include "cpplib.h" #include "toplev.h" ! #include "tm_p.h" #include "target.h" #include "target-def.h" *************** enum machine_mode c4x_caller_save_map[FI *** 148,155 **** /* Test and compare insns in c4x.md store the information needed to generate branch and scc insns here. */ ! struct rtx_def *c4x_compare_op0 = NULL_RTX; ! struct rtx_def *c4x_compare_op1 = NULL_RTX; const char *c4x_rpts_cycles_string; int c4x_rpts_cycles = 0; /* Max. cycles for RPTS. */ --- 148,155 ---- /* Test and compare insns in c4x.md store the information needed to generate branch and scc insns here. */ ! rtx c4x_compare_op0; ! rtx c4x_compare_op1; const char *c4x_rpts_cycles_string; int c4x_rpts_cycles = 0; /* Max. cycles for RPTS. */ *************** tree noreturn_tree = NULL_TREE; *** 165,171 **** tree interrupt_tree = NULL_TREE; /* Forward declarations */ - static void c4x_add_gc_roots PARAMS ((void)); static int c4x_isr_reg_used_p PARAMS ((unsigned int)); static int c4x_leaf_function_p PARAMS ((void)); static int c4x_assembler_function_p PARAMS ((void)); --- 165,170 ---- *************** const struct attribute_spec c4x_attribut *** 193,198 **** --- 192,199 ---- static void c4x_insert_attributes PARAMS ((tree, tree *)); static void c4x_asm_named_section PARAMS ((const char *, unsigned int)); static int c4x_adjust_cost PARAMS ((rtx, rtx, rtx, int)); + static void c4x_encode_section_info PARAMS ((tree, int)); + static void c4x_globalize_label PARAMS ((FILE *, const char *)); /* Initialize the GCC target structure. */ #undef TARGET_ASM_BYTE_OP *************** static int c4x_adjust_cost PARAMS ((rtx, *** 217,250 **** #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST c4x_adjust_cost ! struct gcc_target targetm = TARGET_INITIALIZER; ! ! /* Called to register all of our global variables with the garbage ! collector. */ ! ! static void ! c4x_add_gc_roots () ! { ! ggc_add_rtx_root (&c4x_compare_op0, 1); ! ggc_add_rtx_root (&c4x_compare_op1, 1); ! ggc_add_tree_root (&code_tree, 1); ! ggc_add_tree_root (&data_tree, 1); ! ggc_add_tree_root (&pure_tree, 1); ! ggc_add_tree_root (&noreturn_tree, 1); ! ggc_add_tree_root (&interrupt_tree, 1); ! ggc_add_rtx_root (&smulhi3_libfunc, 1); ! ggc_add_rtx_root (&umulhi3_libfunc, 1); ! ggc_add_rtx_root (&fix_truncqfhi2_libfunc, 1); ! ggc_add_rtx_root (&fixuns_truncqfhi2_libfunc, 1); ! ggc_add_rtx_root (&fix_trunchfhi2_libfunc, 1); ! ggc_add_rtx_root (&fixuns_trunchfhi2_libfunc, 1); ! ggc_add_rtx_root (&floathiqf2_libfunc, 1); ! ggc_add_rtx_root (&floatunshiqf2_libfunc, 1); ! ggc_add_rtx_root (&floathihf2_libfunc, 1); ! ggc_add_rtx_root (&floatunshihf2_libfunc, 1); ! } /* Override command line options. Called once after all options have been parsed. Mostly we process the processor --- 218,231 ---- #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST c4x_adjust_cost ! #undef TARGET_ENCODE_SECTION_INFO ! #define TARGET_ENCODE_SECTION_INFO c4x_encode_section_info + #undef TARGET_ASM_GLOBALIZE_LABEL + #define TARGET_ASM_GLOBALIZE_LABEL c4x_globalize_label + struct gcc_target targetm = TARGET_INITIALIZER; + /* Override command line options. Called once after all options have been parsed. Mostly we process the processor *************** c4x_override_options () *** 307,321 **** target_flags &= ~C3X_FLAG; /* Convert foo / 8.0 into foo * 0.125, etc. */ ! set_fast_math_flags(); /* We should phase out the following at some stage. This provides compatibility with the old -mno-aliases option. */ if (! TARGET_ALIASES && ! flag_argument_noalias) flag_argument_noalias = 1; ! /* Register global variables with the garbage collector. */ ! c4x_add_gc_roots (); } --- 288,304 ---- target_flags &= ~C3X_FLAG; /* Convert foo / 8.0 into foo * 0.125, etc. */ ! set_fast_math_flags (1); /* We should phase out the following at some stage. This provides compatibility with the old -mno-aliases option. */ if (! TARGET_ALIASES && ! flag_argument_noalias) flag_argument_noalias = 1; ! /* We're C4X floating point, not IEEE floating point. */ ! memset (real_format_for_mode, 0, sizeof real_format_for_mode); ! real_format_for_mode[QFmode - QFmode] = &c4x_single_format; ! real_format_for_mode[HFmode - QFmode] = &c4x_extended_format; } *************** c4x_hard_regno_mode_ok (regno, mode) *** 458,464 **** return 0; } ! /* Return non-zero if REGNO1 can be renamed to REGNO2. */ int c4x_hard_regno_rename_ok (regno1, regno2) unsigned int regno1; --- 441,447 ---- return 0; } ! /* Return nonzero if REGNO1 can be renamed to REGNO2. */ int c4x_hard_regno_rename_ok (regno1, regno2) unsigned int regno1; *************** static const int c4x_int_reglist[3][6] = *** 514,520 **** {AR2_REGNO, RC_REGNO, RS_REGNO, RE_REGNO, 0, 0} }; ! static int c4x_fp_reglist[2] = {R2_REGNO, R3_REGNO}; /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a --- 497,503 ---- {AR2_REGNO, RC_REGNO, RS_REGNO, RE_REGNO, 0, 0} }; ! static const int c4x_fp_reglist[2] = {R2_REGNO, R3_REGNO}; /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a *************** c4x_function_arg (cum, mode, type, named *** 728,746 **** return NULL_RTX; } - - void - c4x_va_start (stdarg_p, valist, nextarg) - int stdarg_p; - tree valist; - rtx nextarg; - { - nextarg = plus_constant (nextarg, stdarg_p ? 0 : UNITS_PER_WORD * 2); - - std_expand_builtin_va_start (stdarg_p, valist, nextarg); - } - - /* C[34]x arguments grow in weird ways (downwards) that the standard varargs stuff can't handle.. */ rtx --- 711,716 ---- *************** c4x_emit_libcall_mulhi (libcall, code, m *** 1478,1494 **** /* Set the SYMBOL_REF_FLAG for a function decl. However, wo do not yet use this info. */ ! void ! c4x_encode_section_info (decl) ! tree decl; { - #if 0 - if (TREE_CODE (TREE_TYPE (decl)) == FUNCTION_TYPE) - SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; - #else if (TREE_CODE (decl) == FUNCTION_DECL) SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; - #endif } --- 1448,1461 ---- /* Set the SYMBOL_REF_FLAG for a function decl. However, wo do not yet use this info. */ ! ! static void ! c4x_encode_section_info (decl, first) ! tree decl; ! int first ATTRIBUTE_UNUSED; { if (TREE_CODE (decl) == FUNCTION_DECL) SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; } *************** c4x_check_legit_addr (mode, addr, strict *** 1507,1513 **** switch (code) { /* Register indirect with auto increment/decrement. We don't ! allow SP here---push_operand should recognise an operand being pushed on the stack. */ case PRE_DEC: --- 1474,1480 ---- switch (code) { /* Register indirect with auto increment/decrement. We don't ! allow SP here---push_operand should recognize an operand being pushed on the stack. */ case PRE_DEC: *************** c4x_print_operand (file, op, letter) *** 1892,1898 **** { case '#': /* Delayed. */ if (final_sequence) ! asm_fprintf (file, "d"); return; } --- 1859,1865 ---- { case '#': /* Delayed. */ if (final_sequence) ! fprintf (file, "d"); return; } *************** c4x_print_operand (file, op, letter) *** 1901,1907 **** { case 'A': /* Direct address. */ if (code == CONST_INT || code == SYMBOL_REF || code == CONST) ! asm_fprintf (file, "@"); break; case 'H': /* Sethi. */ --- 1868,1874 ---- { case 'A': /* Direct address. */ if (code == CONST_INT || code == SYMBOL_REF || code == CONST) ! fprintf (file, "@"); break; case 'H': /* Sethi. */ *************** c4x_print_operand (file, op, letter) *** 1934,1942 **** op1 = XEXP (XEXP (op, 0), 1); if (GET_CODE(op1) == CONST_INT || GET_CODE(op1) == SYMBOL_REF) { ! asm_fprintf (file, "\t%s\t@", TARGET_C3X ? "ldp" : "ldpk"); output_address (XEXP (adjust_address (op, VOIDmode, 1), 0)); ! asm_fprintf (file, "\n"); } } return; --- 1901,1909 ---- op1 = XEXP (XEXP (op, 0), 1); if (GET_CODE(op1) == CONST_INT || GET_CODE(op1) == SYMBOL_REF) { ! fprintf (file, "\t%s\t@", TARGET_C3X ? "ldp" : "ldpk"); output_address (XEXP (adjust_address (op, VOIDmode, 1), 0)); ! fprintf (file, "\n"); } } return; *************** c4x_print_operand (file, op, letter) *** 1947,1955 **** && (GET_CODE (XEXP (op, 0)) == CONST || GET_CODE (XEXP (op, 0)) == SYMBOL_REF)) { ! asm_fprintf (file, "%s\t@", TARGET_C3X ? "ldp" : "ldpk"); output_address (XEXP (op, 0)); ! asm_fprintf (file, "\n\t"); } return; --- 1914,1922 ---- && (GET_CODE (XEXP (op, 0)) == CONST || GET_CODE (XEXP (op, 0)) == SYMBOL_REF)) { ! fprintf (file, "%s\t@", TARGET_C3X ? "ldp" : "ldpk"); output_address (XEXP (op, 0)); ! fprintf (file, "\n\t"); } return; *************** c4x_print_operand (file, op, letter) *** 1969,1975 **** case 'U': /* Call/callu. */ if (code != SYMBOL_REF) ! asm_fprintf (file, "u"); return; default: --- 1936,1942 ---- case 'U': /* Call/callu. */ if (code != SYMBOL_REF) ! fprintf (file, "u"); return; default: *************** c4x_print_operand (file, op, letter) *** 1992,2002 **** case CONST_DOUBLE: { ! char str[30]; ! REAL_VALUE_TYPE r; ! REAL_VALUE_FROM_CONST_DOUBLE (r, op); ! REAL_VALUE_TO_DECIMAL (r, "%20f", str); fprintf (file, "%s", str); } break; --- 1959,1968 ---- case CONST_DOUBLE: { ! char str[64]; ! real_to_decimal (str, CONST_DOUBLE_REAL_VALUE (op), ! sizeof (str), 0, 1); fprintf (file, "%s", str); } break; *************** c4x_print_operand (file, op, letter) *** 2006,2048 **** break; case NE: ! asm_fprintf (file, "ne"); break; case EQ: ! asm_fprintf (file, "eq"); break; case GE: ! asm_fprintf (file, "ge"); break; case GT: ! asm_fprintf (file, "gt"); break; case LE: ! asm_fprintf (file, "le"); break; case LT: ! asm_fprintf (file, "lt"); break; case GEU: ! asm_fprintf (file, "hs"); break; case GTU: ! asm_fprintf (file, "hi"); break; case LEU: ! asm_fprintf (file, "ls"); break; case LTU: ! asm_fprintf (file, "lo"); break; case SYMBOL_REF: --- 1972,2014 ---- break; case NE: ! fprintf (file, "ne"); break; case EQ: ! fprintf (file, "eq"); break; case GE: ! fprintf (file, "ge"); break; case GT: ! fprintf (file, "gt"); break; case LE: ! fprintf (file, "le"); break; case LT: ! fprintf (file, "lt"); break; case GEU: ! fprintf (file, "hs"); break; case GTU: ! fprintf (file, "hi"); break; case LEU: ! fprintf (file, "ls"); break; case LTU: ! fprintf (file, "lo"); break; case SYMBOL_REF: *************** src_operand (op, mode) *** 3404,3413 **** || GET_CODE (op) == CONST) return 0; ! /* If TARGET_LOAD_DIRECT_MEMS is non-zero, disallow direct memory access to symbolic addresses. These operands will get forced into a register and the movqi expander will generate a ! HIGH/LO_SUM pair if TARGET_EXPOSE_LDP is non-zero. */ if (GET_CODE (op) == MEM && ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF || GET_CODE (XEXP (op, 0)) == LABEL_REF --- 3370,3379 ---- || GET_CODE (op) == CONST) return 0; ! /* If TARGET_LOAD_DIRECT_MEMS is nonzero, disallow direct memory access to symbolic addresses. These operands will get forced into a register and the movqi expander will generate a ! HIGH/LO_SUM pair if TARGET_EXPOSE_LDP is nonzero. */ if (GET_CODE (op) == MEM && ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF || GET_CODE (XEXP (op, 0)) == LABEL_REF *************** tsrc_operand (op, mode) *** 3469,3474 **** --- 3435,3468 ---- } + /* Check src operand of two operand non immedidate instructions. */ + + int + nonimmediate_src_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE) + return 0; + + return src_operand (op, mode); + } + + + /* Check logical src operand of two operand non immedidate instructions. */ + + int + nonimmediate_lsrc_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE) + return 0; + + return lsrc_operand (op, mode); + } + + int reg_or_const_operand (op, mode) rtx op; *************** c4x_global_label (name) *** 4511,4517 **** return; p = p->next; } ! p = (struct name_list *) permalloc (sizeof *p); p->next = global_head; p->name = name; global_head = p; --- 4505,4511 ---- return; p = p->next; } ! p = (struct name_list *) xmalloc (sizeof *p); p->next = global_head; p->name = name; global_head = p; *************** c4x_external_ref (name) *** 4560,4566 **** return; p = p->next; } ! p = (struct name_list *) permalloc (sizeof *p); p->next = extern_head; p->name = name; extern_head = p; --- 4554,4560 ---- return; p = p->next; } ! p = (struct name_list *) xmalloc (sizeof *p); p->next = extern_head; p->name = name; extern_head = p; *************** c4x_init_builtins () *** 4924,4935 **** build_function_type (integer_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_FIX, BUILT_IN_MD, NULL); builtin_function ("ansi_ftoi", build_function_type (integer_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL); if (TARGET_C3X) builtin_function ("fast_imult", build_function_type --- 4918,4929 ---- build_function_type (integer_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_FIX, BUILT_IN_MD, NULL, NULL_TREE); builtin_function ("ansi_ftoi", build_function_type (integer_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL, NULL_TREE); if (TARGET_C3X) builtin_function ("fast_imult", build_function_type *************** c4x_init_builtins () *** 4937,4960 **** tree_cons (NULL_TREE, integer_type_node, tree_cons (NULL_TREE, integer_type_node, endlink))), ! C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL); else { builtin_function ("toieee", build_function_type (double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL); builtin_function ("frieee", build_function_type (double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL); builtin_function ("fast_invf", build_function_type (double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL); } } --- 4931,4954 ---- tree_cons (NULL_TREE, integer_type_node, tree_cons (NULL_TREE, integer_type_node, endlink))), ! C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL, NULL_TREE); else { builtin_function ("toieee", build_function_type (double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL, NULL_TREE); builtin_function ("frieee", build_function_type (double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL, NULL_TREE); builtin_function ("fast_invf", build_function_type (double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)), ! C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL, NULL_TREE); } } *************** c4x_expand_builtin (exp, target, subtarg *** 5023,5029 **** break; arg0 = TREE_VALUE (arglist); if (TREE_CODE (arg0) == VAR_DECL || TREE_CODE (arg0) == PARM_DECL) ! put_var_into_stack (arg0); r0 = expand_expr (arg0, NULL_RTX, QFmode, 0); r0 = protect_from_queue (r0, 0); if (register_operand (r0, QFmode)) --- 5017,5023 ---- break; arg0 = TREE_VALUE (arglist); if (TREE_CODE (arg0) == VAR_DECL || TREE_CODE (arg0) == PARM_DECL) ! put_var_into_stack (arg0, /*rescan=*/true); r0 = expand_expr (arg0, NULL_RTX, QFmode, 0); r0 = protect_from_queue (r0, 0); if (register_operand (r0, QFmode)) *************** c4x_asm_named_section (name, flags) *** 5058,5060 **** --- 5052,5063 ---- { fprintf (asm_out_file, "\t.sect\t\"%s\"\n", name); } + + static void + c4x_globalize_label (stream, name) + FILE *stream; + const char *name; + { + default_globalize_label (stream, name); + c4x_global_label (name); + } diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/c4x-c.c gcc-3.3/gcc/config/c4x/c4x-c.c *** gcc-3.2.3/gcc/config/c4x/c4x-c.c 2001-10-17 20:39:11.000000000 +0000 --- gcc-3.3/gcc/config/c4x/c4x-c.c 2002-09-16 17:22:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 28,35 **** #include "toplev.h" #include "cpplib.h" #include "c-pragma.h" ! #include "c-lex.h" ! #include "c4x-protos.h" static int c4x_parse_pragma PARAMS ((const char *, tree *, tree *)); --- 28,34 ---- #include "toplev.h" #include "cpplib.h" #include "c-pragma.h" ! #include "tm_p.h" static int c4x_parse_pragma PARAMS ((const char *, tree *, tree *)); diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/c4x.h gcc-3.3/gcc/config/c4x/c4x.h *** gcc-3.2.3/gcc/config/c4x/c4x.h 2002-02-21 21:11:06.000000000 +0000 --- gcc-3.3/gcc/config/c4x/c4x.h 2003-04-29 14:31:52.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. TMS320C[34]x ! Copyright (C) 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl). --- 1,6 ---- /* Definitions of target machine for GNU compiler. TMS320C[34]x ! Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ! 2003 Free Software Foundation, Inc. Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl). *************** *** 22,33 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include "hwint.h" - /* RUN-TIME TARGET SPECIFICATION. */ #define C4x 1 /* Name of the c4x assembler. */ #define ASM_PROG "c4x-as" --- 22,86 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* RUN-TIME TARGET SPECIFICATION. */ + #include "hwint.h" + #define C4x 1 + #define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + if (!TARGET_SMALL) \ + builtin_define ("_BIGMODEL"); \ + if (!TARGET_MEMPARM) \ + builtin_define ("_REGPARM"); \ + if (flag_inline_functions \ + || flag_inline_trees) \ + builtin_define ("_INLINE"); \ + if (TARGET_C3X) \ + { \ + builtin_define ("_TMS320C3x"); \ + builtin_define ("_C3x"); \ + if (TARGET_C30) \ + { \ + builtin_define ("_TMS320C30"); \ + builtin_define ("_C30"); \ + } \ + else if (TARGET_C31) \ + { \ + builtin_define ("_TMS320C31"); \ + builtin_define ("_C31"); \ + } \ + else if (TARGET_C32) \ + { \ + builtin_define ("_TMS320C32"); \ + builtin_define ("_C32"); \ + } \ + else if (TARGET_C33) \ + { \ + builtin_define ("_TMS320C33"); \ + builtin_define ("_C33"); \ + } \ + } \ + else \ + { \ + builtin_define ("_TMS320C4x"); \ + builtin_define ("_C4x"); \ + if (TARGET_C40) \ + { \ + builtin_define ("_TMS320C40"); \ + builtin_define ("_C40"); \ + } \ + else if (TARGET_C44) \ + { \ + builtin_define ("_TMS320C44"); \ + builtin_define ("_C44"); \ + } \ + } \ + } \ + while (0) + /* Name of the c4x assembler. */ #define ASM_PROG "c4x-as" *************** *** 40,62 **** #define ASM_SPEC "\ %{!mcpu=30:%{!mcpu=31:%{!mcpu=32:%{!mcpu=33:%{!mcpu=40:%{!mcpu=44:\ ! %{!m30:%{!m40:-m40}}}}}}}} \ ! %{mcpu=30:-m30} \ ! %{mcpu=31:-m31} \ ! %{mcpu=32:-m32} \ ! %{mcpu=33:-m33} \ ! %{mcpu=40:-m40} \ ! %{mcpu=44:-m44} \ ! %{m30:-m30} \ ! %{m31:-m31} \ ! %{m32:-m32} \ ! %{m33:-m33} \ ! %{m40:-m40} \ ! %{m44:-m44} \ ! %{mmemparm:-p} %{mregparm:-r} \ ! %{!mmemparm:%{!mregparm:-r}} \ ! %{mbig:-b} %{msmall:-s} \ ! %{!msmall:%{!mbig:-b}}" /* Define linker options. */ --- 93,113 ---- #define ASM_SPEC "\ %{!mcpu=30:%{!mcpu=31:%{!mcpu=32:%{!mcpu=33:%{!mcpu=40:%{!mcpu=44:\ ! %{!m30:%{!m31:%{!m32:%{!m33:%{!m40:%{!m44:-m40}}}}}}}}}}}} \ ! %{mcpu=30} \ ! %{mcpu=31} \ ! %{mcpu=32} \ ! %{mcpu=33} \ ! %{mcpu=40} \ ! %{mcpu=44} \ ! %{m30} \ ! %{m31} \ ! %{m32} \ ! %{m33} \ ! %{m40} \ ! %{m44} \ ! %{mmemparm} %{mregparm} %{!mmemparm:%{!mregparm:-mregparm}} \ ! %{mbig} %{msmall} %{!msmall:%{!mbig:-mbig}}" /* Define linker options. */ *************** *** 70,99 **** %{mcpu=32:--architecture c3x} \ %{mcpu=33:--architecture c3x}" - /* Define C preprocessor options. */ - - #define CPP_SPEC "\ - %{!m30:%{!m31:%{!m32:%{!m33:%{!mcpu=30:%{!mcpu=31:%{!mcpu=32:%{!mcpu=33:\ - %{!mcpu=40:%{!mcpu=44:%{\ - !m40:%{!m44:-D_TMS320C4x -D_C4x -D_TMS320C40 -D_C40}}}}}}}}}}}} \ - %{mcpu=30:-D_TMS320C3x -D_C3x -D_TMS320C30 -D_C30 } \ - %{m30:-D_TMS320C3x -D_C3x -D_TMS320C30 -D_C30 } \ - %{mcpu=31:-D_TMS320C3x -D_C3x -D_TMS320C31 -D_C31 } \ - %{m31:-D_TMS320C3x -D_C3x -D_TMS320C31 -D_C31 } \ - %{mcpu=32:-D_TMS320C3x -D_C3x -D_TMS320C32 -D_C32 } \ - %{m32:-D_TMS320C3x -D_C3x -D_TMS320C32 -D_C32 } \ - %{mcpu=33:-D_TMS320C3x -D_C3x -D_TMS320C33 -D_C33 } \ - %{m33:-D_TMS320C3x -D_C3x -D_TMS320C33 -D_C33 } \ - %{mcpu=40:-D_TMS320C4x -D_C4x -D_TMS320C40 -D_C40 } \ - %{m40:-D_TMS320C4x -D_C4x -D_TMS320C40 -D_C40 } \ - %{mcpu=44:-D_TMS320C4x -D_C4x -D_TMS320C44 -D_C44 } \ - %{m44:-D_TMS320C4x -D_C4x -D_TMS320C44 -D_C44 } \ - %{mmemparm:-U_REGPARM }%{mregparm:-D_REGPARM } \ - %{!mmemparm:%{!mregparm:-D_REGPARM }} \ - %{msmall:-U_BIGMODEL } %{mbig:-D_BIGMODEL } \ - %{!msmall:%{!mbig:-D_BIGMODEL }} \ - %{finline-functions:-D_INLINE }" - /* Specify the end file to link with. */ #define ENDFILE_SPEC "" --- 121,126 ---- *************** *** 124,130 **** #define C30_FLAG 0x0100000 /* Emit C30 code. */ #define C31_FLAG 0x0200000 /* Emit C31 code. */ #define C32_FLAG 0x0400000 /* Emit C32 code. */ ! #define C33_FLAG 0x0400000 /* Emit C33 code. */ #define C40_FLAG 0x1000000 /* Emit C40 code. */ #define C44_FLAG 0x2000000 /* Emit C44 code. */ --- 151,157 ---- #define C30_FLAG 0x0100000 /* Emit C30 code. */ #define C31_FLAG 0x0200000 /* Emit C31 code. */ #define C32_FLAG 0x0400000 /* Emit C32 code. */ ! #define C33_FLAG 0x0800000 /* Emit C33 code. */ #define C40_FLAG 0x1000000 /* Emit C40 code. */ #define C44_FLAG 0x2000000 /* Emit C44 code. */ *************** *** 210,216 **** { "no-force", -FORCE_FLAG, \ N_("Allow RTL generation to emit invalid 3 operand insns") }, \ { "loop-unsigned", LOOP_UNSIGNED_FLAG, \ ! N_("Allow unsigned interation counts for RPTB/DB") }, \ { "no-loop-unsigned", -LOOP_UNSIGNED_FLAG, \ N_("Disallow unsigned iteration counts for RPTB/DB") }, \ { "preserve-float", PRESERVE_FLOAT_FLAG, \ --- 237,243 ---- { "no-force", -FORCE_FLAG, \ N_("Allow RTL generation to emit invalid 3 operand insns") }, \ { "loop-unsigned", LOOP_UNSIGNED_FLAG, \ ! N_("Allow unsigned iteration counts for RPTB/DB") }, \ { "no-loop-unsigned", -LOOP_UNSIGNED_FLAG, \ N_("Disallow unsigned iteration counts for RPTB/DB") }, \ { "preserve-float", PRESERVE_FLOAT_FLAG, \ *************** extern const char *c4x_rpts_cycles_strin *** 339,347 **** sizeof(int) = sizeof(long) = sizeof(float) = sizeof(double) = 1. */ #define BITS_PER_UNIT 32 - #define BITS_PER_WORD 32 #define UNITS_PER_WORD 1 - #define POINTER_SIZE 32 #define PARM_BOUNDARY 32 #define STACK_BOUNDARY 32 #define FUNCTION_BOUNDARY 32 --- 366,372 ---- *************** extern const char *c4x_rpts_cycles_strin *** 352,371 **** #define MAX_FIXED_MODE_SIZE 64 /* HImode. */ /* If a structure has a floating point field then force structure ! to have BLKMODE. */ ! #define MEMBER_TYPE_FORCES_BLK(FIELD) \ ! (TREE_CODE (TREE_TYPE (FIELD)) == REAL_TYPE) /* Number of bits in the high and low parts of a two stage load of an immediate constant. */ #define BITS_PER_HIGH 16 #define BITS_PER_LO_SUM 16 - /* Use the internal floating point stuff in the compiler and not the - host floating point stuff. */ - - #define REAL_ARITHMETIC - /* Define register numbers. */ /* Extended-precision registers. */ --- 377,391 ---- #define MAX_FIXED_MODE_SIZE 64 /* HImode. */ /* If a structure has a floating point field then force structure ! to have BLKMODE, unless it is the only field. */ ! #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) \ ! (TREE_CODE (TREE_TYPE (FIELD)) == REAL_TYPE && (MODE) == VOIDmode) /* Number of bits in the high and low parts of a two stage load of an immediate constant. */ #define BITS_PER_HIGH 16 #define BITS_PER_LO_SUM 16 /* Define register numbers. */ /* Extended-precision registers. */ *************** CUMULATIVE_ARGS; *** 1144,1152 **** /* Varargs handling. */ - #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ - c4x_va_start (stdarg, valist, nextarg) - #define EXPAND_BUILTIN_VA_ARG(valist, type) \ c4x_va_arg (valist, type) --- 1164,1169 ---- *************** CUMULATIVE_ARGS; *** 1263,1347 **** #define TARGET_MEM_FUNCTIONS - /* Add any extra modes needed to represent the condition code. - - On the C4x, we have a "no-overflow" mode which is used when an ADD, - SUB, NEG, or MPY insn is used to set the condition code. This is - to prevent the combiner from optimising away a following CMP of the - result with zero when a signed conditional branch or load insn - follows. - - The problem is a subtle one and deals with the manner in which the - negative condition (N) flag is used on the C4x. This flag does not - reflect the status of the actual result but of the ideal result had - no overflow occurred (when considering signed operands). - - For example, 0x7fffffff + 1 => 0x80000000 Z=0 V=1 N=0 C=0. Here - the flags reflect the untruncated result, not the actual result. - While the actual result is less than zero, the N flag is not set - since the ideal result of the addition without truncation would - have been positive. - - Note that the while the N flag is handled differently to most other - architectures, the use of it is self consistent and is not the - cause of the problem. - - Logical operations set the N flag to the MSB of the result so if - the result is negative, N is 1. However, integer and floating - point operations set the N flag to be the MSB of the result - exclusive ored with the overflow (V) flag. Thus if an overflow - occurs and the result does not have the MSB set (i.e., the result - looks like a positive number), the N flag is set. Conversely, if - an overflow occurs and the MSB of the result is set, N is set to 0. - Thus the N flag represents the sign of the result if it could have - been stored without overflow but does not represent the apparent - sign of the result. Note that most architectures set the N flag to - be the MSB of the result. - - The C4x approach to setting the N flag simplifies signed - conditional branches and loads which only have to test the state of - the N flag, whereas most architectures have to look at both the N - and V flags. The disadvantage is that there is no flag giving the - status of the sign bit of the operation. However, there are no - conditional load or branch instructions that make use of this - feature (e.g., BMI---branch minus) instruction. Note that BN and - BLT are identical in the C4x. - - To handle the problem where the N flag is set differently whenever - there is an overflow we use a different CC mode, CC_NOOVmode which - says that the CC reflects the comparison of the result against zero - if no overflow occurred. - - For example, - - [(set (reg:CC_NOOV 21) - (compare:CC_NOOV (minus:QI (match_operand:QI 1 "src_operand" "") - (match_operand:QI 2 "src_operand" "")) - (const_int 0))) - (set (match_operand:QI 0 "ext_reg_operand" "") - (minus:QI (match_dup 1) - (match_dup 2)))] - - Note that there is no problem for insns that don't return a result - like CMP, since the CC reflects the effect of operation. - - An example of a potential problem is when GCC - converts (LTU (MINUS (0x80000000) (0x7fffffff) (0x80000000))) - to (LEU (MINUS (0x80000000) (0x7fffffff) (0x7fffffff))) - to (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) - - Now (MINUS (0x80000000) (0x7fffffff)) returns 0x00000001 but the - C4x sets the N flag since the result without overflow would have - been 0xffffffff when treating the operands as signed integers. - Thus (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) sets the N - flag but (GE (0x00000001)) does not set the N flag. - - The upshot is that we can not use signed branch and conditional - load instructions after an add, subtract, neg, abs or multiply. - We must emit a compare insn to check the result against 0. */ - - #define EXTRA_CC_MODES CC(CC_NOOVmode, "CC_NOOV") - /* CC_NOOVmode should be used when the first operand is a PLUS, MINUS, NEG or MULT. CCmode should be used when no special processing is needed. */ --- 1280,1285 ---- *************** CUMULATIVE_ARGS; *** 1523,1547 **** #define LEGITIMATE_DISPLACEMENT_P(X) IS_DISP8_CONST (INTVAL (X)) - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or - function named by the symbol (such as what section it is in). - - The macro definition, if any, is executed immediately after the - rtl for DECL or other node is created. - The value of the rtl will be a `mem' whose address is a - `symbol_ref'. - - The usual thing for this macro to do is to a flag in the - `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified - name string in the `symbol_ref' (if one bit is not enough - information). - - On the C4x we use this to indicate if a symbol is in text or - data space. */ - - #define ENCODE_SECTION_INFO(DECL) c4x_encode_section_info (DECL); - /* Descripting Relative Cost of Operations. */ /* Provide the costs of a rtl expression. This is in the body of a --- 1461,1466 ---- *************** CUMULATIVE_ARGS; *** 1549,1555 **** Note that we return, rather than break so that rtx_cost doesn't include CONST_COSTS otherwise expand_mult will think that it is ! cheaper to synthesise a multiply rather than to use a multiply instruction. I think this is because the algorithm synth_mult doesn't take into account the loading of the operands, whereas the calculation of mult_cost does. --- 1468,1474 ---- Note that we return, rather than break so that rtx_cost doesn't include CONST_COSTS otherwise expand_mult will think that it is ! cheaper to synthesize a multiply rather than to use a multiply instruction. I think this is because the algorithm synth_mult doesn't take into account the loading of the operands, whereas the calculation of mult_cost does. *************** if (REG_P (OP1) && ! REG_P (OP0)) \ *** 1680,1688 **** #define DATA_SECTION_ASM_OP "\t.data" ! #define USE_CONST_SECTION 1 ! ! #define CONST_SECTION_ASM_OP "\t.sect\t\".const\"" /* Do not use .init section so __main will be called on startup. This will call __do_global_ctors and prepare for __do_global_dtors on exit. */ --- 1599,1605 ---- #define DATA_SECTION_ASM_OP "\t.data" ! #define READONLY_DATA_SECTION_ASM_OP "\t.sect\t\".const\"" /* Do not use .init section so __main will be called on startup. This will call __do_global_ctors and prepare for __do_global_dtors on exit. */ *************** if (REG_P (OP1) && ! REG_P (OP0)) \ *** 1694,1704 **** #define FINI_SECTION_ASM_OP "\t.sect\t\".fini\"" #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION --- 1611,1620 ---- #define FINI_SECTION_ASM_OP "\t.sect\t\".fini\"" #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION *************** fini_section () \ *** 1725,1779 **** } \ } - #define READONLY_DATA_SECTION() const_section () - - #define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - if (! USE_CONST_SECTION) \ - text_section(); \ - else if (in_section != in_const) \ - { \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ - in_section = in_const; \ - } \ - } - #define ASM_STABS_OP "\t.stabs\t" /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION c4x_asm_named_section - /* A C statement or statements to switch to the appropriate - section for output of DECL. DECL is either a `VAR_DECL' node - or a constant of some sort. RELOC indicates whether forming - the initial value of DECL requires link-time relocations. */ - - #define SELECT_SECTION(DECL, RELOC, ALIGN) \ - { \ - if (TREE_CODE (DECL) == STRING_CST) \ - { \ - if (! flag_writable_strings) \ - const_section (); \ - else \ - data_section (); \ - } \ - else if (TREE_CODE (DECL) == VAR_DECL) \ - { \ - if ((0 && RELOC) /* Should be (flag_pic && RELOC). */ \ - || ! TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ - || ! DECL_INITIAL (DECL) \ - || (DECL_INITIAL (DECL) != error_mark_node \ - && ! TREE_CONSTANT (DECL_INITIAL (DECL)))) \ - data_section (); \ - else \ - const_section (); \ - } \ - else \ - const_section (); \ - } - /* The TI assembler wants to have hex numbers this way. */ #undef HOST_WIDE_INT_PRINT_HEX --- 1641,1651 ---- *************** const_section () \ *** 1789,1803 **** # endif #endif /* ! HOST_WIDE_INT_PRINT_HEX */ - /* A C statement or statements to switch to the appropriate - section for output of RTX in mode MODE. RTX is some kind - of constant in RTL. The argument MODE is redundant except - in the case of a `const_int' rtx. Currently, these always - go into the const section. */ - - #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) const_section() - - /* Overall Framework of an Assembler File. */ /* We need to have a data section we can identify so that we can set the DP register back to a data pointer in the small memory model. --- 1661,1666 ---- *************** const_section () \ *** 1810,1815 **** --- 1673,1679 ---- if (TARGET_C30) dspversion = 30; \ if (TARGET_C31) dspversion = 31; \ if (TARGET_C32) dspversion = 32; \ + if (TARGET_C33) dspversion = 33; \ if (TARGET_C40) dspversion = 40; \ if (TARGET_C44) dspversion = 44; \ fprintf (FILE, "\t.version\t%d\n", dspversion); \ *************** const_section () \ *** 1839,1854 **** #define NO_DOT_IN_LABEL /* Only required for TI format. */ ! #define ASM_OUTPUT_LABEL(FILE, NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0); ! ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do { \ ! fprintf (FILE, "\t.global\t"); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE); \ ! c4x_global_label (NAME); \ ! } while (0); #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ c4x_external_ref (NAME) --- 1703,1710 ---- #define NO_DOT_IN_LABEL /* Only required for TI format. */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global\t" #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ c4x_external_ref (NAME) *************** c4x_file_end (FILE) *** 1871,1877 **** PREFIX is the class of label and NUM is the number within the class. */ #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \ ! asm_fprintf (FILE, "%s%d:\n", PREFIX, NUM) /* This is how to store into the string LABEL the symbol_ref name of an internal numbered label where --- 1727,1733 ---- PREFIX is the class of label and NUM is the number within the class. */ #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \ ! fprintf (FILE, "%s%d:\n", PREFIX, NUM) /* This is how to store into the string LABEL the symbol_ref name of an internal numbered label where *************** do { \ *** 1928,1944 **** #define DOUBLE_TYPE_SIZE 32 #define LONG_DOUBLE_TYPE_SIZE 64 /* Actually only 40. */ - /* Allow #sccs in preprocessor. */ - - #define SCCS_DIRECTIVE - /* Output #ident as a .ident. */ #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf (FILE, "\t.ident \"%s\"\n", NAME); - #define CPP_PREDEFINES "" - /* Output of Uninitialized Variables. */ /* This says how to output an assembler line to define a local --- 1784,1794 ---- *************** do { \ *** 2041,2047 **** to avoid conflict with TI's use of .def). */ #define SDB_DELIM "\n" ! #define SDB_DEBUGGING_INFO /* Don't use octal since this can confuse gas for the c4x. */ #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\t.type\t0x%x%s", a, SDB_DELIM) --- 1891,1897 ---- to avoid conflict with TI's use of .def). */ #define SDB_DELIM "\n" ! #define SDB_DEBUGGING_INFO 1 /* Don't use octal since this can confuse gas for the c4x. */ #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\t.type\t0x%x%s", a, SDB_DELIM) *************** do { fprintf (asm_out_file, "\t.sdef\t") *** 2137,2163 **** { \ if (TARGET_C3X) \ { \ ! asm_fprintf (FILE, "\tldiu\t0,ar1\n"); \ ! asm_fprintf (FILE, "\tlsh\t16,ar1\n"); \ ! asm_fprintf (FILE, "\tor\t0,ar1\n"); \ ! asm_fprintf (FILE, "\tldiu\t0,ar0\n"); \ ! asm_fprintf (FILE, "\tbud\tar1\n"); \ ! asm_fprintf (FILE, "\tlsh\t16,ar0\n"); \ ! asm_fprintf (FILE, "\tor\t0,ar0\n"); \ ! asm_fprintf (FILE, "\tor\t1000h,st\n"); \ } \ else \ { \ ! asm_fprintf (FILE, "\tlaj\t$+4\n"); \ ! asm_fprintf (FILE, "\taddi3\t4,r11,ar0\n"); \ ! asm_fprintf (FILE, "\tlda\t*ar0,ar1\n"); \ ! asm_fprintf (FILE, "\tlda\t*+ar0(1),ar0\n"); \ ! asm_fprintf (FILE, "\tbud\tar1\n"); \ ! asm_fprintf (FILE, "\tnop\n"); \ ! asm_fprintf (FILE, "\tnop\n"); \ ! asm_fprintf (FILE, "\tor\t1000h,st\n"); \ ! asm_fprintf (FILE, "\t.word\t0\n"); \ ! asm_fprintf (FILE, "\t.word\t0\n"); \ } \ } --- 1987,2013 ---- { \ if (TARGET_C3X) \ { \ ! fprintf (FILE, "\tldiu\t0,ar1\n"); \ ! fprintf (FILE, "\tlsh\t16,ar1\n"); \ ! fprintf (FILE, "\tor\t0,ar1\n"); \ ! fprintf (FILE, "\tldiu\t0,ar0\n"); \ ! fprintf (FILE, "\tbud\tar1\n"); \ ! fprintf (FILE, "\tlsh\t16,ar0\n"); \ ! fprintf (FILE, "\tor\t0,ar0\n"); \ ! fprintf (FILE, "\tor\t1000h,st\n"); \ } \ else \ { \ ! fprintf (FILE, "\tlaj\t$+4\n"); \ ! fprintf (FILE, "\taddi3\t4,r11,ar0\n"); \ ! fprintf (FILE, "\tlda\t*ar0,ar1\n"); \ ! fprintf (FILE, "\tlda\t*+ar0(1),ar0\n"); \ ! fprintf (FILE, "\tbud\tar1\n"); \ ! fprintf (FILE, "\tnop\n"); \ ! fprintf (FILE, "\tnop\n"); \ ! fprintf (FILE, "\tor\t1000h,st\n"); \ ! fprintf (FILE, "\t.word\t0\n"); \ ! fprintf (FILE, "\t.word\t0\n"); \ } \ } *************** do { fprintf (asm_out_file, "\t.sdef\t") *** 2220,2232 **** #define BSS_SECTION_ASM_OP "\t.bss" #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \ ! asm_fprintf (FILE, "\tpush\t%s\n", reg_names[REGNO]) /* This is how to output an insn to pop a register from the stack. It need not be very fast code. */ #define ASM_OUTPUT_REG_POP(FILE, REGNO) \ ! asm_fprintf (FILE, "\tpop\t%s\n", reg_names[REGNO]) /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits is done just by pretending it is already truncated. */ --- 2070,2082 ---- #define BSS_SECTION_ASM_OP "\t.bss" #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \ ! fprintf (FILE, "\tpush\t%s\n", reg_names[REGNO]) /* This is how to output an insn to pop a register from the stack. It need not be very fast code. */ #define ASM_OUTPUT_REG_POP(FILE, REGNO) \ ! fprintf (FILE, "\tpop\t%s\n", reg_names[REGNO]) /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits is done just by pretending it is already truncated. */ *************** if (final_sequence != NULL_RTX) \ *** 2294,2299 **** --- 2144,2151 ---- {"src_hi_operand", {SUBREG, REG, MEM, CONST_DOUBLE}}, \ {"lsrc_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE}}, \ {"tsrc_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE}}, \ + {"nonimmediate_src_operand", {SUBREG, REG, MEM}}, \ + {"nonimmediate_lsrc_operand", {SUBREG, REG, MEM}}, \ {"any_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE}}, \ {"par_ind_operand", {MEM}}, \ {"parallel_operand", {SUBREG, REG, MEM}}, \ diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/c4x.md gcc-3.3/gcc/config/c4x/c4x.md *** gcc-3.2.3/gcc/config/c4x/c4x.md 2002-02-21 21:11:06.000000000 +0000 --- gcc-3.3/gcc/config/c4x/c4x.md 2002-09-15 18:24:05.000000000 +0000 *************** *** 29,35 **** ; for QImode and Pmode, whether Pmode was QImode or PQImode. ; For addresses we wouldn't have to have a clobber of the CC ; associated with each insn and we could use MPYI in address ! ; calculations without having to synthesise a proper 32 bit multiply. ; Additional C30/C40 instructions not coded: ; CALLcond, IACK, IDLE, LDE, LDFI, LDII, LDM, NORM, RETIcond --- 29,35 ---- ; for QImode and Pmode, whether Pmode was QImode or PQImode. ; For addresses we wouldn't have to have a clobber of the CC ; associated with each insn and we could use MPYI in address ! ; calculations without having to synthesize a proper 32 bit multiply. ; Additional C30/C40 instructions not coded: ; CALLcond, IACK, IDLE, LDE, LDFI, LDII, LDM, NORM, RETIcond *************** *** 1360,1366 **** ; If one of the operands is not a register, then we should ; emit two insns, using a scratch register. This will produce ; better code in loops if the source operand is invariant, since ! ; the source reload can be optimised out. During reload we cannot ; use change_address or force_reg which will allocate new pseudo regs. ; Unlike most other insns, the move insns can't be split with --- 1360,1366 ---- ; If one of the operands is not a register, then we should ; emit two insns, using a scratch register. This will produce ; better code in loops if the source operand is invariant, since ! ; the source reload can be optimized out. During reload we cannot ; use change_address or force_reg which will allocate new pseudo regs. ; Unlike most other insns, the move insns can't be split with *************** *** 2076,2082 **** { if (GET_CODE (operands[2]) == CONST_INT) { ! /* Let GCC try to synthesise the multiplication using shifts and adds. In most cases this will be more profitable than using the C3x MPYI. */ FAIL; --- 2076,2082 ---- { if (GET_CODE (operands[2]) == CONST_INT) { ! /* Let GCC try to synthesize the multiplication using shifts and adds. In most cases this will be more profitable than using the C3x MPYI. */ FAIL; *************** *** 2354,2361 **** (truncate:QI (lshiftrt:HI (mult:HI ! (zero_extend:HI (match_operand:QI 1 "src_operand" "")) ! (zero_extend:HI (match_operand:QI 2 "lsrc_operand" ""))) (const_int 32)))) (clobber (reg:CC_NOOV 21))])] "" --- 2354,2363 ---- (truncate:QI (lshiftrt:HI (mult:HI ! (zero_extend:HI (match_operand:QI 1 ! "nonimmediate_src_operand" "")) ! (zero_extend:HI (match_operand:QI 2 ! "nonimmediate_lsrc_operand" ""))) (const_int 32)))) (clobber (reg:CC_NOOV 21))])] "" *************** *** 2372,2379 **** (truncate:QI (lshiftrt:HI (mult:HI ! (zero_extend:HI (match_operand:QI 1 "src_operand" "%0,rR,rS<>,0,rR,rS<>")) ! (zero_extend:HI (match_operand:QI 2 "lsrc_operand" "rLm,JR,rS<>,rLm,JR,rS<>"))) (const_int 32)))) (clobber (reg:CC_NOOV 21))] "! TARGET_C3X && valid_operands (MULT, operands, QImode)" --- 2374,2383 ---- (truncate:QI (lshiftrt:HI (mult:HI ! (zero_extend:HI (match_operand:QI 1 ! "nonimmediate_src_operand" "%0,rR,rS<>,0,rR,rS<>")) ! (zero_extend:HI (match_operand:QI 2 ! "nonimmediate_lsrc_operand" "rm,R,rS<>,rm,R,rS<>"))) (const_int 32)))) (clobber (reg:CC_NOOV 21))] "! TARGET_C3X && valid_operands (MULT, operands, QImode)" *************** *** 2392,2399 **** (truncate:QI (lshiftrt:HI (mult:HI ! (zero_extend:HI (match_operand:QI 1 "src_operand" "0,rR,rS<>")) ! (zero_extend:HI (match_operand:QI 2 "lsrc_operand" "rLm,JR,rS<>"))) (const_int 32))))] "! TARGET_C3X && valid_operands (MULT, operands, QImode)" "@ --- 2396,2405 ---- (truncate:QI (lshiftrt:HI (mult:HI ! (zero_extend:HI (match_operand:QI 1 ! "nonimmediate_src_operand" "0,rR,rS<>")) ! (zero_extend:HI (match_operand:QI 2 ! "nonimmediate_lsrc_operand" "rm,R,rS<>"))) (const_int 32))))] "! TARGET_C3X && valid_operands (MULT, operands, QImode)" "@ *************** *** 3404,3410 **** ; If one of the operands is not a register, then we should ; emit two insns, using a scratch register. This will produce ; better code in loops if the source operand is invariant, since ! ; the source reload can be optimised out. During reload we cannot ; use change_address or force_reg. (define_expand "movqf" [(set (match_operand:QF 0 "src_operand" "") --- 3410,3416 ---- ; If one of the operands is not a register, then we should ; emit two insns, using a scratch register. This will produce ; better code in loops if the source operand is invariant, since ! ; the source reload can be optimized out. During reload we cannot ; use change_address or force_reg. (define_expand "movqf" [(set (match_operand:QF 0 "src_operand" "") *************** *** 3708,3715 **** operands[4] = gen_reg_rtx (QFmode); operands[5] = gen_reg_rtx (QFmode); operands[6] = gen_reg_rtx (QFmode); ! emit_move_insn (operands[5], ! immed_real_const_1 (REAL_VALUE_ATOF (\"4294967296.0\", QFmode), QFmode));") (define_expand "floatunsqihf2" [(set (match_dup 2) (match_dup 3)) --- 3714,3720 ---- operands[4] = gen_reg_rtx (QFmode); operands[5] = gen_reg_rtx (QFmode); operands[6] = gen_reg_rtx (QFmode); ! emit_move_insn (operands[5], CONST_DOUBLE_ATOF (\"4294967296.0\", QFmode));") (define_expand "floatunsqihf2" [(set (match_dup 2) (match_dup 3)) *************** *** 3731,3738 **** operands[4] = gen_reg_rtx (HFmode); operands[5] = gen_reg_rtx (HFmode); operands[6] = gen_reg_rtx (HFmode); ! emit_move_insn (operands[5], ! immed_real_const_1 (REAL_VALUE_ATOF (\"4294967296.0\", HFmode), HFmode));") (define_insn "floatqihf2" [(set (match_operand:HF 0 "reg_operand" "=h") --- 3736,3742 ---- operands[4] = gen_reg_rtx (HFmode); operands[5] = gen_reg_rtx (HFmode); operands[6] = gen_reg_rtx (HFmode); ! emit_move_insn (operands[5], CONST_DOUBLE_ATOF (\"4294967296.0\", HFmode));") (define_insn "floatqihf2" [(set (match_operand:HF 0 "reg_operand" "=h") *************** *** 3871,3878 **** operands[3] = gen_reg_rtx (QFmode); operands[4] = gen_reg_rtx (QImode); operands[5] = gen_reg_rtx (QFmode); ! emit_move_insn (operands[5], ! immed_real_const_1 (REAL_VALUE_ATOF (\"4294967296.0\", QFmode), QFmode));") (define_expand "fixuns_trunchfqi2" [(parallel [(set (match_dup 2) --- 3875,3881 ---- operands[3] = gen_reg_rtx (QFmode); operands[4] = gen_reg_rtx (QImode); operands[5] = gen_reg_rtx (QFmode); ! emit_move_insn (operands[5], CONST_DOUBLE_ATOF (\"4294967296.0\", QFmode));") (define_expand "fixuns_trunchfqi2" [(parallel [(set (match_dup 2) *************** *** 3894,3901 **** operands[3] = gen_reg_rtx (HFmode); operands[4] = gen_reg_rtx (QImode); operands[5] = gen_reg_rtx (HFmode); ! emit_move_insn (operands[5], ! immed_real_const_1 (REAL_VALUE_ATOF (\"4294967296.0\", HFmode), HFmode));") (define_expand "fixuns_truncqfhi2" [(parallel [(set (match_operand:HI 0 "reg_operand" "") --- 3897,3903 ---- operands[3] = gen_reg_rtx (HFmode); operands[4] = gen_reg_rtx (QImode); operands[5] = gen_reg_rtx (HFmode); ! emit_move_insn (operands[5], CONST_DOUBLE_ATOF (\"4294967296.0\", HFmode));") (define_expand "fixuns_truncqfhi2" [(parallel [(set (match_operand:HI 0 "reg_operand" "") *************** *** 3975,3984 **** operands[2] = gen_reg_rtx (QFmode); operands[3] = gen_reg_rtx (QFmode); operands[4] = gen_reg_rtx (QFmode); ! operands[5] = immed_real_const_1 (REAL_VALUE_ATOF (\"0.5\", QFmode), ! QFmode); ! operands[6] = immed_real_const_1 (REAL_VALUE_ATOF (\"1.5\", QFmode), ! QFmode);") (define_expand "sqrtqf2" [(parallel [(set (match_operand:QF 0 "reg_operand" "") --- 3977,3984 ---- operands[2] = gen_reg_rtx (QFmode); operands[3] = gen_reg_rtx (QFmode); operands[4] = gen_reg_rtx (QFmode); ! operands[5] = CONST_DOUBLE_ATOF (\"0.5\", QFmode); ! operands[6] = CONST_DOUBLE_ATOF (\"1.5\", QFmode);") (define_expand "sqrtqf2" [(parallel [(set (match_operand:QF 0 "reg_operand" "") *************** *** 5317,5323 **** ; Note we have to emit a dbu instruction if there are no delay slots ; to fill. ; Also note that GCC will try to reverse a loop to see if it can ! ; utilise this instruction. However, if there are more than one ; memory reference in the loop, it cannot guarantee that reversing ; the loop will work :( (see check_dbra_loop() in loop.c) ; Note that the C3x only decrements the 24 LSBs of the address register --- 5317,5323 ---- ; Note we have to emit a dbu instruction if there are no delay slots ; to fill. ; Also note that GCC will try to reverse a loop to see if it can ! ; utilize this instruction. However, if there are more than one ; memory reference in the loop, it cannot guarantee that reversing ; the loop will work :( (see check_dbra_loop() in loop.c) ; Note that the C3x only decrements the 24 LSBs of the address register *************** *** 5629,5635 **** ; The current low overhead looping code is naff and is not failsafe ; If you want RTPB instructions to be generated, apply the patches ! ; from www.elec.canterbury.ac.nz/c4x. This will utilise the ; doloop_begin and doloop_end patterns in this MD. (define_expand "decrement_and_branch_on_count" [(parallel [(set (pc) --- 5629,5635 ---- ; The current low overhead looping code is naff and is not failsafe ; If you want RTPB instructions to be generated, apply the patches ! ; from www.elec.canterbury.ac.nz/c4x. This will utilize the ; doloop_begin and doloop_end patterns in this MD. (define_expand "decrement_and_branch_on_count" [(parallel [(set (pc) *************** *** 6191,6198 **** operands[2] = gen_reg_rtx (HFmode); operands[3] = gen_reg_rtx (HFmode); operands[4] = gen_reg_rtx (HFmode); ! operands[5] = immed_real_const_1 (REAL_VALUE_ATOF (\"0.5\", HFmode), HFmode); ! operands[6] = immed_real_const_1 (REAL_VALUE_ATOF (\"1.5\", HFmode), HFmode); ") --- 6191,6198 ---- operands[2] = gen_reg_rtx (HFmode); operands[3] = gen_reg_rtx (HFmode); operands[4] = gen_reg_rtx (HFmode); ! operands[5] = CONST_DOUBLE_ATOF (\"0.5\", HFmode); ! operands[6] = CONST_DOUBLE_ATOF (\"1.5\", HFmode); ") *************** *** 6450,6456 **** (define_insn "zero_extendqihi2" [(set (match_operand:HI 0 "reg_operand" "=?dc") ! (zero_extend:HI (match_operand:QI 1 "src_operand" "rIm"))) (clobber (reg:CC 21))] "" "#" --- 6450,6456 ---- (define_insn "zero_extendqihi2" [(set (match_operand:HI 0 "reg_operand" "=?dc") ! (zero_extend:HI (match_operand:QI 1 "nonimmediate_src_operand" "rm"))) (clobber (reg:CC 21))] "" "#" *************** *** 6460,6466 **** ; the first set. (define_split [(set (match_operand:HI 0 "reg_operand" "") ! (zero_extend:HI (match_operand:QI 1 "src_operand" ""))) (clobber (reg:CC 21))] "reload_completed" [(set (match_dup 2) (match_dup 1)) --- 6460,6466 ---- ; the first set. (define_split [(set (match_operand:HI 0 "reg_operand" "") ! (zero_extend:HI (match_operand:QI 1 "nonimmediate_src_operand" ""))) (clobber (reg:CC 21))] "reload_completed" [(set (match_dup 2) (match_dup 1)) *************** *** 7315,7321 **** ; The following two peepholes remove an unecessary load ; often found at the end of a function. These peepholes ! ; could be generalised to other binary operators. They shouldn't ; be required if we run a post reload mop-up pass. (define_peephole [(parallel [(set (match_operand:QF 0 "ext_reg_operand" "") --- 7315,7321 ---- ; The following two peepholes remove an unecessary load ; often found at the end of a function. These peepholes ! ; could be generalized to other binary operators. They shouldn't ; be required if we run a post reload mop-up pass. (define_peephole [(parallel [(set (match_operand:QF 0 "ext_reg_operand" "") diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/c4x-modes.def gcc-3.3/gcc/config/c4x/c4x-modes.def *** gcc-3.2.3/gcc/config/c4x/c4x-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/c4x/c4x-modes.def 2002-06-10 22:35:46.000000000 +0000 *************** *** 0 **** --- 1,102 ---- + /* Definitions of target machine for GNU compiler. TMS320C[34]x + Copyright (C) 2002 Free Software Foundation, Inc. + + Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) + and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + + On the C4x, we have a "no-overflow" mode which is used when an ADD, + SUB, NEG, or MPY insn is used to set the condition code. This is + to prevent the combiner from optimising away a following CMP of the + result with zero when a signed conditional branch or load insn + follows. + + The problem is a subtle one and deals with the manner in which the + negative condition (N) flag is used on the C4x. This flag does not + reflect the status of the actual result but of the ideal result had + no overflow occurred (when considering signed operands). + + For example, 0x7fffffff + 1 => 0x80000000 Z=0 V=1 N=0 C=0. Here + the flags reflect the untruncated result, not the actual result. + While the actual result is less than zero, the N flag is not set + since the ideal result of the addition without truncation would + have been positive. + + Note that the while the N flag is handled differently to most other + architectures, the use of it is self consistent and is not the + cause of the problem. + + Logical operations set the N flag to the MSB of the result so if + the result is negative, N is 1. However, integer and floating + point operations set the N flag to be the MSB of the result + exclusive ored with the overflow (V) flag. Thus if an overflow + occurs and the result does not have the MSB set (i.e., the result + looks like a positive number), the N flag is set. Conversely, if + an overflow occurs and the MSB of the result is set, N is set to 0. + Thus the N flag represents the sign of the result if it could have + been stored without overflow but does not represent the apparent + sign of the result. Note that most architectures set the N flag to + be the MSB of the result. + + The C4x approach to setting the N flag simplifies signed + conditional branches and loads which only have to test the state of + the N flag, whereas most architectures have to look at both the N + and V flags. The disadvantage is that there is no flag giving the + status of the sign bit of the operation. However, there are no + conditional load or branch instructions that make use of this + feature (e.g., BMI---branch minus) instruction. Note that BN and + BLT are identical in the C4x. + + To handle the problem where the N flag is set differently whenever + there is an overflow we use a different CC mode, CC_NOOVmode which + says that the CC reflects the comparison of the result against zero + if no overflow occurred. + + For example, + + [(set (reg:CC_NOOV 21) + (compare:CC_NOOV (minus:QI (match_operand:QI 1 "src_operand" "") + (match_operand:QI 2 "src_operand" "")) + (const_int 0))) + (set (match_operand:QI 0 "ext_reg_operand" "") + (minus:QI (match_dup 1) + (match_dup 2)))] + + Note that there is no problem for insns that don't return a result + like CMP, since the CC reflects the effect of operation. + + An example of a potential problem is when GCC + converts (LTU (MINUS (0x80000000) (0x7fffffff) (0x80000000))) + to (LEU (MINUS (0x80000000) (0x7fffffff) (0x7fffffff))) + to (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) + + Now (MINUS (0x80000000) (0x7fffffff)) returns 0x00000001 but the + C4x sets the N flag since the result without overflow would have + been 0xffffffff when treating the operands as signed integers. + Thus (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) sets the N + flag but (GE (0x00000001)) does not set the N flag. + + The upshot is that we can not use signed branch and conditional + load instructions after an add, subtract, neg, abs or multiply. + We must emit a compare insn to check the result against 0. */ + + CC (CC_NOOV) + diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/c4x-protos.h gcc-3.3/gcc/config/c4x/c4x-protos.h *** gcc-3.2.3/gcc/config/c4x/c4x-protos.h 2001-12-23 04:59:10.000000000 +0000 --- gcc-3.3/gcc/config/c4x/c4x-protos.h 2002-07-16 02:16:35.000000000 +0000 *************** extern struct rtx_def *c4x_function_arg *** 53,68 **** enum machine_mode, tree, int)); - extern void c4x_encode_section_info PARAMS ((tree)); - #endif /* TREE_CODE */ #if defined(RTX_CODE) && defined(TREE_CODE) extern void c4x_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *c, tree, rtx)); - extern void c4x_va_start PARAMS ((int, tree, rtx)); - extern struct rtx_def *c4x_va_arg PARAMS ((tree, tree)); extern rtx c4x_expand_builtin PARAMS ((tree, rtx, rtx, --- 53,64 ---- *************** extern int lsrc_operand PARAMS ((rtx, en *** 157,162 **** --- 153,162 ---- extern int tsrc_operand PARAMS ((rtx, enum machine_mode)); + extern int nonimmediate_src_operand PARAMS ((rtx, enum machine_mode)); + + extern int nonimmediate_lsrc_operand PARAMS ((rtx, enum machine_mode)); + extern int addr_reg_operand PARAMS ((rtx, enum machine_mode)); extern int index_reg_operand PARAMS ((rtx, enum machine_mode)); *************** extern int valid_parallel_operands_5 PAR *** 270,288 **** extern int valid_parallel_operands_6 PARAMS ((rtx *, enum machine_mode)); ! extern rtx smulhi3_libfunc; ! extern rtx umulhi3_libfunc; ! extern rtx fix_truncqfhi2_libfunc; ! extern rtx fixuns_truncqfhi2_libfunc; ! extern rtx fix_trunchfhi2_libfunc; ! extern rtx fixuns_trunchfhi2_libfunc; ! extern rtx floathiqf2_libfunc; ! extern rtx floatunshiqf2_libfunc; ! extern rtx floathihf2_libfunc; ! extern rtx floatunshihf2_libfunc; ! extern struct rtx_def *c4x_compare_op0; /* Operand 0 for comparisons. */ ! extern struct rtx_def *c4x_compare_op1; /* Operand 1 for comparisons. */ #endif /* RTX_CODE */ --- 270,288 ---- extern int valid_parallel_operands_6 PARAMS ((rtx *, enum machine_mode)); ! extern GTY(()) rtx smulhi3_libfunc; ! extern GTY(()) rtx umulhi3_libfunc; ! extern GTY(()) rtx fix_truncqfhi2_libfunc; ! extern GTY(()) rtx fixuns_truncqfhi2_libfunc; ! extern GTY(()) rtx fix_trunchfhi2_libfunc; ! extern GTY(()) rtx fixuns_trunchfhi2_libfunc; ! extern GTY(()) rtx floathiqf2_libfunc; ! extern GTY(()) rtx floatunshiqf2_libfunc; ! extern GTY(()) rtx floathihf2_libfunc; ! extern GTY(()) rtx floatunshihf2_libfunc; ! extern GTY(()) rtx c4x_compare_op0; /* Operand 0 for comparisons. */ ! extern GTY(()) rtx c4x_compare_op1; /* Operand 1 for comparisons. */ #endif /* RTX_CODE */ *************** extern void c4x_pr_FUNC_NEVER_RETURNS PA *** 301,307 **** extern void c4x_pr_INTERRUPT PARAMS ((cpp_reader *)); extern void c4x_pr_ignored PARAMS ((cpp_reader *)); extern void c4x_init_pragma PARAMS ((int (*) (tree *))); - extern tree code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree; #endif #endif /* ! GCC_C4X_PROTOS_H */ --- 301,312 ---- extern void c4x_pr_INTERRUPT PARAMS ((cpp_reader *)); extern void c4x_pr_ignored PARAMS ((cpp_reader *)); extern void c4x_init_pragma PARAMS ((int (*) (tree *))); #endif + extern GTY(()) tree code_tree; + extern GTY(()) tree data_tree; + extern GTY(()) tree pure_tree; + extern GTY(()) tree noreturn_tree; + extern GTY(()) tree interrupt_tree; + #endif /* ! GCC_C4X_PROTOS_H */ diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/libgcc.S gcc-3.3/gcc/config/c4x/libgcc.S *** gcc-3.2.3/gcc/config/c4x/libgcc.S 2001-12-09 20:13:07.000000000 +0000 --- gcc-3.3/gcc/config/c4x/libgcc.S 2002-09-15 18:24:05.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 48,54 **** ; ; r[i + 1] = r[i] * (2.0 - v * r[i]) ; ! ; The normalised error e[i] at the ith iteration is ; ; e[i] = (r - r[i]) / r = (1 / v - r[i]) * v = (1 - v * r[i]) ; --- 48,54 ---- ; ; r[i + 1] = r[i] * (2.0 - v * r[i]) ; ! ; The normalized error e[i] at the ith iteration is ; ; e[i] = (r - r[i]) / r = (1 / v - r[i]) * v = (1 - v * r[i]) ; diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/rtems.h gcc-3.3/gcc/config/c4x/rtems.h *** gcc-3.2.3/gcc/config/c4x/rtems.h 2002-04-12 13:09:24.000000000 +0000 --- gcc-3.3/gcc/config/c4x/rtems.h 2002-06-01 23:27:50.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 21,25 **** /* Specify predefined symbols in preprocessor. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems -D__USE_INIT_FINI__" --- 21,29 ---- /* Specify predefined symbols in preprocessor. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__rtems__"); \ ! builtin_define ("__USE_INIT_FINI__"); \ ! builtin_assert ("system=rtems"); \ ! } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/c4x/t-c4x gcc-3.3/gcc/config/c4x/t-c4x *** gcc-3.2.3/gcc/config/c4x/t-c4x 2001-10-17 20:39:12.000000000 +0000 --- gcc-3.3/gcc/config/c4x/t-c4x 2003-03-22 12:52:12.000000000 +0000 *************** LIB1ASMFUNCS = _divsf3 _divsi3 _udivsi3 *** 7,19 **** TARGET_LIBGCC2_CFLAGS = -Dexit=unused_exit ! c4x-c.o: $(srcdir)/config/c4x/c4x-c.c $(srcdir)/config/c4x/c4x-protos.h \ ! $(CONFIG_H) $(SYSTEM_H) cpplib.h $(TREE_H) c-pragma.h c-lex.h toplev.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< MULTILIB_OPTIONS = m30 msmall mmemparm MULTILIB_DIRNAMES = c3x small mem ! MULTILIB_MATCHES = m30=mcpu?30 m30=mcpu?31 m30=mcpu?32 m30=m31 m30=m32 MULTILIB_EXCEPTIONS = MULTILIB_EXTRA_OPTS = LIBGCC = stmp-multilib --- 7,19 ---- TARGET_LIBGCC2_CFLAGS = -Dexit=unused_exit ! c4x-c.o: $(srcdir)/config/c4x/c4x-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \ ! $(TREE_H) c-pragma.h toplev.h $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< MULTILIB_OPTIONS = m30 msmall mmemparm MULTILIB_DIRNAMES = c3x small mem ! MULTILIB_MATCHES = m30=mcpu?30 m30=mcpu?31 m30=mcpu?32 m30=mcpu?33 m30=m31 m30=m32 m30=m33 MULTILIB_EXCEPTIONS = MULTILIB_EXTRA_OPTS = LIBGCC = stmp-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/chorus.h gcc-3.3/gcc/config/chorus.h *** gcc-3.2.3/gcc/config/chorus.h 2001-07-17 21:53:11.000000000 +0000 --- gcc-3.3/gcc/config/chorus.h 2002-08-29 21:40:08.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,26 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef DWARF2_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG --- 19,25 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define DWARF2_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG diff -Nrc3pad gcc-3.2.3/gcc/config/clipper/clipper.c gcc-3.3/gcc/config/clipper/clipper.c *** gcc-3.2.3/gcc/config/clipper/clipper.c 2001-12-17 15:05:27.000000000 +0000 --- gcc-3.3/gcc/config/clipper/clipper.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,692 **** - /* Subroutines for insn-output.c for Clipper - Copyright (C) 1987, 1988, 1991, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "config.h" - #include "system.h" - #include "rtl.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "real.h" - #include "insn-config.h" - #include "conditions.h" - #include "output.h" - #include "insn-attr.h" - #include "tree.h" - #include "expr.h" - #include "optabs.h" - #include "libfuncs.h" - #include "c-tree.h" - #include "function.h" - #include "flags.h" - #include "recog.h" - #include "tm_p.h" - #include "target.h" - #include "target-def.h" - - static void clipper_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - static void clipper_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); - static void clix_asm_out_constructor PARAMS ((rtx, int)); - static void clix_asm_out_destructor PARAMS ((rtx, int)); - - extern char regs_ever_live[]; - - extern int frame_pointer_needed; - - static int frame_size; - - /* Initialize the GCC target structure. */ - #undef TARGET_ASM_ALIGNED_HI_OP - #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" - - #undef TARGET_ASM_FUNCTION_PROLOGUE - #define TARGET_ASM_FUNCTION_PROLOGUE clipper_output_function_prologue - #undef TARGET_ASM_FUNCTION_EPILOGUE - #define TARGET_ASM_FUNCTION_EPILOGUE clipper_output_function_epilogue - - struct gcc_target targetm = TARGET_INITIALIZER; - - /* Compute size of a clipper stack frame where 'lsize' is the required - space for local variables. */ - - int - clipper_frame_size (lsize) - int lsize; - { - int i, size; /* total size of frame */ - int save_size; - save_size = 0; /* compute size for reg saves */ - - for (i = 16; i < 32; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - save_size += 8; - - for (i = 0; i < 16; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - save_size += 4; - - size = lsize + save_size; - - size = (size + 7) & ~7; /* align to 64 Bit */ - return size; - } - - /* Prologue and epilogue output - Function is entered with pc pushed, i.e. stack is 32 bit aligned - - current_function_args_size == 0 means that the current function's args - are passed totally in registers i.e fp is not used as ap. - If frame_size is also 0 the current function does not push anything and - can run with misaligned stack -> subq $4,sp / add $4,sp on entry and exit - can be omitted. */ - - static void - clipper_output_function_prologue (file, lsize) - FILE *file; - HOST_WIDE_INT lsize; /* size for locals */ - { - int i, offset; - int size; - - frame_size = size = clipper_frame_size (lsize); - - if (frame_pointer_needed) - { - fputs ("\tpushw fp,sp\n", file); - fputs ("\tmovw sp,fp\n", file); - } - else if (size != 0 || current_function_args_size != 0) - { - size += 4; /* keep stack aligned */ - frame_size = size; /* must push data or access args */ - } - - if (size) - { - if (size < 16) - fprintf (file, "\tsubq $%d,sp\n", size); - else - fprintf (file, "\tsubi $%d,sp\n", size); - - /* register save slots are relative to sp, because we have small positive - displacements and this works whether we have a frame pointer or not */ - - offset = 0; - for (i = 16; i < 32; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - { - if (offset == 0) - fprintf (file, "\tstord f%d,(sp)\n", i-16); - else - fprintf (file, "\tstord f%d,%d(sp)\n", i-16, offset); - offset += 8; - } - - for (i = 0; i < 16; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - { - if (offset == 0) - fprintf (file, "\tstorw r%d,(sp)\n", i); - else - fprintf (file, "\tstorw r%d,%d(sp)\n", i, offset); - offset += 4; - } - } - } - - static void - clipper_output_function_epilogue (file, size) - FILE *file; - HOST_WIDE_INT size ATTRIBUTE_UNUSED; - { - int i, offset; - - if (frame_pointer_needed) - { - offset = -frame_size; - - for (i = 16; i < 32; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - { - fprintf (file, "\tloadd %d(fp),f%d\n", offset, i-16); - offset += 8; - } - - for (i = 0; i < 16; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - { - fprintf (file, "\tloadw %d(fp),r%d\n", offset, i); - offset += 4; - } - - fputs ("\tmovw fp,sp\n\tpopw sp,fp\n\tret sp\n", - file); - } - - else /* no frame pointer */ - { - offset = 0; - - for (i = 16; i < 32; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - { - if (offset == 0) - fprintf (file, "\tloadd (sp),f%d\n", i-16); - else - fprintf (file, "\tloadd %d(sp),f%d\n", offset, i-16); - offset += 8; - } - - for (i = 0; i < 16; i++) - if (regs_ever_live[i] && !call_used_regs[i]) - { - if (offset == 0) - fprintf (file, "\tloadw (sp),r%d\n", i); - else - fprintf (file, "\tloadw %d(sp),r%d\n", offset, i); - offset += 4; - } - - if (frame_size > 0) - { - if (frame_size < 16) - fprintf (file, "\taddq $%d,sp\n", frame_size); - else - fprintf (file, "\taddi $%d,sp\n", frame_size); - } - - fputs ("\tret sp\n", file); - } - } - - /* - * blockmove - * - * clipper_movstr () - */ - void - clipper_movstr (operands) - rtx *operands; - { - rtx dst,src,cnt,tmp,top,bottom=NULL_RTX,xops[3]; - int align; - int fixed; - - extern FILE *asm_out_file; - - dst = operands[0]; - src = operands[1]; - /* don't change this operands[2]; gcc 2.3.3 doesn't honor clobber note */ - align = INTVAL (operands[3]); - tmp = operands[4]; - cnt = operands[5]; - - if (GET_CODE (operands[2]) == CONST_INT) /* fixed size move */ - { - if ((fixed = INTVAL (operands[2])) <= 0) - abort (); - - if (fixed <16) - output_asm_insn ("loadq %2,%5", operands); - else - output_asm_insn ("loadi %2,%5", operands); - } - else - { - fixed = 0; - bottom = (rtx)gen_label_rtx (); /* need a bottom label */ - xops[0] = cnt; xops[1] = bottom; - output_asm_insn ("movw %2,%5", operands); /* count is scratch reg 5 */ - output_asm_insn ("brle %l1", xops); - } - - - top = (rtx)gen_label_rtx (); /* top of loop label */ - ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (top)); - - - xops[0] = src; xops[1] = tmp; xops[2] = dst; - - if (fixed && (align & 0x3) == 0) /* word aligned move with known size */ - { - if (fixed >= 4) - { - rtx xops1[2]; - output_asm_insn( - "loadw %a0,%1\n\taddq $4,%0\n\tstorw %1,%a2\n\taddq $4,%2", - xops); - - xops1[0] = cnt; xops1[1] = top; - output_asm_insn ("subq $4,%0\n\tbrgt %l1", xops1); - } - - if (fixed & 0x2) - { - output_asm_insn ("loadh %a0,%1\n\tstorh %1,%a2", xops); - if (fixed & 0x1) - output_asm_insn ("loadb 2%a0,%1\n\tstorb %1,2%a2", xops); - } - else - if (fixed & 0x1) - output_asm_insn ("loadb %a0,%1\n\tstorb %1,%a2", xops); - } - else - { - output_asm_insn( - "loadb %a0,%1\n\taddq $1,%0\n\tstorb %1,%a2\n\taddq $1,%2", - xops); - - xops[0] = cnt; xops[1] = top; - output_asm_insn ("subq $1,%0\n\tbrgt %l1", xops); - } - - if (fixed == 0) - ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (bottom)); - } - - - void - print_operand_address (file, addr) - FILE *file; - register rtx addr; - { - rtx op0,op1; - - switch (GET_CODE (addr)) - { - case REG: - fprintf (file, "(%s)", reg_names[REGNO (addr)]); - break; - - case PLUS: - /* can be 'symbol + reg' or 'reg + reg' */ - - op0 = XEXP (addr, 0); - op1 = XEXP (addr, 1); - - if (GET_CODE (op0) == REG && GET_CODE (op1) == REG) - { - fprintf (file, "[%s](%s)", - reg_names[REGNO (op0)], reg_names[REGNO (op1)]); - break; - } - - if (GET_CODE (op0) == REG && CONSTANT_ADDRESS_P (op1)) - { - output_addr_const (file, op1); - fprintf (file, "(%s)", reg_names[REGNO (op0)]); - break; - } - - if (GET_CODE (op1) == REG && CONSTANT_ADDRESS_P (op0)) - { - output_addr_const (file, op0); - fprintf (file, "(%s)", reg_names[REGNO (op1)]); - break; - } - abort (); /* Oh no */ - - default: - output_addr_const (file, addr); - } - } - - - const char * - rev_cond_name (op) - rtx op; - { - switch (GET_CODE (op)) - { - case EQ: - return "ne"; - case NE: - return "eq"; - case LT: - return "ge"; - case LE: - return "gt"; - case GT: - return "le"; - case GE: - return "lt"; - case LTU: - return "geu"; - case LEU: - return "gtu"; - case GTU: - return "leu"; - case GEU: - return "ltu"; - - default: - abort (); - } - } - - - /* Dump the argument register to the stack; return the location - of the block. */ - - struct rtx_def * - clipper_builtin_saveregs () - { - rtx block, addr, r0_addr, r1_addr, f0_addr, f1_addr, mem; - int set = get_varargs_alias_set (); - - /* Allocate the save area for r0,r1,f0,f1 */ - - block = assign_stack_local (BLKmode, 6 * UNITS_PER_WORD, 2 * BITS_PER_WORD); - - RTX_UNCHANGING_P (block) = 1; - RTX_UNCHANGING_P (XEXP (block, 0)) = 1; - - addr = XEXP (block, 0); - - r0_addr = addr; - r1_addr = plus_constant (addr, 4); - f0_addr = plus_constant (addr, 8); - f1_addr = plus_constant (addr, 16); - - /* Store int regs */ - - mem = gen_rtx_MEM (SImode, r0_addr); - set_mem_alias_set (mem, set); - emit_move_insn (mem, gen_rtx_REG (SImode, 0)); - - mem = gen_rtx_MEM (SImode, r1_addr); - set_mem_alias_set (mem, set); - emit_move_insn (mem, gen_rtx_REG (SImode, 1)); - - /* Store float regs */ - - mem = gen_rtx_MEM (DFmode, f0_addr); - set_mem_alias_set (mem, set); - emit_move_insn (mem, gen_rtx_REG (DFmode, 16)); - - mem = gen_rtx_MEM (DFmode, f1_addr); - set_mem_alias_set (mem, set); - emit_move_insn (mem, gen_rtx_REG (DFmode, 17)); - - return addr; - } - - tree - clipper_build_va_list () - { - tree record, ap, reg, num; - - /* - struct - { - int __va_ap; // pointer to stack args - void *__va_reg[4]; // pointer to r0,f0,r1,f1 - int __va_num; // number of args processed - }; - */ - - record = make_node (RECORD_TYPE); - - num = build_decl (FIELD_DECL, get_identifier ("__va_num"), - integer_type_node); - DECL_FIELD_CONTEXT (num) = record; - - reg = build_decl (FIELD_DECL, get_identifier ("__va_reg"), - build_array_type (ptr_type_node, - build_index_type (build_int_2 (3, 0)))); - DECL_FIELD_CONTEXT (reg) = record; - TREE_CHAIN (reg) = num; - - ap = build_decl (FIELD_DECL, get_identifier ("__va_ap"), - integer_type_node); - DECL_FIELD_CONTEXT (ap) = record; - TREE_CHAIN (ap) = reg; - - TYPE_FIELDS (record) = ap; - layout_type (record); - - return record; - } - - void - clipper_va_start (stdarg_p, valist, nextarg) - int stdarg_p; - tree valist; - rtx nextarg ATTRIBUTE_UNUSED; - { - tree ap_field, reg_field, num_field; - tree t, u, save_area; - - ap_field = TYPE_FIELDS (TREE_TYPE (valist)); - reg_field = TREE_CHAIN (ap_field); - num_field = TREE_CHAIN (reg_field); - - ap_field = build (COMPONENT_REF, TREE_TYPE (ap_field), valist, ap_field); - reg_field = build (COMPONENT_REF, TREE_TYPE (reg_field), valist, reg_field); - num_field = build (COMPONENT_REF, TREE_TYPE (num_field), valist, num_field); - - /* Call __builtin_saveregs to save r0, r1, f0, and f1 in a block. */ - - save_area = make_tree (integer_type_node, expand_builtin_saveregs ()); - - /* Set __va_ap. */ - - t = make_tree (ptr_type_node, virtual_incoming_args_rtx); - if (stdarg_p && current_function_args_info.size != 0) - t = build (PLUS_EXPR, ptr_type_node, t, - build_int_2 (current_function_args_info.size, 0)); - t = build (MODIFY_EXPR, TREE_TYPE (ap_field), ap_field, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - /* Set the four entries of __va_reg. */ - - t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (0, 0)); - t = build (MODIFY_EXPR, ptr_type_node, u, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - t = fold (build (PLUS_EXPR, integer_type_node, save_area, - build_int_2 (8, 0))); - t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (1, 0)); - t = build (MODIFY_EXPR, ptr_type_node, u, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - t = fold (build (PLUS_EXPR, integer_type_node, save_area, - build_int_2 (4, 0))); - t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (2, 0)); - t = build (MODIFY_EXPR, ptr_type_node, u, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - t = fold (build (PLUS_EXPR, integer_type_node, save_area, - build_int_2 (16, 0))); - t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (3, 0)); - t = build (MODIFY_EXPR, ptr_type_node, u, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - /* Set __va_num. */ - - t = build_int_2 (current_function_args_info.num, 0); - t = build (MODIFY_EXPR, TREE_TYPE (num_field), num_field, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - } - - rtx - clipper_va_arg (valist, type) - tree valist, type; - { - tree ap_field, reg_field, num_field; - tree addr, t; - HOST_WIDE_INT align; - rtx addr_rtx, over_label = NULL_RTX, tr; - - /* - Integers: - - if (VA.__va_num < 2) - addr = VA.__va_reg[2 * VA.__va_num]; - else - addr = round(VA.__va_ap), VA.__va_ap = round(VA.__va_ap) + sizeof(TYPE); - VA.__va_num++; - - Floats: - - if (VA.__va_num < 2) - addr = VA.__va_reg[2 * VA.__va_num + 1]; - else - addr = round(VA.__va_ap), VA.__va_ap = round(VA.__va_ap) + sizeof(TYPE); - VA.__va_num++; - - Aggregates: - - addr = round(VA.__va_ap), VA.__va_ap = round(VA.__va_ap) + sizeof(TYPE); - VA.__va_num++; - */ - - ap_field = TYPE_FIELDS (TREE_TYPE (valist)); - reg_field = TREE_CHAIN (ap_field); - num_field = TREE_CHAIN (reg_field); - - ap_field = build (COMPONENT_REF, TREE_TYPE (ap_field), valist, ap_field); - reg_field = build (COMPONENT_REF, TREE_TYPE (reg_field), valist, reg_field); - num_field = build (COMPONENT_REF, TREE_TYPE (num_field), valist, num_field); - - addr_rtx = gen_reg_rtx (Pmode); - - if (! AGGREGATE_TYPE_P (type)) - { - tree inreg; - rtx false_label; - - over_label = gen_label_rtx (); - false_label = gen_label_rtx (); - - emit_cmp_and_jump_insns (expand_expr (num_field, NULL_RTX, 0, - OPTAB_LIB_WIDEN), - GEN_INT (2), GE, const0_rtx, - TYPE_MODE (TREE_TYPE (num_field)), - TREE_UNSIGNED (num_field), false_label); - - inreg = fold (build (MULT_EXPR, integer_type_node, num_field, - build_int_2 (2, 0))); - if (FLOAT_TYPE_P (type)) - inreg = fold (build (PLUS_EXPR, integer_type_node, inreg, - build_int_2 (1, 0))); - inreg = fold (build (ARRAY_REF, ptr_type_node, reg_field, inreg)); - - tr = expand_expr (inreg, addr_rtx, VOIDmode, EXPAND_NORMAL); - if (tr != addr_rtx) - emit_move_insn (addr_rtx, tr); - - emit_jump_insn (gen_jump (over_label)); - emit_barrier (); - emit_label (false_label); - } - - /* Round to alignment of `type', or at least integer alignment. */ - - align = TYPE_ALIGN (type); - if (align < TYPE_ALIGN (integer_type_node)) - align = TYPE_ALIGN (integer_type_node); - align /= BITS_PER_UNIT; - - addr = fold (build (PLUS_EXPR, ptr_type_node, ap_field, - build_int_2 (align-1, 0))); - addr = fold (build (BIT_AND_EXPR, ptr_type_node, addr, - build_int_2 (-align, -1))); - addr = save_expr (addr); - - tr = expand_expr (addr, addr_rtx, Pmode, EXPAND_NORMAL); - if (tr != addr_rtx) - emit_move_insn (addr_rtx, tr); - - t = build (MODIFY_EXPR, TREE_TYPE (ap_field), ap_field, - build (PLUS_EXPR, TREE_TYPE (ap_field), - addr, build_int_2 (int_size_in_bytes (type), 0))); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - if (over_label) - emit_label (over_label); - - t = build (MODIFY_EXPR, TREE_TYPE (num_field), num_field, - build (PLUS_EXPR, TREE_TYPE (num_field), - num_field, build_int_2 (1, 0))); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - return addr_rtx; - } - - /* Return truth value of whether OP can be used as an word register - operand. Reject (SUBREG:SI (REG:SF )) */ - - int - int_reg_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) && - (GET_CODE (op) != SUBREG || - GET_MODE_CLASS (GET_MODE (SUBREG_REG (op))) == MODE_INT)); - } - - /* Return truth value of whether OP can be used as a float register - operand. Reject (SUBREG:SF (REG:SI )) )) */ - - int - fp_reg_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) && - (GET_CODE (op) != SUBREG || - GET_MODE_CLASS (GET_MODE (SUBREG_REG (op))) == MODE_FLOAT)); - } - - static void - clix_asm_out_constructor (symbol, priority) - rtx symbol; - int priority ATTRIBUTE_UNUSED; - { - init_section (); - fputs ("\tloada ", asm_out_file); - assemble_name (asm_out_file, XSTR (symbol, 0)); - fputs (",r0\n\tsubq $8,sp\n\tstorw r0,(sp)\n", asm_out_file); - } - - static void - clix_asm_out_destructor (symbol, priority) - rtx symbol; - int priority ATTRIBUTE_UNUSED; - { - fini_section (); - assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); - assemble_integer (const0_rtx, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/clipper/clipper.h gcc-3.3/gcc/config/clipper/clipper.h *** gcc-3.2.3/gcc/config/clipper/clipper.h 2002-05-21 23:44:54.000000000 +0000 --- gcc-3.3/gcc/config/clipper/clipper.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1050 **** - /* Definitions of target machine for GNU compiler. Clipper version. - Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Print subsidiary information on the compiler version in use. */ - - #define TARGET_VERSION fprintf (stderr, " (clipper)"); - - /* Run-time compilation parameters selecting different hardware subsets. */ - - extern int target_flags; - - /* Macros used in the machine description to test the flags. */ - - /* Macro to define tables used to set the flags. - This is a list in braces of pairs in braces, - each pair being { "NAME", VALUE } - where VALUE is the bits to set or minus the bits to clear. - An empty string NAME is used to identify the default VALUE. */ - - #define TARGET_SWITCHES \ - { { "c400", 1, N_("Generate code for the C400") }, \ - { "c300", -1, N_("Generate code for the C300") }, \ - { "", TARGET_DEFAULT, NULL} } - - #define TARGET_C400 1 - #define TARGET_C300 0 - - /* Default target_flags if no switches specified. */ - - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT TARGET_C300 - #endif - - /* Show that we can debug generated code without a frame pointer. */ - #define CAN_DEBUG_WITHOUT_FP - - /* Target machine storage layout */ - - /* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. */ - - #define BITS_BIG_ENDIAN 0 - - /* Define this if most significant byte of a word is the lowest numbered. */ - - #define BYTES_BIG_ENDIAN 0 - - /* Define this if most significant word of a multiword number is the lowest - numbered. */ - - #define WORDS_BIG_ENDIAN 0 - - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD 4 - - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - #define PARM_BOUNDARY 32 - - /* Largest alignment for stack parameters (if greater than PARM_BOUNDARY). */ - #define MAX_PARM_BOUNDARY 64 - - /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 128 - - /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 32 - - /* Every structure's size must be a multiple of this. */ - #define STRUCTURE_SIZE_BOUNDARY 8 - - /* A bitfield declared as `int' forces `int' alignment for the struct. */ - #define PCC_BITFIELD_TYPE_MATTERS 1 - - /* No data type wants to be aligned rounder than this. */ - #define BIGGEST_ALIGNMENT 64 - - /* No structure field wants to be aligned rounder than this. */ - #define BIGGEST_FIELD_ALIGNMENT 64 - - /* Make strcpy of constants fast. */ - #define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ - ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN)) - - /* Make arrays of chars word-aligned for the same reasons. */ - #define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ - && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) - - /* Set this nonzero if move instructions will actually fail to work - when given unaligned data. */ - #define STRICT_ALIGNMENT 1 - - /* Let's keep the stack somewhat aligned. */ - #define STACK_BOUNDARY 64 - - /* Define this macro if it is advisable to hold scalars in registers - in a wider mode than that declared by the program. In such cases, - the value is constrained to be within the bounds of the declared - type, but kept valid in the wider mode. The signedness of the - extension may differ from that of the type. - - For Clipper, we always store objects in a full register. */ - - #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ - { \ - (UNSIGNEDP) = 0; \ - (MODE) = SImode; \ - } - - - /* Define this if function arguments should also be promoted using the above - procedure. */ - - /* FIXME: do we loose compatibility to acc if we define this? */ - - /* #define PROMOTE_FUNCTION_ARGS */ - - /* Likewise, if the function return value is promoted. */ - - /* #define PROMOTE_FUNCTION_RETURN */ - - - /* Standard register usage. */ - - /* Number of actual hardware registers. - The hardware registers are assigned numbers for the compiler - from 0 to just below FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. */ - #define FIRST_PSEUDO_REGISTER 32 - - /* 1 for registers that have pervasive standard uses - and are not available for the register allocator. - On the clipper, these are the FP and SP . */ - #define FIXED_REGISTERS \ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,\ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1} /* Default: C300 */ - - /* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. */ - #define CALL_USED_REGISTERS \ - {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,\ - 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1} /* default: C300 */ - - /* Zero or more C statements that may conditionally modify two - variables `fixed_regs' and `call_used_regs' (both of type `char - []') after they have been initialized from the two preceding - macros. A C400 has additional floating registers f8 -> f15 */ - - #define CONDITIONAL_REGISTER_USAGE \ - if (target_flags & TARGET_C400) \ - { int i; \ - for (i = 24; i < 32; i++) fixed_regs[i] = call_used_regs[i] = 0; } - - /* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. - On the clipper, fp registers are 64 bits. */ - - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((REGNO) >= 16 ? 1 \ - : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) - - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. - On the clipper 0-15 may hold any mode but DImode and DFmode must be even. - Registers 16-31 hold SFmode and DFmode */ - - #define HARD_REGNO_MODE_OK(REGNO, MODE) \ - ((REGNO) < 16 \ - ? (((MODE) != DImode && (MODE) != DFmode) || ((REGNO) & 1) == 0) \ - : ((MODE) == SFmode || (MODE) == DFmode)) - - /* Value is 1 if it is a good idea to tie two pseudo registers - when one has mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. */ - #define MODES_TIEABLE_P(MODE1, MODE2) ((MODE1) == (MODE2)) - - /* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - - /* clipper has extra PC */ - /* #define PC_REGNUM */ - - /* Register to use for pushing function arguments. */ - #define STACK_POINTER_REGNUM 15 - - /* Base register for access to local variables of the function. */ - #define FRAME_POINTER_REGNUM 14 - - /* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. */ - #define FRAME_POINTER_REQUIRED \ - (! leaf_function_p ()) - - /* Base register for access to arguments of the function. */ - #define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM - - /* Register in which static-chain is passed to a function. */ - #define STATIC_CHAIN_REGNUM 2 - - /* Register in which address to store a structure value - is passed to a function. */ - #define STRUCT_VALUE_REGNUM 0 - - /* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. */ - - /* The clipper has general and FP regs. */ - - enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS, LIM_REG_CLASSES}; - - #define N_REG_CLASSES (int) LIM_REG_CLASSES - - /* Give names of register classes as strings for dump file. */ - - #define REG_CLASS_NAMES \ - {"NO_REGS", "GENERAL_REGS", "FLOAT_REGS", "ALL_REGS" } - - /* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. */ - - #define REG_CLASS_CONTENTS { {0}, {0x0000ffff}, {0xffff0000}, {0xffffffff} } - - /* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - - #define REGNO_REG_CLASS(REGNO) ((REGNO) >= 16 ? FLOAT_REGS : GENERAL_REGS) - - /* The class value for index registers, and the one for base regs. */ - - #define INDEX_REG_CLASS GENERAL_REGS - #define BASE_REG_CLASS GENERAL_REGS - - /* Get reg_class from a letter such as appears in the machine description. */ - - #define REG_CLASS_FROM_LETTER(C) \ - ((C) == 'r' ? GENERAL_REGS : ((C) == 'f' ? FLOAT_REGS: NO_REGS)) - - /* The letters I, J, K, L and M in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. */ - - #define CONST_OK_FOR_LETTER_P(VALUE, C) 0 - - /* Similar, but for floating constants, and defining letters G and H. - Here VALUE is the CONST_DOUBLE rtx itself. */ - - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 - - /* Optional extra constraints for this machine. */ - - /* #define EXTRA_CONSTRAINT(OP, C) */ - - - /* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. */ - - #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) - - /* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. */ - - #define CLASS_MAX_NREGS(CLASS, MODE) \ - ((CLASS) == FLOAT_REGS \ - ? 1 \ - : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Stack layout; function entry, exit and calling. */ - - /* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ - #define STACK_GROWS_DOWNWARD - - /* Define this if the nominal address of the stack frame - is at the high-address end of the local variables; - that is, each additional local variable allocated - goes at a more negative offset in the frame. */ - #define FRAME_GROWS_DOWNWARD - - /* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. */ - #define STARTING_FRAME_OFFSET 0 - - /* Given an rtx for the address of a frame, - return an rtx for the address of the word in the frame - that holds the dynamic chain--the previous frame's address. */ - #define DYNAMIC_CHAIN_ADDRESS(frame) (frame) - - /* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. */ - - /* #define PUSH_ROUNDING(BYTES) (BYTES) */ - - /* Keep the stack pointer constant throughout the function. */ - /* we can't set this for clipper as library calls may have 3 args and we pass - only 2 args in regs. */ - - /* #define ACCUMULATE_OUTGOING_ARGS 1*/ - - - /* Offset of first parameter from the argument pointer register value. - size of PC + FP */ - - #define FIRST_PARM_OFFSET(FNDECL) 8 - - /* Value is the number of bytes of arguments automatically - popped when returning from a subroutine call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - SIZE is the number of bytes of arguments passed on the stack. */ - - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 - - /* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), ((TYPE_MODE (VALTYPE) == SFmode ||\ - TYPE_MODE (VALTYPE) == DFmode) ? \ - 16 : 0)) - - /* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - - #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG ((MODE), ((MODE) == SFmode || (MODE) == DFmode ? 16 : 0)) - - - /* 1 if N is a possible register number for a function value - as seen by the caller. */ - - #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (N) == 16) - - /* 1 if N is a possible register number for function argument passing. */ - - #define FUNCTION_ARG_REGNO_P(N) \ - ((N) == 0 || (N) == 1 || (N) == 16 || (N) == 17) - - /* Define this if PCC uses the nonreentrant convention for returning - structure and union values. Old Green Hills C-Clipper returns static - structs but the newer Apogee compiler passes structs as hidden arg 0. - Structs etc are always passed in memory */ - - /* #define PCC_STATIC_STRUCT_RETURN */ - - - /* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - Clipper uses 2 register 'slots' that pass arguments in r0/r1 or f0/f1. - An argument that must be passed in memory (struct... ) leaves that slot - free. - We pass 'long long' only in registers when both slots are free. - Returned structs must be allocated by the caller, the address is passed - in r0. - - struct ss {..} - - fun (i,j,k) i in r0, j in r1, k on stack - fun (s,j,k) s on stack, j in r1, k on stack - fun (i,s,k) i in r0, s on stack, k on stack - s1 = fun (i,s,k) &s1 in r0, i in r1, s on stack, k on stack - - We must keep enough information for varargs/stdargs. - - _clipper_cum_args is a struct of 2 integers, with - num = slots used - size = size of all stack args = offset to next arg without alignment - - If we use stdarg.h, size points to the first unnamed arg, - see va-clipper.h */ - - struct _clipper_cum_args { int num; int size; }; - - #define CUMULATIVE_ARGS struct _clipper_cum_args - - /* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. - - clipper passes the address of a struct in r0, set num = 1 in this case */ - - #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ - ((CUM).num = ((FNTYPE) != 0 && aggregate_value_p (TREE_TYPE (FNTYPE))), \ - (CUM).size = 0) - - /* internal helper : size of an argument */ - - #define CLIPPER_ARG_SIZE(MODE, TYPE) \ - (((MODE) != BLKmode \ - ? (GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD \ - : (int_size_in_bytes (TYPE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) \ - * UNITS_PER_WORD) - - /* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be available.) */ - - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - do \ - { \ - int reg = 0; \ - \ - if ((CUM).num < 2 \ - && (GET_MODE_CLASS(MODE)==MODE_INT || GET_MODE_CLASS(MODE)==MODE_FLOAT) \ - && (GET_MODE_SIZE (MODE) <= 8) \ - && ((TYPE) == NULL || !AGGREGATE_TYPE_P(TYPE)) \ - && ((MODE) != DImode || (CUM).num == 0)) \ - { \ - reg = 1; \ - if ((MODE) == DImode) \ - (CUM).num = 1; \ - } \ - \ - (CUM).num++; \ - \ - if (! reg) \ - { \ - int align = FUNCTION_ARG_BOUNDARY (MODE, TYPE) / BITS_PER_UNIT; \ - (CUM).size += align - 1; \ - (CUM).size &= ~(align - 1); \ - (CUM).size += CLIPPER_ARG_SIZE (MODE, TYPE); \ - } \ - } while (0) - - /* Define where to put the arguments to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). - - 2 args may go into regs. These must be MODE_INT or MODE_FLOAT but only - if they really fit into ONE register. The exception is a DImode arg - that occupies both register slots. */ - - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - (((CUM).num < 2 \ - && (GET_MODE_CLASS(MODE)==MODE_INT || GET_MODE_CLASS(MODE)==MODE_FLOAT) \ - && (GET_MODE_SIZE (MODE) <= 8) \ - && ((TYPE) == NULL || !AGGREGATE_TYPE_P(TYPE)) \ - && ((MODE) != DImode || (CUM).num == 0)) \ - ? gen_rtx_REG ((MODE), \ - GET_MODE_CLASS(MODE) == MODE_FLOAT \ - ? (CUM).num+16 : (CUM).num) \ - : 0) - - /* If defined, a C expression that gives the alignment boundary, in bits, - of an argument with the specified mode and type. If it is not defined, - `PARM_BOUNDARY' is used for all arguments. */ - - #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ - (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_SIZE (MODE)) <= PARM_BOUNDARY \ - ? PARM_BOUNDARY : 2 * PARM_BOUNDARY) - - /* For an arg passed partly in registers and partly in memory, - this is the number of registers used. - For args passed entirely in registers or entirely in memory, zero. - Clipper never passed args partially in regs/mem. */ - - /* #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0 */ - - /* Generate necessary RTL for __builtin_saveregs(). - ARGLIST is the argument list; see expr.c. */ - - #define EXPAND_BUILTIN_SAVEREGS() clipper_builtin_saveregs () - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #define FUNCTION_PROFILER(FILE, LABELNO) /* FIXME */ - - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - - #define EXIT_IGNORE_STACK 1 - - /* Store in the variable DEPTH the initial difference between the - frame pointer reg contents and the stack pointer reg contents, - as of the start of the function body. This depends on the layout - of the fixed parts of the stack frame and on how registers are saved. */ - - #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \ - DEPTH = clipper_frame_size (get_frame_size ()) - - - /* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. */ - - #define TRAMPOLINE_TEMPLATE(FILE) \ - { \ - fputs ("\t.word 0x459F,0x0004\t# call sp,.+4\n", FILE); \ - fputs ("\tmovw (sp),r3\n", FILE); \ - fputs ("\taddq $4,sp\n", FILE); \ - fputs ("\tloadw 20(r3),r2\n", FILE); \ - fputs ("\tloadw 24(r3),r3\n", FILE); \ - fputs ("\tb (r3)\n", FILE); \ - fputs ("\t.long 0,0\n", FILE); \ - } - - /* Length in units of the trampoline for entering a nested function. */ - - #define TRAMPOLINE_SIZE 32 - - /* Alignment required for a trampoline. 128 is used to find the - beginning of a line in the instruction cache and to allow for - instruction cache lines of up to 128 bytes. */ - - #define TRAMPOLINE_ALIGNMENT 128 - - /* Section in which to place the trampoline. */ - - #define TRAMPOLINE_SECTION text_section - - /* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. */ - - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - { \ - emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 24)), CXT); \ - emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 28)), FNADDR); \ - } - - /* Addressing modes, and classification of registers for them. */ - - /* #define HAVE_POST_DECREMENT 0 */ - - /* #define HAVE_PRE_INCREMENT 0 */ - - /* Macros to check register numbers against specific register classes. */ - - /* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. */ - - #define REGNO_OK_FOR_INDEX_P(regno) \ - ((regno) < 16 || (unsigned)reg_renumber[regno] < 16) - #define REGNO_OK_FOR_BASE_P(regno) \ - ((regno) < 16 || (unsigned)reg_renumber[regno] < 16) - - /* Maximum number of registers that can appear in a valid memory address. */ - - #define MAX_REGS_PER_ADDRESS 2 - - /* 1 if X is an rtx for a constant that is a valid address. */ - - #define CONSTANT_ADDRESS_P(X) \ - (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ - || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ - || GET_CODE (X) == HIGH) - - /* Nonzero if the constant value X is a legitimate general operand. - It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ - - #define LEGITIMATE_CONSTANT_P(X) 1 - - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - - /* clipper doesn't have true indexing */ - - #ifndef REG_OK_STRICT - - /* Nonzero if X is a hard reg that can be used as an index - or if it is a pseudo reg. */ - - #define REG_OK_FOR_INDEX_P(X) \ - (REGNO (X) < 16 || REGNO(X) >= FIRST_PSEUDO_REGISTER) - - /* Nonzero if X is a hard reg that can be used as a base reg - or if it is a pseudo reg. */ - - #define REG_OK_FOR_BASE_P(X) \ - (REGNO (X) < 16 || REGNO(X) >= FIRST_PSEUDO_REGISTER) - - #else - - /* Nonzero if X is a hard reg that can be used as an index. */ - #define REG_OK_FOR_INDEX_P(X) (REGNO(X) < 16) - - /* Nonzero if X is a hard reg that can be used as a base reg. */ - #define REG_OK_FOR_BASE_P(X) (REGNO(X) < 16) - - #endif - - /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. - - The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, - except for CONSTANT_ADDRESS_P which is actually machine-independent. */ - - /* Non-zero if X is an address which can be indirected. */ - - #define INDIRECTABLE_CONSTANT_ADDRESS_P(X) 0 - - #define INDIRECTABLE_ADDRESS_P(X) \ - (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) - - /* Go to ADDR if X is a valid address not using indexing. - (This much is the easy part.) */ - - #define GO_IF_NONINDEXED_ADDRESS(X, ADDR) \ - { if (CONSTANT_ADDRESS_P (X)) goto ADDR; \ - if (INDIRECTABLE_ADDRESS_P (X)) goto ADDR; } - - #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ - { register rtx xfoo = (X); \ - GO_IF_NONINDEXED_ADDRESS (xfoo, ADDR); \ - if (GET_CODE (xfoo) == PLUS) \ - { register rtx xfoo0, xfoo1; \ - xfoo0 = XEXP (xfoo, 0); \ - xfoo1 = XEXP (xfoo, 1); \ - /* handle reg + reg -> [r1](r0) */ \ - if (INDIRECTABLE_ADDRESS_P (xfoo0) && INDIRECTABLE_ADDRESS_P (xfoo1)) \ - goto ADDR; \ - /* Handle (reg) -> xxx(r0) */ \ - if (INDIRECTABLE_ADDRESS_P (xfoo0) && CONSTANT_ADDRESS_P (xfoo1)) \ - goto ADDR; \ - if (INDIRECTABLE_ADDRESS_P (xfoo1) && CONSTANT_ADDRESS_P (xfoo0)) \ - goto ADDR; }} - - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. - - For the clipper, nothing needs to be done. */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {} - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {} - - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE SImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - Do not define this if the table should contain absolute addresses. */ - /* #define CASE_VECTOR_PC_RELATIVE 1 */ - - /* Define this if the case instruction drops through after the table - when the index is out of range. Don't define it if the case insn - jumps to the default label instead. */ - /* #define CASE_DROPS_THROUGH */ - - /* Define if operations between registers always perform the operation - on the full register even if a narrower mode is specified. */ - #define WORD_REGISTER_OPERATIONS - - /* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD - will either zero-extend or sign-extend. The value of this macro should - be the code that says which one of the two operations is implicitly - done, NIL if none. */ - #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND - - /* Define this as 1 if `char' should by default be signed; else as 0. */ - #define DEFAULT_SIGNED_CHAR 1 - - /* This flag, if defined, says the same insns that convert to a signed fixnum - also convert validly to an unsigned one. */ - #define FIXUNS_TRUNC_LIKE_FIX_TRUNC - - /* Max number of bytes we can move from memory to memory - in one reasonably fast instruction. */ - #define MOVE_MAX 4 - - /* If a memory-to-memory move would take MOVE_RATIO or more simple - move-instruction pairs, we will do a movstr or libcall instead. - - Make this large on clipper, since the block move is very - inefficient with small blocks, and the hard register needs of the - block move require much reload work. */ - - #define MOVE_RATIO 20 - - /* Nonzero if access to memory by bytes is slow and undesirable. */ - #define SLOW_BYTE_ACCESS 0 - - /* Define if shifts truncate the shift count - which implies one can omit a sign-extension or zero-extension - of a shift count. */ - /* #define SHIFT_COUNT_TRUNCATED */ - - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ - #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ - #define Pmode SImode - - /* A function address in a call instruction - is a byte address (for indexing purposes) - so give the MEM rtx a byte's mode. */ - #define FUNCTION_MODE QImode - - /* This machine uses IEEE floats. */ - - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - - /* Check a `double' value for validity for a particular machine mode. - This is defined to avoid crashes outputting certain constants. - Since we output the number in hex, the assembler won't choke on it. */ - /* #define CHECK_FLOAT_VALUE(MODE,VALUE) */ - - - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - - /* On a Clipper, constants from 0..15 are cheap because they can use the - 'quick' mode. */ - - #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST_INT: \ - if (0 <= INTVAL (RTX) && INTVAL(RTX) <= 15 ) return 0; \ - return 1; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 3; \ - case CONST_DOUBLE: \ - return 5; - - /* Provide the costs of a rtl expression. This is in the body of a - switch on CODE. */ - - #define RTX_COSTS(X,CODE,OUTER_CODE) \ - case MULT: \ - return COSTS_N_INSNS (4); \ - case DIV: \ - case UDIV: \ - case MOD: \ - case UMOD: \ - return COSTS_N_INSNS (40); \ - case ASHIFT: \ - case LSHIFTRT: \ - case ASHIFTRT: \ - return COSTS_N_INSNS (2); \ - case SIGN_EXTEND: \ - return (GET_CODE (XEXP (X,0)) == REG ? COSTS_N_INSNS (3) : 4); - - /* Specify the cost of a branch insn; roughly the number of extra insns that - should be added to avoid a branch */ - - /* #define BRANCH_COST 0 */ - - - /* Tell final.c how to eliminate redundant test instructions. */ - - /* Here we define machine-dependent flags and fields in cc_status - (see `conditions.h'). No extra ones are needed for the clipper. */ - - /* Store in cc_status the expressions - that the condition codes will describe - after execution of an instruction whose pattern is EXP. - Do not alter them if the instruction would not alter the cc's. */ - - #define NOTICE_UPDATE_CC(EXP, INSN) \ - { \ - enum attr_cc cc = get_attr_cc (INSN); \ - rtx dest = SET_DEST (EXP); \ - switch (cc) \ - { \ - case CC_CHANGE0: \ - if (GET_CODE (EXP) == PARALLEL) abort(); \ - if ((cc_status.value1 && rtx_equal_p (dest, cc_status.value1)) || \ - (cc_status.value2 && rtx_equal_p (dest, cc_status.value2))) \ - CC_STATUS_INIT; \ - break; \ - \ - case CC_SET1: \ - if (GET_CODE (EXP) == PARALLEL) abort(); \ - cc_status.flags = 0; \ - cc_status.value1 = dest; \ - cc_status.value2 = 0; \ - break; \ - \ - case CC_SET2: \ - if (GET_CODE (EXP) == PARALLEL) abort(); \ - cc_status.flags = 0; \ - cc_status.value1 = dest; \ - cc_status.value2 = SET_SRC (EXP); \ - break; \ - \ - case CC_UNCHANGED: \ - break; \ - \ - case CC_CLOBBER: \ - CC_STATUS_INIT; \ - break; \ - \ - default: \ - abort (); \ - } \ - } - - - /* Control the assembler format that we output. */ - - /* Output at beginning of assembler file. */ - - #define ASM_FILE_START(FILE) fprintf (FILE, "#NO_APP\n"); - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #define ASM_APP_ON "#APP\n" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #define ASM_APP_OFF "#NO_APP\n" - - /* Output before read-only data. */ - - #define TEXT_SECTION_ASM_OP "\t.text" - - /* Output before writable data. */ - - #define DATA_SECTION_ASM_OP "\t.data" - - /* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - - #define REGISTER_NAMES \ - {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \ - "r9", "r10", "r11", "r12", "r13", "fp", "sp", \ - "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", \ - "f9", "f10", "f11", "f12", "f13", "f14", "f15" } - - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - - /* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tsubq $8,sp\n\t%s %s,(sp)\n", \ - (REGNO) < 16 ? "storw" : "stord", reg_names[REGNO]) - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\t%s (sp),%s\n\taddq $8,sp\n", \ - (REGNO) < 16 ? "loadw" : "loadd", reg_names[REGNO]) - /* This is how to output an element of a case-vector that is absolute */ - - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.long .L%d\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. */ - - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL) - - /* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\t.space %u\n", (SIZE)) - - /* This says how to output an assembler line - to define a local common symbol. */ - /* ??? The use of .bss here seems odd. */ - - #define ASM_OUTPUT_ALIGNED_LOCAL(FILE,NAME,SIZE,ALIGN) \ - ( data_section (), \ - fputs ("\t.bss\t", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN)/BITS_PER_UNIT)) - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - - /* Print an instruction operand X on file FILE. - CODE is the code from the %-spec that requested printing this operand; - if `%z3' was used to print operand 3, then CODE is 'z'. - - Clipper operand formatting codes: - - letter print - C reverse branch condition - */ - - #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ - ((CODE) == 'C') - - #define PRINT_OPERAND(FILE, X, CODE) \ - { if (CODE == 'C') \ - fputs (rev_cond_name (X), FILE); \ - else if (GET_CODE (X) == REG) \ - fprintf (FILE, "%s", reg_names[REGNO (X)]); \ - else if (GET_CODE (X) == MEM) \ - output_address (XEXP (X, 0)); \ - else { putc ('$', FILE); output_addr_const (FILE, X); }} - - /* Print a memory operand whose address is X, on file FILE. - This uses a function in output-clipper.c. */ - - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - print_operand_address (FILE, ADDR) - - /* Define the codes that are matched by predicates in clipper.c */ - - #define PREDICATE_CODES \ - {"int_reg_operand", {SUBREG, REG}}, \ - {"fp_reg_operand", {SUBREG, REG}}, - - /* Define the `__builtin_va_list' type for the ABI. */ - #define BUILD_VA_LIST_TYPE(VALIST) \ - (VALIST) = clipper_build_va_list () - - /* Implement `va_start' for varargs and stdarg. */ - #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ - clipper_va_start (stdarg, valist, nextarg) - - /* Implement `va_arg'. */ - #define EXPAND_BUILTIN_VA_ARG(valist, type) \ - clipper_va_arg (valist, type) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/clipper/clipper.md gcc-3.3/gcc/config/clipper/clipper.md *** gcc-3.2.3/gcc/config/clipper/clipper.md 2001-11-04 02:12:08.000000000 +0000 --- gcc-3.3/gcc/config/clipper/clipper.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1421 **** - ;;- Machine description for GNU compiler, Clipper Version - ;; Copyright (C) 1987, 1988, 1991, 1993, 1994, 1997, 1998, 1999, 2001 - ;; Free Software Foundation, Inc. - ;; Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - - ;;- Instruction patterns. When multiple patterns apply, - ;;- the first one in the file is chosen. - ;;- - ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - ;;- - ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code - ;;- updates for most instructions. - - ;; - ;; define attributes - ;; - ;; instruction type - ;; - ;; unknown is temporary in order to generate 'cc clobber' until attribute - ;; assignment is consistent - ;; - (define_attr "type" "load,store,arith,fp,branch,unknown" - (const_string "unknown")) - - ;; condition code setting - ;; - ;; clobber destroyed - ;; unchanged - ;; set1 set cc_status.value1, e.g. sub r0,r1 - ;; set2 set value1 and value2, e.g. mov r0,r1 - ;; change0 may be side effect, i.e. load mem,r0 - ;; - ;; note: loadi and loadq are 'arith' instructions that set the condition codes - ;; mul,div,mod do NOT set the condition codes - ;; - (define_attr "cc" "clobber,unchanged,set1,set2,change0" - (cond [(eq_attr "type" "load") (const_string "change0") - (eq_attr "type" "store,branch") (const_string "unchanged") - (eq_attr "type" "arith") (if_then_else (match_operand:SI 0 "" "") - (const_string "set1") - (const_string "clobber")) - ] - (const_string "clobber"))) - - ;; - ;; clipper seems to be a traditional risc processor - ;; we define a functional unit 'memory' - ;; - (define_function_unit "memory" 1 1 (eq_attr "type" "load") 4 0) - - - ;; We don't want to allow a constant operand for test insns because - ;; (set (cc0) (const_int foo)) has no mode information. Such insns will - ;; be folded while optimizing anyway. - - (define_insn "tstsi" - [(set (cc0) - (match_operand:SI 0 "int_reg_operand" "r"))] - "" - "cmpq $0,%0") - - (define_insn "cmpsi" - [(set (cc0) - (compare (match_operand:SI 0 "nonimmediate_operand" "r,r,n") - (match_operand:SI 1 "nonmemory_operand" "r,n,r")))] - "" - "* - { - int val; - - if (which_alternative == 0) - return \"cmpw %1,%0\"; - - if (which_alternative == 1) - { - val = INTVAL (operands[1]); - if (0 <= val && val < 16) - return \"cmpq %1,%0\"; - return \"cmpi %1,%0\"; - } - - cc_status.flags |= CC_REVERSED; /* immediate must be first */ - - val = INTVAL (operands[0]); - - if (0 <= val && val < 16) - return \"cmpq %0,%1\"; - - return \"cmpi %0,%1\"; - }") - - (define_insn "cmpdf" - [(set (cc0) - (compare (match_operand:DF 0 "fp_reg_operand" "f") - (match_operand:DF 1 "fp_reg_operand" "f")))] - "" - "cmpd %1,%0") - - (define_insn "cmpsf" - [(set (cc0) - (compare (match_operand:SF 0 "fp_reg_operand" "f") - (match_operand:SF 1 "fp_reg_operand" "f")))] - "" - "cmps %1,%0") - - - ;; - ;; double and single float move - ;; - (define_expand "movdf" - [(set (match_operand:DF 0 "general_operand" "") - (match_operand:DF 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM) - { - if (GET_CODE (operands[1]) == CONST_DOUBLE) - operands[1] = force_reg (DFmode, - force_const_mem (DFmode, operands[1])); - else if (GET_CODE (operands[1]) != REG) - operands[1] = force_reg (DFmode, operands[1]); - } - - else if (GET_CODE (operands[1]) == CONST_DOUBLE) - operands[1] = force_const_mem (DFmode, operands[1]); - }") - - ;; - ;; provide two patterns with different predicates as we don't want combine - ;; to recombine a mem -> mem move - ;; - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=*rf") - (match_operand:DF 1 "nonimmediate_operand" "*rfo"))] - "" - "* - { - #define FP_REG_P(X) (GET_CODE (X) == REG && REGNO (X) >= 16) - - if (FP_REG_P (operands[0])) - { - if (FP_REG_P (operands[1])) /* f -> f */ - return \"movd %1,%0\"; - - if (GET_CODE (operands[1]) == REG) /* r -> f */ - return \"movld %1,%0\"; - - return \"loadd %1,%0\"; /* m -> f */ - } - - if (FP_REG_P (operands[1])) - { - if (GET_CODE (operands[0]) == REG) /* f -> r */ - return \"movdl %1,%0\"; - - abort (); - } - - if (GET_CODE (operands[1]) == MEM) /* m -> r */ - { - rtx xops[4]; - xops[0] = operands[0]; - xops[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - xops[2] = operands[1]; - xops[3] = adjust_address (operands[1], SImode, 4); - output_asm_insn (\"loadw %2,%0\;loadw %3,%1\", xops); - return \"\"; - } - - if (GET_CODE (operands[1]) == REG) /* r -> r */ - { - rtx xops[4]; - xops[0] = operands[0]; - xops[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - xops[2] = operands[1]; - xops[3] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - output_asm_insn (\"movw %2,%0\;movw %3,%1\", xops); - return \"\"; - } - - abort (); - #undef FP_REG_P - }") - - - (define_insn "" - [(set (match_operand:DF 0 "memory_operand" "=o,m") - (match_operand:DF 1 "register_operand" "*rf,f"))] - "" - "* - { - rtx xops[4]; - - if (REGNO (operands[1]) >= 16) /* f -> m */ - return \"stord %1,%0\"; - - xops[0] = operands[0]; /* r -> o */ - xops[1] = adjust_address (operands[0], SImode, 4); - xops[2] = operands[1]; - xops[3] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - output_asm_insn (\"storw %2,%0\;storw %3,%1\", xops); - return \"\"; - }" - [(set_attr "type" "store,store") - (set_attr "cc" "clobber,unchanged")]) - - - (define_expand "movsf" - [(set (match_operand:SF 0 "general_operand" "") - (match_operand:SF 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM) - { - if (GET_CODE (operands[1]) == CONST_DOUBLE) - operands[1] = force_reg (SFmode, - force_const_mem (SFmode, operands[1])); - else if (GET_CODE (operands[1]) != REG) - operands[1] = force_reg (SFmode, operands[1]); - } - - else if (GET_CODE (operands[1]) == CONST_DOUBLE) - operands[1] = force_const_mem (SFmode, operands[1]); - }") - - ;; - ;; provide two patterns with different predicates as we don't want combine - ;; to recombine a mem -> mem move - ;; - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=*rf") - (match_operand:SF 1 "nonimmediate_operand" "*rfm"))] - "" - "* - { - #define FP_REG_P(X) (GET_CODE (X) == REG && REGNO (X) >= 16) - - if (FP_REG_P (operands[0])) - { - if (FP_REG_P (operands[1])) /* f -> f */ - return \"movs %1,%0\"; - if (GET_CODE (operands[1]) == REG) /* r -> f */ - return - \"subq $8,sp\;storw %1,(sp)\;loads (sp),%0\;addq $8,sp\"; - return \"loads %1,%0\"; /* m -> f */ - } - - if (FP_REG_P (operands[1])) - { - if (GET_CODE (operands[0]) == REG) /* f -> r */ - return - \"subq $8,sp\;stors %1,(sp)\;loadw (sp),%0\;addq $8,sp\"; - abort (); - } - - if (GET_CODE (operands[1]) == MEM) /* m -> r */ - return \"loadw %1,%0\"; - - if (GET_CODE (operands[1]) == REG) /* r -> r */ - return \"movw %1,%0\"; - - abort (); - #undef FP_REG_P - }") - - (define_insn "" - [(set (match_operand:SF 0 "memory_operand" "=m") - (match_operand:SF 1 "register_operand" "*rf"))] - "" - "* - { - if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) >= 16) - return \"stors %1,%0\"; /* f-> m */ - - return \"storw %1,%0\"; /* r -> m */ - }" - [(set_attr "type" "store")]) - - - (define_expand "movdi" - [(set (match_operand:DI 0 "general_operand" "") - (match_operand:DI 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) != REG) - operands[1] = force_reg (DImode, operands[1]); - }") - - ;; If an operand is a MEM but not offsettable, we can't load it into - ;; a register, so we must force the third alternative to be the one - ;; reloaded. Hence we show the first as more expensive. - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=?r,r,r") - (match_operand:DI 1 "general_operand" "r,n,o"))] - "" - "* - { - rtx xoperands[2],yoperands[2]; - - xoperands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - - if (which_alternative == 0) /* r -> r */ - { - output_asm_insn (\"movw %1,%0\", operands); - xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - output_asm_insn (\"movw %1,%0\", xoperands); - return \"\"; - } - - if (which_alternative == 1) /* n -> r */ - { - if (GET_CODE (operands[1]) == CONST_INT) - { - output_asm_insn (\"loadi %1,%0\", operands); - output_asm_insn (\"loadq $0,%0\", xoperands); - return \"\"; - } - - if (GET_CODE (operands[1]) != CONST_DOUBLE) - abort (); - - yoperands[0] = operands[0]; - yoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); - output_asm_insn (\"loadi %1,%0\", yoperands); - - xoperands[1] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); - output_asm_insn (\"loadi %1,%0\", xoperands); - return \"\"; - } - /* m -> r */ - output_asm_insn (\"loadw %1,%0\", operands); - xoperands[1] = adjust_address (operands[1], SImode, 4); - output_asm_insn (\"loadw %1,%0\", xoperands); - return \"\"; - }" - [(set_attr "type" "arith,arith,load") - (set_attr "cc" "clobber,clobber,clobber")]) - - (define_insn "" - [(set (match_operand:DI 0 "memory_operand" "=o") - (match_operand:DI 1 "register_operand" "r"))] - "" - "* - { - rtx xops[4]; - xops[0] = operands[0]; - xops[1] = adjust_address (operands[0], SImode, 4); - xops[2] = operands[1]; - xops[3] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - output_asm_insn (\"storw %2,%0\;storw %3,%1\", xops); - return \"\"; - }" - [(set_attr "type" "store") - (set_attr "cc" "clobber")]) - - (define_expand "movsi" - [(set (match_operand:SI 0 "general_operand" "") - (match_operand:SI 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM && - GET_CODE (operands[1]) != REG) - operands[1] = force_reg (SImode, operands[1]); - }") - - ;; Reject both args with `general_operand' if not reloading because a - ;; mem -> mem move that was split by 'movsi' can be recombined to - ;; mem -> mem by the combiner. - ;; - ;; As a pseudo register can end up in a stack slot during reloading we must - ;; allow a r->m move for the next pattern. - ;; The first predicate must be `general_operand' because a predicate must - ;; be true for each constraint. - ;; - (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,r,m") - (match_operand:SI 1 "general_operand" "r,m,n,i,r"))] - "reload_in_progress || register_operand (operands[0], SImode)" - "* - { - int val; - - if (which_alternative == 0) - return \"movw %1,%0\"; /* reg -> reg */ - - if (which_alternative == 1) - return \"loadw %1,%0\"; /* mem -> reg */ - - if (which_alternative == 2) - { - val = INTVAL (operands[1]); /* known const ->reg */ - - if (val == -1) - return \"notq $0,%0\"; - - if (val < 0 || val >= 16) - return \"loadi %1,%0\"; - - return \"loadq %1,%0\"; - } - - if (which_alternative == 3) /* unknown const */ - return \"loada %a1,%0\"; - - return \"storw %1,%0\"; - }" - [(set_attr "type" "arith,load,arith,load,store") - (set_attr "cc" "set2,change0,set1,change0,unchanged")]) - - - (define_insn "" - [(set (match_operand:SI 0 "memory_operand" "=m") - (match_operand:SI 1 "int_reg_operand" "r"))] - "" - "storw %1,%0" - [(set_attr "type" "store")]) - - ;; movhi - ;; - ;; loadh mem to reg - ;; storh reg to mem - ;; - ;; - (define_expand "movhi" - [(set (match_operand:HI 0 "general_operand" "") - (match_operand:HI 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM - && ! register_operand (operands[1], HImode)) - operands[1] = force_reg (HImode, operands[1]); - }") - - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r,r,r") - (match_operand:HI 1 "general_operand" "r,m,n"))] - "" - "@ - movw %1,%0 - loadh %1,%0 - loadi %1,%0" - [(set_attr "type" "arith,load,arith")]) - - (define_insn "" - [(set (match_operand:HI 0 "memory_operand" "=m") - (match_operand:HI 1 "register_operand" "r"))] - "" - "storh %1,%0" - [(set_attr "type" "store")]) - - ;; movqi - ;; - ;; loadb mem to reg - ;; storb reg to mem - ;; - (define_expand "movqi" - [(set (match_operand:QI 0 "general_operand" "") - (match_operand:QI 1 "general_operand" ""))] - "" - " - { - if (GET_CODE (operands[0]) == MEM && - ! register_operand (operands[1], QImode)) - operands[1] = force_reg (QImode, operands[1]); - }") - - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r,r,r") - (match_operand:QI 1 "general_operand" "r,m,n"))] - "" - "@ - movw %1,%0 - loadb %1,%0 - loadi %1,%0" - [(set_attr "type" "arith,load,arith")]) - - (define_insn "" - [(set (match_operand:QI 0 "memory_operand" "=m") - (match_operand:QI 1 "register_operand" "r"))] - "" - "storb %1,%0" - [(set_attr "type" "store")]) - - - ;; - ;; block move - ;; - (define_expand "movstrsi" - [(parallel - [(set (match_operand:BLK 0 "memory_operand" "") - (match_operand:BLK 1 "memory_operand" "")) - (use (match_operand:SI 2 "general_operand" "")) - (use (match_operand:SI 3 "const_int_operand" "")) - (clobber (match_scratch:SI 4 "")) - (clobber (match_scratch:SI 5 "")) - (clobber (match_dup 6)) - (clobber (match_dup 7))])] - "" - " - { - rtx addr0, addr1; - - addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); - addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); - - operands[6] = addr0; - operands[7] = addr1; - - operands[0] = replace_equiv_address (operands[0], addr0); - operands[1] = replace_equiv_address (operands[1], addr1); - - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = force_reg (SImode, operands[2]); - }") - - ;; - ;; there is a problem with this insn in gcc-2.2.3 - ;; (clobber (match_dup 2)) does not prevent use of this operand later - ;; we always use a scratch register and leave operand 2 unchanged - ;; - (define_insn "" - [(set (mem:BLK (match_operand:SI 0 "register_operand" "r")) - (mem:BLK (match_operand:SI 1 "register_operand" "r"))) - (use (match_operand:SI 2 "nonmemory_operand" "rn")) - (use (match_operand:SI 3 "const_int_operand" "n")) - (clobber (match_scratch:SI 4 "=r")) - (clobber (match_scratch:SI 5 "=r")) - (clobber (match_dup 0)) - (clobber (match_dup 1))] - "" - "* - { - clipper_movstr (operands); - return \"\"; - }" - [(set_attr "cc" "clobber")]) - - - - ;; Extension and truncation insns. - (define_insn "extendhisi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (sign_extend:SI (match_operand:HI 1 "general_operand" "0,m")))] - "" - "@ - andi $65535,%0\;xori $32768,%0\;subi $32768,%0 - loadh %1,%0" - [(set_attr "type" "arith,load")]) - - - (define_insn "extendqihi2" - [(set (match_operand:HI 0 "int_reg_operand" "=r,r") - (sign_extend:HI (match_operand:QI 1 "general_operand" "0,m")))] - "" - "@ - andi $255,%0\;xori $128,%0\;subi $128,%0 - loadb %1,%0" - [(set_attr "type" "arith,load") - (set_attr "cc" "set1,change0")]) - - - (define_insn "extendqisi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (sign_extend:SI (match_operand:QI 1 "general_operand" "0,m")))] - "" - "@ - andi $255,%0\;xori $128,%0\;subi $128,%0 - loadb %1,%0" - [(set_attr "type" "arith,load")]) - - - (define_insn "extendsfdf2" - [(set (match_operand:DF 0 "fp_reg_operand" "=f") - (float_extend:DF (match_operand:SF 1 "fp_reg_operand" "f")))] - "" - "cnvsd %1,%0") - - (define_insn "truncdfsf2" - [(set (match_operand:SF 0 "fp_reg_operand" "=f") - (float_truncate:SF (match_operand:DF 1 "fp_reg_operand" "f")))] - "" - "cnvds %1,%0") - - (define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (zero_extend:SI (match_operand:HI 1 "general_operand" "0,m")))] - "" - "@ - andi $65535,%0 - loadhu %1,%0" - [(set_attr "type" "arith,load")]) - - - (define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "int_reg_operand" "=r,r") - (zero_extend:HI (match_operand:QI 1 "general_operand" "0,m")))] - "" - "@ - andi $255,%0 - loadbu %1,%0" - [(set_attr "type" "arith,load") - (set_attr "cc" "clobber,clobber")]) - - - (define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (zero_extend:SI (match_operand:QI 1 "general_operand" "0,m")))] - "" - "@ - andi $255,%0 - loadbu %1,%0" - [(set_attr "type" "arith,load")]) - - - - ;; Fix-to-float conversion insns. - - (define_insn "floatsisf2" - [(set (match_operand:SF 0 "fp_reg_operand" "=f") - (float:SF (match_operand:SI 1 "int_reg_operand" "r")))] - "" - "cnvws %1,%0") - - (define_insn "floatsidf2" - [(set (match_operand:DF 0 "fp_reg_operand" "=f") - (float:DF (match_operand:SI 1 "int_reg_operand" "r")))] - "" - "cnvwd %1,%0") - - - ;; Float-to-fix conversion insns. - - (define_insn "fix_truncsfsi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (fix:SI (fix:SF (match_operand:SF 1 "fp_reg_operand" "f"))))] - "" - "cnvtsw %1,%0") - - (define_insn "fix_truncdfsi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (fix:SI (fix:DF (match_operand:DF 1 "fp_reg_operand" "f"))))] - "" - "cnvtdw %1,%0") - - ;;- All kinds of add instructions. - - (define_insn "adddf3" - [(set (match_operand:DF 0 "fp_reg_operand" "=f") - (plus:DF (match_operand:DF 1 "fp_reg_operand" "0") - (match_operand:DF 2 "fp_reg_operand" "f")))] - "" - "addd %2,%0" - [(set_attr "type" "fp")]) - - - (define_insn "addsf3" - [(set (match_operand:SF 0 "fp_reg_operand" "=f") - (plus:SF (match_operand:SF 1 "fp_reg_operand" "0") - (match_operand:SF 2 "fp_reg_operand" "f")))] - "" - "adds %2,%0" - [(set_attr "type" "fp")]) - - (define_insn "adddi3" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (plus:DI (match_operand:DI 1 "int_reg_operand" "%0") - (match_operand:DI 2 "int_reg_operand" "r")))] - "" - "* - { - rtx xoperands[4]; - - xoperands[0] = operands[0]; - xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - xoperands[2] = operands[2]; - xoperands[3] = gen_rtx_REG (SImode, REGNO (operands[2]) + 1); - output_asm_insn (\"addw %2,%0\;addwc %3,%1\", xoperands); - return \"\"; - }" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - (define_insn "addsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r,r") - (plus:SI (match_operand:SI 1 "int_reg_operand" "%0,r,r") - (match_operand:SI 2 "nonmemory_operand" "rn,0,rn")))] - "" - "* - { - if (which_alternative == 2) /* 3 address version */ - { - if (GET_CODE (operands[2]) == CONST_INT) - return \"loada %a2(%1),%0\"; - return \"loada [%2](%1),%0\"; - } - /* 2 address version */ - if (GET_CODE (operands[2]) == CONST_INT) - { - int val = INTVAL (operands[2]); - - if (val >= 16 || val == 0x80000000) - return \"addi %2,%0\"; - - if (val < 0) /* change to sub */ - { - rtx xops[2]; - - val = -val; - - xops[0] = operands[0]; - xops[1] = GEN_INT (val); - - if (val >= 16) - output_asm_insn (\"subi %1,%0\", xops); - else - output_asm_insn (\"subq %1,%0\", xops); - - return \"\"; - } - - return \"addq %2,%0\"; - } - - if (which_alternative == 0) - return \"addw %2,%0\"; - - return \"addw %1,%0\"; - }" - [(set_attr "type" "arith,arith,arith") - (set_attr "cc" "set1,set1,change0")]) - - - ;;- All kinds of subtract instructions. - - (define_insn "subdi3" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (minus:DI (match_operand:DI 1 "int_reg_operand" "0") - (match_operand:DI 2 "int_reg_operand" "r")))] - "" - "* - { - rtx xoperands[4]; - - xoperands[0] = operands[0]; - xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - xoperands[2] = operands[2]; - xoperands[3] = gen_rtx_REG (SImode, REGNO (operands[2]) + 1); - output_asm_insn (\"subw %2,%0\;subwc %3,%1\", xoperands); - return \"\"; - }" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - (define_insn "subsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (minus:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "nonmemory_operand" "rn")))] - "" - "* - { - if (GET_CODE (operands[2]) == CONST_INT) - { - int val = INTVAL (operands[2]); - - if (val < 0 || val >= 16) - return \"subi %2,%0\"; - else - return \"subq %2,%0\"; - } - - return \"subw %2,%0\"; - }" - [(set_attr "type" "arith")]) - - (define_insn "subdf3" - [(set (match_operand:DF 0 "fp_reg_operand" "=f") - (minus:DF (match_operand:DF 1 "fp_reg_operand" "0") - (match_operand:DF 2 "fp_reg_operand" "f")))] - "" - "subd %2,%0" - [(set_attr "type" "fp")]) - - (define_insn "subsf3" - [(set (match_operand:SF 0 "fp_reg_operand" "=f") - (minus:SF (match_operand:SF 1 "fp_reg_operand" "0") - (match_operand:SF 2 "fp_reg_operand" "f")))] - "" - "subs %2,%0" - [(set_attr "type" "fp")]) - - - ;;- Multiply instructions. - - (define_insn "muldf3" - [(set (match_operand:DF 0 "fp_reg_operand" "=f") - (mult:DF (match_operand:DF 1 "fp_reg_operand" "0") - (match_operand:DF 2 "fp_reg_operand" "f")))] - "" - "muld %2,%0" - [(set_attr "type" "fp")]) - - (define_insn "mulsf3" - [(set (match_operand:SF 0 "fp_reg_operand" "=f") - (mult:SF (match_operand:SF 1 "fp_reg_operand" "0") - (match_operand:SF 2 "fp_reg_operand" "f")))] - "" - "muls %2,%0" - [(set_attr "type" "fp")]) - - (define_insn "mulsidi3" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (mult:DI (sign_extend:DI (match_operand:SI 1 "int_reg_operand" "%0")) - (sign_extend:DI (match_operand:SI 2 "int_reg_operand" "r"))))] - "" - "mulwx %2,%0" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - (define_insn "umulsidi3" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (mult:DI (zero_extend:DI (match_operand:SI 1 "int_reg_operand" "%0")) - (zero_extend:DI (match_operand:SI 2 "int_reg_operand" "r"))))] - "" - "mulwux %2,%0" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - (define_insn "mulsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (mult:SI (match_operand:SI 1 "int_reg_operand" "%0") - (match_operand:SI 2 "int_reg_operand" "r")))] - "" - "mulw %2,%0" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - - ;;- Divide and mod instructions. - - (define_insn "divdf3" - [(set (match_operand:DF 0 "fp_reg_operand" "=f") - (div:DF (match_operand:DF 1 "fp_reg_operand" "0") - (match_operand:DF 2 "fp_reg_operand" "f")))] - "" - "divd %2,%0" - [(set_attr "type" "fp")]) - - (define_insn "divsf3" - [(set (match_operand:SF 0 "fp_reg_operand" "=f") - (div:SF (match_operand:SF 1 "fp_reg_operand" "0") - (match_operand:SF 2 "fp_reg_operand" "f")))] - "" - "divs %2,%0" - [(set_attr "type" "fp")]) - - (define_insn "divsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (div:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "int_reg_operand" "r")))] - "" - "divw %2,%0" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - (define_insn "udivsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (udiv:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "int_reg_operand" "r")))] - "" - "divwu %2,%0" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - - (define_insn "modsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (mod:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "int_reg_operand" "r")))] - "" - "modw %2,%0" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - (define_insn "umodsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (umod:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "int_reg_operand" "r")))] - "" - "modwu %2,%0" - [(set_attr "type" "arith") - (set_attr "cc" "clobber")]) - - ;; - ;; bit and/or instructions - ;; - (define_insn "andsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (and:SI (match_operand:SI 1 "int_reg_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "" - "@ - andw %2,%0 - andi %2,%0" - [(set_attr "type" "arith")]) - - (define_insn "iorsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (ior:SI (match_operand:SI 1 "int_reg_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "" - "@ - orw %2,%0 - ori %2,%0" - [(set_attr "type" "arith")]) - - (define_insn "xorsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (xor:SI (match_operand:SI 1 "int_reg_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "" - "@ - xorw %2,%0 - xori %2,%0" - [(set_attr "type" "arith")]) - - (define_insn "negdf2" - [(set (match_operand:DF 0 "fp_reg_operand" "=f") - (neg:DF (match_operand:DF 1 "fp_reg_operand" "f")))] - "" - "negd %1,%0" - [(set_attr "type" "fp")]) - - (define_insn "negsf2" - [(set (match_operand:SF 0 "fp_reg_operand" "=f") - (neg:SF (match_operand:SF 1 "fp_reg_operand" "f")))] - "" - "negs %1,%0" - [(set_attr "type" "fp")]) - - (define_insn "negsi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (neg:SI (match_operand:SI 1 "int_reg_operand" "r")))] - "" - "negw %1,%0" - [(set_attr "type" "arith")]) - - - (define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (not:SI (match_operand:SI 1 "int_reg_operand" "r")))] - "" - "notw %1,%0" - [(set_attr "type" "arith")]) - - - - ;; Right shift on the clipper works by negating the shift count, - ;; then emitting a right shift with the shift count negated. This means - ;; that all actual shift counts in the RTL will be positive. - - (define_expand "ashrdi3" - [(set (match_operand:DI 0 "int_reg_operand" "") - (ashiftrt:DI (match_operand:DI 1 "int_reg_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (ashiftrt:DI (match_operand:DI 1 "int_reg_operand" "0") - (match_operand:SI 2 "const_int_operand" "n")))] - "" - "shali $%n2,%0" - [(set_attr "type" "arith")]) - - (define_insn "" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (ashiftrt:DI (match_operand:DI 1 "int_reg_operand" "0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "r"))))] - "" - "shal %2,%0" - [(set_attr "type" "arith")]) - - (define_expand "ashrsi3" - [(set (match_operand:SI 0 "int_reg_operand" "") - (ashiftrt:SI (match_operand:SI 1 "int_reg_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (ashiftrt:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "const_int_operand" "n")))] - "" - "shai $%n2,%0" - [(set_attr "type" "arith")]) - - (define_insn "" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (ashiftrt:SI (match_operand:SI 1 "int_reg_operand" "0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "r"))))] - "" - "shaw %2,%0" - [(set_attr "type" "arith")]) - - ;; - ;; left shift - ;; - - (define_insn "ashldi3" - [(set (match_operand:DI 0 "int_reg_operand" "=r,r") - (ashift:DI (match_operand:DI 1 "int_reg_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "" - "@ - shal %2,%0 - shali %2,%0" - [(set_attr "type" "arith")]) - - - (define_insn "ashlsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (ashift:SI (match_operand:SI 1 "int_reg_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "" - "* - { - int val; - - if (which_alternative == 0) - return \"shaw %2,%0\"; - - val = INTVAL (operands[2]); - - if (val == 2) - return \"addw %0,%0\;addw %0,%0\"; - - if (val == 1) - return \"addw %0,%0\"; - - return \"shai %2,%0\"; - }" - [(set_attr "type" "arith")]) - - ;; - ;; logical shift - ;; - - (define_expand "lshrdi3" - [(set (match_operand:DI 0 "int_reg_operand" "") - (lshiftrt:DI (match_operand:DI 1 "int_reg_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (lshiftrt:DI (match_operand:DI 1 "int_reg_operand" "0") - (match_operand:SI 2 "const_int_operand" "n")))] - "" - "shlli $%n2,%0" - [(set_attr "type" "arith")]) - - (define_insn "" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (lshiftrt:DI (match_operand:DI 1 "int_reg_operand" "0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "r"))))] - "" - "shll %2,%0" - [(set_attr "type" "arith")]) - - (define_expand "lshrsi3" - [(set (match_operand:SI 0 "int_reg_operand" "") - (lshiftrt:SI (match_operand:SI 1 "int_reg_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (lshiftrt:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "const_int_operand" "n")))] - "" - "shli $%n2,%0" - [(set_attr "type" "arith")]) - - (define_insn "" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (lshiftrt:SI (match_operand:SI 1 "int_reg_operand" "0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "r"))))] - "" - "shlw %2,%0" - [(set_attr "type" "arith")]) - - - ;; - ;; rotate insn - ;; - (define_expand "rotrdi3" - [(set (match_operand:DI 0 "int_reg_operand" "") - (rotatert:DI (match_operand:DI 1 "int_reg_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (rotatert:DI (match_operand:DI 1 "int_reg_operand" "0") - (match_operand:SI 2 "const_int_operand" "n")))] - "" - "rotli $%n2,%0" - [(set_attr "type" "arith")]) - - (define_insn "" - [(set (match_operand:DI 0 "int_reg_operand" "=r") - (rotatert:DI (match_operand:DI 1 "int_reg_operand" "0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "r"))))] - "" - "rotl %2,%0" - [(set_attr "type" "arith")]) - - (define_expand "rotrsi3" - [(set (match_operand:SI 0 "int_reg_operand" "") - (rotatert:SI (match_operand:SI 1 "int_reg_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))] - "" - " - { - if (GET_CODE (operands[2]) != CONST_INT) - operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); - }") - - (define_insn "" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (rotatert:SI (match_operand:SI 1 "int_reg_operand" "0") - (match_operand:SI 2 "const_int_operand" "n")))] - "" - "roti $%n2,%0" - [(set_attr "type" "arith")]) - - (define_insn "" - [(set (match_operand:SI 0 "int_reg_operand" "=r") - (rotatert:SI (match_operand:SI 1 "int_reg_operand" "0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "r"))))] - "" - "rotw %2,%0" - [(set_attr "type" "arith")]) - - (define_insn "rotldi3" - [(set (match_operand:DI 0 "int_reg_operand" "=r,r") - (rotate:DI (match_operand:DI 1 "int_reg_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "" - "@ - rotl %2,%0 - rotli %2,%0" - [(set_attr "type" "arith")]) - - (define_insn "rotlsi3" - [(set (match_operand:SI 0 "int_reg_operand" "=r,r") - (rotate:SI (match_operand:SI 1 "int_reg_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "" - "@ - rotw %2,%0 - roti %2,%0" - [(set_attr "type" "arith")]) - - - ;; - ;; jump and branch insns - ;; - (define_insn "jump" - [(set (pc) - (label_ref (match_operand 0 "" "")))] - "" - "b %l0" - [(set_attr "type" "branch")]) - - (define_insn "tablejump" - [(set (pc) (match_operand:SI 0 "register_operand" "r")) - (use (label_ref (match_operand 1 "" "")))] - "" - "b (%0)" - [(set_attr "type" "branch")]) - - (define_insn "beq" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "breq %l0" - [(set_attr "type" "branch")]) - - (define_insn "bne" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brne %l0" - [(set_attr "type" "branch")]) - - (define_insn "bgt" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brgt %l0" - [(set_attr "type" "branch")]) - - (define_insn "bgtu" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brgtu %l0" - [(set_attr "type" "branch")]) - - (define_insn "blt" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brlt %l0" - [(set_attr "type" "branch")]) - - (define_insn "bltu" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brltu %l0" - [(set_attr "type" "branch")]) - - (define_insn "bge" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brge %l0" - [(set_attr "type" "branch")]) - - (define_insn "bgeu" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brgeu %l0" - [(set_attr "type" "branch")]) - - (define_insn "ble" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brle %l0" - [(set_attr "type" "branch")]) - - (define_insn "bleu" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "brleu %l0" - [(set_attr "type" "branch")]) - - ;; Recognize reversed jumps. - (define_insn "" - [(set (pc) - (if_then_else (match_operator 0 "comparison_operator" - [(cc0) - (const_int 0)]) - (pc) - (label_ref (match_operand 1 "" ""))))] - "" - "br%C0 %l1" ; %C0 negates condition - [(set_attr "type" "branch")]) - - ;; - ;; call instructions - ;; - (define_insn "call" - [(call (match_operand:QI 0 "general_operand" "m") - (match_operand:SI 1 "general_operand" ""))] - ;; Operand 1 not used on the clipper. - "" - "call sp,%0") - - (define_insn "call_value" - [(set (match_operand 0 "" "=rf") - (call (match_operand:QI 1 "general_operand" "m") - (match_operand:SI 2 "general_operand" "g")))] - ;; Operand 2 not used on the clipper - "" - "call sp,%1") - - ;; Call subroutine returning any type. - - (define_expand "untyped_call" - [(parallel [(call (match_operand 0 "" "") - (const_int 0)) - (match_operand 1 "" "") - (match_operand 2 "" "")])] - "" - " - { - int i; - - emit_call_insn (GEN_CALL (operands[0], const0_rtx, NULL, const0_rtx)); - - for (i = 0; i < XVECLEN (operands[2], 0); i++) - { - rtx set = XVECEXP (operands[2], 0, i); - emit_move_insn (SET_DEST (set), SET_SRC (set)); - } - - /* The optimizer does not know that the call sets the function value - registers we stored in the result block. We avoid problems by - claiming that all hard registers are used and clobbered at this - point. */ - emit_insn (gen_blockage ()); - - DONE; - }") - - ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and - ;; all of memory. This blocks insns from being moved across this point. - - (define_insn "blockage" - [(unspec_volatile [(const_int 0)] 0)] - "" - "") - - (define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "register_operand" "r"))] - "" - "b (%0)" - [(set_attr "type" "branch")]) - - - (define_insn "nop" - [(const_int 0)] - "" - "noop" - [(set_attr "type" "arith") - (set_attr "cc" "unchanged")]) - - - - ;; while (--foo >= 0) - ;; - ;; Combiners for 'decrement test and branch' do not work for clipper. - ;; These patters are jump_insns that do not allow output reloads and clipper - ;; can only decrement and test registers. - ;; --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/clipper/clipper-protos.h gcc-3.3/gcc/config/clipper/clipper-protos.h *** gcc-3.2.3/gcc/config/clipper/clipper-protos.h 2001-07-06 18:40:03.000000000 +0000 --- gcc-3.3/gcc/config/clipper/clipper-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,38 **** - /* Definitions of target machine for GNU compiler. Clipper version. - Copyright (C) 2000 Free Software Foundation, Inc. - Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #ifdef RTX_CODE - #ifdef TREE_CODE - extern void clipper_va_start PARAMS ((int, tree, rtx)); - extern rtx clipper_va_arg PARAMS ((tree, tree)); - #endif /* TREE_CODE */ - extern void clipper_movstr PARAMS ((rtx *)); - extern void print_operand_address PARAMS ((FILE *, rtx)); - extern const char *rev_cond_name PARAMS ((rtx)); - extern int int_reg_operand PARAMS ((rtx, enum machine_mode)); - extern int fp_reg_operand PARAMS ((rtx, enum machine_mode)); - #endif /* RTX_CODE */ - - extern struct rtx_def *clipper_builtin_saveregs PARAMS ((void)); - extern int clipper_frame_size PARAMS ((int)); - #ifdef TREE_CODE - extern tree clipper_build_va_list PARAMS ((void)); - #endif /* TREE_CODE */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/clipper/clix.h gcc-3.3/gcc/config/clipper/clix.h *** gcc-3.2.3/gcc/config/clipper/clix.h 2001-12-20 17:36:33.000000000 +0000 --- gcc-3.3/gcc/config/clipper/clix.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,125 **** - /* Definitions of target machine for GNU compiler. Clipper/Clix version. - Copyright (C) 1988, 1993, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dclipper -Dunix -Asystem=unix -Asystem=svr3 -Acpu=clipper -Amachine=clipper" - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s" - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtend.o%s crtn.o%s" - - #undef LIB_SPEC - - #define TARGET_MEM_FUNCTIONS - - #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ - do { \ - const unsigned char *s = (const unsigned char *)(PTR);\ - size_t i, limit = (LEN); \ - for (i = 0; i < limit; s++, i++) \ - { \ - if ((i % 8) == 0) \ - fputs ("\n\t.byte\t", (FILE)); \ - fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ - } \ - fputs ("\n", (FILE)); \ - } while (0) - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - fprintf(FILE, "\t.align %d\n", 1 << (LOG)) - - - #define BSS_SECTION_ASM_OP "\t.bss" - #undef INIT_SECTION_ASM_OP - #define INIT_SECTION_ASM_OP "\t.section .init,\"x\"" - - - /* Define a few machine-specific details of the implementation of - constructors. - - The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN - and CTOR_LIST_END to contribute to the .init section an instruction to - push a word containing 0 (or some equivalent of that). - - TARGET_ASM_CONSTRUCTOR should be defined to push the address of the - constructor. */ - - #define CTOR_LIST_BEGIN \ - asm (INIT_SECTION_ASM_OP); \ - asm ("subq $8,sp"); \ - asm ("loadq $0,r0"); \ - asm ("storw r0,(sp)") - - /* don't need end marker */ - - #undef CTOR_LIST_END - - /* fini psect is 8 aligned */ - - #define DTOR_LIST_BEGIN \ - asm (DTORS_SECTION_ASM_OP); \ - func_ptr __DTOR_LIST__[2] = { (func_ptr) (-1), 0 }; - - #undef TARGET_ASM_CONSTRUCTOR - #define TARGET_ASM_CONSTRUCTOR clix_asm_out_constructor - #undef TARGET_ASM_DESTRUCTOR - #define TARGET_ASM_DESTRUCTOR clix_asm_out_destructor - - /* On clix crt1.o first calls init code and then sets environ and a valid - chrclass. Unfortunately stdio routines bomb with unset chrclass. - Therefore we set chrclass prior to calling global constructors. */ - - #undef DO_GLOBAL_CTORS_BODY - #define DO_GLOBAL_CTORS_BODY \ - do { \ - func_ptr *p, *beg = alloca (0); \ - _setchrclass (0); \ - for (p = beg; *p; p+=2) \ - ; \ - while (p != beg) \ - { p-= 2; (*p) (); } \ - } while (0) - - - #undef DO_GLOBAL_DTORS_BODY - #define DO_GLOBAL_DTORS_BODY \ - func_ptr *f = &__DTOR_LIST__[2]; /* 0,1 contains -1,0 */ \ - int n = 0; \ - while (*f) \ - { \ - f+= 2; /* skip over alignment 0 */ \ - n++; \ - } \ - f -= 2; \ - while (--n >= 0) \ - { \ - (*f) (); \ - f-= 2; /* skip over alignment 0 */ \ - } - - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/convex/convex.c gcc-3.3/gcc/config/convex/convex.c *** gcc-3.2.3/gcc/config/convex/convex.c 2001-12-17 15:05:28.000000000 +0000 --- gcc-3.3/gcc/config/convex/convex.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,794 **** - /* Subroutines for insn-output.c for Convex. - Copyright (C) 1988, 1993, 1994, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "config.h" - #include "system.h" - #include "tree.h" - #include "rtl.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "real.h" - #include "insn-config.h" - #include "conditions.h" - #include "insn-attr.h" - #include "output.h" - #include "function.h" - #include "expr.h" - #include "tm_p.h" - #include "target.h" - #include "target-def.h" - - /* Tables used in convex.h */ - - char regno_ok_for_index_p_base[1 + LAST_VIRTUAL_REGISTER + 1]; - enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER]; - enum reg_class reg_class_from_letter[256]; - - /* Target cpu index. */ - - int target_cpu; - - /* Boolean to keep track of whether the current section is .text or not. - Used by .align handler in convex.h. */ - - int current_section_is_text; - - /* Communication between output_compare and output_condjump. */ - - static rtx cmp_operand0, cmp_operand1; - static char cmp_modech; - - /* Forwards */ - - #if 0 - static rtx frame_argblock; - static int frame_argblock_size; - static rtx convert_arg_pushes (); - #endif - static void expand_movstr_call PARAMS ((rtx *)); - static void convex_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - static void convex_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); - static int convex_adjust_cost PARAMS ((rtx, rtx, rtx, int)); - - /* Initialize the GCC target structure. */ - #undef TARGET_ASM_BYTE_OP - #define TARGET_ASM_BYTE_OP "\tds.b\t" - #undef TARGET_ASM_ALIGNED_HI_OP - #define TARGET_ASM_ALIGNED_HI_OP "\tds.h\t" - #undef TARGET_ASM_ALIGNED_SI_OP - #define TARGET_ASM_ALIGNED_SI_OP "\tds.w\t" - - #undef TARGET_ASM_FUNCTION_PROLOGUE - #define TARGET_ASM_FUNCTION_PROLOGUE convex_output_function_prologue - #undef TARGET_ASM_FUNCTION_EPILOGUE - #define TARGET_ASM_FUNCTION_EPILOGUE convex_output_function_epilogue - #undef TARGET_SCHED_ADJUST_COST - #define TARGET_SCHED_ADJUST_COST convex_adjust_cost - - struct gcc_target targetm = TARGET_INITIALIZER; - - /* Generate the assembly code for function entry. FILE is a stdio - stream to output the code to. SIZE is an int: how many units of - temporary storage to allocate. - - Refer to the array `regs_ever_live' to determine which registers to - save; `regs_ever_live[I]' is nonzero if register number I is ever - used in the function. This function is responsible for knowing - which registers should not be saved even if used. */ - - static void - convex_output_function_prologue (file, size) - FILE *file; - HOST_WIDE_INT size; - { - size = ((size) + 7) & -8; - if (size) - { - fprintf (file, "\tsub.w #"); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, size); - fprintf (file, ",sp\n"); - } - } - - /* This function generates the assembly code for function exit. - Args are as for output_function_prologue (). - - The function epilogue should not depend on the current stack - pointer! It should use the frame pointer only. This is mandatory - because of alloca; we also take advantage of it to omit stack - adjustments before returning. */ - - static void - convex_output_function_epilogue (file, size) - FILE *file; - HOST_WIDE_INT size ATTRIBUTE_UNUSED; - { - /* Follow function with a zero to stop c34 icache prefetching. */ - fprintf (file, "\tds.h 0\n"); - } - - /* Adjust the cost of dependences. */ - static int - convex_adjust_cost (insn, link, dep, cost) - rtx insn; - rtx link; - rtx dep; - int cost; - { - /* Antidependencies don't block issue. */ - if (REG_NOTE_KIND (link) != 0) - cost = 0; - /* C38 situations where delay depends on context */ - else if (TARGET_C38 - && GET_CODE (PATTERN (insn)) == SET - && GET_CODE (PATTERN (dep)) == SET) - { - enum attr_type insn_type = get_attr_type (insn); - enum attr_type dep_type = get_attr_type (dep); - /* index register must be ready one cycle early */ - if (insn_type == TYPE_MLDW || insn_type == TYPE_MLDL - || (insn_type == TYPE_MST - && reg_mentioned_p (SET_DEST (PATTERN (dep)), - SET_SRC (PATTERN (insn))))) - cost += 1; - /* alu forwarding off alu takes two */ - if (dep_type == TYPE_ALU - && insn_type != TYPE_ALU - && ! (insn_type == TYPE_MST - && SET_DEST (PATTERN (dep)) == SET_SRC (PATTERN (insn)))) - cost += 1; - } - - return cost; - } - - - - /* Here from OVERRIDE_OPTIONS at startup. Initialize constant tables. */ - - void - init_convex () - { - int regno; - - /* Set A and S reg classes. */ - for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - if (A_REGNO_P (regno)) - { - regno_ok_for_index_p[regno] = 1; - regno_reg_class[regno] = INDEX_REGS; - } - else - { - regno_ok_for_index_p[regno] = 0; - regno_reg_class[regno] = S_REGS; - } - - /* Can't index off the stack pointer, register 0. */ - regno_ok_for_index_p[STACK_POINTER_REGNUM] = 0; - regno_reg_class[STACK_POINTER_REGNUM] = SP_REGS; - - /* Can't index off aliases of the stack pointer. */ - regno_ok_for_index_p[VIRTUAL_INCOMING_ARGS_REGNUM] = 1; - regno_ok_for_index_p[VIRTUAL_STACK_VARS_REGNUM] = 1; - regno_ok_for_index_p[VIRTUAL_STACK_DYNAMIC_REGNUM] = 0; - regno_ok_for_index_p[VIRTUAL_OUTGOING_ARGS_REGNUM] = 0; - - /* Can't index off hard reg -1 == pseudos not assigned */ - regno_ok_for_index_p[-1] = 0; - - /* Set reg class letters */ - reg_class_from_letter['a'] = A_REGS; - reg_class_from_letter['A'] = INDEX_REGS; - reg_class_from_letter['d'] = S_REGS; - - /* Turn off floating point exception enables in the psw. */ - psw_disable_float (); - } - - void - psw_disable_float () - { - #if __convex__ && __GNUC__ - register int *p; - asm ("mov fp,%0" : "=a" (p)); - while (p) - { - p[1] &= ~0x1000c400; - p = (int *) p[2]; - } - #endif - } - - /* Here to output code for a compare insn. Output nothing, just - record the operands and their mode. */ - - const char * - output_cmp (operand0, operand1, modech) - rtx operand0, operand1; - int modech; - { - cmp_operand0 = operand0; - cmp_operand1 = operand1; - cmp_modech = modech; - return ""; - } - - /* Output code for a conditional jump. The preceding instruction - is necessarily a compare. Output two instructions, for example - eq.w a1,a2 - jbra.t L5 - for - (cmpsi a1 a2) - (beq L5) - */ - - const char * - output_condjump (label, cond, jbr_sense) - rtx label; - const char *cond; - int jbr_sense; - { - rtx operands[3]; - char cmp_op[4]; - char buf[80]; - char jbr_regch; - - strcpy (cmp_op, cond); - - /* [BL] mean the value is being compared against immediate 0. - Use neg.x, which produces the same carry that eq.x #0 would if it - existed. In this case operands[1] is a scratch register, not a - compare operand. */ - - if (cmp_modech == 'B' || cmp_modech == 'L') - { - cmp_modech = cmp_modech - 'A' + 'a'; - strcpy (cmp_op, "neg"); - } - - /* [WH] mean the value being compared resulted from "add.[wh] #-1,rk" - when rk was nonnegative -- we can omit equality compares against -1 - or inequality compares against 0. */ - - else if (cmp_modech == 'W' || cmp_modech == 'H') - { - if (! strcmp (cmp_op, "eq") && cmp_operand1 == constm1_rtx) - jbr_sense ^= 't' ^ 'f'; - else if (! strcmp (cmp_op, "lt") && cmp_operand1 == const0_rtx) - ; - else - cmp_modech = cmp_modech - 'A' + 'a'; - } - - /* Constant must be first; swap operands if necessary. - If lt, le, ltu, leu are swapped, change to le, lt, leu, ltu - and reverse the sense of the jump. */ - - if (! REG_P (cmp_operand1)) - { - operands[0] = cmp_operand1; - operands[1] = cmp_operand0; - if (cmp_op[0] == 'l') - { - cmp_op[1] ^= 'e' ^ 't'; - jbr_sense ^= 't' ^ 'f'; - } - } - else - { - operands[0] = cmp_operand0; - operands[1] = cmp_operand1; - } - - operands[2] = label; - - if (S_REG_P (operands[1])) - jbr_regch = 's'; - else if (A_REG_P (operands[1])) - jbr_regch = 'a'; - else - abort (); - - if (cmp_modech == 'W' || cmp_modech == 'H') - sprintf (buf, "jbr%c.%c %%l2", jbr_regch, jbr_sense); - else - sprintf (buf, "%s.%c %%0,%%1\n\tjbr%c.%c %%l2", - cmp_op, cmp_modech, jbr_regch, jbr_sense); - output_asm_insn (buf, operands); - return ""; - } - - /* Return 1 if OP is valid for cmpsf. - In IEEE mode, +/- zero compares are not handled by - the immediate versions of eq.s and on some machines, lt.s, and le.s. - So disallow 0.0 as the immediate operand of xx.s compares in IEEE mode. */ - - int - nonmemory_cmpsf_operand (op, mode) - rtx op; - enum machine_mode mode; - { - #if _IEEE_FLOAT_ - if (op == CONST0_RTX (SFmode)) - return 0; - #endif - - return nonmemory_operand (op, mode); - } - - /* Convex /bin/as does not like unary minus in some contexts. - Simplify CONST addresses to remove it. */ - - rtx - simplify_for_convex (x) - rtx x; - { - switch (GET_CODE (x)) - { - case MINUS: - if (GET_CODE (XEXP (x, 1)) == CONST_INT - && INTVAL (XEXP (x, 1)) < 0) - { - PUT_CODE (x, PLUS); - XEXP (x, 1) = GEN_INT (- INTVAL (XEXP (x, 1))); - } - break; - - case CONST: - return simplify_for_convex (XEXP (x, 0)); - default: - break; - } - - return x; - } - - /* Routines to separate CONST_DOUBLEs into component parts. */ - - int - const_double_high_int (x) - rtx x; - { - if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) - return CONST_DOUBLE_LOW (x); - else - return CONST_DOUBLE_HIGH (x); - } - - int - const_double_low_int (x) - rtx x; - { - if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) - return CONST_DOUBLE_HIGH (x); - else - return CONST_DOUBLE_LOW (x); - } - - /* Inline block copy. */ - - void - expand_movstr (operands) - rtx *operands; - { - rtx dest = operands[0]; - rtx src = operands[1]; - int align = INTVAL (operands[3]); - int nregs, maxsize; - unsigned len; - enum machine_mode mode; - rtx reg, load, store, prev_store, prev_store_2; - int size; - - /* Decide how many regs to use, depending on load latency, and what - size pieces to move, depending on whether machine does unaligned - loads and stores efficiently. */ - - if (TARGET_C1) - { - /* ld.l latency is 4, no alignment problems. */ - nregs = 3, maxsize = 8; - } - else if (TARGET_C2) - { - /* loads are latency 2 if we avoid ld.l not at least word aligned. */ - if (align >= 4) - nregs = 2, maxsize = 8; - else - nregs = 2, maxsize = 4; - } - else if (TARGET_C34) - { - /* latency is 4 if aligned, horrible if not. */ - nregs = 3, maxsize = align; - } - else if (TARGET_C38) - { - /* latency is 2 if at least word aligned, 3 or 4 if unaligned. */ - if (align >= 4) - nregs = 2, maxsize = 8; - else - nregs = 3, maxsize = 8; - } - else - abort (); - - /* Caller is not necessarily prepared for us to fail in this - expansion. So fall back by generating memcpy call here. */ - - if (GET_CODE (operands[2]) != CONST_INT - || (len = INTVAL (operands[2])) > (unsigned) 32 * maxsize) - { - expand_movstr_call (operands); - return; - } - - reg = 0; - prev_store = prev_store_2 = 0; - - while (len > 0) - { - if (len >= 8 && maxsize >= 8) - mode = DImode; - else if (len >= 4 && maxsize >= 4) - mode = SImode; - else if (len >= 2 && maxsize >= 2) - mode = HImode; - else - mode = QImode; - - /* If no temp pseudo to reuse, or not the right mode, make one */ - if (! reg || GET_MODE (reg) != mode) - reg = gen_reg_rtx (mode); - - /* Get src and dest in the right mode */ - if (GET_MODE (src) != mode) - { - src = adjust_address (src, mode, 0); - dest = adjust_address (dest, mode, 0); - } - - /* Make load and store patterns for this piece */ - load = gen_rtx_SET (VOIDmode, reg, src); - store = gen_rtx_SET (VOIDmode, dest, reg); - - /* Emit the load and the store from last time. - When we emit a store, we can reuse its temp reg. */ - emit_insn (load); - if (prev_store) - { - reg = SET_SRC (prev_store); - emit_insn (prev_store); - } - else - reg = 0; - - /* Queue up the store, for next time or the time after that. */ - if (nregs == 2) - prev_store = store; - else - prev_store = prev_store_2, prev_store_2 = store; - - /* Advance to next piece. */ - size = GET_MODE_SIZE (mode); - src = adjust_address (src, mode, size); - dest = adjust_address (dest, mode, size); - len -= size; - } - - /* Finally, emit the last stores. */ - if (prev_store) - emit_insn (prev_store); - if (prev_store_2) - emit_insn (prev_store_2); - } - - static void - expand_movstr_call (operands) - rtx *operands; - { - emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "memcpy"), 0, - VOIDmode, 3, - XEXP (operands[0], 0), Pmode, - XEXP (operands[1], 0), Pmode, - convert_to_mode (TYPE_MODE (sizetype), operands[2], - TREE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); - } - - #if _IEEE_FLOAT_ - #define MAX_FLOAT 3.4028234663852886e+38 - #define MIN_FLOAT 1.1754943508222875e-38 - #else - #define MAX_FLOAT 1.7014117331926443e+38 - #define MIN_FLOAT 2.9387358770557188e-39 - #endif - - int - check_float_value (mode, dp, overflow) - enum machine_mode mode; - REAL_VALUE_TYPE *dp; - int overflow; - { - REAL_VALUE_TYPE d = *dp; - - if (overflow) - { - *dp = MAX_FLOAT; - return 1; - } - - if (mode == SFmode) - { - if (d > MAX_FLOAT) - { - *dp = MAX_FLOAT; - return 1; - } - else if (d < -MAX_FLOAT) - { - *dp = -MAX_FLOAT; - return 1; - } - else if ((d > 0 && d < MIN_FLOAT) || (d < 0 && d > -MIN_FLOAT)) - { - *dp = 0.0; - return 1; - } - } - - return 0; - } - - /* Output the label at the start of a function. - Precede it with the number of formal args so debuggers will have - some idea of how many args to print. */ - - void - asm_declare_function_name (file, name, decl) - FILE *file; - const char *name; - tree decl; - { - int nargs = list_length (DECL_ARGUMENTS (decl)); - - const char *p; - char c; - static char vers[4]; - int i; - - p = version_string; - for (i = 0; i < 3; ) { - c = *p; - if (ISDIGIT (c)) - vers[i++] = c; - if (c == 0 || c == ' ') - vers[i++] = '0'; - else - p++; - } - fprintf (file, "\tds.b \"g%s\"\n", vers); - - if (nargs < 100) - fprintf (file, "\tds.b \"+%02d\\0\"\n", nargs); - else - fprintf (file, "\tds.b \"+00\\0\"\n"); - - ASM_OUTPUT_LABEL (file, name); - } - - /* Print an instruction operand X on file FILE. - CODE is the code from the %-spec that requested printing this operand; - if `%z3' was used to print operand 3, then CODE is 'z'. */ - /* Convex codes: - %u prints a CONST_DOUBLE's high word - %v prints a CONST_DOUBLE's low word - %z prints a CONST_INT shift count as a multiply operand -- viz. 1 << n. - */ - - void - print_operand (file, x, code) - FILE *file; - rtx x; - int code; - { - long u[2]; - REAL_VALUE_TYPE d; - - switch (GET_CODE (x)) - { - case REG: - fprintf (file, "%s", reg_names[REGNO (x)]); - break; - - case MEM: - output_address (XEXP (x, 0)); - break; - - case CONST_DOUBLE: - REAL_VALUE_FROM_CONST_DOUBLE (d, x); - switch (GET_MODE (x)) { - case DFmode: - #if 0 /* doesn't work, produces dfloats */ - REAL_VALUE_TO_TARGET_DOUBLE (d, u); - #else - { - union { double d; int i[2]; } t; - t.d = d; - u[0] = t.i[0]; - u[1] = t.i[1]; - } - #endif - if (code == 'u') - fprintf (file, "#%#lx", u[0]); - else if (code == 'v') - fprintf (file, "#%#lx", u[1]); - else - outfloat (file, d, "%.17e", "#", ""); - break; - case SFmode: - outfloat (file, d, "%.9e", "#", ""); - break; - default: - if (code == 'u') - { - fprintf (file, "#"); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_HIGH (x)); - } - else - { - fprintf (file, "#"); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x)); - } - } - break; - - default: - if (code == 'z') - { - if (GET_CODE (x) != CONST_INT) - abort (); - fprintf (file, "#%d", 1 << INTVAL (x)); - } - else - { - putc ('#', file); - output_addr_const (file, x); - } - } - } - - /* Print a memory operand whose address is X, on file FILE. */ - - void - print_operand_address (file, addr) - FILE *file; - rtx addr; - { - rtx index = 0; - rtx offset = 0; - - if (GET_CODE (addr) == MEM) - { - fprintf (file, "@"); - addr = XEXP (addr, 0); - } - - switch (GET_CODE (addr)) - { - case REG: - index = addr; - break; - - case PLUS: - index = XEXP (addr, 0); - if (REG_P (index)) - offset = XEXP (addr, 1); - else - { - offset = XEXP (addr, 0); - index = XEXP (addr, 1); - if (! REG_P (index)) - abort (); - } - break; - - default: - offset = addr; - break; - } - - if (offset) - output_addr_const (file, offset); - - if (index) - fprintf (file, "(%s)", reg_names[REGNO (index)]); - } - - /* Output a float to FILE, value VALUE, format FMT, preceded by PFX - and followed by SFX. */ - - void - outfloat (file, value, fmt, pfx, sfx) - FILE *file; - REAL_VALUE_TYPE value; - const char *fmt, *pfx, *sfx; - { - char buf[64]; - fputs (pfx, file); - REAL_VALUE_TO_DECIMAL (value, fmt, buf); - fputs (buf, file); - fputs (sfx, file); - } - - /* Here during RTL generation of return. If we are at the final return - in a function, go through the function and replace pushes with stores - into a frame arg block. This is similar to what ACCUMULATE_OUTGOING_ARGS - does, but we must index off the frame pointer, not the stack pointer, - and the calling sequence does not require the arg block to be at the - top of the stack. */ - - void - replace_arg_pushes () - { - /* Doesn't work yet. */ - } - - /* Output the insns needed to do a call. operands[] are - 0 - MEM, the place to call - 1 - CONST_INT, the number of bytes in the arg list - 2 - CONST_INT, the number of arguments - 3 - CONST_INT, the number of bytes to pop - 4 - address of the arg list. - */ - - const char * - output_call (insn, operands) - rtx insn ATTRIBUTE_UNUSED, *operands; - { - if (operands[4] == stack_pointer_rtx) - output_asm_insn ("mov sp,ap", operands); - else - abort (); - - if (TARGET_ARGCOUNT) - output_asm_insn ("pshea %a2", operands); - - output_asm_insn ("calls %0", operands); - - output_asm_insn ("ld.w 12(fp),ap", operands); - - if (operands[4] == stack_pointer_rtx && operands[3] != const0_rtx) - output_asm_insn ("add.w %3,sp", operands); - - return ""; - } - - - /* Here after reloading, before the second scheduling pass. */ - - void - emit_ap_optimizations () - { - /* Removed for now. */ - } - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/convex/convex.h gcc-3.3/gcc/config/convex/convex.h *** gcc-3.2.3/gcc/config/convex/convex.h 2002-01-16 02:37:20.000000000 +0000 --- gcc-3.3/gcc/config/convex/convex.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1364 **** - /* Definitions of target machine for GNU compiler. Convex version. - Copyright (C) 1988, 1994, 1995, 1996, 2000, 2001, 2002 - Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* Standard GCC variables that we reference. */ - - extern int target_flags; - - /* Convex machine-specific flags - -mc1 target instruction set, libraries, scheduling - -mc2 - -mc32 - -mc34 - -mc38 - -margcount use standard calling sequence, with arg count word - -mno-argcount don't push arg count, depend on symbol table - -margcount-nop place arg count in a nop instruction (faster than push) - -mvolatile-cache use data cache for volatile mem refs (default) - -mvolatile-nocache bypass data cache for volatile mem refs - -mlong32 cc- and libc-compatible 32-bit longs - -mlong64 64-bit longs - */ - - /* Macro to define tables used to set -mXXX flags. - This is a list in braces of pairs in braces, - each pair being { "NAME", VALUE } - where VALUE is the bits to set or minus the bits to clear. - An empty string NAME is used to identify the default VALUE. */ - - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT 0 - #endif - - #define TARGET_SWITCHES \ - { { "c1", 001, N_("Generate code for c1") }, \ - { "c2", 002, N_("Generate code for c2") }, \ - { "c32", 004, N_("Generate code for c32") }, \ - { "c34", 010, N_("Generate code for c34") }, \ - { "c38", 020, N_("Generate code for c34") }, \ - { "argcount", 0100, \ - N_("Use standard calling sequence, with arg count word")}, \ - { "argcount-nop", 0200, \ - N_("Place arg count in a nop instruction (faster than push)") }, \ - { "no-argcount", -0300, \ - N_("Don't push arg count, depend on symbol table") }, \ - { "volatile-cache", -0400, \ - N_("Use data cache for volatile mem refs (default)") }, \ - { "no-volatile-cache", 0400, \ - N_("Don't use data cache for volatile mem refs") }, \ - { "volatile-nocache", 0400, \ - N_("Bypass data cache for volatile mem refs") }, \ - { "long64", 01000, N_("Use 64-bit longs") }, \ - { "long32", -01000, N_("Use cc- and libc-compatible 32-bit longs")},\ - { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT}} - - /* Macros used in the machine description to test the flags. */ - - #define TARGET_C1 (target_cpu == 0) - #define TARGET_C2 (target_cpu == 1) - #define TARGET_C34 (target_cpu == 2) - #define TARGET_C38 (target_cpu == 3) - #define TARGET_ARGCOUNT (target_flags & 0100) - #define TARGET_ARGCOUNT_NOP (target_flags & 0200) - #define TARGET_LONG64 (target_flags & 01000) - #define TARGET_VOLATILE_NOCACHE (target_flags & 0400) - - #define OVERRIDE_OPTIONS \ - { \ - init_convex (); \ - if ((target_flags & 077) != ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 077)) \ - target_flags &= ~ (TARGET_DEFAULT | TARGET_CPU_DEFAULT); \ - if (target_flags & 001) \ - target_cpu = 0; \ - else if (target_flags & 006) \ - target_cpu = 1; \ - else if (target_flags & 010) \ - target_cpu = 2; \ - else if (target_flags & 020) \ - target_cpu = 3; \ - } - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dconvex -Dunix -Asystem=unix -Acpu=convex -Amachine=convex" - - /* Print subsidiary information on the compiler version in use. */ - - #define TARGET_VERSION fprintf (stderr, " (convex)"); - - /* Target-dependent specs. - Some libraries come in c1 and c2+ versions; use the appropriate ones. - Make a target-dependent __convex_cxx__ define to relay the target cpu - to the program being compiled. */ - - #if (TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1 - - /* C1 default */ - - #if _IEEE_FLOAT_ - - #define CPP_SPEC \ - "%{!mc2:%{!mc32:%{!mc34:%{!mc38:-D__convex_c1__}}}} \ - %{mc2:-D__convex_c2__} \ - %{mc32:-D__convex_c32__} \ - %{mc34:-D__convex_c34__} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_IEEE_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #else - - #define CPP_SPEC \ - "%{!mc2:%{!mc32:%{!mc34:%{!mc38:-D__convex_c1__}}}} \ - %{mc2:-D__convex_c2__} \ - %{mc32:-D__convex_c32__} \ - %{mc34:-D__convex_c34__} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_CONVEX_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #endif - - #define LIB_SPEC \ - "%{!mc2:%{!mc32:%{!mc34:%{!mc38:-lC1%{traditional:_old}%{p:_p}%{pg:_p}}}}} \ - %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - -lc%{traditional:_old}%{p:_p}%{pg:_p}" - - #endif - - #if (TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 2 - - /* C2 default */ - - #if _IEEE_FLOAT_ - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{!mc1:%{!mc32:%{!mc34:%{!mc38:-D__convex_c2__}}}} \ - %{mc32:-D__convex_c32__} \ - %{mc34:-D__convex_c34__} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_IEEE_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #else - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{!mc1:%{!mc32:%{!mc34:%{!mc38:-D__convex_c2__}}}} \ - %{mc32:-D__convex_c32__} \ - %{mc34:-D__convex_c34__} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_CONVEX_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #endif - - #define LIB_SPEC \ - "%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{!mc1:%{!mc32:%{!mc34:%{!mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \ - %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - -lc%{traditional:_old}%{p:_p}%{pg:_p}" - - #endif - - #if (TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 4 - - /* C32 default */ - - #if _IEEE_FLOAT_ - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{mc2:-D__convex_c2__} \ - %{!mc1:%{!mc2:%{!mc34:%{!mc38:-D__convex_c32__}}}} \ - %{mc34:-D__convex_c34__} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_IEEE_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #else - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{mc2:-D__convex_c2__} \ - %{!mc1:%{!mc2:%{!mc34:%{!mc38:-D__convex_c32__}}}} \ - %{mc34:-D__convex_c34__} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_CONVEX_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #endif - - #define LIB_SPEC \ - "%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{!mc1:%{!mc2:%{!mc34:%{!mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \ - %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - -lc%{traditional:_old}%{p:_p}%{pg:_p}" - - #endif - - #if (TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 010 - - /* C34 default */ - - #if _IEEE_FLOAT_ - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{mc2:-D__convex_c2__} \ - %{mc32:-D__convex_c32__} \ - %{!mc1:%{!mc2:%{!mc32:%{!mc38:-D__convex_c34__}}}} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_IEEE_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #else - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{mc2:-D__convex_c2__} \ - %{mc32:-D__convex_c32__} \ - %{!mc1:%{!mc2:%{!mc32:%{!mc38:-D__convex_c34__}}}} \ - %{mc38:-D__convex_c38__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_CONVEX_FLOAT_ \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #endif - - #define LIB_SPEC \ - "%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{!mc1:%{!mc2:%{!mc32:%{!mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \ - %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - -lc%{traditional:_old}%{p:_p}%{pg:_p}" - - #endif - - #if (TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 020 - - /* C38 default */ - - #if _IEEE_FLOAT_ - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{mc2:-D__convex_c2__} \ - %{mc32:-D__convex_c32__} \ - %{mc34:-D__convex_c34__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_IEEE_FLOAT_ \ - %{!mc1:%{!mc2:%{!mc32:%{!mc34:-D__convex_c38__}}}} \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #else - - #define CPP_SPEC \ - "%{mc1:-D__convex_c1__} \ - %{mc2:-D__convex_c2__} \ - %{mc32:-D__convex_c32__} \ - %{mc34:-D__convex_c34__} \ - %{fno-builtin:-D__NO_INLINE} \ - -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB \ - -D_CONVEX_FLOAT_ \ - %{!mc1:%{!mc2:%{!mc32:%{!mc34:-D__convex_c38__}}}} \ - %{.S:-P} \ - %{!traditional:-D__stdc__} \ - %{!traditional:-D_LONGLONG} \ - %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long} \ - %{!ansi:-D_POSIX_SOURCE} \ - %{!ansi:-D_CONVEX_SOURCE}" - - #endif - - #define LIB_SPEC \ - "%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}} \ - %{!mc1:%{!mc2:%{!mc32:%{!mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \ - -lc%{traditional:_old}%{p:_p}%{pg:_p}" - - #endif - - #if _IEEE_FLOAT_ - - /* ieee default */ - - #define ASM_SPEC "-fi" - - #define LINK_SPEC \ - "-E%{traditional:no}posix \ - -X \ - %{F} %{M*} %{y*} \ - -fi \ - -A__iob=___ap$iob \ - -A_use_libc_sema=___ap$use_libc_sema \ - %{traditional:-A___gcc_cleanup=__cleanup} \ - %{!traditional:-A___gcc_cleanup=___ap$do_registered_functions} \ - -L/usr/lib" - - #define STARTFILE_SPEC \ - "%{!pg:%{!p:/usr/lib/crt/crt0.o}} \ - %{!pg:%{p:/usr/lib/crt/mcrt0.o}} \ - %{pg:/usr/lib/crt/gcrt0.o} \ - /usr/lib/crt/fpmode_i.o" - - #else - - /* native default */ - - #define ASM_SPEC "-fn" - - #define LINK_SPEC \ - "-E%{traditional:no}posix \ - -X \ - %{F} %{M*} %{y*} \ - -fn \ - -A__iob=___ap$iob \ - -A_use_libc_sema=___ap$use_libc_sema \ - %{traditional:-A___gcc_cleanup=__cleanup} \ - %{!traditional:-A___gcc_cleanup=___ap$do_registered_functions} \ - -L/usr/lib" - - #define STARTFILE_SPEC \ - "%{!pg:%{!p:/usr/lib/crt/crt0.o}} \ - %{!pg:%{p:/usr/lib/crt/mcrt0.o}} \ - %{pg:/usr/lib/crt/gcrt0.o}" - - #endif - - /* Use /path/libgcc.a instead of -lgcc, makes bootstrap work more smoothly. */ - - #define LINK_LIBGCC_SPECIAL_1 - - /* Since IEEE support was added to gcc, most things seem to like it - better if we disable exceptions and check afterward for infinity. */ - - #if __convex__ - #if _IEEE_FLOAT_ - #define REAL_VALUE_ISNAN(x) 0 - #define REAL_VALUE_ISINF(x) ((*(short *) &(x) & 0x7ff0) == 0x7ff0) - #else - #define REAL_VALUE_ISNAN(x) 0 - #define REAL_VALUE_ISINF(x) ((*(short *) &(x) & 0xfff0) == 0x8000) - #endif - #endif - - /* Target machine storage layout */ - - /* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. */ - #define BITS_BIG_ENDIAN 1 - - /* Define this if most significant byte of a word is the lowest numbered. */ - #define BYTES_BIG_ENDIAN 1 - - /* Define this if most significant word of a multiword number is numbered. */ - #define WORDS_BIG_ENDIAN 1 - - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 64 - - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD 8 - - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - #define PARM_BOUNDARY 32 - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #define STACK_BOUNDARY 64 - - /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 16 - - /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 32 - - /* Every structure's size must be a multiple of this. */ - #define STRUCTURE_SIZE_BOUNDARY 8 - - /* A bitfield declared as `int' forces `int' alignment for the struct. */ - #define PCC_BITFIELD_TYPE_MATTERS 1 - - /* No data type wants to be aligned rounder than this. */ - /* beware of doubles in structs -- 64 is incompatible with cc */ - #define BIGGEST_ALIGNMENT 32 - - /* Set this nonzero if move instructions will actually fail to work - when given unaligned data. */ - #define STRICT_ALIGNMENT 0 - - /* Define sizes of basic C types to conform to ordinary usage -- these - types depend on BITS_PER_WORD otherwise. */ - #define CHAR_TYPE_SIZE 8 - #define SHORT_TYPE_SIZE 16 - #define INT_TYPE_SIZE 32 - #define LONG_TYPE_SIZE (TARGET_LONG64 ? 64 : 32) - #define LONG_LONG_TYPE_SIZE 64 - #define FLOAT_TYPE_SIZE 32 - #define DOUBLE_TYPE_SIZE 64 - #define LONG_DOUBLE_TYPE_SIZE 64 - #define MAX_LONG_TYPE_SIZE 64 - - /* Declare the standard types used by builtins to match convex stddef.h -- - with int rather than long. */ - - #define SIZE_TYPE "unsigned int" - #define PTRDIFF_TYPE "int" - - /* Standard register usage. */ - - /* Number of actual hardware registers. - The hardware registers are assigned numbers for the compiler - from 0 to just below FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. */ - #define FIRST_PSEUDO_REGISTER 16 - - /* 1 for registers that have pervasive standard uses - and are not available for the register allocator. - For Convex, these are AP, FP, and SP. */ - #define FIXED_REGISTERS \ - { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1 } - - /* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. */ - #define CALL_USED_REGISTERS \ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - - /* List the order in which to allocate registers. Each register must be - listed once, even those in FIXED_REGISTERS. - For Convex, put S0 (the return register) last. */ - #define REG_ALLOC_ORDER \ - { 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 0, 8, 14, 15 } - - /* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. */ - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. - On Convex, S registers can hold any type, A registers any nonfloat. */ - #define HARD_REGNO_MODE_OK(REGNO, MODE) \ - (S_REGNO_P (REGNO) \ - || (GET_MODE_SIZE (MODE) <= 4 && (MODE) != SFmode)) - - /* Value is 1 if it is a good idea to tie two pseudo registers - when one has mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. */ - #define MODES_TIEABLE_P(MODE1, MODE2) \ - ((GET_MODE_SIZE (MODE1) <= 4 && (MODE1) != SFmode) \ - == (GET_MODE_SIZE (MODE2) <= 4 && (MODE2) != SFmode)) - - /* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - - #define S0_REGNUM 0 - #define A0_REGNUM 8 - - /* Register to use for pushing function arguments. */ - #define STACK_POINTER_REGNUM A0_REGNUM - - /* Base register for access to local variables of the function. */ - #define FRAME_POINTER_REGNUM (A0_REGNUM + 7) - - /* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. */ - #define FRAME_POINTER_REQUIRED 1 - - /* Base register for access to arguments of the function. */ - #define ARG_POINTER_REGNUM (A0_REGNUM + 6) - - /* Register in which static-chain is passed to a function. - Use S0, not an A reg, because this rare use would otherwise prevent - an A reg from being available to global-alloc across calls. */ - #define STATIC_CHAIN_REGNUM S0_REGNUM - - /* Register in which address to store a structure value - is passed to a function. */ - #define STRUCT_VALUE_REGNUM (A0_REGNUM + 1) - - /* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. */ - - /* Convex has classes A (address) and S (scalar). - A is further divided into SP_REGS (stack pointer) and INDEX_REGS. - SI_REGS is S_REGS + INDEX_REGS -- all the regs except SP. */ - - enum reg_class { - NO_REGS, S_REGS, INDEX_REGS, SP_REGS, A_REGS, SI_REGS, - ALL_REGS, LIM_REG_CLASSES - }; - - #define N_REG_CLASSES (int) LIM_REG_CLASSES - - /* Since GENERAL_REGS is the same class as ALL_REGS, - don't give it a different class number; just make it an alias. */ - - #define GENERAL_REGS ALL_REGS - - /* Give names of register classes as strings for dump file. */ - - #define REG_CLASS_NAMES \ - {"NO_REGS", "S_REGS", "INDEX_REGS", "SP_REGS", "A_REGS", "SI_REGS", \ - "ALL_REGS" } - - /* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. */ - - #define REG_CLASS_CONTENTS \ - { {0}, {0x00ff}, {0xfe00}, {0x0100}, {0xff00}, {0xfeff}, {0xffff} } - - /* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - - #define REGNO_REG_CLASS(REGNO) (regno_reg_class[REGNO]) - - #define S_REGNO_P(REGNO) ((unsigned)((REGNO) - S0_REGNUM) < 8) - #define A_REGNO_P(REGNO) ((unsigned)((REGNO) - A0_REGNUM) < 8) - - #define S_REG_P(X) (REG_P (X) && S_REGNO_P (REGNO (X))) - #define A_REG_P(X) (REG_P (X) && A_REGNO_P (REGNO (X))) - - /* The class value for index registers, and the one for base regs. */ - - #define INDEX_REG_CLASS INDEX_REGS - #define BASE_REG_CLASS INDEX_REGS - - /* Get reg_class from a letter such as appears in the machine description. */ - /* a => A_REGS - d => S_REGS ('s' is taken) - A => INDEX_REGS (i.e., A_REGS except sp) */ - - #define REG_CLASS_FROM_LETTER(C) \ - reg_class_from_letter[(unsigned char) (C)] - - /* The letters I, J, K, L and M in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. */ - /* 'I' is used to pass any CONST_INT and reject any CONST_DOUBLE. - CONST_DOUBLE integers are handled by G and H constraint chars. */ - - #define CONST_OK_FOR_LETTER_P(VALUE, C) 1 - - /* Similar, but for floating constants, and defining letters G and H. - Here VALUE is the CONST_DOUBLE rtx itself. */ - /* Convex uses G, H: - value usable in ld.d (low word 0) or ld.l (high word all sign) */ - - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ - (((C) == 'G' && LD_D_P (VALUE)) || \ - ((C) == 'H' && LD_L_P (VALUE)) || \ - 0) - - #define LD_D_P(X) (const_double_low_int (X) == 0) - - #define LD_L_P(X) (const_double_low_int (X) >= 0 \ - ? const_double_high_int (X) == 0 \ - : const_double_high_int (X) == -1) - - /* Optional extra constraints for this machine. - For Convex, 'Q' means that OP is a volatile MEM. - For volatile scalars, we use instructions that bypass the data cache. */ - - #define EXTRA_CONSTRAINT(OP, C) \ - ((C) == 'Q' ? (GET_CODE (OP) == MEM && MEM_VOLATILE_P (OP) \ - && ! TARGET_C1 && TARGET_VOLATILE_NOCACHE) \ - : 0) - - /* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. */ - - /* Put 2-word constants that can't be immediate operands into memory. */ - - #define PREFERRED_RELOAD_CLASS(X,CLASS) \ - ((GET_CODE (X) != CONST_DOUBLE \ - || GET_MODE (X) == SFmode \ - || LD_L_P (X) || LD_D_P (X)) ? (CLASS) : NO_REGS) - - /* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. */ - #define CLASS_MAX_NREGS(CLASS, MODE) ((GET_MODE_SIZE (MODE) + 7) / 8) - - /* Stack layout; function entry, exit and calling. */ - - /* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ - #define STACK_GROWS_DOWNWARD - - /* Define this if the nominal address of the stack frame - is at the high-address end of the local variables; - that is, each additional local variable allocated - goes at a more negative offset in the frame. */ - #define FRAME_GROWS_DOWNWARD - - /* Define this if should default to -fcaller-saves. */ - #define DEFAULT_CALLER_SAVES - - /* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. */ - #define STARTING_FRAME_OFFSET 0 - - /* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. */ - #define PUSH_ROUNDING(BYTES) (((BYTES) + 3) & ~3) - - /* Offset of first parameter from the argument pointer register value. */ - #define FIRST_PARM_OFFSET(FNDECL) 0 - - /* Value is the number of bytes of arguments automatically - popped when returning from a subroutine call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - SIZE is the number of bytes of arguments passed on the stack. */ - - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) - - /* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx (REG, TYPE_MODE (VALTYPE), S0_REGNUM) - - /* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - - #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, S0_REGNUM) - - /* Define this if PCC uses the nonreentrant convention for returning - structure and union values. */ - - #define PCC_STATIC_STRUCT_RETURN - - /* 1 if N is a possible register number for a function value. - On the Convex, S0 is the only register thus used. */ - - #define FUNCTION_VALUE_REGNO_P(N) ((N) == S0_REGNUM) - - /* 1 if N is a possible register number for function argument passing. */ - - #define FUNCTION_ARG_REGNO_P(N) 0 - - /* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. */ - /* On convex, simply count the arguments in case TARGET_ARGCOUNT is set. */ - - #define CUMULATIVE_ARGS int - - /* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. */ - - #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ - ((CUM) = 0) - - /* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be available.) */ - - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - ((CUM) += 1) - - /* Define where to put the arguments to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). - - Convex: all args go on the stack. But return the arg count - as the "next arg register" to be passed to gen_call. */ - - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - ((MODE) == VOIDmode ? GEN_INT ((CUM)) : 0) - - /* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. */ - - /* On convex, the code for a trampoline is - ld.w #,s0 - jmp */ - - #define TRAMPOLINE_TEMPLATE(FILE) \ - { \ - fprintf (FILE, "\tld.w #69696969,s0\n"); \ - fprintf (FILE, "\tjmp 52525252\n"); \ - } - - /* Length in units of the trampoline for entering a nested function. */ - - #define TRAMPOLINE_SIZE 12 - - /* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. */ - - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - { \ - emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 2)), CXT); \ - emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 8)), FNADDR); \ - emit_call_insn (gen_call_pop (gen_rtx (MEM, QImode, \ - gen_rtx (SYMBOL_REF, Pmode, \ - "__enable_execute_stack")), \ - const0_rtx, const0_rtx, const0_rtx)); \ - } - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\tldea LP%d,a1\n\tcallq mcount\n", (LABELNO)); - - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - - #define EXIT_IGNORE_STACK 1 - - /* Store in the variable DEPTH the initial difference between the - frame pointer reg contents and the stack pointer reg contents, - as of the start of the function body. This depends on the layout - of the fixed parts of the stack frame and on how registers are saved. */ - #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \ - { (DEPTH) = (get_frame_size () + 7) & -8; } - - /* Addressing modes, and classification of registers for them. */ - - /* #define HAVE_POST_INCREMENT 0 */ - /* #define HAVE_POST_DECREMENT 0 */ - - /* #define HAVE_PRE_DECREMENT 0 */ - /* #define HAVE_PRE_INCREMENT 0 */ - - /* Macros to check register numbers against specific register classes. */ - - /* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. */ - - #define REGNO_OK_FOR_INDEX_P(regno) \ - ((regno) <= LAST_VIRTUAL_REGISTER \ - ? regno_ok_for_index_p[regno] \ - : regno_ok_for_index_p[reg_renumber[regno]]) - - #define REGNO_OK_FOR_BASE_P(regno) REGNO_OK_FOR_INDEX_P (regno) - - /* Maximum number of registers that can appear in a valid memory address. */ - - #define MAX_REGS_PER_ADDRESS 1 - - /* 1 if X is an rtx for a constant that is a valid address. */ - - #define CONSTANT_ADDRESS_P(X) \ - (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ - || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ - || GET_CODE (X) == HIGH) - - /* Nonzero if the constant value X is a legitimate general operand. - It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ - - /* For convex, bounce 2-word constants that can't be immediate operands. */ - - #define LEGITIMATE_CONSTANT_P(X) \ - (GET_CODE (X) != CONST_DOUBLE \ - || GET_MODE (X) == SFmode \ - || LD_L_P (X) || LD_D_P (X)) - - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - - #ifndef REG_OK_STRICT - - /* Nonzero if X is a hard reg that can be used as an index - or if it is a pseudo reg. */ - #define REG_OK_FOR_INDEX_P(X) \ - (REGNO (X) > LAST_VIRTUAL_REGISTER || regno_ok_for_index_p[REGNO (X)]) - - /* Nonzero if X is a hard reg that can be used as a base reg - or if it is a pseudo reg. */ - #define REG_OK_FOR_BASE_P(X) REG_OK_FOR_INDEX_P (X) - - #else - - /* Nonzero if X is a hard reg that can be used as an index. */ - #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) - - /* Nonzero if X is a hard reg that can be used as a base reg. */ - #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) - - #endif - - /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. - - For Convex, valid addresses are - indirectable or (MEM indirectable) - where indirectable is - const, reg, (PLUS reg const) - - We don't use indirection since with insn scheduling, load + indexing - is better. */ - - /* 1 if X is an address that we could indirect through. */ - #define INDIRECTABLE_ADDRESS_P(X) \ - (CONSTANT_ADDRESS_P (X) \ - || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ - || (GET_CODE (X) == PLUS \ - && GET_CODE (XEXP (X, 0)) == REG \ - && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ - && CONSTANT_ADDRESS_P (XEXP (X, 1))) \ - || (GET_CODE (X) == PLUS \ - && GET_CODE (XEXP (X, 1)) == REG \ - && REG_OK_FOR_BASE_P (XEXP (X, 1)) \ - && CONSTANT_ADDRESS_P (XEXP (X, 0)))) - - /* Go to ADDR if X is a valid address. */ - #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ - { register rtx xfoob = (X); \ - if (INDIRECTABLE_ADDRESS_P (xfoob)) \ - goto ADDR; \ - if (GET_CODE (xfoob) == PRE_DEC && XEXP (xfoob, 0) == stack_pointer_rtx) \ - goto ADDR; \ - } - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. - - For Convex, nothing needs to be done. */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {} - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {} - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE SImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - Do not define this if the table should contain absolute addresses. */ - /* #define CASE_VECTOR_PC_RELATIVE 1 */ - - /* Define this if the case instruction drops through after the table - when the index is out of range. Don't define it if the case insn - jumps to the default label instead. */ - /* #define CASE_DROPS_THROUGH */ - - /* Define this as 1 if `char' should by default be signed; else as 0. */ - #define DEFAULT_SIGNED_CHAR 1 - - /* This flag, if defined, says the same insns that convert to a signed fixnum - also convert validly to an unsigned one. */ - #define FIXUNS_TRUNC_LIKE_FIX_TRUNC - - /* Max number of bytes we can move from memory to memory - in one reasonably fast instruction. */ - #define MOVE_MAX 8 - - /* Nonzero if access to memory by bytes is slow and undesirable. */ - #define SLOW_BYTE_ACCESS (! TARGET_C2) - - /* Define if shifts truncate the shift count - which implies one can omit a sign-extension or zero-extension - of a shift count. */ - /* #define SHIFT_COUNT_TRUNCATED */ - - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ - #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* On Convex, it is as good to call a constant function address as to - call an address kept in a register. */ - #define NO_FUNCTION_CSE - - /* When a prototype says `char' or `short', really pass an `int'. */ - #define PROMOTE_PROTOTYPES 1 - - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ - #define Pmode SImode - - /* A function address in a call instruction - is a byte address (for indexing purposes) - so give the MEM rtx a byte's mode. */ - #define FUNCTION_MODE QImode - - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - - #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - case CONST_INT: \ - case CONST_DOUBLE: \ - return 0; - - /* Provide the costs of a rtl expression. This is in the body of a - switch on CODE. */ - - #define RTX_COSTS(RTX,CODE,OUTER_CODE) \ - case PLUS: \ - if (GET_CODE (XEXP (RTX, 0)) == REG \ - && REG_POINTER (XEXP (RTX, 0)) \ - && GET_CODE (XEXP (RTX, 1)) == CONST_INT) \ - return 0; \ - else break; \ - case MULT: \ - return 4 * (char) (0x03060403 >> target_cpu * 8); \ - case ASHIFT: \ - case LSHIFTRT: \ - case ASHIFTRT: \ - return 4 * (char) (0x03010403 >> target_cpu * 8); \ - case MEM: \ - return 5; - - /* Compute the cost of an address. This is meant to approximate the size - and/or execution delay of an insn using that address. If the cost is - approximated by the RTL complexity, including CONST_COSTS above, as - is usually the case for CISC machines, this macro should not be defined. - For aggressively RISCy machines, only one insn format is allowed, so - this macro should be a constant. The value of this macro only matters - for valid addresses. */ - - #define ADDRESS_COST(RTX) 0 - - /* Specify the cost of a branch insn; roughly the number of extra insns that - should be added to avoid a branch. */ - - #define BRANCH_COST 0 - - /* Convex uses VAX or IEEE floats. - Follow the host format. */ - #define TARGET_FLOAT_FORMAT HOST_FLOAT_FORMAT - - /* But must prevent real.c from constructing VAX dfloats */ - #define REAL_VALUE_ATOF(X,S) atof (X) - - /* Check a `double' value for validity for a particular machine mode. */ - #define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \ - (OVERFLOW = check_float_value (MODE, &D, OVERFLOW)) - - /* Tell final.c how to eliminate redundant test instructions. */ - - /* Here we define machine-dependent flags and fields in cc_status - (see `conditions.h'). No extra ones are needed for convex. */ - - /* Store in cc_status the expressions - that the condition codes will describe - after execution of an instruction whose pattern is EXP. - Do not alter them if the instruction would not alter the cc's. */ - - #define NOTICE_UPDATE_CC(EXP,INSN) {} - - /* Control the assembler format that we output. */ - - /* Output at beginning of assembler file. */ - - #if _IEEE_FLOAT_ - #define ASM_FILE_START(FILE) fprintf (FILE, ";NO_APP\n.fpmode ieee\n") - #else - #define ASM_FILE_START(FILE) fprintf (FILE, ";NO_APP\n.fpmode native\n") - #endif - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #define ASM_APP_ON ";APP\n" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #define ASM_APP_OFF ";NO_APP\n" - - /* Alignment with Convex's assembler goes like this: - .text can be .aligned up to a halfword. - .data and .bss can be .aligned up to a longword. - .lcomm is not supported, explicit declarations in .bss must be used instead. - We get alignment for word and longword .text data by conventionally - using .text 2 for word-aligned data and .text 3 for longword-aligned - data. This requires that the data's size be a multiple of its alignment, - which seems to be always true. */ - - /* Output before read-only data. */ - - #define TEXT_SECTION_ASM_OP (current_section_is_text = 1, "\t.text") - - /* Output before writable data. */ - - #define DATA_SECTION_ASM_OP (current_section_is_text = 0, "\t.data") - - /* Output before uninitialized data. */ - - #define BSS_SECTION_ASM_OP (current_section_is_text = 0, "\t.bss") - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) do { \ - if (current_section_is_text && (LOG) > 1) \ - fprintf (FILE, ".text %d\n", LOG); \ - else if (current_section_is_text) \ - fprintf (FILE, ".text\n.align %d\n", 1 << (LOG)); \ - else \ - fprintf (FILE, ".align %d\n", 1 << (LOG)); } while (0) - - /* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - - #define REGISTER_NAMES \ - { \ - "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \ - "sp", "a1", "a2", "a3", "a4", "a5", "ap", "fp", \ - } - - /* This is BSD, so it wants DBX format. */ - - #define DBX_DEBUGGING_INFO - - /* Do not break .stabs pseudos into continuations. */ - - #define DBX_CONTIN_LENGTH 0 - - /* This is the char to use for continuation (in case we need to turn - continuation back on). */ - - #define DBX_CONTIN_CHAR '?' - - /* Don't use stab extensions until GDB v4 port is available for convex. */ - - #define DEFAULT_GDB_EXTENSIONS 0 - #define DBX_NO_XREFS - - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - - /* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) - - /* The prefix to add to user-visible assembler symbols. */ - - #define USER_LABEL_PREFIX "_" - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, "%s%d:\n", PREFIX, NUM) - - /* Put case tables in .text 2, where they will be word-aligned */ - - #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ - ASM_OUTPUT_ALIGN (FILE, 2); \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM) - - #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \ - ASM_OUTPUT_ALIGN (FILE, 1) - - /* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*%s%d", PREFIX, NUM) - - /* This is how to output a string */ - - #define ASM_OUTPUT_ASCII(FILE,STR,SIZE) do { \ - size_t i, limit = (SIZE); \ - fprintf ((FILE), "\tds.b \""); \ - for (i = 0; i < limit; i++) { \ - register int c = (STR)[i] & 0377; \ - if (c >= ' ' && c < 0177 && c != '\\' && c != '"') \ - putc (c, (FILE)); \ - else \ - fprintf ((FILE), "\\%03o", c);} \ - fprintf ((FILE), "\"\n");} while (0) - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tpsh.%c %s\n", \ - S_REGNO_P (REGNO) ? 'l' : 'w', \ - reg_names[REGNO]) - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tpop.%c %s\n", \ - S_REGNO_P (REGNO) ? 'l' : 'w', \ - reg_names[REGNO]) - - /* This is how to output an element of a case-vector that is absolute. */ - - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\tds.w L%d\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. - (not used on Convex) */ - - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\tds.w L%d-L%d\n", VALUE, REL) - - /* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\tds.b %u(0)\n", (SIZE)) - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( bss_section (), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ":\tbs.b %u\n", (ROUNDED))) - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - - /* Output an arg count before function entries. */ - - #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ - asm_declare_function_name (FILE, NAME, DECL) - - /* Print an instruction operand X on file FILE. - CODE is the code from the %-spec that requested printing this operand; - if `%z3' was used to print operand 3, then CODE is 'z'. */ - - #define PRINT_OPERAND(FILE, X, CODE) \ - print_operand (FILE, X, CODE) - - /* Print a memory operand whose address is X, on file FILE. */ - - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - print_operand_address (FILE, ADDR) - - /* Do not put out GNU stabs for constructors and destructors. - ld bounces them. */ - - #define FASCIST_ASSEMBLER - - /* __gcc_cleanup is loader-aliased to __ap$do_registered_functions if we - are linking against standard libc, 0 if old (-traditional) libc. */ - - #define EXIT_BODY \ - { \ - extern void __gcc_cleanup (); \ - if (__gcc_cleanup != _cleanup) \ - __gcc_cleanup (); \ - _cleanup (); \ - } - - /* Header for convex.c. - Here at the end so we can use types defined above. */ - - extern int target_cpu; - extern int current_section_is_text; - extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER]; - extern enum reg_class reg_class_from_letter[256]; - extern char regno_ok_for_index_p_base[]; - #define regno_ok_for_index_p (regno_ok_for_index_p_base + 1) - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/convex/convex.md gcc-3.3/gcc/config/convex/convex.md *** gcc-3.2.3/gcc/config/convex/convex.md 2001-11-11 01:48:55.000000000 +0000 --- gcc-3.3/gcc/config/convex/convex.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1885 **** - ;;- Machine description for GNU compiler, Convex Version - ;; Copyright (C) 1988, 1994, 1995, 1998, 1999 Free Software Foundation, Inc. - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - ;; Attribute specifications - - ; Target CPU - (define_attr "cpu" "c1,c32,c34,c38" - (const (symbol_ref "(enum attr_cpu) target_cpu"))) - - ;; Instruction classification - - (define_attr "type" - "alu,xalu,mldw,mldl,mldb,mst,adds,addd,mulw,mull,muls,muld,divw,divl,divs,divd,shfw,shfl,cvts,cvtd" - (const_string "alu")) - - ;; Instruction times - - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "mldw")) 2 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "mldl")) 4 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "mldw,mldl")) 2 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "mldw,mldl")) 4 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "mldw,mldl")) 2 0) - - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "mldb")) 9 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "mldb")) 36 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "mldb")) 21 0) - - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "xalu")) 1 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "xalu")) 1 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "xalu")) 5 0) - (define_function_unit "mem" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "xalu")) 2 0) - - (define_function_unit "add" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "adds,addd")) 3 2) - (define_function_unit "add" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "adds,addd")) 2 1) - (define_function_unit "add" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "adds,addd")) 5 2) - (define_function_unit "add" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "adds,addd")) 2 1) - - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "mulw,muls")) 3 2) - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "mulw,muls")) 4 2) - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "mulw,muls")) 6 2) - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "mulw,muls")) 3 2) - - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "mull,muld")) 4 3) - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "mull")) 10 7) - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "muld")) 5 2) - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "mull,muld")) 7 3) - (define_function_unit "mul" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "mull,muld")) 4 3) - - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "divw")) 24 24) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "divw")) 44 6) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "divw")) 14 10) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "divw")) 11 10) - - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "divl")) 41 42) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "divl")) 76 5) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "divl")) 22 18) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "divl")) 19 18) - - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "divs")) 22 22) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "divs")) 8 6) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "divs")) 13 9) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "divs")) 10 9) - - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "divd")) 37 38) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "divd")) 12 8) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "divd")) 20 16) - (define_function_unit "div" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "divd")) 17 16) - - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "cvts,cvtd")) 4 3) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "cvts")) 9 7) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "cvtd")) 9 6) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "cvts")) 6 2) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c34") (eq_attr "type" "cvtd")) 6 1) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "cvts,cvtd")) 3 1) - - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c1") (eq_attr "type" "shfw,shfl")) 3 2) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "shfw")) 7 5) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c32") (eq_attr "type" "shfl")) 7 4) - (define_function_unit "misc" 1 0 - (and (eq_attr "cpu" "c38") (eq_attr "type" "shfw,shfl")) 3 1) - - (define_function_unit "mystery_latch" 1 1 - (and (eq_attr "type" "!alu,mldw,mldl,adds,addd") (eq_attr "cpu" "c32")) 2 2) - - ;(define_function_unit "ip" 1 1 - ; (and (eq_attr "cpu" "c1") - ; (eq_attr "type" "divw,divl,divs,divd,xalu")) 2 2) - ;(define_function_unit "ip" 1 1 - ; (and (eq_attr "cpu" "c1") - ; (eq_attr "type" "!divw,divl,divs,divd,xalu")) 1 1) - ;(define_function_unit "ip" 1 1 - ; (and (eq_attr "cpu" "c32") - ; (eq_attr "type" "mull,muld,divl,divd,shfl,cvtd,xalu")) 2 2) - ;(define_function_unit "ip" 1 1 - ; (and (eq_attr "cpu" "c32") - ; (eq_attr "type" "!mull,muld,divl,divd,shfl,cvtd,xalu")) 1 1) - ;(define_function_unit "ip" 1 1 - ; (and (eq_attr "cpu" "c34") - ; (eq_attr "type" "addd,mull,muld,divl,divd,cvtd,xalu")) 2 2) - ;(define_function_unit "ip" 1 1 - ; (and (eq_attr "cpu" "c34") - ; (eq_attr "type" "!addd,mull,muld,divl,divd,cvtd,xalu")) 1 1) - - ;; Make the first thing a real insn in case of genattrtab bug - - (define_insn "nop" - [(const_int 0)] - "" - "nop") - - ;; Moves - - (define_expand "movdf" - [(set (match_operand:DF 0 "general_operand" "") - (match_operand:DF 1 "general_operand" ""))] - "" - "if (GET_CODE (operands[0]) != REG) - operands[1] = force_reg (DFmode, operands[1]);") - - (define_insn "" - [(set (match_operand:DF 0 "general_operand" "=d,d,d,d,d,<,m") - (match_operand:DF 1 "general_operand" "d,Q,m,G,H,d,d"))] - "register_operand (operands[0], DFmode) - || register_operand (operands[1], DFmode)" - "@ - mov %1,%0 - ldb.d %1,%0 - ld.d %1,%0 - ld.d %u1,%0 - ld.l %v1,%0 - psh.l %1 - st.d %1,%0" - [(set_attr "type" "alu,mldb,mldl,alu,alu,alu,mst")]) - - ;; This is here so we can load any result of RTL constant folding - ;; but do not use it on constants that can be loaded from memory. - ;; It is never better and can be worse. - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=d") - (match_operand:DF 1 "const_double_operand" "F"))] - "mem_for_const_double (operands[1]) == 0" - "ld.u %u1,%0\;ld.w %v1,%0" - [(set_attr "type" "xalu")]) - - (define_expand "movsf" - [(set (match_operand:SF 0 "general_operand" "") - (match_operand:SF 1 "general_operand" ""))] - "" - "if (GET_CODE (operands[0]) != REG) - operands[1] = force_reg (SFmode, operands[1]);") - - (define_insn "" - [(set (match_operand:SF 0 "general_operand" "=d,d,d,d,<,m") - (match_operand:SF 1 "general_operand" "d,Q,m,F,d,d"))] - "register_operand (operands[0], SFmode) - || register_operand (operands[1], SFmode)" - "@ - mov.s %1,%0 - ldb.s %1,%0 - ld.s %1,%0 - ld.s %1,%0 - psh.w %1 - st.s %1,%0" - [(set_attr "type" "alu,mldb,mldw,alu,alu,mst")]) - - (define_expand "movdi" - [(set (match_operand:DI 0 "general_operand" "") - (match_operand:DI 1 "general_operand" ""))] - "" - "if (GET_CODE (operands[0]) != REG) - operands[1] = force_reg (DImode, operands[1]);") - - (define_insn "" - [(set (match_operand:DI 0 "general_operand" "=d,d,d,d,d,<,m") - (match_operand:DI 1 "general_operand" "d,Q,m,G,HI,d,d"))] - "register_operand (operands[0], DImode) - || register_operand (operands[1], DImode)" - "@ - mov %1,%0 - ldb.l %1,%0 - ld.l %1,%0 - ld.d %u1,%0 - ld.l %1,%0 - psh.l %1 - st.l %1,%0" - [(set_attr "type" "alu,mldb,mldl,alu,alu,alu,mst")]) - - ;; This is here so we can load any result of RTL constant folding - ;; but do not use it on constants that can be loaded from memory. - ;; It is never better and can be worse. - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (match_operand:DI 1 "const_double_operand" "F"))] - "mem_for_const_double (operands[1]) == 0" - "ld.u %u1,%0\;ld.w %v1,%0" - [(set_attr "type" "xalu")]) - - (define_expand "movsi" - [(set (match_operand:SI 0 "general_operand" "") - (match_operand:SI 1 "general_operand" ""))] - "" - "if (GET_CODE (operands[0]) != REG) - operands[1] = force_reg (SImode, operands[1]);") - - (define_insn "" - [(set (match_operand:SI 0 "push_operand" "=<,<") - (match_operand:SI 1 "nonmemory_operand" "Ad,i"))] - "" - "@ - psh.w %1 - pshea %a1") - - (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=d,r,d,r,r,m") - (match_operand:SI 1 "general_operand" "d,r,Q,m,i,r"))] - "register_operand (operands[0], SImode) - || register_operand (operands[1], SImode)" - "@ - mov.w %1,%0 - mov %1,%0 - ldb.w %1,%0 - ld.w %1,%0 - ld.w %1,%0 - st.w %1,%0" - [(set_attr "type" "alu,alu,mldb,mldw,alu,mst")]) - - (define_expand "movstrictsi" - [(set (strict_low_part (match_operand:SI 0 "general_operand" "")) - (match_operand:SI 1 "general_operand" ""))] - "" - "if (GET_CODE (operands[0]) != REG) - operands[1] = force_reg (SImode, operands[1]);") - - (define_insn "" - [(set (strict_low_part (match_operand:SI 0 "general_operand" "+d,r,d,r,r,m")) - (match_operand:SI 1 "general_operand" "d,r,Q,m,i,r"))] - "register_operand (operands[0], SImode) - || register_operand (operands[1], SImode)" - "@ - mov.w %1,%0 - mov %1,%0 - ldb.w %1,%0 - ld.w %1,%0 - ld.w %1,%0 - st.w %1,%0" - [(set_attr "type" "alu,alu,mldb,mldw,alu,mst")]) - - (define_expand "movhi" - [(set (match_operand:HI 0 "general_operand" "") - (match_operand:HI 1 "general_operand" ""))] - "" - "if (GET_CODE (operands[0]) != REG) - operands[1] = force_reg (HImode, operands[1]);") - - (define_insn "" - [(set (match_operand:HI 0 "general_operand" "=d,r,d,r,r,<,m") - (match_operand:HI 1 "general_operand" "d,r,Q,m,i,Ad,r"))] - "register_operand (operands[0], HImode) - || register_operand (operands[1], HImode)" - "@ - mov.w %1,%0 - mov %1,%0 - ldb.h %1,%0 - ld.h %1,%0 - ld.w %1,%0 - psh.w %1 - st.h %1,%0" - [(set_attr "type" "alu,alu,mldb,mldw,alu,alu,mst")]) - - (define_expand "movqi" - [(set (match_operand:QI 0 "general_operand" "") - (match_operand:QI 1 "general_operand" ""))] - "" - "if (GET_CODE (operands[0]) != REG) - operands[1] = force_reg (QImode, operands[1]);") - - (define_insn "" - [(set (match_operand:QI 0 "general_operand" "=d,r,d,r,r,<,m") - (match_operand:QI 1 "general_operand" "d,r,Q,m,i,Ad,r"))] - "register_operand (operands[0], QImode) - || register_operand (operands[1], QImode)" - "@ - mov.w %1,%0 - mov %1,%0 - ldb.b %1,%0 - ld.b %1,%0 - ld.w %1,%0 - psh.w %1 - st.b %1,%0" - [(set_attr "type" "alu,alu,mldb,mldw,alu,alu,mst")]) - - ;; Expand block moves manually to get code that pipelines the loads. - - (define_expand "movstrsi" - [(set (match_operand:BLK 0 "memory_operand" "=m") - (match_operand:BLK 1 "memory_operand" "m")) - (use (match_operand:SI 2 "const_int_operand" "i")) - (use (match_operand:SI 3 "const_int_operand" "i"))] - "" - " expand_movstr (operands); DONE; ") - - ;; Extension and truncation insns. - ;; Those for integer source operand - ;; are ordered widest source type first. - - (define_insn "truncsiqi2" - [(set (match_operand:QI 0 "register_operand" "=d,a") - (truncate:QI (match_operand:SI 1 "register_operand" "d,a")))] - "" - "cvtw.b %1,%0") - - (define_insn "truncsihi2" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (truncate:HI (match_operand:SI 1 "register_operand" "d,a")))] - "" - "cvtw.h %1,%0") - - (define_insn "trunchiqi2" - [(set (match_operand:QI 0 "register_operand" "=r") - (truncate:QI (match_operand:HI 1 "register_operand" "0")))] - "" - "") - - (define_insn "truncdisi2" - [(set (match_operand:SI 0 "register_operand" "=d") - (truncate:SI (match_operand:DI 1 "register_operand" "d")))] - "" - "cvtl.w %1,%0") - - (define_insn "extendsidi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (sign_extend:DI (match_operand:SI 1 "register_operand" "d")))] - "" - "cvtw.l %1,%0") - - (define_insn "extendhisi2" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (sign_extend:SI (match_operand:HI 1 "register_operand" "d,a")))] - "" - "cvth.w %1,%0") - - (define_insn "extendqihi2" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (sign_extend:HI (match_operand:QI 1 "register_operand" "d,a")))] - "" - "cvtb.w %1,%0") - - (define_insn "extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (sign_extend:SI (match_operand:QI 1 "register_operand" "d,a")))] - "" - "cvtb.w %1,%0") - - (define_insn "extendsfdf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (float_extend:DF (match_operand:SF 1 "register_operand" "d")))] - "" - "cvts.d %1,%0" - [(set_attr "type" "cvts")]) - - (define_insn "truncdfsf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (float_truncate:SF (match_operand:DF 1 "register_operand" "d")))] - "" - "cvtd.s %1,%0" - [(set_attr "type" "cvtd")]) - - (define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (match_operand:HI 1 "register_operand" "0")))] - "" - "and #0xffff,%0") - - (define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "register_operand" "=r") - (zero_extend:HI (match_operand:QI 1 "register_operand" "0")))] - "" - "and #0xff,%0") - - (define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (match_operand:QI 1 "register_operand" "0")))] - "" - "and #0xff,%0") - - (define_insn "zero_extendsidi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (zero_extend:DI (match_operand:SI 1 "register_operand" "0")))] - "" - "ld.u #0,%0") - - ;; Fix-to-float conversion insns. - ;; Note that the ones that start with SImode come first. - ;; That is so that an operand that is a CONST_INT - ;; (and therefore lacks a specific machine mode). - ;; will be recognized as SImode (which is always valid) - ;; rather than as QImode or HImode. - - (define_insn "floatsisf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (float:SF (match_operand:SI 1 "register_operand" "d")))] - "" - "cvtw.s %1,%0" - [(set_attr "type" "cvts")]) - - (define_insn "floatdisf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (float:SF (match_operand:DI 1 "register_operand" "d")))] - "" - "cvtl.s %1,%0" - [(set_attr "type" "cvtd")]) - - (define_insn "floatsidf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (float:DF (match_operand:SI 1 "register_operand" "d")))] - "! TARGET_C1" - "cvtw.d %1,%0" - [(set_attr "type" "cvts")]) - - (define_insn "floatdidf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (float:DF (match_operand:DI 1 "register_operand" "d")))] - "" - "cvtl.d %1,%0" - [(set_attr "type" "cvtd")]) - - ;; These are a little slower than gcc's normal way of doing unsigned - ;; DI floats (if the DI number is "negative") but they avoid double - ;; rounding and they avoid explicit constants. - - (define_expand "floatunsdidf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (float:DF (match_operand:DI 1 "register_operand" "d"))) - (set (cc0) (compare:DI (match_dup 3) (match_dup 1))) - (set (pc) - (if_then_else (le (cc0) (const_int 0)) - (label_ref (match_dup 4)) - (pc))) - (set (match_dup 2) (lshiftrt:DI (match_dup 1) (const_int 1))) - (set (match_dup 0) (float:DF (match_dup 2))) - (set (match_dup 0) (plus:DF (match_dup 0) (match_dup 0))) - (match_dup 4) - (set (match_dup 0) (match_dup 0))] - "" - " - { - operands[2] = gen_reg_rtx (DImode); - operands[3] = force_reg (DImode, const0_rtx); - operands[4] = gen_label_rtx (); - }") - - (define_expand "floatunsdisf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (float:SF (match_operand:DI 1 "register_operand" "d"))) - (set (cc0) (compare:DI (match_dup 3) (match_dup 1))) - (set (pc) - (if_then_else (le (cc0) (const_int 0)) - (label_ref (match_dup 4)) - (pc))) - (set (match_dup 2) (lshiftrt:DI (match_dup 1) (const_int 1))) - (set (match_dup 0) (float:SF (match_dup 2))) - (set (match_dup 0) (plus:SF (match_dup 0) (match_dup 0))) - (match_dup 4) - (set (match_dup 0) (match_dup 0))] - "" - " - { - operands[2] = gen_reg_rtx (DImode); - operands[3] = force_reg (DImode, const0_rtx); - operands[4] = gen_label_rtx (); - }") - - ;; These patterns are identical to gcc's default action - ;; if DI->DF and DI->SF are not present. There are here - ;; only to prevent SI->*F from promoting to DI->*F. - - (define_expand "floatunssidf2" - [(set (match_dup 2) - (zero_extend:DI (match_operand:SI 1 "register_operand" ""))) - (set (match_operand:DF 0 "register_operand" "") - (float:DF (match_dup 2)))] - "" - "operands[2] = gen_reg_rtx (DImode);") - - (define_expand "floatunssisf2" - [(set (match_dup 2) - (zero_extend:DI (match_operand:SI 1 "register_operand" ""))) - (set (match_operand:SF 0 "register_operand" "") - (float:SF (match_dup 2)))] - "" - "operands[2] = gen_reg_rtx (DImode);") - - ;; Float-to-fix conversion insns. - - (define_insn "fix_truncsfsi2" - [(set (match_operand:SI 0 "register_operand" "=d") - (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "d"))))] - "" - "cvts.w %1,%0" - [(set_attr "type" "cvts")]) - - (define_insn "fix_truncsfdi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "d"))))] - "" - "cvts.l %1,%0" - [(set_attr "type" "cvts")]) - - (define_insn "fix_truncdfsi2" - [(set (match_operand:SI 0 "register_operand" "=d") - (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "d"))))] - "" - "cvtd.l %1,%0" - [(set_attr "type" "cvtd")]) - - (define_insn "fix_truncdfdi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "d"))))] - "" - "cvtd.l %1,%0" - [(set_attr "type" "cvtd")]) - - ;;- All kinds of add instructions. - - (define_insn "adddf3" - [(set (match_operand:DF 0 "register_operand" "=d") - (plus:DF (match_operand:DF 1 "register_operand" "%0") - (match_operand:DF 2 "register_operand" "d")))] - "" - "add.d %2,%0" - [(set_attr "type" "addd")]) - - (define_insn "addsf3" - [(set (match_operand:SF 0 "register_operand" "=d") - (plus:SF (match_operand:SF 1 "register_operand" "%0") - (match_operand:SF 2 "nonmemory_operand" "dF")))] - "" - "add.s %2,%0" - [(set_attr "type" "adds")]) - - (define_insn "adddi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (plus:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "register_operand" "d")))] - "" - "add.l %2,%0") - - (define_expand "addsi3" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (match_operand:SI 1 "register_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))] - "" - "") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=a") - (plus:SI (match_operand:SI 1 "register_operand" "%A") - (match_operand:SI 2 "immediate_operand" "i")))] - "operands[1] == frame_pointer_rtx || operands[1] == arg_pointer_rtx" - "ldea %a2(%1),%0") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=a") - (plus:SI (match_operand:SI 1 "register_operand" "%a") - (match_operand:SI 2 "nonmemory_operand" "ri")))] - "operands[1] == stack_pointer_rtx && operands[0] != stack_pointer_rtx" - "mov %1,%0\;add.w %2,%0") - - (define_insn "" - [(set (match_operand:SI 0 "push_operand" "=<") - (plus:SI (match_operand:SI 1 "register_operand" "A") - (match_operand:SI 2 "immediate_operand" "i")))] - "operands[1] != stack_pointer_rtx" - "pshea %a2(%1)" - [(set_attr "type" "mst")]) - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d,a,a") - (plus:SI (match_operand:SI 1 "register_operand" "%0,0,A") - (match_operand:SI 2 "nonmemory_operand" "di,ri,i")))] - "TARGET_C1" - "@ - add.w %2,%0 - add.w %2,%0 - ldea %a2(%1),%0") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d,a,r") - (plus:SI (match_operand:SI 1 "register_operand" "%0,0,A") - (match_operand:SI 2 "nonmemory_operand" "di,ri,i")))] - "" - "@ - add.w %2,%0 - add.w %2,%0 - ldea %a2(%1),%0") - - (define_insn "addhi3" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (plus:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "nonmemory_operand" "di,ai")))] - "" - "add.h %2,%0") - - (define_insn "addqi3" - [(set (match_operand:QI 0 "register_operand" "=d,d") - (plus:QI (match_operand:QI 1 "register_operand" "%0,0") - (match_operand:QI 2 "nonmemory_operand" "d,i")))] - "" - "@ - add.b %2,%0 - add.w %2,%0") - - ;;- All kinds of subtract instructions. - - (define_insn "subdf3" - [(set (match_operand:DF 0 "register_operand" "=d") - (minus:DF (match_operand:DF 1 "register_operand" "0") - (match_operand:DF 2 "register_operand" "d")))] - "" - "sub.d %2,%0" - [(set_attr "type" "addd")]) - - (define_insn "subsf3" - [(set (match_operand:SF 0 "register_operand" "=d") - (minus:SF (match_operand:SF 1 "register_operand" "0") - (match_operand:SF 2 "nonmemory_operand" "dF")))] - "" - "sub.s %2,%0" - [(set_attr "type" "adds")]) - - (define_insn "subdi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (minus:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:DI 2 "register_operand" "d")))] - "" - "sub.l %2,%0") - - (define_insn "subsi3" - [(set (match_operand:SI 0 "register_operand" "=d,a,?d,?a") - (minus:SI (match_operand:SI 1 "nonmemory_operand" "0,0,di,ai") - (match_operand:SI 2 "nonmemory_operand" "di,ai,0,0")))] - "" - "@ - sub.w %2,%0 - sub.w %2,%0 - sub.w %1,%0\;neg.w %0,%0 - sub.w %1,%0\;neg.w %0,%0") - - (define_insn "subhi3" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (minus:HI (match_operand:HI 1 "register_operand" "0,0") - (match_operand:HI 2 "nonmemory_operand" "di,ai")))] - "" - "sub.h %2,%0") - - (define_insn "subqi3" - [(set (match_operand:QI 0 "register_operand" "=d,d") - (minus:QI (match_operand:QI 1 "register_operand" "0,0") - (match_operand:QI 2 "nonmemory_operand" "d,i")))] - "" - "@ - sub.b %2,%0 - sub.w %2,%0") - - ;;- Multiply instructions. - - (define_insn "muldf3" - [(set (match_operand:DF 0 "register_operand" "=d") - (mult:DF (match_operand:DF 1 "register_operand" "%0") - (match_operand:DF 2 "register_operand" "d")))] - "" - "mul.d %2,%0" - [(set_attr "type" "muld")]) - - (define_insn "mulsf3" - [(set (match_operand:SF 0 "register_operand" "=d") - (mult:SF (match_operand:SF 1 "register_operand" "%0") - (match_operand:SF 2 "nonmemory_operand" "dF")))] - "" - "mul.s %2,%0" - [(set_attr "type" "muls")]) - - (define_insn "muldi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (mult:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "register_operand" "d")))] - "" - "mul.l %2,%0" - [(set_attr "type" "mull")]) - - (define_insn "mulsi3" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (mult:SI (match_operand:SI 1 "register_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "" - "mul.w %2,%0" - [(set_attr "type" "mulw")]) - - (define_insn "mulhi3" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (mult:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "nonmemory_operand" "di,ai")))] - "" - "mul.h %2,%0" - [(set_attr "type" "mulw")]) - - (define_insn "mulqi3" - [(set (match_operand:QI 0 "register_operand" "=d,d") - (mult:QI (match_operand:QI 1 "register_operand" "%0,0") - (match_operand:QI 2 "nonmemory_operand" "d,i")))] - "" - "@ - mul.b %2,%0 - mul.w %2,%0" - [(set_attr "type" "mulw,mulw")]) - - ;;- Divide instructions. - - (define_insn "divdf3" - [(set (match_operand:DF 0 "register_operand" "=d") - (div:DF (match_operand:DF 1 "register_operand" "0") - (match_operand:DF 2 "register_operand" "d")))] - "" - "div.d %2,%0" - [(set_attr "type" "divd")]) - - (define_insn "divsf3" - [(set (match_operand:SF 0 "register_operand" "=d") - (div:SF (match_operand:SF 1 "register_operand" "0") - (match_operand:SF 2 "nonmemory_operand" "dF")))] - "" - "div.s %2,%0" - [(set_attr "type" "divs")]) - - (define_insn "divdi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (div:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:DI 2 "register_operand" "d")))] - "" - "div.l %2,%0" - [(set_attr "type" "divl")]) - - (define_expand "udivsi3" - [(set (match_dup 3) - (zero_extend:DI (match_operand:SI 1 "register_operand" ""))) - (set (match_dup 4) - (zero_extend:DI (match_operand:SI 2 "register_operand" ""))) - (set (match_dup 3) - (div:DI (match_dup 3) (match_dup 4))) - (set (match_operand:SI 0 "register_operand" "") - (subreg:SI (match_dup 3) 0))] - "" - "operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); ") - - (define_insn "udivdi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (udiv:DI (match_operand:DI 1 "register_operand" "d") - (match_operand:DI 2 "register_operand" "d")))] - "" - "psh.l %2\;psh.l %1\;callq udiv64\;pop.l %0\;add.w #8,sp") - - (define_insn "divsi3" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (div:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "" - "div.w %2,%0" - [(set_attr "type" "divw")]) - - (define_insn "divhi3" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (div:HI (match_operand:HI 1 "register_operand" "0,0") - (match_operand:HI 2 "nonmemory_operand" "di,ai")))] - "" - "div.h %2,%0" - [(set_attr "type" "divw")]) - - (define_insn "divqi3" - [(set (match_operand:QI 0 "register_operand" "=d") - (div:QI (match_operand:QI 1 "register_operand" "0") - (match_operand:QI 2 "register_operand" "d")))] - "" - "div.b %2,%0" - [(set_attr "type" "divw")]) - - ;;- Bit clear instructions. - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (and:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "" "")))] - "(GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0) - || (GET_CODE (operands[2]) == CONST_DOUBLE - && CONST_DOUBLE_HIGH (operands[2]) == -1)" - "and %2,%0") - - (define_insn "anddi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (and:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "register_operand" "d")))] - "" - "and %2,%0") - - (define_insn "andsi3" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (and:SI (match_operand:SI 1 "register_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "" - "and %2,%0") - - (define_insn "andhi3" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (and:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "nonmemory_operand" "di,ai")))] - "" - "and %2,%0") - - (define_insn "andqi3" - [(set (match_operand:QI 0 "register_operand" "=d,a") - (and:QI (match_operand:QI 1 "register_operand" "%0,0") - (match_operand:QI 2 "nonmemory_operand" "di,ai")))] - "" - "and %2,%0") - - ;;- Bit set instructions. - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (ior:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "" "")))] - "(GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0) - || (GET_CODE (operands[2]) == CONST_DOUBLE - && CONST_DOUBLE_HIGH (operands[2]) == 0)" - "or %2,%0") - - (define_insn "iordi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (ior:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "register_operand" "d")))] - "" - "or %2,%0") - - (define_insn "iorsi3" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (ior:SI (match_operand:SI 1 "register_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "" - "or %2,%0") - - (define_insn "iorhi3" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (ior:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "nonmemory_operand" "di,ai")))] - "" - "or %2,%0") - - (define_insn "iorqi3" - [(set (match_operand:QI 0 "register_operand" "=d,a") - (ior:QI (match_operand:QI 1 "register_operand" "%0,0") - (match_operand:QI 2 "nonmemory_operand" "di,ai")))] - "" - "or %2,%0") - - ;;- xor instructions. - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (xor:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "" "")))] - "(GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0) - || (GET_CODE (operands[2]) == CONST_DOUBLE - && CONST_DOUBLE_HIGH (operands[2]) == 0)" - "xor %2,%0") - - (define_insn "xordi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (xor:DI (match_operand:DI 1 "register_operand" "%0") - (match_operand:DI 2 "register_operand" "d")))] - "" - "xor %2,%0") - - (define_insn "xorsi3" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (xor:SI (match_operand:SI 1 "register_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "" - "xor %2,%0") - - (define_insn "xorhi3" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (xor:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "nonmemory_operand" "di,ai")))] - "" - "xor %2,%0") - - (define_insn "xorqi3" - [(set (match_operand:QI 0 "register_operand" "=d,a") - (xor:QI (match_operand:QI 1 "register_operand" "%0,0") - (match_operand:QI 2 "nonmemory_operand" "di,ai")))] - "" - "xor %2,%0") - - (define_insn "negdf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (neg:DF (match_operand:DF 1 "register_operand" "d")))] - "" - "neg.d %1,%0" - [(set_attr "type" "addd")]) - - (define_insn "negsf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (neg:SF (match_operand:SF 1 "register_operand" "d")))] - "" - "neg.s %1,%0" - [(set_attr "type" "adds")]) - - (define_insn "negdi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (neg:DI (match_operand:DI 1 "register_operand" "d")))] - "" - "neg.l %1,%0") - - (define_insn "negsi2" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (neg:SI (match_operand:SI 1 "register_operand" "d,a")))] - "" - "neg.w %1,%0") - - (define_insn "neghi2" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (neg:HI (match_operand:HI 1 "register_operand" "d,a")))] - "" - "neg.h %1,%0") - - (define_insn "negqi2" - [(set (match_operand:QI 0 "register_operand" "=d") - (neg:QI (match_operand:QI 1 "register_operand" "d")))] - "" - "neg.b %1,%0") - - (define_insn "one_cmpldi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (not:DI (match_operand:DI 1 "register_operand" "d")))] - "" - "not %1,%0") - - (define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (not:SI (match_operand:SI 1 "register_operand" "d,a")))] - "" - "not %1,%0") - - (define_insn "one_cmplhi2" - [(set (match_operand:HI 0 "register_operand" "=d,a") - (not:HI (match_operand:HI 1 "register_operand" "d,a")))] - "" - "not %1,%0") - - (define_insn "one_cmplqi2" - [(set (match_operand:QI 0 "register_operand" "=d,a") - (not:QI (match_operand:QI 1 "register_operand" "d,a")))] - "" - "not %1,%0") - - ;;- Shifts - ;; - ;; The extreme profusion of patterns here is due to the different-speed - ;; shifts on different machines, and the C1's lack of word shift S-register - ;; instructions. - - ;; SImode - - ;; Arithmetic left 1, 1 cycle on all machines via add - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashift:SI (match_operand:SI 1 "register_operand" "0") - (const_int 1)))] - "" - "add.w %0,%0") - - ;; C34 general shift is 1 cycle - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (ashift:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "TARGET_C34" - "@ - shf.w %2,%0 - shf %2,%0" - [(set_attr "type" "shfw,shfw")]) - - ;; else shift left 0..7 is 1 cycle if we use an A register - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=a,?d") - (ashift:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "immediate_operand" "ai,di")))] - "TARGET_C1 && INTVAL (operands[2]) < (unsigned) 8" - "@ - shf %2,%0 - shf %2,%0" - [(set_attr "type" "alu,shfl")]) - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=a,?d") - (ashift:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "immediate_operand" "ai,di")))] - "INTVAL (operands[2]) < (unsigned) 8" - "@ - shf %2,%0 - shf.w %2,%0" - [(set_attr "type" "alu,shfw")]) - - ;; else general left shift - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (ashift:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "TARGET_C1" - "@ - shf %2,%0 - shf %2,%0" - [(set_attr "type" "shfl,shfw")]) - - ;; but C2 left shift by a constant is faster via multiply - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashift:SI (match_operand:SI 1 "register_operand" "0") - (match_operand:SI 2 "const_int_operand" "i")))] - "TARGET_C2 && INTVAL (operands[2]) < (unsigned) 32" - "mul.w %z2,%0" - [(set_attr "type" "mulw")]) - - (define_insn "ashlsi3" - [(set (match_operand:SI 0 "register_operand" "=d,a") - (ashift:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "nonmemory_operand" "di,ai")))] - "" - "@ - shf.w %2,%0 - shf %2,%0" - [(set_attr "type" "shfw,shfw")]) - - ;; Logical right, general - ;; The hardware wants the negative of the shift count - - (define_expand "lshrsi3" - [(set (match_operand:SI 0 "register_operand" "") - (lshiftrt:SI (match_operand:SI 1 "register_operand" "") - (neg:SI (match_operand:SI 2 "nonmemory_operand" ""))))] - "" - "operands[2] = negate_rtx (SImode, operands[2]);") - - ;; C1 lacks word shift S reg - - (define_insn "" - [(set - (match_operand:SI 0 "register_operand" "=a,?d") - (lshiftrt:SI (match_operand:SI 1 "register_operand" "0,0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "ai,di"))))] - "TARGET_C1" - "@ - shf %2,%0 - ld.u #0,%0\;shf %2,%0" - [(set_attr "type" "shfw,shfl")]) - - ;; general case - - (define_insn "" - [(set - (match_operand:SI 0 "register_operand" "=d,a") - (lshiftrt:SI (match_operand:SI 1 "register_operand" "0,0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "di,ai"))))] - "" - "@ - shf.w %2,%0 - shf %2,%0" - [(set_attr "type" "shfw,shfw")]) - - ;; Patterns without neg produced by constant folding - - (define_insn "" - [(set - (match_operand:SI 0 "register_operand" "=a,?d") - (lshiftrt:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "immediate_operand" "i,i")))] - "TARGET_C1" - "@ - shf #%n2,%0 - ld.u #0,%0\;shf #%n2,%0" - [(set_attr "type" "shfw,shfl")]) - - (define_insn "" - [(set - (match_operand:SI 0 "register_operand" "=d,a") - (lshiftrt:SI (match_operand:SI 1 "register_operand" "0,0") - (match_operand:SI 2 "immediate_operand" "i,i")))] - "" - "@ - shf.w #%n2,%0 - shf #%n2,%0" - [(set_attr "type" "shfw,shfw")]) - - ;; Arithmetic right, general - ;; Sign-extend to 64 bits, then shift that. Works for 0..32. - - (define_expand "ashrsi3" - [(set (match_operand:SI 0 "register_operand" "") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "") - (neg:SI (match_operand:SI 2 "nonmemory_operand" ""))))] - "" - "operands[2] = negate_rtx (SImode, operands[2]);") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d,&d") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "0,d") - (neg:SI - (match_operand:SI 2 "nonmemory_operand" "di,di"))))] - "" - "cvtw.l %1,%0\;shf %2,%0" - [(set_attr "type" "shfl,shfl")]) - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "d") - (match_operand:SI 2 "immediate_operand" "i")))] - "" - "cvtw.l %1,%0\;shf #%n2,%0" - [(set_attr "type" "shfl")]) - - ;; DImode - ;; Arithmetic left, 1-cycle - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (ashift:DI (match_operand:DI 1 "register_operand" "0") - (const_int 1)))] - "" - "add.l %0,%0") - - ;; Arithmetic left, general - - (define_insn "ashldi3" - [(set (match_operand:DI 0 "register_operand" "=d") - (ashift:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:SI 2 "nonmemory_operand" "di")))] - "" - "shf %2,%0" - [(set_attr "type" "shfl")]) - - ;; Can omit zero- or sign-extend if shift is 32 or more. - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (ashift:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "0")) - (match_operand:SI 2 "const_int_operand" "i")))] - "INTVAL (operands[2]) >= 32" - "shf %2,%0" - [(set_attr "type" "shfl")]) - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (ashift:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "0")) - (match_operand:SI 2 "const_int_operand" "i")))] - "INTVAL (operands[2]) >= 32" - "shf %2,%0" - [(set_attr "type" "shfl")]) - - ;; Logical right, general - - (define_expand "lshrdi3" - [(set (match_operand:DI 0 "register_operand" "") - (lshiftrt:DI (match_operand:DI 1 "register_operand" "") - (neg:SI (match_operand:SI 2 "nonmemory_operand" ""))))] - "" - "operands[2] = negate_rtx (SImode, operands[2]);") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (lshiftrt:DI (match_operand:DI 1 "register_operand" "0") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "di"))))] - "" - "shf %2,%0" - [(set_attr "type" "shfl")]) - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=d") - (lshiftrt:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:SI 2 "immediate_operand" "i")))] - "" - "shf #%n2,%0" - [(set_attr "type" "shfl")]) - - ;; Arithmetic right, general - ;; Use - ;; ((a >> b) ^ signbit) - signbit - ;; where signbit is (1 << 63) >> b - ;; Works for 0..63. Does not work for 64; unfortunate but valid. - - (define_expand "ashrdi3" - [(set (match_operand:DI 0 "register_operand" "") - (lshiftrt:DI (match_operand:DI 1 "register_operand" "") - (neg:SI (match_operand:SI 2 "nonmemory_operand" "")))) - (set (match_dup 3) (lshiftrt:DI (match_dup 3) (neg:SI (match_dup 2)))) - (set (match_dup 0) (xor:DI (match_dup 0) (match_dup 3))) - (set (match_dup 0) (minus:DI (match_dup 0) (match_dup 3)))] - "" - " - { - if (GET_CODE (operands[2]) == CONST_INT) - switch (INTVAL (operands[2])) - { - case 32: - emit_insn (gen_ashrdi3_32 (operands[0], operands[1])); - DONE; - } - - operands[2] = negate_rtx (SImode, operands[2]); - operands[3] = force_reg (DImode, immed_double_const (0, 1 << 31, DImode)); - }") - - ;; Arithmetic right 32, a common case that can save a couple of insns. - - (define_expand "ashrdi3_32" - [(set (match_operand:DI 0 "register_operand" "") - (lshiftrt:DI (match_operand:DI 1 "register_operand" "") - (const_int 32))) - (set (match_dup 0) - (sign_extend:DI (subreg:SI (match_dup 0) 0)))] - "" - "") - - ;; __builtin instructions - - (define_insn "sqrtdf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (sqrt:DF (match_operand:DF 1 "register_operand" "0")))] - "! TARGET_C1 && flag_unsafe_math_optimizations" - "sqrt.d %0" - [(set_attr "type" "divd")]) - - (define_insn "sqrtsf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (sqrt:SF (match_operand:SF 1 "register_operand" "0")))] - "! TARGET_C1 && flag_unsafe_math_optimizations" - "sqrt.s %0" - [(set_attr "type" "divs")]) - - (define_insn "sindf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (unspec:DF [(match_operand:DF 1 "register_operand" "0")] 1))] - "! TARGET_C1 && flag_unsafe_math_optimizations" - "sin.d %0") - - (define_insn "sinsf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (unspec:SF [(match_operand:SF 1 "register_operand" "0")] 1))] - "! TARGET_C1 && flag_unsafe_math_optimizations" - "sin.s %0") - - (define_insn "cosdf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (unspec:DF [(match_operand:DF 1 "register_operand" "0")] 2))] - "! TARGET_C1 && flag_unsafe_math_optimizations" - "cos.d %0") - - (define_insn "cossf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (unspec:SF [(match_operand:SF 1 "register_operand" "0")] 2))] - "! TARGET_C1 && flag_unsafe_math_optimizations" - "cos.s %0") - - (define_insn "ftruncdf2" - [(set (match_operand:DF 0 "register_operand" "=d") - (fix:DF (match_operand:DF 1 "register_operand" "d")))] - "! TARGET_C1" - "frint.d %1,%0" - [(set_attr "type" "cvtd")]) - - (define_insn "ftruncsf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (fix:SF (match_operand:SF 1 "register_operand" "d")))] - "! TARGET_C1" - "frint.s %1,%0" - [(set_attr "type" "cvts")]) - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d") - (minus:SI (ffs:SI (match_operand:SI 1 "register_operand" "d")) - (const_int 1)))] - "" - "tzc %1,%0\;le.w #32,%0\;jbrs.f L0%=\;ld.w #-1,%0\\nL0%=:") - - (define_expand "ffssi2" - [(set (match_operand:SI 0 "register_operand" "=d") - (minus:SI (ffs:SI (match_operand:SI 1 "register_operand" "d")) - (const_int 1))) - (set (match_dup 0) - (plus:SI (match_dup 0) - (const_int 1)))] - "" - "") - - (define_insn "abssf2" - [(set (match_operand:SF 0 "register_operand" "=d") - (abs:SF (match_operand:SF 1 "register_operand" "0")))] - "" - "and #0x7fffffff,%0") - - (define_expand "absdf2" - [(set (subreg:DI (match_operand:DF 0 "register_operand" "=d") 0) - (and:DI (subreg:DI (match_operand:DF 1 "register_operand" "d") 0) - (match_dup 2)))] - "" - "operands[2] = force_reg (DImode, - immed_double_const (-1, 0x7fffffff, DImode));") - - ;;- Compares - - (define_insn "cmpdi" - [(set (cc0) - (compare (match_operand:DI 0 "register_operand" "d") - (match_operand:DI 1 "register_operand" "d")))] - "" - "* return output_cmp (operands[0], operands[1], 'l');") - - (define_insn "" - [(set (cc0) (match_operand:DI 0 "register_operand" "d")) - (clobber (match_scratch:DI 1 "=d"))] - "next_insn_tests_no_inequality (insn)" - "* return output_cmp (operands[0], operands[1], 'L');") - - (define_insn "cmpsi" - [(set (cc0) - (compare (match_operand:SI 0 "register_operand" "d,a") - (match_operand:SI 1 "nonmemory_operand" "di,ai")))] - "" - "* return output_cmp (operands[0], operands[1], 'w');") - - (define_insn "cmphi" - [(set (cc0) - (compare (match_operand:HI 0 "register_operand" "d,a") - (match_operand:HI 1 "nonmemory_operand" "di,ai")))] - "" - "* return output_cmp (operands[0], operands[1], 'h');") - - ; cmpqi is intentionally omitted. - ; - ; gcc will sign-extend or zero-extend the operands to the next - ; wider mode, HImode. - ; - ; For reg .cmp. constant, we just go with the halfword immediate - ; instruction. Perhaps the widening insn can be cse'd or combined away. - ; If not, we're still as good as loading a byte constant into a register - ; to do a reg-reg byte compare. - ; - ; The following patterns pick up cases that can use reg .cmp. reg after all. - - (define_insn "" - [(set (cc0) - (compare - (sign_extend:HI (match_operand:QI 0 "register_operand" "d")) - (sign_extend:HI (match_operand:QI 1 "register_operand" "d"))))] - "" - "* return output_cmp (operands[0], operands[1], 'b');") - - (define_insn "" - [(set (cc0) - (compare - (ashift:HI (subreg:HI (match_operand:QI 0 "register_operand" "d") 0) - (const_int 8)) - (ashift:HI (subreg:HI (match_operand:QI 1 "register_operand" "d") 0) - (const_int 8))))] - "" - "* return output_cmp (operands[0], operands[1], 'b');") - - (define_insn "" - [(set (cc0) - (compare (match_operand:QI 0 "register_operand" "d") - (match_operand:QI 1 "register_operand" "d")))] - "" - "* return output_cmp (operands[0], operands[1], 'b');") - - (define_insn "" - [(set (cc0) (match_operand:QI 0 "register_operand" "d")) - (clobber (match_scratch:QI 1 "=d"))] - "next_insn_tests_no_inequality (insn)" - "* return output_cmp (operands[0], operands[1], 'B');") - - (define_insn "" - [(set (cc0) (subreg (match_operand:QI 0 "register_operand" "d") 0)) - (clobber (match_scratch:QI 1 "=d"))] - "next_insn_tests_no_inequality (insn)" - "* return output_cmp (operands[0], operands[1], 'B');") - - (define_insn "" - [(set (cc0) - (zero_extend (subreg (match_operand:QI 0 "register_operand" "d") 0))) - (clobber (match_scratch:QI 1 "=d"))] - "next_insn_tests_no_inequality (insn)" - "* return output_cmp (operands[0], operands[1], 'B');") - - (define_insn "cmpdf" - [(set (cc0) - (compare (match_operand:DF 0 "register_operand" "d") - (match_operand:DF 1 "register_operand" "d")))] - "" - "* return output_cmp (operands[0], operands[1], 'd');") - - (define_insn "cmpsf" - [(set (cc0) - (compare (match_operand:SF 0 "register_operand" "d") - (match_operand:SF 1 "nonmemory_cmpsf_operand" "dF")))] - "" - "* return output_cmp (operands[0], operands[1], 's');") - - ;; decrement-and-set-cc0 insns. - ;; - ;; The most important case where we can use the carry bit from an - ;; arithmetic insn to eliminate a redundant compare is the decrement in - ;; constructs like while (n--) and while (--n >= 0). - ;; - ;; We do it with combine patterns instead of NOTICE_UPDATE_CC because - ;; the decrement needs to be kept at the end of the block during scheduling. - ;; - ;; These patterns must have memory alternatives because reload refuses - ;; to do output reloads for an insn that sets cc0 (since it does not - ;; want to clobber cc0 with its moves). Convex moves do not clobber - ;; cc0, but there is no evident way to get reload to know that. - - (define_insn "" - [(set (cc0) - (match_operand:SI 0 "register_operand" "+r,*m")) - (set (match_dup 0) - (plus:SI (match_dup 0) - (const_int -1)))] - "next_insn_tests_no_inequality (insn)" - "* - { - if (which_alternative == 0) - { - output_cmp (operands[0], constm1_rtx, 'W'); - return \"add.w #-1,%0\"; - } - else - { - output_cmp (gen_rtx_REG (SImode, 7), constm1_rtx, 'W'); - return \"psh.w s7\;ld.w %0,s7\;add.w #-1,s7\;st.w s7,%0\;pop.w s7\"; - } - }") - - (define_insn "" - [(set (cc0) - (plus:SI (match_operand:SI 0 "register_operand" "+r,*m") - (const_int -1))) - (set (match_dup 0) - (plus:SI (match_dup 0) - (const_int -1)))] - "find_reg_note (next_cc0_user (insn), REG_NONNEG, 0)" - "* - { - if (which_alternative == 0) - { - output_cmp (operands[0], const0_rtx, 'W'); - return \"add.w #-1,%0\"; - } - else - { - output_cmp (gen_rtx_REG (SImode, 7), const0_rtx, 'W'); - return \"psh.w s7\;ld.w %0,s7\;add.w #-1,s7\;st.w s7,%0\;pop.w s7\"; - } - }") - - (define_insn "" - [(set (cc0) - (match_operand:HI 0 "register_operand" "+r,*m")) - (set (match_dup 0) - (plus:HI (match_dup 0) - (const_int -1)))] - "next_insn_tests_no_inequality (insn)" - "* - { - if (which_alternative == 0) - { - output_cmp (operands[0], constm1_rtx, 'H'); - return \"add.h #-1,%0\"; - } - else - { - output_cmp (gen_rtx_REG (HImode, 7), constm1_rtx, 'H'); - return \"psh.w s7\;ld.h %0,s7\;add.h #-1,s7\;st.h s7,%0\;pop.w s7\"; - } - }") - - (define_insn "" - [(set (cc0) - (plus:HI (match_operand:HI 0 "register_operand" "+r,*m") - (const_int -1))) - (set (match_dup 0) - (plus:HI (match_dup 0) - (const_int -1)))] - "find_reg_note (next_cc0_user (insn), REG_NONNEG, 0)" - "* - { - if (which_alternative == 0) - { - output_cmp (operands[0], const0_rtx, 'H'); - return \"add.h #-1,%0\"; - } - else - { - output_cmp (gen_rtx_REG (HImode, 7), const0_rtx, 'H'); - return \"psh.w s7\;ld.h %0,s7\;add.h #-1,s7\;st.h s7,%0\;pop.w s7\"; - } - }") - - ;;- Jumps - - (define_insn "jump" - [(set (pc) - (label_ref (match_operand 0 "" "")))] - "" - "jbr %l0") - - (define_insn "beq" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"eq\", 't'); ") - - (define_insn "bne" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"eq\", 'f'); ") - - (define_insn "bgt" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"le\", 'f'); ") - - (define_insn "bgtu" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"leu\", 'f'); ") - - (define_insn "blt" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"lt\", 't'); ") - - (define_insn "bltu" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"ltu\", 't'); ") - - (define_insn "bge" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"lt\", 'f'); ") - - (define_insn "bgeu" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"ltu\", 'f'); ") - - (define_insn "ble" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"le\", 't'); ") - - (define_insn "bleu" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return output_condjump (operands[0], \"leu\", 't'); ") - - (define_insn "" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"eq\", 'f'); ") - - (define_insn "" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"eq\", 't'); ") - - (define_insn "" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"le\", 't'); ") - - (define_insn "" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"leu\", 't'); ") - - (define_insn "" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"lt\", 'f'); ") - - (define_insn "" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"ltu\", 'f'); ") - - (define_insn "" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"lt\", 't'); ") - - (define_insn "" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"ltu\", 't'); ") - - (define_insn "" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"le\", 'f'); ") - - (define_insn "" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return output_condjump (operands[0], \"leu\", 'f'); ") - - ;;- Calls - - (define_expand "call_pop" - [(parallel [(call (match_operand:QI 0 "memory_operand" "m") - (match_operand:SI 1 "const_int_operand" "i")) - (match_operand:SI 2 "const_int_operand" "i") - (match_operand:SI 3 "const_int_operand" "i") - (reg:SI 8)])] - "" - "") - - (define_insn "" - [(call (match_operand:QI 0 "memory_operand" "m") - (match_operand:SI 1 "const_int_operand" "i")) - (match_operand:SI 2 "const_int_operand" "i") - (match_operand:SI 3 "const_int_operand" "i") - (match_operand:SI 4 "" "")] - "" - "* return output_call (insn, &operands[0]);") - - (define_expand "call_value_pop" - [(parallel [(set (match_operand 0 "" "=g") - (call (match_operand:QI 1 "memory_operand" "m") - (match_operand:SI 2 "const_int_operand" "i"))) - (match_operand:SI 3 "const_int_operand" "i") - (match_operand:SI 4 "const_int_operand" "i") - (reg:SI 8)])] - "" - "") - - (define_insn "" - [(set (match_operand 0 "" "=g") - (call (match_operand:QI 1 "memory_operand" "m") - (match_operand:SI 2 "const_int_operand" "i"))) - (match_operand:SI 3 "const_int_operand" "i") - (match_operand:SI 4 "const_int_operand" "i") - (match_operand:SI 5 "" "")] - "" - "* return output_call (insn, &operands[1]); ") - - ;; Call subroutine returning any type. - - (define_expand "untyped_call" - [(parallel [(call (match_operand 0 "" "") - (const_int 0)) - (match_operand 1 "" "") - (match_operand 2 "" "")])] - "" - " - { - int i; - - emit_call_insn (gen_call_pop (operands[0], const0_rtx, - const0_rtx, const0_rtx)); - - for (i = 0; i < XVECLEN (operands[2], 0); i++) - { - rtx set = XVECEXP (operands[2], 0, i); - emit_move_insn (SET_DEST (set), SET_SRC (set)); - } - - /* The optimizer does not know that the call sets the function value - registers we stored in the result block. We avoid problems by - claiming that all hard registers are used and clobbered at this - point. */ - emit_insn (gen_blockage ()); - - DONE; - }") - - ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and - ;; all of memory. This blocks insns from being moved across this point. - - (define_insn "blockage" - [(unspec_volatile [(const_int 0)] 0)] - "" - "") - - (define_expand "return" - [(return)] - "" - " replace_arg_pushes (); ") - - (define_insn "" - [(return)] - "" - "rtn") - - (define_expand "prologue" - [(const_int 0)] - "" - " - { - emit_ap_optimizations (); - DONE; - }") - - (define_insn "tablejump" - [(set (pc) (match_operand:SI 0 "address_operand" "p")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jmp %a0") - - (define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "address_operand" "p"))] - "" - "jmp %a0") --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/convex/convex-protos.h gcc-3.3/gcc/config/convex/convex-protos.h *** gcc-3.2.3/gcc/config/convex/convex-protos.h 2000-01-14 16:04:32.000000000 +0000 --- gcc-3.3/gcc/config/convex/convex-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,50 **** - /* Definitions of target machine for GNU compiler. Convex version. - Copyright (C) 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #ifdef RTX_CODE - extern int const_double_low_int PARAMS ((rtx)); - extern int const_double_high_int PARAMS ((rtx)); - extern const char *output_cmp PARAMS ((rtx, rtx, int)); - extern const char *output_condjump PARAMS ((rtx, const char *, int)); - extern const char *output_call PARAMS ((rtx, rtx *)); - extern rtx simplify_for_convex PARAMS ((rtx)); - extern void print_operand PARAMS ((FILE *, rtx, int)); - extern void print_operand_address PARAMS ((FILE *, rtx)); - extern void expand_movstr PARAMS ((rtx *)); - - extern int nonmemory_operand PARAMS ((rtx, enum machine_mode)); - extern int nonmemory_cmpsf_operand PARAMS ((rtx, enum machine_mode)); - #endif /* RTX_CODE */ - - #ifdef TREE_CODE - extern void asm_declare_function_name PARAMS ((FILE *, const char *, tree)); - #endif /* TREE_CODE */ - - #ifdef REAL_VALUE_TYPE - extern int check_float_value PARAMS ((enum machine_mode, REAL_VALUE_TYPE *, - int)); - extern void outfloat PARAMS ((FILE *, REAL_VALUE_TYPE, const char *, - const char *, const char *)); - #endif /* REAL_VALUE_TYPE */ - - extern void psw_disable_float PARAMS ((void)); - extern void init_convex PARAMS ((void)); - extern void replace_arg_pushes PARAMS ((void)); - extern void emit_ap_optimizations PARAMS ((void)); --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/convex/fixinc.convex gcc-3.3/gcc/config/convex/fixinc.convex *** gcc-3.2.3/gcc/config/convex/fixinc.convex 2000-04-02 22:50:55.000000000 +0000 --- gcc-3.3/gcc/config/convex/fixinc.convex 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,416 **** - - # This is a shell archive. Remove anything before this line, - # then unpack it by saving it in a file and typing "sh file". - # - # Wrapped by on Fri Mar 12 08:41:28 CST 1993 - # Contents: include/ include/limits.h include/math.h include/stddef.h - # include/stdlib.h - - echo mkdir - include - mkdir include - chmod u=rwx,g=rwx,o=rx include - - echo x - include/limits.h - sed 's/^@//' > "include/limits.h" <<'@//E*O*F include/limits.h//' - #ifndef _LIMITS_H - #define _LIMITS_H - - #include_next - - /* Minimum and maximum values a `char' can hold. */ - #ifdef __CHAR_UNSIGNED__ - #undef CHAR_MIN - #define CHAR_MIN 0 - #undef CHAR_MAX - #define CHAR_MAX 255 - #endif - - #endif /* _LIMITS_H */ - @//E*O*F include/limits.h// - chmod u=rw,g=rw,o=r include/limits.h - - echo x - include/math.h - sed 's/^@//' > "include/math.h" <<'@//E*O*F include/math.h//' - #ifndef _MATH_H - #define _MATH_H - - #include_next - - #undef HUGE_VAL - - #if _IEEE_FLOAT_ - #define HUGE_VAL 1.79769313486231570e+308 - #else - #define HUGE_VAL 8.98846567431157854e+307 - #endif - - #if __OPTIMIZE__ && ! __NO_INLINE - - #define frexp(x,y) __inline_frexp ((x), (y)) - #define ldexp(x,y) __inline_ldexp ((x), (y)) - #define irint(x) __inline_irint (x) - #define frexpf(x,y) __inline_frexpf ((x), (y)) - #define ldexpf(x,y) __inline_ldexpf ((x), (y)) - #define irintf(x) __inline_irintf (x) - - #if __convex_c2__ || __convex_c32__ || __convex_c34__ || __convex_c38__ - - #define atan(x) __inline_atan (x) - #define ceil(x) __inline_ceil (x) - #define cos(x) __inline_cos (x) - #define exp(x) __inline_exp (x) - #define floor(x) __inline_floor (x) - #define log(x) __inline_log (x) - #define log10(x) __inline_log10 (x) - #define modf(x,y) __inline_modf ((x), (y)) - #define rint(x) __inline_rint (x) - #define sin(x) __inline_sin (x) - #define sqrt(x) __inline_sqrt (x) - - #define atanf(x) __inline_atanf (x) - #define ceilf(x) __inline_ceilf (x) - #define cosf(x) __inline_cosf (x) - #define expf(x) __inline_expf (x) - #define floorf(x) __inline_floorf (x) - #define logf(x) __inline_logf (x) - #define log10f(x) __inline_log10f (x) - #define modff(x,y) __inline_modff ((x), (y)) - #define rintf(x) __inline_rintf (x) - #define sinf(x) __inline_sinf (x) - #define sqrtf(x) __inline_sqrtf (x) - - #endif /* __convex_c[23*]__ */ - - #endif /* __OPTIMIZE__ */ - - static __inline__ __const__ double __inline_atan (double x) - { - double z; - __asm__ ("atan.d %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ float __inline_atanf (float x) - { - float z; - __asm__ ("atan.s %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ double __inline_cos (double x) - { - double z; - __asm__ ("cos.d %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ float __inline_cosf (float x) - { - float z; - __asm__ ("cos.s %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ double __inline_exp (double x) - { - double z; - __asm__ ("exp.d %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ float __inline_expf (float x) - { - float z; - __asm__ ("exp.s %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ double __inline_log (double x) - { - double z; - __asm__ ("ln.d %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ float __inline_logf (float x) - { - float z; - __asm__ ("ln.s %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ double __inline_sin (double x) - { - double z; - __asm__ ("sin.d %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ float __inline_sinf (float x) - { - float z; - __asm__ ("sin.s %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ double __inline_sqrt (double x) - { - double z; - __asm__ ("sqrt.d %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ float __inline_sqrtf (float x) - { - float z; - __asm__ ("sqrt.s %0" : "=d" (z) : "0" (x)); - return z; - } - - static __inline__ __const__ double __inline_ceil (double x) - { - double z; - __asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x)); - if (z < x) z += 1.0; - return z; - } - - static __inline__ __const__ float __inline_ceilf (float x) - { - float z; - __asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x)); - if (z < x) z += 1.0F; - return z; - } - - static __inline__ __const__ double __inline_floor (double x) - { - double z; - __asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x)); - if (z > x) z -= 1.0; - return z; - } - - static __inline__ __const__ float __inline_floorf (float x) - { - float z; - __asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x)); - if (z > x) z -= 1.0F; - return z; - } - - static __inline__ __const__ double __inline_log10 (double x) - { - return 0.43429448190325182765 * __inline_log (x); - } - - static __inline__ __const__ float __inline_log10f (float x) - { - return 0.43429448190325182765F * __inline_logf (x); - } - - static __inline__ double __inline_modf (double x, double *np) - { - double intpart; - __asm__ ("frint.d %1,%0" : "=d" (intpart) : "d" (x)); - *np = intpart; - return x - intpart; - } - - static __inline__ float __inline_modff (float x, float *np) - { - float intpart; - __asm__ ("frint.s %1,%0" : "=d" (intpart) : "d" (x)); - *np = intpart; - return x - intpart; - } - - static __inline__ double __inline_frexp (double x, int *np) - { - union u { double d; unsigned long long ll; } u; - if ((u.d = x) == 0) - *np = 0; - else - { - #if _IEEE_FLOAT_ - *np = ((u.ll >> 52) & 03777) - 01776; - u.ll = (u.ll & 0x800fffffffffffffLL) | 0x3fe0000000000000LL; - #else - *np = ((u.ll >> 52) & 03777) - 02000; - u.ll = (u.ll & 0x800fffffffffffffLL) | 0x4000000000000000LL; - #endif - } - return u.d; - } - - static __inline__ float __inline_frexpf (float x, int *np) - { - union u { float f; unsigned int i; } u; - if ((u.f = x) == 0) - *np = 0; - else - { - #if _IEEE_FLOAT_ - *np = ((u.i >> 23) & 0377) - 0176; - u.i = (u.i & 0x807fffff) | 0x3f000000; - #else - *np = ((u.i >> 23) & 0377) - 0200; - u.i = (u.i & 0x807fffff) | 0x40000000; - #endif - } - return u.f; - } - - static __inline__ double __inline_ldexp (double x, int n) - { - extern int errno; - union { double d; long long ll; unsigned sexp : 12; } u; - if ((u.d = x) != 0) - { - int exp = n + (u.sexp & 03777); - long long nn = (long long) n << 52; - #if _IEEE_FLOAT_ - if (exp <= 0) - u.ll &= 0x8000000000000000LL, errno = 34; - else if (exp > 03776) - u.ll = u.ll & 0x8000000000000000LL | 0x7fefffffffffffffLL, errno = 34; - #else - if (exp <= 0) - u.ll = 0, errno = 34; - else if (exp > 03777) - u.ll |= 0x7fffffffffffffffLL, errno = 34; - #endif - else - u.ll += nn; - } - return u.d; - } - - static __inline__ float __inline_ldexpf (float x, int n) - { - extern int errno; - union { float f; int i; unsigned sexp : 9; } u; - if ((u.f = x) != 0) - { - int exp = n + (u.sexp & 0377); - int nn = n << 23; - #if _IEEE_FLOAT_ - if (exp <= 0) - u.i &= 0x80000000, errno = 34; - else if (exp > 0376) - u.i = u.i & 0x80000000 | 0x7f7fffff, errno = 34; - #else - if (exp <= 0) - u.i = 0, errno = 34; - else if (exp > 0377) - u.i |= 0x7fffffff, errno = 34; - #endif - else - u.i += nn; - } - return u.f; - } - - static __inline__ __const__ double __inline_rint (double x) - { - double z; - union { double d; unsigned long long ll; } u; - u.d = x; - #if _IEEE_FLOAT_ - u.ll = (u.ll & 0x8000000000000000LL) | 0x3fe0000000000000LL; - #else - u.ll = (u.ll & 0x8000000000000000LL) | 0x4000000000000000LL; - #endif - __asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x + u.d)); - return z; - } - - static __inline__ __const__ float __inline_rintf (float x) - { - float z; - union { float f; unsigned int i; } u; - u.f = x; - #if _IEEE_FLOAT_ - u.i = (u.i & 0x80000000) | 0x3f000000; - #else - u.i = (u.i & 0x80000000) | 0x40000000; - #endif - __asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x + u.f)); - return z; - } - - static __inline__ __const__ int __inline_irint (double x) - { - union { double d; unsigned long long ll; } u; - u.d = x; - #if _IEEE_FLOAT_ - u.ll = (u.ll & 0x8000000000000000LL) | 0x3fe0000000000000LL; - #else - u.ll = (u.ll & 0x8000000000000000LL) | 0x4000000000000000LL; - #endif - return x + u.d; - } - - static __inline__ __const__ int __inline_irintf (float x) - { - union { float f; unsigned int i; } u; - u.f = x; - #if _IEEE_FLOAT_ - u.i = (u.i & 0x80000000) | 0x3f000000; - #else - u.i = (u.i & 0x80000000) | 0x40000000; - #endif - return x + u.f; - } - - #endif /* _MATH_H */ - @//E*O*F include/math.h// - chmod u=rw,g=rw,o=r include/math.h - - echo x - include/stddef.h - sed 's/^@//' > "include/stddef.h" <<'@//E*O*F include/stddef.h//' - #ifndef _STDDEF_H - #define _STDDEF_H - - #ifndef __WCHAR_T - #define __WCHAR_T - - #ifdef __GNUG__ - /* In C++, wchar_t is a distinct basic type, - and we can expect __wchar_t to be defined by cc1plus. */ - typedef __wchar_t wchar_t; - #else - /* In C, cpp tells us which type to make an alias for. */ - typedef __WCHAR_TYPE__ wchar_t; - #endif - - #endif /* __WCHAR_T */ - - #include_next - - #endif /* _STDDEF_H */ - @//E*O*F include/stddef.h// - chmod u=rw,g=rw,o=r include/stddef.h - - echo x - include/stdlib.h - sed 's/^@//' > "include/stdlib.h" <<'@//E*O*F include/stdlib.h//' - #ifndef _STDLIB_H - #define _STDLIB_H - - #if _CONVEX_SOURCE - - #define alloca __non_builtin_alloca - #include_next - #undef alloca - - #else - - #include_next - - #endif /* _CONVEX_SOURCE */ - - #endif /* _STDLIB_H */ - @//E*O*F include/stdlib.h// - chmod u=rw,g=rw,o=r include/stdlib.h - - exit 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/convex/proto.h gcc-3.3/gcc/config/convex/proto.h *** gcc-3.2.3/gcc/config/convex/proto.h 2002-01-01 23:21:01.000000000 +0000 --- gcc-3.3/gcc/config/convex/proto.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,4 **** - /* This header file is to avoid trouble with semi-ANSI header files - on the Convex in system version 8.0. */ - - #define _PROTO(list) () --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/cris/aout.h gcc-3.3/gcc/config/cris/aout.h *** gcc-3.2.3/gcc/config/cris/aout.h 2002-04-13 19:16:42.000000000 +0000 --- gcc-3.3/gcc/config/cris/aout.h 2003-03-11 03:01:33.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 48,53 **** --- 48,56 ---- %{!sim:%{pg:gcrt0.o%s}\ %{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}}" + /* Override cris.h define. */ + #undef ENDFILE_SPEC + /* Which library to get. The only difference from the default is to get libsc.a if -sim is given to the driver. Repeat -lc -lsysX {X=sim,linux}, because libsysX needs (at least) errno from libc, and *************** Boston, MA 02111-1307, USA. */ *** 64,71 **** #undef CRIS_CPP_SUBTARGET_SPEC #define CRIS_CPP_SUBTARGET_SPEC \ ! "-D__AOUT__\ ! %{melinux:-D__gnu_linux__ -D__linux__ -D__unix__ -D__elinux__ -D__uclinux__\ %{!nostdinc:\ %{!mbest-lib-options:%{isystem*}}\ -isystem elinux/include%s\ --- 67,73 ---- #undef CRIS_CPP_SUBTARGET_SPEC #define CRIS_CPP_SUBTARGET_SPEC \ ! "%{melinux:-D__gnu_linux__ -D__linux__ -D__unix__ -D__elinux__ -D__uclinux__\ %{!nostdinc:\ %{!mbest-lib-options:%{isystem*}}\ -isystem elinux/include%s\ *************** Boston, MA 02111-1307, USA. */ *** 118,123 **** --- 120,138 ---- #undef CRIS_SUBTARGET_DEFAULT #define CRIS_SUBTARGET_DEFAULT 0 + + /* Node: Run-time Target */ + + /* For the cris-*-aout subtarget. */ + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__AOUT__"); \ + } \ + while (0) + + /* Node: Storage Layout */ /* We can align to 16 bits (only) with CRIS a.out. */ *************** Boston, MA 02111-1307, USA. */ *** 277,283 **** #define SET_ASM_OP "\t.set\t" #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0)) #define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ --- 292,298 ---- #define SET_ASM_OP "\t.set\t" #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)) #define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ *************** Boston, MA 02111-1307, USA. */ *** 288,329 **** } \ while (0) ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ! \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ while (0) #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do \ { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! \ size_directive_output = 0; \ - \ if (!flag_inhibit_size_directive \ && (DECL) && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! fputc ('\n', FILE); \ } \ ! \ ASM_OUTPUT_LABEL (FILE, NAME); \ } \ while (0) --- 303,332 ---- } \ while (0) ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ while (0) #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do \ { \ ! HOST_WIDE_INT size; \ ! \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! \ size_directive_output = 0; \ if (!flag_inhibit_size_directive \ && (DECL) && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ ! \ ASM_OUTPUT_LABEL (FILE, NAME); \ } \ while (0) *************** Boston, MA 02111-1307, USA. */ *** 332,337 **** --- 335,341 ---- do \ { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ \ if (!flag_inhibit_size_directive \ && DECL_SIZE (DECL) \ *************** Boston, MA 02111-1307, USA. */ *** 340,351 **** && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! putc (',', FILE); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! fputc ('\n', FILE); \ } \ } \ while (0) --- 344,351 ---- && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } \ while (0) *************** Boston, MA 02111-1307, USA. */ *** 354,379 **** do \ { \ if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno; \ ! \ ! labelno++; \ ! \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ","); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ } \ while (0) /* Node: Alignment Output */ --- 354,370 ---- do \ { \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } \ while (0) + /* The configure machinery invokes the assembler without options, which is + not how gcc invokes it. Without options, the multi-target assembler + will probably be found, which is ELF by default. To counter that, we + need to override ELF auto-host.h config stuff which we know collides + with a.out. */ + #undef HAVE_GAS_HIDDEN + /* Node: Alignment Output */ *************** Boston, MA 02111-1307, USA. */ *** 390,396 **** /* Node: Misc */ ! #define HANDLE_SYSV_PRAGMA /* In theory, this one isn't necessary, but over time, external tools have been primed on names with "." rather than "$". */ --- 381,387 ---- /* Node: Misc */ ! #define HANDLE_SYSV_PRAGMA 1 /* In theory, this one isn't necessary, but over time, external tools have been primed on names with "." rather than "$". */ diff -Nrc3pad gcc-3.2.3/gcc/config/cris/arit.c gcc-3.3/gcc/config/cris/arit.c *** gcc-3.2.3/gcc/config/cris/arit.c 2001-10-12 19:44:38.000000000 +0000 --- gcc-3.3/gcc/config/cris/arit.c 2002-06-18 02:55:25.000000000 +0000 *************** *** 2,8 **** Contributed by Axis Communications. Written by Hans-Peter Nilsson , c:a 1992. ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GCC. --- 2,8 ---- Contributed by Axis Communications. Written by Hans-Peter Nilsson , c:a 1992. ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. *************** struct quot_rem *** 64,70 **** /* This is the worker function for div and mod. It is inlined into the respective library function. */ static __inline__ struct quot_rem ! do_31div (unsigned long a, unsigned long b) __attribute__ ((__const__)); static __inline__ struct quot_rem do_31div (unsigned long a, unsigned long b) --- 64,71 ---- /* This is the worker function for div and mod. It is inlined into the respective library function. */ static __inline__ struct quot_rem ! do_31div (unsigned long a, unsigned long b) ! __attribute__ ((__const__, __always_inline__)); static __inline__ struct quot_rem do_31div (unsigned long a, unsigned long b) *************** do_31div (unsigned long a, unsigned long *** 161,167 **** static __inline__ #endif unsigned long ! __Udiv (unsigned long a, unsigned long b) __attribute__ ((__const__)); #ifndef L_udivsi3 static __inline__ --- 162,169 ---- static __inline__ #endif unsigned long ! __Udiv (unsigned long a, unsigned long b) ! __attribute__ ((__const__, __always_inline__)); #ifndef L_udivsi3 static __inline__ *************** __Div (long a, long b) *** 238,244 **** static __inline__ #endif unsigned long ! __Umod (unsigned long a, unsigned long b) __attribute__ ((__const__)); #ifndef L_umodsi3 static __inline__ --- 240,247 ---- static __inline__ #endif unsigned long ! __Umod (unsigned long a, unsigned long b) ! __attribute__ ((__const__, __always_inline__)); #ifndef L_umodsi3 static __inline__ diff -Nrc3pad gcc-3.2.3/gcc/config/cris/cris.c gcc-3.3/gcc/config/cris/cris.c *** gcc-3.2.3/gcc/config/cris/cris.c 2002-06-17 22:06:34.000000000 +0000 --- gcc-3.3/gcc/config/cris/cris.c 2003-03-11 15:54:23.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 40,45 **** --- 40,46 ---- #include "output.h" #include "target.h" #include "target-def.h" + #include "ggc.h" /* Usable when we have an amount to add or subtract, and want the optimal size of the insn. */ *************** Boston, MA 02111-1307, USA. */ *** 63,69 **** } while (0) /* Per-function machine data. */ ! struct machine_function { int needs_return_address_on_stack; }; --- 64,70 ---- } while (0) /* Per-function machine data. */ ! struct machine_function GTY(()) { int needs_return_address_on_stack; }; *************** static void cris_print_base PARAMS ((rtx *** 85,91 **** static void cris_print_index PARAMS ((rtx, FILE *)); ! static void cris_init_machine_status PARAMS ((struct function *)); static int cris_initial_frame_pointer_offset PARAMS ((void)); --- 86,92 ---- static void cris_print_index PARAMS ((rtx, FILE *)); ! static struct machine_function * cris_init_machine_status PARAMS ((void)); static int cris_initial_frame_pointer_offset PARAMS ((void)); *************** static void cris_target_asm_function_pro *** 97,104 **** --- 98,110 ---- static void cris_target_asm_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void cris_encode_section_info PARAMS ((tree, int)); static void cris_operand_lossage PARAMS ((const char *, rtx)); + static void cris_asm_output_mi_thunk + PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree)); + + /* The function cris_target_asm_function_epilogue puts the last insn to output here. It always fits; there won't be a symbol operand. Used in delay_slots_for_epilogue and function_epilogue. */ *************** int cris_cpu_version = CRIS_DEFAULT_CPU_ *** 148,153 **** --- 154,167 ---- #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE cris_target_asm_function_epilogue + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO cris_encode_section_info + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK cris_asm_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + struct gcc_target targetm = TARGET_INITIALIZER; /* Predicate functions. */ *************** cris_operand_extend_operator (x, mode) *** 314,319 **** --- 328,349 ---- && (code == PLUS || code == MINUS || code == UMIN)); } + /* Check if MODE is same as mode for X, and X is PLUS or MINUS. */ + + int + cris_additive_operand_extend_operator (x, mode) + rtx x; + enum machine_mode mode; + { + enum rtx_code code = GET_CODE (x); + + if (mode == VOIDmode) + mode = GET_MODE (x); + + return (GET_MODE (x) == mode + && (code == PLUS || code == MINUS)); + } + /* Check to see if MODE is same as mode for X, and X is SIGN_EXTEND or ZERO_EXTEND. */ *************** cris_target_asm_function_prologue (file, *** 859,867 **** /* Set up the PIC register. */ if (current_function_uses_pic_offset_table) ! asm_fprintf (file, "\tmove.d $pc,$%s\n\tsub.d .:GOTOFF,$%s\n", ! reg_names[PIC_OFFSET_TABLE_REGNUM], ! reg_names[PIC_OFFSET_TABLE_REGNUM]); if (TARGET_PDEBUG) fprintf (file, --- 889,897 ---- /* Set up the PIC register. */ if (current_function_uses_pic_offset_table) ! fprintf (file, "\tmove.d $pc,$%s\n\tsub.d .:GOTOFF,$%s\n", ! reg_names[PIC_OFFSET_TABLE_REGNUM], ! reg_names[PIC_OFFSET_TABLE_REGNUM]); if (TARGET_PDEBUG) fprintf (file, *************** cris_print_operand (file, x, code) *** 1264,1270 **** rtx operand = x; /* Size-strings corresponding to MULT expressions. */ ! static const char *mults[] = { "BAD:0", ".b", ".w", "BAD:3", ".d" }; /* New code entries should just be added to the switch below. If handling is finished, just return. If handling was just a --- 1294,1300 ---- rtx operand = x; /* Size-strings corresponding to MULT expressions. */ ! static const char *const mults[] = { "BAD:0", ".b", ".w", "BAD:3", ".d" }; /* New code entries should just be added to the switch below. If handling is finished, just return. If handling was just a *************** cris_simple_epilogue () *** 2042,2055 **** || current_function_outgoing_args_size || current_function_calls_eh_return - /* Kludge for 3.1: when reorg changes branches to the return label - into return insns, it does not handle the case where there's a - delay list for the epilogue: it just drops the insns in - current_function_epilogue_delay_list on the floor, resulting in - invalid code. We kludge around it in that case by saying that - we don't have a simple enough epilogue to use return insns. */ - || current_function_epilogue_delay_list != NULL - /* If we're not supposed to emit prologue and epilogue, we must not emit return-type instructions. */ || !TARGET_PROLOGUE_EPILOGUE) --- 2072,2077 ---- *************** cris_legitimate_pic_operand (x) *** 2318,2324 **** return ! cris_symbol (x) || cris_got_symbol (x); } ! /* Return non-zero if there's a SYMBOL_REF or LABEL_REF hiding inside this CONSTANT_P. */ int --- 2340,2346 ---- return ! cris_symbol (x) || cris_got_symbol (x); } ! /* Return nonzero if there's a SYMBOL_REF or LABEL_REF hiding inside this CONSTANT_P. */ int *************** cris_symbol (x) *** 2355,2361 **** return 1; } ! /* Return non-zero if there's a SYMBOL_REF or LABEL_REF hiding inside this CONSTANT_P, and the symbol does not need a GOT entry. Also set current_function_uses_pic_offset_table if we're generating PIC and ever see something that would need one. */ --- 2377,2383 ---- return 1; } ! /* Return nonzero if there's a SYMBOL_REF or LABEL_REF hiding inside this CONSTANT_P, and the symbol does not need a GOT entry. Also set current_function_uses_pic_offset_table if we're generating PIC and ever see something that would need one. */ *************** cris_gotless_symbol (x) *** 2413,2419 **** return 1; } ! /* Return non-zero if there's a SYMBOL_REF or LABEL_REF hiding inside this CONSTANT_P, and the symbol needs a GOT entry. */ int --- 2435,2441 ---- return 1; } ! /* Return nonzero if there's a SYMBOL_REF or LABEL_REF hiding inside this CONSTANT_P, and the symbol needs a GOT entry. */ int *************** cris_override_options () *** 2573,2601 **** init_machine_status = cris_init_machine_status; } ! /* The ASM_OUTPUT_MI_THUNK worker. */ ! void ! cris_asm_output_mi_thunk (stream, thunkdecl, delta, funcdecl) FILE *stream; tree thunkdecl ATTRIBUTE_UNUSED; ! int delta; tree funcdecl; { if (delta > 0) ! asm_fprintf (stream, "\tadd%s %d,$%s\n", ! ADDITIVE_SIZE_MODIFIER (delta), delta, ! reg_names[CRIS_FIRST_ARG_REG]); else if (delta < 0) ! asm_fprintf (stream, "\tsub%s %d,$%s\n", ! ADDITIVE_SIZE_MODIFIER (-delta), -delta, ! reg_names[CRIS_FIRST_ARG_REG]); if (flag_pic) { const char *name = XSTR (XEXP (DECL_RTL (funcdecl), 0), 0); ! STRIP_NAME_ENCODING (name, name); fprintf (stream, "add.d "); assemble_name (stream, name); fprintf (stream, "%s,$pc\n", CRIS_PLT_PCOFFSET_SUFFIX); --- 2595,2628 ---- init_machine_status = cris_init_machine_status; } ! /* The TARGET_ASM_OUTPUT_MI_THUNK worker. */ ! static void ! cris_asm_output_mi_thunk (stream, thunkdecl, delta, vcall_offset, funcdecl) FILE *stream; tree thunkdecl ATTRIBUTE_UNUSED; ! HOST_WIDE_INT delta; ! HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; tree funcdecl; { if (delta > 0) ! { ! fprintf (stream, "\tadd%s ", ADDITIVE_SIZE_MODIFIER (delta)); ! fprintf (stream, HOST_WIDE_INT_PRINT_DEC, delta); ! fprintf (stream, ",$%s\n", reg_names[CRIS_FIRST_ARG_REG]); ! } else if (delta < 0) ! { ! fprintf (stream, "\tsub%s ", ADDITIVE_SIZE_MODIFIER (-delta)); ! fprintf (stream, HOST_WIDE_INT_PRINT_DEC, -delta); ! fprintf (stream, ",$%s\n", reg_names[CRIS_FIRST_ARG_REG]); ! } if (flag_pic) { const char *name = XSTR (XEXP (DECL_RTL (funcdecl), 0), 0); ! name = (* targetm.strip_name_encoding) (name); fprintf (stream, "add.d "); assemble_name (stream, name); fprintf (stream, "%s,$pc\n", CRIS_PLT_PCOFFSET_SUFFIX); *************** cris_init_expanders () *** 2701,2711 **** /* Zero initialization is OK for all current fields. */ ! static void ! cris_init_machine_status (p) ! struct function *p; { ! p->machine = xcalloc (1, sizeof (struct machine_function)); } /* Split a 2 word move (DI or presumably DF) into component parts. --- 2728,2737 ---- /* Zero initialization is OK for all current fields. */ ! static struct machine_function * ! cris_init_machine_status () { ! return ggc_alloc_cleared (sizeof (struct machine_function)); } /* Split a 2 word move (DI or presumably DF) into component parts. *************** cris_split_movdx (operands) *** 2859,2865 **** else abort (); ! val = gen_sequence (); end_sequence (); return val; } --- 2885,2891 ---- else abort (); ! val = get_insns (); end_sequence (); return val; } *************** restart: *** 2893,2899 **** const char *origstr = XSTR (x, 0); const char *str; ! STRIP_NAME_ENCODING (str, origstr); if (is_plt) { --- 2919,2925 ---- const char *origstr = XSTR (x, 0); const char *str; ! str = (* targetm.strip_name_encoding) (origstr); if (is_plt) { *************** restart: *** 3041,3069 **** } } ! /* The ENCODE_SECTION_INFO worker. Code-in whether we can get away ! without a GOT entry (needed for externally visible objects but not for ! functions) into SYMBOL_REF_FLAG and add the PLT suffix for global ! functions. */ ! void ! cris_encode_section_info (exp) tree exp; { if (flag_pic) { ! if (DECL_P (exp)) ! { ! if (TREE_CODE (exp) == FUNCTION_DECL ! && (TREE_PUBLIC (exp) || DECL_WEAK (exp))) ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0)) = 0; ! else ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0)) ! = ! TREE_PUBLIC (exp) && ! DECL_WEAK (exp); ! } ! else ! /* Others are local entities. */ ! SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (exp), 0)) = 1; } } --- 3067,3087 ---- } } ! /* Code-in whether we can get away without a GOT entry (needed for ! externally visible objects but not for functions) into ! SYMBOL_REF_FLAG and add the PLT suffix for global functions. */ ! static void ! cris_encode_section_info (exp, first) tree exp; + int first ATTRIBUTE_UNUSED; { if (flag_pic) { ! rtx rtl = DECL_P (exp) ? DECL_RTL (exp) : TREE_CST_RTL (exp); ! ! if (GET_CODE (rtl) == MEM && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF) ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) = (*targetm.binds_local_p) (exp); } } *************** Prev_insn (insn) *** 3141,3146 **** --- 3159,3166 ---- } #endif + #include "gt-cris.h" + /* * Local variables: * eval: (c-set-style "gnu") diff -Nrc3pad gcc-3.2.3/gcc/config/cris/cris.h gcc-3.3/gcc/config/cris/cris.h *** gcc-3.2.3/gcc/config/cris/cris.h 2002-07-02 14:08:00.000000000 +0000 --- gcc-3.3/gcc/config/cris/cris.h 2003-03-11 15:54:23.000000000 +0000 *************** *** 1,5 **** /* Definitions for GCC. Part of the machine description for CRIS. ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Axis Communications. Written by Hans-Peter Nilsson. This file is part of GCC. --- 1,5 ---- /* Definitions for GCC. Part of the machine description for CRIS. ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Axis Communications. Written by Hans-Peter Nilsson. This file is part of GCC. *************** extern const char *cris_elinux_stacksize *** 115,132 **** /* Also provide canonical vN definitions when user specifies an alias. Note that -melf overrides -maout. */ - /* The `-$' is here mostly due to the integrated preprocessor not - handling the builtin expansion of "#define __REGISTER_PREFIX__ $" - gracefully. This is slightly redundant although not incorrect. - We're quite alone defining REGISTER_PREFIX as "$" so it's unlikely - someone will fight for us. This year in the mountains. - Note that for -melinux and -mlinux, command-line -isystem options are - emitted both before and after the synthesized one. We can't remove all - of them: a %{Rn,r>Rn,r,>Rn"))) (match_operand:QI 2 "register_operand" "r,r,r,r")) ! (set (match_operand:SI 3 "register_operand" "=*0,!*2,r,r") (plus:SI (match_dup 0) (match_dup 1)))] "cris_side_effect_mode_ok (PLUS, operands, 3, 0, 1, -1, 2)" --- 673,679 ---- (plus:SI (match_operand:SI 0 "cris_bdap_operand" "%r,r,r,r") (match_operand:SI 1 "cris_bdap_operand" "r>Rn,r>Rn,r,>Rn"))) (match_operand:QI 2 "register_operand" "r,r,r,r")) ! (set (match_operand:SI 3 "register_operand" "=*0,!2,r,r") (plus:SI (match_dup 0) (match_dup 1)))] "cris_side_effect_mode_ok (PLUS, operands, 3, 0, 1, -1, 2)" *************** *** 698,704 **** (plus:SI (match_operand:SI 0 "cris_bdap_operand" "%r,r,r,r") (match_operand:SI 1 "cris_bdap_operand" "r>Rn,r>Rn,r,>Rn"))) (match_operand:HI 2 "register_operand" "r,r,r,r")) ! (set (match_operand:SI 3 "register_operand" "=*0,!*2,r,r") (plus:SI (match_dup 0) (match_dup 1)))] "cris_side_effect_mode_ok (PLUS, operands, 3, 0, 1, -1, 2)" --- 698,704 ---- (plus:SI (match_operand:SI 0 "cris_bdap_operand" "%r,r,r,r") (match_operand:SI 1 "cris_bdap_operand" "r>Rn,r>Rn,r,>Rn"))) (match_operand:HI 2 "register_operand" "r,r,r,r")) ! (set (match_operand:SI 3 "register_operand" "=*0,!2,r,r") (plus:SI (match_dup 0) (match_dup 1)))] "cris_side_effect_mode_ok (PLUS, operands, 3, 0, 1, -1, 2)" *************** *** 723,729 **** (plus:SI (match_operand:SI 0 "cris_bdap_operand" "%r,r,r,r") (match_operand:SI 1 "cris_bdap_operand" "r>Rn,r>Rn,r,>Rn"))) (match_operand:SI 2 "register_operand" "r,r,r,r")) ! (set (match_operand:SI 3 "register_operand" "=*0,!*2,r,r") (plus:SI (match_dup 0) (match_dup 1)))] "cris_side_effect_mode_ok (PLUS, operands, 3, 0, 1, -1, 2)" --- 723,729 ---- (plus:SI (match_operand:SI 0 "cris_bdap_operand" "%r,r,r,r") (match_operand:SI 1 "cris_bdap_operand" "r>Rn,r>Rn,r,>Rn"))) (match_operand:SI 2 "register_operand" "r,r,r,r")) ! (set (match_operand:SI 3 "register_operand" "=*0,!2,r,r") (plus:SI (match_dup 0) (match_dup 1)))] "cris_side_effect_mode_ok (PLUS, operands, 3, 0, 1, -1, 2)" *************** *** 1886,1892 **** (define_insn "*extopqihi_side_biap" [(set (match_operand:HI 0 "register_operand" "=r,r") (match_operator:HI ! 6 "cris_operand_extend_operator" [(match_operand:HI 1 "register_operand" "0,0") (match_operator:HI 7 "cris_extend_operator" --- 1886,1892 ---- (define_insn "*extopqihi_side_biap" [(set (match_operand:HI 0 "register_operand" "=r,r") (match_operator:HI ! 6 "cris_additive_operand_extend_operator" [(match_operand:HI 1 "register_operand" "0,0") (match_operator:HI 7 "cris_extend_operator" *************** *** 1898,1905 **** (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[5]) != UMIN || GET_CODE (operands[7]) == ZERO_EXTEND) ! && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # %x6%e7.%m7 [%5=%4+%2%T3],%0") --- 1898,1904 ---- (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # %x6%e7.%m7 [%5=%4+%2%T3],%0") *************** *** 1921,1927 **** (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[5]) != UMIN || GET_CODE (operands[7]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # --- 1920,1926 ---- (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[6]) != UMIN || GET_CODE (operands[7]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # *************** *** 1944,1950 **** (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[5]) != UMIN || GET_CODE (operands[7]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # --- 1943,1949 ---- (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[6]) != UMIN || GET_CODE (operands[7]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # *************** *** 1959,1965 **** (define_insn "*extopqihi_side" [(set (match_operand:HI 0 "register_operand" "=r,r,r") (match_operator:HI ! 5 "cris_operand_extend_operator" [(match_operand:HI 1 "register_operand" "0,0,0") (match_operator:HI 6 "cris_extend_operator" --- 1958,1964 ---- (define_insn "*extopqihi_side" [(set (match_operand:HI 0 "register_operand" "=r,r,r") (match_operator:HI ! 5 "cris_additive_operand_extend_operator" [(match_operand:HI 1 "register_operand" "0,0,0") (match_operator:HI 6 "cris_extend_operator" *************** *** 1970,1977 **** (set (match_operand:SI 4 "register_operand" "=*2,r,r") (plus:SI (match_dup 2) (match_dup 3)))] ! "(GET_CODE (operands[5]) != UMIN || GET_CODE (operands[6]) == ZERO_EXTEND) ! && cris_side_effect_mode_ok (PLUS, operands, 4, 2, 3, -1, 0)" "* { if (which_alternative == 0 --- 1969,1975 ---- (set (match_operand:SI 4 "register_operand" "=*2,r,r") (plus:SI (match_dup 2) (match_dup 3)))] ! "cris_side_effect_mode_ok (PLUS, operands, 4, 2, 3, -1, 0)" "* { if (which_alternative == 0 *************** *** 2053,2080 **** ;; QImode to HImode ;; FIXME: GCC should widen. - ;; FIXME: These could have anonymous mode for operand 0. (define_insn "*extopqihi_swap_side_biap" [(set (match_operand:HI 0 "register_operand" "=r,r") ! (match_operator:HI ! 7 "cris_plus_or_bound_operator" ! [(match_operator:HI ! 6 "cris_extend_operator" ! [(mem:QI (plus:SI ! (mult:SI (match_operand:SI 2 "register_operand" "r,r") ! (match_operand:SI 3 "const_int_operand" "n,n")) ! (match_operand:SI 4 "register_operand" "r,r")))]) ! (match_operand:HI 1 "register_operand" "0,0")])) (set (match_operand:SI 5 "register_operand" "=*4,r") (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[6]) != UMIN || GET_CODE (operands[6]) == ZERO_EXTEND) ! && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # ! %x7%e6.%m6 [%5=%4+%2%T3],%0") ;; QImode to SImode --- 2051,2075 ---- ;; QImode to HImode ;; FIXME: GCC should widen. (define_insn "*extopqihi_swap_side_biap" [(set (match_operand:HI 0 "register_operand" "=r,r") ! (plus:HI ! (match_operator:HI ! 6 "cris_extend_operator" ! [(mem:QI (plus:SI ! (mult:SI (match_operand:SI 2 "register_operand" "r,r") ! (match_operand:SI 3 "const_int_operand" "n,n")) ! (match_operand:SI 4 "register_operand" "r,r")))]) ! (match_operand:HI 1 "register_operand" "0,0"))) (set (match_operand:SI 5 "register_operand" "=*4,r") (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # ! add%e6.b [%5=%4+%2%T3],%0") ;; QImode to SImode *************** *** 2093,2099 **** (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[6]) != UMIN || GET_CODE (operands[6]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # --- 2088,2094 ---- (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[7]) != UMIN || GET_CODE (operands[6]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # *************** *** 2115,2121 **** (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[6]) != UMIN || GET_CODE (operands[6]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # --- 2110,2116 ---- (plus:SI (mult:SI (match_dup 2) (match_dup 3)) (match_dup 4)))] ! "(GET_CODE (operands[7]) != UMIN || GET_CODE (operands[6]) == ZERO_EXTEND) && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # *************** *** 2129,2147 **** (define_insn "*extopqihi_swap_side" [(set (match_operand:HI 0 "register_operand" "=r,r,r") ! (match_operator:HI ! 6 "cris_plus_or_bound_operator" ! [(match_operator:HI ! 5 "cris_extend_operator" ! [(mem:QI (plus:SI ! (match_operand:SI 2 "cris_bdap_operand" "%r,r,r") ! (match_operand:SI 3 "cris_bdap_operand" "r>Rn,r,>Rn")))]) ! (match_operand:HI 1 "register_operand" "0,0,0")])) (set (match_operand:SI 4 "register_operand" "=*2,r,r") (plus:SI (match_dup 2) (match_dup 3)))] ! "(GET_CODE (operands[6]) != UMIN || GET_CODE (operands[5]) == ZERO_EXTEND) ! && cris_side_effect_mode_ok (PLUS, operands, 4, 2, 3, -1, 0)" "* { if (which_alternative == 0 --- 2124,2140 ---- (define_insn "*extopqihi_swap_side" [(set (match_operand:HI 0 "register_operand" "=r,r,r") ! (plus:HI ! (match_operator:HI ! 5 "cris_extend_operator" ! [(mem:QI (plus:SI ! (match_operand:SI 2 "cris_bdap_operand" "%r,r,r") ! (match_operand:SI 3 "cris_bdap_operand" "r>Rn,r,>Rn")))]) ! (match_operand:HI 1 "register_operand" "0,0,0"))) (set (match_operand:SI 4 "register_operand" "=*2,r,r") (plus:SI (match_dup 2) (match_dup 3)))] ! "cris_side_effect_mode_ok (PLUS, operands, 4, 2, 3, -1, 0)" "* { if (which_alternative == 0 *************** *** 2151,2157 **** || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return \"#\"; ! return \"%x6%e5.%m5 [%4=%2%S3],%0\"; }") ;; QImode to SImode --- 2144,2150 ---- || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return \"#\"; ! return \"add%e5.b [%4=%2%S3],%0\"; }") ;; QImode to SImode *************** *** 2221,2233 **** (define_insn "*extopqihi" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") (match_operator:HI ! 3 "cris_operand_extend_operator" [(match_operand:HI 1 "register_operand" "0,0,0,r") (match_operator:HI 4 "cris_extend_operator" [(match_operand:QI 2 "nonimmediate_operand" "r,Q>,m,!To")])]))] ! "(GET_CODE (operands[3]) != UMIN || GET_CODE (operands[4]) == ZERO_EXTEND) ! && GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && (operands[1] != frame_pointer_rtx || GET_CODE (operands[3]) != PLUS)" "@ %x3%e4.%m4 %2,%0 --- 2214,2225 ---- (define_insn "*extopqihi" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") (match_operator:HI ! 3 "cris_additive_operand_extend_operator" [(match_operand:HI 1 "register_operand" "0,0,0,r") (match_operator:HI 4 "cris_extend_operator" [(match_operand:QI 2 "nonimmediate_operand" "r,Q>,m,!To")])]))] ! "GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && (operands[1] != frame_pointer_rtx || GET_CODE (operands[3]) != PLUS)" "@ %x3%e4.%m4 %2,%0 *************** *** 2285,2304 **** (define_insn "*extopqihi_swap" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") ! (match_operator:HI ! 4 "cris_plus_or_bound_operator" ! [(match_operator:HI ! 3 "cris_extend_operator" ! [(match_operand:QI 2 "nonimmediate_operand" "r,Q>,m,!To")]) ! (match_operand:HI 1 "register_operand" "0,0,0,r")]))] ! "(GET_CODE (operands[3]) != UMIN || GET_CODE (operands[4]) == ZERO_EXTEND) ! && GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD ! && operands[1] != frame_pointer_rtx" "@ ! %x4%e3.%m3 %2,%0 ! %x4%e3.%m3 %2,%0 ! %x4%e3.%m3 %2,%0 ! %x4%e3.%m3 %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no") (set_attr "cc" "clobber")]) --- 2277,2293 ---- (define_insn "*extopqihi_swap" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") ! (plus:HI ! (match_operator:HI ! 3 "cris_extend_operator" ! [(match_operand:QI 2 "nonimmediate_operand" "r,Q>,m,!To")]) ! (match_operand:HI 1 "register_operand" "0,0,0,r")))] ! "operands[1] != frame_pointer_rtx" "@ ! add%e3.b %2,%0 ! add%e3.b %2,%0 ! add%e3.b %2,%0 ! add%e3.b %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no") (set_attr "cc" "clobber")]) *************** *** 2312,2319 **** 3 "cris_extend_operator" [(match_operand:QI 2 "nonimmediate_operand" "r,Q>,m,!To")]) (match_operand:SI 1 "register_operand" "0,0,0,r")]))] ! "(GET_CODE (operands[3]) != UMIN || GET_CODE (operands[4]) == ZERO_EXTEND) ! && GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && operands[1] != frame_pointer_rtx" "@ %x4%e3.%m3 %2,%0 --- 2301,2307 ---- 3 "cris_extend_operator" [(match_operand:QI 2 "nonimmediate_operand" "r,Q>,m,!To")]) (match_operand:SI 1 "register_operand" "0,0,0,r")]))] ! "(GET_CODE (operands[4]) != UMIN || GET_CODE (operands[3]) == ZERO_EXTEND) && operands[1] != frame_pointer_rtx" "@ %x4%e3.%m3 %2,%0 *************** *** 2332,2339 **** 3 "cris_extend_operator" [(match_operand:HI 2 "nonimmediate_operand" "r,Q>,m,!To")]) (match_operand:SI 1 "register_operand" "0,0,0,r")]))] ! "(GET_CODE (operands[3]) != UMIN || GET_CODE (operands[4]) == ZERO_EXTEND) ! && GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && operands[1] != frame_pointer_rtx" "@ %x4%e3.%m3 %2,%0 --- 2320,2326 ---- 3 "cris_extend_operator" [(match_operand:HI 2 "nonimmediate_operand" "r,Q>,m,!To")]) (match_operand:SI 1 "register_operand" "0,0,0,r")]))] ! "(GET_CODE (operands[4]) != UMIN || GET_CODE (operands[3]) == ZERO_EXTEND) && operands[1] != frame_pointer_rtx" "@ %x4%e3.%m3 %2,%0 *************** *** 4689,4695 **** ;; Please also add a self-contained test-case. ;; We have trouble with and:s and shifts. Maybe something is broken in ! ;; gcc? Or it could just be that bitfield insn expansion is a bit ;; suboptimal when not having extzv insns. (define_peephole --- 4676,4682 ---- ;; Please also add a self-contained test-case. ;; We have trouble with and:s and shifts. Maybe something is broken in ! ;; gcc? Or it could just be that bit-field insn expansion is a bit ;; suboptimal when not having extzv insns. (define_peephole diff -Nrc3pad gcc-3.2.3/gcc/config/cris/cris-protos.h gcc-3.3/gcc/config/cris/cris-protos.h *** gcc-3.2.3/gcc/config/cris/cris-protos.h 2001-10-11 17:02:36.000000000 +0000 --- gcc-3.3/gcc/config/cris/cris-protos.h 2002-10-20 22:37:09.000000000 +0000 *************** extern void cris_target_asm_named_sectio *** 49,64 **** # ifdef TREE_CODE extern rtx cris_expand_builtin_va_arg PARAMS ((tree, tree)); - extern void cris_encode_section_info PARAMS ((tree)); # endif #endif /* RTX_CODE */ - #ifdef STDIO_INCLUDED - # ifdef TREE_CODE - extern void cris_asm_output_mi_thunk PARAMS ((FILE *, tree, int, tree)); - # endif - #endif - #ifdef GCC_C_PRAGMA_H extern void cris_pragma_expand_mul PARAMS ((cpp_reader *)); #endif --- 49,57 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/cris/linux.h gcc-3.3/gcc/config/cris/linux.h *** gcc-3.2.3/gcc/config/cris/linux.h 2002-07-17 01:43:12.000000000 +0000 --- gcc-3.3/gcc/config/cris/linux.h 2003-03-11 03:01:35.000000000 +0000 *************** *** 1,5 **** /* Definitions for GCC. Part of the machine description for CRIS. ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Axis Communications. Written by Hans-Peter Nilsson. This file is part of GCC. --- 1,5 ---- /* Definitions for GCC. Part of the machine description for CRIS. ! Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Axis Communications. Written by Hans-Peter Nilsson. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 47,56 **** #undef CRIS_CPP_SUBTARGET_SPEC #define CRIS_CPP_SUBTARGET_SPEC \ ! "-D__gnu_linux__ -D__linux__ -D__unix__ -D__ELF__\ ! %{pthread:-D_REENTRANT}\ ! %{fPIC|fpic: -D__PIC__ -D__pic__}\ ! %{!fleading-underscore:-fno-leading-underscore -D__NO_UNDERSCORES__}\ %{!march=*:%{!cpu=*:-D__arch_v10 -D__CRIS_arch_version=10}}\ %{!ansi:%{!std=*:%{!undef:-Dlinux -Dunix}\ -Asystem(unix) -Asystem(posix) -Acpu(cris) -Amachine(cris)}}" --- 47,53 ---- #undef CRIS_CPP_SUBTARGET_SPEC #define CRIS_CPP_SUBTARGET_SPEC \ ! "%{pthread:-D_REENTRANT}\ %{!march=*:%{!cpu=*:-D__arch_v10 -D__CRIS_arch_version=10}}\ %{!ansi:%{!std=*:%{!undef:-Dlinux -Dunix}\ -Asystem(unix) -Asystem(posix) -Acpu(cris) -Amachine(cris)}}" *************** Boston, MA 02111-1307, USA. */ *** 99,104 **** --- 96,124 ---- %{!r:%{O2|O3: --gc-sections}}" + /* Node: Run-time Target */ + + /* For the cris-*-linux* subtarget. */ + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + extern int flag_leading_underscore; \ + builtin_define ("__gnu_linux__"); \ + builtin_define ("__linux__"); \ + builtin_define ("__unix__"); \ + builtin_define ("__ELF__"); \ + if (flag_pic) \ + { \ + builtin_define ("__PIC__"); \ + builtin_define ("__pic__"); \ + } \ + if (flag_leading_underscore <= 0) \ + builtin_define ("__NO_UNDERSCORES__"); \ + } \ + while (0) + + /* Node: Sections */ /* GNU/Linux has crti and crtn and does not need the diff -Nrc3pad gcc-3.2.3/gcc/config/cris/t-cris gcc-3.3/gcc/config/cris/t-cris *** gcc-3.2.3/gcc/config/cris/t-cris 2002-04-11 15:16:18.000000000 +0000 --- gcc-3.3/gcc/config/cris/t-cris 2002-06-04 07:08:52.000000000 +0000 *************** $(LIB2FUNCS_EXTRA): $(CRIS_LIB1CSRC) *** 39,41 **** --- 39,44 ---- echo "#define L$$name" > tmp-$@ \ && echo '#include "$<"' >> tmp-$@ \ && mv -f tmp-$@ $@ + + $(out_object_file): gt-cris.h + gt-cris.h : s-gtype ; @true diff -Nrc3pad gcc-3.2.3/gcc/config/d30v/d30v.c gcc-3.3/gcc/config/d30v/d30v.c *** gcc-3.2.3/gcc/config/d30v/d30v.c 2002-01-03 17:40:00.000000000 +0000 --- gcc-3.3/gcc/config/d30v/d30v.c 2002-09-19 13:51:20.000000000 +0000 *************** *** 42,55 **** #include "ggc.h" #include "target.h" #include "target-def.h" static void d30v_print_operand_memory_reference PARAMS ((FILE *, rtx)); static void d30v_build_long_insn PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, rtx, rtx)); ! static void d30v_add_gc_roots PARAMS ((void)); ! static void d30v_init_machine_status PARAMS ((struct function *)); ! static void d30v_mark_machine_status PARAMS ((struct function *)); ! static void d30v_free_machine_status PARAMS ((struct function *)); static void d30v_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void d30v_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static int d30v_adjust_cost PARAMS ((rtx, rtx, rtx, int)); --- 42,53 ---- #include "ggc.h" #include "target.h" #include "target-def.h" + #include "langhooks.h" static void d30v_print_operand_memory_reference PARAMS ((FILE *, rtx)); static void d30v_build_long_insn PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, rtx, rtx)); ! static struct machine_function * d30v_init_machine_status PARAMS ((void)); static void d30v_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void d30v_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static int d30v_adjust_cost PARAMS ((rtx, rtx, rtx, int)); *************** override_options () *** 297,304 **** reg_class_from_letter['x'] = F0_REGS; reg_class_from_letter['y'] = F1_REGS; reg_class_from_letter['z'] = OTHER_FLAG_REGS; - - d30v_add_gc_roots (); } --- 295,300 ---- *************** debug_stack_info (info) *** 1871,1877 **** } ! /* Return non-zero if this function is known to have a null or 1 instruction epilogue. */ int direct_return () --- 1867,1873 ---- } ! /* Return nonzero if this function is known to have a null or 1 instruction epilogue. */ int direct_return () *************** d30v_function_arg_boundary (mode, type) *** 1989,1995 **** You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns non-zero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ --- 1985,1991 ---- You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns nonzero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ *************** d30v_build_va_list () *** 2202,2208 **** tree f_arg_ptr, f_arg_num, record, type_decl; tree int_type_node; ! record = make_lang_type (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); int_type_node = make_signed_type (INT_TYPE_SIZE); --- 2198,2204 ---- tree f_arg_ptr, f_arg_num, record, type_decl; tree int_type_node; ! record = (*lang_hooks.types.make_type) (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); int_type_node = make_signed_type (INT_TYPE_SIZE); *************** d30v_build_va_list () *** 2229,2236 **** /* Expand __builtin_va_start to do the va_start macro. */ void ! d30v_expand_builtin_va_start (stdarg_p, valist, nextarg) ! int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg ATTRIBUTE_UNUSED; { --- 2225,2231 ---- /* Expand __builtin_va_start to do the va_start macro. */ void ! d30v_expand_builtin_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { *************** d30v_split_double (value, p_high, p_low) *** 2631,2642 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on the section ! that the address refers to. On these machines, define the macro ! `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and ! then check for it here. *Note Assembler Format::. */ void d30v_print_operand_address (stream, x) --- 2626,2632 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. */ void d30v_print_operand_address (stream, x) *************** d30v_initialize_trampoline (addr, fnaddr *** 3100,3163 **** /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. ! ! It usually pays to define several simpler macros to serve as subroutines for ! this one. Otherwise it may be too complicated to understand. ! ! This macro must exist in two variants: a strict variant and a non-strict ! one. The strict variant is used in the reload pass. It must be defined so ! that any pseudo-register that has not been allocated a hard register is ! considered a memory reference. In contexts where some kind of register is ! required, a pseudo-register with no hard register must be rejected. ! ! The non-strict variant is used in other passes. It must be defined to ! accept all pseudo-registers in every context where some kind of register is ! required. ! ! Compiler source files that want to use the strict variant of this macro ! define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' ! conditional to define the strict variant in that case and the non-strict ! variant otherwise. ! ! Subroutines to check for acceptable registers for various purposes (one for ! base registers, one for index registers, and so on) are typically among the ! subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these ! subroutine macros need have two variants; the higher levels of macros may be ! the same whether strict or not. ! ! Normally, constant addresses which are the sum of a `symbol_ref' and an ! integer are stored inside a `const' RTX to mark them as constant. ! Therefore, there is no need to recognize such sums specifically as ! legitimate addresses. Normally you would simply recognize any `const' as ! legitimate. ! ! Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that ! are not marked with `const'. It assumes that a naked `plus' indicates ! indexing. If so, then you *must* reject such naked constant sums as ! illegitimate addresses, so that none of them will be given to ! `PRINT_OPERAND_ADDRESS'. ! ! On some machines, whether a symbolic address is legitimate depends on the ! section that the address refers to. On these machines, define the macro ! `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and ! then check for it here. When you see a `const', you will have to look ! inside it to find the `symbol_ref' in order to determine the section. *Note ! Assembler Format::. ! ! The best way to modify the name string is by adding text to the beginning, ! with suitable punctuation to prevent any ambiguity. Allocate the new name ! in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to ! remove and decode the added text and output the name accordingly, and define ! `STRIP_NAME_ENCODING' to access the original name string. ! ! You can check the information stored here into the `symbol_ref' in the ! definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and ! `PRINT_OPERAND_ADDRESS'. ! ! Return 0 if the address is not legitimate, 1 if the address would fit ! in a short instruction, or 2 if the address would fit in a long ! instruction. */ #define XREGNO_OK_FOR_BASE_P(REGNO, STRICT_P) \ ((STRICT_P) \ --- 3090,3096 ---- /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. */ #define XREGNO_OK_FOR_BASE_P(REGNO, STRICT_P) \ ((STRICT_P) \ *************** d30v_issue_rate () *** 3543,3577 **** /* Routine to allocate, mark and free a per-function, machine specific structure. */ ! static void ! d30v_init_machine_status (p) ! struct function *p; ! { ! p->machine = ! (machine_function *) xcalloc (1, sizeof (machine_function)); ! } ! ! static void ! d30v_mark_machine_status (p) ! struct function * p; ! { ! if (p->machine == NULL) ! return; ! ! ggc_mark_rtx (p->machine->eh_epilogue_sp_ofs); ! } ! ! static void ! d30v_free_machine_status (p) ! struct function *p; { ! struct machine_function *machine = p->machine; ! ! if (machine == NULL) ! return; ! ! free (machine); ! p->machine = NULL; } /* Do anything needed before RTL is emitted for each function. */ --- 3476,3485 ---- /* Routine to allocate, mark and free a per-function, machine specific structure. */ ! static struct machine_function * ! d30v_init_machine_status () { ! return ggc_alloc_cleared (sizeof (machine_function)); } /* Do anything needed before RTL is emitted for each function. */ *************** d30v_init_expanders () *** 3581,3588 **** { /* Arrange to save and restore machine status around nested functions. */ init_machine_status = d30v_init_machine_status; - mark_machine_status = d30v_mark_machine_status; - free_machine_status = d30v_free_machine_status; } /* Find the current function's return address. --- 3489,3494 ---- *************** d30v_return_addr () *** 3597,3609 **** { return get_hard_reg_initial_val (Pmode, GPR_LINK); } - - /* Called to register all of our global variables with the garbage - collector. */ - - static void - d30v_add_gc_roots () - { - ggc_add_rtx_root (&d30v_compare_op0, 1); - ggc_add_rtx_root (&d30v_compare_op1, 1); - } --- 3503,3505 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/d30v/d30v.h gcc-3.3/gcc/config/d30v/d30v.h *** gcc-3.2.3/gcc/config/d30v/d30v.h 2002-04-12 07:49:14.000000000 +0000 --- gcc-3.3/gcc/config/d30v/d30v.h 2002-11-26 04:54:47.000000000 +0000 *************** *** 79,85 **** /* Run-time target specifications */ ! #define CPP_PREDEFINES "-D__D30V__ -Amachine=d30v" /* This declaration should be present. */ extern int target_flags; --- 79,91 ---- /* Run-time target specifications */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__D30V__"); \ ! builtin_assert ("machine=d30v"); \ ! } \ ! while (0) /* This declaration should be present. */ extern int target_flags; *************** extern int target_flags; *** 161,174 **** #define WORDS_BIG_ENDIAN 1 - #define BITS_PER_UNIT 8 - - #define BITS_PER_WORD 32 - #define UNITS_PER_WORD 4 - #define POINTER_SIZE 32 - #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ do { \ if (GET_MODE_CLASS (MODE) == MODE_INT \ --- 167,174 ---- *************** do { \ *** 201,209 **** /* Defined in svr4.h. */ #define PCC_BITFIELD_TYPE_MATTERS 1 - - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - /* Layout of Source Language Data Types */ --- 201,206 ---- *************** do { \ *** 215,222 **** #define LONG_LONG_TYPE_SIZE 64 - #define CHAR_TYPE_SIZE 8 - #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 64 --- 212,217 ---- *************** extern unsigned char modes_tieable_p[]; *** 613,632 **** /* #define LEAF_REG_REMAP(REGNO) */ - /* Registers That Form a Stack. */ - - /* Define this if the machine has any stack-like registers. */ - /* #define STACK_REGS */ - - /* The number of the first stack-like register. This one is the top - of the stack. */ - /* #define FIRST_STACK_REG */ - - /* The number of the last stack-like register. This one is the - bottom of the stack. */ - /* #define LAST_STACK_REG */ - - /* Register Classes */ /* An enumeral type that must be defined with all the register class names as --- 608,613 ---- *************** extern enum reg_class reg_class_from_let *** 839,845 **** registers, but not memory. Some machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the Sparc when compiling PIC). In some cases, both an intermediate and a scratch register are required. You should define these macros to indicate to the reload phase that it may --- 820,826 ---- registers, but not memory. Some machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the SPARC when compiling PIC). In some cases, both an intermediate and a scratch register are required. You should define these macros to indicate to the reload phase that it may *************** extern enum reg_class reg_class_from_let *** 896,902 **** /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this macro on those ! machines to be a C expression that is non-zero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. --- 877,883 ---- /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this macro on those ! machines to be a C expression that is nonzero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. *************** extern enum reg_class reg_class_from_let *** 939,953 **** few registers of certain classes that there would not be enough registers to use as spill registers if this were done. ! Define `SMALL_REGISTER_CLASSES' to be an expression with a non-zero value on ! these machines. When this macro has a non-zero value, the compiler allows registers explicitly used in the rtl to be used as spill registers but avoids extending the lifetime of these registers. ! It is always safe to define this macro with a non-zero value, but if you unnecessarily define it, you will reduce the amount of optimizations that can be performed in some cases. If you do not define this macro with a ! non-zero value when it is required, the compiler will run out of spill registers and print a fatal error message. For most machines, you should not define this macro at all. */ /* #define SMALL_REGISTER_CLASSES */ --- 920,934 ---- few registers of certain classes that there would not be enough registers to use as spill registers if this were done. ! Define `SMALL_REGISTER_CLASSES' to be an expression with a nonzero value on ! these machines. When this macro has a nonzero value, the compiler allows registers explicitly used in the rtl to be used as spill registers but avoids extending the lifetime of these registers. ! It is always safe to define this macro with a nonzero value, but if you unnecessarily define it, you will reduce the amount of optimizations that can be performed in some cases. If you do not define this macro with a ! nonzero value when it is required, the compiler will run out of spill registers and print a fatal error message. For most machines, you should not define this macro at all. */ /* #define SMALL_REGISTER_CLASSES */ *************** typedef struct d30v_stack { *** 1125,1131 **** /* If defined, a C expression that produces the machine-specific code to setup the stack so that arbitrary frames can be accessed. For example, on the ! Sparc, we must flush all of the register windows to the stack before we can access arbitrary stack frames. This macro will seldom need to be defined. */ /* #define SETUP_FRAME_ADDRESSES() */ --- 1106,1112 ---- /* If defined, a C expression that produces the machine-specific code to setup the stack so that arbitrary frames can be accessed. For example, on the ! SPARC, we must flush all of the register windows to the stack before we can access arbitrary stack frames. This macro will seldom need to be defined. */ /* #define SETUP_FRAME_ADDRESSES() */ *************** typedef struct d30v_stack { *** 1371,1377 **** { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM } \ } ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the cases preventing register elimination are --- 1352,1358 ---- { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM } \ } ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the cases preventing register elimination are *************** typedef struct d30v_stack { *** 1551,1557 **** You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns non-zero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ --- 1532,1538 ---- You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns nonzero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ *************** typedef struct d30v_stack { *** 1623,1629 **** on the stack, there is no need to store anything in `CUMULATIVE_ARGS'; however, the data structure must exist and should not be empty, so use `int'. */ ! typedef int CUMULATIVE_ARGS; /* A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list. The variable has type --- 1604,1610 ---- on the stack, there is no need to store anything in `CUMULATIVE_ARGS'; however, the data structure must exist and should not be empty, so use `int'. */ ! #define CUMULATIVE_ARGS int /* A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list. The variable has type *************** typedef int CUMULATIVE_ARGS; *** 1700,1709 **** /* How Scalar Function Values are Returned */ - /* Define this macro if `-traditional' should not cause functions declared to - return `float' to convert the value to `double'. */ /* #define - TRADITIONAL_RETURN_FLOAT */ - /* A C expression to create an RTX representing the place where a function returns a value of data type VALTYPE. VALTYPE is a tree node representing a data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode used to --- 1681,1686 ---- *************** typedef int CUMULATIVE_ARGS; *** 1902,1944 **** `DELAY_SLOTS_FOR_EPILOGUE'. */ /* #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) */ - /* A C compound statement that outputs the assembler code for a thunk function, - used to implement C++ virtual function calls with multiple inheritance. The - thunk acts as a wrapper around a virtual function, adjusting the implicit - object parameter before handing control off to the real function. - - First, emit code to add the integer DELTA to the location that contains the - incoming first argument. Assume that this argument contains a pointer, and - is the one used to pass the `this' pointer in C++. This is the incoming - argument *before* the function prologue, e.g. `%o0' on a sparc. The - addition must preserve the values of all other incoming arguments. - - After the addition, emit code to jump to FUNCTION, which is a - `FUNCTION_DECL'. This is a direct pure jump, not a call, and does not touch - the return address. Hence returning from FUNCTION will return to whoever - called the current `thunk'. - - The effect must be as if FUNCTION had been called directly with the - adjusted first argument. This macro is responsible for emitting - all of the code for a thunk function; output_function_prologue() - and output_function_epilogue() are not invoked. - - The THUNK_FNDECL is redundant. (DELTA and FUNCTION have already been - extracted from it.) It might possibly be useful on some targets, but - probably not. - - If you do not define this macro, the target-independent code in the C++ - frontend will generate a less efficient heavyweight thunk that calls - FUNCTION instead of jumping to it. The generic approach does not support - varargs. */ - /* #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) */ - /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ ! typedef struct machine_function { /* Additionsl stack adjustment in __builtin_eh_throw. */ ! struct rtx_def * eh_epilogue_sp_ofs; } machine_function; --- 1879,1890 ---- `DELAY_SLOTS_FOR_EPILOGUE'. */ /* #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) */ /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ ! typedef struct machine_function GTY(()) { /* Additionsl stack adjustment in __builtin_eh_throw. */ ! rtx eh_epilogue_sp_ofs; } machine_function; *************** typedef struct machine_function *** 2027,2040 **** (VALIST) = d30v_build_va_list () ! /* Implement the stdarg/varargs va_start macro. STDARG_P is non-zero if this is stdarg.h instead of varargs.h. VALIST is the tree of the va_list variable to initialize. NEXTARG is the machine independent notion of the 'next' argument after the variable arguments. If not defined, a standard implementation will be defined that works for arguments passed on the stack. */ ! #define EXPAND_BUILTIN_VA_START(STDARG_P, VALIST, NEXTARG) \ ! (d30v_expand_builtin_va_start(STDARG_P, VALIST, NEXTARG)) /* Implement the stdarg/varargs va_arg macro. VALIST is the variable of type va_list as a tree, TYPE is the type passed to va_arg. */ --- 1973,1986 ---- (VALIST) = d30v_build_va_list () ! /* Implement the stdarg/varargs va_start macro. STDARG_P is nonzero if this is stdarg.h instead of varargs.h. VALIST is the tree of the va_list variable to initialize. NEXTARG is the machine independent notion of the 'next' argument after the variable arguments. If not defined, a standard implementation will be defined that works for arguments passed on the stack. */ ! #define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \ ! d30v_expand_builtin_va_start(VALIST, NEXTARG) /* Implement the stdarg/varargs va_arg macro. VALIST is the variable of type va_list as a tree, TYPE is the type passed to va_arg. */ *************** typedef struct machine_function *** 2245,2251 **** Defined in svr4.h. */ /* #define TARGET_MEM_FUNCTIONS */ ! /* Define this macro to generate code for Objective C message sending using the calling convention of the NeXT system. This calling convention involves passing the object, the selector and the method arguments all at once to the method-lookup library function. --- 2191,2197 ---- Defined in svr4.h. */ /* #define TARGET_MEM_FUNCTIONS */ ! /* Define this macro to generate code for Objective-C message sending using the calling convention of the NeXT system. This calling convention involves passing the object, the selector and the method arguments all at once to the method-lookup library function. *************** typedef struct machine_function *** 2282,2341 **** /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. ! ! It usually pays to define several simpler macros to serve as subroutines for ! this one. Otherwise it may be too complicated to understand. ! ! This macro must exist in two variants: a strict variant and a non-strict ! one. The strict variant is used in the reload pass. It must be defined so ! that any pseudo-register that has not been allocated a hard register is ! considered a memory reference. In contexts where some kind of register is ! required, a pseudo-register with no hard register must be rejected. ! ! The non-strict variant is used in other passes. It must be defined to ! accept all pseudo-registers in every context where some kind of register is ! required. ! ! Compiler source files that want to use the strict variant of this macro ! define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' ! conditional to define the strict variant in that case and the non-strict ! variant otherwise. ! ! Subroutines to check for acceptable registers for various purposes (one for ! base registers, one for index registers, and so on) are typically among the ! subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these ! subroutine macros need have two variants; the higher levels of macros may be ! the same whether strict or not. ! ! Normally, constant addresses which are the sum of a `symbol_ref' and an ! integer are stored inside a `const' RTX to mark them as constant. ! Therefore, there is no need to recognize such sums specifically as ! legitimate addresses. Normally you would simply recognize any `const' as ! legitimate. ! ! Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that ! are not marked with `const'. It assumes that a naked `plus' indicates ! indexing. If so, then you *must* reject such naked constant sums as ! illegitimate addresses, so that none of them will be given to ! `PRINT_OPERAND_ADDRESS'. ! ! On some machines, whether a symbolic address is legitimate depends on the ! section that the address refers to. On these machines, define the macro ! `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and ! then check for it here. When you see a `const', you will have to look ! inside it to find the `symbol_ref' in order to determine the section. *Note ! Assembler Format::. ! ! The best way to modify the name string is by adding text to the beginning, ! with suitable punctuation to prevent any ambiguity. Allocate the new name ! in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to ! remove and decode the added text and output the name accordingly, and define ! `STRIP_NAME_ENCODING' to access the original name string. ! ! You can check the information stored here into the `symbol_ref' in the ! definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and ! `PRINT_OPERAND_ADDRESS'. */ #ifdef REG_OK_STRICT #define REG_OK_STRICT_P 1 --- 2228,2234 ---- /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. */ #ifdef REG_OK_STRICT #define REG_OK_STRICT_P 1 *************** do { \ *** 2488,2494 **** /* #define EXTRA_CC_MODES */ /* Returns a mode from class `MODE_CC' to be used when comparison operation ! code OP is applied to rtx X and Y. For example, on the Sparc, `SELECT_CC_MODE' is defined as (see *note Jump Patterns::. for a description of the reason for this definition) --- 2381,2387 ---- /* #define EXTRA_CC_MODES */ /* Returns a mode from class `MODE_CC' to be used when comparison operation ! code OP is applied to rtx X and Y. For example, on the SPARC, `SELECT_CC_MODE' is defined as (see *note Jump Patterns::. for a description of the reason for this definition) *************** do { \ *** 2526,2532 **** You need not define this macro if it would always returns zero or if the floating-point format is anything other than `IEEE_FLOAT_FORMAT'. For ! example, here is the definition used on the Sparc, where floating-point inequality comparisons are always given `CCFPEmode': #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) */ --- 2419,2425 ---- You need not define this macro if it would always returns zero or if the floating-point format is anything other than `IEEE_FLOAT_FORMAT'. For ! example, here is the definition used on the SPARC, where floating-point inequality comparisons are always given `CCFPEmode': #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) */ *************** extern const char *d30v_branch_cost_stri *** 2683,2692 **** times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is non-zero, the compiler will act as if `STRICT_ALIGNMENT' ! were non-zero when generating code for block moves. This can cause significantly more instructions to be produced. Therefore, do not set this ! macro non-zero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. */ --- 2576,2585 ---- times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is nonzero, the compiler will act as if `STRICT_ALIGNMENT' ! were nonzero when generating code for block moves. This can cause significantly more instructions to be produced. Therefore, do not set this ! macro nonzero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. */ *************** extern const char *d30v_branch_cost_stri *** 2736,2742 **** uninitialized global data will be output in the data section if `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be used. */ ! #define BSS_SECTION_ASM_OP "\t.bss" /* If defined, a C expression whose value is a string containing the assembler operation to identify the following data as --- 2629,2635 ---- uninitialized global data will be output in the data section if `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be used. */ ! #define BSS_SECTION_ASM_OP "\t.section .bss" /* If defined, a C expression whose value is a string containing the assembler operation to identify the following data as *************** extern const char *d30v_branch_cost_stri *** 2759,2832 **** Defined in svr4.h. */ /* #define EXTRA_SECTION_FUNCTIONS */ - /* On most machines, read-only variables, constants, and jump tables are placed - in the text section. If this is not the case on your machine, this macro - should be defined to be the name of a function (either `data_section' or a - function defined in `EXTRA_SECTIONS') that switches to the section to be - used for read-only items. - - If these items should be placed in the text section, this macro should not - be defined. */ - /* #define READONLY_DATA_SECTION */ - - /* A C statement or statements to switch to the appropriate section for output - of EXP. You can assume that EXP is either a `VAR_DECL' node or a constant - of some sort. RELOC indicates whether the initial value of EXP requires - link-time relocations. Select the section by calling `text_section' or one - of the alternatives for other sections. - - Do not define this macro if you put all read-only variables and constants in - the read-only data section (usually the text section). - - Defined in svr4.h. */ - /* #define SELECT_SECTION(EXP, RELOC, ALIGN) */ - - /* A C statement or statements to switch to the appropriate section for output - of RTX in mode MODE. You can assume that RTX is some kind of constant in - RTL. The argument MODE is redundant except in the case of a `const_int' - rtx. Select the section by calling `text_section' or one of the - alternatives for other sections. - - Do not define this macro if you put all constants in the read-only data - section. - - Defined in svr4.h. */ - /* #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) */ - /* Define this macro if jump tables (for `tablejump' insns) should be output in the text section, along with the assembler instructions. Otherwise, the readonly data section is used. This macro is irrelevant if there is no separate readonly data section. */ /* #define JUMP_TABLES_IN_TEXT_SECTION */ - - /* Define this macro if references to a symbol must be treated differently - depending on something about the variable or function named by the symbol - (such as what section it is in). - - The macro definition, if any, is executed immediately after the rtl for DECL - has been created and stored in `DECL_RTL (DECL)'. The value of the rtl will - be a `mem' whose address is a `symbol_ref'. - - The usual thing for this macro to do is to record a flag in the `symbol_ref' - (such as `SYMBOL_REF_FLAG') or to store a modified name string in the - `symbol_ref' (if one bit is not enough information). */ - /* #define ENCODE_SECTION_INFO(DECL) */ - - /* Decode SYM_NAME and store the real name part in VAR, sans the characters - that encode section info. Define this macro if `ENCODE_SECTION_INFO' alters - the symbol's name string. */ - /* #define STRIP_NAME_ENCODING(VAR, SYM_NAME) */ - - /* A C statement to build up a unique section name, expressed as a - STRING_CST node, and assign it to `DECL_SECTION_NAME (DECL)'. - RELOC indicates whether the initial value of EXP requires - link-time relocations. If you do not define this macro, GNU CC - will use the symbol name prefixed by `.' as the section name. - - Defined in svr4.h. */ - /* #define UNIQUE_SECTION(DECL, RELOC) */ - /* Position Independent Code. */ --- 2652,2663 ---- *************** extern const char *d30v_branch_cost_stri *** 2938,2945 **** /* #define ASM_OUTPUT_IDENT(STREAM, STRING) */ /* A C statement to output any assembler statements which are required to ! precede any Objective C object definitions or message sending. The ! statement is executed only when compiling an Objective C program. */ /* #define OBJC_PROLOGUE */ --- 2769,2776 ---- /* #define ASM_OUTPUT_IDENT(STREAM, STRING) */ /* A C statement to output any assembler statements which are required to ! precede any Objective-C object definitions or message sending. The ! statement is executed only when compiling an Objective-C program. */ /* #define OBJC_PROLOGUE */ *************** extern const char *d30v_branch_cost_stri *** 2956,2962 **** /* #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) */ /* You may define this macro as a C expression. You should define the ! expression to have a non-zero value if GNU CC should output the constant pool for a function before the code for the function, or a zero value if GNU CC should output the constant pool after the function. If you do not define this macro, the usual case, GNU CC --- 2787,2793 ---- /* #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) */ /* You may define this macro as a C expression. You should define the ! expression to have a nonzero value if GNU CC should output the constant pool for a function before the code for the function, or a zero value if GNU CC should output the constant pool after the function. If you do not define this macro, the usual case, GNU CC *************** extern const char *d30v_branch_cost_stri *** 3023,3049 **** /* These macros are provided by `real.h' for writing the definitions of `ASM_OUTPUT_DOUBLE' and the like: */ - /* These translate X, of type `REAL_VALUE_TYPE', to the target's floating point - representation, and store its bit pattern in the array of `long int' whose - address is L. The number of elements in the output array is determined by - the size of the desired target floating point data type: 32 bits of it go in - each `long int' array element. Each array element holds 32 bits of the - result, even if `long int' is wider than 32 bits on the host machine. - - The array element values are designed so that you can print them out using - `fprintf' in the order they should appear in the target machine's memory. */ - /* #define REAL_VALUE_TO_TARGET_SINGLE(X, L) */ - /* #define REAL_VALUE_TO_TARGET_DOUBLE(X, L) */ - /* #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(X, L) */ - - /* This macro converts X, of type `REAL_VALUE_TYPE', to a decimal number and - stores it as a string into STRING. You must pass, as STRING, the address of - a long enough block of space to hold the result. - - The argument FORMAT is a `printf'-specification that serves as a suggestion - for how to format the output string. */ - /* #define REAL_VALUE_TO_DECIMAL(X, FORMAT, STRING) */ - /* Output of Uninitialized Variables. */ --- 2854,2859 ---- *************** extern const char *d30v_branch_cost_stri *** 3149,3166 **** /* Output and Generation of Labels. */ - /* A C statement (sans semicolon) to output to the stdio stream STREAM the - assembler definition of a label named NAME. Use the expression - `assemble_name (STREAM, NAME)' to output the name itself; before and after - that, output the additional assembler syntax for defining the name, and a - newline. */ - - #define ASM_OUTPUT_LABEL(STREAM, NAME) \ - do { \ - assemble_name (STREAM, NAME); \ - fputs (":\n", STREAM); \ - } while (0) - /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of a function which is being defined. This macro is responsible for outputting the label definition (perhaps using --- 2959,2964 ---- *************** do { \ *** 3207,3224 **** Defined in svr4.h. */ /* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */ ! /* A C statement (sans semicolon) to output to the stdio stream STREAM some ! commands that will make the label NAME global; that is, available for ! reference from other files. Use the expression `assemble_name (STREAM, ! NAME)' to output the name itself; before and after that, output the ! additional assembler syntax for making that name global, and a newline. */ ! ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do { \ ! fputs ("\t.globl ", STREAM); \ ! assemble_name (STREAM, NAME); \ ! fputs ("\n", STREAM); \ ! } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM some commands that will make the label NAME weak; that is, available for --- 3005,3012 ---- Defined in svr4.h. */ /* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* A C statement (sans semicolon) to output to the stdio stream STREAM some commands that will make the label NAME weak; that is, available for *************** do { \ *** 3634,3645 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on the section ! that the address refers to. On these machines, define the macro ! `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and ! then check for it here. *Note Assembler Format::. */ #define PRINT_OPERAND_ADDRESS(STREAM, X) d30v_print_operand_address (STREAM, X) --- 3422,3428 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. */ #define PRINT_OPERAND_ADDRESS(STREAM, X) d30v_print_operand_address (STREAM, X) *************** fprintf (STREAM, "\t.word .L%d\n", VALUE *** 4161,4304 **** /* #define SDB_ALLOW_FORWARD_REFERENCES */ - /* Cross Compilation and Floating Point. */ - - /* While all modern machines use 2's complement representation for integers, - there are a variety of representations for floating point numbers. This - means that in a cross-compiler the representation of floating point numbers - in the compiled program may be different from that used in the machine doing - the compilation. - - Because different representation systems may offer different amounts of - range and precision, the cross compiler cannot safely use the host machine's - floating point arithmetic. Therefore, floating point constants must be - represented in the target machine's format. This means that the cross - compiler cannot use `atof' to parse a floating point constant; it must have - its own special routine to use instead. Also, constant folding must emulate - the target machine's arithmetic (or must not be done at all). - - The macros in the following table should be defined only if you are cross - compiling between different floating point formats. - - Otherwise, don't define them. Then default definitions will be set up which - use `double' as the data type, `==' to test for equality, etc. - - You don't need to worry about how many times you use an operand of any of - these macros. The compiler never uses operands which have side effects. */ - - /* A macro for the C data type to be used to hold a floating point value in the - target machine's format. Typically this would be a `struct' containing an - array of `int'. */ - /* #define REAL_VALUE_TYPE */ - - /* A macro for a C expression which compares for equality the two values, X and - Y, both of type `REAL_VALUE_TYPE'. */ - /* #define REAL_VALUES_EQUAL(X, Y) */ - - /* A macro for a C expression which tests whether X is less than Y, both values - being of type `REAL_VALUE_TYPE' and interpreted as floating point numbers in - the target machine's representation. */ - /* #define REAL_VALUES_LESS(X, Y) */ - - /* A macro for a C expression which performs the standard library function - `ldexp', but using the target machine's floating point representation. Both - X and the value of the expression have type `REAL_VALUE_TYPE'. The second - argument, SCALE, is an integer. */ - /* #define REAL_VALUE_LDEXP(X, SCALE) */ - - /* A macro whose definition is a C expression to convert the target-machine - floating point value X to a signed integer. X has type `REAL_VALUE_TYPE'. */ - /* #define REAL_VALUE_FIX(X) */ - - /* A macro whose definition is a C expression to convert the target-machine - floating point value X to an unsigned integer. X has type - `REAL_VALUE_TYPE'. */ - /* #define REAL_VALUE_UNSIGNED_FIX(X) */ - - /* A macro whose definition is a C expression to round the target-machine - floating point value X towards zero to an integer value (but still as a - floating point number). X has type `REAL_VALUE_TYPE', and so does the - value. */ - /* #define REAL_VALUE_RNDZINT(X) */ - - /* A macro whose definition is a C expression to round the target-machine - floating point value X towards zero to an unsigned integer value (but still - represented as a floating point number). X has type `REAL_VALUE_TYPE', and - so does the value. */ - /* #define REAL_VALUE_UNSIGNED_RNDZINT(X) */ - - /* A macro for a C expression which converts STRING, an expression of type - `char *', into a floating point number in the target machine's - representation for mode MODE. The value has type `REAL_VALUE_TYPE'. */ - /* #define REAL_VALUE_ATOF(STRING, MODE) */ - - /* Define this macro if infinity is a possible floating point value, and - therefore division by 0 is legitimate. */ - /* #define REAL_INFINITY */ - - /* A macro for a C expression which determines whether X, a floating point - value, is infinity. The value has type `int'. By default, this is defined - to call `isinf'. */ - /* #define REAL_VALUE_ISINF(X) */ - - /* A macro for a C expression which determines whether X, a floating point - value, is a "nan" (not-a-number). The value has type `int'. By default, - this is defined to call `isnan'. */ - /* #define REAL_VALUE_ISNAN(X) */ - - /* Define the following additional macros if you want to make floating point - constant folding work while cross compiling. If you don't define them, - cross compilation is still possible, but constant folding will not happen - for floating point values. */ - - /* A macro for a C statement which calculates an arithmetic operation of the - two floating point values X and Y, both of type `REAL_VALUE_TYPE' in the - target machine's representation, to produce a result of the same type and - representation which is stored in OUTPUT (which will be a variable). - - The operation to be performed is specified by CODE, a tree code which will - always be one of the following: `PLUS_EXPR', `MINUS_EXPR', `MULT_EXPR', - `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'. - - The expansion of this macro is responsible for checking for overflow. If - overflow happens, the macro expansion should execute the statement `return - 0;', which indicates the inability to perform the arithmetic operation - requested. */ - /* #define REAL_ARITHMETIC(OUTPUT, CODE, X, Y) */ - - /* The real.h file actually defines REAL_ARITHMETIC appropriately if it was - defined at all before entering into the code, by using #undef first. */ - #define REAL_ARITHMETIC - - /* A macro for a C expression which returns the negative of the floating point - value X. Both X and the value of the expression have type `REAL_VALUE_TYPE' - and are in the target machine's floating point representation. - - There is no way for this macro to report overflow, since overflow can't - happen in the negation operation. */ - /* #define REAL_VALUE_NEGATE(X) */ - - /* A macro for a C expression which converts the floating point value X to mode - MODE. - - Both X and the value of the expression are in the target machine's floating - point representation and have type `REAL_VALUE_TYPE'. However, the value - should have an appropriate bit pattern to be output properly as a floating - constant whose precision accords with mode MODE. - - There is no way for this macro to report overflow. */ - /* #define REAL_VALUE_TRUNCATE(MODE, X) */ - - /* A macro for a C expression which converts a floating point value X into a - double-precision integer which is then stored into LOW and HIGH, two - variables of type INT. */ - /* #define REAL_VALUE_TO_INT(LOW, HIGH, X) */ - - /* A macro for a C expression which converts a double-precision integer found - in LOW and HIGH, two variables of type INT, into a floating point value - which is then stored into X. */ - /* #define REAL_VALUE_FROM_INT(X, LOW, HIGH) */ - /* Miscellaneous Parameters. */ --- 3944,3949 ---- *************** fprintf (STREAM, "\t.word .L%d\n", VALUE *** 4444,4450 **** /* A C expression that is nonzero if on this machine the number of bits actually used for the count of a shift operation is equal to the number of bits needed to represent the size of the object being shifted. When this ! macro is non-zero, the compiler will assume that it is safe to omit a sign-extend, zero-extend, and certain bitwise `and' instructions that truncates the count of a shift operation. On machines that have instructions that act on bitfields at variable positions, which may include --- 4089,4095 ---- /* A C expression that is nonzero if on this machine the number of bits actually used for the count of a shift operation is equal to the number of bits needed to represent the size of the object being shifted. When this ! macro is nonzero, the compiler will assume that it is safe to omit a sign-extend, zero-extend, and certain bitwise `and' instructions that truncates the count of a shift operation. On machines that have instructions that act on bitfields at variable positions, which may include *************** fprintf (STREAM, "\t.word .L%d\n", VALUE *** 4453,4459 **** instructions. If both types of instructions truncate the count (for shifts) and position ! (for bitfield operations), or if no variable-position bitfield instructions exist, you should define this macro. However, on some machines, such as the 80386 and the 680x0, truncation only --- 4098,4104 ---- instructions. If both types of instructions truncate the count (for shifts) and position ! (for bit-field operations), or if no variable-position bit-field instructions exist, you should define this macro. However, on some machines, such as the 80386 and the 680x0, truncation only *************** fprintf (STREAM, "\t.word .L%d\n", VALUE *** 4546,4552 **** Some machines can also perform `and' or `plus' operations on condition code values with less instructions than the corresponding `sCOND' insn followed by `and' or `plus'. On those machines, define the appropriate patterns. ! Use the names `incscc' and `decscc', respectively, for the the patterns which perform `plus' or `minus' operations on condition code values. See `rs6000.md' for some examples. The GNU Superoptizer can be used to find such instruction sequences on other machines. --- 4191,4197 ---- Some machines can also perform `and' or `plus' operations on condition code values with less instructions than the corresponding `sCOND' insn followed by `and' or `plus'. On those machines, define the appropriate patterns. ! Use the names `incscc' and `decscc', respectively, for the patterns which perform `plus' or `minus' operations on condition code values. See `rs6000.md' for some examples. The GNU Superoptizer can be used to find such instruction sequences on other machines. *************** fprintf (STREAM, "\t.word .L%d\n", VALUE *** 4555,4561 **** instructions. */ /* #define STORE_FLAG_VALUE */ ! /* A C expression that gives a non-zero floating point value that is returned when comparison operators with floating-point results are true. Define this macro on machine that have comparison operations that return floating-point values. If there are no such operations, do not define this macro. */ --- 4200,4206 ---- instructions. */ /* #define STORE_FLAG_VALUE */ ! /* A C expression that gives a nonzero floating point value that is returned when comparison operators with floating-point results are true. Define this macro on machine that have comparison operations that return floating-point values. If there are no such operations, do not define this macro. */ *************** fprintf (STREAM, "\t.word .L%d\n", VALUE *** 4585,4596 **** should be used on RISC machines. */ /* #define INTEGRATE_THRESHOLD(DECL) */ - /* Define this if the preprocessor should ignore `#sccs' directives and print - no error message. - - Defined in svr4.h. */ - /* #define SCCS_DIRECTIVE */ - /* Define this macro if the system header files support C++ as well as C. This macro inhibits the usual method of using system header files in C++, which is to pretend that the file's contents are enclosed in `extern "C" {...}'. */ --- 4230,4235 ---- *************** fprintf (STREAM, "\t.word .L%d\n", VALUE *** 4599,4617 **** /* Define this macro to handle System V style pragmas (particularly #pack). Defined in svr4.h. */ ! #define HANDLE_SYSV_PRAGMA /* Define this macro if you want to handle #pragma weak (HANDLE_SYSV_PRAGMA must also be defined). */ /* #define HANDLE_WEAK_PRAGMA */ - /* Define this macro to control use of the character `$' in identifier names. - The value should be 0, 1, or 2. 0 means `$' is not allowed by default; 1 - means it is allowed by default if `-traditional' is used; 2 means it is - allowed by default provided `-ansi' is not used. 1 is the default; there is - no need to define this macro in that case. */ - /* #define DOLLARS_IN_IDENTIFIERS */ - /* Define this macro if the assembler does not accept the character `$' in label names. By default constructors and destructors in G++ have `$' in the identifiers. If this macro is defined, `.' is used instead. --- 4238,4249 ---- /* Define this macro to handle System V style pragmas (particularly #pack). Defined in svr4.h. */ ! #define HANDLE_SYSV_PRAGMA 1 /* Define this macro if you want to handle #pragma weak (HANDLE_SYSV_PRAGMA must also be defined). */ /* #define HANDLE_WEAK_PRAGMA */ /* Define this macro if the assembler does not accept the character `$' in label names. By default constructors and destructors in G++ have `$' in the identifiers. If this macro is defined, `.' is used instead. diff -Nrc3pad gcc-3.2.3/gcc/config/d30v/d30v-protos.h gcc-3.3/gcc/config/d30v/d30v-protos.h *** gcc-3.2.3/gcc/config/d30v/d30v-protos.h 2001-11-04 02:12:08.000000000 +0000 --- gcc-3.3/gcc/config/d30v/d30v-protos.h 2002-07-16 20:58:57.000000000 +0000 *************** extern void d30v_setup_incoming_varargs *** 105,111 **** tree, int *, int)); extern tree d30v_build_va_list PARAMS ((void)); #ifdef RTX_CODE ! extern void d30v_expand_builtin_va_start PARAMS ((int, tree, rtx)); extern rtx d30v_expand_builtin_va_arg PARAMS ((tree, tree)); #endif /* RTX_CODE */ #endif /* TREE_CODE */ --- 105,111 ---- tree, int *, int)); extern tree d30v_build_va_list PARAMS ((void)); #ifdef RTX_CODE ! extern void d30v_expand_builtin_va_start PARAMS ((tree, rtx)); extern rtx d30v_expand_builtin_va_arg PARAMS ((tree, tree)); #endif /* RTX_CODE */ #endif /* TREE_CODE */ *************** extern void debug_stack_info PARAMS ((d *** 140,147 **** /* Define the information needed to generate branch and scc insns. This is stored from the compare operation. */ ! extern struct rtx_def *d30v_compare_op0; ! extern struct rtx_def *d30v_compare_op1; /* Define the information needed to modify the epilogue for EH. */ --- 140,147 ---- /* Define the information needed to generate branch and scc insns. This is stored from the compare operation. */ ! extern GTY(()) rtx d30v_compare_op0; ! extern GTY(()) rtx d30v_compare_op1; /* Define the information needed to modify the epilogue for EH. */ diff -Nrc3pad gcc-3.2.3/gcc/config/darwin.c gcc-3.3/gcc/config/darwin.c *** gcc-3.2.3/gcc/config/darwin.c 2002-01-03 17:13:37.000000000 +0000 --- gcc-3.3/gcc/config/darwin.c 2002-09-29 13:16:44.000000000 +0000 *************** *** 1,5 **** /* Functions for generic Darwin as target machine for GNU C compiler. ! Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001 Free Software Foundation, Inc. Contributed by Apple Computer Inc. --- 1,5 ---- /* Functions for generic Darwin as target machine for GNU C compiler. ! Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Apple Computer Inc. *************** Boston, MA 02111-1307, USA. */ *** 38,50 **** #include "function.h" #include "ggc.h" #include "langhooks.h" ! ! #include "darwin-protos.h" ! ! extern void machopic_output_stub PARAMS ((FILE *, const char *, const char *)); static int machopic_data_defined_p PARAMS ((const char *)); - static int func_name_maybe_scoped PARAMS ((const char *)); static void update_non_lazy_ptrs PARAMS ((const char *)); static void update_stubs PARAMS ((const char *)); --- 38,46 ---- #include "function.h" #include "ggc.h" #include "langhooks.h" ! #include "tm_p.h" static int machopic_data_defined_p PARAMS ((const char *)); static void update_non_lazy_ptrs PARAMS ((const char *)); static void update_stubs PARAMS ((const char *)); *************** name_needs_quotes (name) *** 67,73 **** /* This module assumes that (const (symbol_ref "foo")) is a legal pic reference, which will not be changed. */ ! static tree machopic_defined_list; enum machopic_addr_class machopic_classify_ident (ident) --- 63,69 ---- /* This module assumes that (const (symbol_ref "foo")) is a legal pic reference, which will not be changed. */ ! static GTY(()) tree machopic_defined_list; enum machopic_addr_class machopic_classify_ident (ident) *************** machopic_define_name (name) *** 221,233 **** } /* This is a static to make inline functions work. The rtx ! representing the PIC base symbol always points to here. */ static char function_base[32]; static int current_pic_label_num; ! char * machopic_function_base_name () { static const char *name = NULL; --- 217,229 ---- } /* This is a static to make inline functions work. The rtx ! representing the PIC base symbol always points to here. */ static char function_base[32]; static int current_pic_label_num; ! const char * machopic_function_base_name () { static const char *name = NULL; *************** machopic_function_base_name () *** 257,273 **** return function_base; } ! static tree machopic_non_lazy_pointers = NULL; /* Return a non-lazy pointer name corresponding to the given name, either by finding it in our list of pointer names, or by generating a new one. */ ! char * machopic_non_lazy_ptr_name (name) const char *name; { ! char *temp_name; tree temp, ident = get_identifier (name); for (temp = machopic_non_lazy_pointers; --- 253,269 ---- return function_base; } ! static GTY(()) tree machopic_non_lazy_pointers; /* Return a non-lazy pointer name corresponding to the given name, either by finding it in our list of pointer names, or by generating a new one. */ ! const char * machopic_non_lazy_ptr_name (name) const char *name; { ! const char *temp_name; tree temp, ident = get_identifier (name); for (temp = machopic_non_lazy_pointers; *************** machopic_non_lazy_ptr_name (name) *** 278,284 **** return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } ! STRIP_NAME_ENCODING (name, name); /* Try again, but comparing names this time. */ for (temp = machopic_non_lazy_pointers; --- 274,280 ---- return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } ! name = darwin_strip_name_encoding (name); /* Try again, but comparing names this time. */ for (temp = machopic_non_lazy_pointers; *************** machopic_non_lazy_ptr_name (name) *** 288,294 **** if (TREE_VALUE (temp)) { temp_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); ! STRIP_NAME_ENCODING (temp_name, temp_name); if (strcmp (name, temp_name) == 0) return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } --- 284,290 ---- if (TREE_VALUE (temp)) { temp_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); ! temp_name = darwin_strip_name_encoding (temp_name); if (strcmp (name, temp_name) == 0) return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } *************** machopic_non_lazy_ptr_name (name) *** 321,342 **** } } ! static tree machopic_stubs = 0; ! ! /* Make sure the GC knows about our homemade lists. */ ! ! void ! machopic_add_gc_roots () ! { ! ggc_add_tree_root (&machopic_defined_list, 1); ! ggc_add_tree_root (&machopic_non_lazy_pointers, 1); ! ggc_add_tree_root (&machopic_stubs, 1); ! } /* Return the name of the stub corresponding to the given name, generating a new stub name if necessary. */ ! char * machopic_stub_name (name) const char *name; { --- 317,328 ---- } } ! static GTY(()) tree machopic_stubs; /* Return the name of the stub corresponding to the given name, generating a new stub name if necessary. */ ! const char * machopic_stub_name (name) const char *name; { *************** machopic_stub_name (name) *** 360,366 **** return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } ! STRIP_NAME_ENCODING (name, name); { char *buffer; --- 346,352 ---- return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } ! name = darwin_strip_name_encoding (name); { char *buffer; *************** machopic_validate_stub_or_non_lazy_ptr ( *** 401,407 **** const char *name; int validate_stub; { ! char *real_name; tree temp, ident = get_identifier (name), id2; for (temp = (validate_stub ? machopic_stubs : machopic_non_lazy_pointers); --- 387,393 ---- const char *name; int validate_stub; { ! const char *real_name; tree temp, ident = get_identifier (name), id2; for (temp = (validate_stub ? machopic_stubs : machopic_non_lazy_pointers); *************** machopic_validate_stub_or_non_lazy_ptr ( *** 414,420 **** TREE_USED (temp) = 1; if (TREE_CODE (TREE_VALUE (temp)) == IDENTIFIER_NODE) TREE_SYMBOL_REFERENCED (TREE_VALUE (temp)) = 1; ! STRIP_NAME_ENCODING (real_name, IDENTIFIER_POINTER (TREE_VALUE (temp))); id2 = maybe_get_identifier (real_name); if (id2) TREE_SYMBOL_REFERENCED (id2) = 1; --- 400,407 ---- TREE_USED (temp) = 1; if (TREE_CODE (TREE_VALUE (temp)) == IDENTIFIER_NODE) TREE_SYMBOL_REFERENCED (TREE_VALUE (temp)) = 1; ! real_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); ! real_name = darwin_strip_name_encoding (real_name); id2 = maybe_get_identifier (real_name); if (id2) TREE_SYMBOL_REFERENCED (id2) = 1; *************** machopic_indirect_data_reference (orig, *** 439,448 **** --- 426,437 ---- if (machopic_data_defined_p (name)) { + #if defined (TARGET_TOC) || defined (HAVE_lo_sum) rtx pic_base = gen_rtx (SYMBOL_REF, Pmode, machopic_function_base_name ()); rtx offset = gen_rtx (CONST, Pmode, gen_rtx (MINUS, Pmode, orig, pic_base)); + #endif #if defined (TARGET_TOC) /* i.e., PowerPC */ rtx hi_sum_reg = reg; *************** machopic_indirect_data_reference (orig, *** 502,510 **** else result = gen_rtx (PLUS, Pmode, base, orig); - if (RTX_UNCHANGING_P (base) && RTX_UNCHANGING_P (orig)) - RTX_UNCHANGING_P (result) = 1; - if (MACHOPIC_JUST_INDIRECT && GET_CODE (base) == MEM) { if (reg) --- 491,496 ---- *************** machopic_legitimize_pic_address (orig, m *** 676,685 **** } #if !defined (TARGET_TOC) - RTX_UNCHANGING_P (pic_ref) = 1; emit_move_insn (reg, pic_ref); pic_ref = gen_rtx (MEM, GET_MODE (orig), reg); #endif } else { --- 662,671 ---- } #if !defined (TARGET_TOC) emit_move_insn (reg, pic_ref); pic_ref = gen_rtx (MEM, GET_MODE (orig), reg); #endif + RTX_UNCHANGING_P (pic_ref) = 1; } else { *************** machopic_legitimize_pic_address (orig, m *** 711,716 **** --- 697,703 ---- gen_rtx (LO_SUM, Pmode, hi_sum_reg, offset))); pic_ref = reg; + RTX_UNCHANGING_P (pic_ref) = 1; #else emit_insn (gen_rtx (SET, VOIDmode, reg, gen_rtx (HIGH, Pmode, offset))); *************** machopic_legitimize_pic_address (orig, m *** 718,723 **** --- 705,711 ---- gen_rtx (LO_SUM, Pmode, reg, offset))); pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, reg); + RTX_UNCHANGING_P (pic_ref) = 1; #endif } else *************** machopic_legitimize_pic_address (orig, m *** 748,755 **** } } - RTX_UNCHANGING_P (pic_ref) = 1; - if (GET_CODE (pic_ref) != REG) { if (reg != 0) --- 736,741 ---- *************** machopic_finish (asm_out_file) *** 846,852 **** if (sym_name[0] == '!' && sym_name[1] == 'T') continue; ! STRIP_NAME_ENCODING (sym_name, sym_name); sym = alloca (strlen (sym_name) + 2); if (sym_name[0] == '*' || sym_name[0] == '&') --- 832,838 ---- if (sym_name[0] == '!' && sym_name[1] == 'T') continue; ! sym_name = darwin_strip_name_encoding (sym_name); sym = alloca (strlen (sym_name) + 2); if (sym_name[0] == '*' || sym_name[0] == '&') *************** machopic_finish (asm_out_file) *** 869,888 **** temp != NULL_TREE; temp = TREE_CHAIN (temp)) { ! char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); ! char *lazy_name = IDENTIFIER_POINTER (TREE_PURPOSE (temp)); ! #if 0 ! tree decl = lookup_name_darwin (TREE_VALUE (temp)); ! #endif if (! TREE_USED (temp)) continue; ! if (machopic_ident_defined_p (TREE_VALUE (temp)) ! #if 0 /* add back when we have private externs */ ! || (decl && DECL_PRIVATE_EXTERN (decl)) ! #endif ! ) { data_section (); assemble_align (GET_MODE_ALIGNMENT (Pmode)); --- 855,867 ---- temp != NULL_TREE; temp = TREE_CHAIN (temp)) { ! const char *const sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); ! const char *const lazy_name = IDENTIFIER_POINTER (TREE_PURPOSE (temp)); if (! TREE_USED (temp)) continue; ! if (machopic_ident_defined_p (TREE_VALUE (temp))) { data_section (); assemble_align (GET_MODE_ALIGNMENT (Pmode)); *************** machopic_operand_p (op) *** 932,949 **** && machopic_name_defined_p (XSTR (XEXP (op, 1), 0))) return 1; - #if 0 /*def TARGET_TOC*/ /* i.e., PowerPC */ - /* Without this statement, the compiler crashes while compiling enquire.c - when targetting PowerPC. It is not known why this code is not needed - when targetting other processors. */ - else if (GET_CODE (op) == SYMBOL_REF - && (machopic_classify_name (XSTR (op, 0)) - == MACHOPIC_DEFINED_FUNCTION)) - { - return 1; - } - #endif - return 0; } --- 911,916 ---- *************** machopic_operand_p (op) *** 952,959 **** use later. */ void ! darwin_encode_section_info (decl) tree decl; { char code = '\0'; int defined = 0; --- 919,927 ---- use later. */ void ! darwin_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { char code = '\0'; int defined = 0; *************** darwin_encode_section_info (decl) *** 1014,1019 **** --- 982,996 ---- update_stubs (XSTR (sym_ref, 0)); } + /* Undo the effects of the above. */ + + const char * + darwin_strip_name_encoding (str) + const char *str; + { + return str[0] == '!' ? str + 4 : str; + } + /* Scan the list of non-lazy pointers and update any recorded names whose stripped name matches the argument. */ *************** update_non_lazy_ptrs (name) *** 1024,1040 **** const char *name1, *name2; tree temp; ! STRIP_NAME_ENCODING (name1, name); for (temp = machopic_non_lazy_pointers; temp != NULL_TREE; temp = TREE_CHAIN (temp)) { ! char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); if (*sym_name == '!') { ! STRIP_NAME_ENCODING (name2, sym_name); if (strcmp (name1, name2) == 0) { IDENTIFIER_POINTER (TREE_VALUE (temp)) = name; --- 1001,1017 ---- const char *name1, *name2; tree temp; ! name1 = darwin_strip_name_encoding (name); for (temp = machopic_non_lazy_pointers; temp != NULL_TREE; temp = TREE_CHAIN (temp)) { ! const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); if (*sym_name == '!') { ! name2 = darwin_strip_name_encoding (sym_name); if (strcmp (name1, name2) == 0) { IDENTIFIER_POINTER (TREE_VALUE (temp)) = name; *************** update_non_lazy_ptrs (name) *** 1046,1052 **** /* Function NAME is being defined, and its label has just been output. If there's already a reference to a stub for this function, we can ! just emit the stub label now and we don't bother emitting the stub later. */ void machopic_output_possible_stub_label (file, name) --- 1023,1029 ---- /* Function NAME is being defined, and its label has just been output. If there's already a reference to a stub for this function, we can ! just emit the stub label now and we don't bother emitting the stub later. */ void machopic_output_possible_stub_label (file, name) *************** update_stubs (name) *** 1088,1104 **** const char *name1, *name2; tree temp; ! STRIP_NAME_ENCODING (name1, name); for (temp = machopic_stubs; temp != NULL_TREE; temp = TREE_CHAIN (temp)) { ! char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); if (*sym_name == '!') { ! STRIP_NAME_ENCODING (name2, sym_name); if (strcmp (name1, name2) == 0) { IDENTIFIER_POINTER (TREE_VALUE (temp)) = name; --- 1065,1081 ---- const char *name1, *name2; tree temp; ! name1 = darwin_strip_name_encoding (name); for (temp = machopic_stubs; temp != NULL_TREE; temp = TREE_CHAIN (temp)) { ! const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); if (*sym_name == '!') { ! name2 = darwin_strip_name_encoding (sym_name); if (strcmp (name1, name2) == 0) { IDENTIFIER_POINTER (TREE_VALUE (temp)) = name; *************** update_stubs (name) *** 1109,1114 **** --- 1086,1238 ---- } void + machopic_select_section (exp, reloc, align) + tree exp; + int reloc; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + if (TREE_CODE (exp) == STRING_CST) + { + if (flag_writable_strings) + data_section (); + else if (TREE_STRING_LENGTH (exp) != + strlen (TREE_STRING_POINTER (exp)) + 1) + readonly_data_section (); + else + cstring_section (); + } + else if (TREE_CODE (exp) == INTEGER_CST + || TREE_CODE (exp) == REAL_CST) + { + tree size = TYPE_SIZE (TREE_TYPE (exp)); + + if (TREE_CODE (size) == INTEGER_CST && + TREE_INT_CST_LOW (size) == 4 && + TREE_INT_CST_HIGH (size) == 0) + literal4_section (); + else if (TREE_CODE (size) == INTEGER_CST && + TREE_INT_CST_LOW (size) == 8 && + TREE_INT_CST_HIGH (size) == 0) + literal8_section (); + else + readonly_data_section (); + } + else if (TREE_CODE (exp) == CONSTRUCTOR + && TREE_TYPE (exp) + && TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE + && TYPE_NAME (TREE_TYPE (exp))) + { + tree name = TYPE_NAME (TREE_TYPE (exp)); + if (TREE_CODE (name) == TYPE_DECL) + name = DECL_NAME (name); + if (!strcmp (IDENTIFIER_POINTER (name), "NSConstantString")) + objc_constant_string_object_section (); + else if (!strcmp (IDENTIFIER_POINTER (name), "NXConstantString")) + objc_string_object_section (); + else if (TREE_READONLY (exp) || TREE_CONSTANT (exp)) + { + if (TREE_SIDE_EFFECTS (exp) || (flag_pic && reloc)) + const_data_section (); + else + readonly_data_section (); + } + else + data_section (); + } + else if (TREE_CODE (exp) == VAR_DECL && + DECL_NAME (exp) && + TREE_CODE (DECL_NAME (exp)) == IDENTIFIER_NODE && + IDENTIFIER_POINTER (DECL_NAME (exp)) && + !strncmp (IDENTIFIER_POINTER (DECL_NAME (exp)), "_OBJC_", 6)) + { + const char *name = IDENTIFIER_POINTER (DECL_NAME (exp)); + + if (!strncmp (name, "_OBJC_CLASS_METHODS_", 20)) + objc_cls_meth_section (); + else if (!strncmp (name, "_OBJC_INSTANCE_METHODS_", 23)) + objc_inst_meth_section (); + else if (!strncmp (name, "_OBJC_CATEGORY_CLASS_METHODS_", 20)) + objc_cat_cls_meth_section (); + else if (!strncmp (name, "_OBJC_CATEGORY_INSTANCE_METHODS_", 23)) + objc_cat_inst_meth_section (); + else if (!strncmp (name, "_OBJC_CLASS_VARIABLES_", 22)) + objc_class_vars_section (); + else if (!strncmp (name, "_OBJC_INSTANCE_VARIABLES_", 25)) + objc_instance_vars_section (); + else if (!strncmp (name, "_OBJC_CLASS_PROTOCOLS_", 22)) + objc_cat_cls_meth_section (); + else if (!strncmp (name, "_OBJC_CLASS_NAME_", 17)) + objc_class_names_section (); + else if (!strncmp (name, "_OBJC_METH_VAR_NAME_", 20)) + objc_meth_var_names_section (); + else if (!strncmp (name, "_OBJC_METH_VAR_TYPE_", 20)) + objc_meth_var_types_section (); + else if (!strncmp (name, "_OBJC_CLASS_REFERENCES", 22)) + objc_cls_refs_section (); + else if (!strncmp (name, "_OBJC_CLASS_", 12)) + objc_class_section (); + else if (!strncmp (name, "_OBJC_METACLASS_", 16)) + objc_meta_class_section (); + else if (!strncmp (name, "_OBJC_CATEGORY_", 15)) + objc_category_section (); + else if (!strncmp (name, "_OBJC_SELECTOR_REFERENCES", 25)) + objc_selector_refs_section (); + else if (!strncmp (name, "_OBJC_SELECTOR_FIXUP", 20)) + objc_selector_fixup_section (); + else if (!strncmp (name, "_OBJC_SYMBOLS", 13)) + objc_symbols_section (); + else if (!strncmp (name, "_OBJC_MODULES", 13)) + objc_module_info_section (); + else if (!strncmp (name, "_OBJC_PROTOCOL_INSTANCE_METHODS_", 32)) + objc_cat_inst_meth_section (); + else if (!strncmp (name, "_OBJC_PROTOCOL_CLASS_METHODS_", 29)) + objc_cat_cls_meth_section (); + else if (!strncmp (name, "_OBJC_PROTOCOL_REFS_", 20)) + objc_cat_cls_meth_section (); + else if (!strncmp (name, "_OBJC_PROTOCOL_", 15)) + objc_protocol_section (); + else if ((TREE_READONLY (exp) || TREE_CONSTANT (exp)) + && !TREE_SIDE_EFFECTS (exp)) + { + if (flag_pic && reloc) + const_data_section (); + else + readonly_data_section (); + } + else + data_section (); + } + else if (TREE_READONLY (exp) || TREE_CONSTANT (exp)) + { + if (TREE_SIDE_EFFECTS (exp) || (flag_pic && reloc)) + const_data_section (); + else + readonly_data_section (); + } + else + data_section (); + } + + /* This can be called with address expressions as "rtx". + They must go in "const". */ + + void + machopic_select_rtx_section (mode, x, align) + enum machine_mode mode; + rtx x; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + if (GET_MODE_SIZE (mode) == 8) + literal8_section (); + else if (GET_MODE_SIZE (mode) == 4 + && (GET_CODE (x) == CONST_INT + || GET_CODE (x) == CONST_DOUBLE)) + literal4_section (); + else + const_section (); + } + + void machopic_asm_out_constructor (symbol, priority) rtx symbol; int priority ATTRIBUTE_UNUSED; *************** machopic_asm_out_destructor (symbol, pri *** 1139,1141 **** --- 1263,1306 ---- if (!flag_pic) fprintf (asm_out_file, ".reference .destructors_used\n"); } + + void + darwin_globalize_label (stream, name) + FILE *stream; + const char *name; + { + if (!!strncmp (name, "_OBJC_", 6)) + default_globalize_label (stream, name); + } + + /* Output a difference of two labels that will be an assembly time + constant if the two labels are local. (.long lab1-lab2 will be + very different if lab1 is at the boundary between two sections; it + will be relocated according to the second section, not the first, + so one ends up with a difference between labels in different + sections, which is bad in the dwarf2 eh context for instance.) */ + + static int darwin_dwarf_label_counter; + + void + darwin_asm_output_dwarf_delta (file, size, lab1, lab2) + FILE *file; + int size ATTRIBUTE_UNUSED; + const char *lab1, *lab2; + { + const char *p = lab1 + (lab1[0] == '*'); + int islocaldiff = (p[0] == 'L'); + + if (islocaldiff) + fprintf (file, "\t.set L$set$%d,", darwin_dwarf_label_counter); + else + fprintf (file, "\t%s\t", ".long"); + assemble_name (file, lab1); + fprintf (file, "-"); + assemble_name (file, lab2); + if (islocaldiff) + fprintf (file, "\n\t.long L$set$%d", darwin_dwarf_label_counter++); + } + + #include "gt-darwin.h" + diff -Nrc3pad gcc-3.2.3/gcc/config/darwin-c.c gcc-3.3/gcc/config/darwin-c.c *** gcc-3.2.3/gcc/config/darwin-c.c 2001-06-28 19:55:52.000000000 +0000 --- gcc-3.3/gcc/config/darwin-c.c 2002-08-11 19:14:26.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 25,31 **** #include "cpplib.h" #include "tree.h" #include "c-pragma.h" - #include "c-lex.h" #include "c-tree.h" #include "toplev.h" #include "tm_p.h" --- 25,30 ---- *************** void *** 91,97 **** darwin_pragma_options (pfile) cpp_reader *pfile ATTRIBUTE_UNUSED; { ! char *arg; tree t, x; if (c_lex (&t) != CPP_NAME) --- 90,96 ---- darwin_pragma_options (pfile) cpp_reader *pfile ATTRIBUTE_UNUSED; { ! const char *arg; tree t, x; if (c_lex (&t) != CPP_NAME) diff -Nrc3pad gcc-3.2.3/gcc/config/darwin-crt2.c gcc-3.3/gcc/config/darwin-crt2.c *** gcc-3.2.3/gcc/config/darwin-crt2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/darwin-crt2.c 2002-11-07 06:00:05.000000000 +0000 *************** *** 0 **** --- 1,151 ---- + /* KeyMgr backwards-compatibility support for Darwin. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file into combinations with other programs, + and to distribute those combinations without any restriction coming + from the use of this file. (The General Public License restrictions + do apply in other respects; for example, they cover modification of + the file, and distribution when not linked into a combine + executable.) + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + /* It is incorrect to include config.h here, because this file is being + compiled for the target, and hence definitions concerning only the host + do not apply. */ + + #include "tconfig.h" + #include "tsystem.h" + + /* Homemade decls substituting for getsect.h and dyld.h, so cross + compilation works. */ + struct mach_header; + extern char *getsectdatafromheader (struct mach_header *, const char *, + const char *, unsigned long *); + extern void _dyld_register_func_for_add_image + (void (*) (struct mach_header *, unsigned long)); + extern void _dyld_register_func_for_remove_image + (void (*) (struct mach_header *, unsigned long)); + + extern void __darwin_gcc3_preregister_frame_info (void); + + /* These are from "keymgr.h". */ + extern void _init_keymgr (void); + extern void *_keymgr_get_and_lock_processwide_ptr (unsigned key); + extern void _keymgr_set_and_unlock_processwide_ptr (unsigned key, void *ptr); + + extern void *__keymgr_global[]; + typedef struct _Sinfo_Node { + unsigned int size ; /*size of this node*/ + unsigned short major_version ; /*API major version.*/ + unsigned short minor_version ; /*API minor version.*/ + } _Tinfo_Node ; + + /* KeyMgr 3.x is the first one supporting GCC3 stuff natively. */ + #define KEYMGR_API_MAJOR_GCC3 3 + /* ... with these keys. */ + #define KEYMGR_GCC3_LIVE_IMAGE_LIST 301 /* loaded images */ + #define KEYMGR_GCC3_DW2_OBJ_LIST 302 /* Dwarf2 object list */ + + /* Node of KEYMGR_GCC3_LIVE_IMAGE_LIST. Info about each resident image. */ + struct live_images { + unsigned long this_size; /* sizeof (live_images) */ + struct mach_header *mh; /* the image info */ + unsigned long vm_slide; + void (*destructor)(struct live_images *); /* destructor for this */ + struct live_images *next; + unsigned int examined_p; + void *fde; + void *object_info; + unsigned long info[2]; /* Future use. */ + }; + + + /* These routines are used only on Darwin versions before 10.2. + Later versions have equivalent code in the system. + Eventually, they might go away, although it might be a long time... */ + + static void darwin_unwind_dyld_remove_image_hook + (struct mach_header *m, unsigned long s); + static void darwin_unwind_dyld_remove_image_hook + (struct mach_header *m, unsigned long s); + extern void __darwin_gcc3_preregister_frame_info (void); + + static void + darwin_unwind_dyld_add_image_hook (struct mach_header *mh, unsigned long slide) + { + struct live_images *l = (struct live_images *)calloc (1, sizeof (*l)); + l->mh = mh; + l->vm_slide = slide; + l->this_size = sizeof (*l); + l->next = (struct live_images *) + _keymgr_get_and_lock_processwide_ptr (KEYMGR_GCC3_LIVE_IMAGE_LIST); + _keymgr_set_and_unlock_processwide_ptr (KEYMGR_GCC3_LIVE_IMAGE_LIST, l); + } + + static void + darwin_unwind_dyld_remove_image_hook (struct mach_header *m, unsigned long s) + { + struct live_images *top, **lip, *destroy = NULL; + + /* Look for it in the list of live images and delete it. */ + + top = (struct live_images *) + _keymgr_get_and_lock_processwide_ptr (KEYMGR_GCC3_LIVE_IMAGE_LIST); + for (lip = ⊤ *lip != NULL; lip = &(*lip)->next) + { + if ((*lip)->mh == m && (*lip)->vm_slide == s) + { + destroy = *lip; + *lip = destroy->next; /* unlink DESTROY */ + + if (destroy->this_size != sizeof (*destroy)) /* sanity check */ + abort (); + + break; + } + } + _keymgr_set_and_unlock_processwide_ptr (KEYMGR_GCC3_LIVE_IMAGE_LIST, top); + + /* Now that we have unlinked this from the image list, toss it. */ + if (destroy != NULL) + { + if (destroy->destructor != NULL) + (*destroy->destructor) (destroy); + free (destroy); + } + } + + void + __darwin_gcc3_preregister_frame_info (void) + { + const _Tinfo_Node *info; + _init_keymgr (); + info = (_Tinfo_Node *)__keymgr_global[2]; + if (info != NULL) + { + if (info->major_version >= KEYMGR_API_MAJOR_GCC3) + return; + /* Otherwise, use our own add_image_hooks. */ + } + + _dyld_register_func_for_add_image (darwin_unwind_dyld_add_image_hook); + _dyld_register_func_for_remove_image (darwin_unwind_dyld_remove_image_hook); + } diff -Nrc3pad gcc-3.2.3/gcc/config/darwin.h gcc-3.3/gcc/config/darwin.h *** gcc-3.2.3/gcc/config/darwin.h 2002-01-15 20:20:20.000000000 +0000 --- gcc-3.3/gcc/config/darwin.h 2002-12-20 01:49:57.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 35,40 **** --- 35,46 ---- leave it undefined and expect system builders to set configure args correctly. */ + /* One of Darwin's NeXT legacies is the Mach-O format, which is partly + like a.out and partly like COFF, with additional features like + multi-architecture binary support. */ + + #define OBJECT_FORMAT_MACHO + /* Suppress g++ attempt to link in the math library automatically. (Some Darwin versions have a libm, but they seem to cause problems for C++ executables.) */ *************** Boston, MA 02111-1307, USA. */ *** 78,133 **** #undef DEFAULT_PCC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 0 ! /* Don't warn about MacOS-style 'APPL' four-char-constants. */ ! #undef WARN_FOUR_CHAR_CONSTANTS ! #define WARN_FOUR_CHAR_CONSTANTS 0 ! /* Machine dependent cpp options. */ ! /* The sequence here allows us to get a more specific version number ! glued into __APPLE_CC__. Normally this number would be updated as ! part of submitting to a release engineering organization. */ ! #ifndef APPLE_CC ! #define APPLE_CC 999 ! #endif ! #define STRINGIFY_THIS(x) # x ! #define REALLY_STRINGIFY(x) STRINGIFY_THIS(x) #undef CPP_SPEC ! #define CPP_SPEC "-D__APPLE_CC__=" REALLY_STRINGIFY(APPLE_CC) " \ ! %{static:-D__STATIC__}%{!static:-D__DYNAMIC__}" /* Machine dependent libraries. */ #undef LIB_SPEC #define LIB_SPEC "%{!static:-lSystem}" ! /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ ! #undef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{pg:%{static:-lgcrt0.o}%{!static:-lgcrt1.o}} \ ! %{!pg:%{static:-lcrt0.o}%{!static:-lcrt1.o}}" #undef DOLLARS_IN_IDENTIFIERS #define DOLLARS_IN_IDENTIFIERS 2 - /* Allow #sccs (but don't do anything). */ - - #define SCCS_DIRECTIVE - /* We use Dbx symbol format. */ ! #define DBX_DEBUGGING_INFO ! ! /* Also enable Dwarf 2 as an option. */ ! ! #define DWARF2_DEBUGGING_INFO ! ! #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG /* When generating stabs debugging, use N_BINCL entries. */ --- 84,297 ---- #undef DEFAULT_PCC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 0 ! /* This table intercepts weirdo options whose names would interfere ! with normal driver conventions, and either translates them into ! standardly-named options, or adds a 'Z' so that they can get to ! specs processing without interference. ! Do not expand a linker option to "-Xlinker -

    represented with index-sum outermost */\ - if (GET_CODE (XEXP (X, 0)) == REG \ - && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ - && GET_CODE (XEXP (X, 1)) == CONST_INT) \ - goto ADDR; \ - if (GET_CODE (XEXP (X, 1)) == REG \ - && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ - && GET_CODE (XEXP (X, 0)) == CONST_INT) \ - goto ADDR; \ - } \ - } - - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. - - For the VAX, nothing needs to be done. */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {} - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. */ - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) - - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE SImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - Do not define this if the table should contain absolute addresses. */ - /* #define CASE_VECTOR_PC_RELATIVE 1 */ - - /* Define this as 1 if `char' should by default be signed; else as 0. */ - #define DEFAULT_SIGNED_CHAR 1 - - /* This flag, if defined, says the same insns that convert to a signed fixnum - also convert validly to an unsigned one. */ - #define FIXUNS_TRUNC_LIKE_FIX_TRUNC - - /* Max number of bytes we can move from memory to memory - in one reasonably fast instruction. */ - #define MOVE_MAX 8 - - /* Nonzero if access to memory by bytes is slow and undesirable. */ - #define SLOW_BYTE_ACCESS 0 - - /* Define if shifts truncate the shift count - which implies one can omit a sign-extension or zero-extension - of a shift count. */ - /* #define SHIFT_COUNT_TRUNCATED */ - - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ - #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ - #define Pmode SImode - - /* A function address in a call instruction - is a byte address (for indexing purposes) - so give the MEM rtx a byte's mode. */ - #define FUNCTION_MODE QImode - - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - - #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST_INT: \ - /* Constant zero is super cheap due to clr instruction. */ \ - if (RTX == const0_rtx) return 0; \ - if ((unsigned) INTVAL (RTX) < 077) return 1; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 3; \ - case CONST_DOUBLE: \ - return 5; - - /* - * We can use the BSD C library routines for the gnulib calls that are - * still generated, since that's what they boil down to anyways. - */ - - /* #define UDIVSI3_LIBCALL "*udiv" */ - /* #define UMODSI3_LIBCALL "*urem" */ - - /* Tell final.c how to eliminate redundant test instructions. */ - - /* Here we define machine-dependent flags and fields in cc_status - (see `conditions.h'). No extra ones are needed for the VAX. */ - - /* Store in cc_status the expressions - that the condition codes will describe - after execution of an instruction whose pattern is EXP. - Do not alter them if the instruction would not alter the cc's. */ - - #define NOTICE_UPDATE_CC(EXP, INSN) \ - CC_STATUS_INIT; - - - /* Control the assembler format that we output. */ - - /* Output the name of the file we are compiling. */ - #define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \ - do { fprintf (STREAM, "\t.file\t"); \ - output_quoted_string (STREAM, NAME); \ - fprintf (STREAM, "\n"); \ - } while (0) - - /* Output at beginning of assembler file. */ - #define ASM_FILE_START(FILE) fputs ("", (FILE)); - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #define ASM_APP_ON "" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #define ASM_APP_OFF "" - - /* Output before read-only data. */ - - #define TEXT_SECTION_ASM_OP "\t.inst" - - /* Output before writable data. */ - - #define DATA_SECTION_ASM_OP "\t.var" - - /* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - - #define REGISTER_NAMES \ - {".r0", ".r1", ".r2", ".r3", ".r4", ".r5", ".r6", ".r7", ".r8", \ - ".r9", ".r10", ".r11", ".r12", ".r13", ".r14", ".sp"} - - /* This is BSD, so it wants DBX format. */ - - /* #define DBX_DEBUGGING_INFO */ - - /* Do not break .stabs pseudos into continuations. */ - - #define DBX_CONTIN_LENGTH 0 - - /* This is the char to use for continuation (in case we need to turn - continuation back on). */ - - #define DBX_CONTIN_CHAR '?' - - /* Don't use the `xsfoo;' construct in DBX output; this system - doesn't support it. */ - - #define DBX_NO_XREFS - - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - - /* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs ("\t.extdef\t", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) - - /* The prefix to add to user-visible assembler symbols. */ - - #define USER_LABEL_PREFIX "" - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) - - /* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, ".%s%d", PREFIX, NUM) - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tsubi.64\t4,.sp\n\tst.32\t%s,[.sp]\n", reg_names[REGNO]) - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tld.32\t%s,[.sp]\n\taddi.64\t4,.sp\n", reg_names[REGNO]) - - /* This is how to output an element of a case-vector that is absolute. - (The VAX does not use such vectors, - but we must define this macro anyway.) */ - - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.data .L%d{32}\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. */ - - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.data .L%d-.L%d{32}\n", VALUE, REL) - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - do { if (LOG!=0) fprintf (FILE, "\t.align\t%d\n", (LOG)); } while (0) - - /* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\t.space %d\n", (SIZE)) - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (ROUNDED))) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".bss ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d,%d\n", (SIZE),(ROUNDED))) - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - - /* Print an instruction operand X on file FILE. - CODE is the code from the %-spec that requested printing this operand; - if `%z3' was used to print operand 3, then CODE is 'z'. */ - - #define PRINT_OPERAND(FILE, X, CODE) \ - { \ - if (CODE == 'r' && GET_CODE (X) == MEM && GET_CODE (XEXP (X, 0)) == REG) \ - fprintf (FILE, "%s", reg_names[REGNO (XEXP (X, 0))]); \ - else if (GET_CODE (X) == REG) \ - fprintf (FILE, "%s", reg_names[REGNO (X)]); \ - else if (GET_CODE (X) == MEM) \ - output_address (XEXP (X, 0)); \ - else \ - { \ - /*debug_rtx(X);*/ \ - putc ('=', FILE); \ - output_addr_const (FILE, X); } \ - } - - /* Print a memory operand whose address is X, on file FILE. - This uses a function in output-vax.c. */ - - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - print_operand_address (FILE, ADDR) - - /* These are stubs, and have yet to bee written. */ - - #define TRAMPOLINE_SIZE 26 - #define TRAMPOLINE_TEMPLATE(FILE) - #define INITIALIZE_TRAMPOLINE(TRAMP,FNADDR,CXT) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/elxsi/elxsi.md gcc-3.3/gcc/config/elxsi/elxsi.md *** gcc-3.2.3/gcc/config/elxsi/elxsi.md 2000-05-01 17:21:40.000000000 +0000 --- gcc-3.3/gcc/config/elxsi/elxsi.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1420 **** - ;;- Machine description for GNU compiler, Elxsi Version - ;; Copyright (C) 1987, 1988, 1992, 1994, 2000 Free Software Foundation, Inc. - ;; Contributed by Mike Stump in 1988, and is the first - ;; 64 bit port of GNU CC. - ;; Based upon the VAX port. - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - - ;;- Instruction patterns. When multiple patterns apply, - ;;- the first one in the file is chosen. - ;;- - ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - ;;- - ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code - ;;- updates for most instructions. - - - (define_insn "" - [(set (reg:SI 15) - (plus:SI (reg:SI 15) - (match_operand:SI 0 "general_operand" "g")))] - "" - "add.64\\t.sp,%0") - - (define_insn "" - [(set (reg:SI 15) - (plus:SI (match_operand:SI 0 "general_operand" "g") - (reg:SI 15)))] - "" - "add.64\\t.sp,%0") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (reg:SI 15) - (match_operand:SI 1 "general_operand" "g")))] - "" - "ld.32\\t%0,.sp\;add.64\\t%0,%1") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (match_operand:SI 1 "general_operand" "g") - (reg:SI 15)))] - "" - "ld.32\\t%0,.sp\;add.64\\t%0,%1") - - (define_insn "" - [(set (reg:SI 15) - (minus:SI (reg:SI 15) - (match_operand:SI 0 "general_operand" "g")))] - "" - "sub.64\\t.sp,%0") - - (define_insn "" - [(set (reg:SI 15) - (match_operand:SI 0 "general_operand" "rm"))] - "" - "ld.32\\t.sp,%0") - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=m,r") - (reg:SI 15))] - "" - "@ - st.32\\t.sp,%0 - ld.32\\t%0,.sp") - - ; tstdi is first test insn so that it is the one to match - ; a constant argument. - - (define_insn "tstdi" - [(set (cc0) - (match_operand:DI 0 "register_operand" "r"))] - "" - "* - extern rtx cmp_op0, cmp_op1; - cmp_op0=operands[0]; cmp_op1=0; - return \";\\ttstdi\\t%0\"; - ") - - (define_insn "tstdf" - [(set (cc0) - (match_operand:DF 0 "register_operand" "r"))] - "" - "* - extern rtx cmp_op0, cmp_op1; - cmp_op0=operands[0]; cmp_op1=0; - return \";\\ttstdf\\t%0\"; - ") - - (define_insn "tstsf" - [(set (cc0) - (match_operand:SF 0 "register_operand" "r"))] - "" - "* - extern rtx cmp_op0, cmp_op1; - cmp_op0=operands[0]; cmp_op1=0; - return \";\\ttstsf\\t%0\"; - ") - - (define_insn "cmpdi" - [(set (cc0) - (compare (match_operand:DI 0 "register_operand" "r") - (match_operand:DI 1 "general_operand" "rm")))] - "" - "* - extern rtx cmp_op0, cmp_op1; - cmp_op0=operands[0]; cmp_op1=operands[1]; - return \";\\tcmpdi\\t%0,%1\"; - ") - - (define_insn "cmpdf" - [(set (cc0) - (compare (match_operand:DF 0 "register_operand" "r") - (match_operand:DF 1 "general_operand" "rm")))] - "" - "* - extern rtx cmp_op0, cmp_op1; - cmp_op0=operands[0]; cmp_op1=operands[1]; - return \";\\tcmpdf\\t%0,%1\"; - ") - - (define_insn "cmpsf" - [(set (cc0) - (compare (match_operand:SF 0 "register_operand" "r") - (match_operand:SF 1 "general_operand" "rm")))] - "" - "* - extern rtx cmp_op0, cmp_op1; - cmp_op0=operands[0]; cmp_op1=operands[1]; - return \";\\tcmpsf\\t%0,%1\"; - ") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (eq (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmp.64\\t%0,%1,%2:eq") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (ne (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmp.64\\t%0,%1,%2:ne") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (le (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmp.64\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (leu (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmpu.64\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (lt (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmp.64\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (ltu (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmpu.64\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (ge (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmp.64\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (geu (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmpu.64\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (gt (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmp.64\\t%0,%1,%2:gt") - - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r") - (gtu (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "general_operand" "g")))] - "" - "cmpu.64\\t%0,%1,%2:gt") - - (define_insn "seq" - [(set (match_operand:DI 0 "register_operand" "=r") - (eq (cc0) (const_int 0)))] - "" - "* return cmp_set(\"\", \"eq\", operands[0]); ") - - (define_insn "sne" - [(set (match_operand:DI 0 "register_operand" "=r") - (ne (cc0) (const_int 0)))] - "" - "* return cmp_set(\"\", \"ne\", operands[0]); ") - - (define_insn "sle" - [(set (match_operand:DI 0 "register_operand" "=r") - (le (cc0) (const_int 0)))] - "" - "* return cmp_set(\"\", \"le\", operands[0]); ") - - (define_insn "sleu" - [(set (match_operand:DI 0 "register_operand" "=r") - (leu (cc0) (const_int 0)))] - "" - "* return cmp_set(\"u\", \"le\", operands[0]); ") - - (define_insn "slt" - [(set (match_operand:DI 0 "register_operand" "=r") - (lt (cc0) (const_int 0)))] - "" - "* return cmp_set(\"\", \"lt\", operands[0]); ") - - (define_insn "sltu" - [(set (match_operand:DI 0 "register_operand" "=r") - (ltu (cc0) (const_int 0)))] - "" - "* return cmp_set(\"u\", \"lt\", operands[0]); ") - - (define_insn "sge" - [(set (match_operand:DI 0 "register_operand" "=r") - (ge (cc0) (const_int 0)))] - "" - "* return cmp_set(\"\", \"ge\", operands[0]); ") - - (define_insn "sgeu" - [(set (match_operand:DI 0 "register_operand" "=r") - (geu (cc0) (const_int 0)))] - "" - "* return cmp_set(\"u\", \"ge\", operands[0]); ") - - (define_insn "sgt" - [(set (match_operand:DI 0 "register_operand" "=r") - (gt (cc0) (const_int 0)))] - "" - "* return cmp_set(\"\", \"gt\", operands[0]); ") - - (define_insn "sgtu" - [(set (match_operand:DI 0 "register_operand" "=r") - (gtu (cc0) (const_int 0)))] - "" - "* return cmp_set(\"u\", \"gt\", operands[0]); ") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (eq (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmp.32\\t%0,%1,%2:eq") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ne (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmp.32\\t%0,%1,%2:ne") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (le (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmp.32\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (leu (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmpu.32\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (lt (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmp.32\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ltu (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmpu.32\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ge (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmp.32\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (geu (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmpu.32\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (gt (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmp.32\\t%0,%1,%2:gt") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (gtu (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "m")))] - "" - "cmpu.32\\t%0,%1,%2:gt") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (eq (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmp.16\\t%0,%1,%2:eq") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (ne (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmp.16\\t%0,%1,%2:ne") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (le (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmp.16\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (leu (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmpu.16\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (lt (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmp.16\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (ltu (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmpu.16\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (ge (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmp.16\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (geu (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmpu.16\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (gt (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmp.16\\t%0,%1,%2:gt") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (gtu (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "general_operand" "m")))] - "" - "cmpu.16\\t%0,%1,%2:gt") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (eq (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmp.8\\t%0,%1,%2:eq") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (ne (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmp.8\\t%0,%1,%2:ne") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (le (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmp.8\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (leu (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmpu.8\\t%0,%1,%2:le") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (lt (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmp.8\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (ltu (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmpu.8\\t%0,%1,%2:lt") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (ge (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmp.8\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (geu (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmpu.8\\t%0,%1,%2:ge") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (gt (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmp.8\\t%0,%1,%2:gt") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (gtu (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "general_operand" "m")))] - "" - "cmpu.8\\t%0,%1,%2:gt") - - - - (define_insn "movdf" [(set (match_operand:DF 0 "general_operand" "=r,m") - (match_operand:DF 1 "general_operand" "rm,r"))] - "" - "* - { - if (which_alternative == 0) - return \"ld.64\\t%0,%1\"; - return \"st.64\\t%1,%0\"; - }") - - (define_insn "movsf" - [(set (match_operand:SF 0 "general_operand" "=r,m") - (match_operand:SF 1 "general_operand" "rm,r"))] - "" - "* - { - if (which_alternative == 0) - return \"ld.32\\t%0,%1\"; - return \"st.32\\t%1,%0\"; - }") - - (define_insn "movdi" - [(set (match_operand:DI 0 "general_operand" "=r,m,rm") - (match_operand:DI 1 "general_operand" "g,r,I"))] - "" - "* - if (which_alternative == 0) - return \"ld.64\\t%0,%1\"; - else if (which_alternative == 1) - return \"st.64\\t%1,%0\"; - else - if (GET_CODE(operands[1])==CONST_INT) { - if (INTVAL(operands[1]) >= 0) - return \"sti.64\\t%c1,%0\"; - else - return \"stin.64\\t%n1,%0\"; - } - else - abort(); - ") - - (define_insn "movsi" - [(set (match_operand:SI 0 "general_operand" "=r,m,r") - (match_operand:SI 1 "general_operand" "rm,rI,i"))] - "" - "* - if (which_alternative == 0) - return \"ld.32\\t%0,%1\"; - else if (which_alternative == 1) { - if (GET_CODE(operands[1])==CONST_INT) { - if (INTVAL(operands[1]) >= 0) - return \"sti.32\\t%c1,%0\"; - else - return \"stin.32\\t%n1,%0\"; - } - return \"st.32\\t%1,%0\"; - } else - return \"ld.64\\t%0,%1 ; I only want 32\"; - ") - - (define_insn "movhi" - [(set (match_operand:HI 0 "general_operand" "=r,m,r") - (match_operand:HI 1 "general_operand" "m,rI,ri"))] - "" - "* - { - if (which_alternative == 0) - return \"ld.16\\t%0,%1\"; - if (which_alternative == 2) - return \"ld.64\\t%0,%1\\t; I only want 16\"; - if (GET_CODE(operands[1])==CONST_INT) { - if (INTVAL(operands[1]) >= 0) - return \"sti.16\\t%c1,%0\"; - else - return \"stin.16\\t%n1,%0\"; - } - return \"st.16\\t%1,%0\"; - }") - - (define_insn "movqi" - [(set (match_operand:QI 0 "general_operand" "=r,m,r") - (match_operand:QI 1 "general_operand" "m,rI,ri"))] - "" - "* - { - if (which_alternative == 0) - return \"ld.8\\t%0,%1\"; - if (which_alternative == 2) - return \"ld.64\\t%0,%1\\t; I only want 8\"; - if (GET_CODE(operands[1])==CONST_INT) { - if (INTVAL(operands[1]) >= 0) - return \"sti.8\\t%c1,%0\"; - else - return \"stin.8\\t%n1,%0\"; - } - return \"st.8\\t%1,%0\"; - }") - - ;; Extension and truncation insns. - ;; Those for integer source operand - ;; are ordered widest source type first. - - (define_insn "truncdfsf2" - [(set (match_operand:SF 0 "register_operand" "=r") - (truncate:SF (match_operand:DF 1 "general_operand" "rm")))] - "" - "cvt.ds\\t%0,%1") - - (define_insn "truncdiqi2" - [(set (match_operand:QI 0 "general_operand" "=r,m,r") - (truncate:QI (match_operand:DI 1 "general_operand" "m,r,0")))] - "" - "* - { - if (which_alternative == 0) - return \"ld.8\\t%0,%1\"; - else if (which_alternative == 1) - return \"st.8\\t%1,%0\"; - return \"\"; - }") - - (define_insn "truncdihi2" - [(set (match_operand:HI 0 "general_operand" "=r,m,r") - (truncate:HI (match_operand:DI 1 "general_operand" "m,r,0")))] - "" - "* - { - if (which_alternative == 0) - return \"ld.16\\t%0,%1\"; - if (which_alternative == 1) - return \"st.16\\t%1,%0\"; - return \"\"; - }") - - (define_insn "truncdisi2" - [(set (match_operand:SI 0 "general_operand" "=r,m") - (truncate:SI (match_operand:DI 1 "general_operand" "rm,r")))] - "" - "* - { - if (which_alternative == 0) - return \"ld.32\\t%0,%1\"; - return \"st.32\\t%1,%0\"; - }") - - (define_insn "truncsiqi2" - [(set (match_operand:QI 0 "general_operand" "=r,m,r") - (truncate:QI (match_operand:SI 1 "general_operand" "m,r,0")))] - "" - "* - { - if (which_alternative == 0) - return \"ld.8\\t%0,%1\"; - if (which_alternative == 1) - return \"st.8\\t%1,%0\"; - return \"\"; - }") - - (define_insn "truncsihi2" - [(set (match_operand:HI 0 "general_operand" "=r,m,r") - (truncate:HI (match_operand:SI 1 "general_operand" "m,r,0")))] - "" - "* - { - if (which_alternative == 0) - return \"ld.16\\t%0,%1\"; - if (which_alternative == 1) - return \"st.16\\t%1,%0\"; - return \"\"; - }") - - (define_insn "trunchiqi2" - [(set (match_operand:QI 0 "general_operand" "=r,m,r") - (truncate:QI (match_operand:HI 1 "general_operand" "m,r,0")))] - "" - "* - { - if (which_alternative == 0) - return \"ld.8\\t%0,%1\"; - if (which_alternative == 1) - return \"st.8\\t%1,%0\"; - return \"\"; - }") - - (define_insn "extendsfdf2" - [(set (match_operand:DF 0 "register_operand" "=r") - (sign_extend:DF (match_operand:SF 1 "general_operand" "rm")))] - "" - "cvt.sd\\t%0,%1") - - (define_insn "extendsidi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI (match_operand:SI 1 "general_operand" "rm")))] - "" - "ld.32\\t%0,%1") - - (define_insn "extendhisi2" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (sign_extend:SI (match_operand:HI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ld.16\\t%0,%1\"; - return \"extract\\t%0,%1:bit 48,16\"; - ") - - (define_insn "extendhidi2" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI (match_operand:HI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ld.16\\t%0,%1\"; - return \"extract\\t%0,%1:bit 48,16\"; - ") - - (define_insn "extendqihi2" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (sign_extend:HI (match_operand:QI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ld.8\\t%0,%1\"; - return \"extract\\t%0,%1:bit 56,8\"; - ") - - (define_insn "extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (sign_extend:SI (match_operand:QI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ld.8\\t%0,%1\"; - return \"extract\\t%0,%1:bit 56,8\"; - ") - - (define_insn "extendqidi2" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI (match_operand:QI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ld.8\\t%0,%1\"; - return \"extract\\t%0,%1:bit 56,8\"; - ") - - (define_insn "zero_extendsidi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI (match_operand:SI 1 "general_operand" "rm")))] - "" - "ldz.32\\t%0,%1") - - - (define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (zero_extend:SI (match_operand:HI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ldz.16\\t%0,%1\"; - return \"extractz\\t%0,%1:bit 48,16\"; - ") - - (define_insn "zero_extendhidi2" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (zero_extend:DI (match_operand:HI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ldz.16\\t%0,%1\"; - return \"extractz\\t%0,%1:bit 48,16\"; - ") - - (define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (zero_extend:HI (match_operand:QI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ldz.8\\t%0,%1\"; - return \"extractz\\t%0,%1:bit 56,8\"; - ") - - (define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (zero_extend:SI (match_operand:QI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ldz.8\\t%0,%1\"; - return \"extractz\\t%0,%1:bit 56,8\"; - ") - - (define_insn "zero_extendqidi2" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (zero_extend:DI (match_operand:QI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative==0) - return \"ldz.8\\t%0,%1\"; - return \"extractz\\t%0,%1:bit 56,8\"; - ") - - - (define_insn "ashrdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashiftrt:DI (match_operand:DI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "rn")))] - "" - "sra\\t%0,%1,%2") - - (define_insn "lshrdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (lshiftrt:DI (match_operand:DI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "rn")))] - "" - "srl\\t%0,%1,%2") - - (define_insn "ashldi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (match_operand:DI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "rn")))] - "" - "sla\\t%0,%1,%2") - - (define_insn "anddi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (and:DI (match_operand:DI 1 "general_operand" "%0,r") - (match_operand:DI 2 "general_operand" "g,g")))] - "1 /*which_alternative == 0 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"and\\t%0,%2\"; - return \"and\\t%0,%1,%2\"; - ") - - (define_insn "iordi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (ior:DI (match_operand:DI 1 "general_operand" "%0,r") - (match_operand:DI 2 "general_operand" "g,g")))] - "1 /*which_alternative == 0 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"or\\t%0,%2\"; - return \"or\\t%0,%1,%2\"; - ") - - (define_insn "xordi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (xor:DI (match_operand:DI 1 "general_operand" "%0,r") - (match_operand:DI 2 "general_operand" "g,g")))] - "1 /*which_alternative == 0 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"xor\\t%0,%2\"; - return \"xor\\t%0,%1,%2\"; - ") - - (define_insn "one_cmpldi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (not:DI (match_operand:DI 1 "general_operand" "rm")))] - "" - "not\\t%0,%1") - - ;; gcc 2.1 does not widen ~si into ~di. - (define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (not:SI (match_operand:SI 1 "register_operand" "r")))] - "" - "not\\t%0,%1") - - (define_insn "negdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (neg:DI (match_operand:DI 1 "general_operand" "rm")))] - "" - "neg.64\\t%0,%1") - - (define_insn "negsi2" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (neg:SI (match_operand:SI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative == 0) - return \"neg.32\\t%0,%1\"; - return \"neg.64\\t%0,%1 ; I only want 32\"; - ") - - (define_insn "neghi2" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (neg:HI (match_operand:HI 1 "general_operand" "m,r")))] - "" - "* - if (which_alternative == 0) - return \"neg.16\\t%0,%1\"; - return \"neg.64\\t%0,%1 ; I only want 16\"; - ") - - (define_insn "adddf3" - [(set (match_operand:DF 0 "register_operand" "=r") - (plus:DF (match_operand:DF 1 "general_operand" "%0") - (match_operand:DF 2 "general_operand" "rm")))] - "" - "fadd.64\\t%0,%2") - - (define_insn "addsf3" - [(set (match_operand:SF 0 "register_operand" "=r") - (plus:SF (match_operand:SF 1 "general_operand" "%0") - (match_operand:SF 2 "general_operand" "rm")))] - "" - "fadd.32\\t%0,%2") - - ;; There is also an addi.64 4,.r0'' optimization - (define_insn "adddi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (plus:DI (match_operand:DI 1 "general_operand" "%0,r") - (match_operand:DI 2 "general_operand" "g,g")))] - "1 /*which_alternative == 0 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"add.64\\t%0,%2\"; - return \"add.64\\t%0,%1,%2\"; - ") - - (define_insn "addsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (plus:SI (match_operand:SI 1 "general_operand" "%0,r,0") - (match_operand:SI 2 "general_operand" "m,m,g")))] - "1 /*which_alternative != 1 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"add.32\\t%0,%2\"; - if (which_alternative == 1) - return \"add.32\\t%0,%1,%2\"; - return \"add.64\\t%0,%2 ; I only want 32\"; - ") - - (define_insn "addhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r,r") - (plus:HI (match_operand:HI 1 "general_operand" "%0,r,0") - (match_operand:HI 2 "general_operand" "m,m,g")))] - "1 /*which_alternative != 1 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"add.16\\t%0,%2\"; - if (which_alternative == 1) - return \"add.16\\t%0,%1,%2\"; - return \"add.64\\t%0,%2 ; I only want 16\"; - ") - - (define_insn "subdf3" - [(set (match_operand:DF 0 "register_operand" "=r") - (minus:DF (match_operand:DF 1 "general_operand" "0") - (match_operand:DF 2 "general_operand" "rm")))] - "" - "fsub.64\\t%0,%2") - - (define_insn "subsf3" - [(set (match_operand:SF 0 "register_operand" "=r") - (minus:SF (match_operand:SF 1 "general_operand" "0") - (match_operand:SF 2 "general_operand" "rm")))] - "" - "fsub.32\\t%0,%2") - - (define_insn "subdi3" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (minus:DI (match_operand:DI 1 "general_operand" "0,g,r") - (match_operand:DI 2 "general_operand" "g,r,g")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - if (which_alternative == 0) - return \"sub.64\\t%0,%2\"; - else if (which_alternative == 1) - return \"subr.64\\t%0,%2,%1\"; - else - return \"sub.64\\t%0,%1,%2\"; - ") - - (define_insn "subsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (minus:SI (match_operand:SI 1 "general_operand" "0,m,r,0") - (match_operand:SI 2 "general_operand" "m,r,m,g")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - if (which_alternative == 0) - return \"sub.32\\t%0,%2\"; - else if (which_alternative == 1) - return \"subr.32\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"sub.32\\t%0,%1,%2\"; - else - return \"sub.64\\t%0,%2 ; I only want 32\"; - ") - - (define_insn "subhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") - (minus:HI (match_operand:HI 1 "general_operand" "0,m,r,0") - (match_operand:HI 2 "general_operand" "m,r,m,g")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - if (which_alternative == 0) - return \"sub.16\\t%0,%2\"; - else if (which_alternative == 1) - return \"subr.16\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"sub.16\\t%0,%1,%2\"; - else - return \"sub.64\\t%0,%2 ; I only want 16\"; - ") - - (define_insn "muldf3" - [(set (match_operand:DF 0 "register_operand" "=r") - (mult:DF (match_operand:DF 1 "general_operand" "%0") - (match_operand:DF 2 "general_operand" "rm")))] - "" - "fmul.64\\t%0,%2") - - (define_insn "mulsf3" - [(set (match_operand:SF 0 "register_operand" "=r") - (mult:SF (match_operand:SF 1 "general_operand" "%0") - (match_operand:SF 2 "general_operand" "rm")))] - "" - "fmul.32\\t%0,%2") - - (define_insn "muldi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (mult:DI (match_operand:DI 1 "general_operand" "%0,r") - (match_operand:DI 2 "general_operand" "g,g")))] - "1 /*which_alternative == 0 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"mul.64\\t%0,%2\"; - return \"mul.64\\t%0,%1,%2\"; - ") - - (define_insn "mulsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (mult:SI (match_operand:SI 1 "general_operand" "%0,r,0") - (match_operand:SI 2 "general_operand" "m,m,g")))] - "1 /*which_alternative == 0 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"mul.32\\t%0,%2\"; - else if (which_alternative == 1) - return \"mul.32\\t%0,%1,%2\"; - else - return \"mul.64\\t%0,%2 ; I only want 32\"; - ") - - (define_insn "mulhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r,r") - (mult:HI (match_operand:HI 1 "general_operand" "%0,r,0") - (match_operand:HI 2 "general_operand" "m,m,g")))] - "1 /*which_alternative == 0 || check356(operands[2])*/" - "* - if (which_alternative == 0) - return \"mul.16\\t%0,%2\"; - else if (which_alternative == 1) - return \"mul.16\\t%0,%1,%2\"; - else - return \"mul.64\\t%0,%2 ; I only want 16\"; - ") - - (define_insn "divdf3" - [(set (match_operand:DF 0 "register_operand" "=r") - (div:DF (match_operand:DF 1 "general_operand" "0") - (match_operand:DF 2 "general_operand" "rm")))] - "" - "fdiv.64\\t%0,%2") - - (define_insn "divsf3" - [(set (match_operand:SF 0 "register_operand" "=r") - (div:SF (match_operand:SF 1 "general_operand" "0") - (match_operand:SF 2 "general_operand" "rm")))] - "" - "fdiv.32\\t%0,%2") - - (define_insn "divdi3" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (div:DI (match_operand:DI 1 "general_operand" "0,g,r") - (match_operand:DI 2 "general_operand" "g,r,g")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - if (which_alternative == 0) - return \"div.64\\t%0,%2\"; - else if (which_alternative == 1) - return \"divr.64\\t%0,%2,%1\"; - else - return \"div.64\\t%0,%1,%2\"; - ") - - (define_insn "divsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (div:SI (match_operand:SI 1 "general_operand" "0,m,r,0") - (match_operand:SI 2 "general_operand" "m,r,m,g")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - /* We don't ignore high bits. */ - if (0) { - if (which_alternative == 0) - return \"div.32\\t%0,%2\"; - else if (which_alternative == 1) - return \"divr.32\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"div.32\\t%0,%1,%2\"; - else - return \"ld.32\\t%0,%0\;div.64\\t%0,%2 ; I only want 32\"; - } else { - if (which_alternative == 0) - return \"ld.32\\t%0,%0\;div.32\\t%0,%2\"; - else if (which_alternative == 1) - return \"ld.32\\t%2,%2\;divr.32\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"ld.32\\t%1,%1\;div.32\\t%0,%1,%2\"; - else - return \"ld.32\\t%0,%0\;div.64\\t%0,%2 ; I only want 32\"; - } - ") - - (define_insn "divhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r") - (div:HI (match_operand:HI 1 "general_operand" "0,m,r,0,0") - (match_operand:HI 2 "general_operand" "m,r,m,r,i")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - if (which_alternative == 0) - return \"extract\\t%0,%0:bit 48,16\;div.16\\t%0,%2\"; - else if (which_alternative == 1) - return \"extract\\t%2,%2:bit 48,16\;divr.16\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"extract\\t%1,%1:bit 48,16\;div.16\\t%0,%1,%2\"; - else if (which_alternative == 3) - return \"extract\\t%0,%0:bit 48,16\;extract\\t%2,%2:bit 48,16\;div.64\\t%0,%2 ; I only want 16\"; - else - return \"extract\\t%0,%0:bit 48,16\;div.64\\t%0,%2 ; I only want 16\"; - ") - - (define_insn "modhi3" - [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r") - (mod:HI (match_operand:HI 1 "general_operand" "0,m,r,0,0") - (match_operand:HI 2 "general_operand" "m,r,m,r,i")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - if (which_alternative == 0) - return \"extract\\t%0,%0:bit 48,16\;rem.16\\t%0,%2\"; - else if (which_alternative == 1) - return \"extract\\t%2,%2:bit 48,16\;remr.16\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"extract\\t%1,%1:bit 48,16\;rem.16\\t%0,%1,%2\"; - else if (which_alternative == 3) - return \"extract\\t%0,%0:bit 48,16\;extract\\t%2,%2:bit 48,16\;rem.64\\t%0,%2 ; I only want 16\"; - else - return \"extract\\t%0,%0:bit 48,16\;rem.64\\t%0,%2 ; I only want 16\"; - ") - - (define_insn "moddi3" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (mod:DI (match_operand:DI 1 "general_operand" "0,g,r") - (match_operand:DI 2 "general_operand" "g,r,g")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - if (which_alternative == 0) - return \"rem.64\\t%0,%2\"; - else if (which_alternative == 1) - return \"remr.64\\t%0,%2,%1\"; - else - return \"rem.64\\t%0,%1,%2\"; - ") - - (define_insn "modsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (mod:SI (match_operand:SI 1 "general_operand" "0,m,r,0") - (match_operand:SI 2 "general_operand" "m,r,m,g")))] - "1 /*which_alternative == 0 || check356(operands[which_alternative])*/" - "* - /* There is a micro code bug with the below... */ - if (0) { - if (which_alternative == 0) - return \"rem.32\\t%0,%2\"; - else if (which_alternative == 1) - return \"remr.32\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"rem.32\\t%0,%1,%2\"; - else - return \"ld.32\\t%0,%0\;rem.64\\t%0,%2 ; I only want 32\"; - } else { - if (which_alternative == 0) - return \"ld.32\\t%0,%0\;rem.32\\t%0,%2\"; - else if (which_alternative == 1) - return \"ld.32\\t%2,%2\;remr.32\\t%0,%2,%1\"; - else if (which_alternative == 2) - return \"ld.32\\t%1,%1\;rem.32\\t%0,%1,%2\"; - else - return \"ld.32\\t%0,%0\;rem.64\\t%0,%2 ; I only want 32\"; - } - ") - - - (define_insn "jump" - [(set (pc) - (label_ref (match_operand 0 "" "")))] - "" - "jmp\\t%l0") - - (define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "register_operand" "r"))] - "" - ;; Maybe %l0 is better, maybe we can relax register only. - "verify this before use ld.32\\t.r0,%0\;br.reg\\t.r0") - - (define_insn "beq" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"\", 2, operands[0]); ") - - (define_insn "bne" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"\", 8, operands[0]); ") - - (define_insn "bgt" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"\", 0, operands[0]); ") - - (define_insn "bgtu" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"u\", 0, operands[0]); ") - - (define_insn "blt" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"\", 6, operands[0]); ") - - (define_insn "bltu" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"u\", 6, operands[0]); ") - - (define_insn "bge" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"\", 4, operands[0]); ") - - (define_insn "bgeu" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"u\", 4, operands[0]); ") - - (define_insn "ble" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"\", 10, operands[0]); ") - - (define_insn "bleu" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* return cmp_jmp(\"u\", 10, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"\", 8, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"\", 2, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"\", 10, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"u\", 10, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"\", 4, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"u\", 4, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"\", 6, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"u\", 6, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"\", 0, operands[0]); ") - - (define_insn "" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* return cmp_jmp(\"u\", 0, operands[0]); ") - - ;; Note that operand 1 is total size of args, in bytes, - ;; and what the call insn wants is the number of words. - (define_insn "call" - [(call (match_operand:QI 0 "general_operand" "m") - (match_operand:QI 1 "general_operand" "g"))] - "" - "* - if (GET_CODE (operands[0]) == MEM && GET_CODE (XEXP (operands[0], 0)) == REG) - if (REGNO (XEXP (operands[0], 0)) != 0) - return \"add.64\\t.sp,=-4\;ld.64\\t.r0,=.+11\;st.32\\t.r0,[.sp]\;br.reg\\t%r0\;add.64\\t.sp,=4\;add.64\\t.sp,%1\"; - else - return \"add.64\\t.sp,=-4\;ld.64\\t.r1,=.+11\;st.32\\t.r1,[.sp]\;br.reg\\t%r0\;add.64\\t.sp,=4\;add.64\\t.sp,%1\"; - else - return \"add.64\\t.sp,=-4\;call\\t%0\;add.64\\t.sp,=4\;add.64\\t.sp,%1\"; - ") - - (define_insn "call_value" - [(set (match_operand 0 "" "") - (call (match_operand:QI 1 "general_operand" "m") - (match_operand:QI 2 "general_operand" "g")))] - "" - "* - if (GET_CODE (operands[1]) == MEM && GET_CODE (XEXP (operands[1], 0)) == REG) - if (REGNO (XEXP (operands[1], 0)) != 0) - return \"add.64\\t.sp,=-4\;ld.64\\t.r0,=.+11\;st.32\\t.r0,[.sp]\;br.reg\\t%r1\;add.64\\t.sp,=4\;add.64\\t.sp,%2\"; - else - return \"add.64\\t.sp,=-4\;ld.64\\t.r1,=.+11\;st.32\\t.r1,[.sp]\;br.reg\\t%r1\;add.64\\t.sp,=4\;add.64\\t.sp,%2\"; - else - return \"add.64\\t.sp,=-4\;call\\t%1\;add.64\\t.sp,=4\;add.64\\t.sp,%2\"; - ") - - (define_insn "tablejump" - [(set (pc) (match_operand:SI 0 "register_operand" "r")) - (use (label_ref (match_operand 1 "" "")))] - "" - "br.reg\\t%0") - - (define_insn "nop" - [(const_int 0)] - "" - "nop") --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/elxsi/elxsi-protos.h gcc-3.3/gcc/config/elxsi/elxsi-protos.h *** gcc-3.2.3/gcc/config/elxsi/elxsi-protos.h 2000-05-01 17:21:40.000000000 +0000 --- gcc-3.3/gcc/config/elxsi/elxsi-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,31 **** - /* Definitions of target machine for GNU compiler. Elxsi version. - Copyright (C) 2000 Free Software Foundation, Inc. - Contributed by Mike Stump in 1988. This is the first - 64 bit port of GNU CC. - Based upon the VAX port. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Functions used in the md file. */ - - #ifdef RTX_CODE - extern const char *cmp_set PARAMS ((const char *, const char *, rtx)); - extern const char *cmp_jmp PARAMS ((const char *, int, rtx)); - extern void print_operand_address PARAMS ((FILE *, rtx)); - #endif /* RTX_CODE */ - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-c4x.h gcc-3.3/gcc/config/float-c4x.h *** gcc-3.2.3/gcc/config/float-c4x.h 2000-10-03 01:08:45.000000000 +0000 --- gcc-3.3/gcc/config/float-c4x.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,96 **** - /* float.h for target with TMS320C3x/C4x floating point format */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-126) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 5.8774718E-39F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-39) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.4028235e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 24 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 6 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 1.1920929e-07 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-126) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 5.8774718E-39 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP -39 - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 128 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 3.4028235E+38 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 32 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 8 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 1.19209287e-07L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-126) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 5.8774717535e-39L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-39) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 128 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX .4028236688e+38L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 38 - - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-i128.h gcc-3.3/gcc/config/float-i128.h *** gcc-3.2.3/gcc/config/float-i128.h 2001-10-11 15:53:57.000000000 +0000 --- gcc-3.3/gcc/config/float-i128.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,123 **** - /* float.h for target with IEEE 32, 64 and 128 bit floating point formats */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-125) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 1024 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 308 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 113 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 33 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-16381) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 3.362103143112093506262677817321752603E-4932L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-4931) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 16384 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 1.189731495357231765085759326628007016E+4932L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 4932 - - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - */ - # undef FLT_EVAL_METHOD - # define FLT_EVAL_METHOD 0 - - /* Number of decimal digits to enable rounding to the given number of - decimal digits without loss of precision. - if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) - else : ceil (1 + #mantissa * log10 (FLT_RADIX)) - where #mantissa is the number of bits in the mantissa of the widest - supported floating-point type. - */ - # undef DECIMAL_DIG - # define DECIMAL_DIG 36 - - #endif /* C99 */ - - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-i32.h gcc-3.3/gcc/config/float-i32.h *** gcc-3.2.3/gcc/config/float-i32.h 2001-10-11 15:53:57.000000000 +0000 --- gcc-3.3/gcc/config/float-i32.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,123 **** - /* float.h for target with only IEEE 32 bit floating point format */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-125) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 24 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 6 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-125) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 128 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 24 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 6 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-125) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 128 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 38 - - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - */ - # undef FLT_EVAL_METHOD - # define FLT_EVAL_METHOD 0 - - /* Number of decimal digits to enable rounding to the given number of - decimal digits without loss of precision. - if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) - else : ceil (1 + #mantissa * log10 (FLT_RADIX)) - where #mantissa is the number of bits in the mantissa of the widest - supported floating-point type. - */ - # undef DECIMAL_DIG - # define DECIMAL_DIG 9 - - #endif /* C99 */ - - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-i386.h gcc-3.3/gcc/config/float-i386.h *** gcc-3.2.3/gcc/config/float-i386.h 2001-10-11 15:53:57.000000000 +0000 --- gcc-3.3/gcc/config/float-i386.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,124 **** - /* float.h for target with IEEE 32/64 bit and Intel 386 style 80 bit - floating point formats */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-125) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 1024 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 308 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 64 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 18 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 1.08420217248550443401e-19L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-16381) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 3.36210314311209350626e-4932L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-4931) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 16384 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 1.18973149535723176502e+4932L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 4932 - - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - */ - # undef FLT_EVAL_METHOD - # define FLT_EVAL_METHOD 2 - - /* Number of decimal digits to enable rounding to the given number of - decimal digits without loss of precision. - if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) - else : ceil (1 + #mantissa * log10 (FLT_RADIX)) - where #mantissa is the number of bits in the mantissa of the widest - supported floating-point type. - */ - # undef DECIMAL_DIG - # define DECIMAL_DIG 21 - - #endif /* C99 */ - - #endif /* _FLOAT_H___ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-i64.h gcc-3.3/gcc/config/float-i64.h *** gcc-3.2.3/gcc/config/float-i64.h 2001-10-11 15:53:57.000000000 +0000 --- gcc-3.3/gcc/config/float-i64.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,123 **** - /* float.h for target with IEEE 32 bit and 64 bit floating point formats */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-125) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 1024 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 308 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 53 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 15 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 2.2204460492503131e-16L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-1021) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 2.2250738585072014e-308L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 1024 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 1.7976931348623157e+308L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 308 - - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - */ - # undef FLT_EVAL_METHOD - # define FLT_EVAL_METHOD 0 - - /* Number of decimal digits to enable rounding to the given number of - decimal digits without loss of precision. - if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) - else : ceil (1 + #mantissa * log10 (FLT_RADIX)) - where #mantissa is the number of bits in the mantissa of the widest - supported floating-point type. - */ - # undef DECIMAL_DIG - # define DECIMAL_DIG 17 - - #endif /* C99 */ - - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-m68k.h gcc-3.3/gcc/config/float-m68k.h *** gcc-3.2.3/gcc/config/float-m68k.h 2001-10-11 15:53:57.000000000 +0000 --- gcc-3.3/gcc/config/float-m68k.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,127 **** - /* float.h for target with IEEE 32 bit and 64 bit and Motorola style 96 bit - floating point formats */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-125) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 1024 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 308 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 64 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 18 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 1.08420217248550443401e-19L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-16382) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 1.68105157155604675313e-4932L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-4931) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 16384 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 1.18973149535723176502e+4932L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 4932 - - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - */ - - /* ??? FLT_EVAL_METHOD depends on TARGET_68040_ONLY. We do not currently - have a preprocessor token that we can use to tell that this is on. */ - # undef FLT_EVAL_METHOD - # define FLT_EVAL_METHOD -1 - - /* Number of decimal digits to enable rounding to the given number of - decimal digits without loss of precision. - if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) - else : ceil (1 + #mantissa * log10 (FLT_RADIX)) - where #mantissa is the number of bits in the mantissa of the widest - supported floating-point type. - */ - # undef DECIMAL_DIG - # define DECIMAL_DIG 21 - - #endif /* C99 */ - - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-sh.h gcc-3.3/gcc/config/float-sh.h *** gcc-3.2.3/gcc/config/float-sh.h 2001-10-11 15:53:57.000000000 +0000 --- gcc-3.3/gcc/config/float-sh.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,160 **** - /* float.h for target sh3e with optional IEEE 32 bit double format */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-125) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - #if defined (__SH3E__) || defined (__SH4_SINGLE_ONLY__) - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 24 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 6 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-125) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 128 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 38 - - #else - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 1024 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 308 - - #endif - - /* Because -m3e and -m4-single-only have 32-bit doubles, we append L - to the doubles below, so that they're not truncated. */ - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 53 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 15 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 2.2204460492503131e-16L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-1021) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 2.2250738585072014e-308L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 1024 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 1.7976931348623157e+308L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 308 - - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - */ - # undef FLT_EVAL_METHOD - # define FLT_EVAL_METHOD 0 - - /* Number of decimal digits to enable rounding to the given number of - decimal digits without loss of precision. - if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) - else : ceil (1 + #mantissa * log10 (FLT_RADIX)) - where #mantissa is the number of bits in the mantissa of the widest - supported floating-point type. - */ - # undef DECIMAL_DIG - # define DECIMAL_DIG 17 - - #endif /* C99 */ - - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-sparc.h gcc-3.3/gcc/config/float-sparc.h *** gcc-3.2.3/gcc/config/float-sparc.h 2002-05-02 21:28:50.000000000 +0000 --- gcc-3.3/gcc/config/float-sparc.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,153 **** - /* float.h for target with IEEE 32, 64 and 128 bit SPARC floating point formats - (on sparc-linux long double is 64 bit, while on sparc64-linux 128 bit) */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-125) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 128 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 1024 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 308 - - #if defined(__sparcv9) || defined(__arch64__) || defined(__LONG_DOUBLE_128__) - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 113 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 33 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-16381) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 3.362103143112093506262677817321752603E-4932L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-4931) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 16384 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 1.189731495357231765085759326628007016E+4932L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 4932 - - #else /* sparc32 */ - - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG DBL_MANT_DIG - #undef LDBL_DIG - #define LDBL_DIG DBL_DIG - #undef LDBL_EPSILON - #define LDBL_EPSILON DBL_EPSILON - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP DBL_MIN_EXP - #undef LDBL_MIN - #define LDBL_MIN DBL_MIN - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP DBL_MIN_10_EXP - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP DBL_MAX_EXP - #undef LDBL_MAX - #define LDBL_MAX DBL_MAX - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP DBL_MAX_10_EXP - - #endif /* sparc32 */ - - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - */ - # undef FLT_EVAL_METHOD - # define FLT_EVAL_METHOD 0 - - /* Number of decimal digits to enable rounding to the given number of - decimal digits without loss of precision. - if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) - else : ceil (1 + #mantissa * log10 (FLT_RADIX)) - where #mantissa is the number of bits in the mantissa of the widest - supported floating-point type. - */ - # undef DECIMAL_DIG - # if LDBL_MANT_DIG == 53 - # define DECIMAL_DIG 17 - # else - # define DECIMAL_DIG 36 - # endif - - #endif /* C99 */ - - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/float-vax.h gcc-3.3/gcc/config/float-vax.h *** gcc-3.2.3/gcc/config/float-vax.h 2000-06-12 23:01:25.000000000 +0000 --- gcc-3.3/gcc/config/float-vax.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,159 **** - /* float.h for target with VAX floating point formats */ - #ifndef _FLOAT_H_ - #define _FLOAT_H_ - /* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ - #undef FLT_RADIX - #define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ - #undef FLT_MANT_DIG - #define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ - #undef FLT_DIG - #define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ - #undef FLT_ROUNDS - #define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ - #undef FLT_EPSILON - #define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ - #undef FLT_MIN_EXP - #define FLT_MIN_EXP (-127) - /* Minimum normalised float */ - #undef FLT_MIN - #define FLT_MIN 2.93873588e-39F - /* Minimum int x such that 10**x is a normalised float */ - #undef FLT_MIN_10_EXP - #define FLT_MIN_10_EXP (-38) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ - #undef FLT_MAX_EXP - #define FLT_MAX_EXP 127 - /* Maximum float */ - #undef FLT_MAX - #define FLT_MAX 1.70141173e+38F - /* Maximum int x such that 10**x is a representable float */ - #undef FLT_MAX_10_EXP - #define FLT_MAX_10_EXP 38 - - #ifdef __GFLOAT - - /* The GFLOAT numbers may be problematic since gcc uses DFLOAT */ - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.2204460492503131e-016 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-1023) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 5.5626846462680035e-309 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-308) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 1023 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 8.9884656743115775e+307 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 307 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 53 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 15 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 2.2204460492503131e-016L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-1023) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 5.5626846462680035e-309L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-308) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 1023 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 8.9884656743115775e+307L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 307 - - #else /* !__GFLOAT */ - - /* Number of base-FLT_RADIX digits in the significand of a double */ - #undef DBL_MANT_DIG - #define DBL_MANT_DIG 56 - /* Number of decimal digits of precision in a double */ - #undef DBL_DIG - #define DBL_DIG 16 - /* Difference between 1.0 and the minimum double greater than 1.0 */ - #undef DBL_EPSILON - #define DBL_EPSILON 2.77555756156289135e-17 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ - #undef DBL_MIN_EXP - #define DBL_MIN_EXP (-127) - /* Minimum normalised double */ - #undef DBL_MIN - #define DBL_MIN 2.93873587705571877e-39 - /* Minimum int x such that 10**x is a normalised double */ - #undef DBL_MIN_10_EXP - #define DBL_MIN_10_EXP (-38) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ - #undef DBL_MAX_EXP - #define DBL_MAX_EXP 127 - /* Maximum double */ - #undef DBL_MAX - #define DBL_MAX 1.70141183460469227e+38 - /* Maximum int x such that 10**x is a representable double */ - #undef DBL_MAX_10_EXP - #define DBL_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ - #undef LDBL_MANT_DIG - #define LDBL_MANT_DIG 56 - /* Number of decimal digits of precision in a long double */ - #undef LDBL_DIG - #define LDBL_DIG 16 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ - #undef LDBL_EPSILON - #define LDBL_EPSILON 2.77555756156289135e-17L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ - #undef LDBL_MIN_EXP - #define LDBL_MIN_EXP (-127) - /* Minimum normalised long double */ - #undef LDBL_MIN - #define LDBL_MIN 2.93873587705571877e-39L - /* Minimum int x such that 10**x is a normalised long double */ - #undef LDBL_MIN_10_EXP - #define LDBL_MIN_10_EXP (-38) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ - #undef LDBL_MAX_EXP - #define LDBL_MAX_EXP 127 - /* Maximum long double */ - #undef LDBL_MAX - #define LDBL_MAX 1.70141183460469227e+38L - /* Maximum int x such that 10**x is a representable long double */ - #undef LDBL_MAX_10_EXP - #define LDBL_MAX_10_EXP 38 - - #endif /* __GFLOAT */ - #endif /* _FLOAT_H_ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/fp-bit.c gcc-3.3/gcc/config/fp-bit.c *** gcc-3.2.3/gcc/config/fp-bit.c 2001-12-12 06:59:23.000000000 +0000 --- gcc-3.3/gcc/config/fp-bit.c 2003-04-09 19:31:06.000000000 +0000 *************** *** 1,6 **** /* This is a software floating point library which can be used for targets without hardware floating point. ! Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it --- 1,6 ---- /* This is a software floating point library which can be used for targets without hardware floating point. ! Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it *************** Boston, MA 02111-1307, USA. */ *** 46,52 **** #include "tconfig.h" #include "fp-bit.h" ! /* The following macros can be defined to change the behaviour of this file: FLOAT: Implement a `float', aka SFmode, fp library. If this is not defined, then this file implements a `double', aka DFmode, fp library. FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e. --- 46,52 ---- #include "tconfig.h" #include "fp-bit.h" ! /* The following macros can be defined to change the behavior of this file: FLOAT: Implement a `float', aka SFmode, fp library. If this is not defined, then this file implements a `double', aka DFmode, fp library. FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e. *************** Boston, MA 02111-1307, USA. */ *** 74,112 **** are referenced from within libc, since libgcc goes before and after the system library. */ #ifdef EXTENDED_FLOAT_STUBS ! __truncxfsf2 (){ abort(); } ! __extendsfxf2 (){ abort(); } ! __addxf3 (){ abort(); } ! __divxf3 (){ abort(); } ! __eqxf2 (){ abort(); } ! __extenddfxf2 (){ abort(); } ! __gtxf2 (){ abort(); } ! __lexf2 (){ abort(); } ! __ltxf2 (){ abort(); } ! __mulxf3 (){ abort(); } ! __negxf2 (){ abort(); } ! __nexf2 (){ abort(); } ! __subxf3 (){ abort(); } ! __truncxfdf2 (){ abort(); } ! __trunctfsf2 (){ abort(); } ! __extendsftf2 (){ abort(); } ! __addtf3 (){ abort(); } ! __divtf3 (){ abort(); } ! __eqtf2 (){ abort(); } ! __extenddftf2 (){ abort(); } ! __gttf2 (){ abort(); } ! __letf2 (){ abort(); } ! __lttf2 (){ abort(); } ! __multf3 (){ abort(); } ! __negtf2 (){ abort(); } ! __netf2 (){ abort(); } ! __subtf3 (){ abort(); } ! __trunctfdf2 (){ abort(); } ! __gexf2 (){ abort(); } ! __fixxfsi (){ abort(); } ! __floatsixf (){ abort(); } #else /* !EXTENDED_FLOAT_STUBS, rest of file */ /* IEEE "special" number predicates */ --- 74,120 ---- are referenced from within libc, since libgcc goes before and after the system library. */ + #ifdef DECLARE_LIBRARY_RENAMES + DECLARE_LIBRARY_RENAMES + #endif + #ifdef EXTENDED_FLOAT_STUBS ! extern void abort (void); ! void __extendsfxf2 (void) { abort(); } ! void __extenddfxf2 (void) { abort(); } ! void __truncxfdf2 (void) { abort(); } ! void __truncxfsf2 (void) { abort(); } ! void __fixxfsi (void) { abort(); } ! void __floatsixf (void) { abort(); } ! void __addxf3 (void) { abort(); } ! void __subxf3 (void) { abort(); } ! void __mulxf3 (void) { abort(); } ! void __divxf3 (void) { abort(); } ! void __negxf2 (void) { abort(); } ! void __eqxf2 (void) { abort(); } ! void __nexf2 (void) { abort(); } ! void __gtxf2 (void) { abort(); } ! void __gexf2 (void) { abort(); } ! void __lexf2 (void) { abort(); } ! void __ltxf2 (void) { abort(); } ! void __extendsftf2 (void) { abort(); } ! void __extenddftf2 (void) { abort(); } ! void __trunctfdf2 (void) { abort(); } ! void __trunctfsf2 (void) { abort(); } ! void __fixtfsi (void) { abort(); } ! void __floatsitf (void) { abort(); } ! void __addtf3 (void) { abort(); } ! void __subtf3 (void) { abort(); } ! void __multf3 (void) { abort(); } ! void __divtf3 (void) { abort(); } ! void __negtf2 (void) { abort(); } ! void __eqtf2 (void) { abort(); } ! void __netf2 (void) { abort(); } ! void __gttf2 (void) { abort(); } ! void __getf2 (void) { abort(); } ! void __letf2 (void) { abort(); } ! void __lttf2 (void) { abort(); } #else /* !EXTENDED_FLOAT_STUBS, rest of file */ /* IEEE "special" number predicates */ *************** __floatsixf (){ abort(); } *** 122,127 **** --- 130,139 ---- const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} }; #elif defined L_thenan_df const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} }; + #elif defined L_thenan_tf + const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} }; + #elif defined TFLOAT + extern const fp_number_type __thenan_tf; #elif defined FLOAT extern const fp_number_type __thenan_sf; #else *************** INLINE *** 132,139 **** static fp_number_type * nan (void) { ! /* Discard the const qualifier... */ ! #ifdef FLOAT return (fp_number_type *) (& __thenan_sf); #else return (fp_number_type *) (& __thenan_df); --- 144,153 ---- static fp_number_type * nan (void) { ! /* Discard the const qualifier... */ ! #ifdef TFLOAT ! return (fp_number_type *) (& __thenan_tf); ! #elif defined FLOAT return (fp_number_type *) (& __thenan_sf); #else return (fp_number_type *) (& __thenan_df); *************** flip_sign ( fp_number_type * x) *** 172,178 **** extern FLO_type pack_d ( fp_number_type * ); ! #if defined(L_pack_df) || defined(L_pack_sf) FLO_type pack_d ( fp_number_type * src) { --- 186,192 ---- extern FLO_type pack_d ( fp_number_type * ); ! #if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf) FLO_type pack_d ( fp_number_type * src) { *************** pack_d ( fp_number_type * src) *** 181,187 **** int sign = src->sign; int exp = 0; ! if (isnan (src)) { exp = EXPMAX; if (src->class == CLASS_QNAN || 1) --- 195,209 ---- int sign = src->sign; int exp = 0; ! if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src))) ! { ! /* We can't represent these values accurately. By using the ! largest possible magnitude, we guarantee that the conversion ! of infinity is at least as big as any finite number. */ ! exp = EXPMAX; ! fraction = ((fractype) 1 << FRACBITS) - 1; ! } ! else if (isnan (src)) { exp = EXPMAX; if (src->class == CLASS_QNAN || 1) *************** pack_d ( fp_number_type * src) *** 207,212 **** --- 229,241 ---- { if (src->normal_exp < NORMAL_EXPMIN) { + #ifdef NO_DENORMALS + /* Go straight to a zero representation if denormals are not + supported. The denormal handling would be harmless but + isn't unnecessary. */ + exp = 0; + fraction = 0; + #else /* NO_DENORMALS */ /* This number's exponent is too low to fit into the bits available in the number, so we'll store 0 in the exponent and shift the fraction to the right to make up for it. */ *************** pack_d ( fp_number_type * src) *** 242,249 **** exp += 1; } fraction >>= NGARDS; } ! else if (src->normal_exp > EXPBIAS) { exp = EXPMAX; fraction = 0; --- 271,280 ---- exp += 1; } fraction >>= NGARDS; + #endif /* NO_DENORMALS */ } ! else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) ! && src->normal_exp > EXPBIAS) { exp = EXPMAX; fraction = 0; *************** pack_d ( fp_number_type * src) *** 251,275 **** else { exp = src->normal_exp + EXPBIAS; ! /* IF the gard bits are the all zero, but the first, then we're ! half way between two numbers, choose the one which makes the ! lsb of the answer 0. */ ! if ((fraction & GARDMASK) == GARDMSB) ! { ! if (fraction & (1 << NGARDS)) ! fraction += GARDROUND + 1; ! } ! else { ! /* Add a one to the guards to round up */ ! fraction += GARDROUND; } ! if (fraction >= IMPLICIT_2) { ! fraction >>= 1; ! exp += 1; } - fraction >>= NGARDS; } } --- 282,316 ---- else { exp = src->normal_exp + EXPBIAS; ! if (!ROUND_TOWARDS_ZERO) { ! /* IF the gard bits are the all zero, but the first, then we're ! half way between two numbers, choose the one which makes the ! lsb of the answer 0. */ ! if ((fraction & GARDMASK) == GARDMSB) ! { ! if (fraction & (1 << NGARDS)) ! fraction += GARDROUND + 1; ! } ! else ! { ! /* Add a one to the guards to round up */ ! fraction += GARDROUND; ! } ! if (fraction >= IMPLICIT_2) ! { ! fraction >>= 1; ! exp += 1; ! } } ! fraction >>= NGARDS; ! ! if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX) { ! /* Saturate on overflow. */ ! exp = EXPMAX; ! fraction = ((fractype) 1 << FRACBITS) - 1; } } } *************** pack_d ( fp_number_type * src) *** 281,304 **** dst.bits.exp = exp; dst.bits.sign = sign; #else dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1); dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS; dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS); #endif #if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT) { halffractype tmp = dst.words[0]; dst.words[0] = dst.words[1]; dst.words[1] = tmp; } #endif return dst.value; } #endif ! #if defined(L_unpack_df) || defined(L_unpack_sf) void unpack_d (FLO_union_type * src, fp_number_type * dst) { --- 322,413 ---- dst.bits.exp = exp; dst.bits.sign = sign; #else + # if defined TFLOAT && defined HALFFRACBITS + { + halffractype high, low; + + high = (fraction >> (FRACBITS - HALFFRACBITS)); + high &= (((fractype)1) << HALFFRACBITS) - 1; + high |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << HALFFRACBITS; + high |= ((fractype) (sign & 1)) << (HALFFRACBITS | EXPBITS); + + low = (halffractype)fraction & + ((((halffractype)1) << (FRACBITS - HALFFRACBITS)) - 1); + + if (exp == EXPMAX || exp == 0 || low == 0) + low = 0; + else + { + exp -= HALFFRACBITS + 1; + + while (exp > 0 + && low < ((halffractype)1 << HALFFRACBITS)) + { + low <<= 1; + exp--; + } + + if (exp <= 0) + { + halffractype roundmsb, round; + + exp = -exp + 1; + + roundmsb = (1 << (exp - 1)); + round = low & ((roundmsb << 1) - 1); + + low >>= exp; + exp = 0; + + if (round > roundmsb || (round == roundmsb && (low & 1))) + { + low++; + if (low >= ((halffractype)1 << HALFFRACBITS)) + /* We don't shift left, since it has just become the + smallest normal number, whose implicit 1 bit is + now indicated by the non-zero exponent. */ + exp++; + } + } + + low &= ((halffractype)1 << HALFFRACBITS) - 1; + low |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << HALFFRACBITS; + low |= ((fractype) (sign & 1)) << (HALFFRACBITS | EXPBITS); + } + + dst.value_raw = (((fractype) high) << HALFSHIFT) | low; + } + # else dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1); dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS; dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS); + # endif #endif #if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT) + #ifdef TFLOAT + { + qrtrfractype tmp1 = dst.words[0]; + qrtrfractype tmp2 = dst.words[1]; + dst.words[0] = dst.words[3]; + dst.words[1] = dst.words[2]; + dst.words[2] = tmp2; + dst.words[3] = tmp1; + } + #else { halffractype tmp = dst.words[0]; dst.words[0] = dst.words[1]; dst.words[1] = tmp; } #endif + #endif return dst.value; } #endif ! #if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf) void unpack_d (FLO_union_type * src, fp_number_type * dst) { *************** unpack_d (FLO_union_type * src, fp_numbe *** 312,319 **** --- 421,435 ---- #if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT) FLO_union_type swapped; + #ifdef TFLOAT + swapped.words[0] = src->words[3]; + swapped.words[1] = src->words[2]; + swapped.words[2] = src->words[1]; + swapped.words[3] = src->words[0]; + #else swapped.words[0] = src->words[1]; swapped.words[1] = src->words[0]; + #endif src = &swapped; #endif *************** unpack_d (FLO_union_type * src, fp_numbe *** 322,330 **** exp = src->bits.exp; sign = src->bits.sign; #else ! fraction = src->value_raw & ((((fractype)1) << FRACBITS) - (fractype)1); exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1); sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1; #endif dst->sign = sign; --- 438,483 ---- exp = src->bits.exp; sign = src->bits.sign; #else ! # if defined TFLOAT && defined HALFFRACBITS ! { ! halffractype high, low; ! ! high = src->value_raw >> HALFSHIFT; ! low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1); ! ! fraction = high & ((((fractype)1) << HALFFRACBITS) - 1); ! fraction <<= FRACBITS - HALFFRACBITS; ! exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1); ! sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1; ! ! if (exp != EXPMAX && exp != 0 && low != 0) ! { ! int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1); ! int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1; ! int shift; ! fractype xlow; ! ! xlow = low & ((((fractype)1) << HALFFRACBITS) - 1); ! if (lowexp) ! xlow |= (((halffractype)1) << HALFFRACBITS); ! else ! lowexp = 1; ! shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp); ! if (shift > 0) ! xlow <<= shift; ! else if (shift < 0) ! xlow >>= -shift; ! if (sign == lowsign) ! fraction += xlow; ! else ! fraction -= xlow; ! } ! } ! # else ! fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1); exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1); sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1; + # endif #endif dst->sign = sign; *************** unpack_d (FLO_union_type * src, fp_numbe *** 342,348 **** } else { ! /* Zero exponent with non zero fraction - it's denormalized, so there isn't a leading implicit one - we'll shift it so it gets one. */ dst->normal_exp = exp - EXPBIAS + 1; --- 495,501 ---- } else { ! /* Zero exponent with nonzero fraction - it's denormalized, so there isn't a leading implicit one - we'll shift it so it gets one. */ dst->normal_exp = exp - EXPBIAS + 1; *************** unpack_d (FLO_union_type * src, fp_numbe *** 359,365 **** dst->fraction.ll = fraction; } } ! else if (exp == EXPMAX) { /* Huge exponent*/ if (fraction == 0) --- 512,518 ---- dst->fraction.ll = fraction; } } ! else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX) { /* Huge exponent*/ if (fraction == 0) *************** unpack_d (FLO_union_type * src, fp_numbe *** 369,375 **** } else { ! /* Non zero fraction, means nan */ if (fraction & QUIET_NAN) { dst->class = CLASS_QNAN; --- 522,528 ---- } else { ! /* Nonzero fraction, means nan */ if (fraction & QUIET_NAN) { dst->class = CLASS_QNAN; *************** unpack_d (FLO_union_type * src, fp_numbe *** 392,398 **** } #endif /* L_unpack_df || L_unpack_sf */ ! #if defined(L_addsub_sf) || defined(L_addsub_df) static fp_number_type * _fpadd_parts (fp_number_type * a, fp_number_type * b, --- 545,551 ---- } #endif /* L_unpack_df || L_unpack_sf */ ! #if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf) static fp_number_type * _fpadd_parts (fp_number_type * a, fp_number_type * b, *************** sub (FLO_type arg_a, FLO_type arg_b) *** 576,583 **** } #endif /* L_addsub_sf || L_addsub_df */ ! #if defined(L_mul_sf) || defined(L_mul_df) ! static INLINE fp_number_type * _fpmul_parts ( fp_number_type * a, fp_number_type * b, fp_number_type * tmp) --- 729,736 ---- } #endif /* L_addsub_sf || L_addsub_df */ ! #if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf) ! static inline __attribute__ ((__always_inline__)) fp_number_type * _fpmul_parts ( fp_number_type * a, fp_number_type * b, fp_number_type * tmp) *************** _fpmul_parts ( fp_number_type * a, *** 625,631 **** /* Calculate the mantissa by multiplying both numbers to get a twice-as-wide number. */ { ! #if defined(NO_DI_MODE) { fractype x = a->fraction.ll; fractype ylow = b->fraction.ll; --- 778,784 ---- /* Calculate the mantissa by multiplying both numbers to get a twice-as-wide number. */ { ! #if defined(NO_DI_MODE) || defined(TFLOAT) { fractype x = a->fraction.ll; fractype ylow = b->fraction.ll; *************** _fpmul_parts ( fp_number_type * a, *** 688,700 **** #endif } ! tmp->normal_exp = a->normal_exp + b->normal_exp; tmp->sign = a->sign != b->sign; - #ifdef FLOAT - tmp->normal_exp += 2; /* ??????????????? */ - #else - tmp->normal_exp += 4; /* ??????????????? */ - #endif while (high >= IMPLICIT_2) { tmp->normal_exp++; --- 841,849 ---- #endif } ! tmp->normal_exp = a->normal_exp + b->normal_exp ! + FRAC_NBITS - (FRACBITS + NGARDS); tmp->sign = a->sign != b->sign; while (high >= IMPLICIT_2) { tmp->normal_exp++; *************** _fpmul_parts ( fp_number_type * a, *** 714,727 **** high |= 1; low <<= 1; } ! /* rounding is tricky. if we only round if it won't make us round later. */ #if 0 if (low & FRACHIGH2) { if (((high & GARDMASK) != GARDMSB) && (((high + 1) & GARDMASK) == GARDMSB)) { ! /* don't round, it gets done again later. */ } else { --- 863,876 ---- high |= 1; low <<= 1; } ! /* rounding is tricky. if we only round if it won't make us round later. */ #if 0 if (low & FRACHIGH2) { if (((high & GARDMASK) != GARDMSB) && (((high + 1) & GARDMASK) == GARDMSB)) { ! /* don't round, it gets done again later. */ } else { *************** _fpmul_parts ( fp_number_type * a, *** 729,735 **** } } #endif ! if ((high & GARDMASK) == GARDMSB) { if (high & (1 << NGARDS)) { --- 878,884 ---- } } #endif ! if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB) { if (high & (1 << NGARDS)) { *************** multiply (FLO_type arg_a, FLO_type arg_b *** 768,775 **** } #endif /* L_mul_sf || L_mul_df */ ! #if defined(L_div_sf) || defined(L_div_df) ! static INLINE fp_number_type * _fpdiv_parts (fp_number_type * a, fp_number_type * b) { --- 917,924 ---- } #endif /* L_mul_sf || L_mul_df */ ! #if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf) ! static inline __attribute__ ((__always_inline__)) fp_number_type * _fpdiv_parts (fp_number_type * a, fp_number_type * b) { *************** _fpdiv_parts (fp_number_type * a, *** 839,845 **** numerator *= 2; } ! if ((quotient & GARDMASK) == GARDMSB) { if (quotient & (1 << NGARDS)) { --- 988,994 ---- numerator *= 2; } ! if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB) { if (quotient & (1 << NGARDS)) { *************** divide (FLO_type arg_a, FLO_type arg_b) *** 878,884 **** } #endif /* L_div_sf || L_div_df */ ! #if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) /* according to the demo, fpcmp returns a comparison with 0... thus a -1 a==b -> 0 --- 1027,1034 ---- } #endif /* L_div_sf || L_div_df */ ! #if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \ ! || defined(L_fpcmp_parts_tf) /* according to the demo, fpcmp returns a comparison with 0... thus a -1 a==b -> 0 *************** int *** 889,895 **** __fpcmp_parts (fp_number_type * a, fp_number_type * b) { #if 0 ! /* either nan -> unordered. Must be checked outside of this routine. */ if (isnan (a) && isnan (b)) { return 1; /* still unordered! */ --- 1039,1045 ---- __fpcmp_parts (fp_number_type * a, fp_number_type * b) { #if 0 ! /* either nan -> unordered. Must be checked outside of this routine. */ if (isnan (a) && isnan (b)) { return 1; /* still unordered! */ *************** __fpcmp_parts (fp_number_type * a, fp_nu *** 909,919 **** -------+--------+-------- -inf(1)| a>b(1) | a==b(0) -------+--------+-------- ! So since unordered must be non zero, just line up the columns... */ return b->sign - a->sign; } ! /* but not both... */ if (isinf (a)) { return a->sign ? -1 : 1; --- 1059,1069 ---- -------+--------+-------- -inf(1)| a>b(1) | a==b(0) -------+--------+-------- ! So since unordered must be nonzero, just line up the columns... */ return b->sign - a->sign; } ! /* but not both... */ if (isinf (a)) { return a->sign ? -1 : 1; *************** __fpcmp_parts (fp_number_type * a, fp_nu *** 934,940 **** { return a->sign ? -1 : 1; } ! /* now both are "normal". */ if (a->sign != b->sign) { /* opposite signs */ --- 1084,1090 ---- { return a->sign ? -1 : 1; } ! /* now both are "normal". */ if (a->sign != b->sign) { /* opposite signs */ *************** __fpcmp_parts (fp_number_type * a, fp_nu *** 949,955 **** { return a->sign ? 1 : -1; } ! /* same exponents; check size. */ if (a->fraction.ll > b->fraction.ll) { return a->sign ? -1 : 1; --- 1099,1105 ---- { return a->sign ? 1 : -1; } ! /* same exponents; check size. */ if (a->fraction.ll > b->fraction.ll) { return a->sign ? -1 : 1; *************** __fpcmp_parts (fp_number_type * a, fp_nu *** 958,969 **** { return a->sign ? 1 : -1; } ! /* after all that, they're equal. */ return 0; } #endif ! #if defined(L_compare_sf) || defined(L_compare_df) CMPtype compare (FLO_type arg_a, FLO_type arg_b) { --- 1108,1119 ---- { return a->sign ? 1 : -1; } ! /* after all that, they're equal. */ return 0; } #endif ! #if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf) CMPtype compare (FLO_type arg_a, FLO_type arg_b) { *************** compare (FLO_type arg_a, FLO_type arg_b) *** 985,991 **** /* These should be optimized for their specific tasks someday. */ ! #if defined(L_eq_sf) || defined(L_eq_df) CMPtype _eq_f2 (FLO_type arg_a, FLO_type arg_b) { --- 1135,1141 ---- /* These should be optimized for their specific tasks someday. */ ! #if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf) CMPtype _eq_f2 (FLO_type arg_a, FLO_type arg_b) { *************** _eq_f2 (FLO_type arg_a, FLO_type arg_b) *** 1006,1012 **** } #endif /* L_eq_sf || L_eq_df */ ! #if defined(L_ne_sf) || defined(L_ne_df) CMPtype _ne_f2 (FLO_type arg_a, FLO_type arg_b) { --- 1156,1162 ---- } #endif /* L_eq_sf || L_eq_df */ ! #if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf) CMPtype _ne_f2 (FLO_type arg_a, FLO_type arg_b) { *************** _ne_f2 (FLO_type arg_a, FLO_type arg_b) *** 1027,1033 **** } #endif /* L_ne_sf || L_ne_df */ ! #if defined(L_gt_sf) || defined(L_gt_df) CMPtype _gt_f2 (FLO_type arg_a, FLO_type arg_b) { --- 1177,1183 ---- } #endif /* L_ne_sf || L_ne_df */ ! #if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf) CMPtype _gt_f2 (FLO_type arg_a, FLO_type arg_b) { *************** _gt_f2 (FLO_type arg_a, FLO_type arg_b) *** 1048,1054 **** } #endif /* L_gt_sf || L_gt_df */ ! #if defined(L_ge_sf) || defined(L_ge_df) CMPtype _ge_f2 (FLO_type arg_a, FLO_type arg_b) { --- 1198,1204 ---- } #endif /* L_gt_sf || L_gt_df */ ! #if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf) CMPtype _ge_f2 (FLO_type arg_a, FLO_type arg_b) { *************** _ge_f2 (FLO_type arg_a, FLO_type arg_b) *** 1068,1074 **** } #endif /* L_ge_sf || L_ge_df */ ! #if defined(L_lt_sf) || defined(L_lt_df) CMPtype _lt_f2 (FLO_type arg_a, FLO_type arg_b) { --- 1218,1224 ---- } #endif /* L_ge_sf || L_ge_df */ ! #if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf) CMPtype _lt_f2 (FLO_type arg_a, FLO_type arg_b) { *************** _lt_f2 (FLO_type arg_a, FLO_type arg_b) *** 1089,1095 **** } #endif /* L_lt_sf || L_lt_df */ ! #if defined(L_le_sf) || defined(L_le_df) CMPtype _le_f2 (FLO_type arg_a, FLO_type arg_b) { --- 1239,1245 ---- } #endif /* L_lt_sf || L_lt_df */ ! #if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf) CMPtype _le_f2 (FLO_type arg_a, FLO_type arg_b) { *************** _le_f2 (FLO_type arg_a, FLO_type arg_b) *** 1110,1116 **** } #endif /* L_le_sf || L_le_df */ ! #if defined(L_unord_sf) || defined(L_unord_df) CMPtype _unord_f2 (FLO_type arg_a, FLO_type arg_b) { --- 1260,1268 ---- } #endif /* L_le_sf || L_le_df */ ! #endif /* ! US_SOFTWARE_GOFAST */ ! ! #if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf) CMPtype _unord_f2 (FLO_type arg_a, FLO_type arg_b) { *************** _unord_f2 (FLO_type arg_a, FLO_type arg_ *** 1128,1136 **** } #endif /* L_unord_sf || L_unord_df */ ! #endif /* ! US_SOFTWARE_GOFAST */ ! ! #if defined(L_si_to_sf) || defined(L_si_to_df) FLO_type si_to_float (SItype arg_a) { --- 1280,1286 ---- } #endif /* L_unord_sf || L_unord_df */ ! #if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf) FLO_type si_to_float (SItype arg_a) { *************** si_to_float (SItype arg_a) *** 1158,1164 **** else in.fraction.ll = arg_a; ! while (in.fraction.ll < (1LL << (FRACBITS + NGARDS))) { in.fraction.ll <<= 1; in.normal_exp -= 1; --- 1308,1314 ---- else in.fraction.ll = arg_a; ! while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS))) { in.fraction.ll <<= 1; in.normal_exp -= 1; *************** si_to_float (SItype arg_a) *** 1168,1174 **** } #endif /* L_si_to_sf || L_si_to_df */ ! #if defined(L_usi_to_sf) || defined(L_usi_to_df) FLO_type usi_to_float (USItype arg_a) { --- 1318,1324 ---- } #endif /* L_si_to_sf || L_si_to_df */ ! #if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf) FLO_type usi_to_float (USItype arg_a) { *************** usi_to_float (USItype arg_a) *** 1185,1196 **** in.normal_exp = FRACBITS + NGARDS; in.fraction.ll = arg_a; ! while (in.fraction.ll > (1LL << (FRACBITS + NGARDS))) { in.fraction.ll >>= 1; in.normal_exp += 1; } ! while (in.fraction.ll < (1LL << (FRACBITS + NGARDS))) { in.fraction.ll <<= 1; in.normal_exp -= 1; --- 1335,1346 ---- in.normal_exp = FRACBITS + NGARDS; in.fraction.ll = arg_a; ! while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS))) { in.fraction.ll >>= 1; in.normal_exp += 1; } ! while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS))) { in.fraction.ll <<= 1; in.normal_exp -= 1; *************** usi_to_float (USItype arg_a) *** 1200,1206 **** } #endif ! #if defined(L_sf_to_si) || defined(L_df_to_si) SItype float_to_si (FLO_type arg_a) { --- 1350,1356 ---- } #endif ! #if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si) SItype float_to_si (FLO_type arg_a) { *************** float_to_si (FLO_type arg_a) *** 1215,1221 **** return 0; if (isnan (&a)) return 0; ! /* get reasonable MAX_SI_INT... */ if (isinf (&a)) return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT; /* it is a number, but a small one */ --- 1365,1371 ---- return 0; if (isnan (&a)) return 0; ! /* get reasonable MAX_SI_INT... */ if (isinf (&a)) return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT; /* it is a number, but a small one */ *************** float_to_si (FLO_type arg_a) *** 1228,1235 **** } #endif /* L_sf_to_si || L_df_to_si */ ! #if defined(L_sf_to_usi) || defined(L_df_to_usi) ! #ifdef US_SOFTWARE_GOFAST /* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines, we also define them for GOFAST because the ones in libgcc2.c have the wrong names and I'd rather define these here and keep GOFAST CYG-LOC's --- 1378,1385 ---- } #endif /* L_sf_to_si || L_df_to_si */ ! #if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi) ! #if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi) /* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines, we also define them for GOFAST because the ones in libgcc2.c have the wrong names and I'd rather define these here and keep GOFAST CYG-LOC's *************** float_to_usi (FLO_type arg_a) *** 1252,1258 **** /* it is a negative number */ if (a.sign) return 0; ! /* get reasonable MAX_USI_INT... */ if (isinf (&a)) return MAX_USI_INT; /* it is a number, but a small one */ --- 1402,1408 ---- /* it is a negative number */ if (a.sign) return 0; ! /* get reasonable MAX_USI_INT... */ if (isinf (&a)) return MAX_USI_INT; /* it is a number, but a small one */ *************** float_to_usi (FLO_type arg_a) *** 1268,1274 **** #endif /* US_SOFTWARE_GOFAST */ #endif /* L_sf_to_usi || L_df_to_usi */ ! #if defined(L_negate_sf) || defined(L_negate_df) FLO_type negate (FLO_type arg_a) { --- 1418,1424 ---- #endif /* US_SOFTWARE_GOFAST */ #endif /* L_sf_to_usi || L_df_to_usi */ ! #if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf) FLO_type negate (FLO_type arg_a) { *************** sf_to_df (SFtype arg_a) *** 1324,1329 **** --- 1474,1494 ---- } #endif /* L_sf_to_df */ + #if defined(L_sf_to_tf) && defined(TMODES) + TFtype + sf_to_tf (SFtype arg_a) + { + fp_number_type in; + FLO_union_type au; + + au.value = arg_a; + unpack_d (&au, &in); + + return __make_tp (in.class, in.sign, in.normal_exp, + ((UTItype) in.fraction.ll) << F_T_BITOFF); + } + #endif /* L_sf_to_df */ + #endif /* ! FLOAT_ONLY */ #endif /* FLOAT */ *************** df_to_sf (DFtype arg_a) *** 1367,1371 **** --- 1532,1615 ---- } #endif /* L_df_to_sf */ + #if defined(L_df_to_tf) && defined(TMODES) \ + && !defined(FLOAT) && !defined(TFLOAT) + TFtype + df_to_tf (DFtype arg_a) + { + fp_number_type in; + FLO_union_type au; + + au.value = arg_a; + unpack_d (&au, &in); + + return __make_tp (in.class, in.sign, in.normal_exp, + ((UTItype) in.fraction.ll) << D_T_BITOFF); + } + #endif /* L_sf_to_df */ + + #ifdef TFLOAT + #if defined(L_make_tf) + TFtype + __make_tp(fp_class_type class, + unsigned int sign, + int exp, + UTItype frac) + { + fp_number_type in; + + in.class = class; + in.sign = sign; + in.normal_exp = exp; + in.fraction.ll = frac; + return pack_d (&in); + } + #endif /* L_make_tf */ + + #if defined(L_tf_to_df) + DFtype + tf_to_df (TFtype arg_a) + { + fp_number_type in; + UDItype sffrac; + FLO_union_type au; + + au.value = arg_a; + unpack_d (&au, &in); + + sffrac = in.fraction.ll >> D_T_BITOFF; + + /* We set the lowest guard bit in SFFRAC if we discarded any non + zero bits. */ + if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0) + sffrac |= 1; + + return __make_dp (in.class, in.sign, in.normal_exp, sffrac); + } + #endif /* L_tf_to_df */ + + #if defined(L_tf_to_sf) + SFtype + tf_to_sf (TFtype arg_a) + { + fp_number_type in; + USItype sffrac; + FLO_union_type au; + + au.value = arg_a; + unpack_d (&au, &in); + + sffrac = in.fraction.ll >> F_T_BITOFF; + + /* We set the lowest guard bit in SFFRAC if we discarded any non + zero bits. */ + if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0) + sffrac |= 1; + + return __make_fp (in.class, in.sign, in.normal_exp, sffrac); + } + #endif /* L_tf_to_sf */ + #endif /* TFLOAT */ + #endif /* ! FLOAT */ #endif /* !EXTENDED_FLOAT_STUBS */ diff -Nrc3pad gcc-3.2.3/gcc/config/fp-bit.h gcc-3.3/gcc/config/fp-bit.h *** gcc-3.2.3/gcc/config/fp-bit.h 2001-11-08 18:56:45.000000000 +0000 --- gcc-3.3/gcc/config/fp-bit.h 2003-03-02 13:11:37.000000000 +0000 *************** *** 1,5 **** /* Header file for fp-bit.c. */ ! /* Copyright (C) 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Header file for fp-bit.c. */ ! /* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 35,41 **** This avoids the need to pull in the entire fp emulation library when only a small number of functions are needed. ! If FINE_GRAINED_LIBRARIES is not defined, then compile every suitable routine. */ #ifndef FINE_GRAINED_LIBRARIES #define L_pack_df --- 35,41 ---- This avoids the need to pull in the entire fp emulation library when only a small number of functions are needed. ! If FINE_GRAINED_LIBRARIES is not defined, then compile every suitable routine. */ #ifndef FINE_GRAINED_LIBRARIES #define L_pack_df *************** Boston, MA 02111-1307, USA. */ *** 87,98 **** --- 87,108 ---- #endif #endif /* ! FINE_GRAINED_LIBRARIES */ + #if __LDBL_MANT_DIG__ == 113 || __LDBL_MANT_DIG__ == 106 + # define TMODES + #endif + typedef float SFtype __attribute__ ((mode (SF))); typedef float DFtype __attribute__ ((mode (DF))); + #ifdef TMODES + typedef float TFtype __attribute__ ((mode (TF))); + #endif typedef int HItype __attribute__ ((mode (HI))); typedef int SItype __attribute__ ((mode (SI))); typedef int DItype __attribute__ ((mode (DI))); + #ifdef TMODES + typedef int TItype __attribute__ ((mode (TI))); + #endif /* The type of the result of a fp compare */ #ifndef CMPtype *************** typedef int DItype __attribute__ ((mode *** 102,117 **** typedef unsigned int UHItype __attribute__ ((mode (HI))); typedef unsigned int USItype __attribute__ ((mode (SI))); typedef unsigned int UDItype __attribute__ ((mode (DI))); #define MAX_USI_INT (~(USItype)0) #define MAX_SI_INT ((SItype) (MAX_USI_INT >> 1)) #define BITS_PER_SI (4 * BITS_PER_UNIT) #ifdef FLOAT_ONLY #define NO_DI_MODE #endif ! #ifdef FLOAT # define NGARDS 7L # define GARDROUND 0x3f # define GARDMASK 0x7f --- 112,179 ---- typedef unsigned int UHItype __attribute__ ((mode (HI))); typedef unsigned int USItype __attribute__ ((mode (SI))); typedef unsigned int UDItype __attribute__ ((mode (DI))); + #ifdef TMODES + typedef unsigned int UTItype __attribute__ ((mode (TI))); + #endif #define MAX_USI_INT (~(USItype)0) #define MAX_SI_INT ((SItype) (MAX_USI_INT >> 1)) #define BITS_PER_SI (4 * BITS_PER_UNIT) + #ifdef TMODES + #define MAX_UDI_INT (~(UDItype)0) + #define MAX_DI_INT ((DItype) (MAX_UDI_INT >> 1)) + #define BITS_PER_DI (8 * BITS_PER_UNIT) + #endif #ifdef FLOAT_ONLY #define NO_DI_MODE #endif ! #ifdef TFLOAT ! # ifndef TMODES ! # error "TFLOAT requires long double to have 113 bits of mantissa" ! # endif ! ! # define PREFIXFPDP tp ! # define PREFIXSFDF tf ! # define NGARDS 10L /* Is this right? */ ! # define GARDROUND 0x1ff ! # define GARDMASK 0x3ff ! # define GARDMSB 0x200 ! # define FRAC_NBITS 128 ! ! # if __LDBL_MANT_DIG__ == 113 /* IEEE quad */ ! # define EXPBITS 15 ! # define EXPBIAS 16383 ! # define EXPMAX (0x7fff) ! # define QUIET_NAN ((TItype)0x8 << 108) ! # define FRACHIGH ((TItype)0x8 << 124) ! # define FRACHIGH2 ((TItype)0xc << 124) ! # define FRACBITS 112 ! # endif ! ! # if __LDBL_MANT_DIG__ == 106 /* IBM extended (double+double) */ ! # define EXPBITS 11 ! # define EXPBIAS 1023 ! # define EXPMAX (0x7ff) ! # define QUIET_NAN ((TItype)0x8 << (48 + 64)) ! # define FRACHIGH ((TItype)0x8 << 124) ! # define FRACHIGH2 ((TItype)0xc << 124) ! # define FRACBITS 105 ! # define HALFFRACBITS 52 ! # define HALFSHIFT 64 ! # endif ! ! # define pack_d __pack_t ! # define unpack_d __unpack_t ! # define __fpcmp_parts __fpcmp_parts_t ! typedef UTItype fractype; ! typedef UDItype halffractype; ! typedef USItype qrtrfractype; ! #define qrtrfractype qrtrfractype ! typedef TFtype FLO_type; ! typedef TItype intfrac; ! #elif defined FLOAT # define NGARDS 7L # define GARDROUND 0x3f # define GARDMASK 0x7f *************** typedef unsigned int UDItype __attribute *** 157,190 **** #endif /* FLOAT */ #ifdef US_SOFTWARE_GOFAST ! # ifdef FLOAT # define add fpadd # define sub fpsub # define multiply fpmul # define divide fpdiv # define compare fpcmp # define usi_to_float __floatunsisf # define si_to_float sitofp # define float_to_si fptosi # define float_to_usi fptoui # define negate __negsf2 # define sf_to_df fptodp ! # define dptofp dptofp ! #else # define add dpadd # define sub dpsub # define multiply dpmul # define divide dpdiv # define compare dpcmp # define usi_to_float __floatunsidf # define si_to_float litodp # define float_to_si dptoli # define float_to_usi dptoul # define negate __negdf2 # define df_to_sf dptofp # endif /* FLOAT */ #else ! # ifdef FLOAT # define add __addsf3 # define sub __subsf3 # define multiply __mulsf3 --- 219,277 ---- #endif /* FLOAT */ #ifdef US_SOFTWARE_GOFAST ! # ifdef TFLOAT ! # error "GOFAST TFmode not supported" ! # elif defined FLOAT # define add fpadd # define sub fpsub # define multiply fpmul # define divide fpdiv # define compare fpcmp + # define _unord_f2 __unordsf2 # define usi_to_float __floatunsisf # define si_to_float sitofp # define float_to_si fptosi # define float_to_usi fptoui # define negate __negsf2 # define sf_to_df fptodp ! # define sf_to_tf __extendsftf2 ! # else # define add dpadd # define sub dpsub # define multiply dpmul # define divide dpdiv # define compare dpcmp + # define _unord_f2 __unorddf2 # define usi_to_float __floatunsidf # define si_to_float litodp # define float_to_si dptoli # define float_to_usi dptoul # define negate __negdf2 # define df_to_sf dptofp + # define df_to_tf __extenddftf2 # endif /* FLOAT */ #else ! # ifdef TFLOAT ! # define add __addtf3 ! # define sub __subtf3 ! # define multiply __multf3 ! # define divide __divtf3 ! # define compare __cmptf2 ! # define _eq_f2 __eqtf2 ! # define _ne_f2 __netf2 ! # define _gt_f2 __gttf2 ! # define _ge_f2 __getf2 ! # define _lt_f2 __lttf2 ! # define _le_f2 __letf2 ! # define _unord_f2 __unordtf2 ! # define usi_to_float __floatunsitf ! # define si_to_float __floatsitf ! # define float_to_si __fixtfsi ! # define float_to_usi __fixunstfsi ! # define negate __negtf2 ! # define tf_to_sf __trunctfsf2 ! # define tf_to_df __trunctfdf2 ! # elif defined FLOAT # define add __addsf3 # define sub __subsf3 # define multiply __mulsf3 *************** typedef unsigned int UDItype __attribute *** 203,209 **** # define float_to_usi __fixunssfsi # define negate __negsf2 # define sf_to_df __extendsfdf2 ! #else # define add __adddf3 # define sub __subdf3 # define multiply __muldf3 --- 290,297 ---- # define float_to_usi __fixunssfsi # define negate __negsf2 # define sf_to_df __extendsfdf2 ! # define sf_to_tf __extendsftf2 ! # else # define add __adddf3 # define sub __subdf3 # define multiply __muldf3 *************** typedef unsigned int UDItype __attribute *** 222,227 **** --- 310,316 ---- # define float_to_usi __fixunsdfsi # define negate __negdf2 # define df_to_sf __truncdfsf2 + # define df_to_tf __extenddftf2 # endif /* FLOAT */ #endif /* US_SOFTWARE_GOFAST */ *************** typedef unsigned int UDItype __attribute *** 239,248 **** */ #define F_D_BITOFF (52+8-(23+7)) #define NORMAL_EXPMIN (-(EXPBIAS)+1) ! #define IMPLICIT_1 (1LL<<(FRACBITS+NGARDS)) ! #define IMPLICIT_2 (1LL<<(FRACBITS+1+NGARDS)) /* common types */ --- 328,342 ---- */ #define F_D_BITOFF (52+8-(23+7)) + #ifdef TMODES + # define F_T_BITOFF (__LDBL_MANT_DIG__-1+10-(23+7)) + # define D_T_BITOFF (__LDBL_MANT_DIG__-1+10-(52+8)) + #endif + #define NORMAL_EXPMIN (-(EXPBIAS)+1) ! #define IMPLICIT_1 ((fractype)1<<(FRACBITS+NGARDS)) ! #define IMPLICIT_2 ((fractype)1<<(FRACBITS+1+NGARDS)) /* common types */ *************** typedef union *** 280,286 **** --- 374,384 ---- fractype value_raw; #ifndef FLOAT + # ifdef qrtrfractype + qrtrfractype qwords[4]; + # else halffractype words[2]; + # endif #endif #ifdef FLOAT_BIT_ORDER_MISMATCH *************** FLO_union_type; *** 315,396 **** /* Prototypes */ ! #if defined(L_pack_df) || defined(L_pack_sf) extern FLO_type pack_d (fp_number_type *); #endif extern void unpack_d (FLO_union_type *, fp_number_type *); ! #if defined(L_addsub_sf) || defined(L_addsub_df) extern FLO_type add (FLO_type, FLO_type); extern FLO_type sub (FLO_type, FLO_type); #endif ! #if defined(L_mul_sf) || defined(L_mul_df) extern FLO_type multiply (FLO_type, FLO_type); #endif ! #if defined(L_div_sf) || defined(L_div_df) extern FLO_type divide (FLO_type, FLO_type); #endif extern int __fpcmp_parts (fp_number_type *, fp_number_type *); ! #if defined(L_compare_sf) || defined(L_compare_df) extern CMPtype compare (FLO_type, FLO_type); #endif #ifndef US_SOFTWARE_GOFAST ! #if defined(L_eq_sf) || defined(L_eq_df) extern CMPtype _eq_f2 (FLO_type, FLO_type); #endif ! #if defined(L_ne_sf) || defined(L_ne_df) extern CMPtype _ne_f2 (FLO_type, FLO_type); #endif ! #if defined(L_gt_sf) || defined(L_gt_df) extern CMPtype _gt_f2 (FLO_type, FLO_type); #endif ! #if defined(L_ge_sf) || defined(L_ge_df) extern CMPtype _ge_f2 (FLO_type, FLO_type); #endif ! #if defined(L_lt_sf) || defined(L_lt_df) extern CMPtype _lt_f2 (FLO_type, FLO_type); #endif ! #if defined(L_le_sf) || defined(L_le_df) extern CMPtype _le_f2 (FLO_type, FLO_type); #endif ! #if defined(L_unord_sf) || defined(L_unord_df) extern CMPtype _unord_f2 (FLO_type, FLO_type); #endif #endif /* ! US_SOFTWARE_GOFAST */ ! #if defined(L_si_to_sf) || defined(L_si_to_df) extern FLO_type si_to_float (SItype); #endif ! #if defined(L_sf_to_si) || defined(L_df_to_si) extern SItype float_to_si (FLO_type); #endif ! #if defined(L_sf_to_usi) || defined(L_df_to_usi) ! #ifdef US_SOFTWARE_GOFAST extern USItype float_to_usi (FLO_type); #endif #endif ! #if defined(L_usi_to_sf) || defined(L_usi_to_df) extern FLO_type usi_to_float (USItype); #endif ! #if defined(L_negate_sf) || defined(L_negate_df) extern FLO_type negate (FLO_type); #endif --- 413,494 ---- /* Prototypes */ ! #if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf) extern FLO_type pack_d (fp_number_type *); #endif extern void unpack_d (FLO_union_type *, fp_number_type *); ! #if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf) extern FLO_type add (FLO_type, FLO_type); extern FLO_type sub (FLO_type, FLO_type); #endif ! #if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf) extern FLO_type multiply (FLO_type, FLO_type); #endif ! #if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf) extern FLO_type divide (FLO_type, FLO_type); #endif extern int __fpcmp_parts (fp_number_type *, fp_number_type *); ! #if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compare_tf) extern CMPtype compare (FLO_type, FLO_type); #endif #ifndef US_SOFTWARE_GOFAST ! #if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf) extern CMPtype _eq_f2 (FLO_type, FLO_type); #endif ! #if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf) extern CMPtype _ne_f2 (FLO_type, FLO_type); #endif ! #if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf) extern CMPtype _gt_f2 (FLO_type, FLO_type); #endif ! #if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf) extern CMPtype _ge_f2 (FLO_type, FLO_type); #endif ! #if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf) extern CMPtype _lt_f2 (FLO_type, FLO_type); #endif ! #if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf) extern CMPtype _le_f2 (FLO_type, FLO_type); #endif ! #if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf) extern CMPtype _unord_f2 (FLO_type, FLO_type); #endif #endif /* ! US_SOFTWARE_GOFAST */ ! #if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf) extern FLO_type si_to_float (SItype); #endif ! #if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si) extern SItype float_to_si (FLO_type); #endif ! #if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi) ! #if defined(US_SOFTWARE_GOFAST) || defined(L_tf_to_usi) extern USItype float_to_usi (FLO_type); #endif #endif ! #if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf) extern FLO_type usi_to_float (USItype); #endif ! #if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf) extern FLO_type negate (FLO_type); #endif *************** extern DFtype __make_dp (fp_class_type, *** 403,408 **** --- 501,509 ---- #if defined(L_sf_to_df) extern DFtype sf_to_df (SFtype); #endif + #if defined(L_sf_to_tf) && defined(TMODES) + extern TFtype sf_to_tf (SFtype); + #endif #endif /* ! FLOAT_ONLY */ #endif /* FLOAT */ *************** extern DFtype __make_dp (fp_class_type, *** 414,419 **** --- 515,539 ---- #if defined(L_df_to_sf) extern SFtype df_to_sf (DFtype); #endif + #if defined(L_df_to_tf) && defined(TMODES) + extern TFtype df_to_tf (DFtype); + #endif #endif /* ! FLOAT */ + #ifdef TMODES + extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype); + extern TFtype __make_tp (fp_class_type, unsigned int, int, UTItype); + #ifdef TFLOAT + #if defined(L_tf_to_sf) + extern SFtype tf_to_sf (TFtype); + #endif + #if defined(L_tf_to_df) + extern DFtype tf_to_df (TFtype); + #endif + #if defined(L_di_to_tf) + extern TFtype di_to_df (DItype); + #endif + #endif /* TFLOAT */ + #endif /* TMODES */ + #endif /* ! GCC_FP_BIT_H */ diff -Nrc3pad gcc-3.2.3/gcc/config/fr30/fr30.c gcc-3.3/gcc/config/fr30/fr30.c *** gcc-3.2.3/gcc/config/fr30/fr30.c 2002-02-17 14:23:51.000000000 +0000 --- gcc-3.3/gcc/config/fr30/fr30.c 2002-11-21 16:36:52.000000000 +0000 *************** *** 2,25 **** Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Cygnus Solutions. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ - /*}}}*/ /*{{{ Includes */ #include "config.h" --- 2,24 ---- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Cygnus Solutions. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /*{{{ Includes */ #include "config.h" *************** Boston, MA 02111-1307, USA. */ *** 30,40 **** #include "real.h" #include "insn-config.h" #include "conditions.h" - #include "output.h" #include "insn-attr.h" #include "flags.h" #include "recog.h" #include "tree.h" #include "expr.h" #include "obstack.h" #include "except.h" --- 29,39 ---- #include "real.h" #include "insn-config.h" #include "conditions.h" #include "insn-attr.h" #include "flags.h" #include "recog.h" #include "tree.h" + #include "output.h" #include "expr.h" #include "obstack.h" #include "except.h" *************** struct rtx_def * fr30_compare_op1; *** 90,96 **** SP ->| | / +-----------------------+ ! Note, AP is a fake hard register. It will be eliminated in favour of SP or FP as appropriate. Note, Some or all of the stack sections above may be omitted if they --- 89,95 ---- SP ->| | / +-----------------------+ ! Note, AP is a fake hard register. It will be eliminated in favor of SP or FP as appropriate. Note, Some or all of the stack sections above may be omitted if they *************** fr30_setup_incoming_varargs (arg_regs_us *** 419,429 **** abort (); #if STRICT_ARGUMENT_NAMING ! /* We must treat `__builtin_va_alist' as an anonymous arg. ! But otherwise if STRICT_ARGUMENT_NAMING is true then the ! last named arg must not be treated as an anonymous arg. */ ! if (! current_function_varargs) ! arg_regs_used_so_far += fr30_num_arg_regs (int_mode, type); #endif size = FR30_NUM_ARG_REGS - arg_regs_used_so_far; --- 418,426 ---- abort (); #if STRICT_ARGUMENT_NAMING ! /* If STRICT_ARGUMENT_NAMING is true then the last named ! arg must not be treated as an anonymous arg. */ ! arg_regs_used_so_far += fr30_num_arg_regs (int_mode, type); #endif size = FR30_NUM_ARG_REGS - arg_regs_used_so_far; *************** fr30_print_operand (file, x, code) *** 556,565 **** output_operand_lossage ("fr30_print_operand: invalid %%F code"); else { ! REAL_VALUE_TYPE d; ! REAL_VALUE_FROM_CONST_DOUBLE (d, x); ! fprintf (file, "%.8f", d); } return; --- 553,563 ---- output_operand_lossage ("fr30_print_operand: invalid %%F code"); else { ! char str[30]; ! real_to_decimal (str, CONST_DOUBLE_REAL_VALUE (x), ! sizeof (str), 0, 1); ! fputs (str, file); } return; *************** fr30_check_multiple_regs (operands, num_ *** 953,958 **** --- 951,970 ---- return 1; } + int + fr30_const_double_is_zero (operand) + rtx operand; + { + REAL_VALUE_TYPE d; + + if (operand == NULL || GET_CODE (operand) != CONST_DOUBLE) + return 0; + + REAL_VALUE_FROM_CONST_DOUBLE (d, operand); + + return REAL_VALUES_EQUAL (d, dconst0); + } + /*}}}*/ /*{{{ Instruction Output Routines */ *************** fr30_move_double (operands) *** 1095,1102 **** /* This should have been prevented by the constraints on movdi_insn. */ abort (); ! val = gen_sequence (); end_sequence (); return val; } --- 1107,1118 ---- /* This should have been prevented by the constraints on movdi_insn. */ abort (); ! val = get_insns (); end_sequence (); return val; } + /*}}}*/ + /* Local Variables: */ + /* folded-file: t */ + /* End: */ diff -Nrc3pad gcc-3.2.3/gcc/config/fr30/fr30.h gcc-3.3/gcc/config/fr30/fr30.h *** gcc-3.2.3/gcc/config/fr30/fr30.h 2002-12-05 18:34:11.000000000 +0000 --- gcc-3.3/gcc/config/fr30/fr30.h 2002-09-20 06:36:34.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 40,46 **** predefined macros that identify this machine and system. These macros will be predefined unless the `-ansi' option is specified. */ ! #define CPP_PREDEFINES "-Dfr30 -D__fr30__ -Amachine=fr30" /* Use LDI:20 instead of LDI:32 to load addresses. */ #define TARGET_SMALL_MODEL_MASK (1 << 0) --- 40,52 ---- predefined macros that identify this machine and system. These macros will be predefined unless the `-ansi' option is specified. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("fr30"); \ ! builtin_assert ("machine=fr30"); \ ! } \ ! while (0) /* Use LDI:20 instead of LDI:32 to load addresses. */ #define TARGET_SMALL_MODEL_MASK (1 << 0) *************** extern int target_flags; *** 83,96 **** #define WORDS_BIG_ENDIAN 1 - #define BITS_PER_UNIT 8 - - #define BITS_PER_WORD 32 - #define UNITS_PER_WORD 4 - #define POINTER_SIZE 32 - #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ do \ { \ --- 89,96 ---- *************** extern int target_flags; *** 122,133 **** /* Defined in svr4.h. */ #define PCC_BITFIELD_TYPE_MATTERS 1 - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - /*}}}*/ /*{{{ Layout of Source Language Data Types. */ - #define CHAR_TYPE_SIZE 8 #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE 32 #define LONG_TYPE_SIZE 32 --- 122,130 ---- *************** enum reg_class *** 587,593 **** {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \ } ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM with register number TO. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the cases preventing register elimination are --- 584,590 ---- {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \ } ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM with register number TO. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the cases preventing register elimination are *************** enum reg_class *** 696,702 **** You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns non-zero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ --- 693,699 ---- You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns nonzero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ *************** enum reg_class *** 719,725 **** /* On the FR30 this value is an accumulating count of the number of argument registers that have been filled with argument values, as opposed to say, the number of bytes of argument accumulated so far. */ ! typedef int CUMULATIVE_ARGS; /* A C expression for the number of words, at the beginning of an argument, must be put in registers. The value must be zero for arguments that are --- 716,722 ---- /* On the FR30 this value is an accumulating count of the number of argument registers that have been filled with argument values, as opposed to say, the number of bytes of argument accumulated so far. */ ! #define CUMULATIVE_ARGS int /* A C expression for the number of words, at the beginning of an argument, must be put in registers. The value must be zero for arguments that are *************** typedef int CUMULATIVE_ARGS; *** 928,934 **** ldi:32 FUNCTION, r0 jmp @r0 ! The no-ops are to guarantee that the the static chain and final target are 32 bit ailgned within the trampoline. That allows us to initialize those locations with simple SImode stores. The alternative would be to use HImode stores. */ --- 925,931 ---- ldi:32 FUNCTION, r0 jmp @r0 ! The no-ops are to guarantee that the static chain and final target are 32 bit ailgned within the trampoline. That allows us to initialize those locations with simple SImode stores. The alternative would be to use HImode stores. */ *************** do \ *** 984,1044 **** /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. ! ! It usually pays to define several simpler macros to serve as subroutines for ! this one. Otherwise it may be too complicated to understand. ! ! This macro must exist in two variants: a strict variant and a non-strict ! one. The strict variant is used in the reload pass. It must be defined so ! that any pseudo-register that has not been allocated a hard register is ! considered a memory reference. In contexts where some kind of register is ! required, a pseudo-register with no hard register must be rejected. ! ! The non-strict variant is used in other passes. It must be defined to ! accept all pseudo-registers in every context where some kind of register is ! required. ! ! Compiler source files that want to use the strict variant of this macro ! define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' ! conditional to define the strict variant in that case and the non-strict ! variant otherwise. ! ! Subroutines to check for acceptable registers for various purposes (one for ! base registers, one for index registers, and so on) are typically among the ! subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these ! subroutine macros need have two variants; the higher levels of macros may be ! the same whether strict or not. ! ! Normally, constant addresses which are the sum of a `symbol_ref' and an ! integer are stored inside a `const' RTX to mark them as constant. ! Therefore, there is no need to recognize such sums specifically as ! legitimate addresses. Normally you would simply recognize any `const' as ! legitimate. ! ! Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that ! are not marked with `const'. It assumes that a naked `plus' indicates ! indexing. If so, then you *must* reject such naked constant sums as ! illegitimate addresses, so that none of them will be given to ! `PRINT_OPERAND_ADDRESS'. ! ! On some machines, whether a symbolic address is legitimate depends on the ! section that the address refers to. On these machines, define the macro ! `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and ! then check for it here. When you see a `const', you will have to look ! inside it to find the `symbol_ref' in order to determine the section. ! ! The best way to modify the name string is by adding text to the beginning, ! with suitable punctuation to prevent any ambiguity. Allocate the new name ! in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to ! remove and decode the added text and output the name accordingly, and define ! `STRIP_NAME_ENCODING' to access the original name string. ! ! You can check the information stored here into the `symbol_ref' in the ! definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and ! `PRINT_OPERAND_ADDRESS'. ! ! Used in explow.c, recog.c, reload.c. */ /* On the FR30 we only have one real addressing mode - an address in a register. There are three special cases however: --- 981,987 ---- /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. */ /* On the FR30 we only have one real addressing mode - an address in a register. There are three special cases however: *************** do \ *** 1047,1053 **** * indexed addressing using small signed offsets from the frame pointer ! * register plus register addresing using R13 as the base register. At the moment we only support the first two of these special cases. */ --- 990,996 ---- * indexed addressing using small signed offsets from the frame pointer ! * register plus register addressing using R13 as the base register. At the moment we only support the first two of these special cases. */ *************** do \ *** 1085,1093 **** goto LABEL; \ if (GET_CODE (X) == PLUS \ && ((MODE) == SImode || (MODE) == SFmode) \ ! && GET_CODE (XEXP (X, 0)) == REG \ ! && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \ ! || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM) \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \ goto LABEL; \ --- 1028,1036 ---- goto LABEL; \ if (GET_CODE (X) == PLUS \ && ((MODE) == SImode || (MODE) == SFmode) \ ! && GET_CODE (XEXP (X, 0)) == REG \ ! && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \ ! || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM) \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \ goto LABEL; \ *************** do \ *** 1195,1201 **** uninitialized global data will be output in the data section if `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be used. */ ! #define BSS_SECTION_ASM_OP "\t.bss" /*}}}*/ /*{{{ The Overall Framework of an Assembler File. */ --- 1138,1144 ---- uninitialized global data will be output in the data section if `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be used. */ ! #define BSS_SECTION_ASM_OP "\t.section .bss" /*}}}*/ /*{{{ The Overall Framework of an Assembler File. */ *************** do \ *** 1220,1251 **** /*}}}*/ /*{{{ Output and Generation of Labels. */ ! /* A C statement (sans semicolon) to output to the stdio stream STREAM the ! assembler definition of a label named NAME. Use the expression ! `assemble_name (STREAM, NAME)' to output the name itself; before and after ! that, output the additional assembler syntax for defining the name, and a ! newline. */ ! #define ASM_OUTPUT_LABEL(STREAM, NAME) \ ! do \ ! { \ ! assemble_name (STREAM, NAME); \ ! fputs (":\n", STREAM); \ ! } \ ! while (0) ! ! /* A C statement (sans semicolon) to output to the stdio stream STREAM some ! commands that will make the label NAME global; that is, available for ! reference from other files. Use the expression `assemble_name (STREAM, ! NAME)' to output the name itself; before and after that, output the ! additional assembler syntax for making that name global, and a newline. */ ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do \ ! { \ ! fputs ("\t.globl ", STREAM); \ ! assemble_name (STREAM, NAME); \ ! fputs ("\n", STREAM); \ ! } \ ! while (0) /* A C expression to assign to OUTVAR (which is a variable of type `char *') a newly allocated string made from the string NAME and the number NUMBER, with --- 1163,1170 ---- /*}}}*/ /*{{{ Output and Generation of Labels. */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* A C expression to assign to OUTVAR (which is a variable of type `char *') a newly allocated string made from the string NAME and the number NUMBER, with *************** do \ *** 1300,1311 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. - On some machines, the syntax for a symbolic address depends on the section - that the address refers to. On these machines, define the macro - `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and - then check for it here. *Note Assembler Format::. */ #define PRINT_OPERAND_ADDRESS(STREAM, X) fr30_print_operand_address (STREAM, X) /* If defined, C string expressions to be used for the `%R', `%L', `%U', and --- 1219,1226 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. */ #define PRINT_OPERAND_ADDRESS(STREAM, X) fr30_print_operand_address (STREAM, X) /* If defined, C string expressions to be used for the `%R', `%L', `%U', and diff -Nrc3pad gcc-3.2.3/gcc/config/fr30/fr30.md gcc-3.3/gcc/config/fr30/fr30.md *** gcc-3.2.3/gcc/config/fr30/fr30.md 2002-03-20 21:54:51.000000000 +0000 --- gcc-3.3/gcc/config/fr30/fr30.md 2002-11-21 16:36:52.000000000 +0000 *************** *** 1,5 **** ;; FR30 machine description. ! ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. ;; Contributed by Cygnus Solutions. ;; This file is part of GNU CC. --- 1,5 ---- ;; FR30 machine description. ! ;; Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. ;; Contributed by Cygnus Solutions. ;; This file is part of GNU CC. *************** *** 21,27 **** ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - ;;}}} ;;{{{ Attributes (define_attr "length" "" (const_int 2)) --- 21,26 ---- *************** *** 287,298 **** ;; and time by loading the positive value and then sign extending it. (define_split [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "immediate_operand" ""))] "INTVAL (operands[1]) <= -1 && INTVAL (operands[1]) >= -128" ! [(set:SI (match_dup 0) (match_dup 2)) ! (set:SI (match_dup 0) (sign_extend:SI (subreg:QI (match_dup 0) 0)))] "{ ! operands[2] = GEN_INT (INTVAL (operands[1]) & 0xff); }" ) --- 286,298 ---- ;; and time by loading the positive value and then sign extending it. (define_split [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "const_int_operand" ""))] "INTVAL (operands[1]) <= -1 && INTVAL (operands[1]) >= -128" ! [(set:SI (match_dup 0) (match_dup 1)) ! (set:SI (match_dup 0) (sign_extend:SI (match_dup 2)))] "{ ! operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff); ! operands[2] = gen_lowpart (QImode, operands[0]); }" ) *************** *** 301,307 **** ;; and space by loading the byte value and shifting it into place. (define_split [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "immediate_operand" ""))] "(INTVAL (operands[1]) < 0) && ((INTVAL (operands[1]) & 0x00ffffff) == 0)" [(set:SI (match_dup 0) (match_dup 2)) (parallel [(set:SI (match_dup 0) (ashift:SI (match_dup 0) (const_int 24))) --- 301,307 ---- ;; and space by loading the byte value and shifting it into place. (define_split [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "const_int_operand" ""))] "(INTVAL (operands[1]) < 0) && ((INTVAL (operands[1]) & 0x00ffffff) == 0)" [(set:SI (match_dup 0) (match_dup 2)) (parallel [(set:SI (match_dup 0) (ashift:SI (match_dup 0) (const_int 24))) *************** *** 318,324 **** ;; and shifting it into place. (define_split [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "immediate_operand" ""))] "(INTVAL (operands[1]) > 0x00ffffff) && ((INTVAL (operands[1]) >> exact_log2 (INTVAL (operands[1]) & (- INTVAL (operands[1])))) < 0x100)" [(set:SI (match_dup 0) (match_dup 2)) --- 318,324 ---- ;; and shifting it into place. (define_split [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "const_int_operand" ""))] "(INTVAL (operands[1]) > 0x00ffffff) && ((INTVAL (operands[1]) >> exact_log2 (INTVAL (operands[1]) & (- INTVAL (operands[1])))) < 0x100)" [(set:SI (match_dup 0) (match_dup 2)) *************** *** 521,527 **** ;;{{{ Floating Point Moves ;; Note - Patterns for SF mode moves are compulsory, but ! ;; patterns for DF are optional, as GCC can synthesise them. (define_expand "movsf" [(set (match_operand:SF 0 "general_operand" "") --- 521,527 ---- ;;{{{ Floating Point Moves ;; Note - Patterns for SF mode moves are compulsory, but ! ;; patterns for DF are optional, as GCC can synthesize them. (define_expand "movsf" [(set (match_operand:SF 0 "general_operand" "") *************** *** 571,584 **** const char * ldi_instr; const char * tmp_reg; static char buffer[100]; - REAL_VALUE_TYPE d; ! REAL_VALUE_FROM_CONST_DOUBLE (d, operands[1]); ! ! if (REAL_VALUES_EQUAL (d, dconst0)) ! ldi_instr = \"ldi:8\"; ! else ! ldi_instr = \"ldi:32\"; tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER]; --- 571,579 ---- const char * ldi_instr; const char * tmp_reg; static char buffer[100]; ! ldi_instr = fr30_const_double_is_zero (operands[1]) ! ? ldi_instr = \"ldi:8\" : \"ldi:32\"; tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER]; *************** *** 676,682 **** ) ;; Do not allow an eliminable register in the source register. It ! ;; might be eliminated in favour of the stack pointer, probably ;; increasing the offset, and so rendering the instruction illegal. (define_insn "addsi_small_int" [(set (match_operand:SI 0 "register_operand" "=r,r") --- 671,677 ---- ) ;; Do not allow an eliminable register in the source register. It ! ;; might be eliminated in favor of the stack pointer, probably ;; increasing the offset, and so rendering the instruction illegal. (define_insn "addsi_small_int" [(set (match_operand:SI 0 "register_operand" "=r,r") *************** *** 1437,1442 **** --- 1432,1438 ---- "" [(set_attr "length" "0")] ) + ;;}}} ;; Local Variables: ;; mode: md diff -Nrc3pad gcc-3.2.3/gcc/config/fr30/fr30-protos.h gcc-3.3/gcc/config/fr30/fr30-protos.h *** gcc-3.2.3/gcc/config/fr30/fr30-protos.h 2000-05-12 20:57:57.000000000 +0000 --- gcc-3.3/gcc/config/fr30/fr30-protos.h 2002-11-21 16:36:52.000000000 +0000 *************** *** 1,5 **** /* Prototypes for fr30.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Prototypes for fr30.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** extern int low_register_operand *** 39,44 **** --- 39,45 ---- extern int call_operand PARAMS ((rtx, Mmode)); extern int di_operand PARAMS ((rtx, Mmode)); extern int nonimmediate_di_operand PARAMS ((rtx, Mmode)); + extern int fr30_const_double_is_zero PARAMS ((rtx)); #undef Mmode #endif /* HAVE_MACHINE_MODES */ #endif /* RTX_CODE */ diff -Nrc3pad gcc-3.2.3/gcc/config/freebsd.h gcc-3.3/gcc/config/freebsd.h *** gcc-3.2.3/gcc/config/freebsd.h 2002-04-23 16:43:44.000000000 +0000 --- gcc-3.3/gcc/config/freebsd.h 2003-03-12 02:38:01.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 42,48 **** #define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR)) #undef CPP_PREDEFINES ! #define CPP_PREDEFINES FBSD_CPP_PREDEFINES #undef CPP_SPEC #define CPP_SPEC FBSD_CPP_SPEC --- 42,51 ---- #define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR)) #undef CPP_PREDEFINES ! /* Obsolete, do not define it. */ ! ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS() #undef CPP_SPEC #define CPP_SPEC FBSD_CPP_SPEC *************** Boston, MA 02111-1307, USA. */ *** 67,83 **** #undef NO_IMPLICIT_EXTERN_C #define NO_IMPLICIT_EXTERN_C 1 - /* Allow #sccs in preprocessor. */ - #undef SCCS_DIRECTIVE - #define SCCS_DIRECTIVE 1 - /* Make gcc agree with FreeBSD's standard headers (, etc...) */ #undef WCHAR_TYPE ! #define WCHAR_TYPE "int" ! ! #undef WCHAR_UNSIGNED ! #define WCHAR_UNSIGNED 0 #define MATH_LIBRARY_PROFILE "-lm_p" --- 70,79 ---- #undef NO_IMPLICIT_EXTERN_C #define NO_IMPLICIT_EXTERN_C 1 /* Make gcc agree with FreeBSD's standard headers (, etc...) */ #undef WCHAR_TYPE ! #define WCHAR_TYPE "int" #define MATH_LIBRARY_PROFILE "-lm_p" *************** Boston, MA 02111-1307, USA. */ *** 91,94 **** /* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW. This enables the test coverage code to use file locking when exiting a program, which avoids race conditions if the program has forked. */ ! #define TARGET_HAS_F_SETLKW 1 --- 87,90 ---- /* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW. This enables the test coverage code to use file locking when exiting a program, which avoids race conditions if the program has forked. */ ! #define TARGET_HAS_F_SETLKW diff -Nrc3pad gcc-3.2.3/gcc/config/freebsd-spec.h gcc-3.3/gcc/config/freebsd-spec.h *** gcc-3.2.3/gcc/config/freebsd-spec.h 2001-11-21 02:06:45.000000000 +0000 --- gcc-3.3/gcc/config/freebsd-spec.h 2003-03-12 02:38:01.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 48,77 **** || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) ! #if FBSD_MAJOR == 6 ! #define FBSD_CPP_PREDEFINES \ ! "-D__FreeBSD__=6 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" ! #endif ! ! #if FBSD_MAJOR == 5 ! #define FBSD_CPP_PREDEFINES \ ! "-D__FreeBSD__=5 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" ! #endif ! ! #if FBSD_MAJOR == 4 ! #define FBSD_CPP_PREDEFINES \ ! "-D__FreeBSD__=4 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" ! #endif ! ! #if FBSD_MAJOR == 3 ! #define FBSD_CPP_PREDEFINES \ ! "-D__FreeBSD__=3 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" ! #endif ! #ifndef FBSD_CPP_PREDEFINES ! #define FBSD_CPP_PREDEFINES \ ! "-D__FreeBSD__ -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" ! #endif /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC option `-posix', and PIC issues. */ --- 48,78 ---- || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) ! #define FBSD_TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! if (FBSD_MAJOR == 6) \ ! builtin_define ("__FreeBSD__=6"); \ ! else if (FBSD_MAJOR == 5) \ ! builtin_define ("__FreeBSD__=5"); \ ! else if (FBSD_MAJOR == 4) \ ! builtin_define ("__FreeBSD__=4"); \ ! else if (FBSD_MAJOR == 3) \ ! builtin_define ("__FreeBSD__=3"); \ ! else \ ! builtin_define ("__FreeBSD__"); \ ! builtin_define_std ("unix"); \ ! builtin_define ("__ELF__"); \ ! builtin_define ("__KPRINTF_ATTRIBUTE__"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=bsd"); \ ! builtin_assert ("system=FreeBSD"); \ ! FBSD_TARGET_CPU_CPP_BUILTINS(); \ ! } \ ! while (0) ! /* Define the default FreeBSD-specific per-CPU hook code. */ ! #define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC option `-posix', and PIC issues. */ *************** Boston, MA 02111-1307, USA. */ *** 84,90 **** /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add the magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static object constructed ! before entering `main'. */ #define FBSD_STARTFILE_SPEC \ "%{!shared: \ --- 85,91 ---- /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add the magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static object constructed ! before entering `main'. */ #define FBSD_STARTFILE_SPEC \ "%{!shared: \ diff -Nrc3pad gcc-3.2.3/gcc/config/frv/cmovd.c gcc-3.3/gcc/config/frv/cmovd.c *** gcc-3.2.3/gcc/config/frv/cmovd.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/cmovd.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,47 ---- + /* Move double-word library function. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software ; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation * either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY ; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + void + __cmovd (long long *dest, const long long *src, unsigned len) + { + unsigned i; + unsigned num = len >> 3; + unsigned xlen = len & ~7; + char *dest_byte = (char *)dest; + const char *src_byte = (const char *)src; + + if (dest_byte < src_byte || dest_byte > src_byte+len) + { + for (i = 0; i < num; i++) + dest[i] = src[i]; + + while (len > xlen) + { + dest_byte[xlen] = src_byte[xlen]; + xlen++; + } + } + else + { + while (len-- > 0) + dest_byte[len] = src_byte[len]; + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/cmovh.c gcc-3.3/gcc/config/frv/cmovh.c *** gcc-3.2.3/gcc/config/frv/cmovh.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/cmovh.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,43 ---- + /* Move half-word library function. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software ; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation * either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY ; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + void + __cmovh (short *dest, const short *src, unsigned len) + { + unsigned i; + unsigned num = len >> 1; + char *dest_byte = (char *)dest; + const char *src_byte = (const char *)src; + + if (dest_byte < src_byte || dest_byte > src_byte+len) + { + for (i = 0; i < num; i++) + dest[i] = src[i]; + + if ((len & 1) != 0) + dest_byte[len-1] = src_byte[len-1]; + } + else + { + while (len-- > 0) + dest_byte[len] = src_byte[len]; + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/cmovw.c gcc-3.3/gcc/config/frv/cmovw.c *** gcc-3.2.3/gcc/config/frv/cmovw.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/cmovw.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,47 ---- + /* Move word library function. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software ; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation * either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY ; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + void + __cmovw (int *dest, const int *src, unsigned len) + { + unsigned i; + unsigned num = len >> 2; + unsigned xlen = len & ~3; + char *dest_byte = (char *)dest; + const char *src_byte = (const char *)src; + + if (dest_byte < src_byte || dest_byte > src_byte+len) + { + for (i = 0; i < num; i++) + dest[i] = src[i]; + + while (len > xlen) + { + dest_byte[xlen] = src_byte[xlen]; + xlen++; + } + } + else + { + while (len-- > 0) + dest_byte[len] = src_byte[len]; + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frv-abi.h gcc-3.3/gcc/config/frv/frv-abi.h *** gcc-3.2.3/gcc/config/frv/frv-abi.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frv-abi.h 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,181 ---- + /* Frv map GCC names to FR-V ABI. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* For each of the functions in the library that has a corresponding name in + the ABI, add an equivalence between the GCC name and the ABI name. This is + in a separate file from frv.h so that fp-bit.c can be made to include it. */ + + #ifdef __GNUC__ + #ifdef __FRV_UNDERSCORE__ + #define RENAME_LIBRARY(OLD,NEW) \ + __asm__ (".globl\t_" #NEW "\n" \ + "_" #NEW "=_" #OLD "\n" \ + "\t.type\t_" #NEW ",@function\n"); + + #else + #define RENAME_LIBRARY(OLD,NEW) \ + __asm__ (".globl\t" #NEW "\n" \ + #NEW "=" #OLD "\n" \ + "\t.type\t" #NEW ",@function\n"); + #endif + + #define CREATE_DOUBLE_SHIFT(OLD,NEW) \ + __asm__ (".text\n" \ + "\t.globl\t" #NEW "\n" \ + "\t.type\t" #NEW ",@function\n" \ + #NEW ":\n" \ + "\tor\tgr11, gr0, gr10\n" \ + "\tbra\t" #OLD "\n"); + + #ifdef L_sf_to_df + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__extendsfdf2,__ftod) + #endif + + #ifdef L_sf_to_si + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfsi,__ftoi) + #endif + + #ifdef L_sf_to_usi + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui) + #endif + + #ifdef L_df_to_si + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfsi,__dtoi) + #endif + + #ifdef L_fixunssfsi + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui) + #endif + + #ifdef L_fixunsdfsi + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfsi,__dtoui) + #endif + + #ifdef L_fixsfdi + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfdi,__ftoll) + #endif + + #ifdef L_fixdfdi + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfdi,__dtoll) + #endif + + #ifdef L_fixunssfdi + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfdi,__ftoull) + #endif + + #ifdef L_fixunsdfdi + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfdi,__dtoull) + #endif + + #ifdef L_si_to_sf + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsisf,__itof) + #endif + + #ifdef L_di_to_sf + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof) + #endif + + #ifdef L_df_to_sf + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__truncdfsf2,__dtof) + #endif + + #ifdef L_si_to_df + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsidf,__itod) + #endif + + #ifdef L_floatdisf + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof) + #endif + + #ifdef L_floatdidf + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdidf,__lltod) + #endif + + #ifdef L_addsub_df + #define DECLARE_LIBRARY_RENAMES \ + RENAME_LIBRARY(__adddf3,__addd) + RENAME_LIBRARY(__subdf3,__subd) + #endif + + #ifdef L_mul_df + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__muldf3,__muld) + #endif + + #ifdef L_div_df + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdf3,__divd) + #endif + + #ifdef L_addsub_sf + #define DECLARE_LIBRARY_RENAMES \ + RENAME_LIBRARY(__addsf3,__addf) \ + RENAME_LIBRARY(__subsf3,__subf) + #endif + + #ifdef L_mul_sf + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__mulsf3,__mulf) + #endif + + #ifdef L_div_sf + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divsf3,__divf) + #endif + + #ifdef L_ashldi3 + #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashldi3,__sllll) + #endif + + #ifdef L_lshrdi3 + #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__lshrdi3,__srlll) + #endif + + #ifdef L_ashrdi3 + #define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashrdi3,__srall) + #endif + + #ifdef L_adddi3 + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__adddi3,__addll) + #endif + + #ifdef L_subdi3 + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__subdi3,__subll) + #endif + + #ifdef L_muldi3 + #define DECLARE_LIBRARY_RENAMES \ + RENAME_LIBRARY(__muldi3,__mulll) + RENAME_LIBRARY(__muldi3,__umulll) + #endif + + #ifdef L_divdi3 + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdi3,__divll) + #endif + + #ifdef L_udivdi3 + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__udivdi3,__udivll) + #endif + + #ifdef L_moddi3 + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__moddi3,__modll) + #endif + + #ifdef L_umoddi3 + #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__umoddi3,__umodll) + #endif + #endif /* __GNUC__ */ diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frv-asm.h gcc-3.3/gcc/config/frv/frv-asm.h *** gcc-3.2.3/gcc/config/frv/frv-asm.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frv-asm.h 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,49 ---- + /* Assembler Support. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software ; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation * either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY ; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* P(INSN): Emit INSN.P for VLIW machines, otherwise emit plain INSN. + P2(INSN): Emit INSN.P on the FR500 and above, otherwise emit plain INSN. */ + #ifdef __FRV_VLIW__ + #ifdef __STDC__ + #define P(A) A##.p + #else + #define P(A) A/**/.p + #endif + #if __FRV_VLIW__ > 2 + #define P2(A) P(A) + #else + #define P2(A) A + #endif + #else + #define P(A) A + #define P2(A) A + #endif + + /* Add underscore if necessary to external name. */ + #ifdef __FRV_UNDERSCORE__ + #ifdef __STDC__ + #define EXT(NAME) _##NAME + #else + #define EXT(NAME) _/**/NAME + #endif + #else + #define EXT(NAME) NAME + #endif diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frvbegin.c gcc-3.3/gcc/config/frv/frvbegin.c *** gcc-3.2.3/gcc/config/frv/frvbegin.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frvbegin.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,150 ---- + /* Frv initialization file linked before all user modules + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software ; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation * either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY ; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + This file was originally taken from the file crtstuff.c in the + main compiler directory, and simplified. */ + + #include "defaults.h" + #include + #include "unwind-dw2-fde.h" + #include "gbl-ctors.h" + + /* Declare a pointer to void function type. */ + #define STATIC static + + #ifdef __FRV_UNDERSCORE__ + #define UNDERSCORE "_" + #else + #define UNDERSCORE "" + #endif + + #define INIT_SECTION_NEG_ONE(SECTION, FLAGS, NAME) \ + __asm__ (".section " SECTION "," FLAGS "\n\t" \ + ".globl " UNDERSCORE NAME "\n\t" \ + ".type " UNDERSCORE NAME ",@object\n\t" \ + ".p2align 2\n" \ + UNDERSCORE NAME ":\n\t" \ + ".word -1\n\t" \ + ".previous") + + #define INIT_SECTION(SECTION, FLAGS, NAME) \ + __asm__ (".section " SECTION "," FLAGS "\n\t" \ + ".globl " UNDERSCORE NAME "\n\t" \ + ".type " UNDERSCORE NAME ",@object\n\t" \ + ".p2align 2\n" \ + UNDERSCORE NAME ":\n\t" \ + ".previous") + + /* Beginning of .ctor/.dtor sections that provides a list of constructors and + destructors to run. */ + + INIT_SECTION_NEG_ONE (".ctors", "\"aw\"", "__CTOR_LIST__"); + INIT_SECTION_NEG_ONE (".dtors", "\"aw\"", "__DTOR_LIST__"); + + /* Beginning of .eh_frame section that provides all of the exception handling + tables. */ + + INIT_SECTION (".eh_frame", "\"aw\"", "__EH_FRAME_BEGIN__"); + + /* Beginning of .rofixup section that provides a list of pointers that we + need to adjust. */ + + INIT_SECTION (".rofixup", "\"a\"", "__ROFIXUP_LIST__"); + + extern void __frv_register_eh(void) __attribute__((__constructor__)); + extern void __frv_deregister_eh(void) __attribute__((__destructor__)); + + extern func_ptr __EH_FRAME_BEGIN__[]; + + /* Register the exeception handling table as the first constructor */ + void + __frv_register_eh (void) + { + static struct object object; + if (__register_frame_info) + __register_frame_info (__EH_FRAME_BEGIN__, &object); + } + + /* Note, do not declare __{,de}register_frame_info weak as it seems + to interfere with the pic support. */ + + /* Unregister the exeception handling table as a deconstructor */ + void + __frv_deregister_eh (void) + { + static int completed = 0; + + if (completed) + return; + + if (__deregister_frame_info) + __deregister_frame_info (__EH_FRAME_BEGIN__); + + completed = 1; + } + + /* Run the global destructors */ + void + __do_global_dtors () + { + static func_ptr *p = __DTOR_LIST__ + 1; + while (*p) + { + p++; + (*(p-1)) (); + } + } + + /* Run the global constructors */ + void + __do_global_ctors () + { + unsigned long nptrs = (unsigned long) __CTOR_LIST__[0]; + unsigned i; + + if (nptrs == (unsigned long)-1) + for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++); + + for (i = nptrs; i >= 1; i--) + __CTOR_LIST__[i] (); + + atexit (__do_global_dtors); + } + + /* Subroutine called automatically by `main'. + Compiling a global function named `main' + produces an automatic call to this function at the beginning. + + For many systems, this routine calls __do_global_ctors. + For systems which support a .init section we use the .init section + to run __do_global_ctors, so we need not do anything here. */ + + void + __main () + { + /* Support recursive calls to `main': run initializers just once. */ + static int initialized; + if (! initialized) + { + initialized = 1; + __do_global_ctors (); + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frv.c gcc-3.3/gcc/config/frv/frv.c *** gcc-3.2.3/gcc/config/frv/frv.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frv.c 2002-10-22 23:05:15.000000000 +0000 *************** *** 0 **** --- 1,9788 ---- + /* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "rtl.h" + #include "tree.h" + #include "regs.h" + #include "hard-reg-set.h" + #include "real.h" + #include "insn-config.h" + #include "conditions.h" + #include "insn-flags.h" + #include "output.h" + #include "insn-attr.h" + #include "flags.h" + #include "recog.h" + #include "reload.h" + #include "expr.h" + #include "obstack.h" + #include "except.h" + #include "function.h" + #include "optabs.h" + #include "toplev.h" + #include "basic-block.h" + #include "tm_p.h" + #include "ggc.h" + #include + #include "target.h" + #include "target-def.h" + + #ifndef FRV_INLINE + #define FRV_INLINE inline + #endif + + /* Temporary register allocation support structure. */ + typedef struct frv_tmp_reg_struct + { + HARD_REG_SET regs; /* possible registers to allocate */ + int next_reg[N_REG_CLASSES]; /* next register to allocate per class */ + } + frv_tmp_reg_t; + + /* Register state information for VLIW re-packing phase. These values must fit + within an unsigned char. */ + #define REGSTATE_DEAD 0x00 /* register is currently dead */ + #define REGSTATE_CC_MASK 0x07 /* Mask to isolate CCn for cond exec */ + #define REGSTATE_LIVE 0x08 /* register is live */ + #define REGSTATE_MODIFIED 0x10 /* reg modified in current VLIW insn */ + #define REGSTATE_IF_TRUE 0x20 /* reg modified in cond exec true */ + #define REGSTATE_IF_FALSE 0x40 /* reg modified in cond exec false */ + #define REGSTATE_UNUSED 0x80 /* bit for hire */ + #define REGSTATE_MASK 0xff /* mask for the bits to set */ + + /* conditional expression used */ + #define REGSTATE_IF_EITHER (REGSTATE_IF_TRUE | REGSTATE_IF_FALSE) + + /* the following is not sure in the reg_state bytes, so can have a larger value + than 0xff. */ + #define REGSTATE_CONDJUMP 0x100 /* conditional jump done in VLIW insn */ + + /* Used in frv_frame_accessor_t to indicate the direction of a register-to- + memory move. */ + enum frv_stack_op + { + FRV_LOAD, + FRV_STORE + }; + + /* Information required by frv_frame_access. */ + typedef struct + { + /* This field is FRV_LOAD if registers are to be loaded from the stack and + FRV_STORE if they should be stored onto the stack. FRV_STORE implies + the move is being done by the prologue code while FRV_LOAD implies it + is being done by the epilogue. */ + enum frv_stack_op op; + + /* The base register to use when accessing the stack. This may be the + frame pointer, stack pointer, or a temporary. The choice of register + depends on which part of the frame is being accessed and how big the + frame is. */ + rtx base; + + /* The offset of BASE from the bottom of the current frame, in bytes. */ + int base_offset; + } frv_frame_accessor_t; + + /* Define the information needed to generate branch and scc insns. This is + stored from the compare operation. */ + rtx frv_compare_op0; + rtx frv_compare_op1; + + /* Conditional execution support gathered together in one structure */ + typedef struct + { + /* Linked list of insns to add if the conditional execution conversion was + successful. Each link points to an EXPR_LIST which points to the pattern + of the insn to add, and the insn to be inserted before. */ + rtx added_insns_list; + + /* Identify which registers are safe to allocate for if conversions to + conditional execution. We keep the last allocated register in the + register classes between COND_EXEC statements. This will mean we allocate + different registers for each different COND_EXEC group if we can. This + might allow the scheduler to intermix two different COND_EXEC sections. */ + frv_tmp_reg_t tmp_reg; + + /* For nested IFs, identify which CC registers are used outside of setting + via a compare isnsn, and using via a check insn. This will allow us to + know if we can rewrite the register to use a different register that will + be paired with the CR register controlling the nested IF-THEN blocks. */ + HARD_REG_SET nested_cc_ok_rewrite; + + /* Temporary registers allocated to hold constants during conditional + execution. */ + rtx scratch_regs[FIRST_PSEUDO_REGISTER]; + + /* Current number of temp registers available. */ + int cur_scratch_regs; + + /* Number of nested conditional execution blocks */ + int num_nested_cond_exec; + + /* Map of insns that set up constants in scratch registers. */ + bitmap scratch_insns_bitmap; + + /* Conditional execution test register (CC0..CC7) */ + rtx cr_reg; + + /* Conditional execution compare register that is paired with cr_reg, so that + nested compares can be done. The csubcc and caddcc instructions don't + have enough bits to specify both a CC register to be set and a CR register + to do the test on, so the same bit number is used for both. Needless to + say, this is rather inconvient for GCC. */ + rtx nested_cc_reg; + + /* Extra CR registers used for &&, ||. */ + rtx extra_int_cr; + rtx extra_fp_cr; + + /* Previous CR used in nested if, to make sure we are dealing with the same + nested if as the previous statement. */ + rtx last_nested_if_cr; + } + frv_ifcvt_t; + + static /* GTY(()) */ frv_ifcvt_t frv_ifcvt; + + /* Map register number to smallest register class. */ + enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER]; + + /* Map class letter into register class */ + enum reg_class reg_class_from_letter[256]; + + /* Cached value of frv_stack_info */ + static frv_stack_t *frv_stack_cache = (frv_stack_t *)0; + + /* -mbranch-cost= support */ + const char *frv_branch_cost_string; + int frv_branch_cost_int = DEFAULT_BRANCH_COST; + + /* -mcpu= support */ + const char *frv_cpu_string; /* -mcpu= option */ + frv_cpu_t frv_cpu_type = CPU_TYPE; /* value of -mcpu= */ + + /* -mcond-exec-insns= support */ + const char *frv_condexec_insns_str; /* -mcond-exec-insns= option */ + int frv_condexec_insns = DEFAULT_CONDEXEC_INSNS; /* value of -mcond-exec-insns*/ + + /* -mcond-exec-temps= support */ + const char *frv_condexec_temps_str; /* -mcond-exec-temps= option */ + int frv_condexec_temps = DEFAULT_CONDEXEC_TEMPS; /* value of -mcond-exec-temps*/ + + /* -msched-lookahead=n */ + const char *frv_sched_lookahead_str; /* -msched-lookahead=n */ + int frv_sched_lookahead = 4; /* -msched-lookahead=n */ + + /* Forward references */ + static int frv_default_flags_for_cpu PARAMS ((void)); + static int frv_string_begins_with PARAMS ((tree, const char *)); + static FRV_INLINE int symbol_ref_small_data_p PARAMS ((rtx)); + static FRV_INLINE int const_small_data_p PARAMS ((rtx)); + static FRV_INLINE int plus_small_data_p PARAMS ((rtx, rtx)); + static void frv_print_operand_memory_reference_reg + PARAMS ((FILE *, rtx)); + static void frv_print_operand_memory_reference PARAMS ((FILE *, rtx, int)); + static int frv_print_operand_jump_hint PARAMS ((rtx)); + static FRV_INLINE int frv_regno_ok_for_base_p PARAMS ((int, int)); + static rtx single_set_pattern PARAMS ((rtx)); + static int frv_function_contains_far_jump PARAMS ((void)); + static rtx frv_alloc_temp_reg PARAMS ((frv_tmp_reg_t *, + enum reg_class, + enum machine_mode, + int, int)); + static rtx frv_frame_offset_rtx PARAMS ((int)); + static rtx frv_frame_mem PARAMS ((enum machine_mode, + rtx, int)); + static rtx frv_dwarf_store PARAMS ((rtx, int)); + static void frv_frame_insn PARAMS ((rtx, rtx)); + static void frv_frame_access PARAMS ((frv_frame_accessor_t*, + rtx, int)); + static void frv_frame_access_multi PARAMS ((frv_frame_accessor_t*, + frv_stack_t *, int)); + static void frv_frame_access_standard_regs PARAMS ((enum frv_stack_op, + frv_stack_t *)); + static struct machine_function *frv_init_machine_status PARAMS ((void)); + static int frv_legitimate_memory_operand PARAMS ((rtx, + enum machine_mode, + int)); + static rtx frv_int_to_acc PARAMS ((enum insn_code, + int, rtx)); + static enum machine_mode frv_matching_accg_mode PARAMS ((enum machine_mode)); + static rtx frv_read_argument PARAMS ((tree *)); + static int frv_check_constant_argument PARAMS ((enum insn_code, + int, rtx)); + static rtx frv_legitimize_target PARAMS ((enum insn_code, rtx)); + static rtx frv_legitimize_argument PARAMS ((enum insn_code, + int, rtx)); + static rtx frv_expand_set_builtin PARAMS ((enum insn_code, + tree, rtx)); + static rtx frv_expand_unop_builtin PARAMS ((enum insn_code, + tree, rtx)); + static rtx frv_expand_binop_builtin PARAMS ((enum insn_code, + tree, rtx)); + static rtx frv_expand_cut_builtin PARAMS ((enum insn_code, + tree, rtx)); + static rtx frv_expand_binopimm_builtin PARAMS ((enum insn_code, + tree, rtx)); + static rtx frv_expand_voidbinop_builtin PARAMS ((enum insn_code, + tree)); + static rtx frv_expand_voidtriop_builtin PARAMS ((enum insn_code, + tree)); + static rtx frv_expand_voidaccop_builtin PARAMS ((enum insn_code, + tree)); + static rtx frv_expand_mclracc_builtin PARAMS ((tree)); + static rtx frv_expand_mrdacc_builtin PARAMS ((enum insn_code, + tree)); + static rtx frv_expand_mwtacc_builtin PARAMS ((enum insn_code, + tree)); + static rtx frv_expand_noargs_builtin PARAMS ((enum insn_code)); + static rtx frv_emit_comparison PARAMS ((enum rtx_code, rtx, + rtx)); + static int frv_clear_registers_used PARAMS ((rtx *, void *)); + static void frv_ifcvt_add_insn PARAMS ((rtx, rtx, int)); + static rtx frv_ifcvt_rewrite_mem PARAMS ((rtx, + enum machine_mode, + rtx)); + static rtx frv_ifcvt_load_value PARAMS ((rtx, rtx)); + static void frv_registers_update PARAMS ((rtx, unsigned char [], + int [], int *, int)); + static int frv_registers_used_p PARAMS ((rtx, unsigned char [], + int)); + static int frv_registers_set_p PARAMS ((rtx, unsigned char [], + int)); + static void frv_pack_insns PARAMS ((void)); + static void frv_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); + static void frv_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static bool frv_assemble_integer PARAMS ((rtx, unsigned, int)); + static const char * frv_strip_name_encoding PARAMS ((const char *)); + static void frv_encode_section_info PARAMS ((tree, int)); + static void frv_init_builtins PARAMS ((void)); + static rtx frv_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); + static bool frv_in_small_data_p PARAMS ((tree)); + static void frv_asm_output_mi_thunk + PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree)); + + /* Initialize the GCC target structure. */ + #undef TARGET_ASM_FUNCTION_PROLOGUE + #define TARGET_ASM_FUNCTION_PROLOGUE frv_function_prologue + #undef TARGET_ASM_FUNCTION_EPILOGUE + #define TARGET_ASM_FUNCTION_EPILOGUE frv_function_epilogue + #undef TARGET_ASM_INTEGER + #define TARGET_ASM_INTEGER frv_assemble_integer + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING frv_strip_name_encoding + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO frv_encode_section_info + #undef TARGET_INIT_BUILTINS + #define TARGET_INIT_BUILTINS frv_init_builtins + #undef TARGET_EXPAND_BUILTIN + #define TARGET_EXPAND_BUILTIN frv_expand_builtin + #undef TARGET_IN_SMALL_DATA_P + #define TARGET_IN_SMALL_DATA_P frv_in_small_data_p + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK frv_asm_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + + struct gcc_target targetm = TARGET_INITIALIZER; + + /* Given a SYMBOL_REF, return true if it points to small data. */ + + static FRV_INLINE int + symbol_ref_small_data_p (x) + rtx x; + { + return SDATA_NAME_P (XSTR (x, 0)); + } + + /* Given a CONST, return true if the symbol_ref points to small data. */ + + static FRV_INLINE int + const_small_data_p (x) + rtx x; + { + rtx x0, x1; + + if (GET_CODE (XEXP (x, 0)) != PLUS) + return FALSE; + + x0 = XEXP (XEXP (x, 0), 0); + if (GET_CODE (x0) != SYMBOL_REF || !SDATA_NAME_P (XSTR (x0, 0))) + return FALSE; + + x1 = XEXP (XEXP (x, 0), 1); + if (GET_CODE (x1) != CONST_INT + || !IN_RANGE_P (INTVAL (x1), -2048, 2047)) + return FALSE; + + return TRUE; + } + + /* Given a PLUS, return true if this is a small data reference. */ + + static FRV_INLINE int + plus_small_data_p (op0, op1) + rtx op0; + rtx op1; + { + if (GET_MODE (op0) == SImode + && GET_CODE (op0) == REG + && REGNO (op0) == SDA_BASE_REG) + { + if (GET_CODE (op1) == SYMBOL_REF) + return symbol_ref_small_data_p (op1); + + if (GET_CODE (op1) == CONST) + return const_small_data_p (op1); + } + + return FALSE; + } + + + static int + frv_default_flags_for_cpu () + { + switch (frv_cpu_type) + { + case FRV_CPU_GENERIC: + return MASK_DEFAULT_FRV; + + case FRV_CPU_FR500: + case FRV_CPU_TOMCAT: + return MASK_DEFAULT_FR500; + + case FRV_CPU_FR400: + return MASK_DEFAULT_FR400; + + case FRV_CPU_FR300: + case FRV_CPU_SIMPLE: + return MASK_DEFAULT_SIMPLE; + } + abort (); + } + + /* Sometimes certain combinations of command options do not make + sense on a particular target machine. You can define a macro + `OVERRIDE_OPTIONS' to take account of this. This macro, if + defined, is executed once just after all the command options have + been parsed. + + Don't use this macro to turn on various extra optimizations for + `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ + + void + frv_override_options () + { + int regno, i; + + /* Set the cpu type */ + if (frv_cpu_string) + { + if (strcmp (frv_cpu_string, "simple") == 0) + frv_cpu_type = FRV_CPU_SIMPLE; + + else if (strcmp (frv_cpu_string, "tomcat") == 0) + frv_cpu_type = FRV_CPU_TOMCAT; + + else if (strncmp (frv_cpu_string, "fr", sizeof ("fr")-1) != 0) + error ("Unknown cpu: -mcpu=%s", frv_cpu_string); + + else + { + const char *p = frv_cpu_string + sizeof ("fr") - 1; + if (strcmp (p, "500") == 0) + frv_cpu_type = FRV_CPU_FR500; + + else if (strcmp (p, "400") == 0) + frv_cpu_type = FRV_CPU_FR400; + + else if (strcmp (p, "300") == 0) + frv_cpu_type = FRV_CPU_FR300; + + else if (strcmp (p, "v") == 0) + frv_cpu_type = FRV_CPU_GENERIC; + + else + error ("Unknown cpu: -mcpu=%s", frv_cpu_string); + } + } + + target_flags |= (frv_default_flags_for_cpu () & ~target_flags_explicit); + + /* -mlibrary-pic sets -fPIC and -G0 and also suppresses warnings from the + linker about linking pic and non-pic code. */ + if (TARGET_LIBPIC) + { + if (!flag_pic) /* -fPIC */ + flag_pic = 2; + + if (! g_switch_set) /* -G0 */ + { + g_switch_set = 1; + g_switch_value = 0; + } + } + + /* Both -fpic and -gdwarf want to use .previous and the assembler only keeps + one level. */ + if (write_symbols == DWARF_DEBUG && flag_pic) + error ("-fpic and -gdwarf are incompatible (-fpic and -g/-gdwarf-2 are fine)"); + + /* Change the branch cost value */ + if (frv_branch_cost_string) + frv_branch_cost_int = atoi (frv_branch_cost_string); + + /* Change the # of insns to be converted to conditional execution */ + if (frv_condexec_insns_str) + frv_condexec_insns = atoi (frv_condexec_insns_str); + + /* Change # of temporary registers used to hold integer constants */ + if (frv_condexec_temps_str) + frv_condexec_temps = atoi (frv_condexec_temps_str); + + /* Change scheduling look ahead. */ + if (frv_sched_lookahead_str) + frv_sched_lookahead = atoi (frv_sched_lookahead_str); + + /* A C expression whose value is a register class containing hard + register REGNO. In general there is more than one such class; + choose a class which is "minimal", meaning that no smaller class + also contains the register. */ + + for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) + { + enum reg_class class; + + if (GPR_P (regno)) + { + int gpr_reg = regno - GPR_FIRST; + if ((gpr_reg & 3) == 0) + class = QUAD_REGS; + + else if ((gpr_reg & 1) == 0) + class = EVEN_REGS; + + else + class = GPR_REGS; + } + + else if (FPR_P (regno)) + { + int fpr_reg = regno - GPR_FIRST; + if ((fpr_reg & 3) == 0) + class = QUAD_FPR_REGS; + + else if ((fpr_reg & 1) == 0) + class = FEVEN_REGS; + + else + class = FPR_REGS; + } + + else if (regno == LR_REGNO) + class = LR_REG; + + else if (regno == LCR_REGNO) + class = LCR_REG; + + else if (ICC_P (regno)) + class = ICC_REGS; + + else if (FCC_P (regno)) + class = FCC_REGS; + + else if (ICR_P (regno)) + class = ICR_REGS; + + else if (FCR_P (regno)) + class = FCR_REGS; + + else if (ACC_P (regno)) + { + int r = regno - ACC_FIRST; + if ((r & 3) == 0) + class = QUAD_ACC_REGS; + else if ((r & 1) == 0) + class = EVEN_ACC_REGS; + else + class = ACC_REGS; + } + + else if (ACCG_P (regno)) + class = ACCG_REGS; + + else + class = NO_REGS; + + regno_reg_class[regno] = class; + } + + /* Check for small data option */ + if (!g_switch_set) + g_switch_value = SDATA_DEFAULT_SIZE; + + /* A C expression which defines the machine-dependent operand + constraint letters for register classes. If CHAR is such a + letter, the value should be the register class corresponding to + it. Otherwise, the value should be `NO_REGS'. The register + letter `r', corresponding to class `GENERAL_REGS', will not be + passed to this macro; you do not need to handle it. + + The following letters are unavailable, due to being used as + constraints: + '0'..'9' + '<', '>' + 'E', 'F', 'G', 'H' + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P' + 'Q', 'R', 'S', 'T', 'U' + 'V', 'X' + 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */ + + for (i = 0; i < 256; i++) + reg_class_from_letter[i] = NO_REGS; + + reg_class_from_letter['a'] = ACC_REGS; + reg_class_from_letter['b'] = EVEN_ACC_REGS; + reg_class_from_letter['c'] = CC_REGS; + reg_class_from_letter['d'] = GPR_REGS; + reg_class_from_letter['e'] = EVEN_REGS; + reg_class_from_letter['f'] = FPR_REGS; + reg_class_from_letter['h'] = FEVEN_REGS; + reg_class_from_letter['l'] = LR_REG; + reg_class_from_letter['q'] = QUAD_REGS; + reg_class_from_letter['t'] = ICC_REGS; + reg_class_from_letter['u'] = FCC_REGS; + reg_class_from_letter['v'] = ICR_REGS; + reg_class_from_letter['w'] = FCR_REGS; + reg_class_from_letter['x'] = QUAD_FPR_REGS; + reg_class_from_letter['y'] = LCR_REG; + reg_class_from_letter['z'] = SPR_REGS; + reg_class_from_letter['A'] = QUAD_ACC_REGS; + reg_class_from_letter['B'] = ACCG_REGS; + reg_class_from_letter['C'] = CR_REGS; + + /* There is no single unaligned SI op for PIC code. Sometimes we + need to use ".4byte" and sometimes we need to use ".picptr". + See frv_assemble_integer for details. */ + if (flag_pic) + targetm.asm_out.unaligned_op.si = 0; + + init_machine_status = frv_init_machine_status; + } + + + /* Some machines may desire to change what optimizations are performed for + various optimization levels. This macro, if defined, is executed once just + after the optimization level is determined and before the remainder of the + command options have been parsed. Values set in this macro are used as the + default values for the other command line options. + + LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if + `-O' is specified, and 0 if neither is specified. + + SIZE is nonzero if `-Os' is specified, 0 otherwise. + + You should not use this macro to change options that are not + machine-specific. These should uniformly selected by the same optimization + level on all supported machines. Use this macro to enable machbine-specific + optimizations. + + *Do not examine `write_symbols' in this macro!* The debugging options are + *not supposed to alter the generated code. */ + + /* On the FRV, possibly disable VLIW packing which is done by the 2nd + scheduling pass at the current time. */ + void + frv_optimization_options (level, size) + int level; + int size ATTRIBUTE_UNUSED; + { + if (level >= 2) + { + #ifdef DISABLE_SCHED2 + flag_schedule_insns_after_reload = 0; + #endif + #ifdef ENABLE_RCSP + flag_rcsp = 1; + #endif + } + } + + + /* Return true if NAME (a STRING_CST node) begins with PREFIX. */ + + static int + frv_string_begins_with (name, prefix) + tree name; + const char *prefix; + { + int prefix_len = strlen (prefix); + + /* Remember: NAME's length includes the null terminator. */ + return (TREE_STRING_LENGTH (name) > prefix_len + && strncmp (TREE_STRING_POINTER (name), prefix, prefix_len) == 0); + } + + /* Encode section information of DECL, which is either a VAR_DECL, + FUNCTION_DECL, STRING_CST, CONSTRUCTOR, or ???. + + For the FRV we want to record: + + - whether the object lives in .sdata/.sbss. + objects living in .sdata/.sbss are prefixed with SDATA_FLAG_CHAR + + */ + + static void + frv_encode_section_info (decl, first) + tree decl; + int first; + { + if (! first) + return; + if (TREE_CODE (decl) == VAR_DECL) + { + int size = int_size_in_bytes (TREE_TYPE (decl)); + tree section_name = DECL_SECTION_NAME (decl); + int is_small = 0; + + /* Don't apply the -G flag to internal compiler structures. We + should leave such structures in the main data section, partly + for efficiency and partly because the size of some of them + (such as C++ typeinfos) is not known until later. */ + if (!DECL_ARTIFICIAL (decl) && size > 0 && size <= g_switch_value) + is_small = 1; + + /* If we already know which section the decl should be in, see if + it's a small data section. */ + if (section_name) + { + if (TREE_CODE (section_name) == STRING_CST) + { + if (frv_string_begins_with (section_name, ".sdata")) + is_small = 1; + if (frv_string_begins_with (section_name, ".sbss")) + is_small = 1; + } + else + abort (); + } + + if (is_small) + { + rtx sym_ref = XEXP (DECL_RTL (decl), 0); + char * str = xmalloc (2 + strlen (XSTR (sym_ref, 0))); + + str[0] = SDATA_FLAG_CHAR; + strcpy (&str[1], XSTR (sym_ref, 0)); + XSTR (sym_ref, 0) = str; + } + } + } + + + /* Zero or more C statements that may conditionally modify two variables + `fixed_regs' and `call_used_regs' (both of type `char []') after they have + been initialized from the two preceding macros. + + This is necessary in case the fixed or call-clobbered registers depend on + target flags. + + You need not define this macro if it has no work to do. + + If the usage of an entire class of registers depends on the target flags, + you may indicate this to GCC by using this macro to modify `fixed_regs' and + `call_used_regs' to 1 for each of the registers in the classes which should + not be used by GCC. Also define the macro `REG_CLASS_FROM_LETTER' to return + `NO_REGS' if it is called with a letter for a class that shouldn't be used. + + (However, if this class is not included in `GENERAL_REGS' and all of the + insn patterns whose constraints permit this class are controlled by target + switches, then GCC will automatically avoid using these registers when the + target switches are opposed to them.) */ + + void + frv_conditional_register_usage () + { + int i; + + for (i = GPR_FIRST + NUM_GPRS; i <= GPR_LAST; i++) + fixed_regs[i] = call_used_regs[i] = 1; + + for (i = FPR_FIRST + NUM_FPRS; i <= FPR_LAST; i++) + fixed_regs[i] = call_used_regs[i] = 1; + + for (i = ACC_FIRST + NUM_ACCS; i <= ACC_LAST; i++) + fixed_regs[i] = call_used_regs[i] = 1; + + for (i = ACCG_FIRST + NUM_ACCS; i <= ACCG_LAST; i++) + fixed_regs[i] = call_used_regs[i] = 1; + + /* Reserve the registers used for conditional execution. At present, we need + 1 ICC and 1 ICR register. */ + fixed_regs[ICC_TEMP] = call_used_regs[ICC_TEMP] = 1; + fixed_regs[ICR_TEMP] = call_used_regs[ICR_TEMP] = 1; + + if (TARGET_FIXED_CC) + { + fixed_regs[ICC_FIRST] = call_used_regs[ICC_FIRST] = 1; + fixed_regs[FCC_FIRST] = call_used_regs[FCC_FIRST] = 1; + fixed_regs[ICR_FIRST] = call_used_regs[ICR_FIRST] = 1; + fixed_regs[FCR_FIRST] = call_used_regs[FCR_FIRST] = 1; + } + + #if 0 + /* If -fpic, SDA_BASE_REG is the PIC register. */ + if (g_switch_value == 0 && !flag_pic) + fixed_regs[SDA_BASE_REG] = call_used_regs[SDA_BASE_REG] = 0; + + if (!flag_pic) + fixed_regs[PIC_REGNO] = call_used_regs[PIC_REGNO] = 0; + #endif + } + + + /* + * Compute the stack frame layout + * + * Register setup: + * +---------------+-----------------------+-----------------------+ + * |Register |type |caller-save/callee-save| + * +---------------+-----------------------+-----------------------+ + * |GR0 |Zero register | - | + * |GR1 |Stack pointer(SP) | - | + * |GR2 |Frame pointer(FP) | - | + * |GR3 |Hidden parameter | caller save | + * |GR4-GR7 | - | caller save | + * |GR8-GR13 |Argument register | caller save | + * |GR14-GR15 | - | caller save | + * |GR16-GR31 | - | callee save | + * |GR32-GR47 | - | caller save | + * |GR48-GR63 | - | callee save | + * |FR0-FR15 | - | caller save | + * |FR16-FR31 | - | callee save | + * |FR32-FR47 | - | caller save | + * |FR48-FR63 | - | callee save | + * +---------------+-----------------------+-----------------------+ + * + * Stack frame setup: + * Low + * SP-> |-----------------------------------| + * | Argument area | + * |-----------------------------------| + * | Register save area | + * |-----------------------------------| + * | Local variable save area | + * FP-> |-----------------------------------| + * | Old FP | + * |-----------------------------------| + * | Hidden parameter save area | + * |-----------------------------------| + * | Return address(LR) storage area | + * |-----------------------------------| + * | Padding for alignment | + * |-----------------------------------| + * | Register argument area | + * OLD SP-> |-----------------------------------| + * | Parameter area | + * |-----------------------------------| + * High + * + * Argument area/Parameter area: + * + * When a function is called, this area is used for argument transfer. When + * the argument is set up by the caller function, this area is referred to as + * the argument area. When the argument is referenced by the callee function, + * this area is referred to as the parameter area. The area is allocated when + * all arguments cannot be placed on the argument register at the time of + * argument transfer. + * + * Register save area: + * + * This is a register save area that must be guaranteed for the caller + * function. This area is not secured when the register save operation is not + * needed. + * + * Local variable save area: + * + * This is the area for local variables and temporary variables. + * + * Old FP: + * + * This area stores the FP value of the caller function. + * + * Hidden parameter save area: + * + * This area stores the start address of the return value storage + * area for a struct/union return function. + * When a struct/union is used as the return value, the caller + * function stores the return value storage area start address in + * register GR3 and passes it to the caller function. + * The callee function interprets the address stored in the GR3 + * as the return value storage area start address. + * When register GR3 needs to be saved into memory, the callee + * function saves it in the hidden parameter save area. This + * area is not secured when the save operation is not needed. + * + * Return address(LR) storage area: + * + * This area saves the LR. The LR stores the address of a return to the caller + * function for the purpose of function calling. + * + * Argument register area: + * + * This area saves the argument register. This area is not secured when the + * save operation is not needed. + * + * Argument: + * + * Arguments, the count of which equals the count of argument registers (6 + * words), are positioned in registers GR8 to GR13 and delivered to the callee + * function. When a struct/union return function is called, the return value + * area address is stored in register GR3. Arguments not placed in the + * argument registers will be stored in the stack argument area for transfer + * purposes. When an 8-byte type argument is to be delivered using registers, + * it is divided into two and placed in two registers for transfer. When + * argument registers must be saved to memory, the callee function secures an + * argument register save area in the stack. In this case, a continuous + * argument register save area must be established in the parameter area. The + * argument register save area must be allocated as needed to cover the size of + * the argument register to be saved. If the function has a variable count of + * arguments, it saves all argument registers in the argument register save + * area. + * + * Argument Extension Format: + * + * When an argument is to be stored in the stack, its type is converted to an + * extended type in accordance with the individual argument type. The argument + * is freed by the caller function after the return from the callee function is + * made. + * + * +-----------------------+---------------+------------------------+ + * | Argument Type |Extended Type |Stack Storage Size(byte)| + * +-----------------------+---------------+------------------------+ + * |char |int | 4 | + * |signed char |int | 4 | + * |unsigned char |int | 4 | + * |[signed] short int |int | 4 | + * |unsigned short int |int | 4 | + * |[signed] int |No extension | 4 | + * |unsigned int |No extension | 4 | + * |[signed] long int |No extension | 4 | + * |unsigned long int |No extension | 4 | + * |[signed] long long int |No extension | 8 | + * |unsigned long long int |No extension | 8 | + * |float |double | 8 | + * |double |No extension | 8 | + * |long double |No extension | 8 | + * |pointer |No extension | 4 | + * |struct/union |- | 4 (*1) | + * +-----------------------+---------------+------------------------+ + * + * When a struct/union is to be delivered as an argument, the caller copies it + * to the local variable area and delivers the address of that area. + * + * Return Value: + * + * +-------------------------------+----------------------+ + * |Return Value Type |Return Value Interface| + * +-------------------------------+----------------------+ + * |void |None | + * |[signed|unsigned] char |GR8 | + * |[signed|unsigned] short int |GR8 | + * |[signed|unsigned] int |GR8 | + * |[signed|unsigned] long int |GR8 | + * |pointer |GR8 | + * |[signed|unsigned] long long int|GR8 & GR9 | + * |float |GR8 | + * |double |GR8 & GR9 | + * |long double |GR8 & GR9 | + * |struct/union |(*1) | + * +-------------------------------+----------------------+ + * + * When a struct/union is used as the return value, the caller function stores + * the start address of the return value storage area into GR3 and then passes + * it to the callee function. The callee function interprets GR3 as the start + * address of the return value storage area. When this address needs to be + * saved in memory, the callee function secures the hidden parameter save area + * and saves the address in that area. + */ + + frv_stack_t * + frv_stack_info () + { + static frv_stack_t info, zero_info; + frv_stack_t *info_ptr = &info; + tree fndecl = current_function_decl; + int varargs_p = 0; + tree cur_arg; + tree next_arg; + int range; + int alignment; + int offset; + + /* If we've already calculated the values and reload is complete, just return now */ + if (frv_stack_cache) + return frv_stack_cache; + + /* Zero all fields */ + info = zero_info; + + /* Set up the register range information */ + info_ptr->regs[STACK_REGS_GPR].name = "gpr"; + info_ptr->regs[STACK_REGS_GPR].first = LAST_ARG_REGNUM + 1; + info_ptr->regs[STACK_REGS_GPR].last = GPR_LAST; + info_ptr->regs[STACK_REGS_GPR].dword_p = TRUE; + + info_ptr->regs[STACK_REGS_FPR].name = "fpr"; + info_ptr->regs[STACK_REGS_FPR].first = FPR_FIRST; + info_ptr->regs[STACK_REGS_FPR].last = FPR_LAST; + info_ptr->regs[STACK_REGS_FPR].dword_p = TRUE; + + info_ptr->regs[STACK_REGS_LR].name = "lr"; + info_ptr->regs[STACK_REGS_LR].first = LR_REGNO; + info_ptr->regs[STACK_REGS_LR].last = LR_REGNO; + info_ptr->regs[STACK_REGS_LR].special_p = 1; + + info_ptr->regs[STACK_REGS_CC].name = "cc"; + info_ptr->regs[STACK_REGS_CC].first = CC_FIRST; + info_ptr->regs[STACK_REGS_CC].last = CC_LAST; + info_ptr->regs[STACK_REGS_CC].field_p = TRUE; + + info_ptr->regs[STACK_REGS_LCR].name = "lcr"; + info_ptr->regs[STACK_REGS_LCR].first = LCR_REGNO; + info_ptr->regs[STACK_REGS_LCR].last = LCR_REGNO; + + info_ptr->regs[STACK_REGS_STDARG].name = "stdarg"; + info_ptr->regs[STACK_REGS_STDARG].first = FIRST_ARG_REGNUM; + info_ptr->regs[STACK_REGS_STDARG].last = LAST_ARG_REGNUM; + info_ptr->regs[STACK_REGS_STDARG].dword_p = 1; + info_ptr->regs[STACK_REGS_STDARG].special_p = 1; + + info_ptr->regs[STACK_REGS_STRUCT].name = "struct"; + info_ptr->regs[STACK_REGS_STRUCT].first = STRUCT_VALUE_REGNUM; + info_ptr->regs[STACK_REGS_STRUCT].last = STRUCT_VALUE_REGNUM; + info_ptr->regs[STACK_REGS_STRUCT].special_p = 1; + + info_ptr->regs[STACK_REGS_FP].name = "fp"; + info_ptr->regs[STACK_REGS_FP].first = FRAME_POINTER_REGNUM; + info_ptr->regs[STACK_REGS_FP].last = FRAME_POINTER_REGNUM; + info_ptr->regs[STACK_REGS_FP].special_p = 1; + + /* Determine if this is a stdarg function. If so, allocate space to store + the 6 arguments. */ + if (cfun->stdarg) + varargs_p = 1; + + else + { + /* Find the last argument, and see if it is __builtin_va_alist. */ + for (cur_arg = DECL_ARGUMENTS (fndecl); cur_arg != (tree)0; cur_arg = next_arg) + { + next_arg = TREE_CHAIN (cur_arg); + if (next_arg == (tree)0) + { + if (DECL_NAME (cur_arg) + && !strcmp (IDENTIFIER_POINTER (DECL_NAME (cur_arg)), "__builtin_va_alist")) + varargs_p = 1; + + break; + } + } + } + + /* Iterate over all of the register ranges */ + for (range = 0; range < STACK_REGS_MAX; range++) + { + frv_stack_regs_t *reg_ptr = &(info_ptr->regs[range]); + int first = reg_ptr->first; + int last = reg_ptr->last; + int size_1word = 0; + int size_2words = 0; + int regno; + + /* Calculate which registers need to be saved & save area size */ + switch (range) + { + default: + for (regno = first; regno <= last; regno++) + { + if ((regs_ever_live[regno] && !call_used_regs[regno]) + || (current_function_calls_eh_return + && (regno >= FIRST_EH_REGNUM && regno <= LAST_EH_REGNUM)) + || (flag_pic && cfun->uses_pic_offset_table && regno == PIC_REGNO)) + { + info_ptr->save_p[regno] = REG_SAVE_1WORD; + size_1word += UNITS_PER_WORD; + } + } + break; + + /* Calculate whether we need to create a frame after everything else + has been processed. */ + case STACK_REGS_FP: + break; + + case STACK_REGS_LR: + if (regs_ever_live[LR_REGNO] + || profile_flag + || frame_pointer_needed + || (flag_pic && cfun->uses_pic_offset_table)) + { + info_ptr->save_p[LR_REGNO] = REG_SAVE_1WORD; + size_1word += UNITS_PER_WORD; + } + break; + + case STACK_REGS_STDARG: + if (varargs_p) + { + /* If this is a stdarg function with an non varardic argument split + between registers and the stack, adjust the saved registers + downward */ + last -= (ADDR_ALIGN (cfun->pretend_args_size, UNITS_PER_WORD) + / UNITS_PER_WORD); + + for (regno = first; regno <= last; regno++) + { + info_ptr->save_p[regno] = REG_SAVE_1WORD; + size_1word += UNITS_PER_WORD; + } + + info_ptr->stdarg_size = size_1word; + } + break; + + case STACK_REGS_STRUCT: + if (cfun->returns_struct) + { + info_ptr->save_p[STRUCT_VALUE_REGNUM] = REG_SAVE_1WORD; + size_1word += UNITS_PER_WORD; + } + break; + } + + + if (size_1word) + { + /* If this is a field, it only takes one word */ + if (reg_ptr->field_p) + size_1word = UNITS_PER_WORD; + + /* Determine which register pairs can be saved together */ + else if (reg_ptr->dword_p && TARGET_DWORD) + { + for (regno = first; regno < last; regno += 2) + { + if (info_ptr->save_p[regno] && info_ptr->save_p[regno+1]) + { + size_2words += 2 * UNITS_PER_WORD; + size_1word -= 2 * UNITS_PER_WORD; + info_ptr->save_p[regno] = REG_SAVE_2WORDS; + info_ptr->save_p[regno+1] = REG_SAVE_NO_SAVE; + } + } + } + + reg_ptr->size_1word = size_1word; + reg_ptr->size_2words = size_2words; + + if (! reg_ptr->special_p) + { + info_ptr->regs_size_1word += size_1word; + info_ptr->regs_size_2words += size_2words; + } + } + } + + /* Set up the sizes of each each field in the frame body, making the sizes + of each be divisible by the size of a dword if dword operations might + be used, or the size of a word otherwise. */ + alignment = (TARGET_DWORD? 2 * UNITS_PER_WORD : UNITS_PER_WORD); + + info_ptr->parameter_size = ADDR_ALIGN (cfun->outgoing_args_size, alignment); + info_ptr->regs_size = ADDR_ALIGN (info_ptr->regs_size_2words + + info_ptr->regs_size_1word, + alignment); + info_ptr->vars_size = ADDR_ALIGN (get_frame_size (), alignment); + + info_ptr->pretend_size = cfun->pretend_args_size; + + /* Work out the size of the frame, excluding the header. Both the frame + body and register parameter area will be dword-aligned. */ + info_ptr->total_size + = (ADDR_ALIGN (info_ptr->parameter_size + + info_ptr->regs_size + + info_ptr->vars_size, + 2 * UNITS_PER_WORD) + + ADDR_ALIGN (info_ptr->pretend_size + + info_ptr->stdarg_size, + 2 * UNITS_PER_WORD)); + + /* See if we need to create a frame at all, if so add header area. */ + if (info_ptr->total_size > 0 + || info_ptr->regs[STACK_REGS_LR].size_1word > 0 + || info_ptr->regs[STACK_REGS_STRUCT].size_1word > 0) + { + offset = info_ptr->parameter_size; + info_ptr->header_size = 4 * UNITS_PER_WORD; + info_ptr->total_size += 4 * UNITS_PER_WORD; + + /* Calculate the offsets to save normal register pairs */ + for (range = 0; range < STACK_REGS_MAX; range++) + { + frv_stack_regs_t *reg_ptr = &(info_ptr->regs[range]); + if (! reg_ptr->special_p) + { + int first = reg_ptr->first; + int last = reg_ptr->last; + int regno; + + for (regno = first; regno <= last; regno++) + if (info_ptr->save_p[regno] == REG_SAVE_2WORDS + && regno != FRAME_POINTER_REGNUM + && (regno < FIRST_ARG_REGNUM + || regno > LAST_ARG_REGNUM)) + { + info_ptr->reg_offset[regno] = offset; + offset += 2 * UNITS_PER_WORD; + } + } + } + + /* Calculate the offsets to save normal single registers */ + for (range = 0; range < STACK_REGS_MAX; range++) + { + frv_stack_regs_t *reg_ptr = &(info_ptr->regs[range]); + if (! reg_ptr->special_p) + { + int first = reg_ptr->first; + int last = reg_ptr->last; + int regno; + + for (regno = first; regno <= last; regno++) + if (info_ptr->save_p[regno] == REG_SAVE_1WORD + && regno != FRAME_POINTER_REGNUM + && (regno < FIRST_ARG_REGNUM + || regno > LAST_ARG_REGNUM)) + { + info_ptr->reg_offset[regno] = offset; + offset += UNITS_PER_WORD; + } + } + } + + /* Calculate the offset to save the local variables at. */ + offset = ADDR_ALIGN (offset, alignment); + if (info_ptr->vars_size) + { + info_ptr->vars_offset = offset; + offset += info_ptr->vars_size; + } + + /* Align header to a dword-boundary. */ + offset = ADDR_ALIGN (offset, 2 * UNITS_PER_WORD); + + /* Calculate the offsets in the fixed frame. */ + info_ptr->save_p[FRAME_POINTER_REGNUM] = REG_SAVE_1WORD; + info_ptr->reg_offset[FRAME_POINTER_REGNUM] = offset; + info_ptr->regs[STACK_REGS_FP].size_1word = UNITS_PER_WORD; + + info_ptr->save_p[LR_REGNO] = REG_SAVE_1WORD; + info_ptr->reg_offset[LR_REGNO] = offset + 2*UNITS_PER_WORD; + info_ptr->regs[STACK_REGS_LR].size_1word = UNITS_PER_WORD; + + if (cfun->returns_struct) + { + info_ptr->save_p[STRUCT_VALUE_REGNUM] = REG_SAVE_1WORD; + info_ptr->reg_offset[STRUCT_VALUE_REGNUM] = offset + UNITS_PER_WORD; + info_ptr->regs[STACK_REGS_STRUCT].size_1word = UNITS_PER_WORD; + } + + /* Calculate the offsets to store the arguments passed in registers + for stdarg functions. The register pairs are first and the single + register if any is last. The register save area starts on a + dword-boundary. */ + if (info_ptr->stdarg_size) + { + int first = info_ptr->regs[STACK_REGS_STDARG].first; + int last = info_ptr->regs[STACK_REGS_STDARG].last; + int regno; + + /* Skip the header. */ + offset += 4 * UNITS_PER_WORD; + for (regno = first; regno <= last; regno++) + { + if (info_ptr->save_p[regno] == REG_SAVE_2WORDS) + { + info_ptr->reg_offset[regno] = offset; + offset += 2 * UNITS_PER_WORD; + } + else if (info_ptr->save_p[regno] == REG_SAVE_1WORD) + { + info_ptr->reg_offset[regno] = offset; + offset += UNITS_PER_WORD; + } + } + } + } + + if (reload_completed) + frv_stack_cache = info_ptr; + + return info_ptr; + } + + + /* Print the information about the frv stack offsets, etc. when debugging. */ + + void + frv_debug_stack (info) + frv_stack_t *info; + { + int range; + + if (!info) + info = frv_stack_info (); + + fprintf (stderr, "\nStack information for function %s:\n", + ((current_function_decl && DECL_NAME (current_function_decl)) + ? IDENTIFIER_POINTER (DECL_NAME (current_function_decl)) + : "")); + + fprintf (stderr, "\ttotal_size\t= %6d\n", info->total_size); + fprintf (stderr, "\tvars_size\t= %6d\n", info->vars_size); + fprintf (stderr, "\tparam_size\t= %6d\n", info->parameter_size); + fprintf (stderr, "\tregs_size\t= %6d, 1w = %3d, 2w = %3d\n", + info->regs_size, info->regs_size_1word, info->regs_size_2words); + + fprintf (stderr, "\theader_size\t= %6d\n", info->header_size); + fprintf (stderr, "\tpretend_size\t= %6d\n", info->pretend_size); + fprintf (stderr, "\tvars_offset\t= %6d\n", info->vars_offset); + fprintf (stderr, "\tregs_offset\t= %6d\n", info->regs_offset); + + for (range = 0; range < STACK_REGS_MAX; range++) + { + frv_stack_regs_t *regs = &(info->regs[range]); + if ((regs->size_1word + regs->size_2words) > 0) + { + int first = regs->first; + int last = regs->last; + int regno; + + fprintf (stderr, "\t%s\tsize\t= %6d, 1w = %3d, 2w = %3d, save =", + regs->name, regs->size_1word + regs->size_2words, + regs->size_1word, regs->size_2words); + + for (regno = first; regno <= last; regno++) + { + if (info->save_p[regno] == REG_SAVE_1WORD) + fprintf (stderr, " %s (%d)", reg_names[regno], + info->reg_offset[regno]); + + else if (info->save_p[regno] == REG_SAVE_2WORDS) + fprintf (stderr, " %s-%s (%d)", reg_names[regno], + reg_names[regno+1], info->reg_offset[regno]); + } + + fputc ('\n', stderr); + } + } + + fflush (stderr); + } + + + + + /* The following variable value is TRUE if the next output insn should + finish cpu cycle. In order words the insn will have packing bit + (which means absence of asm code suffix `.p' on assembler. */ + + static int frv_insn_packing_flag; + + /* True if the current function contains a far jump. */ + + static int + frv_function_contains_far_jump () + { + rtx insn = get_insns (); + while (insn != NULL + && !(GET_CODE (insn) == JUMP_INSN + /* Ignore tablejump patterns. */ + && GET_CODE (PATTERN (insn)) != ADDR_VEC + && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC + && get_attr_far_jump (insn) == FAR_JUMP_YES)) + insn = NEXT_INSN (insn); + return (insn != NULL); + } + + /* For the FRV, this function makes sure that a function with far jumps + will return correctly. It also does the VLIW packing. */ + + static void + frv_function_prologue (file, size) + FILE *file; + HOST_WIDE_INT size ATTRIBUTE_UNUSED; + { + /* If no frame was created, check whether the function uses a call + instruction to implement a far jump. If so, save the link in gr3 and + replace all returns to LR with returns to GR3. GR3 is used because it + is call-clobbered, because is not available to the register allocator, + and because all functions that take a hidden argument pointer will have + a stack frame. */ + if (frv_stack_info ()->total_size == 0 && frv_function_contains_far_jump ()) + { + rtx insn; + + /* Just to check that the above comment is true. */ + if (regs_ever_live[GPR_FIRST + 3]) + abort (); + + /* Generate the instruction that saves the link register. */ + fprintf (file, "\tmovsg lr,gr3\n"); + + /* Replace the LR with GR3 in *return_internal patterns. The insn + will now return using jmpl @(gr3,0) rather than bralr. We cannot + simply emit a different assembly directive because bralr and jmpl + execute in different units. */ + for (insn = get_insns(); insn != NULL; insn = NEXT_INSN (insn)) + if (GET_CODE (insn) == JUMP_INSN) + { + rtx pattern = PATTERN (insn); + if (GET_CODE (pattern) == PARALLEL + && XVECLEN (pattern, 0) >= 2 + && GET_CODE (XVECEXP (pattern, 0, 0)) == RETURN + && GET_CODE (XVECEXP (pattern, 0, 1)) == USE) + { + rtx address = XEXP (XVECEXP (pattern, 0, 1), 0); + if (GET_CODE (address) == REG && REGNO (address) == LR_REGNO) + REGNO (address) = GPR_FIRST + 3; + } + } + } + + frv_pack_insns (); + frv_insn_packing_flag = TRUE; + } + + + /* Return the next available temporary register in a given class. */ + + static rtx + frv_alloc_temp_reg (info, class, mode, mark_as_used, no_abort) + frv_tmp_reg_t *info; /* which registers are available */ + enum reg_class class; /* register class desired */ + enum machine_mode mode; /* mode to allocate register with */ + int mark_as_used; /* register not available after allocation */ + int no_abort; /* return NULL instead of aborting */ + { + int regno = info->next_reg[ (int)class ]; + int orig_regno = regno; + HARD_REG_SET *reg_in_class = ®_class_contents[ (int)class ]; + int i, nr; + + for (;;) + { + if (TEST_HARD_REG_BIT (*reg_in_class, regno) + && TEST_HARD_REG_BIT (info->regs, regno)) + break; + + if (++regno >= FIRST_PSEUDO_REGISTER) + regno = 0; + if (regno == orig_regno) + { + if (no_abort) + return NULL_RTX; + else + abort (); + } + } + + nr = HARD_REGNO_NREGS (regno, mode); + info->next_reg[ (int)class ] = regno + nr; + + if (mark_as_used) + for (i = 0; i < nr; i++) + CLEAR_HARD_REG_BIT (info->regs, regno+i); + + return gen_rtx_REG (mode, regno); + } + + + /* Return an rtx with the value OFFSET, which will either be a register or a + signed 12-bit integer. It can be used as the second operand in an "add" + instruction, or as the index in a load or store. + + The function returns a constant rtx if OFFSET is small enough, otherwise + it loads the constant into register OFFSET_REGNO and returns that. */ + static rtx + frv_frame_offset_rtx (offset) + int offset; + { + rtx offset_rtx = GEN_INT (offset); + if (IN_RANGE_P (offset, -2048, 2047)) + return offset_rtx; + else + { + rtx reg_rtx = gen_rtx_REG (SImode, OFFSET_REGNO); + if (IN_RANGE_P (offset, -32768, 32767)) + emit_insn (gen_movsi (reg_rtx, offset_rtx)); + else + { + emit_insn (gen_movsi_high (reg_rtx, offset_rtx)); + emit_insn (gen_movsi_lo_sum (reg_rtx, offset_rtx)); + } + return reg_rtx; + } + } + + /* Generate (mem:MODE (plus:Pmode BASE (frv_frame_offset OFFSET)))). The + prologue and epilogue uses such expressions to access the stack. */ + static rtx + frv_frame_mem (mode, base, offset) + enum machine_mode mode; + rtx base; + int offset; + { + return gen_rtx_MEM (mode, gen_rtx_PLUS (Pmode, + base, + frv_frame_offset_rtx (offset))); + } + + /* Generate a frame-related expression: + + (set REG (mem (plus (sp) (const_int OFFSET)))). + + Such expressions are used in FRAME_RELATED_EXPR notes for more complex + instructions. Marking the expressions as frame-related is superfluous if + the note contains just a single set. But if the note contains a PARALLEL + or SEQUENCE that has several sets, each set must be individually marked + as frame-related. */ + static rtx + frv_dwarf_store (reg, offset) + rtx reg; + int offset; + { + rtx set = gen_rtx_SET (VOIDmode, + gen_rtx_MEM (GET_MODE (reg), + plus_constant (stack_pointer_rtx, + offset)), + reg); + RTX_FRAME_RELATED_P (set) = 1; + return set; + } + + /* Emit a frame-related instruction whose pattern is PATTERN. The + instruction is the last in a sequence that cumulatively performs the + operation described by DWARF_PATTERN. The instruction is marked as + frame-related and has a REG_FRAME_RELATED_EXPR note containing + DWARF_PATTERN. */ + static void + frv_frame_insn (pattern, dwarf_pattern) + rtx pattern; + rtx dwarf_pattern; + { + rtx insn = emit_insn (pattern); + RTX_FRAME_RELATED_P (insn) = 1; + REG_NOTES (insn) = alloc_EXPR_LIST (REG_FRAME_RELATED_EXPR, + dwarf_pattern, + REG_NOTES (insn)); + } + + /* Emit instructions that transfer REG to or from the memory location (sp + + STACK_OFFSET). The register is stored in memory if ACCESSOR->OP is + FRV_STORE and loaded if it is FRV_LOAD. Only the prologue uses this + function to store registers and only the epilogue uses it to load them. + + The caller sets up ACCESSOR so that BASE is equal to (sp + BASE_OFFSET). + The generated instruction will use BASE as its base register. BASE may + simply be the stack pointer, but if several accesses are being made to a + region far away from the stack pointer, it may be more efficient to set + up a temporary instead. + + Store instructions will be frame-related and will be annotated with the + overall effect of the store. Load instructions will be followed by a + (use) to prevent later optimizations from zapping them. + + The function takes care of the moves to and from SPRs, using TEMP_REGNO + as a temporary in such cases. */ + static void + frv_frame_access (accessor, reg, stack_offset) + frv_frame_accessor_t *accessor; + rtx reg; + int stack_offset; + { + enum machine_mode mode = GET_MODE (reg); + rtx mem = frv_frame_mem (mode, + accessor->base, + stack_offset - accessor->base_offset); + + if (accessor->op == FRV_LOAD) + { + if (SPR_P (REGNO (reg))) + { + rtx temp = gen_rtx_REG (mode, TEMP_REGNO); + emit_insn (gen_rtx_SET (VOIDmode, temp, mem)); + emit_insn (gen_rtx_SET (VOIDmode, reg, temp)); + } + else + emit_insn (gen_rtx_SET (VOIDmode, reg, mem)); + emit_insn (gen_rtx_USE (VOIDmode, reg)); + } + else + { + if (SPR_P (REGNO (reg))) + { + rtx temp = gen_rtx_REG (mode, TEMP_REGNO); + emit_insn (gen_rtx_SET (VOIDmode, temp, reg)); + frv_frame_insn (gen_rtx_SET (Pmode, mem, temp), + frv_dwarf_store (reg, stack_offset)); + } + else if (GET_MODE (reg) == DImode) + { + /* For DImode saves, the dwarf2 version needs to be a SEQUENCE + with a separate save for each register. */ + rtx reg1 = gen_rtx_REG (SImode, REGNO (reg)); + rtx reg2 = gen_rtx_REG (SImode, REGNO (reg) + 1); + rtx set1 = frv_dwarf_store (reg1, stack_offset); + rtx set2 = frv_dwarf_store (reg2, stack_offset + 4); + frv_frame_insn (gen_rtx_SET (Pmode, mem, reg), + gen_rtx_PARALLEL (VOIDmode, + gen_rtvec (2, set1, set2))); + } + else + frv_frame_insn (gen_rtx_SET (Pmode, mem, reg), + frv_dwarf_store (reg, stack_offset)); + } + } + + /* A function that uses frv_frame_access to transfer a group of registers to + or from the stack. ACCESSOR is passed directly to frv_frame_access, INFO + is the stack information generated by frv_stack_info, and REG_SET is the + number of the register set to transfer. */ + static void + frv_frame_access_multi (accessor, info, reg_set) + frv_frame_accessor_t *accessor; + frv_stack_t *info; + int reg_set; + { + frv_stack_regs_t *regs_info; + int regno; + + regs_info = &info->regs[reg_set]; + for (regno = regs_info->first; regno <= regs_info->last; regno++) + if (info->save_p[regno]) + frv_frame_access (accessor, + info->save_p[regno] == REG_SAVE_2WORDS + ? gen_rtx_REG (DImode, regno) + : gen_rtx_REG (SImode, regno), + info->reg_offset[regno]); + } + + /* Save or restore callee-saved registers that are kept outside the frame + header. The function saves the registers if OP is FRV_STORE and restores + them if OP is FRV_LOAD. INFO is the stack information generated by + frv_stack_info. */ + static void + frv_frame_access_standard_regs (op, info) + enum frv_stack_op op; + frv_stack_t *info; + { + frv_frame_accessor_t accessor; + + accessor.op = op; + accessor.base = stack_pointer_rtx; + accessor.base_offset = 0; + frv_frame_access_multi (&accessor, info, STACK_REGS_GPR); + frv_frame_access_multi (&accessor, info, STACK_REGS_FPR); + frv_frame_access_multi (&accessor, info, STACK_REGS_LCR); + } + + + /* Called after register allocation to add any instructions needed for the + prologue. Using a prologue insn is favored compared to putting all of the + instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler + to intermix instructions with the saves of the caller saved registers. In + some cases, it might be necessary to emit a barrier instruction as the last + insn to prevent such scheduling. + + Also any insns generated here should have RTX_FRAME_RELATED_P(insn) = 1 + so that the debug info generation code can handle them properly. */ + void + frv_expand_prologue () + { + frv_stack_t *info = frv_stack_info (); + rtx sp = stack_pointer_rtx; + rtx fp = frame_pointer_rtx; + frv_frame_accessor_t accessor; + + if (TARGET_DEBUG_STACK) + frv_debug_stack (info); + + if (info->total_size == 0) + return; + + /* We're interested in three areas of the frame here: + + A: the register save area + B: the old FP + C: the header after B + + If the frame pointer isn't used, we'll have to set up A, B and C + using the stack pointer. If the frame pointer is used, we'll access + them as follows: + + A: set up using sp + B: set up using sp or a temporary (see below) + C: set up using fp + + We set up B using the stack pointer if the frame is small enough. + Otherwise, it's more efficient to copy the old stack pointer into a + temporary and use that. + + Note that it's important to make sure the prologue and epilogue use the + same registers to access A and C, since doing otherwise will confuse + the aliasing code. */ + + /* Set up ACCESSOR for accessing region B above. If the frame pointer + isn't used, the same method will serve for C. */ + accessor.op = FRV_STORE; + if (frame_pointer_needed && info->total_size > 2048) + { + rtx insn; + + accessor.base = gen_rtx_REG (Pmode, OLD_SP_REGNO); + accessor.base_offset = info->total_size; + insn = emit_insn (gen_movsi (accessor.base, sp)); + } + else + { + accessor.base = stack_pointer_rtx; + accessor.base_offset = 0; + } + + /* Allocate the stack space. */ + { + rtx asm_offset = frv_frame_offset_rtx (-info->total_size); + rtx dwarf_offset = GEN_INT (-info->total_size); + + frv_frame_insn (gen_stack_adjust (sp, sp, asm_offset), + gen_rtx_SET (Pmode, + sp, + gen_rtx_PLUS (Pmode, sp, dwarf_offset))); + } + + /* If the frame pointer is needed, store the old one at (sp + FP_OFFSET) + and point the new one to that location. */ + if (frame_pointer_needed) + { + int fp_offset = info->reg_offset[FRAME_POINTER_REGNUM]; + + /* ASM_SRC and DWARF_SRC both point to the frame header. ASM_SRC is + based on ACCESSOR.BASE but DWARF_SRC is always based on the stack + pointer. */ + rtx asm_src = plus_constant (accessor.base, + fp_offset - accessor.base_offset); + rtx dwarf_src = plus_constant (sp, fp_offset); + + /* Store the old frame pointer at (sp + FP_OFFSET). */ + frv_frame_access (&accessor, fp, fp_offset); + + /* Set up the new frame pointer. */ + frv_frame_insn (gen_rtx_SET (VOIDmode, fp, asm_src), + gen_rtx_SET (VOIDmode, fp, dwarf_src)); + + /* Access region C from the frame pointer. */ + accessor.base = fp; + accessor.base_offset = fp_offset; + } + + /* Set up region C. */ + frv_frame_access_multi (&accessor, info, STACK_REGS_STRUCT); + frv_frame_access_multi (&accessor, info, STACK_REGS_LR); + frv_frame_access_multi (&accessor, info, STACK_REGS_STDARG); + + /* Set up region A. */ + frv_frame_access_standard_regs (FRV_STORE, info); + + /* If this is a varargs/stdarg function, issue a blockage to prevent the + scheduler from moving loads before the stores saving the registers. */ + if (info->stdarg_size > 0) + emit_insn (gen_blockage ()); + + /* Set up pic register/small data register for this function. */ + if (flag_pic && cfun->uses_pic_offset_table) + emit_insn (gen_pic_prologue (gen_rtx_REG (Pmode, PIC_REGNO), + gen_rtx_REG (Pmode, LR_REGNO), + gen_rtx_REG (SImode, OFFSET_REGNO))); + } + + + /* Under frv, all of the work is done via frv_expand_epilogue, but + this function provides a convient place to do cleanup. */ + + static void + frv_function_epilogue (file, size) + FILE *file ATTRIBUTE_UNUSED; + HOST_WIDE_INT size ATTRIBUTE_UNUSED; + { + frv_stack_cache = (frv_stack_t *)0; + + /* zap last used registers for conditional execution. */ + memset ((PTR) &frv_ifcvt.tmp_reg, 0, sizeof (frv_ifcvt.tmp_reg)); + + /* release the bitmap of created insns. */ + BITMAP_XFREE (frv_ifcvt.scratch_insns_bitmap); + } + + + /* Called after register allocation to add any instructions needed for the + epilogue. Using an epilogue insn is favored compared to putting all of the + instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler + to intermix instructions with the saves of the caller saved registers. In + some cases, it might be necessary to emit a barrier instruction as the last + insn to prevent such scheduling. + + If SIBCALL_P is true, the final branch back to the calling function is + omitted, and is used for sibling call (aka tail call) sites. For sibcalls, + we must not clobber any arguments used for parameter passing or any stack + slots for arguments passed to the current function. */ + + void + frv_expand_epilogue (sibcall_p) + int sibcall_p; + { + frv_stack_t *info = frv_stack_info (); + rtx fp = frame_pointer_rtx; + rtx sp = stack_pointer_rtx; + rtx return_addr; + int fp_offset; + + fp_offset = info->reg_offset[FRAME_POINTER_REGNUM]; + + /* Restore the stack pointer to its original value if alloca or the like + is used. */ + if (! current_function_sp_is_unchanging) + emit_insn (gen_addsi3 (sp, fp, frv_frame_offset_rtx (-fp_offset))); + + /* Restore the callee-saved registers that were used in this function. */ + frv_frame_access_standard_regs (FRV_LOAD, info); + + /* Set RETURN_ADDR to the address we should return to. Set it to NULL if + no return instruction should be emitted. */ + if (sibcall_p) + return_addr = 0; + else if (info->save_p[LR_REGNO]) + { + int lr_offset; + rtx mem; + + /* Use the same method to access the link register's slot as we did in + the prologue. In other words, use the frame pointer if available, + otherwise use the stack pointer. + + LR_OFFSET is the offset of the link register's slot from the start + of the frame and MEM is a memory rtx for it. */ + lr_offset = info->reg_offset[LR_REGNO]; + if (frame_pointer_needed) + mem = frv_frame_mem (Pmode, fp, lr_offset - fp_offset); + else + mem = frv_frame_mem (Pmode, sp, lr_offset); + + /* Load the old link register into a GPR. */ + return_addr = gen_rtx_REG (Pmode, TEMP_REGNO); + emit_insn (gen_rtx_SET (VOIDmode, return_addr, mem)); + } + else + return_addr = gen_rtx_REG (Pmode, LR_REGNO); + + /* Restore the old frame pointer. Emit a USE afterwards to make sure + the load is preserved. */ + if (frame_pointer_needed) + { + emit_insn (gen_rtx_SET (VOIDmode, fp, gen_rtx_MEM (Pmode, fp))); + emit_insn (gen_rtx_USE (VOIDmode, fp)); + } + + /* Deallocate the stack frame. */ + if (info->total_size != 0) + { + rtx offset = frv_frame_offset_rtx (info->total_size); + emit_insn (gen_stack_adjust (sp, sp, offset)); + } + + /* If this function uses eh_return, add the final stack adjustment now. */ + if (current_function_calls_eh_return) + emit_insn (gen_stack_adjust (sp, sp, EH_RETURN_STACKADJ_RTX)); + + if (return_addr) + emit_jump_insn (gen_epilogue_return (return_addr)); + } + + + /* A C compound statement that outputs the assembler code for a thunk function, + used to implement C++ virtual function calls with multiple inheritance. The + thunk acts as a wrapper around a virtual function, adjusting the implicit + object parameter before handing control off to the real function. + + First, emit code to add the integer DELTA to the location that contains the + incoming first argument. Assume that this argument contains a pointer, and + is the one used to pass the `this' pointer in C++. This is the incoming + argument *before* the function prologue, e.g. `%o0' on a sparc. The + addition must preserve the values of all other incoming arguments. + + After the addition, emit code to jump to FUNCTION, which is a + `FUNCTION_DECL'. This is a direct pure jump, not a call, and does not touch + the return address. Hence returning from FUNCTION will return to whoever + called the current `thunk'. + + The effect must be as if FUNCTION had been called directly with the adjusted + first argument. This macro is responsible for emitting all of the code for + a thunk function; `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE' are not + invoked. + + The THUNK_FNDECL is redundant. (DELTA and FUNCTION have already been + extracted from it.) It might possibly be useful on some targets, but + probably not. + + If you do not define this macro, the target-independent code in the C++ + frontend will generate a less efficient heavyweight thunk that calls + FUNCTION instead of jumping to it. The generic approach does not support + varargs. */ + + static void + frv_asm_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) + FILE *file; + tree thunk_fndecl ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; + tree function; + { + const char *name_func = XSTR (XEXP (DECL_RTL (function), 0), 0); + const char *name_arg0 = reg_names[FIRST_ARG_REGNUM]; + const char *name_jmp = reg_names[JUMP_REGNO]; + const char *parallel = ((PACKING_FLAG_USED_P ()) ? ".p" : ""); + + /* Do the add using an addi if possible */ + if (IN_RANGE_P (delta, -2048, 2047)) + fprintf (file, "\taddi %s,#%d,%s\n", name_arg0, (int) delta, name_arg0); + else + { + const char *name_add = reg_names[TEMP_REGNO]; + fprintf (file, "\tsethi%s #hi(", parallel); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, "),%s\n", name_add); + fprintf (file, "\tsetlo #lo("); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, "),%s\n", name_add); + fprintf (file, "\tadd %s,%s,%s\n", name_add, name_arg0, name_arg0); + } + + if (!flag_pic) + { + fprintf (file, "\tsethi%s #hi(", parallel); + assemble_name (file, name_func); + fprintf (file, "),%s\n", name_jmp); + + fprintf (file, "\tsetlo #lo("); + assemble_name (file, name_func); + fprintf (file, "),%s\n", name_jmp); + } + else + { + /* Use JUMP_REGNO as a temporary PIC register. */ + const char *name_lr = reg_names[LR_REGNO]; + const char *name_gppic = name_jmp; + const char *name_tmp = reg_names[TEMP_REGNO]; + + fprintf (file, "\tmovsg %s,%s\n", name_lr, name_tmp); + fprintf (file, "\tcall 1f\n"); + fprintf (file, "1:\tmovsg %s,%s\n", name_lr, name_gppic); + fprintf (file, "\tmovgs %s,%s\n", name_tmp, name_lr); + fprintf (file, "\tsethi%s #gprelhi(1b),%s\n", parallel, name_tmp); + fprintf (file, "\tsetlo #gprello(1b),%s\n", name_tmp); + fprintf (file, "\tsub %s,%s,%s\n", name_gppic, name_tmp, name_gppic); + + fprintf (file, "\tsethi%s #gprelhi(", parallel); + assemble_name (file, name_func); + fprintf (file, "),%s\n", name_tmp); + + fprintf (file, "\tsetlo #gprello("); + assemble_name (file, name_func); + fprintf (file, "),%s\n", name_tmp); + + fprintf (file, "\tadd %s,%s,%s\n", name_gppic, name_tmp, name_jmp); + } + + /* Jump to the function address */ + fprintf (file, "\tjmpl @(%s,%s)\n", name_jmp, reg_names[GPR_FIRST+0]); + } + + + /* A C expression which is nonzero if a function must have and use a frame + pointer. This expression is evaluated in the reload pass. If its value is + nonzero the function will have a frame pointer. + + The expression can in principle examine the current function and decide + according to the facts, but on most machines the constant 0 or the constant + 1 suffices. Use 0 when the machine allows code to be generated with no + frame pointer, and doing so saves some time or space. Use 1 when there is + no possible advantage to avoiding a frame pointer. + + In certain cases, the compiler does not know how to produce valid code + without a frame pointer. The compiler recognizes those cases and + automatically gives the function a frame pointer regardless of what + `FRAME_POINTER_REQUIRED' says. You don't need to worry about them. + + In a function that does not require a frame pointer, the frame pointer + register can be allocated for ordinary usage, unless you mark it as a fixed + register. See `FIXED_REGISTERS' for more information. */ + + /* On frv, create a frame whenever we need to create stack */ + + int + frv_frame_pointer_required () + { + if (! current_function_is_leaf) + return TRUE; + + if (get_frame_size () != 0) + return TRUE; + + if (cfun->stdarg) + return TRUE; + + if (!current_function_sp_is_unchanging) + return TRUE; + + if (flag_pic && cfun->uses_pic_offset_table) + return TRUE; + + if (profile_flag) + return TRUE; + + if (cfun->machine->frame_needed) + return TRUE; + + return FALSE; + } + + + /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It specifies the + initial difference between the specified pair of registers. This macro must + be defined if `ELIMINABLE_REGS' is defined. */ + + /* See frv_stack_info for more details on the frv stack frame. */ + + int + frv_initial_elimination_offset (from, to) + int from; + int to; + { + frv_stack_t *info = frv_stack_info (); + int ret = 0; + + if (to == STACK_POINTER_REGNUM && from == ARG_POINTER_REGNUM) + ret = info->total_size - info->pretend_size; + + else if (to == STACK_POINTER_REGNUM && from == FRAME_POINTER_REGNUM) + ret = - info->reg_offset[FRAME_POINTER_REGNUM]; + + else if (to == FRAME_POINTER_REGNUM && from == ARG_POINTER_REGNUM) + ret = (info->total_size + - info->reg_offset[FRAME_POINTER_REGNUM] + - info->pretend_size); + + else + abort (); + + if (TARGET_DEBUG_STACK) + fprintf (stderr, "Eliminate %s to %s by adding %d\n", + reg_names [from], reg_names[to], ret); + + return ret; + } + + + /* This macro offers an alternative to using `__builtin_saveregs' and defining + the macro `EXPAND_BUILTIN_SAVEREGS'. Use it to store the anonymous register + arguments into the stack so that all the arguments appear to have been + passed consecutively on the stack. Once this is done, you can use the + standard implementation of varargs that works for machines that pass all + their arguments on the stack. + + The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing + the values that obtain after processing of the named arguments. The + arguments MODE and TYPE describe the last named argument--its machine mode + and its data type as a tree node. + + The macro implementation should do two things: first, push onto the stack + all the argument registers *not* used for the named arguments, and second, + store the size of the data thus pushed into the `int'-valued variable whose + name is supplied as the argument PRETEND_ARGS_SIZE. The value that you + store here will serve as additional offset for setting up the stack frame. + + Because you must generate code to push the anonymous arguments at compile + time without knowing their data types, `SETUP_INCOMING_VARARGS' is only + useful on machines that have just a single category of argument register and + use it uniformly for all data types. + + If the argument SECOND_TIME is nonzero, it means that the arguments of the + function are being analyzed for the second time. This happens for an inline + function, which is not actually compiled until the end of the source file. + The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in + this case. */ + + void + frv_setup_incoming_varargs (cum, mode, type, pretend_size, second_time) + CUMULATIVE_ARGS *cum; + enum machine_mode mode; + tree type ATTRIBUTE_UNUSED; + int *pretend_size; + int second_time; + { + if (TARGET_DEBUG_ARG) + fprintf (stderr, + "setup_vararg: words = %2d, mode = %4s, pretend_size = %d, second_time = %d\n", + *cum, GET_MODE_NAME (mode), *pretend_size, second_time); + } + + + /* If defined, is a C expression that produces the machine-specific code for a + call to `__builtin_saveregs'. This code will be moved to the very beginning + of the function, before any parameter access are made. The return value of + this function should be an RTX that contains the value to use as the return + of `__builtin_saveregs'. + + If this macro is not defined, the compiler will output an ordinary call to + the library function `__builtin_saveregs'. */ + + rtx + frv_expand_builtin_saveregs () + { + int offset = UNITS_PER_WORD * FRV_NUM_ARG_REGS; + + if (TARGET_DEBUG_ARG) + fprintf (stderr, "expand_builtin_saveregs: offset from ap = %d\n", + offset); + + return gen_rtx (PLUS, Pmode, virtual_incoming_args_rtx, GEN_INT (- offset)); + } + + + /* Expand __builtin_va_start to do the va_start macro. */ + + void + frv_expand_builtin_va_start (valist, nextarg) + tree valist; + rtx nextarg; + { + tree t; + int num = cfun->args_info - FIRST_ARG_REGNUM - FRV_NUM_ARG_REGS; + + nextarg = gen_rtx_PLUS (Pmode, virtual_incoming_args_rtx, + GEN_INT (UNITS_PER_WORD * num)); + + if (TARGET_DEBUG_ARG) + { + fprintf (stderr, "va_start: args_info = %d, num = %d\n", + cfun->args_info, num); + + debug_rtx (nextarg); + } + + t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, + make_tree (ptr_type_node, nextarg)); + TREE_SIDE_EFFECTS (t) = 1; + + expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); + } + + + /* Expand __builtin_va_arg to do the va_arg macro. */ + + rtx + frv_expand_builtin_va_arg(valist, type) + tree valist; + tree type; + { + rtx addr; + rtx mem; + rtx reg; + + if (TARGET_DEBUG_ARG) + { + fprintf (stderr, "va_arg:\n"); + debug_tree (type); + } + + if (! AGGREGATE_TYPE_P (type)) + return std_expand_builtin_va_arg (valist, type); + + addr = std_expand_builtin_va_arg (valist, ptr_type_node); + mem = gen_rtx_MEM (Pmode, addr); + reg = gen_reg_rtx (Pmode); + + set_mem_alias_set (mem, get_varargs_alias_set ()); + emit_move_insn (reg, mem); + + return reg; + } + + + /* Expand a block move operation, and return 1 if successful. Return 0 + if we should let the compiler generate normal code. + + operands[0] is the destination + operands[1] is the source + operands[2] is the length + operands[3] is the alignment */ + + /* Maximum number of loads to do before doing the stores */ + #ifndef MAX_MOVE_REG + #define MAX_MOVE_REG 4 + #endif + + /* Maximum number of total loads to do. */ + #ifndef TOTAL_MOVE_REG + #define TOTAL_MOVE_REG 8 + #endif + + int + frv_expand_block_move (operands) + rtx operands[]; + { + rtx orig_dest = operands[0]; + rtx orig_src = operands[1]; + rtx bytes_rtx = operands[2]; + rtx align_rtx = operands[3]; + int constp = (GET_CODE (bytes_rtx) == CONST_INT); + int align; + int bytes; + int offset; + int num_reg; + int i; + rtx src_reg; + rtx dest_reg; + rtx src_addr; + rtx dest_addr; + rtx src_mem; + rtx dest_mem; + rtx tmp_reg; + rtx stores[MAX_MOVE_REG]; + int move_bytes; + enum machine_mode mode; + + /* If this is not a fixed size move, just call memcpy */ + if (! constp) + return FALSE; + + /* If this is not a fixed size alignment, abort */ + if (GET_CODE (align_rtx) != CONST_INT) + abort (); + + align = INTVAL (align_rtx); + + /* Anything to move? */ + bytes = INTVAL (bytes_rtx); + if (bytes <= 0) + return TRUE; + + /* Don't support real large moves. */ + if (bytes > TOTAL_MOVE_REG*align) + return FALSE; + + /* Move the address into scratch registers. */ + dest_reg = copy_addr_to_reg (XEXP (orig_dest, 0)); + src_reg = copy_addr_to_reg (XEXP (orig_src, 0)); + + num_reg = offset = 0; + for ( ; bytes > 0; (bytes -= move_bytes), (offset += move_bytes)) + { + /* Calculate the correct offset for src/dest */ + if (offset == 0) + { + src_addr = src_reg; + dest_addr = dest_reg; + } + else + { + src_addr = plus_constant (src_reg, offset); + dest_addr = plus_constant (dest_reg, offset); + } + + /* Generate the appropriate load and store, saving the stores + for later. */ + if (bytes >= 4 && align >= 4) + mode = SImode; + else if (bytes >= 2 && align >= 2) + mode = HImode; + else + mode = QImode; + + move_bytes = GET_MODE_SIZE (mode); + tmp_reg = gen_reg_rtx (mode); + src_mem = change_address (orig_src, mode, src_addr); + dest_mem = change_address (orig_dest, mode, dest_addr); + emit_insn (gen_rtx_SET (VOIDmode, tmp_reg, src_mem)); + stores[num_reg++] = gen_rtx_SET (VOIDmode, dest_mem, tmp_reg); + + if (num_reg >= MAX_MOVE_REG) + { + for (i = 0; i < num_reg; i++) + emit_insn (stores[i]); + num_reg = 0; + } + } + + for (i = 0; i < num_reg; i++) + emit_insn (stores[i]); + + return TRUE; + } + + + /* Expand a block clear operation, and return 1 if successful. Return 0 + if we should let the compiler generate normal code. + + operands[0] is the destination + operands[1] is the length + operands[2] is the alignment */ + + int + frv_expand_block_clear (operands) + rtx operands[]; + { + rtx orig_dest = operands[0]; + rtx bytes_rtx = operands[1]; + rtx align_rtx = operands[2]; + int constp = (GET_CODE (bytes_rtx) == CONST_INT); + int align; + int bytes; + int offset; + int num_reg; + rtx dest_reg; + rtx dest_addr; + rtx dest_mem; + int clear_bytes; + enum machine_mode mode; + + /* If this is not a fixed size move, just call memcpy */ + if (! constp) + return FALSE; + + /* If this is not a fixed size alignment, abort */ + if (GET_CODE (align_rtx) != CONST_INT) + abort (); + + align = INTVAL (align_rtx); + + /* Anything to move? */ + bytes = INTVAL (bytes_rtx); + if (bytes <= 0) + return TRUE; + + /* Don't support real large clears. */ + if (bytes > TOTAL_MOVE_REG*align) + return FALSE; + + /* Move the address into a scratch register. */ + dest_reg = copy_addr_to_reg (XEXP (orig_dest, 0)); + + num_reg = offset = 0; + for ( ; bytes > 0; (bytes -= clear_bytes), (offset += clear_bytes)) + { + /* Calculate the correct offset for src/dest */ + dest_addr = ((offset == 0) + ? dest_reg + : plus_constant (dest_reg, offset)); + + /* Generate the appropriate store of gr0 */ + if (bytes >= 4 && align >= 4) + mode = SImode; + else if (bytes >= 2 && align >= 2) + mode = HImode; + else + mode = QImode; + + clear_bytes = GET_MODE_SIZE (mode); + dest_mem = change_address (orig_dest, mode, dest_addr); + emit_insn (gen_rtx_SET (VOIDmode, dest_mem, const0_rtx)); + } + + return TRUE; + } + + + /* The following variable is used to output modifiers of assembler + code of the current output insn.. */ + + static rtx *frv_insn_operands; + + /* The following function is used to add assembler insn code suffix .p + if it is necessary. */ + + const char * + frv_asm_output_opcode (f, ptr) + FILE *f; + const char *ptr; + { + int c; + + if (! PACKING_FLAG_USED_P()) + return ptr; + + for (; *ptr && *ptr != ' ' && *ptr != '\t';) + { + c = *ptr++; + if (c == '%' && ((*ptr >= 'a' && *ptr <= 'z') + || (*ptr >= 'A' && *ptr <= 'Z'))) + { + int letter = *ptr++; + + c = atoi (ptr); + frv_print_operand (f, frv_insn_operands [c], letter); + while ((c = *ptr) >= '0' && c <= '9') + ptr++; + } + else + fputc (c, f); + } + + if (!frv_insn_packing_flag) + fprintf (f, ".p"); + + return ptr; + } + + /* The following function sets up the packing bit for the current + output insn. Remember that the function is not called for asm + insns. */ + + void + frv_final_prescan_insn (insn, opvec, noperands) + rtx insn; + rtx *opvec; + int noperands ATTRIBUTE_UNUSED; + { + if (! PACKING_FLAG_USED_P()) + return; + + if (GET_RTX_CLASS (GET_CODE (insn)) != 'i') + return; + + frv_insn_operands = opvec; + + /* Look for the next printable instruction. frv_pack_insns () has set + things up so that any printable instruction will have TImode if it + starts a new packet and VOIDmode if it should be packed with the + previous instruction. + + Printable instructions will be asm_operands or match one of the .md + patterns. Since asm instructions cannot be packed -- and will + therefore have TImode -- this loop terminates on any recognisable + instruction, and on any unrecognisable instruction with TImode. */ + for (insn = NEXT_INSN (insn); insn; insn = NEXT_INSN (insn)) + { + if (NOTE_P (insn)) + continue; + else if (!INSN_P (insn)) + break; + else if (GET_MODE (insn) == TImode || INSN_CODE (insn) != -1) + break; + } + + /* Set frv_insn_packing_flag to FALSE if the next instruction should + be packed with this one. Set it to TRUE otherwise. If the next + instruction is an asm insntruction, this statement will set the + flag to TRUE, and that value will still hold when the asm operands + themselves are printed. */ + frv_insn_packing_flag = ! (insn && INSN_P (insn) + && GET_MODE (insn) != TImode); + } + + + + /* A C expression whose value is RTL representing the address in a stack frame + where the pointer to the caller's frame is stored. Assume that FRAMEADDR is + an RTL expression for the address of the stack frame itself. + + If you don't define this macro, the default is to return the value of + FRAMEADDR--that is, the stack frame address is also the address of the stack + word that points to the previous frame. */ + + /* The default is correct, but we need to make sure the frame gets created. */ + rtx + frv_dynamic_chain_address (frame) + rtx frame; + { + cfun->machine->frame_needed = 1; + return frame; + } + + + /* A C expression whose value is RTL representing the value of the return + address for the frame COUNT steps up from the current frame, after the + prologue. FRAMEADDR is the frame pointer of the COUNT frame, or the frame + pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME' is + defined. + + The value of the expression must always be the correct address when COUNT is + zero, but may be `NULL_RTX' if there is not way to determine the return + address of other frames. */ + + rtx + frv_return_addr_rtx (count, frame) + int count ATTRIBUTE_UNUSED; + rtx frame; + { + cfun->machine->frame_needed = 1; + return gen_rtx_MEM (Pmode, plus_constant (frame, 8)); + } + + /* Given a memory reference MEMREF, interpret the referenced memory as + an array of MODE values, and return a reference to the element + specified by INDEX. Assume that any pre-modification implicit in + MEMREF has already happened. + + MEMREF must be a legitimate operand for modes larger than SImode. + GO_IF_LEGITIMATE_ADDRESS forbids register+register addresses, which + this function cannot handle. */ + rtx + frv_index_memory (memref, mode, index) + rtx memref; + enum machine_mode mode; + int index; + { + rtx base = XEXP (memref, 0); + if (GET_CODE (base) == PRE_MODIFY) + base = XEXP (base, 0); + return change_address (memref, mode, + plus_constant (base, index * GET_MODE_SIZE (mode))); + } + + + /* Print a memory address as an operand to reference that memory location. */ + void + frv_print_operand_address (stream, x) + FILE * stream; + rtx x; + { + if (GET_CODE (x) == MEM) + x = XEXP (x, 0); + + switch (GET_CODE (x)) + { + case REG: + fputs (reg_names [ REGNO (x)], stream); + return; + + case CONST_INT: + fprintf (stream, "%ld", (long) INTVAL (x)); + return; + + case SYMBOL_REF: + assemble_name (stream, XSTR (x, 0)); + return; + + case LABEL_REF: + case CONST: + output_addr_const (stream, x); + return; + + default: + break; + } + + fatal_insn ("Bad insn to frv_print_operand_address:", x); + } + + + static void + frv_print_operand_memory_reference_reg (stream, x) + FILE *stream; + rtx x; + { + int regno = true_regnum (x); + if (GPR_P (regno)) + fputs (reg_names[regno], stream); + else + fatal_insn ("Bad register to frv_print_operand_memory_reference_reg:", x); + } + + /* Print a memory reference suitable for the ld/st instructions. */ + + static void + frv_print_operand_memory_reference (stream, x, addr_offset) + FILE *stream; + rtx x; + int addr_offset; + { + rtx x0 = NULL_RTX; + rtx x1 = NULL_RTX; + + switch (GET_CODE (x)) + { + case SUBREG: + case REG: + x0 = x; + break; + + case PRE_MODIFY: /* (pre_modify (reg) (plus (reg) (reg))) */ + x0 = XEXP (x, 0); + x1 = XEXP (XEXP (x, 1), 1); + break; + + case CONST_INT: + x1 = x; + break; + + case PLUS: + x0 = XEXP (x, 0); + x1 = XEXP (x, 1); + if (GET_CODE (x0) == CONST_INT) + { + x0 = XEXP (x, 1); + x1 = XEXP (x, 0); + } + break; + + default: + fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); + break; + + } + + if (addr_offset) + { + if (!x1) + x1 = const0_rtx; + else if (GET_CODE (x1) != CONST_INT) + fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); + } + + fputs ("@(", stream); + if (!x0) + fputs (reg_names[GPR_R0], stream); + else if (GET_CODE (x0) == REG || GET_CODE (x0) == SUBREG) + frv_print_operand_memory_reference_reg (stream, x0); + else + fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); + + fputs (",", stream); + if (!x1) + fputs (reg_names [GPR_R0], stream); + + else + { + switch (GET_CODE (x1)) + { + case SUBREG: + case REG: + frv_print_operand_memory_reference_reg (stream, x1); + break; + + case CONST_INT: + fprintf (stream, "%ld", (long) (INTVAL (x1) + addr_offset)); + break; + + case SYMBOL_REF: + if (x0 && GET_CODE (x0) == REG && REGNO (x0) == SDA_BASE_REG + && symbol_ref_small_data_p (x1)) + { + fputs ("#gprel12(", stream); + assemble_name (stream, XSTR (x1, 0)); + fputs (")", stream); + } + else + fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); + break; + + case CONST: + if (x0 && GET_CODE (x0) == REG && REGNO (x0) == SDA_BASE_REG + && const_small_data_p (x1)) + { + fputs ("#gprel12(", stream); + assemble_name (stream, XSTR (XEXP (XEXP (x1, 0), 0), 0)); + fprintf (stream, "+%d)", INTVAL (XEXP (XEXP (x1, 0), 1))); + } + else + fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); + break; + + default: + fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); + } + } + + fputs (")", stream); + } + + + /* Return 2 for likely branches and 0 for non-likely branches */ + + #define FRV_JUMP_LIKELY 2 + #define FRV_JUMP_NOT_LIKELY 0 + + static int + frv_print_operand_jump_hint (insn) + rtx insn; + { + rtx note; + rtx labelref; + int ret; + HOST_WIDE_INT prob = -1; + enum { UNKNOWN, BACKWARD, FORWARD } jump_type = UNKNOWN; + + if (GET_CODE (insn) != JUMP_INSN) + abort (); + + /* Assume any non-conditional jump is likely. */ + if (! any_condjump_p (insn)) + ret = FRV_JUMP_LIKELY; + + else + { + labelref = condjump_label (insn); + if (labelref) + { + rtx label = XEXP (labelref, 0); + jump_type = (insn_current_address > INSN_ADDRESSES (INSN_UID (label)) + ? BACKWARD + : FORWARD); + } + + note = find_reg_note (insn, REG_BR_PROB, 0); + if (!note) + ret = ((jump_type == BACKWARD) ? FRV_JUMP_LIKELY : FRV_JUMP_NOT_LIKELY); + + else + { + prob = INTVAL (XEXP (note, 0)); + ret = ((prob >= (REG_BR_PROB_BASE / 2)) + ? FRV_JUMP_LIKELY + : FRV_JUMP_NOT_LIKELY); + } + } + + #if 0 + if (TARGET_DEBUG) + { + char *direction; + + switch (jump_type) + { + default: + case UNKNOWN: direction = "unknown jump direction"; break; + case BACKWARD: direction = "jump backward"; break; + case FORWARD: direction = "jump forward"; break; + } + + fprintf (stderr, + "%s: uid %ld, %s, probability = %ld, max prob. = %ld, hint = %d\n", + IDENTIFIER_POINTER (DECL_NAME (current_function_decl)), + (long)INSN_UID (insn), direction, (long)prob, + (long)REG_BR_PROB_BASE, ret); + } + #endif + + return ret; + } + + + /* Print an operand to an assembler instruction. + + `%' followed by a letter and a digit says to output an operand in an + alternate fashion. Four letters have standard, built-in meanings described + below. The machine description macro `PRINT_OPERAND' can define additional + letters with nonstandard meanings. + + `%cDIGIT' can be used to substitute an operand that is a constant value + without the syntax that normally indicates an immediate operand. + + `%nDIGIT' is like `%cDIGIT' except that the value of the constant is negated + before printing. + + `%aDIGIT' can be used to substitute an operand as if it were a memory + reference, with the actual operand treated as the address. This may be + useful when outputting a "load address" instruction, because often the + assembler syntax for such an instruction requires you to write the operand + as if it were a memory reference. + + `%lDIGIT' is used to substitute a `label_ref' into a jump instruction. + + `%=' outputs a number which is unique to each instruction in the entire + compilation. This is useful for making local labels to be referred to more + than once in a single template that generates multiple assembler + instructions. + + `%' followed by a punctuation character specifies a substitution that does + not use an operand. Only one case is standard: `%%' outputs a `%' into the + assembler code. Other nonstandard cases can be defined in the + `PRINT_OPERAND' macro. You must also define which punctuation characters + are valid with the `PRINT_OPERAND_PUNCT_VALID_P' macro. */ + + void + frv_print_operand (file, x, code) + FILE * file; + rtx x; + int code; + { + HOST_WIDE_INT value; + int offset; + + if (code != 0 && !isalpha (code)) + value = 0; + + else if (GET_CODE (x) == CONST_INT) + value = INTVAL (x); + + else if (GET_CODE (x) == CONST_DOUBLE) + { + if (GET_MODE (x) == SFmode) + { + REAL_VALUE_TYPE rv; + long l; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, x); + REAL_VALUE_TO_TARGET_SINGLE (rv, l); + value = l; + } + + else if (GET_MODE (x) == VOIDmode) + value = CONST_DOUBLE_LOW (x); + + else + fatal_insn ("Bad insn in frv_print_operand, bad const_double", x); + } + + else + value = 0; + + switch (code) + { + + case '.': + /* Output r0 */ + fputs (reg_names[GPR_R0], file); + break; + + case '#': + fprintf (file, "%d", frv_print_operand_jump_hint (current_output_insn)); + break; + + case SDATA_FLAG_CHAR: + /* Output small data area base register (gr16). */ + fputs (reg_names[SDA_BASE_REG], file); + break; + + case '~': + /* Output pic register (gr17). */ + fputs (reg_names[PIC_REGNO], file); + break; + + case '*': + /* Output the temporary integer CCR register */ + fputs (reg_names[ICR_TEMP], file); + break; + + case '&': + /* Output the temporary integer CC register */ + fputs (reg_names[ICC_TEMP], file); + break; + + /* case 'a': print an address */ + + case 'C': + /* Print appropriate test for integer branch false operation */ + switch (GET_CODE (x)) + { + default: + fatal_insn ("Bad insn to frv_print_operand, 'C' modifier:", x); + + case EQ: fputs ("ne", file); break; + case NE: fputs ("eq", file); break; + case LT: fputs ("ge", file); break; + case LE: fputs ("gt", file); break; + case GT: fputs ("le", file); break; + case GE: fputs ("lt", file); break; + case LTU: fputs ("nc", file); break; + case LEU: fputs ("hi", file); break; + case GTU: fputs ("ls", file); break; + case GEU: fputs ("c", file); break; + } + break; + + /* case 'c': print a constant without the constant prefix. If + CONSTANT_ADDRESS_P(x) is not true, PRINT_OPERAND is called. */ + + case 'c': + /* Print appropriate test for integer branch true operation */ + switch (GET_CODE (x)) + { + default: + fatal_insn ("Bad insn to frv_print_operand, 'c' modifier:", x); + + case EQ: fputs ("eq", file); break; + case NE: fputs ("ne", file); break; + case LT: fputs ("lt", file); break; + case LE: fputs ("le", file); break; + case GT: fputs ("gt", file); break; + case GE: fputs ("ge", file); break; + case LTU: fputs ("c", file); break; + case LEU: fputs ("ls", file); break; + case GTU: fputs ("hi", file); break; + case GEU: fputs ("nc", file); break; + } + break; + + case 'e': + /* Print 1 for a NE and 0 for an EQ to give the final argument + for a conditional instruction. */ + if (GET_CODE (x) == NE) + fputs ("1", file); + + else if (GET_CODE (x) == EQ) + fputs ("0", file); + + else + fatal_insn ("Bad insn to frv_print_operand, 'e' modifier:", x); + break; + + case 'F': + /* Print appropriate test for floating point branch false operation */ + switch (GET_CODE (x)) + { + default: + fatal_insn ("Bad insn to frv_print_operand, 'F' modifier:", x); + + case EQ: fputs ("ne", file); break; + case NE: fputs ("eq", file); break; + case LT: fputs ("uge", file); break; + case LE: fputs ("ug", file); break; + case GT: fputs ("ule", file); break; + case GE: fputs ("ul", file); break; + } + break; + + case 'f': + /* Print appropriate test for floating point branch true operation */ + switch (GET_CODE (x)) + { + default: + fatal_insn ("Bad insn to frv_print_operand, 'f' modifier:", x); + + case EQ: fputs ("eq", file); break; + case NE: fputs ("ne", file); break; + case LT: fputs ("lt", file); break; + case LE: fputs ("le", file); break; + case GT: fputs ("gt", file); break; + case GE: fputs ("ge", file); break; + } + break; + + case 'I': + /* Print 'i' if the operand is a constant, or is a memory reference that + adds a constant */ + if (GET_CODE (x) == MEM) + x = ((GET_CODE (XEXP (x, 0)) == PLUS) + ? XEXP (XEXP (x, 0), 1) + : XEXP (x, 0)); + + switch (GET_CODE (x)) + { + default: + break; + + case CONST_INT: + case SYMBOL_REF: + case CONST: + fputs ("i", file); + break; + } + break; + + case 'i': + /* For jump instructions, print 'i' if the operand is a constant or + is an expression that adds a constant */ + if (GET_CODE (x) == CONST_INT) + fputs ("i", file); + + else + { + if (GET_CODE (x) == CONST_INT + || (GET_CODE (x) == PLUS + && (GET_CODE (XEXP (x, 1)) == CONST_INT + || GET_CODE (XEXP (x, 0)) == CONST_INT))) + fputs ("i", file); + } + break; + + case 'L': + /* Print the lower register of a double word register pair */ + if (GET_CODE (x) == REG) + fputs (reg_names[ REGNO (x)+1 ], file); + else + fatal_insn ("Bad insn to frv_print_operand, 'L' modifier:", x); + break; + + /* case 'l': print a LABEL_REF */ + + case 'M': + case 'N': + /* Print a memory reference for ld/st/jmp, %N prints a memory reference + for the second word of double memory operations. */ + offset = (code == 'M') ? 0 : UNITS_PER_WORD; + switch (GET_CODE (x)) + { + default: + fatal_insn ("Bad insn to frv_print_operand, 'M/N' modifier:", x); + + case MEM: + frv_print_operand_memory_reference (file, XEXP (x, 0), offset); + break; + + case REG: + case SUBREG: + case CONST_INT: + case PLUS: + case SYMBOL_REF: + frv_print_operand_memory_reference (file, x, offset); + break; + } + break; + + case 'O': + /* Print the opcode of a command. */ + switch (GET_CODE (x)) + { + default: + fatal_insn ("Bad insn to frv_print_operand, 'O' modifier:", x); + + case PLUS: fputs ("add", file); break; + case MINUS: fputs ("sub", file); break; + case AND: fputs ("and", file); break; + case IOR: fputs ("or", file); break; + case XOR: fputs ("xor", file); break; + case ASHIFT: fputs ("sll", file); break; + case ASHIFTRT: fputs ("sra", file); break; + case LSHIFTRT: fputs ("srl", file); break; + } + break; + + /* case 'n': negate and print a constant int */ + + case 'P': + /* Print PIC label using operand as the number. */ + if (GET_CODE (x) != CONST_INT) + fatal_insn ("Bad insn to frv_print_operand, P modifier:", x); + + fprintf (file, ".LCF%ld", (long)INTVAL (x)); + break; + + case 'U': + /* Print 'u' if the operand is a update load/store */ + if (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == PRE_MODIFY) + fputs ("u", file); + break; + + case 'z': + /* If value is 0, print gr0, otherwise it must be a register */ + if (GET_CODE (x) == CONST_INT && INTVAL (x) == 0) + fputs (reg_names[GPR_R0], file); + + else if (GET_CODE (x) == REG) + fputs (reg_names [REGNO (x)], file); + + else + fatal_insn ("Bad insn in frv_print_operand, z case", x); + break; + + case 'x': + /* Print constant in hex */ + if (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE) + { + fprintf (file, "%s0x%.4lx", IMMEDIATE_PREFIX, (long) value); + break; + } + + /* fall through */ + + case '\0': + if (GET_CODE (x) == REG) + fputs (reg_names [REGNO (x)], file); + + else if (GET_CODE (x) == CONST_INT + || GET_CODE (x) == CONST_DOUBLE) + fprintf (file, "%s%ld", IMMEDIATE_PREFIX, (long) value); + + else if (GET_CODE (x) == MEM) + frv_print_operand_address (file, XEXP (x, 0)); + + else if (CONSTANT_ADDRESS_P (x)) + frv_print_operand_address (file, x); + + else + fatal_insn ("Bad insn in frv_print_operand, 0 case", x); + + break; + + default: + fatal_insn ("frv_print_operand: unknown code", x); + break; + } + + return; + } + + + /* A C statement (sans semicolon) for initializing the variable CUM for the + state at the beginning of the argument list. The variable has type + `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type + of the function which will receive the args, or 0 if the args are to a + compiler support library function. The value of INDIRECT is nonzero when + processing an indirect call, for example a call through a function pointer. + The value of INDIRECT is zero for a call to an explicitly named function, a + library function call, or when `INIT_CUMULATIVE_ARGS' is used to find + arguments for the function being compiled. + + When processing a call to a compiler support library function, LIBNAME + identifies which one. It is a `symbol_ref' rtx which contains the name of + the function, as a string. LIBNAME is 0 when an ordinary C function call is + being processed. Thus, each time this macro is called, either LIBNAME or + FNTYPE is nonzero, but never both of them at once. */ + + void + frv_init_cumulative_args (cum, fntype, libname, indirect, incoming) + CUMULATIVE_ARGS *cum; + tree fntype; + rtx libname; + int indirect; + int incoming; + { + *cum = FIRST_ARG_REGNUM; + + if (TARGET_DEBUG_ARG) + { + fprintf (stderr, "\ninit_cumulative_args:"); + if (indirect) + fputs (" indirect", stderr); + + if (incoming) + fputs (" incoming", stderr); + + if (fntype) + { + tree ret_type = TREE_TYPE (fntype); + fprintf (stderr, " return=%s,", + tree_code_name[ (int)TREE_CODE (ret_type) ]); + } + + if (libname && GET_CODE (libname) == SYMBOL_REF) + fprintf (stderr, " libname=%s", XSTR (libname, 0)); + + if (cfun->returns_struct) + fprintf (stderr, " return-struct"); + + putc ('\n', stderr); + } + } + + + /* If defined, a C expression that gives the alignment boundary, in bits, of an + argument with the specified mode and type. If it is not defined, + `PARM_BOUNDARY' is used for all arguments. */ + + int + frv_function_arg_boundary (mode, type) + enum machine_mode mode ATTRIBUTE_UNUSED; + tree type ATTRIBUTE_UNUSED; + { + return BITS_PER_WORD; + } + + + /* A C expression that controls whether a function argument is passed in a + register, and which register. + + The arguments are CUM, of type CUMULATIVE_ARGS, which summarizes (in a way + defined by INIT_CUMULATIVE_ARGS and FUNCTION_ARG_ADVANCE) all of the previous + arguments so far passed in registers; MODE, the machine mode of the argument; + TYPE, the data type of the argument as a tree node or 0 if that is not known + (which happens for C support library functions); and NAMED, which is 1 for an + ordinary argument and 0 for nameless arguments that correspond to `...' in the + called function's prototype. + + The value of the expression should either be a `reg' RTX for the hard + register in which to pass the argument, or zero to pass the argument on the + stack. + + For machines like the VAX and 68000, where normally all arguments are + pushed, zero suffices as a definition. + + The usual way to make the ANSI library `stdarg.h' work on a machine where + some arguments are usually passed in registers, is to cause nameless + arguments to be passed on the stack instead. This is done by making + `FUNCTION_ARG' return 0 whenever NAMED is 0. + + You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of + this macro to determine if this argument is of a type that must be passed in + the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' + returns nonzero for such an argument, the compiler will abort. If + `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the + stack and then loaded into a register. */ + + rtx + frv_function_arg (cum, mode, type, named, incoming) + CUMULATIVE_ARGS *cum; + enum machine_mode mode; + tree type ATTRIBUTE_UNUSED; + int named; + int incoming ATTRIBUTE_UNUSED; + { + enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; + int arg_num = *cum; + rtx ret; + const char *debstr; + + /* Return a marker for use in the call instruction. */ + if (xmode == VOIDmode) + { + ret = const0_rtx; + debstr = "<0>"; + } + + else if (arg_num <= LAST_ARG_REGNUM) + { + ret = gen_rtx (REG, xmode, arg_num); + debstr = reg_names[arg_num]; + } + + else + { + ret = NULL_RTX; + debstr = "memory"; + } + + if (TARGET_DEBUG_ARG) + fprintf (stderr, + "function_arg: words = %2d, mode = %4s, named = %d, size = %3d, arg = %s\n", + arg_num, GET_MODE_NAME (mode), named, GET_MODE_SIZE (mode), debstr); + + return ret; + } + + + /* A C statement (sans semicolon) to update the summarizer variable CUM to + advance past an argument in the argument list. The values MODE, TYPE and + NAMED describe that argument. Once this is done, the variable CUM is + suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. + + This macro need not do anything if the argument in question was passed on + the stack. The compiler knows how to track the amount of stack space used + for arguments without any special help. */ + + void + frv_function_arg_advance (cum, mode, type, named) + CUMULATIVE_ARGS *cum; + enum machine_mode mode; + tree type ATTRIBUTE_UNUSED; + int named; + { + enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; + int bytes = GET_MODE_SIZE (xmode); + int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + int arg_num = *cum; + + *cum = arg_num + words; + + if (TARGET_DEBUG_ARG) + fprintf (stderr, + "function_adv: words = %2d, mode = %4s, named = %d, size = %3d\n", + arg_num, GET_MODE_NAME (mode), named, words * UNITS_PER_WORD); + } + + + /* A C expression for the number of words, at the beginning of an argument, + must be put in registers. The value must be zero for arguments that are + passed entirely in registers or that are entirely pushed on the stack. + + On some machines, certain arguments must be passed partially in registers + and partially in memory. On these machines, typically the first N words of + arguments are passed in registers, and the rest on the stack. If a + multi-word argument (a `double' or a structure) crosses that boundary, its + first few words must be passed in registers and the rest must be pushed. + This macro tells the compiler when this occurs, and how many of the words + should go in registers. + + `FUNCTION_ARG' for these arguments should return the first register to be + used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for + the called function. */ + + int + frv_function_arg_partial_nregs (cum, mode, type, named) + CUMULATIVE_ARGS *cum; + enum machine_mode mode; + tree type ATTRIBUTE_UNUSED; + int named ATTRIBUTE_UNUSED; + { + enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; + int bytes = GET_MODE_SIZE (xmode); + int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + int arg_num = *cum; + int ret; + + ret = ((arg_num <= LAST_ARG_REGNUM && arg_num + words > LAST_ARG_REGNUM+1) + ? LAST_ARG_REGNUM - arg_num + 1 + : 0); + + if (TARGET_DEBUG_ARG && ret) + fprintf (stderr, "function_arg_partial_nregs: %d\n", ret); + + return ret; + + } + + + + /* A C expression that indicates when an argument must be passed by reference. + If nonzero for an argument, a copy of that argument is made in memory and a + pointer to the argument is passed instead of the argument itself. The + pointer is passed in whatever way is appropriate for passing a pointer to + that type. + + On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable + definition of this macro might be + #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ + MUST_PASS_IN_STACK (MODE, TYPE) */ + + int + frv_function_arg_pass_by_reference (cum, mode, type, named) + CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; + enum machine_mode mode; + tree type; + int named ATTRIBUTE_UNUSED; + { + return MUST_PASS_IN_STACK (mode, type); + } + + /* If defined, a C expression that indicates when it is the called function's + responsibility to make a copy of arguments passed by invisible reference. + Normally, the caller makes a copy and passes the address of the copy to the + routine being called. When FUNCTION_ARG_CALLEE_COPIES is defined and is + nonzero, the caller does not make a copy. Instead, it passes a pointer to + the "live" value. The called function must not modify this value. If it + can be determined that the value won't be modified, it need not make a copy; + otherwise a copy must be made. */ + + int + frv_function_arg_callee_copies (cum, mode, type, named) + CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + tree type ATTRIBUTE_UNUSED; + int named ATTRIBUTE_UNUSED; + { + return 0; + } + + /* If defined, a C expression that indicates when it is more desirable to keep + an argument passed by invisible reference as a reference, rather than + copying it to a pseudo register. */ + + int + frv_function_arg_keep_as_reference (cum, mode, type, named) + CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + tree type ATTRIBUTE_UNUSED; + int named ATTRIBUTE_UNUSED; + { + return 0; + } + + + /* Return true if a register is ok to use as a base or index register. */ + + static FRV_INLINE int + frv_regno_ok_for_base_p (regno, strict_p) + int regno; + int strict_p; + { + if (GPR_P (regno)) + return TRUE; + + if (strict_p) + return (reg_renumber[regno] >= 0 && GPR_P (reg_renumber[regno])); + + if (regno == ARG_POINTER_REGNUM) + return TRUE; + + return (regno >= FIRST_PSEUDO_REGISTER); + } + + + /* A C compound statement with a conditional `goto LABEL;' executed if X (an + RTX) is a legitimate memory address on the target machine for a memory + operand of mode MODE. + + It usually pays to define several simpler macros to serve as subroutines for + this one. Otherwise it may be too complicated to understand. + + This macro must exist in two variants: a strict variant and a non-strict + one. The strict variant is used in the reload pass. It must be defined so + that any pseudo-register that has not been allocated a hard register is + considered a memory reference. In contexts where some kind of register is + required, a pseudo-register with no hard register must be rejected. + + The non-strict variant is used in other passes. It must be defined to + accept all pseudo-registers in every context where some kind of register is + required. + + Compiler source files that want to use the strict variant of this macro + define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' + conditional to define the strict variant in that case and the non-strict + variant otherwise. + + Subroutines to check for acceptable registers for various purposes (one for + base registers, one for index registers, and so on) are typically among the + subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these + subroutine macros need have two variants; the higher levels of macros may be + the same whether strict or not. + + Normally, constant addresses which are the sum of a `symbol_ref' and an + integer are stored inside a `const' RTX to mark them as constant. + Therefore, there is no need to recognize such sums specifically as + legitimate addresses. Normally you would simply recognize any `const' as + legitimate. + + Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that + are not marked with `const'. It assumes that a naked `plus' indicates + indexing. If so, then you *must* reject such naked constant sums as + illegitimate addresses, so that none of them will be given to + `PRINT_OPERAND_ADDRESS'. + + On some machines, whether a symbolic address is legitimate depends on the + section that the address refers to. On these machines, define the macro + `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and + then check for it here. When you see a `const', you will have to look + inside it to find the `symbol_ref' in order to determine the section. + + The best way to modify the name string is by adding text to the beginning, + with suitable punctuation to prevent any ambiguity. Allocate the new name + in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to + remove and decode the added text and output the name accordingly, and define + `(* targetm.strip_name_encoding)' to access the original name string. + + You can check the information stored here into the `symbol_ref' in the + definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and + `PRINT_OPERAND_ADDRESS'. */ + + int + frv_legitimate_address_p (mode, x, strict_p, condexec_p) + enum machine_mode mode; + rtx x; + int strict_p; + int condexec_p; + { + rtx x0, x1; + int ret = 0; + HOST_WIDE_INT value; + unsigned regno0; + + switch (GET_CODE (x)) + { + default: + break; + + case SUBREG: + x = SUBREG_REG (x); + if (GET_CODE (x) != REG) + break; + + /* fall through */ + + case REG: + ret = frv_regno_ok_for_base_p (REGNO (x), strict_p); + break; + + case PRE_MODIFY: + x0 = XEXP (x, 0); + x1 = XEXP (x, 1); + if (GET_CODE (x0) != REG + || ! frv_regno_ok_for_base_p (REGNO (x0), strict_p) + || GET_CODE (x1) != PLUS + || ! rtx_equal_p (x0, XEXP (x1, 0)) + || GET_CODE (XEXP (x1, 1)) != REG + || ! frv_regno_ok_for_base_p (REGNO (XEXP (x1, 1)), strict_p)) + break; + + ret = 1; + break; + + case CONST_INT: + /* 12 bit immediate */ + if (condexec_p) + ret = FALSE; + else + { + ret = IN_RANGE_P (INTVAL (x), -2048, 2047); + + /* If we can't use load/store double operations, make sure we can + address the second word. */ + if (ret && GET_MODE_SIZE (mode) > UNITS_PER_WORD) + ret = IN_RANGE_P (INTVAL (x) + GET_MODE_SIZE (mode) - 1, + -2048, 2047); + } + break; + + case PLUS: + x0 = XEXP (x, 0); + x1 = XEXP (x, 1); + + if (GET_CODE (x0) == SUBREG) + x0 = SUBREG_REG (x0); + + if (GET_CODE (x0) != REG) + break; + + regno0 = REGNO (x0); + if (!frv_regno_ok_for_base_p (regno0, strict_p)) + break; + + switch (GET_CODE (x1)) + { + default: + break; + + case SUBREG: + x1 = SUBREG_REG (x1); + if (GET_CODE (x1) != REG) + break; + + /* fall through */ + + case REG: + /* Do not allow reg+reg addressing for modes > 1 word if we can't depend + on having move double instructions */ + if (GET_MODE_SIZE (mode) > UNITS_PER_WORD) + ret = FALSE; + else + ret = frv_regno_ok_for_base_p (REGNO (x1), strict_p); + break; + + case CONST_INT: + /* 12 bit immediate */ + if (condexec_p) + ret = FALSE; + else + { + value = INTVAL (x1); + ret = IN_RANGE_P (value, -2048, 2047); + + /* If we can't use load/store double operations, make sure we can + address the second word. */ + if (ret && GET_MODE_SIZE (mode) > UNITS_PER_WORD) + ret = IN_RANGE_P (value + GET_MODE_SIZE (mode) - 1, -2048, 2047); + } + break; + + case SYMBOL_REF: + if (!condexec_p + && regno0 == SDA_BASE_REG + && symbol_ref_small_data_p (x1)) + ret = TRUE; + break; + + case CONST: + if (!condexec_p && regno0 == SDA_BASE_REG && const_small_data_p (x1)) + ret = TRUE; + break; + + } + break; + } + + if (TARGET_DEBUG_ADDR) + { + fprintf (stderr, "\n========== GO_IF_LEGITIMATE_ADDRESS, mode = %s, result = %d, addresses are %sstrict%s\n", + GET_MODE_NAME (mode), ret, (strict_p) ? "" : "not ", + (condexec_p) ? ", inside conditional code" : ""); + debug_rtx (x); + } + + return ret; + } + + + /* A C compound statement that attempts to replace X with a valid memory + address for an operand of mode MODE. WIN will be a C statement label + elsewhere in the code; the macro definition may use + + GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); + + to avoid further processing if the address has become legitimate. + + X will always be the result of a call to `break_out_memory_refs', and OLDX + will be the operand that was given to that function to produce X. + + The code generated by this macro should not alter the substructure of X. If + it transforms X into a more legitimate form, it should assign X (which will + always be a C variable) a new value. + + It is not necessary for this macro to come up with a legitimate address. + The compiler has standard ways of doing so in all cases. In fact, it is + safe for this macro to do nothing. But often a machine-dependent strategy + can generate better code. */ + + rtx + frv_legitimize_address (x, oldx, mode) + rtx x; + rtx oldx ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + rtx ret = NULL_RTX; + + /* Don't try to legitimize addresses if we are not optimizing, since the + address we generate is not a general operand, and will horribly mess + things up when force_reg is called to try and put it in a register because + we aren't optimizing. */ + if (optimize + && ((GET_CODE (x) == SYMBOL_REF && symbol_ref_small_data_p (x)) + || (GET_CODE (x) == CONST && const_small_data_p (x)))) + { + ret = gen_rtx_PLUS (Pmode, gen_rtx_REG (Pmode, SDA_BASE_REG), x); + if (flag_pic) + cfun->uses_pic_offset_table = TRUE; + } + + if (TARGET_DEBUG_ADDR && ret != NULL_RTX) + { + fprintf (stderr, "\n========== LEGITIMIZE_ADDRESS, mode = %s, modified address\n", + GET_MODE_NAME (mode)); + debug_rtx (ret); + } + + return ret; + } + + /* Return 1 if operand is a valid FRV address. CONDEXEC_P is true if + the operand is used by a predicated instruction. */ + + static int + frv_legitimate_memory_operand (op, mode, condexec_p) + rtx op; + enum machine_mode mode; + int condexec_p; + { + return ((GET_MODE (op) == mode || mode == VOIDmode) + && GET_CODE (op) == MEM + && frv_legitimate_address_p (mode, XEXP (op, 0), + reload_completed, condexec_p)); + } + + + /* Return 1 is OP is a memory operand, or will be turned into one by + reload. */ + + int frv_load_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (reload_in_progress) + { + rtx tmp = op; + if (GET_CODE (tmp) == SUBREG) + tmp = SUBREG_REG (tmp); + if (GET_CODE (tmp) == REG + && REGNO (tmp) >= FIRST_PSEUDO_REGISTER) + op = reg_equiv_memory_loc[REGNO (tmp)]; + } + + return op && memory_operand (op, mode); + } + + + /* Return 1 if operand is a GPR register or a FPR register. */ + + int gpr_or_fpr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (GPR_P (regno) || FPR_P (regno) || regno >= FIRST_PSEUDO_REGISTER) + return TRUE; + + return FALSE; + } + + /* Return 1 if operand is a GPR register or 12 bit signed immediate. */ + + int gpr_or_int12_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT) + return IN_RANGE_P (INTVAL (op), -2048, 2047); + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + return GPR_OR_PSEUDO_P (REGNO (op)); + } + + /* Return 1 if operand is a GPR register, or a FPR register, or a 12 bit + signed immediate. */ + + int gpr_fpr_or_int12_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_CODE (op) == CONST_INT) + return IN_RANGE_P (INTVAL (op), -2048, 2047); + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (GPR_P (regno) || FPR_P (regno) || regno >= FIRST_PSEUDO_REGISTER) + return TRUE; + + return FALSE; + } + + /* Return 1 if operand is a register or 6 bit signed immediate. */ + + int fpr_or_int6_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT) + return IN_RANGE_P (INTVAL (op), -32, 31); + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + return FPR_OR_PSEUDO_P (REGNO (op)); + } + + /* Return 1 if operand is a register or 10 bit signed immediate. */ + + int gpr_or_int10_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT) + return IN_RANGE_P (INTVAL (op), -512, 511); + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + return GPR_OR_PSEUDO_P (REGNO (op)); + } + + /* Return 1 if operand is a register or an integer immediate. */ + + int gpr_or_int_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT) + return TRUE; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + return GPR_OR_PSEUDO_P (REGNO (op)); + } + + /* Return 1 if operand is a 12 bit signed immediate. */ + + int int12_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (GET_CODE (op) != CONST_INT) + return FALSE; + + return IN_RANGE_P (INTVAL (op), -2048, 2047); + } + + /* Return 1 if operand is a 6 bit signed immediate. */ + + int int6_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (GET_CODE (op) != CONST_INT) + return FALSE; + + return IN_RANGE_P (INTVAL (op), -32, 31); + } + + /* Return 1 if operand is a 5 bit signed immediate. */ + + int int5_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), -16, 15); + } + + /* Return 1 if operand is a 5 bit unsigned immediate. */ + + int uint5_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), 0, 31); + } + + /* Return 1 if operand is a 4 bit unsigned immediate. */ + + int uint4_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), 0, 15); + } + + /* Return 1 if operand is a 1 bit unsigned immediate (0 or 1). */ + + int uint1_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), 0, 1); + } + + /* Return 1 if operand is an integer constant that takes 2 instructions + to load up and can be split into sethi/setlo instructions.. */ + + int int_2word_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + HOST_WIDE_INT value; + REAL_VALUE_TYPE rv; + long l; + + switch (GET_CODE (op)) + { + default: + break; + + case LABEL_REF: + return (flag_pic == 0); + + case CONST: + /* small data references are already 1 word */ + return (flag_pic == 0) && (! const_small_data_p (op)); + + case SYMBOL_REF: + /* small data references are already 1 word */ + return (flag_pic == 0) && (! symbol_ref_small_data_p (op)); + + case CONST_INT: + return ! IN_RANGE_P (INTVAL (op), -32768, 32767); + + case CONST_DOUBLE: + if (GET_MODE (op) == SFmode) + { + REAL_VALUE_FROM_CONST_DOUBLE (rv, op); + REAL_VALUE_TO_TARGET_SINGLE (rv, l); + value = l; + return ! IN_RANGE_P (value, -32768, 32767); + } + else if (GET_MODE (op) == VOIDmode) + { + value = CONST_DOUBLE_LOW (op); + return ! IN_RANGE_P (value, -32768, 32767); + } + break; + } + + return FALSE; + } + + /* Return 1 if operand is the pic address register. */ + int + pic_register_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (! flag_pic) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + if (REGNO (op) != PIC_REGNO) + return FALSE; + + return TRUE; + } + + /* Return 1 if operand is a symbolic reference when a PIC option is specified + that takes 3 seperate instructions to form. */ + + int pic_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (! flag_pic) + return FALSE; + + switch (GET_CODE (op)) + { + default: + break; + + case LABEL_REF: + return TRUE; + + case SYMBOL_REF: + /* small data references are already 1 word */ + return ! symbol_ref_small_data_p (op); + + case CONST: + /* small data references are already 1 word */ + return ! const_small_data_p (op); + } + + return FALSE; + } + + /* Return 1 if operand is the small data register. */ + int + small_data_register_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (GET_CODE (op) != REG) + return FALSE; + + if (REGNO (op) != SDA_BASE_REG) + return FALSE; + + return TRUE; + } + + /* Return 1 if operand is a symbolic reference to a small data area static or + global object. */ + + int small_data_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + switch (GET_CODE (op)) + { + default: + break; + + case CONST: + return const_small_data_p (op); + + case SYMBOL_REF: + return symbol_ref_small_data_p (op); + } + + return FALSE; + } + + /* Return 1 if operand is a 16 bit unsigned immediate */ + + int uint16_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (GET_CODE (op) != CONST_INT) + return FALSE; + + return IN_RANGE_P (INTVAL (op), 0, 0xffff); + } + + /* Return 1 if operand is an integer constant with the bottom 16 bits clear */ + + int upper_int16_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (GET_CODE (op) != CONST_INT) + return FALSE; + + return ((INTVAL (op) & 0xffff) == 0); + } + + /* Return true if operand is a GPR register. */ + + int + integer_register_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + return GPR_OR_PSEUDO_P (REGNO (op)); + } + + /* Return true if operand is a GPR register. Do not allow SUBREG's + here, in order to prevent a combine bug. */ + + int + gpr_no_subreg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + return GPR_OR_PSEUDO_P (REGNO (op)); + } + + /* Return true if operand is a FPR register. */ + + int + fpr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + return FPR_OR_PSEUDO_P (REGNO (op)); + } + + /* Return true if operand is an even GPR or FPR register. */ + + int + even_reg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (regno >= FIRST_PSEUDO_REGISTER) + return TRUE; + + if (GPR_P (regno)) + return (((regno - GPR_FIRST) & 1) == 0); + + if (FPR_P (regno)) + return (((regno - FPR_FIRST) & 1) == 0); + + return FALSE; + } + + /* Return true if operand is an odd GPR register. */ + + int + odd_reg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + /* assume that reload will give us an even register */ + if (regno >= FIRST_PSEUDO_REGISTER) + return FALSE; + + if (GPR_P (regno)) + return (((regno - GPR_FIRST) & 1) != 0); + + if (FPR_P (regno)) + return (((regno - FPR_FIRST) & 1) != 0); + + return FALSE; + } + + /* Return true if operand is an even GPR register. */ + + int + even_gpr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (regno >= FIRST_PSEUDO_REGISTER) + return TRUE; + + if (! GPR_P (regno)) + return FALSE; + + return (((regno - GPR_FIRST) & 1) == 0); + } + + /* Return true if operand is an odd GPR register. */ + + int + odd_gpr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + /* assume that reload will give us an even register */ + if (regno >= FIRST_PSEUDO_REGISTER) + return FALSE; + + if (! GPR_P (regno)) + return FALSE; + + return (((regno - GPR_FIRST) & 1) != 0); + } + + /* Return true if operand is a quad aligned FPR register. */ + + int + quad_fpr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (regno >= FIRST_PSEUDO_REGISTER) + return TRUE; + + if (! FPR_P (regno)) + return FALSE; + + return (((regno - FPR_FIRST) & 3) == 0); + } + + /* Return true if operand is an even FPR register. */ + + int + even_fpr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (regno >= FIRST_PSEUDO_REGISTER) + return TRUE; + + if (! FPR_P (regno)) + return FALSE; + + return (((regno - FPR_FIRST) & 1) == 0); + } + + /* Return true if operand is an odd FPR register. */ + + int + odd_fpr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + /* assume that reload will give us an even register */ + if (regno >= FIRST_PSEUDO_REGISTER) + return FALSE; + + if (! FPR_P (regno)) + return FALSE; + + return (((regno - FPR_FIRST) & 1) != 0); + } + + /* Return true if operand is a 2 word memory address that can be loaded in one + instruction to load or store. We assume the stack and frame pointers are + suitably aligned, and variables in the small data area. FIXME -- at some we + should recognize other globals and statics. We can't assume that any old + pointer is aligned, given that arguments could be passed on an odd word on + the stack and the address taken and passed through to another function. */ + + int + dbl_memory_one_insn_operand (op, mode) + rtx op; + enum machine_mode mode; + { + rtx addr; + rtx addr_reg; + + if (! TARGET_DWORD) + return FALSE; + + if (GET_CODE (op) != MEM) + return FALSE; + + if (mode != VOIDmode && GET_MODE_SIZE (mode) != 2*UNITS_PER_WORD) + return FALSE; + + addr = XEXP (op, 0); + if (GET_CODE (addr) == REG) + addr_reg = addr; + + else if (GET_CODE (addr) == PLUS) + { + rtx addr0 = XEXP (addr, 0); + rtx addr1 = XEXP (addr, 1); + + if (GET_CODE (addr0) != REG) + return FALSE; + + if (plus_small_data_p (addr0, addr1)) + return TRUE; + + if (GET_CODE (addr1) != CONST_INT) + return FALSE; + + if ((INTVAL (addr1) & 7) != 0) + return FALSE; + + addr_reg = addr0; + } + + else + return FALSE; + + if (addr_reg == frame_pointer_rtx || addr_reg == stack_pointer_rtx) + return TRUE; + + return FALSE; + } + + /* Return true if operand is a 2 word memory address that needs to + use two instructions to load or store. */ + + int + dbl_memory_two_insn_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) != MEM) + return FALSE; + + if (mode != VOIDmode && GET_MODE_SIZE (mode) != 2*UNITS_PER_WORD) + return FALSE; + + if (! TARGET_DWORD) + return TRUE; + + return ! dbl_memory_one_insn_operand (op, mode); + } + + /* Return true if operand is something that can be an output for a move + operation. */ + + int + move_destination_operand (op, mode) + rtx op; + enum machine_mode mode; + { + rtx subreg; + enum rtx_code code; + + switch (GET_CODE (op)) + { + default: + break; + + case SUBREG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + subreg = SUBREG_REG (op); + code = GET_CODE (subreg); + if (code == MEM) + return frv_legitimate_address_p (mode, XEXP (subreg, 0), + reload_completed, FALSE); + + return (code == REG); + + case REG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + return TRUE; + + case MEM: + if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) + return TRUE; + + return frv_legitimate_memory_operand (op, mode, FALSE); + } + + return FALSE; + } + + /* Return true if operand is something that can be an input for a move + operation. */ + + int + move_source_operand (op, mode) + rtx op; + enum machine_mode mode; + { + rtx subreg; + enum rtx_code code; + + switch (GET_CODE (op)) + { + default: + break; + + case CONST_INT: + case CONST_DOUBLE: + case SYMBOL_REF: + case LABEL_REF: + case CONST: + return immediate_operand (op, mode); + + case SUBREG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + subreg = SUBREG_REG (op); + code = GET_CODE (subreg); + if (code == MEM) + return frv_legitimate_address_p (mode, XEXP (subreg, 0), + reload_completed, FALSE); + + return (code == REG); + + case REG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + return TRUE; + + case MEM: + if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) + return TRUE; + + return frv_legitimate_memory_operand (op, mode, FALSE); + } + + return FALSE; + } + + /* Return true if operand is something that can be an output for a conditional + move operation. */ + + int + condexec_dest_operand (op, mode) + rtx op; + enum machine_mode mode; + { + rtx subreg; + enum rtx_code code; + + switch (GET_CODE (op)) + { + default: + break; + + case SUBREG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + subreg = SUBREG_REG (op); + code = GET_CODE (subreg); + if (code == MEM) + return frv_legitimate_address_p (mode, XEXP (subreg, 0), + reload_completed, TRUE); + + return (code == REG); + + case REG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + return TRUE; + + case MEM: + if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) + return TRUE; + + return frv_legitimate_memory_operand (op, mode, TRUE); + } + + return FALSE; + } + + /* Return true if operand is something that can be an input for a conditional + move operation. */ + + int + condexec_source_operand (op, mode) + rtx op; + enum machine_mode mode; + { + rtx subreg; + enum rtx_code code; + + switch (GET_CODE (op)) + { + default: + break; + + case CONST_INT: + case CONST_DOUBLE: + return ZERO_P (op); + + case SUBREG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + subreg = SUBREG_REG (op); + code = GET_CODE (subreg); + if (code == MEM) + return frv_legitimate_address_p (mode, XEXP (subreg, 0), + reload_completed, TRUE); + + return (code == REG); + + case REG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + return TRUE; + + case MEM: + if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) + return TRUE; + + return frv_legitimate_memory_operand (op, mode, TRUE); + } + + return FALSE; + } + + /* Return true if operand is a register of any flavor or a 0 of the + appropriate type. */ + + int + reg_or_0_operand (op, mode) + rtx op; + enum machine_mode mode; + { + switch (GET_CODE (op)) + { + default: + break; + + case REG: + case SUBREG: + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + return register_operand (op, mode); + + case CONST_INT: + case CONST_DOUBLE: + return ZERO_P (op); + } + + return FALSE; + } + + /* Return true if operand is the link register */ + + int + lr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) != REG) + return FALSE; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (REGNO (op) != LR_REGNO && REGNO (op) < FIRST_PSEUDO_REGISTER) + return FALSE; + + return TRUE; + } + + /* Return true if operand is a gpr register or a valid memory operation. */ + + int + gpr_or_memory_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (integer_register_operand (op, mode) + || frv_legitimate_memory_operand (op, mode, FALSE)); + } + + /* Return true if operand is a fpr register or a valid memory operation. */ + + int + fpr_or_memory_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (fpr_operand (op, mode) + || frv_legitimate_memory_operand (op, mode, FALSE)); + } + + /* Return true if operand is an icc register */ + + int + icc_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + return ICC_OR_PSEUDO_P (regno); + } + + /* Return true if operand is an fcc register */ + + int + fcc_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + return FCC_OR_PSEUDO_P (regno); + } + + /* Return true if operand is either an fcc or icc register */ + + int + cc_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (CC_OR_PSEUDO_P (regno)) + return TRUE; + + return FALSE; + } + + /* Return true if operand is an integer CCR register */ + + int + icr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + return ICR_OR_PSEUDO_P (regno); + } + + /* Return true if operand is an fcc register */ + + int + fcr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + return FCR_OR_PSEUDO_P (regno); + } + + /* Return true if operand is either an fcc or icc register */ + + int + cr_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + if (CR_OR_PSEUDO_P (regno)) + return TRUE; + + return FALSE; + } + + /* Return true if operand is a memory reference suitable for a call. */ + + int + call_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode && mode != VOIDmode && GET_CODE (op) != CONST_INT) + return FALSE; + + if (GET_CODE (op) == SYMBOL_REF) + return TRUE; + + /* Note this doesn't allow reg+reg or reg+imm12 addressing (which should + never occur anyway), but prevents reload from not handling the case + properly of a call through a pointer on a function that calls + vfork/setjmp, etc. due to the need to flush all of the registers to stack. */ + return gpr_or_int12_operand (op, mode); + } + + /* Return true if operator is an kind of relational operator */ + + int + relational_operator (op, mode) + rtx op; + enum machine_mode mode; + { + rtx op0; + rtx op1; + int regno; + + if (mode != VOIDmode && mode != GET_MODE (op)) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case EQ: + case NE: + case LE: + case LT: + case GE: + case GT: + case LEU: + case LTU: + case GEU: + case GTU: + break; + } + + op1 = XEXP (op, 1); + if (op1 != const0_rtx) + return FALSE; + + op0 = XEXP (op, 0); + if (GET_CODE (op0) != REG) + return FALSE; + + regno = REGNO (op0); + switch (GET_MODE (op0)) + { + default: + break; + + case CCmode: + case CC_UNSmode: + return ICC_OR_PSEUDO_P (regno); + + case CC_FPmode: + return FCC_OR_PSEUDO_P (regno); + + case CC_CCRmode: + return CR_OR_PSEUDO_P (regno); + } + + return FALSE; + } + + /* Return true if operator is a signed integer relational operator */ + + int + signed_relational_operator (op, mode) + rtx op; + enum machine_mode mode; + { + rtx op0; + rtx op1; + int regno; + + if (mode != VOIDmode && mode != GET_MODE (op)) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case EQ: + case NE: + case LE: + case LT: + case GE: + case GT: + break; + } + + op1 = XEXP (op, 1); + if (op1 != const0_rtx) + return FALSE; + + op0 = XEXP (op, 0); + if (GET_CODE (op0) != REG) + return FALSE; + + regno = REGNO (op0); + if (GET_MODE (op0) == CCmode && ICC_OR_PSEUDO_P (regno)) + return TRUE; + + if (GET_MODE (op0) == CC_CCRmode && CR_OR_PSEUDO_P (regno)) + return TRUE; + + return FALSE; + } + + /* Return true if operator is a signed integer relational operator */ + + int + unsigned_relational_operator (op, mode) + rtx op; + enum machine_mode mode; + { + rtx op0; + rtx op1; + int regno; + + if (mode != VOIDmode && mode != GET_MODE (op)) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case LEU: + case LTU: + case GEU: + case GTU: + break; + } + + op1 = XEXP (op, 1); + if (op1 != const0_rtx) + return FALSE; + + op0 = XEXP (op, 0); + if (GET_CODE (op0) != REG) + return FALSE; + + regno = REGNO (op0); + if (GET_MODE (op0) == CC_UNSmode && ICC_OR_PSEUDO_P (regno)) + return TRUE; + + if (GET_MODE (op0) == CC_CCRmode && CR_OR_PSEUDO_P (regno)) + return TRUE; + + return FALSE; + } + + /* Return true if operator is a floating point relational operator */ + + int + float_relational_operator (op, mode) + rtx op; + enum machine_mode mode; + { + rtx op0; + rtx op1; + int regno; + + if (mode != VOIDmode && mode != GET_MODE (op)) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case EQ: case NE: + case LE: case LT: + case GE: case GT: + #if 0 + case UEQ: case UNE: + case ULE: case ULT: + case UGE: case UGT: + case ORDERED: + case UNORDERED: + #endif + break; + } + + op1 = XEXP (op, 1); + if (op1 != const0_rtx) + return FALSE; + + op0 = XEXP (op, 0); + if (GET_CODE (op0) != REG) + return FALSE; + + regno = REGNO (op0); + if (GET_MODE (op0) == CC_FPmode && FCC_OR_PSEUDO_P (regno)) + return TRUE; + + if (GET_MODE (op0) == CC_CCRmode && CR_OR_PSEUDO_P (regno)) + return TRUE; + + return FALSE; + } + + /* Return true if operator is EQ/NE of a conditional execution register. */ + + int + ccr_eqne_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + rtx op0; + rtx op1; + int regno; + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case EQ: + case NE: + break; + } + + op1 = XEXP (op, 1); + if (op1 != const0_rtx) + return FALSE; + + op0 = XEXP (op, 0); + if (GET_CODE (op0) != REG) + return FALSE; + + regno = REGNO (op0); + if (op_mode == CC_CCRmode && CR_OR_PSEUDO_P (regno)) + return TRUE; + + return FALSE; + } + + /* Return true if operator is a minimum or maximum operator (both signed and + unsigned). */ + + int + minmax_operator (op, mode) + rtx op; + enum machine_mode mode; + { + if (mode != VOIDmode && mode != GET_MODE (op)) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case SMIN: + case SMAX: + case UMIN: + case UMAX: + break; + } + + if (! integer_register_operand (XEXP (op, 0), mode)) + return FALSE; + + if (! gpr_or_int10_operand (XEXP (op, 1), mode)) + return FALSE; + + return TRUE; + } + + /* Return true if operator is an integer binary operator that can executed + conditionally and takes 1 cycle. */ + + int + condexec_si_binary_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case PLUS: + case MINUS: + case AND: + case IOR: + case XOR: + case ASHIFT: + case ASHIFTRT: + case LSHIFTRT: + return TRUE; + } + } + + /* Return true if operator is an integer binary operator that can be + executed conditionally by a media instruction. */ + + int + condexec_si_media_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case AND: + case IOR: + case XOR: + return TRUE; + } + } + + /* Return true if operator is an integer division operator that can executed + conditionally. */ + + int + condexec_si_divide_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case DIV: + case UDIV: + return TRUE; + } + } + + /* Return true if operator is an integer unary operator that can executed + conditionally. */ + + int + condexec_si_unary_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case NEG: + case NOT: + return TRUE; + } + } + + /* Return true if operator is a conversion-type expression that can be + evaluated conditionally by floating-point instructions. */ + + int + condexec_sf_conv_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case NEG: + case ABS: + return TRUE; + } + } + + /* Return true if operator is an addition or subtraction expression. + Such expressions can be evaluated conditionally by floating-point + instructions. */ + + int + condexec_sf_add_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case PLUS: + case MINUS: + return TRUE; + } + } + + /* Return true if the memory operand is one that can be conditionally + executed. */ + + int + condexec_memory_operand (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + rtx addr; + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (op_mode) + { + default: + return FALSE; + + case QImode: + case HImode: + case SImode: + case SFmode: + break; + } + + if (GET_CODE (op) != MEM) + return FALSE; + + addr = XEXP (op, 0); + if (GET_CODE (addr) == ADDRESSOF) + return TRUE; + + return frv_legitimate_address_p (mode, addr, reload_completed, TRUE); + } + + /* Return true if operator is an integer binary operator that can be combined + with a setcc operation. Do not allow the arithmetic operations that could + potentially overflow since the FR-V sets the condition code based on the + "true" value of the result, not the result after truncating to a 32-bit + register. */ + + int + intop_compare_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case AND: + case IOR: + case XOR: + case ASHIFTRT: + case LSHIFTRT: + break; + } + + if (! integer_register_operand (XEXP (op, 0), SImode)) + return FALSE; + + if (! gpr_or_int10_operand (XEXP (op, 1), SImode)) + return FALSE; + + return TRUE; + } + + /* Return true if operator is an integer binary operator that can be combined + with a setcc operation inside of a conditional execution. */ + + int + condexec_intop_cmp_operator (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (mode != VOIDmode && op_mode != mode) + return FALSE; + + switch (GET_CODE (op)) + { + default: + return FALSE; + + case AND: + case IOR: + case XOR: + case ASHIFTRT: + case LSHIFTRT: + break; + } + + if (! integer_register_operand (XEXP (op, 0), SImode)) + return FALSE; + + if (! integer_register_operand (XEXP (op, 1), SImode)) + return FALSE; + + return TRUE; + } + + /* Return 1 if operand is a valid ACC register number */ + + int + acc_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + return ACC_OR_PSEUDO_P (regno); + } + + /* Return 1 if operand is a valid even ACC register number */ + + int + even_acc_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + return (ACC_OR_PSEUDO_P (regno) && ((regno - ACC_FIRST) & 1) == 0); + } + + /* Return 1 if operand is zero or four */ + + int + quad_acc_operand (op, mode) + rtx op; + enum machine_mode mode; + { + int regno; + + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + regno = REGNO (op); + return (ACC_OR_PSEUDO_P (regno) && ((regno - ACC_FIRST) & 3) == 0); + } + + /* Return 1 if operand is a valid ACCG register number */ + + int + accg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode && mode != VOIDmode) + return FALSE; + + if (GET_CODE (op) == SUBREG) + { + if (GET_CODE (SUBREG_REG (op)) != REG) + return register_operand (op, mode); + + op = SUBREG_REG (op); + } + + if (GET_CODE (op) != REG) + return FALSE; + + return ACCG_OR_PSEUDO_P (REGNO (op)); + } + + + /* Return true if the bare return instruction can be used outside of the + epilog code. For frv, we only do it if there was no stack allocation. */ + + int + direct_return_p () + { + frv_stack_t *info; + + if (!reload_completed) + return FALSE; + + info = frv_stack_info (); + return (info->total_size == 0); + } + + + /* Emit code to handle a MOVSI, adding in the small data register or pic + register if needed to load up addresses. Return TRUE if the appropriate + instructions are emitted. */ + + int + frv_emit_movsi (dest, src) + rtx dest; + rtx src; + { + int base_regno = -1; + + if (!reload_in_progress + && !reload_completed + && !register_operand (dest, SImode) + && (!reg_or_0_operand (src, SImode) + /* Virtual registers will almost always be replaced by an + add instruction, so expose this to CSE by copying to + an intermediate register */ + || (GET_CODE (src) == REG + && IN_RANGE_P (REGNO (src), + FIRST_VIRTUAL_REGISTER, + LAST_VIRTUAL_REGISTER)))) + { + emit_insn (gen_rtx_SET (VOIDmode, dest, copy_to_mode_reg (SImode, src))); + return TRUE; + } + + /* Explicitly add in the PIC or small data register if needed. */ + switch (GET_CODE (src)) + { + default: + break; + + case LABEL_REF: + if (flag_pic) + base_regno = PIC_REGNO; + + break; + + case CONST: + if (const_small_data_p (src)) + base_regno = SDA_BASE_REG; + + else if (flag_pic) + base_regno = PIC_REGNO; + + break; + + case SYMBOL_REF: + if (symbol_ref_small_data_p (src)) + base_regno = SDA_BASE_REG; + + else if (flag_pic) + base_regno = PIC_REGNO; + + break; + } + + if (base_regno >= 0) + { + emit_insn (gen_rtx_SET (VOIDmode, dest, + gen_rtx_PLUS (Pmode, + gen_rtx_REG (Pmode, base_regno), + src))); + + if (base_regno == PIC_REGNO) + cfun->uses_pic_offset_table = TRUE; + + return TRUE; + } + + return FALSE; + } + + + /* Return a string to output a single word move. */ + + const char * + output_move_single (operands, insn) + rtx operands[]; + rtx insn; + { + rtx dest = operands[0]; + rtx src = operands[1]; + + if (GET_CODE (dest) == REG) + { + int dest_regno = REGNO (dest); + enum machine_mode mode = GET_MODE (dest); + + if (GPR_P (dest_regno)) + { + if (GET_CODE (src) == REG) + { + /* gpr <- some sort of register */ + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + return "mov %1, %0"; + + else if (FPR_P (src_regno)) + return "movfg %1, %0"; + + else if (SPR_P (src_regno)) + return "movsg %1, %0"; + } + + else if (GET_CODE (src) == MEM) + { + /* gpr <- memory */ + switch (mode) + { + default: + break; + + case QImode: + return "ldsb%I1%U1 %M1,%0"; + + case HImode: + return "ldsh%I1%U1 %M1,%0"; + + case SImode: + case SFmode: + return "ld%I1%U1 %M1, %0"; + } + } + + else if (GET_CODE (src) == CONST_INT + || GET_CODE (src) == CONST_DOUBLE) + { + /* gpr <- integer/floating constant */ + HOST_WIDE_INT value; + + if (GET_CODE (src) == CONST_INT) + value = INTVAL (src); + + else if (mode == SFmode) + { + REAL_VALUE_TYPE rv; + long l; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, src); + REAL_VALUE_TO_TARGET_SINGLE (rv, l); + value = l; + } + + else + value = CONST_DOUBLE_LOW (src); + + if (IN_RANGE_P (value, -32768, 32767)) + return "setlos %1, %0"; + + return "#"; + } + + else if (GET_CODE (src) == SYMBOL_REF + || GET_CODE (src) == LABEL_REF + || GET_CODE (src) == CONST) + { + /* Silently fix up instances where the small data pointer is not + used in the address. */ + if (small_data_symbolic_operand (src, GET_MODE (src))) + return "addi %@, #gprel12(%1), %0"; + + return "#"; + } + } + + else if (FPR_P (dest_regno)) + { + if (GET_CODE (src) == REG) + { + /* fpr <- some sort of register */ + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + return "movgf %1, %0"; + + else if (FPR_P (src_regno)) + { + if (TARGET_HARD_FLOAT) + return "fmovs %1, %0"; + else + return "mor %1, %1, %0"; + } + } + + else if (GET_CODE (src) == MEM) + { + /* fpr <- memory */ + switch (mode) + { + default: + break; + + case QImode: + return "ldbf%I1%U1 %M1,%0"; + + case HImode: + return "ldhf%I1%U1 %M1,%0"; + + case SImode: + case SFmode: + return "ldf%I1%U1 %M1, %0"; + } + } + + else if (ZERO_P (src)) + return "movgf %., %0"; + } + + else if (SPR_P (dest_regno)) + { + if (GET_CODE (src) == REG) + { + /* spr <- some sort of register */ + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + return "movgs %1, %0"; + } + } + } + + else if (GET_CODE (dest) == MEM) + { + if (GET_CODE (src) == REG) + { + int src_regno = REGNO (src); + enum machine_mode mode = GET_MODE (dest); + + if (GPR_P (src_regno)) + { + switch (mode) + { + default: + break; + + case QImode: + return "stb%I0%U0 %1, %M0"; + + case HImode: + return "sth%I0%U0 %1, %M0"; + + case SImode: + case SFmode: + return "st%I0%U0 %1, %M0"; + } + } + + else if (FPR_P (src_regno)) + { + switch (mode) + { + default: + break; + + case QImode: + return "stbf%I0%U0 %1, %M0"; + + case HImode: + return "sthf%I0%U0 %1, %M0"; + + case SImode: + case SFmode: + return "stf%I0%U0 %1, %M0"; + } + } + } + + else if (ZERO_P (src)) + { + switch (GET_MODE (dest)) + { + default: + break; + + case QImode: + return "stb%I0%U0 %., %M0"; + + case HImode: + return "sth%I0%U0 %., %M0"; + + case SImode: + case SFmode: + return "st%I0%U0 %., %M0"; + } + } + } + + fatal_insn ("Bad output_move_single operand", insn); + return ""; + } + + + /* Return a string to output a double word move. */ + + const char * + output_move_double (operands, insn) + rtx operands[]; + rtx insn; + { + rtx dest = operands[0]; + rtx src = operands[1]; + enum machine_mode mode = GET_MODE (dest); + + if (GET_CODE (dest) == REG) + { + int dest_regno = REGNO (dest); + + if (GPR_P (dest_regno)) + { + if (GET_CODE (src) == REG) + { + /* gpr <- some sort of register */ + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + return "#"; + + else if (FPR_P (src_regno)) + { + if (((dest_regno - GPR_FIRST) & 1) == 0 + && ((src_regno - FPR_FIRST) & 1) == 0) + return "movfgd %1, %0"; + + return "#"; + } + } + + else if (GET_CODE (src) == MEM) + { + /* gpr <- memory */ + if (dbl_memory_one_insn_operand (src, mode)) + return "ldd%I1%U1 %M1, %0"; + + return "#"; + } + + else if (GET_CODE (src) == CONST_INT + || GET_CODE (src) == CONST_DOUBLE) + return "#"; + } + + else if (FPR_P (dest_regno)) + { + if (GET_CODE (src) == REG) + { + /* fpr <- some sort of register */ + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + { + if (((dest_regno - FPR_FIRST) & 1) == 0 + && ((src_regno - GPR_FIRST) & 1) == 0) + return "movgfd %1, %0"; + + return "#"; + } + + else if (FPR_P (src_regno)) + { + if (TARGET_DOUBLE + && ((dest_regno - FPR_FIRST) & 1) == 0 + && ((src_regno - FPR_FIRST) & 1) == 0) + return "fmovd %1, %0"; + + return "#"; + } + } + + else if (GET_CODE (src) == MEM) + { + /* fpr <- memory */ + if (dbl_memory_one_insn_operand (src, mode)) + return "lddf%I1%U1 %M1, %0"; + + return "#"; + } + + else if (ZERO_P (src)) + return "#"; + } + } + + else if (GET_CODE (dest) == MEM) + { + if (GET_CODE (src) == REG) + { + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + { + if (((src_regno - GPR_FIRST) & 1) == 0 + && dbl_memory_one_insn_operand (dest, mode)) + return "std%I0%U0 %1, %M0"; + + return "#"; + } + + if (FPR_P (src_regno)) + { + if (((src_regno - FPR_FIRST) & 1) == 0 + && dbl_memory_one_insn_operand (dest, mode)) + return "stdf%I0%U0 %1, %M0"; + + return "#"; + } + } + + else if (ZERO_P (src)) + { + if (dbl_memory_one_insn_operand (dest, mode)) + return "std%I0%U0 %., %M0"; + + return "#"; + } + } + + fatal_insn ("Bad output_move_double operand", insn); + return ""; + } + + + /* Return a string to output a single word conditional move. + Operand0 -- EQ/NE of ccr register and 0 + Operand1 -- CCR register + Operand2 -- destination + Operand3 -- source */ + + const char * + output_condmove_single (operands, insn) + rtx operands[]; + rtx insn; + { + rtx dest = operands[2]; + rtx src = operands[3]; + + if (GET_CODE (dest) == REG) + { + int dest_regno = REGNO (dest); + enum machine_mode mode = GET_MODE (dest); + + if (GPR_P (dest_regno)) + { + if (GET_CODE (src) == REG) + { + /* gpr <- some sort of register */ + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + return "cmov %z3, %2, %1, %e0"; + + else if (FPR_P (src_regno)) + return "cmovfg %3, %2, %1, %e0"; + } + + else if (GET_CODE (src) == MEM) + { + /* gpr <- memory */ + switch (mode) + { + default: + break; + + case QImode: + return "cldsb%I3%U3 %M3, %2, %1, %e0"; + + case HImode: + return "cldsh%I3%U3 %M3, %2, %1, %e0"; + + case SImode: + case SFmode: + return "cld%I3%U3 %M3, %2, %1, %e0"; + } + } + + else if (ZERO_P (src)) + return "cmov %., %2, %1, %e0"; + } + + else if (FPR_P (dest_regno)) + { + if (GET_CODE (src) == REG) + { + /* fpr <- some sort of register */ + int src_regno = REGNO (src); + + if (GPR_P (src_regno)) + return "cmovgf %3, %2, %1, %e0"; + + else if (FPR_P (src_regno)) + { + if (TARGET_HARD_FLOAT) + return "cfmovs %3,%2,%1,%e0"; + else + return "cmor %3, %3, %2, %1, %e0"; + } + } + + else if (GET_CODE (src) == MEM) + { + /* fpr <- memory */ + if (mode == SImode || mode == SFmode) + return "cldf%I3%U3 %M3, %2, %1, %e0"; + } + + else if (ZERO_P (src)) + return "cmovgf %., %2, %1, %e0"; + } + } + + else if (GET_CODE (dest) == MEM) + { + if (GET_CODE (src) == REG) + { + int src_regno = REGNO (src); + enum machine_mode mode = GET_MODE (dest); + + if (GPR_P (src_regno)) + { + switch (mode) + { + default: + break; + + case QImode: + return "cstb%I2%U2 %3, %M2, %1, %e0"; + + case HImode: + return "csth%I2%U2 %3, %M2, %1, %e0"; + + case SImode: + case SFmode: + return "cst%I2%U2 %3, %M2, %1, %e0"; + } + } + + else if (FPR_P (src_regno) && (mode == SImode || mode == SFmode)) + return "cstf%I2%U2 %3, %M2, %1, %e0"; + } + + else if (ZERO_P (src)) + { + enum machine_mode mode = GET_MODE (dest); + switch (mode) + { + default: + break; + + case QImode: + return "cstb%I2%U2 %., %M2, %1, %e0"; + + case HImode: + return "csth%I2%U2 %., %M2, %1, %e0"; + + case SImode: + case SFmode: + return "cst%I2%U2 %., %M2, %1, %e0"; + } + } + } + + fatal_insn ("Bad output_condmove_single operand", insn); + return ""; + } + + + /* Emit the appropriate code to do a comparison, returning the register the + comparison was done it. */ + + static rtx + frv_emit_comparison (test, op0, op1) + enum rtx_code test; + rtx op0; + rtx op1; + { + enum machine_mode cc_mode; + rtx cc_reg; + + /* Floating point doesn't have comparison against a constant */ + if (GET_MODE (op0) == CC_FPmode && GET_CODE (op1) != REG) + op1 = force_reg (GET_MODE (op0), op1); + + /* Possibly disable using anything but a fixed register in order to work + around cse moving comparisons past function calls. */ + cc_mode = SELECT_CC_MODE (test, op0, op1); + cc_reg = ((TARGET_ALLOC_CC) + ? gen_reg_rtx (cc_mode) + : gen_rtx_REG (cc_mode, + (cc_mode == CC_FPmode) ? FCC_FIRST : ICC_FIRST)); + + emit_insn (gen_rtx_SET (VOIDmode, cc_reg, + gen_rtx_COMPARE (cc_mode, op0, op1))); + + return cc_reg; + } + + + /* Emit code for a conditional branch. The comparison operands were previously + stored in frv_compare_op0 and frv_compare_op1. + + XXX: I originally wanted to add a clobber of a CCR register to use in + conditional execution, but that confuses the rest of the compiler. */ + + int + frv_emit_cond_branch (test, label) + enum rtx_code test; + rtx label; + { + rtx test_rtx; + rtx label_ref; + rtx if_else; + rtx cc_reg = frv_emit_comparison (test, frv_compare_op0, frv_compare_op1); + enum machine_mode cc_mode = GET_MODE (cc_reg); + + /* Branches generate: + (set (pc) + (if_then_else (, , (const_int 0)) + (label_ref ) + (pc))) */ + label_ref = gen_rtx_LABEL_REF (VOIDmode, label); + test_rtx = gen_rtx (test, cc_mode, cc_reg, const0_rtx); + if_else = gen_rtx_IF_THEN_ELSE (cc_mode, test_rtx, label_ref, pc_rtx); + emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, if_else)); + return TRUE; + } + + + /* Emit code to set a gpr to 1/0 based on a comparison. The comparison + operands were previously stored in frv_compare_op0 and frv_compare_op1. */ + + int + frv_emit_scc (test, target) + enum rtx_code test; + rtx target; + { + rtx set; + rtx test_rtx; + rtx clobber; + rtx cr_reg; + rtx cc_reg = frv_emit_comparison (test, frv_compare_op0, frv_compare_op1); + + /* SCC instructions generate: + (parallel [(set (, , (const_int 0)) + (clobber ())]) */ + test_rtx = gen_rtx_fmt_ee (test, SImode, cc_reg, const0_rtx); + set = gen_rtx_SET (VOIDmode, target, test_rtx); + + cr_reg = ((TARGET_ALLOC_CC) + ? gen_reg_rtx (CC_CCRmode) + : gen_rtx_REG (CC_CCRmode, + ((GET_MODE (cc_reg) == CC_FPmode) + ? FCR_FIRST + : ICR_FIRST))); + + clobber = gen_rtx_CLOBBER (VOIDmode, cr_reg); + emit_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, set, clobber))); + return TRUE; + } + + + /* Split a SCC instruction into component parts, returning a SEQUENCE to hold + the seperate insns. */ + + rtx + frv_split_scc (dest, test, cc_reg, cr_reg, value) + rtx dest; + rtx test; + rtx cc_reg; + rtx cr_reg; + HOST_WIDE_INT value; + { + rtx ret; + + start_sequence (); + + /* Set the appropriate CCR bit. */ + emit_insn (gen_rtx_SET (VOIDmode, + cr_reg, + gen_rtx_fmt_ee (GET_CODE (test), + GET_MODE (cr_reg), + cc_reg, + const0_rtx))); + + /* Move the value into the destination. */ + emit_move_insn (dest, GEN_INT (value)); + + /* Move 0 into the destination if the test failed */ + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_EQ (GET_MODE (cr_reg), + cr_reg, + const0_rtx), + gen_rtx_SET (VOIDmode, dest, const0_rtx))); + + /* Finish up, return sequence. */ + ret = get_insns (); + end_sequence (); + return ret; + } + + + /* Emit the code for a conditional move, return TRUE if we could do the + move. */ + + int + frv_emit_cond_move (dest, test_rtx, src1, src2) + rtx dest; + rtx test_rtx; + rtx src1; + rtx src2; + { + rtx set; + rtx clobber_cc; + rtx test2; + rtx cr_reg; + rtx if_rtx; + enum rtx_code test = GET_CODE (test_rtx); + rtx cc_reg = frv_emit_comparison (test, frv_compare_op0, frv_compare_op1); + enum machine_mode cc_mode = GET_MODE (cc_reg); + + /* Conditional move instructions generate: + (parallel [(set + (if_then_else ( (const_int 0)) + + )) + (clobber ())]) */ + + /* Handle various cases of conditional move involving two constants. */ + if (GET_CODE (src1) == CONST_INT && GET_CODE (src2) == CONST_INT) + { + HOST_WIDE_INT value1 = INTVAL (src1); + HOST_WIDE_INT value2 = INTVAL (src2); + + /* having 0 as one of the constants can be done by loading the other + constant, and optionally moving in gr0. */ + if (value1 == 0 || value2 == 0) + ; + + /* If the first value is within an addi range and also the difference + between the two fits in an addi's range, load up the difference, then + conditionally move in 0, and then unconditionally add the first + value. */ + else if (IN_RANGE_P (value1, -2048, 2047) + && IN_RANGE_P (value2 - value1, -2048, 2047)) + ; + + /* If neither condition holds, just force the constant into a + register. */ + else + { + src1 = force_reg (GET_MODE (dest), src1); + src2 = force_reg (GET_MODE (dest), src2); + } + } + + /* If one value is a register, insure the other value is either 0 or a + register. */ + else + { + if (GET_CODE (src1) == CONST_INT && INTVAL (src1) != 0) + src1 = force_reg (GET_MODE (dest), src1); + + if (GET_CODE (src2) == CONST_INT && INTVAL (src2) != 0) + src2 = force_reg (GET_MODE (dest), src2); + } + + test2 = gen_rtx_fmt_ee (test, cc_mode, cc_reg, const0_rtx); + if_rtx = gen_rtx_IF_THEN_ELSE (GET_MODE (dest), test2, src1, src2); + + set = gen_rtx_SET (VOIDmode, dest, if_rtx); + + cr_reg = ((TARGET_ALLOC_CC) + ? gen_reg_rtx (CC_CCRmode) + : gen_rtx_REG (CC_CCRmode, + (cc_mode == CC_FPmode) ? FCR_FIRST : ICR_FIRST)); + + clobber_cc = gen_rtx_CLOBBER (VOIDmode, cr_reg); + emit_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, set, clobber_cc))); + return TRUE; + } + + + /* Split a conditonal move into constituent parts, returning a SEQUENCE + containing all of the insns. */ + + rtx + frv_split_cond_move (operands) + rtx operands[]; + { + rtx dest = operands[0]; + rtx test = operands[1]; + rtx cc_reg = operands[2]; + rtx src1 = operands[3]; + rtx src2 = operands[4]; + rtx cr_reg = operands[5]; + rtx ret; + enum machine_mode cr_mode = GET_MODE (cr_reg); + + start_sequence (); + + /* Set the appropriate CCR bit. */ + emit_insn (gen_rtx_SET (VOIDmode, + cr_reg, + gen_rtx_fmt_ee (GET_CODE (test), + GET_MODE (cr_reg), + cc_reg, + const0_rtx))); + + /* Handle various cases of conditional move involving two constants. */ + if (GET_CODE (src1) == CONST_INT && GET_CODE (src2) == CONST_INT) + { + HOST_WIDE_INT value1 = INTVAL (src1); + HOST_WIDE_INT value2 = INTVAL (src2); + + /* having 0 as one of the constants can be done by loading the other + constant, and optionally moving in gr0. */ + if (value1 == 0) + { + emit_move_insn (dest, src2); + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (cr_mode, cr_reg, + const0_rtx), + gen_rtx_SET (VOIDmode, dest, src1))); + } + + else if (value2 == 0) + { + emit_move_insn (dest, src1); + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_EQ (cr_mode, cr_reg, + const0_rtx), + gen_rtx_SET (VOIDmode, dest, src2))); + } + + /* If the first value is within an addi range and also the difference + between the two fits in an addi's range, load up the difference, then + conditionally move in 0, and then unconditionally add the first + value. */ + else if (IN_RANGE_P (value1, -2048, 2047) + && IN_RANGE_P (value2 - value1, -2048, 2047)) + { + rtx dest_si = ((GET_MODE (dest) == SImode) + ? dest + : gen_rtx_SUBREG (SImode, dest, 0)); + + emit_move_insn (dest_si, GEN_INT (value2 - value1)); + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (cr_mode, cr_reg, + const0_rtx), + gen_rtx_SET (VOIDmode, dest_si, + const0_rtx))); + emit_insn (gen_addsi3 (dest_si, dest_si, src1)); + } + + else + abort (); + } + else + { + /* Emit the conditional move for the test being true if needed. */ + if (! rtx_equal_p (dest, src1)) + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (cr_mode, cr_reg, const0_rtx), + gen_rtx_SET (VOIDmode, dest, src1))); + + /* Emit the conditional move for the test being false if needed. */ + if (! rtx_equal_p (dest, src2)) + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_EQ (cr_mode, cr_reg, const0_rtx), + gen_rtx_SET (VOIDmode, dest, src2))); + } + + /* Finish up, return sequence. */ + ret = get_insns (); + end_sequence (); + return ret; + } + + + /* Split (set DEST SOURCE), where DEST is a double register and SOURCE is a + memory location that is not known to be dword-aligned. */ + void + frv_split_double_load (dest, source) + rtx dest; + rtx source; + { + int regno = REGNO (dest); + rtx dest1 = gen_highpart (SImode, dest); + rtx dest2 = gen_lowpart (SImode, dest); + rtx address = XEXP (source, 0); + + /* If the address is pre-modified, load the lower-numbered register + first, then load the other register using an integer offset from + the modified base register. This order should always be safe, + since the pre-modification cannot affect the same registers as the + load does. + + The situation for other loads is more complicated. Loading one + of the registers could affect the value of ADDRESS, so we must + be careful which order we do them in. */ + if (GET_CODE (address) == PRE_MODIFY + || ! refers_to_regno_p (regno, regno + 1, address, NULL)) + { + /* It is safe to load the lower-numbered register first. */ + emit_move_insn (dest1, change_address (source, SImode, NULL)); + emit_move_insn (dest2, frv_index_memory (source, SImode, 1)); + } + else + { + /* ADDRESS is not pre-modified and the address depends on the + lower-numbered register. Load the higher-numbered register + first. */ + emit_move_insn (dest2, frv_index_memory (source, SImode, 1)); + emit_move_insn (dest1, change_address (source, SImode, NULL)); + } + } + + /* Split (set DEST SOURCE), where DEST refers to a dword memory location + and SOURCE is either a double register or the constant zero. */ + void + frv_split_double_store (dest, source) + rtx dest; + rtx source; + { + rtx dest1 = change_address (dest, SImode, NULL); + rtx dest2 = frv_index_memory (dest, SImode, 1); + if (ZERO_P (source)) + { + emit_move_insn (dest1, CONST0_RTX (SImode)); + emit_move_insn (dest2, CONST0_RTX (SImode)); + } + else + { + emit_move_insn (dest1, gen_highpart (SImode, source)); + emit_move_insn (dest2, gen_lowpart (SImode, source)); + } + } + + + /* Split a min/max operation returning a SEQUENCE containing all of the + insns. */ + + rtx + frv_split_minmax (operands) + rtx operands[]; + { + rtx dest = operands[0]; + rtx minmax = operands[1]; + rtx src1 = operands[2]; + rtx src2 = operands[3]; + rtx cc_reg = operands[4]; + rtx cr_reg = operands[5]; + rtx ret; + enum rtx_code test_code; + enum machine_mode cr_mode = GET_MODE (cr_reg); + + start_sequence (); + + /* Figure out which test to use */ + switch (GET_CODE (minmax)) + { + default: + abort (); + + case SMIN: test_code = LT; break; + case SMAX: test_code = GT; break; + case UMIN: test_code = LTU; break; + case UMAX: test_code = GTU; break; + } + + /* Issue the compare instruction. */ + emit_insn (gen_rtx_SET (VOIDmode, + cc_reg, + gen_rtx_COMPARE (GET_MODE (cc_reg), + src1, src2))); + + /* Set the appropriate CCR bit. */ + emit_insn (gen_rtx_SET (VOIDmode, + cr_reg, + gen_rtx_fmt_ee (test_code, + GET_MODE (cr_reg), + cc_reg, + const0_rtx))); + + /* If are taking the min/max of a nonzero constant, load that first, and + then do a conditional move of the other value. */ + if (GET_CODE (src2) == CONST_INT && INTVAL (src2) != 0) + { + if (rtx_equal_p (dest, src1)) + abort (); + + emit_move_insn (dest, src2); + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (cr_mode, cr_reg, const0_rtx), + gen_rtx_SET (VOIDmode, dest, src1))); + } + + /* Otherwise, do each half of the move. */ + else + { + /* Emit the conditional move for the test being true if needed. */ + if (! rtx_equal_p (dest, src1)) + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (cr_mode, cr_reg, const0_rtx), + gen_rtx_SET (VOIDmode, dest, src1))); + + /* Emit the conditional move for the test being false if needed. */ + if (! rtx_equal_p (dest, src2)) + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_EQ (cr_mode, cr_reg, const0_rtx), + gen_rtx_SET (VOIDmode, dest, src2))); + } + + /* Finish up, return sequence. */ + ret = get_insns (); + end_sequence (); + return ret; + } + + + /* Split an integer abs operation returning a SEQUENCE containing all of the + insns. */ + + rtx + frv_split_abs (operands) + rtx operands[]; + { + rtx dest = operands[0]; + rtx src = operands[1]; + rtx cc_reg = operands[2]; + rtx cr_reg = operands[3]; + rtx ret; + + start_sequence (); + + /* Issue the compare < 0 instruction. */ + emit_insn (gen_rtx_SET (VOIDmode, + cc_reg, + gen_rtx_COMPARE (CCmode, src, const0_rtx))); + + /* Set the appropriate CCR bit. */ + emit_insn (gen_rtx_SET (VOIDmode, + cr_reg, + gen_rtx_fmt_ee (LT, CC_CCRmode, cc_reg, const0_rtx))); + + /* Emit the conditional negate if the value is negative */ + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (CC_CCRmode, cr_reg, const0_rtx), + gen_negsi2 (dest, src))); + + /* Emit the conditional move for the test being false if needed. */ + if (! rtx_equal_p (dest, src)) + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_EQ (CC_CCRmode, cr_reg, const0_rtx), + gen_rtx_SET (VOIDmode, dest, src))); + + /* Finish up, return sequence. */ + ret = get_insns (); + end_sequence (); + return ret; + } + + + /* An internal function called by for_each_rtx to clear in a hard_reg set each + register used in an insn. */ + + static int + frv_clear_registers_used (ptr, data) + rtx *ptr; + void *data; + { + if (GET_CODE (*ptr) == REG) + { + int regno = REGNO (*ptr); + HARD_REG_SET *p_regs = (HARD_REG_SET *)data; + + if (regno < FIRST_PSEUDO_REGISTER) + { + int reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (*ptr)); + + while (regno < reg_max) + { + CLEAR_HARD_REG_BIT (*p_regs, regno); + regno++; + } + } + } + + return 0; + } + + + /* Initialize the extra fields provided by IFCVT_EXTRA_FIELDS. */ + + /* On the FR-V, we don't have any extra fields per se, but it is useful hook to + initialize the static storage. */ + void + frv_ifcvt_init_extra_fields (ce_info) + ce_if_block_t *ce_info ATTRIBUTE_UNUSED; + { + frv_ifcvt.added_insns_list = NULL_RTX; + frv_ifcvt.cur_scratch_regs = 0; + frv_ifcvt.num_nested_cond_exec = 0; + frv_ifcvt.cr_reg = NULL_RTX; + frv_ifcvt.nested_cc_reg = NULL_RTX; + frv_ifcvt.extra_int_cr = NULL_RTX; + frv_ifcvt.extra_fp_cr = NULL_RTX; + frv_ifcvt.last_nested_if_cr = NULL_RTX; + } + + + /* Internal function to add a potenial insn to the list of insns to be inserted + if the conditional execution conversion is successful. */ + + static void + frv_ifcvt_add_insn (pattern, insn, before_p) + rtx pattern; + rtx insn; + int before_p; + { + rtx link = alloc_EXPR_LIST (VOIDmode, pattern, insn); + + link->jump = before_p; /* mark to add this before or after insn */ + frv_ifcvt.added_insns_list = alloc_EXPR_LIST (VOIDmode, link, + frv_ifcvt.added_insns_list); + + if (TARGET_DEBUG_COND_EXEC) + { + fprintf (stderr, + "\n:::::::::: frv_ifcvt_add_insn: add the following %s insn %d:\n", + (before_p) ? "before" : "after", + (int)INSN_UID (insn)); + + debug_rtx (pattern); + } + } + + + /* A C expression to modify the code described by the conditional if + information CE_INFO, possibly updating the tests in TRUE_EXPR, and + FALSE_EXPR for converting if-then and if-then-else code to conditional + instructions. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if the + tests cannot be converted. */ + + void + frv_ifcvt_modify_tests (ce_info, p_true, p_false) + ce_if_block_t *ce_info; + rtx *p_true; + rtx *p_false; + { + basic_block test_bb = ce_info->test_bb; /* test basic block */ + basic_block then_bb = ce_info->then_bb; /* THEN */ + basic_block else_bb = ce_info->else_bb; /* ELSE or NULL */ + basic_block join_bb = ce_info->join_bb; /* join block or NULL */ + rtx true_expr = *p_true; + rtx cr; + rtx cc; + rtx nested_cc; + enum machine_mode mode = GET_MODE (true_expr); + int j; + basic_block *bb; + int num_bb; + frv_tmp_reg_t *tmp_reg = &frv_ifcvt.tmp_reg; + rtx check_insn; + rtx sub_cond_exec_reg; + enum rtx_code code; + enum rtx_code code_true; + enum rtx_code code_false; + enum reg_class cc_class; + enum reg_class cr_class; + int cc_first; + int cc_last; + + /* Make sure we are only dealing with hard registers. Also honor the + -mno-cond-exec switch, and -mno-nested-cond-exec switches if + applicable. */ + if (!reload_completed || TARGET_NO_COND_EXEC + || (TARGET_NO_NESTED_CE && ce_info->pass > 1)) + goto fail; + + /* Figure out which registers we can allocate for our own purposes. Only + consider registers that are not preserved across function calls and are + not fixed. However, allow the ICC/ICR temporary registers to be allocated + if we did not need to use them in reloading other registers. */ + memset ((PTR) &tmp_reg->regs, 0, sizeof (tmp_reg->regs)); + COPY_HARD_REG_SET (tmp_reg->regs, call_used_reg_set); + AND_COMPL_HARD_REG_SET (tmp_reg->regs, fixed_reg_set); + SET_HARD_REG_BIT (tmp_reg->regs, ICC_TEMP); + SET_HARD_REG_BIT (tmp_reg->regs, ICR_TEMP); + + /* If this is a nested IF, we need to discover whether the CC registers that + are set/used inside of the block are used anywhere else. If not, we can + change them to be the CC register that is paired with the CR register that + controls the outermost IF block. */ + if (ce_info->pass > 1) + { + CLEAR_HARD_REG_SET (frv_ifcvt.nested_cc_ok_rewrite); + for (j = CC_FIRST; j <= CC_LAST; j++) + if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) + { + if (REGNO_REG_SET_P (then_bb->global_live_at_start, j)) + continue; + + if (else_bb && REGNO_REG_SET_P (else_bb->global_live_at_start, j)) + continue; + + if (join_bb && REGNO_REG_SET_P (join_bb->global_live_at_start, j)) + continue; + + SET_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, j); + } + } + + for (j = 0; j < frv_ifcvt.cur_scratch_regs; j++) + frv_ifcvt.scratch_regs[j] = NULL_RTX; + + frv_ifcvt.added_insns_list = NULL_RTX; + frv_ifcvt.cur_scratch_regs = 0; + + bb = (basic_block *) alloca ((2 + ce_info->num_multiple_test_blocks) + * sizeof (basic_block)); + + if (join_bb) + { + int regno; + + /* Remove anything live at the beginning of the join block from being + available for allocation. */ + EXECUTE_IF_SET_IN_REG_SET (join_bb->global_live_at_start, 0, regno, + { + if (regno < FIRST_PSEUDO_REGISTER) + CLEAR_HARD_REG_BIT (tmp_reg->regs, regno); + }); + } + + /* Add in all of the blocks in multiple &&/|| blocks to be scanned. */ + num_bb = 0; + if (ce_info->num_multiple_test_blocks) + { + basic_block multiple_test_bb = ce_info->last_test_bb; + + while (multiple_test_bb != test_bb) + { + bb[num_bb++] = multiple_test_bb; + multiple_test_bb = multiple_test_bb->pred->src; + } + } + + /* Add in the THEN and ELSE blocks to be scanned. */ + bb[num_bb++] = then_bb; + if (else_bb) + bb[num_bb++] = else_bb; + + sub_cond_exec_reg = NULL_RTX; + frv_ifcvt.num_nested_cond_exec = 0; + + /* Scan all of the blocks for registers that must not be allocated. */ + for (j = 0; j < num_bb; j++) + { + rtx last_insn = bb[j]->end; + rtx insn = bb[j]->head; + int regno; + + if (rtl_dump_file) + fprintf (rtl_dump_file, "Scanning %s block %d, start %d, end %d\n", + (bb[j] == else_bb) ? "else" : ((bb[j] == then_bb) ? "then" : "test"), + (int) bb[j]->index, + (int) INSN_UID (bb[j]->head), + (int) INSN_UID (bb[j]->end)); + + /* Anything live at the beginning of the block is obviously unavailable + for allocation. */ + EXECUTE_IF_SET_IN_REG_SET (bb[j]->global_live_at_start, 0, regno, + { + if (regno < FIRST_PSEUDO_REGISTER) + CLEAR_HARD_REG_BIT (tmp_reg->regs, regno); + }); + + /* loop through the insns in the block. */ + for (;;) + { + /* Mark any new registers that are created as being unavailable for + allocation. Also see if the CC register used in nested IFs can be + reallocated. */ + if (INSN_P (insn)) + { + rtx pattern; + rtx set; + int skip_nested_if = FALSE; + + for_each_rtx (&PATTERN (insn), frv_clear_registers_used, + (void *)&tmp_reg->regs); + + pattern = PATTERN (insn); + if (GET_CODE (pattern) == COND_EXEC) + { + rtx reg = XEXP (COND_EXEC_TEST (pattern), 0); + + if (reg != sub_cond_exec_reg) + { + sub_cond_exec_reg = reg; + frv_ifcvt.num_nested_cond_exec++; + } + } + + set = single_set_pattern (pattern); + if (set) + { + rtx dest = SET_DEST (set); + rtx src = SET_SRC (set); + + if (GET_CODE (dest) == REG) + { + int regno = REGNO (dest); + enum rtx_code src_code = GET_CODE (src); + + if (CC_P (regno) && src_code == COMPARE) + skip_nested_if = TRUE; + + else if (CR_P (regno) + && (src_code == IF_THEN_ELSE + || GET_RTX_CLASS (src_code) == '<')) + skip_nested_if = TRUE; + } + } + + if (! skip_nested_if) + for_each_rtx (&PATTERN (insn), frv_clear_registers_used, + (void *)&frv_ifcvt.nested_cc_ok_rewrite); + } + + if (insn == last_insn) + break; + + insn = NEXT_INSN (insn); + } + } + + /* If this is a nested if, rewrite the CC registers that are available to + include the ones that can be rewritten, to increase the chance of being + able to allocate a paired CC/CR register combination. */ + if (ce_info->pass > 1) + { + for (j = CC_FIRST; j <= CC_LAST; j++) + if (TEST_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, j)) + SET_HARD_REG_BIT (tmp_reg->regs, j); + else + CLEAR_HARD_REG_BIT (tmp_reg->regs, j); + } + + if (rtl_dump_file) + { + int num_gprs = 0; + fprintf (rtl_dump_file, "Available GPRs: "); + + for (j = GPR_FIRST; j <= GPR_LAST; j++) + if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) + { + fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); + if (++num_gprs > GPR_TEMP_NUM+2) + break; + } + + fprintf (rtl_dump_file, "%s\nAvailable CRs: ", + (num_gprs > GPR_TEMP_NUM+2) ? " ..." : ""); + + for (j = CR_FIRST; j <= CR_LAST; j++) + if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) + fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); + + fputs ("\n", rtl_dump_file); + + if (ce_info->pass > 1) + { + fprintf (rtl_dump_file, "Modifiable CCs: "); + for (j = CC_FIRST; j <= CC_LAST; j++) + if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) + fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); + + fprintf (rtl_dump_file, "\n%d nested COND_EXEC statements\n", + frv_ifcvt.num_nested_cond_exec); + } + } + + /* Allocate the appropriate temporary condition code register. Try to + allocate the ICR/FCR register that corresponds to the ICC/FCC register so + that conditional cmp's can be done. */ + if (mode == CCmode || mode == CC_UNSmode) + { + cr_class = ICR_REGS; + cc_class = ICC_REGS; + cc_first = ICC_FIRST; + cc_last = ICC_LAST; + } + else if (mode == CC_FPmode) + { + cr_class = FCR_REGS; + cc_class = FCC_REGS; + cc_first = FCC_FIRST; + cc_last = FCC_LAST; + } + else + { + cc_first = cc_last = 0; + cr_class = cc_class = NO_REGS; + } + + cc = XEXP (true_expr, 0); + nested_cc = cr = NULL_RTX; + if (cc_class != NO_REGS) + { + /* For nested IFs and &&/||, see if we can find a CC and CR register pair + so we can execute a csubcc/caddcc/cfcmps instruction. */ + int cc_regno; + + for (cc_regno = cc_first; cc_regno <= cc_last; cc_regno++) + { + int cr_regno = cc_regno - CC_FIRST + CR_FIRST; + + if (TEST_HARD_REG_BIT (frv_ifcvt.tmp_reg.regs, cc_regno) + && TEST_HARD_REG_BIT (frv_ifcvt.tmp_reg.regs, cr_regno)) + { + frv_ifcvt.tmp_reg.next_reg[ (int)cr_class ] = cr_regno; + cr = frv_alloc_temp_reg (tmp_reg, cr_class, CC_CCRmode, TRUE, + TRUE); + + frv_ifcvt.tmp_reg.next_reg[ (int)cc_class ] = cc_regno; + nested_cc = frv_alloc_temp_reg (tmp_reg, cc_class, CCmode, + TRUE, TRUE); + break; + } + } + } + + if (! cr) + { + if (rtl_dump_file) + fprintf (rtl_dump_file, "Could not allocate a CR temporary register\n"); + + goto fail; + } + + if (rtl_dump_file) + fprintf (rtl_dump_file, + "Will use %s for conditional execution, %s for nested comparisons\n", + reg_names[ REGNO (cr)], + (nested_cc) ? reg_names[ REGNO (nested_cc) ] : ""); + + /* Set the CCR bit. Note for integer tests, we reverse the condition so that + in an IF-THEN-ELSE sequence, we are testing the TRUE case against the CCR + bit being true. We don't do this for floating point, because of NaNs. */ + code = GET_CODE (true_expr); + if (GET_MODE (cc) != CC_FPmode) + { + code = reverse_condition (code); + code_true = EQ; + code_false = NE; + } + else + { + code_true = NE; + code_false = EQ; + } + + check_insn = gen_rtx_SET (VOIDmode, cr, + gen_rtx_fmt_ee (code, CC_CCRmode, cc, const0_rtx)); + + /* Record the check insn to be inserted later. */ + frv_ifcvt_add_insn (check_insn, test_bb->end, TRUE); + + /* Update the tests. */ + frv_ifcvt.cr_reg = cr; + frv_ifcvt.nested_cc_reg = nested_cc; + *p_true = gen_rtx_fmt_ee (code_true, CC_CCRmode, cr, const0_rtx); + *p_false = gen_rtx_fmt_ee (code_false, CC_CCRmode, cr, const0_rtx); + return; + + /* Fail, don't do this conditional execution. */ + fail: + *p_true = NULL_RTX; + *p_false = NULL_RTX; + if (rtl_dump_file) + fprintf (rtl_dump_file, "Disabling this conditional execution.\n"); + + return; + } + + + /* A C expression to modify the code described by the conditional if + information CE_INFO, for the basic block BB, possibly updating the tests in + TRUE_EXPR, and FALSE_EXPR for converting the && and || parts of if-then or + if-then-else code to conditional instructions. Set either TRUE_EXPR or + FALSE_EXPR to a null pointer if the tests cannot be converted. */ + + /* p_true and p_false are given expressions of the form: + + (and (eq:CC_CCR (reg:CC_CCR) + (const_int 0)) + (eq:CC (reg:CC) + (const_int 0))) */ + + void + frv_ifcvt_modify_multiple_tests (ce_info, bb, p_true, p_false) + ce_if_block_t *ce_info; + basic_block bb; + rtx *p_true; + rtx *p_false; + { + rtx old_true = XEXP (*p_true, 0); + rtx old_false = XEXP (*p_false, 0); + rtx true_expr = XEXP (*p_true, 1); + rtx false_expr = XEXP (*p_false, 1); + rtx test_expr; + rtx old_test; + rtx cr = XEXP (old_true, 0); + rtx check_insn; + rtx new_cr = NULL_RTX; + rtx *p_new_cr = (rtx *)0; + rtx if_else; + rtx compare; + rtx cc; + enum reg_class cr_class; + enum machine_mode mode = GET_MODE (true_expr); + rtx (*logical_func)(rtx, rtx, rtx); + + if (TARGET_DEBUG_COND_EXEC) + { + fprintf (stderr, + "\n:::::::::: frv_ifcvt_modify_multiple_tests, before modification for %s\ntrue insn:\n", + ce_info->and_and_p ? "&&" : "||"); + + debug_rtx (*p_true); + + fputs ("\nfalse insn:\n", stderr); + debug_rtx (*p_false); + } + + if (TARGET_NO_MULTI_CE) + goto fail; + + if (GET_CODE (cr) != REG) + goto fail; + + if (mode == CCmode || mode == CC_UNSmode) + { + cr_class = ICR_REGS; + p_new_cr = &frv_ifcvt.extra_int_cr; + } + else if (mode == CC_FPmode) + { + cr_class = FCR_REGS; + p_new_cr = &frv_ifcvt.extra_fp_cr; + } + else + goto fail; + + /* Allocate a temp CR, reusing a previously allocated temp CR if we have 3 or + more &&/|| tests. */ + new_cr = *p_new_cr; + if (! new_cr) + { + new_cr = *p_new_cr = frv_alloc_temp_reg (&frv_ifcvt.tmp_reg, cr_class, + CC_CCRmode, TRUE, TRUE); + if (! new_cr) + goto fail; + } + + if (ce_info->and_and_p) + { + old_test = old_false; + test_expr = true_expr; + logical_func = (GET_CODE (old_true) == EQ) ? gen_andcr : gen_andncr; + *p_true = gen_rtx_NE (CC_CCRmode, cr, const0_rtx); + *p_false = gen_rtx_EQ (CC_CCRmode, cr, const0_rtx); + } + else + { + old_test = old_false; + test_expr = false_expr; + logical_func = (GET_CODE (old_false) == EQ) ? gen_orcr : gen_orncr; + *p_true = gen_rtx_EQ (CC_CCRmode, cr, const0_rtx); + *p_false = gen_rtx_NE (CC_CCRmode, cr, const0_rtx); + } + + /* First add the andcr/andncr/orcr/orncr, which will be added after the + conditional check instruction, due to frv_ifcvt_add_insn being a LIFO + stack. */ + frv_ifcvt_add_insn ((*logical_func) (cr, cr, new_cr), bb->end, TRUE); + + /* Now add the conditional check insn. */ + cc = XEXP (test_expr, 0); + compare = gen_rtx_fmt_ee (GET_CODE (test_expr), CC_CCRmode, cc, const0_rtx); + if_else = gen_rtx_IF_THEN_ELSE (CC_CCRmode, old_test, compare, const0_rtx); + + check_insn = gen_rtx_SET (VOIDmode, new_cr, if_else); + + /* add the new check insn to the list of check insns that need to be + inserted. */ + frv_ifcvt_add_insn (check_insn, bb->end, TRUE); + + if (TARGET_DEBUG_COND_EXEC) + { + fputs ("\n:::::::::: frv_ifcvt_modify_multiple_tests, after modification\ntrue insn:\n", + stderr); + + debug_rtx (*p_true); + + fputs ("\nfalse insn:\n", stderr); + debug_rtx (*p_false); + } + + return; + + fail: + *p_true = *p_false = NULL_RTX; + + /* If we allocated a CR register, release it. */ + if (new_cr) + { + CLEAR_HARD_REG_BIT (frv_ifcvt.tmp_reg.regs, REGNO (new_cr)); + *p_new_cr = NULL_RTX; + } + + if (TARGET_DEBUG_COND_EXEC) + fputs ("\n:::::::::: frv_ifcvt_modify_multiple_tests, failed.\n", stderr); + + return; + } + + + /* Return a register which will be loaded with a value if an IF block is + converted to conditional execution. This is used to rewrite instructions + that use constants to ones that just use registers. */ + + static rtx + frv_ifcvt_load_value (value, insn) + rtx value; + rtx insn ATTRIBUTE_UNUSED; + { + int num_alloc = frv_ifcvt.cur_scratch_regs; + int i; + rtx reg; + + /* We know gr0 == 0, so replace any errant uses. */ + if (value == const0_rtx) + return gen_rtx_REG (SImode, GPR_FIRST); + + /* First search all registers currently loaded to see if we have an + applicable constant. */ + if (CONSTANT_P (value) + || (GET_CODE (value) == REG && REGNO (value) == LR_REGNO)) + { + for (i = 0; i < num_alloc; i++) + { + if (rtx_equal_p (SET_SRC (frv_ifcvt.scratch_regs[i]), value)) + return SET_DEST (frv_ifcvt.scratch_regs[i]); + } + } + + /* Have we exhausted the number of registers available? */ + if (num_alloc >= GPR_TEMP_NUM) + { + if (rtl_dump_file) + fprintf (rtl_dump_file, "Too many temporary registers allocated\n"); + + return NULL_RTX; + } + + /* Allocate the new register. */ + reg = frv_alloc_temp_reg (&frv_ifcvt.tmp_reg, GPR_REGS, SImode, TRUE, TRUE); + if (! reg) + { + if (rtl_dump_file) + fputs ("Could not find a scratch register\n", rtl_dump_file); + + return NULL_RTX; + } + + frv_ifcvt.cur_scratch_regs++; + frv_ifcvt.scratch_regs[num_alloc] = gen_rtx_SET (VOIDmode, reg, value); + + if (rtl_dump_file) + { + if (GET_CODE (value) == CONST_INT) + fprintf (rtl_dump_file, "Register %s will hold %ld\n", + reg_names[ REGNO (reg)], (long)INTVAL (value)); + + else if (GET_CODE (value) == REG && REGNO (value) == LR_REGNO) + fprintf (rtl_dump_file, "Register %s will hold LR\n", + reg_names[ REGNO (reg)]); + + else + fprintf (rtl_dump_file, "Register %s will hold a saved value\n", + reg_names[ REGNO (reg)]); + } + + return reg; + } + + + /* Update a MEM used in conditional code that might contain an offset to put + the offset into a scratch register, so that the conditional load/store + operations can be used. This function returns the original pointer if the + MEM is valid to use in conditional code, NULL if we can't load up the offset + into a temporary register, or the new MEM if we were successful. */ + + static rtx + frv_ifcvt_rewrite_mem (mem, mode, insn) + rtx mem; + enum machine_mode mode; + rtx insn; + { + rtx addr = XEXP (mem, 0); + + if (!frv_legitimate_address_p (mode, addr, reload_completed, TRUE)) + { + if (GET_CODE (addr) == PLUS) + { + rtx addr_op0 = XEXP (addr, 0); + rtx addr_op1 = XEXP (addr, 1); + + if (plus_small_data_p (addr_op0, addr_op1)) + addr = frv_ifcvt_load_value (addr, insn); + + else if (GET_CODE (addr_op0) == REG && CONSTANT_P (addr_op1)) + { + rtx reg = frv_ifcvt_load_value (addr_op1, insn); + if (!reg) + return NULL_RTX; + + addr = gen_rtx_PLUS (Pmode, addr_op0, reg); + } + + else + return NULL_RTX; + } + + else if (CONSTANT_P (addr)) + addr = frv_ifcvt_load_value (addr, insn); + + else + return NULL_RTX; + + if (addr == NULL_RTX) + return NULL_RTX; + + else if (XEXP (mem, 0) != addr) + return change_address (mem, mode, addr); + } + + return mem; + } + + + /* Given a PATTERN, return a SET expression if this PATTERN has only a single + SET, possibly conditionally executed. It may also have CLOBBERs, USEs. */ + + static rtx + single_set_pattern (pattern) + rtx pattern; + { + rtx set; + int i; + + if (GET_CODE (pattern) == COND_EXEC) + pattern = COND_EXEC_CODE (pattern); + + if (GET_CODE (pattern) == SET) + return pattern; + + else if (GET_CODE (pattern) == PARALLEL) + { + for (i = 0, set = 0; i < XVECLEN (pattern, 0); i++) + { + rtx sub = XVECEXP (pattern, 0, i); + + switch (GET_CODE (sub)) + { + case USE: + case CLOBBER: + break; + + case SET: + if (set) + return 0; + else + set = sub; + break; + + default: + return 0; + } + } + return set; + } + + return 0; + } + + + /* A C expression to modify the code described by the conditional if + information CE_INFO with the new PATTERN in INSN. If PATTERN is a null + pointer after the IFCVT_MODIFY_INSN macro executes, it is assumed that that + insn cannot be converted to be executed conditionally. */ + + rtx + frv_ifcvt_modify_insn (ce_info, pattern, insn) + ce_if_block_t *ce_info ATTRIBUTE_UNUSED; + rtx pattern; + rtx insn; + { + rtx orig_ce_pattern = pattern; + rtx set; + rtx op0; + rtx op1; + rtx test; + + if (GET_CODE (pattern) != COND_EXEC) + abort (); + + test = COND_EXEC_TEST (pattern); + if (GET_CODE (test) == AND) + { + rtx cr = frv_ifcvt.cr_reg; + rtx test_reg; + + op0 = XEXP (test, 0); + if (! rtx_equal_p (cr, XEXP (op0, 0))) + goto fail; + + op1 = XEXP (test, 1); + test_reg = XEXP (op1, 0); + if (GET_CODE (test_reg) != REG) + goto fail; + + /* Is this the first nested if block in this sequence? If so, generate + an andcr or andncr. */ + if (! frv_ifcvt.last_nested_if_cr) + { + rtx and_op; + + frv_ifcvt.last_nested_if_cr = test_reg; + if (GET_CODE (op0) == NE) + and_op = gen_andcr (test_reg, cr, test_reg); + else + and_op = gen_andncr (test_reg, cr, test_reg); + + frv_ifcvt_add_insn (and_op, insn, TRUE); + } + + /* If this isn't the first statement in the nested if sequence, see if we + are dealing with the same register. */ + else if (! rtx_equal_p (test_reg, frv_ifcvt.last_nested_if_cr)) + goto fail; + + COND_EXEC_TEST (pattern) = test = op1; + } + + /* If this isn't a nested if, reset state variables. */ + else + { + frv_ifcvt.last_nested_if_cr = NULL_RTX; + } + + set = single_set_pattern (pattern); + if (set) + { + rtx dest = SET_DEST (set); + rtx src = SET_SRC (set); + enum machine_mode mode = GET_MODE (dest); + + /* Check for normal binary operators */ + if (mode == SImode + && (GET_RTX_CLASS (GET_CODE (src)) == '2' + || GET_RTX_CLASS (GET_CODE (src)) == 'c')) + { + op0 = XEXP (src, 0); + op1 = XEXP (src, 1); + + /* Special case load of small data address which looks like: + r16+symbol_ref */ + if (GET_CODE (src) == PLUS && plus_small_data_p (op0, op1)) + { + src = frv_ifcvt_load_value (src, insn); + if (src) + COND_EXEC_CODE (pattern) = gen_rtx_SET (VOIDmode, dest, src); + else + goto fail; + } + + else if (integer_register_operand (op0, SImode) && CONSTANT_P (op1)) + { + op1 = frv_ifcvt_load_value (op1, insn); + if (op1) + COND_EXEC_CODE (pattern) + = gen_rtx_SET (VOIDmode, dest, gen_rtx_fmt_ee (GET_CODE (src), + GET_MODE (src), + op0, op1)); + else + goto fail; + } + } + + /* For multiply by a constant, we need to handle the sign extending + correctly. Add a USE of the value after the multiply to prevent flow + from cratering because only one register out of the two were used. */ + else if (mode == DImode && GET_CODE (src) == MULT) + { + op0 = XEXP (src, 0); + op1 = XEXP (src, 1); + if (GET_CODE (op0) == SIGN_EXTEND && GET_CODE (op1) == CONST_INT) + { + op1 = frv_ifcvt_load_value (op1, insn); + if (op1) + { + op1 = gen_rtx_SIGN_EXTEND (DImode, op1); + COND_EXEC_CODE (pattern) + = gen_rtx_SET (VOIDmode, dest, + gen_rtx_MULT (DImode, op0, op1)); + } + else + goto fail; + } + + frv_ifcvt_add_insn (gen_rtx_USE (VOIDmode, dest), insn, FALSE); + } + + /* If we are just loading a constant created for a nested conditional + execution statement, just load the constant without any conditional + execution, since we know that the constant will not interfere with any + other registers. */ + else if (frv_ifcvt.scratch_insns_bitmap + && bitmap_bit_p (frv_ifcvt.scratch_insns_bitmap, + INSN_UID (insn))) + pattern = set; + + else if (mode == QImode || mode == HImode || mode == SImode + || mode == SFmode) + { + int changed_p = FALSE; + + /* Check for just loading up a constant */ + if (CONSTANT_P (src) && integer_register_operand (dest, mode)) + { + src = frv_ifcvt_load_value (src, insn); + if (!src) + goto fail; + + changed_p = TRUE; + } + + /* See if we need to fix up stores */ + if (GET_CODE (dest) == MEM) + { + rtx new_mem = frv_ifcvt_rewrite_mem (dest, mode, insn); + + if (!new_mem) + goto fail; + + else if (new_mem != dest) + { + changed_p = TRUE; + dest = new_mem; + } + } + + /* See if we need to fix up loads */ + if (GET_CODE (src) == MEM) + { + rtx new_mem = frv_ifcvt_rewrite_mem (src, mode, insn); + + if (!new_mem) + goto fail; + + else if (new_mem != src) + { + changed_p = TRUE; + src = new_mem; + } + } + + /* If either src or destination changed, redo SET. */ + if (changed_p) + COND_EXEC_CODE (pattern) = gen_rtx_SET (VOIDmode, dest, src); + } + + /* Rewrite a nested set cccr in terms of IF_THEN_ELSE. Also deal with + rewriting the CC register to be the same as the paired CC/CR register + for nested ifs. */ + else if (mode == CC_CCRmode && GET_RTX_CLASS (GET_CODE (src)) == '<') + { + int regno = REGNO (XEXP (src, 0)); + rtx if_else; + + if (ce_info->pass > 1 + && regno != (int)REGNO (frv_ifcvt.nested_cc_reg) + && TEST_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, regno)) + { + src = gen_rtx_fmt_ee (GET_CODE (src), + CC_CCRmode, + frv_ifcvt.nested_cc_reg, + XEXP (src, 1)); + } + + if_else = gen_rtx_IF_THEN_ELSE (CC_CCRmode, test, src, const0_rtx); + pattern = gen_rtx_SET (VOIDmode, dest, if_else); + } + + /* Remap a nested compare instruction to use the paired CC/CR reg. */ + else if (ce_info->pass > 1 + && GET_CODE (dest) == REG + && CC_P (REGNO (dest)) + && REGNO (dest) != REGNO (frv_ifcvt.nested_cc_reg) + && TEST_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, + REGNO (dest)) + && GET_CODE (src) == COMPARE) + { + PUT_MODE (frv_ifcvt.nested_cc_reg, GET_MODE (dest)); + COND_EXEC_CODE (pattern) + = gen_rtx_SET (VOIDmode, frv_ifcvt.nested_cc_reg, copy_rtx (src)); + } + } + + if (TARGET_DEBUG_COND_EXEC) + { + rtx orig_pattern = PATTERN (insn); + + PATTERN (insn) = pattern; + fprintf (stderr, + "\n:::::::::: frv_ifcvt_modify_insn: pass = %d, insn after modification:\n", + ce_info->pass); + + debug_rtx (insn); + PATTERN (insn) = orig_pattern; + } + + return pattern; + + fail: + if (TARGET_DEBUG_COND_EXEC) + { + rtx orig_pattern = PATTERN (insn); + + PATTERN (insn) = orig_ce_pattern; + fprintf (stderr, + "\n:::::::::: frv_ifcvt_modify_insn: pass = %d, insn could not be modified:\n", + ce_info->pass); + + debug_rtx (insn); + PATTERN (insn) = orig_pattern; + } + + return NULL_RTX; + } + + + /* A C expression to perform any final machine dependent modifications in + converting code to conditional execution in the code described by the + conditional if information CE_INFO. */ + + void + frv_ifcvt_modify_final (ce_info) + ce_if_block_t *ce_info ATTRIBUTE_UNUSED; + { + rtx existing_insn; + rtx check_insn; + rtx p = frv_ifcvt.added_insns_list; + int i; + + /* Loop inserting the check insns. The last check insn is the first test, + and is the appropriate place to insert constants. */ + if (! p) + abort (); + + do + { + rtx check_and_insert_insns = XEXP (p, 0); + rtx old_p = p; + + check_insn = XEXP (check_and_insert_insns, 0); + existing_insn = XEXP (check_and_insert_insns, 1); + p = XEXP (p, 1); + + /* The jump bit is used to say that the new insn is to be inserted BEFORE + the existing insn, otherwise it is to be inserted AFTER. */ + if (check_and_insert_insns->jump) + { + emit_insn_before (check_insn, existing_insn); + check_and_insert_insns->jump = 0; + } + else + emit_insn_after (check_insn, existing_insn); + + free_EXPR_LIST_node (check_and_insert_insns); + free_EXPR_LIST_node (old_p); + } + while (p != NULL_RTX); + + /* Load up any constants needed into temp gprs */ + for (i = 0; i < frv_ifcvt.cur_scratch_regs; i++) + { + rtx insn = emit_insn_before (frv_ifcvt.scratch_regs[i], existing_insn); + if (! frv_ifcvt.scratch_insns_bitmap) + frv_ifcvt.scratch_insns_bitmap = BITMAP_XMALLOC (); + bitmap_set_bit (frv_ifcvt.scratch_insns_bitmap, INSN_UID (insn)); + frv_ifcvt.scratch_regs[i] = NULL_RTX; + } + + frv_ifcvt.added_insns_list = NULL_RTX; + frv_ifcvt.cur_scratch_regs = 0; + } + + + /* A C expression to cancel any machine dependent modifications in converting + code to conditional execution in the code described by the conditional if + information CE_INFO. */ + + void + frv_ifcvt_modify_cancel (ce_info) + ce_if_block_t *ce_info ATTRIBUTE_UNUSED; + { + int i; + rtx p = frv_ifcvt.added_insns_list; + + /* Loop freeing up the EXPR_LIST's allocated. */ + while (p != NULL_RTX) + { + rtx check_and_jump = XEXP (p, 0); + rtx old_p = p; + + p = XEXP (p, 1); + free_EXPR_LIST_node (check_and_jump); + free_EXPR_LIST_node (old_p); + } + + /* Release any temporary gprs allocated. */ + for (i = 0; i < frv_ifcvt.cur_scratch_regs; i++) + frv_ifcvt.scratch_regs[i] = NULL_RTX; + + frv_ifcvt.added_insns_list = NULL_RTX; + frv_ifcvt.cur_scratch_regs = 0; + return; + } + + /* A C expression for the size in bytes of the trampoline, as an integer. + The template is: + + setlo #0, + setlo #0, + sethi #0, + sethi #0, + jmpl @(gr0,) */ + + int + frv_trampoline_size () + { + return 5 /* instructions */ * 4 /* instruction size */; + } + + + /* A C statement to initialize the variable parts of a trampoline. ADDR is an + RTX for the address of the trampoline; FNADDR is an RTX for the address of + the nested function; STATIC_CHAIN is an RTX for the static chain value that + should be passed to the function when it is called. + + The template is: + + setlo #0, + setlo #0, + sethi #0, + sethi #0, + jmpl @(gr0,) */ + + void + frv_initialize_trampoline (addr, fnaddr, static_chain) + rtx addr; + rtx fnaddr; + rtx static_chain; + { + rtx sc_reg = force_reg (Pmode, static_chain); + + emit_library_call (gen_rtx_SYMBOL_REF (SImode, "__trampoline_setup"), + FALSE, VOIDmode, 4, + addr, Pmode, + GEN_INT (frv_trampoline_size ()), SImode, + fnaddr, Pmode, + sc_reg, Pmode); + } + + + /* Many machines have some registers that cannot be copied directly to or from + memory or even from other types of registers. An example is the `MQ' + register, which on most machines, can only be copied to or from general + registers, but not memory. Some machines allow copying all registers to and + from memory, but require a scratch register for stores to some memory + locations (e.g., those with symbolic address on the RT, and those with + certain symbolic address on the SPARC when compiling PIC). In some cases, + both an intermediate and a scratch register are required. + + You should define these macros to indicate to the reload phase that it may + need to allocate at least one register for a reload in addition to the + register to contain the data. Specifically, if copying X to a register + CLASS in MODE requires an intermediate register, you should define + `SECONDARY_INPUT_RELOAD_CLASS' to return the largest register class all of + whose registers can be used as intermediate registers or scratch registers. + + If copying a register CLASS in MODE to X requires an intermediate or scratch + register, `SECONDARY_OUTPUT_RELOAD_CLASS' should be defined to return the + largest register class required. If the requirements for input and output + reloads are the same, the macro `SECONDARY_RELOAD_CLASS' should be used + instead of defining both macros identically. + + The values returned by these macros are often `GENERAL_REGS'. Return + `NO_REGS' if no spare register is needed; i.e., if X can be directly copied + to or from a register of CLASS in MODE without requiring a scratch register. + Do not define this macro if it would always return `NO_REGS'. + + If a scratch register is required (either with or without an intermediate + register), you should define patterns for `reload_inM' or `reload_outM', as + required.. These patterns, which will normally be implemented with a + `define_expand', should be similar to the `movM' patterns, except that + operand 2 is the scratch register. + + Define constraints for the reload register and scratch register that contain + a single register class. If the original reload register (whose class is + CLASS) can meet the constraint given in the pattern, the value returned by + these macros is used for the class of the scratch register. Otherwise, two + additional reload registers are required. Their classes are obtained from + the constraints in the insn pattern. + + X might be a pseudo-register or a `subreg' of a pseudo-register, which could + either be in a hard register or in memory. Use `true_regnum' to find out; + it will return -1 if the pseudo is in memory and the hard register number if + it is in a register. + + These macros should not be used in the case where a particular class of + registers can only be copied to memory and not to another class of + registers. In that case, secondary reload registers are not needed and + would not be helpful. Instead, a stack location must be used to perform the + copy and the `movM' pattern should use memory as an intermediate storage. + This case often occurs between floating-point and general registers. */ + + enum reg_class + frv_secondary_reload_class (class, mode, x, in_p) + enum reg_class class; + enum machine_mode mode ATTRIBUTE_UNUSED; + rtx x; + int in_p ATTRIBUTE_UNUSED; + { + enum reg_class ret; + + switch (class) + { + default: + ret = NO_REGS; + break; + + /* Accumulators/Accumulator guard registers need to go through floating + point registers. */ + case QUAD_REGS: + case EVEN_REGS: + case GPR_REGS: + ret = NO_REGS; + if (x && GET_CODE (x) == REG) + { + int regno = REGNO (x); + + if (ACC_P (regno) || ACCG_P (regno)) + ret = FPR_REGS; + } + break; + + /* Nonzero constants should be loaded into an FPR through a GPR. */ + case QUAD_FPR_REGS: + case FEVEN_REGS: + case FPR_REGS: + if (x && CONSTANT_P (x) && !ZERO_P (x)) + ret = GPR_REGS; + else + ret = NO_REGS; + break; + + /* All of these types need gpr registers. */ + case ICC_REGS: + case FCC_REGS: + case CC_REGS: + case ICR_REGS: + case FCR_REGS: + case CR_REGS: + case LCR_REG: + case LR_REG: + ret = GPR_REGS; + break; + + /* The accumulators need fpr registers */ + case ACC_REGS: + case EVEN_ACC_REGS: + case QUAD_ACC_REGS: + case ACCG_REGS: + ret = FPR_REGS; + break; + } + + return ret; + } + + + /* A C expression whose value is nonzero if pseudos that have been assigned to + registers of class CLASS would likely be spilled because registers of CLASS + are needed for spill registers. + + The default value of this macro returns 1 if CLASS has exactly one register + and zero otherwise. On most machines, this default should be used. Only + define this macro to some other expression if pseudo allocated by + `local-alloc.c' end up in memory because their hard registers were needed + for spill registers. If this macro returns nonzero for those classes, those + pseudos will only be allocated by `global.c', which knows how to reallocate + the pseudo to another register. If there would not be another register + available for reallocation, you should not change the definition of this + macro since the only effect of such a definition would be to slow down + register allocation. */ + + int + frv_class_likely_spilled_p (class) + enum reg_class class; + { + switch (class) + { + default: + break; + + case ICC_REGS: + case FCC_REGS: + case CC_REGS: + case ICR_REGS: + case FCR_REGS: + case CR_REGS: + case LCR_REG: + case LR_REG: + case SPR_REGS: + case QUAD_ACC_REGS: + case EVEN_ACC_REGS: + case ACC_REGS: + case ACCG_REGS: + return TRUE; + } + + return FALSE; + } + + + /* An expression for the alignment of a structure field FIELD if the + alignment computed in the usual way is COMPUTED. GNU CC uses this + value instead of the value in `BIGGEST_ALIGNMENT' or + `BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only. */ + + /* The definition type of the bit field data is either char, short, long or + long long. The maximum bit size is the number of bits of its own type. + + The bit field data is assigned to a storage unit that has an adequate size + for bit field data retention and is located at the smallest address. + + Consecutive bit field data are packed at consecutive bits having the same + storage unit, with regard to the type, beginning with the MSB and continuing + toward the LSB. + + If a field to be assigned lies over a bit field type boundary, its + assignment is completed by aligning it with a boundary suitable for the + type. + + When a bit field having a bit length of 0 is declared, it is forcibly + assigned to the next storage unit. + + e.g) + struct { + int a:2; + int b:6; + char c:4; + int d:10; + int :0; + int f:2; + } x; + + +0 +1 +2 +3 + &x 00000000 00000000 00000000 00000000 + MLM----L + a b + &x+4 00000000 00000000 00000000 00000000 + M--L + c + &x+8 00000000 00000000 00000000 00000000 + M----------L + d + &x+12 00000000 00000000 00000000 00000000 + ML + f + */ + + int + frv_adjust_field_align (field, computed) + tree field; + int computed; + { + /* C++ provides a null DECL_CONTEXT if the bit field is wider than its + type. */ + if (DECL_BIT_FIELD (field) && DECL_CONTEXT (field)) + { + tree parent = DECL_CONTEXT (field); + tree prev = NULL_TREE; + tree cur; + + /* Loop finding the previous field to the current one */ + for (cur = TYPE_FIELDS (parent); cur && cur != field; cur = TREE_CHAIN (cur)) + { + if (TREE_CODE (cur) != FIELD_DECL) + continue; + + prev = cur; + } + + if (!cur) + abort (); + + /* If this isn't a :0 field and if the previous element is a bitfield + also, see if the type is different, if so, we will need to align the + bit-field to the next boundary */ + if (prev + && ! DECL_PACKED (field) + && ! integer_zerop (DECL_SIZE (field)) + && DECL_BIT_FIELD_TYPE (field) != DECL_BIT_FIELD_TYPE (prev)) + { + int prev_align = TYPE_ALIGN (TREE_TYPE (prev)); + int cur_align = TYPE_ALIGN (TREE_TYPE (field)); + computed = (prev_align > cur_align) ? prev_align : cur_align; + } + } + + return computed; + } + + + /* A C expression that is nonzero if it is permissible to store a value of mode + MODE in hard register number REGNO (or in several registers starting with + that one). For a machine where all registers are equivalent, a suitable + definition is + + #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 + + It is not necessary for this macro to check for the numbers of fixed + registers, because the allocation mechanism considers them to be always + occupied. + + On some machines, double-precision values must be kept in even/odd register + pairs. The way to implement that is to define this macro to reject odd + register numbers for such modes. + + The minimum requirement for a mode to be OK in a register is that the + `movMODE' instruction pattern support moves between the register and any + other hard register for which the mode is OK; and that moving a value into + the register and back out not alter it. + + Since the same instruction used to move `SImode' will work for all narrower + integer modes, it is not necessary on any machine for `HARD_REGNO_MODE_OK' + to distinguish between these modes, provided you define patterns `movhi', + etc., to take advantage of this. This is useful because of the interaction + between `HARD_REGNO_MODE_OK' and `MODES_TIEABLE_P'; it is very desirable for + all integer modes to be tieable. + + Many machines have special registers for floating point arithmetic. Often + people assume that floating point machine modes are allowed only in floating + point registers. This is not true. Any registers that can hold integers + can safely *hold* a floating point machine mode, whether or not floating + arithmetic can be done on it in those registers. Integer move instructions + can be used to move the values. + + On some machines, though, the converse is true: fixed-point machine modes + may not go in floating registers. This is true if the floating registers + normalize any value stored in them, because storing a non-floating value + there would garble it. In this case, `HARD_REGNO_MODE_OK' should reject + fixed-point machine modes in floating registers. But if the floating + registers do not automatically normalize, if you can store any bit pattern + in one and retrieve it unchanged without a trap, then any machine mode may + go in a floating register, so you can define this macro to say so. + + The primary significance of special floating registers is rather that they + are the registers acceptable in floating point arithmetic instructions. + However, this is of no concern to `HARD_REGNO_MODE_OK'. You handle it by + writing the proper constraints for those instructions. + + On some machines, the floating registers are especially slow to access, so + that it is better to store a value in a stack frame than in such a register + if floating point arithmetic is not being done. As long as the floating + registers are not in class `GENERAL_REGS', they will not be used unless some + pattern's constraint asks for one. */ + + int + frv_hard_regno_mode_ok (regno, mode) + int regno; + enum machine_mode mode; + { + int base; + int mask; + + switch (mode) + { + case CCmode: + case CC_UNSmode: + return ICC_P (regno) || GPR_P (regno); + + case CC_CCRmode: + return CR_P (regno) || GPR_P (regno); + + case CC_FPmode: + return FCC_P (regno) || GPR_P (regno); + + default: + break; + } + + /* Set BASE to the first register in REGNO's class. Set MASK to the + bits that must be clear in (REGNO - BASE) for the register to be + well-aligned. */ + if (INTEGRAL_MODE_P (mode) || FLOAT_MODE_P (mode) || VECTOR_MODE_P (mode)) + { + if (ACCG_P (regno)) + { + /* ACCGs store one byte. Two-byte quantities must start in + even-numbered registers, four-byte ones in registers whose + numbers are divisible by four, and so on. */ + base = ACCG_FIRST; + mask = GET_MODE_SIZE (mode) - 1; + } + else + { + /* The other registers store one word. */ + if (GPR_P (regno)) + base = GPR_FIRST; + + else if (FPR_P (regno)) + base = FPR_FIRST; + + else if (ACC_P (regno)) + base = ACC_FIRST; + + else + return 0; + + /* Anything smaller than an SI is OK in any word-sized register. */ + if (GET_MODE_SIZE (mode) < 4) + return 1; + + mask = (GET_MODE_SIZE (mode) / 4) - 1; + } + return (((regno - base) & mask) == 0); + } + + return 0; + } + + + /* A C expression for the number of consecutive hard registers, starting at + register number REGNO, required to hold a value of mode MODE. + + On a machine where all registers are exactly one word, a suitable definition + of this macro is + + #define HARD_REGNO_NREGS(REGNO, MODE) \ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ + / UNITS_PER_WORD)) */ + + /* On the FRV, make the CC_FP mode take 3 words in the integer registers, so + that we can build the appropriate instructions to properly reload the + values. Also, make the byte-sized accumulator guards use one guard + for each byte. */ + + int + frv_hard_regno_nregs (regno, mode) + int regno; + enum machine_mode mode; + { + if (ACCG_P (regno)) + return GET_MODE_SIZE (mode); + else + return (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + } + + + /* A C expression for the maximum number of consecutive registers of + class CLASS needed to hold a value of mode MODE. + + This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value + of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of + `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS. + + This macro helps control the handling of multiple-word values in + the reload pass. + + This declaration is required. */ + + int + frv_class_max_nregs (class, mode) + enum reg_class class; + enum machine_mode mode; + { + if (class == ACCG_REGS) + /* An N-byte value requires N accumulator guards. */ + return GET_MODE_SIZE (mode); + else + return (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + } + + + /* A C expression that is nonzero if X is a legitimate constant for an + immediate operand on the target machine. You can assume that X satisfies + `CONSTANT_P', so you need not check this. In fact, `1' is a suitable + definition for this macro on machines where anything `CONSTANT_P' is valid. */ + + int + frv_legitimate_constant_p (x) + rtx x; + { + enum machine_mode mode = GET_MODE (x); + + /* All of the integer constants are ok */ + if (GET_CODE (x) != CONST_DOUBLE) + return TRUE; + + /* double integer constants are ok */ + if (mode == VOIDmode || mode == DImode) + return TRUE; + + /* 0 is always ok */ + if (x == CONST0_RTX (mode)) + return TRUE; + + /* If floating point is just emulated, allow any constant, since it will be + constructed in the GPRs */ + if (!TARGET_HAS_FPRS) + return TRUE; + + if (mode == DFmode && !TARGET_DOUBLE) + return TRUE; + + /* Otherwise store the constant away and do a load. */ + return FALSE; + } + + /* A C expression for the cost of moving data from a register in class FROM to + one in class TO. The classes are expressed using the enumeration values + such as `GENERAL_REGS'. A value of 4 is the default; other values are + interpreted relative to that. + + It is not required that the cost always equal 2 when FROM is the same as TO; + on some machines it is expensive to move between registers if they are not + general registers. + + If reload sees an insn consisting of a single `set' between two hard + registers, and if `REGISTER_MOVE_COST' applied to their classes returns a + value of 2, reload does not check to ensure that the constraints of the insn + are met. Setting a cost of other than 2 will allow reload to verify that + the constraints are met. You should do this if the `movM' pattern's + constraints do not allow such copying. */ + + #define HIGH_COST 40 + #define MEDIUM_COST 3 + #define LOW_COST 1 + + int + frv_register_move_cost (from, to) + enum reg_class from; + enum reg_class to; + { + switch (from) + { + default: + break; + + case QUAD_REGS: + case EVEN_REGS: + case GPR_REGS: + switch (to) + { + default: + break; + + case QUAD_REGS: + case EVEN_REGS: + case GPR_REGS: + return LOW_COST; + + case FEVEN_REGS: + case FPR_REGS: + return LOW_COST; + + case LCR_REG: + case LR_REG: + case SPR_REGS: + return LOW_COST; + } + + case FEVEN_REGS: + case FPR_REGS: + switch (to) + { + default: + break; + + case QUAD_REGS: + case EVEN_REGS: + case GPR_REGS: + case ACC_REGS: + case EVEN_ACC_REGS: + case QUAD_ACC_REGS: + case ACCG_REGS: + return MEDIUM_COST; + + case FEVEN_REGS: + case FPR_REGS: + return LOW_COST; + } + + case LCR_REG: + case LR_REG: + case SPR_REGS: + switch (to) + { + default: + break; + + case QUAD_REGS: + case EVEN_REGS: + case GPR_REGS: + return MEDIUM_COST; + } + + case ACC_REGS: + case EVEN_ACC_REGS: + case QUAD_ACC_REGS: + case ACCG_REGS: + switch (to) + { + default: + break; + + case FEVEN_REGS: + case FPR_REGS: + return MEDIUM_COST; + + } + } + + return HIGH_COST; + } + + /* Implementation of TARGET_ASM_INTEGER. In the FRV case we need to + use ".picptr" to generate safe relocations for PIC code. We also + need a fixup entry for aligned (non-debugging) code. */ + + static bool + frv_assemble_integer (value, size, aligned_p) + rtx value; + unsigned int size; + int aligned_p; + { + if (flag_pic && size == UNITS_PER_WORD) + { + if (GET_CODE (value) == CONST + || GET_CODE (value) == SYMBOL_REF + || GET_CODE (value) == LABEL_REF) + { + if (aligned_p) + { + static int label_num = 0; + char buf[256]; + const char *p; + + ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", label_num++); + p = (* targetm.strip_name_encoding) (buf); + + fprintf (asm_out_file, "%s:\n", p); + fprintf (asm_out_file, "%s\n", FIXUP_SECTION_ASM_OP); + fprintf (asm_out_file, "\t.picptr\t%s\n", p); + fprintf (asm_out_file, "\t.previous\n"); + } + assemble_integer_with_op ("\t.picptr\t", value); + return true; + } + if (!aligned_p) + { + /* We've set the unaligned SI op to NULL, so we always have to + handle the unaligned case here. */ + assemble_integer_with_op ("\t.4byte\t", value); + return true; + } + } + return default_assemble_integer (value, size, aligned_p); + } + + /* Function to set up the backend function structure. */ + + static struct machine_function * + frv_init_machine_status () + { + return ggc_alloc_cleared (sizeof (struct machine_function)); + } + + + /* Update the register state information, to know about which registers are set + or clobbered. */ + + static void + frv_registers_update (x, reg_state, modified, p_num_mod, flag) + rtx x; + unsigned char reg_state[]; + int modified[]; + int *p_num_mod; + int flag; + { + int regno, reg_max; + rtx reg; + rtx cond; + const char *format; + int length; + int j; + + switch (GET_CODE (x)) + { + default: + break; + + /* Clobber just modifies a register, it doesn't make it live. */ + case CLOBBER: + frv_registers_update (XEXP (x, 0), reg_state, modified, p_num_mod, + flag | REGSTATE_MODIFIED); + return; + + /* Pre modify updates the first argument, just references the second. */ + case PRE_MODIFY: + case SET: + frv_registers_update (XEXP (x, 0), reg_state, modified, p_num_mod, + flag | REGSTATE_MODIFIED | REGSTATE_LIVE); + frv_registers_update (XEXP (x, 1), reg_state, modified, p_num_mod, flag); + return; + + /* For COND_EXEC, pass the appropriate flag to evaluate the conditional + statement, but just to be sure, make sure it is the type of cond_exec + we expect. */ + case COND_EXEC: + cond = XEXP (x, 0); + if ((GET_CODE (cond) == EQ || GET_CODE (cond) == NE) + && GET_CODE (XEXP (cond, 0)) == REG + && CR_P (REGNO (XEXP (cond, 0))) + && GET_CODE (XEXP (cond, 1)) == CONST_INT + && INTVAL (XEXP (cond, 1)) == 0 + && (flag & (REGSTATE_MODIFIED | REGSTATE_IF_EITHER)) == 0) + { + frv_registers_update (cond, reg_state, modified, p_num_mod, flag); + flag |= ((REGNO (XEXP (cond, 0)) - CR_FIRST) + | ((GET_CODE (cond) == NE) + ? REGSTATE_IF_TRUE + : REGSTATE_IF_FALSE)); + + frv_registers_update (XEXP (x, 1), reg_state, modified, p_num_mod, + flag); + return; + } + else + fatal_insn ("frv_registers_update", x); + + /* MEM resets the modification bits. */ + case MEM: + flag &= ~REGSTATE_MODIFIED; + break; + + /* See if we need to set the modified flag. */ + case SUBREG: + reg = SUBREG_REG (x); + if (GET_CODE (reg) == REG) + { + regno = subreg_regno (x); + reg_max = REGNO (reg) + HARD_REGNO_NREGS (regno, GET_MODE (reg)); + goto reg_common; + } + break; + + case REG: + regno = REGNO (x); + reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); + /* fall through */ + + reg_common: + if (flag & REGSTATE_MODIFIED) + { + flag &= REGSTATE_MASK; + while (regno < reg_max) + { + int rs = reg_state[regno]; + + if (flag != rs) + { + if ((rs & REGSTATE_MODIFIED) == 0) + { + modified[ *p_num_mod ] = regno; + (*p_num_mod)++; + } + + /* If the previous register state had the register as + modified, possibly in some conditional execution context, + and the current insn modifies in some other context, or + outside of conditional execution, just mark the variable + as modified. */ + else + flag &= ~(REGSTATE_IF_EITHER | REGSTATE_CC_MASK); + + reg_state[regno] = (rs | flag); + } + regno++; + } + } + return; + } + + + length = GET_RTX_LENGTH (GET_CODE (x)); + format = GET_RTX_FORMAT (GET_CODE (x)); + + for (j = 0; j < length; ++j) + { + switch (format[j]) + { + case 'e': + frv_registers_update (XEXP (x, j), reg_state, modified, p_num_mod, + flag); + break; + + case 'V': + case 'E': + if (XVEC (x, j) != 0) + { + int k; + for (k = 0; k < XVECLEN (x, j); ++k) + frv_registers_update (XVECEXP (x, j, k), reg_state, modified, + p_num_mod, flag); + } + break; + + default: + /* Nothing to do. */ + break; + } + } + + return; + } + + + /* Return if any registers in a hard register set were used an insn. */ + + static int + frv_registers_used_p (x, reg_state, flag) + rtx x; + unsigned char reg_state[]; + int flag; + { + int regno, reg_max; + rtx reg; + rtx cond; + rtx dest; + const char *format; + int result; + int length; + int j; + + switch (GET_CODE (x)) + { + default: + break; + + /* Skip clobber, that doesn't use the previous value */ + case CLOBBER: + return FALSE; + + /* For SET, if a conditional jump has occurred in the same insn, only + allow a set of a CR register if that register is not currently live. + This is because on the FR-V, B0/B1 instructions are always last. + Otherwise, don't look at the result, except within a MEM, but do look + at the source. */ + case SET: + dest = SET_DEST (x); + if (flag & REGSTATE_CONDJUMP + && GET_CODE (dest) == REG && CR_P (REGNO (dest)) + && (reg_state[ REGNO (dest) ] & REGSTATE_LIVE) != 0) + return TRUE; + + if (GET_CODE (dest) == MEM) + { + result = frv_registers_used_p (XEXP (dest, 0), reg_state, flag); + if (result) + return result; + } + + return frv_registers_used_p (SET_SRC (x), reg_state, flag); + + /* For COND_EXEC, pass the appropriate flag to evaluate the conditional + statement, but just to be sure, make sure it is the type of cond_exec + we expect. */ + case COND_EXEC: + cond = XEXP (x, 0); + if ((GET_CODE (cond) == EQ || GET_CODE (cond) == NE) + && GET_CODE (XEXP (cond, 0)) == REG + && CR_P (REGNO (XEXP (cond, 0))) + && GET_CODE (XEXP (cond, 1)) == CONST_INT + && INTVAL (XEXP (cond, 1)) == 0 + && (flag & (REGSTATE_MODIFIED | REGSTATE_IF_EITHER)) == 0) + { + result = frv_registers_used_p (cond, reg_state, flag); + if (result) + return result; + + flag |= ((REGNO (XEXP (cond, 0)) - CR_FIRST) + | ((GET_CODE (cond) == NE) + ? REGSTATE_IF_TRUE + : REGSTATE_IF_FALSE)); + + return frv_registers_used_p (XEXP (x, 1), reg_state, flag); + } + else + fatal_insn ("frv_registers_used_p", x); + + /* See if a register or subreg was modified in the same VLIW insn. */ + case SUBREG: + reg = SUBREG_REG (x); + if (GET_CODE (reg) == REG) + { + regno = subreg_regno (x); + reg_max = REGNO (reg) + HARD_REGNO_NREGS (regno, GET_MODE (reg)); + goto reg_common; + } + break; + + case REG: + regno = REGNO (x); + reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); + /* fall through */ + + reg_common: + while (regno < reg_max) + { + int rs = reg_state[regno]; + + if (rs & REGSTATE_MODIFIED) + { + int rs_if = rs & REGSTATE_IF_EITHER; + int flag_if = flag & REGSTATE_IF_EITHER; + + /* Simple modification, no conditional execution */ + if ((rs & REGSTATE_IF_EITHER) == 0) + return TRUE; + + /* See if the variable is only modified in a conditional + execution expression opposite to the conditional execution + expression that governs this expression (ie, true vs. false + for the same CC register). If this isn't two halves of the + same conditional expression, consider the register + modified. */ + if (((rs_if == REGSTATE_IF_TRUE && flag_if == REGSTATE_IF_FALSE) + || (rs_if == REGSTATE_IF_FALSE && flag_if == REGSTATE_IF_TRUE)) + && ((rs & REGSTATE_CC_MASK) == (flag & REGSTATE_CC_MASK))) + ; + else + return TRUE; + } + + regno++; + } + return FALSE; + } + + + length = GET_RTX_LENGTH (GET_CODE (x)); + format = GET_RTX_FORMAT (GET_CODE (x)); + + for (j = 0; j < length; ++j) + { + switch (format[j]) + { + case 'e': + result = frv_registers_used_p (XEXP (x, j), reg_state, flag); + if (result != 0) + return result; + break; + + case 'V': + case 'E': + if (XVEC (x, j) != 0) + { + int k; + for (k = 0; k < XVECLEN (x, j); ++k) + { + result = frv_registers_used_p (XVECEXP (x, j, k), reg_state, + flag); + if (result != 0) + return result; + } + } + break; + + default: + /* Nothing to do. */ + break; + } + } + + return 0; + } + + /* Return if any registers in a hard register set were set in an insn. */ + + static int + frv_registers_set_p (x, reg_state, modify_p) + rtx x; + unsigned char reg_state[]; + int modify_p; + { + int regno, reg_max; + rtx reg; + rtx cond; + const char *format; + int length; + int j; + + switch (GET_CODE (x)) + { + default: + break; + + case CLOBBER: + return frv_registers_set_p (XEXP (x, 0), reg_state, TRUE); + + case PRE_MODIFY: + case SET: + return (frv_registers_set_p (XEXP (x, 0), reg_state, TRUE) + || frv_registers_set_p (XEXP (x, 1), reg_state, FALSE)); + + case COND_EXEC: + cond = XEXP (x, 0); + /* just to be sure, make sure it is the type of cond_exec we + expect. */ + if ((GET_CODE (cond) == EQ || GET_CODE (cond) == NE) + && GET_CODE (XEXP (cond, 0)) == REG + && CR_P (REGNO (XEXP (cond, 0))) + && GET_CODE (XEXP (cond, 1)) == CONST_INT + && INTVAL (XEXP (cond, 1)) == 0 + && !modify_p) + return frv_registers_set_p (XEXP (x, 1), reg_state, modify_p); + else + fatal_insn ("frv_registers_set_p", x); + + /* MEM resets the modification bits. */ + case MEM: + modify_p = FALSE; + break; + + /* See if we need to set the modified modify_p. */ + case SUBREG: + reg = SUBREG_REG (x); + if (GET_CODE (reg) == REG) + { + regno = subreg_regno (x); + reg_max = REGNO (reg) + HARD_REGNO_NREGS (regno, GET_MODE (reg)); + goto reg_common; + } + break; + + case REG: + regno = REGNO (x); + reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); + /* fall through */ + + reg_common: + if (modify_p) + while (regno < reg_max) + { + int rs = reg_state[regno]; + + if (rs & REGSTATE_MODIFIED) + return TRUE; + regno++; + } + return FALSE; + } + + + length = GET_RTX_LENGTH (GET_CODE (x)); + format = GET_RTX_FORMAT (GET_CODE (x)); + + for (j = 0; j < length; ++j) + { + switch (format[j]) + { + case 'e': + if (frv_registers_set_p (XEXP (x, j), reg_state, modify_p)) + return TRUE; + break; + + case 'V': + case 'E': + if (XVEC (x, j) != 0) + { + int k; + for (k = 0; k < XVECLEN (x, j); ++k) + if (frv_registers_set_p (XVECEXP (x, j, k), reg_state, + modify_p)) + return TRUE; + } + break; + + default: + /* Nothing to do. */ + break; + } + } + + return FALSE; + } + + + /* In rare cases, correct code generation requires extra machine dependent + processing between the second jump optimization pass and delayed branch + scheduling. On those machines, define this macro as a C statement to act on + the code starting at INSN. */ + + /* On the FR-V, this pass is used to rescan the insn chain, and pack + conditional branches/calls/jumps, etc. with previous insns where it can. It + does not reorder the instructions. We assume the scheduler left the flow + information in a reasonable state. */ + + static void + frv_pack_insns () + { + state_t frv_state; /* frv state machine */ + int cur_start_vliw_p; /* current insn starts a VLIW insn */ + int next_start_vliw_p; /* next insn starts a VLIW insn */ + int cur_condjump_p; /* flag if current insn is a cond jump*/ + int next_condjump_p; /* flag if next insn is a cond jump */ + rtx insn; + rtx link; + int j; + int num_mod = 0; /* # of modified registers */ + int modified[FIRST_PSEUDO_REGISTER]; /* registers modified in current VLIW */ + /* register state information */ + unsigned char reg_state[FIRST_PSEUDO_REGISTER]; + + /* If we weren't going to pack the insns, don't bother with this pass. */ + if (!optimize || !flag_schedule_insns_after_reload || TARGET_NO_VLIW_BRANCH) + return; + + switch (frv_cpu_type) + { + default: + case FRV_CPU_FR300: /* FR300/simple are single issue */ + case FRV_CPU_SIMPLE: + return; + + case FRV_CPU_GENERIC: /* FR-V and FR500 are multi-issue */ + case FRV_CPU_FR400: + case FRV_CPU_FR500: + case FRV_CPU_TOMCAT: + break; + } + + /* Set up the instruction and register states. */ + dfa_start (); + frv_state = (state_t) xmalloc (state_size ()); + memset ((PTR) reg_state, REGSTATE_DEAD, sizeof (reg_state)); + + /* Go through the insns, and repack the insns. */ + state_reset (frv_state); + cur_start_vliw_p = FALSE; + next_start_vliw_p = TRUE; + cur_condjump_p = 0; + next_condjump_p = 0; + + for (insn = get_insns (); insn != NULL_RTX; insn = NEXT_INSN (insn)) + { + enum rtx_code code = GET_CODE (insn); + enum rtx_code pattern_code; + + /* For basic block begin notes redo the live information, and skip other + notes. */ + if (code == NOTE) + { + if (NOTE_LINE_NUMBER (insn) == (int)NOTE_INSN_BASIC_BLOCK) + { + regset live; + + for (j = 0; j < FIRST_PSEUDO_REGISTER; j++) + reg_state[j] &= ~ REGSTATE_LIVE; + + live = NOTE_BASIC_BLOCK (insn)->global_live_at_start; + EXECUTE_IF_SET_IN_REG_SET(live, 0, j, + { + reg_state[j] |= REGSTATE_LIVE; + }); + } + + continue; + } + + /* things like labels reset everything. */ + if (GET_RTX_CLASS (code) != 'i') + { + next_start_vliw_p = TRUE; + continue; + } + + /* Clear the VLIW start flag on random USE and CLOBBER insns, which is + set on the USE insn that preceeds the return, and potentially on + CLOBBERs for setting multiword variables. Also skip the ADDR_VEC + holding the case table labels. */ + pattern_code = GET_CODE (PATTERN (insn)); + if (pattern_code == USE || pattern_code == CLOBBER + || pattern_code == ADDR_VEC || pattern_code == ADDR_DIFF_VEC) + { + CLEAR_VLIW_START (insn); + continue; + } + + cur_start_vliw_p = next_start_vliw_p; + next_start_vliw_p = FALSE; + + cur_condjump_p |= next_condjump_p; + next_condjump_p = 0; + + /* Unconditional branches and calls end the current VLIW insn. */ + if (code == CALL_INSN) + { + next_start_vliw_p = TRUE; + + /* On a TOMCAT, calls must be alone in the VLIW insns. */ + if (frv_cpu_type == FRV_CPU_TOMCAT) + cur_start_vliw_p = TRUE; + } + else if (code == JUMP_INSN) + { + if (any_condjump_p (insn)) + next_condjump_p = REGSTATE_CONDJUMP; + else + next_start_vliw_p = TRUE; + } + + /* Only allow setting a CCR register after a conditional branch. */ + else if (((cur_condjump_p & REGSTATE_CONDJUMP) != 0) + && get_attr_type (insn) != TYPE_CCR) + cur_start_vliw_p = TRUE; + + /* Determine if we need to start a new VLIW instruction. */ + if (cur_start_vliw_p + /* Do not check for register conflicts in a setlo instruction + because any output or true dependencies will be with the + partnering sethi instruction, with which it can be packed. + + Although output dependencies are rare they are still + possible. So check output dependencies in VLIW insn. */ + || (get_attr_type (insn) != TYPE_SETLO + && (frv_registers_used_p (PATTERN (insn), + reg_state, + cur_condjump_p) + || frv_registers_set_p (PATTERN (insn), reg_state, FALSE))) + || state_transition (frv_state, insn) >= 0) + { + SET_VLIW_START (insn); + state_reset (frv_state); + state_transition (frv_state, insn); + cur_condjump_p = 0; + + /* Update the modified registers. */ + for (j = 0; j < num_mod; j++) + reg_state[ modified[j] ] &= ~(REGSTATE_CC_MASK + | REGSTATE_IF_EITHER + | REGSTATE_MODIFIED); + + num_mod = 0; + } + else + CLEAR_VLIW_START (insn); + + /* Record which registers are modified. */ + frv_registers_update (PATTERN (insn), reg_state, modified, &num_mod, 0); + + /* Process the death notices */ + for (link = REG_NOTES (insn); + link != NULL_RTX; + link = XEXP (link, 1)) + { + rtx reg = XEXP (link, 0); + + if (REG_NOTE_KIND (link) == REG_DEAD && GET_CODE (reg) == REG) + { + int regno = REGNO (reg); + int n = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg)); + for (; regno < n; regno++) + reg_state[regno] &= ~REGSTATE_LIVE; + } + } + } + + free ((PTR) frv_state); + dfa_finish (); + return; + } + + + #define def_builtin(name, type, code) \ + builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL) + + struct builtin_description + { + enum insn_code icode; + const char *name; + enum frv_builtins code; + enum rtx_code comparison; + unsigned int flag; + }; + + /* Media intrinsics that take a single, constant argument. */ + + static struct builtin_description bdesc_set[] = + { + { CODE_FOR_mhdsets, "__MHDSETS", FRV_BUILTIN_MHDSETS, 0, 0 } + }; + + /* Media intrinsics that take just one argument. */ + + static struct builtin_description bdesc_1arg[] = + { + { CODE_FOR_mnot, "__MNOT", FRV_BUILTIN_MNOT, 0, 0 }, + { CODE_FOR_munpackh, "__MUNPACKH", FRV_BUILTIN_MUNPACKH, 0, 0 }, + { CODE_FOR_mbtoh, "__MBTOH", FRV_BUILTIN_MBTOH, 0, 0 }, + { CODE_FOR_mhtob, "__MHTOB", FRV_BUILTIN_MHTOB, 0, 0 }, + { CODE_FOR_mabshs, "__MABSHS", FRV_BUILTIN_MABSHS, 0, 0 } + }; + + /* Media intrinsics that take two arguments. */ + + static struct builtin_description bdesc_2arg[] = + { + { CODE_FOR_mand, "__MAND", FRV_BUILTIN_MAND, 0, 0 }, + { CODE_FOR_mor, "__MOR", FRV_BUILTIN_MOR, 0, 0 }, + { CODE_FOR_mxor, "__MXOR", FRV_BUILTIN_MXOR, 0, 0 }, + { CODE_FOR_maveh, "__MAVEH", FRV_BUILTIN_MAVEH, 0, 0 }, + { CODE_FOR_msaths, "__MSATHS", FRV_BUILTIN_MSATHS, 0, 0 }, + { CODE_FOR_msathu, "__MSATHU", FRV_BUILTIN_MSATHU, 0, 0 }, + { CODE_FOR_maddhss, "__MADDHSS", FRV_BUILTIN_MADDHSS, 0, 0 }, + { CODE_FOR_maddhus, "__MADDHUS", FRV_BUILTIN_MADDHUS, 0, 0 }, + { CODE_FOR_msubhss, "__MSUBHSS", FRV_BUILTIN_MSUBHSS, 0, 0 }, + { CODE_FOR_msubhus, "__MSUBHUS", FRV_BUILTIN_MSUBHUS, 0, 0 }, + { CODE_FOR_mqaddhss, "__MQADDHSS", FRV_BUILTIN_MQADDHSS, 0, 0 }, + { CODE_FOR_mqaddhus, "__MQADDHUS", FRV_BUILTIN_MQADDHUS, 0, 0 }, + { CODE_FOR_mqsubhss, "__MQSUBHSS", FRV_BUILTIN_MQSUBHSS, 0, 0 }, + { CODE_FOR_mqsubhus, "__MQSUBHUS", FRV_BUILTIN_MQSUBHUS, 0, 0 }, + { CODE_FOR_mpackh, "__MPACKH", FRV_BUILTIN_MPACKH, 0, 0 }, + { CODE_FOR_mdpackh, "__MDPACKH", FRV_BUILTIN_MDPACKH, 0, 0 }, + { CODE_FOR_mcop1, "__Mcop1", FRV_BUILTIN_MCOP1, 0, 0 }, + { CODE_FOR_mcop2, "__Mcop2", FRV_BUILTIN_MCOP2, 0, 0 }, + { CODE_FOR_mwcut, "__MWCUT", FRV_BUILTIN_MWCUT, 0, 0 }, + { CODE_FOR_mqsaths, "__MQSATHS", FRV_BUILTIN_MQSATHS, 0, 0 } + }; + + /* Media intrinsics that take two arguments, the first being an ACC number. */ + + static struct builtin_description bdesc_cut[] = + { + { CODE_FOR_mcut, "__MCUT", FRV_BUILTIN_MCUT, 0, 0 }, + { CODE_FOR_mcutss, "__MCUTSS", FRV_BUILTIN_MCUTSS, 0, 0 }, + { CODE_FOR_mdcutssi, "__MDCUTSSI", FRV_BUILTIN_MDCUTSSI, 0, 0 } + }; + + /* Two-argument media intrinsics with an immediate second argument. */ + + static struct builtin_description bdesc_2argimm[] = + { + { CODE_FOR_mrotli, "__MROTLI", FRV_BUILTIN_MROTLI, 0, 0 }, + { CODE_FOR_mrotri, "__MROTRI", FRV_BUILTIN_MROTRI, 0, 0 }, + { CODE_FOR_msllhi, "__MSLLHI", FRV_BUILTIN_MSLLHI, 0, 0 }, + { CODE_FOR_msrlhi, "__MSRLHI", FRV_BUILTIN_MSRLHI, 0, 0 }, + { CODE_FOR_msrahi, "__MSRAHI", FRV_BUILTIN_MSRAHI, 0, 0 }, + { CODE_FOR_mexpdhw, "__MEXPDHW", FRV_BUILTIN_MEXPDHW, 0, 0 }, + { CODE_FOR_mexpdhd, "__MEXPDHD", FRV_BUILTIN_MEXPDHD, 0, 0 }, + { CODE_FOR_mdrotli, "__MDROTLI", FRV_BUILTIN_MDROTLI, 0, 0 }, + { CODE_FOR_mcplhi, "__MCPLHI", FRV_BUILTIN_MCPLHI, 0, 0 }, + { CODE_FOR_mcpli, "__MCPLI", FRV_BUILTIN_MCPLI, 0, 0 }, + { CODE_FOR_mhsetlos, "__MHSETLOS", FRV_BUILTIN_MHSETLOS, 0, 0 }, + { CODE_FOR_mhsetloh, "__MHSETLOH", FRV_BUILTIN_MHSETLOH, 0, 0 }, + { CODE_FOR_mhsethis, "__MHSETHIS", FRV_BUILTIN_MHSETHIS, 0, 0 }, + { CODE_FOR_mhsethih, "__MHSETHIH", FRV_BUILTIN_MHSETHIH, 0, 0 }, + { CODE_FOR_mhdseth, "__MHDSETH", FRV_BUILTIN_MHDSETH, 0, 0 } + }; + + /* Media intrinsics that take two arguments and return void, the first argument + being a pointer to 4 words in memory. */ + + static struct builtin_description bdesc_void2arg[] = + { + { CODE_FOR_mdunpackh, "__MDUNPACKH", FRV_BUILTIN_MDUNPACKH, 0, 0 }, + { CODE_FOR_mbtohe, "__MBTOHE", FRV_BUILTIN_MBTOHE, 0, 0 }, + }; + + /* Media intrinsics that take three arguments, the first being a const_int that + denotes an accumulator, and that return void. */ + + static struct builtin_description bdesc_void3arg[] = + { + { CODE_FOR_mcpxrs, "__MCPXRS", FRV_BUILTIN_MCPXRS, 0, 0 }, + { CODE_FOR_mcpxru, "__MCPXRU", FRV_BUILTIN_MCPXRU, 0, 0 }, + { CODE_FOR_mcpxis, "__MCPXIS", FRV_BUILTIN_MCPXIS, 0, 0 }, + { CODE_FOR_mcpxiu, "__MCPXIU", FRV_BUILTIN_MCPXIU, 0, 0 }, + { CODE_FOR_mmulhs, "__MMULHS", FRV_BUILTIN_MMULHS, 0, 0 }, + { CODE_FOR_mmulhu, "__MMULHU", FRV_BUILTIN_MMULHU, 0, 0 }, + { CODE_FOR_mmulxhs, "__MMULXHS", FRV_BUILTIN_MMULXHS, 0, 0 }, + { CODE_FOR_mmulxhu, "__MMULXHU", FRV_BUILTIN_MMULXHU, 0, 0 }, + { CODE_FOR_mmachs, "__MMACHS", FRV_BUILTIN_MMACHS, 0, 0 }, + { CODE_FOR_mmachu, "__MMACHU", FRV_BUILTIN_MMACHU, 0, 0 }, + { CODE_FOR_mmrdhs, "__MMRDHS", FRV_BUILTIN_MMRDHS, 0, 0 }, + { CODE_FOR_mmrdhu, "__MMRDHU", FRV_BUILTIN_MMRDHU, 0, 0 }, + { CODE_FOR_mqcpxrs, "__MQCPXRS", FRV_BUILTIN_MQCPXRS, 0, 0 }, + { CODE_FOR_mqcpxru, "__MQCPXRU", FRV_BUILTIN_MQCPXRU, 0, 0 }, + { CODE_FOR_mqcpxis, "__MQCPXIS", FRV_BUILTIN_MQCPXIS, 0, 0 }, + { CODE_FOR_mqcpxiu, "__MQCPXIU", FRV_BUILTIN_MQCPXIU, 0, 0 }, + { CODE_FOR_mqmulhs, "__MQMULHS", FRV_BUILTIN_MQMULHS, 0, 0 }, + { CODE_FOR_mqmulhu, "__MQMULHU", FRV_BUILTIN_MQMULHU, 0, 0 }, + { CODE_FOR_mqmulxhs, "__MQMULXHS", FRV_BUILTIN_MQMULXHS, 0, 0 }, + { CODE_FOR_mqmulxhu, "__MQMULXHU", FRV_BUILTIN_MQMULXHU, 0, 0 }, + { CODE_FOR_mqmachs, "__MQMACHS", FRV_BUILTIN_MQMACHS, 0, 0 }, + { CODE_FOR_mqmachu, "__MQMACHU", FRV_BUILTIN_MQMACHU, 0, 0 }, + { CODE_FOR_mqxmachs, "__MQXMACHS", FRV_BUILTIN_MQXMACHS, 0, 0 }, + { CODE_FOR_mqxmacxhs, "__MQXMACXHS", FRV_BUILTIN_MQXMACXHS, 0, 0 }, + { CODE_FOR_mqmacxhs, "__MQMACXHS", FRV_BUILTIN_MQMACXHS, 0, 0 } + }; + + /* Media intrinsics that take two accumulator numbers as argument and + return void. */ + + static struct builtin_description bdesc_voidacc[] = + { + { CODE_FOR_maddaccs, "__MADDACCS", FRV_BUILTIN_MADDACCS, 0, 0 }, + { CODE_FOR_msubaccs, "__MSUBACCS", FRV_BUILTIN_MSUBACCS, 0, 0 }, + { CODE_FOR_masaccs, "__MASACCS", FRV_BUILTIN_MASACCS, 0, 0 }, + { CODE_FOR_mdaddaccs, "__MDADDACCS", FRV_BUILTIN_MDADDACCS, 0, 0 }, + { CODE_FOR_mdsubaccs, "__MDSUBACCS", FRV_BUILTIN_MDSUBACCS, 0, 0 }, + { CODE_FOR_mdasaccs, "__MDASACCS", FRV_BUILTIN_MDASACCS, 0, 0 } + }; + + /* Initialize media builtins. */ + + static void + frv_init_builtins () + { + tree endlink = void_list_node; + tree accumulator = integer_type_node; + tree integer = integer_type_node; + tree voidt = void_type_node; + tree uhalf = short_unsigned_type_node; + tree sword1 = long_integer_type_node; + tree uword1 = long_unsigned_type_node; + tree sword2 = long_long_integer_type_node; + tree uword2 = long_long_unsigned_type_node; + tree uword4 = build_pointer_type (uword1); + + #define UNARY(RET, T1) \ + build_function_type (RET, tree_cons (NULL_TREE, T1, endlink)) + + #define BINARY(RET, T1, T2) \ + build_function_type (RET, tree_cons (NULL_TREE, T1, \ + tree_cons (NULL_TREE, T2, endlink))) + + #define TRINARY(RET, T1, T2, T3) \ + build_function_type (RET, tree_cons (NULL_TREE, T1, \ + tree_cons (NULL_TREE, T2, \ + tree_cons (NULL_TREE, T3, endlink)))) + + tree void_ftype_void = build_function_type (voidt, endlink); + + tree void_ftype_acc = UNARY (voidt, accumulator); + tree void_ftype_uw4_uw1 = BINARY (voidt, uword4, uword1); + tree void_ftype_uw4_uw2 = BINARY (voidt, uword4, uword2); + tree void_ftype_acc_uw1 = BINARY (voidt, accumulator, uword1); + tree void_ftype_acc_acc = BINARY (voidt, accumulator, accumulator); + tree void_ftype_acc_uw1_uw1 = TRINARY (voidt, accumulator, uword1, uword1); + tree void_ftype_acc_sw1_sw1 = TRINARY (voidt, accumulator, sword1, sword1); + tree void_ftype_acc_uw2_uw2 = TRINARY (voidt, accumulator, uword2, uword2); + tree void_ftype_acc_sw2_sw2 = TRINARY (voidt, accumulator, sword2, sword2); + + tree uw1_ftype_uw1 = UNARY (uword1, uword1); + tree uw1_ftype_sw1 = UNARY (uword1, sword1); + tree uw1_ftype_uw2 = UNARY (uword1, uword2); + tree uw1_ftype_acc = UNARY (uword1, accumulator); + tree uw1_ftype_uh_uh = BINARY (uword1, uhalf, uhalf); + tree uw1_ftype_uw1_uw1 = BINARY (uword1, uword1, uword1); + tree uw1_ftype_uw1_int = BINARY (uword1, uword1, integer); + tree uw1_ftype_acc_uw1 = BINARY (uword1, accumulator, uword1); + tree uw1_ftype_acc_sw1 = BINARY (uword1, accumulator, sword1); + tree uw1_ftype_uw2_uw1 = BINARY (uword1, uword2, uword1); + tree uw1_ftype_uw2_int = BINARY (uword1, uword2, integer); + + tree sw1_ftype_int = UNARY (sword1, integer); + tree sw1_ftype_sw1_sw1 = BINARY (sword1, sword1, sword1); + tree sw1_ftype_sw1_int = BINARY (sword1, sword1, integer); + + tree uw2_ftype_uw1 = UNARY (uword2, uword1); + tree uw2_ftype_uw1_int = BINARY (uword2, uword1, integer); + tree uw2_ftype_uw2_uw2 = BINARY (uword2, uword2, uword2); + tree uw2_ftype_uw2_int = BINARY (uword2, uword2, integer); + tree uw2_ftype_acc_int = BINARY (uword2, accumulator, integer); + + tree sw2_ftype_sw2_sw2 = BINARY (sword2, sword2, sword2); + + def_builtin ("__MAND", uw1_ftype_uw1_uw1, FRV_BUILTIN_MAND); + def_builtin ("__MOR", uw1_ftype_uw1_uw1, FRV_BUILTIN_MOR); + def_builtin ("__MXOR", uw1_ftype_uw1_uw1, FRV_BUILTIN_MXOR); + def_builtin ("__MNOT", uw1_ftype_uw1, FRV_BUILTIN_MNOT); + def_builtin ("__MROTLI", uw1_ftype_uw1_int, FRV_BUILTIN_MROTLI); + def_builtin ("__MROTRI", uw1_ftype_uw1_int, FRV_BUILTIN_MROTRI); + def_builtin ("__MWCUT", uw1_ftype_uw2_uw1, FRV_BUILTIN_MWCUT); + def_builtin ("__MAVEH", uw1_ftype_uw1_uw1, FRV_BUILTIN_MAVEH); + def_builtin ("__MSLLHI", uw1_ftype_uw1_int, FRV_BUILTIN_MSLLHI); + def_builtin ("__MSRLHI", uw1_ftype_uw1_int, FRV_BUILTIN_MSRLHI); + def_builtin ("__MSRAHI", sw1_ftype_sw1_int, FRV_BUILTIN_MSRAHI); + def_builtin ("__MSATHS", sw1_ftype_sw1_sw1, FRV_BUILTIN_MSATHS); + def_builtin ("__MSATHU", uw1_ftype_uw1_uw1, FRV_BUILTIN_MSATHU); + def_builtin ("__MADDHSS", sw1_ftype_sw1_sw1, FRV_BUILTIN_MADDHSS); + def_builtin ("__MADDHUS", uw1_ftype_uw1_uw1, FRV_BUILTIN_MADDHUS); + def_builtin ("__MSUBHSS", sw1_ftype_sw1_sw1, FRV_BUILTIN_MSUBHSS); + def_builtin ("__MSUBHUS", uw1_ftype_uw1_uw1, FRV_BUILTIN_MSUBHUS); + def_builtin ("__MMULHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMULHS); + def_builtin ("__MMULHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMULHU); + def_builtin ("__MMULXHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMULXHS); + def_builtin ("__MMULXHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMULXHU); + def_builtin ("__MMACHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMACHS); + def_builtin ("__MMACHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMACHU); + def_builtin ("__MMRDHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMRDHS); + def_builtin ("__MMRDHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMRDHU); + def_builtin ("__MQADDHSS", sw2_ftype_sw2_sw2, FRV_BUILTIN_MQADDHSS); + def_builtin ("__MQADDHUS", uw2_ftype_uw2_uw2, FRV_BUILTIN_MQADDHUS); + def_builtin ("__MQSUBHSS", sw2_ftype_sw2_sw2, FRV_BUILTIN_MQSUBHSS); + def_builtin ("__MQSUBHUS", uw2_ftype_uw2_uw2, FRV_BUILTIN_MQSUBHUS); + def_builtin ("__MQMULHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMULHS); + def_builtin ("__MQMULHU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQMULHU); + def_builtin ("__MQMULXHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMULXHS); + def_builtin ("__MQMULXHU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQMULXHU); + def_builtin ("__MQMACHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMACHS); + def_builtin ("__MQMACHU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQMACHU); + def_builtin ("__MCPXRS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MCPXRS); + def_builtin ("__MCPXRU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MCPXRU); + def_builtin ("__MCPXIS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MCPXIS); + def_builtin ("__MCPXIU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MCPXIU); + def_builtin ("__MQCPXRS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQCPXRS); + def_builtin ("__MQCPXRU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQCPXRU); + def_builtin ("__MQCPXIS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQCPXIS); + def_builtin ("__MQCPXIU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQCPXIU); + def_builtin ("__MCUT", uw1_ftype_acc_uw1, FRV_BUILTIN_MCUT); + def_builtin ("__MCUTSS", uw1_ftype_acc_sw1, FRV_BUILTIN_MCUTSS); + def_builtin ("__MEXPDHW", uw1_ftype_uw1_int, FRV_BUILTIN_MEXPDHW); + def_builtin ("__MEXPDHD", uw2_ftype_uw1_int, FRV_BUILTIN_MEXPDHD); + def_builtin ("__MPACKH", uw1_ftype_uh_uh, FRV_BUILTIN_MPACKH); + def_builtin ("__MUNPACKH", uw2_ftype_uw1, FRV_BUILTIN_MUNPACKH); + def_builtin ("__MDPACKH", uw2_ftype_uw2_uw2, FRV_BUILTIN_MDPACKH); + def_builtin ("__MDUNPACKH", void_ftype_uw4_uw2, FRV_BUILTIN_MDUNPACKH); + def_builtin ("__MBTOH", uw2_ftype_uw1, FRV_BUILTIN_MBTOH); + def_builtin ("__MHTOB", uw1_ftype_uw2, FRV_BUILTIN_MHTOB); + def_builtin ("__MBTOHE", void_ftype_uw4_uw1, FRV_BUILTIN_MBTOHE); + def_builtin ("__MCLRACC", void_ftype_acc, FRV_BUILTIN_MCLRACC); + def_builtin ("__MCLRACCA", void_ftype_void, FRV_BUILTIN_MCLRACCA); + def_builtin ("__MRDACC", uw1_ftype_acc, FRV_BUILTIN_MRDACC); + def_builtin ("__MRDACCG", uw1_ftype_acc, FRV_BUILTIN_MRDACCG); + def_builtin ("__MWTACC", void_ftype_acc_uw1, FRV_BUILTIN_MWTACC); + def_builtin ("__MWTACCG", void_ftype_acc_uw1, FRV_BUILTIN_MWTACCG); + def_builtin ("__Mcop1", uw1_ftype_uw1_uw1, FRV_BUILTIN_MCOP1); + def_builtin ("__Mcop2", uw1_ftype_uw1_uw1, FRV_BUILTIN_MCOP2); + def_builtin ("__MTRAP", void_ftype_void, FRV_BUILTIN_MTRAP); + def_builtin ("__MQXMACHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQXMACHS); + def_builtin ("__MQXMACXHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQXMACXHS); + def_builtin ("__MQMACXHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMACXHS); + def_builtin ("__MADDACCS", void_ftype_acc_acc, FRV_BUILTIN_MADDACCS); + def_builtin ("__MSUBACCS", void_ftype_acc_acc, FRV_BUILTIN_MSUBACCS); + def_builtin ("__MASACCS", void_ftype_acc_acc, FRV_BUILTIN_MASACCS); + def_builtin ("__MDADDACCS", void_ftype_acc_acc, FRV_BUILTIN_MDADDACCS); + def_builtin ("__MDSUBACCS", void_ftype_acc_acc, FRV_BUILTIN_MDSUBACCS); + def_builtin ("__MDASACCS", void_ftype_acc_acc, FRV_BUILTIN_MDASACCS); + def_builtin ("__MABSHS", uw1_ftype_sw1, FRV_BUILTIN_MABSHS); + def_builtin ("__MDROTLI", uw2_ftype_uw2_int, FRV_BUILTIN_MDROTLI); + def_builtin ("__MCPLHI", uw1_ftype_uw2_int, FRV_BUILTIN_MCPLHI); + def_builtin ("__MCPLI", uw1_ftype_uw2_int, FRV_BUILTIN_MCPLI); + def_builtin ("__MDCUTSSI", uw2_ftype_acc_int, FRV_BUILTIN_MDCUTSSI); + def_builtin ("__MQSATHS", sw2_ftype_sw2_sw2, FRV_BUILTIN_MQSATHS); + def_builtin ("__MHSETLOS", sw1_ftype_sw1_int, FRV_BUILTIN_MHSETLOS); + def_builtin ("__MHSETHIS", sw1_ftype_sw1_int, FRV_BUILTIN_MHSETHIS); + def_builtin ("__MHDSETS", sw1_ftype_int, FRV_BUILTIN_MHDSETS); + def_builtin ("__MHSETLOH", uw1_ftype_uw1_int, FRV_BUILTIN_MHSETLOH); + def_builtin ("__MHSETHIH", uw1_ftype_uw1_int, FRV_BUILTIN_MHSETHIH); + def_builtin ("__MHDSETH", uw1_ftype_uw1_int, FRV_BUILTIN_MHDSETH); + + #undef UNARY + #undef BINARY + #undef TRINARY + } + + /* Convert an integer constant to an accumulator register. ICODE is the + code of the target instruction, OPNUM is the number of the + accumulator operand and OPVAL is the constant integer. Try both + ACC and ACCG registers; only report an error if neither fit the + instruction. */ + + static rtx + frv_int_to_acc (icode, opnum, opval) + enum insn_code icode; + int opnum; + rtx opval; + { + rtx reg; + + if (GET_CODE (opval) != CONST_INT) + { + error ("accumulator is not a constant integer"); + return NULL_RTX; + } + if (! IN_RANGE_P (INTVAL (opval), 0, NUM_ACCS - 1)) + { + error ("accumulator number is out of bounds"); + return NULL_RTX; + } + + reg = gen_rtx_REG (insn_data[icode].operand[opnum].mode, + ACC_FIRST + INTVAL (opval)); + if (! (*insn_data[icode].operand[opnum].predicate) (reg, VOIDmode)) + REGNO (reg) = ACCG_FIRST + INTVAL (opval); + + if (! (*insn_data[icode].operand[opnum].predicate) (reg, VOIDmode)) + { + error ("inappropriate accumulator for `%s'", insn_data[icode].name); + return NULL_RTX; + } + return reg; + } + + /* If an ACC rtx has mode MODE, return the mode that the matching ACCG + should have. */ + + static enum machine_mode + frv_matching_accg_mode (mode) + enum machine_mode mode; + { + switch (mode) + { + case V4SImode: + return V4QImode; + + case DImode: + return HImode; + + case SImode: + return QImode; + + default: + abort (); + } + } + + /* Return the accumulator guard that should be paired with accumulator + register ACC. The mode of the returned register is in the same + class as ACC, but is four times smaller. */ + + rtx + frv_matching_accg_for_acc (acc) + rtx acc; + { + return gen_rtx_REG (frv_matching_accg_mode (GET_MODE (acc)), + REGNO (acc) - ACC_FIRST + ACCG_FIRST); + } + + /* Read a value from the head of the tree list pointed to by ARGLISTPTR. + Return the value as an rtx and replace *ARGLISTPTR with the tail of the + list. */ + + static rtx + frv_read_argument (arglistptr) + tree *arglistptr; + { + tree next = TREE_VALUE (*arglistptr); + *arglistptr = TREE_CHAIN (*arglistptr); + return expand_expr (next, NULL_RTX, VOIDmode, 0); + } + + /* Return true if OPVAL can be used for operand OPNUM of instruction ICODE. + The instruction should require a constant operand of some sort. The + function prints an error if OPVAL is not valid. */ + + static int + frv_check_constant_argument (icode, opnum, opval) + enum insn_code icode; + int opnum; + rtx opval; + { + if (GET_CODE (opval) != CONST_INT) + { + error ("`%s' expects a constant argument", insn_data[icode].name); + return FALSE; + } + if (! (*insn_data[icode].operand[opnum].predicate) (opval, VOIDmode)) + { + error ("constant argument out of range for `%s'", insn_data[icode].name); + return FALSE; + } + return TRUE; + } + + /* Return a legitimate rtx for instruction ICODE's return value. Use TARGET + if it's not null, has the right mode, and satisfies operand 0's + predicate. */ + + static rtx + frv_legitimize_target (icode, target) + enum insn_code icode; + rtx target; + { + enum machine_mode mode = insn_data[icode].operand[0].mode; + + if (! target + || GET_MODE (target) != mode + || ! (*insn_data[icode].operand[0].predicate) (target, mode)) + return gen_reg_rtx (mode); + else + return target; + } + + /* Given that ARG is being passed as operand OPNUM to instruction ICODE, + check whether ARG satisfies the operand's contraints. If it doesn't, + copy ARG to a temporary register and return that. Otherwise return ARG + itself. */ + + static rtx + frv_legitimize_argument (icode, opnum, arg) + enum insn_code icode; + int opnum; + rtx arg; + { + enum machine_mode mode = insn_data[icode].operand[opnum].mode; + + if ((*insn_data[icode].operand[opnum].predicate) (arg, mode)) + return arg; + else + return copy_to_mode_reg (mode, arg); + } + + /* Expand builtins that take a single, constant argument. At the moment, + only MHDSETS falls into this category. */ + + static rtx + frv_expand_set_builtin (icode, arglist, target) + enum insn_code icode; + tree arglist; + rtx target; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + + if (! frv_check_constant_argument (icode, 1, op0)) + return NULL_RTX; + + target = frv_legitimize_target (icode, target); + pat = GEN_FCN (icode) (target, op0); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return target; + } + + /* Expand builtins that take one operand. */ + + static rtx + frv_expand_unop_builtin (icode, arglist, target) + enum insn_code icode; + tree arglist; + rtx target; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + + target = frv_legitimize_target (icode, target); + op0 = frv_legitimize_argument (icode, 1, op0); + pat = GEN_FCN (icode) (target, op0); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return target; + } + + /* Expand builtins that take two operands. */ + + static rtx + frv_expand_binop_builtin (icode, arglist, target) + enum insn_code icode; + tree arglist; + rtx target; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + rtx op1 = frv_read_argument (&arglist); + + target = frv_legitimize_target (icode, target); + op0 = frv_legitimize_argument (icode, 1, op0); + op1 = frv_legitimize_argument (icode, 2, op1); + pat = GEN_FCN (icode) (target, op0, op1); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return target; + } + + /* Expand cut-style builtins, which take two operands and an implicit ACCG + one. */ + + static rtx + frv_expand_cut_builtin (icode, arglist, target) + enum insn_code icode; + tree arglist; + rtx target; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + rtx op1 = frv_read_argument (&arglist); + rtx op2; + + target = frv_legitimize_target (icode, target); + op0 = frv_int_to_acc (icode, 1, op0); + if (! op0) + return NULL_RTX; + + if (icode == CODE_FOR_mdcutssi || GET_CODE (op1) == CONST_INT) + { + if (! frv_check_constant_argument (icode, 2, op1)) + return NULL_RTX; + } + else + op1 = frv_legitimize_argument (icode, 2, op1); + + op2 = frv_matching_accg_for_acc (op0); + pat = GEN_FCN (icode) (target, op0, op1, op2); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return target; + } + + /* Expand builtins that take two operands and the second is immediate. */ + + static rtx + frv_expand_binopimm_builtin (icode, arglist, target) + enum insn_code icode; + tree arglist; + rtx target; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + rtx op1 = frv_read_argument (&arglist); + + if (! frv_check_constant_argument (icode, 2, op1)) + return NULL_RTX; + + target = frv_legitimize_target (icode, target); + op0 = frv_legitimize_argument (icode, 1, op0); + pat = GEN_FCN (icode) (target, op0, op1); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return target; + } + + /* Expand builtins that take two operands, the first operand being a pointer to + ints and return void. */ + + static rtx + frv_expand_voidbinop_builtin (icode, arglist) + enum insn_code icode; + tree arglist; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + rtx op1 = frv_read_argument (&arglist); + enum machine_mode mode0 = insn_data[icode].operand[0].mode; + rtx addr; + + if (GET_CODE (op0) != MEM) + { + rtx reg = op0; + + if (! offsettable_address_p (0, mode0, op0)) + { + reg = gen_reg_rtx (Pmode); + emit_insn (gen_rtx_SET (VOIDmode, reg, op0)); + } + + op0 = gen_rtx_MEM (SImode, reg); + } + + addr = XEXP (op0, 0); + if (! offsettable_address_p (0, mode0, addr)) + addr = copy_to_mode_reg (Pmode, op0); + + op0 = change_address (op0, V4SImode, addr); + op1 = frv_legitimize_argument (icode, 1, op1); + pat = GEN_FCN (icode) (op0, op1); + if (! pat) + return 0; + + emit_insn (pat); + return 0; + } + + /* Expand builtins that take three operands and return void. The first + argument must be a constant that describes a pair or quad accumulators. A + fourth argument is created that is the accumulator guard register that + corresponds to the accumulator. */ + + static rtx + frv_expand_voidtriop_builtin (icode, arglist) + enum insn_code icode; + tree arglist; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + rtx op1 = frv_read_argument (&arglist); + rtx op2 = frv_read_argument (&arglist); + rtx op3; + + op0 = frv_int_to_acc (icode, 0, op0); + if (! op0) + return NULL_RTX; + + op1 = frv_legitimize_argument (icode, 1, op1); + op2 = frv_legitimize_argument (icode, 2, op2); + op3 = frv_matching_accg_for_acc (op0); + pat = GEN_FCN (icode) (op0, op1, op2, op3); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return NULL_RTX; + } + + /* Expand builtins that perform accumulator-to-accumulator operations. + These builtins take two accumulator numbers as argument and return + void. */ + + static rtx + frv_expand_voidaccop_builtin (icode, arglist) + enum insn_code icode; + tree arglist; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + rtx op1 = frv_read_argument (&arglist); + rtx op2; + rtx op3; + + op0 = frv_int_to_acc (icode, 0, op0); + if (! op0) + return NULL_RTX; + + op1 = frv_int_to_acc (icode, 1, op1); + if (! op1) + return NULL_RTX; + + op2 = frv_matching_accg_for_acc (op0); + op3 = frv_matching_accg_for_acc (op1); + pat = GEN_FCN (icode) (op0, op1, op2, op3); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return NULL_RTX; + } + + /* Expand the MCLRACC builtin. This builtin takes a single accumulator + number as argument. */ + + static rtx + frv_expand_mclracc_builtin (arglist) + tree arglist; + { + enum insn_code icode = CODE_FOR_mclracc; + rtx pat; + rtx op0 = frv_read_argument (&arglist); + + op0 = frv_int_to_acc (icode, 0, op0); + if (! op0) + return NULL_RTX; + + pat = GEN_FCN (icode) (op0); + if (pat) + emit_insn (pat); + + return NULL_RTX; + } + + /* Expand builtins that take no arguments. */ + + static rtx + frv_expand_noargs_builtin (icode) + enum insn_code icode; + { + rtx pat = GEN_FCN (icode) (GEN_INT (0)); + if (pat) + emit_insn (pat); + + return NULL_RTX; + } + + /* Expand MRDACC and MRDACCG. These builtins take a single accumulator + number or accumulator guard number as argument and return an SI integer. */ + + static rtx + frv_expand_mrdacc_builtin (icode, arglist) + enum insn_code icode; + tree arglist; + { + rtx pat; + rtx target = gen_reg_rtx (SImode); + rtx op0 = frv_read_argument (&arglist); + + op0 = frv_int_to_acc (icode, 1, op0); + if (! op0) + return NULL_RTX; + + pat = GEN_FCN (icode) (target, op0); + if (! pat) + return NULL_RTX; + + emit_insn (pat); + return target; + } + + /* Expand MWTACC and MWTACCG. These builtins take an accumulator or + accumulator guard as their first argument and an SImode value as their + second. */ + + static rtx + frv_expand_mwtacc_builtin (icode, arglist) + enum insn_code icode; + tree arglist; + { + rtx pat; + rtx op0 = frv_read_argument (&arglist); + rtx op1 = frv_read_argument (&arglist); + + op0 = frv_int_to_acc (icode, 0, op0); + if (! op0) + return NULL_RTX; + + op1 = frv_legitimize_argument (icode, 1, op1); + pat = GEN_FCN (icode) (op0, op1); + if (pat) + emit_insn (pat); + + return NULL_RTX; + } + + /* Expand builtins. */ + + static rtx + frv_expand_builtin (exp, target, subtarget, mode, ignore) + tree exp; + rtx target; + rtx subtarget ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + int ignore ATTRIBUTE_UNUSED; + { + tree arglist = TREE_OPERAND (exp, 1); + tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); + unsigned fcode = (unsigned)DECL_FUNCTION_CODE (fndecl); + unsigned i; + struct builtin_description *d; + + if (! TARGET_MEDIA) + { + error ("media functions are not available unless -mmedia is used"); + return NULL_RTX; + } + + switch (fcode) + { + case FRV_BUILTIN_MCOP1: + case FRV_BUILTIN_MCOP2: + case FRV_BUILTIN_MDUNPACKH: + case FRV_BUILTIN_MBTOHE: + if (! TARGET_MEDIA_REV1) + { + error ("this media function is only available on the fr500"); + return NULL_RTX; + } + break; + + case FRV_BUILTIN_MQXMACHS: + case FRV_BUILTIN_MQXMACXHS: + case FRV_BUILTIN_MQMACXHS: + case FRV_BUILTIN_MADDACCS: + case FRV_BUILTIN_MSUBACCS: + case FRV_BUILTIN_MASACCS: + case FRV_BUILTIN_MDADDACCS: + case FRV_BUILTIN_MDSUBACCS: + case FRV_BUILTIN_MDASACCS: + case FRV_BUILTIN_MABSHS: + case FRV_BUILTIN_MDROTLI: + case FRV_BUILTIN_MCPLHI: + case FRV_BUILTIN_MCPLI: + case FRV_BUILTIN_MDCUTSSI: + case FRV_BUILTIN_MQSATHS: + case FRV_BUILTIN_MHSETLOS: + case FRV_BUILTIN_MHSETLOH: + case FRV_BUILTIN_MHSETHIS: + case FRV_BUILTIN_MHSETHIH: + case FRV_BUILTIN_MHDSETS: + case FRV_BUILTIN_MHDSETH: + if (! TARGET_MEDIA_REV2) + { + error ("this media function is only available on the fr400"); + return NULL_RTX; + } + break; + + default: + break; + } + + /* Expand unique builtins. */ + + switch (fcode) + { + case FRV_BUILTIN_MTRAP: + return frv_expand_noargs_builtin (CODE_FOR_mtrap); + + case FRV_BUILTIN_MCLRACC: + return frv_expand_mclracc_builtin (arglist); + + case FRV_BUILTIN_MCLRACCA: + if (TARGET_ACC_8) + return frv_expand_noargs_builtin (CODE_FOR_mclracca8); + else + return frv_expand_noargs_builtin (CODE_FOR_mclracca4); + + case FRV_BUILTIN_MRDACC: + return frv_expand_mrdacc_builtin (CODE_FOR_mrdacc, arglist); + + case FRV_BUILTIN_MRDACCG: + return frv_expand_mrdacc_builtin (CODE_FOR_mrdaccg, arglist); + + case FRV_BUILTIN_MWTACC: + return frv_expand_mwtacc_builtin (CODE_FOR_mwtacc, arglist); + + case FRV_BUILTIN_MWTACCG: + return frv_expand_mwtacc_builtin (CODE_FOR_mwtaccg, arglist); + + default: + break; + } + + /* Expand groups of builtins. */ + + for (i = 0, d = bdesc_set; i < sizeof (bdesc_set) / sizeof *d; i++, d++) + if (d->code == fcode) + return frv_expand_set_builtin (d->icode, arglist, target); + + for (i = 0, d = bdesc_1arg; i < sizeof (bdesc_1arg) / sizeof *d; i++, d++) + if (d->code == fcode) + return frv_expand_unop_builtin (d->icode, arglist, target); + + for (i = 0, d = bdesc_2arg; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++) + if (d->code == fcode) + return frv_expand_binop_builtin (d->icode, arglist, target); + + for (i = 0, d = bdesc_cut; i < sizeof (bdesc_cut) / sizeof *d; i++, d++) + if (d->code == fcode) + return frv_expand_cut_builtin (d->icode, arglist, target); + + for (i = 0, d = bdesc_2argimm; + i < sizeof (bdesc_2argimm) / sizeof *d; + i++, d++) + { + if (d->code == fcode) + return frv_expand_binopimm_builtin (d->icode, arglist, target); + } + + for (i = 0, d = bdesc_void2arg; + i < sizeof (bdesc_void2arg) / sizeof *d; + i++, d++) + { + if (d->code == fcode) + return frv_expand_voidbinop_builtin (d->icode, arglist); + } + + for (i = 0, d = bdesc_void3arg; + i < sizeof (bdesc_void3arg) / sizeof *d; + i++, d++) + { + if (d->code == fcode) + return frv_expand_voidtriop_builtin (d->icode, arglist); + } + + for (i = 0, d = bdesc_voidacc; + i < sizeof (bdesc_voidacc) / sizeof *d; + i++, d++) + { + if (d->code == fcode) + return frv_expand_voidaccop_builtin (d->icode, arglist); + } + return 0; + } + + static const char * + frv_strip_name_encoding (str) + const char *str; + { + while (*str == '*' || *str == SDATA_FLAG_CHAR) + str++; + return str; + } + + static bool + frv_in_small_data_p (decl) + tree decl; + { + HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl)); + + return symbol_ref_small_data_p (XEXP (DECL_RTL (decl), 0)) + && size > 0 && size <= g_switch_value; + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frvend.c gcc-3.3/gcc/config/frv/frvend.c *** gcc-3.2.3/gcc/config/frv/frvend.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frvend.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + /* Frv initialization file linked after all user modules + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software ; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation * either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY ; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "defaults.h" + #include + #include "unwind-dw2-fde.h" + + #ifdef __FRV_UNDERSCORE__ + #define UNDERSCORE "_" + #else + #define UNDERSCORE "" + #endif + + #define FINI_SECTION_ZERO(SECTION, FLAGS, NAME) \ + __asm__ (".section " SECTION "," FLAGS "\n\t" \ + ".globl " UNDERSCORE NAME "\n\t" \ + ".type " UNDERSCORE NAME ",@object\n\t" \ + ".p2align 2\n" \ + UNDERSCORE NAME ":\n\t" \ + ".word 0\n\t" \ + ".previous") + + #define FINI_SECTION(SECTION, FLAGS, NAME) \ + __asm__ (".section " SECTION "," FLAGS "\n\t" \ + ".globl " UNDERSCORE NAME "\n\t" \ + ".type " UNDERSCORE NAME ",@object\n\t" \ + ".p2align 2\n" \ + UNDERSCORE NAME ":\n\t" \ + ".previous") + + /* End of .ctor/.dtor sections that provides a list of constructors and + destructors to run. */ + + FINI_SECTION_ZERO (".ctors", "\"aw\"", "__CTOR_END__"); + FINI_SECTION_ZERO (".dtors", "\"aw\"", "__DTOR_END__"); + + /* End of .eh_frame section that provides all of the exception handling + tables. */ + + FINI_SECTION_ZERO (".eh_frame", "\"aw\"", "__FRAME_END__"); + + /* End of .rofixup section that provides a list of pointers that we + need to adjust. */ + + FINI_SECTION (".rofixup", "\"a\"", "__ROFIXUP_END__"); diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frv.h gcc-3.3/gcc/config/frv/frv.h *** gcc-3.2.3/gcc/config/frv/frv.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frv.h 2002-11-26 04:54:48.000000000 +0000 *************** *** 0 **** --- 1,3592 ---- + /* Target macros for the FRV port of GCC. + Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Red Hat Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + #ifndef __FRV_H__ + #define __FRV_H__ + + /* Set up System V.4 (aka ELF) defaults. */ + #include "svr4.h" + + + /* Frv general purpose macros. */ + /* Align an address. */ + #define ADDR_ALIGN(addr,align) (((addr) + (align) - 1) & ~((align) - 1)) + + /* Return true if a value is inside a range. */ + #define IN_RANGE_P(VALUE, LOW, HIGH) \ + ( (((HOST_WIDE_INT)(VALUE)) >= (HOST_WIDE_INT)(LOW)) \ + && (((HOST_WIDE_INT)(VALUE)) <= ((HOST_WIDE_INT)(HIGH)))) + + + /* Driver configuration. */ + + /* A C expression which determines whether the option `-CHAR' takes arguments. + The value should be the number of arguments that option takes-zero, for many + options. + + By default, this macro is defined to handle the standard options properly. + You need not define it unless you wish to add additional options which take + arguments. + + Defined in svr4.h. */ + #undef SWITCH_TAKES_ARG + #define SWITCH_TAKES_ARG(CHAR) \ + (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G') + + /* A C expression which determines whether the option `-NAME' takes arguments. + The value should be the number of arguments that option takes-zero, for many + options. This macro rather than `SWITCH_TAKES_ARG' is used for + multi-character option names. + + By default, this macro is defined as `DEFAULT_WORD_SWITCH_TAKES_ARG', which + handles the standard options properly. You need not define + `WORD_SWITCH_TAKES_ARG' unless you wish to add additional options which take + arguments. Any redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and + then check for additional options. + + Defined in svr4.h. */ + #undef WORD_SWITCH_TAKES_ARG + + /* A C string constant that tells the GNU CC driver program options to pass to + the assembler. It can also specify how to translate options you give to GNU + CC into options for GNU CC to pass to the assembler. See the file `sun3.h' + for an example of this. + + Do not define this macro if it does not need to do anything. + + Defined in svr4.h. */ + #undef ASM_SPEC + #define ASM_SPEC "\ + %{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ + %{mtomcat-stats} \ + %{!mno-eflags: \ + %{mcpu=*} \ + %{mgpr-*} %{mfpr-*} \ + %{msoft-float} %{mhard-float} \ + %{mdword} %{mno-dword} \ + %{mdouble} %{mno-double} \ + %{mmedia} %{mno-media} \ + %{mmuladd} %{mno-muladd} \ + %{mpack} %{mno-pack} \ + %{fpic: -mpic} %{fPIC: -mPIC} %{mlibrary-pic}}" + + /* Another C string constant used much like `LINK_SPEC'. The difference + between the two is that `STARTFILE_SPEC' is used at the very beginning of + the command given to the linker. + + If this macro is not defined, a default is provided that loads the standard + C startup file from the usual place. See `gcc.c'. + + Defined in svr4.h. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "crt0%O%s frvbegin%O%s" + + /* Another C string constant used much like `LINK_SPEC'. The difference + between the two is that `ENDFILE_SPEC' is used at the very end of the + command given to the linker. + + Do not define this macro if it does not need to do anything. + + Defined in svr4.h. */ + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "frvend%O%s" + + /* A C string constant that tells the GNU CC driver program options to pass to + CPP. It can also specify how to translate options you give to GNU CC into + options for GNU CC to pass to the CPP. + + Do not define this macro if it does not need to do anything. */ + + /* The idea here is to use the -mcpu option to define macros based on the + processor's features, using the features of the default processor if + no -mcpu option is given. These macros can then be overridden by + other -m options. */ + #define CPP_SPEC "\ + %{mcpu=frv: %(cpp_frv)} \ + %{mcpu=fr500: %(cpp_fr500)} \ + %{mcpu=fr400: %(cpp_fr400)} \ + %{mcpu=fr300: %(cpp_simple)} \ + %{mcpu=tomcat: %(cpp_fr500)} \ + %{mcpu=simple: %(cpp_simple)} \ + %{!mcpu*: %(cpp_cpu_default)} \ + %{mno-media: -D__FRV_ACC__=0 %{msoft-float: -D__FRV_FPR__=0}} \ + %{mhard-float: -D__FRV_HARD_FLOAT__} \ + %{msoft-float: -U__FRV_HARD_FLOAT__} \ + %{mgpr-32: -U__FRV_GPR__ -D__FRV_GPR__=32} \ + %{mgpr-64: -U__FRV_GPR__ -D__FRV_GPR__=64} \ + %{mfpr-32: -U__FRV_FPR__ -D__FRV_FPR__=32} \ + %{mfpr-64: -U__FRV_FPR__ -D__FRV_FPR__=64} \ + %{macc-4: -U__FRV_ACC__ -D__FRV_ACC__=4} \ + %{macc-8: -U__FRV_ACC__ -D__FRV_ACC__=8} \ + %{mdword: -D__FRV_DWORD__} \ + %{mno-dword: -U__FRV_DWORD__} \ + %{mno-pack: -U__FRV_VLIW__} \ + %{fleading-underscore: -D__FRV_UNDERSCORE__}" + + /* CPU defaults. Each CPU has its own CPP spec that defines the default + macros for that CPU. Each CPU also has its own default target mask. + + CPU GPRs FPRs ACCs FPU MulAdd ldd/std Issue rate + --- ---- ---- ---- --- ------ ------- ---------- + FRV 64 64 8 double yes yes 4 + FR500 64 64 8 single no yes 4 + FR400 32 32 4 none no yes 2 + Simple 32 0 0 none no no 1 */ + + + #define CPP_FRV_SPEC "\ + -D__FRV_GPR__=64 \ + -D__FRV_FPR__=64 \ + -D__FRV_ACC__=8 \ + -D__FRV_HARD_FLOAT__ \ + -D__FRV_DWORD__ \ + -D__FRV_VLIW__=4" + + #define CPP_FR500_SPEC "\ + -D__FRV_GPR__=64 \ + -D__FRV_FPR__=64 \ + -D__FRV_ACC__=8 \ + -D__FRV_HARD_FLOAT__ \ + -D__FRV_DWORD__ \ + -D__FRV_VLIW__=4" + + #define CPP_FR400_SPEC "\ + -D__FRV_GPR__=32 \ + -D__FRV_FPR__=32 \ + -D__FRV_ACC__=4 \ + -D__FRV_DWORD__ \ + -D__FRV_VLIW__=2" + + #define CPP_SIMPLE_SPEC "\ + -D__FRV_GPR__=32 \ + -D__FRV_FPR__=0 \ + -D__FRV_ACC__=0 \ + %{mmedia: -D__FRV_ACC__=8} \ + %{mhard-float|mmedia: -D__FRV_FPR__=64}" + + #define MASK_DEFAULT_FRV \ + (MASK_MEDIA \ + | MASK_DOUBLE \ + | MASK_MULADD \ + | MASK_DWORD \ + | MASK_PACK) + + #define MASK_DEFAULT_FR500 \ + (MASK_MEDIA | MASK_DWORD | MASK_PACK) + + #define MASK_DEFAULT_FR400 \ + (MASK_GPR_32 \ + | MASK_FPR_32 \ + | MASK_MEDIA \ + | MASK_ACC_4 \ + | MASK_SOFT_FLOAT \ + | MASK_DWORD \ + | MASK_PACK) + + #define MASK_DEFAULT_SIMPLE \ + (MASK_GPR_32 | MASK_SOFT_FLOAT) + + /* A C string constant that tells the GNU CC driver program options to pass to + `cc1'. It can also specify how to translate options you give to GNU CC into + options for GNU CC to pass to the `cc1'. + + Do not define this macro if it does not need to do anything. */ + /* For ABI compliance, we need to put bss data into the normal data section. */ + #define CC1_SPEC "%{G*}" + + /* A C string constant that tells the GNU CC driver program options to pass to + the linker. It can also specify how to translate options you give to GNU CC + into options for GNU CC to pass to the linker. + + Do not define this macro if it does not need to do anything. + + Defined in svr4.h. */ + /* Override the svr4.h version with one that dispenses without the svr4 + shared library options, notably -G. */ + #undef LINK_SPEC + #define LINK_SPEC "\ + %{h*} %{v:-V} \ + %{b} %{Wl,*:%*} \ + %{static:-dn -Bstatic} \ + %{shared:-Bdynamic} \ + %{symbolic:-Bsymbolic} \ + %{G*} \ + %{YP,*} \ + %{Qy:} %{!Qn:-Qy}" + + /* Another C string constant used much like `LINK_SPEC'. The difference + between the two is that `LIB_SPEC' is used at the end of the command given + to the linker. + + If this macro is not defined, a default is provided that loads the standard + C library from the usual place. See `gcc.c'. + + Defined in svr4.h. */ + + #undef LIB_SPEC + #define LIB_SPEC "--start-group -lc -lsim --end-group" + + /* This macro defines names of additional specifications to put in the specs + that can be used in various specifications like CC1_SPEC. Its definition + is an initializer with a subgrouping for each command option. + + Each subgrouping contains a string constant, that defines the + specification name, and a string constant that used by the GNU CC driver + program. + + Do not define this macro if it does not need to do anything. */ + + #ifndef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS + #endif + + #define EXTRA_SPECS \ + { "cpp_frv", CPP_FRV_SPEC }, \ + { "cpp_fr500", CPP_FR500_SPEC }, \ + { "cpp_fr400", CPP_FR400_SPEC }, \ + { "cpp_simple", CPP_SIMPLE_SPEC }, \ + { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \ + SUBTARGET_EXTRA_SPECS + + #ifndef CPP_CPU_DEFAULT_SPEC + #define CPP_CPU_DEFAULT_SPEC CPP_FR500_SPEC + #define CPU_TYPE FRV_CPU_FR500 + #endif + + /* Allow us to easily change the default for -malloc-cc. */ + #ifndef DEFAULT_NO_ALLOC_CC + #define MASK_DEFAULT_ALLOC_CC MASK_ALLOC_CC + #else + #define MASK_DEFAULT_ALLOC_CC 0 + #endif + + /* Run-time target specifications */ + + /* Define this to be a string constant containing `-D' options to define the + predefined macros that identify this machine and system. These macros will + be predefined unless the `-ansi' option is specified. + + In addition, a parallel set of macros are predefined, whose names are made + by appending `__' at the beginning and at the end. These `__' macros are + permitted by the ANSI standard, so they are predefined regardless of whether + `-ansi' is specified. */ + + #define CPP_PREDEFINES "-D__frv__ -Amachine(frv)" + + + /* This declaration should be present. */ + extern int target_flags; + + /* This series of macros is to allow compiler command arguments to enable or + disable the use of optional features of the target machine. For example, + one machine description serves both the 68000 and the 68020; a command + argument tells the compiler whether it should use 68020-only instructions or + not. This command argument works by means of a macro `TARGET_68020' that + tests a bit in `target_flags'. + + Define a macro `TARGET_FEATURENAME' for each such option. Its definition + should test a bit in `target_flags'; for example: + + #define TARGET_68020 (target_flags & 1) + + One place where these macros are used is in the condition-expressions of + instruction patterns. Note how `TARGET_68020' appears frequently in the + 68000 machine description file, `m68k.md'. Another place they are used is + in the definitions of the other macros in the `MACHINE.h' file. */ + + #define MASK_GPR_32 0x00000001 /* Limit gprs to 32 registers */ + #define MASK_FPR_32 0x00000002 /* Limit fprs to 32 registers */ + #define MASK_SOFT_FLOAT 0x00000004 /* Use software floating point */ + #define MASK_ALLOC_CC 0x00000008 /* Dynamically allocate icc/fcc's */ + #define MASK_DWORD 0x00000010 /* Change ABi to allow dbl word insns*/ + #define MASK_DOUBLE 0x00000020 /* Use double precision instructions */ + #define MASK_MEDIA 0x00000040 /* Use media instructions */ + #define MASK_MULADD 0x00000080 /* Use multiply add/subtract insns */ + #define MASK_LIBPIC 0x00000100 /* -fpic that can be linked w/o pic */ + #define MASK_ACC_4 0x00000200 /* Only use four media accumulators */ + #define MASK_PACK 0x00000400 /* Set to enable packed output */ + + /* put debug masks up high */ + #define MASK_DEBUG_ARG 0x40000000 /* debug argument handling */ + #define MASK_DEBUG_ADDR 0x20000000 /* debug go_if_legitimate_address */ + #define MASK_DEBUG_STACK 0x10000000 /* debug stack frame */ + #define MASK_DEBUG 0x08000000 /* general debugging switch */ + #define MASK_DEBUG_LOC 0x04000000 /* optimize line # table */ + #define MASK_DEBUG_COND_EXEC 0x02000000 /* debug cond exec code */ + #define MASK_NO_COND_MOVE 0x01000000 /* disable conditional moves */ + #define MASK_NO_SCC 0x00800000 /* disable set conditional codes */ + #define MASK_NO_COND_EXEC 0x00400000 /* disable conditional execution */ + #define MASK_NO_VLIW_BRANCH 0x00200000 /* disable repacking branches */ + #define MASK_NO_MULTI_CE 0x00100000 /* disable multi-level cond exec */ + #define MASK_NO_NESTED_CE 0x00080000 /* disable nested cond exec */ + + #define MASK_DEFAULT MASK_DEFAULT_ALLOC_CC + + #define TARGET_GPR_32 ((target_flags & MASK_GPR_32) != 0) + #define TARGET_FPR_32 ((target_flags & MASK_FPR_32) != 0) + #define TARGET_SOFT_FLOAT ((target_flags & MASK_SOFT_FLOAT) != 0) + #define TARGET_ALLOC_CC ((target_flags & MASK_ALLOC_CC) != 0) + #define TARGET_DWORD ((target_flags & MASK_DWORD) != 0) + #define TARGET_DOUBLE ((target_flags & MASK_DOUBLE) != 0) + #define TARGET_MEDIA ((target_flags & MASK_MEDIA) != 0) + #define TARGET_MULADD ((target_flags & MASK_MULADD) != 0) + #define TARGET_LIBPIC ((target_flags & MASK_LIBPIC) != 0) + #define TARGET_ACC_4 ((target_flags & MASK_ACC_4) != 0) + #define TARGET_DEBUG_ARG ((target_flags & MASK_DEBUG_ARG) != 0) + #define TARGET_DEBUG_ADDR ((target_flags & MASK_DEBUG_ADDR) != 0) + #define TARGET_DEBUG_STACK ((target_flags & MASK_DEBUG_STACK) != 0) + #define TARGET_DEBUG ((target_flags & MASK_DEBUG) != 0) + #define TARGET_DEBUG_LOC ((target_flags & MASK_DEBUG_LOC) != 0) + #define TARGET_DEBUG_COND_EXEC ((target_flags & MASK_DEBUG_COND_EXEC) != 0) + #define TARGET_NO_COND_MOVE ((target_flags & MASK_NO_COND_MOVE) != 0) + #define TARGET_NO_SCC ((target_flags & MASK_NO_SCC) != 0) + #define TARGET_NO_COND_EXEC ((target_flags & MASK_NO_COND_EXEC) != 0) + #define TARGET_NO_VLIW_BRANCH ((target_flags & MASK_NO_VLIW_BRANCH) != 0) + #define TARGET_NO_MULTI_CE ((target_flags & MASK_NO_MULTI_CE) != 0) + #define TARGET_NO_NESTED_CE ((target_flags & MASK_NO_NESTED_CE) != 0) + #define TARGET_PACK ((target_flags & MASK_PACK) != 0) + + #define TARGET_GPR_64 (! TARGET_GPR_32) + #define TARGET_FPR_64 (! TARGET_FPR_32) + #define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) + #define TARGET_FIXED_CC (! TARGET_ALLOC_CC) + #define TARGET_COND_MOVE (! TARGET_NO_COND_MOVE) + #define TARGET_SCC (! TARGET_NO_SCC) + #define TARGET_COND_EXEC (! TARGET_NO_COND_EXEC) + #define TARGET_VLIW_BRANCH (! TARGET_NO_VLIW_BRANCH) + #define TARGET_MULTI_CE (! TARGET_NO_MULTI_CE) + #define TARGET_NESTED_CE (! TARGET_NO_NESTED_CE) + #define TARGET_ACC_8 (! TARGET_ACC_4) + + #define TARGET_HAS_FPRS (TARGET_HARD_FLOAT || TARGET_MEDIA) + + #define NUM_GPRS (TARGET_GPR_32? 32 : 64) + #define NUM_FPRS (!TARGET_HAS_FPRS? 0 : TARGET_FPR_32? 32 : 64) + #define NUM_ACCS (!TARGET_MEDIA? 0 : TARGET_ACC_4? 4 : 8) + + /* Macros to identify the blend of media instructions available. Revision 1 + is the one found on the FR500. Revision 2 includes the changes made for + the FR400. + + Treat the generic processor as a revision 1 machine for now, for + compatibility with earlier releases. */ + + #define TARGET_MEDIA_REV1 \ + (TARGET_MEDIA \ + && (frv_cpu_type == FRV_CPU_GENERIC \ + || frv_cpu_type == FRV_CPU_FR500)) + + #define TARGET_MEDIA_REV2 \ + (TARGET_MEDIA && frv_cpu_type == FRV_CPU_FR400) + + /* This macro defines names of command options to set and clear bits in + `target_flags'. Its definition is an initializer with a subgrouping for + each command option. + + Each subgrouping contains a string constant, that defines the option name, + a number, which contains the bits to set in `target_flags', and an optional + second string which is the textual description that will be displayed when + the user passes --help on the command line. If the number entry is negative + then the specified bits will be cleared instead of being set. If the second + string entry is present but empty, then no help information will be displayed + for that option, but it will not count as an undocumented option. The actual + option name, asseen on the command line is made by appending `-m' to the + specified name. + + One of the subgroupings should have a null string. The number in this + grouping is the default value for `target_flags'. Any target options act + starting with that value. + + Here is an example which defines `-m68000' and `-m68020' with opposite + meanings, and picks the latter as the default: + + #define TARGET_SWITCHES \ + { { "68020", 1, ""}, \ + { "68000", -1, "Compile for the m68000"}, \ + { "", 1, }} + + This declaration must be present. */ + + #define TARGET_SWITCHES \ + {{ "gpr-32", MASK_GPR_32, "Only use 32 gprs"}, \ + { "gpr-64", -MASK_GPR_32, "Use 64 gprs"}, \ + { "fpr-32", MASK_FPR_32, "Only use 32 fprs"}, \ + { "fpr-64", -MASK_FPR_32, "Use 64 fprs"}, \ + { "hard-float", -MASK_SOFT_FLOAT, "Use hardware floating point" },\ + { "soft-float", MASK_SOFT_FLOAT, "Use software floating point" },\ + { "alloc-cc", MASK_ALLOC_CC, "Dynamically allocate cc's" }, \ + { "fixed-cc", -MASK_ALLOC_CC, "Just use icc0/fcc0" }, \ + { "dword", MASK_DWORD, "Change ABI to allow double word insns" }, \ + { "no-dword", -MASK_DWORD, "Do not use double word insns" }, \ + { "double", MASK_DOUBLE, "Use fp double instructions" }, \ + { "no-double", -MASK_DOUBLE, "Do not use fp double insns" }, \ + { "media", MASK_MEDIA, "Use media instructions" }, \ + { "no-media", -MASK_MEDIA, "Do not use media insns" }, \ + { "muladd", MASK_MULADD, "Use multiply add/subtract instructions" }, \ + { "no-muladd", -MASK_MULADD, "Do not use multiply add/subtract insns" }, \ + { "library-pic", MASK_LIBPIC, "PIC support for building libraries" }, \ + { "acc-4", MASK_ACC_4, "Use 4 media accumulators" }, \ + { "acc-8", -MASK_ACC_4, "Use 8 media accumulators" }, \ + { "pack", MASK_PACK, "Pack VLIW instructions" }, \ + { "no-pack", -MASK_PACK, "Do not pack VLIW instructions" }, \ + { "no-eflags", 0, "Do not mark ABI switches in e_flags" }, \ + { "debug-arg", MASK_DEBUG_ARG, "Internal debug switch" }, \ + { "debug-addr", MASK_DEBUG_ADDR, "Internal debug switch" }, \ + { "debug-stack", MASK_DEBUG_STACK, "Internal debug switch" }, \ + { "debug", MASK_DEBUG, "Internal debug switch" }, \ + { "debug-cond-exec", MASK_DEBUG_COND_EXEC, "Internal debug switch" }, \ + { "debug-loc", MASK_DEBUG_LOC, "Internal debug switch" }, \ + { "cond-move", -MASK_NO_COND_MOVE, "Enable conditional moves" }, \ + { "no-cond-move", MASK_NO_COND_MOVE, "Disable conditional moves" }, \ + { "scc", -MASK_NO_SCC, "Enable setting gprs to the result of comparisons" }, \ + { "no-scc", MASK_NO_SCC, "Disable setting gprs to the result of comparisons" }, \ + { "cond-exec", -MASK_NO_COND_EXEC, "Enable conditional execution other than moves/scc" }, \ + { "no-cond-exec", MASK_NO_COND_EXEC, "Disable conditional execution other than moves/scc" }, \ + { "vliw-branch", -MASK_NO_VLIW_BRANCH, "Run pass to pack branches into VLIW insns" }, \ + { "no-vliw-branch", MASK_NO_VLIW_BRANCH, "Do not run pass to pack branches into VLIW insns" }, \ + { "multi-cond-exec", -MASK_NO_MULTI_CE, "Disable optimizing &&/|| in conditional execution" }, \ + { "no-multi-cond-exec", MASK_NO_MULTI_CE, "Enable optimizing &&/|| in conditional execution" }, \ + { "nested-cond-exec", -MASK_NO_NESTED_CE, "Enable nested conditional execution optimizations" }, \ + { "no-nested-cond-exec" ,MASK_NO_NESTED_CE, "Disable nested conditional execution optimizations" }, \ + { "tomcat-stats", 0, "Cause gas to print tomcat statistics" }, \ + { "", MASK_DEFAULT, "" }} \ + + /* This macro is similar to `TARGET_SWITCHES' but defines names of command + options that have values. Its definition is an initializer with a + subgrouping for each command option. + + Each subgrouping contains a string constant, that defines the fixed part of + the option name, the address of a variable, and an optional description string. + The variable, of type `char *', is set to the text following the fixed part of + the option as it is specified on the command line. The actual option name is + made by appending `-m' to the specified name. + + Here is an example which defines `-mshort-data-NUMBER'. If the given option + is `-mshort-data-512', the variable `m88k_short_data' will be set to the + string `"512"'. + + extern char *m88k_short_data; + #define TARGET_OPTIONS \ + { { "short-data-", & m88k_short_data, \ + "Specify the size of the short data section" } } + + This declaration is optional. */ + #define TARGET_OPTIONS \ + { \ + { "cpu=", &frv_cpu_string, "Set cpu type" }, \ + { "branch-cost=", &frv_branch_cost_string, "Internal debug switch" }, \ + { "cond-exec-insns=", &frv_condexec_insns_str, "Internal debug switch" }, \ + { "cond-exec-temps=", &frv_condexec_temps_str, "Internal debug switch" }, \ + { "sched-lookahead=", &frv_sched_lookahead_str,"Internal debug switch" }, \ + } + + /* This macro is a C statement to print on `stderr' a string describing the + particular machine description choice. Every machine description should + define `TARGET_VERSION'. For example: + + #ifdef MOTOROLA + #define TARGET_VERSION \ + fprintf (stderr, " (68k, Motorola syntax)"); + #else + #define TARGET_VERSION \ + fprintf (stderr, " (68k, MIT syntax)"); + #endif */ + #define TARGET_VERSION fprintf (stderr, _(" (frv)")) + + /* Sometimes certain combinations of command options do not make sense on a + particular target machine. You can define a macro `OVERRIDE_OPTIONS' to + take account of this. This macro, if defined, is executed once just after + all the command options have been parsed. + + Don't use this macro to turn on various extra optimizations for `-O'. That + is what `OPTIMIZATION_OPTIONS' is for. */ + + #define OVERRIDE_OPTIONS frv_override_options () + + /* Some machines may desire to change what optimizations are performed for + various optimization levels. This macro, if defined, is executed once just + after the optimization level is determined and before the remainder of the + command options have been parsed. Values set in this macro are used as the + default values for the other command line options. + + LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if + `-O' is specified, and 0 if neither is specified. + + SIZE is nonzero if `-Os' is specified, 0 otherwise. + + You should not use this macro to change options that are not + machine-specific. These should uniformly selected by the same optimization + level on all supported machines. Use this macro to enable machbine-specific + optimizations. + + *Do not examine `write_symbols' in this macro!* The debugging options are + *not supposed to alter the generated code. */ + #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) frv_optimization_options (LEVEL, SIZE) + + + /* Define this macro if debugging can be performed even without a frame + pointer. If this macro is defined, GNU CC will turn on the + `-fomit-frame-pointer' option whenever `-O' is specified. */ + /* Frv needs a specific frame layout that includes the frame pointer */ + + #define CAN_DEBUG_WITHOUT_FP + + + /* Small Data Area Support. */ + /* Maximum size of variables that go in .sdata/.sbss. + The -msdata=foo switch also controls how small variables are handled. */ + #ifndef SDATA_DEFAULT_SIZE + #define SDATA_DEFAULT_SIZE 8 + #endif + + extern int g_switch_value; /* value of the -G xx switch */ + extern int g_switch_set; /* whether -G xx was passed. */ + + + /* Storage Layout */ + + /* Define this macro to have the value 1 if the most significant bit in a byte + has the lowest number; otherwise define it to have the value zero. This + means that bit-field instructions count from the most significant bit. If + the machine has no bit-field instructions, then this must still be defined, + but it doesn't matter which value it is defined to. This macro need not be + a constant. + + This macro does not affect the way structure fields are packed into bytes or + words; that is controlled by `BYTES_BIG_ENDIAN'. */ + #define BITS_BIG_ENDIAN 1 + + /* Define this macro to have the value 1 if the most significant byte in a word + has the lowest number. This macro need not be a constant. */ + #define BYTES_BIG_ENDIAN 1 + + /* Define this macro to have the value 1 if, in a multiword object, the most + significant word has the lowest number. This applies to both memory + locations and registers; GNU CC fundamentally assumes that the order of + words in memory is the same as the order in registers. This macro need not + be a constant. */ + #define WORDS_BIG_ENDIAN 1 + + /* Number of storage units in a word; normally 4. */ + #define UNITS_PER_WORD 4 + + /* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and + which has the specified mode and signedness is to be stored in a register. + This macro is only called when TYPE is a scalar type. + + On most RISC machines, which only have operations that operate on a full + register, define this macro to set M to `word_mode' if M is an integer mode + narrower than `BITS_PER_WORD'. In most cases, only integer modes should be + widened because wider-precision floating-point operations are usually more + expensive than their narrower counterparts. + + For most machines, the macro definition does not change UNSIGNEDP. However, + some machines, have instructions that preferentially handle either signed or + unsigned quantities of certain modes. For example, on the DEC Alpha, 32-bit + loads from memory and 32-bit add instructions sign-extend the result to 64 + bits. On such machines, set UNSIGNEDP according to which kind of extension + is more efficient. + + Do not define this macro if it would never modify MODE. */ + #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ + do \ + { \ + if (GET_MODE_CLASS (MODE) == MODE_INT \ + && GET_MODE_SIZE (MODE) < 4) \ + (MODE) = SImode; \ + } \ + while (0) + + /* Normal alignment required for function parameters on the stack, in bits. + All stack parameters receive at least this much alignment regardless of data + type. On most machines, this is the same as the size of an integer. */ + #define PARM_BOUNDARY 32 + + /* Define this macro if you wish to preserve a certain alignment for the stack + pointer. The definition is a C expression for the desired alignment + (measured in bits). + + If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the + specified boundary. If `PUSH_ROUNDING' is defined and specifies a less + strict alignment than `STACK_BOUNDARY', the stack may be momentarily + unaligned while pushing arguments. */ + #define STACK_BOUNDARY 64 + + /* Alignment required for a function entry point, in bits. */ + #define FUNCTION_BOUNDARY 128 + + /* Biggest alignment that any data type can require on this machine, + in bits. */ + #define BIGGEST_ALIGNMENT 64 + + /* @@@ A hack, needed because libobjc wants to use ADJUST_FIELD_ALIGN for + some reason. */ + #ifdef IN_TARGET_LIBS + #define BIGGEST_FIELD_ALIGNMENT 64 + #else + /* An expression for the alignment of a structure field FIELD if the + alignment computed in the usual way is COMPUTED. GNU CC uses this + value instead of the value in `BIGGEST_ALIGNMENT' or + `BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only. */ + #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ + frv_adjust_field_align (FIELD, COMPUTED) + #endif + + /* If defined, a C expression to compute the alignment for a static variable. + TYPE is the data type, and ALIGN is the alignment that the object + would ordinarily have. The value of this macro is used instead of that + alignment to align the object. + + If this macro is not defined, then ALIGN is used. + + One use of this macro is to increase alignment of medium-size data to make + it all fit in fewer cache lines. Another is to cause character arrays to be + word-aligned so that `strcpy' calls that copy constants to character arrays + can be done inline. */ + #define DATA_ALIGNMENT(TYPE, ALIGN) \ + (TREE_CODE (TYPE) == ARRAY_TYPE \ + && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ + && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) + + /* If defined, a C expression to compute the alignment given to a constant that + is being placed in memory. CONSTANT is the constant and ALIGN is the + alignment that the object would ordinarily have. The value of this macro is + used instead of that alignment to align the object. + + If this macro is not defined, then ALIGN is used. + + The typical use of this macro is to increase alignment for string constants + to be word aligned so that `strcpy' calls that copy constants can be done + inline. */ + #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ + (TREE_CODE (EXP) == STRING_CST \ + && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) + + /* Define this macro to be the value 1 if instructions will fail to work if + given data not on the nominal alignment. If instructions will merely go + slower in that case, define this macro as 0. */ + #define STRICT_ALIGNMENT 1 + + /* Define this if you wish to imitate the way many other C compilers handle + alignment of bitfields and the structures that contain them. + + The behavior is that the type written for a bit-field (`int', `short', or + other integer type) imposes an alignment for the entire structure, as if the + structure really did contain an ordinary field of that type. In addition, + the bit-field is placed within the structure so that it would fit within such + a field, not crossing a boundary for it. + + Thus, on most machines, a bit-field whose type is written as `int' would not + cross a four-byte boundary, and would force four-byte alignment for the + whole structure. (The alignment used may not be four bytes; it is + controlled by the other alignment parameters.) + + If the macro is defined, its definition should be a C expression; a nonzero + value for the expression enables this behavior. + + Note that if this macro is not defined, or its value is zero, some bitfields + may cross more than one alignment boundary. The compiler can support such + references if there are `insv', `extv', and `extzv' insns that can directly + reference memory. + + The other known way of making bitfields work is to define + `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'. Then every + structure can be accessed with fullwords. + + Unless the machine has bit-field instructions or you define + `STRUCTURE_SIZE_BOUNDARY' that way, you must define + `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value. + + If your aim is to make GNU CC use the same conventions for laying out + bitfields as are used by another compiler, here is how to investigate what + the other compiler does. Compile and run this program: + + struct foo1 + { + char x; + char :0; + char y; + }; + + struct foo2 + { + char x; + int :0; + char y; + }; + + main () + { + printf ("Size of foo1 is %d\n", + sizeof (struct foo1)); + printf ("Size of foo2 is %d\n", + sizeof (struct foo2)); + exit (0); + } + + If this prints 2 and 5, then the compiler's behavior is what you would get + from `PCC_BITFIELD_TYPE_MATTERS'. + + Defined in svr4.h. */ + #define PCC_BITFIELD_TYPE_MATTERS 1 + + + /* Layout of Source Language Data Types. */ + + #define CHAR_TYPE_SIZE 8 + #define SHORT_TYPE_SIZE 16 + #define INT_TYPE_SIZE 32 + #define LONG_TYPE_SIZE 32 + #define LONG_LONG_TYPE_SIZE 64 + #define FLOAT_TYPE_SIZE 32 + #define DOUBLE_TYPE_SIZE 64 + #define LONG_DOUBLE_TYPE_SIZE 64 + + /* An expression whose value is 1 or 0, according to whether the type `char' + should be signed or unsigned by default. The user can always override this + default with the options `-fsigned-char' and `-funsigned-char'. */ + #define DEFAULT_SIGNED_CHAR 1 + + + /* General purpose registers. */ + #define GPR_FIRST 0 /* First gpr */ + #define GPR_LAST (GPR_FIRST + 63) /* Last gpr */ + #define GPR_R0 GPR_FIRST /* R0, constant 0 */ + #define GPR_FP (GPR_FIRST + 2) /* Frame pointer */ + #define GPR_SP (GPR_FIRST + 1) /* Stack pointer */ + /* small data register */ + #define SDA_BASE_REG ((unsigned)(flag_pic ? PIC_REGNO : (GPR_FIRST+16))) + #define PIC_REGNO (GPR_FIRST + 17) /* PIC register */ + + #define FPR_FIRST 64 /* First FP reg */ + #define FPR_LAST 127 /* Last FP reg */ + + #define DEFAULT_CONDEXEC_TEMPS 4 /* reserve 4 regs by default */ + #define GPR_TEMP_NUM frv_condexec_temps /* # gprs to reserve for temps */ + + /* We reserve the last CR and CCR in each category to be used as a reload + register to reload the CR/CCR registers. This is a kludge. */ + #define CC_FIRST 128 /* First ICC/FCC reg */ + #define CC_LAST 135 /* Last ICC/FCC reg */ + #define ICC_FIRST (CC_FIRST + 4) /* First ICC reg */ + #define ICC_LAST (CC_FIRST + 7) /* Last ICC reg */ + #define ICC_TEMP (CC_FIRST + 7) /* Temporary ICC reg */ + #define FCC_FIRST (CC_FIRST) /* First FCC reg */ + #define FCC_LAST (CC_FIRST + 3) /* Last FCC reg */ + + /* Amount to shift a value to locate a ICC or FCC register in the CCR + register and shift it to the bottom 4 bits. */ + #define CC_SHIFT_RIGHT(REGNO) (((REGNO) - CC_FIRST) << 2) + + /* Mask to isolate a single ICC/FCC value. */ + #define CC_MASK 0xf + + /* Masks to isolate the various bits in an ICC field. */ + #define ICC_MASK_N 0x8 /* negative */ + #define ICC_MASK_Z 0x4 /* zero */ + #define ICC_MASK_V 0x2 /* overflow */ + #define ICC_MASK_C 0x1 /* carry */ + + /* Mask to isolate the N/Z flags in an ICC. */ + #define ICC_MASK_NZ (ICC_MASK_N | ICC_MASK_Z) + + /* Mask to isolate the Z/C flags in an ICC. */ + #define ICC_MASK_ZC (ICC_MASK_Z | ICC_MASK_C) + + /* Masks to isolate the various bits in a FCC field. */ + #define FCC_MASK_E 0x8 /* equal */ + #define FCC_MASK_L 0x4 /* less than */ + #define FCC_MASK_G 0x2 /* greater than */ + #define FCC_MASK_U 0x1 /* unordered */ + + /* For CCR registers, the machine wants CR4..CR7 to be used for integer + code and CR0..CR3 to be used for floating point. */ + #define CR_FIRST 136 /* First CCR */ + #define CR_LAST 143 /* Last CCR */ + #define CR_NUM (CR_LAST-CR_FIRST+1) /* # of CCRs (8) */ + #define ICR_FIRST (CR_FIRST + 4) /* First integer CCR */ + #define ICR_LAST (CR_FIRST + 7) /* Last integer CCR */ + #define ICR_TEMP ICR_LAST /* Temp integer CCR */ + #define FCR_FIRST (CR_FIRST + 0) /* First float CCR */ + #define FCR_LAST (CR_FIRST + 3) /* Last float CCR */ + + /* Amount to shift a value to locate a CR register in the CCCR special purpose + register and shift it to the bottom 2 bits. */ + #define CR_SHIFT_RIGHT(REGNO) (((REGNO) - CR_FIRST) << 1) + + /* Mask to isolate a single CR value. */ + #define CR_MASK 0x3 + + #define ACC_FIRST 144 /* First acc register */ + #define ACC_LAST 151 /* Last acc register */ + + #define ACCG_FIRST 152 /* First accg register */ + #define ACCG_LAST 159 /* Last accg register */ + + #define AP_FIRST 160 /* fake argument pointer */ + + #define SPR_FIRST 161 + #define SPR_LAST 162 + #define LR_REGNO (SPR_FIRST) + #define LCR_REGNO (SPR_FIRST + 1) + + #define GPR_P(R) IN_RANGE_P (R, GPR_FIRST, GPR_LAST) + #define GPR_OR_AP_P(R) (GPR_P (R) || (R) == ARG_POINTER_REGNUM) + #define FPR_P(R) IN_RANGE_P (R, FPR_FIRST, FPR_LAST) + #define CC_P(R) IN_RANGE_P (R, CC_FIRST, CC_LAST) + #define ICC_P(R) IN_RANGE_P (R, ICC_FIRST, ICC_LAST) + #define FCC_P(R) IN_RANGE_P (R, FCC_FIRST, FCC_LAST) + #define CR_P(R) IN_RANGE_P (R, CR_FIRST, CR_LAST) + #define ICR_P(R) IN_RANGE_P (R, ICR_FIRST, ICR_LAST) + #define FCR_P(R) IN_RANGE_P (R, FCR_FIRST, FCR_LAST) + #define ACC_P(R) IN_RANGE_P (R, ACC_FIRST, ACC_LAST) + #define ACCG_P(R) IN_RANGE_P (R, ACCG_FIRST, ACCG_LAST) + #define SPR_P(R) IN_RANGE_P (R, SPR_FIRST, SPR_LAST) + + #define GPR_OR_PSEUDO_P(R) (GPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define FPR_OR_PSEUDO_P(R) (FPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define GPR_AP_OR_PSEUDO_P(R) (GPR_OR_AP_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define CC_OR_PSEUDO_P(R) (CC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define ICC_OR_PSEUDO_P(R) (ICC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define FCC_OR_PSEUDO_P(R) (FCC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define CR_OR_PSEUDO_P(R) (CR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define ICR_OR_PSEUDO_P(R) (ICR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define FCR_OR_PSEUDO_P(R) (FCR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define ACC_OR_PSEUDO_P(R) (ACC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + #define ACCG_OR_PSEUDO_P(R) (ACCG_P (R) || (R) >= FIRST_PSEUDO_REGISTER) + + #define MAX_STACK_IMMEDIATE_OFFSET 2047 + + + /* Register Basics. */ + + /* Number of hardware registers known to the compiler. They receive numbers 0 + through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number + really is assigned the number `FIRST_PSEUDO_REGISTER'. */ + #define FIRST_PSEUDO_REGISTER (SPR_LAST + 1) + + /* The first/last register that can contain the arguments to a function. */ + #define FIRST_ARG_REGNUM (GPR_FIRST + 8) + #define LAST_ARG_REGNUM (FIRST_ARG_REGNUM + FRV_NUM_ARG_REGS - 1) + + /* Registers used by the exception handling functions. These should be + registers that are not otherwised used by the calling sequence. */ + #define FIRST_EH_REGNUM 14 + #define LAST_EH_REGNUM 15 + + /* Scratch registers used in the prologue, epilogue and thunks. + OFFSET_REGNO is for loading constant addends that are too big for a + single instruction. TEMP_REGNO is used for transferring SPRs to and from + the stack, and various other activities. */ + #define OFFSET_REGNO 4 + #define TEMP_REGNO 5 + + /* Registers used in the prologue. OLD_SP_REGNO is the old stack pointer, + which is sometimes used to set up the frame pointer. */ + #define OLD_SP_REGNO 6 + + /* Registers used in the epilogue. STACKADJ_REGNO stores the exception + handler's stack adjustment. */ + #define STACKADJ_REGNO 6 + + /* Registers used in thunks. JMP_REGNO is used for loading the target + address. */ + #define JUMP_REGNO 6 + + #define EH_RETURN_DATA_REGNO(N) ((N) <= (LAST_EH_REGNUM - FIRST_EH_REGNUM)? \ + (N) + FIRST_EH_REGNUM : INVALID_REGNUM) + #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, STACKADJ_REGNO) + #define EH_RETURN_HANDLER_RTX RETURN_ADDR_RTX (0, frame_pointer_rtx) + + /* An initializer that says which registers are used for fixed purposes all + throughout the compiled code and are therefore not available for general + allocation. These would include the stack pointer, the frame pointer + (except on machines where that can be used as a general register when no + frame pointer is needed), the program counter on machines where that is + considered one of the addressable registers, and any other numbered register + with a standard use. + + This information is expressed as a sequence of numbers, separated by commas + and surrounded by braces. The Nth number is 1 if register N is fixed, 0 + otherwise. + + The table initialized from this macro, and the table initialized by the + following one, may be overridden at run time either automatically, by the + actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the + command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */ + + /* gr0 -- Hard Zero + gr1 -- Stack Pointer + gr2 -- Frame Pointer + gr3 -- Hidden Parameter + gr16 -- Small Data reserved + gr17 -- Pic reserved + gr28 -- OS reserved + gr29 -- OS reserved + gr30 -- OS reserved + gr31 -- OS reserved + cr3 -- reserved to reload FCC registers. + cr7 -- reserved to reload ICC registers. */ + #define FIXED_REGISTERS \ + { /* Integer Registers */ \ + 1, 1, 1, 1, 0, 0, 0, 0, /* 000-007, gr0 - gr7 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 008-015, gr8 - gr15 */ \ + 1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ + 0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 032-039, gr32 - gr39 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 040-040, gr48 - gr47 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ + /* Float Registers */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 064-071, fr0 - fr7 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 072-079, fr8 - fr15 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 096-103, fr32 - fr39 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 104-111, fr48 - fr47 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ + /* Condition Code Registers */ \ + 0, 0, 0, 0, /* 128-131, fcc0 - fcc3 */ \ + 0, 0, 0, 1, /* 132-135, icc0 - icc3 */ \ + /* Conditional execution Registers (CCR) */ \ + 0, 0, 0, 0, 0, 0, 0, 1, /* 136-143, cr0 - cr7 */ \ + /* Accumulators */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 152-159, accg0 - accg7 */ \ + /* Other registers */ \ + 1, /* 160, AP - fake arg ptr */ \ + 0, /* 161, LR - Link register*/ \ + 0, /* 162, LCR - Loop count reg*/ \ + } + + /* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in + general) by function calls as well as for fixed registers. This macro + therefore identifies the registers that are not available for general + allocation of values that must live across function calls. + + If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically + saves it on function entry and restores it on function exit, if the register + is used within the function. */ + #define CALL_USED_REGISTERS \ + { /* Integer Registers */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 000-007, gr0 - gr7 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 008-015, gr8 - gr15 */ \ + 1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ + 0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 032-039, gr32 - gr39 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 040-040, gr48 - gr47 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ + /* Float Registers */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 064-071, fr0 - fr7 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 072-079, fr8 - fr15 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 096-103, fr32 - fr39 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 104-111, fr48 - fr47 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ + /* Condition Code Registers */ \ + 1, 1, 1, 1, /* 128-131, fcc0 - fcc3 */ \ + 1, 1, 1, 1, /* 132-135, icc0 - icc3 */ \ + /* Conditional execution Registers (CCR) */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 136-143, cr0 - cr7 */ \ + /* Accumulators */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, /* 152-159, accg0 - accg7 */ \ + /* Other registers */ \ + 1, /* 160, AP - fake arg ptr */ \ + 1, /* 161, LR - Link register*/ \ + 1, /* 162, LCR - Loop count reg */ \ + } + + /* Zero or more C statements that may conditionally modify two variables + `fixed_regs' and `call_used_regs' (both of type `char []') after they have + been initialized from the two preceding macros. + + This is necessary in case the fixed or call-clobbered registers depend on + target flags. + + You need not define this macro if it has no work to do. + + If the usage of an entire class of registers depends on the target flags, + you may indicate this to GCC by using this macro to modify `fixed_regs' and + `call_used_regs' to 1 for each of the registers in the classes which should + not be used by GCC. Also define the macro `REG_CLASS_FROM_LETTER' to return + `NO_REGS' if it is called with a letter for a class that shouldn't be used. + + (However, if this class is not included in `GENERAL_REGS' and all of the + insn patterns whose constraints permit this class are controlled by target + switches, then GCC will automatically avoid using these registers when the + target switches are opposed to them.) */ + + #define CONDITIONAL_REGISTER_USAGE frv_conditional_register_usage () + + + /* Order of allocation of registers. */ + + /* If defined, an initializer for a vector of integers, containing the numbers + of hard registers in the order in which GNU CC should prefer to use them + (from most preferred to least). + + If this macro is not defined, registers are used lowest numbered first (all + else being equal). + + One use of this macro is on machines where the highest numbered registers + must always be saved and the save-multiple-registers instruction supports + only sequences of consecutive registers. On such machines, define + `REG_ALLOC_ORDER' to be an initializer that lists the highest numbered + allocatable register first. */ + + /* On the FRV, allocate GR16 and GR17 after other saved registers so that we + have a better chance of allocating 2 registers at a time and can use the + double word load/store instructions in the prologue. */ + #define REG_ALLOC_ORDER \ + { \ + /* volatile registers */ \ + GPR_FIRST + 4, GPR_FIRST + 5, GPR_FIRST + 6, GPR_FIRST + 7, \ + GPR_FIRST + 8, GPR_FIRST + 9, GPR_FIRST + 10, GPR_FIRST + 11, \ + GPR_FIRST + 12, GPR_FIRST + 13, GPR_FIRST + 14, GPR_FIRST + 15, \ + GPR_FIRST + 32, GPR_FIRST + 33, GPR_FIRST + 34, GPR_FIRST + 35, \ + GPR_FIRST + 36, GPR_FIRST + 37, GPR_FIRST + 38, GPR_FIRST + 39, \ + GPR_FIRST + 40, GPR_FIRST + 41, GPR_FIRST + 42, GPR_FIRST + 43, \ + GPR_FIRST + 44, GPR_FIRST + 45, GPR_FIRST + 46, GPR_FIRST + 47, \ + \ + FPR_FIRST + 0, FPR_FIRST + 1, FPR_FIRST + 2, FPR_FIRST + 3, \ + FPR_FIRST + 4, FPR_FIRST + 5, FPR_FIRST + 6, FPR_FIRST + 7, \ + FPR_FIRST + 8, FPR_FIRST + 9, FPR_FIRST + 10, FPR_FIRST + 11, \ + FPR_FIRST + 12, FPR_FIRST + 13, FPR_FIRST + 14, FPR_FIRST + 15, \ + FPR_FIRST + 32, FPR_FIRST + 33, FPR_FIRST + 34, FPR_FIRST + 35, \ + FPR_FIRST + 36, FPR_FIRST + 37, FPR_FIRST + 38, FPR_FIRST + 39, \ + FPR_FIRST + 40, FPR_FIRST + 41, FPR_FIRST + 42, FPR_FIRST + 43, \ + FPR_FIRST + 44, FPR_FIRST + 45, FPR_FIRST + 46, FPR_FIRST + 47, \ + \ + ICC_FIRST + 0, ICC_FIRST + 1, ICC_FIRST + 2, ICC_FIRST + 3, \ + FCC_FIRST + 0, FCC_FIRST + 1, FCC_FIRST + 2, FCC_FIRST + 3, \ + CR_FIRST + 0, CR_FIRST + 1, CR_FIRST + 2, CR_FIRST + 3, \ + CR_FIRST + 4, CR_FIRST + 5, CR_FIRST + 6, CR_FIRST + 7, \ + \ + /* saved registers */ \ + GPR_FIRST + 18, GPR_FIRST + 19, \ + GPR_FIRST + 20, GPR_FIRST + 21, GPR_FIRST + 22, GPR_FIRST + 23, \ + GPR_FIRST + 24, GPR_FIRST + 25, GPR_FIRST + 26, GPR_FIRST + 27, \ + GPR_FIRST + 48, GPR_FIRST + 49, GPR_FIRST + 50, GPR_FIRST + 51, \ + GPR_FIRST + 52, GPR_FIRST + 53, GPR_FIRST + 54, GPR_FIRST + 55, \ + GPR_FIRST + 56, GPR_FIRST + 57, GPR_FIRST + 58, GPR_FIRST + 59, \ + GPR_FIRST + 60, GPR_FIRST + 61, GPR_FIRST + 62, GPR_FIRST + 63, \ + GPR_FIRST + 16, GPR_FIRST + 17, \ + \ + FPR_FIRST + 16, FPR_FIRST + 17, FPR_FIRST + 18, FPR_FIRST + 19, \ + FPR_FIRST + 20, FPR_FIRST + 21, FPR_FIRST + 22, FPR_FIRST + 23, \ + FPR_FIRST + 24, FPR_FIRST + 25, FPR_FIRST + 26, FPR_FIRST + 27, \ + FPR_FIRST + 28, FPR_FIRST + 29, FPR_FIRST + 30, FPR_FIRST + 31, \ + FPR_FIRST + 48, FPR_FIRST + 49, FPR_FIRST + 50, FPR_FIRST + 51, \ + FPR_FIRST + 52, FPR_FIRST + 53, FPR_FIRST + 54, FPR_FIRST + 55, \ + FPR_FIRST + 56, FPR_FIRST + 57, FPR_FIRST + 58, FPR_FIRST + 59, \ + FPR_FIRST + 60, FPR_FIRST + 61, FPR_FIRST + 62, FPR_FIRST + 63, \ + \ + /* special or fixed registers */ \ + GPR_FIRST + 0, GPR_FIRST + 1, GPR_FIRST + 2, GPR_FIRST + 3, \ + GPR_FIRST + 28, GPR_FIRST + 29, GPR_FIRST + 30, GPR_FIRST + 31, \ + ACC_FIRST + 0, ACC_FIRST + 1, ACC_FIRST + 2, ACC_FIRST + 3, \ + ACC_FIRST + 4, ACC_FIRST + 5, ACC_FIRST + 6, ACC_FIRST + 7, \ + ACCG_FIRST + 0, ACCG_FIRST + 1, ACCG_FIRST + 2, ACCG_FIRST + 3, \ + ACCG_FIRST + 4, ACCG_FIRST + 5, ACCG_FIRST + 6, ACCG_FIRST + 7, \ + AP_FIRST, LR_REGNO, LCR_REGNO \ + } + + + /* How Values Fit in Registers. */ + + /* A C expression for the number of consecutive hard registers, starting at + register number REGNO, required to hold a value of mode MODE. + + On a machine where all registers are exactly one word, a suitable definition + of this macro is + + #define HARD_REGNO_NREGS(REGNO, MODE) \ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ + / UNITS_PER_WORD)) */ + + /* On the FRV, make the CC modes take 3 words in the integer registers, so that + we can build the appropriate instructions to properly reload the values. */ + #define HARD_REGNO_NREGS(REGNO, MODE) frv_hard_regno_nregs (REGNO, MODE) + + /* A C expression that is nonzero if it is permissible to store a value of mode + MODE in hard register number REGNO (or in several registers starting with + that one). For a machine where all registers are equivalent, a suitable + definition is + + #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 + + It is not necessary for this macro to check for the numbers of fixed + registers, because the allocation mechanism considers them to be always + occupied. + + On some machines, double-precision values must be kept in even/odd register + pairs. The way to implement that is to define this macro to reject odd + register numbers for such modes. + + The minimum requirement for a mode to be OK in a register is that the + `movMODE' instruction pattern support moves between the register and any + other hard register for which the mode is OK; and that moving a value into + the register and back out not alter it. + + Since the same instruction used to move `SImode' will work for all narrower + integer modes, it is not necessary on any machine for `HARD_REGNO_MODE_OK' + to distinguish between these modes, provided you define patterns `movhi', + etc., to take advantage of this. This is useful because of the interaction + between `HARD_REGNO_MODE_OK' and `MODES_TIEABLE_P'; it is very desirable for + all integer modes to be tieable. + + Many machines have special registers for floating point arithmetic. Often + people assume that floating point machine modes are allowed only in floating + point registers. This is not true. Any registers that can hold integers + can safely *hold* a floating point machine mode, whether or not floating + arithmetic can be done on it in those registers. Integer move instructions + can be used to move the values. + + On some machines, though, the converse is true: fixed-point machine modes + may not go in floating registers. This is true if the floating registers + normalize any value stored in them, because storing a non-floating value + there would garble it. In this case, `HARD_REGNO_MODE_OK' should reject + fixed-point machine modes in floating registers. But if the floating + registers do not automatically normalize, if you can store any bit pattern + in one and retrieve it unchanged without a trap, then any machine mode may + go in a floating register, so you can define this macro to say so. + + The primary significance of special floating registers is rather that they + are the registers acceptable in floating point arithmetic instructions. + However, this is of no concern to `HARD_REGNO_MODE_OK'. You handle it by + writing the proper constraints for those instructions. + + On some machines, the floating registers are especially slow to access, so + that it is better to store a value in a stack frame than in such a register + if floating point arithmetic is not being done. As long as the floating + registers are not in class `GENERAL_REGS', they will not be used unless some + pattern's constraint asks for one. */ + #define HARD_REGNO_MODE_OK(REGNO, MODE) frv_hard_regno_mode_ok (REGNO, MODE) + + /* A C expression that is nonzero if it is desirable to choose register + allocation so as to avoid move instructions between a value of mode MODE1 + and a value of mode MODE2. + + If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are + ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be + zero. */ + #define MODES_TIEABLE_P(MODE1, MODE2) (MODE1 == MODE2) + + /* Define this macro if the compiler should avoid copies to/from CCmode + registers. You should only define this macro if support fo copying to/from + CCmode is incomplete. */ + #define AVOID_CCMODE_COPIES + + + /* Register Classes. */ + + /* An enumeral type that must be defined with all the register class names as + enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last + register class, followed by one more enumeral value, `LIM_REG_CLASSES', + which is not a register class but rather tells how many classes there are. + + Each register class has a number, which is the value of casting the class + name to type `int'. The number serves as an index in many of the tables + described below. */ + enum reg_class + { + NO_REGS, + ICC_REGS, + FCC_REGS, + CC_REGS, + ICR_REGS, + FCR_REGS, + CR_REGS, + LCR_REG, + LR_REG, + SPR_REGS, + QUAD_ACC_REGS, + EVEN_ACC_REGS, + ACC_REGS, + ACCG_REGS, + QUAD_FPR_REGS, + FEVEN_REGS, + FPR_REGS, + QUAD_REGS, + EVEN_REGS, + GPR_REGS, + ALL_REGS, + LIM_REG_CLASSES + }; + + #define GENERAL_REGS GPR_REGS + + /* The number of distinct register classes, defined as follows: + + #define N_REG_CLASSES (int) LIM_REG_CLASSES */ + #define N_REG_CLASSES ((int) LIM_REG_CLASSES) + + /* An initializer containing the names of the register classes as C string + constants. These names are used in writing some of the debugging dumps. */ + #define REG_CLASS_NAMES { \ + "NO_REGS", \ + "ICC_REGS", \ + "FCC_REGS", \ + "CC_REGS", \ + "ICR_REGS", \ + "FCR_REGS", \ + "CR_REGS", \ + "LCR_REG", \ + "LR_REG", \ + "SPR_REGS", \ + "QUAD_ACC_REGS", \ + "EVEN_ACC_REGS", \ + "ACC_REGS", \ + "ACCG_REGS", \ + "QUAD_FPR_REGS", \ + "FEVEN_REGS", \ + "FPR_REGS", \ + "QUAD_REGS", \ + "EVEN_REGS", \ + "GPR_REGS", \ + "ALL_REGS" \ + } + + /* An initializer containing the contents of the register classes, as integers + which are bit masks. The Nth integer specifies the contents of class N. + The way the integer MASK is interpreted is that register R is in the class + if `MASK & (1 << R)' is 1. + + When the machine has more than 32 registers, an integer does not suffice. + Then the integers are replaced by sub-initializers, braced groupings + containing several integers. Each sub-initializer must be suitable as an + initializer for the type `HARD_REG_SET' which is defined in + `hard-reg-set.h'. */ + #define REG_CLASS_CONTENTS \ + { /* gr0-gr31 gr32-gr63 fr0-fr31 fr32-fr-63 cc/ccr/acc ap/spr */ \ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* NO_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x000000f0,0x0}, /* ICC_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000000f,0x0}, /* FCC_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x000000ff,0x0}, /* CC_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000f000,0x0}, /* ICR_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000f00,0x0}, /* FCR_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000ff00,0x0}, /* CR_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x4}, /* LCR_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x2}, /* LR_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x6}, /* SPR_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* QUAD_ACC */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* EVEN_ACC */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* ACC_REGS */\ + { 0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0x0}, /* ACCG_REGS*/\ + { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* QUAD_FPR */\ + { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* FEVEN_REG*/\ + { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* FPR_REGS */\ + { 0x0ffffffc,0xffffffff,0x00000000,0x00000000,0x00000000,0x0}, /* QUAD_REGS*/\ + { 0xfffffffc,0xffffffff,0x00000000,0x00000000,0x00000000,0x0}, /* EVEN_REGS*/\ + { 0xffffffff,0xffffffff,0x00000000,0x00000000,0x00000000,0x1}, /* GPR_REGS */\ + { 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7}, /* ALL_REGS */\ + } + + /* A C expression whose value is a register class containing hard register + REGNO. In general there is more than one such class; choose a class which + is "minimal", meaning that no smaller class also contains the register. */ + + extern enum reg_class regno_reg_class[]; + #define REGNO_REG_CLASS(REGNO) regno_reg_class [REGNO] + + /* A macro whose definition is the name of the class to which a valid base + register must belong. A base register is one used in an address which is + the register value plus a displacement. */ + #define BASE_REG_CLASS GPR_REGS + + /* A macro whose definition is the name of the class to which a valid index + register must belong. An index register is one used in an address where its + value is either multiplied by a scale factor or added to another register + (as well as added to a displacement). */ + #define INDEX_REG_CLASS GPR_REGS + + /* A C expression which defines the machine-dependent operand constraint + letters for register classes. If CHAR is such a letter, the value should be + the register class corresponding to it. Otherwise, the value should be + `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS', + will not be passed to this macro; you do not need to handle it. + + The following letters are unavailable, due to being used as + constraints: + '0'..'9' + '<', '>' + 'E', 'F', 'G', 'H' + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P' + 'Q', 'R', 'S', 'T', 'U' + 'V', 'X' + 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */ + + extern enum reg_class reg_class_from_letter[]; + #define REG_CLASS_FROM_LETTER(CHAR) reg_class_from_letter [(unsigned char)(CHAR)] + + /* A C expression which is nonzero if register number NUM is suitable for use + as a base register in operand addresses. It may be either a suitable hard + register or a pseudo register that has been allocated such a hard register. */ + #define REGNO_OK_FOR_BASE_P(NUM) \ + ((NUM) < FIRST_PSEUDO_REGISTER \ + ? GPR_P (NUM) \ + : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM]))) + + /* A C expression which is nonzero if register number NUM is suitable for use + as an index register in operand addresses. It may be either a suitable hard + register or a pseudo register that has been allocated such a hard register. + + The difference between an index register and a base register is that the + index register may be scaled. If an address involves the sum of two + registers, neither one of them scaled, then either one may be labeled the + "base" and the other the "index"; but whichever labeling is used must fit + the machine's constraints of which registers may serve in each capacity. + The compiler will try both labelings, looking for one that is valid, and + will reload one or both registers only if neither labeling works. */ + #define REGNO_OK_FOR_INDEX_P(NUM) \ + ((NUM) < FIRST_PSEUDO_REGISTER \ + ? GPR_P (NUM) \ + : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM]))) + + /* A C expression that places additional restrictions on the register class to + use when it is necessary to copy value X into a register in class CLASS. + The value is a register class; perhaps CLASS, or perhaps another, smaller + class. On many machines, the following definition is safe: + + #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS + + Sometimes returning a more restrictive class makes better code. For + example, on the 68000, when X is an integer constant that is in range for a + `moveq' instruction, the value of this macro is always `DATA_REGS' as long + as CLASS includes the data registers. Requiring a data register guarantees + that a `moveq' will be used. + + If X is a `const_double', by returning `NO_REGS' you can force X into a + memory constant. This is useful on certain machines where immediate + floating values cannot be loaded into certain kinds of registers. + + This declaration must be present. */ + #define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS + + #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ + frv_secondary_reload_class (CLASS, MODE, X, TRUE) + + #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ + frv_secondary_reload_class (CLASS, MODE, X, FALSE) + + /* A C expression whose value is nonzero if pseudos that have been assigned to + registers of class CLASS would likely be spilled because registers of CLASS + are needed for spill registers. + + The default value of this macro returns 1 if CLASS has exactly one register + and zero otherwise. On most machines, this default should be used. Only + define this macro to some other expression if pseudo allocated by + `local-alloc.c' end up in memory because their hard registers were needed + for spill registers. If this macro returns nonzero for those classes, those + pseudos will only be allocated by `global.c', which knows how to reallocate + the pseudo to another register. If there would not be another register + available for reallocation, you should not change the definition of this + macro since the only effect of such a definition would be to slow down + register allocation. */ + #define CLASS_LIKELY_SPILLED_P(CLASS) frv_class_likely_spilled_p (CLASS) + + /* A C expression for the maximum number of consecutive registers of + class CLASS needed to hold a value of mode MODE. + + This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value + of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of + `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS. + + This macro helps control the handling of multiple-word values in + the reload pass. + + This declaration is required. */ + #define CLASS_MAX_NREGS(CLASS, MODE) frv_class_max_nregs (CLASS, MODE) + + #define ZERO_P(x) (x == CONST0_RTX (GET_MODE (x))) + + /* 6 bit signed immediate. */ + #define CONST_OK_FOR_I(VALUE) IN_RANGE_P(VALUE, -32, 31) + /* 10 bit signed immediate. */ + #define CONST_OK_FOR_J(VALUE) IN_RANGE_P(VALUE, -512, 511) + /* Unused */ + #define CONST_OK_FOR_K(VALUE) 0 + /* 16 bit signed immediate. */ + #define CONST_OK_FOR_L(VALUE) IN_RANGE_P(VALUE, -32768, 32767) + /* 16 bit unsigned immediate. */ + #define CONST_OK_FOR_M(VALUE) IN_RANGE_P (VALUE, 0, 65535) + /* 12 bit signed immediate that is negative. */ + #define CONST_OK_FOR_N(VALUE) IN_RANGE_P(VALUE, -2048, -1) + /* Zero */ + #define CONST_OK_FOR_O(VALUE) ((VALUE) == 0) + /* 12 bit signed immediate that is negative. */ + #define CONST_OK_FOR_P(VALUE) IN_RANGE_P(VALUE, 1, 2047) + + /* A C expression that defines the machine-dependent operand constraint letters + (`I', `J', `K', .. 'P') that specify particular ranges of integer values. + If C is one of those letters, the expression should check that VALUE, an + integer, is in the appropriate range and return 1 if so, 0 otherwise. If C + is not one of those letters, the value should be 0 regardless of VALUE. */ + #define CONST_OK_FOR_LETTER_P(VALUE, C) \ + ( (C) == 'I' ? CONST_OK_FOR_I (VALUE) \ + : (C) == 'J' ? CONST_OK_FOR_J (VALUE) \ + : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ + : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \ + : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \ + : (C) == 'N' ? CONST_OK_FOR_N (VALUE) \ + : (C) == 'O' ? CONST_OK_FOR_O (VALUE) \ + : (C) == 'P' ? CONST_OK_FOR_P (VALUE) \ + : 0) + + + /* A C expression that defines the machine-dependent operand constraint letters + (`G', `H') that specify particular ranges of `const_double' values. + + If C is one of those letters, the expression should check that VALUE, an RTX + of code `const_double', is in the appropriate range and return 1 if so, 0 + otherwise. If C is not one of those letters, the value should be 0 + regardless of VALUE. + + `const_double' is used for all floating-point constants and for `DImode' + fixed-point constants. A given letter can accept either or both kinds of + values. It can use `GET_MODE' to distinguish between these kinds. */ + + #define CONST_DOUBLE_OK_FOR_G(VALUE) \ + ((GET_MODE (VALUE) == VOIDmode \ + && CONST_DOUBLE_LOW (VALUE) == 0 \ + && CONST_DOUBLE_HIGH (VALUE) == 0) \ + || ((GET_MODE (VALUE) == SFmode \ + || GET_MODE (VALUE) == DFmode) \ + && (VALUE) == CONST0_RTX (GET_MODE (VALUE)))) + + #define CONST_DOUBLE_OK_FOR_H(VALUE) 0 + + #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ + ( (C) == 'G' ? CONST_DOUBLE_OK_FOR_G (VALUE) \ + : (C) == 'H' ? CONST_DOUBLE_OK_FOR_H (VALUE) \ + : 0) + + /* A C expression that defines the optional machine-dependent constraint + letters (`Q', `R', `S', `T', `U') that can be used to segregate specific + types of operands, usually memory references, for the target machine. + Normally this macro will not be defined. If it is required for a particular + target machine, it should return 1 if VALUE corresponds to the operand type + represented by the constraint letter C. If C is not defined as an extra + constraint, the value returned should be 0 regardless of VALUE. + + For example, on the ROMP, load instructions cannot have their output in r0 + if the memory reference contains a symbolic address. Constraint letter `Q' + is defined as representing a memory address that does *not* contain a + symbolic address. An alternative is specified with a `Q' constraint on the + input and `r' on the output. The next alternative specifies `m' on the + input and a register class that does not include r0 on the output. */ + + /* Small data references */ + #define EXTRA_CONSTRAINT_FOR_Q(VALUE) \ + (small_data_symbolic_operand (VALUE, GET_MODE (VALUE))) + + /* Double word memory ops that take one instruction. */ + #define EXTRA_CONSTRAINT_FOR_R(VALUE) \ + (dbl_memory_one_insn_operand (VALUE, GET_MODE (VALUE))) + + /* SYMBOL_REF */ + #define EXTRA_CONSTRAINT_FOR_S(VALUE) (GET_CODE (VALUE) == SYMBOL_REF) + + /* Double word memory ops that take two instructions. */ + #define EXTRA_CONSTRAINT_FOR_T(VALUE) \ + (dbl_memory_two_insn_operand (VALUE, GET_MODE (VALUE))) + + /* Memory operand for conditional execution. */ + #define EXTRA_CONSTRAINT_FOR_U(VALUE) \ + (condexec_memory_operand (VALUE, GET_MODE (VALUE))) + + #define EXTRA_CONSTRAINT(VALUE, C) \ + ( (C) == 'Q' ? EXTRA_CONSTRAINT_FOR_Q (VALUE) \ + : (C) == 'R' ? EXTRA_CONSTRAINT_FOR_R (VALUE) \ + : (C) == 'S' ? EXTRA_CONSTRAINT_FOR_S (VALUE) \ + : (C) == 'T' ? EXTRA_CONSTRAINT_FOR_T (VALUE) \ + : (C) == 'U' ? EXTRA_CONSTRAINT_FOR_U (VALUE) \ + : 0) + + + /* Basic Stack Layout. */ + + /* Structure to describe information about a saved range of registers */ + + typedef struct frv_stack_regs { + const char * name; /* name of the register ranges */ + int first; /* first register in the range */ + int last; /* last register in the range */ + int size_1word; /* # of bytes to be stored via 1 word stores */ + int size_2words; /* # of bytes to be stored via 2 word stores */ + unsigned char field_p; /* true if the registers are a single SPR */ + unsigned char dword_p; /* true if we can do dword stores */ + unsigned char special_p; /* true if the regs have a fixed save loc. */ + } frv_stack_regs_t; + + /* Register ranges to look into saving. */ + #define STACK_REGS_GPR 0 /* Gprs (normally gr16..gr31, gr48..gr63) */ + #define STACK_REGS_FPR 1 /* Fprs (normally fr16..fr31, fr48..fr63) */ + #define STACK_REGS_LR 2 /* LR register */ + #define STACK_REGS_CC 3 /* CCrs (normally not saved) */ + #define STACK_REGS_LCR 5 /* lcr register */ + #define STACK_REGS_STDARG 6 /* stdarg registers */ + #define STACK_REGS_STRUCT 7 /* structure return (gr3) */ + #define STACK_REGS_FP 8 /* FP register */ + #define STACK_REGS_MAX 9 /* # of register ranges */ + + /* Values for save_p field. */ + #define REG_SAVE_NO_SAVE 0 /* register not saved */ + #define REG_SAVE_1WORD 1 /* save the register */ + #define REG_SAVE_2WORDS 2 /* save register and register+1 */ + + /* Structure used to define the frv stack. */ + + typedef struct frv_stack { + int total_size; /* total bytes allocated for stack */ + int vars_size; /* variable save area size */ + int parameter_size; /* outgoing parameter size */ + int stdarg_size; /* size of regs needed to be saved for stdarg */ + int regs_size; /* size of the saved registers */ + int regs_size_1word; /* # of bytes to be stored via 1 word stores */ + int regs_size_2words; /* # of bytes to be stored via 2 word stores */ + int header_size; /* size of the old FP, struct ret., LR save */ + int pretend_size; /* size of pretend args */ + int vars_offset; /* offset to save local variables from new SP*/ + int regs_offset; /* offset to save registers from new SP */ + /* register range information */ + frv_stack_regs_t regs[STACK_REGS_MAX]; + /* offset to store each register */ + int reg_offset[FIRST_PSEUDO_REGISTER]; + /* whether to save register (& reg+1) */ + unsigned char save_p[FIRST_PSEUDO_REGISTER]; + } frv_stack_t; + + /* Define this macro if pushing a word onto the stack moves the stack pointer + to a smaller address. */ + #define STACK_GROWS_DOWNWARD 1 + + /* Define this macro if the addresses of local variable slots are at negative + offsets from the frame pointer. */ + #define FRAME_GROWS_DOWNWARD + + /* Offset from the frame pointer to the first local variable slot to be + allocated. + + If `FRAME_GROWS_DOWNWARD', find the next slot's offset by subtracting the + first slot's length from `STARTING_FRAME_OFFSET'. Otherwise, it is found by + adding the length of the first slot to the value `STARTING_FRAME_OFFSET'. */ + #define STARTING_FRAME_OFFSET 0 + + /* Offset from the stack pointer register to the first location at which + outgoing arguments are placed. If not specified, the default value of zero + is used. This is the proper value for most machines. + + If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first + location at which outgoing arguments are placed. */ + #define STACK_POINTER_OFFSET 0 + + /* Offset from the argument pointer register to the first argument's address. + On some machines it may depend on the data type of the function. + + If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first + argument's address. */ + #define FIRST_PARM_OFFSET(FUNDECL) 0 + + /* A C expression whose value is RTL representing the address in a stack frame + where the pointer to the caller's frame is stored. Assume that FRAMEADDR is + an RTL expression for the address of the stack frame itself. + + If you don't define this macro, the default is to return the value of + FRAMEADDR--that is, the stack frame address is also the address of the stack + word that points to the previous frame. */ + #define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) frv_dynamic_chain_address (FRAMEADDR) + + /* A C expression whose value is RTL representing the value of the return + address for the frame COUNT steps up from the current frame, after the + prologue. FRAMEADDR is the frame pointer of the COUNT frame, or the frame + pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME' is + defined. + + The value of the expression must always be the correct address when COUNT is + zero, but may be `NULL_RTX' if there is not way to determine the return + address of other frames. */ + #define RETURN_ADDR_RTX(COUNT, FRAMEADDR) frv_return_addr_rtx (COUNT, FRAMEADDR) + + /* This function contains machine specific function data. */ + struct machine_function GTY(()) + { + /* True if we have created an rtx that relies on the stack frame. */ + int frame_needed; + }; + + #define RETURN_POINTER_REGNUM LR_REGNO + + /* A C expression whose value is RTL representing the location of the incoming + return address at the beginning of any function, before the prologue. This + RTL is either a `REG', indicating that the return value is saved in `REG', + or a `MEM' representing a location in the stack. + + You only need to define this macro if you want to support call frame + debugging information like that provided by DWARF 2. */ + #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RETURN_POINTER_REGNUM) + + + /* Register That Address the Stack Frame. */ + + /* The register number of the stack pointer register, which must also be a + fixed register according to `FIXED_REGISTERS'. On most machines, the + hardware determines which register this is. */ + #define STACK_POINTER_REGNUM (GPR_FIRST + 1) + + /* The register number of the frame pointer register, which is used to access + automatic variables in the stack frame. On some machines, the hardware + determines which register this is. On other machines, you can choose any + register you wish for this purpose. */ + #define FRAME_POINTER_REGNUM (GPR_FIRST + 2) + + /* The register number of the arg pointer register, which is used to access the + function's argument list. On some machines, this is the same as the frame + pointer register. On some machines, the hardware determines which register + this is. On other machines, you can choose any register you wish for this + purpose. If this is not the same register as the frame pointer register, + then you must mark it as a fixed register according to `FIXED_REGISTERS', or + arrange to be able to eliminate it. */ + + /* On frv this is a fake register that is eliminated in + terms of either the frame pointer or stack pointer. */ + #define ARG_POINTER_REGNUM AP_FIRST + + /* Register numbers used for passing a function's static chain pointer. If + register windows are used, the register number as seen by the called + function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as + seen by the calling function is `STATIC_CHAIN_REGNUM'. If these registers + are the same, `STATIC_CHAIN_INCOMING_REGNUM' need not be defined. + + The static chain register need not be a fixed register. + + If the static chain is passed in memory, these macros should not be defined; + instead, the next two macros should be defined. */ + #define STATIC_CHAIN_REGNUM (GPR_FIRST + 7) + #define STATIC_CHAIN_INCOMING_REGNUM (GPR_FIRST + 7) + + + /* Eliminating the Frame Pointer and the Arg Pointer. */ + + /* A C expression which is nonzero if a function must have and use a frame + pointer. This expression is evaluated in the reload pass. If its value is + nonzero the function will have a frame pointer. + + The expression can in principle examine the current function and decide + according to the facts, but on most machines the constant 0 or the constant + 1 suffices. Use 0 when the machine allows code to be generated with no + frame pointer, and doing so saves some time or space. Use 1 when there is + no possible advantage to avoiding a frame pointer. + + In certain cases, the compiler does not know how to produce valid code + without a frame pointer. The compiler recognizes those cases and + automatically gives the function a frame pointer regardless of what + `FRAME_POINTER_REQUIRED' says. You don't need to worry about them. + + In a function that does not require a frame pointer, the frame pointer + register can be allocated for ordinary usage, unless you mark it as a fixed + register. See `FIXED_REGISTERS' for more information. */ + #define FRAME_POINTER_REQUIRED frv_frame_pointer_required () + + /* If defined, this macro specifies a table of register pairs used to eliminate + unneeded registers that point into the stack frame. If it is not defined, + the only elimination attempted by the compiler is to replace references to + the frame pointer with references to the stack pointer. + + The definition of this macro is a list of structure initializations, each of + which specifies an original and replacement register. + + On some machines, the position of the argument pointer is not known until + the compilation is completed. In such a case, a separate hard register must + be used for the argument pointer. This register can be eliminated by + replacing it with either the frame pointer or the argument pointer, + depending on whether or not the frame pointer has been eliminated. + + In this case, you might specify: + #define ELIMINABLE_REGS \ + {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ + {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ + {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} + + Note that the elimination of the argument pointer with the stack pointer is + specified first since that is the preferred elimination. */ + + #define ELIMINABLE_REGS \ + { \ + {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ + {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ + {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \ + } + + /* A C expression that returns nonzero if the compiler is allowed to try to + replace register number FROM with register number TO. This macro need only + be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant + 1, since most of the cases preventing register elimination are things that + the compiler already knows about. */ + + #define CAN_ELIMINATE(FROM, TO) \ + ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM \ + ? ! frame_pointer_needed \ + : 1) + + /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It specifies the + initial difference between the specified pair of registers. This macro must + be defined if `ELIMINABLE_REGS' is defined. */ + + #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ + (OFFSET) = frv_initial_elimination_offset (FROM, TO) + + + /* Passing Function Arguments on the Stack. */ + + /* If defined, the maximum amount of space required for outgoing arguments will + be computed and placed into the variable + `current_function_outgoing_args_size'. No space will be pushed onto the + stack for each call; instead, the function prologue should increase the + stack frame size by this amount. + + Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not + proper. */ + #define ACCUMULATE_OUTGOING_ARGS 1 + + /* A C expression that should indicate the number of bytes of its own arguments + that a function pops on returning, or 0 if the function pops no arguments + and the caller must therefore pop them all after the function returns. + + FUNDECL is a C variable whose value is a tree node that describes the + function in question. Normally it is a node of type `FUNCTION_DECL' that + describes the declaration of the function. From this it is possible to + obtain the DECL_ATTRIBUTES of the function. + + FUNTYPE is a C variable whose value is a tree node that describes the + function in question. Normally it is a node of type `FUNCTION_TYPE' that + describes the data type of the function. From this it is possible to obtain + the data types of the value and arguments (if known). + + When a call to a library function is being considered, FUNTYPE will contain + an identifier node for the library function. Thus, if you need to + distinguish among various library functions, you can do so by their names. + Note that "library function" in this context means a function used to + perform arithmetic, whose name is known specially in the compiler and was + not mentioned in the C code being compiled. + + STACK-SIZE is the number of bytes of arguments passed on the stack. If a + variable number of bytes is passed, it is zero, and argument popping will + always be the responsibility of the calling function. + + On the VAX, all functions always pop their arguments, so the definition of + this macro is STACK-SIZE. On the 68000, using the standard calling + convention, no functions pop their arguments, so the value of the macro is + always 0 in this case. But an alternative calling convention is available + in which functions that take a fixed number of arguments pop them but other + functions (such as `printf') pop nothing (the caller pops all). When this + convention is in use, FUNTYPE is examined to determine whether a function + takes a fixed number of arguments. */ + #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0 + + + /* Function Arguments in Registers. */ + + /* Nonzero if we do not know how to pass TYPE solely in registers. + We cannot do so in the following cases: + + - if the type has variable size + - if the type is marked as addressable (it is required to be constructed + into the stack) + - if the type is a structure or union. */ + + #define MUST_PASS_IN_STACK(MODE,TYPE) \ + (((MODE) == BLKmode) \ + || ((TYPE) != 0 \ + && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ + || TREE_CODE (TYPE) == RECORD_TYPE \ + || TREE_CODE (TYPE) == UNION_TYPE \ + || TREE_CODE (TYPE) == QUAL_UNION_TYPE \ + || TREE_ADDRESSABLE (TYPE)))) + + /* The number of register assigned to holding function arguments. */ + + #define FRV_NUM_ARG_REGS 6 + + /* A C expression that controls whether a function argument is passed in a + register, and which register. + + The arguments are CUM, of type CUMULATIVE_ARGS, which summarizes (in a way + defined by INIT_CUMULATIVE_ARGS and FUNCTION_ARG_ADVANCE) all of the previous + arguments so far passed in registers; MODE, the machine mode of the argument; + TYPE, the data type of the argument as a tree node or 0 if that is not known + (which happens for C support library functions); and NAMED, which is 1 for an + ordinary argument and 0 for nameless arguments that correspond to `...' in the + called function's prototype. + + The value of the expression should either be a `reg' RTX for the hard + register in which to pass the argument, or zero to pass the argument on the + stack. + + For machines like the VAX and 68000, where normally all arguments are + pushed, zero suffices as a definition. + + The usual way to make the ANSI library `stdarg.h' work on a machine where + some arguments are usually passed in registers, is to cause nameless + arguments to be passed on the stack instead. This is done by making + `FUNCTION_ARG' return 0 whenever NAMED is 0. + + You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of + this macro to determine if this argument is of a type that must be passed in + the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' + returns nonzero for such an argument, the compiler will abort. If + `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the + stack and then loaded into a register. */ + #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ + frv_function_arg (&CUM, MODE, TYPE, NAMED, FALSE) + + /* Define this macro if the target machine has "register windows", so that the + register in which a function sees an arguments is not necessarily the same + as the one in which the caller passed the argument. + + For such machines, `FUNCTION_ARG' computes the register in which the caller + passes the value, and `FUNCTION_INCOMING_ARG' should be defined in a similar + fashion to tell the function being called where the arguments will arrive. + + If `FUNCTION_INCOMING_ARG' is not defined, `FUNCTION_ARG' serves both + purposes. */ + + #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ + frv_function_arg (&CUM, MODE, TYPE, NAMED, TRUE) + + /* A C expression for the number of words, at the beginning of an argument, + must be put in registers. The value must be zero for arguments that are + passed entirely in registers or that are entirely pushed on the stack. + + On some machines, certain arguments must be passed partially in registers + and partially in memory. On these machines, typically the first N words of + arguments are passed in registers, and the rest on the stack. If a + multi-word argument (a `double' or a structure) crosses that boundary, its + first few words must be passed in registers and the rest must be pushed. + This macro tells the compiler when this occurs, and how many of the words + should go in registers. + + `FUNCTION_ARG' for these arguments should return the first register to be + used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for + the called function. */ + #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ + frv_function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED) + + /* extern int frv_function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS, int, Tree, int)); */ + + /* A C expression that indicates when an argument must be passed by reference. + If nonzero for an argument, a copy of that argument is made in memory and a + pointer to the argument is passed instead of the argument itself. The + pointer is passed in whatever way is appropriate for passing a pointer to + that type. + + On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable + definition of this macro might be + #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ + MUST_PASS_IN_STACK (MODE, TYPE) */ + #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ + frv_function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED) + + /* If defined, a C expression that indicates when it is the called function's + responsibility to make a copy of arguments passed by invisible reference. + Normally, the caller makes a copy and passes the address of the copy to the + routine being called. When FUNCTION_ARG_CALLEE_COPIES is defined and is + nonzero, the caller does not make a copy. Instead, it passes a pointer to + the "live" value. The called function must not modify this value. If it + can be determined that the value won't be modified, it need not make a copy; + otherwise a copy must be made. */ + #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ + frv_function_arg_callee_copies (&CUM, MODE, TYPE, NAMED) + + /* If defined, a C expression that indicates when it is more desirable to keep + an argument passed by invisible reference as a reference, rather than + copying it to a pseudo register. */ + #define FUNCTION_ARG_KEEP_AS_REFERENCE(CUM, MODE, TYPE, NAMED) \ + frv_function_arg_keep_as_reference (&CUM, MODE, TYPE, NAMED) + + /* A C type for declaring a variable that is used as the first argument of + `FUNCTION_ARG' and other related values. For some target machines, the type + `int' suffices and can hold the number of bytes of argument so far. + + There is no need to record in `CUMULATIVE_ARGS' anything about the arguments + that have been passed on the stack. The compiler has other variables to + keep track of that. For target machines on which all arguments are passed + on the stack, there is no need to store anything in `CUMULATIVE_ARGS'; + however, the data structure must exist and should not be empty, so use + `int'. */ + #define CUMULATIVE_ARGS int + + /* A C statement (sans semicolon) for initializing the variable CUM for the + state at the beginning of the argument list. The variable has type + `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type + of the function which will receive the args, or 0 if the args are to a + compiler support library function. The value of INDIRECT is nonzero when + processing an indirect call, for example a call through a function pointer. + The value of INDIRECT is zero for a call to an explicitly named function, a + library function call, or when `INIT_CUMULATIVE_ARGS' is used to find + arguments for the function being compiled. + + When processing a call to a compiler support library function, LIBNAME + identifies which one. It is a `symbol_ref' rtx which contains the name of + the function, as a string. LIBNAME is 0 when an ordinary C function call is + being processed. Thus, each time this macro is called, either LIBNAME or + FNTYPE is nonzero, but never both of them at once. */ + + #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ + frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, INDIRECT, FALSE) + + /* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the + arguments for the function being compiled. If this macro is undefined, + `INIT_CUMULATIVE_ARGS' is used instead. + + The value passed for LIBNAME is always 0, since library routines with + special calling conventions are never compiled with GNU CC. The argument + LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'. */ + + #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \ + frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE, TRUE) + + /* A C statement (sans semicolon) to update the summarizer variable CUM to + advance past an argument in the argument list. The values MODE, TYPE and + NAMED describe that argument. Once this is done, the variable CUM is + suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. + + This macro need not do anything if the argument in question was passed on + the stack. The compiler knows how to track the amount of stack space used + for arguments without any special help. */ + #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ + frv_function_arg_advance (&CUM, MODE, TYPE, NAMED) + + /* If defined, a C expression that gives the alignment boundary, in bits, of an + argument with the specified mode and type. If it is not defined, + `PARM_BOUNDARY' is used for all arguments. */ + + #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ + frv_function_arg_boundary (MODE, TYPE) + + /* A C expression that is nonzero if REGNO is the number of a hard register in + which function arguments are sometimes passed. This does *not* include + implicit arguments such as the static chain and the structure-value address. + On many machines, no registers can be used for this purpose since all + function arguments are pushed on the stack. */ + #define FUNCTION_ARG_REGNO_P(REGNO) \ + ((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) <= LAST_ARG_REGNUM)) + + + /* How Scalar Function Values are Returned. */ + + /* The number of the hard register that is used to return a scalar value from a + function call. */ + #define RETURN_VALUE_REGNUM (GPR_FIRST + 8) + + /* A C expression to create an RTX representing the place where a function + returns a value of data type VALTYPE. VALTYPE is a tree node representing a + data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode used to + represent that type. On many machines, only the mode is relevant. + (Actually, on most machines, scalar values are returned in the same place + regardless of mode). + + If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same promotion + rules specified in `PROMOTE_MODE' if VALTYPE is a scalar type. + + If the precise function being called is known, FUNC is a tree node + (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This makes it + possible to use a different value-returning convention for specific + functions when all their calls are known. + + `FUNCTION_VALUE' is not used for return vales with aggregate data types, + because these are returned in another way. See `STRUCT_VALUE_REGNUM' and + related macros, below. */ + #define FUNCTION_VALUE(VALTYPE, FUNC) \ + gen_rtx (REG, TYPE_MODE (VALTYPE), RETURN_VALUE_REGNUM) + + /* A C expression to create an RTX representing the place where a library + function returns a value of mode MODE. + + Note that "library function" in this context means a compiler support + routine, used to perform arithmetic, whose name is known specially by the + compiler and was not mentioned in the C code being compiled. + + The definition of `LIBRARY_VALUE' need not be concerned aggregate data + types, because none of the library functions returns such types. */ + #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, RETURN_VALUE_REGNUM) + + /* A C expression that is nonzero if REGNO is the number of a hard register in + which the values of called function may come back. + + A register whose use for returning values is limited to serving as the + second of a pair (for a value of type `double', say) need not be recognized + by this macro. So for most machines, this definition suffices: + + #define FUNCTION_VALUE_REGNO_P(N) ((N) == RETURN) + + If the machine has register windows, so that the caller and the called + function use different registers for the return value, this macro should + recognize only the caller's register numbers. */ + #define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM) + + + /* How Large Values are Returned. */ + + /* If the structure value address is passed in a register, then + `STRUCT_VALUE_REGNUM' should be the number of that register. */ + #define STRUCT_VALUE_REGNUM (GPR_FIRST + 3) + + + /* Function Entry and Exit. */ + + /* Define this macro as a C expression that is nonzero if the return + instruction or the function epilogue ignores the value of the stack pointer; + in other words, if it is safe to delete an instruction to adjust the stack + pointer before a return from the function. + + Note that this macro's value is relevant only for functions for which frame + pointers are maintained. It is never safe to delete a final stack + adjustment in a function that has no frame pointer, and the compiler knows + this regardless of `EXIT_IGNORE_STACK'. */ + #define EXIT_IGNORE_STACK 1 + + /* Generating Code for Profiling. */ + + /* A C statement or compound statement to output to FILE some assembler code to + call the profiling subroutine `mcount'. Before calling, the assembler code + must load the address of a counter variable into a register where `mcount' + expects to find the address. The name of this variable is `LP' followed by + the number LABELNO, so you would generate the name using `LP%d' in a + `fprintf'. + + The details of how the address should be passed to `mcount' are determined + by your operating system environment, not by GNU CC. To figure them out, + compile a small program for profiling using the system's installed C + compiler and look at the assembler code that results. + + This declaration must be present, but it can be an abort if profiling is + not implemented. */ + + #define FUNCTION_PROFILER(FILE, LABELNO) abort () + + + /* Implementing the Varargs Macros. */ + + /* If defined, is a C expression that produces the machine-specific code for a + call to `__builtin_saveregs'. This code will be moved to the very beginning + of the function, before any parameter access are made. The return value of + this function should be an RTX that contains the value to use as the return + of `__builtin_saveregs'. + + If this macro is not defined, the compiler will output an ordinary call to + the library function `__builtin_saveregs'. */ + + #define EXPAND_BUILTIN_SAVEREGS() frv_expand_builtin_saveregs () + + /* This macro offers an alternative to using `__builtin_saveregs' and defining + the macro `EXPAND_BUILTIN_SAVEREGS'. Use it to store the anonymous register + arguments into the stack so that all the arguments appear to have been + passed consecutively on the stack. Once this is done, you can use the + standard implementation of varargs that works for machines that pass all + their arguments on the stack. + + The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing + the values that obtain after processing of the named arguments. The + arguments MODE and TYPE describe the last named argument--its machine mode + and its data type as a tree node. + + The macro implementation should do two things: first, push onto the stack + all the argument registers *not* used for the named arguments, and second, + store the size of the data thus pushed into the `int'-valued variable whose + name is supplied as the argument PRETEND_ARGS_SIZE. The value that you + store here will serve as additional offset for setting up the stack frame. + + Because you must generate code to push the anonymous arguments at compile + time without knowing their data types, `SETUP_INCOMING_VARARGS' is only + useful on machines that have just a single category of argument register and + use it uniformly for all data types. + + If the argument SECOND_TIME is nonzero, it means that the arguments of the + function are being analyzed for the second time. This happens for an inline + function, which is not actually compiled until the end of the source file. + The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in + this case. */ + #define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \ + frv_setup_incoming_varargs (& ARGS_SO_FAR, (int) MODE, TYPE, \ + & PRETEND_ARGS_SIZE, SECOND_TIME) + + /* Implement the stdarg/varargs va_start macro. STDARG_P is nonzero if this + is stdarg.h instead of varargs.h. VALIST is the tree of the va_list + variable to initialize. NEXTARG is the machine independent notion of the + 'next' argument after the variable arguments. If not defined, a standard + implementation will be defined that works for arguments passed on the stack. */ + + #define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \ + (frv_expand_builtin_va_start(VALIST, NEXTARG)) + + /* Implement the stdarg/varargs va_arg macro. VALIST is the variable of type + va_list as a tree, TYPE is the type passed to va_arg. */ + + #define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \ + (frv_expand_builtin_va_arg (VALIST, TYPE)) + + + /* Trampolines for Nested Functions. */ + + /* A C expression for the size in bytes of the trampoline, as an integer. */ + #define TRAMPOLINE_SIZE frv_trampoline_size () + + /* Alignment required for trampolines, in bits. + + If you don't define this macro, the value of `BIGGEST_ALIGNMENT' is used for + aligning trampolines. */ + #define TRAMPOLINE_ALIGNMENT 32 + + /* A C statement to initialize the variable parts of a trampoline. ADDR is an + RTX for the address of the trampoline; FNADDR is an RTX for the address of + the nested function; STATIC_CHAIN is an RTX for the static chain value that + should be passed to the function when it is called. */ + #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \ + frv_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN) + + /* Define this macro if trampolines need a special subroutine to do their work. + The macro should expand to a series of `asm' statements which will be + compiled with GNU CC. They go in a library function named + `__transfer_from_trampoline'. + + If you need to avoid executing the ordinary prologue code of a compiled C + function when you jump to the subroutine, you can do so by placing a special + label of your own in the assembler code. Use one `asm' statement to + generate an assembler label, and another to make the label global. Then + trampolines can use that label to jump directly to your special assembler + code. */ + + #ifdef __FRV_UNDERSCORE__ + #define TRAMPOLINE_TEMPLATE_NAME "___trampoline_template" + #else + #define TRAMPOLINE_TEMPLATE_NAME "__trampoline_template" + #endif + + #define TRANSFER_FROM_TRAMPOLINE \ + extern int _write (int, const void *, unsigned); \ + \ + void \ + __trampoline_setup (addr, size, fnaddr, sc) \ + short * addr; \ + int size; \ + int fnaddr; \ + int sc; \ + { \ + extern short __trampoline_template[]; \ + short * to = addr; \ + short * from = &__trampoline_template[0]; \ + int i; \ + \ + if (size < 20) \ + { \ + _write (2, "__trampoline_setup bad size\n", \ + sizeof ("__trampoline_setup bad size\n") - 1); \ + exit (-1); \ + } \ + \ + to[0] = from[0]; \ + to[1] = (short)(fnaddr); \ + to[2] = from[2]; \ + to[3] = (short)(sc); \ + to[4] = from[4]; \ + to[5] = (short)(fnaddr >> 16); \ + to[6] = from[6]; \ + to[7] = (short)(sc >> 16); \ + to[8] = from[8]; \ + to[9] = from[9]; \ + \ + for (i = 0; i < 20; i++) \ + __asm__ volatile ("dcf @(%0,%1)\n\tici @(%0,%1)" :: "r" (to), "r" (i)); \ + } \ + \ + __asm__("\n" \ + "\t.globl " TRAMPOLINE_TEMPLATE_NAME "\n" \ + "\t.text\n" \ + TRAMPOLINE_TEMPLATE_NAME ":\n" \ + "\tsetlos #0, gr6\n" /* jump register */ \ + "\tsetlos #0, gr7\n" /* static chain */ \ + "\tsethi #0, gr6\n" \ + "\tsethi #0, gr7\n" \ + "\tjmpl @(gr0,gr6)\n"); + + + /* Implicit Calls to Library Routines. */ + + /* A C string constant giving the name of the function to call for the + remainder in division of one signed full-word by another. If you do not + define this macro, the default name is used, which is `__modsi3', a function + defined in `libgcc.a'. */ + #define MODSI3_LIBCALL "__modi" + + /* A C string constant giving the name of the function to call for the + remainder in division of one unsigned full-word by another. If you do not + define this macro, the default name is used, which is `__umodsi3', a + function defined in `libgcc.a'. */ + #define UMODSI3_LIBCALL "__umodi" + + /* A C string constant giving the name of the function to call for + multiplication of one signed double-word by another. If you do not define + this macro, the default name is used, which is `__muldi3', a function + defined in `libgcc.a'. */ + #define MULDI3_LIBCALL "__mulll" + + /* A C string constant giving the name of the function to call for division of + one signed double-word by another. If you do not define this macro, the + default name is used, which is `__divdi3', a function defined in `libgcc.a'. */ + #define DIVDI3_LIBCALL "__divll" + + /* A C string constant giving the name of the function to call for division of + one unsigned full-word by another. If you do not define this macro, the + default name is used, which is `__udivdi3', a function defined in + `libgcc.a'. */ + #define UDIVDI3_LIBCALL "__udivll" + + /* A C string constant giving the name of the function to call for the + remainder in division of one signed double-word by another. If you do not + define this macro, the default name is used, which is `__moddi3', a function + defined in `libgcc.a'. */ + #define MODDI3_LIBCALL "__modll" + + /* A C string constant giving the name of the function to call for the + remainder in division of one unsigned full-word by another. If you do not + define this macro, the default name is used, which is `__umoddi3', a + function defined in `libgcc.a'. */ + #define UMODDI3_LIBCALL "__umodll" + + /* Define this macro as a C statement that declares additional library routines + renames existing ones. `init_optabs' calls this macro after initializing all + the normal library routines. */ + #define INIT_TARGET_OPTABS \ + do \ + { \ + add_optab->handlers [(int) DImode].libfunc \ + = init_one_libfunc ("__addll"); \ + sub_optab->handlers [(int) DImode].libfunc \ + = init_one_libfunc ("__subll"); \ + and_optab->handlers [(int) DImode].libfunc \ + = init_one_libfunc ("__andll"); \ + ior_optab->handlers [(int) DImode].libfunc \ + = init_one_libfunc ("__orll"); \ + xor_optab->handlers [(int) DImode].libfunc \ + = init_one_libfunc ("__xorll"); \ + one_cmpl_optab->handlers [(int) DImode].libfunc \ + = init_one_libfunc ("__notll"); \ + add_optab->handlers [(int) SFmode].libfunc \ + = init_one_libfunc ("__addf"); \ + sub_optab->handlers [(int) SFmode].libfunc \ + = init_one_libfunc ("__subf"); \ + smul_optab->handlers [(int) SFmode].libfunc \ + = init_one_libfunc ("__mulf"); \ + sdiv_optab->handlers [(int) SFmode].libfunc \ + = init_one_libfunc ("__divf"); \ + add_optab->handlers [(int) DFmode].libfunc \ + = init_one_libfunc ("__addd"); \ + sub_optab->handlers [(int) DFmode].libfunc \ + = init_one_libfunc ("__subd"); \ + smul_optab->handlers [(int) DFmode].libfunc \ + = init_one_libfunc ("__muld"); \ + sdiv_optab->handlers [(int) DFmode].libfunc \ + = init_one_libfunc ("__divd"); \ + fixsfsi_libfunc = init_one_libfunc ("__ftoi"); \ + fixunssfsi_libfunc = init_one_libfunc ("__ftoui"); \ + fixsfdi_libfunc = init_one_libfunc ("__ftoll"); \ + fixunssfdi_libfunc = init_one_libfunc ("__ftoull"); \ + fixdfsi_libfunc = init_one_libfunc ("__dtoi"); \ + fixunsdfsi_libfunc = init_one_libfunc ("__dtoui"); \ + fixdfdi_libfunc = init_one_libfunc ("__dtoll"); \ + fixunsdfdi_libfunc = init_one_libfunc ("__dtoull"); \ + floatsisf_libfunc = init_one_libfunc ("__itof"); \ + floatdisf_libfunc = init_one_libfunc ("__lltof"); \ + floatsidf_libfunc = init_one_libfunc ("__itod"); \ + floatdidf_libfunc = init_one_libfunc ("__lltod"); \ + extendsfdf2_libfunc = init_one_libfunc ("__ftod"); \ + truncdfsf2_libfunc = init_one_libfunc ("__dtof"); \ + } \ + while (0) + + + /* Addressing Modes. */ + + /* A C expression that is 1 if the RTX X is a constant which is a valid + address. On most machines, this can be defined as `CONSTANT_P (X)', but a + few machines are more restrictive in which constant addresses are supported. + + `CONSTANT_P' accepts integer-values expressions whose values are not + explicitly known, such as `symbol_ref', `label_ref', and `high' expressions + and `const' arithmetic expressions, in addition to `const_int' and + `const_double' expressions. */ + #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) + + /* A number, the maximum number of registers that can appear in a valid memory + address. Note that it is up to you to specify a value equal to the maximum + number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */ + #define MAX_REGS_PER_ADDRESS 2 + + /* A C compound statement with a conditional `goto LABEL;' executed if X (an + RTX) is a legitimate memory address on the target machine for a memory + operand of mode MODE. + + It usually pays to define several simpler macros to serve as subroutines for + this one. Otherwise it may be too complicated to understand. + + This macro must exist in two variants: a strict variant and a non-strict + one. The strict variant is used in the reload pass. It must be defined so + that any pseudo-register that has not been allocated a hard register is + considered a memory reference. In contexts where some kind of register is + required, a pseudo-register with no hard register must be rejected. + + The non-strict variant is used in other passes. It must be defined to + accept all pseudo-registers in every context where some kind of register is + required. + + Compiler source files that want to use the strict variant of this macro + define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' + conditional to define the strict variant in that case and the non-strict + variant otherwise. + + Subroutines to check for acceptable registers for various purposes (one for + base registers, one for index registers, and so on) are typically among the + subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these + subroutine macros need have two variants; the higher levels of macros may be + the same whether strict or not. + + Normally, constant addresses which are the sum of a `symbol_ref' and an + integer are stored inside a `const' RTX to mark them as constant. + Therefore, there is no need to recognize such sums specifically as + legitimate addresses. Normally you would simply recognize any `const' as + legitimate. + + Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that + are not marked with `const'. It assumes that a naked `plus' indicates + indexing. If so, then you *must* reject such naked constant sums as + illegitimate addresses, so that none of them will be given to + `PRINT_OPERAND_ADDRESS'. + + On some machines, whether a symbolic address is legitimate depends on the + section that the address refers to. On these machines, define the macro + `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and + then check for it here. When you see a `const', you will have to look + inside it to find the `symbol_ref' in order to determine the section. + + The best way to modify the name string is by adding text to the beginning, + with suitable punctuation to prevent any ambiguity. Allocate the new name + in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to + remove and decode the added text and output the name accordingly, and define + `(* targetm.strip_name_encoding)' to access the original name string. + + You can check the information stored here into the `symbol_ref' in the + definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and + `PRINT_OPERAND_ADDRESS'. */ + + #ifdef REG_OK_STRICT + #define REG_OK_STRICT_P 1 + #else + #define REG_OK_STRICT_P 0 + #endif + + #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ + do \ + { \ + if (frv_legitimate_address_p (MODE, X, REG_OK_STRICT_P, FALSE)) \ + goto LABEL; \ + } \ + while (0) + + /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for + use as a base register. For hard registers, it should always accept those + which the hardware permits and reject the others. Whether the macro accepts + or rejects pseudo registers must be controlled by `REG_OK_STRICT' as + described above. This usually requires two variant definitions, of which + `REG_OK_STRICT' controls the one actually used. */ + #ifdef REG_OK_STRICT + #define REG_OK_FOR_BASE_P(X) GPR_P (REGNO (X)) + #else + #define REG_OK_FOR_BASE_P(X) GPR_AP_OR_PSEUDO_P (REGNO (X)) + #endif + + /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for + use as an index register. + + The difference between an index register and a base register is that the + index register may be scaled. If an address involves the sum of two + registers, neither one of them scaled, then either one may be labeled the + "base" and the other the "index"; but whichever labeling is used must fit + the machine's constraints of which registers may serve in each capacity. + The compiler will try both labelings, looking for one that is valid, and + will reload one or both registers only if neither labeling works. */ + #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) + + /* A C compound statement that attempts to replace X with a valid memory + address for an operand of mode MODE. WIN will be a C statement label + elsewhere in the code; the macro definition may use + + GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); + + to avoid further processing if the address has become legitimate. + + X will always be the result of a call to `break_out_memory_refs', and OLDX + will be the operand that was given to that function to produce X. + + The code generated by this macro should not alter the substructure of X. If + it transforms X into a more legitimate form, it should assign X (which will + always be a C variable) a new value. + + It is not necessary for this macro to come up with a legitimate address. + The compiler has standard ways of doing so in all cases. In fact, it is + safe for this macro to do nothing. But often a machine-dependent strategy + can generate better code. */ + + /* On the FRV, we use it to convert small data and pic references into using + the appropriate pointer in the address. */ + #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ + do \ + { \ + rtx newx = frv_legitimize_address (X, OLDX, MODE); \ + \ + if (newx) \ + { \ + (X) = newx; \ + goto WIN; \ + } \ + } \ + while (0) + + /* A C statement or compound statement with a conditional `goto LABEL;' + executed if memory address X (an RTX) can have different meanings depending + on the machine mode of the memory reference it is used for or if the address + is valid for some modes but not others. + + Autoincrement and autodecrement addresses typically have mode-dependent + effects because the amount of the increment or decrement is the size of the + operand being addressed. Some machines have other mode-dependent addresses. + Many RISC machines have no mode-dependent addresses. + + You may assume that ADDR is a valid address for the machine. */ + #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) + + /* A C expression that is nonzero if X is a legitimate constant for an + immediate operand on the target machine. You can assume that X satisfies + `CONSTANT_P', so you need not check this. In fact, `1' is a suitable + definition for this macro on machines where anything `CONSTANT_P' is valid. */ + #define LEGITIMATE_CONSTANT_P(X) frv_legitimate_constant_p (X) + + /* The load-and-update commands allow pre-modification in addresses. + The index has to be in a register. */ + #define HAVE_PRE_MODIFY_REG 1 + + + /* Returns a mode from class `MODE_CC' to be used when comparison operation + code OP is applied to rtx X and Y. For example, on the SPARC, + `SELECT_CC_MODE' is defined as (see *note Jump Patterns::. for a + description of the reason for this definition) + + #define SELECT_CC_MODE(OP,X,Y) \ + (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ + ? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode) \ + : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \ + || GET_CODE (X) == NEG) \ + ? CC_NOOVmode : CCmode)) + + You need not define this macro if `EXTRA_CC_MODES' is not defined. */ + #define SELECT_CC_MODE(OP, X, Y) \ + (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ + ? CC_FPmode \ + : (((OP) == LEU || (OP) == GTU || (OP) == LTU || (OP) == GEU) \ + ? CC_UNSmode \ + : CCmode)) + + /* A C expression whose value is one if it is always safe to reverse a + comparison whose mode is MODE. If `SELECT_CC_MODE' can ever return MODE for + a floating-point inequality comparison, then `REVERSIBLE_CC_MODE (MODE)' + must be zero. + + You need not define this macro if it would always returns zero or if the + floating-point format is anything other than `IEEE_FLOAT_FORMAT'. For + example, here is the definition used on the SPARC, where floating-point + inequality comparisons are always given `CCFPEmode': + + #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) */ + + /* On frv, don't consider floating point comparisons to be reversible. In + theory, fp equality comparisons can be reversible */ + #define REVERSIBLE_CC_MODE(MODE) ((MODE) == CCmode || (MODE) == CC_UNSmode) + + /* Frv CCR_MODE's are not reversible. */ + #define REVERSE_CONDEXEC_PREDICATES_P(x,y) 0 + + + /* Describing Relative Costs of Operations. */ + + /* A part of a C `switch' statement that describes the relative costs of + constant RTL expressions. It must contain `case' labels for expression + codes `const_int', `const', `symbol_ref', `label_ref' and `const_double'. + Each case must ultimately reach a `return' statement to return the relative + cost of the use of that kind of constant value in an expression. The cost + may depend on the precise value of the constant, which is available for + examination in X, and the rtx code of the expression in which it is + contained, found in OUTER_CODE. + + CODE is the expression code--redundant, since it can be obtained with + `GET_CODE (X)'. */ + #define CONST_COSTS(X, CODE, OUTER_CODE) \ + case CONST: \ + case LABEL_REF: \ + case SYMBOL_REF: \ + case CONST_DOUBLE: \ + return COSTS_N_INSNS (2); \ + \ + case CONST_INT: \ + /* Make 12 bit integers really cheap */ \ + return IN_RANGE_P (INTVAL (X), -2048, 2047) ? 0 : COSTS_N_INSNS (2); \ + + /* Like `CONST_COSTS' but applies to nonconstant RTL expressions. This can be + used, for example, to indicate how costly a multiply instruction is. In + writing this macro, you can use the construct `COSTS_N_INSNS (N)' to specify + a cost equal to N fast instructions. OUTER_CODE is the code of the + expression in which X is contained. + + This macro is optional; do not define it if the default cost assumptions are + adequate for the target machine. */ + #define RTX_COSTS(X, CODE, OUTER_CODE) \ + case PLUS: \ + case MINUS: \ + case AND: \ + case IOR: \ + case XOR: \ + case ASHIFT: \ + case ASHIFTRT: \ + case LSHIFTRT: \ + case NOT: \ + case NEG: \ + case COMPARE: \ + if (GET_MODE (X) == SImode) \ + return COSTS_N_INSNS (1); \ + else if (GET_MODE (X) == DImode) \ + return COSTS_N_INSNS (2); \ + else \ + return COSTS_N_INSNS (3); /* guess */ \ + \ + case MULT: \ + if (GET_MODE (X) == SImode) \ + return COSTS_N_INSNS (2); \ + else \ + return COSTS_N_INSNS (6); /* guess */ \ + \ + case DIV: \ + case UDIV: \ + return COSTS_N_INSNS (18); + + /* A C expression for the cost of moving data from a register in class FROM to + one in class TO. The classes are expressed using the enumeration values + such as `GENERAL_REGS'. A value of 4 is the default; other values are + interpreted relative to that. + + It is not required that the cost always equal 2 when FROM is the same as TO; + on some machines it is expensive to move between registers if they are not + general registers. + + If reload sees an insn consisting of a single `set' between two hard + registers, and if `REGISTER_MOVE_COST' applied to their classes returns a + value of 2, reload does not check to ensure that the constraints of the insn + are met. Setting a cost of other than 2 will allow reload to verify that + the constraints are met. You should do this if the `movM' pattern's + constraints do not allow such copying. */ + #define REGISTER_MOVE_COST(MODE, FROM, TO) frv_register_move_cost (FROM, TO) + + /* A C expression for the cost of moving data of mode M between a register and + memory. A value of 2 is the default; this cost is relative to those in + `REGISTER_MOVE_COST'. + + If moving between registers and memory is more expensive than between two + registers, you should define this macro to express the relative cost. */ + #define MEMORY_MOVE_COST(M,C,I) 4 + + /* A C expression for the cost of a branch instruction. A value of 1 is the + default; other values are interpreted relative to that. */ + + /* Here are additional macros which do not specify precise relative costs, but + only that certain actions are more expensive than GNU CC would ordinarily + expect. */ + + /* We used to default the branch cost to 2, but I changed it to 1, to avoid + generating SCC instructions and or/and-ing them together, and then doing the + branch on the result, which collectively generate much worse code. */ + #ifndef DEFAULT_BRANCH_COST + #define DEFAULT_BRANCH_COST 1 + #endif + + #define BRANCH_COST frv_branch_cost_int + + /* Define this macro as a C expression which is nonzero if accessing less than + a word of memory (i.e. a `char' or a `short') is no faster than accessing a + word of memory, i.e., if such access require more than one instruction or if + there is no difference in cost between byte and (aligned) word loads. + + When this macro is not defined, the compiler will access a field by finding + the smallest containing object; when it is defined, a fullword load will be + used if alignment permits. Unless bytes accesses are faster than word + accesses, using word accesses is preferable since it may eliminate + subsequent memory access if subsequent accesses occur to other fields in the + same word of the structure, but to different bytes. */ + #define SLOW_BYTE_ACCESS 1 + + /* Define this macro if it is as good or better to call a constant function + address than to call an address kept in a register. */ + #define NO_FUNCTION_CSE + + /* Define this macro if it is as good or better for a function to call itself + with an explicit address than to call an address kept in a register. */ + #define NO_RECURSIVE_FUNCTION_CSE + + + /* Dividing the output into sections. */ + + /* A C expression whose value is a string containing the assembler operation + that should precede instructions and read-only data. Normally `".text"' is + right. */ + #define TEXT_SECTION_ASM_OP "\t.text" + + /* A C expression whose value is a string containing the assembler operation to + identify the following data as writable initialized data. Normally + `".data"' is right. */ + #define DATA_SECTION_ASM_OP "\t.data" + + /* If defined, a C expression whose value is a string containing the + assembler operation to identify the following data as + uninitialized global data. If not defined, and neither + `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined, + uninitialized global data will be output in the data section if + `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be + used. */ + #define BSS_SECTION_ASM_OP "\t.section .bss,\"aw\"" + + /* Short Data Support */ + #define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\"" + #define SBSS_SECTION_ASM_OP "\t.section .sbss,\"aw\"" + + /* On svr4, we *do* have support for the .init and .fini sections, and we + can put stuff in there to be executed before and after `main'. We let + crtstuff.c and other files know this by defining the following symbols. + The definitions say how to change sections to the .init and .fini + sections. This is the same for all known svr4 assemblers. + + The standard System V.4 macros will work, but they look ugly in the + assembly output, so redefine them. */ + + #undef INIT_SECTION_ASM_OP + #undef FINI_SECTION_ASM_OP + #define INIT_SECTION_ASM_OP "\t.section .init,\"ax\"" + #define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\"" + + /* A C expression whose value is a string containing the assembler operation to + switch to the fixup section that records all initialized pointers in a -fpic + program so they can be changed program startup time if the program is loaded + at a different address than linked for. */ + #define FIXUP_SECTION_ASM_OP "\t.section .rofixup,\"a\"" + + /* A list of names for sections other than the standard two, which are + `in_text' and `in_data'. You need not define this macro + on a system with no other sections (that GCC needs to use). */ + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_sdata, in_sbss, in_const, in_fixup + + /* One or more functions to be defined in "varasm.c". These + functions should do jobs analogous to those of `text_section' and + `data_section', for your additional sections. Do not define this + macro if you do not define `EXTRA_SECTIONS'. */ + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + SDATA_SECTION_FUNCTION \ + SBSS_SECTION_FUNCTION \ + FIXUP_SECTION_FUNCTION + + + #define SDATA_SECTION_FUNCTION \ + void \ + sdata_section () \ + { \ + if (in_section != in_sdata) \ + { \ + fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ + in_section = in_sdata; \ + } \ + } \ + + #define SBSS_SECTION_FUNCTION \ + void \ + sbss_section () \ + { \ + if (in_section != in_sbss) \ + { \ + fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \ + in_section = in_sbss; \ + } \ + } \ + + #define FIXUP_SECTION_FUNCTION \ + void \ + fixup_section () \ + { \ + if (in_section != in_fixup) \ + { \ + fprintf (asm_out_file, "%s\n", FIXUP_SECTION_ASM_OP); \ + in_section = in_fixup; \ + } \ + } \ + + #define SDATA_FLAG_CHAR '@' + + #define SDATA_NAME_P(NAME) (*(NAME) == SDATA_FLAG_CHAR) + + /* Position Independent Code. */ + + /* A C expression that is nonzero if X is a legitimate immediate operand on the + target machine when generating position independent code. You can assume + that X satisfies `CONSTANT_P', so you need not check this. You can also + assume FLAG_PIC is true, so you need not check it either. You need not + define this macro if all constants (including `SYMBOL_REF') can be immediate + operands when generating position independent code. */ + #define LEGITIMATE_PIC_OPERAND_P(X) \ + ( GET_CODE (X) == CONST_INT \ + || GET_CODE (X) == CONST_DOUBLE \ + || (GET_CODE (X) == HIGH && GET_CODE (XEXP (X, 0)) == CONST_INT) \ + || GET_CODE (X) == CONSTANT_P_RTX) + + + /* The Overall Framework of an Assembler File. */ + + /* A C string constant describing how to begin a comment in the target + assembler language. The compiler assumes that the comment will end at the + end of the line. */ + #define ASM_COMMENT_START ";" + + /* A C string constant for text to be output before each `asm' statement or + group of consecutive ones. Normally this is `"#APP"', which is a comment + that has no effect on most assemblers but tells the GNU assembler that it + must check the lines that follow for all valid assembler constructs. */ + #define ASM_APP_ON "#APP\n" + + /* A C string constant for text to be output after each `asm' statement or + group of consecutive ones. Normally this is `"#NO_APP"', which tells the + GNU assembler to resume making the time-saving assumptions that are valid + for ordinary compiler output. */ + #define ASM_APP_OFF "#NO_APP\n" + + + /* Output of Data. */ + + /* This is how to output a label to dwarf/dwarf2. */ + #define ASM_OUTPUT_DWARF_ADDR(STREAM, LABEL) \ + do { \ + fprintf (STREAM, "\t.picptr\t"); \ + assemble_name (STREAM, LABEL); \ + } while (0) + + /* Whether to emit the gas specific dwarf2 line number support. */ + #define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DEBUG_LOC) + + /* Output of Uninitialized Variables. */ + + /* A C statement (sans semicolon) to output to the stdio stream STREAM the + assembler definition of a local-common-label named NAME whose size is SIZE + bytes. The variable ROUNDED is the size rounded up to whatever alignment + the caller wants. + + Use the expression `assemble_name (STREAM, NAME)' to output the name itself; + before and after that, output the additional assembler syntax for defining + the name, and a newline. + + This macro controls how the assembler definitions of uninitialized static + variables are output. */ + #undef ASM_OUTPUT_LOCAL + + /* Like `ASM_OUTPUT_LOCAL' except takes the required alignment as a separate, + explicit argument. If you define this macro, it is used in place of + `ASM_OUTPUT_LOCAL', and gives you more flexibility in handling the required + alignment of the variable. The alignment is specified as the number of + bits. + + Defined in svr4.h. */ + #undef ASM_OUTPUT_ALIGNED_LOCAL + + /* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME. */ + extern int size_directive_output; + + /* Like `ASM_OUTPUT_ALIGNED_LOCAL' except that it takes an additional + parameter - the DECL of variable to be output, if there is one. + This macro can be called with DECL == NULL_TREE. If you define + this macro, it is used in place of `ASM_OUTPUT_LOCAL' and + `ASM_OUTPUT_ALIGNED_LOCAL', and gives you more flexibility in + handling the destination of the variable. */ + #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL + #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \ + do { \ + if (SDATA_NAME_P (NAME)) \ + sbss_section (); \ + else \ + bss_section (); \ + ASM_OUTPUT_ALIGN (STREAM, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \ + ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL); \ + ASM_OUTPUT_SKIP (STREAM, (SIZE) ? (SIZE) : 1); \ + } while (0) + + + /* Output and Generation of Labels. */ + + /* A C statement (sans semicolon) to output to the stdio stream STREAM the + assembler definition of a label named NAME. Use the expression + `assemble_name (STREAM, NAME)' to output the name itself; before and after + that, output the additional assembler syntax for defining the name, and a + newline. */ + #define ASM_OUTPUT_LABEL(STREAM, NAME) \ + do { \ + assemble_name (STREAM, NAME); \ + fputs (":\n", STREAM); \ + } while (0) + + /* Globalizing directive for a label. */ + #define GLOBAL_ASM_OP "\t.globl " + + /* A C statement (sans semicolon) to output to the stdio stream STREAM a + reference in assembler syntax to a label named NAME. This should add `_' to + the front of the name, if that is customary on your operating system, as it + is in most Berkeley Unix systems. This macro is used in `assemble_name'. */ + #undef ASM_OUTPUT_LABELREF + #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ + do { \ + const char *_name = (NAME); \ + while (*_name == '*' || *_name == SDATA_FLAG_CHAR) \ + _name++; \ + asm_fprintf (STREAM, "%U%s", _name); \ + } while (0) + + /* A C statement to store into the string STRING a label whose name is made + from the string PREFIX and the number NUM. + + This string, when output subsequently by `assemble_name', should produce the + output that `ASM_OUTPUT_INTERNAL_LABEL' would produce with the same PREFIX + and NUM. + + If the string begins with `*', then `assemble_name' will output the rest of + the string unchanged. It is often convenient for + `ASM_GENERATE_INTERNAL_LABEL' to use `*' in this way. If the string doesn't + start with `*', then `ASM_OUTPUT_LABELREF' gets to output the string, and + may change it. (Of course, `ASM_OUTPUT_LABELREF' is also part of your + machine description, so you should know what it does on your machine.) + + Defined in svr4.h. */ + #undef ASM_GENERATE_INTERNAL_LABEL + #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ + do { \ + sprintf (LABEL, "*.%s%ld", PREFIX, (long)NUM); \ + } while (0) + + /* A C expression to assign to OUTVAR (which is a variable of type `char *') a + newly allocated string made from the string NAME and the number NUMBER, with + some suitable punctuation added. Use `alloca' to get space for the string. + + The string will be used as an argument to `ASM_OUTPUT_LABELREF' to produce + an assembler label for an internal static variable whose name is NAME. + Therefore, the string must be such as to result in valid assembler code. + The argument NUMBER is different each time this macro is executed; it + prevents conflicts between similarly-named internal static variables in + different scopes. + + Ideally this string should not be a valid C identifier, to prevent any + conflict with the user's own symbols. Most assemblers allow periods or + percent signs in assembler symbols; putting at least one of these between + the name and the number will suffice. */ + #define ASM_FORMAT_PRIVATE_NAME(OUTVAR, NAME, NUMBER) \ + do { \ + (OUTVAR) = (char *) alloca (strlen ((NAME)) + 12); \ + sprintf ((OUTVAR), "%s.%ld", (NAME), (long)(NUMBER)); \ + } while (0) + + + /* Macros Controlling Initialization Routines. */ + + /* If defined, a C string constant for the assembler operation to identify the + following data as initialization code. If not defined, GNU CC will assume + such a section does not exist. When you are using special sections for + initialization and termination functions, this macro also controls how + `crtstuff.c' and `libgcc2.c' arrange to run the initialization functions. + + Defined in svr4.h. */ + #undef INIT_SECTION_ASM_OP + + /* If defined, `main' will call `__main' despite the presence of + `INIT_SECTION_ASM_OP'. This macro should be defined for systems where the + init section is not actually run automatically, but is still useful for + collecting the lists of constructors and destructors. */ + #define INVOKE__main + + /* Output appropriate code tp call a static constructor. */ + #undef ASM_OUTPUT_CONSTRUCTOR + #define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \ + do { \ + ctors_section (); \ + fprintf (STREAM, "\t.picptr\t"); \ + assemble_name (STREAM, NAME); \ + fprintf (STREAM, "\n"); \ + } while (0) + + /* Output appropriate code tp call a static destructor. */ + #undef ASM_OUTPUT_DESTRUCTOR + #define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \ + do { \ + dtors_section (); \ + fprintf (STREAM, "\t.picptr\t"); \ + assemble_name (STREAM, NAME); \ + fprintf (STREAM, "\n"); \ + } while (0) + + + /* Output of Assembler Instructions. */ + + /* A C initializer containing the assembler's names for the machine registers, + each one as a C string constant. This is what translates register numbers + in the compiler into assembler language. */ + #define REGISTER_NAMES \ + { \ + "gr0", "sp", "fp", "gr3", "gr4", "gr5", "gr6", "gr7", \ + "gr8", "gr9", "gr10", "gr11", "gr12", "gr13", "gr14", "gr15", \ + "gr16", "gr17", "gr18", "gr19", "gr20", "gr21", "gr22", "gr23", \ + "gr24", "gr25", "gr26", "gr27", "gr28", "gr29", "gr30", "gr31", \ + "gr32", "gr33", "gr34", "gr35", "gr36", "gr37", "gr38", "gr39", \ + "gr40", "gr41", "gr42", "gr43", "gr44", "gr45", "gr46", "gr47", \ + "gr48", "gr49", "gr50", "gr51", "gr52", "gr53", "gr54", "gr55", \ + "gr56", "gr57", "gr58", "gr59", "gr60", "gr61", "gr62", "gr63", \ + \ + "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", \ + "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15", \ + "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", \ + "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31", \ + "fr32", "fr33", "fr34", "fr35", "fr36", "fr37", "fr38", "fr39", \ + "fr40", "fr41", "fr42", "fr43", "fr44", "fr45", "fr46", "fr47", \ + "fr48", "fr49", "fr50", "fr51", "fr52", "fr53", "fr54", "fr55", \ + "fr56", "fr57", "fr58", "fr59", "fr60", "fr61", "fr62", "fr63", \ + \ + "fcc0", "fcc1", "fcc2", "fcc3", "icc0", "icc1", "icc2", "icc3", \ + "cc0", "cc1", "cc2", "cc3", "cc4", "cc5", "cc6", "cc7", \ + "acc0", "acc1", "acc2", "acc3", "acc4", "acc5", "acc6", "acc7", \ + "accg0","accg1","accg2","accg3","accg4","accg5","accg6","accg7", \ + "ap", "lr", "lcr" \ + } + + /* Define this macro if you are using an unusual assembler that + requires different names for the machine instructions. + + The definition is a C statement or statements which output an + assembler instruction opcode to the stdio stream STREAM. The + macro-operand PTR is a variable of type `char *' which points to + the opcode name in its "internal" form--the form that is written + in the machine description. The definition should output the + opcode name to STREAM, performing any translation you desire, and + increment the variable PTR to point at the end of the opcode so + that it will not be output twice. + + In fact, your macro definition may process less than the entire + opcode name, or more than the opcode name; but if you want to + process text that includes `%'-sequences to substitute operands, + you must take care of the substitution yourself. Just be sure to + increment PTR over whatever text should not be output normally. + + If you need to look at the operand values, they can be found as the + elements of `recog_operand'. + + If the macro definition does nothing, the instruction is output in + the usual way. */ + + #define ASM_OUTPUT_OPCODE(STREAM, PTR)\ + (PTR) = frv_asm_output_opcode (STREAM, PTR) + + /* If defined, a C statement to be executed just prior to the output + of assembler code for INSN, to modify the extracted operands so + they will be output differently. + + Here the argument OPVEC is the vector containing the operands + extracted from INSN, and NOPERANDS is the number of elements of + the vector which contain meaningful data for this insn. The + contents of this vector are what will be used to convert the insn + template into assembler code, so you can change the assembler + output by changing the contents of the vector. + + This macro is useful when various assembler syntaxes share a single + file of instruction patterns; by defining this macro differently, + you can cause a large class of instructions to be output + differently (such as with rearranged operands). Naturally, + variations in assembler syntax affecting individual insn patterns + ought to be handled by writing conditional output routines in + those patterns. + + If this macro is not defined, it is equivalent to a null statement. */ + + #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\ + frv_final_prescan_insn (INSN, OPVEC, NOPERANDS) + + + /* A C compound statement to output to stdio stream STREAM the assembler syntax + for an instruction operand X. X is an RTL expression. + + CODE is a value that can be used to specify one of several ways of printing + the operand. It is used when identical operands must be printed differently + depending on the context. CODE comes from the `%' specification that was + used to request printing of the operand. If the specification was just + `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is + the ASCII code for LTR. + + If X is a register, this macro should print the register's name. The names + can be found in an array `reg_names' whose type is `char *[]'. `reg_names' + is initialized from `REGISTER_NAMES'. + + When the machine description has a specification `%PUNCT' (a `%' followed by + a punctuation character), this macro is called with a null pointer for X and + the punctuation character for CODE. */ + #define PRINT_OPERAND(STREAM, X, CODE) frv_print_operand (STREAM, X, CODE) + + /* A C expression which evaluates to true if CODE is a valid punctuation + character for use in the `PRINT_OPERAND' macro. If + `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation + characters (except for the standard one, `%') are used in this way. */ + /* . == gr0 + # == hint operand -- always zero for now + @ == small data base register (gr16) + ~ == pic register (gr17) + * == temporary integer CCR register (cr3) + & == temporary integer ICC register (icc3) */ + #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ + ((CODE) == '.' || (CODE) == '#' || (CODE) == SDATA_FLAG_CHAR || (CODE) == '~' \ + || (CODE) == '*' || (CODE) == '&') + + /* A C compound statement to output to stdio stream STREAM the assembler syntax + for an instruction operand that is a memory reference whose address is X. X + is an RTL expression. + + On some machines, the syntax for a symbolic address depends on the section + that the address refers to. On these machines, define the macro + `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and + then check for it here. + + This declaration must be present. */ + #define PRINT_OPERAND_ADDRESS(STREAM, X) frv_print_operand_address (STREAM, X) + + /* If defined, C string expressions to be used for the `%R', `%L', `%U', and + `%I' options of `asm_fprintf' (see `final.c'). These are useful when a + single `md' file must support multiple assembler formats. In that case, the + various `tm.h' files can define these macros differently. + + USER_LABEL_PREFIX is defined in svr4.h. */ + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + #define REGISTER_PREFIX "" + #define LOCAL_LABEL_PREFIX "." + #define IMMEDIATE_PREFIX "#" + + + /* Output of dispatch tables. */ + + /* This macro should be provided on machines where the addresses in a dispatch + table are relative to the table's own address. + + The definition should be a C statement to output to the stdio stream STREAM + an assembler pseudo-instruction to generate a difference between two labels. + VALUE and REL are the numbers of two internal labels. The definitions of + these labels are output using `ASM_OUTPUT_INTERNAL_LABEL', and they must be + printed in the same way here. For example, + + fprintf (STREAM, "\t.word L%d-L%d\n", VALUE, REL) */ + #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ + fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL) + + /* This macro should be provided on machines where the addresses in a dispatch + table are absolute. + + The definition should be a C statement to output to the stdio stream STREAM + an assembler pseudo-instruction to generate a reference to a label. VALUE + is the number of an internal label whose definition is output using + `ASM_OUTPUT_INTERNAL_LABEL'. For example, + + fprintf (STREAM, "\t.word L%d\n", VALUE) */ + #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ + fprintf (STREAM, "\t.word .L%d\n", VALUE) + + /* Define this if the label before a jump-table needs to be output specially. + The first three arguments are the same as for `ASM_OUTPUT_INTERNAL_LABEL'; + the fourth argument is the jump-table which follows (a `jump_insn' + containing an `addr_vec' or `addr_diff_vec'). + + This feature is used on system V to output a `swbeg' statement for the + table. + + If this macro is not defined, these labels are output with + `ASM_OUTPUT_INTERNAL_LABEL'. + + Defined in svr4.h. */ + /* When generating embedded PIC or mips16 code we want to put the jump + table in the .text section. In all other cases, we want to put the + jump table in the .rdata section. Unfortunately, we can't use + JUMP_TABLES_IN_TEXT_SECTION, because it is not conditional. + Instead, we use ASM_OUTPUT_CASE_LABEL to switch back to the .text + section if appropriate. */ + + #undef ASM_OUTPUT_CASE_LABEL + #define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) \ + do { \ + if (flag_pic) \ + function_section (current_function_decl); \ + ASM_OUTPUT_INTERNAL_LABEL (STREAM, PREFIX, NUM); \ + } while (0) + + /* Define this to determine whether case statement labels are relative to + the start of the case statement or not. */ + + #define CASE_VECTOR_PC_RELATIVE (flag_pic) + + + /* Assembler Commands for Exception Regions. */ + + /* Define this macro to 0 if your target supports DWARF 2 frame unwind + information, but it does not yet work with exception handling. Otherwise, + if your target supports this information (if it defines + `INCOMING_RETURN_ADDR_RTX' and either `UNALIGNED_INT_ASM_OP' or + `OBJECT_FORMAT_ELF'), GCC will provide a default definition of 1. + + If this macro is defined to 1, the DWARF 2 unwinder will be the default + exception handling mechanism; otherwise, setjmp/longjmp will be used by + default. + + If this macro is defined to anything, the DWARF 2 unwinder will be used + instead of inline unwinders and __unwind_function in the non-setjmp case. */ + #define DWARF2_UNWIND_INFO 1 + + #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LR_REGNO) + + /* Assembler Commands for Alignment. */ + + /* A C statement to output to the stdio stream STREAM an assembler instruction + to advance the location counter by NBYTES bytes. Those bytes should be zero + when loaded. NBYTES will be a C expression of type `int'. + + Defined in svr4.h. */ + #undef ASM_OUTPUT_SKIP + #define ASM_OUTPUT_SKIP(STREAM, NBYTES) \ + fprintf (STREAM, "\t.zero\t%u\n", (NBYTES)) + + /* A C statement to output to the stdio stream STREAM an assembler command to + advance the location counter to a multiple of 2 to the POWER bytes. POWER + will be a C expression of type `int'. */ + #define ASM_OUTPUT_ALIGN(STREAM, POWER) \ + fprintf ((STREAM), "\t.p2align %d\n", (POWER)) + + + /* Macros Affecting all Debug Formats. */ + + /* A C expression that returns the DBX register number for the compiler + register number REGNO. In simple cases, the value of this expression may be + REGNO itself. But sometimes there are some registers that the compiler + knows about and DBX does not, or vice versa. In such cases, some register + may need to have one number in the compiler and another for DBX. + + If two registers have consecutive numbers inside GNU CC, and they can be + used as a pair to hold a multiword value, then they *must* have consecutive + numbers after renumbering with `DBX_REGISTER_NUMBER'. Otherwise, debuggers + will be unable to access such a pair, because they expect register pairs to + be consecutive in their own numbering scheme. + + If you find yourself defining `DBX_REGISTER_NUMBER' in way that does not + preserve register pairs, then what you must do instead is redefine the + actual register numbering scheme. + + This declaration is required. */ + #define DBX_REGISTER_NUMBER(REGNO) (REGNO) + + /* A C expression that returns the type of debugging output GNU CC produces + when the user specifies `-g' or `-ggdb'. Define this if you have arranged + for GNU CC to support more than one format of debugging output. Currently, + the allowable values are `DBX_DEBUG', `SDB_DEBUG', `DWARF_DEBUG', + `DWARF2_DEBUG', and `XCOFF_DEBUG'. + + The value of this macro only affects the default debugging output; the user + can always get a specific type of output by using `-gstabs', `-gcoff', + `-gdwarf-1', `-gdwarf-2', or `-gxcoff'. + + Defined in svr4.h. */ + #undef PREFERRED_DEBUGGING_TYPE + #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG + + /* Miscellaneous Parameters. */ + + /* Define this if you have defined special-purpose predicates in the file + `MACHINE.c'. This macro is called within an initializer of an array of + structures. The first field in the structure is the name of a predicate and + the second field is an array of rtl codes. For each predicate, list all rtl + codes that can be in expressions matched by the predicate. The list should + have a trailing comma. Here is an example of two entries in the list for a + typical RISC machine: + + #define PREDICATE_CODES \ + {"gen_reg_rtx_operand", {SUBREG, REG}}, \ + {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}}, + + Defining this macro does not affect the generated code (however, incorrect + definitions that omit an rtl code that may be matched by the predicate can + cause the compiler to malfunction). Instead, it allows the table built by + `genrecog' to be more compact and efficient, thus speeding up the compiler. + The most important predicates to include in the list specified by this macro + are thoses used in the most insn patterns. */ + #define PREDICATE_CODES \ + { "integer_register_operand", { REG, SUBREG }}, \ + { "frv_load_operand", { REG, SUBREG, MEM }}, \ + { "gpr_no_subreg_operand", { REG }}, \ + { "gpr_or_fpr_operand", { REG, SUBREG }}, \ + { "gpr_or_int12_operand", { REG, SUBREG, CONST_INT }}, \ + { "gpr_fpr_or_int12_operand", { REG, SUBREG, CONST_INT }}, \ + { "gpr_or_int10_operand", { REG, SUBREG, CONST_INT }}, \ + { "gpr_or_int_operand", { REG, SUBREG, CONST_INT }}, \ + { "move_source_operand", { REG, SUBREG, CONST_INT, MEM, \ + CONST_DOUBLE, CONST, \ + SYMBOL_REF, LABEL_REF }}, \ + { "move_destination_operand", { REG, SUBREG, MEM }}, \ + { "condexec_source_operand", { REG, SUBREG, CONST_INT, MEM, \ + CONST_DOUBLE }}, \ + { "condexec_dest_operand", { REG, SUBREG, MEM }}, \ + { "reg_or_0_operand", { REG, SUBREG, CONST_INT }}, \ + { "lr_operand", { REG }}, \ + { "gpr_or_memory_operand", { REG, SUBREG, MEM }}, \ + { "fpr_or_memory_operand", { REG, SUBREG, MEM }}, \ + { "int12_operand", { CONST_INT }}, \ + { "int_2word_operand", { CONST_INT, CONST_DOUBLE, \ + SYMBOL_REF, LABEL_REF, CONST }}, \ + { "pic_register_operand", { REG }}, \ + { "pic_symbolic_operand", { SYMBOL_REF, LABEL_REF, CONST }}, \ + { "small_data_register_operand", { REG }}, \ + { "small_data_symbolic_operand", { SYMBOL_REF, CONST }}, \ + { "icc_operand", { REG }}, \ + { "fcc_operand", { REG }}, \ + { "cc_operand", { REG }}, \ + { "icr_operand", { REG }}, \ + { "fcr_operand", { REG }}, \ + { "cr_operand", { REG }}, \ + { "fpr_operand", { REG, SUBREG }}, \ + { "even_reg_operand", { REG, SUBREG }}, \ + { "odd_reg_operand", { REG, SUBREG }}, \ + { "even_gpr_operand", { REG, SUBREG }}, \ + { "odd_gpr_operand", { REG, SUBREG }}, \ + { "quad_fpr_operand", { REG, SUBREG }}, \ + { "even_fpr_operand", { REG, SUBREG }}, \ + { "odd_fpr_operand", { REG, SUBREG }}, \ + { "dbl_memory_one_insn_operand", { MEM }}, \ + { "dbl_memory_two_insn_operand", { MEM }}, \ + { "call_operand", { REG, SUBREG, PLUS, CONST_INT, \ + SYMBOL_REF, LABEL_REF, CONST }}, \ + { "upper_int16_operand", { CONST_INT }}, \ + { "uint16_operand", { CONST_INT }}, \ + { "relational_operator", { EQ, NE, LE, LT, GE, GT, \ + LEU, LTU, GEU, GTU }}, \ + { "signed_relational_operator", { EQ, NE, LE, LT, GE, GT }}, \ + { "unsigned_relational_operator", { LEU, LTU, GEU, GTU }}, \ + { "float_relational_operator", { EQ, NE, LE, LT, GE, GT }}, \ + { "ccr_eqne_operator", { EQ, NE }}, \ + { "minmax_operator", { SMIN, SMAX, UMIN, UMAX }}, \ + { "condexec_si_binary_operator", { PLUS, MINUS, AND, IOR, XOR, \ + ASHIFT, ASHIFTRT, LSHIFTRT }}, \ + { "condexec_si_divide_operator", { DIV, UDIV }}, \ + { "condexec_si_unary_operator", { NOT, NEG }}, \ + { "condexec_sf_binary_operator", { PLUS, MINUS, MULT, DIV }}, \ + { "condexec_sf_unary_operator", { ABS, NEG, SQRT }}, \ + { "intop_compare_operator", { PLUS, MINUS, AND, IOR, XOR, \ + ASHIFT, ASHIFTRT, LSHIFTRT }}, \ + { "condexec_intop_cmp_operator", { PLUS, MINUS, AND, IOR, XOR, \ + ASHIFT, ASHIFTRT, LSHIFTRT }}, \ + { "fpr_or_int6_operand", { REG, SUBREG, CONST_INT }}, \ + { "int6_operand", { CONST_INT }}, \ + { "int5_operand", { CONST_INT }}, \ + { "uint5_operand", { CONST_INT }}, \ + { "uint4_operand", { CONST_INT }}, \ + { "uint1_operand", { CONST_INT }}, \ + { "acc_operand", { REG, SUBREG }}, \ + { "even_acc_operand", { REG, SUBREG }}, \ + { "quad_acc_operand", { REG, SUBREG }}, \ + { "accg_operand", { REG, SUBREG }}, + + /* An alias for a machine mode name. This is the machine mode that elements of + a jump-table should have. */ + #define CASE_VECTOR_MODE SImode + + /* Define this macro if operations between registers with integral mode smaller + than a word are always performed on the entire register. Most RISC machines + have this property and most CISC machines do not. */ + #define WORD_REGISTER_OPERATIONS + + /* Define this macro to be a C expression indicating when insns that read + memory in MODE, an integral mode narrower than a word, set the bits outside + of MODE to be either the sign-extension or the zero-extension of the data + read. Return `SIGN_EXTEND' for values of MODE for which the insn + sign-extends, `ZERO_EXTEND' for which it zero-extends, and `NIL' for other + modes. + + This macro is not called with MODE non-integral or with a width greater than + or equal to `BITS_PER_WORD', so you may return any value in this case. Do + not define this macro if it would always return `NIL'. On machines where + this macro is defined, you will normally define it as the constant + `SIGN_EXTEND' or `ZERO_EXTEND'. */ + #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND + + /* Define if loading short immediate values into registers sign extends. */ + #define SHORT_IMMEDIATES_SIGN_EXTEND + + /* The maximum number of bytes that a single instruction can move quickly from + memory to memory. */ + #define MOVE_MAX 8 + + /* A C expression which is nonzero if on this machine it is safe to "convert" + an integer of INPREC bits to one of OUTPREC bits (where OUTPREC is smaller + than INPREC) by merely operating on it as if it had only OUTPREC bits. + + On many machines, this expression can be 1. + + When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for modes for + which `MODES_TIEABLE_P' is 0, suboptimal code can result. If this is the + case, making `TRULY_NOOP_TRUNCATION' return 0 in such cases may improve + things. */ + #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 + + /* An alias for the machine mode for pointers. On most machines, define this + to be the integer mode corresponding to the width of a hardware pointer; + `SImode' on 32-bit machine or `DImode' on 64-bit machines. On some machines + you must define this to be one of the partial integer modes, such as + `PSImode'. + + The width of `Pmode' must be at least as large as the value of + `POINTER_SIZE'. If it is not equal, you must define the macro + `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to `Pmode'. */ + #define Pmode SImode + + /* An alias for the machine mode used for memory references to functions being + called, in `call' RTL expressions. On most machines this should be + `QImode'. */ + #define FUNCTION_MODE QImode + + /* Define this macro to handle System V style pragmas: #pragma pack and + #pragma weak. Note, #pragma weak will only be supported if SUPPORT_WEAK is + defined. + + Defined in svr4.h. */ + #define HANDLE_SYSV_PRAGMA 1 + + /* A C expression for the maximum number of instructions to execute via + conditional execution instructions instead of a branch. A value of + BRANCH_COST+1 is the default if the machine does not use + cc0, and 1 if it does use cc0. */ + #define MAX_CONDITIONAL_EXECUTE frv_condexec_insns + + /* Default value of MAX_CONDITIONAL_EXECUTE if no -mcond-exec-insns= */ + #define DEFAULT_CONDEXEC_INSNS 8 + + /* A C expression to modify the code described by the conditional if + information CE_INFO, possibly updating the tests in TRUE_EXPR, and + FALSE_EXPR for converting if-then and if-then-else code to conditional + instructions. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if the + tests cannot be converted. */ + #define IFCVT_MODIFY_TESTS(CE_INFO, TRUE_EXPR, FALSE_EXPR) \ + frv_ifcvt_modify_tests (CE_INFO, &TRUE_EXPR, &FALSE_EXPR) + + /* A C expression to modify the code described by the conditional if + information CE_INFO, for the basic block BB, possibly updating the tests in + TRUE_EXPR, and FALSE_EXPR for converting the && and || parts of if-then or + if-then-else code to conditional instructions. OLD_TRUE and OLD_FALSE are + the previous tests. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if + the tests cannot be converted. */ + #define IFCVT_MODIFY_MULTIPLE_TESTS(CE_INFO, BB, TRUE_EXPR, FALSE_EXPR) \ + frv_ifcvt_modify_multiple_tests (CE_INFO, BB, &TRUE_EXPR, &FALSE_EXPR) + + /* A C expression to modify the code described by the conditional if + information CE_INFO with the new PATTERN in INSN. If PATTERN is a null + pointer after the IFCVT_MODIFY_INSN macro executes, it is assumed that that + insn cannot be converted to be executed conditionally. */ + #define IFCVT_MODIFY_INSN(CE_INFO, PATTERN, INSN) \ + (PATTERN) = frv_ifcvt_modify_insn (CE_INFO, PATTERN, INSN) + + /* A C expression to perform any final machine dependent modifications in + converting code to conditional execution in the code described by the + conditional if information CE_INFO. */ + #define IFCVT_MODIFY_FINAL(CE_INFO) frv_ifcvt_modify_final (CE_INFO) + + /* A C expression to cancel any machine dependent modifications in converting + code to conditional execution in the code described by the conditional if + information CE_INFO. */ + #define IFCVT_MODIFY_CANCEL(CE_INFO) frv_ifcvt_modify_cancel (CE_INFO) + + /* Initialize the extra fields provided by IFCVT_EXTRA_FIELDS. */ + #define IFCVT_INIT_EXTRA_FIELDS(CE_INFO) frv_ifcvt_init_extra_fields (CE_INFO) + + /* Indicate how many instructions can be issued at the same time. */ + #define ISSUE_RATE \ + (! TARGET_PACK ? 1 \ + : (frv_cpu_type == FRV_CPU_GENERIC \ + || frv_cpu_type == FRV_CPU_FR500 \ + || frv_cpu_type == FRV_CPU_TOMCAT) ? 4 \ + : frv_cpu_type == FRV_CPU_FR400 ? 2 : 1) + + /* Set and clear whether this insn begins a VLIW insn. */ + #define CLEAR_VLIW_START(INSN) PUT_MODE (INSN, VOIDmode) + #define SET_VLIW_START(INSN) PUT_MODE (INSN, TImode) + + /* The definition of the following macro results in that the 2nd jump + optimization (after the 2nd insn scheduling) is minimal. It is + necessary to define when start cycle marks of insns (TImode is used + for this) is used for VLIW insn packing. Some jump optimizations + make such marks invalid. These marks are corrected for some + (minimal) optimizations. ??? Probably the macro is temporary. + Final solution could making the 2nd jump optimizations before the + 2nd instruction scheduling or corrections of the marks for all jump + optimizations. Although some jump optimizations are actually + deoptimizations for VLIW (super-scalar) processors. */ + + #define MINIMAL_SECOND_JUMP_OPTIMIZATION + + /* Return true if parallel operations are expected to be emitted via the + packing flag. */ + #define PACKING_FLAG_USED_P() \ + (optimize && flag_schedule_insns_after_reload && ISSUE_RATE > 1) + + /* If the following macro is defined and nonzero and deterministic + finite state automata are used for pipeline hazard recognition, the + code making resource-constrained software pipelining is on. */ + #define RCSP_SOFTWARE_PIPELINING 1 + + /* If the following macro is defined and nonzero and deterministic + finite state automata are used for pipeline hazard recognition, we + will try to exchange insns in queue ready to improve the schedule. + The more macro value, the more tries will be made. */ + #define FIRST_CYCLE_MULTIPASS_SCHEDULING 1 + + /* The following macro is used only when value of + FIRST_CYCLE_MULTIPASS_SCHEDULING is nonzero. The more macro value, + the more tries will be made to choose better schedule. If the + macro value is zero or negative there will be no multi-pass + scheduling. */ + #define FIRST_CYCLE_MULTIPASS_SCHEDULING_LOOKAHEAD frv_sched_lookahead + + /* Return true if a function is ok to be called as a sibcall. */ + #define FUNCTION_OK_FOR_SIBCALL(DECL) 0 + + enum frv_builtins + { + FRV_BUILTIN_MAND, + FRV_BUILTIN_MOR, + FRV_BUILTIN_MXOR, + FRV_BUILTIN_MNOT, + FRV_BUILTIN_MAVEH, + FRV_BUILTIN_MSATHS, + FRV_BUILTIN_MSATHU, + FRV_BUILTIN_MADDHSS, + FRV_BUILTIN_MADDHUS, + FRV_BUILTIN_MSUBHSS, + FRV_BUILTIN_MSUBHUS, + FRV_BUILTIN_MPACKH, + FRV_BUILTIN_MQADDHSS, + FRV_BUILTIN_MQADDHUS, + FRV_BUILTIN_MQSUBHSS, + FRV_BUILTIN_MQSUBHUS, + FRV_BUILTIN_MUNPACKH, + FRV_BUILTIN_MDPACKH, + FRV_BUILTIN_MBTOH, + FRV_BUILTIN_MHTOB, + FRV_BUILTIN_MCOP1, + FRV_BUILTIN_MCOP2, + FRV_BUILTIN_MROTLI, + FRV_BUILTIN_MROTRI, + FRV_BUILTIN_MWCUT, + FRV_BUILTIN_MSLLHI, + FRV_BUILTIN_MSRLHI, + FRV_BUILTIN_MSRAHI, + FRV_BUILTIN_MEXPDHW, + FRV_BUILTIN_MEXPDHD, + FRV_BUILTIN_MMULHS, + FRV_BUILTIN_MMULHU, + FRV_BUILTIN_MMULXHS, + FRV_BUILTIN_MMULXHU, + FRV_BUILTIN_MMACHS, + FRV_BUILTIN_MMACHU, + FRV_BUILTIN_MMRDHS, + FRV_BUILTIN_MMRDHU, + FRV_BUILTIN_MQMULHS, + FRV_BUILTIN_MQMULHU, + FRV_BUILTIN_MQMULXHU, + FRV_BUILTIN_MQMULXHS, + FRV_BUILTIN_MQMACHS, + FRV_BUILTIN_MQMACHU, + FRV_BUILTIN_MCPXRS, + FRV_BUILTIN_MCPXRU, + FRV_BUILTIN_MCPXIS, + FRV_BUILTIN_MCPXIU, + FRV_BUILTIN_MQCPXRS, + FRV_BUILTIN_MQCPXRU, + FRV_BUILTIN_MQCPXIS, + FRV_BUILTIN_MQCPXIU, + FRV_BUILTIN_MCUT, + FRV_BUILTIN_MCUTSS, + FRV_BUILTIN_MWTACC, + FRV_BUILTIN_MWTACCG, + FRV_BUILTIN_MRDACC, + FRV_BUILTIN_MRDACCG, + FRV_BUILTIN_MTRAP, + FRV_BUILTIN_MCLRACC, + FRV_BUILTIN_MCLRACCA, + FRV_BUILTIN_MDUNPACKH, + FRV_BUILTIN_MBTOHE, + FRV_BUILTIN_MQXMACHS, + FRV_BUILTIN_MQXMACXHS, + FRV_BUILTIN_MQMACXHS, + FRV_BUILTIN_MADDACCS, + FRV_BUILTIN_MSUBACCS, + FRV_BUILTIN_MASACCS, + FRV_BUILTIN_MDADDACCS, + FRV_BUILTIN_MDSUBACCS, + FRV_BUILTIN_MDASACCS, + FRV_BUILTIN_MABSHS, + FRV_BUILTIN_MDROTLI, + FRV_BUILTIN_MCPLHI, + FRV_BUILTIN_MCPLI, + FRV_BUILTIN_MDCUTSSI, + FRV_BUILTIN_MQSATHS, + FRV_BUILTIN_MHSETLOS, + FRV_BUILTIN_MHSETLOH, + FRV_BUILTIN_MHSETHIS, + FRV_BUILTIN_MHSETHIH, + FRV_BUILTIN_MHDSETS, + FRV_BUILTIN_MHDSETH + }; + + /* Enable prototypes on the call rtl functions. */ + #define MD_CALL_PROTOTYPES 1 + + extern GTY(()) rtx frv_compare_op0; /* operand save for */ + extern GTY(()) rtx frv_compare_op1; /* comparison generation */ + + #endif /* __FRV_H__ */ diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frv.md gcc-3.3/gcc/config/frv/frv.md *** gcc-3.2.3/gcc/config/frv/frv.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frv.md 2002-09-28 15:29:38.000000000 +0000 *************** *** 0 **** --- 1,7441 ---- + ;; Frv Machine Description + ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + ;; Contributed by Red Hat, Inc. + + ;; This file is part of GNU CC. + + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Unspec's used + ;; :: + ;; :::::::::::::::::::: + + (define_constants + [(UNSPEC_BLOCKAGE 0) + (UNSPEC_CC_TO_GPR 1) + (UNSPEC_GPR_TO_CC 2) + (UNSPEC_PIC_PROLOGUE 3) + (UNSPEC_CR_LOGIC 4) + (UNSPEC_STACK_ADJUST 5) + (UNSPEC_EH_RETURN_EPILOGUE 6)]) + + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Constraints + ;; :: + ;; :::::::::::::::::::: + + ;; Standard Constraints + ;; + ;; `m' A memory operand is allowed, with any kind of address that the + ;; machine supports in general. + ;; + ;; `o' A memory operand is allowed, but only if the address is + ;; "offsettable". This means that adding a small integer (actually, the + ;; width in bytes of the operand, as determined by its machine mode) may be + ;; added to the address and the result is also a valid memory address. + ;; + ;; `V' A memory operand that is not offsettable. In other words, + ;; anything that would fit the `m' constraint but not the `o' constraint. + ;; + ;; `<' A memory operand with autodecrement addressing (either + ;; predecrement or postdecrement) is allowed. + ;; + ;; `>' A memory operand with autoincrement addressing (either + ;; preincrement or postincrement) is allowed. + ;; + ;; `r' A register operand is allowed provided that it is in a general + ;; register. + ;; + ;; `d', `a', `f', ... + ;; Other letters can be defined in machine-dependent fashion to stand for + ;; particular classes of registers. `d', `a' and `f' are defined on the + ;; 68000/68020 to stand for data, address and floating point registers. + ;; + ;; `i' An immediate integer operand (one with constant value) is allowed. + ;; This includes symbolic constants whose values will be known only at + ;; assembly time. + ;; + ;; `n' An immediate integer operand with a known numeric value is allowed. + ;; Many systems cannot support assembly-time constants for operands less + ;; than a word wide. Constraints for these operands should use `n' rather + ;; than `i'. + ;; + ;; 'I' First machine-dependent integer constant (6 bit signed ints). + ;; 'J' Second machine-dependent integer constant (10 bit signed ints). + ;; 'K' Third machine-dependent integer constant (-2048). + ;; 'L' Fourth machine-dependent integer constant (16 bit signed ints). + ;; 'M' Fifth machine-dependent integer constant (16 bit unsigned ints). + ;; 'N' Sixth machine-dependent integer constant (-2047..-1). + ;; 'O' Seventh machine-dependent integer constant (zero). + ;; 'P' Eighth machine-dependent integer constant (1..2047). + ;; + ;; Other letters in the range `I' through `P' may be defined in a + ;; machine-dependent fashion to permit immediate integer operands with + ;; explicit integer values in specified ranges. For example, on the 68000, + ;; `I' is defined to stand for the range of values 1 to 8. This is the + ;; range permitted as a shift count in the shift instructions. + ;; + ;; `E' An immediate floating operand (expression code `const_double') is + ;; allowed, but only if the target floating point format is the same as + ;; that of the host machine (on which the compiler is running). + ;; + ;; `F' An immediate floating operand (expression code `const_double') is + ;; allowed. + ;; + ;; 'G' First machine-dependent const_double. + ;; 'H' Second machine-dependent const_double. + ;; + ;; `s' An immediate integer operand whose value is not an explicit + ;; integer is allowed. + ;; + ;; This might appear strange; if an insn allows a constant operand with a + ;; value not known at compile time, it certainly must allow any known + ;; value. So why use `s' instead of `i'? Sometimes it allows better code + ;; to be generated. + ;; + ;; For example, on the 68000 in a fullword instruction it is possible to + ;; use an immediate operand; but if the immediate value is between -128 and + ;; 127, better code results from loading the value into a register and + ;; using the register. This is because the load into the register can be + ;; done with a `moveq' instruction. We arrange for this to happen by + ;; defining the letter `K' to mean "any integer outside the range -128 to + ;; 127", and then specifying `Ks' in the operand constraints. + ;; + ;; `g' Any register, memory or immediate integer operand is allowed, + ;; except for registers that are not general registers. + ;; + ;; `X' Any operand whatsoever is allowed, even if it does not satisfy + ;; `general_operand'. This is normally used in the constraint of a + ;; `match_scratch' when certain alternatives will not actually require a + ;; scratch register. + ;; + ;; `0' Match operand 0. + ;; `1' Match operand 1. + ;; `2' Match operand 2. + ;; `3' Match operand 3. + ;; `4' Match operand 4. + ;; `5' Match operand 5. + ;; `6' Match operand 6. + ;; `7' Match operand 7. + ;; `8' Match operand 8. + ;; `9' Match operand 9. + ;; + ;; An operand that matches the specified operand number is allowed. If a + ;; digit is used together with letters within the same alternative, the + ;; digit should come last. + ;; + ;; This is called a "matching constraint" and what it really means is that + ;; the assembler has only a single operand that fills two roles considered + ;; separate in the RTL insn. For example, an add insn has two input + ;; operands and one output operand in the RTL, but on most CISC machines an + ;; add instruction really has only two operands, one of them an + ;; input-output operand: + ;; + ;; addl #35,r12 + ;; + ;; Matching constraints are used in these circumstances. More precisely, + ;; the two operands that match must include one input-only operand and one + ;; output-only operand. Moreover, the digit must be a smaller number than + ;; the number of the operand that uses it in the constraint. + ;; + ;; For operands to match in a particular case usually means that they are + ;; identical-looking RTL expressions. But in a few special cases specific + ;; kinds of dissimilarity are allowed. For example, `*x' as an input + ;; operand will match `*x++' as an output operand. For proper results in + ;; such cases, the output template should always use the output-operand's + ;; number when printing the operand. + ;; + ;; `p' An operand that is a valid memory address is allowed. This is for + ;; "load address" and "push address" instructions. + ;; + ;; `p' in the constraint must be accompanied by `address_operand' as the + ;; predicate in the `match_operand'. This predicate interprets the mode + ;; specified in the `match_operand' as the mode of the memory reference for + ;; which the address would be valid. + ;; + ;; `Q` First non constant, non register machine-dependent insns + ;; `R` Second non constant, non register machine-dependent insns + ;; `S` Third non constant, non register machine-dependent insns + ;; `T` Fourth non constant, non register machine-dependent insns + ;; `U` Fifth non constant, non register machine-dependent insns + ;; + ;; Letters in the range `Q' through `U' may be defined in a + ;; machine-dependent fashion to stand for arbitrary operand types. The + ;; machine description macro `EXTRA_CONSTRAINT' is passed the operand as + ;; its first argument and the constraint letter as its second operand. + ;; + ;; A typical use for this would be to distinguish certain types of memory + ;; references that affect other insn operands. + ;; + ;; Do not define these constraint letters to accept register references + ;; (`reg'); the reload pass does not expect this and would not handle it + ;; properly. + + ;; Multiple Alternative Constraints + ;; `?' Disparage slightly the alternative that the `?' appears in, as a + ;; choice when no alternative applies exactly. The compiler regards this + ;; alternative as one unit more costly for each `?' that appears in it. + ;; + ;; `!' Disparage severely the alternative that the `!' appears in. This + ;; alternative can still be used if it fits without reloading, but if + ;; reloading is needed, some other alternative will be used. + + ;; Constraint modifiers + ;; `=' Means that this operand is write-only for this instruction: the + ;; previous value is discarded and replaced by output data. + ;; + ;; `+' Means that this operand is both read and written by the + ;; instruction. + ;; + ;; When the compiler fixes up the operands to satisfy the constraints, it + ;; needs to know which operands are inputs to the instruction and which are + ;; outputs from it. `=' identifies an output; `+' identifies an operand + ;; that is both input and output; all other operands are assumed to be + ;; input only. + ;; + ;; `&' Means (in a particular alternative) that this operand is written + ;; before the instruction is finished using the input operands. Therefore, + ;; this operand may not lie in a register that is used as an input operand + ;; or as part of any memory address. + ;; + ;; `&' applies only to the alternative in which it is written. In + ;; constraints with multiple alternatives, sometimes one alternative + ;; requires `&' while others do not. + ;; + ;; `&' does not obviate the need to write `='. + ;; + ;; `%' Declares the instruction to be commutative for this operand and the + ;; following operand. This means that the compiler may interchange the two + ;; operands if that is the cheapest way to make all operands fit the + ;; constraints. This is often used in patterns for addition instructions + ;; that really have only two operands: the result must go in one of the + ;; arguments. + ;; + ;; `#' Says that all following characters, up to the next comma, are to be + ;; ignored as a constraint. They are significant only for choosing + ;; register preferences. + ;; + ;; `*' Says that the following character should be ignored when choosing + ;; register preferences. `*' has no effect on the meaning of the + ;; constraint as a constraint, and no effect on reloading. + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Attributes + ;; :: + ;; :::::::::::::::::::: + + ;; The `define_attr' expression is used to define each attribute required by + ;; the target machine. It looks like: + ;; + ;; (define_attr NAME LIST-OF-VALUES DEFAULT) + + ;; NAME is a string specifying the name of the attribute being defined. + + ;; LIST-OF-VALUES is either a string that specifies a comma-separated list of + ;; values that can be assigned to the attribute, or a null string to indicate + ;; that the attribute takes numeric values. + + ;; DEFAULT is an attribute expression that gives the value of this attribute + ;; for insns that match patterns whose definition does not include an explicit + ;; value for this attribute. + + ;; For each defined attribute, a number of definitions are written to the + ;; `insn-attr.h' file. For cases where an explicit set of values is specified + ;; for an attribute, the following are defined: + + ;; * A `#define' is written for the symbol `HAVE_ATTR_NAME'. + ;; + ;; * An enumeral class is defined for `attr_NAME' with elements of the + ;; form `UPPER-NAME_UPPER-VALUE' where the attribute name and value are first + ;; converted to upper case. + ;; + ;; * A function `get_attr_NAME' is defined that is passed an insn and + ;; returns the attribute value for that insn. + + ;; For example, if the following is present in the `md' file: + ;; + ;; (define_attr "type" "branch,fp,load,store,arith" ...) + ;; + ;; the following lines will be written to the file `insn-attr.h'. + ;; + ;; #define HAVE_ATTR_type + ;; enum attr_type {TYPE_BRANCH, TYPE_FP, TYPE_LOAD, TYPE_STORE, TYPE_ARITH}; + ;; extern enum attr_type get_attr_type (); + + ;; If the attribute takes numeric values, no `enum' type will be defined and + ;; the function to obtain the attribute's value will return `int'. + + (define_attr "length" "" (const_int 4)) + + ;; Processor type -- this attribute must exactly match the processor_type + ;; enumeration in frv-protos.h. + + (define_attr "cpu" "generic,fr500,fr400,fr300,simple,tomcat" + (const (symbol_ref "frv_cpu_type"))) + + ;; Attribute is "yes" for branches and jumps that span too great a distance + ;; to be implemented in the most natural way. Such instructions will use + ;; a call instruction in some way. + + (define_attr "far_jump" "yes,no" (const_string "no")) + + ;; Instruction type + + ;; The table below summarises the types of media instruction and their + ;; scheduling classification. Headings are: + + ;; Type: the name of the define_attr type + ;; Conditions: "yes" if conditional variants are available + ;; FR500: Fujitsu's categorisation for the FR500 + ;; FR400: Fujitsu's categorisation for the FR400 (but see below). + + ;; On the FR400, media instructions are divided into 2 broad categories. + ;; Category 1 instructions can execute in either the M0 or M1 unit and can + ;; execute in parallel with other category 1 instructions. Category 2 + ;; instructions must use the M0 unit, and therefore cannot run in parallel + ;; with other media instructions. + + ;; The FR400 documentation also divides media instructions into one of seven + ;; categories (m1 to m7). m1 to m4 contain both Category 1 and Category 2 + ;; instructions, so we use a combination of the categories here. + + ;; Type Conditional FR500 FR400 + ;; ---- ---------- ----- ----- + ;; mlogic yes m1 m1:1 + ;; mrdacc no m2 m4:1 + ;; mwtacc no m3 m5:1 + ;; maveh no m1 m1:1 + ;; msath no m1 m1:1 + ;; maddh yes m1 m1:1 + ;; mqaddh yes m1 m1:2 + ;; mpackh no m2 m3:1 + ;; munpackh no m2 m3:2 + ;; mdpackh no m5 m3:2 + ;; mbhconv yes m2 m3:2 + ;; mrot no m2 m3:1 + ;; mshift no m2 m3:1 + ;; mexpdhw yes m2 m3:1 + ;; mexpdhd yes m2 m3:2 + ;; mwcut no m2 m3:2 + ;; mmulh yes m4 m2:1 + ;; mmulxh no m4 m2:1 + ;; mmach yes m4 m2:1 + ;; mmrdh no m4 m2:1 + ;; mqmulh yes m4 m2:2 + ;; mqmulxh no m4 m2:2 + ;; mqmach yes m4 m2:2 + ;; mcpx yes m4 m2:1 + ;; mqcpx yes m4 m2:2 + ;; mcut no m2 m4:1 + ;; mclracc no m3 m4:1 + ;; mclracca no m6 m4:2 + ;; mdunpackh no m2 n/a + ;; mbhconve no m2 n/a + ;; maddacc no n/a m2:1 + ;; mdaddacc no n/a m2:2 + ;; mabsh no n/a m1:1 + ;; mdrot no n/a m3:2 + ;; mcpl no n/a m3:2 + ;; mdcut no n/a m4:2 + ;; mqsath no n/a m1:2 + ;; mset no n/a m1:1 + + (define_attr "type" + "int,sethi,setlo,mul,div,gload,gstore,fload,fstore,movfg,movgf,branch,jump,jumpl,call,spr,trap,fsconv,fsadd,fsmul,fmas,fsdiv,sqrt_single,fdconv,fdadd,fdmul,fddiv,sqrt_double,mlogic,maveh,msath,maddh,mqaddh,mpackh,munpackh,mdpackh,mbhconv,mrot,mshift,mexpdhw,mexpdhd,mwcut,mmulh,mmulxh,mmach,mmrdh,mqmulh,mqmulxh,mqmach,mcpx,mqcpx,mcut,mclracc,mclracca,mdunpackh,mbhconve,mrdacc,mwtacc,maddacc,mdaddacc,mabsh,mdrot,mcpl,mdcut,mqsath,mset,m7,ccr,multi,unknown" + (const_string "unknown")) + + + + /* This is description of pipeline hazards based on DFA. The + following constructions can be used for this: + + o define_cpu_unit string [string]) describes a cpu functional unit + (separated by comma). + + 1st operand: Names of cpu function units. + 2nd operand: Name of automaton (see comments for + DEFINE_AUTOMATON). + + All define_reservations and define_cpu_units should have unique + names which can not be "nothing". + + o (exclusion_set string string) means that each CPU function unit + in the first string can not be reserved simultaneously with each + unit whose name is in the second string and vise versa. CPU + units in the string are separated by commas. For example, it is + useful for description CPU with fully pipelined floating point + functional unit which can execute simultaneously only single + floating point insns or only double floating point insns. + + o (presence_set string string) means that each CPU function unit in + the first string can not be reserved unless at least one of units + whose names are in the second string is reserved. This is an + asymmetric relation. CPU units in the string are separated by + commas. For example, it is useful for description that slot1 is + reserved after slot0 reservation for a VLIW processor. + + o (absence_set string string) means that each CPU function unit in + the first string can not be reserved only if each unit whose name + is in the second string is not reserved. This is an asymmetric + relation (actually exclusion set is analogous to this one but it + is symmetric). CPU units in the string are separated by commas. + For example, it is useful for description that slot0 can not be + reserved after slot1 or slot2 reservation for a VLIW processor. + + o (define_bypass number out_insn_names in_insn_names) names bypass with + given latency (the first number) from insns given by the first + string (see define_insn_reservation) into insns given by the + second string. Insn names in the strings are separated by + commas. + + o (define_automaton string) describes names of an automaton + generated and used for pipeline hazards recognition. The names + are separated by comma. Actually it is possibly to generate the + single automaton but unfortunately it can be very large. If we + use more one automata, the summary size of the automata usually + is less than the single one. The automaton name is used in + define_cpu_unit. All automata should have unique names. + + o (define_reservation string string) names reservation (the first + string) of cpu functional units (the 2nd string). Sometimes unit + reservations for different insns contain common parts. In such + case, you describe common part and use one its name (the 1st + parameter) in regular expression in define_insn_reservation. All + define_reservations, define results and define_cpu_units should + have unique names which can not be "nothing". + + o (define_insn_reservation name default_latency condition regexpr) + describes reservation of cpu functional units (the 3nd operand) + for instruction which is selected by the condition (the 2nd + parameter). The first parameter is used for output of debugging + information. The reservations are described by a regular + expression according the following syntax: + + regexp = regexp "," oneof + | oneof + + oneof = oneof "|" allof + | allof + + allof = allof "+" repeat + | repeat + + repeat = element "*" number + | element + + element = cpu_function_name + | reservation_name + | result_name + | "nothing" + | "(" regexp ")" + + 1. "," is used for describing start of the next cycle in + reservation. + + 2. "|" is used for describing the reservation described by the + first regular expression *or* the reservation described by + the second regular expression *or* etc. + + 3. "+" is used for describing the reservation described by the + first regular expression *and* the reservation described by + the second regular expression *and* etc. + + 4. "*" is used for convinience and simply means sequence in + which the regular expression are repeated NUMBER times with + cycle advancing (see ","). + + 5. cpu function unit name which means reservation. + + 6. reservation name -- see define_reservation. + + 7. string "nothing" means no units reservation. + + */ + + (define_automaton "nodiv, idiv, div") + + ;; An FR500 packet can contain a single control instruction or a sequence + ;; of up to four operations matching the regular expression: + + ;; (I FM? I? FM? | FM? FM?) B? B? + + ;; where I denotes an integer operation, FM a floating-point or media + ;; operation, and B a branch operation. There are two units for each type + ;; of instruction: I0 and I1, FM0 and FM1, and B0 and B1. Units are + ;; allocated left-to-right: the first integer instruction uses I0, the + ;; second uses I1, and so on. + + ;; The FR400 is similar to the FR500 except that it allows only 2 operations + ;; per packet and has only one branch unit. We can use the FR500 conflict + ;; description for the FR400, but need to define different cpu_units + ;; later. + + ;; Slot/unit combinations available on the FR400 and above: + (define_cpu_unit "sl0_i0, sl0_fm0, sl0_b0, sl0_c" "nodiv") + (define_cpu_unit "sl1_fm0, sl1_i1, sl1_fm1, sl1_b0" "nodiv") + + ;; These are available on the FR500 and above: + (define_cpu_unit "sl1_b1" "nodiv") + (define_cpu_unit "sl2_i1, sl2_fm1, sl2_b0, sl2_b1" "nodiv") + (define_cpu_unit "sl3_fm1, sl3_b0, sl3_b1" "nodiv") + + ;; The following describes conlicts by slots + ;; slot0 + (exclusion_set "sl0_i0" "sl0_fm0,sl0_b0,sl0_c") + (exclusion_set "sl0_fm0" "sl0_b0,sl0_c") + (exclusion_set "sl0_b0" "sl0_c") + + ;; slot1 + (exclusion_set "sl1_fm0" "sl1_i1,sl1_fm1,sl1_b0,sl1_b1") + (exclusion_set "sl1_i1" "sl1_fm1,sl1_b0,sl1_b1") + (exclusion_set "sl1_fm1" "sl1_b0,sl1_b1") + (exclusion_set "sl1_b0" "sl1_b1") + + ;; slot2 + (exclusion_set "sl2_i1" "sl2_fm1,sl2_b0,sl2_b1") + (exclusion_set "sl2_fm1" "sl2_b0,sl2_b1") + (exclusion_set "sl2_b0" "sl2_b1") + + ;; slot3 + (exclusion_set "sl3_fm1" "sl3_b0,sl3_b1") + (exclusion_set "sl3_b0" "sl3_b1") + + ;; The following describes conlicts by units + ;; fm0 + (exclusion_set "sl0_fm0" "sl1_fm0") + + ;; b0 + (exclusion_set "sl0_b0" "sl1_b0,sl2_b0,sl3_b0") + (exclusion_set "sl1_b0" "sl2_b0,sl3_b0") + (exclusion_set "sl2_b0" "sl3_b0") + + ;; i1 + (exclusion_set "sl1_i1" "sl2_i1") + + ;; fm1 + (exclusion_set "sl1_fm1" "sl2_fm1,sl3_fm1") + (exclusion_set "sl2_fm1" "sl3_fm1") + + ;; b1 + (exclusion_set "sl1_b1" "sl2_b1,sl3_b1") + (exclusion_set "sl2_b1" "sl3_b1") + + ;; The following describes remaining combinations of conflicts + ;; slot0 + (exclusion_set "sl0_i0" "sl1_fm1,sl1_b1") + (exclusion_set "sl0_fm0" "sl1_i1,sl1_b1,sl2_i1,sl2_fm1,sl3_fm1,sl3_b0") + (exclusion_set "sl0_b0" "sl1_fm0,sl1_i1,sl1_fm1,sl2_i1,sl2_fm1,sl2_b1,\ + sl3_fm1,sl3_b1") + (exclusion_set "sl0_c" "sl1_fm0,sl1_i1,sl1_fm1,sl1_b0,sl1_b1,sl2_i1,sl2_fm1,\ + sl2_b0,sl2_b1,sl3_fm1,sl3_b0,sl3_b1") + + + ;; slot1 + (exclusion_set "sl1_fm0" "sl2_b1") + (exclusion_set "sl1_i1" "sl2_fm1,sl2_b1,sl3_fm1,sl3_b0") + (exclusion_set "sl1_fm1" "sl2_i1,sl2_b1,sl3_b0") + (exclusion_set "sl1_b0" "sl2_i1,sl2_fm1,sl3_fm1,sl3_b1") + (exclusion_set "sl1_b1" "sl2_i1,sl2_fm1,sl2_b0,sl3_fm1,sl3_b0") + + ;; slot2 + (exclusion_set "sl2_i1" "sl3_b1") + (exclusion_set "sl2_fm1" "sl3_b1") + (exclusion_set "sl2_b0" "sl3_fm1") + (exclusion_set "sl2_b1" "sl3_fm1,sl3_b0") + + ;; slot3 + (exclusion_set "sl1_fm0" "sl2_i1,sl2_fm1,sl2_b0,sl2_b1,sl3_fm1,sl3_b0,sl3_b1") + (exclusion_set "sl3_fm1" "sl2_i1,sl2_fm1,sl2_b0,sl2_b1,sl3_b0,sl3_b1") + + ;; :::::::::::::::::::: + ;; :: + ;; :: Generic/FR500 scheduler description + ;; :: + ;; :::::::::::::::::::: + + ;; Define reservation in order to describe only in terms of units. + + (define_reservation "i0" "sl0_i0") + (define_reservation "f0" "sl0_fm0|sl1_fm0") + (define_reservation "m0" "f0") + (define_reservation "b0" "sl0_b0|sl1_b0|sl2_b0|sl3_b0") + (define_reservation "c" "sl0_c") + (define_reservation "i1" "sl1_i1|sl2_i1") + (define_reservation "f1" "sl1_fm1|sl2_fm1|sl3_fm1") + (define_reservation "m1" "f1") + (define_reservation "b1" "sl1_b1|sl2_b1|sl3_b1") + + ;; Integer insns + ;; It is not possibly to issue load & store in one VLIW insn. + (define_cpu_unit "idiv1" "idiv") + (define_cpu_unit "idiv2" "idiv") + (define_cpu_unit "l0" "nodiv") + (define_cpu_unit "l1" "nodiv") + (define_cpu_unit "s0" "nodiv") + + (exclusion_set "l1,l0" "s0") + + ;; We set the default_latency of sethi to be 0 to allow sethi and setlo to be + ;; combined in the same VLIW instruction as allowed by the architecture. This + ;; assumes the only use of sethi is always followed by a setlo of the same + ;; register. + (define_insn_reservation "i1_sethi" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "sethi")) + "i0|i1") + + (define_insn_reservation "i1_setlo" 1 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "setlo")) + "i0|i1") + + (define_insn_reservation "i1_int" 1 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "int")) + "i0|i1") + + (define_insn_reservation "i1_mul" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "mul")) + "i0|i1") + + (define_insn_reservation "i1_div" 19 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "div")) + "(i0|i1),(idiv1*18|idiv2*18)") + + (define_insn_reservation "i2_gload" 4 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "gload")) + "(i0|i1)+(l0|l1)") + + (define_insn_reservation "i2_fload" 4 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "fload")) + "(i0|i1)+(l0|l1)") + + (define_insn_reservation "i3_gstore" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "gstore")) + "i0+s0") + + (define_insn_reservation "i3_fstore" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "fstore")) + "i0+s0") + + (define_insn_reservation "i4_move_gf" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "movgf")) + "i0") + + (define_insn_reservation "i4_move_fg" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "movfg")) + "i0") + + (define_insn_reservation "i5" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "jumpl")) + "i0") + + ;; Clear/commit is not generated now: + (define_insn_reservation "i6" 0 (const_int 0) "i0|i1") + + ;; + ;; Branch-instructions + ;; + (define_insn_reservation "b1/b3" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "jump,branch,ccr")) + "b0|b1") + + ;; The following insn is not generated now. + + (define_insn_reservation "b2" 0 (const_int 0) "b0") + + (define_insn_reservation "b4" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "call")) + "b0") + + ;; The following insns are not generated now. + (define_insn_reservation "b5" 0 (const_int 0) "b0|b1") + (define_insn_reservation "b6" 0 (const_int 0) "b0|b1") + + ;; Control insns + (define_insn_reservation "trap" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "trap")) + "c") + + (define_insn_reservation "control" 0 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "spr")) + "c") + + ;; Floating point insns + (define_cpu_unit "add0" "nodiv") + (define_cpu_unit "add1" "nodiv") + (define_cpu_unit "mul0" "nodiv") + (define_cpu_unit "mul1" "nodiv") + (define_cpu_unit "div1" "div") + (define_cpu_unit "div2" "div") + (define_cpu_unit "root" "div") + + (define_bypass 4 "f1" "m1,m2,m3,m4,m5,m6,m7") + (define_insn_reservation "f1" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "fsconv,fdconv")) + "(f0|f1)") + + (define_bypass 4 "f2" "m1,m2,m3,m4,m5,m6,m7") + (define_insn_reservation "f2" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "fsadd,fdadd")) + "(f0|f1)+(add0|add1)") + + (define_bypass 4 "f3" "m1,m2,m3,m4,m5,m6,m7") + (define_insn_reservation "f3" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "fsmul,fdmul")) + "(f0|f1)+(mul0|mul1)") + + (define_bypass 11 "f4_div" "m1,m2,m3,m4,m5,m6,m7") + (define_insn_reservation "f4_div" 10 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "fsdiv,fddiv")) + "(f0|f1),(div1*9|div2*9)") + + (define_bypass 16 "f4_root" "m1,m2,m3,m4,m5,m6,m7") + (define_insn_reservation "f4_root" 15 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "sqrt_single,sqrt_double")) + "(f0|f1)+root*15") + + (define_bypass 4 "f5" "m1,m2,m3,m4,m5,m6,m7") + (define_insn_reservation "f5" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "fmas")) + "(f0|f1)+(add0|add1)+(mul0|mul1)") + + ;; The following insns are not generated by gcc now: + (define_insn_reservation "f6" 0 (const_int 0) "(f0|f1)+add0+add1") + (define_insn_reservation "f7" 0 (const_int 0) "(f0|f1)+mul0+mul1") + + ;; Media insns. Now they are all not generated now. + (define_cpu_unit "m1_0" "nodiv") + (define_cpu_unit "m1_1" "nodiv") + (define_cpu_unit "m2_0" "nodiv") + (define_cpu_unit "m2_1" "nodiv") + (define_cpu_unit "m3_0" "nodiv") + (define_cpu_unit "m3_1" "nodiv") + (define_cpu_unit "m4_0" "nodiv") + (define_cpu_unit "m4_1" "nodiv") + (define_cpu_unit "m5" "nodiv") + (define_cpu_unit "m6" "nodiv") + (define_cpu_unit "m7" "nodiv") + + (exclusion_set "m5,m6,m7" "m2_0,m2_1,m3_0,m3_1") + (exclusion_set "m5" "m6,m7") + (exclusion_set "m6" "m4_0,m4_1,m7") + (exclusion_set "m7" "m1_0,m1_1,add0,add1,mul0,mul1") + + (define_bypass 2 "m1" "m1,m2,m3,m4,m5,m6,m7") + (define_bypass 4 "m1" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") + (define_insn_reservation "m1" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "mlogic,maveh,msath,maddh,mqaddh")) + "(m0|m1)+(m1_0|m1_1)") + + (define_bypass 2 "m2" "m1,m2,m3,m4,m5,m6,m7") + (define_bypass 4 "m2" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") + (define_insn_reservation "m2" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "mrdacc,mpackh,munpackh,mbhconv,mrot,mshift,mexpdhw,mexpdhd,mwcut,mcut,mdunpackh,mbhconve")) + "(m0|m1)+(m2_0|m2_1)") + + (define_bypass 1 "m3" "m4") + (define_insn_reservation "m3" 2 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "mclracc,mwtacc")) + "(m0|m1)+(m3_0|m3_1)") + + (define_bypass 1 "m4" "m4") + (define_insn_reservation "m4" 2 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "mmulh,mmulxh,mmach,mmrdh,mqmulh,mqmulxh,mqmach,mcpx,mqcpx")) + "(m0|m1)+(m4_0|m4_1)") + + (define_bypass 2 "m5" "m1,m2,m3,m4,m5,m6,m7") + (define_bypass 4 "m5" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") + (define_insn_reservation "m5" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "mdpackh")) + "(m0|m1)+m5") + + (define_bypass 1 "m6" "m4") + (define_insn_reservation "m6" 2 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "mclracca")) + "(m0|m1)+m6") + + (define_bypass 2 "m7" "m1,m2,m3,m4,m5,m6,m7") + (define_bypass 4 "m7" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") + + (define_insn_reservation "m7" 3 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "m7")) + "(m0|m1)+m7") + + ;; Unknown & multi insns starts on new cycle and the next insn starts + ;; on new cycle. To describe this we consider as a control insn. + (define_insn_reservation "unknown" 1 + (and (eq_attr "cpu" "generic,fr500,tomcat") + (eq_attr "type" "unknown,multi")) + "c") + + ;; :::::::::::::::::::: + ;; :: + ;; :: FR400 scheduler description + ;; :: + ;; :::::::::::::::::::: + + ;; Category 2 media instructions use both media units, but can be packed + ;; with non-media instructions. Use fr400_m1unit to claim the M1 unit + ;; without claiming a slot. + + (define_cpu_unit "fr400_m1unit" "nodiv") + + (define_reservation "fr400_i0" "sl0_i0") + (define_reservation "fr400_i1" "sl1_i1") + (define_reservation "fr400_m0" "sl0_fm0|sl1_fm0") + (define_reservation "fr400_m1" "sl1_fm1") + (define_reservation "fr400_meither" "fr400_m0|(fr400_m1+fr400_m1unit)") + (define_reservation "fr400_mboth" "fr400_m0+fr400_m1unit") + (define_reservation "fr400_b" "sl0_b0|sl1_b0") + (define_reservation "fr400_c" "sl0_c") + + ;; Name Class Units Latency + ;; ==== ===== ===== ======= + ;; int I1 I0/I1 1 + ;; sethi I1 I0/I1 0 -- does not interfere with setlo + ;; setlo I1 I0/I1 1 + ;; mul I1 I0 3 (*) + ;; div I1 I0 20 (*) + ;; gload I2 I0 4 (*) + ;; fload I2 I0 4 -- only 3 if read by a media insn + ;; gstore I3 I0 0 -- provides no result + ;; fstore I3 I0 0 -- provides no result + ;; movfg I4 I0 3 (*) + ;; movgf I4 I0 3 (*) + ;; jumpl I5 I0 0 -- provides no result + ;; + ;; (*) The results of these instructions can be read one cycle earlier + ;; than indicated. The penalty given is for instructions with write-after- + ;; write dependencies. + + ;; The FR400 can only do loads and stores in I0, so we there's no danger + ;; of memory unit collision in the same packet. There's only one divide + ;; unit too. + + (define_insn_reservation "fr400_i1_int" 1 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "int")) + "fr400_i0|fr400_i1") + + (define_insn_reservation "fr400_i1_sethi" 0 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "sethi")) + "fr400_i0|fr400_i1") + + (define_insn_reservation "fr400_i1_setlo" 1 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "setlo")) + "fr400_i0|fr400_i1") + + (define_insn_reservation "fr400_i1_mul" 3 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mul")) + "fr400_i0") + + (define_insn_reservation "fr400_i1_div" 20 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "div")) + "fr400_i0+idiv1*19") + + (define_insn_reservation "fr400_i2_gload" 4 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "gload")) + "fr400_i0") + + (define_insn_reservation "fr400_i2_fload" 4 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "fload")) + "fr400_i0") + + (define_insn_reservation "fr400_i3_gstore" 0 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "gstore")) + "fr400_i0") + + (define_insn_reservation "fr400_i3_fstore" 0 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "fstore")) + "fr400_i0") + + (define_insn_reservation "fr400_i4_movfg" 3 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "movfg")) + "fr400_i0") + + (define_insn_reservation "fr400_i4_movgf" 3 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "movgf")) + "fr400_i0") + + (define_insn_reservation "fr400_i5_jumpl" 0 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "jumpl")) + "fr400_i0") + + ;; The bypass between FPR loads and media instructions, described above. + + (define_bypass 3 + "fr400_i2_fload" + "fr400_m1_1,fr400_m1_2,\ + fr400_m2_1,fr400_m2_2,\ + fr400_m3_1,fr400_m3_2,\ + fr400_m4_1,fr400_m4_2,\ + fr400_m5") + + ;; The branch instructions all use the B unit and produce no result. + + (define_insn_reservation "fr400_b" 0 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "jump,branch,ccr,call")) + "fr400_b") + + ;; Control instructions use the C unit, which excludes all the others. + + (define_insn_reservation "fr400_c" 0 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "spr,trap")) + "fr400_c") + + ;; Unknown instructions use the C unit, since it requires single-operation + ;; packets. + + (define_insn_reservation "fr400_unknown" 1 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "unknown,multi")) + "fr400_c") + + ;; FP->FP moves are marked as "fsconv" instructions in the define_insns + ;; below, but are implemented on the FR400 using "mlogic" instructions. + ;; It's easier to class "fsconv" as a "m1:1" instruction than provide + ;; separate define_insns for the FR400. + + ;; M1 instructions store their results in FPRs. Any instruction can read + ;; the result in the following cycle, so no penalty occurs. + + (define_insn_reservation "fr400_m1_1" 1 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "fsconv,mlogic,maveh,msath,maddh,mabsh,mset")) + "fr400_meither") + + (define_insn_reservation "fr400_m1_2" 1 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mqaddh,mqsath")) + "fr400_mboth") + + ;; M2 instructions store their results in accumulators, which are read + ;; by M2 or M4 media commands. M2 instructions can read the results in + ;; the following cycle, but M4 instructions must wait a cycle more. + + (define_bypass 1 + "fr400_m2_1,fr400_m2_2" + "fr400_m2_1,fr400_m2_2") + + (define_insn_reservation "fr400_m2_1" 2 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mmulh,mmulxh,mmach,mmrdh,mcpx,maddacc")) + "fr400_meither") + + (define_insn_reservation "fr400_m2_2" 2 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mqmulh,mqmulxh,mqmach,mqcpx,mdaddacc")) + "fr400_mboth") + + ;; For our purposes, there seems to be little real difference between + ;; M1 and M3 instructions. Keep them separate anyway in case the distinction + ;; is needed later. + + (define_insn_reservation "fr400_m3_1" 1 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mpackh,mrot,mshift,mexpdhw")) + "fr400_meither") + + (define_insn_reservation "fr400_m3_2" 1 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "munpackh,mdpackh,mbhconv,mexpdhd,mwcut,mdrot,mcpl")) + "fr400_mboth") + + ;; M4 instructions write to accumulators or FPRs. MOVFG and STF + ;; instructions can read an FPR result in the following cycle, but + ;; M-unit instructions must wait a cycle more for either kind of result. + + (define_bypass 1 + "fr400_m4_1,fr400_m4_2" + "fr400_i3_fstore,fr400_i4_movfg") + + (define_insn_reservation "fr400_m4_1" 2 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mrdacc,mcut,mclracc")) + "fr400_meither") + + (define_insn_reservation "fr400_m4_2" 2 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mclracca,mdcut")) + "fr400_mboth") + + ;; M5 instructions always incur a 1-cycle penalty. + + (define_insn_reservation "fr400_m5" 2 + (and (eq_attr "cpu" "fr400") + (eq_attr "type" "mwtacc")) + "fr400_mboth") + + ;; :::::::::::::::::::: + ;; :: + ;; :: Simple/FR300 scheduler description + ;; :: + ;; :::::::::::::::::::: + + ;; Fr300 or simple processor. To describe it as 1 insn issue + ;; processor, we use control unit. + + (define_insn_reservation "fr300_lat1" 1 + (and (eq_attr "cpu" "fr300,simple") + (eq_attr "type" "!gload,fload,movfg,movgf")) + "c") + + (define_insn_reservation "fr300_lat2" 2 + (and (eq_attr "cpu" "fr300,simple") + (eq_attr "type" "gload,fload,movfg,movgf")) + "c") + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Delay Slots + ;; :: + ;; :::::::::::::::::::: + + ;; The insn attribute mechanism can be used to specify the requirements for + ;; delay slots, if any, on a target machine. An instruction is said to require + ;; a "delay slot" if some instructions that are physically after the + ;; instruction are executed as if they were located before it. Classic + ;; examples are branch and call instructions, which often execute the following + ;; instruction before the branch or call is performed. + + ;; On some machines, conditional branch instructions can optionally "annul" + ;; instructions in the delay slot. This means that the instruction will not be + ;; executed for certain branch outcomes. Both instructions that annul if the + ;; branch is true and instructions that annul if the branch is false are + ;; supported. + + ;; Delay slot scheduling differs from instruction scheduling in that + ;; determining whether an instruction needs a delay slot is dependent only + ;; on the type of instruction being generated, not on data flow between the + ;; instructions. See the next section for a discussion of data-dependent + ;; instruction scheduling. + + ;; The requirement of an insn needing one or more delay slots is indicated via + ;; the `define_delay' expression. It has the following form: + ;; + ;; (define_delay TEST + ;; [DELAY-1 ANNUL-TRUE-1 ANNUL-FALSE-1 + ;; DELAY-2 ANNUL-TRUE-2 ANNUL-FALSE-2 + ;; ...]) + + ;; TEST is an attribute test that indicates whether this `define_delay' applies + ;; to a particular insn. If so, the number of required delay slots is + ;; determined by the length of the vector specified as the second argument. An + ;; insn placed in delay slot N must satisfy attribute test DELAY-N. + ;; ANNUL-TRUE-N is an attribute test that specifies which insns may be annulled + ;; if the branch is true. Similarly, ANNUL-FALSE-N specifies which insns in + ;; the delay slot may be annulled if the branch is false. If annulling is not + ;; supported for that delay slot, `(nil)' should be coded. + + ;; For example, in the common case where branch and call insns require a single + ;; delay slot, which may contain any insn other than a branch or call, the + ;; following would be placed in the `md' file: + + ;; (define_delay (eq_attr "type" "branch,call") + ;; [(eq_attr "type" "!branch,call") (nil) (nil)]) + + ;; Multiple `define_delay' expressions may be specified. In this case, each + ;; such expression specifies different delay slot requirements and there must + ;; be no insn for which tests in two `define_delay' expressions are both true. + + ;; For example, if we have a machine that requires one delay slot for branches + ;; but two for calls, no delay slot can contain a branch or call insn, and any + ;; valid insn in the delay slot for the branch can be annulled if the branch is + ;; true, we might represent this as follows: + + ;; (define_delay (eq_attr "type" "branch") + ;; [(eq_attr "type" "!branch,call") + ;; (eq_attr "type" "!branch,call") + ;; (nil)]) + ;; + ;; (define_delay (eq_attr "type" "call") + ;; [(eq_attr "type" "!branch,call") (nil) (nil) + ;; (eq_attr "type" "!branch,call") (nil) (nil)]) + + ;; Note - it is the backend's responsibility to fill any unfilled delay slots + ;; at assembler generation time. This is usually done by adding a special print + ;; operand to the delayed insrtuction, and then in the PRINT_OPERAND function + ;; calling dbr_sequence_length() to determine how many delay slots were filled. + ;; For example: + ;; + ;; --------------.md----------------- + ;; (define_insn "call" + ;; [(call (match_operand 0 "memory_operand" "m") + ;; (match_operand 1 "" ""))] + ;; "" + ;; "call_delayed %0,%1,%2%#" + ;; [(set_attr "length" "4") + ;; (set_attr "type" "call")]) + ;; + ;; -------------.h------------------- + ;; #define PRINT_OPERAND_PUNCT_VALID_P(CODE) (CODE == '#') + ;; + ;; ------------.c------------------ + ;; void + ;; machine_print_operand (file, x, code) + ;; FILE * file; + ;; rtx x; + ;; int code; + ;; { + ;; switch (code) + ;; { + ;; case '#': + ;; if (dbr_sequence_length () == 0) + ;; fputs ("\n\tnop", file); + ;; return; + + ;; :::::::::::::::::::: + ;; :: + ;; :: Notes on Patterns + ;; :: + ;; :::::::::::::::::::: + + ;; If you need to construct a sequence of assembler instructions in order + ;; to implement a pattern be sure to escape any backslashes and double quotes + ;; that you use, eg: + ;; + ;; (define_insn "an example" + ;; [(some rtl)] + ;; "" + ;; "* + ;; { static char buffer [100]; + ;; sprintf (buffer, \"insn \\t %d\", REGNO (operands[1])); + ;; return buffer; + ;; }" + ;; ) + ;; + ;; Also if there is more than one instruction, they can be separated by \\; + ;; which is a space saving synonym for \\n\\t: + ;; + ;; (define_insn "another example" + ;; [(some rtl)] + ;; "" + ;; "* + ;; { static char buffer [100]; + ;; sprintf (buffer, \"insn1 \\t %d\\;insn2 \\t %%1\", + ;; REGNO (operands[1])); + ;; return buffer; + ;; }" + ;; ) + ;; + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Moves + ;; :: + ;; :::::::::::::::::::: + + ;; Wrap moves in define_expand to prevent memory->memory moves from being + ;; generated at the RTL level, which generates better code for most machines + ;; which can't do mem->mem moves. + + ;; If operand 0 is a `subreg' with mode M of a register whose own mode is wider + ;; than M, the effect of this instruction is to store the specified value in + ;; the part of the register that corresponds to mode M. The effect on the rest + ;; of the register is undefined. + + ;; This class of patterns is special in several ways. First of all, each of + ;; these names *must* be defined, because there is no other way to copy a datum + ;; from one place to another. + + ;; Second, these patterns are not used solely in the RTL generation pass. Even + ;; the reload pass can generate move insns to copy values from stack slots into + ;; temporary registers. When it does so, one of the operands is a hard + ;; register and the other is an operand that can need to be reloaded into a + ;; register. + + ;; Therefore, when given such a pair of operands, the pattern must + ;; generate RTL which needs no reloading and needs no temporary + ;; registers--no registers other than the operands. For example, if + ;; you support the pattern with a `define_expand', then in such a + ;; case the `define_expand' mustn't call `force_reg' or any other such + ;; function which might generate new pseudo registers. + + ;; This requirement exists even for subword modes on a RISC machine + ;; where fetching those modes from memory normally requires several + ;; insns and some temporary registers. Look in `spur.md' to see how + ;; the requirement can be satisfied. + + ;; During reload a memory reference with an invalid address may be passed as an + ;; operand. Such an address will be replaced with a valid address later in the + ;; reload pass. In this case, nothing may be done with the address except to + ;; use it as it stands. If it is copied, it will not be replaced with a valid + ;; address. No attempt should be made to make such an address into a valid + ;; address and no routine (such as `change_address') that will do so may be + ;; called. Note that `general_operand' will fail when applied to such an + ;; address. + ;; + ;; The global variable `reload_in_progress' (which must be explicitly declared + ;; if required) can be used to determine whether such special handling is + ;; required. + ;; + ;; The variety of operands that have reloads depends on the rest of + ;; the machine description, but typically on a RISC machine these can + ;; only be pseudo registers that did not get hard registers, while on + ;; other machines explicit memory references will get optional + ;; reloads. + ;; + ;; If a scratch register is required to move an object to or from memory, it + ;; can be allocated using `gen_reg_rtx' prior to reload. But this is + ;; impossible during and after reload. If there are cases needing scratch + ;; registers after reload, you must define `SECONDARY_INPUT_RELOAD_CLASS' and + ;; perhaps also `SECONDARY_OUTPUT_RELOAD_CLASS' to detect them, and provide + ;; patterns `reload_inM' or `reload_outM' to handle them. + + ;; The constraints on a `moveM' must permit moving any hard register to any + ;; other hard register provided that `HARD_REGNO_MODE_OK' permits mode M in + ;; both registers and `REGISTER_MOVE_COST' applied to their classes returns a + ;; value of 2. + + ;; It is obligatory to support floating point `moveM' instructions + ;; into and out of any registers that can hold fixed point values, + ;; because unions and structures (which have modes `SImode' or + ;; `DImode') can be in those registers and they may have floating + ;; point members. + + ;; There may also be a need to support fixed point `moveM' instructions in and + ;; out of floating point registers. Unfortunately, I have forgotten why this + ;; was so, and I don't know whether it is still true. If `HARD_REGNO_MODE_OK' + ;; rejects fixed point values in floating point registers, then the constraints + ;; of the fixed point `moveM' instructions must be designed to avoid ever + ;; trying to reload into a floating point register. + + (define_expand "movqi" + [(set (match_operand:QI 0 "general_operand" "") + (match_operand:QI 1 "general_operand" ""))] + "" + " + { + if (!reload_in_progress + && !reload_completed + && !register_operand (operands[0], QImode) + && !reg_or_0_operand (operands[1], QImode)) + operands[1] = copy_to_mode_reg (QImode, operands[1]); + }") + + (define_insn "*movqi_load" + [(set (match_operand:QI 0 "register_operand" "=d,f") + (match_operand:QI 1 "frv_load_operand" "m,m"))] + "" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "gload,fload")]) + + (define_insn "*movqi_internal" + [(set (match_operand:QI 0 "move_destination_operand" "=d,d,m,m,?f,?f,?d,?m,f") + (match_operand:QI 1 "move_source_operand" "L,d,d,O, d, f, f, f,GO"))] + "register_operand(operands[0], QImode) || reg_or_0_operand (operands[1], QImode)" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "int,int,gstore,gstore,movgf,fsconv,movfg,fstore,movgf")]) + + (define_expand "movhi" + [(set (match_operand:HI 0 "general_operand" "") + (match_operand:HI 1 "general_operand" ""))] + "" + " + { + if (!reload_in_progress + && !reload_completed + && !register_operand (operands[0], HImode) + && !reg_or_0_operand (operands[1], HImode)) + operands[1] = copy_to_mode_reg (HImode, operands[1]); + }") + + (define_insn "*movhi_load" + [(set (match_operand:HI 0 "register_operand" "=d,f") + (match_operand:HI 1 "frv_load_operand" "m,m"))] + "" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "gload,fload")]) + + (define_insn "*movhi_internal" + [(set (match_operand:HI 0 "move_destination_operand" "=d,d,d,m,m,?f,?f,?d,?m,f") + (match_operand:HI 1 "move_source_operand" "L,i,d,d,O, d, f, f, f,GO"))] + "register_operand(operands[0], HImode) || reg_or_0_operand (operands[1], HImode)" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4,8,4,4,4,4,4,4,4,4") + (set_attr "type" "int,multi,int,gstore,gstore,movgf,fsconv,movfg,fstore,movgf")]) + + ;; Split 2 word load of constants into sethi/setlo instructions + (define_split + [(set (match_operand:HI 0 "integer_register_operand" "") + (match_operand:HI 1 "int_2word_operand" ""))] + "reload_completed" + [(set (match_dup 0) + (high:HI (match_dup 1))) + (set (match_dup 0) + (lo_sum:HI (match_dup 0) + (match_dup 1)))] + "") + + (define_insn "movhi_high" + [(set (match_operand:HI 0 "integer_register_operand" "=d") + (high:HI (match_operand:HI 1 "int_2word_operand" "i")))] + "" + "sethi #hi(%1), %0" + [(set_attr "type" "sethi") + (set_attr "length" "4")]) + + (define_insn "movhi_lo_sum" + [(set (match_operand:HI 0 "integer_register_operand" "+d") + (lo_sum:HI (match_dup 0) + (match_operand:HI 1 "int_2word_operand" "i")))] + "" + "setlo #lo(%1), %0" + [(set_attr "type" "setlo") + (set_attr "length" "4")]) + + (define_expand "movsi" + [(set (match_operand:SI 0 "move_destination_operand" "") + (match_operand:SI 1 "move_source_operand" ""))] + "" + " + { + if (frv_emit_movsi (operands[0], operands[1])) + DONE; + }") + + ;; Note - it is best to only have one movsi pattern and to handle + ;; all the various contingencies by the use of alternatives. This + ;; allows reload the greatest amount of flexability (since reload will + ;; only choose amoungst alternatives for a selected insn, it will not + ;; replace the insn with another one). + + ;; Unfortunately, we do have to separate out load-type moves from the rest, + ;; and only allow memory source operands in the former. If we do memory and + ;; constant loads in a single pattern, reload will be tempted to force + ;; constants into memory when the destination is a floating-point register. + ;; That may make a function use a PIC pointer when it didn't before, and we + ;; cannot change PIC usage (and hence stack layout) so late in the game. + ;; The resulting sequences for loading cosntants into FPRs are preferable + ;; even when we're not generating PIC code. + + (define_insn "*movsi_load" + [(set (match_operand:SI 0 "register_operand" "=d,f") + (match_operand:SI 1 "frv_load_operand" "m,m"))] + "" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "gload,fload")]) + + (define_insn "*movsi_internal" + [(set (match_operand:SI 0 "move_destination_operand" "=d,d,d,m,m,z,d,d,f,f,m,?f,?z") + (match_operand:SI 1 "move_source_operand" "LQ,i,d,d,O,d,z,f,d,f,f,GO,GO"))] + "register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode)" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4,8,4,4,4,4,4,4,4,4,4,4,4") + (set_attr "type" "int,multi,int,gstore,gstore,spr,spr,movfg,movgf,fsconv,fstore,movgf,spr")]) + + (define_insn "*movsi_lda_sdata" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (plus:SI (match_operand:SI 1 "small_data_register_operand" "d") + (match_operand:SI 2 "small_data_symbolic_operand" "Q")))] + "" + "addi %1, #gprel12(%2), %0" + [(set_attr "type" "int") + (set_attr "length" "4")]) + + ;; Split 2 word load of constants into sethi/setlo instructions + (define_split + [(set (match_operand:SI 0 "integer_register_operand" "") + (match_operand:SI 1 "int_2word_operand" ""))] + "reload_completed" + [(set (match_dup 0) + (high:SI (match_dup 1))) + (set (match_dup 0) + (lo_sum:SI (match_dup 0) + (match_dup 1)))] + "") + + (define_insn "movsi_high" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (high:SI (match_operand:SI 1 "int_2word_operand" "i")))] + "" + "sethi #hi(%1), %0" + [(set_attr "type" "sethi") + (set_attr "length" "4")]) + + (define_insn "movsi_lo_sum" + [(set (match_operand:SI 0 "integer_register_operand" "+d") + (lo_sum:SI (match_dup 0) + (match_operand:SI 1 "int_2word_operand" "i")))] + "" + "setlo #lo(%1), %0" + [(set_attr "type" "setlo") + (set_attr "length" "4")]) + + ;; Split loads of addresses with PIC specified into 3 separate instructions + (define_insn_and_split "*movsi_pic" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (plus:SI (match_operand:SI 1 "pic_register_operand" "d") + (match_operand:SI 2 "pic_symbolic_operand" "")))] + "" + "#" + "reload_completed" + [(set (match_dup 0) + (high:SI (match_dup 2))) + (set (match_dup 0) + (lo_sum:SI (match_dup 0) + (match_dup 2))) + (set (match_dup 0) + (plus:SI (match_dup 0) (match_dup 1)))] + + "" + [(set_attr "type" "multi") + (set_attr "length" "12")]) + + (define_insn "movsi_high_pic" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (high:SI (match_operand:SI 1 "pic_symbolic_operand" "")))] + "" + "sethi #gprelhi(%1), %0" + [(set_attr "type" "sethi") + (set_attr "length" "4")]) + + (define_insn "movsi_lo_sum_pic" + [(set (match_operand:SI 0 "integer_register_operand" "+d") + (lo_sum:SI (match_dup 0) + (match_operand:SI 1 "pic_symbolic_operand" "")))] + "" + "setlo #gprello(%1), %0" + [(set_attr "type" "setlo") + (set_attr "length" "4")]) + + (define_expand "movdi" + [(set (match_operand:DI 0 "nonimmediate_operand" "") + (match_operand:DI 1 "general_operand" ""))] + "" + " + { + if (!reload_in_progress + && !reload_completed + && !register_operand (operands[0], DImode) + && !reg_or_0_operand (operands[1], DImode)) + operands[1] = copy_to_mode_reg (DImode, operands[1]); + }") + + (define_insn "*movdi_double" + [(set (match_operand:DI 0 "move_destination_operand" "=e,?h,??d,??f,R,?R,??m,??m,e,?h,??d,??f,?e,??d,?h,??f,R,m,e,??d,e,??d,?h,??f") + (match_operand:DI 1 "move_source_operand" " e,h,d,f,e,h,d,f,R,R,m,m,h,f,e,d,GO,GO,GO,GO,nF,nF,GO,GO"))] + "TARGET_DOUBLE + && (register_operand (operands[0], DImode) + || reg_or_0_operand (operands[1], DImode))" + "* return output_move_double (operands, insn);" + [(set_attr "length" "8,4,8,8,4,4,8,8,4,4,8,8,4,8,4,8,4,8,8,8,16,16,8,8") + (set_attr "type" "multi,fdconv,multi,multi,gstore,fstore,gstore,fstore,gload,fload,gload,fload,movfg,movfg,movgf,movgf,gstore,gstore,multi,multi,multi,multi,movgf,movgf")]) + + (define_insn "*movdi_nodouble" + [(set (match_operand:DI 0 "move_destination_operand" "=e,?h,??d,??f,R,?R,??m,??m,e,?h,??d,??f,?e,??d,?h,??f,R,m,e,??d,e,??d,?h,??f") + (match_operand:DI 1 "move_source_operand" " e,h,d,f,e,h,d,f,R,R,m,m,h,f,e,d,GO,GO,GO,GO,nF,nF,GO,GO"))] + "!TARGET_DOUBLE + && (register_operand (operands[0], DImode) + || reg_or_0_operand (operands[1], DImode))" + "* return output_move_double (operands, insn);" + [(set_attr "length" "8,8,8,8,4,4,8,8,4,4,8,8,8,8,8,8,4,8,8,8,16,16,8,8") + (set_attr "type" "multi,multi,multi,multi,gstore,fstore,gstore,fstore,gload,fload,gload,fload,movfg,movfg,movgf,movgf,gstore,gstore,multi,multi,multi,multi,movgf,movgf")]) + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "dbl_memory_two_insn_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_load (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DI 0 "odd_reg_operand" "") + (match_operand:DI 1 "memory_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_load (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DI 0 "dbl_memory_two_insn_operand" "") + (match_operand:DI 1 "reg_or_0_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_store (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DI 0 "memory_operand" "") + (match_operand:DI 1 "odd_reg_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_store (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" ""))] + "reload_completed + && (odd_reg_operand (operands[0], DImode) + || odd_reg_operand (operands[1], DImode) + || (integer_register_operand (operands[0], DImode) + && integer_register_operand (operands[1], DImode)) + || (!TARGET_DOUBLE + && fpr_operand (operands[0], DImode) + && fpr_operand (operands[1], DImode)))" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) (match_dup 5))] + " + { + rtx op0 = operands[0]; + rtx op0_low = gen_lowpart (SImode, op0); + rtx op0_high = gen_highpart (SImode, op0); + rtx op1 = operands[1]; + rtx op1_low = gen_lowpart (SImode, op1); + rtx op1_high = gen_highpart (SImode, op1); + + /* We normally copy the low-numbered register first. However, if the first + register operand 0 is the same as the second register of operand 1, we + must copy in the opposite order. */ + + if (REGNO (op0_high) == REGNO (op1_low)) + { + operands[2] = op0_low; + operands[3] = op0_high; + operands[4] = op1_low; + operands[5] = op1_high; + } + else + { + operands[2] = op0_high; + operands[3] = op0_low; + operands[4] = op1_high; + operands[5] = op1_low; + } + }") + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "const_int_operand" ""))] + "reload_completed" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) (match_dup 1))] + " + { + rtx op0 = operands[0]; + rtx op1 = operands[1]; + + operands[2] = gen_highpart (SImode, op0); + operands[3] = gen_lowpart (SImode, op0); + operands[4] = GEN_INT ((INTVAL (op1) < 0) ? -1 : 0); + }") + + (define_split + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "const_double_operand" ""))] + "reload_completed" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) (match_dup 5))] + " + { + rtx op0 = operands[0]; + rtx op1 = operands[1]; + + operands[2] = gen_highpart (SImode, op0); + operands[3] = gen_lowpart (SImode, op0); + operands[4] = GEN_INT (CONST_DOUBLE_HIGH (op1)); + operands[5] = GEN_INT (CONST_DOUBLE_LOW (op1)); + }") + + ;; Floating Point Moves + ;; + ;; Note - Patterns for SF mode moves are compulsory, but + ;; patterns for DF are optional, as GCC can synthesize them. + + (define_expand "movsf" + [(set (match_operand:SF 0 "general_operand" "") + (match_operand:SF 1 "general_operand" ""))] + "" + " + { + if (!reload_in_progress + && !reload_completed + && !register_operand (operands[0], SFmode) + && !reg_or_0_operand (operands[1], SFmode)) + operands[1] = copy_to_mode_reg (SFmode, operands[1]); + }") + + (define_split + [(set (match_operand:SF 0 "integer_register_operand" "") + (match_operand:SF 1 "int_2word_operand" ""))] + "reload_completed" + [(set (match_dup 0) + (high:SF (match_dup 1))) + (set (match_dup 0) + (lo_sum:SF (match_dup 0) + (match_dup 1)))] + "") + + (define_insn "*movsf_load_has_fprs" + [(set (match_operand:SF 0 "register_operand" "=f,d") + (match_operand:SF 1 "frv_load_operand" "m,m"))] + "TARGET_HAS_FPRS" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "fload,gload")]) + + (define_insn "*movsf_internal_has_fprs" + [(set (match_operand:SF 0 "move_destination_operand" "=f,f,m,m,?f,?d,?d,m,?d") + (match_operand:SF 1 "move_source_operand" "f,OG,f,OG,d,f,d,d,F"))] + "TARGET_HAS_FPRS + && (register_operand (operands[0], SFmode) || reg_or_0_operand (operands[1], SFmode))" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4,4,4,4,4,4,4,4,8") + (set_attr "type" "fsconv,movgf,fstore,gstore,movgf,movfg,int,gstore,multi")]) + + ;; If we don't support the double instructions, prefer gprs over fprs, since it + ;; will all be emulated + (define_insn "*movsf_internal_no_fprs" + [(set (match_operand:SF 0 "move_destination_operand" "=d,d,m,d,d") + (match_operand:SF 1 "move_source_operand" " d,OG,dOG,m,F"))] + "!TARGET_HAS_FPRS + && (register_operand (operands[0], SFmode) || reg_or_0_operand (operands[1], SFmode))" + "* return output_move_single (operands, insn);" + [(set_attr "length" "4,4,4,4,8") + (set_attr "type" "int,int,gstore,gload,multi")]) + + (define_insn "movsf_high" + [(set (match_operand:SF 0 "integer_register_operand" "=d") + (high:SF (match_operand:SF 1 "int_2word_operand" "i")))] + "" + "sethi #hi(%1), %0" + [(set_attr "type" "sethi") + (set_attr "length" "4")]) + + (define_insn "movsf_lo_sum" + [(set (match_operand:SF 0 "integer_register_operand" "+d") + (lo_sum:SF (match_dup 0) + (match_operand:SF 1 "int_2word_operand" "i")))] + "" + "setlo #lo(%1), %0" + [(set_attr "type" "setlo") + (set_attr "length" "4")]) + + (define_expand "movdf" + [(set (match_operand:DF 0 "nonimmediate_operand" "") + (match_operand:DF 1 "general_operand" ""))] + "" + " + { + if (!reload_in_progress + && !reload_completed + && !register_operand (operands[0], DFmode) + && !reg_or_0_operand (operands[1], DFmode)) + operands[1] = copy_to_mode_reg (DFmode, operands[1]); + }") + + (define_insn "*movdf_double" + [(set (match_operand:DF 0 "move_destination_operand" "=h,?e,??f,??d,R,?R,??m,??m,h,?e,??f,??d,?h,??f,?e,??d,R,m,h,??f,e,??d") + (match_operand:DF 1 "move_source_operand" " h,e,f,d,h,e,f,d,R,R,m,m,e,d,h,f,GO,GO,GO,GO,GO,GO"))] + "TARGET_DOUBLE + && (register_operand (operands[0], DFmode) + || reg_or_0_operand (operands[1], DFmode))" + "* return output_move_double (operands, insn);" + [(set_attr "length" "4,8,8,8,4,4,8,8,4,4,8,8,4,8,4,8,4,8,8,8,8,8") + (set_attr "type" "fdconv,multi,multi,multi,fstore,gstore,fstore,gstore,fload,gload,fload,gload,movgf,movgf,movfg,movfg,gstore,gstore,movgf,movgf,multi,multi")]) + + ;; If we don't support the double instructions, prefer gprs over fprs, since it + ;; will all be emulated + (define_insn "*movdf_nodouble" + [(set (match_operand:DF 0 "move_destination_operand" "=e,?h,??d,??f,R,?R,??m,??m,e,?h,??d,??f,?e,??d,?h,??f,R,m,e,??d,e,??d,?h,??f") + (match_operand:DF 1 "move_source_operand" " e,h,d,f,e,h,d,f,R,R,m,m,h,f,e,d,GO,GO,GO,GO,nF,nF,GO,GO"))] + "!TARGET_DOUBLE + && (register_operand (operands[0], DFmode) + || reg_or_0_operand (operands[1], DFmode))" + "* return output_move_double (operands, insn);" + [(set_attr "length" "8,8,8,8,4,4,8,8,4,4,8,8,8,8,8,8,4,8,8,8,16,16,8,8") + (set_attr "type" "multi,multi,multi,multi,gstore,fstore,gstore,fstore,gload,fload,gload,fload,movfg,movfg,movgf,movgf,gstore,gstore,multi,multi,multi,multi,movgf,movgf")]) + + (define_split + [(set (match_operand:DF 0 "register_operand" "") + (match_operand:DF 1 "dbl_memory_two_insn_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_load (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DF 0 "odd_reg_operand" "") + (match_operand:DF 1 "memory_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_load (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DF 0 "dbl_memory_two_insn_operand" "") + (match_operand:DF 1 "reg_or_0_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_store (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DF 0 "memory_operand" "") + (match_operand:DF 1 "odd_reg_operand" ""))] + "reload_completed" + [(const_int 0)] + "frv_split_double_store (operands[0], operands[1]);") + + (define_split + [(set (match_operand:DF 0 "register_operand" "") + (match_operand:DF 1 "register_operand" ""))] + "reload_completed + && (odd_reg_operand (operands[0], DFmode) + || odd_reg_operand (operands[1], DFmode) + || (integer_register_operand (operands[0], DFmode) + && integer_register_operand (operands[1], DFmode)) + || (!TARGET_DOUBLE + && fpr_operand (operands[0], DFmode) + && fpr_operand (operands[1], DFmode)))" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) (match_dup 5))] + " + { + rtx op0 = operands[0]; + rtx op0_low = gen_lowpart (SImode, op0); + rtx op0_high = gen_highpart (SImode, op0); + rtx op1 = operands[1]; + rtx op1_low = gen_lowpart (SImode, op1); + rtx op1_high = gen_highpart (SImode, op1); + + /* We normally copy the low-numbered register first. However, if the first + register operand 0 is the same as the second register of operand 1, we + must copy in the opposite order. */ + + if (REGNO (op0_high) == REGNO (op1_low)) + { + operands[2] = op0_low; + operands[3] = op0_high; + operands[4] = op1_low; + operands[5] = op1_high; + } + else + { + operands[2] = op0_high; + operands[3] = op0_low; + operands[4] = op1_high; + operands[5] = op1_low; + } + }") + + (define_split + [(set (match_operand:DF 0 "register_operand" "") + (match_operand:DF 1 "const_int_operand" ""))] + "reload_completed" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) (match_dup 1))] + " + { + rtx op0 = operands[0]; + rtx op1 = operands[1]; + + operands[2] = gen_highpart (SImode, op0); + operands[3] = gen_lowpart (SImode, op0); + operands[4] = GEN_INT ((INTVAL (op1) < 0) ? -1 : 0); + }") + + (define_split + [(set (match_operand:DF 0 "register_operand" "") + (match_operand:DF 1 "const_double_operand" ""))] + "reload_completed" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) (match_dup 5))] + " + { + rtx op0 = operands[0]; + rtx op1 = operands[1]; + REAL_VALUE_TYPE rv; + long l[2]; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, op1); + REAL_VALUE_TO_TARGET_DOUBLE (rv, l); + + operands[2] = gen_highpart (SImode, op0); + operands[3] = gen_lowpart (SImode, op0); + operands[4] = GEN_INT (l[0]); + operands[5] = GEN_INT (l[1]); + }") + + ;; String/block move insn. + ;; Argument 0 is the destination + ;; Argument 1 is the source + ;; Argument 2 is the length + ;; Argument 3 is the alignment + + (define_expand "movstrsi" + [(parallel [(set (match_operand:BLK 0 "" "") + (match_operand:BLK 1 "" "")) + (use (match_operand:SI 2 "" "")) + (use (match_operand:SI 3 "" ""))])] + "" + " + { + if (frv_expand_block_move (operands)) + DONE; + else + FAIL; + }") + + ;; String/block clear insn. + ;; Argument 0 is the destination + ;; Argument 1 is the length + ;; Argument 2 is the alignment + + (define_expand "clrstrsi" + [(parallel [(set (match_operand:BLK 0 "" "") + (const_int 0)) + (use (match_operand:SI 1 "" "")) + (use (match_operand:SI 2 "" ""))])] + "" + " + { + if (frv_expand_block_clear (operands)) + DONE; + else + FAIL; + }") + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Reload CC registers + ;; :: + ;; :::::::::::::::::::: + + ;; Use as a define_expand so that cse/gcse/combine can't accidentally + ;; create movcc insns. + + (define_expand "movcc" + [(parallel [(set (match_operand:CC 0 "move_destination_operand" "") + (match_operand:CC 1 "move_source_operand" "")) + (clobber (match_dup 2))])] + "" + " + { + if (! reload_in_progress && ! reload_completed) + FAIL; + + operands[2] = gen_rtx_REG (CC_CCRmode, ICR_TEMP); + }") + + (define_insn "*internal_movcc" + [(set (match_operand:CC 0 "move_destination_operand" "=t,d,d,m,d") + (match_operand:CC 1 "move_source_operand" "d,d,m,d,t")) + (clobber (match_scratch:CC_CCR 2 "=X,X,X,X,&v"))] + "reload_in_progress || reload_completed" + "@ + cmpi %1, #0, %0 + mov %1, %0 + ld%I1%U1 %M1, %0 + st%I0%U0 %1, %M0 + #" + [(set_attr "length" "4,4,4,4,20") + (set_attr "type" "int,int,gload,gstore,multi")]) + + ;; To move an ICC value to a GPR for a signed comparison, we create a value + ;; that when compared to 0, sets the N and Z flags appropriately (we don't care + ;; about the V and C flags, since these comparisons are signed). + + (define_split + [(set (match_operand:CC 0 "integer_register_operand" "") + (match_operand:CC 1 "icc_operand" "")) + (clobber (match_operand:CC_CCR 2 "icr_operand" ""))] + "reload_in_progress || reload_completed" + [(match_dup 3)] + " + { + rtx dest = simplify_gen_subreg (SImode, operands[0], CCmode, 0); + rtx icc = operands[1]; + rtx icr = operands[2]; + + start_sequence (); + + emit_insn (gen_rtx_SET (VOIDmode, icr, + gen_rtx_LT (CC_CCRmode, icc, const0_rtx))); + + emit_insn (gen_movsi (dest, const1_rtx)); + + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (CC_CCRmode, icr, const0_rtx), + gen_rtx_SET (VOIDmode, dest, + gen_rtx_NEG (SImode, dest)))); + + emit_insn (gen_rtx_SET (VOIDmode, icr, + gen_rtx_EQ (CC_CCRmode, icc, const0_rtx))); + + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (CC_CCRmode, icr, const0_rtx), + gen_rtx_SET (VOIDmode, dest, const0_rtx))); + + operands[3] = get_insns (); + end_sequence (); + }") + + (define_expand "reload_incc" + [(parallel [(set (match_operand:CC 2 "integer_register_operand" "=&d") + (match_operand:CC 1 "memory_operand" "m")) + (clobber (match_scratch:CC_CCR 3 ""))]) + (parallel [(set (match_operand:CC 0 "icc_operand" "=t") + (match_dup 2)) + (clobber (match_scratch:CC_CCR 4 ""))])] + "" + "") + + (define_expand "reload_outcc" + [(parallel [(set (match_operand:CC 2 "integer_register_operand" "=&d") + (match_operand:CC 1 "icc_operand" "t")) + (clobber (match_dup 3))]) + (parallel [(set (match_operand:CC 0 "memory_operand" "=m") + (match_dup 2)) + (clobber (match_scratch:CC_CCR 4 ""))])] + "" + "operands[3] = gen_rtx_REG (CC_CCRmode, ICR_TEMP);") + + ;; Reload CC_UNSmode for unsigned integer comparisons + ;; Use define_expand so that cse/gcse/combine can't create movcc_uns insns + + (define_expand "movcc_uns" + [(parallel [(set (match_operand:CC_UNS 0 "move_destination_operand" "") + (match_operand:CC_UNS 1 "move_source_operand" "")) + (clobber (match_dup 2))])] + "" + " + { + if (! reload_in_progress && ! reload_completed) + FAIL; + operands[2] = gen_rtx_REG (CC_CCRmode, ICR_TEMP); + }") + + (define_insn "*internal_movcc_uns" + [(set (match_operand:CC_UNS 0 "move_destination_operand" "=t,d,d,m,d") + (match_operand:CC_UNS 1 "move_source_operand" "d,d,m,d,t")) + (clobber (match_scratch:CC_CCR 2 "=X,X,X,X,&v"))] + "reload_in_progress || reload_completed" + "@ + cmpi %1, #1, %0 + mov %1, %0 + ld%I1%U1 %M1, %0 + st%I0%U0 %1, %M0 + #" + [(set_attr "length" "4,4,4,4,20") + (set_attr "type" "int,int,gload,gstore,multi")]) + + ;; To move an ICC value to a GPR for an unsigned comparison, we create a value + ;; that when compared to 1, sets the Z, V, and C flags appropriately (we don't + ;; care about the N flag, since these comparisons are unsigned). + + (define_split + [(set (match_operand:CC_UNS 0 "integer_register_operand" "") + (match_operand:CC_UNS 1 "icc_operand" "")) + (clobber (match_operand:CC_CCR 2 "icr_operand" ""))] + "reload_in_progress || reload_completed" + [(match_dup 3)] + " + { + rtx dest = simplify_gen_subreg (SImode, operands[0], CC_UNSmode, 0); + rtx icc = operands[1]; + rtx icr = operands[2]; + + start_sequence (); + + emit_insn (gen_rtx_SET (VOIDmode, icr, + gen_rtx_GTU (CC_CCRmode, icc, const0_rtx))); + + emit_insn (gen_movsi (dest, const1_rtx)); + + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (CC_CCRmode, icr, const0_rtx), + gen_addsi3 (dest, dest, dest))); + + emit_insn (gen_rtx_SET (VOIDmode, icr, + gen_rtx_LTU (CC_CCRmode, icc, const0_rtx))); + + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_NE (CC_CCRmode, icr, const0_rtx), + gen_rtx_SET (VOIDmode, dest, const0_rtx))); + + operands[3] = get_insns (); + end_sequence (); + }") + + (define_expand "reload_incc_uns" + [(parallel [(set (match_operand:CC_UNS 2 "integer_register_operand" "=&d") + (match_operand:CC_UNS 1 "memory_operand" "m")) + (clobber (match_scratch:CC_CCR 3 ""))]) + (parallel [(set (match_operand:CC_UNS 0 "icc_operand" "=t") + (match_dup 2)) + (clobber (match_scratch:CC_CCR 4 ""))])] + "" + "") + + (define_expand "reload_outcc_uns" + [(parallel [(set (match_operand:CC_UNS 2 "integer_register_operand" "=&d") + (match_operand:CC_UNS 1 "icc_operand" "t")) + (clobber (match_dup 3))]) + (parallel [(set (match_operand:CC_UNS 0 "memory_operand" "=m") + (match_dup 2)) + (clobber (match_scratch:CC_CCR 4 ""))])] + "" + "operands[3] = gen_rtx_REG (CC_CCRmode, ICR_TEMP);") + + ;; Reload CC_FPmode for floating point comparisons + ;; We use a define_expand here so that cse/gcse/combine can't accidentally + ;; create movcc insns. If this was a named define_insn, we would not be able + ;; to make it conditional on reload. + + (define_expand "movcc_fp" + [(set (match_operand:CC_FP 0 "move_destination_operand" "") + (match_operand:CC_FP 1 "move_source_operand" ""))] + "TARGET_HAS_FPRS" + " + { + if (! reload_in_progress && ! reload_completed) + FAIL; + }") + + (define_insn "*movcc_fp_internal" + [(set (match_operand:CC_FP 0 "move_destination_operand" "=d,d,d,m") + (match_operand:CC_FP 1 "move_source_operand" "u,d,m,d"))] + "TARGET_HAS_FPRS && (reload_in_progress || reload_completed)" + "@ + # + mov %1, %0 + ld%I1%U1 %M1, %0 + st%I0%U0 %1, %M0" + [(set_attr "length" "12,4,4,4") + (set_attr "type" "multi,int,gload,gstore")]) + + + (define_expand "reload_incc_fp" + [(match_operand:CC_FP 0 "fcc_operand" "=u") + (match_operand:CC_FP 1 "memory_operand" "m") + (match_operand:TI 2 "integer_register_operand" "=&d")] + "TARGET_HAS_FPRS" + " + { + rtx cc_op2 = simplify_gen_subreg (CC_FPmode, operands[2], TImode, 0); + rtx int_op2 = simplify_gen_subreg (SImode, operands[2], TImode, 0); + rtx temp1 = simplify_gen_subreg (SImode, operands[2], TImode, 4); + rtx temp2 = simplify_gen_subreg (SImode, operands[2], TImode, 8); + int shift = CC_SHIFT_RIGHT (REGNO (operands[0])); + HOST_WIDE_INT mask; + + emit_insn (gen_movcc_fp (cc_op2, operands[1])); + if (shift) + emit_insn (gen_ashlsi3 (int_op2, int_op2, GEN_INT (shift))); + + mask = ~ ((HOST_WIDE_INT)CC_MASK << shift); + emit_insn (gen_movsi (temp1, GEN_INT (mask))); + emit_insn (gen_update_fcc (operands[0], int_op2, temp1, temp2)); + DONE; + }") + + (define_expand "reload_outcc_fp" + [(set (match_operand:CC_FP 2 "integer_register_operand" "=&d") + (match_operand:CC_FP 1 "fcc_operand" "u")) + (set (match_operand:CC_FP 0 "memory_operand" "=m") + (match_dup 2))] + "TARGET_HAS_FPRS" + "") + + ;; Convert a FCC value to gpr + (define_insn "read_fcc" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (unspec:SI [(match_operand:CC_FP 1 "fcc_operand" "u")] + UNSPEC_CC_TO_GPR))] + "TARGET_HAS_FPRS" + "movsg ccr, %0" + [(set_attr "type" "spr") + (set_attr "length" "4")]) + + (define_split + [(set (match_operand:CC_FP 0 "integer_register_operand" "") + (match_operand:CC_FP 1 "fcc_operand" ""))] + "reload_completed && TARGET_HAS_FPRS" + [(match_dup 2)] + " + { + rtx int_op0 = simplify_gen_subreg (SImode, operands[0], CC_FPmode, 0); + int shift = CC_SHIFT_RIGHT (REGNO (operands[1])); + + start_sequence (); + + emit_insn (gen_read_fcc (int_op0, operands[1])); + if (shift) + emit_insn (gen_lshrsi3 (int_op0, int_op0, GEN_INT (shift))); + + emit_insn (gen_andsi3 (int_op0, int_op0, GEN_INT (CC_MASK))); + + operands[2] = get_insns (); + end_sequence (); + }") + + ;; Move a gpr value to FCC. + ;; Operand0 = FCC + ;; Operand1 = reloaded value shifted appropriately + ;; Operand2 = mask to eliminate current register + ;; Operand3 = temporary to load/store ccr + (define_insn "update_fcc" + [(set (match_operand:CC_FP 0 "fcc_operand" "=u") + (unspec:CC_FP [(match_operand:SI 1 "integer_register_operand" "d") + (match_operand:SI 2 "integer_register_operand" "d")] + UNSPEC_GPR_TO_CC)) + (clobber (match_operand:SI 3 "integer_register_operand" "=&d"))] + "TARGET_HAS_FPRS" + "movsg ccr, %3\;and %2, %3, %3\;or %1, %3, %3\;movgs %3, ccr" + [(set_attr "type" "multi") + (set_attr "length" "16")]) + + ;; Reload CC_CCRmode for conditional execution registers + (define_insn "movcc_ccr" + [(set (match_operand:CC_CCR 0 "move_destination_operand" "=d,d,d,m,v,?w,C,d") + (match_operand:CC_CCR 1 "move_source_operand" "C,d,m,d,n,n,C,L"))] + "" + "@ + # + mov %1, %0 + ld%I1%U1 %M1, %0 + st%I0%U0 %1, %M0 + # + # + orcr %1, %1, %0 + setlos #%1, %0" + [(set_attr "length" "8,4,4,4,8,12,4,4") + (set_attr "type" "multi,int,gload,gstore,multi,multi,ccr,int")]) + + (define_expand "reload_incc_ccr" + [(match_operand:CC_CCR 0 "cr_operand" "=C") + (match_operand:CC_CCR 1 "memory_operand" "m") + (match_operand:CC_CCR 2 "integer_register_operand" "=&d")] + "" + " + { + rtx icc = gen_rtx_REG (CCmode, ICC_TEMP); + rtx int_op2 = simplify_gen_subreg (SImode, operands[2], CC_CCRmode, 0); + rtx icr = (ICR_P (REGNO (operands[0])) + ? operands[0] : gen_rtx_REG (CC_CCRmode, ICR_TEMP)); + + emit_insn (gen_movcc_ccr (operands[2], operands[1])); + emit_insn (gen_cmpsi_cc (icc, int_op2, const0_rtx)); + emit_insn (gen_movcc_ccr (icr, gen_rtx_NE (CC_CCRmode, icc, const0_rtx))); + + if (! ICR_P (REGNO (operands[0]))) + emit_insn (gen_movcc_ccr (operands[0], icr)); + + DONE; + }") + + (define_expand "reload_outcc_ccr" + [(set (match_operand:CC_CCR 2 "integer_register_operand" "=&d") + (match_operand:CC_CCR 1 "cr_operand" "C")) + (set (match_operand:CC_CCR 0 "memory_operand" "=m") + (match_dup 2))] + "" + "") + + (define_split + [(set (match_operand:CC_CCR 0 "integer_register_operand" "") + (match_operand:CC_CCR 1 "cr_operand" ""))] + "reload_completed" + [(match_dup 2)] + " + { + rtx int_op0 = simplify_gen_subreg (SImode, operands[0], CC_CCRmode, 0); + + start_sequence (); + emit_move_insn (operands[0], const1_rtx); + emit_insn (gen_rtx_COND_EXEC (VOIDmode, + gen_rtx_EQ (CC_CCRmode, + operands[1], + const0_rtx), + gen_rtx_SET (VOIDmode, int_op0, + const0_rtx))); + + operands[2] = get_insns (); + end_sequence (); + }") + + (define_split + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (match_operand:CC_CCR 1 "const_int_operand" ""))] + "reload_completed" + [(match_dup 2)] + " + { + rtx icc = gen_rtx_REG (CCmode, ICC_TEMP); + rtx r0 = gen_rtx_REG (SImode, GPR_FIRST); + rtx icr = (ICR_P (REGNO (operands[0])) + ? operands[0] : gen_rtx_REG (CC_CCRmode, ICR_TEMP)); + + start_sequence (); + + emit_insn (gen_cmpsi_cc (icc, r0, const0_rtx)); + + emit_insn (gen_movcc_ccr (icr, + gen_rtx_fmt_ee (((INTVAL (operands[1]) == 0) + ? EQ : NE), CC_CCRmode, + r0, const0_rtx))); + + if (! ICR_P (REGNO (operands[0]))) + emit_insn (gen_movcc_ccr (operands[0], icr)); + + operands[2] = get_insns (); + end_sequence (); + }") + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Conversions + ;; :: + ;; :::::::::::::::::::: + + ;; Signed conversions from a smaller integer to a larger integer + ;; + ;; These operations are optional. If they are not + ;; present GCC will synthesize them for itself + ;; Even though frv does not provide these instructions, we define them + ;; to allow load + sign extend to be collapsed together + (define_insn "extendqihi2" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d") + (sign_extend:HI (match_operand:QI 1 "gpr_or_memory_operand" "d,m")))] + "" + "@ + # + ldsb%I1%U1 %M1,%0" + [(set_attr "length" "8,4") + (set_attr "type" "multi,gload")]) + + (define_split + [(set (match_operand:HI 0 "integer_register_operand" "") + (sign_extend:HI (match_operand:QI 1 "integer_register_operand" "")))] + "reload_completed" + [(match_dup 2) + (match_dup 3)] + " + { + rtx op0 = gen_lowpart (SImode, operands[0]); + rtx op1 = gen_lowpart (SImode, operands[1]); + rtx shift = GEN_INT (24); + + operands[2] = gen_ashlsi3 (op0, op1, shift); + operands[3] = gen_ashrsi3 (op0, op0, shift); + }") + + (define_insn "extendqisi2" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (sign_extend:SI (match_operand:QI 1 "gpr_or_memory_operand" "d,m")))] + "" + "@ + # + ldsb%I1%U1 %M1,%0" + [(set_attr "length" "8,4") + (set_attr "type" "multi,gload")]) + + (define_split + [(set (match_operand:SI 0 "integer_register_operand" "") + (sign_extend:SI (match_operand:QI 1 "integer_register_operand" "")))] + "reload_completed" + [(match_dup 2) + (match_dup 3)] + " + { + rtx op0 = gen_lowpart (SImode, operands[0]); + rtx op1 = gen_lowpart (SImode, operands[1]); + rtx shift = GEN_INT (24); + + operands[2] = gen_ashlsi3 (op0, op1, shift); + operands[3] = gen_ashrsi3 (op0, op0, shift); + }") + + ;;(define_insn "extendqidi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (sign_extend:DI (match_operand:QI 1 "general_operand" "g")))] + ;; "" + ;; "extendqihi2 %0,%1" + ;; [(set_attr "length" "4")]) + + (define_insn "extendhisi2" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (sign_extend:SI (match_operand:HI 1 "gpr_or_memory_operand" "d,m")))] + "" + "@ + # + ldsh%I1%U1 %M1,%0" + [(set_attr "length" "8,4") + (set_attr "type" "multi,gload")]) + + (define_split + [(set (match_operand:SI 0 "integer_register_operand" "") + (sign_extend:SI (match_operand:HI 1 "integer_register_operand" "")))] + "reload_completed" + [(match_dup 2) + (match_dup 3)] + " + { + rtx op0 = gen_lowpart (SImode, operands[0]); + rtx op1 = gen_lowpart (SImode, operands[1]); + rtx shift = GEN_INT (16); + + operands[2] = gen_ashlsi3 (op0, op1, shift); + operands[3] = gen_ashrsi3 (op0, op0, shift); + }") + + ;;(define_insn "extendhidi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (sign_extend:DI (match_operand:HI 1 "general_operand" "g")))] + ;; "" + ;; "extendhihi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "extendsidi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (sign_extend:DI (match_operand:SI 1 "general_operand" "g")))] + ;; "" + ;; "extendsidi2 %0,%1" + ;; [(set_attr "length" "4")]) + + ;; Unsigned conversions from a smaller integer to a larger integer + (define_insn "zero_extendqihi2" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") + (zero_extend:HI + (match_operand:QI 1 "gpr_or_memory_operand" "d,L,m")))] + "" + "@ + andi %1,#0xff,%0 + setlos %1,%0 + ldub%I1%U1 %M1,%0" + [(set_attr "length" "4") + (set_attr "type" "int,int,gload")]) + + (define_insn "zero_extendqisi2" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") + (zero_extend:SI + (match_operand:QI 1 "gpr_or_memory_operand" "d,L,m")))] + "" + "@ + andi %1,#0xff,%0 + setlos %1,%0 + ldub%I1%U1 %M1,%0" + [(set_attr "length" "4") + (set_attr "type" "int,int,gload")]) + + ;;(define_insn "zero_extendqidi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (zero_extend:DI (match_operand:QI 1 "general_operand" "g")))] + ;; "" + ;; "zero_extendqihi2 %0,%1" + ;; [(set_attr "length" "4")]) + + ;; Do not set the type for the sethi to "sethi", since the scheduler will think + ;; the sethi takes 0 cycles as part of allowing sethi/setlo to be in the same + ;; VLIW instruction. + (define_insn "zero_extendhisi2" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (zero_extend:SI (match_operand:HI 1 "gpr_or_memory_operand" "0,m")))] + "" + "@ + sethi #hi(#0),%0 + lduh%I1%U1 %M1,%0" + [(set_attr "length" "4") + (set_attr "type" "int,gload")]) + + ;;(define_insn "zero_extendhidi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (zero_extend:DI (match_operand:HI 1 "general_operand" "g")))] + ;; "" + ;; "zero_extendhihi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "zero_extendsidi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (zero_extend:DI (match_operand:SI 1 "general_operand" "g")))] + ;; "" + ;; "zero_extendsidi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;;; Convert between floating point types of different sizes. + ;; + ;;(define_insn "extendsfdf2" + ;; [(set (match_operand:DF 0 "register_operand" "=r") + ;; (float_extend:DF (match_operand:SF 1 "register_operand" "r")))] + ;; "" + ;; "extendsfdf2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "truncdfsf2" + ;; [(set (match_operand:SF 0 "register_operand" "=r") + ;; (float_truncate:SF (match_operand:DF 1 "register_operand" "r")))] + ;; "" + ;; "truncdfsf2 %0,%1" + ;; [(set_attr "length" "4")]) + + ;;;; Convert between signed integer types and floating point. + (define_insn "floatsisf2" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (float:SF (match_operand:SI 1 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fitos %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fsconv")]) + + (define_insn "floatsidf2" + [(set (match_operand:DF 0 "fpr_operand" "=h") + (float:DF (match_operand:SI 1 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fitod %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fdconv")]) + + ;;(define_insn "floatdisf2" + ;; [(set (match_operand:SF 0 "register_operand" "=r") + ;; (float:SF (match_operand:DI 1 "register_operand" "r")))] + ;; "" + ;; "floatdisf2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "floatdidf2" + ;; [(set (match_operand:DF 0 "register_operand" "=r") + ;; (float:DF (match_operand:DI 1 "register_operand" "r")))] + ;; "" + ;; "floatdidf2 %0,%1" + ;; [(set_attr "length" "4")]) + + (define_insn "fix_truncsfsi2" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (fix:SI (match_operand:SF 1 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fstoi %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fsconv")]) + + (define_insn "fix_truncdfsi2" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (fix:SI (match_operand:DF 1 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fdtoi %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fdconv")]) + + ;;(define_insn "fix_truncsfdi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (fix:DI (match_operand:SF 1 "register_operand" "r")))] + ;; "" + ;; "fix_truncsfdi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "fix_truncdfdi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (fix:DI (match_operand:DF 1 "register_operand" "r")))] + ;; "" + ;; "fix_truncdfdi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;;; Convert between unsigned integer types and floating point. + ;; + ;;(define_insn "floatunssisf2" + ;; [(set (match_operand:SF 0 "register_operand" "=r") + ;; (unsigned_float:SF (match_operand:SI 1 "register_operand" "r")))] + ;; "" + ;; "floatunssisf2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "floatunssidf2" + ;; [(set (match_operand:DF 0 "register_operand" "=r") + ;; (unsigned_float:DF (match_operand:SI 1 "register_operand" "r")))] + ;; "" + ;; "floatunssidf2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "floatunsdisf2" + ;; [(set (match_operand:SF 0 "register_operand" "=r") + ;; (unsigned_float:SF (match_operand:DI 1 "register_operand" "r")))] + ;; "" + ;; "floatunsdisf2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "floatunsdidf2" + ;; [(set (match_operand:DF 0 "register_operand" "=r") + ;; (unsigned_float:DF (match_operand:DI 1 "register_operand" "r")))] + ;; "" + ;; "floatunsdidf2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "fixuns_truncsfsi2" + ;; [(set (match_operand:SI 0 "register_operand" "=r") + ;; (unsigned_fix:SI (match_operand:SF 1 "register_operand" "r")))] + ;; "" + ;; "fixuns_truncsfsi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "fixuns_truncdfsi2" + ;; [(set (match_operand:SI 0 "register_operand" "=r") + ;; (unsigned_fix:SI (match_operand:DF 1 "register_operand" "r")))] + ;; "" + ;; "fixuns_truncdfsi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "fixuns_truncsfdi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (unsigned_fix:DI (match_operand:SF 1 "register_operand" "r")))] + ;; "" + ;; "fixuns_truncsfdi2 %0,%1" + ;; [(set_attr "length" "4")]) + ;; + ;;(define_insn "fixuns_truncdfdi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (unsigned_fix:DI (match_operand:DF 1 "register_operand" "r")))] + ;; "" + ;; "fixuns_truncdfdi2 %0,%1" + ;; [(set_attr "length" "4")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 32 bit Integer arithmetic + ;; :: + ;; :::::::::::::::::::: + + ;; Addition + (define_insn "addsi3" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (plus:SI (match_operand:SI 1 "integer_register_operand" "%d") + (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] + "" + "add%I2 %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Subtraction. No need to worry about constants, since the compiler + ;; canonicalizes them into addsi3's. We prevent SUBREG's here to work around a + ;; combine bug, that combines the 32x32->upper 32 bit multiply that uses a + ;; SUBREG with a minus that shows up in modulus by constants. + (define_insn "subsi3" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (minus:SI (match_operand:SI 1 "gpr_no_subreg_operand" "d") + (match_operand:SI 2 "gpr_no_subreg_operand" "d")))] + "" + "sub %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Signed multiplication producing 64 bit results from 32 bit inputs + ;; Note, frv doesn't have a 32x32->32 bit multiply, but the compiler + ;; will do the 32x32->64 bit multiply and use the bottom word. + (define_expand "mulsidi3" + [(set (match_operand:DI 0 "integer_register_operand" "") + (mult:DI (sign_extend:DI (match_operand:SI 1 "integer_register_operand" "")) + (sign_extend:DI (match_operand:SI 2 "gpr_or_int12_operand" ""))))] + "" + " + { + if (GET_CODE (operands[2]) == CONST_INT) + { + emit_insn (gen_mulsidi3_const (operands[0], operands[1], operands[2])); + DONE; + } + }") + + (define_insn "*mulsidi3_reg" + [(set (match_operand:DI 0 "even_gpr_operand" "=e") + (mult:DI (sign_extend:DI (match_operand:SI 1 "integer_register_operand" "%d")) + (sign_extend:DI (match_operand:SI 2 "integer_register_operand" "d"))))] + "" + "smul %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "mul")]) + + (define_insn "mulsidi3_const" + [(set (match_operand:DI 0 "even_gpr_operand" "=e") + (mult:DI (sign_extend:DI (match_operand:SI 1 "integer_register_operand" "d")) + (match_operand:SI 2 "int12_operand" "NOP")))] + "" + "smuli %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "mul")]) + + ;; Unsigned multiplication producing 64 bit results from 32 bit inputs + (define_expand "umulsidi3" + [(set (match_operand:DI 0 "even_gpr_operand" "") + (mult:DI (zero_extend:DI (match_operand:SI 1 "integer_register_operand" "")) + (zero_extend:DI (match_operand:SI 2 "gpr_or_int12_operand" ""))))] + "" + " + { + if (GET_CODE (operands[2]) == CONST_INT) + { + emit_insn (gen_umulsidi3_const (operands[0], operands[1], operands[2])); + DONE; + } + }") + + (define_insn "*mulsidi3_reg" + [(set (match_operand:DI 0 "even_gpr_operand" "=e") + (mult:DI (zero_extend:DI (match_operand:SI 1 "integer_register_operand" "%d")) + (zero_extend:DI (match_operand:SI 2 "integer_register_operand" "d"))))] + "" + "umul %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "mul")]) + + (define_insn "umulsidi3_const" + [(set (match_operand:DI 0 "even_gpr_operand" "=e") + (mult:DI (zero_extend:DI (match_operand:SI 1 "integer_register_operand" "d")) + (match_operand:SI 2 "int12_operand" "NOP")))] + "" + "umuli %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "mul")]) + + ;; Signed Division + (define_insn "divsi3" + [(set (match_operand:SI 0 "register_operand" "=d,d") + (div:SI (match_operand:SI 1 "register_operand" "d,d") + (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] + "" + "sdiv%I2 %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "div")]) + + ;; Unsigned Division + (define_insn "udivsi3" + [(set (match_operand:SI 0 "register_operand" "=d,d") + (udiv:SI (match_operand:SI 1 "register_operand" "d,d") + (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] + "" + "udiv%I2 %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "div")]) + + ;; Negation + (define_insn "negsi2" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (neg:SI (match_operand:SI 1 "integer_register_operand" "d")))] + "" + "sub %.,%1,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Find first one bit + ;; (define_insn "ffssi2" + ;; [(set (match_operand:SI 0 "register_operand" "=r") + ;; (ffs:SI (match_operand:SI 1 "register_operand" "r")))] + ;; "" + ;; "ffssi2 %0,%1" + ;; [(set_attr "length" "4")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 64 bit Integer arithmetic + ;; :: + ;; :::::::::::::::::::: + + ;; Addition + (define_expand "adddi3" + [(parallel [(set (match_operand:DI 0 "integer_register_operand" "") + (plus:DI (match_operand:DI 1 "integer_register_operand" "") + (match_operand:DI 2 "gpr_or_int10_operand" ""))) + (clobber (match_scratch:CC 3 ""))])] + "" + " + { + if (GET_CODE (operands[2]) == CONST_INT + && INTVAL (operands[2]) == -2048 + && !no_new_pseudos) + operands[2] = force_reg (DImode, operands[2]); + }") + + (define_insn_and_split "*adddi3_internal" + [(set (match_operand:DI 0 "integer_register_operand" "=&e,e,e,&e,e,&e,e") + (plus:DI (match_operand:DI 1 "integer_register_operand" "%e,0,e,e,0,e,0") + (match_operand:DI 2 "gpr_or_int10_operand" "e,e,0,N,N,OP,OP"))) + (clobber (match_scratch:CC 3 "=t,t,t,t,t,t,t"))] + "GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != -2048" + "#" + "reload_completed" + [(match_dup 4) + (match_dup 5)] + " + { + rtx op0_high = gen_highpart (SImode, operands[0]); + rtx op1_high = gen_highpart (SImode, operands[1]); + rtx op0_low = gen_lowpart (SImode, operands[0]); + rtx op1_low = gen_lowpart (SImode, operands[1]); + rtx op2 = operands[2]; + rtx op3 = operands[3]; + + if (GET_CODE (op2) != CONST_INT) + { + rtx op2_high = gen_highpart (SImode, operands[2]); + rtx op2_low = gen_lowpart (SImode, operands[2]); + operands[4] = gen_adddi3_lower (op0_low, op1_low, op2_low, op3); + operands[5] = gen_adddi3_upper (op0_high, op1_high, op2_high, op3); + } + else if (INTVAL (op2) >= 0) + { + operands[4] = gen_adddi3_lower (op0_low, op1_low, op2, op3); + operands[5] = gen_adddi3_upper (op0_high, op1_high, const0_rtx, op3); + } + else + { + operands[4] = gen_subdi3_lower (op0_low, op1_low, + GEN_INT (- INTVAL (op2)), op3); + operands[5] = gen_subdi3_upper (op0_high, op1_high, const0_rtx, op3); + } + }" + [(set_attr "length" "8") + (set_attr "type" "multi")]) + + ;; Subtraction No need to worry about constants, since the compiler + ;; canonicalizes them into adddi3's. + (define_expand "subdi3" + [(parallel [(set (match_operand:DI 0 "integer_register_operand" "") + (minus:DI (match_operand:DI 1 "integer_register_operand" "") + (match_operand:DI 2 "integer_register_operand" ""))) + (clobber (match_dup 3))])] + "" + " + { + operands[3] = gen_reg_rtx (CCmode); + }") + + (define_insn_and_split "*subdi3_internal" + [(set (match_operand:DI 0 "integer_register_operand" "=&e,e,e") + (minus:DI (match_operand:DI 1 "integer_register_operand" "e,0,e") + (match_operand:DI 2 "integer_register_operand" "e,e,0"))) + (clobber (match_operand:CC 3 "icc_operand" "=t,t,t"))] + "" + "#" + "reload_completed" + [(match_dup 4) + (match_dup 5)] + " + { + rtx op0_high = gen_highpart (SImode, operands[0]); + rtx op1_high = gen_highpart (SImode, operands[1]); + rtx op2_high = gen_highpart (SImode, operands[2]); + rtx op0_low = gen_lowpart (SImode, operands[0]); + rtx op1_low = gen_lowpart (SImode, operands[1]); + rtx op2_low = gen_lowpart (SImode, operands[2]); + rtx op3 = operands[3]; + + operands[4] = gen_subdi3_lower (op0_low, op1_low, op2_low, op3); + operands[5] = gen_subdi3_upper (op0_high, op1_high, op2_high, op3); + }" + [(set_attr "length" "8") + (set_attr "type" "multi")]) + + ;; Patterns for addsi3/subdi3 after spliting + (define_insn "adddi3_lower" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (plus:SI (match_operand:SI 1 "integer_register_operand" "d") + (match_operand:SI 2 "gpr_or_int10_operand" "dOP"))) + (set (match_operand:CC 3 "icc_operand" "=t") + (compare:CC (plus:SI (match_dup 1) + (match_dup 2)) + (const_int 0)))] + "GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) >= 0" + "add%I2cc %1,%2,%0,%3" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "adddi3_upper" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (plus:SI (match_operand:SI 1 "integer_register_operand" "d,d") + (plus:SI (match_operand:SI 2 "reg_or_0_operand" "d,O") + (match_operand:CC 3 "icc_operand" "t,t"))))] + "" + "@ + addx %1,%2,%0,%3 + addx %1,%.,%0,%3" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "subdi3_lower" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (minus:SI (match_operand:SI 1 "integer_register_operand" "d") + (match_operand:SI 2 "gpr_or_int10_operand" "dOP"))) + (set (match_operand:CC 3 "icc_operand" "=t") + (compare:CC (plus:SI (match_dup 1) + (match_dup 2)) + (const_int 0)))] + "GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) >= 0" + "sub%I2cc %1,%2,%0,%3" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "subdi3_upper" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (minus:SI (match_operand:SI 1 "integer_register_operand" "d,d") + (minus:SI (match_operand:SI 2 "reg_or_0_operand" "d,O") + (match_operand:CC 3 "icc_operand" "t,t"))))] + "" + "@ + subx %1,%2,%0,%3 + subx %1,%.,%0,%3" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Multiplication (same size) + ;; (define_insn "muldi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (mult:DI (match_operand:DI 1 "register_operand" "%r") + ;; (match_operand:DI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "muldi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Signed Division + ;; (define_insn "divdi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (div:DI (match_operand:DI 1 "register_operand" "r") + ;; (match_operand:DI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "divdi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Undsgned Division + ;; (define_insn "udivdi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (udiv:DI (match_operand:DI 1 "register_operand" "r") + ;; (match_operand:DI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "udivdi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Negation + ;; (define_insn "negdi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (neg:DI (match_operand:DI 1 "register_operand" "r")))] + ;; "" + ;; "negdi2 %0,%1" + ;; [(set_attr "length" "4")]) + + ;; Find first one bit + ;; (define_insn "ffsdi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (ffs:DI (match_operand:DI 1 "register_operand" "r")))] + ;; "" + ;; "ffsdi2 %0,%1" + ;; [(set_attr "length" "4")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 32 bit floating point arithmetic + ;; :: + ;; :::::::::::::::::::: + + ;; Addition + (define_insn "addsf3" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (plus:SF (match_operand:SF 1 "fpr_operand" "%f") + (match_operand:SF 2 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fadds %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fsadd")]) + + ;; Subtraction + (define_insn "subsf3" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (minus:SF (match_operand:SF 1 "fpr_operand" "f") + (match_operand:SF 2 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fsubs %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fsadd")]) + + ;; Multiplication + (define_insn "mulsf3" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (mult:SF (match_operand:SF 1 "fpr_operand" "%f") + (match_operand:SF 2 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fmuls %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fsmul")]) + + ;; Multiplication with addition/subtraction + (define_insn "*muladdsf4" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (plus:SF (mult:SF (match_operand:SF 1 "fpr_operand" "%f") + (match_operand:SF 2 "fpr_operand" "f")) + (match_operand:SF 3 "fpr_operand" "0")))] + "TARGET_HARD_FLOAT && TARGET_MULADD" + "fmadds %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fmas")]) + + (define_insn "*mulsubsf4" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (minus:SF (mult:SF (match_operand:SF 1 "fpr_operand" "%f") + (match_operand:SF 2 "fpr_operand" "f")) + (match_operand:SF 3 "fpr_operand" "0")))] + "TARGET_HARD_FLOAT && TARGET_MULADD" + "fmsubs %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fmas")]) + + ;; Division + (define_insn "divsf3" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (div:SF (match_operand:SF 1 "fpr_operand" "f") + (match_operand:SF 2 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fdivs %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fsdiv")]) + + ;; Negation + (define_insn "negsf2" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (neg:SF (match_operand:SF 1 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fnegs %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fsconv")]) + + ;; Absolute value + (define_insn "abssf2" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (abs:SF (match_operand:SF 1 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fabss %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fsconv")]) + + ;; Square root + (define_insn "sqrtsf2" + [(set (match_operand:SF 0 "fpr_operand" "=f") + (sqrt:SF (match_operand:SF 1 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fsqrts %1,%0" + [(set_attr "length" "4") + (set_attr "type" "sqrt_single")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 64 bit floating point arithmetic + ;; :: + ;; :::::::::::::::::::: + + ;; Addition + (define_insn "adddf3" + [(set (match_operand:DF 0 "even_fpr_operand" "=h") + (plus:DF (match_operand:DF 1 "fpr_operand" "%h") + (match_operand:DF 2 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "faddd %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fdadd")]) + + ;; Subtraction + (define_insn "subdf3" + [(set (match_operand:DF 0 "even_fpr_operand" "=h") + (minus:DF (match_operand:DF 1 "fpr_operand" "h") + (match_operand:DF 2 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fsubd %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fdadd")]) + + ;; Multiplication + (define_insn "muldf3" + [(set (match_operand:DF 0 "even_fpr_operand" "=h") + (mult:DF (match_operand:DF 1 "fpr_operand" "%h") + (match_operand:DF 2 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fmuld %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fdmul")]) + + ;; Multiplication with addition/subtraction + (define_insn "*muladddf4" + [(set (match_operand:DF 0 "fpr_operand" "=f") + (plus:DF (mult:DF (match_operand:DF 1 "fpr_operand" "%f") + (match_operand:DF 2 "fpr_operand" "f")) + (match_operand:DF 3 "fpr_operand" "0")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE && TARGET_MULADD" + "fmaddd %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fmas")]) + + (define_insn "*mulsubdf4" + [(set (match_operand:DF 0 "fpr_operand" "=f") + (minus:DF (mult:DF (match_operand:DF 1 "fpr_operand" "%f") + (match_operand:DF 2 "fpr_operand" "f")) + (match_operand:DF 3 "fpr_operand" "0")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE && TARGET_MULADD" + "fmsubd %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fmas")]) + + ;; Division + (define_insn "divdf3" + [(set (match_operand:DF 0 "even_fpr_operand" "=h") + (div:DF (match_operand:DF 1 "fpr_operand" "h") + (match_operand:DF 2 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fdivd %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fddiv")]) + + ;; Negation + (define_insn "negdf2" + [(set (match_operand:DF 0 "even_fpr_operand" "=h") + (neg:DF (match_operand:DF 1 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fnegd %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fdconv")]) + + ;; Absolute value + (define_insn "absdf2" + [(set (match_operand:DF 0 "even_fpr_operand" "=h") + (abs:DF (match_operand:DF 1 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fabsd %1,%0" + [(set_attr "length" "4") + (set_attr "type" "fdconv")]) + + ;; Square root + (define_insn "sqrtdf2" + [(set (match_operand:DF 0 "even_fpr_operand" "=h") + (sqrt:DF (match_operand:DF 1 "fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fsqrtd %1,%0" + [(set_attr "length" "4") + (set_attr "type" "sqrt_double")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 32 bit Integer Shifts and Rotates + ;; :: + ;; :::::::::::::::::::: + + ;; Arithmetic Shift Left + (define_insn "ashlsi3" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (ashift:SI (match_operand:SI 1 "integer_register_operand" "d,d") + (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] + "" + "sll%I2 %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Arithmetic Shift Right + (define_insn "ashrsi3" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (ashiftrt:SI (match_operand:SI 1 "integer_register_operand" "d,d") + (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] + "" + "sra%I2 %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Logical Shift Right + (define_insn "lshrsi3" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (lshiftrt:SI (match_operand:SI 1 "integer_register_operand" "d,d") + (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] + "" + "srl%I2 %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Rotate Left + ;; (define_insn "rotlsi3" + ;; [(set (match_operand:SI 0 "register_operand" "=r") + ;; (rotate:SI (match_operand:SI 1 "register_operand" "r") + ;; (match_operand:SI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "rotlsi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Rotate Right + ;; (define_insn "rotrsi3" + ;; [(set (match_operand:SI 0 "register_operand" "=r") + ;; (rotatert:SI (match_operand:SI 1 "register_operand" "r") + ;; (match_operand:SI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "rotrsi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 64 bit Integer Shifts and Rotates + ;; :: + ;; :::::::::::::::::::: + + ;; Arithmetic Shift Left + ;; (define_insn "ashldi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (ashift:DI (match_operand:DI 1 "register_operand" "r") + ;; (match_operand:SI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "ashldi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Arithmetic Shift Right + ;; (define_insn "ashrdi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (ashiftrt:DI (match_operand:DI 1 "register_operand" "r") + ;; (match_operand:SI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "ashrdi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Logical Shift Right + ;; (define_insn "lshrdi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (lshiftrt:DI (match_operand:DI 1 "register_operand" "r") + ;; (match_operand:SI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "lshrdi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Rotate Left + ;; (define_insn "rotldi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (rotate:DI (match_operand:DI 1 "register_operand" "r") + ;; (match_operand:SI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "rotldi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Rotate Right + ;; (define_insn "rotrdi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (rotatert:DI (match_operand:DI 1 "register_operand" "r") + ;; (match_operand:SI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "rotrdi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 32 Bit Integer Logical operations + ;; :: + ;; :::::::::::::::::::: + + ;; Logical AND, 32 bit integers + (define_insn "andsi3_media" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") + (and:SI (match_operand:SI 1 "gpr_or_fpr_operand" "%d,f") + (match_operand:SI 2 "gpr_fpr_or_int12_operand" "dNOP,f")))] + "TARGET_MEDIA" + "@ + and%I2 %1, %2, %0 + mand %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int,mlogic")]) + + (define_insn "andsi3_nomedia" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (and:SI (match_operand:SI 1 "integer_register_operand" "%d") + (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] + "!TARGET_MEDIA" + "and%I2 %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_expand "andsi3" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") + (and:SI (match_operand:SI 1 "gpr_or_fpr_operand" "") + (match_operand:SI 2 "gpr_fpr_or_int12_operand" "")))] + "" + "") + + ;; Inclusive OR, 32 bit integers + (define_insn "iorsi3_media" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") + (ior:SI (match_operand:SI 1 "gpr_or_fpr_operand" "%d,f") + (match_operand:SI 2 "gpr_fpr_or_int12_operand" "dNOP,f")))] + "TARGET_MEDIA" + "@ + or%I2 %1, %2, %0 + mor %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int,mlogic")]) + + (define_insn "iorsi3_nomedia" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (ior:SI (match_operand:SI 1 "integer_register_operand" "%d") + (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] + "!TARGET_MEDIA" + "or%I2 %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_expand "iorsi3" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") + (ior:SI (match_operand:SI 1 "gpr_or_fpr_operand" "") + (match_operand:SI 2 "gpr_fpr_or_int12_operand" "")))] + "" + "") + + ;; Exclusive OR, 32 bit integers + (define_insn "xorsi3_media" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") + (xor:SI (match_operand:SI 1 "gpr_or_fpr_operand" "%d,f") + (match_operand:SI 2 "gpr_fpr_or_int12_operand" "dNOP,f")))] + "TARGET_MEDIA" + "@ + xor%I2 %1, %2, %0 + mxor %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int,mlogic")]) + + (define_insn "xorsi3_nomedia" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (xor:SI (match_operand:SI 1 "integer_register_operand" "%d") + (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] + "!TARGET_MEDIA" + "xor%I2 %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_expand "xorsi3" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") + (xor:SI (match_operand:SI 1 "gpr_or_fpr_operand" "") + (match_operand:SI 2 "gpr_fpr_or_int12_operand" "")))] + "" + "") + + ;; One's complement, 32 bit integers + (define_insn "one_cmplsi2_media" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") + (not:SI (match_operand:SI 1 "gpr_or_fpr_operand" "d,f")))] + "TARGET_MEDIA" + "@ + not %1, %0 + mnot %1, %0" + [(set_attr "length" "4") + (set_attr "type" "int,mlogic")]) + + (define_insn "one_cmplsi2_nomedia" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (not:SI (match_operand:SI 1 "integer_register_operand" "d")))] + "!TARGET_MEDIA" + "not %1,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_expand "one_cmplsi2" + [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") + (not:SI (match_operand:SI 1 "gpr_or_fpr_operand" "")))] + "" + "") + + + ;; :::::::::::::::::::: + ;; :: + ;; :: 64 Bit Integer Logical operations + ;; :: + ;; :::::::::::::::::::: + + ;; Logical AND, 64 bit integers + ;; (define_insn "anddi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (and:DI (match_operand:DI 1 "register_operand" "%r") + ;; (match_operand:DI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "anddi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Includive OR, 64 bit integers + ;; (define_insn "iordi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (ior:DI (match_operand:DI 1 "register_operand" "%r") + ;; (match_operand:DI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "iordi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; Excludive OR, 64 bit integers + ;; (define_insn "xordi3" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (xor:DI (match_operand:DI 1 "register_operand" "%r") + ;; (match_operand:DI 2 "nonmemory_operand" "ri")))] + ;; "" + ;; "xordi3 %0,%1,%2" + ;; [(set_attr "length" "4")]) + + ;; One's complement, 64 bit integers + ;; (define_insn "one_cmpldi2" + ;; [(set (match_operand:DI 0 "register_operand" "=r") + ;; (not:DI (match_operand:DI 1 "register_operand" "r")))] + ;; "" + ;; "notdi3 %0,%1" + ;; [(set_attr "length" "4")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Combination of integer operation with comparison + ;; :: + ;; :::::::::::::::::::: + + (define_insn "*combo_intop_compare1" + [(set (match_operand:CC 0 "icc_operand" "=t") + (compare:CC (match_operator:SI 1 "intop_compare_operator" + [(match_operand:SI 2 "integer_register_operand" "d") + (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) + (const_int 0)))] + "" + "%O1%I3cc %2, %3, %., %0" + [(set_attr "type" "int") + (set_attr "length" "4")]) + + (define_insn "*combo_intop_compare2" + [(set (match_operand:CC_UNS 0 "icc_operand" "=t") + (compare:CC_UNS (match_operator:SI 1 "intop_compare_operator" + [(match_operand:SI 2 "integer_register_operand" "d") + (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) + (const_int 0)))] + "" + "%O1%I3cc %2, %3, %., %0" + [(set_attr "type" "int") + (set_attr "length" "4")]) + + (define_insn "*combo_intop_compare3" + [(set (match_operand:CC 0 "icc_operand" "=t") + (compare:CC (match_operator:SI 1 "intop_compare_operator" + [(match_operand:SI 2 "integer_register_operand" "d") + (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) + (const_int 0))) + (set (match_operand:SI 4 "integer_register_operand" "=d") + (match_operator:SI 5 "intop_compare_operator" + [(match_dup 2) + (match_dup 3)]))] + "GET_CODE (operands[1]) == GET_CODE (operands[5])" + "%O1%I3cc %2, %3, %4, %0" + [(set_attr "type" "int") + (set_attr "length" "4")]) + + (define_insn "*combo_intop_compare4" + [(set (match_operand:CC_UNS 0 "icc_operand" "=t") + (compare:CC_UNS (match_operator:SI 1 "intop_compare_operator" + [(match_operand:SI 2 "integer_register_operand" "d") + (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) + (const_int 0))) + (set (match_operand:SI 4 "integer_register_operand" "=d") + (match_operator:SI 5 "intop_compare_operator" + [(match_dup 2) + (match_dup 3)]))] + "GET_CODE (operands[1]) == GET_CODE (operands[5])" + "%O1%I3cc %2, %3, %4, %0" + [(set_attr "type" "int") + (set_attr "length" "4")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Comparisons + ;; :: + ;; :::::::::::::::::::: + + ;; Note, we store the operands in the comparison insns, and use them later + ;; when generating the branch or scc operation. + + ;; First the routines called by the machine independent part of the compiler + (define_expand "cmpsi" + [(set (cc0) + (compare (match_operand:SI 0 "integer_register_operand" "") + (match_operand:SI 1 "gpr_or_int10_operand" "")))] + "" + " + { + frv_compare_op0 = operands[0]; + frv_compare_op1 = operands[1]; + DONE; + }") + + ;(define_expand "cmpdi" + ; [(set (cc0) + ; (compare (match_operand:DI 0 "register_operand" "") + ; (match_operand:DI 1 "nonmemory_operand" "")))] + ; "" + ; " + ;{ + ; frv_compare_op0 = operands[0]; + ; frv_compare_op1 = operands[1]; + ; DONE; + ;}") + + (define_expand "cmpsf" + [(set (cc0) + (compare (match_operand:SF 0 "fpr_operand" "") + (match_operand:SF 1 "fpr_operand" "")))] + "TARGET_HARD_FLOAT" + " + { + frv_compare_op0 = operands[0]; + frv_compare_op1 = operands[1]; + DONE; + }") + + (define_expand "cmpdf" + [(set (cc0) + (compare (match_operand:DF 0 "fpr_operand" "") + (match_operand:DF 1 "fpr_operand" "")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + " + { + frv_compare_op0 = operands[0]; + frv_compare_op1 = operands[1]; + DONE; + }") + + ;; Now, the actual comparisons, generated by the branch and/or scc operations + + (define_insn "cmpsi_cc" + [(set (match_operand:CC 0 "icc_operand" "=t,t") + (compare:CC (match_operand:SI 1 "integer_register_operand" "d,d") + (match_operand:SI 2 "gpr_or_int10_operand" "d,J")))] + "" + "cmp%I2 %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "*cmpsi_cc_uns" + [(set (match_operand:CC_UNS 0 "icc_operand" "=t,t") + (compare:CC_UNS (match_operand:SI 1 "integer_register_operand" "d,d") + (match_operand:SI 2 "gpr_or_int10_operand" "d,J")))] + "" + "cmp%I2 %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "*cmpsf_cc_fp" + [(set (match_operand:CC_FP 0 "fcc_operand" "=u") + (compare:CC_FP (match_operand:SF 1 "fpr_operand" "f") + (match_operand:SF 2 "fpr_operand" "f")))] + "TARGET_HARD_FLOAT" + "fcmps %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fsadd")]) + + (define_insn "*cmpdf_cc_fp" + [(set (match_operand:CC_FP 0 "fcc_operand" "=u") + (compare:CC_FP (match_operand:DF 1 "even_fpr_operand" "h") + (match_operand:DF 2 "even_fpr_operand" "h")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE" + "fcmpd %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "fdadd")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Branches + ;; :: + ;; :::::::::::::::::::: + + ;; Define_expands called by the machine independent part of the compiler + ;; to allocate a new comparison register. Each of these named patterns + ;; must be present, and they cannot be amalgamated into one pattern. + ;; + ;; If a fixed condition code register is being used, (as opposed to, say, + ;; using cc0), then the expands should look like this: + ;; + ;; (define_expand "" + ;; [(set (reg:CC ) + ;; (compare:CC (match_dup 1) + ;; (match_dup 2))) + ;; (set (pc) + ;; (if_then_else (eq:CC (reg:CC ) + ;; (const_int 0)) + ;; (label_ref (match_operand 0 "" "")) + ;; (pc)))] + ;; "" + ;; "{ + ;; operands[1] = frv_compare_op0; + ;; operands[2] = frv_compare_op1; + ;; }" + ;; ) + + (define_expand "beq" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (EQ, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "bne" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (NE, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "blt" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (LT, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "ble" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (LE, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "bgt" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (GT, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "bge" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (GE, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "bltu" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (LTU, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "bleu" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (LEU, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "bgtu" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (GTU, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "bgeu" + [(use (match_operand 0 "" ""))] + "" + " + { + if (! frv_emit_cond_branch (GEU, operands[0])) + FAIL; + + DONE; + }") + + ;; Actual branches. We must allow for the (label_ref) and the (pc) to be + ;; swapped. If they are swapped, it reverses the sense of the branch. + ;; + ;; Note - unlike the define expands above, these patterns can be amalgamated + ;; into one pattern for branch-if-true and one for branch-if-false. This does + ;; require an operand operator to select the correct branch mnemonic. + ;; + ;; If a fixed condition code register is being used, (as opposed to, say, + ;; using cc0), then the expands could look like this: + ;; + ;; (define_insn "*branch_true" + ;; [(set (pc) + ;; (if_then_else (match_operator:CC 0 "comparison_operator" + ;; [(reg:CC ) + ;; (const_int 0)]) + ;; (label_ref (match_operand 1 "" "")) + ;; (pc)))] + ;; "" + ;; "b%B0 %1" + ;; [(set_attr "length" "4")] + ;; ) + ;; + ;; In the above example the %B is a directive to frv_print_operand() + ;; to decode and print the correct branch mnemonic. + + (define_insn "*branch_signed_true" + [(set (pc) + (if_then_else (match_operator:CC 0 "signed_relational_operator" + [(match_operand 1 "icc_operand" "t") + (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "* + { + if (get_attr_length (insn) == 4) + return \"b%c0 %1,%#,%l2\"; + else + return \"b%C0 %1,%#,1f\;call %l2\\n1:\"; + }" + [(set (attr "length") + (if_then_else + (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) + (le (minus (match_dup 2) (pc)) (const_int 32764))) + (const_int 4) + (const_int 8))) + (set (attr "far_jump") + (if_then_else + (eq_attr "length" "4") + (const_string "no") + (const_string "yes"))) + (set (attr "type") + (if_then_else + (eq_attr "length" "4") + (const_string "branch") + (const_string "multi")))]) + + (define_insn "*branch_signed_false" + [(set (pc) + (if_then_else (match_operator:CC 0 "signed_relational_operator" + [(match_operand 1 "icc_operand" "t") + (const_int 0)]) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "* + { + if (get_attr_length (insn) == 4) + return \"b%C0 %1,%#,%l2\"; + else + return \"b%c0 %1,%#,1f\;call %l2\\n1:\"; + }" + [(set (attr "length") + (if_then_else + (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) + (le (minus (match_dup 2) (pc)) (const_int 32764))) + (const_int 4) + (const_int 8))) + (set (attr "far_jump") + (if_then_else + (eq_attr "length" "4") + (const_string "no") + (const_string "yes"))) + (set (attr "type") + (if_then_else + (eq_attr "length" "4") + (const_string "branch") + (const_string "multi")))]) + + (define_insn "*branch_unsigned_true" + [(set (pc) + (if_then_else (match_operator:CC_UNS 0 "unsigned_relational_operator" + [(match_operand 1 "icc_operand" "t") + (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "* + { + if (get_attr_length (insn) == 4) + return \"b%c0 %1,%#,%l2\"; + else + return \"b%C0 %1,%#,1f\;call %l2\\n1:\"; + }" + [(set (attr "length") + (if_then_else + (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) + (le (minus (match_dup 2) (pc)) (const_int 32764))) + (const_int 4) + (const_int 8))) + (set (attr "far_jump") + (if_then_else + (eq_attr "length" "4") + (const_string "no") + (const_string "yes"))) + (set (attr "type") + (if_then_else + (eq_attr "length" "4") + (const_string "branch") + (const_string "multi")))]) + + (define_insn "*branch_unsigned_false" + [(set (pc) + (if_then_else (match_operator:CC_UNS 0 "unsigned_relational_operator" + [(match_operand 1 "icc_operand" "t") + (const_int 0)]) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "* + { + if (get_attr_length (insn) == 4) + return \"b%C0 %1,%#,%l2\"; + else + return \"b%c0 %1,%#,1f\;call %l2\\n1:\"; + }" + [(set (attr "length") + (if_then_else + (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) + (le (minus (match_dup 2) (pc)) (const_int 32764))) + (const_int 4) + (const_int 8))) + (set (attr "far_jump") + (if_then_else + (eq_attr "length" "4") + (const_string "no") + (const_string "yes"))) + (set (attr "type") + (if_then_else + (eq_attr "length" "4") + (const_string "branch") + (const_string "multi")))]) + + (define_insn "*branch_fp_true" + [(set (pc) + (if_then_else (match_operator:CC_FP 0 "float_relational_operator" + [(match_operand 1 "fcc_operand" "u") + (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "* + { + if (get_attr_length (insn) == 4) + return \"fb%f0 %1,%#,%l2\"; + else + return \"fb%F0 %1,%#,1f\;call %l2\\n1:\"; + }" + [(set (attr "length") + (if_then_else + (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) + (le (minus (match_dup 2) (pc)) (const_int 32764))) + (const_int 4) + (const_int 8))) + (set (attr "far_jump") + (if_then_else + (eq_attr "length" "4") + (const_string "no") + (const_string "yes"))) + (set (attr "type") + (if_then_else + (eq_attr "length" "4") + (const_string "branch") + (const_string "multi")))]) + + (define_insn "*branch_fp_false" + [(set (pc) + (if_then_else (match_operator:CC_FP 0 "float_relational_operator" + [(match_operand 1 "fcc_operand" "u") + (const_int 0)]) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "* + { + if (get_attr_length (insn) == 4) + return \"fb%F0 %1,%#,%l2\"; + else + return \"fb%f0 %1,%#,1f\;call %l2\\n1:\"; + }" + [(set (attr "length") + (if_then_else + (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) + (le (minus (match_dup 2) (pc)) (const_int 32764))) + (const_int 4) + (const_int 8))) + (set (attr "far_jump") + (if_then_else + (eq_attr "length" "4") + (const_string "no") + (const_string "yes"))) + (set (attr "type") + (if_then_else + (eq_attr "length" "4") + (const_string "branch") + (const_string "multi")))]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Set flag operations + ;; :: + ;; :::::::::::::::::::: + + ;; Define_expands called by the machine independent part of the compiler + ;; to allocate a new comparison register + + (define_expand "seq" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (EQ, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sne" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (NE, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "slt" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (LT, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sle" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (LE, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sgt" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (GT, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sge" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (GE, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sltu" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (LTU, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sleu" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (LEU, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sgtu" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (GTU, operands[0])) + FAIL; + + DONE; + }") + + (define_expand "sgeu" + [(match_operand:SI 0 "integer_register_operand" "")] + "TARGET_SCC" + " + { + if (! frv_emit_scc (GEU, operands[0])) + FAIL; + + DONE; + }") + + (define_insn "*scc_signed" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (match_operator:SI 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t") + (const_int 0)])) + (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] + "" + "#" + [(set_attr "length" "12") + (set_attr "type" "multi")]) + + (define_insn "*scc_unsigned" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (match_operator:SI 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t") + (const_int 0)])) + (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] + "" + "#" + [(set_attr "length" "12") + (set_attr "type" "multi")]) + + (define_insn "*scc_float" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (match_operator:SI 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u") + (const_int 0)])) + (clobber (match_operand:CC_CCR 3 "fcr_operand" "=w"))] + "" + "#" + [(set_attr "length" "12") + (set_attr "type" "multi")]) + + ;; XXX -- add reload_completed to the splits, because register allocation + ;; currently isn't ready to see cond_exec packets. + (define_split + [(set (match_operand:SI 0 "integer_register_operand" "") + (match_operator:SI 1 "relational_operator" + [(match_operand 2 "cc_operand" "") + (const_int 0)])) + (clobber (match_operand 3 "cr_operand" ""))] + "reload_completed" + [(match_dup 4)] + "operands[4] = frv_split_scc (operands[0], operands[1], operands[2], + operands[3], (HOST_WIDE_INT) 1);") + + (define_insn "*scc_neg1_signed" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (neg:SI (match_operator:SI 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t") + (const_int 0)]))) + (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] + "" + "#" + [(set_attr "length" "12") + (set_attr "type" "multi")]) + + (define_insn "*scc_neg1_unsigned" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (neg:SI (match_operator:SI 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t") + (const_int 0)]))) + (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] + "" + "#" + [(set_attr "length" "12") + (set_attr "type" "multi")]) + + (define_insn "*scc_neg1_float" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (neg:SI (match_operator:SI 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u") + (const_int 0)]))) + (clobber (match_operand:CC_CCR 3 "fcr_operand" "=w"))] + "" + "#" + [(set_attr "length" "12") + (set_attr "type" "multi")]) + + (define_split + [(set (match_operand:SI 0 "integer_register_operand" "") + (neg:SI (match_operator:SI 1 "relational_operator" + [(match_operand 2 "cc_operand" "") + (const_int 0)]))) + (clobber (match_operand 3 "cr_operand" ""))] + "reload_completed" + [(match_dup 4)] + "operands[4] = frv_split_scc (operands[0], operands[1], operands[2], + operands[3], (HOST_WIDE_INT) -1);") + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Conditionally executed instructions + ;; :: + ;; :::::::::::::::::::: + + ;; Convert ICC/FCC comparison into CCR bits so we can do conditional execution + (define_insn "*ck_signed" + [(set (match_operand:CC_CCR 0 "icr_operand" "=v") + (match_operator:CC_CCR 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t") + (const_int 0)]))] + "" + "ck%c1 %2, %0" + [(set_attr "length" "4") + (set_attr "type" "ccr")]) + + (define_insn "*ck_unsigned" + [(set (match_operand:CC_CCR 0 "icr_operand" "=v") + (match_operator:CC_CCR 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t") + (const_int 0)]))] + "" + "ck%c1 %2, %0" + [(set_attr "length" "4") + (set_attr "type" "ccr")]) + + (define_insn "*fck_float" + [(set (match_operand:CC_CCR 0 "fcr_operand" "=w") + (match_operator:CC_CCR 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u") + (const_int 0)]))] + "TARGET_HAS_FPRS" + "fck%c1 %2, %0" + [(set_attr "length" "4") + (set_attr "type" "ccr")]) + + ;; Conditionally convert ICC/FCC comparison into CCR bits to provide && and || + ;; tests in conditional execution + (define_insn "cond_exec_ck" + [(set (match_operand:CC_CCR 0 "cr_operand" "=v,w") + (if_then_else:CC_CCR (match_operator 1 "ccr_eqne_operator" + [(match_operand 2 "cr_operand" "C,C") + (const_int 0)]) + (match_operator 3 "relational_operator" + [(match_operand 4 "cc_operand" "t,u") + (const_int 0)]) + (const_int 0)))] + "" + "@ + cck%c3 %4, %0, %2, %e1 + cfck%f3 %4, %0, %2, %e1" + [(set_attr "length" "4") + (set_attr "type" "ccr")]) + + ;; Conditionally set a register to either 0 or another register + (define_insn "*cond_exec_movqi" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C,C,C,C,C,C") + (const_int 0)]) + (set (match_operand:QI 2 "condexec_dest_operand" "=d,d,U,?f,?f,?d") + (match_operand:QI 3 "condexec_source_operand" "dO,U,dO,f,d,f")))] + "register_operand(operands[2], QImode) || reg_or_0_operand (operands[3], QImode)" + "* return output_condmove_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "int,gload,gstore,fsconv,movgf,movfg")]) + + (define_insn "*cond_exec_movhi" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C,C,C,C,C,C") + (const_int 0)]) + (set (match_operand:HI 2 "condexec_dest_operand" "=d,d,U,?f,?f,?d") + (match_operand:HI 3 "condexec_source_operand" "dO,U,dO,f,d,f")))] + "register_operand(operands[2], HImode) || reg_or_0_operand (operands[3], HImode)" + "* return output_condmove_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "int,gload,gstore,fsconv,movgf,movfg")]) + + (define_insn "*cond_exec_movsi" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C,C,C,C,C,C,C,C") + (const_int 0)]) + (set (match_operand:SI 2 "condexec_dest_operand" "=d,d,U,?f,?f,?d,?f,?m") + (match_operand:SI 3 "condexec_source_operand" "dO,U,dO,f,d,f,m,f")))] + "register_operand(operands[2], SImode) || reg_or_0_operand (operands[3], SImode)" + "* return output_condmove_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "int,gload,gstore,fsconv,movgf,movfg,fload,fstore")]) + + + (define_insn "*cond_exec_movsf_has_fprs" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C,C,C,C,C,C,C,C,C,C") + (const_int 0)]) + (set (match_operand:SF 2 "condexec_dest_operand" "=f,?d,?d,?f,f,f,?d,U,?U,U") + (match_operand:SF 3 "condexec_source_operand" "f,d,f,d,G,U,U,f,d,G")))] + "TARGET_HAS_FPRS" + "* return output_condmove_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "fsconv,int,movgf,movfg,movgf,fload,gload,fstore,gstore,gstore")]) + + (define_insn "*cond_exec_movsf_no_fprs" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C,C,C") + (const_int 0)]) + (set (match_operand:SF 2 "condexec_dest_operand" "=d,d,U") + (match_operand:SF 3 "condexec_source_operand" "d,U,dG")))] + "! TARGET_HAS_FPRS" + "* return output_condmove_single (operands, insn);" + [(set_attr "length" "4") + (set_attr "type" "int,gload,gstore")]) + + (define_insn "*cond_exec_si_binary1" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "integer_register_operand" "=d") + (match_operator:SI 3 "condexec_si_binary_operator" + [(match_operand:SI 4 "integer_register_operand" "d") + (match_operand:SI 5 "integer_register_operand" "d")])))] + "" + "* + { + switch (GET_CODE (operands[3])) + { + case PLUS: return \"cadd %4, %z5, %2, %1, %e0\"; + case MINUS: return \"csub %4, %z5, %2, %1, %e0\"; + case AND: return \"cand %4, %z5, %2, %1, %e0\"; + case IOR: return \"cor %4, %z5, %2, %1, %e0\"; + case XOR: return \"cxor %4, %z5, %2, %1, %e0\"; + case ASHIFT: return \"csll %4, %z5, %2, %1, %e0\"; + case ASHIFTRT: return \"csra %4, %z5, %2, %1, %e0\"; + case LSHIFTRT: return \"csrl %4, %z5, %2, %1, %e0\"; + default: abort (); + } + }" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "*cond_exec_si_binary2" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "fpr_operand" "=f") + (match_operator:SI 3 "condexec_si_media_operator" + [(match_operand:SI 4 "fpr_operand" "f") + (match_operand:SI 5 "fpr_operand" "f")])))] + "TARGET_MEDIA" + "* + { + switch (GET_CODE (operands[3])) + { + case AND: return \"cmand %4, %5, %2, %1, %e0\"; + case IOR: return \"cmor %4, %5, %2, %1, %e0\"; + case XOR: return \"cmxor %4, %5, %2, %1, %e0\"; + default: abort (); + } + }" + [(set_attr "length" "4") + (set_attr "type" "mlogic")]) + + ;; Note, flow does not (currently) know how to handle an operation that uses + ;; only part of the hard registers allocated for a multiregister value, such as + ;; DImode in this case if the user is only interested in the lower 32-bits. So + ;; we emit a USE of the entire register after the csmul instruction so it won't + ;; get confused. See frv_ifcvt_modify_insn for more details. + + (define_insn "*cond_exec_si_smul" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:DI 2 "even_gpr_operand" "=e") + (mult:DI (sign_extend:DI (match_operand:SI 3 "integer_register_operand" "%d")) + (sign_extend:DI (match_operand:SI 4 "integer_register_operand" "d")))))] + "" + "csmul %3, %4, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "mul")]) + + (define_insn "*cond_exec_si_divide" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "integer_register_operand" "=d") + (match_operator:SI 3 "condexec_si_divide_operator" + [(match_operand:SI 4 "integer_register_operand" "d") + (match_operand:SI 5 "integer_register_operand" "d")])))] + "" + "* + { + switch (GET_CODE (operands[3])) + { + case DIV: return \"csdiv %4, %z5, %2, %1, %e0\"; + case UDIV: return \"cudiv %4, %z5, %2, %1, %e0\"; + default: abort (); + } + }" + [(set_attr "length" "4") + (set_attr "type" "div")]) + + (define_insn "*cond_exec_si_unary1" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "integer_register_operand" "=d") + (match_operator:SI 3 "condexec_si_unary_operator" + [(match_operand:SI 4 "integer_register_operand" "d")])))] + "" + "* + { + switch (GET_CODE (operands[3])) + { + case NOT: return \"cnot %4, %2, %1, %e0\"; + case NEG: return \"csub %., %4, %2, %1, %e0\"; + default: abort (); + } + }" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "*cond_exec_si_unary2" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "fpr_operand" "=f") + (not:SI (match_operand:SI 3 "fpr_operand" "f"))))] + "TARGET_MEDIA" + "cmnot %3, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "mlogic")]) + + (define_insn "*cond_exec_cmpsi_cc" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:CC 2 "icc_operand" "=t") + (compare:CC (match_operand:SI 3 "integer_register_operand" "d") + (match_operand:SI 4 "reg_or_0_operand" "dO"))))] + "reload_completed + && REGNO (operands[1]) == REGNO (operands[2]) - ICC_FIRST + ICR_FIRST" + "ccmp %3, %z4, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "*cond_exec_cmpsi_cc_uns" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:CC_UNS 2 "icc_operand" "=t") + (compare:CC_UNS (match_operand:SI 3 "integer_register_operand" "d") + (match_operand:SI 4 "reg_or_0_operand" "dO"))))] + "reload_completed + && REGNO (operands[1]) == REGNO (operands[2]) - ICC_FIRST + ICR_FIRST" + "ccmp %3, %z4, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + (define_insn "*cond_exec_sf_conv" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SF 2 "fpr_operand" "=f") + (match_operator:SF 3 "condexec_sf_conv_operator" + [(match_operand:SF 4 "fpr_operand" "f")])))] + "TARGET_HARD_FLOAT" + "* + { + switch (GET_CODE (operands[3])) + { + case ABS: return \"cfabss %4, %2, %1, %e0\"; + case NEG: return \"cfnegs %4, %2, %1, %e0\"; + default: abort (); + } + }" + [(set_attr "length" "4") + (set_attr "type" "fsconv")]) + + (define_insn "*cond_exec_sf_add" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SF 2 "fpr_operand" "=f") + (match_operator:SF 3 "condexec_sf_add_operator" + [(match_operand:SF 4 "fpr_operand" "f") + (match_operand:SF 5 "fpr_operand" "f")])))] + "TARGET_HARD_FLOAT" + "* + { + switch (GET_CODE (operands[3])) + { + case PLUS: return \"cfadds %4, %5, %2, %1, %e0\"; + case MINUS: return \"cfsubs %4, %5, %2, %1, %e0\"; + default: abort (); + } + }" + [(set_attr "length" "4") + (set_attr "type" "fsadd")]) + + (define_insn "*cond_exec_sf_mul" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SF 2 "fpr_operand" "=f") + (mult:SF (match_operand:SF 3 "fpr_operand" "f") + (match_operand:SF 4 "fpr_operand" "f"))))] + "TARGET_HARD_FLOAT" + "cfmuls %3, %4, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "fsmul")]) + + (define_insn "*cond_exec_sf_div" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SF 2 "fpr_operand" "=f") + (div:SF (match_operand:SF 3 "fpr_operand" "f") + (match_operand:SF 4 "fpr_operand" "f"))))] + "TARGET_HARD_FLOAT" + "cfdivs %3, %4, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "fsdiv")]) + + (define_insn "*cond_exec_sf_sqrt" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SF 2 "fpr_operand" "=f") + (sqrt:SF (match_operand:SF 3 "fpr_operand" "f"))))] + "TARGET_HARD_FLOAT" + "cfsqrts %3, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "fsdiv")]) + + (define_insn "*cond_exec_cmpsi_cc_fp" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:CC_FP 2 "fcc_operand" "=u") + (compare:CC_FP (match_operand:SF 3 "fpr_operand" "f") + (match_operand:SF 4 "fpr_operand" "f"))))] + "reload_completed && TARGET_HARD_FLOAT + && REGNO (operands[1]) == REGNO (operands[2]) - FCC_FIRST + FCR_FIRST" + "cfcmps %3, %4, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "fsconv")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Logical operations on CR registers + ;; :: + ;; :::::::::::::::::::: + + ;; We use UNSPEC to encode andcr/iorcr/etc. rather than the normal RTL + ;; operations, since the RTL operations only have an idea of TRUE and FALSE, + ;; while the CRs have TRUE, FALSE, and UNDEFINED. + + (define_expand "andcr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 0)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "orcr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 1)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "xorcr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 2)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "nandcr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 3)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "norcr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 4)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "andncr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 5)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "orncr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 6)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "nandncr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 7)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "norncr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_operand:CC_CCR 2 "cr_operand" "") + (const_int 8)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_expand "notcr" + [(set (match_operand:CC_CCR 0 "cr_operand" "") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") + (match_dup 1) + (const_int 9)] UNSPEC_CR_LOGIC))] + "" + "") + + (define_insn "*logical_cr" + [(set (match_operand:CC_CCR 0 "cr_operand" "=C") + (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "C") + (match_operand:CC_CCR 2 "cr_operand" "C") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_CR_LOGIC))] + "" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case 0: return \"andcr %1, %2, %0\"; + case 1: return \"orcr %1, %2, %0\"; + case 2: return \"xorcr %1, %2, %0\"; + case 3: return \"nandcr %1, %2, %0\"; + case 4: return \"norcr %1, %2, %0\"; + case 5: return \"andncr %1, %2, %0\"; + case 6: return \"orncr %1, %2, %0\"; + case 7: return \"nandncr %1, %2, %0\"; + case 8: return \"norncr %1, %2, %0\"; + case 9: return \"notcr %1, %0\"; + } + + fatal_insn (\"logical_cr\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "ccr")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Conditional move instructions + ;; :: + ;; :::::::::::::::::::: + + + ;; - conditional moves based on floating-point comparisons require + ;; TARGET_HARD_FLOAT, because an FPU is required to do the comparison. + + ;; - conditional moves between FPRs based on integer comparisons + ;; require TARGET_HAS_FPRS. + + (define_expand "movqicc" + [(set (match_operand:QI 0 "integer_register_operand" "") + (if_then_else:QI (match_operand 1 "" "") + (match_operand:QI 2 "gpr_or_int_operand" "") + (match_operand:QI 3 "gpr_or_int_operand" "")))] + "TARGET_COND_MOVE" + " + { + if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) + FAIL; + + DONE; + }") + + (define_insn "*movqicc_internal1_signed" + [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d") + (if_then_else:QI (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:QI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:QI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movqicc_internal1_unsigned" + [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d") + (if_then_else:QI (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:QI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:QI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movqicc_internal1_float" + [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d") + (if_then_else:QI (match_operator:CC_FP 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u,u,u") + (const_int 0)]) + (match_operand:QI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:QI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] + "TARGET_HARD_FLOAT" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movqicc_internal2_signed" + [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:QI (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t,t,t") + (const_int 0)]) + (match_operand:QI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:QI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] + "(INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movqicc_internal2_unsigned" + [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:QI (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t") + (const_int 0)]) + (match_operand:QI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:QI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] + "(INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movqicc_internal2_float" + [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:QI (match_operator:CC_FP 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u") + (const_int 0)]) + (match_operand:QI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:QI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w"))] + "TARGET_HARD_FLOAT + && (INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_split + [(set (match_operand:QI 0 "integer_register_operand" "") + (if_then_else:QI (match_operator 1 "relational_operator" + [(match_operand 2 "cc_operand" "") + (const_int 0)]) + (match_operand:QI 3 "gpr_or_int_operand" "") + (match_operand:QI 4 "gpr_or_int_operand" ""))) + (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_cond_move (operands);") + + (define_expand "movhicc" + [(set (match_operand:HI 0 "integer_register_operand" "") + (if_then_else:HI (match_operand 1 "" "") + (match_operand:HI 2 "gpr_or_int_operand" "") + (match_operand:HI 3 "gpr_or_int_operand" "")))] + "TARGET_COND_MOVE" + " + { + if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) + FAIL; + + DONE; + }") + + (define_insn "*movhicc_internal1_signed" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") + (if_then_else:HI (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:HI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:HI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movhicc_internal1_unsigned" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") + (if_then_else:HI (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:HI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:HI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movhicc_internal1_float" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") + (if_then_else:HI (match_operator:CC_FP 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u,u,u") + (const_int 0)]) + (match_operand:HI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:HI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] + "TARGET_HARD_FLOAT" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movhicc_internal2_signed" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:HI (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t,t,t") + (const_int 0)]) + (match_operand:HI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:HI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] + "(INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movhicc_internal2_unsigned" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:HI (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t") + (const_int 0)]) + (match_operand:HI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:HI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] + "(INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movhicc_internal2_float" + [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:HI (match_operator:CC_FP 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u") + (const_int 0)]) + (match_operand:HI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:HI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w"))] + "TARGET_HARD_FLOAT + && (INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_split + [(set (match_operand:HI 0 "integer_register_operand" "") + (if_then_else:HI (match_operator 1 "relational_operator" + [(match_operand 2 "cc_operand" "") + (const_int 0)]) + (match_operand:HI 3 "gpr_or_int_operand" "") + (match_operand:HI 4 "gpr_or_int_operand" ""))) + (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_cond_move (operands);") + + (define_expand "movsicc" + [(set (match_operand:SI 0 "integer_register_operand" "") + (if_then_else:SI (match_operand 1 "" "") + (match_operand:SI 2 "gpr_or_int_operand" "") + (match_operand:SI 3 "gpr_or_int_operand" "")))] + "TARGET_COND_MOVE" + " + { + if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) + FAIL; + + DONE; + }") + + (define_insn "*movsicc_internal1_signed" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") + (if_then_else:SI (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:SI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:SI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movsicc_internal1_unsigned" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") + (if_then_else:SI (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:SI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:SI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movsicc_internal1_float" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") + (if_then_else:SI (match_operator:CC_FP 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u,u,u") + (const_int 0)]) + (match_operand:SI 3 "reg_or_0_operand" "0,dO,dO") + (match_operand:SI 4 "reg_or_0_operand" "dO,0,dO"))) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] + "TARGET_HARD_FLOAT" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movsicc_internal2_signed" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:SI (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t,t,t") + (const_int 0)]) + (match_operand:SI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:SI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] + "(INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movsicc_internal2_unsigned" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:SI (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t") + (const_int 0)]) + (match_operand:SI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:SI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] + "(INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movsicc_internal2_float" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d,d,d") + (if_then_else:SI (match_operator:CC_FP 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u") + (const_int 0)]) + (match_operand:SI 3 "const_int_operand" "O,O,L,n,n") + (match_operand:SI 4 "const_int_operand" "L,n,O,O,n"))) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w"))] + "TARGET_HARD_FLOAT + && (INTVAL (operands[3]) == 0 + || INTVAL (operands[4]) == 0 + || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) + && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" + "#" + [(set_attr "length" "8,12,8,12,12") + (set_attr "type" "multi")]) + + (define_split + [(set (match_operand:SI 0 "integer_register_operand" "") + (if_then_else:SI (match_operator 1 "relational_operator" + [(match_operand 2 "cc_operand" "") + (const_int 0)]) + (match_operand:SI 3 "gpr_or_int_operand" "") + (match_operand:SI 4 "gpr_or_int_operand" ""))) + (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_cond_move (operands);") + + (define_expand "movsfcc" + [(set (match_operand:SF 0 "register_operand" "") + (if_then_else:SF (match_operand 1 "" "") + (match_operand:SF 2 "register_operand" "") + (match_operand:SF 3 "register_operand" "")))] + "TARGET_COND_MOVE" + " + { + if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) + FAIL; + + DONE; + }") + + (define_insn "*movsfcc_has_fprs_signed" + [(set (match_operand:SF 0 "register_operand" "=f,f,f,?f,?f,?d") + (if_then_else:SF (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t,t,t,t") + (const_int 0)]) + (match_operand:SF 3 "register_operand" "0,f,f,f,d,fd") + (match_operand:SF 4 "register_operand" "f,0,f,d,fd,fd"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v,v"))] + "TARGET_HAS_FPRS" + "#" + [(set_attr "length" "8,8,12,12,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movsfcc_has_fprs_unsigned" + [(set (match_operand:SF 0 "register_operand" "=f,f,f,?f,?f,?d") + (if_then_else:SF (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t,t") + (const_int 0)]) + (match_operand:SF 3 "register_operand" "0,f,f,f,d,fd") + (match_operand:SF 4 "register_operand" "f,0,f,d,fd,fd"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v,v"))] + "TARGET_HAS_FPRS" + "#" + [(set_attr "length" "8,8,12,12,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movsfcc_hardfloat_float" + [(set (match_operand:SF 0 "register_operand" "=f,f,f,?f,?f,?d") + (if_then_else:SF (match_operator:CC_FP 1 "float_relational_operator" + [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u,u") + (const_int 0)]) + (match_operand:SF 3 "register_operand" "0,f,f,f,d,fd") + (match_operand:SF 4 "register_operand" "f,0,f,d,fd,fd"))) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w,w"))] + "TARGET_HARD_FLOAT" + "#" + [(set_attr "length" "8,8,12,12,12,12") + (set_attr "type" "multi")]) + + (define_insn "*movsfcc_no_fprs_signed" + [(set (match_operand:SF 0 "integer_register_operand" "=d,d,d") + (if_then_else:SF (match_operator:CC 1 "signed_relational_operator" + [(match_operand:CC 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:SF 3 "integer_register_operand" "0,d,d") + (match_operand:SF 4 "integer_register_operand" "d,0,d"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "! TARGET_HAS_FPRS" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_insn "*movsfcc_no_fprs_unsigned" + [(set (match_operand:SF 0 "integer_register_operand" "=d,d,d") + (if_then_else:SF (match_operator:CC_UNS 1 "unsigned_relational_operator" + [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") + (const_int 0)]) + (match_operand:SF 3 "integer_register_operand" "0,d,d") + (match_operand:SF 4 "integer_register_operand" "d,0,d"))) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "! TARGET_HAS_FPRS" + "#" + [(set_attr "length" "8,8,12") + (set_attr "type" "multi")]) + + (define_split + [(set (match_operand:SF 0 "register_operand" "") + (if_then_else:SF (match_operator 1 "relational_operator" + [(match_operand 2 "cc_operand" "") + (const_int 0)]) + (match_operand:SF 3 "register_operand" "") + (match_operand:SF 4 "register_operand" ""))) + (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_cond_move (operands);") + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Minimum, maximum, and integer absolute value + ;; :: + ;; :::::::::::::::::::: + + ;; These 'instructions' are provided to give the compiler a slightly better + ;; nudge at register allocation, then it would if it constructed the + ;; instructions from basic building blocks (since it indicates it prefers one + ;; of the operands to be the same as the destination. It also helps the + ;; earlier passes of the compiler, by not breaking things into small basic + ;; blocks. + + (define_expand "abssi2" + [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") + (abs:SI (match_operand:SI 1 "integer_register_operand" ""))) + (clobber (match_dup 2)) + (clobber (match_dup 3))])] + "TARGET_COND_MOVE" + " + { + operands[2] = gen_reg_rtx (CCmode); + operands[3] = gen_reg_rtx (CC_CCRmode); + }") + + (define_insn_and_split "*abssi2_internal" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d") + (abs:SI (match_operand:SI 1 "integer_register_operand" "0,d"))) + (clobber (match_operand:CC 2 "icc_operand" "=t,t")) + (clobber (match_operand:CC_CCR 3 "icr_operand" "=v,v"))] + "TARGET_COND_MOVE" + "#" + "reload_completed" + [(match_dup 4)] + "operands[4] = frv_split_abs (operands);" + [(set_attr "length" "12,16") + (set_attr "type" "multi")]) + + (define_expand "sminsi3" + [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") + (smin:SI (match_operand:SI 1 "integer_register_operand" "") + (match_operand:SI 2 "gpr_or_int10_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE" + " + { + operands[3] = gen_reg_rtx (CCmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_expand "smaxsi3" + [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") + (smax:SI (match_operand:SI 1 "integer_register_operand" "") + (match_operand:SI 2 "gpr_or_int10_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE" + " + { + operands[3] = gen_reg_rtx (CCmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_insn_and_split "*minmax_si_signed" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,&d") + (match_operator:SI 1 "minmax_operator" + [(match_operand:SI 2 "integer_register_operand" "%0,dO,d") + (match_operand:SI 3 "gpr_or_int10_operand" "dO,0,dJ")])) + (clobber (match_operand:CC 4 "icc_operand" "=t,t,t")) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "TARGET_COND_MOVE" + "#" + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_minmax (operands);" + [(set_attr "length" "12,12,16") + (set_attr "type" "multi")]) + + (define_expand "uminsi3" + [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") + (umin:SI (match_operand:SI 1 "integer_register_operand" "") + (match_operand:SI 2 "gpr_or_int10_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE" + " + { + operands[3] = gen_reg_rtx (CC_UNSmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_expand "umaxsi3" + [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") + (umax:SI (match_operand:SI 1 "integer_register_operand" "") + (match_operand:SI 2 "gpr_or_int10_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE" + " + { + operands[3] = gen_reg_rtx (CC_UNSmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_insn_and_split "*minmax_si_unsigned" + [(set (match_operand:SI 0 "integer_register_operand" "=d,d,&d") + (match_operator:SI 1 "minmax_operator" + [(match_operand:SI 2 "integer_register_operand" "%0,dO,d") + (match_operand:SI 3 "gpr_or_int10_operand" "dO,0,dJ")])) + (clobber (match_operand:CC_UNS 4 "icc_operand" "=t,t,t")) + (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] + "TARGET_COND_MOVE" + "#" + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_minmax (operands);" + [(set_attr "length" "12,12,16") + (set_attr "type" "multi")]) + + (define_expand "sminsf3" + [(parallel [(set (match_operand:SF 0 "fpr_operand" "") + (smin:SF (match_operand:SF 1 "fpr_operand" "") + (match_operand:SF 2 "fpr_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE && TARGET_HARD_FLOAT" + " + { + operands[3] = gen_reg_rtx (CC_FPmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_expand "smaxsf3" + [(parallel [(set (match_operand:SF 0 "fpr_operand" "") + (smax:SF (match_operand:SF 1 "fpr_operand" "") + (match_operand:SF 2 "fpr_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE && TARGET_HARD_FLOAT" + " + { + operands[3] = gen_reg_rtx (CC_FPmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_insn_and_split "*minmax_sf" + [(set (match_operand:SF 0 "fpr_operand" "=f,f,f") + (match_operator:SF 1 "minmax_operator" + [(match_operand:SF 2 "fpr_operand" "%0,f,f") + (match_operand:SF 3 "fpr_operand" "f,0,f")])) + (clobber (match_operand:CC_FP 4 "fcc_operand" "=u,u,u")) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] + "TARGET_COND_MOVE && TARGET_HARD_FLOAT" + "#" + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_minmax (operands);" + [(set_attr "length" "12,12,16") + (set_attr "type" "multi")]) + + (define_expand "smindf3" + [(parallel [(set (match_operand:DF 0 "fpr_operand" "") + (smin:DF (match_operand:DF 1 "fpr_operand" "") + (match_operand:DF 2 "fpr_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE && TARGET_HARD_FLOAT && TARGET_DOUBLE" + " + { + operands[3] = gen_reg_rtx (CC_FPmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_expand "smaxdf3" + [(parallel [(set (match_operand:DF 0 "fpr_operand" "") + (smax:DF (match_operand:DF 1 "fpr_operand" "") + (match_operand:DF 2 "fpr_operand" ""))) + (clobber (match_dup 3)) + (clobber (match_dup 4))])] + "TARGET_COND_MOVE && TARGET_HARD_FLOAT && TARGET_DOUBLE" + " + { + operands[3] = gen_reg_rtx (CC_FPmode); + operands[4] = gen_reg_rtx (CC_CCRmode); + }") + + (define_insn_and_split "*minmax_df" + [(set (match_operand:DF 0 "fpr_operand" "=f,f,f") + (match_operator:DF 1 "minmax_operator" + [(match_operand:DF 2 "fpr_operand" "%0,f,f") + (match_operand:DF 3 "fpr_operand" "f,0,f")])) + (clobber (match_operand:CC_FP 4 "fcc_operand" "=u,u,u")) + (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] + "TARGET_COND_MOVE && TARGET_HARD_FLOAT && TARGET_DOUBLE" + "#" + "reload_completed" + [(match_dup 6)] + "operands[6] = frv_split_minmax (operands);" + [(set_attr "length" "12,12,16") + (set_attr "type" "multi")]) + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Call and branch instructions + ;; :: + ;; :::::::::::::::::::: + + ;; Subroutine call instruction returning no value. Operand 0 is the function + ;; to call; operand 1 is the number of bytes of arguments pushed (in mode + ;; `SImode', except it is normally a `const_int'); operand 2 is the number of + ;; registers used as operands. + + ;; On most machines, operand 2 is not actually stored into the RTL pattern. It + ;; is supplied for the sake of some RISC machines which need to put this + ;; information into the assembler code; they can put it in the RTL instead of + ;; operand 1. + + (define_expand "call" + [(use (match_operand:QI 0 "" "")) + (use (match_operand 1 "" "")) + (use (match_operand 2 "" "")) + (use (match_operand 3 "" ""))] + "" + " + { + rtx lr = gen_rtx_REG (Pmode, LR_REGNO); + rtx addr; + + if (GET_CODE (operands[0]) != MEM) + abort (); + + addr = XEXP (operands[0], 0); + if (! call_operand (addr, Pmode)) + addr = force_reg (Pmode, addr); + + if (! operands[2]) + operands[2] = const0_rtx; + + emit_call_insn (gen_call_internal (addr, operands[1], operands[2], lr)); + DONE; + }") + + (define_insn "call_internal" + [(call (mem:QI (match_operand:SI 0 "call_operand" "S,dNOP")) + (match_operand 1 "" "")) + (use (match_operand 2 "" "")) + (clobber (match_operand:SI 3 "lr_operand" "=l,l"))] + "" + "@ + call %0 + call%i0l %M0" + [(set_attr "length" "4") + (set_attr "type" "call,jumpl")]) + + ;; Subroutine call instruction returning a value. Operand 0 is the hard + ;; register in which the value is returned. There are three more operands, the + ;; same as the three operands of the `call' instruction (but with numbers + ;; increased by one). + + ;; Subroutines that return `BLKmode' objects use the `call' insn. + + (define_expand "call_value" + [(use (match_operand 0 "" "")) + (use (match_operand:QI 1 "" "")) + (use (match_operand 2 "" "")) + (use (match_operand 3 "" "")) + (use (match_operand 4 "" ""))] + "" + " + { + rtx lr = gen_rtx_REG (Pmode, LR_REGNO); + rtx addr; + + if (GET_CODE (operands[1]) != MEM) + abort (); + + addr = XEXP (operands[1], 0); + if (! call_operand (addr, Pmode)) + addr = force_reg (Pmode, addr); + + if (! operands[3]) + operands[3] = const0_rtx; + + emit_call_insn (gen_call_value_internal (operands[0], addr, operands[2], + operands[3], lr)); + DONE; + }") + + (define_insn "call_value_internal" + [(set (match_operand 0 "register_operand" "=d,d") + (call (mem:QI (match_operand:SI 1 "call_operand" "S,dNOP")) + (match_operand 2 "" ""))) + (use (match_operand 3 "" "")) + (clobber (match_operand:SI 4 "lr_operand" "=l,l"))] + "" + "@ + call %1 + call%i1l %M1" + [(set_attr "length" "4") + (set_attr "type" "call,jumpl")]) + + ;; return instruction generated instead of jmp to epilog + (define_expand "return" + [(parallel [(return) + (use (match_dup 0)) + (use (const_int 1))])] + "direct_return_p ()" + " + { + operands[0] = gen_rtx_REG (Pmode, LR_REGNO); + }") + + ;; return instruction generated by the epilogue + (define_expand "epilogue_return" + [(parallel [(return) + (use (match_operand:SI 0 "register_operand" "")) + (use (const_int 0))])] + "" + "") + + (define_insn "*return_internal" + [(return) + (use (match_operand:SI 0 "register_operand" "l,d")) + (use (match_operand:SI 1 "immediate_operand" "n,n"))] + "" + "@ + ret + jmpl @(%0,%.)" + [(set_attr "length" "4") + (set_attr "type" "jump,jumpl")]) + + ;; A version of addsi3 for deallocating stack space at the end of the + ;; epilogue. The addition is done in parallel with an (unspec_volatile), + ;; which represents the clobbering of the deallocated space. + (define_insn "stack_adjust" + [(set (match_operand:SI 0 "register_operand" "=d") + (plus:SI (match_operand:SI 1 "register_operand" "d") + (match_operand:SI 2 "general_operand" "dNOP"))) + (unspec_volatile [(const_int 0)] UNSPEC_STACK_ADJUST)] + "" + "add%I2 %1,%2,%0" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Normal unconditional jump + + ;; Use the "call" instruction for long branches, but prefer to use "bra" for + ;; short ones since it does not force us to save the link register. + + ;; This define_insn uses the branch-shortening code to decide which + ;; instruction it emits. Since the main branch-shortening interface is + ;; through get_attr_length(), the two alternatives must be given different + ;; lengths. Here we pretend that the far jump is 8 rather than 4 bytes + ;; long, though both alternatives are really the same size. + (define_insn "jump" + [(set (pc) (label_ref (match_operand 0 "" "")))] + "" + "* + { + if (get_attr_length (insn) == 4) + return \"bra %l0\"; + else + return \"call %l0\"; + }" + [(set (attr "length") + (if_then_else + (and (ge (minus (match_dup 0) (pc)) (const_int -32768)) + (le (minus (match_dup 0) (pc)) (const_int 32764))) + (const_int 4) + (const_int 8))) + (set (attr "far_jump") + (if_then_else + (eq_attr "length" "4") + (const_string "no") + (const_string "yes"))) + (set (attr "type") + (if_then_else + (eq_attr "length" "4") + (const_string "jump") + (const_string "call")))]) + + ;; Indirect jump through a register + (define_insn "indirect_jump" + [(set (pc) (match_operand:SI 0 "register_operand" "d,l"))] + "" + "@ + jmpl @(%0,%.) + bralr" + [(set_attr "length" "4") + (set_attr "type" "jumpl,branch")]) + + ;; Instruction to jump to a variable address. This is a low-level capability + ;; which can be used to implement a dispatch table when there is no `casesi' + ;; pattern. Either the 'casesi' pattern or the 'tablejump' pattern, or both, + ;; MUST be present in this file. + + ;; This pattern requires two operands: the address or offset, and a label which + ;; should immediately precede the jump table. If the macro + ;; `CASE_VECTOR_PC_RELATIVE' is defined then the first operand is an offset + ;; which counts from the address of the table; otherwise, it is an absolute + ;; address to jump to. In either case, the first operand has mode `Pmode'. + + ;; The `tablejump' insn is always the last insn before the jump table it uses. + ;; Its assembler code normally has no need to use the second operand, but you + ;; should incorporate it in the RTL pattern so that the jump optimizer will not + ;; delete the table as unreachable code. + + (define_expand "tablejump" + [(parallel [(set (pc) (match_operand:SI 0 "address_operand" "p")) + (use (label_ref (match_operand 1 "" "")))])] + "!flag_pic" + "") + + (define_insn "tablejump_insn" + [(set (pc) (match_operand:SI 0 "address_operand" "p")) + (use (label_ref (match_operand 1 "" "")))] + "" + "jmp%I0l %M0" + [(set_attr "length" "4") + (set_attr "type" "jumpl")]) + + ;; Implement switch statements when generating PIC code. Switches are + ;; implemented by `tablejump' when not using -fpic. + + ;; Emit code here to do the range checking and make the index zero based. + ;; operand 0 is the index + ;; operand 1 is the lower bound + ;; operand 2 is the range of indices (highest - lowest + 1) + ;; operand 3 is the label that precedes the table itself + ;; operand 4 is the fall through label + + (define_expand "casesi" + [(use (match_operand:SI 0 "integer_register_operand" "")) + (use (match_operand:SI 1 "const_int_operand" "")) + (use (match_operand:SI 2 "const_int_operand" "")) + (use (match_operand 3 "" "")) + (use (match_operand 4 "" ""))] + "flag_pic" + " + { + rtx indx; + rtx scale; + rtx low = operands[1]; + rtx range = operands[2]; + rtx table = operands[3]; + rtx treg; + rtx fail = operands[4]; + rtx mem; + rtx reg2; + rtx reg3; + + if (GET_CODE (operands[1]) != CONST_INT) + abort (); + + if (GET_CODE (operands[2]) != CONST_INT) + abort (); + + /* If we can't generate an immediate instruction, promote to register */ + if (! IN_RANGE_P (INTVAL (range), -2048, 2047)) + range = force_reg (SImode, range); + + /* If low bound is 0, we don't have to subtract it. */ + if (INTVAL (operands[1]) == 0) + indx = operands[0]; + else + { + indx = gen_reg_rtx (SImode); + if (IN_RANGE_P (INTVAL (low), -2047, 2048)) + emit_insn (gen_addsi3 (indx, operands[0], GEN_INT (- INTVAL (low)))); + else + emit_insn (gen_subsi3 (indx, operands[0], force_reg (SImode, low))); + } + + /* Do an unsigned comparison (in the proper mode) between the index + expression and the value which represents the length of the range. + Since we just finished subtracting the lower bound of the range + from the index expression, this comparison allows us to simultaneously + check that the original index expression value is both greater than + or equal to the minimum value of the range and less than or equal to + the maximum value of the range. */ + + emit_cmp_and_jump_insns (indx, range, GTU, NULL_RTX, SImode, 1, fail); + + /* Move the table address to a register */ + treg = gen_reg_rtx (Pmode); + emit_insn (gen_movsi (treg, gen_rtx_LABEL_REF (VOIDmode, table))); + + /* scale index-low by wordsize */ + scale = gen_reg_rtx (SImode); + emit_insn (gen_ashlsi3 (scale, indx, GEN_INT (2))); + + /* Load the address, add the start of the table back in, + and jump to it. */ + mem = gen_rtx_MEM (SImode, gen_rtx_PLUS (Pmode, scale, treg)); + reg2 = gen_reg_rtx (SImode); + reg3 = gen_reg_rtx (SImode); + emit_insn (gen_movsi (reg2, mem)); + emit_insn (gen_addsi3 (reg3, reg2, treg)); + emit_jump_insn (gen_tablejump_insn (reg3, table)); + DONE; + }") + + + ;; :::::::::::::::::::: + ;; :: + ;; :: Prologue and Epilogue instructions + ;; :: + ;; :::::::::::::::::::: + + ;; Called after register allocation to add any instructions needed for the + ;; prologue. Using a prologue insn is favored compared to putting all of the + ;; instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler + ;; to intermix instructions with the saves of the caller saved registers. In + ;; some cases, it might be necessary to emit a barrier instruction as the last + ;; insn to prevent such scheduling. + (define_expand "prologue" + [(const_int 1)] + "" + " + { + frv_expand_prologue (); + DONE; + }") + + ;; Called after register allocation to add any instructions needed for the + ;; epilogue. Using an epilogue insn is favored compared to putting all of the + ;; instructions in the FUNCTION_EPILOGUE macro, since it allows the scheduler + ;; to intermix instructions with the restires of the caller saved registers. + ;; In some cases, it might be necessary to emit a barrier instruction as the + ;; first insn to prevent such scheduling. + (define_expand "epilogue" + [(const_int 2)] + "" + " + { + frv_expand_epilogue (FALSE); + DONE; + }") + + ;; This pattern, if defined, emits RTL for exit from a function without the final + ;; branch back to the calling function. This pattern will be emitted before any + ;; sibling call (aka tail call) sites. + ;; + ;; The sibcall_epilogue pattern must not clobber any arguments used for + ;; parameter passing or any stack slots for arguments passed to the current + ;; function. + (define_expand "sibcall_epilogue" + [(const_int 3)] + "" + " + { + frv_expand_epilogue (TRUE); + DONE; + }") + + ;; Set up the pic register to hold the address of the pic table + (define_insn "pic_prologue" + [(set (match_operand:SI 0 "integer_register_operand" "=d") + (unspec_volatile:SI [(const_int 0)] UNSPEC_PIC_PROLOGUE)) + (clobber (match_operand:SI 1 "lr_operand" "=l")) + (clobber (match_operand:SI 2 "integer_register_operand" "=d"))] + "" + "* + { + static int frv_pic_labelno = 0; + + operands[3] = GEN_INT (frv_pic_labelno++); + return \"call %P3\\n%P3:\;movsg %1, %0\;sethi #gprelhi(%P3), %2\;setlo #gprello(%P3), %2\;sub %0,%2,%0\"; + }" + [(set_attr "length" "16") + (set_attr "type" "multi")]) + + ;; :::::::::::::::::::: + ;; :: + ;; :: Miscellaneous instructions + ;; :: + ;; :::::::::::::::::::: + + ;; No operation, needed in case the user uses -g but not -O. + (define_insn "nop" + [(const_int 0)] + "" + "nop" + [(set_attr "length" "4") + (set_attr "type" "int")]) + + ;; Pseudo instruction that prevents the scheduler from moving code above this + ;; point. Note, type unknown is used to make sure the VLIW instructions are + ;; not continued past this point. + (define_insn "blockage" + [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] + "" + "# blockage" + [(set_attr "length" "0") + (set_attr "type" "unknown")]) + + ;; :::::::::::::::::::: + ;; :: + ;; :: Media instructions + ;; :: + ;; :::::::::::::::::::: + + ;; Unimplemented instructions: + ;; - MCMPSH, MCMPUH + + (define_constants + [(UNSPEC_MLOGIC 100) + (UNSPEC_MNOT 101) + (UNSPEC_MAVEH 102) + (UNSPEC_MSATH 103) + (UNSPEC_MADDH 104) + (UNSPEC_MQADDH 105) + (UNSPEC_MPACKH 106) + (UNSPEC_MUNPACKH 107) + (UNSPEC_MDPACKH 108) + (UNSPEC_MBTOH 109) + (UNSPEC_MHTOB 110) + (UNSPEC_MROT 111) + (UNSPEC_MSHIFT 112) + (UNSPEC_MEXPDHW 113) + (UNSPEC_MEXPDHD 114) + (UNSPEC_MWCUT 115) + (UNSPEC_MMULH 116) + (UNSPEC_MMULXH 117) + (UNSPEC_MMACH 118) + (UNSPEC_MMRDH 119) + (UNSPEC_MQMULH 120) + (UNSPEC_MQMULXH 121) + (UNSPEC_MQMACH 122) + (UNSPEC_MCPX 123) + (UNSPEC_MQCPX 124) + (UNSPEC_MCUT 125) + (UNSPEC_MRDACC 126) + (UNSPEC_MRDACCG 127) + (UNSPEC_MWTACC 128) + (UNSPEC_MWTACCG 129) + (UNSPEC_MTRAP 130) + (UNSPEC_MCLRACC 131) + (UNSPEC_MCLRACCA 132) + (UNSPEC_MCOP1 133) + (UNSPEC_MCOP2 134) + (UNSPEC_MDUNPACKH 135) + (UNSPEC_MDUNPACKH_INTERNAL 136) + (UNSPEC_MBTOHE 137) + (UNSPEC_MBTOHE_INTERNAL 138) + (UNSPEC_MBTOHE 137) + (UNSPEC_MBTOHE_INTERNAL 138) + (UNSPEC_MQMACH2 139) + (UNSPEC_MADDACC 140) + (UNSPEC_MDADDACC 141) + (UNSPEC_MABSHS 142) + (UNSPEC_MDROTLI 143) + (UNSPEC_MCPLHI 144) + (UNSPEC_MCPLI 145) + (UNSPEC_MDCUTSSI 146) + (UNSPEC_MQSATHS 147) + (UNSPEC_MHSETLOS 148) + (UNSPEC_MHSETLOH 149) + (UNSPEC_MHSETHIS 150) + (UNSPEC_MHSETHIH 151) + (UNSPEC_MHDSETS 152) + (UNSPEC_MHDSETH 153) + ]) + + ;; Logic operations: type "mlogic" + + (define_expand "mand" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "fpr_operand" "") + (match_dup 3)] + UNSPEC_MLOGIC))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MAND);") + + (define_expand "mor" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "fpr_operand" "") + (match_dup 3)] + UNSPEC_MLOGIC))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MOR);") + + (define_expand "mxor" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "fpr_operand" "") + (match_dup 3)] + UNSPEC_MLOGIC))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MXOR);") + + (define_insn "*mlogic" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MLOGIC))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MAND: return \"mand %1, %2, %0\"; + case FRV_BUILTIN_MOR: return \"mor %1, %2, %0\"; + case FRV_BUILTIN_MXOR: return \"mxor %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mlogic\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mlogic")]) + + (define_insn "*cond_exec_mlogic" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") + (match_operand:SI 4 "fpr_operand" "f") + (match_operand:SI 5 "const_int_operand" "n")] + UNSPEC_MLOGIC)))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[5])) + { + default: break; + case FRV_BUILTIN_MAND: return \"cmand %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MOR: return \"cmor %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MXOR: return \"cmxor %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_mlogic\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mlogic")]) + + ;; Logical not: type "mlogic" + + (define_insn "mnot" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MNOT))] + "TARGET_MEDIA" + "mnot %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mlogic")]) + + (define_insn "*cond_exec_mnot" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 3 "fpr_operand" "f")] UNSPEC_MNOT)))] + "TARGET_MEDIA" + "cmnot %3, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "mlogic")]) + + ;; Dual average (halfword): type "maveh" + + (define_insn "maveh" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f")] + UNSPEC_MAVEH))] + "TARGET_MEDIA" + "maveh %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "maveh")]) + + ;; Dual saturation (halfword): type "msath" + + (define_expand "msaths" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 3)] + UNSPEC_MSATH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MSATHS);") + + (define_expand "msathu" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 3)] + UNSPEC_MSATH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MSATHU);") + + (define_insn "*msath" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MSATH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MSATHS: return \"msaths %1, %2, %0\"; + case FRV_BUILTIN_MSATHU: return \"msathu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, msath\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "msath")]) + + ;; Dual addition/subtraction with saturation (halfword): type "maddh" + + (define_expand "maddhss" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 3)] + UNSPEC_MADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MADDHSS);") + + (define_expand "maddhus" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 3)] + UNSPEC_MADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MADDHUS);") + + (define_expand "msubhss" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 3)] + UNSPEC_MADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MSUBHSS);") + + (define_expand "msubhus" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 3)] + UNSPEC_MADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MSUBHUS);") + + (define_insn "*maddh" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MADDH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MADDHSS: return \"maddhss %1, %2, %0\"; + case FRV_BUILTIN_MADDHUS: return \"maddhus %1, %2, %0\"; + case FRV_BUILTIN_MSUBHSS: return \"msubhss %1, %2, %0\"; + case FRV_BUILTIN_MSUBHUS: return \"msubhus %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, maddh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "maddh")]) + + (define_insn "*cond_exec_maddh" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") + (match_operand:SI 4 "fpr_operand" "f") + (match_operand:SI 5 "const_int_operand" "n")] + UNSPEC_MADDH)))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[5])) + { + default: break; + case FRV_BUILTIN_MADDHSS: return \"cmaddhss %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MADDHUS: return \"cmaddhus %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MSUBHSS: return \"cmsubhss %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MSUBHUS: return \"cmsubhus %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_maddh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "maddh")]) + + ;; Quad addition/subtraction with saturation (halfword): type "mqaddh" + + (define_expand "mqaddhss" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 3)] + UNSPEC_MQADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MQADDHSS);") + + (define_expand "mqaddhus" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 3)] + UNSPEC_MQADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MQADDHUS);") + + (define_expand "mqsubhss" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 3)] + UNSPEC_MQADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MQSUBHSS);") + + (define_expand "mqsubhus" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 3)] + UNSPEC_MQADDH))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MQSUBHUS);") + + (define_insn "*mqaddh" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MQADDH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MQADDHSS: return \"mqaddhss %1, %2, %0\"; + case FRV_BUILTIN_MQADDHUS: return \"mqaddhus %1, %2, %0\"; + case FRV_BUILTIN_MQSUBHSS: return \"mqsubhss %1, %2, %0\"; + case FRV_BUILTIN_MQSUBHUS: return \"mqsubhus %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mqaddh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqaddh")]) + + (define_insn "*cond_exec_mqaddh" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:DI 2 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 3 "even_fpr_operand" "h") + (match_operand:DI 4 "even_fpr_operand" "h") + (match_operand:SI 5 "const_int_operand" "n")] + UNSPEC_MQADDH)))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[5])) + { + default: break; + case FRV_BUILTIN_MQADDHSS: return \"cmqaddhss %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MQADDHUS: return \"cmqaddhus %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MQSUBHSS: return \"cmqsubhss %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MQSUBHUS: return \"cmqsubhus %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_mqaddh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqaddh")]) + + ;; Pack halfword: type "mpackh" + + (define_insn "mpackh" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:HI 1 "fpr_operand" "f") + (match_operand:HI 2 "fpr_operand" "f")] + UNSPEC_MPACKH))] + "TARGET_MEDIA" + "mpackh %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mpackh")]) + + ;; Unpack halfword: type "mpackh" + + (define_insn "munpackh" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f")] + UNSPEC_MUNPACKH))] + "TARGET_MEDIA" + "munpackh %1, %0" + [(set_attr "length" "4") + (set_attr "type" "munpackh")]) + + ;; Dual pack halfword: type "mdpackh" + + (define_insn "mdpackh" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h")] + UNSPEC_MDPACKH))] + "TARGET_MEDIA" + "mdpackh %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mdpackh")]) + + ;; Byte-halfword conversion: type "mbhconv" + + (define_insn "mbtoh" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f")] + UNSPEC_MBTOH))] + "TARGET_MEDIA" + "mbtoh %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mbhconv")]) + + (define_insn "*cond_exec_mbtoh" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:DI 2 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:SI 3 "fpr_operand" "f")] + UNSPEC_MBTOH)))] + "TARGET_MEDIA" + "cmbtoh %3, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "mbhconv")]) + + (define_insn "mhtob" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:DI 1 "even_fpr_operand" "h")] + UNSPEC_MHTOB))] + "TARGET_MEDIA" + "mhtob %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mbhconv")]) + + (define_insn "*cond_exec_mhtob" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "fpr_operand" "=f") + (unspec:SI [(match_operand:DI 3 "even_fpr_operand" "h")] + UNSPEC_MHTOB)))] + "TARGET_MEDIA" + "cmhtob %3, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "mbhconv")]) + + ;; Rotate: type "mrot" + + (define_expand "mrotli" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "uint5_operand" "") + (match_dup 3)] + UNSPEC_MROT))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MROTLI);") + + (define_expand "mrotri" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "uint5_operand" "") + (match_dup 3)] + UNSPEC_MROT))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MROTRI);") + + (define_insn "*mrot" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "uint5_operand" "I") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MROT))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MROTLI: return \"mrotli %1, %2, %0\"; + case FRV_BUILTIN_MROTRI: return \"mrotri %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mrot\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mrot")]) + + ;; Dual shift halfword: type "msh" + + (define_expand "msllhi" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "uint4_operand" "") + (match_dup 3)] + UNSPEC_MSHIFT))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MSLLHI);") + + (define_expand "msrlhi" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "uint4_operand" "") + (match_dup 3)] + UNSPEC_MSHIFT))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MSRLHI);") + + (define_expand "msrahi" + [(set (match_operand:SI 0 "fpr_operand" "") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "") + (match_operand:SI 2 "uint4_operand" "") + (match_dup 3)] + UNSPEC_MSHIFT))] + "TARGET_MEDIA" + "operands[3] = GEN_INT (FRV_BUILTIN_MSRAHI);") + + (define_insn "*mshift" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "uint4_operand" "I") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MSHIFT))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MSLLHI: return \"msllhi %1, %2, %0\"; + case FRV_BUILTIN_MSRLHI: return \"msrlhi %1, %2, %0\"; + case FRV_BUILTIN_MSRAHI: return \"msrahi %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mshift\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mshift")]) + + ;; Expand halfword to word: type "mexpdhw" + + (define_insn "mexpdhw" + [(set (match_operand:SI 0 "even_fpr_operand" "=h") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "uint1_operand" "I")] + UNSPEC_MEXPDHW))] + "TARGET_MEDIA" + "mexpdhw %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mexpdhw")]) + + (define_insn "*cond_exec_mexpdhw" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:SI 2 "even_fpr_operand" "=h") + (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") + (match_operand:SI 4 "uint1_operand" "I")] + UNSPEC_MEXPDHW)))] + "TARGET_MEDIA" + "cmexpdhw %3, %4, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "mexpdhw")]) + + ;; Expand halfword to double: type "mexpdhd" + + (define_insn "mexpdhd" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "uint1_operand" "I")] + UNSPEC_MEXPDHD))] + "TARGET_MEDIA" + "mexpdhd %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mexpdhd")]) + + (define_insn "*cond_exec_mexpdhd" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (set (match_operand:DI 2 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:SI 3 "fpr_operand" "f") + (match_operand:SI 4 "uint1_operand" "I")] + UNSPEC_MEXPDHD)))] + "TARGET_MEDIA" + "cmexpdhd %3, %4, %2, %1, %e0" + [(set_attr "length" "4") + (set_attr "type" "mexpdhd")]) + + ;; FR cut: type "mwcut" + + (define_insn "mwcut" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:DI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_or_int6_operand" "fI")] + UNSPEC_MWCUT))] + "TARGET_MEDIA" + "mwcut%i2 %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mwcut")]) + + ;; Dual multiplication (halfword): type "mmulh" + + (define_expand "mmulhs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MMULH)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MMULH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMULHS);") + + (define_expand "mmulhu" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MMULH)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MMULH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMULHU);") + + (define_insn "*mmulh" + [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MMULH)) + (set (match_operand:HI 4 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MMULH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MMULHS: return \"mmulhs %1, %2, %0\"; + case FRV_BUILTIN_MMULHU: return \"mmulhu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mmulh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mmulh")]) + + (define_insn "*cond_exec_mmulh" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (parallel [(set (match_operand:DI 2 "even_acc_operand" "=b") + (unspec:DI [(match_operand:SI 3 "fpr_operand" "f") + (match_operand:SI 4 "fpr_operand" "f") + (match_operand:SI 5 "const_int_operand" "n")] + UNSPEC_MMULH)) + (set (match_operand:HI 6 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MMULH))]))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[5])) + { + default: break; + case FRV_BUILTIN_MMULHS: return \"cmmulhs %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MMULHU: return \"cmmulhu %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_mmulh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mmulh")]) + + ;; Dual cross multiplication (halfword): type "mmulxh" + + (define_expand "mmulxhs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MMULXH)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MMULXH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMULXHS);") + + (define_expand "mmulxhu" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MMULXH)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MMULXH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMULXHU);") + + (define_insn "*mmulxh" + [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MMULXH)) + (set (match_operand:HI 4 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MMULXH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MMULXHS: return \"mmulxhs %1, %2, %0\"; + case FRV_BUILTIN_MMULXHU: return \"mmulxhu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mmulxh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mmulxh")]) + + ;; Dual product-sum (halfword): type "mmach" + + (define_expand "mmachs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") + (unspec:DI [(match_dup 0) + (match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:HI 3 "accg_operand" "+B") + (match_dup 4)] + UNSPEC_MMACH)) + (set (match_dup 3) + (unspec:HI [(const_int 0)] UNSPEC_MMACH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMACHS);") + + (define_expand "mmachu" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") + (unspec:DI [(match_dup 0) + (match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:HI 3 "accg_operand" "+B") + (match_dup 4)] + UNSPEC_MMACH)) + (set (match_dup 3) + (unspec:HI [(const_int 0)] UNSPEC_MMACH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMACHU);") + + (define_insn "*mmach" + [(set (match_operand:DI 0 "even_acc_operand" "+b") + (unspec:DI [(match_dup 0) + (match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:HI 3 "accg_operand" "+B") + (match_operand:SI 4 "const_int_operand" "n")] + UNSPEC_MMACH)) + (set (match_dup 3) (unspec:HI [(const_int 0)] UNSPEC_MMACH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[4])) + { + default: break; + case FRV_BUILTIN_MMACHS: return \"mmachs %1, %2, %0\"; + case FRV_BUILTIN_MMACHU: return \"mmachu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mmach\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mmach")]) + + (define_insn "*cond_exec_mmach" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (parallel [(set (match_operand:DI 2 "even_acc_operand" "+b") + (unspec:DI [(match_dup 2) + (match_operand:SI 3 "fpr_operand" "f") + (match_operand:SI 4 "fpr_operand" "f") + (match_operand:HI 5 "accg_operand" "+B") + (match_operand:SI 6 "const_int_operand" "n")] + UNSPEC_MMACH)) + (set (match_dup 5) + (unspec:HI [(const_int 0)] UNSPEC_MMACH))]))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[6])) + { + default: break; + case FRV_BUILTIN_MMACHS: return \"cmmachs %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MMACHU: return \"cmmachu %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_mmach\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mmach")]) + + ;; Dual product-difference: type "mmrdh" + + (define_expand "mmrdhs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") + (unspec:DI [(match_dup 0) + (match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:HI 3 "accg_operand" "+B") + (match_dup 4)] + UNSPEC_MMRDH)) + (set (match_dup 3) + (unspec:HI [(const_int 0)] UNSPEC_MMRDH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMRDHS);") + + (define_expand "mmrdhu" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") + (unspec:DI [(match_dup 0) + (match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:HI 3 "accg_operand" "+B") + (match_dup 4)] + UNSPEC_MMRDH)) + (set (match_dup 3) + (unspec:HI [(const_int 0)] UNSPEC_MMRDH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MMRDHU);") + + (define_insn "*mmrdh" + [(set (match_operand:DI 0 "even_acc_operand" "+b") + (unspec:DI [(match_dup 0) + (match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:HI 3 "accg_operand" "+B") + (match_operand:SI 4 "const_int_operand" "n")] + UNSPEC_MMRDH)) + (set (match_dup 3) + (unspec:HI [(const_int 0)] UNSPEC_MMRDH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[4])) + { + default: break; + case FRV_BUILTIN_MMRDHS: return \"mmrdhs %1, %2, %0\"; + case FRV_BUILTIN_MMRDHU: return \"mmrdhu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mrdh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mmrdh")]) + + ;; Quad multiply (halfword): type "mqmulh" + + (define_expand "mqmulhs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 4)] + UNSPEC_MQMULH)) + (set (match_operand:V4QI 3 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQMULHS);") + + (define_expand "mqmulhu" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 4)] + UNSPEC_MQMULH)) + (set (match_operand:V4QI 3 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQMULHU);") + + (define_insn "*mqmulh" + [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MQMULH)) + (set (match_operand:V4QI 4 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MQMULHS: return \"mqmulhs %1, %2, %0\"; + case FRV_BUILTIN_MQMULHU: return \"mqmulhu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mqmulh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqmulh")]) + + (define_insn "*cond_exec_mqmulh" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (parallel [(set (match_operand:V4SI 2 "quad_acc_operand" "=A") + (unspec:V4SI [(match_operand:DI 3 "even_fpr_operand" "h") + (match_operand:DI 4 "even_fpr_operand" "h") + (match_operand:SI 5 "const_int_operand" "n")] + UNSPEC_MQMULH)) + (set (match_operand:V4QI 6 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))]))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[5])) + { + default: break; + case FRV_BUILTIN_MQMULHS: return \"cmqmulhs %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MQMULHU: return \"cmqmulhu %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_mqmulh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqmulh")]) + + ;; Quad cross multiply (halfword): type "mqmulxh" + + (define_expand "mqmulxhs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 4)] + UNSPEC_MQMULXH)) + (set (match_operand:V4QI 3 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MQMULXH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQMULXHS);") + + (define_expand "mqmulxhu" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_dup 4)] + UNSPEC_MQMULXH)) + (set (match_operand:V4QI 3 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MQMULXH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQMULXHU);") + + (define_insn "*mqmulxh" + [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MQMULXH)) + (set (match_operand:V4QI 4 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MQMULXH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MQMULXHS: return \"mqmulxhs %1, %2, %0\"; + case FRV_BUILTIN_MQMULXHU: return \"mqmulxhu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mqmulxh\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqmulxh")]) + + ;; Quad product-sum (halfword): type "mqmach" + + (define_expand "mqmachs" + [(parallel [(set (match_operand:V4SI 0 "even_acc_operand" "+A") + (unspec:V4SI [(match_dup 0) + (match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_operand:V4QI 3 "accg_operand" "+B") + (match_dup 4)] + UNSPEC_MQMACH)) + (set (match_dup 3) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQMACHS);") + + (define_expand "mqmachu" + [(parallel [(set (match_operand:V4SI 0 "even_acc_operand" "+A") + (unspec:V4SI [(match_dup 0) + (match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_operand:V4QI 3 "accg_operand" "+B") + (match_dup 4)] + UNSPEC_MQMACH)) + (set (match_dup 3) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQMACHU);") + + (define_insn "*mqmach" + [(set (match_operand:V4SI 0 "even_acc_operand" "+A") + (unspec:V4SI [(match_dup 0) + (match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_operand:V4QI 3 "accg_operand" "+B") + (match_operand:SI 4 "const_int_operand" "n")] + UNSPEC_MQMACH)) + (set (match_dup 3) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[4])) + { + default: break; + case FRV_BUILTIN_MQMACHS: return \"mqmachs %1, %2, %0\"; + case FRV_BUILTIN_MQMACHU: return \"mqmachu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mqmach\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqmach")]) + + (define_insn "*cond_exec_mqmach" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (parallel [(set (match_operand:V4SI 2 "even_acc_operand" "+A") + (unspec:V4SI [(match_dup 2) + (match_operand:DI 3 "even_fpr_operand" "h") + (match_operand:DI 4 "even_fpr_operand" "h") + (match_operand:V4QI 5 "accg_operand" "+B") + (match_operand:SI 6 "const_int_operand" "n")] + UNSPEC_MQMACH)) + (set (match_dup 5) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))]))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[6])) + { + default: break; + case FRV_BUILTIN_MQMACHS: return \"cmqmachs %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MQMACHU: return \"cmqmachu %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_mqmach\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqmach")]) + + ;; Dual complex number product-sum (halfword) + + (define_expand "mcpxrs" + [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MCPX)) + (set (match_operand:QI 3 "accg_operand" "=B") + (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MCPXRS);") + + (define_expand "mcpxru" + [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MCPX)) + (set (match_operand:QI 3 "accg_operand" "=B") + (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MCPXRU);") + + (define_expand "mcpxis" + [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MCPX)) + (set (match_operand:QI 3 "accg_operand" "=B") + (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MCPXIS);") + + (define_expand "mcpxiu" + [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MCPX)) + (set (match_operand:QI 3 "accg_operand" "=B") + (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MCPXIU);") + + (define_insn "*mcpx" + [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MCPX)) + (set (match_operand:QI 4 "accg_operand" "=B") + (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MCPXRS: return \"mcpxrs %1, %2, %0\"; + case FRV_BUILTIN_MCPXRU: return \"mcpxru %1, %2, %0\"; + case FRV_BUILTIN_MCPXIS: return \"mcpxis %1, %2, %0\"; + case FRV_BUILTIN_MCPXIU: return \"mcpxiu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mcpx\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mcpx")]) + + (define_insn "*cond_exec_mcpx" + [(cond_exec + (match_operator 0 "ccr_eqne_operator" + [(match_operand 1 "cr_operand" "C") + (const_int 0)]) + (parallel [(set (match_operand:SI 2 "acc_operand" "=a") + (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") + (match_operand:SI 4 "fpr_operand" "f") + (match_operand:SI 5 "const_int_operand" "n")] + UNSPEC_MCPX)) + (set (match_operand:QI 6 "accg_operand" "=B") + (unspec:QI [(const_int 0)] UNSPEC_MCPX))]))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[5])) + { + default: break; + case FRV_BUILTIN_MCPXRS: return \"cmcpxrs %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MCPXRU: return \"cmcpxru %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MCPXIS: return \"cmcpxis %3, %4, %2, %1, %e0\"; + case FRV_BUILTIN_MCPXIU: return \"cmcpxiu %3, %4, %2, %1, %e0\"; + } + + fatal_insn (\"Bad media insn, cond_exec_mcpx\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mcpx")]) + + ;; Quad complex number product-sum (halfword): type "mqcpx" + + (define_expand "mqcpxrs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") + (match_operand:DI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MQCPX)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXRS);") + + (define_expand "mqcpxru" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") + (match_operand:DI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MQCPX)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXRU);") + + (define_expand "mqcpxis" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") + (match_operand:DI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MQCPX)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXIS);") + + (define_expand "mqcpxiu" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") + (match_operand:DI 2 "fpr_operand" "f") + (match_dup 4)] + UNSPEC_MQCPX)) + (set (match_operand:HI 3 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXIU);") + + (define_insn "*mqcpx" + [(set (match_operand:DI 0 "even_acc_operand" "=b") + (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") + (match_operand:DI 2 "fpr_operand" "f") + (match_operand:SI 3 "const_int_operand" "n")] + UNSPEC_MQCPX)) + (set (match_operand:HI 4 "accg_operand" "=B") + (unspec:HI [(const_int 0)] UNSPEC_MQCPX))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[3])) + { + default: break; + case FRV_BUILTIN_MQCPXRS: return \"mqcpxrs %1, %2, %0\"; + case FRV_BUILTIN_MQCPXRU: return \"mqcpxru %1, %2, %0\"; + case FRV_BUILTIN_MQCPXIS: return \"mqcpxis %1, %2, %0\"; + case FRV_BUILTIN_MQCPXIU: return \"mqcpxiu %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mqcpx\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqcpx")]) + + ;; Cut: type "mcut" + + (define_expand "mcut" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "acc_operand" "a") + (match_operand:SI 2 "fpr_or_int6_operand" "fI") + (match_operand:QI 3 "accg_operand" "B") + (match_dup 4)] + UNSPEC_MCUT))] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MCUT);") + + (define_expand "mcutss" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "acc_operand" "a") + (match_operand:SI 2 "fpr_or_int6_operand" "fI") + (match_operand:QI 3 "accg_operand" "B") + (match_dup 4)] + UNSPEC_MCUT))] + "TARGET_MEDIA" + "operands[4] = GEN_INT (FRV_BUILTIN_MCUTSS);") + + (define_insn "*mcut" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "acc_operand" "a") + (match_operand:SI 2 "fpr_or_int6_operand" "fI") + (match_operand:QI 3 "accg_operand" "B") + (match_operand:SI 4 "const_int_operand" "n")] + UNSPEC_MCUT))] + "TARGET_MEDIA" + "* + { + switch (INTVAL (operands[4])) + { + default: break; + case FRV_BUILTIN_MCUT: return \"mcut%i2 %1, %2, %0\"; + case FRV_BUILTIN_MCUTSS: return \"mcutss%i2 %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mcut\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mcut")]) + + ;; Accumulator read: type "mrdacc" + + (define_insn "mrdacc" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "acc_operand" "a")] UNSPEC_MRDACC))] + "TARGET_MEDIA" + "mrdacc %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mrdacc")]) + + (define_insn "mrdaccg" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:QI 1 "accg_operand" "B")] UNSPEC_MRDACCG))] + "TARGET_MEDIA" + "mrdaccg %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mrdacc")]) + + ;; Accumulator write: type "mwtacc" + + (define_insn "mwtacc" + [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MWTACC))] + "TARGET_MEDIA" + "mwtacc %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mwtacc")]) + + (define_insn "mwtaccg" + [(set (match_operand:QI 0 "accg_operand" "=B") + (unspec:QI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MWTACCG))] + "TARGET_MEDIA" + "mwtaccg %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mwtacc")]) + + ;; Trap: This one executes on the control unit, not the media units. + + (define_insn "mtrap" + [(unspec_volatile [(const_int 0)] UNSPEC_MTRAP)] + "TARGET_MEDIA" + "mtrap" + [(set_attr "length" "4") + (set_attr "type" "trap")]) + + ;; Clear single accumulator: type "mclracc" + + (define_insn "mclracc_internal" + [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(const_int 0)] UNSPEC_MCLRACC)) + (set (match_operand:QI 1 "accg_operand" "=B") + (unspec:QI [(const_int 0)] UNSPEC_MCLRACC))] + "TARGET_MEDIA" + "mclracc %0,#0" + [(set_attr "length" "4") + (set_attr "type" "mclracc")]) + + (define_expand "mclracc" + [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") + (unspec:SI [(const_int 0)] UNSPEC_MCLRACC)) + (set (match_dup 1) + (unspec:QI [(const_int 0)] UNSPEC_MCLRACC))])] + "TARGET_MEDIA" + " + { + if (GET_CODE (operands[0]) != REG || !ACC_P (REGNO (operands[0]))) + FAIL; + + operands[1] = frv_matching_accg_for_acc (operands[0]); + }") + + ;; Clear all accumulators: type "mclracca" + + (define_insn "mclracca8_internal" + [(set (match_operand:V4SI 0 "quad_acc_operand" "=b") + (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_operand:V4SI 1 "quad_acc_operand" "=b") + (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_operand:V4QI 2 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_operand:V4QI 3 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))] + "TARGET_MEDIA && TARGET_ACC_8" + "mclracc acc0,#1" + [(set_attr "length" "4") + (set_attr "type" "mclracca")]) + + (define_insn "mclracca4_internal" + [(set (match_operand:V4SI 0 "quad_acc_operand" "=b") + (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_operand:V4QI 1 "accg_operand" "=B") + (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))] + "TARGET_MEDIA && TARGET_ACC_4" + "mclracc acc0,#1" + [(set_attr "length" "4") + (set_attr "type" "mclracca")]) + + (define_expand "mclracca8" + [(parallel [(set (match_dup 0) (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_dup 1) (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_dup 2) (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_dup 3) (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))])] + "TARGET_MEDIA && TARGET_ACC_8" + " + { + operands[0] = gen_rtx_REG (V4SImode, ACC_FIRST); + operands[1] = gen_rtx_REG (V4SImode, ACC_FIRST + 4); + operands[2] = gen_rtx_REG (V4QImode, ACCG_FIRST); + operands[3] = gen_rtx_REG (V4QImode, ACCG_FIRST + 4); + }") + + (define_expand "mclracca4" + [(parallel [(set (match_dup 0) (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) + (set (match_dup 1) (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))])] + "TARGET_MEDIA && TARGET_ACC_4" + " + { + operands[0] = gen_rtx_REG (V4SImode, ACC_FIRST); + operands[1] = gen_rtx_REG (V4QImode, ACCG_FIRST); + }") + + (define_insn "mcop1" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f")] UNSPEC_MCOP1))] + "TARGET_MEDIA_REV1" + "mcop1 %1, %2, %0" + [(set_attr "length" "4") + ;; What is the class of the insn ??? + (set_attr "type" "multi")]) + + (define_insn "mcop2" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") + (match_operand:SI 2 "fpr_operand" "f")] UNSPEC_MCOP2))] + "TARGET_MEDIA_REV1" + "mcop2 %1, %2, %0" + [(set_attr "length" "4") + ;; What is the class of the insn ??? + (set_attr "type" "multi")]) + + (define_insn "*mdunpackh_internal" + [(set (match_operand:V4SI 0 "quad_fpr_operand" "=x") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h")] + UNSPEC_MDUNPACKH_INTERNAL))] + "TARGET_MEDIA_REV1" + "mdunpackh %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mdunpackh")]) + + (define_insn_and_split "mdunpackh" + [(set (match_operand:V4SI 0 "memory_operand" "=o") + (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h")] + UNSPEC_MDUNPACKH)) + (clobber (match_scratch:V4SI 2 "=x"))] + "TARGET_MEDIA_REV1" + "#" + "reload_completed" + [(set (match_dup 2) + (unspec:V4SI [(match_dup 1)] UNSPEC_MDUNPACKH_INTERNAL)) + (set (match_dup 3) + (match_dup 4)) + (set (match_dup 5) + (match_dup 6))] + " + { + operands[3] = change_address (operands[0], DImode, NULL_RTX); + operands[4] = gen_rtx_REG (DImode, REGNO (operands[2])); + operands[5] = frv_index_memory (operands[0], DImode, 1); + operands[6] = gen_rtx_REG (DImode, REGNO (operands[2])+2); + }" + [(set_attr "length" "20") + (set_attr "type" "multi")]) + + (define_insn "*mbtohe_internal" + [(set (match_operand:V4SI 0 "quad_fpr_operand" "=x") + (unspec:V4SI [(match_operand:SI 1 "fpr_operand" "f")] + UNSPEC_MBTOHE_INTERNAL))] + "TARGET_MEDIA_REV1" + "mbtohe %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mbhconve")]) + + (define_insn_and_split "mbtohe" + [(set (match_operand:V4SI 0 "memory_operand" "=o") + (unspec:V4SI [(match_operand:SI 1 "fpr_operand" "f")] + UNSPEC_MBTOHE)) + (clobber (match_scratch:V4SI 2 "=x"))] + "TARGET_MEDIA_REV1" + "#" + "reload_completed" + [(set (match_dup 2) + (unspec:V4SI [(match_dup 1)] UNSPEC_MBTOHE_INTERNAL)) + (set (match_dup 3) + (match_dup 4)) + (set (match_dup 5) + (match_dup 6))] + " + { + operands[3] = change_address (operands[0], DImode, NULL_RTX); + operands[4] = gen_rtx_REG (DImode, REGNO (operands[2])); + operands[5] = frv_index_memory (operands[0], DImode, 1); + operands[6] = gen_rtx_REG (DImode, REGNO (operands[2])+2); + }" + [(set_attr "length" "20") + (set_attr "type" "multi")]) + + ;; Quad product-sum (halfword) instructions only found on the FR400. + ;; type "mqmach" + + (define_expand "mqxmachs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") + (unspec:V4SI [(match_dup 0) + (match_operand:DI 1 "even_fpr_operand" "") + (match_operand:DI 2 "even_fpr_operand" "") + (match_operand:V4QI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MQMACH2)) + (set (match_dup 3) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MQXMACHS);") + + (define_expand "mqxmacxhs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") + (unspec:V4SI [(match_dup 0) + (match_operand:DI 1 "even_fpr_operand" "") + (match_operand:DI 2 "even_fpr_operand" "") + (match_operand:V4QI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MQMACH2)) + (set (match_dup 3) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MQXMACXHS);") + + (define_expand "mqmacxhs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") + (unspec:V4SI [(match_dup 0) + (match_operand:DI 1 "even_fpr_operand" "") + (match_operand:DI 2 "even_fpr_operand" "") + (match_operand:V4QI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MQMACH2)) + (set (match_dup 3) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MQMACXHS);") + + (define_insn "*mqmach2" + [(set (match_operand:V4SI 0 "quad_acc_operand" "+A") + (unspec:V4SI [(match_dup 0) + (match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h") + (match_operand:V4QI 3 "accg_operand" "+B") + (match_operand:SI 4 "const_int_operand" "n")] + UNSPEC_MQMACH2)) + (set (match_dup 3) + (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))] + "TARGET_MEDIA_REV2" + "* + { + switch (INTVAL (operands[4])) + { + default: break; + case FRV_BUILTIN_MQXMACHS: return \"mqxmachs %1, %2, %0\"; + case FRV_BUILTIN_MQXMACXHS: return \"mqxmacxhs %1, %2, %0\"; + case FRV_BUILTIN_MQMACXHS: return \"mqmacxhs %1, %2, %0\"; + } + + fatal_insn (\"Bad media insn, mqmach2\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mqmach")]) + + ;; Accumulator addition/subtraction: type "maddacc" + + (define_expand "maddaccs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "") + (unspec:DI [(match_dup 0) + (match_operand:DI 1 "even_acc_operand" "")] + UNSPEC_MADDACC)) + (set (match_operand:HI 2 "accg_operand" "") + (unspec:HI [(match_dup 2) + (match_operand:HI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MADDACC))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MADDACCS);") + + (define_expand "msubaccs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "") + (unspec:DI [(match_dup 0) + (match_operand:DI 1 "even_acc_operand" "")] + UNSPEC_MADDACC)) + (set (match_operand:HI 2 "accg_operand" "") + (unspec:HI [(match_dup 2) + (match_operand:HI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MADDACC))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MSUBACCS);") + + (define_expand "masaccs" + [(parallel [(set (match_operand:DI 0 "even_acc_operand" "") + (unspec:DI [(match_dup 0) + (match_operand:DI 1 "even_acc_operand" "")] + UNSPEC_MADDACC)) + (set (match_operand:HI 2 "accg_operand" "") + (unspec:HI [(match_dup 2) + (match_operand:HI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MADDACC))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MASACCS);") + + (define_insn "*maddacc" + [(set (match_operand:DI 0 "even_acc_operand" "+b") + (unspec:DI [(match_dup 0) + (match_operand:DI 1 "even_acc_operand" "b")] + UNSPEC_MADDACC)) + (set (match_operand:HI 2 "accg_operand" "+B") + (unspec:HI [(match_dup 2) + (match_operand:HI 3 "accg_operand" "B") + (match_operand:SI 4 "const_int_operand" "n")] + UNSPEC_MADDACC))] + "TARGET_MEDIA_REV2" + "* + { + switch (INTVAL (operands[4])) + { + default: break; + case FRV_BUILTIN_MADDACCS: return \"maddaccs %1, %0\"; + case FRV_BUILTIN_MSUBACCS: return \"msubaccs %1, %0\"; + case FRV_BUILTIN_MASACCS: return \"masaccs %1, %0\"; + } + + fatal_insn (\"Bad media insn, maddacc\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "maddacc")]) + + ;; Dual accumulator addition/subtraction: type "mdaddacc" + + (define_expand "mdaddaccs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") + (unspec:V4SI [(match_dup 0) + (match_operand:V4SI 1 "quad_acc_operand" "")] + UNSPEC_MDADDACC)) + (set (match_operand:V4QI 2 "accg_operand" "") + (unspec:V4QI [(match_dup 2) + (match_operand:V4QI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MDADDACC))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MDADDACCS);") + + (define_expand "mdsubaccs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") + (unspec:V4SI [(match_dup 0) + (match_operand:V4SI 1 "quad_acc_operand" "")] + UNSPEC_MDADDACC)) + (set (match_operand:V4QI 2 "accg_operand" "") + (unspec:V4QI [(match_dup 2) + (match_operand:V4QI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MDADDACC))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MDSUBACCS);") + + (define_expand "mdasaccs" + [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") + (unspec:V4SI [(match_dup 0) + (match_operand:V4SI 1 "quad_acc_operand" "")] + UNSPEC_MDADDACC)) + (set (match_operand:V4QI 2 "accg_operand" "") + (unspec:V4QI [(match_dup 2) + (match_operand:V4QI 3 "accg_operand" "") + (match_dup 4)] + UNSPEC_MDADDACC))])] + "TARGET_MEDIA_REV2" + "operands[4] = GEN_INT (FRV_BUILTIN_MDASACCS);") + + (define_insn "*mdaddacc" + [(set (match_operand:V4SI 0 "quad_acc_operand" "+A") + (unspec:V4SI [(match_dup 0) + (match_operand:V4SI 1 "quad_acc_operand" "A")] + UNSPEC_MDADDACC)) + (set (match_operand:V4QI 2 "accg_operand" "+B") + (unspec:V4QI [(match_dup 2) + (match_operand:V4QI 3 "accg_operand" "B") + (match_operand:SI 4 "const_int_operand" "n")] + UNSPEC_MDADDACC))] + "TARGET_MEDIA_REV2" + "* + { + switch (INTVAL (operands[4])) + { + default: break; + case FRV_BUILTIN_MDADDACCS: return \"mdaddaccs %1, %0\"; + case FRV_BUILTIN_MDSUBACCS: return \"mdsubaccs %1, %0\"; + case FRV_BUILTIN_MDASACCS: return \"mdasaccs %1, %0\"; + } + + fatal_insn (\"Bad media insn, mdaddacc\", insn); + }" + [(set_attr "length" "4") + (set_attr "type" "mdaddacc")]) + + ;; Dual absolute (halfword): type "mabsh" + + (define_insn "mabshs" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MABSHS))] + "TARGET_MEDIA_REV2" + "mabshs %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mabsh")]) + + ;; Dual rotate: type "mdrot" + + (define_insn "mdrotli" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:SI 2 "uint5_operand" "I")] + UNSPEC_MDROTLI))] + "TARGET_MEDIA_REV2" + "mdrotli %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mdrot")]) + + ;; Dual coupling (concatenation): type "mcpl" + + (define_insn "mcplhi" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:DI 1 "fpr_operand" "h") + (match_operand:SI 2 "uint4_operand" "I")] + UNSPEC_MCPLHI))] + "TARGET_MEDIA_REV2" + "mcplhi %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mcpl")]) + + (define_insn "mcpli" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:DI 1 "fpr_operand" "h") + (match_operand:SI 2 "uint5_operand" "I")] + UNSPEC_MCPLI))] + "TARGET_MEDIA_REV2" + "mcpli %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mcpl")]) + + ;; Dual cut: type "mdcut" + + (define_insn "mdcutssi" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_acc_operand" "b") + (match_operand:SI 2 "int6_operand" "I") + (match_operand:HI 3 "accg_operand" "B")] + UNSPEC_MDCUTSSI))] + "TARGET_MEDIA_REV2" + "mdcutssi %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mdcut")]) + + ;; Quad saturate (halfword): type "mqsath" + + (define_insn "mqsaths" + [(set (match_operand:DI 0 "even_fpr_operand" "=h") + (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") + (match_operand:DI 2 "even_fpr_operand" "h")] + UNSPEC_MQSATHS))] + "TARGET_MEDIA_REV2" + "mqsaths %1, %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mqsath")]) + + ;; Set hi/lo instrctions: type "mset" + + (define_insn "mhsetlos" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") + (match_operand:SI 2 "int12_operand" "NOP")] + UNSPEC_MHSETLOS))] + "TARGET_MEDIA_REV2" + "mhsetlos %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mset")]) + + (define_insn "mhsetloh" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") + (match_operand:SI 2 "int5_operand" "I")] + UNSPEC_MHSETLOH))] + "TARGET_MEDIA_REV2" + "mhsetloh %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mset")]) + + (define_insn "mhsethis" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") + (match_operand:SI 2 "int12_operand" "NOP")] + UNSPEC_MHSETHIS))] + "TARGET_MEDIA_REV2" + "mhsethis %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mset")]) + + (define_insn "mhsethih" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") + (match_operand:SI 2 "int5_operand" "I")] + UNSPEC_MHSETHIH))] + "TARGET_MEDIA_REV2" + "mhsethih %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mset")]) + + (define_insn "mhdsets" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "int12_operand" "NOP")] + UNSPEC_MHDSETS))] + "TARGET_MEDIA_REV2" + "mhdsets %1, %0" + [(set_attr "length" "4") + (set_attr "type" "mset")]) + + (define_insn "mhdseth" + [(set (match_operand:SI 0 "fpr_operand" "=f") + (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") + (match_operand:SI 2 "int5_operand" "I")] + UNSPEC_MHDSETH))] + "TARGET_MEDIA_REV2" + "mhdseth %2, %0" + [(set_attr "length" "4") + (set_attr "type" "mset")]) diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frv-modes.def gcc-3.3/gcc/config/frv/frv-modes.def *** gcc-3.2.3/gcc/config/frv/frv-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frv-modes.def 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + /* Definitions of target machine for GNU compiler for FRV. + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* On the FRV, the CC modes used are: + + CCmode set ICC's from comparing signed integers + CC_UNSmode set ICC's from comparing unsigned integers + CC_FPmode set FCC's from comparing floating point + CC_CCRmode set CCR's to do conditional execution */ + + CC (CC_UNS) + CC (CC_FP) + CC (CC_CCR) diff -Nrc3pad gcc-3.2.3/gcc/config/frv/frv-protos.h gcc-3.3/gcc/config/frv/frv-protos.h *** gcc-3.2.3/gcc/config/frv/frv-protos.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/frv-protos.h 2002-10-20 22:37:09.000000000 +0000 *************** *** 0 **** --- 1,247 ---- + /* Frv prototypes. + Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Define the information needed to generate branch and scc insns. This is + stored from the compare operation. Note that we can't use "rtx" here + since it hasn't been defined! */ + + /* Define global data defined in frv.c */ + extern const char *frv_branch_cost_string; /* -mbranch-cost option */ + extern int frv_branch_cost_int; /* value of -mbranch_cost */ + + extern const char *frv_cpu_string; /* -mcpu= option */ + + extern const char *frv_condexec_insns_str; /* -mcond-exec-insns= option */ + extern int frv_condexec_insns; /* value of -mcond-exec-insns */ + + extern const char *frv_condexec_temps_str; /* -mcond-exec-temps= option */ + extern int frv_condexec_temps; /* value of -mcond-exec-temps */ + + extern const char *frv_sched_lookahead_str; /* -msched-lookahead= option */ + extern int frv_sched_lookahead; /* value -msched-lookahead= */ + + /* CPU type. This must be identical to the cpu enumeration in frv.md. */ + typedef enum frv_cpu + { + FRV_CPU_GENERIC, + FRV_CPU_FR500, + FRV_CPU_FR400, + FRV_CPU_FR300, + FRV_CPU_SIMPLE, + FRV_CPU_TOMCAT + } frv_cpu_t; + + extern frv_cpu_t frv_cpu_type; /* value of -mcpu= */ + + /* Define functions defined in frv.c */ + extern void frv_expand_prologue PARAMS ((void)); + extern void frv_expand_epilogue PARAMS ((int)); + extern void frv_override_options PARAMS ((void)); + extern void frv_optimization_options PARAMS ((int, int)); + extern void frv_conditional_register_usage PARAMS ((void)); + extern frv_stack_t *frv_stack_info PARAMS ((void)); + extern void frv_debug_stack PARAMS ((frv_stack_t *)); + extern int frv_frame_pointer_required PARAMS ((void)); + extern int frv_initial_elimination_offset PARAMS ((int, int)); + + #ifdef RTX_CODE + extern int frv_legitimate_address_p PARAMS ((enum machine_mode, rtx, + int, int)); + extern rtx frv_legitimize_address PARAMS ((rtx, rtx, + enum machine_mode)); + + #ifdef TREE_CODE + extern void frv_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, + rtx, int, int)); + + extern int frv_function_arg_boundary PARAMS ((enum machine_mode, tree)); + extern rtx frv_function_arg PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int, int)); + + extern void frv_function_arg_advance PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); + + extern int frv_function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); + + extern int frv_function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); + + extern int frv_function_arg_callee_copies PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); + + extern int frv_function_arg_keep_as_reference PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); + + extern rtx frv_expand_builtin_saveregs PARAMS ((void)); + extern void frv_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int *, int)); + + extern void frv_expand_builtin_va_start PARAMS ((tree, rtx)); + extern rtx frv_expand_builtin_va_arg PARAMS ((tree, tree)); + #endif /* TREE_CODE */ + + extern int frv_expand_block_move PARAMS ((rtx *)); + extern int frv_expand_block_clear PARAMS ((rtx *)); + extern rtx frv_dynamic_chain_address PARAMS ((rtx)); + extern rtx frv_return_addr_rtx PARAMS ((int, rtx)); + extern rtx frv_index_memory PARAMS ((rtx, + enum machine_mode, + int)); + extern const char *frv_asm_output_opcode + PARAMS ((FILE *, const char *)); + extern void frv_final_prescan_insn PARAMS ((rtx, rtx *, int)); + extern void frv_print_operand PARAMS ((FILE *, rtx, int)); + extern void frv_print_operand_address PARAMS ((FILE *, rtx)); + extern int frv_emit_movsi PARAMS ((rtx, rtx)); + extern const char *output_move_single PARAMS ((rtx *, rtx)); + extern const char *output_move_double PARAMS ((rtx *, rtx)); + extern const char *output_condmove_single + PARAMS ((rtx *, rtx)); + extern int frv_emit_cond_branch PARAMS ((enum rtx_code, rtx)); + extern int frv_emit_scc PARAMS ((enum rtx_code, rtx)); + extern rtx frv_split_scc PARAMS ((rtx, rtx, rtx, rtx, + HOST_WIDE_INT)); + extern int frv_emit_cond_move PARAMS ((rtx, rtx, rtx, rtx)); + extern rtx frv_split_cond_move PARAMS ((rtx *)); + extern rtx frv_split_minmax PARAMS ((rtx *)); + extern rtx frv_split_abs PARAMS ((rtx *)); + extern void frv_split_double_load PARAMS ((rtx, rtx)); + extern void frv_split_double_store PARAMS ((rtx, rtx)); + #ifdef BLOCK_HEAD + extern void frv_ifcvt_init_extra_fields PARAMS ((ce_if_block_t *)); + extern void frv_ifcvt_modify_tests PARAMS ((ce_if_block_t *, + rtx *, rtx *)); + extern void frv_ifcvt_modify_multiple_tests + PARAMS ((ce_if_block_t *, + basic_block, + rtx *, rtx *)); + extern rtx frv_ifcvt_modify_insn PARAMS ((ce_if_block_t *, + rtx, rtx)); + extern void frv_ifcvt_modify_final PARAMS ((ce_if_block_t *)); + extern void frv_ifcvt_modify_cancel PARAMS ((ce_if_block_t *)); + #endif + extern int frv_trampoline_size PARAMS ((void)); + extern void frv_initialize_trampoline PARAMS ((rtx, rtx, rtx)); + extern enum reg_class frv_secondary_reload_class + PARAMS ((enum reg_class class, + enum machine_mode mode, + rtx x, int)); + extern int frv_class_likely_spilled_p PARAMS ((enum reg_class class)); + extern int frv_hard_regno_mode_ok PARAMS ((int, enum machine_mode)); + extern int frv_hard_regno_nregs PARAMS ((int, enum machine_mode)); + extern int frv_class_max_nregs PARAMS ((enum reg_class class, + enum machine_mode mode)); + extern int frv_legitimate_constant_p PARAMS ((rtx)); + #endif /* RTX_CODE */ + + extern int direct_return_p PARAMS ((void)); + extern int frv_register_move_cost PARAMS ((enum reg_class, enum reg_class)); + + #ifdef TREE_CODE + extern int frv_adjust_field_align PARAMS ((tree, int)); + #endif + + extern void fixup_section PARAMS ((void)); + extern void sdata_section PARAMS ((void)); + extern void sbss_section PARAMS ((void)); + extern void const_section PARAMS ((void)); + extern void data_section PARAMS ((void)); + + #ifdef RTX_CODE + extern int integer_register_operand PARAMS ((rtx, enum machine_mode)); + extern int frv_load_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_or_fpr_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_no_subreg_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_or_int6_operand PARAMS ((rtx, enum machine_mode)); + extern int fpr_or_int6_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_or_int_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_or_int12_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_fpr_or_int12_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_or_int10_operand PARAMS ((rtx, enum machine_mode)); + extern int move_source_operand PARAMS ((rtx, enum machine_mode)); + extern int move_destination_operand PARAMS ((rtx, enum machine_mode)); + extern int condexec_source_operand PARAMS ((rtx, enum machine_mode)); + extern int condexec_dest_operand PARAMS ((rtx, enum machine_mode)); + extern int lr_operand PARAMS ((rtx, enum machine_mode)); + extern int gpr_or_memory_operand PARAMS ((rtx, enum machine_mode)); + extern int fpr_or_memory_operand PARAMS ((rtx, enum machine_mode)); + extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode)); + extern int fcc_operand PARAMS ((rtx, enum machine_mode)); + extern int icc_operand PARAMS ((rtx, enum machine_mode)); + extern int cc_operand PARAMS ((rtx, enum machine_mode)); + extern int fcr_operand PARAMS ((rtx, enum machine_mode)); + extern int icr_operand PARAMS ((rtx, enum machine_mode)); + extern int cr_operand PARAMS ((rtx, enum machine_mode)); + extern int call_operand PARAMS ((rtx, enum machine_mode)); + extern int fpr_operand PARAMS ((rtx, enum machine_mode)); + extern int even_reg_operand PARAMS ((rtx, enum machine_mode)); + extern int odd_reg_operand PARAMS ((rtx, enum machine_mode)); + extern int even_gpr_operand PARAMS ((rtx, enum machine_mode)); + extern int odd_gpr_operand PARAMS ((rtx, enum machine_mode)); + extern int quad_fpr_operand PARAMS ((rtx, enum machine_mode)); + extern int even_fpr_operand PARAMS ((rtx, enum machine_mode)); + extern int odd_fpr_operand PARAMS ((rtx, enum machine_mode)); + extern int dbl_memory_one_insn_operand PARAMS ((rtx, enum machine_mode)); + extern int dbl_memory_two_insn_operand PARAMS ((rtx, enum machine_mode)); + extern int int12_operand PARAMS ((rtx, enum machine_mode)); + extern int int6_operand PARAMS ((rtx, enum machine_mode)); + extern int int5_operand PARAMS ((rtx, enum machine_mode)); + extern int uint5_operand PARAMS ((rtx, enum machine_mode)); + extern int uint4_operand PARAMS ((rtx, enum machine_mode)); + extern int uint1_operand PARAMS ((rtx, enum machine_mode)); + extern int int_2word_operand PARAMS ((rtx, enum machine_mode)); + extern int pic_register_operand PARAMS ((rtx, enum machine_mode)); + extern int pic_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int small_data_register_operand PARAMS ((rtx, enum machine_mode)); + extern int small_data_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int upper_int16_operand PARAMS ((rtx, enum machine_mode)); + extern int uint16_operand PARAMS ((rtx, enum machine_mode)); + extern int relational_operator PARAMS ((rtx, enum machine_mode)); + extern int signed_relational_operator PARAMS ((rtx, enum machine_mode)); + extern int unsigned_relational_operator PARAMS ((rtx, enum machine_mode)); + extern int float_relational_operator PARAMS ((rtx, enum machine_mode)); + extern int ccr_eqne_operator PARAMS ((rtx, enum machine_mode)); + extern int minmax_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_si_binary_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_si_media_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_si_divide_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_si_unary_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_sf_conv_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_sf_add_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_memory_operand PARAMS ((rtx, enum machine_mode)); + extern int intop_compare_operator PARAMS ((rtx, enum machine_mode)); + extern int condexec_intop_cmp_operator PARAMS ((rtx, enum machine_mode)); + extern int acc_operand PARAMS ((rtx, enum machine_mode)); + extern int even_acc_operand PARAMS ((rtx, enum machine_mode)); + extern int quad_acc_operand PARAMS ((rtx, enum machine_mode)); + extern int accg_operand PARAMS ((rtx, enum machine_mode)); + extern rtx frv_matching_accg_for_acc PARAMS ((rtx)); + extern void frv_machine_dependent_reorg PARAMS ((rtx)); + #endif + diff -Nrc3pad gcc-3.2.3/gcc/config/frv/lib1funcs.asm gcc-3.3/gcc/config/frv/lib1funcs.asm *** gcc-3.2.3/gcc/config/frv/lib1funcs.asm 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/lib1funcs.asm 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,275 ---- + /* Library functions. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software ; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation * either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY ; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + + + #ifdef L_cmpll + /* icc0 = __cmpll (long long a, long long b) */ + + .file "_cmpll.s" + .globl EXT(__cmpll) + .type EXT(__cmpll),@function + .text + .p2align 4 + EXT(__cmpll): + cmp gr8, gr10, icc0 + ckeq icc0, cc4 + P(ccmp) gr9, gr11, cc4, 1 + ret + .Lend: + .size EXT(__cmpll),.Lend-EXT(__cmpll) + #endif /* L_cmpll */ + + #ifdef L_cmpf + /* icc0 = __cmpf (float a, float b) */ + /* Note, because this function returns the result in ICC0, it means it can't + handle NaNs. */ + + .file "_cmpf.s" + .globl EXT(__cmpf) + .type EXT(__cmpf),@function + .text + .p2align 4 + EXT(__cmpf): + #ifdef __FRV_HARD_FLOAT__ /* floating point instructions available */ + movgf gr8, fr0 + P(movgf) gr9, fr1 + setlos #1, gr8 + fcmps fr0, fr1, fcc0 + P(fcklt) fcc0, cc0 + fckeq fcc0, cc1 + csub gr0, gr8, gr8, cc0, 1 + cmov gr0, gr8, cc1, 1 + cmpi gr8, 0, icc0 + ret + #else /* no floating point instructions available */ + movsg lr, gr4 + addi sp, #-16, sp + sti gr4, @(sp, 8) + st fp, @(sp, gr0) + mov sp, fp + call EXT(__cmpsf2) + cmpi gr8, #0, icc0 + ldi @(sp, 8), gr4 + movgs gr4, lr + ld @(sp,gr0), fp + addi sp, #16, sp + ret + #endif + .Lend: + .size EXT(__cmpf),.Lend-EXT(__cmpf) + #endif + + #ifdef L_cmpd + /* icc0 = __cmpd (double a, double b) */ + /* Note, because this function returns the result in ICC0, it means it can't + handle NaNs. */ + + .file "_cmpd.s" + .globl EXT(__cmpd) + .type EXT(__cmpd),@function + .text + .p2align 4 + EXT(__cmpd): + movsg lr, gr4 + addi sp, #-16, sp + sti gr4, @(sp, 8) + st fp, @(sp, gr0) + mov sp, fp + call EXT(__cmpdf2) + cmpi gr8, #0, icc0 + ldi @(sp, 8), gr4 + movgs gr4, lr + ld @(sp,gr0), fp + addi sp, #16, sp + ret + .Lend: + .size EXT(__cmpd),.Lend-EXT(__cmpd) + #endif + + #ifdef L_addll + /* gr8,gr9 = __addll (long long a, long long b) */ + /* Note, gcc will never call this function, but it is present in case an + ABI program calls it. */ + + .file "_addll.s" + .globl EXT(__addll) + .type EXT(__addll),@function + .text + .p2align + EXT(__addll): + addcc gr9, gr11, gr9, icc0 + addx gr8, gr10, gr8, icc0 + ret + .Lend: + .size EXT(__addll),.Lend-EXT(__addll) + #endif + + #ifdef L_subll + /* gr8,gr9 = __subll (long long a, long long b) */ + /* Note, gcc will never call this function, but it is present in case an + ABI program calls it. */ + + .file "_subll.s" + .globl EXT(__subll) + .type EXT(__subll),@function + .text + .p2align 4 + EXT(__subll): + subcc gr9, gr11, gr9, icc0 + subx gr8, gr10, gr8, icc0 + ret + .Lend: + .size EXT(__subll),.Lend-EXT(__subll) + #endif + + #ifdef L_andll + /* gr8,gr9 = __andll (long long a, long long b) */ + /* Note, gcc will never call this function, but it is present in case an + ABI program calls it. */ + + .file "_andll.s" + .globl EXT(__andll) + .type EXT(__andll),@function + .text + .p2align 4 + EXT(__andll): + P(and) gr9, gr11, gr9 + P2(and) gr8, gr10, gr8 + ret + .Lend: + .size EXT(__andll),.Lend-EXT(__andll) + #endif + + #ifdef L_orll + /* gr8,gr9 = __orll (long long a, long long b) */ + /* Note, gcc will never call this function, but it is present in case an + ABI program calls it. */ + + .file "_orll.s" + .globl EXT(__orll) + .type EXT(__orll),@function + .text + .p2align 4 + EXT(__orll): + P(or) gr9, gr11, gr9 + P2(or) gr8, gr10, gr8 + ret + .Lend: + .size EXT(__orll),.Lend-EXT(__orll) + #endif + + #ifdef L_xorll + /* gr8,gr9 = __xorll (long long a, long long b) */ + /* Note, gcc will never call this function, but it is present in case an + ABI program calls it. */ + + .file "_xorll.s" + .globl EXT(__xorll) + .type EXT(__xorll),@function + .text + .p2align 4 + EXT(__xorll): + P(xor) gr9, gr11, gr9 + P2(xor) gr8, gr10, gr8 + ret + .Lend: + .size EXT(__xorll),.Lend-EXT(__xorll) + #endif + + #ifdef L_notll + /* gr8,gr9 = __notll (long long a) */ + /* Note, gcc will never call this function, but it is present in case an + ABI program calls it. */ + + .file "_notll.s" + .globl EXT(__notll) + .type EXT(__notll),@function + .text + .p2align 4 + EXT(__notll): + P(not) gr9, gr9 + P2(not) gr8, gr8 + ret + .Lend: + .size EXT(__notll),.Lend-EXT(__notll) + #endif + + #ifdef L_cmov + /* (void) __cmov (char *dest, const char *src, size_t len) */ + /* + * void __cmov (char *dest, const char *src, size_t len) + * { + * size_t i; + * + * if (dest < src || dest > src+len) + * { + * for (i = 0; i < len; i++) + * dest[i] = src[i]; + * } + * else + * { + * while (len-- > 0) + * dest[len] = src[len]; + * } + * } + */ + + .file "_cmov.s" + .globl EXT(__cmov) + .type EXT(__cmov),@function + .text + .p2align 4 + EXT(__cmov): + P(cmp) gr8, gr9, icc0 + add gr9, gr10, gr4 + P(cmp) gr8, gr4, icc1 + bc icc0, 0, .Lfwd + bls icc1, 0, .Lback + .Lfwd: + /* move bytes in a forward direction */ + P(setlos) #0, gr5 + cmp gr0, gr10, icc0 + P(subi) gr9, #1, gr9 + P2(subi) gr8, #1, gr8 + bnc icc0, 0, .Lret + .Lfloop: + /* forward byte move loop */ + addi gr5, #1, gr5 + P(ldsb) @(gr9, gr5), gr4 + cmp gr5, gr10, icc0 + P(stb) gr4, @(gr8, gr5) + bc icc0, 0, .Lfloop + ret + .Lbloop: + /* backward byte move loop body */ + ldsb @(gr9,gr10),gr4 + stb gr4,@(gr8,gr10) + .Lback: + P(cmpi) gr10, #0, icc0 + addi gr10, #-1, gr10 + bne icc0, 0, .Lbloop + .Lret: + ret + .Lend: + .size EXT(__cmov),.Lend-EXT(__cmov) + #endif diff -Nrc3pad gcc-3.2.3/gcc/config/frv/modi.c gcc-3.3/gcc/config/frv/modi.c *** gcc-3.2.3/gcc/config/frv/modi.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/modi.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + int __modi (int a, int b) + { + return a % b; + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/t-frv gcc-3.3/gcc/config/frv/t-frv *** gcc-3.2.3/gcc/config/frv/t-frv 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/t-frv 2002-08-05 11:41:05.000000000 +0000 *************** *** 0 **** --- 1,93 ---- + # Name of assembly file containing libgcc1 functions. + # This entry must be present, but it can be empty if the target does + # not need any assembler functions to support its code generation. + # + # Alternatively if assembler functions *are* needed then define the + # entries below: + CROSS_LIBGCC1 = libgcc1-asm.a + LIB1ASMSRC = frv/lib1funcs.asm + LIB1ASMFUNCS = _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov + LIB2FUNCS_EXTRA = cmovh.c cmovw.c cmovd.c modi.c umodi.c uitof.c uitod.c ulltof.c ulltod.c + + # We want fine grained libraries, so use the new code to build the + # floating point emulation libraries. + FPBIT = fp-bit.c + DPBIT = dp-bit.c + + # If any special flags are necessary when building libgcc2 put them here. + TARGET_LIBGCC2_CFLAGS = + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#include "frv/frv-abi.h"' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#include "frv/frv-abi.h"' > dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + + cmovh.c: $(srcdir)/config/frv/cmovh.c + $(LN_S) $(srcdir)/config/frv/cmovh.c . + + cmovw.c: $(srcdir)/config/frv/cmovw.c + $(LN_S) $(srcdir)/config/frv/cmovw.c . + + cmovd.c: $(srcdir)/config/frv/cmovd.c + $(LN_S) $(srcdir)/config/frv/cmovd.c . + + modi.c: $(srcdir)/config/frv/modi.c + $(LN_S) $(srcdir)/config/frv/modi.c . + + umodi.c: $(srcdir)/config/frv/umodi.c + $(LN_S) $(srcdir)/config/frv/umodi.c . + + uitof.c: $(srcdir)/config/frv/uitof.c + $(LN_S) $(srcdir)/config/frv/uitof.c . + + uitod.c: $(srcdir)/config/frv/uitod.c + $(LN_S) $(srcdir)/config/frv/uitod.c . + + ulltof.c: $(srcdir)/config/frv/ulltof.c + $(LN_S) $(srcdir)/config/frv/ulltof.c . + + ulltod.c: $(srcdir)/config/frv/ulltod.c + $(LN_S) $(srcdir)/config/frv/ulltod.c . + + # Build frvbegin.o and frvend.o + EXTRA_MULTILIB_PARTS=frvbegin.o frvend.o + + # Compile two additional files that are linked with every program + # linked using GCC on systems using COFF or ELF, for the sake of C++ + # constructors. + + FRVSTUFF_CFLAGS = $(TARGET_LIBGCC2_CFLAGS) + + $(T)frvbegin$(objext): $(srcdir)/config/frv/frvbegin.c $(GCC_PASSES) \ + $(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \ + -c $(srcdir)/config/frv/frvbegin.c -o $(T)frvbegin$(objext) + + $(T)frvend$(objext): $(srcdir)/config/frv/frvend.c $(GCC_PASSES) \ + $(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \ + -c $(srcdir)/config/frv/frvend.c -o $(T)frvend$(objext) + + # Enable the following if multilibs are needed. + # See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a + # description of the options and their values. + # + #MULTILIB_OPTIONS = mcpu=fr500/mcpu=tomcat/mcpu=simple/mcpu=frv msoft-float mdword/mno-dword + #MULTILIB_DIRNAMES = fr500 tomcat simple frv nof dw no-dw + #MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 mno-double=mcpu?fr500 mcpu?frv=mdouble + #MULTILIB_EXCEPTIONS = *mcpu=simple/*msoft-float* *mcpu=frv/*msoft-float* + #MULTILIB_EXTRA_OPTS = mlibrary-pic + + MULTILIB_OPTIONS = mcpu=frv/mcpu=fr400/mcpu=simple mno-pack mlibrary-pic + MULTILIB_DIRNAMES = frv fr400 simple unpacked pic + MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 mlibrary-pic=fpic mlibrary-pic=fPIC + MULTILIB_EXCEPTIONS = mcpu=frv/mno-pack* mcpu=simple/mno-pack* + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib + + EXTRA_HEADERS = $(srcdir)/config/frv/frv-asm.h $(srcdir)/config/frv/media.h diff -Nrc3pad gcc-3.2.3/gcc/config/frv/uitod.c gcc-3.3/gcc/config/frv/uitod.c *** gcc-3.2.3/gcc/config/frv/uitod.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/uitod.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + double __uitod (unsigned int a) + { + return a; + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/uitof.c gcc-3.3/gcc/config/frv/uitof.c *** gcc-3.2.3/gcc/config/frv/uitof.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/uitof.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + float __uitof (unsigned int a) + { + return a; + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/ulltod.c gcc-3.3/gcc/config/frv/ulltod.c *** gcc-3.2.3/gcc/config/frv/ulltod.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/ulltod.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + double __ulltod (unsigned long long a) + { + return a; + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/ulltof.c gcc-3.3/gcc/config/frv/ulltof.c *** gcc-3.2.3/gcc/config/frv/ulltof.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/ulltof.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + float __ulltof (unsigned long long a) + { + return a; + } diff -Nrc3pad gcc-3.2.3/gcc/config/frv/umodi.c gcc-3.3/gcc/config/frv/umodi.c *** gcc-3.2.3/gcc/config/frv/umodi.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/frv/umodi.c 2002-08-04 19:37:03.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + unsigned int __umodi (unsigned int a, unsigned int b) + { + return a % b; + } diff -Nrc3pad gcc-3.2.3/gcc/config/gnu.h gcc-3.3/gcc/config/gnu.h *** gcc-3.2.3/gcc/config/gnu.h 1999-09-15 21:41:13.000000000 +0000 --- gcc-3.3/gcc/config/gnu.h 2002-04-15 20:44:32.000000000 +0000 *************** *** 13,18 **** --- 13,19 ---- #define STANDARD_INCLUDE_DIR "/include" /* Implicit library calls should use memcpy, not bcopy, etc. */ + #undef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS /* The system headers under GNU are C++-aware. */ diff -Nrc3pad gcc-3.2.3/gcc/config/gofast.h gcc-3.3/gcc/config/gofast.h *** gcc-3.2.3/gcc/config/gofast.h 2001-08-18 19:59:46.000000000 +0000 --- gcc-3.3/gcc/config/gofast.h 2002-03-08 02:57:13.000000000 +0000 *************** *** 1,5 **** /* US Software GOFAST floating point library support. ! Copyright (C) 1994, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* US Software GOFAST floating point library support. ! Copyright (C) 1994, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 43,48 **** --- 43,53 ---- neg_optab->handlers[(int) mode].libfunc = NULL_RTX; \ } while (0) + /* GCC does not use fpcmp/dpcmp for gt or ge because its own + FP-emulation library returns +1 for both > and unord. So we leave + gt and ge unset, such that, instead of fpcmp(a,b) >[=], we generate + fpcmp(b,a) <[=] 0, which is unambiguous. For unord libfuncs, we + use our own functions, since GOFAST doesn't supply them. */ #define GOFAST_RENAME_LIBCALLS \ add_optab->handlers[(int) SFmode].libfunc = init_one_libfunc ("fpadd"); \ add_optab->handlers[(int) DFmode].libfunc = init_one_libfunc ("dpadd"); \ *************** Boston, MA 02111-1307, USA. */ *** 58,74 **** extendsfdf2_libfunc = init_one_libfunc ("fptodp"); \ truncdfsf2_libfunc = init_one_libfunc ("dptofp"); \ \ eqsf2_libfunc = init_one_libfunc ("fpcmp"); \ nesf2_libfunc = init_one_libfunc ("fpcmp"); \ ! gtsf2_libfunc = init_one_libfunc ("fpcmp"); \ ! gesf2_libfunc = init_one_libfunc ("fpcmp"); \ ltsf2_libfunc = init_one_libfunc ("fpcmp"); \ lesf2_libfunc = init_one_libfunc ("fpcmp"); \ \ eqdf2_libfunc = init_one_libfunc ("dpcmp"); \ nedf2_libfunc = init_one_libfunc ("dpcmp"); \ ! gtdf2_libfunc = init_one_libfunc ("dpcmp"); \ ! gedf2_libfunc = init_one_libfunc ("dpcmp"); \ ltdf2_libfunc = init_one_libfunc ("dpcmp"); \ ledf2_libfunc = init_one_libfunc ("dpcmp"); \ \ --- 63,86 ---- extendsfdf2_libfunc = init_one_libfunc ("fptodp"); \ truncdfsf2_libfunc = init_one_libfunc ("dptofp"); \ \ + eqhf2_libfunc = NULL_RTX; \ + nehf2_libfunc = NULL_RTX; \ + gthf2_libfunc = NULL_RTX; \ + gehf2_libfunc = NULL_RTX; \ + lthf2_libfunc = NULL_RTX; \ + lehf2_libfunc = NULL_RTX; \ + \ eqsf2_libfunc = init_one_libfunc ("fpcmp"); \ nesf2_libfunc = init_one_libfunc ("fpcmp"); \ ! gtsf2_libfunc = NULL_RTX; \ ! gesf2_libfunc = NULL_RTX; \ ltsf2_libfunc = init_one_libfunc ("fpcmp"); \ lesf2_libfunc = init_one_libfunc ("fpcmp"); \ \ eqdf2_libfunc = init_one_libfunc ("dpcmp"); \ nedf2_libfunc = init_one_libfunc ("dpcmp"); \ ! gtdf2_libfunc = NULL_RTX; \ ! gedf2_libfunc = NULL_RTX; \ ltdf2_libfunc = init_one_libfunc ("dpcmp"); \ ledf2_libfunc = init_one_libfunc ("dpcmp"); \ \ diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/crti.asm gcc-3.3/gcc/config/h8300/crti.asm *** gcc-3.2.3/gcc/config/h8300/crti.asm 2001-08-31 10:24:46.000000000 +0000 --- gcc-3.3/gcc/config/h8300/crti.asm 2002-05-03 12:28:40.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- ! /* Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 50,53 **** __init: .section .fini .global __fini ! __fini: --- 50,53 ---- __init: .section .fini .global __fini ! __fini: diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/elf.h gcc-3.3/gcc/config/h8300/elf.h *** gcc-3.2.3/gcc/config/h8300/elf.h 2001-12-11 18:21:03.000000000 +0000 --- gcc-3.3/gcc/config/h8300/elf.h 2002-06-03 00:51:36.000000000 +0000 *************** *** 1,5 **** ! #undef SUBTARGET_CPP_SPEC ! #define SUBTARGET_CPP_SPEC "-D__ELF__" /* Undefine some macros defined in h8300 that conflict with elfos.h . */ #undef SDB_DEBUGGING_INFO --- 1,10 ---- ! /* Target OS preprocessor built-ins. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__ELF__"); \ ! } \ ! while (0) /* Undefine some macros defined in h8300 that conflict with elfos.h . */ #undef SDB_DEBUGGING_INFO *************** *** 9,15 **** #undef CTORS_SECTION_ASM_OP #undef DTORS_SECTION_ASM_OP #undef INIT_SECTION_ASM_OP ! #undef READONLY_DATA_SECTION #undef TARGET_ASM_NAMED_SECTION #undef TARGET_MEM_FUNCTIONS #undef PREFERRED_DEBUGGING_TYPE --- 14,20 ---- #undef CTORS_SECTION_ASM_OP #undef DTORS_SECTION_ASM_OP #undef INIT_SECTION_ASM_OP ! #undef READONLY_DATA_SECTION_ASM_OP #undef TARGET_ASM_NAMED_SECTION #undef TARGET_MEM_FUNCTIONS #undef PREFERRED_DEBUGGING_TYPE diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/fixunssfsi.c gcc-3.3/gcc/config/h8300/fixunssfsi.c *** gcc-3.2.3/gcc/config/h8300/fixunssfsi.c 2002-01-02 07:57:15.000000000 +0000 --- gcc-3.3/gcc/config/h8300/fixunssfsi.c 2002-09-13 20:35:07.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 30,36 **** /* The libgcc2.c implementation gets confused by our type setup and creates a directly recursive call, so we do our own implementation. For ! the H8/300, that's in lib1funcs.asm, for H8/300H and H8/S, it's here. */ #ifndef __H8300__ long --- 30,36 ---- /* The libgcc2.c implementation gets confused by our type setup and creates a directly recursive call, so we do our own implementation. For ! the H8/300, that's in lib1funcs.asm, for H8/300H and H8S, it's here. */ #ifndef __H8300__ long diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/h8300.c gcc-3.3/gcc/config/h8300/h8300.c *** gcc-3.2.3/gcc/config/h8300/h8300.c 2002-02-23 14:17:25.000000000 +0000 --- gcc-3.3/gcc/config/h8300/h8300.c 2003-03-28 15:21:01.000000000 +0000 *************** *** 1,6 **** /* Subroutines for insn-output.c for Hitachi H8/300. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! 2001, 2002 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). --- 1,6 ---- /* Subroutines for insn-output.c for Hitachi H8/300. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). *************** static const char *byte_reg PARAMS ((rtx *** 48,68 **** static int h8300_interrupt_function_p PARAMS ((tree)); static int h8300_monitor_function_p PARAMS ((tree)); static int h8300_os_task_function_p PARAMS ((tree)); ! static void dosize PARAMS ((FILE *, const char *, unsigned int)); static int round_frame_size PARAMS ((int)); static unsigned int compute_saved_regs PARAMS ((void)); static void push PARAMS ((FILE *, int)); static void pop PARAMS ((FILE *, int)); static const char *cond_string PARAMS ((enum rtx_code)); const struct attribute_spec h8300_attribute_table[]; static tree h8300_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree h8300_handle_eightbit_data_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree h8300_handle_tiny_data_attribute PARAMS ((tree *, tree, tree, int, bool *)); static void h8300_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void h8300_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); #ifndef OBJECT_FORMAT_ELF static void h8300_asm_named_section PARAMS ((const char *, unsigned int)); #endif /* CPU_TYPE, says what cpu we're compiling for. */ int cpu_type; --- 48,73 ---- static int h8300_interrupt_function_p PARAMS ((tree)); static int h8300_monitor_function_p PARAMS ((tree)); static int h8300_os_task_function_p PARAMS ((tree)); ! static void dosize PARAMS ((FILE *, int, unsigned int)); static int round_frame_size PARAMS ((int)); static unsigned int compute_saved_regs PARAMS ((void)); static void push PARAMS ((FILE *, int)); static void pop PARAMS ((FILE *, int)); static const char *cond_string PARAMS ((enum rtx_code)); + static unsigned int h8300_asm_insn_count PARAMS ((const char *)); const struct attribute_spec h8300_attribute_table[]; static tree h8300_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree h8300_handle_eightbit_data_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree h8300_handle_tiny_data_attribute PARAMS ((tree *, tree, tree, int, bool *)); static void h8300_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void h8300_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void h8300_insert_attributes PARAMS ((tree, tree *)); #ifndef OBJECT_FORMAT_ELF static void h8300_asm_named_section PARAMS ((const char *, unsigned int)); #endif + static void h8300_encode_label PARAMS ((tree)); + static void h8300_encode_section_info PARAMS ((tree, int)); + static const char *h8300_strip_name_encoding PARAMS ((const char *)); /* CPU_TYPE, says what cpu we're compiling for. */ int cpu_type; *************** const char *h8_push_op, *h8_pop_op, *h8_ *** 110,118 **** --- 115,290 ---- #define TARGET_ASM_FUNCTION_PROLOGUE h8300_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE h8300_output_function_epilogue + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO h8300_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING h8300_strip_name_encoding + + #undef TARGET_INSERT_ATTRIBUTES + #define TARGET_INSERT_ATTRIBUTES h8300_insert_attributes struct gcc_target targetm = TARGET_INITIALIZER; + /* See below where shifts are handled for explanation of this enum. */ + + enum shift_alg + { + SHIFT_INLINE, + SHIFT_ROT_AND, + SHIFT_SPECIAL, + SHIFT_LOOP + }; + + /* Symbols of the various shifts which can be used as indices. */ + + enum shift_type + { + SHIFT_ASHIFT, SHIFT_LSHIFTRT, SHIFT_ASHIFTRT + }; + + /* Macros to keep the shift algorithm tables small. */ + #define INL SHIFT_INLINE + #define ROT SHIFT_ROT_AND + #define LOP SHIFT_LOOP + #define SPC SHIFT_SPECIAL + + /* The shift algorithms for each machine, mode, shift type, and shift + count are defined below. The three tables below correspond to + QImode, HImode, and SImode, respectively. Each table is organized + by, in the order of indecies, machine, shift type, and shift count. */ + + static enum shift_alg shift_alg_qi[3][3][8] = { + { + /* TARGET_H8300 */ + /* 0 1 2 3 4 5 6 7 */ + { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, LOP, LOP, SPC } /* SHIFT_ASHIFTRT */ + }, + { + /* TARGET_H8300H */ + /* 0 1 2 3 4 5 6 7 */ + { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, LOP, LOP, SPC } /* SHIFT_ASHIFTRT */ + }, + { + /* TARGET_H8300S */ + /* 0 1 2 3 4 5 6 7 */ + { INL, INL, INL, INL, INL, INL, ROT, ROT }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, INL, ROT, ROT }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, INL, INL, SPC } /* SHIFT_ASHIFTRT */ + } + }; + + static enum shift_alg shift_alg_hi[3][3][16] = { + { + /* TARGET_H8300 */ + /* 0 1 2 3 4 5 6 7 */ + /* 8 9 10 11 12 13 14 15 */ + { INL, INL, INL, INL, INL, INL, INL, SPC, + SPC, SPC, SPC, SPC, SPC, SPC, SPC, SPC }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, LOP, LOP, SPC, + SPC, SPC, SPC, SPC, SPC, SPC, SPC, SPC }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, LOP, LOP, SPC, + SPC, SPC, SPC, SPC, SPC, SPC, SPC, SPC }, /* SHIFT_ASHIFTRT */ + }, + { + /* TARGET_H8300H */ + /* 0 1 2 3 4 5 6 7 */ + /* 8 9 10 11 12 13 14 15 */ + { INL, INL, INL, INL, INL, INL, INL, SPC, + SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, INL, INL, SPC, + SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, INL, INL, SPC, + SPC, SPC, SPC, SPC, SPC, SPC, SPC, SPC }, /* SHIFT_ASHIFTRT */ + }, + { + /* TARGET_H8300S */ + /* 0 1 2 3 4 5 6 7 */ + /* 8 9 10 11 12 13 14 15 */ + { INL, INL, INL, INL, INL, INL, INL, INL, + SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, INL, INL, INL, + SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, INL, INL, INL, + SPC, SPC, SPC, SPC, SPC, SPC, SPC, SPC }, /* SHIFT_ASHIFTRT */ + } + }; + + static enum shift_alg shift_alg_si[3][3][32] = { + { + /* TARGET_H8300 */ + /* 0 1 2 3 4 5 6 7 */ + /* 8 9 10 11 12 13 14 15 */ + /* 16 17 18 19 20 21 22 23 */ + /* 24 25 26 27 28 29 30 31 */ + { INL, INL, INL, LOP, LOP, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, LOP, LOP, LOP, LOP, + SPC, SPC, SPC, SPC, SPC, LOP, LOP, LOP, + SPC, SPC, SPC, SPC, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFT */ + { INL, INL, INL, LOP, LOP, LOP, LOP, LOP, + SPC, SPC, LOP, LOP, LOP, LOP, LOP, SPC, + SPC, SPC, SPC, LOP, LOP, LOP, LOP, LOP, + SPC, SPC, SPC, SPC, SPC, LOP, LOP, SPC }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, LOP, LOP, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC, + SPC, SPC, LOP, LOP, LOP, LOP, LOP, LOP, + SPC, SPC, SPC, LOP, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ + }, + { + /* TARGET_H8300H */ + /* 0 1 2 3 4 5 6 7 */ + /* 8 9 10 11 12 13 14 15 */ + /* 16 17 18 19 20 21 22 23 */ + /* 24 25 26 27 28 29 30 31 */ + { INL, INL, INL, INL, INL, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC, + SPC, SPC, SPC, SPC, LOP, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, SPC, SPC, SPC, SPC }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC, + SPC, SPC, SPC, SPC, LOP, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, SPC, SPC, SPC, SPC }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, LOP, LOP, LOP, LOP, + SPC, SPC, SPC, SPC, LOP, LOP, LOP, LOP, + SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ + }, + { + /* TARGET_H8300S */ + /* 0 1 2 3 4 5 6 7 */ + /* 8 9 10 11 12 13 14 15 */ + /* 16 17 18 19 20 21 22 23 */ + /* 24 25 26 27 28 29 30 31 */ + { INL, INL, INL, INL, INL, INL, INL, INL, + INL, INL, INL, LOP, LOP, LOP, LOP, SPC, + SPC, SPC, SPC, SPC, SPC, SPC, LOP, LOP, + SPC, SPC, LOP, LOP, SPC, SPC, SPC, SPC }, /* SHIFT_ASHIFT */ + { INL, INL, INL, INL, INL, INL, INL, INL, + INL, INL, INL, LOP, LOP, LOP, LOP, SPC, + SPC, SPC, SPC, SPC, SPC, SPC, LOP, LOP, + SPC, SPC, LOP, LOP, SPC, SPC, SPC, SPC }, /* SHIFT_LSHIFTRT */ + { INL, INL, INL, INL, INL, INL, INL, INL, + INL, INL, INL, LOP, LOP, LOP, LOP, LOP, + SPC, SPC, SPC, SPC, SPC, SPC, LOP, LOP, + SPC, SPC, LOP, LOP, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ + } + }; + + #undef INL + #undef ROT + #undef LOP + #undef SPC + + enum h8_cpu + { + H8_300, + H8_300H, + H8_S + }; + /* Initialize various cpu specific globals at start up. */ void *************** h8300_init_once () *** 129,135 **** } else { ! /* For this we treat the H8/300H and H8/S the same. */ cpu_type = (int) CPU_H8300H; h8_reg_names = names_extended; } --- 301,307 ---- } else { ! /* For this we treat the H8/300H and H8S the same. */ cpu_type = (int) CPU_H8300H; h8_reg_names = names_extended; } *************** h8300_init_once () *** 140,146 **** if (!TARGET_H8300S && TARGET_MAC) { error ("-ms2600 is used without -ms"); ! target_flags |= 1; } } --- 312,358 ---- if (!TARGET_H8300S && TARGET_MAC) { error ("-ms2600 is used without -ms"); ! target_flags |= MASK_H8300S; ! } ! ! if (TARGET_H8300 && TARGET_NORMAL_MODE) ! { ! error ("-mn is used without -mh or -ms"); ! target_flags ^= MASK_NORMAL_MODE; ! } ! ! /* Some of the shifts are optimized for speed by default. ! See http://gcc.gnu.org/ml/gcc-patches/2002-07/msg01858.html ! If optimizing for size, change shift_alg for those shift to ! SHIFT_LOOP. */ ! if (optimize_size) ! { ! /* H8/300 */ ! shift_alg_hi[H8_300][SHIFT_ASHIFT][5] = SHIFT_LOOP; ! shift_alg_hi[H8_300][SHIFT_ASHIFT][6] = SHIFT_LOOP; ! shift_alg_hi[H8_300][SHIFT_ASHIFT][13] = SHIFT_LOOP; ! shift_alg_hi[H8_300][SHIFT_ASHIFT][14] = SHIFT_LOOP; ! ! shift_alg_hi[H8_300][SHIFT_LSHIFTRT][13] = SHIFT_LOOP; ! shift_alg_hi[H8_300][SHIFT_LSHIFTRT][14] = SHIFT_LOOP; ! ! shift_alg_hi[H8_300][SHIFT_ASHIFTRT][13] = SHIFT_LOOP; ! shift_alg_hi[H8_300][SHIFT_ASHIFTRT][14] = SHIFT_LOOP; ! ! /* H8/300H */ ! shift_alg_hi[H8_300H][SHIFT_ASHIFT][5] = SHIFT_LOOP; ! shift_alg_hi[H8_300H][SHIFT_ASHIFT][6] = SHIFT_LOOP; ! ! shift_alg_hi[H8_300H][SHIFT_LSHIFTRT][5] = SHIFT_LOOP; ! shift_alg_hi[H8_300H][SHIFT_LSHIFTRT][6] = SHIFT_LOOP; ! ! shift_alg_hi[H8_300H][SHIFT_ASHIFTRT][5] = SHIFT_LOOP; ! shift_alg_hi[H8_300H][SHIFT_ASHIFTRT][6] = SHIFT_LOOP; ! shift_alg_hi[H8_300H][SHIFT_ASHIFTRT][13] = SHIFT_LOOP; ! shift_alg_hi[H8_300H][SHIFT_ASHIFTRT][14] = SHIFT_LOOP; ! ! /* H8S */ ! shift_alg_hi[H8_S][SHIFT_ASHIFTRT][14] = SHIFT_LOOP; } } *************** byte_reg (x, b) *** 180,191 **** SIZE to adjust the stack pointer. */ static void ! dosize (file, op, size) FILE *file; ! const char *op; unsigned int size; { ! /* On the H8/300H and H8/S, for sizes <= 8 bytes, it is as good or better to use adds/subs insns rather than add.l/sub.l with an immediate value. --- 392,403 ---- SIZE to adjust the stack pointer. */ static void ! dosize (file, sign, size) FILE *file; ! int sign; unsigned int size; { ! /* On the H8/300H and H8S, for sizes <= 8 bytes, it is as good or better to use adds/subs insns rather than add.l/sub.l with an immediate value. *************** dosize (file, op, size) *** 196,203 **** || ((TARGET_H8300H || TARGET_H8300S) && size <= 8) || (TARGET_H8300 && interrupt_handler) || (TARGET_H8300 && current_function_needs_context ! && ! strcmp (op, "sub"))) { unsigned HOST_WIDE_INT amount; /* Try different amounts in descending order. */ --- 408,416 ---- || ((TARGET_H8300H || TARGET_H8300S) && size <= 8) || (TARGET_H8300 && interrupt_handler) || (TARGET_H8300 && current_function_needs_context ! && sign < 0)) { + const char *op = (sign > 0) ? "add" : "sub"; unsigned HOST_WIDE_INT amount; /* Try different amounts in descending order. */ *************** dosize (file, op, size) *** 205,220 **** amount > 0; amount /= 2) { for (; size >= amount; size -= amount) ! fprintf (file, "\t%ss\t#%d,sp\n", op, amount); } } else { if (TARGET_H8300) ! fprintf (file, "\tmov.w\t#%d,r3\n\t%s.w\tr3,sp\n", size, op); else ! fprintf (file, "\t%s.l\t#%d,sp\n", op, size); } } --- 418,441 ---- amount > 0; amount /= 2) { + char insn[100]; + + sprintf (insn, "\t%ss\t#%d,%s\n", op, amount, + TARGET_H8300 ? "r7" : "er7"); for (; size >= amount; size -= amount) ! fputs (insn, file); } } else { if (TARGET_H8300) ! { ! fprintf (file, "\tmov.w\t#%d,r3\n\tadd.w\tr3,r7\n", sign * size); ! } else ! { ! fprintf (file, "\tadd.l\t#%d,er7\n", sign * size); ! } } } *************** static int *** 224,230 **** round_frame_size (size) int size; { ! return (size + STACK_BOUNDARY / 8 - 1) & -STACK_BOUNDARY / 8; } /* Compute which registers to push/pop. --- 445,452 ---- round_frame_size (size) int size; { ! return ((size + STACK_BOUNDARY / BITS_PER_UNIT - 1) ! & -STACK_BOUNDARY / BITS_PER_UNIT); } /* Compute which registers to push/pop. *************** compute_saved_regs () *** 237,243 **** int regno; /* Construct a bit vector of registers to be pushed/popped. */ ! for (regno = 0; regno <= 6; regno++) { if (WORD_REG_USED (regno)) saved_regs |= 1 << regno; --- 459,465 ---- int regno; /* Construct a bit vector of registers to be pushed/popped. */ ! for (regno = 0; regno <= FRAME_POINTER_REGNUM; regno++) { if (WORD_REG_USED (regno)) saved_regs |= 1 << regno; *************** push (file, rn) *** 257,263 **** FILE *file; int rn; { ! fprintf (file, "\t%s\t%s\n", h8_push_op, h8_reg_names[rn]); } /* Output assembly language code to pop register RN. */ --- 479,488 ---- FILE *file; int rn; { ! if (TARGET_H8300) ! fprintf (file, "\t%s\t%s,@-r7\n", h8_mov_op, h8_reg_names[rn]); ! else ! fprintf (file, "\t%s\t%s,@-er7\n", h8_mov_op, h8_reg_names[rn]); } /* Output assembly language code to pop register RN. */ *************** pop (file, rn) *** 267,283 **** FILE *file; int rn; { ! fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[rn]); } ! /* This is what the stack looks like after the prolog of a function with a frame has been set up: PC FP <- fp ! <- sp This is what the stack looks like after the prolog of a function which doesn't have a frame: --- 492,511 ---- FILE *file; int rn; { ! if (TARGET_H8300) ! fprintf (file, "\t%s\t@r7+,%s\n", h8_mov_op, h8_reg_names[rn]); ! else ! fprintf (file, "\t%s\t@er7+,%s\n", h8_mov_op, h8_reg_names[rn]); } ! /* This is what the stack looks like after the prolog of a function with a frame has been set up: PC FP <- fp ! <- sp This is what the stack looks like after the prolog of a function which doesn't have a frame: *************** pop (file, rn) *** 285,291 **** PC ! <- sp */ /* Output assembly language code for the function prologue. */ --- 513,519 ---- PC ! <- sp */ /* Output assembly language code for the function prologue. */ *************** h8300_output_function_prologue (file, si *** 296,302 **** HOST_WIDE_INT size; { int fsize = round_frame_size (size); ! int idx; int saved_regs; int n_regs; --- 524,530 ---- HOST_WIDE_INT size; { int fsize = round_frame_size (size); ! int regno; int saved_regs; int n_regs; *************** h8300_output_function_prologue (file, si *** 362,375 **** } /* Leave room for locals. */ ! dosize (file, "sub", fsize); /* Push the rest of the registers in ascending order. */ saved_regs = compute_saved_regs (); ! for (idx = 0; idx < FIRST_PSEUDO_REGISTER; idx += n_regs) { - int regno = idx; - n_regs = 1; if (saved_regs & (1 << regno)) { --- 590,601 ---- } /* Leave room for locals. */ ! dosize (file, -1, fsize); /* Push the rest of the registers in ascending order. */ saved_regs = compute_saved_regs (); ! for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno += n_regs) { n_regs = 1; if (saved_regs & (1 << regno)) { *************** h8300_output_function_prologue (file, si *** 389,400 **** n_regs = 2; } ! if (n_regs == 1) ! push (file, regno); ! else ! fprintf (file, "\tstm.l\t%s-%s,@-sp\n", ! h8_reg_names[regno], ! h8_reg_names[regno + (n_regs - 1)]); } } } --- 615,643 ---- n_regs = 2; } ! switch (n_regs) ! { ! case 1: ! push (file, regno); ! break; ! case 2: ! fprintf (file, "\tstm.l\t%s-%s,@-er7\n", ! h8_reg_names[regno], ! h8_reg_names[regno + 1]); ! break; ! case 3: ! fprintf (file, "\tstm.l\t%s-%s,@-er7\n", ! h8_reg_names[regno], ! h8_reg_names[regno + 2]); ! break; ! case 4: ! fprintf (file, "\tstm.l\t%s-%s,@-er7\n", ! h8_reg_names[regno], ! h8_reg_names[regno + 3]); ! break; ! default: ! abort (); ! } } } } *************** h8300_output_function_epilogue (file, si *** 407,413 **** HOST_WIDE_INT size; { int fsize = round_frame_size (size); ! int idx; rtx insn = get_last_insn (); int saved_regs; int n_regs; --- 650,656 ---- HOST_WIDE_INT size; { int fsize = round_frame_size (size); ! int regno; rtx insn = get_last_insn (); int saved_regs; int n_regs; *************** h8300_output_function_epilogue (file, si *** 434,443 **** /* Pop the saved registers in descending order. */ saved_regs = compute_saved_regs (); ! for (idx = 0; idx < FIRST_PSEUDO_REGISTER; idx += n_regs) { - int regno = (FIRST_PSEUDO_REGISTER - 1) - idx; - n_regs = 1; if (saved_regs & (1 << regno)) { --- 677,684 ---- /* Pop the saved registers in descending order. */ saved_regs = compute_saved_regs (); ! for (regno = FIRST_PSEUDO_REGISTER - 1; regno >= 0; regno -= n_regs) { n_regs = 1; if (saved_regs & (1 << regno)) { *************** h8300_output_function_epilogue (file, si *** 457,473 **** n_regs = 2; } ! if (n_regs == 1) ! pop (file, regno); ! else ! fprintf (file, "\tldm.l\t@sp+,%s-%s\n", ! h8_reg_names[regno - (n_regs - 1)], ! h8_reg_names[regno]); } } /* Deallocate locals. */ ! dosize (file, "add", fsize); /* Pop frame pointer if we had one. */ if (frame_pointer_needed) --- 698,731 ---- n_regs = 2; } ! switch (n_regs) ! { ! case 1: ! pop (file, regno); ! break; ! case 2: ! fprintf (file, "\tldm.l\t@er7+,%s-%s\n", ! h8_reg_names[regno - 1], ! h8_reg_names[regno]); ! break; ! case 3: ! fprintf (file, "\tldm.l\t@er7+,%s-%s\n", ! h8_reg_names[regno - 2], ! h8_reg_names[regno]); ! break; ! case 4: ! fprintf (file, "\tldm.l\t@er7+,%s-%s\n", ! h8_reg_names[regno - 3], ! h8_reg_names[regno]); ! break; ! default: ! abort (); ! } } } /* Deallocate locals. */ ! dosize (file, 1, fsize); /* Pop frame pointer if we had one. */ if (frame_pointer_needed) *************** asm_file_start (file) *** 493,499 **** { fprintf (file, ";\tGCC For the Hitachi H8/300\n"); fprintf (file, ";\tBy Hitachi America Ltd and Cygnus Support\n"); ! if (optimize) fprintf (file, "; -O%d\n", optimize); if (TARGET_H8300H) fprintf (file, "\n\t.h8300h\n"); --- 751,760 ---- { fprintf (file, ";\tGCC For the Hitachi H8/300\n"); fprintf (file, ";\tBy Hitachi America Ltd and Cygnus Support\n"); ! ! if (optimize_size) ! fprintf (file, "; -Os\n"); ! else if (optimize) fprintf (file, "; -O%d\n", optimize); if (TARGET_H8300H) fprintf (file, "\n\t.h8300h\n"); *************** asm_file_end (file) *** 513,540 **** fprintf (file, "\t.end\n"); } - /* Return true if VALUE is a valid constant for constraint 'P'. - IE: VALUE is a power of two <= 2**15. */ - - int - small_power_of_two (value) - HOST_WIDE_INT value; - { - int power = exact_log2 (value); - return power >= 0 && power <= 15; - } - - /* Return true if VALUE is a valid constant for constraint 'O', which - means that the constant would be ok to use as a bit for a bclr - instruction. */ - - int - ok_for_bclr (value) - HOST_WIDE_INT value; - { - return small_power_of_two ((~value) & 0xff); - } - /* Return true if OP is a valid source operand for an integer move instruction. */ --- 774,779 ---- *************** general_operand_src (op, mode) *** 543,549 **** rtx op; enum machine_mode mode; { ! if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == POST_INC) return 1; return general_operand (op, mode); } --- 782,790 ---- rtx op; enum machine_mode mode; { ! if (GET_MODE (op) == mode ! && GET_CODE (op) == MEM ! && GET_CODE (XEXP (op, 0)) == POST_INC) return 1; return general_operand (op, mode); } *************** general_operand_dst (op, mode) *** 556,575 **** rtx op; enum machine_mode mode; { ! if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == PRE_DEC) return 1; return general_operand (op, mode); } ! /* Return true if OP is a const valid for a bit clear instruction. */ int ! o_operand (operand, mode) rtx operand; enum machine_mode mode ATTRIBUTE_UNUSED; { ! return (GET_CODE (operand) == CONST_INT ! && CONST_OK_FOR_O (INTVAL (operand))); } /* Return true if OP is a valid call operand. */ --- 797,857 ---- rtx op; enum machine_mode mode; { ! if (GET_MODE (op) == mode ! && GET_CODE (op) == MEM ! && GET_CODE (XEXP (op, 0)) == PRE_DEC) return 1; return general_operand (op, mode); } ! /* Return true if OP is a constant that contains only one 1 in its ! binary representation. */ int ! single_one_operand (operand, mode) rtx operand; enum machine_mode mode ATTRIBUTE_UNUSED; { ! if (GET_CODE (operand) == CONST_INT) ! { ! /* We really need to do this masking because 0x80 in QImode is ! represented as -128 for example. */ ! unsigned HOST_WIDE_INT mask = ! (GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT) ! ? ((unsigned HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (mode)) - 1 ! : ~(unsigned HOST_WIDE_INT) 0; ! unsigned HOST_WIDE_INT value = INTVAL (operand); ! ! if (exact_log2 (value & mask) >= 0) ! return 1; ! } ! ! return 0; ! } ! ! /* Return true if OP is a constant that contains only one 0 in its ! binary representation. */ ! ! int ! single_zero_operand (operand, mode) ! rtx operand; ! enum machine_mode mode ATTRIBUTE_UNUSED; ! { ! if (GET_CODE (operand) == CONST_INT) ! { ! /* We really need to do this masking because 0x80 in QImode is ! represented as -128 for example. */ ! unsigned HOST_WIDE_INT mask = ! (GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT) ! ? ((unsigned HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (mode)) - 1 ! : ~(unsigned HOST_WIDE_INT) 0; ! unsigned HOST_WIDE_INT value = INTVAL (operand); ! ! if (exact_log2 (~value & mask) >= 0) ! return 1; ! } ! ! return 0; } /* Return true if OP is a valid call operand. */ *************** jump_address_operand (op, mode) *** 718,724 **** return 0; } ! /* Recognize valid operands for bitfield instructions. */ extern int rtx_equal_function_value_matters; --- 1000,1006 ---- return 0; } ! /* Recognize valid operands for bit-field instructions. */ extern int rtx_equal_function_value_matters; *************** const_costs (r, c, outer_code) *** 900,905 **** --- 1182,1225 ---- return 4; } } + + int + h8300_and_costs (x) + rtx x; + { + rtx operands[4]; + + if (GET_MODE (x) == QImode) + return 1; + + if (GET_MODE (x) != HImode + && GET_MODE (x) != SImode) + return 100; + + operands[0] = NULL; + operands[1] = NULL; + operands[2] = XEXP (x, 1); + operands[3] = x; + return compute_logical_op_length (GET_MODE (x), operands); + } + + int + h8300_shift_costs (x) + rtx x; + { + rtx operands[4]; + + if (GET_MODE (x) != QImode + && GET_MODE (x) != HImode + && GET_MODE (x) != SImode) + return 100; + + operands[0] = NULL; + operands[1] = NULL; + operands[2] = XEXP (x, 1); + operands[3] = x; + return compute_a_shift_length (NULL, operands); + } /* Documentation for the machine specific operand escapes: *************** print_operand (file, x, code) *** 1022,1037 **** goto def; break; case 'V': ! bitint = exact_log2 (INTVAL (x)); if (bitint == -1) abort (); ! fprintf (file, "#%d", bitint & 7); break; case 'W': bitint = exact_log2 ((~INTVAL (x)) & 0xff); if (bitint == -1) abort (); ! fprintf (file, "#%d", bitint & 7); break; case 'R': case 'X': --- 1342,1357 ---- goto def; break; case 'V': ! bitint = exact_log2 (INTVAL (x) & 0xff); if (bitint == -1) abort (); ! fprintf (file, "#%d", bitint); break; case 'W': bitint = exact_log2 ((~INTVAL (x)) & 0xff); if (bitint == -1) abort (); ! fprintf (file, "#%d", bitint); break; case 'R': case 'X': *************** print_operand (file, x, code) *** 1128,1137 **** } break; case 'j': ! asm_fprintf (file, cond_string (GET_CODE (x))); break; case 'k': ! asm_fprintf (file, cond_string (reverse_condition (GET_CODE (x)))); break; case 's': if (GET_CODE (x) == CONST_INT) --- 1448,1457 ---- } break; case 'j': ! fputs (cond_string (GET_CODE (x)), file); break; case 'k': ! fputs (cond_string (reverse_condition (GET_CODE (x))), file); break; case 's': if (GET_CODE (x) == CONST_INT) *************** print_operand (file, x, code) *** 1210,1228 **** fprintf (file, "@"); output_address (addr); ! /* If this is an 'R' operand (reference into the 8-bit ! area), then specify a symbolic address as "foo:8", ! otherwise if operand is still in eight bit section, use ! "foo:16". */ ! if (GET_CODE (addr) == SYMBOL_REF ! && SYMBOL_REF_FLAG (addr)) ! fprintf (file, (code == 'R' ? ":8" : ":16")); ! else if (GET_CODE (addr) == SYMBOL_REF ! && TINY_DATA_NAME_P (XSTR (addr, 0))) ! fprintf (file, ":16"); ! else if ((code == 'R') ! && EIGHTBIT_CONSTANT_ADDRESS_P (addr)) ! fprintf (file, ":8"); } break; --- 1530,1561 ---- fprintf (file, "@"); output_address (addr); ! /* We fall back from smaller addressing to larger ! addressing in various ways depending on CODE. */ ! switch (code) ! { ! case 'R': ! /* Used for mov.b and bit operations. */ ! if (h8300_eightbit_constant_address_p (addr)) ! { ! fprintf (file, ":8"); ! break; ! } ! ! /* Fall through. We should not get here if we are ! processing bit operations on H8/300 or H8/300H ! because 'U' constraint does not allow bit ! operations on the tiny area on these machines. */ ! ! case 'T': ! case 'S': ! /* Used for mov.w and mov.l. */ ! if (h8300_tiny_constant_address_p (addr)) ! fprintf (file, ":16"); ! break; ! default: ! break; ! } } break; *************** do_movsi (operands) *** 1367,1379 **** the other its replacement, at the start of a routine. */ int ! initial_offset (from, to) int from, to; { int offset = 0; if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) ! offset = UNITS_PER_WORD + frame_pointer_needed * UNITS_PER_WORD; else if (from == RETURN_ADDRESS_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) offset = frame_pointer_needed * UNITS_PER_WORD; else --- 1700,1714 ---- the other its replacement, at the start of a routine. */ int ! h8300_initial_elimination_offset (from, to) int from, to; { int offset = 0; + /* The number of bytes that the return address takes on the stack. */ + int pc_size = POINTER_SIZE / BITS_PER_UNIT; if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) ! offset = pc_size + frame_pointer_needed * UNITS_PER_WORD; else if (from == RETURN_ADDRESS_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) offset = frame_pointer_needed * UNITS_PER_WORD; else *************** initial_offset (from, to) *** 1387,1398 **** /* See the comments for get_frame_size. We need to round it up to STACK_BOUNDARY. */ ! offset += ((get_frame_size () + STACK_BOUNDARY / BITS_PER_UNIT - 1) ! & ~(STACK_BOUNDARY / BITS_PER_UNIT - 1)); if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) ! offset += UNITS_PER_WORD; /* Skip saved PC */ } return offset; } --- 1722,1734 ---- /* See the comments for get_frame_size. We need to round it up to STACK_BOUNDARY. */ ! offset += round_frame_size (get_frame_size ()); if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) ! /* Skip saved PC. */ ! offset += pc_size; } + return offset; } *************** notice_update_cc (body, insn) *** 1423,1428 **** --- 1759,1766 ---- rtx body; rtx insn; { + rtx set; + switch (get_attr_cc (insn)) { case CC_NONE: *************** notice_update_cc (body, insn) *** 1445,1451 **** that's ok because alter_cond will change tests to use EQ/NE. */ CC_STATUS_INIT; cc_status.flags |= CC_OVERFLOW_UNUSABLE | CC_NO_CARRY; ! cc_status.value1 = recog_data.operand[0]; break; case CC_SET_ZNV: --- 1783,1792 ---- that's ok because alter_cond will change tests to use EQ/NE. */ CC_STATUS_INIT; cc_status.flags |= CC_OVERFLOW_UNUSABLE | CC_NO_CARRY; ! set = single_set (insn); ! cc_status.value1 = SET_SRC (set); ! if (SET_DEST (set) != cc0_rtx) ! cc_status.value2 = SET_DEST (set); break; case CC_SET_ZNV: *************** notice_update_cc (body, insn) *** 1454,1462 **** alter_cond will change tests to use EQ/NE. */ CC_STATUS_INIT; cc_status.flags |= CC_NO_CARRY; ! cc_status.value1 = recog_data.operand[0]; ! if (GET_CODE (body) == SET && REG_P (SET_SRC (body))) ! cc_status.value2 = SET_SRC (body); break; case CC_COMPARE: --- 1795,1804 ---- alter_cond will change tests to use EQ/NE. */ CC_STATUS_INIT; cc_status.flags |= CC_NO_CARRY; ! set = single_set (insn); ! cc_status.value1 = SET_SRC (set); ! if (SET_DEST (set) != cc0_rtx) ! cc_status.value2 = SET_DEST (set); break; case CC_COMPARE: *************** notice_update_cc (body, insn) *** 1472,1477 **** --- 1814,1853 ---- } } + /* Return nonzero if X is a stack pointer. */ + + int + stack_pointer_operand (x, mode) + rtx x; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return x == stack_pointer_rtx; + } + + /* Return nonzero if X is a constant whose absolute value is greater + than 2. */ + + int + const_int_gt_2_operand (x, mode) + rtx x; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return (GET_CODE (x) == CONST_INT + && abs (INTVAL (x)) > 2); + } + + /* Return nonzero if X is a constant whose absolute value is no + smaller than 8. */ + + int + const_int_ge_8_operand (x, mode) + rtx x; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return (GET_CODE (x) == CONST_INT + && abs (INTVAL (x)) >= 8); + } + /* Recognize valid operators for bit instructions. */ int *************** bit_operator (x, mode) *** 1487,1497 **** } const char * ! output_logical_op (mode, code, operands) enum machine_mode mode; - int code; rtx *operands; { /* Pretend that every byte is affected if both operands are registers. */ unsigned HOST_WIDE_INT intval = (unsigned HOST_WIDE_INT) ((GET_CODE (operands[2]) == CONST_INT) --- 1863,1874 ---- } const char * ! output_logical_op (mode, operands) enum machine_mode mode; rtx *operands; { + /* Figure out the logical op that we need to perform. */ + enum rtx_code code = GET_CODE (operands[3]); /* Pretend that every byte is affected if both operands are registers. */ unsigned HOST_WIDE_INT intval = (unsigned HOST_WIDE_INT) ((GET_CODE (operands[2]) == CONST_INT) *************** output_logical_op (mode, code, operands) *** 1627,1638 **** } return ""; } /* Shifts. We devote a fair bit of code to getting efficient shifts since we can only shift one bit at a time on the H8/300 and H8/300H and only ! one or two bits at a time on the H8/S. All shift code falls into one of the following ways of implementation: --- 2004,2176 ---- } return ""; } + + unsigned int + compute_logical_op_length (mode, operands) + enum machine_mode mode; + rtx *operands; + { + /* Figure out the logical op that we need to perform. */ + enum rtx_code code = GET_CODE (operands[3]); + /* Pretend that every byte is affected if both operands are registers. */ + unsigned HOST_WIDE_INT intval = + (unsigned HOST_WIDE_INT) ((GET_CODE (operands[2]) == CONST_INT) + ? INTVAL (operands[2]) : 0x55555555); + /* The determinant of the algorithm. If we perform an AND, 0 + affects a bit. Otherwise, 1 affects a bit. */ + unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; + /* Insn length. */ + unsigned int length = 0; + + switch (mode) + { + case HImode: + /* First, see if we can finish with one insn. */ + if ((TARGET_H8300H || TARGET_H8300S) + && ((det & 0x00ff) != 0) + && ((det & 0xff00) != 0)) + { + if (REG_P (operands[2])) + length += 2; + else + length += 4; + } + else + { + /* Take care of the lower byte. */ + if ((det & 0x00ff) != 0) + length += 2; + + /* Take care of the upper byte. */ + if ((det & 0xff00) != 0) + length += 2; + } + break; + case SImode: + /* First, see if we can finish with one insn. + + If code is either AND or XOR, we exclude two special cases, + 0xffffff00 and 0xffff00ff, because insns like sub.w or not.w + can do a better job. */ + if ((TARGET_H8300H || TARGET_H8300S) + && ((det & 0x0000ffff) != 0) + && ((det & 0xffff0000) != 0) + && (code == IOR || det != 0xffffff00) + && (code == IOR || det != 0xffff00ff)) + { + if (REG_P (operands[2])) + length += 4; + else + length += 6; + } + else + { + /* Take care of the lower and upper words individually. For + each word, we try different methods in the order of + + 1) the special insn (in case of AND or XOR), + 2) the word-wise insn, and + 3) The byte-wise insn. */ + if ((det & 0x0000ffff) == 0x0000ffff + && (TARGET_H8300 ? (code == AND) : (code != IOR))) + { + length += 2; + } + else if ((TARGET_H8300H || TARGET_H8300S) + && ((det & 0x000000ff) != 0) + && ((det & 0x0000ff00) != 0)) + { + length += 4; + } + else + { + if ((det & 0x000000ff) != 0) + length += 2; + + if ((det & 0x0000ff00) != 0) + length += 2; + } + + if ((det & 0xffff0000) == 0xffff0000 + && (TARGET_H8300 ? (code == AND) : (code != IOR))) + { + length += 2; + } + else if (TARGET_H8300H || TARGET_H8300S) + { + if ((det & 0xffff0000) != 0) + length += 4; + } + else + { + if ((det & 0x00ff0000) != 0) + length += 2; + + if ((det & 0xff000000) != 0) + length += 2; + } + } + break; + default: + abort (); + } + return length; + } + + int + compute_logical_op_cc (mode, operands) + enum machine_mode mode; + rtx *operands; + { + /* Figure out the logical op that we need to perform. */ + enum rtx_code code = GET_CODE (operands[3]); + /* Pretend that every byte is affected if both operands are registers. */ + unsigned HOST_WIDE_INT intval = + (unsigned HOST_WIDE_INT) ((GET_CODE (operands[2]) == CONST_INT) + ? INTVAL (operands[2]) : 0x55555555); + /* The determinant of the algorithm. If we perform an AND, 0 + affects a bit. Otherwise, 1 affects a bit. */ + unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; + /* Condition code. */ + enum attr_cc cc = CC_CLOBBER; + + switch (mode) + { + case HImode: + /* First, see if we can finish with one insn. */ + if ((TARGET_H8300H || TARGET_H8300S) + && ((det & 0x00ff) != 0) + && ((det & 0xff00) != 0)) + { + cc = CC_SET_ZNV; + } + break; + case SImode: + /* First, see if we can finish with one insn. + + If code is either AND or XOR, we exclude two special cases, + 0xffffff00 and 0xffff00ff, because insns like sub.w or not.w + can do a better job. */ + if ((TARGET_H8300H || TARGET_H8300S) + && ((det & 0x0000ffff) != 0) + && ((det & 0xffff0000) != 0) + && (code == IOR || det != 0xffffff00) + && (code == IOR || det != 0xffff00ff)) + { + cc = CC_SET_ZNV; + } + break; + default: + abort (); + } + return cc; + } /* Shifts. We devote a fair bit of code to getting efficient shifts since we can only shift one bit at a time on the H8/300 and H8/300H and only ! one or two bits at a time on the H8S. All shift code falls into one of the following ways of implementation: *************** output_logical_op (mode, code, operands) *** 1651,1748 **** 16. This case also includes other oddballs that are not worth explaning here. ! o SHIFT_LOOP: Emit a loop using one (or two on H8/S) bit shifts. ! ! Here are some thoughts on what the absolutely positively best code ! is. "Best" here means some rational trade-off between code size ! and speed, where speed is more preferred but not at the expense of ! generating 20 insns. ! ! Below, a trailing '*' after the shift count indicates the "best" ! mode isn't implemented. We only describe SHIFT_SPECIAL cases to ! simplify the table. For other cases, refer to shift_alg_[qhs]i. ! ! H8/300 QImode shifts ! 7 - ASHIFTRT: shll, subx (propagate carry bit to all bits) ! ! H8/300 HImode shifts ! 7 - shift 2nd half other way into carry. ! copy 1st half into 2nd half ! rotate 2nd half other way with carry ! rotate 1st half other way (no carry) ! mask off bits in 1st half (ASHIFT | LSHIFTRT). ! sign extend 1st half (ASHIFTRT) ! 8 - move byte, zero (ASHIFT | LSHIFTRT) or sign extend other (ASHIFTRT) ! 9-12 - do shift by 8, inline remaining shifts ! 15 - ASHIFTRT: shll, subx, set other byte ! ! H8/300 SImode shifts ! 7* - shift other way once, move bytes into place, ! move carry into place (possibly with sign extension) ! 8 - move bytes into place, zero or sign extend other ! 15* - shift other way once, move word into place, move carry into place ! 16 - move word, zero or sign extend other ! 24* - move bytes into place, zero or sign extend other ! 31 - ASHIFTRT: shll top byte, subx, copy to other bytes ! ! H8/300H QImode shifts (same as H8/300 QImode shifts) ! 7 - ASHIFTRT: shll, subx (propagate carry bit to all bits) ! ! H8/300H HImode shifts ! 7 - shift 2nd half other way into carry. ! copy 1st half into 2nd half ! rotate entire word other way using carry ! mask off remaining bits (ASHIFT | LSHIFTRT) ! sign extend remaining bits (ASHIFTRT) ! 8 - move byte, zero (ASHIFT | LSHIFTRT) or sign extend other (ASHIFTRT) ! 9-12 - do shift by 8, inline remaining shifts ! 15 - ASHIFTRT: shll, subx, set other byte ! ! H8/300H SImode shifts ! (These are complicated by the fact that we don't have byte level access to ! the top word.) ! A word is: bytes 3,2,1,0 (msb -> lsb), word 1,0 (msw -> lsw) ! 15* - shift other way once, move word into place, move carry into place ! (with sign extension for ASHIFTRT) ! 16 - move word into place, zero or sign extend other ! 17-20 - do 16bit shift, then inline remaining shifts ! 24* - ASHIFT: move byte 0(msb) to byte 1, zero byte 0, ! move word 0 to word 1, zero word 0 ! LSHIFTRT: move word 1 to word 0, move byte 1 to byte 0, ! zero word 1, zero byte 1 ! ASHIFTRT: move word 1 to word 0, move byte 1 to byte 0, ! sign extend byte 0, sign extend word 0 ! 25-27* - either loop, or ! do 24 bit shift, inline rest ! 31 - shll, subx byte 0, sign extend byte 0, sign extend word 0 ! ! H8/S QImode shifts ! 7 - ASHIFTRT: shll, subx (propagate carry bit to all bits) ! H8/S HImode shifts ! 8 - move byte, zero (ASHIFT | LSHIFTRT) or sign extend other (ASHIFTRT) ! 9-12 - do shift by 8, inline remaining shifts ! 15 - ASHIFTRT: shll, subx, set other byte ! H8/S SImode shifts ! (These are complicated by the fact that we don't have byte level access to ! the top word.) ! A word is: bytes 3,2,1,0 (msb -> lsb), word 1,0 (msw -> lsw) ! 15* - shift other way once, move word into place, move carry into place ! (with sign extension for ASHIFTRT) ! 16 - move word into place, zero or sign extend other ! 17-20 - do 16bit shift, then inline remaining shifts ! 24* - ASHIFT: move byte 0(msb) to byte 1, zero byte 0, ! move word 0 to word 1, zero word 0 ! LSHIFTRT: move word 1 to word 0, move byte 1 to byte 0, ! zero word 1, zero byte 1 ! ASHIFTRT: move word 1 to word 0, move byte 1 to byte 0, ! sign extend byte 0, sign extend word 0 ! 25-27* - either loop, or ! do 24 bit shift, inline rest ! 31 - shll, subx byte 0, sign extend byte 0, sign extend word 0 ! Panic!!! */ int nshift_operator (x, mode) --- 2189,2206 ---- 16. This case also includes other oddballs that are not worth explaning here. ! o SHIFT_LOOP: Emit a loop using one (or two on H8S) bit shifts. ! For each shift count, we try to use code that has no trade-off ! between code size and speed whenever possible. ! If the trade-off is unavoidable, we try to be reasonable. ! Specifically, the fastest version is one instruction longer than ! the shortest version, we take the fastest version. We also provide ! the use a way to switch back to the shortest version with -Os. ! For the details of the shift algorithms for various shift counts, ! refer to shift_alg_[qhs]i. */ int nshift_operator (x, mode) *************** expand_a_shift (mode, code, operands) *** 1788,1810 **** return 1; } - /* See above for explanation of this enum. */ - - enum shift_alg - { - SHIFT_INLINE, - SHIFT_ROT_AND, - SHIFT_SPECIAL, - SHIFT_LOOP - }; - - /* Symbols of the various shifts which can be used as indices. */ - - enum shift_type - { - SHIFT_ASHIFT, SHIFT_LSHIFTRT, SHIFT_ASHIFTRT - }; - /* Symbols of the various modes which can be used as indices. */ enum shift_mode --- 2246,2251 ---- *************** static const char *const rotate_two[3][3 *** 1967,2108 **** } }; - /* Macros to keep the shift algorithm tables small. */ - #define INL SHIFT_INLINE - #define ROT SHIFT_ROT_AND - #define LOP SHIFT_LOOP - #define SPC SHIFT_SPECIAL - - /* The shift algorithms for each machine, mode, shift type, and shift - count are defined below. The three tables below correspond to - QImode, HImode, and SImode, respectively. Each table is organized - by, in the order of indecies, machine, shift type, and shift count. */ - - static const enum shift_alg shift_alg_qi[3][3][8] = { - { - /* TARGET_H8300 */ - /* 0 1 2 3 4 5 6 7 */ - { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC } /* SHIFT_ASHIFTRT */ - }, - { - /* TARGET_H8300H */ - /* 0 1 2 3 4 5 6 7 */ - { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC } /* SHIFT_ASHIFTRT */ - }, - { - /* TARGET_H8300S */ - /* 0 1 2 3 4 5 6 7 */ - { INL, INL, INL, INL, INL, INL, ROT, ROT }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, INL, ROT, ROT }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, INL, INL, SPC } /* SHIFT_ASHIFTRT */ - } - }; - - static const enum shift_alg shift_alg_hi[3][3][16] = { - { - /* TARGET_H8300 */ - /* 0 1 2 3 4 5 6 7 */ - /* 8 9 10 11 12 13 14 15 */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, LOP, LOP, SPC }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, LOP, LOP, SPC }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ - }, - { - /* TARGET_H8300H */ - /* 0 1 2 3 4 5 6 7 */ - /* 8 9 10 11 12 13 14 15 */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ - }, - { - /* TARGET_H8300S */ - /* 0 1 2 3 4 5 6 7 */ - /* 8 9 10 11 12 13 14 15 */ - { INL, INL, INL, INL, INL, INL, INL, INL, - SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, INL, INL, INL, - SPC, SPC, SPC, SPC, SPC, ROT, ROT, ROT }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, INL, INL, INL, - SPC, SPC, SPC, SPC, SPC, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ - } - }; - - static const enum shift_alg shift_alg_si[3][3][32] = { - { - /* TARGET_H8300 */ - /* 0 1 2 3 4 5 6 7 */ - /* 8 9 10 11 12 13 14 15 */ - /* 16 17 18 19 20 21 22 23 */ - /* 24 25 26 27 28 29 30 31 */ - { INL, INL, INL, LOP, LOP, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, LOP, LOP, LOP, LOP, - SPC, SPC, SPC, SPC, SPC, LOP, LOP, LOP, - SPC, SPC, SPC, SPC, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFT */ - { INL, INL, INL, LOP, LOP, LOP, LOP, LOP, - SPC, SPC, LOP, LOP, LOP, LOP, LOP, SPC, - SPC, SPC, SPC, LOP, LOP, LOP, LOP, LOP, - SPC, SPC, SPC, SPC, SPC, LOP, LOP, SPC }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, LOP, LOP, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC, - SPC, SPC, LOP, LOP, LOP, LOP, LOP, LOP, - SPC, SPC, SPC, LOP, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ - }, - { - /* TARGET_H8300H */ - /* 0 1 2 3 4 5 6 7 */ - /* 8 9 10 11 12 13 14 15 */ - /* 16 17 18 19 20 21 22 23 */ - /* 24 25 26 27 28 29 30 31 */ - { INL, INL, INL, INL, INL, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, LOP, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, ROT, ROT, ROT, SPC }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, LOP, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, ROT, ROT, ROT, SPC }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, LOP, LOP, LOP, LOP, - SPC, SPC, SPC, SPC, LOP, LOP, LOP, LOP, - SPC, LOP, LOP, LOP, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ - }, - { - /* TARGET_H8300S */ - /* 0 1 2 3 4 5 6 7 */ - /* 8 9 10 11 12 13 14 15 */ - /* 16 17 18 19 20 21 22 23 */ - /* 24 25 26 27 28 29 30 31 */ - { INL, INL, INL, INL, INL, INL, INL, INL, - INL, INL, INL, LOP, LOP, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, SPC, LOP, LOP, - SPC, SPC, LOP, LOP, ROT, ROT, ROT, SPC }, /* SHIFT_ASHIFT */ - { INL, INL, INL, INL, INL, INL, INL, INL, - INL, INL, INL, LOP, LOP, LOP, LOP, SPC, - SPC, SPC, SPC, SPC, SPC, SPC, LOP, LOP, - SPC, SPC, LOP, LOP, ROT, ROT, ROT, SPC }, /* SHIFT_LSHIFTRT */ - { INL, INL, INL, INL, INL, INL, INL, INL, - INL, INL, INL, LOP, LOP, LOP, LOP, LOP, - SPC, SPC, SPC, SPC, SPC, SPC, LOP, LOP, - SPC, SPC, LOP, LOP, LOP, LOP, LOP, SPC }, /* SHIFT_ASHIFTRT */ - } - }; - - #undef INL - #undef ROT - #undef LOP - #undef SPC - struct shift_info { /* Shift algorithm. */ enum shift_alg alg; --- 2408,2413 ---- *************** struct shift_info { *** 2115,2125 **** const char *special; /* Insn for a one-bit shift. Valid when ALG is either SHIFT_INLINE ! or SHIFT_SPECIAL, and REMAINDER is non-zero. */ const char *shift1; /* Insn for a two-bit shift. Valid when ALG is either SHIFT_INLINE ! or SHIFT_SPECIAL, and REMAINDER is non-zero. */ const char *shift2; /* Valid CC flags. */ --- 2420,2430 ---- const char *special; /* Insn for a one-bit shift. Valid when ALG is either SHIFT_INLINE ! or SHIFT_SPECIAL, and REMAINDER is nonzero. */ const char *shift1; /* Insn for a two-bit shift. Valid when ALG is either SHIFT_INLINE ! or SHIFT_SPECIAL, and REMAINDER is nonzero. */ const char *shift2; /* Valid CC flags. */ *************** static void get_shift_alg PARAMS ((enum *** 2132,2147 **** /* Given SHIFT_TYPE, SHIFT_MODE, and shift count COUNT, determine the best algorithm for doing the shift. The assembler code is stored ! in the pointers in INFO. We don't achieve maximum efficiency in ! all cases, but the hooks are here to do so. ! ! For now we just use lots of switch statements. Since we don't even come ! close to supporting all the cases, this is simplest. If this function ever ! gets too big, perhaps resort to a more table based lookup. Of course, ! at this point you may just wish to do it all in rtl. ! WARNING: The constraints on insns shiftbyn_QI/HI/SI assume shifts of ! 1,2,3,4 will be inlined (1,2 for SI). */ static void get_shift_alg (shift_type, shift_mode, count, info) --- 2437,2451 ---- /* Given SHIFT_TYPE, SHIFT_MODE, and shift count COUNT, determine the best algorithm for doing the shift. The assembler code is stored ! in the pointers in INFO. We achieve the maximum efficiency in most ! cases when !TARGET_H8300. In case of TARGET_H8300, shifts in ! SImode in particular have a lot of room to optimize. ! We first determine the strategy of the shift algorithm by a table ! lookup. If that tells us to use a hand crafted assembly code, we ! go into the big switch statement to find what that is. Otherwise, ! we resort to a generic way, such as inlining. In either case, the ! result is returned through INFO. */ static void get_shift_alg (shift_type, shift_mode, count, info) *************** get_shift_alg (shift_type, shift_mode, c *** 2150,2186 **** unsigned int count; struct shift_info *info; { ! int cpu; /* Find the target CPU. */ if (TARGET_H8300) ! cpu = 0; else if (TARGET_H8300H) ! cpu = 1; else ! cpu = 2; /* Find the shift algorithm. */ switch (shift_mode) { case QIshift: ! if (GET_MODE_BITSIZE (QImode) <= count) ! info->alg = SHIFT_LOOP; ! else info->alg = shift_alg_qi[cpu][shift_type][count]; break; case HIshift: ! if (GET_MODE_BITSIZE (HImode) <= count) ! info->alg = SHIFT_LOOP; ! else info->alg = shift_alg_hi[cpu][shift_type][count]; break; case SIshift: ! if (GET_MODE_BITSIZE (SImode) <= count) ! info->alg = SHIFT_LOOP; ! else info->alg = shift_alg_si[cpu][shift_type][count]; break; --- 2454,2485 ---- unsigned int count; struct shift_info *info; { ! enum h8_cpu cpu; /* Find the target CPU. */ if (TARGET_H8300) ! cpu = H8_300; else if (TARGET_H8300H) ! cpu = H8_300H; else ! cpu = H8_S; /* Find the shift algorithm. */ + info->alg = SHIFT_LOOP; switch (shift_mode) { case QIshift: ! if (count < GET_MODE_BITSIZE (QImode)) info->alg = shift_alg_qi[cpu][shift_type][count]; break; case HIshift: ! if (count < GET_MODE_BITSIZE (HImode)) info->alg = shift_alg_hi[cpu][shift_type][count]; break; case SIshift: ! if (count < GET_MODE_BITSIZE (SImode)) info->alg = shift_alg_si[cpu][shift_type][count]; break; *************** get_shift_alg (shift_type, shift_mode, c *** 2252,2258 **** goto end; } } ! else if (8 <= count && count <= 12) { info->remainder = count - 8; --- 2551,2557 ---- goto end; } } ! else if (8 <= count && count <= 13) { info->remainder = count - 8; *************** get_shift_alg (shift_type, shift_mode, c *** 2278,2283 **** --- 2577,2604 ---- goto end; } } + else if (count == 14) + { + switch (shift_type) + { + case SHIFT_ASHIFT: + if (TARGET_H8300) + info->special = "mov.b\t%s0,%t0\n\trotr.b\t%t0\n\trotr.b\t%t0\n\tand.b\t#0xC0,%t0\n\tsub.b\t%s0,%s0"; + goto end; + case SHIFT_LSHIFTRT: + if (TARGET_H8300) + info->special = "mov.b\t%t0,%s0\n\trotl.b\t%s0\n\trotl.b\t%s0\n\tand.b\t#3,%s0\n\tsub.b\t%t0,%t0"; + goto end; + case SHIFT_ASHIFTRT: + if (TARGET_H8300) + info->special = "mov.b\t%t0,%s0\n\tshll.b\t%s0\n\tsubx.b\t%t0,%t0\n\tshll.b\t%s0\n\tmov.b\t%t0,%s0\n\tbst.b\t#0,%s0"; + else if (TARGET_H8300H) + info->special = "shll.b\t%t0\n\tsubx.b\t%s0,%s0\n\tshll.b\t%t0\n\trotxl.b\t%s0\n\texts.w\t%T0"; + else /* TARGET_H8300S */ + info->special = "mov.b\t%t0,%s0\n\texts.w\t%T0\n\tshar.w\t#2,%T0\n\tshar.w\t#2,%T0\n\tshar.w\t#2,%T0"; + goto end; + } + } else if (count == 15) { switch (shift_type) *************** get_shift_alg (shift_type, shift_mode, c *** 2407,2413 **** else if (TARGET_H8300 && 24 <= count && count <= 28) { info->remainder = count - 24; ! switch (shift_type) { case SHIFT_ASHIFT: --- 2728,2734 ---- else if (TARGET_H8300 && 24 <= count && count <= 28) { info->remainder = count - 24; ! switch (shift_type) { case SHIFT_ASHIFT: *************** get_shift_alg (shift_type, shift_mode, c *** 2421,2429 **** case SHIFT_ASHIFTRT: info->special = "mov.b\t%z0,%w0\n\tbld\t#7,%w0\n\tsubx\t%x0,%x0\n\tsubx\t%x0,%x0\n\tsubx\t%x0,%x0"; info->shift1 = "shar.b\t%w0"; ! goto end; ! } ! } else if ((TARGET_H8300H && count == 24) || (TARGET_H8300S && 24 <= count && count <= 25)) { --- 2742,2750 ---- case SHIFT_ASHIFTRT: info->special = "mov.b\t%z0,%w0\n\tbld\t#7,%w0\n\tsubx\t%x0,%x0\n\tsubx\t%x0,%x0\n\tsubx\t%x0,%x0"; info->shift1 = "shar.b\t%w0"; ! goto end; ! } ! } else if ((TARGET_H8300H && count == 24) || (TARGET_H8300S && 24 <= count && count <= 25)) { *************** get_shift_alg (shift_type, shift_mode, c *** 2448,2453 **** --- 2769,2846 ---- goto end; } } + else if (!TARGET_H8300 && count == 28) + { + switch (shift_type) + { + case SHIFT_ASHIFT: + if (TARGET_H8300H) + info->special = "sub.w\t%e0,%e0\n\trotr.l\t%S0\n\trotr.l\t%S0\n\trotr.l\t%S0\n\trotr.l\t%S0\n\tsub.w\t%f0,%f0"; + else + info->special = "sub.w\t%e0,%e0\n\trotr.l\t#2,%S0\n\trotr.l\t#2,%S0\n\tsub.w\t%f0,%f0"; + info->shift1 = ""; + info->shift2 = ""; + goto end; + case SHIFT_LSHIFTRT: + if (TARGET_H8300H) + info->special = "sub.w\t%f0,%f0\n\trotl.l\t%S0\n\trotl.l\t%S0\n\trotl.l\t%S0\n\trotl.l\t%S0\n\tsub.w\t%e0,%e0"; + else + info->special = "sub.w\t%f0,%f0\n\trotl.l\t#2,%S0\n\trotl.l\t#2,%S0\n\tsub.w\t%e0,%e0"; + info->shift1 = ""; + info->shift2 = ""; + goto end; + case SHIFT_ASHIFTRT: + abort (); + } + } + else if (!TARGET_H8300 && count == 29) + { + switch (shift_type) + { + case SHIFT_ASHIFT: + if (TARGET_H8300H) + info->special = "sub.w\t%e0,%e0\n\trotr.l\t%S0\n\trotr.l\t%S0\n\trotr.l\t%S0\n\tsub.w\t%f0,%f0"; + else + info->special = "sub.w\t%e0,%e0\n\trotr.l\t#2,%S0\n\trotr.l\t%S0\n\tsub.w\t%f0,%f0"; + info->shift1 = ""; + info->shift2 = ""; + goto end; + case SHIFT_LSHIFTRT: + if (TARGET_H8300H) + info->special = "sub.w\t%f0,%f0\n\trotl.l\t%S0\n\trotl.l\t%S0\n\trotl.l\t%S0\n\tsub.w\t%e0,%e0"; + else + info->special = "sub.w\t%f0,%f0\n\trotl.l\t#2,%S0\n\trotl.l\t%S0\n\tsub.w\t%e0,%e0"; + info->shift1 = ""; + info->shift2 = ""; + goto end; + case SHIFT_ASHIFTRT: + abort (); + } + } + else if (!TARGET_H8300 && count == 30) + { + switch (shift_type) + { + case SHIFT_ASHIFT: + if (TARGET_H8300H) + info->special = "sub.w\t%e0,%e0\n\trotr.l\t%S0\n\trotr.l\t%S0\n\tsub.w\t%f0,%f0"; + else + info->special = "sub.w\t%e0,%e0\n\trotr.l\t#2,%S0\n\tsub.w\t%f0,%f0"; + info->shift1 = ""; + info->shift2 = ""; + goto end; + case SHIFT_LSHIFTRT: + if (TARGET_H8300H) + info->special = "sub.w\t%f0,%f0\n\trotl.l\t%S0\n\trotl.l\t%S0\n\tsub.w\t%e0,%e0"; + else + info->special = "sub.w\t%f0,%f0\n\trotl.l\t#2,%S0\n\tsub.w\t%e0,%e0"; + info->shift1 = ""; + info->shift2 = ""; + goto end; + case SHIFT_ASHIFTRT: + abort (); + } + } else if (count == 31) { if (TARGET_H8300) *************** get_shift_alg (shift_type, shift_mode, c *** 2492,2497 **** --- 2885,2942 ---- info->shift2 = NULL; } + /* Given COUNT and MODE of a shift, return 1 if a scratch reg may be + needed for some shift with COUNT and MODE. Return 0 otherwise. */ + + int + h8300_shift_needs_scratch_p (count, mode) + int count; + enum machine_mode mode; + { + enum h8_cpu cpu; + int a, lr, ar; + + if (GET_MODE_BITSIZE (mode) <= count) + return 1; + + /* Find out the target CPU. */ + if (TARGET_H8300) + cpu = H8_300; + else if (TARGET_H8300H) + cpu = H8_300H; + else + cpu = H8_S; + + /* Find the shift algorithm. */ + switch (mode) + { + case QImode: + a = shift_alg_qi[cpu][SHIFT_ASHIFT][count]; + lr = shift_alg_qi[cpu][SHIFT_LSHIFTRT][count]; + ar = shift_alg_qi[cpu][SHIFT_ASHIFTRT][count]; + break; + + case HImode: + a = shift_alg_hi[cpu][SHIFT_ASHIFT][count]; + lr = shift_alg_hi[cpu][SHIFT_LSHIFTRT][count]; + ar = shift_alg_hi[cpu][SHIFT_ASHIFTRT][count]; + break; + + case SImode: + a = shift_alg_si[cpu][SHIFT_ASHIFT][count]; + lr = shift_alg_si[cpu][SHIFT_LSHIFTRT][count]; + ar = shift_alg_si[cpu][SHIFT_ASHIFTRT][count]; + break; + + default: + abort (); + } + + /* On H8/300H and H8S, count == 8 uses the scratch register. */ + return (a == SHIFT_LOOP || lr == SHIFT_LOOP || ar == SHIFT_LOOP + || (!TARGET_H8300 && mode == SImode && count == 8)); + } + /* Emit the assembler code for doing shifts. */ const char * *************** output_a_shift (operands) *** 2682,2687 **** --- 3127,3295 ---- } } } + + static unsigned int + h8300_asm_insn_count (template) + const char *template; + { + unsigned int count = 1; + + for (; *template; template++) + if (*template == '\n') + count++; + + return count; + } + + unsigned int + compute_a_shift_length (insn, operands) + rtx insn ATTRIBUTE_UNUSED; + rtx *operands; + { + rtx shift = operands[3]; + enum machine_mode mode = GET_MODE (shift); + enum rtx_code code = GET_CODE (shift); + enum shift_type shift_type; + enum shift_mode shift_mode; + struct shift_info info; + unsigned int wlength = 0; + + switch (mode) + { + case QImode: + shift_mode = QIshift; + break; + case HImode: + shift_mode = HIshift; + break; + case SImode: + shift_mode = SIshift; + break; + default: + abort (); + } + + switch (code) + { + case ASHIFTRT: + shift_type = SHIFT_ASHIFTRT; + break; + case LSHIFTRT: + shift_type = SHIFT_LSHIFTRT; + break; + case ASHIFT: + shift_type = SHIFT_ASHIFT; + break; + default: + abort (); + } + + if (GET_CODE (operands[2]) != CONST_INT) + { + /* Get the assembler code to do one shift. */ + get_shift_alg (shift_type, shift_mode, 1, &info); + + return (4 + h8300_asm_insn_count (info.shift1)) * 2; + } + else + { + int n = INTVAL (operands[2]); + + /* If the count is negative, make it 0. */ + if (n < 0) + n = 0; + /* If the count is too big, truncate it. + ANSI says shifts of GET_MODE_BITSIZE are undefined - we choose to + do the intuitive thing. */ + else if ((unsigned int) n > GET_MODE_BITSIZE (mode)) + n = GET_MODE_BITSIZE (mode); + + get_shift_alg (shift_type, shift_mode, n, &info); + + switch (info.alg) + { + case SHIFT_SPECIAL: + wlength += h8300_asm_insn_count (info.special); + + /* Every assembly instruction used in SHIFT_SPECIAL case + takes 2 bytes except xor.l, which takes 4 bytes, so if we + see xor.l, we just pretend that xor.l counts as two insns + so that the insn length will be computed correctly. */ + if (strstr (info.special, "xor.l") != NULL) + wlength++; + + /* Fall through. */ + + case SHIFT_INLINE: + n = info.remainder; + + if (info.shift2 != NULL) + { + wlength += h8300_asm_insn_count (info.shift2) * (n / 2); + n = n % 2; + } + + wlength += h8300_asm_insn_count (info.shift1) * n; + + return 2 * wlength; + + case SHIFT_ROT_AND: + { + int m = GET_MODE_BITSIZE (mode) - n; + + /* Not all possibilities of rotate are supported. They shouldn't + be generated, but let's watch for 'em. */ + if (info.shift1 == 0) + abort (); + + if (info.shift2 != NULL) + { + wlength += h8300_asm_insn_count (info.shift2) * (m / 2); + m = m % 2; + } + + wlength += h8300_asm_insn_count (info.shift1) * m; + + /* Now mask off the high bits. */ + switch (mode) + { + case QImode: + wlength += 1; + break; + case HImode: + wlength += 2; + break; + case SImode: + if (TARGET_H8300) + abort (); + wlength += 3; + break; + default: + abort (); + } + return 2 * wlength; + } + + case SHIFT_LOOP: + /* A loop to shift by a "large" constant value. + If we have shift-by-2 insns, use them. */ + if (info.shift2 != NULL) + { + wlength += 3 + h8300_asm_insn_count (info.shift2); + if (n % 2) + wlength += h8300_asm_insn_count (info.shift1); + } + else + { + wlength += 3 + h8300_asm_insn_count (info.shift1); + } + return 2 * wlength; + + default: + abort (); + } + } + } /* A rotation by a non-constant will cause a loop to be generated, in which a rotation by one bit is used. A rotation by a constant, *************** expand_a_rotate (code, operands) *** 2726,2732 **** tmp = gen_rtx_PLUS (QImode, counter, GEN_INT (-1)); emit_insn (gen_rtx_SET (VOIDmode, counter, tmp)); ! /* If the loop counter is non-zero, we go back to the beginning of the loop. */ emit_cmp_and_jump_insns (counter, GEN_INT (0), NE, NULL_RTX, QImode, 1, start_label); --- 3334,3340 ---- tmp = gen_rtx_PLUS (QImode, counter, GEN_INT (-1)); emit_insn (gen_rtx_SET (VOIDmode, counter, tmp)); ! /* If the loop counter is nonzero, we go back to the beginning of the loop. */ emit_cmp_and_jump_insns (counter, GEN_INT (0), NE, NULL_RTX, QImode, 1, start_label); *************** emit_a_rotate (code, operands) *** 2799,2805 **** /* Determine the faster direction. After this phase, amount will be at most a half of GET_MODE_BITSIZE (mode). */ ! if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2U) { /* Flip the direction. */ amount = GET_MODE_BITSIZE (mode) - amount; --- 3407,3413 ---- /* Determine the faster direction. After this phase, amount will be at most a half of GET_MODE_BITSIZE (mode). */ ! if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / (unsigned) 2) { /* Flip the direction. */ amount = GET_MODE_BITSIZE (mode) - amount; *************** emit_a_rotate (code, operands) *** 2824,2830 **** break; case SImode: ! /* This code works on the H8/300H and H8/S. */ insn_buf = "xor.w\t%e0,%f0\n\txor.w\t%f0,%e0\n\txor.w\t%e0,%f0"; output_asm_insn (insn_buf, operands); break; --- 3432,3438 ---- break; case SImode: ! /* This code works on the H8/300H and H8S. */ insn_buf = "xor.w\t%e0,%f0\n\txor.w\t%f0,%e0\n\txor.w\t%e0,%f0"; output_asm_insn (insn_buf, operands); break; *************** fix_bit_operand (operands, what, type) *** 2867,2898 **** only 'U' memory afterwards, so if this is a MEM operand, we must force it to be valid for 'U' by reloading the address. */ ! if (GET_CODE (operands[2]) == CONST_INT) { ! if (CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), what)) { ! /* Ok to have a memory dest. */ ! if (GET_CODE (operands[0]) == MEM ! && !EXTRA_CONSTRAINT (operands[0], 'U')) ! { ! rtx mem = gen_rtx_MEM (GET_MODE (operands[0]), ! copy_to_mode_reg (Pmode, ! XEXP (operands[0], 0))); ! MEM_COPY_ATTRIBUTES (mem, operands[0]); ! operands[0] = mem; ! } ! if (GET_CODE (operands[1]) == MEM ! && !EXTRA_CONSTRAINT (operands[1], 'U')) ! { ! rtx mem = gen_rtx_MEM (GET_MODE (operands[1]), ! copy_to_mode_reg (Pmode, ! XEXP (operands[1], 0))); ! MEM_COPY_ATTRIBUTES (mem, operands[0]); ! operands[1] = mem; ! } ! return 0; } } /* Dest and src op must be register. */ --- 3475,3504 ---- only 'U' memory afterwards, so if this is a MEM operand, we must force it to be valid for 'U' by reloading the address. */ ! if ((what == 0 && single_zero_operand (operands[2], QImode)) ! || (what == 1 && single_one_operand (operands[2], QImode))) { ! /* OK to have a memory dest. */ ! if (GET_CODE (operands[0]) == MEM ! && !EXTRA_CONSTRAINT (operands[0], 'U')) { ! rtx mem = gen_rtx_MEM (GET_MODE (operands[0]), ! copy_to_mode_reg (Pmode, ! XEXP (operands[0], 0))); ! MEM_COPY_ATTRIBUTES (mem, operands[0]); ! operands[0] = mem; ! } ! if (GET_CODE (operands[1]) == MEM ! && !EXTRA_CONSTRAINT (operands[1], 'U')) ! { ! rtx mem = gen_rtx_MEM (GET_MODE (operands[1]), ! copy_to_mode_reg (Pmode, ! XEXP (operands[1], 0))); ! MEM_COPY_ATTRIBUTES (mem, operands[0]); ! operands[1] = mem; } + return 0; } /* Dest and src op must be register. */ *************** h8300_tiny_data_p (decl) *** 3003,3008 **** --- 3609,3630 ---- return a != NULL_TREE; } + /* Generate an 'interrupt_handler' attribute for decls. */ + + static void + h8300_insert_attributes (node, attributes) + tree node; + tree *attributes; + { + if (!interrupt_handler + || TREE_CODE (node) != FUNCTION_DECL) + return; + + /* Add an 'interrupt_handler' attribute. */ + *attributes = tree_cons (get_identifier ("interrupt_handler"), + NULL, *attributes); + } + /* Supported attributes: interrupt_handler: output a prologue and epilogue suitable for an *************** h8300_handle_tiny_data_attribute (node, *** 3100,3106 **** return NULL_TREE; } ! void h8300_encode_label (decl) tree decl; { --- 3722,3728 ---- return NULL_TREE; } ! static void h8300_encode_label (decl) tree decl; { *************** h8300_encode_label (decl) *** 3115,3120 **** --- 3737,3773 ---- ggc_alloc_string (newstr, len + 1); } + /* If we are referencing a function that is supposed to be called + through the function vector, the SYMBOL_REF_FLAG in the rtl + so the call patterns can generate the correct code. */ + + static void + h8300_encode_section_info (decl, first) + tree decl; + int first; + { + if (TREE_CODE (decl) == FUNCTION_DECL + && h8300_funcvec_function_p (decl)) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + else if (TREE_CODE (decl) == VAR_DECL + && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) + { + if (h8300_eightbit_data_p (decl)) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + else if (first && h8300_tiny_data_p (decl)) + h8300_encode_label (decl); + } + } + + /* Undo the effects of the above. */ + + static const char * + h8300_strip_name_encoding (str) + const char *str; + { + return str + (*str == '*' || *str == '@' || *str == '&'); + } + const char * output_simode_bld (bild, operands) int bild; *************** h8300_adjust_insn_length (insn, length) *** 3186,3219 **** else addr = XEXP (SET_DEST (pat), 0); ! /* On the H8/300, only one adjustment is necessary; if the ! address mode is register indirect, then this insn is two ! bytes shorter than indicated in the machine description. */ ! if (TARGET_H8300 && GET_CODE (addr) == REG) ! return -2; ! /* On the H8/300H and H8/S, register indirect is 6 bytes shorter than ! indicated in the machine description. */ ! if ((TARGET_H8300H || TARGET_H8300S) ! && GET_CODE (addr) == REG) ! return -6; ! /* On the H8/300H and H8/S, reg + d, for small displacements is ! 4 bytes shorter than indicated in the machine description. */ ! if ((TARGET_H8300H || TARGET_H8300S) ! && GET_CODE (addr) == PLUS ! && GET_CODE (XEXP (addr, 0)) == REG ! && GET_CODE (XEXP (addr, 1)) == CONST_INT ! && INTVAL (XEXP (addr, 1)) > -32768 ! && INTVAL (XEXP (addr, 1)) < 32767) ! return -4; ! /* On the H8/300H and H8/S, abs:16 is two bytes shorter than the ! more general abs:24. */ ! if ((TARGET_H8300H || TARGET_H8300S) ! && GET_CODE (addr) == SYMBOL_REF ! && TINY_DATA_NAME_P (XSTR (addr, 0))) ! return -2; } /* Loading some constants needs adjustment. */ --- 3839,3889 ---- else addr = XEXP (SET_DEST (pat), 0); ! if (TARGET_H8300) ! { ! /* On the H8/300, we subtract the difference between the ! actual length and the longest one, which is @(d:16,ERs). */ ! /* @Rs is 2 bytes shorter than the longest. */ ! if (GET_CODE (addr) == REG) ! return -2; ! /* @aa:8 is 2 bytes shorter than the longest. */ ! if (GET_MODE (SET_SRC (pat)) == QImode ! && h8300_eightbit_constant_address_p (addr)) ! return -2; ! } ! else ! { ! /* On the H8/300H and H8S, we subtract the difference ! between the actual length and the longest one, which is ! @(d:24,ERs). */ ! /* @ERs is 6 bytes shorter than the longest. */ ! if (GET_CODE (addr) == REG) ! return -6; ! ! /* @(d:16,ERs) is 6 bytes shorter than the longest. */ ! if (GET_CODE (addr) == PLUS ! && GET_CODE (XEXP (addr, 0)) == REG ! && GET_CODE (XEXP (addr, 1)) == CONST_INT ! && INTVAL (XEXP (addr, 1)) > -32768 ! && INTVAL (XEXP (addr, 1)) < 32767) ! return -4; ! ! /* @aa:8 is 6 bytes shorter than the longest. */ ! if (GET_MODE (SET_SRC (pat)) == QImode ! && h8300_eightbit_constant_address_p (addr)) ! return -6; ! ! /* @aa:16 is 4 bytes shorter than the longest. */ ! if (h8300_tiny_constant_address_p (addr)) ! return -4; ! ! /* @aa:24 is 2 bytes shorter than the longest. */ ! if (GET_CODE (addr) == CONST_INT) ! return -2; ! } } /* Loading some constants needs adjustment. */ *************** h8300_adjust_insn_length (insn, length) *** 3251,3300 **** } } - /* Shifts need various adjustments. */ - if (GET_CODE (pat) == PARALLEL - && GET_CODE (XVECEXP (pat, 0, 0)) == SET - && (GET_CODE (SET_SRC (XVECEXP (pat, 0, 0))) == ASHIFTRT - || GET_CODE (SET_SRC (XVECEXP (pat, 0, 0))) == LSHIFTRT - || GET_CODE (SET_SRC (XVECEXP (pat, 0, 0))) == ASHIFT)) - { - rtx src = SET_SRC (XVECEXP (pat, 0, 0)); - enum machine_mode mode = GET_MODE (src); - int shift; - - if (GET_CODE (XEXP (src, 1)) != CONST_INT) - return 0; - - shift = INTVAL (XEXP (src, 1)); - /* According to ANSI, negative shift is undefined. It is - considered to be zero in this case (see function - output_a_shift above). */ - if (shift < 0) - shift = 0; - - /* QImode shifts by small constants take one insn - per shift. So the adjustment is 20 (md length) - - # shifts * 2. */ - if (mode == QImode && shift <= 4) - return -(20 - shift * 2); - - /* Similarly for HImode and SImode shifts by small constants on - the H8/300H and H8/S. */ - if ((TARGET_H8300H || TARGET_H8300S) - && (mode == HImode || mode == SImode) && shift <= 4) - return -(20 - shift * 2); - - /* HImode shifts by small constants for the H8/300. */ - if (mode == HImode && shift <= 4) - return -(20 - (shift * (GET_CODE (src) == ASHIFT ? 2 : 4))); - - /* SImode shifts by small constants for the H8/300. */ - if (mode == SImode && shift <= 2) - return -(20 - (shift * (GET_CODE (src) == ASHIFT ? 6 : 8))); - - /* XXX ??? Could check for more shift/rotate cases here. */ - } - /* Rotations need various adjustments. */ if (GET_CODE (pat) == SET && (GET_CODE (SET_SRC (pat)) == ROTATE --- 3921,3926 ---- *************** h8300_adjust_insn_length (insn, length) *** 3318,3324 **** /* Determine the faster direction. After this phase, amount will be at most a half of GET_MODE_BITSIZE (mode). */ ! if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2U) /* Flip the direction. */ amount = GET_MODE_BITSIZE (mode) - amount; --- 3944,3950 ---- /* Determine the faster direction. After this phase, amount will be at most a half of GET_MODE_BITSIZE (mode). */ ! if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / (unsigned) 2) /* Flip the direction. */ amount = GET_MODE_BITSIZE (mode) - amount; *************** h8300_adjust_insn_length (insn, length) *** 3335,3341 **** states += 6; } ! /* We use 2-bit rotatations on the H8/S. */ if (TARGET_H8300S) amount = amount / 2 + amount % 2; --- 3961,3967 ---- states += 6; } ! /* We use 2-bit rotatations on the H8S. */ if (TARGET_H8300S) amount = amount / 2 + amount % 2; *************** h8300_asm_named_section (name, flags) *** 3359,3361 **** --- 3985,4054 ---- fprintf (asm_out_file, "\t.section %s\n", name); } #endif /* ! OBJECT_FORMAT_ELF */ + + /* Nonzero if X is a constant address suitable as an 8-bit absolute, + which is a special case of the 'R' operand. */ + + int + h8300_eightbit_constant_address_p (x) + rtx x; + { + /* The ranges of the 8-bit area. */ + const unsigned HOST_WIDE_INT n1 = trunc_int_for_mode (0xff00, HImode); + const unsigned HOST_WIDE_INT n2 = trunc_int_for_mode (0xffff, HImode); + const unsigned HOST_WIDE_INT h1 = trunc_int_for_mode (0x00ffff00, SImode); + const unsigned HOST_WIDE_INT h2 = trunc_int_for_mode (0x00ffffff, SImode); + const unsigned HOST_WIDE_INT s1 = trunc_int_for_mode (0xffffff00, SImode); + const unsigned HOST_WIDE_INT s2 = trunc_int_for_mode (0xffffffff, SImode); + + unsigned HOST_WIDE_INT addr; + + /* We accept symbols declared with eightbit_data. */ + if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FLAG (x)) + return 1; + + if (GET_CODE (x) != CONST_INT) + return 0; + + addr = INTVAL (x); + + return (0 + || ((TARGET_H8300 || TARGET_NORMAL_MODE) && IN_RANGE (addr, n1, n2)) + || (TARGET_H8300H && IN_RANGE (addr, h1, h2)) + || (TARGET_H8300S && IN_RANGE (addr, s1, s2))); + } + + /* Nonzero if X is a constant address suitable as an 16-bit absolute + on H8/300H and H8S. */ + + int + h8300_tiny_constant_address_p (x) + rtx x; + { + /* The ranges of the 16-bit area. */ + const unsigned HOST_WIDE_INT h1 = trunc_int_for_mode (0x00000000, SImode); + const unsigned HOST_WIDE_INT h2 = trunc_int_for_mode (0x00007fff, SImode); + const unsigned HOST_WIDE_INT h3 = trunc_int_for_mode (0x00ff8000, SImode); + const unsigned HOST_WIDE_INT h4 = trunc_int_for_mode (0x00ffffff, SImode); + const unsigned HOST_WIDE_INT s1 = trunc_int_for_mode (0x00000000, SImode); + const unsigned HOST_WIDE_INT s2 = trunc_int_for_mode (0x00007fff, SImode); + const unsigned HOST_WIDE_INT s3 = trunc_int_for_mode (0xffff8000, SImode); + const unsigned HOST_WIDE_INT s4 = trunc_int_for_mode (0xffffffff, SImode); + + unsigned HOST_WIDE_INT addr; + + /* We accept symbols declared with tiny_data. */ + if (GET_CODE (x) == SYMBOL_REF && TINY_DATA_NAME_P (XSTR (x, 0))) + return 1; + + if (GET_CODE (x) != CONST_INT) + return 0; + + addr = INTVAL (x); + + return (0 + || ((TARGET_H8300H && !TARGET_NORMAL_MODE) + && (IN_RANGE (addr, h1, h2) || IN_RANGE (addr, h3, h4))) + || ((TARGET_H8300S && !TARGET_NORMAL_MODE) + && (IN_RANGE (addr, s1, s2) || IN_RANGE (addr, s3, s4)))); + } diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/h8300.h gcc-3.3/gcc/config/h8300/h8300.h *** gcc-3.2.3/gcc/config/h8300/h8300.h 2002-05-21 23:44:58.000000000 +0000 --- gcc-3.3/gcc/config/h8300/h8300.h 2002-12-26 21:00:15.000000000 +0000 *************** *** 1,5 **** ! /* Definitions of target machine for GNU compiler. ! Hitachi H8/300 version generating coff Copyright (C) 1992, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), --- 1,5 ---- ! /* Definitions of target machine for GNU compiler. ! Hitachi H8/300 version generating coff Copyright (C) 1992, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), *************** extern int cpu_type; *** 37,69 **** extern const char *h8_push_op, *h8_pop_op, *h8_mov_op; extern const char * const *h8_reg_names; ! /* Names to predefine in the preprocessor for this target machine. */ ! ! #define CPP_PREDEFINES \ ! "-D__LONG_MAX__=2147483647L -D__LONG_LONG_MAX__=2147483647L" ! ! #define CPP_SPEC \ ! "%{!mh:%{!ms:-D__H8300__}} %{mh:-D__H8300H__} %{ms:-D__H8300S__} \ ! %{!mh:%{!ms:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ ! %{mh:-D__SIZE_TYPE__=unsigned\\ long -D__PTRDIFF_TYPE__=long} \ ! %{ms:-D__SIZE_TYPE__=unsigned\\ long -D__PTRDIFF_TYPE__=long} \ ! %{!mh:%{!ms:-Acpu=h8300 -Amachine=h8300}} \ ! %{mh:-Acpu=h8300h -Amachine=h8300h} \ ! %{ms:-Acpu=h8300s -Amachine=h8300s} \ ! %{!mint32:-D__INT_MAX__=32767} %{mint32:-D__INT_MAX__=2147483647} \ ! %(subtarget_cpp_spec)" ! ! #define SUBTARGET_CPP_SPEC "" #define LINK_SPEC "%{mh:-m h8300h} %{ms:-m h8300s}" #define LIB_SPEC "%{mrelax:-relax} %{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" ! #define EXTRA_SPECS \ ! { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ ! SUBTARGET_EXTRA_SPECS ! ! #define SUBTARGET_EXTRA_SPECS /* Print subsidiary information on the compiler version in use. */ --- 37,88 ---- extern const char *h8_push_op, *h8_pop_op, *h8_mov_op; extern const char * const *h8_reg_names; ! /* Target CPU builtins. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! if (TARGET_H8300H) \ ! { \ ! builtin_define ("__H8300H__"); \ ! builtin_assert ("cpu=h8300h"); \ ! builtin_assert ("machine=h8300h"); \ ! if (TARGET_NORMAL_MODE) \ ! { \ ! builtin_define ("__NORMAL_MODE__"); \ ! } \ ! } \ ! else if (TARGET_H8300S) \ ! { \ ! builtin_define ("__H8300S__"); \ ! builtin_assert ("cpu=h8300s"); \ ! builtin_assert ("machine=h8300s"); \ ! if (TARGET_NORMAL_MODE) \ ! { \ ! builtin_define ("__NORMAL_MODE__"); \ ! } \ ! } \ ! else \ ! { \ ! builtin_define ("__H8300__"); \ ! builtin_assert ("cpu=h8300"); \ ! builtin_assert ("machine=h8300"); \ ! } \ ! } \ ! while (0) #define LINK_SPEC "%{mh:-m h8300h} %{ms:-m h8300s}" #define LIB_SPEC "%{mrelax:-relax} %{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" ! #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \ ! do \ ! { \ ! /* Basic block reordering is only beneficial on targets with cache \ ! and/or variable-cycle branches where (cycle count taken != \ ! cycle count not taken). */ \ ! flag_reorder_blocks = 0; \ ! } \ ! while (0) /* Print subsidiary information on the compiler version in use. */ *************** extern const char * const *h8_reg_names; *** 73,111 **** extern int target_flags; /* Macros used in the machine description to test the flags. */ /* Make int's 32 bits. */ ! #define TARGET_INT32 (target_flags & 8) /* Dump recorded insn lengths into the output file. This helps debug the md file. */ ! #define TARGET_ADDRESSES (target_flags & 64) /* Pass the first few arguments in registers. */ ! #define TARGET_QUICKCALL (target_flags & 128) /* Pretend byte accesses are slow. */ ! #define TARGET_SLOWBYTE (target_flags & 256) /* Dump each assembler insn's rtl into the output file. This is for debugging the compiler only. */ ! #define TARGET_RTL_DUMP (target_flags & 2048) /* Select between the H8/300 and H8/300H CPUs. */ #define TARGET_H8300 (! TARGET_H8300H && ! TARGET_H8300S) ! #define TARGET_H8300H (target_flags & 4096) ! #define TARGET_H8300S (target_flags & 1) /* mac register and relevant instructions are available. */ ! #define TARGET_MAC (target_flags & 2) /* Align all values on the H8/300H the same way as the H8/300. Specifically, 32 bit and larger values are aligned on 16 bit boundaries. ! This is all the hardware requires, but the default is 32 bits for the 300H. ??? Now watch someone add hardware floating point requiring 32 bit alignment. */ ! #define TARGET_ALIGN_300 (target_flags & 8192) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, --- 92,144 ---- extern int target_flags; + /* Masks for the -m switches. */ + #define MASK_H8300S 0x00000001 + #define MASK_MAC 0x00000002 + #define MASK_INT32 0x00000008 + #define MASK_ADDRESSES 0x00000040 + #define MASK_QUICKCALL 0x00000080 + #define MASK_SLOWBYTE 0x00000100 + #define MASK_NORMAL_MODE 0x00000200 + #define MASK_RELAX 0x00000400 + #define MASK_RTL_DUMP 0x00000800 + #define MASK_H8300H 0x00001000 + #define MASK_ALIGN_300 0x00002000 + /* Macros used in the machine description to test the flags. */ /* Make int's 32 bits. */ ! #define TARGET_INT32 (target_flags & MASK_INT32) /* Dump recorded insn lengths into the output file. This helps debug the md file. */ ! #define TARGET_ADDRESSES (target_flags & MASK_ADDRESSES) /* Pass the first few arguments in registers. */ ! #define TARGET_QUICKCALL (target_flags & MASK_QUICKCALL) /* Pretend byte accesses are slow. */ ! #define TARGET_SLOWBYTE (target_flags & MASK_SLOWBYTE) /* Dump each assembler insn's rtl into the output file. This is for debugging the compiler only. */ ! #define TARGET_RTL_DUMP (target_flags & MASK_RTL_DUMP) /* Select between the H8/300 and H8/300H CPUs. */ #define TARGET_H8300 (! TARGET_H8300H && ! TARGET_H8300S) ! #define TARGET_H8300H (target_flags & MASK_H8300H) ! #define TARGET_H8300S (target_flags & MASK_H8300S) ! #define TARGET_NORMAL_MODE (target_flags & MASK_NORMAL_MODE) /* mac register and relevant instructions are available. */ ! #define TARGET_MAC (target_flags & MASK_MAC) /* Align all values on the H8/300H the same way as the H8/300. Specifically, 32 bit and larger values are aligned on 16 bit boundaries. ! This is all the hardware requires, but the default is 32 bits for the H8/300H. ??? Now watch someone add hardware floating point requiring 32 bit alignment. */ ! #define TARGET_ALIGN_300 (target_flags & MASK_ALIGN_300) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** extern int target_flags; *** 113,141 **** where VALUE is the bits to set or minus the bits to clear. An empty string NAME is used to identify the default VALUE. */ ! #define TARGET_SWITCHES \ ! { {"s", 1, N_("Generate H8/S code")}, \ ! {"no-s", -1, N_("Do not generate H8/S code")}, \ ! {"s2600", 2, N_("Generate H8/S2600 code")}, \ ! {"no-s2600", -2, N_("Do not generate H8/S2600 code")}, \ ! {"int32", 8, N_("Make integers 32 bits wide")}, \ ! {"addresses", 64, NULL}, \ ! {"quickcall", 128, \ ! N_("Use registers for argument passing")}, \ ! {"no-quickcall", -128, \ ! N_("Do not use registers for argument passing")}, \ ! {"slowbyte", 256, \ ! N_("Consider access to byte sized memory slow")}, \ ! {"relax", 1024, N_("Enable linker relaxing")}, \ ! {"rtl-dump", 2048, NULL}, \ ! {"h", 4096, N_("Generate H8/300H code")}, \ ! {"no-h", -4096, N_("Do not generate H8/300H code")}, \ ! {"align-300", 8192, N_("Use H8/300 alignment rules")}, \ ! { "", TARGET_DEFAULT, NULL}} #ifdef IN_LIBGCC2 #undef TARGET_H8300H #undef TARGET_H8300S /* If compiling libgcc2, make these compile time constants based on what flags are we actually compiling with. */ #ifdef __H8300H__ --- 146,176 ---- where VALUE is the bits to set or minus the bits to clear. An empty string NAME is used to identify the default VALUE. */ ! #define TARGET_SWITCHES \ ! { {"s", MASK_H8300S, N_("Generate H8S code")}, \ ! {"no-s", -MASK_H8300S, N_("Do not generate H8S code")}, \ ! {"s2600", MASK_MAC, N_("Generate H8S/2600 code")}, \ ! {"no-s2600", -MASK_MAC, N_("Do not generate H8S/2600 code")}, \ ! {"int32", MASK_INT32, N_("Make integers 32 bits wide")}, \ ! {"addresses", MASK_ADDRESSES, NULL}, \ ! {"quickcall", MASK_QUICKCALL, \ ! N_("Use registers for argument passing")}, \ ! {"no-quickcall", -MASK_QUICKCALL, \ ! N_("Do not use registers for argument passing")}, \ ! {"slowbyte", MASK_SLOWBYTE, \ ! N_("Consider access to byte sized memory slow")}, \ ! {"relax", MASK_RELAX, N_("Enable linker relaxing")}, \ ! {"rtl-dump", MASK_RTL_DUMP, NULL}, \ ! {"h", MASK_H8300H, N_("Generate H8/300H code")}, \ ! {"n", MASK_NORMAL_MODE, N_("Enable the normal mode")}, \ ! {"no-h", -MASK_H8300H, N_("Do not generate H8/300H code")}, \ ! {"align-300", MASK_ALIGN_300, N_("Use H8/300 alignment rules")}, \ ! { "", TARGET_DEFAULT, NULL}} #ifdef IN_LIBGCC2 #undef TARGET_H8300H #undef TARGET_H8300S + #undef TARGET_NORMAL_MODE /* If compiling libgcc2, make these compile time constants based on what flags are we actually compiling with. */ #ifdef __H8300H__ *************** extern int target_flags; *** 148,153 **** --- 183,193 ---- #else #define TARGET_H8300S 0 #endif + #ifdef __NORMAL_MODE__ + #define TARGET_NORMAL_MODE 1 + #else + #define TARGET_NORMAL_MODE 0 + #endif #endif /* !IN_LIBGCC2 */ /* Do things that must be done once at start up. */ *************** extern int target_flags; *** 162,168 **** /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT (128) /* quickcall */ #endif /* Show we can debug even without a frame pointer. */ --- 202,208 ---- /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT (MASK_QUICKCALL) #endif /* Show we can debug even without a frame pointer. */ *************** extern int target_flags; *** 171,177 **** /* Define this if addresses of constant functions shouldn't be put through pseudo regs where they can be cse'd. Desirable on machines where ordinary constants are expensive ! but a CALL with constant address is cheap. Calls through a register are cheaper than calls to named functions; however, the register pressure this causes makes --- 211,217 ---- /* Define this if addresses of constant functions shouldn't be put through pseudo regs where they can be cse'd. Desirable on machines where ordinary constants are expensive ! but a CALL with constant address is cheap. Calls through a register are cheaper than calls to named functions; however, the register pressure this causes makes *************** extern int target_flags; *** 180,189 **** /* Target machine storage layout */ - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. This is not true on the H8/300. */ --- 220,225 ---- *************** extern int target_flags; *** 194,222 **** #define BYTES_BIG_ENDIAN 1 /* Define this if most significant word of a multiword number is lowest ! numbered. This is true on an H8/300 (actually we can make it up, but we choose to be consistent). */ #define WORDS_BIG_ENDIAN 1 - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD (TARGET_H8300H || TARGET_H8300S ? 32 : 16) #define MAX_BITS_PER_WORD 32 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_H8300H || TARGET_H8300S ? 4 : 2) #define MIN_UNITS_PER_WORD 2 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE (TARGET_H8300H || TARGET_H8300S ? 32 : 16) - #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16) #define LONG_TYPE_SIZE 32 --- 230,246 ---- #define BYTES_BIG_ENDIAN 1 /* Define this if most significant word of a multiword number is lowest ! numbered. This is true on an H8/300 (actually we can make it up, but we choose to be consistent). */ #define WORDS_BIG_ENDIAN 1 #define MAX_BITS_PER_WORD 32 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_H8300H || TARGET_H8300S ? 4 : 2) #define MIN_UNITS_PER_WORD 2 #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16) #define LONG_TYPE_SIZE 32 *************** extern int target_flags; *** 239,249 **** structure layouts. */ #define EMPTY_FIELD_BOUNDARY 16 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 0 /* No data type wants to be aligned rounder than this. ! 32 bit values are aligned as such on the H8/300H and H8/S for speed. */ #define BIGGEST_ALIGNMENT \ (((TARGET_H8300H || TARGET_H8300S) && ! TARGET_ALIGN_300) ? 32 : 16) --- 263,273 ---- structure layouts. */ #define EMPTY_FIELD_BOUNDARY 16 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 0 /* No data type wants to be aligned rounder than this. ! 32 bit values are aligned as such on the H8/300H and H8S for speed. */ #define BIGGEST_ALIGNMENT \ (((TARGET_H8300H || TARGET_H8300S) && ! TARGET_ALIGN_300) ? 32 : 16) *************** extern int target_flags; *** 263,269 **** from 0 to just below FIRST_PSEUDO_REGISTER. All registers that the compiler knows about must be given numbers, ! even those that are not normally considered general registers. Reg 9 does not correspond to any hardware register, but instead appears in the RTL as an argument pointer prior to reload, and is --- 287,293 ---- from 0 to just below FIRST_PSEUDO_REGISTER. All registers that the compiler knows about must be given numbers, ! even those that are not normally considered general registers. Reg 9 does not correspond to any hardware register, but instead appears in the RTL as an argument pointer prior to reload, and is *************** extern int target_flags; *** 284,290 **** The latter must include the registers where values are returned and the register where structure-value addresses are passed. Aside from that, you can include as many other registers as you ! like. H8 destroys r0,r1,r2,r3. */ --- 308,314 ---- The latter must include the registers where values are returned and the register where structure-value addresses are passed. Aside from that, you can include as many other registers as you ! like. H8 destroys r0,r1,r2,r3. */ *************** extern int target_flags; *** 304,310 **** to hold something of mode MODE. This is ordinarily the length in words of a value of mode MODE ! but can be less for certain modes in special long registers. We pretend the MAC register is 32bits -- we don't have any data types on the H8 series to handle more than 32bits. */ --- 328,334 ---- to hold something of mode MODE. This is ordinarily the length in words of a value of mode MODE ! but can be less for certain modes in special long registers. We pretend the MAC register is 32bits -- we don't have any data types on the H8 series to handle more than 32bits. */ *************** enum reg_class { *** 394,400 **** NO_REGS, GENERAL_REGS, MAC_REGS, ALL_REGS, LIM_REG_CLASSES }; ! #define N_REG_CLASSES (int) LIM_REG_CLASSES /* Give names of register classes as strings for dump file. */ --- 418,424 ---- NO_REGS, GENERAL_REGS, MAC_REGS, ALL_REGS, LIM_REG_CLASSES }; ! #define N_REG_CLASSES ((int) LIM_REG_CLASSES) /* Give names of register classes as strings for dump file. */ *************** enum reg_class { *** 407,414 **** #define REG_CLASS_CONTENTS \ { {0}, /* No regs */ \ ! {0x6ff}, /* GENERAL_REGS */ \ ! {0x100}, /* MAC_REGS */ \ {0x7ff}, /* ALL_REGS */ \ } --- 431,438 ---- #define REG_CLASS_CONTENTS \ { {0}, /* No regs */ \ ! {0x6ff}, /* GENERAL_REGS */ \ ! {0x100}, /* MAC_REGS */ \ {0x7ff}, /* ALL_REGS */ \ } *************** enum reg_class { *** 424,430 **** #define INDEX_REG_CLASS NO_REGS #define BASE_REG_CLASS GENERAL_REGS ! /* Get reg_class from a letter such as appears in the machine description. 'a' is the MAC register. */ --- 448,454 ---- #define INDEX_REG_CLASS NO_REGS #define BASE_REG_CLASS GENERAL_REGS ! /* Get reg_class from a letter such as appears in the machine description. 'a' is the MAC register. */ *************** enum reg_class { *** 437,470 **** Return 1 if VALUE is in the range specified by C. */ #define CONST_OK_FOR_I(VALUE) ((VALUE) == 0) ! #define CONST_OK_FOR_J(VALUE) ((unsigned HOST_WIDE_INT) (VALUE) < 256) ! #define CONST_OK_FOR_K(VALUE) ((VALUE) == 1 || (VALUE) == 2) #define CONST_OK_FOR_L(VALUE) \ (TARGET_H8300H || TARGET_H8300S \ ? (VALUE) == 1 || (VALUE) == 2 || (VALUE) == 4 \ : (VALUE) == 1 || (VALUE) == 2) - #define CONST_OK_FOR_M(VALUE) ((VALUE) == 3 || (VALUE) == 4) #define CONST_OK_FOR_N(VALUE) \ (TARGET_H8300H || TARGET_H8300S \ ? (VALUE) == -1 || (VALUE) == -2 || (VALUE) == -4 \ : (VALUE) == -1 || (VALUE) == -2) - #define CONST_OK_FOR_O(VALUE) (ok_for_bclr (VALUE)) - #define CONST_OK_FOR_P(VALUE) (small_power_of_two (VALUE)) #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \ (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \ - (C) == 'K' ? CONST_OK_FOR_K (VALUE) : \ (C) == 'L' ? CONST_OK_FOR_L (VALUE) : \ - (C) == 'M' ? CONST_OK_FOR_M (VALUE) : \ (C) == 'N' ? CONST_OK_FOR_N (VALUE) : \ - (C) == 'O' ? CONST_OK_FOR_O (VALUE) : \ - (C) == 'P' ? CONST_OK_FOR_P (VALUE) : \ 0) /* Similar, but for floating constants, and defining letters G and H. ! Here VALUE is the CONST_DOUBLE rtx itself. ! `G' is a floating-point zero. */ #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ --- 461,486 ---- Return 1 if VALUE is in the range specified by C. */ #define CONST_OK_FOR_I(VALUE) ((VALUE) == 0) ! #define CONST_OK_FOR_J(VALUE) (((VALUE) & 0xff) == 0) #define CONST_OK_FOR_L(VALUE) \ (TARGET_H8300H || TARGET_H8300S \ ? (VALUE) == 1 || (VALUE) == 2 || (VALUE) == 4 \ : (VALUE) == 1 || (VALUE) == 2) #define CONST_OK_FOR_N(VALUE) \ (TARGET_H8300H || TARGET_H8300S \ ? (VALUE) == -1 || (VALUE) == -2 || (VALUE) == -4 \ : (VALUE) == -1 || (VALUE) == -2) #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \ (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \ (C) == 'L' ? CONST_OK_FOR_L (VALUE) : \ (C) == 'N' ? CONST_OK_FOR_N (VALUE) : \ 0) /* Similar, but for floating constants, and defining letters G and H. ! Here VALUE is the CONST_DOUBLE rtx itself. ! `G' is a floating-point zero. */ #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ *************** enum reg_class { *** 486,492 **** #define CLASS_MAX_NREGS(CLASS, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* Any SI register-to-register move may need to be reloaded, so define REGISTER_MOVE_COST to be > 2 so that reload never shortcuts. */ --- 502,508 ---- #define CLASS_MAX_NREGS(CLASS, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* Any SI register-to-register move may need to be reloaded, so define REGISTER_MOVE_COST to be > 2 so that reload never shortcuts. */ *************** enum reg_class { *** 572,593 **** All other eliminations are valid. */ #define CAN_ELIMINATE(FROM, TO) \ ! ((((FROM) == ARG_POINTER_REGNUM || (FROM) == RETURN_ADDRESS_POINTER_REGNUM) \ ! && (TO) == STACK_POINTER_REGNUM) \ ! ? ! frame_pointer_needed \ ! : 1) /* Define the offset between two registers, one to be eliminated, and the other its replacement, at the start of a routine. */ ! #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ! OFFSET = initial_offset (FROM, TO) /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). If the precise function being called is known, FUNC is its FUNCTION_DECL; ! otherwise, FUNC is 0. ! On the H8 the return value is in R0/R1. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ --- 588,606 ---- All other eliminations are valid. */ #define CAN_ELIMINATE(FROM, TO) \ ! ((TO) == STACK_POINTER_REGNUM ? ! frame_pointer_needed : 1) /* Define the offset between two registers, one to be eliminated, and the other its replacement, at the start of a routine. */ ! #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ! ((OFFSET) = h8300_initial_elimination_offset ((FROM), (TO))) /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). If the precise function being called is known, FUNC is its FUNCTION_DECL; ! otherwise, FUNC is 0. ! On the H8 the return value is in R0/R1. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ *************** struct cum_arg *** 701,718 **** #define EXIT_IGNORE_STACK 0 /* Output assembler code for a block containing the constant parts ! of a trampoline, leaving space for the variable parts. H8/300 vvvv context ! 1 0000 7900xxxx mov.w #0x1234,r3 ! 2 0004 5A00xxxx jmp @0x1234 ^^^^ function H8/300H vvvvvvvv context ! 2 0000 7A00xxxxxxxx mov.l #0x12345678,er3 ! 3 0006 5Axxxxxx jmp @0x123456 ^^^^^^ function */ --- 714,731 ---- #define EXIT_IGNORE_STACK 0 /* Output assembler code for a block containing the constant parts ! of a trampoline, leaving space for the variable parts. H8/300 vvvv context ! 1 0000 7900xxxx mov.w #0x1234,r3 ! 2 0004 5A00xxxx jmp @0x1234 ^^^^ function H8/300H vvvvvvvv context ! 2 0000 7A00xxxxxxxx mov.l #0x12345678,er3 ! 3 0006 5Axxxxxx jmp @0x123456 ^^^^^^ function */ *************** struct cum_arg *** 826,861 **** /* Extra constraints. */ ! /* Nonzero if X is a constant address suitable as an 8-bit absolute on ! the H8/300H, which is a special case of the 'R' operand. */ ! #define EIGHTBIT_CONSTANT_ADDRESS_P(X) \ ! (GET_CODE (X) == CONST_INT && TARGET_H8300H \ ! && 0xffff00 <= INTVAL (X) && INTVAL (X) <= 0xffffff) /* 'U' if valid for a bset destination; i.e. a register, register indirect, or the eightbit memory region (a SYMBOL_REF with an SYMBOL_REF_FLAG set). ! On the H8/S 'U' can also be a 16bit or 32bit absolute. */ #define OK_FOR_U(OP) \ ((GET_CODE (OP) == REG && REG_OK_FOR_BASE_P (OP)) \ || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (OP, 0))) \ || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == SYMBOL_REF \ ! && (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (OP, 0)))) \ ! || ((GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == CONST \ ! && GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS \ ! && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == SYMBOL_REF \ ! && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT) \ ! && (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (XEXP (OP, 0), 0)))) \ || (GET_CODE (OP) == MEM \ ! && EIGHTBIT_CONSTANT_ADDRESS_P (XEXP (OP, 0))) \ || (GET_CODE (OP) == MEM && TARGET_H8300S \ && GET_CODE (XEXP (OP, 0)) == CONST_INT)) #define EXTRA_CONSTRAINT(OP, C) \ ! ((C) == 'U' ? OK_FOR_U (OP) : \ 0) /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression --- 839,886 ---- /* Extra constraints. */ ! #define OK_FOR_R(OP) \ ! (GET_CODE (OP) == CONST_INT \ ! ? !h8300_shift_needs_scratch_p (INTVAL (OP), QImode) \ ! : 0) ! #define OK_FOR_S(OP) \ ! (GET_CODE (OP) == CONST_INT \ ! ? !h8300_shift_needs_scratch_p (INTVAL (OP), HImode) \ ! : 0) ! ! #define OK_FOR_T(OP) \ ! (GET_CODE (OP) == CONST_INT \ ! ? !h8300_shift_needs_scratch_p (INTVAL (OP), SImode) \ ! : 0) /* 'U' if valid for a bset destination; i.e. a register, register indirect, or the eightbit memory region (a SYMBOL_REF with an SYMBOL_REF_FLAG set). ! On the H8S 'U' can also be a 16bit or 32bit absolute. */ #define OK_FOR_U(OP) \ ((GET_CODE (OP) == REG && REG_OK_FOR_BASE_P (OP)) \ || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (OP, 0))) \ || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == SYMBOL_REF \ ! && TARGET_H8300S) \ ! || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == CONST \ ! && GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS \ ! && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == SYMBOL_REF \ ! && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT \ ! && (TARGET_H8300S \ ! || SYMBOL_REF_FLAG (XEXP (XEXP (XEXP (OP, 0), 0), 0)))) \ || (GET_CODE (OP) == MEM \ ! && h8300_eightbit_constant_address_p (XEXP (OP, 0))) \ || (GET_CODE (OP) == MEM && TARGET_H8300S \ && GET_CODE (XEXP (OP, 0)) == CONST_INT)) #define EXTRA_CONSTRAINT(OP, C) \ ! ((C) == 'R' ? OK_FOR_R (OP) : \ ! (C) == 'S' ? OK_FOR_S (OP) : \ ! (C) == 'T' ? OK_FOR_T (OP) : \ ! (C) == 'U' ? OK_FOR_U (OP) : \ 0) /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression *************** struct cum_arg *** 865,885 **** The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, except for CONSTANT_ADDRESS_P which is actually ! machine-independent. On the H8/300, a legitimate address has the form REG, REG+CONSTANT_ADDRESS or CONSTANT_ADDRESS. */ /* Accept either REG or SUBREG where a register is valid. */ ! #define RTX_OK_FOR_BASE_P(X) \ ! ((REG_P (X) && REG_OK_FOR_BASE_P (X)) \ ! || (GET_CODE (X) == SUBREG && REG_P (SUBREG_REG (X)) \ && REG_OK_FOR_BASE_P (SUBREG_REG (X)))) ! #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ if (RTX_OK_FOR_BASE_P (X)) goto ADDR; \ ! if (CONSTANT_ADDRESS_P (X)) goto ADDR; \ if (GET_CODE (X) == PLUS \ && CONSTANT_ADDRESS_P (XEXP (X, 1)) \ && RTX_OK_FOR_BASE_P (XEXP (X, 0))) goto ADDR; --- 890,910 ---- The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, except for CONSTANT_ADDRESS_P which is actually ! machine-independent. On the H8/300, a legitimate address has the form REG, REG+CONSTANT_ADDRESS or CONSTANT_ADDRESS. */ /* Accept either REG or SUBREG where a register is valid. */ ! #define RTX_OK_FOR_BASE_P(X) \ ! ((REG_P (X) && REG_OK_FOR_BASE_P (X)) \ ! || (GET_CODE (X) == SUBREG && REG_P (SUBREG_REG (X)) \ && REG_OK_FOR_BASE_P (SUBREG_REG (X)))) ! #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ if (RTX_OK_FOR_BASE_P (X)) goto ADDR; \ ! if (CONSTANT_ADDRESS_P (X)) goto ADDR; \ if (GET_CODE (X) == PLUS \ && CONSTANT_ADDRESS_P (XEXP (X, 1)) \ && RTX_OK_FOR_BASE_P (XEXP (X, 0))) goto ADDR; *************** struct cum_arg *** 895,901 **** GO_IF_LEGITIMATE_ADDRESS. It is always safe for this macro to do nothing. It exists to recognize ! opportunities to optimize the output. For the H8/300, don't do anything. */ --- 920,926 ---- GO_IF_LEGITIMATE_ADDRESS. It is always safe for this macro to do nothing. It exists to recognize ! opportunities to optimize the output. For the H8/300, don't do anything. */ *************** struct cum_arg *** 950,964 **** /* Specify the machine mode that pointers have. After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */ ! #define Pmode (TARGET_H8300H || TARGET_H8300S ? SImode : HImode) /* ANSI C types. ! We use longs for the 300H because ints can be 16 or 32. GCC requires SIZE_TYPE to be the same size as pointers. */ ! #define NO_BUILTIN_SIZE_TYPE ! #define NO_BUILTIN_PTRDIFF_TYPE ! #define SIZE_TYPE (TARGET_H8300 ? "unsigned int" : "long unsigned int") ! #define PTRDIFF_TYPE (TARGET_H8300 ? "int" : "long int") #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE 16 --- 975,993 ---- /* Specify the machine mode that pointers have. After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */ ! #define Pmode \ ! ((TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE ? SImode : HImode) /* ANSI C types. ! We use longs for the H8/300H and the H8S because ints can be 16 or 32. GCC requires SIZE_TYPE to be the same size as pointers. */ ! #define SIZE_TYPE \ ! (TARGET_H8300 || TARGET_NORMAL_MODE ? "unsigned int" : "long unsigned int") ! #define PTRDIFF_TYPE \ ! (TARGET_H8300 || TARGET_NORMAL_MODE ? "int" : "long int") ! ! #define POINTER_SIZE \ ! ((TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE ? 32 : 16) #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE 16 *************** struct cum_arg *** 987,1006 **** /* Provide the costs of a rtl expression. This is in the body of a switch on CODE. */ - /* ??? Shifts need to have a *much* higher cost than this. */ ! #define RTX_COSTS(RTX, CODE, OUTER_CODE) \ ! case MOD: \ ! case DIV: \ ! return 60; \ ! case MULT: \ ! return 20; \ ! case ASHIFT: \ ! case ASHIFTRT: \ ! case LSHIFTRT: \ ! case ROTATE: \ ! case ROTATERT: \ ! if (GET_MODE (RTX) == HImode) return 2; \ return 8; /* Tell final.c how to eliminate redundant test instructions. */ --- 1016,1037 ---- /* Provide the costs of a rtl expression. This is in the body of a switch on CODE. */ ! #define RTX_COSTS(RTX, CODE, OUTER_CODE) \ ! case AND: \ ! return COSTS_N_INSNS (h8300_and_costs (RTX)); \ ! case MOD: \ ! case DIV: \ ! return 60; \ ! case MULT: \ ! return 20; \ ! case ASHIFT: \ ! case ASHIFTRT: \ ! case LSHIFTRT: \ ! return COSTS_N_INSNS (h8300_shift_costs (RTX)); \ ! case ROTATE: \ ! case ROTATERT: \ ! if (GET_MODE (RTX) == HImode) return 2; \ return 8; /* Tell final.c how to eliminate redundant test instructions. */ *************** struct cum_arg *** 1043,1061 **** #define ASM_APP_OFF "; #NO_APP\n" #define FILE_ASM_OP "\t.file\n" ! #define IDENT_ASM_OP "\t.ident\n" /* The assembler op to get a word, 2 bytes for the H8/300, 4 for H8/300H. */ ! #define ASM_WORD_OP (TARGET_H8300 ? "\t.word\t" : "\t.long\t") ! ! /* We define a readonly data section solely to remove readonly data ! from the instruction stream. This can improve relaxing in two significant ! ways. First it's more likely that references to readonly data ! can be done with a 16bit absolute address since they'll be in low ! memory. Second, it's more likely that jsr instructions can be ! turned into bsr instructions since read-only data is not in the ! instruction stream. */ ! #define READONLY_DATA_SECTION readonly_data #define TEXT_SECTION_ASM_OP "\t.section .text" #define DATA_SECTION_ASM_OP "\t.section .data" --- 1074,1084 ---- #define ASM_APP_OFF "; #NO_APP\n" #define FILE_ASM_OP "\t.file\n" ! #define IDENT_ASM_OP "\t.ident\t" /* The assembler op to get a word, 2 bytes for the H8/300, 4 for H8/300H. */ ! #define ASM_WORD_OP \ ! (TARGET_H8300 || TARGET_NORMAL_MODE ? "\t.word\t" : "\t.long\t") #define TEXT_SECTION_ASM_OP "\t.section .text" #define DATA_SECTION_ASM_OP "\t.section .data" *************** struct cum_arg *** 1063,1082 **** #define INIT_SECTION_ASM_OP "\t.section .init" #define READONLY_DATA_SECTION_ASM_OP "\t.section .rodata" - #define EXTRA_SECTIONS in_readonly_data - - #define EXTRA_SECTION_FUNCTIONS \ - extern void readonly_data PARAMS ((void)); \ - void \ - readonly_data () \ - { \ - if (in_section != in_readonly_data) \ - { \ - fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \ - in_section = in_readonly_data; \ - } \ - } - #undef DO_GLOBAL_CTORS_BODY #define DO_GLOBAL_CTORS_BODY \ { \ --- 1086,1091 ---- *************** readonly_data () \ *** 1105,1133 **** #define TINY_DATA_NAME_P(NAME) (*(NAME) == '&') - /* If we are referencing a function that is supposed to be called - through the function vector, the SYMBOL_REF_FLAG in the rtl - so the call patterns can generate the correct code. */ - #define ENCODE_SECTION_INFO(DECL) \ - if (TREE_CODE (DECL) == FUNCTION_DECL \ - && h8300_funcvec_function_p (DECL)) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - else if (TREE_CODE (DECL) == VAR_DECL \ - && (TREE_STATIC (DECL) || DECL_EXTERNAL (DECL)) \ - && h8300_eightbit_data_p (DECL)) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - else if (TREE_CODE (DECL) == VAR_DECL \ - && (TREE_STATIC (DECL) || DECL_EXTERNAL (DECL)) \ - && h8300_tiny_data_p (DECL)) \ - h8300_encode_label (DECL); - - /* Store the user-specified part of SYMBOL_NAME in VAR. - This is sort of inverse to ENCODE_SECTION_INFO. */ - #define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \ - (VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' \ - || (SYMBOL_NAME)[0] == '@' \ - || (SYMBOL_NAME)[0] == '&'); - /* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */ --- 1114,1119 ---- *************** readonly_data () \ *** 1138,1144 **** { {"er0", 0}, {"er1", 1}, {"er2", 2}, {"er3", 3}, {"er4", 4}, \ {"er5", 5}, {"er6", 6}, {"er7", 7}, {"r7", 7} } ! #define SDB_DEBUGGING_INFO #define SDB_DELIM "\n" /* Support -gstabs. */ --- 1124,1130 ---- { {"er0", 0}, {"er1", 1}, {"er2", 2}, {"er3", 3}, {"er4", 4}, \ {"er5", 5}, {"er6", 6}, {"er7", 7}, {"r7", 7} } ! #define SDB_DEBUGGING_INFO 1 #define SDB_DELIM "\n" /* Support -gstabs. */ *************** readonly_data () \ *** 1158,1190 **** /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION h8300_asm_named_section - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE, NAME) \ - do \ - { \ - assemble_name (FILE, NAME); \ - fputs (":\n", FILE); \ - } \ - while (0) - #define ASM_OUTPUT_LABELREF(FILE, NAME) \ asm_fprintf ((FILE), "%U%s", (NAME) + (TINY_DATA_NAME_P (NAME) ? 1 : 0)) #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do \ ! { \ ! fputs ("\t.global ", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE); \ ! } \ ! while (0) #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ASM_OUTPUT_LABEL (FILE, NAME) --- 1144,1156 ---- /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION h8300_asm_named_section #define ASM_OUTPUT_LABELREF(FILE, NAME) \ asm_fprintf ((FILE), "%U%s", (NAME) + (TINY_DATA_NAME_P (NAME) ? 1 : 0)) #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global " #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ASM_OUTPUT_LABEL (FILE, NAME) *************** readonly_data () \ *** 1225,1231 **** /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! asm_fprintf (FILE, "%s.L%d\n", ASM_WORD_OP, VALUE) /* This is how to output an element of a case-vector that is relative. */ --- 1191,1197 ---- /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! fprintf (FILE, "%s.L%d\n", ASM_WORD_OP, VALUE) /* This is how to output an element of a case-vector that is relative. */ diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/h8300.md gcc-3.3/gcc/config/h8300/h8300.md *** gcc-3.2.3/gcc/config/h8300/h8300.md 2002-02-23 14:17:25.000000000 +0000 --- gcc-3.3/gcc/config/h8300/h8300.md 2003-02-18 19:17:56.000000000 +0000 *************** *** 1,6 **** ;; GCC machine description for Hitachi H8/300 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! ;; 2001, 2002 Free Software Foundation, Inc. ;; Contributed by Steve Chamberlain (sac@cygnus.com), ;; Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). --- 1,6 ---- ;; GCC machine description for Hitachi H8/300 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! ;; 2001, 2002, 2003 Free Software Foundation, Inc. ;; Contributed by Steve Chamberlain (sac@cygnus.com), ;; Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). *************** *** 28,41 **** ;; "worst case" and then be adjusted to their correct values by ;; h8300_adjust_insn_length. ! ;; On the H8/300H and H8/S, adds/subs operate on the 32bit "er" ;; registers. Right now GCC doesn't expose the "e" half to the ;; compiler, so using add/subs for addhi and subhi is safe. Long ;; term, we want to expose the "e" half to the compiler (gives us 8 ;; more 16bit registers). At that point addhi and subhi can't use ;; adds/subs. ! ;; There's currently no way to have a insv/extzv expander for the H8/300H ;; because word_mode is different for the H8/300 and H8/300H. ;; Shifts/rotates by small constants should be handled by special --- 28,41 ---- ;; "worst case" and then be adjusted to their correct values by ;; h8300_adjust_insn_length. ! ;; On the H8/300H and H8S, adds/subs operate on the 32bit "er" ;; registers. Right now GCC doesn't expose the "e" half to the ;; compiler, so using add/subs for addhi and subhi is safe. Long ;; term, we want to expose the "e" half to the compiler (gives us 8 ;; more 16bit registers). At that point addhi and subhi can't use ;; adds/subs. ! ;; There's currently no way to have an insv/extzv expander for the H8/300H ;; because word_mode is different for the H8/300 and H8/300H. ;; Shifts/rotates by small constants should be handled by special *************** *** 90,103 **** (define_attr "adjust_length" "yes,no" (cond [(eq_attr "type" "branch") (const_string "no")] ! (const_string "yes"))) ;; Condition code settings. ;; ;; none - insn does not affect cc ;; none_0hit - insn does not affect cc but it does modify operand 0 ;; This attribute is used to keep track of when operand 0 changes. ! ;; See the description of NOTICE_UPDATE_CC for more info. ;; set_znv - insn sets z,n,v to usable values (like a tst insn); c is unknown. ;; set_zn - insn sets z,n to usable values; v,c are unknown. ;; compare - compare instruction --- 90,103 ---- (define_attr "adjust_length" "yes,no" (cond [(eq_attr "type" "branch") (const_string "no")] ! (const_string "yes"))) ;; Condition code settings. ;; ;; none - insn does not affect cc ;; none_0hit - insn does not affect cc but it does modify operand 0 ;; This attribute is used to keep track of when operand 0 changes. ! ;; See the description of NOTICE_UPDATE_CC for more info. ;; set_znv - insn sets z,n,v to usable values (like a tst insn); c is unknown. ;; set_zn - insn sets z,n to usable values; v,c are unknown. ;; compare - compare instruction *************** *** 114,133 **** (define_insn "pushqi1_h8300" [(parallel [(set (reg:HI SP_REG) ! (plus:HI (reg:HI SP_REG) (const_int -2))) ! (set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -1))) ! (match_operand:QI 0 "register_operand" "r"))])] ! "TARGET_H8300" "mov.w\\t%T0,@-r7" [(set_attr "length" "2") (set_attr "cc" "clobber")]) (define_insn "pushqi1_h8300hs" [(parallel [(set (reg:SI SP_REG) ! (plus:SI (reg:SI SP_REG) (const_int -4))) ! (set (mem:QI (plus:SI (reg:SI SP_REG) (const_int -3))) ! (match_operand:QI 0 "register_operand" "r"))])] ! "TARGET_H8300H || TARGET_H8300S" "mov.l\\t%S0,@-er7" [(set_attr "length" "4") (set_attr "cc" "clobber")]) --- 114,135 ---- (define_insn "pushqi1_h8300" [(parallel [(set (reg:HI SP_REG) ! (plus:HI (reg:HI SP_REG) (const_int -2))) ! (set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -1))) ! (match_operand:QI 0 "register_operand" "r"))])] ! "TARGET_H8300 ! && REGNO (operands[0]) != SP_REG" "mov.w\\t%T0,@-r7" [(set_attr "length" "2") (set_attr "cc" "clobber")]) (define_insn "pushqi1_h8300hs" [(parallel [(set (reg:SI SP_REG) ! (plus:SI (reg:SI SP_REG) (const_int -4))) ! (set (mem:QI (plus:SI (reg:SI SP_REG) (const_int -3))) ! (match_operand:QI 0 "register_operand" "r"))])] ! "(TARGET_H8300H || TARGET_H8300S) ! && REGNO (operands[0]) != SP_REG" "mov.l\\t%S0,@-er7" [(set_attr "length" "4") (set_attr "cc" "clobber")]) *************** *** 208,223 **** (define_expand "pushhi1_h8300" [(set (mem:HI (pre_dec:HI (reg:HI SP_REG))) ! (match_operand:HI 0 "register_operand" ""))] ! "TARGET_H8300" "") (define_insn "pushhi1_h8300hs" [(parallel [(set (reg:SI SP_REG) ! (plus:SI (reg:SI SP_REG) (const_int -4))) ! (set (mem:HI (plus:SI (reg:SI SP_REG) (const_int -2))) ! (match_operand:HI 0 "register_operand" "r"))])] ! "TARGET_H8300H || TARGET_H8300S" "mov.l\\t%S0,@-er7" [(set_attr "length" "4") (set_attr "cc" "clobber")]) --- 210,227 ---- (define_expand "pushhi1_h8300" [(set (mem:HI (pre_dec:HI (reg:HI SP_REG))) ! (match_operand:HI 0 "register_operand" ""))] ! "TARGET_H8300 ! && REGNO (operands[0]) != SP_REG" "") (define_insn "pushhi1_h8300hs" [(parallel [(set (reg:SI SP_REG) ! (plus:SI (reg:SI SP_REG) (const_int -4))) ! (set (mem:HI (plus:SI (reg:SI SP_REG) (const_int -2))) ! (match_operand:HI 0 "register_operand" "r"))])] ! "(TARGET_H8300H || TARGET_H8300S) ! && REGNO (operands[0]) != SP_REG" "mov.l\\t%S0,@-er7" [(set_attr "length" "4") (set_attr "cc" "clobber")]) *************** *** 468,475 **** (set_attr "cc" "clobber")]) (define_insn "movsi_h8300hs" ! [(set (match_operand:SI 0 "general_operand_dst" "=r,r,r,r,m,<,r,*a,*a,r") ! (match_operand:SI 1 "general_operand_src" "I,r,i,m,r,r,>,I,r,*a"))] "(TARGET_H8300S || TARGET_H8300H) && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode)) --- 472,479 ---- (set_attr "cc" "clobber")]) (define_insn "movsi_h8300hs" ! [(set (match_operand:SI 0 "general_operand_dst" "=r,r,r,<,r,r,m,*a,*a,r") ! (match_operand:SI 1 "general_operand_src" "I,r,i,r,>,m,r,I,r,*a"))] "(TARGET_H8300S || TARGET_H8300H) && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode)) *************** *** 510,516 **** } /* Look for constants that can be obtained by subs, inc, and ! dec to 0. */ switch (val & 0xffffffff) { case 0xffffffff: --- 514,520 ---- } /* Look for constants that can be obtained by subs, inc, and ! dec to 0. */ switch (val & 0xffffffff) { case 0xffffffff: *************** *** 539,545 **** } return \"mov.l %S1,%S0\"; }" ! [(set_attr "length" "2,2,6,10,10,4,4,2,6,4") (set_attr "cc" "set_zn,set_znv,clobber,set_znv,set_znv,set_znv,set_znv,none_0hit,none_0hit,set_znv")]) (define_insn "movsf_h8300h" --- 543,549 ---- } return \"mov.l %S1,%S0\"; }" ! [(set_attr "length" "2,2,6,4,4,10,10,2,6,4") (set_attr "cc" "set_zn,set_znv,clobber,set_znv,set_znv,set_znv,set_znv,none_0hit,none_0hit,set_znv")]) (define_insn "movsf_h8300h" *************** *** 580,594 **** [(set_attr "length" "2") (set_attr "cc" "set_zn")]) ! (define_insn "" ! [(set (cc0) (zero_extract:SI (match_operand:QI 0 "bit_memory_operand" "r,U") (const_int 1) (match_operand 1 "const_int_operand" "n,n")))] ! "TARGET_H8300H || TARGET_H8300S" "btst %Z1,%Y0" [(set_attr "length" "2,8") (set_attr "cc" "set_zn,set_zn")]) (define_insn "" [(set (cc0) (zero_extract:SI (match_operand:SI 0 "register_operand" "r") (const_int 1) --- 584,616 ---- [(set_attr "length" "2") (set_attr "cc" "set_zn")]) ! (define_insn "*tst_extzv_bitqi_1_n" ! [(set (cc0) (zero_extract:SI (match_operand:QI 0 "bit_operand" "r,U") (const_int 1) (match_operand 1 "const_int_operand" "n,n")))] ! "(TARGET_H8300H || TARGET_H8300S) ! && INTVAL (operands[1]) != 7" "btst %Z1,%Y0" [(set_attr "length" "2,8") (set_attr "cc" "set_zn,set_zn")]) + (define_insn_and_split "*tst_extzv_memqi_1_n" + [(set (cc0) (zero_extract:SI (match_operand:QI 0 "memory_operand" "m") + (const_int 1) + (match_operand 1 "const_int_operand" "n"))) + (clobber (match_scratch:QI 2 "=&r"))] + "(TARGET_H8300H || TARGET_H8300S) + && !EXTRA_CONSTRAINT (operands[0], 'U') + && INTVAL (operands[1]) != 7" + "#" + "&& reload_completed" + [(set (match_dup 2) + (match_dup 0)) + (set (cc0) (zero_extract:SI (match_dup 2) + (const_int 1) + (match_dup 1)))] + "") + (define_insn "" [(set (cc0) (zero_extract:SI (match_operand:SI 0 "register_operand" "r") (const_int 1) *************** *** 599,604 **** --- 621,663 ---- [(set_attr "length" "2") (set_attr "cc" "set_zn")]) + (define_insn "" + [(set (cc0) + (and:HI (match_operand:HI 0 "register_operand" "r") + (match_operand:HI 1 "single_one_operand" "n")))] + "" + "* + { + operands[1] = GEN_INT (INTVAL (operands[1]) & 0xffff); + if (INTVAL (operands[1]) > 128) + { + operands[1] = GEN_INT (INTVAL (operands[1]) >> 8); + return \"btst\\t%V1,%t0\"; + } + return \"btst\\t%V1,%s0\"; + }" + [(set_attr "length" "2") + (set_attr "cc" "set_zn")]) + + (define_insn "" + [(set (cc0) + (and:SI (match_operand:SI 0 "register_operand" "r") + (match_operand:SI 1 "single_one_operand" "n")))] + "(TARGET_H8300H || TARGET_H8300S) + && (INTVAL (operands[1]) & 0xffff) != 0" + "* + { + operands[1] = GEN_INT (INTVAL (operands[1]) & 0xffff); + if (INTVAL (operands[1]) > 128) + { + operands[1] = GEN_INT (INTVAL (operands[1]) >> 8); + return \"btst\\t%V1,%x0\"; + } + return \"btst\\t%V1,%w0\"; + }" + [(set_attr "length" "2") + (set_attr "cc" "set_zn")]) + (define_insn "tstqi" [(set (cc0) (match_operand:QI 0 "register_operand" "r"))] "" *************** *** 613,618 **** --- 672,686 ---- [(set_attr "length" "2") (set_attr "cc" "set_znv")]) + (define_insn "" + [(set (cc0) + (and:HI (match_operand:HI 0 "register_operand" "r") + (const_int -256)))] + "" + "mov.b %t0,%t0" + [(set_attr "length" "2") + (set_attr "cc" "set_znv")]) + (define_insn "tstsi" [(set (cc0) (match_operand:SI 0 "register_operand" "r"))] "TARGET_H8300H || TARGET_H8300S" *************** *** 620,625 **** --- 688,702 ---- [(set_attr "length" "2") (set_attr "cc" "set_znv")]) + (define_insn "" + [(set (cc0) + (and:SI (match_operand:SI 0 "register_operand" "r") + (const_int -65536)))] + "" + "mov.w %e0,%e0" + [(set_attr "length" "2") + (set_attr "cc" "set_znv")]) + (define_insn "cmpqi" [(set (cc0) (compare:QI (match_operand:QI 0 "register_operand" "r") *************** *** 689,720 **** "" "") ! (define_insn "" ! [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,&r") ! (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0,g") ! (match_operand:HI 2 "nonmemory_operand" "L,N,n,r,r")))] "TARGET_H8300" "@ adds %2,%T0 subs %G2,%T0 add.b %s2,%s0\;addx %t2,%t0 ! add.w %T2,%T0 ! mov.w %T1,%T0\;add.w %T2,%T0" ! [(set_attr "length" "2,2,4,2,6") ! (set_attr "cc" "none_0hit,none_0hit,clobber,set_zn,set_zn")]) ! (define_insn "" ! [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") ! (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0") ! (match_operand:HI 2 "nonmemory_operand" "L,N,n,r")))] "TARGET_H8300H || TARGET_H8300S" "@ adds %2,%S0 subs %G2,%S0 add.w %T2,%T0 add.w %T2,%T0" ! [(set_attr "length" "2,2,4,2") ! (set_attr "cc" "none_0hit,none_0hit,set_zn,set_zn")]) (define_split [(set (match_operand:HI 0 "register_operand" "") --- 766,827 ---- "" "") ! (define_insn "*addhi3_h8300" ! [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r") ! (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0,0") ! (match_operand:HI 2 "nonmemory_operand" "L,N,J,n,r")))] "TARGET_H8300" "@ adds %2,%T0 subs %G2,%T0 + add.b %t2,%t0 add.b %s2,%s0\;addx %t2,%t0 ! add.w %T2,%T0" ! [(set_attr "length" "2,2,2,4,2") ! (set_attr "cc" "none_0hit,none_0hit,clobber,clobber,set_zn")]) ! ;; This splitter is very important to make the stack adjustment ! ;; interrupt-safe. The combination of add.b and addx is unsafe! ! ;; ! ;; We apply this split after the peephole2 pass so that we won't end ! ;; up creating too many adds/subs when a scratch register is ! ;; available, which is actually a common case because stack unrolling ! ;; tends to happen immediately after a function call. ! ! (define_split ! [(set (match_operand:HI 0 "stack_pointer_operand" "") ! (plus:HI (match_dup 0) ! (match_operand 1 "const_int_gt_2_operand" "")))] ! "TARGET_H8300 && flow2_completed" ! [(const_int 0)] ! "split_adds_subs (HImode, operands); DONE;") ! ! (define_peephole2 ! [(match_scratch:HI 2 "r") ! (set (match_operand:HI 0 "stack_pointer_operand" "") ! (plus:HI (match_dup 0) ! (match_operand:HI 1 "const_int_ge_8_operand" "")))] ! "TARGET_H8300" ! [(set (match_dup 2) ! (match_dup 1)) ! (set (match_dup 0) ! (plus:HI (match_dup 0) ! (match_dup 2)))] ! "") ! ! (define_insn "*addhi3_h8300hs" ! [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r") ! (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0,0") ! (match_operand:HI 2 "nonmemory_operand" "L,N,J,n,r")))] "TARGET_H8300H || TARGET_H8300S" "@ adds %2,%S0 subs %G2,%S0 + add.b %t2,%t0 add.w %T2,%T0 add.w %T2,%T0" ! [(set_attr "length" "2,2,2,4,2") ! (set_attr "cc" "none_0hit,none_0hit,clobber,set_zn,set_zn")]) (define_split [(set (match_operand:HI 0 "register_operand" "") *************** *** 922,928 **** (umod:HI (match_dup 1) (zero_extend:HI (match_dup 2)))))] ! "TARGET_H8300H || TARGET_H8300S" "* { if (find_reg_note (insn, REG_UNUSED, operands[3])) --- 1029,1035 ---- (umod:HI (match_dup 1) (zero_extend:HI (match_dup 2)))))] ! "" "* { if (find_reg_note (insn, REG_UNUSED, operands[3])) *************** *** 1006,1013 **** (define_insn "" [(set (match_operand:QI 0 "bit_operand" "=r,U") (and:QI (match_operand:QI 1 "bit_operand" "%0,0") ! (match_operand:QI 2 "nonmemory_operand" "rn,O")))] ! "register_operand (operands[0], QImode) || o_operand (operands[2], QImode)" "@ and %X2,%X0 bclr %W2,%R0" --- 1113,1121 ---- (define_insn "" [(set (match_operand:QI 0 "bit_operand" "=r,U") (and:QI (match_operand:QI 1 "bit_operand" "%0,0") ! (match_operand:QI 2 "nonmemory_operand" "rn,n")))] ! "register_operand (operands[0], QImode) ! || single_zero_operand (operands[2], QImode)" "@ and %X2,%X0 bclr %W2,%R0" *************** *** 1022,1028 **** "" " { ! if (fix_bit_operand (operands, 'O', AND)) DONE; }") --- 1130,1136 ---- "" " { ! if (fix_bit_operand (operands, 0, AND)) DONE; }") *************** *** 1033,1073 **** "" "") ! (define_insn "" ! [(set (match_operand:HI 0 "register_operand" "=r") ! (and:HI (match_operand:HI 1 "register_operand" "%0") ! (match_operand:HI 2 "nonmemory_operand" "rn")))] ! "TARGET_H8300" ! "* return output_logical_op (HImode, AND, operands);" ! [(set_attr "length" "4") (set_attr "cc" "clobber")]) - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (and:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "nonmemory_operand" "r,n")))] - "TARGET_H8300H || TARGET_H8300S" - "* return output_logical_op (HImode, AND, operands);" - [(set_attr "length" "2,4") - (set_attr "cc" "set_znv,clobber")]) - (define_insn "*andorhi3" [(set (match_operand:HI 0 "register_operand" "=r") (ior:HI (and:HI (match_operand:HI 2 "register_operand" "r") ! (match_operand:HI 3 "const_int_operand" "n")) ! (match_operand:HI 1 "register_operand" "0")))] ! "exact_log2 (INTVAL (operands[3]) & 0xffff) != -1" "* { operands[3] = GEN_INT (INTVAL (operands[3]) & 0xffff); if (INTVAL (operands[3]) > 128) { operands[3] = GEN_INT (INTVAL (operands[3]) >> 8); ! return \"bld\\t%V3,%t2\;bst\\t%V3,%t0\"; } ! return \"bld\\t%V3,%s2\;bst\\t%V3,%s0\"; }" ! [(set_attr "length" "4") (set_attr "cc" "clobber")]) (define_expand "andsi3" --- 1141,1203 ---- "" "") ! (define_insn "*andorqi3" ! [(set (match_operand:QI 0 "register_operand" "=r") ! (ior:QI (and:QI (match_operand:QI 2 "register_operand" "r") ! (match_operand:QI 3 "single_one_operand" "n")) ! (match_operand:QI 1 "register_operand" "0")))] ! "" ! "bld\\t%V3,%X2\;bor\\t%V3,%X0\;bst\\t%V3,%X0" ! [(set_attr "length" "6") (set_attr "cc" "clobber")]) (define_insn "*andorhi3" [(set (match_operand:HI 0 "register_operand" "=r") (ior:HI (and:HI (match_operand:HI 2 "register_operand" "r") ! (match_operand:HI 3 "single_one_operand" "n")) ! (match_operand:HI 1 "register_operand" "0")))] ! "" "* { operands[3] = GEN_INT (INTVAL (operands[3]) & 0xffff); if (INTVAL (operands[3]) > 128) { operands[3] = GEN_INT (INTVAL (operands[3]) >> 8); ! return \"bld\\t%V3,%t2\;bor\\t%V3,%t0\;bst\\t%V3,%t0\"; } ! return \"bld\\t%V3,%s2\;bor\\t%V3,%s0\;bst\\t%V3,%s0\"; }" ! [(set_attr "length" "6") ! (set_attr "cc" "clobber")]) ! ! (define_insn "*andorsi3" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (and:SI (match_operand:SI 2 "register_operand" "r") ! (match_operand:SI 3 "single_one_operand" "n")) ! (match_operand:SI 1 "register_operand" "0")))] ! "(INTVAL (operands[3]) & 0xffff) != 0" ! "* ! { ! operands[3] = GEN_INT (INTVAL (operands[3]) & 0xffff); ! if (INTVAL (operands[3]) > 128) ! { ! operands[3] = GEN_INT (INTVAL (operands[3]) >> 8); ! return \"bld\\t%V3,%x2\;bor\\t%V3,%x0\;bst\\t%V3,%x0\"; ! } ! return \"bld\\t%V3,%w2\;bor\\t%V3,%w0\;bst\\t%V3,%w0\"; ! }" ! [(set_attr "length" "6") ! (set_attr "cc" "clobber")]) ! ! (define_insn "*andorsi3_shift_8" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (and:SI (ashift:SI (match_operand:SI 2 "register_operand" "r") ! (const_int 8)) ! (const_int 65280)) ! (match_operand:SI 1 "register_operand" "0")))] ! "" ! "or.b\\t%w2,%x0" ! [(set_attr "length" "2") (set_attr "cc" "clobber")]) (define_expand "andsi3" *************** *** 1077,1100 **** "" "") - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (and:SI (match_operand:SI 1 "register_operand" "%0") - (match_operand:SI 2 "nonmemory_operand" "rn")))] - "TARGET_H8300" - "* return output_logical_op (SImode, AND, operands);" - [(set_attr "length" "8") - (set_attr "cc" "clobber")]) - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (and:SI (match_operand:SI 1 "register_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "r,n")))] - "TARGET_H8300H || TARGET_H8300S" - "* return output_logical_op (SImode, AND, operands);" - [(set_attr "length" "4,6") - (set_attr "cc" "set_znv,clobber")]) - ;; ---------------------------------------------------------------------- ;; OR INSTRUCTIONS ;; ---------------------------------------------------------------------- --- 1207,1212 ---- *************** *** 1104,1124 **** (ior:QI (match_operand:QI 1 "bit_operand" "%0,0") (match_operand:QI 2 "nonmemory_operand" "rn,n")))] "register_operand (operands[0], QImode) ! || (GET_CODE (operands[2]) == CONST_INT ! && exact_log2 (INTVAL (operands[2]) & 0xff) != -1)" ! "* ! { ! switch (which_alternative) ! { ! case 0: ! return \"or\t%X2,%X0\"; ! case 1: ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff); ! return \"bset\t%V2,%R0\"; ! default: ! abort (); ! } ! }" [(set_attr "length" "2,8") (set_attr "adjust_length" "no") (set_attr "cc" "set_znv,none_0hit")]) --- 1216,1225 ---- (ior:QI (match_operand:QI 1 "bit_operand" "%0,0") (match_operand:QI 2 "nonmemory_operand" "rn,n")))] "register_operand (operands[0], QImode) ! || single_one_operand (operands[2], QImode)" ! "@ ! or\\t%X2,%X0 ! bset\\t%V2,%R0" [(set_attr "length" "2,8") (set_attr "adjust_length" "no") (set_attr "cc" "set_znv,none_0hit")]) *************** *** 1130,1136 **** "" " { ! if (fix_bit_operand (operands, 'P', IOR)) DONE; }") --- 1231,1237 ---- "" " { ! if (fix_bit_operand (operands, 1, IOR)) DONE; }") *************** *** 1141,1164 **** "" "") - (define_insn "" - [(set (match_operand:HI 0 "general_operand" "=r,r") - (ior:HI (match_operand:HI 1 "general_operand" "%0,0") - (match_operand:HI 2 "general_operand" "J,rn")))] - "TARGET_H8300" - "* return output_logical_op (HImode, IOR, operands);" - [(set_attr "length" "2,4") - (set_attr "cc" "clobber,clobber")]) - - (define_insn "" - [(set (match_operand:HI 0 "general_operand" "=r,r,r") - (ior:HI (match_operand:HI 1 "general_operand" "%0,0,0") - (match_operand:HI 2 "general_operand" "J,r,n")))] - "TARGET_H8300H || TARGET_H8300S" - "* return output_logical_op (HImode, IOR, operands);" - [(set_attr "length" "2,2,4") - (set_attr "cc" "clobber,set_znv,clobber")]) - (define_expand "iorsi3" [(set (match_operand:SI 0 "register_operand" "") (ior:SI (match_operand:SI 1 "register_operand" "") --- 1242,1247 ---- *************** *** 1166,1189 **** "" "") - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ior:SI (match_operand:SI 1 "register_operand" "%0,0") - (match_operand:SI 2 "nonmemory_operand" "J,rn")))] - "TARGET_H8300" - "* return output_logical_op (SImode, IOR, operands);" - [(set_attr "length" "2,8") - (set_attr "cc" "clobber,clobber")]) - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (ior:SI (match_operand:SI 1 "register_operand" "%0,0,0") - (match_operand:SI 2 "nonmemory_operand" "J,r,n")))] - "TARGET_H8300H || TARGET_H8300S" - "* return output_logical_op (SImode, IOR, operands);" - [(set_attr "length" "2,4,6") - (set_attr "cc" "clobber,set_znv,clobber")]) - ;; ---------------------------------------------------------------------- ;; XOR INSTRUCTIONS ;; ---------------------------------------------------------------------- --- 1249,1254 ---- *************** *** 1193,1213 **** (xor:QI (match_operand:QI 1 "bit_operand" "%0,0") (match_operand:QI 2 "nonmemory_operand" "rn,n")))] "register_operand (operands[0], QImode) ! || (GET_CODE (operands[2]) == CONST_INT ! && exact_log2 (INTVAL (operands[2]) & 0xff) != -1)" ! "* ! { ! switch (which_alternative) ! { ! case 0: ! return \"xor\t%X2,%X0\"; ! case 1: ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff); ! return \"bnot\t%V2,%R0\"; ! default: ! abort (); ! } ! }" [(set_attr "length" "2,8") (set_attr "adjust_length" "no") (set_attr "cc" "set_znv,none_0hit")]) --- 1258,1267 ---- (xor:QI (match_operand:QI 1 "bit_operand" "%0,0") (match_operand:QI 2 "nonmemory_operand" "rn,n")))] "register_operand (operands[0], QImode) ! || single_one_operand (operands[2], QImode)" ! "@ ! xor\\t%X2,%X0 ! bnot\\t%V2,%R0" [(set_attr "length" "2,8") (set_attr "adjust_length" "no") (set_attr "cc" "set_znv,none_0hit")]) *************** *** 1219,1225 **** "" " { ! if (fix_bit_operand (operands, 'O', XOR)) DONE; }") --- 1273,1279 ---- "" " { ! if (fix_bit_operand (operands, 1, XOR)) DONE; }") *************** *** 1230,1253 **** "" "") - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (xor:HI (match_operand:HI 1 "register_operand" "%0,0") - (match_operand:HI 2 "nonmemory_operand" "J,rn")))] - "TARGET_H8300" - "* return output_logical_op (HImode, XOR, operands);" - [(set_attr "length" "2,4") - (set_attr "cc" "clobber,clobber")]) - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r,r,r") - (xor:HI (match_operand:HI 1 "register_operand" "%0,0,0") - (match_operand:HI 2 "nonmemory_operand" "J,r,n")))] - "TARGET_H8300H || TARGET_H8300S" - "* return output_logical_op (HImode, XOR, operands);" - [(set_attr "length" "2,2,4") - (set_attr "cc" "clobber,set_znv,clobber")]) - (define_expand "xorsi3" [(set (match_operand:SI 0 "register_operand" "") (xor:SI (match_operand:SI 1 "register_operand" "") --- 1284,1289 ---- *************** *** 1255,1277 **** "" "") (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r,r") ! (xor:SI (match_operand:SI 1 "register_operand" "%0,0") ! (match_operand:SI 2 "nonmemory_operand" "J,rn")))] ! "TARGET_H8300" ! "* return output_logical_op (SImode, XOR, operands);" ! [(set_attr "length" "2,8") ! (set_attr "cc" "clobber,clobber")]) (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r,r,r") ! (xor:SI (match_operand:SI 1 "register_operand" "%0,0,0") ! (match_operand:SI 2 "nonmemory_operand" "J,r,n")))] ! "TARGET_H8300H || TARGET_H8300S" ! "* return output_logical_op (SImode, XOR, operands);" ! [(set_attr "length" "2,4,6") ! (set_attr "cc" "clobber,set_znv,clobber")]) ;; ---------------------------------------------------------------------- ;; NEGATION INSTRUCTIONS --- 1291,1323 ---- "" "") + ;; ---------------------------------------------------------------------- + ;; {AND,IOR,XOR}{HI3,SI3} PATTERNS + ;; ---------------------------------------------------------------------- + (define_insn "" ! [(set (match_operand:HI 0 "register_operand" "=r") ! (match_operator:HI 3 "bit_operator" ! [(match_operand:HI 1 "register_operand" "%0") ! (match_operand:HI 2 "nonmemory_operand" "rn")]))] ! "" ! "* return output_logical_op (HImode, operands);" ! [(set (attr "length") ! (symbol_ref "compute_logical_op_length (HImode, operands)")) ! (set (attr "cc") ! (symbol_ref "compute_logical_op_cc (HImode, operands)"))]) (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (match_operator:SI 3 "bit_operator" ! [(match_operand:SI 1 "register_operand" "%0") ! (match_operand:SI 2 "nonmemory_operand" "rn")]))] ! "" ! "* return output_logical_op (SImode, operands);" ! [(set (attr "length") ! (symbol_ref "compute_logical_op_length (SImode, operands)")) ! (set (attr "cc") ! (symbol_ref "compute_logical_op_cc (SImode, operands)"))]) ;; ---------------------------------------------------------------------- ;; NEGATION INSTRUCTIONS *************** *** 1508,1516 **** { if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0 && (GET_CODE (operands[1]) == GT ! || GET_CODE (operands[1]) == GE ! || GET_CODE (operands[1]) == LE ! || GET_CODE (operands[1]) == LT)) { cc_status.flags &= ~CC_OVERFLOW_UNUSABLE; return 0; --- 1554,1562 ---- { if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0 && (GET_CODE (operands[1]) == GT ! || GET_CODE (operands[1]) == GE ! || GET_CODE (operands[1]) == LE ! || GET_CODE (operands[1]) == LT)) { cc_status.flags &= ~CC_OVERFLOW_UNUSABLE; return 0; *************** *** 1537,1545 **** { if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0 && (GET_CODE (operands[1]) == GT ! || GET_CODE (operands[1]) == GE ! || GET_CODE (operands[1]) == LE ! || GET_CODE (operands[1]) == LT)) { cc_status.flags &= ~CC_OVERFLOW_UNUSABLE; return 0; --- 1583,1591 ---- { if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0 && (GET_CODE (operands[1]) == GT ! || GET_CODE (operands[1]) == GE ! || GET_CODE (operands[1]) == LE ! || GET_CODE (operands[1]) == LT)) { cc_status.flags &= ~CC_OVERFLOW_UNUSABLE; return 0; *************** *** 1597,1602 **** --- 1643,1656 ---- [(set_attr "cc" "none") (set_attr "length" "2")]) + (define_insn "tablejump_normal_mode" + [(set (pc) (match_operand:HI 0 "register_operand" "r")) + (use (label_ref (match_operand 1 "" "")))] + "(TARGET_H8300H || TARGET_H8300S) && TARGET_NORMAL_MODE" + "jmp @%S0" + [(set_attr "cc" "none") + (set_attr "length" "2")]) + ;; This is a define expand, because pointers may be either 16 or 32 bits. (define_expand "indirect_jump" *************** *** 1618,1626 **** [(set_attr "cc" "none") (set_attr "length" "2")]) ;; Call subroutine with no return value. ! ;; ??? Even though we use HImode here, this works on the H8/300H and H8/S. (define_insn "call" [(call (match_operand:QI 0 "call_insn_operand" "or") --- 1672,1687 ---- [(set_attr "cc" "none") (set_attr "length" "2")]) + (define_insn "indirect_jump_normal_mode" + [(set (pc) (match_operand:HI 0 "jump_address_operand" "Vr"))] + "(TARGET_H8300H || TARGET_H8300S) && TARGET_NORMAL_MODE" + "jmp @%S0" + [(set_attr "cc" "none") + (set_attr "length" "2")]) + ;; Call subroutine with no return value. ! ;; ??? Even though we use HImode here, this works on the H8/300H and H8S. (define_insn "call" [(call (match_operand:QI 0 "call_insn_operand" "or") *************** *** 1643,1649 **** ;; Call subroutine, returning value in operand 0 ;; (which must be a hard register). ! ;; ??? Even though we use HImode here, this works on the H8/300H and H8/S. (define_insn "call_value" [(set (match_operand 0 "" "=r") --- 1704,1710 ---- ;; Call subroutine, returning value in operand 0 ;; (which must be a hard register). ! ;; ??? Even though we use HImode here, this works on the H8/300H and H8S. (define_insn "call_value" [(set (match_operand 0 "" "=r") *************** *** 1672,1677 **** --- 1733,1800 ---- (set_attr "length" "2")]) ;; ---------------------------------------------------------------------- + ;; PROLOGUE/EPILOGUE-RELATED INSTRUCTIONS + ;; ---------------------------------------------------------------------- + + (define_insn "*stm_h8300s_2" + [(parallel + [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) (const_int -8))) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -4))) + (match_operand:SI 0 "register_operand" "")) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -8))) + (match_operand:SI 1 "register_operand" ""))])] + "TARGET_H8300S + && ((REGNO (operands[0]) == 0 && REGNO (operands[1]) == 1) + || (REGNO (operands[0]) == 2 && REGNO (operands[1]) == 3) + || (REGNO (operands[0]) == 4 && REGNO (operands[1]) == 5))" + "stm.l\\t%S0-%S1,@-er7" + [(set_attr "cc" "none") + (set_attr "length" "4")]) + + (define_insn "*stm_h8300s_3" + [(parallel + [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) (const_int -12))) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -4))) + (match_operand:SI 0 "register_operand" "")) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -8))) + (match_operand:SI 1 "register_operand" "")) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -12))) + (match_operand:SI 2 "register_operand" ""))])] + "TARGET_H8300S + && ((REGNO (operands[0]) == 0 + && REGNO (operands[1]) == 1 + && REGNO (operands[2]) == 2) + || (REGNO (operands[0]) == 4 + && REGNO (operands[1]) == 5 + && REGNO (operands[2]) == 6))" + "stm.l\\t%S0-%S2,@-er7" + [(set_attr "cc" "none") + (set_attr "length" "4")]) + + (define_insn "*stm_h8300s_4" + [(parallel + [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) (const_int -16))) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -4))) + (match_operand:SI 0 "register_operand" "")) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -8))) + (match_operand:SI 1 "register_operand" "")) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -12))) + (match_operand:SI 2 "register_operand" "")) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -16))) + (match_operand:SI 3 "register_operand" ""))])] + "TARGET_H8300S + && REGNO (operands[0]) == 0 + && REGNO (operands[1]) == 1 + && REGNO (operands[2]) == 2 + && REGNO (operands[3]) == 3" + "stm.l\\t%S0-%S3,@-er7" + [(set_attr "cc" "none") + (set_attr "length" "4")]) + + ;; ---------------------------------------------------------------------- ;; EXTEND INSTRUCTIONS ;; ---------------------------------------------------------------------- *************** *** 1701,1707 **** [(set_attr "length" "2,10") (set_attr "cc" "set_znv,set_znv")]) ! ;; The compiler can synthesize a 300H variant of this which is ;; just as efficient as one that we'd create (define_insn "zero_extendqisi2" [(set (match_operand:SI 0 "register_operand" "=r,r") --- 1824,1830 ---- [(set_attr "length" "2,10") (set_attr "cc" "set_znv,set_znv")]) ! ;; The compiler can synthesize a H8/300H variant of this which is ;; just as efficient as one that we'd create (define_insn "zero_extendqisi2" [(set (match_operand:SI 0 "register_operand" "=r,r") *************** *** 1710,1716 **** "@ mov.b #0,%x0\;sub.w %e0,%e0 mov.b %R1,%w0\;mov.b #0,%x0\;sub.w %e0,%e0" ! [(set_attr "length" "4,6") (set_attr "cc" "clobber,clobber")]) (define_expand "zero_extendhisi2" --- 1833,1839 ---- "@ mov.b #0,%x0\;sub.w %e0,%e0 mov.b %R1,%w0\;mov.b #0,%x0\;sub.w %e0,%e0" ! [(set_attr "length" "4,8") (set_attr "cc" "clobber,clobber")]) (define_expand "zero_extendhisi2" *************** *** 1720,1726 **** "") ;; %e prints the high part of a CONST_INT, not the low part. Arggh. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r,r") (zero_extend:SI (match_operand:HI 1 "general_operand_src" "0,i,g>")))] "TARGET_H8300" --- 1843,1849 ---- "") ;; %e prints the high part of a CONST_INT, not the low part. Arggh. ! (define_insn "*zero_extendhisi2_h8300" [(set (match_operand:SI 0 "register_operand" "=r,r,r") (zero_extend:SI (match_operand:HI 1 "general_operand_src" "0,i,g>")))] "TARGET_H8300" *************** *** 1728,1734 **** sub.w %e0,%e0 mov.w %f1,%f0\;sub.w %e0,%e0 mov.w %e1,%f0\;sub.w %e0,%e0" ! [(set_attr "length" "2,4,4") (set_attr "cc" "clobber,clobber,clobber")]) (define_insn "" --- 1851,1857 ---- sub.w %e0,%e0 mov.w %f1,%f0\;sub.w %e0,%e0 mov.w %e1,%f0\;sub.w %e0,%e0" ! [(set_attr "length" "2,4,6") (set_attr "cc" "clobber,clobber,clobber")]) (define_insn "" *************** *** 1763,1769 **** [(set_attr "length" "2") (set_attr "cc" "set_znv")]) ! ;; The compiler can synthesize a 300H variant of this which is ;; just as efficient as one that we'd create (define_insn "extendqisi2" [(set (match_operand:SI 0 "register_operand" "=r,r") --- 1886,1892 ---- [(set_attr "length" "2") (set_attr "cc" "set_znv")]) ! ;; The compiler can synthesize a H8/300H variant of this which is ;; just as efficient as one that we'd create (define_insn "extendqisi2" [(set (match_operand:SI 0 "register_operand" "=r,r") *************** *** 1772,1778 **** "@ bld #7,%w0\;subx %x0,%x0\;subx %y0,%y0\;subx %z0,%z0 mov.b %R1,%w0\;bld #7,%w0\;subx %x0,%x0\;subx %y0,%y0\;subx %z0,%z0" ! [(set_attr "length" "8,10") (set_attr "cc" "clobber,clobber")]) (define_expand "extendhisi2" --- 1895,1901 ---- "@ bld #7,%w0\;subx %x0,%x0\;subx %y0,%y0\;subx %z0,%z0 mov.b %R1,%w0\;bld #7,%w0\;subx %x0,%x0\;subx %y0,%y0\;subx %z0,%z0" ! [(set_attr "length" "8,12") (set_attr "cc" "clobber,clobber")]) (define_expand "extendhisi2" *************** *** 1781,1794 **** "" "") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r") (sign_extend:SI (match_operand:HI 1 "general_operand_src" "0,g>")))] "TARGET_H8300" "@ bld #7,%x0\;subx %y0,%y0\;subx %z0,%z0 mov.w %T1,%f0\;bld #7,%x0\;subx %y0,%y0\;subx %z0,%z0" ! [(set_attr "length" "6,8") (set_attr "cc" "clobber,clobber")]) (define_insn "" --- 1904,1917 ---- "" "") ! (define_insn "*extendhisi2_h8300" [(set (match_operand:SI 0 "register_operand" "=r,r") (sign_extend:SI (match_operand:HI 1 "general_operand_src" "0,g>")))] "TARGET_H8300" "@ bld #7,%x0\;subx %y0,%y0\;subx %z0,%z0 mov.w %T1,%f0\;bld #7,%x0\;subx %y0,%y0\;subx %z0,%z0" ! [(set_attr "length" "6,10") (set_attr "cc" "clobber,clobber")]) (define_insn "" *************** *** 1845,1855 **** [(set (match_operand:QI 0 "register_operand" "=r,r") (match_operator:QI 3 "nshift_operator" [ (match_operand:QI 1 "register_operand" "0,0") ! (match_operand:QI 2 "nonmemory_operand" "KM,rn")])) (clobber (match_scratch:QI 4 "=X,&r"))] "" "* return output_a_shift (operands);" ! [(set_attr "length" "20") (set_attr "cc" "clobber")]) ;; HI BIT SHIFTS --- 1968,1979 ---- [(set (match_operand:QI 0 "register_operand" "=r,r") (match_operator:QI 3 "nshift_operator" [ (match_operand:QI 1 "register_operand" "0,0") ! (match_operand:QI 2 "nonmemory_operand" "R,rn")])) (clobber (match_scratch:QI 4 "=X,&r"))] "" "* return output_a_shift (operands);" ! [(set (attr "length") ! (symbol_ref "compute_a_shift_length (insn, operands)")) (set_attr "cc" "clobber")]) ;; HI BIT SHIFTS *************** *** 1879,1889 **** [(set (match_operand:HI 0 "register_operand" "=r,r") (match_operator:HI 3 "nshift_operator" [ (match_operand:HI 1 "register_operand" "0,0") ! (match_operand:QI 2 "nonmemory_operand" "KM,rn")])) (clobber (match_scratch:QI 4 "=X,&r"))] "" "* return output_a_shift (operands);" ! [(set_attr "length" "20") (set_attr "cc" "clobber")]) ;; SI BIT SHIFTS --- 2003,2014 ---- [(set (match_operand:HI 0 "register_operand" "=r,r") (match_operator:HI 3 "nshift_operator" [ (match_operand:HI 1 "register_operand" "0,0") ! (match_operand:QI 2 "nonmemory_operand" "S,rn")])) (clobber (match_scratch:QI 4 "=X,&r"))] "" "* return output_a_shift (operands);" ! [(set (attr "length") ! (symbol_ref "compute_a_shift_length (insn, operands)")) (set_attr "cc" "clobber")]) ;; SI BIT SHIFTS *************** *** 1913,1923 **** [(set (match_operand:SI 0 "register_operand" "=r,r") (match_operator:SI 3 "nshift_operator" [ (match_operand:SI 1 "register_operand" "0,0") ! (match_operand:QI 2 "nonmemory_operand" "K,rn")])) (clobber (match_scratch:QI 4 "=X,&r"))] "" "* return output_a_shift (operands);" ! [(set_attr "length" "20") (set_attr "cc" "clobber")]) ;; ---------------------------------------------------------------------- --- 2038,2049 ---- [(set (match_operand:SI 0 "register_operand" "=r,r") (match_operator:SI 3 "nshift_operator" [ (match_operand:SI 1 "register_operand" "0,0") ! (match_operand:QI 2 "nonmemory_operand" "T,rn")])) (clobber (match_scratch:QI 4 "=X,&r"))] "" "* return output_a_shift (operands);" ! [(set (attr "length") ! (symbol_ref "compute_a_shift_length (insn, operands)")) (set_attr "cc" "clobber")]) ;; ---------------------------------------------------------------------- *************** *** 2019,2025 **** ;; Normal loads with a 32bit destination. ;; ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=&r") (zero_extract:SI (match_operand:HI 1 "register_operand" "r") (const_int 1) --- 2145,2151 ---- ;; Normal loads with a 32bit destination. ;; ! (define_insn "*extzv_1_r_h8300" [(set (match_operand:SI 0 "register_operand" "=&r") (zero_extract:SI (match_operand:HI 1 "register_operand" "r") (const_int 1) *************** *** 2028,2036 **** && INTVAL (operands[2]) < 16" "* return output_simode_bld (0, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "6")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extract:SI (match_operand:SI 1 "register_operand" "r") (const_int 1) --- 2154,2162 ---- && INTVAL (operands[2]) < 16" "* return output_simode_bld (0, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "8")]) ! (define_insn "*extzv_1_r_h8300hs" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extract:SI (match_operand:SI 1 "register_operand" "r") (const_int 1) *************** *** 2039,2051 **** && INTVAL (operands[2]) < 16" "* return output_simode_bld (0, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "6")]) ;; ;; Inverted loads with a 32bit destination. ;; ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=&r") (zero_extract:SI (xor:HI (match_operand:HI 1 "register_operand" "r") (match_operand:HI 3 "const_int_operand" "n")) --- 2165,2177 ---- && INTVAL (operands[2]) < 16" "* return output_simode_bld (0, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "8")]) ;; ;; Inverted loads with a 32bit destination. ;; ! (define_insn "*extzv_1_r_inv_h8300" [(set (match_operand:SI 0 "register_operand" "=&r") (zero_extract:SI (xor:HI (match_operand:HI 1 "register_operand" "r") (match_operand:HI 3 "const_int_operand" "n")) *************** *** 2056,2064 **** && (1 << INTVAL (operands[2])) == INTVAL (operands[3])" "* return output_simode_bld (1, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "6")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extract:SI (xor:SI (match_operand:SI 1 "register_operand" "r") (match_operand 3 "const_int_operand" "n")) --- 2182,2190 ---- && (1 << INTVAL (operands[2])) == INTVAL (operands[3])" "* return output_simode_bld (1, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "8")]) ! (define_insn "*extzv_1_r_inv_h8300hs" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extract:SI (xor:SI (match_operand:SI 1 "register_operand" "r") (match_operand 3 "const_int_operand" "n")) *************** *** 2069,2075 **** && (1 << INTVAL (operands[2])) == INTVAL (operands[3])" "* return output_simode_bld (1, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "6")]) (define_expand "insv" [(set (zero_extract:HI (match_operand:HI 0 "general_operand" "") --- 2195,2201 ---- && (1 << INTVAL (operands[2])) == INTVAL (operands[3])" "* return output_simode_bld (1, operands);" [(set_attr "cc" "clobber") ! (set_attr "length" "8")]) (define_expand "insv" [(set (zero_extract:HI (match_operand:HI 0 "general_operand" "") *************** *** 2079,2085 **** "TARGET_H8300" " { ! /* We only have single bit bitfield instructions. */ if (INTVAL (operands[1]) != 1) FAIL; --- 2205,2211 ---- "TARGET_H8300" " { ! /* We only have single bit bit-field instructions. */ if (INTVAL (operands[1]) != 1) FAIL; *************** *** 2107,2113 **** "TARGET_H8300" " { ! /* We only have single bit bitfield instructions. */ if (INTVAL (operands[2]) != 1) FAIL; --- 2233,2239 ---- "TARGET_H8300" " { ! /* We only have single bit bit-field instructions. */ if (INTVAL (operands[2]) != 1) FAIL; *************** *** 2150,2158 **** ;; COMBINE PATTERNS ;; ----------------------------------------------------------------- (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (ior:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r")) (match_operand:HI 2 "register_operand" "0")))] "REG_P (operands[0]) && REG_P (operands[1]) --- 2276,2304 ---- ;; COMBINE PATTERNS ;; ----------------------------------------------------------------- + (define_insn "*extzv_8_8" + [(set (match_operand:SI 0 "register_operand" "=r") + (zero_extract:SI (match_operand:SI 1 "register_operand" "r") + (const_int 8) + (const_int 8)))] + "TARGET_H8300H || TARGET_H8300S" + "mov.b\\t%x1,%w0\;extu.w\\t%f0\;extu.l\\t%S0" + [(set_attr "cc" "set_znv") + (set_attr "length" "6")]) + + (define_insn "*extzv_8_16" + [(set (match_operand:SI 0 "register_operand" "=r") + (zero_extract:SI (match_operand:SI 1 "register_operand" "r") + (const_int 8) + (const_int 16)))] + "TARGET_H8300H || TARGET_H8300S" + "mov.w\\t%e1,%f0\;extu.w\\t%f0\;extu.l\\t%S0" + [(set_attr "cc" "set_znv") + (set_attr "length" "6")]) + (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (ior:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r")) (match_operand:HI 2 "register_operand" "0")))] "REG_P (operands[0]) && REG_P (operands[1]) *************** *** 2163,2169 **** (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] "(TARGET_H8300H || TARGET_H8300S) && REG_P (operands[0]) --- 2309,2315 ---- (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] "(TARGET_H8300H || TARGET_H8300S) && REG_P (operands[0]) *************** *** 2175,2192 **** (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (zero_extend:SI (match_operand:QI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] ! "REG_P (operands[0]) ! && REG_P (operands[1]) ! && REGNO (operands[0]) != REGNO (operands[1])" ! "or\\t%X1,%s0" [(set_attr "cc" "clobber") (set_attr "length" "2")]) (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (xor:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r")) (match_operand:HI 2 "register_operand" "0")))] "REG_P (operands[0]) && REG_P (operands[1]) --- 2321,2336 ---- (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (zero_extend:SI (match_operand:QI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] ! "" ! "or\\t%X1,%w0" [(set_attr "cc" "clobber") (set_attr "length" "2")]) (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (xor:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r")) (match_operand:HI 2 "register_operand" "0")))] "REG_P (operands[0]) && REG_P (operands[1]) *************** *** 2197,2203 **** (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (xor:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] "(TARGET_H8300H || TARGET_H8300S) && REG_P (operands[0]) --- 2341,2347 ---- (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (xor:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] "(TARGET_H8300H || TARGET_H8300S) && REG_P (operands[0]) *************** *** 2209,2226 **** (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (xor:SI (zero_extend:SI (match_operand:QI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] "REG_P (operands[0]) && REG_P (operands[1]) && REGNO (operands[0]) != REGNO (operands[1])" ! "xor\\t%X1,%s0" [(set_attr "cc" "clobber") (set_attr "length" "2")]) (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (ior:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "0")) (ashift:HI (match_operand:HI 2 "register_operand" "r") (const_int 8))))] "REG_P (operands[0]) --- 2353,2370 ---- (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (xor:SI (zero_extend:SI (match_operand:QI 1 "register_operand" "r")) (match_operand:SI 2 "register_operand" "0")))] "REG_P (operands[0]) && REG_P (operands[1]) && REGNO (operands[0]) != REGNO (operands[1])" ! "xor\\t%X1,%w0" [(set_attr "cc" "clobber") (set_attr "length" "2")]) (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (ior:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "0")) (ashift:HI (match_operand:HI 2 "register_operand" "r") (const_int 8))))] "REG_P (operands[0]) *************** *** 2230,2244 **** [(set_attr "cc" "clobber") (set_attr "length" "2")]) (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "0")) (ashift:SI (match_operand:SI 2 "register_operand" "r") (const_int 16))))] ! "(TARGET_H8300H || TARGET_H8300S) ! && REG_P (operands[0]) ! && REG_P (operands[2]) ! && (REGNO (operands[0]) != REGNO (operands[2]))" "mov.w\\t%f2,%e0" [(set_attr "cc" "clobber") (set_attr "length" "2")]) --- 2374,2815 ---- [(set_attr "cc" "clobber") (set_attr "length" "2")]) + (define_insn "*iorhi_shift_8" + [(set (match_operand:HI 0 "register_operand" "=r") + (ior:HI (ashift:HI (match_operand:HI 1 "register_operand" "r") + (const_int 8)) + (match_operand:HI 2 "register_operand" "0")))] + "" + "or.b\\t%s1,%t0" + [(set_attr "cc" "clobber") + (set_attr "length" "2")]) + (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "0")) (ashift:SI (match_operand:SI 2 "register_operand" "r") (const_int 16))))] ! "TARGET_H8300H || TARGET_H8300S" "mov.w\\t%f2,%e0" [(set_attr "cc" "clobber") (set_attr "length" "2")]) + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=r") + (ior:SI (ashift:SI (match_operand:SI 1 "register_operand" "r") + (const_int 16)) + (match_operand:SI 2 "register_operand" "0")))] + "TARGET_H8300H || TARGET_H8300S" + "or.w\\t%f1,%e0" + [(set_attr "cc" "clobber") + (set_attr "length" "2")]) + + ;; Storing a part of HImode to QImode. + + (define_insn "" + [(set (match_operand:QI 0 "general_operand_dst" "=rm<") + (subreg:QI (lshiftrt:HI (match_operand:HI 1 "register_operand" "r") + (const_int 8)) 1))] + "" + "mov.b\\t%t1,%R0" + [(set_attr "cc" "set_znv") + (set_attr "length" "8")]) + + ;; Storing a part of SImode to QImode. + + (define_insn "" + [(set (match_operand:QI 0 "general_operand_dst" "=rm<") + (subreg:QI (lshiftrt:SI (match_operand:SI 1 "register_operand" "r") + (const_int 8)) 3))] + "" + "mov.b\\t%x1,%R0" + [(set_attr "cc" "set_znv") + (set_attr "length" "8")]) + + (define_insn "" + [(set (match_operand:QI 0 "general_operand_dst" "=rm<") + (subreg:QI (lshiftrt:SI (match_operand:SI 1 "register_operand" "r") + (const_int 16)) 3)) + (clobber (match_scratch:SI 2 "=&r"))] + "TARGET_H8300H || TARGET_H8300S" + "mov.w\\t%e1,%f2\;mov.b\\t%w2,%R0" + [(set_attr "cc" "set_znv") + (set_attr "length" "10")]) + + (define_insn "" + [(set (match_operand:QI 0 "general_operand_dst" "=rm<") + (subreg:QI (lshiftrt:SI (match_operand:SI 1 "register_operand" "r") + (const_int 24)) 3)) + (clobber (match_scratch:SI 2 "=&r"))] + "TARGET_H8300H || TARGET_H8300S" + "mov.w\\t%e1,%f2\;mov.b\\t%x2,%R0" + [(set_attr "cc" "set_znv") + (set_attr "length" "10")]) + + (define_insn_and_split "" + [(set (pc) + (if_then_else (eq (zero_extract:SI (subreg:SI (match_operand:QI 0 "register_operand" "") 0) + (const_int 1) + (const_int 7)) + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + "#" + "" + [(set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "") + + (define_insn_and_split "" + [(set (pc) + (if_then_else (ne (zero_extract:SI (subreg:SI (match_operand:QI 0 "register_operand" "") 0) + (const_int 1) + (const_int 7)) + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + "#" + "" + [(set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "") + + ;; ----------------------------------------------------------------- + ;; PEEPHOLE PATTERNS + ;; ----------------------------------------------------------------- + + ;; Convert (A >> B) & C to (A & 255) >> B if C == 255 >> B. + + (define_peephole2 + [(parallel + [(set (match_operand:HI 0 "register_operand" "") + (lshiftrt:HI (match_dup 0) + (match_operand:HI 1 "const_int_operand" ""))) + (clobber (match_operand:HI 2 "" ""))]) + (set (match_dup 0) + (and:HI (match_dup 0) + (match_operand:HI 3 "const_int_operand" "")))] + "INTVAL (operands[3]) == (255 >> INTVAL (operands[1]))" + [(set (match_dup 0) + (and:HI (match_dup 0) + (const_int 255))) + (parallel + [(set (match_dup 0) + (lshiftrt:HI (match_dup 0) + (match_dup 1))) + (clobber (match_dup 2))])] + "") + + ;; Convert (A << B) & C to (A & 255) << B if C == 255 << B. + + (define_peephole2 + [(parallel + [(set (match_operand:HI 0 "register_operand" "") + (ashift:HI (match_dup 0) + (match_operand:HI 1 "const_int_operand" ""))) + (clobber (match_operand:HI 2 "" ""))]) + (set (match_dup 0) + (and:HI (match_dup 0) + (match_operand:HI 3 "const_int_operand" "")))] + "INTVAL (operands[3]) == (255 << INTVAL (operands[1]))" + [(set (match_dup 0) + (and:HI (match_dup 0) + (const_int 255))) + (parallel + [(set (match_dup 0) + (ashift:HI (match_dup 0) + (match_dup 1))) + (clobber (match_dup 2))])] + "") + + ;; Convert (A >> B) & C to (A & 255) >> B if C == 255 >> B. + + (define_peephole2 + [(parallel + [(set (match_operand:SI 0 "register_operand" "") + (lshiftrt:SI (match_dup 0) + (match_operand:SI 1 "const_int_operand" ""))) + (clobber (match_operand:SI 2 "" ""))]) + (set (match_dup 0) + (and:SI (match_dup 0) + (match_operand:SI 3 "const_int_operand" "")))] + "INTVAL (operands[3]) == (255 >> INTVAL (operands[1]))" + [(set (match_dup 0) + (and:SI (match_dup 0) + (const_int 255))) + (parallel + [(set (match_dup 0) + (lshiftrt:SI (match_dup 0) + (match_dup 1))) + (clobber (match_dup 2))])] + "") + + ;; Convert (A << B) & C to (A & 255) << B if C == 255 << B. + + (define_peephole2 + [(parallel + [(set (match_operand:SI 0 "register_operand" "") + (ashift:SI (match_dup 0) + (match_operand:SI 1 "const_int_operand" ""))) + (clobber (match_operand:SI 2 "" ""))]) + (set (match_dup 0) + (and:SI (match_dup 0) + (match_operand:SI 3 "const_int_operand" "")))] + "INTVAL (operands[3]) == (255 << INTVAL (operands[1]))" + [(set (match_dup 0) + (and:SI (match_dup 0) + (const_int 255))) + (parallel + [(set (match_dup 0) + (ashift:SI (match_dup 0) + (match_dup 1))) + (clobber (match_dup 2))])] + "") + + ;; Convert (A >> B) & C to (A & 65535) >> B if C == 65535 >> B. + + (define_peephole2 + [(parallel + [(set (match_operand:SI 0 "register_operand" "") + (lshiftrt:SI (match_dup 0) + (match_operand:SI 1 "const_int_operand" ""))) + (clobber (match_operand:SI 2 "" ""))]) + (set (match_dup 0) + (and:SI (match_dup 0) + (match_operand:SI 3 "const_int_operand" "")))] + "INTVAL (operands[3]) == (65535 >> INTVAL (operands[1]))" + [(set (match_dup 0) + (and:SI (match_dup 0) + (const_int 65535))) + (parallel + [(set (match_dup 0) + (lshiftrt:SI (match_dup 0) + (match_dup 1))) + (clobber (match_dup 2))])] + "") + + ;; Convert (A << B) & C to (A & 65535) << B if C == 65535 << B. + + (define_peephole2 + [(parallel + [(set (match_operand:SI 0 "register_operand" "") + (ashift:SI (match_dup 0) + (match_operand:SI 1 "const_int_operand" ""))) + (clobber (match_operand:SI 2 "" ""))]) + (set (match_dup 0) + (and:SI (match_dup 0) + (match_operand:SI 3 "const_int_operand" "")))] + "INTVAL (operands[3]) == (65535 << INTVAL (operands[1]))" + [(set (match_dup 0) + (and:SI (match_dup 0) + (const_int 65535))) + (parallel + [(set (match_dup 0) + (ashift:SI (match_dup 0) + (match_dup 1))) + (clobber (match_dup 2))])] + "") + + ;; Convert a QImode push into an SImode push so that the + ;; define_peephole2 below can cram multiple pushes into one stm.l. + + (define_peephole2 + [(parallel [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) (const_int -4))) + (set (mem:QI (plus:SI (reg:SI SP_REG) (const_int -3))) + (match_operand:QI 0 "register_operand" ""))])] + "TARGET_H8300S" + [(set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_dup 0))] + "operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));") + + ;; Convert a HImode push into an SImode push so that the + ;; define_peephole2 below can cram multiple pushes into one stm.l. + + (define_peephole2 + [(parallel [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) (const_int -4))) + (set (mem:HI (plus:SI (reg:SI SP_REG) (const_int -2))) + (match_operand:HI 0 "register_operand" ""))])] + "TARGET_H8300S" + [(set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_dup 0))] + "operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));") + + ;; Cram four pushes into stm.l. + + (define_peephole2 + [(set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 0 "register_operand" "")) + (set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 1 "register_operand" "")) + (set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 2 "register_operand" "")) + (set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 3 "register_operand" ""))] + "TARGET_H8300S + && REGNO (operands[0]) == 0 + && REGNO (operands[1]) == 1 + && REGNO (operands[2]) == 2 + && REGNO (operands[3]) == 3" + [(parallel [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (const_int -16))) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -4))) + (match_dup 0)) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -8))) + (match_dup 1)) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -12))) + (match_dup 2)) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -16))) + (match_dup 3))])] + "") + + ;; Cram three pushes into stm.l. + + (define_peephole2 + [(set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 0 "register_operand" "")) + (set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 1 "register_operand" "")) + (set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 2 "register_operand" ""))] + "TARGET_H8300S + && ((REGNO (operands[0]) == 0 + && REGNO (operands[1]) == 1 + && REGNO (operands[2]) == 2) + || (REGNO (operands[0]) == 4 + && REGNO (operands[1]) == 5 + && REGNO (operands[2]) == 6))" + [(parallel [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (const_int -12))) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -4))) + (match_dup 0)) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -8))) + (match_dup 1)) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -12))) + (match_dup 2))])] + "") + + ;; Cram two pushes into stm.l. + + (define_peephole2 + [(set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 0 "register_operand" "")) + (set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_operand:SI 1 "register_operand" ""))] + "TARGET_H8300S + && ((REGNO (operands[0]) == 0 && REGNO (operands[1]) == 1) + || (REGNO (operands[0]) == 2 && REGNO (operands[1]) == 3) + || (REGNO (operands[0]) == 4 && REGNO (operands[1]) == 5))" + [(parallel [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (const_int -8))) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -4))) + (match_dup 0)) + (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -8))) + (match_dup 1))])] + "") + + ;; Turn + ;; + ;; mov.w #2,r0 + ;; add.w r7,r0 (6 bytes) + ;; + ;; into + ;; + ;; mov.w r7,r0 + ;; adds #2,r0 (4 bytes) + + (define_peephole2 + [(set (match_operand:HI 0 "register_operand" "") + (match_operand:HI 1 "const_int_operand" "")) + (set (match_dup 0) + (plus:HI (match_dup 0) + (match_operand:HI 2 "register_operand" "")))] + "REG_P (operands[0]) && REG_P (operands[2]) + && REGNO (operands[0]) != REGNO (operands[2]) + && (CONST_OK_FOR_J (INTVAL (operands[1])) + || CONST_OK_FOR_L (INTVAL (operands[1])) + || CONST_OK_FOR_N (INTVAL (operands[1])))" + [(set (match_dup 0) + (match_dup 2)) + (set (match_dup 0) + (plus:HI (match_dup 0) + (match_dup 1)))] + "") + + ;; Turn + ;; + ;; sub.l er0,er0 + ;; add.b #4,r0l + ;; add.l er7,er0 (6 bytes) + ;; + ;; into + ;; + ;; mov.l er7,er0 + ;; adds #4,er0 (4 bytes) + + (define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (match_operand:SI 1 "const_int_operand" "")) + (set (match_dup 0) + (plus:SI (match_dup 0) + (match_operand:SI 2 "register_operand" "")))] + "(TARGET_H8300H || TARGET_H8300S) + && REG_P (operands[0]) && REG_P (operands[2]) + && REGNO (operands[0]) != REGNO (operands[2]) + && (CONST_OK_FOR_L (INTVAL (operands[1])) + || CONST_OK_FOR_N (INTVAL (operands[1])))" + [(set (match_dup 0) + (match_dup 2)) + (set (match_dup 0) + (plus:SI (match_dup 0) + (match_dup 1)))] + "") + + ;; Turn + ;; + ;; mov.l er7,er0 + ;; add.l #10,er0 (takes 8 bytes) + ;; + ;; into + ;; + ;; sub.l er0,er0 + ;; add.b #10,r0l + ;; add.l er7,er0 (takes 6 bytes) + + (define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (match_operand:SI 1 "register_operand" "")) + (set (match_dup 0) + (plus:SI (match_dup 0) + (match_operand:SI 2 "const_int_operand" "")))] + "(TARGET_H8300H || TARGET_H8300S) + && REG_P (operands[0]) && REG_P (operands[1]) + && REGNO (operands[0]) != REGNO (operands[1]) + && !CONST_OK_FOR_L (INTVAL (operands[2])) + && !CONST_OK_FOR_N (INTVAL (operands[2])) + && ((INTVAL (operands[2]) & 0xff) == INTVAL (operands[2]) + || (INTVAL (operands[2]) & 0xff00) == INTVAL (operands[2]) + || INTVAL (operands[2]) == 0xffff + || INTVAL (operands[2]) == 0xfffe)" + [(set (match_dup 0) + (match_dup 2)) + (set (match_dup 0) + (plus:SI (match_dup 0) + (match_dup 1)))] + "") diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/h8300-protos.h gcc-3.3/gcc/config/h8300/h8300-protos.h *** gcc-3.2.3/gcc/config/h8300/h8300-protos.h 2002-02-18 22:07:42.000000000 +0000 --- gcc-3.3/gcc/config/h8300/h8300-protos.h 2003-01-02 15:04:34.000000000 +0000 *************** *** 1,6 **** ! /* Definitions of target machine for GNU compiler. ! Hitachi H8/300 version generating coff ! Copyright (C) 2000 Free SoftwareFoundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). --- 1,6 ---- ! /* Definitions of target machine for GNU compiler. ! Hitachi H8/300 version generating coff ! Copyright (C) 2000, 2002, 2003 Free SoftwareFoundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). *************** Boston, MA 02111-1307, USA. */ *** 27,42 **** /* Declarations for functions used in insn-output.c. */ #ifdef RTX_CODE extern const char *output_a_shift PARAMS ((rtx *)); extern const char *emit_a_rotate PARAMS ((enum rtx_code, rtx *)); extern const char *output_simode_bld PARAMS ((int, rtx[])); extern void print_operand_address PARAMS ((FILE *, rtx)); extern int const_costs PARAMS ((rtx, enum rtx_code, enum rtx_code)); extern void print_operand PARAMS ((FILE *, rtx, int)); extern void final_prescan_insn PARAMS ((rtx, rtx *, int)); extern int do_movsi PARAMS ((rtx[])); extern void notice_update_cc PARAMS ((rtx, rtx)); ! extern const char *output_logical_op PARAMS ((enum machine_mode, int, rtx *)); extern int expand_a_shift PARAMS ((enum machine_mode, int, rtx[])); extern int expand_a_rotate PARAMS ((enum rtx_code, rtx[])); extern int fix_bit_operand PARAMS ((rtx *, int, enum rtx_code)); extern int h8300_adjust_insn_length PARAMS ((rtx, int)); --- 27,49 ---- /* Declarations for functions used in insn-output.c. */ #ifdef RTX_CODE extern const char *output_a_shift PARAMS ((rtx *)); + extern unsigned int compute_a_shift_length PARAMS ((rtx, rtx *)); extern const char *emit_a_rotate PARAMS ((enum rtx_code, rtx *)); extern const char *output_simode_bld PARAMS ((int, rtx[])); extern void print_operand_address PARAMS ((FILE *, rtx)); extern int const_costs PARAMS ((rtx, enum rtx_code, enum rtx_code)); + extern int h8300_and_costs PARAMS ((rtx)); + extern int h8300_shift_costs PARAMS ((rtx)); extern void print_operand PARAMS ((FILE *, rtx, int)); extern void final_prescan_insn PARAMS ((rtx, rtx *, int)); extern int do_movsi PARAMS ((rtx[])); extern void notice_update_cc PARAMS ((rtx, rtx)); ! extern const char *output_logical_op PARAMS ((enum machine_mode, rtx *)); ! extern unsigned int compute_logical_op_length PARAMS ((enum machine_mode, ! rtx *)); ! extern int compute_logical_op_cc PARAMS ((enum machine_mode, rtx *)); extern int expand_a_shift PARAMS ((enum machine_mode, int, rtx[])); + extern int h8300_shift_needs_scratch_p PARAMS ((int, enum machine_mode)); extern int expand_a_rotate PARAMS ((enum rtx_code, rtx[])); extern int fix_bit_operand PARAMS ((rtx *, int, enum rtx_code)); extern int h8300_adjust_insn_length PARAMS ((rtx, int)); *************** extern void split_adds_subs PARAMS ((enu *** 44,59 **** extern int general_operand_src PARAMS ((rtx, enum machine_mode)); extern int general_operand_dst PARAMS ((rtx, enum machine_mode)); ! extern int o_operand PARAMS ((rtx, enum machine_mode)); extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); extern int two_insn_adds_subs_operand PARAMS ((rtx, enum machine_mode)); extern int small_call_insn_operand PARAMS ((rtx, enum machine_mode)); extern int jump_address_operand PARAMS ((rtx, enum machine_mode)); extern int bit_operand PARAMS ((rtx, enum machine_mode)); extern int bit_memory_operand PARAMS ((rtx, enum machine_mode)); extern int bit_operator PARAMS ((rtx, enum machine_mode)); extern int nshift_operator PARAMS ((rtx, enum machine_mode)); /* Used in builtins.c */ extern rtx h8300_return_addr_rtx PARAMS ((int, rtx)); #endif /* RTX_CODE */ --- 51,73 ---- extern int general_operand_src PARAMS ((rtx, enum machine_mode)); extern int general_operand_dst PARAMS ((rtx, enum machine_mode)); ! extern int single_one_operand PARAMS ((rtx, enum machine_mode)); ! extern int single_zero_operand PARAMS ((rtx, enum machine_mode)); extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); extern int two_insn_adds_subs_operand PARAMS ((rtx, enum machine_mode)); extern int small_call_insn_operand PARAMS ((rtx, enum machine_mode)); extern int jump_address_operand PARAMS ((rtx, enum machine_mode)); extern int bit_operand PARAMS ((rtx, enum machine_mode)); extern int bit_memory_operand PARAMS ((rtx, enum machine_mode)); + extern int stack_pointer_operand PARAMS ((rtx, enum machine_mode)); + extern int const_int_gt_2_operand PARAMS ((rtx, enum machine_mode)); + extern int const_int_ge_8_operand PARAMS ((rtx, enum machine_mode)); extern int bit_operator PARAMS ((rtx, enum machine_mode)); extern int nshift_operator PARAMS ((rtx, enum machine_mode)); + extern int h8300_eightbit_constant_address_p PARAMS ((rtx)); + extern int h8300_tiny_constant_address_p PARAMS ((rtx)); + /* Used in builtins.c */ extern rtx h8300_return_addr_rtx PARAMS ((int, rtx)); #endif /* RTX_CODE */ *************** extern struct rtx_def *function_arg PARA *** 64,78 **** extern int h8300_funcvec_function_p PARAMS ((tree)); extern int h8300_eightbit_data_p PARAMS ((tree)); extern int h8300_tiny_data_p PARAMS ((tree)); - extern void h8300_encode_label PARAMS ((tree)); #endif /* TREE_CODE */ extern void h8300_init_once PARAMS ((void)); extern void asm_file_start PARAMS ((FILE *)); extern void asm_file_end PARAMS ((FILE *)); ! extern int ok_for_bclr PARAMS ((HOST_WIDE_INT)); ! extern int small_power_of_two PARAMS ((HOST_WIDE_INT)); ! extern int initial_offset PARAMS ((int, int)); #ifdef GCC_C_PRAGMA_H extern void h8300_pr_interrupt PARAMS ((cpp_reader *)); --- 78,89 ---- extern int h8300_funcvec_function_p PARAMS ((tree)); extern int h8300_eightbit_data_p PARAMS ((tree)); extern int h8300_tiny_data_p PARAMS ((tree)); #endif /* TREE_CODE */ extern void h8300_init_once PARAMS ((void)); extern void asm_file_start PARAMS ((FILE *)); extern void asm_file_end PARAMS ((FILE *)); ! extern int h8300_initial_elimination_offset PARAMS ((int, int)); #ifdef GCC_C_PRAGMA_H extern void h8300_pr_interrupt PARAMS ((cpp_reader *)); diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/lib1funcs.asm gcc-3.3/gcc/config/h8300/lib1funcs.asm *** gcc-3.2.3/gcc/config/h8300/lib1funcs.asm 2002-01-10 21:30:32.000000000 +0000 --- gcc-3.3/gcc/config/h8300/lib1funcs.asm 2002-11-02 12:51:05.000000000 +0000 *************** *** 1,7 **** ;; libgcc routines for the Hitachi H8/300 CPU. ;; Contributed by Steve Chamberlain ! /* Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the --- 1,8 ---- ;; libgcc routines for the Hitachi H8/300 CPU. ;; Contributed by Steve Chamberlain + ;; Optimizations by Toshiyasu Morita ! /* Copyright (C) 1994, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the *************** Boston, MA 02111-1307, USA. */ *** 108,131 **** .align 2 .global ___cmpsi2 ___cmpsi2: ! cmp.w A2,A0 ! bne .L2 ! cmp.w A3,A1 bne .L2 mov.w #1,A0 rts .L2: ! cmp.w A0,A2 ! bgt .L4 ! bne .L3 ! cmp.w A1,A3 ! bls .L3 ! .L4: ! sub.w A0,A0 ! rts .L3: mov.w #2,A0 .L5: rts .end #endif --- 109,129 ---- .align 2 .global ___cmpsi2 ___cmpsi2: ! cmp.w A0,A2 bne .L2 + cmp.w A1,A3 + bne .L4 mov.w #1,A0 rts .L2: ! bgt .L5 .L3: mov.w #2,A0 + rts + .L4: + bls .L3 .L5: + sub.w A0,A0 rts .end #endif *************** ___cmpsi2: *** 137,160 **** .align 2 .global ___ucmpsi2 ___ucmpsi2: ! cmp.w A2,A0 ! bne .L2 ! cmp.w A3,A1 bne .L2 mov.w #1,A0 rts .L2: ! cmp.w A0,A2 ! bhi .L4 ! bne .L3 ! cmp.w A1,A3 ! bls .L3 ! .L4: ! sub.w A0,A0 ! rts .L3: mov.w #2,A0 .L5: rts .end #endif --- 135,155 ---- .align 2 .global ___ucmpsi2 ___ucmpsi2: ! cmp.w A0,A2 bne .L2 + cmp.w A1,A3 + bne .L4 mov.w #1,A0 rts .L2: ! bhi .L5 .L3: mov.w #2,A0 + rts + .L4: + bls .L3 .L5: + sub.w A0,A0 rts .end #endif *************** ___ucmpsi2: *** 167,173 **** ;; "supporting routines". ; general purpose normalize routine ! ; ; divisor in A0 ; dividend in A1 ; turns both into +ve numbers, and leaves what the answer sign --- 162,168 ---- ;; "supporting routines". ; general purpose normalize routine ! ; ; divisor in A0 ; dividend in A1 ; turns both into +ve numbers, and leaves what the answer sign *************** ___ucmpsi2: *** 179,191 **** divnorm: mov.b #0x0,A2L or A0H,A0H ; is divisor > 0 ! bge _lab1 not A0H ; no - then make it +ve not A0L ! adds #1,A0 xor #0x1,A2L ; and remember that in A2L _lab1: or A1H,A1H ; look at dividend ! bge _lab2 not A1H ; it is -ve, make it positive not A1L adds #1,A1 --- 174,186 ---- divnorm: mov.b #0x0,A2L or A0H,A0H ; is divisor > 0 ! bge _lab1 not A0H ; no - then make it +ve not A0L ! adds #1,A0 xor #0x1,A2L ; and remember that in A2L _lab1: or A1H,A1H ; look at dividend ! bge _lab2 not A1H ; it is -ve, make it positive not A1L adds #1,A1 *************** _lab2: rts *** 196,208 **** modnorm: mov.b #0x0,A2L or A0H,A0H ; is divisor > 0 ! bge _lab7 not A0H ; no - then make it +ve not A0L ! adds #1,A0 xor #0x1,A2L ; and remember that in A2L _lab7: or A1H,A1H ; look at dividend ! bge _lab8 not A1H ; it is -ve, make it positive not A1L adds #1,A1 --- 191,203 ---- modnorm: mov.b #0x0,A2L or A0H,A0H ; is divisor > 0 ! bge _lab7 not A0H ; no - then make it +ve not A0L ! adds #1,A0 xor #0x1,A2L ; and remember that in A2L _lab7: or A1H,A1H ; look at dividend ! bge _lab8 not A1H ; it is -ve, make it positive not A1L adds #1,A1 *************** negans: or A2L,A2L ; should answer be ne *** 219,225 **** not A0H ; yes, so make it so not A0L adds #1,A0 ! _lab4: rts ; A0=A0%A1 signed --- 214,220 ---- not A0H ; yes, so make it so not A0L adds #1,A0 ! _lab4: rts ; A0=A0%A1 signed *************** ___umodhi3: *** 256,268 **** .global ___udivhi3 ___udivhi3: ! ; A0 A1 A2 A3 ; Nn Dd P ! sub.w A3,A3 ; Nn Dd xP 00 ! or A1H,A1H bne divlongway ! or A0H,A0H ! beq _lab6 ; we know that D == 0 and N is != 0 mov.b A0H,A3L ; Nn Dd xP 0N --- 251,263 ---- .global ___udivhi3 ___udivhi3: ! ; A0 A1 A2 A3 ; Nn Dd P ! sub.w A3,A3 ; Nn Dd xP 00 ! or A1H,A1H bne divlongway ! or A0H,A0H ! beq _lab6 ; we know that D == 0 and N is != 0 mov.b A0H,A3L ; Nn Dd xP 0N *************** _lab6: mov.b A0L,A3L ; n *** 274,280 **** mov.b A3L,A0L ; Qq mov.b A3H,A3L ; m mov.b #0x0,A3H ; Qq 0m ! rts ; D != 0 - which means the denominator is ; loop around to get the result. --- 269,275 ---- mov.b A3L,A0L ; Qq mov.b A3H,A3L ; m mov.b #0x0,A3H ; Qq 0m ! rts ; D != 0 - which means the denominator is ; loop around to get the result. *************** divlongway: *** 285,303 **** mov.b #0x8,A2H ; 8 div8: add.b A0L,A0L ; n*=2 rotxl A3L ; Make remainder bigger ! rotxl A3H sub.w A1,A3 ; Q-=N bhs setbit ; set a bit ? add.w A1,A3 ; no : too far , Q+=N ! dec A2H ! bne div8 ; next bit ! rts setbit: inc A0L ; do insert bit ! dec A2H ! bne div8 ; next bit ! rts #endif /* __H8300__ */ #endif /* L_divhi3 */ --- 280,298 ---- mov.b #0x8,A2H ; 8 div8: add.b A0L,A0L ; n*=2 rotxl A3L ; Make remainder bigger ! rotxl A3H sub.w A1,A3 ; Q-=N bhs setbit ; set a bit ? add.w A1,A3 ; no : too far , Q+=N ! dec A2H ! bne div8 ; next bit ! rts setbit: inc A0L ; do insert bit ! dec A2H ! bne div8 ; next bit ! rts #endif /* __H8300__ */ #endif /* L_divhi3 */ *************** setbit: inc A0L ; do insert bit *** 306,312 **** ;; 4 byte integer divides for the H8/300. ;; ! ;; We have one routine which does all the work and lots of ;; little ones which prepare the args and massage the sign. ;; We bunch all of this into one object file since there are several ;; "supporting routines". --- 301,307 ---- ;; 4 byte integer divides for the H8/300. ;; ! ;; We have one routine which does all the work and lots of ;; little ones which prepare the args and massage the sign. ;; We bunch all of this into one object file since there are several ;; "supporting routines". *************** divnorm: *** 339,349 **** postive: mov.b A2H,A2H ; is the denominator -ve bge postive2 ! not A2L not A2H not A3L not A3H ! add.b #1,A3L addx #0,A3H addx #0,A2L addx #0,A2H --- 334,344 ---- postive: mov.b A2H,A2H ; is the denominator -ve bge postive2 ! not A2L not A2H not A3L not A3H ! add.b #1,A3L addx #0,A3H addx #0,A2L addx #0,A2H *************** modnorm: *** 373,383 **** mpostive: mov.b A2H,A2H ; is the denominator -ve bge mpostive2 ! not A2L not A2H not A3L not A3H ! add.b #1,A3L addx #0,A3H addx #0,A2L addx #0,A2H --- 368,378 ---- mpostive: mov.b A2H,A2H ; is the denominator -ve bge mpostive2 ! not A2L not A2H not A3L not A3H ! add.b #1,A3L addx #0,A3H addx #0,A2L addx #0,A2H *************** mpostive2: *** 429,435 **** ; denominator in A2/A3 .global ___modsi3 ___modsi3: ! PUSHP S2P PUSHP S0P PUSHP S1P --- 424,430 ---- ; denominator in A2/A3 .global ___modsi3 ___modsi3: ! PUSHP S2P PUSHP S0P PUSHP S1P *************** ___umodsi3: *** 466,472 **** mov.l S0P,A0P #endif bra exitdiv ! .global ___divsi3 ___divsi3: PUSHP S2P --- 461,467 ---- mov.l S0P,A0P #endif bra exitdiv ! .global ___divsi3 ___divsi3: PUSHP S2P *************** exitdiv: *** 482,488 **** or S2L,S2L beq reti ! ; should be -ve #ifdef __H8300__ not A0H --- 477,483 ---- or S2L,S2L beq reti ! ; should be -ve #ifdef __H8300__ not A0H *************** exitdiv: *** 500,511 **** reti: POPP S2P ! rts ! ; takes A0/A1 numerator (A0P for 300H) ! ; A2/A3 denominator (A1P for 300H) ! ; returns A0/A1 quotient (A0P for 300H) ! ; S0/S1 remainder (S0P for 300H) ; trashes S2 #ifdef __H8300__ --- 495,506 ---- reti: POPP S2P ! rts ! ; takes A0/A1 numerator (A0P for H8/300H) ! ; A2/A3 denominator (A1P for H8/300H) ! ; returns A0/A1 quotient (A0P for H8/300H) ! ; S0/S1 remainder (S0P for H8/300H) ; trashes S2 #ifdef __H8300__ *************** NumByte3Zero: *** 543,549 **** mov.b S1H,S1L mov.b #0x0,S1H ! rts ; have to do the divide by shift and test DenHighZero: --- 538,544 ---- mov.b S1H,S1L mov.b #0x0,S1H ! rts ; have to do the divide by shift and test DenHighZero: *************** nextbit: *** 567,573 **** sub.w A3,S1 ; does it all fit subx A2L,S0L subx A2H,S0H ! bhs setone add.w A3,S1 ; no, restore mistake addx A2L,S0L --- 562,568 ---- sub.w A3,S1 ; does it all fit subx A2L,S0L subx A2H,S0H ! bhs setone add.w A3,S1 ; no, restore mistake addx A2L,S0L *************** nextbit: *** 575,587 **** dec S2H bne nextbit ! rts ! setone: inc A1L dec S2H bne nextbit ! rts #else /* __H8300H__ */ --- 570,582 ---- dec S2H bne nextbit ! rts ! setone: inc A1L dec S2H bne nextbit ! rts #else /* __H8300H__ */ *************** setone: *** 636,646 **** ;; HImode multiply. ; The H8/300 only has an 8*8->16 multiply. ; The answer is the same as: ! ; ; product = (srca.l * srcb.l) + ((srca.h * srcb.l) + (srcb.h * srca.l)) * 256 ; (we can ignore A1.h * A0.h cause that will all off the top) ; A0 in ! ; A1 in ; A0 answer #ifdef __H8300__ --- 631,641 ---- ;; HImode multiply. ; The H8/300 only has an 8*8->16 multiply. ; The answer is the same as: ! ; ; product = (srca.l * srcb.l) + ((srca.h * srcb.l) + (srcb.h * srca.l)) * 256 ; (we can ignore A1.h * A0.h cause that will all off the top) ; A0 in ! ; A1 in ; A0 answer #ifdef __H8300__ *************** setone: *** 649,655 **** .global ___mulhi3 ___mulhi3: mov.b A1L,A2L ; A2l gets srcb.l ! mulxu A0L,A2 ; A2 gets first sub product mov.b A0H,A3L ; prepare for mulxu A1L,A3 ; second sub product --- 644,650 ---- .global ___mulhi3 ___mulhi3: mov.b A1L,A2L ; A2l gets srcb.l ! mulxu A0L,A2 ; A2 gets first sub product mov.b A0H,A3L ; prepare for mulxu A1L,A3 ; second sub product *************** ___mulhi3: *** 657,663 **** add.b A3L,A2H ; sum first two terms mov.b A1H,A3L ; third sub product ! mulxu A0L,A3 add.b A3L,A2H ; almost there mov.w A2,A0 ; that is --- 652,658 ---- add.b A3L,A2H ; sum first two terms mov.b A1H,A3L ; third sub product ! mulxu A0L,A3 add.b A3L,A2H ; almost there mov.w A2,A0 ; that is *************** ___mulhi3: *** 669,675 **** #ifdef L_mulsi3 ;; SImode multiply. ! ;; ;; I think that shift and add may be sufficient for this. Using the ;; supplied 8x8->16 would need 10 ops of 14 cycles each + overhead. This way ;; the inner loop uses maybe 20 cycles + overhead, but terminates --- 664,670 ---- #ifdef L_mulsi3 ;; SImode multiply. ! ;; ;; I think that shift and add may be sufficient for this. Using the ;; supplied 8x8->16 would need 10 ops of 14 cycles each + overhead. This way ;; the inner loop uses maybe 20 cycles + overhead, but terminates *************** ___mulhi3: *** 678,684 **** ;; A0/A1 src_a ;; A2/A3 src_b ;; ! ;; while (a) ;; { ;; if (a & 1) ;; r += b; --- 673,679 ---- ;; A0/A1 src_a ;; A2/A3 src_b ;; ! ;; while (a) ;; { ;; if (a & 1) ;; r += b; *************** ___mulsi3: *** 696,705 **** PUSHP S0P PUSHP S1P PUSHP S2P ! sub.w S0,S0 sub.w S1,S1 ! ; while (a) _top: mov.w A0,A0 bne _more --- 691,700 ---- PUSHP S0P PUSHP S1P PUSHP S2P ! sub.w S0,S0 sub.w S1,S1 ! ; while (a) _top: mov.w A0,A0 bne _more *************** _nobit: *** 718,724 **** rotxr A0L rotxr A1H rotxr A1L ! ; b <<= 1 add.w A3,A3 addx A2L,A2L --- 713,719 ---- rotxr A0L rotxr A1H rotxr A1L ! ; b <<= 1 add.w A3,A3 addx A2L,A2L *************** _nobit: *** 726,732 **** bra _top _done: ! mov.w S0,A0 mov.w S1,A1 POPP S2P POPP S1P --- 721,727 ---- bra _top _done: ! mov.w S0,A0 mov.w S1,A1 POPP S2P POPP S1P *************** _done: *** 735,766 **** #else /* __H8300H__ */ .global ___mulsi3 ___mulsi3: ! sub.l A2P,A2P ! ! ; while (a) ! _top: mov.l A0P,A0P ! beq _done ! ! ; if (a & 1) ! bld #0,A0L ! bcc _nobit ! ! ; r += b ! add.l A1P,A2P ! _nobit: ! ; a >>= 1 ! shlr.l A0P ! ; b <<= 1 ! shll.l A1P ! bra _top ! _done: ! mov.l A2P,A0P ! rts #endif #endif /* L_mulsi3 */ --- 730,771 ---- #else /* __H8300H__ */ + ; + ; mulsi3 for H8/300H - based on Hitachi SH implementation + ; + ; by Toshiyasu Morita + ; + ; Old code: + ; + ; 16b * 16b = 372 states (worst case) + ; 32b * 32b = 724 states (worst case) + ; + ; New code: + ; + ; 16b * 16b = 48 states + ; 16b * 32b = 72 states + ; 32b * 32b = 92 states + ; + .global ___mulsi3 ___mulsi3: ! mov.w r1,r2 ; ( 2 states) b * d ! mulxu r0,er2 ; (22 states) ! mov.w e0,r3 ; ( 2 states) a * d ! beq L_skip1 ; ( 4 states) ! mulxu r1,er3 ; (22 states) ! add.w r3,e2 ; ( 2 states) ! L_skip1: ! mov.w e1,r3 ; ( 2 states) c * b ! beq L_skip2 ; ( 4 states) ! mulxu r0,er3 ; (22 states) ! add.w r3,e2 ; ( 2 states) ! L_skip2: ! mov.l er2,er0 ; ( 2 states) ! rts ; (10 states) #endif #endif /* L_mulsi3 */ *************** _done: *** 770,776 **** space. For the H8/300H and H8S, the C version is good enough. */ #ifdef __H8300__ /* We still treat NANs different than libgcc2.c, but then, the ! behaviour is undefined anyways. */ .global ___fixunssfsi ___fixunssfsi: cmp.b #0x47,r0h --- 775,781 ---- space. For the H8/300H and H8S, the C version is good enough. */ #ifdef __H8300__ /* We still treat NANs different than libgcc2.c, but then, the ! behavior is undefined anyways. */ .global ___fixunssfsi ___fixunssfsi: cmp.b #0x47,r0h diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/rtems.h gcc-3.3/gcc/config/h8300/rtems.h *** gcc-3.2.3/gcc/config/h8300/rtems.h 2002-04-12 13:09:27.000000000 +0000 --- gcc-3.3/gcc/config/h8300/rtems.h 2002-06-03 00:51:37.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,25 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dh8300 \ ! -D__LONG_MAX__=2147483647L -D__LONG_LONG_MAX__=2147483647L \ ! -D__rtems__ -Asystem=rtems" --- 19,30 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Target OS preprocessor built-ins. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("h8300"); \ ! builtin_define ("__rtems__"); \ ! builtin_assert ("system=rtems"); \ ! } \ ! while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/h8300/t-h8300 gcc-3.3/gcc/config/h8300/t-h8300 *** gcc-3.2.3/gcc/config/h8300/t-h8300 2001-08-30 17:51:04.000000000 +0000 --- gcc-3.3/gcc/config/h8300/t-h8300 2002-11-20 04:54:39.000000000 +0000 *************** fp-bit.c: $(srcdir)/config/fp-bit.c *** 25,34 **** echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c ! MULTILIB_OPTIONS = mh/ms mint32 ! MULTILIB_DIRNAMES = h8300h h8300s int32 ! MULTILIB_EXCEPTIONS = mint32 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib - --- 25,33 ---- echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c ! MULTILIB_OPTIONS = mh/ms mn mint32 ! MULTILIB_DIRNAMES = h8300h h8300s normal int32 ! MULTILIB_EXCEPTIONS = mint32 mn mn/mint32 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/i370/i370.c gcc-3.3/gcc/config/i370/i370.c *** gcc-3.2.3/gcc/config/i370/i370.c 2002-01-20 23:48:10.000000000 +0000 --- gcc-3.3/gcc/config/i370/i370.c 2002-09-21 16:10:33.000000000 +0000 *************** static label_node_t * mvs_get_label PARA *** 101,112 **** --- 101,114 ---- static void i370_label_scan PARAMS ((void)); #ifdef TARGET_HLASM static bool i370_hlasm_assemble_integer PARAMS ((rtx, unsigned int, int)); + static void i370_globalize_label PARAMS ((FILE *, const char *)); #endif static void i370_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void i370_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); #ifdef LONGEXTERNAL static int mvs_hash_alias PARAMS ((const char *)); #endif + static void i370_encode_section_info PARAMS ((tree, int)); /* ===================================================== */ /* defines and functions specific to the HLASM assembler */ *************** static const unsigned char ebcasc[256] = *** 300,314 **** --- 302,332 ---- #define TARGET_ASM_ALIGNED_SI_OP NULL #undef TARGET_ASM_INTEGER #define TARGET_ASM_INTEGER i370_hlasm_assemble_integer + #undef TARGET_ASM_GLOBALIZE_LABEL + #define TARGET_ASM_GLOBALIZE_LABEL i370_globalize_label #endif #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE i370_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE i370_output_function_epilogue + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO i370_encode_section_info struct gcc_target targetm = TARGET_INITIALIZER; + /* Set global variables as needed for the options enabled. */ + + void + override_options () + { + /* We're 370 floating point, not IEEE floating point. */ + memset (real_format_for_mode, 0, sizeof real_format_for_mode); + real_format_for_mode[SFmode - QFmode] = &i370_single_format; + real_format_for_mode[DFmode - QFmode] = &i370_double_format; + } + + /* Map characters from one character set to another. C is the character to be translated. */ *************** i370_output_function_prologue (f, l) *** 1413,1418 **** --- 1431,1449 ---- /* find all labels in this routine */ i370_label_scan (); } + + static void + i370_globalize_label (stream, name) + FILE *stream; + const char *name; + { + char temp[MAX_MVS_LABEL_SIZE + 1]; + if (mvs_check_alias (name, temp) == 2) + fprintf (stream, "%s\tALIAS\tC'%s'\n", temp, name); + fputs ("\tENTRY\t", stream); + assemble_name (stream, name); + putc ('\n', stream); + } #endif /* TARGET_HLASM */ *************** i370_output_function_prologue (f, l) *** 1425,1431 **** -- subtracts stackframe size from the stack pointer. -- stores backpointer to old caller stack. ! XXX hack alert -- if the global var int leaf_function is non-zero, then this is a leaf, and it might be possible to optimize the prologue into doing even less, e.g. not grabbing a new stackframe or maybe just a partial stack frame. --- 1456,1462 ---- -- subtracts stackframe size from the stack pointer. -- stores backpointer to old caller stack. ! XXX hack alert -- if the global var int leaf_function is nonzero, then this is a leaf, and it might be possible to optimize the prologue into doing even less, e.g. not grabbing a new stackframe or maybe just a partial stack frame. *************** i370_output_function_epilogue (file, l) *** 1554,1556 **** --- 1585,1599 ---- for (i = function_base_page; i < mvs_page_num; i++) fprintf (file, "\tDC\tA(PG%d)\n", i); } + + /* Mark external references. */ + + static void + i370_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl)) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + diff -Nrc3pad gcc-3.2.3/gcc/config/i370/i370-c.c gcc-3.3/gcc/config/i370/i370-c.c *** gcc-3.2.3/gcc/config/i370/i370-c.c 2001-10-17 20:39:12.000000000 +0000 --- gcc-3.3/gcc/config/i370/i370-c.c 2002-09-16 17:22:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 28,35 **** #include "toplev.h" #include "cpplib.h" #include "c-pragma.h" ! #include "c-lex.h" ! #include "i370-protos.h" #ifdef TARGET_HLASM --- 28,34 ---- #include "toplev.h" #include "cpplib.h" #include "c-pragma.h" ! #include "tm_p.h" #ifdef TARGET_HLASM diff -Nrc3pad gcc-3.2.3/gcc/config/i370/i370.h gcc-3.3/gcc/config/i370/i370.h *** gcc-3.2.3/gcc/config/i370/i370.h 2002-01-20 23:48:11.000000000 +0000 --- gcc-3.3/gcc/config/i370/i370.h 2002-10-16 00:40:30.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,29 **** --- 24,41 ---- #ifndef GCC_I370_H #define GCC_I370_H + + /* Target CPU builtins. */ + #define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("GCC"); \ + builtin_define_std ("gcc"); \ + builtin_assert ("machine=i370"); \ + builtin_assert ("cpu=i370"); \ + } \ + while (0) + /* Run-time compilation parameters selecting different hardware subsets. */ extern int target_flags; *************** extern int mvs_function_name_length; *** 64,69 **** --- 76,83 ---- { "no-char-instructions", -1, N_("Do not generate char instructions")}, \ { "", TARGET_DEFAULT, 0} } + #define OVERRIDE_OPTIONS override_options () + /* To use IBM supplied macro function prologue and epilogue, define the following to 1. Should only be needed if IBM changes the definition of their prologue and epilogue. */ *************** extern int mvs_function_name_length; *** 86,107 **** #define WORDS_BIG_ENDIAN 1 - /* Number of bits in an addressable storage unit. */ - - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. */ - - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ - - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing pointers in memory. */ #define POINTER_BOUNDARY 32 --- 100,109 ---- *************** extern int mvs_function_name_length; *** 293,304 **** (((MODE1) == SFmode || (MODE1) == DFmode) \ == ((MODE2) == SFmode || (MODE2) == DFmode)) - /* Mark external references. */ - - #define ENCODE_SECTION_INFO(decl) \ - if (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl)) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; - /* Specify the registers used for certain standard purposes. The values of these macros are register numbers. */ --- 295,300 ---- *************** enum reg_class *** 1079,1096 **** } \ } - #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ - { \ - char temp[MAX_MVS_LABEL_SIZE + 1]; \ - if (mvs_check_alias (NAME, temp) == 2) \ - { \ - fprintf (FILE, "%s\tALIAS\tC'%s'\n", temp, NAME); \ - } \ - fputs ("\tENTRY\t", FILE); \ - assemble_name (FILE, NAME); \ - fputs ("\n", FILE); \ - } - /* MVS externals are limited to 8 characters, upper case only. The '_' is mapped to '@', except for MVS functions, then '#'. */ --- 1075,1080 ---- *************** enum reg_class *** 1386,1406 **** } \ else \ { \ ! /* hack alert -- this prints wildly incorrect values */ \ ! /* when run in cross-compiler mode. See ELF section */ \ ! /* for suggested fix */ \ ! union { double d; int i[2]; } u; \ ! u.i[0] = CONST_DOUBLE_LOW (XV); \ ! u.i[1] = CONST_DOUBLE_HIGH (XV); \ if (GET_MODE (XV) == SFmode) \ { \ mvs_page_lit += 4; \ ! fprintf (FILE, "=E'%.9G'", u.d); \ } \ ! else \ { \ mvs_page_lit += 8; \ ! fprintf (FILE, "=D'%.18G'", u.d); \ } \ } \ break; \ --- 1370,1395 ---- } \ else \ { \ ! char buf[50]; \ if (GET_MODE (XV) == SFmode) \ { \ mvs_page_lit += 4; \ ! real_to_decimal (buf, CONST_DOUBLE_REAL_VALUE (XV), \ ! sizeof (buf), 0, 1); \ ! fprintf (FILE, "=E'%s'", buf); \ } \ ! else if (GET_MODE (XV) == DFmode) \ { \ mvs_page_lit += 8; \ ! real_to_decimal (buf, CONST_DOUBLE_REAL_VALUE (XV), \ ! sizeof (buf), 0, 1); \ ! fprintf (FILE, "=D'%s'", buf); \ ! } \ ! else /* VOIDmode */ \ ! { \ ! mvs_page_lit += 8; \ ! fprintf (FILE, "=XL8'%08X%08X'", \ ! CONST_DOUBLE_HIGH (XV), CONST_DOUBLE_LOW (XV)); \ } \ } \ break; \ *************** enum reg_class *** 1676,1696 **** else \ { \ char buf[50]; \ - REAL_VALUE_TYPE rval; \ - REAL_VALUE_FROM_CONST_DOUBLE(rval, XV); \ - REAL_VALUE_TO_DECIMAL (rval, HOST_WIDE_INT_PRINT_DEC, buf); \ if (GET_MODE (XV) == SFmode) \ { \ mvs_page_lit += 4; \ fprintf (FILE, "=E'%s'", buf); \ } \ ! else \ ! if (GET_MODE (XV) == DFmode) \ { \ mvs_page_lit += 8; \ fprintf (FILE, "=D'%s'", buf); \ } \ ! else /* VOIDmode !?!? strange but true ... */ \ { \ mvs_page_lit += 8; \ fprintf (FILE, "=XL8'%08X%08X'", \ --- 1665,1685 ---- else \ { \ char buf[50]; \ if (GET_MODE (XV) == SFmode) \ { \ mvs_page_lit += 4; \ + real_to_decimal (buf, CONST_DOUBLE_REAL_VALUE (XV), \ + sizeof (buf), 0, 1); \ fprintf (FILE, "=E'%s'", buf); \ } \ ! else if (GET_MODE (XV) == DFmode) \ { \ mvs_page_lit += 8; \ + real_to_decimal (buf, CONST_DOUBLE_REAL_VALUE (XV), \ + sizeof (buf), 0, 1); \ fprintf (FILE, "=D'%s'", buf); \ } \ ! else /* VOIDmode */ \ { \ mvs_page_lit += 8; \ fprintf (FILE, "=XL8'%08X%08X'", \ *************** abort(); \ *** 1846,1856 **** #define ASM_DOUBLE "\t.double" - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - (assemble_name (FILE, NAME), fputs (":\n", FILE)) - /* #define ASM_OUTPUT_LABELREF(FILE, NAME) */ /* use gas -- defaults.h */ /* Generate internal label. Since we can branch here from off page, we --- 1835,1840 ---- *************** abort(); \ *** 1906,1914 **** ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - /* Allow #sccs in preprocessor. */ - #define SCCS_DIRECTIVE - /* Implicit library calls should use memcpy, not bcopy, etc. */ #define TARGET_MEM_FUNCTIONS --- 1890,1895 ---- *************** abort(); \ *** 1933,1943 **** #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG)) ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE)) /* This says how to output an assembler line to define a global common symbol. */ --- 1914,1921 ---- #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG)) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP ".globl " /* This says how to output an assembler line to define a global common symbol. */ diff -Nrc3pad gcc-3.2.3/gcc/config/i370/i370-protos.h gcc-3.3/gcc/config/i370/i370-protos.h *** gcc-3.2.3/gcc/config/i370/i370-protos.h 2001-07-06 18:40:10.000000000 +0000 --- gcc-3.3/gcc/config/i370/i370-protos.h 2002-09-21 16:10:33.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,29 **** --- 24,31 ---- #ifndef GCC_I370_PROTOS_H #define GCC_I370_PROTOS_H + extern void override_options PARAMS ((void)); + #ifdef RTX_CODE extern int i370_branch_dest PARAMS ((rtx)); extern int i370_branch_length PARAMS ((rtx)); diff -Nrc3pad gcc-3.2.3/gcc/config/i370/linux.h gcc-3.3/gcc/config/i370/linux.h *** gcc-3.2.3/gcc/config/i370/linux.h 2002-04-15 20:27:25.000000000 +0000 --- gcc-3.3/gcc/config/i370/linux.h 2002-08-12 03:10:43.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. System/370 version. ! Copyright (C) 1989, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002 ! Free Software Foundation, Inc. Contributed by Jan Stein (jan@cd.chalmers.se). Modified for Linux/390 by Linas Vepstas (linas@linas.org) --- 1,5 ---- /* Definitions of target machine for GNU compiler. System/370 version. ! Copyright (C) 1989, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Jan Stein (jan@cd.chalmers.se). Modified for Linux/390 by Linas Vepstas (linas@linas.org) *************** Boston, MA 02111-1307, USA. */ *** 29,50 **** #define TARGET_ELF_ABI #define LINUX_DEFAULT_ELF - - /* hack alert define to get dbx/gdb/dwarf to compile */ - /* problem is that host float format is not target float format. */ - /* define REAL_ARITHMETIC for software emulation of float to - * int conversion. This seems to have somethings to do with - * cross-compiling ... */ - #define REAL_ARITHMETIC - /* Include system common definitions */ /* TODO: convert include to ${tm_file} list in config.gcc. */ #include "i370/i370.h" ! /* Names to predefine in the preprocessor for this target machine. */ ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-DGCC -Dgcc -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -Asystem=posix -Acpu=i370 -Amachine=i370" /* Options for this target machine. */ --- 28,46 ---- #define TARGET_ELF_ABI #define LINUX_DEFAULT_ELF /* Include system common definitions */ /* TODO: convert include to ${tm_file} list in config.gcc. */ #include "i370/i370.h" ! /* Target OS preprocessor built-ins. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("linux"); \ ! builtin_define ("__gnu_linux__"); \ ! builtin_define ("__ELF__"); \ ! builtin_assert ("system=posix"); \ ! } while (0) /* Options for this target machine. */ diff -Nrc3pad gcc-3.2.3/gcc/config/i370/mvs.h gcc-3.3/gcc/config/i370/mvs.h *** gcc-3.2.3/gcc/config/i370/mvs.h 2000-11-02 23:29:09.000000000 +0000 --- gcc-3.3/gcc/config/i370/mvs.h 2002-08-12 03:10:43.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,43 **** #define CPP_SPEC "-trigraphs" ! /* Names to predefine in the preprocessor for this target machine. */ #if defined(LE370) ! #define CPP_PREDEFINES "-DGCC -Dgcc -DMVS -Dmvs -DLE370 -Asystem=mvs -Acpu=i370 -Amachine=i370" #else ! #define CPP_PREDEFINES "-DGCC -Dgcc -DMVS -Dmvs -Asystem=mvs -Acpu=i370 -Amachine=i370" #endif /* Include system common definitions */ --- 32,50 ---- #define CPP_SPEC "-trigraphs" ! /* Target OS preprocessor built-ins. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("MVS"); \ ! builtin_define_std ("mvs"); \ ! MAYBE_LE370_MACROS(); \ ! builtin_assert ("system=mvs"); \ ! } while (0) #if defined(LE370) ! # define MAYBE_LE370_MACROS() do {builtin_define_std ("LE370");} while (0) #else ! # define MAYBE_LE370_MACROS() #endif /* Include system common definitions */ diff -Nrc3pad gcc-3.2.3/gcc/config/i370/oe.h gcc-3.3/gcc/config/i370/oe.h *** gcc-3.2.3/gcc/config/i370/oe.h 2000-11-02 23:29:09.000000000 +0000 --- gcc-3.3/gcc/config/i370/oe.h 2002-08-12 03:10:43.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 39,47 **** #define LIBGCC_SPEC "" #define STARTFILE_SPEC "/usr/local/lib/gccmain.o" ! /* Names to predefine in the preprocessor for this target machine. */ ! ! #define CPP_PREDEFINES "-DGCC -Dgcc -DUNIX -Dunix -Dopenedition -D__i370__ -Asystem=openedition -Asystem=unix -Acpu=i370 -Amachine=i370" /* Include system common definitions */ --- 39,54 ---- #define LIBGCC_SPEC "" #define STARTFILE_SPEC "/usr/local/lib/gccmain.o" ! /* Target OS preprocessor built-ins. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("UNIX"); \ ! builtin_define_std ("openedition"); \ ! builtin_define ("__i370__"); \ ! builtin_assert ("system=openedition"); \ ! builtin_assert ("system=unix"); \ ! } while (0) /* Include system common definitions */ diff -Nrc3pad gcc-3.2.3/gcc/config/i370/t-i370 gcc-3.3/gcc/config/i370/t-i370 *** gcc-3.2.3/gcc/config/i370/t-i370 2001-10-17 20:39:13.000000000 +0000 --- gcc-3.3/gcc/config/i370/t-i370 2002-09-16 17:22:13.000000000 +0000 *************** *** 1,3 **** ! i370-c.o: $(srcdir)/config/i370/i370-c.c $(srcdir)/config/i370/i370-protos.h \ ! $(CONFIG_H) $(SYSTEM_H) cpplib.h $(TREE_H) c-pragma.h c-lex.h toplev.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< --- 1,3 ---- ! i370-c.o: $(srcdir)/config/i370/i370-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \ ! $(TREE_H) c-pragma.h toplev.h $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff -Nrc3pad gcc-3.2.3/gcc/config/i386/386bsd.h gcc-3.3/gcc/config/i386/386bsd.h *** gcc-3.2.3/gcc/config/i386/386bsd.h 2001-10-17 01:39:46.000000000 +0000 --- gcc-3.3/gcc/config/i386/386bsd.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,53 **** - /* Configuration for an i386 running 386BSD as the target machine. */ - - /* This is tested by i386gas.h. */ - #define YES_UNDERSCORES - - #include "i386/gstabs.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -D____386BSD____ -D__386BSD__ -DBSD_NET2 -Asystem=unix -Asystem=bsd" - - /* Like the default, except no -lg. */ - #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" - - #undef SIZE_TYPE - #define SIZE_TYPE "unsigned int" - - #undef PTRDIFF_TYPE - #define PTRDIFF_TYPE "int" - - #undef WCHAR_TYPE - #define WCHAR_TYPE "short unsigned int" - - #define WCHAR_UNSIGNED 1 - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE 16 - - /* Redefine this to use %eax instead of %edx. */ - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - { \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n", \ - LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall mcount\n"); \ - } \ - } - - #undef ASM_APP_ON - #define ASM_APP_ON "#APP\n" - - #undef ASM_APP_OFF - #define ASM_APP_OFF "#NO_APP\n" - - /* Don't default to pcc-struct-return, because gcc is the only compiler, and - we want to retain compatibility with older gcc versions. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/aix386.h gcc-3.3/gcc/config/i386/aix386.h *** gcc-3.2.3/gcc/config/i386/aix386.h 2001-08-09 22:33:23.000000000 +0000 --- gcc-3.3/gcc/config/i386/aix386.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,64 **** - /* Definitions for IBM PS2 running AIX/386 with gas. - From: Minh Tran-Le - Copyright (C) 1988, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* - * This configuration file is for gcc with gas-2.x and gnu ld 2.x - * with aix ps/2 1.3.x. - */ - - /* Define USE_GAS if you have the new version of gas that can handle - * multiple segments and .section pseudo op. This will allow gcc to - * use the .init section for g++ ctor/dtor. - * - * If you don't have gas then undefined USE_GAS. You will also have - * to use collect if you want to use g++ - */ - #define USE_GAS - - #include "i386/aix386ng.h" - - /* Use crt1.o as a startup file and crtn.o as a closing file. - And add crtbegin.o and crtend.o for ctors and dtors */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s" - #undef ENDFILE_SPEC - #define ENDFILE_SPEC \ - "crtend.o%s crtn.o%s" - - /* Removed the -K flags because the gnu ld does not handle it */ - #undef LINK_SPEC - #define LINK_SPEC "%{T*} %{z:-lm}" - - /* Define a few machine-specific details of the implementation of - constructors. */ - - #undef INIT_SECTION_ASM_OP - #define INIT_SECTION_ASM_OP "\t.section .init,\"x\"" - - #define CTOR_LIST_BEGIN \ - asm (INIT_SECTION_ASM_OP); \ - asm ("pushl $0") - #define CTOR_LIST_END CTOR_LIST_BEGIN - - #undef TARGET_ASM_CONSTRUCTOR - #define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/aix386ng.h gcc-3.3/gcc/config/i386/aix386ng.h *** gcc-3.2.3/gcc/config/i386/aix386ng.h 2001-08-09 22:33:23.000000000 +0000 --- gcc-3.3/gcc/config/i386/aix386ng.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,139 **** - /* Definitions for IBM PS2 running AIX/386. - Copyright (C) 1988, 1996, 1998 Free Software Foundation, Inc. - Contributed by Minh Tran-Le . - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #include "i386/i386.h" - - /* Get the generic definitions for system V.3. */ - - #include "svr3.h" - - /* Use the ATT assembler syntax. - This overrides at least one macro (USER_LABEL_PREFIX) from svr3.h. */ - - #include "i386/att.h" - - /* Use crt1.o as a startup file and crtn.o as a closing file. */ - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" - #define ENDFILE_SPEC "crtn.o%s" - - #define LIB_SPEC "%{shlib:-lc_s} -lc" - - /* Special flags for the linker. I don't know what they do. */ - - #define LINK_SPEC "%{K} %{!K:-K} %{T*} %{z:-lm}" - - /* Specify predefined symbols in preprocessor. */ - - #define CPP_PREDEFINES "-Dps2 -Dunix -Asystem=aix" - - #define CPP_SPEC "%(cpp_cpu) \ - %{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS" - - /* special flags for the aix assembler to generate the short form for all - qualifying forward reference */ - /* The buggy /bin/as of aix ps/2 1.2.x cannot always handle it. */ - #if 0 - #define ASM_SPEC "-s2" - #endif /* 0 */ - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - do { output_file_directive (FILE, main_input_filename); \ - if (optimize) \ - ASM_FILE_START_1 (FILE); \ - else \ - fprintf (FILE, "\t.noopt\n"); \ - } while (0) - - /* This was suggested, but it shouldn't be right for DBX output. -- RMS - #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */ - - /* Writing `int' for a bitfield forces int alignment for the structure. */ - - #define PCC_BITFIELD_TYPE_MATTERS 1 - - #ifndef USE_GAS - /* Don't write a `.optim' pseudo; this assembler - is said to have a bug when .optim is used. */ - - #undef ASM_FILE_START_1 - #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.noopt\n") - #endif - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\tleal %sP%d,%%eax\n\tcall mcount\n", LPREFIX, (LABELNO)); - - /* Note that using bss_section here caused errors - in building shared libraries on system V.3. - but AIX 1.2 does not have yet shareable libraries on PS2 */ - #undef ASM_OUTPUT_LOCAL - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - (bss_section (), \ - ASM_OUTPUT_LABEL ((FILE), (NAME)), \ - fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED))) - - - /* Undef all the .init and .fini section stuff if we are not using gas and - * gnu ld so that we can use collect because the standard /bin/as and /bin/ld - * cannot handle those. - */ - #ifndef USE_GAS - # undef INIT_SECTION_ASM_OP - # undef FINI_SECTION_ASM_OP - # undef CTORS_SECTION_ASM_OP - # undef DTORS_SECTION_ASM_OP - # undef TARGET_ASM_CONSTRUCTOR - # undef TARGET_ASM_DESTRUCTOR - # undef DO_GLOBAL_CTORS_BODY - - # undef CTOR_LIST_BEGIN - # define CTOR_LIST_BEGIN - # undef CTOR_LIST_END - # define CTOR_LIST_END - # undef DTOR_LIST_BEGIN - # define DTOR_LIST_BEGIN - # undef DTOR_LIST_END - # define DTOR_LIST_END - - # undef CONST_SECTION_FUNCTION - # define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - text_section(); \ - } - - # undef EXTRA_SECTION_FUNCTIONS - # define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION - - /* for collect2 */ - # define OBJECT_FORMAT_COFF - # define MY_ISCOFF(magic) \ - ((magic) == I386MAGIC || (magic) == I386SVMAGIC) - - #endif /* !USE_GAS */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/athlon.md gcc-3.3/gcc/config/i386/athlon.md *** gcc-3.2.3/gcc/config/i386/athlon.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/athlon.md 2002-11-16 01:09:18.000000000 +0000 *************** *** 0 **** --- 1,206 ---- + ;; AMD Athlon Scheduling + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. */ + (define_attr "athlon_decode" "direct,vector" + (cond [(eq_attr "type" "call,imul,idiv,other,multi,fcmov,fpspc,str,pop,cld,fcmov") + (const_string "vector") + (and (eq_attr "type" "push") + (match_operand 1 "memory_operand" "")) + (const_string "vector") + (and (eq_attr "type" "fmov") + (and (eq_attr "memory" "load,store") + (eq_attr "mode" "XF"))) + (const_string "vector")] + (const_string "direct"))) + + ;; The Athlon does contain three pipelined FP units, three integer units and + ;; three address generation units. + ;; + ;; The predecode logic is determining boundaries of instructions in the 64 + ;; byte cache line. So the cache line straddling problem of K6 might be issue + ;; here as well, but it is not noted in the documentation. + ;; + ;; Three DirectPath instructions decoders and only one VectorPath decoder + ;; is available. They can decode three DirectPath instructions or one VectorPath + ;; instruction per cycle. + ;; Decoded macro instructions are then passed to 72 entry instruction control + ;; unit, that passes + ;; it to the specialized integer (18 entry) and fp (36 entry) schedulers. + ;; + ;; The load/store queue unit is not attached to the schedulers but + ;; communicates with all the execution units separately instead. + + (define_function_unit "athlon_vectordec" 1 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "athlon_decode" "vector")) + 1 1) + + (define_function_unit "athlon_directdec" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "athlon_decode" "direct")) + 1 1) + + (define_function_unit "athlon_vectordec" 1 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "athlon_decode" "direct")) + 1 1 [(eq_attr "athlon_decode" "vector")]) + + (define_function_unit "athlon_ieu" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "alu1,negnot,alu,icmp,test,imov,imovx,lea,incdec,ishift,ishift1,rotate,rotate1,ibr,call,callv,icmov,cld,pop,setcc,push,pop")) + 1 1) + + (define_function_unit "athlon_ieu" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "str")) + 15 15) + + (define_function_unit "athlon_ieu" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "imul")) + 5 0) + + (define_function_unit "athlon_ieu" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "idiv")) + 42 0) + + (define_function_unit "athlon_muldiv" 1 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "imul")) + 5 0) + + (define_function_unit "athlon_muldiv" 1 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "idiv")) + 42 42) + + (define_attr "athlon_fpunits" "none,store,mul,add,muladd,any" + (cond [(eq_attr "type" "fop,fcmp,fistp") + (const_string "add") + (eq_attr "type" "fmul,fdiv,fpspc,fsgn,fcmov") + (const_string "mul") + (and (eq_attr "type" "fmov") (eq_attr "memory" "store,both")) + (const_string "store") + (and (eq_attr "type" "fmov") (eq_attr "memory" "load")) + (const_string "any") + (and (eq_attr "type" "fmov") + (ior (match_operand:SI 1 "register_operand" "") + (match_operand 1 "immediate_operand" ""))) + (const_string "store") + (eq_attr "type" "fmov") + (const_string "muladd")] + (const_string "none"))) + + ;; We use latencies 1 for definitions. This is OK to model colisions + ;; in execution units. The real latencies are modeled in the "fp" pipeline. + + ;; fsin, fcos: 96-192 + ;; fsincos: 107-211 + ;; fsqrt: 19 for SFmode, 27 for DFmode, 35 for XFmode. + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "fpspc")) + 100 1) + + ;; 16 cycles for SFmode, 20 for DFmode and 24 for XFmode. + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "fdiv")) + 24 1) + + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "fop,fmul,fistp")) + 4 1) + + ;; XFmode loads are slow. + ;; XFmode store is slow too (8 cycles), but we don't need to model it, because + ;; there are no dependent instructions. + + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (and (eq_attr "type" "fmov") + (and (eq_attr "memory" "load") + (eq_attr "mode" "XF")))) + 10 1) + + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "fmov,fsgn")) + 2 1) + + ;; fcmp and ftst instructions + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (and (eq_attr "type" "fcmp") + (eq_attr "athlon_decode" "direct"))) + 3 1) + + ;; fcmpi instructions. + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (and (eq_attr "type" "fcmp") + (eq_attr "athlon_decode" "vector"))) + 3 1) + + (define_function_unit "athlon_fp" 3 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "type" "fcmov")) + 7 1) + + (define_function_unit "athlon_fp_mul" 1 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "athlon_fpunits" "mul")) + 1 1) + + (define_function_unit "athlon_fp_add" 1 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "athlon_fpunits" "add")) + 1 1) + + (define_function_unit "athlon_fp_muladd" 2 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "athlon_fpunits" "muladd,mul,add")) + 1 1) + + (define_function_unit "athlon_fp_store" 1 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "athlon_fpunits" "store")) + 1 1) + + ;; We don't need to model the Address Generation Unit, since we don't model + ;; the re-order buffer yet and thus we never schedule more than three operations + ;; at time. Later we may want to experiment with MD_SCHED macros modeling the + ;; decoders independently on the functional units. + + ;(define_function_unit "athlon_agu" 3 0 + ; (and (eq_attr "cpu" "athlon") + ; (and (eq_attr "memory" "!none") + ; (eq_attr "athlon_fpunits" "none"))) + ; 1 1) + + ;; Model load unit to avoid too long sequences of loads. We don't need to + ;; model store queue, since it is hardly going to be bottleneck. + + (define_function_unit "athlon_load" 2 0 + (and (eq_attr "cpu" "athlon") + (eq_attr "memory" "load,both")) + 1 1) + diff -Nrc3pad gcc-3.2.3/gcc/config/i386/att.h gcc-3.3/gcc/config/i386/att.h *** gcc-3.2.3/gcc/config/i386/att.h 2001-12-18 15:41:09.000000000 +0000 --- gcc-3.3/gcc/config/i386/att.h 2002-04-03 03:47:37.000000000 +0000 *************** *** 1,5 **** /* Definitions for AT&T assembler syntax for the Intel 80386. ! Copyright (C) 1988, 1996, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Definitions for AT&T assembler syntax for the Intel 80386. ! Copyright (C) 1988, 1996, 2000, 2001, 2002 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,27 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* Include common aspects of all 386 Unix assemblers. */ - #include "i386/unix.h" - - #define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)"); /* Define the syntax of instructions and addresses. */ --- 19,24 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/beos-elf.h gcc-3.3/gcc/config/i386/beos-elf.h *** gcc-3.2.3/gcc/config/i386/beos-elf.h 2001-11-19 18:30:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/beos-elf.h 2002-11-15 14:57:11.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel x86 running BeOS ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Intel x86 running BeOS ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 19,25 **** Boston, MA 02111-1307, USA. */ - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 BeOS/ELF)"); /* Change debugging to Dwarf2. */ --- 19,24 ---- *************** Boston, MA 02111-1307, USA. */ *** 41,61 **** /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ ! #undef FUNCTION_PROFILER ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! { \ ! if (flag_pic) \ ! { \ ! fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ ! LPREFIX, (LABELNO)); \ ! fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ ! } \ ! else \ ! { \ ! fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ ! fprintf (FILE, "\tcall mcount\n"); \ ! } \ ! } #undef SIZE_TYPE #define SIZE_TYPE "long unsigned int" --- 40,47 ---- /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ ! #undef MCOUNT_NAME ! #define MCOUNT_NAME "mcount" #undef SIZE_TYPE #define SIZE_TYPE "long unsigned int" *************** Boston, MA 02111-1307, USA. */ *** 66,87 **** #undef WCHAR_TYPE #define WCHAR_TYPE "short unsigned int" - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 1 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 16 - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__ELF__ -D__BEOS__ -D__INTEL__ -D_X86_=1 \ - -D__stdcall=__attribute__((__stdcall__)) \ - -D__cdecl=__attribute__((__cdecl__)) \ - -D__declspec(x)=__attribute__((x)) \ - -Asystem=beos" - - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) %{!no-fPIC:%{!no-fpic:-D__PIC__ -D__pic__}}" /* BeOS uses lots of multichars, so don't warn about them unless the user explicitly asks for the warnings with -Wmultichar. Note that CC1_SPEC is used for both cc1 and cc1plus. */ --- 52,79 ---- #undef WCHAR_TYPE #define WCHAR_TYPE "short unsigned int" #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 16 + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__ELF__"); \ + builtin_define ("__BEOS__"); \ + builtin_define ("__INTEL__"); \ + builtin_define ("_X86_"); \ + builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ + builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ + builtin_define ("__declspec(x)=__attribute__((x))"); \ + builtin_assert ("system=beos"); \ + if (flag_pic) \ + { \ + builtin_define ("__PIC__"); \ + builtin_define ("__pic__"); \ + } \ + } \ + while (0) + /* BeOS uses lots of multichars, so don't warn about them unless the user explicitly asks for the warnings with -Wmultichar. Note that CC1_SPEC is used for both cc1 and cc1plus. */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/biarch64.h gcc-3.3/gcc/config/i386/biarch64.h *** gcc-3.2.3/gcc/config/i386/biarch64.h 2001-10-02 10:59:38.000000000 +0000 --- gcc-3.3/gcc/config/i386/biarch64.h 2002-05-30 00:38:36.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 21,25 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_64BIT_DEFAULT ! #define TARGET_BI_ARCH --- 21,25 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_64BIT_DEFAULT MASK_64BIT ! #define TARGET_BI_ARCH 1 diff -Nrc3pad gcc-3.2.3/gcc/config/i386/bsd386.h gcc-3.3/gcc/config/i386/bsd386.h *** gcc-3.2.3/gcc/config/i386/bsd386.h 2001-10-31 14:32:27.000000000 +0000 --- gcc-3.3/gcc/config/i386/bsd386.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,32 **** - /* Configuration for an i386 running BSDI's BSD/OS (formerly known as BSD/386) - as the target machine. */ - - /* We exist mostly to add -Dbsdi and such to the predefines. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -Dbsdi -D____386BSD____ -D__386BSD__\ - -DBSD_NET2 -Asystem=unix -Asystem=bsd" - - #undef WCHAR_TYPE - #define WCHAR_TYPE "int" - - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE 32 - - /* This is suitable for BSD/OS 3.0; we don't know about earlier releases. */ - #undef ASM_COMMENT_START - #define ASM_COMMENT_START " #" - - /* Until they use ELF or something that handles dwarf2 unwinds - and initialization stuff better. */ - #define DWARF2_UNWIND_INFO 0 - - /* BSD/OS still uses old binutils that don't insert nops by default - when the .align directive demands to insert extra space in the text - segment. */ - #undef ASM_OUTPUT_ALIGN - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG)) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/bsd.h gcc-3.3/gcc/config/i386/bsd.h *** gcc-3.2.3/gcc/config/i386/bsd.h 2001-12-17 15:05:32.000000000 +0000 --- gcc-3.3/gcc/config/i386/bsd.h 2002-04-03 03:47:37.000000000 +0000 *************** *** 1,7 **** /* Definitions for BSD assembler syntax for Intel 386 (actually AT&T syntax for insns and operands, adapted to BSD conventions for symbol names and debugging.) ! Copyright (C) 1988, 1996, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Definitions for BSD assembler syntax for Intel 386 (actually AT&T syntax for insns and operands, adapted to BSD conventions for symbol names and debugging.) ! Copyright (C) 1988, 1996, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 20,42 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* Include common aspects of all 386 Unix assemblers. */ - #include "i386/unix.h" - /* Use the Sequent Symmetry assembler syntax. */ - - #define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)"); /* Define the syntax of pseudo-ops, labels and comments. */ /* Prefix for internally generated assembler labels. If we aren't using underscores, we are using prefix `.'s to identify labels that should be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ ! #ifdef NO_UNDERSCORES ! #define LPREFIX ".L" ! #else #define LPREFIX "L" - #endif /* not NO_UNDERSCORES */ /* Assembler pseudos to introduce constants of various size. */ --- 20,34 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Use the Sequent Symmetry assembler syntax. */ /* Define the syntax of pseudo-ops, labels and comments. */ /* Prefix for internally generated assembler labels. If we aren't using underscores, we are using prefix `.'s to identify labels that should be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ ! #define LPREFIX "L" /* Assembler pseudos to introduce constants of various size. */ *************** Boston, MA 02111-1307, USA. */ *** 93,124 **** PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. */ - #ifdef NO_UNDERSCORES - #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) - #else #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER)) - #endif /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ - #ifdef NO_UNDERSCORES - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) - #else #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, "%s%d:\n", PREFIX, NUM) - #endif /* The prefix to add to user-visible assembler symbols. */ - #ifdef NO_UNDERSCORES - #define USER_LABEL_PREFIX "" - #else #define USER_LABEL_PREFIX "_" - #endif /* not NO_UNDERSCORES */ /* Sequent has some changes in the format of DBX symbols. */ #define DBX_NO_XREFS 1 --- 85,102 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/crtdll.h gcc-3.3/gcc/config/i386/crtdll.h *** gcc-3.2.3/gcc/config/i386/crtdll.h 2001-10-31 14:32:27.000000000 +0000 --- gcc-3.3/gcc/config/i386/crtdll.h 2002-06-29 09:10:04.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,29 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_WIN32 -DWIN32 \ ! -D__MINGW32__=0.2 -DWINNT -D_X86_=1 \ ! -Asystem=winnt" #undef LIBGCC_SPEC #define LIBGCC_SPEC \ --- 20,28 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef EXTRA_OS_CPP_BUILTINS ! #define EXTRA_OS_CPP_BUILTINS() \ ! do { builtin_define ("__MINGW32__=0.2"); } while (0) #undef LIBGCC_SPEC #define LIBGCC_SPEC \ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/cygwin.h gcc-3.3/gcc/config/i386/cygwin.h *** gcc-3.2.3/gcc/config/i386/cygwin.h 2002-12-05 20:30:30.000000000 +0000 --- gcc-3.3/gcc/config/i386/cygwin.h 2003-04-29 13:56:28.000000000 +0000 *************** *** 1,6 **** /* Operating system specific defines to be used when targeting GCC for hosting on Windows32, using a Unix style C library and tools. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Operating system specific defines to be used when targeting GCC for hosting on Windows32, using a Unix style C library and tools. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 20,69 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define YES_UNDERSCORES ! ! #define DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG #define TARGET_EXECUTABLE_SUFFIX ".exe" #include #include "i386/gas.h" #include "dbxcoff.h" ! /* Augment TARGET_SWITCHES with the cygwin/no-cygwin options. */ ! #define MASK_WIN32 0x40000000 /* Use -lming32 interface */ ! #define MASK_CYGWIN 0x20000000 /* Use -lcygwin interface */ ! #define MASK_WINDOWS 0x10000000 /* Use windows interface */ ! #define MASK_DLL 0x08000000 /* Use dll interface */ ! #define MASK_NOP_FUN_DLLIMPORT 0x20000 /* Ignore dllimport for functions */ ! #define TARGET_WIN32 (target_flags & MASK_WIN32) ! #define TARGET_CYGWIN (target_flags & MASK_CYGWIN) ! #define TARGET_WINDOWS (target_flags & MASK_WINDOWS) ! #define TARGET_DLL (target_flags & MASK_DLL) #define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT) #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ ! { "cygwin", MASK_CYGWIN, \ ! N_("Use the Cygwin interface") }, \ ! { "no-cygwin", MASK_WIN32, \ ! N_("Use the Mingw32 interface") }, \ ! { "windows", MASK_WINDOWS, N_("Create GUI application") }, \ ! { "no-win32", -MASK_WIN32, N_("Don't set Windows defines") },\ ! { "win32", 0, N_("Set Windows defines") }, \ ! { "console", -MASK_WINDOWS, \ ! N_("Create console application") }, \ ! { "dll", MASK_DLL, N_("Generate code for a DLL") }, \ ! { "nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, \ ! N_("Ignore dllimport for functions") }, \ ! { "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \ { "threads", 0, N_("Use Mingw-specific thread support") }, ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_X86_=1 -Asystem=winnt" #ifdef CROSS_COMPILE #define CYGWIN_INCLUDES "%{!nostdinc:-idirafter " CYGWIN_CROSS_DIR "/include}" --- 20,76 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define DBX_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #define TARGET_VERSION fprintf (stderr, " (x86 Cygwin)"); #define TARGET_EXECUTABLE_SUFFIX ".exe" #include + #include "i386/i386.h" + #include "i386/unix.h" + #include "i386/bsd.h" #include "i386/gas.h" #include "dbxcoff.h" ! /* Masks for subtarget switches used by other files. */ ! #define MASK_NOP_FUN_DLLIMPORT 0x08000000 /* Ignore dllimport for functions */ ! /* Used in winnt.c. */ #define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT) #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ ! { "cygwin", 0, N_("Use the Cygwin interface") }, \ ! { "no-cygwin", 0, N_("Use the Mingw32 interface") }, \ ! { "windows", 0, N_("Create GUI application") }, \ ! { "no-win32", 0, N_("Don't set Windows defines") }, \ ! { "win32", 0, N_("Set Windows defines") }, \ ! { "console", 0, N_("Create console application") },\ ! { "dll", 0, N_("Generate code for a DLL") }, \ ! { "nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, \ ! N_("Ignore dllimport for functions") }, \ ! { "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \ { "threads", 0, N_("Use Mingw-specific thread support") }, ! #define MAYBE_UWIN_CPP_BUILTINS() /* Nothing. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_X86_=1"); \ ! builtin_assert ("system=winnt"); \ ! builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ ! builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ ! builtin_define ("__declspec(x)=__attribute__((x))"); \ ! if (!flag_iso) \ ! { \ ! builtin_define ("_stdcall=__attribute__((__stdcall__))"); \ ! builtin_define ("_cdecl=__attribute__((__cdecl__))"); \ ! } \ ! MAYBE_UWIN_CPP_BUILTINS (); \ ! } \ ! while (0) #ifdef CROSS_COMPILE #define CYGWIN_INCLUDES "%{!nostdinc:-idirafter " CYGWIN_CROSS_DIR "/include}" *************** Boston, MA 02111-1307, USA. */ *** 104,116 **** existing args. */ #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ ! -D__stdcall=__attribute__((__stdcall__)) \ ! -D__cdecl=__attribute__((__cdecl__)) \ ! %{!ansi:-D_stdcall=__attribute__((__stdcall__)) \ ! -D_cdecl=__attribute__((__cdecl__))} \ ! -D__declspec(x)=__attribute__((x)) \ ! -D__i386__ -D__i386 \ %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \ %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{mthreads:-D_MT} "\ MINGW_INCLUDES "} \ --- 111,117 ---- existing args. */ #undef CPP_SPEC ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \ %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \ %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{mthreads:-D_MT} "\ MINGW_INCLUDES "} \ *************** Boston, MA 02111-1307, USA. */ *** 133,139 **** by calling the init function from the prologue. */ #undef LIBGCC_SPEC ! #define LIBGCC_SPEC "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmsvcrt}" /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition --- 134,141 ---- by calling the init function from the prologue. */ #undef LIBGCC_SPEC ! #define LIBGCC_SPEC "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} \ ! -lgcc %{mno-cygwin:-lmoldname -lmingwex -lmsvcrt}" /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition *************** Boston, MA 02111-1307, USA. */ *** 179,185 **** #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" - #define WCHAR_UNSIGNED 1 #define WCHAR_TYPE_SIZE 16 #define WCHAR_TYPE "short unsigned int" --- 181,186 ---- *************** Boston, MA 02111-1307, USA. */ *** 189,207 **** union tree_node; #define TREE union tree_node * - - /* Used to implement dllexport overriding dllimport semantics. It's also used - to handle vtables - the first pass won't do anything because - DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0. - It's also used to handle dllimport override semantics. */ - #if 0 - #define REDO_SECTION_INFO_P(DECL) \ - ((DECL_ATTRIBUTES (DECL) != NULL_TREE) \ - || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL))) - #else - #define REDO_SECTION_INFO_P(DECL) 1 - #endif - #undef EXTRA_SECTIONS #define EXTRA_SECTIONS in_drectve --- 190,195 ---- *************** do { \ *** 277,323 **** section and we need to set DECL_SECTION_NAME so we do that here. Note that we can be called twice on the same decl. */ ! extern void i386_pe_encode_section_info PARAMS ((TREE)); ! ! #ifdef ENCODE_SECTION_INFO ! #undef ENCODE_SECTION_INFO ! #endif ! #define ENCODE_SECTION_INFO(DECL) i386_pe_encode_section_info (DECL) ! ! /* Utility used only in this file. */ ! #define I386_PE_STRIP_ENCODING(SYM_NAME) \ ! ((SYM_NAME) + ((SYM_NAME)[0] == '@' \ ! ? ((SYM_NAME)[3] == '*' ? 4 : 3) : 0) \ ! + ((SYM_NAME)[0] == '*' ? 1 : 0)) ! ! /* This macro gets just the user-specified name ! out of the string in a SYMBOL_REF. Discard ! trailing @[NUM] encoded by ENCODE_SECTION_INFO. */ ! #undef STRIP_NAME_ENCODING ! #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ ! do { \ ! const char *_p; \ ! const char *_name = I386_PE_STRIP_ENCODING (SYMBOL_NAME); \ ! for (_p = _name; *_p && *_p != '@'; ++_p) \ ! ; \ ! if (*_p == '@') \ ! { \ ! int _len = _p - _name; \ ! char *_new_name = (char *) alloca (_len + 1); \ ! strncpy (_new_name, _name, _len); \ ! _new_name[_len] = '\0'; \ ! (VAR) = _new_name; \ ! } \ ! else \ ! (VAR) = _name; \ ! } while (0) ! /* Output a reference to a label. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \ ! I386_PE_STRIP_ENCODING (NAME)) \ /* Output a common block. */ #undef ASM_OUTPUT_COMMON --- 265,280 ---- section and we need to set DECL_SECTION_NAME so we do that here. Note that we can be called twice on the same decl. */ ! #undef TARGET_ENCODE_SECTION_INFO ! #define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info ! #undef TARGET_STRIP_NAME_ENCODING ! #define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full /* Output a reference to a label. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \ ! i386_pe_strip_name_encoding (NAME)) \ /* Output a common block. */ #undef ASM_OUTPUT_COMMON *************** do { \ *** 350,360 **** #define CHECK_STACK_LIMIT 4000 /* By default, target has a 80387, uses IEEE compatible arithmetic, ! and returns float values in the 387 and needs stack probes */ ! #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT \ ! (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE) /* This is how to output an assembler line that says to advance the location counter --- 307,319 ---- #define CHECK_STACK_LIMIT 4000 /* By default, target has a 80387, uses IEEE compatible arithmetic, ! returns float values in the 387 and needs stack probes. ! We also align doubles to 64-bits for MSVC default compatibility. */ + #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT \ ! (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE \ ! | MASK_ALIGN_DOUBLE) /* This is how to output an assembler line that says to advance the location counter *************** do { \ *** 371,377 **** #define MULTIPLE_SYMBOL_SPACES extern void i386_pe_unique_section PARAMS ((TREE, int)); ! #define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC) #define SUPPORTS_ONE_ONLY 1 --- 330,336 ---- #define MULTIPLE_SYMBOL_SPACES extern void i386_pe_unique_section PARAMS ((TREE, int)); ! #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section #define SUPPORTS_ONE_ONLY 1 *************** extern void i386_pe_unique_section PARAM *** 423,431 **** #undef ASM_COMMENT_START #define ASM_COMMENT_START " #" ! /* DWARF2 Unwinding doesn't work with exception handling yet. To make it ! work, we need to build a libgcc_s.dll, and dcrt0.o should be changed to ! call __register_frame_info/__deregister_frame_info. */ #define DWARF2_UNWIND_INFO 0 /* Don't assume anything about the header files. */ --- 382,390 ---- #undef ASM_COMMENT_START #define ASM_COMMENT_START " #" ! /* DWARF2 Unwinding doesn't work with exception handling yet. To make ! it work, we need to build a libgcc_s.dll, and dcrt0.o should be ! changed to call __register_frame_info/__deregister_frame_info. */ #define DWARF2_UNWIND_INFO 0 /* Don't assume anything about the header files. */ *************** extern void i386_pe_unique_section PARAM *** 441,446 **** --- 400,414 ---- const0_rtx)); \ } + /* Java Native Interface (JNI) methods on Win32 are invoked using the + stdcall calling convention. */ + #undef MODIFY_JNI_METHOD_CALL + #define MODIFY_JNI_METHOD_CALL(MDECL) \ + build_type_attribute_variant ((MDECL), \ + build_tree_list (get_identifier ("stdcall"), \ + NULL)) + + /* External function declarations. */ extern void i386_pe_record_external_function PARAMS ((const char *)); *************** extern int i386_pe_dllimport_name_p PARA *** 462,468 **** #undef BIGGEST_FIELD_ALIGNMENT #define BIGGEST_FIELD_ALIGNMENT 64 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #undef PCC_BITFIELD_TYPE_MATTERS #define PCC_BITFIELD_TYPE_MATTERS 1 #define GROUP_BITFIELDS_BY_ALIGN TYPE_NATIVE(rec) --- 430,436 ---- #undef BIGGEST_FIELD_ALIGNMENT #define BIGGEST_FIELD_ALIGNMENT 64 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #undef PCC_BITFIELD_TYPE_MATTERS #define PCC_BITFIELD_TYPE_MATTERS 1 #define GROUP_BITFIELDS_BY_ALIGN TYPE_NATIVE(rec) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/darwin.h gcc-3.3/gcc/config/i386/darwin.h *** gcc-3.2.3/gcc/config/i386/darwin.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/darwin.h 2002-09-13 04:00:56.000000000 +0000 *************** *** 0 **** --- 1,120 ---- + /* Target definitions for x86 running Darwin. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Contributed by Apple Computer Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Enable Mach-O bits in generic x86 code. */ + #undef TARGET_MACHO + #define TARGET_MACHO 1 + + #define TARGET_VERSION fprintf (stderr, " (i386 Darwin)"); + + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__i386__"); \ + builtin_define ("__LITTLE_ENDIAN__"); \ + builtin_define ("__MACH__"); \ + builtin_define ("__APPLE__"); \ + } \ + while (0) + + /* We want -fPIC by default, unless we're using -static to compile for + the kernel or some such. */ + + #undef CC1_SPEC + #define CC1_SPEC "%{!static:-fPIC}" + + /* The Darwin assembler mostly follows AT&T syntax. */ + #undef ASSEMBLER_DIALECT + #define ASSEMBLER_DIALECT ASM_ATT + + /* Define macro used to output shift-double opcodes when the shift + count is in %cl. Some assemblers require %cl as an argument; + some don't. This macro controls what to do: by default, don't + print %cl. */ + + #define SHIFT_DOUBLE_OMITS_COUNT 0 + + /* Define the syntax of pseudo-ops, labels and comments. */ + + /* String containing the assembler's comment-starter. */ + + #define ASM_COMMENT_START "#" + + /* By default, target has a 80387, uses IEEE compatible arithmetic, + and returns float values in the 387. */ + + #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) + + /* TARGET_DEEP_BRANCH_PREDICTION is incompatible with Mach-O PIC. */ + + #undef TARGET_DEEP_BRANCH_PREDICTION + #define TARGET_DEEP_BRANCH_PREDICTION 0 + + /* Define the syntax of pseudo-ops, labels and comments. */ + + #define LPREFIX "L" + + /* Assembler pseudos to introduce constants of various size. */ + + #define ASM_BYTE_OP "\t.byte\t" + #define ASM_SHORT "\t.word\t" + #define ASM_LONG "\t.long\t" + /* Darwin as doesn't do ".quad". */ + + #undef ASM_OUTPUT_ALIGN + #define ASM_OUTPUT_ALIGN(FILE,LOG) \ + do { if ((LOG) != 0) \ + { \ + if (in_text_section ()) \ + fprintf (FILE, "\t%s %d,0x90\n", ALIGN_ASM_OP, (LOG)); \ + else \ + fprintf (FILE, "\t%s %d\n", ALIGN_ASM_OP, (LOG)); \ + } \ + } while (0) + + /* This says how to output an assembler line + to define a global common symbol. */ + + #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ + ( fputs (".comm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%u\n", (ROUNDED))) + + /* This says how to output an assembler line + to define a local common symbol. */ + + #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ + ( fputs (".lcomm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%u\n", (ROUNDED))) + + /* Darwin profiling -- call mcount. */ + #undef FUNCTION_PROFILER + #define FUNCTION_PROFILER(FILE, LABELNO) \ + do { \ + if (MACHOPIC_INDIRECT) \ + { \ + const char *name = machopic_stub_name ("*mcount"); \ + fprintf (FILE, "\tcall %s\n", name+1); /* skip '&' */ \ + machopic_validate_stub_or_non_lazy_ptr (name, /*stub:*/1); \ + } \ + else fprintf (FILE, "\tcall mcount\n"); \ + } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/dgux.h gcc-3.3/gcc/config/i386/dgux.h *** gcc-3.2.3/gcc/config/i386/dgux.h 2001-11-10 04:40:58.000000000 +0000 --- gcc-3.3/gcc/config/i386/dgux.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,257 **** - /* Target definitions for GNU compiler for Intel 80x86 running DG/ux - Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2001 - Free Software Foundation, Inc. - Currently maintained by gcc@dg-rtp.dg.com. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* for now, we are just like the sysv4 version with a - few hacks - */ - - #ifndef VERSION_INFO2 - #define VERSION_INFO2 "$Revision: 1.16 $" - #endif - - #ifndef VERSION_STRING - #define VERSION_STRING version_string - #endif - - /* Identify the compiler. */ - /* TARGET_VERSION used by toplev.c VERSION_STRING used by -midentify-revision */ - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (%s%s, %s)", \ - VERSION_INFO1, VERSION_INFO2, __DATE__) - #undef VERSION_INFO1 - #define VERSION_INFO1 "ix86 DG/ux, " - - /* Augment TARGET_SWITCHES with the MXDB options. */ - #define MASK_STANDARD 0x40000000 /* Retain standard information */ - #define MASK_NOLEGEND 0x20000000 /* Discard legend information */ - #define MASK_EXTERNAL_LEGEND 0x10000000 /* Make external legends */ - #define MASK_IDENTIFY_REVISION 0x08000000 /* Emit 'ident' to .s */ - #define MASK_WARN_PASS_STRUCT 0x04000000 /* Warn when structures are passed */ - - #define TARGET_STANDARD (target_flags & MASK_STANDARD) - #define TARGET_NOLEGEND (target_flags & MASK_NOLEGEND) - #define TARGET_EXTERNAL_LEGEND (target_flags & MASK_EXTERNAL_LEGEND) - #define TARGET_IDENTIFY_REVISION (target_flags & MASK_IDENTIFY_REVISION) - #define TARGET_WARN_PASS_STRUCT (target_flags & MASK_WARN_PASS_STRUCT) - - #undef SUBTARGET_SWITCHES - #define SUBTARGET_SWITCHES \ - { "standard", MASK_STANDARD, \ - N_("Retain standard MXDB information") }, \ - { "legend", -MASK_NOLEGEND, \ - N_("Retain legend information") }, \ - { "no-legend", MASK_NOLEGEND, "" }, \ - { "external-legend", MASK_EXTERNAL_LEGEND, \ - N_("Generate external legend information") }, \ - { "identify-revision", MASK_IDENTIFY_REVISION, \ - N_("Emit identifying info in .s file") }, \ - { "warn-passed-structs", MASK_WARN_PASS_STRUCT, \ - N_("Warn when a function arg is a structure") }, - - #undef DWARF_DEBUGGING_INFO - #define DWARF_DEBUGGING_INFO - - /* - allow -gstabs so that those who have gnu-as installed - can debug c++ programs. - */ - #undef DBX_DEBUGGING_INFO - #define DBX_DEBUGGING_INFO - - #undef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG - - /* Override svr[34].h. Switch to the data section so that the coffsem - symbol isn't in the text section. */ - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - data_section (); \ - } while (0) - - /* ix86 abi specified type for wchar_t */ - - #undef WCHAR_TYPE - #define WCHAR_TYPE "long int" - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE BITS_PER_WORD - - - /* Some machines may desire to change what optimizations are performed for - various optimization levels. This macro, if defined, is executed once - just after the optimization level is determined and before the remainder - of the command options have been parsed. Values set in this macro are - used as the default values for the other command line options. - - LEVEL is the optimization level specified; 2 if -O2 is specified, - 1 if -O is specified, and 0 if neither is specified. */ - - /* This macro used to store 0 in flag_signed_bitfields. - Not only is that misuse of this macro; the whole idea is wrong. - - The GNU C dialect makes bitfields signed by default, - regardless of machine type. Making any machine inconsistent in this - regard is bad for portability. - - I chose to make bitfields signed by default because this is consistent - with the way ordinary variables are handled: `int' equals `signed int'. - If there is a good reason to prefer making bitfields unsigned by default, - it cannot have anything to do with the choice of machine. - If the reason is good enough, we should change the convention for all machines. - - -- rms, 20 July 1991. */ - - /* - this really should go into dgux-local.h - */ - - #undef OPTIMIZATION_OPTIONS - #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \ - do { \ - extern int flag_signed_bitfields; \ - flag_signed_bitfields = 0; \ - optimization_options (LEVEL,SIZE); \ - } while (0) - - - /* The normal location of the `ld' and `as' programs */ - - #undef MD_EXEC_PREFIX - #define MD_EXEC_PREFIX "/usr/bin/" - - /* The normal location of the various *crt*.o files is the */ - - #undef MD_STARTFILE_PREFIX - #define MD_STARTFILE_PREFIX "/usr/lib/" - - /* Macros to be automatically defined. - __CLASSIFY_TYPE__ is used in the and header - files with DG/UX revision 5.40 and later. This allows GNU CC to - operate without installing the header files. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__ix86 -Dunix -DDGUX -D__CLASSIFY_TYPE__=2\ - -Asystem=unix -Asystem=svr4" - - /* - If not -ansi, -traditional, or restricting include files to one - specific source target, specify full DG/UX features. - */ - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}" - - /* Assembler support (legends for mxdb). */ - #undef ASM_SPEC - #define ASM_SPEC "\ - %{mno-legend:%{mstandard:-Wc,off}}\ - %{g:%{!mno-legend:-Wc,-fix-bb,-s\"%i\"\ - %{traditional:,-lc}%{!traditional:,-lansi-c}\ - %{mstandard:,-keep-std}\ - %{mexternal-legend:,-external}}}" - - /* Override svr4.h. */ - - /* hassey 3/12/94 keep svr4 ASM_FINAL_SPEC allows -pipe to work */ - - /* Linker and library spec's. - -static, -shared, -symbolic, -h* and -z* access AT&T V.4 link options. - -svr4 instructs gcc to place /usr/lib/values-X[cat].o on link the line. - The absence of -msvr4 indicates linking done in a COFF environment and - adds the link script to the link line. In all environments, the first - and last objects are crtbegin.o and crtend.o. - When the -G link option is used (-shared and -symbolic) a final link is - not being done. */ - - #undef LIB_SPEC - #define LIB_SPEC \ - "%{!shared:%{!symbolic:-lc}}" - - #undef LINK_SPEC - #define LINK_SPEC "%{z*} %{h*} %{v:-V} \ - %{static:-dn -Bstatic} \ - %{shared:-G -dy} \ - %{symbolic:-Bsymbolic -G -dy} \ - %{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}" - - #ifdef CROSS_COMPILE - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s} \ - %{!pg:%{p:mcrt1.o%s} \ - %{!p:crt1.o%s}}}} \ - %{pg:gcrti.o%s}%{!pg:crti.o%s} \ - crtbegin.o%s \ - %{ansi:values-Xc.o%s} \ - %{!ansi:%{traditional:values-Xt.o%s} \ - %{!traditional:values-Xa.o%s}}" - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:crtn.o%s}" - - #else - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s} \ - %{!pg:%{p:/lib/mcrt1.o%s} \ - %{!p:/lib/crt1.o%s}}}} \ - %{pg:gcrti.o%s}%{!pg:/lib/crti.o%s} \ - crtbegin.o%s \ - %{ansi:/lib/values-Xc.o%s} \ - %{!ansi:%{traditional:/lib/values-Xt.o%s} \ - %{!traditional:/lib/values-Xa.o%s}}" - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:/lib/crtn.o}" - - #endif /* CROSS_COMPILE */ - - /* The maximum alignment which the object file format can support. - page alignment would seem to be enough */ - #undef MAX_OFILE_ALIGNMENT - #define MAX_OFILE_ALIGNMENT 0x1000 - - /* Must use data section for relocatable constants when pic. */ - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \ - { \ - if (flag_pic && symbolic_operand (RTX, VOIDmode)) \ - data_section (); \ - else \ - const_section (); \ - } - - /* This supplements FUNCTION_ARG's definition in i386.h to check - TARGET_WARN_PASS_STRUCT */ - - #undef FUNCTION_ARG - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - ((((MODE) == BLKmode && TARGET_WARN_PASS_STRUCT) ? \ - warning ("argument is a structure"),0 : 0), \ - (function_arg (&CUM, MODE, TYPE, NAMED))) - - /* Add .align 1 to avoid .backalign bug in assembler */ - #undef CONST_SECTION_ASM_OP - #define CONST_SECTION_ASM_OP "\t.section\t.rodata\n\t.align 1" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/djgpp.h gcc-3.3/gcc/config/i386/djgpp.h *** gcc-3.2.3/gcc/config/i386/djgpp.h 2002-03-31 18:26:21.000000000 +0000 --- gcc-3.3/gcc/config/i386/djgpp.h 2002-11-26 04:54:48.000000000 +0000 *************** *** 1,5 **** /* Configuration for an i386 running MS-DOS with DJGPP. ! Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Configuration for an i386 running MS-DOS with DJGPP. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,38 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include "dbxcoff.h" - /* Support generation of DWARF2 debugging info. */ ! #define DWARF2_DEBUGGING_INFO /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C ! #define HANDLE_SYSV_PRAGMA /* Enable parsing of #pragma pack(push,) and #pragma pack(pop). */ #define HANDLE_PRAGMA_PACK_PUSH_POP 1 ! #define YES_UNDERSCORES ! #include "i386/gas.h" /* If defined, a C expression whose value is a string containing the --- 19,37 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Support generation of DWARF2 debugging info. */ ! #define DWARF2_DEBUGGING_INFO 1 /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C ! #define HANDLE_SYSV_PRAGMA 1 /* Enable parsing of #pragma pack(push,) and #pragma pack(pop). */ #define HANDLE_PRAGMA_PACK_PUSH_POP 1 ! #include "i386/unix.h" ! #include "i386/bsd.h" #include "i386/gas.h" /* If defined, a C expression whose value is a string containing the *************** Boston, MA 02111-1307, USA. */ *** 83,95 **** (((NAME)[0] == '/') || ((NAME)[0] == '\\') || \ (((NAME)[0] >= 'A') && ((NAME)[0] <= 'z') && ((NAME)[1] == ':'))) ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__MSDOS__ -D__GO32__ -Asystem=msdos" /* Include so __DJGPP__ and __DJGPP_MINOR__ are defined. */ #undef CPP_SPEC ! #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ ! %{!ansi:%{!std=c*:%{!std=i*:-DMSDOS}}} %{!ansi:%{!std=c*:%{!std=i*:-DGO32}}} \ -imacros %s../include/sys/version.h" /* We need to override link_command_spec in gcc.c so support -Tdjgpp.djl. --- 82,99 ---- (((NAME)[0] == '/') || ((NAME)[0] == '\\') || \ (((NAME)[0] >= 'A') && ((NAME)[0] <= 'z') && ((NAME)[1] == ':'))) ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("MSDOS"); \ ! builtin_define_std ("GO32"); \ ! builtin_assert ("system=msdos"); \ ! } \ ! while (0) /* Include so __DJGPP__ and __DJGPP_MINOR__ are defined. */ #undef CPP_SPEC ! #define CPP_SPEC "-remap %{posix:-D_POSIX_SOURCE} \ -imacros %s../include/sys/version.h" /* We need to override link_command_spec in gcc.c so support -Tdjgpp.djl. *************** Boston, MA 02111-1307, USA. */ *** 160,168 **** /* Definitions for types and sizes. Wide characters are 16-bits long so Win32 compiler add-ons will be wide character compatible. */ - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 1 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 16 --- 164,169 ---- *************** Boston, MA 02111-1307, USA. */ *** 186,191 **** --- 187,194 ---- #undef MASK_BNU210 #define MASK_BNU210 (0x40000000) + #define TARGET_VERSION fprintf (stderr, " (80386, MS-DOS DJGPP)"); + #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ { "no-bnu210", -MASK_BNU210, "Ignored (obsolete)" }, \ *************** while (0) *** 206,242 **** /* Support for C++ templates. */ #undef MAKE_DECL_ONE_ONLY #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) - - #undef UNIQUE_SECTION - #define UNIQUE_SECTION(DECL,RELOC) \ - do { \ - int len; \ - const char *name, *prefix; \ - char *string; \ - \ - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ - /* Strip off any encoding in fnname. */ \ - STRIP_NAME_ENCODING (name, name); \ - \ - if (! DECL_ONE_ONLY (DECL)) \ - { \ - if (TREE_CODE (DECL) == FUNCTION_DECL) \ - prefix = ".text."; \ - else if (DECL_READONLY_SECTION (DECL, RELOC)) \ - prefix = ".rodata."; \ - else \ - prefix = ".data."; \ - } \ - else if (TREE_CODE (DECL) == FUNCTION_DECL) \ - prefix = ".gnu.linkonce.t."; \ - else if (DECL_READONLY_SECTION (DECL, RELOC)) \ - prefix = ".gnu.linkonce.r."; \ - else \ - prefix = ".gnu.linkonce.d."; \ - \ - len = strlen (name) + strlen (prefix); \ - string = alloca (len + 1); \ - sprintf (string, "%s%s", prefix, name); \ - \ - DECL_SECTION_NAME (DECL) = build_string (len, string); \ - } while (0) --- 209,211 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/djgpp-rtems.h gcc-3.3/gcc/config/i386/djgpp-rtems.h *** gcc-3.2.3/gcc/config/i386/djgpp-rtems.h 2002-02-13 22:48:52.000000000 +0000 --- gcc-3.3/gcc/config/i386/djgpp-rtems.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,35 **** - /* Configuration for an i386 running RTEMS on top of MS-DOS with - DJGPP v2.x. - - Copyright (C) 1996, 1999, 2002 Free Software Foundation, Inc. - Contributed by Joel Sherrill (joel@OARcorp.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Specify predefined symbols in preprocessor. */ - - #ifdef CPP_PREDEFINES - #undef CPP_PREDEFINES - #endif - #define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS -D__rtems__ \ - -Asystem=unix -Asystem=msdos -Asystem=rtems" - - /* Generate calls to memcpy, memcmp and memset. */ - #ifndef TARGET_MEM_FUNCTIONS - #define TARGET_MEM_FUNCTIONS - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/freebsd64.h gcc-3.3/gcc/config/i386/freebsd64.h *** gcc-3.2.3/gcc/config/i386/freebsd64.h 2002-01-26 07:24:57.000000000 +0000 --- gcc-3.3/gcc/config/i386/freebsd64.h 2003-04-29 11:44:20.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 20,26 **** Boston, MA 02111-1307, USA. */ ! #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); /* Provide a LINK_SPEC appropriate for the FreeBSD/x86-64 ELF target. --- 20,26 ---- Boston, MA 02111-1307, USA. */ ! #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); /* Provide a LINK_SPEC appropriate for the FreeBSD/x86-64 ELF target. *************** Boston, MA 02111-1307, USA. */ *** 29,36 **** #undef LINK_SPEC #define LINK_SPEC "\ ! %{!m32:-m elf_x86_64} \ ! %{m32:-m elf_i386} \ %{Wl,*:%*} \ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ --- 29,35 ---- #undef LINK_SPEC #define LINK_SPEC "\ ! %{m32:-m elf_i386_fbsd} \ %{Wl,*:%*} \ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/freebsd-aout.h gcc-3.3/gcc/config/i386/freebsd-aout.h *** gcc-3.2.3/gcc/config/i386/freebsd-aout.h 2002-01-23 00:56:28.000000000 +0000 --- gcc-3.3/gcc/config/i386/freebsd-aout.h 2003-04-29 12:57:06.000000000 +0000 *************** *** 1,8 **** /* Definitions of target machine for GNU compiler for Intel 80386 running FreeBSD. ! Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2002 Free Software ! Foundation, Inc. Contributed by Poul-Henning Kamp This file is part of GNU CC. --- 1,9 ---- /* Definitions of target machine for GNU compiler for Intel 80386 running FreeBSD. ! Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2002, 2003 ! Free Software Foundation, Inc. Contributed by Poul-Henning Kamp + Continued development by David O'Brien This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 21,34 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* This is tested by i386gas.h. */ - #define YES_UNDERSCORES - /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C - #include "i386/gstabs.h" - /* This goes away when the math-emulator is fixed */ #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT \ --- 22,30 ---- *************** Boston, MA 02111-1307, USA. */ *** 41,49 **** defaults.h works. */ #undef ASM_PREFERRED_EH_DATA_FORMAT ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -D__FreeBSD__\ ! -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" /* Like the default, except no -lg. */ #define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}" --- 37,52 ---- defaults.h works. */ #undef ASM_PREFERRED_EH_DATA_FORMAT ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_define ("__FreeBSD__"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=bsd"); \ ! builtin_assert ("system=FreeBSD"); \ ! } \ ! while (0) /* Like the default, except no -lg. */ #define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}" *************** Boston, MA 02111-1307, USA. */ *** 57,64 **** #undef WCHAR_TYPE #define WCHAR_TYPE "int" - #define WCHAR_UNSIGNED 0 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD --- 60,65 ---- *************** Boston, MA 02111-1307, USA. */ *** 93,114 **** /* Profiling routines, partially copied from i386/osfrose.h. */ ! /* Redefine this to use %eax instead of %edx. */ ! #undef FUNCTION_PROFILER ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! { \ ! if (flag_pic) \ ! { \ ! fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n", \ ! LPREFIX, (LABELNO)); \ ! fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ ! } \ ! else \ ! { \ ! fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO)); \ ! fprintf (FILE, "\tcall mcount\n"); \ ! } \ ! } /* * Some imports from svr4.h in support of shared libraries. --- 94,106 ---- /* Profiling routines, partially copied from i386/osfrose.h. */ ! /* Tell final.c that we don't need a label passed to mcount. */ ! #define NO_PROFILE_COUNTERS 1 ! ! #undef MCOUNT_NAME ! #define MCOUNT_NAME "mcount" ! #undef PROFILE_COUNT_REGISTER ! #define PROFILE_COUNT_REGISTER "eax" /* * Some imports from svr4.h in support of shared libraries. *************** Boston, MA 02111-1307, USA. */ *** 123,128 **** --- 115,121 ---- #define TYPE_ASM_OP "\t.type\t" #define SIZE_ASM_OP "\t.size\t" + #define SET_ASM_OP "\t.set\t" /* The following macro defines the format used to output the second operand of the .type assembler directive. Different svr4 assemblers *************** Boston, MA 02111-1307, USA. */ *** 132,137 **** --- 125,136 ---- #define TYPE_OPERAND_FMT "@%s" + #define HANDLE_SYSV_PRAGMA 1 + + #define ASM_WEAKEN_LABEL(FILE,NAME) \ + do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ + fputc ('\n', FILE); } while (0) + /* Write the extra assembler code needed to declare a function's result. Most svr4 assemblers don't require any special declaration of the result value, but there are exceptions. */ *************** Boston, MA 02111-1307, USA. */ *** 149,184 **** Some svr4 assemblers need to also have something extra said about the function's return value. We allow for that here. */ ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } while (0) /* Write the extra assembler code needed to declare an object properly. */ ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } while (0) /* Output the size directive for a decl in rest_of_decl_compilation in the case where we did not do so before the initializer. --- 148,183 ---- Some svr4 assemblers need to also have something extra said about the function's return value. We allow for that here. */ ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ ! } \ ! while (0) /* Write the extra assembler code needed to declare an object properly. */ ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! HOST_WIDE_INT size; \ ! \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive \ ! && (DECL) && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ ! } \ ! \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ ! } \ ! while (0) /* Output the size directive for a decl in rest_of_decl_compilation in the case where we did not do so before the initializer. *************** Boston, MA 02111-1307, USA. */ *** 189,225 **** #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL)));\ ! } \ } while (0) - /* This is how to declare the size of a function. */ #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno; \ ! labelno++; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ","); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ } while (0) #define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k}" --- 188,211 ---- #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ ! } \ } while (0) /* This is how to declare the size of a function. */ #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } while (0) #define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k}" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/freebsd.h gcc-3.3/gcc/config/i386/freebsd.h *** gcc-3.2.3/gcc/config/i386/freebsd.h 2002-04-12 01:58:38.000000000 +0000 --- gcc-3.3/gcc/config/i386/freebsd.h 2002-11-15 14:57:11.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 23,45 **** Boston, MA 02111-1307, USA. */ - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); /* Override the default comment-starter of "/". */ ! #undef ASM_COMMENT_START #define ASM_COMMENT_START "#" ! #undef ASM_APP_ON #define ASM_APP_ON "#APP\n" ! #undef ASM_APP_OFF #define ASM_APP_OFF "#NO_APP\n" ! #undef SET_ASM_OP #define SET_ASM_OP "\t.set\t" ! #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) \ (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) --- 23,44 ---- Boston, MA 02111-1307, USA. */ #define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); /* Override the default comment-starter of "/". */ ! #undef ASM_COMMENT_START #define ASM_COMMENT_START "#" ! #undef ASM_APP_ON #define ASM_APP_ON "#APP\n" ! #undef ASM_APP_OFF #define ASM_APP_OFF "#NO_APP\n" ! #undef SET_ASM_OP #define SET_ASM_OP "\t.set\t" ! #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) \ (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) *************** Boston, MA 02111-1307, USA. */ *** 48,71 **** /* Tell final.c that we don't need a label passed to mcount. */ ! #undef FUNCTION_PROFILER ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! { \ ! if (flag_pic) \ ! fprintf ((FILE), "\tcall *.mcount@GOT(%%ebx)\n"); \ ! else \ ! fprintf ((FILE), "\tcall .mcount\n"); \ ! } /* Make gcc agree with . */ ! #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" ! #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" ! #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add --- 47,64 ---- /* Tell final.c that we don't need a label passed to mcount. */ ! #undef MCOUNT_NAME ! #define MCOUNT_NAME ".mcount" /* Make gcc agree with . */ ! #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" ! #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" ! #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add diff -Nrc3pad gcc-3.2.3/gcc/config/i386/gas.h gcc-3.3/gcc/config/i386/gas.h *** gcc-3.2.3/gcc/config/i386/gas.h 2001-12-18 15:41:09.000000000 +0000 --- gcc-3.3/gcc/config/i386/gas.h 2002-08-29 21:40:11.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel 386 using GAS. ! Copyright (C) 1988, 1993, 1994, 1996 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Intel 386 using GAS. ! Copyright (C) 1988, 1993, 1994, 1996, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 21,33 **** /* Note that i386/seq-gas.h is a GAS configuration that does not use this file. */ - #include "i386/i386.h" - - #ifndef YES_UNDERSCORES - /* Define this now, because i386/bsd.h tests it. */ - #define NO_UNDERSCORES - #endif - /* Use the bsd assembler syntax. */ /* we need to do this because gas is really a bsd style assembler, * and so doesn't work well this these att-isms: --- 21,26 ---- *************** Boston, MA 02111-1307, USA. */ *** 44,67 **** * people who want both form will have to compile twice. */ - #include "i386/bsd.h" - /* these come from i386/bsd.h, but are specific to sequent */ #undef DBX_NO_XREFS #undef DBX_CONTIN_LENGTH /* Ask for COFF symbols. */ ! #define SDB_DEBUGGING_INFO ! ! /* Specify predefined symbols in preprocessor. */ ! ! #define CPP_PREDEFINES "-Dunix" ! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}" ! ! /* Allow #sccs in preprocessor. */ ! ! #define SCCS_DIRECTIVE /* Output #ident as a .ident. */ --- 37,49 ---- * people who want both form will have to compile twice. */ /* these come from i386/bsd.h, but are specific to sequent */ #undef DBX_NO_XREFS #undef DBX_CONTIN_LENGTH /* Ask for COFF symbols. */ ! #define SDB_DEBUGGING_INFO 1 /* Output #ident as a .ident. */ *************** Boston, MA 02111-1307, USA. */ *** 139,166 **** /* Print opcodes the way that GAS expects them. */ #define GAS_MNEMONICS 1 - #ifdef NO_UNDERSCORES /* If user-symbols don't have underscores, - then it must take more than `L' to identify - a label that should be ignored. */ - - /* This is how to store into the string BUF - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #undef ASM_GENERATE_INTERNAL_LABEL - #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER)) - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #undef ASM_OUTPUT_INTERNAL_LABEL - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) - - #endif /* NO_UNDERSCORES */ - /* Output at beginning of assembler file. */ /* The .file command should always begin the output. */ #undef ASM_FILE_START --- 121,126 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/gnu.h gcc-3.3/gcc/config/i386/gnu.h *** gcc-3.2.3/gcc/config/i386/gnu.h 2002-04-13 22:09:30.000000000 +0000 --- gcc-3.3/gcc/config/i386/gnu.h 2002-06-05 17:01:30.000000000 +0000 *************** *** 3,16 **** #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 GNU)"); ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__ELF__ -DMACH -Asystem=mach \ ! -Dunix -Asystem=unix -Asystem=posix -D__gnu_hurd__ -D__GNU__ -Asystem=gnu" #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) \ ! %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ ! %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}" #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu)" --- 3,31 ---- #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 GNU)"); ! #undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("MACH"); \ ! builtin_define_std ("unix"); \ ! builtin_define ("__ELF__"); \ ! builtin_define ("__GNU__"); \ ! builtin_define ("__gnu_hurd__"); \ ! builtin_assert ("system=gnu"); \ ! builtin_assert ("system=mach"); \ ! builtin_assert ("system=posix"); \ ! builtin_assert ("system=unix"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! } \ ! } \ ! while (0) #undef CPP_SPEC ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}" #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu)" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/gstabs.h gcc-3.3/gcc/config/i386/gstabs.h *** gcc-3.2.3/gcc/config/i386/gstabs.h 1998-12-16 21:03:24.000000000 +0000 --- gcc-3.3/gcc/config/i386/gstabs.h 2002-08-29 21:40:11.000000000 +0000 *************** *** 1,9 **** - #include "i386/gas.h" - /* We do not want to output SDB debugging information. */ #undef SDB_DEBUGGING_INFO /* We want to output DBX debugging information. */ ! #define DBX_DEBUGGING_INFO --- 1,7 ---- /* We do not want to output SDB debugging information. */ #undef SDB_DEBUGGING_INFO /* We want to output DBX debugging information. */ ! #define DBX_DEBUGGING_INFO 1 diff -Nrc3pad gcc-3.2.3/gcc/config/i386/gthr-win32.c gcc-3.3/gcc/config/i386/gthr-win32.c *** gcc-3.2.3/gcc/config/i386/gthr-win32.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/gthr-win32.c 2002-06-11 05:25:44.000000000 +0000 *************** *** 0 **** --- 1,174 ---- + /* Implementation of W32-specific threads compatibility routines for + libgcc2. */ + + /* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. + Contributed by Mumit Khan . + Modified and moved to separate file by Danny Smith + . + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + /* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. */ + + + #ifndef __GTHREAD_HIDE_WIN32API + # define __GTHREAD_HIDE_WIN32API + #endif + #include + #include + + /* Windows32 threads specific definitions. The windows32 threading model + does not map well into pthread-inspired gcc's threading model, and so + there are caveats one needs to be aware of. + + 1. The destructor supplied to __gthread_key_create is ignored for + generic x86-win32 ports. This will certainly cause memory leaks + due to unreclaimed eh contexts (sizeof (eh_context) is at least + 24 bytes for x86 currently). + + This memory leak may be significant for long-running applications + that make heavy use of C++ EH. + + However, Mingw runtime (version 0.3 or newer) provides a mechanism + to emulate pthreads key dtors; the runtime provides a special DLL, + linked in if -mthreads option is specified, that runs the dtors in + the reverse order of registration when each thread exits. If + -mthreads option is not given, a stub is linked in instead of the + DLL, which results in memory leak. Other x86-win32 ports can use + the same technique of course to avoid the leak. + + 2. The error codes returned are non-POSIX like, and cast into ints. + This may cause incorrect error return due to truncation values on + hw where sizeof (DWORD) > sizeof (int). + + 3. We might consider using Critical Sections instead of Windows32 + mutexes for better performance, but emulating __gthread_mutex_trylock + interface becomes more complicated (Win9x does not support + TryEnterCriticalSectioni, while NT does). + + The basic framework should work well enough. In the long term, GCC + needs to use Structured Exception Handling on Windows32. */ + + int + __gthr_win32_once (__gthread_once_t *once, void (*func) (void)) + { + if (once == NULL || func == NULL) + return EINVAL; + + if (! once->done) + { + if (InterlockedIncrement (&(once->started)) == 0) + { + (*func) (); + once->done = TRUE; + } + else + { + /* Another thread is currently executing the code, so wait for it + to finish; yield the CPU in the meantime. If performance + does become an issue, the solution is to use an Event that + we wait on here (and set above), but that implies a place to + create the event before this routine is called. */ + while (! once->done) + Sleep (0); + } + } + return 0; + } + + /* Windows32 thread local keys don't support destructors; this leads to + leaks, especially in threaded applications making extensive use of + C++ EH. Mingw uses a thread-support DLL to work-around this problem. */ + + int + __gthr_win32_key_create (__gthread_key_t *key, void (*dtor) (void *)) + { + int status = 0; + DWORD tls_index = TlsAlloc (); + if (tls_index != 0xFFFFFFFF) + { + *key = tls_index; + #ifdef MINGW32_SUPPORTS_MT_EH + /* Mingw runtime will run the dtors in reverse order for each thread + when the thread exits. */ + status = __mingwthr_key_dtor (*key, dtor); + #endif + } + else + status = (int) GetLastError (); + return status; + } + + int + __gthr_win32_key_delete (__gthread_key_t key) + { + return (TlsFree (key) != 0) ? 0 : (int) GetLastError (); + } + + void * + __gthr_win32_getspecific (__gthread_key_t key) + { + DWORD lasterror; + void *ptr; + lasterror = GetLastError(); + ptr = TlsGetValue(key); + SetLastError( lasterror ); + return ptr; + } + + int + __gthr_win32_setspecific (__gthread_key_t key, const void *ptr) + { + return (TlsSetValue (key, (void*) ptr) != 0) ? 0 : (int) GetLastError (); + } + + void + __gthr_win32_mutex_init_function (__gthread_mutex_t *mutex) + { + /* Create unnamed mutex with default security attr and no initial owner. */ + *mutex = CreateMutex (NULL, 0, NULL); + } + + int + __gthr_win32_mutex_lock (__gthread_mutex_t *mutex) + { + if (WaitForSingleObject (*mutex, INFINITE) == WAIT_OBJECT_0) + return 0; + else + return 1; + } + + int + __gthr_win32_mutex_trylock (__gthread_mutex_t *mutex) + { + if (WaitForSingleObject (*mutex, 0) == WAIT_OBJECT_0) + return 0; + else + return 1; + } + + int + __gthr_win32_mutex_unlock (__gthread_mutex_t *mutex) + { + return (ReleaseMutex (*mutex) != 0) ? 0 : 1; + } diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386-aout.h gcc-3.3/gcc/config/i386/i386-aout.h *** gcc-3.2.3/gcc/config/i386/i386-aout.h 2001-05-20 19:54:04.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386-aout.h 2002-06-16 21:13:08.000000000 +0000 *************** *** 1,7 **** /* Definitions for "naked" Intel 386 using a.out (or coff encap'd a.out) object format and stabs debugging info. ! Copyright (C) 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Definitions for "naked" Intel 386 using a.out (or coff encap'd a.out) object format and stabs debugging info. ! Copyright (C) 1994, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 21,34 **** Boston, MA 02111-1307, USA. */ ! /* This is tested by gas.h. */ ! #define YES_UNDERSCORES ! ! #include "i386/gstabs.h" ! ! /* Specify predefined symbols in preprocessor. */ ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "" /* end of i386-aout.h */ --- 21,26 ---- Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, BSD a.out syntax)"); /* end of i386-aout.h */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386.c gcc-3.3/gcc/config/i386/i386.c *** gcc-3.2.3/gcc/config/i386/i386.c 2003-03-12 09:04:01.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386.c 2003-04-02 22:01:58.000000000 +0000 *************** *** 1,6 **** /* Subroutines used for code generation on IA-32. Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ! 2002 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Subroutines used for code generation on IA-32. Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ! 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 42,54 **** #include "ggc.h" #include "target.h" #include "target-def.h" #ifndef CHECK_STACK_LIMIT #define CHECK_STACK_LIMIT (-1) #endif /* Processor costs (relative to an add) */ ! static const struct processor_costs size_cost = { /* costs for tunning for size */ 2, /* cost of an add instruction */ 3, /* cost of a lea instruction */ --- 42,55 ---- #include "ggc.h" #include "target.h" #include "target-def.h" + #include "langhooks.h" #ifndef CHECK_STACK_LIMIT #define CHECK_STACK_LIMIT (-1) #endif /* Processor costs (relative to an add) */ ! static const struct processor_costs size_cost = { /* costs for tunning for size */ 2, /* cost of an add instruction */ 3, /* cost of a lea instruction */ *************** struct processor_costs size_cost = { /* *** 83,91 **** 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ }; /* Processor costs (relative to an add) */ ! static const struct processor_costs i386_cost = { /* 386 specific costs */ 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ --- 84,99 ---- 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ + 2, /* cost of FADD and FSUB insns. */ + 2, /* cost of FMUL instruction. */ + 2, /* cost of FDIV instruction. */ + 2, /* cost of FABS instruction. */ + 2, /* cost of FCHS instruction. */ + 2, /* cost of FSQRT instruction. */ }; + /* Processor costs (relative to an add) */ ! static const struct processor_costs i386_cost = { /* 386 specific costs */ 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ *************** struct processor_costs i386_cost = { /* *** 120,128 **** 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ }; ! static const struct processor_costs i486_cost = { /* 486 specific costs */ 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ --- 128,142 ---- 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ + 23, /* cost of FADD and FSUB insns. */ + 27, /* cost of FMUL instruction. */ + 88, /* cost of FDIV instruction. */ + 22, /* cost of FABS instruction. */ + 24, /* cost of FCHS instruction. */ + 122, /* cost of FSQRT instruction. */ }; ! static const struct processor_costs i486_cost = { /* 486 specific costs */ 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ *************** struct processor_costs i486_cost = { /* *** 157,165 **** 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ }; ! static const struct processor_costs pentium_cost = { 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ --- 171,185 ---- 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ + 8, /* cost of FADD and FSUB insns. */ + 16, /* cost of FMUL instruction. */ + 73, /* cost of FDIV instruction. */ + 3, /* cost of FABS instruction. */ + 3, /* cost of FCHS instruction. */ + 83, /* cost of FSQRT instruction. */ }; ! static const struct processor_costs pentium_cost = { 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ *************** struct processor_costs pentium_cost = { *** 194,202 **** 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ }; ! static const struct processor_costs pentiumpro_cost = { 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ --- 214,228 ---- 3, /* MMX or SSE register to integer */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ + 3, /* cost of FADD and FSUB insns. */ + 3, /* cost of FMUL instruction. */ + 39, /* cost of FDIV instruction. */ + 1, /* cost of FABS instruction. */ + 1, /* cost of FCHS instruction. */ + 70, /* cost of FSQRT instruction. */ }; ! static const struct processor_costs pentiumpro_cost = { 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ *************** struct processor_costs pentiumpro_cost = *** 231,239 **** 3, /* MMX or SSE register to integer */ 32, /* size of prefetch block */ 6, /* number of parallel prefetches */ }; ! static const struct processor_costs k6_cost = { 1, /* cost of an add instruction */ 2, /* cost of a lea instruction */ --- 257,271 ---- 3, /* MMX or SSE register to integer */ 32, /* size of prefetch block */ 6, /* number of parallel prefetches */ + 3, /* cost of FADD and FSUB insns. */ + 5, /* cost of FMUL instruction. */ + 56, /* cost of FDIV instruction. */ + 2, /* cost of FABS instruction. */ + 2, /* cost of FCHS instruction. */ + 56, /* cost of FSQRT instruction. */ }; ! static const struct processor_costs k6_cost = { 1, /* cost of an add instruction */ 2, /* cost of a lea instruction */ *************** struct processor_costs k6_cost = { *** 268,276 **** 6, /* MMX or SSE register to integer */ 32, /* size of prefetch block */ 1, /* number of parallel prefetches */ }; ! static const struct processor_costs athlon_cost = { 1, /* cost of an add instruction */ 2, /* cost of a lea instruction */ --- 300,314 ---- 6, /* MMX or SSE register to integer */ 32, /* size of prefetch block */ 1, /* number of parallel prefetches */ + 2, /* cost of FADD and FSUB insns. */ + 2, /* cost of FMUL instruction. */ + 56, /* cost of FDIV instruction. */ + 2, /* cost of FABS instruction. */ + 2, /* cost of FCHS instruction. */ + 56, /* cost of FSQRT instruction. */ }; ! static const struct processor_costs athlon_cost = { 1, /* cost of an add instruction */ 2, /* cost of a lea instruction */ *************** struct processor_costs athlon_cost = { *** 305,313 **** 5, /* MMX or SSE register to integer */ 64, /* size of prefetch block */ 6, /* number of parallel prefetches */ }; ! static const struct processor_costs pentium4_cost = { 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ --- 343,357 ---- 5, /* MMX or SSE register to integer */ 64, /* size of prefetch block */ 6, /* number of parallel prefetches */ + 4, /* cost of FADD and FSUB insns. */ + 4, /* cost of FMUL instruction. */ + 24, /* cost of FDIV instruction. */ + 2, /* cost of FABS instruction. */ + 2, /* cost of FCHS instruction. */ + 35, /* cost of FSQRT instruction. */ }; ! static const struct processor_costs pentium4_cost = { 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ *************** struct processor_costs pentium4_cost = { *** 342,347 **** --- 386,397 ---- 10, /* MMX or SSE register to integer */ 64, /* size of prefetch block */ 6, /* number of parallel prefetches */ + 5, /* cost of FADD and FSUB insns. */ + 7, /* cost of FMUL instruction. */ + 43, /* cost of FDIV instruction. */ + 2, /* cost of FABS instruction. */ + 2, /* cost of FCHS instruction. */ + 43, /* cost of FSQRT instruction. */ }; const struct processor_costs *ix86_cost = &pentium_cost; *************** const int x86_use_cltd = ~(m_PENT | m_K6 *** 375,381 **** const int x86_read_modify_write = ~m_PENT; const int x86_read_modify = ~(m_PENT | m_PPRO); const int x86_split_long_moves = m_PPRO; ! const int x86_promote_QImode = m_K6 | m_PENT | m_386 | m_486; const int x86_single_stringop = m_386 | m_PENT4; const int x86_qimode_math = ~(0); const int x86_promote_qi_regs = 0; --- 425,432 ---- const int x86_read_modify_write = ~m_PENT; const int x86_read_modify = ~(m_PENT | m_PPRO); const int x86_split_long_moves = m_PPRO; ! const int x86_promote_QImode = m_K6 | m_PENT | m_386 | m_486 | m_ATHLON; ! const int x86_fast_prefix = ~(m_PENT | m_486 | m_386); const int x86_single_stringop = m_386 | m_PENT4; const int x86_qimode_math = ~(0); const int x86_promote_qi_regs = 0; *************** const int x86_sub_esp_4 = m_ATHLON | m_P *** 385,412 **** const int x86_sub_esp_8 = m_ATHLON | m_PPRO | m_386 | m_486 | m_PENT4; const int x86_add_esp_4 = m_ATHLON | m_K6 | m_PENT4; const int x86_add_esp_8 = m_ATHLON | m_PPRO | m_K6 | m_386 | m_486 | m_PENT4; ! const int x86_integer_DFmode_moves = ~(m_ATHLON | m_PENT4); const int x86_partial_reg_dependency = m_ATHLON | m_PENT4; const int x86_memory_mismatch_stall = m_ATHLON | m_PENT4; const int x86_accumulate_outgoing_args = m_ATHLON | m_PENT4 | m_PPRO; const int x86_prologue_using_move = m_ATHLON | m_PENT4 | m_PPRO; const int x86_epilogue_using_move = m_ATHLON | m_PENT4 | m_PPRO; const int x86_decompose_lea = m_PENT4; ! const int x86_arch_always_fancy_math_387 = m_PENT|m_PPRO|m_ATHLON|m_PENT4; /* In case the avreage insn count for single function invocation is lower than this constant, emit fast (but longer) prologue and epilogue code. */ #define FAST_PROLOGUE_INSN_COUNT 30 /* Set by prologue expander and used by epilogue expander to determine the style used. */ static int use_fast_prologue_epilogue; ! #define AT_BP(MODE) (gen_rtx_MEM ((MODE), hard_frame_pointer_rtx)) ! ! static const char *const hi_reg_name[] = HI_REGISTER_NAMES; /* names for 16 bit regs */ ! static const char *const qi_reg_name[] = QI_REGISTER_NAMES; /* names for 8 bit regs (low) */ ! static const char *const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES; /* names for 8 bit regs (high) */ /* Array of the smallest class containing reg number REGNO, indexed by REGNO. Used by REGNO_REG_CLASS in i386.h. */ --- 436,464 ---- const int x86_sub_esp_8 = m_ATHLON | m_PPRO | m_386 | m_486 | m_PENT4; const int x86_add_esp_4 = m_ATHLON | m_K6 | m_PENT4; const int x86_add_esp_8 = m_ATHLON | m_PPRO | m_K6 | m_386 | m_486 | m_PENT4; ! const int x86_integer_DFmode_moves = ~(m_ATHLON | m_PENT4 | m_PPRO); const int x86_partial_reg_dependency = m_ATHLON | m_PENT4; const int x86_memory_mismatch_stall = m_ATHLON | m_PENT4; const int x86_accumulate_outgoing_args = m_ATHLON | m_PENT4 | m_PPRO; const int x86_prologue_using_move = m_ATHLON | m_PENT4 | m_PPRO; const int x86_epilogue_using_move = m_ATHLON | m_PENT4 | m_PPRO; const int x86_decompose_lea = m_PENT4; ! const int x86_shift1 = ~m_486; ! const int x86_arch_always_fancy_math_387 = m_PENT | m_PPRO | m_ATHLON | m_PENT4; /* In case the avreage insn count for single function invocation is lower than this constant, emit fast (but longer) prologue and epilogue code. */ #define FAST_PROLOGUE_INSN_COUNT 30 + /* Set by prologue expander and used by epilogue expander to determine the style used. */ static int use_fast_prologue_epilogue; ! /* Names for 8 (low), 8 (high), and 16-bit registers, respectively. */ ! static const char *const qi_reg_name[] = QI_REGISTER_NAMES; ! static const char *const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES; ! static const char *const hi_reg_name[] = HI_REGISTER_NAMES; /* Array of the smallest class containing reg number REGNO, indexed by REGNO. Used by REGNO_REG_CLASS in i386.h. */ *************** int const dbx_register_map[FIRST_PSEUDO_ *** 447,457 **** -1, -1, -1, -1, -1, -1, -1, -1, /* extended SSE registers */ }; ! static int const x86_64_int_parameter_registers[6] = {5 /*RDI*/, 4 /*RSI*/, ! 1 /*RDX*/, 2 /*RCX*/, ! FIRST_REX_INT_REG /*R8 */, ! FIRST_REX_INT_REG + 1 /*R9 */}; ! static int const x86_64_int_return_registers[4] = {0 /*RAX*/, 1 /*RDI*/, 5, 4}; /* The "default" register map used in 64bit mode. */ int const dbx64_register_map[FIRST_PSEUDO_REGISTER] = --- 499,514 ---- -1, -1, -1, -1, -1, -1, -1, -1, /* extended SSE registers */ }; ! static int const x86_64_int_parameter_registers[6] = ! { ! 5 /*RDI*/, 4 /*RSI*/, 1 /*RDX*/, 2 /*RCX*/, ! FIRST_REX_INT_REG /*R8 */, FIRST_REX_INT_REG + 1 /*R9 */ ! }; ! ! static int const x86_64_int_return_registers[4] = ! { ! 0 /*RAX*/, 1 /*RDI*/, 5 /*RDI*/, 4 /*RSI*/ ! }; /* The "default" register map used in 64bit mode. */ int const dbx64_register_map[FIRST_PSEUDO_REGISTER] = *************** int const svr4_dbx_register_map[FIRST_PS *** 536,549 **** rtx ix86_compare_op0 = NULL_RTX; rtx ix86_compare_op1 = NULL_RTX; #define MAX_386_STACK_LOCALS 3 /* Size of the register save area. */ #define X86_64_VARARGS_SIZE (REGPARM_MAX * UNITS_PER_WORD + SSE_REGPARM_MAX * 16) /* Define the structure for the machine field in struct function. */ ! struct machine_function { rtx stack_locals[(int) MAX_MACHINE_MODE][MAX_386_STACK_LOCALS]; int save_varrargs_registers; int accesses_prev_frame; }; --- 593,611 ---- rtx ix86_compare_op0 = NULL_RTX; rtx ix86_compare_op1 = NULL_RTX; + /* The encoding characters for the four TLS models present in ELF. */ + + static char const tls_model_chars[] = " GLil"; + #define MAX_386_STACK_LOCALS 3 /* Size of the register save area. */ #define X86_64_VARARGS_SIZE (REGPARM_MAX * UNITS_PER_WORD + SSE_REGPARM_MAX * 16) /* Define the structure for the machine field in struct function. */ ! struct machine_function GTY(()) { rtx stack_locals[(int) MAX_MACHINE_MODE][MAX_386_STACK_LOCALS]; + const char *some_ld_name; int save_varrargs_registers; int accesses_prev_frame; }; *************** enum cmodel ix86_cmodel; *** 596,610 **** /* Asm dialect. */ const char *ix86_asm_string; enum asm_dialect ix86_asm_dialect = ASM_ATT; ! /* which cpu are we scheduling for */ ! enum processor_type ix86_cpu; ! ! /* which unit we are generating floating point math for */ enum fpmath_unit ix86_fpmath; ! /* which instruction set architecture to use. */ ! int ix86_arch; /* Strings to hold which cpu and instruction set architecture to use. */ const char *ix86_cpu_string; /* for -mcpu= */ --- 658,674 ---- /* Asm dialect. */ const char *ix86_asm_string; enum asm_dialect ix86_asm_dialect = ASM_ATT; + /* TLS dialext. */ + const char *ix86_tls_dialect_string; + enum tls_dialect ix86_tls_dialect = TLS_DIALECT_GNU; ! /* Which unit we are generating floating point math for. */ enum fpmath_unit ix86_fpmath; ! /* Which cpu are we scheduling for. */ ! enum processor_type ix86_cpu; ! /* Which instruction set architecture to use. */ ! enum processor_type ix86_arch; /* Strings to hold which cpu and instruction set architecture to use. */ const char *ix86_cpu_string; /* for -mcpu= */ *************** static char internal_label_prefix[16]; *** 646,680 **** static int internal_label_prefix_len; static int local_symbolic_operand PARAMS ((rtx, enum machine_mode)); static void output_pic_addr_const PARAMS ((FILE *, rtx, int)); static void put_condition_code PARAMS ((enum rtx_code, enum machine_mode, int, int, FILE *)); static rtx ix86_expand_int_compare PARAMS ((enum rtx_code, rtx, rtx)); static enum rtx_code ix86_prepare_fp_compare_args PARAMS ((enum rtx_code, rtx *, rtx *)); static rtx gen_push PARAMS ((rtx)); static int memory_address_length PARAMS ((rtx addr)); static int ix86_flags_dependant PARAMS ((rtx, rtx, enum attr_type)); static int ix86_agi_dependant PARAMS ((rtx, rtx, enum attr_type)); - static int ix86_safe_length PARAMS ((rtx)); - static enum attr_memory ix86_safe_memory PARAMS ((rtx)); - static enum attr_pent_pair ix86_safe_pent_pair PARAMS ((rtx)); static enum attr_ppro_uops ix86_safe_ppro_uops PARAMS ((rtx)); static void ix86_dump_ppro_packet PARAMS ((FILE *)); static void ix86_reorder_insn PARAMS ((rtx *, rtx *)); ! static rtx * ix86_pent_find_pair PARAMS ((rtx *, rtx *, enum attr_pent_pair, ! rtx)); ! static void ix86_init_machine_status PARAMS ((struct function *)); ! static void ix86_mark_machine_status PARAMS ((struct function *)); ! static void ix86_free_machine_status PARAMS ((struct function *)); static int ix86_split_to_parts PARAMS ((rtx, rtx *, enum machine_mode)); - static int ix86_safe_length_prefix PARAMS ((rtx)); static int ix86_nsaved_regs PARAMS ((void)); static void ix86_emit_save_regs PARAMS ((void)); static void ix86_emit_save_regs_using_mov PARAMS ((rtx, HOST_WIDE_INT)); static void ix86_emit_restore_regs_using_mov PARAMS ((rtx, int, int)); static void ix86_set_move_mem_attrs_1 PARAMS ((rtx, rtx, rtx, rtx, rtx)); - static void ix86_sched_reorder_pentium PARAMS ((rtx *, rtx *)); static void ix86_sched_reorder_ppro PARAMS ((rtx *, rtx *)); static HOST_WIDE_INT ix86_GOT_alias_set PARAMS ((void)); static void ix86_adjust_counter PARAMS ((rtx, HOST_WIDE_INT)); --- 710,742 ---- static int internal_label_prefix_len; static int local_symbolic_operand PARAMS ((rtx, enum machine_mode)); + static int tls_symbolic_operand_1 PARAMS ((rtx, enum tls_model)); static void output_pic_addr_const PARAMS ((FILE *, rtx, int)); static void put_condition_code PARAMS ((enum rtx_code, enum machine_mode, int, int, FILE *)); + static const char *get_some_local_dynamic_name PARAMS ((void)); + static int get_some_local_dynamic_name_1 PARAMS ((rtx *, void *)); + static rtx maybe_get_pool_constant PARAMS ((rtx)); static rtx ix86_expand_int_compare PARAMS ((enum rtx_code, rtx, rtx)); static enum rtx_code ix86_prepare_fp_compare_args PARAMS ((enum rtx_code, rtx *, rtx *)); + static rtx get_thread_pointer PARAMS ((void)); + static void get_pc_thunk_name PARAMS ((char [32], unsigned int)); static rtx gen_push PARAMS ((rtx)); static int memory_address_length PARAMS ((rtx addr)); static int ix86_flags_dependant PARAMS ((rtx, rtx, enum attr_type)); static int ix86_agi_dependant PARAMS ((rtx, rtx, enum attr_type)); static enum attr_ppro_uops ix86_safe_ppro_uops PARAMS ((rtx)); static void ix86_dump_ppro_packet PARAMS ((FILE *)); static void ix86_reorder_insn PARAMS ((rtx *, rtx *)); ! static struct machine_function * ix86_init_machine_status PARAMS ((void)); static int ix86_split_to_parts PARAMS ((rtx, rtx *, enum machine_mode)); static int ix86_nsaved_regs PARAMS ((void)); static void ix86_emit_save_regs PARAMS ((void)); static void ix86_emit_save_regs_using_mov PARAMS ((rtx, HOST_WIDE_INT)); static void ix86_emit_restore_regs_using_mov PARAMS ((rtx, int, int)); + static void ix86_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void ix86_set_move_mem_attrs_1 PARAMS ((rtx, rtx, rtx, rtx, rtx)); static void ix86_sched_reorder_ppro PARAMS ((rtx *, rtx *)); static HOST_WIDE_INT ix86_GOT_alias_set PARAMS ((void)); static void ix86_adjust_counter PARAMS ((rtx, HOST_WIDE_INT)); *************** static int ix86_adjust_cost PARAMS ((rtx *** 685,691 **** --- 747,760 ---- static void ix86_sched_init PARAMS ((FILE *, int, int)); static int ix86_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int)); static int ix86_variable_issue PARAMS ((FILE *, int, rtx, int)); + static int ia32_use_dfa_pipeline_interface PARAMS ((void)); + static int ia32_multipass_dfa_lookahead PARAMS ((void)); static void ix86_init_mmx_sse_builtins PARAMS ((void)); + static rtx x86_this_parameter PARAMS ((tree)); + static void x86_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); + static bool x86_can_output_mi_thunk PARAMS ((tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); struct ix86_address { *************** struct ix86_address *** 694,699 **** --- 763,773 ---- }; static int ix86_decompose_address PARAMS ((rtx, struct ix86_address *)); + static bool ix86_cannot_force_const_mem PARAMS ((rtx)); + + static void ix86_encode_section_info PARAMS ((tree, int)) ATTRIBUTE_UNUSED; + static const char *ix86_strip_name_encoding PARAMS ((const char *)) + ATTRIBUTE_UNUSED; struct builtin_description; static rtx ix86_expand_sse_comi PARAMS ((const struct builtin_description *, *************** static rtx ix86_expand_sse_compare PARAM *** 703,710 **** static rtx ix86_expand_unop1_builtin PARAMS ((enum insn_code, tree, rtx)); static rtx ix86_expand_unop_builtin PARAMS ((enum insn_code, tree, rtx, int)); static rtx ix86_expand_binop_builtin PARAMS ((enum insn_code, tree, rtx)); - static rtx ix86_expand_timode_binop_builtin PARAMS ((enum insn_code, - tree, rtx)); static rtx ix86_expand_store_builtin PARAMS ((enum insn_code, tree)); static rtx safe_vector_operand PARAMS ((rtx, enum machine_mode)); static enum rtx_code ix86_fp_compare_code_to_integer PARAMS ((enum rtx_code)); --- 777,782 ---- *************** static int ix86_fp_comparison_arithmetic *** 718,731 **** static int ix86_fp_comparison_fcomi_cost PARAMS ((enum rtx_code code)); static int ix86_fp_comparison_sahf_cost PARAMS ((enum rtx_code code)); static int ix86_fp_comparison_cost PARAMS ((enum rtx_code code)); ! static int ix86_save_reg PARAMS ((int, int)); static void ix86_compute_frame_layout PARAMS ((struct ix86_frame *)); static int ix86_comp_type_attributes PARAMS ((tree, tree)); const struct attribute_spec ix86_attribute_table[]; static tree ix86_handle_cdecl_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree ix86_handle_regparm_attribute PARAMS ((tree *, tree, tree, int, bool *)); ! #ifdef DO_GLOBAL_CTORS_BODY static void ix86_svr3_asm_out_constructor PARAMS ((rtx, int)); #endif --- 790,807 ---- static int ix86_fp_comparison_fcomi_cost PARAMS ((enum rtx_code code)); static int ix86_fp_comparison_sahf_cost PARAMS ((enum rtx_code code)); static int ix86_fp_comparison_cost PARAMS ((enum rtx_code code)); ! static unsigned int ix86_select_alt_pic_regnum PARAMS ((void)); ! static int ix86_save_reg PARAMS ((unsigned int, int)); static void ix86_compute_frame_layout PARAMS ((struct ix86_frame *)); static int ix86_comp_type_attributes PARAMS ((tree, tree)); + static int ix86_fntype_regparm PARAMS ((tree)); const struct attribute_spec ix86_attribute_table[]; static tree ix86_handle_cdecl_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree ix86_handle_regparm_attribute PARAMS ((tree *, tree, tree, int, bool *)); + static int ix86_value_regno PARAMS ((enum machine_mode)); + static bool contains_128bit_aligned_vector_p PARAMS ((tree)); ! #if defined (DO_GLOBAL_CTORS_BODY) && defined (HAS_INIT_SECTION) static void ix86_svr3_asm_out_constructor PARAMS ((rtx, int)); #endif *************** static enum x86_64_reg_class merge_class *** 781,792 **** #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN ix86_expand_builtin ! #if defined (OSF_OS) || defined (TARGET_OSF1ELF) ! static void ix86_osf_output_function_prologue PARAMS ((FILE *, ! HOST_WIDE_INT)); ! # undef TARGET_ASM_FUNCTION_PROLOGUE ! # define TARGET_ASM_FUNCTION_PROLOGUE ix86_osf_output_function_prologue ! #endif #undef TARGET_ASM_OPEN_PAREN #define TARGET_ASM_OPEN_PAREN "" --- 857,864 ---- #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN ix86_expand_builtin ! #undef TARGET_ASM_FUNCTION_EPILOGUE ! #define TARGET_ASM_FUNCTION_EPILOGUE ix86_output_function_epilogue #undef TARGET_ASM_OPEN_PAREN #define TARGET_ASM_OPEN_PAREN "" *************** static enum x86_64_reg_class merge_class *** 819,824 **** --- 891,914 ---- #define TARGET_SCHED_INIT ix86_sched_init #undef TARGET_SCHED_REORDER #define TARGET_SCHED_REORDER ix86_sched_reorder + #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE + #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \ + ia32_use_dfa_pipeline_interface + #undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD + #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \ + ia32_multipass_dfa_lookahead + + #ifdef HAVE_AS_TLS + #undef TARGET_HAVE_TLS + #define TARGET_HAVE_TLS true + #endif + #undef TARGET_CANNOT_FORCE_CONST_MEM + #define TARGET_CANNOT_FORCE_CONST_MEM ix86_cannot_force_const_mem + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK x86_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK x86_can_output_mi_thunk struct gcc_target targetm = TARGET_INITIALIZER; *************** override_options () *** 889,894 **** --- 979,987 ---- {"i586", PROCESSOR_PENTIUM, 0}, {"pentium", PROCESSOR_PENTIUM, 0}, {"pentium-mmx", PROCESSOR_PENTIUM, PTA_MMX}, + {"winchip-c6", PROCESSOR_I486, PTA_MMX}, + {"winchip2", PROCESSOR_I486, PTA_MMX | PTA_3DNOW}, + {"c3", PROCESSOR_I486, PTA_MMX | PTA_3DNOW}, {"i686", PROCESSOR_PENTIUMPRO, 0}, {"pentiumpro", PROCESSOR_PENTIUMPRO, 0}, {"pentium2", PROCESSOR_PENTIUMPRO, PTA_MMX}, *************** override_options () *** 910,916 **** | PTA_3DNOW_A | PTA_SSE}, }; ! int const pta_size = sizeof (processor_alias_table) / sizeof (struct pta); /* Set the default values for switches whose default depends on TARGET_64BIT in case they weren't overwriten by command line options. */ --- 1003,1014 ---- | PTA_3DNOW_A | PTA_SSE}, }; ! int const pta_size = ARRAY_SIZE (processor_alias_table); ! ! /* By default our XFmode is the 80-bit extended format. If we have ! use TFmode instead, it's also the 80-bit format, but with padding. */ ! real_format_for_mode[XFmode - QFmode] = &ieee_extended_intel_96_format; ! real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format; /* Set the default values for switches whose default depends on TARGET_64BIT in case they weren't overwriten by command line options. */ *************** override_options () *** 992,1010 **** /* Default cpu tuning to the architecture. */ ix86_cpu = ix86_arch; if (processor_alias_table[i].flags & PTA_MMX ! && !(target_flags & MASK_MMX_SET)) target_flags |= MASK_MMX; if (processor_alias_table[i].flags & PTA_3DNOW ! && !(target_flags & MASK_3DNOW_SET)) target_flags |= MASK_3DNOW; if (processor_alias_table[i].flags & PTA_3DNOW_A ! && !(target_flags & MASK_3DNOW_A_SET)) target_flags |= MASK_3DNOW_A; if (processor_alias_table[i].flags & PTA_SSE ! && !(target_flags & MASK_SSE_SET)) target_flags |= MASK_SSE; if (processor_alias_table[i].flags & PTA_SSE2 ! && !(target_flags & MASK_SSE2_SET)) target_flags |= MASK_SSE2; if (processor_alias_table[i].flags & PTA_PREFETCH_SSE) x86_prefetch_sse = true; --- 1090,1108 ---- /* Default cpu tuning to the architecture. */ ix86_cpu = ix86_arch; if (processor_alias_table[i].flags & PTA_MMX ! && !(target_flags_explicit & MASK_MMX)) target_flags |= MASK_MMX; if (processor_alias_table[i].flags & PTA_3DNOW ! && !(target_flags_explicit & MASK_3DNOW)) target_flags |= MASK_3DNOW; if (processor_alias_table[i].flags & PTA_3DNOW_A ! && !(target_flags_explicit & MASK_3DNOW_A)) target_flags |= MASK_3DNOW_A; if (processor_alias_table[i].flags & PTA_SSE ! && !(target_flags_explicit & MASK_SSE)) target_flags |= MASK_SSE; if (processor_alias_table[i].flags & PTA_SSE2 ! && !(target_flags_explicit & MASK_SSE2)) target_flags |= MASK_SSE2; if (processor_alias_table[i].flags & PTA_PREFETCH_SSE) x86_prefetch_sse = true; *************** override_options () *** 1034,1041 **** /* Arrange to set up i386_stack_locals for all functions. */ init_machine_status = ix86_init_machine_status; - mark_machine_status = ix86_mark_machine_status; - free_machine_status = ix86_free_machine_status; /* Validate -mregparm= value. */ if (ix86_regparm_string) --- 1132,1137 ---- *************** override_options () *** 1136,1141 **** --- 1232,1248 ---- ix86_branch_cost = i; } + if (ix86_tls_dialect_string) + { + if (strcmp (ix86_tls_dialect_string, "gnu") == 0) + ix86_tls_dialect = TLS_DIALECT_GNU; + else if (strcmp (ix86_tls_dialect_string, "sun") == 0) + ix86_tls_dialect = TLS_DIALECT_SUN; + else + error ("bad value (%s) for -mtls-dialect= switch", + ix86_tls_dialect_string); + } + /* Keep nonleaf frame pointers. */ if (TARGET_OMIT_LEAF_FRAME_POINTER) flag_omit_frame_pointer = 1; *************** override_options () *** 1193,1199 **** else ix86_fpmath = FPMATH_SSE | FPMATH_387; } ! else error ("bad value (%s) for -mfpmath= switch", ix86_fpmath_string); } --- 1300,1306 ---- else ix86_fpmath = FPMATH_SSE | FPMATH_387; } ! else error ("bad value (%s) for -mfpmath= switch", ix86_fpmath_string); } *************** override_options () *** 1215,1221 **** target_flags |= MASK_3DNOW_A; } if ((x86_accumulate_outgoing_args & CPUMASK) ! && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS_SET) && !optimize_size) target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS; --- 1322,1328 ---- target_flags |= MASK_3DNOW_A; } if ((x86_accumulate_outgoing_args & CPUMASK) ! && !(target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS) && !optimize_size) target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS; *************** optimization_options (level, size) *** 1240,1245 **** --- 1347,1353 ---- if (level > 1) flag_schedule_insns = 0; #endif + /* The default values of these switches depend on the TARGET_64BIT that is not known at this moment. Mark these values with 2 and let user the to override these. In case there is no command line option *************** ix86_handle_regparm_attribute (node, nam *** 1340,1444 **** return NULL_TREE; } - #if defined (OSF_OS) || defined (TARGET_OSF1ELF) - - /* Generate the assembly code for function entry. FILE is a stdio - stream to output the code to. SIZE is an int: how many units of - temporary storage to allocate. - - Refer to the array `regs_ever_live' to determine which registers to - save; `regs_ever_live[I]' is nonzero if register number I is ever - used in the function. This function is responsible for knowing - which registers should not be saved even if used. - - We override it here to allow for the new profiling code to go before - the prologue and the old mcount code to go after the prologue (and - after %ebx has been set up for ELF shared library support). */ - - static void - ix86_osf_output_function_prologue (file, size) - FILE *file; - HOST_WIDE_INT size; - { - const char *prefix = ""; - const char *const lprefix = LPREFIX; - int labelno = current_function_profile_label_no; - - #ifdef OSF_OS - - if (TARGET_UNDERSCORES) - prefix = "_"; - - if (current_function_profile && OSF_PROFILE_BEFORE_PROLOGUE) - { - if (!flag_pic && !HALF_PIC_P ()) - { - fprintf (file, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); - fprintf (file, "\tcall *%s_mcount_ptr\n", prefix); - } - - else if (HALF_PIC_P ()) - { - rtx symref; - - HALF_PIC_EXTERNAL ("_mcount_ptr"); - symref = HALF_PIC_PTR (gen_rtx_SYMBOL_REF (Pmode, - "_mcount_ptr")); - - fprintf (file, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); - fprintf (file, "\tmovl %s%s,%%eax\n", prefix, - XSTR (symref, 0)); - fprintf (file, "\tcall *(%%eax)\n"); - } - - else - { - static int call_no = 0; - - fprintf (file, "\tcall %sPc%d\n", lprefix, call_no); - fprintf (file, "%sPc%d:\tpopl %%eax\n", lprefix, call_no); - fprintf (file, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-%sPc%d],%%eax\n", - lprefix, call_no++); - fprintf (file, "\tleal %sP%d@GOTOFF(%%eax),%%edx\n", - lprefix, labelno); - fprintf (file, "\tmovl %s_mcount_ptr@GOT(%%eax),%%eax\n", - prefix); - fprintf (file, "\tcall *(%%eax)\n"); - } - } - - #else /* !OSF_OS */ - - if (current_function_profile && OSF_PROFILE_BEFORE_PROLOGUE) - { - if (!flag_pic) - { - fprintf (file, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); - fprintf (file, "\tcall *%s_mcount_ptr\n", prefix); - } - - else - { - static int call_no = 0; - - fprintf (file, "\tcall %sPc%d\n", lprefix, call_no); - fprintf (file, "%sPc%d:\tpopl %%eax\n", lprefix, call_no); - fprintf (file, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-%sPc%d],%%eax\n", - lprefix, call_no++); - fprintf (file, "\tleal %sP%d@GOTOFF(%%eax),%%edx\n", - lprefix, labelno); - fprintf (file, "\tmovl %s_mcount_ptr@GOT(%%eax),%%eax\n", - prefix); - fprintf (file, "\tcall *(%%eax)\n"); - } - } - #endif /* !OSF_OS */ - - function_prologue (file, size); - } - - #endif /* OSF_OS || TARGET_OSF1ELF */ - /* Return 0 if the attributes for two types are incompatible, 1 if they are compatible, and 2 if they are nearly compatible (which causes a warning to be generated). */ --- 1448,1453 ---- *************** ix86_comp_type_attributes (type1, type2) *** 1461,1466 **** --- 1470,1490 ---- return 1; } + /* Return the regparm value for a fuctio with the indicated TYPE. */ + + static int + ix86_fntype_regparm (type) + tree type; + { + tree attr; + + attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type)); + if (attr) + return TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr))); + else + return ix86_regparm; + } + /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. FUNDECL is the declaration node of the function (as a tree), *************** ix86_return_pops_args (fundecl, funtype, *** 1504,1518 **** if (aggregate_value_p (TREE_TYPE (funtype)) && !TARGET_64BIT) { ! int nregs = ix86_regparm; ! ! if (funtype) ! { ! tree attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (funtype)); ! ! if (attr) ! nregs = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr))); ! } if (!nregs) return GET_MODE_SIZE (Pmode); --- 1528,1534 ---- if (aggregate_value_p (TREE_TYPE (funtype)) && !TARGET_64BIT) { ! int nregs = ix86_fntype_regparm (funtype); if (!nregs) return GET_MODE_SIZE (Pmode); *************** classify_argument (mode, type, classes, *** 1679,1686 **** (mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode); int words = (bytes + (bit_offset % 64) / 8 + UNITS_PER_WORD - 1) / UNITS_PER_WORD; ! /* Variable sized structures are always passed on the stack. */ ! if (mode == BLKmode && type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) return 0; if (type && AGGREGATE_TYPE_P (type)) --- 1695,1702 ---- (mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode); int words = (bytes + (bit_offset % 64) / 8 + UNITS_PER_WORD - 1) / UNITS_PER_WORD; ! /* Variable sized entities are always passed/returned in memory. */ ! if (bytes < 0) return 0; if (type && AGGREGATE_TYPE_P (type)) *************** classify_argument (mode, type, classes, *** 1728,1734 **** return 0; for (i = 0; i < num; i++) { ! int pos = (offset + bit_offset) / 8 / 8; classes[i + pos] = merge_classes (subclasses[i], classes[i + pos]); } --- 1744,1750 ---- return 0; for (i = 0; i < num; i++) { ! int pos = (offset + (bit_offset % 64)) / 8 / 8; classes[i + pos] = merge_classes (subclasses[i], classes[i + pos]); } *************** classify_argument (mode, type, classes, *** 1765,1771 **** for (i = 0; i < num; i++) { int pos = ! (int_bit_position (field) + bit_offset) / 8 / 8; classes[i + pos] = merge_classes (subclasses[i], classes[i + pos]); } --- 1781,1787 ---- for (i = 0; i < num; i++) { int pos = ! (int_bit_position (field) + (bit_offset % 64)) / 8 / 8; classes[i + pos] = merge_classes (subclasses[i], classes[i + pos]); } *************** classify_argument (mode, type, classes, *** 1811,1822 **** num = classify_argument (TYPE_MODE (type), type, subclasses, ! (offset + bit_offset) % 256); if (!num) return 0; for (i = 0; i < num; i++) { ! int pos = (offset + bit_offset) / 8 / 8; classes[i + pos] = merge_classes (subclasses[i], classes[i + pos]); } --- 1827,1838 ---- num = classify_argument (TYPE_MODE (type), type, subclasses, ! (offset + (bit_offset % 64)) % 256); if (!num) return 0; for (i = 0; i < num; i++) { ! int pos = (offset + (bit_offset % 64)) / 8 / 8; classes[i + pos] = merge_classes (subclasses[i], classes[i + pos]); } *************** classify_argument (mode, type, classes, *** 1928,1933 **** --- 1944,1953 ---- return 1; case V4SFmode: case V4SImode: + case V16QImode: + case V8HImode: + case V2DFmode: + case V2DImode: classes[0] = X86_64_SSE_CLASS; classes[1] = X86_64_SSEUP_CLASS; return 2; *************** classify_argument (mode, type, classes, *** 1935,1942 **** case V2SImode: case V4HImode: case V8QImode: ! classes[0] = X86_64_SSE_CLASS; ! return 1; case BLKmode: case VOIDmode: return 0; --- 1955,1961 ---- case V2SImode: case V4HImode: case V8QImode: ! return 0; case BLKmode: case VOIDmode: return 0; *************** construct_container (mode, type, in_retu *** 2105,2117 **** break; case X86_64_SSE_CLASS: if (i < n - 1 && class[i + 1] == X86_64_SSEUP_CLASS) ! tmpmode = TImode, i++; else tmpmode = DImode; exp [nexps++] = gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (tmpmode, SSE_REGNO (sse_regno)), GEN_INT (i*8)); sse_regno++; break; default: --- 2124,2138 ---- break; case X86_64_SSE_CLASS: if (i < n - 1 && class[i + 1] == X86_64_SSEUP_CLASS) ! tmpmode = TImode; else tmpmode = DImode; exp [nexps++] = gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (tmpmode, SSE_REGNO (sse_regno)), GEN_INT (i*8)); + if (tmpmode == TImode) + i++; sse_regno++; break; default: *************** function_arg (cum, mode, type, named) *** 2257,2267 **** if (TARGET_DEBUG_ARG) { fprintf (stderr, ! "function_arg (size=%d, wds=%2d, nregs=%d, mode=%4s, named=%d", words, cum->words, cum->nregs, GET_MODE_NAME (mode), named); if (ret) ! fprintf (stderr, ", reg=%%e%s", reg_names[ REGNO (ret) ]); else fprintf (stderr, ", stack"); --- 2278,2288 ---- if (TARGET_DEBUG_ARG) { fprintf (stderr, ! "function_arg (size=%d, wds=%2d, nregs=%d, mode=%4s, named=%d, ", words, cum->words, cum->nregs, GET_MODE_NAME (mode), named); if (ret) ! print_simple_rtl (stderr, ret); else fprintf (stderr, ", stack"); *************** function_arg (cum, mode, type, named) *** 2271,2276 **** --- 2292,2381 ---- return ret; } + /* Return true when TYPE should be 128bit aligned for 32bit argument passing + ABI */ + static bool + contains_128bit_aligned_vector_p (type) + tree type; + { + enum machine_mode mode = TYPE_MODE (type); + if (SSE_REG_MODE_P (mode) + && (!TYPE_USER_ALIGN (type) || TYPE_ALIGN (type) > 128)) + return true; + if (TYPE_ALIGN (type) < 128) + return false; + + if (AGGREGATE_TYPE_P (type)) + { + /* Walk the agregates recursivly. */ + if (TREE_CODE (type) == RECORD_TYPE + || TREE_CODE (type) == UNION_TYPE + || TREE_CODE (type) == QUAL_UNION_TYPE) + { + tree field; + + if (TYPE_BINFO (type) != NULL + && TYPE_BINFO_BASETYPES (type) != NULL) + { + tree bases = TYPE_BINFO_BASETYPES (type); + int n_bases = TREE_VEC_LENGTH (bases); + int i; + + for (i = 0; i < n_bases; ++i) + { + tree binfo = TREE_VEC_ELT (bases, i); + tree type = BINFO_TYPE (binfo); + + if (contains_128bit_aligned_vector_p (type)) + return true; + } + } + /* And now merge the fields of structure. */ + for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field)) + { + if (TREE_CODE (field) == FIELD_DECL + && contains_128bit_aligned_vector_p (TREE_TYPE (field))) + return true; + } + } + /* Just for use if some languages passes arrays by value. */ + else if (TREE_CODE (type) == ARRAY_TYPE) + { + if (contains_128bit_aligned_vector_p (TREE_TYPE (type))) + return true; + } + else + abort (); + } + return false; + } + + /* A C expression that indicates when an argument must be passed by + reference. If nonzero for an argument, a copy of that argument is + made in memory and a pointer to the argument is passed instead of + the argument itself. The pointer is passed in whatever way is + appropriate for passing a pointer to that type. */ + + int + function_arg_pass_by_reference (cum, mode, type, named) + CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + tree type; + int named ATTRIBUTE_UNUSED; + { + if (!TARGET_64BIT) + return 0; + + if (type && int_size_in_bytes (type) == -1) + { + if (TARGET_DEBUG_ARG) + fprintf (stderr, "function_arg_pass_by_reference\n"); + return 1; + } + + return 0; + } + /* Gives the alignment boundary, in bits, of an argument with the specified mode and type. */ *************** ix86_function_arg_boundary (mode, type) *** 2280,2293 **** tree type; { int align; - if (!TARGET_64BIT) - return PARM_BOUNDARY; if (type) align = TYPE_ALIGN (type); else align = GET_MODE_ALIGNMENT (mode); if (align < PARM_BOUNDARY) align = PARM_BOUNDARY; if (align > 128) align = 128; return align; --- 2385,2418 ---- tree type; { int align; if (type) align = TYPE_ALIGN (type); else align = GET_MODE_ALIGNMENT (mode); if (align < PARM_BOUNDARY) align = PARM_BOUNDARY; + if (!TARGET_64BIT) + { + /* i386 ABI defines all arguments to be 4 byte aligned. We have to + make an exception for SSE modes since these require 128bit + alignment. + + The handling here differs from field_alignment. ICC aligns MMX + arguments to 4 byte boundaries, while structure fields are aligned + to 8 byte boundaries. */ + if (!type) + { + if (!SSE_REG_MODE_P (mode)) + align = PARM_BOUNDARY; + } + else + { + if (!contains_128bit_aligned_vector_p (type)) + align = PARM_BOUNDARY; + } + if (align != PARM_BOUNDARY && !TARGET_SSE) + abort(); + } if (align > 128) align = 128; return align; *************** ix86_function_value (valtype) *** 2329,2335 **** return ret; } else ! return gen_rtx_REG (TYPE_MODE (valtype), VALUE_REGNO (TYPE_MODE (valtype))); } /* Return false iff type is returned in memory. */ --- 2454,2461 ---- return ret; } else ! return gen_rtx_REG (TYPE_MODE (valtype), ! ix86_value_regno (TYPE_MODE (valtype))); } /* Return false iff type is returned in memory. */ *************** ix86_libcall_value (mode) *** 2379,2385 **** } } else ! return gen_rtx_REG (mode, VALUE_REGNO (mode)); } /* Create the va_list data type. */ --- 2505,2524 ---- } } else ! return gen_rtx_REG (mode, ix86_value_regno (mode)); ! } ! ! /* Given a mode, return the register to use for a return value. */ ! ! static int ! ix86_value_regno (mode) ! enum machine_mode mode; ! { ! if (GET_MODE_CLASS (mode) == MODE_FLOAT && TARGET_FLOAT_RETURNS_IN_80387) ! return FIRST_FLOAT_REG; ! if (mode == TImode || VECTOR_MODE_P (mode)) ! return FIRST_SSE_REG; ! return 0; } /* Create the va_list data type. */ *************** ix86_build_va_list () *** 2393,2404 **** if (!TARGET_64BIT) return build_pointer_type (char_type_node); ! record = make_lang_type (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); ! f_gpr = build_decl (FIELD_DECL, get_identifier ("gp_offset"), unsigned_type_node); ! f_fpr = build_decl (FIELD_DECL, get_identifier ("fp_offset"), unsigned_type_node); f_ovf = build_decl (FIELD_DECL, get_identifier ("overflow_arg_area"), ptr_type_node); --- 2532,2543 ---- if (!TARGET_64BIT) return build_pointer_type (char_type_node); ! record = (*lang_hooks.types.make_type) (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); ! f_gpr = build_decl (FIELD_DECL, get_identifier ("gp_offset"), unsigned_type_node); ! f_fpr = build_decl (FIELD_DECL, get_identifier ("fp_offset"), unsigned_type_node); f_ovf = build_decl (FIELD_DECL, get_identifier ("overflow_arg_area"), ptr_type_node); *************** ix86_build_va_list () *** 2424,2430 **** } /* Perform any needed actions needed for a function that is receiving a ! variable number of arguments. CUM is as above. --- 2563,2569 ---- } /* Perform any needed actions needed for a function that is receiving a ! variable number of arguments. CUM is as above. *************** ix86_setup_incoming_varargs (cum, mode, *** 2463,2468 **** --- 2602,2609 ---- /* Indicate to allocate space on the stack for varargs save area. */ ix86_save_varrargs_registers = 1; + cfun->stack_alignment_needed = 128; + fntype = TREE_TYPE (current_function_decl); stdarg_p = (TYPE_ARG_TYPES (fntype) != 0 && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) *************** ix86_setup_incoming_varargs (cum, mode, *** 2538,2545 **** /* Implement va_start. */ void ! ix86_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg; { --- 2679,2685 ---- /* Implement va_start. */ void ! ix86_va_start (valist, nextarg) tree valist; rtx nextarg; { *************** ix86_va_start (stdarg_p, valist, nextarg *** 2550,2556 **** /* Only 64bit target needs something special. */ if (!TARGET_64BIT) { ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); return; } --- 2690,2696 ---- /* Only 64bit target needs something special. */ if (!TARGET_64BIT) { ! std_expand_builtin_va_start (valist, nextarg); return; } *************** ix86_va_start (stdarg_p, valist, nextarg *** 2599,2605 **** t = build (MODIFY_EXPR, TREE_TYPE (sav), sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - cfun->preferred_stack_boundary = 128; } /* Implement va_arg. */ --- 2739,2744 ---- *************** rtx *** 2607,2619 **** ix86_va_arg (valist, type) tree valist, type; { ! static int intreg[6] = { 0, 1, 2, 3, 4, 5 }; tree f_gpr, f_fpr, f_ovf, f_sav; tree gpr, fpr, ovf, sav, t; int size, rsize; rtx lab_false, lab_over = NULL_RTX; rtx addr_rtx, r; rtx container; /* Only 64bit target needs something special. */ if (!TARGET_64BIT) --- 2746,2759 ---- ix86_va_arg (valist, type) tree valist, type; { ! static const int intreg[6] = { 0, 1, 2, 3, 4, 5 }; tree f_gpr, f_fpr, f_ovf, f_sav; tree gpr, fpr, ovf, sav, t; int size, rsize; rtx lab_false, lab_over = NULL_RTX; rtx addr_rtx, r; rtx container; + int indirect_p = 0; /* Only 64bit target needs something special. */ if (!TARGET_64BIT) *************** ix86_va_arg (valist, type) *** 2633,2638 **** --- 2773,2785 ---- sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav); size = int_size_in_bytes (type); + if (size == -1) + { + /* Passed by reference. */ + indirect_p = 1; + type = build_pointer_type (type); + size = int_size_in_bytes (type); + } rsize = (size + UNITS_PER_WORD - 1) / UNITS_PER_WORD; container = construct_container (TYPE_MODE (type), type, 0, *************** ix86_va_arg (valist, type) *** 2823,2831 **** --- 2970,3022 ---- if (container) emit_label (lab_over); + if (indirect_p) + { + r = gen_rtx_MEM (Pmode, addr_rtx); + set_mem_alias_set (r, get_varargs_alias_set ()); + emit_move_insn (addr_rtx, r); + } + return addr_rtx; } + /* Return nonzero if OP is either a i387 or SSE fp register. */ + int + any_fp_register_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return ANY_FP_REG_P (op); + } + + /* Return nonzero if OP is an i387 fp register. */ + int + fp_register_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return FP_REG_P (op); + } + + /* Return nonzero if OP is a non-fp register_operand. */ + int + register_and_not_any_fp_reg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return register_operand (op, mode) && !ANY_FP_REG_P (op); + } + + /* Return nonzero of OP is a register operand other than an + i387 fp register. */ + int + register_and_not_fp_reg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return register_operand (op, mode) && !FP_REG_P (op); + } + /* Return nonzero if OP is general operand representable on x86_64. */ int *************** symbolic_operand (op, mode) *** 2962,2970 **** if (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF || (GET_CODE (op) == UNSPEC ! && (XINT (op, 1) == 6 ! || XINT (op, 1) == 7 ! || XINT (op, 1) == 15))) return 1; if (GET_CODE (op) != PLUS || GET_CODE (XEXP (op, 1)) != CONST_INT) --- 3153,3161 ---- if (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF || (GET_CODE (op) == UNSPEC ! && (XINT (op, 1) == UNSPEC_GOT ! || XINT (op, 1) == UNSPEC_GOTOFF ! || XINT (op, 1) == UNSPEC_GOTPCREL))) return 1; if (GET_CODE (op) != PLUS || GET_CODE (XEXP (op, 1)) != CONST_INT) *************** symbolic_operand (op, mode) *** 2976,2982 **** return 1; /* Only @GOTOFF gets offsets. */ if (GET_CODE (op) != UNSPEC ! || XINT (op, 1) != 7) return 0; op = XVECEXP (op, 0, 0); --- 3167,3173 ---- return 1; /* Only @GOTOFF gets offsets. */ if (GET_CODE (op) != UNSPEC ! || XINT (op, 1) != UNSPEC_GOTOFF) return 0; op = XVECEXP (op, 0, 0); *************** pic_symbolic_operand (op, mode) *** 3005,3011 **** if (GET_CODE (XEXP (op, 0)) == UNSPEC) return 1; } ! else { if (GET_CODE (op) == UNSPEC) return 1; --- 3196,3202 ---- if (GET_CODE (XEXP (op, 0)) == UNSPEC) return 1; } ! else { if (GET_CODE (op) == UNSPEC) return 1; *************** local_symbolic_operand (op, mode) *** 3026,3039 **** rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; { - if (GET_CODE (op) == LABEL_REF) - return 1; - if (GET_CODE (op) == CONST && GET_CODE (XEXP (op, 0)) == PLUS && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) op = XEXP (XEXP (op, 0), 0); if (GET_CODE (op) != SYMBOL_REF) return 0; --- 3217,3230 ---- rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; { if (GET_CODE (op) == CONST && GET_CODE (XEXP (op, 0)) == PLUS && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) op = XEXP (XEXP (op, 0), 0); + if (GET_CODE (op) == LABEL_REF) + return 1; + if (GET_CODE (op) != SYMBOL_REF) return 0; *************** local_symbolic_operand (op, mode) *** 3043,3052 **** return 1; /* There is, however, a not insubstantial body of code in the rest of ! the compiler that assumes it can just stick the results of ASM_GENERATE_INTERNAL_LABEL in a symbol_ref and have done. */ /* ??? This is a hack. Should update the body of the compiler to ! always create a DECL an invoke ENCODE_SECTION_INFO. */ if (strncmp (XSTR (op, 0), internal_label_prefix, internal_label_prefix_len) == 0) return 1; --- 3234,3243 ---- return 1; /* There is, however, a not insubstantial body of code in the rest of ! the compiler that assumes it can just stick the results of ASM_GENERATE_INTERNAL_LABEL in a symbol_ref and have done. */ /* ??? This is a hack. Should update the body of the compiler to ! always create a DECL an invoke targetm.encode_section_info. */ if (strncmp (XSTR (op, 0), internal_label_prefix, internal_label_prefix_len) == 0) return 1; *************** local_symbolic_operand (op, mode) *** 3054,3059 **** --- 3245,3314 ---- return 0; } + /* Test for various thread-local symbols. See ix86_encode_section_info. */ + + int + tls_symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + const char *symbol_str; + + if (GET_CODE (op) != SYMBOL_REF) + return 0; + symbol_str = XSTR (op, 0); + + if (symbol_str[0] != '%') + return 0; + return strchr (tls_model_chars, symbol_str[1]) - tls_model_chars; + } + + static int + tls_symbolic_operand_1 (op, kind) + rtx op; + enum tls_model kind; + { + const char *symbol_str; + + if (GET_CODE (op) != SYMBOL_REF) + return 0; + symbol_str = XSTR (op, 0); + + return symbol_str[0] == '%' && symbol_str[1] == tls_model_chars[kind]; + } + + int + global_dynamic_symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return tls_symbolic_operand_1 (op, TLS_MODEL_GLOBAL_DYNAMIC); + } + + int + local_dynamic_symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return tls_symbolic_operand_1 (op, TLS_MODEL_LOCAL_DYNAMIC); + } + + int + initial_exec_symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return tls_symbolic_operand_1 (op, TLS_MODEL_INITIAL_EXEC); + } + + int + local_exec_symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return tls_symbolic_operand_1 (op, TLS_MODEL_LOCAL_EXEC); + } + /* Test for a valid operand for a call instruction. Don't allow the arg pointer register or virtual regs since they may decay into reg + const, which the patterns can't handle. */ *************** call_insn_operand (op, mode) *** 3081,3091 **** if (GET_CODE (op) == SYMBOL_REF) return 1; - /* Half-pic doesn't allow anything but registers and constants. - We've just taken care of the later. */ - if (HALF_PIC_P ()) - return register_operand (op, Pmode); - /* Otherwise we can allow any general_operand in the address. */ return general_operand (op, Pmode); } --- 3336,3341 ---- *************** nonmemory_no_elim_operand (op, mode) *** 3230,3235 **** --- 3480,3509 ---- return GET_CODE (op) == CONST_INT || register_operand (op, mode); } + /* Return false if this is any eliminable register or stack register, + otherwise work like register_operand. */ + + int + index_register_operand (op, mode) + register rtx op; + enum machine_mode mode; + { + rtx t = op; + if (GET_CODE (t) == SUBREG) + t = SUBREG_REG (t); + if (!REG_P (t)) + return 0; + if (t == arg_pointer_rtx + || t == frame_pointer_rtx + || t == virtual_incoming_args_rtx + || t == virtual_stack_vars_rtx + || t == virtual_stack_dynamic_rtx + || REGNO (t) == STACK_POINTER_REGNUM) + return 0; + + return general_operand (op, mode); + } + /* Return true if op is a Q_REGS class register. */ int *************** non_q_regs_operand (op, mode) *** 3258,3263 **** --- 3532,3550 ---- return NON_QI_REG_P (op); } + /* Return 1 when OP is operand acceptable for standard SSE move. */ + int + vector_move_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (nonimmediate_operand (op, mode)) + return 1; + if (GET_MODE (op) != mode && mode != VOIDmode) + return 0; + return (op == CONST0_RTX (GET_MODE (op))); + } + /* Return 1 if OP is a comparison that can be used in the CMPSS/CMPPS insns. */ int *************** aligned_operand (op, mode) *** 3569,3574 **** --- 3856,3866 ---- if (! ix86_decompose_address (op, &parts)) abort (); + if (parts.base && GET_CODE (parts.base) == SUBREG) + parts.base = SUBREG_REG (parts.base); + if (parts.index && GET_CODE (parts.index) == SUBREG) + parts.index = SUBREG_REG (parts.index); + /* Look for some component that isn't known to be aligned. */ if (parts.index) { *************** int *** 3618,3625 **** standard_sse_constant_p (x) rtx x; { ! if (GET_CODE (x) != CONST_DOUBLE) ! return -1; return (x == CONST0_RTX (GET_MODE (x))); } --- 3910,3917 ---- standard_sse_constant_p (x) rtx x; { ! if (x == const0_rtx) ! return 1; return (x == CONST0_RTX (GET_MODE (x))); } *************** x86_64_sign_extended_value (value) *** 3709,3730 **** } break; ! /* For certain code models, the symbolic references are known to fit. */ case SYMBOL_REF: ! return ix86_cmodel == CM_SMALL || ix86_cmodel == CM_KERNEL; /* For certain code models, the code is near as well. */ case LABEL_REF: ! return ix86_cmodel != CM_LARGE && ix86_cmodel != CM_SMALL_PIC; /* We also may accept the offsetted memory references in certain special cases. */ case CONST: ! if (GET_CODE (XEXP (value, 0)) == UNSPEC ! && XVECLEN (XEXP (value, 0), 0) == 1 ! && XINT (XEXP (value, 0), 1) == 15) ! return 1; ! else if (GET_CODE (XEXP (value, 0)) == PLUS) { rtx op1 = XEXP (XEXP (value, 0), 0); rtx op2 = XEXP (XEXP (value, 0), 1); --- 4001,4033 ---- } break; ! /* For certain code models, the symbolic references are known to fit. ! in CM_SMALL_PIC model we know it fits if it is local to the shared ! library. Don't count TLS SYMBOL_REFs here, since they should fit ! only if inside of UNSPEC handled below. */ case SYMBOL_REF: ! return (ix86_cmodel == CM_SMALL || ix86_cmodel == CM_KERNEL); /* For certain code models, the code is near as well. */ case LABEL_REF: ! return (ix86_cmodel == CM_SMALL || ix86_cmodel == CM_MEDIUM ! || ix86_cmodel == CM_KERNEL); /* We also may accept the offsetted memory references in certain special cases. */ case CONST: ! if (GET_CODE (XEXP (value, 0)) == UNSPEC) ! switch (XINT (XEXP (value, 0), 1)) ! { ! case UNSPEC_GOTPCREL: ! case UNSPEC_DTPOFF: ! case UNSPEC_GOTNTPOFF: ! case UNSPEC_NTPOFF: ! return 1; ! default: ! break; ! } ! if (GET_CODE (XEXP (value, 0)) == PLUS) { rtx op1 = XEXP (XEXP (value, 0), 0); rtx op2 = XEXP (XEXP (value, 0), 1); *************** x86_64_sign_extended_value (value) *** 3738,3749 **** switch (GET_CODE (op1)) { case SYMBOL_REF: ! /* For CM_SMALL assume that latest object is 1MB before end of 31bits boundary. We may also accept pretty large negative constants knowing that all objects are in the positive half of address space. */ if (ix86_cmodel == CM_SMALL ! && offset < 1024*1024*1024 && trunc_int_for_mode (offset, SImode) == offset) return 1; /* For CM_KERNEL we know that all object resist in the --- 4041,4052 ---- switch (GET_CODE (op1)) { case SYMBOL_REF: ! /* For CM_SMALL assume that latest object is 16MB before end of 31bits boundary. We may also accept pretty large negative constants knowing that all objects are in the positive half of address space. */ if (ix86_cmodel == CM_SMALL ! && offset < 16*1024*1024 && trunc_int_for_mode (offset, SImode) == offset) return 1; /* For CM_KERNEL we know that all object resist in the *************** x86_64_sign_extended_value (value) *** 3759,3765 **** /* These conditions are similar to SYMBOL_REF ones, just the constraints for code models differ. */ if ((ix86_cmodel == CM_SMALL || ix86_cmodel == CM_MEDIUM) ! && offset < 1024*1024*1024 && trunc_int_for_mode (offset, SImode) == offset) return 1; if (ix86_cmodel == CM_KERNEL --- 4062,4068 ---- /* These conditions are similar to SYMBOL_REF ones, just the constraints for code models differ. */ if ((ix86_cmodel == CM_SMALL || ix86_cmodel == CM_MEDIUM) ! && offset < 16*1024*1024 && trunc_int_for_mode (offset, SImode) == offset) return 1; if (ix86_cmodel == CM_KERNEL *************** x86_64_sign_extended_value (value) *** 3767,3772 **** --- 4070,4085 ---- && trunc_int_for_mode (offset, SImode) == offset) return 1; break; + case UNSPEC: + switch (XINT (op1, 1)) + { + case UNSPEC_DTPOFF: + case UNSPEC_NTPOFF: + if (offset > 0 + && trunc_int_for_mode (offset, SImode) == offset) + return 1; + } + break; default: return 0; } *************** ix86_frame_pointer_required () *** 3874,3880 **** /* In override_options, TARGET_OMIT_LEAF_FRAME_POINTER turns off the frame pointer by default. Turn it back on now if we've not got a leaf function. */ ! if (TARGET_OMIT_LEAF_FRAME_POINTER && ! leaf_function_p ()) return 1; return 0; --- 4187,4197 ---- /* In override_options, TARGET_OMIT_LEAF_FRAME_POINTER turns off the frame pointer by default. Turn it back on now if we've not got a leaf function. */ ! if (TARGET_OMIT_LEAF_FRAME_POINTER ! && (!current_function_is_leaf)) ! return 1; ! ! if (current_function_profile) return 1; return 0; *************** ix86_setup_frame_addresses () *** 3888,3894 **** cfun->machine->accesses_prev_frame = 1; } ! static char pic_label_name[32]; /* This function generates code for -fpic that loads %ebx with the return address of the caller and then returns. */ --- 4205,4232 ---- cfun->machine->accesses_prev_frame = 1; } ! #if defined(HAVE_GAS_HIDDEN) && defined(SUPPORTS_ONE_ONLY) ! # define USE_HIDDEN_LINKONCE 1 ! #else ! # define USE_HIDDEN_LINKONCE 0 ! #endif ! ! static int pic_labels_used; ! ! /* Fills in the label name that should be used for a pc thunk for ! the given register. */ ! ! static void ! get_pc_thunk_name (name, regno) ! char name[32]; ! unsigned int regno; ! { ! if (USE_HIDDEN_LINKONCE) ! sprintf (name, "__i686.get_pc_thunk.%s", reg_names[regno]); ! else ! ASM_GENERATE_INTERNAL_LABEL (name, "LPR", regno); ! } ! /* This function generates code for -fpic that loads %ebx with the return address of the caller and then returns. */ *************** ix86_asm_file_end (file) *** 3898,3971 **** FILE *file; { rtx xops[2]; ! if (! TARGET_DEEP_BRANCH_PREDICTION || pic_label_name[0] == 0) ! return; ! /* ??? Binutils 2.10 and earlier has a linkonce elimination bug related ! to updating relocations to a section being discarded such that this ! doesn't work. Ought to detect this at configure time. */ ! #if 0 ! /* The trick here is to create a linkonce section containing the ! pic label thunk, but to refer to it with an internal label. ! Because the label is internal, we don't have inter-dso name ! binding issues on hosts that don't support ".hidden". ! In order to use these macros, however, we must create a fake ! function decl. */ ! if (targetm.have_named_sections) ! { ! tree decl = build_decl (FUNCTION_DECL, ! get_identifier ("i686.get_pc_thunk"), ! error_mark_node); ! DECL_ONE_ONLY (decl) = 1; ! UNIQUE_SECTION (decl, 0); ! named_section (decl, NULL); ! } ! else ! #else ! text_section (); ! #endif ! /* This used to call ASM_DECLARE_FUNCTION_NAME() but since it's an ! internal (non-global) label that's being emitted, it didn't make ! sense to have .type information for local labels. This caused ! the SCO OpenServer 5.0.4 ELF assembler grief (why are you giving ! me debug info for a label that you're declaring non-global?) this ! was changed to call ASM_OUTPUT_LABEL() instead. */ ! ASM_OUTPUT_LABEL (file, pic_label_name); ! xops[0] = pic_offset_table_rtx; ! xops[1] = gen_rtx_MEM (SImode, stack_pointer_rtx); ! output_asm_insn ("mov{l}\t{%1, %0|%0, %1}", xops); ! output_asm_insn ("ret", xops); } ! void ! load_pic_register () ! { ! rtx gotsym, pclab; ! if (TARGET_64BIT) ! abort (); ! gotsym = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); ! if (TARGET_DEEP_BRANCH_PREDICTION) { ! if (! pic_label_name[0]) ! ASM_GENERATE_INTERNAL_LABEL (pic_label_name, "LPR", 0); ! pclab = gen_rtx_MEM (QImode, gen_rtx_SYMBOL_REF (Pmode, pic_label_name)); } else { ! pclab = gen_rtx_LABEL_REF (VOIDmode, gen_label_rtx ()); } ! emit_insn (gen_prologue_get_pc (pic_offset_table_rtx, pclab)); ! emit_insn (gen_prologue_set_got (pic_offset_table_rtx, gotsym, pclab)); } /* Generate an "push" pattern for input ARG. */ --- 4236,4332 ---- FILE *file; { rtx xops[2]; + int regno; ! for (regno = 0; regno < 8; ++regno) ! { ! char name[32]; ! if (! ((pic_labels_used >> regno) & 1)) ! continue; ! get_pc_thunk_name (name, regno); ! if (USE_HIDDEN_LINKONCE) ! { ! tree decl; ! decl = build_decl (FUNCTION_DECL, get_identifier (name), ! error_mark_node); ! TREE_PUBLIC (decl) = 1; ! TREE_STATIC (decl) = 1; ! DECL_ONE_ONLY (decl) = 1; ! (*targetm.asm_out.unique_section) (decl, 0); ! named_section (decl, NULL, 0); ! ! (*targetm.asm_out.globalize_label) (file, name); ! fputs ("\t.hidden\t", file); ! assemble_name (file, name); ! fputc ('\n', file); ! ASM_DECLARE_FUNCTION_NAME (file, name, decl); ! } ! else ! { ! text_section (); ! ASM_OUTPUT_LABEL (file, name); ! } ! ! xops[0] = gen_rtx_REG (SImode, regno); ! xops[1] = gen_rtx_MEM (SImode, stack_pointer_rtx); ! output_asm_insn ("mov{l}\t{%1, %0|%0, %1}", xops); ! output_asm_insn ("ret", xops); ! } } ! /* Emit code for the SET_GOT patterns. */ ! const char * ! output_set_got (dest) ! rtx dest; ! { ! rtx xops[3]; ! xops[0] = dest; ! xops[1] = gen_rtx_SYMBOL_REF (Pmode, GOT_SYMBOL_NAME); ! if (! TARGET_DEEP_BRANCH_PREDICTION || !flag_pic) { ! xops[2] = gen_rtx_LABEL_REF (Pmode, gen_label_rtx ()); ! ! if (!flag_pic) ! output_asm_insn ("mov{l}\t{%2, %0|%0, %2}", xops); ! else ! output_asm_insn ("call\t%a2", xops); ! ! #if TARGET_MACHO ! /* Output the "canonical" label name ("Lxx$pb") here too. This ! is what will be referred to by the Mach-O PIC subsystem. */ ! ASM_OUTPUT_LABEL (asm_out_file, machopic_function_base_name ()); ! #endif ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (XEXP (xops[2], 0))); ! ! if (flag_pic) ! output_asm_insn ("pop{l}\t%0", xops); } else { ! char name[32]; ! get_pc_thunk_name (name, REGNO (dest)); ! pic_labels_used |= 1 << REGNO (dest); ! ! xops[2] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name)); ! xops[2] = gen_rtx_MEM (QImode, xops[2]); ! output_asm_insn ("call\t%X2", xops); } ! if (!flag_pic || TARGET_DEEP_BRANCH_PREDICTION) ! output_asm_insn ("add{l}\t{%1, %0|%0, %1}", xops); ! else if (!TARGET_MACHO) ! output_asm_insn ("add{l}\t{%1+[.-%a2], %0|%0, %a1+(.-%a2)}", xops); ! return ""; } /* Generate an "push" pattern for input ARG. */ *************** gen_push (arg) *** 3981,3997 **** arg); } /* Return 1 if we need to save REGNO. */ static int ix86_save_reg (regno, maybe_eh_return) ! int regno; int maybe_eh_return; { ! if (regno == PIC_OFFSET_TABLE_REGNUM ! && (current_function_uses_pic_offset_table ! || current_function_uses_const_pool ! || current_function_calls_eh_return)) ! return 1; if (current_function_calls_eh_return && maybe_eh_return) { --- 4342,4381 ---- arg); } + /* Return >= 0 if there is an unused call-clobbered register available + for the entire function. */ + + static unsigned int + ix86_select_alt_pic_regnum () + { + if (current_function_is_leaf && !current_function_profile) + { + int i; + for (i = 2; i >= 0; --i) + if (!regs_ever_live[i]) + return i; + } + + return INVALID_REGNUM; + } + /* Return 1 if we need to save REGNO. */ static int ix86_save_reg (regno, maybe_eh_return) ! unsigned int regno; int maybe_eh_return; { ! if (pic_offset_table_rtx ! && regno == REAL_PIC_OFFSET_TABLE_REGNUM ! && (regs_ever_live[REAL_PIC_OFFSET_TABLE_REGNUM] ! || current_function_profile ! || current_function_calls_eh_return ! || current_function_uses_const_pool)) ! { ! if (ix86_select_alt_pic_regnum () != INVALID_REGNUM) ! return 0; ! return 1; ! } if (current_function_calls_eh_return && maybe_eh_return) { *************** ix86_save_reg (regno, maybe_eh_return) *** 4001,4007 **** unsigned test = EH_RETURN_DATA_REGNO (i); if (test == INVALID_REGNUM) break; ! if (test == (unsigned) regno) return 1; } } --- 4385,4391 ---- unsigned test = EH_RETURN_DATA_REGNO (i); if (test == INVALID_REGNUM) break; ! if (test == regno) return 1; } } *************** ix86_compute_frame_layout (frame) *** 4070,4076 **** frame->nregs = ix86_nsaved_regs (); total_size = size; ! /* Skip return value and save base pointer. */ offset = frame_pointer_needed ? UNITS_PER_WORD * 2 : UNITS_PER_WORD; frame->hard_frame_pointer_offset = offset; --- 4454,4460 ---- frame->nregs = ix86_nsaved_regs (); total_size = size; ! /* Skip return address and saved base pointer. */ offset = frame_pointer_needed ? UNITS_PER_WORD * 2 : UNITS_PER_WORD; frame->hard_frame_pointer_offset = offset; *************** void *** 4212,4220 **** ix86_expand_prologue () { rtx insn; ! int pic_reg_used = (flag_pic && (current_function_uses_pic_offset_table ! || current_function_uses_const_pool) ! && !TARGET_64BIT); struct ix86_frame frame; int use_mov = 0; HOST_WIDE_INT allocate; --- 4596,4602 ---- ix86_expand_prologue () { rtx insn; ! bool pic_reg_used; struct ix86_frame frame; int use_mov = 0; HOST_WIDE_INT allocate; *************** ix86_expand_prologue () *** 4279,4284 **** --- 4661,4670 ---- CALL_INSN_FUNCTION_USAGE (insn) = gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_USE (VOIDmode, arg0), CALL_INSN_FUNCTION_USAGE (insn)); + + /* Don't allow scheduling pass to move insns across __alloca + call. */ + emit_insn (gen_blockage (const0_rtx)); } if (use_mov) { *************** ix86_expand_prologue () *** 4293,4306 **** SUBTARGET_PROLOGUE; #endif if (pic_reg_used) ! load_pic_register (); ! /* If we are profiling, make sure no instructions are scheduled before ! the call to mcount. However, if -fpic, the above call will have ! done that. */ ! if (current_function_profile && ! pic_reg_used) ! emit_insn (gen_blockage ()); } /* Emit code to restore saved registers using MOV insns. First register --- 4679,4714 ---- SUBTARGET_PROLOGUE; #endif + pic_reg_used = false; + if (pic_offset_table_rtx + && (regs_ever_live[REAL_PIC_OFFSET_TABLE_REGNUM] + || current_function_profile)) + { + unsigned int alt_pic_reg_used = ix86_select_alt_pic_regnum (); + + if (alt_pic_reg_used != INVALID_REGNUM) + REGNO (pic_offset_table_rtx) = alt_pic_reg_used; + + pic_reg_used = true; + } + if (pic_reg_used) ! { ! insn = emit_insn (gen_set_got (pic_offset_table_rtx)); ! /* Even with accurate pre-reload life analysis, we can wind up ! deleting all references to the pic register after reload. ! Consider if cross-jumping unifies two sides of a branch ! controled by a comparison vs the only read from a global. ! In which case, allow the set_got to be deleted, though we're ! too late to do anything about the ebx save in the prologue. */ ! REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, NULL); ! } ! ! /* Prevent function calls from be scheduled before the call to mcount. ! In the pic_reg_used case, make sure that the got load isn't deleted. */ ! if (current_function_profile) ! emit_insn (gen_blockage (pic_reg_used ? pic_offset_table_rtx : const0_rtx)); } /* Emit code to restore saved registers using MOV insns. First register *************** ix86_expand_epilogue (style) *** 4489,4494 **** --- 4897,4913 ---- else emit_jump_insn (gen_return_internal ()); } + + /* Reset from the function's potential modifications. */ + + static void + ix86_output_function_epilogue (file, size) + FILE *file ATTRIBUTE_UNUSED; + HOST_WIDE_INT size ATTRIBUTE_UNUSED; + { + if (pic_offset_table_rtx) + REGNO (pic_offset_table_rtx) = REAL_PIC_OFFSET_TABLE_REGNUM; + } /* Extract the parts of an RTL expression that is a valid memory address for an instruction. Return 0 if the structure of the address is *************** ix86_decompose_address (addr, out) *** 4508,4514 **** rtx scale_rtx = NULL_RTX; int retval = 1; ! if (GET_CODE (addr) == REG || GET_CODE (addr) == SUBREG) base = addr; else if (GET_CODE (addr) == PLUS) { --- 4927,4933 ---- rtx scale_rtx = NULL_RTX; int retval = 1; ! if (REG_P (addr) || GET_CODE (addr) == SUBREG) base = addr; else if (GET_CODE (addr) == PLUS) { *************** ix86_address_cost (x) *** 4635,4640 **** --- 5054,5064 ---- if (!ix86_decompose_address (x, &parts)) abort (); + if (parts.base && GET_CODE (parts.base) == SUBREG) + parts.base = SUBREG_REG (parts.base); + if (parts.index && GET_CODE (parts.index) == SUBREG) + parts.index = SUBREG_REG (parts.index); + /* More complex memory references are better. */ if (parts.disp && parts.disp != const0_rtx) cost--; *************** ix86_find_base_term (x) *** 4698,4705 **** || GET_CODE (XEXP (term, 1)) == CONST_DOUBLE)) term = XEXP (term, 0); if (GET_CODE (term) != UNSPEC ! || XVECLEN (term, 0) != 1 ! || XINT (term, 1) != 15) return x; term = XVECEXP (term, 0, 0); --- 5122,5128 ---- || GET_CODE (XEXP (term, 1)) == CONST_DOUBLE)) term = XEXP (term, 0); if (GET_CODE (term) != UNSPEC ! || XINT (term, 1) != UNSPEC_GOTPCREL) return x; term = XVECEXP (term, 0, 0); *************** ix86_find_base_term (x) *** 4722,4729 **** term = XEXP (term, 0); if (GET_CODE (term) != UNSPEC ! || XVECLEN (term, 0) != 1 ! || XINT (term, 1) != 7) return x; term = XVECEXP (term, 0, 0); --- 5145,5151 ---- term = XEXP (term, 0); if (GET_CODE (term) != UNSPEC ! || XINT (term, 1) != UNSPEC_GOTOFF) return x; term = XVECEXP (term, 0, 0); *************** ix86_find_base_term (x) *** 4735,4740 **** --- 5157,5281 ---- return term; } + /* Determine if a given RTX is a valid constant. We already know this + satisfies CONSTANT_P. */ + + bool + legitimate_constant_p (x) + rtx x; + { + rtx inner; + + switch (GET_CODE (x)) + { + case SYMBOL_REF: + /* TLS symbols are not constant. */ + if (tls_symbolic_operand (x, Pmode)) + return false; + break; + + case CONST: + inner = XEXP (x, 0); + + /* Offsets of TLS symbols are never valid. + Discourage CSE from creating them. */ + if (GET_CODE (inner) == PLUS + && tls_symbolic_operand (XEXP (inner, 0), Pmode)) + return false; + + /* Only some unspecs are valid as "constants". */ + if (GET_CODE (inner) == UNSPEC) + switch (XINT (inner, 1)) + { + case UNSPEC_TPOFF: + return local_exec_symbolic_operand (XVECEXP (inner, 0, 0), Pmode); + default: + return false; + } + break; + + default: + break; + } + + /* Otherwise we handle everything else in the move patterns. */ + return true; + } + + /* Determine if it's legal to put X into the constant pool. This + is not possible for the address of thread-local symbols, which + is checked above. */ + + static bool + ix86_cannot_force_const_mem (x) + rtx x; + { + return !legitimate_constant_p (x); + } + + /* Determine if a given RTX is a valid constant address. */ + + bool + constant_address_p (x) + rtx x; + { + switch (GET_CODE (x)) + { + case LABEL_REF: + case CONST_INT: + return true; + + case CONST_DOUBLE: + return TARGET_64BIT; + + case CONST: + /* For Mach-O, really believe the CONST. */ + if (TARGET_MACHO) + return true; + /* Otherwise fall through. */ + case SYMBOL_REF: + return !flag_pic && legitimate_constant_p (x); + + default: + return false; + } + } + + /* Nonzero if the constant value X is a legitimate general operand + when generating PIC code. It is given that flag_pic is on and + that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ + + bool + legitimate_pic_operand_p (x) + rtx x; + { + rtx inner; + + switch (GET_CODE (x)) + { + case CONST: + inner = XEXP (x, 0); + + /* Only some unspecs are valid as "constants". */ + if (GET_CODE (inner) == UNSPEC) + switch (XINT (inner, 1)) + { + case UNSPEC_TPOFF: + return local_exec_symbolic_operand (XVECEXP (inner, 0, 0), Pmode); + default: + return false; + } + /* FALLTHRU */ + + case SYMBOL_REF: + case LABEL_REF: + return legitimate_pic_address_disp_p (x); + + default: + return true; + } + } + /* Determine if a given CONST RTX is a valid memory displacement in PIC mode. */ *************** int *** 4742,4762 **** legitimate_pic_address_disp_p (disp) register rtx disp; { /* In 64bit mode we can allow direct addresses of symbols and labels when they are not dynamic symbols. */ if (TARGET_64BIT) { ! rtx x = disp; ! if (GET_CODE (disp) == CONST) ! x = XEXP (disp, 0); ! /* ??? Handle PIC code models */ ! if (GET_CODE (x) == PLUS ! && (GET_CODE (XEXP (x, 1)) == CONST_INT ! && ix86_cmodel == CM_SMALL_PIC ! && INTVAL (XEXP (x, 1)) < 1024*1024*1024 ! && INTVAL (XEXP (x, 1)) > -1024*1024*1024)) ! x = XEXP (x, 0); ! if (local_symbolic_operand (x, Pmode)) return 1; } if (GET_CODE (disp) != CONST) --- 5283,5314 ---- legitimate_pic_address_disp_p (disp) register rtx disp; { + bool saw_plus; + /* In 64bit mode we can allow direct addresses of symbols and labels when they are not dynamic symbols. */ if (TARGET_64BIT) { ! /* TLS references should always be enclosed in UNSPEC. */ ! if (tls_symbolic_operand (disp, GET_MODE (disp))) ! return 0; ! if (GET_CODE (disp) == SYMBOL_REF ! && ix86_cmodel == CM_SMALL_PIC ! && (CONSTANT_POOL_ADDRESS_P (disp) ! || SYMBOL_REF_FLAG (disp))) ! return 1; ! if (GET_CODE (disp) == LABEL_REF) ! return 1; ! if (GET_CODE (disp) == CONST ! && GET_CODE (XEXP (disp, 0)) == PLUS ! && ((GET_CODE (XEXP (XEXP (disp, 0), 0)) == SYMBOL_REF ! && ix86_cmodel == CM_SMALL_PIC ! && (CONSTANT_POOL_ADDRESS_P (XEXP (XEXP (disp, 0), 0)) ! || SYMBOL_REF_FLAG (XEXP (XEXP (disp, 0), 0)))) ! || GET_CODE (XEXP (XEXP (disp, 0), 0)) == LABEL_REF) ! && GET_CODE (XEXP (XEXP (disp, 0), 1)) == CONST_INT ! && INTVAL (XEXP (XEXP (disp, 0), 1)) < 16*1024*1024 ! && INTVAL (XEXP (XEXP (disp, 0), 1)) >= -16*1024*1024) return 1; } if (GET_CODE (disp) != CONST) *************** legitimate_pic_address_disp_p (disp) *** 4768,4775 **** /* We are unsafe to allow PLUS expressions. This limit allowed distance of GOT tables. We should not need these anyway. */ if (GET_CODE (disp) != UNSPEC ! || XVECLEN (disp, 0) != 1 ! || XINT (disp, 1) != 15) return 0; if (GET_CODE (XVECEXP (disp, 0, 0)) != SYMBOL_REF --- 5320,5326 ---- /* We are unsafe to allow PLUS expressions. This limit allowed distance of GOT tables. We should not need these anyway. */ if (GET_CODE (disp) != UNSPEC ! || XINT (disp, 1) != UNSPEC_GOTPCREL) return 0; if (GET_CODE (XVECEXP (disp, 0, 0)) != SYMBOL_REF *************** legitimate_pic_address_disp_p (disp) *** 4778,4804 **** return 1; } if (GET_CODE (disp) == PLUS) { if (GET_CODE (XEXP (disp, 1)) != CONST_INT) return 0; disp = XEXP (disp, 0); } ! if (GET_CODE (disp) != UNSPEC ! || XVECLEN (disp, 0) != 1) return 0; - /* Must be @GOT or @GOTOFF. */ switch (XINT (disp, 1)) { ! case 6: /* @GOT */ return GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF; ! ! case 7: /* @GOTOFF */ return local_symbolic_operand (XVECEXP (disp, 0, 0), Pmode); } ! return 0; } --- 5329,5379 ---- return 1; } + saw_plus = false; if (GET_CODE (disp) == PLUS) { if (GET_CODE (XEXP (disp, 1)) != CONST_INT) return 0; disp = XEXP (disp, 0); + saw_plus = true; } ! /* Allow {LABEL | SYMBOL}_REF - SYMBOL_REF-FOR-PICBASE for Mach-O. */ ! if (TARGET_MACHO && GET_CODE (disp) == MINUS) ! { ! if (GET_CODE (XEXP (disp, 0)) == LABEL_REF ! || GET_CODE (XEXP (disp, 0)) == SYMBOL_REF) ! if (GET_CODE (XEXP (disp, 1)) == SYMBOL_REF) ! { ! const char *sym_name = XSTR (XEXP (disp, 1), 0); ! if (strstr (sym_name, "$pb") != 0) ! return 1; ! } ! } ! ! if (GET_CODE (disp) != UNSPEC) return 0; switch (XINT (disp, 1)) { ! case UNSPEC_GOT: ! if (saw_plus) ! return false; return GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF; ! case UNSPEC_GOTOFF: return local_symbolic_operand (XVECEXP (disp, 0, 0), Pmode); + case UNSPEC_GOTTPOFF: + case UNSPEC_GOTNTPOFF: + case UNSPEC_INDNTPOFF: + if (saw_plus) + return false; + return initial_exec_symbolic_operand (XVECEXP (disp, 0, 0), Pmode); + case UNSPEC_NTPOFF: + return local_exec_symbolic_operand (XVECEXP (disp, 0, 0), Pmode); + case UNSPEC_DTPOFF: + return local_dynamic_symbolic_operand (XVECEXP (disp, 0, 0), Pmode); } ! return 0; } *************** legitimate_address_p (mode, addr, strict *** 4830,4835 **** --- 5405,5417 ---- debug_rtx (addr); } + if (GET_CODE (addr) == UNSPEC && XINT (addr, 1) == UNSPEC_TP) + { + if (TARGET_DEBUG_ADDR) + fprintf (stderr, "Success.\n"); + return TRUE; + } + if (ix86_decompose_address (addr, &parts) <= 0) { reason = "decomposition failed"; *************** legitimate_address_p (mode, addr, strict *** 4849,4857 **** if (base) { reason_rtx = base; ! if (GET_CODE (base) != REG) { reason = "base is not a register"; goto report_error; --- 5431,5445 ---- if (base) { + rtx reg; reason_rtx = base; ! if (GET_CODE (base) == SUBREG) ! reg = SUBREG_REG (base); ! else ! reg = base; ! ! if (GET_CODE (reg) != REG) { reason = "base is not a register"; goto report_error; *************** legitimate_address_p (mode, addr, strict *** 4863,4870 **** goto report_error; } ! if ((strict && ! REG_OK_FOR_BASE_STRICT_P (base)) ! || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (base))) { reason = "base is not valid"; goto report_error; --- 5451,5458 ---- goto report_error; } ! if ((strict && ! REG_OK_FOR_BASE_STRICT_P (reg)) ! || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (reg))) { reason = "base is not valid"; goto report_error; *************** legitimate_address_p (mode, addr, strict *** 4879,4887 **** if (index) { reason_rtx = index; ! if (GET_CODE (index) != REG) { reason = "index is not a register"; goto report_error; --- 5467,5481 ---- if (index) { + rtx reg; reason_rtx = index; ! if (GET_CODE (index) == SUBREG) ! reg = SUBREG_REG (index); ! else ! reg = index; ! ! if (GET_CODE (reg) != REG) { reason = "index is not a register"; goto report_error; *************** legitimate_address_p (mode, addr, strict *** 4893,4900 **** goto report_error; } ! if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (index)) ! || (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (index))) { reason = "index is not valid"; goto report_error; --- 5487,5494 ---- goto report_error; } ! if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (reg)) ! || (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (reg))) { reason = "index is not valid"; goto report_error; *************** legitimate_address_p (mode, addr, strict *** 4923,4959 **** { reason_rtx = disp; ! if (!CONSTANT_ADDRESS_P (disp)) ! { ! reason = "displacement is not constant"; ! goto report_error; ! } ! if (TARGET_64BIT) ! { ! if (!x86_64_sign_extended_value (disp)) ! { ! reason = "displacement is out of range"; ! goto report_error; ! } ! } ! else ! { ! if (GET_CODE (disp) == CONST_DOUBLE) ! { ! reason = "displacement is a const_double"; ! goto report_error; ! } ! } ! if (flag_pic && SYMBOLIC_CONST (disp)) { if (TARGET_64BIT && (index || base)) { ! reason = "non-constant pic memory reference"; ! goto report_error; } ! if (! legitimate_pic_address_disp_p (disp)) { reason = "displacement is an invalid pic construct"; goto report_error; --- 5517,5567 ---- { reason_rtx = disp; ! if (GET_CODE (disp) == CONST ! && GET_CODE (XEXP (disp, 0)) == UNSPEC) ! switch (XINT (XEXP (disp, 0), 1)) ! { ! case UNSPEC_GOT: ! case UNSPEC_GOTOFF: ! case UNSPEC_GOTPCREL: ! if (!flag_pic) ! abort (); ! goto is_legitimate_pic; ! case UNSPEC_GOTTPOFF: ! case UNSPEC_GOTNTPOFF: ! case UNSPEC_INDNTPOFF: ! case UNSPEC_NTPOFF: ! case UNSPEC_DTPOFF: ! break; ! default: ! reason = "invalid address unspec"; ! goto report_error; ! } ! ! else if (flag_pic && (SYMBOLIC_CONST (disp) ! #if TARGET_MACHO ! && !machopic_operand_p (disp) ! #endif ! )) { + is_legitimate_pic: if (TARGET_64BIT && (index || base)) { ! /* foo@dtpoff(%rX) is ok. */ ! if (GET_CODE (disp) != CONST ! || GET_CODE (XEXP (disp, 0)) != PLUS ! || GET_CODE (XEXP (XEXP (disp, 0), 0)) != UNSPEC ! || GET_CODE (XEXP (XEXP (disp, 0), 1)) != CONST_INT ! || (XINT (XEXP (XEXP (disp, 0), 0), 1) != UNSPEC_DTPOFF ! && XINT (XEXP (XEXP (disp, 0), 0), 1) != UNSPEC_NTPOFF)) ! { ! reason = "non-constant pic memory reference"; ! goto report_error; ! } } ! else if (! legitimate_pic_address_disp_p (disp)) { reason = "displacement is an invalid pic construct"; goto report_error; *************** legitimate_address_p (mode, addr, strict *** 4981,4994 **** that never results in lea, this seems to be easier and correct fix for crash to disable this test. */ } ! else if (HALF_PIC_P ()) { ! if (! HALF_PIC_ADDRESS_P (disp) ! || (base != NULL_RTX || index != NULL_RTX)) ! { ! reason = "displacement is an invalid half-pic reference"; ! goto report_error; ! } } } --- 5589,5608 ---- that never results in lea, this seems to be easier and correct fix for crash to disable this test. */ } ! else if (!CONSTANT_ADDRESS_P (disp)) { ! reason = "displacement is not constant"; ! goto report_error; ! } ! else if (TARGET_64BIT && !x86_64_sign_extended_value (disp)) ! { ! reason = "displacement is out of range"; ! goto report_error; ! } ! else if (!TARGET_64BIT && GET_CODE (disp) == CONST_DOUBLE) ! { ! reason = "displacement is a const_double"; ! goto report_error; } } *************** legitimate_address_p (mode, addr, strict *** 4997,5003 **** fprintf (stderr, "Success.\n"); return TRUE; ! report_error: if (TARGET_DEBUG_ADDR) { fprintf (stderr, "Error: %s\n", reason); --- 5611,5617 ---- fprintf (stderr, "Success.\n"); return TRUE; ! report_error: if (TARGET_DEBUG_ADDR) { fprintf (stderr, "Error: %s\n", reason); *************** report_error: *** 5011,5020 **** static HOST_WIDE_INT ix86_GOT_alias_set () { ! static HOST_WIDE_INT set = -1; ! if (set == -1) ! set = new_alias_set (); ! return set; } /* Return a legitimate reference for ORIG (an address) using the --- 5625,5634 ---- static HOST_WIDE_INT ix86_GOT_alias_set () { ! static HOST_WIDE_INT set = -1; ! if (set == -1) ! set = new_alias_set (); ! return set; } /* Return a legitimate reference for ORIG (an address) using the *************** legitimize_pic_address (orig, reg) *** 5044,5077 **** rtx new = orig; rtx base; ! if (local_symbolic_operand (addr, Pmode)) { ! /* In 64bit mode we can address such objects directly. */ ! if (TARGET_64BIT) ! new = addr; ! else ! { ! /* This symbol may be referenced via a displacement from the PIC ! base address (@GOTOFF). */ ! current_function_uses_pic_offset_table = 1; ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 7); ! new = gen_rtx_CONST (Pmode, new); ! new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new); ! if (reg != 0) ! { ! emit_move_insn (reg, new); ! new = reg; ! } ! } } else if (GET_CODE (addr) == SYMBOL_REF) { if (TARGET_64BIT) { ! current_function_uses_pic_offset_table = 1; ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 15); new = gen_rtx_CONST (Pmode, new); new = gen_rtx_MEM (Pmode, new); RTX_UNCHANGING_P (new) = 1; --- 5658,5694 ---- rtx new = orig; rtx base; ! #if TARGET_MACHO ! if (reg == 0) ! reg = gen_reg_rtx (Pmode); ! /* Use the generic Mach-O PIC machinery. */ ! return machopic_legitimize_pic_address (orig, GET_MODE (orig), reg); ! #endif ! ! if (TARGET_64BIT && legitimate_pic_address_disp_p (addr)) ! new = addr; ! else if (!TARGET_64BIT && local_symbolic_operand (addr, Pmode)) { ! /* This symbol may be referenced via a displacement from the PIC ! base address (@GOTOFF). */ ! if (reload_in_progress) ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTOFF); ! new = gen_rtx_CONST (Pmode, new); ! new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new); ! if (reg != 0) ! { ! emit_move_insn (reg, new); ! new = reg; ! } } else if (GET_CODE (addr) == SYMBOL_REF) { if (TARGET_64BIT) { ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTPCREL); new = gen_rtx_CONST (Pmode, new); new = gen_rtx_MEM (Pmode, new); RTX_UNCHANGING_P (new) = 1; *************** legitimize_pic_address (orig, reg) *** 5090,5097 **** /* This symbol must be referenced via a load from the Global Offset Table (@GOT). */ ! current_function_uses_pic_offset_table = 1; ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 6); new = gen_rtx_CONST (Pmode, new); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new); new = gen_rtx_MEM (Pmode, new); --- 5707,5715 ---- /* This symbol must be referenced via a load from the Global Offset Table (@GOT). */ ! if (reload_in_progress) ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOT); new = gen_rtx_CONST (Pmode, new); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new); new = gen_rtx_MEM (Pmode, new); *************** legitimize_pic_address (orig, reg) *** 5131,5138 **** { if (!TARGET_64BIT) { ! current_function_uses_pic_offset_table = 1; ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0), 7); new = gen_rtx_PLUS (Pmode, new, op1); new = gen_rtx_CONST (Pmode, new); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new); --- 5749,5758 ---- { if (!TARGET_64BIT) { ! if (reload_in_progress) ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; ! new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0), ! UNSPEC_GOTOFF); new = gen_rtx_PLUS (Pmode, new, op1); new = gen_rtx_CONST (Pmode, new); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new); *************** legitimize_pic_address (orig, reg) *** 5145,5151 **** } else { ! /* ??? We need to limit offsets here. */ } } else --- 5765,5773 ---- } else { ! if (INTVAL (op1) < -16*1024*1024 ! || INTVAL (op1) >= 16*1024*1024) ! new = gen_rtx_PLUS (Pmode, op0, force_reg (Pmode, op1)); } } else *************** legitimize_pic_address (orig, reg) *** 5170,5176 **** --- 5792,5893 ---- } return new; } + + static void + ix86_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + bool local_p = (*targetm.binds_local_p) (decl); + rtx rtl, symbol; + + rtl = DECL_P (decl) ? DECL_RTL (decl) : TREE_CST_RTL (decl); + if (GET_CODE (rtl) != MEM) + return; + symbol = XEXP (rtl, 0); + if (GET_CODE (symbol) != SYMBOL_REF) + return; + + /* For basic x86, if using PIC, mark a SYMBOL_REF for a non-global + symbol so that we may access it directly in the GOT. */ + + if (flag_pic) + SYMBOL_REF_FLAG (symbol) = local_p; + + /* For ELF, encode thread-local data with %[GLil] for "global dynamic", + "local dynamic", "initial exec" or "local exec" TLS models + respectively. */ + + if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl)) + { + const char *symbol_str; + char *newstr; + size_t len; + enum tls_model kind = decl_tls_model (decl); + + if (TARGET_64BIT && ! flag_pic) + { + /* x86-64 doesn't allow non-pic code for shared libraries, + so don't generate GD/LD TLS models for non-pic code. */ + switch (kind) + { + case TLS_MODEL_GLOBAL_DYNAMIC: + kind = TLS_MODEL_INITIAL_EXEC; break; + case TLS_MODEL_LOCAL_DYNAMIC: + kind = TLS_MODEL_LOCAL_EXEC; break; + default: + break; + } + } + + symbol_str = XSTR (symbol, 0); + + if (symbol_str[0] == '%') + { + if (symbol_str[1] == tls_model_chars[kind]) + return; + symbol_str += 2; + } + len = strlen (symbol_str) + 1; + newstr = alloca (len + 2); + + newstr[0] = '%'; + newstr[1] = tls_model_chars[kind]; + memcpy (newstr + 2, symbol_str, len); + + XSTR (symbol, 0) = ggc_alloc_string (newstr, len + 2 - 1); + } + } + + /* Undo the above when printing symbol names. */ + + static const char * + ix86_strip_name_encoding (str) + const char *str; + { + if (str[0] == '%') + str += 2; + if (str [0] == '*') + str += 1; + return str; + } + /* Load the thread pointer into a register. */ + + static rtx + get_thread_pointer () + { + rtx tp; + + tp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), UNSPEC_TP); + tp = gen_rtx_MEM (Pmode, tp); + RTX_UNCHANGING_P (tp) = 1; + set_mem_alias_set (tp, ix86_GOT_alias_set ()); + tp = force_reg (Pmode, tp); + + return tp; + } + /* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. This macro is used in only one place: `memory_address' in explow.c. *************** legitimize_address (x, oldx, mode) *** 5208,5213 **** --- 5925,6047 ---- debug_rtx (x); } + log = tls_symbolic_operand (x, mode); + if (log) + { + rtx dest, base, off, pic; + int type; + + switch (log) + { + case TLS_MODEL_GLOBAL_DYNAMIC: + dest = gen_reg_rtx (Pmode); + if (TARGET_64BIT) + { + rtx rax = gen_rtx_REG (Pmode, 0), insns; + + start_sequence (); + emit_call_insn (gen_tls_global_dynamic_64 (rax, x)); + insns = get_insns (); + end_sequence (); + + emit_libcall_block (insns, dest, rax, x); + } + else + emit_insn (gen_tls_global_dynamic_32 (dest, x)); + break; + + case TLS_MODEL_LOCAL_DYNAMIC: + base = gen_reg_rtx (Pmode); + if (TARGET_64BIT) + { + rtx rax = gen_rtx_REG (Pmode, 0), insns, note; + + start_sequence (); + emit_call_insn (gen_tls_local_dynamic_base_64 (rax)); + insns = get_insns (); + end_sequence (); + + note = gen_rtx_EXPR_LIST (VOIDmode, const0_rtx, NULL); + note = gen_rtx_EXPR_LIST (VOIDmode, ix86_tls_get_addr (), note); + emit_libcall_block (insns, base, rax, note); + } + else + emit_insn (gen_tls_local_dynamic_base_32 (base)); + + off = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), UNSPEC_DTPOFF); + off = gen_rtx_CONST (Pmode, off); + + return gen_rtx_PLUS (Pmode, base, off); + + case TLS_MODEL_INITIAL_EXEC: + if (TARGET_64BIT) + { + pic = NULL; + type = UNSPEC_GOTNTPOFF; + } + else if (flag_pic) + { + if (reload_in_progress) + regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; + pic = pic_offset_table_rtx; + type = TARGET_GNU_TLS ? UNSPEC_GOTNTPOFF : UNSPEC_GOTTPOFF; + } + else if (!TARGET_GNU_TLS) + { + pic = gen_reg_rtx (Pmode); + emit_insn (gen_set_got (pic)); + type = UNSPEC_GOTTPOFF; + } + else + { + pic = NULL; + type = UNSPEC_INDNTPOFF; + } + + base = get_thread_pointer (); + + off = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), type); + off = gen_rtx_CONST (Pmode, off); + if (pic) + off = gen_rtx_PLUS (Pmode, pic, off); + off = gen_rtx_MEM (Pmode, off); + RTX_UNCHANGING_P (off) = 1; + set_mem_alias_set (off, ix86_GOT_alias_set ()); + dest = gen_reg_rtx (Pmode); + + if (TARGET_64BIT || TARGET_GNU_TLS) + { + emit_move_insn (dest, off); + return gen_rtx_PLUS (Pmode, base, dest); + } + else + emit_insn (gen_subsi3 (dest, base, off)); + break; + + case TLS_MODEL_LOCAL_EXEC: + base = get_thread_pointer (); + + off = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), + (TARGET_64BIT || TARGET_GNU_TLS) + ? UNSPEC_NTPOFF : UNSPEC_TPOFF); + off = gen_rtx_CONST (Pmode, off); + + if (TARGET_64BIT || TARGET_GNU_TLS) + return gen_rtx_PLUS (Pmode, base, off); + else + { + dest = gen_reg_rtx (Pmode); + emit_insn (gen_subsi3 (dest, base, off)); + } + break; + + default: + abort (); + } + + return dest; + } + if (flag_pic && SYMBOLIC_CONST (x)) return legitimize_pic_address (x, 0); *************** output_pic_addr_const (file, x, code) *** 5380,5386 **** case SYMBOL_REF: assemble_name (file, XSTR (x, 0)); ! if (code == 'P' && ! SYMBOL_REF_FLAG (x)) fputs ("@PLT", file); break; --- 6214,6220 ---- case SYMBOL_REF: assemble_name (file, XSTR (x, 0)); ! if (!TARGET_MACHO && code == 'P' && ! SYMBOL_REF_FLAG (x)) fputs ("@PLT", file); break; *************** output_pic_addr_const (file, x, code) *** 5438,5467 **** break; case MINUS: ! putc (ASSEMBLER_DIALECT == ASM_INTEL ? '(' : '[', file); output_pic_addr_const (file, XEXP (x, 0), code); putc ('-', file); output_pic_addr_const (file, XEXP (x, 1), code); ! putc (ASSEMBLER_DIALECT == ASM_INTEL ? ')' : ']', file); break; case UNSPEC: if (XVECLEN (x, 0) != 1) ! abort (); output_pic_addr_const (file, XVECEXP (x, 0, 0), code); switch (XINT (x, 1)) { ! case 6: fputs ("@GOT", file); break; ! case 7: fputs ("@GOTOFF", file); break; ! case 8: ! fputs ("@PLT", file); break; ! case 15: ! fputs ("@GOTPCREL(%RIP)", file); break; default: output_operand_lossage ("invalid UNSPEC as operand"); --- 6272,6325 ---- break; case MINUS: ! if (!TARGET_MACHO) ! putc (ASSEMBLER_DIALECT == ASM_INTEL ? '(' : '[', file); output_pic_addr_const (file, XEXP (x, 0), code); putc ('-', file); output_pic_addr_const (file, XEXP (x, 1), code); ! if (!TARGET_MACHO) ! putc (ASSEMBLER_DIALECT == ASM_INTEL ? ')' : ']', file); break; case UNSPEC: if (XVECLEN (x, 0) != 1) ! abort (); output_pic_addr_const (file, XVECEXP (x, 0, 0), code); switch (XINT (x, 1)) { ! case UNSPEC_GOT: fputs ("@GOT", file); break; ! case UNSPEC_GOTOFF: fputs ("@GOTOFF", file); break; ! case UNSPEC_GOTPCREL: ! fputs ("@GOTPCREL(%rip)", file); break; ! case UNSPEC_GOTTPOFF: ! /* FIXME: This might be @TPOFF in Sun ld too. */ ! fputs ("@GOTTPOFF", file); ! break; ! case UNSPEC_TPOFF: ! fputs ("@TPOFF", file); ! break; ! case UNSPEC_NTPOFF: ! if (TARGET_64BIT) ! fputs ("@TPOFF", file); ! else ! fputs ("@NTPOFF", file); ! break; ! case UNSPEC_DTPOFF: ! fputs ("@DTPOFF", file); ! break; ! case UNSPEC_GOTNTPOFF: ! if (TARGET_64BIT) ! fputs ("@GOTTPOFF(%rip)", file); ! else ! fputs ("@GOTNTPOFF", file); ! break; ! case UNSPEC_INDNTPOFF: ! fputs ("@INDNTPOFF", file); break; default: output_operand_lossage ("invalid UNSPEC as operand"); *************** i386_dwarf_output_addr_const (file, x) *** 5496,5501 **** --- 6354,6383 ---- fputc ('\n', file); } + /* This is called from dwarf2out.c via ASM_OUTPUT_DWARF_DTPREL. + We need to emit DTP-relative relocations. */ + + void + i386_output_dwarf_dtprel (file, size, x) + FILE *file; + int size; + rtx x; + { + fputs (ASM_LONG, file); + output_addr_const (file, x); + fputs ("@DTPOFF", file); + switch (size) + { + case 4: + break; + case 8: + fputs (", 0", file); + break; + default: + abort (); + } + } + /* In the name of slightly smaller debug output, and to cater to general assembler losage, recognize PIC+GOTOFF and turn it back into a direct symbol reference. */ *************** i386_simplify_dwarf_addr (orig_x) *** 5513,5519 **** { if (GET_CODE (x) != CONST || GET_CODE (XEXP (x, 0)) != UNSPEC ! || XINT (XEXP (x, 0), 1) != 15 || GET_CODE (orig_x) != MEM) return orig_x; return XVECEXP (XEXP (x, 0), 0, 0); --- 6395,6401 ---- { if (GET_CODE (x) != CONST || GET_CODE (XEXP (x, 0)) != UNSPEC ! || XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL || GET_CODE (orig_x) != MEM) return orig_x; return XVECEXP (XEXP (x, 0), 0, 0); *************** i386_simplify_dwarf_addr (orig_x) *** 5549,5556 **** x = XEXP (XEXP (x, 1), 0); if (GET_CODE (x) == UNSPEC ! && ((XINT (x, 1) == 6 && GET_CODE (orig_x) == MEM) ! || (XINT (x, 1) == 7 && GET_CODE (orig_x) != MEM))) { if (y) return gen_rtx_PLUS (Pmode, y, XVECEXP (x, 0, 0)); --- 6431,6438 ---- x = XEXP (XEXP (x, 1), 0); if (GET_CODE (x) == UNSPEC ! && ((XINT (x, 1) == UNSPEC_GOT && GET_CODE (orig_x) == MEM) ! || (XINT (x, 1) == UNSPEC_GOTOFF && GET_CODE (orig_x) != MEM))) { if (y) return gen_rtx_PLUS (Pmode, y, XVECEXP (x, 0, 0)); *************** i386_simplify_dwarf_addr (orig_x) *** 5560,5567 **** if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 0)) == UNSPEC && GET_CODE (XEXP (x, 1)) == CONST_INT ! && ((XINT (XEXP (x, 0), 1) == 6 && GET_CODE (orig_x) == MEM) ! || (XINT (XEXP (x, 0), 1) == 7 && GET_CODE (orig_x) != MEM))) { x = gen_rtx_PLUS (VOIDmode, XVECEXP (XEXP (x, 0), 0, 0), XEXP (x, 1)); if (y) --- 6442,6450 ---- if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 0)) == UNSPEC && GET_CODE (XEXP (x, 1)) == CONST_INT ! && ((XINT (XEXP (x, 0), 1) == UNSPEC_GOT && GET_CODE (orig_x) == MEM) ! || (XINT (XEXP (x, 0), 1) == UNSPEC_GOTOFF ! && GET_CODE (orig_x) != MEM))) { x = gen_rtx_PLUS (VOIDmode, XVECEXP (XEXP (x, 0), 0, 0), XEXP (x, 1)); if (y) *************** print_reg (x, code, file) *** 5674,5680 **** || REGNO (x) == FPSR_REG) abort (); ! if (ASSEMBLER_DIALECT == ASM_ATT || USER_LABEL_PREFIX[0] == 0) putc ('%', file); if (code == 'w' || MMX_REG_P (x)) --- 6557,6563 ---- || REGNO (x) == FPSR_REG) abort (); ! if (ASSEMBLER_DIALECT == ASM_ATT || USER_LABEL_PREFIX[0] == 0) putc ('%', file); if (code == 'w' || MMX_REG_P (x)) *************** print_reg (x, code, file) *** 5751,5756 **** --- 6634,6676 ---- } } + /* Locate some local-dynamic symbol still in use by this function + so that we can print its name in some tls_local_dynamic_base + pattern. */ + + static const char * + get_some_local_dynamic_name () + { + rtx insn; + + if (cfun->machine->some_ld_name) + return cfun->machine->some_ld_name; + + for (insn = get_insns (); insn ; insn = NEXT_INSN (insn)) + if (INSN_P (insn) + && for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0)) + return cfun->machine->some_ld_name; + + abort (); + } + + static int + get_some_local_dynamic_name_1 (px, data) + rtx *px; + void *data ATTRIBUTE_UNUSED; + { + rtx x = *px; + + if (GET_CODE (x) == SYMBOL_REF + && local_dynamic_symbolic_operand (x, Pmode)) + { + cfun->machine->some_ld_name = XSTR (x, 0); + return 1; + } + + return 0; + } + /* Meaning of CODE: L,W,B,Q,S,T -- print the opcode suffix for specified size of operand. C -- print opcode suffix for set/cmov insn. *************** print_reg (x, code, file) *** 5775,5780 **** --- 6695,6701 ---- D -- print condition for SSE cmp instruction. P -- if PIC, print an @PLT suffix. X -- don't print any sort of PIC '@' suffix for a symbol. + & -- print some in-use local-dynamic symbol name. */ void *************** print_operand (file, x, code) *** 5792,5797 **** --- 6713,6722 ---- putc ('*', file); return; + case '&': + assemble_name (file, get_some_local_dynamic_name ()); + return; + case 'A': if (ASSEMBLER_DIALECT == ASM_ATT) putc ('*', file); *************** print_operand (file, x, code) *** 5985,5991 **** /* Like above, but reverse condition */ case 'c': ! /* Check to see if argument to %c is really a constant and not a condition code which needs to be reversed. */ if (GET_RTX_CLASS (GET_CODE (x)) != '<') { --- 6910,6916 ---- /* Like above, but reverse condition */ case 'c': ! /* Check to see if argument to %c is really a constant and not a condition code which needs to be reversed. */ if (GET_RTX_CLASS (GET_CODE (x)) != '<') { *************** print_operand (file, x, code) *** 6078,6086 **** if (flag_pic && CONSTANT_ADDRESS_P (x)) output_pic_addr_const (file, x, code); /* Avoid (%rip) for call operands. */ ! else if (CONSTANT_ADDRESS_P (x) && code =='P' && GET_CODE (x) != CONST_INT) output_addr_const (file, x); else output_address (x); } --- 7003,7013 ---- if (flag_pic && CONSTANT_ADDRESS_P (x)) output_pic_addr_const (file, x, code); /* Avoid (%rip) for call operands. */ ! else if (CONSTANT_ADDRESS_P (x) && code == 'P' && GET_CODE (x) != CONST_INT) output_addr_const (file, x); + else if (this_is_asm_operands && ! address_operand (x, VOIDmode)) + output_operand_lossage ("invalid constraints for operand"); else output_address (x); } *************** print_operand (file, x, code) *** 6101,6124 **** /* These float cases don't actually occur as immediate operands. */ else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode) { - REAL_VALUE_TYPE r; char dstr[30]; ! REAL_VALUE_FROM_CONST_DOUBLE (r, x); ! REAL_VALUE_TO_DECIMAL (r, "%.22e", dstr); fprintf (file, "%s", dstr); } else if (GET_CODE (x) == CONST_DOUBLE && (GET_MODE (x) == XFmode || GET_MODE (x) == TFmode)) { - REAL_VALUE_TYPE r; char dstr[30]; ! REAL_VALUE_FROM_CONST_DOUBLE (r, x); ! REAL_VALUE_TO_DECIMAL (r, "%.22e", dstr); fprintf (file, "%s", dstr); } else { if (code != 'P') --- 7028,7048 ---- /* These float cases don't actually occur as immediate operands. */ else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode) { char dstr[30]; ! real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (x), sizeof (dstr), 0, 1); fprintf (file, "%s", dstr); } else if (GET_CODE (x) == CONST_DOUBLE && (GET_MODE (x) == XFmode || GET_MODE (x) == TFmode)) { char dstr[30]; ! real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (x), sizeof (dstr), 0, 1); fprintf (file, "%s", dstr); } + else { if (code != 'P') *************** print_operand_address (file, addr) *** 6157,6168 **** rtx base, index, disp; int scale; ! if (! ix86_decompose_address (addr, &parts)) { ! output_operand_lossage ("Wrong address expression or operand constraint"); return; } base = parts.base; index = parts.index; disp = parts.disp; --- 7081,7102 ---- rtx base, index, disp; int scale; ! if (GET_CODE (addr) == UNSPEC && XINT (addr, 1) == UNSPEC_TP) { ! if (ASSEMBLER_DIALECT == ASM_INTEL) ! fputs ("DWORD PTR ", file); ! if (ASSEMBLER_DIALECT == ASM_ATT || USER_LABEL_PREFIX[0] == 0) ! putc ('%', file); ! if (TARGET_64BIT) ! fputs ("fs:0", file); ! else ! fputs ("gs:0", file); return; } + if (! ix86_decompose_address (addr, &parts)) + abort (); + base = parts.base; index = parts.index; disp = parts.disp; *************** print_operand_address (file, addr) *** 6188,6194 **** output_addr_const (file, addr); /* Use one byte shorter RIP relative addressing for 64bit mode. */ ! if (GET_CODE (disp) != CONST_INT && TARGET_64BIT) fputs ("(%rip)", file); } else --- 7122,7136 ---- output_addr_const (file, addr); /* Use one byte shorter RIP relative addressing for 64bit mode. */ ! if (TARGET_64BIT ! && ((GET_CODE (addr) == SYMBOL_REF ! && ! tls_symbolic_operand (addr, GET_MODE (addr))) ! || GET_CODE (addr) == LABEL_REF ! || (GET_CODE (addr) == CONST ! && GET_CODE (XEXP (addr, 0)) == PLUS ! && (GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF ! || GET_CODE (XEXP (XEXP (addr, 0), 0)) == LABEL_REF) ! && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT))) fputs ("(%rip)", file); } else *************** print_operand_address (file, addr) *** 6270,6275 **** --- 7212,7269 ---- } } } + + bool + output_addr_const_extra (file, x) + FILE *file; + rtx x; + { + rtx op; + + if (GET_CODE (x) != UNSPEC) + return false; + + op = XVECEXP (x, 0, 0); + switch (XINT (x, 1)) + { + case UNSPEC_GOTTPOFF: + output_addr_const (file, op); + /* FIXME: This might be @TPOFF in Sun ld. */ + fputs ("@GOTTPOFF", file); + break; + case UNSPEC_TPOFF: + output_addr_const (file, op); + fputs ("@TPOFF", file); + break; + case UNSPEC_NTPOFF: + output_addr_const (file, op); + if (TARGET_64BIT) + fputs ("@TPOFF", file); + else + fputs ("@NTPOFF", file); + break; + case UNSPEC_DTPOFF: + output_addr_const (file, op); + fputs ("@DTPOFF", file); + break; + case UNSPEC_GOTNTPOFF: + output_addr_const (file, op); + if (TARGET_64BIT) + fputs ("@GOTTPOFF(%rip)", file); + else + fputs ("@GOTNTPOFF", file); + break; + case UNSPEC_INDNTPOFF: + output_addr_const (file, op); + fputs ("@INDNTPOFF", file); + break; + + default: + return false; + } + + return true; + } /* Split one or more DImode RTL references into pairs of SImode references. The RTL can be REG, offsettable MEM, integer constant, or *************** output_fp_compare (insn, operands, eflag *** 6639,6650 **** if (unordered_p) return "ucomiss\t{%1, %0|%0, %1}"; else ! return "comiss\t{%1, %0|%0, %y}"; else if (unordered_p) return "ucomisd\t{%1, %0|%0, %1}"; else ! return "comisd\t{%1, %0|%0, %y}"; } if (! STACK_TOP_P (cmp_op0)) --- 7633,7644 ---- if (unordered_p) return "ucomiss\t{%1, %0|%0, %1}"; else ! return "comiss\t{%1, %0|%0, %1}"; else if (unordered_p) return "ucomisd\t{%1, %0|%0, %1}"; else ! return "comisd\t{%1, %0|%0, %1}"; } if (! STACK_TOP_P (cmp_op0)) *************** ix86_output_addr_diff_elt (file, value, *** 6769,6781 **** int value, rel; { if (TARGET_64BIT) ! fprintf (file, "%s%s%d-.+(.-%s%d)\n", ASM_LONG, LPREFIX, value, LPREFIX, rel); else if (HAVE_AS_GOTOFF_IN_DATA) fprintf (file, "%s%s%d@GOTOFF\n", ASM_LONG, LPREFIX, value); else ! asm_fprintf (file, "%s%U_GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", ! ASM_LONG, LPREFIX, value); } /* Generate either "mov $0, reg" or "xor reg, reg", as appropriate --- 7763,7780 ---- int value, rel; { if (TARGET_64BIT) ! fprintf (file, "%s%s%d-%s%d\n", ASM_LONG, LPREFIX, value, LPREFIX, rel); else if (HAVE_AS_GOTOFF_IN_DATA) fprintf (file, "%s%s%d@GOTOFF\n", ASM_LONG, LPREFIX, value); + #if TARGET_MACHO + else if (TARGET_MACHO) + fprintf (file, "%s%s%d-%s\n", ASM_LONG, LPREFIX, value, + machopic_function_base_name () + 1); + #endif else ! asm_fprintf (file, "%s%U%s+[.-%s%d]\n", ! ASM_LONG, GOT_SYMBOL_NAME, LPREFIX, value); } /* Generate either "mov $0, reg" or "xor reg, reg", as appropriate *************** ix86_expand_clear (dest) *** 6807,6857 **** emit_insn (tmp); } void ix86_expand_move (mode, operands) enum machine_mode mode; rtx operands[]; { int strict = (reload_in_progress || reload_completed); ! rtx insn; ! if (flag_pic && mode == Pmode && symbolic_operand (operands[1], Pmode)) ! { ! /* Emit insns to move operands[1] into operands[0]. */ ! if (GET_CODE (operands[0]) == MEM) ! operands[1] = force_reg (Pmode, operands[1]); else { ! rtx temp = operands[0]; if (GET_CODE (temp) != REG) temp = gen_reg_rtx (Pmode); ! temp = legitimize_pic_address (operands[1], temp); ! if (temp == operands[0]) return; ! operands[1] = temp; } } else { ! if (GET_CODE (operands[0]) == MEM && (PUSH_ROUNDING (GET_MODE_SIZE (mode)) != GET_MODE_SIZE (mode) ! || !push_operand (operands[0], mode)) ! && GET_CODE (operands[1]) == MEM) ! operands[1] = force_reg (mode, operands[1]); ! if (push_operand (operands[0], mode) ! && ! general_no_elim_operand (operands[1], mode)) ! operands[1] = copy_to_mode_reg (mode, operands[1]); /* Force large constants in 64bit compilation into register to get them CSEed. */ if (TARGET_64BIT && mode == DImode ! && immediate_operand (operands[1], mode) ! && !x86_64_zero_extended_value (operands[1]) ! && !register_operand (operands[0], mode) && optimize && !reload_completed && !reload_in_progress) ! operands[1] = copy_to_mode_reg (mode, operands[1]); if (FLOAT_MODE_P (mode)) { --- 7806,7922 ---- emit_insn (tmp); } + /* X is an unchanging MEM. If it is a constant pool reference, return + the constant pool rtx, else NULL. */ + + static rtx + maybe_get_pool_constant (x) + rtx x; + { + x = XEXP (x, 0); + + if (flag_pic && ! TARGET_64BIT) + { + if (GET_CODE (x) != PLUS) + return NULL_RTX; + if (XEXP (x, 0) != pic_offset_table_rtx) + return NULL_RTX; + x = XEXP (x, 1); + if (GET_CODE (x) != CONST) + return NULL_RTX; + x = XEXP (x, 0); + if (GET_CODE (x) != UNSPEC) + return NULL_RTX; + if (XINT (x, 1) != UNSPEC_GOTOFF) + return NULL_RTX; + x = XVECEXP (x, 0, 0); + } + + if (GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x)) + return get_pool_constant (x); + + return NULL_RTX; + } + void ix86_expand_move (mode, operands) enum machine_mode mode; rtx operands[]; { int strict = (reload_in_progress || reload_completed); ! rtx insn, op0, op1, tmp; ! op0 = operands[0]; ! op1 = operands[1]; ! if (tls_symbolic_operand (op1, Pmode)) ! { ! op1 = legitimize_address (op1, op1, VOIDmode); ! if (GET_CODE (op0) == MEM) ! { ! tmp = gen_reg_rtx (mode); ! emit_insn (gen_rtx_SET (VOIDmode, tmp, op1)); ! op1 = tmp; ! } ! } ! else if (flag_pic && mode == Pmode && symbolic_operand (op1, Pmode)) ! { ! #if TARGET_MACHO ! if (MACHOPIC_PURE) ! { ! rtx temp = ((reload_in_progress ! || ((op0 && GET_CODE (op0) == REG) ! && mode == Pmode)) ! ? op0 : gen_reg_rtx (Pmode)); ! op1 = machopic_indirect_data_reference (op1, temp); ! op1 = machopic_legitimize_pic_address (op1, mode, ! temp == op1 ? 0 : temp); ! } else { ! if (MACHOPIC_INDIRECT) ! op1 = machopic_indirect_data_reference (op1, 0); ! } ! if (op0 != op1) ! { ! insn = gen_rtx_SET (VOIDmode, op0, op1); ! emit_insn (insn); ! } ! return; ! #endif /* TARGET_MACHO */ ! if (GET_CODE (op0) == MEM) ! op1 = force_reg (Pmode, op1); ! else ! { ! rtx temp = op0; if (GET_CODE (temp) != REG) temp = gen_reg_rtx (Pmode); ! temp = legitimize_pic_address (op1, temp); ! if (temp == op0) return; ! op1 = temp; } } else { ! if (GET_CODE (op0) == MEM && (PUSH_ROUNDING (GET_MODE_SIZE (mode)) != GET_MODE_SIZE (mode) ! || !push_operand (op0, mode)) ! && GET_CODE (op1) == MEM) ! op1 = force_reg (mode, op1); ! if (push_operand (op0, mode) ! && ! general_no_elim_operand (op1, mode)) ! op1 = copy_to_mode_reg (mode, op1); /* Force large constants in 64bit compilation into register to get them CSEed. */ if (TARGET_64BIT && mode == DImode ! && immediate_operand (op1, mode) ! && !x86_64_zero_extended_value (op1) ! && !register_operand (op0, mode) && optimize && !reload_completed && !reload_in_progress) ! op1 = copy_to_mode_reg (mode, op1); if (FLOAT_MODE_P (mode)) { *************** ix86_expand_move (mode, operands) *** 6861,6873 **** if (strict) ; ! else if (GET_CODE (operands[1]) == CONST_DOUBLE ! && register_operand (operands[0], mode)) ! operands[1] = validize_mem (force_const_mem (mode, operands[1])); } } ! insn = gen_rtx_SET (VOIDmode, operands[0], operands[1]); emit_insn (insn); } --- 7926,7946 ---- if (strict) ; ! else if (GET_CODE (op1) == CONST_DOUBLE) ! { ! op1 = validize_mem (force_const_mem (mode, op1)); ! if (!register_operand (op0, mode)) ! { ! rtx temp = gen_reg_rtx (mode); ! emit_insn (gen_rtx_SET (VOIDmode, temp, op1)); ! emit_move_insn (op0, temp); ! return; ! } ! } } } ! insn = gen_rtx_SET (VOIDmode, op0, op1); emit_insn (insn); } *************** ix86_expand_vector_move (mode, operands) *** 6883,6897 **** to handle some of them more efficiently. */ if ((reload_in_progress | reload_completed) == 0 && register_operand (operands[0], mode) ! && CONSTANT_P (operands[1])) { ! rtx addr = gen_reg_rtx (Pmode); ! emit_move_insn (addr, XEXP (force_const_mem (mode, operands[1]), 0)); ! operands[1] = gen_rtx_MEM (mode, addr); } /* Make operand1 a register if it isn't already. */ ! if ((reload_in_progress | reload_completed) == 0 && !register_operand (operands[0], mode) && !register_operand (operands[1], mode)) { --- 7956,7970 ---- to handle some of them more efficiently. */ if ((reload_in_progress | reload_completed) == 0 && register_operand (operands[0], mode) ! && CONSTANT_P (operands[1]) && operands[1] != CONST0_RTX (mode)) { ! operands[1] = force_const_mem (mode, operands[1]); ! emit_move_insn (operands[0], operands[1]); ! return; } /* Make operand1 a register if it isn't already. */ ! if (!no_new_pseudos && !register_operand (operands[0], mode) && !register_operand (operands[1], mode)) { *************** ix86_expand_vector_move (mode, operands) *** 6901,6907 **** } emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); ! } /* Attempt to expand a binary operator. Make the expansion closer to the actual machine, then just general_operand, which will allow 3 separate --- 7974,7980 ---- } emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); ! } /* Attempt to expand a binary operator. Make the expansion closer to the actual machine, then just general_operand, which will allow 3 separate *************** ix86_expand_fp_compare (code, op0, op1, *** 7549,7555 **** else { tmp = gen_rtx_COMPARE (fpcmp_mode, op0, op1); ! tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), 9); if (!scratch) scratch = gen_reg_rtx (HImode); emit_insn (gen_rtx_SET (VOIDmode, scratch, tmp2)); --- 8622,8628 ---- else { tmp = gen_rtx_COMPARE (fpcmp_mode, op0, op1); ! tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), UNSPEC_FNSTSW); if (!scratch) scratch = gen_reg_rtx (HImode); emit_insn (gen_rtx_SET (VOIDmode, scratch, tmp2)); *************** ix86_expand_fp_compare (code, op0, op1, *** 7572,7578 **** { /* Sadness wrt reg-stack pops killing fpsr -- gotta get fnstsw first. */ tmp = gen_rtx_COMPARE (fpcmp_mode, op0, op1); ! tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), 9); if (!scratch) scratch = gen_reg_rtx (HImode); emit_insn (gen_rtx_SET (VOIDmode, scratch, tmp2)); --- 8645,8651 ---- { /* Sadness wrt reg-stack pops killing fpsr -- gotta get fnstsw first. */ tmp = gen_rtx_COMPARE (fpcmp_mode, op0, op1); ! tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), UNSPEC_FNSTSW); if (!scratch) scratch = gen_reg_rtx (HImode); emit_insn (gen_rtx_SET (VOIDmode, scratch, tmp2)); *************** ix86_expand_branch (code, label) *** 7766,7772 **** code = ix86_prepare_fp_compare_args (code, &ix86_compare_op0, &ix86_compare_op1); ! ix86_fp_comparison_codes (code, &bypass_code, &first_code, &second_code); /* Check whether we will use the natural sequence with one jump. If --- 8839,8845 ---- code = ix86_prepare_fp_compare_args (code, &ix86_compare_op0, &ix86_compare_op1); ! ix86_fp_comparison_codes (code, &bypass_code, &first_code, &second_code); /* Check whether we will use the natural sequence with one jump. If *************** ix86_expand_int_movcc (operands) *** 8083,8089 **** start_sequence (); compare_op = ix86_expand_compare (code, &second_test, &bypass_test); ! compare_seq = gen_sequence (); end_sequence (); compare_code = GET_CODE (compare_op); --- 9156,9162 ---- start_sequence (); compare_op = ix86_expand_compare (code, &second_test, &bypass_test); ! compare_seq = get_insns (); end_sequence (); compare_code = GET_CODE (compare_op); *************** ix86_expand_int_movcc (operands) *** 8104,8117 **** if ((compare_code == LTU || compare_code == GEU) && !second_test && !bypass_test) { - /* Detect overlap between destination and compare sources. */ rtx tmp = out; /* To simplify rest of code, restrict to the GEU case. */ if (compare_code == LTU) { ! int tmp = ct; ct = cf; cf = tmp; compare_code = reverse_condition (compare_code); --- 9177,9189 ---- if ((compare_code == LTU || compare_code == GEU) && !second_test && !bypass_test) { /* Detect overlap between destination and compare sources. */ rtx tmp = out; /* To simplify rest of code, restrict to the GEU case. */ if (compare_code == LTU) { ! HOST_WIDE_INT tmp = ct; ct = cf; cf = tmp; compare_code = reverse_condition (compare_code); *************** ix86_expand_int_movcc (operands) *** 8161,8167 **** /* * cmpl op0,op1 * sbbl dest,dest ! * xorl $-1, dest * [addl dest, cf] * * Size 8 - 11. --- 9233,9239 ---- /* * cmpl op0,op1 * sbbl dest,dest ! * notl dest * [addl dest, cf] * * Size 8 - 11. *************** ix86_expand_int_movcc (operands) *** 8177,8191 **** /* * cmpl op0,op1 * sbbl dest,dest * andl cf - ct, dest * [addl dest, ct] * * Size 8 - 11. */ tmp = expand_simple_binop (mode, AND, tmp, ! GEN_INT (trunc_int_for_mode ! (cf - ct, mode)), tmp, 1, OPTAB_DIRECT); if (ct) tmp = expand_simple_binop (mode, PLUS, --- 9249,9271 ---- /* * cmpl op0,op1 * sbbl dest,dest + * [notl dest] * andl cf - ct, dest * [addl dest, ct] * * Size 8 - 11. */ + + if (cf == 0) + { + cf = ct; + ct = 0; + tmp = expand_simple_unop (mode, NOT, tmp, tmp, 1); + } + tmp = expand_simple_binop (mode, AND, tmp, ! gen_int_mode (cf - ct, mode), tmp, 1, OPTAB_DIRECT); if (ct) tmp = expand_simple_binop (mode, PLUS, *************** ix86_expand_int_movcc (operands) *** 8220,8225 **** --- 9300,9360 ---- code = reverse_condition (code); } } + + compare_code = NIL; + if (GET_MODE_CLASS (GET_MODE (ix86_compare_op0)) == MODE_INT + && GET_CODE (ix86_compare_op1) == CONST_INT) + { + if (ix86_compare_op1 == const0_rtx + && (code == LT || code == GE)) + compare_code = code; + else if (ix86_compare_op1 == constm1_rtx) + { + if (code == LE) + compare_code = LT; + else if (code == GT) + compare_code = GE; + } + } + + /* Optimize dest = (op0 < 0) ? -1 : cf. */ + if (compare_code != NIL + && GET_MODE (ix86_compare_op0) == GET_MODE (out) + && (cf == -1 || ct == -1)) + { + /* If lea code below could be used, only optimize + if it results in a 2 insn sequence. */ + + if (! (diff == 1 || diff == 2 || diff == 4 || diff == 8 + || diff == 3 || diff == 5 || diff == 9) + || (compare_code == LT && ct == -1) + || (compare_code == GE && cf == -1)) + { + /* + * notl op1 (if necessary) + * sarl $31, op1 + * orl cf, op1 + */ + if (ct != -1) + { + cf = ct; + ct = -1; + code = reverse_condition (code); + } + + out = emit_store_flag (out, code, ix86_compare_op0, + ix86_compare_op1, VOIDmode, 0, -1); + + out = expand_simple_binop (mode, IOR, + out, GEN_INT (cf), + out, 1, OPTAB_DIRECT); + if (out != operands[0]) + emit_move_insn (operands[0], out); + + return 1; /* DONE */ + } + } + if ((diff == 1 || diff == 2 || diff == 4 || diff == 8 || diff == 3 || diff == 5 || diff == 9) && (mode != DImode || x86_64_sign_extended_value (GEN_INT (cf)))) *************** ix86_expand_int_movcc (operands) *** 8242,8255 **** ix86_compare_op1, VOIDmode, 0, 1); nops = 0; ! /* On x86_64 the lea instruction operates on Pmode, so we need to get arithmetics ! done in proper mode to match. */ if (diff == 1) ! tmp = out; else { rtx out1; ! out1 = out; tmp = gen_rtx_MULT (mode, out1, GEN_INT (diff & ~1)); nops++; if (diff & 1) --- 9377,9390 ---- ix86_compare_op1, VOIDmode, 0, 1); nops = 0; ! /* On x86_64 the lea instruction operates on Pmode, so we need ! to get arithmetics done in proper mode to match. */ if (diff == 1) ! tmp = copy_rtx (out); else { rtx out1; ! out1 = copy_rtx (out); tmp = gen_rtx_MULT (mode, out1, GEN_INT (diff & ~1)); nops++; if (diff & 1) *************** ix86_expand_int_movcc (operands) *** 8267,8287 **** && (GET_CODE (tmp) != SUBREG || SUBREG_REG (tmp) != out)) { if (nops == 1) ! { ! rtx clob; ! ! clob = gen_rtx_REG (CCmode, FLAGS_REG); ! clob = gen_rtx_CLOBBER (VOIDmode, clob); ! ! tmp = gen_rtx_SET (VOIDmode, out, tmp); ! tmp = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, copy_rtx (tmp), clob)); ! emit_insn (tmp); ! } else ! emit_insn (gen_rtx_SET (VOIDmode, out, tmp)); } if (out != operands[0]) ! emit_move_insn (operands[0], out); return 1; /* DONE */ } --- 9402,9413 ---- && (GET_CODE (tmp) != SUBREG || SUBREG_REG (tmp) != out)) { if (nops == 1) ! out = force_operand (tmp, copy_rtx (out)); else ! emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (out), copy_rtx (tmp))); } if (out != operands[0]) ! emit_move_insn (operands[0], copy_rtx (out)); return 1; /* DONE */ } *************** ix86_expand_int_movcc (operands) *** 8307,8346 **** if (!optimize_size && !TARGET_CMOVE) { ! if (ct == 0) { ! ct = cf; ! cf = 0; if (FLOAT_MODE_P (GET_MODE (ix86_compare_op0))) { ! /* We may be reversing unordered compare to normal compare, ! that is not valid in general (we may convert non-trapping ! condition to trapping one), however on i386 we currently ! emit all comparisons unordered. */ ! compare_code = reverse_condition_maybe_unordered (compare_code); ! code = reverse_condition_maybe_unordered (code); } else { ! compare_code = reverse_condition (compare_code); ! code = reverse_condition (code); } } ! out = emit_store_flag (out, code, ix86_compare_op0, ! ix86_compare_op1, VOIDmode, 0, 1); ! out = expand_simple_binop (mode, PLUS, ! out, constm1_rtx, ! out, 1, OPTAB_DIRECT); ! out = expand_simple_binop (mode, AND, ! out, ! GEN_INT (trunc_int_for_mode ! (cf - ct, mode)), ! out, 1, OPTAB_DIRECT); ! out = expand_simple_binop (mode, PLUS, ! out, GEN_INT (ct), out, 1, OPTAB_DIRECT); if (out != operands[0]) emit_move_insn (operands[0], out); --- 9433,9500 ---- if (!optimize_size && !TARGET_CMOVE) { ! if (cf == 0) { ! cf = ct; ! ct = 0; if (FLOAT_MODE_P (GET_MODE (ix86_compare_op0))) + /* We may be reversing unordered compare to normal compare, + that is not valid in general (we may convert non-trapping + condition to trapping one), however on i386 we currently + emit all comparisons unordered. */ + code = reverse_condition_maybe_unordered (code); + else { ! code = reverse_condition (code); ! if (compare_code != NIL) ! compare_code = reverse_condition (compare_code); ! } ! } ! ! if (compare_code != NIL) ! { ! /* notl op1 (if needed) ! sarl $31, op1 ! andl (cf-ct), op1 ! addl ct, op1 ! ! For x < 0 (resp. x <= -1) there will be no notl, ! so if possible swap the constants to get rid of the ! complement. ! True/false will be -1/0 while code below (store flag ! followed by decrement) is 0/-1, so the constants need ! to be exchanged once more. */ ! ! if (compare_code == GE || !cf) ! { ! code = reverse_condition (code); ! compare_code = LT; } else { ! HOST_WIDE_INT tmp = cf; ! cf = ct; ! ct = tmp; } + + out = emit_store_flag (out, code, ix86_compare_op0, + ix86_compare_op1, VOIDmode, 0, -1); } + else + { + out = emit_store_flag (out, code, ix86_compare_op0, + ix86_compare_op1, VOIDmode, 0, 1); ! out = expand_simple_binop (mode, PLUS, out, constm1_rtx, ! out, 1, OPTAB_DIRECT); ! } ! out = expand_simple_binop (mode, AND, out, ! gen_int_mode (cf - ct, mode), out, 1, OPTAB_DIRECT); + if (ct) + out = expand_simple_binop (mode, PLUS, out, GEN_INT (ct), + out, 1, OPTAB_DIRECT); if (out != operands[0]) emit_move_insn (operands[0], out); *************** ix86_split_to_parts (operand, parts, mod *** 8631,8643 **** if (size < 2 || size > 3) abort (); ! /* Optimize constant pool reference to immediates. This is used by fp moves, ! that force all constants to memory to allow combining. */ ! ! if (GET_CODE (operand) == MEM ! && GET_CODE (XEXP (operand, 0)) == SYMBOL_REF ! && CONSTANT_POOL_ADDRESS_P (XEXP (operand, 0))) ! operand = get_pool_constant (XEXP (operand, 0)); if (GET_CODE (operand) == MEM && !offsettable_memref_p (operand)) { --- 9785,9798 ---- if (size < 2 || size > 3) abort (); ! /* Optimize constant pool reference to immediates. This is used by fp ! moves, that force all constants to memory to allow combining. */ ! if (GET_CODE (operand) == MEM && RTX_UNCHANGING_P (operand)) ! { ! rtx tmp = maybe_get_pool_constant (operand); ! if (tmp) ! operand = tmp; ! } if (GET_CODE (operand) == MEM && !offsettable_memref_p (operand)) { *************** ix86_split_to_parts (operand, parts, mod *** 8683,8689 **** case XFmode: case TFmode: REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l); ! parts[2] = GEN_INT (trunc_int_for_mode (l[2], SImode)); break; case DFmode: REAL_VALUE_TO_TARGET_DOUBLE (r, l); --- 9838,9844 ---- case XFmode: case TFmode: REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l); ! parts[2] = gen_int_mode (l[2], SImode); break; case DFmode: REAL_VALUE_TO_TARGET_DOUBLE (r, l); *************** ix86_split_to_parts (operand, parts, mod *** 8691,8698 **** default: abort (); } ! parts[1] = GEN_INT (trunc_int_for_mode (l[1], SImode)); ! parts[0] = GEN_INT (trunc_int_for_mode (l[0], SImode)); } else abort (); --- 9846,9853 ---- default: abort (); } ! parts[1] = gen_int_mode (l[1], SImode); ! parts[0] = gen_int_mode (l[0], SImode); } else abort (); *************** ix86_split_to_parts (operand, parts, mod *** 8727,8739 **** /* Do not use shift by 32 to avoid warning on 32bit systems. */ if (HOST_BITS_PER_WIDE_INT >= 64) parts[0] ! = GEN_INT (trunc_int_for_mode ((l[0] & (((HOST_WIDE_INT) 2 << 31) - 1)) + ((((HOST_WIDE_INT) l[1]) << 31) << 1), ! DImode)); else parts[0] = immed_double_const (l[0], l[1], DImode); ! parts[1] = GEN_INT (trunc_int_for_mode (l[2], SImode)); } else abort (); --- 9882,9894 ---- /* Do not use shift by 32 to avoid warning on 32bit systems. */ if (HOST_BITS_PER_WIDE_INT >= 64) parts[0] ! = gen_int_mode ((l[0] & (((HOST_WIDE_INT) 2 << 31) - 1)) + ((((HOST_WIDE_INT) l[1]) << 31) << 1), ! DImode); else parts[0] = immed_double_const (l[0], l[1], DImode); ! parts[1] = gen_int_mode (l[2], SImode); } else abort (); *************** ix86_expand_movstr (dst, src, count_exp, *** 9365,9371 **** end_sequence (); ix86_set_move_mem_attrs (insns, dst, src, destreg, srcreg); ! emit_insns (insns); return 1; } --- 10520,10526 ---- end_sequence (); ix86_set_move_mem_attrs (insns, dst, src, destreg, srcreg); ! emit_insn (insns); return 1; } *************** ix86_expand_strlensi_unroll_1 (out, alig *** 9766,9773 **** emit_insn (gen_one_cmplsi2 (scratch, scratch)); emit_insn (gen_andsi3 (tmpreg, tmpreg, scratch)); emit_insn (gen_andsi3 (tmpreg, tmpreg, ! GEN_INT (trunc_int_for_mode ! (0x80808080, SImode)))); emit_cmp_and_jump_insns (tmpreg, const0_rtx, EQ, 0, SImode, 1, align_4_label); --- 10921,10927 ---- emit_insn (gen_one_cmplsi2 (scratch, scratch)); emit_insn (gen_andsi3 (tmpreg, tmpreg, scratch)); emit_insn (gen_andsi3 (tmpreg, tmpreg, ! gen_int_mode (0x80808080, SImode))); emit_cmp_and_jump_insns (tmpreg, const0_rtx, EQ, 0, SImode, 1, align_4_label); *************** ix86_expand_strlensi_unroll_1 (out, alig *** 9833,9875 **** emit_label (end_0_label); } - - /* Clear stack slot assignments remembered from previous functions. - This is called from INIT_EXPANDERS once before RTL is emitted for each - function. */ ! static void ! ix86_init_machine_status (p) ! struct function *p; { ! p->machine = (struct machine_function *) ! xcalloc (1, sizeof (struct machine_function)); ! } ! /* Mark machine specific bits of P for GC. */ ! static void ! ix86_mark_machine_status (p) ! struct function *p; ! { ! struct machine_function *machine = p->machine; ! enum machine_mode mode; ! int n; ! if (! machine) ! return; ! for (mode = VOIDmode; (int) mode < (int) MAX_MACHINE_MODE; ! mode = (enum machine_mode) ((int) mode + 1)) ! for (n = 0; n < MAX_386_STACK_LOCALS; n++) ! ggc_mark_rtx (machine->stack_locals[(int) mode][n]); } ! static void ! ix86_free_machine_status (p) ! struct function *p; { ! free (p->machine); ! p->machine = NULL; } /* Return a MEM corresponding to a stack slot with mode MODE. --- 10987,11052 ---- emit_label (end_0_label); } ! void ! ix86_expand_call (retval, fnaddr, callarg1, callarg2, pop) ! rtx retval, fnaddr, callarg1, callarg2, pop; { ! rtx use = NULL, call; ! if (pop == const0_rtx) ! pop = NULL; ! if (TARGET_64BIT && pop) ! abort (); ! #if TARGET_MACHO ! if (flag_pic && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF) ! fnaddr = machopic_indirect_call_target (fnaddr); ! #else ! /* Static functions and indirect calls don't need the pic register. */ ! if (! TARGET_64BIT && flag_pic ! && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF ! && ! SYMBOL_REF_FLAG (XEXP (fnaddr, 0))) ! use_reg (&use, pic_offset_table_rtx); ! if (TARGET_64BIT && INTVAL (callarg2) >= 0) ! { ! rtx al = gen_rtx_REG (QImode, 0); ! emit_move_insn (al, callarg2); ! use_reg (&use, al); ! } ! #endif /* TARGET_MACHO */ ! ! if (! call_insn_operand (XEXP (fnaddr, 0), Pmode)) ! { ! fnaddr = copy_to_mode_reg (Pmode, XEXP (fnaddr, 0)); ! fnaddr = gen_rtx_MEM (QImode, fnaddr); ! } ! ! call = gen_rtx_CALL (VOIDmode, fnaddr, callarg1); ! if (retval) ! call = gen_rtx_SET (VOIDmode, retval, call); ! if (pop) ! { ! pop = gen_rtx_PLUS (Pmode, stack_pointer_rtx, pop); ! pop = gen_rtx_SET (VOIDmode, stack_pointer_rtx, pop); ! call = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, call, pop)); ! } ! ! call = emit_call_insn (call); ! if (use) ! CALL_INSN_FUNCTION_USAGE (call) = use; } ! ! /* Clear stack slot assignments remembered from previous functions. ! This is called from INIT_EXPANDERS once before RTL is emitted for each ! function. */ ! ! static struct machine_function * ! ix86_init_machine_status () { ! return ggc_alloc_cleared (sizeof (struct machine_function)); } /* Return a MEM corresponding to a stack slot with mode MODE. *************** assign_386_stack_local (mode, n) *** 9892,9897 **** --- 11069,11092 ---- return ix86_stack_locals[(int) mode][n]; } + + /* Construct the SYMBOL_REF for the tls_get_addr function. */ + + static GTY(()) rtx ix86_tls_symbol; + rtx + ix86_tls_get_addr () + { + + if (!ix86_tls_symbol) + { + ix86_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, + (TARGET_GNU_TLS && !TARGET_64BIT) + ? "___tls_get_addr" + : "__tls_get_addr"); + } + + return ix86_tls_symbol; + } /* Calculate the length of the memory address in the instruction encoding. Does not include the one-byte modrm, opcode, or prefix. */ *************** memory_address_length (addr) *** 9954,9961 **** return len; } ! /* Compute default value for "length_immediate" attribute. When SHORTFORM is set ! expect that insn have 8bit immediate alternative. */ int ix86_attr_length_immediate_default (insn, shortform) rtx insn; --- 11149,11156 ---- return len; } ! /* Compute default value for "length_immediate" attribute. When SHORTFORM ! is set, expect that insn have 8bit immediate alternative. */ int ix86_attr_length_immediate_default (insn, shortform) rtx insn; *************** static union *** 10301,10346 **** } ppro; } ix86_sched_data; - static int - ix86_safe_length (insn) - rtx insn; - { - if (recog_memoized (insn) >= 0) - return get_attr_length (insn); - else - return 128; - } - - static int - ix86_safe_length_prefix (insn) - rtx insn; - { - if (recog_memoized (insn) >= 0) - return get_attr_length (insn); - else - return 0; - } - - static enum attr_memory - ix86_safe_memory (insn) - rtx insn; - { - if (recog_memoized (insn) >= 0) - return get_attr_memory (insn); - else - return MEMORY_UNKNOWN; - } - - static enum attr_pent_pair - ix86_safe_pent_pair (insn) - rtx insn; - { - if (recog_memoized (insn) >= 0) - return get_attr_pent_pair (insn); - else - return PENT_PAIR_NP; - } - static enum attr_ppro_uops ix86_safe_ppro_uops (insn) rtx insn; --- 11496,11501 ---- *************** ix86_reorder_insn (insnp, slot) *** 10394,10522 **** } } - /* Find an instruction with given pairability and minimal amount of cycles - lost by the fact that the CPU waits for both pipelines to finish before - reading next instructions. Also take care that both instructions together - can not exceed 7 bytes. */ - - static rtx * - ix86_pent_find_pair (e_ready, ready, type, first) - rtx *e_ready; - rtx *ready; - enum attr_pent_pair type; - rtx first; - { - int mincycles, cycles; - enum attr_pent_pair tmp; - enum attr_memory memory; - rtx *insnp, *bestinsnp = NULL; - - if (ix86_safe_length (first) > 7 + ix86_safe_length_prefix (first)) - return NULL; - - memory = ix86_safe_memory (first); - cycles = result_ready_cost (first); - mincycles = INT_MAX; - - for (insnp = e_ready; insnp >= ready && mincycles; --insnp) - if ((tmp = ix86_safe_pent_pair (*insnp)) == type - && ix86_safe_length (*insnp) <= 7 + ix86_safe_length_prefix (*insnp)) - { - enum attr_memory second_memory; - int secondcycles, currentcycles; - - second_memory = ix86_safe_memory (*insnp); - secondcycles = result_ready_cost (*insnp); - currentcycles = abs (cycles - secondcycles); - - if (secondcycles >= 1 && cycles >= 1) - { - /* Two read/modify/write instructions together takes two - cycles longer. */ - if (memory == MEMORY_BOTH && second_memory == MEMORY_BOTH) - currentcycles += 2; - - /* Read modify/write instruction followed by read/modify - takes one cycle longer. */ - if (memory == MEMORY_BOTH && second_memory == MEMORY_LOAD - && tmp != PENT_PAIR_UV - && ix86_safe_pent_pair (first) != PENT_PAIR_UV) - currentcycles += 1; - } - if (currentcycles < mincycles) - bestinsnp = insnp, mincycles = currentcycles; - } - - return bestinsnp; - } - - /* Subroutines of ix86_sched_reorder. */ - - static void - ix86_sched_reorder_pentium (ready, e_ready) - rtx *ready; - rtx *e_ready; - { - enum attr_pent_pair pair1, pair2; - rtx *insnp; - - /* This wouldn't be necessary if Haifa knew that static insn ordering - is important to which pipe an insn is issued to. So we have to make - some minor rearrangements. */ - - pair1 = ix86_safe_pent_pair (*e_ready); - - /* If the first insn is non-pairable, let it be. */ - if (pair1 == PENT_PAIR_NP) - return; - - pair2 = PENT_PAIR_NP; - insnp = 0; - - /* If the first insn is UV or PV pairable, search for a PU - insn to go with. */ - if (pair1 == PENT_PAIR_UV || pair1 == PENT_PAIR_PV) - { - insnp = ix86_pent_find_pair (e_ready-1, ready, - PENT_PAIR_PU, *e_ready); - if (insnp) - pair2 = PENT_PAIR_PU; - } - - /* If the first insn is PU or UV pairable, search for a PV - insn to go with. */ - if (pair2 == PENT_PAIR_NP - && (pair1 == PENT_PAIR_PU || pair1 == PENT_PAIR_UV)) - { - insnp = ix86_pent_find_pair (e_ready-1, ready, - PENT_PAIR_PV, *e_ready); - if (insnp) - pair2 = PENT_PAIR_PV; - } - - /* If the first insn is pairable, search for a UV - insn to go with. */ - if (pair2 == PENT_PAIR_NP) - { - insnp = ix86_pent_find_pair (e_ready-1, ready, - PENT_PAIR_UV, *e_ready); - if (insnp) - pair2 = PENT_PAIR_UV; - } - - if (pair2 == PENT_PAIR_NP) - return; - - /* Found something! Decide if we need to swap the order. */ - if (pair1 == PENT_PAIR_PV || pair2 == PENT_PAIR_PU - || (pair1 == PENT_PAIR_UV && pair2 == PENT_PAIR_UV - && ix86_safe_memory (*e_ready) == MEMORY_BOTH - && ix86_safe_memory (*insnp) == MEMORY_LOAD)) - ix86_reorder_insn (insnp, e_ready); - else - ix86_reorder_insn (insnp, e_ready - 1); - } - static void ix86_sched_reorder_ppro (ready, e_ready) rtx *ready; --- 11549,11554 ---- *************** ix86_sched_reorder_ppro (ready, e_ready) *** 10571,10577 **** for (i = 1; i < 3; ++i) if (decode[i] == NULL) { ! if (ready >= e_ready) goto ppro_done; insnp = e_ready; --- 11603,11609 ---- for (i = 1; i < 3; ++i) if (decode[i] == NULL) { ! if (ready > e_ready) goto ppro_done; insnp = e_ready; *************** ix86_sched_reorder (dump, sched_verbose, *** 10615,10632 **** int n_ready = *n_readyp; rtx *e_ready = ready + n_ready - 1; if (n_ready < 2) ! goto out; switch (ix86_cpu) { default: break; - case PROCESSOR_PENTIUM: - ix86_sched_reorder_pentium (ready, e_ready); - break; - case PROCESSOR_PENTIUMPRO: ix86_sched_reorder_ppro (ready, e_ready); break; --- 11647,11666 ---- int n_ready = *n_readyp; rtx *e_ready = ready + n_ready - 1; + /* Make sure to go ahead and initialize key items in + ix86_sched_data if we are not going to bother trying to + reorder the ready queue. */ if (n_ready < 2) ! { ! ix86_sched_data.ppro.issued_this_cycle = 1; ! goto out; ! } switch (ix86_cpu) { default: break; case PROCESSOR_PENTIUMPRO: ix86_sched_reorder_ppro (ready, e_ready); break; *************** ix86_variable_issue (dump, sched_verbose *** 10698,10703 **** --- 11732,11759 ---- return --ix86_sched_data.ppro.issued_this_cycle; } } + + static int + ia32_use_dfa_pipeline_interface () + { + if (ix86_cpu == PROCESSOR_PENTIUM) + return 1; + return 0; + } + + /* How many alternative schedules to try. This should be as wide as the + scheduling freedom in the DFA, but no wider. Making this value too + large results extra work for the scheduler. */ + + static int + ia32_multipass_dfa_lookahead () + { + if (ix86_cpu == PROCESSOR_PENTIUM) + return 2; + else + return 0; + } + /* Walk through INSNS and look for MEM references whose address is DSTREG or SRCREG and set the memory attribute to those of DSTREF and SRCREF, as *************** x86_initialize_trampoline (tramp, fnaddr *** 10907,10916 **** plus_constant (tramp, 10), NULL_RTX, 1, OPTAB_DIRECT); emit_move_insn (gen_rtx_MEM (QImode, tramp), ! GEN_INT (trunc_int_for_mode (0xb9, QImode))); emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 1)), cxt); emit_move_insn (gen_rtx_MEM (QImode, plus_constant (tramp, 5)), ! GEN_INT (trunc_int_for_mode (0xe9, QImode))); emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 6)), disp); } else --- 11963,11972 ---- plus_constant (tramp, 10), NULL_RTX, 1, OPTAB_DIRECT); emit_move_insn (gen_rtx_MEM (QImode, tramp), ! gen_int_mode (0xb9, QImode)); emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 1)), cxt); emit_move_insn (gen_rtx_MEM (QImode, plus_constant (tramp, 5)), ! gen_int_mode (0xe9, QImode)); emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 6)), disp); } else *************** x86_initialize_trampoline (tramp, fnaddr *** 10923,10929 **** { fnaddr = copy_to_mode_reg (DImode, fnaddr); emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! GEN_INT (trunc_int_for_mode (0xbb41, HImode))); emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, offset + 2)), gen_lowpart (SImode, fnaddr)); offset += 6; --- 11979,11985 ---- { fnaddr = copy_to_mode_reg (DImode, fnaddr); emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! gen_int_mode (0xbb41, HImode)); emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, offset + 2)), gen_lowpart (SImode, fnaddr)); offset += 6; *************** x86_initialize_trampoline (tramp, fnaddr *** 10931,10962 **** else { emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! GEN_INT (trunc_int_for_mode (0xbb49, HImode))); emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, offset + 2)), fnaddr); offset += 10; } /* Load static chain using movabs to r10. */ emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! GEN_INT (trunc_int_for_mode (0xba49, HImode))); emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, offset + 2)), cxt); offset += 10; /* Jump to the r11 */ emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! GEN_INT (trunc_int_for_mode (0xff49, HImode))); emit_move_insn (gen_rtx_MEM (QImode, plus_constant (tramp, offset+2)), ! GEN_INT (trunc_int_for_mode (0xe3, QImode))); offset += 3; if (offset > TRAMPOLINE_SIZE) abort (); } } ! #define def_builtin(MASK, NAME, TYPE, CODE) \ ! do { \ ! if ((MASK) & target_flags) \ ! builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL); \ } while (0) struct builtin_description --- 11987,12025 ---- else { emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! gen_int_mode (0xbb49, HImode)); emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, offset + 2)), fnaddr); offset += 10; } /* Load static chain using movabs to r10. */ emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! gen_int_mode (0xba49, HImode)); emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, offset + 2)), cxt); offset += 10; /* Jump to the r11 */ emit_move_insn (gen_rtx_MEM (HImode, plus_constant (tramp, offset)), ! gen_int_mode (0xff49, HImode)); emit_move_insn (gen_rtx_MEM (QImode, plus_constant (tramp, offset+2)), ! gen_int_mode (0xe3, QImode)); offset += 3; if (offset > TRAMPOLINE_SIZE) abort (); } + + #ifdef TRANSFER_FROM_TRAMPOLINE + emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"), + LCT_NORMAL, VOIDmode, 1, tramp, Pmode); + #endif } ! #define def_builtin(MASK, NAME, TYPE, CODE) \ ! do { \ ! if ((MASK) & target_flags \ ! && (!((MASK) & MASK_64BIT) || TARGET_64BIT)) \ ! builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ ! NULL, NULL_TREE); \ } while (0) struct builtin_description *************** struct builtin_description *** 10969,11041 **** const unsigned int flag; }; static const struct builtin_description bdesc_comi[] = { ! { MASK_SSE, CODE_FOR_sse_comi, "__builtin_ia32_comieq", IX86_BUILTIN_COMIEQSS, EQ, 0 }, ! { MASK_SSE, CODE_FOR_sse_comi, "__builtin_ia32_comilt", IX86_BUILTIN_COMILTSS, LT, 0 }, ! { MASK_SSE, CODE_FOR_sse_comi, "__builtin_ia32_comile", IX86_BUILTIN_COMILESS, LE, 0 }, ! { MASK_SSE, CODE_FOR_sse_comi, "__builtin_ia32_comigt", IX86_BUILTIN_COMIGTSS, LT, 1 }, ! { MASK_SSE, CODE_FOR_sse_comi, "__builtin_ia32_comige", IX86_BUILTIN_COMIGESS, LE, 1 }, ! { MASK_SSE, CODE_FOR_sse_comi, "__builtin_ia32_comineq", IX86_BUILTIN_COMINEQSS, NE, 0 }, ! { MASK_SSE, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomieq", IX86_BUILTIN_UCOMIEQSS, EQ, 0 }, ! { MASK_SSE, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomilt", IX86_BUILTIN_UCOMILTSS, LT, 0 }, ! { MASK_SSE, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomile", IX86_BUILTIN_UCOMILESS, LE, 0 }, ! { MASK_SSE, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomigt", IX86_BUILTIN_UCOMIGTSS, LT, 1 }, ! { MASK_SSE, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomige", IX86_BUILTIN_UCOMIGESS, LE, 1 }, ! { MASK_SSE, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomineq", IX86_BUILTIN_UCOMINEQSS, NE, 0 } }; static const struct builtin_description bdesc_2arg[] = { /* SSE */ ! { MASK_SSE, CODE_FOR_addv4sf3, "__builtin_ia32_addps", IX86_BUILTIN_ADDPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_subv4sf3, "__builtin_ia32_subps", IX86_BUILTIN_SUBPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_mulv4sf3, "__builtin_ia32_mulps", IX86_BUILTIN_MULPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_divv4sf3, "__builtin_ia32_divps", IX86_BUILTIN_DIVPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_vmaddv4sf3, "__builtin_ia32_addss", IX86_BUILTIN_ADDSS, 0, 0 }, ! { MASK_SSE, CODE_FOR_vmsubv4sf3, "__builtin_ia32_subss", IX86_BUILTIN_SUBSS, 0, 0 }, ! { MASK_SSE, CODE_FOR_vmmulv4sf3, "__builtin_ia32_mulss", IX86_BUILTIN_MULSS, 0, 0 }, ! { MASK_SSE, CODE_FOR_vmdivv4sf3, "__builtin_ia32_divss", IX86_BUILTIN_DIVSS, 0, 0 }, ! { MASK_SSE, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpeqps", IX86_BUILTIN_CMPEQPS, EQ, 0 }, ! { MASK_SSE, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpltps", IX86_BUILTIN_CMPLTPS, LT, 0 }, ! { MASK_SSE, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpleps", IX86_BUILTIN_CMPLEPS, LE, 0 }, ! { MASK_SSE, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpgtps", IX86_BUILTIN_CMPGTPS, LT, 1 }, ! { MASK_SSE, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpgeps", IX86_BUILTIN_CMPGEPS, LE, 1 }, ! { MASK_SSE, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpunordps", IX86_BUILTIN_CMPUNORDPS, UNORDERED, 0 }, ! { MASK_SSE, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpneqps", IX86_BUILTIN_CMPNEQPS, EQ, 0 }, ! { MASK_SSE, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpnltps", IX86_BUILTIN_CMPNLTPS, LT, 0 }, ! { MASK_SSE, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpnleps", IX86_BUILTIN_CMPNLEPS, LE, 0 }, ! { MASK_SSE, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpngtps", IX86_BUILTIN_CMPNGTPS, LT, 1 }, ! { MASK_SSE, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpngeps", IX86_BUILTIN_CMPNGEPS, LE, 1 }, ! { MASK_SSE, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpordps", IX86_BUILTIN_CMPORDPS, UNORDERED, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpeqss", IX86_BUILTIN_CMPEQSS, EQ, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpltss", IX86_BUILTIN_CMPLTSS, LT, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpless", IX86_BUILTIN_CMPLESS, LE, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpunordss", IX86_BUILTIN_CMPUNORDSS, UNORDERED, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpneqss", IX86_BUILTIN_CMPNEQSS, EQ, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpnltss", IX86_BUILTIN_CMPNLTSS, LT, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpnless", IX86_BUILTIN_CMPNLESS, LE, 0 }, ! { MASK_SSE, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpordss", IX86_BUILTIN_CMPORDSS, UNORDERED, 0 }, ! { MASK_SSE, CODE_FOR_sminv4sf3, "__builtin_ia32_minps", IX86_BUILTIN_MINPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_smaxv4sf3, "__builtin_ia32_maxps", IX86_BUILTIN_MAXPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_vmsminv4sf3, "__builtin_ia32_minss", IX86_BUILTIN_MINSS, 0, 0 }, ! { MASK_SSE, CODE_FOR_vmsmaxv4sf3, "__builtin_ia32_maxss", IX86_BUILTIN_MAXSS, 0, 0 }, ! { MASK_SSE, CODE_FOR_sse_movss, "__builtin_ia32_movss", IX86_BUILTIN_MOVSS, 0, 0 }, ! { MASK_SSE, CODE_FOR_sse_movhlps, "__builtin_ia32_movhlps", IX86_BUILTIN_MOVHLPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_sse_movlhps, "__builtin_ia32_movlhps", IX86_BUILTIN_MOVLHPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_sse_unpckhps, "__builtin_ia32_unpckhps", IX86_BUILTIN_UNPCKHPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_sse_unpcklps, "__builtin_ia32_unpcklps", IX86_BUILTIN_UNPCKLPS, 0, 0 }, /* MMX */ { MASK_MMX, CODE_FOR_addv8qi3, "__builtin_ia32_paddb", IX86_BUILTIN_PADDB, 0, 0 }, { MASK_MMX, CODE_FOR_addv4hi3, "__builtin_ia32_paddw", IX86_BUILTIN_PADDW, 0, 0 }, { MASK_MMX, CODE_FOR_addv2si3, "__builtin_ia32_paddd", IX86_BUILTIN_PADDD, 0, 0 }, { MASK_MMX, CODE_FOR_subv8qi3, "__builtin_ia32_psubb", IX86_BUILTIN_PSUBB, 0, 0 }, { MASK_MMX, CODE_FOR_subv4hi3, "__builtin_ia32_psubw", IX86_BUILTIN_PSUBW, 0, 0 }, { MASK_MMX, CODE_FOR_subv2si3, "__builtin_ia32_psubd", IX86_BUILTIN_PSUBD, 0, 0 }, { MASK_MMX, CODE_FOR_ssaddv8qi3, "__builtin_ia32_paddsb", IX86_BUILTIN_PADDSB, 0, 0 }, { MASK_MMX, CODE_FOR_ssaddv4hi3, "__builtin_ia32_paddsw", IX86_BUILTIN_PADDSW, 0, 0 }, --- 12032,12128 ---- const unsigned int flag; }; + /* Used for builtins that are enabled both by -msse and -msse2. */ + #define MASK_SSE1 (MASK_SSE | MASK_SSE2) + #define MASK_SSE164 (MASK_SSE | MASK_SSE2 | MASK_64BIT) + #define MASK_SSE264 (MASK_SSE2 | MASK_64BIT) + static const struct builtin_description bdesc_comi[] = { ! { MASK_SSE1, CODE_FOR_sse_comi, "__builtin_ia32_comieq", IX86_BUILTIN_COMIEQSS, UNEQ, 0 }, ! { MASK_SSE1, CODE_FOR_sse_comi, "__builtin_ia32_comilt", IX86_BUILTIN_COMILTSS, UNLT, 0 }, ! { MASK_SSE1, CODE_FOR_sse_comi, "__builtin_ia32_comile", IX86_BUILTIN_COMILESS, UNLE, 0 }, ! { MASK_SSE1, CODE_FOR_sse_comi, "__builtin_ia32_comigt", IX86_BUILTIN_COMIGTSS, GT, 0 }, ! { MASK_SSE1, CODE_FOR_sse_comi, "__builtin_ia32_comige", IX86_BUILTIN_COMIGESS, GE, 0 }, ! { MASK_SSE1, CODE_FOR_sse_comi, "__builtin_ia32_comineq", IX86_BUILTIN_COMINEQSS, LTGT, 0 }, ! { MASK_SSE1, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomieq", IX86_BUILTIN_UCOMIEQSS, UNEQ, 0 }, ! { MASK_SSE1, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomilt", IX86_BUILTIN_UCOMILTSS, UNLT, 0 }, ! { MASK_SSE1, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomile", IX86_BUILTIN_UCOMILESS, UNLE, 0 }, ! { MASK_SSE1, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomigt", IX86_BUILTIN_UCOMIGTSS, GT, 0 }, ! { MASK_SSE1, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomige", IX86_BUILTIN_UCOMIGESS, GE, 0 }, ! { MASK_SSE1, CODE_FOR_sse_ucomi, "__builtin_ia32_ucomineq", IX86_BUILTIN_UCOMINEQSS, LTGT, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_comi, "__builtin_ia32_comisdeq", IX86_BUILTIN_COMIEQSD, UNEQ, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_comi, "__builtin_ia32_comisdlt", IX86_BUILTIN_COMILTSD, UNLT, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_comi, "__builtin_ia32_comisdle", IX86_BUILTIN_COMILESD, UNLE, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_comi, "__builtin_ia32_comisdgt", IX86_BUILTIN_COMIGTSD, GT, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_comi, "__builtin_ia32_comisdge", IX86_BUILTIN_COMIGESD, GE, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_comi, "__builtin_ia32_comisdneq", IX86_BUILTIN_COMINEQSD, LTGT, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_ucomi, "__builtin_ia32_ucomisdeq", IX86_BUILTIN_UCOMIEQSD, UNEQ, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_ucomi, "__builtin_ia32_ucomisdlt", IX86_BUILTIN_UCOMILTSD, UNLT, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_ucomi, "__builtin_ia32_ucomisdle", IX86_BUILTIN_UCOMILESD, UNLE, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_ucomi, "__builtin_ia32_ucomisdgt", IX86_BUILTIN_UCOMIGTSD, GT, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_ucomi, "__builtin_ia32_ucomisdge", IX86_BUILTIN_UCOMIGESD, GE, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_ucomi, "__builtin_ia32_ucomisdneq", IX86_BUILTIN_UCOMINEQSD, LTGT, 0 }, }; static const struct builtin_description bdesc_2arg[] = { /* SSE */ ! { MASK_SSE1, CODE_FOR_addv4sf3, "__builtin_ia32_addps", IX86_BUILTIN_ADDPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_subv4sf3, "__builtin_ia32_subps", IX86_BUILTIN_SUBPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_mulv4sf3, "__builtin_ia32_mulps", IX86_BUILTIN_MULPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_divv4sf3, "__builtin_ia32_divps", IX86_BUILTIN_DIVPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_vmaddv4sf3, "__builtin_ia32_addss", IX86_BUILTIN_ADDSS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_vmsubv4sf3, "__builtin_ia32_subss", IX86_BUILTIN_SUBSS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_vmmulv4sf3, "__builtin_ia32_mulss", IX86_BUILTIN_MULSS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_vmdivv4sf3, "__builtin_ia32_divss", IX86_BUILTIN_DIVSS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpeqps", IX86_BUILTIN_CMPEQPS, EQ, 0 }, ! { MASK_SSE1, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpltps", IX86_BUILTIN_CMPLTPS, LT, 0 }, ! { MASK_SSE1, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpleps", IX86_BUILTIN_CMPLEPS, LE, 0 }, ! { MASK_SSE1, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpgtps", IX86_BUILTIN_CMPGTPS, LT, 1 }, ! { MASK_SSE1, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpgeps", IX86_BUILTIN_CMPGEPS, LE, 1 }, ! { MASK_SSE1, CODE_FOR_maskcmpv4sf3, "__builtin_ia32_cmpunordps", IX86_BUILTIN_CMPUNORDPS, UNORDERED, 0 }, ! { MASK_SSE1, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpneqps", IX86_BUILTIN_CMPNEQPS, EQ, 0 }, ! { MASK_SSE1, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpnltps", IX86_BUILTIN_CMPNLTPS, LT, 0 }, ! { MASK_SSE1, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpnleps", IX86_BUILTIN_CMPNLEPS, LE, 0 }, ! { MASK_SSE1, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpngtps", IX86_BUILTIN_CMPNGTPS, LT, 1 }, ! { MASK_SSE1, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpngeps", IX86_BUILTIN_CMPNGEPS, LE, 1 }, ! { MASK_SSE1, CODE_FOR_maskncmpv4sf3, "__builtin_ia32_cmpordps", IX86_BUILTIN_CMPORDPS, UNORDERED, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpeqss", IX86_BUILTIN_CMPEQSS, EQ, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpltss", IX86_BUILTIN_CMPLTSS, LT, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpless", IX86_BUILTIN_CMPLESS, LE, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskcmpv4sf3, "__builtin_ia32_cmpunordss", IX86_BUILTIN_CMPUNORDSS, UNORDERED, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpneqss", IX86_BUILTIN_CMPNEQSS, EQ, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpnltss", IX86_BUILTIN_CMPNLTSS, LT, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpnless", IX86_BUILTIN_CMPNLESS, LE, 0 }, ! { MASK_SSE1, CODE_FOR_vmmaskncmpv4sf3, "__builtin_ia32_cmpordss", IX86_BUILTIN_CMPORDSS, UNORDERED, 0 }, ! { MASK_SSE1, CODE_FOR_sminv4sf3, "__builtin_ia32_minps", IX86_BUILTIN_MINPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_smaxv4sf3, "__builtin_ia32_maxps", IX86_BUILTIN_MAXPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_vmsminv4sf3, "__builtin_ia32_minss", IX86_BUILTIN_MINSS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_vmsmaxv4sf3, "__builtin_ia32_maxss", IX86_BUILTIN_MAXSS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_andv4sf3, "__builtin_ia32_andps", IX86_BUILTIN_ANDPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_nandv4sf3, "__builtin_ia32_andnps", IX86_BUILTIN_ANDNPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_iorv4sf3, "__builtin_ia32_orps", IX86_BUILTIN_ORPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_xorv4sf3, "__builtin_ia32_xorps", IX86_BUILTIN_XORPS, 0, 0 }, ! ! { MASK_SSE1, CODE_FOR_sse_movss, "__builtin_ia32_movss", IX86_BUILTIN_MOVSS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_movhlps, "__builtin_ia32_movhlps", IX86_BUILTIN_MOVHLPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_movlhps, "__builtin_ia32_movlhps", IX86_BUILTIN_MOVLHPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_unpckhps, "__builtin_ia32_unpckhps", IX86_BUILTIN_UNPCKHPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_unpcklps, "__builtin_ia32_unpcklps", IX86_BUILTIN_UNPCKLPS, 0, 0 }, /* MMX */ { MASK_MMX, CODE_FOR_addv8qi3, "__builtin_ia32_paddb", IX86_BUILTIN_PADDB, 0, 0 }, { MASK_MMX, CODE_FOR_addv4hi3, "__builtin_ia32_paddw", IX86_BUILTIN_PADDW, 0, 0 }, { MASK_MMX, CODE_FOR_addv2si3, "__builtin_ia32_paddd", IX86_BUILTIN_PADDD, 0, 0 }, + { MASK_MMX, CODE_FOR_mmx_adddi3, "__builtin_ia32_paddq", IX86_BUILTIN_PADDQ, 0, 0 }, { MASK_MMX, CODE_FOR_subv8qi3, "__builtin_ia32_psubb", IX86_BUILTIN_PSUBB, 0, 0 }, { MASK_MMX, CODE_FOR_subv4hi3, "__builtin_ia32_psubw", IX86_BUILTIN_PSUBW, 0, 0 }, { MASK_MMX, CODE_FOR_subv2si3, "__builtin_ia32_psubd", IX86_BUILTIN_PSUBD, 0, 0 }, + { MASK_MMX, CODE_FOR_mmx_subdi3, "__builtin_ia32_psubq", IX86_BUILTIN_PSUBQ, 0, 0 }, { MASK_MMX, CODE_FOR_ssaddv8qi3, "__builtin_ia32_paddsb", IX86_BUILTIN_PADDSB, 0, 0 }, { MASK_MMX, CODE_FOR_ssaddv4hi3, "__builtin_ia32_paddsw", IX86_BUILTIN_PADDSW, 0, 0 }, *************** static const struct builtin_description *** 11048,11062 **** { MASK_MMX, CODE_FOR_mulv4hi3, "__builtin_ia32_pmullw", IX86_BUILTIN_PMULLW, 0, 0 }, { MASK_MMX, CODE_FOR_smulv4hi3_highpart, "__builtin_ia32_pmulhw", IX86_BUILTIN_PMULHW, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_umulv4hi3_highpart, "__builtin_ia32_pmulhuw", IX86_BUILTIN_PMULHUW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_anddi3, "__builtin_ia32_pand", IX86_BUILTIN_PAND, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_nanddi3, "__builtin_ia32_pandn", IX86_BUILTIN_PANDN, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_iordi3, "__builtin_ia32_por", IX86_BUILTIN_POR, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_xordi3, "__builtin_ia32_pxor", IX86_BUILTIN_PXOR, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uavgv8qi3, "__builtin_ia32_pavgb", IX86_BUILTIN_PAVGB, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uavgv4hi3, "__builtin_ia32_pavgw", IX86_BUILTIN_PAVGW, 0, 0 }, { MASK_MMX, CODE_FOR_eqv8qi3, "__builtin_ia32_pcmpeqb", IX86_BUILTIN_PCMPEQB, 0, 0 }, { MASK_MMX, CODE_FOR_eqv4hi3, "__builtin_ia32_pcmpeqw", IX86_BUILTIN_PCMPEQW, 0, 0 }, --- 12135,12149 ---- { MASK_MMX, CODE_FOR_mulv4hi3, "__builtin_ia32_pmullw", IX86_BUILTIN_PMULLW, 0, 0 }, { MASK_MMX, CODE_FOR_smulv4hi3_highpart, "__builtin_ia32_pmulhw", IX86_BUILTIN_PMULHW, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_umulv4hi3_highpart, "__builtin_ia32_pmulhuw", IX86_BUILTIN_PMULHUW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_anddi3, "__builtin_ia32_pand", IX86_BUILTIN_PAND, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_nanddi3, "__builtin_ia32_pandn", IX86_BUILTIN_PANDN, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_iordi3, "__builtin_ia32_por", IX86_BUILTIN_POR, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_xordi3, "__builtin_ia32_pxor", IX86_BUILTIN_PXOR, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_mmx_uavgv8qi3, "__builtin_ia32_pavgb", IX86_BUILTIN_PAVGB, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_mmx_uavgv4hi3, "__builtin_ia32_pavgw", IX86_BUILTIN_PAVGW, 0, 0 }, { MASK_MMX, CODE_FOR_eqv8qi3, "__builtin_ia32_pcmpeqb", IX86_BUILTIN_PCMPEQB, 0, 0 }, { MASK_MMX, CODE_FOR_eqv4hi3, "__builtin_ia32_pcmpeqw", IX86_BUILTIN_PCMPEQW, 0, 0 }, *************** static const struct builtin_description *** 11065,11074 **** { MASK_MMX, CODE_FOR_gtv4hi3, "__builtin_ia32_pcmpgtw", IX86_BUILTIN_PCMPGTW, 0, 0 }, { MASK_MMX, CODE_FOR_gtv2si3, "__builtin_ia32_pcmpgtd", IX86_BUILTIN_PCMPGTD, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_umaxv8qi3, "__builtin_ia32_pmaxub", IX86_BUILTIN_PMAXUB, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_smaxv4hi3, "__builtin_ia32_pmaxsw", IX86_BUILTIN_PMAXSW, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_uminv8qi3, "__builtin_ia32_pminub", IX86_BUILTIN_PMINUB, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_sminv4hi3, "__builtin_ia32_pminsw", IX86_BUILTIN_PMINSW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_punpckhbw, "__builtin_ia32_punpckhbw", IX86_BUILTIN_PUNPCKHBW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_punpckhwd, "__builtin_ia32_punpckhwd", IX86_BUILTIN_PUNPCKHWD, 0, 0 }, --- 12152,12161 ---- { MASK_MMX, CODE_FOR_gtv4hi3, "__builtin_ia32_pcmpgtw", IX86_BUILTIN_PCMPGTW, 0, 0 }, { MASK_MMX, CODE_FOR_gtv2si3, "__builtin_ia32_pcmpgtd", IX86_BUILTIN_PCMPGTD, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_umaxv8qi3, "__builtin_ia32_pmaxub", IX86_BUILTIN_PMAXUB, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_smaxv4hi3, "__builtin_ia32_pmaxsw", IX86_BUILTIN_PMAXSW, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_uminv8qi3, "__builtin_ia32_pminub", IX86_BUILTIN_PMINUB, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_sminv4hi3, "__builtin_ia32_pminsw", IX86_BUILTIN_PMINSW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_punpckhbw, "__builtin_ia32_punpckhbw", IX86_BUILTIN_PUNPCKHBW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_punpckhwd, "__builtin_ia32_punpckhwd", IX86_BUILTIN_PUNPCKHWD, 0, 0 }, *************** static const struct builtin_description *** 11082,11089 **** { MASK_MMX, CODE_FOR_mmx_packssdw, 0, IX86_BUILTIN_PACKSSDW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_packuswb, 0, IX86_BUILTIN_PACKUSWB, 0, 0 }, ! { MASK_SSE, CODE_FOR_cvtpi2ps, 0, IX86_BUILTIN_CVTPI2PS, 0, 0 }, ! { MASK_SSE, CODE_FOR_cvtsi2ss, 0, IX86_BUILTIN_CVTSI2SS, 0, 0 }, { MASK_MMX, CODE_FOR_ashlv4hi3, 0, IX86_BUILTIN_PSLLW, 0, 0 }, { MASK_MMX, CODE_FOR_ashlv4hi3, 0, IX86_BUILTIN_PSLLWI, 0, 0 }, --- 12169,12177 ---- { MASK_MMX, CODE_FOR_mmx_packssdw, 0, IX86_BUILTIN_PACKSSDW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_packuswb, 0, IX86_BUILTIN_PACKUSWB, 0, 0 }, ! { MASK_SSE1, CODE_FOR_cvtpi2ps, 0, IX86_BUILTIN_CVTPI2PS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_cvtsi2ss, 0, IX86_BUILTIN_CVTSI2SS, 0, 0 }, ! { MASK_SSE164, CODE_FOR_cvtsi2ssq, 0, IX86_BUILTIN_CVTSI642SS, 0, 0 }, { MASK_MMX, CODE_FOR_ashlv4hi3, 0, IX86_BUILTIN_PSLLW, 0, 0 }, { MASK_MMX, CODE_FOR_ashlv4hi3, 0, IX86_BUILTIN_PSLLWI, 0, 0 }, *************** static const struct builtin_description *** 11104,11128 **** { MASK_MMX, CODE_FOR_ashrv2si3, 0, IX86_BUILTIN_PSRAD, 0, 0 }, { MASK_MMX, CODE_FOR_ashrv2si3, 0, IX86_BUILTIN_PSRADI, 0, 0 }, ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_psadbw, 0, IX86_BUILTIN_PSADBW, 0, 0 }, ! { MASK_MMX, CODE_FOR_mmx_pmaddwd, 0, IX86_BUILTIN_PMADDWD, 0, 0 } }; static const struct builtin_description bdesc_1arg[] = { ! { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_pmovmskb, 0, IX86_BUILTIN_PMOVMSKB, 0, 0 }, ! { MASK_SSE, CODE_FOR_sse_movmskps, 0, IX86_BUILTIN_MOVMSKPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_sqrtv4sf2, 0, IX86_BUILTIN_SQRTPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_rsqrtv4sf2, 0, IX86_BUILTIN_RSQRTPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_rcpv4sf2, 0, IX86_BUILTIN_RCPPS, 0, 0 }, ! { MASK_SSE, CODE_FOR_cvtps2pi, 0, IX86_BUILTIN_CVTPS2PI, 0, 0 }, ! { MASK_SSE, CODE_FOR_cvtss2si, 0, IX86_BUILTIN_CVTSS2SI, 0, 0 }, ! { MASK_SSE, CODE_FOR_cvttps2pi, 0, IX86_BUILTIN_CVTTPS2PI, 0, 0 }, ! { MASK_SSE, CODE_FOR_cvttss2si, 0, IX86_BUILTIN_CVTTSS2SI, 0, 0 } }; void --- 12192,12376 ---- { MASK_MMX, CODE_FOR_ashrv2si3, 0, IX86_BUILTIN_PSRAD, 0, 0 }, { MASK_MMX, CODE_FOR_ashrv2si3, 0, IX86_BUILTIN_PSRADI, 0, 0 }, ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_mmx_psadbw, 0, IX86_BUILTIN_PSADBW, 0, 0 }, ! { MASK_MMX, CODE_FOR_mmx_pmaddwd, 0, IX86_BUILTIN_PMADDWD, 0, 0 }, ! ! /* SSE2 */ ! { MASK_SSE2, CODE_FOR_addv2df3, "__builtin_ia32_addpd", IX86_BUILTIN_ADDPD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_subv2df3, "__builtin_ia32_subpd", IX86_BUILTIN_SUBPD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_mulv2df3, "__builtin_ia32_mulpd", IX86_BUILTIN_MULPD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_divv2df3, "__builtin_ia32_divpd", IX86_BUILTIN_DIVPD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_vmaddv2df3, "__builtin_ia32_addsd", IX86_BUILTIN_ADDSD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_vmsubv2df3, "__builtin_ia32_subsd", IX86_BUILTIN_SUBSD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_vmmulv2df3, "__builtin_ia32_mulsd", IX86_BUILTIN_MULSD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_vmdivv2df3, "__builtin_ia32_divsd", IX86_BUILTIN_DIVSD, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_maskcmpv2df3, "__builtin_ia32_cmpeqpd", IX86_BUILTIN_CMPEQPD, EQ, 0 }, ! { MASK_SSE2, CODE_FOR_maskcmpv2df3, "__builtin_ia32_cmpltpd", IX86_BUILTIN_CMPLTPD, LT, 0 }, ! { MASK_SSE2, CODE_FOR_maskcmpv2df3, "__builtin_ia32_cmplepd", IX86_BUILTIN_CMPLEPD, LE, 0 }, ! { MASK_SSE2, CODE_FOR_maskcmpv2df3, "__builtin_ia32_cmpgtpd", IX86_BUILTIN_CMPGTPD, LT, 1 }, ! { MASK_SSE2, CODE_FOR_maskcmpv2df3, "__builtin_ia32_cmpgepd", IX86_BUILTIN_CMPGEPD, LE, 1 }, ! { MASK_SSE2, CODE_FOR_maskcmpv2df3, "__builtin_ia32_cmpunordpd", IX86_BUILTIN_CMPUNORDPD, UNORDERED, 0 }, ! { MASK_SSE2, CODE_FOR_maskncmpv2df3, "__builtin_ia32_cmpneqpd", IX86_BUILTIN_CMPNEQPD, EQ, 0 }, ! { MASK_SSE2, CODE_FOR_maskncmpv2df3, "__builtin_ia32_cmpnltpd", IX86_BUILTIN_CMPNLTPD, LT, 0 }, ! { MASK_SSE2, CODE_FOR_maskncmpv2df3, "__builtin_ia32_cmpnlepd", IX86_BUILTIN_CMPNLEPD, LE, 0 }, ! { MASK_SSE2, CODE_FOR_maskncmpv2df3, "__builtin_ia32_cmpngtpd", IX86_BUILTIN_CMPNGTPD, LT, 1 }, ! { MASK_SSE2, CODE_FOR_maskncmpv2df3, "__builtin_ia32_cmpngepd", IX86_BUILTIN_CMPNGEPD, LE, 1 }, ! { MASK_SSE2, CODE_FOR_maskncmpv2df3, "__builtin_ia32_cmpordpd", IX86_BUILTIN_CMPORDPD, UNORDERED, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskcmpv2df3, "__builtin_ia32_cmpeqsd", IX86_BUILTIN_CMPEQSD, EQ, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskcmpv2df3, "__builtin_ia32_cmpltsd", IX86_BUILTIN_CMPLTSD, LT, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskcmpv2df3, "__builtin_ia32_cmplesd", IX86_BUILTIN_CMPLESD, LE, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskcmpv2df3, "__builtin_ia32_cmpunordsd", IX86_BUILTIN_CMPUNORDSD, UNORDERED, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskncmpv2df3, "__builtin_ia32_cmpneqsd", IX86_BUILTIN_CMPNEQSD, EQ, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskncmpv2df3, "__builtin_ia32_cmpnltsd", IX86_BUILTIN_CMPNLTSD, LT, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskncmpv2df3, "__builtin_ia32_cmpnlesd", IX86_BUILTIN_CMPNLESD, LE, 0 }, ! { MASK_SSE2, CODE_FOR_vmmaskncmpv2df3, "__builtin_ia32_cmpordsd", IX86_BUILTIN_CMPORDSD, UNORDERED, 0 }, ! ! { MASK_SSE2, CODE_FOR_sminv2df3, "__builtin_ia32_minpd", IX86_BUILTIN_MINPD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_smaxv2df3, "__builtin_ia32_maxpd", IX86_BUILTIN_MAXPD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_vmsminv2df3, "__builtin_ia32_minsd", IX86_BUILTIN_MINSD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_vmsmaxv2df3, "__builtin_ia32_maxsd", IX86_BUILTIN_MAXSD, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_andv2df3, "__builtin_ia32_andpd", IX86_BUILTIN_ANDPD, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_nandv2df3, "__builtin_ia32_andnpd", IX86_BUILTIN_ANDNPD, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_iorv2df3, "__builtin_ia32_orpd", IX86_BUILTIN_ORPD, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_xorv2df3, "__builtin_ia32_xorpd", IX86_BUILTIN_XORPD, 0, 0 }, + + { MASK_SSE2, CODE_FOR_sse2_movsd, "__builtin_ia32_movsd", IX86_BUILTIN_MOVSD, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_unpckhpd, "__builtin_ia32_unpckhpd", IX86_BUILTIN_UNPCKHPD, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_unpcklpd, "__builtin_ia32_unpcklpd", IX86_BUILTIN_UNPCKLPD, 0, 0 }, + + /* SSE2 MMX */ + { MASK_SSE2, CODE_FOR_addv16qi3, "__builtin_ia32_paddb128", IX86_BUILTIN_PADDB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_addv8hi3, "__builtin_ia32_paddw128", IX86_BUILTIN_PADDW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_addv4si3, "__builtin_ia32_paddd128", IX86_BUILTIN_PADDD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_addv2di3, "__builtin_ia32_paddq128", IX86_BUILTIN_PADDQ128, 0, 0 }, + { MASK_SSE2, CODE_FOR_subv16qi3, "__builtin_ia32_psubb128", IX86_BUILTIN_PSUBB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_subv8hi3, "__builtin_ia32_psubw128", IX86_BUILTIN_PSUBW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_subv4si3, "__builtin_ia32_psubd128", IX86_BUILTIN_PSUBD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_subv2di3, "__builtin_ia32_psubq128", IX86_BUILTIN_PSUBQ128, 0, 0 }, + + { MASK_MMX, CODE_FOR_ssaddv16qi3, "__builtin_ia32_paddsb128", IX86_BUILTIN_PADDSB128, 0, 0 }, + { MASK_MMX, CODE_FOR_ssaddv8hi3, "__builtin_ia32_paddsw128", IX86_BUILTIN_PADDSW128, 0, 0 }, + { MASK_MMX, CODE_FOR_sssubv16qi3, "__builtin_ia32_psubsb128", IX86_BUILTIN_PSUBSB128, 0, 0 }, + { MASK_MMX, CODE_FOR_sssubv8hi3, "__builtin_ia32_psubsw128", IX86_BUILTIN_PSUBSW128, 0, 0 }, + { MASK_MMX, CODE_FOR_usaddv16qi3, "__builtin_ia32_paddusb128", IX86_BUILTIN_PADDUSB128, 0, 0 }, + { MASK_MMX, CODE_FOR_usaddv8hi3, "__builtin_ia32_paddusw128", IX86_BUILTIN_PADDUSW128, 0, 0 }, + { MASK_MMX, CODE_FOR_ussubv16qi3, "__builtin_ia32_psubusb128", IX86_BUILTIN_PSUBUSB128, 0, 0 }, + { MASK_MMX, CODE_FOR_ussubv8hi3, "__builtin_ia32_psubusw128", IX86_BUILTIN_PSUBUSW128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_mulv8hi3, "__builtin_ia32_pmullw128", IX86_BUILTIN_PMULLW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_smulv8hi3_highpart, "__builtin_ia32_pmulhw128", IX86_BUILTIN_PMULHW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_umulsidi3, "__builtin_ia32_pmuludq", IX86_BUILTIN_PMULUDQ, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_umulv2siv2di3, "__builtin_ia32_pmuludq128", IX86_BUILTIN_PMULUDQ128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_sse2_andv2di3, "__builtin_ia32_pand128", IX86_BUILTIN_PAND128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_nandv2di3, "__builtin_ia32_pandn128", IX86_BUILTIN_PANDN128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_iorv2di3, "__builtin_ia32_por128", IX86_BUILTIN_POR128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_xorv2di3, "__builtin_ia32_pxor128", IX86_BUILTIN_PXOR128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_sse2_uavgv16qi3, "__builtin_ia32_pavgb128", IX86_BUILTIN_PAVGB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_uavgv8hi3, "__builtin_ia32_pavgw128", IX86_BUILTIN_PAVGW128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_eqv16qi3, "__builtin_ia32_pcmpeqb128", IX86_BUILTIN_PCMPEQB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_eqv8hi3, "__builtin_ia32_pcmpeqw128", IX86_BUILTIN_PCMPEQW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_eqv4si3, "__builtin_ia32_pcmpeqd128", IX86_BUILTIN_PCMPEQD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_gtv16qi3, "__builtin_ia32_pcmpgtb128", IX86_BUILTIN_PCMPGTB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_gtv8hi3, "__builtin_ia32_pcmpgtw128", IX86_BUILTIN_PCMPGTW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_gtv4si3, "__builtin_ia32_pcmpgtd128", IX86_BUILTIN_PCMPGTD128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_umaxv16qi3, "__builtin_ia32_pmaxub128", IX86_BUILTIN_PMAXUB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_smaxv8hi3, "__builtin_ia32_pmaxsw128", IX86_BUILTIN_PMAXSW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_uminv16qi3, "__builtin_ia32_pminub128", IX86_BUILTIN_PMINUB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sminv8hi3, "__builtin_ia32_pminsw128", IX86_BUILTIN_PMINSW128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_sse2_punpckhbw, "__builtin_ia32_punpckhbw128", IX86_BUILTIN_PUNPCKHBW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_punpckhwd, "__builtin_ia32_punpckhwd128", IX86_BUILTIN_PUNPCKHWD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_punpckhdq, "__builtin_ia32_punpckhdq128", IX86_BUILTIN_PUNPCKHDQ128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_punpckhqdq, "__builtin_ia32_punpckhqdq128", IX86_BUILTIN_PUNPCKHQDQ128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_punpcklbw, "__builtin_ia32_punpcklbw128", IX86_BUILTIN_PUNPCKLBW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_punpcklwd, "__builtin_ia32_punpcklwd128", IX86_BUILTIN_PUNPCKLWD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_punpckldq, "__builtin_ia32_punpckldq128", IX86_BUILTIN_PUNPCKLDQ128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_punpcklqdq, "__builtin_ia32_punpcklqdq128", IX86_BUILTIN_PUNPCKLQDQ128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_sse2_packsswb, "__builtin_ia32_packsswb128", IX86_BUILTIN_PACKSSWB128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_packssdw, "__builtin_ia32_packssdw128", IX86_BUILTIN_PACKSSDW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_packuswb, "__builtin_ia32_packuswb128", IX86_BUILTIN_PACKUSWB128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_umulv8hi3_highpart, "__builtin_ia32_pmulhuw128", IX86_BUILTIN_PMULHUW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_psadbw, 0, IX86_BUILTIN_PSADBW128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_ashlv8hi3_ti, 0, IX86_BUILTIN_PSLLW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashlv8hi3, 0, IX86_BUILTIN_PSLLWI128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashlv4si3_ti, 0, IX86_BUILTIN_PSLLD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashlv4si3, 0, IX86_BUILTIN_PSLLDI128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashlv2di3_ti, 0, IX86_BUILTIN_PSLLQ128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashlv2di3, 0, IX86_BUILTIN_PSLLQI128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_lshrv8hi3_ti, 0, IX86_BUILTIN_PSRLW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_lshrv8hi3, 0, IX86_BUILTIN_PSRLWI128, 0, 0 }, + { MASK_SSE2, CODE_FOR_lshrv4si3_ti, 0, IX86_BUILTIN_PSRLD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_lshrv4si3, 0, IX86_BUILTIN_PSRLDI128, 0, 0 }, + { MASK_SSE2, CODE_FOR_lshrv2di3_ti, 0, IX86_BUILTIN_PSRLQ128, 0, 0 }, + { MASK_SSE2, CODE_FOR_lshrv2di3, 0, IX86_BUILTIN_PSRLQI128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_ashrv8hi3_ti, 0, IX86_BUILTIN_PSRAW128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashrv8hi3, 0, IX86_BUILTIN_PSRAWI128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashrv4si3_ti, 0, IX86_BUILTIN_PSRAD128, 0, 0 }, + { MASK_SSE2, CODE_FOR_ashrv4si3, 0, IX86_BUILTIN_PSRADI128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_sse2_pmaddwd, 0, IX86_BUILTIN_PMADDWD128, 0, 0 }, + + { MASK_SSE2, CODE_FOR_cvtsi2sd, 0, IX86_BUILTIN_CVTSI2SD, 0, 0 }, + { MASK_SSE264, CODE_FOR_cvtsi2sdq, 0, IX86_BUILTIN_CVTSI642SD, 0, 0 }, + { MASK_SSE2, CODE_FOR_cvtsd2ss, 0, IX86_BUILTIN_CVTSD2SS, 0, 0 }, + { MASK_SSE2, CODE_FOR_cvtss2sd, 0, IX86_BUILTIN_CVTSS2SD, 0, 0 } }; static const struct builtin_description bdesc_1arg[] = { ! { MASK_SSE1 | MASK_3DNOW_A, CODE_FOR_mmx_pmovmskb, 0, IX86_BUILTIN_PMOVMSKB, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sse_movmskps, 0, IX86_BUILTIN_MOVMSKPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_sqrtv4sf2, 0, IX86_BUILTIN_SQRTPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_rsqrtv4sf2, 0, IX86_BUILTIN_RSQRTPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_rcpv4sf2, 0, IX86_BUILTIN_RCPPS, 0, 0 }, ! { MASK_SSE1, CODE_FOR_cvtps2pi, 0, IX86_BUILTIN_CVTPS2PI, 0, 0 }, ! { MASK_SSE1, CODE_FOR_cvtss2si, 0, IX86_BUILTIN_CVTSS2SI, 0, 0 }, ! { MASK_SSE164, CODE_FOR_cvtss2siq, 0, IX86_BUILTIN_CVTSS2SI64, 0, 0 }, ! { MASK_SSE1, CODE_FOR_cvttps2pi, 0, IX86_BUILTIN_CVTTPS2PI, 0, 0 }, ! { MASK_SSE1, CODE_FOR_cvttss2si, 0, IX86_BUILTIN_CVTTSS2SI, 0, 0 }, ! { MASK_SSE164, CODE_FOR_cvttss2siq, 0, IX86_BUILTIN_CVTTSS2SI64, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_sse2_pmovmskb, 0, IX86_BUILTIN_PMOVMSKB128, 0, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_movmskpd, 0, IX86_BUILTIN_MOVMSKPD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_movq2dq, 0, IX86_BUILTIN_MOVQ2DQ, 0, 0 }, ! { MASK_SSE2, CODE_FOR_sse2_movdq2q, 0, IX86_BUILTIN_MOVDQ2Q, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_sqrtv2df2, 0, IX86_BUILTIN_SQRTPD, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_cvtdq2pd, 0, IX86_BUILTIN_CVTDQ2PD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvtdq2ps, 0, IX86_BUILTIN_CVTDQ2PS, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_cvtpd2dq, 0, IX86_BUILTIN_CVTPD2DQ, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvtpd2pi, 0, IX86_BUILTIN_CVTPD2PI, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvtpd2ps, 0, IX86_BUILTIN_CVTPD2PS, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvttpd2dq, 0, IX86_BUILTIN_CVTTPD2DQ, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvttpd2pi, 0, IX86_BUILTIN_CVTTPD2PI, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_cvtpi2pd, 0, IX86_BUILTIN_CVTPI2PD, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_cvtsd2si, 0, IX86_BUILTIN_CVTSD2SI, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvttsd2si, 0, IX86_BUILTIN_CVTTSD2SI, 0, 0 }, ! { MASK_SSE264, CODE_FOR_cvtsd2siq, 0, IX86_BUILTIN_CVTSD2SI64, 0, 0 }, ! { MASK_SSE264, CODE_FOR_cvttsd2siq, 0, IX86_BUILTIN_CVTTSD2SI64, 0, 0 }, ! ! { MASK_SSE2, CODE_FOR_cvtps2dq, 0, IX86_BUILTIN_CVTPS2DQ, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvtps2pd, 0, IX86_BUILTIN_CVTPS2PD, 0, 0 }, ! { MASK_SSE2, CODE_FOR_cvttps2dq, 0, IX86_BUILTIN_CVTTPS2DQ, 0, 0 }, + { MASK_SSE2, CODE_FOR_sse2_movq, 0, IX86_BUILTIN_MOVQ, 0, 0 } }; void *************** ix86_init_mmx_sse_builtins () *** 11140,11357 **** { const struct builtin_description * d; size_t i; - tree endlink = void_list_node; tree pchar_type_node = build_pointer_type (char_type_node); tree pfloat_type_node = build_pointer_type (float_type_node); tree pv2si_type_node = build_pointer_type (V2SI_type_node); tree pdi_type_node = build_pointer_type (long_long_unsigned_type_node); /* Comparisons. */ tree int_ftype_v4sf_v4sf ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, ! V4SF_type_node, ! endlink))); tree v4si_ftype_v4sf_v4sf ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, ! V4SF_type_node, ! endlink))); /* MMX/SSE/integer conversions. */ tree int_ftype_v4sf ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink)); tree int_ftype_v8qi ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V8QI_type_node, ! endlink)); tree v4sf_ftype_v4sf_int ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! endlink))); tree v4sf_ftype_v4sf_v2si ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! endlink))); tree int_ftype_v4hi_int ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! endlink))); tree v4hi_ftype_v4hi_int_int ! = build_function_type (V4HI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, ! integer_type_node, ! endlink)))); /* Miscellaneous. */ tree v8qi_ftype_v4hi_v4hi ! = build_function_type (V8QI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! endlink))); tree v4hi_ftype_v2si_v2si ! = build_function_type (V4HI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! endlink))); tree v4sf_ftype_v4sf_v4sf_int ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, ! integer_type_node, ! endlink)))); ! tree v4hi_ftype_v8qi_v8qi ! = build_function_type (V4HI_type_node, ! tree_cons (NULL_TREE, V8QI_type_node, ! tree_cons (NULL_TREE, V8QI_type_node, ! endlink))); tree v2si_ftype_v4hi_v4hi ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! endlink))); tree v4hi_ftype_v4hi_int ! = build_function_type (V4HI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! endlink))); tree v4hi_ftype_v4hi_di ! = build_function_type (V4HI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! tree_cons (NULL_TREE, ! long_long_integer_type_node, ! endlink))); tree v2si_ftype_v2si_di ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, ! long_long_integer_type_node, ! endlink))); tree void_ftype_void ! = build_function_type (void_type_node, endlink); tree void_ftype_unsigned ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, unsigned_type_node, ! endlink)); tree unsigned_ftype_void ! = build_function_type (unsigned_type_node, endlink); tree di_ftype_void ! = build_function_type (long_long_unsigned_type_node, endlink); tree v4sf_ftype_void ! = build_function_type (V4SF_type_node, endlink); tree v2si_ftype_v4sf ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink)); /* Loads/stores. */ - tree maskmovq_args = tree_cons (NULL_TREE, V8QI_type_node, - tree_cons (NULL_TREE, V8QI_type_node, - tree_cons (NULL_TREE, - pchar_type_node, - endlink))); tree void_ftype_v8qi_v8qi_pchar ! = build_function_type (void_type_node, maskmovq_args); ! tree v4sf_ftype_pfloat ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, pfloat_type_node, ! endlink)); /* @@@ the type is bogus */ tree v4sf_ftype_v4sf_pv2si ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, pv2si_type_node, ! endlink))); tree void_ftype_pv2si_v4sf ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pv2si_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink))); tree void_ftype_pfloat_v4sf ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pfloat_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink))); tree void_ftype_pdi_di ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pdi_type_node, ! tree_cons (NULL_TREE, ! long_long_unsigned_type_node, ! endlink))); /* Normal vector unops. */ tree v4sf_ftype_v4sf ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink)); /* Normal vector binops. */ tree v4sf_ftype_v4sf_v4sf ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink))); tree v8qi_ftype_v8qi_v8qi ! = build_function_type (V8QI_type_node, ! tree_cons (NULL_TREE, V8QI_type_node, ! tree_cons (NULL_TREE, V8QI_type_node, ! endlink))); tree v4hi_ftype_v4hi_v4hi ! = build_function_type (V4HI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! tree_cons (NULL_TREE, V4HI_type_node, ! endlink))); tree v2si_ftype_v2si_v2si ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! endlink))); tree di_ftype_di_di ! = build_function_type (long_long_unsigned_type_node, ! tree_cons (NULL_TREE, long_long_unsigned_type_node, ! tree_cons (NULL_TREE, ! long_long_unsigned_type_node, ! endlink))); tree v2si_ftype_v2sf ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! endlink)); tree v2sf_ftype_v2si ! = build_function_type (V2SF_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! endlink)); tree v2si_ftype_v2si ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! endlink)); tree v2sf_ftype_v2sf ! = build_function_type (V2SF_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! endlink)); tree v2sf_ftype_v2sf_v2sf ! = build_function_type (V2SF_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! tree_cons (NULL_TREE, ! V2SF_type_node, ! endlink))); tree v2si_ftype_v2sf_v2sf ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! tree_cons (NULL_TREE, ! V2SF_type_node, ! endlink))); /* Add all builtins that are more or less simple operations on two operands. */ ! for (i = 0, d = bdesc_2arg; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++) { /* Use one of the operands; the target can have a different mode for mask-generating compares. */ --- 12388,12690 ---- { const struct builtin_description * d; size_t i; tree pchar_type_node = build_pointer_type (char_type_node); + tree pcchar_type_node = build_pointer_type ( + build_type_variant (char_type_node, 1, 0)); tree pfloat_type_node = build_pointer_type (float_type_node); + tree pcfloat_type_node = build_pointer_type ( + build_type_variant (float_type_node, 1, 0)); tree pv2si_type_node = build_pointer_type (V2SI_type_node); + tree pv2di_type_node = build_pointer_type (V2DI_type_node); tree pdi_type_node = build_pointer_type (long_long_unsigned_type_node); /* Comparisons. */ tree int_ftype_v4sf_v4sf ! = build_function_type_list (integer_type_node, ! V4SF_type_node, V4SF_type_node, NULL_TREE); tree v4si_ftype_v4sf_v4sf ! = build_function_type_list (V4SI_type_node, ! V4SF_type_node, V4SF_type_node, NULL_TREE); /* MMX/SSE/integer conversions. */ tree int_ftype_v4sf ! = build_function_type_list (integer_type_node, ! V4SF_type_node, NULL_TREE); ! tree int64_ftype_v4sf ! = build_function_type_list (long_long_integer_type_node, ! V4SF_type_node, NULL_TREE); tree int_ftype_v8qi ! = build_function_type_list (integer_type_node, V8QI_type_node, NULL_TREE); tree v4sf_ftype_v4sf_int ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, integer_type_node, NULL_TREE); ! tree v4sf_ftype_v4sf_int64 ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, long_long_integer_type_node, ! NULL_TREE); tree v4sf_ftype_v4sf_v2si ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V2SI_type_node, NULL_TREE); tree int_ftype_v4hi_int ! = build_function_type_list (integer_type_node, ! V4HI_type_node, integer_type_node, NULL_TREE); tree v4hi_ftype_v4hi_int_int ! = build_function_type_list (V4HI_type_node, V4HI_type_node, ! integer_type_node, integer_type_node, ! NULL_TREE); /* Miscellaneous. */ tree v8qi_ftype_v4hi_v4hi ! = build_function_type_list (V8QI_type_node, ! V4HI_type_node, V4HI_type_node, NULL_TREE); tree v4hi_ftype_v2si_v2si ! = build_function_type_list (V4HI_type_node, ! V2SI_type_node, V2SI_type_node, NULL_TREE); tree v4sf_ftype_v4sf_v4sf_int ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V4SF_type_node, ! integer_type_node, NULL_TREE); tree v2si_ftype_v4hi_v4hi ! = build_function_type_list (V2SI_type_node, ! V4HI_type_node, V4HI_type_node, NULL_TREE); tree v4hi_ftype_v4hi_int ! = build_function_type_list (V4HI_type_node, ! V4HI_type_node, integer_type_node, NULL_TREE); tree v4hi_ftype_v4hi_di ! = build_function_type_list (V4HI_type_node, ! V4HI_type_node, long_long_unsigned_type_node, ! NULL_TREE); tree v2si_ftype_v2si_di ! = build_function_type_list (V2SI_type_node, ! V2SI_type_node, long_long_unsigned_type_node, ! NULL_TREE); tree void_ftype_void ! = build_function_type (void_type_node, void_list_node); tree void_ftype_unsigned ! = build_function_type_list (void_type_node, unsigned_type_node, NULL_TREE); tree unsigned_ftype_void ! = build_function_type (unsigned_type_node, void_list_node); tree di_ftype_void ! = build_function_type (long_long_unsigned_type_node, void_list_node); tree v4sf_ftype_void ! = build_function_type (V4SF_type_node, void_list_node); tree v2si_ftype_v4sf ! = build_function_type_list (V2SI_type_node, V4SF_type_node, NULL_TREE); /* Loads/stores. */ tree void_ftype_v8qi_v8qi_pchar ! = build_function_type_list (void_type_node, ! V8QI_type_node, V8QI_type_node, ! pchar_type_node, NULL_TREE); ! tree v4sf_ftype_pcfloat ! = build_function_type_list (V4SF_type_node, pcfloat_type_node, NULL_TREE); /* @@@ the type is bogus */ tree v4sf_ftype_v4sf_pv2si ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, pv2si_type_node, NULL_TREE); tree void_ftype_pv2si_v4sf ! = build_function_type_list (void_type_node, ! pv2si_type_node, V4SF_type_node, NULL_TREE); tree void_ftype_pfloat_v4sf ! = build_function_type_list (void_type_node, ! pfloat_type_node, V4SF_type_node, NULL_TREE); tree void_ftype_pdi_di ! = build_function_type_list (void_type_node, ! pdi_type_node, long_long_unsigned_type_node, ! NULL_TREE); ! tree void_ftype_pv2di_v2di ! = build_function_type_list (void_type_node, ! pv2di_type_node, V2DI_type_node, NULL_TREE); /* Normal vector unops. */ tree v4sf_ftype_v4sf ! = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE); /* Normal vector binops. */ tree v4sf_ftype_v4sf_v4sf ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V4SF_type_node, NULL_TREE); tree v8qi_ftype_v8qi_v8qi ! = build_function_type_list (V8QI_type_node, ! V8QI_type_node, V8QI_type_node, NULL_TREE); tree v4hi_ftype_v4hi_v4hi ! = build_function_type_list (V4HI_type_node, ! V4HI_type_node, V4HI_type_node, NULL_TREE); tree v2si_ftype_v2si_v2si ! = build_function_type_list (V2SI_type_node, ! V2SI_type_node, V2SI_type_node, NULL_TREE); tree di_ftype_di_di ! = build_function_type_list (long_long_unsigned_type_node, ! long_long_unsigned_type_node, ! long_long_unsigned_type_node, NULL_TREE); tree v2si_ftype_v2sf ! = build_function_type_list (V2SI_type_node, V2SF_type_node, NULL_TREE); tree v2sf_ftype_v2si ! = build_function_type_list (V2SF_type_node, V2SI_type_node, NULL_TREE); tree v2si_ftype_v2si ! = build_function_type_list (V2SI_type_node, V2SI_type_node, NULL_TREE); tree v2sf_ftype_v2sf ! = build_function_type_list (V2SF_type_node, V2SF_type_node, NULL_TREE); tree v2sf_ftype_v2sf_v2sf ! = build_function_type_list (V2SF_type_node, ! V2SF_type_node, V2SF_type_node, NULL_TREE); tree v2si_ftype_v2sf_v2sf ! = build_function_type_list (V2SI_type_node, ! V2SF_type_node, V2SF_type_node, NULL_TREE); ! tree pint_type_node = build_pointer_type (integer_type_node); ! tree pcint_type_node = build_pointer_type ( ! build_type_variant (integer_type_node, 1, 0)); ! tree pdouble_type_node = build_pointer_type (double_type_node); ! tree pcdouble_type_node = build_pointer_type ( ! build_type_variant (double_type_node, 1, 0)); ! tree int_ftype_v2df_v2df ! = build_function_type_list (integer_type_node, ! V2DF_type_node, V2DF_type_node, NULL_TREE); ! ! tree ti_ftype_void ! = build_function_type (intTI_type_node, void_list_node); ! tree v2di_ftype_void ! = build_function_type (V2DI_type_node, void_list_node); ! tree ti_ftype_ti_ti ! = build_function_type_list (intTI_type_node, ! intTI_type_node, intTI_type_node, NULL_TREE); ! tree void_ftype_pcvoid ! = build_function_type_list (void_type_node, const_ptr_type_node, NULL_TREE); ! tree v2di_ftype_di ! = build_function_type_list (V2DI_type_node, ! long_long_unsigned_type_node, NULL_TREE); ! tree di_ftype_v2di ! = build_function_type_list (long_long_unsigned_type_node, ! V2DI_type_node, NULL_TREE); ! tree v4sf_ftype_v4si ! = build_function_type_list (V4SF_type_node, V4SI_type_node, NULL_TREE); ! tree v4si_ftype_v4sf ! = build_function_type_list (V4SI_type_node, V4SF_type_node, NULL_TREE); ! tree v2df_ftype_v4si ! = build_function_type_list (V2DF_type_node, V4SI_type_node, NULL_TREE); ! tree v4si_ftype_v2df ! = build_function_type_list (V4SI_type_node, V2DF_type_node, NULL_TREE); ! tree v2si_ftype_v2df ! = build_function_type_list (V2SI_type_node, V2DF_type_node, NULL_TREE); ! tree v4sf_ftype_v2df ! = build_function_type_list (V4SF_type_node, V2DF_type_node, NULL_TREE); ! tree v2df_ftype_v2si ! = build_function_type_list (V2DF_type_node, V2SI_type_node, NULL_TREE); ! tree v2df_ftype_v4sf ! = build_function_type_list (V2DF_type_node, V4SF_type_node, NULL_TREE); ! tree int_ftype_v2df ! = build_function_type_list (integer_type_node, V2DF_type_node, NULL_TREE); ! tree int64_ftype_v2df ! = build_function_type_list (long_long_integer_type_node, ! V2DF_type_node, NULL_TREE); ! tree v2df_ftype_v2df_int ! = build_function_type_list (V2DF_type_node, ! V2DF_type_node, integer_type_node, NULL_TREE); ! tree v2df_ftype_v2df_int64 ! = build_function_type_list (V2DF_type_node, ! V2DF_type_node, long_long_integer_type_node, ! NULL_TREE); ! tree v4sf_ftype_v4sf_v2df ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V2DF_type_node, NULL_TREE); ! tree v2df_ftype_v2df_v4sf ! = build_function_type_list (V2DF_type_node, ! V2DF_type_node, V4SF_type_node, NULL_TREE); ! tree v2df_ftype_v2df_v2df_int ! = build_function_type_list (V2DF_type_node, ! V2DF_type_node, V2DF_type_node, ! integer_type_node, ! NULL_TREE); ! tree v2df_ftype_v2df_pv2si ! = build_function_type_list (V2DF_type_node, ! V2DF_type_node, pv2si_type_node, NULL_TREE); ! tree void_ftype_pv2si_v2df ! = build_function_type_list (void_type_node, ! pv2si_type_node, V2DF_type_node, NULL_TREE); ! tree void_ftype_pdouble_v2df ! = build_function_type_list (void_type_node, ! pdouble_type_node, V2DF_type_node, NULL_TREE); ! tree void_ftype_pint_int ! = build_function_type_list (void_type_node, ! pint_type_node, integer_type_node, NULL_TREE); ! tree void_ftype_v16qi_v16qi_pchar ! = build_function_type_list (void_type_node, ! V16QI_type_node, V16QI_type_node, ! pchar_type_node, NULL_TREE); ! tree v2df_ftype_pcdouble ! = build_function_type_list (V2DF_type_node, pcdouble_type_node, NULL_TREE); ! tree v2df_ftype_v2df_v2df ! = build_function_type_list (V2DF_type_node, ! V2DF_type_node, V2DF_type_node, NULL_TREE); ! tree v16qi_ftype_v16qi_v16qi ! = build_function_type_list (V16QI_type_node, ! V16QI_type_node, V16QI_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_v8hi ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, V8HI_type_node, NULL_TREE); ! tree v4si_ftype_v4si_v4si ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, V4SI_type_node, NULL_TREE); ! tree v2di_ftype_v2di_v2di ! = build_function_type_list (V2DI_type_node, ! V2DI_type_node, V2DI_type_node, NULL_TREE); ! tree v2di_ftype_v2df_v2df ! = build_function_type_list (V2DI_type_node, ! V2DF_type_node, V2DF_type_node, NULL_TREE); ! tree v2df_ftype_v2df ! = build_function_type_list (V2DF_type_node, V2DF_type_node, NULL_TREE); ! tree v2df_ftype_double ! = build_function_type_list (V2DF_type_node, double_type_node, NULL_TREE); ! tree v2df_ftype_double_double ! = build_function_type_list (V2DF_type_node, ! double_type_node, double_type_node, NULL_TREE); ! tree int_ftype_v8hi_int ! = build_function_type_list (integer_type_node, ! V8HI_type_node, integer_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_int_int ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, integer_type_node, ! integer_type_node, NULL_TREE); ! tree v2di_ftype_v2di_int ! = build_function_type_list (V2DI_type_node, ! V2DI_type_node, integer_type_node, NULL_TREE); ! tree v4si_ftype_v4si_int ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, integer_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_int ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, integer_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_v2di ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, V2DI_type_node, NULL_TREE); ! tree v4si_ftype_v4si_v2di ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, V2DI_type_node, NULL_TREE); ! tree v4si_ftype_v8hi_v8hi ! = build_function_type_list (V4SI_type_node, ! V8HI_type_node, V8HI_type_node, NULL_TREE); ! tree di_ftype_v8qi_v8qi ! = build_function_type_list (long_long_unsigned_type_node, ! V8QI_type_node, V8QI_type_node, NULL_TREE); ! tree v2di_ftype_v16qi_v16qi ! = build_function_type_list (V2DI_type_node, ! V16QI_type_node, V16QI_type_node, NULL_TREE); ! tree int_ftype_v16qi ! = build_function_type_list (integer_type_node, V16QI_type_node, NULL_TREE); ! tree v16qi_ftype_pcchar ! = build_function_type_list (V16QI_type_node, pcchar_type_node, NULL_TREE); ! tree void_ftype_pchar_v16qi ! = build_function_type_list (void_type_node, ! pchar_type_node, V16QI_type_node, NULL_TREE); ! tree v4si_ftype_pcint ! = build_function_type_list (V4SI_type_node, pcint_type_node, NULL_TREE); ! tree void_ftype_pcint_v4si ! = build_function_type_list (void_type_node, ! pcint_type_node, V4SI_type_node, NULL_TREE); ! tree v2di_ftype_v2di ! = build_function_type_list (V2DI_type_node, V2DI_type_node, NULL_TREE); /* Add all builtins that are more or less simple operations on two operands. */ ! for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++) { /* Use one of the operands; the target can have a different mode for mask-generating compares. */ *************** ix86_init_mmx_sse_builtins () *** 11364,11369 **** --- 12697,12720 ---- switch (mode) { + case V16QImode: + type = v16qi_ftype_v16qi_v16qi; + break; + case V8HImode: + type = v8hi_ftype_v8hi_v8hi; + break; + case V4SImode: + type = v4si_ftype_v4si_v4si; + break; + case V2DImode: + type = v2di_ftype_v2di_v2di; + break; + case V2DFmode: + type = v2df_ftype_v2df_v2df; + break; + case TImode: + type = ti_ftype_ti_ti; + break; case V4SFmode: type = v4sf_ftype_v4sf_v4sf; break; *************** ix86_init_mmx_sse_builtins () *** 11391,11404 **** || d->icode == CODE_FOR_vmmaskncmpv4sf3) type = v4si_ftype_v4sf_v4sf; def_builtin (d->mask, d->name, type, d->code); } /* Add the remaining MMX insns with somewhat more complicated types. */ def_builtin (MASK_MMX, "__builtin_ia32_mmx_zero", di_ftype_void, IX86_BUILTIN_MMX_ZERO); def_builtin (MASK_MMX, "__builtin_ia32_emms", void_ftype_void, IX86_BUILTIN_EMMS); - def_builtin (MASK_MMX, "__builtin_ia32_ldmxcsr", void_ftype_unsigned, IX86_BUILTIN_LDMXCSR); - def_builtin (MASK_MMX, "__builtin_ia32_stmxcsr", unsigned_ftype_void, IX86_BUILTIN_STMXCSR); def_builtin (MASK_MMX, "__builtin_ia32_psllw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSLLW); def_builtin (MASK_MMX, "__builtin_ia32_pslld", v2si_ftype_v2si_di, IX86_BUILTIN_PSLLD); def_builtin (MASK_MMX, "__builtin_ia32_psllq", di_ftype_di_di, IX86_BUILTIN_PSLLQ); --- 12742,12759 ---- || d->icode == CODE_FOR_vmmaskncmpv4sf3) type = v4si_ftype_v4sf_v4sf; + if (d->icode == CODE_FOR_maskcmpv2df3 + || d->icode == CODE_FOR_maskncmpv2df3 + || d->icode == CODE_FOR_vmmaskcmpv2df3 + || d->icode == CODE_FOR_vmmaskncmpv2df3) + type = v2di_ftype_v2df_v2df; + def_builtin (d->mask, d->name, type, d->code); } /* Add the remaining MMX insns with somewhat more complicated types. */ def_builtin (MASK_MMX, "__builtin_ia32_mmx_zero", di_ftype_void, IX86_BUILTIN_MMX_ZERO); def_builtin (MASK_MMX, "__builtin_ia32_emms", void_ftype_void, IX86_BUILTIN_EMMS); def_builtin (MASK_MMX, "__builtin_ia32_psllw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSLLW); def_builtin (MASK_MMX, "__builtin_ia32_pslld", v2si_ftype_v2si_di, IX86_BUILTIN_PSLLD); def_builtin (MASK_MMX, "__builtin_ia32_psllq", di_ftype_di_di, IX86_BUILTIN_PSLLQ); *************** ix86_init_mmx_sse_builtins () *** 11414,11472 **** def_builtin (MASK_MMX, "__builtin_ia32_pmaddwd", v2si_ftype_v4hi_v4hi, IX86_BUILTIN_PMADDWD); /* comi/ucomi insns. */ ! for (i = 0, d = bdesc_comi; i < sizeof (bdesc_comi) / sizeof *d; i++, d++) ! def_builtin (d->mask, d->name, int_ftype_v4sf_v4sf, d->code); def_builtin (MASK_MMX, "__builtin_ia32_packsswb", v8qi_ftype_v4hi_v4hi, IX86_BUILTIN_PACKSSWB); def_builtin (MASK_MMX, "__builtin_ia32_packssdw", v4hi_ftype_v2si_v2si, IX86_BUILTIN_PACKSSDW); def_builtin (MASK_MMX, "__builtin_ia32_packuswb", v8qi_ftype_v4hi_v4hi, IX86_BUILTIN_PACKUSWB); ! def_builtin (MASK_SSE, "__builtin_ia32_cvtpi2ps", v4sf_ftype_v4sf_v2si, IX86_BUILTIN_CVTPI2PS); ! def_builtin (MASK_SSE, "__builtin_ia32_cvtps2pi", v2si_ftype_v4sf, IX86_BUILTIN_CVTPS2PI); ! def_builtin (MASK_SSE, "__builtin_ia32_cvtsi2ss", v4sf_ftype_v4sf_int, IX86_BUILTIN_CVTSI2SS); ! def_builtin (MASK_SSE, "__builtin_ia32_cvtss2si", int_ftype_v4sf, IX86_BUILTIN_CVTSS2SI); ! def_builtin (MASK_SSE, "__builtin_ia32_cvttps2pi", v2si_ftype_v4sf, IX86_BUILTIN_CVTTPS2PI); ! def_builtin (MASK_SSE, "__builtin_ia32_cvttss2si", int_ftype_v4sf, IX86_BUILTIN_CVTTSS2SI); ! ! def_builtin (MASK_SSE, "__builtin_ia32_andps", v4sf_ftype_v4sf_v4sf, IX86_BUILTIN_ANDPS); ! def_builtin (MASK_SSE, "__builtin_ia32_andnps", v4sf_ftype_v4sf_v4sf, IX86_BUILTIN_ANDNPS); ! def_builtin (MASK_SSE, "__builtin_ia32_orps", v4sf_ftype_v4sf_v4sf, IX86_BUILTIN_ORPS); ! def_builtin (MASK_SSE, "__builtin_ia32_xorps", v4sf_ftype_v4sf_v4sf, IX86_BUILTIN_XORPS); ! def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pextrw", int_ftype_v4hi_int, IX86_BUILTIN_PEXTRW); ! def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pinsrw", v4hi_ftype_v4hi_int_int, IX86_BUILTIN_PINSRW); ! def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_maskmovq", void_ftype_v8qi_v8qi_pchar, IX86_BUILTIN_MASKMOVQ); ! def_builtin (MASK_SSE, "__builtin_ia32_loadaps", v4sf_ftype_pfloat, IX86_BUILTIN_LOADAPS); ! def_builtin (MASK_SSE, "__builtin_ia32_loadups", v4sf_ftype_pfloat, IX86_BUILTIN_LOADUPS); ! def_builtin (MASK_SSE, "__builtin_ia32_loadss", v4sf_ftype_pfloat, IX86_BUILTIN_LOADSS); ! def_builtin (MASK_SSE, "__builtin_ia32_storeaps", void_ftype_pfloat_v4sf, IX86_BUILTIN_STOREAPS); ! def_builtin (MASK_SSE, "__builtin_ia32_storeups", void_ftype_pfloat_v4sf, IX86_BUILTIN_STOREUPS); ! def_builtin (MASK_SSE, "__builtin_ia32_storess", void_ftype_pfloat_v4sf, IX86_BUILTIN_STORESS); ! def_builtin (MASK_SSE, "__builtin_ia32_loadhps", v4sf_ftype_v4sf_pv2si, IX86_BUILTIN_LOADHPS); ! def_builtin (MASK_SSE, "__builtin_ia32_loadlps", v4sf_ftype_v4sf_pv2si, IX86_BUILTIN_LOADLPS); ! def_builtin (MASK_SSE, "__builtin_ia32_storehps", void_ftype_pv2si_v4sf, IX86_BUILTIN_STOREHPS); ! def_builtin (MASK_SSE, "__builtin_ia32_storelps", void_ftype_pv2si_v4sf, IX86_BUILTIN_STORELPS); ! def_builtin (MASK_SSE, "__builtin_ia32_movmskps", int_ftype_v4sf, IX86_BUILTIN_MOVMSKPS); ! def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pmovmskb", int_ftype_v8qi, IX86_BUILTIN_PMOVMSKB); ! def_builtin (MASK_SSE, "__builtin_ia32_movntps", void_ftype_pfloat_v4sf, IX86_BUILTIN_MOVNTPS); ! def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_movntq", void_ftype_pdi_di, IX86_BUILTIN_MOVNTQ); ! def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_sfence", void_ftype_void, IX86_BUILTIN_SFENCE); ! def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_psadbw", v4hi_ftype_v8qi_v8qi, IX86_BUILTIN_PSADBW); ! def_builtin (MASK_SSE, "__builtin_ia32_rcpps", v4sf_ftype_v4sf, IX86_BUILTIN_RCPPS); ! def_builtin (MASK_SSE, "__builtin_ia32_rcpss", v4sf_ftype_v4sf, IX86_BUILTIN_RCPSS); ! def_builtin (MASK_SSE, "__builtin_ia32_rsqrtps", v4sf_ftype_v4sf, IX86_BUILTIN_RSQRTPS); ! def_builtin (MASK_SSE, "__builtin_ia32_rsqrtss", v4sf_ftype_v4sf, IX86_BUILTIN_RSQRTSS); ! def_builtin (MASK_SSE, "__builtin_ia32_sqrtps", v4sf_ftype_v4sf, IX86_BUILTIN_SQRTPS); ! def_builtin (MASK_SSE, "__builtin_ia32_sqrtss", v4sf_ftype_v4sf, IX86_BUILTIN_SQRTSS); ! def_builtin (MASK_SSE, "__builtin_ia32_shufps", v4sf_ftype_v4sf_v4sf_int, IX86_BUILTIN_SHUFPS); /* Original 3DNow! */ def_builtin (MASK_3DNOW, "__builtin_ia32_femms", void_ftype_void, IX86_BUILTIN_FEMMS); --- 12769,12830 ---- def_builtin (MASK_MMX, "__builtin_ia32_pmaddwd", v2si_ftype_v4hi_v4hi, IX86_BUILTIN_PMADDWD); /* comi/ucomi insns. */ ! for (i = 0, d = bdesc_comi; i < ARRAY_SIZE (bdesc_comi); i++, d++) ! if (d->mask == MASK_SSE2) ! def_builtin (d->mask, d->name, int_ftype_v2df_v2df, d->code); ! else ! def_builtin (d->mask, d->name, int_ftype_v4sf_v4sf, d->code); def_builtin (MASK_MMX, "__builtin_ia32_packsswb", v8qi_ftype_v4hi_v4hi, IX86_BUILTIN_PACKSSWB); def_builtin (MASK_MMX, "__builtin_ia32_packssdw", v4hi_ftype_v2si_v2si, IX86_BUILTIN_PACKSSDW); def_builtin (MASK_MMX, "__builtin_ia32_packuswb", v8qi_ftype_v4hi_v4hi, IX86_BUILTIN_PACKUSWB); ! def_builtin (MASK_SSE1, "__builtin_ia32_ldmxcsr", void_ftype_unsigned, IX86_BUILTIN_LDMXCSR); ! def_builtin (MASK_SSE1, "__builtin_ia32_stmxcsr", unsigned_ftype_void, IX86_BUILTIN_STMXCSR); ! def_builtin (MASK_SSE1, "__builtin_ia32_cvtpi2ps", v4sf_ftype_v4sf_v2si, IX86_BUILTIN_CVTPI2PS); ! def_builtin (MASK_SSE1, "__builtin_ia32_cvtps2pi", v2si_ftype_v4sf, IX86_BUILTIN_CVTPS2PI); ! def_builtin (MASK_SSE1, "__builtin_ia32_cvtsi2ss", v4sf_ftype_v4sf_int, IX86_BUILTIN_CVTSI2SS); ! def_builtin (MASK_SSE164, "__builtin_ia32_cvtsi642ss", v4sf_ftype_v4sf_int64, IX86_BUILTIN_CVTSI642SS); ! def_builtin (MASK_SSE1, "__builtin_ia32_cvtss2si", int_ftype_v4sf, IX86_BUILTIN_CVTSS2SI); ! def_builtin (MASK_SSE164, "__builtin_ia32_cvtss2si64", int64_ftype_v4sf, IX86_BUILTIN_CVTSS2SI64); ! def_builtin (MASK_SSE1, "__builtin_ia32_cvttps2pi", v2si_ftype_v4sf, IX86_BUILTIN_CVTTPS2PI); ! def_builtin (MASK_SSE1, "__builtin_ia32_cvttss2si", int_ftype_v4sf, IX86_BUILTIN_CVTTSS2SI); ! def_builtin (MASK_SSE164, "__builtin_ia32_cvttss2si64", int64_ftype_v4sf, IX86_BUILTIN_CVTTSS2SI64); ! def_builtin (MASK_SSE1 | MASK_3DNOW_A, "__builtin_ia32_pextrw", int_ftype_v4hi_int, IX86_BUILTIN_PEXTRW); ! def_builtin (MASK_SSE1 | MASK_3DNOW_A, "__builtin_ia32_pinsrw", v4hi_ftype_v4hi_int_int, IX86_BUILTIN_PINSRW); ! def_builtin (MASK_SSE1 | MASK_3DNOW_A, "__builtin_ia32_maskmovq", void_ftype_v8qi_v8qi_pchar, IX86_BUILTIN_MASKMOVQ); ! def_builtin (MASK_SSE1, "__builtin_ia32_loadaps", v4sf_ftype_pcfloat, IX86_BUILTIN_LOADAPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_loadups", v4sf_ftype_pcfloat, IX86_BUILTIN_LOADUPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_loadss", v4sf_ftype_pcfloat, IX86_BUILTIN_LOADSS); ! def_builtin (MASK_SSE1, "__builtin_ia32_storeaps", void_ftype_pfloat_v4sf, IX86_BUILTIN_STOREAPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_storeups", void_ftype_pfloat_v4sf, IX86_BUILTIN_STOREUPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_storess", void_ftype_pfloat_v4sf, IX86_BUILTIN_STORESS); ! def_builtin (MASK_SSE1, "__builtin_ia32_loadhps", v4sf_ftype_v4sf_pv2si, IX86_BUILTIN_LOADHPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_loadlps", v4sf_ftype_v4sf_pv2si, IX86_BUILTIN_LOADLPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_storehps", void_ftype_pv2si_v4sf, IX86_BUILTIN_STOREHPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_storelps", void_ftype_pv2si_v4sf, IX86_BUILTIN_STORELPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_movmskps", int_ftype_v4sf, IX86_BUILTIN_MOVMSKPS); ! def_builtin (MASK_SSE1 | MASK_3DNOW_A, "__builtin_ia32_pmovmskb", int_ftype_v8qi, IX86_BUILTIN_PMOVMSKB); ! def_builtin (MASK_SSE1, "__builtin_ia32_movntps", void_ftype_pfloat_v4sf, IX86_BUILTIN_MOVNTPS); ! def_builtin (MASK_SSE1 | MASK_3DNOW_A, "__builtin_ia32_movntq", void_ftype_pdi_di, IX86_BUILTIN_MOVNTQ); ! def_builtin (MASK_SSE1 | MASK_3DNOW_A, "__builtin_ia32_sfence", void_ftype_void, IX86_BUILTIN_SFENCE); ! def_builtin (MASK_SSE1 | MASK_3DNOW_A, "__builtin_ia32_psadbw", di_ftype_v8qi_v8qi, IX86_BUILTIN_PSADBW); ! def_builtin (MASK_SSE1, "__builtin_ia32_rcpps", v4sf_ftype_v4sf, IX86_BUILTIN_RCPPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_rcpss", v4sf_ftype_v4sf, IX86_BUILTIN_RCPSS); ! def_builtin (MASK_SSE1, "__builtin_ia32_rsqrtps", v4sf_ftype_v4sf, IX86_BUILTIN_RSQRTPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_rsqrtss", v4sf_ftype_v4sf, IX86_BUILTIN_RSQRTSS); ! def_builtin (MASK_SSE1, "__builtin_ia32_sqrtps", v4sf_ftype_v4sf, IX86_BUILTIN_SQRTPS); ! def_builtin (MASK_SSE1, "__builtin_ia32_sqrtss", v4sf_ftype_v4sf, IX86_BUILTIN_SQRTSS); ! def_builtin (MASK_SSE1, "__builtin_ia32_shufps", v4sf_ftype_v4sf_v4sf_int, IX86_BUILTIN_SHUFPS); /* Original 3DNow! */ def_builtin (MASK_3DNOW, "__builtin_ia32_femms", void_ftype_void, IX86_BUILTIN_FEMMS); *************** ix86_init_mmx_sse_builtins () *** 11498,11504 **** def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsf", v2sf_ftype_v2sf, IX86_BUILTIN_PSWAPDSF); def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsi", v2si_ftype_v2si, IX86_BUILTIN_PSWAPDSI); ! def_builtin (MASK_SSE, "__builtin_ia32_setzerops", v4sf_ftype_void, IX86_BUILTIN_SSE_ZERO); } /* Errors in the source file can cause expand_expr to return const0_rtx --- 12856,12971 ---- def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsf", v2sf_ftype_v2sf, IX86_BUILTIN_PSWAPDSF); def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsi", v2si_ftype_v2si, IX86_BUILTIN_PSWAPDSI); ! def_builtin (MASK_SSE1, "__builtin_ia32_setzerops", v4sf_ftype_void, IX86_BUILTIN_SSE_ZERO); ! ! /* SSE2 */ ! def_builtin (MASK_SSE2, "__builtin_ia32_pextrw128", int_ftype_v8hi_int, IX86_BUILTIN_PEXTRW128); ! def_builtin (MASK_SSE2, "__builtin_ia32_pinsrw128", v8hi_ftype_v8hi_int_int, IX86_BUILTIN_PINSRW128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_maskmovdqu", void_ftype_v16qi_v16qi_pchar, IX86_BUILTIN_MASKMOVDQU); ! def_builtin (MASK_SSE2, "__builtin_ia32_movq2dq", v2di_ftype_di, IX86_BUILTIN_MOVQ2DQ); ! def_builtin (MASK_SSE2, "__builtin_ia32_movdq2q", di_ftype_v2di, IX86_BUILTIN_MOVDQ2Q); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_loadapd", v2df_ftype_pcdouble, IX86_BUILTIN_LOADAPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_loadupd", v2df_ftype_pcdouble, IX86_BUILTIN_LOADUPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_loadsd", v2df_ftype_pcdouble, IX86_BUILTIN_LOADSD); ! def_builtin (MASK_SSE2, "__builtin_ia32_storeapd", void_ftype_pdouble_v2df, IX86_BUILTIN_STOREAPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_storeupd", void_ftype_pdouble_v2df, IX86_BUILTIN_STOREUPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_storesd", void_ftype_pdouble_v2df, IX86_BUILTIN_STORESD); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_loadhpd", v2df_ftype_v2df_pv2si, IX86_BUILTIN_LOADHPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_loadlpd", v2df_ftype_v2df_pv2si, IX86_BUILTIN_LOADLPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_storehpd", void_ftype_pv2si_v2df, IX86_BUILTIN_STOREHPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_storelpd", void_ftype_pv2si_v2df, IX86_BUILTIN_STORELPD); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_movmskpd", int_ftype_v2df, IX86_BUILTIN_MOVMSKPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_pmovmskb128", int_ftype_v16qi, IX86_BUILTIN_PMOVMSKB128); ! def_builtin (MASK_SSE2, "__builtin_ia32_movnti", void_ftype_pint_int, IX86_BUILTIN_MOVNTI); ! def_builtin (MASK_SSE2, "__builtin_ia32_movntpd", void_ftype_pdouble_v2df, IX86_BUILTIN_MOVNTPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_movntdq", void_ftype_pv2di_v2di, IX86_BUILTIN_MOVNTDQ); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_pshufd", v4si_ftype_v4si_int, IX86_BUILTIN_PSHUFD); ! def_builtin (MASK_SSE2, "__builtin_ia32_pshuflw", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSHUFLW); ! def_builtin (MASK_SSE2, "__builtin_ia32_pshufhw", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSHUFHW); ! def_builtin (MASK_SSE2, "__builtin_ia32_psadbw128", v2di_ftype_v16qi_v16qi, IX86_BUILTIN_PSADBW128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_sqrtpd", v2df_ftype_v2df, IX86_BUILTIN_SQRTPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_sqrtsd", v2df_ftype_v2df, IX86_BUILTIN_SQRTSD); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_shufpd", v2df_ftype_v2df_v2df_int, IX86_BUILTIN_SHUFPD); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtdq2pd", v2df_ftype_v4si, IX86_BUILTIN_CVTDQ2PD); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtdq2ps", v4sf_ftype_v4si, IX86_BUILTIN_CVTDQ2PS); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2dq", v4si_ftype_v2df, IX86_BUILTIN_CVTPD2DQ); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2pi", v2si_ftype_v2df, IX86_BUILTIN_CVTPD2PI); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2ps", v4sf_ftype_v2df, IX86_BUILTIN_CVTPD2PS); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvttpd2dq", v4si_ftype_v2df, IX86_BUILTIN_CVTTPD2DQ); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvttpd2pi", v2si_ftype_v2df, IX86_BUILTIN_CVTTPD2PI); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtpi2pd", v2df_ftype_v2si, IX86_BUILTIN_CVTPI2PD); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtsd2si", int_ftype_v2df, IX86_BUILTIN_CVTSD2SI); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvttsd2si", int_ftype_v2df, IX86_BUILTIN_CVTTSD2SI); ! def_builtin (MASK_SSE264, "__builtin_ia32_cvtsd2si64", int64_ftype_v2df, IX86_BUILTIN_CVTSD2SI64); ! def_builtin (MASK_SSE264, "__builtin_ia32_cvttsd2si64", int64_ftype_v2df, IX86_BUILTIN_CVTTSD2SI64); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtps2dq", v4si_ftype_v4sf, IX86_BUILTIN_CVTPS2DQ); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtps2pd", v2df_ftype_v4sf, IX86_BUILTIN_CVTPS2PD); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvttps2dq", v4si_ftype_v4sf, IX86_BUILTIN_CVTTPS2DQ); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtsi2sd", v2df_ftype_v2df_int, IX86_BUILTIN_CVTSI2SD); ! def_builtin (MASK_SSE264, "__builtin_ia32_cvtsi642sd", v2df_ftype_v2df_int64, IX86_BUILTIN_CVTSI642SD); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtsd2ss", v4sf_ftype_v4sf_v2df, IX86_BUILTIN_CVTSD2SS); ! def_builtin (MASK_SSE2, "__builtin_ia32_cvtss2sd", v2df_ftype_v2df_v4sf, IX86_BUILTIN_CVTSS2SD); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_setpd1", v2df_ftype_double, IX86_BUILTIN_SETPD1); ! def_builtin (MASK_SSE2, "__builtin_ia32_setpd", v2df_ftype_double_double, IX86_BUILTIN_SETPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_setzeropd", ti_ftype_void, IX86_BUILTIN_CLRPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_loadpd1", v2df_ftype_pcdouble, IX86_BUILTIN_LOADPD1); ! def_builtin (MASK_SSE2, "__builtin_ia32_loadrpd", v2df_ftype_pcdouble, IX86_BUILTIN_LOADRPD); ! def_builtin (MASK_SSE2, "__builtin_ia32_storepd1", void_ftype_pdouble_v2df, IX86_BUILTIN_STOREPD1); ! def_builtin (MASK_SSE2, "__builtin_ia32_storerpd", void_ftype_pdouble_v2df, IX86_BUILTIN_STORERPD); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_clflush", void_ftype_pcvoid, IX86_BUILTIN_CLFLUSH); ! def_builtin (MASK_SSE2, "__builtin_ia32_lfence", void_ftype_void, IX86_BUILTIN_LFENCE); ! def_builtin (MASK_SSE2, "__builtin_ia32_mfence", void_ftype_void, IX86_BUILTIN_MFENCE); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_loaddqa", v16qi_ftype_pcchar, IX86_BUILTIN_LOADDQA); ! def_builtin (MASK_SSE2, "__builtin_ia32_loaddqu", v16qi_ftype_pcchar, IX86_BUILTIN_LOADDQU); ! def_builtin (MASK_SSE2, "__builtin_ia32_loadd", v4si_ftype_pcint, IX86_BUILTIN_LOADD); ! def_builtin (MASK_SSE2, "__builtin_ia32_storedqa", void_ftype_pchar_v16qi, IX86_BUILTIN_STOREDQA); ! def_builtin (MASK_SSE2, "__builtin_ia32_storedqu", void_ftype_pchar_v16qi, IX86_BUILTIN_STOREDQU); ! def_builtin (MASK_SSE2, "__builtin_ia32_stored", void_ftype_pcint_v4si, IX86_BUILTIN_STORED); ! def_builtin (MASK_SSE2, "__builtin_ia32_movq", v2di_ftype_v2di, IX86_BUILTIN_MOVQ); ! ! def_builtin (MASK_SSE1, "__builtin_ia32_setzero128", v2di_ftype_void, IX86_BUILTIN_CLRTI); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_psllw128", v8hi_ftype_v8hi_v2di, IX86_BUILTIN_PSLLW128); ! def_builtin (MASK_SSE2, "__builtin_ia32_pslld128", v4si_ftype_v4si_v2di, IX86_BUILTIN_PSLLD128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psllq128", v2di_ftype_v2di_v2di, IX86_BUILTIN_PSLLQ128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_psrlw128", v8hi_ftype_v8hi_v2di, IX86_BUILTIN_PSRLW128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psrld128", v4si_ftype_v4si_v2di, IX86_BUILTIN_PSRLD128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psrlq128", v2di_ftype_v2di_v2di, IX86_BUILTIN_PSRLQ128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_psraw128", v8hi_ftype_v8hi_v2di, IX86_BUILTIN_PSRAW128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psrad128", v4si_ftype_v4si_v2di, IX86_BUILTIN_PSRAD128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_pslldqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSLLDQI128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psllwi128", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSLLWI128); ! def_builtin (MASK_SSE2, "__builtin_ia32_pslldi128", v4si_ftype_v4si_int, IX86_BUILTIN_PSLLDI128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psllqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSLLQI128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_psrldqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSRLDQI128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psrlwi128", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSRLWI128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psrldi128", v4si_ftype_v4si_int, IX86_BUILTIN_PSRLDI128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psrlqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSRLQI128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_psrawi128", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSRAWI128); ! def_builtin (MASK_SSE2, "__builtin_ia32_psradi128", v4si_ftype_v4si_int, IX86_BUILTIN_PSRADI128); ! ! def_builtin (MASK_SSE2, "__builtin_ia32_pmaddwd128", v4si_ftype_v8hi_v8hi, IX86_BUILTIN_PMADDWD128); } /* Errors in the source file can cause expand_expr to return const0_rtx *************** ix86_expand_binop_builtin (icode, arglis *** 11549,11554 **** --- 13016,13028 ---- || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) target = gen_reg_rtx (tmode); + if (GET_MODE (op1) == SImode && mode1 == TImode) + { + rtx x = gen_reg_rtx (V4SImode); + emit_insn (gen_sse2_loadd (x, op1)); + op1 = gen_lowpart (TImode, x); + } + /* In case the insn wants input operands in modes different from the result, abort. */ if (GET_MODE (op0) != mode0 || GET_MODE (op1) != mode1) *************** ix86_expand_binop_builtin (icode, arglis *** 11572,11616 **** return target; } - /* In type_for_mode we restrict the ability to create TImode types - to hosts with 64-bit H_W_I. So we've defined the SSE logicals - to have a V4SFmode signature. Convert them in-place to TImode. */ - - static rtx - ix86_expand_timode_binop_builtin (icode, arglist, target) - enum insn_code icode; - tree arglist; - rtx target; - { - rtx pat; - tree arg0 = TREE_VALUE (arglist); - tree arg1 = TREE_VALUE (TREE_CHAIN (arglist)); - rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); - rtx op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); - - op0 = gen_lowpart (TImode, op0); - op1 = gen_lowpart (TImode, op1); - target = gen_reg_rtx (TImode); - - if (! (*insn_data[icode].operand[1].predicate) (op0, TImode)) - op0 = copy_to_mode_reg (TImode, op0); - if (! (*insn_data[icode].operand[2].predicate) (op1, TImode)) - op1 = copy_to_mode_reg (TImode, op1); - - /* In the commutative cases, both op0 and op1 are nonimmediate_operand, - yet one of the two must not be a memory. This is normally enforced - by expanders, but we didn't bother to create one here. */ - if (GET_CODE (op0) == MEM && GET_CODE (op1) == MEM) - op0 = copy_to_mode_reg (TImode, op0); - - pat = GEN_FCN (icode) (target, op0, op1); - if (! pat) - return 0; - emit_insn (pat); - - return gen_lowpart (V4SFmode, target); - } - /* Subroutine of ix86_expand_builtin to take care of stores. */ static rtx --- 13046,13051 ---- *************** ix86_expand_store_builtin (icode, arglis *** 11630,11638 **** op1 = safe_vector_operand (op1, mode1); op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! ! if (! (*insn_data[icode].operand[1].predicate) (op1, mode1)) ! op1 = copy_to_mode_reg (mode1, op1); pat = GEN_FCN (icode) (op0, op1); if (pat) --- 13065,13071 ---- op1 = safe_vector_operand (op1, mode1); op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! op1 = copy_to_mode_reg (mode1, op1); pat = GEN_FCN (icode) (op0, op1); if (pat) *************** ix86_expand_unop1_builtin (icode, arglis *** 11702,11712 **** if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); ! op1 = op0; if (! (*insn_data[icode].operand[2].predicate) (op1, mode0)) op1 = copy_to_mode_reg (mode0, op1); ! pat = GEN_FCN (icode) (target, op0, op1); if (! pat) return 0; --- 13135,13145 ---- if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); ! op1 = op0; if (! (*insn_data[icode].operand[2].predicate) (op1, mode0)) op1 = copy_to_mode_reg (mode0, op1); ! pat = GEN_FCN (icode) (target, op0, op1); if (! pat) return 0; *************** ix86_expand_sse_comi (d, arglist, target *** 11808,11821 **** op1 = copy_to_mode_reg (mode1, op1); op2 = gen_rtx_fmt_ee (comparison, mode0, op0, op1); ! pat = GEN_FCN (d->icode) (op0, op1, op2); if (! pat) return 0; emit_insn (pat); emit_insn (gen_rtx_SET (VOIDmode, gen_rtx_STRICT_LOW_PART (VOIDmode, target), gen_rtx_fmt_ee (comparison, QImode, ! gen_rtx_REG (CCmode, FLAGS_REG), const0_rtx))); return SUBREG_REG (target); --- 13241,13254 ---- op1 = copy_to_mode_reg (mode1, op1); op2 = gen_rtx_fmt_ee (comparison, mode0, op0, op1); ! pat = GEN_FCN (d->icode) (op0, op1); if (! pat) return 0; emit_insn (pat); emit_insn (gen_rtx_SET (VOIDmode, gen_rtx_STRICT_LOW_PART (VOIDmode, target), gen_rtx_fmt_ee (comparison, QImode, ! SET_DEST (pat), const0_rtx))); return SUBREG_REG (target); *************** ix86_expand_builtin (exp, target, subtar *** 11856,11862 **** return 0; case IX86_BUILTIN_PEXTRW: ! icode = CODE_FOR_mmx_pextrw; arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); --- 13289,13298 ---- return 0; case IX86_BUILTIN_PEXTRW: ! case IX86_BUILTIN_PEXTRW128: ! icode = (fcode == IX86_BUILTIN_PEXTRW ! ? CODE_FOR_mmx_pextrw ! : CODE_FOR_sse2_pextrw); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); *************** ix86_expand_builtin (exp, target, subtar *** 11884,11890 **** return target; case IX86_BUILTIN_PINSRW: ! icode = CODE_FOR_mmx_pinsrw; arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); --- 13320,13329 ---- return target; case IX86_BUILTIN_PINSRW: ! case IX86_BUILTIN_PINSRW128: ! icode = (fcode == IX86_BUILTIN_PINSRW ! ? CODE_FOR_mmx_pinsrw ! : CODE_FOR_sse2_pinsrw); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); *************** ix86_expand_builtin (exp, target, subtar *** 11917,11923 **** return target; case IX86_BUILTIN_MASKMOVQ: ! icode = TARGET_64BIT ? CODE_FOR_mmx_maskmovq_rex : CODE_FOR_mmx_maskmovq; /* Note the arg order is different from the operand order. */ arg1 = TREE_VALUE (arglist); arg2 = TREE_VALUE (TREE_CHAIN (arglist)); --- 13356,13366 ---- return target; case IX86_BUILTIN_MASKMOVQ: ! case IX86_BUILTIN_MASKMOVDQU: ! icode = (fcode == IX86_BUILTIN_MASKMOVQ ! ? (TARGET_64BIT ? CODE_FOR_mmx_maskmovq_rex : CODE_FOR_mmx_maskmovq) ! : (TARGET_64BIT ? CODE_FOR_sse2_maskmovdqu_rex64 ! : CODE_FOR_sse2_maskmovdqu)); /* Note the arg order is different from the operand order. */ arg1 = TREE_VALUE (arglist); arg2 = TREE_VALUE (TREE_CHAIN (arglist)); *************** ix86_expand_builtin (exp, target, subtar *** 11948,11966 **** case IX86_BUILTIN_RCPSS: return ix86_expand_unop1_builtin (CODE_FOR_vmrcpv4sf2, arglist, target); - case IX86_BUILTIN_ANDPS: - return ix86_expand_timode_binop_builtin (CODE_FOR_sse_andti3, - arglist, target); - case IX86_BUILTIN_ANDNPS: - return ix86_expand_timode_binop_builtin (CODE_FOR_sse_nandti3, - arglist, target); - case IX86_BUILTIN_ORPS: - return ix86_expand_timode_binop_builtin (CODE_FOR_sse_iorti3, - arglist, target); - case IX86_BUILTIN_XORPS: - return ix86_expand_timode_binop_builtin (CODE_FOR_sse_xorti3, - arglist, target); - case IX86_BUILTIN_LOADAPS: return ix86_expand_unop_builtin (CODE_FOR_sse_movaps, arglist, target, 1); --- 13391,13396 ---- *************** ix86_expand_builtin (exp, target, subtar *** 11969,11974 **** --- 13399,13405 ---- case IX86_BUILTIN_STOREAPS: return ix86_expand_store_builtin (CODE_FOR_sse_movaps, arglist); + case IX86_BUILTIN_STOREUPS: return ix86_expand_store_builtin (CODE_FOR_sse_movups, arglist); *************** ix86_expand_builtin (exp, target, subtar *** 11980,11987 **** case IX86_BUILTIN_LOADHPS: case IX86_BUILTIN_LOADLPS: ! icode = (fcode == IX86_BUILTIN_LOADHPS ! ? CODE_FOR_sse_movhps : CODE_FOR_sse_movlps); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); --- 13411,13422 ---- case IX86_BUILTIN_LOADHPS: case IX86_BUILTIN_LOADLPS: ! case IX86_BUILTIN_LOADHPD: ! case IX86_BUILTIN_LOADLPD: ! icode = (fcode == IX86_BUILTIN_LOADHPS ? CODE_FOR_sse_movhps ! : fcode == IX86_BUILTIN_LOADLPS ? CODE_FOR_sse_movlps ! : fcode == IX86_BUILTIN_LOADHPD ? CODE_FOR_sse2_movhpd ! : CODE_FOR_sse2_movlpd); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); *************** ix86_expand_builtin (exp, target, subtar *** 12005,12012 **** case IX86_BUILTIN_STOREHPS: case IX86_BUILTIN_STORELPS: ! icode = (fcode == IX86_BUILTIN_STOREHPS ! ? CODE_FOR_sse_movhps : CODE_FOR_sse_movlps); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); --- 13440,13451 ---- case IX86_BUILTIN_STOREHPS: case IX86_BUILTIN_STORELPS: ! case IX86_BUILTIN_STOREHPD: ! case IX86_BUILTIN_STORELPD: ! icode = (fcode == IX86_BUILTIN_STOREHPS ? CODE_FOR_sse_movhps ! : fcode == IX86_BUILTIN_STORELPS ? CODE_FOR_sse_movlps ! : fcode == IX86_BUILTIN_STOREHPD ? CODE_FOR_sse2_movhpd ! : CODE_FOR_sse2_movlpd); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); *************** ix86_expand_builtin (exp, target, subtar *** 12042,12048 **** return copy_to_mode_reg (SImode, target); case IX86_BUILTIN_SHUFPS: ! icode = CODE_FOR_sse_shufps; arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); --- 13481,13490 ---- return copy_to_mode_reg (SImode, target); case IX86_BUILTIN_SHUFPS: ! case IX86_BUILTIN_SHUFPD: ! icode = (fcode == IX86_BUILTIN_SHUFPS ! ? CODE_FOR_sse_shufps ! : CODE_FOR_sse2_shufpd); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); *************** ix86_expand_builtin (exp, target, subtar *** 12075,12081 **** return target; case IX86_BUILTIN_PSHUFW: ! icode = CODE_FOR_mmx_pshufw; arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); --- 13517,13529 ---- return target; case IX86_BUILTIN_PSHUFW: ! case IX86_BUILTIN_PSHUFD: ! case IX86_BUILTIN_PSHUFHW: ! case IX86_BUILTIN_PSHUFLW: ! icode = ( fcode == IX86_BUILTIN_PSHUFHW ? CODE_FOR_sse2_pshufhw ! : fcode == IX86_BUILTIN_PSHUFLW ? CODE_FOR_sse2_pshuflw ! : fcode == IX86_BUILTIN_PSHUFD ? CODE_FOR_sse2_pshufd ! : CODE_FOR_mmx_pshufw); arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); *************** ix86_expand_builtin (exp, target, subtar *** 12102,12107 **** --- 13550,13584 ---- emit_insn (pat); return target; + case IX86_BUILTIN_PSLLDQI128: + case IX86_BUILTIN_PSRLDQI128: + icode = ( fcode == IX86_BUILTIN_PSLLDQI128 ? CODE_FOR_sse2_ashlti3 + : CODE_FOR_sse2_lshrti3); + arg0 = TREE_VALUE (arglist); + arg1 = TREE_VALUE (TREE_CHAIN (arglist)); + op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); + op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); + tmode = insn_data[icode].operand[0].mode; + mode1 = insn_data[icode].operand[1].mode; + mode2 = insn_data[icode].operand[2].mode; + + if (! (*insn_data[icode].operand[1].predicate) (op0, mode1)) + { + op0 = copy_to_reg (op0); + op0 = simplify_gen_subreg (mode1, op0, GET_MODE (op0), 0); + } + if (! (*insn_data[icode].operand[2].predicate) (op1, mode2)) + { + error ("shift must be an immediate"); + return const0_rtx; + } + target = gen_reg_rtx (V2DImode); + pat = GEN_FCN (icode) (simplify_gen_subreg (tmode, target, V2DImode, 0), op0, op1); + if (! pat) + return 0; + emit_insn (pat); + return target; + case IX86_BUILTIN_FEMMS: emit_insn (gen_femms ()); return NULL_RTX; *************** ix86_expand_builtin (exp, target, subtar *** 12191,12218 **** emit_insn (gen_mmx_clrdi (target)); return target; default: break; } ! for (i = 0, d = bdesc_2arg; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++) if (d->code == fcode) { /* Compares are treated specially. */ if (d->icode == CODE_FOR_maskcmpv4sf3 || d->icode == CODE_FOR_vmmaskcmpv4sf3 || d->icode == CODE_FOR_maskncmpv4sf3 ! || d->icode == CODE_FOR_vmmaskncmpv4sf3) return ix86_expand_sse_compare (d, arglist, target); return ix86_expand_binop_builtin (d->icode, arglist, target); } ! for (i = 0, d = bdesc_1arg; i < sizeof (bdesc_1arg) / sizeof *d; i++, d++) if (d->code == fcode) return ix86_expand_unop_builtin (d->icode, arglist, target, 0); ! for (i = 0, d = bdesc_comi; i < sizeof (bdesc_comi) / sizeof *d; i++, d++) if (d->code == fcode) return ix86_expand_sse_comi (d, arglist, target); --- 13668,13805 ---- emit_insn (gen_mmx_clrdi (target)); return target; + case IX86_BUILTIN_CLRTI: + target = gen_reg_rtx (V2DImode); + emit_insn (gen_sse2_clrti (simplify_gen_subreg (TImode, target, V2DImode, 0))); + return target; + + + case IX86_BUILTIN_SQRTSD: + return ix86_expand_unop1_builtin (CODE_FOR_vmsqrtv2df2, arglist, target); + case IX86_BUILTIN_LOADAPD: + return ix86_expand_unop_builtin (CODE_FOR_sse2_movapd, arglist, target, 1); + case IX86_BUILTIN_LOADUPD: + return ix86_expand_unop_builtin (CODE_FOR_sse2_movupd, arglist, target, 1); + + case IX86_BUILTIN_STOREAPD: + return ix86_expand_store_builtin (CODE_FOR_sse2_movapd, arglist); + case IX86_BUILTIN_STOREUPD: + return ix86_expand_store_builtin (CODE_FOR_sse2_movupd, arglist); + + case IX86_BUILTIN_LOADSD: + return ix86_expand_unop_builtin (CODE_FOR_sse2_loadsd, arglist, target, 1); + + case IX86_BUILTIN_STORESD: + return ix86_expand_store_builtin (CODE_FOR_sse2_storesd, arglist); + + case IX86_BUILTIN_SETPD1: + target = assign_386_stack_local (DFmode, 0); + arg0 = TREE_VALUE (arglist); + emit_move_insn (adjust_address (target, DFmode, 0), + expand_expr (arg0, NULL_RTX, VOIDmode, 0)); + op0 = gen_reg_rtx (V2DFmode); + emit_insn (gen_sse2_loadsd (op0, adjust_address (target, V2DFmode, 0))); + emit_insn (gen_sse2_shufpd (op0, op0, op0, GEN_INT (0))); + return op0; + + case IX86_BUILTIN_SETPD: + target = assign_386_stack_local (V2DFmode, 0); + arg0 = TREE_VALUE (arglist); + arg1 = TREE_VALUE (TREE_CHAIN (arglist)); + emit_move_insn (adjust_address (target, DFmode, 0), + expand_expr (arg0, NULL_RTX, VOIDmode, 0)); + emit_move_insn (adjust_address (target, DFmode, 8), + expand_expr (arg1, NULL_RTX, VOIDmode, 0)); + op0 = gen_reg_rtx (V2DFmode); + emit_insn (gen_sse2_movapd (op0, target)); + return op0; + + case IX86_BUILTIN_LOADRPD: + target = ix86_expand_unop_builtin (CODE_FOR_sse2_movapd, arglist, + gen_reg_rtx (V2DFmode), 1); + emit_insn (gen_sse2_shufpd (target, target, target, GEN_INT (1))); + return target; + + case IX86_BUILTIN_LOADPD1: + target = ix86_expand_unop_builtin (CODE_FOR_sse2_loadsd, arglist, + gen_reg_rtx (V2DFmode), 1); + emit_insn (gen_sse2_shufpd (target, target, target, const0_rtx)); + return target; + + case IX86_BUILTIN_STOREPD1: + return ix86_expand_store_builtin (CODE_FOR_sse2_movapd, arglist); + case IX86_BUILTIN_STORERPD: + return ix86_expand_store_builtin (CODE_FOR_sse2_movapd, arglist); + + case IX86_BUILTIN_CLRPD: + target = gen_reg_rtx (V2DFmode); + emit_insn (gen_sse_clrv2df (target)); + return target; + + case IX86_BUILTIN_MFENCE: + emit_insn (gen_sse2_mfence ()); + return 0; + case IX86_BUILTIN_LFENCE: + emit_insn (gen_sse2_lfence ()); + return 0; + + case IX86_BUILTIN_CLFLUSH: + arg0 = TREE_VALUE (arglist); + op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); + icode = CODE_FOR_sse2_clflush; + if (! (*insn_data[icode].operand[0].predicate) (op0, Pmode)) + op0 = copy_to_mode_reg (Pmode, op0); + + emit_insn (gen_sse2_clflush (op0)); + return 0; + + case IX86_BUILTIN_MOVNTPD: + return ix86_expand_store_builtin (CODE_FOR_sse2_movntv2df, arglist); + case IX86_BUILTIN_MOVNTDQ: + return ix86_expand_store_builtin (CODE_FOR_sse2_movntv2di, arglist); + case IX86_BUILTIN_MOVNTI: + return ix86_expand_store_builtin (CODE_FOR_sse2_movntsi, arglist); + + case IX86_BUILTIN_LOADDQA: + return ix86_expand_unop_builtin (CODE_FOR_sse2_movdqa, arglist, target, 1); + case IX86_BUILTIN_LOADDQU: + return ix86_expand_unop_builtin (CODE_FOR_sse2_movdqu, arglist, target, 1); + case IX86_BUILTIN_LOADD: + return ix86_expand_unop_builtin (CODE_FOR_sse2_loadd, arglist, target, 1); + + case IX86_BUILTIN_STOREDQA: + return ix86_expand_store_builtin (CODE_FOR_sse2_movdqa, arglist); + case IX86_BUILTIN_STOREDQU: + return ix86_expand_store_builtin (CODE_FOR_sse2_movdqu, arglist); + case IX86_BUILTIN_STORED: + return ix86_expand_store_builtin (CODE_FOR_sse2_stored, arglist); + default: break; } ! for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++) if (d->code == fcode) { /* Compares are treated specially. */ if (d->icode == CODE_FOR_maskcmpv4sf3 || d->icode == CODE_FOR_vmmaskcmpv4sf3 || d->icode == CODE_FOR_maskncmpv4sf3 ! || d->icode == CODE_FOR_vmmaskncmpv4sf3 ! || d->icode == CODE_FOR_maskcmpv2df3 ! || d->icode == CODE_FOR_vmmaskcmpv2df3 ! || d->icode == CODE_FOR_maskncmpv2df3 ! || d->icode == CODE_FOR_vmmaskncmpv2df3) return ix86_expand_sse_compare (d, arglist, target); return ix86_expand_binop_builtin (d->icode, arglist, target); } ! for (i = 0, d = bdesc_1arg; i < ARRAY_SIZE (bdesc_1arg); i++, d++) if (d->code == fcode) return ix86_expand_unop_builtin (d->icode, arglist, target, 0); ! for (i = 0, d = bdesc_comi; i < ARRAY_SIZE (bdesc_comi); i++, d++) if (d->code == fcode) return ix86_expand_sse_comi (d, arglist, target); *************** ix86_preferred_reload_class (x, class) *** 12334,12339 **** --- 13921,13928 ---- rtx x; enum reg_class class; { + if (GET_CODE (x) == CONST_VECTOR && x != CONST0_RTX (GET_MODE (x))) + return NO_REGS; if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != VOIDmode) { /* SSE can't load any constant directly yet. */ *************** ix86_hard_regno_mode_ok (regno, mode) *** 12465,12473 **** if (FP_REGNO_P (regno)) return VALID_FP_MODE_P (mode); if (SSE_REGNO_P (regno)) ! return VALID_SSE_REG_MODE (mode); if (MMX_REGNO_P (regno)) ! return VALID_MMX_REG_MODE (mode) || VALID_MMX_REG_MODE_3DNOW (mode); /* We handle both integer and floats in the general purpose registers. In future we should be able to handle vector modes as well. */ if (!VALID_INT_MODE_P (mode) && !VALID_FP_MODE_P (mode)) --- 14054,14063 ---- if (FP_REGNO_P (regno)) return VALID_FP_MODE_P (mode); if (SSE_REGNO_P (regno)) ! return (TARGET_SSE ? VALID_SSE_REG_MODE (mode) : 0); if (MMX_REGNO_P (regno)) ! return (TARGET_MMX ! ? VALID_MMX_REG_MODE (mode) || VALID_MMX_REG_MODE_3DNOW (mode) : 0); /* We handle both integer and floats in the general purpose registers. In future we should be able to handle vector modes as well. */ if (!VALID_INT_MODE_P (mode) && !VALID_FP_MODE_P (mode)) *************** ix86_memory_move_cost (mode, class, in) *** 12568,12578 **** if (mode == TFmode) mode = XFmode; return ((in ? ix86_cost->int_load[2] : ix86_cost->int_store[2]) ! * (int) GET_MODE_SIZE (mode) / 4); } } ! #ifdef DO_GLOBAL_CTORS_BODY static void ix86_svr3_asm_out_constructor (symbol, priority) rtx symbol; --- 14158,14169 ---- if (mode == TFmode) mode = XFmode; return ((in ? ix86_cost->int_load[2] : ix86_cost->int_store[2]) ! * ((int) GET_MODE_SIZE (mode) ! + UNITS_PER_WORD -1 ) / UNITS_PER_WORD); } } ! #if defined (DO_GLOBAL_CTORS_BODY) && defined (HAS_INIT_SECTION) static void ix86_svr3_asm_out_constructor (symbol, priority) rtx symbol; *************** ix86_svr3_asm_out_constructor (symbol, p *** 12585,12590 **** --- 14176,14246 ---- } #endif + #if TARGET_MACHO + + static int current_machopic_label_num; + + /* Given a symbol name and its associated stub, write out the + definition of the stub. */ + + void + machopic_output_stub (file, symb, stub) + FILE *file; + const char *symb, *stub; + { + unsigned int length; + char *binder_name, *symbol_name, lazy_ptr_name[32]; + int label = ++current_machopic_label_num; + + /* Lose our funky encoding stuff so it doesn't contaminate the stub. */ + symb = (*targetm.strip_name_encoding) (symb); + + length = strlen (stub); + binder_name = alloca (length + 32); + GEN_BINDER_NAME_FOR_STUB (binder_name, stub, length); + + length = strlen (symb); + symbol_name = alloca (length + 32); + GEN_SYMBOL_NAME_FOR_SYMBOL (symbol_name, symb, length); + + sprintf (lazy_ptr_name, "L%d$lz", label); + + if (MACHOPIC_PURE) + machopic_picsymbol_stub_section (); + else + machopic_symbol_stub_section (); + + fprintf (file, "%s:\n", stub); + fprintf (file, "\t.indirect_symbol %s\n", symbol_name); + + if (MACHOPIC_PURE) + { + fprintf (file, "\tcall LPC$%d\nLPC$%d:\tpopl %%eax\n", label, label); + fprintf (file, "\tmovl %s-LPC$%d(%%eax),%%edx\n", lazy_ptr_name, label); + fprintf (file, "\tjmp %%edx\n"); + } + else + fprintf (file, "\tjmp *%s\n", lazy_ptr_name); + + fprintf (file, "%s:\n", binder_name); + + if (MACHOPIC_PURE) + { + fprintf (file, "\tlea %s-LPC$%d(%%eax),%%eax\n", lazy_ptr_name, label); + fprintf (file, "\tpushl %%eax\n"); + } + else + fprintf (file, "\t pushl $%s\n", lazy_ptr_name); + + fprintf (file, "\tjmp dyld_stub_binding_helper\n"); + + machopic_lazy_symbol_ptr_section (); + fprintf (file, "%s:\n", lazy_ptr_name); + fprintf (file, "\t.indirect_symbol %s\n", symbol_name); + fprintf (file, "\t.long %s\n", binder_name); + } + #endif /* TARGET_MACHO */ + /* Order the registers for register allocator. */ void *************** x86_order_regs_for_local_alloc () *** 12608,12614 **** if (!TARGET_SSE_MATH) for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) reg_alloc_order [pos++] = i; ! /* SSE registers. */ for (i = FIRST_SSE_REG; i <= LAST_SSE_REG; i++) reg_alloc_order [pos++] = i; --- 14264,14270 ---- if (!TARGET_SSE_MATH) for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) reg_alloc_order [pos++] = i; ! /* SSE registers. */ for (i = FIRST_SSE_REG; i <= LAST_SSE_REG; i++) reg_alloc_order [pos++] = i; *************** x86_order_regs_for_local_alloc () *** 12629,12705 **** reg_alloc_order [pos++] = 0; } ! void ! x86_output_mi_thunk (file, delta, function) ! FILE *file; ! int delta; tree function; { ! tree parm; ! rtx xops[3]; ! if (ix86_regparm > 0) ! parm = TYPE_ARG_TYPES (TREE_TYPE (function)); else ! parm = NULL_TREE; ! for (; parm; parm = TREE_CHAIN (parm)) ! if (TREE_VALUE (parm) == void_type_node) ! break; ! xops[0] = GEN_INT (delta); if (TARGET_64BIT) { ! int n = aggregate_value_p (TREE_TYPE (TREE_TYPE (function))) != 0; ! xops[1] = gen_rtx_REG (DImode, x86_64_int_parameter_registers[n]); ! output_asm_insn ("add{q} {%0, %1|%1, %0}", xops); ! if (flag_pic) { ! fprintf (file, "\tjmp *"); ! assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); ! fprintf (file, "@GOTPCREL(%%rip)\n"); } else ! { ! fprintf (file, "\tjmp "); ! assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); ! fprintf (file, "\n"); ! } } ! else { ! if (parm) ! xops[1] = gen_rtx_REG (SImode, 0); ! else if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)))) ! xops[1] = gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 8)); else ! xops[1] = gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 4)); ! output_asm_insn ("add{l} {%0, %1|%1, %0}", xops); ! if (flag_pic) { ! xops[0] = pic_offset_table_rtx; ! xops[1] = gen_label_rtx (); ! xops[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); ! if (ix86_regparm > 2) ! abort (); ! output_asm_insn ("push{l}\t%0", xops); ! output_asm_insn ("call\t%P1", xops); ! ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (xops[1])); ! output_asm_insn ("pop{l}\t%0", xops); ! output_asm_insn ! ("add{l}\t{%2+[.-%P1], %0|%0, OFFSET FLAT: %2+[.-%P1]}", xops); ! xops[0] = gen_rtx_MEM (SImode, XEXP (DECL_RTL (function), 0)); ! output_asm_insn ! ("mov{l}\t{%0@GOT(%%ebx), %%ecx|%%ecx, %0@GOT[%%ebx]}", xops); ! asm_fprintf (file, "\tpop{l\t%%ebx|\t%%ebx}\n"); ! asm_fprintf (file, "\tjmp\t{*%%ecx|%%ecx}\n"); } else { ! fprintf (file, "\tjmp "); ! assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); ! fprintf (file, "\n"); } } } --- 14285,14475 ---- reg_alloc_order [pos++] = 0; } ! /* Returns an expression indicating where the this parameter is ! located on entry to the FUNCTION. */ ! ! static rtx ! x86_this_parameter (function) tree function; { ! tree type = TREE_TYPE (function); ! if (TARGET_64BIT) ! { ! int n = aggregate_value_p (TREE_TYPE (type)) != 0; ! return gen_rtx_REG (DImode, x86_64_int_parameter_registers[n]); ! } ! ! if (ix86_fntype_regparm (type) > 0) ! { ! tree parm; ! ! parm = TYPE_ARG_TYPES (type); ! /* Figure out whether or not the function has a variable number of ! arguments. */ ! for (; parm; parm = TREE_CHAIN (parm)) ! if (TREE_VALUE (parm) == void_type_node) ! break; ! /* If not, the this parameter is in %eax. */ ! if (parm) ! return gen_rtx_REG (SImode, 0); ! } ! ! if (aggregate_value_p (TREE_TYPE (type))) ! return gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 8)); else ! return gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 4)); ! } ! /* Determine whether x86_output_mi_thunk can succeed. */ ! ! static bool ! x86_can_output_mi_thunk (thunk, delta, vcall_offset, function) ! tree thunk ATTRIBUTE_UNUSED; ! HOST_WIDE_INT delta ATTRIBUTE_UNUSED; ! HOST_WIDE_INT vcall_offset; ! tree function; ! { ! /* 64-bit can handle anything. */ if (TARGET_64BIT) + return true; + + /* For 32-bit, everything's fine if we have one free register. */ + if (ix86_fntype_regparm (TREE_TYPE (function)) < 3) + return true; + + /* Need a free register for vcall_offset. */ + if (vcall_offset) + return false; + + /* Need a free register for GOT references. */ + if (flag_pic && !(*targetm.binds_local_p) (function)) + return false; + + /* Otherwise ok. */ + return true; + } + + /* Output the assembler code for a thunk function. THUNK_DECL is the + declaration for the thunk function itself, FUNCTION is the decl for + the target function. DELTA is an immediate constant offset to be + added to THIS. If VCALL_OFFSET is non-zero, the word at + *(*this + vcall_offset) should be added to THIS. */ + + static void + x86_output_mi_thunk (file, thunk, delta, vcall_offset, function) + FILE *file ATTRIBUTE_UNUSED; + tree thunk ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset; + tree function; + { + rtx xops[3]; + rtx this = x86_this_parameter (function); + rtx this_reg, tmp; + + /* If VCALL_OFFSET, we'll need THIS in a register. Might as well + pull it in now and let DELTA benefit. */ + if (REG_P (this)) + this_reg = this; + else if (vcall_offset) { ! /* Put the this parameter into %eax. */ ! xops[0] = this; ! xops[1] = this_reg = gen_rtx_REG (Pmode, 0); ! output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops); ! } ! else ! this_reg = NULL_RTX; ! ! /* Adjust the this parameter by a fixed constant. */ ! if (delta) ! { ! xops[0] = GEN_INT (delta); ! xops[1] = this_reg ? this_reg : this; ! if (TARGET_64BIT) { ! if (!x86_64_general_operand (xops[0], DImode)) ! { ! tmp = gen_rtx_REG (DImode, FIRST_REX_INT_REG + 2 /* R10 */); ! xops[1] = tmp; ! output_asm_insn ("mov{q}\t{%1, %0|%0, %1}", xops); ! xops[0] = tmp; ! xops[1] = this; ! } ! output_asm_insn ("add{q}\t{%0, %1|%1, %0}", xops); } else ! output_asm_insn ("add{l}\t{%0, %1|%1, %0}", xops); } ! ! /* Adjust the this parameter by a value stored in the vtable. */ ! if (vcall_offset) { ! if (TARGET_64BIT) ! tmp = gen_rtx_REG (DImode, FIRST_REX_INT_REG + 2 /* R10 */); else ! tmp = gen_rtx_REG (SImode, 2 /* ECX */); ! xops[0] = gen_rtx_MEM (Pmode, this_reg); ! xops[1] = tmp; ! if (TARGET_64BIT) ! output_asm_insn ("mov{q}\t{%0, %1|%1, %0}", xops); ! else ! output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops); ! ! /* Adjust the this parameter. */ ! xops[0] = gen_rtx_MEM (Pmode, plus_constant (tmp, vcall_offset)); ! if (TARGET_64BIT && !memory_operand (xops[0], Pmode)) { ! rtx tmp2 = gen_rtx_REG (DImode, FIRST_REX_INT_REG + 3 /* R11 */); ! xops[0] = GEN_INT (vcall_offset); ! xops[1] = tmp2; ! output_asm_insn ("mov{q}\t{%0, %1|%1, %0}", xops); ! xops[0] = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, tmp, tmp2)); ! } ! xops[1] = this_reg; ! if (TARGET_64BIT) ! output_asm_insn ("add{q}\t{%0, %1|%1, %0}", xops); ! else ! output_asm_insn ("add{l}\t{%0, %1|%1, %0}", xops); ! } ! /* If necessary, drop THIS back to its stack slot. */ ! if (this_reg && this_reg != this) ! { ! xops[0] = this_reg; ! xops[1] = this; ! output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops); ! } ! ! xops[0] = DECL_RTL (function); ! if (TARGET_64BIT) ! { ! if (!flag_pic || (*targetm.binds_local_p) (function)) ! output_asm_insn ("jmp\t%P0", xops); ! else ! { ! tmp = XEXP (xops[0], 0); ! tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, tmp), UNSPEC_GOTPCREL); ! tmp = gen_rtx_CONST (Pmode, tmp); ! tmp = gen_rtx_MEM (QImode, tmp); ! xops[0] = tmp; ! output_asm_insn ("jmp\t%A0", xops); } + } + else + { + if (!flag_pic || (*targetm.binds_local_p) (function)) + output_asm_insn ("jmp\t%P0", xops); else { ! tmp = gen_rtx_REG (SImode, 2 /* ECX */); ! output_set_got (tmp); ! ! xops[1] = tmp; ! output_asm_insn ("mov{l}\t{%0@GOT(%1), %1|%1, %0@GOT[%1]}", xops); ! output_asm_insn ("jmp\t{*}%1", xops); } } } *************** x86_field_alignment (field, computed) *** 12722,12724 **** --- 14492,14579 ---- return MIN (32, computed); return computed; } + + /* Output assembler code to FILE to increment profiler label # LABELNO + for profiling a function entry. */ + void + x86_function_profiler (file, labelno) + FILE *file; + int labelno; + { + if (TARGET_64BIT) + if (flag_pic) + { + #ifndef NO_PROFILE_COUNTERS + fprintf (file, "\tleaq\t%sP%d@(%%rip),%%r11\n", LPREFIX, labelno); + #endif + fprintf (file, "\tcall\t*%s@GOTPCREL(%%rip)\n", MCOUNT_NAME); + } + else + { + #ifndef NO_PROFILE_COUNTERS + fprintf (file, "\tmovq\t$%sP%d,%%r11\n", LPREFIX, labelno); + #endif + fprintf (file, "\tcall\t%s\n", MCOUNT_NAME); + } + else if (flag_pic) + { + #ifndef NO_PROFILE_COUNTERS + fprintf (file, "\tleal\t%sP%d@GOTOFF(%%ebx),%%%s\n", + LPREFIX, labelno, PROFILE_COUNT_REGISTER); + #endif + fprintf (file, "\tcall\t*%s@GOT(%%ebx)\n", MCOUNT_NAME); + } + else + { + #ifndef NO_PROFILE_COUNTERS + fprintf (file, "\tmovl\t$%sP%d,%%%s\n", LPREFIX, labelno, + PROFILE_COUNT_REGISTER); + #endif + fprintf (file, "\tcall\t%s\n", MCOUNT_NAME); + } + } + + /* Implement machine specific optimizations. + At the moment we implement single transformation: AMD Athlon works faster + when RET is not destination of conditional jump or directly preceeded + by other jump instruction. We avoid the penalty by inserting NOP just + before the RET instructions in such cases. */ + void + x86_machine_dependent_reorg (first) + rtx first ATTRIBUTE_UNUSED; + { + edge e; + + if (!TARGET_ATHLON || !optimize || optimize_size) + return; + for (e = EXIT_BLOCK_PTR->pred; e; e = e->pred_next) + { + basic_block bb = e->src; + rtx ret = bb->end; + rtx prev; + bool insert = false; + + if (!returnjump_p (ret) || !maybe_hot_bb_p (bb)) + continue; + prev = prev_nonnote_insn (ret); + if (prev && GET_CODE (prev) == CODE_LABEL) + { + edge e; + for (e = bb->pred; e; e = e->pred_next) + if (EDGE_FREQUENCY (e) && e->src->index > 0 + && !(e->flags & EDGE_FALLTHRU)) + insert = 1; + } + if (!insert) + { + prev = prev_real_insn (ret); + if (prev && GET_CODE (prev) == JUMP_INSN + && any_condjump_p (prev)) + insert = 1; + } + if (insert) + emit_insn_before (gen_nop (), ret); + } + } + + #include "gt-i386.h" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386-coff.h gcc-3.3/gcc/config/i386/i386-coff.h *** gcc-3.2.3/gcc/config/i386/i386-coff.h 2001-08-09 22:33:23.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386-coff.h 2002-08-29 21:40:11.000000000 +0000 *************** *** 1,7 **** /* Definitions for "naked" Intel 386 using coff object format files and coff debugging info. ! Copyright (C) 1994, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Definitions for "naked" Intel 386 using coff object format files and coff debugging info. ! Copyright (C) 1994, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 21,38 **** Boston, MA 02111-1307, USA. */ ! #include "i386/gas.h" ! #include "dbxcoff.h" ! ! /* Specify predefined symbols in preprocessor. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "" /* We want to be able to get DBX debugging information via -gstabs. */ ! #undef DBX_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG --- 21,33 ---- Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, COFF BSD syntax)"); ! #define TARGET_OS_CPP_BUILTINS() /* Sweet FA. */ /* We want to be able to get DBX debugging information via -gstabs. */ ! #define DBX_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG *************** Boston, MA 02111-1307, USA. */ *** 40,43 **** --- 35,70 ---- /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section + /* Prefix for internally generated assembler labels. If we aren't using + underscores, we are using prefix `.'s to identify labels that should + be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ + + #undef LPREFIX + #define LPREFIX ".L" + + /* The prefix to add to user-visible assembler symbols. */ + + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + + /* If user-symbols don't have underscores, + then it must take more than `L' to identify + a label that should be ignored. */ + + /* This is how to store into the string BUF + the symbol_ref name of an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. + This is suitable for output with `assemble_name'. */ + + #undef ASM_GENERATE_INTERNAL_LABEL + #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ + sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER)) + + /* This is how to output an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. */ + + #undef ASM_OUTPUT_INTERNAL_LABEL + #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ + fprintf (FILE, ".%s%d:\n", PREFIX, NUM) + /* end of i386-coff.h */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386elf.h gcc-3.3/gcc/config/i386/i386elf.h *** gcc-3.2.3/gcc/config/i386/i386elf.h 2001-12-20 17:36:35.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386elf.h 2002-06-16 21:13:09.000000000 +0000 *************** *** 1,5 **** /* Target definitions for GNU compiler for Intel 80386 using ELF ! Copyright (C) 1988, 1991, 1995, 2000, 2001 Free Software Foundation, Inc. Derived from sysv4.h written by Ron Guilmette (rfg@netcom.com). --- 1,6 ---- /* Target definitions for GNU compiler for Intel 80386 using ELF ! Copyright (C) 1988, 1991, 1995, 2000, 2001, 2002 ! Free Software Foundation, Inc. Derived from sysv4.h written by Ron Guilmette (rfg@netcom.com). *************** Boston, MA 02111-1307, USA. */ *** 24,30 **** #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 bare ELF target)"); /* By default, target has a 80387, uses IEEE compatible arithmetic, --- 25,30 ---- *************** Boston, MA 02111-1307, USA. */ *** 40,51 **** (TYPE_MODE (TYPE) == BLKmode \ || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) - /* This used to define X86, but james@bigtex.cactus.org says that - is supposed to be defined optionally by user programs--not by default. */ - #define CPP_PREDEFINES "" - #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu)" #define ENDFILE_SPEC "crtend.o%s" --- 40,47 ---- (TYPE_MODE (TYPE) == BLKmode \ || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) #undef CPP_SPEC ! #define CPP_SPEC "" #define ENDFILE_SPEC "crtend.o%s" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386.h gcc-3.3/gcc/config/i386/i386.h *** gcc-3.2.3/gcc/config/i386/i386.h 2003-02-20 20:04:02.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386.h 2003-04-28 15:26:54.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 34,53 **** ADDR_BEG, ADDR_END, PRINT_IREG, PRINT_SCALE, PRINT_B_I_S, and many that start with ASM_ or end in ASM_OP. */ - /* Stubs for half-pic support if not OSF/1 reference platform. */ - - #ifndef HALF_PIC_P - #define HALF_PIC_P() 0 - #define HALF_PIC_NUMBER_PTRS 0 - #define HALF_PIC_NUMBER_REFS 0 - #define HALF_PIC_ENCODE(DECL) - #define HALF_PIC_DECLARE(NAME) - #define HALF_PIC_INIT() error ("half-pic init called on systems that don't support it") - #define HALF_PIC_ADDRESS_P(X) 0 - #define HALF_PIC_PTR(X) (X) - #define HALF_PIC_FINISH(STREAM) - #endif - /* Define the specific costs for a given cpu */ struct processor_costs { --- 34,39 ---- *************** struct processor_costs { *** 89,94 **** --- 75,86 ---- const int prefetch_block; /* bytes moved to cache for prefetch. */ const int simultaneous_prefetches; /* number of parallel prefetch operations. */ + const int fadd; /* cost of FADD and FSUB instructions. */ + const int fmul; /* cost of FMUL instruction. */ + const int fdiv; /* cost of FDIV instruction. */ + const int fabs; /* cost of FABS instruction. */ + const int fchs; /* cost of FCHS instruction. */ + const int fsqrt; /* cost of FSQRT instruction. */ }; extern const struct processor_costs *ix86_cost; *************** extern int target_flags; *** 119,137 **** #define MASK_INLINE_ALL_STROPS 0x00000400 /* Inline stringops in all cases */ #define MASK_NO_PUSH_ARGS 0x00000800 /* Use push instructions */ #define MASK_ACCUMULATE_OUTGOING_ARGS 0x00001000/* Accumulate outgoing args */ ! #define MASK_ACCUMULATE_OUTGOING_ARGS_SET 0x00002000 ! #define MASK_MMX 0x00004000 /* Support MMX regs/builtins */ ! #define MASK_MMX_SET 0x00008000 ! #define MASK_SSE 0x00010000 /* Support SSE regs/builtins */ ! #define MASK_SSE_SET 0x00020000 ! #define MASK_SSE2 0x00040000 /* Support SSE2 regs/builtins */ ! #define MASK_SSE2_SET 0x00080000 ! #define MASK_3DNOW 0x00100000 /* Support 3Dnow builtins */ ! #define MASK_3DNOW_SET 0x00200000 ! #define MASK_3DNOW_A 0x00400000 /* Support Athlon 3Dnow builtins */ ! #define MASK_3DNOW_A_SET 0x00800000 ! #define MASK_128BIT_LONG_DOUBLE 0x01000000 /* long double size is 128bit */ ! #define MASK_64BIT 0x02000000 /* Produce 64bit code */ /* ... overlap with subtarget options starts by 0x04000000. */ #define MASK_NO_RED_ZONE 0x04000000 /* Do not use red zone */ --- 111,126 ---- #define MASK_INLINE_ALL_STROPS 0x00000400 /* Inline stringops in all cases */ #define MASK_NO_PUSH_ARGS 0x00000800 /* Use push instructions */ #define MASK_ACCUMULATE_OUTGOING_ARGS 0x00001000/* Accumulate outgoing args */ ! #define MASK_MMX 0x00002000 /* Support MMX regs/builtins */ ! #define MASK_SSE 0x00004000 /* Support SSE regs/builtins */ ! #define MASK_SSE2 0x00008000 /* Support SSE2 regs/builtins */ ! #define MASK_3DNOW 0x00010000 /* Support 3Dnow builtins */ ! #define MASK_3DNOW_A 0x00020000 /* Support Athlon 3Dnow builtins */ ! #define MASK_128BIT_LONG_DOUBLE 0x00040000 /* long double size is 128bit */ ! #define MASK_64BIT 0x00080000 /* Produce 64bit code */ ! ! /* Unused: 0x03f0000 */ ! /* ... overlap with subtarget options starts by 0x04000000. */ #define MASK_NO_RED_ZONE 0x04000000 /* Do not use red zone */ *************** extern int target_flags; *** 140,146 **** /* Compile using ret insn that pops args. This will not work unless you use prototypes at least ! for all functions that can take varying numbers of args. */ #define TARGET_RTD (target_flags & MASK_RTD) /* Align doubles to a two word boundary. This breaks compatibility with --- 129,135 ---- /* Compile using ret insn that pops args. This will not work unless you use prototypes at least ! for all functions that can take varying numbers of args. */ #define TARGET_RTD (target_flags & MASK_RTD) /* Align doubles to a two word boundary. This breaks compatibility with *************** extern int target_flags; *** 188,203 **** /* Debug FUNCTION_ARG macros */ #define TARGET_DEBUG_ARG (ix86_debug_arg_string != 0) ! /* 64bit Sledgehammer mode */ #ifdef TARGET_BI_ARCH #define TARGET_64BIT (target_flags & MASK_64BIT) #else ! #ifdef TARGET_64BIT_DEFAULT #define TARGET_64BIT 1 #else #define TARGET_64BIT 0 #endif #endif #define TARGET_386 (ix86_cpu == PROCESSOR_I386) #define TARGET_486 (ix86_cpu == PROCESSOR_I486) --- 177,201 ---- /* Debug FUNCTION_ARG macros */ #define TARGET_DEBUG_ARG (ix86_debug_arg_string != 0) ! /* 64bit Sledgehammer mode. For libgcc2 we make sure this is a ! compile-time constant. */ ! #ifdef IN_LIBGCC2 ! #ifdef __x86_64__ ! #define TARGET_64BIT 1 ! #else ! #define TARGET_64BIT 0 ! #endif ! #else #ifdef TARGET_BI_ARCH #define TARGET_64BIT (target_flags & MASK_64BIT) #else ! #if TARGET_64BIT_DEFAULT #define TARGET_64BIT 1 #else #define TARGET_64BIT 0 #endif #endif + #endif #define TARGET_386 (ix86_cpu == PROCESSOR_I386) #define TARGET_486 (ix86_cpu == PROCESSOR_I486) *************** extern const int x86_double_with_add, x8 *** 215,228 **** extern const int x86_use_loop, x86_use_fiop, x86_use_mov0; extern const int x86_use_cltd, x86_read_modify_write; extern const int x86_read_modify, x86_split_long_moves; ! extern const int x86_promote_QImode, x86_single_stringop; extern const int x86_himode_math, x86_qimode_math, x86_promote_qi_regs; extern const int x86_promote_hi_regs, x86_integer_DFmode_moves; extern const int x86_add_esp_4, x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8; extern const int x86_partial_reg_dependency, x86_memory_mismatch_stall; extern const int x86_accumulate_outgoing_args, x86_prologue_using_move; extern const int x86_epilogue_using_move, x86_decompose_lea; ! extern const int x86_arch_always_fancy_math_387; extern int x86_prefetch_sse; #define TARGET_USE_LEAVE (x86_use_leave & CPUMASK) --- 213,226 ---- extern const int x86_use_loop, x86_use_fiop, x86_use_mov0; extern const int x86_use_cltd, x86_read_modify_write; extern const int x86_read_modify, x86_split_long_moves; ! extern const int x86_promote_QImode, x86_single_stringop, x86_fast_prefix; extern const int x86_himode_math, x86_qimode_math, x86_promote_qi_regs; extern const int x86_promote_hi_regs, x86_integer_DFmode_moves; extern const int x86_add_esp_4, x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8; extern const int x86_partial_reg_dependency, x86_memory_mismatch_stall; extern const int x86_accumulate_outgoing_args, x86_prologue_using_move; extern const int x86_epilogue_using_move, x86_decompose_lea; ! extern const int x86_arch_always_fancy_math_387, x86_shift1; extern int x86_prefetch_sse; #define TARGET_USE_LEAVE (x86_use_leave & CPUMASK) *************** extern int x86_prefetch_sse; *** 247,252 **** --- 245,251 ---- #define TARGET_READ_MODIFY_WRITE (x86_read_modify_write & CPUMASK) #define TARGET_READ_MODIFY (x86_read_modify & CPUMASK) #define TARGET_PROMOTE_QImode (x86_promote_QImode & CPUMASK) + #define TARGET_FAST_PREFIX (x86_fast_prefix & CPUMASK) #define TARGET_SINGLE_STRINGOP (x86_single_stringop & CPUMASK) #define TARGET_QIMODE_MATH (x86_qimode_math & CPUMASK) #define TARGET_HIMODE_MATH (x86_himode_math & CPUMASK) *************** extern int x86_prefetch_sse; *** 263,268 **** --- 262,268 ---- #define TARGET_EPILOGUE_USING_MOVE (x86_epilogue_using_move & CPUMASK) #define TARGET_DECOMPOSE_LEA (x86_decompose_lea & CPUMASK) #define TARGET_PREFETCH_SSE (x86_prefetch_sse) + #define TARGET_SHIFT1 (x86_shift1 & CPUMASK) #define TARGET_STACK_PROBE (target_flags & MASK_STACK_PROBE) *************** extern int x86_prefetch_sse; *** 282,287 **** --- 282,290 ---- #define TARGET_RED_ZONE (!(target_flags & MASK_NO_RED_ZONE)) + #define TARGET_GNU_TLS (ix86_tls_dialect == TLS_DIALECT_GNU) + #define TARGET_SUN_TLS (ix86_tls_dialect == TLS_DIALECT_SUN) + /* WARNING: Do not mark empty strings for translation, as calling gettext on an empty string does NOT return an empty string. */ *************** extern int x86_prefetch_sse; *** 343,372 **** N_("Use push instructions to save outgoing arguments") }, \ { "no-push-args", MASK_NO_PUSH_ARGS, \ N_("Do not use push instructions to save outgoing arguments") }, \ ! { "accumulate-outgoing-args", (MASK_ACCUMULATE_OUTGOING_ARGS \ ! | MASK_ACCUMULATE_OUTGOING_ARGS_SET), \ N_("Use push instructions to save outgoing arguments") }, \ ! { "no-accumulate-outgoing-args",MASK_ACCUMULATE_OUTGOING_ARGS_SET, \ N_("Do not use push instructions to save outgoing arguments") }, \ ! { "mmx", MASK_MMX | MASK_MMX_SET, \ N_("Support MMX built-in functions") }, \ { "no-mmx", -MASK_MMX, \ N_("Do not support MMX built-in functions") }, \ ! { "no-mmx", MASK_MMX_SET, "" }, \ ! { "3dnow", MASK_3DNOW | MASK_3DNOW_SET, \ N_("Support 3DNow! built-in functions") }, \ ! { "no-3dnow", -MASK_3DNOW, "" }, \ ! { "no-3dnow", MASK_3DNOW_SET, \ N_("Do not support 3DNow! built-in functions") }, \ ! { "sse", MASK_SSE | MASK_SSE_SET, \ N_("Support MMX and SSE built-in functions and code generation") }, \ ! { "no-sse", -MASK_SSE, "" }, \ ! { "no-sse", MASK_SSE_SET, \ N_("Do not support MMX and SSE built-in functions and code generation") },\ ! { "sse2", MASK_SSE2 | MASK_SSE2_SET, \ N_("Support MMX, SSE and SSE2 built-in functions and code generation") }, \ ! { "no-sse2", -MASK_SSE2, "" }, \ ! { "no-sse2", MASK_SSE2_SET, \ N_("Do not support MMX, SSE and SSE2 built-in functions and code generation") }, \ { "128bit-long-double", MASK_128BIT_LONG_DOUBLE, \ N_("sizeof(long double) is 16") }, \ --- 346,370 ---- N_("Use push instructions to save outgoing arguments") }, \ { "no-push-args", MASK_NO_PUSH_ARGS, \ N_("Do not use push instructions to save outgoing arguments") }, \ ! { "accumulate-outgoing-args", MASK_ACCUMULATE_OUTGOING_ARGS, \ N_("Use push instructions to save outgoing arguments") }, \ ! { "no-accumulate-outgoing-args",-MASK_ACCUMULATE_OUTGOING_ARGS, \ N_("Do not use push instructions to save outgoing arguments") }, \ ! { "mmx", MASK_MMX, \ N_("Support MMX built-in functions") }, \ { "no-mmx", -MASK_MMX, \ N_("Do not support MMX built-in functions") }, \ ! { "3dnow", MASK_3DNOW, \ N_("Support 3DNow! built-in functions") }, \ ! { "no-3dnow", -MASK_3DNOW, \ N_("Do not support 3DNow! built-in functions") }, \ ! { "sse", MASK_SSE, \ N_("Support MMX and SSE built-in functions and code generation") }, \ ! { "no-sse", -MASK_SSE, \ N_("Do not support MMX and SSE built-in functions and code generation") },\ ! { "sse2", MASK_SSE2, \ N_("Support MMX, SSE and SSE2 built-in functions and code generation") }, \ ! { "no-sse2", -MASK_SSE2, \ N_("Do not support MMX, SSE and SSE2 built-in functions and code generation") }, \ { "128bit-long-double", MASK_128BIT_LONG_DOUBLE, \ N_("sizeof(long double) is 16") }, \ *************** extern int x86_prefetch_sse; *** 381,418 **** { "no-red-zone", MASK_NO_RED_ZONE, \ N_("Do not use red-zone in the x86-64 code") }, \ SUBTARGET_SWITCHES \ ! { "", TARGET_DEFAULT, 0 }} ! #ifdef TARGET_64BIT_DEFAULT ! #define TARGET_DEFAULT (MASK_64BIT | TARGET_SUBTARGET_DEFAULT) ! #else ! #define TARGET_DEFAULT TARGET_SUBTARGET_DEFAULT #endif ! /* Which processor to schedule for. The cpu attribute defines a list that ! mirrors this list, so changes to i386.md must be made at the same time. */ ! ! enum processor_type ! { ! PROCESSOR_I386, /* 80386 */ ! PROCESSOR_I486, /* 80486DX, 80486SX, 80486DX[24] */ ! PROCESSOR_PENTIUM, ! PROCESSOR_PENTIUMPRO, ! PROCESSOR_K6, ! PROCESSOR_ATHLON, ! PROCESSOR_PENTIUM4, ! PROCESSOR_max ! }; ! enum fpmath_unit ! { ! FPMATH_387 = 1, ! FPMATH_SSE = 2 ! }; ! ! extern enum processor_type ix86_cpu; ! extern enum fpmath_unit ix86_fpmath; ! extern int ix86_arch; /* This macro is similar to `TARGET_SWITCHES' but defines names of command options that have values. Its definition is an --- 379,399 ---- { "no-red-zone", MASK_NO_RED_ZONE, \ N_("Do not use red-zone in the x86-64 code") }, \ SUBTARGET_SWITCHES \ ! { "", TARGET_DEFAULT | TARGET_64BIT_DEFAULT | TARGET_SUBTARGET_DEFAULT, 0 }} ! #ifndef TARGET_64BIT_DEFAULT ! #define TARGET_64BIT_DEFAULT 0 #endif ! /* Once GDB has been enhanced to deal with functions without frame ! pointers, we can change this to allow for elimination of ! the frame pointer in leaf functions. */ ! #define TARGET_DEFAULT 0 ! /* This is not really a target flag, but is done this way so that ! it's analogous to similar code for Mach-O on PowerPC. darwin.h ! redefines this to 1. */ ! #define TARGET_MACHO 0 /* This macro is similar to `TARGET_SWITCHES' but defines names of command options that have values. Its definition is an *************** extern int ix86_arch; *** 451,456 **** --- 432,439 ---- "" /* Undocumented. */ }, \ { "asm=", &ix86_asm_string, \ N_("Use given assembler dialect") }, \ + { "tls-dialect=", &ix86_tls_dialect_string, \ + N_("Use given thread-local storage dialect") }, \ SUBTARGET_OPTIONS \ } *************** extern int ix86_arch; *** 492,497 **** --- 475,613 ---- %n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.\n}" #endif + /* Target CPU builtins. */ + #define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + size_t arch_len = strlen (ix86_arch_string); \ + size_t cpu_len = strlen (ix86_cpu_string); \ + int last_arch_char = ix86_arch_string[arch_len - 1]; \ + int last_cpu_char = ix86_cpu_string[cpu_len - 1]; \ + \ + if (TARGET_64BIT) \ + { \ + builtin_assert ("cpu=x86_64"); \ + builtin_assert ("machine=x86_64"); \ + builtin_define ("__x86_64"); \ + builtin_define ("__x86_64__"); \ + builtin_define ("__amd64"); \ + builtin_define ("__amd64__"); \ + } \ + else \ + { \ + builtin_assert ("cpu=i386"); \ + builtin_assert ("machine=i386"); \ + builtin_define_std ("i386"); \ + } \ + \ + /* Built-ins based on -mcpu= (or -march= if no \ + CPU given). */ \ + if (TARGET_386) \ + builtin_define ("__tune_i386__"); \ + else if (TARGET_486) \ + builtin_define ("__tune_i486__"); \ + else if (TARGET_PENTIUM) \ + { \ + builtin_define ("__tune_i586__"); \ + builtin_define ("__tune_pentium__"); \ + if (last_cpu_char == 'x') \ + builtin_define ("__tune_pentium_mmx__"); \ + } \ + else if (TARGET_PENTIUMPRO) \ + { \ + builtin_define ("__tune_i686__"); \ + builtin_define ("__tune_pentiumpro__"); \ + switch (last_cpu_char) \ + { \ + case '3': \ + builtin_define ("__tune_pentium3__"); \ + /* FALLTHRU */ \ + case '2': \ + builtin_define ("__tune_pentium2__"); \ + break; \ + } \ + } \ + else if (TARGET_K6) \ + { \ + builtin_define ("__tune_k6__"); \ + if (last_cpu_char == '2') \ + builtin_define ("__tune_k6_2__"); \ + else if (last_cpu_char == '3') \ + builtin_define ("__tune_k6_3__"); \ + } \ + else if (TARGET_ATHLON) \ + { \ + builtin_define ("__tune_athlon__"); \ + /* Only plain "athlon" lacks SSE. */ \ + if (last_cpu_char != 'n') \ + builtin_define ("__tune_athlon_sse__"); \ + } \ + else if (TARGET_PENTIUM4) \ + builtin_define ("__tune_pentium4__"); \ + \ + if (TARGET_MMX) \ + builtin_define ("__MMX__"); \ + if (TARGET_3DNOW) \ + builtin_define ("__3dNOW__"); \ + if (TARGET_3DNOW_A) \ + builtin_define ("__3dNOW_A__"); \ + if (TARGET_SSE) \ + builtin_define ("__SSE__"); \ + if (TARGET_SSE2) \ + builtin_define ("__SSE2__"); \ + if (TARGET_SSE_MATH && TARGET_SSE) \ + builtin_define ("__SSE_MATH__"); \ + if (TARGET_SSE_MATH && TARGET_SSE2) \ + builtin_define ("__SSE2_MATH__"); \ + \ + /* Built-ins based on -march=. */ \ + if (ix86_arch == PROCESSOR_I486) \ + { \ + builtin_define ("__i486"); \ + builtin_define ("__i486__"); \ + } \ + else if (ix86_arch == PROCESSOR_PENTIUM) \ + { \ + builtin_define ("__i586"); \ + builtin_define ("__i586__"); \ + builtin_define ("__pentium"); \ + builtin_define ("__pentium__"); \ + if (last_arch_char == 'x') \ + builtin_define ("__pentium_mmx__"); \ + } \ + else if (ix86_arch == PROCESSOR_PENTIUMPRO) \ + { \ + builtin_define ("__i686"); \ + builtin_define ("__i686__"); \ + builtin_define ("__pentiumpro"); \ + builtin_define ("__pentiumpro__"); \ + } \ + else if (ix86_arch == PROCESSOR_K6) \ + { \ + \ + builtin_define ("__k6"); \ + builtin_define ("__k6__"); \ + if (last_arch_char == '2') \ + builtin_define ("__k6_2__"); \ + else if (last_arch_char == '3') \ + builtin_define ("__k6_3__"); \ + } \ + else if (ix86_arch == PROCESSOR_ATHLON) \ + { \ + builtin_define ("__athlon"); \ + builtin_define ("__athlon__"); \ + /* Only plain "athlon" lacks SSE. */ \ + if (last_arch_char != 'n') \ + builtin_define ("__athlon_sse__"); \ + } \ + else if (ix86_arch == PROCESSOR_PENTIUM4) \ + { \ + builtin_define ("__pentium4"); \ + builtin_define ("__pentium4__"); \ + } \ + } \ + while (0) + #define TARGET_CPU_DEFAULT_i386 0 #define TARGET_CPU_DEFAULT_i486 1 #define TARGET_CPU_DEFAULT_pentium 2 *************** extern int ix86_arch; *** 510,646 **** "pentiumpro", "pentium2", "pentium3", \ "pentium4", "k6", "k6-2", "k6-3",\ "athlon", "athlon-4"} - #ifndef CPP_CPU_DEFAULT_SPEC - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_i486 - #define CPP_CPU_DEFAULT_SPEC "-D__tune_i486__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium - #define CPP_CPU_DEFAULT_SPEC "-D__tune_i586__ -D__tune_pentium__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium_mmx - #define CPP_CPU_DEFAULT_SPEC "-D__tune_i586__ -D__tune_pentium__ -D__tune_pentium_mmx__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentiumpro - #define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium2 - #define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__ \ - -D__tune_pentium2__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium3 - #define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__ \ - -D__tune_pentium2__ -D__tune_pentium3__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium4 - #define CPP_CPU_DEFAULT_SPEC "-D__tune_pentium4__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_k6 - #define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_k6_2 - #define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__ -D__tune_k6_2__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_k6_3 - #define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__ -D__tune_k6_3__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_athlon - #define CPP_CPU_DEFAULT_SPEC "-D__tune_athlon__" - #endif - #if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_athlon_sse - #define CPP_CPU_DEFAULT_SPEC "-D__tune_athlon__ -D__tune_athlon_sse__" - #endif - #ifndef CPP_CPU_DEFAULT_SPEC - #define CPP_CPU_DEFAULT_SPEC "-D__tune_i386__" - #endif - #endif /* CPP_CPU_DEFAULT_SPEC */ - - #ifdef TARGET_BI_ARCH - #define NO_BUILTIN_SIZE_TYPE - #define NO_BUILTIN_PTRDIFF_TYPE - #endif - - #ifdef NO_BUILTIN_SIZE_TYPE - #define CPP_CPU32_SIZE_TYPE_SPEC \ - " -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int" - #define CPP_CPU64_SIZE_TYPE_SPEC \ - " -D__SIZE_TYPE__=unsigned\\ long\\ int -D__PTRDIFF_TYPE__=long\\ int" - #else - #define CPP_CPU32_SIZE_TYPE_SPEC "" - #define CPP_CPU64_SIZE_TYPE_SPEC "" - #endif - - #define CPP_CPU32_SPEC \ - "-Acpu=i386 -Amachine=i386 %{!ansi:%{!std=c*:%{!std=i*:-Di386}}} -D__i386 \ - -D__i386__ %(cpp_cpu32sizet)" - - #define CPP_CPU64_SPEC \ - "-Acpu=x86_64 -Amachine=x86_64 -D__x86_64 -D__x86_64__ %(cpp_cpu64sizet)" - - #define CPP_CPUCOMMON_SPEC "\ - %{march=i386:%{!mcpu*:-D__tune_i386__ }}\ - %{march=i486:-D__i486 -D__i486__ %{!mcpu*:-D__tune_i486__ }}\ - %{march=pentium|march=i586:-D__i586 -D__i586__ -D__pentium -D__pentium__ \ - %{!mcpu*:-D__tune_i586__ -D__tune_pentium__ }}\ - %{march=pentium-mmx:-D__i586 -D__i586__ -D__pentium -D__pentium__ \ - -D__pentium__mmx__ \ - %{!mcpu*:-D__tune_i586__ -D__tune_pentium__ -D__tune_pentium_mmx__}}\ - %{march=pentiumpro|march=i686|march=pentium2|march=pentium3:-D__i686 -D__i686__ \ - -D__pentiumpro -D__pentiumpro__ \ - %{!mcpu*:-D__tune_i686__ -D__tune_pentiumpro__ }}\ - %{march=pentium2|march=pentium3: -D__pentium2 -D__pentium2__\ - %{!mcpu*:-D__tune_pentium2__ }}\ - %{march=pentium3: -D__pentium3 -D__pentium3__\ - %{!mcpu*:-D__tune_pentium3__ }}\ - %{march=k6:-D__k6 -D__k6__ %{!mcpu*:-D__tune_k6__ }}\ - %{march=k6-2:-D__k6 -D__k6__ -D__k6_2__ \ - %{!mcpu*:-D__tune_k6__ -D__tune_k6_2__ }}\ - %{march=k6-3:-D__k6 -D__k6__ -D__k6_3__ \ - %{!mcpu*:-D__tune_k6__ -D__tune_k6_3__ }}\ - %{march=athlon|march=athlon-tbird:-D__athlon -D__athlon__ \ - %{!mcpu*:-D__tune_athlon__ }}\ - %{march=athlon-4|march=athlon-xp|march=athlon-mp:-D__athlon -D__athlon__ \ - -D__athlon_sse__ \ - %{!mcpu*:-D__tune_athlon__ -D__tune_athlon_sse__ }}\ - %{march=pentium4:-D__pentium4 -D__pentium4__ %{!mcpu*:-D__tune_pentium4__ }}\ - %{m386|mcpu=i386:-D__tune_i386__ }\ - %{m486|mcpu=i486:-D__tune_i486__ }\ - %{mpentium|mcpu=pentium|mcpu=i586|mcpu=pentium-mmx:-D__tune_i586__ -D__tune_pentium__ }\ - %{mpentiumpro|mcpu=pentiumpro|mcpu=i686|mcpu=pentium2|mcpu=pentium3:-D__tune_i686__ \ - -D__tune_pentiumpro__ }\ - %{mcpu=k6|mcpu=k6-2|mcpu=k6-3:-D__tune_k6__ }\ - %{mcpu=athlon|mcpu=athlon-tbird|mcpu=athlon-4|mcpu=athlon-xp|mcpu=athlon-mp:\ - -D__tune_athlon__ }\ - %{mcpu=athlon-4|mcpu=athlon-xp|mcpu=athlon-mp:\ - -D__tune_athlon_sse__ }\ - %{mcpu=pentium4:-D__tune_pentium4__ }\ - %{march=athlon-xp|march=athlon-mp|march=pentium3|march=pentium4|msse|msse2:\ - -D__SSE__ }\ - %{march=pentium-mmx|march=k6|march=k6-2|march=k6-3\ - |march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\ - |march=athlon-mp|march=pentium2|march=pentium3|march=pentium4|mmx|msse|m3dnow: -D__MMX__ }\ - %{march=k6-2|march=k6-3\ - |march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\ - |march=athlon-mp|m3dnow: -D__3dNOW__ }\ - %{march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\ - |march=athlon-mp: -D__3dNOW_A__ }\ - %{march=pentium4|msse2: -D__SSE2__ }\ - %{!march*:%{!mcpu*:%{!m386:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}}" - - #ifndef CPP_CPU_SPEC - #ifdef TARGET_BI_ARCH - #ifdef TARGET_64BIT_DEFAULT - #define CPP_CPU_SPEC "%{m32:%(cpp_cpu32)}%{!m32:%(cpp_cpu64)} %(cpp_cpucommon)" - #else - #define CPP_CPU_SPEC "%{m64:%(cpp_cpu64)}%{!m64:%(cpp_cpu32)} %(cpp_cpucommon)" - #endif - #else - #ifdef TARGET_64BIT_DEFAULT - #define CPP_CPU_SPEC "%(cpp_cpu64) %(cpp_cpucommon)" - #else - #define CPP_CPU_SPEC "%(cpp_cpu32) %(cpp_cpucommon)" - #endif - #endif - #endif #ifndef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) " --- 626,631 ---- *************** extern int ix86_arch; *** 661,684 **** #endif #define EXTRA_SPECS \ - { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \ - { "cpp_cpu", CPP_CPU_SPEC }, \ - { "cpp_cpu32", CPP_CPU32_SPEC }, \ - { "cpp_cpu64", CPP_CPU64_SPEC }, \ - { "cpp_cpu32sizet", CPP_CPU32_SIZE_TYPE_SPEC }, \ - { "cpp_cpu64sizet", CPP_CPU64_SIZE_TYPE_SPEC }, \ - { "cpp_cpucommon", CPP_CPUCOMMON_SPEC }, \ { "cc1_cpu", CC1_CPU_SPEC }, \ SUBTARGET_EXTRA_SPECS /* target machine storage layout */ /* Define for XFmode or TFmode extended real floating point support. - This will automatically cause REAL_ARITHMETIC to be defined. - The XFmode is specified by i386 ABI, while TFmode may be faster ! due to alignment and simplifications in the address calculations. ! */ #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96) #define MAX_LONG_DOUBLE_TYPE_SIZE 128 #ifdef __x86_64__ --- 646,659 ---- #endif #define EXTRA_SPECS \ { "cc1_cpu", CC1_CPU_SPEC }, \ SUBTARGET_EXTRA_SPECS /* target machine storage layout */ /* Define for XFmode or TFmode extended real floating point support. The XFmode is specified by i386 ABI, while TFmode may be faster ! due to alignment and simplifications in the address calculations. */ #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96) #define MAX_LONG_DOUBLE_TYPE_SIZE 128 #ifdef __x86_64__ *************** extern int ix86_arch; *** 686,695 **** #else #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96 #endif - /* Tell real.c that this is the 80-bit Intel extended float format - packaged in a 128-bit or 96bit entity. */ - #define INTEL_EXTENDED_IEEE_FORMAT 1 #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE 32 --- 661,674 ---- #else #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96 #endif + /* Set the value of FLT_EVAL_METHOD in float.h. When using only the + FPU, assume that the fpcw is set to extended precision; when using + only SSE, rounding is correct; when using both SSE and the FPU, + the rounding precision is indeterminate, since either may be chosen + apparently at random. */ + #define TARGET_FLT_EVAL_METHOD \ + (TARGET_MIX_SSE_I387 ? -1 : TARGET_SSE_MATH ? 1 : 2) #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE 32 *************** extern int ix86_arch; *** 699,705 **** #define DOUBLE_TYPE_SIZE 64 #define LONG_LONG_TYPE_SIZE 64 ! #if defined (TARGET_BI_ARCH) || defined (TARGET_64BIT_DEFAULT) #define MAX_BITS_PER_WORD 64 #define MAX_LONG_TYPE_SIZE 64 #else --- 678,684 ---- #define DOUBLE_TYPE_SIZE 64 #define LONG_LONG_TYPE_SIZE 64 ! #if defined (TARGET_BI_ARCH) || TARGET_64BIT_DEFAULT #define MAX_BITS_PER_WORD 64 #define MAX_LONG_TYPE_SIZE 64 #else *************** extern int ix86_arch; *** 707,717 **** #define MAX_LONG_TYPE_SIZE 32 #endif - /* Define if you don't want extended real, but do want to use the - software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - /* #define REAL_ARITHMETIC */ - /* Define this if most significant byte of a word is the lowest numbered. */ /* That is true on the 80386. */ --- 686,691 ---- *************** extern int ix86_arch; *** 726,747 **** /* Not true for 80386 */ #define WORDS_BIG_ENDIAN 0 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 80386, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD (TARGET_64BIT ? 64 : 32) - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) ! #define MIN_UNITS_PER_WORD 4 ! ! /* Width in bits of a pointer. ! See also the macro `Pmode' defined below. */ ! #define POINTER_SIZE BITS_PER_WORD /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY BITS_PER_WORD --- 700,712 ---- /* Not true for 80386 */ #define WORDS_BIG_ENDIAN 0 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) ! #ifdef IN_LIBGCC2 ! #define MIN_UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) ! #else ! #define MIN_UNITS_PER_WORD 4 ! #endif /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY BITS_PER_WORD *************** extern int ix86_arch; *** 774,789 **** and all fundamental data types supported by the hardware might need to be aligned. No data type wants to be aligned rounder than this. ! Pentium+ preferrs DFmode values to be aligned to 64 bit boundary and Pentium Pro XFmode values at 128 bit boundaries. */ #define BIGGEST_ALIGNMENT 128 ! /* Decide whether a variable of mode MODE must be 128 bit aligned. */ #define ALIGN_MODE_128(MODE) \ ! ((MODE) == XFmode || (MODE) == TFmode || ((MODE) == TImode) \ ! || (MODE) == V4SFmode || (MODE) == V4SImode) /* The published ABIs say that doubles should be aligned on word boundaries, so lower the aligment for structure fields unless --- 739,753 ---- and all fundamental data types supported by the hardware might need to be aligned. No data type wants to be aligned rounder than this. ! Pentium+ preferrs DFmode values to be aligned to 64 bit boundary and Pentium Pro XFmode values at 128 bit boundaries. */ #define BIGGEST_ALIGNMENT 128 ! /* Decide whether a variable of mode MODE should be 128 bit aligned. */ #define ALIGN_MODE_128(MODE) \ ! ((MODE) == XFmode || (MODE) == TFmode || SSE_REG_MODE_P (MODE)) /* The published ABIs say that doubles should be aligned on word boundaries, so lower the aligment for structure fields unless *************** extern int ix86_arch; *** 793,799 **** --- 757,767 ---- supports no vector modes, cut out the complexity and fall back on BIGGEST_FIELD_ALIGNMENT. */ #ifdef IN_TARGET_LIBS + #ifdef __x86_64__ + #define BIGGEST_FIELD_ALIGNMENT 128 + #else #define BIGGEST_FIELD_ALIGNMENT 32 + #endif #else #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ x86_field_alignment (FIELD, COMPUTED) *************** extern int ix86_arch; *** 846,858 **** #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ix86_function_arg_boundary ((MODE), (TYPE)) ! /* Set this non-zero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 0 /* If bit field type is int, don't let it cross an int, and give entire struct the alignment of an int. */ ! /* Required on the 386 since it doesn't have bitfield insns. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Standard register usage. */ --- 814,826 ---- #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ix86_function_arg_boundary ((MODE), (TYPE)) ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 0 /* If bit field type is int, don't let it cross an int, and give entire struct the alignment of an int. */ ! /* Required on the 386 since it doesn't have bit-field insns. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Standard register usage. */ *************** extern int ix86_arch; *** 891,897 **** /* 1 for registers that have pervasive standard uses and are not available for the register allocator. On the 80386, the stack pointer is such, as is the arg pointer. ! The value is an mask - bit 1 is set for fixed registers for 32bit target, while 2 is set for fixed registers for 64bit. Proper value is computed in the CONDITIONAL_REGISTER_USAGE. --- 859,865 ---- /* 1 for registers that have pervasive standard uses and are not available for the register allocator. On the 80386, the stack pointer is such, as is the arg pointer. ! The value is an mask - bit 1 is set for fixed registers for 32bit target, while 2 is set for fixed registers for 64bit. Proper value is computed in the CONDITIONAL_REGISTER_USAGE. *************** extern int ix86_arch; *** 909,923 **** 1, 1, 1, 1, 1, 1, 1, 1, \ /*xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15*/ \ 1, 1, 1, 1, 1, 1, 1, 1} ! /* 1 for registers not available across function calls. These must include the FIXED_REGISTERS and also any registers that can be used without being saved. The latter must include the registers where values are returned and the register where structure-value addresses are passed. ! Aside from that, you can include as many other registers as you like. ! The value is an mask - bit 1 is set for call used for 32bit target, while 2 is set for call used for 64bit. Proper value is computed in the CONDITIONAL_REGISTER_USAGE. --- 877,891 ---- 1, 1, 1, 1, 1, 1, 1, 1, \ /*xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15*/ \ 1, 1, 1, 1, 1, 1, 1, 1} ! /* 1 for registers not available across function calls. These must include the FIXED_REGISTERS and also any registers that can be used without being saved. The latter must include the registers where values are returned and the register where structure-value addresses are passed. ! Aside from that, you can include as many other registers as you like. ! The value is an mask - bit 1 is set for call used for 32bit target, while 2 is set for call used for 64bit. Proper value is computed in the CONDITIONAL_REGISTER_USAGE. *************** do { \ *** 1003,1009 **** This is ordinarily the length in words of a value of mode MODE but can be less for certain modes in special long registers. ! Actually there are no two word move instructions for consecutive registers. And only registers 0-3 may have mov byte instructions applied to them. */ --- 971,977 ---- This is ordinarily the length in words of a value of mode MODE but can be less for certain modes in special long registers. ! Actually there are no two word move instructions for consecutive registers. And only registers 0-3 may have mov byte instructions applied to them. */ *************** do { \ *** 1017,1025 **** --- 985,999 ---- ? (TARGET_64BIT ? 4 : 6) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))) + #define VALID_SSE2_REG_MODE(MODE) \ + ((MODE) == V16QImode || (MODE) == V8HImode || (MODE) == V2DFmode \ + || (MODE) == V2DImode) + #define VALID_SSE_REG_MODE(MODE) \ ((MODE) == TImode || (MODE) == V4SFmode || (MODE) == V4SImode \ || (MODE) == SFmode \ + /* Always accept SSE2 modes so that xmmintrin.h compiles. */ \ + || VALID_SSE2_REG_MODE (MODE) \ || (TARGET_SSE2 && ((MODE) == DFmode || VALID_MMX_REG_MODE (MODE)))) #define VALID_MMX_REG_MODE_3DNOW(MODE) \ *************** do { \ *** 1047,1052 **** --- 1021,1037 ---- || (MODE) == CDImode \ || (TARGET_64BIT && ((MODE) == TImode || (MODE) == CTImode))) + /* Return true for modes passed in SSE registers. */ + #define SSE_REG_MODE_P(MODE) \ + ((MODE) == TImode || (MODE) == V16QImode \ + || (MODE) == V8HImode || (MODE) == V2DFmode || (MODE) == V2DImode \ + || (MODE) == V4SFmode || (MODE) == V4SImode) + + /* Return true for modes passed in MMX registers. */ + #define MMX_REG_MODE_P(MODE) \ + ((MODE) == V8QImode || (MODE) == V4HImode || (MODE) == V2SImode \ + || (MODE) == V2SFmode) + /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ *************** do { \ *** 1110,1116 **** #define FIRST_SSE_REG (FRAME_POINTER_REGNUM + 1) #define LAST_SSE_REG (FIRST_SSE_REG + 7) ! #define FIRST_MMX_REG (LAST_SSE_REG + 1) #define LAST_MMX_REG (FIRST_MMX_REG + 7) --- 1095,1101 ---- #define FIRST_SSE_REG (FRAME_POINTER_REGNUM + 1) #define LAST_SSE_REG (FIRST_SSE_REG + 7) ! #define FIRST_MMX_REG (LAST_SSE_REG + 1) #define LAST_MMX_REG (FIRST_MMX_REG + 7) *************** do { \ *** 1146,1154 **** /* Register to hold the addressing base for position independent code access to data items. We don't use PIC pointer for 64bit mode. Define the regnum to dummy value to prevent gcc from ! pessimizing code dealing with EBX. */ ! #define PIC_OFFSET_TABLE_REGNUM \ ! (TARGET_64BIT || !flag_pic ? INVALID_REGNUM : 3) /* Register in which address to store a structure value arrives in the function. On the 386, the prologue --- 1131,1150 ---- /* Register to hold the addressing base for position independent code access to data items. We don't use PIC pointer for 64bit mode. Define the regnum to dummy value to prevent gcc from ! pessimizing code dealing with EBX. ! ! To avoid clobbering a call-saved register unnecessarily, we renumber ! the pic register when possible. The change is visible after the ! prologue has been emitted. */ ! ! #define REAL_PIC_OFFSET_TABLE_REGNUM 3 ! ! #define PIC_OFFSET_TABLE_REGNUM \ ! (TARGET_64BIT || !flag_pic ? INVALID_REGNUM \ ! : reload_completed ? REGNO (pic_offset_table_rtx) \ ! : REAL_PIC_OFFSET_TABLE_REGNUM) ! ! #define GOT_SYMBOL_NAME "_GLOBAL_OFFSET_TABLE_" /* Register in which address to store a structure value arrives in the function. On the 386, the prologue *************** enum reg_class *** 1350,1356 **** #define MMX_REGNO_P(N) ((N) >= FIRST_MMX_REG && (N) <= LAST_MMX_REG) #define MMX_REG_P(XOP) (REG_P (XOP) && MMX_REGNO_P (REGNO (XOP))) ! #define STACK_REG_P(XOP) \ (REG_P (XOP) && \ REGNO (XOP) >= FIRST_STACK_REG && \ --- 1346,1352 ---- #define MMX_REGNO_P(N) ((N) >= FIRST_MMX_REG && (N) <= LAST_MMX_REG) #define MMX_REG_P(XOP) (REG_P (XOP) && MMX_REGNO_P (REGNO (XOP))) ! #define STACK_REG_P(XOP) \ (REG_P (XOP) && \ REGNO (XOP) >= FIRST_STACK_REG && \ *************** enum reg_class *** 1430,1436 **** #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'G' ? standard_80387_constant_p (VALUE) \ ! : ((C) == 'H' ? standard_sse_constant_p (VALUE) : 0)) /* A C expression that defines the optional machine-dependent constraint letters that can be used to segregate specific types of --- 1426,1432 ---- #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'G' ? standard_80387_constant_p (VALUE) \ ! : 0) /* A C expression that defines the optional machine-dependent constraint letters that can be used to segregate specific types of *************** enum reg_class *** 1444,1452 **** the constraint letter C. If C is not defined as an extra constraint, the value returned should be 0 regardless of VALUE. */ ! #define EXTRA_CONSTRAINT(VALUE, C) \ ! ((C) == 'e' ? x86_64_sign_extended_value (VALUE) \ ! : (C) == 'Z' ? x86_64_zero_extended_value (VALUE) \ : 0) /* Place additional restrictions on the register class to use when it --- 1440,1449 ---- the constraint letter C. If C is not defined as an extra constraint, the value returned should be 0 regardless of VALUE. */ ! #define EXTRA_CONSTRAINT(VALUE, D) \ ! ((D) == 'e' ? x86_64_sign_extended_value (VALUE) \ ! : (D) == 'Z' ? x86_64_zero_extended_value (VALUE) \ ! : (D) == 'C' ? standard_sse_constant_p (VALUE) \ : 0) /* Place additional restrictions on the register class to use when it *************** enum reg_class *** 1481,1487 **** ix86_secondary_memory_needed ((CLASS1), (CLASS2), (MODE), 1) /* QImode spills from non-QI registers need a scratch. This does not ! happen often -- the only example so far requires an uninitialized pseudo. */ #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, OUT) \ --- 1478,1484 ---- ix86_secondary_memory_needed ((CLASS1), (CLASS2), (MODE), 1) /* QImode spills from non-QI registers need a scratch. This does not ! happen often -- the only example so far requires an uninitialized pseudo. */ #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, OUT) \ *************** enum reg_class *** 1527,1534 **** || ((CLASS) == SIREG) \ || ((CLASS) == DIREG)) /* A C statement that adds to CLOBBERS any hard regs the port wishes ! to automatically clobber for all asms. We do this in the new i386 backend to maintain source compatibility with the old cc0-based compiler. */ --- 1524,1545 ---- || ((CLASS) == SIREG) \ || ((CLASS) == DIREG)) + /* Return a class of registers that cannot change FROM mode to TO mode. + + x87 registers can't do subreg as all values are reformated to extended + precision. XMM registers does not support with nonzero offsets equal + to 4, 8 and 12 otherwise valid for integer registers. Since we can't + determine these, prohibit all nonparadoxical subregs changing size. */ + + #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ + (GET_MODE_SIZE (TO) < GET_MODE_SIZE (FROM) \ + ? reg_classes_intersect_p (FLOAT_SSE_REGS, (CLASS)) \ + || MAYBE_MMX_CLASS_P (CLASS) \ + : GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ + ? reg_classes_intersect_p (FLOAT_REGS, (CLASS)) : 0) + /* A C statement that adds to CLOBBERS any hard regs the port wishes ! to automatically clobber for all asms. We do this in the new i386 backend to maintain source compatibility with the old cc0-based compiler. */ *************** enum reg_class *** 1566,1572 **** On 386 pushw decrements by exactly 2 no matter what the position was. On the 386 there is no pushb; we use pushw instead, and this has the effect of rounding up to 2. ! For 64bit ABI we round up to 8 bytes. */ --- 1577,1583 ---- On 386 pushw decrements by exactly 2 no matter what the position was. On the 386 there is no pushb; we use pushw instead, and this has the effect of rounding up to 2. ! For 64bit ABI we round up to 8 bytes. */ *************** typedef struct ix86_args { *** 1721,1726 **** --- 1732,1746 ---- #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0 + /* A C expression that indicates when an argument must be passed by + reference. If nonzero for an argument, a copy of that argument is + made in memory and a pointer to the argument is passed instead of + the argument itself. The pointer is passed in whatever way is + appropriate for passing a pointer to that type. */ + + #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ + function_arg_pass_by_reference(&CUM, MODE, TYPE, NAMED) + /* If PIC, we cannot make sibling calls to global functions because the PLT requires %ebx live. If we are returning floats on the 80387 register stack, we cannot *************** typedef struct ix86_args { *** 1758,1765 **** ((VALIST) = ix86_build_va_list ()) /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(STDARG, VALIST, NEXTARG) \ ! ix86_va_start ((STDARG), (VALIST), (NEXTARG)) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \ --- 1778,1785 ---- ((VALIST) = ix86_build_va_list ()) /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \ ! ix86_va_start (VALIST, NEXTARG) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \ *************** typedef struct ix86_args { *** 1774,1799 **** /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! do { \ ! if (flag_pic) \ ! { \ ! fprintf ((FILE), "\tleal\t%sP%d@GOTOFF(%%ebx),%%edx\n", \ ! LPREFIX, (LABELNO)); \ ! fprintf ((FILE), "\tcall\t*_mcount@GOT(%%ebx)\n"); \ ! } \ ! else \ ! { \ ! fprintf ((FILE), "\tmovl\t$%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ ! fprintf ((FILE), "\tcall\t_mcount\n"); \ ! } \ ! } while (0) /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in functions that have frame pointers. No definition is equivalent to always zero. */ ! /* Note on the 386 it might be more efficient not to define this since we have to restore it ourselves from the frame pointer, in order to use pop */ --- 1794,1810 ---- /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ ! #define FUNCTION_PROFILER(FILE, LABELNO) x86_function_profiler (FILE, LABELNO) ! ! #define MCOUNT_NAME "_mcount" ! ! #define PROFILE_COUNT_REGISTER "edx" /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in functions that have frame pointers. No definition is equivalent to always zero. */ ! /* Note on the 386 it might be more efficient not to define this since we have to restore it ourselves from the frame pointer, in order to use pop */ *************** do { \ *** 1947,1961 **** #define MAX_REGS_PER_ADDRESS 2 ! #define CONSTANT_ADDRESS_P(X) \ ! (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ ! || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ ! || GET_CODE (X) == CONST_DOUBLE) /* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! #define LEGITIMATE_CONSTANT_P(X) 1 #ifdef REG_OK_STRICT #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ --- 1958,1969 ---- #define MAX_REGS_PER_ADDRESS 2 ! #define CONSTANT_ADDRESS_P(X) constant_address_p (X) /* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! #define LEGITIMATE_CONSTANT_P(X) legitimate_constant_p (X) #ifdef REG_OK_STRICT #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ *************** do { \ *** 2015,2026 **** #define REWRITE_ADDRESS(X) rewrite_address (X) /* Nonzero if the constant value X is a legitimate general operand ! when generating PIC code. It is given that flag_pic is on and that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! #define LEGITIMATE_PIC_OPERAND_P(X) \ ! (! SYMBOLIC_CONST (X) \ ! || legitimate_pic_address_disp_p (X)) #define SYMBOLIC_CONST(X) \ (GET_CODE (X) == SYMBOL_REF \ --- 2023,2032 ---- #define REWRITE_ADDRESS(X) rewrite_address (X) /* Nonzero if the constant value X is a legitimate general operand ! when generating PIC code. It is given that flag_pic is on and that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! #define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X) #define SYMBOLIC_CONST(X) \ (GET_CODE (X) == SYMBOL_REF \ *************** enum ix86_builtins *** 2089,2097 **** --- 2095,2106 ---- IX86_BUILTIN_CVTPI2PS, IX86_BUILTIN_CVTPS2PI, IX86_BUILTIN_CVTSI2SS, + IX86_BUILTIN_CVTSI642SS, IX86_BUILTIN_CVTSS2SI, + IX86_BUILTIN_CVTSS2SI64, IX86_BUILTIN_CVTTPS2PI, IX86_BUILTIN_CVTTSS2SI, + IX86_BUILTIN_CVTTSS2SI64, IX86_BUILTIN_MAXPS, IX86_BUILTIN_MAXSS, *************** enum ix86_builtins *** 2120,2125 **** --- 2129,2144 ---- IX86_BUILTIN_MOVNTPS, IX86_BUILTIN_MOVNTQ, + IX86_BUILTIN_LOADDQA, + IX86_BUILTIN_LOADDQU, + IX86_BUILTIN_STOREDQA, + IX86_BUILTIN_STOREDQU, + IX86_BUILTIN_MOVQ, + IX86_BUILTIN_LOADD, + IX86_BUILTIN_STORED, + + IX86_BUILTIN_CLRTI, + IX86_BUILTIN_PACKSSWB, IX86_BUILTIN_PACKSSDW, IX86_BUILTIN_PACKUSWB, *************** enum ix86_builtins *** 2127,2132 **** --- 2146,2152 ---- IX86_BUILTIN_PADDB, IX86_BUILTIN_PADDW, IX86_BUILTIN_PADDD, + IX86_BUILTIN_PADDQ, IX86_BUILTIN_PADDSB, IX86_BUILTIN_PADDSW, IX86_BUILTIN_PADDUSB, *************** enum ix86_builtins *** 2134,2139 **** --- 2154,2160 ---- IX86_BUILTIN_PSUBB, IX86_BUILTIN_PSUBW, IX86_BUILTIN_PSUBD, + IX86_BUILTIN_PSUBQ, IX86_BUILTIN_PSUBSB, IX86_BUILTIN_PSUBSW, IX86_BUILTIN_PSUBUSB, *************** enum ix86_builtins *** 2203,2209 **** IX86_BUILTIN_RSQRTSS, IX86_BUILTIN_SQRTPS, IX86_BUILTIN_SQRTSS, ! IX86_BUILTIN_UNPCKHPS, IX86_BUILTIN_UNPCKLPS, --- 2224,2230 ---- IX86_BUILTIN_RSQRTSS, IX86_BUILTIN_SQRTPS, IX86_BUILTIN_SQRTSS, ! IX86_BUILTIN_UNPCKHPS, IX86_BUILTIN_UNPCKLPS, *************** enum ix86_builtins *** 2250,2299 **** IX86_BUILTIN_SSE_ZERO, IX86_BUILTIN_MMX_ZERO, ! IX86_BUILTIN_MAX ! }; ! ! /* Define this macro if references to a symbol must be treated ! differently depending on something about the variable or ! function named by the symbol (such as what section it is in). ! On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol ! so that we may access it directly in the GOT. */ ! #define ENCODE_SECTION_INFO(DECL) \ ! do { \ ! if (flag_pic) \ ! { \ ! rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ! \ ! if (GET_CODE (rtl) == MEM) \ ! { \ ! if (TARGET_DEBUG_ADDR \ ! && TREE_CODE_CLASS (TREE_CODE (DECL)) == 'd') \ ! { \ ! fprintf (stderr, "Encode %s, public = %d\n", \ ! IDENTIFIER_POINTER (DECL_NAME (DECL)), \ ! TREE_PUBLIC (DECL)); \ ! } \ ! \ ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ ! = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! || ! TREE_PUBLIC (DECL)); \ ! } \ ! } \ ! } while (0) ! /* The `FINALIZE_PIC' macro serves as a hook to emit these special ! codes once the function is being compiled into assembly code, but ! not before. (It is not done before, because in the case of ! compiling an inline function, it would lead to multiple PIC ! prologues being included in functions which used inline functions ! and were compiled to assembly language.) */ ! #define FINALIZE_PIC \ ! (current_function_uses_pic_offset_table |= current_function_profile) /* Max number of args passed in registers. If this is more than 3, we will have problems with ebx (register #4), since it is a caller save register and --- 2271,2503 ---- IX86_BUILTIN_SSE_ZERO, IX86_BUILTIN_MMX_ZERO, ! /* SSE2 */ ! IX86_BUILTIN_ADDPD, ! IX86_BUILTIN_ADDSD, ! IX86_BUILTIN_DIVPD, ! IX86_BUILTIN_DIVSD, ! IX86_BUILTIN_MULPD, ! IX86_BUILTIN_MULSD, ! IX86_BUILTIN_SUBPD, ! IX86_BUILTIN_SUBSD, ! IX86_BUILTIN_CMPEQPD, ! IX86_BUILTIN_CMPLTPD, ! IX86_BUILTIN_CMPLEPD, ! IX86_BUILTIN_CMPGTPD, ! IX86_BUILTIN_CMPGEPD, ! IX86_BUILTIN_CMPNEQPD, ! IX86_BUILTIN_CMPNLTPD, ! IX86_BUILTIN_CMPNLEPD, ! IX86_BUILTIN_CMPNGTPD, ! IX86_BUILTIN_CMPNGEPD, ! IX86_BUILTIN_CMPORDPD, ! IX86_BUILTIN_CMPUNORDPD, ! IX86_BUILTIN_CMPNEPD, ! IX86_BUILTIN_CMPEQSD, ! IX86_BUILTIN_CMPLTSD, ! IX86_BUILTIN_CMPLESD, ! IX86_BUILTIN_CMPNEQSD, ! IX86_BUILTIN_CMPNLTSD, ! IX86_BUILTIN_CMPNLESD, ! IX86_BUILTIN_CMPORDSD, ! IX86_BUILTIN_CMPUNORDSD, ! IX86_BUILTIN_CMPNESD, ! IX86_BUILTIN_COMIEQSD, ! IX86_BUILTIN_COMILTSD, ! IX86_BUILTIN_COMILESD, ! IX86_BUILTIN_COMIGTSD, ! IX86_BUILTIN_COMIGESD, ! IX86_BUILTIN_COMINEQSD, ! IX86_BUILTIN_UCOMIEQSD, ! IX86_BUILTIN_UCOMILTSD, ! IX86_BUILTIN_UCOMILESD, ! IX86_BUILTIN_UCOMIGTSD, ! IX86_BUILTIN_UCOMIGESD, ! IX86_BUILTIN_UCOMINEQSD, ! IX86_BUILTIN_MAXPD, ! IX86_BUILTIN_MAXSD, ! IX86_BUILTIN_MINPD, ! IX86_BUILTIN_MINSD, ! IX86_BUILTIN_ANDPD, ! IX86_BUILTIN_ANDNPD, ! IX86_BUILTIN_ORPD, ! IX86_BUILTIN_XORPD, + IX86_BUILTIN_SQRTPD, + IX86_BUILTIN_SQRTSD, + + IX86_BUILTIN_UNPCKHPD, + IX86_BUILTIN_UNPCKLPD, + + IX86_BUILTIN_SHUFPD, + + IX86_BUILTIN_LOADAPD, + IX86_BUILTIN_LOADUPD, + IX86_BUILTIN_STOREAPD, + IX86_BUILTIN_STOREUPD, + IX86_BUILTIN_LOADSD, + IX86_BUILTIN_STORESD, + IX86_BUILTIN_MOVSD, + + IX86_BUILTIN_LOADHPD, + IX86_BUILTIN_LOADLPD, + IX86_BUILTIN_STOREHPD, + IX86_BUILTIN_STORELPD, + + IX86_BUILTIN_CVTDQ2PD, + IX86_BUILTIN_CVTDQ2PS, + + IX86_BUILTIN_CVTPD2DQ, + IX86_BUILTIN_CVTPD2PI, + IX86_BUILTIN_CVTPD2PS, + IX86_BUILTIN_CVTTPD2DQ, + IX86_BUILTIN_CVTTPD2PI, + + IX86_BUILTIN_CVTPI2PD, + IX86_BUILTIN_CVTSI2SD, + IX86_BUILTIN_CVTSI642SD, + + IX86_BUILTIN_CVTSD2SI, + IX86_BUILTIN_CVTSD2SI64, + IX86_BUILTIN_CVTSD2SS, + IX86_BUILTIN_CVTSS2SD, + IX86_BUILTIN_CVTTSD2SI, + IX86_BUILTIN_CVTTSD2SI64, + + IX86_BUILTIN_CVTPS2DQ, + IX86_BUILTIN_CVTPS2PD, + IX86_BUILTIN_CVTTPS2DQ, + + IX86_BUILTIN_MOVNTI, + IX86_BUILTIN_MOVNTPD, + IX86_BUILTIN_MOVNTDQ, + + IX86_BUILTIN_SETPD1, + IX86_BUILTIN_SETPD, + IX86_BUILTIN_CLRPD, + IX86_BUILTIN_SETRPD, + IX86_BUILTIN_LOADPD1, + IX86_BUILTIN_LOADRPD, + IX86_BUILTIN_STOREPD1, + IX86_BUILTIN_STORERPD, + + /* SSE2 MMX */ + IX86_BUILTIN_MASKMOVDQU, + IX86_BUILTIN_MOVMSKPD, + IX86_BUILTIN_PMOVMSKB128, + IX86_BUILTIN_MOVQ2DQ, + IX86_BUILTIN_MOVDQ2Q, + + IX86_BUILTIN_PACKSSWB128, + IX86_BUILTIN_PACKSSDW128, + IX86_BUILTIN_PACKUSWB128, + + IX86_BUILTIN_PADDB128, + IX86_BUILTIN_PADDW128, + IX86_BUILTIN_PADDD128, + IX86_BUILTIN_PADDQ128, + IX86_BUILTIN_PADDSB128, + IX86_BUILTIN_PADDSW128, + IX86_BUILTIN_PADDUSB128, + IX86_BUILTIN_PADDUSW128, + IX86_BUILTIN_PSUBB128, + IX86_BUILTIN_PSUBW128, + IX86_BUILTIN_PSUBD128, + IX86_BUILTIN_PSUBQ128, + IX86_BUILTIN_PSUBSB128, + IX86_BUILTIN_PSUBSW128, + IX86_BUILTIN_PSUBUSB128, + IX86_BUILTIN_PSUBUSW128, + + IX86_BUILTIN_PAND128, + IX86_BUILTIN_PANDN128, + IX86_BUILTIN_POR128, + IX86_BUILTIN_PXOR128, + + IX86_BUILTIN_PAVGB128, + IX86_BUILTIN_PAVGW128, + + IX86_BUILTIN_PCMPEQB128, + IX86_BUILTIN_PCMPEQW128, + IX86_BUILTIN_PCMPEQD128, + IX86_BUILTIN_PCMPGTB128, + IX86_BUILTIN_PCMPGTW128, + IX86_BUILTIN_PCMPGTD128, + + IX86_BUILTIN_PEXTRW128, + IX86_BUILTIN_PINSRW128, + + IX86_BUILTIN_PMADDWD128, + + IX86_BUILTIN_PMAXSW128, + IX86_BUILTIN_PMAXUB128, + IX86_BUILTIN_PMINSW128, + IX86_BUILTIN_PMINUB128, + + IX86_BUILTIN_PMULUDQ, + IX86_BUILTIN_PMULUDQ128, + IX86_BUILTIN_PMULHUW128, + IX86_BUILTIN_PMULHW128, + IX86_BUILTIN_PMULLW128, + + IX86_BUILTIN_PSADBW128, + IX86_BUILTIN_PSHUFHW, + IX86_BUILTIN_PSHUFLW, + IX86_BUILTIN_PSHUFD, + + IX86_BUILTIN_PSLLW128, + IX86_BUILTIN_PSLLD128, + IX86_BUILTIN_PSLLQ128, + IX86_BUILTIN_PSRAW128, + IX86_BUILTIN_PSRAD128, + IX86_BUILTIN_PSRLW128, + IX86_BUILTIN_PSRLD128, + IX86_BUILTIN_PSRLQ128, + IX86_BUILTIN_PSLLDQI128, + IX86_BUILTIN_PSLLWI128, + IX86_BUILTIN_PSLLDI128, + IX86_BUILTIN_PSLLQI128, + IX86_BUILTIN_PSRAWI128, + IX86_BUILTIN_PSRADI128, + IX86_BUILTIN_PSRLDQI128, + IX86_BUILTIN_PSRLWI128, + IX86_BUILTIN_PSRLDI128, + IX86_BUILTIN_PSRLQI128, + + IX86_BUILTIN_PUNPCKHBW128, + IX86_BUILTIN_PUNPCKHWD128, + IX86_BUILTIN_PUNPCKHDQ128, + IX86_BUILTIN_PUNPCKHQDQ128, + IX86_BUILTIN_PUNPCKLBW128, + IX86_BUILTIN_PUNPCKLWD128, + IX86_BUILTIN_PUNPCKLDQ128, + IX86_BUILTIN_PUNPCKLQDQ128, + + IX86_BUILTIN_CLFLUSH, + IX86_BUILTIN_MFENCE, + IX86_BUILTIN_LFENCE, + + IX86_BUILTIN_MAX + }; + + #define TARGET_ENCODE_SECTION_INFO ix86_encode_section_info + #define TARGET_STRIP_NAME_ENCODING ix86_strip_name_encoding + + #define ASM_OUTPUT_LABELREF(FILE,NAME) \ + do { \ + const char *xname = (NAME); \ + if (xname[0] == '%') \ + xname += 2; \ + if (xname[0] == '*') \ + xname += 1; \ + else \ + fputs (user_label_prefix, FILE); \ + fputs (xname, FILE); \ + } while (0) /* Max number of args passed in registers. If this is more than 3, we will have problems with ebx (register #4), since it is a caller save register and *************** do { \ *** 2361,2367 **** /* When a prototype says `char' or `short', really pass an `int'. (The 386 can't easily push less than an int.) */ ! #define PROMOTE_PROTOTYPES (!TARGET_64BIT) /* A macro to update M and UNSIGNEDP when an object whose type is TYPE and which has the specified mode and signedness is to be --- 2565,2571 ---- /* When a prototype says `char' or `short', really pass an `int'. (The 386 can't easily push less than an int.) */ ! #define PROMOTE_PROTOTYPES 1 /* A macro to update M and UNSIGNEDP when an object whose type is TYPE and which has the specified mode and signedness is to be *************** do { \ *** 2397,2403 **** precise value of the constant, which is available for examination in X, and the rtx code of the expression in which it is contained, found in OUTER_CODE. ! CODE is the expression code--redundant, since it can be obtained with `GET_CODE (X)'. */ --- 2601,2607 ---- precise value of the constant, which is available for examination in X, and the rtx code of the expression in which it is contained, found in OUTER_CODE. ! CODE is the expression code--redundant, since it can be obtained with `GET_CODE (X)'. */ *************** do { \ *** 2413,2428 **** return flag_pic && SYMBOLIC_CONST (RTX) ? 1 : 0; \ \ case CONST_DOUBLE: \ ! { \ ! int code; \ ! if (GET_MODE (RTX) == VOIDmode) \ ! return 0; \ ! \ ! code = standard_80387_constant_p (RTX); \ ! return code == 1 ? 1 : \ ! code == 2 ? 2 : \ ! 3; \ ! } /* Delete the definition here when TOPLEVEL_COSTS_N_INSNS gets added to cse.c */ #define TOPLEVEL_COSTS_N_INSNS(N) \ --- 2617,2637 ---- return flag_pic && SYMBOLIC_CONST (RTX) ? 1 : 0; \ \ case CONST_DOUBLE: \ ! if (GET_MODE (RTX) == VOIDmode) \ ! return 0; \ ! switch (standard_80387_constant_p (RTX)) \ ! { \ ! case 1: /* 0.0 */ \ ! return 1; \ ! case 2: /* 1.0 */ \ ! return 2; \ ! default: \ ! /* Start with (MEM (SYMBOL_REF)), since that's where \ ! it'll probably end up. Add a penalty for size. */ \ ! return (COSTS_N_INSNS (1) + (flag_pic != 0) \ ! + (GET_MODE (RTX) == SFmode ? 0 \ ! : GET_MODE (RTX) == DFmode ? 1 : 2)); \ ! } /* Delete the definition here when TOPLEVEL_COSTS_N_INSNS gets added to cse.c */ #define TOPLEVEL_COSTS_N_INSNS(N) \ *************** do { \ *** 2499,2505 **** break; \ \ case MULT: \ ! if (GET_CODE (XEXP (X, 1)) == CONST_INT) \ { \ unsigned HOST_WIDE_INT value = INTVAL (XEXP (X, 1)); \ int nbits = 0; \ --- 2708,2716 ---- break; \ \ case MULT: \ ! if (FLOAT_MODE_P (GET_MODE (X))) \ ! TOPLEVEL_COSTS_N_INSNS (ix86_cost->fmul); \ ! else if (GET_CODE (XEXP (X, 1)) == CONST_INT) \ { \ unsigned HOST_WIDE_INT value = INTVAL (XEXP (X, 1)); \ int nbits = 0; \ *************** do { \ *** 2521,2530 **** case UDIV: \ case MOD: \ case UMOD: \ ! TOPLEVEL_COSTS_N_INSNS (ix86_cost->divide); \ \ case PLUS: \ ! if (!TARGET_DECOMPOSE_LEA \ && INTEGRAL_MODE_P (GET_MODE (X)) \ && GET_MODE_BITSIZE (GET_MODE (X)) <= GET_MODE_BITSIZE (Pmode)) \ { \ --- 2732,2747 ---- case UDIV: \ case MOD: \ case UMOD: \ ! if (FLOAT_MODE_P (GET_MODE (X))) \ ! TOPLEVEL_COSTS_N_INSNS (ix86_cost->fdiv); \ ! else \ ! TOPLEVEL_COSTS_N_INSNS (ix86_cost->divide); \ ! break; \ \ case PLUS: \ ! if (FLOAT_MODE_P (GET_MODE (X))) \ ! TOPLEVEL_COSTS_N_INSNS (ix86_cost->fadd); \ ! else if (!TARGET_DECOMPOSE_LEA \ && INTEGRAL_MODE_P (GET_MODE (X)) \ && GET_MODE_BITSIZE (GET_MODE (X)) <= GET_MODE_BITSIZE (Pmode)) \ { \ *************** do { \ *** 2564,2589 **** + rtx_cost (XEXP (X, 1), (OUTER_CODE))); \ } \ } \ \ /* fall through */ \ case AND: \ case IOR: \ case XOR: \ - case MINUS: \ if (!TARGET_64BIT && GET_MODE (X) == DImode) \ return (COSTS_N_INSNS (ix86_cost->add) * 2 \ + (rtx_cost (XEXP (X, 0), (OUTER_CODE)) \ << (GET_MODE (XEXP (X, 0)) != DImode)) \ + (rtx_cost (XEXP (X, 1), (OUTER_CODE)) \ << (GET_MODE (XEXP (X, 1)) != DImode))); \ - \ /* fall through */ \ case NEG: \ case NOT: \ if (!TARGET_64BIT && GET_MODE (X) == DImode) \ TOPLEVEL_COSTS_N_INSNS (ix86_cost->add * 2); \ TOPLEVEL_COSTS_N_INSNS (ix86_cost->add); \ \ egress_rtx_costs: \ break; --- 2781,2830 ---- + rtx_cost (XEXP (X, 1), (OUTER_CODE))); \ } \ } \ + /* fall through */ \ \ + case MINUS: \ + if (FLOAT_MODE_P (GET_MODE (X))) \ + TOPLEVEL_COSTS_N_INSNS (ix86_cost->fadd); \ /* fall through */ \ + \ case AND: \ case IOR: \ case XOR: \ if (!TARGET_64BIT && GET_MODE (X) == DImode) \ return (COSTS_N_INSNS (ix86_cost->add) * 2 \ + (rtx_cost (XEXP (X, 0), (OUTER_CODE)) \ << (GET_MODE (XEXP (X, 0)) != DImode)) \ + (rtx_cost (XEXP (X, 1), (OUTER_CODE)) \ << (GET_MODE (XEXP (X, 1)) != DImode))); \ /* fall through */ \ + \ case NEG: \ + if (FLOAT_MODE_P (GET_MODE (X))) \ + TOPLEVEL_COSTS_N_INSNS (ix86_cost->fchs); \ + /* fall through */ \ + \ case NOT: \ if (!TARGET_64BIT && GET_MODE (X) == DImode) \ TOPLEVEL_COSTS_N_INSNS (ix86_cost->add * 2); \ TOPLEVEL_COSTS_N_INSNS (ix86_cost->add); \ \ + case FLOAT_EXTEND: \ + if (!TARGET_SSE_MATH \ + || !VALID_SSE_REG_MODE (GET_MODE (X))) \ + TOPLEVEL_COSTS_N_INSNS (0); \ + break; \ + \ + case ABS: \ + if (FLOAT_MODE_P (GET_MODE (X))) \ + TOPLEVEL_COSTS_N_INSNS (ix86_cost->fabs); \ + break; \ + \ + case SQRT: \ + if (FLOAT_MODE_P (GET_MODE (X))) \ + TOPLEVEL_COSTS_N_INSNS (ix86_cost->fsqrt); \ + break; \ + \ egress_rtx_costs: \ break; *************** do { \ *** 2688,2697 **** cost many times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is non-zero, the compiler will act as if ! `STRICT_ALIGNMENT' were non-zero when generating code for block moves. This can cause significantly more instructions to be ! produced. Therefore, do not set this macro non-zero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. */ --- 2929,2938 ---- cost many times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is nonzero, the compiler will act as if ! `STRICT_ALIGNMENT' were nonzero when generating code for block moves. This can cause significantly more instructions to be ! produced. Therefore, do not set this macro nonzero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. */ *************** do { \ *** 2718,2751 **** #define NO_RECURSIVE_FUNCTION_CSE - /* Add any extra modes needed to represent the condition code. - - For the i386, we need separate modes when floating-point - equality comparisons are being done. - - Add CCNO to indicate comparisons against zero that requires - Overflow flag to be unset. Sign bit test is used instead and - thus can be used to form "a&b>0" type of tests. - - Add CCGC to indicate comparisons agains zero that allows - unspecified garbage in the Carry flag. This mode is used - by inc/dec instructions. - - Add CCGOC to indicate comparisons agains zero that allows - unspecified garbage in the Carry and Overflow flag. This - mode is used to simulate comparisons of (a-b) and (a+b) - against zero using sub/cmp/add operations. - - Add CCZ to indicate that only the Zero flag is valid. */ - - #define EXTRA_CC_MODES \ - CC (CCGCmode, "CCGC") \ - CC (CCGOCmode, "CCGOC") \ - CC (CCNOmode, "CCNO") \ - CC (CCZmode, "CCZ") \ - CC (CCFPmode, "CCFP") \ - CC (CCFPUmode, "CCFPU") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. --- 2959,2964 ---- *************** do { \ *** 2757,2763 **** #define SELECT_CC_MODE(OP, X, Y) ix86_cc_mode ((OP), (X), (Y)) ! /* Return non-zero if MODE implies a floating point inequality can be reversed. */ #define REVERSIBLE_CC_MODE(MODE) 1 --- 2970,2976 ---- #define SELECT_CC_MODE(OP, X, Y) ix86_cc_mode ((OP), (X), (Y)) ! /* Return nonzero if MODE implies a floating point inequality can be reversed. */ #define REVERSIBLE_CC_MODE(MODE) 1 *************** do { \ *** 2781,2787 **** For float regs, the stack top is sometimes referred to as "%st(0)" instead of just "%st". PRINT_REG handles this with the "y" code. */ ! #undef HI_REGISTER_NAMES #define HI_REGISTER_NAMES \ {"ax","dx","cx","bx","si","di","bp","sp", \ "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)","", \ --- 2994,3000 ---- For float regs, the stack top is sometimes referred to as "%st(0)" instead of just "%st". PRINT_REG handles this with the "y" code. */ ! #undef HI_REGISTER_NAMES #define HI_REGISTER_NAMES \ {"ax","dx","cx","bx","si","di","bp","sp", \ "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)","", \ *************** extern int const svr4_dbx_register_map[F *** 2831,2837 **** /* Before the prologue, RA is at 0(%esp). */ #define INCOMING_RETURN_ADDR_RTX \ gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM)) ! /* After the prologue, RA is at -4(AP) in the current frame. */ #define RETURN_ADDR_RTX(COUNT, FRAME) \ ((COUNT) == 0 \ --- 3044,3050 ---- /* Before the prologue, RA is at 0(%esp). */ #define INCOMING_RETURN_ADDR_RTX \ gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM)) ! /* After the prologue, RA is at -4(AP) in the current frame. */ #define RETURN_ADDR_RTX(COUNT, FRAME) \ ((COUNT) == 0 \ *************** extern int const svr4_dbx_register_map[F *** 2862,2873 **** ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\ : DW_EH_PE_absptr) - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE, NAME) \ - (assemble_name ((FILE), (NAME)), fputs (":\n", (FILE))) - /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. LABELNO is an integer which is different for each call. */ --- 3075,3080 ---- *************** do { \ *** 2916,2922 **** #define JUMP_TABLES_IN_TEXT_SECTION \ (!TARGET_64BIT && flag_pic && !HAVE_AS_GOTOFF_IN_DATA) ! /* A C statement that outputs an address constant appropriate to for DWARF debugging. */ #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE, X) \ --- 3123,3129 ---- #define JUMP_TABLES_IN_TEXT_SECTION \ (!TARGET_64BIT && flag_pic && !HAVE_AS_GOTOFF_IN_DATA) ! /* A C statement that outputs an address constant appropriate to for DWARF debugging. */ #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE, X) \ *************** do { \ *** 2927,2932 **** --- 3134,3146 ---- #define ASM_SIMPLIFY_DWARF_ADDR(X) \ i386_simplify_dwarf_addr (X) + /* Emit a dtp-relative reference to a TLS variable. */ + + #ifdef HAVE_AS_TLS + #define ASM_OUTPUT_DWARF_DTPREL(FILE, SIZE, X) \ + i386_output_dwarf_dtprel (FILE, SIZE, X) + #endif + /* Switch to init or fini section via SECTION_OP, emit a call to FUNC, and switch back. For x86 we do this only to save a few bytes that would otherwise be unused in the text section. */ *************** do { \ *** 2941,2947 **** print_operand function. */ #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ! ((CODE) == '*' || (CODE) == '+') /* Print the name of a register based on its machine mode and number. If CODE is 'w', pretend the mode is HImode. --- 3155,3161 ---- print_operand function. */ #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ! ((CODE) == '*' || (CODE) == '+' || (CODE) == '&') /* Print the name of a register based on its machine mode and number. If CODE is 'w', pretend the mode is HImode. *************** do { \ *** 2960,2965 **** --- 3174,3185 ---- #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ print_operand_address ((FILE), (ADDR)) + #define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \ + do { \ + if (! output_addr_const_extra (FILE, (X))) \ + goto FAIL; \ + } while (0); + /* Print the name of a register for based on its machine mode and number. This macro is used to print debugging output. This macro is different from PRINT_REG in that it may be used in *************** do { \ *** 3066,3071 **** --- 3286,3292 ---- {"general_no_elim_operand", {CONST_INT, CONST_DOUBLE, CONST, \ SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM}}, \ {"nonmemory_no_elim_operand", {CONST_INT, REG, SUBREG}}, \ + {"index_register_operand", {SUBREG, REG}}, \ {"q_regs_operand", {SUBREG, REG}}, \ {"non_q_regs_operand", {SUBREG, REG}}, \ {"fcmov_comparison_operator", {EQ, NE, LTU, GTU, LEU, GEU, UNORDERED, \ *************** do { \ *** 3090,3096 **** {"memory_displacement_operand", {MEM}}, \ {"cmpsi_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \ LABEL_REF, SUBREG, REG, MEM, AND}}, \ ! {"long_memory_operand", {MEM}}, /* A list of predicates that do special things with modes, and so should not elicit warnings for VOIDmode match_operand. */ --- 3311,3327 ---- {"memory_displacement_operand", {MEM}}, \ {"cmpsi_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \ LABEL_REF, SUBREG, REG, MEM, AND}}, \ ! {"long_memory_operand", {MEM}}, \ ! {"tls_symbolic_operand", {SYMBOL_REF}}, \ ! {"global_dynamic_symbolic_operand", {SYMBOL_REF}}, \ ! {"local_dynamic_symbolic_operand", {SYMBOL_REF}}, \ ! {"initial_exec_symbolic_operand", {SYMBOL_REF}}, \ ! {"local_exec_symbolic_operand", {SYMBOL_REF}}, \ ! {"any_fp_register_operand", {REG}}, \ ! {"register_and_not_any_fp_reg_operand", {REG}}, \ ! {"fp_register_operand", {REG}}, \ ! {"register_and_not_fp_reg_operand", {REG}}, \ ! {"vector_move_operand", {CONST_VECTOR, SUBREG, REG, MEM}}, \ /* A list of predicates that do special things with modes, and so should not elicit warnings for VOIDmode match_operand. */ *************** do { \ *** 3098,3154 **** #define SPECIAL_MODE_PREDICATES \ "ext_register_operand", ! /* CM_32 is used by 32bit ABI ! CM_SMALL is small model assuming that all code and data fits in the first ! 31bits of address space. ! CM_KERNEL is model assuming that all code and data fits in the negative ! 31bits of address space. ! CM_MEDIUM is model assuming that code fits in the first 31bits of address ! space. Size of data is unlimited. ! CM_LARGE is model making no assumptions about size of particular sections. ! ! CM_SMALL_PIC is model for PIC libraries assuming that code+data+got/plt ! tables first in 31bits of address space. ! */ enum cmodel { ! CM_32, ! CM_SMALL, ! CM_KERNEL, ! CM_MEDIUM, ! CM_LARGE, ! CM_SMALL_PIC }; /* Size of the RED_ZONE area. */ #define RED_ZONE_SIZE 128 /* Reserved area of the red zone for temporaries. */ #define RED_ZONE_RESERVE 8 - extern const char *ix86_debug_arg_string, *ix86_debug_addr_string; enum asm_dialect { ASM_ATT, ASM_INTEL }; extern const char *ix86_asm_string; extern enum asm_dialect ix86_asm_dialect; ! /* Value of -mcmodel specified by user. */ ! extern const char *ix86_cmodel_string; ! extern enum cmodel ix86_cmodel; ! ! /* Variables in i386.c */ ! extern const char *ix86_cpu_string; /* for -mcpu= */ ! extern const char *ix86_arch_string; /* for -march= */ ! extern const char *ix86_fpmath_string; /* for -mfpmath= */ ! extern const char *ix86_regparm_string; /* # registers to use to pass args */ ! extern const char *ix86_align_loops_string; /* power of two alignment for loops */ ! extern const char *ix86_align_jumps_string; /* power of two alignment for non-loop jumps */ ! extern const char *ix86_align_funcs_string; /* power of two alignment for functions */ ! extern const char *ix86_preferred_stack_boundary_string;/* power of two alignment for stack boundary */ ! extern const char *ix86_branch_cost_string; /* values 1-5: see jump.c */ ! extern int ix86_regparm; /* ix86_regparm_string as a number */ ! extern int ix86_preferred_stack_boundary; /* preferred stack boundary alignment in bits */ ! extern int ix86_branch_cost; /* values 1-5: see jump.c */ ! extern enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled class containing REGNO */ extern rtx ix86_compare_op0; /* operand 0 for comparisons */ extern rtx ix86_compare_op1; /* operand 1 for comparisons */ --- 3329,3418 ---- #define SPECIAL_MODE_PREDICATES \ "ext_register_operand", ! /* Which processor to schedule for. The cpu attribute defines a list that ! mirrors this list, so changes to i386.md must be made at the same time. */ ! ! enum processor_type ! { ! PROCESSOR_I386, /* 80386 */ ! PROCESSOR_I486, /* 80486DX, 80486SX, 80486DX[24] */ ! PROCESSOR_PENTIUM, ! PROCESSOR_PENTIUMPRO, ! PROCESSOR_K6, ! PROCESSOR_ATHLON, ! PROCESSOR_PENTIUM4, ! PROCESSOR_max ! }; ! ! extern enum processor_type ix86_cpu; ! extern const char *ix86_cpu_string; ! ! extern enum processor_type ix86_arch; ! extern const char *ix86_arch_string; ! ! enum fpmath_unit ! { ! FPMATH_387 = 1, ! FPMATH_SSE = 2 ! }; ! ! extern enum fpmath_unit ix86_fpmath; ! extern const char *ix86_fpmath_string; ! ! enum tls_dialect ! { ! TLS_DIALECT_GNU, ! TLS_DIALECT_SUN ! }; ! ! extern enum tls_dialect ix86_tls_dialect; ! extern const char *ix86_tls_dialect_string; ! enum cmodel { ! CM_32, /* The traditional 32-bit ABI. */ ! CM_SMALL, /* Assumes all code and data fits in the low 31 bits. */ ! CM_KERNEL, /* Assumes all code and data fits in the high 31 bits. */ ! CM_MEDIUM, /* Assumes code fits in the low 31 bits; data unlimited. */ ! CM_LARGE, /* No assumptions. */ ! CM_SMALL_PIC /* Assumes code+data+got/plt fits in a 31 bit region. */ }; + extern enum cmodel ix86_cmodel; + extern const char *ix86_cmodel_string; + /* Size of the RED_ZONE area. */ #define RED_ZONE_SIZE 128 /* Reserved area of the red zone for temporaries. */ #define RED_ZONE_RESERVE 8 enum asm_dialect { ASM_ATT, ASM_INTEL }; + extern const char *ix86_asm_string; extern enum asm_dialect ix86_asm_dialect; ! ! extern int ix86_regparm; ! extern const char *ix86_regparm_string; ! ! extern int ix86_preferred_stack_boundary; ! extern const char *ix86_preferred_stack_boundary_string; ! ! extern int ix86_branch_cost; ! extern const char *ix86_branch_cost_string; ! ! extern const char *ix86_debug_arg_string; ! extern const char *ix86_debug_addr_string; ! ! /* Obsoleted by -f options. Remove before 3.2 ships. */ ! extern const char *ix86_align_loops_string; ! extern const char *ix86_align_jumps_string; ! extern const char *ix86_align_funcs_string; ! ! /* Smallest class containing REGNO. */ ! extern enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER]; ! extern rtx ix86_compare_op0; /* operand 0 for comparisons */ extern rtx ix86_compare_op1; /* operand 1 for comparisons */ *************** extern rtx ix86_compare_op1; /* operand *** 3158,3169 **** redundant computation of new control word by the mode switching pass. The fldcw instructions are still emitted redundantly, but this is probably not going to be noticeable problem, as most CPUs do have fast path for ! the sequence. The machinery is to emit simple truncation instructions and split them before reload to instructions having USEs of two memory locations that are filled by this code to old and new control word. ! Post-reload pass may be later used to eliminate the redundant fildcw if needed. */ --- 3422,3433 ---- redundant computation of new control word by the mode switching pass. The fldcw instructions are still emitted redundantly, but this is probably not going to be noticeable problem, as most CPUs do have fast path for ! the sequence. The machinery is to emit simple truncation instructions and split them before reload to instructions having USEs of two memory locations that are filled by this code to old and new control word. ! Post-reload pass may be later used to eliminate the redundant fildcw if needed. */ *************** enum fp_cw_mode {FP_CW_STORED, FP_CW_UNI *** 3224,3229 **** --- 3488,3497 ---- ((SRC) < FIRST_STACK_REG || (SRC) > LAST_STACK_REG) + #define MACHINE_DEPENDENT_REORG(X) x86_machine_dependent_reorg(X) + + #define DLL_IMPORT_EXPORT_PREFIX '@' + /* Local variables: version-control: t diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386-interix3.h gcc-3.3/gcc/config/i386/i386-interix3.h *** gcc-3.2.3/gcc/config/i386/i386-interix3.h 2001-11-28 21:41:54.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386-interix3.h 2002-06-29 09:10:04.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 20,32 **** Boston, MA 02111-1307, USA. */ #undef CPP_SPEC ! #define CPP_SPEC "\ ! %{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}} \ ! %{.S: -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ ! %{.cc: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \ ! %{.cxx: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \ ! %{.C: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \ ! %{.m: -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C} \ ! %(cpp_cpu) \ ! %{posix:-D_POSIX_SOURCE}" --- 20,24 ---- Boston, MA 02111-1307, USA. */ #undef CPP_SPEC ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386-interix.h gcc-3.3/gcc/config/i386/i386-interix.h *** gcc-3.2.3/gcc/config/i386/i386-interix.h 2002-04-12 19:52:34.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386-interix.h 2002-11-26 04:54:48.000000000 +0000 *************** *** 1,5 **** /* Target definitions for GNU compiler for Intel 80386 running Interix ! Parts Copyright (C) 1991, 1999, 2000 Free Software Foundation, Inc. Parts: by Douglas B. Rupp (drupp@cs.washington.edu). --- 1,5 ---- /* Target definitions for GNU compiler for Intel 80386 running Interix ! Parts Copyright (C) 1991, 1999, 2000, 2002 Free Software Foundation, Inc. Parts: by Douglas B. Rupp (drupp@cs.washington.edu). *************** along with GNU CC; see the file COPYING. *** 24,40 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #define YES_UNDERSCORES - - /* YES_UNDERSCORES must precede gas.h */ - #include /* The rest must follow. */ ! #define DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ! #define HANDLE_SYSV_PRAGMA #undef HANDLE_PRAGMA_WEAK /* until the link format can handle it */ /* By default, target has a 80387, uses IEEE compatible arithmetic, --- 24,36 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The rest must follow. */ ! #define DBX_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ! #define HANDLE_SYSV_PRAGMA 1 #undef HANDLE_PRAGMA_WEAK /* until the link format can handle it */ /* By default, target has a 80387, uses IEEE compatible arithmetic, *************** Boston, MA 02111-1307, USA. */ *** 48,54 **** #undef TARGET_CPU_DEFAULT #define TARGET_CPU_DEFAULT 2 /* 486 */ - #define WCHAR_UNSIGNED 1 #define WCHAR_TYPE_SIZE 16 #define WCHAR_TYPE "short unsigned int" --- 44,49 ---- *************** Boston, MA 02111-1307, USA. */ *** 58,92 **** #define ASM_LOAD_ADDR(loc, reg) " leal " #loc "," #reg "\n" /* cpp handles __STDC__ */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES " \ ! -D__INTERIX \ ! -D__OPENNT \ ! -D_M_IX86=300 -D_X86_=1 \ ! -D__stdcall=__attribute__((__stdcall__)) \ ! -D__cdecl=__attribute__((__cdecl__)) \ ! -D__declspec(x)=__attribute__((x)) \ ! -Asystem=unix -Asystem=interix" #undef CPP_SPEC /* Write out the correct language type definition for the header files. Unless we have assembler language, write out the symbols for C. - cpp_cpu is an Intel specific variant. See i386.h mieee is an Alpha specific variant. Cross polination a bad idea. */ ! #define CPP_SPEC "\ ! %{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}} \ ! %{.S: -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ ! %{.cc: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \ ! %{.cxx: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \ ! %{.C: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \ ! %{.m: -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C} \ ! -remap \ ! %(cpp_cpu) \ ! %{posix:-D_POSIX_SOURCE} \ -isystem %$INTERIX_ROOT/usr/include" - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 Interix)"); /* The global __fltused is necessary to cause the printf/scanf routines --- 53,91 ---- #define ASM_LOAD_ADDR(loc, reg) " leal " #loc "," #reg "\n" /* cpp handles __STDC__ */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__INTERIX"); \ ! builtin_define ("__OPENNT"); \ ! builtin_define ("_M_IX86=300"); \ ! builtin_define ("_X86_=1"); \ ! builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ ! builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ ! builtin_define ("__declspec(x)=__attribute__((x))"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=interix"); \ ! if (preprocessing_asm_p ()) \ ! builtin_define_std ("LANGUAGE_ASSEMBLY"); \ ! else \ ! { \ ! builtin_define_std ("LANGUAGE_C"); \ ! if (c_language == clk_cplusplus) \ ! builtin_define_std ("LANGUAGE_C_PLUS_PLUS"); \ ! if (flag_objc) \ ! builtin_define_std ("LANGUAGE_OBJECTIVE_C"); \ ! } \ ! } \ ! while (0) #undef CPP_SPEC /* Write out the correct language type definition for the header files. Unless we have assembler language, write out the symbols for C. mieee is an Alpha specific variant. Cross polination a bad idea. */ ! #define CPP_SPEC "-remap %{posix:-D_POSIX_SOURCE} \ -isystem %$INTERIX_ROOT/usr/include" #define TARGET_VERSION fprintf (stderr, " (i386 Interix)"); /* The global __fltused is necessary to cause the printf/scanf routines *************** Boston, MA 02111-1307, USA. */ *** 238,287 **** #undef LD_INIT_SWITCH #undef LD_FINI_SWITCH ! #define EH_FRAME_IN_DATA_SECTION ! ! /* Note that there appears to be two different ways to support const ! sections at the moment. You can either #define the symbol ! READONLY_DATA_SECTION (giving it some code which switches to the ! readonly data section) or else you can #define the symbols ! EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and ! SELECT_RTX_SECTION. We do both here just to be on the safe side. */ ! ! #define USE_CONST_SECTION 1 ! ! #define CONST_SECTION_ASM_OP "\t.section\t.rdata,\"r\"" ! ! /* A default list of other sections which we might be "in" at any given ! time. For targets that use additional sections (e.g. .tdesc) you ! should override this definition in the target-specific file which ! includes this file. */ ! ! #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const ! ! /* A default list of extra section function definitions. For targets ! that use additional sections (e.g. .tdesc) you should override this ! definition in the target-specific file which includes this file. */ ! ! #undef EXTRA_SECTION_FUNCTIONS ! #define EXTRA_SECTION_FUNCTIONS \ ! CONST_SECTION_FUNCTION ! #undef READONLY_DATA_SECTION ! #define READONLY_DATA_SECTION() const_section () ! #define CONST_SECTION_FUNCTION \ ! void \ ! const_section () \ ! { \ ! if (!USE_CONST_SECTION) \ ! text_section(); \ ! else if (in_section != in_const) \ ! { \ ! fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ ! in_section = in_const; \ ! } \ ! } /* The MS compilers take alignment as a number of bytes, so we do as well */ #undef ASM_OUTPUT_ALIGN --- 237,251 ---- #undef LD_INIT_SWITCH #undef LD_FINI_SWITCH ! /* The following are needed for us to be able to use winnt.c, but are not ! otherwise meaningful to Interix. (The functions that use these are ! never called because we don't do DLLs.) */ ! #define TARGET_NOP_FUN_DLLIMPORT 1 ! #define drectve_section() /* nothing */ ! #define EH_FRAME_IN_DATA_SECTION ! #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rdata,\"r\"" /* The MS compilers take alignment as a number of bytes, so we do as well */ #undef ASM_OUTPUT_ALIGN *************** while (0) *** 346,402 **** /* Define this macro if references to a symbol must be treated differently depending on something about the variable or ! function named by the symbol (such as what section it is in). ! ! Apply stddef, handle (as yet unimplemented) pic. ! ! stddef renaming does NOT apply to Alpha. */ ! ! union tree_node; ! const char *gen_stdcall_suffix PARAMS ((union tree_node *)); ! #undef ENCODE_SECTION_INFO ! #define ENCODE_SECTION_INFO(DECL) \ ! do \ ! { \ ! if (flag_pic) \ ! { \ ! rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ ! = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! || ! TREE_PUBLIC (DECL)); \ ! } \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! if (lookup_attribute ("stdcall", \ ! TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \ ! XEXP (DECL_RTL (DECL), 0) = \ ! gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \ ! } \ ! while (0) - /* This macro gets just the user-specified name - out of the string in a SYMBOL_REF. Discard - trailing @[NUM] encoded by ENCODE_SECTION_INFO. */ - #undef STRIP_NAME_ENCODING - #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ - do { \ - const char *_p; \ - const char *_name = SYMBOL_NAME; \ - for (_p = _name; *_p && *_p != '@'; ++_p) \ - ; \ - if (*_p == '@') \ - { \ - int _len = _p - _name; \ - char *_new_name = (char *) alloca (_len + 1); \ - strncpy (_new_name, _name, _len); \ - _new_name[_len] = '\0'; \ - (VAR) = _new_name; \ - } \ - else \ - (VAR) = _name; \ - } while (0) - #if 0 /* Turn this back on when the linker is updated to handle grouped .data$ sections correctly. See corresponding note in i386/interix.c. --- 310,322 ---- /* Define this macro if references to a symbol must be treated differently depending on something about the variable or ! function named by the symbol (such as what section it is in). */ ! #undef TARGET_ENCODE_SECTION_INFO ! #define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info ! #undef TARGET_STRIP_NAME_ENCODING ! #define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full #if 0 /* Turn this back on when the linker is updated to handle grouped .data$ sections correctly. See corresponding note in i386/interix.c. *************** do { \ *** 408,415 **** symbols must be explicitly imported from shared libraries (DLLs). */ #define MULTIPLE_SYMBOL_SPACES ! extern void i386_pe_unique_section (); ! #define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC) #define SUPPORTS_ONE_ONLY 1 #endif /* 0 */ --- 328,335 ---- symbols must be explicitly imported from shared libraries (DLLs). */ #define MULTIPLE_SYMBOL_SPACES ! extern void i386_pe_unique_section PARAMS ((tree, int)); ! #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section #define SUPPORTS_ONE_ONLY 1 #endif /* 0 */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386.md gcc-3.3/gcc/config/i386/i386.md *** gcc-3.2.3/gcc/config/i386/i386.md 2003-03-25 10:42:12.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386.md 2003-04-07 20:14:14.000000000 +0000 *************** *** 1,5 **** ;; GCC machine description for IA-32 and x86-64. ! ;; Copyright (C) 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Mostly by William Schelter. ;; x86_64 support added by Jan Hubicka --- 1,6 ---- ;; GCC machine description for IA-32 and x86-64. ! ;; Copyright (C) 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! ;; 2001, 2002, 2003 ;; Free Software Foundation, Inc. ;; Mostly by William Schelter. ;; x86_64 support added by Jan Hubicka *************** *** 49,103 **** ;; 'k' Likewise, print the SImode name of the register. ;; 'h' Print the QImode name for a "high" register, either ah, bh, ch or dh. ;; 'y' Print "st(0)" instead of "st" as a register. ! ;; ;; UNSPEC usage: - ;; 0 This is a `scas' operation. The mode of the UNSPEC is always SImode. - ;; operand 0 is the memory address to scan. - ;; operand 1 is a register containing the value to scan for. The mode - ;; of the scas opcode will be the same as the mode of this operand. - ;; operand 2 is the known alignment of operand 0. - ;; 1 This is a `sin' operation. The mode of the UNSPEC is MODE_FLOAT. - ;; operand 0 is the argument for `sin'. - ;; 2 This is a `cos' operation. The mode of the UNSPEC is MODE_FLOAT. - ;; operand 0 is the argument for `cos'. - ;; 3 This is part of a `stack probe' operation. The mode of the UNSPEC is - ;; always SImode. operand 0 is the size of the stack allocation. - ;; 4 This is the source of a fake SET of the frame pointer which is used to - ;; prevent insns referencing it being scheduled across the initial - ;; decrement of the stack pointer. - ;; 5 This is a `bsf' operation. - ;; 6 This is the @GOT offset of a PIC address. - ;; 7 This is the @GOTOFF offset of a PIC address. - ;; 8 This is a reference to a symbol's @PLT address. - ;; 9 This is an `fnstsw' operation. - ;; 10 This is a `sahf' operation. - ;; 11 This is a `fstcw' operation - ;; 12 This is behaviour of add when setting carry flag. - ;; 13 This is a `eh_return' placeholder. ! ;; For SSE/MMX support: ! ;; 30 This is `fix', guaranteed to be truncating. ! ;; 31 This is a `emms' operation. ! ;; 32 This is a `maskmov' operation. ! ;; 33 This is a `movmsk' operation. ! ;; 34 This is a `non-temporal' move. ! ;; 36 This is used to distinguish COMISS from UCOMISS. ! ;; 37 This is a `ldmxcsr' operation. ! ;; 38 This is a forced `movaps' instruction (rather than whatever movti does) ! ;; 39 This is a forced `movups' instruction (rather than whatever movti does) ! ;; 40 This is a `stmxcsr' operation. ! ;; 41 This is a `shuffle' operation. ! ;; 42 This is a `rcp' operation. ! ;; 43 This is a `rsqsrt' operation. ! ;; 44 This is a `sfence' operation. ! ;; 45 This is a noop to prevent excessive combiner cleverness. ! ;; 46 This is a `femms' operation. ! ;; 49 This is a 'pavgusb' operation. ! ;; 50 This is a `pfrcp' operation. ! ;; 51 This is a `pfrcpit1' operation. ! ;; 52 This is a `pfrcpit2' operation. ! ;; 53 This is a `pfrsqrt' operation. ! ;; 54 This is a `pfrsqrit1' operation. ;; Insns whose names begin with "x86_" are emitted by gen_FOO calls ;; from i386.c. --- 50,126 ---- ;; 'k' Likewise, print the SImode name of the register. ;; 'h' Print the QImode name for a "high" register, either ah, bh, ch or dh. ;; 'y' Print "st(0)" instead of "st" as a register. ! ;; UNSPEC usage: ! (define_constants ! [; Relocation specifiers ! (UNSPEC_GOT 0) ! (UNSPEC_GOTOFF 1) ! (UNSPEC_GOTPCREL 2) ! (UNSPEC_GOTTPOFF 3) ! (UNSPEC_TPOFF 4) ! (UNSPEC_NTPOFF 5) ! (UNSPEC_DTPOFF 6) ! (UNSPEC_GOTNTPOFF 7) ! (UNSPEC_INDNTPOFF 8) ! ! ; Prologue support ! (UNSPEC_STACK_PROBE 10) ! (UNSPEC_STACK_ALLOC 11) ! (UNSPEC_SET_GOT 12) ! (UNSPEC_SSE_PROLOGUE_SAVE 13) ! ! ; TLS support ! (UNSPEC_TP 15) ! (UNSPEC_TLS_GD 16) ! (UNSPEC_TLS_LD_BASE 17) ! ! ; Other random patterns ! (UNSPEC_SCAS 20) ! (UNSPEC_SIN 21) ! (UNSPEC_COS 22) ! (UNSPEC_BSF 23) ! (UNSPEC_FNSTSW 24) ! (UNSPEC_SAHF 25) ! (UNSPEC_FSTCW 26) ! (UNSPEC_ADD_CARRY 27) ! (UNSPEC_FLDCW 28) ! ! ; For SSE/MMX support: ! (UNSPEC_FIX 30) ! (UNSPEC_MASKMOV 32) ! (UNSPEC_MOVMSK 33) ! (UNSPEC_MOVNT 34) ! (UNSPEC_MOVA 38) ! (UNSPEC_MOVU 39) ! (UNSPEC_SHUFFLE 41) ! (UNSPEC_RCP 42) ! (UNSPEC_RSQRT 43) ! (UNSPEC_SFENCE 44) ! (UNSPEC_NOP 45) ; prevents combiner cleverness ! (UNSPEC_PAVGUSB 49) ! (UNSPEC_PFRCP 50) ! (UNSPEC_PFRCPIT1 51) ! (UNSPEC_PFRCPIT2 52) ! (UNSPEC_PFRSQRT 53) ! (UNSPEC_PFRSQIT1 54) ! (UNSPEC_PSHUFLW 55) ! (UNSPEC_PSHUFHW 56) ! (UNSPEC_MFENCE 59) ! (UNSPEC_LFENCE 60) ! (UNSPEC_PSADBW 61) ! ]) ! ! (define_constants ! [(UNSPECV_BLOCKAGE 0) ! (UNSPECV_EH_RETURN 13) ! (UNSPECV_EMMS 31) ! (UNSPECV_LDMXCSR 37) ! (UNSPECV_STMXCSR 40) ! (UNSPECV_FEMMS 46) ! (UNSPECV_CLFLUSH 57) ! ]) ;; Insns whose names begin with "x86_" are emitted by gen_FOO calls ;; from i386.c. *************** *** 116,141 **** ;; A basic instruction type. Refinements due to arguments to be ;; provided in other attributes. (define_attr "type" ! "other,multi,alu1,negnot,alu,icmp,test,imov,imovx,lea,incdec,ishift,imul,idiv,ibr,setcc,push,pop,call,callv,icmov,fmov,fop,fop1,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,fxch,str,cld,sse,mmx,fistp" (const_string "other")) ;; Main data type used by the insn ! (define_attr "mode" "unknown,none,QI,HI,SI,DI,unknownfp,SF,DF,XF,TI" (const_string "unknown")) ! ;; Set for i387 operations. ! (define_attr "i387" "" ! (if_then_else (eq_attr "type" "fmov,fop,fop1,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,fxch,fistp") ! (const_int 1) ! (const_int 0))) ;; The (bounding maximum) length of an instruction immediate. (define_attr "length_immediate" "" ! (cond [(eq_attr "type" "incdec,setcc,icmov,str,cld,lea,other,multi,idiv,sse,mmx") (const_int 0) ! (eq_attr "i387" "1") (const_int 0) ! (eq_attr "type" "alu1,negnot,alu,icmp,imovx,ishift,imul,push,pop") (symbol_ref "ix86_attr_length_immediate_default(insn,1)") (eq_attr "type" "imov,test") (symbol_ref "ix86_attr_length_immediate_default(insn,0)") --- 139,182 ---- ;; A basic instruction type. Refinements due to arguments to be ;; provided in other attributes. (define_attr "type" ! "other,multi, ! alu,alu1,negnot,imov,imovx,lea, ! incdec,ishift,ishift1,rotate,rotate1,imul,idiv, ! icmp,test,ibr,setcc,icmov, ! push,pop,call,callv, ! str,cld, ! fmov,fop,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,fxch,fistp, ! sselog,sseiadd,sseishft,sseimul, ! sse,ssemov,sseadd,ssemul,ssecmp,ssecvt,ssediv, ! mmx,mmxmov,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft" (const_string "other")) ;; Main data type used by the insn ! (define_attr "mode" ! "unknown,none,QI,HI,SI,DI,unknownfp,SF,DF,XF,TI,V4SF,V2DF,V2SF" (const_string "unknown")) ! ;; The CPU unit operations uses. ! (define_attr "unit" "integer,i387,sse,mmx,unknown" ! (cond [(eq_attr "type" "fmov,fop,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,fxch,fistp") ! (const_string "i387") ! (eq_attr "type" "sselog,sseiadd,sseishft,sseimul, ! sse,ssemov,sseadd,ssemul,ssecmp,ssecvt,ssediv") ! (const_string "sse") ! (eq_attr "type" "mmx,mmxmov,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft") ! (const_string "mmx") ! (eq_attr "type" "other") ! (const_string "unknown")] ! (const_string "integer"))) ;; The (bounding maximum) length of an instruction immediate. (define_attr "length_immediate" "" ! (cond [(eq_attr "type" "incdec,setcc,icmov,str,cld,lea,other,multi,idiv") (const_int 0) ! (eq_attr "unit" "i387,sse,mmx") (const_int 0) ! (eq_attr "type" "alu,alu1,negnot,imovx,ishift,rotate,ishift1,rotate1, ! imul,icmp,push,pop") (symbol_ref "ix86_attr_length_immediate_default(insn,1)") (eq_attr "type" "imov,test") (symbol_ref "ix86_attr_length_immediate_default(insn,0)") *************** *** 152,158 **** (eq_attr "type" "ibr") (const_int 1) ] ! (symbol_ref "/* Update immediate_length and other attributes! */ abort(),1"))) ;; The (bounding maximum) length of an instruction address. (define_attr "length_address" "" --- 193,200 ---- (eq_attr "type" "ibr") (const_int 1) ] ! (symbol_ref "/* Update immediate_length and other attributes! */ ! abort(),1"))) ;; The (bounding maximum) length of an instruction address. (define_attr "length_address" "" *************** *** 169,184 **** ;; Set when length prefix is used. (define_attr "prefix_data16" "" ! (if_then_else (eq_attr "mode" "HI") (const_int 1) (const_int 0))) ;; Set when string REP prefix is used. ! (define_attr "prefix_rep" "" (const_int 0)) ;; Set when 0f opcode prefix is used. (define_attr "prefix_0f" "" ! (if_then_else (eq_attr "type" "imovx,setcc,icmov,sse,mmx") (const_int 1) (const_int 0))) --- 211,235 ---- ;; Set when length prefix is used. (define_attr "prefix_data16" "" ! (if_then_else (ior (eq_attr "mode" "HI") ! (and (eq_attr "unit" "sse") (eq_attr "mode" "V2DF"))) (const_int 1) (const_int 0))) ;; Set when string REP prefix is used. ! (define_attr "prefix_rep" "" ! (if_then_else (and (eq_attr "unit" "sse") (eq_attr "mode" "SF,DF")) ! (const_int 1) ! (const_int 0))) ;; Set when 0f opcode prefix is used. (define_attr "prefix_0f" "" ! (if_then_else ! (eq_attr "type" ! "imovx,setcc,icmov, ! sselog,sseiadd,sseishft,sseimul, ! sse,ssemov,sseadd,ssemul,ssecmp,ssecvt,ssediv, ! mmx,mmxmov,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft") (const_int 1) (const_int 0))) *************** *** 186,192 **** (define_attr "modrm" "" (cond [(eq_attr "type" "str,cld") (const_int 0) ! (eq_attr "i387" "1") (const_int 0) (and (eq_attr "type" "incdec") (ior (match_operand:SI 1 "register_operand" "") --- 237,243 ---- (define_attr "modrm" "" (cond [(eq_attr "type" "str,cld") (const_int 0) ! (eq_attr "unit" "i387") (const_int 0) (and (eq_attr "type" "incdec") (ior (match_operand:SI 1 "register_operand" "") *************** *** 217,227 **** (define_attr "length" "" (cond [(eq_attr "type" "other,multi,fistp") (const_int 16) ! ] (plus (plus (attr "modrm") (plus (attr "prefix_0f") ! (plus (attr "i387") ! (const_int 1)))) (plus (attr "prefix_rep") (plus (attr "prefix_data16") (plus (attr "length_immediate") --- 268,280 ---- (define_attr "length" "" (cond [(eq_attr "type" "other,multi,fistp") (const_int 16) ! (eq_attr "unit" "i387") ! (plus (const_int 2) ! (plus (attr "prefix_data16") ! (attr "length_address")))] (plus (plus (attr "modrm") (plus (attr "prefix_0f") ! (const_int 1))) (plus (attr "prefix_rep") (plus (attr "prefix_data16") (plus (attr "length_immediate") *************** *** 246,252 **** (if_then_else (match_operand 0 "memory_operand" "") (const_string "both") (const_string "load")) ! (eq_attr "type" "icmp,test") (if_then_else (ior (match_operand 0 "memory_operand" "") (match_operand 1 "memory_operand" "")) (const_string "load") --- 299,305 ---- (if_then_else (match_operand 0 "memory_operand" "") (const_string "both") (const_string "load")) ! (eq_attr "type" "icmp,test,ssecmp,mmxcmp,fcmp") (if_then_else (ior (match_operand 0 "memory_operand" "") (match_operand 1 "memory_operand" "")) (const_string "load") *************** *** 273,279 **** (const_string "store") (match_operand 1 "memory_operand" "") (const_string "load") ! (and (eq_attr "type" "!icmp,test,alu1,negnot,fop1,fsgn,imov,imovx,fmov,fcmp,sse,mmx") (match_operand 2 "memory_operand" "")) (const_string "load") (and (eq_attr "type" "icmov") --- 326,337 ---- (const_string "store") (match_operand 1 "memory_operand" "") (const_string "load") ! (and (eq_attr "type" ! "!alu1,negnot, ! imov,imovx,icmp,test, ! fmov,fcmp,fsgn, ! sse,ssemov,ssecmp,ssecvt, ! mmx,mmxmov,mmxcmp,mmxcvt") (match_operand 2 "memory_operand" "")) (const_string "load") (and (eq_attr "type" "icmov") *************** *** 287,297 **** (define_attr "imm_disp" "false,true,unknown" (cond [(eq_attr "type" "other,multi") (const_string "unknown") ! (and (eq_attr "type" "icmp,test,imov") (and (match_operand 0 "memory_displacement_operand" "") (match_operand 1 "immediate_operand" ""))) (const_string "true") ! (and (eq_attr "type" "alu,ishift,imul,idiv") (and (match_operand 0 "memory_displacement_operand" "") (match_operand 2 "immediate_operand" ""))) (const_string "true") --- 345,355 ---- (define_attr "imm_disp" "false,true,unknown" (cond [(eq_attr "type" "other,multi") (const_string "unknown") ! (and (eq_attr "type" "icmp,test,imov,alu1,ishift1,rotate1") (and (match_operand 0 "memory_displacement_operand" "") (match_operand 1 "immediate_operand" ""))) (const_string "true") ! (and (eq_attr "type" "alu,ishift,rotate,imul,idiv") (and (match_operand 0 "memory_displacement_operand" "") (match_operand 2 "immediate_operand" ""))) (const_string "true") *************** *** 308,1017 **** [(set_attr "length" "128") (set_attr "type" "multi")]) ! ;; Pentium Scheduling ! ;; ! ;; The Pentium is an in-order core with two integer pipelines. ! ! ;; True for insns that behave like prefixed insns on the Pentium. ! (define_attr "pent_prefix" "false,true" ! (if_then_else (ior (eq_attr "prefix_0f" "1") ! (ior (eq_attr "prefix_data16" "1") ! (eq_attr "prefix_rep" "1"))) ! (const_string "true") ! (const_string "false"))) ! ! ;; Categorize how an instruction slots. ! ! ;; The non-MMX Pentium slots an instruction with prefixes on U pipe only, ! ;; while MMX Pentium can slot it on either U or V. Model non-MMX Pentium ! ;; rules, because it results in noticeably better code on non-MMX Pentium ! ;; and doesn't hurt much on MMX. (Prefixed instructions are not very ! ;; common, so the scheduler usualy has a non-prefixed insn to pair). ! ! (define_attr "pent_pair" "uv,pu,pv,np" ! (cond [(eq_attr "imm_disp" "true") ! (const_string "np") ! (ior (eq_attr "type" "alu1,alu,imov,icmp,test,lea,incdec") ! (and (eq_attr "type" "pop,push") ! (eq_attr "memory" "!both"))) ! (if_then_else (eq_attr "pent_prefix" "true") ! (const_string "pu") ! (const_string "uv")) ! (eq_attr "type" "ibr") ! (const_string "pv") ! (and (eq_attr "type" "ishift") ! (match_operand 2 "const_int_operand" "")) ! (const_string "pu") ! (and (eq_attr "type" "call") ! (match_operand 0 "constant_call_address_operand" "")) ! (const_string "pv") ! (and (eq_attr "type" "callv") ! (match_operand 1 "constant_call_address_operand" "")) ! (const_string "pv") ! ] ! (const_string "np"))) ! ! ;; Rough readiness numbers. Fine tuning happens in i386.c. ! ;; ! ;; u describes pipe U ! ;; v describes pipe V ! ;; uv describes either pipe U or V for those that can issue to either ! ;; np describes not paring ! ;; fpu describes fpu ! ;; fpm describes fp insns of different types are not pipelined. ! ;; ! ;; ??? fxch isn't handled; not an issue until sched3 after reg-stack is real. ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "imul")) ! 11 11) ! ! (define_function_unit "pent_mul" 1 1 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "imul")) ! 11 11) ! ! ;; Rep movs takes minimally 12 cycles. ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "str")) ! 12 12) ! ! ; ??? IDIV for SI takes 46 cycles, for HI 30, for QI 22 ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "idiv")) ! 46 46) ! ! ; Fp reg-reg moves takes 1 cycle. Loads takes 1 cycle for SF/DF mode, ! ; 3 cycles for XFmode. Stores takes 2 cycles for SF/DF and 3 for XF. ! ; fldz and fld1 takes 2 cycles. Only reg-reg moves are pairable. ! ; The integer <-> fp conversion is not modeled correctly. Fild behaves ! ; like normal fp operation and fist takes 6 cycles. ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "fmov") ! (and (eq_attr "memory" "load,store") ! (eq_attr "mode" "XF")))) ! 3 3) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "fmov") ! (and (eq_attr "memory" "load,store") ! (eq_attr "mode" "XF")))) ! 3 3) ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "fmov") ! (ior (match_operand 1 "immediate_operand" "") ! (eq_attr "memory" "store")))) ! 2 2) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "fmov") ! (ior (match_operand 1 "immediate_operand" "") ! (eq_attr "memory" "store")))) ! 2 2) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "cld")) ! 2 2) ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "fmov") ! (eq_attr "memory" "none,load"))) ! 1 1) ! ! ; Read/Modify/Write instructions usually take 3 cycles. ! (define_function_unit "pent_u" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,alu1,ishift") ! (and (eq_attr "pent_pair" "pu") ! (eq_attr "memory" "both")))) ! 3 3) ! ! (define_function_unit "pent_uv" 2 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,alu1,ishift") ! (and (eq_attr "pent_pair" "!np") ! (eq_attr "memory" "both")))) ! 3 3) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,alu1,negnot,ishift") ! (and (eq_attr "pent_pair" "np") ! (eq_attr "memory" "both")))) ! 3 3) ! ! ; Read/Modify or Modify/Write instructions usually take 2 cycles. ! (define_function_unit "pent_u" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,ishift") ! (and (eq_attr "pent_pair" "pu") ! (eq_attr "memory" "load,store")))) ! 2 2) ! ! (define_function_unit "pent_uv" 2 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,ishift") ! (and (eq_attr "pent_pair" "!np") ! (eq_attr "memory" "load,store")))) ! 2 2) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,ishift") ! (and (eq_attr "pent_pair" "np") ! (eq_attr "memory" "load,store")))) ! 2 2) ! ! ; Insns w/o memory operands and move instructions usually take one cycle. ! (define_function_unit "pent_u" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "pent_pair" "pu")) ! 1 1) ! ! (define_function_unit "pent_v" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "pent_pair" "pv")) ! 1 1) ! ! (define_function_unit "pent_uv" 2 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "pent_pair" "!np")) ! 1 1) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "pent_pair" "np")) ! 1 1) ! ! ; Pairable insns only conflict with other non-pairable insns. ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,alu1,ishift") ! (and (eq_attr "pent_pair" "!np") ! (eq_attr "memory" "both")))) ! 3 3 ! [(eq_attr "pent_pair" "np")]) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (and (eq_attr "type" "alu,alu1,ishift") ! (and (eq_attr "pent_pair" "!np") ! (eq_attr "memory" "load,store")))) ! 2 2 ! [(eq_attr "pent_pair" "np")]) ! ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "pent_pair" "!np")) ! 1 1 ! [(eq_attr "pent_pair" "np")]) ! ! ; Floating point instructions usually blocks cycle longer when combined with ! ; integer instructions, because of the inpaired fxch instruction. ! (define_function_unit "pent_np" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fmov,fop,fop1,fsgn,fmul,fpspc,fcmov,fcmp,fistp")) ! 2 2 ! [(eq_attr "type" "!fmov,fop,fop1,fsgn,fmul,fpspc,fcmov,fcmp,fistp")]) ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fcmp,fxch,fsgn")) ! 1 1) ! ! ; Addition takes 3 cycles; assume other random cruft does as well. ! ; ??? Trivial fp operations such as fabs or fchs takes only one cycle. ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fop,fop1,fistp")) ! 3 1) ! ! ; Multiplication takes 3 cycles and is only half pipelined. ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fmul")) ! 3 1) ! ! (define_function_unit "pent_mul" 1 1 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fmul")) ! 2 2) ! ! ; ??? This is correct only for fdiv and sqrt -- sin/cos take 65-100 cycles. ! ; They can overlap with integer insns. Only the last two cycles can overlap ! ; with other fp insns. Only fsin/fcos can overlap with multiplies. ! ; Only last two cycles of fsin/fcos can overlap with other instructions. ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fdiv")) ! 39 37) ! ! (define_function_unit "pent_mul" 1 1 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fdiv")) ! 39 39) ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fpspc")) ! 70 68) ! ! (define_function_unit "pent_mul" 1 1 ! (and (eq_attr "cpu" "pentium") ! (eq_attr "type" "fpspc")) ! 70 70) ! ! ;; Pentium Pro/PII Scheduling ! ;; ! ;; The PPro has an out-of-order core, but the instruction decoders are ! ;; naturally in-order and asymmetric. We get best performance by scheduling ! ;; for the decoders, for in doing so we give the oo execution unit the ! ;; most choices. ! ! ;; Categorize how many uops an ia32 instruction evaluates to: ! ;; one -- an instruction with 1 uop can be decoded by any of the ! ;; three decoders. ! ;; few -- an instruction with 1 to 4 uops can be decoded only by ! ;; decoder 0. ! ;; many -- a complex instruction may take an unspecified number of ! ;; cycles to decode in decoder 0. ! ! (define_attr "ppro_uops" "one,few,many" ! (cond [(eq_attr "type" "other,multi,call,callv,fpspc,str") ! (const_string "many") ! (eq_attr "type" "icmov,fcmov,str,cld") ! (const_string "few") ! (eq_attr "type" "imov") ! (if_then_else (eq_attr "memory" "store,both") ! (const_string "few") ! (const_string "one")) ! (eq_attr "memory" "!none") ! (const_string "few") ! ] ! (const_string "one"))) ! ! ;; Rough readiness numbers. Fine tuning happens in i386.c. ! ;; ! ;; p0 describes port 0. ! ;; p01 describes ports 0 and 1 as a pair; alu insns can issue to either. ! ;; p2 describes port 2 for loads. ! ;; p34 describes ports 3 and 4 for stores. ! ;; fpu describes the fpu accessed via port 0. ! ;; ??? It is less than clear if there are separate fadd and fmul units ! ;; that could operate in parallel. ! ;; ! ;; ??? fxch isn't handled; not an issue until sched3 after reg-stack is real. ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "ishift,lea,ibr,cld")) ! 1 1) ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "imul")) ! 4 1) ! ! ;; ??? Does the divider lock out the pipe while it works, ! ;; or is there a disconnected unit? ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "idiv")) ! 17 17) ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fop,fop1,fsgn,fistp")) ! 3 1) ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fcmov")) ! 2 1) ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fcmp")) ! 1 1) ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fmov")) ! 1 1) ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fmul")) ! 5 1) ! ! (define_function_unit "ppro_p0" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fdiv,fpspc")) ! 56 1) ! ! (define_function_unit "ppro_p01" 2 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "!imov,fmov")) ! 1 1) ! ! (define_function_unit "ppro_p01" 2 0 ! (and (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "imov,fmov")) ! (eq_attr "memory" "none")) ! 1 1) ! ! (define_function_unit "ppro_p2" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (ior (eq_attr "type" "pop") ! (eq_attr "memory" "load,both"))) ! 3 1) ! ! (define_function_unit "ppro_p34" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (ior (eq_attr "type" "push") ! (eq_attr "memory" "store,both"))) ! 1 1) ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fop,fop1,fsgn,fmov,fcmp,fcmov,fistp")) ! 1 1) ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fmul")) ! 5 2) ! ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "fdiv,fpspc")) ! 56 56) ! ! ;; imul uses the fpu. ??? does it have the same throughput as fmul? ! (define_function_unit "fpu" 1 0 ! (and (eq_attr "cpu" "pentiumpro") ! (eq_attr "type" "imul")) ! 4 1) ! ! ;; AMD K6/K6-2 Scheduling ! ;; ! ;; The K6 has similar architecture to PPro. Important difference is, that ! ;; there are only two decoders and they seems to be much slower than execution ! ;; units. So we have to pay much more attention to proper decoding for ! ;; schedulers. We share most of scheduler code for PPro in i386.c ! ;; ! ;; The fp unit is not pipelined and do one operation per two cycles including ! ;; the FXCH. ! ;; ! ;; alu describes both ALU units (ALU-X and ALU-Y). ! ;; alux describes X alu unit ! ;; fpu describes FPU unit ! ;; load describes load unit. ! ;; branch describes branch unit. ! ;; store decsribes store unit. This unit is not modelled completely and only ! ;; used to model lea operation. Otherwise it lie outside of the critical ! ;; path. ! ;; ! ;; ??? fxch isn't handled; not an issue until sched3 after reg-stack is real. ! ! ;; The decoder specification is in the PPro section above! ! ! ;; Shift instructions and certain arithmetic are issued only to X pipe. ! (define_function_unit "k6_alux" 1 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "ishift,alu1,negnot,cld")) ! 1 1) ! ! ;; The QI mode arithmetic is issued to X pipe only. ! (define_function_unit "k6_alux" 1 0 ! (and (eq_attr "cpu" "k6") ! (and (eq_attr "type" "alu,alu1,negnot,icmp,test,imovx,incdec") ! (match_operand:QI 0 "general_operand" ""))) ! 1 1) ! ! (define_function_unit "k6_alu" 2 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "ishift,alu1,negnot,alu,icmp,test,imovx,incdec,setcc,lea")) ! 1 1) ! ! (define_function_unit "k6_alu" 2 0 ! (and (eq_attr "cpu" "k6") ! (and (eq_attr "type" "imov") ! (eq_attr "memory" "none"))) ! 1 1) ! ! (define_function_unit "k6_branch" 1 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "call,callv,ibr")) ! 1 1) ! ! ;; Load unit have two cycle latency, but we take care for it in adjust_cost ! (define_function_unit "k6_load" 1 0 ! (and (eq_attr "cpu" "k6") ! (ior (eq_attr "type" "pop") ! (eq_attr "memory" "load,both"))) ! 1 1) ! ! (define_function_unit "k6_load" 1 0 ! (and (eq_attr "cpu" "k6") ! (and (eq_attr "type" "str") ! (eq_attr "memory" "load,both"))) ! 10 10) ! ! ;; Lea have two instructions, so latency is probably 2 ! (define_function_unit "k6_store" 1 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "lea")) ! 2 1) ! ! (define_function_unit "k6_store" 1 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "str")) ! 10 10) ! ! (define_function_unit "k6_store" 1 0 ! (and (eq_attr "cpu" "k6") ! (ior (eq_attr "type" "push") ! (eq_attr "memory" "store,both"))) ! 1 1) ! ! (define_function_unit "k6_fpu" 1 1 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "fop,fop1,fmov,fcmp,fistp")) ! 2 2) ! ! (define_function_unit "k6_fpu" 1 1 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "fmul")) ! 2 2) ! ! ;; ??? Guess ! (define_function_unit "k6_fpu" 1 1 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "fdiv,fpspc")) ! 56 56) ! ! (define_function_unit "k6_alu" 2 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "imul")) ! 2 2) ! ! (define_function_unit "k6_alux" 1 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "imul")) ! 2 2) ! ! ;; ??? Guess ! (define_function_unit "k6_alu" 2 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "idiv")) ! 17 17) ! ! (define_function_unit "k6_alux" 1 0 ! (and (eq_attr "cpu" "k6") ! (eq_attr "type" "idiv")) ! 17 17) ! ! ;; AMD Athlon Scheduling ! ;; ! ;; The Athlon does contain three pipelined FP units, three integer units and ! ;; three address generation units. ! ;; ! ;; The predecode logic is determining boundaries of instructions in the 64 ! ;; byte cache line. So the cache line straddling problem of K6 might be issue ! ;; here as well, but it is not noted in the documentation. ! ;; ! ;; Three DirectPath instructions decoders and only one VectorPath decoder ! ;; is available. They can decode three DirectPath instructions or one VectorPath ! ;; instruction per cycle. ! ;; Decoded macro instructions are then passed to 72 entry instruction control ! ;; unit, that passes ! ;; it to the specialized integer (18 entry) and fp (36 entry) schedulers. ! ;; ! ;; The load/store queue unit is not attached to the schedulers but ! ;; communicates with all the execution units separately instead. ! ! (define_attr "athlon_decode" "direct,vector" ! (cond [(eq_attr "type" "call,imul,idiv,other,multi,fcmov,fpspc,str,pop,cld,fcmov") ! (const_string "vector") ! (and (eq_attr "type" "push") ! (match_operand 1 "memory_operand" "")) ! (const_string "vector") ! (and (eq_attr "type" "fmov") ! (and (eq_attr "memory" "load,store") ! (eq_attr "mode" "XF"))) ! (const_string "vector")] ! (const_string "direct"))) ! ! (define_function_unit "athlon_vectordec" 1 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "athlon_decode" "vector")) ! 1 1) ! ! (define_function_unit "athlon_directdec" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "athlon_decode" "direct")) ! 1 1) ! ! (define_function_unit "athlon_vectordec" 1 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "athlon_decode" "direct")) ! 1 1 [(eq_attr "athlon_decode" "vector")]) ! ! (define_function_unit "athlon_ieu" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "alu1,negnot,alu,icmp,test,imov,imovx,lea,incdec,ishift,ibr,call,callv,icmov,cld,pop,setcc,push,pop")) ! 1 1) ! ! (define_function_unit "athlon_ieu" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "str")) ! 15 15) ! ! (define_function_unit "athlon_ieu" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "imul")) ! 5 0) ! ! (define_function_unit "athlon_ieu" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "idiv")) ! 42 0) ! ! (define_function_unit "athlon_muldiv" 1 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "imul")) ! 5 0) ! ! (define_function_unit "athlon_muldiv" 1 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "idiv")) ! 42 42) ! ! (define_attr "athlon_fpunits" "none,store,mul,add,muladd,any" ! (cond [(eq_attr "type" "fop,fop1,fcmp,fistp") ! (const_string "add") ! (eq_attr "type" "fmul,fdiv,fpspc,fsgn,fcmov") ! (const_string "mul") ! (and (eq_attr "type" "fmov") (eq_attr "memory" "store,both")) ! (const_string "store") ! (and (eq_attr "type" "fmov") (eq_attr "memory" "load")) ! (const_string "any") ! (and (eq_attr "type" "fmov") ! (ior (match_operand:SI 1 "register_operand" "") ! (match_operand 1 "immediate_operand" ""))) ! (const_string "store") ! (eq_attr "type" "fmov") ! (const_string "muladd")] ! (const_string "none"))) ! ! ;; We use latencies 1 for definitions. This is OK to model colisions ! ;; in execution units. The real latencies are modeled in the "fp" pipeline. ! ! ;; fsin, fcos: 96-192 ! ;; fsincos: 107-211 ! ;; fsqrt: 19 for SFmode, 27 for DFmode, 35 for XFmode. ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "fpspc")) ! 100 1) ! ! ;; 16 cycles for SFmode, 20 for DFmode and 24 for XFmode. ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "fdiv")) ! 24 1) ! ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "fop,fop1,fmul,fistp")) ! 4 1) ! ! ;; XFmode loads are slow. ! ;; XFmode store is slow too (8 cycles), but we don't need to model it, because ! ;; there are no dependent instructions. ! ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (and (eq_attr "type" "fmov") ! (and (eq_attr "memory" "load") ! (eq_attr "mode" "XF")))) ! 10 1) ! ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "fmov,fsgn")) ! 2 1) ! ! ;; fcmp and ftst instructions ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (and (eq_attr "type" "fcmp") ! (eq_attr "athlon_decode" "direct"))) ! 3 1) ! ! ;; fcmpi instructions. ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (and (eq_attr "type" "fcmp") ! (eq_attr "athlon_decode" "vector"))) ! 3 1) ! ! (define_function_unit "athlon_fp" 3 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "type" "fcmov")) ! 7 1) ! ! (define_function_unit "athlon_fp_mul" 1 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "athlon_fpunits" "mul")) ! 1 1) ! ! (define_function_unit "athlon_fp_add" 1 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "athlon_fpunits" "add")) ! 1 1) ! ! (define_function_unit "athlon_fp_muladd" 2 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "athlon_fpunits" "muladd,mul,add")) ! 1 1) ! ! (define_function_unit "athlon_fp_store" 1 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "athlon_fpunits" "store")) ! 1 1) ! ! ;; We don't need to model the Address Generation Unit, since we don't model ! ;; the re-order buffer yet and thus we never schedule more than three operations ! ;; at time. Later we may want to experiment with MD_SCHED macros modeling the ! ;; decoders independently on the functional units. ! ! ;(define_function_unit "athlon_agu" 3 0 ! ; (and (eq_attr "cpu" "athlon") ! ; (and (eq_attr "memory" "!none") ! ; (eq_attr "athlon_fpunits" "none"))) ! ; 1 1) ! ! ;; Model load unit to avoid too long sequences of loads. We don't need to ! ;; model store queue, since it is hardly going to be bottleneck. ! ! (define_function_unit "athlon_load" 2 0 ! (and (eq_attr "cpu" "athlon") ! (eq_attr "memory" "load,both")) ! 1 1) ! ;; Compare instructions. --- 366,375 ---- [(set_attr "length" "128") (set_attr "type" "multi")]) ! (include "pentium.md") ! (include "ppro.md") ! (include "k6.md") ! (include "athlon.md") ;; Compare instructions. *************** *** 1385,1391 **** [(set (match_operand:HI 0 "register_operand" "=a") (unspec:HI [(compare:CCFP (match_operand 1 "register_operand" "f") ! (match_operand 2 "const0_operand" "X"))] 9))] "TARGET_80387 && FLOAT_MODE_P (GET_MODE (operands[1])) && GET_MODE (operands[1]) == GET_MODE (operands[2])" --- 743,750 ---- [(set (match_operand:HI 0 "register_operand" "=a") (unspec:HI [(compare:CCFP (match_operand 1 "register_operand" "f") ! (match_operand 2 "const0_operand" "X"))] ! UNSPEC_FNSTSW))] "TARGET_80387 && FLOAT_MODE_P (GET_MODE (operands[1])) && GET_MODE (operands[1]) == GET_MODE (operands[2])" *************** *** 1416,1422 **** (unspec:HI [(compare:CCFP (match_operand:SF 1 "register_operand" "f") ! (match_operand:SF 2 "nonimmediate_operand" "fm"))] 9))] "TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "fcmp") --- 775,782 ---- (unspec:HI [(compare:CCFP (match_operand:SF 1 "register_operand" "f") ! (match_operand:SF 2 "nonimmediate_operand" "fm"))] ! UNSPEC_FNSTSW))] "TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "fcmp") *************** *** 1437,1443 **** (unspec:HI [(compare:CCFP (match_operand:DF 1 "register_operand" "f") ! (match_operand:DF 2 "nonimmediate_operand" "fm"))] 9))] "TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "multi") --- 797,804 ---- (unspec:HI [(compare:CCFP (match_operand:DF 1 "register_operand" "f") ! (match_operand:DF 2 "nonimmediate_operand" "fm"))] ! UNSPEC_FNSTSW))] "TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "multi") *************** *** 1468,1474 **** (unspec:HI [(compare:CCFP (match_operand:XF 1 "register_operand" "f") ! (match_operand:XF 2 "register_operand" "f"))] 9))] "!TARGET_64BIT && TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "multi") --- 829,836 ---- (unspec:HI [(compare:CCFP (match_operand:XF 1 "register_operand" "f") ! (match_operand:XF 2 "register_operand" "f"))] ! UNSPEC_FNSTSW))] "!TARGET_64BIT && TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "multi") *************** *** 1479,1485 **** (unspec:HI [(compare:CCFP (match_operand:TF 1 "register_operand" "f") ! (match_operand:TF 2 "register_operand" "f"))] 9))] "TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "multi") --- 841,848 ---- (unspec:HI [(compare:CCFP (match_operand:TF 1 "register_operand" "f") ! (match_operand:TF 2 "register_operand" "f"))] ! UNSPEC_FNSTSW))] "TARGET_80387" "* return output_fp_compare (insn, operands, 2, 0);" [(set_attr "type" "multi") *************** *** 1502,1508 **** (unspec:HI [(compare:CCFPU (match_operand 1 "register_operand" "f") ! (match_operand 2 "register_operand" "f"))] 9))] "TARGET_80387 && FLOAT_MODE_P (GET_MODE (operands[1])) && GET_MODE (operands[1]) == GET_MODE (operands[2])" --- 865,872 ---- (unspec:HI [(compare:CCFPU (match_operand 1 "register_operand" "f") ! (match_operand 2 "register_operand" "f"))] ! UNSPEC_FNSTSW))] "TARGET_80387 && FLOAT_MODE_P (GET_MODE (operands[1])) && GET_MODE (operands[1]) == GET_MODE (operands[2])" *************** *** 1550,1561 **** (define_insn "x86_fnstsw_1" [(set (match_operand:HI 0 "register_operand" "=a") ! (unspec:HI [(reg 18)] 9))] "TARGET_80387" "fnstsw\t%0" [(set_attr "length" "2") (set_attr "mode" "SI") ! (set_attr "i387" "1") (set_attr "ppro_uops" "few")]) ;; FP compares, step 3 --- 914,925 ---- (define_insn "x86_fnstsw_1" [(set (match_operand:HI 0 "register_operand" "=a") ! (unspec:HI [(reg 18)] UNSPEC_FNSTSW))] "TARGET_80387" "fnstsw\t%0" [(set_attr "length" "2") (set_attr "mode" "SI") ! (set_attr "unit" "i387") (set_attr "ppro_uops" "few")]) ;; FP compares, step 3 *************** *** 1563,1569 **** (define_insn "x86_sahf_1" [(set (reg:CC 17) ! (unspec:CC [(match_operand:HI 0 "register_operand" "a")] 10))] "!TARGET_64BIT" "sahf" [(set_attr "length" "1") --- 927,933 ---- (define_insn "x86_sahf_1" [(set (reg:CC 17) ! (unspec:CC [(match_operand:HI 0 "register_operand" "a")] UNSPEC_SAHF))] "!TARGET_64BIT" "sahf" [(set_attr "length" "1") *************** *** 1594,1600 **** && SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[0])" "* return output_fp_compare (insn, operands, 1, 0);" ! [(set_attr "type" "fcmp,sse") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) --- 958,964 ---- && SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[0])" "* return output_fp_compare (insn, operands, 1, 0);" ! [(set_attr "type" "fcmp,ssecmp") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) *************** *** 1605,1611 **** "SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[0])" "* return output_fp_compare (insn, operands, 1, 0);" ! [(set_attr "type" "sse") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) --- 969,975 ---- "SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[0])" "* return output_fp_compare (insn, operands, 1, 0);" ! [(set_attr "type" "ssecmp") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) *************** *** 1630,1636 **** && SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[1])" "* return output_fp_compare (insn, operands, 1, 1);" ! [(set_attr "type" "fcmp,sse") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) --- 994,1000 ---- && SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[1])" "* return output_fp_compare (insn, operands, 1, 1);" ! [(set_attr "type" "fcmp,ssecmp") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) *************** *** 1641,1647 **** "SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[1])" "* return output_fp_compare (insn, operands, 1, 1);" ! [(set_attr "type" "sse") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) --- 1005,1011 ---- "SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[1])" "* return output_fp_compare (insn, operands, 1, 1);" ! [(set_attr "type" "ssecmp") (set_attr "mode" "unknownfp") (set_attr "athlon_decode" "vector")]) *************** *** 1737,1755 **** (set_attr "length_immediate" "1")]) (define_insn "*movsi_1" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r,m,!*y,!rm,!*y,!*Y,!rm,!*Y") ! (match_operand:SI 1 "general_operand" "rinm,rin,rm,*y,*y,rm,*Y,*Y"))] "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" { switch (get_attr_type (insn)) { ! case TYPE_SSE: ! if (get_attr_mode (insn) == TImode) return "movdqa\t{%1, %0|%0, %1}"; return "movd\t{%1, %0|%0, %1}"; ! case TYPE_MMX: ! if (get_attr_mode (insn) == DImode) return "movq\t{%1, %0|%0, %1}"; return "movd\t{%1, %0|%0, %1}"; --- 1101,1119 ---- (set_attr "length_immediate" "1")]) (define_insn "*movsi_1" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r,m,!*y,!rm,!*y,!*Y,!*Y,!rm") ! (match_operand:SI 1 "general_operand" "rinm,rin,rm,*y,*y,*Y,rm,*Y"))] "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" { switch (get_attr_type (insn)) { ! case TYPE_SSEMOV: ! if (get_attr_mode (insn) == MODE_TI) return "movdqa\t{%1, %0|%0, %1}"; return "movd\t{%1, %0|%0, %1}"; ! case TYPE_MMXMOV: ! if (get_attr_mode (insn) == MODE_DI) return "movq\t{%1, %0|%0, %1}"; return "movd\t{%1, %0|%0, %1}"; *************** *** 1757,1772 **** return "lea{l}\t{%1, %0|%0, %1}"; default: ! if (flag_pic && SYMBOLIC_CONST (operands[1])) abort(); return "mov{l}\t{%1, %0|%0, %1}"; } } [(set (attr "type") (cond [(eq_attr "alternative" "2,3,4") ! (const_string "mmx") (eq_attr "alternative" "5,6,7") ! (const_string "sse") (and (ne (symbol_ref "flag_pic") (const_int 0)) (match_operand:SI 1 "symbolic_operand" "")) (const_string "lea") --- 1121,1136 ---- return "lea{l}\t{%1, %0|%0, %1}"; default: ! if (flag_pic && !LEGITIMATE_PIC_OPERAND_P (operands[1])) abort(); return "mov{l}\t{%1, %0|%0, %1}"; } } [(set (attr "type") (cond [(eq_attr "alternative" "2,3,4") ! (const_string "mmxmov") (eq_attr "alternative" "5,6,7") ! (const_string "ssemov") (and (ne (symbol_ref "flag_pic") (const_int 0)) (match_operand:SI 1 "symbolic_operand" "")) (const_string "lea") *************** *** 2475,2481 **** movq\t{%1, %0|%0, %1} movdqa\t{%1, %0|%0, %1} movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "*,*,mmx,mmx,sse,sse,sse") (set_attr "mode" "DI,DI,DI,DI,DI,TI,DI")]) (define_split --- 1839,1845 ---- movq\t{%1, %0|%0, %1} movdqa\t{%1, %0|%0, %1} movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "*,*,mmx,mmx,ssemov,ssemov,ssemov") (set_attr "mode" "DI,DI,DI,DI,DI,TI,DI")]) (define_split *************** *** 2504,2522 **** { switch (get_attr_type (insn)) { ! case TYPE_SSE: if (register_operand (operands[0], DImode) && register_operand (operands[1], DImode)) return "movdqa\t{%1, %0|%0, %1}"; /* FALLTHRU */ ! case TYPE_MMX: return "movq\t{%1, %0|%0, %1}"; case TYPE_MULTI: return "#"; case TYPE_LEA: return "lea{q}\t{%a1, %0|%0, %a1}"; default: ! if (flag_pic && SYMBOLIC_CONST (operands[1])) abort (); if (get_attr_mode (insn) == MODE_SI) return "mov{l}\t{%k1, %k0|%k0, %k1}"; --- 1868,1886 ---- { switch (get_attr_type (insn)) { ! case TYPE_SSEMOV: if (register_operand (operands[0], DImode) && register_operand (operands[1], DImode)) return "movdqa\t{%1, %0|%0, %1}"; /* FALLTHRU */ ! case TYPE_MMXMOV: return "movq\t{%1, %0|%0, %1}"; case TYPE_MULTI: return "#"; case TYPE_LEA: return "lea{q}\t{%a1, %0|%0, %a1}"; default: ! if (flag_pic && !LEGITIMATE_PIC_OPERAND_P (operands[1])) abort (); if (get_attr_mode (insn) == MODE_SI) return "mov{l}\t{%k1, %k0|%k0, %k1}"; *************** *** 2528,2536 **** } [(set (attr "type") (cond [(eq_attr "alternative" "5,6") ! (const_string "mmx") (eq_attr "alternative" "7,8") ! (const_string "sse") (eq_attr "alternative" "4") (const_string "multi") (and (ne (symbol_ref "flag_pic") (const_int 0)) --- 1892,1900 ---- } [(set (attr "type") (cond [(eq_attr "alternative" "5,6") ! (const_string "mmxmov") (eq_attr "alternative" "7,8") ! (const_string "ssemov") (eq_attr "alternative" "4") (const_string "multi") (and (ne (symbol_ref "flag_pic") (const_int 0)) *************** *** 2546,2561 **** ;; We fake an second form of instruction to force reload to load address ;; into register when rax is not available (define_insn "*movabsdi_1_rex64" ! [(set (mem:DI (match_operand:DI 0 "x86_64_movabs_operand" "i,r")) ! (match_operand:DI 1 "nonmemory_operand" "a,er"))] "TARGET_64BIT" "@ movabs{q}\t{%1, %P0|%P0, %1} ! mov{q}\t{%1, %a0|%a0, %1}" [(set_attr "type" "imov") ! (set_attr "modrm" "0,*") ! (set_attr "length_address" "8,0") ! (set_attr "length_immediate" "0,*") (set_attr "memory" "store") (set_attr "mode" "DI")]) --- 1910,1926 ---- ;; We fake an second form of instruction to force reload to load address ;; into register when rax is not available (define_insn "*movabsdi_1_rex64" ! [(set (mem:DI (match_operand:DI 0 "x86_64_movabs_operand" "i,r,r")) ! (match_operand:DI 1 "nonmemory_operand" "a,er,i"))] "TARGET_64BIT" "@ movabs{q}\t{%1, %P0|%P0, %1} ! mov{q}\t{%1, %a0|%a0, %1} ! movabs{q}\t{%1, %a0|%a0, %1}" [(set_attr "type" "imov") ! (set_attr "modrm" "0,*,*") ! (set_attr "length_address" "8,0,0") ! (set_attr "length_immediate" "0,*,*") (set_attr "memory" "store") (set_attr "mode" "DI")]) *************** *** 2702,2722 **** ;; %%% Kill this when call knows how to work this out. (define_split [(set (match_operand:SF 0 "push_operand" "") ! (match_operand:SF 1 "register_operand" ""))] ! "!TARGET_64BIT && ANY_FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -4))) (set (mem:SF (reg:SI 7)) (match_dup 1))]) (define_split [(set (match_operand:SF 0 "push_operand" "") ! (match_operand:SF 1 "register_operand" ""))] ! "TARGET_64BIT && ANY_FP_REGNO_P (REGNO (operands[1]))" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -8))) (set (mem:SF (reg:DI 7)) (match_dup 1))]) (define_insn "*movsf_1" [(set (match_operand:SF 0 "nonimmediate_operand" "=f#xr,m,f#xr,r#xf,m,x#rf,x#rf,x#rf,m,!*y,!rm,!*y") ! (match_operand:SF 1 "general_operand" "fm#rx,f#rx,G,rmF#fx,Fr#fx,H,x,xm#rf,x#rf,rm,*y,*y"))] "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) && (reload_in_progress || reload_completed || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) --- 2067,2087 ---- ;; %%% Kill this when call knows how to work this out. (define_split [(set (match_operand:SF 0 "push_operand" "") ! (match_operand:SF 1 "any_fp_register_operand" ""))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -4))) (set (mem:SF (reg:SI 7)) (match_dup 1))]) (define_split [(set (match_operand:SF 0 "push_operand" "") ! (match_operand:SF 1 "any_fp_register_operand" ""))] ! "TARGET_64BIT" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -8))) (set (mem:SF (reg:DI 7)) (match_dup 1))]) (define_insn "*movsf_1" [(set (match_operand:SF 0 "nonimmediate_operand" "=f#xr,m,f#xr,r#xf,m,x#rf,x#rf,x#rf,m,!*y,!rm,!*y") ! (match_operand:SF 1 "general_operand" "fm#rx,f#rx,G,rmF#fx,Fr#fx,C,x,xm#rf,x#rf,rm,*y,*y"))] "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) && (reload_in_progress || reload_completed || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) *************** *** 2754,2760 **** case 4: return "mov{l}\t{%1, %0|%0, %1}"; case 5: ! if (TARGET_SSE2) return "pxor\t%0, %0"; else return "xorps\t%0, %0"; --- 2119,2125 ---- case 4: return "mov{l}\t{%1, %0|%0, %1}"; case 5: ! if (TARGET_SSE2 && !TARGET_ATHLON) return "pxor\t%0, %0"; else return "xorps\t%0, %0"; *************** *** 2778,2784 **** abort(); } } ! [(set_attr "type" "fmov,fmov,fmov,imov,imov,sse,sse,sse,sse,mmx,mmx,mmx") (set_attr "mode" "SF,SF,SF,SI,SI,TI,SF,SF,SF,SI,SI,DI")]) (define_insn "*swapsf" --- 2143,2149 ---- abort(); } } ! [(set_attr "type" "fmov,fmov,fmov,imov,imov,ssemov,ssemov,ssemov,ssemov,mmxmov,mmxmov,mmxmov") (set_attr "mode" "SF,SF,SF,SI,SI,TI,SF,SF,SF,SI,SI,DI")]) (define_insn "*swapsf" *************** *** 2874,2889 **** ;; %%% Kill this when call knows how to work this out. (define_split [(set (match_operand:DF 0 "push_operand" "") ! (match_operand:DF 1 "register_operand" ""))] ! "!TARGET_64BIT && reload_completed && ANY_FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -8))) (set (mem:DF (reg:SI 7)) (match_dup 1))] "") (define_split [(set (match_operand:DF 0 "push_operand" "") ! (match_operand:DF 1 "register_operand" ""))] ! "TARGET_64BIT && reload_completed && ANY_FP_REGNO_P (REGNO (operands[1]))" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -8))) (set (mem:DF (reg:DI 7)) (match_dup 1))] "") --- 2239,2254 ---- ;; %%% Kill this when call knows how to work this out. (define_split [(set (match_operand:DF 0 "push_operand" "") ! (match_operand:DF 1 "any_fp_register_operand" ""))] ! "!TARGET_64BIT && reload_completed" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -8))) (set (mem:DF (reg:SI 7)) (match_dup 1))] "") (define_split [(set (match_operand:DF 0 "push_operand" "") ! (match_operand:DF 1 "any_fp_register_operand" ""))] ! "TARGET_64BIT && reload_completed" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -8))) (set (mem:DF (reg:DI 7)) (match_dup 1))] "") *************** *** 2901,2907 **** (define_insn "*movdf_nointeger" [(set (match_operand:DF 0 "nonimmediate_operand" "=f#Y,m,f#Y,*r,o,Y#f,Y#f,Y#f,m") ! (match_operand:DF 1 "general_operand" "fm#Y,f#Y,G,*roF,F*r,H,Y#f,YHm#f,Y#f"))] "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) && (optimize_size || !TARGET_INTEGER_DFMODE_MOVES) && (reload_in_progress || reload_completed --- 2266,2272 ---- (define_insn "*movdf_nointeger" [(set (match_operand:DF 0 "nonimmediate_operand" "=f#Y,m,f#Y,*r,o,Y#f,Y#f,Y#f,m") ! (match_operand:DF 1 "general_operand" "fm#Y,f#Y,G,*roF,F*r,C,Y#f,YHm#f,Y#f"))] "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) && (optimize_size || !TARGET_INTEGER_DFMODE_MOVES) && (reload_in_progress || reload_completed *************** *** 2940,2946 **** case 4: return "#"; case 5: ! return "pxor\t%0, %0"; case 6: if (TARGET_PARTIAL_REG_DEPENDENCY) return "movapd\t{%1, %0|%0, %1}"; --- 2305,2314 ---- case 4: return "#"; case 5: ! if (TARGET_ATHLON) ! return "xorpd\t%0, %0"; ! else ! return "pxor\t%0, %0"; case 6: if (TARGET_PARTIAL_REG_DEPENDENCY) return "movapd\t{%1, %0|%0, %1}"; *************** *** 2954,2965 **** abort(); } } ! [(set_attr "type" "fmov,fmov,fmov,multi,multi,sse,sse,sse,sse") (set_attr "mode" "DF,DF,DF,SI,SI,TI,DF,DF,DF")]) (define_insn "*movdf_integer" [(set (match_operand:DF 0 "nonimmediate_operand" "=f#Yr,m,f#Yr,r#Yf,o,Y#rf,Y#rf,Y#rf,m") ! (match_operand:DF 1 "general_operand" "fm#Yr,f#Yr,G,roF#Yf,Fr#Yf,H,Y#rf,Ym#rf,Y#rf"))] "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) && !optimize_size && TARGET_INTEGER_DFMODE_MOVES && (reload_in_progress || reload_completed --- 2322,2333 ---- abort(); } } ! [(set_attr "type" "fmov,fmov,fmov,multi,multi,ssemov,ssemov,ssemov,ssemov") (set_attr "mode" "DF,DF,DF,SI,SI,TI,DF,DF,DF")]) (define_insn "*movdf_integer" [(set (match_operand:DF 0 "nonimmediate_operand" "=f#Yr,m,f#Yr,r#Yf,o,Y#rf,Y#rf,Y#rf,m") ! (match_operand:DF 1 "general_operand" "fm#Yr,f#Yr,G,roF#Yf,Fr#Yf,C,Y#rf,Ym#rf,Y#rf"))] "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) && !optimize_size && TARGET_INTEGER_DFMODE_MOVES && (reload_in_progress || reload_completed *************** *** 2999,3005 **** return "#"; case 5: ! return "pxor\t%0, %0"; case 6: if (TARGET_PARTIAL_REG_DEPENDENCY) return "movapd\t{%1, %0|%0, %1}"; --- 2367,2376 ---- return "#"; case 5: ! if (TARGET_ATHLON) ! return "xorpd\t%0, %0"; ! else ! return "pxor\t%0, %0"; case 6: if (TARGET_PARTIAL_REG_DEPENDENCY) return "movapd\t{%1, %0|%0, %1}"; *************** *** 3013,3019 **** abort(); } } ! [(set_attr "type" "fmov,fmov,fmov,multi,multi,sse,sse,sse,sse") (set_attr "mode" "DF,DF,DF,SI,SI,TI,DF,DF,DF")]) (define_split --- 2384,2390 ---- abort(); } } ! [(set_attr "type" "fmov,fmov,fmov,multi,multi,ssemov,ssemov,ssemov,ssemov") (set_attr "mode" "DF,DF,DF,SI,SI,TI,DF,DF,DF")]) (define_split *************** *** 3187,3214 **** && (GET_MODE (operands[0]) == XFmode || GET_MODE (operands[0]) == TFmode || GET_MODE (operands[0]) == DFmode) ! && (!REG_P (operands[1]) || !ANY_FP_REGNO_P (REGNO (operands[1])))" [(const_int 0)] "ix86_split_long_move (operands); DONE;") (define_split [(set (match_operand:XF 0 "push_operand" "") ! (match_operand:XF 1 "register_operand" ""))] ! "!TARGET_64BIT && ANY_FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -12))) (set (mem:XF (reg:SI 7)) (match_dup 1))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (match_operand:TF 1 "register_operand" ""))] ! "!TARGET_64BIT && ANY_FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TF (reg:SI 7)) (match_dup 1))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (match_operand:TF 1 "register_operand" ""))] ! "TARGET_64BIT && ANY_FP_REGNO_P (REGNO (operands[1]))" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -16))) (set (mem:TF (reg:DI 7)) (match_dup 1))]) --- 2558,2585 ---- && (GET_MODE (operands[0]) == XFmode || GET_MODE (operands[0]) == TFmode || GET_MODE (operands[0]) == DFmode) ! && !ANY_FP_REG_P (operands[1])" [(const_int 0)] "ix86_split_long_move (operands); DONE;") (define_split [(set (match_operand:XF 0 "push_operand" "") ! (match_operand:XF 1 "any_fp_register_operand" ""))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -12))) (set (mem:XF (reg:SI 7)) (match_dup 1))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (match_operand:TF 1 "any_fp_register_operand" ""))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TF (reg:SI 7)) (match_dup 1))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (match_operand:TF 1 "any_fp_register_operand" ""))] ! "TARGET_64BIT" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -16))) (set (mem:TF (reg:DI 7)) (match_dup 1))]) *************** *** 3960,3974 **** (define_split [(set (match_operand:DF 0 "push_operand" "") ! (float_extend:DF (match_operand:SF 1 "register_operand" "")))] ! "!TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -8))) (set (mem:DF (reg:SI 7)) (float_extend:DF (match_dup 1)))]) (define_split [(set (match_operand:DF 0 "push_operand" "") ! (float_extend:DF (match_operand:SF 1 "register_operand" "")))] ! "TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -8))) (set (mem:DF (reg:DI 7)) (float_extend:DF (match_dup 1)))]) --- 3331,3345 ---- (define_split [(set (match_operand:DF 0 "push_operand" "") ! (float_extend:DF (match_operand:SF 1 "fp_register_operand" "")))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -8))) (set (mem:DF (reg:SI 7)) (float_extend:DF (match_dup 1)))]) (define_split [(set (match_operand:DF 0 "push_operand" "") ! (float_extend:DF (match_operand:SF 1 "fp_register_operand" "")))] ! "TARGET_64BIT" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -8))) (set (mem:DF (reg:DI 7)) (float_extend:DF (match_dup 1)))]) *************** *** 3980,3987 **** (define_split [(set (match_operand:XF 0 "push_operand" "") ! (float_extend:XF (match_operand:SF 1 "register_operand" "")))] ! "!TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -12))) (set (mem:XF (reg:SI 7)) (float_extend:XF (match_dup 1)))]) --- 3351,3358 ---- (define_split [(set (match_operand:XF 0 "push_operand" "") ! (float_extend:XF (match_operand:SF 1 "fp_register_operand" "")))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -12))) (set (mem:XF (reg:SI 7)) (float_extend:XF (match_dup 1)))]) *************** *** 3993,4007 **** (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:SF 1 "register_operand" "")))] ! "!TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TF (reg:SI 7)) (float_extend:TF (match_dup 1)))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:SF 1 "register_operand" "")))] ! "TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -16))) (set (mem:DF (reg:DI 7)) (float_extend:TF (match_dup 1)))]) --- 3364,3378 ---- (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:SF 1 "fp_register_operand" "")))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TF (reg:SI 7)) (float_extend:TF (match_dup 1)))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:SF 1 "fp_register_operand" "")))] ! "TARGET_64BIT" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -16))) (set (mem:DF (reg:DI 7)) (float_extend:TF (match_dup 1)))]) *************** *** 4013,4020 **** (define_split [(set (match_operand:XF 0 "push_operand" "") ! (float_extend:XF (match_operand:DF 1 "register_operand" "")))] ! "!TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -12))) (set (mem:DF (reg:SI 7)) (float_extend:XF (match_dup 1)))]) --- 3384,3391 ---- (define_split [(set (match_operand:XF 0 "push_operand" "") ! (float_extend:XF (match_operand:DF 1 "fp_register_operand" "")))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -12))) (set (mem:DF (reg:SI 7)) (float_extend:XF (match_dup 1)))]) *************** *** 4026,4048 **** (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:DF 1 "register_operand" "")))] ! "!TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TF (reg:SI 7)) (float_extend:XF (match_dup 1)))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:DF 1 "register_operand" "")))] ! "TARGET_64BIT && FP_REGNO_P (REGNO (operands[1]))" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -16))) (set (mem:TF (reg:DI 7)) (float_extend:TF (match_dup 1)))]) (define_expand "extendsfdf2" [(set (match_operand:DF 0 "nonimmediate_operand" "") ! (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "")))] "TARGET_80387 || TARGET_SSE2" { if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (SFmode, operands[1]); }) --- 3397,3423 ---- (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:DF 1 "fp_register_operand" "")))] ! "!TARGET_64BIT" [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TF (reg:SI 7)) (float_extend:XF (match_dup 1)))]) (define_split [(set (match_operand:TF 0 "push_operand" "") ! (float_extend:TF (match_operand:DF 1 "fp_register_operand" "")))] ! "TARGET_64BIT" [(set (reg:DI 7) (plus:DI (reg:DI 7) (const_int -16))) (set (mem:TF (reg:DI 7)) (float_extend:TF (match_dup 1)))]) (define_expand "extendsfdf2" [(set (match_operand:DF 0 "nonimmediate_operand" "") ! (float_extend:DF (match_operand:SF 1 "general_operand" "")))] "TARGET_80387 || TARGET_SSE2" { + /* ??? Needed for compress_float_constant since all fp constants + are LEGITIMATE_CONSTANT_P. */ + if (GET_CODE (operands[1]) == CONST_DOUBLE) + operands[1] = validize_mem (force_const_mem (SFmode, operands[1])); if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (SFmode, operands[1]); }) *************** *** 4077,4083 **** abort (); } } ! [(set_attr "type" "fmov,fmov,sse") (set_attr "mode" "SF,XF,DF")]) (define_insn "*extendsfdf2_1_sse_only" --- 3452,3458 ---- abort (); } } ! [(set_attr "type" "fmov,fmov,ssecvt") (set_attr "mode" "SF,XF,DF")]) (define_insn "*extendsfdf2_1_sse_only" *************** *** 4086,4099 **** "!TARGET_80387 && TARGET_SSE2 && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "cvtss2sd\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") (set_attr "mode" "DF")]) (define_expand "extendsfxf2" [(set (match_operand:XF 0 "nonimmediate_operand" "") ! (float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "")))] "!TARGET_64BIT && TARGET_80387" { if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (SFmode, operands[1]); }) --- 3461,3478 ---- "!TARGET_80387 && TARGET_SSE2 && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "cvtss2sd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") (set_attr "mode" "DF")]) (define_expand "extendsfxf2" [(set (match_operand:XF 0 "nonimmediate_operand" "") ! (float_extend:XF (match_operand:SF 1 "general_operand" "")))] "!TARGET_64BIT && TARGET_80387" { + /* ??? Needed for compress_float_constant since all fp constants + are LEGITIMATE_CONSTANT_P. */ + if (GET_CODE (operands[1]) == CONST_DOUBLE) + operands[1] = validize_mem (force_const_mem (SFmode, operands[1])); if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (SFmode, operands[1]); }) *************** *** 4132,4140 **** (define_expand "extendsftf2" [(set (match_operand:TF 0 "nonimmediate_operand" "") ! (float_extend:TF (match_operand:SF 1 "nonimmediate_operand" "")))] "TARGET_80387" { if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (SFmode, operands[1]); }) --- 3511,3523 ---- (define_expand "extendsftf2" [(set (match_operand:TF 0 "nonimmediate_operand" "") ! (float_extend:TF (match_operand:SF 1 "general_operand" "")))] "TARGET_80387" { + /* ??? Needed for compress_float_constant since all fp constants + are LEGITIMATE_CONSTANT_P. */ + if (GET_CODE (operands[1]) == CONST_DOUBLE) + operands[1] = validize_mem (force_const_mem (SFmode, operands[1])); if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (SFmode, operands[1]); }) *************** *** 4173,4181 **** (define_expand "extenddfxf2" [(set (match_operand:XF 0 "nonimmediate_operand" "") ! (float_extend:XF (match_operand:DF 1 "nonimmediate_operand" "")))] "!TARGET_64BIT && TARGET_80387" { if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (DFmode, operands[1]); }) --- 3556,3568 ---- (define_expand "extenddfxf2" [(set (match_operand:XF 0 "nonimmediate_operand" "") ! (float_extend:XF (match_operand:DF 1 "general_operand" "")))] "!TARGET_64BIT && TARGET_80387" { + /* ??? Needed for compress_float_constant since all fp constants + are LEGITIMATE_CONSTANT_P. */ + if (GET_CODE (operands[1]) == CONST_DOUBLE) + operands[1] = validize_mem (force_const_mem (DFmode, operands[1])); if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (DFmode, operands[1]); }) *************** *** 4214,4222 **** (define_expand "extenddftf2" [(set (match_operand:TF 0 "nonimmediate_operand" "") ! (float_extend:TF (match_operand:DF 1 "nonimmediate_operand" "")))] "TARGET_80387" { if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (DFmode, operands[1]); }) --- 3601,3613 ---- (define_expand "extenddftf2" [(set (match_operand:TF 0 "nonimmediate_operand" "") ! (float_extend:TF (match_operand:DF 1 "general_operand" "")))] "TARGET_80387" { + /* ??? Needed for compress_float_constant since all fp constants + are LEGITIMATE_CONSTANT_P. */ + if (GET_CODE (operands[1]) == CONST_DOUBLE) + operands[1] = validize_mem (force_const_mem (DFmode, operands[1])); if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) operands[1] = force_reg (DFmode, operands[1]); }) *************** *** 4316,4322 **** abort (); } } ! [(set_attr "type" "fmov,multi,multi,multi,sse") (set_attr "mode" "SF,SF,SF,SF,DF")]) (define_insn "*truncdfsf2_2" --- 3707,3713 ---- abort (); } } ! [(set_attr "type" "fmov,multi,multi,multi,ssecvt") (set_attr "mode" "SF,SF,SF,SF,DF")]) (define_insn "*truncdfsf2_2" *************** *** 4339,4345 **** abort (); } } ! [(set_attr "type" "sse,fmov") (set_attr "mode" "DF,SF")]) (define_insn "truncdfsf2_3" --- 3730,3736 ---- abort (); } } ! [(set_attr "type" "ssecvt,fmov") (set_attr "mode" "DF,SF")]) (define_insn "truncdfsf2_3" *************** *** 4362,4368 **** (match_operand:DF 1 "nonimmediate_operand" "mY")))] "!TARGET_80387 && TARGET_SSE2" "cvtsd2ss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") (set_attr "mode" "DF")]) (define_split --- 3753,3759 ---- (match_operand:DF 1 "nonimmediate_operand" "mY")))] "!TARGET_80387 && TARGET_SSE2" "cvtsd2ss\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") (set_attr "mode" "DF")]) (define_split *************** *** 4387,4396 **** (define_split [(set (match_operand:SF 0 "register_operand" "") (float_truncate:SF ! (match_operand:DF 1 "register_operand" ""))) (clobber (match_operand:SF 2 "memory_operand" ""))] ! "TARGET_80387 && reload_completed ! && FP_REG_P (operands[1])" [(set (match_dup 2) (float_truncate:SF (match_dup 1))) (set (match_dup 0) (match_dup 2))] "") --- 3778,3786 ---- (define_split [(set (match_operand:SF 0 "register_operand" "") (float_truncate:SF ! (match_operand:DF 1 "fp_register_operand" ""))) (clobber (match_operand:SF 2 "memory_operand" ""))] ! "TARGET_80387 && reload_completed" [(set (match_dup 2) (float_truncate:SF (match_dup 1))) (set (match_dup 0) (match_dup 2))] "") *************** *** 4779,4792 **** (fix:DI (match_operand:SF 1 "nonimmediate_operand" "xm")))] "TARGET_64BIT && TARGET_SSE" "cvttss2si{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "fix_truncdfdi_sse" [(set (match_operand:DI 0 "register_operand" "=r") (fix:DI (match_operand:DF 1 "nonimmediate_operand" "Ym")))] "TARGET_64BIT && TARGET_SSE2" "cvttsd2si{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) ;; Signed conversion to SImode. --- 4169,4182 ---- (fix:DI (match_operand:SF 1 "nonimmediate_operand" "xm")))] "TARGET_64BIT && TARGET_SSE" "cvttss2si{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt")]) (define_insn "fix_truncdfdi_sse" [(set (match_operand:DI 0 "register_operand" "=r") (fix:DI (match_operand:DF 1 "nonimmediate_operand" "Ym")))] "TARGET_64BIT && TARGET_SSE2" "cvttsd2si{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt")]) ;; Signed conversion to SImode. *************** *** 4887,4900 **** (fix:SI (match_operand:SF 1 "nonimmediate_operand" "xm")))] "TARGET_SSE" "cvttss2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "fix_truncdfsi_sse" [(set (match_operand:SI 0 "register_operand" "=r") (fix:SI (match_operand:DF 1 "nonimmediate_operand" "Ym")))] "TARGET_SSE2" "cvttsd2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_split [(set (match_operand:SI 0 "register_operand" "") --- 4277,4290 ---- (fix:SI (match_operand:SF 1 "nonimmediate_operand" "xm")))] "TARGET_SSE" "cvttss2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt")]) (define_insn "fix_truncdfsi_sse" [(set (match_operand:SI 0 "register_operand" "=r") (fix:SI (match_operand:DF 1 "nonimmediate_operand" "Ym")))] "TARGET_SSE2" "cvttsd2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt")]) (define_split [(set (match_operand:SI 0 "register_operand" "") *************** *** 5025,5046 **** ;; %% Not used yet. (define_insn "x86_fnstcw_1" [(set (match_operand:HI 0 "memory_operand" "=m") ! (unspec:HI [(reg:HI 18)] 11))] "TARGET_80387" "fnstcw\t%0" [(set_attr "length" "2") (set_attr "mode" "HI") ! (set_attr "i387" "1") (set_attr "ppro_uops" "few")]) (define_insn "x86_fldcw_1" [(set (reg:HI 18) ! (unspec:HI [(match_operand:HI 0 "memory_operand" "m")] 12))] "TARGET_80387" "fldcw\t%0" [(set_attr "length" "2") (set_attr "mode" "HI") ! (set_attr "i387" "1") (set_attr "athlon_decode" "vector") (set_attr "ppro_uops" "few")]) --- 4415,4436 ---- ;; %% Not used yet. (define_insn "x86_fnstcw_1" [(set (match_operand:HI 0 "memory_operand" "=m") ! (unspec:HI [(reg:HI 18)] UNSPEC_FSTCW))] "TARGET_80387" "fnstcw\t%0" [(set_attr "length" "2") (set_attr "mode" "HI") ! (set_attr "unit" "i387") (set_attr "ppro_uops" "few")]) (define_insn "x86_fldcw_1" [(set (reg:HI 18) ! (unspec:HI [(match_operand:HI 0 "memory_operand" "m")] UNSPEC_FLDCW))] "TARGET_80387" "fldcw\t%0" [(set_attr "length" "2") (set_attr "mode" "HI") ! (set_attr "unit" "i387") (set_attr "athlon_decode" "vector") (set_attr "ppro_uops" "few")]) *************** *** 5074,5080 **** fild%z1\t%1 # cvtsi2ss\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,sse") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) --- 4464,4470 ---- fild%z1\t%1 # cvtsi2ss\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,ssecvt") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) *************** *** 5083,5089 **** (float:SF (match_operand:SI 1 "nonimmediate_operand" "mr")))] "TARGET_SSE" "cvtsi2ss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) --- 4473,4479 ---- (float:SF (match_operand:SI 1 "nonimmediate_operand" "mr")))] "TARGET_SSE" "cvtsi2ss\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) *************** *** 5112,5118 **** fild%z1\t%1 # cvtsi2ss{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,sse") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) --- 4502,4508 ---- fild%z1\t%1 # cvtsi2ss{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,ssecvt") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) *************** *** 5121,5127 **** (float:SF (match_operand:DI 1 "nonimmediate_operand" "mr")))] "TARGET_64BIT && TARGET_SSE" "cvtsi2ss{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) --- 4511,4517 ---- (float:SF (match_operand:DI 1 "nonimmediate_operand" "mr")))] "TARGET_64BIT && TARGET_SSE" "cvtsi2ss{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") (set_attr "mode" "SF") (set_attr "fp_int_src" "true")]) *************** *** 5150,5156 **** fild%z1\t%1 # cvtsi2sd\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,sse") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) --- 4540,4546 ---- fild%z1\t%1 # cvtsi2sd\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,ssecvt") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) *************** *** 5159,5165 **** (float:DF (match_operand:SI 1 "nonimmediate_operand" "mr")))] "TARGET_SSE2" "cvtsi2sd\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) --- 4549,4555 ---- (float:DF (match_operand:SI 1 "nonimmediate_operand" "mr")))] "TARGET_SSE2" "cvtsi2sd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) *************** *** 5188,5194 **** fild%z1\t%1 # cvtsi2sd{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,sse") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) --- 4578,4584 ---- fild%z1\t%1 # cvtsi2sd{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "fmov,multi,ssecvt") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) *************** *** 5197,5203 **** (float:DF (match_operand:DI 1 "nonimmediate_operand" "mr")))] "TARGET_SSE2" "cvtsi2sd{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) --- 4587,4593 ---- (float:DF (match_operand:DI 1 "nonimmediate_operand" "mr")))] "TARGET_SSE2" "cvtsi2sd{q}\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") (set_attr "mode" "DF") (set_attr "fp_int_src" "true")]) *************** *** 5269,5278 **** ;; %%% Kill these when reload knows how to do it. (define_split ! [(set (match_operand 0 "register_operand" "") (float (match_operand 1 "register_operand" "")))] ! "reload_completed && FLOAT_MODE_P (GET_MODE (operands[0])) ! && FP_REG_P (operands[0])" [(const_int 0)] { operands[2] = ix86_force_to_memory (GET_MODE (operands[1]), operands[1]); --- 4659,4667 ---- ;; %%% Kill these when reload knows how to do it. (define_split ! [(set (match_operand 0 "fp_register_operand" "") (float (match_operand 1 "register_operand" "")))] ! "reload_completed && FLOAT_MODE_P (GET_MODE (operands[0]))" [(const_int 0)] { operands[2] = ix86_force_to_memory (GET_MODE (operands[1]), operands[1]); *************** *** 5311,5317 **** (match_operand:DI 2 "general_operand" ""))) (clobber (reg:CC 17))] "!TARGET_64BIT && reload_completed" ! [(parallel [(set (reg:CC 17) (unspec:CC [(match_dup 1) (match_dup 2)] 12)) (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 2)))]) (parallel [(set (match_dup 3) (plus:SI (plus:SI (ltu:SI (reg:CC 17) (const_int 0)) --- 4700,4707 ---- (match_operand:DI 2 "general_operand" ""))) (clobber (reg:CC 17))] "!TARGET_64BIT && reload_completed" ! [(parallel [(set (reg:CC 17) (unspec:CC [(match_dup 1) (match_dup 2)] ! UNSPEC_ADD_CARRY)) (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 2)))]) (parallel [(set (match_dup 3) (plus:SI (plus:SI (ltu:SI (reg:CC 17) (const_int 0)) *************** *** 5336,5343 **** (set_attr "ppro_uops" "few")]) (define_insn "*adddi3_cc_rex64" ! [(set (reg:CC 17) (unspec:CC [(match_operand:DI 1 "nonimmediate_operand" "%0,0") ! (match_operand:DI 2 "x86_64_general_operand" "re,rm")] 12)) (set (match_operand:DI 0 "nonimmediate_operand" "=rm,r") (plus:DI (match_dup 1) (match_dup 2)))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, DImode, operands)" --- 4726,4735 ---- (set_attr "ppro_uops" "few")]) (define_insn "*adddi3_cc_rex64" ! [(set (reg:CC 17) ! (unspec:CC [(match_operand:DI 1 "nonimmediate_operand" "%0,0") ! (match_operand:DI 2 "x86_64_general_operand" "re,rm")] ! UNSPEC_ADD_CARRY)) (set (match_operand:DI 0 "nonimmediate_operand" "=rm,r") (plus:DI (match_dup 1) (match_dup 2)))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, DImode, operands)" *************** *** 5373,5380 **** (set_attr "ppro_uops" "few")]) (define_insn "*addsi3_cc" ! [(set (reg:CC 17) (unspec:CC [(match_operand:SI 1 "nonimmediate_operand" "%0,0") ! (match_operand:SI 2 "general_operand" "ri,rm")] 12)) (set (match_operand:SI 0 "nonimmediate_operand" "=rm,r") (plus:SI (match_dup 1) (match_dup 2)))] "ix86_binary_operator_ok (PLUS, SImode, operands)" --- 4765,4774 ---- (set_attr "ppro_uops" "few")]) (define_insn "*addsi3_cc" ! [(set (reg:CC 17) ! (unspec:CC [(match_operand:SI 1 "nonimmediate_operand" "%0,0") ! (match_operand:SI 2 "general_operand" "ri,rm")] ! UNSPEC_ADD_CARRY)) (set (match_operand:SI 0 "nonimmediate_operand" "=rm,r") (plus:SI (match_dup 1) (match_dup 2)))] "ix86_binary_operator_ok (PLUS, SImode, operands)" *************** *** 5383,5390 **** (set_attr "mode" "SI")]) (define_insn "addqi3_cc" ! [(set (reg:CC 17) (unspec:CC [(match_operand:QI 1 "nonimmediate_operand" "%0,0") ! (match_operand:QI 2 "general_operand" "qi,qm")] 12)) (set (match_operand:QI 0 "nonimmediate_operand" "=qm,q") (plus:QI (match_dup 1) (match_dup 2)))] "ix86_binary_operator_ok (PLUS, QImode, operands)" --- 4777,4786 ---- (set_attr "mode" "SI")]) (define_insn "addqi3_cc" ! [(set (reg:CC 17) ! (unspec:CC [(match_operand:QI 1 "nonimmediate_operand" "%0,0") ! (match_operand:QI 2 "general_operand" "qi,qm")] ! UNSPEC_ADD_CARRY)) (set (match_operand:QI 0 "nonimmediate_operand" "=qm,q") (plus:QI (match_dup 1) (match_dup 2)))] "ix86_binary_operator_ok (PLUS, QImode, operands)" *************** *** 5437,5443 **** (define_insn_and_split "*lea_general_1" [(set (match_operand 0 "register_operand" "=r") ! (plus (plus (match_operand 1 "register_operand" "r") (match_operand 2 "register_operand" "r")) (match_operand 3 "immediate_operand" "i")))] "(GET_MODE (operands[0]) == QImode || GET_MODE (operands[0]) == HImode --- 4833,4839 ---- (define_insn_and_split "*lea_general_1" [(set (match_operand 0 "register_operand" "=r") ! (plus (plus (match_operand 1 "index_register_operand" "r") (match_operand 2 "register_operand" "r")) (match_operand 3 "immediate_operand" "i")))] "(GET_MODE (operands[0]) == QImode || GET_MODE (operands[0]) == HImode *************** *** 5469,5475 **** (define_insn_and_split "*lea_general_1_zext" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI ! (plus:SI (plus:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "immediate_operand" "i"))))] "TARGET_64BIT" --- 4865,4871 ---- (define_insn_and_split "*lea_general_1_zext" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI ! (plus:SI (plus:SI (match_operand:SI 1 "index_register_operand" "r") (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "immediate_operand" "i"))))] "TARGET_64BIT" *************** *** 5489,5495 **** (define_insn_and_split "*lea_general_2" [(set (match_operand 0 "register_operand" "=r") ! (plus (mult (match_operand 1 "register_operand" "r") (match_operand 2 "const248_operand" "i")) (match_operand 3 "nonmemory_operand" "ri")))] "(GET_MODE (operands[0]) == QImode || GET_MODE (operands[0]) == HImode --- 4885,4891 ---- (define_insn_and_split "*lea_general_2" [(set (match_operand 0 "register_operand" "=r") ! (plus (mult (match_operand 1 "index_register_operand" "r") (match_operand 2 "const248_operand" "i")) (match_operand 3 "nonmemory_operand" "ri")))] "(GET_MODE (operands[0]) == QImode || GET_MODE (operands[0]) == HImode *************** *** 5519,5525 **** (define_insn_and_split "*lea_general_2_zext" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI ! (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "const248_operand" "n")) (match_operand:SI 3 "nonmemory_operand" "ri"))))] "TARGET_64BIT" --- 4915,4921 ---- (define_insn_and_split "*lea_general_2_zext" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI ! (plus:SI (mult:SI (match_operand:SI 1 "index_register_operand" "r") (match_operand:SI 2 "const248_operand" "n")) (match_operand:SI 3 "nonmemory_operand" "ri"))))] "TARGET_64BIT" *************** *** 5538,5544 **** (define_insn_and_split "*lea_general_3" [(set (match_operand 0 "register_operand" "=r") ! (plus (plus (mult (match_operand 1 "register_operand" "r") (match_operand 2 "const248_operand" "i")) (match_operand 3 "register_operand" "r")) (match_operand 4 "immediate_operand" "i")))] --- 4934,4940 ---- (define_insn_and_split "*lea_general_3" [(set (match_operand 0 "register_operand" "=r") ! (plus (plus (mult (match_operand 1 "index_register_operand" "r") (match_operand 2 "const248_operand" "i")) (match_operand 3 "register_operand" "r")) (match_operand 4 "immediate_operand" "i")))] *************** *** 5572,5578 **** (define_insn_and_split "*lea_general_3_zext" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI ! (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "const248_operand" "n")) (match_operand:SI 3 "register_operand" "r")) (match_operand:SI 4 "immediate_operand" "i"))))] --- 4968,4974 ---- (define_insn_and_split "*lea_general_3_zext" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI ! (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "index_register_operand" "r") (match_operand:SI 2 "const248_operand" "n")) (match_operand:SI 3 "register_operand" "r")) (match_operand:SI 4 "immediate_operand" "i"))))] *************** *** 6309,6317 **** case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 65535)) return "dec{w}\t%0"; abort(); --- 5705,5711 ---- case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx) return "dec{w}\t%0"; abort(); *************** *** 6350,6358 **** case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 65535)) return "dec{w}\t%0"; abort(); --- 5744,5750 ---- case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx) return "dec{w}\t%0"; abort(); *************** *** 6392,6400 **** case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 65535)) return "dec{w}\t%0"; abort(); --- 5784,5790 ---- case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx) return "dec{w}\t%0"; abort(); *************** *** 6431,6439 **** case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 65535)) return "dec{w}\t%0"; abort(); --- 5821,5827 ---- case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx) return "dec{w}\t%0"; abort(); *************** *** 6469,6477 **** switch (get_attr_type (insn)) { case TYPE_INCDEC: ! if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 65535)) return "inc{w}\t%0"; else if (operands[2] == const1_rtx) return "dec{w}\t%0"; --- 5857,5863 ---- switch (get_attr_type (insn)) { case TYPE_INCDEC: ! if (operands[2] == constm1_rtx) return "inc{w}\t%0"; else if (operands[2] == const1_rtx) return "dec{w}\t%0"; *************** *** 6513,6521 **** case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 65535)) return "dec{w}\t%0"; abort(); --- 5899,5905 ---- case TYPE_INCDEC: if (operands[2] == const1_rtx) return "inc{w}\t%0"; ! else if (operands[2] == constm1_rtx) return "dec{w}\t%0"; abort(); *************** *** 6564,6572 **** case TYPE_INCDEC: if (operands[2] == const1_rtx) return widen ? "inc{l}\t%k0" : "inc{b}\t%0"; ! else if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 255)) return widen ? "dec{l}\t%k0" : "dec{b}\t%0"; abort(); --- 5948,5954 ---- case TYPE_INCDEC: if (operands[2] == const1_rtx) return widen ? "inc{l}\t%k0" : "inc{b}\t%0"; ! else if (operands[2] == constm1_rtx) return widen ? "dec{l}\t%k0" : "dec{b}\t%0"; abort(); *************** *** 6612,6620 **** case TYPE_INCDEC: if (operands[2] == const1_rtx) return widen ? "inc{l}\t%k0" : "inc{b}\t%0"; ! else if (operands[2] == constm1_rtx ! || (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 255)) return widen ? "dec{l}\t%k0" : "dec{b}\t%0"; abort(); --- 5994,6000 ---- case TYPE_INCDEC: if (operands[2] == const1_rtx) return widen ? "inc{l}\t%k0" : "inc{b}\t%0"; ! else if (operands[2] == constm1_rtx) return widen ? "dec{l}\t%k0" : "dec{b}\t%0"; abort(); *************** *** 6644,6649 **** --- 6024,6063 ---- (const_string "alu"))) (set_attr "mode" "QI,QI,SI")]) + (define_insn "*addqi_1_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,q")) + (plus:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "qn,qnm"))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + { + switch (get_attr_type (insn)) + { + case TYPE_INCDEC: + if (operands[1] == const1_rtx) + return "inc{b}\t%0"; + else if (operands[1] == constm1_rtx) + return "dec{b}\t%0"; + abort(); + + default: + /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'. */ + if (GET_CODE (operands[1]) == CONST_INT + && INTVAL (operands[1]) < 0) + { + operands[2] = GEN_INT (-INTVAL (operands[2])); + return "sub{b}\t{%1, %0|%0, %1}"; + } + return "add{b}\t{%1, %0|%0, %1}"; + } + } + [(set (attr "type") + (if_then_else (match_operand:QI 2 "incdec_operand" "") + (const_string "incdec") + (const_string "alu1"))) + (set_attr "mode" "QI")]) + (define_insn "*addqi_2" [(set (reg 17) (compare *************** *** 7175,7180 **** --- 6589,6605 ---- [(set_attr "type" "alu") (set_attr "mode" "QI")]) + (define_insn "*subqi_1_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,q")) + (minus:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "qn,qmn"))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "sub{b}\t{%1, %0|%0, %1}" + [(set_attr "type" "alu1") + (set_attr "mode" "QI")]) + (define_insn "*subqi_2" [(set (reg 17) (compare *************** *** 7813,7819 **** (use (match_dup 3)) (clobber (reg:CC 17))])] { ! /* Avoid use of cltd in favour of a mov+shift. */ if (!TARGET_USE_CLTD && !optimize_size) { if (true_regnum (operands[1])) --- 7238,7244 ---- (use (match_dup 3)) (clobber (reg:CC 17))])] { ! /* Avoid use of cltd in favor of a mov+shift. */ if (!TARGET_USE_CLTD && !optimize_size) { if (true_regnum (operands[1])) *************** *** 7898,7904 **** (use (match_dup 3)) (clobber (reg:CC 17))])] { ! /* Avoid use of cltd in favour of a mov+shift. */ if (!TARGET_USE_CLTD && !optimize_size) { if (true_regnum (operands[1])) --- 7323,7329 ---- (use (match_dup 3)) (clobber (reg:CC 17))])] { ! /* Avoid use of cltd in favor of a mov+shift. */ if (!TARGET_USE_CLTD && !optimize_size) { if (true_regnum (operands[1])) *************** *** 8171,8178 **** (const_int 8)) (match_operand 1 "const_int_operand" "n")) (const_int 0)))] ! "(unsigned HOST_WIDE_INT) INTVAL (operands[1]) <= 0xff ! && ix86_match_ccmode (insn, CCNOmode)" "test{b}\t{%1, %h0|%h0, %1}" [(set_attr "type" "test") (set_attr "mode" "QI") --- 7596,7602 ---- (const_int 8)) (match_operand 1 "const_int_operand" "n")) (const_int 0)))] ! "ix86_match_ccmode (insn, CCNOmode)" "test{b}\t{%1, %h0|%h0, %1}" [(set_attr "type" "test") (set_attr "mode" "QI") *************** *** 8310,8319 **** mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1; mask &= ~(((HOST_WIDE_INT)1 << pos) - 1); ! operands[3] = gen_rtx_AND (mode, operands[0], ! GEN_INT (trunc_int_for_mode (mask, mode))); }) ;; %%% This used to optimize known byte-wide and operations to memory, ;; and sometimes to QImode registers. If this is considered useful, ;; it should be done with splitters. --- 7734,7790 ---- mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1; mask &= ~(((HOST_WIDE_INT)1 << pos) - 1); ! operands[3] = gen_rtx_AND (mode, operands[0], gen_int_mode (mask, mode)); }) + ;; Convert HImode/SImode test instructions with immediate to QImode ones. + ;; i386 does not allow to encode test with 8bit sign extended immediate, so + ;; this is relatively important trick. + ;; Do the converison only post-reload to avoid limiting of the register class + ;; to QI regs. + (define_split + [(set (reg 17) + (compare + (and (match_operand 0 "register_operand" "") + (match_operand 1 "const_int_operand" "")) + (const_int 0)))] + "reload_completed + && QI_REG_P (operands[0]) + && ((ix86_match_ccmode (insn, CCZmode) + && !(INTVAL (operands[1]) & ~(255 << 8))) + || (ix86_match_ccmode (insn, CCNOmode) + && !(INTVAL (operands[1]) & ~(127 << 8)))) + && GET_MODE (operands[0]) != QImode" + [(set (reg:CCNO 17) + (compare:CCNO + (and:SI (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8)) + (match_dup 1)) + (const_int 0)))] + "operands[0] = gen_lowpart (SImode, operands[0]); + operands[1] = gen_int_mode (INTVAL (operands[1]) >> 8, SImode);") + + (define_split + [(set (reg 17) + (compare + (and (match_operand 0 "nonimmediate_operand" "") + (match_operand 1 "const_int_operand" "")) + (const_int 0)))] + "reload_completed + && (!REG_P (operands[0]) || ANY_QI_REG_P (operands[0])) + && ((ix86_match_ccmode (insn, CCZmode) + && !(INTVAL (operands[1]) & ~255)) + || (ix86_match_ccmode (insn, CCNOmode) + && !(INTVAL (operands[1]) & ~127))) + && GET_MODE (operands[0]) != QImode" + [(set (reg:CCNO 17) + (compare:CCNO + (and:QI (match_dup 0) + (match_dup 1)) + (const_int 0)))] + "operands[0] = gen_lowpart (QImode, operands[0]); + operands[1] = gen_lowpart (QImode, operands[1]);") + + ;; %%% This used to optimize known byte-wide and operations to memory, ;; and sometimes to QImode registers. If this is considered useful, ;; it should be done with splitters. *************** *** 8436,8442 **** (and (match_dup 0) (const_int -65536))) (clobber (reg:CC 17))] ! "optimize_size" [(set (strict_low_part (match_dup 1)) (const_int 0))] "operands[1] = gen_lowpart (HImode, operands[0]);") --- 7907,7913 ---- (and (match_dup 0) (const_int -65536))) (clobber (reg:CC 17))] ! "optimize_size || (TARGET_FAST_PREFIX && !TARGET_PARTIAL_REG_STALL)" [(set (strict_low_part (match_dup 1)) (const_int 0))] "operands[1] = gen_lowpart (HImode, operands[0]);") *************** *** 8582,8588 **** (and:QI (match_dup 0) (match_operand:QI 1 "general_operand" "qi,qmi"))) (clobber (reg:CC 17))] ! "" "and{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) --- 8053,8060 ---- (and:QI (match_dup 0) (match_operand:QI 1 "general_operand" "qi,qmi"))) (clobber (reg:CC 17))] ! "(! TARGET_PARTIAL_REG_STALL || optimize_size) ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "and{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) *************** *** 8618,8624 **** (const_int 0))) (set (strict_low_part (match_dup 0)) (and:QI (match_dup 0) (match_dup 1)))] ! "ix86_match_ccmode (insn, CCNOmode)" "and{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) --- 8090,8098 ---- (const_int 0))) (set (strict_low_part (match_dup 0)) (and:QI (match_dup 0) (match_dup 1)))] ! "(! TARGET_PARTIAL_REG_STALL || optimize_size) ! && ix86_match_ccmode (insn, CCNOmode) ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "and{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) *************** *** 8638,8644 **** (const_int 8)) (match_operand 2 "const_int_operand" "n"))) (clobber (reg:CC 17))] ! "(unsigned HOST_WIDE_INT)INTVAL (operands[2]) <= 0xff" "and{b}\t{%2, %h0|%h0, %2}" [(set_attr "type" "alu") (set_attr "length_immediate" "1") --- 8112,8118 ---- (const_int 8)) (match_operand 2 "const_int_operand" "n"))) (clobber (reg:CC 17))] ! "" "and{b}\t{%2, %h0|%h0, %2}" [(set_attr "type" "alu") (set_attr "length_immediate" "1") *************** *** 8666,8673 **** (const_int 8) (const_int 8)) (match_dup 2)))] ! "ix86_match_ccmode (insn, CCNOmode) ! && (unsigned HOST_WIDE_INT)INTVAL (operands[2]) <= 0xff" "and{b}\t{%2, %h0|%h0, %2}" [(set_attr "type" "alu") (set_attr "length_immediate" "1") --- 8140,8146 ---- (const_int 8) (const_int 8)) (match_dup 2)))] ! "ix86_match_ccmode (insn, CCNOmode)" "and{b}\t{%2, %h0|%h0, %2}" [(set_attr "type" "alu") (set_attr "length_immediate" "1") *************** *** 8728,8733 **** --- 8201,8251 ---- [(set_attr "type" "alu") (set_attr "length_immediate" "0") (set_attr "mode" "QI")]) + + ;; Convert wide AND instructions with immediate operand to shorter QImode + ;; equivalents when possible. + ;; Don't do the splitting with memory operands, since it intoduces risc + ;; of memory mismatch stalls. We may want to do the splitting for optimizing + ;; for size, but that can (should?) be handled by generic code instead. + (define_split + [(set (match_operand 0 "register_operand" "") + (and (match_operand 1 "register_operand" "") + (match_operand 2 "const_int_operand" ""))) + (clobber (reg:CC 17))] + "reload_completed + && QI_REG_P (operands[0]) + && (!TARGET_PARTIAL_REG_STALL || optimize_size) + && !(~INTVAL (operands[2]) & ~(255 << 8)) + && GET_MODE (operands[0]) != QImode" + [(parallel [(set (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8)) + (and:SI (zero_extract:SI (match_dup 1) + (const_int 8) (const_int 8)) + (match_dup 2))) + (clobber (reg:CC 17))])] + "operands[0] = gen_lowpart (SImode, operands[0]); + operands[1] = gen_lowpart (SImode, operands[1]); + operands[2] = gen_int_mode ((INTVAL (operands[2]) >> 8) & 0xff, SImode);") + + ;; Since AND can be encoded with sign extended immediate, this is only + ;; profitable when 7th bit is not set. + (define_split + [(set (match_operand 0 "register_operand" "") + (and (match_operand 1 "general_operand" "") + (match_operand 2 "const_int_operand" ""))) + (clobber (reg:CC 17))] + "reload_completed + && ANY_QI_REG_P (operands[0]) + && (!TARGET_PARTIAL_REG_STALL || optimize_size) + && !(~INTVAL (operands[2]) & ~255) + && !(INTVAL (operands[2]) & 128) + && GET_MODE (operands[0]) != QImode" + [(parallel [(set (strict_low_part (match_dup 0)) + (and:QI (match_dup 1) + (match_dup 2))) + (clobber (reg:CC 17))])] + "operands[0] = gen_lowpart (QImode, operands[0]); + operands[1] = gen_lowpart (QImode, operands[1]); + operands[2] = gen_lowpart (QImode, operands[2]);") ;; Logical inclusive OR instructions *************** *** 8944,8950 **** (ior:QI (match_dup 0) (match_operand:QI 1 "general_operand" "qmi,qi"))) (clobber (reg:CC 17))] ! "" "or{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) --- 8462,8469 ---- (ior:QI (match_dup 0) (match_operand:QI 1 "general_operand" "qmi,qi"))) (clobber (reg:CC 17))] ! "(! TARGET_PARTIAL_REG_STALL || optimize_size) ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "or{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) *************** *** 8969,8975 **** (const_int 0))) (set (strict_low_part (match_dup 0)) (ior:QI (match_dup 0) (match_dup 1)))] ! "ix86_match_ccmode (insn, CCNOmode)" "or{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) --- 8488,8496 ---- (const_int 0))) (set (strict_low_part (match_dup 0)) (ior:QI (match_dup 0) (match_dup 1)))] ! "(! TARGET_PARTIAL_REG_STALL || optimize_size) ! && ix86_match_ccmode (insn, CCNOmode) ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "or{b}\t{%1, %0|%0, %1}" [(set_attr "type" "alu1") (set_attr "mode" "QI")]) *************** *** 8986,8991 **** --- 8507,8624 ---- [(set_attr "type" "alu") (set_attr "mode" "QI")]) + (define_insn "iorqi_ext_0" + [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") + (const_int 8) + (const_int 8)) + (ior:SI + (zero_extract:SI + (match_operand 1 "ext_register_operand" "0") + (const_int 8) + (const_int 8)) + (match_operand 2 "const_int_operand" "n"))) + (clobber (reg:CC 17))] + "(!TARGET_PARTIAL_REG_STALL || optimize_size)" + "or{b}\t{%2, %h0|%h0, %2}" + [(set_attr "type" "alu") + (set_attr "length_immediate" "1") + (set_attr "mode" "QI")]) + + (define_insn "*iorqi_ext_1" + [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") + (const_int 8) + (const_int 8)) + (ior:SI + (zero_extract:SI + (match_operand 1 "ext_register_operand" "0") + (const_int 8) + (const_int 8)) + (zero_extend:SI + (match_operand:QI 2 "general_operand" "Qm")))) + (clobber (reg:CC 17))] + "!TARGET_64BIT + && (!TARGET_PARTIAL_REG_STALL || optimize_size)" + "or{b}\t{%2, %h0|%h0, %2}" + [(set_attr "type" "alu") + (set_attr "length_immediate" "0") + (set_attr "mode" "QI")]) + + (define_insn "*iorqi_ext_1_rex64" + [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") + (const_int 8) + (const_int 8)) + (ior:SI + (zero_extract:SI + (match_operand 1 "ext_register_operand" "0") + (const_int 8) + (const_int 8)) + (zero_extend:SI + (match_operand 2 "ext_register_operand" "Q")))) + (clobber (reg:CC 17))] + "TARGET_64BIT + && (!TARGET_PARTIAL_REG_STALL || optimize_size)" + "or{b}\t{%2, %h0|%h0, %2}" + [(set_attr "type" "alu") + (set_attr "length_immediate" "0") + (set_attr "mode" "QI")]) + + (define_insn "*iorqi_ext_2" + [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") + (const_int 8) + (const_int 8)) + (ior:SI + (zero_extract:SI (match_operand 1 "ext_register_operand" "0") + (const_int 8) + (const_int 8)) + (zero_extract:SI (match_operand 2 "ext_register_operand" "Q") + (const_int 8) + (const_int 8)))) + (clobber (reg:CC 17))] + "(!TARGET_PARTIAL_REG_STALL || optimize_size)" + "ior{b}\t{%h2, %h0|%h0, %h2}" + [(set_attr "type" "alu") + (set_attr "length_immediate" "0") + (set_attr "mode" "QI")]) + + (define_split + [(set (match_operand 0 "register_operand" "") + (ior (match_operand 1 "register_operand" "") + (match_operand 2 "const_int_operand" ""))) + (clobber (reg:CC 17))] + "reload_completed + && QI_REG_P (operands[0]) + && (!TARGET_PARTIAL_REG_STALL || optimize_size) + && !(INTVAL (operands[2]) & ~(255 << 8)) + && GET_MODE (operands[0]) != QImode" + [(parallel [(set (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8)) + (ior:SI (zero_extract:SI (match_dup 1) + (const_int 8) (const_int 8)) + (match_dup 2))) + (clobber (reg:CC 17))])] + "operands[0] = gen_lowpart (SImode, operands[0]); + operands[1] = gen_lowpart (SImode, operands[1]); + operands[2] = gen_int_mode ((INTVAL (operands[2]) >> 8) & 0xff, SImode);") + + ;; Since OR can be encoded with sign extended immediate, this is only + ;; profitable when 7th bit is set. + (define_split + [(set (match_operand 0 "register_operand" "") + (ior (match_operand 1 "general_operand" "") + (match_operand 2 "const_int_operand" ""))) + (clobber (reg:CC 17))] + "reload_completed + && ANY_QI_REG_P (operands[0]) + && (!TARGET_PARTIAL_REG_STALL || optimize_size) + && !(INTVAL (operands[2]) & ~255) + && (INTVAL (operands[2]) & 128) + && GET_MODE (operands[0]) != QImode" + [(parallel [(set (strict_low_part (match_dup 0)) + (ior:QI (match_dup 1) + (match_dup 2))) + (clobber (reg:CC 17))])] + "operands[0] = gen_lowpart (QImode, operands[0]); + operands[1] = gen_lowpart (QImode, operands[1]); + operands[2] = gen_lowpart (QImode, operands[2]);") ;; Logical XOR instructions *************** *** 9201,9211 **** --- 8834,8910 ---- [(set_attr "type" "alu") (set_attr "mode" "QI,QI,SI")]) + (define_insn "*xorqi_1_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,q")) + (xor:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "qi,qmi"))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "xor{b}\t{%1, %0|%0, %1}" + [(set_attr "type" "alu1") + (set_attr "mode" "QI")]) + + (define_insn "xorqi_ext_0" + [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") + (const_int 8) + (const_int 8)) + (xor:SI + (zero_extract:SI + (match_operand 1 "ext_register_operand" "0") + (const_int 8) + (const_int 8)) + (match_operand 2 "const_int_operand" "n"))) + (clobber (reg:CC 17))] + "(!TARGET_PARTIAL_REG_STALL || optimize_size)" + "xor{b}\t{%2, %h0|%h0, %2}" + [(set_attr "type" "alu") + (set_attr "length_immediate" "1") + (set_attr "mode" "QI")]) + (define_insn "*xorqi_ext_1" [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") (const_int 8) (const_int 8)) (xor:SI + (zero_extract:SI + (match_operand 1 "ext_register_operand" "0") + (const_int 8) + (const_int 8)) + (zero_extend:SI + (match_operand:QI 2 "general_operand" "Qm")))) + (clobber (reg:CC 17))] + "!TARGET_64BIT + && (!TARGET_PARTIAL_REG_STALL || optimize_size)" + "xor{b}\t{%2, %h0|%h0, %2}" + [(set_attr "type" "alu") + (set_attr "length_immediate" "0") + (set_attr "mode" "QI")]) + + (define_insn "*xorqi_ext_1_rex64" + [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") + (const_int 8) + (const_int 8)) + (xor:SI + (zero_extract:SI + (match_operand 1 "ext_register_operand" "0") + (const_int 8) + (const_int 8)) + (zero_extend:SI + (match_operand 2 "ext_register_operand" "Q")))) + (clobber (reg:CC 17))] + "TARGET_64BIT + && (!TARGET_PARTIAL_REG_STALL || optimize_size)" + "xor{b}\t{%2, %h0|%h0, %2}" + [(set_attr "type" "alu") + (set_attr "length_immediate" "0") + (set_attr "mode" "QI")]) + + (define_insn "*xorqi_ext_2" + [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "=Q") + (const_int 8) + (const_int 8)) + (xor:SI (zero_extract:SI (match_operand 1 "ext_register_operand" "0") (const_int 8) (const_int 8)) *************** *** 9213,9219 **** (const_int 8) (const_int 8)))) (clobber (reg:CC 17))] ! "" "xor{b}\t{%h2, %h0|%h0, %h2}" [(set_attr "type" "alu") (set_attr "length_immediate" "0") --- 8912,8918 ---- (const_int 8) (const_int 8)))) (clobber (reg:CC 17))] ! "(!TARGET_PARTIAL_REG_STALL || optimize_size)" "xor{b}\t{%h2, %h0|%h0, %h2}" [(set_attr "type" "alu") (set_attr "length_immediate" "0") *************** *** 9233,9238 **** --- 8932,8951 ---- [(set_attr "type" "alu") (set_attr "mode" "QI")]) + (define_insn "*xorqi_2_slp" + [(set (reg 17) + (compare (xor:QI (match_operand:QI 0 "nonimmediate_operand" "+q,qm") + (match_operand:QI 1 "general_operand" "qim,qi")) + (const_int 0))) + (set (strict_low_part (match_dup 0)) + (xor:QI (match_dup 0) (match_dup 1)))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && ix86_match_ccmode (insn, CCNOmode) + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "xor{b}\t{%1, %0|%0, %1}" + [(set_attr "type" "alu1") + (set_attr "mode" "QI")]) + (define_insn "*xorqi_cc_2" [(set (reg 17) (compare *************** *** 9307,9312 **** --- 9020,9065 ---- (match_dup 2)))])] "" "") + + (define_split + [(set (match_operand 0 "register_operand" "") + (xor (match_operand 1 "register_operand" "") + (match_operand 2 "const_int_operand" ""))) + (clobber (reg:CC 17))] + "reload_completed + && QI_REG_P (operands[0]) + && (!TARGET_PARTIAL_REG_STALL || optimize_size) + && !(INTVAL (operands[2]) & ~(255 << 8)) + && GET_MODE (operands[0]) != QImode" + [(parallel [(set (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8)) + (xor:SI (zero_extract:SI (match_dup 1) + (const_int 8) (const_int 8)) + (match_dup 2))) + (clobber (reg:CC 17))])] + "operands[0] = gen_lowpart (SImode, operands[0]); + operands[1] = gen_lowpart (SImode, operands[1]); + operands[2] = gen_int_mode ((INTVAL (operands[2]) >> 8) & 0xff, SImode);") + + ;; Since XOR can be encoded with sign extended immediate, this is only + ;; profitable when 7th bit is set. + (define_split + [(set (match_operand 0 "register_operand" "") + (xor (match_operand 1 "general_operand" "") + (match_operand 2 "const_int_operand" ""))) + (clobber (reg:CC 17))] + "reload_completed + && ANY_QI_REG_P (operands[0]) + && (!TARGET_PARTIAL_REG_STALL || optimize_size) + && !(INTVAL (operands[2]) & ~255) + && (INTVAL (operands[2]) & 128) + && GET_MODE (operands[0]) != QImode" + [(parallel [(set (strict_low_part (match_dup 0)) + (xor:QI (match_dup 1) + (match_dup 2))) + (clobber (reg:CC 17))])] + "operands[0] = gen_lowpart (QImode, operands[0]); + operands[1] = gen_lowpart (QImode, operands[1]); + operands[2] = gen_lowpart (QImode, operands[2]);") ;; Negation instructions *************** *** 9510,9517 **** operands[0] = force_reg (SFmode, operands[0]); emit_move_insn (reg, gen_lowpart (SFmode, ! GEN_INT (trunc_int_for_mode (0x80000000, ! SImode)))); emit_insn (gen_negsf2_ifs (operands[0], operands[1], reg)); if (dest != operands[0]) emit_move_insn (dest, operands[0]); --- 9263,9269 ---- operands[0] = force_reg (SFmode, operands[0]); emit_move_insn (reg, gen_lowpart (SFmode, ! gen_int_mode (0x80000000, SImode))); emit_insn (gen_negsf2_ifs (operands[0], operands[1], reg)); if (dest != operands[0]) emit_move_insn (dest, operands[0]); *************** *** 9590,9611 **** "#") (define_split ! [(set (match_operand:SF 0 "register_operand" "") (neg:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0])) && reload_completed" [(set (match_dup 0) (neg:SF (match_dup 1)))] "") (define_split ! [(set (match_operand:SF 0 "register_operand" "") (neg:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] ! "operands[1] = GEN_INT (trunc_int_for_mode (0x80000000, SImode)); operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));") (define_split --- 9342,9363 ---- "#") (define_split ! [(set (match_operand:SF 0 "fp_register_operand" "") (neg:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(set (match_dup 0) (neg:SF (match_dup 1)))] "") (define_split ! [(set (match_operand:SF 0 "register_and_not_fp_reg_operand" "") (neg:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] ! "operands[1] = gen_int_mode (0x80000000, SImode); operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));") (define_split *************** *** 9622,9628 **** if (size >= 12) size = 10; operands[0] = adjust_address (operands[0], QImode, size - 1); ! operands[1] = GEN_INT (trunc_int_for_mode (0x80, QImode)); }) (define_expand "negdf2" --- 9374,9380 ---- if (size >= 12) size = 10; operands[0] = adjust_address (operands[0], QImode, size - 1); ! operands[1] = gen_int_mode (0x80, QImode); }) (define_expand "negdf2" *************** *** 9642,9649 **** in register. */ rtx reg = gen_reg_rtx (DFmode); #if HOST_BITS_PER_WIDE_INT >= 64 ! rtx imm = GEN_INT (trunc_int_for_mode(((HOST_WIDE_INT)1) << 63, ! DImode)); #else rtx imm = immed_double_const (0, 0x80000000, DImode); #endif --- 9394,9400 ---- in register. */ rtx reg = gen_reg_rtx (DFmode); #if HOST_BITS_PER_WIDE_INT >= 64 ! rtx imm = gen_int_mode (((HOST_WIDE_INT)1) << 63, DImode); #else rtx imm = immed_double_const (0, 0x80000000, DImode); #endif *************** *** 9679,9687 **** "#") (define_insn "*negdf2_ifs_rex64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=Y#fr,Y#fr,fm#Yr,r#Yf") ! (neg:DF (match_operand:DF 1 "nonimmediate_operand" "0,Y#fr,0,0"))) ! (use (match_operand:DF 2 "general_operand" "Y,0,*g#Yr,*rm")) (clobber (reg:CC 17))] "TARGET_64BIT && TARGET_SSE2 && (reload_in_progress || reload_completed --- 9430,9438 ---- "#") (define_insn "*negdf2_ifs_rex64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=Y#f,Y#f,fm#Y") ! (neg:DF (match_operand:DF 1 "nonimmediate_operand" "0,Y#f,0"))) ! (use (match_operand:DF 2 "general_operand" "Y,0,*g#Y*r")) (clobber (reg:CC 17))] "TARGET_64BIT && TARGET_SSE2 && (reload_in_progress || reload_completed *************** *** 9766,9788 **** "#") (define_split ! [(set (match_operand:DF 0 "register_operand" "") (neg:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0])) && reload_completed" [(set (match_dup 0) (neg:DF (match_dup 1)))] "") (define_split ! [(set (match_operand:DF 0 "register_operand" "") (neg:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "!TARGET_64BIT && TARGET_80387 && reload_completed ! && !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 3) (xor:SI (match_dup 3) (match_dup 4))) (clobber (reg:CC 17))])] ! "operands[4] = GEN_INT (trunc_int_for_mode (0x80000000, SImode)); split_di (operands+0, 1, operands+2, operands+3);") (define_expand "negxf2" --- 9517,9538 ---- "#") (define_split ! [(set (match_operand:DF 0 "fp_register_operand" "") (neg:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(set (match_dup 0) (neg:DF (match_dup 1)))] "") (define_split ! [(set (match_operand:DF 0 "register_and_not_fp_reg_operand" "") (neg:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "!TARGET_64BIT && TARGET_80387 && reload_completed" [(parallel [(set (match_dup 3) (xor:SI (match_dup 3) (match_dup 4))) (clobber (reg:CC 17))])] ! "operands[4] = gen_int_mode (0x80000000, SImode); split_di (operands+0, 1, operands+2, operands+3);") (define_expand "negxf2" *************** *** 9811,9829 **** "#") (define_split ! [(set (match_operand:XF 0 "register_operand" "") (neg:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0])) && reload_completed" [(set (match_dup 0) (neg:XF (match_dup 1)))] "") (define_split ! [(set (match_operand:XF 0 "register_operand" "") (neg:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (0x8000); --- 9561,9579 ---- "#") (define_split ! [(set (match_operand:XF 0 "fp_register_operand" "") (neg:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(set (match_dup 0) (neg:XF (match_dup 1)))] "") (define_split ! [(set (match_operand:XF 0 "register_and_not_fp_reg_operand" "") (neg:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (0x8000); *************** *** 9841,9859 **** "#") (define_split ! [(set (match_operand:TF 0 "register_operand" "") (neg:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0])) && reload_completed" [(set (match_dup 0) (neg:TF (match_dup 1)))] "") (define_split ! [(set (match_operand:TF 0 "register_operand" "") (neg:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (0x8000); --- 9591,9609 ---- "#") (define_split ! [(set (match_operand:TF 0 "fp_register_operand" "") (neg:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(set (match_dup 0) (neg:TF (match_dup 1)))] "") (define_split ! [(set (match_operand:TF 0 "register_and_not_fp_reg_operand" "") (neg:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(parallel [(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (0x8000); *************** *** 9973,9980 **** operands[0] = force_reg (SFmode, operands[0]); emit_move_insn (reg, gen_lowpart (SFmode, ! GEN_INT (trunc_int_for_mode (0x80000000, ! SImode)))); emit_insn (gen_abssf2_ifs (operands[0], operands[1], reg)); if (dest != operands[0]) emit_move_insn (dest, operands[0]); --- 9723,9729 ---- operands[0] = force_reg (SFmode, operands[0]); emit_move_insn (reg, gen_lowpart (SFmode, ! gen_int_mode (0x80000000, SImode))); emit_insn (gen_abssf2_ifs (operands[0], operands[1], reg)); if (dest != operands[0]) emit_move_insn (dest, operands[0]); *************** *** 10042,10063 **** "#") (define_split ! [(set (match_operand:SF 0 "register_operand" "") (abs:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0]))" [(set (match_dup 0) (abs:SF (match_dup 1)))] "") (define_split ! [(set (match_operand:SF 0 "register_operand" "") (abs:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] ! "operands[1] = GEN_INT (trunc_int_for_mode (~0x80000000, SImode)); operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));") (define_split --- 9791,9812 ---- "#") (define_split ! [(set (match_operand:SF 0 "fp_register_operand" "") (abs:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387" [(set (match_dup 0) (abs:SF (match_dup 1)))] "") (define_split ! [(set (match_operand:SF 0 "register_and_not_fp_reg_operand" "") (abs:SF (match_operand:SF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] ! "operands[1] = gen_int_mode (~0x80000000, SImode); operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));") (define_split *************** *** 10074,10080 **** if (size >= 12) size = 10; operands[0] = adjust_address (operands[0], QImode, size - 1); ! operands[1] = GEN_INT (trunc_int_for_mode (~0x80, QImode)); }) (define_expand "absdf2" --- 9823,9829 ---- if (size >= 12) size = 10; operands[0] = adjust_address (operands[0], QImode, size - 1); ! operands[1] = gen_int_mode (~0x80, QImode); }) (define_expand "absdf2" *************** *** 10094,10101 **** in register. */ rtx reg = gen_reg_rtx (DFmode); #if HOST_BITS_PER_WIDE_INT >= 64 ! rtx imm = GEN_INT (trunc_int_for_mode(((HOST_WIDE_INT)1) << 63, ! DImode)); #else rtx imm = immed_double_const (0, 0x80000000, DImode); #endif --- 9843,9849 ---- in register. */ rtx reg = gen_reg_rtx (DFmode); #if HOST_BITS_PER_WIDE_INT >= 64 ! rtx imm = gen_int_mode (((HOST_WIDE_INT)1) << 63, DImode); #else rtx imm = immed_double_const (0, 0x80000000, DImode); #endif *************** *** 10196,10218 **** "#") (define_split ! [(set (match_operand:DF 0 "register_operand" "") (abs:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0])) && reload_completed" [(set (match_dup 0) (abs:DF (match_dup 1)))] "") (define_split ! [(set (match_operand:DF 0 "register_operand" "") (abs:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "!TARGET_64BIT && TARGET_80387 && reload_completed && ! !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 3) (and:SI (match_dup 3) (match_dup 4))) (clobber (reg:CC 17))])] ! "operands[4] = GEN_INT (trunc_int_for_mode (~0x80000000, SImode)); split_di (operands+0, 1, operands+2, operands+3);") (define_expand "absxf2" --- 9944,9965 ---- "#") (define_split ! [(set (match_operand:DF 0 "fp_register_operand" "") (abs:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(set (match_dup 0) (abs:DF (match_dup 1)))] "") (define_split ! [(set (match_operand:DF 0 "register_and_not_fp_reg_operand" "") (abs:DF (match_operand:DF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "!TARGET_64BIT && TARGET_80387 && reload_completed" [(parallel [(set (match_dup 3) (and:SI (match_dup 3) (match_dup 4))) (clobber (reg:CC 17))])] ! "operands[4] = gen_int_mode (~0x80000000, SImode); split_di (operands+0, 1, operands+2, operands+3);") (define_expand "absxf2" *************** *** 10241,10259 **** "#") (define_split ! [(set (match_operand:XF 0 "register_operand" "") (abs:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0])) && reload_completed" [(set (match_dup 0) (abs:XF (match_dup 1)))] "") (define_split ! [(set (match_operand:XF 0 "register_operand" "") (abs:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (~0x8000); --- 9988,10006 ---- "#") (define_split ! [(set (match_operand:XF 0 "fp_register_operand" "") (abs:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(set (match_dup 0) (abs:XF (match_dup 1)))] "") (define_split ! [(set (match_operand:XF 0 "register_and_not_fp_reg_operand" "") (abs:XF (match_operand:XF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (~0x8000); *************** *** 10268,10286 **** "#") (define_split ! [(set (match_operand:TF 0 "register_operand" "") (abs:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && FP_REGNO_P (REGNO (operands[0])) && reload_completed" [(set (match_dup 0) (abs:TF (match_dup 1)))] "") (define_split ! [(set (match_operand:TF 0 "register_operand" "") (abs:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed && !FP_REGNO_P (REGNO (operands[0]))" [(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (~0x8000); --- 10015,10033 ---- "#") (define_split ! [(set (match_operand:TF 0 "fp_register_operand" "") (abs:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(set (match_dup 0) (abs:TF (match_dup 1)))] "") (define_split ! [(set (match_operand:TF 0 "register_and_not_any_fp_reg_operand" "") (abs:TF (match_operand:TF 1 "register_operand" ""))) (clobber (reg:CC 17))] ! "TARGET_80387 && reload_completed" [(parallel [(set (match_dup 0) (and:SI (match_dup 0) (match_dup 1))) (clobber (reg:CC 17))])] "operands[1] = GEN_INT (~0x8000); *************** *** 10634,10640 **** return "sal{q}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{q}\t%0"; else return "sal{q}\t{%2, %0|%0, %2}"; --- 10381,10387 ---- return "sal{q}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{q}\t%0"; else return "sal{q}\t{%2, %0|%0, %2}"; *************** *** 10663,10670 **** [(set (match_dup 0) (mult:DI (match_dup 1) (match_dup 2)))] ! "operands[2] = GEN_INT (trunc_int_for_mode (1 << INTVAL (operands[2]), ! DImode));") ;; This pattern can't accept a variable shift count, since shifts by ;; zero don't affect the flags. We assume that shifts by constant --- 10410,10416 ---- [(set (match_dup 0) (mult:DI (match_dup 1) (match_dup 2)))] ! "operands[2] = gen_int_mode (1 << INTVAL (operands[2]), DImode);") ;; This pattern can't accept a variable shift count, since shifts by ;; zero don't affect the flags. We assume that shifts by constant *************** *** 10692,10698 **** return "sal{q}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{q}\t%0"; else return "sal{q}\t{%2, %0|%0, %2}"; --- 10438,10444 ---- return "sal{q}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{q}\t%0"; else return "sal{q}\t{%2, %0|%0, %2}"; *************** *** 10840,10846 **** return "sal{l}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{l}\t%0"; else return "sal{l}\t{%2, %0|%0, %2}"; --- 10586,10592 ---- return "sal{l}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%0"; else return "sal{l}\t{%2, %0|%0, %2}"; *************** *** 10861,10867 **** ;; Convert lea to the lea pattern to avoid flags dependency. (define_split [(set (match_operand 0 "register_operand" "") ! (ashift (match_operand 1 "register_operand" "") (match_operand:QI 2 "const_int_operand" ""))) (clobber (reg:CC 17))] "reload_completed --- 10607,10613 ---- ;; Convert lea to the lea pattern to avoid flags dependency. (define_split [(set (match_operand 0 "register_operand" "") ! (ashift (match_operand 1 "index_register_operand" "") (match_operand:QI 2 "const_int_operand" ""))) (clobber (reg:CC 17))] "reload_completed *************** *** 10871,10878 **** rtx pat; operands[0] = gen_lowpart (SImode, operands[0]); operands[1] = gen_lowpart (Pmode, operands[1]); ! operands[2] = GEN_INT (trunc_int_for_mode (1 << INTVAL (operands[2]), ! Pmode)); pat = gen_rtx_MULT (Pmode, operands[1], operands[2]); if (Pmode != SImode) pat = gen_rtx_SUBREG (SImode, pat, 0); --- 10617,10623 ---- rtx pat; operands[0] = gen_lowpart (SImode, operands[0]); operands[1] = gen_lowpart (Pmode, operands[1]); ! operands[2] = gen_int_mode (1 << INTVAL (operands[2]), Pmode); pat = gen_rtx_MULT (Pmode, operands[1], operands[2]); if (Pmode != SImode) pat = gen_rtx_SUBREG (SImode, pat, 0); *************** *** 10880,10885 **** --- 10625,10650 ---- DONE; }) + ;; Rare case of shifting RSP is handled by generating move and shift + (define_split + [(set (match_operand 0 "register_operand" "") + (ashift (match_operand 1 "register_operand" "") + (match_operand:QI 2 "const_int_operand" ""))) + (clobber (reg:CC 17))] + "reload_completed + && true_regnum (operands[0]) != true_regnum (operands[1])" + [(const_int 0)] + { + rtx pat, clob; + emit_move_insn (operands[1], operands[0]); + pat = gen_rtx_SET (VOIDmode, operands[0], + gen_rtx_ASHIFT (GET_MODE (operands[0]), + operands[0], operands[2])); + clob = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, FLAGS_REG)); + emit_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, pat, clob))); + DONE; + }) + (define_insn "*ashlsi3_1_zext" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (ashift:SI (match_operand:SI 1 "register_operand" "0,r") *************** *** 10902,10908 **** return "sal{l}\t{%b2, %k0|%k0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{l}\t%k0"; else return "sal{l}\t{%2, %k0|%k0, %2}"; --- 10667,10673 ---- return "sal{l}\t{%b2, %k0|%k0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%k0"; else return "sal{l}\t{%2, %k0|%k0, %2}"; *************** *** 10930,10937 **** [(set (match_dup 0) (zero_extend:DI (subreg:SI (mult:SI (match_dup 1) (match_dup 2)) 0)))] { operands[1] = gen_lowpart (Pmode, operands[1]); ! operands[2] = GEN_INT (trunc_int_for_mode (1 << INTVAL (operands[2]), ! Pmode)); }) ;; This pattern can't accept a variable shift count, since shifts by --- 10695,10701 ---- [(set (match_dup 0) (zero_extend:DI (subreg:SI (mult:SI (match_dup 1) (match_dup 2)) 0)))] { operands[1] = gen_lowpart (Pmode, operands[1]); ! operands[2] = gen_int_mode (1 << INTVAL (operands[2]), Pmode); }) ;; This pattern can't accept a variable shift count, since shifts by *************** *** 10960,10966 **** return "sal{l}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{l}\t%0"; else return "sal{l}\t{%2, %0|%0, %2}"; --- 10724,10730 ---- return "sal{l}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%0"; else return "sal{l}\t{%2, %0|%0, %2}"; *************** *** 10999,11005 **** return "sal{l}\t{%b2, %k0|%k0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{l}\t%k0"; else return "sal{l}\t{%2, %k0|%k0, %2}"; --- 10763,10769 ---- return "sal{l}\t{%b2, %k0|%k0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{l}\t%k0"; else return "sal{l}\t{%2, %k0|%k0, %2}"; *************** *** 11044,11050 **** return "sal{w}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{w}\t%0"; else return "sal{w}\t{%2, %0|%0, %2}"; --- 10808,10814 ---- return "sal{w}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{w}\t%0"; else return "sal{w}\t{%2, %0|%0, %2}"; *************** *** 11082,11088 **** return "sal{w}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{w}\t%0"; else return "sal{w}\t{%2, %0|%0, %2}"; --- 10846,10852 ---- return "sal{w}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{w}\t%0"; else return "sal{w}\t{%2, %0|%0, %2}"; *************** *** 11124,11130 **** return "sal{w}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{w}\t%0"; else return "sal{w}\t{%2, %0|%0, %2}"; --- 10888,10894 ---- return "sal{w}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{w}\t%0"; else return "sal{w}\t{%2, %0|%0, %2}"; *************** *** 11180,11186 **** } else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) { if (get_attr_mode (insn) == MODE_SI) return "sal{l}\t%0"; --- 10944,10950 ---- } else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) { if (get_attr_mode (insn) == MODE_SI) return "sal{l}\t%0"; *************** *** 11236,11242 **** } else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) { if (get_attr_mode (insn) == MODE_SI) return "sal{l}\t%0"; --- 11000,11006 ---- } else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) { if (get_attr_mode (insn) == MODE_SI) return "sal{l}\t%0"; *************** *** 11288,11294 **** return "sal{b}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)) return "sal{b}\t%0"; else return "sal{b}\t{%2, %0|%0, %2}"; --- 11052,11058 ---- return "sal{b}\t{%b2, %0|%0, %b2}"; else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 1 ! && (TARGET_SHIFT1 || optimize_size)) return "sal{b}\t%0"; else return "sal{b}\t{%2, %0|%0, %2}"; *************** *** 11344,11350 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ASHIFTRT, DImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "sar{q}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11108,11114 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ASHIFTRT, DImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "sar{q}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 11376,11382 **** (set (match_operand:DI 0 "nonimmediate_operand" "=rm") (ashiftrt:DI (match_dup 1) (match_dup 2)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (ASHIFTRT, DImode, operands)" "sar{q}\t%0" [(set_attr "type" "ishift") --- 11140,11146 ---- (set (match_operand:DI 0 "nonimmediate_operand" "=rm") (ashiftrt:DI (match_dup 1) (match_dup 2)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (ASHIFTRT, DImode, operands)" "sar{q}\t%0" [(set_attr "type" "ishift") *************** *** 11533,11539 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ASHIFTRT, SImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "sar{l}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11297,11303 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ASHIFTRT, SImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "sar{l}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 11547,11553 **** (match_operand:QI 2 "const_int_1_operand" "")))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ASHIFTRT, SImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "sar{l}\t%k0" [(set_attr "type" "ishift") (set_attr "length" "2")]) --- 11311,11317 ---- (match_operand:QI 2 "const_int_1_operand" "")))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ASHIFTRT, SImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "sar{l}\t%k0" [(set_attr "type" "ishift") (set_attr "length" "2")]) *************** *** 11588,11594 **** (set (match_operand:SI 0 "nonimmediate_operand" "=rm") (ashiftrt:SI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (ASHIFTRT, SImode, operands)" "sar{l}\t%0" [(set_attr "type" "ishift") --- 11352,11358 ---- (set (match_operand:SI 0 "nonimmediate_operand" "=rm") (ashiftrt:SI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (ASHIFTRT, SImode, operands)" "sar{l}\t%0" [(set_attr "type" "ishift") *************** *** 11606,11612 **** (set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (ashiftrt:SI (match_dup 1) (match_dup 2))))] "TARGET_64BIT && ix86_match_ccmode (insn, CCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (ASHIFTRT, SImode, operands)" "sar{l}\t%k0" [(set_attr "type" "ishift") --- 11370,11376 ---- (set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (ashiftrt:SI (match_dup 1) (match_dup 2))))] "TARGET_64BIT && ix86_match_ccmode (insn, CCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (ASHIFTRT, SImode, operands)" "sar{l}\t%k0" [(set_attr "type" "ishift") *************** *** 11657,11663 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ASHIFTRT, HImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "sar{w}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11421,11427 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ASHIFTRT, HImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "sar{w}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 11689,11695 **** (set (match_operand:HI 0 "nonimmediate_operand" "=rm") (ashiftrt:HI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (ASHIFTRT, HImode, operands)" "sar{w}\t%0" [(set_attr "type" "ishift") --- 11453,11459 ---- (set (match_operand:HI 0 "nonimmediate_operand" "=rm") (ashiftrt:HI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (ASHIFTRT, HImode, operands)" "sar{w}\t%0" [(set_attr "type" "ishift") *************** *** 11729,11735 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ASHIFTRT, QImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "sar{b}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11493,11499 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ASHIFTRT, QImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "sar{b}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 11737,11742 **** --- 11501,11521 ---- (const_string "2") (const_string "*")))]) + (define_insn "*ashrqi3_1_one_bit_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm")) + (ashiftrt:QI (match_dup 0) + (match_operand:QI 1 "const_int_1_operand" ""))) + (clobber (reg:CC 17))] + "ix86_binary_operator_ok (ASHIFTRT, QImode, operands) + && (! TARGET_PARTIAL_REG_STALL || optimize_size) + && (TARGET_SHIFT1 || optimize_size)" + "sar{b}\t%0" + [(set_attr "type" "ishift1") + (set (attr "length") + (if_then_else (match_operand 0 "register_operand" "") + (const_string "2") + (const_string "*")))]) + (define_insn "*ashrqi3_1" [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,qm") (ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0,0") *************** *** 11749,11754 **** --- 11528,11546 ---- [(set_attr "type" "ishift") (set_attr "mode" "QI")]) + (define_insn "*ashrqi3_1_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,qm")) + (ashiftrt:QI (match_dup 0) + (match_operand:QI 1 "nonmemory_operand" "I,c"))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "@ + sar{b}\t{%1, %0|%0, %1} + sar{b}\t{%b1, %0|%0, %b1}" + [(set_attr "type" "ishift1") + (set_attr "mode" "QI")]) + ;; This pattern can't accept a variable shift count, since shifts by ;; zero don't affect the flags. We assume that shifts by constant ;; zero are optimized away. *************** *** 11761,11767 **** (set (match_operand:QI 0 "nonimmediate_operand" "=qm") (ashiftrt:QI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (ASHIFTRT, QImode, operands)" "sar{b}\t%0" [(set_attr "type" "ishift") --- 11553,11559 ---- (set (match_operand:QI 0 "nonimmediate_operand" "=qm") (ashiftrt:QI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (ASHIFTRT, QImode, operands)" "sar{b}\t%0" [(set_attr "type" "ishift") *************** *** 11813,11819 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "shr{q}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11605,11611 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "shr{q}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 11845,11851 **** (set (match_operand:DI 0 "nonimmediate_operand" "=rm") (lshiftrt:DI (match_dup 1) (match_dup 2)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{q}\t%0" [(set_attr "type" "ishift") --- 11637,11643 ---- (set (match_operand:DI 0 "nonimmediate_operand" "=rm") (lshiftrt:DI (match_dup 1) (match_dup 2)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{q}\t%0" [(set_attr "type" "ishift") *************** *** 11923,11929 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "shr{l}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11715,11721 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "shr{l}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 11937,11943 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "shr{l}\t%k0" [(set_attr "type" "ishift") (set_attr "length" "2")]) --- 11729,11735 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "shr{l}\t%k0" [(set_attr "type" "ishift") (set_attr "length" "2")]) *************** *** 11979,11985 **** (set (match_operand:SI 0 "nonimmediate_operand" "=rm") (lshiftrt:SI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{l}\t%0" [(set_attr "type" "ishift") --- 11771,11777 ---- (set (match_operand:SI 0 "nonimmediate_operand" "=rm") (lshiftrt:SI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{l}\t%0" [(set_attr "type" "ishift") *************** *** 11997,12003 **** (set (match_operand:DI 0 "register_operand" "=r") (lshiftrt:DI (zero_extend:DI (match_dup 1)) (match_dup 2)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{l}\t%k0" [(set_attr "type" "ishift") --- 11789,11795 ---- (set (match_operand:DI 0 "register_operand" "=r") (lshiftrt:DI (zero_extend:DI (match_dup 1)) (match_dup 2)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{l}\t%k0" [(set_attr "type" "ishift") *************** *** 12048,12054 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "shr{w}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11840,11846 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (LSHIFTRT, HImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "shr{w}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 12080,12086 **** (set (match_operand:HI 0 "nonimmediate_operand" "=rm") (lshiftrt:HI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{w}\t%0" [(set_attr "type" "ishift") --- 11872,11878 ---- (set (match_operand:HI 0 "nonimmediate_operand" "=rm") (lshiftrt:HI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (LSHIFTRT, HImode, operands)" "shr{w}\t%0" [(set_attr "type" "ishift") *************** *** 12120,12126 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (LSHIFTRT, QImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "shr{b}\t%0" [(set_attr "type" "ishift") (set (attr "length") --- 11912,11918 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (LSHIFTRT, QImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "shr{b}\t%0" [(set_attr "type" "ishift") (set (attr "length") *************** *** 12128,12133 **** --- 11920,11939 ---- (const_string "2") (const_string "*")))]) + (define_insn "*lshrqi3_1_one_bit_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm")) + (lshiftrt:QI (match_dup 0) + (match_operand:QI 1 "const_int_1_operand" ""))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (TARGET_SHIFT1 || optimize_size)" + "shr{b}\t%0" + [(set_attr "type" "ishift1") + (set (attr "length") + (if_then_else (match_operand 0 "register_operand" "") + (const_string "2") + (const_string "*")))]) + (define_insn "*lshrqi3_1" [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,qm") (lshiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0,0") *************** *** 12140,12145 **** --- 11946,11964 ---- [(set_attr "type" "ishift") (set_attr "mode" "QI")]) + (define_insn "*lshrqi3_1_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,qm")) + (lshiftrt:QI (match_dup 0) + (match_operand:QI 1 "nonmemory_operand" "I,c"))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "@ + shr{b}\t{%1, %0|%0, %1} + shr{b}\t{%b1, %0|%0, %b1}" + [(set_attr "type" "ishift1") + (set_attr "mode" "QI")]) + ;; This pattern can't accept a variable shift count, since shifts by ;; zero don't affect the flags. We assume that shifts by constant ;; zero are optimized away. *************** *** 12152,12158 **** (set (match_operand:QI 0 "nonimmediate_operand" "=qm") (lshiftrt:QI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO) && ix86_binary_operator_ok (LSHIFTRT, QImode, operands)" "shr{b}\t%0" [(set_attr "type" "ishift") --- 11971,11977 ---- (set (match_operand:QI 0 "nonimmediate_operand" "=qm") (lshiftrt:QI (match_dup 1) (match_dup 2)))] "ix86_match_ccmode (insn, CCGOCmode) ! && (TARGET_SHIFT1 || optimize_size) && ix86_binary_operator_ok (LSHIFTRT, QImode, operands)" "shr{b}\t%0" [(set_attr "type" "ishift") *************** *** 12194,12202 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATE, DImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "rol{q}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand:DI 0 "register_operand" "") (const_string "2") --- 12013,12021 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATE, DImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "rol{q}\t%0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand:DI 0 "register_operand" "") (const_string "2") *************** *** 12211,12217 **** "@ rol{q}\t{%2, %0|%0, %2} rol{q}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "DI")]) (define_expand "rotlsi3" --- 12030,12036 ---- "@ rol{q}\t{%2, %0|%0, %2} rol{q}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "DI")]) (define_expand "rotlsi3" *************** *** 12228,12236 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATE, SImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "rol{l}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand:SI 0 "register_operand" "") (const_string "2") --- 12047,12055 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATE, SImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "rol{l}\t%0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand:SI 0 "register_operand" "") (const_string "2") *************** *** 12243,12251 **** (match_operand:QI 2 "const_int_1_operand" "")))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATE, SImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "rol{l}\t%k0" ! [(set_attr "type" "ishift") (set_attr "length" "2")]) (define_insn "*rotlsi3_1" --- 12062,12070 ---- (match_operand:QI 2 "const_int_1_operand" "")))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATE, SImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "rol{l}\t%k0" ! [(set_attr "type" "rotate") (set_attr "length" "2")]) (define_insn "*rotlsi3_1" *************** *** 12257,12263 **** "@ rol{l}\t{%2, %0|%0, %2} rol{l}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "SI")]) (define_insn "*rotlsi3_1_zext" --- 12076,12082 ---- "@ rol{l}\t{%2, %0|%0, %2} rol{l}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "SI")]) (define_insn "*rotlsi3_1_zext" *************** *** 12270,12276 **** "@ rol{l}\t{%2, %k0|%k0, %2} rol{l}\t{%b2, %k0|%k0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "SI")]) (define_expand "rotlhi3" --- 12089,12095 ---- "@ rol{l}\t{%2, %k0|%k0, %2} rol{l}\t{%b2, %k0|%k0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "SI")]) (define_expand "rotlhi3" *************** *** 12287,12295 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATE, HImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "rol{w}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") --- 12106,12114 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATE, HImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "rol{w}\t%0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") *************** *** 12304,12310 **** "@ rol{w}\t{%2, %0|%0, %2} rol{w}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "HI")]) (define_expand "rotlqi3" --- 12123,12129 ---- "@ rol{w}\t{%2, %0|%0, %2} rol{w}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "HI")]) (define_expand "rotlqi3" *************** *** 12315,12334 **** "TARGET_QIMODE_MATH" "ix86_expand_binary_operator (ROTATE, QImode, operands); DONE;") (define_insn "*rotlqi3_1_one_bit" [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") (rotate:QI (match_operand:QI 1 "nonimmediate_operand" "0") (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATE, QImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "rol{b}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") (const_string "*")))]) (define_insn "*rotlqi3_1" [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,qm") (rotate:QI (match_operand:QI 1 "nonimmediate_operand" "0,0") --- 12134,12180 ---- "TARGET_QIMODE_MATH" "ix86_expand_binary_operator (ROTATE, QImode, operands); DONE;") + (define_insn "*rotlqi3_1_one_bit_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm")) + (rotate:QI (match_dup 0) + (match_operand:QI 1 "const_int_1_operand" ""))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (TARGET_SHIFT1 || optimize_size)" + "rol{b}\t%0" + [(set_attr "type" "rotate1") + (set (attr "length") + (if_then_else (match_operand 0 "register_operand" "") + (const_string "2") + (const_string "*")))]) + (define_insn "*rotlqi3_1_one_bit" [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") (rotate:QI (match_operand:QI 1 "nonimmediate_operand" "0") (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATE, QImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "rol{b}\t%0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") (const_string "*")))]) + (define_insn "*rotlqi3_1_slp" + [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,qm")) + (rotate:QI (match_dup 0) + (match_operand:QI 1 "nonmemory_operand" "I,c"))) + (clobber (reg:CC 17))] + "(! TARGET_PARTIAL_REG_STALL || optimize_size) + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "@ + rol{b}\t{%1, %0|%0, %1} + rol{b}\t{%b1, %0|%0, %b1}" + [(set_attr "type" "rotate1") + (set_attr "mode" "QI")]) + (define_insn "*rotlqi3_1" [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,qm") (rotate:QI (match_operand:QI 1 "nonimmediate_operand" "0,0") *************** *** 12338,12344 **** "@ rol{b}\t{%2, %0|%0, %2} rol{b}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "QI")]) (define_expand "rotrdi3" --- 12184,12190 ---- "@ rol{b}\t{%2, %0|%0, %2} rol{b}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "QI")]) (define_expand "rotrdi3" *************** *** 12355,12363 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATERT, DImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "ror{q}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand:DI 0 "register_operand" "") (const_string "2") --- 12201,12209 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATERT, DImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "ror{q}\t%0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand:DI 0 "register_operand" "") (const_string "2") *************** *** 12372,12378 **** "@ ror{q}\t{%2, %0|%0, %2} ror{q}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "DI")]) (define_expand "rotrsi3" --- 12218,12224 ---- "@ ror{q}\t{%2, %0|%0, %2} ror{q}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "DI")]) (define_expand "rotrsi3" *************** *** 12389,12397 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATERT, SImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "ror{l}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand:SI 0 "register_operand" "") (const_string "2") --- 12235,12243 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATERT, SImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "ror{l}\t%0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand:SI 0 "register_operand" "") (const_string "2") *************** *** 12404,12412 **** (match_operand:QI 2 "const_int_1_operand" "")))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATERT, SImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "ror{l}\t%k0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand:SI 0 "register_operand" "") (const_string "2") --- 12250,12258 ---- (match_operand:QI 2 "const_int_1_operand" "")))) (clobber (reg:CC 17))] "TARGET_64BIT && ix86_binary_operator_ok (ROTATERT, SImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "ror{l}\t%k0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand:SI 0 "register_operand" "") (const_string "2") *************** *** 12421,12427 **** "@ ror{l}\t{%2, %0|%0, %2} ror{l}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "SI")]) (define_insn "*rotrsi3_1_zext" --- 12267,12273 ---- "@ ror{l}\t{%2, %0|%0, %2} ror{l}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "SI")]) (define_insn "*rotrsi3_1_zext" *************** *** 12434,12440 **** "@ ror{l}\t{%2, %k0|%k0, %2} ror{l}\t{%b2, %k0|%k0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "SI")]) (define_expand "rotrhi3" --- 12280,12286 ---- "@ ror{l}\t{%2, %k0|%k0, %2} ror{l}\t{%b2, %k0|%k0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "SI")]) (define_expand "rotrhi3" *************** *** 12451,12459 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATERT, HImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "ror{w}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") --- 12297,12305 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATERT, HImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "ror{w}\t%0" ! [(set_attr "type" "rotate") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") *************** *** 12468,12474 **** "@ ror{w}\t{%2, %0|%0, %2} ror{w}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "HI")]) (define_expand "rotrqi3" --- 12314,12320 ---- "@ ror{w}\t{%2, %0|%0, %2} ror{w}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") (set_attr "mode" "HI")]) (define_expand "rotrqi3" *************** *** 12485,12493 **** (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATERT, QImode, operands) ! && (TARGET_PENTIUM || TARGET_PENTIUMPRO)" "ror{b}\t%0" ! [(set_attr "type" "ishift") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") --- 12331,12353 ---- (match_operand:QI 2 "const_int_1_operand" ""))) (clobber (reg:CC 17))] "ix86_binary_operator_ok (ROTATERT, QImode, operands) ! && (TARGET_SHIFT1 || optimize_size)" "ror{b}\t%0" ! [(set_attr "type" "rotate") ! (set (attr "length") ! (if_then_else (match_operand 0 "register_operand" "") ! (const_string "2") ! (const_string "*")))]) ! ! (define_insn "*rotrqi3_1_one_bit_slp" ! [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm")) ! (rotatert:QI (match_dup 0) ! (match_operand:QI 1 "const_int_1_operand" ""))) ! (clobber (reg:CC 17))] ! "(! TARGET_PARTIAL_REG_STALL || optimize_size) ! && (TARGET_SHIFT1 || optimize_size)" ! "ror{b}\t%0" ! [(set_attr "type" "rotate1") (set (attr "length") (if_then_else (match_operand 0 "register_operand" "") (const_string "2") *************** *** 12502,12508 **** "@ ror{b}\t{%2, %0|%0, %2} ror{b}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "ishift") (set_attr "mode" "QI")]) ;; Bit set / bit test instructions --- 12362,12381 ---- "@ ror{b}\t{%2, %0|%0, %2} ror{b}\t{%b2, %0|%0, %b2}" ! [(set_attr "type" "rotate") ! (set_attr "mode" "QI")]) ! ! (define_insn "*rotrqi3_1_slp" ! [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,qm")) ! (rotatert:QI (match_dup 0) ! (match_operand:QI 1 "nonmemory_operand" "I,c"))) ! (clobber (reg:CC 17))] ! "(! TARGET_PARTIAL_REG_STALL || optimize_size) ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "@ ! ror{b}\t{%1, %0|%0, %1} ! ror{b}\t{%b1, %0|%0, %b1}" ! [(set_attr "type" "rotate1") (set_attr "mode" "QI")]) ;; Bit set / bit test instructions *************** *** 12780,12786 **** (match_operand:SF 3 "nonimmediate_operand" "xm")]))] "TARGET_SSE && reload_completed" "cmp%D1ss\t{%3, %0|%0, %3}" ! [(set_attr "type" "sse") (set_attr "mode" "SF")]) (define_insn "*sse_setccdf" --- 12653,12659 ---- (match_operand:SF 3 "nonimmediate_operand" "xm")]))] "TARGET_SSE && reload_completed" "cmp%D1ss\t{%3, %0|%0, %3}" ! [(set_attr "type" "ssecmp") (set_attr "mode" "SF")]) (define_insn "*sse_setccdf" *************** *** 12790,12796 **** (match_operand:DF 3 "nonimmediate_operand" "Ym")]))] "TARGET_SSE2 && reload_completed" "cmp%D1sd\t{%3, %0|%0, %3}" ! [(set_attr "type" "sse") (set_attr "mode" "DF")]) ;; Basic conditional jump instructions. --- 12663,12669 ---- (match_operand:DF 3 "nonimmediate_operand" "Ym")]))] "TARGET_SSE2 && reload_completed" "cmp%D1sd\t{%3, %0|%0, %3}" ! [(set_attr "type" "ssecmp") (set_attr "mode" "DF")]) ;; Basic conditional jump instructions. *************** *** 13271,13299 **** (use (label_ref (match_operand 1 "" "")))])] "" { ! /* In PIC mode, the table entries are stored GOT-relative. Convert ! the relative address to an absolute address. */ if (flag_pic) { if (TARGET_64BIT) - operands[0] = expand_simple_binop (Pmode, PLUS, operands[0], - gen_rtx_LABEL_REF (Pmode, operands[1]), - NULL_RTX, 0, - OPTAB_DIRECT); - else if (HAVE_AS_GOTOFF_IN_DATA) { ! operands[0] = expand_simple_binop (Pmode, PLUS, operands[0], ! pic_offset_table_rtx, NULL_RTX, ! 1, OPTAB_DIRECT); ! current_function_uses_pic_offset_table = 1; } else { ! operands[0] = expand_simple_binop (Pmode, MINUS, pic_offset_table_rtx, ! operands[0], NULL_RTX, 1, ! OPTAB_DIRECT); ! current_function_uses_pic_offset_table = 1; } } }) --- 13144,13177 ---- (use (label_ref (match_operand 1 "" "")))])] "" { ! /* In PIC mode, the table entries are stored GOT (32-bit) or PC (64-bit) ! relative. Convert the relative address to an absolute address. */ if (flag_pic) { + rtx op0, op1; + enum rtx_code code; + if (TARGET_64BIT) { ! code = PLUS; ! op0 = operands[0]; ! op1 = gen_rtx_LABEL_REF (Pmode, operands[1]); ! } ! else if (TARGET_MACHO || HAVE_AS_GOTOFF_IN_DATA) ! { ! code = PLUS; ! op0 = operands[0]; ! op1 = pic_offset_table_rtx; } else { ! code = MINUS; ! op0 = pic_offset_table_rtx; ! op1 = operands[0]; } + + operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 0, + OPTAB_DIRECT); } }) *************** *** 13478,13498 **** (match_operand:SI 3 "" "")))])] "!TARGET_64BIT" { ! if (operands[3] == const0_rtx) ! { ! emit_insn (gen_call (operands[0], operands[1], constm1_rtx)); ! DONE; ! } ! /* Static functions and indirect calls don't need ! current_function_uses_pic_offset_table. */ ! if (flag_pic ! && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF ! && ! SYMBOL_REF_FLAG (XEXP (operands[0], 0))) ! current_function_uses_pic_offset_table = 1; ! if (! call_insn_operand (XEXP (operands[0], 0), Pmode)) ! XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); ! if (TARGET_64BIT) ! abort(); }) (define_insn "*call_pop_0" --- 13356,13363 ---- (match_operand:SI 3 "" "")))])] "!TARGET_64BIT" { ! ix86_expand_call (NULL, operands[0], operands[1], operands[2], operands[3]); ! DONE; }) (define_insn "*call_pop_0" *************** *** 13534,13570 **** [(call (match_operand:QI 0 "" "") (match_operand 1 "" "")) (use (match_operand 2 "" ""))] - ;; Operand 1 not used on the i386. "" { ! rtx insn; ! /* Static functions and indirect calls don't need ! current_function_uses_pic_offset_table. */ ! if (flag_pic ! && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF ! && ! SYMBOL_REF_FLAG (XEXP (operands[0], 0))) ! current_function_uses_pic_offset_table = 1; ! ! if (! call_insn_operand (XEXP (operands[0], 0), Pmode)) ! XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); ! if (TARGET_64BIT && INTVAL (operands[2]) >= 0) ! { ! rtx reg = gen_rtx_REG (QImode, 0); ! emit_move_insn (reg, operands[2]); ! insn = emit_call_insn (gen_call_exp (operands[0], operands[1])); ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), reg); ! DONE; ! } ! insn = emit_call_insn (gen_call_exp (operands[0], operands[1])); ! DONE; }) - (define_expand "call_exp" - [(call (match_operand:QI 0 "" "") - (match_operand 1 "" ""))] - "" - "") - (define_insn "*call_0" [(call (mem:QI (match_operand 0 "constant_call_address_operand" "")) (match_operand 1 "" ""))] --- 13399,13410 ---- [(call (match_operand:QI 0 "" "") (match_operand 1 "" "")) (use (match_operand 2 "" ""))] "" { ! ix86_expand_call (NULL, operands[0], operands[1], operands[2], NULL); ! DONE; }) (define_insn "*call_0" [(call (mem:QI (match_operand 0 "constant_call_address_operand" "")) (match_operand 1 "" ""))] *************** *** 13616,13622 **** [(set_attr "type" "call")]) ;; Call subroutine, returning value in operand 0 - ;; (which must be a hard register). (define_expand "call_value_pop" [(parallel [(set (match_operand 0 "" "") --- 13456,13461 ---- *************** *** 13627,13646 **** (match_operand:SI 4 "" "")))])] "!TARGET_64BIT" { ! if (operands[4] == const0_rtx) ! { ! emit_insn (gen_call_value (operands[0], operands[1], operands[2], ! constm1_rtx)); ! DONE; ! } ! /* Static functions and indirect calls don't need ! current_function_uses_pic_offset_table. */ ! if (flag_pic ! && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF ! && ! SYMBOL_REF_FLAG (XEXP (operands[1], 0))) ! current_function_uses_pic_offset_table = 1; ! if (! call_insn_operand (XEXP (operands[1], 0), Pmode)) ! XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); }) (define_expand "call_value" --- 13466,13474 ---- (match_operand:SI 4 "" "")))])] "!TARGET_64BIT" { ! ix86_expand_call (operands[0], operands[1], operands[2], ! operands[3], operands[4]); ! DONE; }) (define_expand "call_value" *************** *** 13651,13686 **** ;; Operand 2 not used on the i386. "" { ! rtx insn; ! /* Static functions and indirect calls don't need ! current_function_uses_pic_offset_table. */ ! if (flag_pic ! && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF ! && ! SYMBOL_REF_FLAG (XEXP (operands[1], 0))) ! current_function_uses_pic_offset_table = 1; ! if (! call_insn_operand (XEXP (operands[1], 0), Pmode)) ! XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); ! if (TARGET_64BIT && INTVAL (operands[3]) >= 0) ! { ! rtx reg = gen_rtx_REG (QImode, 0); ! emit_move_insn (reg, operands[3]); ! insn = emit_call_insn (gen_call_value_exp (operands[0], operands[1], ! operands[2])); ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), reg); ! DONE; ! } ! insn = emit_call_insn (gen_call_value_exp (operands[0], operands[1], ! operands[2])); DONE; }) - (define_expand "call_value_exp" - [(set (match_operand 0 "" "") - (call (match_operand:QI 1 "" "") - (match_operand:SI 2 "" "")))] - "" - "") - ;; Call subroutine returning any type. (define_expand "untyped_call" --- 13479,13488 ---- ;; Operand 2 not used on the i386. "" { ! ix86_expand_call (operands[0], operands[1], operands[2], operands[3], NULL); DONE; }) ;; Call subroutine returning any type. (define_expand "untyped_call" *************** *** 13697,13708 **** simply pretend the untyped call returns a complex long double value. */ ! emit_call_insn (TARGET_FLOAT_RETURNS_IN_80387 ! ? gen_call_value (gen_rtx_REG (XCmode, FIRST_FLOAT_REG), ! operands[0], const0_rtx, ! GEN_INT (SSE_REGPARM_MAX - 1)) ! : gen_call (operands[0], const0_rtx, ! GEN_INT (SSE_REGPARM_MAX - 1))); for (i = 0; i < XVECLEN (operands[2], 0); i++) { --- 13499,13508 ---- simply pretend the untyped call returns a complex long double value. */ ! ix86_expand_call ((TARGET_FLOAT_RETURNS_IN_80387 ! ? gen_rtx_REG (XCmode, FIRST_FLOAT_REG) : NULL), ! operands[0], const0_rtx, GEN_INT (SSE_REGPARM_MAX - 1), ! NULL); for (i = 0; i < XVECLEN (operands[2], 0); i++) { *************** *** 13714,13720 **** registers we stored in the result block. We avoid problems by claiming that all hard registers are used and clobbered at this point. */ ! emit_insn (gen_blockage ()); DONE; }) --- 13514,13520 ---- registers we stored in the result block. We avoid problems by claiming that all hard registers are used and clobbered at this point. */ ! emit_insn (gen_blockage (const0_rtx)); DONE; }) *************** *** 13725,13731 **** ;; all of memory. This blocks insns from being moved across this point. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] 0)] "" "" [(set_attr "length" "0")]) --- 13525,13531 ---- ;; all of memory. This blocks insns from being moved across this point. (define_insn "blockage" ! [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_BLOCKAGE)] "" "" [(set_attr "length" "0")]) *************** *** 13785,13829 **** "" "ix86_expand_prologue (); DONE;") ! (define_insn "prologue_set_got" [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec_volatile:SI ! [(plus:SI (match_dup 0) ! (plus:SI (match_operand:SI 1 "symbolic_operand" "") ! (minus:SI (pc) (match_operand 2 "" ""))))] 1)) (clobber (reg:CC 17))] "!TARGET_64BIT" ! { ! if (GET_CODE (operands[2]) == LABEL_REF) ! operands[2] = XEXP (operands[2], 0); ! if (TARGET_DEEP_BRANCH_PREDICTION) ! return "add{l}\t{%1, %0|%0, %1}"; ! else ! return "add{l}\t{%1+[.-%X2], %0|%0, %a1+(.-%X2)}"; ! } ! [(set_attr "type" "alu") ! ; Since this insn may have two constant operands, we must set the ! ; length manually. ! (set_attr "length_immediate" "4") ! (set_attr "mode" "SI")]) ! ! (define_insn "prologue_get_pc" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec_volatile:SI [(plus:SI (pc) (match_operand 1 "" ""))] 2))] ! "!TARGET_64BIT" ! { ! if (GET_CODE (operands[1]) == LABEL_REF) ! operands[1] = XEXP (operands[1], 0); ! output_asm_insn ("call\t%X1", operands); ! if (! TARGET_DEEP_BRANCH_PREDICTION) ! { ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (operands[1])); ! return "pop{l}\t%0"; ! } ! RET; ! } ! [(set_attr "type" "multi")]) (define_expand "epilogue" [(const_int 1)] --- 13585,13598 ---- "" "ix86_expand_prologue (); DONE;") ! (define_insn "set_got" [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(const_int 0)] UNSPEC_SET_GOT)) (clobber (reg:CC 17))] "!TARGET_64BIT" ! { return output_set_got (operands[0]); } ! [(set_attr "type" "multi") ! (set_attr "length" "12")]) (define_expand "epilogue" [(const_int 1)] *************** *** 13859,13865 **** }) (define_insn_and_split "eh_return_si" ! [(unspec_volatile [(match_operand:SI 0 "register_operand" "c")] 13)] "!TARGET_64BIT" "#" "reload_completed" --- 13628,13635 ---- }) (define_insn_and_split "eh_return_si" ! [(unspec_volatile [(match_operand:SI 0 "register_operand" "c")] ! UNSPECV_EH_RETURN)] "!TARGET_64BIT" "#" "reload_completed" *************** *** 13867,13873 **** "ix86_expand_epilogue (2); DONE;") (define_insn_and_split "eh_return_di" ! [(unspec_volatile [(match_operand:DI 0 "register_operand" "c")] 13)] "TARGET_64BIT" "#" "reload_completed" --- 13637,13644 ---- "ix86_expand_epilogue (2); DONE;") (define_insn_and_split "eh_return_di" ! [(unspec_volatile [(match_operand:DI 0 "register_operand" "c")] ! UNSPECV_EH_RETURN)] "TARGET_64BIT" "#" "reload_completed" *************** *** 13989,13995 **** (compare:CCZ (match_operand:SI 1 "nonimmediate_operand" "rm") (const_int 0))) (set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_dup 1)] 5))] "" "bsf{l}\t{%1, %0|%0, %1}" [(set_attr "prefix_0f" "1") --- 13760,13766 ---- (compare:CCZ (match_operand:SI 1 "nonimmediate_operand" "rm") (const_int 0))) (set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_dup 1)] UNSPEC_BSF))] "" "bsf{l}\t{%1, %0|%0, %1}" [(set_attr "prefix_0f" "1") *************** *** 13998,14003 **** --- 13769,13941 ---- ;; ffshi2 is not useful -- 4 word prefix ops are needed, which is larger ;; and slower than the two-byte movzx insn needed to do the work in SImode. + ;; Thread-local storage patterns for ELF. + ;; + ;; Note that these code sequences must appear exactly as shown + ;; in order to allow linker relaxation. + + (define_insn "*tls_global_dynamic_32_gnu" + [(set (match_operand:SI 0 "register_operand" "=a") + (unspec:SI [(match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "tls_symbolic_operand" "") + (match_operand:SI 3 "call_insn_operand" "")] + UNSPEC_TLS_GD)) + (clobber (match_scratch:SI 4 "=d")) + (clobber (match_scratch:SI 5 "=c")) + (clobber (reg:CC 17))] + "!TARGET_64BIT && TARGET_GNU_TLS" + "lea{l}\t{%a2@TLSGD(,%1,1), %0|%0, %a2@TLSGD[%1*1]}\;call\t%P3" + [(set_attr "type" "multi") + (set_attr "length" "12")]) + + (define_insn "*tls_global_dynamic_32_sun" + [(set (match_operand:SI 0 "register_operand" "=a") + (unspec:SI [(match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "tls_symbolic_operand" "") + (match_operand:SI 3 "call_insn_operand" "")] + UNSPEC_TLS_GD)) + (clobber (match_scratch:SI 4 "=d")) + (clobber (match_scratch:SI 5 "=c")) + (clobber (reg:CC 17))] + "!TARGET_64BIT && TARGET_SUN_TLS" + "lea{l}\t{%a2@DTLNDX(%1), %4|%4, %a2@DTLNDX[%1]} + push{l}\t%4\;call\t%a2@TLSPLT\;pop{l}\t%4\;nop" + [(set_attr "type" "multi") + (set_attr "length" "14")]) + + (define_expand "tls_global_dynamic_32" + [(parallel [(set (match_operand:SI 0 "register_operand" "") + (unspec:SI + [(match_dup 2) + (match_operand:SI 1 "tls_symbolic_operand" "") + (match_dup 3)] + UNSPEC_TLS_GD)) + (clobber (match_scratch:SI 4 "")) + (clobber (match_scratch:SI 5 "")) + (clobber (reg:CC 17))])] + "" + { + if (flag_pic) + operands[2] = pic_offset_table_rtx; + else + { + operands[2] = gen_reg_rtx (Pmode); + emit_insn (gen_set_got (operands[2])); + } + operands[3] = ix86_tls_get_addr (); + }) + + (define_insn "*tls_global_dynamic_64" + [(set (match_operand:DI 0 "register_operand" "=a") + (call (mem:QI (match_operand:DI 2 "call_insn_operand" "")) + (match_operand:DI 3 "" ""))) + (unspec:DI [(match_operand:DI 1 "tls_symbolic_operand" "")] + UNSPEC_TLS_GD)] + "TARGET_64BIT" + ".byte\t0x66\;lea{q}\t{%a1@TLSGD(%%rip), %%rdi|%%rdi, %a1@TLSGD[%%rip]}\;.word\t0x6666\;rex64\;call\t%P2" + [(set_attr "type" "multi") + (set_attr "length" "16")]) + + (define_expand "tls_global_dynamic_64" + [(parallel [(set (match_operand:DI 0 "register_operand" "") + (call (mem:QI (match_dup 2)) (const_int 0))) + (unspec:DI [(match_operand:DI 1 "tls_symbolic_operand" "")] + UNSPEC_TLS_GD)])] + "" + { + operands[2] = ix86_tls_get_addr (); + }) + + (define_insn "*tls_local_dynamic_base_32_gnu" + [(set (match_operand:SI 0 "register_operand" "=a") + (unspec:SI [(match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "call_insn_operand" "")] + UNSPEC_TLS_LD_BASE)) + (clobber (match_scratch:SI 3 "=d")) + (clobber (match_scratch:SI 4 "=c")) + (clobber (reg:CC 17))] + "!TARGET_64BIT && TARGET_GNU_TLS" + "lea{l}\t{%&@TLSLDM(%1), %0|%0, %&@TLSLDM[%1]}\;call\t%P2" + [(set_attr "type" "multi") + (set_attr "length" "11")]) + + (define_insn "*tls_local_dynamic_base_32_sun" + [(set (match_operand:SI 0 "register_operand" "=a") + (unspec:SI [(match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "call_insn_operand" "")] + UNSPEC_TLS_LD_BASE)) + (clobber (match_scratch:SI 3 "=d")) + (clobber (match_scratch:SI 4 "=c")) + (clobber (reg:CC 17))] + "!TARGET_64BIT && TARGET_SUN_TLS" + "lea{l}\t{%&@TMDNX(%1), %3|%3, %&@TMDNX[%1]} + push{l}\t%3\;call\t%&@TLSPLT\;pop{l}\t%3" + [(set_attr "type" "multi") + (set_attr "length" "13")]) + + (define_expand "tls_local_dynamic_base_32" + [(parallel [(set (match_operand:SI 0 "register_operand" "") + (unspec:SI [(match_dup 1) (match_dup 2)] + UNSPEC_TLS_LD_BASE)) + (clobber (match_scratch:SI 3 "")) + (clobber (match_scratch:SI 4 "")) + (clobber (reg:CC 17))])] + "" + { + if (flag_pic) + operands[1] = pic_offset_table_rtx; + else + { + operands[1] = gen_reg_rtx (Pmode); + emit_insn (gen_set_got (operands[1])); + } + operands[2] = ix86_tls_get_addr (); + }) + + (define_insn "*tls_local_dynamic_base_64" + [(set (match_operand:DI 0 "register_operand" "=a") + (call (mem:QI (match_operand:DI 1 "call_insn_operand" "")) + (match_operand:DI 2 "" ""))) + (unspec:DI [(const_int 0)] UNSPEC_TLS_LD_BASE)] + "TARGET_64BIT" + "lea{q}\t{%&@TLSLD(%%rip), %%rdi|%%rdi, %&@TLSLD[%%rip]}\;call\t%P1" + [(set_attr "type" "multi") + (set_attr "length" "12")]) + + (define_expand "tls_local_dynamic_base_64" + [(parallel [(set (match_operand:DI 0 "register_operand" "") + (call (mem:QI (match_dup 1)) (const_int 0))) + (unspec:DI [(const_int 0)] UNSPEC_TLS_LD_BASE)])] + "" + { + operands[1] = ix86_tls_get_addr (); + }) + + ;; Local dynamic of a single variable is a lose. Show combine how + ;; to convert that back to global dynamic. + + (define_insn_and_split "*tls_local_dynamic_32_once" + [(set (match_operand:SI 0 "register_operand" "=a") + (plus:SI (unspec:SI [(match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "call_insn_operand" "")] + UNSPEC_TLS_LD_BASE) + (const:SI (unspec:SI + [(match_operand:SI 3 "tls_symbolic_operand" "")] + UNSPEC_DTPOFF)))) + (clobber (match_scratch:SI 4 "=d")) + (clobber (match_scratch:SI 5 "=c")) + (clobber (reg:CC 17))] + "" + "#" + "" + [(parallel [(set (match_dup 0) + (unspec:SI [(match_dup 1) (match_dup 3) (match_dup 2)] + UNSPEC_TLS_GD)) + (clobber (match_dup 4)) + (clobber (match_dup 5)) + (clobber (reg:CC 17))])] + "") + ;; These patterns match the binary 387 instructions for addM3, subM3, ;; mulM3 and divM3. There are three patterns for each of DFmode and ;; SFmode. The first is the normal insn, the second the same insn but *************** *** 14034,14040 **** "* return output_387_binary_op (insn, operands);" [(set (attr "type") (if_then_else (eq_attr "alternative" "1") ! (const_string "sse") (if_then_else (match_operand:SF 3 "mult_operator" "") (const_string "fmul") (const_string "fop")))) --- 13972,13980 ---- "* return output_387_binary_op (insn, operands);" [(set (attr "type") (if_then_else (eq_attr "alternative" "1") ! (if_then_else (match_operand:SF 3 "mult_operator" "") ! (const_string "ssemul") ! (const_string "sseadd")) (if_then_else (match_operand:SF 3 "mult_operator" "") (const_string "fmul") (const_string "fop")))) *************** *** 14048,14054 **** "TARGET_SSE_MATH && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c' && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" ! [(set_attr "type" "sse") (set_attr "mode" "SF")]) (define_insn "*fop_df_comm_nosse" --- 13988,13997 ---- "TARGET_SSE_MATH && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c' && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" ! [(set (attr "type") ! (if_then_else (match_operand:SF 3 "mult_operator" "") ! (const_string "ssemul") ! (const_string "sseadd"))) (set_attr "mode" "SF")]) (define_insn "*fop_df_comm_nosse" *************** *** 14077,14083 **** "* return output_387_binary_op (insn, operands);" [(set (attr "type") (if_then_else (eq_attr "alternative" "1") ! (const_string "sse") (if_then_else (match_operand:SF 3 "mult_operator" "") (const_string "fmul") (const_string "fop")))) --- 14020,14028 ---- "* return output_387_binary_op (insn, operands);" [(set (attr "type") (if_then_else (eq_attr "alternative" "1") ! (if_then_else (match_operand:SF 3 "mult_operator" "") ! (const_string "ssemul") ! (const_string "sseadd")) (if_then_else (match_operand:SF 3 "mult_operator" "") (const_string "fmul") (const_string "fop")))) *************** *** 14092,14098 **** && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c' && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" ! [(set_attr "type" "sse") (set_attr "mode" "DF")]) (define_insn "*fop_xf_comm" --- 14037,14046 ---- && GET_RTX_CLASS (GET_CODE (operands[3])) == 'c' && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" ! [(set (attr "type") ! (if_then_else (match_operand:SF 3 "mult_operator" "") ! (const_string "ssemul") ! (const_string "sseadd"))) (set_attr "mode" "DF")]) (define_insn "*fop_xf_comm" *************** *** 14150,14157 **** && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" [(set (attr "type") ! (cond [(eq_attr "alternative" "2") ! (const_string "sse") (match_operand:SF 3 "mult_operator" "") (const_string "fmul") (match_operand:SF 3 "div_operator" "") --- 14098,14111 ---- && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" [(set (attr "type") ! (cond [(and (eq_attr "alternative" "2") ! (match_operand:SF 3 "mult_operator" "")) ! (const_string "ssemul") ! (and (eq_attr "alternative" "2") ! (match_operand:SF 3 "div_operator" "")) ! (const_string "ssediv") ! (eq_attr "alternative" "2") ! (const_string "sseadd") (match_operand:SF 3 "mult_operator" "") (const_string "fmul") (match_operand:SF 3 "div_operator" "") *************** *** 14168,14174 **** "TARGET_SSE_MATH && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'" "* return output_387_binary_op (insn, operands);" ! [(set_attr "type" "sse") (set_attr "mode" "SF")]) ;; ??? Add SSE splitters for these! --- 14122,14134 ---- "TARGET_SSE_MATH && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'" "* return output_387_binary_op (insn, operands);" ! [(set (attr "type") ! (cond [(match_operand:SF 3 "mult_operator" "") ! (const_string "ssemul") ! (match_operand:SF 3 "div_operator" "") ! (const_string "ssediv") ! ] ! (const_string "sseadd"))) (set_attr "mode" "SF")]) ;; ??? Add SSE splitters for these! *************** *** 14220,14226 **** [(set (attr "type") (cond [(match_operand:DF 3 "mult_operator" "") (const_string "fmul") ! (match_operand:DF 3 "div_operator" "") (const_string "fdiv") ] (const_string "fop"))) --- 14180,14186 ---- [(set (attr "type") (cond [(match_operand:DF 3 "mult_operator" "") (const_string "fmul") ! (match_operand:DF 3 "div_operator" "") (const_string "fdiv") ] (const_string "fop"))) *************** *** 14237,14244 **** && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" [(set (attr "type") ! (cond [(eq_attr "alternative" "2") ! (const_string "sse") (match_operand:DF 3 "mult_operator" "") (const_string "fmul") (match_operand:DF 3 "div_operator" "") --- 14197,14210 ---- && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" [(set (attr "type") ! (cond [(and (eq_attr "alternative" "2") ! (match_operand:SF 3 "mult_operator" "")) ! (const_string "ssemul") ! (and (eq_attr "alternative" "2") ! (match_operand:SF 3 "div_operator" "")) ! (const_string "ssediv") ! (eq_attr "alternative" "2") ! (const_string "sseadd") (match_operand:DF 3 "mult_operator" "") (const_string "fmul") (match_operand:DF 3 "div_operator" "") *************** *** 14255,14261 **** "TARGET_SSE2 && TARGET_SSE_MATH && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'" "* return output_387_binary_op (insn, operands);" ! [(set_attr "type" "sse")]) ;; ??? Add SSE splitters for these! (define_insn "*fop_df_2" --- 14221,14234 ---- "TARGET_SSE2 && TARGET_SSE_MATH && GET_RTX_CLASS (GET_CODE (operands[3])) != 'c'" "* return output_387_binary_op (insn, operands);" ! [(set_attr "mode" "DF") ! (set (attr "type") ! (cond [(match_operand:SF 3 "mult_operator" "") ! (const_string "ssemul") ! (match_operand:SF 3 "div_operator" "") ! (const_string "ssediv") ! ] ! (const_string "sseadd")))]) ;; ??? Add SSE splitters for these! (define_insn "*fop_df_2" *************** *** 14762,14768 **** (define_insn "sindf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (unspec:DF [(match_operand:DF 1 "register_operand" "0")] 1))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" --- 14735,14741 ---- (define_insn "sindf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (unspec:DF [(match_operand:DF 1 "register_operand" "0")] UNSPEC_SIN))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" *************** *** 14771,14777 **** (define_insn "sinsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (unspec:SF [(match_operand:SF 1 "register_operand" "0")] 1))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" --- 14744,14750 ---- (define_insn "sinsf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (unspec:SF [(match_operand:SF 1 "register_operand" "0")] UNSPEC_SIN))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" *************** *** 14781,14787 **** (define_insn "*sinextendsfdf2" [(set (match_operand:DF 0 "register_operand" "=f") (unspec:DF [(float_extend:DF ! (match_operand:SF 1 "register_operand" "0"))] 1))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" --- 14754,14761 ---- (define_insn "*sinextendsfdf2" [(set (match_operand:DF 0 "register_operand" "=f") (unspec:DF [(float_extend:DF ! (match_operand:SF 1 "register_operand" "0"))] ! UNSPEC_SIN))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" *************** *** 14790,14796 **** (define_insn "sinxf2" [(set (match_operand:XF 0 "register_operand" "=f") ! (unspec:XF [(match_operand:XF 1 "register_operand" "0")] 1))] "!TARGET_64BIT && TARGET_80387 && !TARGET_NO_FANCY_MATH_387 && flag_unsafe_math_optimizations" "fsin" --- 14764,14770 ---- (define_insn "sinxf2" [(set (match_operand:XF 0 "register_operand" "=f") ! (unspec:XF [(match_operand:XF 1 "register_operand" "0")] UNSPEC_SIN))] "!TARGET_64BIT && TARGET_80387 && !TARGET_NO_FANCY_MATH_387 && flag_unsafe_math_optimizations" "fsin" *************** *** 14799,14805 **** (define_insn "sintf2" [(set (match_operand:TF 0 "register_operand" "=f") ! (unspec:TF [(match_operand:TF 1 "register_operand" "0")] 1))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" --- 14773,14779 ---- (define_insn "sintf2" [(set (match_operand:TF 0 "register_operand" "=f") ! (unspec:TF [(match_operand:TF 1 "register_operand" "0")] UNSPEC_SIN))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fsin" *************** *** 14808,14814 **** (define_insn "cosdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (unspec:DF [(match_operand:DF 1 "register_operand" "0")] 2))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" --- 14782,14788 ---- (define_insn "cosdf2" [(set (match_operand:DF 0 "register_operand" "=f") ! (unspec:DF [(match_operand:DF 1 "register_operand" "0")] UNSPEC_COS))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" *************** *** 14817,14823 **** (define_insn "cossf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (unspec:SF [(match_operand:SF 1 "register_operand" "0")] 2))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" --- 14791,14797 ---- (define_insn "cossf2" [(set (match_operand:SF 0 "register_operand" "=f") ! (unspec:SF [(match_operand:SF 1 "register_operand" "0")] UNSPEC_COS))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" *************** *** 14827,14833 **** (define_insn "*cosextendsfdf2" [(set (match_operand:DF 0 "register_operand" "=f") (unspec:DF [(float_extend:DF ! (match_operand:SF 1 "register_operand" "0"))] 2))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" --- 14801,14808 ---- (define_insn "*cosextendsfdf2" [(set (match_operand:DF 0 "register_operand" "=f") (unspec:DF [(float_extend:DF ! (match_operand:SF 1 "register_operand" "0"))] ! UNSPEC_COS))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" *************** *** 14836,14843 **** (define_insn "cosxf2" [(set (match_operand:XF 0 "register_operand" "=f") ! (unspec:XF [(match_operand:XF 1 "register_operand" "0")] 2))] ! "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" [(set_attr "type" "fpspc") --- 14811,14818 ---- (define_insn "cosxf2" [(set (match_operand:XF 0 "register_operand" "=f") ! (unspec:XF [(match_operand:XF 1 "register_operand" "0")] UNSPEC_COS))] ! "!TARGET_64BIT && ! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" [(set_attr "type" "fpspc") *************** *** 14845,14851 **** (define_insn "costf2" [(set (match_operand:TF 0 "register_operand" "=f") ! (unspec:TF [(match_operand:TF 1 "register_operand" "0")] 2))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" --- 14820,14826 ---- (define_insn "costf2" [(set (match_operand:TF 0 "register_operand" "=f") ! (unspec:TF [(match_operand:TF 1 "register_operand" "0")] UNSPEC_COS))] "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_unsafe_math_optimizations" "fcos" *************** *** 15739,15745 **** [(set (match_operand:SI 0 "register_operand" "") (unspec:SI [(match_operand:BLK 1 "general_operand" "") (match_operand:QI 2 "immediate_operand" "") ! (match_operand 3 "immediate_operand" "")] 0))] "" { if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3])) --- 15714,15720 ---- [(set (match_operand:SI 0 "register_operand" "") (unspec:SI [(match_operand:BLK 1 "general_operand" "") (match_operand:QI 2 "immediate_operand" "") ! (match_operand 3 "immediate_operand" "")] UNSPEC_SCAS))] "" { if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3])) *************** *** 15752,15758 **** [(set (match_operand:DI 0 "register_operand" "") (unspec:DI [(match_operand:BLK 1 "general_operand" "") (match_operand:QI 2 "immediate_operand" "") ! (match_operand 3 "immediate_operand" "")] 0))] "" { if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3])) --- 15727,15733 ---- [(set (match_operand:DI 0 "register_operand" "") (unspec:DI [(match_operand:BLK 1 "general_operand" "") (match_operand:QI 2 "immediate_operand" "") ! (match_operand 3 "immediate_operand" "")] UNSPEC_SCAS))] "" { if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3])) *************** *** 15766,15772 **** (unspec:SI [(mem:BLK (match_operand:SI 5 "register_operand" "1")) (match_operand:QI 2 "register_operand" "a") (match_operand:SI 3 "immediate_operand" "i") ! (match_operand:SI 4 "register_operand" "0")] 0)) (use (reg:SI 19)) (clobber (match_operand:SI 1 "register_operand" "=D")) (clobber (reg:CC 17))] --- 15741,15747 ---- (unspec:SI [(mem:BLK (match_operand:SI 5 "register_operand" "1")) (match_operand:QI 2 "register_operand" "a") (match_operand:SI 3 "immediate_operand" "i") ! (match_operand:SI 4 "register_operand" "0")] UNSPEC_SCAS)) (use (reg:SI 19)) (clobber (match_operand:SI 1 "register_operand" "=D")) (clobber (reg:CC 17))] *************** *** 15781,15787 **** (unspec:DI [(mem:BLK (match_operand:DI 5 "register_operand" "1")) (match_operand:QI 2 "register_operand" "a") (match_operand:DI 3 "immediate_operand" "i") ! (match_operand:DI 4 "register_operand" "0")] 0)) (use (reg:SI 19)) (clobber (match_operand:DI 1 "register_operand" "=D")) (clobber (reg:CC 17))] --- 15756,15762 ---- (unspec:DI [(mem:BLK (match_operand:DI 5 "register_operand" "1")) (match_operand:QI 2 "register_operand" "a") (match_operand:DI 3 "immediate_operand" "i") ! (match_operand:DI 4 "register_operand" "0")] UNSPEC_SCAS)) (use (reg:SI 19)) (clobber (match_operand:DI 1 "register_operand" "=D")) (clobber (reg:CC 17))] *************** *** 15897,15902 **** --- 15872,15878 ---- ; Since we don't have the proper number of operands for an alu insn, ; fill in all the blanks. [(set_attr "type" "alu") + (set_attr "pent_pair" "pu") (set_attr "memory" "none") (set_attr "imm_disp" "false") (set_attr "mode" "DI") *************** *** 15939,15944 **** --- 15915,15921 ---- ; Since we don't have the proper number of operands for an alu insn, ; fill in all the blanks. [(set_attr "type" "alu") + (set_attr "pent_pair" "pu") (set_attr "memory" "none") (set_attr "imm_disp" "false") (set_attr "mode" "SI") *************** *** 16045,16056 **** (set_attr "mode" "DF")]) (define_split ! [(set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (match_operator 1 "fcmov_comparison_operator" [(match_operand 4 "" "") (const_int 0)]) (match_operand:DF 2 "nonimmediate_operand" "") (match_operand:DF 3 "nonimmediate_operand" "")))] ! "!TARGET_64BIT && !ANY_FP_REG_P (operands[0]) && reload_completed" [(set (match_dup 2) (if_then_else:SI (match_op_dup 1 [(match_dup 4) (const_int 0)]) (match_dup 5) --- 16022,16033 ---- (set_attr "mode" "DF")]) (define_split ! [(set (match_operand:DF 0 "register_and_not_any_fp_reg_operand" "") (if_then_else:DF (match_operator 1 "fcmov_comparison_operator" [(match_operand 4 "" "") (const_int 0)]) (match_operand:DF 2 "nonimmediate_operand" "") (match_operand:DF 3 "nonimmediate_operand" "")))] ! "!TARGET_64BIT && reload_completed" [(set (match_dup 2) (if_then_else:SI (match_op_dup 1 [(match_dup 4) (const_int 0)]) (match_dup 5) *************** *** 16158,16170 **** ;; We can't represent the LT test directly. Do this by swapping the operands. (define_split ! [(set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (lt (match_operand:SF 1 "register_operand" "") (match_operand:SF 2 "register_operand" "")) (match_operand:SF 3 "register_operand" "") (match_operand:SF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "FP_REG_P (operands[0]) && reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) --- 16135,16147 ---- ;; We can't represent the LT test directly. Do this by swapping the operands. (define_split ! [(set (match_operand:SF 0 "fp_register_operand" "") (if_then_else:SF (lt (match_operand:SF 1 "register_operand" "") (match_operand:SF 2 "register_operand" "")) (match_operand:SF 3 "register_operand" "") (match_operand:SF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) *************** *** 16240,16252 **** ;; We can't represent the LT test directly. Do this by swapping the operands. (define_split ! [(set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (lt (match_operand:DF 1 "register_operand" "") (match_operand:DF 2 "register_operand" "")) (match_operand:DF 3 "register_operand" "") (match_operand:DF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "FP_REG_P (operands[0]) && reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) --- 16217,16229 ---- ;; We can't represent the LT test directly. Do this by swapping the operands. (define_split ! [(set (match_operand:DF 0 "fp_register_operand" "") (if_then_else:DF (lt (match_operand:DF 1 "register_operand" "") (match_operand:DF 2 "register_operand" "")) (match_operand:DF 3 "register_operand" "") (match_operand:DF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) *************** *** 16321,16333 **** (match_dup 2)))]) (define_split ! [(set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (gt (match_operand:SF 1 "register_operand" "") (match_operand:SF 2 "register_operand" "")) (match_operand:SF 3 "register_operand" "") (match_operand:SF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "FP_REG_P (operands[0]) && reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) --- 16298,16310 ---- (match_dup 2)))]) (define_split ! [(set (match_operand:SF 0 "fp_register_operand" "") (if_then_else:SF (gt (match_operand:SF 1 "register_operand" "") (match_operand:SF 2 "register_operand" "")) (match_operand:SF 3 "register_operand" "") (match_operand:SF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) *************** *** 16402,16414 **** (match_dup 2)))]) (define_split ! [(set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (gt (match_operand:DF 1 "register_operand" "") (match_operand:DF 2 "register_operand" "")) (match_operand:DF 3 "register_operand" "") (match_operand:DF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "FP_REG_P (operands[0]) && reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) --- 16379,16391 ---- (match_dup 2)))]) (define_split ! [(set (match_operand:DF 0 "fp_register_operand" "") (if_then_else:DF (gt (match_operand:DF 1 "register_operand" "") (match_operand:DF 2 "register_operand" "")) (match_operand:DF 3 "register_operand" "") (match_operand:DF 4 "register_operand" ""))) (clobber (reg:CC 17))] ! "reload_completed && ((operands_match_p (operands[1], operands[3]) && operands_match_p (operands[2], operands[4])) || (operands_match_p (operands[1], operands[4]) *************** *** 16630,16636 **** ;; cmpCC op0, op4 - set op0 to 0 or ffffffff depending on the comparison ;; and op2, op0 - zero op2 if comparison was false ;; nand op0, op3 - load op3 to op0 if comparison was false ! ;; or op2, op0 - get the non-zero one into the result. (define_split [(set (match_operand 0 "register_operand" "") (if_then_else (match_operator 1 "sse_comparison_operator" --- 16607,16613 ---- ;; cmpCC op0, op4 - set op0 to 0 or ffffffff depending on the comparison ;; and op2, op0 - zero op2 if comparison was false ;; nand op0, op3 - load op3 to op0 if comparison was false ! ;; or op2, op0 - get the nonzero one into the result. (define_split [(set (match_operand 0 "register_operand" "") (if_then_else (match_operator 1 "sse_comparison_operator" *************** *** 16746,16752 **** (define_split [(set (match_operand 0 "register_operand" "") (if_then_else (match_operator 1 "comparison_operator" ! [(match_operand 4 "register_operand" "") (match_operand 5 "nonimmediate_operand" "")]) (match_operand 2 "nonmemory_operand" "") (match_operand 3 "nonmemory_operand" "")))] --- 16723,16729 ---- (define_split [(set (match_operand 0 "register_operand" "") (if_then_else (match_operator 1 "comparison_operator" ! [(match_operand 4 "nonimmediate_operand" "") (match_operand 5 "nonimmediate_operand" "")]) (match_operand 2 "nonmemory_operand" "") (match_operand 3 "nonmemory_operand" "")))] *************** *** 16758,16770 **** (subreg:TI (match_dup 7) 0)))] { PUT_MODE (operands[1], GET_MODE (operands[0])); ! if (!sse_comparison_operator (operands[1], VOIDmode)) { rtx tmp = operands[5]; operands[5] = operands[4]; operands[4] = tmp; PUT_CODE (operands[1], swap_condition (GET_CODE (operands[1]))); } if (const0_operand (operands[2], GET_MODE (operands[0]))) { operands[7] = operands[3]; --- 16735,16750 ---- (subreg:TI (match_dup 7) 0)))] { PUT_MODE (operands[1], GET_MODE (operands[0])); ! if (!sse_comparison_operator (operands[1], VOIDmode) ! || !rtx_equal_p (operands[0], operands[4])) { rtx tmp = operands[5]; operands[5] = operands[4]; operands[4] = tmp; PUT_CODE (operands[1], swap_condition (GET_CODE (operands[1]))); } + if (!rtx_equal_p (operands[0], operands[4])) + abort (); if (const0_operand (operands[2], GET_MODE (operands[0]))) { operands[7] = operands[3]; *************** *** 16790,16796 **** }) (define_insn "allocate_stack_worker_1" ! [(unspec:SI [(match_operand:SI 0 "register_operand" "a")] 3) (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0))) (clobber (match_dup 0)) (clobber (reg:CC 17))] --- 16770,16776 ---- }) (define_insn "allocate_stack_worker_1" ! [(unspec:SI [(match_operand:SI 0 "register_operand" "a")] UNSPEC_STACK_PROBE) (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0))) (clobber (match_dup 0)) (clobber (reg:CC 17))] *************** *** 16800,16806 **** (set_attr "length" "5")]) (define_insn "allocate_stack_worker_rex64" ! [(unspec:DI [(match_operand:DI 0 "register_operand" "a")] 3) (set (reg:DI 7) (minus:DI (reg:DI 7) (match_dup 0))) (clobber (match_dup 0)) (clobber (reg:CC 17))] --- 16780,16786 ---- (set_attr "length" "5")]) (define_insn "allocate_stack_worker_rex64" ! [(unspec:DI [(match_operand:DI 0 "register_operand" "a")] UNSPEC_STACK_PROBE) (set (reg:DI 7) (minus:DI (reg:DI 7) (match_dup 0))) (clobber (match_dup 0)) (clobber (reg:CC 17))] *************** *** 16837,16843 **** [(label_ref (match_operand 0 "" ""))] "!TARGET_64BIT && flag_pic" { ! load_pic_register (); DONE; }) --- 16817,16823 ---- [(label_ref (match_operand 0 "" ""))] "!TARGET_64BIT && flag_pic" { ! emit_insn (gen_set_got (pic_offset_table_rtx)); DONE; }) *************** *** 16851,16857 **** (clobber (reg:CC 17))] "! TARGET_PARTIAL_REG_STALL && reload_completed && ((GET_MODE (operands[0]) == HImode ! && (!optimize_size || GET_CODE (operands[2]) != CONST_INT || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'K'))) || (GET_MODE (operands[0]) == QImode && (TARGET_PROMOTE_QImode || optimize_size)))" --- 16831,16838 ---- (clobber (reg:CC 17))] "! TARGET_PARTIAL_REG_STALL && reload_completed && ((GET_MODE (operands[0]) == HImode ! && ((!optimize_size && !TARGET_FAST_PREFIX) ! || GET_CODE (operands[2]) != CONST_INT || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'K'))) || (GET_MODE (operands[0]) == QImode && (TARGET_PROMOTE_QImode || optimize_size)))" *************** *** 16879,16885 **** /* Ensure that the operand will remain sign-extended immediate. */ && ix86_match_ccmode (insn, INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode) && ! optimize_size ! && (GET_MODE (operands[0]) == HImode || (GET_MODE (operands[0]) == QImode && TARGET_PROMOTE_QImode))" [(parallel [(set (reg:CCNO 17) (compare:CCNO (and:SI (match_dup 1) (match_dup 2)) --- 16860,16866 ---- /* Ensure that the operand will remain sign-extended immediate. */ && ix86_match_ccmode (insn, INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode) && ! optimize_size ! && ((GET_MODE (operands[0]) == HImode && ! TARGET_FAST_PREFIX) || (GET_MODE (operands[0]) == QImode && TARGET_PROMOTE_QImode))" [(parallel [(set (reg:CCNO 17) (compare:CCNO (and:SI (match_dup 1) (match_dup 2)) *************** *** 16887,16895 **** (set (match_dup 0) (and:SI (match_dup 1) (match_dup 2)))])] "operands[2] ! = GEN_INT (trunc_int_for_mode (INTVAL (operands[2]) ! & GET_MODE_MASK (GET_MODE (operands[0])), ! SImode)); operands[0] = gen_lowpart (SImode, operands[0]); operands[1] = gen_lowpart (SImode, operands[1]);") --- 16868,16876 ---- (set (match_dup 0) (and:SI (match_dup 1) (match_dup 2)))])] "operands[2] ! = gen_int_mode (INTVAL (operands[2]) ! & GET_MODE_MASK (GET_MODE (operands[0])), ! SImode); operands[0] = gen_lowpart (SImode, operands[0]); operands[1] = gen_lowpart (SImode, operands[1]);") *************** *** 16905,16918 **** "! TARGET_PARTIAL_REG_STALL && reload_completed /* Ensure that the operand will remain sign-extended immediate. */ && ix86_match_ccmode (insn, INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode) && ! optimize_size" [(set (reg:CCNO 17) (compare:CCNO (and:SI (match_dup 0) (match_dup 1)) (const_int 0)))] "operands[1] ! = GEN_INT (trunc_int_for_mode (INTVAL (operands[1]) ! & GET_MODE_MASK (GET_MODE (operands[0])), ! SImode)); operands[0] = gen_lowpart (SImode, operands[0]);") (define_split --- 16886,16900 ---- "! TARGET_PARTIAL_REG_STALL && reload_completed /* Ensure that the operand will remain sign-extended immediate. */ && ix86_match_ccmode (insn, INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode) + && ! TARGET_FAST_PREFIX && ! optimize_size" [(set (reg:CCNO 17) (compare:CCNO (and:SI (match_dup 0) (match_dup 1)) (const_int 0)))] "operands[1] ! = gen_int_mode (INTVAL (operands[1]) ! & GET_MODE_MASK (GET_MODE (operands[0])), ! SImode); operands[0] = gen_lowpart (SImode, operands[0]);") (define_split *************** *** 17162,17168 **** (const_int 0)))] "ix86_match_ccmode (insn, CCNOmode) && (true_regnum (operands[0]) != 0 ! || CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K')) && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" [(parallel [(set (reg:CCNO 17) --- 17144,17151 ---- (const_int 0)))] "ix86_match_ccmode (insn, CCNOmode) && (true_regnum (operands[0]) != 0 ! || (GET_CODE (operands[1]) == CONST_INT ! && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K'))) && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" [(parallel [(set (reg:CCNO 17) *************** *** 17385,17391 **** [(set (match_operand:SI 0 "register_operand" "") (subreg:SI (mult:DI (match_operand:DI 1 "register_operand" "") (match_operand:DI 2 "const_int_operand" "")) 0))] ! "exact_log2 (INTVAL (operands[1])) >= 0 && REGNO (operands[0]) == REGNO (operands[1]) && peep2_regno_dead_p (0, FLAGS_REG)" [(parallel [(set (match_dup 0) (ashift:SI (match_dup 0) (match_dup 2))) --- 17368,17374 ---- [(set (match_operand:SI 0 "register_operand" "") (subreg:SI (mult:DI (match_operand:DI 1 "register_operand" "") (match_operand:DI 2 "const_int_operand" "")) 0))] ! "exact_log2 (INTVAL (operands[2])) >= 0 && REGNO (operands[0]) == REGNO (operands[1]) && peep2_regno_dead_p (0, FLAGS_REG)" [(parallel [(set (match_dup 0) (ashift:SI (match_dup 0) (match_dup 2))) *************** *** 17863,17914 **** ;; Moves for SSE/MMX regs. (define_insn "movv4sf_internal" ! [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") ! (match_operand:V4SF 1 "nonimmediate_operand" "xm,x"))] "TARGET_SSE" ;; @@@ let's try to use movaps here. ! "movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "movv4si_internal" ! [(set (match_operand:V4SI 0 "nonimmediate_operand" "=x,m") ! (match_operand:V4SI 1 "nonimmediate_operand" "xm,x"))] "TARGET_SSE" ;; @@@ let's try to use movaps here. ! "movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "movv8qi_internal" ! [(set (match_operand:V8QI 0 "nonimmediate_operand" "=y,m") ! (match_operand:V8QI 1 "nonimmediate_operand" "ym,y"))] ! "TARGET_MMX" ! "movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "movv4hi_internal" ! [(set (match_operand:V4HI 0 "nonimmediate_operand" "=y,m") ! (match_operand:V4HI 1 "nonimmediate_operand" "ym,y"))] ! "TARGET_MMX" ! "movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "movv2si_internal" ! [(set (match_operand:V2SI 0 "nonimmediate_operand" "=y,m") ! (match_operand:V2SI 1 "nonimmediate_operand" "ym,y"))] ! "TARGET_MMX" ! "movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "movv2sf_internal" ! [(set (match_operand:V2SF 0 "nonimmediate_operand" "=y,m") ! (match_operand:V2SF 1 "nonimmediate_operand" "ym,y"))] ! "TARGET_3DNOW" ! "movq\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_expand "movti" ! [(set (match_operand:TI 0 "general_operand" "") ! (match_operand:TI 1 "general_operand" ""))] "TARGET_SSE || TARGET_64BIT" { if (TARGET_64BIT) --- 17846,17937 ---- ;; Moves for SSE/MMX regs. (define_insn "movv4sf_internal" ! [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,x,m") ! (match_operand:V4SF 1 "vector_move_operand" "C,xm,x"))] "TARGET_SSE" ;; @@@ let's try to use movaps here. ! "@ ! xorps\t%0, %0 ! movaps\t{%1, %0|%0, %1} ! movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "V4SF")]) (define_insn "movv4si_internal" ! [(set (match_operand:V4SI 0 "nonimmediate_operand" "=x,x,m") ! (match_operand:V4SI 1 "vector_move_operand" "C,xm,x"))] "TARGET_SSE" ;; @@@ let's try to use movaps here. ! "@ ! xorps\t%0, %0 ! movaps\t{%1, %0|%0, %1} ! movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "V4SF")]) ! ! (define_insn "movv2di_internal" ! [(set (match_operand:V2DI 0 "nonimmediate_operand" "=x,x,m") ! (match_operand:V2DI 1 "vector_move_operand" "C,xm,x"))] ! "TARGET_SSE" ! ;; @@@ let's try to use movaps here. ! "@ ! pxor\t%0, %0 ! movdqa\t{%1, %0|%0, %1} ! movdqa\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "V4SF")]) (define_insn "movv8qi_internal" ! [(set (match_operand:V8QI 0 "nonimmediate_operand" "=y,y,m") ! (match_operand:V8QI 1 "vector_move_operand" "C,ym,y"))] ! "TARGET_MMX ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "@ ! pxor\t%0, %0 ! movq\t{%1, %0|%0, %1} ! movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxmov") ! (set_attr "mode" "DI")]) (define_insn "movv4hi_internal" ! [(set (match_operand:V4HI 0 "nonimmediate_operand" "=y,y,m") ! (match_operand:V4HI 1 "vector_move_operand" "C,ym,y"))] ! "TARGET_MMX ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "@ ! pxor\t%0, %0 ! movq\t{%1, %0|%0, %1} ! movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxmov") ! (set_attr "mode" "DI")]) (define_insn "movv2si_internal" ! [(set (match_operand:V2SI 0 "nonimmediate_operand" "=y,y,m") ! (match_operand:V2SI 1 "vector_move_operand" "C,ym,y"))] ! "TARGET_MMX ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "@ ! pxor\t%0, %0 ! movq\t{%1, %0|%0, %1} ! movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "movv2sf_internal" ! [(set (match_operand:V2SF 0 "nonimmediate_operand" "=y,y,m") ! (match_operand:V2SF 1 "vector_move_operand" "C,ym,y"))] ! "TARGET_3DNOW ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "@ ! pxor\t%0, %0 ! movq\t{%1, %0|%0, %1} ! movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_expand "movti" ! [(set (match_operand:TI 0 "nonimmediate_operand" "") ! (match_operand:TI 1 "nonimmediate_operand" ""))] "TARGET_SSE || TARGET_64BIT" { if (TARGET_64BIT) *************** *** 17918,17926 **** DONE; }) (define_expand "movv4sf" ! [(set (match_operand:V4SF 0 "general_operand" "") ! (match_operand:V4SF 1 "general_operand" ""))] "TARGET_SSE" { ix86_expand_vector_move (V4SFmode, operands); --- 17941,18012 ---- DONE; }) + (define_insn "movv2df_internal" + [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,m") + (match_operand:V2DF 1 "vector_move_operand" "C,xm,x"))] + "TARGET_SSE2 + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "@ + xorpd\t%0, %0 + movapd\t{%1, %0|%0, %1} + movapd\t{%1, %0|%0, %1}" + [(set_attr "type" "ssemov") + (set_attr "mode" "V2DF")]) + + (define_insn "movv8hi_internal" + [(set (match_operand:V8HI 0 "nonimmediate_operand" "=x,x,m") + (match_operand:V8HI 1 "vector_move_operand" "C,xm,x"))] + "TARGET_SSE2 + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "@ + xorps\t%0, %0 + movaps\t{%1, %0|%0, %1} + movaps\t{%1, %0|%0, %1}" + [(set_attr "type" "ssemov") + (set_attr "mode" "V4SF")]) + + (define_insn "movv16qi_internal" + [(set (match_operand:V16QI 0 "nonimmediate_operand" "=x,x,m") + (match_operand:V16QI 1 "vector_move_operand" "C,xm,x"))] + "TARGET_SSE2 + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" + "@ + xorps\t%0, %0 + movaps\t{%1, %0|%0, %1} + movaps\t{%1, %0|%0, %1}" + [(set_attr "type" "ssemov") + (set_attr "mode" "V4SF")]) + + (define_expand "movv2df" + [(set (match_operand:V2DF 0 "nonimmediate_operand" "") + (match_operand:V2DF 1 "nonimmediate_operand" ""))] + "TARGET_SSE2" + { + ix86_expand_vector_move (V2DFmode, operands); + DONE; + }) + + (define_expand "movv8hi" + [(set (match_operand:V8HI 0 "nonimmediate_operand" "") + (match_operand:V8HI 1 "nonimmediate_operand" ""))] + "TARGET_SSE2" + { + ix86_expand_vector_move (V8HImode, operands); + DONE; + }) + + (define_expand "movv16qi" + [(set (match_operand:V16QI 0 "nonimmediate_operand" "") + (match_operand:V16QI 1 "nonimmediate_operand" ""))] + "TARGET_SSE2" + { + ix86_expand_vector_move (V16QImode, operands); + DONE; + }) + (define_expand "movv4sf" ! [(set (match_operand:V4SF 0 "nonimmediate_operand" "") ! (match_operand:V4SF 1 "nonimmediate_operand" ""))] "TARGET_SSE" { ix86_expand_vector_move (V4SFmode, operands); *************** *** 17928,17944 **** }) (define_expand "movv4si" ! [(set (match_operand:V4SI 0 "general_operand" "") ! (match_operand:V4SI 1 "general_operand" ""))] ! "TARGET_MMX" { ix86_expand_vector_move (V4SImode, operands); DONE; }) (define_expand "movv2si" ! [(set (match_operand:V2SI 0 "general_operand" "") ! (match_operand:V2SI 1 "general_operand" ""))] "TARGET_MMX" { ix86_expand_vector_move (V2SImode, operands); --- 18014,18039 ---- }) (define_expand "movv4si" ! [(set (match_operand:V4SI 0 "nonimmediate_operand" "") ! (match_operand:V4SI 1 "nonimmediate_operand" ""))] ! "TARGET_SSE" { ix86_expand_vector_move (V4SImode, operands); DONE; }) + (define_expand "movv2di" + [(set (match_operand:V2DI 0 "nonimmediate_operand" "") + (match_operand:V2DI 1 "nonimmediate_operand" ""))] + "TARGET_SSE" + { + ix86_expand_vector_move (V2DImode, operands); + DONE; + }) + (define_expand "movv2si" ! [(set (match_operand:V2SI 0 "nonimmediate_operand" "") ! (match_operand:V2SI 1 "nonimmediate_operand" ""))] "TARGET_MMX" { ix86_expand_vector_move (V2SImode, operands); *************** *** 17946,17953 **** }) (define_expand "movv4hi" ! [(set (match_operand:V4HI 0 "general_operand" "") ! (match_operand:V4HI 1 "general_operand" ""))] "TARGET_MMX" { ix86_expand_vector_move (V4HImode, operands); --- 18041,18048 ---- }) (define_expand "movv4hi" ! [(set (match_operand:V4HI 0 "nonimmediate_operand" "") ! (match_operand:V4HI 1 "nonimmediate_operand" ""))] "TARGET_MMX" { ix86_expand_vector_move (V4HImode, operands); *************** *** 17955,17962 **** }) (define_expand "movv8qi" ! [(set (match_operand:V8QI 0 "general_operand" "") ! (match_operand:V8QI 1 "general_operand" ""))] "TARGET_MMX" { ix86_expand_vector_move (V8QImode, operands); --- 18050,18057 ---- }) (define_expand "movv8qi" ! [(set (match_operand:V8QI 0 "nonimmediate_operand" "") ! (match_operand:V8QI 1 "nonimmediate_operand" ""))] "TARGET_MMX" { ix86_expand_vector_move (V8QImode, operands); *************** *** 17964,17977 **** }) (define_expand "movv2sf" ! [(set (match_operand:V2SF 0 "general_operand" "") ! (match_operand:V2SF 1 "general_operand" ""))] "TARGET_3DNOW" { ix86_expand_vector_move (V2SFmode, operands); DONE; }) (define_insn_and_split "*pushti" [(set (match_operand:TI 0 "push_operand" "=<") (match_operand:TI 1 "nonmemory_operand" "x"))] --- 18059,18155 ---- }) (define_expand "movv2sf" ! [(set (match_operand:V2SF 0 "nonimmediate_operand" "") ! (match_operand:V2SF 1 "nonimmediate_operand" ""))] "TARGET_3DNOW" { ix86_expand_vector_move (V2SFmode, operands); DONE; }) + (define_insn "*pushv2df" + [(set (match_operand:V2DF 0 "push_operand" "=<") + (match_operand:V2DF 1 "register_operand" "x"))] + "TARGET_SSE" + "#") + + (define_insn "*pushv2di" + [(set (match_operand:V2DI 0 "push_operand" "=<") + (match_operand:V2DI 1 "register_operand" "x"))] + "TARGET_SSE2" + "#") + + (define_insn "*pushv8hi" + [(set (match_operand:V8HI 0 "push_operand" "=<") + (match_operand:V8HI 1 "register_operand" "x"))] + "TARGET_SSE2" + "#") + + (define_insn "*pushv16qi" + [(set (match_operand:V16QI 0 "push_operand" "=<") + (match_operand:V16QI 1 "register_operand" "x"))] + "TARGET_SSE2" + "#") + + (define_insn "*pushv4sf" + [(set (match_operand:V4SF 0 "push_operand" "=<") + (match_operand:V4SF 1 "register_operand" "x"))] + "TARGET_SSE" + "#") + + (define_insn "*pushv4si" + [(set (match_operand:V4SI 0 "push_operand" "=<") + (match_operand:V4SI 1 "register_operand" "x"))] + "TARGET_SSE2" + "#") + + (define_insn "*pushv2si" + [(set (match_operand:V2SI 0 "push_operand" "=<") + (match_operand:V2SI 1 "register_operand" "y"))] + "TARGET_MMX" + "#") + + (define_insn "*pushv4hi" + [(set (match_operand:V4HI 0 "push_operand" "=<") + (match_operand:V4HI 1 "register_operand" "y"))] + "TARGET_MMX" + "#") + + (define_insn "*pushv8qi" + [(set (match_operand:V8QI 0 "push_operand" "=<") + (match_operand:V8QI 1 "register_operand" "y"))] + "TARGET_MMX" + "#") + + (define_insn "*pushv2sf" + [(set (match_operand:V2SF 0 "push_operand" "=<") + (match_operand:V2SF 1 "register_operand" "y"))] + "TARGET_3DNOW" + "#") + + (define_split + [(set (match_operand 0 "push_operand" "") + (match_operand 1 "register_operand" ""))] + "!TARGET_64BIT && reload_completed + && (SSE_REG_P (operands[1]) || MMX_REG_P (operands[1]))" + [(set (reg:SI 7) (plus:SI (reg:SI 7) (match_dup 3))) + (set (match_dup 2) (match_dup 1))] + "operands[2] = change_address (operands[0], GET_MODE (operands[0]), + stack_pointer_rtx); + operands[3] = GEN_INT (-GET_MODE_SIZE (GET_MODE (operands[0])));") + + (define_split + [(set (match_operand 0 "push_operand" "") + (match_operand 1 "register_operand" ""))] + "TARGET_64BIT && reload_completed + && (SSE_REG_P (operands[1]) || MMX_REG_P (operands[1]))" + [(set (reg:DI 7) (plus:DI (reg:DI 7) (match_dup 3))) + (set (match_dup 2) (match_dup 1))] + "operands[2] = change_address (operands[0], GET_MODE (operands[0]), + stack_pointer_rtx); + operands[3] = GEN_INT (-GET_MODE_SIZE (GET_MODE (operands[0])));") + + (define_insn_and_split "*pushti" [(set (match_operand:TI 0 "push_operand" "=<") (match_operand:TI 1 "nonmemory_operand" "x"))] *************** *** 17981,17987 **** [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TI (reg:SI 7)) (match_dup 1))] "" ! [(set_attr "type" "sse")]) (define_insn_and_split "*pushv4sf" [(set (match_operand:V4SF 0 "push_operand" "=<") --- 18159,18209 ---- [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:TI (reg:SI 7)) (match_dup 1))] "" ! [(set_attr "type" "multi")]) ! ! (define_insn_and_split "*pushv2df" ! [(set (match_operand:V2DF 0 "push_operand" "=<") ! (match_operand:V2DF 1 "nonmemory_operand" "x"))] ! "TARGET_SSE2" ! "#" ! "" ! [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) ! (set (mem:V2DF (reg:SI 7)) (match_dup 1))] ! "" ! [(set_attr "type" "multi")]) ! ! (define_insn_and_split "*pushv2di" ! [(set (match_operand:V2DI 0 "push_operand" "=<") ! (match_operand:V2DI 1 "nonmemory_operand" "x"))] ! "TARGET_SSE2" ! "#" ! "" ! [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) ! (set (mem:V2DI (reg:SI 7)) (match_dup 1))] ! "" ! [(set_attr "type" "multi")]) ! ! (define_insn_and_split "*pushv8hi" ! [(set (match_operand:V8HI 0 "push_operand" "=<") ! (match_operand:V8HI 1 "nonmemory_operand" "x"))] ! "TARGET_SSE2" ! "#" ! "" ! [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) ! (set (mem:V8HI (reg:SI 7)) (match_dup 1))] ! "" ! [(set_attr "type" "multi")]) ! ! (define_insn_and_split "*pushv16qi" ! [(set (match_operand:V16QI 0 "push_operand" "=<") ! (match_operand:V16QI 1 "nonmemory_operand" "x"))] ! "TARGET_SSE2" ! "#" ! "" ! [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) ! (set (mem:V16QI (reg:SI 7)) (match_dup 1))] ! "" ! [(set_attr "type" "multi")]) (define_insn_and_split "*pushv4sf" [(set (match_operand:V4SF 0 "push_operand" "=<") *************** *** 17992,17998 **** [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:V4SF (reg:SI 7)) (match_dup 1))] "" ! [(set_attr "type" "sse")]) (define_insn_and_split "*pushv4si" [(set (match_operand:V4SI 0 "push_operand" "=<") --- 18214,18220 ---- [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:V4SF (reg:SI 7)) (match_dup 1))] "" ! [(set_attr "type" "multi")]) (define_insn_and_split "*pushv4si" [(set (match_operand:V4SI 0 "push_operand" "=<") *************** *** 18003,18009 **** [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:V4SI (reg:SI 7)) (match_dup 1))] "" ! [(set_attr "type" "sse")]) (define_insn_and_split "*pushv2si" [(set (match_operand:V2SI 0 "push_operand" "=<") --- 18225,18231 ---- [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -16))) (set (mem:V4SI (reg:SI 7)) (match_dup 1))] "" ! [(set_attr "type" "multi")]) (define_insn_and_split "*pushv2si" [(set (match_operand:V2SI 0 "push_operand" "=<") *************** *** 18051,18067 **** (define_insn "movti_internal" [(set (match_operand:TI 0 "nonimmediate_operand" "=x,x,m") ! (match_operand:TI 1 "general_operand" "O,xm,x"))] ! "TARGET_SSE && !TARGET_64BIT" "@ xorps\t%0, %0 movaps\t{%1, %0|%0, %1} movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "*movti_rex64" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o,x,mx,x") ! (match_operand:TI 1 "general_operand" "riFo,riF,O,x,m"))] "TARGET_64BIT && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ --- 18273,18291 ---- (define_insn "movti_internal" [(set (match_operand:TI 0 "nonimmediate_operand" "=x,x,m") ! (match_operand:TI 1 "vector_move_operand" "C,xm,x"))] ! "TARGET_SSE && !TARGET_64BIT ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ xorps\t%0, %0 movaps\t{%1, %0|%0, %1} movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov,ssemov,ssemov") ! (set_attr "mode" "V4SF")]) (define_insn "*movti_rex64" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o,x,mx,x") ! (match_operand:TI 1 "general_operand" "riFo,riF,C,x,m"))] "TARGET_64BIT && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ *************** *** 18070,18077 **** xorps\t%0, %0 movaps\\t{%1, %0|%0, %1} movaps\\t{%1, %0|%0, %1}" ! [(set_attr "type" "*,*,sse,sse,sse") ! (set_attr "mode" "TI")]) (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") --- 18294,18301 ---- xorps\t%0, %0 movaps\\t{%1, %0|%0, %1} movaps\\t{%1, %0|%0, %1}" ! [(set_attr "type" "*,*,ssemov,ssemov,ssemov") ! (set_attr "mode" "V4SF")]) (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") *************** *** 18085,18156 **** ;; movaps or movups (define_insn "sse_movaps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") ! (unspec:V4SF ! [(match_operand:V4SF 1 "nonimmediate_operand" "xm,x")] 38))] ! "TARGET_SSE" ! "@ ! movaps\t{%1, %0|%0, %1} ! movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "sse_movups" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") ! (unspec:V4SF ! [(match_operand:V4SF 1 "nonimmediate_operand" "xm,x")] 39))] ! "TARGET_SSE" ! "@ ! movups\t{%1, %0|%0, %1} ! movups\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) ;; SSE Strange Moves. (define_insn "sse_movmskps" [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_operand:V4SF 1 "register_operand" "x")] 33))] "TARGET_SSE" "movmskps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "mmx_pmovmskb" [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_operand:V8QI 1 "register_operand" "y")] 33))] "TARGET_SSE || TARGET_3DNOW_A" "pmovmskb\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "mmx_maskmovq" [(set (mem:V8QI (match_operand:SI 0 "register_operand" "D")) (unspec:V8QI [(match_operand:V8QI 1 "register_operand" "y") ! (match_operand:V8QI 2 "register_operand" "y")] 32))] "(TARGET_SSE || TARGET_3DNOW_A) && !TARGET_64BIT" ;; @@@ check ordering of operands in intel/nonintel syntax "maskmovq\t{%2, %1|%1, %2}" ! [(set_attr "type" "sse")]) (define_insn "mmx_maskmovq_rex" [(set (mem:V8QI (match_operand:DI 0 "register_operand" "D")) (unspec:V8QI [(match_operand:V8QI 1 "register_operand" "y") ! (match_operand:V8QI 2 "register_operand" "y")] 32))] "(TARGET_SSE || TARGET_3DNOW_A) && TARGET_64BIT" ;; @@@ check ordering of operands in intel/nonintel syntax "maskmovq\t{%2, %1|%1, %2}" ! [(set_attr "type" "sse")]) (define_insn "sse_movntv4sf" [(set (match_operand:V4SF 0 "memory_operand" "=m") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "x")] 34))] "TARGET_SSE" "movntps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "sse_movntdi" [(set (match_operand:DI 0 "memory_operand" "=m") ! (unspec:DI [(match_operand:DI 1 "register_operand" "y")] 34))] "TARGET_SSE || TARGET_3DNOW_A" "movntq\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "sse_movhlps" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18309,18393 ---- ;; movaps or movups (define_insn "sse_movaps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") ! (unspec:V4SF [(match_operand:V4SF 1 "nonimmediate_operand" "xm,x")] ! UNSPEC_MOVA))] ! "TARGET_SSE ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "movaps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov,ssemov") ! (set_attr "mode" "V4SF")]) (define_insn "sse_movups" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") ! (unspec:V4SF [(match_operand:V4SF 1 "nonimmediate_operand" "xm,x")] ! UNSPEC_MOVU))] ! "TARGET_SSE ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "movups\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt,ssecvt") ! (set_attr "mode" "V4SF")]) ;; SSE Strange Moves. (define_insn "sse_movmskps" [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_operand:V4SF 1 "register_operand" "x")] ! UNSPEC_MOVMSK))] "TARGET_SSE" "movmskps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "mmx_pmovmskb" [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_operand:V8QI 1 "register_operand" "y")] ! UNSPEC_MOVMSK))] "TARGET_SSE || TARGET_3DNOW_A" "pmovmskb\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) ! (define_insn "mmx_maskmovq" [(set (mem:V8QI (match_operand:SI 0 "register_operand" "D")) (unspec:V8QI [(match_operand:V8QI 1 "register_operand" "y") ! (match_operand:V8QI 2 "register_operand" "y")] ! UNSPEC_MASKMOV))] "(TARGET_SSE || TARGET_3DNOW_A) && !TARGET_64BIT" ;; @@@ check ordering of operands in intel/nonintel syntax "maskmovq\t{%2, %1|%1, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_maskmovq_rex" [(set (mem:V8QI (match_operand:DI 0 "register_operand" "D")) (unspec:V8QI [(match_operand:V8QI 1 "register_operand" "y") ! (match_operand:V8QI 2 "register_operand" "y")] ! UNSPEC_MASKMOV))] "(TARGET_SSE || TARGET_3DNOW_A) && TARGET_64BIT" ;; @@@ check ordering of operands in intel/nonintel syntax "maskmovq\t{%2, %1|%1, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "sse_movntv4sf" [(set (match_operand:V4SF 0 "memory_operand" "=m") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "x")] ! UNSPEC_MOVNT))] "TARGET_SSE" "movntps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "V4SF")]) (define_insn "sse_movntdi" [(set (match_operand:DI 0 "memory_operand" "=m") ! (unspec:DI [(match_operand:DI 1 "register_operand" "y")] ! UNSPEC_MOVNT))] "TARGET_SSE || TARGET_3DNOW_A" "movntq\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxmov") ! (set_attr "mode" "DI")]) (define_insn "sse_movhlps" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18164,18170 **** (const_int 3)))] "TARGET_SSE" "movhlps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sse_movlhps" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18401,18408 ---- (const_int 3)))] "TARGET_SSE" "movhlps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "sse_movlhps" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18178,18184 **** (const_int 12)))] "TARGET_SSE" "movlhps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sse_movhps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") --- 18416,18423 ---- (const_int 12)))] "TARGET_SSE" "movlhps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "sse_movhps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") *************** *** 18189,18195 **** "TARGET_SSE && (GET_CODE (operands[1]) == MEM || GET_CODE (operands[2]) == MEM)" "movhps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sse_movlps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") --- 18428,18435 ---- "TARGET_SSE && (GET_CODE (operands[1]) == MEM || GET_CODE (operands[2]) == MEM)" "movhps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "sse_movlps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,m") *************** *** 18200,18206 **** "TARGET_SSE && (GET_CODE (operands[1]) == MEM || GET_CODE (operands[2]) == MEM)" "movlps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sse_loadss" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18440,18447 ---- "TARGET_SSE && (GET_CODE (operands[1]) == MEM || GET_CODE (operands[2]) == MEM)" "movlps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "sse_loadss" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18210,18216 **** (const_int 1)))] "TARGET_SSE" "movss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "sse_movss" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18451,18458 ---- (const_int 1)))] "TARGET_SSE" "movss\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "SF")]) (define_insn "sse_movss" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18220,18226 **** (const_int 1)))] "TARGET_SSE" "movss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sse_storess" [(set (match_operand:SF 0 "memory_operand" "=m") --- 18462,18469 ---- (const_int 1)))] "TARGET_SSE" "movss\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "SF")]) (define_insn "sse_storess" [(set (match_operand:SF 0 "memory_operand" "=m") *************** *** 18229,18245 **** (parallel [(const_int 0)])))] "TARGET_SSE" "movss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "sse_shufps" [(set (match_operand:V4SF 0 "register_operand" "=x") (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "0") (match_operand:V4SF 2 "nonimmediate_operand" "xm") ! (match_operand:SI 3 "immediate_operand" "i")] 41))] "TARGET_SSE" ;; @@@ check operand order for intel/nonintel syntax "shufps\t{%3, %2, %0|%0, %2, %3}" ! [(set_attr "type" "sse")]) ;; SSE arithmetic --- 18472,18491 ---- (parallel [(const_int 0)])))] "TARGET_SSE" "movss\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "SF")]) (define_insn "sse_shufps" [(set (match_operand:V4SF 0 "register_operand" "=x") (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "0") (match_operand:V4SF 2 "nonimmediate_operand" "xm") ! (match_operand:SI 3 "immediate_operand" "i")] ! UNSPEC_SHUFFLE))] "TARGET_SSE" ;; @@@ check operand order for intel/nonintel syntax "shufps\t{%3, %2, %0|%0, %2, %3}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) ;; SSE arithmetic *************** *** 18250,18256 **** (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "addps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "vmaddv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18496,18503 ---- (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "addps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "V4SF")]) (define_insn "vmaddv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18261,18267 **** (const_int 1)))] "TARGET_SSE" "addss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "subv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18508,18515 ---- (const_int 1)))] "TARGET_SSE" "addss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "SF")]) (define_insn "subv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18269,18275 **** (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "subps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "vmsubv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18517,18524 ---- (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "subps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "V4SF")]) (define_insn "vmsubv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18280,18286 **** (const_int 1)))] "TARGET_SSE" "subss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "mulv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18529,18536 ---- (const_int 1)))] "TARGET_SSE" "subss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "SF")]) (define_insn "mulv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18288,18294 **** (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "mulps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "vmmulv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18538,18545 ---- (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "mulps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssemul") ! (set_attr "mode" "V4SF")]) (define_insn "vmmulv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18299,18305 **** (const_int 1)))] "TARGET_SSE" "mulss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "divv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18550,18557 ---- (const_int 1)))] "TARGET_SSE" "mulss\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssemul") ! (set_attr "mode" "SF")]) (define_insn "divv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18307,18313 **** (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "divps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "vmdivv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18559,18566 ---- (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "divps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssediv") ! (set_attr "mode" "V4SF")]) (define_insn "vmdivv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18318,18324 **** (const_int 1)))] "TARGET_SSE" "divss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ;; SSE square root/reciprocal --- 18571,18578 ---- (const_int 1)))] "TARGET_SSE" "divss\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssediv") ! (set_attr "mode" "SF")]) ;; SSE square root/reciprocal *************** *** 18326,18370 **** (define_insn "rcpv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (unspec:V4SF ! [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] 42))] "TARGET_SSE" "rcpps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "vmrcpv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_merge:V4SF ! (unspec:V4SF [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] 42) (match_operand:V4SF 2 "register_operand" "0") (const_int 1)))] "TARGET_SSE" "rcpss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "rsqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (unspec:V4SF ! [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] 43))] "TARGET_SSE" "rsqrtps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "vmrsqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_merge:V4SF ! (unspec:V4SF [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] 43) (match_operand:V4SF 2 "register_operand" "0") (const_int 1)))] "TARGET_SSE" "rsqrtss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "sqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (sqrt:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "xm")))] "TARGET_SSE" "sqrtps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "vmsqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 18580,18631 ---- (define_insn "rcpv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (unspec:V4SF ! [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] UNSPEC_RCP))] "TARGET_SSE" "rcpps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "V4SF")]) (define_insn "vmrcpv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_merge:V4SF ! (unspec:V4SF [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] ! UNSPEC_RCP) (match_operand:V4SF 2 "register_operand" "0") (const_int 1)))] "TARGET_SSE" "rcpss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "SF")]) (define_insn "rsqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (unspec:V4SF ! [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] UNSPEC_RSQRT))] "TARGET_SSE" "rsqrtps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "V4SF")]) (define_insn "vmrsqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_merge:V4SF ! (unspec:V4SF [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] ! UNSPEC_RSQRT) (match_operand:V4SF 2 "register_operand" "0") (const_int 1)))] "TARGET_SSE" "rsqrtss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "SF")]) (define_insn "sqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") (sqrt:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "xm")))] "TARGET_SSE" "sqrtps\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "V4SF")]) (define_insn "vmsqrtv4sf2" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18374,18579 **** (const_int 1)))] "TARGET_SSE" "sqrtss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) ;; SSE logical operations. ;; These are not called andti3 etc. because we really really don't want ;; the compiler to widen DImode ands to TImode ands and then try to move ;; into DImode subregs of SSE registers, and them together, and move out ;; of DImode subregs again! ! (define_insn "*sse_andti3_df_1" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (and:TI (subreg:TI (match_operand:DF 1 "register_operand" "%0") 0) ! (subreg:TI (match_operand:DF 2 "register_operand" "Y") 0)))] ! "TARGET_SSE2" ! "andpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! ! (define_insn "*sse_andti3_df_2" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (and:TI (subreg:TI (match_operand:DF 1 "register_operand" "0") 0) ! (match_operand:TI 2 "nonimmediate_operand" "Ym")))] ! "TARGET_SSE2" ! "andpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_andti3_sf_1" [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (and:TI (subreg:TI (match_operand:SF 1 "register_operand" "%0") 0) ! (subreg:TI (match_operand:SF 2 "register_operand" "x") 0)))] ! "TARGET_SSE" "andps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_andti3_sf_2" [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (and:TI (subreg:TI (match_operand:SF 1 "register_operand" "0") 0) ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" ! "andps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "sse_andti3" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE && !TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "andps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_andti3_sse2" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "pand\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_nandti3_df" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (and:TI (not:TI (subreg:TI (match_operand:DF 1 "register_operand" "0") 0)) ! (match_operand:TI 2 "nonimmediate_operand" "Ym")))] ! "TARGET_SSE2" ! "andnpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_nandti3_sf" [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (and:TI (not:TI (subreg:TI (match_operand:SF 1 "register_operand" "0") 0)) (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE" ! "andnps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "sse_nandti3" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE && !TARGET_SSE2" ! "andnps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_nandti3_sse2" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2" ! "pnand\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_iorti3_df_1" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (ior:TI (subreg:TI (match_operand:DF 1 "register_operand" "%0") 0) ! (subreg:TI (match_operand:DF 2 "register_operand" "Y") 0)))] "TARGET_SSE2" ! "orpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_iorti3_df_2" [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (ior:TI (subreg:TI (match_operand:DF 1 "register_operand" "0") 0) (match_operand:TI 2 "nonimmediate_operand" "Ym")))] "TARGET_SSE2" ! "orpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! ! (define_insn "*sse_iorti3_sf_1" ! [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (ior:TI (subreg:TI (match_operand:SF 1 "register_operand" "%0") 0) ! (subreg:TI (match_operand:SF 2 "register_operand" "x") 0)))] ! "TARGET_SSE" ! "orps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_iorti3_sf_2" ! [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (ior:TI (subreg:TI (match_operand:SF 1 "register_operand" "0") 0) ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE" ! "orps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "sse_iorti3" ! [(set (match_operand:TI 0 "register_operand" "=x") (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE && !TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "orps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_iorti3_sse2" ! [(set (match_operand:TI 0 "register_operand" "=x") (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "por\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_xorti3_df_1" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (xor:TI (subreg:TI (match_operand:DF 1 "register_operand" "%0") 0) ! (subreg:TI (match_operand:DF 2 "register_operand" "Y") 0)))] "TARGET_SSE2" "xorpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_xorti3_df_2" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (xor:TI (subreg:TI (match_operand:DF 1 "register_operand" "0") 0) ! (match_operand:TI 2 "nonimmediate_operand" "Ym")))] ! "TARGET_SSE2" "xorpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_xorti3_sf_1" ! [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (xor:TI (subreg:TI (match_operand:SF 1 "register_operand" "%0") 0) ! (subreg:TI (match_operand:SF 2 "register_operand" "x") 0)))] ! "TARGET_SSE" ! "xorps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_xorti3_sf_2" ! [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (xor:TI (subreg:TI (match_operand:SF 1 "register_operand" "0") 0) (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE" ! "xorps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "sse_xorti3" [(set (match_operand:TI 0 "register_operand" "=x") ! (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE && !TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "xorps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! (define_insn "*sse_xorti3_sse2" [(set (match_operand:TI 0 "register_operand" "=x") (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "pxor\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ;; Use xor, but don't show input operands so they aren't live before ;; this insn. (define_insn "sse_clrv4sf" [(set (match_operand:V4SF 0 "register_operand" "=x") ! (unspec:V4SF [(const_int 0)] 45))] "TARGET_SSE" "xorps\t{%0, %0|%0, %0}" ! [(set_attr "type" "sse") ! (set_attr "memory" "none")]) ;; SSE mask-generating compares --- 18635,18992 ---- (const_int 1)))] "TARGET_SSE" "sqrtss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "SF")]) ;; SSE logical operations. + ;; SSE defines logical operations on floating point values. This brings + ;; interesting challenge to RTL representation where logicals are only valid + ;; on integral types. We deal with this by representing the floating point + ;; logical as logical on arguments casted to TImode as this is what hardware + ;; really does. Unfortunately hardware requires the type information to be + ;; present and thus we must avoid subregs from being simplified and elliminated + ;; in later compilation phases. + ;; + ;; We have following variants from each instruction: + ;; sse_andsf3 - the operation taking V4SF vector operands + ;; and doing TImode cast on them + ;; *sse_andsf3_memory - the operation taking one memory operand casted to + ;; TImode, since backend insist on elliminating casts + ;; on memory operands + ;; sse_andti3_sf_1 - the operation taking SF scalar operands. + ;; We can not accept memory operand here as instruction reads + ;; whole scalar. This is generated only post reload by GCC + ;; scalar float operations that expands to logicals (fabs) + ;; sse_andti3_sf_2 - the operation taking SF scalar input and TImode + ;; memory operand. Eventually combine can be able + ;; to synthetize these using splitter. + ;; sse2_anddf3, *sse2_anddf3_memory + ;; + ;; ;; These are not called andti3 etc. because we really really don't want ;; the compiler to widen DImode ands to TImode ands and then try to move ;; into DImode subregs of SSE registers, and them together, and move out ;; of DImode subregs again! + ;; SSE1 single precision floating point logical operation + (define_expand "sse_andv4sf3" + [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) + (and:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0) + (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] + "TARGET_SSE" + "") ! (define_insn "*sse_andv4sf3" ! [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) ! (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "andps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! (define_insn "*sse_andsf3" [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "andps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! (define_expand "sse_nandv4sf3" ! [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) ! (and:TI (not:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)) ! (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] ! "TARGET_SSE" ! "") ! ! (define_insn "*sse_nandv4sf3" ! [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) ! (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE" ! "andnps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! ! (define_insn "*sse_nandsf3" [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" ! "andnps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! (define_expand "sse_iorv4sf3" ! [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) ! (ior:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0) ! (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] ! "TARGET_SSE" ! "") ! ! (define_insn "*sse_iorv4sf3" ! [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) ! (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "orps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! (define_insn "*sse_iorsf3" ! [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "orps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! (define_expand "sse_xorv4sf3" ! [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0) ! (xor:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0) ! (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))] ! "TARGET_SSE ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "") ! (define_insn "*sse_xorv4sf3" ! [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "=x") 0) ! (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "xorps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! ! (define_insn "*sse_xorsf3" [(set (subreg:TI (match_operand:SF 0 "register_operand" "=x") 0) ! (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "xorps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V4SF")]) ! ;; SSE2 double precision floating point logical operation ! ! (define_expand "sse2_andv2df3" ! [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) ! (and:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0) ! (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] ! "TARGET_SSE2" ! "") ! ! (define_insn "*sse2_andv2df3" ! [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) ! (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "andpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V2DF")]) ! (define_insn "*sse2_andv2df3" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=x") 0) ! (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] + "TARGET_SSE2 + && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" + "andpd\t{%2, %0|%0, %2}" + [(set_attr "type" "sselog") + (set_attr "mode" "V2DF")]) + + (define_expand "sse2_nandv2df3" + [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) + (and:TI (not:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0)) + (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] "TARGET_SSE2" ! "") ! (define_insn "*sse2_nandv2df3" ! [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) ! (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2" ! "andnpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V2DF")]) ! (define_insn "*sse_nandti3_df" [(set (subreg:TI (match_operand:DF 0 "register_operand" "=Y") 0) ! (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) (match_operand:TI 2 "nonimmediate_operand" "Ym")))] "TARGET_SSE2" ! "andnpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V2DF")]) ! (define_expand "sse2_iorv2df3" ! [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) ! (ior:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0) ! (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] ! "TARGET_SSE2" ! "") ! (define_insn "*sse2_iorv2df3" ! [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "orpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V2DF")]) ! (define_insn "*sse2_iordf3" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=x") 0) (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "orpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V2DF")]) ! (define_expand "sse2_xorv2df3" ! [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0) ! (xor:TI (subreg:TI (match_operand:V2DF 1 "nonimmediate_operand" "") 0) ! (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))] "TARGET_SSE2" + "") + + (define_insn "*sse2_xorv2df3" + [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "=x") 0) + (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") + (match_operand:TI 2 "nonimmediate_operand" "xm")))] + "TARGET_SSE2 + && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "xorpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V2DF")]) ! (define_insn "*sse2_xordf3" ! [(set (subreg:TI (match_operand:DF 0 "register_operand" "=x") 0) ! (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "xorpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "V2DF")]) ! ;; SSE2 integral logicals. These patterns must always come after floating ! ;; point ones since we don't want compiler to use integer opcodes on floating ! ;; point SSE values to avoid matching of subregs in the match_operand. ! (define_insn "*sse2_andti3" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (and:TI (match_operand:TI 1 "nonimmediate_operand" "%0") ! (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "pand\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ! (define_insn "sse2_andv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (and:V2DI (match_operand:V2DI 1 "nonimmediate_operand" "%0") ! (match_operand:V2DI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "pand\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ! ! (define_insn "*sse2_nandti3" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (and:TI (not:TI (match_operand:TI 1 "register_operand" "0")) (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pandn\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ! (define_insn "sse2_nandv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (and:V2DI (not:V2DI (match_operand:V2DI 1 "nonimmediate_operand" "0")) ! (match_operand:V2DI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "pandn\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ! ! (define_insn "*sse2_iorti3" [(set (match_operand:TI 0 "register_operand" "=x") ! (ior:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "por\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ! (define_insn "sse2_iorv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (ior:V2DI (match_operand:V2DI 1 "nonimmediate_operand" "%0") ! (match_operand:V2DI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "por\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ! ! (define_insn "*sse2_xorti3" [(set (match_operand:TI 0 "register_operand" "=x") (xor:TI (match_operand:TI 1 "nonimmediate_operand" "%0") (match_operand:TI 2 "nonimmediate_operand" "xm")))] "TARGET_SSE2 && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "pxor\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_xorv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (xor:V2DI (match_operand:V2DI 1 "nonimmediate_operand" "%0") ! (match_operand:V2DI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2 ! && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" ! "pxor\t{%2, %0|%0, %2}" ! [(set_attr "type" "sselog") ! (set_attr "mode" "TI")]) ;; Use xor, but don't show input operands so they aren't live before ;; this insn. (define_insn "sse_clrv4sf" [(set (match_operand:V4SF 0 "register_operand" "=x") ! (unspec:V4SF [(const_int 0)] UNSPEC_NOP))] "TARGET_SSE" "xorps\t{%0, %0|%0, %0}" ! [(set_attr "type" "sselog") ! (set_attr "memory" "none") ! (set_attr "mode" "V4SF")]) ! ! ;; Use xor, but don't show input operands so they aren't live before ! ;; this insn. ! (define_insn "sse_clrv2df" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (unspec:V2DF [(const_int 0)] UNSPEC_NOP))] ! "TARGET_SSE2" ! "xorpd\t{%0, %0|%0, %0}" ! [(set_attr "type" "sselog") ! (set_attr "memory" "none") ! (set_attr "mode" "V4SF")]) ;; SSE mask-generating compares *************** *** 18584,18590 **** (match_operand:V4SF 2 "register_operand" "x")]))] "TARGET_SSE" "cmp%D3ps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "maskncmpv4sf3" [(set (match_operand:V4SI 0 "register_operand" "=x") --- 18997,19004 ---- (match_operand:V4SF 2 "register_operand" "x")]))] "TARGET_SSE" "cmp%D3ps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "V4SF")]) (define_insn "maskncmpv4sf3" [(set (match_operand:V4SI 0 "register_operand" "=x") *************** *** 18599,18605 **** else return "cmpn%D3ps\t{%2, %0|%0, %2}"; } ! [(set_attr "type" "sse")]) (define_insn "vmmaskcmpv4sf3" [(set (match_operand:V4SI 0 "register_operand" "=x") --- 19013,19020 ---- else return "cmpn%D3ps\t{%2, %0|%0, %2}"; } ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "V4SF")]) (define_insn "vmmaskcmpv4sf3" [(set (match_operand:V4SI 0 "register_operand" "=x") *************** *** 18607,18617 **** (match_operator:V4SI 3 "sse_comparison_operator" [(match_operand:V4SF 1 "register_operand" "0") (match_operand:V4SF 2 "register_operand" "x")]) ! (match_dup 1) (const_int 1)))] "TARGET_SSE" "cmp%D3ss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "vmmaskncmpv4sf3" [(set (match_operand:V4SI 0 "register_operand" "=x") --- 19022,19033 ---- (match_operator:V4SI 3 "sse_comparison_operator" [(match_operand:V4SF 1 "register_operand" "0") (match_operand:V4SF 2 "register_operand" "x")]) ! (subreg:V4SI (match_dup 1) 0) (const_int 1)))] "TARGET_SSE" "cmp%D3ss\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "SF")]) (define_insn "vmmaskncmpv4sf3" [(set (match_operand:V4SI 0 "register_operand" "=x") *************** *** 18629,18661 **** else return "cmpn%D3ss\t{%2, %0|%0, %2}"; } ! [(set_attr "type" "sse")]) (define_insn "sse_comi" [(set (reg:CCFP 17) ! (match_operator:CCFP 2 "sse_comparison_operator" ! [(vec_select:SF ! (match_operand:V4SF 0 "register_operand" "x") ! (parallel [(const_int 0)])) ! (vec_select:SF ! (match_operand:V4SF 1 "register_operand" "x") ! (parallel [(const_int 0)]))]))] "TARGET_SSE" "comiss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "sse_ucomi" [(set (reg:CCFPU 17) ! (match_operator:CCFPU 2 "sse_comparison_operator" ! [(vec_select:SF ! (match_operand:V4SF 0 "register_operand" "x") ! (parallel [(const_int 0)])) ! (vec_select:SF ! (match_operand:V4SF 1 "register_operand" "x") ! (parallel [(const_int 0)]))]))] "TARGET_SSE" "ucomiss\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) ;; SSE unpack --- 19045,19078 ---- else return "cmpn%D3ss\t{%2, %0|%0, %2}"; } ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "SF")]) (define_insn "sse_comi" [(set (reg:CCFP 17) ! (compare:CCFP (vec_select:SF ! (match_operand:V4SF 0 "register_operand" "x") ! (parallel [(const_int 0)])) ! (vec_select:SF ! (match_operand:V4SF 1 "register_operand" "x") ! (parallel [(const_int 0)]))))] "TARGET_SSE" "comiss\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "SF")]) (define_insn "sse_ucomi" [(set (reg:CCFPU 17) ! (compare:CCFPU (vec_select:SF ! (match_operand:V4SF 0 "register_operand" "x") ! (parallel [(const_int 0)])) ! (vec_select:SF ! (match_operand:V4SF 1 "register_operand" "x") ! (parallel [(const_int 0)]))))] "TARGET_SSE" "ucomiss\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "SF")]) ;; SSE unpack *************** *** 18676,18682 **** (const_int 5)))] "TARGET_SSE" "unpckhps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sse_unpcklps" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 19093,19100 ---- (const_int 5)))] "TARGET_SSE" "unpckhps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "sse_unpcklps" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18694,18700 **** (const_int 5)))] "TARGET_SSE" "unpcklps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ;; SSE min/max --- 19112,19119 ---- (const_int 5)))] "TARGET_SSE" "unpcklps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) ;; SSE min/max *************** *** 18705,18711 **** (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "maxps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "vmsmaxv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 19124,19131 ---- (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "maxps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse") ! (set_attr "mode" "V4SF")]) (define_insn "vmsmaxv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18716,18722 **** (const_int 1)))] "TARGET_SSE" "maxss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sminv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 19136,19143 ---- (const_int 1)))] "TARGET_SSE" "maxss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse") ! (set_attr "mode" "SF")]) (define_insn "sminv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18724,18730 **** (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "minps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "vmsminv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 19145,19152 ---- (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE" "minps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse") ! (set_attr "mode" "V4SF")]) (define_insn "vmsminv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18735,18742 **** (const_int 1)))] "TARGET_SSE" "minss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ! ;; SSE <-> integer/MMX conversions --- 19157,19164 ---- (const_int 1)))] "TARGET_SSE" "minss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse") ! (set_attr "mode" "SF")]) ;; SSE <-> integer/MMX conversions *************** *** 18749,18755 **** (const_int 12)))] "TARGET_SSE" "cvtpi2ps\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "cvtps2pi" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19171,19178 ---- (const_int 12)))] "TARGET_SSE" "cvtpi2ps\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "cvtps2pi" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 18758,18773 **** (parallel [(const_int 0) (const_int 1)])))] "TARGET_SSE" "cvtps2pi\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "cvttps2pi" [(set (match_operand:V2SI 0 "register_operand" "=y") (vec_select:V2SI ! (unspec:V4SI [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] 30) (parallel [(const_int 0) (const_int 1)])))] "TARGET_SSE" "cvttps2pi\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "cvtsi2ss" [(set (match_operand:V4SF 0 "register_operand" "=x") --- 19181,19199 ---- (parallel [(const_int 0) (const_int 1)])))] "TARGET_SSE" "cvtps2pi\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) (define_insn "cvttps2pi" [(set (match_operand:V2SI 0 "register_operand" "=y") (vec_select:V2SI ! (unspec:V4SI [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] ! UNSPEC_FIX) (parallel [(const_int 0) (const_int 1)])))] "TARGET_SSE" "cvttps2pi\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SF")]) (define_insn "cvtsi2ss" [(set (match_operand:V4SF 0 "register_operand" "=x") *************** *** 18778,18784 **** (const_int 14)))] "TARGET_SSE" "cvtsi2ss\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "cvtss2si" [(set (match_operand:SI 0 "register_operand" "=r") --- 19204,19224 ---- (const_int 14)))] "TARGET_SSE" "cvtsi2ss\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SF")]) ! ! (define_insn "cvtsi2ssq" ! [(set (match_operand:V4SF 0 "register_operand" "=x,x") ! (vec_merge:V4SF ! (match_operand:V4SF 1 "register_operand" "0,0") ! (vec_duplicate:V4SF ! (float:SF (match_operand:DI 2 "nonimmediate_operand" "r,rm"))) ! (const_int 14)))] ! "TARGET_SSE && TARGET_64BIT" ! "cvtsi2ssq\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "athlon_decode" "vector,vector") ! (set_attr "mode" "SF")]) (define_insn "cvtss2si" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 18787,18802 **** (parallel [(const_int 0)])))] "TARGET_SSE" "cvtss2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) (define_insn "cvttss2si" [(set (match_operand:SI 0 "register_operand" "=r") (vec_select:SI ! (unspec:V4SI [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] 30) (parallel [(const_int 0)])))] "TARGET_SSE" "cvttss2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse")]) ;; MMX insns --- 19227,19268 ---- (parallel [(const_int 0)])))] "TARGET_SSE" "cvtss2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SF")]) ! ! (define_insn "cvtss2siq" ! [(set (match_operand:DI 0 "register_operand" "=r,r") ! (vec_select:DI ! (fix:V4DI (match_operand:V4SF 1 "nonimmediate_operand" "x,m")) ! (parallel [(const_int 0)])))] ! "TARGET_SSE" ! "cvtss2siq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "athlon_decode" "vector,vector") ! (set_attr "mode" "SF")]) (define_insn "cvttss2si" [(set (match_operand:SI 0 "register_operand" "=r") (vec_select:SI ! (unspec:V4SI [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] ! UNSPEC_FIX) (parallel [(const_int 0)])))] "TARGET_SSE" "cvttss2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SF")]) ! ! (define_insn "cvttss2siq" ! [(set (match_operand:DI 0 "register_operand" "=r,r") ! (vec_select:DI ! (unspec:V4DI [(match_operand:V4SF 1 "nonimmediate_operand" "x,xm")] ! UNSPEC_FIX) ! (parallel [(const_int 0)])))] ! "TARGET_SSE && TARGET_64BIT" ! "cvttss2siq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SF") ! (set_attr "athlon_decode" "vector,vector")]) ;; MMX insns *************** *** 18805,18863 **** (define_insn "addv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") ! (plus:V8QI (match_operand:V8QI 1 "register_operand" "0") (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "addv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") ! (plus:V4HI (match_operand:V4HI 1 "register_operand" "0") (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "addv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") ! (plus:V2SI (match_operand:V2SI 1 "register_operand" "0") (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "ssaddv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") ! (ss_plus:V8QI (match_operand:V8QI 1 "register_operand" "0") (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddsb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "ssaddv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") ! (ss_plus:V4HI (match_operand:V4HI 1 "register_operand" "0") (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "usaddv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") ! (us_plus:V8QI (match_operand:V8QI 1 "register_operand" "0") (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddusb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "usaddv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") ! (us_plus:V4HI (match_operand:V4HI 1 "register_operand" "0") (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddusw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "subv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19271,19347 ---- (define_insn "addv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") ! (plus:V8QI (match_operand:V8QI 1 "register_operand" "%0") (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "addv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") ! (plus:V4HI (match_operand:V4HI 1 "register_operand" "%0") (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "addv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") ! (plus:V2SI (match_operand:V2SI 1 "register_operand" "%0") (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) ! ! (define_insn "mmx_adddi3" ! [(set (match_operand:DI 0 "register_operand" "=y") ! (unspec:DI ! [(plus:DI (match_operand:DI 1 "register_operand" "%0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] ! UNSPEC_NOP))] ! "TARGET_MMX" ! "paddq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "ssaddv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") ! (ss_plus:V8QI (match_operand:V8QI 1 "register_operand" "%0") (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddsb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "ssaddv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") ! (ss_plus:V4HI (match_operand:V4HI 1 "register_operand" "%0") (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "usaddv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") ! (us_plus:V8QI (match_operand:V8QI 1 "register_operand" "%0") (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddusb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "usaddv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") ! (us_plus:V4HI (match_operand:V4HI 1 "register_operand" "%0") (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "paddusw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "subv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 18865,18871 **** (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "subv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19349,19356 ---- (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "subv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 18873,18879 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "subv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19358,19365 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "subv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 18881,18887 **** (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "sssubv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19367,19385 ---- (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) ! ! (define_insn "mmx_subdi3" ! [(set (match_operand:DI 0 "register_operand" "=y") ! (unspec:DI ! [(minus:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] ! UNSPEC_NOP))] ! "TARGET_MMX" ! "psubq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "sssubv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 18889,18895 **** (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubsb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "sssubv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19387,19394 ---- (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubsb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "sssubv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 18897,18903 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "ussubv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19396,19403 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "ussubv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 18905,18911 **** (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubusb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "ussubv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19405,19412 ---- (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubusb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "ussubv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 18913,18919 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubusw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mulv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19414,19421 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "psubusw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "mulv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 18921,18927 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pmullw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "smulv4hi3_highpart" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19423,19430 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pmullw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxmul") ! (set_attr "mode" "DI")]) (define_insn "smulv4hi3_highpart" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 18934,18940 **** (const_int 16))))] "TARGET_MMX" "pmulhw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "umulv4hi3_highpart" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19437,19444 ---- (const_int 16))))] "TARGET_MMX" "pmulhw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxmul") ! (set_attr "mode" "DI")]) (define_insn "umulv4hi3_highpart" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 18947,18953 **** (const_int 16))))] "TARGET_SSE || TARGET_3DNOW_A" "pmulhuw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_pmaddwd" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19451,19458 ---- (const_int 16))))] "TARGET_SSE || TARGET_3DNOW_A" "pmulhuw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxmul") ! (set_attr "mode" "DI")]) (define_insn "mmx_pmaddwd" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 18968,18974 **** (const_int 3)]))))))] "TARGET_MMX" "pmaddwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; MMX logical operations --- 19473,19480 ---- (const_int 3)]))))))] "TARGET_MMX" "pmaddwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxmul") ! (set_attr "mode" "DI")]) ;; MMX logical operations *************** *** 18978,19026 **** (define_insn "mmx_iordi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI ! [(ior:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] 45))] "TARGET_MMX" "por\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_xordi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI ! [(xor:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] 45))] "TARGET_MMX" "pxor\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx") (set_attr "memory" "none")]) ;; Same as pxor, but don't show input operands so that we don't think ;; they are live. (define_insn "mmx_clrdi" [(set (match_operand:DI 0 "register_operand" "=y") ! (unspec:DI [(const_int 0)] 45))] "TARGET_MMX" "pxor\t{%0, %0|%0, %0}" ! [(set_attr "type" "mmx") (set_attr "memory" "none")]) (define_insn "mmx_anddi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI ! [(and:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] 45))] "TARGET_MMX" "pand\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_nanddi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI [(and:DI (not:DI (match_operand:DI 1 "register_operand" "0")) ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] 45))] "TARGET_MMX" "pandn\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; MMX unsigned averages/sum of absolute differences --- 19484,19541 ---- (define_insn "mmx_iordi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI ! [(ior:DI (match_operand:DI 1 "register_operand" "%0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] ! UNSPEC_NOP))] "TARGET_MMX" "por\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "mmx_xordi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI ! [(xor:DI (match_operand:DI 1 "register_operand" "%0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] ! UNSPEC_NOP))] "TARGET_MMX" "pxor\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI") (set_attr "memory" "none")]) ;; Same as pxor, but don't show input operands so that we don't think ;; they are live. (define_insn "mmx_clrdi" [(set (match_operand:DI 0 "register_operand" "=y") ! (unspec:DI [(const_int 0)] UNSPEC_NOP))] "TARGET_MMX" "pxor\t{%0, %0|%0, %0}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI") (set_attr "memory" "none")]) (define_insn "mmx_anddi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI ! [(and:DI (match_operand:DI 1 "register_operand" "%0") ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] ! UNSPEC_NOP))] "TARGET_MMX" "pand\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "mmx_nanddi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI [(and:DI (not:DI (match_operand:DI 1 "register_operand" "0")) ! (match_operand:DI 2 "nonimmediate_operand" "ym"))] ! UNSPEC_NOP))] "TARGET_MMX" "pandn\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) ;; MMX unsigned averages/sum of absolute differences *************** *** 19042,19048 **** (const_int 1)))] "TARGET_SSE || TARGET_3DNOW_A" "pavgb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "mmx_uavgv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19557,19564 ---- (const_int 1)))] "TARGET_SSE || TARGET_3DNOW_A" "pavgb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "mmx_uavgv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19057,19071 **** (const_int 1)))] "TARGET_SSE || TARGET_3DNOW_A" "pavgw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "mmx_psadbw" ! [(set (match_operand:V8QI 0 "register_operand" "=y") ! (abs:V8QI (minus:V8QI (match_operand:V8QI 1 "register_operand" "0") ! (match_operand:V8QI 2 "nonimmediate_operand" "ym"))))] "TARGET_SSE || TARGET_3DNOW_A" "psadbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ;; MMX insert/extract/shuffle --- 19573,19590 ---- (const_int 1)))] "TARGET_SSE || TARGET_3DNOW_A" "pavgw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "mmx_psadbw" ! [(set (match_operand:DI 0 "register_operand" "=y") ! (unspec:DI [(match_operand:V8QI 1 "register_operand" "0") ! (match_operand:V8QI 2 "nonimmediate_operand" "ym")] ! UNSPEC_PSADBW))] "TARGET_SSE || TARGET_3DNOW_A" "psadbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) ;; MMX insert/extract/shuffle *************** *** 19078,19084 **** (match_operand:SI 3 "immediate_operand" "i")))] "TARGET_SSE || TARGET_3DNOW_A" "pinsrw\t{%3, %2, %0|%0, %2, %3}" ! [(set_attr "type" "sse")]) (define_insn "mmx_pextrw" [(set (match_operand:SI 0 "register_operand" "=r") --- 19597,19604 ---- (match_operand:SI 3 "immediate_operand" "i")))] "TARGET_SSE || TARGET_3DNOW_A" "pinsrw\t{%3, %2, %0|%0, %2, %3}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_pextrw" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 19087,19101 **** [(match_operand:SI 2 "immediate_operand" "i")]))))] "TARGET_SSE || TARGET_3DNOW_A" "pextrw\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "sse")]) (define_insn "mmx_pshufw" [(set (match_operand:V4HI 0 "register_operand" "=y") (unspec:V4HI [(match_operand:V4HI 1 "register_operand" "0") ! (match_operand:SI 2 "immediate_operand" "i")] 41))] "TARGET_SSE || TARGET_3DNOW_A" "pshufw\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "sse")]) ;; MMX mask-generating comparisons --- 19607,19624 ---- [(match_operand:SI 2 "immediate_operand" "i")]))))] "TARGET_SSE || TARGET_3DNOW_A" "pextrw\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_pshufw" [(set (match_operand:V4HI 0 "register_operand" "=y") (unspec:V4HI [(match_operand:V4HI 1 "register_operand" "0") ! (match_operand:SI 2 "immediate_operand" "i")] ! UNSPEC_SHUFFLE))] "TARGET_SSE || TARGET_3DNOW_A" "pshufw\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) ;; MMX mask-generating comparisons *************** *** 19106,19112 **** (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpeqb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "eqv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19629,19636 ---- (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpeqb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "DI")]) (define_insn "eqv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19114,19120 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpeqw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "eqv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19638,19645 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpeqw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "DI")]) (define_insn "eqv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19122,19128 **** (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpeqd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "gtv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19647,19654 ---- (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpeqd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "DI")]) (define_insn "gtv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 19130,19136 **** (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpgtb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "gtv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19656,19663 ---- (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpgtb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "DI")]) (define_insn "gtv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19138,19144 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpgtw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "gtv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19665,19672 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpgtw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "DI")]) (define_insn "gtv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19146,19152 **** (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpgtd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; MMX max/min insns --- 19674,19681 ---- (match_operand:V2SI 2 "nonimmediate_operand" "ym")))] "TARGET_MMX" "pcmpgtd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "DI")]) ;; MMX max/min insns *************** *** 19157,19163 **** (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pmaxub\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "smaxv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19686,19693 ---- (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pmaxub\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "smaxv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19165,19171 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pmaxsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "uminv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19695,19702 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pmaxsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "uminv8qi3" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 19173,19179 **** (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pminub\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) (define_insn "sminv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19704,19711 ---- (match_operand:V8QI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pminub\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) (define_insn "sminv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19181,19187 **** (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pminsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sse")]) ;; MMX shifts --- 19713,19720 ---- (match_operand:V4HI 2 "nonimmediate_operand" "ym")))] "TARGET_SSE || TARGET_3DNOW_A" "pminsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "DI")]) ;; MMX shifts *************** *** 19192,19198 **** (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psraw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "ashrv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19725,19732 ---- (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psraw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "ashrv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19200,19206 **** (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psrad\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "lshrv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19734,19741 ---- (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psrad\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "lshrv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19208,19214 **** (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psrlw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "lshrv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19743,19750 ---- (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psrlw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "lshrv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19216,19232 **** (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psrld\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; See logical MMX insns. (define_insn "mmx_lshrdi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI [(lshiftrt:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonmemory_operand" "yi"))] 45))] "TARGET_MMX" "psrlq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "ashlv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19752,19771 ---- (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psrld\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) ;; See logical MMX insns. (define_insn "mmx_lshrdi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI [(lshiftrt:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonmemory_operand" "yi"))] ! UNSPEC_NOP))] "TARGET_MMX" "psrlq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "ashlv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19234,19240 **** (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psllw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "ashlv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19773,19780 ---- (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "psllw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "ashlv2si3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19242,19258 **** (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "pslld\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; See logical MMX insns. (define_insn "mmx_ashldi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI [(ashift:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonmemory_operand" "yi"))] 45))] "TARGET_MMX" "psllq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; MMX pack/unpack insns. --- 19782,19801 ---- (match_operand:DI 2 "nonmemory_operand" "yi")))] "TARGET_MMX" "pslld\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) ;; See logical MMX insns. (define_insn "mmx_ashldi3" [(set (match_operand:DI 0 "register_operand" "=y") (unspec:DI [(ashift:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "nonmemory_operand" "yi"))] ! UNSPEC_NOP))] "TARGET_MMX" "psllq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) ;; MMX pack/unpack insns. *************** *** 19264,19270 **** (ss_truncate:V4QI (match_operand:V4HI 2 "register_operand" "y"))))] "TARGET_MMX" "packsswb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_packssdw" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19807,19814 ---- (ss_truncate:V4QI (match_operand:V4HI 2 "register_operand" "y"))))] "TARGET_MMX" "packsswb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "mmx_packssdw" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19273,19279 **** (ss_truncate:V2HI (match_operand:V2SI 2 "register_operand" "y"))))] "TARGET_MMX" "packssdw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_packuswb" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19817,19824 ---- (ss_truncate:V2HI (match_operand:V2SI 2 "register_operand" "y"))))] "TARGET_MMX" "packssdw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "mmx_packuswb" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 19282,19288 **** (us_truncate:V4QI (match_operand:V4HI 2 "register_operand" "y"))))] "TARGET_MMX" "packuswb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_punpckhbw" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19827,19834 ---- (us_truncate:V4QI (match_operand:V4HI 2 "register_operand" "y"))))] "TARGET_MMX" "packuswb\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "DI")]) (define_insn "mmx_punpckhbw" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 19308,19314 **** (const_int 85)))] "TARGET_MMX" "punpckhbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_punpckhwd" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19854,19861 ---- (const_int 85)))] "TARGET_MMX" "punpckhbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_punpckhwd" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19326,19346 **** (const_int 5)))] "TARGET_MMX" "punpckhwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_punpckhdq" [(set (match_operand:V2SI 0 "register_operand" "=y") (vec_merge:V2SI ! (vec_select:V2SI (match_operand:V2SI 1 "register_operand" "0") ! (parallel [(const_int 0) ! (const_int 1)])) (vec_select:V2SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1) (const_int 0)])) (const_int 1)))] "TARGET_MMX" "punpckhdq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_punpcklbw" [(set (match_operand:V8QI 0 "register_operand" "=y") --- 19873,19893 ---- (const_int 5)))] "TARGET_MMX" "punpckhwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_punpckhdq" [(set (match_operand:V2SI 0 "register_operand" "=y") (vec_merge:V2SI ! (match_operand:V2SI 1 "register_operand" "0") (vec_select:V2SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1) (const_int 0)])) (const_int 1)))] "TARGET_MMX" "punpckhdq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_punpcklbw" [(set (match_operand:V8QI 0 "register_operand" "=y") *************** *** 19366,19372 **** (const_int 85)))] "TARGET_MMX" "punpcklbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_punpcklwd" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 19913,19920 ---- (const_int 85)))] "TARGET_MMX" "punpcklbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_punpcklwd" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19384,19390 **** (const_int 5)))] "TARGET_MMX" "punpcklwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mmx_punpckldq" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 19932,19939 ---- (const_int 5)))] "TARGET_MMX" "punpcklwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) (define_insn "mmx_punpckldq" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19392,19410 **** (vec_select:V2SI (match_operand:V2SI 1 "register_operand" "0") (parallel [(const_int 1) (const_int 0)])) ! (vec_select:V2SI (match_operand:V2SI 2 "register_operand" "y") ! (parallel [(const_int 0) ! (const_int 1)])) (const_int 1)))] "TARGET_MMX" "punpckldq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; Miscellaneous stuff (define_insn "emms" ! [(unspec_volatile [(const_int 0)] 31) (clobber (reg:XF 8)) (clobber (reg:XF 9)) (clobber (reg:XF 10)) --- 19941,19958 ---- (vec_select:V2SI (match_operand:V2SI 1 "register_operand" "0") (parallel [(const_int 1) (const_int 0)])) ! (match_operand:V2SI 2 "register_operand" "y") (const_int 1)))] "TARGET_MMX" "punpckldq\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "DI")]) ;; Miscellaneous stuff (define_insn "emms" ! [(unspec_volatile [(const_int 0)] UNSPECV_EMMS) (clobber (reg:XF 8)) (clobber (reg:XF 9)) (clobber (reg:XF 10)) *************** *** 19427,19449 **** (set_attr "memory" "unknown")]) (define_insn "ldmxcsr" ! [(unspec_volatile [(match_operand:SI 0 "memory_operand" "m")] 37)] ! "TARGET_MMX" "ldmxcsr\t%0" ! [(set_attr "type" "mmx") (set_attr "memory" "load")]) (define_insn "stmxcsr" [(set (match_operand:SI 0 "memory_operand" "=m") ! (unspec_volatile:SI [(const_int 0)] 40))] ! "TARGET_MMX" "stmxcsr\t%0" ! [(set_attr "type" "mmx") (set_attr "memory" "store")]) (define_expand "sfence" [(set (match_dup 0) ! (unspec:BLK [(match_dup 0)] 44))] "TARGET_SSE || TARGET_3DNOW_A" { operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); --- 19975,19998 ---- (set_attr "memory" "unknown")]) (define_insn "ldmxcsr" ! [(unspec_volatile [(match_operand:SI 0 "memory_operand" "m")] ! UNSPECV_LDMXCSR)] ! "TARGET_SSE" "ldmxcsr\t%0" ! [(set_attr "type" "sse") (set_attr "memory" "load")]) (define_insn "stmxcsr" [(set (match_operand:SI 0 "memory_operand" "=m") ! (unspec_volatile:SI [(const_int 0)] UNSPECV_STMXCSR))] ! "TARGET_SSE" "stmxcsr\t%0" ! [(set_attr "type" "sse") (set_attr "memory" "store")]) (define_expand "sfence" [(set (match_dup 0) ! (unspec:BLK [(match_dup 0)] UNSPEC_SFENCE))] "TARGET_SSE || TARGET_3DNOW_A" { operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); *************** *** 19452,19458 **** (define_insn "*sfence_insn" [(set (match_operand:BLK 0 "" "") ! (unspec:BLK [(match_dup 0)] 44))] "TARGET_SSE || TARGET_3DNOW_A" "sfence" [(set_attr "type" "sse") --- 20001,20007 ---- (define_insn "*sfence_insn" [(set (match_operand:BLK 0 "" "") ! (unspec:BLK [(match_dup 0)] UNSPEC_SFENCE))] "TARGET_SSE || TARGET_3DNOW_A" "sfence" [(set_attr "type" "sse") *************** *** 19467,19473 **** (reg:DI 25) (reg:DI 26) (reg:DI 27) ! (reg:DI 28)] 13)) (use (match_operand:DI 1 "register_operand" "")) (use (match_operand:DI 2 "immediate_operand" "")) (use (label_ref:DI (match_operand 3 "" "")))])] --- 20016,20022 ---- (reg:DI 25) (reg:DI 26) (reg:DI 27) ! (reg:DI 28)] UNSPEC_SSE_PROLOGUE_SAVE)) (use (match_operand:DI 1 "register_operand" "")) (use (match_operand:DI 2 "immediate_operand" "")) (use (label_ref:DI (match_operand 3 "" "")))])] *************** *** 19484,19490 **** (reg:DI 25) (reg:DI 26) (reg:DI 27) ! (reg:DI 28)] 13)) (use (match_operand:DI 1 "register_operand" "r")) (use (match_operand:DI 2 "const_int_operand" "i")) (use (label_ref:DI (match_operand 3 "" "X")))] --- 20033,20039 ---- (reg:DI 25) (reg:DI 26) (reg:DI 27) ! (reg:DI 28)] UNSPEC_SSE_PROLOGUE_SAVE)) (use (match_operand:DI 1 "register_operand" "r")) (use (match_operand:DI 2 "const_int_operand" "i")) (use (label_ref:DI (match_operand 3 "" "X")))] *************** *** 19527,19533 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfadd\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "subv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20076,20083 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfadd\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "subv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19535,19541 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfsub\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "subrv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20085,20092 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfsub\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "subrv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19543,19549 **** (match_operand:V2SF 1 "register_operand" "0")))] "TARGET_3DNOW" "pfsubr\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "gtv2sf3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 20094,20101 ---- (match_operand:V2SF 1 "register_operand" "0")))] "TARGET_3DNOW" "pfsubr\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "gtv2sf3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19551,19557 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfcmpgt\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "gev2sf3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 20103,20110 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfcmpgt\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "V2SF")]) (define_insn "gev2sf3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19559,19565 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfcmpge\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "eqv2sf3" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 20112,20119 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfcmpge\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "V2SF")]) (define_insn "eqv2sf3" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19567,19573 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfcmpeq\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pfmaxv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20121,20128 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfcmpeq\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxcmp") ! (set_attr "mode" "V2SF")]) (define_insn "pfmaxv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19575,19581 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfmax\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pfminv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20130,20137 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfmax\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "pfminv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19583,19589 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfmin\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "mulv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20139,20146 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfmin\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "mulv2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19591,19600 **** (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfmul\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "femms" ! [(unspec_volatile [(const_int 0)] 46) (clobber (reg:XF 8)) (clobber (reg:XF 9)) (clobber (reg:XF 10)) --- 20148,20158 ---- (match_operand:V2SF 2 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pfmul\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxmul") ! (set_attr "mode" "V2SF")]) (define_insn "femms" ! [(unspec_volatile [(const_int 0)] UNSPECV_FEMMS) (clobber (reg:XF 8)) (clobber (reg:XF 9)) (clobber (reg:XF 10)) *************** *** 19613,19626 **** (clobber (reg:DI 36))] "TARGET_3DNOW" "femms" ! [(set_attr "type" "mmx")]) (define_insn "pf2id" [(set (match_operand:V2SI 0 "register_operand" "=y") (fix:V2SI (match_operand:V2SF 1 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pf2id\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "pf2iw" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 20171,20186 ---- (clobber (reg:DI 36))] "TARGET_3DNOW" "femms" ! [(set_attr "type" "mmx") ! (set_attr "memory" "none")]) (define_insn "pf2id" [(set (match_operand:V2SI 0 "register_operand" "=y") (fix:V2SI (match_operand:V2SF 1 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pf2id\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "V2SF")]) (define_insn "pf2iw" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19629,19635 **** (fix:V2SI (match_operand:V2SF 1 "nonimmediate_operand" "ym")))))] "TARGET_3DNOW_A" "pf2iw\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "pfacc" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20189,20196 ---- (fix:V2SI (match_operand:V2SF 1 "nonimmediate_operand" "ym")))))] "TARGET_3DNOW_A" "pf2iw\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "V2SF")]) (define_insn "pfacc" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19646,19652 **** (parallel [(const_int 1)])))))] "TARGET_3DNOW" "pfacc\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pfnacc" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20207,20214 ---- (parallel [(const_int 1)])))))] "TARGET_3DNOW" "pfacc\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "pfnacc" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19663,19669 **** (parallel [(const_int 1)])))))] "TARGET_3DNOW_A" "pfnacc\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pfpnacc" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20225,20232 ---- (parallel [(const_int 1)])))))] "TARGET_3DNOW_A" "pfnacc\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "pfpnacc" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19680,19686 **** (parallel [(const_int 1)])))))] "TARGET_3DNOW_A" "pfpnacc\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pi2fw" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20243,20250 ---- (parallel [(const_int 1)])))))] "TARGET_3DNOW_A" "pfpnacc\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxadd") ! (set_attr "mode" "V2SF")]) (define_insn "pi2fw" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19696,19709 **** (parallel [(const_int 1)])))))))] "TARGET_3DNOW_A" "pi2fw\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "floatv2si2" [(set (match_operand:V2SF 0 "register_operand" "=y") (float:V2SF (match_operand:V2SI 1 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pi2fd\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) ;; This insn is identical to pavgb in operation, but the opcode is ;; different. To avoid accidentally matching pavgb, use an unspec. --- 20260,20275 ---- (parallel [(const_int 1)])))))))] "TARGET_3DNOW_A" "pi2fw\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "V2SF")]) (define_insn "floatv2si2" [(set (match_operand:V2SF 0 "register_operand" "=y") (float:V2SF (match_operand:V2SI 1 "nonimmediate_operand" "ym")))] "TARGET_3DNOW" "pi2fd\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "V2SF")]) ;; This insn is identical to pavgb in operation, but the opcode is ;; different. To avoid accidentally matching pavgb, use an unspec. *************** *** 19712,19761 **** [(set (match_operand:V8QI 0 "register_operand" "=y") (unspec:V8QI [(match_operand:V8QI 1 "register_operand" "0") ! (match_operand:V8QI 2 "nonimmediate_operand" "ym")] 49))] "TARGET_3DNOW" "pavgusb\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) ;; 3DNow reciprical and sqrt (define_insn "pfrcpv2sf2" [(set (match_operand:V2SF 0 "register_operand" "=y") ! (unspec:V2SF [(match_operand:V2SF 1 "nonimmediate_operand" "ym")] 50))] "TARGET_3DNOW" "pfrcp\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "pfrcpit1v2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "0") ! (match_operand:V2SF 2 "nonimmediate_operand" "ym")] 51))] "TARGET_3DNOW" "pfrcpit1\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pfrcpit2v2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "0") ! (match_operand:V2SF 2 "nonimmediate_operand" "ym")] 52))] "TARGET_3DNOW" "pfrcpit2\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pfrsqrtv2sf2" [(set (match_operand:V2SF 0 "register_operand" "=y") ! (unspec:V2SF [(match_operand:V2SF 1 "nonimmediate_operand" "ym")] 53))] "TARGET_3DNOW" ! "pfrsqrt\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "pfrsqit1v2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "0") ! (match_operand:V2SF 2 "nonimmediate_operand" "ym")] 54))] "TARGET_3DNOW" "pfrsqit1\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pmulhrwv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") --- 20278,20339 ---- [(set (match_operand:V8QI 0 "register_operand" "=y") (unspec:V8QI [(match_operand:V8QI 1 "register_operand" "0") ! (match_operand:V8QI 2 "nonimmediate_operand" "ym")] ! UNSPEC_PAVGUSB))] "TARGET_3DNOW" "pavgusb\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxshft") ! (set_attr "mode" "TI")]) ;; 3DNow reciprical and sqrt (define_insn "pfrcpv2sf2" [(set (match_operand:V2SF 0 "register_operand" "=y") ! (unspec:V2SF [(match_operand:V2SF 1 "nonimmediate_operand" "ym")] ! UNSPEC_PFRCP))] "TARGET_3DNOW" "pfrcp\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx") ! (set_attr "mode" "TI")]) (define_insn "pfrcpit1v2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "0") ! (match_operand:V2SF 2 "nonimmediate_operand" "ym")] ! UNSPEC_PFRCPIT1))] "TARGET_3DNOW" "pfrcpit1\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx") ! (set_attr "mode" "TI")]) (define_insn "pfrcpit2v2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "0") ! (match_operand:V2SF 2 "nonimmediate_operand" "ym")] ! UNSPEC_PFRCPIT2))] "TARGET_3DNOW" "pfrcpit2\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx") ! (set_attr "mode" "TI")]) (define_insn "pfrsqrtv2sf2" [(set (match_operand:V2SF 0 "register_operand" "=y") ! (unspec:V2SF [(match_operand:V2SF 1 "nonimmediate_operand" "ym")] ! UNSPEC_PFRSQRT))] "TARGET_3DNOW" ! "pfrsqrt\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx") ! (set_attr "mode" "TI")]) (define_insn "pfrsqit1v2sf3" [(set (match_operand:V2SF 0 "register_operand" "=y") (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "0") ! (match_operand:V2SF 2 "nonimmediate_operand" "ym")] ! UNSPEC_PFRSQIT1))] "TARGET_3DNOW" "pfrsqit1\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx") ! (set_attr "mode" "TI")]) (define_insn "pmulhrwv4hi3" [(set (match_operand:V4HI 0 "register_operand" "=y") *************** *** 19774,19780 **** (const_int 16))))] "TARGET_3DNOW" "pmulhrw\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmx")]) (define_insn "pswapdv2si2" [(set (match_operand:V2SI 0 "register_operand" "=y") --- 20352,20359 ---- (const_int 16))))] "TARGET_3DNOW" "pmulhrw\\t{%2, %0|%0, %2}" ! [(set_attr "type" "mmxmul") ! (set_attr "mode" "TI")]) (define_insn "pswapdv2si2" [(set (match_operand:V2SI 0 "register_operand" "=y") *************** *** 19782,19788 **** (parallel [(const_int 1) (const_int 0)])))] "TARGET_3DNOW_A" "pswapd\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_insn "pswapdv2sf2" [(set (match_operand:V2SF 0 "register_operand" "=y") --- 20361,20368 ---- (parallel [(const_int 1) (const_int 0)])))] "TARGET_3DNOW_A" "pswapd\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "TI")]) (define_insn "pswapdv2sf2" [(set (match_operand:V2SF 0 "register_operand" "=y") *************** *** 19790,19796 **** (parallel [(const_int 1) (const_int 0)])))] "TARGET_3DNOW_A" "pswapd\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmx")]) (define_expand "prefetch" [(prefetch (match_operand 0 "address_operand" "") --- 20370,20377 ---- (parallel [(const_int 1) (const_int 0)])))] "TARGET_3DNOW_A" "pswapd\\t{%1, %0|%0, %1}" ! [(set_attr "type" "mmxcvt") ! (set_attr "mode" "TI")]) (define_expand "prefetch" [(prefetch (match_operand 0 "address_operand" "") *************** *** 19853,19859 **** return patterns[locality]; } ! [(set_attr "type" "sse")]) (define_insn "*prefetch_3dnow" [(prefetch (match_operand:SI 0 "address_operand" "p") --- 20434,20441 ---- return patterns[locality]; } ! [(set_attr "type" "sse") ! (set_attr "memory" "none")]) (define_insn "*prefetch_3dnow" [(prefetch (match_operand:SI 0 "address_operand" "p") *************** *** 19880,19883 **** else return "prefetchw\t%a0"; } ! [(set_attr "type" "mmx")]) --- 20462,22028 ---- else return "prefetchw\t%a0"; } ! [(set_attr "type" "mmx") ! (set_attr "memory" "none")]) ! ! ;; SSE2 support ! ! (define_insn "addv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (plus:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "addpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmaddv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (plus:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")) ! (match_dup 1) ! (const_int 1)))] ! "TARGET_SSE2" ! "addsd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "DF")]) ! ! (define_insn "subv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (minus:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "subpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmsubv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (minus:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")) ! (match_dup 1) ! (const_int 1)))] ! "TARGET_SSE2" ! "subsd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "DF")]) ! ! (define_insn "mulv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (mult:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "mulpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssemul") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmmulv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (mult:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")) ! (match_dup 1) ! (const_int 1)))] ! "TARGET_SSE2" ! "mulsd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssemul") ! (set_attr "mode" "DF")]) ! ! (define_insn "divv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (div:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "divpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssediv") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmdivv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (div:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")) ! (match_dup 1) ! (const_int 1)))] ! "TARGET_SSE2" ! "divsd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssediv") ! (set_attr "mode" "DF")]) ! ! ;; SSE min/max ! ! (define_insn "smaxv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (smax:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "maxpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmsmaxv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (smax:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")) ! (match_dup 1) ! (const_int 1)))] ! "TARGET_SSE2" ! "maxsd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "DF")]) ! ! (define_insn "sminv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (smin:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "minpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmsminv2df3" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (smin:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm")) ! (match_dup 1) ! (const_int 1)))] ! "TARGET_SSE2" ! "minsd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseadd") ! (set_attr "mode" "DF")]) ! ;; SSE2 square root. There doesn't appear to be an extension for the ! ;; reciprocal/rsqrt instructions if the Intel manual is to be believed. ! ! (define_insn "sqrtv2df2" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (sqrt:V2DF (match_operand:V2DF 1 "register_operand" "xm")))] ! "TARGET_SSE2" ! "sqrtpd\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmsqrtv2df2" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (sqrt:V2DF (match_operand:V2DF 1 "register_operand" "xm")) ! (match_operand:V2DF 2 "register_operand" "0") ! (const_int 1)))] ! "TARGET_SSE2" ! "sqrtsd\t{%1, %0|%0, %1}" ! [(set_attr "type" "sse") ! (set_attr "mode" "SF")]) ! ! ;; SSE mask-generating compares ! ! (define_insn "maskcmpv2df3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (match_operator:V2DI 3 "sse_comparison_operator" ! [(match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "x")]))] ! "TARGET_SSE2" ! "cmp%D3pd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "maskncmpv2df3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (not:V2DI ! (match_operator:V2DI 3 "sse_comparison_operator" ! [(match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "x")])))] ! "TARGET_SSE2" ! { ! if (GET_CODE (operands[3]) == UNORDERED) ! return "cmpordps\t{%2, %0|%0, %2}"; ! else ! return "cmpn%D3pd\t{%2, %0|%0, %2}"; ! } ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "vmmaskcmpv2df3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (vec_merge:V2DI ! (match_operator:V2DI 3 "sse_comparison_operator" ! [(match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "x")]) ! (subreg:V2DI (match_dup 1) 0) ! (const_int 1)))] ! "TARGET_SSE2" ! "cmp%D3sd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "DF")]) ! ! (define_insn "vmmaskncmpv2df3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (vec_merge:V2DI ! (not:V2DI ! (match_operator:V2DI 3 "sse_comparison_operator" ! [(match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "x")])) ! (subreg:V2DI (match_dup 1) 0) ! (const_int 1)))] ! "TARGET_SSE2" ! { ! if (GET_CODE (operands[3]) == UNORDERED) ! return "cmpordsd\t{%2, %0|%0, %2}"; ! else ! return "cmpn%D3sd\t{%2, %0|%0, %2}"; ! } ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "DF")]) ! ! (define_insn "sse2_comi" ! [(set (reg:CCFP 17) ! (compare:CCFP (vec_select:DF ! (match_operand:V2DF 0 "register_operand" "x") ! (parallel [(const_int 0)])) ! (vec_select:DF ! (match_operand:V2DF 1 "register_operand" "x") ! (parallel [(const_int 0)]))))] ! "TARGET_SSE2" ! "comisd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "DF")]) ! ! (define_insn "sse2_ucomi" ! [(set (reg:CCFPU 17) ! (compare:CCFPU (vec_select:DF ! (match_operand:V2DF 0 "register_operand" "x") ! (parallel [(const_int 0)])) ! (vec_select:DF ! (match_operand:V2DF 1 "register_operand" "x") ! (parallel [(const_int 0)]))))] ! "TARGET_SSE2" ! "ucomisd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "DF")]) ! ! ;; SSE Strange Moves. ! ! (define_insn "sse2_movmskpd" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_operand:V2DF 1 "register_operand" "x")] ! UNSPEC_MOVMSK))] ! "TARGET_SSE2" ! "movmskpd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_pmovmskb" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_operand:V16QI 1 "register_operand" "x")] ! UNSPEC_MOVMSK))] ! "TARGET_SSE2" ! "pmovmskb\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_maskmovdqu" ! [(set (mem:V16QI (match_operand:SI 0 "register_operand" "D")) ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "x") ! (match_operand:V16QI 2 "register_operand" "x")] ! UNSPEC_MASKMOV))] ! "TARGET_SSE2" ! ;; @@@ check ordering of operands in intel/nonintel syntax ! "maskmovdqu\t{%2, %1|%1, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_maskmovdqu_rex64" ! [(set (mem:V16QI (match_operand:DI 0 "register_operand" "D")) ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "x") ! (match_operand:V16QI 2 "register_operand" "x")] ! UNSPEC_MASKMOV))] ! "TARGET_SSE2" ! ;; @@@ check ordering of operands in intel/nonintel syntax ! "maskmovdqu\t{%2, %1|%1, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movntv2df" ! [(set (match_operand:V2DF 0 "memory_operand" "=m") ! (unspec:V2DF [(match_operand:V2DF 1 "register_operand" "x")] ! UNSPEC_MOVNT))] ! "TARGET_SSE2" ! "movntpd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_movntv2di" ! [(set (match_operand:V2DI 0 "memory_operand" "=m") ! (unspec:V2DI [(match_operand:V2DI 1 "register_operand" "x")] ! UNSPEC_MOVNT))] ! "TARGET_SSE2" ! "movntdq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movntsi" ! [(set (match_operand:SI 0 "memory_operand" "=m") ! (unspec:SI [(match_operand:SI 1 "register_operand" "r")] ! UNSPEC_MOVNT))] ! "TARGET_SSE2" ! "movnti\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! ;; SSE <-> integer/MMX conversions ! ! ;; Conversions between SI and SF ! ! (define_insn "cvtdq2ps" ! [(set (match_operand:V4SF 0 "register_operand" "=x") ! (float:V4SF (match_operand:V4SI 1 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "cvtdq2ps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "cvtps2dq" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (fix:V4SI (match_operand:V4SF 1 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "cvtps2dq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "cvttps2dq" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (unspec:V4SI [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] ! UNSPEC_FIX))] ! "TARGET_SSE2" ! "cvttps2dq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! ;; Conversions between SI and DF ! ! (define_insn "cvtdq2pd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (float:V2DF (vec_select:V2SI ! (match_operand:V4SI 1 "nonimmediate_operand" "xm") ! (parallel ! [(const_int 0) ! (const_int 1)]))))] ! "TARGET_SSE2" ! "cvtdq2pd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "cvtpd2dq" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (vec_concat:V4SI ! (fix:V2SI (match_operand:V2DF 1 "nonimmediate_operand" "xm")) ! (const_vector:V2SI [(const_int 0) (const_int 0)])))] ! "TARGET_SSE2" ! "cvtpd2dq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "cvttpd2dq" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (vec_concat:V4SI ! (unspec:V2SI [(match_operand:V2DF 1 "nonimmediate_operand" "xm")] ! UNSPEC_FIX) ! (const_vector:V2SI [(const_int 0) (const_int 0)])))] ! "TARGET_SSE2" ! "cvttpd2dq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "cvtpd2pi" ! [(set (match_operand:V2SI 0 "register_operand" "=y") ! (fix:V2SI (match_operand:V2DF 1 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "cvtpd2pi\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "cvttpd2pi" ! [(set (match_operand:V2SI 0 "register_operand" "=y") ! (unspec:V2SI [(match_operand:V2DF 1 "nonimmediate_operand" "xm")] ! UNSPEC_FIX))] ! "TARGET_SSE2" ! "cvttpd2pi\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "cvtpi2pd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (float:V2DF (match_operand:V2SI 1 "nonimmediate_operand" "ym")))] ! "TARGET_SSE2" ! "cvtpi2pd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! ;; Conversions between SI and DF ! ! (define_insn "cvtsd2si" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (fix:SI (vec_select:DF (match_operand:V2DF 1 "register_operand" "xm") ! (parallel [(const_int 0)]))))] ! "TARGET_SSE2" ! "cvtsd2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SI")]) ! ! (define_insn "cvtsd2siq" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (fix:DI (vec_select:DF (match_operand:V2DF 1 "register_operand" "xm") ! (parallel [(const_int 0)]))))] ! "TARGET_SSE2 && TARGET_64BIT" ! "cvtsd2siq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SI")]) ! ! (define_insn "cvttsd2si" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(vec_select:DF (match_operand:V2DF 1 "register_operand" "xm") ! (parallel [(const_int 0)]))] UNSPEC_FIX))] ! "TARGET_SSE2" ! "cvttsd2si\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SI")]) ! ! (define_insn "cvttsd2siq" ! [(set (match_operand:DI 0 "register_operand" "=r,r") ! (unspec:DI [(vec_select:DF (match_operand:V2DF 1 "register_operand" "x,xm") ! (parallel [(const_int 0)]))] UNSPEC_FIX))] ! "TARGET_SSE2 && TARGET_64BIT" ! "cvttsd2siq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "DI") ! (set_attr "athlon_decode" "vector,vector")]) ! ! (define_insn "cvtsi2sd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (vec_duplicate:V2DF ! (float:DF ! (match_operand:SI 2 "nonimmediate_operand" "rm"))) ! (const_int 2)))] ! "TARGET_SSE2" ! "cvtsi2sd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "DF")]) ! ! (define_insn "cvtsi2sdq" ! [(set (match_operand:V2DF 0 "register_operand" "=x,x") ! (vec_merge:V2DF (match_operand:V2DF 1 "register_operand" "0,0") ! (vec_duplicate:V2DF ! (float:DF ! (match_operand:DI 2 "nonimmediate_operand" "r,rm"))) ! (const_int 2)))] ! "TARGET_SSE2 && TARGET_64BIT" ! "cvtsi2sdq\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "DF") ! (set_attr "athlon_decode" "vector,direct")]) ! ! ;; Conversions between SF and DF ! ! (define_insn "cvtsd2ss" ! [(set (match_operand:V4SF 0 "register_operand" "=x") ! (vec_merge:V4SF (match_operand:V4SF 1 "register_operand" "0") ! (vec_duplicate:V4SF ! (float_truncate:V2SF ! (match_operand:V2DF 2 "register_operand" "xm"))) ! (const_int 14)))] ! "TARGET_SSE2" ! "cvtsd2ss\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "SF")]) ! ! (define_insn "cvtss2sd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (float_extend:V2DF ! (vec_select:V2SF ! (match_operand:V4SF 2 "register_operand" "xm") ! (parallel [(const_int 0) ! (const_int 1)]))) ! (const_int 2)))] ! "TARGET_SSE2" ! "cvtss2sd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "DF")]) ! ! (define_insn "cvtpd2ps" ! [(set (match_operand:V4SF 0 "register_operand" "=x") ! (subreg:V4SF ! (vec_concat:V4SI ! (subreg:V2SI (float_truncate:V2SF ! (match_operand:V2DF 1 "nonimmediate_operand" "xm")) 0) ! (const_vector:V2SI [(const_int 0) (const_int 0)])) 0))] ! "TARGET_SSE2" ! "cvtpd2ps\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V4SF")]) ! ! (define_insn "cvtps2pd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (float_extend:V2DF ! (vec_select:V2SF (match_operand:V4SF 1 "nonimmediate_operand" "xm") ! (parallel [(const_int 0) ! (const_int 1)]))))] ! "TARGET_SSE2" ! "cvtps2pd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! ;; SSE2 variants of MMX insns ! ! ;; MMX arithmetic ! ! (define_insn "addv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (plus:V16QI (match_operand:V16QI 1 "register_operand" "%0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "addv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (plus:V8HI (match_operand:V8HI 1 "register_operand" "%0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "addv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (plus:V4SI (match_operand:V4SI 1 "register_operand" "%0") ! (match_operand:V4SI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "addv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (plus:V2DI (match_operand:V2DI 1 "register_operand" "%0") ! (match_operand:V2DI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "ssaddv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (ss_plus:V16QI (match_operand:V16QI 1 "register_operand" "%0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddsb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "ssaddv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (ss_plus:V8HI (match_operand:V8HI 1 "register_operand" "%0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "usaddv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (us_plus:V16QI (match_operand:V16QI 1 "register_operand" "%0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddusb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "usaddv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (us_plus:V8HI (match_operand:V8HI 1 "register_operand" "%0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "paddusw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "subv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (minus:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "subv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (minus:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "subv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (minus:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (match_operand:V4SI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "subv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (minus:V2DI (match_operand:V2DI 1 "register_operand" "0") ! (match_operand:V2DI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "sssubv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (ss_minus:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubsb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "sssubv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (ss_minus:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "ussubv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (us_minus:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubusb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "ussubv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (us_minus:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "psubusw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "mulv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (mult:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pmullw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseimul") ! (set_attr "mode" "TI")]) ! ! (define_insn "smulv8hi3_highpart" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (truncate:V8HI ! (lshiftrt:V8SI ! (mult:V8SI (sign_extend:V8SI (match_operand:V8HI 1 "register_operand" "0")) ! (sign_extend:V8SI (match_operand:V8HI 2 "nonimmediate_operand" "xm"))) ! (const_int 16))))] ! "TARGET_SSE2" ! "pmulhw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseimul") ! (set_attr "mode" "TI")]) ! ! (define_insn "umulv8hi3_highpart" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (truncate:V8HI ! (lshiftrt:V8SI ! (mult:V8SI (zero_extend:V8SI (match_operand:V8HI 1 "register_operand" "0")) ! (zero_extend:V8SI (match_operand:V8HI 2 "nonimmediate_operand" "xm"))) ! (const_int 16))))] ! "TARGET_SSE2" ! "pmulhuw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseimul") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_umulsidi3" ! [(set (match_operand:DI 0 "register_operand" "=y") ! (mult:DI (zero_extend:DI (vec_select:SI ! (match_operand:V2SI 1 "register_operand" "0") ! (parallel [(const_int 0)]))) ! (zero_extend:DI (vec_select:SI ! (match_operand:V2SI 2 "nonimmediate_operand" "ym") ! (parallel [(const_int 0)])))))] ! "TARGET_SSE2" ! "pmuludq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseimul") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_umulv2siv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (mult:V2DI (zero_extend:V2DI ! (vec_select:V2SI ! (match_operand:V4SI 1 "register_operand" "0") ! (parallel [(const_int 0) (const_int 2)]))) ! (zero_extend:V2DI ! (vec_select:V2SI ! (match_operand:V4SI 2 "nonimmediate_operand" "xm") ! (parallel [(const_int 0) (const_int 2)])))))] ! "TARGET_SSE2" ! "pmuludq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseimul") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_pmaddwd" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (plus:V4SI ! (mult:V4SI ! (sign_extend:V4SI (vec_select:V4HI (match_operand:V8HI 1 "register_operand" "0") ! (parallel [(const_int 0) ! (const_int 2) ! (const_int 4) ! (const_int 6)]))) ! (sign_extend:V4SI (vec_select:V4HI (match_operand:V8HI 2 "nonimmediate_operand" "xm") ! (parallel [(const_int 0) ! (const_int 2) ! (const_int 4) ! (const_int 6)])))) ! (mult:V4SI ! (sign_extend:V4SI (vec_select:V4HI (match_dup 1) ! (parallel [(const_int 1) ! (const_int 3) ! (const_int 5) ! (const_int 7)]))) ! (sign_extend:V4SI (vec_select:V4HI (match_dup 2) ! (parallel [(const_int 1) ! (const_int 3) ! (const_int 5) ! (const_int 7)]))))))] ! "TARGET_SSE2" ! "pmaddwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! ;; Same as pxor, but don't show input operands so that we don't think ! ;; they are live. ! (define_insn "sse2_clrti" ! [(set (match_operand:TI 0 "register_operand" "=x") (const_int 0))] ! "TARGET_SSE2" ! "pxor\t{%0, %0|%0, %0}" ! [(set_attr "type" "sseiadd") ! (set_attr "memory" "none") ! (set_attr "mode" "TI")]) ! ! ;; MMX unsigned averages/sum of absolute differences ! ! (define_insn "sse2_uavgv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (ashiftrt:V16QI ! (plus:V16QI (plus:V16QI ! (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")) ! (const_vector:V16QI [(const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1)])) ! (const_int 1)))] ! "TARGET_SSE2" ! "pavgb\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_uavgv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (ashiftrt:V8HI ! (plus:V8HI (plus:V8HI ! (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")) ! (const_vector:V8HI [(const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1) ! (const_int 1) (const_int 1)])) ! (const_int 1)))] ! "TARGET_SSE2" ! "pavgw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! ;; @@@ this isn't the right representation. ! (define_insn "sse2_psadbw" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (unspec:V2DI [(match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")] ! UNSPEC_PSADBW))] ! "TARGET_SSE2" ! "psadbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! ! ;; MMX insert/extract/shuffle ! ! (define_insn "sse2_pinsrw" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (vec_merge:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (vec_duplicate:V8HI ! (truncate:HI ! (match_operand:SI 2 "nonimmediate_operand" "rm"))) ! (match_operand:SI 3 "immediate_operand" "i")))] ! "TARGET_SSE2" ! "pinsrw\t{%3, %2, %0|%0, %2, %3}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_pextrw" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (zero_extend:SI ! (vec_select:HI (match_operand:V8HI 1 "register_operand" "x") ! (parallel ! [(match_operand:SI 2 "immediate_operand" "i")]))))] ! "TARGET_SSE2" ! "pextrw\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_pshufd" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "0") ! (match_operand:SI 2 "immediate_operand" "i")] ! UNSPEC_SHUFFLE))] ! "TARGET_SSE2" ! "pshufd\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_pshuflw" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "0") ! (match_operand:SI 2 "immediate_operand" "i")] ! UNSPEC_PSHUFLW))] ! "TARGET_SSE2" ! "pshuflw\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_pshufhw" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "0") ! (match_operand:SI 2 "immediate_operand" "i")] ! UNSPEC_PSHUFHW))] ! "TARGET_SSE2" ! "pshufhw\t{%2, %1, %0|%0, %1, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! ;; MMX mask-generating comparisons ! ! (define_insn "eqv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (eq:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pcmpeqb\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "TI")]) ! ! (define_insn "eqv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (eq:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pcmpeqw\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "TI")]) ! ! (define_insn "eqv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (eq:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (match_operand:V4SI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pcmpeqd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "TI")]) ! ! (define_insn "gtv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (gt:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pcmpgtb\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "TI")]) ! ! (define_insn "gtv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (gt:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pcmpgtw\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "TI")]) ! ! (define_insn "gtv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (gt:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (match_operand:V4SI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pcmpgtd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecmp") ! (set_attr "mode" "TI")]) ! ! ! ;; MMX max/min insns ! ! (define_insn "umaxv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (umax:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pmaxub\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "smaxv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (smax:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pmaxsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "uminv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (umin:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (match_operand:V16QI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pminub\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! (define_insn "sminv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (smin:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:V8HI 2 "nonimmediate_operand" "xm")))] ! "TARGET_SSE2" ! "pminsw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseiadd") ! (set_attr "mode" "TI")]) ! ! ! ;; MMX shifts ! ! (define_insn "ashrv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (ashiftrt:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "psraw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashrv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (ashiftrt:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "psrad\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "lshrv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (lshiftrt:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "psrlw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "lshrv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (lshiftrt:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "psrld\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "lshrv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (lshiftrt:V2DI (match_operand:V2DI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "psrlq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashlv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (ashift:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "psllw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashlv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (ashift:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "pslld\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashlv2di3" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (ashift:V2DI (match_operand:V2DI 1 "register_operand" "0") ! (match_operand:TI 2 "nonmemory_operand" "xi")))] ! "TARGET_SSE2" ! "psllq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashrv8hi3_ti" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (ashiftrt:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "psraw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashrv4si3_ti" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (ashiftrt:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "psrad\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "lshrv8hi3_ti" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (lshiftrt:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "psrlw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "lshrv4si3_ti" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (lshiftrt:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "psrld\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "lshrv2di3_ti" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (lshiftrt:V2DI (match_operand:V2DI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "psrlq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashlv8hi3_ti" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (ashift:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "psllw\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashlv4si3_ti" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (ashift:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "pslld\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "ashlv2di3_ti" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (ashift:V2DI (match_operand:V2DI 1 "register_operand" "0") ! (subreg:TI (match_operand:V2DI 2 "nonmemory_operand" "xi") 0)))] ! "TARGET_SSE2" ! "psllq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! ;; See logical MMX insns for the reason for the unspec. Strictly speaking ! ;; we wouldn't need here it since we never generate TImode arithmetic. ! ! ;; There has to be some kind of prize for the weirdest new instruction... ! (define_insn "sse2_ashlti3" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (unspec:TI ! [(ashift:TI (match_operand:TI 1 "register_operand" "0") ! (mult:SI (match_operand:SI 2 "immediate_operand" "i") ! (const_int 8)))] UNSPEC_NOP))] ! "TARGET_SSE2" ! "pslldq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_lshrti3" ! [(set (match_operand:TI 0 "register_operand" "=x") ! (unspec:TI ! [(lshiftrt:TI (match_operand:TI 1 "register_operand" "0") ! (mult:SI (match_operand:SI 2 "immediate_operand" "i") ! (const_int 8)))] UNSPEC_NOP))] ! "TARGET_SSE2" ! "psrldq\t{%2, %0|%0, %2}" ! [(set_attr "type" "sseishft") ! (set_attr "mode" "TI")]) ! ! ;; SSE unpack ! ! (define_insn "sse2_unpckhpd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_concat:V2DF ! (vec_select:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (parallel [(const_int 1)])) ! (vec_select:V2DF (match_operand:V2DF 2 "register_operand" "x") ! (parallel [(const_int 0)]))))] ! "TARGET_SSE2" ! "unpckhpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_unpcklpd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_concat:V2DF ! (vec_select:V2DF (match_operand:V2DF 1 "register_operand" "0") ! (parallel [(const_int 0)])) ! (vec_select:V2DF (match_operand:V2DF 2 "register_operand" "x") ! (parallel [(const_int 1)]))))] ! "TARGET_SSE2" ! "unpcklpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! ;; MMX pack/unpack insns. ! ! (define_insn "sse2_packsswb" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (vec_concat:V16QI ! (ss_truncate:V8QI (match_operand:V8HI 1 "register_operand" "0")) ! (ss_truncate:V8QI (match_operand:V8HI 2 "register_operand" "x"))))] ! "TARGET_SSE2" ! "packsswb\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_packssdw" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (vec_concat:V8HI ! (ss_truncate:V4HI (match_operand:V4SI 1 "register_operand" "0")) ! (ss_truncate:V4HI (match_operand:V4SI 2 "register_operand" "x"))))] ! "TARGET_SSE2" ! "packssdw\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_packuswb" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (vec_concat:V16QI ! (us_truncate:V8QI (match_operand:V8HI 1 "register_operand" "0")) ! (us_truncate:V8QI (match_operand:V8HI 2 "register_operand" "x"))))] ! "TARGET_SSE2" ! "packuswb\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpckhbw" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (vec_merge:V16QI ! (vec_select:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (parallel [(const_int 8) (const_int 0) ! (const_int 9) (const_int 1) ! (const_int 10) (const_int 2) ! (const_int 11) (const_int 3) ! (const_int 12) (const_int 4) ! (const_int 13) (const_int 5) ! (const_int 14) (const_int 6) ! (const_int 15) (const_int 7)])) ! (vec_select:V16QI (match_operand:V16QI 2 "register_operand" "x") ! (parallel [(const_int 0) (const_int 8) ! (const_int 1) (const_int 9) ! (const_int 2) (const_int 10) ! (const_int 3) (const_int 11) ! (const_int 4) (const_int 12) ! (const_int 5) (const_int 13) ! (const_int 6) (const_int 14) ! (const_int 7) (const_int 15)])) ! (const_int 21845)))] ! "TARGET_SSE2" ! "punpckhbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpckhwd" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (vec_merge:V8HI ! (vec_select:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (parallel [(const_int 4) (const_int 0) ! (const_int 5) (const_int 1) ! (const_int 6) (const_int 2) ! (const_int 7) (const_int 3)])) ! (vec_select:V8HI (match_operand:V8HI 2 "register_operand" "x") ! (parallel [(const_int 0) (const_int 4) ! (const_int 1) (const_int 5) ! (const_int 2) (const_int 6) ! (const_int 3) (const_int 7)])) ! (const_int 85)))] ! "TARGET_SSE2" ! "punpckhwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpckhdq" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (vec_merge:V4SI ! (vec_select:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (parallel [(const_int 2) (const_int 0) ! (const_int 3) (const_int 1)])) ! (vec_select:V4SI (match_operand:V4SI 2 "register_operand" "x") ! (parallel [(const_int 0) (const_int 2) ! (const_int 1) (const_int 3)])) ! (const_int 5)))] ! "TARGET_SSE2" ! "punpckhdq\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpcklbw" ! [(set (match_operand:V16QI 0 "register_operand" "=x") ! (vec_merge:V16QI ! (vec_select:V16QI (match_operand:V16QI 1 "register_operand" "0") ! (parallel [(const_int 0) (const_int 8) ! (const_int 1) (const_int 9) ! (const_int 2) (const_int 10) ! (const_int 3) (const_int 11) ! (const_int 4) (const_int 12) ! (const_int 5) (const_int 13) ! (const_int 6) (const_int 14) ! (const_int 7) (const_int 15)])) ! (vec_select:V16QI (match_operand:V16QI 2 "register_operand" "x") ! (parallel [(const_int 8) (const_int 0) ! (const_int 9) (const_int 1) ! (const_int 10) (const_int 2) ! (const_int 11) (const_int 3) ! (const_int 12) (const_int 4) ! (const_int 13) (const_int 5) ! (const_int 14) (const_int 6) ! (const_int 15) (const_int 7)])) ! (const_int 21845)))] ! "TARGET_SSE2" ! "punpcklbw\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpcklwd" ! [(set (match_operand:V8HI 0 "register_operand" "=x") ! (vec_merge:V8HI ! (vec_select:V8HI (match_operand:V8HI 1 "register_operand" "0") ! (parallel [(const_int 0) (const_int 4) ! (const_int 1) (const_int 5) ! (const_int 2) (const_int 6) ! (const_int 3) (const_int 7)])) ! (vec_select:V8HI (match_operand:V8HI 2 "register_operand" "x") ! (parallel [(const_int 4) (const_int 0) ! (const_int 5) (const_int 1) ! (const_int 6) (const_int 2) ! (const_int 7) (const_int 3)])) ! (const_int 85)))] ! "TARGET_SSE2" ! "punpcklwd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpckldq" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (vec_merge:V4SI ! (vec_select:V4SI (match_operand:V4SI 1 "register_operand" "0") ! (parallel [(const_int 0) (const_int 2) ! (const_int 1) (const_int 3)])) ! (vec_select:V4SI (match_operand:V4SI 2 "register_operand" "x") ! (parallel [(const_int 2) (const_int 0) ! (const_int 3) (const_int 1)])) ! (const_int 5)))] ! "TARGET_SSE2" ! "punpckldq\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpcklqdq" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (vec_merge:V2DI ! (vec_select:V2DI (match_operand:V2DI 2 "register_operand" "x") ! (parallel [(const_int 1) ! (const_int 0)])) ! (match_operand:V2DI 1 "register_operand" "0") ! (const_int 1)))] ! "TARGET_SSE2" ! "punpcklqdq\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_punpckhqdq" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (vec_merge:V2DI ! (match_operand:V2DI 1 "register_operand" "0") ! (vec_select:V2DI (match_operand:V2DI 2 "register_operand" "x") ! (parallel [(const_int 1) ! (const_int 0)])) ! (const_int 1)))] ! "TARGET_SSE2" ! "punpckhqdq\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! ;; SSE2 moves ! ! (define_insn "sse2_movapd" ! [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,m") ! (unspec:V2DF [(match_operand:V2DF 1 "nonimmediate_operand" "xm,x")] ! UNSPEC_MOVA))] ! "TARGET_SSE2 ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "movapd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_movupd" ! [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,m") ! (unspec:V2DF [(match_operand:V2DF 1 "nonimmediate_operand" "xm,x")] ! UNSPEC_MOVU))] ! "TARGET_SSE2 ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "movupd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_movdqa" ! [(set (match_operand:V16QI 0 "nonimmediate_operand" "=x,m") ! (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "xm,x")] ! UNSPEC_MOVA))] ! "TARGET_SSE2 ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "movdqa\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movdqu" ! [(set (match_operand:V16QI 0 "nonimmediate_operand" "=x,m") ! (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "xm,x")] ! UNSPEC_MOVU))] ! "TARGET_SSE2 ! && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ! "movdqu\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movdq2q" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=m,y") ! (vec_select:DI (match_operand:V2DI 1 "register_operand" "x,x") ! (parallel [(const_int 0)])))] ! "TARGET_SSE2 && !TARGET_64BIT" ! "@ ! movq\t{%1, %0|%0, %1} ! movdq2q\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movdq2q_rex64" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=m,y,r") ! (vec_select:DI (match_operand:V2DI 1 "register_operand" "x,x,x") ! (parallel [(const_int 0)])))] ! "TARGET_SSE2 && TARGET_64BIT" ! "@ ! movq\t{%1, %0|%0, %1} ! movdq2q\t{%1, %0|%0, %1} ! movd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movq2dq" ! [(set (match_operand:V2DI 0 "register_operand" "=x,?x") ! (vec_concat:V2DI (match_operand:DI 1 "nonimmediate_operand" "m,y") ! (const_int 0)))] ! "TARGET_SSE2 && !TARGET_64BIT" ! "@ ! movq\t{%1, %0|%0, %1} ! movq2dq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt,ssemov") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movq2dq_rex64" ! [(set (match_operand:V2DI 0 "register_operand" "=x,?x,?x") ! (vec_concat:V2DI (match_operand:DI 1 "nonimmediate_operand" "m,y,r") ! (const_int 0)))] ! "TARGET_SSE2 && TARGET_64BIT" ! "@ ! movq\t{%1, %0|%0, %1} ! movq2dq\t{%1, %0|%0, %1} ! movd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt,ssemov,ssecvt") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movq" ! [(set (match_operand:V2DI 0 "register_operand" "=x") ! (vec_concat:V2DI (vec_select:DI ! (match_operand:V2DI 1 "nonimmediate_operand" "xm") ! (parallel [(const_int 0)])) ! (const_int 0)))] ! "TARGET_SSE2" ! "movq\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_loadd" ! [(set (match_operand:V4SI 0 "register_operand" "=x") ! (vec_merge:V4SI ! (vec_duplicate:V4SI (match_operand:SI 1 "nonimmediate_operand" "mr")) ! (const_vector:V4SI [(const_int 0) ! (const_int 0) ! (const_int 0) ! (const_int 0)]) ! (const_int 1)))] ! "TARGET_SSE2" ! "movd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_stored" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") ! (vec_select:SI ! (match_operand:V4SI 1 "register_operand" "x") ! (parallel [(const_int 0)])))] ! "TARGET_SSE2" ! "movd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssemov") ! (set_attr "mode" "TI")]) ! ! (define_insn "sse2_movhpd" ! [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,m") ! (vec_merge:V2DF ! (match_operand:V2DF 1 "nonimmediate_operand" "0,0") ! (match_operand:V2DF 2 "nonimmediate_operand" "m,x") ! (const_int 2)))] ! "TARGET_SSE2 && (GET_CODE (operands[1]) == MEM || GET_CODE (operands[2]) == MEM)" ! "movhpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_movlpd" ! [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,m") ! (vec_merge:V2DF ! (match_operand:V2DF 1 "nonimmediate_operand" "0,0") ! (match_operand:V2DF 2 "nonimmediate_operand" "m,x") ! (const_int 1)))] ! "TARGET_SSE2 && (GET_CODE (operands[1]) == MEM || GET_CODE (operands[2]) == MEM)" ! "movlpd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_loadsd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF ! (match_operand:DF 1 "memory_operand" "m") ! (vec_duplicate:DF (float:DF (const_int 0))) ! (const_int 1)))] ! "TARGET_SSE2" ! "movsd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "DF")]) ! ! (define_insn "sse2_movsd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (vec_merge:V2DF ! (match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "register_operand" "x") ! (const_int 1)))] ! "TARGET_SSE2" ! "movsd\t{%2, %0|%0, %2}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "DF")]) ! ! (define_insn "sse2_storesd" ! [(set (match_operand:DF 0 "memory_operand" "=m") ! (vec_select:DF ! (match_operand:V2DF 1 "register_operand" "x") ! (parallel [(const_int 0)])))] ! "TARGET_SSE2" ! "movsd\t{%1, %0|%0, %1}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "DF")]) ! ! (define_insn "sse2_shufpd" ! [(set (match_operand:V2DF 0 "register_operand" "=x") ! (unspec:V2DF [(match_operand:V2DF 1 "register_operand" "0") ! (match_operand:V2DF 2 "nonimmediate_operand" "xm") ! (match_operand:SI 3 "immediate_operand" "i")] ! UNSPEC_SHUFFLE))] ! "TARGET_SSE2" ! ;; @@@ check operand order for intel/nonintel syntax ! "shufpd\t{%3, %2, %0|%0, %2, %3}" ! [(set_attr "type" "ssecvt") ! (set_attr "mode" "V2DF")]) ! ! (define_insn "sse2_clflush" ! [(unspec_volatile [(match_operand 0 "address_operand" "p")] ! UNSPECV_CLFLUSH)] ! "TARGET_SSE2" ! "clflush %0" ! [(set_attr "type" "sse") ! (set_attr "memory" "unknown")]) ! ! (define_expand "sse2_mfence" ! [(set (match_dup 0) ! (unspec:BLK [(match_dup 0)] UNSPEC_MFENCE))] ! "TARGET_SSE2" ! { ! operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); ! MEM_VOLATILE_P (operands[0]) = 1; ! }) ! ! (define_insn "*mfence_insn" ! [(set (match_operand:BLK 0 "" "") ! (unspec:BLK [(match_dup 0)] UNSPEC_MFENCE))] ! "TARGET_SSE2" ! "mfence" ! [(set_attr "type" "sse") ! (set_attr "memory" "unknown")]) ! ! (define_expand "sse2_lfence" ! [(set (match_dup 0) ! (unspec:BLK [(match_dup 0)] UNSPEC_LFENCE))] ! "TARGET_SSE2" ! { ! operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); ! MEM_VOLATILE_P (operands[0]) = 1; ! }) ! ! (define_insn "*lfence_insn" ! [(set (match_operand:BLK 0 "" "") ! (unspec:BLK [(match_dup 0)] UNSPEC_LFENCE))] ! "TARGET_SSE2" ! "lfence" ! [(set_attr "type" "sse") ! (set_attr "memory" "unknown")]) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386-modes.def gcc-3.3/gcc/config/i386/i386-modes.def *** gcc-3.2.3/gcc/config/i386/i386-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386-modes.def 2002-06-10 22:35:46.000000000 +0000 *************** *** 0 **** --- 1,46 ---- + /* Definitions of target machine for GNU compiler for IA-32. + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + + For the i386, we need separate modes when floating-point + equality comparisons are being done. + + Add CCNO to indicate comparisons against zero that requires + Overflow flag to be unset. Sign bit test is used instead and + thus can be used to form "a&b>0" type of tests. + + Add CCGC to indicate comparisons agains zero that allows + unspecified garbage in the Carry flag. This mode is used + by inc/dec instructions. + + Add CCGOC to indicate comparisons agains zero that allows + unspecified garbage in the Carry and Overflow flag. This + mode is used to simulate comparisons of (a-b) and (a+b) + against zero using sub/cmp/add operations. + + Add CCZ to indicate that only the Zero flag is valid. */ + + CC (CCGC) + CC (CCGOC) + CC (CCNO) + CC (CCZ) + CC (CCFP) + CC (CCFPU) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/i386-protos.h gcc-3.3/gcc/config/i386/i386-protos.h *** gcc-3.2.3/gcc/config/i386/i386-protos.h 2002-06-16 22:34:53.000000000 +0000 --- gcc-3.3/gcc/config/i386/i386-protos.h 2003-02-16 18:11:45.000000000 +0000 *************** extern int ix86_frame_pointer_required P *** 28,34 **** extern void ix86_setup_frame_addresses PARAMS ((void)); extern void ix86_asm_file_end PARAMS ((FILE *)); - extern void load_pic_register PARAMS ((void)); extern HOST_WIDE_INT ix86_initial_elimination_offset PARAMS((int, int)); extern void ix86_expand_prologue PARAMS ((void)); extern void ix86_expand_epilogue PARAMS ((int)); --- 28,33 ---- *************** extern int standard_80387_constant_p PAR *** 43,48 **** --- 42,53 ---- extern int standard_sse_constant_p PARAMS ((rtx)); extern int symbolic_reference_mentioned_p PARAMS ((rtx)); + extern int any_fp_register_operand PARAMS ((rtx, enum machine_mode)); + extern int register_and_not_any_fp_reg_operand PARAMS ((rtx, enum machine_mode)); + + extern int fp_register_operand PARAMS ((rtx, enum machine_mode)); + extern int register_and_not_fp_reg_operand PARAMS ((rtx, enum machine_mode)); + extern int x86_64_general_operand PARAMS ((rtx, enum machine_mode)); extern int x86_64_szext_general_operand PARAMS ((rtx, enum machine_mode)); extern int x86_64_nonmemory_operand PARAMS ((rtx, enum machine_mode)); *************** extern int x86_64_immediate_operand PARA *** 51,56 **** --- 56,66 ---- extern int x86_64_zext_immediate_operand PARAMS ((rtx, enum machine_mode)); extern int const_int_1_operand PARAMS ((rtx, enum machine_mode)); extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int tls_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int global_dynamic_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int local_dynamic_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int initial_exec_symbolic_operand PARAMS ((rtx, enum machine_mode)); + extern int local_exec_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int pic_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); extern int constant_call_address_operand PARAMS ((rtx, enum machine_mode)); *************** extern int ix86_expand_movstr PARAMS ((r *** 84,89 **** --- 94,102 ---- extern int ix86_expand_clrstr PARAMS ((rtx, rtx, rtx)); extern int ix86_expand_strlen PARAMS ((rtx, rtx, rtx, rtx)); + extern bool legitimate_constant_p PARAMS ((rtx)); + extern bool constant_address_p PARAMS ((rtx)); + extern bool legitimate_pic_operand_p PARAMS ((rtx)); extern int legitimate_pic_address_disp_p PARAMS ((rtx)); extern int legitimate_address_p PARAMS ((enum machine_mode, rtx, int)); extern rtx legitimize_pic_address PARAMS ((rtx, rtx)); *************** extern rtx legitimize_address PARAMS ((r *** 92,106 **** --- 105,122 ---- extern void print_reg PARAMS ((rtx, int, FILE*)); extern void print_operand PARAMS ((FILE*, rtx, int)); extern void print_operand_address PARAMS ((FILE*, rtx)); + extern bool output_addr_const_extra PARAMS ((FILE*, rtx)); extern void split_di PARAMS ((rtx[], int, rtx[], rtx[])); extern void split_ti PARAMS ((rtx[], int, rtx[], rtx[])); + extern const char *output_set_got PARAMS ((rtx)); extern const char *output_387_binary_op PARAMS ((rtx, rtx*)); extern const char *output_fix_trunc PARAMS ((rtx, rtx*)); extern const char *output_fp_compare PARAMS ((rtx, rtx*, int, int)); extern void i386_dwarf_output_addr_const PARAMS ((FILE*, rtx)); + extern void i386_output_dwarf_dtprel PARAMS ((FILE*, int, rtx)); extern rtx i386_simplify_dwarf_addr PARAMS ((rtx)); extern void ix86_expand_clear PARAMS ((rtx)); *************** extern void ix86_expand_branch PARAMS (( *** 121,126 **** --- 137,143 ---- extern int ix86_expand_setcc PARAMS ((enum rtx_code, rtx)); extern int ix86_expand_int_movcc PARAMS ((rtx[])); extern int ix86_expand_fp_movcc PARAMS ((rtx[])); + extern void ix86_expand_call PARAMS ((rtx, rtx, rtx, rtx, rtx)); extern void x86_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern rtx ix86_zero_extend_to_Pmode PARAMS ((rtx)); extern void ix86_split_long_move PARAMS ((rtx[])); *************** extern bool ix86_function_value_regno_p *** 143,149 **** extern bool ix86_function_arg_regno_p PARAMS ((int)); extern int ix86_function_arg_boundary PARAMS ((enum machine_mode, tree)); extern int ix86_return_in_memory PARAMS ((tree)); ! extern void ix86_va_start PARAMS ((int, tree, rtx)); extern rtx ix86_va_arg PARAMS ((tree, tree)); extern void ix86_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, --- 160,166 ---- extern bool ix86_function_arg_regno_p PARAMS ((int)); extern int ix86_function_arg_boundary PARAMS ((enum machine_mode, tree)); extern int ix86_return_in_memory PARAMS ((tree)); ! extern void ix86_va_start PARAMS ((tree, rtx)); extern rtx ix86_va_arg PARAMS ((tree, tree)); extern void ix86_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, *************** extern void ix86_set_move_mem_attrs PARA *** 167,177 **** --- 184,198 ---- extern void emit_i387_cw_initialization PARAMS ((rtx, rtx)); extern bool ix86_fp_jump_nontrivial_p PARAMS ((enum rtx_code)); extern void x86_order_regs_for_local_alloc PARAMS ((void)); + extern void x86_function_profiler PARAMS ((FILE *, int)); #ifdef TREE_CODE extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx)); extern rtx function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); + extern int function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern rtx ix86_function_value PARAMS ((tree)); *************** extern tree ix86_handle_shared_attribute *** 194,199 **** extern unsigned int i386_pe_section_type_flags PARAMS ((tree, const char *, int)); extern void i386_pe_asm_named_section PARAMS ((const char *, unsigned int)); - extern void x86_output_mi_thunk PARAMS ((FILE *, int, tree)); extern int x86_field_alignment PARAMS ((tree, int)); #endif --- 215,234 ---- extern unsigned int i386_pe_section_type_flags PARAMS ((tree, const char *, int)); extern void i386_pe_asm_named_section PARAMS ((const char *, unsigned int)); extern int x86_field_alignment PARAMS ((tree, int)); #endif + + extern rtx ix86_tls_get_addr PARAMS ((void)); + extern void x86_machine_dependent_reorg PARAMS ((rtx)); + + /* In winnt.c */ + extern int i386_pe_dllexport_name_p PARAMS ((const char *)); + extern int i386_pe_dllimport_name_p PARAMS ((const char *)); + extern void i386_pe_unique_section PARAMS ((tree, int)); + extern void i386_pe_declare_function_type PARAMS ((FILE *, const char *, int)); + extern void i386_pe_record_external_function PARAMS ((const char *)); + extern void i386_pe_record_exported_symbol PARAMS ((const char *, int)); + extern void i386_pe_asm_file_end PARAMS ((FILE *)); + extern void i386_pe_encode_section_info PARAMS ((tree, int)); + extern const char *i386_pe_strip_name_encoding PARAMS ((const char *)); + extern const char *i386_pe_strip_name_encoding_full PARAMS ((const char *)); diff -Nrc3pad gcc-3.2.3/gcc/config/i386/interix.c gcc-3.3/gcc/config/i386/interix.c *** gcc-3.2.3/gcc/config/i386/interix.c 2001-11-11 05:56:41.000000000 +0000 --- gcc-3.3/gcc/config/i386/interix.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,114 **** - /* Subroutines for insn-output.c for Windows NT. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "config.h" - #include "system.h" - #include "rtl.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "output.h" - #include "tree.h" - #include "flags.h" - - /* Return string which is the former assembler name modified with a - suffix consisting of an atsign (@) followed by the number of bytes of - arguments */ - - const char * - gen_stdcall_suffix (decl) - tree decl; - { - int total = 0; - /* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead - of DECL_ASSEMBLER_NAME. */ - const char *const asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - char *newsym; - - if (TYPE_ARG_TYPES (TREE_TYPE (decl))) - if (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (decl)))) - == void_type_node) - { - tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl)); - - while (TREE_VALUE (formal_type) != void_type_node) - { - int parm_size - = TREE_INT_CST_LOW (TYPE_SIZE (TREE_VALUE (formal_type))); - /* Must round up to include padding. This is done the same - way as in store_one_arg. */ - parm_size = ((parm_size + PARM_BOUNDARY - 1) - / PARM_BOUNDARY * PARM_BOUNDARY); - total += parm_size; - formal_type = TREE_CHAIN (formal_type); - } - } - - newsym = xmalloc (strlen (asmname) + 10); - sprintf (newsym, "%s@%d", asmname, total/BITS_PER_UNIT); - return IDENTIFIER_POINTER (get_identifier (newsym)); - } - - #if 0 - /* Turn this back on when the linker is updated to handle grouped - .data$ sections correctly. See corresponding note in i386/interix.h. - MK. */ - - /* Cover function for UNIQUE_SECTION. */ - - void - i386_pe_unique_section (decl, reloc) - tree decl; - int reloc; - { - int len; - const char *name; - char *string,*prefix; - - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - /* Strip off any encoding in fnname. */ - STRIP_NAME_ENCODING (name, name); - - /* The object is put in, for example, section .text$foo. - The linker will then ultimately place them in .text - (everything from the $ on is stripped). Don't put - read-only data in .rdata section to avoid a PE linker - bug when .rdata$* grouped sections are used in code - without a .rdata section. */ - if (TREE_CODE (decl) == FUNCTION_DECL) - prefix = ".text$"; - /* else if (DECL_INITIAL (decl) == 0 - || DECL_INITIAL (decl) == error_mark_node) - prefix = ".bss"; */ - else if (DECL_READONLY_SECTION (decl, reloc)) - #ifdef READONLY_DATA_SECTION - prefix = ".rdata$"; - #else - prefix = ".text$"; - #endif - else - prefix = ".data$"; - len = strlen (name) + strlen (prefix); - string = alloca (len + 1); - sprintf (string, "%s%s", prefix, name); - - DECL_SECTION_NAME (decl) = build_string (len, string); - } - - #endif /* 0 */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/isccoff.h gcc-3.3/gcc/config/i386/isccoff.h *** gcc-3.2.3/gcc/config/i386/isccoff.h 2001-10-31 14:32:29.000000000 +0000 --- gcc-3.3/gcc/config/i386/isccoff.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,12 **** - /* Definitions for Intel 386 running Interactive Unix System V. - Specifically, this is for recent versions that support POSIX; - for version 2.0.2, use configuration option i386-sysv instead. - (But set TARGET_DEFAULT to (MASK_80307 | MASK_FLOAT_RETURNS) - if you do that, if you don't have a real 80387.) */ - - /* Mostly it's like AT&T Unix System V. */ - - #include "i386/sysv3.h" - - /* But with a few changes. */ - #include "i386/isc.h" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/iscdbx.h gcc-3.3/gcc/config/i386/iscdbx.h *** gcc-3.2.3/gcc/config/i386/iscdbx.h 2001-10-31 14:32:29.000000000 +0000 --- gcc-3.3/gcc/config/i386/iscdbx.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,43 **** - /* Definitions for Intel 386 running Interactive Unix System V, - using dbx-in-coff encapsulation. - Specifically, this is for recent versions that support POSIX. - Copyright (C) 1992, 1995 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Mostly it's like AT&T Unix System V with dbx-in-coff. */ - - #include "i386/svr3dbx.h" - - /* But with a few changes. */ - #undef ENDFILE_SPEC - #include "i386/isc.h" - - /* Overridden defines for ifile usage. */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{!r:%{!z:svr3.ifile%s}%{z:svr3z.ifile%s}}\ - %{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ - %{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ - %{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ - %{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp}}\ - %{shlib:%{posix:crtp1.o%s}%{Xp:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}" - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtn.o%s" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/isc.h gcc-3.3/gcc/config/i386/isc.h *** gcc-3.2.3/gcc/config/i386/isc.h 2001-11-19 18:30:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/isc.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,96 **** - /* Assembler-independent definitions for an Intel 386 running - Interactive Unix System V. Specifically, this is for recent versions - that support POSIX. */ - - /* Use crt1.o, not crt0.o, as a startup file, and crtn.o as a closing file. */ - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ - %{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ - %{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\ - %{p:-L/lib/libp} %{pg:-L/lib/libp}}}}\ - %{shlib:%{Xp:crtp1.o%s}%{posix:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}\ - crtbegin.o%s" - - #define ENDFILE_SPEC "crtend.o%s crtn.o%s" - - /* Library spec */ - #undef LIB_SPEC - #define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg" - - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}" - - /* ISC 2.2 uses `char' for `wchar_t'. */ - #undef WCHAR_TYPE - #define WCHAR_TYPE "char" - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE BITS_PER_UNIT - - #if 0 - /* This is apparently not true: ISC versions up to 3.0, at least, use - the standard calling sequence in which the called function pops the - extra arg. */ - /* caller has to pop the extra argument passed to functions that return - structures. */ - - #undef RETURN_POPS_ARGS - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ - ((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \ - : (TARGET_RTD \ - && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ - || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ - == void_type_node))) ? (SIZE) \ - : 0) - /* On other 386 systems, the last line looks like this: - : (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) */ - #endif - - /* Handle #pragma pack and #pragma weak. */ - #define HANDLE_SYSV_PRAGMA - - /* By default, target has a 80387, uses IEEE compatible arithmetic, - and returns float values in the 387, ie, - (TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387) - - ISC's software emulation of a 387 fails to handle the `fucomp' - opcode. fucomp is only used when generating IEEE compliant code. - So don't make TARGET_IEEE_FP default for ISC. */ - - #undef TARGET_SUBTARGET_DEFAULT - #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) - - /* The ISC 2.0.2 software FPU emulator apparently can't handle - 80-bit XFmode insns, so don't generate them. */ - #undef LONG_DOUBLE_TYPE_SIZE - #define LONG_DOUBLE_TYPE_SIZE 64 - - /* The ISC assembler does not like a .file directive with a name - longer than 14 characters. Truncating it will not permit - debugging to work properly, but at least we won't get an error - message. */ - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - do { \ - const int len = strlen (main_input_filename); \ - const char *na = main_input_filename + len; \ - char shorter[15]; \ - /* NA gets MAIN_INPUT_FILENAME sans directory names. */\ - while (na > main_input_filename) \ - { \ - if (na[-1] == '/') \ - break; \ - na--; \ - } \ - strncpy (shorter, na, 14); \ - shorter[14] = 0; \ - fprintf (FILE, "\t.file\t"); \ - output_quoted_string (FILE, shorter); \ - fprintf (FILE, "\n"); \ - } while (0) - - /* Work around assembler forward label references generated in exception - handling code. */ - #define DWARF2_UNWIND_INFO 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/k6.md gcc-3.3/gcc/config/i386/k6.md *** gcc-3.2.3/gcc/config/i386/k6.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/k6.md 2002-11-16 01:09:19.000000000 +0000 *************** *** 0 **** --- 1,136 ---- + ;; AMD K6/K6-2 Scheduling + ;; Copyright (C) 2002 ;; Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. */ + ;; + ;; The K6 has similar architecture to PPro. Important difference is, that + ;; there are only two decoders and they seems to be much slower than execution + ;; units. So we have to pay much more attention to proper decoding for + ;; schedulers. We share most of scheduler code for PPro in i386.c + ;; + ;; The fp unit is not pipelined and do one operation per two cycles including + ;; the FXCH. + ;; + ;; alu describes both ALU units (ALU-X and ALU-Y). + ;; alux describes X alu unit + ;; fpu describes FPU unit + ;; load describes load unit. + ;; branch describes branch unit. + ;; store decsribes store unit. This unit is not modelled completely and only + ;; used to model lea operation. Otherwise it lie outside of the critical + ;; path. + ;; + ;; ??? fxch isn't handled; not an issue until sched3 after reg-stack is real. + + ;; The decoder specification is in the PPro section above! + + ;; Shift instructions and certain arithmetic are issued only to X pipe. + (define_function_unit "k6_alux" 1 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "ishift,ishift1,rotate,rotate1,alu1,negnot,cld")) + 1 1) + + ;; The QI mode arithmetic is issued to X pipe only. + (define_function_unit "k6_alux" 1 0 + (and (eq_attr "cpu" "k6") + (and (eq_attr "type" "alu,alu1,negnot,icmp,test,imovx,incdec") + (match_operand:QI 0 "general_operand" ""))) + 1 1) + + (define_function_unit "k6_alu" 2 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "ishift,ishift1,rotate,rotate1,alu1,negnot,alu,icmp,test,imovx,incdec,setcc,lea")) + 1 1) + + (define_function_unit "k6_alu" 2 0 + (and (eq_attr "cpu" "k6") + (and (eq_attr "type" "imov") + (eq_attr "memory" "none"))) + 1 1) + + (define_function_unit "k6_branch" 1 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "call,callv,ibr")) + 1 1) + + ;; Load unit have two cycle latency, but we take care for it in adjust_cost + (define_function_unit "k6_load" 1 0 + (and (eq_attr "cpu" "k6") + (ior (eq_attr "type" "pop") + (eq_attr "memory" "load,both"))) + 1 1) + + (define_function_unit "k6_load" 1 0 + (and (eq_attr "cpu" "k6") + (and (eq_attr "type" "str") + (eq_attr "memory" "load,both"))) + 10 10) + + ;; Lea have two instructions, so latency is probably 2 + (define_function_unit "k6_store" 1 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "lea")) + 2 1) + + (define_function_unit "k6_store" 1 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "str")) + 10 10) + + (define_function_unit "k6_store" 1 0 + (and (eq_attr "cpu" "k6") + (ior (eq_attr "type" "push") + (eq_attr "memory" "store,both"))) + 1 1) + + (define_function_unit "k6_fpu" 1 1 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "fop,fmov,fcmp,fistp")) + 2 2) + + (define_function_unit "k6_fpu" 1 1 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "fmul")) + 2 2) + + ;; ??? Guess + (define_function_unit "k6_fpu" 1 1 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "fdiv,fpspc")) + 56 56) + + (define_function_unit "k6_alu" 2 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "imul")) + 2 2) + + (define_function_unit "k6_alux" 1 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "imul")) + 2 2) + + ;; ??? Guess + (define_function_unit "k6_alu" 2 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "idiv")) + 17 17) + + (define_function_unit "k6_alux" 1 0 + (and (eq_attr "cpu" "k6") + (eq_attr "type" "idiv")) + 17 17) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/linux64.h gcc-3.3/gcc/config/i386/linux64.h *** gcc-3.2.3/gcc/config/i386/linux64.h 2003-03-14 12:18:24.000000000 +0000 --- gcc-3.3/gcc/config/i386/linux64.h 2003-03-14 06:31:16.000000000 +0000 *************** *** 1,5 **** /* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format. ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Jan Hubicka , based on linux.h. This file is part of GNU CC. --- 1,5 ---- /* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format. ! Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Jan Hubicka , based on linux.h. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 21,35 **** #define LINUX_DEFAULT_ELF - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (x86-64 Linux/ELF)"); ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -Asystem(posix)" #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} \ ! %{!m32:-D__LONG_MAX__=9223372036854775807L -D__LP64__ -D_LP64}" /* The svr4 ABI for the i386 says that records and unions are returned in memory. In the 64bit compilation we will turn this flag off in --- 21,51 ---- #define LINUX_DEFAULT_ELF #define TARGET_VERSION fprintf (stderr, " (x86-64 Linux/ELF)"); ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("linux"); \ ! builtin_define_std ("unix"); \ ! builtin_define ("__gnu_linux__"); \ ! builtin_define ("__ELF__"); \ ! builtin_assert ("system=posix"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! } \ ! if (TARGET_64BIT) \ ! { \ ! builtin_define ("__LP64__"); \ ! builtin_define ("_LP64"); \ ! } \ ! } \ ! while (0) #undef CPP_SPEC ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" /* The svr4 ABI for the i386 says that records and unions are returned in memory. In the 64bit compilation we will turn this flag off in *************** Boston, MA 02111-1307, USA. */ *** 46,52 **** done. */ #undef LINK_SPEC ! #define LINK_SPEC "%{!m32:-m elf_x86_64 -Y P,/usr/lib64} %{m32:-m elf_i386} \ %{shared:-shared} \ %{!shared: \ %{!static: \ --- 62,68 ---- done. */ #undef LINK_SPEC ! #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ %{shared:-shared} \ %{!shared: \ %{!static: \ *************** Boston, MA 02111-1307, USA. */ *** 105,121 **** (FS)->regs.reg[0].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[0].loc.offset = (long)&sc_->rax - new_cfa_; \ (FS)->regs.reg[1].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[1].loc.offset = (long)&sc_->rbx - new_cfa_; \ (FS)->regs.reg[2].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[2].loc.offset = (long)&sc_->rcx - new_cfa_; \ (FS)->regs.reg[3].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[3].loc.offset = (long)&sc_->rdx - new_cfa_; \ (FS)->regs.reg[4].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[4].loc.offset = (long)&sc_->rbp - new_cfa_; \ (FS)->regs.reg[5].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[5].loc.offset = (long)&sc_->rsi - new_cfa_; \ (FS)->regs.reg[6].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[6].loc.offset = (long)&sc_->rdi - new_cfa_; \ (FS)->regs.reg[8].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[8].loc.offset = (long)&sc_->r8 - new_cfa_; \ (FS)->regs.reg[9].how = REG_SAVED_OFFSET; \ --- 121,137 ---- (FS)->regs.reg[0].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[0].loc.offset = (long)&sc_->rax - new_cfa_; \ (FS)->regs.reg[1].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[1].loc.offset = (long)&sc_->rdx - new_cfa_; \ (FS)->regs.reg[2].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[2].loc.offset = (long)&sc_->rcx - new_cfa_; \ (FS)->regs.reg[3].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[3].loc.offset = (long)&sc_->rbx - new_cfa_; \ (FS)->regs.reg[4].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[4].loc.offset = (long)&sc_->rsi - new_cfa_; \ (FS)->regs.reg[5].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[5].loc.offset = (long)&sc_->rdi - new_cfa_; \ (FS)->regs.reg[6].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[6].loc.offset = (long)&sc_->rbp - new_cfa_; \ (FS)->regs.reg[8].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[8].loc.offset = (long)&sc_->r8 - new_cfa_; \ (FS)->regs.reg[9].how = REG_SAVED_OFFSET; \ *************** Boston, MA 02111-1307, USA. */ *** 132,137 **** --- 148,155 ---- (FS)->regs.reg[14].loc.offset = (long)&sc_->r14 - new_cfa_; \ (FS)->regs.reg[15].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[15].loc.offset = (long)&sc_->r15 - new_cfa_; \ + (FS)->regs.reg[16].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[16].loc.offset = (long)&sc_->rip - new_cfa_; \ (FS)->retaddr_column = 16; \ goto SUCCESS; \ } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/linux-aout.h gcc-3.3/gcc/config/i386/linux-aout.h *** gcc-3.2.3/gcc/config/i386/linux-aout.h 2002-04-15 20:27:27.000000000 +0000 --- gcc-3.3/gcc/config/i386/linux-aout.h 2002-06-05 17:01:30.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel 386 running Linux-based GNU systems using a.out. ! Copyright (C) 1992, 1994, 1995, 1997, 1998, 2002 Free Software Foundation, Inc. Contributed by H.J. Lu (hjl@nynexst.com) This file is part of GNU CC. --- 1,6 ---- /* Definitions for Intel 386 running Linux-based GNU systems using a.out. ! Copyright (C) 1992, 1994, 1995, 1997, 1998, 2002 ! Free Software Foundation, Inc. Contributed by H.J. Lu (hjl@nynexst.com) This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,40 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* This is tested by i386/gas.h. */ - #define YES_UNDERSCORES - - #include - #include /* some common stuff */ - #undef ASM_COMMENT_START #define ASM_COMMENT_START "#" ! /* Specify predefined symbols in preprocessor. */ ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -D__gnu_linux__ -Dlinux -Asystem=posix" #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}" #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" --- 20,45 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef ASM_COMMENT_START #define ASM_COMMENT_START "#" ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("linux"); \ ! builtin_define_std ("unix"); \ ! builtin_define ("__gnu_linux__"); \ ! builtin_assert ("system=posix"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! } \ ! } \ ! while (0) #undef CPP_SPEC ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/linux.h gcc-3.3/gcc/config/i386/linux.h *** gcc-3.2.3/gcc/config/i386/linux.h 2003-03-06 20:19:22.000000000 +0000 --- gcc-3.3/gcc/config/i386/linux.h 2002-11-15 14:57:12.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 33,39 **** fputs ("\t.intel_syntax\n", FILE); \ } while (0) - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 Linux/ELF)"); /* The svr4 ABI for the i386 says that records and unions are returned --- 33,38 ---- *************** Boston, MA 02111-1307, USA. */ *** 54,76 **** #define NO_PROFILE_COUNTERS ! #undef FUNCTION_PROFILER ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! { \ ! if (flag_pic) \ ! fprintf (FILE, "\tcall\t*mcount@GOT(%%ebx)\n"); \ ! else \ ! fprintf (FILE, "\tcall\tmcount\n"); \ ! } ! ! /* True if it is possible to profile code that does not have a frame ! pointer. ! The GLIBC version of mcount for the x86 assumes that there is a frame, so we cannot allow profiling without a frame pointer. */ ! #undef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER ! #define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER false #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" --- 53,66 ---- #define NO_PROFILE_COUNTERS ! #undef MCOUNT_NAME ! #define MCOUNT_NAME "mcount" ! /* The GLIBC version of mcount for the x86 assumes that there is a frame, so we cannot allow profiling without a frame pointer. */ ! #undef SUBTARGET_FRAME_POINTER_REQUIRED ! #define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" *************** Boston, MA 02111-1307, USA. */ *** 84,97 **** #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -Asystem=posix" #undef CPP_SPEC #ifdef USE_GNULIBC_1 ! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}" #else ! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #endif #undef CC1_SPEC --- 74,100 ---- #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("linux"); \ ! builtin_define_std ("unix"); \ ! builtin_define ("__ELF__"); \ ! builtin_define ("__gnu_linux__"); \ ! builtin_assert ("system=posix"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! } \ ! } \ ! while (0) #undef CPP_SPEC #ifdef USE_GNULIBC_1 ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" #else ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #endif #undef CC1_SPEC *************** Boston, MA 02111-1307, USA. */ *** 218,231 **** #endif /* Do code reading to identify a signal frame, and set the frame ! state data appropriately. See unwind-dw2.c for the structs. ! Don't use this at all if inhibit_libc is used. */ - #ifndef inhibit_libc #ifdef IN_LIBGCC2 #include #include - #endif #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ --- 221,236 ---- #endif /* Do code reading to identify a signal frame, and set the frame ! state data appropriately. See unwind-dw2.c for the structs. */ #ifdef IN_LIBGCC2 + /* There's no sys/ucontext.h for some (all?) libc1, so no + signal-turned-exceptions for them. There's also no configure-run for + the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the + target libc1 macro should be enough. */ + #ifndef USE_GNULIBC_1 #include #include #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ *************** Boston, MA 02111-1307, USA. */ *** 280,283 **** (FS)->retaddr_column = 8; \ goto SUCCESS; \ } while (0) ! #endif /* ifndef inhibit_libc */ --- 285,289 ---- (FS)->retaddr_column = 8; \ goto SUCCESS; \ } while (0) ! #endif /* not USE_GNULIBC_1 */ ! #endif /* IN_LIBGCC2 */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/linux-oldld.h gcc-3.3/gcc/config/i386/linux-oldld.h *** gcc-3.2.3/gcc/config/i386/linux-oldld.h 2002-04-15 20:27:27.000000000 +0000 --- gcc-3.3/gcc/config/i386/linux-oldld.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,72 **** - /* Definitions for Intel 386 running Linux-based GNU systems with pre-BFD - a.out linkers. - Copyright (C) 1995, 1997, 1998, 2002 Free Software Foundation, Inc. - Contributed by Michael Meissner (meissner@cygnus.com) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This is tested by i386/gas.h. */ - #define YES_UNDERSCORES - - #include - #include /* some common stuff */ - - #undef ASM_COMMENT_START - #define ASM_COMMENT_START "#" - - /* Specify predefined symbols in preprocessor. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -D__gnu_linux__ -Dlinux -Asystem=posix" - - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}" - - #undef SIZE_TYPE - #define SIZE_TYPE "unsigned int" - - #undef PTRDIFF_TYPE - #define PTRDIFF_TYPE "int" - - #undef WCHAR_TYPE - #define WCHAR_TYPE "long int" - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE BITS_PER_WORD - - /* Don't default to pcc-struct-return, because gcc is the only compiler, - and we want to retain compatibility with older gcc versions. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 - - #undef LIB_SPEC - - #if 1 - /* We no longer link with libc_p.a or libg.a by default. If you - want to profile or debug the GNU/Linux C library, please add - lc_p or -ggdb to LDFLAGS at the link time, respectively. */ - #define LIB_SPEC \ - "%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}" - #else - #define LIB_SPEC \ - "%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ - %{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}" - #endif - - - #undef LINK_SPEC - #define LINK_SPEC "" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/lynx.h gcc-3.3/gcc/config/i386/lynx.h *** gcc-3.2.3/gcc/config/i386/lynx.h 2001-10-31 14:32:29.000000000 +0000 --- gcc-3.3/gcc/config/i386/lynx.h 2002-06-29 09:10:04.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel 386 running LynxOS. ! Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Intel 386 running LynxOS. ! Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,28 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #include ! #include ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-DI386 -DLynx -DIBITS32 -Asystem=unix -Asystem=lynx" /* The prefix to add to user-visible assembler symbols. */ --- 18,35 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, LYNX BSD syntax)"); ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("I386"); \ ! builtin_define_std ("Lynx"); \ ! builtin_define_std ("IBITS32"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=lynx"); \ ! } \ ! while (0) /* The prefix to add to user-visible assembler symbols. */ *************** Boston, MA 02111-1307, USA. */ *** 37,39 **** --- 44,78 ---- #define CALL_USED_REGISTERS \ /*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ { 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } + + /* Prefix for internally generated assembler labels. If we aren't using + underscores, we are using prefix `.'s to identify labels that should + be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ + + #undef LPREFIX + #define LPREFIX ".L" + + /* The prefix to add to user-visible assembler symbols. */ + + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + + /* If user-symbols don't have underscores, + then it must take more than `L' to identify + a label that should be ignored. */ + + /* This is how to store into the string BUF + the symbol_ref name of an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. + This is suitable for output with `assemble_name'. */ + + #undef ASM_GENERATE_INTERNAL_LABEL + #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ + sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER)) + + /* This is how to output an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. */ + + #undef ASM_OUTPUT_INTERNAL_LABEL + #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ + fprintf (FILE, ".%s%d:\n", PREFIX, NUM) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/lynx-ng.h gcc-3.3/gcc/config/i386/lynx-ng.h *** gcc-3.2.3/gcc/config/i386/lynx-ng.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/i386/lynx-ng.h 2002-06-29 09:10:04.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel 386 running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Intel 386 running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993, 1995, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,29 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #include ! #include ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -DI386 -DLynx -DIBITS32 \ ! -Asystem=unix -Asystem=lynx" /* Provide required defaults for linker switches. */ --- 18,36 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, LYNX BSD syntax)"); ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("I386"); \ ! builtin_define_std ("Lynx"); \ ! builtin_define_std ("IBITS32"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=lynx"); \ ! } \ ! while (0) /* Provide required defaults for linker switches. */ *************** Boston, MA 02111-1307, USA. */ *** 36,38 **** --- 43,77 ---- #define CALL_USED_REGISTERS \ /*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ { 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } + + /* Prefix for internally generated assembler labels. If we aren't using + underscores, we are using prefix `.'s to identify labels that should + be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ + + #undef LPREFIX + #define LPREFIX ".L" + + /* The prefix to add to user-visible assembler symbols. */ + + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + + /* If user-symbols don't have underscores, + then it must take more than `L' to identify + a label that should be ignored. */ + + /* This is how to store into the string BUF + the symbol_ref name of an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. + This is suitable for output with `assemble_name'. */ + + #undef ASM_GENERATE_INTERNAL_LABEL + #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ + sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER)) + + /* This is how to output an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. */ + + #undef ASM_OUTPUT_INTERNAL_LABEL + #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ + fprintf (FILE, ".%s%d:\n", PREFIX, NUM) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/mach.h gcc-3.3/gcc/config/i386/mach.h *** gcc-3.2.3/gcc/config/i386/mach.h 2001-05-17 03:15:56.000000000 +0000 --- gcc-3.3/gcc/config/i386/mach.h 2002-06-16 21:13:10.000000000 +0000 *************** *** 1,13 **** /* Configuration for an i386 running Mach as the target machine. */ ! /* We do want to add an underscore to the front of each user symbol. ! i386/gas.h checks this. */ ! #define YES_UNDERSCORES ! ! #include "i386/gstabs.h" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -DMACH -Asystem=unix -Asystem=mach" /* Specify extra dir to search for include files. */ #define SYSTEM_INCLUDE_DIR "/usr/mach/include" --- 1,16 ---- /* Configuration for an i386 running Mach as the target machine. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, Mach)"); ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("MACH"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=mach"); \ ! } \ ! while (0) /* Specify extra dir to search for include files. */ #define SYSTEM_INCLUDE_DIR "/usr/mach/include" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/mingw32.h gcc-3.3/gcc/config/i386/mingw32.h *** gcc-3.2.3/gcc/config/i386/mingw32.h 2002-12-05 20:30:32.000000000 +0000 --- gcc-3.3/gcc/config/i386/mingw32.h 2003-04-29 13:56:28.000000000 +0000 *************** *** 1,6 **** /* Operating system specific defines to be used when targeting GCC for hosting on Windows32, using GNU tools and the Windows32 API Library. ! Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Operating system specific defines to be used when targeting GCC for hosting on Windows32, using GNU tools and the Windows32 API Library. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 32,44 **** #define TARGET_EXECUTABLE_SUFFIX ".exe" ! /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The ! only difference between the two should be __MSVCRT__ needed to ! distinguish MSVC from CRTDLL runtime in mingw headers. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_WIN32 -D__WIN32 -D__WIN32__ -DWIN32 \ ! -D__MINGW32__ -D__MSVCRT__ -DWINNT -D_X86_=1 \ ! -Asystem=winnt" /* Specific a different directory for the standard include files. */ #undef STANDARD_INCLUDE_DIR --- 33,67 ---- #define TARGET_EXECUTABLE_SUFFIX ".exe" ! /* See i386/crtdll.h for an altervative definition. */ ! #define EXTRA_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__MSVCRT__"); \ ! builtin_define ("__MINGW32__"); \ ! } \ ! while (0) ! ! #undef TARGET_OS_CPP_BUILTINS /* From cygwin.h. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_WIN32"); \ ! builtin_define_std ("WIN32"); \ ! builtin_define_std ("WINNT"); \ ! builtin_define ("_X86_=1"); \ ! builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ ! builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ ! builtin_define ("__declspec(x)=__attribute__((x))"); \ ! if (!flag_iso) \ ! { \ ! builtin_define ("_stdcall=__attribute__((__stdcall__))"); \ ! builtin_define ("_cdecl=__attribute__((__cdecl__))"); \ ! } \ ! EXTRA_OS_CPP_BUILTINS (); \ ! builtin_assert ("system=winnt"); \ ! } \ ! while (0) /* Specific a different directory for the standard include files. */ #undef STANDARD_INCLUDE_DIR *************** Boston, MA 02111-1307, USA. */ *** 47,60 **** #define STANDARD_INCLUDE_COMPONENT "MINGW" #undef CPP_SPEC ! #define CPP_SPEC \ ! "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} \ ! -D__stdcall=__attribute__((__stdcall__)) \ ! -D__cdecl=__attribute__((__cdecl__)) \ ! %{!ansi:-D_stdcall=__attribute__((__stdcall__)) \ ! -D_cdecl=__attribute__((__cdecl__))} \ ! -D__declspec(x)=__attribute__((x))" ! /* For Windows applications, include more libraries, but always include kernel32. */ --- 70,76 ---- #define STANDARD_INCLUDE_COMPONENT "MINGW" #undef CPP_SPEC ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT}" /* For Windows applications, include more libraries, but always include kernel32. */ *************** Boston, MA 02111-1307, USA. */ *** 74,80 **** /* Include in the mingw32 libraries with libgcc */ #undef LIBGCC_SPEC #define LIBGCC_SPEC \ ! "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmsvcrt" #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ --- 90,96 ---- /* Include in the mingw32 libraries with libgcc */ #undef LIBGCC_SPEC #define LIBGCC_SPEC \ ! "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt" #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ *************** Boston, MA 02111-1307, USA. */ *** 85,108 **** #define MATH_LIBRARY "" /* Output STRING, a string representing a filename, to FILE. ! We canonicalize it to be in MS-DOS format. */ #undef OUTPUT_QUOTED_STRING ! #define OUTPUT_QUOTED_STRING(FILE, STRING) \ ! do { \ ! char c; \ ! \ ! putc ('\"', asm_file); \ ! \ ! while ((c = *string++) != 0) \ ! { \ ! if (c == '\\') \ ! c = '/'; \ ! \ ! if (c == '\"') \ ! putc ('\\', asm_file); \ ! putc (c, asm_file); \ ! } \ ! \ ! putc ('\"', asm_file); \ } while (0) --- 101,133 ---- #define MATH_LIBRARY "" /* Output STRING, a string representing a filename, to FILE. ! We canonicalize it to be in Unix format (backslashe are replaced ! forward slashes. */ #undef OUTPUT_QUOTED_STRING ! #define OUTPUT_QUOTED_STRING(FILE, STRING) \ ! do { \ ! char c; \ ! \ ! putc ('\"', asm_file); \ ! \ ! while ((c = *string++) != 0) \ ! { \ ! if (c == '\\') \ ! c = '/'; \ ! \ ! if (ISPRINT (c)) \ ! { \ ! if (c == '\"') \ ! putc ('\\', asm_file); \ ! putc (c, asm_file); \ ! } \ ! else \ ! fprintf (asm_file, "\\%03o", (unsigned char) c); \ ! } \ ! \ ! putc ('\"', asm_file); \ } while (0) + /* Define as short unsigned for compatability with MS runtime. */ + #undef WINT_TYPE + #define WINT_TYPE "short unsigned int" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/mmintrin.h gcc-3.3/gcc/config/i386/mmintrin.h *** gcc-3.2.3/gcc/config/i386/mmintrin.h 2002-10-19 13:51:34.000000000 +0000 --- gcc-3.3/gcc/config/i386/mmintrin.h 2003-02-22 10:04:13.000000000 +0000 *************** *** 30,35 **** --- 30,38 ---- #ifndef _MMINTRIN_H_INCLUDED #define _MMINTRIN_H_INCLUDED + #ifndef __MMX__ + # error "MMX instruction set not enabled" + #else /* The data type intended for user use. */ typedef int __m64 __attribute__ ((__mode__ (__V2SI__))); *************** _mm_cvtsi32_si64 (int __i) *** 53,58 **** --- 56,77 ---- return (__m64) __tmp; } + #ifdef __x86_64__ + /* Convert I to a __m64 object. */ + static __inline __m64 + _mm_cvtsi64x_si64 (long long __i) + { + return (__m64) __i; + } + + /* Convert I to a __m64 object. */ + static __inline __m64 + _mm_set_pi64x (long long __i) + { + return (__m64) __i; + } + #endif + /* Convert the lower 32 bits of the __m64 object into an integer. */ static __inline int _mm_cvtsi64_si32 (__m64 __i) *************** _mm_cvtsi64_si32 (__m64 __i) *** 61,66 **** --- 80,94 ---- return __tmp; } + #ifdef __x86_64__ + /* Convert the lower 32 bits of the __m64 object into an integer. */ + static __inline long long + _mm_cvtsi64_si64x (__m64 __i) + { + return (long long)__i; + } + #endif + /* Pack the four 16-bit values from M1 into the lower four 8-bit values of the result, and the four 16-bit values from M2 into the upper four 8-bit values of the result, all with signed saturation. */ *************** _mm_add_pi32 (__m64 __m1, __m64 __m2) *** 157,162 **** --- 185,197 ---- return (__m64) __builtin_ia32_paddd ((__v2si)__m1, (__v2si)__m2); } + /* Add the 64-bit values in M1 to the 64-bit values in M2. */ + static __inline __m64 + _mm_add_si64 (__m64 __m1, __m64 __m2) + { + return (__m64) __builtin_ia32_paddq ((long long)__m1, (long long)__m2); + } + /* Add the 8-bit values in M1 to the 8-bit values in M2 using signed saturated arithmetic. */ static __inline __m64 *************** _mm_sub_pi32 (__m64 __m1, __m64 __m2) *** 210,215 **** --- 245,257 ---- return (__m64) __builtin_ia32_psubd ((__v2si)__m1, (__v2si)__m2); } + /* Add the 64-bit values in M1 to the 64-bit values in M2. */ + static __inline __m64 + _mm_sub_si64 (__m64 __m1, __m64 __m2) + { + return (__m64) __builtin_ia32_psubq ((long long)__m1, (long long)__m2); + } + /* Subtract the 8-bit values in M2 from the 8-bit values in M1 using signed saturating arithmetic. */ static __inline __m64 *************** _mm_set1_pi8 (char __b) *** 541,544 **** --- 583,587 ---- return _mm_set1_pi32 (__i); } + #endif /* __MMX__ */ #endif /* _MMINTRIN_H_INCLUDED */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/moss.h gcc-3.3/gcc/config/i386/moss.h *** gcc-3.2.3/gcc/config/i386/moss.h 2001-01-09 22:10:53.000000000 +0000 --- gcc-3.3/gcc/config/i386/moss.h 2002-06-05 17:01:31.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,26 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__ELF__ -Dmoss -Asystem=posix" #undef STARTFILE_SPEC #define STARTFILE_SPEC "crt0.o%s" --- 19,38 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("moss"); \ ! builtin_define ("__ELF__"); \ ! builtin_assert ("system=posix"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! } \ ! } \ ! while (0) #undef STARTFILE_SPEC #define STARTFILE_SPEC "crt0.o%s" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/netbsd64.h gcc-3.3/gcc/config/i386/netbsd64.h *** gcc-3.2.3/gcc/config/i386/netbsd64.h 2002-05-30 04:00:33.000000000 +0000 --- gcc-3.3/gcc/config/i386/netbsd64.h 2002-10-18 23:10:35.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,69 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! ! /* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target. ! This is a copy of LINK_SPEC from tweaked for ! the x86-64 target. */ ! ! #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{!m32:-m elf_x86_64} \ ! %{m32:-m elf_i386} \ ! %{assert*} %{R*} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dc -dp \ ! %{!nostdlib: \ ! %{!r*: \ ! %{!e*:-e _start}}} \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ ! %{static:-static}}" ! /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES \ ! "-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD" ! /* Provide some extra CPP specs needed by NetBSD/x86_64. */ ! #define CPP_LP64_SPEC "%{!m32:-D_LP64}" ! #define CPP_SUBTARGET_SPEC "%(cpp_lp64)" ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "cpp_lp64", CPP_LP64_SPEC }, \ ! { "cpp_subtarget", CPP_SUBTARGET_SPEC }, ! /* Provide a CPP_SPEC appropriate for NetBSD. Currently we deal with ! our subtarget specs and the GCC option `-posix'. */ #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) %{posix:-D_POSIX_SOURCE}" /* Output assembler code to FILE to call the profiler. */ --- 20,59 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_ELF(); \ ! if (TARGET_64BIT) \ ! NETBSD_OS_CPP_BUILTINS_LP64(); \ ! } \ ! while (0) ! /* Extra specs needed for NetBSD/x86-64 ELF. */ ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ ! { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ ! { "netbsd_entry_point", NETBSD_ENTRY_POINT }, ! /* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target. */ ! #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{m32:-m elf_i386} \ ! %{m64:-m elf_x86_64} \ ! %(netbsd_link_spec)" ! #define NETBSD_ENTRY_POINT "_start" ! /* Provide a CPP_SPEC appropriate for NetBSD. */ #undef CPP_SPEC ! #define CPP_SPEC "%(netbsd_cpp_spec)" /* Output assembler code to FILE to call the profiler. */ *************** Boston, MA 02111-1307, USA. */ *** 79,84 **** fprintf (FILE, "\tcall __mcount\n"); \ } - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (NetBSD/x86_64 ELF)"); --- 69,75 ---- fprintf (FILE, "\tcall __mcount\n"); \ } + /* Attempt to enable execute permissions on the stack. */ + #define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK #define TARGET_VERSION fprintf (stderr, " (NetBSD/x86_64 ELF)"); diff -Nrc3pad gcc-3.2.3/gcc/config/i386/netbsd-elf.h gcc-3.3/gcc/config/i386/netbsd-elf.h *** gcc-3.2.3/gcc/config/i386/netbsd-elf.h 2002-02-05 19:01:49.000000000 +0000 --- gcc-3.3/gcc/config/i386/netbsd-elf.h 2002-10-18 23:10:35.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,47 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target. ! This is a copy of LINK_SPEC from tweaked for ! the i386 target. */ #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{assert*} %{R*} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dc -dp \ ! %{!nostdlib: \ ! %{!r*: \ ! %{!e*:-e __start}}} \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ ! %{static:-static}}" ! /* Names to predefine in the preprocessor for this target machine. */ - #define CPP_PREDEFINES \ - "-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD" /* Make gcc agree with */ --- 20,54 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_ELF(); \ ! } \ ! while (0) ! ! ! /* Extra specs needed for NetBSD/i386 ELF. */ ! ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ ! { "netbsd_entry_point", NETBSD_ENTRY_POINT }, ! ! ! /* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target. */ #undef LINK_SPEC ! #define LINK_SPEC NETBSD_LINK_SPEC_ELF ! #define NETBSD_ENTRY_POINT "__start" ! ! ! /* Provide a CPP_SPEC appropriate for NetBSD. */ ! ! #undef CPP_SPEC ! #define CPP_SPEC "%(netbsd_cpp_spec)" /* Make gcc agree with */ *************** Boston, MA 02111-1307, USA. */ *** 114,118 **** we don't care about compatibility with older gcc versions. */ #define DEFAULT_PCC_STRUCT_RETURN 1 ! #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (NetBSD/i386 ELF)"); --- 121,127 ---- we don't care about compatibility with older gcc versions. */ #define DEFAULT_PCC_STRUCT_RETURN 1 ! /* Attempt to enable execute permissions on the stack. */ ! #define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK ! #define TARGET_VERSION fprintf (stderr, " (NetBSD/i386 ELF)"); diff -Nrc3pad gcc-3.2.3/gcc/config/i386/netbsd.h gcc-3.3/gcc/config/i386/netbsd.h *** gcc-3.2.3/gcc/config/i386/netbsd.h 2002-02-05 19:01:50.000000000 +0000 --- gcc-3.3/gcc/config/i386/netbsd.h 2002-10-18 23:10:35.000000000 +0000 *************** *** 1,20 **** ! /* This is tested by i386gas.h. */ ! #define YES_UNDERSCORES ! ! #include ! /* Get generic NetBSD definitions. */ ! #include ! #include /* This goes away when the math-emulator is fixed */ #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -D__NetBSD__ \ ! -Asystem=unix -Asystem=bsd -Asystem=NetBSD" #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" --- 1,24 ---- ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_AOUT(); \ ! } \ ! while (0) ! #define TARGET_VERSION fprintf (stderr, " (NetBSD/i386 a.out)"); /* This goes away when the math-emulator is fixed */ #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, ! ! #undef CPP_SPEC ! #define CPP_SPEC "%(netbsd_cpp_spec)" ! #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" *************** *** 58,60 **** --- 62,72 ---- /* Until they use ELF or something that handles dwarf2 unwinds and initialization stuff better. */ #define DWARF2_UNWIND_INFO 0 + + /* Redefine this so that it becomes "_GLOBAL_OFFSET_TABLE_" when the label + prefix is added. */ + #undef GOT_SYMBOL_NAME + #define GOT_SYMBOL_NAME "GLOBAL_OFFSET_TABLE_" + + /* Attempt to enable execute permissions on the stack. */ + #define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK diff -Nrc3pad gcc-3.2.3/gcc/config/i386/netware.h gcc-3.3/gcc/config/i386/netware.h *** gcc-3.2.3/gcc/config/i386/netware.h 2001-10-19 22:27:26.000000000 +0000 --- gcc-3.3/gcc/config/i386/netware.h 2002-06-16 21:13:10.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,33 **** #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 Netware 4)"); ! /* These surely require augmentation */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-DAPX386 -D__i386__ -D__netware__ -Asystem=netware -Acpu=i386 -Amachine=i386" #undef WCHAR_TYPE #define WCHAR_TYPE "short unsigned int" --- 24,37 ---- #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 Netware 4)"); ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("APX386"); \ ! builtin_define ("__netware__"); \ ! builtin_assert ("system=netware"); \ ! } \ ! while (0) #undef WCHAR_TYPE #define WCHAR_TYPE "short unsigned int" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/next.h gcc-3.3/gcc/config/i386/next.h *** gcc-3.2.3/gcc/config/i386/next.h 2001-12-20 17:36:35.000000000 +0000 --- gcc-3.3/gcc/config/i386/next.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,186 **** - /* Target definitions for GNU compiler for Intel x86 CPU running NeXTSTEP - Copyright (C) 1993, 1995, 1996, 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "i386/gas.h" - #include "nextstep.h" - - /* By default, target has a 80387, with IEEE FP. */ - - #undef TARGET_SUBTARGET_DEFAULT - #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP) - - /* Implicit library calls should use memcpy, not bcopy, etc. */ - - #define TARGET_MEM_FUNCTIONS - - /* Machines that use the AT&T assembler syntax - also return floating point values in an FP register. - Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - - #undef VALUE_REGNO - #define VALUE_REGNO(MODE) \ - ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode \ - ? FIRST_FLOAT_REG : 0) - - /* A C statement or statements which output an assembler instruction - opcode to the stdio stream STREAM. The macro-operand PTR is a - variable of type `char *' which points to the opcode name in its - "internal" form--the form that is written in the machine description. - - GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic. - So use `repe' instead. */ - - #undef ASM_OUTPUT_OPCODE - #define ASM_OUTPUT_OPCODE(STREAM, PTR) \ - { \ - if ((PTR)[0] == 'r' \ - && (PTR)[1] == 'e' \ - && (PTR)[2] == 'p') \ - { \ - if ((PTR)[3] == 'z') \ - { \ - fprintf (STREAM, "repe"); \ - (PTR) += 4; \ - } \ - else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \ - { \ - fprintf (STREAM, "repne"); \ - (PTR) += 5; \ - } \ - } \ - } - - /* Define macro used to output shift-double opcodes when the shift - count is in %cl. Some assemblers require %cl as an argument; - some don't. - - GAS requires the %cl argument, so override unx386.h. */ - - #undef SHIFT_DOUBLE_OMITS_COUNT - #define SHIFT_DOUBLE_OMITS_COUNT 0 - - /* Print opcodes the way that GAS expects them. */ - #define GAS_MNEMONICS 1 - - /* Names to predefine in the preprocessor for this target machine. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-DNeXT -Dunix -D__MACH__ -D__LITTLE_ENDIAN__ \ - -D__ARCHITECTURE__=\"i386\" -Asystem=unix -Asystem=mach" - - /* This accounts for the return pc and saved fp on the i386. */ - - #define OBJC_FORWARDING_STACK_OFFSET 8 - #define OBJC_FORWARDING_MIN_OFFSET 8 - - /* We do not want a dot in internal labels. */ - - #undef LPREFIX - #define LPREFIX "L" - - #undef ASM_GENERATE_INTERNAL_LABEL - #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER)) - - #undef ASM_OUTPUT_INTERNAL_LABEL - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, "%s%d:\n", PREFIX, NUM) - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #undef ASM_APP_ON - #define ASM_APP_ON "#APP\n" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #undef ASM_APP_OFF - #define ASM_APP_OFF "#NO_APP\n" - - #undef ASM_OUTPUT_REG_PUSH - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tpushl %se%s\n", "%", reg_names[REGNO]) - - #undef ASM_OUTPUT_REG_POP - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tpopl %se%s\n", "%", reg_names[REGNO]) - - /* This is being overridden because the default i386 configuration - generates calls to "_mcount". NeXT system libraries all use - "mcount". */ - - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - { \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall mcount\n"); \ - } \ - } - - /* BEGIN Calling Convention CHANGES */ - - /* These changes violate the Intel/Unix ABI. Specifically, they - change the way that space for a block return value is passed to a - function. The ABI says that the pointer is passed on the stack. - We change to pass the pointer in %ebx. This makes the NeXT - Objective-C forwarding mechanism possible to implement on an i386. */ - - /* Do NOT pass address of structure values on the stack. */ - - #undef STRUCT_VALUE_INCOMING - #undef STRUCT_VALUE - - /* Pass them in %ebx. */ - - #undef STRUCT_VALUE_REGNUM - #define STRUCT_VALUE_REGNUM 3 - - /* Because we are passing the pointer in a register, we don't need to - rely on the callee to pop it. */ - - #undef RETURN_POPS_ARGS - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ - ((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE \ - ? 0 \ - : (TARGET_RTD \ - && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ - || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ - == void_type_node))) ? (SIZE) : 0) - - /* END Calling Convention CHANGES */ - - /* NeXT still uses old binutils that don't insert nops by default - when the .align directive demands to insert extra space in the text - segment. */ - #undef ASM_OUTPUT_ALIGN - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG)) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/openbsd.h gcc-3.3/gcc/config/i386/openbsd.h *** gcc-3.2.3/gcc/config/i386/openbsd.h 2002-05-28 21:29:47.000000000 +0000 --- gcc-3.3/gcc/config/i386/openbsd.h 2002-10-20 22:37:10.000000000 +0000 *************** *** 1,5 **** /* Configuration for an OpenBSD i386 target. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Configuration for an OpenBSD i386 target. ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,40 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* This is tested by i386gas.h. */ - #define YES_UNDERSCORES ! #include ! ! /* Get generic OpenBSD definitions. */ ! #define OBSD_OLD_GAS ! #include /* This goes away when the math-emulator is fixed */ #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) ! /* Run-time target specifications */ ! #define CPP_PREDEFINES "-D__unix__ -D__OpenBSD__ \ ! -Asystem=unix -Asystem=bsd -Asystem=OpenBSD" /* Layout of source language data types. */ --- 18,41 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (OpenBSD/i386)"); /* This goes away when the math-emulator is fixed */ #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__unix__"); \ ! builtin_define ("__OpenBSD__"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=bsd"); \ ! builtin_assert ("system=OpenBSD"); \ ! } \ ! while (0) /* Layout of source language data types. */ *************** Boston, MA 02111-1307, USA. */ *** 95,103 **** #undef ASM_PREFERRED_EH_DATA_FORMAT - - /* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */ - #undef ASM_COMMENT_START #define ASM_COMMENT_START ";#" --- 96,101 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/osf1-ci.asm gcc-3.3/gcc/config/i386/osf1-ci.asm *** gcc-3.2.3/gcc/config/i386/osf1-ci.asm 1998-12-16 21:03:47.000000000 +0000 --- gcc-3.3/gcc/config/i386/osf1-ci.asm 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,65 **** - ! crti.s for OSF/1, x86; derived from sol2-ci.asm. - - ! Copyright (C) 1993, 1998 Free Software Foundation, Inc. - ! Written By Fred Fish, Nov 1992 - ! - ! This file is free software; you can redistribute it and/or modify it - ! under the terms of the GNU General Public License as published by the - ! Free Software Foundation; either version 2, or (at your option) any - ! later version. - ! - ! In addition to the permissions in the GNU General Public License, the - ! Free Software Foundation gives you unlimited permission to link the - ! compiled version of this file with other programs, and to distribute - ! those programs without any restriction coming from the use of this - ! file. (The General Public License restrictions do apply in other - ! respects; for example, they cover modification of the file, and - ! distribution when not linked into another program.) - ! - ! This file is distributed in the hope that it will be useful, but - ! WITHOUT ANY WARRANTY; without even the implied warranty of - ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - ! General Public License for more details. - ! - ! You should have received a copy of the GNU General Public License - ! along with this program; see the file COPYING. If not, write to - ! the Free Software Foundation, 59 Temple Place - Suite 330, - ! Boston, MA 02111-1307, USA. - ! - ! As a special exception, if you link this library with files - ! compiled with GCC to produce an executable, this does not cause - ! the resulting executable to be covered by the GNU General Public License. - ! This exception does not however invalidate any other reasons why - ! the executable file might be covered by the GNU General Public License. - ! - - ! This file just supplies labeled starting points for the .init and .fini - ! sections. It is linked in before the values-Xx.o files and also before - ! crtbegin.o. - - .file "crti.s" - .ident "GNU C crti.s" - - .section .init - .globl _init - .type _init,@function - _init: - - .section .fini - .globl _fini - .type _fini,@function - _fini: - - .globl _init_init_routine - .data - .align 4 - .type _init_init_routine,@object - .size _init_init_routine,4 - _init_init_routine: - .long _init - .globl _init_fini_routine - .align 4 - .type _init_fini_routine,@object - .size _init_fini_routine,4 - _init_fini_routine: - .long _fini --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/osf1-cn.asm gcc-3.3/gcc/config/i386/osf1-cn.asm *** gcc-3.2.3/gcc/config/i386/osf1-cn.asm 1998-12-16 21:03:48.000000000 +0000 --- gcc-3.3/gcc/config/i386/osf1-cn.asm 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - ! crtn.s for OSF/1, x86; derived from sol2-cn.asm. - - ! Copyright (C) 1993, 1998 Free Software Foundation, Inc. - ! Written By Fred Fish, Nov 1992 - ! - ! This file is free software; you can redistribute it and/or modify it - ! under the terms of the GNU General Public License as published by the - ! Free Software Foundation; either version 2, or (at your option) any - ! later version. - ! - ! In addition to the permissions in the GNU General Public License, the - ! Free Software Foundation gives you unlimited permission to link the - ! compiled version of this file with other programs, and to distribute - ! those programs without any restriction coming from the use of this - ! file. (The General Public License restrictions do apply in other - ! respects; for example, they cover modification of the file, and - ! distribution when not linked into another program.) - ! - ! This file is distributed in the hope that it will be useful, but - ! WITHOUT ANY WARRANTY; without even the implied warranty of - ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - ! General Public License for more details. - ! - ! You should have received a copy of the GNU General Public License - ! along with this program; see the file COPYING. If not, write to - ! the Free Software Foundation, 59 Temple Place - Suite 330, - ! Boston, MA 02111-1307, USA. - ! - ! As a special exception, if you link this library with files - ! compiled with GCC to produce an executable, this does not cause - ! the resulting executable to be covered by the GNU General Public License. - ! This exception does not however invalidate any other reasons why - ! the executable file might be covered by the GNU General Public License. - ! - - ! This file just supplies returns for the .init and .fini sections. It is - ! linked in after all other files. - - .file "crtn.o" - .ident "GNU C crtn.o" - - .section .init - ret $0x0 - - .section .fini - ret $0x0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/osf1elfgdb.h gcc-3.3/gcc/config/i386/osf1elfgdb.h *** gcc-3.2.3/gcc/config/i386/osf1elfgdb.h 2001-10-19 22:27:27.000000000 +0000 --- gcc-3.3/gcc/config/i386/osf1elfgdb.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - /* Target definitions for GNU compiler for Intel 80386 running OSF/1 1.3+ - with gas and gdb. */ - - /* Use stabs instead of DWARF debug format. */ - #undef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/osf1elf.h gcc-3.3/gcc/config/i386/osf1elf.h *** gcc-3.2.3/gcc/config/i386/osf1elf.h 2001-12-09 16:31:50.000000000 +0000 --- gcc-3.3/gcc/config/i386/osf1elf.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,213 **** - /* OSF/1 1.3 now is compitable with SVR4, so include sysv4.h, and - put difference here. - Copyright (C) 2000 Free Software Foundation, Inc. */ - - #include - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (i386 OSF/1)"); - - #define TARGET_OSF1ELF - - /* WORD_SWITCH_TAKES_ARG defined in svr4 is not correct. We also - need an extra -soname */ - #undef WORD_SWITCH_TAKES_ARG - #define WORD_SWITCH_TAKES_ARG(STR) \ - (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ - || !strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \ - || !strcmp (STR, "Tbss") || !strcmp (STR, "soname")) - - /* Note, -fpic and -fPIC are equivalent */ - #undef CPP_SPEC - #define CPP_SPEC "\ - %(cpp_cpu) \ - %{fpic: -D__SHARED__} %{fPIC: %{!fpic: -D__SHARED__}} \ - %{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \ - %{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ - %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.C: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.m: -D__LANGUAGE_OBJECTIVE_C} \ - %{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}" - - /* -mmcount or -mno-mcount should be used with -pg or -p */ - #undef CC1_SPEC - #define CC1_SPEC "%(cc1_cpu) %{p: %{!mmcount: %{!mno-mcount: -mno-mcount }}} \ - %{!p: %{pg: %{!mmcount: %{!mno-mcount: -mno-mcount }}}}" - - /* Note, -D__NO_UNDERSCORES__ -D__ELF__ are provided in the older version of - OSF/1 gcc. We keep them here, so that old /usr/include/i386/asm.h works. - */ - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-D__NO_UNDERSCORES__ -D__ELF__ -DOSF -DOSF1 -Dunix \ - -Asystem=unix -Asystem=xpg4 -Asystem=osf1" - - /* current OSF/1 doesn't provide separate crti.o and gcrti.o (and also, crtn.o - and gcrtn.o) for profile. */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%{!shared: \ - %{!symbolic: \ - %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\ - crti.o%s \ - crtbegin.o%s" - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtend.o%s crtn.o%s" - - #undef ASM_SPEC - #define ASM_SPEC "%{v*: -v}" - - #undef LINK_SPEC - #define LINK_SPEC "%{v*: -v} \ - %{h*} %{z*} \ - %{dy:-call_shared} %{dn:-static} \ - %{static:-static} \ - %{shared:-shared} \ - %{call_shared:-call_shared} \ - %{symbolic:-Bsymbolic -shared -call_shared} \ - %{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \ - %{noshrlib: -static } \ - %{!noshrlib: -call_shared}}}}}}" - - #undef MD_EXEC_PREFIX - #define MD_EXEC_PREFIX "/usr/ccs/gcc/" - - #undef MD_STARTFILE_PREFIX - #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" - - /* Define this macro meaning that gcc should find the library 'libgcc.a' - by hand, rather than passing the argument '-lgcc' to tell the linker - to do the search */ - #define LINK_LIBGCC_SPECIAL - - /* This goes with LINK_LIBGCC_SPECIAL, we need tell libgcc.a differently */ - #undef LIBGCC_SPEC - #define LIBGCC_SPEC "%{!shared:%{!symbolic:libgcc.a%s}}" - - /* Specify size_t, ptrdiff_t, and wchar_t types. */ - #undef SIZE_TYPE - #undef PTRDIFF_TYPE - #undef WCHAR_TYPE - #undef WCHAR_TYPE_SIZE - - #define SIZE_TYPE "long unsigned int" - #define PTRDIFF_TYPE "int" - #define WCHAR_TYPE "unsigned int" - #define WCHAR_TYPE_SIZE BITS_PER_WORD - - /* Turn off long double being 96 bits. */ - #undef LONG_DOUBLE_TYPE_SIZE - #define LONG_DOUBLE_TYPE_SIZE 64 - - /* Work with OSF/1 profile */ - #define MASK_NO_MCOUNT 000200000000 /* profiling uses mcount_ptr */ - - #define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0) - - #undef SUBTARGET_SWITCHES - #define SUBTARGET_SWITCHES \ - { "mcount", -MASK_NO_MCOUNT, \ - N_("Profiling uses mcount") }, \ - { "no-mcount", MASK_NO_MCOUNT, "" }, - - /* This macro generates the assembly code for function entry. - FILE is a stdio stream to output the code to. - SIZE is an int: how many units of temporary storage to allocate. - Refer to the array `regs_ever_live' to determine which registers - to save; `regs_ever_live[I]' is nonzero if register number I - is ever used in the function. This macro is responsible for - knowing which registers should not be saved even if used. - - We override it here to allow for the new profiling code to go before - the prologue and the old mcount code to go after the prologue (and - after %ebx has been set up for ELF shared library support). */ - #if 0 - #define OSF_PROFILE_BEFORE_PROLOGUE \ - (!TARGET_MCOUNT \ - && !current_function_needs_context \ - && (!flag_pic \ - || !frame_pointer_needed \ - || (!current_function_uses_pic_offset_table \ - && !current_function_uses_const_pool))) - #else - #define OSF_PROFILE_BEFORE_PROLOGUE 0 - #endif - - /* A C statement or compound statement to output to FILE some assembler code to - call the profiling subroutine `mcount'. Before calling, the assembler code - must load the address of a counter variable into a register where `mcount' - expects to find the address. The name of this variable is `LP' followed by - the number LABELNO, so you would generate the name using `LP%d' in a - `fprintf'. - - The details of how the address should be passed to `mcount' are determined - by your operating system environment, not by GNU CC. To figure them out, - compile a small program for profiling using the system's installed C - compiler and look at the assembler code that results. */ - - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - do \ - { \ - if (!OSF_PROFILE_BEFORE_PROLOGUE) \ - { \ - const char *const prefix = ""; \ - const char *const lprefix = LPREFIX; \ - int labelno = LABELNO; \ - \ - /* Note that OSF/rose blew it in terms of calling mcount, \ - since OSF/rose prepends a leading underscore, but mcount's \ - doesn't. At present, we keep this kludge for ELF as well \ - to allow old kernels to build profiling. */ \ - \ - if (flag_pic \ - && !current_function_uses_pic_offset_table \ - && !current_function_uses_const_pool) \ - abort (); \ - \ - if (TARGET_MCOUNT && flag_pic) \ - { \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - lprefix, labelno); \ - fprintf (FILE, "\tcall *%smcount@GOT(%%ebx)\n", prefix); \ - } \ - \ - else if (TARGET_MCOUNT) \ - { \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \ - fprintf (FILE, "\tcall %smcount\n", prefix); \ - } \ - \ - else if (flag_pic && frame_pointer_needed) \ - { \ - fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \ - fprintf (FILE, "\tpushl %%ecx\n"); \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - lprefix, labelno); \ - fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%ebx),%%eax\n"); \ - fprintf (FILE, "\tcall *(%%eax)\n"); \ - fprintf (FILE, "\tpopl %%eax\n"); \ - } \ - \ - else if (frame_pointer_needed) \ - { \ - fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \ - fprintf (FILE, "\tpushl %%ecx\n"); \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \ - fprintf (FILE, "\tcall *_mcount_ptr\n"); \ - fprintf (FILE, "\tpopl %%eax\n"); \ - } \ - \ - else \ - abort (); \ - } \ - } \ - while (0) - - #if defined (CROSS_COMPILE) && defined (HOST_BITS_PER_INT) && defined (HOST_BITS_PER_LONG) && defined (HOST_BITS_PER_LONGLONG) - #if (HOST_BITS_PER_INT==32) && (HOST_BITS_PER_LONG==64) && (HOST_BITS_PER_LONGLONG==64) - #define REAL_ARITHMETIC - #endif - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/osfelf.h gcc-3.3/gcc/config/i386/osfelf.h *** gcc-3.2.3/gcc/config/i386/osfelf.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/i386/osfelf.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,79 **** - /* Definitions of target machine for GNU compiler. - Intel 386 (OSF/1 with ELF) version. - Copyright (C) 1993 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "config/i386/osfrose.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem=xpg4" - - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) \ - %{mrose: -D__ROSE__ %{!pic-none: -D__SHARED__}} \ - %{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \ - %{mno-underscores: -D__NO_UNDERSCORES__} \ - %{!mrose: %{!munderscores: -D__NO_UNDERSCORES__}} \ - %{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \ - %{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ - %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.C: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.m: -D__LANGUAGE_OBJECTIVE_C} \ - %{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}" - - /* Turn on -pic-extern by default for OSF/rose, -fpic for ELF. */ - #undef CC1_SPEC - #define CC1_SPEC "%(cc1_cpu) \ - %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ - %{!melf: %{!mrose: -melf }} \ - %{!mrose: %{!munderscores: %{!mno-underscores: -mno-underscores }} \ - %{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount-ptr }}}} \ - %{mrose: %{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount }}} \ - %{pic-extern: -mhalf-pic } %{pic-lib: -mhalf-pic } \ - %{!pic-extern: %{!pic-lib: %{pic-none: -mno-half-pic} %{!pic-none: -mhalf-pic}}} \ - %{pic-calls: } %{pic-names*: }}" - - #undef ASM_SPEC - #define ASM_SPEC "%{v*: -v}" - - #undef LINK_SPEC - #define LINK_SPEC "%{v*: -v} \ - %{mrose: %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \ - %{nostdlib} %{noshrlib} %{glue}} \ - %{!mrose: %{dy} %{dn} %{glue: } \ - %{h*} %{z*} \ - %{static:-dn -Bstatic} \ - %{shared:-G -dy} \ - %{symbolic:-Bsymbolic -G -dy} \ - %{G:-G} \ - %{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \ - %{noshrlib: -dn } %{pic-none: -dn } \ - %{!noshrlib: %{!pic-none: -dy}}}}}}}}" - - #undef TARGET_VERSION_INTERNAL - #undef TARGET_VERSION - - #undef I386_VERSION - #define I386_VERSION " 80386, ELF objects" - - #define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM) - #define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr) - - #undef OBJECT_FORMAT_ROSE --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/osfrose.h gcc-3.3/gcc/config/i386/osfrose.h *** gcc-3.2.3/gcc/config/i386/osfrose.h 2001-11-11 05:56:41.000000000 +0000 --- gcc-3.3/gcc/config/i386/osfrose.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,720 **** - /* Definitions of target machine for GNU compiler. - Intel 386 (OSF/1 with OSF/rose) version. - Copyright (C) 1991, 1992, 1993, 1996, 1998, 1999, 2000 - Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "halfpic.h" - #include "i386/gstabs.h" - - #define OSF_OS - - #undef WORD_SWITCH_TAKES_ARG - #define WORD_SWITCH_TAKES_ARG(STR) \ - (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) || !strcmp (STR, "pic-names")) - - /* This defines which switch letters take arguments. On svr4, most of - the normal cases (defined in gcc.c) apply, and we also have -h* and - -z* options (for the linker). */ - - #define SWITCH_TAKES_ARG(CHAR) \ - (DEFAULT_SWITCH_TAKES_ARG(CHAR) \ - || (CHAR) == 'h' \ - || (CHAR) == 'z') - - #define MASK_HALF_PIC 010000000000 /* Mask for half-pic code */ - #define MASK_HALF_PIC_DEBUG 004000000000 /* Debug flag */ - #define MASK_ELF 002000000000 /* ELF not rose */ - #define MASK_NO_UNDERSCORES 000400000000 /* suppress leading _ */ - #define MASK_LARGE_ALIGN 000200000000 /* align to >word boundaries */ - #define MASK_NO_MCOUNT 000100000000 /* profiling uses mcount_ptr */ - - #define TARGET_HALF_PIC (target_flags & MASK_HALF_PIC) - #define TARGET_DEBUG (target_flags & MASK_HALF_PIC_DEBUG) - #define HALF_PIC_DEBUG TARGET_DEBUG - #define TARGET_ELF (target_flags & MASK_ELF) - #define TARGET_ROSE ((target_flags & MASK_ELF) == 0) - #define TARGET_UNDERSCORES ((target_flags & MASK_NO_UNDERSCORES) == 0) - #define TARGET_LARGE_ALIGN (target_flags & MASK_LARGE_ALIGN) - #define TARGET_MCOUNT ((target_flags & MASK_NO_MCOUNT) == 0) - - #undef SUBTARGET_SWITCHES - #define SUBTARGET_SWITCHES \ - { "half-pic", MASK_HALF_PIC, \ - N_("Emit half-PIC code") }, \ - { "no-half-pic", -MASK_HALF_PIC, "" }, \ - { "debug-half-pic", MASK_HALF_PIC_DEBUG, \ - 0 /* intentionally undoc */ }, \ - { "debugb", MASK_HALF_PIC_DEBUG, \ - 0 /* intentionally undoc */ }, \ - { "elf", MASK_ELF, \ - N_("Emit ELF object code") }, \ - { "rose", -MASK_ELF, \ - N_("Emit ROSE object code") }, \ - { "underscores", -MASK_NO_UNDERSCORES, \ - N_("Symbols have a leading underscore") }, \ - { "no-underscores", MASK_NO_UNDERSCORES, "" }, \ - { "large-align", MASK_LARGE_ALIGN, \ - N_("Align to >word boundaries") }, \ - { "no-large-align", -MASK_LARGE_ALIGN, "" }, \ - { "mcount", -MASK_NO_MCOUNT, \ - N_("Use mcount for profiling") }, \ - { "mcount-ptr", MASK_NO_MCOUNT, \ - N_("Use mcount_ptr for profiling") }, \ - { "no-mcount", MASK_NO_MCOUNT, "" }, - - /* OSF/rose uses stabs, not dwarf. */ - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - - #ifndef DWARF_DEBUGGING_INFO - #define DWARF_DEBUGGING_INFO /* enable dwarf debugging for testing */ - #endif - - /* Handle #pragma weak and #pragma pack. */ - - #define HANDLE_SYSV_PRAGMA - #define SUPPORTS_WEAK TARGET_ELF - - /* Change default predefines. */ - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem=xpg4" - - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) \ - %{!melf: -D__ROSE__ %{!pic-none: -D__SHARED__}} \ - %{melf: -D__ELF__ %{fpic: -D__SHARED__}} \ - %{mno-underscores: -D__NO_UNDERSCORES__} \ - %{melf: %{!munderscores: -D__NO_UNDERSCORES__}} \ - %{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \ - %{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ - %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.C: -D__LANGUAGE_C_PLUS_PLUS} \ - %{.m: -D__LANGUAGE_OBJECTIVE_C} \ - %{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}" - - /* Turn on -pic-extern by default for OSF/rose, -fpic for ELF. */ - #undef CC1_SPEC - #define CC1_SPEC "%(cc1_cpu) \ - %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ - %{!melf: %{!mrose: -mrose }} \ - %{melf: %{!munderscores: %{!mno-underscores: -mno-underscores }} \ - %{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount-ptr }}}} \ - %{!melf: %{!munderscores: %{!mno-underscores: -munderscores }} \ - %{!mmcount: %{!mno-mcount: %{!mmcount-ptr: -mmcount }}} \ - %{pic-extern: -mhalf-pic } %{pic-lib: -mhalf-pic } \ - %{!pic-extern: %{!pic-lib: %{pic-none: -mno-half-pic} %{!pic-none: -mhalf-pic}}} \ - %{pic-calls: } %{pic-names*: }}" - - #undef ASM_SPEC - #define ASM_SPEC "%{v*: -v}" - - #undef LINK_SPEC - #define LINK_SPEC "%{v*: -v} \ - %{!melf: %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \ - %{nostdlib} %{noshrlib} %{glue}} \ - %{melf: %{dy} %{dn} %{glue: } \ - %{h*} %{z*} \ - %{static:-dn -Bstatic} \ - %{shared:-G -dy} \ - %{symbolic:-Bsymbolic -G -dy} \ - %{G:-G} \ - %{!dy: %{!dn: %{!static: %{!shared: %{!symbolic: \ - %{noshrlib: -dn } %{pic-none: -dn } \ - %{!noshrlib: %{!pic-none: -dy}}}}}}}}" - - #undef LIB_SPEC - #define LIB_SPEC "-lc" - - #undef LIBG_SPEC - #define LIBG_SPEC "" - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - - #undef TARGET_VERSION_INTERNAL - #undef TARGET_VERSION - - #define I386_VERSION " 80386, OSF/rose objects" - - #define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM) - #define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr) - - #undef MD_EXEC_PREFIX - #define MD_EXEC_PREFIX "/usr/ccs/gcc/" - - #undef MD_STARTFILE_PREFIX - #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" - - /* Specify size_t, ptrdiff_t, and wchar_t types. */ - #undef SIZE_TYPE - #undef PTRDIFF_TYPE - #undef WCHAR_TYPE - #undef WCHAR_TYPE_SIZE - - #define SIZE_TYPE "long unsigned int" - #define PTRDIFF_TYPE "int" - #define WCHAR_TYPE "unsigned int" - #define WCHAR_TYPE_SIZE BITS_PER_WORD - - /* Define this macro if the system header files support C++ as well - as C. This macro inhibits the usual method of using system header - files in C++, which is to pretend that the file's contents are - enclosed in `extern "C" {...}'. */ - #define NO_IMPLICIT_EXTERN_C - - /* Turn off long double being 96 bits. */ - #undef LONG_DOUBLE_TYPE_SIZE - #define LONG_DOUBLE_TYPE_SIZE 64 - - #define OSF_PROFILE_BEFORE_PROLOGUE \ - (!TARGET_MCOUNT \ - && !current_function_needs_context \ - && (!flag_pic \ - || !frame_pointer_needed \ - || (!current_function_uses_pic_offset_table \ - && !current_function_uses_const_pool))) - - /* A C statement or compound statement to output to FILE some assembler code to - call the profiling subroutine `mcount'. Before calling, the assembler code - must load the address of a counter variable into a register where `mcount' - expects to find the address. The name of this variable is `LP' followed by - the number LABELNO, so you would generate the name using `LP%d' in a - `fprintf'. - - The details of how the address should be passed to `mcount' are determined - by your operating system environment, not by GNU CC. To figure them out, - compile a small program for profiling using the system's installed C - compiler and look at the assembler code that results. */ - - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - do \ - { \ - if (!OSF_PROFILE_BEFORE_PROLOGUE) \ - { \ - const char *const prefix = (TARGET_UNDERSCORES) ? "_" : ""; \ - const char *const lprefix = LPREFIX; \ - int labelno = LABELNO; \ - \ - /* Note that OSF/rose blew it in terms of calling mcount, \ - since OSF/rose prepends a leading underscore, but mcount's \ - doesn't. At present, we keep this kludge for ELF as well \ - to allow old kernels to build profiling. */ \ - \ - if (flag_pic \ - && !current_function_uses_pic_offset_table \ - && !current_function_uses_const_pool) \ - abort (); \ - \ - if (TARGET_MCOUNT && flag_pic) \ - { \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - lprefix, labelno); \ - fprintf (FILE, "\tcall *%smcount@GOT(%%ebx)\n", prefix); \ - } \ - \ - else if (TARGET_MCOUNT && HALF_PIC_P ()) \ - { \ - rtx symdef; \ - \ - HALF_PIC_EXTERNAL ("mcount"); \ - symdef = HALF_PIC_PTR (gen_rtx_SYMBOL_REF (Pmode, "mcount")); \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \ - fprintf (FILE, "\tcall *%s%s\n", prefix, XSTR (symdef, 0)); \ - } \ - \ - else if (TARGET_MCOUNT) \ - { \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \ - fprintf (FILE, "\tcall %smcount\n", prefix); \ - } \ - \ - else if (flag_pic && frame_pointer_needed) \ - { \ - fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \ - fprintf (FILE, "\tpushl %%ecx\n"); \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - lprefix, labelno); \ - fprintf (FILE, "\tmovl _mcount_ptr@GOT(%%ebx),%%eax\n"); \ - fprintf (FILE, "\tcall *(%%eax)\n"); \ - fprintf (FILE, "\tpopl %%eax\n"); \ - } \ - \ - else if (frame_pointer_needed) \ - { \ - fprintf (FILE, "\tmovl 4(%%ebp),%%ecx\n"); \ - fprintf (FILE, "\tpushl %%ecx\n"); \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", lprefix, labelno); \ - fprintf (FILE, "\tcall *_mcount_ptr\n"); \ - fprintf (FILE, "\tpopl %%eax\n"); \ - } \ - \ - else \ - abort (); \ - } \ - } \ - while (0) - - /* A C function or functions which are needed in the library to - support block profiling. When support goes into libc, undo - the #if 0. */ - - #if 0 - #undef BLOCK_PROFILING_CODE - #define BLOCK_PROFILING_CODE - #endif - - /* Prefix for internally generated assembler labels. If we aren't using - underscores, we are using prefix `.'s to identify labels that should - be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ - #undef LPREFIX - #define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L") - - /* This is how to store into the string BUF - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #undef ASM_GENERATE_INTERNAL_LABEL - #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*%s%s%ld", (TARGET_UNDERSCORES) ? "" : ".", \ - (PREFIX), (long)(NUMBER)) - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #undef ASM_OUTPUT_INTERNAL_LABEL - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \ - PREFIX, NUM) - - /* The prefix to add to user-visible assembler symbols. */ - - /* target_flags is not accessible by the preprocessor */ - #undef USER_LABEL_PREFIX - #define USER_LABEL_PREFIX "_" - - /* This is how to output a reference to a user-level label named NAME. */ - - #undef ASM_OUTPUT_LABELREF - #define ASM_OUTPUT_LABELREF(FILE,NAME) \ - fprintf (FILE, "%s%s", (TARGET_UNDERSCORES) ? "_" : "", NAME) - - /* This is how to output an element of a case-vector that is relative. - This is only used for PIC code. See comments by the `casesi' insn in - i386.md for an explanation of the expression this outputs. */ - - #undef ASM_OUTPUT_ADDR_DIFF_ELT - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) - - /* Output a definition */ - #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ - do \ - { \ - fprintf ((FILE), "%s", SET_ASM_OP); \ - assemble_name (FILE, LABEL1); \ - fprintf (FILE, ","); \ - assemble_name (FILE, LABEL2); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - - /* A C expression to output text to align the location counter in the - way that is desirable at a point in the code that is reached only - by jumping. - - This macro need not be defined if you don't want any special - alignment to be done at such a time. Most machine descriptions do - not currently define the macro. */ - - #undef LABEL_ALIGN_AFTER_BARRIER - #define LABEL_ALIGN_AFTER_BARRIER(LABEL) \ - ((!TARGET_LARGE_ALIGN && i386_align_jumps > 2) ? 2 : i386_align_jumps) - - /* A C expression to output text to align the location counter in the - way that is desirable at the beginning of a loop. - - This macro need not be defined if you don't want any special - alignment to be done at such a time. Most machine descriptions do - not currently define the macro. */ - - #undef LOOP_ALIGN - #define LOOP_ALIGN(LABEL) (i386_align_loops) - - /* A C statement to output to the stdio stream STREAM an assembler - command to advance the location counter to a multiple of 2 to the - POWER bytes. POWER will be a C expression of type `int'. */ - - #undef ASM_OUTPUT_ALIGN - #define ASM_OUTPUT_ALIGN(STREAM, POWER) \ - fprintf (STREAM, "\t.align\t%d\n", \ - (!TARGET_LARGE_ALIGN && (POWER) > 2) ? 2 : (POWER)) - - /* A C expression that is 1 if the RTX X is a constant which is a - valid address. On most machines, this can be defined as - `CONSTANT_P (X)', but a few machines are more restrictive in - which constant addresses are supported. - - `CONSTANT_P' accepts integer-values expressions whose values are - not explicitly known, such as `symbol_ref', `label_ref', and - `high' expressions and `const' arithmetic expressions, in - addition to `const_int' and `const_double' expressions. */ - - #define CONSTANT_ADDRESS_P_ORIG(X) \ - (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ - || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ - || GET_CODE (X) == HIGH) - - #undef CONSTANT_ADDRESS_P - #define CONSTANT_ADDRESS_P(X) \ - ((CONSTANT_ADDRESS_P_ORIG (X)) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X))) - - /* Nonzero if the constant value X is a legitimate general operand. - It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ - - #undef LEGITIMATE_CONSTANT_P - #define LEGITIMATE_CONSTANT_P(X) \ - (!HALF_PIC_P () \ - || GET_CODE (X) == CONST_DOUBLE \ - || GET_CODE (X) == CONST_INT \ - || !HALF_PIC_ADDRESS_P (X)) - - /* Sometimes certain combinations of command options do not make sense - on a particular target machine. You can define a macro - `OVERRIDE_OPTIONS' to take account of this. This macro, if - defined, is executed once just after all the command options have - been parsed. */ - - #undef SUBTARGET_OVERRIDE_OPTIONS - #define SUBTARGET_OVERRIDE_OPTIONS \ - { \ - /* \ - if (TARGET_ELF && TARGET_HALF_PIC) \ - { \ - target_flags &= ~MASK_HALF_PIC; \ - flag_pic = 1; \ - } \ - */ \ - \ - if (TARGET_ROSE && flag_pic) \ - { \ - target_flags |= MASK_HALF_PIC; \ - flag_pic = 0; \ - } \ - \ - if (TARGET_HALF_PIC) \ - half_pic_init (); \ - } - - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or - function named by the symbol (such as what section it is in). - - The macro definition, if any, is executed immediately after the - rtl for DECL has been created and stored in `DECL_RTL (DECL)'. - The value of the rtl will be a `mem' whose address is a - `symbol_ref'. - - The usual thing for this macro to do is to a flag in the - `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified - name string in the `symbol_ref' (if one bit is not enough - information). - - The best way to modify the name string is by adding text to the - beginning, with suitable punctuation to prevent any ambiguity. - Allocate the new name in `saveable_obstack'. You will have to - modify `ASM_OUTPUT_LABELREF' to remove and decode the added text - and output the name accordingly. - - You can also check the information stored in the `symbol_ref' in - the definition of `GO_IF_LEGITIMATE_ADDRESS' or - `PRINT_OPERAND_ADDRESS'. */ - - #undef ENCODE_SECTION_INFO - #define ENCODE_SECTION_INFO(DECL) \ - do \ - { \ - if (HALF_PIC_P ()) \ - HALF_PIC_ENCODE (DECL); \ - \ - else if (flag_pic) \ - { \ - rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ - SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ - = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - || ! TREE_PUBLIC (DECL)); \ - } \ - } \ - while (0) - - - /* On most machines, read-only variables, constants, and jump tables - are placed in the text section. If this is not the case on your - machine, this macro should be defined to be the name of a function - (either `data_section' or a function defined in `EXTRA_SECTIONS') - that switches to the section to be used for read-only items. - - If these items should be placed in the text section, this macro - should not be defined. */ - - #if 0 - #undef READONLY_DATA_SECTION - #define READONLY_DATA_SECTION() \ - do \ - { \ - if (TARGET_ELF) \ - { \ - if (in_section != in_rodata) \ - { \ - fprintf (asm_out_file, "\t.section \"rodata\"\n"); \ - in_section = in_rodata; \ - } \ - } \ - else \ - text_section (); \ - } \ - while (0) - #endif - - /* A list of names for sections other than the standard two, which are - `in_text' and `in_data'. You need not define this macro on a - system with no other sections (that GCC needs to use). */ - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS in_rodata, in_data1 - - /* Given a decl node or constant node, choose the section to output it in - and select that section. */ - - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) \ - do \ - { \ - if (MODE == Pmode && HALF_PIC_P () && HALF_PIC_ADDRESS_P (RTX)) \ - data_section (); \ - else \ - readonly_data_section (); \ - } \ - while (0) - - #undef SELECT_SECTION - #define SELECT_SECTION(DECL, RELOC, ALIGN) \ - { \ - if (RELOC && HALF_PIC_P ()) \ - data_section (); \ - \ - else if (TREE_CODE (DECL) == STRING_CST) \ - { \ - if (flag_writable_strings) \ - data_section (); \ - else \ - readonly_data_section (); \ - } \ - \ - else if (TREE_CODE (DECL) != VAR_DECL) \ - readonly_data_section (); \ - \ - else if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ - || !DECL_INITIAL (DECL) \ - || (DECL_INITIAL (DECL) != error_mark_node \ - && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ - data_section (); \ - \ - else \ - readonly_data_section (); \ - } - - - /* Define the strings used for the special svr4 .type and .size directives. - These strings generally do not vary from one system running svr4 to - another, but if a given system (e.g. m88k running svr) needs to use - different pseudo-op names for these, they may be overridden in the - file which includes this one. */ - - #define TYPE_ASM_OP "\t.type\t" - #define SIZE_ASM_OP "\t.size\t" - #define SET_ASM_OP "\t.set\t" - - /* This is how we tell the assembler that a symbol is weak. */ - - #define ASM_WEAKEN_LABEL(FILE,NAME) \ - do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ - fputc ('\n', FILE); } while (0) - - /* The following macro defines the format used to output the second - operand of the .type assembler directive. Different svr4 assemblers - expect various different forms for this operand. The one given here - is just a default. You may need to override it in your machine- - specific tm.h file (depending upon the particulars of your assembler). */ - - #define TYPE_OPERAND_FMT "@%s" - - /* A C statement (sans semicolon) to output to the stdio stream - STREAM any text necessary for declaring the name NAME of an - initialized variable which is being defined. This macro must - output the label definition (perhaps using `ASM_OUTPUT_LABEL'). - The argument DECL is the `VAR_DECL' tree node representing the - variable. - - If this macro is not defined, then the variable name is defined - in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */ - - #undef ASM_DECLARE_OBJECT_NAME - #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ - do \ - { \ - ASM_OUTPUT_LABEL(STREAM,NAME); \ - HALF_PIC_DECLARE (NAME); \ - if (TARGET_ELF) \ - { \ - fprintf (STREAM, "%s", TYPE_ASM_OP); \ - assemble_name (STREAM, NAME); \ - putc (',', STREAM); \ - fprintf (STREAM, TYPE_OPERAND_FMT, "object"); \ - putc ('\n', STREAM); \ - size_directive_output = 0; \ - if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ - { \ - size_directive_output = 1; \ - fprintf (STREAM, "%s", SIZE_ASM_OP); \ - assemble_name (STREAM, NAME); \ - fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ - } \ - } \ - } \ - while (0) - - /* Output the size directive for a decl in rest_of_decl_compilation - in the case where we did not do so before the initializer. - Once we find the error_mark_node, we know that the value of - size_directive_output was set - by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ - - #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ - do { \ - const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ - if (TARGET_ELF \ - && !flag_inhibit_size_directive && DECL_SIZE (DECL) \ - && ! AT_END && TOP_LEVEL \ - && DECL_INITIAL (DECL) == error_mark_node \ - && !size_directive_output) \ - { \ - fprintf (FILE, "%s", SIZE_ASM_OP); \ - assemble_name (FILE, name); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ - } \ - } while (0) - - /* This is how to declare a function name. */ - - #undef ASM_DECLARE_FUNCTION_NAME - #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \ - do \ - { \ - ASM_OUTPUT_LABEL(STREAM,NAME); \ - HALF_PIC_DECLARE (NAME); \ - if (TARGET_ELF) \ - { \ - fprintf (STREAM, "%s", TYPE_ASM_OP); \ - assemble_name (STREAM, NAME); \ - putc (',', STREAM); \ - fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \ - putc ('\n', STREAM); \ - ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \ - } \ - } \ - while (0) - - /* Write the extra assembler code needed to declare a function's result. - Most svr4 assemblers don't require any special declaration of the - result value, but there are exceptions. */ - - #ifndef ASM_DECLARE_RESULT - #define ASM_DECLARE_RESULT(FILE, RESULT) - #endif - - /* This is how to declare the size of a function. */ - - #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ - do \ - { \ - if (TARGET_ELF && !flag_inhibit_size_directive) \ - { \ - char label[256]; \ - static int labelno; \ - labelno++; \ - ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ - fprintf (FILE, "%s", SIZE_ASM_OP); \ - assemble_name (FILE, (FNAME)); \ - fprintf (FILE, ","); \ - assemble_name (FILE, label); \ - fprintf (FILE, "-"); \ - assemble_name (FILE, (FNAME)); \ - putc ('\n', FILE); \ - } \ - } \ - while (0) - - #define IDENT_ASM_OP "\t.ident\t" - - /* Allow #sccs in preprocessor. */ - - #define SCCS_DIRECTIVE - - /* This says what to print at the end of the assembly file */ - #undef ASM_FILE_END - #define ASM_FILE_END(STREAM) \ - do \ - { \ - if (HALF_PIC_P ()) \ - HALF_PIC_FINISH (STREAM); \ - ix86_asm_file_end (STREAM); \ - } \ - while (0) - - /* Tell collect that the object format is OSF/rose. */ - #define OBJECT_FORMAT_ROSE - - /* Tell collect where the appropriate binaries are. */ - #define REAL_NM_FILE_NAME "/usr/ccs/gcc/bfd-nm" - #define REAL_STRIP_FILE_NAME "/usr/ccs/bin/strip" - - /* Define this macro meaning that gcc should find the library 'libgcc.a' - by hand, rather than passing the argument '-lgcc' to tell the linker - to do the search */ - #define LINK_LIBGCC_SPECIAL - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - - /* Don't default to pcc-struct-return, because gcc is the only compiler, and - we want to retain compatibility with older gcc versions. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 - - /* Map i386 registers to the numbers dwarf expects. Of course this is - different from what stabs expects. */ - - #undef DBX_REGISTER_NUMBER - #define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \ - ? svr4_dbx_register_map[n] \ - : dbx_register_map[n]) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/pentium.md gcc-3.3/gcc/config/i386/pentium.md *** gcc-3.2.3/gcc/config/i386/pentium.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/pentium.md 2002-11-16 01:09:19.000000000 +0000 *************** *** 0 **** --- 1,312 ---- + ;; Pentium Scheduling + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. */ + ;; + ;; The Pentium is an in-order core with two integer pipelines. + + ;; True for insns that behave like prefixed insns on the Pentium. + (define_attr "pent_prefix" "false,true" + (if_then_else (ior (eq_attr "prefix_0f" "1") + (ior (eq_attr "prefix_data16" "1") + (eq_attr "prefix_rep" "1"))) + (const_string "true") + (const_string "false"))) + + ;; Categorize how an instruction slots. + + ;; The non-MMX Pentium slots an instruction with prefixes on U pipe only, + ;; while MMX Pentium can slot it on either U or V. Model non-MMX Pentium + ;; rules, because it results in noticeably better code on non-MMX Pentium + ;; and doesn't hurt much on MMX. (Prefixed instructions are not very + ;; common, so the scheduler usualy has a non-prefixed insn to pair). + + (define_attr "pent_pair" "uv,pu,pv,np" + (cond [(eq_attr "imm_disp" "true") + (const_string "np") + (ior (eq_attr "type" "alu1,alu,imov,icmp,test,lea,incdec") + (and (eq_attr "type" "pop,push") + (eq_attr "memory" "!both"))) + (if_then_else (eq_attr "pent_prefix" "true") + (const_string "pu") + (const_string "uv")) + (eq_attr "type" "ibr") + (const_string "pv") + (and (eq_attr "type" "ishift") + (match_operand 2 "const_int_operand" "")) + (const_string "pu") + (and (eq_attr "type" "rotate") + (match_operand 2 "const_int_1_operand" "")) + (const_string "pu") + (and (eq_attr "type" "ishift1") + (match_operand 1 "const_int_operand" "")) + (const_string "pu") + (and (eq_attr "type" "rotate1") + (match_operand 1 "const_int_1_operand" "")) + (const_string "pu") + (and (eq_attr "type" "call") + (match_operand 0 "constant_call_address_operand" "")) + (const_string "pv") + (and (eq_attr "type" "callv") + (match_operand 1 "constant_call_address_operand" "")) + (const_string "pv") + ] + (const_string "np"))) + + (define_automaton "pentium,pentium_fpu") + + ;; Pentium do have U and V pipes. Instruction to both pipes + ;; are alwyas issued together, much like on VLIW. + ;; + ;; predecode + ;; / \ + ;; decodeu decodev + ;; / | | + ;; fpu executeu executev + ;; | | | + ;; fpu retire retire + ;; | + ;; fpu + ;; We add dummy "port" pipes allocated only first cycle of + ;; instruction to specify this behavior. + + (define_cpu_unit "pentium-portu,pentium-portv" "pentium") + (define_cpu_unit "pentium-u,pentium-v" "pentium") + (absence_set "pentium-portu" "pentium-u,pentium-v") + (presence_set "pentium-portv" "pentium-portu") + + ;; Floating point instructions can overlap with new issue of integer + ;; instructions. We model only first cycle of FP pipeline, as it is + ;; fully pipelined. + (define_cpu_unit "pentium-fp" "pentium_fpu") + + ;; There is non-pipelined multiplier unit used for complex operations. + (define_cpu_unit "pentium-fmul" "pentium_fpu") + + ;; Pentium preserves memory ordering, so when load-execute-store + ;; instruction is executed together with other instruction loading + ;; data, the execution of the other instruction is delayed to very + ;; last cycle of first instruction, when data are bypassed. + ;; We model this by allocating "memory" unit when store is pending + ;; and using conflicting load units together. + + (define_cpu_unit "pentium-memory" "pentium") + (define_cpu_unit "pentium-load0" "pentium") + (define_cpu_unit "pentium-load1" "pentium") + (absence_set "pentium-load0,pentium-load1" "pentium-memory") + + (define_reservation "pentium-load" "(pentium-load0 | pentium-load1)") + (define_reservation "pentium-np" "(pentium-u + pentium-v)") + (define_reservation "pentium-uv" "(pentium-u | pentium-v)") + (define_reservation "pentium-portuv" "(pentium-portu | pentium-portv)") + (define_reservation "pentium-firstu" "(pentium-u + pentium-portu)") + (define_reservation "pentium-firstv" "(pentium-v + pentium-portuv)") + (define_reservation "pentium-firstuv" "(pentium-uv + pentium-portuv)") + (define_reservation "pentium-firstuload" "(pentium-load + pentium-firstu)") + (define_reservation "pentium-firstvload" "(pentium-load + pentium-firstv)") + (define_reservation "pentium-firstuvload" "(pentium-load + pentium-firstuv) + | (pentium-firstv,pentium-v, + (pentium-load+pentium-firstv))") + (define_reservation "pentium-firstuboth" "(pentium-load + pentium-firstu + + pentium-memory)") + (define_reservation "pentium-firstvboth" "(pentium-load + pentium-firstv + + pentium-memory)") + (define_reservation "pentium-firstuvboth" "(pentium-load + pentium-firstuv + + pentium-memory) + | (pentium-firstv,pentium-v, + (pentium-load+pentium-firstv))") + + ;; Few common long latency instructions + (define_insn_reservation "pent_mul" 11 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "imul")) + "pentium-np*11") + + (define_insn_reservation "pent_str" 12 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "str")) + "pentium-np*12") + + ;; Integer division and some other long latency instruction block all + ;; units, including the FP pipe. There is no value in modeling the + ;; latency of these instructions and not modeling the latency + ;; decreases the size of the DFA. + (define_insn_reservation "pent_block" 1 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "idiv")) + "pentium-np+pentium-fp") + + (define_insn_reservation "pent_cld" 2 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "cld")) + "pentium-np*2") + + ;; Moves usually have one cycle penalty, but there are exceptions. + (define_insn_reservation "pent_fmov" 1 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "type" "fmov") + (eq_attr "memory" "none,load"))) + "(pentium-fp+pentium-np)") + + (define_insn_reservation "pent_fpmovxf" 3 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "type" "fmov") + (and (eq_attr "memory" "load,store") + (eq_attr "mode" "XF")))) + "(pentium-fp+pentium-np)*3") + + (define_insn_reservation "pent_fpstore" 2 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "type" "fmov") + (ior (match_operand 1 "immediate_operand" "") + (eq_attr "memory" "store")))) + "(pentium-fp+pentium-np)*2") + + (define_insn_reservation "pent_imov" 1 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "imov")) + "pentium-firstuv") + + ;; Push and pop instructions have 1 cycle latency and special + ;; hardware bypass allows them to be paired with other push,pop + ;; and call instructions. + (define_bypass 0 "pent_push,pent_pop" "pent_push,pent_pop,pent_call") + (define_insn_reservation "pent_push" 1 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "type" "push") + (eq_attr "memory" "store"))) + "pentium-firstuv") + + (define_insn_reservation "pent_pop" 1 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "pop")) + "pentium-firstuv") + + ;; Call and branch instruction can execute in either pipe, but + ;; they are only pairable when in the v pipe. + (define_insn_reservation "pent_call" 10 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "call,callv")) + "pentium-firstv,pentium-v*9") + + (define_insn_reservation "pent_branch" 1 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "ibr")) + "pentium-firstv") + + ;; Floating point instruction dispatch in U pipe, but continue + ;; in FP pipeline allowing other isntructions to be executed. + (define_insn_reservation "pent_fp" 3 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "fop,fistp")) + "(pentium-firstu+pentium-fp),nothing,nothing") + + ;; First two cycles of fmul are not pipelined. + (define_insn_reservation "pent_fmul" 3 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "fmul")) + "(pentium-firstuv+pentium-fp+pentium-fmul),pentium-fmul,nothing") + + ;; Long latency FP instructions overlap with integer instructions, + ;; but only last 2 cycles with FP ones. + (define_insn_reservation "pent_fdiv" 39 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "fdiv")) + "(pentium-np+pentium-fp+pentium-fmul), + (pentium-fp+pentium-fmul)*36,pentium-fmul*2") + + (define_insn_reservation "pent_fpspc" 70 + (and (eq_attr "cpu" "pentium") + (eq_attr "type" "fpspc")) + "(pentium-np+pentium-fp+pentium-fmul), + (pentium-fp+pentium-fmul)*67,pentium-fmul*2") + + ;; Integer instructions. Load/execute/store takes 3 cycles, + ;; load/execute 2 cycles and execute only one cycle. + (define_insn_reservation "pent_uv_both" 3 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "uv") + (eq_attr "memory" "both"))) + "pentium-firstuvboth,pentium-uv+pentium-memory,pentium-uv") + + (define_insn_reservation "pent_u_both" 3 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "pu") + (eq_attr "memory" "both"))) + "pentium-firstuboth,pentium-u+pentium-memory,pentium-u") + + (define_insn_reservation "pent_v_both" 3 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "pv") + (eq_attr "memory" "both"))) + "pentium-firstvboth,pentium-v+pentium-memory,pentium-v") + + (define_insn_reservation "pent_np_both" 3 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "np") + (eq_attr "memory" "both"))) + "pentium-np,pentium-np,pentium-np") + + (define_insn_reservation "pent_uv_load" 2 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "uv") + (eq_attr "memory" "load"))) + "pentium-firstuvload,pentium-uv") + + (define_insn_reservation "pent_u_load" 2 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "pu") + (eq_attr "memory" "load"))) + "pentium-firstuload,pentium-u") + + (define_insn_reservation "pent_v_load" 2 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "pv") + (eq_attr "memory" "load"))) + "pentium-firstvload,pentium-v") + + (define_insn_reservation "pent_np_load" 2 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "np") + (eq_attr "memory" "load"))) + "pentium-np,pentium-np") + + (define_insn_reservation "pent_uv" 1 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "uv") + (eq_attr "memory" "none"))) + "pentium-firstuv") + + (define_insn_reservation "pent_u" 1 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "pu") + (eq_attr "memory" "none"))) + "pentium-firstu") + + (define_insn_reservation "pent_v" 1 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "pv") + (eq_attr "memory" "none"))) + "pentium-firstv") + + (define_insn_reservation "pent_np" 1 + (and (eq_attr "cpu" "pentium") + (and (eq_attr "pent_pair" "np") + (eq_attr "memory" "none"))) + "pentium-np") + diff -Nrc3pad gcc-3.2.3/gcc/config/i386/ppro.md gcc-3.3/gcc/config/i386/ppro.md *** gcc-3.2.3/gcc/config/i386/ppro.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/ppro.md 2002-11-16 01:09:19.000000000 +0000 *************** *** 0 **** --- 1,150 ---- + ;; Pentium Pro/PII Scheduling + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. */ + + ;; Categorize how many uops an ia32 instruction evaluates to: + ;; one -- an instruction with 1 uop can be decoded by any of the + ;; three decoders. + ;; few -- an instruction with 1 to 4 uops can be decoded only by + ;; decoder 0. + ;; many -- a complex instruction may take an unspecified number of + ;; cycles to decode in decoder 0. + + (define_attr "ppro_uops" "one,few,many" + (cond [(eq_attr "type" "other,multi,call,callv,fpspc,str") + (const_string "many") + (eq_attr "type" "icmov,fcmov,str,cld") + (const_string "few") + (eq_attr "type" "imov") + (if_then_else (eq_attr "memory" "store,both") + (const_string "few") + (const_string "one")) + (eq_attr "memory" "!none") + (const_string "few") + ] + (const_string "one"))) + + ;; + ;; The PPro has an out-of-order core, but the instruction decoders are + ;; naturally in-order and asymmetric. We get best performance by scheduling + ;; for the decoders, for in doing so we give the oo execution unit the + ;; most choices. + ;; + ;; Rough readiness numbers. Fine tuning happens in i386.c. + ;; + ;; p0 describes port 0. + ;; p01 describes ports 0 and 1 as a pair; alu insns can issue to either. + ;; p2 describes port 2 for loads. + ;; p34 describes ports 3 and 4 for stores. + ;; fpu describes the fpu accessed via port 0. + ;; ??? It is less than clear if there are separate fadd and fmul units + ;; that could operate in parallel. + ;; + ;; ??? fxch isn't handled; not an issue until sched3 after reg-stack is real. + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "ishift,rotate,ishift1,rotate1,lea,ibr,cld")) + 1 1) + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "imul")) + 4 1) + + ;; ??? Does the divider lock out the pipe while it works, + ;; or is there a disconnected unit? + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "idiv")) + 17 17) + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fop,fsgn,fistp")) + 3 1) + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fcmov")) + 2 1) + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fcmp")) + 1 1) + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fmov")) + 1 1) + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fmul")) + 5 1) + + (define_function_unit "ppro_p0" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fdiv,fpspc")) + 56 1) + + (define_function_unit "ppro_p01" 2 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "!imov,fmov")) + 1 1) + + (define_function_unit "ppro_p01" 2 0 + (and (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "imov,fmov")) + (eq_attr "memory" "none")) + 1 1) + + (define_function_unit "ppro_p2" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (ior (eq_attr "type" "pop") + (eq_attr "memory" "load,both"))) + 3 1) + + (define_function_unit "ppro_p34" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (ior (eq_attr "type" "push") + (eq_attr "memory" "store,both"))) + 1 1) + + (define_function_unit "fpu" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fop,fsgn,fmov,fcmp,fcmov,fistp")) + 1 1) + + (define_function_unit "fpu" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fmul")) + 5 2) + + (define_function_unit "fpu" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "fdiv,fpspc")) + 56 56) + + ;; imul uses the fpu. ??? does it have the same throughput as fmul? + (define_function_unit "fpu" 1 0 + (and (eq_attr "cpu" "pentiumpro") + (eq_attr "type" "imul")) + 4 1) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/ptx4-i.h gcc-3.3/gcc/config/i386/ptx4-i.h *** gcc-3.2.3/gcc/config/i386/ptx4-i.h 2001-12-20 17:36:35.000000000 +0000 --- gcc-3.3/gcc/config/i386/ptx4-i.h 2002-06-29 09:10:04.000000000 +0000 *************** *** 1,5 **** /* Target definitions for GNU compiler for Intel 80386 running Dynix/ptx v4 ! Copyright (C) 1996 Free Software Foundation, Inc. Modified from sysv4.h Originally written by Ron Guilmette (rfg@netcom.com). --- 1,5 ---- /* Target definitions for GNU compiler for Intel 80386 running Dynix/ptx v4 ! Copyright (C) 1996, 2002 Free Software Foundation, Inc. Modified from sysv4.h Originally written by Ron Guilmette (rfg@netcom.com). *************** the Free Software Foundation, 59 Temple *** 23,29 **** Boston, MA 02111-1307, USA. */ - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 Sequent Dynix/ptx Version 4)"); /* The svr4 ABI for the i386 says that records and unions are returned --- 23,28 ---- *************** Boston, MA 02111-1307, USA. */ *** 34,44 **** (TYPE_MODE (TYPE) == BLKmode \ || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) ! /* Define which macros to predefine. _SEQUENT_ is our extension. */ ! /* This used to define X86, but james@bigtex.cactus.org says that ! is supposed to be defined optionally by user programs--not by default. */ ! #define CPP_PREDEFINES \ ! "-Dunix -D_SEQUENT_ -Asystem=unix -Asystem=ptx4" #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] --- 33,47 ---- (TYPE_MODE (TYPE) == BLKmode \ || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_define ("_SEQUENT_"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=ptx4"); \ ! } \ ! while (0) #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] diff -Nrc3pad gcc-3.2.3/gcc/config/i386/rtemself.h gcc-3.3/gcc/config/i386/rtemself.h *** gcc-3.2.3/gcc/config/i386/rtemself.h 2002-04-12 13:09:28.000000000 +0000 --- gcc-3.3/gcc/config/i386/rtemself.h 2002-09-28 15:29:40.000000000 +0000 *************** *** 1,4 **** ! /* Definitions for rtems targeting a ix86 using ELF. Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). --- 1,4 ---- ! /* Definitions for rtems targeting an ix86 using ELF. Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). *************** Boston, MA 02111-1307, USA. */ *** 21,31 **** /* Specify predefined symbols in preprocessor. */ ! #include ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems \ ! -D__ELF__ -D__i386__ -D__USE_INIT_FINI__" ! ! #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %{msoft-float:-D_SOFT_FLOAT}" --- 21,34 ---- /* Specify predefined symbols in preprocessor. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__rtems__"); \ ! builtin_define ("__ELF__"); \ ! builtin_define ("__USE_INIT_FINI__"); \ ! builtin_assert ("system=rtems"); \ ! if (!TARGET_80387) \ ! builtin_define ("_SOFT_FLOAT"); \ ! } \ ! while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/rtems.h gcc-3.3/gcc/config/i386/rtems.h *** gcc-3.2.3/gcc/config/i386/rtems.h 2002-04-12 13:09:28.000000000 +0000 --- gcc-3.3/gcc/config/i386/rtems.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,25 **** - /* Definitions for rtems targeting an Intel i386 using coff. - Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. - Contributed by Joel Sherrill (joel@OARcorp.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Specify predefined symbols in preprocessor. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sco5.h gcc-3.3/gcc/config/i386/sco5.h *** gcc-3.2.3/gcc/config/i386/sco5.h 2002-04-24 17:18:04.000000000 +0000 --- gcc-3.3/gcc/config/i386/sco5.h 2002-11-26 04:54:48.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel 386 running SCO Unix System V 3.2 Version 5. ! Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Kean Johnston (hug@netcom.com) --- 1,5 ---- /* Definitions for Intel 386 running SCO Unix System V 3.2 Version 5. ! Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Kean Johnston (hug@netcom.com) *************** along with GNU CC; see the file COPYING. *** 20,26 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386, SCO OpenServer 5 Syntax)"); #undef LPREFIX --- 20,25 ---- *************** Boston, MA 02111-1307, USA. */ *** 78,94 **** #define DWARF2_UNWIND_INFO \ ((TARGET_ELF) ? 1 : 0 ) ! #undef CONST_SECTION_ASM_OP ! #define CONST_SECTION_ASM_OP_COFF "\t.section\t.rodata, \"x\"" ! #define CONST_SECTION_ASM_OP_ELF "\t.section\t.rodata" ! #define CONST_SECTION_ASM_OP \ ! ((TARGET_ELF) ? CONST_SECTION_ASM_OP_ELF : CONST_SECTION_ASM_OP_COFF) ! ! #undef USE_CONST_SECTION ! #define USE_CONST_SECTION_ELF 1 ! #define USE_CONST_SECTION_COFF 0 ! #define USE_CONST_SECTION \ ! ((TARGET_ELF) ? USE_CONST_SECTION_ELF : USE_CONST_SECTION_COFF) #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP_ELF "\t.section\t.init" --- 77,89 ---- #define DWARF2_UNWIND_INFO \ ((TARGET_ELF) ? 1 : 0 ) ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP_COFF "\t.section\t.rodata, \"x\"" ! #define READONLY_DATA_SECTION_ASM_OP_ELF "\t.section\t.rodata" ! #define READONLY_DATA_SECTION_ASM_OP \ ! ((TARGET_ELF) \ ! ? READONLY_DATA_SECTION_ASM_OP_ELF \ ! : READONLY_DATA_SECTION_ASM_OP_COFF) #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP_ELF "\t.section\t.init" *************** do { \ *** 144,156 **** #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ if (TARGET_ELF) { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ } else \ SCO_DEFAULT_ASM_COFF(FILE, NAME); \ } while (0) --- 139,147 ---- #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ if (TARGET_ELF) { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ } else \ SCO_DEFAULT_ASM_COFF(FILE, NAME); \ } while (0) *************** do { \ *** 158,191 **** #undef ASM_DECLARE_FUNCTION_SIZE #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ ! if (TARGET_ELF) { if (!flag_inhibit_size_directive) \ ! { \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ",.-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } } \ } while (0) #undef ASM_DECLARE_OBJECT_NAME #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ if (TARGET_ELF) { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ } else \ SCO_DEFAULT_ASM_COFF(FILE, NAME); \ } while (0) --- 149,176 ---- #undef ASM_DECLARE_FUNCTION_SIZE #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ ! if (TARGET_ELF && !flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } while (0) #undef ASM_DECLARE_OBJECT_NAME #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ if (TARGET_ELF) { \ ! HOST_WIDE_INT size; \ ! \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! \ size_directive_output = 0; \ ! if (!flag_inhibit_size_directive \ ! && (DECL) && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ ! } \ ! \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ } else \ SCO_DEFAULT_ASM_COFF(FILE, NAME); \ } while (0) *************** do { \ *** 203,219 **** #undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ ! if (TARGET_ELF) { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ } \ } \ } while (0) --- 188,204 ---- #undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ ! if (TARGET_ELF) { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } \ } while (0) *************** do { \ *** 353,371 **** fprintf ((FILE), "\n"); \ } while (0) - /* Must use data section for relocatable constants when pic. */ - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \ - { \ - if (TARGET_ELF) { \ - if (flag_pic && symbolic_operand (RTX, VOIDmode)) \ - data_section (); \ - else \ - const_section (); \ - } else \ - readonly_data_section(); \ - } - #undef ASM_OUTPUT_CASE_LABEL #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE) \ do { \ --- 338,343 ---- *************** do { \ *** 378,390 **** #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME); - #undef ASM_GLOBALIZE_LABEL - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - (fprintf ((FILE), "%s", GLOBAL_ASM_OP), assemble_name (FILE, NAME), fputs ("\n", FILE)) - #undef ASM_OUTPUT_EXTERNAL_LIBCALL #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! if (TARGET_ELF) ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0)) #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ --- 350,358 ---- #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME); #undef ASM_OUTPUT_EXTERNAL_LIBCALL #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! if (TARGET_ELF) (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)) #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ *************** do { \ *** 445,486 **** #define DBX_REGISTER_NUMBER(n) \ ((TARGET_ELF) ? svr4_dbx_register_map[n] : dbx_register_map[n]) - #undef DWARF2_DEBUGGING_INFO - #undef DWARF_DEBUGGING_INFO - #undef SDB_DEBUGGING_INFO - #undef DBX_DEBUGGING_INFO - #undef PREFERRED_DEBUGGING_TYPE - #define DWARF2_DEBUGGING_INFO 1 #define DWARF_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 ! #define DBX_DEBUGGING_INFO 1 #define PREFERRED_DEBUGGING_TYPE \ ((TARGET_ELF) ? DWARF2_DEBUG: SDB_DEBUG) #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION - #undef CONST_SECTION_FUNCTION - #define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - if (!USE_CONST_SECTION) \ - text_section(); \ - else if (in_section != in_const) \ - { \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ - in_section = in_const; \ - } \ - } - #undef FINI_SECTION_FUNCTION #define FINI_SECTION_FUNCTION \ void \ --- 413,435 ---- #define DBX_REGISTER_NUMBER(n) \ ((TARGET_ELF) ? svr4_dbx_register_map[n] : dbx_register_map[n]) #define DWARF2_DEBUGGING_INFO 1 #define DWARF_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 ! #define DBX_DEBUGGING_INFO 1 ! ! #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE \ ((TARGET_ELF) ? DWARF2_DEBUG: SDB_DEBUG) #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION #undef FINI_SECTION_FUNCTION #define FINI_SECTION_FUNCTION \ void \ *************** init_section () \ *** 541,568 **** == void_type_node))) ? (SIZE) \ : 0)) ! #undef SELECT_SECTION ! #define SELECT_SECTION(DECL,RELOC,ALIGN) \ ! { \ ! if (TARGET_ELF && flag_pic && RELOC) \ ! data_section (); \ ! else if (TREE_CODE (DECL) == STRING_CST) \ ! { \ ! if (! flag_writable_strings) \ ! const_section (); \ ! else \ ! data_section (); \ ! } \ ! else if (TREE_CODE (DECL) == VAR_DECL) \ ! { \ ! if (! DECL_READONLY_SECTION (DECL, RELOC)) \ ! data_section (); \ ! else \ ! const_section (); \ ! } \ ! else \ ! const_section (); \ ! } #undef SWITCH_TAKES_ARG #define SWITCH_TAKES_ARG(CHAR) \ --- 490,498 ---- == void_type_node))) ? (SIZE) \ : 0)) ! /* ??? Ignore coff. */ ! #undef TARGET_ASM_SELECT_SECTION ! #define TARGET_ASM_SELECT_SECTION default_elf_select_section #undef SWITCH_TAKES_ARG #define SWITCH_TAKES_ARG(CHAR) \ *************** init_section () \ *** 581,587 **** #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) - #undef HANDLE_SYSV_PRAGMA #define HANDLE_SYSV_PRAGMA 1 /* Though OpenServer supports .weak in COFF, we don't use it. --- 511,516 ---- *************** init_section () \ *** 593,601 **** do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ fputc ('\n', FILE); } while (0) - #undef SCCS_DIRECTIVE - #define SCCS_DIRECTIVE 1 - /* * Define sizes and types */ --- 522,527 ---- *************** init_section () \ *** 673,685 **** %{pg:gcrt.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}} \ %{ansi:values-Xc.o%s} \ %{!ansi: \ ! %{traditional:values-Xt.o%s} \ ! %{!traditional: \ ! %{Xa:values-Xa.o%s} \ ! %{!Xa:%{Xc:values-Xc.o%s} \ ! %{!Xc:%{Xk:values-Xk.o%s} \ ! %{!Xk:%{Xt:values-Xt.o%s} \ ! %{!Xt:values-Xa.o%s}}}}}} \ %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}" #undef ENDFILE_SPEC --- 599,609 ---- %{pg:gcrt.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}} \ %{ansi:values-Xc.o%s} \ %{!ansi: \ ! %{Xa:values-Xa.o%s} \ ! %{!Xa:%{Xc:values-Xc.o%s} \ ! %{!Xc:%{Xk:values-Xk.o%s} \ ! %{!Xk:%{Xt:values-Xt.o%s} \ ! %{!Xt:values-Xa.o%s}}}}} \ %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}" #undef ENDFILE_SPEC *************** init_section () \ *** 688,707 **** %{mcoff:crtendS.o%s} \ %{pg:gcrtn.o%s}%{!pg:crtn.o%s}" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-Asystem=svr3" ! ! /* You are in a maze of GCC specs ... all alike */ #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) \ %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \ %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \ - -D__i386 -D__unix -D_SCO_DS=1 -D_M_I386 -D_M_XENIX -D_M_UNIX \ %{!Xods30:-D_STRICT_NAMES} \ %{!ansi:%{!posix:%{!Xods30:-D_SCO_XPG_VERS=4}}} \ ! %{ansi:-isystem include/ansi%s -isystem /usr/include/ansi -D_STRICT_ANSI} \ %{!ansi: \ %{posix:-isystem include/posix%s -isystem /usr/include/posix \ -D_POSIX_C_SOURCE=2 -D_POSIX_SOURCE=1} \ --- 612,643 ---- %{mcoff:crtendS.o%s} \ %{pg:gcrtn.o%s}%{!pg:crtn.o%s}" ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__unix"); \ ! builtin_define ("_SCO_DS"); \ ! builtin_define ("_M_I386"); \ ! builtin_define ("_M_XENIX"); \ ! builtin_define ("_M_UNIX"); \ ! builtin_assert ("system=svr3"); \ ! if (flag_iso) \ ! cpp_define (pfile, "_STRICT_ANSI"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! } \ ! } \ ! while (0) #undef CPP_SPEC ! #define CPP_SPEC "\ %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \ %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \ %{!Xods30:-D_STRICT_NAMES} \ %{!ansi:%{!posix:%{!Xods30:-D_SCO_XPG_VERS=4}}} \ ! %{ansi:-isystem include/ansi%s -isystem /usr/include/ansi} \ %{!ansi: \ %{posix:-isystem include/posix%s -isystem /usr/include/posix \ -D_POSIX_C_SOURCE=2 -D_POSIX_SOURCE=1} \ *************** init_section () \ *** 716,732 **** -DM_BITFIELDS -DM_SYS5 -DM_SYSV -DM_INTERNAT -DM_SYSIII \ -DM_WORDSWAP}}}} \ %{scointl:-DM_INTERNAT -D_M_INTERNAT} \ - %{traditional:-D_KR -D_SVID -D_NO_PROTOTYPE} \ %{!mcoff:-D_SCO_ELF} \ %{mcoff:-D_M_COFF -D_SCO_COFF} \ - %{!mcoff:%{fpic:-D__PIC__ -D__pic__} \ - %{fPIC:%{!fpic:-D__PIC__ -D__pic__}}} \ %{Xa:-D_SCO_C_DIALECT=1} \ %{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \ %{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \ %{!Xk:%{Xt:-D_SCO_C_DIALECT=2} \ ! %{!Xt:-D_SCO_C_DIALECT=1}}}} \ ! %{traditional:-traditional -D_KR -D_NO_PROTOTYPE}" #undef LINK_SPEC #define LINK_SPEC \ --- 652,664 ---- -DM_BITFIELDS -DM_SYS5 -DM_SYSV -DM_INTERNAT -DM_SYSIII \ -DM_WORDSWAP}}}} \ %{scointl:-DM_INTERNAT -D_M_INTERNAT} \ %{!mcoff:-D_SCO_ELF} \ %{mcoff:-D_M_COFF -D_SCO_COFF} \ %{Xa:-D_SCO_C_DIALECT=1} \ %{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \ %{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \ %{!Xk:%{Xt:-D_SCO_C_DIALECT=2} \ ! %{!Xt:-D_SCO_C_DIALECT=1}}}}" #undef LINK_SPEC #define LINK_SPEC \ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/seq2-sysv3.h gcc-3.3/gcc/config/i386/seq2-sysv3.h *** gcc-3.2.3/gcc/config/i386/seq2-sysv3.h 1999-09-15 21:41:14.000000000 +0000 --- gcc-3.3/gcc/config/i386/seq2-sysv3.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - /* Sequent DYNIX/ptx 2.x (SVr3) */ - - #include "i386/seq-sysv3.h" - - /* Use atexit for static destructors, instead of defining - our own exit function. */ - #undef NEED_ATEXIT --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/seq-gas.h gcc-3.3/gcc/config/i386/seq-gas.h *** gcc-3.2.3/gcc/config/i386/seq-gas.h 2001-10-31 14:32:30.000000000 +0000 --- gcc-3.3/gcc/config/i386/seq-gas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - /* Definitions for Sequent Intel 386 using GAS. - Copyright (C) 1992 Free Software Foundation, Inc. - - /* Mostly it's like a Sequent 386 without GAS. */ - - #include "i386/sequent.h" - - /* A C statement or statements which output an assembler instruction - opcode to the stdio stream STREAM. The macro-operand PTR is a - variable of type `char *' which points to the opcode name in its - "internal" form--the form that is written in the machine description. - - GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic. - So use `repe' instead. */ - - #undef ASM_OUTPUT_OPCODE - #define ASM_OUTPUT_OPCODE(STREAM, PTR) \ - { \ - if ((PTR)[0] == 'r' \ - && (PTR)[1] == 'e' \ - && (PTR)[2] == 'p') \ - { \ - if ((PTR)[3] == 'z') \ - { \ - fprintf (STREAM, "repe"); \ - (PTR) += 4; \ - } \ - else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \ - { \ - fprintf (STREAM, "repne"); \ - (PTR) += 5; \ - } \ - } \ - } - - /* Define macro used to output shift-double opcodes when the shift - count is in %cl. Some assemblers require %cl as an argument; - some don't. - - GAS requires the %cl argument, so override i386/unix.h. */ - - #undef SHIFT_DOUBLE_OMITS_COUNT - #define SHIFT_DOUBLE_OMITS_COUNT 0 - - /* Print opcodes the way that GAS expects them. */ - #define GAS_MNEMONICS 1 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/seq-sysv3.h gcc-3.3/gcc/config/i386/seq-sysv3.h *** gcc-3.2.3/gcc/config/i386/seq-sysv3.h 2001-10-31 14:32:30.000000000 +0000 --- gcc-3.3/gcc/config/i386/seq-sysv3.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,45 **** - /* Sequent DYNIX/ptx 1.x (SVr3) */ - - #include "i386/sysv3.h" - - /* Sequent Symmetry SVr3 doesn't have crtn.o; crt1.o doesn't work - but crt0.o does. */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}\ - %{!pg:%{posix:%{p:mcrtp0.o%s}%{!p:crtp0.o%s}}\ - %{!posix:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} crtbegin.o%s\ - %{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}" - - #undef LIB_SPEC - #define LIB_SPEC \ - "%{posix:-lcposix}\ - %{shlib:-lc_s}\ - %{fshared-data:-lpps -lseq} -lc crtend.o%s" - - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} -D_SEQUENT_=1" - - /* Although the .init section is used, it is not automatically invoked. - This because the _start() function in /lib/crt0.o never calls anything - from the .init section */ - #define INVOKE__main - - /* Assembler pseudo-op for initialized shared variables (.shdata). */ - #undef SHARED_SECTION_ASM_OP - #define SHARED_SECTION_ASM_OP "\t.section .shdata, \"ws\"" - - /* Assembler pseudo-op for uninitialized shared global variables (.shbss). */ - #undef ASM_OUTPUT_SHARED_COMMON - #define ASM_OUTPUT_SHARED_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs(".comm ", (FILE)), \ - assemble_name((FILE), (NAME)), \ - fprintf((FILE), ",%u,-3\n", (SIZE))) - - /* Assembler pseudo-op for uninitialized shared local variables (.shbss). */ - #undef SHARED_BSS_SECTION_ASM_OP - #define SHARED_BSS_SECTION_ASM_OP "\t.section .shbss, \"bs\"" - - /* seq2-sysv3.h used to define HAVE_ATEXIT, so I assume ptx1 needs this... */ - #define NEED_ATEXIT --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sequent.h gcc-3.3/gcc/config/i386/sequent.h *** gcc-3.2.3/gcc/config/i386/sequent.h 2001-11-11 05:56:41.000000000 +0000 --- gcc-3.3/gcc/config/i386/sequent.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,147 **** - /* Definitions for Sequent Intel 386. - Copyright (C) 1988, 1994, 1999, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "i386/i386.h" - - /* Use the BSD assembler syntax. */ - - #include "i386/bsd.h" - - /* By default, don't use IEEE compatible arithmetic comparisons - because the assembler can't handle the fucom insn. - Return float values in the 387. */ - - #undef TARGET_SUBTARGET_DEFAULT - #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) - - /* Specify predefined symbols in preprocessor. */ - - #define CPP_PREDEFINES "-Dunix -Dsequent -Asystem=unix" - - /* Pass -Z and -ZO options to the linker. */ - - #define LINK_SPEC "%{Z*}" - - #if 0 /* Dynix 3.1 is said to accept -L. */ - /* Dynix V3.0.12 doesn't accept -L at all. */ - - #define LINK_LIBGCC_SPECIAL - #endif - - /* Link with libg.a when debugging, for dbx's sake. */ - - #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} " - - /* We don't want to output SDB debugging information. */ - - #undef SDB_DEBUGGING_INFO - - /* We want to output DBX debugging information. */ - - #define DBX_DEBUGGING_INFO - - /* Sequent Symmetry has size_t defined as int in /usr/include/sys/types.h */ - #define SIZE_TYPE "int" - - /* gcc order is ax, dx, cx, bx, si, di, bp, sp, st, st. - * dbx order is ax, dx, cx, st(0), st(1), bx, si, di, st(2), st(3), - * st(4), st(5), st(6), st(7), sp, bp */ - - #undef DBX_REGISTER_NUMBER - #define DBX_REGISTER_NUMBER(n) \ - ((n) < 3 ? (n) : (n) < 6 ? (n) + 2 \ - : (n) == 6 ? 15 : (n) == 7 ? 14 : 3) - - /* malcolmp@hydra.maths.unsw.EDU.AU says these two definitions - fix trouble in dbx. */ - #undef DBX_OUTPUT_LBRAC - #define DBX_OUTPUT_LBRAC(file,name) \ - fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_LBRAC, depth); \ - assemble_name (asmfile, buf); \ - fprintf (asmfile, "\n"); - - #undef DBX_OUTPUT_RBRAC - #define DBX_OUTPUT_RBRAC(file,name) \ - fprintf (asmfile, "%s%d,0,%d,", ASM_STABN_OP, N_RBRAC, depth); \ - assemble_name (asmfile, buf); \ - fprintf (asmfile, "\n"); - - /* Prevent anything from being allocated in the register pair cx/bx, - since that would confuse GDB. */ - - #undef HARD_REGNO_MODE_OK - #define HARD_REGNO_MODE_OK(REGNO, MODE) \ - (((REGNO) < 2 ? 1 \ - : (REGNO) < 4 ? 1 \ - : FP_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_FLOAT \ - || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \ - : (MODE) != QImode) \ - && ! (REGNO == 2 && GET_MODE_UNIT_SIZE (MODE) > 4)) - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\tmovl $.LP%d,%%eax\n\tcall mcount\n", (LABELNO)); - - /* Assembler pseudo-op for shared data segment. */ - #define SHARED_SECTION_ASM_OP "\t.shdata" - - /* A C statement or statements which output an assembler instruction - opcode to the stdio stream STREAM. The macro-operand PTR is a - variable of type `char *' which points to the opcode name in its - "internal" form--the form that is written in the machine description. - - The Sequent assembler (identified as "Balance 8000 Assembler - 07/17/85 3.90" by "as -v") does not understand the `movs[bwl]' string - move mnemonics - it uses `smov[bwl]' instead. Change "movs" into - "smov", carefully avoiding the sign-extend opcodes. */ - - #define ASM_OUTPUT_OPCODE(STREAM, PTR) \ - { \ - if ((PTR)[0] == 'm' \ - && (PTR)[1] == 'o' \ - && (PTR)[2] == 'v' \ - && (PTR)[3] == 's' \ - && ((PTR)[4] == 'b' || (PTR)[4] == 'w' || (PTR)[4] == 'l') \ - && ((PTR)[5] == ' ' || (PTR)[5] == '\t'|| (PTR)[5] == '\0')) \ - { \ - fprintf (STREAM, "smov"); \ - (PTR) += 4; \ - } \ - } - - /* 10-Aug-92 pes Local labels are prefixed with ".L" */ - #undef LPREFIX - #define LPREFIX ".L" - - #undef ASM_GENERATE_INTERNAL_LABEL - #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)\ - sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) - - #undef ASM_OUTPUT_INTERNAL_LABEL - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) - - /* The native compiler passes the address of the returned structure in eax. */ - #undef STRUCT_VALUE - #undef STRUCT_VALUE_INCOMING - #define STRUCT_VALUE_REGNUM 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sol2gas.h gcc-3.3/gcc/config/i386/sol2gas.h *** gcc-3.2.3/gcc/config/i386/sol2gas.h 1999-09-21 00:55:08.000000000 +0000 --- gcc-3.3/gcc/config/i386/sol2gas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,11 **** - /* Definitions of target machine for GNU compiler, for SPARC running - Solaris 2 with GNU as up to 2.9.5.0.12. - - Copyright (C) 1999 Free Software Foundation, Inc. - */ - - #ifndef GAS_REJECTS_MINUS_S - #define GAS_REJECTS_MINUS_S 1 - #endif - - /* Assume sol2.h will be included afterwards. */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sol2.h gcc-3.3/gcc/config/i386/sol2.h *** gcc-3.2.3/gcc/config/i386/sol2.h 2002-03-22 22:49:41.000000000 +0000 --- gcc-3.3/gcc/config/i386/sol2.h 2002-06-20 11:03:34.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,55 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - - /* We use stabs-in-elf for debugging, because that is what the native - toolchain uses. */ - #undef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - - #if ! GAS_REJECTS_MINUS_S - - /* - Changed from config/svr4.h in the following ways: - - - Removed -Yd (neither the sun bundled assembler nor gas accept it). - - Added "-s" so that stabs are not discarded. - */ - - #undef ASM_SPEC - #define ASM_SPEC \ - "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s" - #define CMOV_SUN_AS_SYNTAX 1 - #else /* GAS_REJECTS_MINUS_S */ - - /* Same as above, except for -s, unsupported by GNU as. */ - #undef ASM_SPEC - #define ASM_SPEC \ - "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*}" - - #endif /* GAS_REJECTS_MINUS_S */ - /* The Solaris 2.0 x86 linker botches alignment of code sections. It tries to align to a 16 byte boundary by padding with 0x00000090 ints, rather than 0x90 bytes (nop). This generates trash in the --- 20,27 ---- *************** Boston, MA 02111-1307, USA. */ *** 68,159 **** (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \ : DW_EH_PE_absptr) - /* Solaris 2/Intel uses a wint_t different from the default, as on SPARC. */ - #undef WINT_TYPE - #define WINT_TYPE "long int" - - #undef WINT_TYPE_SIZE - #define WINT_TYPE_SIZE BITS_PER_WORD - - #define HANDLE_PRAGMA_REDEFINE_EXTNAME 1 - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-Dunix -D__svr4__ -D__SVR4 -Dsun -D__PRAGMA_REDEFINE_EXTNAME -Asystem=svr4" - /* Solaris 2/Intel as chokes on #line directives. */ #undef CPP_SPEC ! #define CPP_SPEC \ ! "%{.S:-P} \ ! %(cpp_cpu) \ ! %{pthreads:-D_REENTRANT -D_PTHREADS} \ ! %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \ ! %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}" ! /* For C++ we need to add some additional macro definitions required ! by the C++ standard library. */ ! #define CPLUSPLUS_CPP_SPEC "\ ! -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \ ! -D__EXTENSIONS__ \ ! %(cpp) \ " ! #undef LIB_SPEC ! #define LIB_SPEC \ ! "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \ ! %{!shared:\ ! %{!symbolic:\ ! %{pthreads:-lpthread} \ ! %{!pthreads:%{threads:-lthread}} \ ! -lc}}" ! ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}" ! ! #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{!shared: \ ! %{!symbolic: \ ! %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ ! %{pg:gmon.o%s} crti.o%s \ ! %{ansi:values-Xc.o%s} \ ! %{!ansi: \ ! %{traditional:values-Xt.o%s} \ ! %{!traditional:values-Xa.o%s}} \ ! crtbegin.o%s" ! ! /* This should be the same as in svr4.h, except with -R added. */ ! #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{h*} %{v:-V} \ ! %{b} %{Wl,*:%*} \ ! %{static:-dn -Bstatic} \ ! %{shared:-G -dy %{!mimpure-text:-z text}} \ ! %{symbolic:-Bsymbolic -G -dy -z text} \ ! %{G:-G} \ ! %{YP,*} \ ! %{R*} \ ! %{compat-bsd: \ ! %{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \ ! -R /usr/ucblib} \ ! %{!compat-bsd: \ ! %{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \ ! %{Qy:} %{!Qn:-Qy}" ! ! /* This defines which switch letters take arguments. ! It is as in svr4.h but with -R added. */ ! ! #undef SWITCH_TAKES_ARG ! #define SWITCH_TAKES_ARG(CHAR) \ ! (DEFAULT_SWITCH_TAKES_ARG(CHAR) \ ! || (CHAR) == 'R' \ ! || (CHAR) == 'h' \ ! || (CHAR) == 'z') ! ! #define STDC_0_IN_SYSTEM_HEADERS 1 #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." --- 40,65 ---- (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \ : DW_EH_PE_absptr) /* Solaris 2/Intel as chokes on #line directives. */ #undef CPP_SPEC ! #define CPP_SPEC "%{.S:-P} %(cpp_subtarget)" ! /* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler ! gives many warnings: R_386_32 relocation is used for symbol ".text". */ ! #undef ASM_SPEC ! #define ASM_SPEC "\ ! %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ ! %(asm_cpu) \ " ! #define ASM_CPU_SPEC "" ! ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \ ! { "asm_cpu", ASM_CPU_SPEC }, \ ! { "startfile_arch", STARTFILE_ARCH_SPEC }, \ ! { "link_arch", LINK_ARCH_SPEC } #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sun386.h gcc-3.3/gcc/config/i386/sun386.h *** gcc-3.2.3/gcc/config/i386/sun386.h 2001-12-17 15:05:33.000000000 +0000 --- gcc-3.3/gcc/config/i386/sun386.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,141 **** - /* Definitions for Sun assembler syntax for the Intel 80386. - Copyright (C) 1988, 1996, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* Include common aspects of all 386 Unix assemblers. */ - #include "i386/unix.h" - - #define TARGET_VERSION fprintf (stderr, " (80386, Sun syntax)"); - - /* Define the syntax of instructions and addresses. */ - - /* Prefix for internally generated assembler labels. */ - #define LPREFIX ".L" - - /* Define the syntax of pseudo-ops, labels and comments. */ - - /* Assembler pseudos to introduce constants of various size. */ - - #define ASM_SHORT "\t.value\t" - #define ASM_LONG "\t.long\t" - #define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */ - - - /* How to output an ASCII string constant. */ - - #define ASM_OUTPUT_ASCII(FILE, PTR, SIZE) \ - do \ - { size_t i = 0, limit = (SIZE); \ - while (i < limit) \ - { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \ - fputs ("\t.byte\t", (FILE)); } \ - else fprintf ((FILE), ","); \ - fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;} \ - fprintf ((FILE), "\n"); \ - } while (0) - - /* Output at beginning of assembler file. */ - /* The .file command should always begin the output. */ - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - do { \ - { \ - const int len = strlen (main_input_filename); \ - const char *na = main_input_filename + len; \ - char shorter[15]; \ - /* NA gets MAIN_INPUT_FILENAME sans directory names. */\ - while (na > main_input_filename) \ - { \ - if (na[-1] == '/') \ - break; \ - na--; \ - } \ - strncpy (shorter, na, 14); \ - shorter[14] = 0; \ - fprintf (FILE, "\t.file\t"); \ - output_quoted_string (FILE, shorter); \ - fprintf (FILE, "\n"); \ - } \ - fprintf (FILE, "\t.version\t\"%s %s\"\n", \ - lang_hooks.name, version_string); \ - if (optimize) ASM_FILE_START_1 (FILE); \ - } while (0) - - #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.optim\n") - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG)) - - /* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE)) - - /* Output before read-only data. */ - - #undef TEXT_SECTION_ASM_OP - #define TEXT_SECTION_ASM_OP "\t.text" - - /* Output before writable data. */ - - #undef DATA_SECTION_ASM_OP - #define DATA_SECTION_ASM_OP "\t.data" - - /* Define the syntax of labels and symbol definitions/declarations. */ - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - /* This is how to store into the string BUF - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) - - /* The prefix to add to user-visible assembler symbols. */ - - #define USER_LABEL_PREFIX "" - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sun.h gcc-3.3/gcc/config/i386/sun.h *** gcc-3.2.3/gcc/config/i386/sun.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/i386/sun.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,83 **** - /* Definitions for Intel 386 running SunOS 4.0. - Copyright (C) 1988, 1995 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #include "i386/i386.h" - - /* Use the Sun assembler syntax. */ - - #include "i386/sun386.h" - - /* Use crt0.o as a startup file. */ - - #define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - - #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \ - %{g:-lg} %{sun386:}" - /* That last item is just to prevent a spurious error. */ - - #undef LINK_SPEC - #define LINK_SPEC \ - "%{!nostdlib:%{!r*:%{!e*:-e _start}}} -dc -dp %{static:-Bstatic}" - - /* Extra switches to give the assembler. */ - - #define ASM_SPEC "%{R} -i386 %{keep-local-as-symbols:-L}" - - /* Specify predefined symbols in preprocessor. */ - - #define CPP_PREDEFINES "-Dunix -Dsun386 -Dsun -Asystem=unix -Asystem=bsd" - - /* Allow #sccs in preprocessor. */ - - #define SCCS_DIRECTIVE - - /* Output #ident as a .ident. */ - - #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); - - /* We don't want to output SDB debugging information. */ - - #undef SDB_DEBUGGING_INFO - - /* We want to output DBX debugging information. */ - - #define DBX_DEBUGGING_INFO - - /* Implicit library calls should use memcpy, not bcopy, etc. */ - - #define TARGET_MEM_FUNCTIONS - - /* Force structure alignment to the type used for a bitfield. */ - - #define PCC_BITFIELD_TYPE_MATTERS 1 - - /* This is partly guess. */ - - #undef DBX_REGISTER_NUMBER - #define DBX_REGISTER_NUMBER(n) \ - ((n) == 0 ? 11 : (n) == 1 ? 9 : (n) == 2 ? 10 : (n) == 3 ? 8 \ - : (n) == 4 ? 5 : (n) == 5 ? 4 : (n) == 6 ? 6 : (n)) - - /* Every debugger symbol must be in the text section. - Otherwise the assembler or the linker screws up. */ - - #define DEBUG_SYMS_TEXT --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/svr3dbx.h gcc-3.3/gcc/config/i386/svr3dbx.h *** gcc-3.2.3/gcc/config/i386/svr3dbx.h 2001-11-11 05:56:41.000000000 +0000 --- gcc-3.3/gcc/config/i386/svr3dbx.h 2002-08-29 21:40:11.000000000 +0000 *************** *** 1,5 **** ! /* Definitions for Intel 386 running system V, using dbx-in-coff encapsulation. ! Copyright (C) 1992, 1995 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- ! /* Definitions for Intel 385 running system V, using dbx-in-coff encapsulation. ! Copyright (C) 1992, 1995, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,32 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include "i386/svr3gas.h" - /* We do not want to output SDB debugging information. */ #undef SDB_DEBUGGING_INFO /* We want to output DBX debugging information. */ ! #define DBX_DEBUGGING_INFO /* Compensate for botch in dbxout_init/dbxout_source_file which unconditionally drops the first character from ltext_label_name */ --- 18,30 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* We do not want to output SDB debugging information. */ #undef SDB_DEBUGGING_INFO /* We want to output DBX debugging information. */ ! #define DBX_DEBUGGING_INFO 1 /* Compensate for botch in dbxout_init/dbxout_source_file which unconditionally drops the first character from ltext_label_name */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/svr3gas.h gcc-3.3/gcc/config/i386/svr3gas.h *** gcc-3.2.3/gcc/config/i386/svr3gas.h 2001-09-11 16:49:58.000000000 +0000 --- gcc-3.3/gcc/config/i386/svr3gas.h 2002-05-18 23:47:13.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel 386 running system V, using gas. ! Copyright (C) 1992, 1996, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Intel 386 running system V, using gas. ! Copyright (C) 1992, 1996, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,24 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #include "i386/gas.h" /* Add stuff that normally comes from i386/sysv3.h */ --- 18,24 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)"); /* Add stuff that normally comes from i386/sysv3.h */ *************** Boston, MA 02111-1307, USA. */ *** 83,104 **** this file should be rewritten to include config/svr3.h and override what isn't right. */ - /* Support const sections and the ctors and dtors sections for g++. - Note that there appears to be two different ways to support const - sections at the moment. You can either #define the symbol - READONLY_DATA_SECTION (giving it some code which switches to the - readonly data section) or else you can #define the symbols - EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and - SELECT_RTX_SECTION. We do both here just to be on the safe side. - However, use of the const section is turned off by default - unless the specific tm.h file turns it on by defining - USE_CONST_SECTION as 1. */ - - #define USE_CONST_SECTION 0 - #define INIT_SECTION_ASM_OP "\t.section\t.init" #define FINI_SECTION_ASM_OP "\t.section .fini,\"x\"" - #define CONST_SECTION_ASM_OP "\t.section\t.rodata, \"x\"" #define CTORS_SECTION_ASM_OP INIT_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP FINI_SECTION_ASM_OP --- 83,90 ---- *************** do { \ *** 122,135 **** (*--p) (); \ } while (0) - /* Add extra sections .rodata, .init and .fini. */ - #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION --- 108,118 ---- (*--p) (); \ } while (0) #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION *************** fini_section () \ *** 155,210 **** } \ } - #define READONLY_DATA_SECTION() const_section () - - #define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - if (!USE_CONST_SECTION) \ - text_section(); \ - else if (in_section != in_const) \ - { \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ - in_section = in_const; \ - } \ - } - #define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor - - /* A C statement or statements to switch to the appropriate - section for output of DECL. DECL is either a `VAR_DECL' node - or a constant of some sort. RELOC indicates whether forming - the initial value of DECL requires link-time relocations. */ - - #define SELECT_SECTION(DECL,RELOC,ALIGN) \ - { \ - if (TREE_CODE (DECL) == STRING_CST) \ - { \ - if (! flag_writable_strings) \ - const_section (); \ - else \ - data_section (); \ - } \ - else if (TREE_CODE (DECL) == VAR_DECL) \ - { \ - if ((0 && RELOC) /* should be (flag_pic && RELOC) */ \ - || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ - || !DECL_INITIAL (DECL) \ - || (DECL_INITIAL (DECL) != error_mark_node \ - && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ - data_section (); \ - else \ - const_section (); \ - } \ - else \ - const_section (); \ - } - - /* A C statement or statements to switch to the appropriate - section for output of RTX in mode MODE. RTX is some kind - of constant in RTL. The argument MODE is redundant except - in the case of a `const_int' rtx. Currently, these always - go into the const section. */ - - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) const_section() --- 138,141 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sysv3.h gcc-3.3/gcc/config/i386/sysv3.h *** gcc-3.2.3/gcc/config/i386/sysv3.h 2001-08-09 22:33:24.000000000 +0000 --- gcc-3.3/gcc/config/i386/sysv3.h 2002-09-24 12:48:55.000000000 +0000 *************** *** 1,5 **** /* Definitions for Intel 386 running system V. ! Copyright (C) 1988, 1996, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Intel 386 running system V. ! Copyright (C) 1988, 1996, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,34 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! ! #include "i386/i386.h" ! ! /* Use default settings for system V.3. */ ! ! #include "svr3.h" ! ! /* Use the ATT assembler syntax. ! This overrides at least one macro (USER_LABEL_PREFIX) from svr3.h. */ ! ! #include "i386/att.h" /* Use crt1.o as a startup file and crtn.o as a closing file. */ --- 18,24 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)"); /* Use crt1.o as a startup file and crtn.o as a closing file. */ *************** Boston, MA 02111-1307, USA. */ *** 42,52 **** /* Specify predefined symbols in preprocessor. */ ! #define CPP_PREDEFINES "-Dunix -Asystem=svr3" ! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}" ! /* Writing `int' for a bitfield forces int alignment for the structure. */ #define PCC_BITFIELD_TYPE_MATTERS 1 --- 32,48 ---- /* Specify predefined symbols in preprocessor. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_assert ("system=svr3"); \ ! } \ ! while (0) ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" ! /* Writing `int' for a bit-field forces int alignment for the structure. */ #define PCC_BITFIELD_TYPE_MATTERS 1 *************** Boston, MA 02111-1307, USA. */ *** 57,64 **** /* We want to be able to get DBX debugging information via -gstabs. */ ! #undef DBX_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG --- 53,59 ---- /* We want to be able to get DBX debugging information via -gstabs. */ ! #define DBX_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sysv4-cpp.h gcc-3.3/gcc/config/i386/sysv4-cpp.h *** gcc-3.2.3/gcc/config/i386/sysv4-cpp.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i386/sysv4-cpp.h 2002-06-16 21:13:11.000000000 +0000 *************** *** 0 **** --- 1,32 ---- + /* Target definitions for GNU compiler for Intel 80386 running System V.4 + Copyright (C) 1991, 2001, 2002 Free Software Foundation, Inc. + + Written by Ron Guilmette (rfg@netcom.com). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("unix"); \ + builtin_define ("__svr4__"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=svr4"); \ + } \ + while (0) + diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sysv4.h gcc-3.3/gcc/config/i386/sysv4.h *** gcc-3.2.3/gcc/config/i386/sysv4.h 2002-01-22 19:59:30.000000000 +0000 --- gcc-3.3/gcc/config/i386/sysv4.h 2002-06-16 21:13:11.000000000 +0000 *************** *** 1,5 **** /* Target definitions for GNU compiler for Intel 80386 running System V.4 ! Copyright (C) 1991, 2001 Free Software Foundation, Inc. Written by Ron Guilmette (rfg@netcom.com). --- 1,5 ---- /* Target definitions for GNU compiler for Intel 80386 running System V.4 ! Copyright (C) 1991, 2001, 2002 Free Software Foundation, Inc. Written by Ron Guilmette (rfg@netcom.com). *************** the Free Software Foundation, 59 Temple *** 21,27 **** Boston, MA 02111-1307, USA. */ - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (i386 System V Release 4)"); /* The svr4 ABI for the i386 says that records and unions are returned --- 21,26 ---- *************** Boston, MA 02111-1307, USA. */ *** 32,43 **** (TYPE_MODE (TYPE) == BLKmode \ || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) - /* Define which macros to predefine. __svr4__ is our extension. */ - /* This used to define X86, but james@bigtex.cactus.org says that - is supposed to be defined optionally by user programs--not by default. */ - #define CPP_PREDEFINES \ - "-Dunix -D__svr4__ -Asystem=unix -Asystem=svr4" - /* Output at beginning of assembler file. */ /* The .file command should always begin the output. */ --- 31,36 ---- *************** Boston, MA 02111-1307, USA. */ *** 141,146 **** "addl\t$_GLOBAL_OFFSET_TABLE_+[.-.LPR%=],%0" \ : "=d"(BASE)) #endif - - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu)" --- 134,136 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/sysv5.h gcc-3.3/gcc/config/i386/sysv5.h *** gcc-3.2.3/gcc/config/i386/sysv5.h 2001-10-19 22:27:28.000000000 +0000 --- gcc-3.3/gcc/config/i386/sysv5.h 2002-06-04 18:07:44.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 31,34 **** %{!shared:%{!symbolic:-lc -lcrt}}" #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %{pthread:-D_REENTRANT} %{pthreadT:-D_REENTRANT}" --- 31,34 ---- %{!shared:%{!symbolic:-lc -lcrt}}" #undef CPP_SPEC ! #define CPP_SPEC "%{pthread:-D_REENTRANT} %{pthreadT:-D_REENTRANT}" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-cygwin gcc-3.3/gcc/config/i386/t-cygwin *** gcc-3.2.3/gcc/config/i386/t-cygwin 2001-11-15 13:05:53.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-cygwin 2002-09-15 21:47:42.000000000 +0000 *************** LIBGCC2_INCLUDES = -I$(srcdir)/../winsup *** 14,20 **** -I$(srcdir)/../winsup/cygwin/include \ -I$(srcdir)/../winsup/w32api/include ! winnt.o: $(srcdir)/config/i386/winnt.c $(RTL_H) $(TREE_H) $(CONFIG_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/winnt.c # Don't run fixproto --- 14,20 ---- -I$(srcdir)/../winsup/cygwin/include \ -I$(srcdir)/../winsup/w32api/include ! winnt.o: $(srcdir)/config/i386/winnt.c $(RTL_H) $(TREE_H) $(CONFIG_H) $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/winnt.c # Don't run fixproto diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-dgux gcc-3.3/gcc/config/i386/t-dgux *** gcc-3.2.3/gcc/config/i386/t-dgux 2001-11-15 13:05:53.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-dgux 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,11 **** - # - # target makefile for dgux - # - EXTRA_PARTS=crti.o crtbegin.o crtend.o - - crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES) - sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s - $(GCC_FOR_TARGET) -c -o crti.o crti.s - - # Don't run fixproto - STMP_FIXPROTO = --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-interix gcc-3.3/gcc/config/i386/t-interix *** gcc-3.2.3/gcc/config/i386/t-interix 2002-04-12 19:44:42.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-interix 2002-09-15 21:47:42.000000000 +0000 *************** *** 1,6 **** LIB1ASMSRC = i386/cygwin.asm LIB1ASMFUNCS = _chkstk ! interix.o: $(srcdir)/config/i386/interix.c ! $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/interix.c --- 1,6 ---- LIB1ASMSRC = i386/cygwin.asm LIB1ASMFUNCS = _chkstk ! winnt.o: $(srcdir)/config/i386/winnt.c $(TM_P_H) ! $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/winnt.c diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-linux64 gcc-3.3/gcc/config/i386/t-linux64 *** gcc-3.2.3/gcc/config/i386/t-linux64 2002-10-05 21:32:08.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-linux64 2002-11-28 14:47:02.000000000 +0000 *************** LIBGCC = stmp-multilib *** 12,14 **** --- 12,20 ---- INSTALL_LIBGCC = install-multilib EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o + + # The pushl in CTOR initialization interferes with frame pointer elimination. + # crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, + # because then __FRAME_END__ might not be the last thing in .eh_frame + # section. + CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-mingw32 gcc-3.3/gcc/config/i386/t-mingw32 *** gcc-3.2.3/gcc/config/i386/t-mingw32 1998-12-16 21:04:31.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-mingw32 2002-06-11 05:25:44.000000000 +0000 *************** *** 2,4 **** --- 2,7 ---- # collect2 doesn't work for i386-mingw32* yet. # USE_COLLECT2= + + # We hide calls to w32api needed for w32 thread support here: + LIB2FUNCS_EXTRA = $(srcdir)/config/i386/gthr-win32.c diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-next gcc-3.3/gcc/config/i386/t-next *** gcc-3.2.3/gcc/config/i386/t-next 2001-05-17 03:15:56.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-next 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,8 **** - # Specify other dirs of system header files to be fixed. - OTHER_FIXINCLUDES_DIRS= /LocalDeveloper/Headers - - # is sometimes in /usr/include/ansi/limits.h. - LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h -o -f $(SYSTEM_HEADER_DIR)/ansi/limits.h ] - - nextstep.o: $(srcdir)/config/nextstep.c $(CONFIG_H) flags.h tree.h - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/nextstep.c --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-osf gcc-3.3/gcc/config/i386/t-osf *** gcc-3.2.3/gcc/config/i386/t-osf 1998-12-16 21:04:33.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-osf 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2 **** - # If compiling with the osf gcc, avoid sharing code. - TCFLAGS = -pic-none --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-osf1elf gcc-3.3/gcc/config/i386/t-osf1elf *** gcc-3.2.3/gcc/config/i386/t-osf1elf 1998-12-16 21:04:34.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-osf1elf 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,18 **** - # Assemble startup files. - crti.o: $(srcdir)/config/i386/osf1-ci.asm $(GCC_PASSES) - sed -e '/^!/d' <$(srcdir)/config/i386/osf1-ci.asm >crti.s - $(GCC_FOR_TARGET) -c -o crti.o crti.s - crtn.o: $(srcdir)/config/i386/osf1-cn.asm $(GCC_PASSES) - sed -e '/^!/d' <$(srcdir)/config/i386/osf1-cn.asm >crtn.s - $(GCC_FOR_TARGET) -c -o crtn.o crtn.s - - # The pushl in CTOR initialization interferes with frame pointer elimination. - - # We need to use -fPIC when we are using gcc to compile the routines in - # crtstuff.c. This is only really needed when we are going to use gcc/g++ - # to produce a shared library, but since we don't know ahead of time when - # we will be doing that, we just always use -fPIC when compiling the - # routines in crtstuff.c. - - CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer - TARGET_LIBGCC2_CFLAGS = -fPIC --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/t-sco5gas gcc-3.3/gcc/config/i386/t-sco5gas *** gcc-3.2.3/gcc/config/i386/t-sco5gas 2001-11-15 13:05:53.000000000 +0000 --- gcc-3.3/gcc/config/i386/t-sco5gas 2003-01-25 18:09:15.000000000 +0000 *************** *** 1,6 **** # The pushl in CTOR initialization interferes with frame pointer elimination. CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer ! CRTSTUFF_T_CFLAGS_S = -mcoff -fno-omit-frame-pointer # # I am still a little unsure of the multilib architecture. The following --- 1,6 ---- # The pushl in CTOR initialization interferes with frame pointer elimination. CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer ! CRTSTUFF_T_CFLAGS_S = -fno-omit-frame-pointer # # I am still a little unsure of the multilib architecture. The following diff -Nrc3pad gcc-3.2.3/gcc/config/i386/unix.h gcc-3.3/gcc/config/i386/unix.h *** gcc-3.2.3/gcc/config/i386/unix.h 2002-06-04 12:48:03.000000000 +0000 --- gcc-3.3/gcc/config/i386/unix.h 2002-10-20 22:37:10.000000000 +0000 *************** *** 1,5 **** /* Definitions for Unix assembler syntax for the Intel 80386. ! Copyright (C) 1988, 1994, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Unix assembler syntax for the Intel 80386. ! Copyright (C) 1988, 1994, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 58,83 **** #define BSS_SECTION_ASM_OP "\t.bss" ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE)) /* By default, target has a 80387, uses IEEE compatible arithmetic, and returns float values in the 387. */ #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) - - /* Floating-point return values come in the FP register. */ - - #define VALUE_REGNO(MODE) \ - (GET_MODE_CLASS (MODE) == MODE_FLOAT \ - && TARGET_FLOAT_RETURNS_IN_80387 ? FIRST_FLOAT_REG \ - : (MODE) == TImode || VECTOR_MODE_P (MODE) ? FIRST_SSE_REG \ - : 0) - - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - x86_output_mi_thunk (FILE, DELTA, FUNCTION); --- 58,67 ---- #define BSS_SECTION_ASM_OP "\t.bss" ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP ".globl " /* By default, target has a 80387, uses IEEE compatible arithmetic, and returns float values in the 387. */ #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/uwin.h gcc-3.3/gcc/config/i386/uwin.h *** gcc-3.2.3/gcc/config/i386/uwin.h 2001-12-16 15:40:57.000000000 +0000 --- gcc-3.3/gcc/config/i386/uwin.h 2002-06-29 09:10:04.000000000 +0000 *************** *** 2,8 **** hosting on U/WIN (Windows32), using GNU tools and the Windows32 API Library, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1999 Free Software Foundation, Inc. Contributed by Mumit Khan . This file is part of GNU CC. --- 2,8 ---- hosting on U/WIN (Windows32), using GNU tools and the Windows32 API Library, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. Contributed by Mumit Khan . This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 25,50 **** /* Most of this is the same as for Cygwin32, except for changing some specs. */ - #include "i386/cygwin.h" - #define STANDARD_INCLUDE_COMPONENT "UWIN" #define SYSTEM_INCLUDE_DIR "/usr/gnu/include" #undef MD_STARTFILE_PREFIX #define MD_STARTFILE_PREFIX "/usr/gnu/lib/" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_WIN32 -D__WIN32__ \ ! -D_UWIN -DWINNT -D_X86_=1 -D__STDC__=1 \ ! -D__UWIN__ -D__MSVCRT__ \ ! -D_STD_INCLUDE_DIR=mingw32 \ ! -D__stdcall=__attribute__((__stdcall__)) \ ! _D_stdcall=__attribute__((__stdcall__)) \ ! -D__cdecl=__attribute__((__cdecl__)) \ ! -D__declspec(x)=__attribute__((x)) \ ! -Asystem=winnt" #undef CPP_SPEC ! #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ -include /usr/include/astwin32.h \ -idirafter /usr/gnu/include/mingw32" --- 25,51 ---- /* Most of this is the same as for Cygwin32, except for changing some specs. */ #define STANDARD_INCLUDE_COMPONENT "UWIN" #define SYSTEM_INCLUDE_DIR "/usr/gnu/include" #undef MD_STARTFILE_PREFIX #define MD_STARTFILE_PREFIX "/usr/gnu/lib/" ! #undef MAYBE_UWIN_CPP_BUILTINS ! #define MAYBE_UWIN_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("WINNT"); \ ! builtin_define ("_WIN32"); \ ! builtin_define ("__WIN32__"); \ ! builtin_define ("_UWIN"); \ ! builtin_define ("__UWIN__"); \ ! builtin_define ("__MSVCRT__"); \ ! builtin_define ("_STD_INCLUDE_DIR=mingw32"); \ ! } \ ! while (0) #undef CPP_SPEC ! #define CPP_SPEC "-remap %{posix:-D_POSIX_SOURCE} \ -include /usr/include/astwin32.h \ -idirafter /usr/gnu/include/mingw32" diff -Nrc3pad gcc-3.2.3/gcc/config/i386/v3gas.h gcc-3.3/gcc/config/i386/v3gas.h *** gcc-3.2.3/gcc/config/i386/v3gas.h 2001-02-08 19:15:37.000000000 +0000 --- gcc-3.3/gcc/config/i386/v3gas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,80 **** - /* Definitions for Intel 386 running system V, using gas. - Copyright (C) 1992, 1995 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include - - /* Add stuff that normally comes from i386v.h */ - - /* longjmp may fail to restore the registers if called from the same - function that called setjmp. To compensate, the compiler avoids - putting variables in registers in functions that use both setjmp - and longjmp. */ - - #define NON_SAVING_SETJMP \ - (current_function_calls_setjmp && current_function_calls_longjmp) - - /* longjmp may fail to restore the stack pointer if the saved frame - pointer is the same as the caller's frame pointer. Requiring a frame - pointer in any function that calls setjmp or longjmp avoids this - problem, unless setjmp and longjmp are called from the same function. - Since a frame pointer will be required in such a function, it is OK - that the stack pointer is not restored. */ - - #undef SUBTARGET_FRAME_POINTER_REQUIRED - #define SUBTARGET_FRAME_POINTER_REQUIRED \ - (current_function_calls_setjmp || current_function_calls_longjmp) - - /* Modify ASM_OUTPUT_LOCAL slightly to test -msvr3-shlib, adapted to gas */ - #undef ASM_OUTPUT_LOCAL - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - do { \ - int align = exact_log2 (ROUNDED); \ - if (align > 2) align = 2; \ - if (TARGET_SVR3_SHLIB) \ - { \ - data_section (); \ - ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \ - ASM_OUTPUT_LABEL ((FILE), (NAME)); \ - fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)); \ - } \ - else \ - { \ - fputs (".lcomm ", (FILE)); \ - assemble_name ((FILE), (NAME)); \ - fprintf ((FILE), ",%u\n", (ROUNDED)); \ - } \ - } while (0) - - /* Add stuff that normally comes from i386v.h via svr3.h */ - - /* Define the actual types of some ANSI-mandated types. These - definitions should work for most SVR3 systems. */ - - #undef SIZE_TYPE - #define SIZE_TYPE "unsigned int" - - #undef PTRDIFF_TYPE - #define PTRDIFF_TYPE "int" - - #undef WCHAR_TYPE - #define WCHAR_TYPE "long int" - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE BITS_PER_WORD --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i386/vsta.h gcc-3.3/gcc/config/i386/vsta.h *** gcc-3.2.3/gcc/config/i386/vsta.h 2001-08-09 22:33:24.000000000 +0000 --- gcc-3.3/gcc/config/i386/vsta.h 2002-06-16 21:13:11.000000000 +0000 *************** *** 1,5 **** /* Configuration for an i386 running VSTa micro-kernel. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Rob Savoye (rob@cygnus.com). This file is part of GNU CC. --- 1,5 ---- /* Configuration for an i386 running VSTa micro-kernel. ! Copyright (C) 1994, 2002 Free Software Foundation, Inc. Contributed by Rob Savoye (rob@cygnus.com). This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,29 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define YES_UNDERSCORES ! ! #include "i386/gas.h" ! #ifdef CPP_PREDEFINES ! #undef CPP_PREDEFINES ! #endif ! #define CPP_PREDEFINES "-Dunix -DVSTA -Asystem=unix -Asystem=vsta" --- 19,32 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)"); ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_define ("VSTA"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=vsta"); \ ! } \ ! while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/i386/vxi386.h gcc-3.3/gcc/config/i386/vxi386.h *** gcc-3.2.3/gcc/config/i386/vxi386.h 2001-10-31 14:32:30.000000000 +0000 --- gcc-3.3/gcc/config/i386/vxi386.h 2002-11-26 04:54:48.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. VxWorks i386 version. ! Copyright (C) 1998 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. VxWorks i386 version. ! Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,46 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef CPP_CPU_SPEC ! #define CPP_CPU_SPEC "\ ! -Asystem=unix -Acpu=i386 -Amachine=i386 \ ! %{!ansi:-Di386} -D__i386 -D__i386__ \ ! %{march=i386:-DCPU=I80386} \ ! %{march=i486:-DCPU=I80486 %(cpp_486)} \ ! %{march=pentium:-DCPU=PENTIUM -DCPU_VARIANT=PENTIUM %(cpp_586)} \ ! %{march=pentiumpro:-DCPU=PENTIUM -DCPU_VARIANT=PENTIUMPRO %(cpp_686)} \ ! %{!march=*: \ ! %{mcpu=i386:-DCPU=I80386} \ ! %{mcpu=i486:-DCPU=I80486 %(cpp_486)} %{m486:-DCPU=I80486 %(cpp_486)} \ ! %{mpentium:-DCPU=PENTIUM -DCPU_VARIANT=PENTIUM %(cpp_586)} \ ! %{mcpu=pentium:-DCPU=PENTIUM -DCPU_VARIANT=PENTIUM %(cpp_586)} \ ! %{mpentiumpro:-DCPU=PENTIUM -DCPU_VARIANT=PENTIUMPRO %(cpp_686)} \ ! %{mcpu=pentiumpro:-DCPU=PENTIUM -DCPU_VARIANT=PENTIUMPRO %(cpp_686)} \ ! %{!mcpu*:%{!m486:%{!mpentium*:-DCPU=I80386 %(cpp_cpu_default)}}}}" ! ! #include "i386/i386-aout.h" ! #define HANDLE_SYSV_PRAGMA ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__vxworks" /* VxWorks does all the library stuff itself. */ --- 18,50 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef TARGET_VERSION ! #define TARGET_VERSION fprintf (stderr, " (80386, VxWorks BSD syntax)"); ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__vxworks"); \ ! builtin_assert ("system=unix"); \ ! \ ! if (TARGET_386) \ ! builtin_define ("CPU=I80386"); \ ! else if (TARGET_486) \ ! builtin_define ("CPU=I80486"); \ ! else if (TARGET_PENTIUM) \ ! { \ ! builtin_define ("CPU=PENTIUM"); \ ! builtin_define ("CPU_VARIANT=PENTIUM"); \ ! } \ ! else if (TARGET_PENTIUMPRO) \ ! { \ ! builtin_define ("CPU=PENTIUM"); \ ! builtin_define ("CPU_VARIANT=PENTIUMPRO"); \ ! } \ ! } \ ! while (0) ! #define HANDLE_SYSV_PRAGMA 1 /* VxWorks does all the library stuff itself. */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/win32.h gcc-3.3/gcc/config/i386/win32.h *** gcc-3.2.3/gcc/config/i386/win32.h 2002-01-03 17:40:02.000000000 +0000 --- gcc-3.3/gcc/config/i386/win32.h 2002-08-29 21:40:11.000000000 +0000 *************** *** 2,8 **** hosting on Windows NT 3.x, using a Unix style C library and tools, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 2,8 ---- hosting on Windows NT 3.x, using a Unix style C library and tools, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 22,36 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #define YES_UNDERSCORES - /* Enable parsing of #pragma pack(push,) and #pragma pack(pop). */ #define HANDLE_PRAGMA_PACK_PUSH_POP 1 ! #define DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG #include "i386/gas.h" #include "dbxcoff.h" --- 22,36 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Enable parsing of #pragma pack(push,) and #pragma pack(pop). */ #define HANDLE_PRAGMA_PACK_PUSH_POP 1 ! #define DBX_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "i386/unix.h" + #include "i386/bsd.h" #include "i386/gas.h" #include "dbxcoff.h" *************** Boston, MA 02111-1307, USA. */ *** 62,72 **** { "no-nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, "" }, ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_WIN32 -DWINNT -D_X86_=1 \ ! -D__stdcall=__attribute__((__stdcall__)) \ ! -D__cdecl=__attribute__((__cdecl__)) \ ! -Asystem=winnt" #undef STARTFILE_SPEC --- 62,85 ---- { "no-nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, "" }, ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_WIN32"); \ ! builtin_define_std ("WINNT"); \ ! builtin_define ("_X86_"); \ ! builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ ! builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ ! builtin_assert ("system=winnt"); \ ! if (TARGET_CYGWIN) \ ! { \ ! builtin_define ("__CYGWIN32__"); \ ! builtin_define ("__CYGWIN__"); \ ! } \ ! else \ ! builtin_define ("__MINGW32__"); \ ! } \ ! while (0) #undef STARTFILE_SPEC *************** Boston, MA 02111-1307, USA. */ *** 74,82 **** %{mcygwin:crt0%O%s} %{pg:gcrt0%O%s}}" #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ ! %{!mcygwin:-iwithprefixbefore include/mingw32 -D__MINGW32__} \ ! %{mcygwin:-D__CYGWIN32__ -D__CYGWIN__}" /* We have to dynamic link to get to the system DLLs. All of libc, libm and the Unix stuff is in cygwin.dll. The import library is called --- 87,94 ---- %{mcygwin:crt0%O%s} %{pg:gcrt0%O%s}}" #undef CPP_SPEC ! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \ ! %{!mcygwin:-iwithprefixbefore include/mingw32}" /* We have to dynamic link to get to the system DLLs. All of libc, libm and the Unix stuff is in cygwin.dll. The import library is called *************** Boston, MA 02111-1307, USA. */ *** 95,101 **** #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" - #define WCHAR_UNSIGNED 1 #define WCHAR_TYPE_SIZE 16 #define WCHAR_TYPE "short unsigned int" /* Currently we do not have the atexit() function, --- 107,112 ---- *************** Boston, MA 02111-1307, USA. */ *** 103,165 **** #define NEED_ATEXIT 1 ! /* Define this macro if references to a symbol must be treated ! differently depending on something about the variable or ! function named by the symbol (such as what section it is in). ! ! On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol ! so that we may access it directly in the GOT. ! ! On i386 running Windows NT, modify the assembler name with a suffix ! consisting of an atsign (@) followed by string of digits that represents ! the number of bytes of arguments passed to the function, if it has the ! attribute STDCALL. */ ! ! #ifdef ENCODE_SECTION_INFO ! #undef ENCODE_SECTION_INFO ! #define ENCODE_SECTION_INFO(DECL) \ ! do \ ! { \ ! if (flag_pic) \ ! { \ ! rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ ! = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! || ! TREE_PUBLIC (DECL)); \ ! } \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! if (lookup_attribute ("stdcall", \ ! TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \ ! XEXP (DECL_RTL (DECL), 0) = \ ! gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \ ! } \ ! while (0) ! #endif ! ! /* This macro gets just the user-specified name ! out of the string in a SYMBOL_REF. Discard ! trailing @[NUM] encoded by ENCODE_SECTION_INFO. ! Do we need the stripping of leading '*'? */ ! #undef STRIP_NAME_ENCODING ! #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ ! do { \ ! const char *_p; \ ! const char *const _name = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'));\ ! for (_p = _name; *_p && *_p != '@'; ++_p) \ ! ; \ ! if (*_p == '@') \ ! { \ ! int _len = _p - _name; \ ! char *_new_name = (char *) alloca (_len + 1); \ ! strncpy (_new_name, _name, _len); \ ! _new_name[_len] = '\0'; \ ! (VAR) = _new_name; \ ! } \ ! else \ ! (VAR) = _name; \ ! } while (0) ! /* Emit code to check the stack when allocating more that 4000 bytes in one go. */ --- 114,123 ---- #define NEED_ATEXIT 1 ! #undef TARGET_ENCODE_SECTION_INFO ! #define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info ! #undef TARGET_STRIP_NAME_ENCODING ! #define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full /* Emit code to check the stack when allocating more that 4000 bytes in one go. */ *************** do { \ *** 187,194 **** symbols must be explicitly imported from shared libraries (DLLs). */ #define MULTIPLE_SYMBOL_SPACES ! extern void i386_pe_unique_section (); ! #define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC) #define SUPPORTS_ONE_ONLY 1 --- 145,152 ---- symbols must be explicitly imported from shared libraries (DLLs). */ #define MULTIPLE_SYMBOL_SPACES ! extern void i386_pe_unique_section PARAMS ((tree, int)); ! #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section #define SUPPORTS_ONE_ONLY 1 diff -Nrc3pad gcc-3.2.3/gcc/config/i386/winnt.c gcc-3.3/gcc/config/i386/winnt.c *** gcc-3.2.3/gcc/config/i386/winnt.c 2002-09-16 22:24:43.000000000 +0000 --- gcc-3.3/gcc/config/i386/winnt.c 2003-04-21 23:25:55.000000000 +0000 *************** *** 1,6 **** /* Subroutines for insn-output.c for Windows NT. Contributed by Douglas Rupp (drupp@cs.washington.edu) ! Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Subroutines for insn-output.c for Windows NT. Contributed by Douglas Rupp (drupp@cs.washington.edu) ! Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 30,35 **** --- 31,37 ---- #include "tm_p.h" #include "toplev.h" #include "hashtab.h" + #include "ggc.h" /* i386/PE specific attribute support. *************** associated_type (decl) *** 133,139 **** return t; } ! /* Return non-zero if DECL is a dllexport'd object. */ int i386_pe_dllexport_p (decl) --- 135,141 ---- return t; } ! /* Return nonzero if DECL is a dllexport'd object. */ int i386_pe_dllexport_p (decl) *************** i386_pe_dllexport_p (decl) *** 160,166 **** return 0; } ! /* Return non-zero if DECL is a dllimport'd object. */ int i386_pe_dllimport_p (decl) --- 162,168 ---- return 0; } ! /* Return nonzero if DECL is a dllimport'd object. */ int i386_pe_dllimport_p (decl) *************** i386_pe_dllimport_p (decl) *** 191,212 **** return 0; } ! /* Return non-zero if SYMBOL is marked as being dllexport'd. */ int i386_pe_dllexport_name_p (symbol) const char *symbol; { ! return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.'; } ! /* Return non-zero if SYMBOL is marked as being dllimport'd. */ int i386_pe_dllimport_name_p (symbol) const char *symbol; { ! return symbol[0] == '@' && symbol[1] == 'i' && symbol[2] == '.'; } /* Mark a DECL as being dllexport'd. --- 193,216 ---- return 0; } ! /* Return nonzero if SYMBOL is marked as being dllexport'd. */ int i386_pe_dllexport_name_p (symbol) const char *symbol; { ! return symbol[0] == DLL_IMPORT_EXPORT_PREFIX ! && symbol[1] == 'e' && symbol[2] == '.'; } ! /* Return nonzero if SYMBOL is marked as being dllimport'd. */ int i386_pe_dllimport_name_p (symbol) const char *symbol; { ! return symbol[0] == DLL_IMPORT_EXPORT_PREFIX ! && symbol[1] == 'i' && symbol[2] == '.'; } /* Mark a DECL as being dllexport'd. *************** i386_pe_mark_dllexport (decl) *** 235,241 **** return; /* already done */ newname = alloca (strlen (oldname) + 4); ! sprintf (newname, "@e.%s", oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref --- 239,245 ---- return; /* already done */ newname = alloca (strlen (oldname) + 4); ! sprintf (newname, "%ce.%s", DLL_IMPORT_EXPORT_PREFIX, oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref *************** i386_pe_mark_dllimport (decl) *** 310,316 **** } newname = alloca (strlen (oldname) + 11); ! sprintf (newname, "@i._imp__%s", oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref --- 314,320 ---- } newname = alloca (strlen (oldname) + 11); ! sprintf (newname, "%ci._imp__%s", DLL_IMPORT_EXPORT_PREFIX, oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref *************** gen_stdcall_suffix (decl) *** 365,376 **** return IDENTIFIER_POINTER (get_identifier (newsym)); } - /* Cover function to implement ENCODE_SECTION_INFO. */ - void ! i386_pe_encode_section_info (decl) tree decl; { /* This bit is copied from i386.h. */ if (optimize > 0 && TREE_CONSTANT (decl) && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) --- 369,382 ---- return IDENTIFIER_POINTER (get_identifier (newsym)); } void ! i386_pe_encode_section_info (decl, first) tree decl; + int first; { + if (!first) + return; + /* This bit is copied from i386.h. */ if (optimize > 0 && TREE_CONSTANT (decl) && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) *************** i386_pe_encode_section_info (decl) *** 395,402 **** i386_pe_mark_dllimport (decl); /* It might be that DECL has already been marked as dllimport, but a subsequent definition nullified that. The attribute is gone but ! DECL_RTL still has @i._imp__foo. We need to remove that. Ditto ! for the DECL_NON_ADDR_CONST_P flag. */ else if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) && DECL_RTL (decl) != NULL_RTX --- 401,408 ---- i386_pe_mark_dllimport (decl); /* It might be that DECL has already been marked as dllimport, but a subsequent definition nullified that. The attribute is gone but ! DECL_RTL still has (DLL_IMPORT_EXPORT_PREFIX)i._imp__foo. We need ! to remove that. Ditto for the DECL_NON_ADDR_CONST_P flag. */ else if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) && DECL_RTL (decl) != NULL_RTX *************** i386_pe_encode_section_info (decl) *** 418,424 **** } } ! /* Cover function for UNIQUE_SECTION. */ void i386_pe_unique_section (decl, reloc) --- 424,457 ---- } } ! /* Strip only the leading encoding, leaving the stdcall suffix. */ ! ! const char * ! i386_pe_strip_name_encoding (str) ! const char *str; ! { ! if (*str == DLL_IMPORT_EXPORT_PREFIX) ! str += 3; ! if (*str == '*') ! str += 1; ! return str; ! } ! ! /* Also strip the stdcall suffix. */ ! ! const char * ! i386_pe_strip_name_encoding_full (str) ! const char *str; ! { ! const char *p; ! const char *name = i386_pe_strip_name_encoding (str); ! ! p = strchr (name, '@'); ! if (p) ! return ggc_alloc_string (name, p - name); ! ! return name; ! } void i386_pe_unique_section (decl, reloc) *************** i386_pe_unique_section (decl, reloc) *** 430,437 **** char *string; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! /* Strip off any encoding in fnname. */ ! STRIP_NAME_ENCODING (name, name); /* The object is put in, for example, section .text$foo. The linker will then ultimately place them in .text --- 463,469 ---- char *string; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! name = i386_pe_strip_name_encoding_full (name); /* The object is put in, for example, section .text$foo. The linker will then ultimately place them in .text *************** i386_pe_unique_section (decl, reloc) *** 441,455 **** without a .rdata section. */ if (TREE_CODE (decl) == FUNCTION_DECL) prefix = ".text$"; ! /* else if (DECL_INITIAL (decl) == 0 ! || DECL_INITIAL (decl) == error_mark_node) ! prefix = ".bss"; */ ! else if (DECL_READONLY_SECTION (decl, reloc)) ! #ifdef READONLY_DATA_SECTION prefix = ".rdata$"; - #else - prefix = ".text$"; - #endif else prefix = ".data$"; len = strlen (name) + strlen (prefix); --- 473,480 ---- without a .rdata section. */ if (TREE_CODE (decl) == FUNCTION_DECL) prefix = ".text$"; ! else if (decl_readonly_section (decl, reloc)) prefix = ".rdata$"; else prefix = ".data$"; len = strlen (name) + strlen (prefix); *************** i386_pe_section_type_flags (decl, name, *** 494,500 **** if (decl && TREE_CODE (decl) == FUNCTION_DECL) flags = SECTION_CODE; ! else if (decl && DECL_READONLY_SECTION (decl, reloc)) flags = 0; else { --- 519,525 ---- if (decl && TREE_CODE (decl) == FUNCTION_DECL) flags = SECTION_CODE; ! else if (decl && decl_readonly_section (decl, reloc)) flags = 0; else { *************** i386_pe_asm_named_section (name, flags) *** 560,566 **** /* Mark a function appropriately. This should only be called for functions for which we are not emitting COFF debugging information. FILE is the assembler output file, NAME is the name of the ! function, and PUBLIC is non-zero if the function is globally visible. */ void --- 585,591 ---- /* Mark a function appropriately. This should only be called for functions for which we are not emitting COFF debugging information. FILE is the assembler output file, NAME is the name of the ! function, and PUBLIC is nonzero if the function is globally visible. */ void *************** i386_pe_record_external_function (name) *** 598,604 **** { struct extern_list *p; ! p = (struct extern_list *) permalloc (sizeof *p); p->next = extern_head; p->name = name; extern_head = p; --- 623,629 ---- { struct extern_list *p; ! p = (struct extern_list *) xmalloc (sizeof *p); p->next = extern_head; p->name = name; extern_head = p; *************** i386_pe_record_exported_symbol (name, is *** 628,634 **** { struct export_list *p; ! p = (struct export_list *) permalloc (sizeof *p); p->next = export_head; p->name = name; p->is_data = is_data; --- 653,659 ---- { struct export_list *p; ! p = (struct export_list *) xmalloc (sizeof *p); p->next = export_head; p->name = name; p->is_data = is_data; *************** i386_pe_asm_file_end (file) *** 668,674 **** for (q = export_head; q != NULL; q = q->next) { fprintf (file, "\t.ascii \" -export:%s%s\"\n", ! I386_PE_STRIP_ENCODING (q->name), (q->is_data) ? ",data" : ""); } } --- 693,699 ---- for (q = export_head; q != NULL; q = q->next) { fprintf (file, "\t.ascii \" -export:%s%s\"\n", ! i386_pe_strip_name_encoding (q->name), (q->is_data) ? ",data" : ""); } } diff -Nrc3pad gcc-3.2.3/gcc/config/i386/x86-64.h gcc-3.3/gcc/config/i386/x86-64.h *** gcc-3.2.3/gcc/config/i386/x86-64.h 2002-02-28 15:45:54.000000000 +0000 --- gcc-3.3/gcc/config/i386/x86-64.h 2002-11-16 13:33:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 29,44 **** /* Output assembler code to FILE to call the profiler. */ #define NO_PROFILE_COUNTERS ! #undef FUNCTION_PROFILER ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! { \ ! if (TARGET_64BIT && flag_pic) \ ! fprintf (FILE, "\tcall\t*mcount@PLT\n"); \ ! else if (flag_pic) \ ! fprintf (FILE, "\tcall\t*mcount@GOT(%%ebx)\n"); \ ! else \ ! fprintf (FILE, "\tcall\tmcount\n"); \ ! } #undef SIZE_TYPE #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") --- 29,36 ---- /* Output assembler code to FILE to call the profiler. */ #define NO_PROFILE_COUNTERS ! #undef MCOUNT_NAME ! #define MCOUNT_NAME "mcount" #undef SIZE_TYPE #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") *************** Boston, MA 02111-1307, USA. */ *** 85,93 **** /* i386 System V Release 4 uses DWARF debugging info. x86-64 ABI specifies DWARF2. */ - #undef DWARF2_DEBUGGING_INFO #undef DWARF_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO #define DWARF2_UNWIND_INFO 1 /* Incorrectly autodetected in cross compilation. */ #undef HAVE_AS_DWARF2_DEBUG_LINE --- 77,84 ---- /* i386 System V Release 4 uses DWARF debugging info. x86-64 ABI specifies DWARF2. */ #undef DWARF_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO 1 #define DWARF2_UNWIND_INFO 1 /* Incorrectly autodetected in cross compilation. */ #undef HAVE_AS_DWARF2_DEBUG_LINE diff -Nrc3pad gcc-3.2.3/gcc/config/i386/xmmintrin.h gcc-3.3/gcc/config/i386/xmmintrin.h *** gcc-3.2.3/gcc/config/i386/xmmintrin.h 2002-10-27 09:28:12.000000000 +0000 --- gcc-3.3/gcc/config/i386/xmmintrin.h 2003-02-22 10:04:13.000000000 +0000 *************** *** 30,35 **** --- 30,39 ---- #ifndef _XMMINTRIN_H_INCLUDED #define _XMMINTRIN_H_INCLUDED + #ifndef __SSE__ + # error "SSE instruction set not enabled" + #else + /* We need type definitions from the MMX header file. */ #include *************** _mm_cvtss_si32 (__m128 __A) *** 471,476 **** --- 475,490 ---- return __builtin_ia32_cvtss2si ((__v4sf) __A); } + #ifdef __x86_64__ + /* Convert the lower SPFP value to a 32-bit integer according to the current + rounding mode. */ + static __inline long long + _mm_cvtss_si64x (__m128 __A) + { + return __builtin_ia32_cvtss2si64 ((__v4sf) __A); + } + #endif + /* Convert the two lower SPFP values to 32-bit integers according to the current rounding mode. Return the integers in packed form. */ static __inline __m64 *************** _mm_cvttss_si32 (__m128 __A) *** 486,491 **** --- 500,514 ---- return __builtin_ia32_cvttss2si ((__v4sf) __A); } + #ifdef __x86_64__ + /* Truncate the lower SPFP value to a 32-bit integer. */ + static __inline long long + _mm_cvttss_si64x (__m128 __A) + { + return __builtin_ia32_cvttss2si64 ((__v4sf) __A); + } + #endif + /* Truncate the two lower SPFP values to 32-bit integers. Return the integers in packed form. */ static __inline __m64 *************** _mm_cvtsi32_ss (__m128 __A, int __B) *** 501,506 **** --- 524,538 ---- return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B); } + #ifdef __x86_64__ + /* Convert B to a SPFP value and insert it as element zero in A. */ + static __inline __m128 + _mm_cvtsi64x_ss (__m128 __A, long long __B) + { + return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); + } + #endif + /* Convert the two 32-bit values in B to SPFP form and insert them as the two lower elements in A. */ static __inline __m128 *************** _mm_cvtps_pi16(__m128 __A) *** 602,608 **** __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf); __v2si __hisi = __builtin_ia32_cvtps2pi (__hisf); __v2si __losi = __builtin_ia32_cvtps2pi (__losf); ! return (__m64) __builtin_ia32_packssdw (__losi, __hisi); } /* Convert the four SPFP values in A to four signed 8-bit integers. */ --- 634,640 ---- __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf); __v2si __hisi = __builtin_ia32_cvtps2pi (__hisf); __v2si __losi = __builtin_ia32_cvtps2pi (__losf); ! return (__m64) __builtin_ia32_packssdw (__hisi, __losi); } /* Convert the four SPFP values in A to four signed 8-bit integers. */ *************** _mm_unpacklo_ps (__m128 __A, __m128 __B) *** 644,650 **** /* Sets the upper two SPFP values with 64-bits of data loaded from P; the lower two values are passed through from A. */ static __inline __m128 ! _mm_loadh_pi (__m128 __A, __m64 *__P) { return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (__v2si *)__P); } --- 676,682 ---- /* Sets the upper two SPFP values with 64-bits of data loaded from P; the lower two values are passed through from A. */ static __inline __m128 ! _mm_loadh_pi (__m128 __A, __m64 const *__P) { return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (__v2si *)__P); } *************** _mm_movelh_ps (__m128 __A, __m128 __B) *** 673,679 **** /* Sets the lower two SPFP values with 64-bits of data loaded from P; the upper two values are passed through from A. */ static __inline __m128 ! _mm_loadl_pi (__m128 __A, __m64 *__P) { return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (__v2si *)__P); } --- 705,711 ---- /* Sets the lower two SPFP values with 64-bits of data loaded from P; the upper two values are passed through from A. */ static __inline __m128 ! _mm_loadl_pi (__m128 __A, __m64 const *__P) { return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (__v2si *)__P); } *************** _MM_SET_FLUSH_ZERO_MODE (unsigned int __ *** 758,799 **** /* Create a vector with element 0 as *P and the rest zero. */ static __inline __m128 ! _mm_load_ss (float *__P) { return (__m128) __builtin_ia32_loadss (__P); } /* Create a vector with all four elements equal to *P. */ static __inline __m128 ! _mm_load1_ps (float *__P) { __v4sf __tmp = __builtin_ia32_loadss (__P); return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,0,0,0)); } static __inline __m128 ! _mm_load_ps1 (float *__P) { return _mm_load1_ps (__P); } /* Load four SPFP values from P. The address must be 16-byte aligned. */ static __inline __m128 ! _mm_load_ps (float *__P) { return (__m128) __builtin_ia32_loadaps (__P); } /* Load four SPFP values from P. The address need not be 16-byte aligned. */ static __inline __m128 ! _mm_loadu_ps (float *__P) { return (__m128) __builtin_ia32_loadups (__P); } /* Load four SPFP values in reverse order. The address must be aligned. */ static __inline __m128 ! _mm_loadr_ps (float *__P) { __v4sf __tmp = __builtin_ia32_loadaps (__P); return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,1,2,3)); --- 790,831 ---- /* Create a vector with element 0 as *P and the rest zero. */ static __inline __m128 ! _mm_load_ss (float const *__P) { return (__m128) __builtin_ia32_loadss (__P); } /* Create a vector with all four elements equal to *P. */ static __inline __m128 ! _mm_load1_ps (float const *__P) { __v4sf __tmp = __builtin_ia32_loadss (__P); return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,0,0,0)); } static __inline __m128 ! _mm_load_ps1 (float const *__P) { return _mm_load1_ps (__P); } /* Load four SPFP values from P. The address must be 16-byte aligned. */ static __inline __m128 ! _mm_load_ps (float const *__P) { return (__m128) __builtin_ia32_loadaps (__P); } /* Load four SPFP values from P. The address need not be 16-byte aligned. */ static __inline __m128 ! _mm_loadu_ps (float const *__P) { return (__m128) __builtin_ia32_loadups (__P); } /* Load four SPFP values in reverse order. The address must be aligned. */ static __inline __m128 ! _mm_loadr_ps (float const *__P) { __v4sf __tmp = __builtin_ia32_loadaps (__P); return (__m128) __builtin_ia32_shufps (__tmp, __tmp, _MM_SHUFFLE (0,1,2,3)); *************** _mm_storeu_ps (float *__P, __m128 __A) *** 887,893 **** __builtin_ia32_storeups (__P, (__v4sf)__A); } ! /* Store four SPFP values in reverse order. The addres must be aligned. */ static __inline void _mm_storer_ps (float *__P, __m128 __A) { --- 919,925 ---- __builtin_ia32_storeups (__P, (__v4sf)__A); } ! /* Store four SPFP values in reverse order. The address must be aligned. */ static __inline void _mm_storer_ps (float *__P, __m128 __A) { *************** _mm_prefetch (void *__P, enum _mm_hint _ *** 1033,1039 **** static __inline void _mm_stream_pi (__m64 *__P, __m64 __A) { ! __builtin_ia32_movntq (__P, (long long)__A); } /* Likewise. The address must be 16-byte aligned. */ --- 1065,1071 ---- static __inline void _mm_stream_pi (__m64 *__P, __m64 __A) { ! __builtin_ia32_movntq ((unsigned long long *)__P, (unsigned long long)__A); } /* Likewise. The address must be 16-byte aligned. */ *************** do { \ *** 1074,1077 **** --- 1106,2574 ---- (row3) = __builtin_ia32_shufps (__t2, __t3, 0xDD); \ } while (0) + #ifdef __SSE2__ + /* SSE2 */ + typedef int __v2df __attribute__ ((mode (V2DF))); + typedef int __v2di __attribute__ ((mode (V2DI))); + typedef int __v4si __attribute__ ((mode (V4SI))); + typedef int __v8hi __attribute__ ((mode (V8HI))); + typedef int __v16qi __attribute__ ((mode (V16QI))); + + /* Create a selector for use with the SHUFPD instruction. */ + #define _MM_SHUFFLE2(fp1,fp0) \ + (((fp1) << 1) | (fp0)) + + #define __m128i __v2di + #define __m128d __v2df + + /* Create a vector with element 0 as *P and the rest zero. */ + static __inline __m128d + _mm_load_sd (double const *__P) + { + return (__m128d) __builtin_ia32_loadsd (__P); + } + + /* Create a vector with all two elements equal to *P. */ + static __inline __m128d + _mm_load1_pd (double const *__P) + { + __v2df __tmp = __builtin_ia32_loadsd (__P); + return (__m128d) __builtin_ia32_shufpd (__tmp, __tmp, _MM_SHUFFLE2 (0,0)); + } + + static __inline __m128d + _mm_load_pd1 (double const *__P) + { + return _mm_load1_pd (__P); + } + + /* Load two DPFP values from P. The addresd must be 16-byte aligned. */ + static __inline __m128d + _mm_load_pd (double const *__P) + { + return (__m128d) __builtin_ia32_loadapd (__P); + } + + /* Load two DPFP values from P. The addresd need not be 16-byte aligned. */ + static __inline __m128d + _mm_loadu_pd (double const *__P) + { + return (__m128d) __builtin_ia32_loadupd (__P); + } + + /* Load two DPFP values in reverse order. The addresd must be aligned. */ + static __inline __m128d + _mm_loadr_pd (double const *__P) + { + __v2df __tmp = __builtin_ia32_loadapd (__P); + return (__m128d) __builtin_ia32_shufpd (__tmp, __tmp, _MM_SHUFFLE2 (0,1)); + } + + /* Create a vector with element 0 as F and the rest zero. */ + static __inline __m128d + _mm_set_sd (double __F) + { + return (__m128d) __builtin_ia32_loadsd (&__F); + } + + /* Create a vector with all two elements equal to F. */ + static __inline __m128d + _mm_set1_pd (double __F) + { + __v2df __tmp = __builtin_ia32_loadsd (&__F); + return (__m128d) __builtin_ia32_shufpd (__tmp, __tmp, _MM_SHUFFLE2 (0,0)); + } + + static __inline __m128d + _mm_set_pd1 (double __F) + { + return _mm_set1_pd (__F); + } + + /* Create the vector [Z Y]. */ + static __inline __m128d + _mm_set_pd (double __Z, double __Y) + { + union { + double __a[2]; + __m128d __v; + } __u; + + __u.__a[0] = __Y; + __u.__a[1] = __Z; + + return __u.__v; + } + + /* Create the vector [Y Z]. */ + static __inline __m128d + _mm_setr_pd (double __Z, double __Y) + { + return _mm_set_pd (__Y, __Z); + } + + /* Create a vector of zeros. */ + static __inline __m128d + _mm_setzero_pd (void) + { + return (__m128d) __builtin_ia32_setzeropd (); + } + + /* Stores the lower DPFP value. */ + static __inline void + _mm_store_sd (double *__P, __m128d __A) + { + __builtin_ia32_storesd (__P, (__v2df)__A); + } + + /* Store the lower DPFP value acrosd two words. */ + static __inline void + _mm_store1_pd (double *__P, __m128d __A) + { + __v2df __va = (__v2df)__A; + __v2df __tmp = __builtin_ia32_shufpd (__va, __va, _MM_SHUFFLE2 (0,0)); + __builtin_ia32_storeapd (__P, __tmp); + } + + static __inline void + _mm_store_pd1 (double *__P, __m128d __A) + { + _mm_store1_pd (__P, __A); + } + + /* Store two DPFP values. The addresd must be 16-byte aligned. */ + static __inline void + _mm_store_pd (double *__P, __m128d __A) + { + __builtin_ia32_storeapd (__P, (__v2df)__A); + } + + /* Store two DPFP values. The addresd need not be 16-byte aligned. */ + static __inline void + _mm_storeu_pd (double *__P, __m128d __A) + { + __builtin_ia32_storeupd (__P, (__v2df)__A); + } + + /* Store two DPFP values in reverse order. The addresd must be aligned. */ + static __inline void + _mm_storer_pd (double *__P, __m128d __A) + { + __v2df __va = (__v2df)__A; + __v2df __tmp = __builtin_ia32_shufpd (__va, __va, _MM_SHUFFLE2 (0,1)); + __builtin_ia32_storeapd (__P, __tmp); + } + + /* Sets the low DPFP value of A from the low value of B. */ + static __inline __m128d + _mm_move_sd (__m128d __A, __m128d __B) + { + return (__m128d) __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); + } + + + static __inline __m128d + _mm_add_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_addpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_add_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_addsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_sub_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_subpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_sub_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_subsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_mul_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_mulpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_mul_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_mulsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_div_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_divpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_div_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_divsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_sqrt_pd (__m128d __A) + { + return (__m128d)__builtin_ia32_sqrtpd ((__v2df)__A); + } + + /* Return pair {sqrt (A[0), B[1]}. */ + static __inline __m128d + _mm_sqrt_sd (__m128d __A, __m128d __B) + { + __v2df __tmp = __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); + return (__m128d)__builtin_ia32_sqrtsd ((__v2df)__tmp); + } + + static __inline __m128d + _mm_min_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_minpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_min_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_minsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_max_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_maxpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_max_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_maxsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_and_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_andpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_andnot_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_andnpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_or_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_orpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_xor_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_xorpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpeq_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpeqpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmplt_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpltpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmple_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmplepd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpgt_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpgtpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpge_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpgepd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpneq_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpneqpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpnlt_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpnltpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpnle_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpnlepd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpngt_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpngtpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpnge_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpngepd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpord_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpordpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpunord_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpunordpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpeq_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpeqsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmplt_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpltsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmple_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmplesd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpgt_sd (__m128d __A, __m128d __B) + { + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpltsd ((__v2df) __B, + (__v2df) + __A)); + } + + static __inline __m128d + _mm_cmpge_sd (__m128d __A, __m128d __B) + { + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmplesd ((__v2df) __B, + (__v2df) + __A)); + } + + static __inline __m128d + _mm_cmpneq_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpneqsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpnlt_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpnltsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpnle_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpnlesd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpngt_sd (__m128d __A, __m128d __B) + { + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpnltsd ((__v2df) __B, + (__v2df) + __A)); + } + + static __inline __m128d + _mm_cmpnge_sd (__m128d __A, __m128d __B) + { + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpnlesd ((__v2df) __B, + (__v2df) + __A)); + } + + static __inline __m128d + _mm_cmpord_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpordsd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_cmpunord_sd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_cmpunordsd ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_comieq_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_comisdeq ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_comilt_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_comisdlt ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_comile_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_comisdle ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_comigt_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_comisdgt ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_comige_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_comisdge ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_comineq_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_comisdneq ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_ucomieq_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_ucomisdeq ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_ucomilt_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_ucomisdlt ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_ucomile_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_ucomisdle ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_ucomigt_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_ucomisdgt ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_ucomige_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_ucomisdge ((__v2df)__A, (__v2df)__B); + } + + static __inline int + _mm_ucomineq_sd (__m128d __A, __m128d __B) + { + return __builtin_ia32_ucomisdneq ((__v2df)__A, (__v2df)__B); + } + + /* Create a vector with element 0 as *P and the rest zero. */ + + static __inline __m128i + _mm_load_si128 (__m128i const *__P) + { + return (__m128i) __builtin_ia32_loaddqa ((char const *)__P); + } + + static __inline __m128i + _mm_loadu_si128 (__m128i const *__P) + { + return (__m128i) __builtin_ia32_loaddqu ((char const *)__P); + } + + static __inline __m128i + _mm_loadl_epi64 (__m128i const *__P) + { + return (__m128i) __builtin_ia32_movq2dq (*(unsigned long long *)__P); + } + + static __inline void + _mm_store_si128 (__m128i *__P, __m128i __B) + { + __builtin_ia32_storedqa ((char *)__P, (__v16qi)__B); + } + + static __inline void + _mm_storeu_si128 (__m128i *__P, __m128i __B) + { + __builtin_ia32_storedqu ((char *)__P, (__v16qi)__B); + } + + static __inline void + _mm_storel_epi64 (__m128i *__P, __m128i __B) + { + *(long long *)__P = __builtin_ia32_movdq2q ((__v2di)__B); + } + + static __inline __m64 + _mm_movepi64_pi64 (__m128i __B) + { + return (__m64) __builtin_ia32_movdq2q ((__v2di)__B); + } + + static __inline __m128i + _mm_move_epi64 (__m128i __A) + { + return (__m128i) __builtin_ia32_movq ((__v2di)__A); + } + + /* Create a vector of zeros. */ + static __inline __m128i + _mm_setzero_si128 (void) + { + return (__m128i) __builtin_ia32_setzero128 (); + } + + static __inline __m128i + _mm_set_epi64 (__m64 __A, __m64 __B) + { + __v2di __tmp = (__v2di)__builtin_ia32_movq2dq ((unsigned long long)__A); + __v2di __tmp2 = (__v2di)__builtin_ia32_movq2dq ((unsigned long long)__B); + return (__m128i)__builtin_ia32_punpcklqdq128 (__tmp2, __tmp); + } + + /* Create the vector [Z Y X W]. */ + static __inline __m128i + _mm_set_epi32 (int __Z, int __Y, int __X, int __W) + { + union { + int __a[4]; + __m128i __v; + } __u; + + __u.__a[0] = __W; + __u.__a[1] = __X; + __u.__a[2] = __Y; + __u.__a[3] = __Z; + + return __u.__v; + } + + #ifdef __x86_64__ + /* Create the vector [Z Y]. */ + static __inline __m128i + _mm_set_epi64x (long long __Z, long long __Y) + { + union { + long __a[2]; + __m128i __v; + } __u; + + __u.__a[0] = __Y; + __u.__a[1] = __Z; + + return __u.__v; + } + #endif + + /* Create the vector [S T U V Z Y X W]. */ + static __inline __m128i + _mm_set_epi16 (short __Z, short __Y, short __X, short __W, + short __V, short __U, short __T, short __S) + { + union { + short __a[8]; + __m128i __v; + } __u; + + __u.__a[0] = __S; + __u.__a[1] = __T; + __u.__a[2] = __U; + __u.__a[3] = __V; + __u.__a[4] = __W; + __u.__a[5] = __X; + __u.__a[6] = __Y; + __u.__a[7] = __Z; + + return __u.__v; + } + + /* Create the vector [S T U V Z Y X W]. */ + static __inline __m128i + _mm_set_epi8 (char __Z, char __Y, char __X, char __W, + char __V, char __U, char __T, char __S, + char __Z1, char __Y1, char __X1, char __W1, + char __V1, char __U1, char __T1, char __S1) + { + union { + char __a[16]; + __m128i __v; + } __u; + + __u.__a[0] = __S1; + __u.__a[1] = __T1; + __u.__a[2] = __U1; + __u.__a[3] = __V1; + __u.__a[4] = __W1; + __u.__a[5] = __X1; + __u.__a[6] = __Y1; + __u.__a[7] = __Z1; + __u.__a[8] = __S; + __u.__a[9] = __T; + __u.__a[10] = __U; + __u.__a[11] = __V; + __u.__a[12] = __W; + __u.__a[13] = __X; + __u.__a[14] = __Y; + __u.__a[15] = __Z; + + return __u.__v; + } + + static __inline __m128i + _mm_set1_epi64 (__m64 __A) + { + __v2di __tmp = (__v2di)__builtin_ia32_movq2dq ((unsigned long long)__A); + return (__m128i)__builtin_ia32_punpcklqdq128 (__tmp, __tmp); + } + + static __inline __m128i + _mm_set1_epi32 (int __A) + { + __v4si __tmp = (__v4si)__builtin_ia32_loadd (&__A); + return (__m128i) __builtin_ia32_pshufd ((__v4si)__tmp, _MM_SHUFFLE (0,0,0,0)); + } + + #ifdef __x86_64__ + static __inline __m128i + _mm_set1_epi64x (long long __A) + { + __v2di __tmp = (__v2di)__builtin_ia32_movq2dq ((unsigned long long)__A); + return (__m128i) __builtin_ia32_shufpd ((__v2df)__tmp, (__v2df)__tmp, _MM_SHUFFLE2 (0,0)); + } + #endif + + static __inline __m128i + _mm_set1_epi16 (short __A) + { + int __Acopy = (unsigned short)__A; + __v4si __tmp = (__v4si)__builtin_ia32_loadd (&__Acopy); + __tmp = (__v4si)__builtin_ia32_punpcklwd128 ((__v8hi)__tmp, (__v8hi)__tmp); + return (__m128i) __builtin_ia32_pshufd ((__v4si)__tmp, _MM_SHUFFLE (0,0,0,0)); + } + + static __inline __m128i + _mm_set1_epi8 (char __A) + { + int __Acopy = (unsigned char)__A; + __v4si __tmp = (__v4si)__builtin_ia32_loadd (&__Acopy); + __tmp = (__v4si)__builtin_ia32_punpcklbw128 ((__v16qi)__tmp, (__v16qi)__tmp); + __tmp = (__v4si)__builtin_ia32_punpcklbw128 ((__v16qi)__tmp, (__v16qi)__tmp); + return (__m128i) __builtin_ia32_pshufd ((__v4si)__tmp, _MM_SHUFFLE (0,0,0,0)); + } + + static __inline __m128i + _mm_setr_epi64 (__m64 __A, __m64 __B) + { + __v2di __tmp = (__v2di)__builtin_ia32_movq2dq ((unsigned long long)__A); + __v2di __tmp2 = (__v2di)__builtin_ia32_movq2dq ((unsigned long long)__B); + return (__m128i)__builtin_ia32_punpcklqdq128 (__tmp, __tmp2); + } + + /* Create the vector [Z Y X W]. */ + static __inline __m128i + _mm_setr_epi32 (int __W, int __X, int __Y, int __Z) + { + union { + int __a[4]; + __m128i __v; + } __u; + + __u.__a[0] = __W; + __u.__a[1] = __X; + __u.__a[2] = __Y; + __u.__a[3] = __Z; + + return __u.__v; + } + /* Create the vector [S T U V Z Y X W]. */ + static __inline __m128i + _mm_setr_epi16 (short __S, short __T, short __U, short __V, + short __W, short __X, short __Y, short __Z) + { + union { + short __a[8]; + __m128i __v; + } __u; + + __u.__a[0] = __S; + __u.__a[1] = __T; + __u.__a[2] = __U; + __u.__a[3] = __V; + __u.__a[4] = __W; + __u.__a[5] = __X; + __u.__a[6] = __Y; + __u.__a[7] = __Z; + + return __u.__v; + } + + /* Create the vector [S T U V Z Y X W]. */ + static __inline __m128i + _mm_setr_epi8 (char __S1, char __T1, char __U1, char __V1, + char __W1, char __X1, char __Y1, char __Z1, + char __S, char __T, char __U, char __V, + char __W, char __X, char __Y, char __Z) + { + union { + char __a[16]; + __m128i __v; + } __u; + + __u.__a[0] = __S1; + __u.__a[1] = __T1; + __u.__a[2] = __U1; + __u.__a[3] = __V1; + __u.__a[4] = __W1; + __u.__a[5] = __X1; + __u.__a[6] = __Y1; + __u.__a[7] = __Z1; + __u.__a[8] = __S; + __u.__a[9] = __T; + __u.__a[10] = __U; + __u.__a[11] = __V; + __u.__a[12] = __W; + __u.__a[13] = __X; + __u.__a[14] = __Y; + __u.__a[15] = __Z; + + return __u.__v; + } + + static __inline __m128d + _mm_cvtepi32_pd (__m128i __A) + { + return (__m128d)__builtin_ia32_cvtdq2pd ((__v4si) __A); + } + + static __inline __m128 + _mm_cvtepi32_ps (__m128i __A) + { + return (__m128)__builtin_ia32_cvtdq2ps ((__v4si) __A); + } + + static __inline __m128i + _mm_cvtpd_epi32 (__m128d __A) + { + return (__m128i)__builtin_ia32_cvtpd2dq ((__v2df) __A); + } + + static __inline __m64 + _mm_cvtpd_pi32 (__m128d __A) + { + return (__m64)__builtin_ia32_cvtpd2pi ((__v2df) __A); + } + + static __inline __m128 + _mm_cvtpd_ps (__m128d __A) + { + return (__m128)__builtin_ia32_cvtpd2ps ((__v2df) __A); + } + + static __inline __m128i + _mm_cvttpd_epi32 (__m128d __A) + { + return (__m128i)__builtin_ia32_cvttpd2dq ((__v2df) __A); + } + + static __inline __m64 + _mm_cvttpd_pi32 (__m128d __A) + { + return (__m64)__builtin_ia32_cvttpd2pi ((__v2df) __A); + } + + static __inline __m128d + _mm_cvtpi32_pd (__m64 __A) + { + return (__m128d)__builtin_ia32_cvtpi2pd ((__v2si) __A); + } + + static __inline __m128i + _mm_cvtps_epi32 (__m128 __A) + { + return (__m128i)__builtin_ia32_cvtps2dq ((__v4sf) __A); + } + + static __inline __m128i + _mm_cvttps_epi32 (__m128 __A) + { + return (__m128i)__builtin_ia32_cvttps2dq ((__v4sf) __A); + } + + static __inline __m128d + _mm_cvtps_pd (__m128 __A) + { + return (__m128d)__builtin_ia32_cvtps2pd ((__v4sf) __A); + } + + static __inline int + _mm_cvtsd_si32 (__m128d __A) + { + return __builtin_ia32_cvtsd2si ((__v2df) __A); + } + + #ifdef __x86_64__ + static __inline long long + _mm_cvtsd_si64x (__m128d __A) + { + return __builtin_ia32_cvtsd2si64 ((__v2df) __A); + } + #endif + + static __inline int + _mm_cvttsd_si32 (__m128d __A) + { + return __builtin_ia32_cvttsd2si ((__v2df) __A); + } + + #ifdef __x86_64__ + static __inline long long + _mm_cvttsd_si64x (__m128d __A) + { + return __builtin_ia32_cvttsd2si64 ((__v2df) __A); + } + #endif + + static __inline __m128 + _mm_cvtsd_ss (__m128 __A, __m128d __B) + { + return (__m128)__builtin_ia32_cvtsd2ss ((__v4sf) __A, (__v2df) __B); + } + + static __inline __m128d + _mm_cvtsi32_sd (__m128d __A, int __B) + { + return (__m128d)__builtin_ia32_cvtsi2sd ((__v2df) __A, __B); + } + + #ifdef __x86_64__ + static __inline __m128d + _mm_cvtsi64x_sd (__m128d __A, long long __B) + { + return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); + } + #endif + + static __inline __m128d + _mm_cvtss_sd (__m128d __A, __m128 __B) + { + return (__m128d)__builtin_ia32_cvtss2sd ((__v2df) __A, (__v4sf)__B); + } + + #define _mm_shuffle_pd(__A, __B, __C) ((__m128d)__builtin_ia32_shufpd ((__v2df)__A, (__v2df)__B, (__C))) + + static __inline __m128d + _mm_unpackhi_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_unpckhpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_unpacklo_pd (__m128d __A, __m128d __B) + { + return (__m128d)__builtin_ia32_unpcklpd ((__v2df)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_loadh_pd (__m128d __A, double const *__B) + { + return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, (__v2si *)__B); + } + + static __inline void + _mm_storeh_pd (double *__A, __m128d __B) + { + __builtin_ia32_storehpd ((__v2si *)__A, (__v2df)__B); + } + + static __inline __m128d + _mm_loadl_pd (__m128d __A, double const *__B) + { + return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, (__v2si *)__B); + } + + static __inline void + _mm_storel_pd (double *__A, __m128d __B) + { + __builtin_ia32_storelpd ((__v2si *)__A, (__v2df)__B); + } + + static __inline int + _mm_movemask_pd (__m128d __A) + { + return __builtin_ia32_movmskpd ((__v2df)__A); + } + + static __inline __m128i + _mm_packs_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_packsswb128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_packs_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_packssdw128 ((__v4si)__A, (__v4si)__B); + } + + static __inline __m128i + _mm_packus_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_packuswb128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_unpackhi_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpckhbw128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_unpackhi_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpckhwd128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_unpackhi_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpckhdq128 ((__v4si)__A, (__v4si)__B); + } + + static __inline __m128i + _mm_unpackhi_epi64 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpckhqdq128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_unpacklo_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpcklbw128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_unpacklo_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpcklwd128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_unpacklo_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpckldq128 ((__v4si)__A, (__v4si)__B); + } + + static __inline __m128i + _mm_unpacklo_epi64 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_punpcklqdq128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_add_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_add_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_add_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddd128 ((__v4si)__A, (__v4si)__B); + } + + static __inline __m128i + _mm_add_epi64 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddq128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_adds_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddsb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_adds_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddsw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_adds_epu8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddusb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_adds_epu16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_paddusw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_sub_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_sub_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_sub_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubd128 ((__v4si)__A, (__v4si)__B); + } + + static __inline __m128i + _mm_sub_epi64 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubq128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_subs_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubsb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_subs_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubsw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_subs_epu8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubusb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_subs_epu16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psubusw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_madd_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pmaddwd128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_mulhi_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pmulhw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_mullo_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pmullw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m64 + _mm_mul_su32 (__m64 __A, __m64 __B) + { + return (__m64)__builtin_ia32_pmuludq ((__v2si)__A, (__v2si)__B); + } + + static __inline __m128i + _mm_mul_epu32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pmuludq128 ((__v4si)__A, (__v4si)__B); + } + + static __inline __m128i + _mm_sll_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psllw128 ((__v8hi)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_sll_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pslld128 ((__v4si)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_sll_epi64 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psllq128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_sra_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psraw128 ((__v8hi)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_sra_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psrad128 ((__v4si)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_srl_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psrlw128 ((__v8hi)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_srl_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psrld128 ((__v4si)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_srl_epi64 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psrlq128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_slli_epi16 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_psllwi128 ((__v8hi)__A, __B); + } + + static __inline __m128i + _mm_slli_epi32 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_pslldi128 ((__v4si)__A, __B); + } + + static __inline __m128i + _mm_slli_epi64 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_psllqi128 ((__v2di)__A, __B); + } + + static __inline __m128i + _mm_srai_epi16 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_psrawi128 ((__v8hi)__A, __B); + } + + static __inline __m128i + _mm_srai_epi32 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_psradi128 ((__v4si)__A, __B); + } + + #if 0 + static __m128i __attribute__((__always_inline__)) + _mm_srli_si128 (__m128i __A, const int __B) + { + return ((__m128i)__builtin_ia32_psrldqi128 (__A, __B)) + } + + static __m128i __attribute__((__always_inline__)) + _mm_srli_si128 (__m128i __A, const int __B) + { + return ((__m128i)__builtin_ia32_pslldqi128 (__A, __B)) + } + #endif + #define _mm_srli_si128(__A, __B) ((__m128i)__builtin_ia32_psrldqi128 (__A, __B)) + #define _mm_slli_si128(__A, __B) ((__m128i)__builtin_ia32_pslldqi128 (__A, __B)) + + static __inline __m128i + _mm_srli_epi16 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_psrlwi128 ((__v8hi)__A, __B); + } + + static __inline __m128i + _mm_srli_epi32 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_psrldi128 ((__v4si)__A, __B); + } + + static __inline __m128i + _mm_srli_epi64 (__m128i __A, int __B) + { + return (__m128i)__builtin_ia32_psrlqi128 ((__v2di)__A, __B); + } + + static __inline __m128i + _mm_and_si128 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pand128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_andnot_si128 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pandn128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_or_si128 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_por128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_xor_si128 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pxor128 ((__v2di)__A, (__v2di)__B); + } + + static __inline __m128i + _mm_cmpeq_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpeqb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_cmpeq_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpeqw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_cmpeq_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpeqd128 ((__v4si)__A, (__v4si)__B); + } + + static __inline __m128i + _mm_cmplt_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__B, (__v16qi)__A); + } + + static __inline __m128i + _mm_cmplt_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__B, (__v8hi)__A); + } + + static __inline __m128i + _mm_cmplt_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__B, (__v4si)__A); + } + + static __inline __m128i + _mm_cmpgt_epi8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_cmpgt_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_cmpgt_epi32 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__A, (__v4si)__B); + } + + #define _mm_extract_epi16(__A, __B) __builtin_ia32_pextrw128 ((__v8hi)__A, __B) + + #define _mm_insert_epi16(__A, __B, __C) ((__m128i)__builtin_ia32_pinsrw128 ((__v8hi)__A, __B, __C)) + + static __inline __m128i + _mm_max_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pmaxsw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_max_epu8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pmaxub128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_min_epi16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pminsw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_min_epu8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pminub128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline int + _mm_movemask_epi8 (__m128i __A) + { + return __builtin_ia32_pmovmskb128 ((__v16qi)__A); + } + + static __inline __m128i + _mm_mulhi_epu16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pmulhuw128 ((__v8hi)__A, (__v8hi)__B); + } + + #define _mm_shufflehi_epi16(__A, __B) ((__m128i)__builtin_ia32_pshufhw ((__v8hi)__A, __B)) + #define _mm_shufflelo_epi16(__A, __B) ((__m128i)__builtin_ia32_pshuflw ((__v8hi)__A, __B)) + #define _mm_shuffle_epi32(__A, __B) ((__m128i)__builtin_ia32_pshufd ((__v4si)__A, __B)) + + static __inline void + _mm_maskmoveu_si128 (__m128i __A, __m128i __B, char *__C) + { + __builtin_ia32_maskmovdqu ((__v16qi)__A, (__v16qi)__B, __C); + } + + static __inline __m128i + _mm_avg_epu8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pavgb128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline __m128i + _mm_avg_epu16 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_pavgw128 ((__v8hi)__A, (__v8hi)__B); + } + + static __inline __m128i + _mm_sad_epu8 (__m128i __A, __m128i __B) + { + return (__m128i)__builtin_ia32_psadbw128 ((__v16qi)__A, (__v16qi)__B); + } + + static __inline void + _mm_stream_si32 (int *__A, int __B) + { + __builtin_ia32_movnti (__A, __B); + } + + static __inline void + _mm_stream_si128 (__m128i *__A, __m128i __B) + { + __builtin_ia32_movntdq ((__v2di *)__A, (__v2di)__B); + } + + static __inline void + _mm_stream_pd (double *__A, __m128d __B) + { + __builtin_ia32_movntpd (__A, (__v2df)__B); + } + + static __inline __m128i + _mm_movpi64_epi64 (__m64 __A) + { + return (__m128i)__builtin_ia32_movq2dq ((unsigned long long)__A); + } + + static __inline void + _mm_clflush (void const *__A) + { + return __builtin_ia32_clflush (__A); + } + + static __inline void + _mm_lfence (void) + { + __builtin_ia32_lfence (); + } + + static __inline void + _mm_mfence (void) + { + __builtin_ia32_mfence (); + } + + static __inline __m128i + _mm_cvtsi32_si128 (int __A) + { + return (__m128i) __builtin_ia32_loadd (&__A); + } + + #ifdef __x86_64__ + static __inline __m128i + _mm_cvtsi64x_si128 (long long __A) + { + return (__m128i) __builtin_ia32_movq2dq (__A); + } + #endif + + static __inline int + _mm_cvtsi128_si32 (__m128i __A) + { + int __tmp; + __builtin_ia32_stored (&__tmp, (__v4si)__A); + return __tmp; + } + + #ifdef __x86_64__ + static __inline long long + _mm_cvtsi128_si64x (__m128i __A) + { + return __builtin_ia32_movdq2q ((__v2di)__A); + } + #endif + + #endif /* __SSE2__ */ + + #endif /* __SSE__ */ #endif /* _XMMINTRIN_H_INCLUDED */ diff -Nrc3pad gcc-3.2.3/gcc/config/i386/xm-vsta.h gcc-3.3/gcc/config/i386/xm-vsta.h *** gcc-3.2.3/gcc/config/i386/xm-vsta.h 1998-12-16 21:05:29.000000000 +0000 --- gcc-3.3/gcc/config/i386/xm-vsta.h 2002-06-05 17:01:31.000000000 +0000 *************** *** 1,2 **** --- 1,11 ---- /* Use semicolons to separate elements of a path. */ #define PATH_SEPARATOR ';' + + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("unix"); \ + } \ + while (0) + + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" diff -Nrc3pad gcc-3.2.3/gcc/config/i860/bsd-gas.h gcc-3.3/gcc/config/i860/bsd-gas.h *** gcc-3.2.3/gcc/config/i860/bsd-gas.h 2000-09-25 09:32:58.000000000 +0000 --- gcc-3.3/gcc/config/i860/bsd-gas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2 **** - #undef ASCII_DATA_ASM_OP - #define ASCII_DATA_ASM_OP "\t.ascii\t" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/bsd.h gcc-3.3/gcc/config/i860/bsd.h *** gcc-3.2.3/gcc/config/i860/bsd.h 2001-12-16 15:43:41.000000000 +0000 --- gcc-3.3/gcc/config/i860/bsd.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,44 **** - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (i860, BSD)") - - /* BSD UN*X systems use BSD STABS debugging info. */ - - #define DBX_DEBUGGING_INFO - - #define ASCII_DATA_ASM_OP "\t.byte\t" - #define ASM_OUTPUT_ASCII(f, p, size) \ - do { register size_t i, limit = (size); \ - int inside; \ - inside = FALSE; \ - for (i = 0; i < limit; i++) { \ - if (i % 64 == 0) { \ - if (i != 0) { \ - if (inside) \ - putc('"', (f)); \ - putc('\n', (f)); \ - inside = FALSE; \ - } \ - fprintf((f), "%s", ASCII_DATA_ASM_OP); \ - } \ - if ((p)[i] < 32 || (p)[i] == '\\' || (p)[i] == '"' || (p)[i] >= 127) { \ - if (inside) { \ - putc('"', (f)); \ - inside = FALSE; \ - } \ - if (i % 64 != 0) \ - putc(',', (f)); \ - fprintf((f), "%d", (p)[i]); \ - } else { \ - if (!inside) { \ - if (i % 64 != 0) \ - putc(',', (f)); \ - putc('"', (f)); \ - inside = TRUE; \ - } \ - putc((p)[i], (f)); \ - } \ - } \ - if (inside) \ - putc('"', (f)); \ - putc('\n', (f)); \ - } while (0) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/fx2800.h gcc-3.3/gcc/config/i860/fx2800.h *** gcc-3.2.3/gcc/config/i860/fx2800.h 2001-12-20 17:36:35.000000000 +0000 --- gcc-3.3/gcc/config/i860/fx2800.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,345 **** - /* Target definitions for GNU compiler for Alliant FX/2800 - running Concentrix 2.2 - Copyright (C) 1991, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. - Contributed by Howard Chu (hyc@hanauma.jpl.nasa.gov). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* The Alliant fx2800 running Concentrix 2.x is weird. This is basically - a BSD 4.3 based operating system, but it uses svr4 ELF format object - files and it somehow puts BSD stabs records into the ELF files for - symbolic debug information. The assembler is "mostly an SVR4 assembler - with some Alliant additions. We based it on the `Intel 80860 Assembly - Language Specification' from AT&T." */ - - /* This file consists of three sections. The first section establishes - definitions unique to the Alliant FX/2800. The next section reconciles - differences between Alliant and i860v4.h, and the last overrides the - remaining differences with svr4.h */ - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (i860 Alliant)"); - - /* atexit is not present prior to Concentrix 2.2. Uncomment the following - if you're on 2.1 or older. */ - - /* #define NEED_ATEXIT */ - - #define I860_STRICT_ABI_PROLOGUES - - /* There is no avoiding this; -L does not exist at all (in Concentrix 2.2). */ - #define LINK_LIBGCC_SPECIAL 1 - - /* Most of the Alliant-specific definitions here are to get stab info that - Alliant's dbx can understand. */ - - #define DBX_DEBUGGING_INFO - #define DEFAULT_GDB_EXTENSIONS 0 - #define DBX_NO_XREFS - #define DBX_NO_EXTRA_TAGS - - /* Alliant dbx also needs to see the function stab before anything - else in the function. */ - - #define DBX_FUNCTION_FIRST - #define DBX_LBRAC_FIRST - - /* Alliant dbx also needs to see the end of a function somewhere. */ - - #define DBX_OUTPUT_FUNCTION_END(file,decl) \ - fprintf (file, ".stab \"\",.,0x%x,0,0\n", N_EFUN) - - /* Alliant dbx has predefined types, so they must be emitted with the - proper type numbers. The defined types are: - - Type # C, Fortran, Pascal Types - -- ------------------------ - 1 char, integer*1 - 2 short, integer*2 - 3 int, long, integer*4, integer - 4 logical*1, byte - 5 logical*2 - 6 logical*4, logical - 7 float, real*4, real - 8 double, real*8, double - 9 single complex, complex*8, complex - 10 double complex, doublecomplex - 11 character - 12 void - 13 nil - 14 boolean - 15 unsigned char, ubyte - 16 unsigned short, uword - 17 unsigned, unsigned int, unsigned long, ulong - 18 quad, logical*8 - 19 long long, integer*8 - 20 unsigned long long, uquad*8 - 21-100 reserved for future predefined types - 100 long redefine same as 3 - 101 unsigned long same as 17 - -- -------------------- - 102 First user program type - - Since long and unsigned long are int references, they must be handled - as special cases. The Alliant compiler doesn't use types 18-20, so it - sets long & unsigned long in 18 & 19, not in 100 & 101 as shown above. */ - - #define DBX_OUTPUT_STANDARD_TYPES(syms) \ - { static const char *const dtyps[] = { \ - "", "char", "short int", "int", "logical*1", \ - "logical*2", "logical*4", "float", "double", "complex", \ - "doublecomplex", "character", "void", "nil", "boolean", \ - "unsigned char", "short unsigned int", "unsigned int", \ - "logical*8", "long long int", "long long unsigned int",""}; \ - \ - tree decl; \ - int i; \ - \ - for (i=1;*dtyps[i];i++) \ - for (decl = syms; decl; decl = TREE_CHAIN(decl)) \ - if ((TREE_CODE (decl) == TYPE_DECL) && DECL_NAME(decl) && \ - !strcmp(IDENTIFIER_POINTER(DECL_NAME(decl)), dtyps[i])) { \ - TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = i; \ - typevec[i] = TYPE_DEFINED; \ - dbxout_symbol (decl, 0); \ - break; \ - } \ - \ - for (decl = syms; decl; decl = TREE_CHAIN(decl)) \ - if ((TREE_CODE (decl) == TYPE_DECL) && DECL_NAME(decl) && \ - !strcmp(IDENTIFIER_POINTER(DECL_NAME(decl)),"long int")) { \ - TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = i; \ - typevec[i] = TYPE_DEFINED; \ - fprintf(asmfile,".stab \"long int:t%d=3\",0,0x%x,0,0\n", \ - i++,N_LSYM); \ - TREE_ASM_WRITTEN (decl) = 1; \ - break; \ - } \ - \ - for (decl = syms; decl; decl = TREE_CHAIN(decl)) \ - if ((TREE_CODE (decl) == TYPE_DECL) && DECL_NAME(decl) && !strcmp( \ - IDENTIFIER_POINTER(DECL_NAME(decl)),"long unsigned int")) { \ - TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = i; \ - typevec[i] = TYPE_DEFINED; \ - fprintf(asmfile,".stab \"long unsigned int:t%d=17\",0,0x%x,0,0\n",\ - i++,N_LSYM); \ - TREE_ASM_WRITTEN (decl) = 1; \ - break; \ - } \ - next_type_number = i; }; - - /* Alliant dbx doesn't understand split names... */ - - #define DBX_CONTIN_LENGTH 0 - - /* The syntax for stabs records is also different; there is only a single - ".stab" directive instead of the 3 directives in BSD, and the order of - arguments is slightly changed. */ - - #define ASM_STABS_OP "\t.stab " - #define ASM_STABN_OP "\t.stab " - #define ASM_STABD_OP "\t.stab " - - #define DBX_MEMPARM_STABS_LETTER 'k' - #define DBX_REGPARM_STABS_LETTER 'r' - - #undef ASM_OUTPUT_SOURCE_LINE - #define ASM_OUTPUT_SOURCE_LINE(file,num) \ - fprintf (file, "\t.stab \"\",.,0x%x,0,%d\n", \ - N_SLINE,num) - - #if 0 /* Alliant dbx only reads first N_SO, so it - ignores the filename if dir is present. */ - #define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(file,name) \ - fprintf (file, ".stab \"%s/\",.Ltext0,0x%x,0,0\n", \ - name, N_SO) - #else - #define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(file,name) - #endif - - #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(file,name) \ - fprintf (file, ".stab "); \ - output_quoted_string (file, name); \ - fprintf (file, ",.Ltext0,0x%x,0,0\n", N_SO); \ - text_section (); \ - ASM_OUTPUT_INTERNAL_LABEL (file, "Ltext", 0) - - #define DBX_OUTPUT_SOURCE_FILENAME(file,name) \ - do { fprintf (file, ".stab "); \ - output_quoted_string (file, name); \ - fprintf (file, ",.Ltext0,0x%x,0,0\n", N_SOL); \ - } while (0) - - #define DBX_OUTPUT_CONSTANT_SYMBOL(file,name,ival) \ - fprintf (file, ".stab \"%s:c=i%d\",0,0x%x,0,0\n", \ - name, ival, N_LSYM) - - #define DBX_FINISH_SYMBOL(decl) \ - int line = 0; \ - fprintf (asmfile, "\","); \ - if (current_sym_addr) \ - output_addr_const (asmfile, current_sym_addr); \ - else \ - fprintf (asmfile, "%d", current_sym_value); \ - if (decl != 0 && TREE_CODE(decl) == FUNCTION_DECL) \ - line=DECL_SOURCE_LINE (decl); \ - fprintf (asmfile, ",0x%x,%d,%d\n", current_sym_code, \ - line!=0?64:0,line) - - #define DBX_OUTPUT_CATCH(file,decl,name) \ - fprintf (file, ".stab \"%s:C1\",", \ - IDENTIFIER_POINTER (DECL_NAME (decl))); \ - assemble_name (file, name); \ - fprintf (file, ",0x%x,0,0\n", N_CATCH) - - #define DBX_OUTPUT_LBRAC(file,name) \ - if (depth > 1) { \ - fprintf (file, ".stab \"\","); \ - assemble_name (file, name); \ - fprintf (file, ",0x%x,0,%d\n", N_LBRAC, depth); } - - #define DBX_OUTPUT_RBRAC(file,name) \ - if (depth > 1) { \ - fprintf (file, ".stab \"\","); \ - assemble_name (file, name); \ - fprintf (file, ",0x%x,0,%d\n", N_RBRAC, depth); } - - #define DBX_OUTPUT_ENUM(file,type) \ - fprintf (file, "e3"); \ - CHARS(2); \ - for (tem = TYPE_VALUES (type); tem; tem = TREE_CHAIN (tem)) \ - { \ - fprintf (asmfile, "%s:%d,", \ - IDENTIFIER_POINTER (TREE_PURPOSE (tem)), \ - TREE_INT_CST_LOW (TREE_VALUE (tem))); \ - CHARS (11 + IDENTIFIER_LENGTH (TREE_PURPOSE (tem))); \ - if (TREE_CHAIN (tem) != 0) \ - CONTIN; \ - } \ - putc (';', asmfile); \ - CHARS (1); - - /* Undefine some things defined in i860.h because the native C compiler - on the FX/2800 emits code to do these operations inline. For GCC, - we will use the default implementation of these things... i.e. - generating calls to libgcc routines. */ - - #undef DIVSI3_LIBCALL - #undef UDIVSI3_LIBCALL - #undef REMSI3_LIBCALL - #undef UREMSI3_LIBCALL - - /* Global pointer needs to be 8 byte aligned? Link error if not... */ - - #define DATA_ALIGNMENT(dummy,align) \ - ((TREE_PUBLIC (decl) && \ - (POINTER_TYPE_P (TREE_TYPE (decl)))) ? 64: align) - - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\tcall __mcount_\n\tnop\n") - - /* Overrides for i860v4.h begin here */ - - /* Provide a set of pre-definitions and pre-assertions appropriate for - the i860 running Concentrix 2.x. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Di860 -Dunix -DBSD4_3 -Dalliant -Asystem=unix -Asystem=bsd -Acpu=i860 -Amachine=i860" - - #undef I860_REG_PREFIX - #undef ASM_COMMENT_START - #define ASM_COMMENT_START "//" - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) - #undef ASM_OUTPUT_FUNCTION_PREFIX - #define ASM_OUTPUT_FUNCTION_PREFIX(FILE,NAME) \ - fputs("\tnop\n", (FILE)); \ - current_function_original_name = (NAME) - #undef ASM_OUTPUT_PROLOGUE_SUFFIX - - /* Overrides for svr4.h begin here */ - - #undef SWITCH_TAKES_ARG - #undef WORD_SWITCH_TAKES_ARG - - #undef ASM_SPEC - #undef ASM_FINAL_SPEC - #undef MD_STARTFILE_PREFIX - #undef MD_EXEC_PREFIX - - /* Generate an error message if -p option is selected. Concentrix 2.x - does not support prof format profiling, only gprof is supported. */ - - #define CPP_SPEC "%{p:%e-p option not supported: use -pg instead}" - - /* Provide an appropriate LIB_SPEC. The crtend.o file provides part of the - support for getting C++ file-scope static objects constructed before - entering `main'. */ - - #undef LIB_SPEC - #define LIB_SPEC \ - "%{g*:-lg} %{!pg:-lc}%{pg:-lc_p} crtend.o%s" - - /* Tell linker to strip local symbols, since assembler may not. */ - - #undef LINK_SPEC - #define LINK_SPEC "-X" - - /* Get the correct startup file for regular or profiled code. Also - use the crtbegin.o file for C++ ... */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{!pg:crt0.o%s}%{pg:gcrt0.o%s} crtbegin.o%s" - - #undef SCCS_DIRECTIVE - #undef NO_DOLLAR_IN_LABEL - #undef TARGET_MEM_FUNCTIONS - - #undef DWARF_DEBUGGING_INFO - - /* The prefix to add to user-visible assembler symbols. */ - - #undef USER_LABEL_PREFIX - #define USER_LABEL_PREFIX "_" - - #undef ASM_OUTPUT_EXTERNAL_LIBCALL - - /* ??? Is this used anywhere? */ - #undef BSS_ASM_OP - #define BSS_ASM_OP "\t.lcomm " - - #undef ASM_FILE_END - #define ASM_FILE_END(FILE) \ - do { \ - if (current_function_original_name != NULL) { \ - const char *long_op = integer_asm_op (4, FALSE); \ - tdesc_section(); \ - fprintf ((FILE), "%s __ETEXT\n", long_op); \ - fprintf ((FILE), "%s 0\n", long_op); \ - fputs ("\t.long\t__ETEXT\n", (FILE)); \ - fputs ("\t.long\t0\n", (FILE)); \ - text_section(); \ - fputs("__ETEXT:\n", (FILE)); \ - } \ - if (!flag_no_ident) \ - fprintf ((FILE), "\t.ident\t\"GCC: (GNU) %s\"\n", \ - version_string); \ - } while (0) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/i860.c gcc-3.3/gcc/config/i860/i860.c *** gcc-3.2.3/gcc/config/i860/i860.c 2002-03-22 19:25:49.000000000 +0000 --- gcc-3.3/gcc/config/i860/i860.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2364 **** - /* Subroutines for insn-output.c for Intel 860 - Copyright (C) 1989, 1991, 1997, 1998, 1999, 2000, 2001, 2002 - Free Software Foundation, Inc. - Derived from sparc.c. - - Written by Richard Stallman (rms@ai.mit.edu). - - Hacked substantially by Ron Guilmette (rfg@netcom.com) to cater - to the whims of the System V Release 4 assembler. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #include "config.h" - #include "system.h" - #include "flags.h" - #include "rtl.h" - #include "tree.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "real.h" - #include "insn-config.h" - #include "conditions.h" - #include "output.h" - #include "recog.h" - #include "insn-attr.h" - #include "function.h" - #include "expr.h" - #include "tm_p.h" - #include "target.h" - #include "target-def.h" - - static rtx find_addr_reg PARAMS ((rtx)); - static int reg_clobbered_p PARAMS ((rtx, rtx)); - static const char *singlemove_string PARAMS ((rtx *)); - static const char *load_opcode PARAMS ((enum machine_mode, const char *, rtx)); - static const char *store_opcode PARAMS ((enum machine_mode, const char *, rtx)); - static void output_size_for_block_move PARAMS ((rtx, rtx, rtx)); - static void i860_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - static void i860_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); - - #ifndef I860_REG_PREFIX - #define I860_REG_PREFIX "" - #endif - - const char *i860_reg_prefix = I860_REG_PREFIX; - - /* Save information from a "cmpxx" operation until the branch is emitted. */ - - rtx i860_compare_op0, i860_compare_op1; - - /* Initialize the GCC target structure. */ - #undef TARGET_ASM_FUNCTION_PROLOGUE - #define TARGET_ASM_FUNCTION_PROLOGUE i860_output_function_prologue - #undef TARGET_ASM_FUNCTION_EPILOGUE - #define TARGET_ASM_FUNCTION_EPILOGUE i860_output_function_epilogue - - struct gcc_target targetm = TARGET_INITIALIZER; - - /* Return non-zero if this pattern, can be evaluated safely, even if it - was not asked for. */ - int - safe_insn_src_p (op, mode) - rtx op; - enum machine_mode mode; - { - /* Just experimenting. */ - - /* No floating point src is safe if it contains an arithmetic - operation, since that operation may trap. */ - switch (GET_CODE (op)) - { - case CONST_INT: - case LABEL_REF: - case SYMBOL_REF: - case CONST: - return 1; - - case REG: - return 1; - - case MEM: - return CONSTANT_ADDRESS_P (XEXP (op, 0)); - - /* We never need to negate or complement constants. */ - case NEG: - return (mode != SFmode && mode != DFmode); - case NOT: - case ZERO_EXTEND: - return 1; - - case EQ: - case NE: - case LT: - case GT: - case LE: - case GE: - case LTU: - case GTU: - case LEU: - case GEU: - case MINUS: - case PLUS: - return (mode != SFmode && mode != DFmode); - case AND: - case IOR: - case XOR: - case ASHIFT: - case ASHIFTRT: - case LSHIFTRT: - if ((GET_CODE (XEXP (op, 0)) == CONST_INT && ! SMALL_INT (XEXP (op, 0))) - || (GET_CODE (XEXP (op, 1)) == CONST_INT && ! SMALL_INT (XEXP (op, 1)))) - return 0; - return 1; - - default: - return 0; - } - } - - /* Return 1 if REG is clobbered in IN. - Return 2 if REG is used in IN. - Return 3 if REG is both used and clobbered in IN. - Return 0 if neither. */ - - static int - reg_clobbered_p (reg, in) - rtx reg; - rtx in; - { - register enum rtx_code code; - - if (in == 0) - return 0; - - code = GET_CODE (in); - - if (code == SET || code == CLOBBER) - { - rtx dest = SET_DEST (in); - int set = 0; - int used = 0; - - while (GET_CODE (dest) == STRICT_LOW_PART - || GET_CODE (dest) == SUBREG - || GET_CODE (dest) == SIGN_EXTRACT - || GET_CODE (dest) == ZERO_EXTRACT) - dest = XEXP (dest, 0); - - if (dest == reg) - set = 1; - else if (GET_CODE (dest) == REG - && refers_to_regno_p (REGNO (reg), - REGNO (reg) + HARD_REGNO_NREGS (reg, GET_MODE (reg)), - SET_DEST (in), 0)) - { - set = 1; - /* Anything that sets just part of the register - is considered using as well as setting it. - But note that a straight SUBREG of a single-word value - clobbers the entire value. */ - if (dest != SET_DEST (in) - && ! (GET_CODE (SET_DEST (in)) == SUBREG - || UNITS_PER_WORD >= GET_MODE_SIZE (GET_MODE (dest)))) - used = 1; - } - - if (code == SET) - { - if (set) - used = refers_to_regno_p (REGNO (reg), - REGNO (reg) + HARD_REGNO_NREGS (reg, GET_MODE (reg)), - SET_SRC (in), 0); - else - used = refers_to_regno_p (REGNO (reg), - REGNO (reg) + HARD_REGNO_NREGS (reg, GET_MODE (reg)), - in, 0); - } - - return set + used * 2; - } - - if (refers_to_regno_p (REGNO (reg), - REGNO (reg) + HARD_REGNO_NREGS (reg, GET_MODE (reg)), - in, 0)) - return 2; - return 0; - } - - /* Return non-zero if OP can be written to without screwing up - GCC's model of what's going on. It is assumed that this operand - appears in the dest position of a SET insn in a conditional - branch's delay slot. AFTER is the label to start looking from. */ - int - operand_clobbered_before_used_after (op, after) - rtx op; - rtx after; - { - /* Just experimenting. */ - if (GET_CODE (op) == CC0) - return 1; - if (GET_CODE (op) == REG) - { - rtx insn; - - if (op == stack_pointer_rtx) - return 0; - - /* Scan forward from the label, to see if the value of OP - is clobbered before the first use. */ - - for (insn = NEXT_INSN (after); insn; insn = NEXT_INSN (insn)) - { - if (GET_CODE (insn) == NOTE) - continue; - if (GET_CODE (insn) == INSN - || GET_CODE (insn) == JUMP_INSN - || GET_CODE (insn) == CALL_INSN) - { - switch (reg_clobbered_p (op, PATTERN (insn))) - { - default: - return 0; - case 1: - return 1; - case 0: - break; - } - } - /* If we reach another label without clobbering OP, - then we cannot safely write it here. */ - else if (GET_CODE (insn) == CODE_LABEL) - return 0; - if (GET_CODE (insn) == JUMP_INSN) - { - if (condjump_p (insn)) - return 0; - /* This is a jump insn which has already - been mangled. We can't tell what it does. */ - if (GET_CODE (PATTERN (insn)) == PARALLEL) - return 0; - if (! JUMP_LABEL (insn)) - return 0; - /* Keep following jumps. */ - insn = JUMP_LABEL (insn); - } - } - return 1; - } - - /* In both of these cases, the first insn executed - for this op will be a orh whatever%h,%?r0,%?r31, - which is tolerable. */ - if (GET_CODE (op) == MEM) - return (CONSTANT_ADDRESS_P (XEXP (op, 0))); - - return 0; - } - - /* Return non-zero if this pattern, as a source to a "SET", - is known to yield an instruction of unit size. */ - int - single_insn_src_p (op, mode) - rtx op; - enum machine_mode mode; - { - switch (GET_CODE (op)) - { - case CONST_INT: - /* This is not always a single insn src, technically, - but output_delayed_branch knows how to deal with it. */ - return 1; - - case SYMBOL_REF: - case CONST: - /* This is not a single insn src, technically, - but output_delayed_branch knows how to deal with it. */ - return 1; - - case REG: - return 1; - - case MEM: - return 1; - - /* We never need to negate or complement constants. */ - case NEG: - return (mode != DFmode); - case NOT: - case ZERO_EXTEND: - return 1; - - case PLUS: - case MINUS: - /* Detect cases that require multiple instructions. */ - if (CONSTANT_P (XEXP (op, 1)) - && !(GET_CODE (XEXP (op, 1)) == CONST_INT - && SMALL_INT (XEXP (op, 1)))) - return 0; - case EQ: - case NE: - case LT: - case GT: - case LE: - case GE: - case LTU: - case GTU: - case LEU: - case GEU: - /* Not doing floating point, since they probably - take longer than the branch slot they might fill. */ - return (mode != SFmode && mode != DFmode); - - case AND: - if (GET_CODE (XEXP (op, 1)) == NOT) - { - rtx arg = XEXP (XEXP (op, 1), 0); - if (CONSTANT_P (arg) - && !(GET_CODE (arg) == CONST_INT - && (SMALL_INT (arg) - || (INTVAL (arg) & 0xffff) == 0))) - return 0; - } - case IOR: - case XOR: - /* Both small and round numbers take one instruction; - others take two. */ - if (CONSTANT_P (XEXP (op, 1)) - && !(GET_CODE (XEXP (op, 1)) == CONST_INT - && (SMALL_INT (XEXP (op, 1)) - || (INTVAL (XEXP (op, 1)) & 0xffff) == 0))) - return 0; - - case ASHIFT: - case ASHIFTRT: - case LSHIFTRT: - return 1; - - case SUBREG: - if (SUBREG_BYTE (op) != 0) - return 0; - return single_insn_src_p (SUBREG_REG (op), mode); - - /* Not doing floating point, since they probably - take longer than the branch slot they might fill. */ - case FLOAT_EXTEND: - case FLOAT_TRUNCATE: - case FLOAT: - case FIX: - case UNSIGNED_FLOAT: - case UNSIGNED_FIX: - return 0; - - default: - return 0; - } - } - - /* Return non-zero only if OP is a register of mode MODE, - or const0_rtx. */ - int - reg_or_0_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (op == const0_rtx || register_operand (op, mode) - || op == CONST0_RTX (mode)); - } - - /* Return truth value of whether OP can be used as an operands in a three - address add/subtract insn (such as add %o1,7,%l2) of mode MODE. */ - - int - arith_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) - || (GET_CODE (op) == CONST_INT && SMALL_INT (op))); - } - - /* Return 1 if OP is a valid first operand for a logical insn of mode MODE. */ - - int - logic_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) - || (GET_CODE (op) == CONST_INT && LOGIC_INT (op))); - } - - /* Return 1 if OP is a valid first operand for a shift insn of mode MODE. */ - - int - shift_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) - || (GET_CODE (op) == CONST_INT)); - } - - /* Return 1 if OP is a valid first operand for either a logical insn - or an add insn of mode MODE. */ - - int - compare_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) - || (GET_CODE (op) == CONST_INT && SMALL_INT (op) && LOGIC_INT (op))); - } - - /* Return truth value of whether OP can be used as the 5-bit immediate - operand of a bte or btne insn. */ - - int - bte_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) - || (GET_CODE (op) == CONST_INT - && (unsigned) INTVAL (op) < 0x20)); - } - - /* Return 1 if OP is an indexed memory reference of mode MODE. */ - - int - indexed_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (GET_CODE (op) == MEM && GET_MODE (op) == mode - && GET_CODE (XEXP (op, 0)) == PLUS - && GET_MODE (XEXP (op, 0)) == SImode - && register_operand (XEXP (XEXP (op, 0), 0), SImode) - && register_operand (XEXP (XEXP (op, 0), 1), SImode)); - } - - /* Return 1 if OP is a suitable source operand for a load insn - with mode MODE. */ - - int - load_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (memory_operand (op, mode) || indexed_operand (op, mode)); - } - - /* Return truth value of whether OP is an integer which fits the - range constraining immediate operands in add/subtract insns. */ - - int - small_int (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - return (GET_CODE (op) == CONST_INT && SMALL_INT (op)); - } - - /* Return truth value of whether OP is an integer which fits the - range constraining immediate operands in logic insns. */ - - int - logic_int (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - return (GET_CODE (op) == CONST_INT && LOGIC_INT (op)); - } - - /* Test for a valid operand for a call instruction. - Don't allow the arg pointer register or virtual regs - since they may change into reg + const, which the patterns - can't handle yet. */ - - int - call_insn_operand (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - if (GET_CODE (op) == MEM - && (CONSTANT_ADDRESS_P (XEXP (op, 0)) - || (GET_CODE (XEXP (op, 0)) == REG - && XEXP (op, 0) != arg_pointer_rtx - && !(REGNO (XEXP (op, 0)) >= FIRST_PSEUDO_REGISTER - && REGNO (XEXP (op, 0)) <= LAST_VIRTUAL_REGISTER)))) - return 1; - return 0; - } - - /* Return the best assembler insn template - for moving operands[1] into operands[0] as a fullword. */ - - static const char * - singlemove_string (operands) - rtx *operands; - { - if (GET_CODE (operands[0]) == MEM) - { - if (GET_CODE (operands[1]) != MEM) - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && cc_prev_status.mdep == XEXP (operands[0], 0))) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h0,%?r0,%?r31", operands); - } - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[0], 0); - return "st.l %r1,%L0(%?r31)"; - } - else - return "st.l %r1,%0"; - else - abort (); - #if 0 - { - rtx xoperands[2]; - - cc_status.flags &= ~CC_F0_IS_0; - xoperands[0] = gen_rtx_REG (SFmode, 32); - xoperands[1] = operands[1]; - output_asm_insn (singlemove_string (xoperands), xoperands); - xoperands[1] = xoperands[0]; - xoperands[0] = operands[0]; - output_asm_insn (singlemove_string (xoperands), xoperands); - return ""; - } - #endif - } - if (GET_CODE (operands[1]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && cc_prev_status.mdep == XEXP (operands[1], 0))) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h1,%?r0,%?r31", operands); - } - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[1], 0); - return "ld.l %L1(%?r31),%0"; - } - return "ld.l %m1,%0"; - } - if (GET_CODE (operands[1]) == CONST_INT) - { - if (operands[1] == const0_rtx) - return "mov %?r0,%0"; - if((INTVAL (operands[1]) & 0xffff0000) == 0) - return "or %L1,%?r0,%0"; - if((INTVAL (operands[1]) & 0xffff8000) == 0xffff8000) - return "adds %1,%?r0,%0"; - if((INTVAL (operands[1]) & 0x0000ffff) == 0) - return "orh %H1,%?r0,%0"; - - return "orh %H1,%?r0,%0\n\tor %L1,%0,%0"; - } - return "mov %1,%0"; - } - - /* Output assembler code to perform a doubleword move insn - with operands OPERANDS. */ - - const char * - output_move_double (operands) - rtx *operands; - { - enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1; - rtx latehalf[2]; - rtx addreg0 = 0, addreg1 = 0; - int highest_first = 0; - int no_addreg1_decrement = 0; - - /* First classify both operands. */ - - if (REG_P (operands[0])) - optype0 = REGOP; - else if (offsettable_memref_p (operands[0])) - optype0 = OFFSOP; - else if (GET_CODE (operands[0]) == MEM) - optype0 = MEMOP; - else - optype0 = RNDOP; - - if (REG_P (operands[1])) - optype1 = REGOP; - else if (CONSTANT_P (operands[1])) - optype1 = CNSTOP; - else if (offsettable_memref_p (operands[1])) - optype1 = OFFSOP; - else if (GET_CODE (operands[1]) == MEM) - optype1 = MEMOP; - else - optype1 = RNDOP; - - /* Check for the cases that the operand constraints are not - supposed to allow to happen. Abort if we get one, - because generating code for these cases is painful. */ - - if (optype0 == RNDOP || optype1 == RNDOP) - abort (); - - /* If an operand is an unoffsettable memory ref, find a register - we can increment temporarily to make it refer to the second word. */ - - if (optype0 == MEMOP) - addreg0 = find_addr_reg (XEXP (operands[0], 0)); - - if (optype1 == MEMOP) - addreg1 = find_addr_reg (XEXP (operands[1], 0)); - - /* ??? Perhaps in some cases move double words - if there is a spare pair of floating regs. */ - - /* Ok, we can do one word at a time. - Normally we do the low-numbered word first, - but if either operand is autodecrementing then we - do the high-numbered word first. - - In either case, set up in LATEHALF the operands to use - for the high-numbered word and in some cases alter the - operands in OPERANDS to be suitable for the low-numbered word. */ - - if (optype0 == REGOP) - latehalf[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - else if (optype0 == OFFSOP) - latehalf[0] = adjust_address (operands[0], SImode, 4); - else - latehalf[0] = operands[0]; - - if (optype1 == REGOP) - latehalf[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - else if (optype1 == OFFSOP) - latehalf[1] = adjust_address (operands[1], SImode, 4); - else if (optype1 == CNSTOP) - { - if (GET_CODE (operands[1]) == CONST_DOUBLE) - split_double (operands[1], &operands[1], &latehalf[1]); - else if (CONSTANT_P (operands[1])) - latehalf[1] = const0_rtx; - } - else - latehalf[1] = operands[1]; - - /* If the first move would clobber the source of the second one, - do them in the other order. - - RMS says "This happens only for registers; - such overlap can't happen in memory unless the user explicitly - sets it up, and that is an undefined circumstance." - - but it happens on the sparc when loading parameter registers, - so I am going to define that circumstance, and make it work - as expected. */ - - if (optype0 == REGOP && optype1 == REGOP - && REGNO (operands[0]) == REGNO (latehalf[1])) - { - CC_STATUS_PARTIAL_INIT; - /* Make any unoffsettable addresses point at high-numbered word. */ - if (addreg0) - output_asm_insn ("adds 0x4,%0,%0", &addreg0); - if (addreg1) - output_asm_insn ("adds 0x4,%0,%0", &addreg1); - - /* Do that word. */ - output_asm_insn (singlemove_string (latehalf), latehalf); - - /* Undo the adds we just did. */ - if (addreg0) - output_asm_insn ("adds -0x4,%0,%0", &addreg0); - if (addreg1) - output_asm_insn ("adds -0x4,%0,%0", &addreg1); - - /* Do low-numbered word. */ - return singlemove_string (operands); - } - else if (optype0 == REGOP && optype1 != REGOP - && reg_overlap_mentioned_p (operands[0], operands[1])) - { - /* If both halves of dest are used in the src memory address, - add the two regs and put them in the low reg (operands[0]). - Then it works to load latehalf first. */ - if (reg_mentioned_p (operands[0], XEXP (operands[1], 0)) - && reg_mentioned_p (latehalf[0], XEXP (operands[1], 0))) - { - rtx xops[2]; - xops[0] = latehalf[0]; - xops[1] = operands[0]; - output_asm_insn ("adds %1,%0,%1", xops); - operands[1] = gen_rtx_MEM (DImode, operands[0]); - latehalf[1] = adjust_address (operands[1], SImode, 4); - addreg1 = 0; - highest_first = 1; - } - /* Only one register in the dest is used in the src memory address, - and this is the first register of the dest, so we want to do - the late half first here also. */ - else if (! reg_mentioned_p (latehalf[0], XEXP (operands[1], 0))) - highest_first = 1; - /* Only one register in the dest is used in the src memory address, - and this is the second register of the dest, so we want to do - the late half last. If addreg1 is set, and addreg1 is the same - register as latehalf, then we must suppress the trailing decrement, - because it would clobber the value just loaded. */ - else if (addreg1 && reg_mentioned_p (addreg1, latehalf[0])) - no_addreg1_decrement = 1; - } - - /* Normal case: do the two words, low-numbered first. - Overlap case (highest_first set): do high-numbered word first. */ - - if (! highest_first) - output_asm_insn (singlemove_string (operands), operands); - - CC_STATUS_PARTIAL_INIT; - /* Make any unoffsettable addresses point at high-numbered word. */ - if (addreg0) - output_asm_insn ("adds 0x4,%0,%0", &addreg0); - if (addreg1) - output_asm_insn ("adds 0x4,%0,%0", &addreg1); - - /* Do that word. */ - output_asm_insn (singlemove_string (latehalf), latehalf); - - /* Undo the adds we just did. */ - if (addreg0) - output_asm_insn ("adds -0x4,%0,%0", &addreg0); - if (addreg1 && !no_addreg1_decrement) - output_asm_insn ("adds -0x4,%0,%0", &addreg1); - - if (highest_first) - output_asm_insn (singlemove_string (operands), operands); - - return ""; - } - - const char * - output_fp_move_double (operands) - rtx *operands; - { - /* If the source operand is any sort of zero, use f0 instead. */ - - if (operands[1] == CONST0_RTX (GET_MODE (operands[1]))) - operands[1] = gen_rtx_REG (DFmode, F0_REGNUM); - - if (FP_REG_P (operands[0])) - { - if (FP_REG_P (operands[1])) - return "fmov.dd %1,%0"; - if (GET_CODE (operands[1]) == REG) - { - output_asm_insn ("ixfr %1,%0", operands); - operands[0] = gen_rtx_REG (VOIDmode, REGNO (operands[0]) + 1); - operands[1] = gen_rtx_REG (VOIDmode, REGNO (operands[1]) + 1); - return "ixfr %1,%0"; - } - if (operands[1] == CONST0_RTX (DFmode)) - return "fmov.dd f0,%0"; - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && cc_prev_status.mdep == XEXP (operands[1], 0))) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h1,%?r0,%?r31", operands); - } - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[1], 0); - return "fld.d %L1(%?r31),%0"; - } - return "fld.d %1,%0"; - } - else if (FP_REG_P (operands[1])) - { - if (GET_CODE (operands[0]) == REG) - { - output_asm_insn ("fxfr %1,%0", operands); - operands[0] = gen_rtx_REG (VOIDmode, REGNO (operands[0]) + 1); - operands[1] = gen_rtx_REG (VOIDmode, REGNO (operands[1]) + 1); - return "fxfr %1,%0"; - } - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && cc_prev_status.mdep == XEXP (operands[0], 0))) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h0,%?r0,%?r31", operands); - } - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[0], 0); - return "fst.d %1,%L0(%?r31)"; - } - return "fst.d %1,%0"; - } - else - abort (); - /* NOTREACHED */ - return NULL; - } - - /* Return a REG that occurs in ADDR with coefficient 1. - ADDR can be effectively incremented by incrementing REG. */ - - static rtx - find_addr_reg (addr) - rtx addr; - { - while (GET_CODE (addr) == PLUS) - { - if (GET_CODE (XEXP (addr, 0)) == REG) - addr = XEXP (addr, 0); - else if (GET_CODE (XEXP (addr, 1)) == REG) - addr = XEXP (addr, 1); - else if (CONSTANT_P (XEXP (addr, 0))) - addr = XEXP (addr, 1); - else if (CONSTANT_P (XEXP (addr, 1))) - addr = XEXP (addr, 0); - else - abort (); - } - if (GET_CODE (addr) == REG) - return addr; - abort (); - /* NOTREACHED */ - return NULL; - } - - /* Return a template for a load instruction with mode MODE and - arguments from the string ARGS. - - This string is in static storage. */ - - static const char * - load_opcode (mode, args, reg) - enum machine_mode mode; - const char *args; - rtx reg; - { - static char buf[30]; - const char *opcode; - - switch (mode) - { - case QImode: - opcode = "ld.b"; - break; - - case HImode: - opcode = "ld.s"; - break; - - case SImode: - case SFmode: - if (FP_REG_P (reg)) - opcode = "fld.l"; - else - opcode = "ld.l"; - break; - - case DImode: - if (!FP_REG_P (reg)) - abort (); - case DFmode: - opcode = "fld.d"; - break; - - default: - abort (); - } - - sprintf (buf, "%s %s", opcode, args); - return buf; - } - - /* Return a template for a store instruction with mode MODE and - arguments from the string ARGS. - - This string is in static storage. */ - - static const char * - store_opcode (mode, args, reg) - enum machine_mode mode; - const char *args; - rtx reg; - { - static char buf[30]; - const char *opcode; - - switch (mode) - { - case QImode: - opcode = "st.b"; - break; - - case HImode: - opcode = "st.s"; - break; - - case SImode: - case SFmode: - if (FP_REG_P (reg)) - opcode = "fst.l"; - else - opcode = "st.l"; - break; - - case DImode: - if (!FP_REG_P (reg)) - abort (); - case DFmode: - opcode = "fst.d"; - break; - - default: - abort (); - } - - sprintf (buf, "%s %s", opcode, args); - return buf; - } - - /* Output a store-in-memory whose operands are OPERANDS[0,1]. - OPERANDS[0] is a MEM, and OPERANDS[1] is a reg or zero. - - This function returns a template for an insn. - This is in static storage. - - It may also output some insns directly. - It may alter the values of operands[0] and operands[1]. */ - - const char * - output_store (operands) - rtx *operands; - { - enum machine_mode mode = GET_MODE (operands[0]); - rtx address = XEXP (operands[0], 0); - - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = address; - - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && address == cc_prev_status.mdep)) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h0,%?r0,%?r31", operands); - cc_prev_status.mdep = address; - } - - /* Store zero in two parts when appropriate. */ - if (mode == DFmode && operands[1] == CONST0_RTX (DFmode)) - return store_opcode (DFmode, "%r1,%L0(%?r31)", operands[1]); - - /* Code below isn't smart enough to move a doubleword in two parts, - so use output_move_double to do that in the cases that require it. */ - if ((mode == DImode || mode == DFmode) - && ! FP_REG_P (operands[1])) - return output_move_double (operands); - - return store_opcode (mode, "%r1,%L0(%?r31)", operands[1]); - } - - /* Output a load-from-memory whose operands are OPERANDS[0,1]. - OPERANDS[0] is a reg, and OPERANDS[1] is a mem. - - This function returns a template for an insn. - This is in static storage. - - It may also output some insns directly. - It may alter the values of operands[0] and operands[1]. */ - - const char * - output_load (operands) - rtx *operands; - { - enum machine_mode mode = GET_MODE (operands[0]); - rtx address = XEXP (operands[1], 0); - - /* We don't bother trying to see if we know %hi(address). - This is because we are doing a load, and if we know the - %hi value, we probably also know that value in memory. */ - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = address; - - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && address == cc_prev_status.mdep - && cc_prev_status.mdep == cc_status.mdep)) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h1,%?r0,%?r31", operands); - cc_prev_status.mdep = address; - } - - /* Code below isn't smart enough to move a doubleword in two parts, - so use output_move_double to do that in the cases that require it. */ - if ((mode == DImode || mode == DFmode) - && ! FP_REG_P (operands[0])) - return output_move_double (operands); - - return load_opcode (mode, "%L1(%?r31),%0", operands[0]); - } - - #if 0 - /* Load the address specified by OPERANDS[3] into the register - specified by OPERANDS[0]. - - OPERANDS[3] may be the result of a sum, hence it could either be: - - (1) CONST - (2) REG - (2) REG + CONST_INT - (3) REG + REG + CONST_INT - (4) REG + REG (special case of 3). - - Note that (3) is not a legitimate address. - All cases are handled here. */ - - void - output_load_address (operands) - rtx *operands; - { - rtx base, offset; - - if (CONSTANT_P (operands[3])) - { - output_asm_insn ("mov %3,%0", operands); - return; - } - - if (REG_P (operands[3])) - { - if (REGNO (operands[0]) != REGNO (operands[3])) - output_asm_insn ("shl %?r0,%3,%0", operands); - return; - } - - if (GET_CODE (operands[3]) != PLUS) - abort (); - - base = XEXP (operands[3], 0); - offset = XEXP (operands[3], 1); - - if (GET_CODE (base) == CONST_INT) - { - rtx tmp = base; - base = offset; - offset = tmp; - } - - if (GET_CODE (offset) != CONST_INT) - { - /* Operand is (PLUS (REG) (REG)). */ - base = operands[3]; - offset = const0_rtx; - } - - if (REG_P (base)) - { - operands[6] = base; - operands[7] = offset; - CC_STATUS_PARTIAL_INIT; - if (SMALL_INT (offset)) - output_asm_insn ("adds %7,%6,%0", operands); - else - output_asm_insn ("mov %7,%0\n\tadds %0,%6,%0", operands); - } - else if (GET_CODE (base) == PLUS) - { - operands[6] = XEXP (base, 0); - operands[7] = XEXP (base, 1); - operands[8] = offset; - - CC_STATUS_PARTIAL_INIT; - if (SMALL_INT (offset)) - output_asm_insn ("adds %6,%7,%0\n\tadds %8,%0,%0", operands); - else - output_asm_insn ("mov %8,%0\n\tadds %0,%6,%0\n\tadds %0,%7,%0", operands); - } - else - abort (); - } - #endif - - /* Output code to place a size count SIZE in register REG. - Because block moves are pipelined, we don't include the - first element in the transfer of SIZE to REG. - For this, we subtract ALIGN. (Actually, I think it is not - right to subtract on this machine, so right now we don't.) */ - - static void - output_size_for_block_move (size, reg, align) - rtx size, reg, align; - { - rtx xoperands[3]; - - xoperands[0] = reg; - xoperands[1] = size; - xoperands[2] = align; - - #if 1 - cc_status.flags &= ~ CC_KNOW_HI_R31; - output_asm_insn (singlemove_string (xoperands), xoperands); - #else - if (GET_CODE (size) == REG) - output_asm_insn ("sub %2,%1,%0", xoperands); - else - { - xoperands[1] = GEN_INT (INTVAL (size) - INTVAL (align)); - cc_status.flags &= ~ CC_KNOW_HI_R31; - output_asm_insn ("mov %1,%0", xoperands); - } - #endif - } - - /* Emit code to perform a block move. - - OPERANDS[0] is the destination. - OPERANDS[1] is the source. - OPERANDS[2] is the size. - OPERANDS[3] is the known safe alignment. - OPERANDS[4..6] are pseudos we can safely clobber as temps. */ - - const char * - output_block_move (operands) - rtx *operands; - { - /* A vector for our computed operands. Note that load_output_address - makes use of (and can clobber) up to the 8th element of this vector. */ - rtx xoperands[10]; - #if 0 - rtx zoperands[10]; - #endif - static int movstrsi_label = 0; - int i; - rtx temp1 = operands[4]; - rtx alignrtx = operands[3]; - int align = INTVAL (alignrtx); - int chunk_size; - - xoperands[0] = operands[0]; - xoperands[1] = operands[1]; - xoperands[2] = temp1; - - /* We can't move more than four bytes at a time - because we have only one register to move them through. */ - if (align > 4) - { - align = 4; - alignrtx = GEN_INT (4); - } - - /* Recognize special cases of block moves. These occur - when GNU C++ is forced to treat something as BLKmode - to keep it in memory, when its mode could be represented - with something smaller. - - We cannot do this for global variables, since we don't know - what pages they don't cross. Sigh. */ - if (GET_CODE (operands[2]) == CONST_INT - && ! CONSTANT_ADDRESS_P (operands[0]) - && ! CONSTANT_ADDRESS_P (operands[1])) - { - int size = INTVAL (operands[2]); - rtx op0 = xoperands[0]; - rtx op1 = xoperands[1]; - - if ((align & 3) == 0 && (size & 3) == 0 && (size >> 2) <= 16) - { - if (memory_address_p (SImode, plus_constant (op0, size)) - && memory_address_p (SImode, plus_constant (op1, size))) - { - cc_status.flags &= ~CC_KNOW_HI_R31; - for (i = (size>>2)-1; i >= 0; i--) - { - xoperands[0] = plus_constant (op0, i * 4); - xoperands[1] = plus_constant (op1, i * 4); - output_asm_insn ("ld.l %a1,%?r31\n\tst.l %?r31,%a0", - xoperands); - } - return ""; - } - } - else if ((align & 1) == 0 && (size & 1) == 0 && (size >> 1) <= 16) - { - if (memory_address_p (HImode, plus_constant (op0, size)) - && memory_address_p (HImode, plus_constant (op1, size))) - { - cc_status.flags &= ~CC_KNOW_HI_R31; - for (i = (size>>1)-1; i >= 0; i--) - { - xoperands[0] = plus_constant (op0, i * 2); - xoperands[1] = plus_constant (op1, i * 2); - output_asm_insn ("ld.s %a1,%?r31\n\tst.s %?r31,%a0", - xoperands); - } - return ""; - } - } - else if (size <= 16) - { - if (memory_address_p (QImode, plus_constant (op0, size)) - && memory_address_p (QImode, plus_constant (op1, size))) - { - cc_status.flags &= ~CC_KNOW_HI_R31; - for (i = size-1; i >= 0; i--) - { - xoperands[0] = plus_constant (op0, i); - xoperands[1] = plus_constant (op1, i); - output_asm_insn ("ld.b %a1,%?r31\n\tst.b %?r31,%a0", - xoperands); - } - return ""; - } - } - } - - /* Since we clobber untold things, nix the condition codes. */ - CC_STATUS_INIT; - - /* This is the size of the transfer. - Either use the register which already contains the size, - or use a free register (used by no operands). */ - output_size_for_block_move (operands[2], operands[4], alignrtx); - - #if 0 - /* Also emit code to decrement the size value by ALIGN. */ - zoperands[0] = operands[0]; - zoperands[3] = plus_constant (operands[0], align); - output_load_address (zoperands); - #endif - - /* Generate number for unique label. */ - - xoperands[3] = GEN_INT (movstrsi_label++); - - /* Calculate the size of the chunks we will be trying to move first. */ - - #if 0 - if ((align & 3) == 0) - chunk_size = 4; - else if ((align & 1) == 0) - chunk_size = 2; - else - #endif - chunk_size = 1; - - /* Copy the increment (negative) to a register for bla insn. */ - - xoperands[4] = GEN_INT (- chunk_size); - xoperands[5] = operands[5]; - output_asm_insn ("adds %4,%?r0,%5", xoperands); - - /* Predecrement the loop counter. This happens again also in the `bla' - instruction which precedes the loop, but we need to have it done - two times before we enter the loop because of the bizarre semantics - of the bla instruction. */ - - output_asm_insn ("adds %5,%2,%2", xoperands); - - /* Check for the case where the original count was less than or equal to - zero. Avoid going through the loop at all if the original count was - indeed less than or equal to zero. Note that we treat the count as - if it were a signed 32-bit quantity here, rather than an unsigned one, - even though we really shouldn't. We have to do this because of the - semantics of the `ble' instruction, which assume that the count is - a signed 32-bit value. Anyway, in practice it won't matter because - nobody is going to try to do a memcpy() of more than half of the - entire address space (i.e. 2 gigabytes) anyway. */ - - output_asm_insn ("bc .Le%3", xoperands); - - /* Make available a register which is a temporary. */ - - xoperands[6] = operands[6]; - - /* Now the actual loop. - In xoperands, elements 1 and 0 are the input and output vectors. - Element 2 is the loop index. Element 5 is the increment. */ - - output_asm_insn ("subs %1,%5,%1", xoperands); - output_asm_insn ("bla %5,%2,.Lm%3", xoperands); - output_asm_insn ("adds %0,%2,%6", xoperands); - output_asm_insn ("\n.Lm%3:", xoperands); /* Label for bla above. */ - output_asm_insn ("\n.Ls%3:", xoperands); /* Loop start label. */ - output_asm_insn ("adds %5,%6,%6", xoperands); - - /* NOTE: The code here which is supposed to handle the cases where the - sources and destinations are known to start on a 4 or 2 byte boundary - are currently broken. They fail to do anything about the overflow - bytes which might still need to be copied even after we have copied - some number of words or halfwords. Thus, for now we use the lowest - common denominator, i.e. the code which just copies some number of - totally unaligned individual bytes. (See the calculation of - chunk_size above. */ - - if (chunk_size == 4) - { - output_asm_insn ("ld.l %2(%1),%?r31", xoperands); - output_asm_insn ("bla %5,%2,.Ls%3", xoperands); - output_asm_insn ("st.l %?r31,8(%6)", xoperands); - } - else if (chunk_size == 2) - { - output_asm_insn ("ld.s %2(%1),%?r31", xoperands); - output_asm_insn ("bla %5,%2,.Ls%3", xoperands); - output_asm_insn ("st.s %?r31,4(%6)", xoperands); - } - else /* chunk_size == 1 */ - { - output_asm_insn ("ld.b %2(%1),%?r31", xoperands); - output_asm_insn ("bla %5,%2,.Ls%3", xoperands); - output_asm_insn ("st.b %?r31,2(%6)", xoperands); - } - output_asm_insn ("\n.Le%3:", xoperands); /* Here if count <= 0. */ - - return ""; - } - - #if 0 - /* Output a delayed branch insn with the delay insn in its - branch slot. The delayed branch insn template is in TEMPLATE, - with operands OPERANDS. The insn in its delay slot is INSN. - - As a special case, since we know that all memory transfers are via - ld/st insns, if we see a (MEM (SYMBOL_REF ...)) we divide the memory - reference around the branch as - - orh ha%x,%?r0,%?r31 - b ... - ld/st l%x(%?r31),... - - As another special case, we handle loading (SYMBOL_REF ...) and - other large constants around branches as well: - - orh h%x,%?r0,%0 - b ... - or l%x,%0,%1 - - */ - /* ??? Disabled because this re-recognition is incomplete and causes - constrain_operands to segfault. Anyone who cares should fix up - the code to use the DBR pass. */ - - const char * - output_delayed_branch (template, operands, insn) - const char *template; - rtx *operands; - rtx insn; - { - rtx src = XVECEXP (PATTERN (insn), 0, 1); - rtx dest = XVECEXP (PATTERN (insn), 0, 0); - - /* See if we are doing some branch together with setting some register - to some 32-bit value which does (or may) have some of the high-order - 16 bits set. If so, we need to set the register in two stages. One - stage must be done before the branch, and the other one can be done - in the delay slot. */ - - if ( (GET_CODE (src) == CONST_INT - && ((unsigned) INTVAL (src) & (unsigned) 0xffff0000) != (unsigned) 0) - || (GET_CODE (src) == SYMBOL_REF) - || (GET_CODE (src) == LABEL_REF) - || (GET_CODE (src) == CONST)) - { - rtx xoperands[2]; - xoperands[0] = dest; - xoperands[1] = src; - - CC_STATUS_PARTIAL_INIT; - /* Output the `orh' insn. */ - output_asm_insn ("orh %H1,%?r0,%0", xoperands); - - /* Output the branch instruction next. */ - output_asm_insn (template, operands); - - /* Now output the `or' insn. */ - output_asm_insn ("or %L1,%0,%0", xoperands); - } - else if ((GET_CODE (src) == MEM - && CONSTANT_ADDRESS_P (XEXP (src, 0))) - || (GET_CODE (dest) == MEM - && CONSTANT_ADDRESS_P (XEXP (dest, 0)))) - { - rtx xoperands[2]; - const char *split_template; - xoperands[0] = dest; - xoperands[1] = src; - - /* Output the `orh' insn. */ - if (GET_CODE (src) == MEM) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && cc_prev_status.mdep == XEXP (operands[1], 0))) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h1,%?r0,%?r31", xoperands); - } - split_template = load_opcode (GET_MODE (dest), - "%L1(%?r31),%0", dest); - } - else - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && cc_prev_status.mdep == XEXP (operands[0], 0))) - { - CC_STATUS_INIT; - output_asm_insn ("orh %h0,%?r0,%?r31", xoperands); - } - split_template = store_opcode (GET_MODE (dest), - "%r1,%L0(%?r31)", src); - } - - /* Output the branch instruction next. */ - output_asm_insn (template, operands); - - /* Now output the load or store. - No need to do a CC_STATUS_INIT, because we are branching anyway. */ - output_asm_insn (split_template, xoperands); - } - else - { - int insn_code_number; - rtx pat = gen_rtx_SET (VOIDmode, dest, src); - rtx delay_insn = gen_rtx_INSN (VOIDmode, 0, 0, 0, pat, -1, 0, 0); - int i; - - /* Output the branch instruction first. */ - output_asm_insn (template, operands); - - /* Now recognize the insn which we put in its delay slot. - We must do this after outputting the branch insn, - since operands may just be a pointer to `recog_data.operand'. */ - INSN_CODE (delay_insn) = insn_code_number - = recog (pat, delay_insn, NULL); - if (insn_code_number == -1) - abort (); - - for (i = 0; i < insn_data[insn_code_number].n_operands; i++) - { - if (GET_CODE (recog_data.operand[i]) == SUBREG) - alter_subreg (&recog_data.operand[i]); - } - - insn_extract (delay_insn); - if (! constrain_operands (1)) - fatal_insn_not_found (delay_insn); - - template = get_insn_template (insn_code_number, delay_insn); - output_asm_insn (template, recog_data.operand); - } - CC_STATUS_INIT; - return ""; - } - - /* Output a newly constructed insn DELAY_INSN. */ - const char * - output_delay_insn (delay_insn) - rtx delay_insn; - { - const char *template; - int insn_code_number; - int i; - - /* Now recognize the insn which we put in its delay slot. - We must do this after outputting the branch insn, - since operands may just be a pointer to `recog_data.operand'. */ - insn_code_number = recog_memoized (delay_insn); - if (insn_code_number == -1) - abort (); - - /* Extract the operands of this delay insn. */ - INSN_CODE (delay_insn) = insn_code_number; - insn_extract (delay_insn); - - /* It is possible that this insn has not been properly scanned by final - yet. If this insn's operands don't appear in the peephole's - actual operands, then they won't be fixed up by final, so we - make sure they get fixed up here. -- This is a kludge. */ - for (i = 0; i < insn_data[insn_code_number].n_operands; i++) - { - if (GET_CODE (recog_data.operand[i]) == SUBREG) - alter_subreg (&recog_data.operand[i]); - } - - if (! constrain_operands (1)) - abort (); - - cc_prev_status = cc_status; - - /* Update `cc_status' for this instruction. - The instruction's output routine may change it further. - If the output routine for a jump insn needs to depend - on the cc status, it should look at cc_prev_status. */ - - NOTICE_UPDATE_CC (PATTERN (delay_insn), delay_insn); - - /* Now get the template for what this insn would - have been, without the branch. */ - - template = get_insn_template (insn_code_number, delay_insn); - output_asm_insn (template, recog_data.operand); - return ""; - } - #endif - - /* Special routine to convert an SFmode value represented as a - CONST_DOUBLE into its equivalent unsigned long bit pattern. - We convert the value from a double precision floating-point - value to single precision first, and thence to a bit-wise - equivalent unsigned long value. This routine is used when - generating an immediate move of an SFmode value directly - into a general register because the svr4 assembler doesn't - grok floating literals in instruction operand contexts. */ - - unsigned long - sfmode_constant_to_ulong (x) - rtx x; - { - REAL_VALUE_TYPE d; - union { float f; unsigned long i; } u2; - - if (GET_CODE (x) != CONST_DOUBLE || GET_MODE (x) != SFmode) - abort (); - - #if TARGET_FLOAT_FORMAT != HOST_FLOAT_FORMAT - error IEEE emulation needed - #endif - REAL_VALUE_FROM_CONST_DOUBLE (d, x); - u2.f = d; - return u2.i; - } - - /* This function generates the assembly code for function entry. - - ASM_FILE is a stdio stream to output the code to. - SIZE is an int: how many units of temporary storage to allocate. - - Refer to the array `regs_ever_live' to determine which registers - to save; `regs_ever_live[I]' is nonzero if register number I - is ever used in the function. This macro is responsible for - knowing which registers should not be saved even if used. - - NOTE: `frame_lower_bytes' is the count of bytes which will lie - between the new `fp' value and the new `sp' value after the - prologue is done. `frame_upper_bytes' is the count of bytes - that will lie between the new `fp' and the *old* `sp' value - after the new `fp' is setup (in the prologue). The upper - part of each frame always includes at least 2 words (8 bytes) - to hold the saved frame pointer and the saved return address. - - The svr4 ABI for the i860 now requires that the values of the - stack pointer and frame pointer registers be kept aligned to - 16-byte boundaries at all times. We obey that restriction here. - - The svr4 ABI for the i860 is entirely vague when it comes to specifying - exactly where the "preserved" registers should be saved. The native - svr4 C compiler I now have doesn't help to clarify the requirements - very much because it is plainly out-of-date and non-ABI-compliant - (in at least one important way, i.e. how it generates function - epilogues). - - The native svr4 C compiler saves the "preserved" registers (i.e. - r4-r15 and f2-f7) in the lower part of a frame (i.e. at negative - offsets from the frame pointer). - - Previous versions of GCC also saved the "preserved" registers in the - "negative" part of the frame, but they saved them using positive - offsets from the (adjusted) stack pointer (after it had been adjusted - to allocate space for the new frame). That's just plain wrong - because if the current function calls alloca(), the stack pointer - will get moved, and it will be impossible to restore the registers - properly again after that. - - Both compilers handled parameter registers (i.e. r16-r27 and f8-f15) - by copying their values either into various "preserved" registers or - into stack slots in the lower part of the current frame (as seemed - appropriate, depending upon subsequent usage of these values). - - Here we want to save the preserved registers at some offset from the - frame pointer register so as to avoid any possible problems arising - from calls to alloca(). We can either save them at small positive - offsets from the frame pointer, or at small negative offsets from - the frame pointer. If we save them at small negative offsets from - the frame pointer (i.e. in the lower part of the frame) then we - must tell the rest of GCC (via STARTING_FRAME_OFFSET) exactly how - many bytes of space we plan to use in the lower part of the frame - for this purpose. Since other parts of the compiler reference the - value of STARTING_FRAME_OFFSET long before final() calls this function, - we would have to go ahead and assume the worst-case storage requirements - for saving all of the "preserved" registers (and use that number, i.e. - `80', to define STARTING_FRAME_OFFSET) if we wanted to save them in - the lower part of the frame. That could potentially be very wasteful, - and that wastefulness could really hamper people compiling for embedded - i860 targets with very tight limits on stack space. Thus, we choose - here to save the preserved registers in the upper part of the - frame, so that we can decide at the very last minute how much (or how - little) space we must allocate for this purpose. - - To satisfy the needs of the svr4 ABI "tdesc" scheme, preserved - registers must always be saved so that the saved values of registers - with higher numbers are at higher addresses. We obey that restriction - here. - - There are two somewhat different ways that you can generate prologues - here... i.e. pedantically ABI-compliant, and the "other" way. The - "other" way is more consistent with what is currently generated by the - "native" svr4 C compiler for the i860. That's important if you want - to use the current (as of 8/91) incarnation of svr4 SDB for the i860. - The SVR4 SDB for the i860 insists on having function prologues be - non-ABI-compliant! - - To get fully ABI-compliant prologues, define I860_STRICT_ABI_PROLOGUES - in the i860svr4.h file. (By default this is *not* defined). - - The differences between the ABI-compliant and non-ABI-compliant prologues - are that (a) the ABI version seems to require the use of *signed* - (rather than unsigned) adds and subtracts, and (b) the ordering of - the various steps (e.g. saving preserved registers, saving the - return address, setting up the new frame pointer value) is different. - - For strict ABI compliance, it seems to be the case that the very last - thing that is supposed to happen in the prologue is getting the frame - pointer set to its new value (but only after everything else has - already been properly setup). We do that here, but only if the symbol - I860_STRICT_ABI_PROLOGUES is defined. - */ - - #ifndef STACK_ALIGNMENT - #define STACK_ALIGNMENT 16 - #endif - - const char *current_function_original_name; - - static int must_preserve_r1; - static unsigned must_preserve_bytes; - - static void - i860_output_function_prologue (asm_file, local_bytes) - register FILE *asm_file; - register HOST_WIDE_INT local_bytes; - { - register HOST_WIDE_INT frame_lower_bytes; - register HOST_WIDE_INT frame_upper_bytes; - register HOST_WIDE_INT total_fsize; - register unsigned preserved_reg_bytes = 0; - register unsigned i; - register unsigned preserved_so_far = 0; - - must_preserve_r1 = (optimize < 2 || ! leaf_function_p ()); - must_preserve_bytes = 4 + (must_preserve_r1 ? 4 : 0); - - /* Count registers that need preserving. Ignore r0. It never needs - preserving. */ - - for (i = 1; i < FIRST_PSEUDO_REGISTER; i++) - { - if (regs_ever_live[i] && ! call_used_regs[i]) - preserved_reg_bytes += 4; - } - - /* Round-up the frame_lower_bytes so that it's a multiple of 16. */ - - frame_lower_bytes = (local_bytes + STACK_ALIGNMENT - 1) & -STACK_ALIGNMENT; - - /* The upper part of each frame will contain the saved fp, - the saved r1, and stack slots for all of the other "preserved" - registers that we find we will need to save & restore. */ - - frame_upper_bytes = must_preserve_bytes + preserved_reg_bytes; - - /* Round-up the frame_upper_bytes so that it's a multiple of 16. */ - - frame_upper_bytes - = (frame_upper_bytes + STACK_ALIGNMENT - 1) & -STACK_ALIGNMENT; - - total_fsize = frame_upper_bytes + frame_lower_bytes; - - #ifndef I860_STRICT_ABI_PROLOGUES - - /* There are two kinds of function prologues. - You use the "small" version if the total frame size is - small enough so that it can fit into an immediate 16-bit - value in one instruction. Otherwise, you use the "large" - version of the function prologue. */ - - if (total_fsize > 0x7fff) - { - /* Adjust the stack pointer. The ABI sez to do this using `adds', - but the native C compiler on svr4 uses `addu'. */ - - fprintf (asm_file, "\taddu -%d,%ssp,%ssp\n", - frame_upper_bytes, i860_reg_prefix, i860_reg_prefix); - - /* Save the old frame pointer. */ - - fprintf (asm_file, "\tst.l %sfp,0(%ssp)\n", - i860_reg_prefix, i860_reg_prefix); - - /* Setup the new frame pointer. The ABI sez to do this after - preserving registers (using adds), but that's not what the - native C compiler on svr4 does. */ - - fprintf (asm_file, "\taddu 0,%ssp,%sfp\n", - i860_reg_prefix, i860_reg_prefix); - - /* Get the value of frame_lower_bytes into r31. */ - - fprintf (asm_file, "\torh %d,%sr0,%sr31\n", - frame_lower_bytes >> 16, i860_reg_prefix, i860_reg_prefix); - fprintf (asm_file, "\tor %d,%sr31,%sr31\n", - frame_lower_bytes & 0xffff, i860_reg_prefix, i860_reg_prefix); - - /* Now re-adjust the stack pointer using the value in r31. - The ABI sez to do this with `subs' but SDB may prefer `subu'. */ - - fprintf (asm_file, "\tsubu %ssp,%sr31,%ssp\n", - i860_reg_prefix, i860_reg_prefix, i860_reg_prefix); - - /* Preserve registers. The ABI sez to do this before setting - up the new frame pointer, but that's not what the native - C compiler on svr4 does. */ - - for (i = 1; i < 32; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tst.l %s%s,%d(%sfp)\n", - i860_reg_prefix, reg_names[i], - must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - for (i = 32; i < 64; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tfst.l %s%s,%d(%sfp)\n", - i860_reg_prefix, reg_names[i], - must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - /* Save the return address. */ - - if (must_preserve_r1) - fprintf (asm_file, "\tst.l %sr1,4(%sfp)\n", - i860_reg_prefix, i860_reg_prefix); - } - else - { - /* Adjust the stack pointer. The ABI sez to do this using `adds', - but the native C compiler on svr4 uses `addu'. */ - - fprintf (asm_file, "\taddu -%d,%ssp,%ssp\n", - total_fsize, i860_reg_prefix, i860_reg_prefix); - - /* Save the old frame pointer. */ - - fprintf (asm_file, "\tst.l %sfp,%d(%ssp)\n", - i860_reg_prefix, frame_lower_bytes, i860_reg_prefix); - - /* Setup the new frame pointer. The ABI sez to do this after - preserving registers and after saving the return address, - (and its saz to do this using adds), but that's not what the - native C compiler on svr4 does. */ - - fprintf (asm_file, "\taddu %d,%ssp,%sfp\n", - frame_lower_bytes, i860_reg_prefix, i860_reg_prefix); - - /* Preserve registers. The ABI sez to do this before setting - up the new frame pointer, but that's not what the native - compiler on svr4 does. */ - - for (i = 1; i < 32; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tst.l %s%s,%d(%sfp)\n", - i860_reg_prefix, reg_names[i], - must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - for (i = 32; i < 64; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tfst.l %s%s,%d(%sfp)\n", - i860_reg_prefix, reg_names[i], - must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - /* Save the return address. The ABI sez to do this earlier, - and also via an offset from %sp, but the native C compiler - on svr4 does it later (i.e. now) and uses an offset from - %fp. */ - - if (must_preserve_r1) - fprintf (asm_file, "\tst.l %sr1,4(%sfp)\n", - i860_reg_prefix, i860_reg_prefix); - } - - #else /* defined(I860_STRICT_ABI_PROLOGUES) */ - - /* There are two kinds of function prologues. - You use the "small" version if the total frame size is - small enough so that it can fit into an immediate 16-bit - value in one instruction. Otherwise, you use the "large" - version of the function prologue. */ - - if (total_fsize > 0x7fff) - { - /* Adjust the stack pointer (thereby allocating a new frame). */ - - fprintf (asm_file, "\tadds -%d,%ssp,%ssp\n", - frame_upper_bytes, i860_reg_prefix, i860_reg_prefix); - - /* Save the caller's frame pointer. */ - - fprintf (asm_file, "\tst.l %sfp,0(%ssp)\n", - i860_reg_prefix, i860_reg_prefix); - - /* Save return address. */ - - if (must_preserve_r1) - fprintf (asm_file, "\tst.l %sr1,4(%ssp)\n", - i860_reg_prefix, i860_reg_prefix); - - /* Get the value of frame_lower_bytes into r31 for later use. */ - - fprintf (asm_file, "\torh %d,%sr0,%sr31\n", - frame_lower_bytes >> 16, i860_reg_prefix, i860_reg_prefix); - fprintf (asm_file, "\tor %d,%sr31,%sr31\n", - frame_lower_bytes & 0xffff, i860_reg_prefix, i860_reg_prefix); - - /* Now re-adjust the stack pointer using the value in r31. */ - - fprintf (asm_file, "\tsubs %ssp,%sr31,%ssp\n", - i860_reg_prefix, i860_reg_prefix, i860_reg_prefix); - - /* Pre-compute value to be used as the new frame pointer. */ - - fprintf (asm_file, "\tadds %ssp,%sr31,%sr31\n", - i860_reg_prefix, i860_reg_prefix, i860_reg_prefix); - - /* Preserve registers. */ - - for (i = 1; i < 32; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tst.l %s%s,%d(%sr31)\n", - i860_reg_prefix, reg_names[i], - must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - for (i = 32; i < 64; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tfst.l %s%s,%d(%sr31)\n", - i860_reg_prefix, reg_names[i], - must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - /* Actually set the new value of the frame pointer. */ - - fprintf (asm_file, "\tmov %sr31,%sfp\n", - i860_reg_prefix, i860_reg_prefix); - } - else - { - /* Adjust the stack pointer. */ - - fprintf (asm_file, "\tadds -%d,%ssp,%ssp\n", - total_fsize, i860_reg_prefix, i860_reg_prefix); - - /* Save the caller's frame pointer. */ - - fprintf (asm_file, "\tst.l %sfp,%d(%ssp)\n", - i860_reg_prefix, frame_lower_bytes, i860_reg_prefix); - - /* Save the return address. */ - - if (must_preserve_r1) - fprintf (asm_file, "\tst.l %sr1,%d(%ssp)\n", - i860_reg_prefix, frame_lower_bytes + 4, i860_reg_prefix); - - /* Preserve registers. */ - - for (i = 1; i < 32; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tst.l %s%s,%d(%ssp)\n", - i860_reg_prefix, reg_names[i], - frame_lower_bytes + must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - for (i = 32; i < 64; i++) - if (regs_ever_live[i] && ! call_used_regs[i]) - fprintf (asm_file, "\tfst.l %s%s,%d(%ssp)\n", - i860_reg_prefix, reg_names[i], - frame_lower_bytes + must_preserve_bytes + (4 * preserved_so_far++), - i860_reg_prefix); - - /* Setup the new frame pointer. */ - - fprintf (asm_file, "\tadds %d,%ssp,%sfp\n", - frame_lower_bytes, i860_reg_prefix, i860_reg_prefix); - } - #endif /* defined(I860_STRICT_ABI_PROLOGUES) */ - - #ifdef ASM_OUTPUT_PROLOGUE_SUFFIX - ASM_OUTPUT_PROLOGUE_SUFFIX (asm_file); - #endif /* defined(ASM_OUTPUT_PROLOGUE_SUFFIX) */ - } - - /* This function generates the assembly code for function exit. - - ASM_FILE is a stdio stream to output the code to. - SIZE is an int: how many units of temporary storage to allocate. - - The function epilogue should not depend on the current stack pointer! - It should use the frame pointer only. This is mandatory because - of alloca; we also take advantage of it to omit stack adjustments - before returning. - - Note that when we go to restore the preserved register values we must - not try to address their slots by using offsets from the stack pointer. - That's because the stack pointer may have been moved during the function - execution due to a call to alloca(). Rather, we must restore all - preserved registers via offsets from the frame pointer value. - - Note also that when the current frame is being "popped" (by adjusting - the value of the stack pointer) on function exit, we must (for the - sake of alloca) set the new value of the stack pointer based upon - the current value of the frame pointer. We can't just add what we - believe to be the (static) frame size to the stack pointer because - if we did that, and alloca() had been called during this function, - we would end up returning *without* having fully deallocated all of - the space grabbed by alloca. If that happened, and a function - containing one or more alloca() calls was called over and over again, - then the stack would grow without limit! - - Finally note that the epilogues generated here are completely ABI - compliant. They go out of their way to insure that the value in - the frame pointer register is never less than the value in the stack - pointer register. It's not clear why this relationship needs to be - maintained at all times, but maintaining it only costs one extra - instruction, so what the hell. - */ - - /* This corresponds to a version 4 TDESC structure. Lower numbered - versions successively omit the last word of the structure. We - don't try to handle version 5 here. */ - - typedef struct TDESC_flags { - int version:4; - int reg_packing:1; - int callable_block:1; - int reserved:4; - int fregs:6; /* fp regs 2-7 */ - int iregs:16; /* regs 0-15 */ - } TDESC_flags; - - typedef struct TDESC { - TDESC_flags flags; - int integer_reg_offset; /* same as must_preserve_bytes */ - int floating_point_reg_offset; - unsigned int positive_frame_size; /* same as frame_upper_bytes */ - unsigned int negative_frame_size; /* same as frame_lower_bytes */ - } TDESC; - - static void - i860_output_function_epilogue (asm_file, local_bytes) - register FILE *asm_file; - register HOST_WIDE_INT local_bytes; - { - register HOST_WIDE_INT frame_upper_bytes; - register HOST_WIDE_INT frame_lower_bytes; - register HOST_WIDE_INT preserved_reg_bytes = 0; - register unsigned i; - register unsigned restored_so_far = 0; - register unsigned int_restored; - register unsigned mask; - unsigned intflags=0; - register TDESC_flags *flags = (TDESC_flags *) &intflags; - #ifdef OUTPUT_TDESC /* Output an ABI-compliant TDESC entry */ - const char *long_op = integer_asm_op (4, TRUE); - #endif - - flags->version = 4; - flags->reg_packing = 1; - flags->iregs = 8; /* old fp always gets saved */ - - /* Round-up the frame_lower_bytes so that it's a multiple of 16. */ - - frame_lower_bytes = (local_bytes + STACK_ALIGNMENT - 1) & -STACK_ALIGNMENT; - - /* Count the number of registers that were preserved in the prologue. - Ignore r0. It is never preserved. */ - - for (i = 1; i < FIRST_PSEUDO_REGISTER; i++) - { - if (regs_ever_live[i] && ! call_used_regs[i]) - preserved_reg_bytes += 4; - } - - /* The upper part of each frame will contain only saved fp, - the saved r1, and stack slots for all of the other "preserved" - registers that we find we will need to save & restore. */ - - frame_upper_bytes = must_preserve_bytes + preserved_reg_bytes; - - /* Round-up frame_upper_bytes so that t is a multiple of 16. */ - - frame_upper_bytes - = (frame_upper_bytes + STACK_ALIGNMENT - 1) & -STACK_ALIGNMENT; - - /* Restore all of the "preserved" registers that need restoring. */ - - mask = 2; - - for (i = 1; i < 32; i++, mask<<=1) - if (regs_ever_live[i] && ! call_used_regs[i]) { - fprintf (asm_file, "\tld.l %d(%sfp),%s%s\n", - must_preserve_bytes + (4 * restored_so_far++), - i860_reg_prefix, i860_reg_prefix, reg_names[i]); - if (i > 3 && i < 16) - flags->iregs |= mask; - } - - int_restored = restored_so_far; - mask = 1; - - for (i = 32; i < 64; i++) { - if (regs_ever_live[i] && ! call_used_regs[i]) { - fprintf (asm_file, "\tfld.l %d(%sfp),%s%s\n", - must_preserve_bytes + (4 * restored_so_far++), - i860_reg_prefix, i860_reg_prefix, reg_names[i]); - if (i > 33 && i < 40) - flags->fregs |= mask; - } - if (i > 33 && i < 40) - mask<<=1; - } - - /* Get the value we plan to use to restore the stack pointer into r31. */ - - fprintf (asm_file, "\tadds %d,%sfp,%sr31\n", - frame_upper_bytes, i860_reg_prefix, i860_reg_prefix); - - /* Restore the return address and the old frame pointer. */ - - if (must_preserve_r1) { - fprintf (asm_file, "\tld.l 4(%sfp),%sr1\n", - i860_reg_prefix, i860_reg_prefix); - flags->iregs |= 2; - } - - fprintf (asm_file, "\tld.l 0(%sfp),%sfp\n", - i860_reg_prefix, i860_reg_prefix); - - /* Return and restore the old stack pointer value. */ - - fprintf (asm_file, "\tbri %sr1\n\tmov %sr31,%ssp\n", - i860_reg_prefix, i860_reg_prefix, i860_reg_prefix); - - #ifdef OUTPUT_TDESC /* Output an ABI-compliant TDESC entry */ - if (! frame_lower_bytes) { - flags->version--; - if (! frame_upper_bytes) { - flags->version--; - if (restored_so_far == int_restored) /* No FP saves */ - flags->version--; - } - } - assemble_name(asm_file,current_function_original_name); - fputs(".TDESC:\n", asm_file); - fprintf(asm_file, "%s 0x%0x\n", long_op, intflags); - fprintf(asm_file, "%s %d\n", long_op, - int_restored ? must_preserve_bytes : 0); - if (flags->version > 1) { - fprintf(asm_file, "%s %d\n", long_op, - (restored_so_far == int_restored) ? 0 : must_preserve_bytes + - (4 * int_restored)); - if (flags->version > 2) { - fprintf(asm_file, "%s %d\n", long_op, frame_upper_bytes); - if (flags->version > 3) - fprintf(asm_file, "%s %d\n", long_op, frame_lower_bytes); - } - } - tdesc_section(); - fprintf(asm_file, "%s ", long_op); - assemble_name(asm_file, current_function_original_name); - fprintf(asm_file, "\n%s ", long_op); - assemble_name(asm_file, current_function_original_name); - fputs(".TDESC\n", asm_file); - text_section(); - #endif - } - - - /* Expand a library call to __builtin_saveregs. */ - rtx - i860_saveregs () - { - rtx fn = gen_rtx_SYMBOL_REF (Pmode, "__builtin_saveregs"); - rtx save = gen_reg_rtx (Pmode); - rtx valreg = LIBCALL_VALUE (Pmode); - rtx ret; - - /* The return value register overlaps the first argument register. - Save and restore it around the call. */ - emit_move_insn (save, valreg); - ret = emit_library_call_value (fn, NULL_RTX, 1, Pmode, 0); - if (GET_CODE (ret) != REG || REGNO (ret) < FIRST_PSEUDO_REGISTER) - ret = copy_to_reg (ret); - emit_move_insn (valreg, save); - - return ret; - } - - tree - i860_build_va_list () - { - tree field_ireg_used, field_freg_used, field_reg_base, field_mem_ptr; - tree record; - - record = make_node (RECORD_TYPE); - - field_ireg_used = build_decl (FIELD_DECL, get_identifier ("__ireg_used"), - unsigned_type_node); - field_freg_used = build_decl (FIELD_DECL, get_identifier ("__freg_used"), - unsigned_type_node); - field_reg_base = build_decl (FIELD_DECL, get_identifier ("__reg_base"), - ptr_type_node); - field_mem_ptr = build_decl (FIELD_DECL, get_identifier ("__mem_ptr"), - ptr_type_node); - - DECL_FIELD_CONTEXT (field_ireg_used) = record; - DECL_FIELD_CONTEXT (field_freg_used) = record; - DECL_FIELD_CONTEXT (field_reg_base) = record; - DECL_FIELD_CONTEXT (field_mem_ptr) = record; - - #ifdef I860_SVR4_VA_LIST - TYPE_FIELDS (record) = field_ireg_used; - TREE_CHAIN (field_ireg_used) = field_freg_used; - TREE_CHAIN (field_freg_used) = field_reg_base; - TREE_CHAIN (field_reg_base) = field_mem_ptr; - #else - TYPE_FIELDS (record) = field_reg_base; - TREE_CHAIN (field_reg_base) = field_mem_ptr; - TREE_CHAIN (field_mem_ptr) = field_ireg_used; - TREE_CHAIN (field_ireg_used) = field_freg_used; - #endif - - layout_type (record); - return record; - } - - void - i860_va_start (stdarg_p, valist, nextarg) - int stdarg_p; - tree valist; - rtx nextarg; - { - tree saveregs, t; - - saveregs = make_tree (build_pointer_type (va_list_type_node), - expand_builtin_saveregs ()); - saveregs = build1 (INDIRECT_REF, va_list_type_node, saveregs); - - if (stdarg_p) - { - tree field_ireg_used, field_freg_used, field_reg_base, field_mem_ptr; - tree ireg_used, freg_used, reg_base, mem_ptr; - - #ifdef I860_SVR4_VA_LIST - field_ireg_used = TYPE_FIELDS (va_list_type_node); - field_freg_used = TREE_CHAIN (field_ireg_used); - field_reg_base = TREE_CHAIN (field_freg_used); - field_mem_ptr = TREE_CHAIN (field_reg_base); - #else - field_reg_base = TYPE_FIELDS (va_list_type_node); - field_mem_ptr = TREE_CHAIN (field_reg_base); - field_ireg_used = TREE_CHAIN (field_mem_ptr); - field_freg_used = TREE_CHAIN (field_ireg_used); - #endif - - ireg_used = build (COMPONENT_REF, TREE_TYPE (field_ireg_used), - valist, field_ireg_used); - freg_used = build (COMPONENT_REF, TREE_TYPE (field_freg_used), - valist, field_freg_used); - reg_base = build (COMPONENT_REF, TREE_TYPE (field_reg_base), - valist, field_reg_base); - mem_ptr = build (COMPONENT_REF, TREE_TYPE (field_mem_ptr), - valist, field_mem_ptr); - - t = build_int_2 (current_function_args_info.ints, 0); - t = build (MODIFY_EXPR, TREE_TYPE (ireg_used), ireg_used, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - t = build_int_2 (ROUNDUP (current_function_args_info.floats, 8), 0); - t = build (MODIFY_EXPR, TREE_TYPE (freg_used), freg_used, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - t = build (COMPONENT_REF, TREE_TYPE (field_reg_base), - saveregs, field_reg_base); - t = build (MODIFY_EXPR, TREE_TYPE (reg_base), reg_base, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - t = make_tree (ptr_type_node, nextarg); - t = build (MODIFY_EXPR, TREE_TYPE (mem_ptr), mem_ptr, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - } - else - { - t = build (MODIFY_EXPR, va_list_type_node, valist, saveregs); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - } - } - - #define NUM_PARM_FREGS 8 - #define NUM_PARM_IREGS 12 - #ifdef I860_SVR4_VARARGS - #define FREG_OFFSET 0 - #define IREG_OFFSET (NUM_PARM_FREGS * UNITS_PER_WORD) - #else - #define FREG_OFFSET (NUM_PARM_IREGS * UNITS_PER_WORD) - #define IREG_OFFSET 0 - #endif - - rtx - i860_va_arg (valist, type) - tree valist, type; - { - tree field_ireg_used, field_freg_used, field_reg_base, field_mem_ptr; - tree type_ptr_node, t; - rtx lab_over = NULL_RTX; - rtx ret, val; - HOST_WIDE_INT align; - - #ifdef I860_SVR4_VA_LIST - field_ireg_used = TYPE_FIELDS (va_list_type_node); - field_freg_used = TREE_CHAIN (field_ireg_used); - field_reg_base = TREE_CHAIN (field_freg_used); - field_mem_ptr = TREE_CHAIN (field_reg_base); - #else - field_reg_base = TYPE_FIELDS (va_list_type_node); - field_mem_ptr = TREE_CHAIN (field_reg_base); - field_ireg_used = TREE_CHAIN (field_mem_ptr); - field_freg_used = TREE_CHAIN (field_ireg_used); - #endif - - field_ireg_used = build (COMPONENT_REF, TREE_TYPE (field_ireg_used), - valist, field_ireg_used); - field_freg_used = build (COMPONENT_REF, TREE_TYPE (field_freg_used), - valist, field_freg_used); - field_reg_base = build (COMPONENT_REF, TREE_TYPE (field_reg_base), - valist, field_reg_base); - field_mem_ptr = build (COMPONENT_REF, TREE_TYPE (field_mem_ptr), - valist, field_mem_ptr); - - ret = gen_reg_rtx (Pmode); - type_ptr_node = build_pointer_type (type); - - if (! AGGREGATE_TYPE_P (type)) - { - int nparm, incr, ofs; - tree field; - rtx lab_false; - - if (FLOAT_TYPE_P (type)) - { - field = field_freg_used; - nparm = NUM_PARM_FREGS; - incr = 2; - ofs = FREG_OFFSET; - } - else - { - field = field_ireg_used; - nparm = NUM_PARM_IREGS; - incr = int_size_in_bytes (type) / UNITS_PER_WORD; - ofs = IREG_OFFSET; - } - - lab_false = gen_label_rtx (); - lab_over = gen_label_rtx (); - - emit_cmp_and_jump_insns (expand_expr (field, NULL_RTX, 0, 0), - GEN_INT (nparm - incr), GT, const0_rtx, - TYPE_MODE (TREE_TYPE (field)), - TREE_UNSIGNED (field), lab_false); - - t = fold (build (POSTINCREMENT_EXPR, TREE_TYPE (field), field, - build_int_2 (incr, 0))); - TREE_SIDE_EFFECTS (t) = 1; - - t = fold (build (MULT_EXPR, TREE_TYPE (field), field, - build_int_2 (UNITS_PER_WORD, 0))); - TREE_SIDE_EFFECTS (t) = 1; - - t = fold (build (PLUS_EXPR, ptr_type_node, field_reg_base, - fold (build (PLUS_EXPR, TREE_TYPE (field), t, - build_int_2 (ofs, 0))))); - TREE_SIDE_EFFECTS (t) = 1; - - val = expand_expr (t, ret, VOIDmode, EXPAND_NORMAL); - if (val != ret) - emit_move_insn (ret, val); - - emit_jump_insn (gen_jump (lab_over)); - emit_barrier (); - emit_label (lab_false); - } - - align = TYPE_ALIGN (type); - if (align < BITS_PER_WORD) - align = BITS_PER_WORD; - align /= BITS_PER_UNIT; - - t = build (PLUS_EXPR, ptr_type_node, field_mem_ptr, - build_int_2 (align - 1, 0)); - t = build (BIT_AND_EXPR, ptr_type_node, t, build_int_2 (-align, -1)); - - val = expand_expr (t, ret, VOIDmode, EXPAND_NORMAL); - if (val != ret) - emit_move_insn (ret, val); - - t = fold (build (PLUS_EXPR, ptr_type_node, - make_tree (ptr_type_node, ret), - build_int_2 (int_size_in_bytes (type), 0))); - t = build (MODIFY_EXPR, ptr_type_node, field_mem_ptr, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - if (lab_over) - emit_label (lab_over); - - return ret; - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/i860.h gcc-3.3/gcc/config/i860/i860.h *** gcc-3.2.3/gcc/config/i860/i860.h 2002-01-08 22:51:32.000000000 +0000 --- gcc-3.3/gcc/config/i860/i860.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1332 **** - /* Definitions of target machine for GNU compiler, for Intel 860. - Copyright (C) 1989, 1991, 1993, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002 Free Software Foundation, Inc. - Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to - the whims of the System V Release 4 assembler. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* Note that some other tm.h files include this one and then override - many of the definitions that relate to assembler syntax. */ - - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Di860 -Dunix -Asystem=unix -Asystem=svr4 -Acpu=i860 -Amachine=i860" - - /* Print subsidiary information on the compiler version in use. */ - #define TARGET_VERSION fprintf (stderr, " (i860)"); - - /* Run-time compilation parameters selecting different hardware subsets - or supersets. - - On the i860, we have one: TARGET_XP. This option allows gcc to generate - additional instructions available only on the newer i860 XP (but not on - the older i860 XR). - */ - - extern int target_flags; - - /* Nonzero if we should generate code to use the fpu. */ - #define TARGET_XP (target_flags & 1) - - /* Macro to define tables used to set the flags. - This is a list in braces of pairs in braces, - each pair being { "NAME", VALUE } - where VALUE is the bits to set or minus the bits to clear. - An empty string NAME is used to identify the default VALUE. */ - - #define TARGET_SWITCHES \ - { {"xp", 1, N_("Generate code which uses the FPU")}, \ - {"noxp", -1, N_("Do not generate code which uses the FPU")}, \ - {"xr", -1, N_("Do not generate code which uses the FPU")}, \ - { "", TARGET_DEFAULT, NULL}} - - #define TARGET_DEFAULT 0 - - /* target machine storage layout */ - - /* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. - This is a moot question on the i860 due to the lack of bit-field insns. */ - #define BITS_BIG_ENDIAN 0 - - /* Define this if most significant byte of a word is the lowest numbered. */ - /* That is not true on i860 in the mode we will use. */ - #define BYTES_BIG_ENDIAN 0 - - /* Define this if most significant word of a multiword number is the lowest - numbered. */ - /* For the i860 this goes with BYTES_BIG_ENDIAN. */ - /* NOTE: GCC probably cannot support a big-endian i860 - because GCC fundamentally assumes that the order of words - in memory as the same as the order in registers. - That's not true for the big-endian i860. - The big-endian i860 isn't important enough to - justify the trouble of changing this assumption. */ - #define WORDS_BIG_ENDIAN 0 - - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD 4 - - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - #define PARM_BOUNDARY 32 - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #define STACK_BOUNDARY 128 - - /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 64 - - /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 32 - - /* Every structure's size must be a multiple of this. */ - #define STRUCTURE_SIZE_BOUNDARY 8 - - /* Minimum size in bits of the largest boundary to which any - and all fundamental data types supported by the hardware - might need to be aligned. No data type wants to be aligned - rounder than this. The i860 supports 128-bit (long double) - floating point quantities, and the System V Release 4 i860 - ABI requires these to be aligned to 16-byte (128-bit) - boundaries. */ - #define BIGGEST_ALIGNMENT 128 - - /* Set this nonzero if move instructions will actually fail to work - when given unaligned data. */ - #define STRICT_ALIGNMENT 1 - - /* If bit field type is int, don't let it cross an int, - and give entire struct the alignment of an int. */ - #define PCC_BITFIELD_TYPE_MATTERS 1 - - /* Standard register usage. */ - - /* Number of actual hardware registers. - The hardware registers are assigned numbers for the compiler - from 0 to just below FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. - - i860 has 32 fullword registers and 32 floating point registers. */ - - #define FIRST_PSEUDO_REGISTER 64 - - /* 1 for registers that have pervasive standard uses - and are not available for the register allocator. - On the i860, this includes the always-0 registers - and fp, sp, arg pointer, and the return address. - Also r31, used for special purposes for constant addresses. */ - #define FIXED_REGISTERS \ - {1, 1, 1, 1, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 1, \ - 1, 1, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0} - - /* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - On the i860, these are r0-r3, r16-r31, f0, f1, and f16-f31. */ - #define CALL_USED_REGISTERS \ - {1, 1, 1, 1, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1} - - /* Try to get a non-preserved register before trying to get one we will - have to preserve. Try to get an FP register only *after* trying to - get a general register, because it is relatively expensive to move - into or out of an FP register. */ - - #define REG_ALLOC_ORDER \ - {31, 30, 29, 28, 27, 26, 25, 24, \ - 23, 22, 21, 20, 19, 18, 17, 16, \ - 15, 14, 13, 12, 11, 10, 9, 8, \ - 7, 6, 5, 4, 3, 2, 1, 0, \ - 63, 62, 61, 60, 59, 58, 57, 56, \ - 55, 54, 53, 52, 51, 50, 49, 48, \ - 47, 46, 45, 44, 43, 42, 41, 40, \ - 39, 38, 37, 36, 35, 34, 33, 32} - - /* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. - - On the i860, all registers hold 32 bits worth. */ - #define HARD_REGNO_NREGS(REGNO, MODE) \ - (((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) - - #define REGNO_MODE_ALIGNED(REGNO, MODE) \ - (((REGNO) % ((GET_MODE_UNIT_SIZE (MODE) + 3) / 4)) == 0) - - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. - - On the i860, we allow anything to go into any registers, but we require - any sort of value going into the FP registers to be properly aligned - (based on its size) within the FP register set. - */ - #define HARD_REGNO_MODE_OK(REGNO, MODE) \ - (((REGNO) < 32) \ - || (MODE) == VOIDmode || (MODE) == BLKmode \ - || REGNO_MODE_ALIGNED (REGNO, MODE)) - - /* Value is 1 if it is a good idea to tie two pseudo registers - when one has mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. */ - /* I think that is not always true; alignment restrictions for doubles - should not prevent tying them with singles. So try allowing that. - On the other hand, don't let fixed and floating be tied; - this restriction is not necessary, but may make better code. */ - #define MODES_TIEABLE_P(MODE1, MODE2) \ - ((GET_MODE_CLASS (MODE1) == MODE_FLOAT \ - || GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT) \ - == (GET_MODE_CLASS (MODE2) == MODE_FLOAT \ - || GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT)) - - /* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - - /* i860 pc isn't overloaded on a register that the compiler knows about. */ - /* #define PC_REGNUM */ - - /* Register to use for pushing function arguments. */ - #define STACK_POINTER_REGNUM 2 - - /* Base register for access to local variables of the function. */ - #define FRAME_POINTER_REGNUM 3 - - /* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. */ - #define FRAME_POINTER_REQUIRED 1 - - /* Base register for access to arguments of the function. */ - #define ARG_POINTER_REGNUM 28 - - /* Register in which static-chain is passed to a function. */ - #define STATIC_CHAIN_REGNUM 29 - - /* Register in which address to store a structure value - is passed to a function. */ - #define STRUCT_VALUE_REGNUM 16 - - /* Register to use when a source of a floating-point zero is needed. */ - #define F0_REGNUM 32 - - /* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. */ - - /* The i860 has two kinds of registers, hence four classes. */ - - enum reg_class { NO_REGS, GENERAL_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES }; - - #define N_REG_CLASSES (int) LIM_REG_CLASSES - - /* Give names of register classes as strings for dump file. */ - - #define REG_CLASS_NAMES \ - {"NO_REGS", "GENERAL_REGS", "FP_REGS", "ALL_REGS" } - - /* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. */ - - #define REG_CLASS_CONTENTS \ - {{0, 0}, {0xffffffff, 0}, \ - {0, 0xffffffff}, {0xffffffff, 0xffffffff}} - - /* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - - #define REGNO_REG_CLASS(REGNO) \ - ((REGNO) >= 32 ? FP_REGS : GENERAL_REGS) - - /* The class value for index registers, and the one for base regs. */ - #define INDEX_REG_CLASS GENERAL_REGS - #define BASE_REG_CLASS GENERAL_REGS - - /* Get reg_class from a letter such as appears in the machine description. */ - - #define REG_CLASS_FROM_LETTER(C) \ - ((C) == 'f' ? FP_REGS : NO_REGS) - - /* The letters I, J, K, L and M in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. - - For the i860, `I' is used for the range of constants - an add/subtract insn can actually contain. - But not including -0x8000, since we need - to negate the constant sometimes. - `J' is used for the range which is just zero (since that is R0). - `K' is used for the range allowed in bte. - `L' is used for the range allowed in logical insns. */ - - #define SMALL_INT(X) ((unsigned) (INTVAL (X) + 0x7fff) < 0xffff) - - #define LOGIC_INT(X) ((unsigned) INTVAL (X) < 0x10000) - - #define SMALL_INTVAL(X) ((unsigned) ((X) + 0x7fff) < 0xffff) - - #define LOGIC_INTVAL(X) ((unsigned) (X) < 0x10000) - - #define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'I' ? ((unsigned) (VALUE) + 0x7fff) < 0xffff \ - : (C) == 'J' ? (VALUE) == 0 \ - : (C) == 'K' ? (unsigned) (VALUE) < 0x20 \ - : (C) == 'L' ? (unsigned) (VALUE) < 0x10000 \ - : 0) - - /* Return non-zero if the given VALUE is acceptable for the - constraint letter C. For the i860, constraint letter 'G' - permits only a floating-point zero value. */ - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'G' && CONST_DOUBLE_LOW ((VALUE)) == 0 \ - && CONST_DOUBLE_HIGH ((VALUE)) == 0) - - /* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. - - If we are trying to put an integer constant into some register, prefer an - integer register to an FP register. If we are trying to put a - non-zero floating-point constant into some register, use an integer - register if the constant is SFmode and GENERAL_REGS is one of our options. - Otherwise, put the constant into memory. - - When reloading something smaller than a word, use a general reg - rather than an FP reg. */ - - #define PREFERRED_RELOAD_CLASS(X,CLASS) \ - ((CLASS) == ALL_REGS && GET_CODE (X) == CONST_INT ? GENERAL_REGS \ - : ((GET_MODE (X) == HImode || GET_MODE (X) == QImode) \ - && (CLASS) == ALL_REGS) \ - ? GENERAL_REGS \ - : (GET_CODE (X) == CONST_DOUBLE \ - && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ - && ! CONST_DOUBLE_OK_FOR_LETTER_P (X, 'G')) \ - ? ((CLASS) == ALL_REGS && GET_MODE (X) == SFmode ? GENERAL_REGS \ - : (CLASS) == GENERAL_REGS && GET_MODE (X) == SFmode ? (CLASS) \ - : NO_REGS) \ - : (CLASS)) - - /* Return the register class of a scratch register needed to copy IN into - a register in CLASS in MODE. If it can be done directly, NO_REGS is - returned. */ - - #define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,IN) \ - ((CLASS) == FP_REGS && CONSTANT_P (IN) ? GENERAL_REGS : NO_REGS) - - /* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. */ - /* On the i860, this is the size of MODE in words. */ - #define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Stack layout; function entry, exit and calling. */ - - /* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ - #define STACK_GROWS_DOWNWARD - - /* Define this if the nominal address of the stack frame - is at the high-address end of the local variables; - that is, each additional local variable allocated - goes at a more negative offset in the frame. */ - #define FRAME_GROWS_DOWNWARD - - /* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. */ - #define STARTING_FRAME_OFFSET 0 - - /* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. - On the i860, don't define this because there are no push insns. */ - /* #define PUSH_ROUNDING(BYTES) */ - - /* Offset of first parameter from the argument pointer register value. */ - #define FIRST_PARM_OFFSET(FNDECL) 0 - - /* Value is the number of bytes of arguments automatically - popped when returning from a subroutine call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - SIZE is the number of bytes of arguments passed on the stack. */ - - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 - - /* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - - /* On the i860, the value register depends on the mode. */ - - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), \ - (GET_MODE_CLASS (TYPE_MODE (VALTYPE)) == MODE_FLOAT \ - ? 40 : 16)) - - /* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - - #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG (MODE, \ - (GET_MODE_CLASS ((MODE)) == MODE_FLOAT \ - ? 40 : 16)) - - /* 1 if N is a possible register number for a function value - as seen by the caller. */ - - #define FUNCTION_VALUE_REGNO_P(N) ((N) == 40 || (N) == 16) - - /* 1 if N is a possible register number for function argument passing. - On the i860, these are r16-r27 and f8-f15. */ - - #define FUNCTION_ARG_REGNO_P(N) \ - (((N) < 28 && (N) > 15) || ((N) < 48 && (N) >= 40)) - - /* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - On the i860, we must count separately the number of general registers used - and the number of float registers used. */ - - struct cumulative_args { int ints, floats; }; - #define CUMULATIVE_ARGS struct cumulative_args - - /* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. - - On the i860, the general-reg offset normally starts at 0, - but starts at 4 bytes - when the function gets a structure-value-address as an - invisible first argument. */ - - #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ - ((CUM).ints = ((FNTYPE) != 0 && aggregate_value_p (TREE_TYPE ((FNTYPE))) \ - ? 4 : 0), \ - (CUM).floats = 0) - - /* Machine-specific subroutines of the following macros. */ - #define CEILING(X,Y) (((X) + (Y) - 1) / (Y)) - #define ROUNDUP(X,Y) (CEILING ((X), (Y)) * (Y)) - - /* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be available.) - Floats, and doubleword ints, are returned in f regs; - other ints, in r regs. - Aggregates, even short ones, are passed in memory. */ - - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - ((TYPE) != 0 && (TREE_CODE ((TYPE)) == RECORD_TYPE \ - || TREE_CODE ((TYPE)) == UNION_TYPE) \ - ? 0 \ - : GET_MODE_CLASS ((MODE)) == MODE_FLOAT || (MODE) == DImode \ - ? ((CUM).floats = (ROUNDUP ((CUM).floats, GET_MODE_SIZE ((MODE))) \ - + ROUNDUP (GET_MODE_SIZE (MODE), 4))) \ - : GET_MODE_CLASS ((MODE)) == MODE_INT \ - ? ((CUM).ints = (ROUNDUP ((CUM).ints, GET_MODE_SIZE ((MODE))) \ - + ROUNDUP (GET_MODE_SIZE (MODE), 4))) \ - : 0) - - /* Determine where to put an argument to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). */ - - /* On the i860, the first 12 words of integer arguments go in r16-r27, - and the first 8 words of floating arguments go in f8-f15. - DImode values are treated as floats. */ - - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - ((TYPE) != 0 && (TREE_CODE ((TYPE)) == RECORD_TYPE \ - || TREE_CODE ((TYPE)) == UNION_TYPE) \ - ? 0 \ - : GET_MODE_CLASS ((MODE)) == MODE_FLOAT || (MODE) == DImode \ - ? (ROUNDUP ((CUM).floats, GET_MODE_SIZE ((MODE))) < 32 \ - ? gen_rtx_REG ((MODE), \ - 40 + (ROUNDUP ((CUM).floats, \ - GET_MODE_SIZE ((MODE))) \ - / 4)) \ - : 0) \ - : GET_MODE_CLASS ((MODE)) == MODE_INT \ - ? (ROUNDUP ((CUM).ints, GET_MODE_SIZE ((MODE))) < 48 \ - ? gen_rtx_REG ((MODE), \ - 16 + (ROUNDUP ((CUM).ints, \ - GET_MODE_SIZE ((MODE))) \ - / 4)) \ - : 0) \ - : 0) - - /* For an arg passed partly in registers and partly in memory, - this is the number of registers used. - For args passed entirely in registers or entirely in memory, zero. */ - - #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0 - - /* If defined, a C expression that gives the alignment boundary, in - bits, of an argument with the specified mode and type. If it is - not defined, `PARM_BOUNDARY' is used for all arguments. */ - - #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ - (((TYPE) != 0) \ - ? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY) \ - ? PARM_BOUNDARY \ - : TYPE_ALIGN(TYPE)) \ - : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \ - ? PARM_BOUNDARY \ - : GET_MODE_ALIGNMENT(MODE))) - - /* Output a no-op just before the beginning of the function, - to ensure that there does not appear to be a delayed branch there. - Such a thing would confuse interrupt recovery. */ - #define ASM_OUTPUT_FUNCTION_PREFIX(FILE,NAME) \ - fprintf (FILE, "\tnop\n") - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #define FUNCTION_PROFILER(FILE, LABELNO) \ - abort (); - - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - - #define EXIT_IGNORE_STACK 1 - - /* Generate necessary RTL for __builtin_saveregs(). */ - #define EXPAND_BUILTIN_SAVEREGS() \ - i860_saveregs() - - /* Define the `__builtin_va_list' type for the ABI. */ - #define BUILD_VA_LIST_TYPE(VALIST) \ - (VALIST) = i860_build_va_list () - - /* Implement `va_start' for varargs and stdarg. */ - #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ - i860_va_start (stdarg, valist, nextarg) - - /* Implement `va_arg'. */ - #define EXPAND_BUILTIN_VA_ARG(valist, type) \ - i860_va_arg (valist, type) - - /* Store in the variable DEPTH the initial difference between the - frame pointer reg contents and the stack pointer reg contents, - as of the start of the function body. This depends on the layout - of the fixed parts of the stack frame and on how registers are saved. - - On the i860, FRAME_POINTER_REQUIRED is always 1, so the definition of this - macro doesn't matter. But it must be defined. */ - - #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \ - do { (DEPTH) = 0; } while (0) - - /* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. */ - - /* On the i860, the trampoline contains five instructions: - orh #TOP_OF_FUNCTION,r0,r31 - or #BOTTOM_OF_FUNCTION,r31,r31 - orh #TOP_OF_STATIC,r0,r29 - bri r31 - or #BOTTOM_OF_STATIC,r29,r29 */ - #define TRAMPOLINE_TEMPLATE(FILE) \ - { \ - assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xec1f0000)); \ - assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xe7ff0000)); \ - assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xec1d0000)); \ - assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x4000f800)); \ - assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xe7bd0000)); \ - } - - /* Length in units of the trampoline for entering a nested function. */ - - #define TRAMPOLINE_SIZE 20 - - /* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. - - Store hi function at +0, low function at +4, - hi static at +8, low static at +16 */ - - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - { \ - rtx cxt = force_reg (Pmode, CXT); \ - rtx fn = force_reg (Pmode, FNADDR); \ - rtx hi_cxt = expand_shift (RSHIFT_EXPR, SImode, cxt, \ - size_int (16), 0, 0); \ - rtx hi_fn = expand_shift (RSHIFT_EXPR, SImode, fn, \ - size_int (16), 0, 0); \ - emit_move_insn (gen_rtx_MEM (HImode, plus_constant (TRAMP, 16)), \ - gen_lowpart (HImode, cxt)); \ - emit_move_insn (gen_rtx_MEM (HImode, plus_constant (TRAMP, 4)), \ - gen_lowpart (HImode, fn)); \ - emit_move_insn (gen_rtx_MEM (HImode, plus_constant (TRAMP, 8)), \ - gen_lowpart (HImode, hi_cxt)); \ - emit_move_insn (gen_rtx_MEM (HImode, plus_constant (TRAMP, 0)), \ - gen_lowpart (HImode, hi_fn)); \ - } - - /* Addressing modes, and classification of registers for them. */ - - /* #define HAVE_POST_INCREMENT 0 */ - /* #define HAVE_POST_DECREMENT 0 */ - - /* #define HAVE_PRE_DECREMENT 0 */ - /* #define HAVE_PRE_INCREMENT 0 */ - - /* Macros to check register numbers against specific register classes. */ - - /* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. */ - - #define REGNO_OK_FOR_INDEX_P(REGNO) \ - ((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32) - #define REGNO_OK_FOR_BASE_P(REGNO) \ - ((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32) - #define REGNO_OK_FOR_FP_P(REGNO) \ - (((REGNO) ^ 0x20) < 32 || (unsigned) (reg_renumber[REGNO] ^ 0x20) < 32) - - /* Now macros that check whether X is a register and also, - strictly, whether it is in a specified class. - - These macros are specific to the i860, and may be used only - in code for printing assembler insns and in conditions for - define_optimization. */ - - /* 1 if X is an fp register. */ - - #define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_P (REGNO (X))) - - /* Maximum number of registers that can appear in a valid memory address. */ - - #define MAX_REGS_PER_ADDRESS 2 - - /* Recognize any constant value that is a valid address. */ - - #define CONSTANT_ADDRESS_P(X) \ - (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ - || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ - || GET_CODE (X) == HIGH) - - /* Nonzero if the constant value X is a legitimate general operand. - It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. - - On the Sparc, this is anything but a CONST_DOUBLE. - Let's try permitting CONST_DOUBLEs and see what happens. */ - - #define LEGITIMATE_CONSTANT_P(X) 1 - - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - - #ifndef REG_OK_STRICT - - /* Nonzero if X is a hard reg that can be used as an index - or if it is a pseudo reg. */ - #define REG_OK_FOR_INDEX_P(X) (((unsigned) REGNO (X)) - 32 >= 14) - /* Nonzero if X is a hard reg that can be used as a base reg - or if it is a pseudo reg. */ - #define REG_OK_FOR_BASE_P(X) (((unsigned) REGNO (X)) - 32 >= 14) - - #else - - /* Nonzero if X is a hard reg that can be used as an index. */ - #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) - /* Nonzero if X is a hard reg that can be used as a base reg. */ - #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) - - #endif - - /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. - - On the i860, the actual addresses must be REG+REG or REG+SMALLINT. - But we can treat a SYMBOL_REF as legitimate if it is part of this - function's constant-pool, because such addresses can actually - be output as REG+SMALLINT. - - The displacement in an address must be a multiple of the alignment. - - Try making SYMBOL_REF (and other things which are CONSTANT_ADDRESS_P) - a legitimate address, regardless. Because the only insns which can use - memory are load or store insns, the added hair in the machine description - is not that bad. It should also speed up the compiler by halving the number - of insns it must manage for each (MEM (SYMBOL_REF ...)) involved. */ - - #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ - { if (GET_CODE (X) == REG) \ - { if (REG_OK_FOR_BASE_P (X)) goto ADDR; } \ - else if (GET_CODE (X) == PLUS) \ - { \ - if (GET_CODE (XEXP (X, 0)) == REG \ - && REG_OK_FOR_BASE_P (XEXP (X, 0))) \ - { \ - if (GET_CODE (XEXP (X, 1)) == CONST_INT \ - && INTVAL (XEXP (X, 1)) >= -0x8000 \ - && INTVAL (XEXP (X, 1)) < 0x8000 \ - && (INTVAL (XEXP (X, 1)) & (GET_MODE_SIZE (MODE) - 1)) == 0) \ - goto ADDR; \ - } \ - else if (GET_CODE (XEXP (X, 1)) == REG \ - && REG_OK_FOR_BASE_P (XEXP (X, 1))) \ - { \ - if (GET_CODE (XEXP (X, 0)) == CONST_INT \ - && INTVAL (XEXP (X, 0)) >= -0x8000 \ - && INTVAL (XEXP (X, 0)) < 0x8000 \ - && (INTVAL (XEXP (X, 0)) & (GET_MODE_SIZE (MODE) - 1)) == 0) \ - goto ADDR; \ - } \ - } \ - else if (CONSTANT_ADDRESS_P (X)) \ - goto ADDR; \ - } - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. */ - - /* On the i860, change COMPLICATED + CONSTANT to REG+CONSTANT. - Also change a symbolic constant to a REG, - though that may not be necessary. */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ - { if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == MULT) \ - (X) = gen_rtx_PLUS (SImode, XEXP (X, 1), \ - force_operand (XEXP (X, 0), 0)); \ - if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == MULT) \ - (X) = gen_rtx_PLUS (SImode, XEXP (X, 0), \ - force_operand (XEXP (X, 1), 0)); \ - if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == PLUS) \ - (X) = gen_rtx_PLUS (SImode, XEXP (X, 1), \ - force_operand (XEXP (X, 0), 0)); \ - if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == PLUS) \ - (X) = gen_rtx_PLUS (SImode, XEXP (X, 0), \ - force_operand (XEXP (X, 1), 0)); \ - if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) != REG \ - && GET_CODE (XEXP (X, 0)) != CONST_INT) \ - (X) = gen_rtx_PLUS (SImode, XEXP (X, 1), \ - copy_to_mode_reg (SImode, XEXP (X, 0))); \ - if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) != REG \ - && GET_CODE (XEXP (X, 1)) != CONST_INT) \ - (X) = gen_rtx_PLUS (SImode, XEXP (X, 0), \ - copy_to_mode_reg (SImode, XEXP (X, 1))); \ - if (GET_CODE (x) == SYMBOL_REF) \ - (X) = copy_to_reg (X); \ - if (GET_CODE (x) == CONST) \ - (X) = copy_to_reg (X); \ - if (memory_address_p (MODE, X)) \ - goto WIN; } - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. - On the i860 this is never true. - There are some addresses that are invalid in wide modes - but valid for narrower modes, but they shouldn't affect - the places that use this macro. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE SImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - Do not define this if the table should contain absolute addresses. */ - /* #define CASE_VECTOR_PC_RELATIVE 1 */ - - /* Must pass floats to libgcc functions as doubles. */ - #define LIBGCC_NEEDS_DOUBLE 1 - - #define DIVSI3_LIBCALL "*.div" - #define UDIVSI3_LIBCALL "*.udiv" - #define REMSI3_LIBCALL "*.rem" - #define UREMSI3_LIBCALL "*.urem" - - /* Define this as 1 if `char' should by default be signed; else as 0. */ - #define DEFAULT_SIGNED_CHAR 1 - - /* Max number of bytes we can move from memory to memory - in one reasonably fast instruction. */ - #define MOVE_MAX 16 - - /* Nonzero if access to memory by bytes is slow and undesirable. */ - #define SLOW_BYTE_ACCESS 0 - - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ - #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* Value is 1 if it generates better code to perform an unsigned comparison - on the given literal integer value in the given mode when we are only - looking for an equal/non-equal result. */ - /* For the i860, if the immediate value has its high-order 27 bits zero, - then we want to engineer an unsigned comparison for EQ/NE because - such values can fit in the 5-bit immediate field of a bte or btne - instruction (which gets zero extended before comparing). For all - other immediate values on the i860, we will use signed compares - because that avoids the need for doing explicit xor's to zero_extend - the non-constant operand in cases where it was (mem:QI ...) or a - (mem:HI ...) which always gets automatically sign-extended by the - hardware upon loading. */ - - #define LITERAL_COMPARE_BETTER_UNSIGNED(intval, mode) \ - (((unsigned) (intval) & 0x1f) == (unsigned) (intval)) - - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ - #define Pmode SImode - - /* A function address in a call instruction - is a byte address (for indexing purposes) - so give the MEM rtx a byte's mode. */ - #define FUNCTION_MODE SImode - - /* Define this if addresses of constant functions - shouldn't be put through pseudo regs where they can be cse'd. - Desirable on machines where ordinary constants are expensive - but a CALL with constant address is cheap. */ - #define NO_FUNCTION_CSE - - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - - #define CONST_COSTS(RTX,CODE, OUTER_CODE) \ - case CONST_INT: \ - if (INTVAL (RTX) == 0) \ - return 0; \ - if (INTVAL (RTX) < 0x2000 && INTVAL (RTX) >= -0x2000) return 1; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 4; \ - case CONST_DOUBLE: \ - return 6; - - /* Specify the cost of a branch insn; roughly the number of extra insns that - should be added to avoid a branch. - - Set this to 3 on the i860 since branches may often take three cycles. */ - - #define BRANCH_COST 3 - - /* Tell final.c how to eliminate redundant test instructions. */ - - /* Here we define machine-dependent flags and fields in cc_status - (see `conditions.h'). */ - - /* This holds the value sourcing h%r31. We keep this info - around so that mem/mem ops, such as increment and decrement, - etc, can be performed reasonably. */ - #define CC_STATUS_MDEP rtx - - #define CC_STATUS_MDEP_INIT (cc_status.mdep = 0) - - #define CC_NEGATED 01000 - - /* We use this macro in those places in the i860.md file where we would - normally just do a CC_STATUS_INIT (for other machines). This macro - differs from CC_STATUS_INIT in that it doesn't mess with the special - bits or fields which describe what is currently in the special r31 - scratch register, but it does clear out everything that actually - relates to the condition code bit of the i860. */ - - #define CC_STATUS_PARTIAL_INIT \ - (cc_status.flags &= (CC_KNOW_HI_R31 | CC_HI_R31_ADJ), \ - cc_status.value1 = 0, \ - cc_status.value2 = 0) - - /* Nonzero if we know the value of h%r31. */ - #define CC_KNOW_HI_R31 0100000 - - /* Nonzero if h%r31 is actually ha%something, rather than h%something. */ - #define CC_HI_R31_ADJ 0200000 - - /* Store in cc_status the expressions - that the condition codes will describe - after execution of an instruction whose pattern is EXP. - Do not alter them if the instruction would not alter the cc's. */ - - /* On the i860, only compare insns set a useful condition code. */ - - #define NOTICE_UPDATE_CC(EXP, INSN) \ - { cc_status.flags &= (CC_KNOW_HI_R31 | CC_HI_R31_ADJ); \ - cc_status.value1 = 0; cc_status.value2 = 0; } - - /* Control the assembler format that we output. */ - - /* Assembler pseudos to introduce constants of various size. */ - - #define ASM_DOUBLE "\t.double" - - /* Output at beginning of assembler file. */ - /* The .file command should always begin the output. */ - - #define ASM_FILE_START(FILE) - #if 0 - #define ASM_FILE_START(FILE) \ - do { output_file_directive ((FILE), main_input_filename); \ - if (optimize) ASM_FILE_START_1 (FILE); \ - } while (0) - #endif - - #define ASM_FILE_START_1(FILE) - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #define ASM_APP_ON "" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #define ASM_APP_OFF "" - - /* Output before read-only data. */ - - #define TEXT_SECTION_ASM_OP "\t.text" - - /* Output before writable data. */ - - #define DATA_SECTION_ASM_OP "\t.data" - - /* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - - #define REGISTER_NAMES \ - {"r0", "r1", "sp", "fp", "r4", "r5", "r6", "r7", "r8", "r9", \ - "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", \ - "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", \ - "r30", "r31", \ - "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", \ - "f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", \ - "f20", "f21", "f22", "f23", "f24", "f25", "f26", "f27", "f28", "f29", \ - "f30", "f31" } - - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - - /* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs (".globl ", FILE); \ - assemble_name (FILE, NAME); \ - fputs ("\n", FILE); \ - } while (0) - - /* The prefix to add to user-visible assembler symbols. - - This definition is overridden in i860v4.h because under System V - Release 4, user-level symbols are *not* prefixed with underscores in - the generated assembly code. */ - - #define USER_LABEL_PREFIX "_" - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) - - /* This is how to output an internal numbered label which - labels a jump table. */ - - #undef ASM_OUTPUT_CASE_LABEL - #define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \ - do { ASM_OUTPUT_ALIGN ((FILE), 2); \ - ASM_OUTPUT_INTERNAL_LABEL ((FILE), PREFIX, NUM); \ - } while (0) - - /* Output at the end of a jump table. */ - - #define ASM_OUTPUT_CASE_END(FILE,NUM,INSN) \ - fprintf (FILE, ".text\n") - - /* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.%s%d", PREFIX, NUM) - - /* This is how to output code to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\taddu -16,%ssp,%ssp\n\t%sst.l %s%s,0(%ssp)\n", \ - i860_reg_prefix, i860_reg_prefix, \ - ((REGNO) < 32 ? "" : "f"), \ - i860_reg_prefix, reg_names[REGNO], \ - i860_reg_prefix) - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\t%sld.l 0(%ssp),%s%s\n\taddu 16,%ssp,%ssp\n", \ - ((REGNO) < 32 ? "" : "f"), \ - i860_reg_prefix, \ - i860_reg_prefix, reg_names[REGNO], \ - i860_reg_prefix, i860_reg_prefix) - - /* This is how to output an element of a case-vector that is absolute. */ - - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.long .L%d\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. - (The i860 does not use such vectors, - but we must define this macro anyway.) */ - - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL) - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG) != 0) \ - fprintf (FILE, "\t.align %d\n", 1 << (LOG)) - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\t.blkb %u\n", (SIZE)) - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - - /* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. - For `%' followed by punctuation, CODE is the punctuation and X is null. - - In the following comments, the term "constant address" is used frequently. - For an exact definition of what constitutes a "constant address" see the - output_addr_const routine in final.c - - On the i860, the following target-specific special codes are recognized: - - `r' The operand can be anything, but if it is an immediate zero - value (either integer or floating point) then it will be - represented as `r0' or as `f0' (respectively). - - `m' The operand is a memory ref (to a constant address) but print - its address as a constant. - - `L' The operand is a numeric constant, a constant address, or - a memory ref to a constant address. Print the correct - notation to yield the low part of the given value or - address or the low part of the address of the referred - to memory object. - - `H' The operand is a numeric constant, a constant address, or - a memory ref to a constant address. Print the correct - notation to yield the high part of the given value or - address or the high part of the address of the referred - to memory object. - - `h' The operand is a numeric constant, a constant address, or - a memory ref to a constant address. Either print the - correct notation to yield the plain high part of the - given value or address (or the plain high part of the - address of the memory object) or else print the correct - notation to yield the "adjusted" high part of the given - address (or of the address of the referred to memory object). - - The choice of what to print depends upon whether the address - in question is relocatable or not. If it is relocatable, - print the notation to get the adjusted high part. Otherwise - just print the notation to get the plain high part. Note - that "adjusted" high parts are generally used *only* when - the next following instruction uses the low part of the - address as an offset, as in `offset(reg)'. - - `R' The operand is a floating-pointer register. Print the - name of the next following (32-bit) floating-point register. - (This is used when moving a value into just the most - significant part of a floating-point register pair.) - - `?' (takes no operand) Substitute the value of i860_reg_prefix - at this point. The value of i860_reg_prefix is typically - a null string for most i860 targets, but for System V - Release 4 the i860 assembler syntax requires that all - names of registers be prefixed with a percent-sign, so - for SVR4, the value of i860_reg_prefix is initialized to - "%" in i860.c. - */ - - extern const char *i860_reg_prefix; - - #define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '?') - - /* The following macro definition is overridden in i860v4.h - because the svr4 i860 assembler required a different syntax - for getting parts of constant/relocatable values. */ - - #define PRINT_OPERAND_PART(FILE, X, PART_CODE) \ - do { fprintf (FILE, "%s%%", PART_CODE); \ - output_address (X); \ - } while (0) - - #define OPERAND_LOW_PART "l" - #define OPERAND_HIGH_PART "h" - /* NOTE: All documentation available for the i860 sez that you must - use "ha" to get the relocated high part of a relocatable, but - reality sez different. */ - #define OPERAND_HIGH_ADJ_PART "ha" - - #define PRINT_OPERAND(FILE, X, CODE) \ - { if ((CODE) == '?') \ - fprintf (FILE, "%s", i860_reg_prefix); \ - else if (CODE == 'R') \ - fprintf (FILE, "%s%s", i860_reg_prefix, reg_names[REGNO (X) + 1]); \ - else if (GET_CODE (X) == REG) \ - fprintf (FILE, "%s%s", i860_reg_prefix, reg_names[REGNO (X)]); \ - else if ((CODE) == 'm') \ - output_address (XEXP (X, 0)); \ - else if ((CODE) == 'L') \ - { \ - if (GET_CODE (X) == MEM) \ - PRINT_OPERAND_PART (FILE, XEXP (X, 0), OPERAND_LOW_PART); \ - else \ - PRINT_OPERAND_PART (FILE, X, OPERAND_LOW_PART); \ - } \ - else if ((CODE) == 'H') \ - { \ - if (GET_CODE (X) == MEM) \ - PRINT_OPERAND_PART (FILE, XEXP (X, 0), OPERAND_HIGH_PART); \ - else \ - PRINT_OPERAND_PART (FILE, X, OPERAND_HIGH_PART); \ - } \ - else if ((CODE) == 'h') \ - { \ - if (GET_CODE (X) == MEM) \ - PRINT_OPERAND_PART (FILE, XEXP (X, 0), OPERAND_HIGH_ADJ_PART); \ - else \ - PRINT_OPERAND_PART (FILE, X, OPERAND_HIGH_ADJ_PART); \ - } \ - else if (GET_CODE (X) == MEM) \ - output_address (XEXP (X, 0)); \ - else if ((CODE) == 'r' && (X) == const0_rtx) \ - fprintf (FILE, "%sr0", i860_reg_prefix); \ - else if ((CODE) == 'r' && (X) == CONST0_RTX (GET_MODE (X))) \ - fprintf (FILE, "%sf0", i860_reg_prefix); \ - else if (GET_CODE (X) == CONST_DOUBLE) \ - fprintf (FILE, "0x%lx", sfmode_constant_to_ulong (X)); \ - else \ - output_addr_const (FILE, X); } - - /* Print a memory address as an operand to reference that memory location. */ - - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - { register rtx addr = ADDR; \ - if (GET_CODE (addr) == REG) \ - { \ - fprintf (FILE, "0(%s%s)", \ - i860_reg_prefix, reg_names[REGNO (addr)]); \ - } \ - else if (GET_CODE (addr) == CONST_DOUBLE \ - && GET_MODE (addr) == SFmode) \ - fprintf (FILE, "0x%lx", sfmode_constant_to_ulong (addr)); \ - else if (GET_CODE (addr) == PLUS) \ - { \ - if ((GET_CODE (XEXP (addr, 0)) == CONST_INT) \ - && (GET_CODE (XEXP (addr, 1)) == REG)) \ - fprintf (FILE, "%d(%s%s)", INTVAL (XEXP (addr, 0)), \ - i860_reg_prefix, reg_names[REGNO (XEXP (addr, 1))]);\ - else if ((GET_CODE (XEXP (addr, 1)) == CONST_INT) \ - && (GET_CODE (XEXP (addr, 0)) == REG)) \ - fprintf (FILE, "%d(%s%s)", INTVAL (XEXP (addr, 1)), \ - i860_reg_prefix, reg_names[REGNO (XEXP (addr, 0))]);\ - else if ((GET_CODE (XEXP (addr, 0)) == REG) \ - && (GET_CODE (XEXP (addr, 1)) == REG)) \ - fprintf (FILE, "%s%s(%s%s)", \ - i860_reg_prefix, reg_names[REGNO (XEXP (addr, 0))], \ - i860_reg_prefix, reg_names[REGNO (XEXP (addr, 1))]);\ - else \ - output_addr_const (FILE, addr); \ - } \ - else \ - { \ - output_addr_const (FILE, addr); \ - } \ - } - - /* Optionally define this if you have added predicates to - `MACHINE.c'. This macro is called within an initializer of an - array of structures. The first field in the structure is the - name of a predicate and the second field is an array of rtl - codes. For each predicate, list all rtl codes that can be in - expressions matched by the predicate. The list should have a - trailing comma. Here is an example of two entries in the list - for a typical RISC machine: - - #define PREDICATE_CODES \ - {"gen_reg_rtx_operand", {SUBREG, REG}}, \ - {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}}, - - Defining this macro does not affect the generated code (however, - incorrect definitions that omit an rtl code that may be matched - by the predicate can cause the compiler to malfunction). - Instead, it allows the table built by `genrecog' to be more - compact and efficient, thus speeding up the compiler. The most - important predicates to include in the list specified by this - macro are thoses used in the most insn patterns. */ - - #define PREDICATE_CODES \ - {"reg_or_0_operand", {REG, SUBREG, CONST_INT}}, \ - {"arith_operand", {REG, SUBREG, CONST_INT}}, \ - {"logic_operand", {REG, SUBREG, CONST_INT}}, \ - {"shift_operand", {REG, SUBREG, CONST_INT}}, \ - {"compare_operand", {REG, SUBREG, CONST_INT}}, \ - {"arith_const_operand", {CONST_INT}}, \ - {"logic_const_operand", {CONST_INT}}, \ - {"bte_operand", {REG, SUBREG, CONST_INT}}, \ - {"indexed_operand", {MEM}}, \ - {"load_operand", {MEM}}, \ - {"small_int", {CONST_INT}}, \ - {"logic_int", {CONST_INT}}, \ - {"call_insn_operand", {MEM}}, - - /* Define the information needed to generate branch insns. This is stored - from the compare operation. Note that we can't use "rtx" here since it - hasn't been defined! */ - - extern struct rtx_def *i860_compare_op0, *i860_compare_op1; --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/i860.md gcc-3.3/gcc/config/i860/i860.md *** gcc-3.2.3/gcc/config/i860/i860.md 2001-10-28 13:22:00.000000000 +0000 --- gcc-3.3/gcc/config/i860/i860.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2327 **** - ;;- Machine description for Intel 860 chip for GNU C compiler - ;; Copyright (C) 1989, 1990, 1997, 1998, 1999, 2000 - ;; Free Software Foundation, Inc. - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - - ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - - ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code - ;;- updates for most instructions. - - ;;- Operand classes for the register allocator: - - /* Bit-test instructions. */ - - (define_insn "" - [(set (cc0) (eq (and:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "logic_operand" "rL")) - (const_int 0)))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"and %1,%0,%?r0\"; - }") - - (define_insn "" - [(set (cc0) (ne (and:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "logic_operand" "rL")) - (const_int 0)))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"and %1,%0,%?r0\"; - }") - - (define_insn "" - [(set (cc0) (eq (and:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "immediate_operand" "i")) - (const_int 0)))] - "GET_CODE (operands[1]) == CONST_INT && (INTVAL (operands[1]) & 0xffff) == 0" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"andh %H1,%0,%?r0\"; - }") - - (define_insn "" - [(set (cc0) (ne (and:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "immediate_operand" "i")) - (const_int 0)))] - "GET_CODE (operands[1]) == CONST_INT && (INTVAL (operands[1]) & 0xffff) == 0" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"andh %H1,%0,%?r0\"; - }") - - (define_insn "" - [(set (cc0) (eq (ashiftrt:SI - (sign_extend:SI - (ashift:QI (match_operand:QI 0 "register_operand" "r") - (match_operand:QI 1 "logic_int" "n"))) - (match_operand:SI 2 "logic_int" "n")) - (const_int 0)))] - "" - "* - { - int width = 8 - INTVAL (operands[2]); - int pos = 8 - width - INTVAL (operands[1]); - - CC_STATUS_PARTIAL_INIT; - operands[2] = GEN_INT (~((-1) << width) << pos); - return \"and %2,%0,%?r0\"; - }") - - ;; ------------------------------------------------------------------------- - ;; SImode signed integer comparisons - ;; ------------------------------------------------------------------------- - - (define_insn "cmpeqsi" - [(set (cc0) (eq (match_operand:SI 0 "logic_operand" "r,rL") - (match_operand:SI 1 "logic_operand" "L,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[0])) - return \"xor %1,%0,%?r0\"; - else - return \"xor %0,%1,%?r0\"; - }") - - (define_insn "cmpnesi" - [(set (cc0) (ne (match_operand:SI 0 "logic_operand" "r,rL") - (match_operand:SI 1 "logic_operand" "L,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - if (REG_P (operands[0])) - return \"xor %1,%0,%?r0\"; - else - return \"xor %0,%1,%?r0\"; - }") - - (define_insn "cmpltsi" - [(set (cc0) (lt (match_operand:SI 0 "arith_operand" "r,rI") - (match_operand:SI 1 "arith_operand" "I,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[1])) - return \"subs %0,%1,%?r0\"; - else - { - cc_status.flags |= CC_REVERSED; - operands[1] = GEN_INT (- INTVAL (operands[1])); - return \"adds %1,%0,%?r0\"; - } - }") - - (define_insn "cmpgtsi" - [(set (cc0) (gt (match_operand:SI 0 "arith_operand" "r,rI") - (match_operand:SI 1 "arith_operand" "I,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[0])) - return \"subs %1,%0,%?r0\"; - else - { - cc_status.flags |= CC_REVERSED; - operands[0] = GEN_INT (- INTVAL (operands[0])); - return \"adds %0,%1,%?r0\"; - } - }") - - (define_insn "cmplesi" - [(set (cc0) (le (match_operand:SI 0 "arith_operand" "r,rI") - (match_operand:SI 1 "arith_operand" "I,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - if (REG_P (operands[0])) - return \"subs %1,%0,%?r0\"; - else - { - cc_status.flags |= CC_REVERSED; - operands[0] = GEN_INT (- INTVAL (operands[0])); - return \"adds %0,%1,%?r0\"; - } - }") - - (define_insn "cmpgesi" - [(set (cc0) (ge (match_operand:SI 0 "arith_operand" "r,rI") - (match_operand:SI 1 "arith_operand" "I,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - if (REG_P (operands[1])) - return \"subs %0,%1,%?r0\"; - else - { - cc_status.flags |= CC_REVERSED; - operands[1] = GEN_INT (- INTVAL (operands[1])); - return \"adds %1,%0,%?r0\"; - } - }") - - ;; ------------------------------------------------------------------------- - ;; SImode unsigned integer comparisons - ;; ------------------------------------------------------------------------- - - ;; WARNING! There is a small i860 hardware limitation (bug?) which we - ;; may run up against (if we are not careful) when we are trying to do - ;; unsigned comparisons like (x >= 0), (x < 0), (0 <= x), and (0 > x). - ;; Specifically, we must avoid using an `addu' instruction to perform - ;; such comparisons because the result (in the CC bit register) will - ;; come out wrong. (This fact is documented in a footnote on page 7-10 - ;; of the 1991 version of the i860 Microprocessor Family Programmer's - ;; Reference Manual). Note that unsigned comparisons of this sort are - ;; always redundant anyway, because an unsigned quantity can never be - ;; less than zero. When we see cases like this, we generate an - ;; `or K,%r0,%r0' instruction instead (where K is a constant 0 or -1) - ;; so as to get the CC bit register set properly for any subsequent - ;; conditional jump instruction. - - (define_insn "cmpgeusi" - [(set (cc0) (geu (match_operand:SI 0 "arith_operand" "r,rI") - (match_operand:SI 1 "arith_operand" "I,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[1])) - return \"subu %0,%1,%?r0\"; - else - { - if (INTVAL (operands[1]) == 0) - return \"or 0,%?r0,%?r0\"; - else - { - cc_status.flags |= CC_REVERSED; - operands[1] = GEN_INT (- INTVAL (operands[1])); - return \"addu %1,%0,%?r0\"; - } - } - }") - - (define_insn "cmpleusi" - [(set (cc0) (leu (match_operand:SI 0 "arith_operand" "r,rI") - (match_operand:SI 1 "arith_operand" "I,r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[0])) - return \"subu %1,%0,%?r0\"; - else - { - if (INTVAL (operands[0]) == 0) - return \"or 0,%?r0,%?r0\"; - else - { - cc_status.flags |= CC_REVERSED; - operands[0] = GEN_INT (- INTVAL (operands[0])); - return \"addu %0,%1,%?r0\"; - } - } - }") - - ;; ------------------------------------------------------------------------- - ;; SFmode floating-point comparisons - ;; ------------------------------------------------------------------------- - - (define_insn "cmpeqsf" - [(set (cc0) (eq (match_operand:SF 0 "reg_or_0_operand" "fG") - (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"pfeq.ss %r0,%r1,%?f0\"; - }") - - (define_insn "cmpnesf" - [(set (cc0) (ne (match_operand:SF 0 "reg_or_0_operand" "fG") - (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"pfeq.ss %r1,%r0,%?f0\"; - }") - - ;; NOTE: The i860 Programmer's Reference Manual says that when we are - ;; doing (A < B) or (A > B) comparisons, we have to use pfgt for these - ;; in order to be IEEE compliant (in case a trap occurs during these - ;; operations). Conversely, for (A <= B) or (A >= B) comparisons, we - ;; must use pfle to be IEEE compliant. - - (define_insn "cmpltsf" - [(set (cc0) (lt (match_operand:SF 0 "reg_or_0_operand" "fG") - (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"pfgt.ss %r1,%r0,%?f0\"; - }") - - (define_insn "cmpgtsf" - [(set (cc0) (gt (match_operand:SF 0 "reg_or_0_operand" "fG") - (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"pfgt.ss %r0,%r1,%?f0\"; - }") - - ;; NOTE: The pfle opcode doesn't do what you think it does. It is - ;; bass-ackwards. It *clears* the CC flag if the first operand is - ;; less than or equal to the second. Thus, we have to set CC_NEGATED - ;; for the following two patterns. - - (define_insn "cmplesf" - [(set (cc0) (le (match_operand:SF 0 "reg_or_0_operand" "fG") - (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"pfle.ss %r0,%r1,%?f0\"; - }") - - (define_insn "cmpgesf" - [(set (cc0) (ge (match_operand:SF 0 "reg_or_0_operand" "fG") - (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"pfle.ss %r1,%r0,%?f0\"; - }") - - ;; ------------------------------------------------------------------------- - ;; DFmode floating-point comparisons - ;; ------------------------------------------------------------------------- - - (define_insn "cmpeqdf" - [(set (cc0) (eq (match_operand:DF 0 "reg_or_0_operand" "fG") - (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"pfeq.dd %r0,%r1,%?f0\"; - }") - - (define_insn "cmpnedf" - [(set (cc0) (ne (match_operand:DF 0 "reg_or_0_operand" "fG") - (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"pfeq.dd %r1,%r0,%?f0\"; - }") - - ;; NOTE: The i860 Programmer's Reference Manual says that when we are - ;; doing (A < B) or (A > B) comparisons, we have to use pfgt for these - ;; in order to be IEEE compliant (in case a trap occurs during these - ;; operations). Conversely, for (A <= B) or (A >= B) comparisons, we - ;; must use pfle to be IEEE compliant. - - (define_insn "cmpltdf" - [(set (cc0) (lt (match_operand:DF 0 "reg_or_0_operand" "fG") - (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"pfgt.dd %r1,%r0,%?f0\"; - }") - - (define_insn "cmpgtdf" - [(set (cc0) (gt (match_operand:DF 0 "reg_or_0_operand" "fG") - (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"pfgt.dd %r0,%r1,%?f0\"; - }") - - ;; NOTE: The pfle opcode doesn't do what you think it does. It is - ;; bass-ackwards. It *clears* the CC flag if the first operand is - ;; less than or equal to the second. Thus, we have to set CC_NEGATED - ;; for the following two patterns. - - (define_insn "cmpledf" - [(set (cc0) (le (match_operand:DF 0 "reg_or_0_operand" "fG") - (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"pfle.dd %r0,%r1,%?f0\"; - }") - - (define_insn "cmpgedf" - [(set (cc0) (ge (match_operand:DF 0 "reg_or_0_operand" "fG") - (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - cc_status.flags |= CC_NEGATED; - return \"pfle.dd %r1,%r0,%?f0\"; - }") - - ;; ------------------------------------------------------------------------ - ;; Integer EQ/NE comparisons against constant values which will fit in the - ;; 16-bit immediate field of an instruction. These are made by combining. - ;; ------------------------------------------------------------------------ - - (define_insn "" - [(set (cc0) (eq (zero_extend:SI (match_operand:HI 0 "load_operand" "m")) - (match_operand:SI 1 "small_int" "I")))] - "INTVAL (operands[1]) >= 0" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"ld.s %0,%?r31\;xor %1,%?r31,%?r0\"; - }") - - (define_insn "" - [(set (cc0) (eq (match_operand:SI 0 "small_int" "I") - (zero_extend:SI (match_operand:HI 1 "load_operand" "m"))))] - "INTVAL (operands[0]) >= 0" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"ld.s %1,%?r31\;xor %0,%?r31,%?r0\"; - }") - - ;; ------------------------------------------------------------------------ - ;; Define the real conditional branch instructions. - ;; ------------------------------------------------------------------------ - - (define_insn "cbranch" - [(set (pc) (if_then_else (eq (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* - { - if ((cc_prev_status.flags & CC_NEGATED) == 0) - return \"bnc %l0\"; - else - return \"bc %l0\"; - }") - - (define_insn "flipped_cbranch" - [(set (pc) (if_then_else (ne (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* - { - if ((cc_prev_status.flags & CC_NEGATED) == 0) - return \"bnc %l0\"; - else - return \"bc %l0\"; - }") - - (define_insn "inverse_cbranch" - [(set (pc) (if_then_else (eq (cc0) - (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "* - { - if ((cc_prev_status.flags & CC_NEGATED) == 0) - return \"bc %l0\"; - else - return \"bnc %l0\"; - }") - - - (define_insn "flipped_inverse_cbranch" - [(set (pc) (if_then_else (ne (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "* - { - if ((cc_prev_status.flags & CC_NEGATED) == 0) - return \"bc %l0\"; - else - return \"bnc %l0\"; - }") - - ;; Simple BTE/BTNE compare-and-branch insns made by combining. - ;; Note that it is wrong to add similar patterns for QI or HImode - ;; because bte/btne always compare the whole register. - - (define_insn "" - [(set (pc) - (if_then_else (eq (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "bte_operand" "rK")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "bte %1,%0,%2") - - (define_insn "" - [(set (pc) - (if_then_else (ne (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "bte_operand" "rK")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "btne %1,%0,%2") - - (define_insn "" - [(set (pc) - (if_then_else (eq (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "bte_operand" "rK")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "btne %1,%0,%2") - - (define_insn "" - [(set (pc) - (if_then_else (ne (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "bte_operand" "rK")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "bte %1,%0,%2") - - ;; Load byte/halfword, zero-extend, & compare-and-branch insns. - ;; These are made by combining. - - (define_insn "" - [(set (pc) - (if_then_else (eq (zero_extend:SI (match_operand:QI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (label_ref (match_operand 2 "" "")) - (pc))) - (match_scratch:SI 3 "=r")] - "" - "ld.b %0,%3;bte %1,%3,%2") - - (define_insn "" - [(set (pc) - (if_then_else (ne (zero_extend:SI (match_operand:QI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (label_ref (match_operand 2 "" "")) - (pc))) - (match_scratch:SI 3 "=r")] - "" - "ld.b %0,%3;btne %1,%3,%2") - - (define_insn "" - [(set (pc) - (if_then_else (eq (zero_extend:SI (match_operand:QI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (pc) - (label_ref (match_operand 2 "" "")))) - (match_scratch:SI 3 "=r")] - "" - "ld.b %0,%3;btne %1,%3,%2") - - (define_insn "" - [(set (pc) - (if_then_else (ne (zero_extend:SI (match_operand:QI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (pc) - (label_ref (match_operand 2 "" "")))) - (match_scratch:SI 3 "=r")] - "" - "ld.b %0,%3;bte %1,%3,%2") - - (define_insn "" - [(set (pc) - (if_then_else (eq (zero_extend:SI (match_operand:HI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (label_ref (match_operand 2 "" "")) - (pc))) - (match_scratch:SI 3 "=r")] - "" - "ld.s %0,%3;bte %1,%3,%2") - - (define_insn "" - [(set (pc) - (if_then_else (ne (zero_extend:SI (match_operand:HI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (label_ref (match_operand 2 "" "")) - (pc))) - (match_scratch:SI 3 "=r")] - "" - "ld.s %0,%3;btne %1,%3,%2") - - (define_insn "" - [(set (pc) - (if_then_else (eq (zero_extend:SI (match_operand:HI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (pc) - (label_ref (match_operand 2 "" "")))) - (match_scratch:SI 3 "=r")] - "" - "ld.s %0,%3;btne %1,%3,%2") - - (define_insn "" - [(set (pc) - (if_then_else (ne (zero_extend:SI (match_operand:HI 0 "memory_operand" "m")) - (match_operand:SI 1 "bte_operand" "K")) - (pc) - (label_ref (match_operand 2 "" "")))) - (match_scratch:SI 3 "=r")] - "" - "ld.s %0,%3;bte %1,%3,%2") - - - ;; Generation of conditionals. - - ;; We save the compare operands in the cmpxx patterns and use then when - ;; we generate the branch. - - (define_expand "cmpsi" - [(set (cc0) (compare (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "compare_operand" "")))] - "" - " - { i860_compare_op0 = operands[0]; - i860_compare_op1 = operands[1]; - DONE; - }") - - (define_expand "cmpsf" - [(set (cc0) (compare (match_operand:SF 0 "register_operand" "") - (match_operand:SF 1 "register_operand" "")))] - "" - " - { i860_compare_op0 = operands[0]; - i860_compare_op1 = operands[1]; - DONE; - }") - - (define_expand "cmpdf" - [(set (cc0) (compare (match_operand:DF 0 "register_operand" "") - (match_operand:DF 1 "register_operand" "")))] - "" - " - { i860_compare_op0 = operands[0]; - i860_compare_op1 = operands[1]; - DONE; - }") - - ;; These are the standard-named conditional branch patterns. - ;; Detailed comments are found in the first one only. - - (define_expand "beq" - [(set (pc) - (if_then_else (eq (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - /* Emit a single-condition compare insn according to - the type of operands and the condition to be tested. */ - - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT) - emit_insn (gen_cmpeqsi (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == SFmode) - emit_insn (gen_cmpeqsf (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == DFmode) - emit_insn (gen_cmpeqdf (i860_compare_op0, i860_compare_op1)); - else - abort (); - - /* Emit branch-if-true. */ - - emit_jump_insn (gen_flipped_inverse_cbranch (operands[0])); - DONE; - }") - - (define_expand "bne" - [(set (pc) - (if_then_else (ne (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT) - emit_insn (gen_cmpeqsi (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == SFmode) - emit_insn (gen_cmpeqsf (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == DFmode) - emit_insn (gen_cmpeqdf (i860_compare_op0, i860_compare_op1)); - else - abort (); - - emit_jump_insn (gen_flipped_cbranch (operands[0])); - - DONE; - }") - - (define_expand "bgt" - [(set (pc) - (if_then_else (gt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT) - emit_insn (gen_cmpgtsi (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == SFmode) - emit_insn (gen_cmpgtsf (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == DFmode) - emit_insn (gen_cmpgtdf (i860_compare_op0, i860_compare_op1)); - else - abort (); - - emit_jump_insn (gen_flipped_inverse_cbranch (operands[0])); - DONE; - }") - - (define_expand "blt" - [(set (pc) - (if_then_else (lt (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT) - emit_insn (gen_cmpltsi (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == SFmode) - emit_insn (gen_cmpltsf (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == DFmode) - emit_insn (gen_cmpltdf (i860_compare_op0, i860_compare_op1)); - else - abort (); - - emit_jump_insn (gen_flipped_inverse_cbranch (operands[0])); - DONE; - }") - - (define_expand "ble" - [(set (pc) - (if_then_else (le (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT) - { - emit_insn (gen_cmpgtsi (i860_compare_op0, i860_compare_op1)); - emit_jump_insn (gen_flipped_cbranch (operands[0])); - } - else - { - if (GET_MODE (i860_compare_op0) == SFmode) - emit_insn (gen_cmplesf (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == DFmode) - emit_insn (gen_cmpledf (i860_compare_op0, i860_compare_op1)); - else - abort (); - emit_jump_insn (gen_flipped_inverse_cbranch (operands[0])); - } - DONE; - }") - - (define_expand "bge" - [(set (pc) - (if_then_else (ge (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT) - { - emit_insn (gen_cmpltsi (i860_compare_op0, i860_compare_op1)); - emit_jump_insn (gen_flipped_cbranch (operands[0])); - } - else - { - if (GET_MODE (i860_compare_op0) == SFmode) - emit_insn (gen_cmpgesf (i860_compare_op0, i860_compare_op1)); - else if (GET_MODE (i860_compare_op0) == DFmode) - emit_insn (gen_cmpgedf (i860_compare_op0, i860_compare_op1)); - else - abort (); - emit_jump_insn (gen_flipped_inverse_cbranch (operands[0])); - } - DONE; - }") - - (define_expand "bgtu" - [(set (pc) - (if_then_else (gtu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT) - abort (); - - emit_insn (gen_cmpleusi (i860_compare_op0, i860_compare_op1)); - emit_jump_insn (gen_flipped_cbranch (operands[0])); - DONE; - }") - - (define_expand "bltu" - [(set (pc) - (if_then_else (ltu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT) - abort (); - - emit_insn (gen_cmpgeusi (i860_compare_op0, i860_compare_op1)); - emit_jump_insn (gen_flipped_cbranch (operands[0])); - DONE; - }") - - (define_expand "bgeu" - [(set (pc) - (if_then_else (geu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT) - abort (); - - emit_insn (gen_cmpgeusi (i860_compare_op0, i860_compare_op1)); - emit_jump_insn (gen_flipped_inverse_cbranch (operands[0])); - DONE; - }") - - (define_expand "bleu" - [(set (pc) - (if_then_else (leu (cc0) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - " - { - if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT) - abort (); - - emit_insn (gen_cmpleusi (i860_compare_op0, i860_compare_op1)); - emit_jump_insn (gen_flipped_inverse_cbranch (operands[0])); - DONE; - }") - - ;; Move instructions - - ;; Note that source operands for `mov' pseudo-instructions are no longer - ;; allowed (by the svr4 assembler) to be "big" things, i.e. constants that - ;; won't fit in 16-bits. (This includes any sort of a relocatable address - ;; also.) Thus, we must use an explicit orh/or pair of instructions if - ;; the source operand is something "big". - - (define_insn "movsi" - [(set (match_operand:SI 0 "general_operand" "=r,m,f") - (match_operand:SI 1 "general_operand" "rmif,rfJ,rmfJ"))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - return output_store (operands); - if (FP_REG_P (operands[1])) - return \"fst.l %1,%0\"; - return \"st.l %r1,%0\"; - } - if (GET_CODE (operands[1]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - return output_load (operands); - if (FP_REG_P (operands[0])) - return \"fld.l %1,%0\"; - return \"ld.l %1,%0\"; - } - if (FP_REG_P (operands[1]) && FP_REG_P (operands[0])) - return \"fmov.ss %1,%0\"; - if (FP_REG_P (operands[1])) - return \"fxfr %1,%0\"; - if (FP_REG_P (operands[0]) && operands[1] == const0_rtx) - return \"fmov.ss %?f0,%0\"; - if (FP_REG_P (operands[0])) - return \"ixfr %1,%0\"; - - if (GET_CODE (operands[1]) == REG) - return \"shl %?r0,%1,%0\"; - - CC_STATUS_PARTIAL_INIT; - - if (GET_CODE (operands[1]) == CONST_INT) - { - if((INTVAL (operands[1]) & 0xffff0000) == 0) - return \"or %L1,%?r0,%0\"; - if((INTVAL (operands[1]) & 0x0000ffff) == 0) - return \"orh %H1,%?r0,%0\"; - } - return \"orh %H1,%?r0,%0\;or %L1,%0,%0\"; - }") - - (define_insn "movhi" - [(set (match_operand:HI 0 "general_operand" "=r,m,!*f,!r") - (match_operand:HI 1 "general_operand" "rmi,rJ,rJ*f,*f"))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - return output_store (operands); - return \"st.s %r1,%0\"; - } - if (GET_CODE (operands[1]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - return output_load (operands); - return \"ld.s %1,%0\"; - } - if (FP_REG_P (operands[1]) && FP_REG_P (operands[0])) - return \"fmov.ss %1,%0\"; - if (FP_REG_P (operands[1])) - return \"fxfr %1,%0\"; - if (FP_REG_P (operands[0]) && operands[1] == const0_rtx) - return \"fmov.ss %?f0,%0\"; - if (FP_REG_P (operands[0])) - return \"ixfr %1,%0\"; - - if (GET_CODE (operands[1]) == REG) - return \"shl %?r0,%1,%0\"; - - CC_STATUS_PARTIAL_INIT; - - return \"or %L1,%?r0,%0\"; - }") - - (define_insn "movqi" - [(set (match_operand:QI 0 "general_operand" "=r,m,!*f,!r") - (match_operand:QI 1 "general_operand" "rmi,rJ,rJ*f,*f"))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - return output_store (operands); - return \"st.b %r1,%0\"; - } - if (GET_CODE (operands[1]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - return output_load (operands); - return \"ld.b %1,%0\"; - } - if (FP_REG_P (operands[1]) && FP_REG_P (operands[0])) - return \"fmov.ss %1,%0\"; - if (FP_REG_P (operands[1])) - return \"fxfr %1,%0\"; - if (FP_REG_P (operands[0]) && operands[1] == const0_rtx) - return \"fmov.ss %?f0,%0\"; - if (FP_REG_P (operands[0])) - return \"ixfr %1,%0\"; - - if (GET_CODE (operands[1]) == REG) - return \"shl %?r0,%1,%0\"; - - CC_STATUS_PARTIAL_INIT; - - return \"or %L1,%?r0,%0\"; - }") - - ;; The definition of this insn does not really explain what it does, - ;; but it should suffice - ;; that anything generated as this insn will be recognized as one - ;; and that it won't successfully combine with anything. - (define_expand "movstrsi" - [(parallel [(set (match_operand:BLK 0 "general_operand" "") - (match_operand:BLK 1 "general_operand" "")) - (use (match_operand:SI 2 "nonmemory_operand" "")) - (use (match_operand:SI 3 "immediate_operand" "")) - (clobber (match_dup 4)) - (clobber (match_dup 5)) - (clobber (match_dup 6)) - (clobber (match_dup 7)) - (clobber (match_dup 8))])] - "" - " - { - operands[4] = gen_reg_rtx (SImode); - operands[5] = gen_reg_rtx (SImode); - operands[6] = gen_reg_rtx (SImode); - operands[7] = copy_to_mode_reg (SImode, XEXP (operands[0], 0)); - operands[8] = copy_to_mode_reg (SImode, XEXP (operands[1], 0)); - - operands[0] = replace_equiv_address (operands[0], operands[7]); - operands[1] = replace_equiv_address (operands[1], operands[8]); - }") - - (define_insn "" - [(set (mem:BLK (match_operand:SI 0 "register_operand" "r")) - (mem:BLK (match_operand:SI 1 "register_operand" "r"))) - (use (match_operand:SI 2 "general_operand" "rn")) - (use (match_operand:SI 3 "immediate_operand" "i")) - (clobber (match_operand:SI 4 "register_operand" "=r")) - (clobber (match_operand:SI 5 "register_operand" "=r")) - (clobber (match_operand:SI 6 "register_operand" "=r")) - (clobber (match_dup 0)) - (clobber (match_dup 1))] - "" - "* return output_block_move (operands);") - - ;; Floating point move insns - - ;; This pattern forces (set (reg:DF ...) (const_double ...)) - ;; to be reloaded by putting the constant into memory. - ;; It must come before the more general movdf pattern. - (define_insn "" - [(set (match_operand:DF 0 "general_operand" "=r,f,o") - (match_operand:DF 1 "" "mG,m,G"))] - "GET_CODE (operands[1]) == CONST_DOUBLE" - "* - { - if (FP_REG_P (operands[0]) || operands[1] == CONST0_RTX (DFmode)) - return output_fp_move_double (operands); - return output_move_double (operands); - }") - - (define_insn "movdf" - [(set (match_operand:DF 0 "general_operand" "=*rm,*r,?f,?*rm") - (match_operand:DF 1 "general_operand" "*r,m,*rfmG,f"))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM - && CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - return output_store (operands); - if (GET_CODE (operands[1]) == MEM - && CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - return output_load (operands); - - if (FP_REG_P (operands[0]) || FP_REG_P (operands[1])) - return output_fp_move_double (operands); - return output_move_double (operands); - }") - - (define_insn "movdi" - [(set (match_operand:DI 0 "general_operand" "=rm,r,?f,?rm") - (match_operand:DI 1 "general_operand" "r,miF,rfmG,f"))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM - && CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - return output_store (operands); - if (GET_CODE (operands[1]) == MEM - && CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - return output_load (operands); - - /* ??? How can we have a DFmode arg here with DImode above? */ - if (FP_REG_P (operands[0]) && operands[1] == CONST0_RTX (DFmode)) - return \"fmov.dd %?f0,%0\"; - - if (FP_REG_P (operands[0]) || FP_REG_P (operands[1])) - return output_fp_move_double (operands); - return output_move_double (operands); - }") - - ;; The alternative m/r is separate from m/f - ;; The first alternative is separate from the second for the same reason. - (define_insn "movsf" - [(set (match_operand:SF 0 "general_operand" "=*rf,*rf,*r,m,m") - (match_operand:SF 1 "general_operand" "*r,fmG,F,*r,f"))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM - && CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - return output_store (operands); - if (GET_CODE (operands[1]) == MEM - && CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - return output_load (operands); - if (FP_REG_P (operands[0])) - { - if (FP_REG_P (operands[1])) - return \"fmov.ss %1,%0\"; - if (GET_CODE (operands[1]) == REG) - return \"ixfr %1,%0\"; - if (operands[1] == CONST0_RTX (SFmode)) - return \"fmov.ss %?f0,%0\"; - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && cc_prev_status.mdep == XEXP(operands[1],0))) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[1], 0); - return \"orh %h1,%?r0,%?r31\;fld.l %L1(%?r31),%0\"; - } - return \"fld.l %L1(%?r31),%0\"; - } - return \"fld.l %1,%0\"; - } - if (FP_REG_P (operands[1]) || GET_CODE (operands[1]) == CONST_DOUBLE) - { - if (GET_CODE (operands[0]) == REG && FP_REG_P (operands[1])) - return \"fxfr %1,%0\"; - if (GET_CODE (operands[0]) == REG) - { - CC_STATUS_PARTIAL_INIT; - if (GET_CODE (operands[1]) == CONST_DOUBLE) - { - register unsigned long ul; - - ul = sfmode_constant_to_ulong (operands[1]); - if ((ul & 0x0000ffff) == 0) - return \"orh %H1,%?r0,%0\"; - if ((ul & 0xffff0000) == 0) - return \"or %L1,%?r0,%0\"; - } - return \"orh %H1,%?r0,%0\;or %L1,%0,%0\"; - } - /* Now operand 0 must be memory. - If operand 1 is CONST_DOUBLE, its value must be 0. */ - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && XEXP (operands[0], 0) == cc_prev_status.mdep)) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[0], 0); - output_asm_insn (\"orh %h0,%?r0,%?r31\", operands); - } - return \"fst.l %r1,%L0(%?r31)\"; - } - return \"fst.l %r1,%0\"; - } - if (GET_CODE (operands[0]) == MEM) - return \"st.l %r1,%0\"; - if (GET_CODE (operands[1]) == MEM) - return \"ld.l %1,%0\"; - if (operands[1] == CONST0_RTX (SFmode)) - return \"shl %?r0,%?r0,%0\"; - return \"mov %1,%0\"; - }") - - ;; Special load insns for REG+REG addresses. - ;; Such addresses are not "legitimate" because st rejects them. - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=rf") - (match_operand:DF 1 "indexed_operand" "m"))] - "" - "* - { - if (FP_REG_P (operands[0])) - return output_fp_move_double (operands); - return output_move_double (operands); - }") - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=rf") - (match_operand:SF 1 "indexed_operand" "m"))] - "" - "* - { - if (FP_REG_P (operands[0])) - return \"fld.l %1,%0\"; - return \"ld.l %1,%0\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=rf") - (match_operand:SI 1 "indexed_operand" "m"))] - "" - "* - { - if (FP_REG_P (operands[0])) - return \"fld.l %1,%0\"; - return \"ld.l %1,%0\"; - }") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (match_operand:HI 1 "indexed_operand" "m"))] - "" - "ld.s %1,%0") - - (define_insn "" - [(set (match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "indexed_operand" "m"))] - "" - "ld.b %1,%0") - - ;; Likewise for floating-point store insns. - - (define_insn "" - [(set (match_operand:DF 0 "indexed_operand" "=m") - (match_operand:DF 1 "register_operand" "f"))] - "" - "fst.d %1,%0") - - (define_insn "" - [(set (match_operand:SF 0 "indexed_operand" "=m") - (match_operand:SF 1 "register_operand" "f"))] - "" - "fst.l %1,%0") - - ;;- truncation instructions - (define_insn "truncsiqi2" - [(set (match_operand:QI 0 "general_operand" "=g") - (truncate:QI - (match_operand:SI 1 "register_operand" "r")))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && XEXP (operands[0], 0) == cc_prev_status.mdep)) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[0], 0); - output_asm_insn (\"orh %h0,%?r0,%?r31\", operands); - } - return \"st.b %1,%L0(%?r31)\"; - } - else - return \"st.b %1,%0\"; - } - return \"shl %?r0,%1,%0\"; - }") - - (define_insn "trunchiqi2" - [(set (match_operand:QI 0 "general_operand" "=g") - (truncate:QI - (match_operand:HI 1 "register_operand" "r")))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && XEXP (operands[0], 0) == cc_prev_status.mdep)) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[0], 0); - output_asm_insn (\"orh %h0,%?r0,%?r31\", operands); - } - return \"st.b %1,%L0(%?r31)\"; - } - else - return \"st.b %1,%0\"; - } - return \"shl %?r0,%1,%0\"; - }") - - (define_insn "truncsihi2" - [(set (match_operand:HI 0 "general_operand" "=g") - (truncate:HI - (match_operand:SI 1 "register_operand" "r")))] - "" - "* - { - if (GET_CODE (operands[0]) == MEM) - { - if (CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) - { - if (! ((cc_prev_status.flags & CC_KNOW_HI_R31) - && (cc_prev_status.flags & CC_HI_R31_ADJ) - && XEXP (operands[0], 0) == cc_prev_status.mdep)) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[0], 0); - output_asm_insn (\"orh %h0,%?r0,%?r31\", operands); - } - return \"st.s %1,%L0(%?r31)\"; - } - else - return \"st.s %1,%0\"; - } - return \"shl %?r0,%1,%0\"; - }") - - ;;- zero extension instructions - - (define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI - (match_operand:HI 1 "register_operand" "r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"and 0xffff,%1,%0\"; - }") - - (define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "register_operand" "=r") - (zero_extend:HI - (match_operand:QI 1 "register_operand" "r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"and 0xff,%1,%0\"; - }") - - (define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI - (match_operand:QI 1 "register_operand" "r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"and 0xff,%1,%0\"; - }") - - ;; Sign extension instructions. - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI - (match_operand:HI 1 "indexed_operand" "m")))] - "" - "ld.s %1,%0") - - (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r") - (sign_extend:HI - (match_operand:QI 1 "indexed_operand" "m")))] - "" - "ld.b %1,%0") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI - (match_operand:QI 1 "indexed_operand" "m")))] - "" - "ld.b %1,%0") - - (define_insn "extendhisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI - (match_operand:HI 1 "nonimmediate_operand" "mr")))] - "" - "* - { - if (REG_P (operands[1])) - return \"shl 16,%1,%0\;shra 16,%0,%0\"; - if (GET_CODE (operands[1]) == CONST_INT) - abort (); - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[1], 0); - return \"orh %h1,%?r0,%?r31\;ld.s %L1(%?r31),%0\"; - } - else - return \"ld.s %1,%0\"; - }") - - (define_insn "extendqihi2" - [(set (match_operand:HI 0 "register_operand" "=r") - (sign_extend:HI - (match_operand:QI 1 "nonimmediate_operand" "mr")))] - "" - "* - { - if (REG_P (operands[1])) - return \"shl 24,%1,%0\;shra 24,%0,%0\"; - if (GET_CODE (operands[1]) == CONST_INT) - abort (); - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[1], 0); - return \"orh %h1,%?r0,%?r31\;ld.b %L1(%?r31),%0\"; - } - else - return \"ld.b %1,%0\"; - }") - - (define_insn "extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI - (match_operand:QI 1 "nonimmediate_operand" "mr")))] - "" - "* - { - if (REG_P (operands[1])) - return \"shl 24,%1,%0\;shra 24,%0,%0\"; - if (GET_CODE (operands[1]) == CONST_INT) - abort (); - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[1], 0); - return \"orh %h1,%?r0,%?r31\;ld.b %L1(%?r31),%0\"; - } - else - return \"ld.b %1,%0\"; - }") - - ;; Signed bitfield extractions come out looking like - ;; (shiftrt (sign_extend (shift )) ) - ;; which we expand poorly as four shift insns. - ;; These patterns yield two shifts: - ;; (shiftrt (shift ) ) - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashiftrt:SI - (sign_extend:SI - (match_operand:QI 1 "register_operand" "r")) - (match_operand:SI 2 "logic_int" "n")))] - "INTVAL (operands[2]) < 8" - "* - { - return \"shl 24,%1,%0\;shra 24+%2,%0,%0\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashiftrt:SI - (sign_extend:SI - (subreg:QI (ashift:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "logic_int" "n")) 0)) - (match_operand:SI 3 "logic_int" "n")))] - "INTVAL (operands[3]) < 8" - "* - { - return \"shl 0x18+%2,%1,%0\;shra 0x18+%3,%0,%0\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashiftrt:SI - (sign_extend:SI - (ashift:QI (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "logic_int" "n"))) - (match_operand:SI 3 "logic_int" "n")))] - "INTVAL (operands[3]) < 8" - "* - { - return \"shl 0x18+%2,%1,%0\;shra 0x18+%3,%0,%0\"; - }") - - ;; Special patterns for optimizing bit-field instructions. - - ;; First two patterns are for bitfields that came from memory - ;; testing only the high bit. They work with old combiner. - - (define_insn "" - [(set (cc0) - (eq (zero_extend:SI (subreg:QI (lshiftrt:SI (match_operand:SI 0 "register_operand" "r") - (const_int 7)) 0)) - (const_int 0)))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"and 128,%0,%?r0\"; - }") - - (define_insn "" - [(set (cc0) - (eq (sign_extend:SI (subreg:QI (ashiftrt:SI (match_operand:SI 0 "register_operand" "r") - (const_int 7)) 0)) - (const_int 0)))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"and 128,%0,%?r0\"; - }") - - ;; next two patterns are good for bitfields coming from memory - ;; (via pseudo-register) or from a register, though this optimization - ;; is only good for values contained wholly within the bottom 13 bits - (define_insn "" - [(set (cc0) - (eq - (and:SI (lshiftrt:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "logic_int" "n")) - (match_operand:SI 2 "logic_int" "n")) - (const_int 0)))] - "LOGIC_INTVAL (INTVAL (operands[2]) << INTVAL (operands[1]))" - "* - { - CC_STATUS_PARTIAL_INIT; - operands[2] = GEN_INT (INTVAL (operands[2]) << INTVAL (operands[1])); - return \"and %2,%0,%?r0\"; - }") - - (define_insn "" - [(set (cc0) - (eq - (and:SI (ashiftrt:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "logic_int" "n")) - (match_operand:SI 2 "logic_int" "n")) - (const_int 0)))] - "LOGIC_INTVAL (INTVAL (operands[2]) << INTVAL (operands[1]))" - "* - { - CC_STATUS_PARTIAL_INIT; - operands[2] = GEN_INT (INTVAL (operands[2]) << INTVAL (operands[1])); - return \"and %2,%0,%?r0\"; - }") - - ;; Conversions between float and double. - - (define_insn "extendsfdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (float_extend:DF - (match_operand:SF 1 "register_operand" "f")))] - "" - "fmov.sd %1,%0") - - (define_insn "truncdfsf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (float_truncate:SF - (match_operand:DF 1 "register_operand" "f")))] - "" - "fmov.ds %1,%0") - - ;; Conversion between fixed point and floating point. - ;; Note that among the fix-to-float insns - ;; the ones that start with SImode come first. - ;; That is so that an operand that is a CONST_INT - ;; (and therefore lacks a specific machine mode). - ;; will be recognized as SImode (which is always valid) - ;; rather than as QImode or HImode. - - ;; This pattern forces (set (reg:SF ...) (float:SF (const_int ...))) - ;; to be reloaded by putting the constant into memory. - ;; It must come before the more general floatsisf2 pattern. - (define_expand "floatsidf2" - [(set (match_dup 2) (match_dup 3)) - (set (match_dup 4) (xor:SI (match_operand:SI 1 "register_operand" "") - (const_int -2147483648))) - (set (match_dup 5) (match_dup 3)) - (set (subreg:SI (match_dup 5) 0) (match_dup 4)) - (set (match_operand:DF 0 "register_operand" "") - (minus:DF (match_dup 5) (match_dup 2)))] - "" - " - { - REAL_VALUE_TYPE d; - /* 4503601774854144 is (1 << 30) * ((1 << 22) + (1 << 1)). */ - d = REAL_VALUE_ATOF (\"4503601774854144\", DFmode); - operands[2] = gen_reg_rtx (DFmode); - operands[3] = CONST_DOUBLE_FROM_REAL_VALUE (d, DFmode); - operands[4] = gen_reg_rtx (SImode); - operands[5] = gen_reg_rtx (DFmode); - }") - - ;; Floating to fixed conversion. - - (define_expand "fix_truncdfsi2" - ;; This first insn produces a double-word value - ;; in which only the low word is valid. - [(set (match_dup 2) - (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "f")))) - (set (match_operand:SI 0 "register_operand" "=f") - (subreg:SI (match_dup 2) 0))] - "" - " - { - operands[2] = gen_reg_rtx (DImode); - }") - - ;; Recognize the first insn generated above. - ;; This RTL looks like a fix_truncdfdi2 insn, - ;; but we don't call it that, because only 32 bits - ;; of the result are valid. - ;; This pattern will work for the intended purposes - ;; as long as we do not have any fixdfdi2 or fix_truncdfdi2. - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=f") - (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "f"))))] - "" - "ftrunc.dd %1,%0") - - (define_expand "fix_truncsfsi2" - ;; This first insn produces a double-word value - ;; in which only the low word is valid. - [(set (match_dup 2) - (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f")))) - (set (match_operand:SI 0 "register_operand" "=f") - (subreg:SI (match_dup 2) 0))] - "" - " - { - operands[2] = gen_reg_rtx (DImode); - }") - - ;; Recognize the first insn generated above. - ;; This RTL looks like a fix_truncsfdi2 insn, - ;; but we don't call it that, because only 32 bits - ;; of the result are valid. - ;; This pattern will work for the intended purposes - ;; as long as we do not have any fixsfdi2 or fix_truncsfdi2. - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=f") - (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] - "" - "ftrunc.sd %1,%0") - - ;;- arithmetic instructions - - (define_insn "addsi3" - [(set (match_operand:SI 0 "register_operand" "=r,*f") - (plus:SI (match_operand:SI 1 "nonmemory_operand" "%r,*f") - (match_operand:SI 2 "arith_operand" "rI,*f")))] - "" - "* - { - if (which_alternative == 1) - return \"fiadd.ss %2,%1,%0\"; - CC_STATUS_PARTIAL_INIT; - return \"addu %2,%1,%0\"; - }") - - (define_insn "adddi3" - [(set (match_operand:DI 0 "register_operand" "=f") - (plus:DI (match_operand:DI 1 "register_operand" "%f") - (match_operand:DI 2 "register_operand" "f")))] - "" - "fiadd.dd %1,%2,%0") - - (define_insn "subsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r,*f") - (minus:SI (match_operand:SI 1 "register_operand" "r,I,*f") - (match_operand:SI 2 "arith_operand" "rI,r,*f")))] - "" - "* - { - if (which_alternative == 2) - return \"fisub.ss %1,%2,%0\"; - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[2])) - return \"subu %1,%2,%0\"; - operands[2] = GEN_INT (- INTVAL (operands[2])); - return \"addu %2,%1,%0\"; - }") - - (define_insn "subdi3" - [(set (match_operand:DI 0 "register_operand" "=f") - (minus:DI (match_operand:DI 1 "register_operand" "f") - (match_operand:DI 2 "register_operand" "f")))] - "" - "fisub.dd %1,%2,%0") - - (define_expand "mulsi3" - [(set (subreg:SI (match_dup 4) 0) (match_operand:SI 1 "general_operand" "")) - (set (subreg:SI (match_dup 5) 0) (match_operand:SI 2 "general_operand" "")) - (clobber (match_dup 3)) - (set (subreg:SI (match_dup 3) 0) - (mult:SI (subreg:SI (match_dup 4) 0) (subreg:SI (match_dup 5) 0))) - (set (match_operand:SI 0 "register_operand" "") (subreg:SI (match_dup 3) 0))] - "" - " - { - if (WORDS_BIG_ENDIAN) - emit_insn (gen_mulsi3_big (operands[0], operands[1], operands[2])); - else - emit_insn (gen_mulsi3_little (operands[0], operands[1], operands[2])); - DONE; - }") - - (define_expand "mulsi3_little" - [(set (subreg:SI (match_dup 4) 0) (match_operand:SI 1 "general_operand" "")) - (set (subreg:SI (match_dup 5) 0) (match_operand:SI 2 "general_operand" "")) - (clobber (match_dup 3)) - (set (subreg:SI (match_dup 3) 0) - (mult:SI (subreg:SI (match_dup 4) 0) (subreg:SI (match_dup 5) 0))) - (set (match_operand:SI 0 "register_operand" "") (subreg:SI (match_dup 3) 0))] - "! WORDS_BIG_ENDIAN" - " - { - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); - }") - - (define_expand "mulsi3_big" - [(set (subreg:SI (match_dup 4) 4) (match_operand:SI 1 "general_operand" "")) - (set (subreg:SI (match_dup 5) 4) (match_operand:SI 2 "general_operand" "")) - (clobber (match_dup 3)) - (set (subreg:SI (match_dup 3) 4) - (mult:SI (subreg:SI (match_dup 4) 4) (subreg:SI (match_dup 5) 4))) - (set (match_operand:SI 0 "register_operand" "") (subreg:SI (match_dup 3) 4))] - "WORDS_BIG_ENDIAN" - " - { - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); - }") - - (define_insn "" - [(set (subreg:SI (match_operand:DI 0 "register_operand" "=f") 0) - (mult:SI (subreg:SI (match_operand:DI 1 "register_operand" "f") 0) - (subreg:SI (match_operand:DI 2 "register_operand" "f") 0)))] - "! WORDS_BIG_ENDIAN" - "fmlow.dd %2,%1,%0") - - (define_insn "" - [(set (subreg:SI (match_operand:DI 0 "register_operand" "=f") 4) - (mult:SI (subreg:SI (match_operand:DI 1 "register_operand" "f") 4) - (subreg:SI (match_operand:DI 2 "register_operand" "f") 4)))] - "WORDS_BIG_ENDIAN" - "fmlow.dd %2,%1,%0") - - ;;- and instructions (with compliment also) - (define_insn "andsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (and:SI (match_operand:SI 1 "nonmemory_operand" "%r") - (match_operand:SI 2 "nonmemory_operand" "rL")))] - "" - "* - { - rtx xop[3]; - - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[2]) || LOGIC_INT (operands[2])) - return \"and %2,%1,%0\"; - if ((INTVAL (operands[2]) & 0xffff) == 0) - { - operands[2] - = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (operands[2]) >> 16); - return \"andh %2,%1,%0\"; - } - xop[0] = operands[0]; - xop[1] = operands[1]; - xop[2] = GEN_INT (~INTVAL (operands[2]) & 0xffff); - output_asm_insn (\"andnot %2,%1,%0\", xop); - operands[2] = GEN_INT (~(unsigned HOST_WIDE_INT) INTVAL (operands[2]) >> 16); - return \"andnoth %2,%0,%0\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (and:SI (not:SI (match_operand:SI 1 "register_operand" "rn")) - (match_operand:SI 2 "register_operand" "r")))] - "" - "* - { - rtx xop[3]; - - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[1]) || LOGIC_INT (operands[1])) - return \"andnot %1,%2,%0\"; - if ((INTVAL (operands[1]) & 0xffff) == 0) - { - operands[1] - = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (operands[1]) >> 16); - return \"andnoth %1,%2,%0\"; - } - xop[0] = operands[0]; - xop[1] = GEN_INT (INTVAL (operands[1]) & 0xffff); - xop[2] = operands[2]; - output_asm_insn (\"andnot %1,%2,%0\", xop); - operands[1] = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (operands[1]) >> 16); - return \"andnoth %1,%0,%0\"; - }") - - (define_insn "iorsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (ior:SI (match_operand:SI 1 "nonmemory_operand" "%r") - (match_operand:SI 2 "nonmemory_operand" "rL")))] - "" - "* - { - rtx xop[3]; - - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[2]) || LOGIC_INT (operands[2])) - return \"or %2,%1,%0\"; - if ((INTVAL (operands[2]) & 0xffff) == 0) - { - operands[2] - = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (operands[2]) >> 16); - return \"orh %2,%1,%0\"; - } - xop[0] = operands[0]; - xop[1] = operands[1]; - xop[2] = GEN_INT (INTVAL (operands[2]) & 0xffff); - output_asm_insn (\"or %2,%1,%0\", xop); - operands[2] = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (operands[2]) >> 16); - return \"orh %2,%0,%0\"; - }") - - (define_insn "xorsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (xor:SI (match_operand:SI 1 "nonmemory_operand" "%r") - (match_operand:SI 2 "nonmemory_operand" "rL")))] - "" - "* - { - rtx xop[3]; - - CC_STATUS_PARTIAL_INIT; - if (REG_P (operands[2]) || LOGIC_INT (operands[2])) - return \"xor %2,%1,%0\"; - if ((INTVAL (operands[2]) & 0xffff) == 0) - { - operands[2] - = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (operands[2]) >> 16); - return \"xorh %2,%1,%0\"; - } - xop[0] = operands[0]; - xop[1] = operands[1]; - xop[2] = GEN_INT (INTVAL (operands[2]) & 0xffff); - output_asm_insn (\"xor %2,%1,%0\", xop); - operands[2] = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (operands[2]) >> 16); - return \"xorh %2,%0,%0\"; - }") - - ;(The i860 instruction set doesn't allow an immediate second operand in - ; a subtraction.) - (define_insn "negsi2" - [(set (match_operand:SI 0 "general_operand" "=r") - (neg:SI (match_operand:SI 1 "arith_operand" "r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"subu %?r0,%1,%0\"; - }") - - (define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "general_operand" "=r") - (not:SI (match_operand:SI 1 "arith_operand" "r")))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - return \"subu -1,%1,%0\"; - }") - - ;; Floating point arithmetic instructions. - - (define_insn "adddf3" - [(set (match_operand:DF 0 "register_operand" "=f") - (plus:DF (match_operand:DF 1 "register_operand" "f") - (match_operand:DF 2 "register_operand" "f")))] - "" - "fadd.dd %1,%2,%0") - - (define_insn "addsf3" - [(set (match_operand:SF 0 "register_operand" "=f") - (plus:SF (match_operand:SF 1 "register_operand" "f") - (match_operand:SF 2 "register_operand" "f")))] - "" - "fadd.ss %1,%2,%0") - - (define_insn "subdf3" - [(set (match_operand:DF 0 "register_operand" "=f") - (minus:DF (match_operand:DF 1 "register_operand" "f") - (match_operand:DF 2 "register_operand" "f")))] - "" - "fsub.dd %1,%2,%0") - - (define_insn "subsf3" - [(set (match_operand:SF 0 "register_operand" "=f") - (minus:SF (match_operand:SF 1 "register_operand" "f") - (match_operand:SF 2 "register_operand" "f")))] - "" - "fsub.ss %1,%2,%0") - - (define_insn "muldf3" - [(set (match_operand:DF 0 "register_operand" "=f") - (mult:DF (match_operand:DF 1 "register_operand" "f") - (match_operand:DF 2 "register_operand" "f")))] - "" - "fmul.dd %1,%2,%0") - - (define_insn "mulsf3" - [(set (match_operand:SF 0 "register_operand" "=f") - (mult:SF (match_operand:SF 1 "register_operand" "f") - (match_operand:SF 2 "register_operand" "f")))] - "" - "fmul.ss %1,%2,%0") - - (define_insn "negdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (neg:DF (match_operand:DF 1 "register_operand" "f")))] - "" - "fsub.dd %?f0,%1,%0") - - (define_insn "negsf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (neg:SF (match_operand:SF 1 "register_operand" "f")))] - "" - "fsub.ss %?f0,%1,%0") - - (define_insn "divdf3" - [(set (match_operand:DF 0 "register_operand" "=&f") - (div:DF (match_operand:DF 1 "register_operand" "f") - (match_operand:DF 2 "register_operand" "f"))) - (clobber (match_scratch:DF 3 "=&f")) - (clobber (match_scratch:DF 4 "=&f"))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - if (((cc_prev_status.flags & CC_KNOW_HI_R31) == 0) - || (cc_prev_status.flags & CC_HI_R31_ADJ) - || (cc_prev_status.mdep != CONST2_RTX (SFmode))) - { - cc_status.flags |= CC_KNOW_HI_R31; - cc_status.flags &= ~CC_HI_R31_ADJ; - cc_status.mdep = CONST2_RTX (SFmode); - return \"frcp.dd %2,%3\;fmul.dd %2,%3,%0\;fmov.dd %?f0,%4\;\\ - orh 0x4000,%?r0,%?r31\;ixfr %?r31,%R4\;fsub.dd %4,%0,%0\;\\ - fmul.dd %3,%0,%3\;fmul.dd %2,%3,%0\;fsub.dd %4,%0,%0\;\\ - fmul.dd %3,%0,%3\;fmul.dd %2,%3,%0\;fsub.dd %4,%0,%0\;\\ - fmul.dd %3,%1,%3\;fmul.dd %0,%3,%0\"; - } - else - return \"frcp.dd %2,%3\;fmul.dd %2,%3,%0\;fmov.dd %?f0,%4\;\\ - ixfr %?r31,%R4\;fsub.dd %4,%0,%0\;\\ - fmul.dd %3,%0,%3\;fmul.dd %2,%3,%0\;fsub.dd %4,%0,%0\;\\ - fmul.dd %3,%0,%3\;fmul.dd %2,%3,%0\;fsub.dd %4,%0,%0\;\\ - fmul.dd %3,%1,%3\;fmul.dd %0,%3,%0\"; - }") - - (define_insn "divsf3" - [(set (match_operand:SF 0 "register_operand" "=&f") - (div:SF (match_operand:SF 1 "register_operand" "f") - (match_operand:SF 2 "register_operand" "f"))) - (clobber (match_scratch:SF 3 "=&f")) - (clobber (match_scratch:SF 4 "=&f"))] - "" - "* - { - CC_STATUS_PARTIAL_INIT; - if (((cc_prev_status.flags & CC_KNOW_HI_R31) == 0) - || (cc_prev_status.flags & CC_HI_R31_ADJ) - || (cc_prev_status.mdep != CONST2_RTX (SFmode))) - { - cc_status.flags |= CC_KNOW_HI_R31; - cc_status.flags &= ~CC_HI_R31_ADJ; - cc_status.mdep = CONST2_RTX (SFmode); - output_asm_insn (\"orh 0x4000,%?r0,%?r31\", operands); - } - return \"ixfr %?r31,%4\;frcp.ss %2,%0\;\\ - fmul.ss %2,%0,%3\;fsub.ss %4,%3,%3\;fmul.ss %0,%3,%0\;\\ - fmul.ss %2,%0,%3\;fsub.ss %4,%3,%3\;\\ - fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; - }") - - ;; Shift instructions - - ;; Optimized special case of shifting. - ;; Must precede the general case. - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashiftrt:SI (match_operand:SI 1 "memory_operand" "m") - (const_int 24)))] - "" - "* - { - if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) - { - CC_STATUS_INIT; - cc_status.flags |= CC_KNOW_HI_R31 | CC_HI_R31_ADJ; - cc_status.mdep = XEXP (operands[1], 0); - return \"orh %h1,%?r0,%?r31\;ld.b %L1(%?r31),%0\"; - } - return \"ld.b %1,%0\"; - }") - - - ;;- arithmetic shift instructions - (define_insn "ashlsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashift:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "shift_operand" "rn")))] - "" - "* - { - return \"shl %2,%1,%0\"; - }") - - (define_insn "ashlhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (ashift:HI (match_operand:HI 1 "register_operand" "r") - (match_operand:HI 2 "shift_operand" "rn")))] - "" - "* - { - return \"shl %2,%1,%0\"; - }") - - (define_insn "ashlqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (ashift:QI (match_operand:QI 1 "register_operand" "r") - (match_operand:QI 2 "shift_operand" "rn")))] - "" - "* - { - return \"shl %2,%1,%0\"; - }") - - (define_insn "ashrsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "shift_operand" "rn")))] - "" - "* - { - return \"shra %2,%1,%0\"; - }") - - (define_insn "lshrsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (lshiftrt:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "shift_operand" "rn")))] - "" - "* - { - return \"shr %2,%1,%0\"; - }") - - ;; Unconditional and other jump instructions - - (define_insn "jump" - [(set (pc) (label_ref (match_operand 0 "" "")))] - "" - "* - { - return \"br %l0\;nop\"; - }") - - ;; Here are two simple peepholes which fill the delay slot of - ;; an unconditional branch. - ; - ;; ??? All disabled, because output_delayed_branch is a crock - ;; that will reliably segfault. This should be using the dbr - ;; pass in any case. Anyone who cares is welcome to fix it. - ; - ;(define_peephole - ; [(set (match_operand:SI 0 "register_operand" "=rf") - ; (match_operand:SI 1 "single_insn_src_p" "gfG")) - ; (set (pc) (label_ref (match_operand 2 "" "")))] - ; "" - ; "* return output_delayed_branch (\"br %l2\", operands, insn);") - ; - ;(define_peephole - ; [(set (match_operand:SI 0 "memory_operand" "=m") - ; (match_operand:SI 1 "reg_or_0_operand" "rfJ")) - ; (set (pc) (label_ref (match_operand 2 "" "")))] - ; "" - ; "* return output_delayed_branch (\"br %l2\", operands, insn);") - - (define_insn "tablejump" - [(set (pc) (match_operand:SI 0 "register_operand" "r")) - (use (label_ref (match_operand 1 "" "")))] - "" - "bri %0\;nop") - - ;(define_peephole - ; [(set (match_operand:SI 0 "memory_operand" "=m") - ; (match_operand:SI 1 "reg_or_0_operand" "rfJ")) - ; (set (pc) (match_operand:SI 2 "register_operand" "r")) - ; (use (label_ref (match_operand 3 "" "")))] - ; "" - ; "* return output_delayed_branch (\"bri %2\", operands, insn);") - - ;;- jump to subroutine - (define_expand "call" - [(call (match_operand:SI 0 "memory_operand" "m") - (match_operand 1 "" "i"))] - ;; operand[2] is next_arg_register - "" - " - { - /* Make sure the address is just one reg and will stay that way. */ - if (! call_insn_operand (operands[0], QImode)) - operands[0] - = replace_equiv_address (operands[0], - copy_to_mode_reg (Pmode, - XEXP (operands[0], 0))); - if (INTVAL (operands[1]) > 0) - { - emit_move_insn (arg_pointer_rtx, stack_pointer_rtx); - emit_insn (gen_rtx_USE (VOIDmode, arg_pointer_rtx)); - } - }") - - ;;- jump to subroutine - (define_insn "" - [(call (match_operand:SI 0 "call_insn_operand" "m") - (match_operand 1 "" "i"))] - ;; operand[2] is next_arg_register - "" - "* - { - /* strip the MEM. */ - operands[0] = XEXP (operands[0], 0); - CC_STATUS_INIT; - if (GET_CODE (operands[0]) == REG) - return \"calli %0\;nop\"; - return \"call %0\;nop\"; - }") - - ;(define_peephole - ; [(set (match_operand:SI 0 "register_operand" "=rf") - ; (match_operand:SI 1 "single_insn_src_p" "gfG")) - ; (call (match_operand:SI 2 "memory_operand" "m") - ; (match_operand 3 "" "i"))] - ; ;;- Don't use operand 1 for most machines. - ; "! reg_mentioned_p (operands[0], operands[2])" - ; "* - ;{ - ; /* strip the MEM. */ - ; operands[2] = XEXP (operands[2], 0); - ; if (GET_CODE (operands[2]) == REG) - ; return output_delayed_branch (\"calli %2\", operands, insn); - ; return output_delayed_branch (\"call %2\", operands, insn); - ;}") - - ;(define_peephole - ; [(set (match_operand:SI 0 "memory_operand" "=m") - ; (match_operand:SI 1 "reg_or_0_operand" "rfJ")) - ; (call (match_operand:SI 2 "call_insn_operand" "m") - ; (match_operand 3 "" "i"))] - ; ;;- Don't use operand 1 for most machines. - ; "" - ; "* - ;{ - ; /* strip the MEM. */ - ; operands[2] = XEXP (operands[2], 0); - ; if (GET_CODE (operands[2]) == REG) - ; return output_delayed_branch (\"calli %2\", operands, insn); - ; return output_delayed_branch (\"call %2\", operands, insn); - ;}") - - (define_expand "call_value" - [(set (match_operand 0 "register_operand" "=rf") - (call (match_operand:SI 1 "memory_operand" "m") - (match_operand 2 "" "i")))] - ;; operand 3 is next_arg_register - "" - " - { - /* Make sure the address is just one reg and will stay that way. */ - if (! call_insn_operand (operands[1], QImode)) - operands[1] - = replace_equiv_address (operands[1], - copy_to_mode_reg (Pmode, - XEXP (operands[1], 0))); - if (INTVAL (operands[2]) > 0) - { - emit_move_insn (arg_pointer_rtx, stack_pointer_rtx); - emit_insn (gen_rtx_USE (VOIDmode, arg_pointer_rtx)); - } - }") - - (define_insn "" - [(set (match_operand 0 "register_operand" "=rf") - (call (match_operand:SI 1 "call_insn_operand" "m") - (match_operand 2 "" "i")))] - ;; operand 3 is next_arg_register - "" - "* - { - /* strip the MEM. */ - operands[1] = XEXP (operands[1], 0); - CC_STATUS_INIT; - if (GET_CODE (operands[1]) == REG) - return \"calli %1\;nop\"; - return \"call %1\;nop\"; - }") - - ;(define_peephole - ; [(set (match_operand:SI 0 "register_operand" "=rf") - ; (match_operand:SI 1 "single_insn_src_p" "gfG")) - ; (set (match_operand 2 "" "=rf") - ; (call (match_operand:SI 3 "call_insn_operand" "m") - ; (match_operand 4 "" "i")))] - ; ;;- Don't use operand 4 for most machines. - ; "! reg_mentioned_p (operands[0], operands[3])" - ; "* - ;{ - ; /* strip the MEM. */ - ; operands[3] = XEXP (operands[3], 0); - ; if (GET_CODE (operands[3]) == REG) - ; return output_delayed_branch (\"calli %3\", operands, insn); - ; return output_delayed_branch (\"call %3\", operands, insn); - ;}") - - ;(define_peephole - ; [(set (match_operand:SI 0 "memory_operand" "=m") - ; (match_operand:SI 1 "reg_or_0_operand" "rJf")) - ; (set (match_operand 2 "" "=rf") - ; (call (match_operand:SI 3 "call_insn_operand" "m") - ; (match_operand 4 "" "i")))] - ; ;;- Don't use operand 4 for most machines. - ; "" - ; "* - ;{ - ; /* strip the MEM. */ - ; operands[3] = XEXP (operands[3], 0); - ; if (GET_CODE (operands[3]) == REG) - ; return output_delayed_branch (\"calli %3\", operands, insn); - ; return output_delayed_branch (\"call %3\", operands, insn); - ;}") - - ;; Call subroutine returning any type. - - (define_expand "untyped_call" - [(parallel [(call (match_operand 0 "" "") - (const_int 0)) - (match_operand 1 "" "") - (match_operand 2 "" "")])] - "" - " - { - int i; - - emit_call_insn (GEN_CALL (operands[0], const0_rtx, NULL, const0_rtx)); - - for (i = 0; i < XVECLEN (operands[2], 0); i++) - { - rtx set = XVECEXP (operands[2], 0, i); - emit_move_insn (SET_DEST (set), SET_SRC (set)); - } - - /* The optimizer does not know that the call sets the function value - registers we stored in the result block. We avoid problems by - claiming that all hard registers are used and clobbered at this - point. */ - emit_insn (gen_blockage ()); - - DONE; - }") - - ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and - ;; all of memory. This blocks insns from being moved across this point. - - (define_insn "blockage" - [(unspec_volatile [(const_int 0)] 0)] - "" - "") - - (define_insn "nop" - [(const_int 0)] - "" - "nop") - - (define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "register_operand" "r"))] - "" - "bri %0") - - ;; - ;; A special insn that does the work to get setup just - ;; before a table jump. - ;; - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "r") - (label_ref (match_operand 2 "" "")))))] - "" - "* - { - CC_STATUS_INIT; - return \"orh %H2,%?r0,%?r31\;or %L2,%?r31,%?r31\;ld.l %?r31(%1),%0\"; - }") - - ;(define_peephole - ; [(set (match_operand:SI 0 "register_operand" "=rf") - ; (match_operand:SI 1 "single_insn_src_p" "gfG")) - ; (set (pc) (match_operand:SI 2 "register_operand" "r")) - ; (use (label_ref (match_operand 3 "" "")))] - ; "REGNO (operands[0]) != REGNO (operands[2])" - ; "* return output_delayed_branch (\"bri %2\", operands, insn);") --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/i860-protos.h gcc-3.3/gcc/config/i860/i860-protos.h *** gcc-3.2.3/gcc/config/i860/i860-protos.h 2001-07-06 18:40:11.000000000 +0000 --- gcc-3.3/gcc/config/i860/i860-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,61 **** - /* Definitions of target machine for GNU compiler, for Intel 860. - Copyright (C) 2000 Free Software Foundation, Inc. - Hacked substantially by Ron Guilmette (rfg@monkeys.com) to cater to - the whims of the System V Release 4 assembler. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Declare things which are defined in i860.c but called from - insn-output.c. */ - - #ifdef RTX_CODE - extern unsigned long sfmode_constant_to_ulong PARAMS ((rtx)); - extern const char *output_load PARAMS ((rtx *)); - extern const char *output_store PARAMS ((rtx *)); - extern const char *output_move_double PARAMS ((rtx *)); - extern const char *output_fp_move_double PARAMS ((rtx *)); - extern const char *output_block_move PARAMS ((rtx *)); - extern const char *output_delay_insn PARAMS ((rtx)); - #if 0 - extern const char *output_delayed_branch PARAMS ((const char *, rtx *, rtx)); - #endif - extern void output_load_address PARAMS ((rtx *)); - extern int safe_insn_src_p PARAMS ((rtx, enum machine_mode)); - extern int operand_clobbered_before_used_after PARAMS ((rtx, rtx)); - extern int single_insn_src_p PARAMS ((rtx, enum machine_mode)); - extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode)); - extern int arith_operand PARAMS ((rtx, enum machine_mode)); - extern int logic_operand PARAMS ((rtx, enum machine_mode)); - extern int shift_operand PARAMS ((rtx, enum machine_mode)); - extern int compare_operand PARAMS ((rtx, enum machine_mode)); - extern int bte_operand PARAMS ((rtx, enum machine_mode)); - extern int indexed_operand PARAMS ((rtx, enum machine_mode)); - extern int load_operand PARAMS ((rtx, enum machine_mode)); - extern int small_int PARAMS ((rtx, enum machine_mode)); - extern int logic_int PARAMS ((rtx, enum machine_mode)); - extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); - extern rtx i860_saveregs PARAMS ((void)); - #ifdef TREE_CODE - extern void i860_va_start PARAMS ((int, tree, rtx)); - extern rtx i860_va_arg PARAMS ((tree, tree)); - #endif /* TREE_CODE */ - #endif /* RTX_CODE */ - - #ifdef TREE_CODE - extern tree i860_build_va_list PARAMS ((void)); - #endif /* TREE_CODE */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/mach.h gcc-3.3/gcc/config/i860/mach.h *** gcc-3.2.3/gcc/config/i860/mach.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/i860/mach.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,14 **** - /* Configuration for an i860 running Mach as the target machine. */ - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (i860 Mach3.x)"); - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -Di860 -DMACH -Asystem=unix -Asystem=mach -Acpu=i860 -Amachine=i860" - - /* Specify extra dir to search for include files. */ - #define SYSTEM_INCLUDE_DIR "/usr/mach/include" - - /* Don't default to pcc-struct-return, because gcc is the only compiler, and - we want to retain compatibility with older gcc versions. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/paragon.h gcc-3.3/gcc/config/i860/paragon.h *** gcc-3.2.3/gcc/config/i860/paragon.h 2001-12-20 17:36:35.000000000 +0000 --- gcc-3.3/gcc/config/i860/paragon.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,190 **** - /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD - Copyright (C) 1991, 1996, 1999, 2000 Free Software Foundation, Inc. - Based upon original work of Ron Guilmette (rfg@monkeys.com). - Contributed by Andy Pfiffer (andyp@ssd.intel.com). - Partially inspired by - Pete Beckman of Indiana University (beckman@cs.indiana.edu) - Harry Dolan of Intel Corporation (dolan@ssd.intel.com) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #undef TARGET_SWITCHES - #define TARGET_SWITCHES \ - { {"xp", 1, N_("Generate code which uses the FPU")}, \ - {"noxp", -1, N_("Do not generate code which uses the FPU")}, \ - {"xr", -1, N_("Do not generate code which uses the FPU")}, \ - {"noieee", -1, N_("Do not generate code which uses the FPU")}, \ - {"nx", 2, NULL}, \ - { "", TARGET_DEFAULT, NULL}} - - #undef TARGET_DEFAULT - #define TARGET_DEFAULT 1 - - /* The Intel as860 assembler does not understand .stabs, must use COFF */ - #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (i860 OSF/1AD)"); - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Di860 -D__i860 -D__i860__ -D__PARAGON__ -D__OSF1__ -D_COFF -Dunix -DMACH -DCMU" - - #define CPP_SPEC "%{mnx:-D__NODE}" - - /* autoinit.o autolaunches NX applications */ - #define STARTFILE_SPEC "crt0.o%s %{mnx:-yoptions/autoinit.o%s}" - - /* libic.a is the PGI intrinsic library */ - /* libpm.o and guard.o are for the performance monitoring modules (ignored) */ - /* /usr/lib/noieee contains non-IEEE compliant (but faster) math routines */ - #if HAVE_DASH_G - #define LIB_SPEC \ - "%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx} %{g*:-lg} -lc -lmach -lc -lic" - #else /* HAVE_DASH_G */ - /* can't use -g for -lg; libg.a doesn't have a symbol table and ld complains */ - #define LIB_SPEC "%{mnoieee:-L/usr/lib/noieee} %{mnx:-lnx} -lc -lmach -lc -lic" - #endif /* HAVE_DASH_G */ - - /* Get rid of definition from svr3.h. */ - #undef SIZE_TYPE - - #undef I860_REG_PREFIX - - #undef ASM_COMMENT_START - #define ASM_COMMENT_START "//" - - #undef TYPE_OPERAND_FMT - #define TYPE_OPERAND_FMT "\"%s\"" - - #undef ASCII_DATA_ASM_OP - #define ASCII_DATA_ASM_OP "\t.byte\t" - - /* - * the assembler we're using doesn't grok .ident... - */ - #undef ASM_OUTPUT_IDENT - #define ASM_OUTPUT_IDENT(FILE, NAME) \ - fprintf (FILE, "//\t.ident \"%s\"\n", NAME); - - #undef ASM_OUTPUT_ASCII - #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ - do \ - { \ - register const unsigned char *str = (const unsigned char *) (STR); \ - register const unsigned char *limit = str + (LENGTH); \ - register unsigned bytes_in_chunk = 0; \ - for (; str < limit; str++) \ - { \ - register unsigned ch = *str; \ - if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \ - { \ - if (bytes_in_chunk > 0) \ - { \ - fprintf ((FILE), "\"\n"); \ - bytes_in_chunk = 0; \ - } \ - assemble_aligned_integer (1, GEN_INT (ch)); \ - } \ - else \ - { \ - if (bytes_in_chunk >= 60) \ - { \ - fprintf ((FILE), "\"\n"); \ - bytes_in_chunk = 0; \ - } \ - if (bytes_in_chunk == 0) \ - fprintf ((FILE), "%s\"", ASCII_DATA_ASM_OP); \ - putc (ch, (FILE)); \ - bytes_in_chunk++; \ - } \ - } \ - if (bytes_in_chunk > 0) \ - fprintf ((FILE), "\"\n"); \ - } \ - while (0) - - - /* This says how to output an assembler line - to define a local common symbol. */ - - #undef ASM_OUTPUT_LOCAL - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - /* - * not defining ASM_STABS_OP yields .stabs in the .s file - * when using g++ -- so, I'll define it. - */ - #define ASM_STABS_OP "//.stabs" - - /* Define this macro if an instruction to load a value narrower - than a word from memory into a register also zero-extends the - value to the whole register. */ - /*#define BYTE_LOADS_ZERO_EXTEND*/ - - /* Define this macro as a C expression which is nonzero if - accessing less than a word of memory (i.e. a `char' or a - `short') is no faster than accessing a word of memory, i.e., if - such access require more than one instruction or if there is no - difference in cost between byte and (aligned) word loads. - - On RISC machines, it tends to generate better code to define - this as 1, since it avoids making a QI or HI mode register. */ - /* - #undef SLOW_BYTE_ACCESS - #define SLOW_BYTE_ACCESS 1 - */ - - /* Define if shifts truncate the shift count - which implies one can omit a sign-extension or zero-extension - of a shift count. */ - #define SHIFT_COUNT_TRUNCATED 1 - - - #define FASTEST_ALIGNMENT 32 - - /* Make strings word-aligned so strcpy from constants will be faster. */ - #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ - (TREE_CODE (EXP) == STRING_CST \ - && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN)) - - /* Make arrays of chars word-aligned for the same reasons. */ - #define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ - && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN)) - - /* - * disable a few things picked up from svr3.h - */ - #undef INIT_SECTION_ASM_OP - #undef FINI_SECTION_ASM_OP - #undef CONST_SECTION_ASM_OP - #undef CTORS_SECTION_ASM_OP - #undef DTORS_SECTION_ASM_OP - #undef DO_GLOBAL_CTORS_BODY - #undef ASM_OUTPUT_DESTRUCTOR - #undef SELECT_SECTION - #undef SELECT_RTX_SECTION - #undef READONLY_DATA_SECTION - - #define BSS_SECTION_ASM_OP "\t.bss" /* XXX */ - #undef EXTRA_SECTIONS - #undef EXTRA_SECTION_FUNCTIONS --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/sysv3.h gcc-3.3/gcc/config/i860/sysv3.h *** gcc-3.2.3/gcc/config/i860/sysv3.h 2001-12-17 15:05:33.000000000 +0000 --- gcc-3.3/gcc/config/i860/sysv3.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,168 **** - /* Target definitions for GNU compiler for Intel 80860 running System V.3 - Copyright (C) 1991, 1996, 2000 Free Software Foundation, Inc. - Contributed by Ron Guilmette (rfg@monkeys.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (i860, System V Release 3)") - - /* Provide a set of pre-definitions and pre-assertions appropriate for - the i860 running svr3. */ - #define CPP_PREDEFINES "-Di860 -Dunix -D__svr3__ -Asystem=unix -Asystem=svr3 -Acpu=i860 -Amachine=i860" - - /* Use crt1.o as a startup file and crtn.o as a closing file. */ - - #define STARTFILE_SPEC \ - "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" - - #define LIB_SPEC "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} -lc crtn.o%s" - - /* Special flags for the linker. I don't know what they do. */ - - #define LINK_SPEC "%{T*} %{z:-lm}" - - /* The prefix to be used in assembler output for all names of registers. - None is needed in V.3. */ - - #define I860_REG_PREFIX "" - - /* Delimiter that starts comments in the assembler code. */ - - #define ASM_COMMENT_START "//" - - /* Output the special word the System V SDB wants to see just before - the first word of each function's prologue code. */ - - extern const char *current_function_original_name; - - /* This special macro is used to output a magic word just before the - first word of each function. On some versions of UNIX running on - the i860, this word can be any word that looks like a NOP, however - under svr4, this neds to be an `shr r0,r0,r0' instruction in which - the normally unused low-order bits contain the length of the function - prologue code (in bytes). This is needed to make the System V SDB - debugger happy. */ - - #undef ASM_OUTPUT_FUNCTION_PREFIX - #define ASM_OUTPUT_FUNCTION_PREFIX(FILE, FNNAME) \ - do { ASM_OUTPUT_ALIGN (FILE, 2); \ - fprintf ((FILE), "\t.long\t.ep."); \ - assemble_name (FILE, FNNAME); \ - fprintf (FILE, "-"); \ - assemble_name (FILE, FNNAME); \ - fprintf (FILE, "+0xc8000000\n"); \ - current_function_original_name = (FNNAME); \ - } while (0) - - /* Output the special label that must go just after each function's - prologue code to support svr4 SDB. */ - - #define ASM_OUTPUT_PROLOGUE_SUFFIX(FILE) \ - do { fprintf (FILE, ".ep."); \ - assemble_name (FILE, current_function_original_name); \ - fprintf (FILE, ":\n"); \ - } while (0) - - /* This says how to output an assembler line - to define a local common symbol. - The difference from svr3.h is we don't limit align to 2. */ - - #undef ASM_OUTPUT_LOCAL - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - do { \ - int align = exact_log2 (ROUNDED); \ - data_section (); \ - ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \ - ASM_OUTPUT_LABEL ((FILE), (NAME)); \ - fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)); \ - } while (0) - - /* The routine used to output string literals. */ - - #define ASCII_DATA_ASM_OP "\t.byte\t" - - #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ - do \ - { \ - register const unsigned char *str = (const unsigned char *) (STR); \ - register const unsigned char *limit = str + (LENGTH); \ - register unsigned bytes_in_chunk = 0; \ - for (; str < limit; str++) \ - { \ - register unsigned ch = *str; \ - if (ch < 32 || ch == '\\' || ch == '"' || ch >= 127) \ - { \ - if (bytes_in_chunk > 0) \ - { \ - fprintf ((FILE), "\"\n"); \ - bytes_in_chunk = 0; \ - } \ - assemble_aligned_integer (1, GEN_INT (ch)); \ - } \ - else \ - { \ - if (bytes_in_chunk >= 60) \ - { \ - fprintf ((FILE), "\"\n"); \ - bytes_in_chunk = 0; \ - } \ - if (bytes_in_chunk == 0) \ - fprintf ((FILE), "%s\"", ASCII_DATA_ASM_OP); \ - putc (ch, (FILE)); \ - bytes_in_chunk++; \ - } \ - } \ - if (bytes_in_chunk > 0) \ - fprintf ((FILE), "\"\n"); \ - } \ - while (0) - - - #undef CTORS_SECTION_ASM_OP - #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"x\"" - #undef DTORS_SECTION_ASM_OP - #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"x\"" - - /* Add definitions to support the .tdesc section as specified in the svr4 - ABI for the i860. */ - - #define TDESC_SECTION_ASM_OP "\t.section\t.tdesc" - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS in_const, in_tdesc - - #undef EXTRA_SECTION_FUNCTIONS - #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ - TDESC_SECTION_FUNCTION - - #define TDESC_SECTION_FUNCTION \ - void \ - tdesc_section () \ - { \ - if (in_section != in_tdesc) \ - { \ - fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP); \ - in_section = in_tdesc; \ - } \ - } - - /* Enable the `const' section that svr3.h defines how to use. */ - #undef USE_CONST_SECTION - #define USE_CONST_SECTION 1 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/sysv4.h gcc-3.3/gcc/config/i860/sysv4.h *** gcc-3.2.3/gcc/config/i860/sysv4.h 2001-12-20 17:36:35.000000000 +0000 --- gcc-3.3/gcc/config/i860/sysv4.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,144 **** - /* Target definitions for GNU compiler for Intel 80860 running System V.4 - Copyright (C) 1991, 1996, 2000 Free Software Foundation, Inc. - Contributed by Ron Guilmette (rfg@monkeys.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (i860 System V Release 4)"); - - /* Provide a set of pre-definitions and pre-assertions appropriate for - the i860 running svr4. Note that the symbol `__svr4__' MUST BE - DEFINED! It is needed so that the va_list struct in va-i860.h - will get correctly defined for the svr4 (ABI compliant) case rather - than for the previous (svr3, svr2, ...) case. It also needs to be - defined so that the correct (svr4) version of __builtin_saveregs - will be selected when we are building gnulib2.c. - __svr4__ is our extension. */ - - #define CPP_PREDEFINES \ - "-Di860 -Dunix -DSVR4 -D__svr4__ -Asystem=unix -Asystem=svr4 -Acpu=i860 -Amachine=i860" - - /* For the benefit of i860_va_arg, flag it this way too. */ - - #define I860_SVR4_VA_LIST 1 - - /* The prefix to be used in assembler output for all names of registers. - This string gets prepended to all i860 register names (svr4 only). */ - - #define I860_REG_PREFIX "%" - - #define ASM_COMMENT_START "#" - - #undef TYPE_OPERAND_FMT - #define TYPE_OPERAND_FMT "\"%s\"" - - /* The following macro definition overrides the one in i860.h - because the svr4 i860 assembler requires a different syntax - for getting parts of constant/relocatable values. */ - - #undef PRINT_OPERAND_PART - #define PRINT_OPERAND_PART(FILE, X, PART_CODE) \ - do { fprintf (FILE, "["); \ - output_address (X); \ - fprintf (FILE, "]@%s", PART_CODE); \ - } while (0) - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - do { output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - - /* Output the special word the svr4 SDB wants to see just before - the first word of each function's prologue code. */ - - extern const char *current_function_original_name; - - /* This special macro is used to output a magic word just before the - first word of each function. On some versions of UNIX running on - the i860, this word can be any word that looks like a NOP, however - under svr4, this neds to be an `shr r0,r0,r0' instruction in which - the normally unused low-order bits contain the length of the function - prologue code (in bytes). This is needed to make the svr4 SDB debugger - happy. */ - - #undef ASM_OUTPUT_FUNCTION_PREFIX - #define ASM_OUTPUT_FUNCTION_PREFIX(FILE, FNNAME) \ - do { ASM_OUTPUT_ALIGN (FILE, 2); \ - fprintf ((FILE), "\t.long\t.ep."); \ - assemble_name (FILE, FNNAME); \ - fprintf (FILE, "-"); \ - assemble_name (FILE, FNNAME); \ - fprintf (FILE, "+0xc8000000\n"); \ - current_function_original_name = (FNNAME); \ - } while (0) - - /* Output the special label that must go just after each function's - prologue code to support svr4 SDB. */ - - #define ASM_OUTPUT_PROLOGUE_SUFFIX(FILE) \ - do { fprintf (FILE, ".ep."); \ - assemble_name (FILE, current_function_original_name); \ - fprintf (FILE, ":\n"); \ - } while (0) - - /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. - - Note that we want to give these sections the SHF_WRITE attribute - because these sections will actually contain data (i.e. tables of - addresses of functions in the current root executable or shared library - file) and, in the case of a shared library, the relocatable addresses - will have to be properly resolved/relocated (and then written into) by - the dynamic linker when it actually attaches the given shared library - to the executing process. (Note that on SVR4, you may wish to use the - `-z text' option to the ELF linker, when building a shared library, as - an additional check that you are doing everything right. But if you do - use the `-z text' option when building a shared library, you will get - errors unless the .ctors and .dtors sections are marked as writable - via the SHF_WRITE attribute.) */ - - #undef CTORS_SECTION_ASM_OP - #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"aw\"" - #undef DTORS_SECTION_ASM_OP - #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"aw\"" - - /* Add definitions to support the .tdesc section as specified in the svr4 - ABI for the i860. */ - - #define TDESC_SECTION_ASM_OP "\t.section\t.tdesc" - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS in_const, in_tdesc - - #undef EXTRA_SECTION_FUNCTIONS - #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ - TDESC_SECTION_FUNCTION - - #define TDESC_SECTION_FUNCTION \ - void \ - tdesc_section () \ - { \ - if (in_section != in_tdesc) \ - { \ - fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP); \ - in_section = in_tdesc; \ - } \ - } - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/t-fx2800 gcc-3.3/gcc/config/i860/t-fx2800 *** gcc-3.2.3/gcc/config/i860/t-fx2800 1998-12-16 21:05:42.000000000 +0000 --- gcc-3.3/gcc/config/i860/t-fx2800 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Use ieee rounding rules for divide and square root operations. - # /bin/cc is assumed to point to fxc version 1.3 or newer. - CCLIBFLAGS=-O -ieee -uniproc --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i860/varargs.asm gcc-3.3/gcc/config/i860/varargs.asm *** gcc-3.2.3/gcc/config/i860/varargs.asm 2001-04-25 00:58:04.000000000 +0000 --- gcc-3.3/gcc/config/i860/varargs.asm 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,201 **** - /* Special varargs support for i860. - Copyright (C) 2001 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - In addition to the permissions in the GNU General Public License, the - Free Software Foundation gives you unlimited permission to link the - compiled version of this file into combinations with other programs, - and to distribute those combinations without any restriction coming - from the use of this file. (The General Public License restrictions - do apply in other respects; for example, they cover modification of - the file, and distribution when not linked into a combine - executable.) - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #if defined(__svr4__) || defined(__alliant__) - .text - .align 4 - - /* The Alliant needs the added underscore. */ - .globl __builtin_saveregs - __builtin_saveregs: - .globl ___builtin_saveregs - ___builtin_saveregs: - - andnot 0x0f,%sp,%sp /* round down to 16-byte boundary */ - adds -96,%sp,%sp /* allocate stack space for reg save - area and also for a new va_list - structure */ - /* Save all argument registers in the arg reg save area. The - arg reg save area must have the following layout (according - to the svr4 ABI): - - struct { - union { - float freg[8]; - double dreg[4]; - } float_regs; - long ireg[12]; - }; - */ - - fst.q %f8, 0(%sp) /* save floating regs (f8-f15) */ - fst.q %f12,16(%sp) - - st.l %r16,32(%sp) /* save integer regs (r16-r27) */ - st.l %r17,36(%sp) - st.l %r18,40(%sp) - st.l %r19,44(%sp) - st.l %r20,48(%sp) - st.l %r21,52(%sp) - st.l %r22,56(%sp) - st.l %r23,60(%sp) - st.l %r24,64(%sp) - st.l %r25,68(%sp) - st.l %r26,72(%sp) - st.l %r27,76(%sp) - - adds 80,%sp,%r16 /* compute the address of the new - va_list structure. Put in into - r16 so that it will be returned - to the caller. */ - - /* Initialize all fields of the new va_list structure. This - structure looks like: - - typedef struct { - unsigned long ireg_used; - unsigned long freg_used; - long *reg_base; - long *mem_ptr; - } va_list; - */ - - st.l %r0, 0(%r16) /* nfixed */ - st.l %r0, 4(%r16) /* nfloating */ - st.l %sp, 8(%r16) /* __va_ctl points to __va_struct. */ - bri %r1 /* delayed return */ - st.l %r28,12(%r16) /* pointer to overflow args */ - - #else /* not __svr4__ */ - #if defined(__PARAGON__) - /* - * we'll use SVR4-ish varargs but need SVR3.2 assembler syntax, - * and we stand a better chance of hooking into libraries - * compiled by PGI. [andyp@ssd.intel.com] - */ - .text - .align 4 - .globl __builtin_saveregs - __builtin_saveregs: - .globl ___builtin_saveregs - ___builtin_saveregs: - - andnot 0x0f,sp,sp /* round down to 16-byte boundary */ - adds -96,sp,sp /* allocate stack space for reg save - area and also for a new va_list - structure */ - /* Save all argument registers in the arg reg save area. The - arg reg save area must have the following layout (according - to the svr4 ABI): - - struct { - union { - float freg[8]; - double dreg[4]; - } float_regs; - long ireg[12]; - }; - */ - - fst.q f8, 0(sp) - fst.q f12,16(sp) - st.l r16,32(sp) - st.l r17,36(sp) - st.l r18,40(sp) - st.l r19,44(sp) - st.l r20,48(sp) - st.l r21,52(sp) - st.l r22,56(sp) - st.l r23,60(sp) - st.l r24,64(sp) - st.l r25,68(sp) - st.l r26,72(sp) - st.l r27,76(sp) - - adds 80,sp,r16 /* compute the address of the new - va_list structure. Put in into - r16 so that it will be returned - to the caller. */ - - /* Initialize all fields of the new va_list structure. This - structure looks like: - - typedef struct { - unsigned long ireg_used; - unsigned long freg_used; - long *reg_base; - long *mem_ptr; - } va_list; - */ - - st.l r0, 0(r16) /* nfixed */ - st.l r0, 4(r16) /* nfloating */ - st.l sp, 8(r16) /* __va_ctl points to __va_struct. */ - bri r1 /* delayed return */ - st.l r28,12(r16) /* pointer to overflow args */ - #else /* not __PARAGON__ */ - .text - .align 4 - - .globl ___builtin_saveregs - ___builtin_saveregs: - mov sp,r30 - andnot 0x0f,sp,sp - adds -96,sp,sp /* allocate sufficient space on the stack */ - - /* Fill in the __va_struct. */ - st.l r16, 0(sp) /* save integer regs (r16-r27) */ - st.l r17, 4(sp) /* int fixed[12] */ - st.l r18, 8(sp) - st.l r19,12(sp) - st.l r20,16(sp) - st.l r21,20(sp) - st.l r22,24(sp) - st.l r23,28(sp) - st.l r24,32(sp) - st.l r25,36(sp) - st.l r26,40(sp) - st.l r27,44(sp) - - fst.q f8, 48(sp) /* save floating regs (f8-f15) */ - fst.q f12,64(sp) /* int floating[8] */ - - /* Fill in the __va_ctl. */ - st.l sp, 80(sp) /* __va_ctl points to __va_struct. */ - st.l r28,84(sp) /* pointer to more args */ - st.l r0, 88(sp) /* nfixed */ - st.l r0, 92(sp) /* nfloating */ - - adds 80,sp,r16 /* return address of the __va_ctl. */ - bri r1 - mov r30,sp - /* recover stack and pass address to start - of data. */ - #endif /* not __PARAGON__ */ - #endif /* not __svr4__ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i960/i960.c gcc-3.3/gcc/config/i960/i960.c *** gcc-3.2.3/gcc/config/i960/i960.c 2002-01-03 17:40:03.000000000 +0000 --- gcc-3.3/gcc/config/i960/i960.c 2002-10-22 23:05:17.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 40,54 **** #include "function.h" #include "recog.h" #include "toplev.h" - #include "cpplib.h" - #include "c-pragma.h" - #include "c-lex.h" #include "tm_p.h" #include "target.h" #include "target-def.h" static void i960_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void i960_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); /* Save the operands last given to a compare for use when we generate a scc or bcc insn. */ --- 40,53 ---- #include "function.h" #include "recog.h" #include "toplev.h" #include "tm_p.h" #include "target.h" #include "target-def.h" static void i960_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void i960_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void i960_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); /* Save the operands last given to a compare for use when we generate a scc or bcc insn. */ *************** static int ret_label = 0; *** 88,96 **** This is used to help identify functions that use an argument block. */ #define VARARGS_STDARG_FUNCTION(FNDECL) \ ! ((TYPE_ARG_TYPES (TREE_TYPE (FNDECL)) != 0 \ ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (FNDECL)))) != void_type_node)) \ ! || current_function_varargs) /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_SI_OP --- 87,95 ---- This is used to help identify functions that use an argument block. */ #define VARARGS_STDARG_FUNCTION(FNDECL) \ ! (TYPE_ARG_TYPES (TREE_TYPE (FNDECL)) != 0 \ ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (FNDECL))))) \ ! != void_type_node) /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_SI_OP *************** static int ret_label = 0; *** 101,113 **** #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE i960_output_function_epilogue struct gcc_target targetm = TARGET_INITIALIZER; ! /* Initialize variables before compiling any files. */ void i960_initialize () { if (TARGET_IC_COMPAT2_0) { i960_maxbitalignment = 8; --- 100,153 ---- #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE i960_output_function_epilogue + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK i960_output_mi_thunk + #undef TARGET_CAN_ASM_OUTPUT_MI_THUNK + #define TARGET_CAN_ASM_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + struct gcc_target targetm = TARGET_INITIALIZER; ! /* Override conflicting target switch options. ! Doesn't actually detect if more than one -mARCH option is given, but ! does handle the case of two blatantly conflicting -mARCH options. ! ! Also initialize variables before compiling any files. */ void i960_initialize () { + if (TARGET_K_SERIES && TARGET_C_SERIES) + { + warning ("conflicting architectures defined - using C series"); + target_flags &= ~TARGET_FLAG_K_SERIES; + } + if (TARGET_K_SERIES && TARGET_MC) + { + warning ("conflicting architectures defined - using K series"); + target_flags &= ~TARGET_FLAG_MC; + } + if (TARGET_C_SERIES && TARGET_MC) + { + warning ("conflicting architectures defined - using C series"); + target_flags &= ~TARGET_FLAG_MC; + } + if (TARGET_IC_COMPAT3_0) + { + flag_short_enums = 1; + flag_signed_char = 1; + target_flags |= TARGET_FLAG_CLEAN_LINKAGE; + if (TARGET_IC_COMPAT2_0) + { + warning ("iC2.0 and iC3.0 are incompatible - using iC3.0"); + target_flags &= ~TARGET_FLAG_IC_COMPAT2_0; + } + } + if (TARGET_IC_COMPAT2_0) + { + flag_signed_char = 1; + target_flags |= TARGET_FLAG_CLEAN_LINKAGE; + } + if (TARGET_IC_COMPAT2_0) { i960_maxbitalignment = 8; *************** i960_initialize () *** 118,123 **** --- 158,166 ---- i960_maxbitalignment = 128; i960_last_maxbitalignment = 8; } + + /* Tell the compiler which flavor of TFmode we're using. */ + real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format; } /* Return true if OP can be used as the source of an fp move insn. */ *************** bitpos (val) *** 324,331 **** return -1; } ! /* Return non-zero if OP is a mask, i.e. all one bits are consecutive. ! The return value indicates how many consecutive non-zero bits exist if this is a mask. This is the same as the next function, except that it does not indicate what the start and stop bit positions are. */ --- 367,374 ---- return -1; } ! /* Return nonzero if OP is a mask, i.e. all one bits are consecutive. ! The return value indicates how many consecutive nonzero bits exist if this is a mask. This is the same as the next function, except that it does not indicate what the start and stop bit positions are. */ *************** emit_move_sequence (operands, mode) *** 521,527 **** if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) != REG && (operands[1] != const0_rtx || current_function_args_size ! || current_function_varargs || current_function_stdarg || rtx_equal_function_value_matters)) /* Here we use the same test as movsi+1 pattern -- see i960.md. */ operands[1] = force_reg (mode, operands[1]); --- 564,570 ---- if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) != REG && (operands[1] != const0_rtx || current_function_args_size ! || current_function_stdarg || rtx_equal_function_value_matters)) /* Here we use the same test as movsi+1 pattern -- see i960.md. */ operands[1] = force_reg (mode, operands[1]); *************** i960_output_ldconst (dst, src) *** 767,779 **** output_asm_insn ("ldconst %1,%0", operands); return ""; } ! else if (mode == XFmode) { REAL_VALUE_TYPE d; long value_long[3]; int i; ! if (fp_literal_zero (src, XFmode)) return "movt 0,%0"; REAL_VALUE_FROM_CONST_DOUBLE (d, src); --- 810,822 ---- output_asm_insn ("ldconst %1,%0", operands); return ""; } ! else if (mode == TFmode) { REAL_VALUE_TYPE d; long value_long[3]; int i; ! if (fp_literal_zero (src, TFmode)) return "movt 0,%0"; REAL_VALUE_FROM_CONST_DOUBLE (d, src); *************** i960_print_operand (file, x, code) *** 1749,1755 **** } else if (rtxcode == CONST_DOUBLE) { - REAL_VALUE_TYPE d; char dstr[30]; if (x == CONST0_RTX (GET_MODE (x))) --- 1792,1797 ---- *************** i960_print_operand (file, x, code) *** 1763,1770 **** return; } ! REAL_VALUE_FROM_CONST_DOUBLE (d, x); ! REAL_VALUE_TO_DECIMAL (d, "%#g", dstr); fprintf (file, "0f%s", dstr); return; } --- 1805,1811 ---- return; } ! real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (x), sizeof (dstr), 0, 1); fprintf (file, "0f%s", dstr); return; } *************** hard_regno_mode_ok (regno, mode) *** 2172,2178 **** case DImode: case DFmode: return (regno & 1) == 0; ! case TImode: case XFmode: return (regno & 3) == 0; default: --- 2213,2219 ---- case DImode: case DFmode: return (regno & 1) == 0; ! case TImode: case TFmode: return (regno & 3) == 0; default: *************** hard_regno_mode_ok (regno, mode) *** 2183,2189 **** { switch (mode) { ! case SFmode: case DFmode: case XFmode: case SCmode: case DCmode: return 1; --- 2224,2230 ---- { switch (mode) { ! case SFmode: case DFmode: case TFmode: case SCmode: case DCmode: return 1; *************** i960_arg_size_and_align (mode, type, siz *** 2361,2374 **** size = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; if (type == 0) ! { ! /* ??? This is a hack to properly correct the alignment of XFmode ! values without affecting anything else. */ ! if (size == 3) ! align = 4; ! else ! align = size; ! } else if (TYPE_ALIGN (type) >= BITS_PER_WORD) align = TYPE_ALIGN (type) / BITS_PER_WORD; else --- 2402,2408 ---- size = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; if (type == 0) ! align = size; else if (TYPE_ALIGN (type) >= BITS_PER_WORD) align = TYPE_ALIGN (type) / BITS_PER_WORD; else *************** i960_object_bytes_bitalign (n) *** 2467,2477 **** MIN (pragma align, structure size alignment)). */ int ! i960_round_align (align, tsize) int align; ! tree tsize; { int new_align; if (! tsize || TREE_CODE (tsize) != INTEGER_CST) return align; --- 2501,2518 ---- MIN (pragma align, structure size alignment)). */ int ! i960_round_align (align, type) int align; ! tree type; { int new_align; + tree tsize; + + if (TARGET_OLD_ALIGN || TYPE_PACKED (type)) + return align; + if (TREE_CODE (type) != RECORD_TYPE) + return align; + tsize = TYPE_SIZE (type); if (! tsize || TREE_CODE (tsize) != INTEGER_CST) return align; *************** i960_setup_incoming_varargs (cum, mode, *** 2516,2531 **** if (cum->ca_nstackparms == 0 && first_reg < NPARM_REGS && !no_rtl) { rtx label = gen_label_rtx (); ! rtx regblock; ! /* If arg_pointer_rtx == 0, no arguments were passed on the stack and we need to allocate a chunk to save the registers (if any arguments were passed on the stack the caller would allocate the 48 bytes as well). We must allocate all 48 bytes (12*4) because va_start assumes it. */ ! emit_insn (gen_cmpsi (arg_pointer_rtx, const0_rtx)); emit_jump_insn (gen_bne (label)); ! emit_insn (gen_rtx_SET (VOIDmode, arg_pointer_rtx, stack_pointer_rtx)); emit_insn (gen_rtx_SET (VOIDmode, stack_pointer_rtx, memory_address (SImode, --- 2557,2576 ---- if (cum->ca_nstackparms == 0 && first_reg < NPARM_REGS && !no_rtl) { rtx label = gen_label_rtx (); ! rtx regblock, fake_arg_pointer_rtx; ! /* Use a different rtx than arg_pointer_rtx so that cse and friends ! can go on believing that the argument pointer can never be zero. */ ! fake_arg_pointer_rtx = gen_raw_REG (Pmode, ARG_POINTER_REGNUM); ! ! /* If the argument pointer is 0, no arguments were passed on the stack and we need to allocate a chunk to save the registers (if any arguments were passed on the stack the caller would allocate the 48 bytes as well). We must allocate all 48 bytes (12*4) because va_start assumes it. */ ! emit_insn (gen_cmpsi (fake_arg_pointer_rtx, const0_rtx)); emit_jump_insn (gen_bne (label)); ! emit_insn (gen_rtx_SET (VOIDmode, fake_arg_pointer_rtx, stack_pointer_rtx)); emit_insn (gen_rtx_SET (VOIDmode, stack_pointer_rtx, memory_address (SImode, *************** i960_build_va_list () *** 2557,2568 **** /* Implement `va_start' for varargs and stdarg. */ void ! i960_va_start (stdarg_p, valist, nextarg) ! int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg ATTRIBUTE_UNUSED; { tree s, t, base, num; /* The array type always decays to a pointer before we get here, so we can't use ARRAY_REF. */ --- 2602,2613 ---- /* Implement `va_start' for varargs and stdarg. */ void ! i960_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { tree s, t, base, num; + rtx fake_arg_pointer_rtx; /* The array type always decays to a pointer before we get here, so we can't use ARRAY_REF. */ *************** i960_va_start (stdarg_p, valist, nextarg *** 2571,2577 **** build (PLUS_EXPR, unsigned_type_node, valist, TYPE_SIZE_UNIT (TREE_TYPE (valist)))); ! s = make_tree (unsigned_type_node, arg_pointer_rtx); t = build (MODIFY_EXPR, unsigned_type_node, base, s); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); --- 2616,2625 ---- build (PLUS_EXPR, unsigned_type_node, valist, TYPE_SIZE_UNIT (TREE_TYPE (valist)))); ! /* Use a different rtx than arg_pointer_rtx so that cse and friends ! can go on believing that the argument pointer can never be zero. */ ! fake_arg_pointer_rtx = gen_raw_REG (Pmode, ARG_POINTER_REGNUM); ! s = make_tree (unsigned_type_node, fake_arg_pointer_rtx); t = build (MODIFY_EXPR, unsigned_type_node, base, s); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); *************** i960_scan_opcode (p) *** 2783,2785 **** --- 2831,2856 ---- break; } } + + static void + i960_output_mi_thunk (file, thunk, delta, vcall_offset, function) + FILE *file; + tree thunk ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; + tree function; + { + int d = delta; + if (d < 0 && d > -32) + fprintf (file, "\tsubo %d,g0,g0\n", -d); + else if (d > 0 && d < 32) + fprintf (file, "\taddo %d,g0,g0\n", d); + else + { + fprintf (file, "\tldconst %d,r5\n", d); + fprintf (file, "\taddo r5,g0,g0\n"); + } + fprintf (file, "\tbx "); + assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); + fprintf (file, "\n"); + } diff -Nrc3pad gcc-3.2.3/gcc/config/i960/i960-c.c gcc-3.3/gcc/config/i960/i960-c.c *** gcc-3.2.3/gcc/config/i960/i960-c.c 2001-03-15 16:29:10.000000000 +0000 --- gcc-3.3/gcc/config/i960/i960-c.c 2002-05-25 22:01:52.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 27,33 **** #include "cpplib.h" #include "tree.h" #include "c-pragma.h" - #include "c-lex.h" #include "toplev.h" #include "ggc.h" #include "tm_p.h" --- 27,32 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i960/i960.h gcc-3.3/gcc/config/i960/i960.h *** gcc-3.2.3/gcc/config/i960/i960.h 2002-05-21 23:45:01.000000000 +0000 --- gcc-3.3/gcc/config/i960/i960.h 2002-10-20 22:37:10.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 111,120 **** #define TARGET_VERSION fprintf (stderr," (intel 80960)"); /* Generate DBX debugging information. */ ! #define DBX_DEBUGGING_INFO /* Generate SDB style debugging information. */ ! #define SDB_DEBUGGING_INFO #define EXTENDED_SDB_BASIC_TYPES /* Generate DBX_DEBUGGING_INFO by default. */ --- 111,120 ---- #define TARGET_VERSION fprintf (stderr," (intel 80960)"); /* Generate DBX debugging information. */ ! #define DBX_DEBUGGING_INFO 1 /* Generate SDB style debugging information. */ ! #define SDB_DEBUGGING_INFO 1 #define EXTENDED_SDB_BASIC_TYPES /* Generate DBX_DEBUGGING_INFO by default. */ *************** extern int target_flags; *** 335,378 **** /* Override conflicting target switch options. Doesn't actually detect if more than one -mARCH option is given, but does handle the case of two blatantly conflicting -mARCH options. */ ! #define OVERRIDE_OPTIONS \ ! { \ ! if (TARGET_K_SERIES && TARGET_C_SERIES) \ ! { \ ! warning ("conflicting architectures defined - using C series"); \ ! target_flags &= ~TARGET_FLAG_K_SERIES; \ ! } \ ! if (TARGET_K_SERIES && TARGET_MC) \ ! { \ ! warning ("conflicting architectures defined - using K series"); \ ! target_flags &= ~TARGET_FLAG_MC; \ ! } \ ! if (TARGET_C_SERIES && TARGET_MC) \ ! { \ ! warning ("conflicting architectures defined - using C series");\ ! target_flags &= ~TARGET_FLAG_MC; \ ! } \ ! if (TARGET_IC_COMPAT3_0) \ ! { \ ! flag_short_enums = 1; \ ! flag_signed_char = 1; \ ! target_flags |= TARGET_FLAG_CLEAN_LINKAGE; \ ! if (TARGET_IC_COMPAT2_0) \ ! { \ ! warning ("iC2.0 and iC3.0 are incompatible - using iC3.0"); \ ! target_flags &= ~TARGET_FLAG_IC_COMPAT2_0; \ ! } \ ! } \ ! if (TARGET_IC_COMPAT2_0) \ ! { \ ! flag_signed_char = 1; \ ! target_flags |= TARGET_FLAG_CLEAN_LINKAGE; \ ! } \ ! /* ??? See the LONG_DOUBLE_TYPE_SIZE definition below. */ \ ! if (TARGET_LONG_DOUBLE_64) \ ! warning ("the -mlong-double-64 option does not work yet");\ ! i960_initialize (); \ ! } /* Don't enable anything by default. The user is expected to supply a -mARCH option. If none is given, then -mka is added by CC1_SPEC. */ --- 335,341 ---- /* Override conflicting target switch options. Doesn't actually detect if more than one -mARCH option is given, but does handle the case of two blatantly conflicting -mARCH options. */ ! #define OVERRIDE_OPTIONS i960_initialize () /* Don't enable anything by default. The user is expected to supply a -mARCH option. If none is given, then -mka is added by CC1_SPEC. */ *************** extern int target_flags; *** 380,389 **** /* Target machine storage layout. */ - /* Define for cross-compilation from a host with a different float format - or endianness, as well as to support 80 bit long doubles on the i960. */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN 0 --- 343,348 ---- *************** extern int target_flags; *** 397,434 **** numbered. */ #define WORDS_BIG_ENDIAN 0 - /* Number of bits in an addressable storage unit. */ - #define BITS_PER_UNIT 8 - /* Bitfields cannot cross word boundaries. */ #define BITFIELD_NBYTES_LIMITED 1 - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 ! /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ ! #define POINTER_SIZE 32 ! ! /* Width in bits of a long double. Define to 96, and let ! ROUND_TYPE_ALIGN adjust the alignment for speed. */ ! #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_64 ? 64 : 96) ! ! /* ??? This must be a constant, because real.c and real.h test it with #if. */ ! #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE 96 /* Define this to set long double type size to use in libgcc2.c, which can not depend on target_flags. */ #if defined(__LONG_DOUBLE_64__) #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 #else ! #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96 #endif /* Allocation boundary (in *bits*) for storing pointers in memory. */ --- 356,377 ---- numbered. */ #define WORDS_BIG_ENDIAN 0 /* Bitfields cannot cross word boundaries. */ #define BITFIELD_NBYTES_LIMITED 1 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 ! /* Width in bits of a long double. */ ! #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_64 ? 64 : 128) ! #define MAX_LONG_DOUBLE_TYPE_SIZE 128 /* Define this to set long double type size to use in libgcc2.c, which can not depend on target_flags. */ #if defined(__LONG_DOUBLE_64__) #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 #else ! #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 #endif /* Allocation boundary (in *bits*) for storing pointers in memory. */ *************** extern int target_flags; *** 473,505 **** ? i960_object_bytes_bitalign (int_size_in_bytes (TREE_TYPE (EXP))) \ : (ALIGN)) - /* Make XFmode floating point quantities be 128 bit aligned. */ - #define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == XFmode \ - && (ALIGN) < 128 ? 128 : (ALIGN)) - /* Macros to determine size of aggregates (structures and unions in C). Normally, these may be defined to simply return the maximum alignment and simple rounded-up size, but on some machines (like the i960), the total size of a structure is based on a non-trivial rounding method. */ ! #define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED) \ ! ((TREE_CODE (TYPE) == REAL_TYPE && TYPE_MODE (TYPE) == XFmode) \ ! ? 128 /* Put 80 bit floating point elements on 128 bit boundaries. */ \ ! : ((!TARGET_OLD_ALIGN && !TYPE_PACKED (TYPE) \ ! && TREE_CODE (TYPE) == RECORD_TYPE) \ ! ? i960_round_align (MAX ((COMPUTED), (SPECIFIED)), TYPE_SIZE (TYPE)) \ ! : MAX ((COMPUTED), (SPECIFIED)))) ! ! #define ROUND_TYPE_SIZE(TYPE, COMPUTED, SPECIFIED) \ ! ((TREE_CODE (TYPE) == REAL_TYPE && TYPE_MODE (TYPE) == XFmode) \ ! ? bitsize_int (128) : round_up (COMPUTED, SPECIFIED)) ! #define ROUND_TYPE_SIZE_UNIT(TYPE, COMPUTED, SPECIFIED) \ ! ((TREE_CODE (TYPE) == REAL_TYPE && TYPE_MODE (TYPE) == XFmode) \ ! ? size_int (16) : round_up (COMPUTED, SPECIFIED)) ! /* Standard register usage. */ --- 416,429 ---- ? i960_object_bytes_bitalign (int_size_in_bytes (TREE_TYPE (EXP))) \ : (ALIGN)) /* Macros to determine size of aggregates (structures and unions in C). Normally, these may be defined to simply return the maximum alignment and simple rounded-up size, but on some machines (like the i960), the total size of a structure is based on a non-trivial rounding method. */ ! #define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED) \ ! i960_round_align (MAX ((COMPUTED), (SPECIFIED)), TYPE) /* Standard register usage. */ *************** extern int target_flags; *** 582,588 **** /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. On 80960, the cpu registers can hold any mode but the float registers ! can only hold SFmode, DFmode, or XFmode. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) hard_regno_mode_ok ((REGNO), (MODE)) /* Value is 1 if it is a good idea to tie two pseudo registers --- 506,512 ---- /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. On 80960, the cpu registers can hold any mode but the float registers ! can only hold SFmode, DFmode, or TFmode. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) hard_regno_mode_ok ((REGNO), (MODE)) /* Value is 1 if it is a good idea to tie two pseudo registers *************** enum reg_class { NO_REGS, GLOBAL_REGS, L *** 888,895 **** (VALIST) = i960_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! i960_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 812,819 ---- (VALIST) = i960_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! i960_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** struct cum_args { int ca_nregparms; int *** 1167,1175 **** /* Define this as 1 if `char' should by default be signed; else as 0. */ #define DEFAULT_SIGNED_CHAR 0 - /* Allow and ignore #sccs directives. */ - #define SCCS_DIRECTIVE - /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ #define MOVE_MAX 16 --- 1091,1096 ---- *************** struct cum_args { int ca_nregparms; int *** 1185,1191 **** #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND /* Nonzero if access to memory by bytes is no faster than for words. ! Value changed to 1 after reports of poor bitfield code with g++. Indications are that code is usually as good, sometimes better. */ #define SLOW_BYTE_ACCESS 1 --- 1106,1112 ---- #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND /* Nonzero if access to memory by bytes is no faster than for words. ! Value changed to 1 after reports of poor bit-field code with g++. Indications are that code is usually as good, sometimes better. */ #define SLOW_BYTE_ACCESS 1 *************** struct cum_args { int ca_nregparms; int *** 1216,1229 **** extern struct rtx_def *i960_compare_op0, *i960_compare_op1; - /* Add any extra modes needed to represent the condition code. - - Also, signed and unsigned comparisons are distinguished, as - are operations which are compatible with chkbit insns. */ - #define EXTRA_CC_MODES \ - CC(CC_UNSmode, "CC_UNS") \ - CC(CC_CHKmode, "CC_CHK") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. CC_NOOVmode should be used when the first operand is a --- 1137,1142 ---- *************** extern struct rtx_def *i960_compare_op0, *** 1339,1357 **** fprintf((FILE),"\t.stabd 68,0,%d\n",(LINE)); \ } } ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! { fputs ("\t.globl ", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE); } /* The prefix to add to user-visible assembler symbols. */ --- 1252,1259 ---- fprintf((FILE),"\t.stabd 68,0,%d\n",(LINE)); \ } } ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* The prefix to add to user-visible assembler symbols. */ *************** extern enum insn_types i960_last_insn_ty *** 1561,1582 **** /* Defined in reload.c, and used in insn-recog.c. */ extern int rtx_equal_function_value_matters; - - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - do { \ - int d = (DELTA); \ - if (d < 0 && d > -32) \ - fprintf (FILE, "\tsubo %d,g0,g0\n", -d); \ - else if (d > 0 && d < 32) \ - fprintf (FILE, "\taddo %d,g0,g0\n", d); \ - else \ - { \ - fprintf (FILE, "\tldconst %d,r5\n", d); \ - fprintf (FILE, "\taddo r5,g0,g0\n"); \ - } \ - fprintf (FILE, "\tbx "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "\n"); \ - } while (0); --- 1463,1465 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/i960/i960.md gcc-3.3/gcc/config/i960/i960.md *** gcc-3.2.3/gcc/config/i960/i960.md 2001-11-04 02:12:10.000000000 +0000 --- gcc-3.3/gcc/config/i960/i960.md 2002-10-07 08:54:09.000000000 +0000 *************** *** 594,600 **** ;; the calling convention is defined so that the arg pointer when it is not ;; overwise being used is zero. Thus, we can handle store zero to memory ;; by storing an unused arg pointer. The arg pointer will be unused if ! ;; current_function_args_size is zero and this is not a stdarg/varargs ;; function. This value of the former variable is not valid until after ;; all rtl generation is complete, including function inlining (because a ;; function that doesn't need an arg pointer may be inlined into a function --- 594,600 ---- ;; the calling convention is defined so that the arg pointer when it is not ;; overwise being used is zero. Thus, we can handle store zero to memory ;; by storing an unused arg pointer. The arg pointer will be unused if ! ;; current_function_args_size is zero and this is not a stdarg ;; function. This value of the former variable is not valid until after ;; all rtl generation is complete, including function inlining (because a ;; function that doesn't need an arg pointer may be inlined into a function *************** *** 605,611 **** [(set (match_operand:SI 0 "general_operand" "=d,d,d,m") (match_operand:SI 1 "general_operand" "dI,i,m,dJ"))] "(current_function_args_size == 0 - && current_function_varargs == 0 && current_function_stdarg == 0 && rtx_equal_function_value_matters == 0) && (register_operand (operands[0], SImode) --- 605,610 ---- *************** *** 643,649 **** [(set (match_operand:SI 0 "general_operand" "=d,d,d,m") (match_operand:SI 1 "general_operand" "dI,i,m,d"))] "(current_function_args_size != 0 - || current_function_varargs != 0 || current_function_stdarg != 0 || rtx_equal_function_value_matters != 0) && (register_operand (operands[0], SImode) --- 642,647 ---- *************** *** 692,698 **** [(set (match_operand:HI 0 "general_operand" "=d,d,d,m") (match_operand:HI 1 "general_operand" "dI,i,m,dJ"))] "(current_function_args_size == 0 - && current_function_varargs == 0 && current_function_stdarg == 0 && rtx_equal_function_value_matters == 0) && (register_operand (operands[0], HImode) --- 690,695 ---- *************** *** 731,737 **** [(set (match_operand:HI 0 "general_operand" "=d,d,d,m") (match_operand:HI 1 "general_operand" "dI,i,m,d"))] "(current_function_args_size != 0 - || current_function_varargs != 0 || current_function_stdarg != 0 || rtx_equal_function_value_matters != 0) && (register_operand (operands[0], HImode) --- 728,733 ---- *************** *** 777,783 **** [(set (match_operand:QI 0 "general_operand" "=d,d,d,m") (match_operand:QI 1 "general_operand" "dI,i,m,dJ"))] "(current_function_args_size == 0 - && current_function_varargs == 0 && current_function_stdarg == 0 && rtx_equal_function_value_matters == 0) && (register_operand (operands[0], QImode) --- 773,778 ---- *************** *** 816,822 **** [(set (match_operand:QI 0 "general_operand" "=d,d,d,m") (match_operand:QI 1 "general_operand" "dI,i,m,d"))] "(current_function_args_size != 0 - || current_function_varargs != 0 || current_function_stdarg != 0 || rtx_equal_function_value_matters != 0) && (register_operand (operands[0], QImode) --- 811,816 ---- *************** *** 862,868 **** [(set (match_operand:DI 0 "general_operand" "=d,d,d,d,m,o") (match_operand:DI 1 "general_operand" "d,I,i,m,d,J"))] "(current_function_args_size == 0 - && current_function_varargs == 0 && current_function_stdarg == 0 && rtx_equal_function_value_matters == 0) && (register_operand (operands[0], DImode) --- 856,861 ---- *************** *** 892,898 **** [(set (match_operand:DI 0 "general_operand" "=d,d,d,d,m") (match_operand:DI 1 "general_operand" "d,I,i,m,d"))] "(current_function_args_size != 0 - || current_function_varargs != 0 || current_function_stdarg != 0 || rtx_equal_function_value_matters != 0) && (register_operand (operands[0], DImode) --- 885,890 ---- *************** *** 945,951 **** [(set (match_operand:TI 0 "general_operand" "=d,d,d,d,m,o") (match_operand:TI 1 "general_operand" "d,I,i,m,d,J"))] "(current_function_args_size == 0 - && current_function_varargs == 0 && current_function_stdarg == 0 && rtx_equal_function_value_matters == 0) && (register_operand (operands[0], TImode) --- 937,942 ---- *************** *** 975,981 **** [(set (match_operand:TI 0 "general_operand" "=d,d,d,d,m") (match_operand:TI 1 "general_operand" "d,I,i,m,d"))] "(current_function_args_size != 0 - || current_function_varargs != 0 || current_function_stdarg != 0 || rtx_equal_function_value_matters != 0) && (register_operand (operands[0], TImode) --- 966,971 ---- *************** *** 1079,1085 **** [(set (match_operand:DF 0 "general_operand" "=r,*f,d,d,m,o") (match_operand:DF 1 "fpmove_src_operand" "r,GH,F,m,d,G"))] "(current_function_args_size == 0 - && current_function_varargs == 0 && current_function_stdarg == 0 && rtx_equal_function_value_matters == 0) && (register_operand (operands[0], DFmode) --- 1069,1074 ---- *************** *** 1115,1121 **** [(set (match_operand:DF 0 "general_operand" "=r,*f,d,d,m") (match_operand:DF 1 "fpmove_src_operand" "r,GH,F,m,d"))] "(current_function_args_size != 0 - || current_function_varargs != 0 || current_function_stdarg != 0 || rtx_equal_function_value_matters != 0) && (register_operand (operands[0], DFmode) --- 1104,1109 ---- *************** *** 1157,1163 **** [(set (match_operand:SF 0 "general_operand" "=r,*f,d,d,m") (match_operand:SF 1 "fpmove_src_operand" "r,GH,F,m,dG"))] "(current_function_args_size == 0 - && current_function_varargs == 0 && current_function_stdarg == 0 && rtx_equal_function_value_matters == 0) && (register_operand (operands[0], SFmode) --- 1145,1150 ---- *************** *** 1192,1198 **** [(set (match_operand:SF 0 "general_operand" "=r,*f,d,d,m") (match_operand:SF 1 "fpmove_src_operand" "r,GH,F,m,d"))] "(current_function_args_size != 0 - || current_function_varargs != 0 || current_function_stdarg != 0 || rtx_equal_function_value_matters != 0) && (register_operand (operands[0], SFmode) --- 1179,1184 ---- *************** *** 2075,2084 **** ;; Tetra (16 byte) float support. ! (define_expand "cmpxf" [(set (reg:CC 36) ! (compare:CC (match_operand:XF 0 "register_operand" "") ! (match_operand:XF 1 "nonmemory_operand" "")))] "TARGET_NUMERICS" " { --- 2061,2070 ---- ;; Tetra (16 byte) float support. ! (define_expand "cmptf" [(set (reg:CC 36) ! (compare:CC (match_operand:TF 0 "register_operand" "") ! (match_operand:TF 1 "nonmemory_operand" "")))] "TARGET_NUMERICS" " { *************** *** 2089,2115 **** (define_insn "" [(set (reg:CC 36) ! (compare:CC (match_operand:XF 0 "register_operand" "f") ! (match_operand:XF 1 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "cmpr %0,%1" [(set_attr "type" "fpcc")]) ! (define_expand "movxf" ! [(set (match_operand:XF 0 "general_operand" "") ! (match_operand:XF 1 "fpmove_src_operand" ""))] "" " { ! if (emit_move_sequence (operands, XFmode)) DONE; }") (define_insn "" ! [(set (match_operand:XF 0 "general_operand" "=r,f,d,d,m") ! (match_operand:XF 1 "fpmove_src_operand" "r,GH,F,m,d"))] ! "register_operand (operands[0], XFmode) ! || register_operand (operands[1], XFmode)" "* { switch (which_alternative) --- 2075,2101 ---- (define_insn "" [(set (reg:CC 36) ! (compare:CC (match_operand:TF 0 "register_operand" "f") ! (match_operand:TF 1 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "cmpr %0,%1" [(set_attr "type" "fpcc")]) ! (define_expand "movtf" ! [(set (match_operand:TF 0 "general_operand" "") ! (match_operand:TF 1 "fpmove_src_operand" ""))] "" " { ! if (emit_move_sequence (operands, TFmode)) DONE; }") (define_insn "" ! [(set (match_operand:TF 0 "general_operand" "=r,f,d,d,m") ! (match_operand:TF 1 "fpmove_src_operand" "r,GH,F,m,d"))] ! "register_operand (operands[0], TFmode) ! || register_operand (operands[1], TFmode)" "* { switch (which_alternative) *************** *** 2133,2141 **** }" [(set_attr "type" "move,move,load,fpload,fpstore")]) ! (define_insn "extendsfxf2" ! [(set (match_operand:XF 0 "register_operand" "=f,d") ! (float_extend:XF (match_operand:SF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" "@ --- 2119,2127 ---- }" [(set_attr "type" "move,move,load,fpload,fpstore")]) ! (define_insn "extendsftf2" ! [(set (match_operand:TF 0 "register_operand" "=f,d") ! (float_extend:TF (match_operand:SF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" "@ *************** *** 2143,2151 **** movre %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "extenddfxf2" ! [(set (match_operand:XF 0 "register_operand" "=f,d") ! (float_extend:XF (match_operand:DF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" "@ --- 2129,2137 ---- movre %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "extenddftf2" ! [(set (match_operand:TF 0 "register_operand" "=f,d") ! (float_extend:TF (match_operand:DF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" "@ *************** *** 2153,2237 **** movre %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "truncxfdf2" [(set (match_operand:DF 0 "register_operand" "=d") (float_truncate:DF ! (match_operand:XF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movrl %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "truncxfsf2" [(set (match_operand:SF 0 "register_operand" "=d") (float_truncate:SF ! (match_operand:XF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movr %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "floatsixf2" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (float:XF (match_operand:SI 1 "register_operand" "d")))] "TARGET_NUMERICS" "cvtir %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fix_truncxfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (fix:SI (fix:XF (match_operand:XF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fixuns_truncxfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (unsigned_fix:SI (fix:XF (match_operand:XF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "addxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (plus:XF (match_operand:XF 1 "nonmemory_operand" "%fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "addr %1,%2,%0" [(set_attr "type" "fpadd")]) ! (define_insn "subxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (minus:XF (match_operand:XF 1 "nonmemory_operand" "fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "subr %2,%1,%0" [(set_attr "type" "fpadd")]) ! (define_insn "mulxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (mult:XF (match_operand:XF 1 "nonmemory_operand" "%fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "mulr %1,%2,%0" [(set_attr "type" "fpmul")]) ! (define_insn "divxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (div:XF (match_operand:XF 1 "nonmemory_operand" "fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "divr %2,%1,%0" [(set_attr "type" "fpdiv")]) ! (define_insn "negxf2" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (neg:XF (match_operand:XF 1 "register_operand" "f")))] "TARGET_NUMERICS" "subr %1,0f0.0,%0" [(set_attr "type" "fpadd")]) ! (define_insn "absxf2" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (abs:XF (match_operand:XF 1 "register_operand" "f")))] "(TARGET_NUMERICS)" "cpysre %1,0f0.0,%0" [(set_attr "type" "fpmove")]) --- 2139,2223 ---- movre %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "trunctfdf2" [(set (match_operand:DF 0 "register_operand" "=d") (float_truncate:DF ! (match_operand:TF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movrl %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "trunctfsf2" [(set (match_operand:SF 0 "register_operand" "=d") (float_truncate:SF ! (match_operand:TF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movr %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "floatsitf2" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (float:TF (match_operand:SI 1 "register_operand" "d")))] "TARGET_NUMERICS" "cvtir %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fix_trunctfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (fix:SI (fix:TF (match_operand:TF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fixuns_trunctfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (unsigned_fix:SI (fix:TF (match_operand:TF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "addtf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (plus:TF (match_operand:TF 1 "nonmemory_operand" "%fGH") ! (match_operand:TF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "addr %1,%2,%0" [(set_attr "type" "fpadd")]) ! (define_insn "subtf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (minus:TF (match_operand:TF 1 "nonmemory_operand" "fGH") ! (match_operand:TF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "subr %2,%1,%0" [(set_attr "type" "fpadd")]) ! (define_insn "multf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (mult:TF (match_operand:TF 1 "nonmemory_operand" "%fGH") ! (match_operand:TF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "mulr %1,%2,%0" [(set_attr "type" "fpmul")]) ! (define_insn "divtf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (div:TF (match_operand:TF 1 "nonmemory_operand" "fGH") ! (match_operand:TF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "divr %2,%1,%0" [(set_attr "type" "fpdiv")]) ! (define_insn "negtf2" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (neg:TF (match_operand:TF 1 "register_operand" "f")))] "TARGET_NUMERICS" "subr %1,0f0.0,%0" [(set_attr "type" "fpadd")]) ! (define_insn "abstf2" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (abs:TF (match_operand:TF 1 "register_operand" "f")))] "(TARGET_NUMERICS)" "cpysre %1,0f0.0,%0" [(set_attr "type" "fpmove")]) *************** *** 2306,2313 **** "" " { ! emit_insn (gen_call_internal (operands[0], operands[1], ! virtual_outgoing_args_rtx)); DONE; }") --- 2292,2299 ---- "" " { ! emit_call_insn (gen_call_internal (operands[0], operands[1], ! virtual_outgoing_args_rtx)); DONE; }") *************** *** 2336,2343 **** "" " { ! emit_insn (gen_call_value_internal (operands[0], operands[1], operands[2], ! virtual_outgoing_args_rtx)); DONE; }") --- 2322,2330 ---- "" " { ! emit_call_insn (gen_call_value_internal (operands[0], operands[1], ! operands[2], ! virtual_outgoing_args_rtx)); DONE; }") *************** *** 2365,2372 **** ;; stack pointer, frame pointer, previous frame pointer and the return ;; instruction pointer. (define_insn "ret" ! [(use (reg:SI 16)) ! (unspec_volatile [(const_int 0)] 3)] "" "ret" [(set_attr "type" "branch") --- 2352,2358 ---- ;; stack pointer, frame pointer, previous frame pointer and the return ;; instruction pointer. (define_insn "ret" ! [(set (pc) (unspec_volatile [(reg:SI 16)] 3))] "" "ret" [(set_attr "type" "branch") *************** *** 2424,2430 **** because we are very careful to ret from the exact save area in use during the original call. */ ! emit_insn (gen_ret ()); emit_barrier (); DONE; }") --- 2410,2416 ---- because we are very careful to ret from the exact save area in use during the original call. */ ! emit_jump_insn (gen_ret ()); emit_barrier (); DONE; }") diff -Nrc3pad gcc-3.2.3/gcc/config/i960/i960-modes.def gcc-3.3/gcc/config/i960/i960-modes.def *** gcc-3.2.3/gcc/config/i960/i960-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/i960/i960-modes.def 2002-06-10 22:35:47.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + /* Definitions of target machine for GNU compiler, for Intel 80960 + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Steven McGeady, Intel Corp. + Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson + Converted to GCC 2.0 by Jim Wilson and Michael Tiemann, Cygnus Support. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + + Also, signed and unsigned comparisons are distinguished, as + are operations which are compatible with chkbit insns. */ + + CC (CC_UNS) + CC (CC_CHK) diff -Nrc3pad gcc-3.2.3/gcc/config/i960/i960-protos.h gcc-3.3/gcc/config/i960/i960-protos.h *** gcc-3.2.3/gcc/config/i960/i960-protos.h 2001-12-20 17:36:35.000000000 +0000 --- gcc-3.3/gcc/config/i960/i960-protos.h 2002-10-20 22:37:10.000000000 +0000 *************** extern struct rtx_def *i960_function_arg *** 73,79 **** enum machine_mode, tree, int)); extern rtx i960_va_arg PARAMS ((tree, tree)); ! extern void i960_va_start PARAMS ((int, tree, rtx)); #endif /* TREE_CODE */ extern enum reg_class secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx)); #endif /* RTX_CODE */ --- 73,79 ---- enum machine_mode, tree, int)); extern rtx i960_va_arg PARAMS ((tree, tree)); ! extern void i960_va_start PARAMS ((tree, rtx)); #endif /* TREE_CODE */ extern enum reg_class secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx)); #endif /* RTX_CODE */ diff -Nrc3pad gcc-3.2.3/gcc/config/i960/t-960bare gcc-3.3/gcc/config/i960/t-960bare *** gcc-3.2.3/gcc/config/i960/t-960bare 2001-06-26 02:11:06.000000000 +0000 --- gcc-3.3/gcc/config/i960/t-960bare 2002-05-25 22:01:52.000000000 +0000 *************** xp-bit.c: $(srcdir)/config/fp-bit.c *** 19,25 **** cat $(srcdir)/config/fp-bit.c >> xp-bit.c i960-c.o: $(srcdir)/config/i960/i960-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \ ! $(TREE_H) c-pragma.h c-lex.h toplev.h $(GGC_H) $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64 --- 19,25 ---- cat $(srcdir)/config/fp-bit.c >> xp-bit.c i960-c.o: $(srcdir)/config/i960/i960-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \ ! $(TREE_H) c-pragma.h toplev.h $(GGC_H) $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64 diff -Nrc3pad gcc-3.2.3/gcc/config/i960/t-vxworks960 gcc-3.3/gcc/config/i960/t-vxworks960 *** gcc-3.2.3/gcc/config/i960/t-vxworks960 2001-06-26 02:11:06.000000000 +0000 --- gcc-3.3/gcc/config/i960/t-vxworks960 2002-05-25 22:01:52.000000000 +0000 *************** xp-bit.c: $(srcdir)/config/fp-bit.c *** 22,28 **** cat $(srcdir)/config/fp-bit.c >> xp-bit.c i960-c.o: $(srcdir)/config/i960/i960-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \ ! $(TREE_H) c-pragma.h c-lex.h toplev.h $(GGC_H) $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64 --- 22,28 ---- cat $(srcdir)/config/fp-bit.c >> xp-bit.c i960-c.o: $(srcdir)/config/i960/i960-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \ ! $(TREE_H) c-pragma.h toplev.h $(GGC_H) $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64 diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/aix.h gcc-3.3/gcc/config/ia64/aix.h *** gcc-3.2.3/gcc/config/ia64/aix.h 2002-04-12 01:11:43.000000000 +0000 --- gcc-3.3/gcc/config/ia64/aix.h 2003-01-29 20:19:33.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 71,104 **** /* Define this so we can compile MS code for use with WINE. */ #define HANDLE_PRAGMA_PACK_PUSH_POP /* A C string constant that tells the GNU CC driver program options to pass to CPP. It can also specify how to translate options you give to GNU CC into options for GNU CC to pass to the CPP. */ - /* If -ansi, we need to define _ANSI_C_SOURCE to get the right headers. */ #undef CPP_SPEC #define CPP_SPEC "\ ! %{mcpu=itanium:-D__itanium__} %{mbig-endian:-D__BIG_ENDIAN__} \ ! %{ansi:-D_ANSI_C_SOURCE} \ ! %{posix:-D_POSIX_SOURCE} \ ! %{cpp_cpu} \ ! -D__LONG_MAX__=9223372036854775807L" ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "\ ! -D_AIX -D_AIX64 -D_LONGLONG -Dunix \ ! -Asystem=unix -Asystem=aix \ ! -D__64BIT__ -D_LONG_LONG -D_IA64 -D__int128=__size128_t" ! ! /* The GNU C++ standard library requires that these macros be defined. */ ! #undef CPLUSPLUS_CPP_SPEC ! #define CPLUSPLUS_CPP_SPEC \ ! "-D_XOPEN_SOURCE=500 \ ! -D_XOPEN_SOURCE_EXTENDED=1 \ ! -D_LARGE_FILE_API \ ! -D_ALL_SOURCE \ ! -D__LONG_MAX__=9223372036854775807L \ ! %{cpp_cpu}" /* Define this for shared library support. */ --- 71,106 ---- /* Define this so we can compile MS code for use with WINE. */ #define HANDLE_PRAGMA_PACK_PUSH_POP + /* Target OS builtins. */ + #define TARGET_OS_CPP_BUILTINS() \ + do { \ + if (flag_iso) \ + builtin_define("_ANSI_C_SOURCE"); \ + builtin_define("_AIX"); \ + builtin_define("_AIX64"); \ + builtin_define("unix"); \ + builtin_assert("system=unix"); \ + builtin_assert("system=aix"); \ + builtin_define("__64BIT__"); \ + builtin_define("_LONG_LONG"); \ + builtin_define("_IA64"); \ + builtin_define("__int128=__size128_t"); \ + if (c_language == clk_cplusplus) \ + { \ + builtin_define("_XOPEN_SOURCE=500"); \ + builtin_define("_XOPEN_SOURCE_EXTENDED=1"); \ + builtin_define("_LARGE_FILE_API"); \ + builtin_define("_ALL_SOURCE"); \ + } \ + } while (0) + /* A C string constant that tells the GNU CC driver program options to pass to CPP. It can also specify how to translate options you give to GNU CC into options for GNU CC to pass to the CPP. */ #undef CPP_SPEC #define CPP_SPEC "\ ! %{posix:-D_POSIX_SOURCE}" /* Define this for shared library support. */ *************** do { \ *** 132,234 **** #define STANDARD_STARTFILE_PREFIX "/usr/lib/ia64l64/" #endif ! /* Override SELECT_SECTION and SELECT_RTX_SECTION from config/ia64/sysv4.h; ! these definitions ignore flag_pic as if it were always set; ! it is illegal to have relocations in shared segments on AIX. */ ! ! /* A C statement or statements to switch to the appropriate ! section for output of DECL. DECL is either a `VAR_DECL' node ! or a constant of some sort. RELOC indicates whether forming ! the initial value of DECL requires link-time relocations. */ ! ! #undef SELECT_SECTION ! #define SELECT_SECTION(DECL,RELOC,ALIGN) \ ! { \ ! if (TREE_CODE (DECL) == STRING_CST) \ ! { \ ! if (! flag_writable_strings) \ ! const_section (); \ ! else \ ! data_section (); \ ! } \ ! else if (TREE_CODE (DECL) == VAR_DECL) \ ! { \ ! if (XSTR (XEXP (DECL_RTL (DECL), 0), 0)[0] \ ! == SDATA_NAME_FLAG_CHAR) \ ! sdata_section (); \ ! /* ??? We need the extra ! RELOC check, because the default is to \ ! only check RELOC if flag_pic is set, and we don't set flag_pic \ ! (yet?). */ \ ! else if (DECL_READONLY_SECTION (DECL, RELOC) && ! (RELOC)) \ ! const_section (); \ ! else \ ! data_section (); \ ! } \ ! /* This could be a CONSTRUCTOR containing ADDR_EXPR of a VAR_DECL, \ ! in which case we can't put it in a shared library rodata. */ \ ! else if (RELOC) \ ! data_section (); \ ! else \ ! const_section (); \ ! } ! ! /* Similarly for constant pool data. */ ! ! extern unsigned int ia64_section_threshold; ! #undef SELECT_RTX_SECTION ! #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) \ ! { \ ! if (GET_MODE_SIZE (MODE) > 0 \ ! && GET_MODE_SIZE (MODE) <= ia64_section_threshold) \ ! sdata_section (); \ ! else if (symbolic_operand ((RTX), (MODE))) \ ! data_section (); \ ! else \ ! const_section (); \ ! } ! ! #undef UNIQUE_SECTION ! #define UNIQUE_SECTION(DECL, RELOC) \ ! do \ ! { \ ! int len; \ ! int sec; \ ! const char *name; \ ! char *string; \ ! const char *prefix; \ ! static const char *const prefixes[/*4*/3][2] = \ ! { \ ! { ".text.", ".gnu.linkonce.t." }, \ ! { ".rodata.", ".gnu.linkonce.r." }, \ ! { ".data.", ".gnu.linkonce.d." } \ ! /* Do not generate unique sections for uninitialised \ ! data since we do not have support for this in the \ ! linker scripts yet... \ ! ,{ ".bss.", ".gnu.linkonce.b." } */ \ ! }; \ ! \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! sec = 0; \ ! /* else if (DECL_INITIAL (DECL) == 0 \ ! || DECL_INITIAL (DECL) == error_mark_node) \ ! sec = 3; */ \ ! else if (DECL_READONLY_SECTION (DECL, RELOC) && ! (RELOC))\ ! sec = 1; \ ! else \ ! sec = 2; \ ! \ ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ ! /* Strip off any encoding in name. */ \ ! STRIP_NAME_ENCODING (name, name); \ ! prefix = prefixes[sec][DECL_ONE_ONLY(DECL)]; \ ! len = strlen (name) + strlen (prefix); \ ! string = alloca (len + 1); \ ! \ ! sprintf (string, "%s%s", prefix, name); \ ! \ ! DECL_SECTION_NAME (DECL) = build_string (len, string); \ ! } \ ! while (0) /* Override ia64/sysv4.h setting with that used by AIX5. */ #undef WCHAR_TYPE --- 134,147 ---- #define STANDARD_STARTFILE_PREFIX "/usr/lib/ia64l64/" #endif ! /* It is illegal to have relocations in shared segments on AIX. ! Pretend flag_pic is always set. */ ! #undef TARGET_ASM_SELECT_SECTION ! #define TARGET_ASM_SELECT_SECTION ia64_rwreloc_select_section ! #undef TARGET_ASM_UNIQUE_SECTION ! #define TARGET_ASM_UNIQUE_SECTION ia64_rwreloc_unique_section ! #undef TARGET_ASM_SELECT_RTX_SECTION ! #define TARGET_ASM_SELECT_RTX_SECTION ia64_rwreloc_select_rtx_section /* Override ia64/sysv4.h setting with that used by AIX5. */ #undef WCHAR_TYPE diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/crtbegin.asm gcc-3.3/gcc/config/ia64/crtbegin.asm *** gcc-3.2.3/gcc/config/ia64/crtbegin.asm 2001-08-22 02:10:53.000000000 +0000 --- gcc-3.3/gcc/config/ia64/crtbegin.asm 2003-01-25 17:28:42.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by Jes Sorensen, The GNU C Library is free software; you can redistribute it and/or --- 1,4 ---- ! /* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Jes Sorensen, The GNU C Library is free software; you can redistribute it and/or *************** *** 16,21 **** --- 16,23 ---- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include "auto-host.h" + .section .ctors,"aw","progbits" .align 8 __CTOR_LIST__: *************** __dso_handle: *** 52,57 **** --- 54,69 ---- .hidden __dso_handle# + #ifdef HAVE_INITFINI_ARRAY + + .section .fini_array,"a","progbits" + data8 @fptr(__do_global_dtors_aux) + + .section .init_array,"a","progbits" + data8 @fptr(__do_jv_register_classes) + data8 @fptr(__do_global_ctors_aux) + + #else /* !HAVE_INITFINI_ARRAY */ /* * Fragment of the ELF _fini routine that invokes our dtor cleanup. * *************** __dso_handle: *** 98,103 **** --- 110,116 ---- br.call.sptk.many b0 = b6 ;; } + #endif /* !HAVE_INITFINI_ARRAY */ .section .text .align 16 diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/crtend.asm gcc-3.3/gcc/config/ia64/crtend.asm *** gcc-3.2.3/gcc/config/ia64/crtend.asm 2001-08-19 04:46:25.000000000 +0000 --- gcc-3.3/gcc/config/ia64/crtend.asm 2003-01-25 17:28:42.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by Jes Sorensen, The GNU C Library is free software; you can redistribute it and/or --- 1,4 ---- ! /* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Jes Sorensen, The GNU C Library is free software; you can redistribute it and/or *************** *** 16,21 **** --- 16,23 ---- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include "auto-host.h" + .section .ctors,"aw","progbits" .align 8 __CTOR_END__: *************** __DTOR_END__: *** 31,36 **** --- 33,39 ---- __JCR_END__: data8 0 + #ifndef HAVE_INITFINI_ARRAY /* * Fragment of the ELF _init routine that invokes our dtor cleanup. * *************** __JCR_END__: *** 59,67 **** --- 62,77 ---- br.call.sptk.many b0 = b6 ;; } + #endif /* !HAVE_INITFINI_ARRAY */ .text .align 16 + #ifdef HAVE_INITFINI_ARRAY + /* This is referenced from crtbegin.o. */ + .globl __do_global_ctors_aux# + .type __do_global_ctors_aux#,@function + .hidden __do_global_ctors_aux# + #endif .proc __do_global_ctors_aux# __do_global_ctors_aux: /* diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/elf.h gcc-3.3/gcc/config/ia64/elf.h *** gcc-3.2.3/gcc/config/ia64/elf.h 2002-04-12 01:11:43.000000000 +0000 --- gcc-3.3/gcc/config/ia64/elf.h 2002-09-17 15:50:08.000000000 +0000 *************** *** 5,16 **** #define TARGET_VERSION fprintf (stderr, " (IA-64) ELF"); - /* Define this to be a string constant containing `-D' options to define the - predefined macros that identify this machine and system. These macros will - be predefined unless the `-ansi' option is specified. */ - /* ??? This is undefed in svr4.h. */ - #define CPP_PREDEFINES "-Dia64 -Amachine=ia64" - /* A C string constant that tells the GNU CC driver program options to pass to the assembler. It can also specify how to translate options you give to GNU CC into options for GNU CC to pass to the assembler. */ --- 5,10 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/freebsd.h gcc-3.3/gcc/config/ia64/freebsd.h *** gcc-3.2.3/gcc/config/ia64/freebsd.h 2002-04-12 01:11:43.000000000 +0000 --- gcc-3.3/gcc/config/ia64/freebsd.h 2002-05-07 21:07:22.000000000 +0000 *************** the Free Software Foundation, 675 Mass A *** 42,50 **** We use the GCC defaults instead. */ #undef WCHAR_TYPE - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 --- 42,47 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/hpux.h gcc-3.3/gcc/config/ia64/hpux.h *** gcc-3.2.3/gcc/config/ia64/hpux.h 2002-04-12 01:11:43.000000000 +0000 --- gcc-3.3/gcc/config/ia64/hpux.h 2003-02-27 16:24:18.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine GNU compiler. IA-64 version. ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Steve Ellcey and Reva Cuthbertson --- 1,5 ---- /* Definitions of target machine GNU compiler. IA-64 version. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Steve Ellcey and Reva Cuthbertson *************** Boston, MA 02111-1307, USA. */ *** 25,50 **** #define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX"); ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "\ ! -D__IA64__ -D__hpux -D__hpux__ -Dhpux -Dunix \ ! -D__BIG_ENDIAN__ -D_LONGLONG \ ! -Asystem=hpux -Asystem=posix -Asystem=unix \ ! -D_UINT128_T" ! ! /* -D__fpreg=long double is needed to compensate for the lack of __fpreg ! which is a primitive type in HP C but does not exist in GNU C. Same ! for __float80 and __float128. These types appear in HP-UX header ! files and so must have some definition. */ ! ! #undef CPP_SPEC ! #define CPP_SPEC "\ ! %{mcpu=itanium:-D__itanium__} \ ! %{mlp64:-D__LP64__ -D_LP64 -D__LONG_MAX__=9223372036854775807L} \ ! %{!ansi:%{!std=c*:%{!std=i*: -D_HPUX_SOURCE -D__STDC_EXT__}}} \ ! -D__fpreg=long\\ double \ ! -D__float80=long\\ double \ ! -D__float128=long\\ double" #undef ASM_EXTRA_SPEC #define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}" --- 25,53 ---- #define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX"); ! /* Target OS builtins. */ ! /* -D__fpreg=long double is needed to compensate for ! the lack of __fpreg which is a primative type in ! HP C but does not exist in GNU C. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_assert("system=hpux"); \ ! builtin_assert("system=posix"); \ ! builtin_assert("system=unix"); \ ! builtin_define_std("hpux"); \ ! builtin_define_std("unix"); \ ! builtin_define("__IA64__"); \ ! builtin_define("_LONGLONG"); \ ! builtin_define("_UINT128_T"); \ ! builtin_define("__fpreg=long double"); \ ! builtin_define("__float80=long double"); \ ! builtin_define("__float128=long double"); \ ! if (c_language == clk_cplusplus || !flag_iso) \ ! { \ ! builtin_define("_HPUX_SOURCE"); \ ! builtin_define("__STDC_EXT__"); \ ! } \ ! } while (0) #undef ASM_EXTRA_SPEC #define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}" *************** Boston, MA 02111-1307, USA. */ *** 52,75 **** #undef ENDFILE_SPEC #undef STARTFILE_SPEC ! #ifdef CROSS_COMPILE ! #define STARTFILE_SPEC "%{!shared:crt0%O%s}" ! #else ! #define STARTFILE_SPEC "/usr/ccs/lib/hpux64/crt0%O" ! #endif #undef LINK_SPEC ! #define LINK_SPEC "\ ! +Accept TypeMismatch \ ! %{shared:-b} \ ! %{!shared: \ ! -u main \ ! %{!static: \ ! %{rdynamic:-export-dynamic}} \ ! %{static:-static}}" #undef LIB_SPEC ! #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}" #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ --- 55,85 ---- #undef ENDFILE_SPEC #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{!shared:%{static:crt0%O%s}}" #undef LINK_SPEC ! #define LINK_SPEC \ ! "+Accept TypeMismatch \ ! %{shared:-b} \ ! %{!shared: \ ! -u main \ ! %{static:-noshared}}" #undef LIB_SPEC ! #define LIB_SPEC \ ! "%{!shared: \ ! %{p:%{!mlp64:-L/usr/lib/hpux32/libp} \ ! %{mlp64:-L/usr/lib/hpux64/libp} -lprof} \ ! %{pg:%{!mlp64:-L/usr/lib/hpux32/libp} \ ! %{mlp64:-L/usr/lib/hpux64/libp} -lgprof} \ ! %{!symbolic:-lc}}" ! ! #ifndef CROSS_COMPILE ! #undef LIBGCC_SPEC ! #define LIBGCC_SPEC \ ! "%{shared-libgcc:%{!mlp64:-lgcc_s_hpux32}%{mlp64:-lgcc_s_hpux64} -lgcc} \ ! %{!shared-libgcc:-lgcc}" ! #endif #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ *************** Boston, MA 02111-1307, USA. */ *** 85,118 **** #define JMP_BUF_SIZE (8 * 76) - #undef CONST_SECTION_ASM_OP - #define CONST_SECTION_ASM_OP "\t.section\t.rodata,\t\"a\",\t\"progbits\"" - - #undef BITS_BIG_ENDIAN - #define BITS_BIG_ENDIAN 1 - #undef TARGET_DEFAULT ! #define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_BIG_ENDIAN) /* This needs to be set to force structure arguments with a single field to be treated as structures and not as the type of their field. Without this a structure with a single char will be returned just like a char variable and that is wrong on HP-UX ! IA64. TARGET_STRUCT_ARG_REG_LITTLE_ENDIAN triggers the special ! structure handling, this macro simply ensures that single field ! structures are always treated like structures. */ ! #define MEMBER_TYPE_FORCES_BLK(FIELD) 1 ! /* Override the setting of FUNCTION_ARG_REG_LITTLE_ENDIAN in ! defaults.h. Setting this to true means that we are not passing ! structures in registers in the "normal" big-endian way. See ! See section 8.5 of the "Itanium Software Conventions and Runtime ! Architecture", specifically Table 8-1 and the explanation of Byte 0 ! alignment and LSB alignment and a description of how structures ! are passed. */ ! #define FUNCTION_ARG_REG_LITTLE_ENDIAN 1 #undef FUNCTION_ARG_PADDING #define FUNCTION_ARG_PADDING(MODE, TYPE) \ --- 95,121 ---- #define JMP_BUF_SIZE (8 * 76) #undef TARGET_DEFAULT ! #define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_BIG_ENDIAN | MASK_ILP32) /* This needs to be set to force structure arguments with a single field to be treated as structures and not as the type of their field. Without this a structure with a single char will be returned just like a char variable and that is wrong on HP-UX ! IA64. */ ! #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) (TREE_CODE (TREE_TYPE (FIELD)) != REAL_TYPE || (MODE == TFmode && !INTEL_EXTENDED_IEEE_FORMAT)) ! /* ASM_OUTPUT_EXTERNAL_LIBCALL defaults to just a globalize_label call, ! but that doesn't put out the @function type information which causes ! shared library problems. */ ! #undef ASM_OUTPUT_EXTERNAL_LIBCALL ! #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! do { \ ! (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, XSTR (FUN, 0), "function"); \ ! } while (0) #undef FUNCTION_ARG_PADDING #define FUNCTION_ARG_PADDING(MODE, TYPE) \ *************** Boston, MA 02111-1307, USA. */ *** 120,122 **** --- 123,174 ---- #undef PAD_VARARGS_DOWN #define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type)) + + #define REGISTER_TARGET_PRAGMAS(PFILE) \ + cpp_register_pragma (PFILE, 0, "builtin", ia64_hpux_handle_builtin_pragma) + + /* Tell ia64.c that we are using the HP linker and we should delay output of + function extern declarations so that we don't output them for functions + which are never used (and may not be defined). */ + + #undef TARGET_HPUX_LD + #define TARGET_HPUX_LD 1 + + /* Put out the needed function declarations at the end. */ + + #define ASM_FILE_END(STREAM) ia64_hpux_asm_file_end(STREAM) + + #undef CTORS_SECTION_ASM_OP + #define CTORS_SECTION_ASM_OP "\t.section\t.init_array,\t\"aw\",\"init_array\"" + + #undef DTORS_SECTION_ASM_OP + #define DTORS_SECTION_ASM_OP "\t.section\t.fini_array,\t\"aw\",\"fini_array\"" + + #undef READONLY_DATA_SECTION_ASM_OP + #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata,\t\"a\",\t\"progbits\"" + + #undef DATA_SECTION_ASM_OP + #define DATA_SECTION_ASM_OP "\t.section\t.data,\t\"aw\",\t\"progbits\"" + + #undef SDATA_SECTION_ASM_OP + #define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\t\"asw\",\t\"progbits\"" + + #undef BSS_SECTION_ASM_OP + #define BSS_SECTION_ASM_OP "\t.section\t.bss,\t\"aw\",\t\"nobits\"" + + #undef SBSS_SECTION_ASM_OP + #define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\t\"asw\",\t\"nobits\"" + + #undef TEXT_SECTION_ASM_OP + #define TEXT_SECTION_ASM_OP "\t.section\t.text,\t\"ax\",\t\"progbits\"" + + /* It is illegal to have relocations in shared segments on HPUX. + Pretend flag_pic is always set. */ + #undef TARGET_ASM_SELECT_SECTION + #define TARGET_ASM_SELECT_SECTION ia64_rwreloc_select_section + #undef TARGET_ASM_UNIQUE_SECTION + #define TARGET_ASM_UNIQUE_SECTION ia64_rwreloc_unique_section + #undef TARGET_ASM_SELECT_RTX_SECTION + #define TARGET_ASM_SELECT_RTX_SECTION ia64_rwreloc_select_rtx_section + #undef TARGET_SECTION_TYPE_FLAGS + #define TARGET_SECTION_TYPE_FLAGS ia64_rwreloc_section_type_flags diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/hpux_longdouble.h gcc-3.3/gcc/config/ia64/hpux_longdouble.h *** gcc-3.2.3/gcc/config/ia64/hpux_longdouble.h 2001-08-18 19:59:46.000000000 +0000 --- gcc-3.3/gcc/config/ia64/hpux_longdouble.h 2002-11-18 23:21:42.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 18,25 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Tell real.c that we are not using INTEL_EXTENDED_IEEE_FORMAT */ ! #undef INTEL_EXTENDED_IEEE_FORMAT #define INTEL_EXTENDED_IEEE_FORMAT 0 --- 18,24 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* We are using IEEE quad precision, not a double-extended with padding. */ #undef INTEL_EXTENDED_IEEE_FORMAT #define INTEL_EXTENDED_IEEE_FORMAT 0 *************** Boston, MA 02111-1307, USA. */ *** 42,47 **** --- 41,48 ---- #define FLOATDITF2_LIBCALL "_U_Qfcnvxf_dbl_to_quad" #define FIX_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_sgl" #define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl" + #define FIXUNS_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxut_quad_to_sgl" + #define FIXUNS_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxut_quad_to_dbl" #define EQTF2_LIBCALL "_U_Qfeq" #define NETF2_LIBCALL "_U_Qfne" #define GTTF2_LIBCALL "_U_Qfgt" *************** Boston, MA 02111-1307, USA. */ *** 77,84 **** floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \ fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\ fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\ ! fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL); \ ! fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \ --- 78,85 ---- floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \ fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\ fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\ ! fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL); \ ! fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFDI2_LIBCALL); \ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \ *************** Boston, MA 02111-1307, USA. */ *** 86,96 **** lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \ letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \ \ - sdiv_optab->handlers[(int) SImode].libfunc = 0; \ - udiv_optab->handlers[(int) SImode].libfunc = 0; \ - smod_optab->handlers[(int) SImode].libfunc = 0; \ - umod_optab->handlers[(int) SImode].libfunc = 0; \ - \ INIT_SUBTARGET_OPTABS; \ } while (0) --- 87,92 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/ia64.c gcc-3.3/gcc/config/ia64/ia64.c *** gcc-3.2.3/gcc/config/ia64/ia64.c 2002-04-19 03:52:56.000000000 +0000 --- gcc-3.3/gcc/config/ia64/ia64.c 2003-04-26 20:37:40.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by James E. Wilson and David Mosberger . --- 1,5 ---- /* Definitions of target machine for GNU compiler. ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by James E. Wilson and David Mosberger . *************** Boston, MA 02111-1307, USA. */ *** 35,41 **** #include "recog.h" #include "expr.h" #include "optabs.h" - #include "obstack.h" #include "except.h" #include "function.h" #include "ggc.h" --- 35,40 ---- *************** Boston, MA 02111-1307, USA. */ *** 46,51 **** --- 45,51 ---- #include "target.h" #include "target-def.h" #include "tm_p.h" + #include "langhooks.h" /* This is used for communication between ASM_OUTPUT_LABEL and ASM_OUTPUT_LABELREF. */ *************** static const char * const ia64_output_re *** 95,100 **** --- 95,107 ---- /* String used with the -mfixed-range= option. */ const char *ia64_fixed_range_string; + /* Determines whether we use adds, addl, or movl to generate our + TLS immediate offsets. */ + int ia64_tls_size = 22; + + /* String used with the -mtls-size= option. */ + const char *ia64_tls_size_string; + /* Determines whether we run our final scheduling pass or not. We always avoid the normal second scheduling pass. */ static int ia64_flag_schedule_insns2; *************** static int ia64_flag_schedule_insns2; *** 103,109 **** --- 110,151 ---- sections. */ unsigned int ia64_section_threshold; + + /* Structure to be filled in by ia64_compute_frame_size with register + save masks and offsets for the current function. */ + + struct ia64_frame_info + { + HOST_WIDE_INT total_size; /* size of the stack frame, not including + the caller's scratch area. */ + HOST_WIDE_INT spill_cfa_off; /* top of the reg spill area from the cfa. */ + HOST_WIDE_INT spill_size; /* size of the gr/br/fr spill area. */ + HOST_WIDE_INT extra_spill_size; /* size of spill area for others. */ + HARD_REG_SET mask; /* mask of saved registers. */ + unsigned int gr_used_mask; /* mask of registers in use as gr spill + registers or long-term scratches. */ + int n_spilled; /* number of spilled registers. */ + int reg_fp; /* register for fp. */ + int reg_save_b0; /* save register for b0. */ + int reg_save_pr; /* save register for prs. */ + int reg_save_ar_pfs; /* save register for ar.pfs. */ + int reg_save_ar_unat; /* save register for ar.unat. */ + int reg_save_ar_lc; /* save register for ar.lc. */ + int reg_save_gp; /* save register for gp. */ + int n_input_regs; /* number of input registers used. */ + int n_local_regs; /* number of local registers used. */ + int n_output_regs; /* number of output registers used. */ + int n_rotate_regs; /* number of rotating registers used. */ + + char need_regstk; /* true if a .regstk directive needed. */ + char initialized; /* true if the data is finalized. */ + }; + + /* Current frame information calculated by ia64_compute_frame_size. */ + static struct ia64_frame_info current_frame_info; + static rtx gen_tls_get_addr PARAMS ((void)); + static rtx gen_thread_pointer PARAMS ((void)); static int find_gr_spill PARAMS ((int)); static int next_scratch_gr_reg PARAMS ((void)); static void mark_reg_gr_used_mask PARAMS ((rtx, void *)); *************** static rtx gen_fr_restore_x PARAMS ((rtx *** 119,131 **** static enum machine_mode hfa_element_mode PARAMS ((tree, int)); static void fix_range PARAMS ((const char *)); ! static void ia64_add_gc_roots PARAMS ((void)); ! static void ia64_init_machine_status PARAMS ((struct function *)); ! static void ia64_mark_machine_status PARAMS ((struct function *)); ! static void ia64_free_machine_status PARAMS ((struct function *)); static void emit_insn_group_barriers PARAMS ((FILE *, rtx)); static void emit_all_insn_group_barriers PARAMS ((FILE *, rtx)); static void emit_predicate_relation_info PARAMS ((void)); static void process_epilogue PARAMS ((void)); static int process_set PARAMS ((FILE *, rtx)); --- 161,173 ---- static enum machine_mode hfa_element_mode PARAMS ((tree, int)); static void fix_range PARAMS ((const char *)); ! static struct machine_function * ia64_init_machine_status PARAMS ((void)); static void emit_insn_group_barriers PARAMS ((FILE *, rtx)); static void emit_all_insn_group_barriers PARAMS ((FILE *, rtx)); static void emit_predicate_relation_info PARAMS ((void)); + static bool ia64_in_small_data_p PARAMS ((tree)); + static void ia64_encode_section_info PARAMS ((tree, int)); + static const char *ia64_strip_name_encoding PARAMS ((const char *)); static void process_epilogue PARAMS ((void)); static int process_set PARAMS ((FILE *, rtx)); *************** static int ia64_internal_sched_reorder P *** 152,159 **** static int ia64_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int)); static int ia64_sched_reorder2 PARAMS ((FILE *, int, rtx *, int *, int)); static int ia64_variable_issue PARAMS ((FILE *, int, rtx, int)); - static rtx ia64_cycle_display PARAMS ((int, rtx)); /* Table of valid machine attributes. */ static const struct attribute_spec ia64_attribute_table[] = --- 194,219 ---- static int ia64_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int)); static int ia64_sched_reorder2 PARAMS ((FILE *, int, rtx *, int *, int)); static int ia64_variable_issue PARAMS ((FILE *, int, rtx, int)); + static void ia64_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); + + static void ia64_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)); + static void ia64_rwreloc_select_section PARAMS ((tree, int, + unsigned HOST_WIDE_INT)) + ATTRIBUTE_UNUSED; + static void ia64_rwreloc_unique_section PARAMS ((tree, int)) + ATTRIBUTE_UNUSED; + static void ia64_rwreloc_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)) + ATTRIBUTE_UNUSED; + static unsigned int ia64_rwreloc_section_type_flags + PARAMS ((tree, const char *, int)) + ATTRIBUTE_UNUSED; + + static void ia64_hpux_add_extern_decl PARAMS ((const char *name)) + ATTRIBUTE_UNUSED; /* Table of valid machine attributes. */ static const struct attribute_spec ia64_attribute_table[] = *************** static const struct attribute_spec ia64_ *** 197,202 **** --- 257,269 ---- #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE ia64_output_function_epilogue + #undef TARGET_IN_SMALL_DATA_P + #define TARGET_IN_SMALL_DATA_P ia64_in_small_data_p + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO ia64_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING ia64_strip_name_encoding + #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST ia64_adjust_cost #undef TARGET_SCHED_ISSUE_RATE *************** static const struct attribute_spec ia64_ *** 211,218 **** #define TARGET_SCHED_REORDER ia64_sched_reorder #undef TARGET_SCHED_REORDER2 #define TARGET_SCHED_REORDER2 ia64_sched_reorder2 ! #undef TARGET_SCHED_CYCLE_DISPLAY ! #define TARGET_SCHED_CYCLE_DISPLAY ia64_cycle_display struct gcc_target targetm = TARGET_INITIALIZER; --- 278,293 ---- #define TARGET_SCHED_REORDER ia64_sched_reorder #undef TARGET_SCHED_REORDER2 #define TARGET_SCHED_REORDER2 ia64_sched_reorder2 ! ! #ifdef HAVE_AS_TLS ! #undef TARGET_HAVE_TLS ! #define TARGET_HAVE_TLS true ! #endif ! ! #undef TARGET_ASM_OUTPUT_MI_THUNK ! #define TARGET_ASM_OUTPUT_MI_THUNK ia64_output_mi_thunk ! #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK ! #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_true struct gcc_target targetm = TARGET_INITIALIZER; *************** call_operand (op, mode) *** 223,229 **** rtx op; enum machine_mode mode; { ! if (mode != GET_MODE (op)) return 0; return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG --- 298,304 ---- rtx op; enum machine_mode mode; { ! if (mode != GET_MODE (op) && mode != VOIDmode) return 0; return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG *************** sdata_symbolic_operand (op, mode) *** 250,256 **** if (CONSTANT_POOL_ADDRESS_P (op)) return GET_MODE_SIZE (get_pool_mode (op)) <= ia64_section_threshold; else ! return XSTR (op, 0)[0] == SDATA_NAME_FLAG_CHAR; default: break; --- 325,334 ---- if (CONSTANT_POOL_ADDRESS_P (op)) return GET_MODE_SIZE (get_pool_mode (op)) <= ia64_section_threshold; else ! { ! const char *str = XSTR (op, 0); ! return (str[0] == ENCODE_SECTION_INFO_CHAR && str[1] == 's'); ! } default: break; *************** symbolic_operand (op, mode) *** 324,329 **** --- 402,436 ---- return 0; } + /* Return tls_model if OP refers to a TLS symbol. */ + + int + tls_symbolic_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + const char *str; + + if (GET_CODE (op) != SYMBOL_REF) + return 0; + str = XSTR (op, 0); + if (str[0] != ENCODE_SECTION_INFO_CHAR) + return 0; + switch (str[1]) + { + case 'G': + return TLS_MODEL_GLOBAL_DYNAMIC; + case 'L': + return TLS_MODEL_LOCAL_DYNAMIC; + case 'i': + return TLS_MODEL_INITIAL_EXEC; + case 'l': + return TLS_MODEL_LOCAL_EXEC; + } + return 0; + } + + /* Return 1 if OP refers to a function. */ int *************** tfreg_or_fp01_operand (op, mode) *** 864,869 **** --- 971,991 ---- return 0; return fr_reg_or_fp01_operand (op, mode); } + + /* Return 1 if OP is valid as a base register in a reg + offset address. */ + + int + basereg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + /* ??? Should I copy the flag_omit_frame_pointer and cse_not_expected + checks from pa.c basereg_operand as well? Seems to be OK without them + in test runs. */ + + return (register_operand (op, mode) && + REG_POINTER ((GET_CODE (op) == SUBREG) ? SUBREG_REG (op) : op)); + } /* Return 1 if the operands of a move are ok. */ *************** ia64_move_ok (dst, src) *** 889,894 **** --- 1011,1031 ---- return GET_CODE (src) == CONST_DOUBLE && CONST_DOUBLE_OK_FOR_G (src); } + /* Return 0 if we are doing C++ code. This optimization fails with + C++ because of GNAT c++/6685. */ + + int + addp4_optimize_ok (op1, op2) + rtx op1, op2; + { + + if (!strcmp (lang_hooks.name, "GNU C++")) + return 0; + + return (basereg_operand (op1, GET_MODE(op1)) != + basereg_operand (op2, GET_MODE(op2))); + } + /* Check if OP is a mask suitible for use with SHIFT in a dep.z instruction. Return the length of the field, or <= 0 on failure. */ *************** ia64_expand_load_address (dest, src, scr *** 918,932 **** /* The destination could be a MEM during initial rtl generation, which isn't a valid destination for the PIC load address patterns. */ if (! register_operand (dest, DImode)) ! temp = gen_reg_rtx (DImode); else temp = dest; if (TARGET_AUTO_PIC) emit_insn (gen_load_gprel64 (temp, src)); else if (GET_CODE (src) == SYMBOL_REF && SYMBOL_REF_FLAG (src)) emit_insn (gen_load_fptr (temp, src)); ! else if (sdata_symbolic_operand (src, DImode)) emit_insn (gen_load_gprel (temp, src)); else if (GET_CODE (src) == CONST && GET_CODE (XEXP (src, 0)) == PLUS --- 1055,1076 ---- /* The destination could be a MEM during initial rtl generation, which isn't a valid destination for the PIC load address patterns. */ if (! register_operand (dest, DImode)) ! if (! scratch || ! register_operand (scratch, DImode)) ! temp = gen_reg_rtx (DImode); ! else ! temp = scratch; else temp = dest; + if (tls_symbolic_operand (src, Pmode)) + abort (); + if (TARGET_AUTO_PIC) emit_insn (gen_load_gprel64 (temp, src)); else if (GET_CODE (src) == SYMBOL_REF && SYMBOL_REF_FLAG (src)) emit_insn (gen_load_fptr (temp, src)); ! else if ((GET_MODE (src) == Pmode || GET_MODE (src) == ptr_mode) ! && sdata_symbolic_operand (src, VOIDmode)) emit_insn (gen_load_gprel (temp, src)); else if (GET_CODE (src) == CONST && GET_CODE (XEXP (src, 0)) == PLUS *************** ia64_expand_load_address (dest, src, scr *** 957,1007 **** scratch = no_new_pseudos ? temp : gen_reg_rtx (DImode); insn = emit_insn (gen_load_symptr (temp, src, scratch)); REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, src, REG_NOTES (insn)); } if (temp != dest) ! emit_move_insn (dest, temp); } ! rtx ! ia64_gp_save_reg (setjmp_p) ! int setjmp_p; { ! rtx save = cfun->machine->ia64_gp_save; ! ! if (save != NULL) { ! /* We can't save GP in a pseudo if we are calling setjmp, because ! pseudos won't be restored by longjmp. For now, we save it in r4. */ ! /* ??? It would be more efficient to save this directly into a stack ! slot. Unfortunately, the stack slot address gets cse'd across ! the setjmp call because the NOTE_INSN_SETJMP note is in the wrong ! place. */ ! /* ??? Get the barf bag, Virginia. We've got to replace this thing ! in place, since this rtx is used in exception handling receivers. ! Moreover, we must get this rtx out of regno_reg_rtx or reload ! will do the wrong thing. */ ! unsigned int old_regno = REGNO (save); ! if (setjmp_p && old_regno != GR_REG (4)) ! { ! REGNO (save) = GR_REG (4); ! regno_reg_rtx[old_regno] = gen_rtx_raw_REG (DImode, old_regno); ! } } ! else { ! if (setjmp_p) ! save = gen_rtx_REG (DImode, GR_REG (4)); ! else if (! optimize) ! save = gen_rtx_REG (DImode, LOC_REG (0)); ! else ! save = gen_reg_rtx (DImode); ! cfun->machine->ia64_gp_save = save; } ! return save; } /* Split a post-reload TImode reference into two DImode components. */ --- 1101,1301 ---- scratch = no_new_pseudos ? temp : gen_reg_rtx (DImode); insn = emit_insn (gen_load_symptr (temp, src, scratch)); + #ifdef POINTERS_EXTEND_UNSIGNED + if (GET_MODE (temp) != GET_MODE (src)) + src = convert_memory_address (GET_MODE (temp), src); + #endif REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, src, REG_NOTES (insn)); } if (temp != dest) ! { ! if (GET_MODE (dest) != GET_MODE (temp)) ! temp = convert_to_mode (GET_MODE (dest), temp, 0); ! emit_move_insn (dest, temp); ! } } ! static GTY(()) rtx gen_tls_tga; ! static rtx ! gen_tls_get_addr () { ! if (!gen_tls_tga) { ! gen_tls_tga = init_one_libfunc ("__tls_get_addr"); ! } ! return gen_tls_tga; ! } ! static GTY(()) rtx thread_pointer_rtx; ! static rtx ! gen_thread_pointer () ! { ! if (!thread_pointer_rtx) ! { ! thread_pointer_rtx = gen_rtx_REG (Pmode, 13); ! RTX_UNCHANGING_P (thread_pointer_rtx) = 1; } ! return thread_pointer_rtx; ! } ! ! rtx ! ia64_expand_move (op0, op1) ! rtx op0, op1; ! { ! enum machine_mode mode = GET_MODE (op0); ! ! if (!reload_in_progress && !reload_completed && !ia64_move_ok (op0, op1)) ! op1 = force_reg (mode, op1); ! ! if (mode == Pmode || mode == ptr_mode) { ! enum tls_model tls_kind; ! if ((tls_kind = tls_symbolic_operand (op1, Pmode))) ! { ! rtx tga_op1, tga_op2, tga_ret, tga_eqv, tmp, insns; ! ! switch (tls_kind) ! { ! case TLS_MODEL_GLOBAL_DYNAMIC: ! start_sequence (); ! ! tga_op1 = gen_reg_rtx (Pmode); ! emit_insn (gen_load_ltoff_dtpmod (tga_op1, op1)); ! tga_op1 = gen_rtx_MEM (Pmode, tga_op1); ! RTX_UNCHANGING_P (tga_op1) = 1; ! ! tga_op2 = gen_reg_rtx (Pmode); ! emit_insn (gen_load_ltoff_dtprel (tga_op2, op1)); ! tga_op2 = gen_rtx_MEM (Pmode, tga_op2); ! RTX_UNCHANGING_P (tga_op2) = 1; ! ! tga_ret = emit_library_call_value (gen_tls_get_addr (), NULL_RTX, ! LCT_CONST, Pmode, 2, tga_op1, ! Pmode, tga_op2, Pmode); ! ! insns = get_insns (); ! end_sequence (); ! ! emit_libcall_block (insns, op0, tga_ret, op1); ! return NULL_RTX; ! ! case TLS_MODEL_LOCAL_DYNAMIC: ! /* ??? This isn't the completely proper way to do local-dynamic ! If the call to __tls_get_addr is used only by a single symbol, ! then we should (somehow) move the dtprel to the second arg ! to avoid the extra add. */ ! start_sequence (); ! ! tga_op1 = gen_reg_rtx (Pmode); ! emit_insn (gen_load_ltoff_dtpmod (tga_op1, op1)); ! tga_op1 = gen_rtx_MEM (Pmode, tga_op1); ! RTX_UNCHANGING_P (tga_op1) = 1; ! ! tga_op2 = const0_rtx; ! ! tga_ret = emit_library_call_value (gen_tls_get_addr (), NULL_RTX, ! LCT_CONST, Pmode, 2, tga_op1, ! Pmode, tga_op2, Pmode); ! ! insns = get_insns (); ! end_sequence (); ! ! tga_eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), ! UNSPEC_LD_BASE); ! tmp = gen_reg_rtx (Pmode); ! emit_libcall_block (insns, tmp, tga_ret, tga_eqv); ! ! if (register_operand (op0, Pmode)) ! tga_ret = op0; ! else ! tga_ret = gen_reg_rtx (Pmode); ! if (TARGET_TLS64) ! { ! emit_insn (gen_load_dtprel (tga_ret, op1)); ! emit_insn (gen_adddi3 (tga_ret, tmp, tga_ret)); ! } ! else ! emit_insn (gen_add_dtprel (tga_ret, tmp, op1)); ! if (tga_ret == op0) ! return NULL_RTX; ! op1 = tga_ret; ! break; ! ! case TLS_MODEL_INITIAL_EXEC: ! tmp = gen_reg_rtx (Pmode); ! emit_insn (gen_load_ltoff_tprel (tmp, op1)); ! tmp = gen_rtx_MEM (Pmode, tmp); ! RTX_UNCHANGING_P (tmp) = 1; ! tmp = force_reg (Pmode, tmp); ! ! if (register_operand (op0, Pmode)) ! op1 = op0; ! else ! op1 = gen_reg_rtx (Pmode); ! emit_insn (gen_adddi3 (op1, tmp, gen_thread_pointer ())); ! if (op1 == op0) ! return NULL_RTX; ! break; ! ! case TLS_MODEL_LOCAL_EXEC: ! if (register_operand (op0, Pmode)) ! tmp = op0; ! else ! tmp = gen_reg_rtx (Pmode); ! if (TARGET_TLS64) ! { ! emit_insn (gen_load_tprel (tmp, op1)); ! emit_insn (gen_adddi3 (tmp, gen_thread_pointer (), tmp)); ! } ! else ! emit_insn (gen_add_tprel (tmp, gen_thread_pointer (), op1)); ! if (tmp == op0) ! return NULL_RTX; ! op1 = tmp; ! break; ! ! default: ! abort (); ! } ! } ! else if (!TARGET_NO_PIC && ! (symbolic_operand (op1, Pmode) || ! symbolic_operand (op1, ptr_mode))) ! { ! /* Before optimization starts, delay committing to any particular ! type of PIC address load. If this function gets deferred, we ! may acquire information that changes the value of the ! sdata_symbolic_operand predicate. ! ! But don't delay for function pointers. Loading a function address ! actually loads the address of the descriptor not the function. ! If we represent these as SYMBOL_REFs, then they get cse'd with ! calls, and we end up with calls to the descriptor address instead ! of calls to the function address. Functions are not candidates ! for sdata anyways. ! ! Don't delay for LABEL_REF because the splitter loses REG_LABEL ! notes. Don't delay for pool addresses on general principals; ! they'll never become non-local behind our back. */ ! ! if (rtx_equal_function_value_matters ! && GET_CODE (op1) != LABEL_REF ! && ! (GET_CODE (op1) == SYMBOL_REF ! && (SYMBOL_REF_FLAG (op1) ! || CONSTANT_POOL_ADDRESS_P (op1) ! || STRING_POOL_ADDRESS_P (op1)))) ! if (GET_MODE (op1) == DImode) ! emit_insn (gen_movdi_symbolic (op0, op1)); ! else ! emit_insn (gen_movsi_symbolic (op0, op1)); ! else ! ia64_expand_load_address (op0, op1, NULL_RTX); ! return NULL_RTX; ! } } ! return op1; } /* Split a post-reload TImode reference into two DImode components. */ *************** spill_tfmode_operand (in, force) *** 1089,1100 **** && GET_MODE (SUBREG_REG (in)) == TImode && GET_CODE (SUBREG_REG (in)) == REG) { ! rtx mem = gen_mem_addressof (SUBREG_REG (in), NULL_TREE); return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0))); } else if (force && GET_CODE (in) == REG) { ! rtx mem = gen_mem_addressof (in, NULL_TREE); return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0))); } else if (GET_CODE (in) == MEM --- 1383,1394 ---- && GET_MODE (SUBREG_REG (in)) == TImode && GET_CODE (SUBREG_REG (in)) == REG) { ! rtx mem = gen_mem_addressof (SUBREG_REG (in), NULL_TREE, true); return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0))); } else if (force && GET_CODE (in) == REG) { ! rtx mem = gen_mem_addressof (in, NULL_TREE, true); return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0))); } else if (GET_CODE (in) == MEM *************** ia64_expand_compare (code, mode) *** 1136,1207 **** } /* Emit the appropriate sequence for a call. */ - void ia64_expand_call (retval, addr, nextarg, sibcall_p) rtx retval; rtx addr; ! rtx nextarg; int sibcall_p; { ! rtx insn, b0, pfs, gp_save, narg_rtx, dest; ! bool indirect_p; ! int narg; addr = XEXP (addr, 0); b0 = gen_rtx_REG (DImode, R_BR (0)); - pfs = gen_rtx_REG (DImode, AR_PFS_REGNUM); - - if (! nextarg) - narg = 0; - else if (IN_REGNO_P (REGNO (nextarg))) - narg = REGNO (nextarg) - IN_REG (0); - else - narg = REGNO (nextarg) - OUT_REG (0); - narg_rtx = GEN_INT (narg); if (TARGET_NO_PIC || TARGET_AUTO_PIC) { if (sibcall_p) ! insn = gen_sibcall_nopic (addr, narg_rtx, b0, pfs); else if (! retval) ! insn = gen_call_nopic (addr, narg_rtx, b0); else ! insn = gen_call_value_nopic (retval, addr, narg_rtx, b0); ! emit_call_insn (insn); ! return; } ! indirect_p = ! symbolic_operand (addr, VOIDmode); ! if (sibcall_p || (TARGET_CONST_GP && !indirect_p)) ! gp_save = NULL_RTX; else ! gp_save = ia64_gp_save_reg (setjmp_operand (addr, VOIDmode)); ! if (gp_save) ! emit_move_insn (gp_save, pic_offset_table_rtx); ! /* If this is an indirect call, then we have the address of a descriptor. */ ! if (indirect_p) { ! dest = force_reg (DImode, gen_rtx_MEM (DImode, addr)); ! emit_move_insn (pic_offset_table_rtx, ! gen_rtx_MEM (DImode, plus_constant (addr, 8))); } - else - dest = addr; if (sibcall_p) ! insn = gen_sibcall_pic (dest, narg_rtx, b0, pfs); ! else if (! retval) ! insn = gen_call_pic (dest, narg_rtx, b0); else ! insn = gen_call_value_pic (retval, dest, narg_rtx, b0); emit_call_insn (insn); ! if (gp_save) ! emit_move_insn (pic_offset_table_rtx, gp_save); } /* Begin the assembly file. */ --- 1430,1580 ---- } /* Emit the appropriate sequence for a call. */ void ia64_expand_call (retval, addr, nextarg, sibcall_p) rtx retval; rtx addr; ! rtx nextarg ATTRIBUTE_UNUSED; int sibcall_p; { ! rtx insn, b0; addr = XEXP (addr, 0); b0 = gen_rtx_REG (DImode, R_BR (0)); + /* ??? Should do this for functions known to bind local too. */ if (TARGET_NO_PIC || TARGET_AUTO_PIC) { if (sibcall_p) ! insn = gen_sibcall_nogp (addr); else if (! retval) ! insn = gen_call_nogp (addr, b0); else ! insn = gen_call_value_nogp (retval, addr, b0); ! insn = emit_call_insn (insn); ! } ! else ! { ! if (sibcall_p) ! insn = gen_sibcall_gp (addr); ! else if (! retval) ! insn = gen_call_gp (addr, b0); ! else ! insn = gen_call_value_gp (retval, addr, b0); ! insn = emit_call_insn (insn); ! ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx); } ! if (sibcall_p) ! { ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), b0); ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), ! gen_rtx_REG (DImode, AR_PFS_REGNUM)); ! } ! } ! void ! ia64_reload_gp () ! { ! rtx tmp; ! if (current_frame_info.reg_save_gp) ! tmp = gen_rtx_REG (DImode, current_frame_info.reg_save_gp); else ! { ! HOST_WIDE_INT offset; ! offset = (current_frame_info.spill_cfa_off ! + current_frame_info.spill_size); ! if (frame_pointer_needed) ! { ! tmp = hard_frame_pointer_rtx; ! offset = -offset; ! } ! else ! { ! tmp = stack_pointer_rtx; ! offset = current_frame_info.total_size - offset; ! } ! if (CONST_OK_FOR_I (offset)) ! emit_insn (gen_adddi3 (pic_offset_table_rtx, ! tmp, GEN_INT (offset))); ! else ! { ! emit_move_insn (pic_offset_table_rtx, GEN_INT (offset)); ! emit_insn (gen_adddi3 (pic_offset_table_rtx, ! pic_offset_table_rtx, tmp)); ! } ! ! tmp = gen_rtx_MEM (DImode, pic_offset_table_rtx); ! } ! ! emit_move_insn (pic_offset_table_rtx, tmp); ! } ! ! void ! ia64_split_call (retval, addr, retaddr, scratch_r, scratch_b, ! noreturn_p, sibcall_p) ! rtx retval, addr, retaddr, scratch_r, scratch_b; ! int noreturn_p, sibcall_p; ! { ! rtx insn; ! bool is_desc = false; ! ! /* If we find we're calling through a register, then we're actually ! calling through a descriptor, so load up the values. */ ! if (REG_P (addr)) { ! rtx tmp; ! bool addr_dead_p; ! ! /* ??? We are currently constrained to *not* use peep2, because ! we can legitimiately change the global lifetime of the GP ! (in the form of killing where previously live). This is ! because a call through a descriptor doesn't use the previous ! value of the GP, while a direct call does, and we do not ! commit to either form until the split here. ! ! That said, this means that we lack precise life info for ! whether ADDR is dead after this call. This is not terribly ! important, since we can fix things up essentially for free ! with the POST_DEC below, but it's nice to not use it when we ! can immediately tell it's not necessary. */ ! addr_dead_p = ((noreturn_p || sibcall_p ! || TEST_HARD_REG_BIT (regs_invalidated_by_call, ! REGNO (addr))) ! && !FUNCTION_ARG_REGNO_P (REGNO (addr))); ! ! /* Load the code address into scratch_b. */ ! tmp = gen_rtx_POST_INC (Pmode, addr); ! tmp = gen_rtx_MEM (Pmode, tmp); ! emit_move_insn (scratch_r, tmp); ! emit_move_insn (scratch_b, scratch_r); ! ! /* Load the GP address. If ADDR is not dead here, then we must ! revert the change made above via the POST_INCREMENT. */ ! if (!addr_dead_p) ! tmp = gen_rtx_POST_DEC (Pmode, addr); ! else ! tmp = addr; ! tmp = gen_rtx_MEM (Pmode, tmp); ! emit_move_insn (pic_offset_table_rtx, tmp); ! ! is_desc = true; ! addr = scratch_b; } if (sibcall_p) ! insn = gen_sibcall_nogp (addr); ! else if (retval) ! insn = gen_call_value_nogp (retval, addr, retaddr); else ! insn = gen_call_nogp (addr, retaddr); emit_call_insn (insn); ! if ((!TARGET_CONST_GP || is_desc) && !noreturn_p && !sibcall_p) ! ia64_reload_gp (); } /* Begin the assembly file. */ *************** emit_safe_across_calls (f) *** 1240,1278 **** fputc ('\n', f); } - - /* Structure to be filled in by ia64_compute_frame_size with register - save masks and offsets for the current function. */ - - struct ia64_frame_info - { - HOST_WIDE_INT total_size; /* size of the stack frame, not including - the caller's scratch area. */ - HOST_WIDE_INT spill_cfa_off; /* top of the reg spill area from the cfa. */ - HOST_WIDE_INT spill_size; /* size of the gr/br/fr spill area. */ - HOST_WIDE_INT extra_spill_size; /* size of spill area for others. */ - HARD_REG_SET mask; /* mask of saved registers. */ - unsigned int gr_used_mask; /* mask of registers in use as gr spill - registers or long-term scratches. */ - int n_spilled; /* number of spilled registers. */ - int reg_fp; /* register for fp. */ - int reg_save_b0; /* save register for b0. */ - int reg_save_pr; /* save register for prs. */ - int reg_save_ar_pfs; /* save register for ar.pfs. */ - int reg_save_ar_unat; /* save register for ar.unat. */ - int reg_save_ar_lc; /* save register for ar.lc. */ - int n_input_regs; /* number of input registers used. */ - int n_local_regs; /* number of local registers used. */ - int n_output_regs; /* number of output registers used. */ - int n_rotate_regs; /* number of rotating registers used. */ - - char need_regstk; /* true if a .regstk directive needed. */ - char initialized; /* true if the data is finalized. */ - }; - - /* Current frame information calculated by ia64_compute_frame_size. */ - static struct ia64_frame_info current_frame_info; - /* Helper function for ia64_compute_frame_size: find an appropriate general register to spill some special register to. SPECIAL_SPILL_MASK contains bits in GR0 to GR31 that have already been allocated by this routine. --- 1613,1618 ---- *************** ia64_compute_frame_size (size) *** 1514,1519 **** --- 1854,1870 ---- extra_spill_size += 8; n_spilled += 1; } + + /* Similarly for gp. Note that if we're calling setjmp, the stacked + registers are clobbered, so we fall back to the stack. */ + current_frame_info.reg_save_gp + = (current_function_calls_setjmp ? 0 : find_gr_spill (1)); + if (current_frame_info.reg_save_gp == 0) + { + SET_HARD_REG_BIT (mask, GR_REG (1)); + spill_size += 8; + n_spilled += 1; + } } else { *************** ia64_compute_frame_size (size) *** 1523,1528 **** --- 1874,1890 ---- spill_size += 8; n_spilled += 1; } + + if (regs_ever_live[AR_PFS_REGNUM]) + { + SET_HARD_REG_BIT (mask, AR_PFS_REGNUM); + current_frame_info.reg_save_ar_pfs = find_gr_spill (1); + if (current_frame_info.reg_save_ar_pfs == 0) + { + extra_spill_size += 8; + n_spilled += 1; + } + } } /* Unwind descriptor hackery: things are most efficient if we allocate *************** ia64_compute_frame_size (size) *** 1561,1568 **** } /* If we're forced to use st8.spill, we're forced to save and restore ! ar.unat as well. */ ! if (spilled_gr_p || cfun->machine->n_varargs) { regs_ever_live[AR_UNAT_REGNUM] = 1; SET_HARD_REG_BIT (mask, AR_UNAT_REGNUM); --- 1923,1932 ---- } /* If we're forced to use st8.spill, we're forced to save and restore ! ar.unat as well. The check for existing liveness allows inline asm ! to touch ar.unat. */ ! if (spilled_gr_p || cfun->machine->n_varargs ! || regs_ever_live[AR_UNAT_REGNUM]) { regs_ever_live[AR_UNAT_REGNUM] = 1; SET_HARD_REG_BIT (mask, AR_UNAT_REGNUM); *************** spill_restore_mem (reg, cfa_off) *** 1796,1802 **** spill_fill_data.init_reg[iter], disp_rtx)); ! seq = gen_sequence (); end_sequence (); } --- 2160,2166 ---- spill_fill_data.init_reg[iter], disp_rtx)); ! seq = get_insns (); end_sequence (); } *************** ia64_expand_prologue () *** 2023,2029 **** /* We don't need an alloc instruction if we've used no outputs or locals. */ if (current_frame_info.n_local_regs == 0 && current_frame_info.n_output_regs == 0 ! && current_frame_info.n_input_regs <= current_function_args_info.int_regs) { /* If there is no alloc, but there are input registers used, then we need a .regstk directive. */ --- 2387,2394 ---- /* We don't need an alloc instruction if we've used no outputs or locals. */ if (current_frame_info.n_local_regs == 0 && current_frame_info.n_output_regs == 0 ! && current_frame_info.n_input_regs <= current_function_args_info.int_regs ! && !TEST_HARD_REG_BIT (current_frame_info.mask, AR_PFS_REGNUM)) { /* If there is no alloc, but there are input registers used, then we need a .regstk directive. */ *************** ia64_expand_prologue () *** 2185,2192 **** /* The alloc insn already copied ar.pfs into a general register. The only thing we have to do now is copy that register to a stack slot if we'd not allocated a local register for the job. */ ! if (current_frame_info.reg_save_ar_pfs == 0 ! && ! current_function_is_leaf) { reg = gen_rtx_REG (DImode, AR_PFS_REGNUM); do_spill (gen_movdi_x, ar_pfs_save_reg, cfa_off, reg); --- 2550,2557 ---- /* The alloc insn already copied ar.pfs into a general register. The only thing we have to do now is copy that register to a stack slot if we'd not allocated a local register for the job. */ ! if (TEST_HARD_REG_BIT (current_frame_info.mask, AR_PFS_REGNUM) ! && current_frame_info.reg_save_ar_pfs == 0) { reg = gen_rtx_REG (DImode, AR_PFS_REGNUM); do_spill (gen_movdi_x, ar_pfs_save_reg, cfa_off, reg); *************** ia64_expand_prologue () *** 2217,2222 **** --- 2582,2600 ---- } } + if (current_frame_info.reg_save_gp) + { + insn = emit_move_insn (gen_rtx_REG (DImode, + current_frame_info.reg_save_gp), + pic_offset_table_rtx); + /* We don't know for sure yet if this is actually needed, since + we've not split the PIC call patterns. If all of the calls + are indirect, and not followed by any uses of the gp, then + this save is dead. Allow it to go away. */ + REG_NOTES (insn) + = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, REG_NOTES (insn)); + } + /* We should now be at the base of the gr/br/fr spill area. */ if (cfa_off != (current_frame_info.spill_cfa_off + current_frame_info.spill_size)) *************** ia64_expand_epilogue (sibcall_p) *** 2398,2405 **** + current_frame_info.spill_size)) abort (); /* Restore all general registers. */ ! for (regno = GR_REG (1); regno <= GR_REG (31); ++regno) if (TEST_HARD_REG_BIT (current_frame_info.mask, regno)) { reg = gen_rtx_REG (DImode, regno); --- 2776,2788 ---- + current_frame_info.spill_size)) abort (); + /* The GP may be stored on the stack in the prologue, but it's + never restored in the epilogue. Skip the stack slot. */ + if (TEST_HARD_REG_BIT (current_frame_info.mask, GR_REG (1))) + cfa_off -= 8; + /* Restore all general registers. */ ! for (regno = GR_REG (2); regno <= GR_REG (31); ++regno) if (TEST_HARD_REG_BIT (current_frame_info.mask, regno)) { reg = gen_rtx_REG (DImode, regno); *************** ia64_hard_regno_rename_ok (from, to) *** 2587,2596 **** if (PR_REGNO_P (from) && PR_REGNO_P (to)) return (from & 1) == (to & 1); - /* Reg 4 contains the saved gp; we can't reliably rename this. */ - if (from == GR_REG (4) && current_function_calls_setjmp) - return 0; - return 1; } --- 2970,2975 ---- *************** ia64_assemble_integer (x, size, aligned_ *** 2603,2614 **** unsigned int size; int aligned_p; { ! if (size == UNITS_PER_WORD && aligned_p && !(TARGET_NO_PIC || TARGET_AUTO_PIC) && GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FLAG (x)) { ! fputs ("\tdata8\t@fptr(", asm_out_file); output_addr_const (asm_out_file, x); fputs (")\n", asm_out_file); return true; --- 2982,2997 ---- unsigned int size; int aligned_p; { ! if (size == (TARGET_ILP32 ? 4 : 8) ! && aligned_p && !(TARGET_NO_PIC || TARGET_AUTO_PIC) && GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FLAG (x)) { ! if (TARGET_ILP32) ! fputs ("\tdata4\t@fptr(", asm_out_file); ! else ! fputs ("\tdata8\t@fptr(", asm_out_file); output_addr_const (asm_out_file, x); fputs (")\n", asm_out_file); return true; *************** ia64_setup_incoming_varargs (cum, int_mo *** 2796,2804 **** int * pretend_size; int second_time ATTRIBUTE_UNUSED; { ! /* If this is a stdarg function, then skip the current argument. */ ! if (! current_function_varargs) ! ia64_function_arg_advance (&cum, int_mode, type, 1); if (cum.words < MAX_ARGUMENT_SLOTS) { --- 3179,3186 ---- int * pretend_size; int second_time ATTRIBUTE_UNUSED; { ! /* Skip the current argument. */ ! ia64_function_arg_advance (&cum, int_mode, type, 1); if (cum.words < MAX_ARGUMENT_SLOTS) { *************** hfa_element_mode (type, nested) *** 2840,2856 **** gcc's COMPLEX_TYPEs as HFAs. We need to exclude the integral complex types though. */ case COMPLEX_TYPE: ! if (GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_FLOAT) return mode_for_size (GET_MODE_UNIT_SIZE (TYPE_MODE (type)) * BITS_PER_UNIT, MODE_FLOAT, 0); else return VOIDmode; case REAL_TYPE: - /* ??? Should exclude 128-bit long double here. */ /* We want to return VOIDmode for raw REAL_TYPEs, but the actual mode if this is contained within an aggregate. */ ! if (nested) return TYPE_MODE (type); else return VOIDmode; --- 3222,3238 ---- gcc's COMPLEX_TYPEs as HFAs. We need to exclude the integral complex types though. */ case COMPLEX_TYPE: ! if (GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_FLOAT ! && (TYPE_MODE (type) != TCmode || INTEL_EXTENDED_IEEE_FORMAT)) return mode_for_size (GET_MODE_UNIT_SIZE (TYPE_MODE (type)) * BITS_PER_UNIT, MODE_FLOAT, 0); else return VOIDmode; case REAL_TYPE: /* We want to return VOIDmode for raw REAL_TYPEs, but the actual mode if this is contained within an aggregate. */ ! if (nested && (TYPE_MODE (type) != TFmode || INTEL_EXTENDED_IEEE_FORMAT)) return TYPE_MODE (type); else return VOIDmode; *************** ia64_function_arg (cum, mode, type, name *** 3024,3030 **** happen when we have a SFmode HFA. */ else if (((mode == TFmode) && ! INTEL_EXTENDED_IEEE_FORMAT) || (! FLOAT_MODE_P (mode) || cum->fp_regs == MAX_ARGUMENT_SLOTS)) ! return gen_rtx_REG (mode, basereg + cum->words + offset); /* If there is a prototype, then FP values go in a FR register when named, and in a GR registeer when unnamed. */ --- 3406,3430 ---- happen when we have a SFmode HFA. */ else if (((mode == TFmode) && ! INTEL_EXTENDED_IEEE_FORMAT) || (! FLOAT_MODE_P (mode) || cum->fp_regs == MAX_ARGUMENT_SLOTS)) ! { ! int byte_size = ((mode == BLKmode) ! ? int_size_in_bytes (type) : GET_MODE_SIZE (mode)); ! if (BYTES_BIG_ENDIAN ! && (mode == BLKmode || (type && AGGREGATE_TYPE_P (type))) ! && byte_size < UNITS_PER_WORD ! && byte_size > 0) ! { ! rtx gr_reg = gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (DImode, ! (basereg + cum->words ! + offset)), ! const0_rtx); ! return gen_rtx_PARALLEL (mode, gen_rtvec (1, gr_reg)); ! } ! else ! return gen_rtx_REG (mode, basereg + cum->words + offset); ! ! } /* If there is a prototype, then FP values go in a FR register when named, and in a GR registeer when unnamed. */ *************** ia64_function_arg_pass_by_reference (cum *** 3199,3225 **** return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST; } - /* Implement va_start. */ - - void - ia64_va_start (stdarg_p, valist, nextarg) - int stdarg_p; - tree valist; - rtx nextarg; - { - int arg_words; - int ofs; - - arg_words = current_function_args_info.words; - - if (stdarg_p) - ofs = 0; - else - ofs = (arg_words >= MAX_ARGUMENT_SLOTS ? -UNITS_PER_WORD : 0); - - nextarg = plus_constant (nextarg, ofs); - std_expand_builtin_va_start (1, valist, nextarg); - } /* Implement va_arg. */ --- 3599,3604 ---- *************** ia64_function_value (valtype, func) *** 3332,3338 **** ((mode != TFmode) || INTEL_EXTENDED_IEEE_FORMAT)) return gen_rtx_REG (mode, FR_ARG_FIRST); else ! return gen_rtx_REG (mode, GR_RET_FIRST); } /* Print a memory address as an operand to reference that memory location. */ --- 3711,3740 ---- ((mode != TFmode) || INTEL_EXTENDED_IEEE_FORMAT)) return gen_rtx_REG (mode, FR_ARG_FIRST); else ! { ! if (BYTES_BIG_ENDIAN ! && (mode == BLKmode || (valtype && AGGREGATE_TYPE_P (valtype)))) ! { ! rtx loc[8]; ! int offset; ! int bytesize; ! int i; ! ! offset = 0; ! bytesize = int_size_in_bytes (valtype); ! for (i = 0; offset < bytesize; i++) ! { ! loc[i] = gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (DImode, ! GR_RET_FIRST + i), ! GEN_INT (offset)); ! offset += UNITS_PER_WORD; ! } ! return gen_rtx_PARALLEL (mode, gen_rtvec_v (i, loc)); ! } ! else ! return gen_rtx_REG (mode, GR_RET_FIRST); ! } } /* Print a memory address as an operand to reference that memory location. */ *************** ia64_secondary_reload_class (class, mode *** 3777,3783 **** return NO_REGS; } - /* Emit text to declare externally defined variables and functions, because the Intel assembler does not support undefined externals. */ --- 4179,4184 ---- *************** ia64_asm_output_external (file, decl, na *** 3790,3797 **** { int save_referenced; ! /* GNU as does not need anything here. */ ! if (TARGET_GNU_AS) return; /* ??? The Intel assembler creates a reference that needs to be satisfied by --- 4191,4203 ---- { int save_referenced; ! /* GNU as does not need anything here, but the HP linker does need ! something for external functions. */ ! ! if (TARGET_GNU_AS ! && (!TARGET_HPUX_LD ! || TREE_CODE (decl) != FUNCTION_DECL ! || strstr(name, "__builtin_") == name)) return; /* ??? The Intel assembler creates a reference that needs to be satisfied by *************** ia64_asm_output_external (file, decl, na *** 3806,3824 **** || ! strcmp (name, "__builtin_args_info")) return; ! /* assemble_name will set TREE_SYMBOL_REFERENCED, so we must save and ! restore it. */ ! save_referenced = TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)); ! if (TREE_CODE (decl) == FUNCTION_DECL) { ! fprintf (file, "%s", TYPE_ASM_OP); ! assemble_name (file, name); ! putc (',', file); ! fprintf (file, TYPE_OPERAND_FMT, "function"); ! putc ('\n', file); } - ASM_GLOBALIZE_LABEL (file, name); - TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) = save_referenced; } /* Parse the -mfixed-range= option string. */ --- 4212,4229 ---- || ! strcmp (name, "__builtin_args_info")) return; ! if (TARGET_HPUX_LD) ! ia64_hpux_add_extern_decl (name); ! else { ! /* assemble_name will set TREE_SYMBOL_REFERENCED, so we must save and ! restore it. */ ! save_referenced = TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)); ! if (TREE_CODE (decl) == FUNCTION_DECL) ! ASM_OUTPUT_TYPE_DIRECTIVE (file, name, "function"); ! (*targetm.asm_out.globalize_label) (file, name); ! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) = save_referenced; } } /* Parse the -mfixed-range= option string. */ *************** fix_range (const_str) *** 3887,3930 **** } } ! /* Called to register all of our global variables with the garbage ! collector. */ ! ! static void ! ia64_add_gc_roots () ! { ! ggc_add_rtx_root (&ia64_compare_op0, 1); ! ggc_add_rtx_root (&ia64_compare_op1, 1); ! } ! ! static void ! ia64_init_machine_status (p) ! struct function *p; ! { ! p->machine = ! (struct machine_function *) xcalloc (1, sizeof (struct machine_function)); ! } ! ! static void ! ia64_mark_machine_status (p) ! struct function *p; ! { ! struct machine_function *machine = p->machine; ! ! if (machine) ! { ! ggc_mark_rtx (machine->ia64_eh_epilogue_sp); ! ggc_mark_rtx (machine->ia64_eh_epilogue_bsp); ! ggc_mark_rtx (machine->ia64_gp_save); ! } ! } ! ! static void ! ia64_free_machine_status (p) ! struct function *p; { ! free (p->machine); ! p->machine = NULL; } /* Handle TARGET_OPTIONS switches. */ --- 4292,4301 ---- } } ! static struct machine_function * ! ia64_init_machine_status () { ! return ggc_alloc_cleared (sizeof (struct machine_function)); } /* Handle TARGET_OPTIONS switches. */ *************** ia64_override_options () *** 3935,3959 **** if (TARGET_AUTO_PIC) target_flags |= MASK_CONST_GP; ! if (TARGET_INLINE_DIV_LAT && TARGET_INLINE_DIV_THR) { ! warning ("cannot optimize division for both latency and throughput"); ! target_flags &= ~MASK_INLINE_DIV_THR; } if (ia64_fixed_range_string) fix_range (ia64_fixed_range_string); ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload; flag_schedule_insns_after_reload = 0; ia64_section_threshold = g_switch_set ? g_switch_value : IA64_DEFAULT_GVALUE; init_machine_status = ia64_init_machine_status; - mark_machine_status = ia64_mark_machine_status; - free_machine_status = ia64_free_machine_status; ! ia64_add_gc_roots (); } static enum attr_itanium_requires_unit0 ia64_safe_itanium_requires_unit0 PARAMS((rtx)); --- 4306,4346 ---- if (TARGET_AUTO_PIC) target_flags |= MASK_CONST_GP; ! if (TARGET_INLINE_FLOAT_DIV_LAT && TARGET_INLINE_FLOAT_DIV_THR) { ! warning ("cannot optimize floating point division for both latency and throughput"); ! target_flags &= ~MASK_INLINE_FLOAT_DIV_THR; ! } ! ! if (TARGET_INLINE_INT_DIV_LAT && TARGET_INLINE_INT_DIV_THR) ! { ! warning ("cannot optimize integer division for both latency and throughput"); ! target_flags &= ~MASK_INLINE_INT_DIV_THR; } if (ia64_fixed_range_string) fix_range (ia64_fixed_range_string); + if (ia64_tls_size_string) + { + char *end; + unsigned long tmp = strtoul (ia64_tls_size_string, &end, 10); + if (*end || (tmp != 14 && tmp != 22 && tmp != 64)) + error ("bad value (%s) for -mtls-size= switch", ia64_tls_size_string); + else + ia64_tls_size = tmp; + } + ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload; flag_schedule_insns_after_reload = 0; ia64_section_threshold = g_switch_set ? g_switch_value : IA64_DEFAULT_GVALUE; init_machine_status = ia64_init_machine_status; ! /* Tell the compiler which flavor of TFmode we're using. */ ! if (INTEL_EXTENDED_IEEE_FORMAT) ! real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format; } static enum attr_itanium_requires_unit0 ia64_safe_itanium_requires_unit0 PARAMS((rtx)); *************** rtx_needs_barrier (x, flags, pred) *** 4564,4571 **** case UNSPEC: switch (XINT (x, 1)) { ! case 1: /* st8.spill */ ! case 2: /* ld8.fill */ { HOST_WIDE_INT offset = INTVAL (XVECEXP (x, 0, 1)); HOST_WIDE_INT bit = (offset >> 3) & 63; --- 4951,4972 ---- case UNSPEC: switch (XINT (x, 1)) { ! case UNSPEC_LTOFF_DTPMOD: ! case UNSPEC_LTOFF_DTPREL: ! case UNSPEC_DTPREL: ! case UNSPEC_LTOFF_TPREL: ! case UNSPEC_TPREL: ! case UNSPEC_PRED_REL_MUTEX: ! case UNSPEC_PIC_CALL: ! case UNSPEC_MF: ! case UNSPEC_FETCHADD_ACQ: ! case UNSPEC_BSP_VALUE: ! case UNSPEC_FLUSHRS: ! case UNSPEC_BUNDLE_SELECTOR: ! break; ! ! case UNSPEC_GR_SPILL: ! case UNSPEC_GR_RESTORE: { HOST_WIDE_INT offset = INTVAL (XVECEXP (x, 0, 1)); HOST_WIDE_INT bit = (offset >> 3) & 63; *************** rtx_needs_barrier (x, flags, pred) *** 4577,4608 **** break; } ! case 3: /* stf.spill */ ! case 4: /* ldf.spill */ ! case 8: /* popcnt */ need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 0), flags, pred); break; ! case 7: /* pred_rel_mutex */ ! case 9: /* pic call */ ! case 12: /* mf */ ! case 19: /* fetchadd_acq */ ! case 20: /* mov = ar.bsp */ ! case 21: /* flushrs */ ! case 22: /* bundle selector */ ! case 23: /* cycle display */ ! break; ! ! case 24: /* addp4 */ need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 0), flags, pred); break; ! case 5: /* recip_approx */ need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 0), flags, pred); need_barrier |= rtx_needs_barrier (XVECEXP (x, 0, 1), flags, pred); break; ! case 13: /* cmpxchg_acq */ need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 1), flags, pred); need_barrier |= rtx_needs_barrier (XVECEXP (x, 0, 2), flags, pred); break; --- 4978,4999 ---- break; } ! case UNSPEC_FR_SPILL: ! case UNSPEC_FR_RESTORE: ! case UNSPEC_POPCNT: need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 0), flags, pred); break; ! case UNSPEC_ADDP4: need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 0), flags, pred); break; ! case UNSPEC_FR_RECIP_APPROX: need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 0), flags, pred); need_barrier |= rtx_needs_barrier (XVECEXP (x, 0, 1), flags, pred); break; ! case UNSPEC_CMPXCHG_ACQ: need_barrier = rtx_needs_barrier (XVECEXP (x, 0, 1), flags, pred); need_barrier |= rtx_needs_barrier (XVECEXP (x, 0, 2), flags, pred); break; *************** rtx_needs_barrier (x, flags, pred) *** 4615,4621 **** case UNSPEC_VOLATILE: switch (XINT (x, 1)) { ! case 0: /* alloc */ /* Alloc must always be the first instruction of a group. We force this by always returning true. */ /* ??? We might get better scheduling if we explicitly check for --- 5006,5012 ---- case UNSPEC_VOLATILE: switch (XINT (x, 1)) { ! case UNSPECV_ALLOC: /* Alloc must always be the first instruction of a group. We force this by always returning true. */ /* ??? We might get better scheduling if we explicitly check for *************** rtx_needs_barrier (x, flags, pred) *** 4629,4645 **** rws_access_regno (REG_AR_CFM, new_flags, pred); return 1; ! case 1: /* blockage */ ! case 2: /* insn group barrier */ ! return 0; ! ! case 5: /* set_bsp */ need_barrier = 1; break; ! case 7: /* pred.rel.mutex */ ! case 8: /* safe_across_calls all */ ! case 9: /* safe_across_calls normal */ return 0; default: --- 5020,5034 ---- rws_access_regno (REG_AR_CFM, new_flags, pred); return 1; ! case UNSPECV_SET_BSP: need_barrier = 1; break; ! case UNSPECV_BLOCKAGE: ! case UNSPECV_INSN_GROUP_BARRIER: ! case UNSPECV_BREAK: ! case UNSPECV_PSAC_ALL: ! case UNSPECV_PSAC_NORMAL: return 0; default: *************** emit_insn_group_barriers (dump, insns) *** 4866,4872 **** } else if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE ! && XINT (PATTERN (insn), 1) == 2) { init_insn_group_barriers (); last_label = 0; --- 5255,5261 ---- } else if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE ! && XINT (PATTERN (insn), 1) == UNSPECV_INSN_GROUP_BARRIER) { init_insn_group_barriers (); last_label = 0; *************** ia64_adjust_cost (insn, link, dep_insn, *** 5328,5334 **** addr = XVECEXP (addr, 0, 0); while (GET_CODE (addr) == SUBREG || GET_CODE (addr) == ZERO_EXTEND) addr = XEXP (addr, 0); ! if (GET_CODE (addr) == MEM) addr = XEXP (addr, 0); else addr = 0; --- 5717,5725 ---- addr = XVECEXP (addr, 0, 0); while (GET_CODE (addr) == SUBREG || GET_CODE (addr) == ZERO_EXTEND) addr = XEXP (addr, 0); ! ! /* Note that LO_SUM is used for GOT loads. */ ! if (GET_CODE (addr) == MEM || GET_CODE (addr) == LO_SUM) addr = XEXP (addr, 0); else addr = 0; *************** insn_matches_slot (p, itype, slot, insn) *** 5470,5487 **** return 0; } ! /* Like emit_insn_before, but skip cycle_display insns. This makes the ! assembly output a bit prettier. */ static void ia64_emit_insn_before (insn, before) rtx insn, before; { - rtx prev = PREV_INSN (before); - if (prev && GET_CODE (prev) == INSN - && GET_CODE (PATTERN (prev)) == UNSPEC - && XINT (PATTERN (prev), 1) == 23) - before = prev; emit_insn_before (insn, before); } --- 5861,5873 ---- return 0; } ! /* Like emit_insn_before, but skip cycle_display notes. ! ??? When cycle display notes are implemented, update this. */ static void ia64_emit_insn_before (insn, before) rtx insn, before; { emit_insn_before (insn, before); } *************** ia64_sched_reorder2 (dump, sched_verbose *** 6376,6384 **** abort (); insn_code = recog_memoized (stop); ! /* Ignore cycle displays and .pred.rel.mutex. */ ! if (insn_code == CODE_FOR_cycle_display ! || insn_code == CODE_FOR_pred_rel_mutex || insn_code == CODE_FOR_prologue_use) continue; --- 6762,6772 ---- abort (); insn_code = recog_memoized (stop); ! /* Ignore .pred.rel.mutex. ! ! ??? Update this to ignore cycle display notes too ! ??? once those are implemented */ ! if (insn_code == CODE_FOR_pred_rel_mutex || insn_code == CODE_FOR_prologue_use) continue; *************** ia64_sched_finish (dump, sched_verbose) *** 6532,6548 **** free (sched_types); free (sched_ready); } - - static rtx - ia64_cycle_display (clock, last) - int clock; - rtx last; - { - if (ia64_final_schedule) - return emit_insn_after (gen_cycle_display (GEN_INT (clock)), last); - else - return last; - } /* Emit pseudo-ops for the assembler to describe predicate relations. At present this assumes that we only consider predicate pairs to --- 6920,6925 ---- *************** ia64_cycle_display (clock, last) *** 6552,6562 **** static void emit_predicate_relation_info () { ! int i; ! for (i = n_basic_blocks - 1; i >= 0; --i) { - basic_block bb = BASIC_BLOCK (i); int r; rtx head = bb->head; --- 6929,6938 ---- static void emit_predicate_relation_info () { ! basic_block bb; ! FOR_EACH_BB_REVERSE (bb) { int r; rtx head = bb->head; *************** emit_predicate_relation_info () *** 6582,6590 **** relations around them. Otherwise the assembler will assume the call returns, and complain about uses of call-clobbered predicates after the call. */ ! for (i = n_basic_blocks - 1; i >= 0; --i) { - basic_block bb = BASIC_BLOCK (i); rtx insn = bb->head; while (1) --- 6958,6965 ---- relations around them. Otherwise the assembler will assume the call returns, and complain about uses of call-clobbered predicates after the call. */ ! FOR_EACH_BB_REVERSE (bb) { rtx insn = bb->head; while (1) *************** ia64_emit_nops () *** 6649,6655 **** pat = INSN_P (insn) ? PATTERN (insn) : const0_rtx; if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER) continue; ! if ((GET_CODE (pat) == UNSPEC && XINT (pat, 1) == 22) || GET_CODE (insn) == CODE_LABEL) { if (b) --- 7024,7030 ---- pat = INSN_P (insn) ? PATTERN (insn) : const0_rtx; if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER) continue; ! if ((GET_CODE (pat) == UNSPEC && XINT (pat, 1) == UNSPEC_BUNDLE_SELECTOR) || GET_CODE (insn) == CODE_LABEL) { if (b) *************** ia64_emit_nops () *** 6665,6671 **** bundle_pos = 0; continue; } ! else if (GET_CODE (pat) == UNSPEC_VOLATILE && XINT (pat, 1) == 2) { int t = INTVAL (XVECEXP (pat, 0, 0)); if (b) --- 7040,7047 ---- bundle_pos = 0; continue; } ! else if (GET_CODE (pat) == UNSPEC_VOLATILE ! && XINT (pat, 1) == UNSPECV_INSN_GROUP_BARRIER) { int t = INTVAL (XVECEXP (pat, 0, 0)); if (b) *************** void *** 6718,6731 **** ia64_reorg (insns) rtx insns; { /* If optimizing, we'll have split before scheduling. */ if (optimize == 0) ! split_all_insns_noflow (); ! /* Make sure the CFG and global_live_at_start are correct ! for emit_predicate_relation_info. */ ! find_basic_blocks (insns, max_reg_num (), NULL); ! life_analysis (insns, NULL, PROP_DEATH_NOTES); if (ia64_flag_schedule_insns2) { --- 7094,7110 ---- ia64_reorg (insns) rtx insns; { + /* We are freeing block_for_insn in the toplev to keep compatibility + with old MDEP_REORGS that are not CFG based. Recompute it now. */ + compute_bb_for_insn (); + /* If optimizing, we'll have split before scheduling. */ if (optimize == 0) ! split_all_insns (0); ! /* ??? update_life_info_in_dirty_blocks fails to terminate during ! non-optimizing bootstrap. */ ! update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES, PROP_DEATH_NOTES); if (ia64_flag_schedule_insns2) { *************** ia64_reorg (insns) *** 6756,6762 **** insn = prev_active_insn (insn); if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE ! && XINT (PATTERN (insn), 1) == 2) { saw_stop = 1; insn = prev_active_insn (insn); --- 7135,7141 ---- insn = prev_active_insn (insn); if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE ! && XINT (PATTERN (insn), 1) == UNSPECV_INSN_GROUP_BARRIER) { saw_stop = 1; insn = prev_active_insn (insn); *************** ia64_eh_uses (regno) *** 6861,6877 **** code faster because there is one less load. This also includes incomplete types which can't go in sdata/sbss. */ ! /* ??? See select_section. We must put short own readonly variables in ! sdata/sbss instead of the more natural rodata, because we can't perform ! the DECL_READONLY_SECTION test here. */ ! extern struct obstack * saveable_obstack; ! void ! ia64_encode_section_info (decl) tree decl; { const char *symbol_str; if (TREE_CODE (decl) == FUNCTION_DECL) { --- 7240,7281 ---- code faster because there is one less load. This also includes incomplete types which can't go in sdata/sbss. */ ! static bool ! ia64_in_small_data_p (exp) ! tree exp; ! { ! if (TARGET_NO_SDATA) ! return false; ! if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp)) ! { ! const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); ! if (strcmp (section, ".sdata") == 0 ! || strcmp (section, ".sbss") == 0) ! return true; ! } ! else ! { ! HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); ! /* If this is an incomplete type with size 0, then we can't put it ! in sdata because it might be too big when completed. */ ! if (size > 0 && size <= ia64_section_threshold) ! return true; ! } ! ! return false; ! } ! ! static void ! ia64_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { const char *symbol_str; + bool is_local; + rtx symbol; + char encoding = 0; if (TREE_CODE (decl) == FUNCTION_DECL) { *************** ia64_encode_section_info (decl) *** 6884,6966 **** || GET_CODE (DECL_RTL (decl)) != MEM || GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF) return; - - symbol_str = XSTR (XEXP (DECL_RTL (decl), 0), 0); ! /* We assume that -fpic is used only to create a shared library (dso). ! With -fpic, no global data can ever be sdata. ! Without -fpic, global common uninitialized data can never be sdata, since ! it can unify with a real definition in a dso. */ ! /* ??? Actually, we can put globals in sdata, as long as we don't use gprel ! to access them. The linker may then be able to do linker relaxation to ! optimize references to them. Currently sdata implies use of gprel. */ ! /* We need the DECL_EXTERNAL check for C++. static class data members get ! both TREE_STATIC and DECL_EXTERNAL set, to indicate that they are ! statically allocated, but the space is allocated somewhere else. Such ! decls can not be own data. */ ! if (! TARGET_NO_SDATA ! && TREE_STATIC (decl) && ! DECL_EXTERNAL (decl) ! && ! (DECL_ONE_ONLY (decl) || DECL_WEAK (decl)) ! && ! (TREE_PUBLIC (decl) ! && (flag_pic ! || (DECL_COMMON (decl) ! && (DECL_INITIAL (decl) == 0 ! || DECL_INITIAL (decl) == error_mark_node)))) ! /* Either the variable must be declared without a section attribute, ! or the section must be sdata or sbss. */ ! && (DECL_SECTION_NAME (decl) == 0 ! || ! strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), ! ".sdata") ! || ! strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), ! ".sbss"))) ! { ! HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl)); ! /* If the variable has already been defined in the output file, then it ! is too late to put it in sdata if it wasn't put there in the first ! place. The test is here rather than above, because if it is already ! in sdata, then it can stay there. */ ! if (TREE_ASM_WRITTEN (decl)) ! ; ! /* If this is an incomplete type with size 0, then we can't put it in ! sdata because it might be too big when completed. */ ! else if (size > 0 ! && size <= (HOST_WIDE_INT) ia64_section_threshold ! && symbol_str[0] != SDATA_NAME_FLAG_CHAR) ! { ! size_t len = strlen (symbol_str); ! char *newstr = alloca (len + 1); ! const char *string; ! *newstr = SDATA_NAME_FLAG_CHAR; ! memcpy (newstr + 1, symbol_str, len + 1); ! ! string = ggc_alloc_string (newstr, len + 1); ! XSTR (XEXP (DECL_RTL (decl), 0), 0) = string; } } ! /* This decl is marked as being in small data/bss but it shouldn't ! be; one likely explanation for this is that the decl has been ! moved into a different section from the one it was in when ! ENCODE_SECTION_INFO was first called. Remove the '@'. */ ! else if (symbol_str[0] == SDATA_NAME_FLAG_CHAR) ! { ! XSTR (XEXP (DECL_RTL (decl), 0), 0) ! = ggc_strdup (symbol_str + 1); ! } } /* Output assembly directives for prologue regions. */ /* The current basic block number. */ ! static int block_num; /* True if we need a copy_state command at the start of the next block. */ ! static int need_copy_state; /* The function emits unwind directives for the start of an epilogue. */ --- 7288,7373 ---- || GET_CODE (DECL_RTL (decl)) != MEM || GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF) return; ! symbol = XEXP (DECL_RTL (decl), 0); ! symbol_str = XSTR (symbol, 0); ! is_local = (*targetm.binds_local_p) (decl); ! if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl)) ! encoding = " GLil"[decl_tls_model (decl)]; ! /* Determine if DECL will wind up in .sdata/.sbss. */ ! else if (is_local && ia64_in_small_data_p (decl)) ! encoding = 's'; ! /* Finally, encode this into the symbol string. */ ! if (encoding) ! { ! char *newstr; ! size_t len; ! if (symbol_str[0] == ENCODE_SECTION_INFO_CHAR) ! { ! if (encoding == symbol_str[1]) ! return; ! /* ??? Sdata became thread or thread becaome not thread. Lose. */ ! abort (); } + + len = strlen (symbol_str); + newstr = alloca (len + 3); + newstr[0] = ENCODE_SECTION_INFO_CHAR; + newstr[1] = encoding; + memcpy (newstr + 2, symbol_str, len + 1); + + XSTR (symbol, 0) = ggc_alloc_string (newstr, len + 2); } ! ! /* This decl is marked as being in small data/bss but it shouldn't be; ! one likely explanation for this is that the decl has been moved into ! a different section from the one it was in when encode_section_info ! was first called. Remove the encoding. */ ! else if (symbol_str[0] == ENCODE_SECTION_INFO_CHAR) ! XSTR (symbol, 0) = ggc_strdup (symbol_str + 2); ! } ! ! static const char * ! ia64_strip_name_encoding (str) ! const char *str; ! { ! if (str[0] == ENCODE_SECTION_INFO_CHAR) ! str += 2; ! if (str[0] == '*') ! str++; ! return str; ! } ! ! /* True if it is OK to do sibling call optimization for the specified ! call expression EXP. DECL will be the called function, or NULL if ! this is an indirect call. */ ! bool ! ia64_function_ok_for_sibcall (decl) ! tree decl; ! { ! /* Direct calls are always ok. */ ! if (decl) ! return true; ! ! /* If TARGET_CONST_GP is in effect, then our caller expects us to ! return with our current GP. This means that we'll always have ! a GP reload after an indirect call. */ ! return !ia64_epilogue_uses (R_GR (1)); } /* Output assembly directives for prologue regions. */ /* The current basic block number. */ ! static bool last_block; /* True if we need a copy_state command at the start of the next block. */ ! static bool need_copy_state; /* The function emits unwind directives for the start of an epilogue. */ *************** process_epilogue () *** 6970,6979 **** /* If this isn't the last block of the function, then we need to label the current state, and copy it back in at the start of the next block. */ ! if (block_num != n_basic_blocks - 1) { fprintf (asm_out_file, "\t.label_state 1\n"); ! need_copy_state = 1; } fprintf (asm_out_file, "\t.restore sp\n"); --- 7377,7386 ---- /* If this isn't the last block of the function, then we need to label the current state, and copy it back in at the start of the next block. */ ! if (!last_block) { fprintf (asm_out_file, "\t.label_state 1\n"); ! need_copy_state = true; } fprintf (asm_out_file, "\t.restore sp\n"); *************** process_set (asm_out_file, pat) *** 6993,6999 **** /* Look for the ALLOC insn. */ if (GET_CODE (src) == UNSPEC_VOLATILE ! && XINT (src, 1) == 0 && GET_CODE (dest) == REG) { dest_regno = REGNO (dest); --- 7400,7406 ---- /* Look for the ALLOC insn. */ if (GET_CODE (src) == UNSPEC_VOLATILE ! && XINT (src, 1) == UNSPECV_ALLOC && GET_CODE (dest) == REG) { dest_regno = REGNO (dest); *************** process_for_unwind_directive (asm_out_fi *** 7211,7228 **** if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK) { ! block_num = NOTE_BASIC_BLOCK (insn)->index; /* Restore unwind state from immediately before the epilogue. */ if (need_copy_state) { fprintf (asm_out_file, "\t.body\n"); fprintf (asm_out_file, "\t.copy_state 1\n"); ! need_copy_state = 0; } } ! if (! RTX_FRAME_RELATED_P (insn)) return; pat = find_reg_note (insn, REG_FRAME_RELATED_EXPR, NULL_RTX); --- 7618,7635 ---- if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK) { ! last_block = NOTE_BASIC_BLOCK (insn)->next_bb == EXIT_BLOCK_PTR; /* Restore unwind state from immediately before the epilogue. */ if (need_copy_state) { fprintf (asm_out_file, "\t.body\n"); fprintf (asm_out_file, "\t.copy_state 1\n"); ! need_copy_state = false; } } ! if (GET_CODE (insn) == NOTE || ! RTX_FRAME_RELATED_P (insn)) return; pat = find_reg_note (insn, REG_FRAME_RELATED_EXPR, NULL_RTX); *************** ia64_init_builtins () *** 7262,7316 **** { tree psi_type_node = build_pointer_type (integer_type_node); tree pdi_type_node = build_pointer_type (long_integer_type_node); - tree endlink = void_list_node; /* __sync_val_compare_and_swap_si, __sync_bool_compare_and_swap_si */ tree si_ftype_psi_si_si ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, psi_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, ! integer_type_node, ! endlink)))); /* __sync_val_compare_and_swap_di, __sync_bool_compare_and_swap_di */ tree di_ftype_pdi_di_di ! = build_function_type (long_integer_type_node, ! tree_cons (NULL_TREE, pdi_type_node, ! tree_cons (NULL_TREE, ! long_integer_type_node, ! tree_cons (NULL_TREE, ! long_integer_type_node, ! endlink)))); /* __sync_synchronize */ tree void_ftype_void ! = build_function_type (void_type_node, endlink); /* __sync_lock_test_and_set_si */ tree si_ftype_psi_si ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, psi_type_node, ! tree_cons (NULL_TREE, integer_type_node, endlink))); /* __sync_lock_test_and_set_di */ tree di_ftype_pdi_di ! = build_function_type (long_integer_type_node, ! tree_cons (NULL_TREE, pdi_type_node, ! tree_cons (NULL_TREE, long_integer_type_node, ! endlink))); /* __sync_lock_release_si */ tree void_ftype_psi ! = build_function_type (void_type_node, tree_cons (NULL_TREE, psi_type_node, ! endlink)); /* __sync_lock_release_di */ tree void_ftype_pdi ! = build_function_type (void_type_node, tree_cons (NULL_TREE, pdi_type_node, ! endlink)); #define def_builtin(name, type, code) \ ! builtin_function ((name), (type), (code), BUILT_IN_MD, NULL) def_builtin ("__sync_val_compare_and_swap_si", si_ftype_psi_si_si, IA64_BUILTIN_VAL_COMPARE_AND_SWAP_SI); --- 7669,7711 ---- { tree psi_type_node = build_pointer_type (integer_type_node); tree pdi_type_node = build_pointer_type (long_integer_type_node); /* __sync_val_compare_and_swap_si, __sync_bool_compare_and_swap_si */ tree si_ftype_psi_si_si ! = build_function_type_list (integer_type_node, ! psi_type_node, integer_type_node, ! integer_type_node, NULL_TREE); /* __sync_val_compare_and_swap_di, __sync_bool_compare_and_swap_di */ tree di_ftype_pdi_di_di ! = build_function_type_list (long_integer_type_node, ! pdi_type_node, long_integer_type_node, ! long_integer_type_node, NULL_TREE); /* __sync_synchronize */ tree void_ftype_void ! = build_function_type (void_type_node, void_list_node); /* __sync_lock_test_and_set_si */ tree si_ftype_psi_si ! = build_function_type_list (integer_type_node, ! psi_type_node, integer_type_node, NULL_TREE); /* __sync_lock_test_and_set_di */ tree di_ftype_pdi_di ! = build_function_type_list (long_integer_type_node, ! pdi_type_node, long_integer_type_node, ! NULL_TREE); /* __sync_lock_release_si */ tree void_ftype_psi ! = build_function_type_list (void_type_node, psi_type_node, NULL_TREE); /* __sync_lock_release_di */ tree void_ftype_pdi ! = build_function_type_list (void_type_node, pdi_type_node, NULL_TREE); #define def_builtin(name, type, code) \ ! builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL_TREE) def_builtin ("__sync_val_compare_and_swap_si", si_ftype_psi_si_si, IA64_BUILTIN_VAL_COMPARE_AND_SWAP_SI); *************** ia64_init_builtins () *** 7334,7344 **** IA64_BUILTIN_LOCK_RELEASE_DI); def_builtin ("__builtin_ia64_bsp", ! build_function_type (ptr_type_node, endlink), IA64_BUILTIN_BSP); def_builtin ("__builtin_ia64_flushrs", ! build_function_type (void_type_node, endlink), IA64_BUILTIN_FLUSHRS); def_builtin ("__sync_fetch_and_add_si", si_ftype_psi_si, --- 7729,7739 ---- IA64_BUILTIN_LOCK_RELEASE_DI); def_builtin ("__builtin_ia64_bsp", ! build_function_type (ptr_type_node, void_list_node), IA64_BUILTIN_BSP); def_builtin ("__builtin_ia64_flushrs", ! build_function_type (void_type_node, void_list_node), IA64_BUILTIN_FLUSHRS); def_builtin ("__sync_fetch_and_add_si", si_ftype_psi_si, *************** ia64_expand_fetch_and_op (binoptab, mode *** 7421,7426 **** --- 7816,7825 ---- arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); mem = expand_expr (arg0, NULL_RTX, Pmode, 0); + #ifdef POINTERS_EXTEND_UNSIGNED + if (GET_MODE(mem) != Pmode) + mem = convert_memory_address (Pmode, mem); + #endif value = expand_expr (arg1, NULL_RTX, mode, 0); mem = gen_rtx_MEM (mode, force_reg (Pmode, mem)); *************** ia64_expand_fetch_and_op (binoptab, mode *** 7480,7486 **** do { old = tmp; ar.ccv = tmp; ! ret = tmp + value; cmpxchgsz.acq tmp = [ptr], ret } while (tmp != old) */ --- 7879,7885 ---- do { old = tmp; ar.ccv = tmp; ! ret = tmp value; cmpxchgsz.acq tmp = [ptr], ret } while (tmp != old) */ *************** ia64_expand_op_and_fetch (binoptab, mode *** 7498,7503 **** --- 7897,7907 ---- arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); mem = expand_expr (arg0, NULL_RTX, Pmode, 0); + #ifdef POINTERS_EXTEND_UNSIGNED + if (GET_MODE(mem) != Pmode) + mem = convert_memory_address (Pmode, mem); + #endif + value = expand_expr (arg1, NULL_RTX, mode, 0); mem = gen_rtx_MEM (mode, force_reg (Pmode, mem)); *************** ia64_expand_compare_and_swap (mode, bool *** 7561,7571 **** arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); ! mem = expand_expr (arg0, NULL_RTX, Pmode, 0); old = expand_expr (arg1, NULL_RTX, mode, 0); new = expand_expr (arg2, NULL_RTX, mode, 0); ! mem = gen_rtx_MEM (mode, force_reg (Pmode, mem)); MEM_VOLATILE_P (mem) = 1; if (! register_operand (old, mode)) --- 7965,7975 ---- arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); ! mem = expand_expr (arg0, NULL_RTX, ptr_mode, 0); old = expand_expr (arg1, NULL_RTX, mode, 0); new = expand_expr (arg2, NULL_RTX, mode, 0); ! mem = gen_rtx_MEM (mode, force_reg (ptr_mode, mem)); MEM_VOLATILE_P (mem) = 1; if (! register_operand (old, mode)) *************** ia64_expand_compare_and_swap (mode, bool *** 7578,7585 **** else tmp = gen_reg_rtx (mode); ! ccv = gen_rtx_REG (mode, AR_CCV_REGNUM); ! emit_move_insn (ccv, old); emit_insn (gen_mf ()); if (mode == SImode) insn = gen_cmpxchg_acq_si (tmp, mem, new, ccv); --- 7982,7996 ---- else tmp = gen_reg_rtx (mode); ! ccv = gen_rtx_REG (DImode, AR_CCV_REGNUM); ! if (mode == DImode) ! emit_move_insn (ccv, old); ! else ! { ! rtx ccvtmp = gen_reg_rtx (DImode); ! emit_insn (gen_zero_extendsidi2 (ccvtmp, old)); ! emit_move_insn (ccv, ccvtmp); ! } emit_insn (gen_mf ()); if (mode == SImode) insn = gen_cmpxchg_acq_si (tmp, mem, new, ccv); *************** ia64_expand_lock_test_and_set (mode, arg *** 7610,7619 **** arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! mem = expand_expr (arg0, NULL_RTX, Pmode, 0); new = expand_expr (arg1, NULL_RTX, mode, 0); ! mem = gen_rtx_MEM (mode, force_reg (Pmode, mem)); MEM_VOLATILE_P (mem) = 1; if (! register_operand (new, mode)) new = copy_to_mode_reg (mode, new); --- 8021,8030 ---- arg0 = TREE_VALUE (arglist); arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! mem = expand_expr (arg0, NULL_RTX, ptr_mode, 0); new = expand_expr (arg1, NULL_RTX, mode, 0); ! mem = gen_rtx_MEM (mode, force_reg (ptr_mode, mem)); MEM_VOLATILE_P (mem) = 1; if (! register_operand (new, mode)) new = copy_to_mode_reg (mode, new); *************** ia64_expand_lock_release (mode, arglist, *** 7644,7652 **** rtx mem; arg0 = TREE_VALUE (arglist); ! mem = expand_expr (arg0, NULL_RTX, Pmode, 0); ! mem = gen_rtx_MEM (mode, force_reg (Pmode, mem)); MEM_VOLATILE_P (mem) = 1; emit_move_insn (mem, const0_rtx); --- 8055,8063 ---- rtx mem; arg0 = TREE_VALUE (arglist); ! mem = expand_expr (arg0, NULL_RTX, ptr_mode, 0); ! mem = gen_rtx_MEM (mode, force_reg (ptr_mode, mem)); MEM_VOLATILE_P (mem) = 1; emit_move_insn (mem, const0_rtx); *************** ia64_hpux_function_arg_padding (mode, ty *** 7820,7822 **** --- 8231,8451 ---- : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY) ? downward : upward); } + + /* Linked list of all external functions that are to be emitted by GCC. + We output the name if and only if TREE_SYMBOL_REFERENCED is set in + order to avoid putting out names that are never really used. */ + + struct extern_func_list + { + struct extern_func_list *next; /* next external */ + char *name; /* name of the external */ + } *extern_func_head = 0; + + static void + ia64_hpux_add_extern_decl (name) + const char *name; + { + struct extern_func_list *p; + + p = (struct extern_func_list *) xmalloc (sizeof (struct extern_func_list)); + p->name = xmalloc (strlen (name) + 1); + strcpy(p->name, name); + p->next = extern_func_head; + extern_func_head = p; + } + + /* Print out the list of used global functions. */ + + void + ia64_hpux_asm_file_end (file) + FILE *file; + { + while (extern_func_head) + { + const char *real_name; + tree decl; + + real_name = (* targetm.strip_name_encoding) (extern_func_head->name); + decl = maybe_get_identifier (real_name); + + if (!decl + || (! TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (decl))) + { + if (decl) + TREE_ASM_WRITTEN (decl) = 1; + (*targetm.asm_out.globalize_label) (file, extern_func_head->name); + fprintf (file, "%s", TYPE_ASM_OP); + assemble_name (file, extern_func_head->name); + putc (',', file); + fprintf (file, TYPE_OPERAND_FMT, "function"); + putc ('\n', file); + } + extern_func_head = extern_func_head->next; + } + } + + + /* Switch to the section to which we should output X. The only thing + special we do here is to honor small data. */ + + static void + ia64_select_rtx_section (mode, x, align) + enum machine_mode mode; + rtx x; + unsigned HOST_WIDE_INT align; + { + if (GET_MODE_SIZE (mode) > 0 + && GET_MODE_SIZE (mode) <= ia64_section_threshold) + sdata_section (); + else + default_elf_select_rtx_section (mode, x, align); + } + + /* It is illegal to have relocations in shared segments on AIX and HPUX. + Pretend flag_pic is always set. */ + + static void + ia64_rwreloc_select_section (exp, reloc, align) + tree exp; + int reloc; + unsigned HOST_WIDE_INT align; + { + default_elf_select_section_1 (exp, reloc, align, true); + } + + static void + ia64_rwreloc_unique_section (decl, reloc) + tree decl; + int reloc; + { + default_unique_section_1 (decl, reloc, true); + } + + static void + ia64_rwreloc_select_rtx_section (mode, x, align) + enum machine_mode mode; + rtx x; + unsigned HOST_WIDE_INT align; + { + int save_pic = flag_pic; + flag_pic = 1; + ia64_select_rtx_section (mode, x, align); + flag_pic = save_pic; + } + + static unsigned int + ia64_rwreloc_section_type_flags (decl, name, reloc) + tree decl; + const char *name; + int reloc; + { + return default_section_type_flags_1 (decl, name, reloc, true); + } + + + /* Output the assembler code for a thunk function. THUNK_DECL is the + declaration for the thunk function itself, FUNCTION is the decl for + the target function. DELTA is an immediate constant offset to be + added to THIS. If VCALL_OFFSET is non-zero, the word at + *(*this + vcall_offset) should be added to THIS. */ + + static void + ia64_output_mi_thunk (file, thunk, delta, vcall_offset, function) + FILE *file; + tree thunk ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset; + tree function; + { + rtx this, insn, funexp; + + reload_completed = 1; + no_new_pseudos = 1; + + /* Set things up as ia64_expand_prologue might. */ + last_scratch_gr_reg = 15; + + memset (¤t_frame_info, 0, sizeof (current_frame_info)); + current_frame_info.spill_cfa_off = -16; + current_frame_info.n_input_regs = 1; + current_frame_info.need_regstk = (TARGET_REG_NAMES != 0); + + if (!TARGET_REG_NAMES) + reg_names[IN_REG (0)] = ia64_reg_numbers[0]; + + /* Mark the end of the (empty) prologue. */ + emit_note (NULL, NOTE_INSN_PROLOGUE_END); + + this = gen_rtx_REG (Pmode, IN_REG (0)); + + /* Apply the constant offset, if required. */ + if (delta) + { + rtx delta_rtx = GEN_INT (delta); + + if (!CONST_OK_FOR_I (delta)) + { + rtx tmp = gen_rtx_REG (Pmode, 2); + emit_move_insn (tmp, delta_rtx); + delta_rtx = tmp; + } + emit_insn (gen_adddi3 (this, this, delta_rtx)); + } + + /* Apply the offset from the vtable, if required. */ + if (vcall_offset) + { + rtx vcall_offset_rtx = GEN_INT (vcall_offset); + rtx tmp = gen_rtx_REG (Pmode, 2); + + emit_move_insn (tmp, gen_rtx_MEM (Pmode, this)); + + if (!CONST_OK_FOR_J (vcall_offset)) + { + rtx tmp2 = gen_rtx_REG (Pmode, next_scratch_gr_reg ()); + emit_move_insn (tmp2, vcall_offset_rtx); + vcall_offset_rtx = tmp2; + } + emit_insn (gen_adddi3 (tmp, tmp, vcall_offset_rtx)); + + emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp)); + + emit_insn (gen_adddi3 (this, this, tmp)); + } + + /* Generate a tail call to the target function. */ + if (! TREE_USED (function)) + { + assemble_external (function); + TREE_USED (function) = 1; + } + funexp = XEXP (DECL_RTL (function), 0); + funexp = gen_rtx_MEM (FUNCTION_MODE, funexp); + ia64_expand_call (NULL_RTX, funexp, NULL_RTX, 1); + insn = get_last_insn (); + SIBLING_CALL_P (insn) = 1; + + /* Code generation for calls relies on splitting. */ + reload_completed = 1; + try_split (PATTERN (insn), insn, 0); + + emit_barrier (); + + /* Run just enough of rest_of_compilation to get the insns emitted. + There's not really enough bulk here to make other passes such as + instruction scheduling worth while. Note that use_thunk calls + assemble_start_function and assemble_end_function. */ + + insn = get_insns (); + emit_all_insn_group_barriers (NULL, insn); + shorten_branches (insn); + final_start_function (insn, file, 1); + final (insn, file, 1, 0); + final_end_function (); + + reload_completed = 0; + no_new_pseudos = 0; + } + + #include "gt-ia64.h" diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/ia64-c.c gcc-3.3/gcc/config/ia64/ia64-c.c *** gcc-3.2.3/gcc/config/ia64/ia64-c.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ia64/ia64-c.c 2003-03-16 16:43:43.000000000 +0000 *************** *** 0 **** --- 1,191 ---- + /* Definitions of C specific functions for GNU compiler. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Steve Ellcey + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "tree.h" + #include "cpplib.h" + #include "c-common.h" + #include "c-pragma.h" + #include "toplev.h" + #include "tm_p.h" + + static void ia64_hpux_add_pragma_builtin PARAMS ((tree func)); + + void + ia64_hpux_handle_builtin_pragma (pfile) + cpp_reader *pfile ATTRIBUTE_UNUSED; + { + /* #pragma builtin name, name, name */ + + enum cpp_ttype type; + tree x; + + type = c_lex (&x); + while (type == CPP_NAME) + { + ia64_hpux_add_pragma_builtin (x); + type = c_lex (&x); + if (type == CPP_COMMA) + type = c_lex (&x); + } + if (type != CPP_EOF) + warning ("malformed #pragma builtin"); + } + + /* List of standard math functions which do not set matherr by default + and which have a different version which does set errno and which we + want to call *if* we have seen an extern for the routine and we have + asked for strict C89 compatibility. */ + + typedef struct c89_mathlib_names + { + const char *realname; /* User visible function name. */ + const char *c89name; /* libm special name needed to set errno. */ + } c89_mathlib_names; + + static const c89_mathlib_names c89_mathlib_name_list [] = + { + {"acos", "_Acos_e#"}, + {"acosd", "_Acosd_e#"}, + {"acosdf", "_Acosdf_e#"}, + {"acosdl", "_Acosdl_e#"}, + {"acosdw", "_Acosdw_e#"}, + {"acosf", "_Acosf_e#"}, + {"acosh", "_Acosh_e#"}, + {"acoshf", "_Acoshf_e#"}, + {"acoshl", "_Acoshl_e#"}, + {"acoshw", "_Acoshw_e#"}, + {"acosl", "_Acosl_e#"}, + {"acosw", "_Acosw_e#"}, + {"asin", "_Asin_e#"}, + {"asind", "_Asind_e#"}, + {"asindf", "_Asindf_e#"}, + {"asindl", "_Asindl_e#"}, + {"asindw", "_Asindw_e#"}, + {"asinf", "_Asinf_e#"}, + {"asinl", "_Asinl_e#"}, + {"asinw", "_Asinw_e#"}, + {"atanh", "_Atanh_e#"}, + {"atanhf", "_Atanhf_e#"}, + {"atanhl", "_Atanhl_e#"}, + {"atanhw", "_Atanhw_e#"}, + {"cosh", "_Cosh_e#"}, + {"coshf", "_Coshf_e#"}, + {"coshl", "_Coshl_e#"}, + {"coshw", "_Coshw_e#"}, + {"exp2", "_Exp2_e#"}, + {"exp2f", "_Exp2f_e#"}, + {"exp2l", "_Exp2l_e#"}, + {"exp2w", "_Exp2w_e#"}, + {"exp", "_Exp_e#"}, + {"expf", "_Expf_e#"}, + {"expl", "_Expl_e#"}, + {"expm1", "_Expm1_e#"}, + {"expm1f", "_Expm1f_e#"}, + {"expm1l", "_Expm1l_e#"}, + {"expm1w", "_Expm1w_e#"}, + {"expw", "_Expw_e#"}, + {"fmod", "_Fmod_e#"}, + {"fmodf", "_Fmodf_e#"}, + {"fmodl", "_Fmodl_e#"}, + {"fmodw", "_Fmodw_e#"}, + {"gamma", "_Gamma_e#"}, + {"gammaf", "_Gammaf_e#"}, + {"gammal", "_Gammal_e#"}, + {"gammaw", "_Gammaw_e#"}, + {"ldexp", "_Ldexp_e#"}, + {"ldexpf", "_Ldexpf_e#"}, + {"ldexpl", "_Ldexpl_e#"}, + {"ldexpw", "_Ldexpw_e#"}, + {"lgamma", "_Lgamma_e#"}, + {"lgammaf", "_Lgammaf_e#"}, + {"lgammal", "_Lgammal_e#"}, + {"lgammaw", "_Lgammaw_e#"}, + {"log10", "_Log10_e#"}, + {"log10f", "_Log10f_e#"}, + {"log10l", "_Log10l_e#"}, + {"log10w", "_Log10w_e#"}, + {"log1p", "_Log1p_e#"}, + {"log1pf", "_Log1pf_e#"}, + {"log1pl", "_Log1pl_e#"}, + {"log1pw", "_Log1pw_e#"}, + {"log2", "_Log2_e#"}, + {"log2f", "_Log2f_e#"}, + {"log2l", "_Log2l_e#"}, + {"log2w", "_Log2w_e#"}, + {"log", "_Log_e#"}, + {"logb", "_Logb_e#"}, + {"logbf", "_Logbf_e#"}, + {"logbl", "_Logbl_e#"}, + {"logbw", "_Logbw_e#"}, + {"logf", "_Logf_e#"}, + {"logl", "_Logl_e#"}, + {"logw", "_Logw_e#"}, + {"nextafter", "_Nextafter_e#"}, + {"nextafterf", "_Nextafterf_e#"}, + {"nextafterl", "_Nextafterl_e#"}, + {"nextafterw", "_Nextafterw_e#"}, + {"pow", "_Pow_e#"}, + {"powf", "_Powf_e#"}, + {"powl", "_Powl_e#"}, + {"poww", "_Poww_e#"}, + {"remainder", "_Remainder_e#"}, + {"remainderf", "_Remainderf_e#"}, + {"remainderl", "_Remainderl_e#"}, + {"remainderw", "_Remainderw_e#"}, + {"scalb", "_Scalb_e#"}, + {"scalbf", "_Scalbf_e#"}, + {"scalbl", "_Scalbl_e#"}, + {"scalbw", "_Scalbw_e#"}, + {"sinh", "_Sinh_e#"}, + {"sinhf", "_Sinhf_e#"}, + {"sinhl", "_Sinhl_e#"}, + {"sinhw", "_Sinhw_e#"}, + {"sqrt", "_Sqrt_e#"}, + {"sqrtf", "_Sqrtf_e#"}, + {"sqrtl", "_Sqrtl_e#"}, + {"sqrtw", "_Sqrtw_e#"}, + {"tgamma", "_Tgamma_e#"}, + {"tgammaf", "_Tgammaf_e#"}, + {"tgammal", "_Tgammal_e#"}, + {"tgammaw", "_Tgammaw_e#"} + }; + + static void + ia64_hpux_add_pragma_builtin (func) + tree func; + { + size_t i; + + if (!flag_isoc94 && flag_iso) + { + for (i = 0; i < ARRAY_SIZE (c89_mathlib_name_list); i++) + { + if (!strcmp(c89_mathlib_name_list[i].realname, + IDENTIFIER_POINTER (func))) + { + add_to_renaming_pragma_list(func, + get_identifier(c89_mathlib_name_list[i].c89name)); + } + } + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/ia64.h gcc-3.3/gcc/config/ia64/ia64.h *** gcc-3.2.3/gcc/config/ia64/ia64.h 2002-04-18 20:31:55.000000000 +0000 --- gcc-3.3/gcc/config/ia64/ia64.h 2003-04-25 13:45:41.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 31,44 **** /* Run-time target specifications */ #define EXTRA_SPECS \ - { "cpp_cpu", CPP_CPU_SPEC }, \ { "asm_extra", ASM_EXTRA_SPEC }, - #define CPP_CPU_SPEC " \ - -Acpu=ia64 -Amachine=ia64 -D__ia64 -D__ia64__ %{!milp32:-D_LP64 -D__LP64__} \ - -D__ELF__" - #define CC1_SPEC "%(cc1_cpu) " #define ASM_EXTRA_SPEC "" --- 31,57 ---- /* Run-time target specifications */ + /* Target CPU builtins. */ + #define TARGET_CPU_CPP_BUILTINS() \ + do { \ + builtin_assert("cpu=ia64"); \ + builtin_assert("machine=ia64"); \ + builtin_define("__ia64"); \ + builtin_define("__ia64__"); \ + builtin_define("__itanium__"); \ + builtin_define("__ELF__"); \ + if (!TARGET_ILP32) \ + { \ + builtin_define("_LP64"); \ + builtin_define("__LP64__"); \ + } \ + if (TARGET_BIG_ENDIAN) \ + builtin_define("__BIG_ENDIAN__"); \ + } while (0) + #define EXTRA_SPECS \ { "asm_extra", ASM_EXTRA_SPEC }, #define CC1_SPEC "%(cc1_cpu) " #define ASM_EXTRA_SPEC "" *************** extern int target_flags; *** 72,80 **** #define MASK_AUTO_PIC 0x00000400 /* generate automatically PIC */ ! #define MASK_INLINE_DIV_LAT 0x00000800 /* inline div, min latency. */ ! #define MASK_INLINE_DIV_THR 0x00001000 /* inline div, max throughput. */ #define MASK_DWARF2_ASM 0x40000000 /* test dwarf2 line info via gas. */ --- 85,97 ---- #define MASK_AUTO_PIC 0x00000400 /* generate automatically PIC */ ! #define MASK_INLINE_FLOAT_DIV_LAT 0x00000800 /* inline div, min latency. */ ! #define MASK_INLINE_FLOAT_DIV_THR 0x00001000 /* inline div, max throughput. */ ! ! #define MASK_INLINE_INT_DIV_LAT 0x00000800 /* inline div, min latency. */ ! ! #define MASK_INLINE_INT_DIV_THR 0x00001000 /* inline div, max throughput. */ #define MASK_DWARF2_ASM 0x40000000 /* test dwarf2 line info via gas. */ *************** extern int target_flags; *** 100,114 **** #define TARGET_AUTO_PIC (target_flags & MASK_AUTO_PIC) ! #define TARGET_INLINE_DIV_LAT (target_flags & MASK_INLINE_DIV_LAT) ! #define TARGET_INLINE_DIV_THR (target_flags & MASK_INLINE_DIV_THR) ! #define TARGET_INLINE_DIV \ ! (target_flags & (MASK_INLINE_DIV_LAT | MASK_INLINE_DIV_THR)) #define TARGET_DWARF2_ASM (target_flags & MASK_DWARF2_ASM) /* This macro defines names of command options to set and clear bits in `target_flags'. Its definition is an initializer with a subgrouping for each command option. */ --- 117,149 ---- #define TARGET_AUTO_PIC (target_flags & MASK_AUTO_PIC) ! #define TARGET_INLINE_FLOAT_DIV_LAT (target_flags & MASK_INLINE_FLOAT_DIV_LAT) ! #define TARGET_INLINE_FLOAT_DIV_THR (target_flags & MASK_INLINE_FLOAT_DIV_THR) ! #define TARGET_INLINE_INT_DIV_LAT (target_flags & MASK_INLINE_INT_DIV_LAT) ! ! #define TARGET_INLINE_INT_DIV_THR (target_flags & MASK_INLINE_INT_DIV_THR) ! ! #define TARGET_INLINE_FLOAT_DIV \ ! (target_flags & (MASK_INLINE_FLOAT_DIV_LAT | MASK_INLINE_FLOAT_DIV_THR)) ! ! #define TARGET_INLINE_INT_DIV \ ! (target_flags & (MASK_INLINE_INT_DIV_LAT | MASK_INLINE_INT_DIV_THR)) #define TARGET_DWARF2_ASM (target_flags & MASK_DWARF2_ASM) + extern int ia64_tls_size; + #define TARGET_TLS14 (ia64_tls_size == 14) + #define TARGET_TLS22 (ia64_tls_size == 22) + #define TARGET_TLS64 (ia64_tls_size == 64) + + #define TARGET_HPUX_LD 0 + + #ifndef HAVE_AS_LTOFFX_LDXMOV_RELOCS + #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 0 + #endif + /* This macro defines names of command options to set and clear bits in `target_flags'. Its definition is an initializer with a subgrouping for each command option. */ *************** extern int target_flags; *** 145,154 **** N_("gp is constant (but save/restore gp on indirect calls)") }, \ { "auto-pic", MASK_AUTO_PIC, \ N_("Generate self-relocatable code") }, \ ! { "inline-divide-min-latency", MASK_INLINE_DIV_LAT, \ ! N_("Generate inline division, optimize for latency") }, \ ! { "inline-divide-max-throughput", MASK_INLINE_DIV_THR, \ ! N_("Generate inline division, optimize for throughput") }, \ { "dwarf2-asm", MASK_DWARF2_ASM, \ N_("Enable Dwarf 2 line debug info via GNU as")}, \ { "no-dwarf2-asm", -MASK_DWARF2_ASM, \ --- 180,193 ---- N_("gp is constant (but save/restore gp on indirect calls)") }, \ { "auto-pic", MASK_AUTO_PIC, \ N_("Generate self-relocatable code") }, \ ! { "inline-float-divide-min-latency", MASK_INLINE_FLOAT_DIV_LAT, \ ! N_("Generate inline floating point division, optimize for latency") },\ ! { "inline-float-divide-max-throughput", MASK_INLINE_FLOAT_DIV_THR, \ ! N_("Generate inline floating point division, optimize for throughput") },\ ! { "inline-int-divide-min-latency", MASK_INLINE_INT_DIV_LAT, \ ! N_("Generate inline integer division, optimize for latency") }, \ ! { "inline-int-divide-max-throughput", MASK_INLINE_INT_DIV_THR, \ ! N_("Generate inline integer division, optimize for throughput") },\ { "dwarf2-asm", MASK_DWARF2_ASM, \ N_("Enable Dwarf 2 line debug info via GNU as")}, \ { "no-dwarf2-asm", -MASK_DWARF2_ASM, \ *************** extern int target_flags; *** 177,186 **** --- 216,228 ---- subgrouping for each command option. */ extern const char *ia64_fixed_range_string; + extern const char *ia64_tls_size_string; #define TARGET_OPTIONS \ { \ { "fixed-range=", &ia64_fixed_range_string, \ N_("Specify range of registers to make fixed")}, \ + { "tls-size=", &ia64_tls_size_string, \ + N_("Specify bit size of immediate TLS offsets")}, \ } /* Sometimes certain combinations of command options do not make sense on a *************** extern const char *ia64_fixed_range_stri *** 201,225 **** /* Driver configuration */ /* A C string constant that tells the GNU CC driver program options to pass to - CPP. It can also specify how to translate options you give to GNU CC into - options for GNU CC to pass to the CPP. */ - - /* ??? __LONG_MAX__ depends on LP64/ILP32 switch. */ - /* ??? An alternative is to modify glimits.h to check for __LP64__ instead - of checked for CPU specific defines. We could also get rid of all LONG_MAX - defines in other tm.h files. */ - #define CPP_SPEC \ - "%{mcpu=itanium:-D__itanium__} %{mbig-endian:-D__BIG_ENDIAN__} \ - %(cpp_cpu) \ - -D__LONG_MAX__=9223372036854775807L" - - /* This is always "long" so it doesn't "change" in ILP32 vs. LP64. */ - /* #define NO_BUILTIN_SIZE_TYPE */ - - /* This is always "long" so it doesn't "change" in ILP32 vs. LP64. */ - /* #define NO_BUILTIN_PTRDIFF_TYPE */ - - /* A C string constant that tells the GNU CC driver program options to pass to `cc1'. It can also specify how to translate options you give to GNU CC into options for GNU CC to pass to the `cc1'. */ --- 243,248 ---- *************** extern const char *ia64_fixed_range_stri *** 252,261 **** #define LIBGCC2_WORDS_BIG_ENDIAN 0 #endif - #define BITS_PER_UNIT 8 - - #define BITS_PER_WORD 64 - #define UNITS_PER_WORD 8 #define POINTER_SIZE (TARGET_ILP32 ? 32 : 64) --- 275,280 ---- *************** while (0) *** 329,338 **** /* Define this if you wish to imitate the way many other C compilers handle alignment of bitfields and the structures that contain them. ! The behavior is that the type written for a bitfield (`int', `short', or other integer type) imposes an alignment for the entire structure, as if the structure really did contain an ordinary field of that type. In addition, ! the bitfield is placed within the structure so that it would fit within such a field, not crossing a boundary for it. */ #define PCC_BITFIELD_TYPE_MATTERS 1 --- 348,357 ---- /* Define this if you wish to imitate the way many other C compilers handle alignment of bitfields and the structures that contain them. ! The behavior is that the type written for a bit-field (`int', `short', or other integer type) imposes an alignment for the entire structure, as if the structure really did contain an ordinary field of that type. In addition, ! the bit-field is placed within the structure so that it would fit within such a field, not crossing a boundary for it. */ #define PCC_BITFIELD_TYPE_MATTERS 1 *************** while (0) *** 342,357 **** /* Allow pairs of registers to be used, which is the intent of the default. */ #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TImode) - /* A code distinguishing the floating point format of the target machine. */ - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - /* By default, the C++ compiler will use function addresses in the ! vtable entries. Setting this non-zero tells the compiler to use function descriptors instead. The value of this macro says how many words wide the descriptor is (normally 2). It is assumed that the address of a function descriptor may be treated as a ! pointer to a function. */ ! #define TARGET_VTABLE_USES_DESCRIPTORS 2 /* Layout of Source Language Data Types */ --- 361,386 ---- /* Allow pairs of registers to be used, which is the intent of the default. */ #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TImode) /* By default, the C++ compiler will use function addresses in the ! vtable entries. Setting this nonzero tells the compiler to use function descriptors instead. The value of this macro says how many words wide the descriptor is (normally 2). It is assumed that the address of a function descriptor may be treated as a ! pointer to a function. ! ! For reasons known only to HP, the vtable entries (as opposed to ! normal function descriptors) are 16 bytes wide in 32-bit mode as ! well, even though the 3rd and 4th words are unused. */ ! #define TARGET_VTABLE_USES_DESCRIPTORS (TARGET_ILP32 ? 4 : 2) ! ! /* Due to silliness in the HPUX linker, vtable entries must be ! 8-byte aligned even in 32-bit mode. Rather than create multiple ! ABIs, force this restriction on everyone else too. */ ! #define TARGET_VTABLE_ENTRY_ALIGN 64 ! ! /* Due to the above, we need extra padding for the data entries below 0 ! to retain the alignment of the descriptors. */ ! #define TARGET_VTABLE_DATA_ENTRY_DISTANCE (TARGET_ILP32 ? 2 : 1) /* Layout of Source Language Data Types */ *************** while (0) *** 365,381 **** #define LONG_LONG_TYPE_SIZE 64 - #define CHAR_TYPE_SIZE 8 - #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE 128 ! /* Tell real.c that this is the 80-bit Intel extended float format ! packaged in a 128-bit entity. */ ! #define INTEL_EXTENDED_IEEE_FORMAT 1 #define DEFAULT_SIGNED_CHAR 1 --- 394,407 ---- #define LONG_LONG_TYPE_SIZE 64 #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE 128 ! /* By default we use the 80-bit Intel extended float format packaged ! in a 128-bit entity. */ #define INTEL_EXTENDED_IEEE_FORMAT 1 #define DEFAULT_SIGNED_CHAR 1 *************** while (0) *** 599,612 **** #define LOCAL_REGNO(REGNO) \ (IN_REGNO_P (REGNO) || LOC_REGNO_P (REGNO)) - /* Add any extra modes needed to represent the condition code. - - CCImode is used to mark a single predicate register instead - of a register pair. This is currently only used in reg_raw_mode - so that flow doesn't do something stupid. */ - - #define EXTRA_CC_MODES CC(CCImode, "CCI") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. Must be defined if EXTRA_CC_MODES is defined. */ --- 625,630 ---- *************** enum reg_class *** 970,976 **** /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this macro on those ! machines to be a C expression that is non-zero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. */ --- 988,994 ---- /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this macro on those ! machines to be a C expression that is nonzero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. */ *************** enum reg_class *** 994,1010 **** : ((CLASS) == FR_REGS && (MODE) == TFmode) ? 1 \ : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* If defined, gives a class of registers that cannot be used as the ! operand of a SUBREG that changes the mode of the object illegally. */ ! ! #define CLASS_CANNOT_CHANGE_MODE FR_REGS ! ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. ! In FP regs, we can't change FP values to integer values and vice versa, but we can change e.g. DImode to SImode. */ ! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ ! (GET_MODE_CLASS (FROM) != GET_MODE_CLASS (TO)) /* A C expression that defines the machine-dependent operand constraint letters (`I', `J', `K', .. 'P') that specify particular ranges of --- 1012,1023 ---- : ((CLASS) == FR_REGS && (MODE) == TFmode) ? 1 \ : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* In FP regs, we can't change FP values to integer values and vice versa, but we can change e.g. DImode to SImode. */ ! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ ! (GET_MODE_CLASS (FROM) != GET_MODE_CLASS (TO) \ ! ? reg_classes_intersect_p (CLASS, FR_REGS) : 0) /* A C expression that defines the machine-dependent operand constraint letters (`I', `J', `K', .. 'P') that specify particular ranges of *************** enum reg_class *** 1200,1206 **** {RETURN_ADDRESS_POINTER_REGNUM, BR_REG (0)}, \ } ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM with register number TO. The frame pointer is automatically handled. */ --- 1213,1219 ---- {RETURN_ADDRESS_POINTER_REGNUM, BR_REG (0)}, \ } ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM with register number TO. The frame pointer is automatically handled. */ *************** do { \ *** 1344,1353 **** (((REGNO) >= GR_ARG_FIRST && (REGNO) < (GR_ARG_FIRST + MAX_ARGUMENT_SLOTS)) \ || ((REGNO) >= FR_ARG_FIRST && (REGNO) < (FR_ARG_FIRST + MAX_ARGUMENT_SLOTS))) - /* Implement `va_start' for varargs and stdarg. */ - #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ - ia64_va_start (stdarg, valist, nextarg) - /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ ia64_va_arg (valist, type) --- 1357,1362 ---- *************** do { \ *** 1433,1480 **** #define ASM_FILE_START(FILE) \ emit_safe_across_calls (FILE) - /* A C compound statement that outputs the assembler code for a thunk function, - used to implement C++ virtual function calls with multiple inheritance. */ - - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - do { \ - if (CONST_OK_FOR_I (DELTA)) \ - { \ - fprintf (FILE, "\tadds r32 = "); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \ - fprintf (FILE, ", r32\n"); \ - } \ - else \ - { \ - if (CONST_OK_FOR_J (DELTA)) \ - { \ - fprintf (FILE, "\taddl r2 = "); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \ - fprintf (FILE, ", r0\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tmovl r2 = "); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \ - fprintf (FILE, "\n"); \ - } \ - fprintf (FILE, "\t;;\n"); \ - fprintf (FILE, "\tadd r32 = r2, r32\n"); \ - } \ - fprintf (FILE, "\tbr "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "\n"); \ - } while (0) - /* Output part N of a function descriptor for DECL. For ia64, both words are emitted with a single relocation, so ignore N > 0. */ #define ASM_OUTPUT_FDESC(FILE, DECL, PART) \ do { \ if ((PART) == 0) \ { \ ! fputs ("\tdata16.ua @iplt(", FILE); \ assemble_name (FILE, XSTR (XEXP (DECL_RTL (DECL), 0), 0)); \ fputs (")\n", FILE); \ } \ } while (0) --- 1442,1461 ---- #define ASM_FILE_START(FILE) \ emit_safe_across_calls (FILE) /* Output part N of a function descriptor for DECL. For ia64, both words are emitted with a single relocation, so ignore N > 0. */ #define ASM_OUTPUT_FDESC(FILE, DECL, PART) \ do { \ if ((PART) == 0) \ { \ ! if (TARGET_ILP32) \ ! fputs ("\tdata8.ua @iplt(", FILE); \ ! else \ ! fputs ("\tdata16.ua @iplt(", FILE); \ assemble_name (FILE, XSTR (XEXP (DECL_RTL (DECL), 0), 0)); \ fputs (")\n", FILE); \ + if (TARGET_ILP32) \ + fputs ("\tdata8.ua 0\n", FILE); \ } \ } while (0) *************** do { \ *** 1786,1821 **** #define BSS_SECTION_ASM_OP "\t.bss" ! /* Define this macro if references to a symbol must be treated differently ! depending on something about the variable or function named by the symbol ! (such as what section it is in). */ ! ! #define ENCODE_SECTION_INFO(DECL) ia64_encode_section_info (DECL) ! ! /* If a variable is weakened, made one only or moved into a different ! section, it may be necessary to redo the section info to move the ! variable out of sdata. */ ! ! #define REDO_SECTION_INFO_P(DECL) \ ! ((TREE_CODE (DECL) == VAR_DECL) \ ! && (DECL_ONE_ONLY (DECL) || DECL_WEAK (DECL) || DECL_COMMON (DECL) \ ! || DECL_SECTION_NAME (DECL) != 0)) ! ! #define SDATA_NAME_FLAG_CHAR '@' #define IA64_DEFAULT_GVALUE 8 - - /* Decode SYM_NAME and store the real name part in VAR, sans the characters - that encode section info. */ - - #define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \ - do { \ - (VAR) = (SYMBOL_NAME); \ - if ((VAR)[0] == SDATA_NAME_FLAG_CHAR) \ - (VAR)++; \ - if ((VAR)[0] == '*') \ - (VAR)++; \ - } while (0) /* Position Independent Code. */ --- 1767,1775 ---- #define BSS_SECTION_ASM_OP "\t.bss" ! #define ENCODE_SECTION_INFO_CHAR '@' #define IA64_DEFAULT_GVALUE 8 /* Position Independent Code. */ *************** do { \ *** 1859,1919 **** #define ASM_APP_OFF "#NO_APP\n" - /* Output of Data. */ - - /* This is how to output an assembler line defining a `char' constant - to an xdata segment. */ - - #define ASM_OUTPUT_XDATA_CHAR(FILE, SECTION, VALUE) \ - do { \ - fprintf (FILE, "\t.xdata1\t\"%s\", ", SECTION); \ - output_addr_const (FILE, (VALUE)); \ - fprintf (FILE, "\n"); \ - } while (0) - - /* This is how to output an assembler line defining a `short' constant - to an xdata segment. */ - - #define ASM_OUTPUT_XDATA_SHORT(FILE, SECTION, VALUE) \ - do { \ - fprintf (FILE, "\t.xdata2\t\"%s\", ", SECTION); \ - output_addr_const (FILE, (VALUE)); \ - fprintf (FILE, "\n"); \ - } while (0) - - /* This is how to output an assembler line defining an `int' constant - to an xdata segment. We also handle symbol output here. */ - - /* ??? For ILP32, also need to handle function addresses here. */ - - #define ASM_OUTPUT_XDATA_INT(FILE, SECTION, VALUE) \ - do { \ - fprintf (FILE, "\t.xdata4\t\"%s\", ", SECTION); \ - output_addr_const (FILE, (VALUE)); \ - fprintf (FILE, "\n"); \ - } while (0) - - /* This is how to output an assembler line defining a `long' constant - to an xdata segment. We also handle symbol output here. */ - - #define ASM_OUTPUT_XDATA_DOUBLE_INT(FILE, SECTION, VALUE) \ - do { \ - int need_closing_paren = 0; \ - fprintf (FILE, "\t.xdata8\t\"%s\", ", SECTION); \ - if (!(TARGET_NO_PIC || TARGET_AUTO_PIC) \ - && GET_CODE (VALUE) == SYMBOL_REF) \ - { \ - fprintf (FILE, SYMBOL_REF_FLAG (VALUE) ? "@fptr(" : "@segrel("); \ - need_closing_paren = 1; \ - } \ - output_addr_const (FILE, VALUE); \ - if (need_closing_paren) \ - fprintf (FILE, ")"); \ - fprintf (FILE, "\n"); \ - } while (0) - - - /* Output of Uninitialized Variables. */ /* This is all handled by svr4.h. */ --- 1813,1818 ---- *************** do { \ *** 1936,1951 **** ia64_asm_output_label = 0; \ } while (0) ! /* A C statement (sans semicolon) to output to the stdio stream STREAM some ! commands that will make the label NAME global; that is, available for ! reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do { \ ! fputs ("\t.global ", STREAM); \ ! assemble_name (STREAM, NAME); \ ! fputs ("\n", STREAM); \ ! } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name of an external symbol named NAME which is --- 1835,1842 ---- ia64_asm_output_label = 0; \ } while (0) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global " /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name of an external symbol named NAME which is *************** do { \ *** 2191,2198 **** /* ??? Depends on the pointer size. */ ! #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ ! fprintf (STREAM, "\tdata8 @pcrel(.L%d)\n", VALUE) /* This is how to output an element of a case-vector that is absolute. (Ia64 does not use such vectors, but we must define this macro anyway.) */ --- 2082,2094 ---- /* ??? Depends on the pointer size. */ ! #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ ! do { \ ! if (TARGET_ILP32) \ ! fprintf (STREAM, "\tdata4 @pcrel(.L%d)\n", VALUE); \ ! else \ ! fprintf (STREAM, "\tdata8 @pcrel(.L%d)\n", VALUE); \ ! } while (0) /* This is how to output an element of a case-vector that is absolute. (Ia64 does not use such vectors, but we must define this macro anyway.) */ *************** do { \ *** 2211,2217 **** true if the symbol may be affected by dynamic relocations. */ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ (((CODE) == 1 ? DW_EH_PE_textrel : DW_EH_PE_datarel) \ ! | ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_udata8) /* Handle special EH pointer encodings. Absolute, pc-relative, and indirect are handled automatically. */ --- 2107,2114 ---- true if the symbol may be affected by dynamic relocations. */ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ (((CODE) == 1 ? DW_EH_PE_textrel : DW_EH_PE_datarel) \ ! | ((GLOBAL) ? DW_EH_PE_indirect : 0) \ ! | (TARGET_ILP32 ? DW_EH_PE_udata4 : DW_EH_PE_udata8)) /* Handle special EH pointer encodings. Absolute, pc-relative, and indirect are handled automatically. */ *************** do { \ *** 2284,2290 **** /* Define this macro if GNU CC should produce dwarf version 2 format debugging output in response to the `-g' option. */ ! #define DWARF2_DEBUGGING_INFO #define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DWARF2_ASM) --- 2181,2187 ---- /* Define this macro if GNU CC should produce dwarf version 2 format debugging output in response to the `-g' option. */ ! #define DWARF2_DEBUGGING_INFO 1 #define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DWARF2_ASM) *************** do { \ *** 2316,2327 **** fputc (')', FILE); \ } while (0) - /* Cross Compilation and Floating Point. */ - - /* Define to enable software floating point emulation. */ - #define REAL_ARITHMETIC - - /* Register Renaming Parameters. */ /* A C expression that is nonzero if hard register number REGNO2 can be --- 2213,2218 ---- *************** do { \ *** 2381,2392 **** { "ar_pfs_reg_operand", {REG}}, \ { "general_tfmode_operand", {SUBREG, REG, CONST_DOUBLE, MEM}}, \ { "destination_tfmode_operand", {SUBREG, REG, MEM}}, \ ! { "tfreg_or_fp01_operand", {REG, CONST_DOUBLE}}, /* An alias for a machine mode name. This is the machine mode that elements of a jump-table should have. */ ! #define CASE_VECTOR_MODE Pmode /* Define as C expression which evaluates to nonzero if the tablejump instruction expects the table to contain offsets from the address of the --- 2272,2284 ---- { "ar_pfs_reg_operand", {REG}}, \ { "general_tfmode_operand", {SUBREG, REG, CONST_DOUBLE, MEM}}, \ { "destination_tfmode_operand", {SUBREG, REG, MEM}}, \ ! { "tfreg_or_fp01_operand", {REG, CONST_DOUBLE}}, \ ! { "basereg_operand", {SUBREG, REG}}, /* An alias for a machine mode name. This is the machine mode that elements of a jump-table should have. */ ! #define CASE_VECTOR_MODE ptr_mode /* Define as C expression which evaluates to nonzero if the tablejump instruction expects the table to contain offsets from the address of the *************** do { \ *** 2452,2458 **** #define PREFETCH_BLOCK 32 ! #define HANDLE_SYSV_PRAGMA /* In rare cases, correct code generation requires extra machine dependent processing between the second jump optimization pass and delayed branch --- 2344,2350 ---- #define PREFETCH_BLOCK 32 ! #define HANDLE_SYSV_PRAGMA 1 /* In rare cases, correct code generation requires extra machine dependent processing between the second jump optimization pass and delayed branch *************** extern int ia64_final_schedule; *** 2476,2491 **** #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 15 : INVALID_REGNUM) /* This function contains machine specific function data. */ ! struct machine_function { /* The new stack pointer when unwinding from EH. */ ! struct rtx_def* ia64_eh_epilogue_sp; /* The new bsp value when unwinding from EH. */ ! struct rtx_def* ia64_eh_epilogue_bsp; /* The GP value save register. */ ! struct rtx_def* ia64_gp_save; /* The number of varargs registers to save. */ int n_varargs; --- 2368,2383 ---- #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 15 : INVALID_REGNUM) /* This function contains machine specific function data. */ ! struct machine_function GTY(()) { /* The new stack pointer when unwinding from EH. */ ! rtx ia64_eh_epilogue_sp; /* The new bsp value when unwinding from EH. */ ! rtx ia64_eh_epilogue_bsp; /* The GP value save register. */ ! rtx ia64_gp_save; /* The number of varargs registers to save. */ int n_varargs; *************** enum fetchop_code { *** 2558,2561 **** --- 2450,2454 ---- #undef PROFILE_BEFORE_PROLOGUE #define PROFILE_BEFORE_PROLOGUE 1 + #define FUNCTION_OK_FOR_SIBCALL(DECL) ia64_function_ok_for_sibcall (DECL) /* End of ia64.h */ diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/ia64.md gcc-3.3/gcc/config/ia64/ia64.md *** gcc-3.2.3/gcc/config/ia64/ia64.md 2002-04-19 03:50:34.000000000 +0000 --- gcc-3.3/gcc/config/ia64/ia64.md 2003-04-25 13:45:42.000000000 +0000 *************** *** 1,5 **** ;; IA-64 Machine description template ! ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. ;; Contributed by James E. Wilson and ;; David Mosberger . --- 1,5 ---- ;; IA-64 Machine description template ! ;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Contributed by James E. Wilson and ;; David Mosberger . *************** *** 48,82 **** ;; ??? Need a better way to describe alternate fp status registers. ! ;; Unspec usage: ! ;; ! ;; unspec: ! ;; 1 gr_spill ! ;; 2 gr_restore ! ;; 3 fr_spill ! ;; 4 fr_restore ! ;; 5 recip_approx ! ;; 7 pred_rel_mutex ! ;; 8 popcnt ! ;; 9 pic call ! ;; 12 mf ! ;; 13 cmpxchg_acq ! ;; 19 fetchadd_acq ! ;; 20 bsp_value ! ;; 21 flushrs ! ;; 22 bundle selector ! ;; 23 cycle display ! ;; 24 addp4 ! ;; 25 prologue_use ! ;; ! ;; unspec_volatile: ! ;; 0 alloc ! ;; 1 blockage ! ;; 2 insn_group_barrier ! ;; 3 break ! ;; 5 set_bsp ! ;; 8 pred.safe_across_calls all ! ;; 9 pred.safe_across_calls normal ;; :::::::::::::::::::: ;; :: --- 48,90 ---- ;; ??? Need a better way to describe alternate fp status registers. ! (define_constants ! [; Relocations ! (UNSPEC_LTOFF_DTPMOD 0) ! (UNSPEC_LTOFF_DTPREL 1) ! (UNSPEC_DTPREL 2) ! (UNSPEC_LTOFF_TPREL 3) ! (UNSPEC_TPREL 4) ! ! (UNSPEC_LD_BASE 9) ! (UNSPEC_GR_SPILL 10) ! (UNSPEC_GR_RESTORE 11) ! (UNSPEC_FR_SPILL 12) ! (UNSPEC_FR_RESTORE 13) ! (UNSPEC_FR_RECIP_APPROX 14) ! (UNSPEC_PRED_REL_MUTEX 15) ! (UNSPEC_POPCNT 16) ! (UNSPEC_PIC_CALL 17) ! (UNSPEC_MF 18) ! (UNSPEC_CMPXCHG_ACQ 19) ! (UNSPEC_FETCHADD_ACQ 20) ! (UNSPEC_BSP_VALUE 21) ! (UNSPEC_FLUSHRS 22) ! (UNSPEC_BUNDLE_SELECTOR 23) ! (UNSPEC_ADDP4 24) ! (UNSPEC_PROLOGUE_USE 25) ! ]) ! ! (define_constants ! [(UNSPECV_ALLOC 0) ! (UNSPECV_BLOCKAGE 1) ! (UNSPECV_INSN_GROUP_BARRIER 2) ! (UNSPECV_BREAK 3) ! (UNSPECV_SET_BSP 4) ! (UNSPECV_PSAC_ALL 5) ; pred.safe_across_calls ! (UNSPECV_PSAC_NORMAL 6) ! (UNSPECV_SETJMP_RECEIVER 7) ! ]) ;; :::::::::::::::::::: ;; :: *************** *** 100,107 **** ;; multiple instructions, patterns which emit 0 instructions, and patterns ;; which emit instruction that can go in any slot (e.g. nop). ! (define_attr "itanium_class" "unknown,ignore,stop_bit,br,fcmp,fcvtfx,fld,fmac,fmisc,frar_i,frar_m,frbr,frfr,frpr,ialu,icmp,ilog,ishf,ld,chk_s,long_i,mmmul,mmshf,mmshfi,rse_m,scall,sem,stf,st,syst_m0,syst_m,tbit,toar_i,toar_m,tobr,tofr,topr,xmpy,xtd,nop_b,nop_f,nop_i,nop_m,nop_x,lfetch" ! (const_string "unknown")) ;; chk_s has an I and an M form; use type A for convenience. (define_attr "type" "unknown,A,I,M,F,B,L,X,S" --- 108,119 ---- ;; multiple instructions, patterns which emit 0 instructions, and patterns ;; which emit instruction that can go in any slot (e.g. nop). ! (define_attr "itanium_class" "unknown,ignore,stop_bit,br,fcmp,fcvtfx,fld, ! fmac,fmisc,frar_i,frar_m,frbr,frfr,frpr,ialu,icmp,ilog,ishf,ld, ! chk_s,long_i,mmmul,mmshf,mmshfi,rse_m,scall,sem,stf,st,syst_m0, ! syst_m,tbit,toar_i,toar_m,tobr,tofr,topr,xmpy,xtd,nop_b,nop_f, ! nop_i,nop_m,nop_x,lfetch" ! (const_string "unknown")) ;; chk_s has an I and an M form; use type A for convenience. (define_attr "type" "unknown,A,I,M,F,B,L,X,S" *************** *** 262,268 **** && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))" [(set (match_dup 2) (match_dup 4)) (set (match_dup 3) (match_dup 5)) ! (set (match_dup 0) (unspec:BI [(match_dup 0)] 7))] "operands[2] = gen_rtx_REG (CCImode, REGNO (operands[0])); operands[3] = gen_rtx_REG (CCImode, REGNO (operands[0]) + 1); operands[4] = gen_rtx_REG (CCImode, REGNO (operands[1])); --- 274,280 ---- && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))" [(set (match_dup 2) (match_dup 4)) (set (match_dup 3) (match_dup 5)) ! (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))] "operands[2] = gen_rtx_REG (CCImode, REGNO (operands[0])); operands[3] = gen_rtx_REG (CCImode, REGNO (operands[0]) + 1); operands[4] = gen_rtx_REG (CCImode, REGNO (operands[1])); *************** *** 272,283 **** [(set (match_operand:QI 0 "general_operand" "") (match_operand:QI 1 "general_operand" ""))] "" - " { ! if (! reload_in_progress && ! reload_completed ! && ! ia64_move_ok (operands[0], operands[1])) ! operands[1] = force_reg (QImode, operands[1]); ! }") (define_insn "*movqi_internal" [(set (match_operand:QI 0 "destination_operand" "=r,r,r, m, r,*f,*f") --- 284,295 ---- [(set (match_operand:QI 0 "general_operand" "") (match_operand:QI 1 "general_operand" ""))] "" { ! rtx op1 = ia64_expand_move (operands[0], operands[1]); ! if (!op1) ! DONE; ! operands[1] = op1; ! }) (define_insn "*movqi_internal" [(set (match_operand:QI 0 "destination_operand" "=r,r,r, m, r,*f,*f") *************** *** 297,308 **** [(set (match_operand:HI 0 "general_operand" "") (match_operand:HI 1 "general_operand" ""))] "" - " { ! if (! reload_in_progress && ! reload_completed ! && ! ia64_move_ok (operands[0], operands[1])) ! operands[1] = force_reg (HImode, operands[1]); ! }") (define_insn "*movhi_internal" [(set (match_operand:HI 0 "destination_operand" "=r,r,r, m, r,*f,*f") --- 309,320 ---- [(set (match_operand:HI 0 "general_operand" "") (match_operand:HI 1 "general_operand" ""))] "" { ! rtx op1 = ia64_expand_move (operands[0], operands[1]); ! if (!op1) ! DONE; ! operands[1] = op1; ! }) (define_insn "*movhi_internal" [(set (match_operand:HI 0 "destination_operand" "=r,r,r, m, r,*f,*f") *************** *** 322,333 **** [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" - " { ! if (! reload_in_progress && ! reload_completed ! && ! ia64_move_ok (operands[0], operands[1])) ! operands[1] = force_reg (SImode, operands[1]); ! }") (define_insn "*movsi_internal" [(set (match_operand:SI 0 "destination_operand" "=r,r,r,r, m, r,*f,*f, r,*d") --- 334,368 ---- [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" { ! rtx op1 = ia64_expand_move (operands[0], operands[1]); ! if (!op1) ! DONE; ! operands[1] = op1; ! }) ! ! ;; This is used during early compilation to delay the decision on ! ;; how to refer to a variable as long as possible. This is especially ! ;; important between initial rtl generation and optimization for ! ;; deferred functions, since we may acquire additional information ! ;; on the variables used in the meantime. ! ! (define_insn_and_split "movsi_symbolic" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (match_operand:SI 1 "symbolic_operand" "s")) ! (clobber (match_scratch:DI 2 "=r")) ! (use (reg:DI 1))] ! "" ! "* abort ();" ! "!no_new_pseudos || reload_completed" ! [(const_int 0)] ! { ! rtx scratch = operands[2]; ! if (!reload_completed) ! scratch = gen_reg_rtx (Pmode); ! ia64_expand_load_address (operands[0], operands[1], scratch); ! DONE; ! }) (define_insn "*movsi_internal" [(set (match_operand:SI 0 "destination_operand" "=r,r,r,r, m, r,*f,*f, r,*d") *************** *** 344,382 **** mov %0 = %1 mov %0 = %1 mov %0 = %r1" ! ;; frar_m, toar_m ??? why not frar_i and toar_i [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,frar_m,toar_m")]) (define_expand "movdi" [(set (match_operand:DI 0 "general_operand" "") (match_operand:DI 1 "general_operand" ""))] "" - " { ! if (! reload_in_progress && ! reload_completed ! && ! ia64_move_ok (operands[0], operands[1])) ! operands[1] = force_reg (DImode, operands[1]); ! if (! TARGET_NO_PIC && symbolic_operand (operands[1], DImode)) ! { ! /* Before optimization starts, delay committing to any particular ! type of PIC address load. If this function gets deferred, we ! may acquire information that changes the value of the ! sdata_symbolic_operand predicate. */ ! /* But don't delay for function pointers. Loading a function address ! actually loads the address of the descriptor not the function. ! If we represent these as SYMBOL_REFs, then they get cse'd with ! calls, and we end up with calls to the descriptor address instead of ! calls to the function address. Functions are not candidates for ! sdata anyways. */ ! if (rtx_equal_function_value_matters ! && ! (GET_CODE (operands[1]) == SYMBOL_REF ! && SYMBOL_REF_FLAG (operands[1]))) ! emit_insn (gen_movdi_symbolic (operands[0], operands[1], gen_reg_rtx (DImode))); ! else ! ia64_expand_load_address (operands[0], operands[1], NULL_RTX); ! DONE; ! } ! }") ;; This is used during early compilation to delay the decision on ;; how to refer to a variable as long as possible. This is especially --- 379,397 ---- mov %0 = %1 mov %0 = %1 mov %0 = %r1" ! ;; frar_m, toar_m ??? why not frar_i and toar_i [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,frar_m,toar_m")]) (define_expand "movdi" [(set (match_operand:DI 0 "general_operand" "") (match_operand:DI 1 "general_operand" ""))] "" { ! rtx op1 = ia64_expand_move (operands[0], operands[1]); ! if (!op1) ! DONE; ! operands[1] = op1; ! }) ;; This is used during early compilation to delay the decision on ;; how to refer to a variable as long as possible. This is especially *************** *** 384,402 **** ;; deferred functions, since we may acquire additional information ;; on the variables used in the meantime. - ;; ??? This causes us to lose REG_LABEL notes, because the insn splitter - ;; does not attempt to preserve any REG_NOTES on the input instruction. - (define_insn_and_split "movdi_symbolic" [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "symbolic_operand" "s")) ! (clobber (match_operand:DI 2 "register_operand" "+r")) (use (reg:DI 1))] "" "* abort ();" ! "" [(const_int 0)] ! "ia64_expand_load_address (operands[0], operands[1], operands[2]); DONE;") (define_insn "*movdi_internal" [(set (match_operand:DI 0 "destination_operand" --- 399,420 ---- ;; deferred functions, since we may acquire additional information ;; on the variables used in the meantime. (define_insn_and_split "movdi_symbolic" [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "symbolic_operand" "s")) ! (clobber (match_scratch:DI 2 "=r")) (use (reg:DI 1))] "" "* abort ();" ! "!no_new_pseudos || reload_completed" [(const_int 0)] ! { ! rtx scratch = operands[2]; ! if (!reload_completed) ! scratch = gen_reg_rtx (Pmode); ! ia64_expand_load_address (operands[0], operands[1], scratch); ! DONE; ! }) (define_insn "*movdi_internal" [(set (match_operand:DI 0 "destination_operand" *************** *** 404,430 **** (match_operand:DI 1 "move_operand" "rO,J,i,m,rO,*f,rO,*f, Q,*f,*b,rO,*e,rK,*d,rK,*c,rO"))] "ia64_move_ok (operands[0], operands[1])" - "* { static const char * const alt[] = { ! \"%,mov %0 = %r1\", ! \"%,addl %0 = %1, r0\", ! \"%,movl %0 = %1\", ! \"%,ld8%O1 %0 = %1%P1\", ! \"%,st8%Q0 %0 = %r1%P0\", ! \"%,getf.sig %0 = %1\", ! \"%,setf.sig %0 = %r1\", ! \"%,mov %0 = %1\", ! \"%,ldf8 %0 = %1%P1\", ! \"%,stf8 %0 = %1%P0\", ! \"%,mov %0 = %1\", ! \"%,mov %0 = %r1\", ! \"%,mov %0 = %1\", ! \"%,mov %0 = %1\", ! \"%,mov %0 = %1\", ! \"%,mov %0 = %1\", ! \"mov %0 = pr\", ! \"mov pr = %1, -1\" }; if (which_alternative == 2 && ! TARGET_NO_PIC --- 422,447 ---- (match_operand:DI 1 "move_operand" "rO,J,i,m,rO,*f,rO,*f, Q,*f,*b,rO,*e,rK,*d,rK,*c,rO"))] "ia64_move_ok (operands[0], operands[1])" { static const char * const alt[] = { ! "%,mov %0 = %r1", ! "%,addl %0 = %1, r0", ! "%,movl %0 = %1", ! "%,ld8%O1 %0 = %1%P1", ! "%,st8%Q0 %0 = %r1%P0", ! "%,getf.sig %0 = %1", ! "%,setf.sig %0 = %r1", ! "%,mov %0 = %1", ! "%,ldf8 %0 = %1%P1", ! "%,stf8 %0 = %1%P0", ! "%,mov %0 = %1", ! "%,mov %0 = %r1", ! "%,mov %0 = %1", ! "%,mov %0 = %1", ! "%,mov %0 = %1", ! "%,mov %0 = %1", ! "mov %0 = pr", ! "mov pr = %1, -1" }; if (which_alternative == 2 && ! TARGET_NO_PIC *************** *** 432,438 **** abort (); return alt[which_alternative]; ! }" [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,fld,stf,frbr,tobr,frar_i,toar_i,frar_m,toar_m,frpr,topr")]) (define_split --- 449,455 ---- abort (); return alt[which_alternative]; ! } [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,fld,stf,frbr,tobr,frar_i,toar_i,frar_m,toar_m,frpr,topr")]) (define_split *************** *** 440,473 **** (match_operand:DI 1 "symbolic_operand" ""))] "reload_completed && ! TARGET_NO_PIC" [(const_int 0)] - " { ia64_expand_load_address (operands[0], operands[1], NULL_RTX); DONE; ! }") (define_expand "load_fptr" [(set (match_dup 2) ! (plus:DI (reg:DI 1) (match_operand:DI 1 "function_operand" ""))) (set (match_operand:DI 0 "register_operand" "") (match_dup 3))] "" - " { operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode); operands[3] = gen_rtx_MEM (DImode, operands[2]); RTX_UNCHANGING_P (operands[3]) = 1; ! }") (define_insn "*load_fptr_internal1" [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) (match_operand:DI 1 "function_operand" "s")))] "" "addl %0 = @ltoff(@fptr(%1)), gp" [(set_attr "itanium_class" "ialu")]) (define_insn "load_gprel" [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) (match_operand:DI 1 "sdata_symbolic_operand" "s")))] "" "addl %0 = @gprel(%1), gp" [(set_attr "itanium_class" "ialu")]) --- 457,488 ---- (match_operand:DI 1 "symbolic_operand" ""))] "reload_completed && ! TARGET_NO_PIC" [(const_int 0)] { ia64_expand_load_address (operands[0], operands[1], NULL_RTX); DONE; ! }) (define_expand "load_fptr" [(set (match_dup 2) ! (plus:DI (reg:DI 1) (match_operand 1 "function_operand" ""))) (set (match_operand:DI 0 "register_operand" "") (match_dup 3))] "" { operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode); operands[3] = gen_rtx_MEM (DImode, operands[2]); RTX_UNCHANGING_P (operands[3]) = 1; ! }) (define_insn "*load_fptr_internal1" [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) (match_operand 1 "function_operand" "s")))] "" "addl %0 = @ltoff(@fptr(%1)), gp" [(set_attr "itanium_class" "ialu")]) (define_insn "load_gprel" [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) (match_operand 1 "sdata_symbolic_operand" "s")))] "" "addl %0 = @gprel(%1), gp" [(set_attr "itanium_class" "ialu")]) *************** *** 485,513 **** (set (match_operand:DI 0 "register_operand" "") (plus:DI (match_dup 3) (match_dup 2)))] "" - " { operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode); operands[3] = pic_offset_table_rtx; ! }") (define_expand "load_symptr" [(set (match_operand:DI 2 "register_operand" "") ! (plus:DI (match_dup 4) (match_operand:DI 1 "got_symbolic_operand" ""))) ! (set (match_operand:DI 0 "register_operand" "") (match_dup 3))] "" - " { ! operands[3] = gen_rtx_MEM (DImode, operands[2]); ! operands[4] = pic_offset_table_rtx; ! RTX_UNCHANGING_P (operands[3]) = 1; ! }") ! (define_insn "*load_symptr_internal1" [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) (match_operand:DI 1 "got_symbolic_operand" "s")))] "" ! "addl %0 = @ltoff(%1), gp" [(set_attr "itanium_class" "ialu")]) ;; With no offsettable memory references, we've got to have a scratch --- 500,670 ---- (set (match_operand:DI 0 "register_operand" "") (plus:DI (match_dup 3) (match_dup 2)))] "" { operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode); operands[3] = pic_offset_table_rtx; ! }) (define_expand "load_symptr" [(set (match_operand:DI 2 "register_operand" "") ! (plus:DI (high:DI (match_operand:DI 1 "got_symbolic_operand" "")) ! (match_dup 3))) ! (set (match_operand:DI 0 "register_operand" "") ! (lo_sum:DI (match_dup 2) (match_dup 1)))] "" { ! operands[3] = pic_offset_table_rtx; ! }) ! (define_insn "*load_symptr_high" [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (high:DI (match_operand 1 "got_symbolic_operand" "s")) ! (match_operand:DI 2 "register_operand" "a")))] "" ! { ! if (HAVE_AS_LTOFFX_LDXMOV_RELOCS) ! return "%,addl %0 = @ltoffx(%1), %2"; ! else ! return "%,addl %0 = @ltoff(%1), %2"; ! } ! [(set_attr "itanium_class" "ialu")]) ! ! (define_insn "*load_symptr_low" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (match_operand 2 "got_symbolic_operand" "s")))] ! "" ! { ! if (HAVE_AS_LTOFFX_LDXMOV_RELOCS) ! return "%,ld8.mov %0 = [%1], %2"; ! else ! return "%,ld8 %0 = [%1]"; ! } ! [(set_attr "itanium_class" "ld")]) ! ! (define_insn "load_ltoff_dtpmod" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_LTOFF_DTPMOD)))] ! "" ! "addl %0 = @ltoff(@dtpmod(%1)), gp" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_insn "load_ltoff_dtprel" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_LTOFF_DTPREL)))] ! "" ! "addl %0 = @ltoff(@dtprel(%1)), gp" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_expand "load_dtprel" ! [(set (match_operand:DI 0 "register_operand" "") ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_DTPREL))] ! "" ! "") ! ! (define_insn "*load_dtprel64" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_DTPREL))] ! "TARGET_TLS64" ! "movl %0 = @dtprel(%1)" ! [(set_attr "itanium_class" "long_i")]) ! ! (define_insn "*load_dtprel22" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_DTPREL))] ! "" ! "addl %0 = @dtprel(%1), r0" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_expand "add_dtprel" ! [(set (match_operand:DI 0 "register_operand" "") ! (plus:DI (match_operand:DI 1 "register_operand" "") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] ! UNSPEC_DTPREL)))] ! "!TARGET_TLS64" ! "") ! ! (define_insn "*add_dtprel14" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] ! UNSPEC_DTPREL)))] ! "TARGET_TLS14" ! "adds %0 = @dtprel(%2), %1" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_insn "*add_dtprel22" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (match_operand:DI 1 "register_operand" "a") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] ! UNSPEC_DTPREL)))] ! "TARGET_TLS22" ! "addl %0 = @dtprel(%2), %1" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_insn "load_ltoff_tprel" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (reg:DI 1) ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_LTOFF_TPREL)))] ! "" ! "addl %0 = @ltoff(@tprel(%1)), gp" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_expand "load_tprel" ! [(set (match_operand:DI 0 "register_operand" "") ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_TPREL))] ! "" ! "") ! ! (define_insn "*load_tprel64" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_TPREL))] ! "TARGET_TLS64" ! "movl %0 = @tprel(%1)" ! [(set_attr "itanium_class" "long_i")]) ! ! (define_insn "*load_tprel22" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] ! UNSPEC_TPREL))] ! "" ! "addl %0 = @tprel(%1), r0" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_expand "add_tprel" ! [(set (match_operand:DI 0 "register_operand" "") ! (plus:DI (match_operand:DI 1 "register_operand" "") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] ! UNSPEC_TPREL)))] ! "!TARGET_TLS64" ! "") ! ! (define_insn "*add_tprel14" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] ! UNSPEC_TPREL)))] ! "TARGET_TLS14" ! "adds %0 = @tprel(%2), %1" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_insn "*add_tprel22" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (match_operand:DI 1 "register_operand" "a") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] ! UNSPEC_TPREL)))] ! "TARGET_TLS22" ! "addl %0 = @tprel(%2), %1" [(set_attr "itanium_class" "ialu")]) ;; With no offsettable memory references, we've got to have a scratch *************** *** 517,528 **** (match_operand:TI 1 "general_operand" "")) (clobber (match_scratch:DI 2 ""))])] "" - " { ! if (! reload_in_progress && ! reload_completed ! && ! ia64_move_ok (operands[0], operands[1])) ! operands[1] = force_reg (TImode, operands[1]); ! }") (define_insn_and_split "*movti_internal" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,r,m") --- 674,685 ---- (match_operand:TI 1 "general_operand" "")) (clobber (match_scratch:DI 2 ""))])] "" { ! rtx op1 = ia64_expand_move (operands[0], operands[1]); ! if (!op1) ! DONE; ! operands[1] = op1; ! }) (define_insn_and_split "*movti_internal" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,r,m") *************** *** 532,538 **** "#" "reload_completed" [(const_int 0)] - " { rtx adj1, adj2, in[2], out[2], insn; int first; --- 689,694 ---- *************** *** 567,573 **** XEXP (XEXP (out[!first], 0), 0), REG_NOTES (insn)); DONE; ! }" [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]) --- 723,729 ---- XEXP (XEXP (out[!first], 0), 0), REG_NOTES (insn)); DONE; ! } [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]) *************** *** 581,587 **** "#" "reload_completed" [(const_int 0)] - " { rtx in[2], out[2]; int first; --- 737,742 ---- *************** *** 600,606 **** emit_insn (gen_rtx_SET (VOIDmode, out[first], in[first])); emit_insn (gen_rtx_SET (VOIDmode, out[!first], in[!first])); DONE; ! }" [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]) --- 755,761 ---- emit_insn (gen_rtx_SET (VOIDmode, out[first], in[first])); emit_insn (gen_rtx_SET (VOIDmode, out[!first], in[!first])); DONE; ! } [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]) *************** *** 609,690 **** (match_operand:TI 1 "" "m")) (clobber (match_operand:TI 2 "register_operand" "=&r"))])] "" - " { unsigned int s_regno = REGNO (operands[2]); if (s_regno == REGNO (operands[0])) s_regno += 1; operands[2] = gen_rtx_REG (DImode, s_regno); ! }") (define_expand "reload_outti" [(parallel [(set (match_operand:TI 0 "" "=m") (match_operand:TI 1 "register_operand" "r")) (clobber (match_operand:TI 2 "register_operand" "=&r"))])] "" - " { unsigned int s_regno = REGNO (operands[2]); if (s_regno == REGNO (operands[1])) s_regno += 1; operands[2] = gen_rtx_REG (DImode, s_regno); ! }") ;; Floating Point Moves ;; ;; Note - Patterns for SF mode moves are compulsory, but ! ;; patterns for DF are optional, as GCC can synthesise them. (define_expand "movsf" [(set (match_operand:SF 0 "general_operand" "") (match_operand:SF 1 "general_operand" ""))] "" - " { ! if (! reload_in_progress && ! reload_completed ! && ! ia64_move_ok (operands[0], operands[1])) ! operands[1] = force_reg (SFmode, operands[1]); ! }") (define_insn "*movsf_internal" [(set (match_operand:SF 0 "destination_operand" "=f,f, Q,*r, f,*r,*r, m") (match_operand:SF 1 "general_operand" "fG,Q,fG,fG,*r,*r, m,*r"))] "ia64_move_ok (operands[0], operands[1])" "@ ! mov %0 = %F1 ! ldfs %0 = %1%P1 ! stfs %0 = %F1%P0 ! getf.s %0 = %F1 ! setf.s %0 = %1 ! mov %0 = %1 ! ld4%O1 %0 = %1%P1 ! st4%Q0 %0 = %1%P0" [(set_attr "itanium_class" "fmisc,fld,stf,frfr,tofr,ialu,ld,st")]) (define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") (match_operand:DF 1 "general_operand" ""))] "" - " { ! if (! reload_in_progress && ! reload_completed ! && ! ia64_move_ok (operands[0], operands[1])) ! operands[1] = force_reg (DFmode, operands[1]); ! }") (define_insn "*movdf_internal" [(set (match_operand:DF 0 "destination_operand" "=f,f, Q,*r, f,*r,*r, m") (match_operand:DF 1 "general_operand" "fG,Q,fG,fG,*r,*r, m,*r"))] "ia64_move_ok (operands[0], operands[1])" "@ ! mov %0 = %F1 ! ldfd %0 = %1%P1 ! stfd %0 = %F1%P0 ! getf.d %0 = %F1 ! setf.d %0 = %1 ! mov %0 = %1 ! ld8%O1 %0 = %1%P1 ! st8%Q0 %0 = %1%P0" [(set_attr "itanium_class" "fmisc,fld,stf,frfr,tofr,ialu,ld,st")]) ;; With no offsettable memory references, we've got to have a scratch --- 764,843 ---- (match_operand:TI 1 "" "m")) (clobber (match_operand:TI 2 "register_operand" "=&r"))])] "" { unsigned int s_regno = REGNO (operands[2]); if (s_regno == REGNO (operands[0])) s_regno += 1; operands[2] = gen_rtx_REG (DImode, s_regno); ! }) (define_expand "reload_outti" [(parallel [(set (match_operand:TI 0 "" "=m") (match_operand:TI 1 "register_operand" "r")) (clobber (match_operand:TI 2 "register_operand" "=&r"))])] "" { unsigned int s_regno = REGNO (operands[2]); if (s_regno == REGNO (operands[1])) s_regno += 1; operands[2] = gen_rtx_REG (DImode, s_regno); ! }) ;; Floating Point Moves ;; ;; Note - Patterns for SF mode moves are compulsory, but ! ;; patterns for DF are optional, as GCC can synthesize them. (define_expand "movsf" [(set (match_operand:SF 0 "general_operand" "") (match_operand:SF 1 "general_operand" ""))] "" { ! rtx op1 = ia64_expand_move (operands[0], operands[1]); ! if (!op1) ! DONE; ! operands[1] = op1; ! }) (define_insn "*movsf_internal" [(set (match_operand:SF 0 "destination_operand" "=f,f, Q,*r, f,*r,*r, m") (match_operand:SF 1 "general_operand" "fG,Q,fG,fG,*r,*r, m,*r"))] "ia64_move_ok (operands[0], operands[1])" "@ ! mov %0 = %F1 ! ldfs %0 = %1%P1 ! stfs %0 = %F1%P0 ! getf.s %0 = %F1 ! setf.s %0 = %1 ! mov %0 = %1 ! ld4%O1 %0 = %1%P1 ! st4%Q0 %0 = %1%P0" [(set_attr "itanium_class" "fmisc,fld,stf,frfr,tofr,ialu,ld,st")]) (define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") (match_operand:DF 1 "general_operand" ""))] "" { ! rtx op1 = ia64_expand_move (operands[0], operands[1]); ! if (!op1) ! DONE; ! operands[1] = op1; ! }) (define_insn "*movdf_internal" [(set (match_operand:DF 0 "destination_operand" "=f,f, Q,*r, f,*r,*r, m") (match_operand:DF 1 "general_operand" "fG,Q,fG,fG,*r,*r, m,*r"))] "ia64_move_ok (operands[0], operands[1])" "@ ! mov %0 = %F1 ! ldfd %0 = %1%P1 ! stfd %0 = %F1%P0 ! getf.d %0 = %F1 ! setf.d %0 = %1 ! mov %0 = %1 ! ld8%O1 %0 = %1%P1 ! st8%Q0 %0 = %1%P0" [(set_attr "itanium_class" "fmisc,fld,stf,frfr,tofr,ialu,ld,st")]) ;; With no offsettable memory references, we've got to have a scratch *************** *** 693,699 **** [(set (match_operand:TF 0 "general_operand" "") (match_operand:TF 1 "general_operand" ""))] "INTEL_EXTENDED_IEEE_FORMAT" - " { /* We must support TFmode loads into general registers for stdarg/vararg and unprototyped calls. We split them into DImode loads for convenience. --- 846,851 ---- *************** *** 754,760 **** if (! ia64_move_ok (operands[0], operands[1])) operands[1] = force_reg (TFmode, operands[1]); } ! }") ;; ??? There's no easy way to mind volatile acquire/release semantics. --- 906,912 ---- if (! ia64_move_ok (operands[0], operands[1])) operands[1] = force_reg (TFmode, operands[1]); } ! }) ;; ??? There's no easy way to mind volatile acquire/release semantics. *************** *** 763,771 **** (match_operand:TF 1 "general_tfmode_operand" "fG,m,fG"))] "INTEL_EXTENDED_IEEE_FORMAT && ia64_move_ok (operands[0], operands[1])" "@ ! mov %0 = %F1 ! ldfe %0 = %1%P1 ! stfe %0 = %F1%P0" [(set_attr "itanium_class" "fmisc,fld,stf")]) ;; :::::::::::::::::::: --- 915,923 ---- (match_operand:TF 1 "general_tfmode_operand" "fG,m,fG"))] "INTEL_EXTENDED_IEEE_FORMAT && ia64_move_ok (operands[0], operands[1])" "@ ! mov %0 = %F1 ! ldfe %0 = %1%P1 ! stfe %0 = %F1%P0" [(set_attr "itanium_class" "fmisc,fld,stf")]) ;; :::::::::::::::::::: *************** *** 902,908 **** [(set (match_operand:DF 0 "register_operand" "=f") (float:DF (match_operand:DI 1 "register_operand" "f")))] "!INTEL_EXTENDED_IEEE_FORMAT" ! "fcvt.xf %0 = %1\;;;\;fnorm.d %0 = %0" [(set_attr "itanium_class" "fcvtfx")]) ;; ??? Suboptimal. This should be split somehow. --- 1054,1060 ---- [(set (match_operand:DF 0 "register_operand" "=f") (float:DF (match_operand:DI 1 "register_operand" "f")))] "!INTEL_EXTENDED_IEEE_FORMAT" ! "fcvt.xf %0 = %1\;;;\;%,fnorm.d %0 = %0" [(set_attr "itanium_class" "fcvtfx")]) ;; ??? Suboptimal. This should be split somehow. *************** *** 910,916 **** [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "f")))] "!INTEL_EXTENDED_IEEE_FORMAT" ! "fcvt.xf %0 = %1\;;;\;fnorm.s %0 = %0" [(set_attr "itanium_class" "fcvtfx")]) (define_insn "fix_truncsfdi2" --- 1062,1068 ---- [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "f")))] "!INTEL_EXTENDED_IEEE_FORMAT" ! "fcvt.xf %0 = %1\;;;\;%,fnorm.s %0 = %0" [(set_attr "itanium_class" "fcvtfx")]) (define_insn "fix_truncsfdi2" *************** *** 1033,1039 **** (match_operand:DI 2 "const_int_operand" "")) (match_operand:DI 3 "nonmemory_operand" ""))] "" - " { int width = INTVAL (operands[1]); int shift = INTVAL (operands[2]); --- 1185,1190 ---- *************** *** 1101,1107 **** operands[2] = GEN_INT (shift); #endif } ! }") (define_insn "*insv_internal" [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r") --- 1252,1258 ---- operands[2] = GEN_INT (shift); #endif } ! }) (define_insn "*insv_internal" [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r") *************** *** 1113,1119 **** "dep %0 = %3, %0, %2, %1" [(set_attr "itanium_class" "ishf")]) ! ;; Combine doesn't like to create bitfield insertions into zero. (define_insn "*depz_internal" [(set (match_operand:DI 0 "gr_register_operand" "=r") (and:DI (ashift:DI (match_operand:DI 1 "gr_register_operand" "r") --- 1264,1270 ---- "dep %0 = %3, %0, %2, %1" [(set_attr "itanium_class" "ishf")]) ! ;; Combine doesn't like to create bit-field insertions into zero. (define_insn "*depz_internal" [(set (match_operand:DI 0 "gr_register_operand" "=r") (and:DI (ashift:DI (match_operand:DI 1 "gr_register_operand" "r") *************** *** 1121,1131 **** (match_operand:DI 3 "const_int_operand" "n")))] "CONST_OK_FOR_M (INTVAL (operands[2])) && ia64_depz_field_mask (operands[3], operands[2]) > 0" - "* { operands[3] = GEN_INT (ia64_depz_field_mask (operands[3], operands[2])); ! return \"%,dep.z %0 = %1, %2, %3\"; ! }" [(set_attr "itanium_class" "ishf")]) (define_insn "shift_mix4left" --- 1272,1281 ---- (match_operand:DI 3 "const_int_operand" "n")))] "CONST_OK_FOR_M (INTVAL (operands[2])) && ia64_depz_field_mask (operands[3], operands[2]) > 0" { operands[3] = GEN_INT (ia64_depz_field_mask (operands[3], operands[2])); ! return "%,dep.z %0 = %1, %2, %3"; ! } [(set_attr "itanium_class" "ishf")]) (define_insn "shift_mix4left" *************** *** 1289,1295 **** (set (match_dup 0) (const_int 1)) (cond_exec (ne (match_dup 2) (const_int 0)) (set (match_dup 0) (const_int 0))) ! (set (match_dup 0) (unspec:BI [(match_dup 0)] 7))] "operands[3] = gen_rtx_REG (CCImode, REGNO (operands[1])); operands[4] = gen_rtx_REG (CCImode, REGNO (operands[2]));") --- 1439,1445 ---- (set (match_dup 0) (const_int 1)) (cond_exec (ne (match_dup 2) (const_int 0)) (set (match_dup 0) (const_int 0))) ! (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))] "operands[3] = gen_rtx_REG (CCImode, REGNO (operands[1])); operands[4] = gen_rtx_REG (CCImode, REGNO (operands[2]));") *************** *** 1305,1311 **** (set (match_dup 0) (const_int 0))) (cond_exec (eq (match_dup 1) (const_int 0)) (set (match_dup 0) (const_int 1))) ! (set (match_dup 0) (unspec:BI [(match_dup 0)] 7))] "") (define_insn "*cmpsi_and_0" --- 1455,1461 ---- (set (match_dup 0) (const_int 0))) (cond_exec (eq (match_dup 1) (const_int 0)) (set (match_dup 0) (const_int 1))) ! (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))] "") (define_insn "*cmpsi_and_0" *************** *** 1693,1699 **** (set (match_operand:CCI 4 "register_operand" "") (match_operand:CCI 5 "register_operand" "")) (set (match_operand:BI 6 "register_operand" "") ! (unspec:BI [(match_dup 6)] 7))] "REGNO (operands[3]) == REGNO (operands[0]) && REGNO (operands[4]) == REGNO (operands[0]) + 1 && REGNO (operands[4]) == REGNO (operands[2]) + 1 --- 1843,1849 ---- (set (match_operand:CCI 4 "register_operand" "") (match_operand:CCI 5 "register_operand" "")) (set (match_operand:BI 6 "register_operand" "") ! (unspec:BI [(match_dup 6)] UNSPEC_PRED_REL_MUTEX))] "REGNO (operands[3]) == REGNO (operands[0]) && REGNO (operands[4]) == REGNO (operands[0]) + 1 && REGNO (operands[4]) == REGNO (operands[2]) + 1 *************** *** 1729,1737 **** (match_operand:SI 2 "gr_reg_or_22bit_operand" "r,I,J")))] "" "@ ! add %0 = %1, %2 ! adds %0 = %2, %1 ! addl %0 = %2, %1" [(set_attr "itanium_class" "ialu")]) (define_insn "*addsi3_plus1" --- 1879,1887 ---- (match_operand:SI 2 "gr_reg_or_22bit_operand" "r,I,J")))] "" "@ ! add %0 = %1, %2 ! adds %0 = %2, %1 ! addl %0 = %2, %1" [(set_attr "itanium_class" "ialu")]) (define_insn "*addsi3_plus1" *************** *** 1811,1820 **** (neg:SI (match_dup 1)) (match_dup 1)))] "" ! " ! { ! operands[2] = gen_reg_rtx (BImode); ! }") (define_expand "sminsi3" [(set (match_dup 3) --- 1961,1967 ---- (neg:SI (match_dup 1)) (match_dup 1)))] "" ! { operands[2] = gen_reg_rtx (BImode); }) (define_expand "sminsi3" [(set (match_dup 3) *************** *** 1824,1833 **** (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "smaxsi3" [(set (match_dup 3) --- 1971,1977 ---- (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "smaxsi3" [(set (match_dup 3) *************** *** 1837,1846 **** (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "uminsi3" [(set (match_dup 3) --- 1981,1987 ---- (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "uminsi3" [(set (match_dup 3) *************** *** 1850,1859 **** (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "umaxsi3" [(set (match_dup 3) --- 1991,1997 ---- (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "umaxsi3" [(set (match_dup 3) *************** *** 1863,1881 **** (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "divsi3" [(set (match_operand:SI 0 "register_operand" "") (div:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op1_tf, op2_tf, op0_tf, op0_di, twon34; op0_tf = gen_reg_rtx (TFmode); op0_di = gen_reg_rtx (DImode); --- 2001,2016 ---- (if_then_else:SI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "divsi3" [(set (match_operand:SI 0 "register_operand" "") (div:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op1_tf, op2_tf, op0_tf, op0_di, twon34; + REAL_VALUE_TYPE twon34_r; op0_tf = gen_reg_rtx (TFmode); op0_di = gen_reg_rtx (DImode); *************** *** 1891,1918 **** expand_float (op2_tf, operands[2], 0); /* 2^-34 */ ! #if 0 ! twon34 = (CONST_DOUBLE_FROM_REAL_VALUE ! (REAL_VALUE_FROM_TARGET_SINGLE (0x2e800000), TFmode)); twon34 = force_reg (TFmode, twon34); - #else - twon34 = gen_reg_rtx (TFmode); - convert_move (twon34, force_const_mem (SFmode, CONST_DOUBLE_FROM_REAL_VALUE (REAL_VALUE_FROM_TARGET_SINGLE (0x2e800000), SFmode)), 0); - #endif emit_insn (gen_divsi3_internal (op0_tf, op1_tf, op2_tf, twon34)); emit_insn (gen_fix_trunctfdi2_alts (op0_di, op0_tf, const1_rtx)); emit_move_insn (operands[0], gen_lowpart (SImode, op0_di)); DONE; ! }") (define_expand "modsi3" [(set (match_operand:SI 0 "register_operand" "") (mod:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op2_neg, op1_di, div; --- 2026,2047 ---- expand_float (op2_tf, operands[2], 0); /* 2^-34 */ ! real_2expN (&twon34_r, -34); ! twon34 = CONST_DOUBLE_FROM_REAL_VALUE (twon34_r, TFmode); twon34 = force_reg (TFmode, twon34); emit_insn (gen_divsi3_internal (op0_tf, op1_tf, op2_tf, twon34)); emit_insn (gen_fix_trunctfdi2_alts (op0_di, op0_tf, const1_rtx)); emit_move_insn (operands[0], gen_lowpart (SImode, op0_di)); DONE; ! }) (define_expand "modsi3" [(set (match_operand:SI 0 "register_operand" "") (mod:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op2_neg, op1_di, div; *************** *** 1929,1944 **** emit_insn (gen_maddsi4 (operands[0], div, op2_neg, gen_lowpart (SImode, op1_di))); DONE; ! }") (define_expand "udivsi3" [(set (match_operand:SI 0 "register_operand" "") (udiv:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op1_tf, op2_tf, op0_tf, op0_di, twon34; op0_tf = gen_reg_rtx (TFmode); op0_di = gen_reg_rtx (DImode); --- 2058,2073 ---- emit_insn (gen_maddsi4 (operands[0], div, op2_neg, gen_lowpart (SImode, op1_di))); DONE; ! }) (define_expand "udivsi3" [(set (match_operand:SI 0 "register_operand" "") (udiv:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op1_tf, op2_tf, op0_tf, op0_di, twon34; + REAL_VALUE_TYPE twon34_r; op0_tf = gen_reg_rtx (TFmode); op0_di = gen_reg_rtx (DImode); *************** *** 1954,1981 **** expand_float (op2_tf, operands[2], 1); /* 2^-34 */ ! #if 0 ! twon34 = (CONST_DOUBLE_FROM_REAL_VALUE ! (REAL_VALUE_FROM_TARGET_SINGLE (0x2e800000), TFmode)); twon34 = force_reg (TFmode, twon34); - #else - twon34 = gen_reg_rtx (TFmode); - convert_move (twon34, force_const_mem (SFmode, CONST_DOUBLE_FROM_REAL_VALUE (REAL_VALUE_FROM_TARGET_SINGLE (0x2e800000), SFmode)), 0); - #endif emit_insn (gen_divsi3_internal (op0_tf, op1_tf, op2_tf, twon34)); emit_insn (gen_fixuns_trunctfdi2_alts (op0_di, op0_tf, const1_rtx)); emit_move_insn (operands[0], gen_lowpart (SImode, op0_di)); DONE; ! }") (define_expand "umodsi3" [(set (match_operand:SI 0 "register_operand" "") (umod:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op2_neg, op1_di, div; --- 2083,2104 ---- expand_float (op2_tf, operands[2], 1); /* 2^-34 */ ! real_2expN (&twon34_r, -34); ! twon34 = CONST_DOUBLE_FROM_REAL_VALUE (twon34_r, TFmode); twon34 = force_reg (TFmode, twon34); emit_insn (gen_divsi3_internal (op0_tf, op1_tf, op2_tf, twon34)); emit_insn (gen_fixuns_trunctfdi2_alts (op0_di, op0_tf, const1_rtx)); emit_move_insn (operands[0], gen_lowpart (SImode, op0_di)); DONE; ! }) (define_expand "umodsi3" [(set (match_operand:SI 0 "register_operand" "") (umod:SI (match_operand:SI 1 "general_operand" "") (match_operand:SI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op2_neg, op1_di, div; *************** *** 1992,1998 **** emit_insn (gen_maddsi4 (operands[0], div, op2_neg, gen_lowpart (SImode, op1_di))); DONE; ! }") (define_insn_and_split "divsi3_internal" [(set (match_operand:TF 0 "fr_register_operand" "=&f") --- 2115,2121 ---- emit_insn (gen_maddsi4 (operands[0], div, op2_neg, gen_lowpart (SImode, op1_di))); DONE; ! }) (define_insn_and_split "divsi3_internal" [(set (match_operand:TF 0 "fr_register_operand" "=&f") *************** *** 2002,2012 **** (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:BI 6 "=c")) (use (match_operand:TF 3 "fr_register_operand" "f"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 6) (const_int 0)) (parallel [(set (match_dup 4) (mult:TF (match_dup 1) (match_dup 0))) --- 2125,2136 ---- (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:BI 6 "=c")) (use (match_operand:TF 3 "fr_register_operand" "f"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 6) (const_int 0)) (parallel [(set (match_dup 4) (mult:TF (match_dup 1) (match_dup 0))) *************** *** 2047,2055 **** (match_operand:DI 2 "gr_reg_or_22bit_operand" "r,I,J")))] "" "@ ! add %0 = %1, %2 ! adds %0 = %2, %1 ! addl %0 = %2, %1" [(set_attr "itanium_class" "ialu")]) (define_insn "*adddi3_plus1" --- 2171,2179 ---- (match_operand:DI 2 "gr_reg_or_22bit_operand" "r,I,J")))] "" "@ ! add %0 = %1, %2 ! adds %0 = %2, %1 ! addl %0 = %2, %1" [(set_attr "itanium_class" "ialu")]) (define_insn "*adddi3_plus1" *************** *** 2198,2207 **** (neg:DI (match_dup 1)) (match_dup 1)))] "" ! " ! { ! operands[2] = gen_reg_rtx (BImode); ! }") (define_expand "smindi3" [(set (match_dup 3) --- 2322,2328 ---- (neg:DI (match_dup 1)) (match_dup 1)))] "" ! { operands[2] = gen_reg_rtx (BImode); }) (define_expand "smindi3" [(set (match_dup 3) *************** *** 2211,2220 **** (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "smaxdi3" [(set (match_dup 3) --- 2332,2338 ---- (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "smaxdi3" [(set (match_dup 3) *************** *** 2224,2233 **** (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "umindi3" [(set (match_dup 3) --- 2342,2348 ---- (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "umindi3" [(set (match_dup 3) *************** *** 2237,2246 **** (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "umaxdi3" [(set (match_dup 3) --- 2352,2358 ---- (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 2) (match_dup 1)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "umaxdi3" [(set (match_dup 3) *************** *** 2250,2259 **** (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! " ! { ! operands[3] = gen_reg_rtx (BImode); ! }") (define_expand "ffsdi2" [(set (match_dup 6) --- 2362,2368 ---- (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" ! { operands[3] = gen_reg_rtx (BImode); }) (define_expand "ffsdi2" [(set (match_dup 6) *************** *** 2261,2283 **** (set (match_dup 2) (plus:DI (match_dup 1) (const_int -1))) (set (match_dup 5) (const_int 0)) (set (match_dup 3) (xor:DI (match_dup 1) (match_dup 2))) ! (set (match_dup 4) (unspec:DI [(match_dup 3)] 8)) (set (match_operand:DI 0 "gr_register_operand" "") (if_then_else:DI (ne (match_dup 6) (const_int 0)) (match_dup 5) (match_dup 4)))] "" - " { operands[2] = gen_reg_rtx (DImode); operands[3] = gen_reg_rtx (DImode); operands[4] = gen_reg_rtx (DImode); operands[5] = gen_reg_rtx (DImode); operands[6] = gen_reg_rtx (BImode); ! }") (define_insn "*popcnt" [(set (match_operand:DI 0 "gr_register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "gr_register_operand" "r")] 8))] "" "popcnt %0 = %1" [(set_attr "itanium_class" "mmmul")]) --- 2370,2392 ---- (set (match_dup 2) (plus:DI (match_dup 1) (const_int -1))) (set (match_dup 5) (const_int 0)) (set (match_dup 3) (xor:DI (match_dup 1) (match_dup 2))) ! (set (match_dup 4) (unspec:DI [(match_dup 3)] UNSPEC_POPCNT)) (set (match_operand:DI 0 "gr_register_operand" "") (if_then_else:DI (ne (match_dup 6) (const_int 0)) (match_dup 5) (match_dup 4)))] "" { operands[2] = gen_reg_rtx (DImode); operands[3] = gen_reg_rtx (DImode); operands[4] = gen_reg_rtx (DImode); operands[5] = gen_reg_rtx (DImode); operands[6] = gen_reg_rtx (BImode); ! }) (define_insn "*popcnt" [(set (match_operand:DI 0 "gr_register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "gr_register_operand" "r")] ! UNSPEC_POPCNT))] "" "popcnt %0 = %1" [(set_attr "itanium_class" "mmmul")]) *************** *** 2286,2293 **** [(set (match_operand:DI 0 "register_operand" "") (div:DI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op1_tf, op2_tf, op0_tf; --- 2395,2401 ---- [(set (match_operand:DI 0 "register_operand" "") (div:DI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op1_tf, op2_tf, op0_tf; *************** *** 2303,2323 **** op2_tf = gen_reg_rtx (TFmode); expand_float (op2_tf, operands[2], 0); ! if (TARGET_INLINE_DIV_LAT) emit_insn (gen_divdi3_internal_lat (op0_tf, op1_tf, op2_tf)); else emit_insn (gen_divdi3_internal_thr (op0_tf, op1_tf, op2_tf)); emit_insn (gen_fix_trunctfdi2_alts (operands[0], op0_tf, const1_rtx)); DONE; ! }") (define_expand "moddi3" [(set (match_operand:DI 0 "register_operand" "") (mod:SI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op2_neg, div; --- 2411,2430 ---- op2_tf = gen_reg_rtx (TFmode); expand_float (op2_tf, operands[2], 0); ! if (TARGET_INLINE_INT_DIV_LAT) emit_insn (gen_divdi3_internal_lat (op0_tf, op1_tf, op2_tf)); else emit_insn (gen_divdi3_internal_thr (op0_tf, op1_tf, op2_tf)); emit_insn (gen_fix_trunctfdi2_alts (operands[0], op0_tf, const1_rtx)); DONE; ! }) (define_expand "moddi3" [(set (match_operand:DI 0 "register_operand" "") (mod:SI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op2_neg, div; *************** *** 2328,2341 **** emit_insn (gen_madddi4 (operands[0], div, op2_neg, operands[1])); DONE; ! }") (define_expand "udivdi3" [(set (match_operand:DI 0 "register_operand" "") (udiv:DI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op1_tf, op2_tf, op0_tf; --- 2435,2447 ---- emit_insn (gen_madddi4 (operands[0], div, op2_neg, operands[1])); DONE; ! }) (define_expand "udivdi3" [(set (match_operand:DI 0 "register_operand" "") (udiv:DI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op1_tf, op2_tf, op0_tf; *************** *** 2351,2371 **** op2_tf = gen_reg_rtx (TFmode); expand_float (op2_tf, operands[2], 1); ! if (TARGET_INLINE_DIV_LAT) emit_insn (gen_divdi3_internal_lat (op0_tf, op1_tf, op2_tf)); else emit_insn (gen_divdi3_internal_thr (op0_tf, op1_tf, op2_tf)); emit_insn (gen_fixuns_trunctfdi2_alts (operands[0], op0_tf, const1_rtx)); DONE; ! }") (define_expand "umoddi3" [(set (match_operand:DI 0 "register_operand" "") (umod:DI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx op2_neg, div; --- 2457,2476 ---- op2_tf = gen_reg_rtx (TFmode); expand_float (op2_tf, operands[2], 1); ! if (TARGET_INLINE_INT_DIV_LAT) emit_insn (gen_divdi3_internal_lat (op0_tf, op1_tf, op2_tf)); else emit_insn (gen_divdi3_internal_thr (op0_tf, op1_tf, op2_tf)); emit_insn (gen_fixuns_trunctfdi2_alts (operands[0], op0_tf, const1_rtx)); DONE; ! }) (define_expand "umoddi3" [(set (match_operand:DI 0 "register_operand" "") (umod:DI (match_operand:DI 1 "general_operand" "") (match_operand:DI 2 "general_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV" { rtx op2_neg, div; *************** *** 2376,2382 **** emit_insn (gen_madddi4 (operands[0], div, op2_neg, operands[1])); DONE; ! }") (define_insn_and_split "divdi3_internal_lat" [(set (match_operand:TF 0 "fr_register_operand" "=&f") --- 2481,2487 ---- emit_insn (gen_madddi4 (operands[0], div, op2_neg, operands[1])); DONE; ! }) (define_insn_and_split "divdi3_internal_lat" [(set (match_operand:TF 0 "fr_register_operand" "=&f") *************** *** 2386,2396 **** (clobber (match_scratch:TF 4 "=&f")) (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:BI 6 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 6) (const_int 0)) (parallel [(set (match_dup 3) --- 2491,2502 ---- (clobber (match_scratch:TF 4 "=&f")) (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:BI 6 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 6) (const_int 0)) (parallel [(set (match_dup 3) *************** *** 2444,2454 **** (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) --- 2550,2561 ---- (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_INT_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) *************** *** 2594,2610 **** [(set (match_operand:SF 0 "fr_register_operand" "") (div:SF (match_operand:SF 1 "fr_register_operand" "") (match_operand:SF 2 "fr_register_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx insn; ! if (TARGET_INLINE_DIV_LAT) insn = gen_divsf3_internal_lat (operands[0], operands[1], operands[2]); else insn = gen_divsf3_internal_thr (operands[0], operands[1], operands[2]); emit_insn (insn); DONE; ! }") (define_insn_and_split "divsf3_internal_lat" [(set (match_operand:SF 0 "fr_register_operand" "=&f") --- 2701,2716 ---- [(set (match_operand:SF 0 "fr_register_operand" "") (div:SF (match_operand:SF 1 "fr_register_operand" "") (match_operand:SF 2 "fr_register_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV" { rtx insn; ! if (TARGET_INLINE_FLOAT_DIV_LAT) insn = gen_divsf3_internal_lat (operands[0], operands[1], operands[2]); else insn = gen_divsf3_internal_thr (operands[0], operands[1], operands[2]); emit_insn (insn); DONE; ! }) (define_insn_and_split "divsf3_internal_lat" [(set (match_operand:SF 0 "fr_register_operand" "=&f") *************** *** 2613,2623 **** (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8))) ! (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) (mult:TF (match_dup 7) (match_dup 6))) --- 2719,2730 ---- (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8))) ! (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) (mult:TF (match_dup 7) (match_dup 6))) *************** *** 2653,2663 **** (set (match_dup 0) (float_truncate:SF (match_dup 6)))) ] ! "operands[6] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[7] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[9] = gen_rtx_REG (DFmode, REGNO (operands[0])); ! operands[10] = CONST1_RTX (TFmode);" [(set_attr "predicable" "no")]) (define_insn_and_split "divsf3_internal_thr" --- 2760,2772 ---- (set (match_dup 0) (float_truncate:SF (match_dup 6)))) ] ! { ! operands[6] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[7] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[9] = gen_rtx_REG (DFmode, REGNO (operands[0])); ! operands[10] = CONST1_RTX (TFmode); ! } [(set_attr "predicable" "no")]) (define_insn_and_split "divsf3_internal_thr" *************** *** 2667,2677 **** (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8))) ! (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) --- 2776,2787 ---- (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8))) ! (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) *************** *** 2704,2714 **** (plus:TF (mult:TF (match_dup 4) (match_dup 6)) (match_dup 3))))) ] ! "operands[6] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[7] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[9] = gen_rtx_REG (SFmode, REGNO (operands[3])); ! operands[10] = CONST1_RTX (TFmode);" [(set_attr "predicable" "no")]) ;; :::::::::::::::::::: --- 2814,2826 ---- (plus:TF (mult:TF (match_dup 4) (match_dup 6)) (match_dup 3))))) ] ! { ! operands[6] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[7] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[9] = gen_rtx_REG (SFmode, REGNO (operands[3])); ! operands[10] = CONST1_RTX (TFmode); ! } [(set_attr "predicable" "no")]) ;; :::::::::::::::::::: *************** *** 2898,2914 **** [(set (match_operand:DF 0 "fr_register_operand" "") (div:DF (match_operand:DF 1 "fr_register_operand" "") (match_operand:DF 2 "fr_register_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx insn; ! if (TARGET_INLINE_DIV_LAT) insn = gen_divdf3_internal_lat (operands[0], operands[1], operands[2]); else insn = gen_divdf3_internal_thr (operands[0], operands[1], operands[2]); emit_insn (insn); DONE; ! }") (define_insn_and_split "divdf3_internal_lat" [(set (match_operand:DF 0 "fr_register_operand" "=&f") --- 3010,3025 ---- [(set (match_operand:DF 0 "fr_register_operand" "") (div:DF (match_operand:DF 1 "fr_register_operand" "") (match_operand:DF 2 "fr_register_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV" { rtx insn; ! if (TARGET_INLINE_FLOAT_DIV_LAT) insn = gen_divdf3_internal_lat (operands[0], operands[1], operands[2]); else insn = gen_divdf3_internal_thr (operands[0], operands[1], operands[2]); emit_insn (insn); DONE; ! }) (define_insn_and_split "divdf3_internal_lat" [(set (match_operand:DF 0 "fr_register_operand" "=&f") *************** *** 2918,2928 **** (clobber (match_scratch:TF 4 "=&f")) (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:BI 6 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 7) (div:TF (const_int 1) (match_dup 9))) ! (set (match_dup 6) (unspec:BI [(match_dup 8) (match_dup 9)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 6) (const_int 0)) (parallel [(set (match_dup 3) (mult:TF (match_dup 8) (match_dup 7))) --- 3029,3040 ---- (clobber (match_scratch:TF 4 "=&f")) (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:BI 6 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 7) (div:TF (const_int 1) (match_dup 9))) ! (set (match_dup 6) (unspec:BI [(match_dup 8) (match_dup 9)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 6) (const_int 0)) (parallel [(set (match_dup 3) (mult:TF (match_dup 8) (match_dup 7))) *************** *** 2980,2991 **** (float_truncate:DF (plus:TF (mult:TF (match_dup 5) (match_dup 7)) (match_dup 3))))) ] ! "operands[7] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[9] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[10] = gen_rtx_REG (DFmode, REGNO (operands[3])); ! operands[11] = gen_rtx_REG (DFmode, REGNO (operands[5])); ! operands[12] = CONST1_RTX (TFmode);" [(set_attr "predicable" "no")]) (define_insn_and_split "divdf3_internal_thr" --- 3092,3105 ---- (float_truncate:DF (plus:TF (mult:TF (match_dup 5) (match_dup 7)) (match_dup 3))))) ] ! { ! operands[7] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[9] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[10] = gen_rtx_REG (DFmode, REGNO (operands[3])); ! operands[11] = gen_rtx_REG (DFmode, REGNO (operands[5])); ! operands[12] = CONST1_RTX (TFmode); ! } [(set_attr "predicable" "no")]) (define_insn_and_split "divdf3_internal_thr" *************** *** 2995,3005 **** (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:DF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8))) ! (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) --- 3109,3120 ---- (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:DF 4 "=f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8))) ! (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) *************** *** 3044,3054 **** (plus:DF (mult:DF (match_dup 4) (match_dup 0)) (match_dup 9)))) ] ! "operands[6] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[7] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[9] = gen_rtx_REG (DFmode, REGNO (operands[3])); ! operands[10] = CONST1_RTX (TFmode);" [(set_attr "predicable" "no")]) ;; :::::::::::::::::::: --- 3159,3171 ---- (plus:DF (mult:DF (match_dup 4) (match_dup 0)) (match_dup 9)))) ] ! { ! operands[6] = gen_rtx_REG (TFmode, REGNO (operands[0])); ! operands[7] = gen_rtx_REG (TFmode, REGNO (operands[1])); ! operands[8] = gen_rtx_REG (TFmode, REGNO (operands[2])); ! operands[9] = gen_rtx_REG (DFmode, REGNO (operands[3])); ! operands[10] = CONST1_RTX (TFmode); ! } [(set_attr "predicable" "no")]) ;; :::::::::::::::::::: *************** *** 3370,3386 **** [(set (match_operand:TF 0 "fr_register_operand" "") (div:TF (match_operand:TF 1 "fr_register_operand" "") (match_operand:TF 2 "fr_register_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV" ! " { rtx insn; ! if (TARGET_INLINE_DIV_LAT) insn = gen_divtf3_internal_lat (operands[0], operands[1], operands[2]); else insn = gen_divtf3_internal_thr (operands[0], operands[1], operands[2]); emit_insn (insn); DONE; ! }") (define_insn_and_split "divtf3_internal_lat" [(set (match_operand:TF 0 "fr_register_operand" "=&f") --- 3487,3502 ---- [(set (match_operand:TF 0 "fr_register_operand" "") (div:TF (match_operand:TF 1 "fr_register_operand" "") (match_operand:TF 2 "fr_register_operand" "")))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV" { rtx insn; ! if (TARGET_INLINE_FLOAT_DIV_LAT) insn = gen_divtf3_internal_lat (operands[0], operands[1], operands[2]); else insn = gen_divtf3_internal_thr (operands[0], operands[1], operands[2]); emit_insn (insn); DONE; ! }) (define_insn_and_split "divtf3_internal_lat" [(set (match_operand:TF 0 "fr_register_operand" "=&f") *************** *** 3391,3401 **** (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:TF 6 "=&f")) (clobber (match_scratch:BI 7 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 7) (unspec:BI [(match_dup 1) (match_dup 2)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 7) (const_int 0)) (parallel [(set (match_dup 3) --- 3507,3518 ---- (clobber (match_scratch:TF 5 "=&f")) (clobber (match_scratch:TF 6 "=&f")) (clobber (match_scratch:BI 7 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV_LAT" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 7) (unspec:BI [(match_dup 1) (match_dup 2)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 7) (const_int 0)) (parallel [(set (match_dup 3) *************** *** 3468,3478 **** (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=&f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)] 5)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) --- 3585,3596 ---- (clobber (match_scratch:TF 3 "=&f")) (clobber (match_scratch:TF 4 "=&f")) (clobber (match_scratch:BI 5 "=c"))] ! "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_FLOAT_DIV_THR" "#" "&& reload_completed" [(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2))) ! (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)] ! UNSPEC_FR_RECIP_APPROX)) (use (const_int 1))]) (cond_exec (ne (match_dup 5) (const_int 0)) (parallel [(set (match_dup 3) *************** *** 3546,3552 **** (match_operand:TF 3 "fr_register_operand" "f"))) (set (match_operand:BI 1 "register_operand" "=c") (unspec:BI [(match_operand:TF 2 "fr_register_operand" "f") ! (match_dup 3)] 5)) (use (match_operand:SI 4 "const_int_operand" ""))] "INTEL_EXTENDED_IEEE_FORMAT" "frcpa.s%4 %0, %1 = %2, %3" --- 3664,3670 ---- (match_operand:TF 3 "fr_register_operand" "f"))) (set (match_operand:BI 1 "register_operand" "=c") (unspec:BI [(match_operand:TF 2 "fr_register_operand" "f") ! (match_dup 3)] UNSPEC_FR_RECIP_APPROX)) (use (match_operand:SI 4 "const_int_operand" ""))] "INTEL_EXTENDED_IEEE_FORMAT" "frcpa.s%4 %0, %1 = %2, %3" *************** *** 3564,3570 **** (ashift:SI (match_operand:SI 1 "gr_register_operand" "") (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))] "" - " { if (GET_CODE (operands[2]) != CONST_INT) { --- 3682,3687 ---- *************** *** 3574,3580 **** emit_insn (gen_zero_extendsidi2 (subshift, operands[2])); operands[2] = subshift; } ! }") (define_insn "*ashlsi3_internal" [(set (match_operand:SI 0 "gr_register_operand" "=r,r,r") --- 3691,3697 ---- emit_insn (gen_zero_extendsidi2 (subshift, operands[2])); operands[2] = subshift; } ! }) (define_insn "*ashlsi3_internal" [(set (match_operand:SI 0 "gr_register_operand" "=r,r,r") *************** *** 3592,3598 **** (ashiftrt:SI (match_operand:SI 1 "gr_register_operand" "") (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))] "" - " { rtx subtarget = gen_reg_rtx (DImode); if (GET_CODE (operands[2]) == CONST_INT) --- 3709,3714 ---- *************** *** 3607,3620 **** } emit_move_insn (gen_lowpart (DImode, operands[0]), subtarget); DONE; ! }") (define_expand "lshrsi3" [(set (match_operand:SI 0 "gr_register_operand" "") (lshiftrt:SI (match_operand:SI 1 "gr_register_operand" "") (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))] "" - " { rtx subtarget = gen_reg_rtx (DImode); if (GET_CODE (operands[2]) == CONST_INT) --- 3723,3735 ---- } emit_move_insn (gen_lowpart (DImode, operands[0]), subtarget); DONE; ! }) (define_expand "lshrsi3" [(set (match_operand:SI 0 "gr_register_operand" "") (lshiftrt:SI (match_operand:SI 1 "gr_register_operand" "") (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))] "" { rtx subtarget = gen_reg_rtx (DImode); if (GET_CODE (operands[2]) == CONST_INT) *************** *** 3629,3635 **** } emit_move_insn (gen_lowpart (DImode, operands[0]), subtarget); DONE; ! }") ;; Use mix4.r/shr to implement rotrsi3. We only get 32 bits of valid result ;; here, instead of 64 like the patterns above. Keep the pattern together --- 3744,3750 ---- } emit_move_insn (gen_lowpart (DImode, operands[0]), subtarget); DONE; ! }) ;; Use mix4.r/shr to implement rotrsi3. We only get 32 bits of valid result ;; here, instead of 64 like the patterns above. Keep the pattern together *************** *** 3640,3646 **** (rotatert:SI (match_operand:SI 1 "gr_register_operand" "") (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))] "" - " { if (GET_MODE (operands[2]) != VOIDmode) { --- 3755,3760 ---- *************** *** 3648,3654 **** emit_insn (gen_zero_extendsidi2 (tmp, operands[2])); operands[2] = tmp; } ! }") (define_insn_and_split "*rotrsi3_internal" [(set (match_operand:SI 0 "gr_register_operand" "=&r") --- 3762,3768 ---- emit_insn (gen_zero_extendsidi2 (tmp, operands[2])); operands[2] = tmp; } ! }) (define_insn_and_split "*rotrsi3_internal" [(set (match_operand:SI 0 "gr_register_operand" "=&r") *************** *** 3669,3675 **** (rotate:SI (match_operand:SI 1 "gr_register_operand" "") (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))] "" - " { if (! shift_32bit_count_operand (operands[2], SImode)) { --- 3783,3788 ---- *************** *** 3678,3684 **** emit_insn (gen_rotrsi3 (operands[0], operands[1], tmp)); DONE; } ! }") (define_insn_and_split "*rotlsi3_internal" [(set (match_operand:SI 0 "gr_register_operand" "=r") --- 3791,3797 ---- emit_insn (gen_rotrsi3 (operands[0], operands[1], tmp)); DONE; } ! }) (define_insn_and_split "*rotlsi3_internal" [(set (match_operand:SI 0 "gr_register_operand" "=r") *************** *** 3692,3699 **** (ashift:DI (zero_extend:DI (match_dup 1)) (const_int 32)))) (set (match_dup 3) (lshiftrt:DI (match_dup 3) (match_dup 2)))] ! "operands[3] = gen_rtx_REG (DImode, REGNO (operands[0])); ! operands[2] = GEN_INT (32 - INTVAL (operands[2]));") ;; :::::::::::::::::::: ;; :: --- 3805,3814 ---- (ashift:DI (zero_extend:DI (match_dup 1)) (const_int 32)))) (set (match_dup 3) (lshiftrt:DI (match_dup 3) (match_dup 2)))] ! { ! operands[3] = gen_rtx_REG (DImode, REGNO (operands[0])); ! operands[2] = GEN_INT (32 - INTVAL (operands[2])); ! }) ;; :::::::::::::::::::: ;; :: *************** *** 3776,3786 **** (rotatert:DI (match_operand:DI 1 "gr_register_operand" "") (match_operand:DI 2 "nonmemory_operand" "")))] "" - " { if (! shift_count_operand (operands[2], DImode)) FAIL; ! }") (define_insn "*rotrdi3_internal" [(set (match_operand:DI 0 "gr_register_operand" "=r") --- 3891,3900 ---- (rotatert:DI (match_operand:DI 1 "gr_register_operand" "") (match_operand:DI 2 "nonmemory_operand" "")))] "" { if (! shift_count_operand (operands[2], DImode)) FAIL; ! }) (define_insn "*rotrdi3_internal" [(set (match_operand:DI 0 "gr_register_operand" "=r") *************** *** 3795,3805 **** (rotate:DI (match_operand:DI 1 "gr_register_operand" "") (match_operand:DI 2 "nonmemory_operand" "")))] "" - " { if (! shift_count_operand (operands[2], DImode)) FAIL; ! }") (define_insn "*rotldi3_internal" [(set (match_operand:DI 0 "gr_register_operand" "=r") --- 3909,3918 ---- (rotate:DI (match_operand:DI 1 "gr_register_operand" "") (match_operand:DI 2 "nonmemory_operand" "")))] "" { if (! shift_count_operand (operands[2], DImode)) FAIL; ! }) (define_insn "*rotldi3_internal" [(set (match_operand:DI 0 "gr_register_operand" "=r") *************** *** 3900,3971 **** (compare (match_operand:BI 0 "register_operand" "") (match_operand:BI 1 "const_int_operand" "")))] "" - " { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmpsi" [(set (cc0) (compare (match_operand:SI 0 "gr_register_operand" "") (match_operand:SI 1 "gr_reg_or_8bit_and_adjusted_operand" "")))] "" - " { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmpdi" [(set (cc0) (compare (match_operand:DI 0 "gr_register_operand" "") (match_operand:DI 1 "gr_reg_or_8bit_and_adjusted_operand" "")))] "" - " { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmpsf" [(set (cc0) (compare (match_operand:SF 0 "fr_reg_or_fp01_operand" "") (match_operand:SF 1 "fr_reg_or_fp01_operand" "")))] "" - " { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmpdf" [(set (cc0) (compare (match_operand:DF 0 "fr_reg_or_fp01_operand" "") (match_operand:DF 1 "fr_reg_or_fp01_operand" "")))] "" - " { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmptf" [(set (cc0) (compare (match_operand:TF 0 "tfreg_or_fp01_operand" "") (match_operand:TF 1 "tfreg_or_fp01_operand" "")))] "INTEL_EXTENDED_IEEE_FORMAT" - " { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }") (define_insn "*cmpsi_normal" [(set (match_operand:BI 0 "register_operand" "=c") --- 4013,4078 ---- (compare (match_operand:BI 0 "register_operand" "") (match_operand:BI 1 "const_int_operand" "")))] "" { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmpsi" [(set (cc0) (compare (match_operand:SI 0 "gr_register_operand" "") (match_operand:SI 1 "gr_reg_or_8bit_and_adjusted_operand" "")))] "" { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmpdi" [(set (cc0) (compare (match_operand:DI 0 "gr_register_operand" "") (match_operand:DI 1 "gr_reg_or_8bit_and_adjusted_operand" "")))] "" { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmpsf" [(set (cc0) (compare (match_operand:SF 0 "fr_reg_or_fp01_operand" "") (match_operand:SF 1 "fr_reg_or_fp01_operand" "")))] "" { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmpdf" [(set (cc0) (compare (match_operand:DF 0 "fr_reg_or_fp01_operand" "") (match_operand:DF 1 "fr_reg_or_fp01_operand" "")))] "" { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmptf" [(set (cc0) (compare (match_operand:TF 0 "tfreg_or_fp01_operand" "") (match_operand:TF 1 "tfreg_or_fp01_operand" "")))] "INTEL_EXTENDED_IEEE_FORMAT" { ia64_compare_op0 = operands[0]; ia64_compare_op1 = operands[1]; DONE; ! }) (define_insn "*cmpsi_normal" [(set (match_operand:BI 0 "register_operand" "=c") *************** *** 4197,4203 **** (use (match_operand 3 "" "")) ; loop level (use (match_operand 4 "" ""))] ; label "" - " { /* Only use cloop on innermost loops. */ if (INTVAL (operands[3]) > 1) --- 4304,4309 ---- *************** *** 4205,4211 **** emit_jump_insn (gen_doloop_end_internal (gen_rtx_REG (DImode, AR_LC_REGNUM), operands[4])); DONE; ! }") (define_insn "doloop_end_internal" [(set (pc) (if_then_else (ne (match_operand:DI 0 "ar_lc_reg_operand" "") --- 4311,4317 ---- emit_jump_insn (gen_doloop_end_internal (gen_rtx_REG (DImode, AR_LC_REGNUM), operands[4])); DONE; ! }) (define_insn "doloop_end_internal" [(set (pc) (if_then_else (ne (match_operand:DI 0 "ar_lc_reg_operand" "") *************** *** 4213,4220 **** (label_ref (match_operand 1 "" "")) (pc))) (set (match_dup 0) (if_then_else:DI (ne (match_dup 0) (const_int 0)) ! (match_dup 0) ! (plus:DI (match_dup 0) (const_int -1))))] "" "br.cloop.sptk.few %l1" [(set_attr "itanium_class" "br") --- 4319,4326 ---- (label_ref (match_operand 1 "" "")) (pc))) (set (match_dup 0) (if_then_else:DI (ne (match_dup 0) (const_int 0)) ! (plus:DI (match_dup 0) (const_int -1)) ! (match_dup 0)))] "" "br.cloop.sptk.few %l1" [(set_attr "itanium_class" "br") *************** *** 4338,4349 **** "c,c,c,c,c,c,c,c,c,c,c,c,c,c,c") (const_int 0)]) (match_operand:DI 2 "move_operand" ! "rim, *f, *b,*d*e,rim,rim, rim,*f,*b,*d*e,rO,*f,rOQ,rO, rK") (match_operand:DI 3 "move_operand" ! "rim,rim,rim, rim, *f, *b,*d*e,*f,*b,*d*e,rO,*f,rOQ,rO, rK")))] "ia64_move_ok (operands[0], operands[2]) && ia64_move_ok (operands[0], operands[3])" ! "* abort ();" [(set_attr "predicable" "no")]) (define_split --- 4444,4455 ---- "c,c,c,c,c,c,c,c,c,c,c,c,c,c,c") (const_int 0)]) (match_operand:DI 2 "move_operand" ! "rnm, *f, *b,*d*e,rnm,rnm, rnm,*f,*b,*d*e,rO,*f,rOQ,rO, rK") (match_operand:DI 3 "move_operand" ! "rnm,rnm,rnm, rnm, *f, *b,*d*e,*f,*b,*d*e,rO,*f,rOQ,rO, rK")))] "ia64_move_ok (operands[0], operands[2]) && ia64_move_ok (operands[0], operands[3])" ! { abort (); } [(set_attr "predicable" "no")]) (define_split *************** *** 4356,4369 **** (match_operand 3 "move_operand" "")))] "reload_completed" [(const_int 0)] - " { rtx tmp; if (! rtx_equal_p (operands[0], operands[2])) { tmp = gen_rtx_SET (VOIDmode, operands[0], operands[2]); tmp = gen_rtx_COND_EXEC (VOIDmode, operands[4], tmp); emit_insn (tmp); } if (! rtx_equal_p (operands[0], operands[3])) { --- 4462,4478 ---- (match_operand 3 "move_operand" "")))] "reload_completed" [(const_int 0)] { rtx tmp; + int emitted_something; + + emitted_something = 0; if (! rtx_equal_p (operands[0], operands[2])) { tmp = gen_rtx_SET (VOIDmode, operands[0], operands[2]); tmp = gen_rtx_COND_EXEC (VOIDmode, operands[4], tmp); emit_insn (tmp); + emitted_something = 1; } if (! rtx_equal_p (operands[0], operands[3])) { *************** *** 4373,4381 **** gen_rtx_SET (VOIDmode, operands[0], operands[3])); emit_insn (tmp); } DONE; ! }") ;; Absolute value pattern. --- 4482,4493 ---- gen_rtx_SET (VOIDmode, operands[0], operands[3])); emit_insn (tmp); + emitted_something = 1; } + if (! emitted_something) + emit_note (NULL, NOTE_INSN_DELETED); DONE; ! }) ;; Absolute value pattern. *************** *** 4422,4432 **** (cond_exec (match_dup 5) (set (match_dup 0) (match_dup 3)))] - " { operands[5] = gen_rtx_fmt_ee (GET_CODE (operands[4]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! }") ;; ;; SImode if_then_else patterns. --- 4534,4543 ---- (cond_exec (match_dup 5) (set (match_dup 0) (match_dup 3)))] { operands[5] = gen_rtx_fmt_ee (GET_CODE (operands[4]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! }) ;; ;; SImode if_then_else patterns. *************** *** 4439,4450 **** [(match_operand:BI 1 "register_operand" "c,c,c,c,c,c,c,c,c") (const_int 0)]) (match_operand:SI 2 "move_operand" ! "0,0,0,rim*f,rO,rO,rim*f,rO,rO") (match_operand:SI 3 "move_operand" ! "rim*f,rO,rO,0,0,0,rim*f,rO,rO")))] "ia64_move_ok (operands[0], operands[2]) && ia64_move_ok (operands[0], operands[3])" ! "* abort ();" [(set_attr "predicable" "no")]) (define_insn "*abssi2_internal" --- 4550,4561 ---- [(match_operand:BI 1 "register_operand" "c,c,c,c,c,c,c,c,c") (const_int 0)]) (match_operand:SI 2 "move_operand" ! "0,0,0,rnm*f,rO,rO,rnm*f,rO,rO") (match_operand:SI 3 "move_operand" ! "rnm*f,rO,rO,0,0,0,rnm*f,rO,rO")))] "ia64_move_ok (operands[0], operands[2]) && ia64_move_ok (operands[0], operands[3])" ! { abort (); } [(set_attr "predicable" "no")]) (define_insn "*abssi2_internal" *************** *** 4490,4500 **** (cond_exec (match_dup 5) (set (match_dup 0) (match_dup 3)))] - " { operands[5] = gen_rtx_fmt_ee (GET_CODE (operands[4]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! }") (define_insn_and_split "*cond_opsi2_internal" [(set (match_operand:SI 0 "gr_register_operand" "=r") --- 4601,4610 ---- (cond_exec (match_dup 5) (set (match_dup 0) (match_dup 3)))] { operands[5] = gen_rtx_fmt_ee (GET_CODE (operands[4]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! }) (define_insn_and_split "*cond_opsi2_internal" [(set (match_operand:SI 0 "gr_register_operand" "=r") *************** *** 4515,4525 **** (cond_exec (match_dup 7) (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 3) (match_dup 4)])))] - " { operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[6]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! }" [(set_attr "itanium_class" "ialu") (set_attr "predicable" "no")]) --- 4625,4634 ---- (cond_exec (match_dup 7) (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 3) (match_dup 4)])))] { operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[6]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! } [(set_attr "itanium_class" "ialu") (set_attr "predicable" "no")]) *************** *** 4543,4553 **** (cond_exec (match_dup 7) (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 4) (match_dup 3)])))] - " { operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[6]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! }" [(set_attr "itanium_class" "ialu") (set_attr "predicable" "no")]) --- 4652,4661 ---- (cond_exec (match_dup 7) (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 4) (match_dup 3)])))] { operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[6]) == NE ? EQ : NE, VOIDmode, operands[1], const0_rtx); ! } [(set_attr "itanium_class" "ialu") (set_attr "predicable" "no")]) *************** *** 4574,4584 **** (use (match_operand 2 "" "")) (use (match_operand 3 "" ""))] "" - " { ! ia64_expand_call (NULL_RTX, operands[0], operands[2], 0); DONE; ! }") (define_expand "sibcall" [(use (match_operand:DI 0 "" "")) --- 4682,4691 ---- (use (match_operand 2 "" "")) (use (match_operand 3 "" ""))] "" { ! ia64_expand_call (NULL_RTX, operands[0], operands[2], false); DONE; ! }) (define_expand "sibcall" [(use (match_operand:DI 0 "" "")) *************** *** 4586,4596 **** (use (match_operand 2 "" "")) (use (match_operand 3 "" ""))] "" - " { ! ia64_expand_call (NULL_RTX, operands[0], operands[2], 1); DONE; ! }") ;; Subroutine call instruction returning a value. Operand 0 is the hard ;; register in which the value is returned. There are three more operands, --- 4693,4702 ---- (use (match_operand 2 "" "")) (use (match_operand 3 "" ""))] "" { ! ia64_expand_call (NULL_RTX, operands[0], operands[2], true); DONE; ! }) ;; Subroutine call instruction returning a value. Operand 0 is the hard ;; register in which the value is returned. There are three more operands, *************** *** 4606,4616 **** (use (match_operand 3 "" "")) (use (match_operand 4 "" ""))] "" - " { ! ia64_expand_call (operands[0], operands[1], operands[3], 0); DONE; ! }") (define_expand "sibcall_value" [(use (match_operand 0 "" "")) --- 4712,4721 ---- (use (match_operand 3 "" "")) (use (match_operand 4 "" ""))] "" { ! ia64_expand_call (operands[0], operands[1], operands[3], false); DONE; ! }) (define_expand "sibcall_value" [(use (match_operand 0 "" "")) *************** *** 4619,4629 **** (use (match_operand 3 "" "")) (use (match_operand 4 "" ""))] "" - " { ! ia64_expand_call (operands[0], operands[1], operands[3], 1); DONE; ! }") ;; Call subroutine returning any type. --- 4724,4733 ---- (use (match_operand 3 "" "")) (use (match_operand 4 "" ""))] "" { ! ia64_expand_call (operands[0], operands[1], operands[3], true); DONE; ! }) ;; Call subroutine returning any type. *************** *** 4633,4639 **** (match_operand 1 "" "") (match_operand 2 "" "")])] "" - " { int i; --- 4737,4742 ---- *************** *** 4652,4712 **** emit_insn (gen_blockage ()); DONE; ! }") ! (define_insn "call_nopic" ! [(call (mem:DI (match_operand:DI 0 "call_operand" "b,i")) ! (match_operand 1 "" "")) ! (clobber (match_operand:DI 2 "register_operand" "=b,b"))] "" ! "br.call%+.many %2 = %0" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "call_value_nopic" [(set (match_operand 0 "" "") ! (call (mem:DI (match_operand:DI 1 "call_operand" "b,i")) ! (match_operand 2 "" ""))) ! (clobber (match_operand:DI 3 "register_operand" "=b,b"))] "" ! "br.call%+.many %3 = %1" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "sibcall_nopic" ! [(call (mem:DI (match_operand:DI 0 "call_operand" "b,i")) ! (match_operand 1 "" "")) ! (use (match_operand:DI 2 "register_operand" "=b,b")) ! (use (match_operand:DI 3 "ar_pfs_reg_operand" ""))] "" "br%+.many %0" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "call_pic" ! [(call (mem:DI (match_operand:DI 0 "call_operand" "b,i")) ! (match_operand 1 "" "")) ! (use (unspec [(reg:DI 1)] 9)) ! (clobber (match_operand:DI 2 "register_operand" "=b,b"))] "" ! "br.call%+.many %2 = %0" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "call_value_pic" [(set (match_operand 0 "" "") ! (call (mem:DI (match_operand:DI 1 "call_operand" "b,i")) ! (match_operand 2 "" ""))) ! (use (unspec [(reg:DI 1)] 9)) ! (clobber (match_operand:DI 3 "register_operand" "=b,b"))] "" ! "br.call%+.many %3 = %1" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "sibcall_pic" ! [(call (mem:DI (match_operand:DI 0 "call_operand" "bi")) ! (match_operand 1 "" "")) ! (use (unspec [(reg:DI 1)] 9)) ! (use (match_operand:DI 2 "register_operand" "=b")) ! (use (match_operand:DI 3 "ar_pfs_reg_operand" ""))] "" ! "br%+.many %0" [(set_attr "itanium_class" "br")]) (define_insn "return_internal" --- 4755,4881 ---- emit_insn (gen_blockage ()); DONE; ! }) ! (define_insn "call_nogp" ! [(call (mem:DI (match_operand:DI 0 "call_operand" "?b,i")) ! (const_int 0)) ! (clobber (match_operand:DI 1 "register_operand" "=b,b"))] "" ! "br.call%+.many %1 = %0" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "call_value_nogp" [(set (match_operand 0 "" "") ! (call (mem:DI (match_operand:DI 1 "call_operand" "?b,i")) ! (const_int 0))) ! (clobber (match_operand:DI 2 "register_operand" "=b,b"))] "" ! "br.call%+.many %2 = %1" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "sibcall_nogp" ! [(call (mem:DI (match_operand:DI 0 "call_operand" "?b,i")) ! (const_int 0))] "" "br%+.many %0" [(set_attr "itanium_class" "br,scall")]) ! (define_insn "call_gp" ! [(call (mem (match_operand 0 "call_operand" "?r,i")) ! (const_int 1)) ! (clobber (match_operand:DI 1 "register_operand" "=b,b")) ! (clobber (match_scratch:DI 2 "=&r,X")) ! (clobber (match_scratch:DI 3 "=b,X"))] "" ! "#" [(set_attr "itanium_class" "br,scall")]) ! ;; Irritatingly, we don't have access to INSN within the split body. ! ;; See commentary in ia64_split_call as to why these aren't peep2. ! (define_split ! [(call (mem (match_operand 0 "call_operand" "")) ! (const_int 1)) ! (clobber (match_operand:DI 1 "register_operand" "")) ! (clobber (match_scratch:DI 2 "")) ! (clobber (match_scratch:DI 3 ""))] ! "reload_completed && find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(const_int 0)] ! { ! ia64_split_call (NULL_RTX, operands[0], operands[1], operands[2], ! operands[3], true, false); ! DONE; ! }) ! ! (define_split ! [(call (mem (match_operand 0 "call_operand" "")) ! (const_int 1)) ! (clobber (match_operand:DI 1 "register_operand" "")) ! (clobber (match_scratch:DI 2 "")) ! (clobber (match_scratch:DI 3 ""))] ! "reload_completed" ! [(const_int 0)] ! { ! ia64_split_call (NULL_RTX, operands[0], operands[1], operands[2], ! operands[3], false, false); ! DONE; ! }) ! ! (define_insn "call_value_gp" [(set (match_operand 0 "" "") ! (call (mem:DI (match_operand:DI 1 "call_operand" "?r,i")) ! (const_int 1))) ! (clobber (match_operand:DI 2 "register_operand" "=b,b")) ! (clobber (match_scratch:DI 3 "=&r,X")) ! (clobber (match_scratch:DI 4 "=b,X"))] "" ! "#" [(set_attr "itanium_class" "br,scall")]) ! (define_split ! [(set (match_operand 0 "" "") ! (call (mem:DI (match_operand:DI 1 "call_operand" "")) ! (const_int 1))) ! (clobber (match_operand:DI 2 "register_operand" "")) ! (clobber (match_scratch:DI 3 "")) ! (clobber (match_scratch:DI 4 ""))] ! "reload_completed && find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(const_int 0)] ! { ! ia64_split_call (operands[0], operands[1], operands[2], operands[3], ! operands[4], true, false); ! DONE; ! }) ! ! (define_split ! [(set (match_operand 0 "" "") ! (call (mem:DI (match_operand:DI 1 "call_operand" "")) ! (const_int 1))) ! (clobber (match_operand:DI 2 "register_operand" "")) ! (clobber (match_scratch:DI 3 "")) ! (clobber (match_scratch:DI 4 ""))] ! "reload_completed" ! [(const_int 0)] ! { ! ia64_split_call (operands[0], operands[1], operands[2], operands[3], ! operands[4], false, false); ! DONE; ! }) ! ! (define_insn_and_split "sibcall_gp" ! [(call (mem:DI (match_operand:DI 0 "call_operand" "?r,i")) ! (const_int 1)) ! (clobber (match_scratch:DI 1 "=&r,X")) ! (clobber (match_scratch:DI 2 "=b,X"))] "" ! "#" ! "reload_completed" ! [(const_int 0)] ! { ! ia64_split_call (NULL_RTX, operands[0], NULL_RTX, operands[1], ! operands[2], true, true); ! DONE; ! } [(set_attr "itanium_class" "br")]) (define_insn "return_internal" *************** *** 4817,4845 **** (define_expand "prologue" [(const_int 1)] "" - " { ia64_expand_prologue (); DONE; ! }") (define_expand "epilogue" [(return)] "" - " { ia64_expand_epilogue (0); DONE; ! }") (define_expand "sibcall_epilogue" [(return)] "" - " { ia64_expand_epilogue (1); DONE; ! }") ;; This prevents the scheduler from moving the SP decrement past FP-relative ;; stack accesses. This is the same as adddi3 plus the extra set. --- 4986,5011 ---- (define_expand "prologue" [(const_int 1)] "" { ia64_expand_prologue (); DONE; ! }) (define_expand "epilogue" [(return)] "" { ia64_expand_epilogue (0); DONE; ! }) (define_expand "sibcall_epilogue" [(return)] "" { ia64_expand_epilogue (1); DONE; ! }) ;; This prevents the scheduler from moving the SP decrement past FP-relative ;; stack accesses. This is the same as adddi3 plus the extra set. *************** *** 4852,4860 **** (match_dup 3))] "" "@ ! add %0 = %1, %2 ! adds %0 = %2, %1 ! addl %0 = %2, %1" [(set_attr "itanium_class" "ialu")]) ;; This prevents the scheduler from moving the SP restore past FP-relative --- 5018,5026 ---- (match_dup 3))] "" "@ ! add %0 = %1, %2 ! adds %0 = %2, %1 ! addl %0 = %2, %1" [(set_attr "itanium_class" "ialu")]) ;; This prevents the scheduler from moving the SP restore past FP-relative *************** *** 4868,4878 **** "mov %0 = %1" [(set_attr "itanium_class" "ialu")]) ;; Allocate a new register frame. (define_insn "alloc" [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec_volatile:DI [(const_int 0)] 0)) (use (match_operand:DI 1 "const_int_operand" "i")) (use (match_operand:DI 2 "const_int_operand" "i")) (use (match_operand:DI 3 "const_int_operand" "i")) --- 5034,5054 ---- "mov %0 = %1" [(set_attr "itanium_class" "ialu")]) + ;; As USE insns aren't meaningful after reload, this is used instead + ;; to prevent deleting instructions setting registers for EH handling + (define_insn "prologue_use" + [(unspec:DI [(match_operand:DI 0 "register_operand" "")] + UNSPEC_PROLOGUE_USE)] + "" + "" + [(set_attr "itanium_class" "ignore") + (set_attr "predicable" "no")]) + ;; Allocate a new register frame. (define_insn "alloc" [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec_volatile:DI [(const_int 0)] UNSPECV_ALLOC)) (use (match_operand:DI 1 "const_int_operand" "i")) (use (match_operand:DI 2 "const_int_operand" "i")) (use (match_operand:DI 3 "const_int_operand" "i")) *************** *** 4886,4892 **** (define_expand "gr_spill" [(parallel [(set (match_operand:DI 0 "memory_operand" "=m") (unspec:DI [(match_operand:DI 1 "register_operand" "r") ! (match_operand:DI 2 "const_int_operand" "")] 1)) (clobber (match_dup 3))])] "" "operands[3] = gen_rtx_REG (DImode, AR_UNAT_REGNUM);") --- 5062,5069 ---- (define_expand "gr_spill" [(parallel [(set (match_operand:DI 0 "memory_operand" "=m") (unspec:DI [(match_operand:DI 1 "register_operand" "r") ! (match_operand:DI 2 "const_int_operand" "")] ! UNSPEC_GR_SPILL)) (clobber (match_dup 3))])] "" "operands[3] = gen_rtx_REG (DImode, AR_UNAT_REGNUM);") *************** *** 4894,4913 **** (define_insn "gr_spill_internal" [(set (match_operand:DI 0 "memory_operand" "=m") (unspec:DI [(match_operand:DI 1 "register_operand" "r") ! (match_operand:DI 2 "const_int_operand" "")] 1)) (clobber (match_operand:DI 3 "register_operand" ""))] "" - "* { ! return \".mem.offset %2, 0\;%,st8.spill %0 = %1%P0\"; ! }" [(set_attr "itanium_class" "st")]) ;; Reads ar.unat (define_expand "gr_restore" [(parallel [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "memory_operand" "m") ! (match_operand:DI 2 "const_int_operand" "")] 2)) (use (match_dup 3))])] "" "operands[3] = gen_rtx_REG (DImode, AR_UNAT_REGNUM);") --- 5071,5093 ---- (define_insn "gr_spill_internal" [(set (match_operand:DI 0 "memory_operand" "=m") (unspec:DI [(match_operand:DI 1 "register_operand" "r") ! (match_operand:DI 2 "const_int_operand" "")] ! UNSPEC_GR_SPILL)) (clobber (match_operand:DI 3 "register_operand" ""))] "" { ! /* Note that we use a C output pattern here to avoid the predicate ! being automatically added before the .mem.offset directive. */ ! return ".mem.offset %2, 0\;%,st8.spill %0 = %1%P0"; ! } [(set_attr "itanium_class" "st")]) ;; Reads ar.unat (define_expand "gr_restore" [(parallel [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "memory_operand" "m") ! (match_operand:DI 2 "const_int_operand" "")] ! UNSPEC_GR_RESTORE)) (use (match_dup 3))])] "" "operands[3] = gen_rtx_REG (DImode, AR_UNAT_REGNUM);") *************** *** 4915,4939 **** (define_insn "gr_restore_internal" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "memory_operand" "m") ! (match_operand:DI 2 "const_int_operand" "")] 2)) (use (match_operand:DI 3 "register_operand" ""))] "" ! "* ! { ! return \".mem.offset %2, 0\;%,ld8.fill %0 = %1%P1\"; ! }" [(set_attr "itanium_class" "ld")]) (define_insn "fr_spill" [(set (match_operand:TF 0 "memory_operand" "=m") ! (unspec:TF [(match_operand:TF 1 "register_operand" "f")] 3))] "" "stf.spill %0 = %1%P0" [(set_attr "itanium_class" "stf")]) (define_insn "fr_restore" [(set (match_operand:TF 0 "register_operand" "=f") ! (unspec:TF [(match_operand:TF 1 "memory_operand" "m")] 4))] "" "ldf.fill %0 = %1%P1" [(set_attr "itanium_class" "fld")]) --- 5095,5119 ---- (define_insn "gr_restore_internal" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "memory_operand" "m") ! (match_operand:DI 2 "const_int_operand" "")] ! UNSPEC_GR_RESTORE)) (use (match_operand:DI 3 "register_operand" ""))] "" ! { return ".mem.offset %2, 0\;%,ld8.fill %0 = %1%P1"; } [(set_attr "itanium_class" "ld")]) (define_insn "fr_spill" [(set (match_operand:TF 0 "memory_operand" "=m") ! (unspec:TF [(match_operand:TF 1 "register_operand" "f")] ! UNSPEC_FR_SPILL))] "" "stf.spill %0 = %1%P0" [(set_attr "itanium_class" "stf")]) (define_insn "fr_restore" [(set (match_operand:TF 0 "register_operand" "=f") ! (unspec:TF [(match_operand:TF 1 "memory_operand" "m")] ! UNSPEC_FR_RESTORE))] "" "ldf.fill %0 = %1%P1" [(set_attr "itanium_class" "fld")]) *************** *** 4944,4958 **** (define_insn "bsp_value" [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(const_int 0)] 20))] "" ! ";;\;mov %0 = ar.bsp" [(set_attr "itanium_class" "frar_i")]) (define_insn "set_bsp" ! [(unspec_volatile [(match_operand:DI 0 "register_operand" "r")] 5)] "" ! "flushrs\;mov r19=ar.rsc\;;;\;and r19=0x1c,r19\;;;\;mov ar.rsc=r19\;;;\;mov ar.bspstore=%0\;;;\;or r19=0x3,r19\;;;\;loadrs\;invala\;;;\;mov ar.rsc=r19" [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]) --- 5124,5156 ---- (define_insn "bsp_value" [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(const_int 0)] UNSPEC_BSP_VALUE))] "" ! "* ! { ! return \";;\;%,mov %0 = ar.bsp\"; ! }" [(set_attr "itanium_class" "frar_i")]) (define_insn "set_bsp" ! [(unspec_volatile [(match_operand:DI 0 "register_operand" "r")] ! UNSPECV_SET_BSP)] "" ! "flushrs ! mov r19=ar.rsc ! ;; ! and r19=0x1c,r19 ! ;; ! mov ar.rsc=r19 ! ;; ! mov ar.bspstore=%0 ! ;; ! or r19=0x3,r19 ! ;; ! loadrs ! invala ! ;; ! mov ar.rsc=r19" [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]) *************** *** 4961,4970 **** ;; fixed later. This avoids an RSE DV. (define_insn "flushrs" ! [(unspec [(const_int 0)] 21)] "" ";;\;flushrs\;;;" ! [(set_attr "itanium_class" "rse_m")]) ;; :::::::::::::::::::: ;; :: --- 5159,5169 ---- ;; fixed later. This avoids an RSE DV. (define_insn "flushrs" ! [(unspec [(const_int 0)] UNSPEC_FLUSHRS)] "" ";;\;flushrs\;;;" ! [(set_attr "itanium_class" "rse_m") ! (set_attr "predicable" "no")]) ;; :::::::::::::::::::: ;; :: *************** *** 5012,5045 **** "" [(set_attr "itanium_class" "nop_x")]) - (define_insn "cycle_display" - [(unspec [(match_operand 0 "const_int_operand" "")] 23)] - "" - "// cycle %0" - [(set_attr "itanium_class" "ignore") - (set_attr "predicable" "no")]) - (define_insn "bundle_selector" ! [(unspec [(match_operand 0 "const_int_operand" "")] 22)] "" ! "* ! { ! return get_bundle_name (INTVAL (operands[0])); ! }" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) ;; Pseudo instruction that prevents the scheduler from moving code above this ;; point. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] 1)] "" "" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) (define_insn "insn_group_barrier" ! [(unspec_volatile [(match_operand 0 "const_int_operand" "")] 2)] "" ";;" [(set_attr "itanium_class" "stop_bit") --- 5211,5235 ---- "" [(set_attr "itanium_class" "nop_x")]) (define_insn "bundle_selector" ! [(unspec [(match_operand 0 "const_int_operand" "")] UNSPEC_BUNDLE_SELECTOR)] "" ! { return get_bundle_name (INTVAL (operands[0])); } [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) ;; Pseudo instruction that prevents the scheduler from moving code above this ;; point. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] "" "" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) (define_insn "insn_group_barrier" ! [(unspec_volatile [(match_operand 0 "const_int_operand" "")] ! UNSPECV_INSN_GROUP_BARRIER)] "" ";;" [(set_attr "itanium_class" "stop_bit") *************** *** 5077,5083 **** (set_attr "predicable" "no")]) (define_insn "break_f" ! [(unspec_volatile [(const_int 0)] 3)] "" "break.f 0" [(set_attr "itanium_class" "nop_f")]) --- 5267,5273 ---- (set_attr "predicable" "no")]) (define_insn "break_f" ! [(unspec_volatile [(const_int 0)] UNSPECV_BREAK)] "" "break.f 0" [(set_attr "itanium_class" "nop_f")]) *************** *** 5119,5132 **** [(use (match_operand:OI 0 "memory_operand" "")) (use (match_operand:DI 1 "register_operand" ""))] "" - " { emit_library_call (gen_rtx_SYMBOL_REF (Pmode, \"__ia64_save_stack_nonlocal\"), 0, VOIDmode, 2, XEXP (operands[0], 0), Pmode, operands[1], Pmode); DONE; ! }") (define_expand "nonlocal_goto" [(use (match_operand 0 "general_operand" "")) --- 5309,5321 ---- [(use (match_operand:OI 0 "memory_operand" "")) (use (match_operand:DI 1 "register_operand" ""))] "" { emit_library_call (gen_rtx_SYMBOL_REF (Pmode, \"__ia64_save_stack_nonlocal\"), 0, VOIDmode, 2, XEXP (operands[0], 0), Pmode, operands[1], Pmode); DONE; ! }) (define_expand "nonlocal_goto" [(use (match_operand 0 "general_operand" "")) *************** *** 5134,5140 **** (use (match_operand 2 "general_operand" "")) (use (match_operand 3 "general_operand" ""))] "" - " { emit_library_call (gen_rtx_SYMBOL_REF (Pmode, \"__ia64_nonlocal_goto\"), LCT_NORETURN, VOIDmode, 3, --- 5323,5328 ---- *************** *** 5143,5176 **** operands[3], Pmode); emit_barrier (); DONE; ! }") ! ! ;; The rest of the setjmp processing happens with the nonlocal_goto expander. ! ;; ??? This is not tested. ! (define_expand "builtin_setjmp_setup" ! [(use (match_operand:DI 0 "" ""))] ! "" ! " ! { ! emit_move_insn (ia64_gp_save_reg (0), gen_rtx_REG (DImode, GR_REG (1))); ! DONE; ! }") ! (define_expand "builtin_setjmp_receiver" ! [(use (match_operand:DI 0 "" ""))] "" ! " { ! emit_move_insn (gen_rtx_REG (DImode, GR_REG (1)), ia64_gp_save_reg (0)); DONE; ! }") (define_expand "eh_epilogue" [(use (match_operand:DI 0 "register_operand" "r")) (use (match_operand:DI 1 "register_operand" "r")) (use (match_operand:DI 2 "register_operand" "r"))] "" - " { rtx bsp = gen_rtx_REG (Pmode, 10); rtx sp = gen_rtx_REG (Pmode, 9); --- 5331,5354 ---- operands[3], Pmode); emit_barrier (); DONE; ! }) ! (define_insn_and_split "builtin_setjmp_receiver" ! [(unspec_volatile [(match_operand:DI 0 "" "")] UNSPECV_SETJMP_RECEIVER)] "" ! "#" ! "reload_completed" ! [(const_int 0)] { ! ia64_reload_gp (); DONE; ! }) (define_expand "eh_epilogue" [(use (match_operand:DI 0 "register_operand" "r")) (use (match_operand:DI 1 "register_operand" "r")) (use (match_operand:DI 2 "register_operand" "r"))] "" { rtx bsp = gen_rtx_REG (Pmode, 10); rtx sp = gen_rtx_REG (Pmode, 9); *************** *** 5190,5196 **** cfun->machine->ia64_eh_epilogue_sp = sp; cfun->machine->ia64_eh_epilogue_bsp = bsp; ! }") ;; Builtin apply support. --- 5368,5374 ---- cfun->machine->ia64_eh_epilogue_sp = sp; cfun->machine->ia64_eh_epilogue_bsp = bsp; ! }) ;; Builtin apply support. *************** *** 5198,5228 **** [(use (match_operand:DI 0 "register_operand" "")) (use (match_operand:OI 1 "memory_operand" ""))] "" - " { emit_library_call (gen_rtx_SYMBOL_REF (Pmode, ! \"__ia64_restore_stack_nonlocal\"), 0, VOIDmode, 1, copy_to_reg (XEXP (operands[1], 0)), Pmode); DONE; ! }") ;;; Intrinsics support. (define_expand "mf" [(set (mem:BLK (match_dup 0)) ! (unspec:BLK [(mem:BLK (match_dup 0))] 12))] "" - " { operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (DImode)); MEM_VOLATILE_P (operands[0]) = 1; ! }") (define_insn "*mf_internal" [(set (match_operand:BLK 0 "" "") ! (unspec:BLK [(match_operand:BLK 1 "" "")] 12))] "" "mf" [(set_attr "itanium_class" "syst_m")]) --- 5376,5404 ---- [(use (match_operand:DI 0 "register_operand" "")) (use (match_operand:OI 1 "memory_operand" ""))] "" { emit_library_call (gen_rtx_SYMBOL_REF (Pmode, ! "__ia64_restore_stack_nonlocal"), 0, VOIDmode, 1, copy_to_reg (XEXP (operands[1], 0)), Pmode); DONE; ! }) ;;; Intrinsics support. (define_expand "mf" [(set (mem:BLK (match_dup 0)) ! (unspec:BLK [(mem:BLK (match_dup 0))] UNSPEC_MF))] "" { operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (DImode)); MEM_VOLATILE_P (operands[0]) = 1; ! }) (define_insn "*mf_internal" [(set (match_operand:BLK 0 "" "") ! (unspec:BLK [(match_operand:BLK 1 "" "")] UNSPEC_MF))] "" "mf" [(set_attr "itanium_class" "syst_m")]) *************** *** 5232,5238 **** (match_dup 1)) (set (match_operand:SI 1 "not_postinc_memory_operand" "+S") (unspec:SI [(match_dup 1) ! (match_operand:SI 2 "fetchadd_operand" "n")] 19))] "" "fetchadd4.acq %0 = %1, %2" [(set_attr "itanium_class" "sem")]) --- 5408,5415 ---- (match_dup 1)) (set (match_operand:SI 1 "not_postinc_memory_operand" "+S") (unspec:SI [(match_dup 1) ! (match_operand:SI 2 "fetchadd_operand" "n")] ! UNSPEC_FETCHADD_ACQ))] "" "fetchadd4.acq %0 = %1, %2" [(set_attr "itanium_class" "sem")]) *************** *** 5242,5248 **** (match_dup 1)) (set (match_operand:DI 1 "not_postinc_memory_operand" "+S") (unspec:DI [(match_dup 1) ! (match_operand:DI 2 "fetchadd_operand" "n")] 19))] "" "fetchadd8.acq %0 = %1, %2" [(set_attr "itanium_class" "sem")]) --- 5419,5426 ---- (match_dup 1)) (set (match_operand:DI 1 "not_postinc_memory_operand" "+S") (unspec:DI [(match_dup 1) ! (match_operand:DI 2 "fetchadd_operand" "n")] ! UNSPEC_FETCHADD_ACQ))] "" "fetchadd8.acq %0 = %1, %2" [(set_attr "itanium_class" "sem")]) *************** *** 5253,5259 **** (set (match_operand:SI 1 "not_postinc_memory_operand" "+S") (unspec:SI [(match_dup 1) (match_operand:SI 2 "gr_register_operand" "r") ! (match_operand:SI 3 "ar_ccv_reg_operand" "")] 13))] "" "cmpxchg4.acq %0 = %1, %2, %3" [(set_attr "itanium_class" "sem")]) --- 5431,5438 ---- (set (match_operand:SI 1 "not_postinc_memory_operand" "+S") (unspec:SI [(match_dup 1) (match_operand:SI 2 "gr_register_operand" "r") ! (match_operand 3 "ar_ccv_reg_operand" "")] ! UNSPEC_CMPXCHG_ACQ))] "" "cmpxchg4.acq %0 = %1, %2, %3" [(set_attr "itanium_class" "sem")]) *************** *** 5264,5270 **** (set (match_operand:DI 1 "not_postinc_memory_operand" "+S") (unspec:DI [(match_dup 1) (match_operand:DI 2 "gr_register_operand" "r") ! (match_operand:DI 3 "ar_ccv_reg_operand" "")] 13))] "" "cmpxchg8.acq %0 = %1, %2, %3" [(set_attr "itanium_class" "sem")]) --- 5443,5450 ---- (set (match_operand:DI 1 "not_postinc_memory_operand" "+S") (unspec:DI [(match_dup 1) (match_operand:DI 2 "gr_register_operand" "r") ! (match_operand:DI 3 "ar_ccv_reg_operand" "")] ! UNSPEC_CMPXCHG_ACQ))] "" "cmpxchg8.acq %0 = %1, %2, %3" [(set_attr "itanium_class" "sem")]) *************** *** 5298,5345 **** (define_insn "pred_rel_mutex" [(set (match_operand:BI 0 "register_operand" "+c") ! (unspec:BI [(match_dup 0)] 7))] "" ".pred.rel.mutex %0, %I0" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) (define_insn "safe_across_calls_all" ! [(unspec_volatile [(const_int 0)] 8)] "" ".pred.safe_across_calls p1-p63" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) (define_insn "safe_across_calls_normal" ! [(unspec_volatile [(const_int 0)] 9)] "" - "* { emit_safe_across_calls (asm_out_file); ! return \"\"; ! }" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) - ;; - ;; ;; UNSPEC instruction definition to "swizzle" 32 bit pointer into 64 bit ;; pointer. This is used by the HP-UX 32 bit mode. (define_insn "ptr_extend" [(set (match_operand:DI 0 "gr_register_operand" "=r") ! (unspec:DI [(match_operand:SI 1 "gr_register_operand" "r")] 24))] "" "addp4 %0 = 0,%1" [(set_attr "itanium_class" "ialu")]) ;; ! ;; As USE insns aren't meaningful after reload, this is used instead ! ;; to prevent deleting instructions setting registers for EH handling ! (define_insn "prologue_use" ! [(unspec:DI [(match_operand:DI 0 "register_operand" "")] 25)] ! "" ! "// %0 needed for EH" ! [(set_attr "itanium_class" "ignore") ! (set_attr "predicable" "no")]) --- 5478,5536 ---- (define_insn "pred_rel_mutex" [(set (match_operand:BI 0 "register_operand" "+c") ! (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))] "" ".pred.rel.mutex %0, %I0" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) (define_insn "safe_across_calls_all" ! [(unspec_volatile [(const_int 0)] UNSPECV_PSAC_ALL)] "" ".pred.safe_across_calls p1-p63" [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) (define_insn "safe_across_calls_normal" ! [(unspec_volatile [(const_int 0)] UNSPECV_PSAC_NORMAL)] "" { emit_safe_across_calls (asm_out_file); ! return ""; ! } [(set_attr "itanium_class" "ignore") (set_attr "predicable" "no")]) ;; UNSPEC instruction definition to "swizzle" 32 bit pointer into 64 bit ;; pointer. This is used by the HP-UX 32 bit mode. (define_insn "ptr_extend" [(set (match_operand:DI 0 "gr_register_operand" "=r") ! (unspec:DI [(match_operand:SI 1 "gr_register_operand" "r")] ! UNSPEC_ADDP4))] "" "addp4 %0 = 0,%1" [(set_attr "itanium_class" "ialu")]) ;; ! ;; Optimizations for ptr_extend ! ! (define_insn "*ptr_extend_plus_1" ! [(set (match_operand:DI 0 "gr_register_operand" "=r") ! (unspec:DI ! [(plus:SI (match_operand:SI 1 "basereg_operand" "r") ! (match_operand:SI 2 "gr_reg_or_14bit_operand" "rI"))] ! UNSPEC_ADDP4))] ! "addp4_optimize_ok (operands[1], operands[2])" ! "addp4 %0 = %2, %1" ! [(set_attr "itanium_class" "ialu")]) ! ! (define_insn "*ptr_extend_plus_2" ! [(set (match_operand:DI 0 "gr_register_operand" "=r") ! (unspec:DI ! [(plus:SI (match_operand:SI 1 "gr_register_operand" "r") ! (match_operand:SI 2 "basereg_operand" "r"))] ! UNSPEC_ADDP4))] ! "addp4_optimize_ok (operands[1], operands[2])" ! "addp4 %0 = %1, %2" ! [(set_attr "itanium_class" "ialu")]) diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/ia64-modes.def gcc-3.3/gcc/config/ia64/ia64-modes.def *** gcc-3.2.3/gcc/config/ia64/ia64-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ia64/ia64-modes.def 2002-06-10 22:35:47.000000000 +0000 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine GNU compiler. IA-64 version. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by James E. Wilson and + David Mosberger . + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + + CCImode is used to mark a single predicate register instead + of a register pair. This is currently only used in reg_raw_mode + so that flow doesn't do something stupid. */ + + CC (CCI) diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/ia64-protos.h gcc-3.3/gcc/config/ia64/ia64-protos.h *** gcc-3.2.3/gcc/config/ia64/ia64-protos.h 2002-04-18 20:31:54.000000000 +0000 --- gcc-3.3/gcc/config/ia64/ia64-protos.h 2003-04-25 13:45:41.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler for IA-64. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler for IA-64. ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 21,27 **** /* Variables defined in ia64.c. */ #ifdef RTX_CODE ! extern rtx ia64_compare_op0, ia64_compare_op1; #endif /* Functions defined in ia64.c */ --- 21,28 ---- /* Variables defined in ia64.c. */ #ifdef RTX_CODE ! extern GTY(()) rtx ia64_compare_op0; ! extern GTY(()) rtx ia64_compare_op1; #endif /* Functions defined in ia64.c */ *************** extern int call_operand PARAMS((rtx, enu *** 31,36 **** --- 32,38 ---- extern int sdata_symbolic_operand PARAMS((rtx, enum machine_mode)); extern int got_symbolic_operand PARAMS((rtx, enum machine_mode)); extern int symbolic_operand PARAMS((rtx, enum machine_mode)); + extern int tls_symbolic_operand PARAMS((rtx, enum machine_mode)); extern int function_operand PARAMS((rtx, enum machine_mode)); extern int setjmp_operand PARAMS((rtx, enum machine_mode)); extern int move_operand PARAMS((rtx, enum machine_mode)); *************** extern int ar_pfs_reg_operand PARAMS((rt *** 66,79 **** extern int general_tfmode_operand PARAMS((rtx, enum machine_mode)); extern int destination_tfmode_operand PARAMS((rtx, enum machine_mode)); extern int tfreg_or_fp01_operand PARAMS((rtx, enum machine_mode)); extern int ia64_move_ok PARAMS((rtx, rtx)); extern int ia64_depz_field_mask PARAMS((rtx, rtx)); - extern rtx ia64_gp_save_reg PARAMS((int)); extern rtx ia64_split_timode PARAMS((rtx[], rtx, rtx)); extern rtx spill_tfmode_operand PARAMS((rtx, int)); extern rtx ia64_expand_compare PARAMS((enum rtx_code, enum machine_mode)); extern void ia64_expand_call PARAMS((rtx, rtx, rtx, int)); extern HOST_WIDE_INT ia64_initial_elimination_offset PARAMS((int, int)); extern void ia64_expand_prologue PARAMS((void)); --- 68,85 ---- extern int general_tfmode_operand PARAMS((rtx, enum machine_mode)); extern int destination_tfmode_operand PARAMS((rtx, enum machine_mode)); extern int tfreg_or_fp01_operand PARAMS((rtx, enum machine_mode)); + extern int basereg_operand PARAMS((rtx, enum machine_mode)); + extern rtx ia64_expand_move PARAMS ((rtx, rtx)); extern int ia64_move_ok PARAMS((rtx, rtx)); + extern int addp4_optimize_ok PARAMS((rtx, rtx)); extern int ia64_depz_field_mask PARAMS((rtx, rtx)); extern rtx ia64_split_timode PARAMS((rtx[], rtx, rtx)); extern rtx spill_tfmode_operand PARAMS((rtx, int)); extern rtx ia64_expand_compare PARAMS((enum rtx_code, enum machine_mode)); extern void ia64_expand_call PARAMS((rtx, rtx, rtx, int)); + extern void ia64_split_call PARAMS((rtx, rtx, rtx, rtx, rtx, int, int)); + extern void ia64_reload_gp PARAMS((void)); extern HOST_WIDE_INT ia64_initial_elimination_offset PARAMS((int, int)); extern void ia64_expand_prologue PARAMS((void)); *************** extern rtx ia64_function_arg PARAMS((CUM *** 100,106 **** tree, int, int)); extern rtx ia64_expand_builtin PARAMS((tree, rtx, rtx, enum machine_mode, int)); - extern void ia64_va_start PARAMS((int, tree, rtx)); extern rtx ia64_va_arg PARAMS((tree, tree)); extern rtx ia64_function_value PARAMS((tree, tree)); #endif /* RTX_CODE */ --- 106,111 ---- *************** extern int ia64_function_arg_pass_by_ref *** 118,125 **** tree, int)); extern int ia64_return_in_memory PARAMS((tree)); extern void ia64_asm_output_external PARAMS((FILE *, tree, const char *)); - - extern void ia64_encode_section_info PARAMS((tree)); #endif /* TREE_CODE */ extern int ia64_register_move_cost PARAMS((enum machine_mode, enum reg_class, --- 123,128 ---- *************** extern void emit_safe_across_calls PARAM *** 130,135 **** --- 133,139 ---- extern void ia64_init_builtins PARAMS((void)); extern void ia64_override_options PARAMS((void)); extern int ia64_dbx_register_number PARAMS((int)); + extern bool ia64_function_ok_for_sibcall PARAMS ((tree)); #ifdef SDATA_SECTION_ASM_OP extern void sdata_section PARAMS ((void)); *************** extern void sbss_section PARAMS ((void)) *** 143,145 **** --- 147,155 ---- /* expr.h defines ARGS_SIZE_RTX and `enum direction'. */ extern enum direction ia64_hpux_function_arg_padding PARAMS ((enum machine_mode, tree)); #endif /* ARGS_SIZE_RTX */ + + #ifdef GCC_C_PRAGMA_H + extern void ia64_hpux_handle_builtin_pragma PARAMS ((cpp_reader *)); + #endif + + extern void ia64_hpux_asm_file_end PARAMS ((FILE *)); diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/linux.h gcc-3.3/gcc/config/ia64/linux.h *** gcc-3.2.3/gcc/config/ia64/linux.h 2002-05-23 21:24:38.000000000 +0000 --- gcc-3.3/gcc/config/ia64/linux.h 2002-09-03 21:09:54.000000000 +0000 *************** *** 9,18 **** #undef CC1_SPEC #define CC1_SPEC "%{profile:-p} %{G*}" ! /* ??? Maybe this should be in sysv4.h? */ ! #define CPP_PREDEFINES "\ ! -D__gnu_linux__ -D__linux -D__linux__ -D_LONGLONG \ ! -Dlinux -Dunix -Asystem=linux" /* Need to override linux.h STARTFILE_SPEC, since it has crtbeginT.o in. */ #undef STARTFILE_SPEC --- 9,23 ---- #undef CC1_SPEC #define CC1_SPEC "%{profile:-p} %{G*}" ! /* Target OS builtins. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_assert("system=linux"); \ ! builtin_define_std("linux"); \ ! builtin_define_std("unix"); \ ! builtin_define("__gnu_linux__"); \ ! builtin_define("_LONGLONG"); \ ! } while (0) /* Need to override linux.h STARTFILE_SPEC, since it has crtbeginT.o in. */ #undef STARTFILE_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/quadlib.c gcc-3.3/gcc/config/ia64/quadlib.c *** gcc-3.2.3/gcc/config/ia64/quadlib.c 2001-06-26 03:50:48.000000000 +0000 --- gcc-3.3/gcc/config/ia64/quadlib.c 2002-09-13 16:40:53.000000000 +0000 *************** *** 1,5 **** /* Subroutines for long double support. ! Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Subroutines for long double support. ! Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 27,34 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! int _U_Qfcmp (long double a, long double b, int); ! long _U_Qfcnvfxt_quad_to_sgl (long double); int _U_Qfeq (long double a, long double b) --- 27,41 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! extern int _U_Qfcmp (long double a, long double b, int); ! ! int _U_Qfeq (long double, long double); ! int _U_Qfne (long double, long double); ! int _U_Qfgt (long double, long double); ! int _U_Qfge (long double, long double); ! int _U_Qflt (long double, long double); ! int _U_Qfle (long double, long double); ! int _U_Qfcomp (long double, long double); int _U_Qfeq (long double a, long double b) *************** _U_Qfcomp (long double a, long double b) *** 74,82 **** return (_U_Qfcmp (a, b, 22) != 0 ? 1 : -1); } - - long double - _U_Qfneg (long double a) - { - return (0.0L - a); - } --- 81,83 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/sysv4.h gcc-3.3/gcc/config/ia64/sysv4.h *** gcc-3.2.3/gcc/config/ia64/sysv4.h 2002-05-30 12:42:22.000000000 +0000 --- gcc-3.3/gcc/config/ia64/sysv4.h 2002-08-21 02:41:48.000000000 +0000 *************** *** 33,40 **** the Intel simulator. So we must explicitly put variables in .bss instead. This matters only if we care about the Intel assembler. */ ! /* This is asm_output_aligned_bss from varasm.c without the ASM_GLOBALIZE_LABEL ! call at the beginning. */ /* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME. */ extern int size_directive_output; --- 33,40 ---- the Intel simulator. So we must explicitly put variables in .bss instead. This matters only if we care about the Intel assembler. */ ! /* This is asm_output_aligned_bss from varasm.c without the ! (*targetm.asm_out.globalize_label) call at the beginning. */ /* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME. */ extern int size_directive_output; *************** extern int size_directive_output; *** 42,49 **** #undef ASM_OUTPUT_ALIGNED_LOCAL #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! if ((DECL) \ ! && XSTR (XEXP (DECL_RTL (DECL), 0), 0)[0] == SDATA_NAME_FLAG_CHAR) \ sbss_section (); \ else \ bss_section (); \ --- 42,48 ---- #undef ASM_OUTPUT_ALIGNED_LOCAL #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! if ((DECL) && sdata_symbolic_operand (XEXP (DECL_RTL (DECL), 0), Pmode)) \ sbss_section (); \ else \ bss_section (); \ *************** do { \ *** 62,69 **** #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ do { \ const char *name_ = NAME; \ ! if (*name_ == SDATA_NAME_FLAG_CHAR) \ ! name_++; \ if (*name_ == '*') \ name_++; \ else \ --- 61,68 ---- #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ do { \ const char *name_ = NAME; \ ! if (*name_ == ENCODE_SECTION_INFO_CHAR) \ ! name_ += 2; \ if (*name_ == '*') \ name_++; \ else \ *************** do { \ *** 140,297 **** emit_safe_across_calls (STREAM); \ } while (0) ! /* A C statement or statements to switch to the appropriate ! section for output of DECL. DECL is either a `VAR_DECL' node ! or a constant of some sort. RELOC indicates whether forming ! the initial value of DECL requires link-time relocations. ! ! Set SECNUM to: ! 0 .text ! 1 .rodata ! 2 .data ! 3 .sdata ! 4 .bss ! 5 .sbss ! */ ! #define DO_SELECT_SECTION(SECNUM, DECL, RELOC) \ ! do \ ! { \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! SECNUM = 0; \ ! else if (TREE_CODE (DECL) == STRING_CST) \ ! { \ ! if (! flag_writable_strings) \ ! SECNUM = 0x101; \ ! else \ ! SECNUM = 2; \ ! } \ ! else if (TREE_CODE (DECL) == VAR_DECL) \ ! { \ ! if (XSTR (XEXP (DECL_RTL (DECL), 0), 0)[0] \ ! == SDATA_NAME_FLAG_CHAR) \ ! SECNUM = 3; \ ! /* ??? We need the extra RELOC check, because the default \ ! is to only check RELOC if flag_pic is set, and we don't \ ! set flag_pic (yet?). */ \ ! else if (!DECL_READONLY_SECTION (DECL, RELOC) || (RELOC)) \ ! SECNUM = 2; \ ! else if (flag_merge_constants < 2) \ ! /* C and C++ don't allow different variables to share \ ! the same location. -fmerge-all-constants allows \ ! even that (at the expense of not conforming). */ \ ! SECNUM = 1; \ ! else if (TREE_CODE (DECL_INITIAL (DECL)) == STRING_CST) \ ! SECNUM = 0x201; \ ! else \ ! SECNUM = 0x301; \ ! } \ ! /* This could be a CONSTRUCTOR containing ADDR_EXPR of a VAR_DECL, \ ! in which case we can't put it in a shared library rodata. */ \ ! else if (flag_pic && (RELOC)) \ ! SECNUM = 3; \ ! else \ ! SECNUM = 2; \ ! } \ ! while (0) ! ! /* We override svr4.h so that we can support the sdata section. */ ! ! #undef SELECT_SECTION ! #define SELECT_SECTION(DECL,RELOC,ALIGN) \ ! do \ ! { \ ! typedef void (*sec_fn) PARAMS ((void)); \ ! static sec_fn const sec_functions[6] = \ ! { \ ! text_section, \ ! const_section, \ ! data_section, \ ! sdata_section, \ ! bss_section, \ ! sbss_section \ ! }; \ ! \ ! int sec; \ ! \ ! DO_SELECT_SECTION (sec, DECL, RELOC); \ ! \ ! switch (sec) \ ! { \ ! case 0x101: \ ! mergeable_string_section (DECL, ALIGN, 0); \ ! break; \ ! case 0x201: \ ! mergeable_string_section (DECL_INITIAL (DECL), \ ! ALIGN, 0); \ ! break; \ ! case 0x301: \ ! mergeable_constant_section (DECL_MODE (DECL), \ ! ALIGN, 0); \ ! break; \ ! default: \ ! (*sec_functions[sec]) (); \ ! break; \ ! } \ ! } \ ! while (0) ! ! #undef UNIQUE_SECTION ! #define UNIQUE_SECTION(DECL, RELOC) \ ! do \ ! { \ ! static const char * const prefixes[6][2] = \ ! { \ ! { ".text.", ".gnu.linkonce.t." }, \ ! { ".rodata.", ".gnu.linkonce.r." }, \ ! { ".data.", ".gnu.linkonce.d." }, \ ! { ".sdata.", ".gnu.linkonce.s." }, \ ! { ".bss.", ".gnu.linkonce.b." }, \ ! { ".sbss.", ".gnu.linkonce.sb." } \ ! }; \ ! \ ! int nlen, plen, sec; \ ! const char *name, *prefix; \ ! char *string; \ ! \ ! DO_SELECT_SECTION (sec, DECL, RELOC); \ ! \ ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ ! STRIP_NAME_ENCODING (name, name); \ ! nlen = strlen (name); \ ! \ ! prefix = prefixes[sec & 0xff][DECL_ONE_ONLY(DECL)]; \ ! plen = strlen (prefix); \ ! \ ! string = alloca (nlen + plen + 1); \ ! \ ! memcpy (string, prefix, plen); \ ! memcpy (string + plen, name, nlen + 1); \ ! \ ! DECL_SECTION_NAME (DECL) = build_string (nlen + plen, string); \ ! } \ ! while (0) ! ! /* Similarly for constant pool data. */ ! ! extern unsigned int ia64_section_threshold; ! #undef SELECT_RTX_SECTION ! #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) \ ! { \ ! if (GET_MODE_SIZE (MODE) > 0 \ ! && GET_MODE_SIZE (MODE) <= ia64_section_threshold) \ ! sdata_section (); \ ! else if (flag_pic && symbolic_operand ((RTX), (MODE))) \ ! data_section (); \ ! else \ ! mergeable_constant_section ((MODE), (ALIGN), 0); \ ! } #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_sdata, in_sbss #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ SDATA_SECTION_FUNCTION \ SBSS_SECTION_FUNCTION --- 139,153 ---- emit_safe_across_calls (STREAM); \ } while (0) ! /* Override default elf definition. */ ! #undef TARGET_ASM_SELECT_RTX_SECTION ! #define TARGET_ASM_SELECT_RTX_SECTION ia64_select_rtx_section #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_sbss #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SDATA_SECTION_FUNCTION \ SBSS_SECTION_FUNCTION diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/t-aix gcc-3.3/gcc/config/ia64/t-aix *** gcc-3.2.3/gcc/config/ia64/t-aix 2001-07-12 02:55:24.000000000 +0000 --- gcc-3.3/gcc/config/ia64/t-aix 2002-09-13 21:12:18.000000000 +0000 *************** CRTSTUFF_T_CFLAGS_S = -fPIC *** 6,16 **** TARGET_LIBGCC2_CFLAGS = -fPIC -D__64BIT__ -D_LONG_LONG -D_IA64 -D__int128=__size128_t LIB2ADDEH += $(srcdir)/config/ia64/unwind-aix.c ! # Add crt[in].o to the list defined in t-ia64. These files provide ! # endpoints for crtbegin/end. ! ! EXTRA_PARTS=crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o ! crti.o: $(srcdir)/config/ia64/crti.asm $(GCC_PASSES) $(GCC_FOR_TARGET) -c -o crti.o -x assembler $(srcdir)/config/ia64/crti.asm crtn.o: $(srcdir)/config/ia64/crtn.asm $(GCC_PASSES) --- 6,12 ---- TARGET_LIBGCC2_CFLAGS = -fPIC -D__64BIT__ -D_LONG_LONG -D_IA64 -D__int128=__size128_t LIB2ADDEH += $(srcdir)/config/ia64/unwind-aix.c ! # Assemble startup files. crti.o: $(srcdir)/config/ia64/crti.asm $(GCC_PASSES) $(GCC_FOR_TARGET) -c -o crti.o -x assembler $(srcdir)/config/ia64/crti.asm crtn.o: $(srcdir)/config/ia64/crtn.asm $(GCC_PASSES) diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/t-hpux gcc-3.3/gcc/config/ia64/t-hpux *** gcc-3.2.3/gcc/config/ia64/t-hpux 2001-07-19 23:26:51.000000000 +0000 --- gcc-3.3/gcc/config/ia64/t-hpux 2003-01-26 11:35:08.000000000 +0000 *************** LIB2FUNCS_EXTRA=quadlib.c *** 13,15 **** --- 13,48 ---- quadlib.c: $(srcdir)/config/ia64/quadlib.c cat $(srcdir)/config/ia64/quadlib.c > quadlib.c + + # We get an undefined main when building a cross compiler because our + # linkspec has "-u main" and we want that for linking but it makes + # LIBGCC1_TEST fail because it uses -nostdlib -nostartup. + + LIBGCC1_TEST = + + # Don't run fix-headers. HP-UX headers are standards conformant + # and don't need to be fixed up in this way. + # If we remove this (and run fix-headers) we should define FIXPROTO_DEFINES + # and also fix the definition of putenv in sys-protos.h (const char not char). + + STMP_FIXPROTO = + + # We do not want to include the EH stuff that linux uses, we want to use + # the HP-UX libunwind library. + + LIB2ADDEH = + + SHLIB_EXT = .so + SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ + -Wl,+h,@shlib_base_name@.so.0 \ + -o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc && \ + rm -f @shlib_base_name@.so.0 && \ + $(LN_S) @shlib_base_name@.so @shlib_base_name@.so.0 + # $(slibdir) double quoted to protect it from expansion while building + # libgcc.mk. We want this delayed until actual install time. + SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.so $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so.0; \ + rm -f $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so; \ + $(LN_S) @shlib_base_name@.so.0 $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so; \ + chmod +x $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so + + SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/t-ia64 gcc-3.3/gcc/config/ia64/t-ia64 *** gcc-3.2.3/gcc/config/ia64/t-ia64 2002-01-02 22:50:01.000000000 +0000 --- gcc-3.3/gcc/config/ia64/t-ia64 2002-11-07 22:48:10.000000000 +0000 *************** LIB1ASMFUNCS = __divtf3 __divdf3 __divs *** 19,42 **** SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64.ver - # For svr4 we build crtbegin.o and crtend.o which serve to add begin and - # end labels to the .ctors and .dtors section when we link using gcc. - - EXTRA_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o - # Effectively disable the crtbegin/end rules using crtstuff.c T = disable # Assemble startup files. crtbegin.o: $(srcdir)/config/ia64/crtbegin.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -c -o crtbegin.o -x assembler-with-cpp $(srcdir)/config/ia64/crtbegin.asm crtend.o: $(srcdir)/config/ia64/crtend.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -c -o crtend.o -x assembler-with-cpp $(srcdir)/config/ia64/crtend.asm crtbeginS.o: $(srcdir)/config/ia64/crtbegin.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -DSHARED -c -o crtbeginS.o -x assembler-with-cpp $(srcdir)/config/ia64/crtbegin.asm crtendS.o: $(srcdir)/config/ia64/crtend.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -DSHARED -c -o crtendS.o -x assembler-with-cpp $(srcdir)/config/ia64/crtend.asm crtfastmath.o: $(srcdir)/config/ia64/crtfastmath.c $(GCC_PASSES) ! $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crtfastmath.o $(srcdir)/config/ia64/crtfastmath.c LIB2ADDEH = $(srcdir)/config/ia64/unwind-ia64.c $(srcdir)/unwind-sjlj.c --- 19,47 ---- SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64.ver # Effectively disable the crtbegin/end rules using crtstuff.c T = disable # Assemble startup files. crtbegin.o: $(srcdir)/config/ia64/crtbegin.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -I. -c -o crtbegin.o -x assembler-with-cpp \ ! $(srcdir)/config/ia64/crtbegin.asm crtend.o: $(srcdir)/config/ia64/crtend.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -I. -c -o crtend.o -x assembler-with-cpp \ ! $(srcdir)/config/ia64/crtend.asm crtbeginS.o: $(srcdir)/config/ia64/crtbegin.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -I. -DSHARED -c -o crtbeginS.o \ ! -x assembler-with-cpp \ ! $(srcdir)/config/ia64/crtbegin.asm crtendS.o: $(srcdir)/config/ia64/crtend.asm $(GCC_PASSES) ! $(GCC_FOR_TARGET) -I. -DSHARED -c -o crtendS.o -x assembler-with-cpp \ ! $(srcdir)/config/ia64/crtend.asm crtfastmath.o: $(srcdir)/config/ia64/crtfastmath.c $(GCC_PASSES) ! $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crtfastmath.o \ ! $(srcdir)/config/ia64/crtfastmath.c LIB2ADDEH = $(srcdir)/config/ia64/unwind-ia64.c $(srcdir)/unwind-sjlj.c + + ia64-c.o: $(srcdir)/config/ia64/ia64-c.c $(CONFIG_H) $(SYSTEM_H) \ + $(TREE_H) $(CPPLIB_H) $(C_COMMON_H) c-pragma.h toplev.h + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff -Nrc3pad gcc-3.2.3/gcc/config/ia64/unwind-ia64.c gcc-3.3/gcc/config/ia64/unwind-ia64.c *** gcc-3.2.3/gcc/config/ia64/unwind-ia64.c 2002-04-01 23:29:46.000000000 +0000 --- gcc-3.3/gcc/config/ia64/unwind-ia64.c 2002-11-27 10:33:56.000000000 +0000 *************** typedef struct unw_state_record *** 143,149 **** unsigned int any_spills : 1; /* got any register spills? */ unsigned int in_body : 1; /* are we inside a body? */ unsigned int no_reg_stack_frame : 1; /* Don't adjust bsp for i&l regs */ ! unsigned char *imask; /* imask of of spill_mask record or NULL */ unsigned long pr_val; /* predicate values */ unsigned long pr_mask; /* predicate mask */ long spill_offset; /* psp-relative offset for spill base */ --- 143,149 ---- unsigned int any_spills : 1; /* got any register spills? */ unsigned int in_body : 1; /* are we inside a body? */ unsigned int no_reg_stack_frame : 1; /* Don't adjust bsp for i&l regs */ ! unsigned char *imask; /* imask of spill_mask record or NULL */ unsigned long pr_val; /* predicate values */ unsigned long pr_mask; /* predicate mask */ long spill_offset; /* psp-relative offset for spill base */ *************** unw_decode_b3_x4 (unsigned char *dp, uns *** 1401,1407 **** typedef unsigned char *(*unw_decoder) (unsigned char *, unsigned char, void *); ! static unw_decoder unw_decode_table[2][8] = { /* prologue table: */ { --- 1401,1407 ---- typedef unsigned char *(*unw_decoder) (unsigned char *, unsigned char, void *); ! static const unw_decoder unw_decode_table[2][8] = { /* prologue table: */ { *************** _Unwind_GetRegionStart (struct _Unwind_C *** 1642,1647 **** --- 1642,1653 ---- return context->region_start; } + void * + _Unwind_FindEnclosingFunction (void *pc) + { + return NULL; + } + static _Unwind_Reason_Code uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs) diff -Nrc3pad gcc-3.2.3/gcc/config/interix.h gcc-3.3/gcc/config/interix.h *** gcc-3.2.3/gcc/config/interix.h 2002-01-15 20:20:20.000000000 +0000 --- gcc-3.3/gcc/config/interix.h 2002-11-26 04:54:46.000000000 +0000 *************** for windows/multi thread */ *** 85,97 **** #define STDC_0_IN_SYSTEM_HEADERS 1 ! #define HANDLE_SYSV_PRAGMA #undef HANDLE_PRAGMA_WEAK /* until the link format can handle it */ /* Names to predefine in the preprocessor for this target machine. */ ! #define DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 85,97 ---- #define STDC_0_IN_SYSTEM_HEADERS 1 ! #define HANDLE_SYSV_PRAGMA 1 #undef HANDLE_PRAGMA_WEAK /* until the link format can handle it */ /* Names to predefine in the preprocessor for this target machine. */ ! #define DBX_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG *************** for windows/multi thread */ *** 100,111 **** #undef WCHAR_TYPE #undef WCHAR_TYPE_SIZE - #define WCHAR_UNSIGNED 1 #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE 16 /* Our strategy for finding global constructors is a bit different, although ! not a lot. */ #define DO_GLOBAL_CTORS_BODY \ do { \ int i; \ --- 100,110 ---- #undef WCHAR_TYPE #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE 16 /* Our strategy for finding global constructors is a bit different, although ! not a lot. */ #define DO_GLOBAL_CTORS_BODY \ do { \ int i; \ diff -Nrc3pad gcc-3.2.3/gcc/config/ip2k/crt0.S gcc-3.3/gcc/config/ip2k/crt0.S *** gcc-3.2.3/gcc/config/ip2k/crt0.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ip2k/crt0.S 2002-06-30 19:27:48.000000000 +0000 *************** *** 0 **** --- 1,53 ---- + ; + ; Copyright (C) 2000, 2001 Free Software Foundation, Inc. + ; Contributed by Red Hat, Inc. + ; + ; This file is part of GNU CC. + ; + ; GNU CC is free software; you can redistribute it and/or modify + ; it under the terms of the GNU General Public License as published by + ; the Free Software Foundation; either version 2, or (at your option) + ; any later version. + ; + ; In addition to the permissions in the GNU General Public License, the + ; Free Software Foundation gives you unlimited permission to link the + ; compiled version of this file with other programs, and to distribute + ; those programs without any restriction coming from the use of this + ; file. (The General Public License restrictions do apply in other + ; respects; for example, they cover modification of the file, and + ; distribution when not linked into another program.) + ; + ; GNU CC is distributed in the hope that it will be useful, + ; but WITHOUT ANY WARRANTY; without even the implied warranty of + ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ; GNU General Public License for more details. + ; + ; You should have received a copy of the GNU General Public License + ; along with GNU CC; see the file COPYING. If not, write to + ; the Free Software Foundation, 59 Temple Place - Suite 330, + ; Boston, MA 02111-1307, USA. + ; + + .file "crt0.S" + .text + .global __start + .func __start + __start: + clr $ff ; Insure we have a zero available + mov w,#%hi8data(__stack) ; set up stack + mov sph,w ; + mov w,#%lo8data(__stack) + mov spl,w + + push #0 ; Set argc/argv. + push #0 ; Only required for testing + push #0 ; purposes and "ansi" main. + push #0 + page _main + call _main + push $81 ; use return value to call exit() + push $80 + page _exit + call _exit + break ; Should never return + .endfunc diff -Nrc3pad gcc-3.2.3/gcc/config/ip2k/ip2k.c gcc-3.3/gcc/config/ip2k/ip2k.c *** gcc-3.2.3/gcc/config/ip2k/ip2k.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ip2k/ip2k.c 2003-01-14 20:13:45.000000000 +0000 *************** *** 0 **** --- 1,6307 ---- + /* Subroutines used for code generation on Ubicom IP2022 + Communications Controller. + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Contributed by Red Hat, Inc and Ubicom, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "rtl.h" + #include "regs.h" + #include "hard-reg-set.h" + #include "real.h" + #include "insn-config.h" + #include "conditions.h" + #include "insn-flags.h" + #include "output.h" + #include "insn-attr.h" + #include "insn-addr.h" + #include "flags.h" + #include "reload.h" + #include "tree.h" + #include "expr.h" + #include "toplev.h" + #include "obstack.h" + #include "function.h" + #include "recog.h" + #include "tm_p.h" + #include "target.h" + #include "target-def.h" + #include "basic-block.h" + + /* There are problems with 'frame_pointer_needed'. If we force it + on, we either end up not eliminating uses of FP, which results in + SPILL register failures or we may end up with calculation errors in + the stack offsets. Isolate the decision process into a simple macro. */ + #define CHAIN_FRAMES (frame_pointer_needed || FRAME_POINTER_REQUIRED) + + static int ip2k_naked_function_p PARAMS ((tree)); + #ifdef IP2K_MD_REORG_PASS + static void mdr_resequence_xy_yx PARAMS ((rtx)); + static void mdr_pres_replace_and_recurse PARAMS ((rtx, rtx, rtx)); + static void mdr_propagate_reg_equivs_sequence PARAMS ((rtx, rtx, rtx)); + static void mdr_propagate_reg_equivs PARAMS ((rtx)); + static int track_dp_reload PARAMS ((rtx , rtx *, int , int)); + static void mdr_try_dp_reload_elim PARAMS ((rtx)); + static void mdr_try_move_dp_reload PARAMS ((rtx)); + static void mdr_try_move_pushes PARAMS ((rtx)); + static void mdr_try_propagate_clr_sequence PARAMS ((rtx, unsigned int)); + static void mdr_try_propagate_clr PARAMS ((rtx)); + static void mdr_try_propagate_move_sequence PARAMS ((rtx, rtx, rtx)); + static void mdr_try_propagate_move PARAMS ((rtx)); + static void mdr_try_remove_redundant_insns PARAMS ((rtx)); + static int track_w_reload PARAMS ((rtx, rtx *, int , int)); + static void mdr_try_wreg_elim PARAMS ((rtx)); + #endif /* IP2K_MD_REORG_PASS */ + static int ip2k_check_can_adjust_stack_ref PARAMS ((rtx, int)); + static void ip2k_adjust_stack_ref PARAMS ((rtx *, int)); + static int ip2k_xexp_not_uses_reg_for_mem PARAMS ((rtx, unsigned int)); + static tree ip2k_handle_progmem_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + static tree ip2k_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, + bool *)); + const struct attribute_spec ip2k_attribute_table[]; + + + /* Initialize the GCC target structure. */ + #undef TARGET_ASM_ALIGNED_HI_OP + #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" + + #undef TARGET_ASM_FUNCTION_PROLOGUE + #define TARGET_ASM_FUNCTION_PROLOGUE function_prologue + + #undef TARGET_ASM_FUNCTION_EPILOGUE + #define TARGET_ASM_FUNCTION_EPILOGUE function_epilogue + + #undef TARGET_ASM_UNIQUE_SECTION + #define TARGET_ASM_UNIQUE_SECTION unique_section + + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO encode_section_info + + #undef TARGET_ATTRIBUTE_TABLE + #define TARGET_ATTRIBUTE_TABLE ip2k_attribute_table + + struct gcc_target targetm = TARGET_INITIALIZER; + + /* Commands in the functions prologues in the compiled file. */ + static int commands_in_prologues; + + /* Commands in the functions epilogues in the compiled file. */ + static int commands_in_epilogues; + + /* Prologue/Epilogue size in words. */ + static int prologue_size; + static int epilogue_size; + + /* compare and test instructions for the IP2K are materialized by + the conditional branch that uses them. This is because conditional + branches are skips over unconditional branches. */ + rtx ip2k_compare_operands[3]; /* Additional operands for condition code. */ + int ip2k_test_flag; /* Indicates Z, WREG contain condition code + information. */ + + /* Some ip2k patterns push a byte onto the stack and then access + SP-relative addresses. Since reload doesn't know about these + pushes, we must track them internally with a %< (push) or %> (pop) + indicator. */ + static int ip2k_stack_delta; + + /* Track if or how far our ip2k reorganization pass has run. */ + int ip2k_reorg_in_progress = 0; + int ip2k_reorg_completed = 0; + int ip2k_reorg_split_dimode = 0; + int ip2k_reorg_split_simode = 0; + int ip2k_reorg_split_himode = 0; + int ip2k_reorg_split_qimode = 0; + int ip2k_reorg_merge_qimode = 0; + + /* Set up local allocation order. */ + + void + ip2k_init_local_alloc (rao) + int * rao; + { + static const int alloc_order[] = REG_ALLOC_ORDER; + + memcpy (rao, alloc_order, sizeof (alloc_order)); + } + + /* Returns the number of bytes of arguments automatically + popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), + FUNTYPE is the data type of the function (as a tree), + or for a library call it is an identifier node for the subroutine name. + SIZE is the number of bytes of arguments passed on the stack. */ + + int + ip2k_return_pops_args (fundecl, funtype, size) + tree fundecl ATTRIBUTE_UNUSED; + tree funtype; + int size; + { + if (TREE_CODE (funtype) == IDENTIFIER_NODE) + return size; + + if (TYPE_ARG_TYPES (funtype) == NULL_TREE + || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (funtype))) == void_type_node)) + return size; + + return 0; + } + + /* Return nonzero if FUNC is a naked function. */ + + static int + ip2k_naked_function_p (func) + tree func; + { + tree a; + + if (TREE_CODE (func) != FUNCTION_DECL) + abort (); + + a = lookup_attribute ("naked", DECL_ATTRIBUTES (func)); + return a != NULL_TREE; + } + + /* Output function prologue. */ + void + function_prologue (file, size) + FILE *file; + HOST_WIDE_INT size; + { + int leaf_func_p; + int main_p; + int reg; + rtx operands[2]; + + prologue_size = epilogue_size = 0; + + if (ip2k_naked_function_p (current_function_decl)) + { + fprintf (file, "/* prologue: naked */\n"); + return; + } + + leaf_func_p = leaf_function_p (); + main_p = ! strcmp ("main", current_function_name); + + /* For now, we compute all these facts about the function, but don't + take any action based on the information. */ + + prologue_size = 0; + fprintf (file, "/* prologue: frame size=%d */\n", size); + + /* Unless we're a leaf we need to save the return PC. */ + + if (! leaf_func_p) + { + OUT_AS1 (push, calll); + OUT_AS1 (push, callh); + prologue_size += 4; + } + + /* We need to save the old FP and set the new FP pointing at the + stack location where the old one is saved. Note that because of + post-decrement addressing, the SP is off-by-one after the + push, so we harvest the SP address BEFORE we push the MSBs of + the FP. */ + if (CHAIN_FRAMES) + { + OUT_AS1 (push, REG_FP+1); /* Save old LSBs. */ + OUT_AS2 (mov, w, spl); + OUT_AS2 (mov, REG_FP+1, w); /* SPL -> FPL */ + + OUT_AS2 (mov, w, sph); /* Freeze SP MSBs */ + OUT_AS1 (push, REG_FP); /* Save old MSBs */ + OUT_AS2 (mov, REG_FP, w); /* SPH -> FPH */ + prologue_size += 12; + } + + for (reg = (CHAIN_FRAMES) ? (REG_FP - 1) : (REG_FP + 1); + reg > 0; --reg) + { + if (regs_ever_live[reg] && ! call_used_regs[reg]) + { + fprintf (file, "\t" AS1 (push,%s) "\n", reg_names[reg]); + prologue_size += 2; + } + } + + if (size) + { + operands[0] = GEN_INT (size); + + switch (size & 0xff) + { + case 0: + break; + case 1: + OUT_AS1 (dec, spl); + prologue_size += 2; + break; + default: + OUT_AS2 (mov, w, %L0); + OUT_AS2 (sub, spl, w); + prologue_size += 4; + } + + switch (size & 0xff00) + { + case 0: + break; + case 0x100: + OUT_AS1 (dec, sph); + prologue_size += 2; + break; + default: + if ((size & 0xff) != ((size >> 8) & 0xff)) + OUT_AS2 (mov, w, %H0); /* Otherwise W has value we want. */ + OUT_AS2 (sub, sph, w); + prologue_size += 4; + } + } + + /* XXX - change this to use the carry-propagating subtract trick. */ + if (flag_stack_check) + { + OUT_AS2 (mov, w, sph); + OUT_AS2 (cmp, w, #%%hi8data(_end)); + OUT_AS1 (sc, ); /* C == 0 -> hi8(edata) < sph */ + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (sz, ); /* Z == 1 -> look at low byte */ + OUT_AS1 (page,0f); + OUT_AS1 (jmp,0f); /* sp < edata, so raise stack fault */ + OUT_AS2 (mov, w, spl); + OUT_AS2 (cmp, w, #%%lo8data(_end)); + OUT_AS1 (sc,); /* C==1 -> lo8(edata) >= spl */ + OUT_AS1 (page,1f); + OUT_AS1 (jmp,1f); + OUT_AS1 (0:,); + output_asm_insn ("push\t$ff", operands); + OUT_AS1 (system,); + OUT_AS1 (1:, ); + prologue_size += 30; + } + } + + /* Output function epilogue. */ + void + function_epilogue (file, size) + FILE *file; + HOST_WIDE_INT size; + { + int leaf_func_p; + int reg,savelimit; + rtx operands[2]; /* Dummy used by OUT_ASn */ + int args_locals_size = current_function_args_size; + int saved_regs_p = 0; + int need_ret = 1; + + /* Use this opportunity to reset the reorg flags! */ + ip2k_reorg_in_progress = 0; + ip2k_reorg_completed = 0; + ip2k_reorg_split_dimode = 0; + ip2k_reorg_split_simode = 0; + ip2k_reorg_split_himode = 0; + ip2k_reorg_split_qimode = 0; + ip2k_reorg_merge_qimode = 0; + + if (ip2k_naked_function_p (current_function_decl)) + { + fprintf (file, "/* epilogue: naked */\n"); + return; + } + + leaf_func_p = leaf_function_p (); + epilogue_size = 0; + fprintf (file, "/* epilogue: frame size=%d */\n", size); + + savelimit = (CHAIN_FRAMES) ? REG_FP : (REG_FP + 2); + for (reg = 0; reg < savelimit; reg++) + if (regs_ever_live[reg] && ! call_used_regs[reg]) + { + saved_regs_p = 1; + break; + } + + if (size) + { + if (leaf_func_p && !CHAIN_FRAMES && !saved_regs_p + && current_function_pops_args) + args_locals_size = current_function_args_size + size; + else + { + operands[0] = GEN_INT (size); + + switch (size & 0xff) + { + default: + OUT_AS2 (mov, w, %L0); + OUT_AS2 (add, spl, w); + epilogue_size += 4; + /* fall-thru */ + case 0: + break; + case 1: + OUT_AS1 (inc, spl); + epilogue_size += 2; + } + + switch (size & 0xff00) + { + default: + if ((size & 0xff) != ((size >> 8) & 0xff)) + OUT_AS2 (mov, w, %H0); + OUT_AS2 (add, sph, w); + epilogue_size += 4; + /* fall-thru */ + case 0: + break; + case 0x100: + OUT_AS1 (inc, sph); + epilogue_size += 2; + } + } + } + + for (reg = 0; reg < savelimit; reg++) + { + if (regs_ever_live[reg] && ! call_used_regs[reg]) + { + fprintf (file, "\t" AS1 (pop,%s) "\n", reg_names[reg]); + prologue_size += 2; + } + } + + if (CHAIN_FRAMES + && ! (current_function_pops_args + && current_function_args_size >= 2 + && current_function_args_size < 0x100)) + { + OUT_AS1 (pop, REG_FP); + OUT_AS1 (pop, REG_FP+1); + epilogue_size += 4; + } + + if (! leaf_func_p) + { + if (current_function_pops_args + && current_function_args_size >= 2 + && current_function_args_size < 0x100) + { + if (current_function_args_size == 2) + { + if (CHAIN_FRAMES) + { + OUT_AS1 (page, __fp_pop2_args_ret); + OUT_AS1 (jmp, __fp_pop2_args_ret); + } + else + { + OUT_AS1 (page, __pop2_args_ret); + OUT_AS1 (jmp, __pop2_args_ret); + } + epilogue_size += 4; + } + else + { + operands[0] = GEN_INT (current_function_args_size); + OUT_AS2 (mov, w, %L0); + if (CHAIN_FRAMES) + { + OUT_AS1 (page, __fp_pop_args_ret); + OUT_AS1 (jmp, __fp_pop_args_ret); + } + else + { + OUT_AS1 (page, __pop_args_ret); + OUT_AS1 (jmp, __pop_args_ret); + } + epilogue_size += 6; + } + need_ret = 0; + } + else + { + OUT_AS1 (pop, callh); + OUT_AS1 (pop, calll); + epilogue_size += 4; + } + } + else + { + if (current_function_pops_args + && args_locals_size >= 2 + && args_locals_size < 0x100) + { + if (args_locals_size == 2) + { + if (CHAIN_FRAMES) + { + OUT_AS1 (page, __leaf_fp_pop2_args_ret); + OUT_AS1 (jmp, __leaf_fp_pop2_args_ret); + epilogue_size += 4; + need_ret = 0; + } + } + else + { + operands[0] = GEN_INT (args_locals_size); + if (CHAIN_FRAMES) + { + OUT_AS2 (mov, w, %L0); + OUT_AS1 (page, __leaf_fp_pop_args_ret); + OUT_AS1 (jmp, __leaf_fp_pop_args_ret); + epilogue_size += 6; + need_ret = 0; + } + } + } + } + + if (current_function_pops_args && args_locals_size && need_ret) + { + operands[0] = GEN_INT (args_locals_size); + + switch (args_locals_size & 0xff) + { + default: + OUT_AS2 (mov, w, %L0); + OUT_AS2 (add, spl, w); + epilogue_size += 4; + /* fall-thru */ + + case 0: + break; + + case 1: + OUT_AS1 (inc, spl); + epilogue_size += 2; + } + + switch (args_locals_size & 0xff00) + { + default: + if ((args_locals_size & 0xff) != ((args_locals_size >> 8) & 0xff)) + OUT_AS2 (mov, w, %H0); + OUT_AS2 (add, sph, w); + epilogue_size += 4; + /* fall-thru */ + + case 0: + break; + + case 0x100: + OUT_AS1 (inc, sph); + epilogue_size += 2; + } + } + + if (need_ret) + { + OUT_AS1 (ret,); + epilogue_size += 2; + } + + fprintf (file, "/* epilogue end (size=%d) */\n", epilogue_size); + commands_in_prologues += prologue_size; + commands_in_epilogues += epilogue_size; + } + + /* Return the difference between the registers after the function + prologue. + + Stack Frame grows down: + + ARGUMENTS + <------ AP ($102:$103) + RETURN PC (unless leaf function) + SAVEDFP (if needed) + <------ FP [HARD_FRAME_POINTER] ($FD:$FE) + SAVED REGS + <------ VFP [$100:$101] + STACK ALLOCATION + <------ SP ($6:$7) */ + int + ip2k_init_elim_offset (from, to) + int from; + int to; + { + int leaf_func_p = leaf_function_p (); + int no_saved_pc = leaf_func_p + || ip2k_naked_function_p (current_function_decl); + int offset; + int reg; + int reglimit; + + if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) + return get_frame_size () + 1; + + if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) + return (CHAIN_FRAMES ? 2 : 0) + (no_saved_pc ? 0 : 2); + + /* Count all the registers we had to preserve. */ + + reglimit = CHAIN_FRAMES ? REG_FP : (REG_FP + 2); + for (offset = 0,reg = 0; reg < reglimit; ++reg) + { + if ((regs_ever_live[reg] && ! call_used_regs[reg])) + { + ++offset; + } + } + + if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) + return -offset; + + if (from == HARD_FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) + /* Add in the stack-local variables. */ + return offset + get_frame_size () + 1; + + if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) + /* Add stack-locals plus saved FP and PC. */ + return offset + get_frame_size () + 1 + + (CHAIN_FRAMES ? 2 : 0) + (no_saved_pc ? 0 : 2); + + abort (); /* Unanticipated elimination. */ + } + + /* Return nonzero if X (an RTX) is a legitimate memory address on the target + machine for a memory operand of mode MODE. */ + + int + legitimate_address_p (mode, x, strict) + enum machine_mode mode; + rtx x; + int strict; + { + int off; + + if (GET_CODE (x) == SUBREG) + x = SUBREG_REG (x); + + switch (GET_CODE (x)) + { + case REG: + /* IP allows indirection without offset - only okay if + we don't require access to multiple bytes. */ + if (REGNO (x) == REG_IP) + return (GET_MODE_SIZE (mode) == 1) ? 'R' : 0; + + /* We can indirect thru DP or SP register. */ + if (strict ? REG_OK_FOR_BASE_STRICT_P (x) + : REG_OK_FOR_BASE_NOSTRICT_P (x)) + return 'S'; + break; + + case PLUS: + /* Offsets from DP or SP are legal in the range 0..127 */ + { + rtx op1, op2; + + op1 = XEXP (x, 0); + op2 = XEXP (x, 1); + + if (REG_P (op2) && ! REG_P (op1)) + { + rtx tmp = op1; + op1 = op2; + op2 = tmp; + } + + /* Don't let anything but R+I thru.. */ + if (! REG_P (op1) + || REG_P (op2) + || GET_CODE (op2) != CONST_INT) + return 0; + + switch (REGNO (op1)) + { + case REG_DP: /* only 0..127 displacement */ + case REG_SP: + off = 2 * GET_MODE_SIZE (mode); + if (! off) + off = 1; + + if (INTVAL (op2) < 0 || INTVAL (op2) > (128 - off)) + return 0; /* Positive must be small enough that after + splitting all pieces are addressed. */ + return 'S'; /* Safe displacement. */ + + case REG_IP: + if (GET_MODE_SIZE (mode) <= 1 && INTVAL (op2) == 0) + return (GET_MODE_SIZE (mode) == 1) ? 'R' : 0; + return 0; + + case REG_AP: + case REG_FP: + case REG_VFP: + default: + if (strict || ! REG_OK_FOR_BASE_NOSTRICT_P (op1)) + return 0; /* Allow until reload. */ + + return 'S'; + } + } + break; + + case CONST: + case SYMBOL_REF: + /* We always allow references to things in code space. */ + return is_regfile_address (x) ? 0 : 'C'; + + case LABEL_REF: + return 'L'; + + default: + return 0; + } + + return 0; + } + + /* Is ADDR mode dependent? */ + int + ip2k_mode_dependent_address (addr) + rtx addr; + { + switch (GET_CODE (addr)) + { + case POST_INC: + case POST_DEC: + case PRE_INC: + case PRE_DEC: + return 1; + + case REG: + return (REGNO (addr) == REG_IP); /* Can't do IP displaced addresses. */ + + default: + return 0; /* Assume no dependency. */ + } + } + + /* Attempts to replace X with a valid + memory address for an operand of mode MODE. */ + + rtx + legitimize_address (x, oldx, mode, scratch) + rtx x; + rtx oldx ATTRIBUTE_UNUSED; + rtx scratch; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + rtx reg; + + /* You might think that we could split up a symbolic address by + adding the HIGH 8 bits and doing a displacement off the dp. But + because we only have 7 bits of offset, that doesn't actually + help. So only constant displacements are likely to obtain an + advantage. */ + + if (GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) + && GET_CODE (XEXP (x, 1)) == CONST_INT + && ! CONST_OK_FOR_LETTER_P (INTVAL (XEXP (x, 1)), 'K')) + { + int offset = INTVAL (XEXP (x, 1)); + + reg = scratch ? scratch : gen_reg_rtx (Pmode); + + emit_insn (gen_rtx_SET (VOIDmode, reg, + gen_rtx_PLUS (Pmode, XEXP (x, 0), + GEN_INT (offset & 0xffc0)))); + x = gen_rtx_PLUS (Pmode, reg, GEN_INT (offset & 0x3f)); + } + + return x; /* We don't have any other tricks. */ + } + + /* Determine if X is a 'data' address or a code address. All static + data and stack variables reside in data memory. Only code is believed + to be in PRAM or FLASH. */ + int + is_regfile_address (x) + rtx x; + { + while (1) + switch (GET_CODE (x)) + { + case SYMBOL_REF: + return ! SYMBOL_REF_FLAG (x); /* Declared as function. */ + case CONST: + case PLUS: + x = XEXP (x, 0); + break; + case CONST_INT: + case REG: + case SUBREG: + return 1; + case LABEL_REF: + return 0; + default: + return 0; + } + + return 0; + } + + /* Output ADDR to FILE as address. */ + + void + print_operand_address (file, addr) + FILE *file; + rtx addr; + { + switch (GET_CODE (addr)) + { + case SUBREG: + addr = alter_subreg (&addr); + /* fall-thru */ + + case REG: + fprintf (file, "(%s)", + REGNO (addr) == REG_DP ? "DP" + : REGNO (addr) == REG_SP ? "SP" + : REGNO (addr) == REG_IP ? "IP" + : REGNO (addr) == REG_VFP ? "VFP" /* Should never see this */ + : REGNO (addr) == REG_AP ? "AP" /* or this, either. */ + : reg_names[REGNO (addr)]); + break; + + case PRE_DEC: + case POST_INC: + abort (); + break; + + case CONST: + addr = XEXP (addr, 0); + print_operand_address (file, XEXP (addr, 0)); + fprintf (file, "+"); + print_operand_address (file, XEXP (addr, 1)); + return; + + case LO_SUM: + if (is_regfile_address (XEXP (addr, 1))) + fprintf (file, "%%lo8data("); + else + fprintf (file, "%%lo8insn("); + print_operand_address (file, XEXP (addr, 1)); + fprintf (file, ")"); + print_operand_address (file, XEXP (addr, 0)); + break; + + case PLUS: /* Ought to be stack or dp references. */ + if (XEXP (addr, 1) == const0_rtx + && GET_CODE (XEXP (addr, 0)) == PLUS) + { + print_operand_address (file, XEXP (addr, 0)); + return; + } + + if (! REG_P (XEXP (addr, 0)) || REGNO (XEXP (addr, 0)) != REG_IP) + print_operand_address (file, XEXP (addr, 1)); /* const */ + print_operand_address (file, XEXP (addr, 0)); /* (reg) */ + break; + + case HIGH: + if (is_regfile_address (XEXP (addr, 0))) + fprintf (file, "%%hi8data("); + else + fprintf (file, "%%hi8insn("); + output_addr_const (file, XEXP (addr, 0)); + fprintf (file, ")"); + break; + + default: + output_addr_const (file, addr); + } + } + + + /* Output X as assembler operand to file FILE. */ + + void + print_operand (file, x, code) + FILE *file; + rtx x; + int code; + { + int abcd = 0; + unsigned long value; + + switch (code) + { + case '<': /* Push */ + ip2k_stack_delta++; + return; + + case '>': /* Pop */ + ip2k_stack_delta--; + return; + + case 'A': + case 'B': + case 'C': + case 'D': + abcd = code - 'A'; + break; + + case 'H': + abcd = 0; + break; + + case 'L': + abcd = 1; + break; + + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + abcd = code - 'S'; + + default: + break; + } + + if (ip2k_short_operand (x, GET_MODE (x)) + && ip2k_address_uses_reg_p (x, REG_SP)) + /* An SP-relative address needs to account for interior stack + pushes that reload didn't know about when it calculated the + stack offset. */ + abcd += ip2k_stack_delta; + + switch (GET_CODE (x)) + { + case SUBREG: + x = alter_subreg (&x); + /* fall-thru */ + + case REG: + fprintf (file, reg_names[true_regnum (x) + abcd]); + break; + + case CONST_INT: + switch (code) + { + case 'x': + fprintf (file, "$%x", INTVAL (x) & 0xffff); + break; + + case 'b': + fprintf (file, "%d", INTVAL (x)); /* bit selector */ + break; + + case 'e': /* "1 << n" - e.g. "exp" */ + fprintf (file, "#%d", 1 << INTVAL (x)); + break; + + case 'A': + case 'B': + case 'C': + case 'D': + value = INTVAL (x); + value >>= 8 * (3 - abcd); + value &= 0xff; + + fprintf (file, "#%ld", value); + break; + + case 'H': + fprintf (file, "#%d", (INTVAL (x) >> 8) & 0xff); + break; + + case 'L': + fprintf (file, "#%d", INTVAL (x) & 0xff); + break; + + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + value = ((unsigned long long)INTVAL (x)) >> (8 * (7 - abcd)) & 0xff; + fprintf (file, "#%ld", value); + break; + + default: + fprintf (file, "#%d", INTVAL (x)); + } + break; + + case SYMBOL_REF: + case LABEL_REF: + case CODE_LABEL: + case CONST: + switch (code) + { + case 'A': + case 'B': + case 'C': + case 'D': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + abort (); /* Probably an error. */ + break; + + case 'H': + fprintf (file, "#%s(", + is_regfile_address (x) ? "%hi8data" + : "%hi8insn"); + print_operand_address (file, x); + fputc (')', file); + break; + + case 'L': + fprintf (file, "#%s(", + is_regfile_address (x) ? "%lo8data" + : "%lo8insn"); + print_operand_address (file, x); + fputc (')', file); + break; + + default: + print_operand_address (file, x); + } + break; + + case MEM: + { + rtx addr = XEXP (x, 0); + + if (GET_CODE (addr) == SUBREG) + addr = alter_subreg (&x); + + if (CONSTANT_P (addr) && abcd) + { + fputc ('(', file); + print_operand_address (file, addr); + fprintf (file, ")+%d", abcd); + } + else if (abcd) + { + switch (GET_CODE (addr)) + { + case PLUS: + abcd += INTVAL (XEXP (addr, 1)); + + /* Worry about (plus (plus (reg DP) (const_int 10)) + (const_int 0)) */ + if (GET_CODE (XEXP (addr, 0)) == PLUS) + { + addr = XEXP (addr, 0); + abcd += INTVAL (XEXP (addr, 1)); + } + + fprintf (file, "%d", abcd); + print_operand_address (file, XEXP (addr, 0)); + break; + + case REG: + default: + fprintf (file, "%d", abcd); + print_operand_address (file, addr); + } + } + else if (GET_CODE (addr) == REG + && (REGNO (addr) == REG_DP || REGNO (addr) == REG_SP)) + { + fprintf (file, "0"); + print_operand_address (file, addr); + } + else + print_operand_address (file, addr); + } + break; + + case CONST_DOUBLE: + /* Is this an integer or a floating point value? */ + if (GET_MODE (x) == VOIDmode) + { + switch (code) + { + case 'S': + case 'T': + case 'U': + case 'V': + value = CONST_DOUBLE_HIGH (x); + value >>= 8 * (3 - abcd); + value &= 0xff; + + fprintf (file, "#%ld", value); + break; + + case 'W': + case 'X': + case 'Y': + case 'Z': + value = CONST_DOUBLE_LOW (x); + value >>= 8 * (7 - abcd); + value &= 0xff; + + fprintf (file, "#%ld", value); + break; + } + + } + else + { + REAL_VALUE_TYPE rv; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, x); + REAL_VALUE_TO_TARGET_SINGLE (rv, value); + fprintf (file, "0x%lx", value); + } + break; + + default: + fatal_insn ("bad operand", x); + } + } + + /* Remember the operands for the compare. */ + const char * + ip2k_set_compare (x, y) + rtx x; + rtx y; + { + ip2k_compare_operands[0] = x; + ip2k_compare_operands[1] = y; + return ""; + } + + /* Emit the code for sCOND instructions. */ + const char * + ip2k_gen_sCOND (insn, code, dest) + rtx insn ATTRIBUTE_UNUSED; + enum rtx_code code; + rtx dest; + { + #define operands ip2k_compare_operands + enum machine_mode mode; + + operands[2] = dest; + + mode = GET_MODE (operands[0]); + if ((mode != QImode) && (mode != HImode) + && (mode != SImode) && (mode != DImode)) + mode = GET_MODE (operands[1]); + + /* We have a fast path for a specific type of QImode compare. We ought + to extend this for larger cases too but that wins less frequently and + introduces a lot of complexity. */ + if (mode == QImode + && !rtx_equal_p (operands[0], operands[2]) + && !rtx_equal_p (operands[1], operands[2]) + && (! REG_P (operands[2]) + || (ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[2]), 1) + && ip2k_xexp_not_uses_reg_p (operands[1], + REGNO (operands[2]), 1)))) + { + OUT_AS1 (clr, %2); + if (immediate_operand (operands[1], QImode) + && ((INTVAL (operands[1]) & 0xff) == 0xff)) + { + if (code == EQ) + OUT_AS2 (incsnz, w, %0); + else + OUT_AS2 (incsz, w, %0); + } + else if (immediate_operand (operands[1], QImode) + && ((INTVAL (operands[1]) & 0xff) == 0x01)) + { + if (code == EQ) + OUT_AS2 (decsnz, w, %0); + else + OUT_AS2 (decsz, w, %0); + } + else if (ip2k_compare_operands[1] == const0_rtx) + { + OUT_AS2 (mov, w, %0); + if (code == EQ) + OUT_AS1 (snz,); + else + OUT_AS1 (sz,); + } + else + { + OUT_AS2 (mov, w, %0); + if (code == EQ) + OUT_AS2 (csne, w, %1); + else + OUT_AS2 (cse, w, %1); + } + OUT_AS1 (inc, %2); + } + else + { + if (ip2k_compare_operands[1] == const0_rtx) + { + switch (mode) + { + case QImode: + OUT_AS2 (mov, w, %0); + break; + + case HImode: + OUT_AS2 (mov, w, %H0); + OUT_AS2 (or, w, %L0); + break; + + case SImode: + OUT_AS2 (mov, w, %A0); + OUT_AS2 (or, w, %B0); + OUT_AS2 (or, w, %C0); + OUT_AS2 (or, w, %D0); + break; + + case DImode: + OUT_AS2 (mov, w, %S0); + OUT_AS2 (or, w, %T0); + OUT_AS2 (or, w, %U0); + OUT_AS2 (or, w, %V0); + OUT_AS2 (or, w, %W0); + OUT_AS2 (or, w, %X0); + OUT_AS2 (or, w, %Y0); + OUT_AS2 (or, w, %Z0); + break; + + default: + abort (); + } + } + else + { + switch (mode) + { + case QImode: + OUT_AS2 (mov, w, %1); + OUT_AS2 (cmp, w, %0); + break; + + case HImode: + OUT_AS2 (mov, w, %H1); + OUT_AS2 (cmp, w, %H0); + OUT_AS1 (sz,); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %L1); + OUT_AS2 (cmp, w, %L0); + OUT_AS1 (2:,); + break; + + case SImode: + if (code == EQ) + { + OUT_AS2 (mov, w, #1); + OUT_AS2 (mov, mulh, w); + } + else + OUT_AS1 (clr, mulh); + OUT_AS2 (mov, w, %A1); + OUT_AS2 (cse, w, %A0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %B1); + OUT_AS2 (cse, w, %B0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %C1); + OUT_AS2 (cse, w, %C0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %D1); + OUT_AS2 (cse, w, %D0); + OUT_AS1 (2:,); + if (code == EQ) + OUT_AS1 (dec, mulh); + else + OUT_AS1 (inc, mulh); + OUT_AS2 (mov, w, mulh); + OUT_AS2 (mov, %2, w); + return ""; + + case DImode: + if (code == EQ) + { + OUT_AS2 (mov, w, #1); + OUT_AS2 (mov, mulh, w); + } + else + OUT_AS1 (clr, mulh); + OUT_AS2 (mov, w, %S1); + OUT_AS2 (cse, w, %S0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %T1); + OUT_AS2 (cse, w, %T0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %U1); + OUT_AS2 (cse, w, %U0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %V1); + OUT_AS2 (cse, w, %V0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %W1); + OUT_AS2 (cse, w, %W0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %X1); + OUT_AS2 (cse, w, %X0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %Y1); + OUT_AS2 (cse, w, %Y0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %Z1); + OUT_AS2 (cse, w, %Z0); + OUT_AS1 (2:,); + if (code == EQ) + OUT_AS1 (dec, mulh); + else + OUT_AS1 (inc, mulh); + OUT_AS2 (mov, w, mulh); + OUT_AS2 (mov, %2, w); + return ""; + + default: + abort (); + } + } + OUT_AS2 (mov, w, #0); + if (code == EQ) + OUT_AS1 (snz,); + else + OUT_AS1 (sz,); + OUT_AS1 (inc, wreg); + OUT_AS2 (mov, %2, w); + } + + return ""; + #undef operands + } + + const char * + ip2k_gen_signed_comp_branch (insn, code, label) + rtx insn; + enum rtx_code code; + rtx label; + { + #define operands ip2k_compare_operands + enum machine_mode mode; + int can_use_skip = 0; + rtx ninsn; + + operands[2] = label; + + mode = GET_MODE (operands[0]); + if ((mode != QImode) && (mode != HImode) + && (mode != SImode) && (mode != DImode)) + mode = GET_MODE (operands[1]); + + /* Look for situations where we can just skip the next instruction instead + of skipping and then branching! */ + ninsn = next_real_insn (insn); + if (ninsn + && (recog_memoized (ninsn) >= 0) + && get_attr_skip (ninsn) == SKIP_YES) + { + rtx skip_tgt = next_nonnote_insn (next_real_insn (insn)); + + /* The first situation is where the target of the jump is one insn + after the jump insn and the insn being jumped is only one machine + opcode long. */ + if (label == skip_tgt) + can_use_skip = 1; + else + { + /* If our skip target is in fact a code label then we ignore the + label and move onto the next useful instruction. Nothing we do + here has any effect on the use of skipping instructions. */ + if (GET_CODE (skip_tgt) == CODE_LABEL) + skip_tgt = next_nonnote_insn (skip_tgt); + + /* The second situation is where we have something of the form: + + test_condition + skip_conditional + page/jump label + + optional_label (this may or may not exist): + skippable_insn + page/jump label + + In this case we can eliminate the first "page/jump label". */ + if (GET_CODE (skip_tgt) == JUMP_INSN) + { + rtx set = single_set (skip_tgt); + if (GET_CODE (XEXP (set, 0)) == PC + && GET_CODE (XEXP (set, 1)) == LABEL_REF + && label == JUMP_LABEL (skip_tgt)) + can_use_skip = 2; + } + } + } + + /* gcc is a little braindead and does some rather stateful things while + inspecting attributes - we have to put this state back to what it's + supposed to be. */ + extract_constrain_insn_cached (insn); + + if (ip2k_compare_operands[1] == const0_rtx) /* These are easier. */ + { + switch (code) + { + case LT: + if (can_use_skip) + { + OUT_AS2 (sb, %0, 7); + } + else + { + OUT_AS2 (snb, %0, 7); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GT: + switch (mode) + { + case DImode: + OUT_AS2 (rl, w, %S0); + OUT_AS2 (mov, w, %S0); + OUT_AS2 (or, w, %T0); + OUT_AS2 (or, w, %U0); + OUT_AS2 (or, w, %V0); + OUT_AS2 (or, w, %W0); + OUT_AS2 (or, w, %X0); + OUT_AS2 (or, w, %Y0); + OUT_AS2 (or, w, %Z0); + OUT_AS1 (snz, ); + OUT_AS2 (setb, status, 0); + OUT_AS2 (sb, status, 0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case SImode: + OUT_AS2 (rl, w, %A0); + OUT_AS2 (mov, w, %A0); + OUT_AS2 (or, w, %B0); + OUT_AS2 (or, w, %C0); + OUT_AS2 (or, w, %D0); + OUT_AS1 (snz, ); + OUT_AS2 (setb, status, 0); + OUT_AS2 (sb, status, 0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case HImode: + OUT_AS2 (rl, w, %H0); + OUT_AS2 (mov, w, %H0); + OUT_AS2 (or, w, %L0); + OUT_AS1 (snz, ); + OUT_AS2 (setb, status, 0); + OUT_AS2 (sb, status, 0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case QImode: + OUT_AS2 (mov, w, %0); /* Will just do "sb w, 7". */ + OUT_AS1 (snz, ); + OUT_AS2 (setb, wreg, 7); + OUT_AS2 (sb, wreg, 7); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + default: + abort (); + } + break; + + case LE: + switch (mode) + { + case DImode: + OUT_AS2 (mov, w, %S0); + OUT_AS2 (or, w, %T0); + OUT_AS2 (or, w, %U0); + OUT_AS2 (or, w, %V0); + OUT_AS2 (or, w, %W0); + OUT_AS2 (or, w, %X0); + OUT_AS2 (or, w, %Y0); + OUT_AS2 (or, w, %Z0); /* Z is correct. */ + OUT_AS1 (sz, ); + OUT_AS2 (snb, %S0, 7); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case SImode: + OUT_AS2 (mov, w, %A0); + OUT_AS2 (or, w, %B0); + OUT_AS2 (or, w, %C0); + OUT_AS2 (or, w, %D0); /* Z is correct. */ + OUT_AS1 (sz, ); + OUT_AS2 (snb, %A0, 7); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case HImode: + OUT_AS2 (mov, w, %H0); + OUT_AS2 (or, w, %L0); + OUT_AS1 (sz, ); + OUT_AS2 (snb, %H0, 7); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case QImode: + OUT_AS2 (mov, w, %0); /* Will just do "sb w, 7". */ + OUT_AS1 (sz, ); + OUT_AS2 (snb, wreg, 7); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + default: + abort (); + } + break; + + case GE: + if (can_use_skip) + { + OUT_AS2 (snb, %0, 7); + } + else + { + OUT_AS2 (sb, %0, 7); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + default: + abort (); + } + return ""; + } + + /* signed compares are out of line because we can't get + the hardware to compute the overflow for us. */ + + switch (mode) + { + case QImode: + OUT_AS1 (push, %1%<); + OUT_AS1 (push, %0%>); + OUT_AS1 (page, __cmpqi2); + OUT_AS1 (call, __cmpqi2); + break; + + case HImode: + OUT_AS1 (push, %L1%<); + OUT_AS1 (push, %H1%<); + OUT_AS1 (push, %L0%<); + OUT_AS1 (push, %H0%>%>%>); + OUT_AS1 (page, __cmphi2); + OUT_AS1 (call, __cmphi2); + break; + + case SImode: + OUT_AS1 (push, %D1%<); + OUT_AS1 (push, %C1%<); + OUT_AS1 (push, %B1%<); + OUT_AS1 (push, %A1%<); + OUT_AS1 (push, %D0%<); + OUT_AS1 (push, %C0%<); + OUT_AS1 (push, %B0%<); + OUT_AS1 (push, %A0%>%>%>%>%>%>%>); + OUT_AS1 (page, __cmpsi2); + OUT_AS1 (call, __cmpsi2); + break; + + case DImode: + if (GET_CODE (operands[0]) == MEM + && true_regnum (XEXP (operands[0], 0)) == REG_DP) + { + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%>%>%>%>%>%>%>); + OUT_AS1 (page, __cmpdi2_dp); + OUT_AS1 (call, __cmpdi2_dp); + } + else + { + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%<); + OUT_AS1 (push, %Z0%<); + OUT_AS1 (push, %Y0%<); + OUT_AS1 (push, %X0%<); + OUT_AS1 (push, %W0%<); + OUT_AS1 (push, %V0%<); + OUT_AS1 (push, %U0%<); + OUT_AS1 (push, %T0%<); + OUT_AS1 (push, %S0%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>); + OUT_AS1 (page, __cmpdi2); + OUT_AS1 (call, __cmpdi2); + } + break; + + default: + abort (); + } + + switch (code) + { + case LT: + if (can_use_skip) + { + OUT_AS2 (cse, w, #0); + } + else + { + OUT_AS2 (csne, w, #0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GT: + if (can_use_skip) + { + OUT_AS2 (cse, w, #2); + } + else + { + OUT_AS2 (csne, w, #2); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case LE: + if (can_use_skip) + { + OUT_AS2 (snb, wreg, 1); + } + else + { + OUT_AS2 (sb, wreg, 1); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GE: + if (can_use_skip) + { + OUT_AS2 (csne, w, #0); + } + else + { + OUT_AS2 (cse, w, #0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + default: + abort (); + } + return ""; + #undef operands + } + + const char * + ip2k_gen_unsigned_comp_branch (insn, code, label) + rtx insn; + enum rtx_code code; + rtx label; + { + #define operands ip2k_compare_operands + enum machine_mode mode; + int imm_sub = 0; + int imm_cmp = 0; + int can_use_skip = 0; + rtx ninsn; + HOST_WIDE_INT const_low; + HOST_WIDE_INT const_high; + + operands[2] = label; + + mode = GET_MODE (operands[0]); + if ((mode != QImode) && (mode != HImode) && (mode != SImode) + && (mode != DImode)) + { + mode = GET_MODE (operands[1]); + } + + /* Look for situations where we can just skip the next instruction instead + of skipping and then branching! */ + ninsn = next_real_insn (insn); + if (ninsn + && (recog_memoized (ninsn) >= 0) + && get_attr_skip (ninsn) == SKIP_YES) + { + rtx skip_tgt = next_nonnote_insn (next_real_insn (insn)); + + /* The first situation is where the target of the jump is one insn + after the jump insn and the insn being jumped is only one machine + opcode long. */ + if (label == skip_tgt) + can_use_skip = 1; + else + { + /* If our skip target is in fact a code label then we ignore the + label and move onto the next useful instruction. Nothing we do + here has any effect on the use of skipping instructions. */ + if (GET_CODE (skip_tgt) == CODE_LABEL) + skip_tgt = next_nonnote_insn (skip_tgt); + + /* The second situation is where we have something of the form: + + test_condition + skip_conditional + page/jump label + + optional_label (this may or may not exist): + skippable_insn + page/jump label + + In this case we can eliminate the first "page/jump label". */ + if (GET_CODE (skip_tgt) == JUMP_INSN) + { + rtx set = single_set (skip_tgt); + if (GET_CODE (XEXP (set, 0)) == PC + && GET_CODE (XEXP (set, 1)) == LABEL_REF + && label == JUMP_LABEL (skip_tgt)) + can_use_skip = 2; + } + } + } + + /* gcc is a little braindead and does some rather stateful things while + inspecting attributes - we have to put this state back to what it's + supposed to be. */ + extract_constrain_insn_cached (insn); + + if (ip2k_compare_operands[1] == const0_rtx) + { + switch (code) + { + case LEU: + code = EQ; /* Nothing is LTU 0. */ + goto zero; + + case GTU: + code = NE; /* Anything nonzero is GTU. */ + /* fall-thru */ + + case EQ: + case NE: /* Test all the bits, result in + Z AND WREG. */ + zero: + switch (mode) + { + case DImode: + OUT_AS2 (mov, w, %S0); + OUT_AS2 (or, w, %T0); + OUT_AS2 (or, w, %U0); + OUT_AS2 (or, w, %V0); + OUT_AS2 (or, w, %W0); + OUT_AS2 (or, w, %X0); + OUT_AS2 (or, w, %Y0); + OUT_AS2 (or, w, %Z0); + break; + + case SImode: + OUT_AS2 (mov, w, %A0); + OUT_AS2 (or, w, %B0); + OUT_AS2 (or, w, %C0); + OUT_AS2 (or, w, %D0); + break; + + case HImode: + OUT_AS2 (mov, w, %H0); + OUT_AS2 (or, w, %L0); + break; + + case QImode: + OUT_AS2 (mov, w, %0); + break; + + default: + abort (); + } + + if (can_use_skip) + { + if (code == EQ) + OUT_AS1 (sz, ); + else + OUT_AS1 (snz, ); + } + else + { + if (code == EQ) + OUT_AS1 (snz,); + else + OUT_AS1 (sz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GEU: + /* Always succeed. */ + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case LTU: + /* Always fail. */ + break; + + default: + abort (); + } + return ""; + } + + /* Look at whether we have a constant as one of our operands. If we do + and it's in the position that we use to subtract from during our + normal optimized comparison concept then we have to shuffle things + around! */ + if (mode != QImode) + { + if ((immediate_operand (operands[1], GET_MODE (operands[1])) + && ((code == LEU) || (code == GTU))) + || (immediate_operand (operands[0], GET_MODE (operands[0])) + && ((code == LTU) || (code == GEU)))) + { + imm_sub = 1; + } + } + + /* Same as above - look if we have a constant that we can compare + for equality or non-equality. If we know this then we can look + for common value eliminations. Note that we want to ensure that + any immediate value is operand 1 to simplify the code later! */ + if ((code == EQ) || (code == NE)) + { + imm_cmp = immediate_operand (operands[1], GET_MODE (operands[1])); + if (! imm_cmp) + { + imm_cmp = immediate_operand (operands[0], GET_MODE (operands[0])); + if (imm_cmp) + { + rtx tmp = operands[1]; + operands[1] = operands[0]; + operands[0] = tmp; + } + } + } + + switch (mode) + { + case QImode: + switch (code) + { + case EQ: + if (imm_cmp && ((INTVAL (operands[1]) & 0xff) == 0xff)) + OUT_AS2 (incsnz, w, %0); + else if (imm_cmp && ((INTVAL (operands[1]) & 0xff) == 0x01)) + OUT_AS2 (decsnz, w, %0); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (csne, w, %0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case NE: + if (imm_cmp && ((INTVAL (operands[1]) & 0xff) == 0xff)) + OUT_AS2 (incsz, w, %0); + else if (imm_cmp && ((INTVAL (operands[1]) & 0xff) == 0x01)) + OUT_AS2 (decsz, w, %0); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (cse, w, %0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case GTU: + OUT_AS2 (mov, w, %0); + OUT_AS2 (cmp, w, %1); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case GEU: + OUT_AS2 (mov, w, %1); + OUT_AS2 (cmp, w, %0); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case LTU: + OUT_AS2 (mov, w, %1); + OUT_AS2 (cmp, w, %0); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + case LEU: + OUT_AS2 (mov, w, %0); + OUT_AS2 (cmp, w, %1); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + + default: + abort (); + } + break; + + case HImode: + switch (code) + { + case EQ: + { + unsigned char h = 0, l = 1; + + if (imm_cmp) + { + h = (INTVAL (operands[1]) >> 8) & 0xff; + l = INTVAL (operands[1]) & 0xff; + + if ((h == 0xff) && (l == 0xff)) + { + /* We should be able to do the following, but the + IP2k simulator doesn't like it and we get a load + of failures in gcc-c-torture. */ + OUT_AS2 (incsnz, w, %L0); + OUT_AS2 (incsz, w, %H0); + /* OUT_AS1 (skip,); Should have this */ + OUT_AS1 (page, 1f);/* Shouldn't need this! */ + OUT_AS1 (jmp, 1f); /* Shouldn't need this either. */ + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS1 (1:,); + break; + } + else if (h == 0) + { + if (l == 1) + OUT_AS2 (dec, w, %L0); + else + { + OUT_AS2 (mov, w, %L0); + OUT_AS2 (sub, w, %L1); + } + OUT_AS2 (or, w, %H0); + OUT_AS1 (snz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + } + else if (l == 0) + { + if (h == 1) + OUT_AS2 (dec, w, %H0); + else + { + OUT_AS2 (mov, w, %H0); + OUT_AS2 (sub, w, %H1); + } + OUT_AS2 (or, w, %L0); + OUT_AS1 (snz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + } + } + + OUT_AS2 (mov, w, %H1); + OUT_AS2 (cse, w, %H0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + if (! imm_cmp || (h != l)) + OUT_AS2 (mov, w, %L1); + OUT_AS2 (csne, w, %L0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS1 (2:,); + } + break; + + case NE: + { + unsigned char h = 0, l = 1; + + if (imm_cmp) + { + h = (INTVAL (operands[1]) >> 8) & 0xff; + l = INTVAL (operands[1]) & 0xff; + + if ((h == 0xff) && (l == 0xff)) + { + OUT_AS2 (incsnz, w, %L0); + OUT_AS2 (incsz, w, %H0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + } + else if (h == 0) + { + if (l == 1) + OUT_AS2 (dec, w, %L0); + else + { + OUT_AS2 (mov, w, %L0); + OUT_AS2 (sub, w, %L1); + } + OUT_AS2 (or, w, %H0); + OUT_AS1 (sz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + } + else if (l == 0) + { + if (h == 1) + OUT_AS2 (dec, w, %H0); + else + { + OUT_AS2 (mov, w, %H0); + OUT_AS2 (sub, w, %H1); + } + OUT_AS2 (or, w, %L0); + OUT_AS1 (sz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + break; + } + } + + OUT_AS2 (mov, w, %H1); + if (imm_cmp && (h == l)) + { + OUT_AS2 (csne, w, %H0); + OUT_AS2 (cse, w, %L0); + } + else + { + OUT_AS2 (cse, w, %H0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS2 (mov, w, %L1); + OUT_AS2 (cse, w, %L0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GTU: + if (imm_sub) + { + /* > 0xffff never suceeds! */ + if ((INTVAL (operands[1]) & 0xffff) != 0xffff) + { + operands[3] = GEN_INT (INTVAL (operands[1]) + 1); + OUT_AS2 (mov, w, %L3); + OUT_AS2 (sub, w, %L0); + OUT_AS2 (mov, w, %H3); + OUT_AS2 (subc, w, %H0); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %L0); + OUT_AS2 (sub, w, %L1); + OUT_AS2 (mov, w, %H0); + OUT_AS2 (subc, w, %H1); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GEU: + if (imm_sub) + { + if (INTVAL (operands[0]) == 0) + { + OUT_AS2 (mov, w, %H1); + OUT_AS2 (or, w, %L1); + OUT_AS1 (snz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (INTVAL (operands[0]) - 1); + OUT_AS2 (mov, w, %L3); + OUT_AS2 (sub, w, %L1); + OUT_AS2 (mov, w, %H3); + OUT_AS2 (subc, w, %H1); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %L1); + OUT_AS2 (sub, w, %L0); + OUT_AS2 (mov, w, %H1); + OUT_AS2 (subc, w, %H0); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case LTU: + if (imm_sub) + { + if (INTVAL (operands[0]) == 0) + { + OUT_AS2 (mov, w, %H1); + OUT_AS2 (or, w, %L1); + OUT_AS1 (sz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (INTVAL (operands[0]) - 1); + OUT_AS2 (mov, w, %L3); + OUT_AS2 (sub, w, %L1); + OUT_AS2 (mov, w, %H3); + OUT_AS2 (subc, w, %H1); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %L1); + OUT_AS2 (sub, w, %L0); + OUT_AS2 (mov, w, %H1); + OUT_AS2 (subc, w, %H0); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case LEU: + if (imm_sub) + { + if ((INTVAL (operands[1]) & 0xffff) == 0xffff) + { + /* <= 0xffff always suceeds. */ + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (INTVAL (operands[1]) + 1); + OUT_AS2 (mov, w, %L3); + OUT_AS2 (sub, w, %L0); + OUT_AS2 (mov, w, %H3); + OUT_AS2 (subc, w, %H0); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %L0); + OUT_AS2 (sub, w, %L1); + OUT_AS2 (mov, w, %H0); + OUT_AS2 (subc, w, %H1); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + default: + abort (); + } + break; + + case SImode: + switch (code) + { + case EQ: + { + unsigned char a = 0, b = 1, c = 2, d = 3; + + if (imm_cmp) + { + a = (INTVAL (operands[1]) >> 24) & 0xff; + b = (INTVAL (operands[1]) >> 16) & 0xff; + c = (INTVAL (operands[1]) >> 8) & 0xff; + d = INTVAL (operands[1]) & 0xff; + } + + OUT_AS2 (mov, w, %A1); + if (imm_cmp && (b == a)) + { + OUT_AS2 (csne, w, %A0); + OUT_AS2 (cse, w, %B0); + } + else + { + OUT_AS2 (cse, w, %A0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %B1); + OUT_AS2 (cse, w, %B0); + } + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + if (! imm_cmp || (c != b)) + OUT_AS2 (mov, w, %C1); + OUT_AS2 (cse, w, %C0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + if (! imm_cmp || (d != c)) + OUT_AS2 (mov, w, %D1); + OUT_AS2 (csne, w, %D0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS1 (2:,); + } + break; + + case NE: + { + unsigned char a = 0, b = 1, c = 2, d = 3; + + if (imm_cmp) + { + a = (INTVAL (operands[1]) >> 24) & 0xff; + b = (INTVAL (operands[1]) >> 16) & 0xff; + c = (INTVAL (operands[1]) >> 8) & 0xff; + d = INTVAL (operands[1]) & 0xff; + } + + OUT_AS2 (mov, w, %A1); + if (imm_cmp && (b == a)) + { + OUT_AS2 (csne, w, %A0); + OUT_AS2 (cse, w, %B0); + } + else + { + OUT_AS2 (cse, w, %A0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS2 (mov, w, %B1); + OUT_AS2 (cse, w, %B0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + if (! imm_cmp || (c != b)) + OUT_AS2 (mov, w, %C1); + if (imm_cmp && (d == c)) + { + OUT_AS2 (csne, w, %C0); + OUT_AS2 (cse, w, %D0); + } + else + { + OUT_AS2 (cse, w, %C0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS2 (mov, w, %D1); + OUT_AS2 (cse, w, %D0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GTU: + if (imm_sub) + { + /* > 0xffffffff never suceeds! */ + if ((unsigned HOST_WIDE_INT)(INTVAL (operands[1]) & 0xffffffff) + != 0xffffffff) + { + operands[3] = GEN_INT (INTVAL (operands[1]) + 1); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %D0); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %C0); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %B0); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %A0); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %D0); + OUT_AS2 (sub, w, %D1); + OUT_AS2 (mov, w, %C0); + OUT_AS2 (subc, w, %C1); + OUT_AS2 (mov, w, %B0); + OUT_AS2 (subc, w, %B1); + OUT_AS2 (mov, w, %A0); + OUT_AS2 (subc, w, %A1); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GEU: + if (imm_sub) + { + if (INTVAL (operands[0]) == 0) + { + OUT_AS2 (mov, w, %A1); + OUT_AS2 (or, w, %B1); + OUT_AS2 (or, w, %C1); + OUT_AS2 (or, w, %D1); + OUT_AS1 (snz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (INTVAL (operands[0]) - 1); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %D1); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %C1); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %B1); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %A1); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %D1); + OUT_AS2 (sub, w, %D0); + OUT_AS2 (mov, w, %C1); + OUT_AS2 (subc, w, %C0); + OUT_AS2 (mov, w, %B1); + OUT_AS2 (subc, w, %B0); + OUT_AS2 (mov, w, %A1); + OUT_AS2 (subc, w, %A0); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case LTU: + if (imm_sub) + { + if (INTVAL (operands[0]) == 0) + { + OUT_AS2 (mov, w, %A1); + OUT_AS2 (or, w, %B1); + OUT_AS2 (or, w, %C1); + OUT_AS2 (or, w, %D1); + OUT_AS1 (sz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (INTVAL (operands[0]) - 1); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %D1); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %C1); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %B1); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %A1); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %D1); + OUT_AS2 (sub, w, %D0); + OUT_AS2 (mov, w, %C1); + OUT_AS2 (subc, w, %C0); + OUT_AS2 (mov, w, %B1); + OUT_AS2 (subc, w, %B0); + OUT_AS2 (mov, w, %A1); + OUT_AS2 (subc, w, %A0); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case LEU: + if (imm_sub) + { + if ((unsigned HOST_WIDE_INT)(INTVAL (operands[1]) & 0xffffffff) + == 0xffffffff) + { + /* <= 0xffffffff always suceeds. */ + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (INTVAL (operands[1]) + 1); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %D0); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %C0); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %B0); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %A0); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %D0); + OUT_AS2 (sub, w, %D1); + OUT_AS2 (mov, w, %C0); + OUT_AS2 (subc, w, %C1); + OUT_AS2 (mov, w, %B0); + OUT_AS2 (subc, w, %B1); + OUT_AS2 (mov, w, %A0); + OUT_AS2 (subc, w, %A1); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + default: + abort (); + } + break; + + case DImode: + if (GET_CODE (operands[1]) == CONST_INT) + { + const_low = INTVAL (operands[1]); + const_high = (const_low >= 0) - 1; + } + else if (GET_CODE (operands[1]) == CONST_DOUBLE) + { + const_low = CONST_DOUBLE_LOW (operands[1]); + const_high = CONST_DOUBLE_HIGH (operands[1]); + } + switch (code) + { + case EQ: + { + unsigned char s = 0, t = 1, u = 2, v = 3; + unsigned char w = 4, x = 5, y = 6, z = 7; + if (optimize_size) + { + if (GET_CODE (operands[0]) == MEM + && true_regnum (XEXP (operands[0], 0)) == REG_DP) + { + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%>%>%>%>%>%>%>); + OUT_AS1 (page, __cmpdi2_dp); + OUT_AS1 (call, __cmpdi2_dp); + OUT_AS2 (csne, w, #1); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%<); + OUT_AS1 (push, %Z0%<); + OUT_AS1 (push, %Y0%<); + OUT_AS1 (push, %X0%<); + OUT_AS1 (push, %W0%<); + OUT_AS1 (push, %V0%<); + OUT_AS1 (push, %U0%<); + OUT_AS1 (push, %T0%<); + OUT_AS1 (push, %S0%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>); + OUT_AS1 (page, __cmpdi2); + OUT_AS1 (call, __cmpdi2); + OUT_AS2 (csne, w, #1); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + if (imm_cmp) + { + s = (const_high >> 24) & 0xff; + t = (const_high >> 16) & 0xff; + u = (const_high >> 8) & 0xff; + v = const_high & 0xff; + w = (const_low >> 24) & 0xff; + x = (const_low >> 16) & 0xff; + y = (const_low >> 8) & 0xff; + z = const_low & 0xff; + } + + OUT_AS2 (mov, w, %S1); + if (imm_cmp && (s == t)) + { + OUT_AS2 (csne, w, %S0); + OUT_AS2 (cse, w, %T0); + } + else + { + OUT_AS2 (cse, w, %S0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %T1); + OUT_AS2 (cse, w, %T0); + } + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + + OUT_AS2 (mov, w, %U1); + if (imm_cmp && (u == v)) + { + OUT_AS2 (csne, w, %U0); + OUT_AS2 (cse, w, %V0); + } + else + { + OUT_AS2 (cse, w, %U0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %V1); + OUT_AS2 (cse, w, %V0); + } + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + + OUT_AS2 (mov, w, %W1); + if (imm_cmp && (w == x)) + { + OUT_AS2 (csne, w, %W0); + OUT_AS2 (cse, w, %X0); + } + else + { + OUT_AS2 (cse, w, %W0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + OUT_AS2 (mov, w, %X1); + OUT_AS2 (cse, w, %X0); + } + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + + if (! imm_cmp || (x != y)) + OUT_AS2 (mov, w, %Y1); + OUT_AS2 (cse, w, %Y0); + OUT_AS1 (page, 2f); + OUT_AS1 (jmp, 2f); + if (! imm_cmp || (z != y)) + OUT_AS2 (mov, w, %Z1); + OUT_AS2 (csne, w, %Z0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS1 (2:,); + } + } + break; + + case NE: + { + unsigned char s = 0, t = 1, u = 2, v = 3; + unsigned char w = 4, x = 5, y = 6, z = 7; + + if (optimize_size) + { + if (GET_CODE (operands[0]) == MEM + && true_regnum (XEXP (operands[0], 0)) == REG_DP) + { + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%>%>%>%>%>%>%>); + OUT_AS1 (page, __cmpdi2_dp); + OUT_AS1 (call, __cmpdi2_dp); + OUT_AS2 (cse, w, #1); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%<); + OUT_AS1 (push, %Z0%<); + OUT_AS1 (push, %Y0%<); + OUT_AS1 (push, %X0%<); + OUT_AS1 (push, %W0%<); + OUT_AS1 (push, %V0%<); + OUT_AS1 (push, %U0%<); + OUT_AS1 (push, %T0%<); + OUT_AS1 (push, %S0%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>); + OUT_AS1 (page, __cmpdi2); + OUT_AS1 (call, __cmpdi2); + OUT_AS2 (cse, w, #1); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + if (imm_cmp) + { + s = (const_high >> 24) & 0xff; + t = (const_high >> 16) & 0xff; + u = (const_high >> 8) & 0xff; + v = const_high & 0xff; + w = (const_low >> 24) & 0xff; + x = (const_low >> 16) & 0xff; + y = (const_low >> 8) & 0xff; + z = const_low & 0xff; + } + + OUT_AS2 (mov, w, %S1); + if (imm_cmp && (s == t)) + { + OUT_AS2 (csne, w, %S0); + OUT_AS2 (cse, w, %T0); + } + else + { + OUT_AS2 (cse, w, %S0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS2 (mov, w, %T1); + OUT_AS2 (cse, w, %T0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + + OUT_AS2 (mov, w, %U1); + if (imm_cmp && (u == v)) + { + OUT_AS2 (csne, w, %U0); + OUT_AS2 (cse, w, %V0); + } + else + { + OUT_AS2 (cse, w, %U0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS2 (mov, w, %V1); + OUT_AS2 (cse, w, %V0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + + OUT_AS2 (mov, w, %W1); + if (imm_cmp && (w == x)) + { + OUT_AS2 (csne, w, %W0); + OUT_AS2 (cse, w, %X0); + } + else + { + OUT_AS2 (cse, w, %W0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS2 (mov, w, %X1); + OUT_AS2 (cse, w, %X0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + + if (! imm_cmp || (y != x)) + OUT_AS2 (mov, w, %Y1); + if (imm_cmp && (z == y)) + { + OUT_AS2 (csne, w, %Y0); + OUT_AS2 (cse, w, %Z0); + } + else + { + OUT_AS2 (cse, w, %Y0); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + OUT_AS2 (mov, w, %Z1); + OUT_AS2 (cse, w, %Z0); + } + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + break; + + case GTU: + if (imm_sub) + { + /* > 0xffffffffffffffff never suceeds! */ + if (((const_high & 0xffffffff) != 0xffffffff) + || ((const_low & 0xffffffff) != 0xffffffff)) + { + operands[3] = GEN_INT (const_low + 1); + operands[4] = GEN_INT (const_high + + (INTVAL (operands[3]) ? 0 : 1)); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %Z0); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %Y0); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %X0); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %W0); + OUT_AS2 (mov, w, %D4); + OUT_AS2 (subc, w, %V0); + OUT_AS2 (mov, w, %C4); + OUT_AS2 (subc, w, %U0); + OUT_AS2 (mov, w, %B4); + OUT_AS2 (subc, w, %T0); + OUT_AS2 (mov, w, %A4); + OUT_AS2 (subc, w, %S0); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %Z0); + OUT_AS2 (sub, w, %Z1); + OUT_AS2 (mov, w, %Y0); + OUT_AS2 (subc, w, %Y1); + OUT_AS2 (mov, w, %X0); + OUT_AS2 (subc, w, %X1); + OUT_AS2 (mov, w, %W0); + OUT_AS2 (subc, w, %W1); + OUT_AS2 (mov, w, %V0); + OUT_AS2 (subc, w, %V1); + OUT_AS2 (mov, w, %U0); + OUT_AS2 (subc, w, %U1); + OUT_AS2 (mov, w, %T0); + OUT_AS2 (subc, w, %T1); + OUT_AS2 (mov, w, %S0); + OUT_AS2 (subc, w, %S1); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case GEU: + if (imm_sub) + { + HOST_WIDE_INT const_low0; + HOST_WIDE_INT const_high0; + + if (GET_CODE (operands[0]) == CONST_INT) + { + const_low0 = INTVAL (operands[0]); + const_high0 = (const_low >= 0) - 1; + } + else if (GET_CODE (operands[0]) == CONST_DOUBLE) + { + const_low0 = CONST_DOUBLE_LOW (operands[0]); + const_high0 = CONST_DOUBLE_HIGH (operands[0]); + } + + if (const_high0 == 0 && const_low0 == 0) + { + OUT_AS2 (mov, w, %S1); + OUT_AS2 (or, w, %T1); + OUT_AS2 (or, w, %U1); + OUT_AS2 (or, w, %V1); + OUT_AS2 (or, w, %W1); + OUT_AS2 (or, w, %X1); + OUT_AS2 (or, w, %Y1); + OUT_AS2 (or, w, %Z1); + OUT_AS1 (snz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (const_low0 - 1); + operands[4] = GEN_INT (const_high0 - (const_low0 ? 1 : 0)); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %Z1); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %Y1); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %X1); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %W1); + OUT_AS2 (mov, w, %D4); + OUT_AS2 (subc, w, %V1); + OUT_AS2 (mov, w, %C4); + OUT_AS2 (subc, w, %U1); + OUT_AS2 (mov, w, %B4); + OUT_AS2 (subc, w, %T1); + OUT_AS2 (mov, w, %A4); + OUT_AS2 (subc, w, %S1); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %Z1); + OUT_AS2 (sub, w, %Z0); + OUT_AS2 (mov, w, %Y1); + OUT_AS2 (subc, w, %Y0); + OUT_AS2 (mov, w, %X1); + OUT_AS2 (subc, w, %X0); + OUT_AS2 (mov, w, %W1); + OUT_AS2 (subc, w, %W0); + OUT_AS2 (mov, w, %V1); + OUT_AS2 (subc, w, %V0); + OUT_AS2 (mov, w, %U1); + OUT_AS2 (subc, w, %U0); + OUT_AS2 (mov, w, %T1); + OUT_AS2 (subc, w, %T0); + OUT_AS2 (mov, w, %S1); + OUT_AS2 (subc, w, %S0); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case LTU: + if (imm_sub) + { + HOST_WIDE_INT const_low0; + HOST_WIDE_INT const_high0; + + if (GET_CODE (operands[0]) == CONST_INT) + { + const_low0 = INTVAL (operands[0]); + const_high0 = (const_low >= 0) - 1; + } + else if (GET_CODE (operands[0]) == CONST_DOUBLE) + { + const_low0 = CONST_DOUBLE_LOW (operands[0]); + const_high0 = CONST_DOUBLE_HIGH (operands[0]); + } + + if (const_high0 == 0 && const_low0 == 0) + { + OUT_AS2 (mov, w, %S1); + OUT_AS2 (or, w, %T1); + OUT_AS2 (or, w, %U1); + OUT_AS2 (or, w, %V1); + OUT_AS2 (or, w, %W1); + OUT_AS2 (or, w, %X1); + OUT_AS2 (or, w, %Y1); + OUT_AS2 (or, w, %Z1); + OUT_AS1 (sz,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (const_low0 - 1); + operands[4] = GEN_INT (const_high0 - (const_low0 ? 1 : 0)); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %Z1); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %Y1); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %X1); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %W1); + OUT_AS2 (mov, w, %D4); + OUT_AS2 (subc, w, %V1); + OUT_AS2 (mov, w, %C4); + OUT_AS2 (subc, w, %U1); + OUT_AS2 (mov, w, %B4); + OUT_AS2 (subc, w, %T1); + OUT_AS2 (mov, w, %A4); + OUT_AS2 (subc, w, %S1); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %Z1); + OUT_AS2 (sub, w, %Z0); + OUT_AS2 (mov, w, %Y1); + OUT_AS2 (subc, w, %Y0); + OUT_AS2 (mov, w, %X1); + OUT_AS2 (subc, w, %X0); + OUT_AS2 (mov, w, %W1); + OUT_AS2 (subc, w, %W0); + OUT_AS2 (mov, w, %V1); + OUT_AS2 (subc, w, %V0); + OUT_AS2 (mov, w, %U1); + OUT_AS2 (subc, w, %U0); + OUT_AS2 (mov, w, %T1); + OUT_AS2 (subc, w, %T0); + OUT_AS2 (mov, w, %S1); + OUT_AS2 (subc, w, %S0); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + case LEU: + if (imm_sub) + { + if (((const_high & 0xffffffff) == 0xffffffff) + && ((const_low & 0xffffffff) == 0xffffffff)) + { + /* <= 0xffffffffffffffff always suceeds. */ + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + else + { + operands[3] = GEN_INT (const_low + 1); + operands[4] = GEN_INT (const_high + + (INTVAL (operands[3]) ? 0 : 1)); + OUT_AS2 (mov, w, %D3); + OUT_AS2 (sub, w, %Z0); + OUT_AS2 (mov, w, %C3); + OUT_AS2 (subc, w, %Y0); + OUT_AS2 (mov, w, %B3); + OUT_AS2 (subc, w, %X0); + OUT_AS2 (mov, w, %A3); + OUT_AS2 (subc, w, %W0); + OUT_AS2 (mov, w, %D4); + OUT_AS2 (subc, w, %V0); + OUT_AS2 (mov, w, %C4); + OUT_AS2 (subc, w, %U0); + OUT_AS2 (mov, w, %B4); + OUT_AS2 (subc, w, %T0); + OUT_AS2 (mov, w, %A4); + OUT_AS2 (subc, w, %S0); + OUT_AS1 (sc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + } + else + { + OUT_AS2 (mov, w, %Z0); + OUT_AS2 (sub, w, %Z1); + OUT_AS2 (mov, w, %Y0); + OUT_AS2 (subc, w, %Y1); + OUT_AS2 (mov, w, %X0); + OUT_AS2 (subc, w, %X1); + OUT_AS2 (mov, w, %W0); + OUT_AS2 (subc, w, %W1); + OUT_AS2 (mov, w, %V0); + OUT_AS2 (subc, w, %V1); + OUT_AS2 (mov, w, %U0); + OUT_AS2 (subc, w, %U1); + OUT_AS2 (mov, w, %T0); + OUT_AS2 (subc, w, %T1); + OUT_AS2 (mov, w, %S0); + OUT_AS2 (subc, w, %S1); + OUT_AS1 (snc,); + OUT_AS1 (page, %2); + OUT_AS1 (jmp, %2); + } + break; + + default: + abort (); + } + break; + + default: + abort (); + } + #undef operands + return ""; + } + + /* Output rtx VALUE as .byte to file FILE. */ + + void + asm_output_char(file, value) + FILE *file; + rtx value; + { + fprintf (file, "\t.byte "); + output_addr_const (file, value); + fprintf (file, "\n"); + } + + + /* Output VALUE as .byte to file FILE. */ + + void + asm_output_byte (file,value) + FILE *file; + int value; + { + fprintf (file, "\t.byte 0x%x\n",value & 0xff); + } + + + /* Output rtx VALUE as .word to file FILE. */ + + void + asm_output_short (file, value) + FILE *file; + rtx value; + { + fprintf (file, "\t.word "); + output_addr_const (file, (value)); + fprintf (file, "\n"); + } + + + /* Output real N to file FILE. */ + + void + asm_output_float (file, n) + FILE *file; + REAL_VALUE_TYPE n; + { + long val; + char dstr[100]; + + REAL_VALUE_TO_TARGET_SINGLE (n, val); + real_to_decimal (dstr, &n, sizeof (dstr), 0, 1); + + fprintf (file, "\t.long 0x%08lx\t/* %s */\n", val, dstr); + } + + /* Sets section name for declaration DECL. */ + + void + unique_section (decl, reloc) + tree decl; + int reloc ATTRIBUTE_UNUSED; + { + int len; + const char *name; + char *string; + const char *prefix; + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + /* Strip off any encoding in name. */ + name = (* targetm.strip_name_encoding) (name); + + if (TREE_CODE (decl) == FUNCTION_DECL) + { + if (flag_function_sections) + prefix = ".text."; + else + prefix = ".text"; + } + else + abort (); + + if (flag_function_sections) + { + len = strlen (name) + strlen (prefix); + string = alloca (len + 1); + sprintf (string, "%s%s", prefix, name); + DECL_SECTION_NAME (decl) = build_string (len, string); + } + } + + + /* Output section name to file FILE. */ + + void + asm_output_section_name(file, decl, name, reloc) + FILE *file; + tree decl ATTRIBUTE_UNUSED; + const char *name; + int reloc ATTRIBUTE_UNUSED; + { + fprintf (file, ".section %s\n", name); + } + + /* Return value is nonzero if pseudos that have been + assigned to registers of class CLASS would likely be spilled + because registers of CLASS are needed for spill registers. */ + + enum reg_class + class_likely_spilled_p(c) + int c; + { + return (c == IP_REGS + || c == IPL_REGS + || c == IPH_REGS + || c == DP_SP_REGS + || c == SP_REGS + || c == DP_REGS + || c == DPL_REGS + || c == DPH_REGS + || c == PTR_REGS); + } + + /* Valid attributes: + progmem - put data to program memory; + naked - don't generate function prologue/epilogue and `ret' command. + + Only `progmem' attribute valid for type. */ + + const struct attribute_spec ip2k_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ + { "progmem", 0, 0, false, false, false, ip2k_handle_progmem_attribute }, + { "naked", 0, 0, true, false, false, ip2k_handle_fndecl_attribute }, + { NULL, 0, 0, false, false, false, NULL } + }; + + /* Handle a "progmem" attribute; arguments as in + struct attribute_spec.handler. */ + static tree + ip2k_handle_progmem_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (DECL_P (*node)) + { + if (TREE_CODE (*node) == TYPE_DECL) + { + /* This is really a decl attribute, not a type attribute, + but try to handle it for GCC 3.0 backwards compatibility. */ + + tree type = TREE_TYPE (*node); + tree attr = tree_cons (name, args, TYPE_ATTRIBUTES (type)); + tree newtype = build_type_attribute_variant (type, attr); + + TYPE_MAIN_VARIANT (newtype) = TYPE_MAIN_VARIANT (type); + TREE_TYPE (*node) = newtype; + *no_add_attrs = true; + } + else if (TREE_STATIC (*node) || DECL_EXTERNAL (*node)) + { + if (DECL_INITIAL (*node) == NULL_TREE && !DECL_EXTERNAL (*node)) + { + warning ("only initialized variables can be placed into " + "program memory area"); + *no_add_attrs = true; + } + } + else + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + } + + return NULL_TREE; + } + + /* Handle an attribute requiring a FUNCTION_DECL; arguments as in + struct attribute_spec.handler. */ + static tree + ip2k_handle_fndecl_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name; + tree args ATTRIBUTE_UNUSED; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; + { + if (TREE_CODE (*node) != FUNCTION_DECL) + { + warning ("`%s' attribute only applies to functions", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; + } + + /* Encode section information about tree DECL. */ + + void + encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (! DECL_P (decl)) + return; + + if (TREE_CODE (decl) == FUNCTION_DECL) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + + /* Outputs to the stdio stream FILE some + appropriate text to go at the start of an assembler file. */ + + void + asm_file_start (file) + FILE *file; + { + output_file_directive (file, main_input_filename); + + commands_in_prologues = 0; + commands_in_epilogues = 0; + } + + /* Outputs to the stdio stream FILE some + appropriate text to go at the end of an assembler file. */ + + void + asm_file_end (file) + FILE *file; + { + fprintf + (file, + "/* File %s: prologues %3d, epilogues %3d */\n", + main_input_filename, commands_in_prologues, commands_in_epilogues); + } + + /* Cost functions. */ + + /* Calculate the cost of X code of the expression in which it is contained, + found in OUTER_CODE. */ + + int + default_rtx_costs (x, code, outer_code) + rtx x; + enum rtx_code code; + enum rtx_code outer_code; + { + enum machine_mode mode = GET_MODE (x); + int extra_cost = 0; + int total; + + switch (code) + { + case MEM: + return ip2k_address_cost (XEXP (x, 0)); + + case ROTATE: + case ROTATERT: + case ASHIFT: + case LSHIFTRT: + case ASHIFTRT: + if (GET_CODE (XEXP (x, 1)) == CONST_INT) + { + int val = INTVAL (XEXP (x, 1)); + int cost; + + /* Shift by const instructions are proportional to + the shift count modulus 8. Note that we increase the mode + size multiplier by 1 to account for clearing the carry flag. */ + cost = COSTS_N_INSNS (abs (val) % 8); + cost += rtx_cost (XEXP (x, 0), code); + cost *= (GET_MODE_SIZE (mode) + 1); + + /* Sign-preserving shifts require 2 extra instructions. */ + if (code == ASHIFT) + cost += COSTS_N_INSNS (2); + return cost; + } + total = rtx_cost (XEXP (x, 0), code); + total += COSTS_N_INSNS (GET_MODE_SIZE (mode) * 8); + return total; + + case MINUS: + case PLUS: + case AND: + case XOR: + case IOR: + total = rtx_cost (XEXP (x, 0), code) + + rtx_cost (XEXP (x, 1), code); + total += COSTS_N_INSNS (GET_MODE_SIZE (mode) * 3); + return total; + + case MOD: + case DIV: + if (mode == QImode) + return COSTS_N_INSNS (20); + if (mode == HImode) + return COSTS_N_INSNS (60); + else if (mode == SImode) + return COSTS_N_INSNS (180); + else + return COSTS_N_INSNS (540); + + case MULT: + /* These costs are OK, but should really handle subtle cases + where we're using sign or zero extended args as these are + *much* cheaper than those given below! */ + if (mode == QImode) + return COSTS_N_INSNS (4); + if (mode == HImode) + return COSTS_N_INSNS (12); + if (mode == SImode) + return COSTS_N_INSNS (36); + else + return COSTS_N_INSNS (108); + + case NEG: + case SIGN_EXTEND: + extra_cost = COSTS_N_INSNS (GET_MODE_SIZE (mode)); + + /* Fall through. */ + case NOT: + case COMPARE: + case ABS: + total = rtx_cost (XEXP (x, 0), code); + return total + extra_cost + COSTS_N_INSNS (GET_MODE_SIZE (mode) * 2); + + case TRUNCATE: + case ZERO_EXTEND: + if (outer_code == SET) + return rtx_cost (XEXP (x, 0), code) + + COSTS_N_INSNS (GET_MODE_SIZE (mode) * 3 / 2); + else + return -(COSTS_N_INSNS (GET_MODE_SIZE (mode)) / 2); + + case IF_THEN_ELSE: + return rtx_cost (XEXP (x, 0), code) + + COSTS_N_INSNS (2); + + case EQ: + case NE: + case LTU: + case GTU: + case LEU: + case GEU: + case LT: + case GT: + case LE: + case GE: + return rtx_cost (XEXP (x, 0), code) + + rtx_cost (XEXP (x, 1), code); + + default: + return COSTS_N_INSNS (4); + } + } + + /* Calculate the cost of a memory address. */ + + int + ip2k_address_cost (x) + rtx x; + { + switch (legitimate_address_p (VOIDmode, x, 0)) + { + case 'S': /* Very low cost - (IP), (SP+N) or (DP+N) */ + return 8; + + case 'R': /* Indirected through IP. */ + return 8; + + case 'L': /* Label references. */ + return 0; + + case 'C': /* Constants and symbol references. */ + return 4; + + default: + return 1000; /* Must reload. */ + } + } + + /* As part of the machine-dependent reorg we look for opcode sequences where + we do some operation and then move the results back to one of the original + source operands. With working on the source operand directly is probably + much cheaper and the move from this to the original source operand will be + no more expensive than the original move. */ + + #ifdef IP2K_MD_REORG_PASS + static void + mdr_resequence_xy_yx (first_insn) + rtx first_insn; + { + rtx insn; + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + rtx set; + + if (GET_CODE (insn) != INSN) + continue; + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + continue; + + /* Look for operations that tend to be very cheap to run when the source + * and dest args are the same because the IP2022 has opcodes that can + operate on the source directly. If we have to spill through the W + register then we've possibly not got a good case for doing this. */ + if ((GET_CODE (XEXP (set, 0)) == REG + || GET_CODE (XEXP (set, 0)) == MEM) + && (GET_CODE (XEXP (set, 1)) == ASHIFT + || GET_CODE (XEXP (set, 1)) == ASHIFTRT + || GET_CODE (XEXP (set, 1)) == LSHIFTRT + || GET_CODE (XEXP (set, 1)) == XOR + || GET_CODE (XEXP (set, 1)) == IOR + || GET_CODE (XEXP (set, 1)) == AND + || GET_CODE (XEXP (set, 1)) == PLUS + || GET_CODE (XEXP (set, 1)) == MINUS + || GET_CODE (XEXP (set, 1)) == MULT)) + { + rtx set2; + rtx next_insn; + + next_insn = next_nonnote_insn (insn); + if (! next_insn) + continue; + + if (GET_CODE (next_insn) != INSN) + continue; + + set2 = ((GET_CODE (PATTERN (next_insn)) == SET) + ? PATTERN (next_insn) : NULL_RTX); + if (set2 == NULL_RTX) + continue; + + if ((GET_CODE (XEXP (XEXP (set, 1), 0)) == REG + || GET_CODE (XEXP (XEXP (set, 1), 0)) == MEM) + && rtx_equal_p (XEXP (set2, 0), XEXP (XEXP (set, 1), 0)) + && rtx_equal_p (XEXP (set2, 1), XEXP (set, 0))) + { + rtx next2_insn; + rtx b_insn; + + b_insn = gen_rtx_SET (VOIDmode, + XEXP (XEXP (set, 1), 0), + gen_rtx_fmt_ee (GET_CODE (XEXP (set, 1)), + GET_MODE (XEXP (set, 0)), + XEXP (XEXP (set, 1), 0), + XEXP (XEXP (set, 1), 1))); + + emit_insn_before (b_insn, insn); + b_insn = gen_rtx_SET (GET_MODE (XEXP (set, 0)), XEXP (set, 0), + XEXP (XEXP (set, 1), 0)); + next2_insn = emit_insn_before (b_insn, insn); + delete_insn (insn); + delete_insn (next_insn); + insn = next2_insn; + continue; + } + + /* Having tried with one operand of the expression, now, if + appropriate, try to do the same thing with the second operand. + Of course there are fewer operations that can match here + because they must be commutative. */ + if (GET_RTX_CLASS (GET_CODE (XEXP (set, 1))) == 'c' + && (GET_CODE (XEXP (XEXP (set, 1), 1)) == REG + || GET_CODE (XEXP (XEXP (set, 1), 1)) == MEM) + && rtx_equal_p (XEXP (set2, 0), XEXP (XEXP (set, 1), 1)) + && rtx_equal_p (XEXP (set2, 1), XEXP (set, 0))) + { + rtx rtx_ee; + rtx next2_insn; + int swap_args; + + /* Try to ensure that we put things in a canonical form. */ + swap_args = (GET_CODE (XEXP (XEXP (set, 1), 0)) == REG + || GET_CODE (XEXP (XEXP (set, 1), 0)) == MEM); + rtx_ee = gen_rtx_fmt_ee (GET_CODE (XEXP (set, 1)), + GET_MODE (XEXP (set, 0)), + XEXP (XEXP (set, 1), swap_args ? 1 : 0), + XEXP (XEXP (set, 1), + swap_args ? 0 : 1)); + + emit_insn_before (gen_rtx_SET (VOIDmode, + XEXP (XEXP (set, 1), 1), + rtx_ee), + insn); + next2_insn = emit_insn_before (gen_rtx_SET + (GET_MODE (XEXP (set, 0)), + XEXP (set, 0), + XEXP (XEXP (set, 1), 1)), + insn); + delete_insn (insn); + delete_insn (next_insn); + insn = next2_insn; + } + } + } + } + + /* Replace and recurse until we've tried QImode pieces! */ + + static void + mdr_pres_replace_and_recurse (orig, with, insn) + rtx orig; + rtx with; + rtx insn; + { + enum machine_mode new_mode; + + validate_replace_rtx (orig, with, insn); + + switch (GET_MODE (orig)) + { + case DImode: + case DFmode: + new_mode = SImode; + break; + + case SImode: + case SFmode: + new_mode = HImode; + break; + + case HImode: + new_mode = QImode; + break; + + default: + return; + } + + mdr_pres_replace_and_recurse (ip2k_get_low_half (orig, new_mode), + ip2k_get_low_half (with, new_mode), + insn); + mdr_pres_replace_and_recurse (ip2k_get_high_half (orig, new_mode), + ip2k_get_high_half (with, new_mode), + insn); + } + + /* Assist the following function, mdr_propagate_reg_equivs(). */ + + static void + mdr_propagate_reg_equivs_sequence (first_insn, orig, equiv) + rtx first_insn; + rtx orig; + rtx equiv; + { + rtx try_insn; + rtx try_equiv = equiv; + + /* First scan the RTL looking for anything else that might clobber what + we're doing. If we find anything then we can't do the replacement. */ + for (try_insn = next_nonnote_insn (first_insn); + try_insn; try_insn = next_nonnote_insn (try_insn)) + { + rtx pattern; + + if (GET_CODE (try_insn) != JUMP_INSN && GET_CODE (try_insn) != INSN) + continue; + + pattern = PATTERN (try_insn); + if (GET_CODE (pattern) == PARALLEL) + { + int j; + + for (j = 0; j < XVECLEN (pattern, 0); j++) + { + rtx px = XVECEXP (pattern, 0, j); + + if (GET_CODE (px) == SET) + if (! ip2k_composite_xexp_not_uses_reg_p (XEXP (px, 0), + REGNO (orig), + GET_MODE_SIZE (GET_MODE (orig)))) + return; + } + } + else if (GET_CODE (pattern) == SET) + { + if (! ip2k_composite_xexp_not_uses_reg_p (XEXP (pattern, 0), + REGNO (orig), + GET_MODE_SIZE (GET_MODE (orig)))) + return; + } + } + + /* Once we've decided that we're safe to do the replacement then make the + changes. */ + for (try_insn = next_nonnote_insn (first_insn); try_insn; + try_insn = next_nonnote_insn (try_insn)) + { + rtx set; + rtx new_equiv = NULL_RTX; + + if (GET_CODE (try_insn) != JUMP_INSN && GET_CODE (try_insn) != INSN) + { + try_equiv = equiv; + continue; + } + + set = ((GET_CODE (PATTERN (try_insn)) == SET) + ? PATTERN (try_insn) : NULL_RTX); + if (set == NULL_RTX) + continue; + + /* We look for a special case of "push" operations screwing our + register equivalence when it's based on a stack slot. We can + track this one and replace the old equivalence expression with + a new one. */ + if (GET_CODE (XEXP (set, 0)) == MEM + && GET_CODE (XEXP (XEXP (set, 0), 0)) == POST_DEC + && REG_P (XEXP (XEXP (XEXP (set, 0), 0), 0)) + && REGNO (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG_SP) + { + /* XXX - need to ensure that we can track this without going + out of range! */ + HOST_WIDE_INT disp = (INTVAL (XEXP (XEXP (try_equiv, 0), 1)) + + GET_MODE_SIZE (GET_MODE (XEXP (set, 0)))); + new_equiv = gen_rtx_MEM (GET_MODE (try_equiv), + gen_rtx_PLUS (Pmode, + gen_rtx_REG (HImode, REG_SP), + GEN_INT (disp))); + } + + /* The replacement process is somewhat complicated by the fact that we + might be dealing with what were originally subregs and thus we have + to replace parts of our original expression! */ + mdr_pres_replace_and_recurse (orig, try_equiv, try_insn); + + if (new_equiv != NULL_RTX) + try_equiv = new_equiv; + } + } + + /* Try propagating register equivalences forwards. It may be that we can + replace a register use with an equivalent expression that already + holds the same value and thus allow one or more register loads to + be eliminated. */ + + static void + mdr_propagate_reg_equivs (first_insn) + rtx first_insn; + { + rtx insn; + rtx set; + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) != INSN) + continue; + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + continue; + + /* Have we found a stack slot equivalence for a register? */ + if (REG_P (XEXP (set, 0)) + && REGNO (XEXP (set, 0)) >= 0x88 + && GET_CODE (XEXP (set, 1)) == MEM + && GET_CODE (XEXP (XEXP (set, 1), 0)) == PLUS + && REG_P (XEXP (XEXP (XEXP (set, 1), 0), 0)) + && REGNO (XEXP (XEXP (XEXP (set, 1), 0), 0)) == REG_SP + && find_reg_note (insn, REG_EQUIV, NULL_RTX)) + { + mdr_propagate_reg_equivs_sequence (insn, XEXP (set, 0), + XEXP (set, 1)); + } + } + } + + /* Structure used to track jump targets. */ + + struct dpre_jump_targets + { + int target; /* Is this a jump target? */ + int reach_count; /* Number of ways we can reach this insn. */ + int touch_count; /* Number of times we've touched this + insns during scanning. */ + rtx dp_equiv; /* DP-equivalence at this point. */ + }; + + struct dpre_jump_targets *ip2k_dpre_jump_targets; + + /* DP equivalence tracking used within DP reload elimination. */ + + static int + track_dp_reload (insn, dp_current, dp_current_ok, modifying) + rtx insn; + rtx *dp_current; + int dp_current_ok; + int modifying; + { + rtx set; + + if (GET_CODE (insn) != INSN) + { + *dp_current = NULL_RTX; + return 1; + } + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + { + *dp_current = NULL_RTX; + return 1; + } + + /* If we're pushing a PLUS or MINUS then it's a win if we can replace + an expression for which DP is equivalent with DP. This happens + surprisingly often when we pass a pointer to a structure embedded + within another structure. */ + if (*dp_current != NULL_RTX + && GET_CODE (XEXP (set, 0)) == MEM + && GET_CODE (XEXP (XEXP (set, 0), 0)) == POST_DEC + && GET_CODE (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG + && REGNO (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG_SP + && (GET_CODE (XEXP (set, 1)) == PLUS + || GET_CODE (XEXP (set, 1)) == MINUS) + && GET_CODE (*dp_current) != SYMBOL_REF + && GET_CODE (*dp_current) != LABEL_REF + && GET_CODE (*dp_current) != CONST) + { + if (modifying) + validate_replace_rtx (*dp_current, gen_rtx_REG (HImode, REG_DP), insn); + } + + /* Look for DP being modified. If it is, see if it's being changed + to what it already is! */ + if (GET_CODE (XEXP (set, 0)) == REG + && REGNO (XEXP (set, 0)) == REG_DP + && GET_MODE (XEXP (set, 0)) == HImode) + { + /* If this is an equivalence we can delete the new set operation. */ + if (*dp_current != NULL_RTX + && rtx_equal_p (XEXP (set, 1), *dp_current)) + { + if (modifying) + delete_insn (insn); + } + else + { + /* If we've not found an equivalence we can look for a special + case where an operand of the expression that sets DP is + already equivalent to DP and in that circumstance we simplify + by replacing that expression with DP. */ + if (*dp_current != NULL_RTX + && GET_CODE (*dp_current) != SYMBOL_REF + && GET_CODE (*dp_current) != LABEL_REF + && GET_CODE (*dp_current) != CONST + && modifying) + validate_replace_rtx (*dp_current, XEXP (set, 0), insn); + + /* Assuming that we're not loading DP from something that uses DP + itself then we mark the new equivalence for DP. If we did match + DP then we can't re-use this one. */ + if (ip2k_xexp_not_uses_reg_p (XEXP (set, 1), REG_DP, 2)) + { + *dp_current = XEXP (set, 1); + return 1; + } + else + { + *dp_current = NULL_RTX; + return 1; + } + } + } + else if (GET_CODE (XEXP (set, 0)) == REG + && (REGNO (XEXP (set, 0)) == REG_DPL + || REGNO (XEXP (set, 0)) == REG_DPH)) + { + /* If we clobber part of DP then we've clobbered any equivalences! */ + *dp_current = NULL_RTX; + return 1; + } + else if (! ip2k_xexp_not_uses_reg_p (XEXP (set, 0), REG_SP, 2) + && *dp_current != NULL_RTX + && !ip2k_xexp_not_uses_reg_p (*dp_current, REG_SP, 2)) + { + /* We look for a special case of "push" operations screwing up the + setting of DP when it's based on the stack. We can track this one + and replace the old expression for DP with a new one. */ + if (GET_CODE (XEXP (set, 0)) == MEM + && GET_CODE (XEXP (XEXP (set, 0), 0)) == POST_DEC + && GET_CODE (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG + && REGNO (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG_SP + && GET_CODE (*dp_current) == MEM + && GET_CODE (XEXP (*dp_current, 0)) == PLUS) + { + /* XXX - need to ensure that we can track this without going + out of range! */ + HOST_WIDE_INT disp = (INTVAL (XEXP (XEXP (*dp_current, 0), 1)) + + GET_MODE_SIZE (GET_MODE (XEXP (set, 0)))); + *dp_current = gen_rtx_MEM (HImode, + gen_rtx_PLUS (Pmode, + gen_rtx_REG(HImode, REG_SP), + GEN_INT (disp))); + return 1; + } + + /* Now we look for writes to the stack. We can determine if these will + affect the equivalence we're tracking for DP and if not then we can + keep tracking it. */ + if (GET_CODE (XEXP (set, 0)) == MEM + && GET_CODE (*dp_current) == MEM) + { + /* Look at the SP offsets and look for any overlaps. */ + int dp_cur_sp_offs = INTVAL (XEXP (XEXP (*dp_current, 0), 1)); + int set_sp_offs = INTVAL (XEXP (XEXP (XEXP (set, 0), 0), 1)); + + if (abs (dp_cur_sp_offs - set_sp_offs) < 2) + { + *dp_current = NULL_RTX; + return 1; + } + } + } + else if (GET_CODE (XEXP (set, 0)) == REG + && *dp_current != NULL_RTX + && !ip2k_xexp_not_uses_reg_p (*dp_current, REGNO (XEXP (set, 0)), + GET_MODE_SIZE (GET_MODE (XEXP (set, + 0))))) + { + /* If we've just clobbered all or part of a register reference that we + were sharing for DP then we can't share it any more! */ + *dp_current = NULL_RTX; + } + + return dp_current_ok; + } + + /* As part of the machine-dependent reorg we scan loads and reloads of + DP to see where any are redundant. This does happens because we + are able to subsequently transform things in interesting ways. Sometimes + gcc also does unecessary reloads too so we try to eliminate these too. */ + + static void + mdr_try_dp_reload_elim (first_insn) + rtx first_insn; + { + rtx insn; + struct dpre_jump_targets *djt; + rtx dp_current; + int incomplete_scan; + int last_incomplete_scan; + + ip2k_dpre_jump_targets + = (struct dpre_jump_targets *) xcalloc (get_max_uid (), + sizeof (struct dpre_jump_targets)); + + /* First we scan to build up a list of all CODE_LABEL insns and we work out + how many different ways we can reach them. */ + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) == CODE_LABEL) + { + djt = &ip2k_dpre_jump_targets[INSN_UID (insn)]; + djt->target = 1; + djt->reach_count = LABEL_NUSES (insn); + djt->touch_count = 0; + djt->dp_equiv = NULL_RTX; + if (! prev_nonnote_insn (insn) + || (prev_nonnote_insn (insn) + && GET_CODE (prev_nonnote_insn (insn)) != BARRIER)) + djt->reach_count++; + } + } + + /* Next we scan all of the ways of reaching the code labels to see + what the DP register is equivalent to as we reach them. If we find + that they're the same then we keep noting the matched value. We + iterate around this until we reach a convergence on DP equivalences + at all code labels - we have to be very careful not to be too + optimistic! */ + incomplete_scan = -1; + do + { + int dp_current_ok = 0; + last_incomplete_scan = incomplete_scan; + dp_current = NULL_RTX; + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + /* If we have a code label then we need to see if we already know + what the equivalence is at this point. If we do then we use it + immediately, but if we don't then we have a special case to track + when we hit a fallthrough-edge (label with no barrier preceding + it). Any other accesses to the label must be from jump insns + and so they're handled elsewhere. */ + if (GET_CODE (insn) == CODE_LABEL) + { + djt = &ip2k_dpre_jump_targets[INSN_UID (insn)]; + + /* If we're fully characterized the use the equivalence. */ + if (djt->touch_count == djt->reach_count) + { + dp_current = djt->dp_equiv; + dp_current_ok = 1; + continue; + } + + /* If we have a known equivalence for DP as we reach the + fallthrough-edge then track this into the code label. */ + if (dp_current_ok + && (! prev_nonnote_insn (insn) + || (prev_nonnote_insn (insn) + && GET_CODE (prev_nonnote_insn (insn)) != BARRIER))) + { + if (djt->touch_count == 0) + djt->dp_equiv = dp_current; + + if (djt->touch_count < djt->reach_count) + { + djt->touch_count++; + if (! rtx_equal_p (djt->dp_equiv, dp_current)) + { + /* When we definitely know that we can't form an + equivalence for DP here we must clobber anything + that we'd started to track too. */ + djt->dp_equiv = NULL_RTX; + dp_current = NULL_RTX; + dp_current_ok = 1; + } + } + } + + /* If we've not completely characterized this code label then + be cautious and assume that we don't know what DP is + equivalent to. */ + if (djt->touch_count < djt->reach_count) + { + dp_current = NULL_RTX; + dp_current_ok = 0; + } + + continue; + } + + /* If we've hit a jump insn then we look for either an address + vector (jump table) or for jump label references. */ + if (GET_CODE (insn) == JUMP_INSN) + { + /* Don't attempt to track here if we don't have a known + equivalence for DP at this point. */ + if (dp_current_ok) + { + rtx pat = PATTERN (insn); + if (GET_CODE (pat) == ADDR_VEC) + { + int i; + int len = XVECLEN (pat, 0); + + for (i = 0; i < len; i++) + { + rtx vec_insn = XEXP (XVECEXP (pat, 0, i), 0); + djt = &ip2k_dpre_jump_targets [INSN_UID (vec_insn)]; + + if (djt->touch_count == 0) + djt->dp_equiv = dp_current; + + if (djt->touch_count < djt->reach_count) + { + djt->touch_count++; + if (! rtx_equal_p (djt->dp_equiv, dp_current)) + djt->dp_equiv = NULL_RTX; + } + } + } + else if (JUMP_LABEL (insn)) + { + rtx j_insn = JUMP_LABEL (insn); + djt = &ip2k_dpre_jump_targets[INSN_UID (j_insn)]; + + if (djt->touch_count == 0) + djt->dp_equiv = dp_current; + + if (djt->touch_count < djt->reach_count) + { + djt->touch_count++; + if (! rtx_equal_p (djt->dp_equiv, dp_current)) + djt->dp_equiv = NULL_RTX; + } + } + } + + continue; + } + + /* Anything other than a code labal or jump arrives here. + We try and track DP, but sometimes we might not be able to. */ + dp_current_ok = track_dp_reload (insn, &dp_current, + dp_current_ok, 0); + } + + /* When we're looking to see if we've finished we count the number of + paths throught the code labels where we weren't able to definitively + track DP. + This number is used to see if we're converging on a solution. + If this hits zero then we've fully converged, but if this stays the + same as last time then we probably can't make any further + progress. */ + incomplete_scan = 0; + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) == CODE_LABEL) + { + djt = &ip2k_dpre_jump_targets[INSN_UID (insn)]; + if (djt->touch_count != djt->reach_count) + { + incomplete_scan += (djt->reach_count - djt->touch_count); + djt->dp_equiv = NULL_RTX; + djt->touch_count = 0; + } + } + } + } + while (incomplete_scan && incomplete_scan != last_incomplete_scan); + + /* Finally we scan the whole function and run DP elimination. When we hit + a CODE_LABEL we pick up any stored equivalence since we now know that + every path to this point entered with DP holding the same thing! If + we subsequently have a reload that matches then we can eliminate it. */ + dp_current = NULL_RTX; + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) == JUMP_INSN) + continue; + + if (GET_CODE (insn) == CODE_LABEL) + { + djt = &ip2k_dpre_jump_targets[INSN_UID (insn)]; + dp_current = djt->dp_equiv; + continue; + } + + track_dp_reload (insn, &dp_current, 1, 1); + } + + free (ip2k_dpre_jump_targets); + } + + /* As part of the machine-dependent reorg we look for reloads of DP + that we can move to earlier points within the file. + Moving these out of the way allows more peepholes to match. */ + + static void + mdr_try_move_dp_reload (first_insn) + rtx first_insn; + { + rtx insn; + rtx set; + rtx orig_first; + + /* Don't try to match the first instruction because we can't move it + anyway. */ + orig_first = first_insn; + first_insn = next_nonnote_insn (first_insn); + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) != INSN) + continue; + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + continue; + + /* Look for DP being loaded. When we find this we start a rewind + scan looking for possible positions to move this to. */ + if (GET_CODE (XEXP (set, 0)) == REG + && REGNO (XEXP (set, 0)) == REG_DP + && GET_MODE (XEXP (set, 0)) == HImode) + { + int try_again; + rtx try_insn = insn; + + do + { + rtx rewind; + rtx check; + + try_again = 0; + + /* For now we do the *really* simple version of things and only + attempt to move the load of DP if it's very safe to do so. */ + rewind = prev_nonnote_insn (try_insn); + if (rewind != orig_first && rewind != NULL_RTX + && GET_CODE (rewind) == INSN) + { + check = ((GET_CODE (PATTERN (rewind)) == SET) + ? PATTERN (rewind) : NULL_RTX); + if (check != NULL_RTX + && ip2k_composite_xexp_not_uses_cc0_p (XEXP (check, 0)) + && ip2k_composite_xexp_not_uses_cc0_p (XEXP (check, 1))) + { + if (GET_CODE (XEXP (check, 0)) == REG + && REGNO (XEXP (check, 0)) != REG_DPH + && REGNO (XEXP (check, 0)) != REG_DPL + && (ip2k_composite_xexp_not_uses_reg_p + (XEXP (check, 1), REG_DP, 2)) + && (ip2k_composite_xexp_not_uses_reg_p + (XEXP (set, 1), + REGNO (XEXP (check, 0)), + GET_MODE_SIZE (GET_MODE (XEXP (check, 0)))))) + { + emit_insn_before (set, rewind); + if (try_insn == insn) + insn = prev_nonnote_insn (insn); + delete_insn (try_insn); + try_insn = prev_nonnote_insn (rewind); + try_again = 1; + } + else if (GET_CODE (XEXP (set, 1)) == REG + && ip2k_composite_xexp_not_uses_reg_p (XEXP (check, 1), REG_DP, 2) + && ip2k_composite_xexp_not_uses_reg_p (XEXP (check, 0), REG_DP, 2) + && ip2k_composite_xexp_not_uses_reg_p (XEXP (check, 0), REGNO (XEXP (set, 1)), + GET_MODE_SIZE (GET_MODE (XEXP (set, 1))))) + { + emit_insn_before (set, rewind); + if (try_insn == insn) + insn = prev_nonnote_insn (insn); + delete_insn (try_insn); + try_insn = prev_nonnote_insn (rewind); + try_again = 1; + } + } + } + } + while (try_again && try_insn); + } + } + } + #endif /* IP2K_MD_REORG_PASS */ + + /* Look to see if the expression, x, can have any stack references offset by + a fixed constant, offset. If it definitely can then returns nonzero. */ + + static int + ip2k_check_can_adjust_stack_ref (x, offset) + rtx x; + int offset; + { + if (GET_RTX_CLASS (GET_CODE (x)) == '2' + || GET_RTX_CLASS (GET_CODE (x)) == 'c') + return (ip2k_check_can_adjust_stack_ref (XEXP (x, 0), offset) + && ip2k_check_can_adjust_stack_ref (XEXP (x, 1), offset)); + + if (GET_RTX_CLASS (GET_CODE (x)) == '1') + return ip2k_check_can_adjust_stack_ref (XEXP (x, 0), offset); + + switch (GET_CODE (x)) + { + case REG: + return (REGNO (x) != REG_SPH && REGNO (x) != REG_SPL); + + case MEM: + if (GET_CODE (XEXP (x, 0)) != PLUS) + return 1; + + if (GET_CODE (XEXP (XEXP (x, 0), 0)) != REG) + return 1; + + if (REGNO (XEXP (XEXP (x, 0), 0)) != REG_SP) + return 1; + + /* We can't allow this if the adjustment will create an + invalid address. */ + return (INTVAL (XEXP (XEXP (x, 0), 1)) + + offset <= (128 - 2 * GET_MODE_SIZE (GET_MODE (x)))); + + case CONST: + case CONST_INT: + case CONST_DOUBLE: + case SYMBOL_REF: + case LABEL_REF: + return 1; + + default: + return 0; + } + } + + /* Adjusts all of the stack references in the expression pointed to by x by + a fixed offset. */ + + static void + ip2k_adjust_stack_ref (x, offset) + rtx *x; + int offset; + { + if (GET_RTX_CLASS (GET_CODE (*x)) == '2' + || GET_RTX_CLASS (GET_CODE (*x)) == 'c') + { + ip2k_adjust_stack_ref (&XEXP (*x, 0), offset); + ip2k_adjust_stack_ref (&XEXP (*x, 1), offset); + return; + } + + if (GET_RTX_CLASS (GET_CODE (*x)) == '1') + { + ip2k_adjust_stack_ref (&XEXP (*x, 0), offset); + return; + } + + switch (GET_CODE (*x)) + { + case MEM: + if (GET_CODE (XEXP (*x, 0)) != PLUS) + return; + + if (GET_CODE (XEXP (XEXP (*x, 0), 0)) != REG) + return; + + if (REGNO (XEXP (XEXP (*x, 0), 0)) != REG_SP) + return; + + *x = copy_rtx (*x); + XEXP (XEXP (*x, 0), 1) = GEN_INT (INTVAL (XEXP (XEXP (*x, 0), 1)) + + offset); + break; + + default: + break; + } + } + + #ifdef IP2K_MD_REORG_PASS + /* As part of the machine-dependent reorg we look to move push instructions + to earlier points within the file. Moving these out of the way allows more + peepholes to match. */ + + static void + mdr_try_move_pushes (first_insn) + rtx first_insn; + { + rtx insn; + rtx set; + rtx orig_first; + + /* Don't try to match the first instruction because we can't move + it anyway. */ + orig_first = first_insn; + first_insn = next_nonnote_insn (first_insn); + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) != INSN) + continue; + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + continue; + + /* Have we found a push instruction? */ + if (GET_CODE (XEXP (set, 0)) == MEM + && GET_CODE (XEXP (XEXP (set, 0), 0)) == POST_DEC + && GET_CODE (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG + && REGNO (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG_SP + && GET_CODE (XEXP (set, 1)) == REG) + { + rtx try_insn = insn; + unsigned int regno = REGNO (XEXP (set, 1)); + int reg_range = GET_MODE_SIZE (GET_MODE (XEXP (set, 1))); + + while (1) + { + rtx rewind; + rtx check; + + rewind = prev_nonnote_insn (try_insn); + if (rewind == orig_first || rewind == NULL_RTX + || GET_CODE (rewind) != INSN) + break; + + check = (GET_CODE (PATTERN (rewind)) == SET) ? PATTERN (rewind) : NULL_RTX; + if (check == NULL_RTX) + break; + + if (! ip2k_check_can_adjust_stack_ref (XEXP (check, 0), + reg_range) + || ! ip2k_check_can_adjust_stack_ref (XEXP (check, 1), + reg_range)) + break; + + /* If we've hit another push instruction we can't go any + further. */ + if (GET_CODE (XEXP (check, 0)) == MEM + && GET_CODE (XEXP (XEXP (check, 0), 0)) == POST_DEC + && GET_CODE (XEXP (XEXP (XEXP (check, 0), 0), 0)) == REG + && REGNO (XEXP (XEXP (XEXP (check, 0), 0), 0)) == REG_SP) + break; + + /* If this is a register move then check that it doesn't clobber + SP or any part of the instruction we're trying to move. */ + if (GET_CODE (XEXP (check, 0)) == REG) + { + unsigned int check_reg = REGNO (XEXP (check, 0)); + int check_reg_range = GET_MODE_SIZE (GET_MODE (XEXP (check, + 0))); + + /* If we have a special case where what we want to push is + being loaded by this "clobbering" insn then we can just + push what is being used to load us and then do the load. + This may seem a little odd, but we may subsequently be + able to merge the load with another instruction as it + may only be used once now! Note though that we + specifically don't try this if the expression being + loaded is an HImode MEM using IP. */ + if (check_reg == regno + && check_reg_range == reg_range + && ((GET_CODE (XEXP (check, 1)) == REG + || (GET_CODE (XEXP (check, 1)) == MEM + && (GET_MODE (XEXP (check, 1)) != HImode + || ip2k_xexp_not_uses_reg_for_mem (XEXP (check, 1), REG_IP)))))) + { + switch (check_reg_range) + { + case 1: + emit_insn_before (gen_movqi (XEXP (set, 0), + XEXP (check, 1)), + rewind); + delete_insn (try_insn); + break; + + case 2: + emit_insn_before (gen_movhi (XEXP (set, 0), + XEXP (check, 1)), + rewind); + delete_insn (try_insn); + break; + + case 4: + emit_insn_before (gen_movsi (XEXP (set, 0), + XEXP (check, 1)), + rewind); + delete_insn (try_insn); + break; + + case 8: + emit_insn_before (gen_movdi (XEXP (set, 0), + XEXP (check, 1)), + rewind); + delete_insn (try_insn); + break; + } + + ip2k_adjust_stack_ref (&XEXP (check, 0), reg_range); + ip2k_adjust_stack_ref (&XEXP (check, 1), reg_range); + try_insn = prev_nonnote_insn (rewind); + /* XXX - should be a continue? */ + break; + } + + if ((check_reg == REG_SPL) + || (check_reg == REG_SPH) + || (((regno <= check_reg) + && (regno + reg_range - 1) >= check_reg) + || ((regno <= (check_reg + check_reg_range - 1)) + && ((regno + reg_range - 1) + >= (check_reg + check_reg_range - 1))))) + break; + } + + emit_insn_before (set, rewind); + delete_insn (try_insn); + ip2k_adjust_stack_ref (&XEXP (check, 0), reg_range); + ip2k_adjust_stack_ref (&XEXP (check, 1), reg_range); + try_insn = prev_nonnote_insn (rewind); + } + } + } + } + + /* Assist the following function, mdr_try_propagate_clr(). */ + + static void + mdr_try_propagate_clr_sequence (first_insn, regno) + rtx first_insn; + unsigned int regno; + { + rtx try_insn; + + for (try_insn = next_nonnote_insn (first_insn); try_insn; + try_insn = next_nonnote_insn (try_insn)) + { + rtx new_insn = NULL_RTX; + rtx set2; + + if (GET_CODE (try_insn) == JUMP_INSN) + continue; + + if (GET_CODE (try_insn) != INSN) + break; + + set2 = ((GET_CODE (PATTERN (try_insn)) == SET) + ? PATTERN (try_insn) : NULL_RTX); + if (set2 == NULL_RTX) + continue; + + if (GET_CODE (XEXP (set2, 1)) == AND + && ((GET_CODE (XEXP (XEXP (set2, 1), 0)) == REG + && REGNO (XEXP (XEXP (set2, 1), 0)) == regno) + || (GET_CODE (XEXP (XEXP (set2, 1), 1)) == REG + && REGNO (XEXP (XEXP (set2, 1), 1)) == regno))) + { + rtx remove_insn = try_insn; + try_insn = emit_insn_before (gen_rtx_SET (QImode, XEXP (set2, 0), + const0_rtx), try_insn); + delete_insn (remove_insn); + } + else if (GET_CODE (XEXP (set2, 1)) == IOR + && GET_CODE (XEXP (XEXP (set2, 1), 0)) == REG + && REGNO (XEXP (XEXP (set2, 1), 0)) == regno) + { + rtx remove_insn = try_insn; + try_insn = emit_insn_before (gen_rtx_SET (QImode, XEXP (set2, 0), + XEXP (XEXP (set2, 1), 1)), + try_insn); + delete_insn (remove_insn); + } + else if (GET_CODE (XEXP (set2, 1)) == IOR + && GET_CODE (XEXP (XEXP (set2, 1), 1)) == REG + && REGNO (XEXP (XEXP (set2, 1), 1)) == regno) + { + rtx remove_insn = try_insn; + try_insn = emit_insn_before (gen_rtx_SET (QImode, XEXP (set2, 0), + XEXP (XEXP (set2, 1), 0)), + try_insn); + delete_insn (remove_insn); + } + else if (GET_CODE (XEXP (set2, 1)) == XOR + && GET_CODE (XEXP (XEXP (set2, 1), 0)) == REG + && REGNO (XEXP (XEXP (set2, 1), 0)) == regno) + { + rtx remove_insn = try_insn; + try_insn = emit_insn_before (gen_rtx_SET (QImode, XEXP (set2, 0), + XEXP (XEXP (set2, 1), 1)), + try_insn); + delete_insn (remove_insn); + } + else if (GET_CODE (XEXP (set2, 1)) == XOR + && GET_CODE (XEXP (XEXP (set2, 1), 1)) == REG + && REGNO (XEXP (XEXP (set2, 1), 1)) == regno) + { + rtx remove_insn = try_insn; + try_insn = emit_insn_before (gen_rtx_SET (QImode, XEXP (set2, 0), + XEXP (XEXP (set2, 1), 0)), + try_insn); + delete_insn (remove_insn); + } + + if (GET_CODE (XEXP (set2, 0)) == REG) + { + int reg2_range = GET_MODE_SIZE (GET_MODE (XEXP (set2, 0))); + unsigned int regno2 = REGNO (XEXP (set2, 0)); + + if (reg2_range == 1 + && regno == regno2 + && GET_CODE (XEXP (set2, 1)) == CONST_INT) + { + int iv = INTVAL (XEXP (set2, 1)); + if (iv == 0xff) + iv = -1; + if (iv == 1 || iv == -1) + { + new_insn = gen_rtx_SET (QImode, XEXP (set2, 0), + gen_rtx_PLUS (QImode, XEXP (set2, 0), + GEN_INT (iv))); + new_insn = emit_insn_before (new_insn, try_insn); + delete_insn (try_insn); + try_insn = new_insn; + } + break; + } + + if ((regno >= regno2) && (regno <= regno2 + reg2_range - 1)) + break; + + if (GET_CODE (XEXP (set2, 1)) == REG + && REGNO (XEXP (set2, 1)) == regno) + { + new_insn = emit_insn_before (gen_rtx_SET (QImode, + XEXP (set2, 0), + const0_rtx), + try_insn); + delete_insn (try_insn); + try_insn = new_insn; + } + } + + if (GET_CODE (XEXP (set2, 0)) == CC0) + { + if (GET_CODE (XEXP (set2, 1)) == REG + && GET_MODE_SIZE (GET_MODE (XEXP (set2, 1))) == 2 + && REGNO (XEXP (set2, 1)) == regno) + { + new_insn = gen_rtx_SET (VOIDmode, gen_rtx (CC0, VOIDmode), + gen_rtx_REG(QImode, regno + 1)); + new_insn = emit_insn_before (new_insn, try_insn); + } + else if (GET_CODE (XEXP (set2, 1)) == COMPARE + && GET_CODE (XEXP (XEXP (set2, 1), 0)) == REG + && GET_MODE_SIZE (GET_MODE (XEXP (XEXP (set2, 1), 0))) == 2 + && REGNO (XEXP (XEXP (set2, 1), 0)) == regno + && GET_CODE (XEXP (XEXP (set2, 1), 1)) == CONST_INT + && INTVAL (XEXP (XEXP (set2, 1), 1)) >= 0 + && INTVAL (XEXP (XEXP (set2, 1), 1)) < 256) + { + new_insn = gen_rtx_SET (VOIDmode, cc0_rtx, + gen_rtx_COMPARE(QImode, + gen_rtx_REG (QImode, + regno + 1), + XEXP (XEXP (set2, 1), + 1))); + new_insn = emit_insn_before (new_insn, try_insn); + } + + /* If we have inserted a replacement for a CC0 setter operation + then we need to delete the old one. */ + if (new_insn != NULL_RTX) + { + delete_insn (try_insn); + try_insn = new_insn; + + /* Now as we know that we have just done an unsigned compare + (remember we were zero-extended by the clr!) we also know + that we don't need a signed jump insn. If we find that + our next isns is a signed jump then make it unsigned! */ + if (GET_CODE (next_nonnote_insn (try_insn)) == JUMP_INSN) + { + rtx set3; + + try_insn = next_nonnote_insn (try_insn); + set3 = ((GET_CODE (PATTERN (try_insn)) == SET) + ? PATTERN (try_insn) : NULL_RTX); + if (set3 == NULL_RTX) + continue; + + /* If we discover that our jump target is only accessible + from here then we can continue our "clr" propagation to + it too! */ + if (LABEL_NUSES (JUMP_LABEL (try_insn)) == 1) + mdr_try_propagate_clr_sequence (JUMP_LABEL (try_insn), + regno); + + if (GET_CODE (XEXP (set3, 0)) == PC + && GET_CODE (XEXP (set3, 1)) == IF_THEN_ELSE + && (GET_CODE (XEXP (XEXP (set3, 1), 0)) == GT + || GET_CODE (XEXP (XEXP (set3, 1), 0)) == GE + || GET_CODE (XEXP (XEXP (set3, 1), 0)) == LT + || GET_CODE (XEXP (XEXP (set3, 1), 0)) == LE) + && GET_CODE (XEXP (XEXP (XEXP (set3, 1), 0), 0)) == CC0 + && (GET_CODE (XEXP (XEXP (XEXP (set3, 1), 0), 1)) + == CONST_INT) + && GET_CODE (XEXP (XEXP (set3, 1), 1)) == LABEL_REF + && GET_CODE (XEXP (XEXP (set3, 1), 2)) == PC) + { + enum rtx_code code; + rtx new_if; + rtx cmp; + + /* Replace our old conditional jump with a new one that + does the unsigned form of what was previously a + signed comparison. */ + code = GET_CODE (XEXP (XEXP (set3, 1), 0)); + cmp = gen_rtx_fmt_ee ((code == GT + ? GTU + : (code == GE + ? GEU + : (code == LT ? LTU : LEU))), + VOIDmode, + XEXP (XEXP (XEXP (set3, 1), 0), 0), + XEXP (XEXP (XEXP (set3, 1), 0), + 1)); + new_if + = gen_rtx_SET (GET_MODE (set3), + pc_rtx, + gen_rtx_IF_THEN_ELSE + (GET_MODE (XEXP (set3, 1)), cmp, + XEXP (XEXP (set3, 1), 1), + XEXP (XEXP (set3, 1), 2))); + new_insn = emit_jump_insn_before (new_if, try_insn); + LABEL_NUSES (JUMP_LABEL (try_insn))++; + delete_insn (try_insn); + try_insn = new_insn; + } + } + } + } + else if (GET_CODE (XEXP (set2, 1)) == PLUS + && GET_CODE (XEXP (XEXP (set2, 1), 0)) == REG + && GET_MODE_SIZE (GET_MODE (XEXP (XEXP (set2, 1), 0))) == 2 + && REGNO (XEXP (XEXP (set2, 1), 0)) == regno + && (GET_CODE (XEXP (XEXP (set2, 1), 1)) == REG + || GET_CODE (XEXP (XEXP (set2, 1), 1)) == MEM + || GET_CODE (XEXP (XEXP (set2, 1), 1)) == CONST_INT + || GET_CODE (XEXP (XEXP (set2, 1), 1)) == CONST + || GET_CODE (XEXP (XEXP (set2, 1), 1)) == SYMBOL_REF)) + { + rtx extend = gen_rtx_ZERO_EXTEND (HImode, + gen_rtx_REG (QImode, regno + 1)); + new_insn = gen_rtx_SET (HImode, XEXP (set2, 0), + gen_rtx_PLUS (HImode, extend, + XEXP (XEXP (set2, 1), 1))); + new_insn = emit_insn_before (new_insn, try_insn); + delete_insn (try_insn); + try_insn = new_insn; + } + else if (GET_CODE (XEXP (set2, 1)) == PLUS + && GET_CODE (XEXP (XEXP (set2, 1), 1)) == REG + && GET_MODE_SIZE (GET_MODE (XEXP (XEXP (set2, 1), 1))) == 2 + && REGNO (XEXP (XEXP (set2, 1), 1)) == regno + && (GET_CODE (XEXP (XEXP (set2, 1), 0)) == REG + || GET_CODE (XEXP (XEXP (set2, 1), 0)) == MEM + || GET_CODE (XEXP (XEXP (set2, 1), 0)) == CONST_INT + || GET_CODE (XEXP (XEXP (set2, 1), 0)) == CONST + || GET_CODE (XEXP (XEXP (set2, 1), 0)) == SYMBOL_REF)) + { + rtx t_src = gen_rtx_PLUS (HImode, + gen_rtx_ZERO_EXTEND (HImode, + gen_rtx_REG (QImode, + regno + + 1)), + XEXP (XEXP (set2, 1), 0)); + new_insn = emit_insn_before (gen_rtx_SET (HImode, XEXP (set2, 0), + t_src), + try_insn); + delete_insn (try_insn); + try_insn = new_insn; + } + } + } + + /* One of the things that can quite often happen with an 8-bit CPU is that + we end up clearing the MSByte of a 16-bit value. Unfortunately, all too + often gcc doesn't have any way to realize that only half of the value is + useful and ends up doing more work than it should. We scan for such + occurrences here, track them and reduce compare operations to a smaller + size where possible. + + Note that this is somewhat different to move propagation as we may + actually change some instruction patterns when we're doing this whereas + move propagation is just about doing a search and replace. */ + + static void + mdr_try_propagate_clr (first_insn) + rtx first_insn; + { + rtx insn; + rtx set; + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) != INSN) + continue; + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + continue; + + /* Have we found a "clr" instruction? */ + if (GET_CODE (XEXP (set, 0)) == REG + && GET_CODE (XEXP (set, 1)) == CONST_INT + && GET_MODE_SIZE (GET_MODE (XEXP (set, 0))) == 1 + && INTVAL (XEXP (set, 1)) == 0) + { + mdr_try_propagate_clr_sequence (insn, REGNO (XEXP (set, 0))); + } + } + } + #endif /* IP2K_MD_REORG_PASS */ + + /* Look to see if the expression, x, does not make any memory references + via the specified register. This is very conservative and only returns + nonzero if we definitely don't have such a memory ref. */ + + static int + ip2k_xexp_not_uses_reg_for_mem (x, regno) + rtx x; + unsigned int regno; + { + if (regno & 1) + regno &= 0xfffffffe; + + if (GET_RTX_CLASS (GET_CODE (x)) == 'b') + return (ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno) + && ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 1), regno) + && ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 2), regno)); + + if (GET_RTX_CLASS (GET_CODE (x)) == '2' + || GET_RTX_CLASS (GET_CODE (x)) == 'c' + || GET_RTX_CLASS (GET_CODE (x)) == '<') + return (ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno) + && ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 1), regno)); + + if (GET_RTX_CLASS (GET_CODE (x)) == '1' + || GET_RTX_CLASS (GET_CODE (x)) == '3') + return ip2k_xexp_not_uses_reg_for_mem (XEXP (x, 0), regno); + + switch (GET_CODE (x)) + { + case REG: + return 1; + + case MEM: + if ((GET_CODE (XEXP (x, 0)) == PLUS + && GET_CODE (XEXP (XEXP (x, 0), 0)) == REG + && REGNO (XEXP (XEXP (x, 0), 0)) == regno) + || (GET_CODE (XEXP (x, 0)) == REG + && REGNO (XEXP (x, 0)) == regno)) + return 0; + else + return 1; + + case CONST: + case CONST_INT: + case CONST_DOUBLE: + case SYMBOL_REF: + case LABEL_REF: + case CC0: + case PC: + return 1; + + default: + return 0; + } + } + + #ifdef IP2K_MD_REORG_PASS + /* Assist the following function, mdr_try_propagate_move(). */ + + static void + mdr_try_propagate_move_sequence (first_insn, orig, equiv) + rtx first_insn; + rtx orig; + rtx equiv; + { + rtx try_insn; + + for (try_insn = next_nonnote_insn (first_insn); try_insn; + try_insn = next_nonnote_insn (try_insn)) + { + rtx set; + int range; + rtx new_equiv = NULL_RTX; + + if (GET_CODE (try_insn) != JUMP_INSN && GET_CODE (try_insn) != INSN) + break; + + set = single_set (try_insn); + if (set == NULL_RTX) + break; + + range = MAX (GET_MODE_SIZE (GET_MODE (equiv)), + GET_MODE_SIZE (GET_MODE (XEXP (set, 0)))); + + if (GET_CODE (equiv) == REG + && REGNO (equiv) == REG_W + && (recog_memoized (try_insn) < 0 + || get_attr_clobberw (try_insn) != CLOBBERW_NO) + && (! (GET_CODE (XEXP (set, 0)) == REG + && REGNO (XEXP (set, 0)) == REG_W + && rtx_equal_p (XEXP (set, 1), orig)))) + break; + else if (GET_CODE (XEXP (set, 0)) == REG + && (REGNO (XEXP (set, 0)) == REG_SP + || ! ip2k_xexp_not_uses_reg_p (equiv, REGNO (XEXP (set, 0)), + range) + || ! ip2k_xexp_not_uses_reg_p (orig, REGNO (XEXP (set, 0)), + range)) + && ! rtx_equal_p (equiv, XEXP (set, 0)) + && ! rtx_equal_p (orig, XEXP (set, 0))) + break; + else if (GET_CODE (orig) == REG + && (REGNO (orig) == REG_IPL + || REGNO (orig) == REG_IPH + || REGNO (orig) == REG_DPL + || REGNO (orig) == REG_DPH) + && (! ip2k_xexp_not_uses_reg_for_mem (XEXP (set, 0), + REGNO (orig)) + || ! ip2k_xexp_not_uses_reg_for_mem (XEXP (set, 1), + REGNO (orig)))) + break; + else if (GET_CODE (XEXP (set, 0)) == MEM + && GET_CODE (equiv) == MEM) + { + if (! ip2k_xexp_not_uses_reg_p (equiv, REG_SP, 2)) + { + if (! ip2k_xexp_not_uses_reg_p (XEXP (set, 0), REG_SP, 2)) + { + /* We look for a special case of "push" operations screwing + our register equivalence when it's based on a stack slot. + We can track this one and replace the old equivalence + expression with a new one. */ + if (GET_CODE (XEXP (XEXP (set, 0), 0)) == POST_DEC + && GET_CODE (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG + && REGNO (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG_SP + && GET_CODE (XEXP (equiv, 0)) == PLUS + && REGNO (XEXP (XEXP (equiv, 0), 0)) == REG_SP) + { + int md_size = GET_MODE_SIZE (GET_MODE (XEXP (set, 0))); + int new_sp_offs = INTVAL (XEXP (XEXP (equiv, 0), 1)) + + md_size; + + /* Don't allow an invalid stack pointer offset to be + created. */ + if (new_sp_offs > (128 - 2 * md_size)) + break; + + new_equiv + = gen_rtx_MEM (GET_MODE (equiv), + gen_rtx_PLUS (Pmode, + gen_rtx_REG (HImode , + REG_SP), + GEN_INT (new_sp_offs))); + } + else if (! rtx_equal_p (equiv, XEXP (set, 0))) + { + /* Look at the SP offsets and look for any overlaps. */ + int equiv_offs = GET_CODE (XEXP (equiv, 0)) == PLUS + ? INTVAL (XEXP (XEXP (equiv, 0), 1)) + : 0; + int set_offs + = (GET_CODE (XEXP (XEXP (set, 0), 0)) == PLUS + ? INTVAL (XEXP (XEXP (XEXP (set, 0), 0), 1)) + : 0); + + if (abs (equiv_offs - set_offs) < range) + break; + } + } + } + + if (! ip2k_xexp_not_uses_reg_p (equiv, REG_IP, 2)) + break; + + if (! ip2k_xexp_not_uses_reg_p (XEXP (set, 0), REG_DP, 2) + && ! ip2k_xexp_not_uses_reg_p (equiv, REG_DP, 2) + && ! rtx_equal_p (equiv, XEXP (set, 0))) + { + /* Look at the DP offsets and look for any overlaps. */ + int equiv_offs = GET_CODE (XEXP (equiv, 0)) == PLUS + ? INTVAL (XEXP (XEXP (equiv, 0), 1)) + : 0; + int set_offs = GET_CODE (XEXP (XEXP (set, 0), 0)) == PLUS + ? INTVAL (XEXP (XEXP (XEXP (set, 0), 0), 1)) + : 0; + + if (abs (equiv_offs - set_offs) < range) + break; + } + } + + validate_replace_rtx_subexp (orig, equiv, try_insn, &XEXP (set, 1)); + + if (rtx_equal_p (equiv, XEXP (set, 0)) + || rtx_equal_p (orig, XEXP (set, 0))) + break; + + if (new_equiv != NULL_RTX) + equiv = new_equiv; + } + } + + /* Try propagating move instructions forwards. It may be that we can + replace a register use with an equivalent expression that already + holds the same value and thus allow one or more register loads to + be eliminated. */ + + static void + mdr_try_propagate_move (first_insn) + rtx first_insn; + { + rtx insn; + rtx set; + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) != INSN) + continue; + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + continue; + + /* Have we found a simple move instruction? */ + if (GET_CODE (XEXP (set, 0)) == REG + && (REGNO (XEXP (set, 0)) >= 0x80 + || REGNO (XEXP (set, 0)) == REG_DPL + || REGNO (XEXP (set, 0)) == REG_DPH + || REGNO (XEXP (set, 0)) == REG_IPL + || REGNO (XEXP (set, 0)) == REG_IPH) + && ((GET_CODE (XEXP (set, 1)) == REG + && REGNO (XEXP (set, 1)) != REG_SP + && ip2k_xexp_not_uses_reg_p (XEXP (set, 0), + REGNO (XEXP (set, 1)), + GET_MODE_SIZE (GET_MODE (XEXP (set, + 0))))) + || (GET_CODE (XEXP (set, 1)) == MEM + && (ip2k_xexp_not_uses_reg_p (XEXP (set, 1), REG_IP, 2) + || GET_MODE (XEXP (set, 1)) == QImode) + && ((REGNO (XEXP (set, 0)) != REG_DPH + && REGNO (XEXP (set, 0)) != REG_DPL) + || ip2k_xexp_not_uses_reg_p (XEXP (set, 1), REG_DP, 2))) + || (GET_CODE (XEXP (set, 1)) == CONST_INT + && (GET_MODE (XEXP (set, 0)) != QImode + || INTVAL (XEXP (set, 1)) != 0)) + || GET_CODE (XEXP (set, 1)) == CONST_DOUBLE + || GET_CODE (XEXP (set, 1)) == CONST + || GET_CODE (XEXP (set, 1)) == SYMBOL_REF)) + { + mdr_try_propagate_move_sequence (insn, XEXP (set, 0), XEXP (set, 1)); + } + } + } + + /* Try to remove redundant instructions. */ + + static void + mdr_try_remove_redundant_insns (first_insn) + rtx first_insn; + { + rtx insn; + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + rtx set; + enum machine_mode mode; + int md_size; + HOST_WIDE_INT pattern; + int i; + + if (GET_CODE (insn) != INSN) + continue; + + if (GET_CODE (PATTERN (insn)) == CONST_INT) + { + /* We've found a dummy expression. */ + rtx remove_insn = insn; + insn = prev_nonnote_insn (insn); + delete_insn (remove_insn); + continue; + } + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + continue; + + mode = GET_MODE (XEXP (set, 0)); + md_size = GET_MODE_SIZE (mode); + if ((md_size < 1) || (md_size > 4)) + continue; + + pattern = 0; + for (i = 0; i < md_size; i++) + { + pattern <<= 8; + pattern |= 0xff; + } + + if ((GET_CODE (XEXP (set, 1)) == AND + && GET_CODE (XEXP (XEXP (set, 1), 1)) == CONST_INT + && INTVAL (XEXP (XEXP (set, 1), 1)) == pattern) + || ((GET_CODE (XEXP (set, 1)) == IOR + || GET_CODE (XEXP (set, 1)) == XOR) + && GET_CODE (XEXP (XEXP (set, 1), 1)) == CONST_INT + && INTVAL (XEXP (XEXP (set, 1), 1)) == 0x00)) + { + /* We've found an AND with all 1's, an XOR with all 0's or an + IOR with 0's. */ + rtx remove_insn = insn; + + /* Is it completely redundant or should it become a move insn? */ + if (! rtx_equal_p (XEXP (set, 0), XEXP (XEXP (set, 1), 0))) + { + emit_insn_before (gen_rtx_SET (mode, + XEXP (set, 0), + XEXP (XEXP (set, 1), 0)), + insn); + } + + insn = prev_nonnote_insn(insn); + delete_insn (remove_insn); + } + else if (GET_CODE (XEXP (set, 1)) == AND + && GET_CODE (XEXP (XEXP (set, 1), 1)) == CONST_INT + && INTVAL (XEXP (XEXP (set, 1), 1)) == 0) + { + /* We've found an AND with all 0's. */ + rtx remove_insn = insn; + insn = emit_insn_before (gen_rtx_SET (mode, + XEXP (set, 0), + XEXP (XEXP (set, 1), 1)), + insn); + delete_insn (remove_insn); + } + } + } + + /* Structure used to track jump targets. */ + + struct we_jump_targets + { + int target; /* Is this a jump target? */ + int reach_count; /* Number of ways we can reach this insn. */ + int touch_count; /* Number of times we've touched this insn + during scanning. */ + rtx w_equiv; /* WREG-equivalence at this point. */ + }; + + struct we_jump_targets *ip2k_we_jump_targets; + + /* WREG equivalence tracking used within DP reload elimination. */ + + static int + track_w_reload (insn, w_current, w_current_ok, modifying) + rtx insn; + rtx *w_current; + int w_current_ok; + int modifying; + { + rtx set; + + if (GET_CODE (insn) != INSN) + { + *w_current = NULL_RTX; + return 1; + } + + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if (set == NULL_RTX) + { + *w_current = NULL_RTX; + return 1; + } + + /* Look for W being modified. If it is, see if it's being changed + to what it already is! */ + if (GET_CODE (XEXP (set, 0)) == REG + && REGNO (XEXP (set, 0)) == REG_W + && GET_MODE (XEXP (set, 0)) == QImode) + { + /* If this is an equivalence we can delete the new set operation. */ + if (*w_current != NULL_RTX + && rtx_equal_p (XEXP (set, 1), *w_current)) + { + if (modifying) + delete_insn (insn); + } + else + { + *w_current = XEXP (set, 1); + return 1; + } + } + else if (recog_memoized (insn) < 0 + || get_attr_clobberw (insn) != CLOBBERW_NO) + { + /* If we clobber W then we've clobbered any equivalences ! */ + *w_current = NULL_RTX; + return 1; + } + else if (! ip2k_xexp_not_uses_reg_p (XEXP (set, 0), REG_SP, 2) + && *w_current != NULL_RTX + && !ip2k_xexp_not_uses_reg_p (*w_current, REG_SP, 2)) + { + /* We look for a special case of "push" operations screwing up the + setting of DP when it's based on the stack. We can track this one + and replace the old expression for DP with a new one. */ + if (GET_CODE (XEXP (set, 0)) == MEM + && GET_CODE (XEXP (XEXP (set, 0), 0)) == POST_DEC + && GET_CODE (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG + && REGNO (XEXP (XEXP (XEXP (set, 0), 0), 0)) == REG_SP + && GET_CODE (*w_current) == MEM + && GET_CODE (XEXP (*w_current, 0)) == PLUS) + { + /* XXX - need to ensure that we can track this without going + out of range! */ + rtx val = GEN_INT (INTVAL (XEXP (XEXP (*w_current, 0), 1)) + + GET_MODE_SIZE (GET_MODE (XEXP (set, 0)))); + *w_current + = gen_rtx_MEM (HImode, gen_rtx_PLUS (Pmode, + gen_rtx_REG(HImode, REG_SP), + val)); + return 1; + } + } + else if (GET_CODE (XEXP (set, 0)) == REG + && *w_current != NULL_RTX + && !ip2k_xexp_not_uses_reg_p (*w_current, REGNO (XEXP (set, 0)), + GET_MODE_SIZE (GET_MODE (XEXP (set + , 0))))) + { + /* If we've just clobbered all or part of a register reference that we + were sharing for W then we can't share it any more! */ + *w_current = NULL_RTX; + } + + return w_current_ok; + } + + /* As part of the machine-dependent reorg we scan moves into w and track them + to see where any are redundant. */ + + static void + mdr_try_wreg_elim (first_insn) + rtx first_insn; + { + rtx insn; + struct we_jump_targets *wjt; + rtx w_current; + int incomplete_scan; + int last_incomplete_scan; + + ip2k_we_jump_targets + = (struct we_jump_targets *) xcalloc (get_max_uid (), + sizeof (struct we_jump_targets)); + + /* First we scan to build up a list of all CODE_LABEL insns and we work out + how many different ways we can reach them. */ + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) == CODE_LABEL) + { + wjt = &ip2k_we_jump_targets[INSN_UID (insn)]; + wjt->target = 1; + wjt->reach_count = LABEL_NUSES (insn); + wjt->touch_count = 0; + wjt->w_equiv = NULL_RTX; + if (! prev_nonnote_insn (insn) + || (prev_nonnote_insn (insn) + && GET_CODE (prev_nonnote_insn (insn)) != BARRIER)) + wjt->reach_count++; + } + } + + /* Next we scan all of the ways of reaching the code labels to see + what the WREG register is equivalent to as we reach them. If we find + that they're the same then we keep noting the matched value. We + iterate around this until we reach a convergence on WREG equivalences + at all code labels - we have to be very careful not to be too + optimistic! */ + incomplete_scan = -1; + do + { + int w_current_ok = 0; + last_incomplete_scan = incomplete_scan; + w_current = NULL_RTX; + + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + /* If we have a code label then we need to see if we already know + what the equivalence is at this point. If we do then we use it + immediately, but if we don't then we have a special case to track + when we hit a fallthrough-edge (label with no barrier preceding + it). Any other accesses to the label must be from jump insns + and so they're handled elsewhere. */ + if (GET_CODE (insn) == CODE_LABEL) + { + wjt = &ip2k_we_jump_targets[INSN_UID (insn)]; + + /* If we're fully characterized the use the equivalence. */ + if (wjt->touch_count == wjt->reach_count) + { + w_current = wjt->w_equiv; + w_current_ok = 1; + continue; + } + + /* If we have a known equivalence for WREG as we reach the + fallthrough-edge then track this into the code label. */ + if (w_current_ok + && (! prev_nonnote_insn (insn) + || (prev_nonnote_insn (insn) + && GET_CODE (prev_nonnote_insn (insn)) != BARRIER))) + { + if (wjt->touch_count == 0) + wjt->w_equiv = w_current; + + if (wjt->touch_count < wjt->reach_count) + { + wjt->touch_count++; + if (! rtx_equal_p (wjt->w_equiv, w_current)) + { + /* When we definitely know that we can't form an + equivalence for WREG here we must clobber anything + that we'd started to track too. */ + wjt->w_equiv = NULL_RTX; + w_current = NULL_RTX; + w_current_ok = 1; + } + } + } + + /* If we've not completely characterized this code label then + be cautious and assume that we don't know what WREG is + equivalent to. */ + if (wjt->touch_count < wjt->reach_count) + { + w_current = NULL_RTX; + w_current_ok = 0; + } + + continue; + } + + /* If we've hit a jump insn then we look for either an address + vector (jump table) or for jump label references. */ + if (GET_CODE (insn) == JUMP_INSN) + { + /* Don't attempt to track here if we don't have a known + equivalence for WREG at this point. */ + if (w_current_ok) + { + if (JUMP_LABEL (insn)) + { + wjt + = &ip2k_we_jump_targets[INSN_UID (JUMP_LABEL (insn))]; + + if (wjt->touch_count == 0) + wjt->w_equiv = w_current; + + if (wjt->touch_count < wjt->reach_count) + { + wjt->touch_count++; + if (! rtx_equal_p (wjt->w_equiv, w_current)) + wjt->w_equiv = NULL_RTX; + } + } + } + + continue; + } + + /* Anything other than a code labal or jump arrives here. We try and + track WREG, but sometimes we might not be able to. */ + w_current_ok = track_w_reload (insn, &w_current, w_current_ok, 0); + } + + /* When we're looking to see if we've finished we count the number of + paths throught the code labels where we weren't able to definitively + track WREG. This number is used to see if we're converging on a + solution. + If this hits zero then we've fully converged, but if this stays the + same as last time then we probably can't make any further + progress. */ + incomplete_scan = 0; + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) == CODE_LABEL) + { + wjt = &ip2k_we_jump_targets[INSN_UID (insn)]; + if (wjt->touch_count != wjt->reach_count) + { + incomplete_scan += (wjt->reach_count - wjt->touch_count); + wjt->w_equiv = NULL_RTX; + wjt->touch_count = 0; + } + } + } + } + while (incomplete_scan && incomplete_scan != last_incomplete_scan); + + /* Finally we scan the whole function and run WREG elimination. When we hit + a CODE_LABEL we pick up any stored equivalence since we now know that + every path to this point entered with WREG holding the same thing! If + we subsequently have a reload that matches then we can eliminate it. */ + w_current = NULL_RTX; + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) == JUMP_INSN) + continue; + + if (GET_CODE (insn) == CODE_LABEL) + { + wjt = &ip2k_we_jump_targets[INSN_UID (insn)]; + w_current = wjt->w_equiv; + continue; + } + + track_w_reload (insn, &w_current, 1, 1); + } + + free (ip2k_we_jump_targets); + } + #endif /* IP2K_MD_REORG_PASS */ + + /* We perform a lot of untangling of the RTL within the reorg pass since + the IP2k requires some really bizarre (and really undesireable) things + to happen in order to guarantee not aborting. This pass causes several + earlier passes to be re-run as it progressively transforms things, + making the subsequent runs continue to win. */ + + void + machine_dependent_reorg (first_insn) + rtx first_insn ATTRIBUTE_UNUSED; + { + #ifdef IP2K_MD_REORG_PASS + rtx insn, set; + #endif + + CC_STATUS_INIT; + + if (optimize == 0) + { + ip2k_reorg_completed = 1; + ip2k_reorg_split_dimode = 1; + ip2k_reorg_split_simode = 1; + ip2k_reorg_split_himode = 1; + ip2k_reorg_split_qimode = 1; + ip2k_reorg_merge_qimode = 1; + return; + } + #ifndef IP2K_MD_REORG_PASS + ip2k_reorg_completed = 1; + ip2k_reorg_split_dimode = 1; + ip2k_reorg_split_simode = 1; + ip2k_reorg_split_himode = 1; + ip2k_reorg_split_qimode = 1; + ip2k_reorg_merge_qimode = 1; + #else + /* All optimizations below must be debugged and enabled one by one. + All of them commented now because of abort in GCC core. */ + + ip2k_reorg_in_progress = 1; + + /* Look for size effects of earlier optimizations - in particular look for + situations where we're saying "use" a register on one hand but immediately + tagging it as "REG_DEAD" at the same time! Seems like a bug in core-gcc + somewhere really but this is what we have to live with! */ + for (insn = first_insn; insn; insn = NEXT_INSN (insn)) + { + rtx body; + + if (GET_CODE (insn) == CODE_LABEL + || GET_CODE (insn) == NOTE + || GET_CODE (insn) == BARRIER) + continue; + + if (GET_RTX_CLASS (GET_CODE (insn)) != 'i') + continue; + + body = PATTERN (insn); + if (GET_CODE (body) == USE) + if (GET_CODE (XEXP (body, 0)) == REG) + { + int reg; + + reg = REGNO (XEXP (body, 0)); + if (find_regno_note (insn, REG_DEAD, reg)) + { + delete_insn (insn); + } + } + } + + /* There's a good chance that since we last did CSE that we've rearranged + things in such a way that another go will win. Do so now! */ + reload_cse_regs (first_insn); + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_REG_INFO | PROP_DEATH_NOTES); + + /* Look for where absurd things are happening with DP. */ + mdr_try_dp_reload_elim (first_insn); + + ip2k_reorg_in_progress = 0; + ip2k_reorg_completed = 1; + + split_all_insns (0); + + reload_cse_regs (first_insn); + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_REG_INFO | PROP_DEATH_NOTES); + if (flag_peephole2) + peephole2_optimize (NULL); + + mdr_resequence_xy_yx (first_insn); + mdr_propagate_reg_equivs (first_insn); + + /* Look for redundant set instructions. These can occur when we split + instruction patterns and end up with the second half merging with + or being replaced by something that clobbers the first half. */ + for (insn = first_insn; insn; insn = next_nonnote_insn (insn)) + { + if (GET_CODE (insn) == INSN) + { + set = (GET_CODE (PATTERN (insn)) == SET) ? PATTERN (insn) : NULL_RTX; + if ((set != NULL_RTX) + && (GET_CODE (XEXP (set, 0)) == REG) + && (GET_MODE (XEXP (set, 0)) == QImode) + && (find_regno_note (insn, REG_UNUSED, REGNO (XEXP (set, 0))))) + delete_insn (insn); + } + } + + mdr_try_move_dp_reload (first_insn); + mdr_try_move_pushes (first_insn); + + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + + mdr_try_propagate_move (first_insn); + mdr_resequence_xy_yx (first_insn); + + ip2k_reorg_split_dimode = 1; + split_all_insns (0); + + mdr_try_remove_redundant_insns (first_insn); + + mdr_try_propagate_move (first_insn); + + reload_cse_regs (first_insn); + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + if (flag_peephole2) + peephole2_optimize (NULL); + + mdr_try_propagate_move (first_insn); + + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + + ip2k_reorg_split_simode = 1; + split_all_insns (0); + + mdr_try_remove_redundant_insns (first_insn); + + mdr_try_propagate_move (first_insn); + + reload_cse_regs (first_insn); + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + if (flag_peephole2) + peephole2_optimize (NULL); + + mdr_try_propagate_move (first_insn); + + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + + ip2k_reorg_split_himode = 1; + ip2k_reorg_merge_qimode = 1; + split_all_insns (0); + + mdr_try_remove_redundant_insns (first_insn); + mdr_try_propagate_clr (first_insn); + mdr_try_propagate_move (first_insn); + + mdr_try_dp_reload_elim (first_insn); + mdr_try_move_dp_reload (first_insn); + + rebuild_jump_labels (first_insn); + + /* Call to jump_optimize (...) was here, but now I removed it. */ + + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + if (flag_peephole2) + peephole2_optimize (NULL); + + mdr_try_propagate_move (first_insn); + + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + mdr_try_remove_redundant_insns (first_insn); + + mdr_try_propagate_clr (first_insn); + mdr_try_propagate_move (first_insn); + + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + + ip2k_reorg_split_qimode = 1; + split_all_insns (0); + + mdr_try_wreg_elim (first_insn); + mdr_try_propagate_move (first_insn); + + find_basic_blocks (first_insn, max_reg_num (), 0); + life_analysis (first_insn, 0, PROP_FINAL); + #endif + } + + /* Returns a bit position if mask contains only a single bit. Returns -1 if + there were zero or more than one set bits. */ + int + find_one_set_bit_p (mask) + HOST_WIDE_INT mask; + { + int i; + unsigned HOST_WIDE_INT n = mask; + for (i = 0; i < 32; i++) + { + if (n & 0x80000000UL) + { + if (n & 0x7fffffffUL) + return -1; + else + return 31 - i; + } + n <<= 1; + } + return -1; + } + + /* Returns a bit position if mask contains only a single clear bit. + Returns -1 if there were zero or more than one clear bits. */ + int + find_one_clear_bit_p (mask) + HOST_WIDE_INT mask; + { + int i; + unsigned HOST_WIDE_INT n = mask; + for (i = 0; i < 32; i++) + { + if ((n & 0x80000000UL) == 0UL) + { + if ((n & 0x7fffffffUL) != 0x7fffffffUL) + return -1; + else + return 31 - i; + } + n <<= 1; + n |= 1; + } + return -1; + } + + + /* Split a move into two smaller pieces. + MODE indicates the reduced mode. OPERANDS[0] is the original destination + OPERANDS[1] is the original src. The new destinations are + OPERANDS[2] and OPERANDS[4], while the new sources are OPERANDS[3] + and OPERANDS[5]. */ + + void + ip2k_split_words (nmode, omode, operands) + enum machine_mode nmode; + enum machine_mode omode; + rtx *operands; + { + rtx dl, dh; /* src/dest pieces. */ + rtx sl, sh; + int move_high_first = 0; /* Assume no overlap. */ + int pushflag = 0; + + switch (GET_CODE (operands[0])) /* DEST */ + { + case SUBREG: + case REG: + if ((GET_CODE (operands[1]) == REG + || GET_CODE (operands[1]) == SUBREG) + && (true_regnum (operands[0]) <= true_regnum (operands[1]) + || (true_regnum (operands[1]) + + GET_MODE_SIZE (omode) - 1 < true_regnum (operands[0])))) + move_high_first = 1; + + if (GET_CODE (operands[0]) == SUBREG) + { + dl = simplify_gen_subreg (nmode, operands[0], omode, + GET_MODE_SIZE (nmode)); + dh = simplify_gen_subreg (nmode, operands[0], omode, 0); + } + else if (GET_CODE (operands[0]) == REG && ! IS_PSEUDO_P (operands[0])) + { + int r = REGNO (operands[0]); + dh = gen_rtx_REG (nmode, r); + dl = gen_rtx_REG (nmode, r + HARD_REGNO_NREGS (r, nmode)); + } + else + { + dh = gen_rtx_SUBREG (nmode, operands[0], 0); + dl = gen_rtx_SUBREG (nmode, operands[0], GET_MODE_SIZE (nmode)); + } + break; + + case MEM: + switch (GET_CODE (XEXP (operands[0], 0))) + { + case POST_INC: + abort (); + case POST_DEC: + dl = dh = gen_rtx_MEM (nmode, XEXP (operands[0], 0)); + pushflag = 1; + break; + default: + dl = change_address (operands[0], nmode, + plus_constant (XEXP (operands[0], 0), + GET_MODE_SIZE (nmode))); + dh = gen_rtx_MEM (nmode, XEXP (operands[0], 0)); + } + break; + default: + abort (); + } + + switch (GET_CODE (operands[1])) + { + case REG: + if (! IS_PSEUDO_P (operands[1])) + { + int r = REGNO (operands[1]); + + sh = gen_rtx_REG (nmode, r); + sl = gen_rtx_REG (nmode, r + HARD_REGNO_NREGS (r, nmode)); + } + else + { + sh = gen_rtx_SUBREG (nmode, operands[1], 0); + sl = gen_rtx_SUBREG (nmode, operands[1], GET_MODE_SIZE (nmode)); + } + break; + + case CONST_DOUBLE: + if (operands[1] == const0_rtx) + sh = sl = const0_rtx; + else + { + if (GET_MODE (operands[0]) != DImode) + { + REAL_VALUE_TYPE rv; + long value; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); + REAL_VALUE_TO_TARGET_SINGLE (rv, value); + + sh = gen_int_mode ((value >> 16) & 0xffff, nmode); + sl = gen_int_mode (value & 0xffff, nmode); + } + else + { + sh = gen_int_mode (CONST_DOUBLE_HIGH (operands[1]), nmode); + sl = gen_int_mode (CONST_DOUBLE_LOW (operands[1]), nmode); + } + } + break; + + case CONST_INT: + if (operands[1] == const0_rtx) + sh = sl = const0_rtx; + else + { + int val = INTVAL (operands[1]); + int vl, vh; + + switch (nmode) + { + case QImode: + vh = (val >> 8) & 0xff; + vl = val & 0xff; + break; + + case HImode: + vh = (val >> 16) & 0xffff; + vl = val & 0xffff; + break; + + case SImode: + if (val < 0) /* sign extend */ + vh = -1; + else + vh = 0; + vl = val; /* Give low 32 bits back. */ + break; + + default: + abort (); + } + + sl = gen_int_mode (vl, nmode); + sh = gen_int_mode (vh, nmode); + } + break; + + case SUBREG: + sl = simplify_gen_subreg (nmode, operands[1], omode, + GET_MODE_SIZE (nmode)); + sh = simplify_gen_subreg (nmode, operands[1], omode, 0); + break; + + case MEM: + switch (GET_CODE (XEXP (operands[1], 0))) + { + case POST_DEC: + case POST_INC: + abort (); + break; + + default: + /* Worry about splitting stack pushes. */ + if (pushflag && ip2k_address_uses_reg_p (operands[1], REG_SP)) + sl = sh = change_address (operands[1], nmode, + plus_constant (XEXP (operands[1], 0), + GET_MODE_SIZE (nmode))); + else + { + sl = change_address (operands[1], nmode, + plus_constant (XEXP (operands[1], 0), + GET_MODE_SIZE (nmode))); + sh = gen_rtx_MEM (nmode, XEXP (operands[1], 0)); + } + } + break; + + default: + abort (); + } + + if (move_high_first) + { + operands[2] = dh; + operands[3] = sh; + operands[4] = dl; + operands[5] = sl; + } + else + { + operands[2] = dl; + operands[3] = sl; + operands[4] = dh; + operands[5] = sh; + } + return; + } + + /* Get the low half of an operand. */ + rtx + ip2k_get_low_half (x, mode) + rtx x; + enum machine_mode mode; + { + switch (GET_CODE (x)) + { + case REG: + if (! IS_PSEUDO_P (x)) + { + unsigned int r = REGNO (x); + + return gen_rtx_REG (mode, r + HARD_REGNO_NREGS (r, mode)); + } + else + { + return gen_rtx_SUBREG (mode, x, GET_MODE_SIZE (mode)); + } + break; + + case CONST_DOUBLE: + if (x == const0_rtx) + return const0_rtx; + else + { + if (mode != SImode) + { + REAL_VALUE_TYPE rv; + long value; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, x); + REAL_VALUE_TO_TARGET_SINGLE (rv, value); + + return gen_int_mode (value & 0xffff, mode); + } + else + return gen_int_mode (CONST_DOUBLE_LOW (x), mode); + } + break; + + case CONST_INT: + if (x == const0_rtx) + return const0_rtx; + else + { + int val = INTVAL (x); + int vl, vh; + + switch (mode) + { + case QImode: + vh = (val >> 8) & 0xff; + vl = val & 0xff; + break; + + case HImode: + vh = (val >> 16) & 0xffff; + vl = val & 0xffff; + break; + + case SImode: + if (val < 0) /* sign extend */ + vh = -1; + else + vh = 0; + vl = val; /* Give low 32 bits back. */ + break; + + default: + abort (); + } + + return gen_int_mode (vl, mode); + } + break; + + case SUBREG: + return simplify_gen_subreg (mode, x, GET_MODE (x), GET_MODE_SIZE (mode)); + + case MEM: + switch (GET_CODE (XEXP (x, 0))) + { + case POST_DEC: + case POST_INC: + abort (); + break; + + default: + return change_address (x, mode, + plus_constant (XEXP (x, 0), + GET_MODE_SIZE (mode))); + } + break; + + default: + abort (); + } + return NULL_RTX; + } + + /* Get the high half of an operand. */ + rtx + ip2k_get_high_half (x, mode) + rtx x; + enum machine_mode mode; + { + switch (GET_CODE (x)) + { + case REG: + if (! IS_PSEUDO_P (x)) + { + unsigned int r = REGNO (x); + + return gen_rtx_REG (mode, r); + } + else + { + return gen_rtx_SUBREG (mode, x, 0); + } + break; + + case CONST_DOUBLE: + if (x == const0_rtx) + return const0_rtx; + else + { + if (mode != SImode) + { + REAL_VALUE_TYPE rv; + long value; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, x); + REAL_VALUE_TO_TARGET_SINGLE (rv, value); + + return gen_int_mode ((value >> 16) & 0xffff, mode); + } + else + return gen_int_mode (CONST_DOUBLE_HIGH (x), mode); + } + break; + + case CONST_INT: + if (x == const0_rtx) + return const0_rtx; + else + { + int val = INTVAL (x); + int vl, vh; + + switch (mode) + { + case QImode: + vh = (val >> 8) & 0xff; + vl = val & 0xff; + break; + + case HImode: + vh = (val >> 16) & 0xffff; + vl = val & 0xffff; + break; + + case SImode: + if (val < 0) /* sign extend */ + vh = -1; + else + vh = 0; + vl = val; /* Give low 32 bits back. */ + break; + + default: + abort (); + } + + return gen_int_mode (vh, mode); + } + break; + + case SUBREG: + return simplify_gen_subreg (mode, x, GET_MODE (x), 0); + break; + + case MEM: + switch (GET_CODE (XEXP (x, 0))) + { + case POST_DEC: + case POST_INC: + abort (); + break; + + default: + return change_address (x, mode, plus_constant (XEXP (x, 0), 0)); + } + break; + + default: + abort (); + } + return NULL_RTX; + } + + /* Does address X use register R. Only valid for REG_SP, REG_DP, REG_IP + or REG_FP. */ + + int + ip2k_address_uses_reg_p (x, r) + rtx x; + unsigned int r; + { + if (GET_CODE (x) != MEM) + return 0; + + x = XEXP (x, 0); + + while (1) + switch (GET_CODE (x)) + { + case POST_DEC: + case POST_INC: + case PRE_DEC: + case PRE_INC: + x = XEXP (x, 0); + break; + + case PLUS: + if (ip2k_address_uses_reg_p (XEXP (x, 1), r)) + return 1; + + x = XEXP (x, 0); + break; + + case SUBREG: + /* Ignore subwords. */ + x = SUBREG_REG (x); + break; + + case REG: + /* Have to consider that r might be LSB of a pointer reg. */ + return ((REGNO (x) == r) || (REGNO (x) == (r - 1))) ? 1 : 0; + + case MEM: + /* We might be looking at a (mem:BLK (mem (...))) */ + x = XEXP (x, 0); + break; + + default: + return 0; + }; + } + + /* Does the queried XEXP not use a particular register? If we're certain + that it doesn't then we return TRUE otherwise we assume FALSE. */ + + int + ip2k_xexp_not_uses_reg_p (x, r, rsz) + rtx x; + unsigned int r; + int rsz; + { + switch (GET_CODE (x)) + { + case REG: + { + int msz = GET_MODE_SIZE (GET_MODE (x)); + + return (((REGNO (x) + msz - 1) < r) + || (REGNO (x) > (r + rsz - 1))); + } + + case MEM: + return !ip2k_address_uses_reg_p (x, r); + + case LABEL_REF: + case SYMBOL_REF: + case CONST: + case CONST_INT: + case CONST_DOUBLE: + case CC0: + case PC: + return 1; + + default: + return 0; + } + } + + /* Does the queried XEXP not use a particular register? If we're certain + that it doesn't then we return TRUE otherwise we assume FALSE. */ + + int + ip2k_composite_xexp_not_uses_reg_p (x, r, rsz) + rtx x; + unsigned int r; + int rsz; + { + if (GET_RTX_CLASS (GET_CODE (x)) == 'b') + return (ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 0), r, rsz) + && ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 1), r, rsz) + && ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 2), r, rsz)); + + if (GET_RTX_CLASS (GET_CODE (x)) == '2' + || GET_RTX_CLASS (GET_CODE (x)) == 'c' + || GET_RTX_CLASS (GET_CODE (x)) == '<') + return (ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 0), r, rsz) + && ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 1), r, rsz)); + + if (GET_RTX_CLASS (GET_CODE (x)) == '1' + || GET_RTX_CLASS (GET_CODE (x)) == '3') + return ip2k_composite_xexp_not_uses_reg_p (XEXP (x, 0), r, rsz); + + return ip2k_xexp_not_uses_reg_p (x, r, rsz); + } + + /* Does the queried XEXP not use CC0? If we're certain that + it doesn't then we return TRUE otherwise we assume FALSE. */ + + int + ip2k_composite_xexp_not_uses_cc0_p (x) + rtx x; + { + if (GET_RTX_CLASS (GET_CODE (x)) == 'b') + return (ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 0)) + && ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 1)) + && ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 2))); + + if (GET_RTX_CLASS (GET_CODE (x)) == '2' + || GET_RTX_CLASS (GET_CODE (x)) == 'c' + || GET_RTX_CLASS (GET_CODE (x)) == '<') + return (ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 0)) + && ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 1))); + + if (GET_RTX_CLASS (GET_CODE (x)) == '1' + || GET_RTX_CLASS (GET_CODE (x)) == '3') + return ip2k_composite_xexp_not_uses_cc0_p (XEXP (x, 0)); + + return GET_CODE (x) != CC0; + } + + int + ip2k_split_dest_operand (x, mode) + rtx x; + enum machine_mode mode; + { + return nonimmediate_operand (x, mode) || push_operand (x, mode); + } + + int + ip2k_nonptr_operand (x, mode) + rtx x; + enum machine_mode mode; + { + return register_operand (x, mode) && !ip2k_ptr_operand (x, mode); + } + + /* Is X a reference to IP or DP or SP? */ + + int + ip2k_ptr_operand (x, mode) + rtx x; + enum machine_mode mode; + + { + if (GET_CODE (x) == SUBREG) + x = SUBREG_REG (x); + + return (REG_P (x) + && (mode == HImode || mode == VOIDmode) + && (REGNO (x) == REG_IP + || REGNO (x) == REG_DP + || REGNO (x) == REG_SP)); + } + + int + ip2k_sp_operand (x, mode) + rtx x; + enum machine_mode mode ATTRIBUTE_UNUSED; + + { + return REG_P (x) && REGNO (x) == REG_SP; + } + + int + ip2k_ip_operand (x, mode) + rtx x; + enum machine_mode mode; + + { + if (GET_CODE (x) != MEM) + return 0; + + x = XEXP (x, 0); + + if (GET_CODE (x) == PLUS && XEXP (x, 1) == const0_rtx) + x = XEXP (x, 0); + + if (! REG_P (x)) + return 0; + + if (GET_MODE_SIZE (mode) > 1) + return 0; /* Can't access offset bytes. */ + + return REGNO (x) == REG_IP; + } + + /* Is X a memory address suitable for SP or DP relative addressing? */ + int + ip2k_short_operand (x, mode) + rtx x; + enum machine_mode mode; + { + int r; + unsigned int offs = 0; + + if (! memory_operand (x, mode)) + return 0; /* Got to be a memory address. */ + + x = XEXP (x, 0); + switch (GET_CODE (x)) + { + default: + return 0; + + case PLUS: + if (! REG_P (XEXP (x, 0)) + || GET_CODE (XEXP (x, 1)) != CONST_INT) + return 0; + + offs = INTVAL (XEXP (x, 1)); + + if (128 <= offs) + return 0; + + x = XEXP (x, 0); + + /* fall thru */ + + case REG: + if (IS_PSEUDO_P (x)) + return 0; /* Optimistic - doesn't work. */ + + r = REGNO (x); + + /* For 'S' constraint, we presume that no IP adjustment + simulation is performed - so only QI mode allows IP to be a + short offset address. All other IP references must be + handled by 'R' constraints. */ + if (r == REG_IP && offs == 0 && GET_MODE_SIZE (mode) <= 1) + return 1; + + return (r == REG_SP || r == REG_DP); + } + } + + int + ip2k_nonsp_reg_operand (x, mode) + rtx x; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + if (GET_CODE (x) == SUBREG) + x = SUBREG_REG (x); + + return (REG_P (x) && REGNO (x) != REG_SP); + } + + int + ip2k_gen_operand (x, mode) + rtx x; + enum machine_mode mode; + { + return ip2k_short_operand (x, mode) + || (GET_CODE (x) == SUBREG + && REG_P (SUBREG_REG (x))) + || (ip2k_nonsp_reg_operand (x, mode)); + } + + int + ip2k_extra_constraint (x, c) + rtx x; + int c; + { + switch (c) + { + case 'S': /* Allow offset in stack frame... */ + return ip2k_short_operand (x, GET_MODE (x)); + + case 'R': + return ip2k_ip_operand (x, GET_MODE (x)); + + case 'T': /* Constant int or .data address. */ + return CONSTANT_P (x) && is_regfile_address (x); + + default: + return 0; + } + } + + int + ip2k_unary_operator (op, mode) + rtx op; + enum machine_mode mode; + { + return ((mode == VOIDmode || GET_MODE (op) == mode) + && GET_RTX_CLASS (GET_CODE (op)) == '1'); + } + + int + ip2k_binary_operator (op, mode) + rtx op; + enum machine_mode mode; + { + return ((mode == VOIDmode || GET_MODE (op) == mode) + && (GET_RTX_CLASS (GET_CODE (op)) == 'c' + || GET_RTX_CLASS (GET_CODE (op)) == '2')); + } + + int + ip2k_symbol_ref_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + /* We define an IP2k symbol ref to be either a direct reference or one + with a constant offset. */ + return (GET_CODE (op) == SYMBOL_REF) + || (GET_CODE (op) == CONST + && GET_CODE (XEXP (op, 0)) == PLUS + && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF); + } + + int + ip2k_signed_comparison_operator (op, mode) + rtx op; + enum machine_mode mode; + { + return (comparison_operator (op, mode) + && signed_condition (GET_CODE (op)) == GET_CODE (op)); + } + + int + ip2k_unsigned_comparison_operator (op, mode) + rtx op; + enum machine_mode mode; + { + return (comparison_operator (op, mode) + && unsigned_condition (GET_CODE (op)) == GET_CODE (op)); + } diff -Nrc3pad gcc-3.2.3/gcc/config/ip2k/ip2k.h gcc-3.3/gcc/config/ip2k/ip2k.h *** gcc-3.2.3/gcc/config/ip2k/ip2k.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ip2k/ip2k.h 2003-01-14 20:13:44.000000000 +0000 *************** *** 0 **** --- 1,2509 ---- + /* Definitions of target machine for GNU compiler, + For Ubicom IP2022 Communications Controller + + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Contributed by Red Hat, Inc and Ubicom, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + /* Set up System V.4 (aka ELF) defaults. */ + + #include "elfos.h" + #undef ASM_SPEC /* But we have a GAS assembler. */ + + #define CPP_PREDEFINES \ + "-DIP2K -D_DOUBLE_IS_32BITS -D__BUFSIZ__=512 -D__FILENAME_MAX__=128" + /* Define this to be a string constant containing `-D' options to + define the predefined macros that identify this machine and system. + These macros will be predefined unless the `-ansi' option is + specified. + + In addition, a parallel set of macros are predefined, whose names + are made by appending `__' at the beginning and at the end. These + `__' macros are permitted by the ANSI standard, so they are + predefined regardless of whether `-ansi' is specified. + + For example, on the Sun, one can use the following value: + + "-Dmc68000 -Dsun -Dunix" + + The result is to define the macros `__mc68000__', `__sun__' and + `__unix__' unconditionally, and the macros `mc68000', `sun' and + `unix' provided `-ansi' is not specified. */ + + + /* This declaration should be present. */ + extern int target_flags; + + /* `TARGET_...' + This series of macros is to allow compiler command arguments to + enable or disable the use of optional features of the target + machine. For example, one machine description serves both the + 68000 and the 68020; a command argument tells the compiler whether + it should use 68020-only instructions or not. This command + argument works by means of a macro `TARGET_68020' that tests a bit + in `target_flags'. + + Define a macro `TARGET_FEATURENAME' for each such option. Its + definition should test a bit in `target_flags'; for example: + + #define TARGET_68020 (target_flags & 1) + + One place where these macros are used is in the + condition-expressions of instruction patterns. Note how + `TARGET_68020' appears frequently in the 68000 machine description + file, `m68k.md'. Another place they are used is in the + definitions of the other macros in the `MACHINE.h' file. */ + + + + #define TARGET_SWITCHES {{"",0, NULL}} + /* This macro defines names of command options to set and clear bits + in `target_flags'. Its definition is an initializer with a + subgrouping for each command option. + + Each subgrouping contains a string constant, that defines the + option name, and a number, which contains the bits to set in + `target_flags'. A negative number says to clear bits instead; the + negative of the number is which bits to clear. The actual option + name is made by appending `-m' to the specified name. + + One of the subgroupings should have a null string. The number in + this grouping is the default value for `target_flags'. Any target + options act starting with that value. + + Here is an example which defines `-m68000' and `-m68020' with + opposite meanings, and picks the latter as the default: + + #define TARGET_SWITCHES \ + { { "68020", 1}, \ + { "68000", -1}, \ + { "", 1}} */ + + + /* This macro is similar to `TARGET_SWITCHES' but defines names of + command options that have values. Its definition is an + initializer with a subgrouping for each command option. + + Each subgrouping contains a string constant, that defines the + fixed part of the option name, and the address of a variable. The + variable, type `char *', is set to the variable part of the given + option if the fixed part matches. The actual option name is made + by appending `-m' to the specified name. + + Here is an example which defines `-mshort-data-NUMBER'. If the + given option is `-mshort-data-512', the variable `m88k_short_data' + will be set to the string `"512"'. + + extern char *m88k_short_data; + #define TARGET_OPTIONS \ + { { "short-data-", &m88k_short_data } } */ + + #define TARGET_VERSION fprintf (stderr, " (ip2k, GNU assembler syntax)") + /* This macro is a C statement to print on `stderr' a string + describing the particular machine description choice. Every + machine description should define `TARGET_VERSION'. For example: + + #ifdef MOTOROLA + #define TARGET_VERSION \ + fprintf (stderr, " (68k, Motorola syntax)") + #else + #define TARGET_VERSION \ + fprintf (stderr, " (68k, MIT syntax)") + #endif */ + + /* Caller-saves is not a win for the IP2K. Pretty much anywhere that + a register is permitted allows SP-relative addresses too. + + This machine doesn't have PIC addressing modes, so disable that also. */ + + #define OVERRIDE_OPTIONS \ + do { \ + flag_caller_saves = 0; \ + flag_pic = 0; \ + } while (0) + + /* `OVERRIDE_OPTIONS' + Sometimes certain combinations of command options do not make + sense on a particular target machine. You can define a macro + `OVERRIDE_OPTIONS' to take account of this. This macro, if + defined, is executed once just after all the command options have + been parsed. + + Don't use this macro to turn on various extra optimizations for + `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ + + /* Put each function in its own section so that PAGE-instruction + relaxation can do its best. */ + #define OPTIMIZATION_OPTIONS(LEVEL, SIZEFLAG) \ + do { \ + if ((LEVEL) || (SIZEFLAG)) \ + flag_function_sections = 1; \ + } while (0) + + /* Define this if most significant byte of a word is the lowest numbered. */ + #define BITS_BIG_ENDIAN 0 + + /* Define this if most significant byte of a word is the lowest numbered. */ + #define BYTES_BIG_ENDIAN 1 + + /* Define this if most significant word of a multiword number is the lowest + numbered. */ + #define WORDS_BIG_ENDIAN 1 + + /* Number of bits in an addressable storage unit. */ + #define BITS_PER_UNIT 8 + + /* Width in bits of a "word", which is the contents of a machine register. + Note that this is not necessarily the width of data type `int'; */ + #define BITS_PER_WORD 8 + + /* Width of a word, in units (bytes). */ + #define UNITS_PER_WORD (BITS_PER_WORD / BITS_PER_UNIT) + + /* Width in bits of a pointer. + See also the macro `Pmode' defined below. */ + #define POINTER_SIZE 16 + + /* Maximum sized of reasonable data type DImode or Dfmode ... */ + #define MAX_FIXED_MODE_SIZE 64 + + /* Allocation boundary (in *bits*) for storing arguments in argument list. */ + #define PARM_BOUNDARY 8 + + /* Allocation boundary (in *bits*) for the code of a function. */ + #define FUNCTION_BOUNDARY 16 + + /* Alignment of field after `int : 0' in a structure. */ + #define EMPTY_FIELD_BOUNDARY 8 + + /* No data type wants to be aligned rounder than this. */ + + #define BIGGEST_ALIGNMENT 8 + + #define STRICT_ALIGNMENT 0 + + #define PCC_BITFIELD_TYPE_MATTERS 1 + + /* A C expression for the size in bits of the type `int' on the + target machine. If you don't define this, the default is one word. */ + #undef INT_TYPE_SIZE + #define INT_TYPE_SIZE 16 + + + /* A C expression for the size in bits of the type `short' on the + target machine. If you don't define this, the default is half a + word. (If this would be less than one storage unit, it is rounded + up to one unit.) */ + #undef SHORT_TYPE_SIZE + #define SHORT_TYPE_SIZE 16 + + /* A C expression for the size in bits of the type `long' on the + target machine. If you don't define this, the default is one word. */ + #undef LONG_TYPE_SIZE + #define LONG_TYPE_SIZE 32 + + + /* Maximum number for the size in bits of the type `long' on the + target machine. If this is undefined, the default is + `LONG_TYPE_SIZE'. Otherwise, it is the constant value that is the + largest value that `LONG_TYPE_SIZE' can have at run-time. This is + used in `cpp'. */ + #define MAX_LONG_TYPE_SIZE 32 + + /* A C expression for the size in bits of the type `long long' on the + target machine. If you don't define this, the default is two + words. If you want to support GNU Ada on your machine, the value + of macro must be at least 64. */ + #undef LONG_LONG_TYPE_SIZE + #define LONG_LONG_TYPE_SIZE 64 + + #undef CHAR_TYPE_SIZE + #define CHAR_TYPE_SIZE 8 + /* A C expression for the size in bits of the type `char' on the + target machine. If you don't define this, the default is one + quarter of a word. (If this would be less than one storage unit, + it is rounded up to one unit.) */ + + #undef FLOAT_TYPE_SIZE + #define FLOAT_TYPE_SIZE 32 + /* A C expression for the size in bits of the type `float' on the + target machine. If you don't define this, the default is one word. */ + + #undef DOUBLE_TYPE_SIZE + #define DOUBLE_TYPE_SIZE 32 + /* A C expression for the size in bits of the type `double' on the + target machine. If you don't define this, the default is two + words. */ + + + /* A C expression for the size in bits of the type `long double' on + the target machine. If you don't define this, the default is two + words. */ + #undef LONG_DOUBLE_TYPE_SIZE + #define LONG_DOUBLE_TYPE_SIZE 32 + + #define DEFAULT_SIGNED_CHAR 1 + /* An expression whose value is 1 or 0, according to whether the type + `char' should be signed or unsigned by default. The user can + always override this default with the options `-fsigned-char' and + `-funsigned-char'. */ + + /* #define DEFAULT_SHORT_ENUMS 1 + This was the default for the IP2k but gcc has a bug (as of 17th May + 2001) in the way that library calls to the memory checker functions + are issues that screws things up if an enum is not equivalent to + an int. */ + /* `DEFAULT_SHORT_ENUMS' + A C expression to determine whether to give an `enum' type only as + many bytes as it takes to represent the range of possible values + of that type. A nonzero value means to do that; a zero value + means all `enum' types should be allocated like `int'. + + If you don't define the macro, the default is 0. */ + + #define SIZE_TYPE "unsigned int" + /* A C expression for a string describing the name of the data type + to use for size values. The typedef name `size_t' is defined + using the contents of the string. + + The string can contain more than one keyword. If so, separate + them with spaces, and write first any length keyword, then + `unsigned' if appropriate, and finally `int'. The string must + exactly match one of the data type names defined in the function + `init_decl_processing' in the file `c-decl.c'. You may not omit + `int' or change the order--that would cause the compiler to crash + on startup. + + If you don't define this macro, the default is `"long unsigned + int"'. */ + + #define PTRDIFF_TYPE "int" + /* A C expression for a string describing the name of the data type + to use for the result of subtracting two pointers. The typedef + name `ptrdiff_t' is defined using the contents of the string. See + `SIZE_TYPE' above for more information. + + If you don't define this macro, the default is `"long int"'. */ + + #undef WCHAR_TYPE + #define WCHAR_TYPE "int" + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE 16 + /* A C expression for the size in bits of the data type for wide + characters. This is used in `cpp', which cannot make use of + `WCHAR_TYPE'. */ + + #define HARD_REG_SIZE (UNITS_PER_WORD) + /* Standard register usage. + + for the IP2K, we are going to have a LOT of registers, but only some of them + are named. */ + + #define FIRST_PSEUDO_REGISTER (0x104) /* Skip over physical regs, VFP, AP. */ + + /* Number of hardware registers known to the compiler. They receive + numbers 0 through `FIRST_PSEUDO_REGISTER-1'; thus, the first + pseudo register's number really is assigned the number + `FIRST_PSEUDO_REGISTER'. */ + + #define REG_IP 0x4 + #define REG_IPH REG_IP + #define REG_IPL 0x5 + + #define REG_SP 0x6 + #define REG_SPH REG_SP + #define REG_SPL 0x7 + + #define REG_PCH 0x8 + #define REG_PCL 0x9 + + #define REG_W 0xa + #define REG_STATUS 0xb + + #define REG_DP 0xc + #define REG_DPH REG_DP + #define REG_DPL 0xd + + #define REG_MULH 0xf + + #define REG_CALLH 0x7e /* Call-stack readout. */ + #define REG_CALLL 0x7f + + + #define REG_RESULT 0x80 /* Result register (upto 8 bytes). */ + #define REG_FP 0xfd /* 2 bytes for FRAME chain */ + + #define REG_ZERO 0xff /* Initialized to zero by runtime. */ + + #define REG_VFP 0x100 /* Virtual frame pointer. */ + #define REG_AP 0x102 /* Virtual arg pointer. */ + + /* Status register bits. */ + #define Z_FLAG 0x2 + #define DC_FLAG 0x1 + #define C_FLAG 0x0 + + #define FIXED_REGISTERS {\ + 1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r0.. r31*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r32.. r63*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r64.. r95*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r96..r127*/\ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,/*r128..r159*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/*r160..r191*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/*r192..r223*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/*r224..r255*/\ + 1,1,1,1} + + /* An initializer that says which registers are used for fixed + purposes all throughout the compiled code and are therefore not + available for general allocation. These would include the stack + pointer, the frame pointer (except on machines where that can be + used as a general register when no frame pointer is needed), the + program counter on machines where that is considered one of the + addressable registers, and any other numbered register with a + standard use. + + This information is expressed as a sequence of numbers, separated + by commas and surrounded by braces. The Nth number is 1 if + register N is fixed, 0 otherwise. + + The table initialized from this macro, and the table initialized by + the following one, may be overridden at run time either + automatically, by the actions of the macro + `CONDITIONAL_REGISTER_USAGE', or by the user with the command + options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */ + + #define CALL_USED_REGISTERS { \ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r0.. r31*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r32.. r63*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r64.. r95*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/* r96..r127*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/*r128..r159*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/*r160..r191*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/*r192..r223*/\ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,/*r224..r255*/\ + 1,1,1,1} + + /* Like `FIXED_REGISTERS' but has 1 for each register that is + clobbered (in general) by function calls as well as for fixed + registers. This macro therefore identifies the registers that are + not available for general allocation of values that must live + across function calls. + + If a register has 0 in `CALL_USED_REGISTERS', the compiler + automatically saves it on function entry and restores it on + function exit, if the register is used within the function. */ + + #define NON_SAVING_SETJMP 0 + /* If this macro is defined and has a nonzero value, it means that + `setjmp' and related functions fail to save the registers, or that + `longjmp' fails to restore them. To compensate, the compiler + avoids putting variables in registers in functions that use + `setjmp'. */ + + #define REG_ALLOC_ORDER { \ + 0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f, \ + 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97, \ + 0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f, \ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, \ + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7, \ + 0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf, \ + 0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7, \ + 0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf, \ + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7, \ + 0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf, \ + 0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7, \ + 0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf, \ + 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, \ + 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef, \ + 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7, \ + 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff, \ + 0x00,0x01,0x02,0x03,0x0c,0x0d,0x06,0x07, \ + 0x08,0x09,0x0a,0x0b,0x04,0x05,0x0e,0x0f, \ + 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17, \ + 0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f, \ + 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27, \ + 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f, \ + 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37, \ + 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f, \ + 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47, \ + 0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f, \ + 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57, \ + 0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f, \ + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67, \ + 0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f, \ + 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77, \ + 0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f, \ + 0x100,0x101,0x102,0x103} + + /* If defined, an initializer for a vector of integers, containing the + numbers of hard registers in the order in which GNU CC should + prefer to use them (from most preferred to least). + + If this macro is not defined, registers are used lowest numbered + first (all else being equal). + + One use of this macro is on machines where the highest numbered + registers must always be saved and the save-multiple-registers + instruction supports only sequences of consecutive registers. On + such machines, define `REG_ALLOC_ORDER' to be an initializer that + lists the highest numbered allocatable register first. */ + + #define ORDER_REGS_FOR_LOCAL_ALLOC ip2k_init_local_alloc (reg_alloc_order) + /* A C statement (sans semicolon) to choose the order in which to + allocate hard registers for pseudo-registers local to a basic + block. + + Store the desired register order in the array `reg_alloc_order'. + Element 0 should be the register to allocate first; element 1, the + next register; and so on. + + The macro body should not assume anything about the contents of + `reg_alloc_order' before execution of the macro. + + On most machines, it is not necessary to define this macro. */ + + /* Are we allowed to rename registers? For some reason, regrename was + changing DP to IP (when it appeared in addresses like (plus:HI + (reg: DP) (const_int 37)) - and that's bad because IP doesn't + permit offsets! */ + + #define HARD_REGNO_RENAME_OK(REG, NREG) \ + (((REG) == REG_DPH) ? 0 \ + : ((REG) == REG_IPH) ? ((NREG) == REG_DPH) \ + : (((NREG) == REG_IPL) || ((NREG) == REG_DPL)) ? 0 : 1) + + #define HARD_REGNO_NREGS(REGNO, MODE) \ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) + + /* A C expression for the number of consecutive hard registers, + starting at register number REGNO, required to hold a value of mode + MODE. + + On a machine where all registers are exactly one word, a suitable + definition of this macro is + + #define HARD_REGNO_NREGS(REGNO, MODE) \ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ + / UNITS_PER_WORD)) */ + + #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 + /* A C expression that is nonzero if it is permissible to store a + value of mode MODE in hard register number REGNO (or in several + registers starting with that one). For a machine where all + registers are equivalent, a suitable definition is + + #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 + + It is not necessary for this macro to check for the numbers of + fixed registers, because the allocation mechanism considers them + to be always occupied. + + On some machines, double-precision values must be kept in even/odd + register pairs. The way to implement that is to define this macro + to reject odd register numbers for such modes. + + The minimum requirement for a mode to be OK in a register is that + the `movMODE' instruction pattern support moves between the + register and any other hard register for which the mode is OK; and + that moving a value into the register and back out not alter it. + + Since the same instruction used to move `SImode' will work for all + narrower integer modes, it is not necessary on any machine for + `HARD_REGNO_MODE_OK' to distinguish between these modes, provided + you define patterns `movhi', etc., to take advantage of this. This + is useful because of the interaction between `HARD_REGNO_MODE_OK' + and `MODES_TIEABLE_P'; it is very desirable for all integer modes + to be tieable. + + Many machines have special registers for floating point arithmetic. + Often people assume that floating point machine modes are allowed + only in floating point registers. This is not true. Any + registers that can hold integers can safely *hold* a floating + point machine mode, whether or not floating arithmetic can be done + on it in those registers. Integer move instructions can be used + to move the values. + + On some machines, though, the converse is true: fixed-point machine + modes may not go in floating registers. This is true if the + floating registers normalize any value stored in them, because + storing a non-floating value there would garble it. In this case, + `HARD_REGNO_MODE_OK' should reject fixed-point machine modes in + floating registers. But if the floating registers do not + automatically normalize, if you can store any bit pattern in one + and retrieve it unchanged without a trap, then any machine mode + may go in a floating register, so you can define this macro to say + so. + + The primary significance of special floating registers is rather + that they are the registers acceptable in floating point arithmetic + instructions. However, this is of no concern to + `HARD_REGNO_MODE_OK'. You handle it by writing the proper + constraints for those instructions. + + On some machines, the floating registers are especially slow to + access, so that it is better to store a value in a stack frame + than in such a register if floating point arithmetic is not being + done. As long as the floating registers are not in class + `GENERAL_REGS', they will not be used unless some pattern's + constraint asks for one. */ + + #define MODES_TIEABLE_P(MODE1, MODE2) \ + (((MODE1) == QImode && (MODE2) == HImode) \ + || ((MODE2) == QImode && (MODE1) == HImode)) + /* We originally had this as follows - this isn't a win on the IP2k + though as registers just get in our way! + + #define MODES_TIEABLE_P(MODE1, MODE2) \ + (((MODE1) > HImode && (MODE2) == HImode) + || ((MODE1) == HImode && (MODE2) > HImode)) */ + + /* A C expression that is nonzero if it is desirable to choose + register allocation so as to avoid move instructions between a + value of mode MODE1 and a value of mode MODE2. + + If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, + MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1, + MODE2)' must be zero. */ + + enum reg_class { + NO_REGS, + DPH_REGS, + DPL_REGS, + DP_REGS, + SP_REGS, + IPH_REGS, + IPL_REGS, + IP_REGS, + DP_SP_REGS, + PTR_REGS, + NONPTR_REGS, + NONSP_REGS, + GENERAL_REGS, + ALL_REGS = GENERAL_REGS, + LIM_REG_CLASSES + }; + + /* An enumeral type that must be defined with all the register class + names as enumeral values. `NO_REGS' must be first. `ALL_REGS' + must be the last register class, followed by one more enumeral + value, `LIM_REG_CLASSES', which is not a register class but rather + tells how many classes there are. + + Each register class has a number, which is the value of casting + the class name to type `int'. The number serves as an index in + many of the tables described below. */ + + + #define N_REG_CLASSES (int)LIM_REG_CLASSES + /* The number of distinct register classes, defined as follows: + + #define N_REG_CLASSES (int) LIM_REG_CLASSES */ + + #define REG_CLASS_NAMES { \ + "NO_REGS", \ + "DPH_REGS", \ + "DPL_REGS", \ + "DP_REGS", \ + "SP_REGS", \ + "IPH_REGS", \ + "IPL_REGS", \ + "IP_REGS", \ + "DP_SP_REGS", \ + "PTR_REGS", \ + "NONPTR_REGS", \ + "NONSP_REGS", \ + "GENERAL_REGS" \ + } + /* An initializer containing the names of the register classes as C + string constants. These names are used in writing some of the + debugging dumps. */ + + + #define REG_CLASS_CONTENTS { \ + {0x00000000, 0, 0, 0, 0, 0, 0, 0, 0}, /* NO_REGS */ \ + {0x00001000, 0, 0, 0, 0, 0, 0, 0, 0}, /* DPH_REGS */ \ + {0x00002000, 0, 0, 0, 0, 0, 0, 0, 0}, /* DPL_REGS */ \ + {0x00003000, 0, 0, 0, 0, 0, 0, 0, 0}, /* DP_REGS */ \ + {0x000000c0, 0, 0, 0, 0, 0, 0, 0, 0}, /* SP_REGS */ \ + {0x00000010, 0, 0, 0, 0, 0, 0, 0, 0}, /* IPH_REGS */ \ + {0x00000020, 0, 0, 0, 0, 0, 0, 0, 0}, /* IPL_REGS */ \ + {0x00000030, 0, 0, 0, 0, 0, 0, 0, 0}, /* IP_REGS */ \ + {0x000030c0, 0, 0, 0, 0, 0, 0, 0, 0}, /* DP_SP_REGS */ \ + {0x000030f0, 0, 0, 0, 0, 0, 0, 0, 0}, /* PTR_REGS */ \ + {0xffffcf0f,-1,-1,-1,-1,-1,-1,-1, 0}, /* NONPTR_REGS */ \ + {0xffffff3f,-1,-1,-1,-1,-1,-1,-1, 0}, /* NONSP_REGS */ \ + {0xffffffff,-1,-1,-1,-1,-1,-1,-1,15} /* GENERAL_REGS */ \ + } + + /* An initializer containing the contents of the register classes, as + integers which are bit masks. The Nth integer specifies the + contents of class N. The way the integer MASK is interpreted is + that register R is in the class if `MASK & (1 << R)' is 1. + + When the machine has more than 32 registers, an integer does not + suffice. Then the integers are replaced by sub-initializers, + braced groupings containing several integers. Each + sub-initializer must be suitable as an initializer for the type + `HARD_REG_SET' which is defined in `hard-reg-set.h'. */ + + #define REGNO_REG_CLASS(R) \ + ( (R) == REG_IPH ? IPH_REGS \ + : (R) == REG_IPL ? IPL_REGS \ + : (R) == REG_DPH ? DPH_REGS \ + : (R) == REG_DPL ? DPL_REGS \ + : (R) == REG_SPH ? SP_REGS \ + : (R) == REG_SPL ? SP_REGS \ + : NONPTR_REGS) + + /* A C expression whose value is a register class containing hard + register REGNO. In general there is more than one such class; + choose a class which is "minimal", meaning that no smaller class + also contains the register. */ + + #define MODE_BASE_REG_CLASS(MODE) ((MODE) == QImode ? PTR_REGS : DP_SP_REGS) + /* This is a variation of the BASE_REG_CLASS macro which allows + the selection of a base register in a mode depenedent manner. + If MODE is VOIDmode then it should return the same value as + BASE_REG_CLASS. */ + + #define BASE_REG_CLASS PTR_REGS + /* A macro whose definition is the name of the class to which a valid + base register must belong. A base register is one used in an + address which is the register value plus a displacement. */ + + #define INDEX_REG_CLASS NO_REGS + /* A macro whose definition is the name of the class to which a valid + index register must belong. An index register is one used in an + address where its value is either multiplied by a scale factor or + added to another register (as well as added to a displacement). */ + + + #define REG_CLASS_FROM_LETTER(C) \ + ( (C) == 'j' ? IPH_REGS \ + : (C) == 'k' ? IPL_REGS \ + : (C) == 'f' ? IP_REGS \ + : (C) == 'y' ? DPH_REGS \ + : (C) == 'z' ? DPL_REGS \ + : (C) == 'b' ? DP_REGS \ + : (C) == 'u' ? NONSP_REGS \ + : (C) == 'q' ? SP_REGS \ + : (C) == 'c' ? DP_SP_REGS \ + : (C) == 'a' ? PTR_REGS \ + : (C) == 'd' ? NONPTR_REGS \ + : NO_REGS) + + /* A C expression which defines the machine-dependent operand + constraint letters for register classes. If CHAR is such a + letter, the value should be the register class corresponding to + it. Otherwise, the value should be `NO_REGS'. The register + letter `r', corresponding to class `GENERAL_REGS', will not be + passed to this macro; you do not need to handle it. */ + + + #define REGNO_OK_FOR_BASE_P(R) \ + ((R) == REG_DP || (R) == REG_IP || (R) == REG_SP) + /* A C expression which is nonzero if register number R is suitable + for use as a base register in operand addresses. It may be either + a suitable hard register or a pseudo register that has been + allocated such a hard register. */ + + #define REGNO_MODE_OK_FOR_BASE_P(R,M) \ + ((R) == REG_DP || (R) == REG_SP \ + || ((R) == REG_IP && GET_MODE_SIZE (M) <= 1)) + /* A C expression that is just like `REGNO_OK_FOR_BASE_P', except that + that expression may examine the mode of the memory reference in + MODE. You should define this macro if the mode of the memory + reference affects whether a register may be used as a base + register. If you define this macro, the compiler will use it + instead of `REGNO_OK_FOR_BASE_P'. */ + + #define REGNO_OK_FOR_INDEX_P(NUM) 0 + /* A C expression which is nonzero if register number NUM is suitable + for use as an index register in operand addresses. It may be + either a suitable hard register or a pseudo register that has been + allocated such a hard register. + + The difference between an index register and a base register is + that the index register may be scaled. If an address involves the + sum of two registers, neither one of them scaled, then either one + may be labeled the "base" and the other the "index"; but whichever + labeling is used must fit the machine's constraints of which + registers may serve in each capacity. The compiler will try both + labelings, looking for one that is valid, and will reload one or + both registers only if neither labeling works. */ + + #define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS) + /* A C expression that places additional restrictions on the register + class to use when it is necessary to copy value X into a register + in class CLASS. The value is a register class; perhaps CLASS, or + perhaps another, smaller class. On many machines, the following + definition is safe: + + #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) + + Sometimes returning a more restrictive class makes better code. + For example, on the 68000, when X is an integer constant that is + in range for a `moveq' instruction, the value of this macro is + always `DATA_REGS' as long as CLASS includes the data registers. + Requiring a data register guarantees that a `moveq' will be used. + + If X is a `const_double', by returning `NO_REGS' you can force X + into a memory constant. This is useful on certain machines where + immediate floating values cannot be loaded into certain kinds of + registers. */ + + /* `PREFERRED_OUTPUT_RELOAD_CLASS (X, CLASS)' + Like `PREFERRED_RELOAD_CLASS', but for output reloads instead of + input reloads. If you don't define this macro, the default is to + use CLASS, unchanged. */ + + /* `LIMIT_RELOAD_CLASS (MODE, CLASS)' + A C expression that places additional restrictions on the register + class to use when it is necessary to be able to hold a value of + mode MODE in a reload register for which class CLASS would + ordinarily be used. + + Unlike `PREFERRED_RELOAD_CLASS', this macro should be used when + there are certain modes that simply can't go in certain reload + classes. + + The value is a register class; perhaps CLASS, or perhaps another, + smaller class. + + Don't define this macro unless the target machine has limitations + which require the macro to do something nontrivial. */ + + /* SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) + `SECONDARY_RELOAD_CLASS (CLASS, MODE, X)' + `SECONDARY_OUTPUT_RELOAD_CLASS (CLASS, MODE, X)' + Many machines have some registers that cannot be copied directly + to or from memory or even from other types of registers. An + example is the `MQ' register, which on most machines, can only be + copied to or from general registers, but not memory. Some + machines allow copying all registers to and from memory, but + require a scratch register for stores to some memory locations + (e.g., those with symbolic address on the RT, and those with + certain symbolic address on the SPARC when compiling PIC). In + some cases, both an intermediate and a scratch register are + required. + + You should define these macros to indicate to the reload phase + that it may need to allocate at least one register for a reload in + addition to the register to contain the data. Specifically, if + copying X to a register CLASS in MODE requires an intermediate + register, you should define `SECONDARY_INPUT_RELOAD_CLASS' to + return the largest register class all of whose registers can be + used as intermediate registers or scratch registers. + + If copying a register CLASS in MODE to X requires an intermediate + or scratch register, `SECONDARY_OUTPUT_RELOAD_CLASS' should be + defined to return the largest register class required. If the + requirements for input and output reloads are the same, the macro + `SECONDARY_RELOAD_CLASS' should be used instead of defining both + macros identically. + + The values returned by these macros are often `GENERAL_REGS'. + Return `NO_REGS' if no spare register is needed; i.e., if X can be + directly copied to or from a register of CLASS in MODE without + requiring a scratch register. Do not define this macro if it + would always return `NO_REGS'. + + If a scratch register is required (either with or without an + intermediate register), you should define patterns for + `reload_inM' or `reload_outM', as required (*note Standard + Names::.. These patterns, which will normally be implemented with + a `define_expand', should be similar to the `movM' patterns, + except that operand 2 is the scratch register. + + Define constraints for the reload register and scratch register + that contain a single register class. If the original reload + register (whose class is CLASS) can meet the constraint given in + the pattern, the value returned by these macros is used for the + class of the scratch register. Otherwise, two additional reload + registers are required. Their classes are obtained from the + constraints in the insn pattern. + + X might be a pseudo-register or a `subreg' of a pseudo-register, + which could either be in a hard register or in memory. Use + `true_regnum' to find out; it will return -1 if the pseudo is in + memory and the hard register number if it is in a register. + + These macros should not be used in the case where a particular + class of registers can only be copied to memory and not to another + class of registers. In that case, secondary reload registers are + not needed and would not be helpful. Instead, a stack location + must be used to perform the copy and the `movM' pattern should use + memory as an intermediate storage. This case often occurs between + floating-point and general registers. */ + + /* `SECONDARY_MEMORY_NEEDED (CLASS1, CLASS2, M)' + Certain machines have the property that some registers cannot be + copied to some other registers without using memory. Define this + macro on those machines to be a C expression that is nonzero if + objects of mode M in registers of CLASS1 can only be copied to + registers of class CLASS2 by storing a register of CLASS1 into + memory and loading that memory location into a register of CLASS2. + + Do not define this macro if its value would always be zero. + + `SECONDARY_MEMORY_NEEDED_RTX (MODE)' + Normally when `SECONDARY_MEMORY_NEEDED' is defined, the compiler + allocates a stack slot for a memory location needed for register + copies. If this macro is defined, the compiler instead uses the + memory location defined by this macro. + + Do not define this macro if you do not define + `SECONDARY_MEMORY_NEEDED'. */ + + #define SMALL_REGISTER_CLASSES 1 + /* Normally the compiler avoids choosing registers that have been + explicitly mentioned in the rtl as spill registers (these + registers are normally those used to pass parameters and return + values). However, some machines have so few registers of certain + classes that there would not be enough registers to use as spill + registers if this were done. + + Define `SMALL_REGISTER_CLASSES' to be an expression with a nonzero + value on these machines. When this macro has a nonzero value, the + compiler allows registers explicitly used in the rtl to be used as + spill registers but avoids extending the lifetime of these + registers. + + It is always safe to define this macro with a nonzero value, but + if you unnecessarily define it, you will reduce the amount of + optimizations that can be performed in some cases. If you do not + define this macro with a nonzero value when it is required, the + compiler will run out of spill registers and print a fatal error + message. For most machines, you should not define this macro at + all. */ + + #define CLASS_LIKELY_SPILLED_P(CLASS) class_likely_spilled_p(CLASS) + /* A C expression whose value is nonzero if pseudos that have been + assigned to registers of class CLASS would likely be spilled + because registers of CLASS are needed for spill registers. + + The default value of this macro returns 1 if CLASS has exactly one + register and zero otherwise. On most machines, this default + should be used. Only define this macro to some other expression + if pseudo allocated by `local-alloc.c' end up in memory because + their hard registers were needed for spill registers. If this + macro returns nonzero for those classes, those pseudos will only + be allocated by `global.c', which knows how to reallocate the + pseudo to another register. If there would not be another + register available for reallocation, you should not change the + definition of this macro since the only effect of such a + definition would be to slow down register allocation. */ + + #define CLASS_MAX_NREGS(CLASS, MODE) GET_MODE_SIZE (MODE) + /* A C expression for the maximum number of consecutive registers of + class CLASS needed to hold a value of mode MODE. + + This is closely related to the macro `HARD_REGNO_NREGS'. In fact, + the value of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be + the maximum value of `HARD_REGNO_NREGS (REGNO, MODE)' for all + REGNO values in the class CLASS. + + This macro helps control the handling of multiple-word values in + the reload pass. */ + + #define CONST_OK_FOR_LETTER_P(VALUE, C) \ + ((C) == 'I' ? (VALUE) >= -255 && (VALUE) <= -1 : \ + (C) == 'J' ? (VALUE) >= 0 && (VALUE) <= 7 : \ + (C) == 'K' ? (VALUE) >= 0 && (VALUE) <= 127 : \ + (C) == 'L' ? (VALUE) > 0 && (VALUE) < 128: \ + (C) == 'M' ? (VALUE) == -1: \ + (C) == 'N' ? (VALUE) == 1: \ + (C) == 'O' ? (VALUE) == 0: \ + (C) == 'P' ? (VALUE) >= 0 && (VALUE) <= 255: \ + 0) + + /* A C expression that defines the machine-dependent operand + constraint letters (`I', `J', `K', ... `P') that specify + particular ranges of integer values. If C is one of those + letters, the expression should check that VALUE, an integer, is in + the appropriate range and return 1 if so, 0 otherwise. If C is + not one of those letters, the value should be 0 regardless of + VALUE. */ + + #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 + + /* `CONST_DOUBLE_OK_FOR_LETTER_P (VALUE, C)' + A C expression that defines the machine-dependent operand + constraint letters that specify particular ranges of + `const_double' values (`G' or `H'). + + If C is one of those letters, the expression should check that + VALUE, an RTX of code `const_double', is in the appropriate range + and return 1 if so, 0 otherwise. If C is not one of those + letters, the value should be 0 regardless of VALUE. + + `const_double' is used for all floating-point constants and for + `DImode' fixed-point constants. A given letter can accept either + or both kinds of values. It can use `GET_MODE' to distinguish + between these kinds. */ + + #define EXTRA_CONSTRAINT(X, C) ip2k_extra_constraint (X, C) + + /* A C expression that defines the optional machine-dependent + constraint letters (``Q', `R', `S', `T', `U') that can' + be used to segregate specific types of operands, usually memory + references, for the target machine. Normally this macro will not + be defined. If it is required for a particular target machine, it + should return 1 if VALUE corresponds to the operand type + represented by the constraint letter C. If C is not defined as an + extra constraint, the value returned should be 0 regardless of + VALUE. + + For example, on the ROMP, load instructions cannot have their + output in r0 if the memory reference contains a symbolic address. + Constraint letter `Q' is defined as representing a memory address + that does *not* contain a symbolic address. An alternative is + specified with a `Q' constraint on the input and `r' on the + output. The next alternative specifies `m' on the input and a + register class that does not include r0 on the output. */ + + /* This is an undocumented variable which describes + how GCC will pop a data. */ + #define STACK_POP_CODE PRE_INC + + #define STACK_PUSH_CODE POST_DEC + /* This macro defines the operation used when something is pushed on + the stack. In RTL, a push operation will be `(set (mem + (STACK_PUSH_CODE (reg sp))) ...)' + + The choices are `PRE_DEC', `POST_DEC', `PRE_INC', and `POST_INC'. + Which of these is correct depends on the stack direction and on + whether the stack pointer points to the last item on the stack or + whether it points to the space for the next item on the stack. + + The default is `PRE_DEC' when `STACK_GROWS_DOWNWARD' is defined, + which is almost always right, and `PRE_INC' otherwise, which is + often wrong. */ + + + #define STACK_CHECK_BUILTIN 1 + /* Prologue code will do stack checking as necessary. */ + + #define STARTING_FRAME_OFFSET (0) + /* Offset from the frame pointer to the first local variable slot to + be allocated. + + If `FRAME_GROWS_DOWNWARD', find the next slot's offset by + subtracting the first slot's length from `STARTING_FRAME_OFFSET'. + Otherwise, it is found by adding the length of the first slot to + the value `STARTING_FRAME_OFFSET'. */ + + #define FRAME_GROWS_DOWNWARD 1 + #define STACK_GROWS_DOWNWARD 1 + + /* On IP2K arg pointer is virtual and resolves to either SP or FP + after we've resolved what registers are saved (fp chain, return + pc, etc. */ + + #define FIRST_PARM_OFFSET(FUNDECL) 0 + /* Offset from the argument pointer register to the first argument's + address. On some machines it may depend on the data type of the + function. + + If `ARGS_GROW_DOWNWARD', this is the offset to the location above + the first argument's address. */ + + /* `STACK_DYNAMIC_OFFSET (FUNDECL)' + Offset from the stack pointer register to an item dynamically + allocated on the stack, e.g., by `alloca'. + + The default value for this macro is `STACK_POINTER_OFFSET' plus the + length of the outgoing arguments. The default is correct for most + machines. See `function.c' for details. */ + + #define STACK_POINTER_OFFSET 1 + /* IP2K stack is post-decremented, so 0(sp) is address of open space + and 1(sp) is offset to the location avobe the forst location at which + outgoing arguments are placed. */ + + #define STACK_BOUNDARY 8 + /* Define this macro if there is a guaranteed alignment for the stack + pointer on this machine. The definition is a C expression for the + desired alignment (measured in bits). This value is used as a + default if PREFERRED_STACK_BOUNDARY is not defined. */ + + #define STACK_POINTER_REGNUM REG_SP + /* The register number of the stack pointer register, which must also + be a fixed register according to `FIXED_REGISTERS'. On most + machines, the hardware determines which register this is. */ + + #define FRAME_POINTER_REGNUM REG_VFP + /* The register number of the frame pointer register, which is used to + access automatic variables in the stack frame. On some machines, + the hardware determines which register this is. On other + machines, you can choose any register you wish for this purpose. */ + + #define HARD_FRAME_POINTER_REGNUM REG_FP + + #define ARG_POINTER_REGNUM REG_AP + /* The register number of the arg pointer register, which is used to + access the function's argument list. On some machines, this is + the same as the frame pointer register. On some machines, the + hardware determines which register this is. On other machines, + you can choose any register you wish for this purpose. If this is + not the same register as the frame pointer register, then you must + mark it as a fixed register according to `FIXED_REGISTERS', or + arrange to be able to eliminate it (*note Elimination::.). */ + + /* We don't really want to support nested functions. But we'll crash + in various testsuite tests if we don't at least define the register + to contain the static chain. The return value register is about as + bad a place as any for this. */ + + #define STATIC_CHAIN_REGNUM REG_RESULT + /* Register numbers used for passing a function's static chain + pointer. If register windows are used, the register number as + seen by the called function is `STATIC_CHAIN_INCOMING_REGNUM', + while the register number as seen by the calling function is + `STATIC_CHAIN_REGNUM'. If these registers are the same, + `STATIC_CHAIN_INCOMING_REGNUM' need not be defined. + + The static chain register need not be a fixed register. + + If the static chain is passed in memory, these macros should not be + defined; instead, the next two macros should be defined. */ + + #define FRAME_POINTER_REQUIRED (!flag_omit_frame_pointer) + /* A C expression which is nonzero if a function must have and use a + frame pointer. This expression is evaluated in the reload pass. + If its value is nonzero the function will have a frame pointer. + + The expression can in principle examine the current function and + decide according to the facts, but on most machines the constant 0 + or the constant 1 suffices. Use 0 when the machine allows code to + be generated with no frame pointer, and doing so saves some time + or space. Use 1 when there is no possible advantage to avoiding a + frame pointer. + + In certain cases, the compiler does not know how to produce valid + code without a frame pointer. The compiler recognizes those cases + and automatically gives the function a frame pointer regardless of + what `FRAME_POINTER_REQUIRED' says. You don't need to worry about + them. + + In a function that does not require a frame pointer, the frame + pointer register can be allocated for ordinary usage, unless you + mark it as a fixed register. See `FIXED_REGISTERS' for more + information. */ + + #define ELIMINABLE_REGS { \ + {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ + {ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ + {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ + {FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ + {HARD_FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ + } + /* If defined, this macro specifies a table of register pairs used to + eliminate unneeded registers that point into the stack frame. If + it is not defined, the only elimination attempted by the compiler + is to replace references to the frame pointer with references to + the stack pointer. + + The definition of this macro is a list of structure + initializations, each of which specifies an original and + replacement register. + + On some machines, the position of the argument pointer is not + known until the compilation is completed. In such a case, a + separate hard register must be used for the argument pointer. + This register can be eliminated by replacing it with either the + frame pointer or the argument pointer, depending on whether or not + the frame pointer has been eliminated. + + In this case, you might specify: + #define ELIMINABLE_REGS \ + {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ + {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ + {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} + + Note that the elimination of the argument pointer with the stack + pointer is specified first since that is the preferred elimination. */ + + + #define CAN_ELIMINATE(FROM, TO) \ + ((FROM) == HARD_FRAME_POINTER_REGNUM \ + ? (flag_omit_frame_pointer && !frame_pointer_needed) : 1) + /* Don't eliminate FP unless we EXPLICITLY_ASKED */ + + /* A C expression that returns nonzero if the compiler is allowed to + try to replace register number FROM-REG with register number + TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is + defined, and will usually be the constant 1, since most of the + cases preventing register elimination are things that the compiler + already knows about. */ + + #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ + ((OFFSET) = ip2k_init_elim_offset ((FROM), (TO))) + + /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It + specifies the initial difference between the specified pair of + registers. This macro must be defined if `ELIMINABLE_REGS' is + defined. */ + + #define RETURN_ADDR_RTX(COUNT, X) \ + (((COUNT) == 0) ? gen_rtx_REG (HImode, REG_CALLH) : NULL_RTX) + /* A C expression whose value is RTL representing the value of the + return address for the frame COUNT steps up from the current + frame, after the prologue. FRAMEADDR is the frame pointer of the + COUNT frame, or the frame pointer of the COUNT - 1 frame if + `RETURN_ADDR_IN_PREVIOUS_FRAME' is defined. + + The value of the expression must always be the correct address when + COUNT is zero, but may be `NULL_RTX' if there is not way to + determine the return address of other frames. */ + + #define PUSH_ROUNDING(NPUSHED) (NPUSHED) + /* A C expression that is the number of bytes actually pushed onto the + stack when an instruction attempts to push NPUSHED bytes. + + If the target machine does not have a push instruction, do not + define this macro. That directs GNU CC to use an alternate + strategy: to allocate the entire argument block and then store the + arguments into it. + + On some machines, the definition + + #define PUSH_ROUNDING(BYTES) (BYTES) + + will suffice. But on other machines, instructions that appear to + push one byte actually push two bytes in an attempt to maintain + alignment. Then the definition should be + + #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1) */ + + #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ + ip2k_return_pops_args ((FUNDECL), (FUNTYPE), (SIZE)) + /* A C expression that should indicate the number of bytes of its own + arguments that a function pops on returning, or 0 if the function + pops no arguments and the caller must therefore pop them all after + the function returns. + + FUNDECL is a C variable whose value is a tree node that describes + the function in question. Normally it is a node of type + `FUNCTION_DECL' that describes the declaration of the function. + From this you can obtain the DECL_MACHINE_ATTRIBUTES of the + function. + + FUNTYPE is a C variable whose value is a tree node that describes + the function in question. Normally it is a node of type + `FUNCTION_TYPE' that describes the data type of the function. + From this it is possible to obtain the data types of the value and + arguments (if known). + + When a call to a library function is being considered, FUNDECL + will contain an identifier node for the library function. Thus, if + you need to distinguish among various library functions, you can + do so by their names. Note that "library function" in this + context means a function used to perform arithmetic, whose name is + known specially in the compiler and was not mentioned in the C + code being compiled. + + STACK-SIZE is the number of bytes of arguments passed on the + stack. If a variable number of bytes is passed, it is zero, and + argument popping will always be the responsibility of the calling + function. + + On the VAX, all functions always pop their arguments, so the + definition of this macro is STACK-SIZE. On the 68000, using the + standard calling convention, no functions pop their arguments, so + the value of the macro is always 0 in this case. But an + alternative calling convention is available in which functions + that take a fixed number of arguments pop them but other functions + (such as `printf') pop nothing (the caller pops all). When this + convention is in use, FUNTYPE is examined to determine whether a + function takes a fixed number of arguments. */ + + #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0 + /* A C expression that controls whether a function argument is passed + in a register, and which register. + + The arguments are CUM, which summarizes all the previous + arguments; MODE, the machine mode of the argument; TYPE, the data + type of the argument as a tree node or 0 if that is not known + (which happens for C support library functions); and NAMED, which + is 1 for an ordinary argument and 0 for nameless arguments that + correspond to `...' in the called function's prototype. + + The value of the expression is usually either a `reg' RTX for the + hard register in which to pass the argument, or zero to pass the + argument on the stack. + + For machines like the VAX and 68000, where normally all arguments + are pushed, zero suffices as a definition. + + The value of the expression can also be a `parallel' RTX. This is + used when an argument is passed in multiple locations. The mode + of the of the `parallel' should be the mode of the entire + argument. The `parallel' holds any number of `expr_list' pairs; + each one describes where part of the argument is passed. In each + `expr_list', the first operand can be either a `reg' RTX for the + hard register in which to pass this part of the argument, or zero + to pass the argument on the stack. If this operand is a `reg', + then the mode indicates how large this part of the argument is. + The second operand of the `expr_list' is a `const_int' which gives + the offset in bytes into the entire argument where this part + starts. + + The usual way to make the ANSI library `stdarg.h' work on a machine + where some arguments are usually passed in registers, is to cause + nameless arguments to be passed on the stack instead. This is done + by making `FUNCTION_ARG' return 0 whenever NAMED is 0. + + You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the + definition of this macro to determine if this argument is of a + type that must be passed in the stack. If `REG_PARM_STACK_SPACE' + is not defined and `FUNCTION_ARG' returns nonzero for such an + argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is + defined, the argument will be computed in the stack and then + loaded into a register. */ + + #define CUMULATIVE_ARGS int + + /* A C type for declaring a variable that is used as the first + argument of `FUNCTION_ARG' and other related values. For some + target machines, the type `int' suffices and can hold the number + of bytes of argument so far. + + There is no need to record in `CUMULATIVE_ARGS' anything about the + arguments that have been passed on the stack. The compiler has + other variables to keep track of that. For target machines on + which all arguments are passed on the stack, there is no need to + store anything in `CUMULATIVE_ARGS'; however, the data structure + must exist and should not be empty, so use `int'. */ + + #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ + ((CUM) = 0) + + /* A C statement (sans semicolon) for initializing the variable CUM + for the state at the beginning of the argument list. The variable + has type `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node + for the data type of the function which will receive the args, or 0 + if the args are to a compiler support library function. The value + of INDIRECT is nonzero when processing an indirect call, for + example a call through a function pointer. The value of INDIRECT + is zero for a call to an explicitly named function, a library + function call, or when `INIT_CUMULATIVE_ARGS' is used to find + arguments for the function being compiled. + + When processing a call to a compiler support library function, + LIBNAME identifies which one. It is a `symbol_ref' rtx which + contains the name of the function, as a string. LIBNAME is 0 when + an ordinary C function call is being processed. Thus, each time + this macro is called, either LIBNAME or FNTYPE is nonzero, but + never both of them at once. */ + + #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) + + /* All arguments are passed on stack - do nothing here. */ + + /* A C statement (sans semicolon) to update the summarizer variable + CUM to advance past an argument in the argument list. The values + MODE, TYPE and NAMED describe that argument. Once this is done, + the variable CUM is suitable for analyzing the *following* + argument with `FUNCTION_ARG', etc. + + This macro need not do anything if the argument in question was + passed on the stack. The compiler knows how to track the amount + of stack space used for arguments without any special help. */ + + #define FUNCTION_ARG_REGNO_P(R) 0 + /* A C expression that is nonzero if REGNO is the number of a hard + register in which function arguments are sometimes passed. This + does *not* include implicit arguments such as the static chain and + the structure-value address. On many machines, no registers can be + used for this purpose since all function arguments are pushed on + the stack. */ + + #define FUNCTION_VALUE(VALTYPE, FUNC) \ + ((TYPE_MODE (VALTYPE) == QImode) \ + ? gen_rtx_REG (TYPE_MODE (VALTYPE), REG_RESULT + 1) \ + : gen_rtx_REG (TYPE_MODE (VALTYPE), REG_RESULT)) + + /* Because functions returning 'char' actually widen to 'int', we have to + use $81 as the return location if we think we only have a 'char'. */ + + /* A C expression to create an RTX representing the place where a + function returns a value of data type VALTYPE. VALTYPE is a tree + node representing a data type. Write `TYPE_MODE (VALTYPE)' to get + the machine mode used to represent that type. On many machines, + only the mode is relevant. (Actually, on most machines, scalar + values are returned in the same place regardless of mode). + + The value of the expression is usually a `reg' RTX for the hard + register where the return value is stored. The value can also be a + `parallel' RTX, if the return value is in multiple places. See + `FUNCTION_ARG' for an explanation of the `parallel' form. + + If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same + promotion rules specified in `PROMOTE_MODE' if VALTYPE is a scalar + type. + + If the precise function being called is known, FUNC is a tree node + (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This + makes it possible to use a different value-returning convention + for specific functions when all their calls are known. + + `FUNCTION_VALUE' is not used for return vales with aggregate data + types, because these are returned in another way. See + `STRUCT_VALUE_REGNUM' and related macros, below. */ + + #define LIBCALL_VALUE(MODE) gen_rtx_REG ((MODE), REG_RESULT) + /* A C expression to create an RTX representing the place where a + library function returns a value of mode MODE. If the precise + function being called is known, FUNC is a tree node + (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This + makes it possible to use a different value-returning convention + for specific functions when all their calls are known. + + Note that "library function" in this context means a compiler + support routine, used to perform arithmetic, whose name is known + specially by the compiler and was not mentioned in the C code being + compiled. + + The definition of `LIBRARY_VALUE' need not be concerned aggregate + data types, because none of the library functions returns such + types. */ + + #define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_RESULT) + /* A C expression that is nonzero if REGNO is the number of a hard + register in which the values of called function may come back. + + A register whose use for returning values is limited to serving as + the second of a pair (for a value of type `double', say) need not + be recognized by this macro. So for most machines, this definition + suffices: + + #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0) + + If the machine has register windows, so that the caller and the + called function use different registers for the return value, this + macro should recognize only the caller's register numbers. */ + + #define RETURN_IN_MEMORY(TYPE) \ + ((TYPE_MODE (TYPE) == BLKmode) ? int_size_in_bytes (TYPE) > 8 : 0) + /* A C expression which can inhibit the returning of certain function + values in registers, based on the type of value. A nonzero value + says to return the function value in memory, just as large + structures are always returned. Here TYPE will be a C expression + of type `tree', representing the data type of the value. + + Note that values of mode `BLKmode' must be explicitly handled by + this macro. Also, the option `-fpcc-struct-return' takes effect + regardless of this macro. On most systems, it is possible to + leave the macro undefined; this causes a default definition to be + used, whose value is the constant 1 for `BLKmode' values, and 0 + otherwise. + + Do not use this macro to indicate that structures and unions + should always be returned in memory. You should instead use + `DEFAULT_PCC_STRUCT_RETURN' to indicate this. */ + + /* Indicate that large structures are passed by reference. */ + #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM,MODE,TYPE,NAMED) 0 + + + #define DEFAULT_PCC_STRUCT_RETURN 0 + /* Define this macro to be 1 if all structure and union return values + must be in memory. Since this results in slower code, this should + be defined only if needed for compatibility with other compilers + or with an ABI. If you define this macro to be 0, then the + conventions used for structure and union return values are decided + by the `RETURN_IN_MEMORY' macro. + + If not defined, this defaults to the value 1. */ + + #define STRUCT_VALUE 0 + /* If the structure value address is not passed in a register, define + `STRUCT_VALUE' as an expression returning an RTX for the place + where the address is passed. If it returns 0, the address is + passed as an "invisible" first argument. */ + + #define STRUCT_VALUE_INCOMING 0 + /* If the incoming location is not a register, then you should define + `STRUCT_VALUE_INCOMING' as an expression for an RTX for where the + called function should find the value. If it should find the + value on the stack, define this to create a `mem' which refers to + the frame pointer. A definition of 0 means that the address is + passed as an "invisible" first argument. */ + + #define EPILOGUE_USES(REGNO) 0 + /* Define this macro as a C expression that is nonzero for registers + are used by the epilogue or the `return' pattern. The stack and + frame pointer registers are already be assumed to be used as + needed. */ + + #define SETUP_INCOMING_VARARGS(ARGS_SO_FAR,MODE,TYPE, \ + PRETEND_ARGS_SIZE,SECOND_TIME) \ + ((PRETEND_ARGS_SIZE) = (0)) + + + /* Hmmm. We don't actually like constants as addresses - they always need + to be loaded to a register, except for function calls which take an + address by immediate value. But changing this to zero had negative + effects, causing the compiler to get very confused.... */ + + #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) + + /* A C expression that is 1 if the RTX X is a constant which is a + valid address. On most machines, this can be defined as + `CONSTANT_P (X)', but a few machines are more restrictive in which + constant addresses are supported. + + `CONSTANT_P' accepts integer-values expressions whose values are + not explicitly known, such as `symbol_ref', `label_ref', and + `high' expressions and `const' arithmetic expressions, in addition + to `const_int' and `const_double' expressions. */ + + #define MAX_REGS_PER_ADDRESS 1 + /* A number, the maximum number of registers that can appear in a + valid memory address. Note that it is up to you to specify a + value equal to the maximum number that `GO_IF_LEGITIMATE_ADDRESS' + would ever accept. */ + + #ifdef REG_OK_STRICT + # define GO_IF_LEGITIMATE_ADDRESS(MODE, OPERAND, ADDR) \ + { \ + if (legitimate_address_p ((MODE), (OPERAND), 1)) \ + goto ADDR; \ + } + #else + # define GO_IF_LEGITIMATE_ADDRESS(MODE, OPERAND, ADDR) \ + { \ + if (legitimate_address_p ((MODE), (OPERAND), 0)) \ + goto ADDR; \ + } + #endif + /* A C compound statement with a conditional `goto LABEL;' executed + if X (an RTX) is a legitimate memory address on the target machine + for a memory operand of mode MODE. + + It usually pays to define several simpler macros to serve as + subroutines for this one. Otherwise it may be too complicated to + understand. + + This macro must exist in two variants: a strict variant and a + non-strict one. The strict variant is used in the reload pass. It + must be defined so that any pseudo-register that has not been + allocated a hard register is considered a memory reference. In + contexts where some kind of register is required, a pseudo-register + with no hard register must be rejected. + + The non-strict variant is used in other passes. It must be + defined to accept all pseudo-registers in every context where some + kind of register is required. + + Compiler source files that want to use the strict variant of this + macro define the macro `REG_OK_STRICT'. You should use an `#ifdef + REG_OK_STRICT' conditional to define the strict variant in that + case and the non-strict variant otherwise. + + Subroutines to check for acceptable registers for various purposes + (one for base registers, one for index registers, and so on) are + typically among the subroutines used to define + `GO_IF_LEGITIMATE_ADDRESS'. Then only these subroutine macros + need have two variants; the higher levels of macros may be the + same whether strict or not. + + Normally, constant addresses which are the sum of a `symbol_ref' + and an integer are stored inside a `const' RTX to mark them as + constant. Therefore, there is no need to recognize such sums + specifically as legitimate addresses. Normally you would simply + recognize any `const' as legitimate. + + Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant + sums that are not marked with `const'. It assumes that a naked + `plus' indicates indexing. If so, then you *must* reject such + naked constant sums as illegitimate addresses, so that none of + them will be given to `PRINT_OPERAND_ADDRESS'. + + On some machines, whether a symbolic address is legitimate depends + on the section that the address refers to. On these machines, + define the macro `ENCODE_SECTION_INFO' to store the information + into the `symbol_ref', and then check for it here. When you see a + `const', you will have to look inside it to find the `symbol_ref' + in order to determine the section. *Note Assembler Format::. + + The best way to modify the name string is by adding text to the + beginning, with suitable punctuation to prevent any ambiguity. + Allocate the new name in `saveable_obstack'. You will have to + modify `ASM_OUTPUT_LABELREF' to remove and decode the added text + and output the name accordingly, and define `STRIP_NAME_ENCODING' + to access the original name string. + + You can check the information stored here into the `symbol_ref' in + the definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and + `PRINT_OPERAND_ADDRESS'. */ + + /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is + valid for use as a base register. For hard registers, it should + always accept those which the hardware permits and reject the + others. Whether the macro accepts or rejects pseudo registers + must be controlled by `REG_OK_STRICT' as described above. This + usually requires two variant definitions, of which `REG_OK_STRICT' + controls the one actually used. */ + + #define REG_OK_FOR_BASE_STRICT_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) + + #define REG_OK_FOR_BASE_NOSTRICT_P(X) \ + (REGNO (X) >= FIRST_PSEUDO_REGISTER \ + || (REGNO (X) == REG_FP) \ + || (REGNO (X) == REG_VFP) \ + || (REGNO (X) == REG_AP) \ + || REG_OK_FOR_BASE_STRICT_P(X)) + + #ifdef REG_OK_STRICT + # define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P (X) + #else + # define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NOSTRICT_P (X) + #endif + + #define REG_OK_FOR_INDEX_P(X) 0 + /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is + valid for use as an index register. + + The difference between an index register and a base register is + that the index register may be scaled. If an address involves the + sum of two registers, neither one of them scaled, then either one + may be labeled the "base" and the other the "index"; but whichever + labeling is used must fit the machine's constraints of which + registers may serve in each capacity. The compiler will try both + labelings, looking for one that is valid, and will reload one or + both registers only if neither labeling works. */ + + + /* A C compound statement that attempts to replace X with a valid + memory address for an operand of mode MODE. WIN will be a C + statement label elsewhere in the code; the macro definition may use + + GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); + + to avoid further processing if the address has become legitimate. + + X will always be the result of a call to `break_out_memory_refs', + and OLDX will be the operand that was given to that function to + produce X. + + The code generated by this macro should not alter the substructure + of X. If it transforms X into a more legitimate form, it should + assign X (which will always be a C variable) a new value. + + It is not necessary for this macro to come up with a legitimate + address. The compiler has standard ways of doing so in all cases. + In fact, it is safe for this macro to do nothing. But often a + machine-dependent strategy can generate better code. */ + + #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ + do { rtx orig_x = (X); \ + (X) = legitimize_address ((X), (OLDX), (MODE), 0); \ + if ((X) != orig_x && memory_address_p ((MODE), (X))) \ + goto WIN; \ + } while (0) + + /* Is X a legitimate register to reload, or is it a pseudo stack-temp + that is problematic for push_reload() ? */ + + #define LRA_REG(X) \ + (! (reg_equiv_memory_loc[REGNO (X)] \ + && (reg_equiv_address[REGNO (X)] \ + || num_not_at_initial_offset))) + + /* Given a register X that failed the LRA_REG test, replace X + by its memory equivalent, find the reloads needed for THAT memory + location and substitute that back for the higher-level reload + that we're conducting... */ + + /* WARNING: we reference 'ind_levels' and 'insn' which are local variables + in find_reloads_address (), where the LEGITIMIZE_RELOAD_ADDRESS macro + expands. */ + + #define FRA_REG(X,MODE,OPNUM,TYPE) \ + do { \ + rtx tem = make_memloc ((X), REGNO (X)); \ + \ + if (! strict_memory_address_p (GET_MODE (tem), XEXP (tem, 0))) \ + { \ + /* Note that we're doing address in address - cf. ADDR_TYPE */ \ + find_reloads_address (GET_MODE (tem), &tem, XEXP (tem, 0), \ + &XEXP (tem, 0), (OPNUM), \ + ADDR_TYPE (TYPE), ind_levels, insn); \ + } \ + (X) = tem; \ + } while (0) + + + /* For the IP2K, we want to be clever about picking IP vs DP for a + base pointer since IP only directly supports a zero displacement. + (Note that we have modified all the HI patterns to correctly handle + IP references by manipulating iph:ipl as we fetch the pieces). */ + #define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND,WIN) \ + { \ + if (GET_CODE (X) == PLUS \ + && REG_P (XEXP (X, 0)) \ + && GET_CODE (XEXP (X, 1)) == CONST_INT) \ + { \ + int disp = INTVAL (XEXP (X, 1)); \ + int fit = (disp >= 0 && disp <= (127 - 2 * GET_MODE_SIZE (MODE))); \ + rtx reg = XEXP (X, 0); \ + if (!fit) \ + { \ + push_reload ((X), NULL_RTX, &(X), \ + NULL, MODE_BASE_REG_CLASS (MODE), GET_MODE (X), \ + VOIDmode, 0, 0, OPNUM, TYPE); \ + goto WIN; \ + } \ + if (reg_equiv_memory_loc[REGNO (reg)] \ + && (reg_equiv_address[REGNO (reg)] || num_not_at_initial_offset)) \ + { \ + rtx mem = make_memloc (reg, REGNO (reg)); \ + if (! strict_memory_address_p (GET_MODE (mem), XEXP (mem, 0))) \ + { \ + /* Note that we're doing address in address - cf. ADDR_TYPE */\ + find_reloads_address (GET_MODE (mem), &mem, XEXP (mem, 0), \ + &XEXP (mem, 0), (OPNUM), \ + ADDR_TYPE (TYPE), (IND), insn); \ + } \ + push_reload (mem, NULL, &XEXP (X, 0), NULL, \ + GENERAL_REGS, Pmode, VOIDmode, 0, 0, \ + OPNUM, TYPE); \ + push_reload (X, NULL, &X, NULL, \ + MODE_BASE_REG_CLASS (MODE), GET_MODE (X), VOIDmode, \ + 0, 0, OPNUM, TYPE); \ + goto WIN; \ + } \ + } \ + } + /* A C compound statement that attempts to replace X, which is an + address that needs reloading, with a valid memory address for an + operand of mode MODE. WIN will be a C statement label elsewhere + in the code. It is not necessary to define this macro, but it + might be useful for performance reasons. + + For example, on the i386, it is sometimes possible to use a single + reload register instead of two by reloading a sum of two pseudo + registers into a register. On the other hand, for number of RISC + processors offsets are limited so that often an intermediate + address needs to be generated in order to address a stack slot. + By defining LEGITIMIZE_RELOAD_ADDRESS appropriately, the + intermediate addresses generated for adjacent some stack slots can + be made identical, and thus be shared. + + *Note*: This macro should be used with caution. It is necessary + to know something of how reload works in order to effectively use + this, and it is quite easy to produce macros that build in too + much knowledge of reload internals. + + *Note*: This macro must be able to reload an address created by a + previous invocation of this macro. If it fails to handle such + addresses then the compiler may generate incorrect code or abort. + + The macro definition should use `push_reload' to indicate parts + that need reloading; OPNUM, TYPE and IND_LEVELS are usually + suitable to be passed unaltered to `push_reload'. + + The code generated by this macro must not alter the substructure of + X. If it transforms X into a more legitimate form, it should + assign X (which will always be a C variable) a new value. This + also applies to parts that you change indirectly by calling + `push_reload'. + + The macro definition may use `strict_memory_address_p' to test if + the address has become legitimate. + + If you want to change only a part of X, one standard way of doing + this is to use `copy_rtx'. Note, however, that is unshares only a + single level of rtl. Thus, if the part to be changed is not at the + top level, you'll need to replace first the top leve It is not + necessary for this macro to come up with a legitimate address; + but often a machine-dependent strategy can generate better code. */ + + #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ + do { \ + if (ip2k_mode_dependent_address (ADDR)) goto LABEL; \ + } while (0) + + /* A C statement or compound statement with a conditional `goto + LABEL;' executed if memory address X (an RTX) can have different + meanings depending on the machine mode of the memory reference it + is used for or if the address is valid for some modes but not + others. + + Autoincrement and autodecrement addresses typically have + mode-dependent effects because the amount of the increment or + decrement is the size of the operand being addressed. Some + machines have other mode-dependent addresses. Many RISC machines + have no mode-dependent addresses. + + You may assume that ADDR is a valid address for the machine. */ + + #define LEGITIMATE_CONSTANT_P(X) 1 + /* A C expression that is nonzero if X is a legitimate constant for + an immediate operand on the target machine. You can assume that X + satisfies `CONSTANT_P', so you need not check this. In fact, `1' + is a suitable definition for this macro on machines where anything + `CONSTANT_P' is valid. */ + + #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ + case CONST_INT: \ + return 0; \ + case CONST: \ + return 8; \ + case LABEL_REF: \ + return 0; \ + case SYMBOL_REF: \ + return 8; \ + case CONST_DOUBLE: \ + return 0; + + /* A part of a C `switch' statement that describes the relative costs + of constant RTL expressions. It must contain `case' labels for + expression codes `const_int', `const', `symbol_ref', `label_ref' + and `const_double'. Each case must ultimately reach a `return' + statement to return the relative cost of the use of that kind of + constant value in an expression. The cost may depend on the + precise value of the constant, which is available for examination + in X, and the rtx code of the expression in which it is contained, + found in OUTER_CODE. + + CODE is the expression code--redundant, since it can be obtained + with `GET_CODE (X)'. */ + + #define DEFAULT_RTX_COSTS(X, CODE, OUTER_CODE) \ + return default_rtx_costs ((X), (CODE), (OUTER_CODE)) + + /* Like `CONST_COSTS' but applies to nonconstant RTL expressions. + This can be used, for example, to indicate how costly a multiply + instruction is. In writing this macro, you can use the construct + `COSTS_N_INSNS (N)' to specify a cost equal to N fast + instructions. OUTER_CODE is the code of the expression in which X + is contained. + + This macro is optional; do not define it if the default cost + assumptions are adequate for the target machine. */ + + #define ADDRESS_COST(ADDRESS) ip2k_address_cost (ADDRESS) + + /* An expression giving the cost of an addressing mode that contains + ADDRESS. If not defined, the cost is computed from the ADDRESS + expression and the `CONST_COSTS' values. + + For most CISC machines, the default cost is a good approximation + of the true cost of the addressing mode. However, on RISC + machines, all instructions normally have the same length and + execution time. Hence all addresses will have equal costs. + + In cases where more than one form of an address is known, the form + with the lowest cost will be used. If multiple forms have the + same, lowest, cost, the one that is the most complex will be used. + + For example, suppose an address that is equal to the sum of a + register and a constant is used twice in the same basic block. + When this macro is not defined, the address will be computed in a + register and memory references will be indirect through that + register. On machines where the cost of the addressing mode + containing the sum is no higher than that of a simple indirect + reference, this will produce an additional instruction and + possibly require an additional register. Proper specification of + this macro eliminates this overhead for such machines. + + Similar use of this macro is made in strength reduction of loops. + + ADDRESS need not be valid as an address. In such a case, the cost + is not relevant and can be any value; invalid addresses need not be + assigned a different cost. + + On machines where an address involving more than one register is as + cheap as an address computation involving only one register, + defining `ADDRESS_COST' to reflect this can cause two registers to + be live over a region of code where only one would have been if + `ADDRESS_COST' were not defined in that manner. This effect should + be considered in the definition of this macro. Equivalent costs + should probably only be given to addresses with different numbers + of registers on machines with lots of registers. + + This macro will normally either not be defined or be defined as a + constant. */ + + #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 7 + /* A C expression for the cost of moving data from a register in class + FROM to one in class TO. The classes are expressed using the + enumeration values such as `GENERAL_REGS'. A value of 2 is the + default; other values are interpreted relative to that. + + It is not required that the cost always equal 2 when FROM is the + same as TO; on some machines it is expensive to move between + registers if they are not general registers. + + If reload sees an insn consisting of a single `set' between two + hard registers, and if `REGISTER_MOVE_COST' applied to their + classes returns a value of 2, reload does not check to ensure that + the constraints of the insn are met. Setting a cost of other than + 2 will allow reload to verify that the constraints are met. You + should do this if the `movM' pattern's constraints do not allow + such copying. */ + + #define MEMORY_MOVE_COST(MODE,CLASS,IN) 6 + /* A C expression for the cost of moving data of mode M between a + register and memory. A value of 4 is the default; this cost is + relative to those in `REGISTER_MOVE_COST'. + + If moving between registers and memory is more expensive than + between two registers, you should define this macro to express the + relative cost. */ + + #define SLOW_BYTE_ACCESS 0 + /* Define this macro as a C expression which is nonzero if accessing + less than a word of memory (i.e. a `char' or a `short') is no + faster than accessing a word of memory, i.e., if such access + require more than one instruction or if there is no difference in + cost between byte and (aligned) word loads. + + When this macro is not defined, the compiler will access a field by + finding the smallest containing object; when it is defined, a + fullword load will be used if alignment permits. Unless bytes + accesses are faster than word accesses, using word accesses is + preferable since it may eliminate subsequent memory access if + subsequent accesses occur to other fields in the same word of the + structure, but to different bytes. + + `SLOW_ZERO_EXTEND' + Define this macro if zero-extension (of a `char' or `short' to an + `int') can be done faster if the destination is a register that is + known to be zero. + + If you define this macro, you must have instruction patterns that + recognize RTL structures like this: + + (set (strict_low_part (subreg:QI (reg:SI ...) 0)) ...) + + and likewise for `HImode'. + + `SLOW_UNALIGNED_ACCESS' + Define this macro to be the value 1 if unaligned accesses have a + cost many times greater than aligned accesses, for example if they + are emulated in a trap handler. + + When this macro is nonzero, the compiler will act as if + `STRICT_ALIGNMENT' were nonzero when generating code for block + moves. This can cause significantly more instructions to be + produced. Therefore, do not set this macro nonzero if unaligned + accesses only add a cycle or two to the time for a memory access. + + If the value of this macro is always zero, it need not be defined. + + `DONT_REDUCE_ADDR' + Define this macro to inhibit strength reduction of memory + addresses. (On some machines, such strength reduction seems to do + harm rather than good.) + + `MOVE_RATIO' + The number of scalar move insns which should be generated instead + of a string move insn or a library call. Increasing the value + will always make code faster, but eventually incurs high cost in + increased code size. + + If you don't define this, a reasonable default is used. */ + + #define NO_FUNCTION_CSE + /* Define this macro if it is as good or better to call a constant + function address than to call an address kept in a register. */ + + #define NO_RECURSIVE_FUNCTION_CSE + /* Define this macro if it is as good or better for a function to call + itself with an explicit address than to call an address kept in a + register. + + `ADJUST_COST (INSN, LINK, DEP_INSN, COST)' + A C statement (sans semicolon) to update the integer variable COST + based on the relationship between INSN that is dependent on + DEP_INSN through the dependence LINK. The default is to make no + adjustment to COST. This can be used for example to specify to + the scheduler that an output- or anti-dependence does not incur + the same cost as a data-dependence. + + `ADJUST_PRIORITY (INSN)' + A C statement (sans semicolon) to update the integer scheduling + priority `INSN_PRIORITY(INSN)'. Reduce the priority to execute + the INSN earlier, increase the priority to execute INSN later. + Do not define this macro if you do not need to adjust the + scheduling priorities of insns. */ + + #define TEXT_SECTION_ASM_OP ".text" + /* A C expression whose value is a string containing the assembler + operation that should precede instructions and read-only data. + Normally `".text"' is right. */ + + #define DATA_SECTION_ASM_OP ".data" + /* A C expression whose value is a string containing the assembler + operation to identify the following data as writable initialized + data. Normally `".data"' is right. */ + + #define JUMP_TABLES_IN_TEXT_SECTION 1 + /* Define this macro if jump tables (for `tablejump' insns) should be + output in the text section, along with the assembler instructions. + Otherwise, the readonly data section is used. + + This macro is irrelevant if there is no separate readonly data + section. */ + + #define ASM_COMMENT_START " ; " + /* A C string constant describing how to begin a comment in the target + assembler language. The compiler assumes that the comment will + end at the end of the line. */ + + #define ASM_APP_ON "/* #APP */\n" + /* A C string constant for text to be output before each `asm' + statement or group of consecutive ones. Normally this is + `"#APP"', which is a comment that has no effect on most assemblers + but tells the GNU assembler that it must check the lines that + follow for all valid assembler constructs. */ + + #define ASM_APP_OFF "/* #NOAPP */\n" + /* A C string constant for text to be output after each `asm' + statement or group of consecutive ones. Normally this is + `"#NO_APP"', which tells the GNU assembler to resume making the + time-saving assumptions that are valid for ordinary compiler + output. */ + + + #define OBJC_PROLOGUE {} + /* A C statement to output any assembler statements which are + required to precede any Objective-C object definitions or message + sending. The statement is executed only when compiling an + Objective-C program. */ + + #define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \ + fprintf ((STREAM), ".double %.20e\n", (VALUE)) + #define ASM_OUTPUT_FLOAT(STREAM, VALUE) \ + asm_output_float ((STREAM), (VALUE)) + + /* `ASM_OUTPUT_LONG_DOUBLE (STREAM, VALUE)' + `ASM_OUTPUT_THREE_QUARTER_FLOAT (STREAM, VALUE)' + `ASM_OUTPUT_SHORT_FLOAT (STREAM, VALUE)' + `ASM_OUTPUT_BYTE_FLOAT (STREAM, VALUE)' + A C statement to output to the stdio stream STREAM an assembler + instruction to assemble a floating-point constant of `TFmode', + `DFmode', `SFmode', `TQFmode', `HFmode', or `QFmode', + respectively, whose value is VALUE. VALUE will be a C expression + of type `REAL_VALUE_TYPE'. Macros such as + `REAL_VALUE_TO_TARGET_DOUBLE' are useful for writing these + definitions. */ + + #define ASM_OUTPUT_INT(FILE, VALUE) \ + ( fprintf ((FILE), "\t.long "), \ + output_addr_const ((FILE), (VALUE)), \ + fputs ("\n", (FILE))) + + /* Likewise for `short' and `char' constants. */ + + #define ASM_OUTPUT_SHORT(FILE,VALUE) \ + asm_output_short ((FILE), (VALUE)) + #define ASM_OUTPUT_CHAR(FILE,VALUE) \ + asm_output_char ((FILE), (VALUE)) + + /* `ASM_OUTPUT_QUADRUPLE_INT (STREAM, EXP)' + A C statement to output to the stdio stream STREAM an assembler + instruction to assemble an integer of 16, 8, 4, 2 or 1 bytes, + respectively, whose value is VALUE. The argument EXP will be an + RTL expression which represents a constant value. Use + `output_addr_const (STREAM, EXP)' to output this value as an + assembler expression. + + For sizes larger than `UNITS_PER_WORD', if the action of a macro + would be identical to repeatedly calling the macro corresponding to + a size of `UNITS_PER_WORD', once for each word, you need not define + the macro. */ + + #define ASM_OUTPUT_BYTE(FILE,VALUE) \ + asm_output_byte ((FILE), (VALUE)) + /* A C statement to output to the stdio stream STREAM an assembler + instruction to assemble a single byte containing the number VALUE. */ + + #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) \ + ((C) == '\n' || ((C) == '$')) + /* Define this macro as a C expression which is nonzero if C is used + as a logical line separator by the assembler. + + If you do not define this macro, the default is that only the + character `;' is treated as a logical line separator. */ + + #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ + do { \ + fputs ("\t.comm ", (STREAM)); \ + assemble_name ((STREAM), (NAME)); \ + fprintf ((STREAM), ",%d\n", (SIZE)); \ + } while (0) + /* A C statement (sans semicolon) to output to the stdio stream + STREAM the assembler definition of a common-label named NAME whose + size is SIZE bytes. The variable ROUNDED is the size rounded up + to whatever alignment the caller wants. + + Use the expression `assemble_name (STREAM, NAME)' to output the + name itself; before and after that, output the additional + assembler syntax for defining the name, and a newline. + + This macro controls how the assembler definitions of uninitialized + common global variables are output. */ + + #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \ + do { \ + fputs ("\t.lcomm ", (STREAM)); \ + assemble_name ((STREAM), (NAME)); \ + fprintf ((STREAM), ",%d\n", (SIZE)); \ + } while (0) + /* A C statement (sans semicolon) to output to the stdio stream + STREAM the assembler definition of a local-common-label named NAME + whose size is SIZE bytes. The variable ROUNDED is the size + rounded up to whatever alignment the caller wants. + + Use the expression `assemble_name (STREAM, NAME)' to output the + name itself; before and after that, output the additional + assembler syntax for defining the name, and a newline. + + This macro controls how the assembler definitions of uninitialized + static variables are output. */ + + #undef WEAK_ASM_OP + #define WEAK_ASM_OP ".weak" + + #undef ASM_DECLARE_FUNCTION_SIZE + #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ + do { \ + if (!flag_inhibit_size_directive) \ + ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ + } while (0) + /* A C statement (sans semicolon) to output to the stdio stream + STREAM any text necessary for declaring the size of a function + which is being defined. The argument NAME is the name of the + function. The argument DECL is the `FUNCTION_DECL' tree node + representing the function. + + If this macro is not defined, then the function size is not + defined. */ + + #define ESCAPES \ + "\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ + \0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ + \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\ + \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\ + \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ + \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ + \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ + \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1" + /* A table of bytes codes used by the ASM_OUTPUT_ASCII and + ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table + corresponds to a particular byte value [0..255]. For any + given byte value, if the value in the corresponding table + position is zero, the given character can be output directly. + If the table value is 1, the byte must be output as a \ooo + octal escape. If the tables value is anything else, then the + byte value should be output as a \ followed by the value + in the table. Note that we can use standard UN*X escape + sequences for many control characters, but we don't use + \a to represent BEL because some svr4 assemblers (e.g. on + the i386) don't know about that. Also, we don't use \v + since some versions of gas, such as 2.2 did not accept it. */ + + /* Globalizing directive for a label. */ + #define GLOBAL_ASM_OP ".global\t" + + #undef ASM_FORMAT_PRIVATE_NAME + #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ + sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) + + /* A C expression to assign to OUTVAR (which is a variable of type + `char *') a newly allocated string made from the string NAME and + the number NUMBER, with some suitable punctuation added. Use + `alloca' to get space for the string. + + The string will be used as an argument to `ASM_OUTPUT_LABELREF' to + produce an assembler label for an internal static variable whose + name is NAME. Therefore, the string must be such as to result in + valid assembler code. The argument NUMBER is different each time + this macro is executed; it prevents conflicts between + similarly-named internal static variables in different scopes. + + Ideally this string should not be a valid C identifier, to prevent + any conflict with the user's own symbols. Most assemblers allow + periods or percent signs in assembler symbols; putting at least + one of these between the name and the number will suffice. */ + + #define REGISTER_NAMES { \ + "$00","$01","$02","$03","iph","ipl","sph","spl", \ + "pch","pcl","wreg","status","dph","dpl","$0e","mulh", \ + "$10","$11","$12","$13","$14","$15","$16","$17", \ + "$18","$19","$1a","$1b","$1c","$1d","$1e","$1f", \ + "$20","$21","$22","$23","$24","$25","$26","$27", \ + "$28","$29","$2a","$2b","$2c","$2d","$2e","$2f", \ + "$30","$31","$32","$33","$34","$35","$36","$37", \ + "$38","$39","$3a","$3b","$3c","$3d","$3e","$3f", \ + "$40","$41","$42","$43","$44","$45","$46","$47", \ + "$48","$49","$4a","$4b","$4c","$4d","$4e","$4f", \ + "$50","$51","$52","$53","$54","$55","$56","$57", \ + "$58","$59","$5a","$5b","$5c","$5d","$5e","$5f", \ + "$60","$61","$62","$63","$64","$65","$66","$67", \ + "$68","$69","$6a","$6b","$6c","$6d","$6e","$6f", \ + "$70","$71","$72","$73","$74","$75","$76","$77", \ + "$78","$79","$7a","$7b","$7c","$7d","callh","calll", \ + "$80","$81","$82","$83","$84","$85","$86","$87", \ + "$88","$89","$8a","$8b","$8c","$8d","$8e","$8f", \ + "$90","$91","$92","$93","$94","$95","$96","$97", \ + "$98","$99","$9a","$9b","$9c","$9d","$9e","$9f", \ + "$a0","$a1","$a2","$a3","$a4","$a5","$a6","$a7", \ + "$a8","$a9","$aa","$ab","$ac","$ad","$ae","$af", \ + "$b0","$b1","$b2","$b3","$b4","$b5","$b6","$b7", \ + "$b8","$b9","$ba","$bb","$bc","$bd","$be","$bf", \ + "$c0","$c1","$c2","$c3","$c4","$c5","$c6","$c7", \ + "$c8","$c9","$ca","$cb","$cc","$cd","$ce","$cf", \ + "$d0","$d1","$d2","$d3","$d4","$d5","$d6","$d7", \ + "$d8","$d9","$da","$db","$dc","$dd","$de","$df", \ + "$e0","$e1","$e2","$e3","$e4","$e5","$e6","$e7", \ + "$e8","$e9","$ea","$eb","$ec","$ed","$ee","$ef", \ + "$f0","$f1","$f2","$f3","$f4","$f5","$f6","$f7", \ + "$f8","$f9","$fa","$fb","$fc","$fd","$fe","$ff", \ + "vfph","vfpl","vaph","vapl"} + + /* A C initializer containing the assembler's names for the machine + registers, each one as a C string constant. This is what + translates register numbers in the compiler into assembler + language. */ + + #define PRINT_OPERAND(STREAM, X, CODE) \ + print_operand ((STREAM), (X), (CODE)) + /* A C compound statement to output to stdio stream STREAM the + assembler syntax for an instruction operand X. X is an RTL + expression. + + CODE is a value that can be used to specify one of several ways of + printing the operand. It is used when identical operands must be + printed differently depending on the context. CODE comes from the + `%' specification that was used to request printing of the + operand. If the specification was just `%DIGIT' then CODE is 0; + if the specification was `%LTR DIGIT' then CODE is the ASCII code + for LTR. + + If X is a register, this macro should print the register's name. + The names can be found in an array `reg_names' whose type is `char + *[]'. `reg_names' is initialized from `REGISTER_NAMES'. + + When the machine description has a specification `%PUNCT' (a `%' + followed by a punctuation character), this macro is called with a + null pointer for X and the punctuation character for CODE. */ + + #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ + ((CODE) == '<' || (CODE) == '>') + + /* A C expression which evaluates to true if CODE is a valid + punctuation character for use in the `PRINT_OPERAND' macro. If + `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no + punctuation characters (except for the standard one, `%') are used + in this way. */ + + #define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X) + /* A C compound statement to output to stdio stream STREAM the + assembler syntax for an instruction operand that is a memory + reference whose address is X. X is an RTL expression. + + On some machines, the syntax for a symbolic address depends on the + section that the address refers to. On these machines, define the + macro `ENCODE_SECTION_INFO' to store the information into the + `symbol_ref', and then check for it here. *Note Assembler + Format::. */ + + /* Since register names don't have a prefix, we must preface all + user identifiers with the '_' to prevent confusion. */ + + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "_" + #define LOCAL_LABEL_PREFIX ".L" + /* `LOCAL_LABEL_PREFIX' + `REGISTER_PREFIX' + `IMMEDIATE_PREFIX' + If defined, C string expressions to be used for the `%R', `%L', + `%U', and `%I' options of `asm_fprintf' (see `final.c'). These + are useful when a single `md' file must support multiple assembler + formats. In that case, the various `tm.h' files can define these + macros differently. */ + + + #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ + asm_fprintf ((STREAM), "\tpage\t%L%d\n\tjmp\t%L%d\n", (VALUE), (VALUE)) + + /* elfos.h presumes that we will want switch/case dispatch tables aligned. + This is not so for the ip2k. */ + #undef ASM_OUTPUT_CASE_LABEL + + #undef ASM_OUTPUT_ADDR_VEC_ELT + #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ + asm_fprintf ((STREAM), "\tpage\t%L%d\n\tjmp\t%L%d\n", (VALUE), (VALUE)) + + /* This macro should be provided on machines where the addresses in a + dispatch table are absolute. + + The definition should be a C statement to output to the stdio + stream STREAM an assembler pseudo-instruction to generate a + reference to a label. VALUE is the number of an internal label + whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'. For + example, + + fprintf ((STREAM), "\t.word L%d\n", (VALUE)) */ + + #define ASM_OUTPUT_ALIGN(STREAM, POWER) \ + fprintf ((STREAM), "\t.align %d\n", (POWER)) + /* A C statement to output to the stdio stream STREAM an assembler + command to advance the location counter to a multiple of 2 to the + POWER bytes. POWER will be a C expression of type `int'. */ + + /* Since instructions are 16 bit word addresses, we should lie and claim that + the dispatch vectors are in QImode. Otherwise the offset into the jump + table will be scaled by the MODE_SIZE. */ + + #define CASE_VECTOR_MODE QImode + /* An alias for a machine mode name. This is the machine mode that + elements of a jump-table should have. */ + + + /* `CASE_VALUES_THRESHOLD' + Define this to be the smallest number of different values for + which it is best to use a jump-table instead of a tree of + conditional branches. The default is four for machines with a + `casesi' instruction and five otherwise. This is best for most + machines. */ + + #undef WORD_REGISTER_OPERATIONS + /* Define this macro if operations between registers with integral + mode smaller than a word are always performed on the entire + register. Most RISC machines have this property and most CISC + machines do not. */ + + #define MOVE_MAX 1 + /* The maximum number of bytes that a single instruction can move + quickly between memory and registers or between two memory + locations. */ + + #define MOVE_RATIO 3 + /* MOVE_RATIO is the number of move instructions that is better than a + block move. Make this small on the IP2k, since the code size grows very + large with each move. */ + + #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 + /* A C expression which is nonzero if on this machine it is safe to + "convert" an integer of INPREC bits to one of OUTPREC bits (where + OUTPREC is smaller than INPREC) by merely operating on it as if it + had only OUTPREC bits. + + On many machines, this expression can be 1. + + When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for + modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result. + If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in + such cases may improve things. */ + + #define Pmode HImode + /* An alias for the machine mode for pointers. On most machines, + define this to be the integer mode corresponding to the width of a + hardware pointer; `SImode' on 32-bit machine or `DImode' on 64-bit + machines. On some machines you must define this to be one of the + partial integer modes, such as `PSImode'. + + The width of `Pmode' must be at least as large as the value of + `POINTER_SIZE'. If it is not equal, you must define the macro + `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to + `Pmode'. */ + + #define FUNCTION_MODE HImode + /* An alias for the machine mode used for memory references to + functions being called, in `call' RTL expressions. On most + machines this should be `QImode'. */ + + #define INTEGRATE_THRESHOLD(DECL) \ + (1 + (3 * list_length (DECL_ARGUMENTS (DECL)) / 2)) + /* A C expression for the maximum number of instructions above which + the function DECL should not be inlined. DECL is a + `FUNCTION_DECL' node. + + The default definition of this macro is 64 plus 8 times the number + of arguments that the function accepts. Some people think a larger + threshold should be used on RISC machines. */ + + #define DOLLARS_IN_IDENTIFIERS 0 + /* Define this macro to control use of the character `$' in identifier + names. 0 means `$' is not allowed by default; 1 means it is + allowed. 1 is the default; there is no need to define this macro + in that case. This macro controls the compiler proper; it does + not affect the preprocessor. */ + + #define MACHINE_DEPENDENT_REORG(INSN) machine_dependent_reorg (INSN) + /* In rare cases, correct code generation requires extra machine + dependent processing between the second jump optimization pass and + delayed branch scheduling. On those machines, define this macro + as a C statement to act on the code starting at INSN. */ + + extern int ip2k_reorg_in_progress; + /* Flag if we're in the middle of IP2k-specific reorganization. */ + + extern int ip2k_reorg_completed; + /* Flag if we've completed our IP2k-specific reorganization. If we have + then we allow quite a few more tricks than before. */ + + extern int ip2k_reorg_split_dimode; + extern int ip2k_reorg_split_simode; + extern int ip2k_reorg_split_qimode; + extern int ip2k_reorg_split_himode; + /* Flags for various split operations that we run in sequence. */ + + extern int ip2k_reorg_merge_qimode; + /* Flag to indicate that it's safe to merge QImode operands. */ + + #define GIV_SORT_CRITERION(X, Y) \ + do { \ + if (GET_CODE ((X)->add_val) == CONST_INT \ + && GET_CODE ((Y)->add_val) == CONST_INT) \ + return INTVAL ((X)->add_val) - INTVAL ((Y)->add_val); \ + } while (0) + + /* In some cases, the strength reduction optimization pass can + produce better code if this is defined. This macro controls the + order that induction variables are combined. This macro is + particularly useful if the target has limited addressing modes. + For instance, the SH target has only positive offsets in + addresses. Thus sorting to put the smallest address first allows + the most combinations to be found. */ + + #define TRAMPOLINE_TEMPLATE(FILE) abort () + + /* Length in units of the trampoline for entering a nested function. */ + + #define TRAMPOLINE_SIZE 4 + + /* Emit RTL insns to initialize the variable parts of a trampoline. + FNADDR is an RTX for the address of the function's pure code. + CXT is an RTX for the static chain value for the function. */ + + #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ + { \ + emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 2)), \ + CXT); \ + emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 6)), \ + FNADDR); \ + } + /* Store in cc_status the expressions + that the condition codes will describe + after execution of an instruction whose pattern is EXP. + Do not alter them if the instruction would not alter the cc's. */ + + #define NOTICE_UPDATE_CC(EXP, INSN) (void)(0) + + /* Output assembler code to FILE to increment profiler label # LABELNO + for profiling a function entry. */ + + #define FUNCTION_PROFILER(FILE, LABELNO) \ + fprintf ((FILE), "/* profiler %d */", (LABELNO)) + + #define TARGET_MEM_FUNCTIONS + /* Define this macro if GNU CC should generate calls to the System V + (and ANSI C) library functions `memcpy' and `memset' rather than + the BSD functions `bcopy' and `bzero'. */ + + + #undef ENDFILE_SPEC + #undef LINK_SPEC + #undef STARTFILE_SPEC + + /* Another C string constant used much like `LINK_SPEC'. The + difference between the two is that `ENDFILE_SPEC' is used at the + very end of the command given to the linker. + + Do not define this macro if it does not need to do anything. */ + + #if defined(__STDC__) || defined(ALMOST_STDC) + #define AS2(a,b,c) #a "\t" #b "," #c + #define AS1(a,b) #a "\t" #b + #else + #define AS1(a,b) "a b" + #define AS2(a,b,c) "a b,c" + #endif + #define OUT_AS1(a,b) output_asm_insn (AS1 (a,b), operands) + #define OUT_AS2(a,b,c) output_asm_insn (AS2 (a,b,c), operands) + #define CR_TAB "\n\t" + + /* Define this macro as a C statement that declares additional library + routines renames existing ones. `init_optabs' calls this macro + after initializing all the normal library routines. */ + + #define INIT_TARGET_OPTABS \ + { \ + smul_optab->handlers[(int) SImode].libfunc \ + = gen_rtx_SYMBOL_REF (Pmode, "_mulsi3"); \ + \ + smul_optab->handlers[(int) DImode].libfunc \ + = gen_rtx_SYMBOL_REF (Pmode, "_muldi3"); \ + \ + cmp_optab->handlers[(int) HImode].libfunc \ + = gen_rtx_SYMBOL_REF (Pmode, "_cmphi2"); \ + \ + cmp_optab->handlers[(int) SImode].libfunc \ + = gen_rtx_SYMBOL_REF (Pmode, "_cmpsi2"); \ + } + + #define PREDICATE_CODES \ + {"ip2k_ip_operand", {MEM}}, \ + {"ip2k_short_operand", {MEM}}, \ + {"ip2k_gen_operand", {MEM, REG, SUBREG}}, \ + {"ip2k_nonptr_operand", {REG, SUBREG}}, \ + {"ip2k_ptr_operand", {REG, SUBREG}}, \ + {"ip2k_split_dest_operand", {REG, SUBREG, MEM}}, \ + {"ip2k_sp_operand", {REG}}, \ + {"ip2k_nonsp_reg_operand", {REG, SUBREG}}, \ + {"ip2k_symbol_ref_operand", {SYMBOL_REF}}, \ + {"ip2k_binary_operator", {PLUS, MINUS, MULT, DIV, \ + UDIV, MOD, UMOD, AND, IOR, \ + XOR, COMPARE, ASHIFT, \ + ASHIFTRT, LSHIFTRT}}, \ + {"ip2k_unary_operator", {NEG, NOT, SIGN_EXTEND, \ + ZERO_EXTEND}}, \ + {"ip2k_unsigned_comparison_operator", {LTU, GTU, NE, \ + EQ, LEU, GEU}},\ + {"ip2k_signed_comparison_operator", {LT, GT, LE, GE}}, + + #define DWARF2_DEBUGGING_INFO 1 + + #define DWARF2_ASM_LINE_DEBUG_INFO 1 + + #define DBX_REGISTER_NUMBER(REGNO) (REGNO) + + /* Miscellaneous macros to describe machine specifics. */ + + #define STORE_FLAG_VALUE 1 + + #define IS_PSEUDO_P(R) (REGNO (R) >= FIRST_PSEUDO_REGISTER) + + /* Default calculations would cause DWARF address sizes to be 2 bytes, + but the Harvard architecture of the IP2k and the word-addressed 64k + of instruction memory causes us to want a 32-bit "address" field. */ + #undef DWARF2_ADDR_SIZE + #define DWARF2_ADDR_SIZE 4 + diff -Nrc3pad gcc-3.2.3/gcc/config/ip2k/ip2k.md gcc-3.3/gcc/config/ip2k/ip2k.md *** gcc-3.2.3/gcc/config/ip2k/ip2k.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ip2k/ip2k.md 2002-09-19 13:51:24.000000000 +0000 *************** *** 0 **** --- 1,6902 ---- + ;; -*- Mode: Scheme -*- + ;; GCC machine description for Ubicom IP2022 Communications Controller. + ;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + ;; Contributed by Red Hat, Inc and Ubicom, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. */ + + ;; Default all instruction lengths to two bytes (one 16-bit instruction). + ;; + (define_attr "length" "" (const_int 2)) + + ;; Define if we can "skip" an insn or not + (define_attr "skip" "no,yes" (const_string "no")) + + ;; Define an insn clobbers WREG or not + (define_attr "clobberw" "no,yes" (const_string "yes")) + + ;; Performance Issues: + ;; + ;; With the IP2k only having one really useful pointer register we have to + ;; make most of our instruction patterns only match one offsettable address + ;; before addressing becomes strict whereas afterwards of course we can use + ;; any register details that have become fixed. As we've already committed + ;; any reloads at this point of course we're a little late so we have to use + ;; a number of peephole2 optimizations to remerge viable patterns. We can + ;; do a bit more tidying up in the machine-dependent reorg pass to try and + ;; make things better still. None of this is ideal, but it's *much* better + ;; than nothing. + + ;; Constraints: + ;; + ;; I - -255..-1 - all other literal values have to be loaded + ;; J - 0..7 - valid bit number in a register + ;; K - 0..127 - valid offset for addressing mode + ;; L - 1..127 - positive count suitable for shift. + ;; M - -1 as a literal value + ;; N - +1 as a literal value + ;; O - zero + ;; P - 0..255 + ;; + ;; a - DP or IP registers (general address) + ;; f - IP register + ;; j - IPL register + ;; k - IPH register + ;; b - DP register + ;; y - DPH register + ;; z - DPL register + ;; q - SP register + ;; c - DP or SP registers (offsettable address) + ;; d - non-pointer registers (not SP, DP, IP) + ;; u - non-SP registers (everything except SP) + ;; + ;; R - Indirect thru IP - Avoid this except for QI mode, since we + ;; can't access extra bytes. + ;; S - Short (stack/dp address). Pointer with 0..127 displacement + ;; Note that 0(SP) has undefined contents due to post-decrement push + ;; T - data-section immediate value. A CONST_INT or SYMBOL_REF into .data + + ;; Special assembly-language format effectors: + ;; + ;; ABCD - + ;; Reference up to 4 big-endian registers - %A0 is Rn+0, while %D0 is Rn+3 + ;; STUVWXYZ - + ;; Reference up to 8 big-endian registers - %S0 is Rn+0, while %Z0 is Rn+7 + ;; + ;; H - High part of 16 bit address or literal %hi8data(v) or %hi8insn(v) + ;; L - Low part of 16 bit address or literal %lo8data(v) or %lo8insn(v) + ;; b - print a literal value with no punctuation (typically bit selector) + ;; e - print 1 << v ('exponent') + ;; n - print negative number + ;; x - print 16 bit hex number + ;; < - interior stack push; adjust any stack-relative operands accordingly + ;; > - interior stack pop; clear adjustment. + + ;; + ;; Basic operations to move data in and out of fr's. Also extended to + ;; cover the loading of w with immediates + ;; + + (define_insn "*movqi_w_gen" + [(set (reg:QI 10) + (match_operand:QI 0 "general_operand" "rSi"))] + "(ip2k_reorg_split_qimode)" + "mov\\tw,%0" + [(set_attr "skip" "yes")]) + + (define_insn "*movqi_fr_w" + [(set (match_operand:QI 0 "nonimmediate_operand" "=rS") + (reg:QI 10))] + "(ip2k_reorg_split_qimode)" + "mov\\t%0,w" + [(set_attr "skip" "yes") + (set_attr "clobberw" "no")]) + + + ;; Handle the cases where we get back to back redundant mov patterns issued. + ;; This of course sounds somewhat absurd but is actually reasonably common + ;; because we aren't able to match certain patterns before registers are + ;; chosen. This is particularly true of memory to memory operations where + ;; we can't provide patterns that will guarantee to match every time because + ;; this would require reloads in the middle of instructions. If we + ;; discover a case that doesn't need a reload of course then this combiner + ;; operation will tidy up for us. + ;; + ;; Warning! Whilst it would be nice to match operand 0 as a general operand + ;; we mustn't do so because this doesn't work with the REG_DEAD check. + ;; + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "ip2k_gen_operand" "")) + (set (match_operand 2 "ip2k_split_dest_operand" "") + (match_dup 0))] + "(peep2_reg_dead_p (2, operands[0]) + && ! (REG_P (operands[2]) && REGNO (operands[2]) == REG_SP) + && (REG_P (operands[2]) + || ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0])))))" + [(set (match_dup 2) + (match_dup 1))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "immediate_operand" "")) + (set (match_operand 2 "ip2k_gen_operand" "") + (match_dup 0))] + "(peep2_reg_dead_p (2, operands[0]) + && ! (REG_P (operands[2]) && REGNO (operands[2]) == REG_SP) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_dup 1))] + "") + + ;; + ;; Move 8-bit integers. + ;; + + (define_expand "movqi" + [(set (match_operand:QI 0 "" "") + (match_operand:QI 1 "" ""))] + "" + "") + + (define_insn "*pushqi" + [(set (match_operand:QI 0 "push_operand" "=<") + (match_operand:QI 1 "general_operand" "g"))] + "" + "push\\t%1" + [(set_attr "skip" "yes") + (set_attr "clobberw" "no")]) + + ;; IP isn't offsettable but we can fake this behavior here and win if we would + ;; otherwise use DP and require a reload from IP. This instruction is only + ;; matched by peephole2 operations. + ;; + (define_insn "*movqi_to_ip_plus_offs" + [(set (mem:QI (plus:HI (reg:HI 4) + (match_operand 0 "const_int_operand" "P,P"))) + (match_operand:QI 1 "general_operand" "O,g"))] + "reload_completed && (INTVAL (operands[0]) < 0x100)" + "*{ + if (INTVAL (operands[0]) == 1) + OUT_AS1 (inc, ipl); + else + { + OUT_AS2 (mov, w, %0); + OUT_AS2 (add, ipl, w); + } + + switch (which_alternative) + { + case 0: + OUT_AS1 (clr, (IP)); + break; + + case 1: + OUT_AS1 (push, %1%<); + OUT_AS1 (pop, (IP)%>); + break; + } + + if (!find_regno_note (insn, REG_DEAD, REG_IP)) + { + if (INTVAL (operands[0]) == 1) + OUT_AS1 (dec, ipl); + else + OUT_AS2 (sub, ipl, w); + } + return \"\"; + }") + + ;; IP isn't offsettable but we can fake this behavior here and win if we would + ;; otherwise use DP and require a reload from IP. This instruction is only + ;; matched by peephole2 operations. + ;; + (define_insn "*movqi_from_ip_plus_offs" + [(set (match_operand:QI 0 "nonimmediate_operand" "=g") + (mem:QI (plus:HI (reg:HI 4) + (match_operand 1 "const_int_operand" "P"))))] + "reload_completed && (INTVAL (operands[1]) < 0x100)" + "*{ + if (INTVAL (operands[1]) == 1) + OUT_AS1 (inc, ipl); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, ipl, w); + } + OUT_AS1 (push, (IP)%<); + OUT_AS1 (pop, %0%>); + if (!find_regno_note (insn, REG_DEAD, REG_IP) + && ip2k_xexp_not_uses_reg_p (operands[0], REG_IP, 2)) + { + if (INTVAL (operands[1]) == 1) + OUT_AS1 (dec, ipl); + else + OUT_AS2 (sub, ipl, w); + } + return \"\"; + }") + + (define_insn_and_split "*movqi" + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR,roR,r, rS,roR") + (match_operand:QI 1 "general_operand" " O, ri,o,rioR,rSi"))] + "" + "@ + clr\\t%0 + # + # + # + #" + "(ip2k_reorg_split_qimode + && (GET_CODE (operands[1]) != CONST_INT + || INTVAL (operands[1]) != 0))" + [(set (reg:QI 10) (match_dup 1)) + (set (match_dup 0) (reg:QI 10))] + "" + [(set_attr "skip" "yes,no,no,no,no") + (set_attr "clobberw" "no,yes,yes,yes,yes")]) + + (define_peephole2 + [(set (reg:HI 12) + (reg:HI 4)) + (set (match_operand:QI 0 "nonimmediate_operand" "") + (mem:QI (plus:HI (reg:HI 12) + (match_operand 1 "const_int_operand" ""))))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_regno_dead_p (2, REG_DP) + && ip2k_xexp_not_uses_reg_p (operands[0], REG_DP, 2) + && (INTVAL (operands[1]) < 0x100))" + [(set (match_dup 0) + (mem:QI (plus:HI (reg:HI 4) + (match_dup 1))))] + "") + + (define_peephole2 + [(set (reg:HI 12) + (reg:HI 4)) + (set (mem:QI (plus:HI (reg:HI 12) + (match_operand 0 "const_int_operand" ""))) + (match_operand:QI 1 "general_operand" ""))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_regno_dead_p (2, REG_DP) + && ip2k_xexp_not_uses_reg_p (operands[0], REG_DP, 2) + && (INTVAL (operands[0]) < 0x100))" + [(set (mem:QI (plus:HI (reg:HI 4) + (match_dup 0))) + (match_dup 1))] + "") + + (define_peephole2 + [(set (match_operand:QI 0 "register_operand" "") + (mem:QI (plus:HI (reg:HI 4) + (match_operand 1 "const_int_operand" "")))) + (set (match_operand:QI 2 "nonimmediate_operand" "") + (match_dup 0))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_reg_dead_p (2, operands[0]))" + [(set (match_dup 2) + (mem:QI (plus:HI (reg:HI 4) + (match_dup 1))))] + "") + + ;; We sometimes want to copy a value twice, usually when we copy a value into + ;; both a structure slot and into a temporary register. We can win here + ;; because gcc doesn't know about ways of reusing w while we're copying. + ;; + (define_insn_and_split "*movqi_twice" + [(set (match_operand:QI 0 "nonimmediate_operand" "=g") + (match_operand:QI 1 "general_operand" "g")) + (set (match_operand:QI 2 "nonimmediate_operand" "=g") + (match_dup 1))] + "ip2k_reorg_merge_qimode" + "mov\\tw,%1\;mov\\t%0,w\;mov\\t%2,w" + "(ip2k_reorg_split_qimode)" + [(set (reg:QI 10) (match_dup 1)) + (set (match_dup 0) (reg:QI 10)) + (set (match_dup 2) (reg:QI 10))] + "") + + ;; Don't try to match until we've removed redundant reloads. Often this + ;; simplification will remove the need to do two moves! + ;; + (define_peephole2 + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (match_operand:QI 1 "general_operand" "")) + (set (match_operand:QI 2 "nonimmediate_operand" "") + (match_dup 0))] + "(ip2k_reorg_merge_qimode + && (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (match_dup 2) + (match_dup 1))])] + "") + + ;; Don't try to match until we've removed redundant reloads. Often this + ;; simplification will remove the need to do two moves! + ;; + (define_peephole2 + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (match_operand:QI 1 "general_operand" "")) + (set (match_operand:QI 2 "nonimmediate_operand" "") + (match_dup 1))] + "(ip2k_reorg_merge_qimode + && (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (match_dup 2) + (match_dup 1))])] + "") + + ;; + ;; Move 16-bit integers. + ;; + + (define_expand "movhi" + [(set (match_operand:HI 0 "" "") + (match_operand:HI 1 "" ""))] + "" + "") + + (define_insn "*pushhi_ip" + [(set (match_operand:HI 0 "push_operand" "=<") + (mem:HI (reg:HI 4)))] + "reload_completed" + "inc\\tipl\;push\\t(IP)\;dec\\tipl\;push\\t(IP)" + [(set_attr "clobberw" "no")]) + + (define_insn "*movhi_to_ip" + [(set (mem:HI (reg:HI 4)) + (match_operand:HI 0 "general_operand" "O,roi"))] + "reload_completed" + "*{ + switch (which_alternative) + { + case 0: + OUT_AS1 (clr, (IP)); + OUT_AS1 (inc, ipl); + OUT_AS1 (clr, (IP)); + if (!find_regno_note (insn, REG_DEAD, REG_IP)) + OUT_AS1 (dec, ipl); + return \"\"; + + case 1: + OUT_AS2 (mov, w, %H0); + OUT_AS2 (mov, (IP), w); + OUT_AS2 (mov, w, %L0); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, (IP), w); + if (!find_regno_note (insn, REG_DEAD, REG_IP)) + OUT_AS1 (dec, ipl); + return \"\"; + default: + abort (); + } + }") + + (define_insn "*movhi_from_ip" + [(set (match_operand:HI 0 "nonimmediate_operand" "=f,bqdo") + (mem:HI (reg:HI 4)))] + "reload_completed" + "*{ + switch (which_alternative) + { + case 0: + OUT_AS1 (push, (IP)); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, ipl, w); + OUT_AS1 (pop, iph); + return \"\"; + + case 1: + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, %H0, w); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, %L0, w); + if (!find_regno_note (insn, REG_DEAD, REG_IP)) + OUT_AS1 (dec, ipl); + return \"\"; + default: + abort (); + } + }") + + (define_insn "*movhi_from_ip_plus_offs" + [(set (match_operand:HI 0 "nonimmediate_operand" "=f,bqdo") + (mem:HI (plus:HI (reg:HI 4) + (match_operand 1 "const_int_operand" "P, P"))))] + "reload_completed && (INTVAL (operands[1]) < 0x100)" + "*{ + switch (which_alternative) + { + case 0: + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, ipl, w); + OUT_AS1 (push, (IP)); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, ipl, w); + OUT_AS1 (pop, iph); + return \"\"; + + case 1: + if (INTVAL (operands[1]) == 1) + OUT_AS1 (inc, ipl); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, ipl, w); + } + OUT_AS1 (push, (IP)%<); + OUT_AS1 (pop, %H0%>); + OUT_AS1 (inc, ipl); + OUT_AS1 (push, (IP)%<); + OUT_AS1 (pop, %L0%>); + if (!find_regno_note (insn, REG_DEAD, REG_IP)) + { + OUT_AS1 (dec, ipl); + if (INTVAL (operands[1]) == 1) + OUT_AS1 (dec, ipl); + else + OUT_AS2 (sub, ipl, w); + } + return \"\"; + default: + abort (); + } + }") + + (define_insn_and_split "*movhi" + [(set + (match_operand:HI 0 "ip2k_split_dest_operand" "=<,<,uo,b, uS,uo,uo, q,u") + (match_operand:HI 1 "general_operand" "ron,i, n,T,uoi,uS,ui,ui,q"))] + "" + "@ + push\\t%L1%<\;push\\t%H1%> + push\\t%L1%<\;push\\t%H1%> + mov\\tw,%H1\;mov\\t%H0,w\;mov\\tw,%L1\;mov\\t%L0,w + loadl\\t%x1\;loadh\\t%x1 + mov\\tw,%H1\;push\\t%L1%<\;pop\\t%L0%>\;mov\\t%H0,w + mov\\tw,%H1\;push\\t%L1%<\;pop\\t%L0%>\;mov\\t%H0,w + mov\\tw,%H1\;push\\t%L1%<\;pop\\t%L0%>\;mov\\t%H0,w + mov\\tw,%H1\;mov\\t%H0,w\;mov\\tw,%L1\;mov\\t%L0,w + mov\\tw,%H1\;mov\\t%H0,w\;mov\\tw,%L1\;mov\\t%L0,w" + "(ip2k_reorg_split_himode + && (GET_CODE (operands[1]) == CONST_INT + || (push_operand (operands[0], HImode) + && GET_CODE (operands[1]) == REG) + || (register_operand (operands[0], HImode) + && REGNO (operands[0]) >= 0x80 + && ip2k_gen_operand (operands[1], HImode))))" + [(set (match_dup 2) (match_dup 3)) + (set (match_dup 4) (match_dup 5))] + "{ + ip2k_split_words (QImode, HImode, operands); /* Split into 2=3,4=5 */ + }" + [(set_attr "clobberw" "no,no,yes,no,yes,yes,yes,yes,yes")]) + + ;; We don't generally use IP for HImode indirections because it's not + ;; offsettable, however if we're accessing something that's already pointed + ;; to by IP and would otherwise require a reload of DP then we can win by + ;; simulating HImode accesses via IP instead. + + (define_peephole2 + [(set (reg:HI 12) + (reg:HI 4)) + (set (mem:HI (reg:HI 12)) + (match_operand:HI 0 "general_operand" ""))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && ip2k_xexp_not_uses_reg_p (operands[0], REG_DP, 2) + && peep2_regno_dead_p (2, REG_DP))" + [(set (mem:HI (reg:HI 4)) + (match_dup 0))] + "") + + (define_peephole2 + [(set (reg:HI 12) + (reg:HI 4)) + (set (match_operand:HI 0 "nonimmediate_operand" "") + (mem:HI (reg:HI 12)))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && ip2k_xexp_not_uses_reg_p (operands[0], REG_DP, 2) + && peep2_regno_dead_p (2, REG_DP))" + [(set (match_dup 0) + (mem:HI (reg:HI 4)))] + "") + + (define_peephole2 + [(set (reg:HI 12) + (reg:HI 4)) + (set (match_operand:HI 0 "nonimmediate_operand" "") + (mem:HI (plus:HI (reg:HI 12) + (match_operand 1 "const_int_operand" ""))))] + ; + ; We only match here if IP and DP both go dead because emulating + ; offsets in conjunction with IP doesn't win unless IP goes + ; dead too. + ; + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_regno_dead_p (2, REG_DP) + && peep2_regno_dead_p (2, REG_IP) + && (INTVAL (operands[1]) < 0x100))" + [(set (match_dup 0) + (mem:HI (plus:HI (reg:HI 4) + (match_dup 1))))] + "") + + (define_peephole2 + [(set (reg:HI 12) + (reg:HI 4)) + (set (reg:HI 4) + (mem:HI (plus:HI (reg:HI 12) + (match_operand 0 "const_int_operand" ""))))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_regno_dead_p (2, REG_DP) + && (INTVAL (operands[0]) < 0x100))" + [(set (reg:HI 4) + (mem:HI (plus:HI (reg:HI 4) + (match_dup 0))))] + "") + + (define_peephole2 + [(set (match_operand:HI 0 "register_operand" "") + (mem:HI (reg:HI 4))) + (set (match_operand:HI 2 "nonimmediate_operand" "") + (match_dup 0))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_reg_dead_p (2, operands[0]))" + [(set (match_dup 2) + (mem:HI (reg:HI 4)))] + "") + + (define_peephole2 + [(set (match_operand:HI 0 "register_operand" "") + (mem:HI (plus:HI (reg:HI 4) + (match_operand 1 "const_int_operand" "")))) + (set (match_operand:HI 2 "nonimmediate_operand" "") + (match_dup 0))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_reg_dead_p (2, operands[0]) + && (INTVAL (operands[1]) < 0x100))" + [(set (match_dup 2) + (mem:HI (plus:HI (reg:HI 4) + (match_dup 1))))] + "") + + (define_peephole2 + [(set (match_operand:HI 0 "ip2k_nonsp_reg_operand" "") + (match_operand:HI 1 "ip2k_short_operand" "")) + (set (reg:HI 12) + (reg:HI 4)) + (set (mem:HI (reg:HI 12)) + (match_dup 0))] + "(peep2_reg_dead_p (3, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[0], REG_DP, 2) + && peep2_regno_dead_p (3, REG_DP))" + [(set (mem:HI (reg:HI 4)) + (match_dup 1))] + "") + + ;; We sometimes want to copy a value twice, usually when we copy a value into + ;; both a structure slot and into a temporary register. We can win here + ;; because gcc doesn't know about ways of reusing w while we're copying. + ;; + (define_insn "*movhi_twice" + [(set (match_operand:HI 0 "ip2k_gen_operand" "=&uS,uS") + (match_operand:HI 1 "ip2k_gen_operand" "uS,uS")) + (set (match_operand:HI 2 "ip2k_gen_operand" "=&uS,uS") + (match_dup 1))] + "ip2k_reorg_split_simode" + "*{ + switch (which_alternative) + { + case 0: + return AS2 (mov, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, %L2, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (mov, %H2, w); + + case 1: + return AS2 (mov, w, %L1) CR_TAB + AS1 (push, %H1%<) CR_TAB + AS1 (push, %H1%<) CR_TAB + AS1 (pop, %H0%>) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS1 (pop, %H2%>) CR_TAB + AS2 (mov, %L2, w); + default: + abort (); + } + }") + + ;; We have to be *very* careful with this one to use predicates that do not + ;; allow this to match if there are any register dependencies between the + ;; operands. + ;; Don't try to match until we've removed redundant reloads. Often this + ;; simplification will remove the need to do two moves! + ;; + (define_peephole2 + [(set (match_operand:HI 0 "ip2k_gen_operand" "") + (match_operand:HI 1 "ip2k_gen_operand" "")) + (set (match_operand:HI 2 "ip2k_gen_operand" "") + (match_dup 0))] + "(ip2k_reorg_split_simode)" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (match_dup 2) + (match_dup 1))])] + "") + + ;; We have to be *very* careful with this one to use predicates that do not + ;; allow this to match if there are any register dependencies between the + ;; operands. + ;; Don't try to match until we've removed redundant reloads. Often this + ;; simplification will remove the need to do two moves! + ;; + (define_peephole2 + [(set (match_operand:HI 0 "ip2k_gen_operand" "") + (match_operand:HI 1 "ip2k_gen_operand" "")) + (set (match_operand:HI 2 "ip2k_gen_operand" "") + (match_dup 1))] + "(ip2k_reorg_split_simode + && (!REG_P (operands[0]) + || ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), 2)))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (match_dup 2) + (match_dup 1))])] + "") + + ;; + ;; Move 32-bit integers. + ;; + + (define_expand "movsi" + [(set (match_operand:SI 0 "" "") + (match_operand:SI 1 "" ""))] + "" + "") + + (define_insn_and_split "*movsi" + [(set (match_operand:SI 0 "ip2k_split_dest_operand" "=<, ro, S") + (match_operand:SI 1 "general_operand" "roSi,rSi,roi"))] + "" + "#" + "ip2k_reorg_split_simode" + [(set (match_dup 2) (match_dup 3)) + (set (match_dup 4) (match_dup 5))] + "{ + ip2k_split_words (HImode, SImode, operands); /* Split into 2=3,4=5 */ + }") + + ;; We sometimes want to copy a value twice, usually when we copy a value into + ;; both a structure slot and into a temporary register. We can win here + ;; because gcc doesn't know about ways of reusing w while we're copying. + ;; + (define_insn "*movsi_twice" + [(set (match_operand:SI 0 "ip2k_gen_operand" "=&uS,uS") + (match_operand:SI 1 "ip2k_gen_operand" "uS,uS")) + (set (match_operand:SI 2 "ip2k_gen_operand" "=&uS,uS") + (match_dup 1))] + "ip2k_reorg_split_dimode" + "*{ + switch (which_alternative) + { + case 0: + return AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, %A2, w) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %B2, w) CR_TAB + AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, %C2, w) CR_TAB + AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, %D2, w); + + case 1: + return AS2 (mov, w, %D1) CR_TAB + AS1 (push, %C1%<) CR_TAB + AS1 (push, %B1%<) CR_TAB + AS1 (push, %A1%<) CR_TAB + AS1 (push, %C1%<) CR_TAB + AS1 (push, %B1%<) CR_TAB + AS1 (push, %A1%<) CR_TAB + AS1 (pop, %A0%>) CR_TAB + AS1 (pop, %B0%>) CR_TAB + AS1 (pop, %C0%>) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (pop, %A2%>) CR_TAB + AS1 (pop, %B2%>) CR_TAB + AS1 (pop, %C2%>) CR_TAB + AS2 (mov, %D2, w); + default: + abort (); + } + }") + + ;; We have to be *very* careful with this one to use predicates that do not + ;; allow this to match if there are any register dependencies between the + ;; operands. + ;; Don't try to match until we've removed redundant reloads. Often this + ;; simplification will remove the need to do two moves! + ;; + (define_peephole2 + [(set (match_operand:SI 0 "ip2k_gen_operand" "") + (match_operand:SI 1 "ip2k_gen_operand" "")) + (set (match_operand:SI 2 "ip2k_gen_operand" "") + (match_dup 0))] + "(ip2k_reorg_split_dimode + && (!REG_P (operands[0]) + || (ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), 4) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), 4))) + && (!REG_P (operands[1]) + || (ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[1]), 4) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[1]), 4))) + && (!REG_P (operands[2]) + || (ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[2]), 4) + && ip2k_xexp_not_uses_reg_p (operands[1], + REGNO (operands[2]), 4))))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (match_dup 2) + (match_dup 1))])] + "") + + ;; We have to be *very* careful with this one to use predicates that do not + ;; allow this to match if there are any register dependencies between the + ;; operands. + ;; Don't try to match until we've removed redundant reloads. Often this + ;; simplification will remove the need to do two moves! + ;; + (define_peephole2 + [(set (match_operand:SI 0 "ip2k_gen_operand" "") + (match_operand:SI 1 "ip2k_gen_operand" "")) + (set (match_operand:SI 2 "ip2k_gen_operand" "") + (match_dup 1))] + "(ip2k_reorg_split_dimode + && (!REG_P (operands[0]) + || (ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), 4) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), 4))) + && (!REG_P (operands[1]) + || (ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[1]), 4) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[1]), 4))) + && (!REG_P (operands[2]) + || (ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[2]), 4) + && ip2k_xexp_not_uses_reg_p (operands[1], + REGNO (operands[2]), 4))))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (match_dup 2) + (match_dup 1))])] + "") + + ;; + ;; Move 64-bit integers. + ;; + + (define_expand "movdi" + [(set (match_operand:DI 0 "" "") + (match_operand:DI 1 "" ""))] + "" + "") + + (define_insn_and_split "*movdi" + [(set (match_operand:DI 0 "ip2k_split_dest_operand" "=<, ro, S") + (match_operand:DI 1 "general_operand" "roSi,rSi,roi"))] + "" + "#" + "ip2k_reorg_split_dimode" + [(set (match_dup 2) (match_dup 3)) + (set (match_dup 4) (match_dup 5))] + "{ + ip2k_split_words (SImode, DImode, operands); /* Split into 2=3,4=5 */ + }") + + ;; + ;; Move 32-bit floating point values. + ;; + + (define_expand "movsf" + [(set (match_operand:SF 0 "" "") + (match_operand:SF 1 "" ""))] + "" + "if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) + operands[1] = copy_to_mode_reg (SFmode, operands[1]); + ") + + (define_insn_and_split "*movsf" + [(set (match_operand:SF 0 "ip2k_split_dest_operand" "=r<, o") + (match_operand:SF 1 "general_operand" "roi,ri"))] + "(ip2k_short_operand (operands[0], SFmode) + && ip2k_short_operand (operands[1], SFmode)) + || ! (memory_operand (operands[0], SFmode) + && memory_operand (operands[1], SFmode))" + "#" + "(reload_completed || reload_in_progress)" + [(set (match_dup 2) (match_dup 3)) + (set (match_dup 4) (match_dup 5)) + (set (match_dup 6) (match_dup 7)) + (set (match_dup 8) (match_dup 9))] + "{ + /* Split into 2=3,4=5 */ + ip2k_split_words (HImode, SImode, operands); + /* Split 4=5 into 6=7,8=9 */ + ip2k_split_words (QImode, HImode, &operands[4]); + operands[0] = operands[2]; + operands[1] = operands[3]; + ip2k_split_words (QImode, HImode, operands); + }") + + ;; + ;; Move 64-bit floating point values. + ;; + + ;; + ;; Block move operations. + ;; + + ;; Copy a block of bytes (memcpy()). We expand the definition to convert + ;; our memory operand into a register pointer operand instead. + ;; + (define_expand "movstrhi" + [(use (match_operand:BLK 0 "memory_operand" "")) + (use (match_operand:BLK 1 "memory_operand" "")) + (use (match_operand:HI 2 "general_operand" "")) + (use (match_operand 3 "const_int_operand" ""))] + "" + "{ + rtx addr0, addr1, count; + + addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); + addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); + + if (GET_CODE (operands[2]) == CONST_INT) + count = gen_int_mode (INTVAL (operands[2]) & 0xffff, HImode); + else + count = operands[2]; + + emit_insn (gen_movstrhi_expanded (addr0, count, addr1)); + DONE; + }") + + ;; Block copy instruction. We handle this by calling one of two functions in + ;; libgcc. The first of these is a special case (faster) routine that handles + ;; constant block sizes under 256 bytes. This one is particularly common + ;; because we use it when copying data structures. The second routine handles + ;; the general case where we have either a variable block size or one that is + ;; greater than 255 bytes. + ;; + (define_insn "movstrhi_expanded" + [(set + (mem:BLK + (match_operand:HI 0 "nonimmediate_operand" "rS,ro,rS, rS, ro, rS")) + (mem:BLK + (match_operand:HI 2 "nonimmediate_operand" "ro,rS,rS, ro, rS, rS"))) + (use + (match_operand:HI 1 "general_operand" "P, P, P,rSi,rSi,roi"))] + "" + "@ + push\\t%L1%<\;push\\t%L2%<\;push\\t%H2%<\;push\\t%L0%<\;push\\t%H0%>%>%>%>\;page\\t__movstrhi_countqi\;call\\t__movstrhi_countqi + push\\t%L1%<\;push\\t%L2%<\;push\\t%H2%<\;push\\t%L0%<\;push\\t%H0%>%>%>%>\;page\\t__movstrhi_countqi\;call\\t__movstrhi_countqi + push\\t%L1%<\;push\\t%L2%<\;push\\t%H2%<\;push\\t%L0%<\;push\\t%H0%>%>%>%>\;page\\t__movstrhi_countqi\;call\\t__movstrhi_countqi + push\\t%L1%<\;push\\t%H1%<\;push\\t%L2%<\;push\\t%H2%<\;push\\t%L0%<\;push\\t%H0%>%>%>%>%>\;page\\t__movstrhi_counthi\;call\\t__movstrhi_counthi + push\\t%L1%<\;push\\t%H1%<\;push\\t%L2%<\;push\\t%H2%<\;push\\t%L0%<\;push\\t%H0%>%>%>%>%>\;page\\t__movstrhi_counthi\;call\\t__movstrhi_counthi + push\\t%L1%<\;push\\t%H1%<\;push\\t%L2%<\;push\\t%H2%<\;push\\t%L0%<\;push\\t%H0%>%>%>%>%>\;page\\t__movstrhi_counthi\;call\\t__movstrhi_counthi") + + + ;; Bit insert + ;; + (define_expand "insv" + [(set (zero_extract:QI (match_operand:QI 0 "nonimmediate_operand" "") + (match_operand 1 "immediate_operand" "") ;size + (match_operand 2 "immediate_operand" "")) ;pos + (match_operand:QI 3 "general_operand" ""))] + "" + "{ + if (! CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J') + || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')) + FAIL; + }") + + (define_insn "*insv" + [(set (zero_extract:QI + (match_operand:QI + 0 "nonimmediate_operand" "+roR,roR,roR,roR,&roR,&roR,&r") + (match_operand + 1 "immediate_operand" "N, N, J, J, N, J, J") ;sz + (match_operand + 2 "immediate_operand" "J, J, J, J, J, J, J"));pos + (match_operand:QI + 3 "general_operand" "MN, O, M, O, roR, rn,oR"))] + "" + "*{ + unsigned int pos = INTVAL (operands[2]), + siz = INTVAL (operands[1]), + mask = (1 << (pos + siz)) - (1 << pos); + + switch (which_alternative) + { + case 0: + return \"setb\\t%0,%b1\"; + + case 1: + return \"clrb\\t%0,%b1\"; + + case 2: + operands[3] = gen_int_mode (mask & 0xff, QImode); + return AS2 (mov, w, %3) CR_TAB + AS2 (or, %0, w); + + case 3: + operands[3] = gen_int_mode (0xff & ~mask, QImode); + return AS2 (mov, w, %3) CR_TAB + AS2 (and, %0, w); + + case 4: + return AS2 (clrb, %0,%b2) CR_TAB + AS2 (snb, %3, 0) CR_TAB + AS2 (setb, %0, %b2); + + case 5: + case 6: + { + static char buff[256]; + char *p = buff; + + /* Clear the destination field */ + + p += sprintf (buff, \"mov\\tw,#$%2.2x\;and\\t%%0,w\;\", + 0xff & ~mask); + + if (CONSTANT_P (operands[3])) + /* Constant can just be or-ed in. */ + { + p += sprintf (p, \"mov\\tw,#$%2.2x\;or\\t%%0,w\", + (INTVAL (operands[3]) << pos) & mask & 0xff); + return buff; + } + + p += sprintf (p, \"mov\\tw,%%3\;\"); /* Value to deposit */ + + /* Shift and mask the value before OR-ing into the destination. */ + + if (pos != 0) + p += sprintf (p, \"mulu\\tw,#%d\;\", 1<) CR_TAB + AS1 (incsnz, 2(SP)) CR_TAB + AS1 (inc, 1(SP)); + + case 1: + return AS2 (mov, w, %H1) CR_TAB + AS1 (push, %L1) CR_TAB + AS1 (push, wreg) CR_TAB + AS1 (incsnz, 2(SP)) CR_TAB + AS1 (inc, 1(SP)); + + case 2: + return AS1 (push, %L1%<) CR_TAB + AS1 (push, %H1%>) CR_TAB + AS2 (mov, w, #-1) CR_TAB + AS2 (add, 2(SP), w) CR_TAB + AS2 (addc, 1(SP), w); + + case 3: + OUT_AS2 (mov, w, %L2); + OUT_AS2 (add, %L1, w); + OUT_AS1 (push, %L1); + OUT_AS1 (push, %H1); + if (!find_regno_note (insn, REG_DEAD, REGNO (operands[1]))) + OUT_AS2 (sub, %L1, w); + return \"\"; + + case 4: + case 5: + return AS2 (mov, w, %L2) CR_TAB + AS2 (add, w, %L1) CR_TAB + AS1 (push, wreg%<) CR_TAB + AS2 (mov, w, %H2) CR_TAB + AS2 (addc, w, %H1) CR_TAB + AS1 (push, wreg%>); + + case 6: + return AS2 (mov, w, %H1) CR_TAB + AS1 (push, %L1) CR_TAB + AS1 (push, wreg) CR_TAB + AS2 (mov, w, %L2) CR_TAB + AS2 (add, 2(SP), w) CR_TAB + AS2 (mov, w, %H2) CR_TAB + AS2 (addc, 1(SP), w); + + case 7: + { + operands[3] = GEN_INT (INTVAL (operands[2]) + 2); + return AS1 (push, %L3) CR_TAB + AS1 (push, %H3) CR_TAB + AS2 (mov, w, %L1) CR_TAB + AS2 (add, 2(SP), w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (addc, 1(SP), w); + } + default: + abort (); + } + }" + [(set_attr "clobberw" "no,yes,yes,yes,yes,yes,yes,yes")]) + + (define_insn "*push_addhi3_zero_ext" ; 0 1 2 3 + [(set (match_operand:HI 0 "push_operand" "=<, <, <, <") + (plus:HI + (zero_extend:HI + (match_operand:QI 1 "general_operand" "%roRi,roRi,roRi,rSi")) + (match_operand:HI 2 "general_operand" "N, P, rSi,roi")))] + "" + "@ + inc\\tw,%L2\;push\\twreg\;push\\t#0\;rl\\t1(SP) + mov\\tw,%L2\;add\\tw,%1\;push\\twreg\;push\\t#0\;rl\\t1(SP) + mov\\tw,%L2\;add\\tw,%1\;push\\twreg%<\;mov\\tw,%H2\;addc\\tw,$ff\;push\\twreg%> + mov\\tw,%L2\;add\\tw,%1\;push\\twreg%<\;mov\\tw,%H2\;addc\\tw,$ff\;push\\twreg%>") + + (define_insn "*addhi3_imm_zero_ext_w" + [(set + (match_operand:HI 0 "nonimmediate_operand" "=rS,o,a,b,a,a,rS,o,rS,o") + (plus:HI (zero_extend:HI (reg:QI 10)) + (match_operand 1 "immediate_operand" "O,O,M,i,P,I, P,P, i,i")))] + "" + "@ + mov\\t%L0,w\;clr\\t%H0 + mov\\t%L0,w\;clr\\t%H0 + mov\\t%L0,w\;clr\\t%H0\;dec\\t%L0 + loadh\\t%x1\;loadl\\t%x1\;add\\t%L0,w + mov\\t%L0,w\;clr\\t%H0\;mov\\tw,%1\;add\\t%L0,w + mov\\t%L0,w\;clr\\t%H0\;mov\\tw,#%n1\;sub\\t%L0,w + add\\tw,%L1\;mov\\t%L0,w\;clr\\t%H0\;rl\\t%H0 + add\\tw,%L1\;mov\\t%L0,w\;clr\\t%H0\;rl\\t%H0 + add\\tw,%L1\;mov\\t%L0,w\;clr\\t%H0\;mov\\tw,%H1\;addc\\t%H0,w + add\\tw,%L1\;mov\\t%L0,w\;clr\\t%H0\;mov\\tw,%H1\;addc\\t%H0,w") + + (define_insn_and_split "*addhi3_imm_zero_ext" + [(set + (match_operand:HI + 0 "nonimmediate_operand" "=rS, o, rS, o, a, b, a, a, rS, o, rS, o") + (plus:HI + (zero_extend:HI + (match_operand:QI + 1 "general_operand" "%roR,rS,roR,rS,roR,roR,roR,roR,roR,rS,roR,rS")) + (match_operand + 2 "immediate_operand" " O, O, N, N, M, i, P, I, P, P, i, i")))] + "" + "@ + # + # + clr\\t%H0\;incsnz\\tw,%1\;inc\\t%H0\;mov\\t%L0,w + clr\\t%H0\;incsnz\\tw,%1\;inc\\t%H0\;mov\\t%L0,w + # + # + # + # + # + # + # + #" + "(ip2k_reorg_split_qimode + && (GET_CODE (operands[1]) != CONST_INT + || INTVAL (operands[1]) != 1))" + [(set (reg:QI 10) + (match_dup 1)) + (set (match_dup 0) + (plus:HI (zero_extend:HI (reg:QI 10)) + (match_dup 2)))]) + + (define_insn "*addhi3_immediate" ; 0 1 2 3 4 5 6 7 8 9 a b c d e f + [(set (match_operand:HI 0 "nonimmediate_operand" "=a,do,a,do,a,a,a,do,&uo,&uS,bf,bf,bf,&uS,&uo, u") + (plus:HI (match_operand:HI 1 "general_operand" "%0, 0,0, 0,0,0,0, 0, rS, ro,uo,uo,uo, ro, rS,uo") + (match_operand 2 "immediate_operand" "N, N,M, M,P,I,i, i, N, N, M, P, I, i, i, i")))] + "" + "@ + inc\\t%L0 + incsnz\\t%L0\;inc\\t%H0 + dec\\t%L0 + mov\\tw,#-1\;add\\t%L0,w\;addc\\t%H0,w + mov\\tw,%2\;add\\t%L0,w + mov\\tw,#%n2\;sub\\t%L0,w + mov\\tw,%L2\;add\\t%L0,w\;mov\\tw,%H2\;add\\t%H0,w + mov\\tw,%L2\;add\\t%L0,w\;mov\\tw,%H2\;addc\\t%H0,w + mov\\tw,%H1\;mov\\t%H0,w\;incsnz\\tw,%L1\;inc\\t%H0\;mov\\t%L0,w + mov\\tw,%H1\;mov\\t%H0,w\;incsnz\\tw,%L1\;inc\\t%H0\;mov\\t%L0,w + mov\\tw,%H1\;push\\t%L1%<\;pop\\t%L0%>\;mov\\t%H0,w\;dec\\t%L0 + mov\\tw,%H1\;push\\t%L1%<\;pop\\t%L0%>\;mov\\t%H0,w\;mov\\tw,%2\;add\\t%L0,w + mov\\tw,%H1\;push\\t%L1%<\;pop\\t%L0%>\;mov\\t%H0,w\;mov\\tw,#%n2\;sub\\t%L0,w + mov\\tw,%L2\;add\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;add\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;add\\tw,%L1\;push\\twreg%<\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w\;pop\\t%L0%>" + [(set_attr "skip" "yes,no,yes,no,no,no,no,no,no,no,no,no,no,no,no,no") + (set_attr "clobberw" "no,no,no,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes")]) + + (define_insn "*addhi3_nonimmediate" ; 0 1 2 3 4 5 6 7 + [(set (match_operand:HI 0 "nonimmediate_operand" "=&bf,bf,&dS,&do,d,&rS,&rS, o") + (plus:HI (match_operand:HI 1 "general_operand" "%0, 0, 0, 0,0, ro, rS,rS") + (match_operand:HI 2 "nonimmediate_operand" "ro,uo, ro, rS,r, rS, ro,rS")))] + "" + "@ + mov\\tw,%L2\;add\\t%L0,w\;mov\\tw,%H2\;add\\t%H0,w + mov\\tw,%L2\;push\\t%H2%<\;add\\t%L0,w\;pop\\twreg%>\;add\\t%H0,w + mov\\tw,%L2\;add\\t%L0,w\;mov\\tw,%H2\;addc\\t%H0,w + mov\\tw,%L2\;add\\t%L0,w\;mov\\tw,%H2\;addc\\t%H0,w + mov\\tw,%L2\;push\\t%H2%<\;add\\t%L0,w\;pop\\twreg%>\;addc\\t%H0,w + mov\\tw,%L2\;add\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;add\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;add\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w") + + (define_insn "*addhi3_nonimm_zero_extend_w" + [(set (match_operand:HI 0 "nonimmediate_operand" "=a,ro,&ro,&rS,&rS, u") + (plus:HI + (zero_extend:HI (reg:QI 10)) + (match_operand:HI 1 "nonimmediate_operand" "0, 0, rS, rS, ro,uo")))] + "" + "@ + add\\t%L0,w + add\\t%L0,w\;clr\\twreg\;addc\\t%H0,w + add\\tw,%L1\;mov\\t%L0,w\;clr\\twreg\;addc\\tw,%H1\;mov\\t%H0,w + add\\tw,%L1\;mov\\t%L0,w\;clr\\twreg\;addc\\tw,%H1\;mov\\t%H0,w + add\\tw,%L1\;mov\\t%L0,w\;clr\\twreg\;addc\\tw,%H1\;mov\\t%H0,w + add\\tw,%L1\;push\\twreg%<\;clr\\twreg\;addc\\tw,%H1\;mov\\t%H0,w\;pop\\t%L0%>" + [(set_attr "skip" "yes,no,no,no,no,no") + (set_attr "clobberw" "no,yes,yes,yes,yes,yes")]) + + (define_insn_and_split "*addhi3_nonimm_zero_extend" + [(set (match_operand:HI 0 "nonimmediate_operand" "=a, ro,&ro,&rS,&rS, u") + (plus:HI + (zero_extend:HI + (match_operand:QI 1 "general_operand" "roR,roR, rS,roR, rS,rS")) + (match_operand:HI 2 "nonimmediate_operand" "0, 0, rS, rS, ro,uo")))] + "" + "#" + "(ip2k_reorg_split_qimode)" + [(set (reg:QI 10) + (match_dup 1)) + (set (match_dup 0) + (plus:HI (zero_extend:HI (reg:QI 10)) + (match_dup 2)))]) + + + ;; + ;; Add 32-bit integers. + ;; + + (define_expand "addsi3" + [(set (match_operand:SI 0 "nonimmediate_operand" "") + (plus:SI (match_operand:SI 1 "general_operand" "") + (match_operand:SI 2 "general_operand" "")))] + "" + "") + + (define_insn "*push_addsi3" + [(set (match_operand:SI 0 "push_operand" "=<,<, <") + (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%g,g, g") + (match_operand:SI 2 "general_operand" "N,M,rSi")))] + "" + "*{ + switch (which_alternative) { + case 0: + OUT_AS1 (push, %D1%<); + OUT_AS1 (push, %C1%<); + OUT_AS1 (push, %B1%<); + OUT_AS1 (push, %A1%>%>%>); + OUT_AS1 (incsnz, 4(SP)); + OUT_AS1 (incsz, 3(SP)); + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (incsnz, 2(SP)); + OUT_AS1 (inc, 1(SP)); + OUT_AS1 (1:,); + return \"\"; + + case 1: + OUT_AS1 (push, %D1%<); + OUT_AS1 (push, %C1%<); + OUT_AS1 (push, %B1%<); + OUT_AS1 (push, %A1%>%>%>); + OUT_AS2 (mov, w, #-1); + OUT_AS2 (add, 4(SP), w); + OUT_AS2 (addc, 3(SP), w); + OUT_AS2 (addc, 2(SP), w); + OUT_AS2 (addc, 1(SP), w); + return \"\"; + + case 2: + OUT_AS2 (mov, w, %D2); + OUT_AS2 (add, w, %D1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %C2); + OUT_AS2 (addc, w, %C1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %B2); + OUT_AS2 (addc, w, %B1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %A2); + OUT_AS2 (addc, w, %A1); + OUT_AS1 (push, wreg%>%>%>); + return \"\"; + + default: + abort(); + } + }" + [(set_attr "clobberw" "no,yes,yes")]) + + (define_insn "*addsi3" ; 0 1 2 3 4 5 6 + [(set + (match_operand:SI 0 "nonimmediate_operand" "=ro,ro, ro, rS,&ro,&rS,&rS") + (plus:SI + (match_operand:SI 1 "nonimmediate_operand" "%0, 0, 0, 0, rS, ro, rS") + (match_operand:SI 2 "general_operand" "N, M,rSi,roi,rSi,rSi,roi")))] + "" + "@ + incsnz\\t%D0\;incsz\\t%C0\;page\\t1f\;jmp\\t1f\;incsnz\\t%B0\;inc\\t%A0\;1: + mov\\tw,#-1\;add\\t%D0,w\;addc\\t%C0,w\;addc\\t%B0,w\;addc\\t%A0,w + mov\\tw,%D2\;add\\t%D0,w\;mov\\tw,%C2\;addc\\t%C0,w\;mov\\tw,%B2\;addc\\t%B0,w\;mov\\tw,%A2\;addc\\t%A0,w + mov\\tw,%D2\;add\\t%D0,w\;mov\\tw,%C2\;addc\\t%C0,w\;mov\\tw,%B2\;addc\\t%B0,w\;mov\\tw,%A2\;addc\\t%A0,w + mov\\tw,%D2\;add\\tw,%D1\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,%C1\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,%B1\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,%A1\;mov\\t%A0,w + mov\\tw,%D2\;add\\tw,%D1\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,%C1\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,%B1\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,%A1\;mov\\t%A0,w + mov\\tw,%D2\;add\\tw,%D1\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,%C1\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,%B1\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,%A1\;mov\\t%A0,w" + [(set_attr "clobberw" "no,yes,yes,yes,yes,yes,yes")]) + + (define_insn "*push_addsi3_zero_extendqi" ; 0 1 + [(set (match_operand:SI 0 "push_operand" "=<, <") + (plus:SI (zero_extend:SI + (match_operand:QI 1 "general_operand" "%roRi,rSi")) + (match_operand:SI 2 "general_operand" "rSi,roi")))] + "" + "@ + mov\\tw,%D2\;add\\tw,%1\;push\\twreg%<\;mov\\tw,%C2\;addc\\tw,$ff\;push\\twreg%<\;mov\\tw,%B2\;addc\\tw,$ff\;push\\twreg%<\;mov\\tw,%A2\;addc\\tw,$ff\;push\\twreg%>%>%> + mov\\tw,%D2\;add\\tw,%1\;push\\twreg%<\;mov\\tw,%C2\;addc\\tw,$ff\;push\\twreg%<\;mov\\tw,%B2\;addc\\tw,$ff\;push\\twreg%<\;mov\\tw,%A2\;addc\\tw,$ff\;push\\twreg%>%>%>") + + (define_insn "*addsi3_zero_extendqi" ; + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro, rS,&ro,&rS,&rS") + (plus:SI + (zero_extend:SI + (match_operand:QI 1 "nonimmediate_operand" "rS,roR, rS,roR, rS")) + (match_operand:SI 2 "general_operand" "0, 0,rSi,rSi,roi")))] + "" + "@ + mov\\tw,%1\;add\\t%D0,w\;clr\\twreg\;addc\\t%C0,w\;addc\\t%B0,w\;addc\\t%A0,w + mov\\tw,%1\;add\\t%D0,w\;clr\\twreg\;addc\\t%C0,w\;addc\\t%B0,w\;addc\\t%A0,w + mov\\tw,%1\;add\\tw,%D2\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,$ff\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,$ff\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,$ff\;mov\\t%A0,w + mov\\tw,%1\;add\\tw,%D2\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,$ff\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,$ff\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,$ff\;mov\\t%A0,w + mov\\tw,%1\;add\\tw,%D2\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,$ff\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,$ff\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,$ff\;mov\\t%A0,w") + + (define_insn "*push_addsi3_zero_extendhi" ; 0 1 + [(set (match_operand:SI 0 "push_operand" "=<, <") + (plus:SI (zero_extend:SI + (match_operand:HI 1 "nonimmediate_operand" "%roR,rSR")) + (match_operand:SI 2 "general_operand" "rSi,roi")))] + "" + "@ + mov\\tw,%D2\;add\\tw,%L1\;push\\twreg%<\;mov\\tw,%C2\;addc\\tw,%H1\;push\\twreg%<\;mov\\tw,%B2\;addc\\tw,$ff\;push\\twreg%<\;mov\\tw,%A2\;addc\\tw,$ff\;push\\twreg%>%>%> + mov\\tw,%D2\;add\\tw,%L1\;push\\twreg%<\;mov\\tw,%C2\;addc\\tw,%H1\;push\\twreg%<\;mov\\tw,%B2\;addc\\tw,$ff\;push\\twreg%<\;mov\\tw,%A2\;addc\\tw,$ff\;push\\twreg%>%>%>") + + (define_insn "*addsi3_zero_extendhi" ; + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro,rS,&ro,&rS,&rS") + (plus:SI + (zero_extend:SI + (match_operand:HI 1 "nonimmediate_operand" "rS,ro, rS, ro, rS")) + (match_operand:SI 2 "general_operand" "0, 0,rSi,rSi,roi")))] + "" + "@ + mov\\tw,%L1\;add\\t%D0,w\;mov\\tw,%H1\;addc\\t%C0,w\;clr\\twreg\;addc\\t%B0,w\;addc\\t%A0,w + mov\\tw,%L1\;add\\t%D0,w\;mov\\tw,%H1\;addc\\t%C0,w\;clr\\twreg\;addc\\t%B0,w\;addc\\t%A0,w + mov\\tw,%L1\;add\\tw,%D2\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,%H1\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,$ff\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,$ff\;mov\\t%A0,w + mov\\tw,%L1\;add\\tw,%D2\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,%H1\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,$ff\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,$ff\;mov\\t%A0,w + mov\\tw,%L1\;add\\tw,%D2\;mov\\t%D0,w\;mov\\tw,%C2\;addc\\tw,%H1\;mov\\t%C0,w\;mov\\tw,%B2\;addc\\tw,$ff\;mov\\t%B0,w\;mov\\tw,%A2\;addc\\tw,$ff\;mov\\t%A0,w") + + ;; + ;; Add 64-bit integers. + ;; + + (define_expand "adddi3" + [(set (match_operand:DI 0 "nonimmediate_operand" "") + (plus:DI (match_operand:DI 1 "general_operand" "") + (match_operand:DI 2 "general_operand" "")))] + "" + "") + + (define_insn "*push_adddi3" + [(set (match_operand:DI 0 "push_operand" "=<,<, <") + (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%g,g, g") + (match_operand:DI 2 "general_operand" "N,M,rSi")))] + "" + "*{ + switch (which_alternative) + { + case 0: + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%>%>%>%>%>%>%>); + OUT_AS1 (incsnz, 8(SP)); + OUT_AS1 (incsz, 7(SP)); + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (incsnz, 6(SP)); + OUT_AS1 (incsz, 5(SP)); + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (incsnz, 4(SP)); + OUT_AS1 (incsz, 3(SP)); + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (incsnz, 2(SP)); + OUT_AS1 (inc, 1(SP)); + OUT_AS1 (1:,); + return \"\"; + + case 1: + OUT_AS1 (push, %Z1%<); + OUT_AS1 (push, %Y1%<); + OUT_AS1 (push, %X1%<); + OUT_AS1 (push, %W1%<); + OUT_AS1 (push, %V1%<); + OUT_AS1 (push, %U1%<); + OUT_AS1 (push, %T1%<); + OUT_AS1 (push, %S1%>%>%>%>%>%>%>); + OUT_AS2 (mov, w, #-1); + OUT_AS2 (add, 8(SP), w); + OUT_AS2 (addc, 7(SP), w); + OUT_AS2 (addc, 6(SP), w); + OUT_AS2 (addc, 5(SP), w); + OUT_AS2 (addc, 4(SP), w); + OUT_AS2 (addc, 3(SP), w); + OUT_AS2 (addc, 2(SP), w); + OUT_AS2 (addc, 1(SP), w); + return \"\"; + + case 2: + OUT_AS2 (mov, w, %Z2); + OUT_AS2 (add, w, %Z1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %Y2); + OUT_AS2 (addc, w, %Y1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %X2); + OUT_AS2 (addc, w, %X1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %W2); + OUT_AS2 (addc, w, %W1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %V2); + OUT_AS2 (addc, w, %V1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %U2); + OUT_AS2 (addc, w, %U1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %T2); + OUT_AS2 (addc, w, %T1); + OUT_AS1 (push, wreg%<); + OUT_AS2 (mov, w, %S2); + OUT_AS2 (addc, w, %S1); + OUT_AS1 (push, wreg%>%>%>%>%>%>%>); + return \"\"; + + default: + abort(); + } + }" + [(set_attr "clobberw" "no,yes,yes")]) + + (define_insn "*adddi3" ; 0 1 2 3 4 5 6 + [(set + (match_operand:DI 0 "nonimmediate_operand" "=ro,ro, ro, rS,&ro,&rS,&rS") + (plus:DI + (match_operand:DI 1 "nonimmediate_operand" "%0, 0, 0, 0, rS, ro, rS") + (match_operand:DI 2 "general_operand" "N, M,rSi,roi,rSi,rSi,roi")))] + "" + "*{ + switch (which_alternative) + { + case 0: + OUT_AS1 (incsnz, %Z0); + OUT_AS1 (incsz, %Y0); + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (incsnz, %X0); + OUT_AS1 (incsz, %W0); + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (incsnz, %V0); + OUT_AS1 (incsz, %U0); + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + OUT_AS1 (incsnz, %T0); + OUT_AS1 (inc, %S0); + OUT_AS1 (1:, ); + return \"\"; + + case 1: + OUT_AS2 (mov, w, #-1); + OUT_AS2 (add, %Z0, w); + OUT_AS2 (addc, %Y0, w); + OUT_AS2 (addc, %X0, w); + OUT_AS2 (addc, %W0, w); + OUT_AS2 (addc, %V0, w); + OUT_AS2 (addc, %U0, w); + OUT_AS2 (addc, %T0, w); + OUT_AS2 (addc, %S0, w); + return \"\"; + + case 2: + case 3: + OUT_AS2 (mov, w, %Z2); + OUT_AS2 (add, %Z0, w); + OUT_AS2 (mov, w, %Y2); + OUT_AS2 (addc, %Y0, w); + OUT_AS2 (mov, w, %X2); + OUT_AS2 (addc, %X0, w); + OUT_AS2 (mov, w, %W2); + OUT_AS2 (addc, %W0, w); + OUT_AS2 (mov, w, %V2); + OUT_AS2 (addc, %V0, w); + OUT_AS2 (mov, w, %U2); + OUT_AS2 (addc, %U0, w); + OUT_AS2 (mov, w, %T2); + OUT_AS2 (addc, %T0, w); + OUT_AS2 (mov, w, %S2); + OUT_AS2 (addc, %S0, w); + return \"\"; + + case 4: + case 5: + case 6: + OUT_AS2 (mov, w, %Z2); + OUT_AS2 (add, w, %Z1); + OUT_AS2 (mov, %Z0, w); + OUT_AS2 (mov, w, %Y2); + OUT_AS2 (addc, w, %Y1); + OUT_AS2 (mov, %Y0, w); + OUT_AS2 (mov, w, %X2); + OUT_AS2 (addc, w, %X1); + OUT_AS2 (mov, %X0, w); + OUT_AS2 (mov, w, %W2); + OUT_AS2 (addc, w, %W1); + OUT_AS2 (mov, %W0, w); + OUT_AS2 (mov, w, %V2); + OUT_AS2 (addc, w, %V1); + OUT_AS2 (mov, %V0, w); + OUT_AS2 (mov, w, %U2); + OUT_AS2 (addc, w, %U1); + OUT_AS2 (mov, %U0, w); + OUT_AS2 (mov, w, %T2); + OUT_AS2 (addc, w, %T1); + OUT_AS2 (mov, %T0, w); + OUT_AS2 (mov, w, %S2); + OUT_AS2 (addc, w, %S1); + OUT_AS2 (mov, %S0, w); + return \"\"; + + default: + abort(); + } + }" + [(set_attr "clobberw" "no,yes,yes,yes,yes,yes,yes")]) + + (define_insn "*adddi3_zero_extendqi" ; 0 1 2 3 4 + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro, rS,&ro,&rS,&rS") + (plus:DI + (zero_extend:DI + (match_operand:QI 1 "nonimmediate_operand" "rS,roR, rS,roR, rS")) + (match_operand:DI 2 "general_operand" "0, 0,rSi,rSi,roi")))] + "" + "*{ + switch (which_alternative) + { + case 0: + case 1: + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, %Z0, w); + OUT_AS1 (clr, wreg); + OUT_AS2 (addc, %Y0, w); + OUT_AS2 (addc, %X0, w); + OUT_AS2 (addc, %W0, w); + OUT_AS2 (addc, %V0, w); + OUT_AS2 (addc, %U0, w); + OUT_AS2 (addc, %T0, w); + OUT_AS2 (addc, %S0, w); + return \"\"; + + case 2: + case 3: + case 4: + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, w, %Z2); + OUT_AS2 (mov, %Z0, w); + OUT_AS2 (mov, w, %Y2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %Y0, w); + OUT_AS2 (mov, w, %X2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %X0, w); + OUT_AS2 (mov, w, %W2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %W0, w); + OUT_AS2 (mov, w, %V2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %V0, w); + OUT_AS2 (mov, w, %U2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %U0, w); + OUT_AS2 (mov, w, %T2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %T0, w); + OUT_AS2 (mov, w, %S2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %S0, w); + return \"\"; + + default: + abort(); + } + }") + + (define_insn "*adddi3_zero_extendhi" ; 0 1 2 3 4 + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,rS,&ro,&rS,&rS") + (plus:DI + (zero_extend:DI + (match_operand:HI 1 "nonimmediate_operand" "rS,ro, rS, ro, rS")) + (match_operand:DI 2 "general_operand" "0, 0,rSi,rSi,roi")))] + "" + "*{ + switch (which_alternative) + { + case 0: + case 1: + OUT_AS2 (mov, w, %L1); + OUT_AS2 (add, %Z0, w); + OUT_AS2 (mov, w, %H1); + OUT_AS2 (addc, %Y0, w); + OUT_AS1 (clr, wreg); + OUT_AS2 (addc, %X0, w); + OUT_AS2 (addc, %W0, w); + OUT_AS2 (addc, %V0, w); + OUT_AS2 (addc, %U0, w); + OUT_AS2 (addc, %T0, w); + OUT_AS2 (addc, %S0, w); + return \"\"; + + case 2: + case 3: + case 4: + OUT_AS2 (mov, w, %L1); + OUT_AS2 (add, w, %Z2); + OUT_AS2 (mov, %Z0, w); + OUT_AS2 (mov, w, %Y2); + OUT_AS2 (addc, w, %H1); + OUT_AS2 (mov, %Y0, w); + OUT_AS2 (mov, w, %X2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %X0, w); + OUT_AS2 (mov, w, %W2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %W0, w); + OUT_AS2 (mov, w, %V2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %V0, w); + OUT_AS2 (mov, w, %U2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %U0, w); + OUT_AS2 (mov, w, %T2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %T0, w); + OUT_AS2 (mov, w, %S2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %S0, w); + return \"\"; + + default: + abort(); + } + }") + + (define_insn "*adddi3_zero_extendsi" ; 0 1 2 3 4 + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,rS,&ro,&rS,&rS") + (plus:DI + (zero_extend:DI + (match_operand:SI 1 "nonimmediate_operand" "rS,ro, rS, ro, rS")) + (match_operand:DI 2 "general_operand" "0, 0,rSi,rSi,roi")))] + "" + "*{ + switch (which_alternative) + { + case 0: + case 1: + OUT_AS2 (mov, w, %D1); + OUT_AS2 (add, %Z0, w); + OUT_AS2 (mov, w, %C1); + OUT_AS2 (addc, %Y0, w); + OUT_AS2 (mov, w, %B1); + OUT_AS2 (addc, %X0, w); + OUT_AS2 (mov, w, %A1); + OUT_AS2 (addc, %W0, w); + OUT_AS1 (clr, wreg); + OUT_AS2 (addc, %V0, w); + OUT_AS2 (addc, %U0, w); + OUT_AS2 (addc, %T0, w); + OUT_AS2 (addc, %S0, w); + return \"\"; + + case 2: + case 3: + case 4: + OUT_AS2 (mov, w, %D1); + OUT_AS2 (add, w, %Z2); + OUT_AS2 (mov, %Z0, w); + OUT_AS2 (mov, w, %Y2); + OUT_AS2 (addc, w, %C1); + OUT_AS2 (mov, %Y0, w); + OUT_AS2 (mov, w, %X2); + OUT_AS2 (addc, w, %B1); + OUT_AS2 (mov, %X0, w); + OUT_AS2 (mov, w, %W2); + OUT_AS2 (addc, w, %A1); + OUT_AS2 (mov, %W0, w); + OUT_AS2 (mov, w, %V2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %V0, w); + OUT_AS2 (mov, w, %U2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %U0, w); + OUT_AS2 (mov, w, %T2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %T0, w); + OUT_AS2 (mov, w, %S2); + OUT_AS2 (addc, w, $ff); + OUT_AS2 (mov, %S0, w); + return \"\"; + + default: + abort(); + } + }") + + ;; + ;; Subtract bytes. + ;; + + (define_expand "subqi3" + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (minus:QI (match_operand:QI 1 "general_operand" "") + (match_operand:QI 2 "general_operand" "")))] + "" + "if (GET_CODE (operands[2]) == CONST_INT) + { + emit_insn (gen_addqi3 (operands[0], operands[1], + gen_int_mode (-INTVAL (operands[2]), QImode))); + DONE; + } + ") + + (define_insn "*push_subqi3" + [(set (match_operand:QI 0 "push_operand" "=<, <") + (minus:QI (match_operand:QI 1 "general_operand" "g,rSn") + (match_operand:QI 2 "general_operand" "rSn, g")))] + "" + "@ + push\\t%1%<\;mov\\tw,%2\;sub\\t1(SP),w%> + push\\t%1%<\;mov\\tw,%2\;sub\\t1(SP),w%>") + + (define_insn "*subqi3_w" + [(set (reg:QI 10) + (minus:QI (match_operand:QI 0 "general_operand" "rS,rSi, g,rSi") + (match_operand:QI 1 "general_operand" "rSi, rS,rSi, g")))] + "(ip2k_reorg_split_qimode)" + "@ + mov\\tw,%1\;sub\\tw,%0 + mov\\tw,%1\;sub\\tw,%0 + mov\\tw,%1\;sub\\tw,%0 + mov\\tw,%1\;sub\\tw,%0") + + (define_insn_and_split "*subqi3" + [(set + (match_operand:QI + 0 "nonimmediate_operand" "=k,k,z,z,djyoR,djyoR,djyS,djyoR, g, g, rS, rS") + (minus:QI + (match_operand:QI + 1 "general_operand" "0,0,0,0, 0, 0, 0, 0, rS,rSi, g,rSi") + (match_operand:QI + 2 "general_operand" "M,g,M,g, M, N, g, rSi,rSi, rS,rSi, g")))] + "" + "@ + incsnz\\t%0\;dec\\tiph + mov\\tw,%2\;sub\\t%0,w + incsnz\\t%0\;dec\\tdph + mov\\tw,%2\;sub\\t%0,w + inc\\t%0 + dec\\t%0 + mov\\tw,%2\;sub\\t%0,w + mov\\tw,%2\;sub\\t%0,w + # + # + # + #" + "(ip2k_reorg_split_qimode + && ! rtx_equal_p (operands[0], operands[1]))" + [(set (reg:QI 10) + (minus:QI (match_dup 1) + (match_dup 2))) + (set (match_dup 0) + (reg:QI 10))] + "" + [(set_attr "skip" "no,no,no,no,yes,yes,no,no,no,no,no,no") + (set_attr "clobberw" "no,yes,no,yes,no,no,yes,yes,yes,yes,yes,yes")]) + + ;; + ;; Subtract 16-bit integers. + ;; + + (define_expand "subhi3" + [(set (match_operand:HI 0 "nonimmediate_operand" "") + (minus:HI (match_operand:HI 1 "general_operand" "") + (match_operand:HI 2 "general_operand" "")))] + "" + "if (GET_CODE (operands[2]) == CONST_INT) + { + emit_insn (gen_addhi3 (operands[0], operands[1], + gen_int_mode (-INTVAL (operands[2]), HImode))); + DONE; + } + ") + + (define_insn "*push_subhi3" + [(set (match_operand:HI 0 "push_operand" "=<, <") + (minus:HI (match_operand:HI 1 "general_operand" "ron,rSn") + (match_operand:HI 2 "general_operand" "rSn,ron")))] + "" + "@ + push\\t%L1%<\;mov\\tw,%L2\;sub\\t1(SP),w\;push\\t%H1%<\;mov\\tw,%H2\;subc\\t1(SP),w%>%> + push\\t%L1%<\;mov\\tw,%L2\;sub\\t1(SP),w\;push\\t%H1%<\;mov\\tw,%H2\;subc\\t1(SP),w%>%>") + + (define_insn "*subhi3_imm" + [(set + (match_operand:HI 0 "nonimmediate_operand" "=a,a,a,a,do,&r,&ro,&rS") + (minus:HI (match_operand:HI 1 "general_operand" "0,0,0,0, 0,ro, rS, ro") + (match_operand 2 "immediate_operand" "N,M,P,i, i, O, i, i")))] + "" + "@ + dec\\t%L0 + inc\\t%L0 + mov\\tw,%2\;sub\\t%L0,w + mov\\tw,%L2\;sub\\t%L0,w\;mov\\tw,%H2\;sub\\t%H0,w + mov\\tw,%L2\;sub\\t%L0,w\;mov\\tw,%H2\;subc\\t%H0,w + mov\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;subc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;subc\\tw,%H1\;mov\\t%H0,w" + [(set_attr "skip" "yes,yes,no,no,no,no,no,no") + (set_attr "clobberw" "no,no,yes,yes,yes,yes,yes,yes")]) + + (define_insn "*subhi3_ximm_zero_extend" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro, rS") + (minus:HI (match_operand:HI 1 "immediate_operand" "i, i") + (zero_extend:HI + (match_operand:QI 2 "nonimmediate_operand" "rS,roR"))))] + "" + "@ + mov\\tw,%2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H1\;mov\\t%H0,w\;clr\\twreg\;subc\\t%H0,w + mov\\tw,%2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H1\;mov\\t%H0,w\;clr\\twreg\;subc\\t%H0,w") + + (define_insn "*subhi3_ximm" + [(set (match_operand:HI 0 "nonimmediate_operand" "=&uo,&ro,&rS") + (minus:HI (match_operand:HI 1 "immediate_operand" "i, i, i") + (match_operand:HI 2 "nonimmediate_operand" "0, rS, ro")))] + "" + "@ + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;push\\t%H2%<\;mov\\tw,%H1\;mov\\t%H0,w\;pop\\twreg%>\;subc\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H1\;mov\\t%H0,w\;mov\\tw,%H2\;subc\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H1\;mov\\t%H0,w\;mov\\tw,%H2\;subc\\t%H0,w") + + (define_insn "*subhi3_nonimm_zero_extend" + [(set + (match_operand:HI 0 "nonimmediate_operand" "=a,ro, rS,&ro,&rS,&rS") + (minus:HI + (match_operand:HI 1 "nonimmediate_operand" "0, 0, 0, rS, ro, rS") + (zero_extend:HI + (match_operand:QI 2 "general_operand" "roR,rS,roR, rS, rS,roR"))))] + "" + "@ + mov\\tw,%2\;sub\\t%L0,w + mov\\tw,%2\;sub\\t%L0,w\;clr\\twreg\;subc\\t%H0,w + mov\\tw,%2\;sub\\t%L0,w\;clr\\twreg\;subc\\t%H0,w + mov\\tw,%2\;sub\\tw,%L1\;mov\\t%L0,w\;clr\\twreg\;subc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%2\;sub\\tw,%L1\;mov\\t%L0,w\;clr\\twreg\;subc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%2\;sub\\tw,%L1\;mov\\t%L0,w\;clr\\twreg\;subc\\tw,%H1\;mov\\t%H0,w") + + (define_insn "*subhi3_nonimm" ; 0 1 2 3 4 5 6 + [(set + (match_operand:HI 0 "nonimmediate_operand" "=a,dS, o,&rS,&rS,&rS, o") + (minus:HI + (match_operand:HI 1 "nonimmediate_operand" "0, 0, 0, ro, ro, rS,rS") + (match_operand:HI 2 "nonimmediate_operand" "ro,ro,rS, 0, rS, ro,rS")))] + "" + "@ + mov\\tw,%L2\;sub\\t%L0,w\;mov\\tw,%H2\;sub\\t%H0,w + mov\\tw,%L2\;sub\\t%L0,w\;mov\\tw,%H2\;subc\\t%H0,w + mov\\tw,%L2\;sub\\t%L0,w\;mov\\tw,%H2\;subc\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;subc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;subc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;subc\\tw,%H1\;mov\\t%H0,w + mov\\tw,%L2\;sub\\tw,%L1\;mov\\t%L0,w\;mov\\tw,%H2\;subc\\tw,%H1\;mov\\t%H0,w") + + ;; + ;; Subtract 32-bit integers. + ;; + + (define_insn "subsi3" ; 0 1 2 3 4 5 6 7 8 9 a b + [(set + (match_operand:SI + 0 "nonimmediate_operand" "=ro,ro, ro, rS,&ro,&rS,&ro,&rS,&rS,&ro,&ro,&rS") + (minus:SI + (match_operand:SI + 1 "general_operand" "0, 0, 0, 0, i, ro, rS, rS, ro, rS, i, i") + (match_operand:SI + 2 "general_operand" "M, N,rSi,roi, 0, 0, 0,roi,rSi,rSi, rS, ro")))] + "" + "*{ + switch (which_alternative) { + case 0: + return AS2 (mov, w, #1) CR_TAB + AS2 (add, %D0, w) CR_TAB + AS1 (clr, wreg) CR_TAB + AS2 (addc, %C0, w) CR_TAB + AS2 (addc, %B0, w) CR_TAB + AS2 (addc, %A0, w); + + case 1: + return AS2 (mov, w, #-1) CR_TAB + AS2 (sub, %D0, w) CR_TAB + AS2 (subc, %C0, w) CR_TAB + AS2 (subc, %B0, w) CR_TAB + AS2 (subc, %A0, w); + + case 2: + case 3: + return AS2 (mov, w, %D2) CR_TAB + AS2 (sub, %D0, w) CR_TAB + AS2 (mov, w, %C2) CR_TAB + AS2 (subc, %C0, w) CR_TAB + AS2 (mov, w, %B2) CR_TAB + AS2 (subc, %B0, w) CR_TAB + AS2 (mov, w, %A2) CR_TAB + AS2 (subc, %A0, w); + + case 4: + return AS2 (mov, w, %D2) CR_TAB + AS2 (sub, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (push, %C2%<) CR_TAB + AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %C0, w) CR_TAB + AS1 (push, %B2%<) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %B0, w) CR_TAB + AS1 (push, %A2%<) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %A0, w); + + case 5: + case 6: + case 7: + case 8: + case 9: + return AS2 (mov, w, %D2) CR_TAB + AS2 (sub, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %C2) CR_TAB + AS2 (subc, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %B2) CR_TAB + AS2 (subc, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, w, %A2) CR_TAB + AS2 (subc, w, %A1) CR_TAB + AS2 (mov, %A0, w); + + case 10: + case 11: + return AS2 (mov, w, %D2) CR_TAB + AS2 (sub, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %C2) CR_TAB + AS2 (subc, %C0, w) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, w, %B2) CR_TAB + AS2 (subc, %B0, w) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %A2) CR_TAB + AS2 (subc, %A0, w); + default: + abort (); + } + }") + + ;; + ;; Subtract 64-bit integers. + ;; + + (define_insn "subdi3" ; 0 1 2 3 4 5 6 7 8 9 a b + [(set + (match_operand:DI + 0 "nonimmediate_operand" "=ro,ro, ro, rS,ro,&rS,&ro,&rS,&rS,&ro,&ro,&rS") + (minus:DI + (match_operand:DI + 1 "general_operand" "0, 0, 0, 0, i, ro, rS, rS, ro, rS, i, i") + (match_operand:DI + 2 "general_operand" "M, N,rSi,roi, 0, 0, 0,roi,rSi,rSi, rS, ro")))] + "" + "*{ + switch (which_alternative) { + case 0: + return AS2 (mov, w, #1) CR_TAB + AS2 (add, %Z0, w) CR_TAB + AS1 (clr, wreg) CR_TAB + AS2 (addc, %Y0, w) CR_TAB + AS2 (addc, %X0, w) CR_TAB + AS2 (addc, %W0, w) CR_TAB + AS2 (addc, %V0, w) CR_TAB + AS2 (addc, %U0, w) CR_TAB + AS2 (addc, %T0, w) CR_TAB + AS2 (addc, %S0, w); + + case 1: + return AS2 (mov, w, #-1) CR_TAB + AS2 (sub, %Z0, w) CR_TAB + AS2 (subc, %Y0, w) CR_TAB + AS2 (subc, %X0, w) CR_TAB + AS2 (subc, %W0, w) CR_TAB + AS2 (subc, %V0, w) CR_TAB + AS2 (subc, %U0, w) CR_TAB + AS2 (subc, %T0, w) CR_TAB + AS2 (subc, %S0, w); + + case 2: + case 3: + return AS2 (mov, w, %Z2) CR_TAB + AS2 (sub, %Z0, w) CR_TAB + AS2 (mov, w, %Y2) CR_TAB + AS2 (subc, %Y0, w) CR_TAB + AS2 (mov, w, %X2) CR_TAB + AS2 (subc, %X0, w) CR_TAB + AS2 (mov, w, %W2) CR_TAB + AS2 (subc, %W0, w) CR_TAB + AS2 (mov, w, %V2) CR_TAB + AS2 (subc, %V0, w) CR_TAB + AS2 (mov, w, %U2) CR_TAB + AS2 (subc, %U0, w) CR_TAB + AS2 (mov, w, %T2) CR_TAB + AS2 (subc, %T0, w) CR_TAB + AS2 (mov, w, %S2) CR_TAB + AS2 (subc, %S0, w); + + case 4: + return AS2 (mov, w, %Z2) CR_TAB + AS2 (sub, w, %Z1) CR_TAB + AS2 (mov, %Z0, w) CR_TAB + AS1 (push, %Y2%<) CR_TAB + AS2 (mov, w, %Y1) CR_TAB + AS2 (mov, %Y0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %Y0, w) CR_TAB + AS1 (push, %X2%<) CR_TAB + AS2 (mov, w, %X1) CR_TAB + AS2 (mov, %X0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %X0, w) CR_TAB + AS1 (push, %W2%<) CR_TAB + AS2 (mov, w, %W1) CR_TAB + AS2 (mov, %W0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %W0, w) CR_TAB + AS1 (push, %V2%<) CR_TAB + AS2 (mov, w, %V1) CR_TAB + AS2 (mov, %V0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %V0, w) CR_TAB + AS1 (push, %U2%<) CR_TAB + AS2 (mov, w, %U1) CR_TAB + AS2 (mov, %U0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %U0, w) CR_TAB + AS1 (push, %T2%<) CR_TAB + AS2 (mov, w, %T1) CR_TAB + AS2 (mov, %T0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %T0, w) CR_TAB + AS1 (push, %S2%<) CR_TAB + AS2 (mov, w, %S1) CR_TAB + AS2 (mov, %S0, w) CR_TAB + AS1 (pop, wreg%>) CR_TAB + AS2 (subc, %S0, w); + + case 5: + case 6: + case 7: + case 8: + case 9: + return AS2 (mov, w, %Z2) CR_TAB + AS2 (sub, w, %Z1) CR_TAB + AS2 (mov, %Z0, w) CR_TAB + AS2 (mov, w, %Y2) CR_TAB + AS2 (subc, w, %Y1) CR_TAB + AS2 (mov, %Y0, w) CR_TAB + AS2 (mov, w, %X2) CR_TAB + AS2 (subc, w, %X1) CR_TAB + AS2 (mov, %X0, w) CR_TAB + AS2 (mov, w, %W2) CR_TAB + AS2 (subc, w, %W1) CR_TAB + AS2 (mov, %W0, w) CR_TAB + AS2 (mov, w, %V2) CR_TAB + AS2 (subc, w, %V1) CR_TAB + AS2 (mov, %V0, w) CR_TAB + AS2 (mov, w, %U2) CR_TAB + AS2 (subc, w, %U1) CR_TAB + AS2 (mov, %U0, w) CR_TAB + AS2 (mov, w, %T2) CR_TAB + AS2 (subc, w, %T1) CR_TAB + AS2 (mov, %T0, w) CR_TAB + AS2 (mov, w, %S2) CR_TAB + AS2 (subc, w, %S1) CR_TAB + AS2 (mov, %S0, w); + + case 10: + case 11: + return AS2 (mov, w, %Z2) CR_TAB + AS2 (sub, w, %Z1) CR_TAB + AS2 (mov, %Z0, w) CR_TAB + AS2 (mov, w, %Y1) CR_TAB + AS2 (mov, %Y0, w) CR_TAB + AS2 (mov, w, %Y2) CR_TAB + AS2 (subc, %Y0, w) CR_TAB + AS2 (mov, w, %X1) CR_TAB + AS2 (mov, %X0, w) CR_TAB + AS2 (mov, w, %X2) CR_TAB + AS2 (subc, %X0, w) CR_TAB + AS2 (mov, w, %W1) CR_TAB + AS2 (mov, %W0, w) CR_TAB + AS2 (mov, w, %W2) CR_TAB + AS2 (subc, %W0, w) CR_TAB + AS2 (mov, w, %V1) CR_TAB + AS2 (mov, %V0, w) CR_TAB + AS2 (mov, w, %V2) CR_TAB + AS2 (subc, %V0, w) CR_TAB + AS2 (mov, w, %U1) CR_TAB + AS2 (mov, %U0, w) CR_TAB + AS2 (mov, w, %U2) CR_TAB + AS2 (subc, %U0, w) CR_TAB + AS2 (mov, w, %T1) CR_TAB + AS2 (mov, %T0, w) CR_TAB + AS2 (mov, w, %T2) CR_TAB + AS2 (subc, %T0, w) CR_TAB + AS2 (mov, w, %S1) CR_TAB + AS2 (mov, %S0, w) CR_TAB + AS2 (mov, w, %S2) CR_TAB + AS2 (subc, %S0, w); + default: + abort (); + } + }") + + ;; + ;; Bitwise and instructions. + ;; + + (define_expand "andqi3" + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (and:QI (match_operand:QI 1 "nonimmediate_operand" "") + (match_operand:QI 2 "general_operand" "")))] + "" + "") + + (define_insn "*andqi3_bit" + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR") + (and:QI (match_dup 0) + (match_operand:QI 1 "const_int_operand" "n")))] + "(find_one_clear_bit_p (INTVAL (operands[1]) | 0xffffff00UL) != -1)" + "*{ + operands[2] = GEN_INT (find_one_clear_bit_p (INTVAL (operands[1]) + | 0xffffff00UL)); + return AS2 (clrb, %0, %b2); + }" + [(set_attr "skip" "yes") + (set_attr "clobberw" "no")]) + + (define_insn "*andqi3_w_fr" + [(set (reg:QI 10) + (and:QI (match_operand:QI 0 "general_operand" "roRn") + (reg:QI 10)))] + "(ip2k_reorg_split_qimode)" + "and\\tw,%0" + [(set_attr "skip" "yes")]) + + (define_insn_and_split "*andqi3_fr_w" + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR,rS,roR, rS,rS") + (and:QI + (match_operand:QI 1 "nonimmediate_operand" "%0, 0, rS,roR,rS") + (reg:QI 10)))] + "(ip2k_reorg_split_qimode)" + "@ + and\\t%0,w + and\\t%0,w + # + # + #" + "(ip2k_reorg_split_qimode + && ! rtx_equal_p (operands[0], operands[1]))" + [(set (reg:QI 10) + (and:QI (match_dup 1) + (reg:QI 10))) + (set (match_dup 0) + (reg:QI 10))] + "" + [(set_attr "skip" "yes,yes,no,no,no") + (set_attr "clobberw" "no,no,yes,yes,yes")]) + + (define_insn_and_split "*andqi3" ; 0 1 2 3 4 + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR, rS,roR, rS, rS") + (and:QI + (match_operand:QI 1 "nonimmediate_operand" "%0, 0, rS,roR, rS") + (match_operand:QI 2 "general_operand" "rSn,roRn,rSn,rSn,roRn")))] + "" + "@ + mov\\tw,%2\;and\\t%0,w + # + # + # + #" + "(ip2k_reorg_split_qimode + && (! rtx_equal_p (operands[0], operands[1]) + || GET_CODE (operands[2]) != CONST_INT + || find_one_clear_bit_p (INTVAL (operands[2]) | 0xffffff00UL) == -1))" + [(set (reg:QI 10) + (match_dup 2)) + (set (match_dup 0) + (and:QI (match_dup 1) + (reg:QI 10)))]) + + (define_insn_and_split "andhi3" ; 0 1 2 3 4 + [(set (match_operand:HI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (and:HI + (match_operand:HI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:HI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_himode)" + [(set (match_dup 3) + (and:QI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (and:QI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], QImode); + operands[4] = ip2k_get_high_half (operands[1], QImode); + operands[5] = ip2k_get_high_half (operands[2], QImode); + operands[6] = ip2k_get_low_half (operands[0], QImode); + operands[7] = ip2k_get_low_half (operands[1], QImode); + operands[8] = ip2k_get_low_half (operands[2], QImode); + }") + + (define_insn_and_split "andsi3" ; 0 1 2 3 4 + [(set (match_operand:SI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (and:SI + (match_operand:SI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:SI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_simode)" + [(set (match_dup 3) + (and:HI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (and:HI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], HImode); + operands[4] = ip2k_get_high_half (operands[1], HImode); + operands[5] = ip2k_get_high_half (operands[2], HImode); + operands[6] = ip2k_get_low_half (operands[0], HImode); + operands[7] = ip2k_get_low_half (operands[1], HImode); + operands[8] = ip2k_get_low_half (operands[2], HImode); + }") + + (define_insn_and_split "anddi3" ; 0 1 2 3 4 + [(set (match_operand:DI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (and:DI + (match_operand:DI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:DI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_dimode)" + [(set (match_dup 3) + (and:SI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (and:SI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], SImode); + operands[4] = ip2k_get_high_half (operands[1], SImode); + operands[5] = ip2k_get_high_half (operands[2], SImode); + operands[6] = ip2k_get_low_half (operands[0], SImode); + operands[7] = ip2k_get_low_half (operands[1], SImode); + operands[8] = ip2k_get_low_half (operands[2], SImode); + }") + + ;; + ;; Bitwise or instructions. + ;; + + (define_expand "iorqi3" + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (ior:QI (match_operand:QI 1 "nonimmediate_operand" "") + (match_operand:QI 2 "general_operand" "")))] + "" + "") + + (define_insn "*iorqi3_bit" + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR") + (ior:QI (match_dup 0) + (match_operand:QI 1 "const_int_operand" "n")))] + "(find_one_set_bit_p (INTVAL (operands[1]) & 0xff) != -1)" + "*{ + operands[2] = GEN_INT (find_one_set_bit_p (INTVAL (operands[1]) & 0xff)); + return AS2 (setb, %0, %b2); + }" + [(set_attr "skip" "yes") + (set_attr "clobberw" "no")]) + + (define_insn "*iorqi3" ; 0 1 2 3 4 + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR, rS,roR, rS, rS") + (ior:QI + (match_operand:QI 1 "nonimmediate_operand" "%0, 0, rS,roR, rS") + (match_operand:QI 2 "general_operand" "rSi,roRi,rSi,rSi,roRi")))] + "" + "@ + mov\\tw,%2\;or\\t%0,w + mov\\tw,%2\;or\\t%0,w + mov\\tw,%2\;or\\tw,%1\;mov\\t%0,w + mov\\tw,%2\;or\\tw,%1\;mov\\t%0,w + mov\\tw,%2\;or\\tw,%1\;mov\\t%0,w") + + (define_insn_and_split "iorhi3" ; 0 1 2 3 4 + [(set (match_operand:HI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (ior:HI + (match_operand:HI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:HI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_himode)" + [(set (match_dup 3) + (ior:QI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (ior:QI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], QImode); + operands[4] = ip2k_get_high_half (operands[1], QImode); + operands[5] = ip2k_get_high_half (operands[2], QImode); + operands[6] = ip2k_get_low_half (operands[0], QImode); + operands[7] = ip2k_get_low_half (operands[1], QImode); + operands[8] = ip2k_get_low_half (operands[2], QImode); + }") + + (define_insn_and_split "iorsi3" ; 0 1 2 3 4 + [(set (match_operand:SI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (ior:SI + (match_operand:SI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:SI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_simode)" + [(set (match_dup 3) + (ior:HI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (ior:HI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], HImode); + operands[4] = ip2k_get_high_half (operands[1], HImode); + operands[5] = ip2k_get_high_half (operands[2], HImode); + operands[6] = ip2k_get_low_half (operands[0], HImode); + operands[7] = ip2k_get_low_half (operands[1], HImode); + operands[8] = ip2k_get_low_half (operands[2], HImode); + }") + + (define_insn_and_split "iordi3" ; 0 1 2 3 4 + [(set (match_operand:DI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (ior:DI + (match_operand:DI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:DI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_dimode)" + [(set (match_dup 3) + (ior:SI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (ior:SI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], SImode); + operands[4] = ip2k_get_high_half (operands[1], SImode); + operands[5] = ip2k_get_high_half (operands[2], SImode); + operands[6] = ip2k_get_low_half (operands[0], SImode); + operands[7] = ip2k_get_low_half (operands[1], SImode); + operands[8] = ip2k_get_low_half (operands[2], SImode); + }") + + ;; + ;; Bitwise xor instructions + ;; + ;; TODO: xor ops can also use "not w, fr"! + ;; + + (define_insn "xorqi3" + [(set + (match_operand:QI 0 "nonimmediate_operand" "=roR,roR, rS,roR, rS, rS") + (xor:QI (match_operand:QI 1 "general_operand" "%0, 0, 0, rS,roR, rS") + (match_operand:QI 2 "general_operand" "M,rSi,roRi,rSi,rSi,roRi")))] + "" + "@ + not\\t%0 + mov\\tw,%2\;xor\\t%0,w + mov\\tw,%2\;xor\\t%0,w + mov\\tw,%1\;xor\\tw,%2\;mov\\t%0,w + mov\\tw,%1\;xor\\tw,%2\;mov\\t%0,w + mov\\tw,%1\;xor\\tw,%2\;mov\\t%0,w" + [(set_attr "clobberw" "no,yes,yes,yes,yes,yes")]) + + (define_insn_and_split "xorhi3" ; 0 1 2 3 4 + [(set (match_operand:HI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (xor:HI + (match_operand:HI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:HI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_himode)" + [(set (match_dup 3) + (xor:QI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (xor:QI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], QImode); + operands[4] = ip2k_get_high_half (operands[1], QImode); + operands[5] = ip2k_get_high_half (operands[2], QImode); + operands[6] = ip2k_get_low_half (operands[0], QImode); + operands[7] = ip2k_get_low_half (operands[1], QImode); + operands[8] = ip2k_get_low_half (operands[2], QImode); + }") + + (define_insn_and_split "xorsi3" ; 0 1 2 3 4 + [(set (match_operand:SI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (xor:SI + (match_operand:SI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:SI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_simode)" + [(set (match_dup 3) + (xor:HI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (xor:HI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], HImode); + operands[4] = ip2k_get_high_half (operands[1], HImode); + operands[5] = ip2k_get_high_half (operands[2], HImode); + operands[6] = ip2k_get_low_half (operands[0], HImode); + operands[7] = ip2k_get_low_half (operands[1], HImode); + operands[8] = ip2k_get_low_half (operands[2], HImode); + }") + + (define_insn_and_split "xordi3" ; 0 1 2 3 4 + [(set (match_operand:DI 0 "nonimmediate_operand" "=uo, uS,&dS,&do,&dS") + (xor:DI + (match_operand:DI 1 "nonimmediate_operand" "%0, 0, ro, rS, rS") + (match_operand:DI 2 "general_operand" "rSn,ron,rSn,rSn,ron")))] + "" + "#" + "(ip2k_reorg_split_dimode)" + [(set (match_dup 3) + (xor:SI (match_dup 4) + (match_dup 5))) + (set (match_dup 6) + (xor:SI (match_dup 7) + (match_dup 8)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], SImode); + operands[4] = ip2k_get_high_half (operands[1], SImode); + operands[5] = ip2k_get_high_half (operands[2], SImode); + operands[6] = ip2k_get_low_half (operands[0], SImode); + operands[7] = ip2k_get_low_half (operands[1], SImode); + operands[8] = ip2k_get_low_half (operands[2], SImode); + }") + + ;; + ;; Multiply instructions. + ;; + + (define_insn "umulqi3" + [(set (match_operand:QI 0 "nonimmediate_operand" "=ro, rS, rS") + (mult:QI (match_operand:QI 1 "nonimmediate_operand" "%rS,roR, rS") + (match_operand:QI 2 "general_operand" "rSi,rSi,roRi")))] + "" + "mov\\tw,%1\;mulu\\tw,%2\;mov\\t%0,w") + + (define_insn "mulqihi3" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro, rS, rS") + (mult:HI + (sign_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "%rS,roR, rS")) + (sign_extend:HI + (match_operand:QI 2 "general_operand" "rSi,rSi,roRi"))))] + "" + "@ + mov\\tw,%1\;muls\\tw,%2\;mov\\t%L0,w\;mov\\tw,mulh\;mov\\t%H0,w + mov\\tw,%1\;muls\\tw,%2\;mov\\t%L0,w\;mov\\tw,mulh\;mov\\t%H0,w + mov\\tw,%1\;muls\\tw,%2\;mov\\t%L0,w\;mov\\tw,mulh\;mov\\t%H0,w") + + (define_insn_and_split "umulqihi3" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro, rS, rS") + (mult:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "%rS,roR, rS")) + (zero_extend:HI + (match_operand:QI 2 "general_operand" "rSi,rSi,roRi"))))] + "" + "#" + "ip2k_reorg_split_qimode" + [(set (match_dup 3) + (mult:QI (match_dup 1) + (match_dup 2))) + (set (reg:QI 10) + (reg:QI 15)) + (set (match_dup 4) + (reg:QI 10))] + "{ + operands[3] = ip2k_get_low_half (operands[0], QImode); + operands[4] = ip2k_get_high_half (operands[0], QImode); + }") + + (define_insn "*mulhi3_by2" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (mult:HI (match_operand:HI 1 "nonimmediate_operand" "0, rS, ro") + (zero_extend:HI (const_int 2))))] + "" + "@ + clrb\\tSTATUS,0\;rl\\t%L0\;rl\\t%H0 + clrb\\tSTATUS,0\;rl\\tw,%L1\;mov\\t%L0,w\;rl\\tw,%H1\;mov\\t%H0,w + clrb\\tSTATUS,0\;rl\\tw,%L1\;mov\\t%L0,w\;rl\\tw,%H1\;mov\\t%H0,w" + [(set_attr "clobberw" "no,yes,yes")]) + + (define_insn "*mulhi3_byqi" + [(set (match_operand:HI + 0 "nonimmediate_operand" "=ro,&ro,&rS, &rS") + (mult:HI (match_operand:HI + 1 "nonimmediate_operand" "0, rS, ro, rS") + (zero_extend:HI (match_operand:QI + 2 "general_operand" "rSi,rSi,rSi,roRi"))))] + "" + "@ + mov\\tw,%L1\;mulu\\tw,%2\;mov\\t%L0,w\;push\\tmulh%<\;mov\\tw,%H1\;mulu\\tw,%2\;pop\\t%H0%>\;add\\t%H0,w + mov\\tw,%L1\;mulu\\tw,%2\;mov\\t%L0,w\;mov\\tw,mulh\;mov\\t%H0,w\;mov\\tw,%H1\;mulu\\tw,%2\;add\\t%H0,w + mov\\tw,%L1\;mulu\\tw,%2\;mov\\t%L0,w\;mov\\tw,mulh\;mov\\t%H0,w\;mov\\tw,%H1\;mulu\\tw,%2\;add\\t%H0,w + mov\\tw,%L1\;mulu\\tw,%2\;mov\\t%L0,w\;mov\\tw,mulh\;mov\\t%H0,w\;mov\\tw,%H1\;mulu\\tw,%2\;add\\t%H0,w") + + (define_insn "smulqi_highpart" + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR, rS, rS") + (truncate:QI + (lshiftrt:HI + (mult:HI + (sign_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "%rS,roR, rS")) + (sign_extend:HI + (match_operand:QI 2 "general_operand" "rSi,rSi,roRi"))) + (const_int 8))))] + "" + "@ + mov\\tw,%1\;muls\\tw,%2\;mov\\tw,mulh\;mov %0,w + mov\\tw,%1\;muls\\tw,%2\;mov\\tw,mulh\;mov %0,w + mov\\tw,%1\;muls\\tw,%2\;mov\\tw,mulh\;mov %0,w") + + (define_insn "umulqi_highpart" + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR, rS, rS") + (truncate:QI + (lshiftrt:HI + (mult:HI + (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "%rS,roR, rS")) + (zero_extend:HI + (match_operand:QI 2 "general_operand" "rSi,rSi,roRi"))) + (const_int 8))))] + "" + "@ + mov\\tw,%1\;mulu\\tw,%2\;mov\\tw,mulh\;mov %0,w + mov\\tw,%1\;mulu\\tw,%2\;mov\\tw,mulh\;mov %0,w + mov\\tw,%1\;mulu\\tw,%2\;mov\\tw,mulh\;mov %0,w") + + (define_insn "mulhi3" + [(set (match_operand:HI 0 "nonimmediate_operand" "=uo, uS, uS") + (mult:HI (match_operand:HI 1 "nonimmediate_operand" "%rS, ro, rS") + (match_operand:HI 2 "general_operand" "rSi,rSi,roi")))] + "" + "push\\t%L2%<\;push\\t%H2%<\;push\\t%L1%<\;push\\t%H1%>\;page\\t__mulhi3\;call\\t__mulhi3\;pop\\t%H0%>\;pop\\t%L0%>") + + ;; If we find that we're multiplying by a constant that's less than 256 we + ;; can replace a full "mulhi3" with one of the lighter weight variants + ;; that multiplies an HImode value by a QImode one. + ;; + (define_split + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,rS") + (mult:HI (match_operand:HI 1 "nonimmediate_operand" "rS,ro") + (match_operand:HI 2 "const_int_operand" "P, P")))] + "(INTVAL (operands[2]) < 0x100)" + [(set (match_dup 0) + (mult:HI (match_dup 1) + (zero_extend:HI (match_dup 3))))] + "operands[3] = gen_int_mode (INTVAL (operands[2]), QImode);") + + ;; + ;; Divide/Modulus functions. + ;; + + (define_expand "udivmodhi4" + [(parallel [(set (reg:HI 128) + (udiv:HI (match_operand:HI 1 "general_operand" "") + (match_operand:HI 2 "general_operand" ""))) + (set (reg:HI 130) + (umod:HI (match_dup 1) (match_dup 2))) + (clobber (reg:QI 132)) + (clobber (reg:QI 133))]) + (set (match_operand:HI 0 "general_operand" "") (reg:HI 128)) + (set (match_operand:HI 3 "general_operand" "") (reg:HI 130))] + "" + "") + + (define_insn "*udivmodhi4_call" + [(set (reg:HI 128) + (udiv:HI (match_operand:HI 0 "general_operand" "uSi,uoi") + (match_operand:HI 1 "general_operand" "uoi,uSi"))) + (set (reg:HI 130) + (umod:HI (match_dup 0) (match_dup 1))) + (clobber (reg:QI 132)) + (clobber (reg:QI 133))] + "" + "push\\t%L1%<\;push\\t%H1%<\;push\\t%L0%<\;push\\t%H0%>%>%>\;page\\t__udivmodhi4\;call\\t__udivmodhi4") + + (define_expand "divmodhi4" + [(parallel [(set (reg:HI 128) + (div:HI (match_operand:HI 1 "general_operand" "") + (match_operand:HI 2 "general_operand" ""))) + (set (reg:HI 130) + (mod:HI (match_dup 1) + (match_dup 2))) + (clobber (reg:QI 132)) + (clobber (reg:QI 133)) + (clobber (reg:QI 134)) + (clobber (reg:QI 135))]) + (set (match_operand:HI 0 "general_operand" "") (reg:HI 128)) + (set (match_operand:HI 3 "general_operand" "") (reg:HI 130))] + "" + "") + + (define_insn "*divmodhi4_call" + [(set (reg:HI 128) + (div:HI (match_operand:HI 0 "general_operand" "uSi,uoi") + (match_operand:HI 1 "general_operand" "uoi,uSi"))) + (set (reg:HI 130) + (mod:HI (match_dup 0) (match_dup 1))) + (clobber (reg:QI 132)) + (clobber (reg:QI 133)) + (clobber (reg:QI 134)) + (clobber (reg:QI 135))] + "" + "push\\t%L1%<\;push\\t%H1%<\;push\\t%L0%<\;push\\t%H0%>%>%>\;page\\t__divmodhi4\;call\\t__divmodhi4") + + (define_expand "udivmodsi4" + [(parallel [(set (reg:SI 128) + (udiv:SI (match_operand:SI 1 "general_operand" "") + (match_operand:SI 2 "general_operand" ""))) + (set (reg:SI 132) + (umod:SI (match_dup 1) + (match_dup 2))) + (clobber (reg:QI 136)) + (clobber (reg:QI 137)) + (clobber (reg:QI 138)) + (clobber (reg:QI 139))]) + (set (match_operand:SI 0 "general_operand" "") (reg:SI 128)) + (set (match_operand:SI 3 "general_operand" "") (reg:SI 132))] + "" + "") + + (define_insn "*udivmodsi4_call" + [(set (reg:SI 128) + (udiv:SI (match_operand:SI 0 "general_operand" "rSi,roi") + (match_operand:SI 1 "general_operand" "roi,rSi"))) + (set (reg:SI 132) + (umod:SI (match_dup 0) + (match_dup 1))) + (clobber (reg:QI 136)) + (clobber (reg:QI 137)) + (clobber (reg:QI 138)) + (clobber (reg:QI 139))] + "" + "push\\t%D1%<\;push\\t%C1%<\;push\\t%B1%<\;push\\t%A1%<\;push\\t%D0%<\;push\\t%C0%<\;push\\t%B0%<\;push\\t%A0%>%>%>%>%>%>%>\;page\\t__udivmodsi4\;call\\t__udivmodsi4") + + (define_expand "divmodsi4" + [(parallel [(set (reg:SI 128) + (div:SI (match_operand:SI 1 "general_operand" "") + (match_operand:SI 2 "general_operand" ""))) + (set (reg:SI 132) + (mod:SI (match_dup 1) + (match_dup 2))) + (clobber (reg:QI 136)) + (clobber (reg:QI 137)) + (clobber (reg:QI 138)) + (clobber (reg:QI 139)) + (clobber (reg:QI 140)) + (clobber (reg:QI 141))]) + (set (match_operand:SI 0 "general_operand" "") (reg:SI 128)) + (set (match_operand:SI 3 "general_operand" "") (reg:SI 132))] + "" + "") + + (define_insn "*divmodsi4_call" + [(set (reg:SI 128) + (div:SI (match_operand:SI 0 "general_operand" "rSn,ron") + (match_operand:SI 1 "general_operand" "ron,rSn"))) + (set (reg:SI 132) + (mod:SI (match_dup 0) + (match_dup 1))) + (clobber (reg:QI 136)) + (clobber (reg:QI 137)) + (clobber (reg:QI 138)) + (clobber (reg:QI 139)) + (clobber (reg:QI 140)) + (clobber (reg:QI 141))] + "" + "push\\t%D1%<\;push\\t%C1%<\;push\\t%B1%<\;push\\t%A1%<\;push\\t%D0%<\;push\\t%C0%<\;push\\t%B0%<\;push\\t%A0%>%>%>%>%>%>%>\;page\\t__divmodsi4\;call\\t__divmodsi4") + + (define_expand "udivmoddi4" + [(parallel [(set (reg:DI 128) + (udiv:DI (match_operand:DI 1 "general_operand" "") + (match_operand:DI 2 "general_operand" ""))) + (set (reg:DI 136) + (umod:DI (match_dup 1) + (match_dup 2))) + (clobber (reg:QI 144)) + (clobber (reg:QI 145)) + (clobber (reg:QI 146)) + (clobber (reg:QI 147)) + (clobber (reg:QI 148)) + (clobber (reg:QI 149)) + (clobber (reg:QI 150)) + (clobber (reg:QI 151))]) + (set (match_operand:DI 0 "general_operand" "") (reg:DI 128)) + (set (match_operand:DI 3 "general_operand" "") (reg:DI 136))] + "" + "") + + (define_insn "*udivmoddi4_call" + [(set (reg:DI 128) + (udiv:DI (match_operand:DI 0 "general_operand" "rSi,roi") + (match_operand:DI 1 "general_operand" "roi,rSi"))) + (set (reg:DI 136) + (umod:DI (match_dup 0) + (match_dup 1))) + (clobber (reg:QI 144)) + (clobber (reg:QI 145)) + (clobber (reg:QI 146)) + (clobber (reg:QI 147)) + (clobber (reg:QI 148)) + (clobber (reg:QI 149)) + (clobber (reg:QI 150)) + (clobber (reg:QI 151))] + "" + "push\\t%Z1%<\;push\\t%Y1%<\;push\\t%X1%<\;push\\t%W1%<\;push\\t%V1%<\;push\\t%U1%<\;push\\t%T1%<\;push\\t%S1%<\;push\\t%Z0%<\;push\\t%Y0%<\;push\\t%X0%<\;push\\t%W0%<\;push\\t%V0%<\;push\\t%U0%<\;push\\t%T0%<\;push\\t%S00%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>\;page\\t__udivmoddi4\;call\\t__udivmoddi4") + + (define_expand "divmoddi4" + [(parallel [(set (reg:DI 128) + (div:DI (match_operand:DI 1 "general_operand" "") + (match_operand:DI 2 "general_operand" ""))) + (set (reg:DI 136) + (mod:DI (match_dup 1) + (match_dup 2))) + (clobber (reg:QI 144)) + (clobber (reg:QI 145)) + (clobber (reg:QI 146)) + (clobber (reg:QI 147)) + (clobber (reg:QI 148)) + (clobber (reg:QI 149)) + (clobber (reg:QI 150)) + (clobber (reg:QI 151))]) + (set (match_operand:DI 0 "general_operand" "") (reg:DI 128)) + (set (match_operand:DI 3 "general_operand" "") (reg:DI 136))] + "" + "") + + (define_insn "*divmoddi4_call" + [(set (reg:DI 128) + (div:DI (match_operand:DI 0 "general_operand" "rSn,ron") + (match_operand:DI 1 "general_operand" "ron,rSn"))) + (set (reg:DI 136) + (mod:DI (match_dup 0) + (match_dup 1))) + (clobber (reg:QI 144)) + (clobber (reg:QI 145)) + (clobber (reg:QI 146)) + (clobber (reg:QI 147)) + (clobber (reg:QI 148)) + (clobber (reg:QI 149)) + (clobber (reg:QI 150)) + (clobber (reg:QI 151))] + "" + "push\\t%Z1%<\;push\\t%Y1%<\;push\\t%X1%<\;push\\t%W1%<\;push\\t%V1%<\;push\\t%U1%<\;push\\t%T1%<\;push\\t%S1%<\;push\\t%Z0%<\;push\\t%Y0%<\;push\\t%X0%<\;push\\t%W0%<\;push\\t%V0%<\;push\\t%U0%<\;push\\t%T0%<\;push\\t%S00%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>\;page\\t__divmoddi4\;call\\t__divmoddi4") + + ;; + ;; Arithmetic shift left instructions. + ;; + + (define_insn "ashlqi3" + [(set (match_operand:QI 0 "nonimmediate_operand" "=roR,roR, rS,roR, rS") + (ashift:QI + (match_operand:QI 1 "nonimmediate_operand" "0, rS,roR, 0, 0") + (match_operand:QI 2 "general_operand" "N, L, L, rS,roR")))] + "" + "@ + clrb status,0\;rl\\t%0 + mov\\tw,%e2\;mulu\\tw,%1\;mov\\t%0,w + mov\\tw,%e2\;mulu\\tw,%1\;mov\\t%0,w + mov\\tw,%2\;snz\;page\\t1f\;jmp\\t1f\;2:clrb\\tstatus,0\;rl\\t%0\;decsz\\twreg\;page\\t2b\;jmp\\t2b\;1: + mov\\tw,%2\;snz\;page\\t1f\;jmp\\t1f\;2:clrb\\tstatus,0\;rl\\t%0\;decsz\\twreg\;page\\t2b\;jmp\\t2b\;1:" + [(set_attr "clobberw" "no,yes,yes,yes,yes")]) + + ;; Convert simple fixed-size shift of a zero-extended QImode value into a + ;; multiply as our multiplier is much faster. We also do this so that the + ;; multiply can possibly be merged into a much faster multiply-and-accumulate + ;; operation. + ;; + (define_split + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro, rS") + (ashift:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "rS,roR")) + (match_operand:QI 2 "const_int_operand" "J, J")))] + "(INTVAL (operands[2]) < 8)" + [(set (match_dup 0) + (mult:HI (zero_extend:HI (match_dup 1)) + (zero_extend:HI (match_dup 3))))] + "operands[3] = gen_int_mode (1 << INTVAL (operands[2]), QImode);") + + (define_insn_and_split "*ashlhi3_by8_zero_extend" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro, rS") + (ashift:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "rS,roR")) + (const_int 8)))] + "" + "#" + "reload_completed" + [(set (match_dup 2) (match_dup 1)) + (set (match_dup 3) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], QImode); + operands[3] = ip2k_get_low_half (operands[0], QImode); + }") + + (define_insn "*ashlhi3_zero_extend" ; 0 1 + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro, rS") + (ashift:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "rS,roR")) + (match_operand:QI 2 "const_int_operand" "n, n")))] + "" + "*{ + if (INTVAL (operands[2]) < 8) + return AS2 (mov, w, %1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, w, MULH) CR_TAB + AS2 (mov, %H0, w); + else + { + operands[3] = GEN_INT (INTVAL (operands[2]) - 8); + return AS2 (mov, w, %1) CR_TAB + AS2 (mulu, w, %e3) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS1 (clr, %L0); + } + }") + + ;; Convert simple fixed-size shift of a HImode value into a multiply as + ;; our multiplier is much faster. We also do this so that the multiply can + ;; possibly be merged into a much faster multiply-and-accumulate operation. + ;; + (define_split + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,rS") + (ashift:HI (match_operand:HI 1 "nonimmediate_operand" "rS,ro") + (match_operand:QI 2 "const_int_operand" "J, J")))] + "(INTVAL (operands[2]) < 8)" + [(set (match_dup 0) + (mult:HI (match_dup 1) + (zero_extend:HI (match_dup 3))))] + "operands[3] = gen_int_mode (1 << INTVAL (operands[2]), QImode);") + + (define_insn_and_split "ashlhi3_split" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,rS") + (ashift:HI (match_operand:HI 1 "nonimmediate_operand" "rS,ro") + (match_operand:QI 2 "const_int_operand" "n, n")))] + "(INTVAL (operands[2]) >= 8)" + "#" + "&& ip2k_reorg_split_himode" + [(set (match_dup 4) (const_int 0))] + "{ + operands[3] = ip2k_get_high_half (operands[0], QImode); + operands[4] = ip2k_get_low_half (operands[0], QImode); + operands[5] = ip2k_get_low_half (operands[1], QImode); + + if (INTVAL (operands[2]) == 8) + emit_insn (gen_movqi (operands[3], operands[5])); + else + { + operands[6] = gen_int_mode (INTVAL (operands[2]) - 8, QImode); + emit_insn (gen_ashlqi3 (operands[3], operands[5], operands[6])); + } + }") + + (define_insn "ashlhi3" ; 0 1 2 3 4 + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,&rS,&ro,ro, rS") + (ashift:HI + (match_operand:HI 1 "nonimmediate_operand" "0, ro, rS, 0, 0") + (match_operand:QI 2 "general_operand" "L, L, L,rS,roR")))] + "" + "*{ + switch (which_alternative) + { + case 0: + switch (INTVAL (operands[2])) + { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %L0) CR_TAB + AS1 (rl, %H0); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %L0) CR_TAB + AS1 (rl, %H0) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %L0) CR_TAB + AS1 (rl, %H0); + + case 3: + case 4: + case 5: + case 6: + return AS2 (mov, w, %L1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS1 (push, MULH%<) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (or, 1(SP), w) CR_TAB + AS1 (pop, %H0%>); + + case 7: + return AS1 (rr, %H0) CR_TAB + AS2 (mov, w, %L0) CR_TAB + AS1 (clr, %L0) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + default: + /* Should be caught by a different insn pattern */ + abort (); + } + + case 1: + case 2: + switch (INTVAL (operands[2])) + { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rl, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (rl, w, %H1) CR_TAB + AS2 (mov, %H0, w); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rl, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (rl, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %L0) CR_TAB + AS1 (rl, %H0); + + case 3: + case 4: + case 5: + case 6: + return AS2 (mov, w, %L1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS1 (push, MULH%<) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (or, 1(SP), w) CR_TAB + AS1 (pop, %H0%>); + + case 7: + return AS2 (rr, w, %H1) CR_TAB + AS2 (mov, w, %L1) CR_TAB + AS1 (clr, %L0) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + default: + /* Should be caught by a different insn pattern */ + abort (); + } + + case 3: + case 4: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %L0) CR_TAB + AS1 (rl, %H0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + default: + abort(); + } + }") + + (define_insn_and_split "*ashlsi3_by16_zero_extend" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro,rS") + (ashift:SI (zero_extend:SI + (match_operand:HI 1 "nonimmediate_operand" "rS,ro")) + (const_int 16)))] + "" + "#" + "reload_completed" + [(set (match_dup 2) (match_dup 1)) + (set (match_dup 3) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], HImode); + operands[3] = ip2k_get_low_half (operands[0], HImode); + }") + + (define_insn_and_split "ashlsi3_split" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (ashift:SI (match_operand:SI 1 "nonimmediate_operand" "0, rS, ro") + (match_operand:QI 2 "const_int_operand" "n, n, n")))] + "(INTVAL (operands[2]) >= 16)" + "#" + "&& ip2k_reorg_split_simode" + [(const_int 0)] + "{ + operands[3] = ip2k_get_high_half (operands[0], HImode); + operands[4] = ip2k_get_low_half (operands[0], HImode); + operands[5] = ip2k_get_low_half (operands[1], HImode); + + if (INTVAL (operands[2]) == 16) + { + emit_insn (gen_movhi (operands[3], operands[5])); + emit_insn (gen_movhi (operands[4], GEN_INT (0))); + } + else + { + operands[6] = GEN_INT (INTVAL (operands[2]) - 16); + emit_insn (gen_ashlhi3 (operands[3], operands[5], operands[6])); + emit_insn (gen_movhi (operands[4], GEN_INT (0))); + } + }") + + (define_insn "ashlsi3" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro, rS,ro,&ro,&rS") + (ashift:SI + (match_operand:SI 1 "nonimmediate_operand" "0, 0, 0, rS, ro") + (match_operand:QI 2 "general_operand" "L,roR,rS, L, L")))] + "" + "*{ + switch (which_alternative) { + case 0: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0) CR_TAB + AS1 (rl, %B0) CR_TAB + AS1 (rl, %A0); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0) CR_TAB + AS1 (rl, %B0) CR_TAB + AS1 (rl, %A0) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0) CR_TAB + AS1 (rl, %B0) CR_TAB + AS1 (rl, %A0); + + case 8: + return AS2 (mov, w, %B0) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %C0) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, w, %D0) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS1 (clr, %D0); + + case 16: + return AS2 (mov, w, %C0) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %D0) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0); + + case 23: + return AS2 (rr, w, %C0) CR_TAB + AS2 (mov, w, %D0) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0); + + case 24: + return AS2 (mov, w, %D0) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0); + + case 31: + return AS2 (rr, w, %D0) CR_TAB + AS1 (clr, %A0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0) CR_TAB + AS1 (rr, %A0); + + default: + return AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0) CR_TAB + AS1 (rl, %B0) CR_TAB + AS1 (rl, %A0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + + case 1: + case 2: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0) CR_TAB + AS1 (rl, %B0) CR_TAB + AS1 (rl, %A0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + case 3: + case 4: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rl, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (rl, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (rl, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (rl, w, %A1) CR_TAB + AS2 (mov, %A0, w); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rl, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (rl, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (rl, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (rl, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0) CR_TAB + AS1 (rl, %B0) CR_TAB + AS1 (rl, %A0); + + case 8: + return AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS1 (clr, %D0); + + case 16: + return AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0); + + case 23: + return AS2 (rr, w, %C1) CR_TAB + AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0); + + case 24: + return AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0); + + case 31: + return AS2 (rr, w, %D1) CR_TAB + AS1 (clr, %A0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %D0) CR_TAB + AS1 (rr, %A0); + + default: + return AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0) CR_TAB + AS1 (rl, %B0) CR_TAB + AS1 (rl, %A0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + default: + abort (); + } + }") + + (define_insn_and_split "ashldi3_split" + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (ashift:DI (match_operand:DI 1 "nonimmediate_operand" "0, rS, ro") + (match_operand:QI 2 "const_int_operand" "n, n, n")))] + "((INTVAL (operands[2]) >= 32) || (INTVAL (operands[2]) == 16))" + "#" + "&& ip2k_reorg_split_dimode" + [(const_int 0)] + "{ + operands[3] = ip2k_get_high_half (operands[0], SImode); + operands[4] = ip2k_get_low_half (operands[0], SImode); + operands[5] = ip2k_get_low_half (operands[1], SImode); + + if (INTVAL (operands[2]) == 16) + { + operands[6] = ip2k_get_high_half (operands[1], SImode); + operands[7] = ip2k_get_high_half (operands[3], HImode); + operands[8] = ip2k_get_low_half (operands[3], HImode); + operands[9] = ip2k_get_high_half (operands[4], HImode); + operands[10] = ip2k_get_low_half (operands[4], HImode); + operands[11] = ip2k_get_low_half (operands[6], HImode); + operands[12] = ip2k_get_high_half (operands[5], HImode); + operands[13] = ip2k_get_low_half (operands[5], HImode); + emit_insn (gen_movhi (operands[7], operands[11])); + emit_insn (gen_movhi (operands[8], operands[12])); + emit_insn (gen_movhi (operands[9], operands[13])); + emit_insn (gen_movhi (operands[10], GEN_INT (0))); + } + else if (INTVAL (operands[2]) == 32) + { + emit_insn (gen_movsi (operands[3], operands[5])); + emit_insn (gen_movsi (operands[4], GEN_INT (0))); + } + else + { + operands[6] = GEN_INT (INTVAL (operands[2]) - 32); + emit_insn (gen_ashlsi3 (operands[3], operands[5], operands[6])); + emit_insn (gen_movsi (operands[4], GEN_INT (0))); + } + }") + + ;; + ;; Arithmetic shift right instructions. + ;; + + (define_expand "ashrqi3" + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "") + (match_operand:QI 2 "general_operand" "")))] + "" + "if (operands[2] == const0_rtx) + { + emit_move_insn (operands[0], operands[1]); + DONE; + } + ") + + (define_insn "*ashrqi3" + [(set + (match_operand:QI 0 "nonimmediate_operand" "=roR,roR, rS,roR, rS,roR, rS") + (ashiftrt:QI + (match_operand:QI 1 "nonimmediate_operand" "0, 0, 0, rS,roR, rS,roR") + (match_operand:QI 2 "general_operand" "N, rS,roR, N, N, L, L")))] + "" + "*{ + switch (which_alternative) + { + case 0: + return AS2 (rl, w, %0) CR_TAB + AS1 (rr, %0); + + case 3: + case 4: + return AS2 (rl, w, %1) CR_TAB /* dup the sign bit */ + AS2 (rr, w, %1) CR_TAB + AS2 (mov, %0, w); + + case 5: + case 6: + /* Do >> by left-shifting partially into MULH. */ + operands[2] = GEN_INT (8 - INTVAL (operands[2])); + return AS2 (mov, w, %1) CR_TAB + AS2 (muls, w, %e2) CR_TAB + AS2 (mov, w, mulh) CR_TAB + AS2 (mov, %0, w); + + case 1: + case 2: + default: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (setb, status, 0) CR_TAB + AS2 (sb, %0, 7) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + } + }") + + (define_insn "ashrhi3" ; 0 1 2 3 4 + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,&rS,&ro,ro, rS") + (ashiftrt:HI + (match_operand:HI 1 "nonimmediate_operand" "0, ro, rS, 0, 0") + (match_operand:QI 2 "general_operand" "L, L, L,rS,roR")))] + "" + "*{ + switch (which_alternative) { + case 0: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (rl, w, %H0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + case 2: + return AS2 (rl, w, %H0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0) CR_TAB + AS2 (rl, w, %H0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + case 8: + return AS2 (mov, w, %H0) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS1 (clr, %H0) CR_TAB + AS2 (snb, %L0, 7) CR_TAB + AS1 (not, %H0); + + default: + return AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (setb, status, 0) CR_TAB + AS2 (sb, %H0, 7) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + + case 1: + case 2: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (rl, w, %H1) CR_TAB + AS2 (rr, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (rr, w, %L1) CR_TAB + AS2 (mov, %L0, w); + + case 2: + return AS2 (rl, w, %H1) CR_TAB + AS2 (rr, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (rr, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (rl, w, %H0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + case 8: + return AS2 (mov, w, %H1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS1 (clr, %H0) CR_TAB + AS2 (snb, %L0, 7) CR_TAB + AS1 (not, %H0); + + default: + return AS2 (mov, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (setb, status, 0) CR_TAB + AS2 (sb, %H0, 7) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + + case 3: + case 4: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (setb, status, 0) CR_TAB + AS2 (sb, %H0, 7) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + default: + abort(); + } + }") + + (define_insn "ashrsi3" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro, rS,ro,&ro,&rS") + (ashiftrt:SI + (match_operand:SI 1 "nonimmediate_operand" "0, 0, 0, rS, ro") + (match_operand:QI 2 "general_operand" "L,roR,rS, L, L")))] + "" + "*{ + switch (which_alternative) { + case 0: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (rl, w, %A0) CR_TAB /* dup the sign bit */ + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0); + + case 2: + return AS2 (rl, w, %A0) CR_TAB /* dup the sign bit */ + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS2 (rl, w, %A0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0); + + case 8: + return AS2 (mov, w, %C0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %B0) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS1 (clr, %A0) CR_TAB + AS2 (snb, %B0, 7) CR_TAB + AS1 (not, %A0); + + case 16: + return AS2 (mov, w, %B0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %C0, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w); + + case 23: + return AS2 (rl, w, %B0) CR_TAB + AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %D0, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0); + + case 24: + return AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %D0, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w); + + case 31: + return AS2 (rl, w, %A0) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %A0, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (rl, %D0); + + default: + return AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (setb, status, 0) CR_TAB + AS2 (sb, %A0, 7) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS1 (decsz, WREG) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + + case 1: + case 2: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (setb, status, 0) CR_TAB + AS2 (sb, %A0, 7) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS1 (decsz, WREG) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + case 3: + case 4: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (rl, w, %A1) CR_TAB /* dup the sign bit */ + AS2 (rr, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (rr, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (rr, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (rr, w, %D1) CR_TAB + AS2 (mov, %D0, w); + + case 2: + return AS2 (rl, w, %A1) CR_TAB /* dup the sign bit */ + AS2 (rr, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (rr, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (rr, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (rr, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (rl, w, %A0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0); + + case 8: + return AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS1 (clr, %A0) CR_TAB + AS2 (snb, %B0, 7) CR_TAB + AS1 (not, %A0); + + case 16: + return AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %C0, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w); + + case 23: + return AS2 (rl, w, %B1) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %D0, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0); + + case 24: + return AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %D0, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w); + + case 31: + return AS2 (rl, w, %A1) CR_TAB + AS1 (clr, WREG) CR_TAB + AS2 (snb, %A1, 7) CR_TAB + AS1 (not, WREG) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS1 (rl, %D0); + + default: + return AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (setb, status, 0) CR_TAB + AS2 (sb, %A0, 7) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + default: + abort (); + } + }") + + ;; + ;; Logical shift right instructions. + ;; + + (define_insn "lshrqi3" + [(set (match_operand:QI + 0 "nonimmediate_operand" "=roR, rS,roR,roR, rS,&roR,roR, rS") + (lshiftrt:QI + (match_operand:QI + 1 "nonimmediate_operand" "0, 0, 0, rS,roR, rS, rS,roR") + (match_operand:QI + 2 "general_operand" "N,roR, rS, N, N, rS, L, L")))] + "" + "*{ + switch (which_alternative) + { + case 0: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %0); + + case 1: + case 2: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + case 3: + case 4: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rr, w, %1) CR_TAB + AS2 (mov, %0, w); + + case 5: + return AS2 (mov, w, %1) CR_TAB + AS2 (mov, %0, w) CR_TAB + AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + case 6: + case 7: + /* Do >> by left-shifting partially into MULH. */ + operands[2] = GEN_INT (8 - INTVAL (operands[2])); + return AS2 (mov, w, %1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (mov, w, mulh) CR_TAB + AS2 (mov, %0, w); + default: + abort (); + } + }") + + (define_insn_and_split "lshrhi3_split" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,rS") + (lshiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "rS,ro") + (match_operand:QI 2 "const_int_operand" "n, n")))] + "(INTVAL (operands[2]) >= 8)" + "#" + "&& ip2k_reorg_split_himode" + [(const_int 0)] + "{ + operands[3] = ip2k_get_high_half (operands[0], QImode); + operands[4] = ip2k_get_low_half (operands[0], QImode); + operands[5] = ip2k_get_high_half (operands[1], QImode); + + if (INTVAL (operands[2]) == 8) + emit_insn (gen_movqi (operands[4], operands[5])); + else + { + operands[6] = GEN_INT (INTVAL (operands[2]) - 8); + emit_insn (gen_lshrqi3 (operands[4], operands[5], operands[6])); + } + emit_insn (gen_movqi (operands[3], GEN_INT (0))); + }") + + (define_insn "lshrhi3" ; 0 1 2 3 4 + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,&rS,&ro,ro, rS") + (lshiftrt:HI + (match_operand:HI 1 "nonimmediate_operand" " 0, ro, rS, 0, 0") + (match_operand:QI 2 "general_operand" "L, L, L,rS,roR")))] + "" + "*{ + switch (which_alternative) + { + case 0: + switch (INTVAL (operands[2])) + { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + case 3: + case 4: + case 5: + case 6: + case 7: + operands[2] = GEN_INT (8 - INTVAL (operands[2])); + return AS2 (mov, w, %L0) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (mov, w, MULH) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, w, %H0) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (or, %L0, w) CR_TAB + AS2 (mov, w, MULH) CR_TAB + AS2 (mov, %H0, w); + + default: + /* Should be caught by a different insn pattern */ + abort (); + } + + case 1: + case 2: + switch (INTVAL (operands[2])) + { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rr, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (rr, w, %L1) CR_TAB + AS2 (mov, %L0, w); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rr, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (rr, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0); + + case 3: + case 4: + case 5: + case 6: + case 7: + operands[2] = GEN_INT (8 - INTVAL (operands[2])); + return AS2 (mov, w, %L1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (mov, w, MULH) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mulu, w, %e2) CR_TAB + AS2 (or, %L0, w) CR_TAB + AS2 (mov, w, MULH) CR_TAB + AS2 (mov, %H0, w); + + default: + /* Should be caught by a different insn pattern */ + abort (); + } + + case 3: + case 4: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %H0) CR_TAB + AS1 (rr, %L0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + default: + abort(); + } + }") + + (define_insn_and_split "lshrsi3_split" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (lshiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0, rS, ro") + (match_operand:QI 2 "const_int_operand" "n, n, n")))] + "(INTVAL (operands[2]) >= 16)" + "#" + "&& ip2k_reorg_split_simode" + [(const_int 0)] + "{ + operands[3] = ip2k_get_high_half (operands[0], HImode); + operands[4] = ip2k_get_low_half (operands[0], HImode); + operands[5] = ip2k_get_high_half (operands[1], HImode); + + if (INTVAL (operands[2]) == 16) + emit_insn (gen_movhi (operands[4], operands[5])); + else + { + operands[6] = GEN_INT (INTVAL (operands[2]) - 16); + emit_insn (gen_lshrhi3 (operands[4], operands[5], operands[6])); + } + emit_insn (gen_movhi (operands[3], GEN_INT (0))); + }") + + ;; This occurs frequently in supporting FP among other things, + ;; and out-of-line is almost as big as inline, so.... + ;; + (define_insn "lshrsi3" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro, rS,ro,&ro,&rS") + (lshiftrt:SI + (match_operand:SI 1 "nonimmediate_operand" "0, 0, 0, rS, ro") + (match_operand:QI 2 "general_operand" "L,roR,rS, L, L")))] + + "" + "*{ + switch (which_alternative) { + case 0: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0); + + case 8: + return AS2 (mov, w, %C0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %B0) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS1 (clr, %A0); + + case 16: + return AS2 (mov, w, %B0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0); + + case 23: + return AS2 (rl, w, %B0) CR_TAB + AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0); + + case 24: + return AS2 (mov, w, %A0) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0); + + case 31: + return AS2 (rl, w, %A0) CR_TAB + AS1 (clr, %D0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0) CR_TAB + AS1 (rl, %D0); + + default: + return AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + + case 1: + case 2: + return AS2 (mov, w, %2) CR_TAB + AS1 (snz,) CR_TAB + AS1 (page, 2f) CR_TAB + AS1 (jmp, 2f) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b) CR_TAB + AS1 (2:,); + + case 3: + case 4: + switch (INTVAL (operands[2])) { + case 1: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rr, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (rr, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (rr, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (rr, w, %D1) CR_TAB + AS2 (mov, %D0, w); + + case 2: + return AS2 (clrb, status, 0) CR_TAB + AS2 (rr, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (rr, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (rr, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (rr, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0); + + case 8: + return AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS1 (clr, %A0); + + case 16: + return AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0); + + case 23: + return AS2 (rl, w, %B1) CR_TAB + AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0) CR_TAB + AS1 (rl, %D0) CR_TAB + AS1 (rl, %C0); + + case 24: + return AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0); + + case 31: + return AS2 (rl, w, %A1) CR_TAB + AS1 (clr, %D0) CR_TAB + AS1 (clr, %C0) CR_TAB + AS1 (clr, %B0) CR_TAB + AS1 (clr, %A0) CR_TAB + AS1 (rl, %D0); + + default: + return AS2 (mov, w, %A1) CR_TAB + AS2 (mov, %A0, w) CR_TAB + AS2 (mov, w, %B1) CR_TAB + AS2 (mov, %B0, w) CR_TAB + AS2 (mov, w, %C1) CR_TAB + AS2 (mov, %C0, w) CR_TAB + AS2 (mov, w, %D1) CR_TAB + AS2 (mov, %D0, w) CR_TAB + AS2 (mov, w, %2) CR_TAB + AS1 (1:,) CR_TAB + AS2 (clrb, status, 0) CR_TAB + AS1 (rr, %A0) CR_TAB + AS1 (rr, %B0) CR_TAB + AS1 (rr, %C0) CR_TAB + AS1 (rr, %D0) CR_TAB + AS1 (decsz, wreg) CR_TAB + AS1 (page, 1b) CR_TAB + AS1 (jmp, 1b); + } + default: + abort (); + } + }") + + (define_insn_and_split "lshrdi3_split" + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (lshiftrt:DI (match_operand:DI 1 "nonimmediate_operand" "0, rS, ro") + (match_operand:QI 2 "const_int_operand" "n, n, n")))] + "((INTVAL (operands[2]) >= 32) || (INTVAL (operands[2]) == 16))" + "#" + "&& ip2k_reorg_split_dimode" + [(const_int 0)] + "{ + operands[3] = ip2k_get_high_half (operands[0], SImode); + operands[4] = ip2k_get_low_half (operands[0], SImode); + operands[5] = ip2k_get_high_half (operands[1], SImode); + + if (INTVAL (operands[2]) == 16) + { + operands[6] = ip2k_get_low_half (operands[1], SImode); + operands[7] = ip2k_get_high_half (operands[3], HImode); + operands[8] = ip2k_get_low_half (operands[3], HImode); + operands[9] = ip2k_get_high_half (operands[4], HImode); + operands[10] = ip2k_get_low_half (operands[4], HImode); + operands[11] = ip2k_get_high_half (operands[6], HImode); + operands[12] = ip2k_get_low_half (operands[5], HImode); + operands[13] = ip2k_get_high_half (operands[5], HImode); + emit_insn (gen_movhi (operands[10], operands[11])); + emit_insn (gen_movhi (operands[9], operands[12])); + emit_insn (gen_movhi (operands[8], operands[13])); + emit_insn (gen_movhi (operands[7], GEN_INT(0))); + } + else if (INTVAL (operands[2]) == 32) + { + emit_insn (gen_movsi (operands[4], operands[5])); + emit_insn (gen_movsi (operands[3], GEN_INT (0))); + } + else + { + operands[6] = GEN_INT (INTVAL (operands[2]) - 32); + emit_insn (gen_lshrsi3 (operands[4], operands[5], operands[6])); + emit_insn (gen_movsi (operands[3], GEN_INT (0))); + } + }") + + ;; + ;; Absolute value conversion instructions. + ;; + + (define_insn "absqi2" + [(set (match_operand:QI 0 "nonimmediate_operand" "=g") + (abs:QI (match_operand:QI 1 "nonimmediate_operand" "g")))] + "" + "mov\\tw,%1\;snb\\twreg,7\;sub\\tw,#0\;mov\\t%0,w") + + (define_insn "abssf2" + [(set (match_operand:SF 0 "nonimmediate_operand" "=ro") + (abs:SF (match_operand:SF 1 "nonimmediate_operand" "0")))] + "" + "clrb %A0,7" + [(set_attr "clobberw" "no")]) + + ;; + ;; Negate (X = 0 - Y) instructions. + ;; + + (define_insn_and_split "negqi2" + [(set (match_operand:QI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (neg:QI (match_operand:QI 1 "nonimmediate_operand" "0, rS, ro")))] + "" + "#" + "" + [(set (match_dup 0) + (not:QI (match_dup 1))) + (set (match_dup 0) + (plus:QI (match_dup 0) + (const_int 1)))] + "") + + (define_insn_and_split "neghi2" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (neg:HI (match_operand:HI 1 "nonimmediate_operand" "0, rS, ro")))] + "" + "#" + "" + [(set (match_dup 0) + (not:HI (match_dup 1))) + (set (match_dup 0) + (plus:HI (match_dup 0) + (const_int 1)))] + "") + + (define_insn_and_split "negsi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (neg:SI (match_operand:SI 1 "nonimmediate_operand" "0, rS, ro")))] + "" + "#" + "" + [(set (match_dup 0) + (not:SI (match_dup 1))) + (set (match_dup 0) + (plus:SI (match_dup 0) + (const_int 1)))] + "") + + (define_insn_and_split "negdi2" + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (neg:DI (match_operand:DI 1 "nonimmediate_operand" "0, rS, ro")))] + "" + "#" + "" + [(set (match_dup 0) + (not:DI (match_dup 1))) + (set (match_dup 0) + (plus:DI (match_dup 0) + (const_int 1)))] + "") + + ;; + ;; Bitwise not (one's complement) instructions. + ;; + + (define_insn "one_cmplqi2" + [(set (match_operand:QI 0 "nonimmediate_operand" "=g,roR, rS") + (not:QI (match_operand:QI 1 "general_operand" "0, rS,roR")))] + "" + "@ + not\\t%0 + not\\tw,%1\;mov\\t%0,w + not\\tw,%1\;mov\\t%0,w" + [(set_attr "skip" "yes,no,no") + (set_attr "clobberw" "no,yes,yes")]) + + (define_insn_and_split "one_cmplhi2" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (not:HI (match_operand:HI 1 "general_operand" "0, rS, ro")))] + "" + "#" + "(ip2k_reorg_split_himode)" + [(set (match_dup 3) + (not:QI (match_dup 4))) + (set (match_dup 5) + (not:QI (match_dup 6)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], QImode); + operands[4] = ip2k_get_high_half (operands[1], QImode); + operands[5] = ip2k_get_low_half (operands[0], QImode); + operands[6] = ip2k_get_low_half (operands[1], QImode); + }") + + (define_insn_and_split "one_cmplsi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (not:SI (match_operand:SI 1 "general_operand" "0, rS, ro")))] + "" + "#" + "(ip2k_reorg_split_simode)" + [(set (match_dup 3) + (not:HI (match_dup 4))) + (set (match_dup 5) + (not:HI (match_dup 6)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], HImode); + operands[4] = ip2k_get_high_half (operands[1], HImode); + operands[5] = ip2k_get_low_half (operands[0], HImode); + operands[6] = ip2k_get_low_half (operands[1], HImode); + }") + + (define_insn_and_split "one_cmpldi2" + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,&ro,&rS") + (not:DI (match_operand:DI 1 "general_operand" "0, rS, ro")))] + "" + "#" + "(ip2k_reorg_split_dimode)" + [(set (match_dup 3) + (not:SI (match_dup 4))) + (set (match_dup 5) + (not:SI (match_dup 6)))] + "{ + operands[3] = ip2k_get_high_half (operands[0], SImode); + operands[4] = ip2k_get_high_half (operands[1], SImode); + operands[5] = ip2k_get_low_half (operands[0], SImode); + operands[6] = ip2k_get_low_half (operands[1], SImode); + }") + + ;; + ;; Sign extension instructions. + ;; + + (define_insn "*push_extendqihi2" + [(set (match_operand:HI 0 "push_operand" "=<,<") + (sign_extend:HI (match_operand:QI 1 "general_operand" "roR,n")))] + "" + "@ + push\\t%1%<\;push\\t#0%<\;snb\\t%1,7\;not\\t1(SP)%>%> + push\\t%L1\;push\\t%H1" + [(set_attr "clobberw" "no,no")]) + + (define_insn "extendqihi2" + [(set (match_operand:HI 0 "nonimmediate_operand" "=rS,ro,ro") + (sign_extend:HI (match_operand:QI 1 "general_operand" "roR,rS, n")))] + "" + "*{ + switch (which_alternative) + { + case 0: + case 1: + if (register_operand (operands[0], HImode) + && register_operand (operands[1], QImode) + && REGNO (operands[0]) == (REGNO (operands[1]) - 1)) + return AS1 (clr, %H0) CR_TAB + AS2 (snb, %1, 7) CR_TAB + AS1 (not, %H0); + else + return AS2 (mov, w, %1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS1 (clr, %H0) CR_TAB + AS2 (snb, wreg, 7) CR_TAB + AS1 (not, %H0); + + case 2: + return AS2 (mov, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mov, %H0, w); + default: + abort (); + } + }") + + (define_insn "*push_extendhisi2" + [(set (match_operand:SI 0 "push_operand" "=<,<,<") + (sign_extend:SI (match_operand:HI 1 "general_operand" "roS,n,s")))] + "" + "@ + push\\t%L1%<\;push\\t%H1%<\;clr\\twreg\;snb\\t%H1,7\;not\\twreg\;push\\twreg\;push\\twreg%>%> + push\\t%D1\;push\\t%C1\;push\\t%B1\;push\\t%A1 + push\\t%L1\;push\\t%H1\;push\\t#0\;push\\t#0" + [(set_attr "clobberw" "yes,no,no")]) + + (define_insn "extendhisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro,rS,ro,ro") + (sign_extend:SI (match_operand:HI 1 "general_operand" "rS,ro, n, s")))] + "" + "@ + mov\\tw,%L1\;push\\t%H1%<\;pop\\t%C0%>\;mov\\t%D0,w\;clr\\twreg\;snb\\t%C0,7\;not\\twreg\;mov\\t%B0,w\;mov\\t%A0,w + mov\\tw,%L1\;push\\t%H1%<\;pop\\t%C0%>\;mov\\t%D0,w\;clr\\twreg\;snb\\t%C0,7\;not\\twreg\;mov\\t%B0,w\;mov\\t%A0,w + mov\\tw,%D1\;mov\\t%D0,w\;mov\\tw,%C1\;mov\\t%C0,w\;mov\\tw,%B1\;mov\\t%B0,w\;mov\\tw,%A1\;mov\\t%A0,w + mov\\tw,%L1\;push\\t%H1%<\;pop\\t%C0%>\;mov\\t%D0,w\;clr\\t%B0\;clr\\t%A0") + + (define_insn "*push_extendqisi2" + [(set (match_operand:SI 0 "push_operand" "=<,<") + (sign_extend:SI (match_operand:QI 1 "general_operand" "roR,n")))] + "" + "@ + push\\t%1%<\;clr\\twreg\;snb\\t%1,7\;not\\twreg\;push\\twreg\;push\\twreg\;push\\twreg%> + push\\t%D1\;push\\t%C1\;push\\t%B1\;push\\t%A1" + [(set_attr "clobberw" "yes,no")]) + + (define_insn "extendqisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro, rS,ro") + (sign_extend:SI (match_operand:QI 1 "general_operand" "rS,roR, n")))] + "" + "@ + mov\\tw,%1\;mov\\t%D0,w\;clr\\twreg\;snb\\t%1,7\;not\\twreg\;mov\\t%C0,w\;mov\\t%B0,w\;mov\\t%A0,w + mov\\tw,%1\;mov\\t%D0,w\;clr\\twreg\;snb\\t%1,7\;not\\twreg\;mov\\t%C0,w\;mov\\t%B0,w\;mov\\t%A0,w + mov\\tw,%D1\;mov\\t%D0,w\;mov\\tw,%C1\;mov\\t%C0,w\;mov\\tw,%B1\;mov\\t%B0,w\;mov\\tw,%A1\;mov\\t%A0,w") + + ;; + ;; Zero extension instructions. + ;; + + (define_insn "*push_zero_extendqihi2" + [(set (match_operand:HI 0 "push_operand" "=<") + (zero_extend:HI (match_operand:QI 1 "general_operand" "roRi")))] + "" + "push\\t%1\;push\\t#0" + [(set_attr "clobberw" "no")]) + + (define_insn_and_split "zero_extendqihi2" + [(set (match_operand:HI 0 "nonimmediate_operand" "=ro, rS") + (zero_extend:HI (match_operand:QI 1 "general_operand" "rSi,roRi")))] + "" + "#" + "ip2k_reorg_completed" + [(set (match_dup 3) (match_dup 1)) + (set (match_dup 2) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], QImode); + operands[3] = ip2k_get_low_half (operands[0], QImode); + }") + + (define_insn "*push_zero_extendhisi2" + [(set (match_operand:SI 0 "push_operand" "=<") + (zero_extend:SI (match_operand:HI 1 "general_operand" "roSi")))] + "" + "push\\t%L1%<\;push\\t%H1%>\;push\\t#0\;push\\t#0") + + (define_insn_and_split "zero_extendhisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro, rS") + (zero_extend:SI (match_operand:HI 1 "general_operand" "rSi,roi")))] + "" + "#" + "ip2k_reorg_completed" + [(set (match_dup 3) (match_dup 1)) + (set (match_dup 2) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], HImode); + operands[3] = ip2k_get_low_half (operands[0], HImode); + }") + + (define_insn "*push_zero_extendqisi2" + [(set (match_operand:SI 0 "push_operand" "=<") + (zero_extend:SI (match_operand:QI 1 "general_operand" "roRi")))] + "" + "push\\t%1\;push\\t#0\;push\\t#0\;push\\t#0" + [(set_attr "clobberw" "no")]) + + (define_insn_and_split "zero_extendqisi2" + [(set (match_operand:SI 0 "nonimmediate_operand" "=ro, rS") + (zero_extend:SI (match_operand:QI 1 "general_operand" "rSi,roRi")))] + "" + "#" + "ip2k_reorg_completed" + [(set (match_dup 3) (zero_extend:HI (match_dup 1))) + (set (match_dup 2) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], HImode); + operands[3] = ip2k_get_low_half (operands[0], HImode); + }") + + (define_insn "*push_zero_extendsidi2" + [(set (match_operand:DI 0 "push_operand" "=<") + (zero_extend:DI (match_operand:SI 1 "general_operand" "roSi")))] + "" + "push\\t%D1%<\;push\\t%C1%<\;push\\t%B1%<\;push\\t%A1%>%>%>\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0") + + (define_insn_and_split "zero_extendsidi2" + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro, rS") + (zero_extend:DI (match_operand:SI 1 "general_operand" "rSi,roi")))] + "" + "#" + "ip2k_reorg_completed" + [(set (match_dup 3) (match_dup 1)) + (set (match_dup 2) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], SImode); + operands[3] = ip2k_get_low_half (operands[0], SImode); + }") + + (define_insn "*push_zero_extendhidi2" + [(set (match_operand:DI 0 "push_operand" "=<") + (zero_extend:DI (match_operand:HI 1 "general_operand" "roSi")))] + "" + "push\\t%L1%<\;push\\t%H1%>\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0" + [(set_attr "clobberw" "no")]) + + (define_insn_and_split "zero_extendhidi2" + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro, rS") + (zero_extend:DI (match_operand:HI 1 "general_operand" "rSi,roi")))] + "" + "#" + "ip2k_reorg_completed" + [(set (match_dup 3) (zero_extend:SI (match_dup 1))) + (set (match_dup 2) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], SImode); + operands[3] = ip2k_get_low_half (operands[0], SImode); + }") + + (define_insn "*push_zero_extendqidi2" + [(set (match_operand:DI 0 "push_operand" "=<") + (zero_extend:DI (match_operand:QI 1 "general_operand" "roRi")))] + "" + "push\\t%1\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0\;push\\t#0" + [(set_attr "clobberw" "no")]) + + (define_insn_and_split "zero_extendqidi2" + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro, rS") + (zero_extend:DI (match_operand:QI 1 "general_operand" "rSi,roRi")))] + "" + "#" + "ip2k_reorg_completed" + [(set (match_dup 3) (zero_extend:SI (match_dup 1))) + (set (match_dup 2) (const_int 0))] + "{ + operands[2] = ip2k_get_high_half (operands[0], SImode); + operands[3] = ip2k_get_low_half (operands[0], SImode); + }") + + ;; + ;; Truncation instructions. + ;; + + (define_insn "truncsihi2" + [(set (match_operand:HI 0 "nonimmediate_operand" "=rS, ro") + (truncate:HI (match_operand:SI 1 "general_operand" "roi,rSi")))] + "" + "@ + mov\\tw,%D1\;push\\t%C1%<\;pop\\t%H0%>\;mov\\t%L0,w + mov\\tw,%D1\;push\\t%C1%<\;pop\\t%H0%>\;mov\\t%L0,w") + + (define_insn "truncsiqi2" + [(set (match_operand:QI 0 "nonimmediate_operand" "=rS, ro") + (truncate:QI (match_operand:SI 1 "general_operand" "roi,rSi")))] + "" + "@ + mov\\tw,%D1\;mov\\t%0,w + mov\\tw,%D1\;mov\\t%0,w") + + (define_insn "trunchiqi2" + [(set (match_operand:QI 0 "nonimmediate_operand" "=rS, ro") + (truncate:QI (match_operand:HI 1 "general_operand" "roi,rSi")))] + "" + "@ + mov\\tw,%L1\;mov\\t%0,w + mov\\tw,%L1\;mov\\t%0,w") + + ;; + ;; Compare with zero (test) instructions. + ;; + ;; As we don't have a particularly good set of condition codes we simply + ;; tagging our comparison operands for use later within our "compare + ;; and branch" instructions. + ;; + + (define_insn "tstqi" + [(set (cc0) + (match_operand:QI 0 "nonimmediate_operand" "roR"))] + "" + "* return ip2k_set_compare (operands[0], const0_rtx);") + + (define_insn "tsthi" + [(set (cc0) + (match_operand:HI 0 "nonimmediate_operand" "roS"))] + "" + "* return ip2k_set_compare (operands[0], const0_rtx);") + + (define_insn "tstsi" + [(set (cc0) + (match_operand:SI 0 "nonimmediate_operand" "roS"))] + "" + "* return ip2k_set_compare (operands[0], const0_rtx);") + + (define_insn "tstdi" + [(set (cc0) + (match_operand:DI 0 "nonimmediate_operand" "roS"))] + "" + "* return ip2k_set_compare (operands[0], const0_rtx);") + + ;; + ;; General value comparison instructions. + ;; + ;; As we don't have a particularly good set of condition codes we simply + ;; tagging our comparison operands for use later within our "compare + ;; and branch" instructions. + ;; + + (define_insn "cmpqi" + [(set (cc0) + (compare (match_operand:QI 0 "nonimmediate_operand" "roR, rS") + (match_operand:QI 1 "general_operand" "rSn,roRn")))] + "" + "* return ip2k_set_compare (operands[0], operands[1]);") + + (define_insn "cmphi" + [(set (cc0) + (compare (match_operand:HI 0 "nonimmediate_operand" "ro, rS") + (match_operand:HI 1 "general_operand" "rSn,ron")))] + "" + "* return ip2k_set_compare (operands[0], operands[1]);") + + (define_insn "cmpsi" + [(set (cc0) + (compare (match_operand:SI 0 "nonimmediate_operand" "ro, rS") + (match_operand:SI 1 "general_operand" "rSn,ron")))] + "" + "* return ip2k_set_compare (operands[0], operands[1]);") + + (define_insn "cmpdi" + [(set (cc0) + (compare (match_operand:DI 0 "nonimmediate_operand" "ro, rS") + (match_operand:DI 1 "general_operand" "rSn,ron")))] + "" + "* return ip2k_set_compare (operands[0], operands[1]);") + + ;; + ;; Conditional jump instructions. + ;; + + (define_expand "beq" + [(set (pc) + (if_then_else (eq (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "bne" + [(set (pc) + (if_then_else (ne (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "bge" + [(set (pc) + (if_then_else (ge (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "bgeu" + [(set (pc) + (if_then_else (geu (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "blt" + [(set (pc) + (if_then_else (lt (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "bltu" + [(set (pc) + (if_then_else (ltu (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + + (define_expand "ble" + [(set (pc) + (if_then_else (le (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "bleu" + [(set (pc) + (if_then_else (leu (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "bgt" + [(set (pc) + (if_then_else (gt (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + (define_expand "bgtu" + [(set (pc) + (if_then_else (gtu (cc0) (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "") + + + ;; Implementation of conditional jumps. + ;; + ;; The assumption is that a previous test or compare instruction will have + ;; provided the arguments to be compared to form cc0 and then we perform + ;; a compare and branch operation here. + ;; + (define_insn "*unsigned_cmp_branch" + [(set (pc) + (if_then_else (match_operator 1 "ip2k_unsigned_comparison_operator" + [(cc0) + (const_int 0)]) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* return ip2k_gen_unsigned_comp_branch (insn, GET_CODE (operands[1]), + operands[0]);") + + ;; Signed branches use Z, N or synthesized V. + ;; result is generated as 0 (LT), 1 (EQ), 2 (GT) + ;; + (define_insn "*signed_cmp_branch" + [(set (pc) + (if_then_else (match_operator 1 "ip2k_signed_comparison_operator" + [(cc0) + (const_int 0)]) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* return ip2k_gen_signed_comp_branch (insn, GET_CODE (operands[1]), + operands[0]);") + + ;; Reverse branch - reverse our comparison condition so that we can + ;; branch in the opposite sense. + ;; + (define_insn_and_split "*rvbranch" + [(set (pc) + (if_then_else (match_operator 1 "comparison_operator" [(cc0) + (const_int 0)]) + (pc) + (label_ref (match_operand 0 "" ""))))] + "" + "#" + "reload_completed" + [(set (pc) + (if_then_else (match_dup 2) + (label_ref (match_operand 0 "" "")) + (pc)))] + "{ + operands[2] = gen_rtx (reverse_condition (GET_CODE (operands[1])), + GET_MODE (operands[1]), + cc0_rtx, const0_rtx); + }") + + ;; This is a bit test and jump sequence. + ;; + (define_insn "*bit_cmpqi_branch" + [(set (pc) + (if_then_else (match_operator 0 "comparison_operator" + [(zero_extract + (match_operand:QI 1 "nonimmediate_operand" "roR") + (const_int 1) + (match_operand 2 "immediate_operand" "i")) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE)" + "*{ + if (GET_CODE (operands[0]) == EQ) + OUT_AS2 (sb, %1, %b2); + else + OUT_AS2 (snb, %1, %b2); + return AS1 (page, %3) CR_TAB + AS1 (jmp, %3); + }" + [(set_attr "clobberw" "no")]) + + ;; This is a bit test and jump sequence but for 16-bit operands. It's pretty + ;; certain that there must be a way to do this using a zero_extract operation, + ;; but this didn't seem to want to work so we use a bitwise and instead. This + ;; is exactly as efficient but the combiner handles this OK - the implementation + ;; here isn't quite as nice though. + ;; + (define_insn "*bit_cmphi_branch" + [(set + (pc) + (if_then_else + (match_operator 0 "comparison_operator" + [(and:HI (match_operand:HI 1 "nonimmediate_operand" "roS") + (match_operand 2 "const_int_operand" "n")) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "((GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE) + && find_one_set_bit_p (INTVAL (operands[2])) != -1)" + "*{ + int bp = find_one_set_bit_p (INTVAL (operands[2])); + if (INTVAL (operands[2]) >= 8) + operands[4] = GEN_INT (bp - 8); + else + operands[4] = GEN_INT (bp); + + if (GET_CODE (operands[0]) == EQ) + { + if (INTVAL (operands[2]) >= 8) + OUT_AS2 (sb, %H1, %b4); + else + OUT_AS2 (sb, %L1, %b4); + } + else + { + if (INTVAL (operands[2]) >= 8) + OUT_AS2 (snb, %H1, %b4); + else + OUT_AS2 (snb, %L1, %b4); + } + return AS1 (page, %3) CR_TAB + AS1 (jmp, %3); + }" + [(set_attr "clobberw" "no")]) + + ;; Add two operands, compare with a third and branch if equal or not-equal. + ;; + (define_insn "*add_and_comp_branch" + [(set + (pc) + (if_then_else + (match_operator 0 "comparison_operator" + [(plus:HI + (match_operand:HI 1 "nonimmediate_operand" "ro, rS, rS") + (match_operand:HI 2 "general_operand" "rSn,ron,rSn")) + (match_operand:HI 3 "general_operand" "rSn,rSn,ron")]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(GET_CODE (operands[0]) == EQ || GET_CODE (operands[0]) == NE)" + "*{ + OUT_AS2 (mov, w, %L2); + OUT_AS2 (add, w, %L1); + OUT_AS2 (cse, w, %L3); + if (GET_CODE (operands[0]) == EQ) + { + OUT_AS1 (page, 1f); + OUT_AS1 (jmp, 1f); + } + else + { + OUT_AS1 (page, %4); + OUT_AS1 (jmp, %4); + } + OUT_AS2 (mov, w, %H2); + OUT_AS2 (addc, w, %H1); + if (GET_CODE (operands[0]) == EQ) + OUT_AS2 (csne, w, %H3); + else + OUT_AS2 (cse, w, %H3); + OUT_AS1 (page, %4); + OUT_AS1 (jmp, %4); + return AS1 (1:, ); + }") + + ;; Unconditional jump + ;; + (define_insn "jump" + [(set (pc) + (label_ref (match_operand 0 "" "")))] + "" + "page\\t%0\;jmp\\t%0" + [(set_attr "clobberw" "no")]) + + ;; Indirect jump + ;; + (define_insn "indirect_jump" + [(set (pc) (match_operand:HI 0 "nonimmediate_operand" "ro"))] + "" + "page\\t1f\;call\\t1f\;1:mov\\tw,%H0\;mov\\tcallh,w\;mov\\tw,%L0\;mov\\tcalll,w\;ret") + + ;; + ;; Function call instructions. + ;; + + (define_expand "call" + [(call (match_operand 0 "" "") + (match_operand:HI 1 "" ""))] + "" + "") + + (define_insn "*call" + [(call (mem:HI (match_operand:HI 0 "general_operand" "i,roS")) + (match_operand:HI 1 "" ""))] + "" + "@ + page\\t%b0\;call\\t%b0 + push\\t%L0%<\;push\\t%H0%>\;page\\t__indcall\;call\\t__indcall") + + (define_expand "call_pop" + [(parallel [(call (match_operand 0 "" "") + (match_operand:HI 1 "" "")) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_operand:HI 3 "immediate_operand" "")))])] + "" + "") + + (define_insn "*call_pop" + [(call (mem:HI (match_operand:HI 0 "general_operand" "i,roS")) + (match_operand:HI 1 "" "")) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_operand:HI 2 "immediate_operand" "")))] + "" + "@ + page\\t%b0\;call\\t%b0 + push\\t%L0%<\;push\\t%H0%>\;page\\t__indcall\;call\\t__indcall") + + ;; Undo any splitting of operands that lead to redundant movhi3 instructions. + ;; + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (parallel [(call (mem:HI (match_dup 0)) + (match_operand:HI 2 "" "")) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_operand:HI 3 "immediate_operand" "")))])] + "" + [(parallel [(call (mem:HI (match_dup 1)) + (match_dup 2)) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_dup 3)))])] + "") + + (define_expand "call_value" + [(set (match_operand 0 "" "") + (call (match_operand 1 "" "") + (match_operand:HI 2 "" "")))] + "" + "") + + (define_insn "*call_value" + [(set (match_operand 0 "" "") + (call (mem:HI (match_operand:HI 1 "general_operand" "i,roS")) + (match_operand:HI 2 "" "")))] + "" + "@ + page\\t%b1\;call\\t%b1 + push\\t%L1%<\;push\\t%H1%>\;page\\t__indcall\;call\\t__indcall") + + (define_expand "call_value_pop" + [(parallel [(set (match_operand 0 "" "") + (call (match_operand 1 "" "") + (match_operand:HI 2 "" ""))) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_operand:HI 4 "immediate_operand" "")))])] + "" + "") + + (define_insn "*call_value_pop" + [(set (match_operand 0 "" "") + (call (mem:HI (match_operand:HI 1 "general_operand" "i,roS")) + (match_operand:HI 2 "" ""))) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_operand:HI 3 "immediate_operand" "")))] + "" + "@ + page\\t%b1\;call\\t%b1 + push\\t%L1%<\;push\\t%H1%>\;page\\t__indcall\;call\\t__indcall") + + ;; Undo any splitting of operands that lead to redundant movhi3 instructions. + ;; + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (parallel [(set (match_operand 2 "" "") + (call (mem:HI (match_dup 0)) + (match_operand:HI 3 "" ""))) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_operand:HI 4 "immediate_operand" "")))])] + "" + [(parallel [(set (match_dup 2) + (call (mem:HI (match_dup 1)) + (match_dup 3))) + (set (reg:HI 6) + (plus:HI (reg:HI 6) + (match_dup 4)))])] + "") + + ;; Nop instruction. + ;; + ;; We don't really want nops to appear in our code so just insert an comment. + ;; + (define_insn "nop" + [(const_int 0)] + "" + "; nop") + + + ;; SEQ instruction + ;; + (define_insn "seq" + [(set (match_operand:QI 0 "register_operand" "=r") + (eq:QI (cc0) (const_int 0)))] + "" + "* return ip2k_gen_sCOND (insn, EQ, operands[0]);") + + ;; Tweak SEQ if we can adjust the output operand. Note that we have to do + ;; this via a peephole because we need to ensure that any reloads have taken + ;; place before we try to do this. If there's a reload in order to get our + ;; actual result operand then this peephole won't match. + ;; + (define_peephole + [(set (match_operand:QI 0 "register_operand" "") + (eq:QI (cc0) (const_int 0))) + (set (reg:QI 10) + (match_dup 0)) + (set (match_operand:QI 1 "nonimmediate_operand" "") + (reg:QI 10))] + "find_regno_note (insn, REG_DEAD, REGNO (operands[0]))" + "* return ip2k_gen_sCOND (insn, EQ, operands[1]);") + + ;; Another peephole match handles the same merge as above but for cases where + ;; we're emulating memory accesses via IP and an offset. + ;; + (define_peephole + [(set (match_operand:QI 0 "register_operand" "") + (eq:QI (cc0) (const_int 0))) + (set (reg:QI 10) + (match_dup 0)) + (set (mem:QI (plus:HI (reg:HI 4) + (match_operand:QI 1 "const_int_operand" ""))) + (reg:QI 10))] + "(find_regno_note (insn, REG_DEAD, REGNO (operands[0])) + && (INTVAL (operands[1]) < 0x100))" + "*{ + if (INTVAL (operands[1]) == 1) + OUT_AS1 (inc, ipl); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, ipl, w); + } + ip2k_gen_sCOND (insn, EQ, + gen_rtx_MEM (QImode, gen_rtx_REG (HImode, REG_IP))); + if (find_regno_note (insn, REG_DEAD, REG_IP)) + { + if (INTVAL (operands[1]) == 1) + OUT_AS1 (dec, ipl); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (sub, ipl, w); + } + } + return \"\"; + }") + + ;; SNE instruction + ;; + (define_insn "sne" + [(set (match_operand:QI 0 "register_operand" "=r") + (ne:QI (cc0) (const_int 0)))] + "" + "* return ip2k_gen_sCOND (insn, NE, operands[0]);") + + ;; Tweak SNE if we can adjust the output operand. Note that we have to do + ;; this via a peephole because we need to ensure that any reloads have taken + ;; place before we try to do this. If there's a reload in order to get our + ;; actual result operand then this peephole won't match. + ;; + (define_peephole + [(set (match_operand:QI 0 "register_operand" "") + (ne:QI (cc0) (const_int 0))) + (set (reg:QI 10) + (match_dup 0)) + (set (match_operand:QI 1 "nonimmediate_operand" "") + (reg:QI 10))] + "find_regno_note (PREV_INSN (insn), REG_DEAD, REGNO (operands[0]))" + "* return ip2k_gen_sCOND (insn, NE, operands[1]);") + + ;; Another peephole match handles the same merge as above but for cases where + ;; we're emulating memory accesses via IP and an offset. + ;; + (define_peephole + [(set (match_operand:QI 0 "register_operand" "") + (ne:QI (cc0) (const_int 0))) + (set (reg:QI 10) + (match_dup 0)) + (set (mem:QI (plus:HI (reg:HI 4) + (match_operand:QI 1 "const_int_operand" ""))) + (reg:QI 10))] + "(find_regno_note (PREV_INSN (insn), REG_DEAD, REGNO (operands[0])) + && (INTVAL (operands[1]) < 0x100))" + "*{ + if (INTVAL (operands[1]) == 1) + OUT_AS1 (inc, ipl); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, ipl, w); + } + ip2k_gen_sCOND (insn, NE, + gen_rtx_MEM (QImode, gen_rtx_REG (HImode, REG_IP))); + if (find_regno_note (insn, REG_DEAD, REG_IP)) + { + if (INTVAL (operands[1]) == 1) + OUT_AS1 (dec, ipl); + else + { + OUT_AS2 (mov, w, %1); + OUT_AS2 (sub, ipl, w); + } + } + return \"\"; + }") + + + + ;; Case Dispatch Table Support. + ;; + ;; Called with 5 arguments: + ;; + ;; 0. case index + ;; 1. lower bound (const_int) + ;; 2. range (const_int) + ;; 3. label before dispatch table + ;; 4. out-of-bounds label + ;; + ;; With the IP2k we actually really want to do a caseqi but that + ;; doesn't exist so we cheat and make it look (to the core of gcc) + ;; like we're going to do the SImode stuff but then truncate it + ;; away when it's no longer looking :-) + ;; + (define_expand "casesi" + [(set (match_dup 5) + (truncate:QI (match_operand:SI 0 "general_operand" "g"))) + (set (match_dup 5) + (minus:QI (match_dup 5) + (match_operand 1 "const_int_operand" "n"))) + (set (cc0) + (compare (match_dup 5) + (match_operand 2 "const_int_operand" "n"))) + (set (pc) + (if_then_else (gtu (cc0) + (const_int 0)) + (label_ref (match_operand 4 "" "")) + (pc))) + (parallel [(set (pc) + (plus:HI (pc) + (zero_extend:HI (match_dup 5)))) + (use (label_ref (match_operand 3 "" ""))) + (use (match_dup 2))])] + "" + "{ + operands[5] = gen_reg_rtx (QImode); + }") + + ;; There are TWO instructions per dispatch entry (page & jump), so we + ;; multiply by two even though our RTL only indicates a simple addition. + ;; Subsequent linker relaxation may well restore this back to what the + ;; RTL says though! + ;; + ;; Note that we handle tables with 128 or more entries differently! + ;; + (define_insn "*casedispatch" + [(set (pc) + (plus:HI (pc) (zero_extend:HI + (match_operand:QI 2 "nonimmediate_operand" "roR,roR")))) + (use (label_ref (match_operand 0 "" ""))) + (use (match_operand 1 "const_int_operand" "K, n"))] + "" + "@ + mov\\tw,%2\;add\\tw,wreg\;add\\tpcl,w + mov\\tw,%2\;push\\t%0%<\;push\\t#0%<\;add\\tw,wreg\;snc\;inc\\t1(SP)\;add\\t2(SP),w\;snc\;inc\\t1(SP)\;page\\t__indcall\;jmp\\t__indcall%>%>") + + ;; Handle cleaning up the switch statement stuff. We can eliminate some + ;; register moves in some cases. Note that our pattern is slightly different + ;; to the casesi pattern because our minus has become a plus! + ;; + ;; Note that as of 07-FEB-2002 we must have this pattern as it is because + ;; linker relaxation will not work any other way. + ;; + (define_peephole + [(set (reg:QI 10) + (plus:QI (match_operand 5 "nonimmediate_operand" "rS,rS,rS,rS") + (match_operand 1 "const_int_operand" "M, n, M, n"))) + (set (match_operand:QI 0 "register_operand" "+r, r, r, r") + (reg:QI 10)) + (set (cc0) + (compare (match_dup 0) + (match_operand 2 "const_int_operand" "K, K, n, n"))) + (set (pc) + (if_then_else (gtu (cc0) + (const_int 0)) + (label_ref (match_operand 4 "" "")) + (pc))) + (parallel [(set (pc) + (plus:HI (pc) + (zero_extend:HI (match_dup 0)))) + (use (label_ref (match_operand 3 "" ""))) + (use (match_dup 2))])] + "(INTVAL (operands[1]) != 0 + && find_regno_note (insn, REG_DEAD, REGNO (operands[0])))" + "*{ + switch (which_alternative) + { + case 0: + case 2: + OUT_AS2 (dec, w, %5); + break; + + case 1: + case 3: + OUT_AS2 (mov, w, %1); + OUT_AS2 (add, w, %5); + break; + default: + abort (); + } + + OUT_AS2 (cmp, w, %2); + OUT_AS1 (sc, ); + OUT_AS1 (page, %4); + OUT_AS1 (jmp, %4); + + switch (which_alternative) + { + case 0: + case 1: + OUT_AS2 (add, w, WREG); + OUT_AS2 (add, pcl, w); + return \"\"; + + case 2: + case 3: + OUT_AS1 (push, %0%<); + OUT_AS1 (push, #0%<); + OUT_AS2 (add, w, WREG); + OUT_AS1 (snc, ); + OUT_AS1 (inc, 1(SP)); + OUT_AS2 (add, 2(SP), w); + OUT_AS1 (snc, ); + OUT_AS1 (inc, 1(SP)); + OUT_AS1 (page, __indcall); + OUT_AS1 (jmp, __indcall%>%>); + return \"\"; + default: + abort (); + } + }") + + (define_peephole + [(set (cc0) + (compare (match_operand:QI 0 "nonimmediate_operand" "rS,rS") + (match_operand 1 "const_int_operand" "K, n"))) + (set (pc) + (if_then_else (gtu (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + (parallel [(set (pc) + (plus:HI (pc) + (zero_extend:HI (match_dup 0)))) + (use (label_ref (match_operand 3 "" ""))) + (use (match_dup 1))])] + "" + "@ + mov\\tw,%0\;cmp\\tw,%1\;sc\;page\\t%2\;jmp\\t%2\;add\\tw,wreg\;add\\tpcl,w + mov\\tw,%0\;cmp\\tw,%1\;sc\;page\\t%2\;jmp\\t%2\;push\\t%0%<\;push\\t#0%<\;add\\tw,wreg\;snc\;inc\\t1(SP)\;add\\t2(SP),w\;snc\;inc\\t1(SP)\;page\\t__indcall\;jmp\\t__indcall%>%>") + + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+roR") + (plus:HI (match_dup 0) + (const_int -1))) + (set (cc0) + (compare (match_dup 0) + (match_operand 3 "const_int_operand" "n"))) + (set (pc) + (if_then_else (match_operator 2 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 1 "" "")) + (pc)))] + "((GET_CODE (operands[2]) == EQ || GET_CODE (operands[2]) == NE) + && ((INTVAL (operands[3]) == -1) || (INTVAL (operands[3]) == 65535)))" + "*{ + OUT_AS2 (mov, w, #255); + OUT_AS2 (add, %L0, w); + if ((GET_CODE (operands[0]) == REG) + && ((REGNO (operands[0]) == REG_DP) + || (REGNO (operands[0]) == REG_IP) + || (REGNO (operands[0]) == REG_SP))) + { + OUT_AS2 (add, %H0, w); + } + else + { + OUT_AS2 (addc, %H0, w); + } + if (GET_CODE (operands[2]) == EQ) + OUT_AS1 (sc, ); + else + OUT_AS1 (snc, ); + return AS1 (page, %1) CR_TAB + AS1 (jmp, %1); + }") + + (define_peephole + [(set (match_operand:QI 0 "nonimmediate_operand" "+rS") + (plus:QI (match_dup 0) + (const_int -1))) + (set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_operator 2 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 1 "" "")) + (pc)))] + "(GET_CODE (operands[2]) == EQ || GET_CODE (operands[2]) == NE)" + "*{ + if (GET_CODE (operands[2]) == EQ) + OUT_AS1 (decsnz, %0); + else + OUT_AS1 (decsz, %0); + return AS1 (page, %1) CR_TAB + AS1 (jmp, %1); + }") + + ;; Handle move and compare-with-zero operations - we can reuse w across + ;; the two operations. + ;; + (define_peephole + [(set (reg:QI 10) + (match_operand:QI 1 "nonimmediate_operand" "rS")) + (set (match_operand:QI 0 "nonimmediate_operand" "=rS") + (reg:QI 10)) + (set (cc0) + (match_operand:QI 2 "nonimmediate_operand" "rS")) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "((GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE) + && (rtx_equal_p (operands[0], operands[2]) + || rtx_equal_p (operands[1], operands[2])))" + "*{ + OUT_AS2 (mov, w, %1); + OUT_AS2 (mov, %0, w); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + }") + + ;; Handle move and compare-with-zero operations - we can reuse w across + ;; the two operations. + ;; + (define_peephole + [(set (reg:QI 10) + (match_operand:QI 1 "nonimmediate_operand" "uS")) + (set (match_operand:QI 0 "nonimmediate_operand" "+uS") + (reg:QI 10)) + (set (cc0) + (match_operand:SI 2 "nonimmediate_operand" "uS")) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "((GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE) + && (rtx_equal_p (operands[0], + ip2k_get_high_half (ip2k_get_high_half (operands[2], + HImode), QImode)) + || rtx_equal_p (operands[1], + ip2k_get_high_half (ip2k_get_high_half (operands[2], + HImode), + QImode))))" + "*{ + OUT_AS2 (mov, w, %1); + OUT_AS2 (mov, %0, w); + OUT_AS2 (or, w, %B2); + OUT_AS2 (or, w, %C2); + OUT_AS2 (or, w, %D2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + }") + + ;; Handle move and compare-with-zero operations - we can reuse w across + ;; the two operations. + ;; + (define_peephole + [(set (reg:QI 10) + (match_operand:QI 1 "nonimmediate_operand" "uS")) + (set (match_operand:QI 0 "nonimmediate_operand" "+uS") + (reg:QI 10)) + (set (cc0) + (match_operand:HI 2 "nonimmediate_operand" "uS")) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "((GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE) + && (rtx_equal_p (operands[0], ip2k_get_high_half (operands[2], QImode)) + || rtx_equal_p (operands[1], ip2k_get_high_half (operands[2], QImode)) + || rtx_equal_p (operands[0], ip2k_get_low_half (operands[2], QImode)) + || rtx_equal_p (operands[1], ip2k_get_low_half (operands[2],QImode))))" + "*{ + OUT_AS2 (mov, w, %1); + OUT_AS2 (mov, %0, w); + if (rtx_equal_p (operands[0], ip2k_get_high_half (operands[2], QImode)) + || rtx_equal_p (operands[1], ip2k_get_high_half (operands[2], QImode))) + OUT_AS2 (or, w, %L2); + else + OUT_AS2 (or, w, %H2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + }") + + ;; Handle move and compare-with-zero operations - we can reuse w across + ;; the two operations. + ;; + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+uo") + (match_operand:HI 1 "nonimmediate_operand" "uo")) + (set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_operator 2 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "(GET_CODE (operands[2]) == EQ || GET_CODE (operands[2]) == NE)" + "*{ + OUT_AS2 (mov, w, %H1); + OUT_AS1 (push, %L1%<); + OUT_AS1 (pop, %L0%>); + OUT_AS2 (mov, %H0, w); + OUT_AS2 (or, w, %L0); + if (GET_CODE (operands[2]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %3) CR_TAB + AS1 (jmp, %3); + }") + + ;; Handle move and compare-with-zero operations - we can reuse w across + ;; the two operations. + ;; + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+uo") + (match_operand:HI 1 "nonimmediate_operand" "uo")) + (set (cc0) + (match_dup 1)) + (set (pc) + (if_then_else (match_operator 2 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "(GET_CODE (operands[2]) == EQ || GET_CODE (operands[2]) == NE)" + "*{ + OUT_AS2 (mov, w, %H1); + OUT_AS1 (push, %L1%<); + OUT_AS1 (pop, %L0%>); + OUT_AS2 (mov, %H0, w); + OUT_AS2 (or, w, %L0); + if (GET_CODE (operands[2]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %3) CR_TAB + AS1 (jmp, %3); + }") + + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+f,bqdo") + (mem:HI (reg:HI 4))) + (set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_operator 1 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "(GET_CODE (operands[1]) == EQ || GET_CODE (operands[1]) == NE)" + "*{ + switch (which_alternative) + { + case 0: + OUT_AS1 (push, (IP)); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, ipl, w); + OUT_AS1 (pop, iph); + OUT_AS2 (or, w, iph); + if (GET_CODE (operands[1]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %2) CR_TAB + AS1 (jmp, %2); + + case 1: + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, %H0, w); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, %L0, w); + if (!find_regno_note (insn, REG_DEAD, REG_IP)) + OUT_AS1 (dec, ipl); + OUT_AS2 (or, w, %H0); + if (GET_CODE (operands[1]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %2) CR_TAB + AS1 (jmp, %2); + default: + abort (); + } + }") + + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+f,bqdo") + (mem:HI (reg:HI 4))) + (set (cc0) + (mem:HI (reg:HI 4))) + (set (pc) + (if_then_else (match_operator 1 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "(GET_CODE (operands[1]) == EQ || GET_CODE (operands[1]) == NE)" + "*{ + switch (which_alternative) + { + case 0: + OUT_AS1 (push, (IP)); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, ipl, w); + OUT_AS1 (pop, iph); + OUT_AS2 (or, w, iph); + if (GET_CODE (operands[1]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %2) CR_TAB + AS1 (jmp, %2); + + case 1: + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, %H0, w); + OUT_AS1 (inc, ipl); + OUT_AS2 (mov, w, (IP)); + OUT_AS2 (mov, %L0, w); + if (!find_regno_note (insn, REG_DEAD, REG_IP)) + OUT_AS1 (dec, ipl); + OUT_AS2 (or, w, %H0); + if (GET_CODE (operands[1]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %2) CR_TAB + AS1 (jmp, %2); + default: + abort (); + } + }") + + ;; Handle move-twice and compare-with-zero operations - we can reuse w across + ;; the two operations. + ;; + (define_peephole + [(parallel [(set (match_operand:HI 0 "ip2k_gen_operand" "=uS") + (match_operand:HI 1 "ip2k_gen_operand" "uS")) + (set (match_operand:HI 2 "ip2k_gen_operand" "=uS") + (match_dup 1))]) + (set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE)" + "*{ + if ((REG_P (operands[0]) + && !(ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), 2) + && ip2k_xexp_not_uses_reg_p (operands[2], + REGNO (operands[0]), 2))) + || (REG_P (operands[2]) + && !(ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[2]), 2) + && ip2k_xexp_not_uses_reg_p (operands[1], + REGNO (operands[2]), 2)))) + { + OUT_AS2 (mov, w, %L1); + OUT_AS1 (push, %H1%<); + OUT_AS1 (push, %H1%<); + OUT_AS1 (pop, %H0%>); + OUT_AS2 (mov, %L0, w); + OUT_AS1 (pop, %H2%>); + OUT_AS2 (mov, %L2, w); + OUT_AS2 (or, w, %H2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + } + else + { + OUT_AS2 (mov, w, %L1); + OUT_AS2 (mov, %L0, w); + OUT_AS2 (mov, %L2, w); + OUT_AS2 (mov, w, %H1); + OUT_AS2 (mov, %H0, w); + OUT_AS2 (mov, %H2, w); + OUT_AS2 (or, w, %L2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + } + }") + + (define_peephole + [(parallel [(set (match_operand:HI 0 "ip2k_gen_operand" "=uS") + (match_operand:HI 1 "ip2k_gen_operand" "uS")) + (set (match_operand:HI 2 "ip2k_gen_operand" "=uS") + (match_dup 1))]) + (set (cc0) + (match_dup 2)) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE)" + "*{ + if ((REG_P (operands[0]) + && !(ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), 2) + && ip2k_xexp_not_uses_reg_p (operands[2], + REGNO (operands[0]), 2))) + || (REG_P (operands[2]) + && !(ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[2]), 2) + && ip2k_xexp_not_uses_reg_p (operands[1], + REGNO (operands[2]), 2)))) + { + OUT_AS2 (mov, w, %L1); + OUT_AS1 (push, %H1%<); + OUT_AS1 (push, %H1%<); + OUT_AS1 (pop, %H0%>); + OUT_AS2 (mov, %L0, w); + OUT_AS1 (pop, %H2%>); + OUT_AS2 (mov, %L2, w); + OUT_AS2 (or, w, %H2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + } + else + { + OUT_AS2 (mov, w, %L1); + OUT_AS2 (mov, %L0, w); + OUT_AS2 (mov, %L2, w); + OUT_AS2 (mov, w, %H1); + OUT_AS2 (mov, %H0, w); + OUT_AS2 (mov, %H2, w); + OUT_AS2 (or, w, %L2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + } + }") + + ;; Handle move and compare-with-zero operations - we can reuse w across + ;; the two operations. + ;; + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+uo") + (match_operand:HI 1 "nonimmediate_operand" "uo")) + (set (cc0) + (match_operand:SI 2 "nonimmediate_operand" "uo")) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "((GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE) + && (rtx_equal_p (operands[0], ip2k_get_high_half (operands[2], HImode)) + || rtx_equal_p (operands[1], + ip2k_get_high_half (operands[2], HImode))))" + "*{ + OUT_AS2 (mov, w, %H1); + OUT_AS1 (push, %L1%<); + OUT_AS1 (pop, %L0%>); + OUT_AS2 (mov, %H0, w); + OUT_AS2 (or, w, %B0); + OUT_AS2 (or, w, %C0); + OUT_AS2 (or, w, %D0); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + }") + + ;; Handle bitwise-and and compare-with-zero operations on bytes. + ;; + (define_peephole + [(set (reg:QI 10) + (match_operand:QI 2 "general_operand" " g")) + (set (reg:QI 10) + (and:QI (match_operand:QI 1 "general_operand" "g") + (reg:QI 10))) + (set (match_operand:QI 0 "register_operand" "+r") + (reg:QI 10)) + (set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(find_regno_note (PREV_INSN (insn), REG_DEAD, REGNO (operands[0])) + && (GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE))" + "*{ + OUT_AS2 (mov, w, %1); + OUT_AS2 (and, w, %2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + }") + + ;; Handle bitwise-xor and compare-with-zero operations on bytes. + ;; + (define_peephole + [(set (match_operand:QI 0 "register_operand" "+r") + (xor:QI (match_operand:QI 1 "general_operand" "g") + (match_operand:QI 2 "general_operand" "g"))) + (set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(find_regno_note (PREV_INSN (insn), REG_DEAD, REGNO (operands[0])) + && (GET_CODE (operands[3]) == EQ || GET_CODE (operands[3]) == NE))" + "*{ + OUT_AS2 (mov, w, %1); + OUT_AS2 (xor, w, %2); + if (GET_CODE (operands[3]) == EQ) + OUT_AS1 (snz, ); + else + OUT_AS1 (sz, ); + return AS1 (page, %4) CR_TAB + AS1 (jmp, %4); + }") + + ;; Cope with reload's vagaries. + ;; + + (define_insn "*pushqi_reload_popqi" + [(set (match_operand:QI 0 "ip2k_nonsp_reg_operand" "=u, u") + (match_operand:QI 1 "ip2k_short_operand" "S, S")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "i,ro")) + (set (match_operand:QI 3 "ip2k_short_operand" "=S, S") + (match_dup 0))] + "" + "@ + push\\t%1%<\;loadh\\t%x2\;loadl\\t%x2\;pop\\t%3%> + push\\t%1%<\;mov\\tw,%L2\;push\\t%H2\;pop\\tdph\;mov\\tdpl,w\;pop\\t%3%>" + ) + + (define_peephole2 + [(set (match_operand:QI 0 "ip2k_nonsp_reg_operand" "") + (match_operand:QI 1 "ip2k_short_operand" "")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "")) + (set (match_operand:QI 3 "ip2k_short_operand" "") + (match_dup 0))] + "(ip2k_reorg_split_himode + && peep2_reg_dead_p (3, operands[0]) + && ip2k_address_uses_reg_p (operands[1], REG_DP) + && ip2k_address_uses_reg_p (operands[3], REG_DP) + && !(ip2k_address_uses_reg_p (operands[2], REG_SP) + && (GET_CODE (XEXP (operands[2], 0)) == PLUS) + && (INTVAL (XEXP (XEXP (operands[2], 0), 1)) >= 126)) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (reg:HI 12) + (match_dup 2)) + (set (match_dup 3) + (match_dup 0))])] + "") + + (define_insn "*pushhi_reload_pophi" + [(set (match_operand:HI 0 "ip2k_nonsp_reg_operand" "=u, u") + (match_operand:HI 1 "ip2k_short_operand" "S, S")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "i,ro")) + (set (match_operand:HI 3 "ip2k_short_operand" "=S, S") + (match_dup 0))] + "" + "@ + push\\t%L1%<\;push\\t%H1%<\;loadh\\t%x2\;loadl\\t%x2\;pop\\t%H3%>\;pop\\t%L3%> + push\\t%L1%<\;push\\t%H1%<\;mov\\tw,%L2\;push\\t%H2\;pop\\tdph\;mov\\tdpl,w\;pop\\t%H3%>\;pop\\t%L3%>" + ) + + (define_peephole2 + [(set (match_operand:HI 0 "ip2k_nonsp_reg_operand" "") + (match_operand:HI 1 "ip2k_short_operand" "")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "")) + (set (match_operand:HI 3 "ip2k_short_operand" "") + (match_dup 0))] + "(ip2k_reorg_split_simode + && peep2_reg_dead_p (3, operands[0]) + && ip2k_address_uses_reg_p (operands[1], REG_DP) + && ip2k_address_uses_reg_p (operands[3], REG_DP) + && !(ip2k_address_uses_reg_p (operands[2], REG_SP) + && (GET_CODE (XEXP (operands[2], 0)) == PLUS) + && (INTVAL (XEXP (XEXP (operands[2], 0), 1)) >= 125)) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (reg:HI 12) + (match_dup 2)) + (set (match_dup 3) + (match_dup 0))])] + "") + + (define_insn "*pushsi_reload_popsi" + [(set (match_operand:SI 0 "ip2k_nonsp_reg_operand" "=u, u") + (match_operand:SI 1 "ip2k_short_operand" "S, S")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "i,ro")) + (set (match_operand:SI 3 "ip2k_short_operand" "=S, S") + (match_dup 0))] + "" + "@ + push\\t%D1%<\;push\\t%C1%<\;push\\t%B1%<\;push\\t%A1%<\;loadh\\t%x2\;loadl\\t%x2\;pop\\t%A3%>\;pop\\t%B3%>\;pop\\t%C3%>\;pop\\t%D3%> + push\\t%D1%<\;push\\t%C1%<\;push\\t%B1%<\;push\\t%A1%<\;mov\\tw,%L2\;push\\t%H2\;pop\\tdph\;mov\\tdpl,w\;pop\\t%A3%>\;pop\\t%B3%>\;pop\\t%C3%>\;pop\\t%D3%>" + ) + + (define_peephole2 + [(set (match_operand:SI 0 "ip2k_nonsp_reg_operand" "") + (match_operand:SI 1 "ip2k_short_operand" "")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "")) + (set (match_operand:SI 3 "ip2k_short_operand" "") + (match_dup 0))] + "(ip2k_reorg_split_dimode + && peep2_reg_dead_p (3, operands[0]) + && ip2k_address_uses_reg_p (operands[1], REG_DP) + && ip2k_address_uses_reg_p (operands[3], REG_DP) + && ! (ip2k_address_uses_reg_p (operands[2], REG_SP) + && (GET_CODE (XEXP (operands[2], 0)) == PLUS) + && (INTVAL (XEXP (XEXP (operands[2], 0), 1)) >= 123)))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (reg:HI 12) + (match_dup 2)) + (set (match_dup 3) + (match_dup 0))])] + "") + + (define_insn "*pushdi_reload_popdi" + [(set (match_operand:DI 0 "ip2k_nonsp_reg_operand" "=u, u") + (match_operand:DI 1 "ip2k_short_operand" "S, S")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "i,ro")) + (set (match_operand:DI 3 "ip2k_short_operand" "=S, S") + (match_dup 0))] + "" + "@ + push\\t%S1%<\;push\\t%T1%<\;push\\t%U1%<\;push\\t%V1%<\;push\\t%W1%<\;push\\t%X1%<\;push\\t%Y1%<\;push\\t%Z1%<\;loadh\\t%x2\;loadl\\t%x2\;pop\\t%Z3%>\;pop\\t%Y3%>\;pop\\t%X3%>\;pop\\t%W3%>\;pop\\t%V3%>\;pop\\t%U3%>\;pop\\t%T3%>\;pop\\t%S3%> + push\\t%S1%<\;push\\t%T1%<\;push\\t%U1%<\;push\\t%V1%<\;push\\t%W1%<\;push\\t%X1%<\;push\\t%Y1%<\;push\\t%Z1%<\;mov\\tw,%L2\;push\\t%H2\;pop\\tdph\;mov\\tdpl,w\;pop\\t%Z3%>\;pop\\t%Y3%>\;pop\\t%X3%>\;pop\\t%W3%>\;pop\\t%V3%>\;pop\\t%U3%>\;pop\\t%T3%>\;pop\\t%S3%>" + ) + + (define_peephole2 + [(set (match_operand:DI 0 "ip2k_nonsp_reg_operand" "") + (match_operand:DI 1 "ip2k_short_operand" "")) + (set (reg:HI 12) + (match_operand:HI 2 "general_operand" "")) + (set (match_operand:DI 3 "ip2k_short_operand" "") + (match_dup 0))] + "((ip2k_reorg_in_progress || ip2k_reorg_completed) + && peep2_reg_dead_p (3, operands[0]) + && ip2k_address_uses_reg_p (operands[1], REG_DP) + && ip2k_address_uses_reg_p (operands[3], REG_DP) + && ! (ip2k_address_uses_reg_p (operands[2], REG_SP) + && (GET_CODE (XEXP (operands[2], 0)) == PLUS) + && (INTVAL (XEXP (XEXP (operands[2], 0), 1)) >= 119)))" + [(parallel [(set (match_dup 0) + (match_dup 1)) + (set (reg:HI 12) + (match_dup 2)) + (set (match_dup 3) + (match_dup 0))])] + "") + + ;; FIXME: Disabled because in lshiftrt:SI op1 must match op0 + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(match_operand 1 "general_operand" "") + (match_operand 2 "general_operand" "")])) + (set (match_operand 4 "nonimmediate_operand" "") + (match_dup 0))] + "0 && (peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 4) + (match_op_dup 3 [(match_dup 1) + (match_dup 2)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(zero_extend:HI + (match_operand 1 "general_operand" "")) + (match_operand 2 "general_operand" "")])) + (set (match_operand 4 "nonimmediate_operand" "") + (match_dup 0))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 4) + (match_op_dup 3 [(zero_extend:HI (match_dup 1)) + (match_dup 2)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(match_operand 1 "general_operand" "") + (zero_extend:HI + (match_operand 2 "general_operand" ""))])) + (set (match_operand 4 "nonimmediate_operand" "") + (match_dup 0))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 4) + (match_op_dup 3 [(match_dup 1) + (zero_extend:HI (match_dup 2))]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(zero_extend:SI + (match_operand 1 "general_operand" "")) + (match_operand 2 "general_operand" "")])) + (set (match_operand 4 "nonimmediate_operand" "") + (match_dup 0))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 4) + (match_op_dup 3 [(zero_extend:SI (match_dup 1)) + (match_dup 2)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(match_operand 1 "general_operand" "") + (zero_extend:SI + (match_operand 2 "general_operand" ""))])) + (set (match_operand 4 "nonimmediate_operand" "") + (match_dup 0))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 4) + (match_op_dup 3 [(match_dup 1) + (zero_extend:SI (match_dup 2))]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (match_operand 2 "nonimmediate_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(match_operand 4 "general_operand" "") + (match_dup 0)]))] + "0 && ((peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (operands[0], operands[2])) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(match_dup 4) + (match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (match_operand 2 "nonimmediate_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(zero_extend:HI + (match_operand 4 "general_operand" "")) + (match_dup 0)]))] + "((peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (operands[0], operands[2])) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(zero_extend:HI (match_dup 4)) + (match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (match_operand 2 "nonimmediate_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(zero_extend:SI + (match_operand 4 "general_operand" "")) + (match_dup 0)]))] + "((peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (operands[0], operands[2])) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(zero_extend:SI (match_dup 4)) + (match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (match_operand 2 "nonimmediate_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(match_dup 0) + (match_operand 4 "general_operand" "")]))] + "0 && ((peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (operands[0], operands[2])) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(match_dup 1) + (match_dup 4)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (match_operand 2 "nonimmediate_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(match_dup 0) + (zero_extend:HI + (match_operand 4 "general_operand" ""))]))] + "((peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (operands[0], operands[2])) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(match_dup 1) + (zero_extend:HI (match_dup 4))]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (match_operand 2 "nonimmediate_operand" "") + (match_operator 3 "ip2k_binary_operator" + [(match_dup 0) + (zero_extend:SI + (match_operand 4 "general_operand" ""))]))] + "((peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (operands[0], operands[2])) + && ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(match_dup 1) + (zero_extend:SI (match_dup 4))]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (cc0) + (match_operator 2 "ip2k_binary_operator" + [(match_operand 3 "general_operand" "") + (match_dup 0)]))] + "0 && (peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (cc0) + (match_op_dup 2 [(match_dup 3) + (match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (cc0) + (match_operator 2 "ip2k_binary_operator" + [(zero_extend:HI + (match_operand 3 "general_operand" "")) + (match_dup 0)]))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (cc0) + (match_op_dup 2 [(zero_extend:HI (match_dup 3)) + (match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (cc0) + (match_operator 2 "ip2k_binary_operator" + [(zero_extend:SI + (match_operand 3 "general_operand" "")) + (match_dup 0)]))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (cc0) + (match_op_dup 2 [(zero_extend:SI (match_dup 3)) + (match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (cc0) + (match_operator 2 "ip2k_binary_operator" + [(match_dup 0) + (match_operand 3 "general_operand" "")]))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (cc0) + (match_op_dup 2 [(match_dup 1) + (match_dup 3)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (cc0) + (match_operator 2 "ip2k_binary_operator" + [(match_dup 0) + (zero_extend:HI + (match_operand 3 "general_operand" ""))]))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (cc0) + (match_op_dup 2 [(match_dup 1) + (zero_extend:HI (match_dup 3))]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (cc0) + (match_operator 2 "ip2k_binary_operator" + [(match_dup 0) + (zero_extend:SI + (match_operand 3 "general_operand" ""))]))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (cc0) + (match_op_dup 2 [(match_dup 1) + (zero_extend:SI (match_dup 3))]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operator 3 "ip2k_unary_operator" + [(match_operand 1 "general_operand" "")])) + (set (match_operand 2 "nonimmediate_operand" "") + (match_dup 0))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (match_operand 2 "nonimmediate_operand" "") + (match_operator 3 "ip2k_unary_operator" [(match_dup 0)]))] + "(peep2_reg_dead_p (2, operands[0]) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))))" + [(set (match_dup 2) + (match_op_dup 3 [(match_dup 1)]))] + "") + + (define_peephole2 + [(set (match_operand 0 "ip2k_nonsp_reg_operand" "") + (match_operand 1 "nonimmediate_operand" "")) + (set (cc0) + (match_dup 0))] + "peep2_reg_dead_p (2, operands[0])" + [(set (cc0) + (match_dup 1))] + "") + + ;; Look for places where we can shorten a compare operation. + ;; + (define_peephole2 + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (const_int 0)) + (set (cc0) + (match_operand:HI 1 "nonimmediate_operand" "")) + (set (pc) + (if_then_else (match_operator 2 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "(rtx_equal_p (ip2k_get_high_half (operands[1], QImode), operands[0]))" + [(set (match_dup 0) + (const_int 0)) + (set (cc0) + (match_dup 4)) + (set (pc) + (if_then_else (match_op_dup 2 + [(cc0) (const_int 0)]) + (label_ref (match_dup 3)) + (pc)))] + "{ + operands[4] = ip2k_get_low_half (operands[1], QImode); + }") + + ;; Look for places where we can shorten a compare operation. + ;; + (define_peephole2 + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (const_int 0)) + (set (cc0) + (compare (match_operand:HI 1 "nonimmediate_operand" "") + (match_operand 2 "const_int_operand" ""))) + (set (pc) + (if_then_else (match_operator 3 "comparison_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(rtx_equal_p (ip2k_get_high_half (operands[1], QImode), operands[0]) + && (abs (INTVAL (operands[2]) <= 127)))" + [(set (match_dup 0) + (const_int 0)) + (set (cc0) + (compare (match_dup 5) + (match_dup 6))) + (set (pc) + (if_then_else (match_op_dup 3 + [(cc0) (const_int 0)]) + (label_ref (match_dup 4)) + (pc)))] + "{ + operands[5] = ip2k_get_low_half (operands[1], QImode); + operands[6] = gen_int_mode (INTVAL (operands[2]) & 0xff, QImode); + }") + + ;; This is one of those cases where gcc just can't untangle our wishes. We + ;; want to add some values but get two copies of the result. In this instance + ;; however, the seconds copy can be made more cheaply by combining things. + ;; + (define_peephole + [(set (match_operand:HI 0 "ip2k_nonsp_reg_operand" "+&u") + (plus:HI (match_operand:HI 1 "nonimmediate_operand" "rS") + (match_operand:HI 2 "general_operand" "rSi"))) + (set (match_operand:HI 3 "ip2k_gen_operand" "=&uS") + (match_dup 0))] + "(ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))) + && (!REG_P (operands[3]) + || (ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))))))" + "mov\\tw,%L2\;add\\tw,%L1\;mov\\t%L0,w\;mov\\t%L3,w\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w\;mov\\t%H3,w") + + (define_peephole + [(set (match_operand:HI 0 "ip2k_short_operand" "+&S") + (plus:HI (match_operand:HI 1 "nonimmediate_operand" "rS") + (match_operand:HI 2 "general_operand" "rSi"))) + (set (match_operand:HI 3 "ip2k_nonsp_reg_operand" "=&u") + (match_dup 0))] + "(ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ! rtx_equal_p (operands[0], operands[1]) + && ! rtx_equal_p (operands[0], operands[2]))" + "mov\\tw,%L2\;add\\tw,%L1\;mov\\t%L0,w\;mov\\t%L3,w\;mov\\tw,%H2\;addc\\tw,%H1\;mov\\t%H0,w\;mov\\t%H3,w") + + ;; Some splits zero the MSByte of a word that we then use for shifting. We + ;; can therefore replace full shifts with zero-extended ones. These are + ;; cheaper for us. + ;; + (define_peephole2 + [(set (match_operand:QI 0 "register_operand" "") + (const_int 0)) + (set (match_operand:HI 1 "nonimmediate_operand" "") + (ashift:HI (match_operand:HI 2 "register_operand" "") + (match_operand 3 "const_int_operand" "")))] + "(rtx_equal_p (ip2k_get_high_half (operands[2], QImode), operands[0]) + && peep2_reg_dead_p (2, operands[0]))" + [(set (match_dup 1) + (ashift:HI (zero_extend:HI (match_dup 4)) + (match_dup 3)))] + "{ + operands[4] = ip2k_get_low_half (operands[2], QImode); + }") + + (define_peephole2 + [(set (match_operand:QI 0 "register_operand" "") + (const_int 0)) + (set (match_operand:HI 1 "nonimmediate_operand" "") + (ashift:HI (match_operand:HI 2 "register_operand" "") + (match_operand 3 "const_int_operand" "")))] + "(rtx_equal_p (ip2k_get_high_half (operands[2], QImode), operands[0]))" + [(set (match_dup 0) + (const_int 0)) + (set (match_dup 1) + (ashift:HI (zero_extend:HI (match_dup 4)) + (match_dup 3)))] + "{ + operands[4] = ip2k_get_low_half (operands[2], QImode); + }") + + ;; Some splits zero the MSByte of a word that we then use for multiplying. We + ;; can therefore replace the full multiplies with zero-extended ones. + ;; These are cheaper for us. + ;; + (define_peephole2 + [(set (match_operand:QI 0 "register_operand" "") + (const_int 0)) + (set (match_operand:HI 1 "nonimmediate_operand" "") + (mult:HI (match_operand:HI 2 "register_operand" "") + (zero_extend:HI + (match_operand:QI 3 "const_int_operand" ""))))] + "(rtx_equal_p (ip2k_get_high_half (operands[2], QImode), operands[0]) + && (peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (operands[1], operands[2])))" + [(set (match_dup 1) + (mult:HI (zero_extend:HI (match_dup 4)) + (zero_extend:HI (match_dup 3))))] + "{ + operands[4] = ip2k_get_low_half (operands[2], QImode); + }") + + (define_peephole2 + [(set (match_operand:QI 0 "register_operand" "") + (const_int 0)) + (set (match_operand:HI 1 "nonimmediate_operand" "") + (mult:HI (match_operand:HI 2 "register_operand" "") + (zero_extend:HI + (match_operand:QI 3 "const_int_operand" ""))))] + "(rtx_equal_p (ip2k_get_high_half (operands[2], QImode), operands[0]))" + [(set (match_dup 0) + (const_int 0)) + (set (match_dup 1) + (mult:HI (zero_extend:HI (match_dup 4)) + (zero_extend:HI (match_dup 3))))] + "{ + operands[4] = ip2k_get_low_half (operands[2], QImode); + }") + + ;; Merge in a redundant move before a zero-extended multiply. + ;; + (define_peephole2 + [(set (match_operand:QI 0 "register_operand" "") + (match_operand:QI 1 "general_operand" "")) + (set (match_operand:HI 2 "nonimmediate_operand" "") + (mult:HI (zero_extend:HI (match_dup 0)) + (zero_extend:HI + (match_operand:QI 3 "const_int_operand" ""))))] + "(peep2_reg_dead_p (2, operands[0]) + || rtx_equal_p (ip2k_get_high_half (operands[2], QImode), operands[0]) + || rtx_equal_p (ip2k_get_low_half (operands[2], QImode), operands[0]))" + [(set (match_dup 2) + (mult:HI (zero_extend:HI (match_dup 1)) + (zero_extend:HI (match_dup 3))))] + "") + + ;; Pick up redundant clears followed by adds - these can just become moves. + ;; + (define_peephole2 + [(set (match_operand 0 "register_operand" "") + (const_int 0)) + (set (match_operand 2 "nonimmediate_operand" "") + (plus (match_dup 0) + (match_operand 1 "general_operand" "")))] + "peep2_reg_dead_p (2, operands[0])" + [(set (match_dup 2) + (match_dup 1))] + "") + + (define_peephole2 + [(set (match_operand 0 "register_operand" "") + (const_int 0)) + (set (match_dup 0) + (plus (match_dup 0) + (match_operand 1 "general_operand" "")))] + "" + [(set (match_dup 0) + (match_dup 1))] + "") + + ;; Clear up an add followed by a push of the result. The fact that this + ;; isn't picked up consistently within the combiner suggests a bug somewhere. + ;; + (define_peephole2 + [(set (match_operand:HI 0 "register_operand" "") + (plus:HI (match_operand:HI 1 "nonimmediate_operand" "") + (match_operand:HI 2 "general_operand" ""))) + (set (mem:HI (post_dec:HI (reg:HI 6))) + (match_dup 0))] + "peep2_reg_dead_p (2, operands[0])" + [(set (mem:HI (post_dec:HI (reg:HI 6))) + (plus:HI (match_dup 1) + (match_dup 2)))] + "") + + ;; Tidy up stack slot addressing where we've eliminated some registers. + ;; This looks like something strange going on though as gcc-2.97 didn't + ;; exhibit this behavior, whereas gcc-3.0.4 does. + ;; + (define_peephole2 + [(set (match_operand:HI 0 "register_operand" "") + (plus:HI (match_operand:HI 1 "nonimmediate_operand" "") + (match_operand 2 "const_int_operand" ""))) + (set (mem:HI (post_dec:HI (reg:HI 6))) + (plus:HI (match_dup 0) + (match_operand 3 "const_int_operand" "")))] + "peep2_reg_dead_p (2, operands[0])" + [(set (mem:HI (post_dec:HI (reg:HI 6))) + (plus:HI (match_dup 1) + (match_dup 4)))] + "{ + operands[4] = gen_int_mode (INTVAL (operands[2]) + INTVAL (operands[3]), + HImode); + }") + + ;; Match duplicate loads of a symbol ref. This isn't something that we want to + ;; do at the peephole2 stage because more often than not we'll make one of the + ;; two loads redundant after we run peephole2. We catch the remaining cases + ;; here though + ;; + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+uS") + (match_operand 1 "ip2k_symbol_ref_operand" "i")) + (set (match_operand:HI 2 "nonimmediate_operand" "=uS") + (match_dup 1))] + "((!REG_P (operands[0]) || (REGNO (operands[0]) != REG_DP)) + && (!REG_P (operands[2]) || (REGNO (operands[2]) != REG_DP)))" + "mov\\tw,%L1\;mov\\t%L0,w\;mov\\t%L2,w\;mov\\tw,%H1\;mov\\t%H0,w\;mov\\t%H2,w") + + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "+&uS") + (match_operand 1 "ip2k_symbol_ref_operand" "i")) + (set (match_operand:HI 2 "nonimmediate_operand" "=&uS") + (match_dup 0))] + "" + "*{ + if ((REG_P (operands[0]) + && !(ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), 2) + && ip2k_xexp_not_uses_reg_p (operands[2], + REGNO (operands[0]), 2))) + || (REG_P (operands[2]) + && !(ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[2]), 2) + && ip2k_xexp_not_uses_reg_p (operands[1], + REGNO (operands[2]), 2)))) + { + return AS2 (mov, w, %L1) CR_TAB + AS1 (push, %H1%<) CR_TAB + AS1 (push, %H1%<) CR_TAB + AS1 (pop, %H0%>) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS1 (pop, %H2%>) CR_TAB + AS2 (mov, %L2, w); + } + else + { + return AS2 (mov, w, %L1) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, %L2, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (mov, %H2, w); + } + }") + + ;; Handle the common array indexing pattern. + ;; This is of the form A = X + (Y * C). + ;; We use splits earlier in this file to get our interesting cases into the + ;; same form (i.e. zero-extended multiply and add). + ;; + (define_insn "*mulacchi" + [(set (match_operand:HI 3 "nonimmediate_operand" "=rS") + (plus:HI (mult:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "rS")) + (zero_extend:HI + (match_operand:QI 2 "const_int_operand" "n"))) + (match_operand:HI 0 "general_operand" "rSi")))] + "" + "*{ + if (immediate_operand (operands[0], HImode) + && REG_P (operands[3]) + && (REGNO (operands[3]) == REG_DP) + && (INTVAL (operands[2]) == 2)) + return AS2 (mov, w, %1) CR_TAB + AS1 (loadl, %x0) CR_TAB + AS1 (loadh, %x0) CR_TAB + AS2 (add, dpl, w) CR_TAB + AS2 (add, dpl, w); + else + return AS2 (mov, w, %1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (add, w, %L0) CR_TAB + AS2 (mov, %L3, w) CR_TAB + AS2 (mov, w, %H0) CR_TAB + AS2 (addc, w, MULH) CR_TAB + AS2 (mov, %H3, w); + }") + + (define_peephole2 + [(set (match_operand:HI 0 "register_operand" "") + (mult:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "")) + (zero_extend:HI + (match_operand 2 "const_int_operand" "")))) + (set (match_operand:HI 3 "nonimmediate_operand" "") + (plus:HI (match_dup 0) + (match_operand:HI 4 "general_operand" "")))] + "(((! REG_P (operands[3])) + || (ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))))) + && peep2_reg_dead_p (2, operands[0]))" + [(set (match_dup 3) + (plus:HI (mult:HI (zero_extend:HI + (match_dup 1)) + (zero_extend:HI + (match_dup 2))) + (match_dup 4)))] + "") + + (define_insn "*mulhi_and_accumulate" + [(set (match_operand:HI 0 "nonimmediate_operand" "=rS") + (mult:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "rS")) + (zero_extend:HI + (match_operand:QI 2 "const_int_operand" "n")))) + (set (match_operand:HI 3 "nonimmediate_operand" "=rS") + (plus:HI (match_dup 0) + (match_operand:HI 4 "general_operand" "%rSi")))] + "((! REG_P (operands[3])) + || (ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3])))))" + "*{ + return AS2 (mov, w, %1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (add, w, %L4) CR_TAB + AS2 (mov, %L3, w) CR_TAB + AS2 (mov, w, %H4) CR_TAB + AS2 (addc, w, MULH) CR_TAB + AS2 (mov, %H3, w) CR_TAB + AS2 (mov, w, MULH) CR_TAB + AS2 (mov, %H0, w); + }") + + (define_peephole2 + [(set (match_operand:HI 0 "nonimmediate_operand" "") + (mult:HI (zero_extend:HI + (match_operand:QI 1 "nonimmediate_operand" "")) + (zero_extend:HI + (match_operand 2 "const_int_operand" "")))) + (set (match_operand:HI 3 "nonimmediate_operand" "") + (plus:HI (match_dup 0) + (match_operand:HI 4 "general_operand" "")))] + "((! REG_P (operands[3])) + || (ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3])))))" + [(parallel [(set (match_dup 0) + (mult:HI (zero_extend:HI + (match_dup 1)) + (zero_extend:HI + (match_dup 2)))) + (set (match_dup 3) + (plus:HI (match_dup 0) + (match_dup 4)))])] + "") + + ;; Handle the common array indexing pattern. + ;; This is of the form A = X + (Y * C). + ;; We use splits earlier in this file to get our interesting cases into the + ;; same form (i.e. multiply and add). + ;; + (define_peephole + [(set (match_operand:HI 0 "register_operand" "=r") + (mult:HI (match_operand:HI 1 "nonimmediate_operand" "rS") + (zero_extend:HI + (match_operand:QI 2 "const_int_operand" "n")))) + (set (match_operand:HI 3 "nonimmediate_operand" "=rS") + (plus:HI (match_dup 0) + (match_operand:HI 4 "general_operand" "%rSi")))] + "((!REG_P (operands[3]) + || (ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))))) + && find_regno_note (insn, REG_DEAD, REGNO (operands[0])))" + "*{ + if (immediate_operand (operands[4], HImode) + && REG_P (operands[3]) + && (REGNO (operands[3]) == REG_DP) + && (INTVAL (operands[2]) == 2) + && ip2k_xexp_not_uses_reg_p (operands[1], REG_DP, + GET_MODE_SIZE (HImode))) + return AS2 (clrb, STATUS, 0) CR_TAB + AS1 (loadl, %x4) CR_TAB + AS1 (loadh, %x4) CR_TAB + AS2 (rl, w, %L1) CR_TAB + AS2 (add, dpl, w) CR_TAB + AS2 (rl, w, %H1) CR_TAB + AS2 (add, dph, w); + else if (!REG_P (operands[3]) + || (ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))))) + return AS2 (mov, w, %L1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (add, w, %L4) CR_TAB + AS2 (mov, %L3, w) CR_TAB + AS2 (mov, w, %H4) CR_TAB + AS2 (addc, w, MULH) CR_TAB + AS2 (mov, %H3, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (add, %H3, w); + else + return AS2 (mov, w, %L1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (add, w, %L4) CR_TAB + AS1 (push, wreg%<) CR_TAB + AS2 (mov, w, %H4) CR_TAB + AS2 (addc, w, MULH) CR_TAB + AS1 (push, wreg%<) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS1 (pop, %H3%>) CR_TAB + AS1 (pop, %L3%>) CR_TAB + AS2 (add, %H3, w); + }") + + ;; Handle the more complex variant of the preceding multiply and accumulate + ;; variant of the preceding multiply-and-add operation. This one would + ;; otherwise fail to match because the result never goes dead. + ;; + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "=rS") + (mult:HI (match_operand:HI 1 "nonimmediate_operand" "rS") + (zero_extend:HI + (match_operand:QI 2 "const_int_operand" "n")))) + (set (match_dup 0) + (plus:HI (match_dup 0) + (match_operand:HI 3 "general_operand" "%rSi")))] + "(!REG_P (operands[0]) + || (ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0]))) + && ip2k_xexp_not_uses_reg_p (operands[3], REGNO (operands[0]), + GET_MODE_SIZE (GET_MODE (operands[0])))))" + "*{ + if (immediate_operand (operands[3], HImode) + && REG_P (operands[0]) + && (REGNO (operands[0]) == REG_DP) + && (INTVAL (operands[2]) == 2)) + return AS2 (clrb, STATUS, 0) CR_TAB + AS1 (loadl, %x3) CR_TAB + AS1 (loadh, %x3) CR_TAB + AS2 (rl, w, %L1) CR_TAB + AS2 (add, dpl, w) CR_TAB + AS2 (rl, w, %H1) CR_TAB + AS2 (add, dph, w); + else + return AS2 (mov, w, %L1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (add, w, %L3) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (mov, w, %H3) CR_TAB + AS2 (addc, w, MULH) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (add, %H0, w); + }") + + ;; Handle the a complex variant of the preceding multiply and add + ;; operations where the intermediate result is also required. + ;; + (define_peephole + [(set (match_operand:HI 0 "nonimmediate_operand" "=rS") + (mult:HI (match_operand:HI 1 "nonimmediate_operand" "rS") + (zero_extend:HI + (match_operand:QI 2 "const_int_operand" "n")))) + (set (match_operand:HI 3 "nonimmediate_operand" "=rS") + (plus:HI (match_dup 0) + (match_operand:HI 4 "general_operand" "%rSi")))] + "((!REG_P (operands[3]) + || (ip2k_xexp_not_uses_reg_p (operands[4], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[0], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[1], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))) + && ip2k_xexp_not_uses_reg_p (operands[2], REGNO (operands[3]), + GET_MODE_SIZE (GET_MODE (operands[3]))))) + && (INTVAL (operands[2]) != 2))" + "* return AS2 (mov, w, %H4) CR_TAB + AS2 (mov, %H3, w) CR_TAB + AS2 (mov, w, %L1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (mov, %L0, w) CR_TAB + AS2 (add, w, %L4) CR_TAB + AS2 (mov, %L3, w) CR_TAB + AS2 (mov, w, MULH) CR_TAB + AS2 (mov, %H0, w) CR_TAB + AS2 (addc, %H3, w) CR_TAB + AS2 (mov, w, %H1) CR_TAB + AS2 (mulu, w, %2) CR_TAB + AS2 (add, %H3, w) CR_TAB + AS2 (add, %H0, w);") + + ;; Byte swapping! + ;; + (define_peephole + [(set (reg:QI 10) + (match_operand:QI 1 "nonimmediate_operand" "rS")) + (set (match_operand:QI 0 "register_operand" "=r") + (reg:QI 10)) + (set (reg:QI 10) + (match_operand:QI 2 "nonimmediate_operand" "rS")) + (set (match_dup 1) + (reg:QI 10)) + (set (reg:QI 10) + (match_dup 0)) + (set (match_dup 2) + (reg:QI 10))] + "find_regno_note (PREV_INSN (insn), REG_DEAD, REGNO (operands[0]))" + "push\\t%1%<\;push\\t%2%<\;pop\\t%1%>\;pop\\t%2%>") + + diff -Nrc3pad gcc-3.2.3/gcc/config/ip2k/ip2k-protos.h gcc-3.3/gcc/config/ip2k/ip2k-protos.h *** gcc-3.2.3/gcc/config/ip2k/ip2k-protos.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ip2k/ip2k-protos.h 2002-09-04 20:32:35.000000000 +0000 *************** *** 0 **** --- 1,99 ---- + /* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Red Hat, Inc and Ubicom, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + extern void asm_file_start PARAMS ((FILE *)); + extern void asm_file_end PARAMS ((FILE *)); + + extern void function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); + extern void function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + extern int find_one_set_bit_p PARAMS ((HOST_WIDE_INT)); + extern int find_one_clear_bit_p PARAMS ((HOST_WIDE_INT)); + + #ifdef TREE_CODE + extern void unique_section PARAMS ((tree, int)); + extern void encode_section_info PARAMS ((tree, int)); + extern void asm_output_section_name PARAMS ((FILE *, tree, const char *, + int)); + extern int valid_machine_type_attribute PARAMS ((tree, tree, tree, tree)); + extern int valid_machine_decl_attribute PARAMS ((tree, tree, tree, tree)); + extern int ip2k_return_pops_args PARAMS ((tree, tree, int)); + #endif /* TREE_CODE */ + + #ifdef RTX_CODE + extern int legitimate_address_p PARAMS ((enum machine_mode, rtx, int)); + extern void machine_dependent_reorg PARAMS ((rtx)); + extern int ip2k_address_cost PARAMS ((rtx)); + extern int ip2k_extra_constraint PARAMS ((rtx, int)); + extern rtx legitimize_address PARAMS ((rtx, rtx, enum machine_mode, rtx)); + extern int adjust_insn_length PARAMS ((rtx insn, int len)); + extern int default_rtx_costs PARAMS ((rtx, enum rtx_code, enum rtx_code)); + extern void asm_output_char PARAMS ((FILE *, rtx)); + extern void asm_output_short PARAMS ((FILE *, rtx)); + extern void asm_output_byte PARAMS ((FILE *, int)); + extern void print_operand PARAMS ((FILE *, rtx, int)); + extern void print_operand_address PARAMS ((FILE *, rtx)); + extern int ip2k_jump_mode PARAMS ((rtx, rtx)); + extern void ip2k_split_words PARAMS ((enum machine_mode, enum machine_mode, + rtx *)); + extern rtx ip2k_get_low_half PARAMS ((rtx, enum machine_mode)); + extern rtx ip2k_get_high_half PARAMS ((rtx, enum machine_mode)); + extern int ip2k_nonptr_operand PARAMS ((rtx, enum machine_mode)); + extern int ip2k_ptr_operand PARAMS ((rtx, enum machine_mode)); + extern int ip2k_ip_operand PARAMS ((rtx, enum machine_mode)); + extern int ip2k_short_operand PARAMS ((rtx, enum machine_mode)); + extern int ip2k_gen_operand PARAMS ((rtx, enum machine_mode)); + extern int ip2k_nonsp_reg_operand PARAMS ((rtx, enum machine_mode)); + extern int ip2k_symbol_ref_operand PARAMS ((rtx, enum machine_mode)); + extern const char *ip2k_set_compare PARAMS ((rtx, rtx)); + extern const char *ip2k_gen_sCOND PARAMS ((rtx, enum rtx_code, rtx)); + extern const char *ip2k_gen_signed_comp_branch PARAMS ((rtx, + enum rtx_code, + rtx)); + extern const char *ip2k_gen_unsigned_comp_branch PARAMS ((rtx, + enum rtx_code, + rtx)); + extern int is_regfile_address PARAMS ((rtx)); + extern int ip2k_mode_dependent_address PARAMS ((rtx)); + extern int ip2k_address_uses_reg_p PARAMS ((rtx, unsigned int)); + extern int ip2k_xexp_not_uses_reg_p PARAMS ((rtx, unsigned int, int)); + extern int ip2k_composite_xexp_not_uses_reg_p PARAMS ((rtx, unsigned int, int)); + extern int ip2k_composite_xexp_not_uses_cc0_p PARAMS ((rtx)); + extern int ip2k_signed_comparison_operator PARAMS ((rtx, + enum machine_mode)); + extern int ip2k_unsigned_comparison_operator PARAMS ((rtx, + enum machine_mode)); + extern int ip2k_unary_operator PARAMS ((rtx, enum machine_mode)); + extern int ip2k_binary_operator PARAMS ((rtx, enum machine_mode)); + + extern rtx ip2k_compare_operands[3]; + #endif /* RTX_CODE */ + + #ifdef HAVE_MACHINE_MODES + extern int class_max_nregs PARAMS ((enum reg_class, enum machine_mode)); + extern enum reg_class class_likely_spilled_p PARAMS ((int c)); + #endif /* HAVE_MACHINE_MODES */ + + #ifdef REAL_VALUE_TYPE + extern void asm_output_float PARAMS ((FILE *, REAL_VALUE_TYPE)); + #endif + + extern int ip2k_init_elim_offset PARAMS ((int, int)); + extern void ip2k_init_local_alloc PARAMS ((int *)); + diff -Nrc3pad gcc-3.2.3/gcc/config/ip2k/libgcc.S gcc-3.3/gcc/config/ip2k/libgcc.S *** gcc-3.2.3/gcc/config/ip2k/libgcc.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ip2k/libgcc.S 2002-10-10 19:45:59.000000000 +0000 *************** *** 0 **** --- 1,1516 ---- + ; + ; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + ; Contributed by Red Hat, Inc and Ubicom, Inc. + ; + ; This file is part of GNU CC. + ; + ; GNU CC is free software; you can redistribute it and/or modify + ; it under the terms of the GNU General Public License as published by + ; the Free Software Foundation; either version 2, or (at your option) + ; any later version. + ; + ; In addition to the permissions in the GNU General Public License, the + ; Free Software Foundation gives you unlimited permission to link the + ; compiled version of this file with other programs, and to distribute + ; those programs without any restriction coming from the use of this + ; file. (The General Public License restrictions do apply in other + ; respects; for example, they cover modification of the file, and + ; distribution when not linked into another program.) + ; + ; GNU CC is distributed in the hope that it will be useful, + ; but WITHOUT ANY WARRANTY; without even the implied warranty of + ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ; GNU General Public License for more details. + ; + ; You should have received a copy of the GNU General Public License + ; along with GNU CC; see the file COPYING. If not, write to + ; the Free Software Foundation, 59 Temple Place - Suite 330, + ; Boston, MA 02111-1307, USA. */ + + /******************************************************* + load byte from arbitrary memory + address passed in first bank register, result in W + + *******************************************************/ + .macro movb to, from + mov w, \from + mov \to, w + .endm + + + #if defined (L_indcall) + /* __indcall - given register containing an address, call the function + * at that address. + */ + + .sect .pram.libgcc,"ax" + .global __indcall + .func _indcall,__indcall + + __indcall: + page 1f + call 1f + 1: pop callh ; Get the call target + pop calll + ret ; Transfer to new function + + .endfunc + #endif + + + #if defined (L_mulhi3) + .sect .pram.libgcc,"ax" + .global __mulhi3 + .func _mulhi3, __mulhi3 + + __mulhi3: + mov w, 2(SP) ; First upper half partial product + mulu w, 3(SP) + mov 3(SP), w + mov w, 1(SP) ; Second upper half partial product + mulu w, 4(SP) + add 3(SP), w + mov w, 2(SP) ; Lower half partial product + mulu w, 4(SP) + mov 4(SP), w + mov w, MULH + add 3(SP), w + + mov w, #2 ; Adjust the stack leaving the result to + add spl, w ; be popped off later. + ret + + .endfunc + + #endif /* defined (L_mulhi3) */ + + #if defined (L_mulsi3) + /******************************************************* + Multiplication 32 x 32 + *******************************************************/ + + .sect .text.libgcc,"ax" + .global __mulsi3 + .func _mulsi3, __mulsi3 + + __mulsi3: + clr $80 ; Assume zero result + clr $81 + clr $82 + clr $83 + + 2: mov w, 1(sp) + or w, 2(sp) + or w, 3(sp) + or w, 4(sp) + snz ; Any more significant bits to multiply? + page 3f + jmp 3f + + sb 4(sp), 0 ; Check LSB of multiplier + page 1f ; zero => scale multiplicand & multiplier + jmp 1f + + mov w, 8(sp) ; Accumulate product + add $83, w + mov w, 7(sp) + addc $82, w + mov w, 6(sp) + addc $81, w + mov w, 5(sp) + addc $80, w + 1: clrb status, 0 ; scale multiplier down + rr 1(sp) + rr 2(sp) + rr 3(sp) + rr 4(sp) + clrb status, 0 + rl 8(sp) + rl 7(sp) + rl 6(sp) + rl 5(sp) + page 2b + jmp 2b + + 3: mov w, #8 + add spl ,w + ret + + .endfunc + + #endif /* defined (L_mulsi3) */ + + #if defined (L_muldi3) + /******************************************************* + Multiplication 64 x 64 + *******************************************************/ + + .sect .text.libgcc,"ax" + .global __muldi3 + .func _muldi3, __muldi3 + + __muldi3: + clr $80 ; Assume zero result + clr $81 + clr $82 + clr $83 + clr $84 + clr $85 + clr $86 + clr $87 + + 2: mov w, 1(sp) + or w, 2(sp) + or w, 3(sp) + or w, 4(sp) + or w, 5(sp) + or w, 6(sp) + or w, 7(sp) + or w, 8(sp) + snz ; Any more significant bits to multiply? + page 3f + jmp 3f + + sb 8(sp), 0 ; Check LSB of multiplier + page 1f ; zero => scale multiplicand & multiplier + jmp 1f + + mov w, 16(sp) ; Accumulate product + add $87, w + mov w, 15(sp) + addc $86, w + mov w, 14(sp) + addc $85, w + mov w, 13(sp) + addc $84, w + mov w, 12(sp) + addc $83, w + mov w, 11(sp) + addc $82, w + mov w, 10(sp) + addc $81, w + mov w, 9(sp) + addc $80, w + + 1: clrb status, 0 ; scale multiplier down + rr 1(sp) + rr 2(sp) + rr 3(sp) + rr 4(sp) + rr 5(sp) + rr 6(sp) + rr 7(sp) + rr 8(sp) + clrb status, 0 + rl 16(sp) + rl 15(sp) + rl 14(sp) + rl 13(sp) + rl 12(sp) + rl 11(sp) + rl 10(sp) + rl 9(sp) + page 2b + jmp 2b + + 3: mov w, #16 + add spl, w + ret + + .endfunc + + #endif /* defined (L_muldi3) */ + + #if defined (L_divmodhi4) + #define arg1h 1(SP) + #define arg1l 2(SP) + #define arg2h 3(SP) + #define arg2l 4(SP) + #define resl $81 + #define resh $80 + #define reml $83 + #define remh $82 + #define tmp_var $84 + #define cnt $85 + #define arg1_sign $86 + #define res_sign $87 + + .sect .text.libgcc,"ax" + .global __divmodhi4 + .func _divmodhi4, __divmodhi4 + + __divmodhi4: + mov w,arg2h + mov res_sign,w + mov w,arg1h + mov arg1_sign,w + xor res_sign,w + + sb arg1h,7 + page 1f + jmp 1f + + not arg1h + not arg1l + incsnz arg1l + inc arg1h + + 1: sb arg2h, 7 + page 1f + jmp 1f + + not arg2h + not arg2l + incsnz arg2l + inc arg2h + + 1: page __udivmodhi4 ; Do the unsigned div/mod + call __udivmodhi4 + + sb arg1_sign, 7 + page 1f + jmp 1f + + not reml + not remh + incsnz reml + inc remh + + 1: sb res_sign, 7 + ret + + not resl + not resh + incsnz resl + inc resh + ret + + .endfunc + + #undef arg1h + #undef arg1l + #undef arg2h + #undef arg2l + #undef resl + #undef resh + #undef reml + #undef remh + #undef tmp_var + #undef cnt + #undef arg1_sign + #undef res_sign + + #endif /* defined (L_divmodhi4) */ + + #if defined (L_udivmodhi4) + + #define arg1h 1(SP) + #define arg1l 2(SP) + #define arg2h 3(SP) + #define arg2l 4(SP) + #define resl $81 + #define resh $80 + #define reml $83 + #define remh $82 + #define tmp_var $84 + #define cnt $85 + + .sect .text.libgcc,"ax" + .global __udivmodhi4 + .func _udivmodhi4, __udivmodhi4 + + __udivmodhi4: + clr reml + clr remh + mov w, #17 + mov cnt,w + clrb status, 0 + page 1f + jmp 1f + + 2: rl reml + rl remh + mov w, arg2l + sub w, reml + mov tmp_var, w + mov w, arg2h + subc w, remh + sc + page 1f + jmp 1f + mov remh, w + mov w, tmp_var + mov reml, w + + 1: rl arg1l + rl arg1h + decsz cnt + page 2b + jmp 2b + + pop resh + pop resl + mov w, #2 + add spl, w + ret + + .endfunc + + #undef arg1h + #undef arg1l + #undef arg2h + #undef arg2l + #undef resl + #undef resh + #undef reml + #undef remh + #undef tmp_var + #undef cnt + + #endif /* defined (L_udivmodhi4) */ + + #if defined (L_divmodsi4) + + #define arg1a 1(SP) + #define arg1b 2(SP) + #define arg1c 3(SP) + #define arg1d 4(SP) + + #define arg2a 5(SP) + #define arg2b 6(SP) + #define arg2c 7(SP) + #define arg2d 8(SP) + + #define resa $80 + #define resb $81 + #define resc $82 + #define resd $83 + + #define rema $84 + #define remb $85 + #define remc $86 + #define remd $87 + + #define tmp_var $88 + #define tmp_var1 $89 + #define tmp_var2 $8a + #define cnt $8b + #define arg1_sign $8c + #define res_sign $8d + + .sect .text.libgcc,"ax" + .global __divmodsi4 + .func _divmodsi4, __divmodsi4 + + __divmodsi4: + mov w, arg2a + mov res_sign, w + mov w, arg1a + mov arg1_sign, w + xor res_sign, w + + sb arg1a, 7 + page 1f + jmp 1f + + not arg1d + not arg1c + not arg1b + not arg1a + incsnz arg1d + incsz arg1c + page 1f + jmp 1f + incsnz arg1b + inc arg1a + + 1: sb arg2a, 7 + page 1f + jmp 1f + + not arg2d + not arg2c + not arg2b + not arg2a + incsnz arg2d + incsz arg2c + page 1f + jmp 1f + incsnz arg2b + inc arg2a + + 1: page __udivmodsi4 ; Do the unsigned div/mod. + call __udivmodsi4 + + sb arg1_sign, 7 + page 1f + jmp 1f + + not remd + not remc + not remb + not rema + incsnz remd + incsz remc + page 1f + jmp 1f + incsnz remb + inc rema + + 1: sb res_sign, 7 + ret + + not resd + not resc + not resb + not resa + incsnz resd + incsz resc + ret + incsnz resb + inc resa + ret + + .endfunc + + #undef arg1a + #undef arg1b + #undef arg1c + #undef arg1d + + #undef arg2a + #undef arg2b + #undef arg2c + #undef arg2d + + #undef resa + #undef resb + #undef resc + #undef resd + + #undef rema + #undef remb + #undef remc + #undef remd + + #undef tmp_var + #undef tmp_var1 + #undef tmp_var2 + #undef cnt + #undef arg1_sign + #undef res_sign + + #endif /* defined (L_divmodsi4) */ + + #if defined (L_udivmodsi4) + #define arg1a 1(SP) + #define arg1b 2(SP) + #define arg1c 3(SP) + #define arg1d 4(SP) + + #define arg2a 5(SP) + #define arg2b 6(SP) + #define arg2c 7(SP) + #define arg2d 8(SP) + + #define resa $80 + #define resb $81 + #define resc $82 + #define resd $83 + + #define rema $84 + #define remb $85 + #define remc $86 + #define remd $87 + + #define tmp_var $88 + #define tmp_var1 $89 + #define tmp_var2 $8a + #define cnt $8b + + .sect .text.libgcc,"ax" + .global __udivmodsi4 + .func _udivmodsi4, __udivmodsi4 + + __udivmodsi4: + clr remd + clr remc + clr remb + clr rema + mov w, #33 + mov cnt, w + clrb status, 0 + page 1f + jmp 1f + + 2: rl remd + rl remc + rl remb + rl rema + mov w, arg2d + sub w, remd + mov tmp_var, w + mov w, arg2c + subc w, remc + mov tmp_var1, w + mov w, arg2b + subc w, remb + mov tmp_var2, w + mov w, arg2a + subc w, rema + sc + page 1f + jmp 1f + + mov rema, w + mov w, tmp_var2 + mov remb, w + mov w, tmp_var1 + mov remc, w + mov w, tmp_var + mov remd, w + + 1: rl arg1d + rl arg1c + rl arg1b + rl arg1a + decsz cnt + page 2b + jmp 2b + + pop resa + pop resb + pop resc + pop resd + mov w, #4 + add spl, w + ret + + .endfunc + + #undef arg1a + #undef arg1b + #undef arg1c + #undef arg1d + + #undef arg2a + #undef arg2b + #undef arg2c + #undef arg2d + + #undef resa + #undef resb + #undef resc + #undef resd + + #undef rema + #undef remb + #undef remc + #undef remd + + #undef tmp_var + #undef tmp_var1 + #undef tmp_var2 + #undef cnt + + #endif /* defined (L_udivmodsi4) */ + + #if defined (L_divmoddi4) + + #define arg1s 1(SP) + #define arg1t 2(SP) + #define arg1u 3(SP) + #define arg1v 4(SP) + #define arg1w 5(SP) + #define arg1x 6(SP) + #define arg1y 7(SP) + #define arg1z 8(SP) + + #define arg2s 9(SP) + #define arg2t 10(SP) + #define arg2u 11(SP) + #define arg2v 12(SP) + #define arg2w 13(SP) + #define arg2x 14(SP) + #define arg2y 15(SP) + #define arg2z 16(SP) + + #define ress $80 + #define rest $81 + #define resu $82 + #define resv $83 + #define resw $84 + #define resx $85 + #define resy $86 + #define resz $87 + + #define rems $88 + #define remt $89 + #define remu $8a + #define remv $8b + #define remw $8c + #define remx $8d + #define remy $8e + #define remz $8f + + #define tmp_var $90 + #define tmp_var1 $91 + #define tmp_var2 $92 + #define tmp_var3 $93 + #define tmp_var4 $94 + #define tmp_var5 $95 + #define tmp_var6 $96 + #define cnt $97 + + .sect .text.libgcc,"ax" + .global __divmoddi4 + .func _divmoddi4, __divmoddi4 + + __divmoddi4: + rl w, arg2s ; Use MULH to track sign bits. + rl MULH + rl w, arg1s + rl WREG + xor MULH, w + rl w, arg1s + rl MULH + + sb arg1s, 7 + page 1f + jmp 1f + + not arg1s + not arg1t + not arg1u + not arg1v + not arg1w + not arg1x + not arg1y + not arg1z + incsnz arg1z + incsz arg1y + page 1f + jmp 1f + incsnz arg1x + incsz arg1w + page 1f + jmp 1f + incsnz arg1v + incsz arg1u + page 1f + jmp 1f + incsnz arg1t + inc arg1s + + 1: sb arg2s, 7 + page 1f + jmp 1f + + not arg2s + not arg2t + not arg2u + not arg2v + not arg2w + not arg2x + not arg2y + not arg2z + incsnz arg2z + incsz arg2y + page 1f + jmp 1f + incsnz arg2x + incsz arg2w + page 1f + jmp 1f + incsnz arg2v + incsz arg2u + page 1f + jmp 1f + incsnz arg2t + inc arg2s + + 1: page __udivmoddi4 ; Do the unsigned div/mod. + call __udivmoddi4 + + sb MULH, 0 ; Look at the save sign bit for arg 1. + page 1f + jmp 1f + + not rems + not remt + not remu + not remv + not remw + not remx + not remy + not remz + incsnz remz + incsz remy + page 1f + jmp 1f + incsnz remx + incsz remw + page 1f + jmp 1f + incsnz remv + incsz remu + page 1f + jmp 1f + incsnz remt + inc rems + + 1: sb MULH, 1 + ret + + not ress + not rest + not resu + not resv + not resw + not resx + not resy + not resz + incsnz resz + incsz resy + ret + incsnz resx + incsz resw + ret + incsnz resv + incsz resu + ret + incsnz rest + inc ress + ret + + .endfunc + + #undef arg1s + #undef arg1t + #undef arg1u + #undef arg1v + #undef arg1w + #undef arg1x + #undef arg1y + #undef arg1z + + #undef arg2s + #undef arg2t + #undef arg2u + #undef arg2v + #undef arg2w + #undef arg2x + #undef arg2y + #undef arg2z + + #undef ress + #undef rest + #undef resu + #undef resv + #undef resw + #undef resx + #undef resy + #undef resz + + #undef rems + #undef remt + #undef remu + #undef remv + #undef remw + #undef remx + #undef remy + #undef remz + + #undef tmp_var + #undef tmp_var1 + #undef tmp_var2 + #undef tmp_var3 + #undef tmp_var4 + #undef tmp_var5 + #undef tmp_var6 + #undef cnt + + #endif /* defined (L_divmoddi4) */ + + #if defined (L_udivmoddi4) + #define arg1s 1(SP) + #define arg1t 2(SP) + #define arg1u 3(SP) + #define arg1v 4(SP) + #define arg1w 5(SP) + #define arg1x 6(SP) + #define arg1y 7(SP) + #define arg1z 8(SP) + + #define arg2s 9(SP) + #define arg2t 10(SP) + #define arg2u 11(SP) + #define arg2v 12(SP) + #define arg2w 13(SP) + #define arg2x 14(SP) + #define arg2y 15(SP) + #define arg2z 16(SP) + + #define ress $80 + #define rest $81 + #define resu $82 + #define resv $83 + #define resw $84 + #define resx $85 + #define resy $86 + #define resz $87 + + #define rems $88 + #define remt $89 + #define remu $8a + #define remv $8b + #define remw $8c + #define remx $8d + #define remy $8e + #define remz $8f + + #define tmp_var $90 + #define tmp_var1 $91 + #define tmp_var2 $92 + #define tmp_var3 $93 + #define tmp_var4 $94 + #define tmp_var5 $95 + #define tmp_var6 $96 + #define cnt $97 + + .sect .text.libgcc,"ax" + .global __udivmoddi4 + .func _udivmoddi4, __udivmoddi4 + + __udivmoddi4: + clr rems + clr remt + clr remu + clr remv + clr remw + clr remx + clr remy + clr remz + mov w, #65 + mov cnt, w + clrb status, 0 + page 1f + jmp 1f + + 2: rl remz + rl remy + rl remx + rl remw + rl remv + rl remu + rl remt + rl rems + mov w, arg2z + sub w, remz + mov tmp_var, w + mov w, arg2y + subc w, remy + mov tmp_var1, w + mov w, arg2x + subc w, remx + mov tmp_var2, w + mov w, arg2w + subc w, remw + mov tmp_var3, w + mov w, arg2v + subc w, remv + mov tmp_var4, w + mov w, arg2u + subc w, remu + mov tmp_var5, w + mov w, arg2t + subc w, remt + mov tmp_var6, w + mov w, arg2s + subc w, rems + sc + page 1f + jmp 1f + + mov rems, w + mov w, tmp_var6 + mov remt, w + mov w, tmp_var5 + mov remu, w + mov w, tmp_var4 + mov remv, w + mov w, tmp_var3 + mov remw, w + mov w, tmp_var2 + mov remx, w + mov w, tmp_var1 + mov remy, w + mov w, tmp_var + mov remz, w + + 1: rl arg1z + rl arg1y + rl arg1x + rl arg1w + rl arg1v + rl arg1u + rl arg1t + rl arg1s + decsz cnt + page 2b + jmp 2b + + pop ress + pop rest + pop resu + pop resv + pop resw + pop resx + pop resy + pop resz + mov w, #8 + add spl, w + ret + + .endfunc + + #undef arg1s + #undef arg1t + #undef arg1u + #undef arg1v + #undef arg1w + #undef arg1x + #undef arg1y + #undef arg1z + + #undef arg2s + #undef arg2t + #undef arg2u + #undef arg2v + #undef arg2w + #undef arg2x + #undef arg2y + #undef arg2z + + #undef ress + #undef rest + #undef resu + #undef resv + #undef resw + #undef resx + #undef resy + #undef resz + + #undef rems + #undef remt + #undef remu + #undef remv + #undef remw + #undef remx + #undef remy + #undef remz + + #undef tmp_var + #undef tmp_var1 + #undef tmp_var2 + #undef tmp_var3 + #undef tmp_var4 + #undef tmp_var5 + #undef tmp_var6 + #undef cnt + + #endif /* defined (L_udivmoddi4) */ + + #define LT #0 + #define EQ #1 + #define GT #2 + + #if defined(L_cmphi2) + #define arg1l 2(sp) + #define arg1h 1(sp) + #define arg2l 4(sp) + #define arg2h 3(sp) + + .sect .text.libgcc,"ax" + .global __cmphi2 + .global __cmp_ret + .global __cmpqi_ret + .func _cmphi2, __cmphi2 + + __cmphi2: + mov w,arg1l + sub w,arg2l + snz + page 2f + jmp 2f + mov w,arg1h + 1: + subc w,arg2h + clr arg2l + rl arg2l + snb arg1h,7 + setb arg2l,2 + snb arg2h,7 + setb arg2l,1 + mov w,#3 + + __cmp_ret: + add spl,w ; sign1 + pop wreg ; sign2 + + __cmpqi_ret: + add pcl,w ; carry of arg1 - arg2 + retw GT ; [000] arg1 > arg2 + retw LT ; [001] arg1 < arg2 + retw GT ; [010] arg1 > arg2 + retw GT ; [011] arg1 > arg2 + retw LT ; [100] arg1 < arg2 + retw LT ; [101] arg1 < arg2 + retw GT ; [110] arg1 > arg2 + retw LT ; [111] arg1 < arg2 + 2: + mov w,arg1h + cse w,arg2h + page 1b + jmp 1b + mov w,#4 + add spl,w + retw EQ + + .endfunc + #undef arg1l + #undef arg1h + #undef arg2l + #undef arg2h + #endif /* L_cmphi2 */ + + #if defined(L_cmpqi2) + #define arg1 1(sp) + #define arg2 2(sp) + + .sect .text.libgcc,"ax" + .global __cmpqi2 + .func _cmpqi2, __cmpqi2 + + __cmpqi2: + mov w, arg1 + sub w, arg2 + snz + page 2f + jmp 2f + + clr wreg + rl wreg + snb arg1, 7 + setb wreg, 2 + snb arg2, 7 + setb wreg, 1 + inc spl + inc spl + page __cmpqi_ret + jmp __cmpqi_ret + + 2: mov w, #2 + add spl, w + retw EQ + + .endfunc + #undef arg1l + #undef arg2l + #endif /* L_cmpqi2 */ + + #if defined(L_cmpsi2) + #define arg1d 4(sp) + #define arg1c 3(sp) + #define arg1b 2(sp) + #define arg1a 1(sp) + #define arg2d 8(sp) + #define arg2c 7(sp) + #define arg2b 6(sp) + #define arg2a 5(sp) + + .sect .text.libgcc,"ax" + .global __cmpsi2 + .func _cmpsi2, __cmpsi2 + + __cmpsi2: + mov w, arg1d + sub w, arg2d + snz + page 2f + jmp 2f + + 1: mov w, arg1c + subc w, arg2c + mov w, arg1b + subc w, arg2b + mov w, arg1a + subc w, arg2a + + clr arg2d + rl arg2d + snb arg1a, 7 + setb arg2d, 2 + snb arg2a, 7 + setb arg2d, 1 + mov w, #7 + page __cmp_ret + jmp __cmp_ret + + 2: mov w, arg1c + cse w, arg2c + page 1b + jmp 1b + + mov w, arg1b + cse w, arg2b + page 1b + jmp 1b + + mov w, arg1a + cse w, arg2a + page 1b + jmp 1b + + mov w, #8 + add spl, w + retw EQ + + .endfunc + + #undef arg1d + #undef arg1c + #undef arg1b + #undef arg1a + #undef arg2d + #undef arg2c + #undef arg2b + #undef arg2a + #endif /* L_cmpsi2 */ + + #if defined(L_cmpdi2) + #define arg1z 8(sp) + #define arg1y 7(sp) + #define arg1x 6(sp) + #define arg1w 5(sp) + #define arg1v 4(sp) + #define arg1u 3(sp) + #define arg1t 2(sp) + #define arg1s 1(sp) + + #define arg2z 16(sp) + #define arg2y 15(sp) + #define arg2x 14(sp) + #define arg2w 13(sp) + #define arg2v 12(sp) + #define arg2u 11(sp) + #define arg2t 10(sp) + #define arg2s 9(sp) + + .sect .text.libgcc,"ax" + .global __cmpdi2 + .func _cmpdi2, __cmpdi2 + + __cmpdi2: + mov w, arg1z + sub w, arg2z + snz + page 2f + jmp 2f + + 1: mov w, arg1y + subc w, arg2y + mov w, arg1x + subc w, arg2x + mov w, arg1w + subc w, arg2w + mov w, arg1v + subc w, arg2v + mov w, arg1u + subc w, arg2u + mov w, arg1t + subc w, arg2t + mov w, arg1s + subc w, arg2s + clr arg2z + rl arg2z + snb arg1s, 7 + setb arg2z, 2 + snb arg2s, 7 + setb arg2z, 1 + mov w, #15 + page __cmp_ret + jmp __cmp_ret + + 2: mov w, arg1y + cse w, arg2y + page 1b + jmp 1b + + mov w, arg1x + cse w, arg2x + page 1b + jmp 1b + + mov w, arg1w + cse w, arg2w + page 1b + jmp 1b + + mov w, arg1v + cse w, arg2v + page 1b + jmp 1b + + mov w, arg1u + cse w, arg2u + page 1b + jmp 1b + + mov w, arg1t + cse w, arg2t + page 1b + jmp 1b + + mov w, arg1s + cse w, arg2s + page 1b + jmp 1b + + mov w, #16 + add spl, w + retw EQ + + .endfunc + + #undef arg1z + #undef arg1y + #undef arg1x + #undef arg1w + #undef arg1v + #undef arg1u + #undef arg1t + #undef arg1s + #undef arg2z + #undef arg2y + #undef arg2x + #undef arg2w + #undef arg2v + #undef arg2u + #undef arg2t + #undef arg2s + + #endif /* L_cmpdi2 */ + + #if defined(L_cmpdi2_dp) + .sect .text.libgcc,"ax" + .global __cmpdi2_dp + .func _cmpdi2_dp, __cmpdi2_dp + + __cmpdi2_dp: + push 7(dp) + push 6(dp) + push 5(dp) + push 4(dp) + push 3(dp) + push 2(dp) + push 1(dp) + push (dp) + page __cmpdi2 + jmp __cmpdi2 + + .endfunc + #endif /* L_cmpdi2_dp */ + + #if defined(L_fp_pop_args_ret) + .sect .pram.libgcc,"ax" + .global __fp_pop_args_ret + .global __pop_args_ret + .global __pop2_args_ret + .func __fp_pop2_args_ret, __fp_pop2_args_ret + + __fp_pop2_args_ret: + mov w, #2 + __fp_pop_args_ret: + pop 0xfd + pop 0xfe + __pop_args_ret: + pop callh + pop calll + add spl, w + ret + + .endfunc + #endif /* L_fp_pop_args_ret */ + + #if defined(L__pop2_args_ret) + .sect .pram.libgcc,"ax" + .global __pop2_args_ret + .func __pop2_args_ret, __pop2_args_ret + + __pop2_args_ret: + mov w, #2 + pop callh + pop calll + add spl, w + ret + + .endfunc + #endif /* L__pop2_args_ret */ + + #if defined(L_leaf_fp_pop_args_ret) + .sect .pram.libgcc,"ax" + .global __leaf_fp_pop_args_ret, __leaf_fp_pop2_args_ret + .func __leaf_fp2_pop_args_ret, __leaf_fp_pop2_args_ret + + __leaf_fp_pop2_args_ret: + mov w, #2 + __leaf_fp_pop_args_ret: + pop 0xfd + pop 0xfe + add spl, w + ret + + .endfunc + #endif /* L_leaf_fp_pop_args_ret */ + + #if defined(L_movstrhi_countqi) + .sect .pram.libgcc,"ax" + .global __movstrhi_countqi + .func _movstrhi_countqi, __movstrhi_countqi + + __movstrhi_countqi: + push dph ; Save our pointer regs + push dpl + push iph + push ipl + + mov w, 5(SP) ; Get our dest pointer + mov dph, w + mov w, 6(SP) + mov dpl, w + mov w, 7(SP) ; And our source pointer + mov iph, w + mov w, 8(SP) + mov ipl, w + + 1: push (IP) ; *dest++ = *src++ + pop 0(DP) + inc ipl + inc dpl + decsz 9(SP) ; Loop until completed + page 1b + jmp 1b + + pop ipl ; Restore our pointer regs + pop iph + pop dpl + pop dph + + mov w, #5 ; Tidy up our stack args + add spl, w + ret + + .endfunc + #endif + + #if defined(L_movstrhi_counthi) + .sect .text.libgcc,"ax" + .global __movstrhi_counthi + .func _movstrhi_counthi, __movstrhi_counthi + + __movstrhi_counthi: + push dph ; Save our pointer regs + push dpl + push iph + push ipl + + mov w, 5(SP) ; Get our dest pointer + mov dph, w + mov w, 6(SP) + mov dpl, w + mov w, 7(SP) ; And our source pointer + mov iph, w + mov w, 8(SP) + mov ipl, w + + test 10(SP) ; If we have a nonzero LSB then adjust the + sz ; MSB of the loop count to allow us to use + inc 9(SP) ; skip tricks! + + 1: push (IP) ; *dest++ = *src++ + pop 0(DP) + inc ipl + inc dpl + decsnz 10(SP) ; Loop until completed - note the skip trick + decsz 9(SP) ; on the MSB! + page 1b + jmp 1b + + pop ipl ; Restore our pointer regs + pop iph + pop dpl + pop dph + + mov w, #6 ; Tidy up our stacked args. + add spl, w + ret + + .endfunc + #endif + + #if defined(L_exit) + .sect .text.libgcc,"ax" + .global __exit + .global _exit + .func _exit, __exit + .weak __exit + .weak _exit + + _exit: + __exit: + pop $88 + pop wreg + or w, $88 + push wreg + push #0 + push #1 + system ; Exit wreg + page __exit ; Never return + jmp __exit + + .endfunc + #endif + + #if defined(Labort) + .sect .text.libgcc,"ax" + .global _abort + .func abort, _abort + + _abort: + push #1 + push #0 + push #1 + system ; Exit 1 + ret + + .endfunc + #endif + + #if defined(Lwrite) + /* Dummy entrypoint to suppress problems with glue code. */ + .sect .text.libgcc,"ax" + .global _write + .func write, _write + ;; + ;; write (fil,buf,len) - say that write succeeds.... + ;; + _write: + movb $80, 5(SP) + movb $81, 6(SP) ; Return length written + mov w, #6 + add spl, w + ret + + .endfunc + #endif diff -Nrc3pad gcc-3.2.3/gcc/config/ip2k/t-ip2k gcc-3.3/gcc/config/ip2k/t-ip2k *** gcc-3.2.3/gcc/config/ip2k/t-ip2k 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ip2k/t-ip2k 2002-10-10 19:45:59.000000000 +0000 *************** *** 0 **** --- 1,49 ---- + LIB1ASMSRC = ip2k/libgcc.S + + LIB1ASMFUNCS = \ + _indcall \ + _mulhi3 \ + _mulsi3 \ + _muldi3 \ + _udivmodhi4 \ + _divmodhi4 \ + _udivmodsi4 \ + _divmodsi4 \ + _udivmoddi4 \ + _divmoddi4 \ + _cmpqi2 \ + _cmphi2 \ + _cmpsi2 \ + _cmpdi2 \ + _cmpdi2_dp \ + _fp_pop_args_ret \ + _pop2_args_ret \ + _leaf_fp_pop_args_ret \ + _movstrhi_countqi \ + _movstrhi_counthi \ + abort \ + _exit + + # libgcc2.h thinks that nobody would have SI mode when + # MIN_UNITS_PER_WORD == 1, so lie to keep from major compiler errors. + + TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -DDF=SF -g -DMIN_UNITS_PER_WORD=2 + + fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/ip2k/t-ip2k crt0.o + echo '#define FLOAT' > fp-bit.c + echo '#define FLOAT_ONLY' >> fp-bit.c + echo '#define DF SF' >> fp-bit.c + echo '#define DI SI' >> fp-bit.c + echo '#define CMPtype QItype' >> fp-bit.c + echo '#define SMALL_MACHINE' >> fp-bit.c + echo 'typedef int QItype __attribute__ ((mode (QI)));' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + + FPBIT = fp-bit.c + + # Our crt0 is written in assembler and we don't really support profiling. + + CRT0_S = $(srcdir)/config/ip2k/crt0.S + MCRT0_S = $(CRT0_S) + diff -Nrc3pad gcc-3.2.3/gcc/config/libgloss.h gcc-3.3/gcc/config/libgloss.h *** gcc-3.2.3/gcc/config/libgloss.h 1999-08-03 00:06:05.000000000 +0000 --- gcc-3.3/gcc/config/libgloss.h 2002-09-29 13:16:44.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,29 **** STARTFILE_SPEC is all wrong. */ /* The libgloss standard for crt0.s has the name based on the command line ! option. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared:%{pg:pgcrt0%O%s}%{!pg:%{p:pcrt0%O%s}%{!p:crt0%O%s}}}" --- 23,29 ---- STARTFILE_SPEC is all wrong. */ /* The libgloss standard for crt0.s has the name based on the command line ! option. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared:%{pg:pgcrt0%O%s}%{!pg:%{p:pcrt0%O%s}%{!p:crt0%O%s}}}" diff -Nrc3pad gcc-3.2.3/gcc/config/linux-aout.h gcc-3.3/gcc/config/linux-aout.h *** gcc-3.2.3/gcc/config/linux-aout.h 2000-09-25 08:23:05.000000000 +0000 --- gcc-3.3/gcc/config/linux-aout.h 2002-11-26 04:54:46.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,29 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is. ! For now, we play safe. It may change later. */ #if 0 #undef MULTIBYTE_CHARS --- 19,29 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is. ! For now, we play safe. It may change later. */ #if 0 #undef MULTIBYTE_CHARS *************** Boston, MA 02111-1307, USA. */ *** 41,45 **** #define SET_ASM_OP "\t.set\t" ! /* We need that too. */ ! #define HANDLE_SYSV_PRAGMA --- 41,45 ---- #define SET_ASM_OP "\t.set\t" ! /* We need that too. */ ! #define HANDLE_SYSV_PRAGMA 1 diff -Nrc3pad gcc-3.2.3/gcc/config/linux.h gcc-3.3/gcc/config/linux.h *** gcc-3.2.3/gcc/config/linux.h 2001-12-18 10:42:32.000000000 +0000 --- gcc-3.3/gcc/config/linux.h 2003-02-22 18:35:00.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,30 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is. ! For now, we play safe. It may change later. */ #if 0 #undef MULTIBYTE_CHARS --- 20,30 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is. ! For now, we play safe. It may change later. */ #if 0 #undef MULTIBYTE_CHARS *************** Boston, MA 02111-1307, USA. */ *** 43,49 **** /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add the GNU/Linux magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static ! object constructed before entering `main'. */ #undef STARTFILE_SPEC #ifdef USE_GNULIBC_1 --- 43,49 ---- /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add the GNU/Linux magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static ! object constructed before entering `main'. */ #undef STARTFILE_SPEC #ifdef USE_GNULIBC_1 *************** Boston, MA 02111-1307, USA. */ *** 73,79 **** #define ENDFILE_SPEC \ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" ! /* This is for -profile to use -lc_p instead of -lc. */ #ifndef CC1_SPEC #define CC1_SPEC "%{profile:-p}" #endif --- 73,79 ---- #define ENDFILE_SPEC \ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" ! /* This is for -profile to use -lc_p instead of -lc. */ #ifndef CC1_SPEC #define CC1_SPEC "%{profile:-p}" #endif *************** Boston, MA 02111-1307, USA. */ *** 85,91 **** #undef LIB_SPEC /* We no longer link with libc_p.a or libg.a by default. If you want to profile or debug the GNU/Linux C library, please add ! -profile or -ggdb to LDFLAGS at the link time, respectively. */ #if 1 #ifdef USE_GNULIBC_1 #define LIB_SPEC \ --- 85,91 ---- #undef LIB_SPEC /* We no longer link with libc_p.a or libg.a by default. If you want to profile or debug the GNU/Linux C library, please add ! -profile or -ggdb to LDFLAGS at the link time, respectively. */ #if 1 #ifdef USE_GNULIBC_1 #define LIB_SPEC \ *************** Boston, MA 02111-1307, USA. */ *** 93,101 **** %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" #else #define LIB_SPEC \ ! "%{shared: -lc} \ ! %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ ! %{profile:-lc_p} %{!profile: -lc}}" #endif #else #define LIB_SPEC \ --- 93,101 ---- %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" #else #define LIB_SPEC \ ! "%{pthread:-lpthread} \ ! %{shared:-lc} \ ! %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" #endif #else #define LIB_SPEC \ *************** Boston, MA 02111-1307, USA. */ *** 110,112 **** --- 110,114 ---- /* Define this so we can compile MS code for use with WINE. */ #define HANDLE_PRAGMA_PACK_PUSH_POP + + #define TARGET_HAS_F_SETLKW diff -Nrc3pad gcc-3.2.3/gcc/config/lynx.h gcc-3.3/gcc/config/lynx.h *** gcc-3.2.3/gcc/config/lynx.h 2001-11-15 17:55:26.000000000 +0000 --- gcc-3.3/gcc/config/lynx.h 2002-11-26 04:54:46.000000000 +0000 *************** *** 1,5 **** /* Target independent definitions for LynxOS. ! Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Target independent definitions for LynxOS. ! Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000, 2002 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 19,45 **** Boston, MA 02111-1307, USA. */ /* LynxOS is a multi-platform Unix, similar to SVR3, but not identical. ! We can get quite a bit from generic svr3, but have to do some overrides. */ #include "svr3.h" ! /* Define various macros, depending on the combination of flags. */ #undef CPP_SPEC #define CPP_SPEC "%{mthreads:-D_MULTITHREADED} \ %{mposix:-D_POSIX_SOURCE} \ %{msystem-v:-I/usr/include_v}" ! /* No asm spec needed, since using GNU assembler always. */ ! /* No linker spec needed, since using GNU linker always. */ #undef LIB_SPEC #define LIB_SPEC "%{mthreads:-L/lib/thread/} \ %{msystem-v:-lc_v} \ %{!msystem-v:%{mposix:-lc_p} -lc -lm}" ! /* Set the appropriate names for the Lynx startfiles. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{p:%{mthreads:thread/pinit1.o%s}%{!mthreads:pinit1.o%s}}%{!p:%{msystem-v:vinit1.o%s -e_start}%{!msystem-v:%{mthreads:thread/init1.o%s}%{!mthreads:init1.o%s}}}" --- 20,46 ---- Boston, MA 02111-1307, USA. */ /* LynxOS is a multi-platform Unix, similar to SVR3, but not identical. ! We can get quite a bit from generic svr3, but have to do some overrides. */ #include "svr3.h" ! /* Define various macros, depending on the combination of flags. */ #undef CPP_SPEC #define CPP_SPEC "%{mthreads:-D_MULTITHREADED} \ %{mposix:-D_POSIX_SOURCE} \ %{msystem-v:-I/usr/include_v}" ! /* No asm spec needed, since using GNU assembler always. */ ! /* No linker spec needed, since using GNU linker always. */ #undef LIB_SPEC #define LIB_SPEC "%{mthreads:-L/lib/thread/} \ %{msystem-v:-lc_v} \ %{!msystem-v:%{mposix:-lc_p} -lc -lm}" ! /* Set the appropriate names for the Lynx startfiles. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{p:%{mthreads:thread/pinit1.o%s}%{!mthreads:pinit1.o%s}}%{!p:%{msystem-v:vinit1.o%s -e_start}%{!msystem-v:%{mthreads:thread/init1.o%s}%{!mthreads:init1.o%s}}}" *************** Boston, MA 02111-1307, USA. */ *** 47,53 **** #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{p:_etext.o%s}%{!p:initn.o%s}" ! /* Override the svr3 versions. */ #undef WCHAR_TYPE #define WCHAR_TYPE "int" --- 48,54 ---- #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{p:_etext.o%s}%{!p:initn.o%s}" ! /* Override the svr3 versions. */ #undef WCHAR_TYPE #define WCHAR_TYPE "int" *************** Boston, MA 02111-1307, USA. */ *** 57,72 **** /* We want to output DBX (stabs) debugging information normally. */ ! #define DBX_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG /* It is convenient to be able to generate standard coff debugging ! if requested via -gcoff. */ ! #define SDB_DEBUGGING_INFO ! /* Be function-relative for block and source line stab directives. */ #define DBX_BLOCKS_FUNCTION_RELATIVE 1 --- 58,73 ---- /* We want to output DBX (stabs) debugging information normally. */ ! #define DBX_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG /* It is convenient to be able to generate standard coff debugging ! if requested via -gcoff. */ ! #define SDB_DEBUGGING_INFO 1 ! /* Be function-relative for block and source line stab directives. */ #define DBX_BLOCKS_FUNCTION_RELATIVE 1 *************** Boston, MA 02111-1307, USA. */ *** 94,102 **** /* Handle #pragma pack and sometimes #pragma weak. */ ! #define HANDLE_SYSV_PRAGMA ! /* Some additional command-line options. */ #define TARGET_THREADS (target_flags & MASK_THREADS) #define MASK_THREADS 0x40000000 --- 95,103 ---- /* Handle #pragma pack and sometimes #pragma weak. */ ! #define HANDLE_SYSV_PRAGMA 1 ! /* Some additional command-line options. */ #define TARGET_THREADS (target_flags & MASK_THREADS) #define MASK_THREADS 0x40000000 *************** do { \ *** 123,138 **** } while (0) /* Since init.o et al put all sorts of stuff into the init section, ! we can't use the standard init section support in crtbegin.o. */ #undef INIT_SECTION_ASM_OP #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ FINI_SECTION_FUNCTION #undef CTORS_SECTION_ASM_OP --- 124,138 ---- } while (0) /* Since init.o et al put all sorts of stuff into the init section, ! we can't use the standard init section support in crtbegin.o. */ #undef INIT_SECTION_ASM_OP #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ FINI_SECTION_FUNCTION #undef CTORS_SECTION_ASM_OP *************** do { \ *** 143,148 **** #undef DO_GLOBAL_CTORS_BODY #undef DO_GLOBAL_DTORS_BODY ! /* LynxOS doesn't have mcount. */ #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(file, profile_label_no) --- 143,148 ---- #undef DO_GLOBAL_CTORS_BODY #undef DO_GLOBAL_DTORS_BODY ! /* LynxOS doesn't have mcount. */ #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(file, profile_label_no) diff -Nrc3pad gcc-3.2.3/gcc/config/lynx-ng.h gcc-3.3/gcc/config/lynx-ng.h *** gcc-3.2.3/gcc/config/lynx-ng.h 1999-09-15 21:41:13.000000000 +0000 --- gcc-3.3/gcc/config/lynx-ng.h 2002-11-26 04:54:46.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 19,25 **** Boston, MA 02111-1307, USA. */ /* This is for backwards compatibility with older Lynx tools, which use ! a version of a.out format. */ #undef ASM_SPEC #define ASM_SPEC "%{mcoff:-C}" --- 19,25 ---- Boston, MA 02111-1307, USA. */ /* This is for backwards compatibility with older Lynx tools, which use ! a version of a.out format. */ #undef ASM_SPEC #define ASM_SPEC "%{mcoff:-C}" *************** Boston, MA 02111-1307, USA. */ *** 54,60 **** /* We want to output DBX debugging information. */ ! #define DBX_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 54,60 ---- /* We want to output DBX debugging information. */ ! #define DBX_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG *************** Boston, MA 02111-1307, USA. */ *** 62,68 **** we can create debuggable SDB/coff files. This won't be needed when stabs-in-coff works. */ ! #define SDB_DEBUGGING_INFO /* Generate calls to memcpy, memcmp and memset. */ --- 62,68 ---- we can create debuggable SDB/coff files. This won't be needed when stabs-in-coff works. */ ! #define SDB_DEBUGGING_INFO 1 /* Generate calls to memcpy, memcmp and memset. */ *************** Boston, MA 02111-1307, USA. */ *** 70,76 **** /* Handle #pragma pack and sometimes #pragma weak. */ ! #define HANDLE_SYSV_PRAGMA #define TARGET_THREADS (target_flags & MASK_THREADS) #define MASK_THREADS 0x40000000 --- 70,76 ---- /* Handle #pragma pack and sometimes #pragma weak. */ ! #define HANDLE_SYSV_PRAGMA 1 #define TARGET_THREADS (target_flags & MASK_THREADS) #define MASK_THREADS 0x40000000 *************** Boston, MA 02111-1307, USA. */ *** 103,109 **** #define MD_EXEC_PREFIX "/usr/local/lib/gcc-" ! /* This is needed because /bin/ld does not handle -L options correctly. */ #define LINK_LIBGCC_SPECIAL_1 --- 103,109 ---- #define MD_EXEC_PREFIX "/usr/local/lib/gcc-" ! /* This is needed because /bin/ld does not handle -L options correctly. */ #define LINK_LIBGCC_SPECIAL_1 diff -Nrc3pad gcc-3.2.3/gcc/config/m32r/m32r.c gcc-3.3/gcc/config/m32r/m32r.c *** gcc-3.2.3/gcc/config/m32r/m32r.c 2002-03-22 19:25:51.000000000 +0000 --- gcc-3.3/gcc/config/m32r/m32r.c 2002-10-16 00:40:32.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 36,42 **** #include "recog.h" #include "toplev.h" #include "ggc.h" ! #include "m32r-protos.h" #include "target.h" #include "target-def.h" --- 36,42 ---- #include "recog.h" #include "toplev.h" #include "ggc.h" ! #include "tm_p.h" #include "target.h" #include "target-def.h" *************** static int m32r_sched_reorder PARAM *** 74,79 **** --- 74,83 ---- static int m32r_variable_issue PARAMS ((FILE *, int, rtx, int)); static int m32r_issue_rate PARAMS ((void)); + static void m32r_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)); + static void m32r_encode_section_info PARAMS ((tree, int)); + static const char *m32r_strip_name_encoding PARAMS ((const char *)); + static void init_idents PARAMS ((void)); /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE *************** static int m32r_issue_rate PARAMS *** 102,107 **** --- 106,116 ---- #undef TARGET_SCHED_REORDER #define TARGET_SCHED_REORDER m32r_sched_reorder + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING m32r_strip_name_encoding + struct gcc_target targetm = TARGET_INITIALIZER; /* Called by OVERRIDE_OPTIONS to initialize various things. */ *************** enum m32r_mode_class *** 172,178 **** /* Value is 1 if register/mode pair is acceptable on arc. */ ! unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER] = { T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, S_MODES, S_MODES, S_MODES, --- 181,187 ---- /* Value is 1 if register/mode pair is acceptable on arc. */ ! const unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER] = { T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, S_MODES, S_MODES, S_MODES, *************** static tree large_ident1; *** 263,269 **** static tree large_ident2; static void ! init_idents PARAMS ((void)) { if (small_ident1 == 0) { --- 272,278 ---- static tree large_ident2; static void ! init_idents () { if (small_ident1 == 0) { *************** m32r_handle_model_attribute (node, name, *** 320,334 **** or a constant of some sort. RELOC indicates whether forming the initial value of DECL requires link-time relocations. */ ! void ! m32r_select_section (decl, reloc) tree decl; int reloc; { if (TREE_CODE (decl) == STRING_CST) { if (! flag_writable_strings) ! const_section (); else data_section (); } --- 329,344 ---- or a constant of some sort. RELOC indicates whether forming the initial value of DECL requires link-time relocations. */ ! static void ! m32r_select_section (decl, reloc, align) tree decl; int reloc; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; { if (TREE_CODE (decl) == STRING_CST) { if (! flag_writable_strings) ! readonly_data_section (); else data_section (); } *************** m32r_select_section (decl, reloc) *** 344,353 **** && !TREE_CONSTANT (DECL_INITIAL (decl)))) data_section (); else ! const_section (); } else ! const_section (); } /* Encode section information of DECL, which is either a VAR_DECL, --- 354,363 ---- && !TREE_CONSTANT (DECL_INITIAL (decl)))) data_section (); else ! readonly_data_section (); } else ! readonly_data_section (); } /* Encode section information of DECL, which is either a VAR_DECL, *************** m32r_select_section (decl, reloc) *** 365,377 **** large: prefixed with LARGE_FLAG_CHAR */ ! void ! m32r_encode_section_info (decl) tree decl; { char prefix = 0; tree model = 0; switch (TREE_CODE (decl)) { case VAR_DECL : --- 375,391 ---- large: prefixed with LARGE_FLAG_CHAR */ ! static void ! m32r_encode_section_info (decl, first) tree decl; + int first; { char prefix = 0; tree model = 0; + if (!first) + return; + switch (TREE_CODE (decl)) { case VAR_DECL : *************** m32r_encode_section_info (decl) *** 475,480 **** --- 489,505 ---- } } + /* Undo the effects of the above. */ + + static const char * + m32r_strip_name_encoding (str) + const char *str; + { + str += ENCODED_NAME_P (str); + str += *str == '*'; + return str; + } + /* Do anything needed before RTL is emitted for each function. */ void *************** extend_operand (op, mode) *** 1004,1010 **** } } ! /* Return non-zero if the operand is an insn that is a small insn. Allow const_int 0 as well, which is a placeholder for NOP slots. */ int --- 1029,1035 ---- } } ! /* Return nonzero if the operand is an insn that is a small insn. Allow const_int 0 as well, which is a placeholder for NOP slots. */ int *************** small_insn_p (op, mode) *** 1021,1027 **** return get_attr_length (op) == 2; } ! /* Return non-zero if the operand is an insn that is a large insn. */ int large_insn_p (op, mode) --- 1046,1052 ---- return get_attr_length (op) == 2; } ! /* Return nonzero if the operand is an insn that is a large insn. */ int large_insn_p (op, mode) *************** large_insn_p (op, mode) *** 1037,1054 **** /* Comparisons. */ - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, - return the mode to be used for the comparison. */ - - int - m32r_select_cc_mode (op, x, y) - int op ATTRIBUTE_UNUSED; - rtx x ATTRIBUTE_UNUSED; - rtx y ATTRIBUTE_UNUSED; - { - return (int) CCmode; - } - /* X and Y are two things to compare using CODE. Emit the compare insn and return the rtx for compare [arg0 of the if_then_else]. If need_compare is true then the comparison insn must be generated, rather --- 1062,1067 ---- *************** gen_compare (code, x, y, need_compare) *** 1060,1068 **** rtx x, y; int need_compare; { - enum machine_mode mode = SELECT_CC_MODE (code, x, y); enum rtx_code compare_code, branch_code; ! rtx cc_reg = gen_rtx_REG (mode, CARRY_REGNUM); int must_swap = 0; switch (code) --- 1073,1080 ---- rtx x, y; int need_compare; { enum rtx_code compare_code, branch_code; ! rtx cc_reg = gen_rtx_REG (CCmode, CARRY_REGNUM); int must_swap = 0; switch (code) *************** gen_compare (code, x, y, need_compare) *** 1108,1114 **** { emit_insn (gen_cmp_eqsi_insn (x, y)); ! return gen_rtx (code, mode, cc_reg, const0_rtx); } break; --- 1120,1126 ---- { emit_insn (gen_cmp_eqsi_insn (x, y)); ! return gen_rtx (code, CCmode, cc_reg, const0_rtx); } break; *************** gen_compare (code, x, y, need_compare) *** 1148,1154 **** abort (); } ! return gen_rtx (code, mode, cc_reg, const0_rtx); } break; --- 1160,1166 ---- abort (); } ! return gen_rtx (code, CCmode, cc_reg, const0_rtx); } break; *************** gen_compare (code, x, y, need_compare) *** 1188,1194 **** abort(); } ! return gen_rtx (code, mode, cc_reg, const0_rtx); } break; --- 1200,1206 ---- abort(); } ! return gen_rtx (code, CCmode, cc_reg, const0_rtx); } break; *************** gen_compare (code, x, y, need_compare) *** 1201,1212 **** /* reg/reg equal comparison */ if (compare_code == EQ && register_operand (y, SImode)) ! return gen_rtx (code, mode, x, y); /* reg/zero signed comparison */ if ((compare_code == EQ || compare_code == LT) && y == const0_rtx) ! return gen_rtx (code, mode, x, y); /* reg/smallconst equal comparison */ if (compare_code == EQ --- 1213,1224 ---- /* reg/reg equal comparison */ if (compare_code == EQ && register_operand (y, SImode)) ! return gen_rtx (code, CCmode, x, y); /* reg/zero signed comparison */ if ((compare_code == EQ || compare_code == LT) && y == const0_rtx) ! return gen_rtx (code, CCmode, x, y); /* reg/smallconst equal comparison */ if (compare_code == EQ *************** gen_compare (code, x, y, need_compare) *** 1215,1221 **** { rtx tmp = gen_reg_rtx (SImode); emit_insn (gen_cmp_ne_small_const_insn (tmp, x, y)); ! return gen_rtx (code, mode, tmp, const0_rtx); } /* reg/const equal comparison */ --- 1227,1233 ---- { rtx tmp = gen_reg_rtx (SImode); emit_insn (gen_cmp_ne_small_const_insn (tmp, x, y)); ! return gen_rtx (code, CCmode, tmp, const0_rtx); } /* reg/const equal comparison */ *************** gen_compare (code, x, y, need_compare) *** 1223,1229 **** && CONSTANT_P (y)) { rtx tmp = force_reg (GET_MODE (x), y); ! return gen_rtx (code, mode, x, tmp); } } --- 1235,1241 ---- && CONSTANT_P (y)) { rtx tmp = force_reg (GET_MODE (x), y); ! return gen_rtx (code, CCmode, x, tmp); } } *************** gen_compare (code, x, y, need_compare) *** 1259,1265 **** abort (); } ! return gen_rtx (branch_code, VOIDmode, cc_reg, CONST0_RTX (mode)); } /* Split a 2 word move (DI or DF) into component parts. */ --- 1271,1277 ---- abort (); } ! return gen_rtx (branch_code, VOIDmode, cc_reg, CONST0_RTX (CCmode)); } /* Split a 2 word move (DI or DF) into component parts. */ *************** gen_split_move_double (operands) *** 1379,1385 **** else abort (); ! val = gen_sequence (); end_sequence (); return val; } --- 1391,1397 ---- else abort (); ! val = get_insns (); end_sequence (); return val; } *************** m32r_setup_incoming_varargs (cum, mode, *** 1435,1446 **** if (mode == BLKmode) abort (); ! /* We must treat `__builtin_va_alist' as an anonymous arg. */ ! if (current_function_varargs) ! first_anon_arg = *cum; ! else ! first_anon_arg = (ROUND_ADVANCE_CUM (*cum, mode, type) ! + ROUND_ADVANCE_ARG (mode, type)); if (first_anon_arg < M32R_MAX_PARM_REGS) { --- 1447,1454 ---- if (mode == BLKmode) abort (); ! first_anon_arg = (ROUND_ADVANCE_CUM (*cum, mode, type) ! + ROUND_ADVANCE_ARG (mode, type)); if (first_anon_arg < M32R_MAX_PARM_REGS) { *************** m32r_output_function_epilogue (file, siz *** 2173,2179 **** m32r_compute_function_type (NULL_TREE); } ! /* Return non-zero if this function is known to have a null or 1 instruction epilogue. */ int --- 2181,2187 ---- m32r_compute_function_type (NULL_TREE); } ! /* Return nonzero if this function is known to have a null or 1 instruction epilogue. */ int *************** m32r_print_operand (file, x, code) *** 2303,2316 **** case 'A' : { - REAL_VALUE_TYPE d; char str[30]; if (GET_CODE (x) != CONST_DOUBLE || GET_MODE_CLASS (GET_MODE (x)) != MODE_FLOAT) fatal_insn ("bad insn for 'A'", x); ! REAL_VALUE_FROM_CONST_DOUBLE (d, x); ! REAL_VALUE_TO_DECIMAL (d, "%.20e", str); fprintf (file, "%s", str); return; } --- 2311,2323 ---- case 'A' : { char str[30]; if (GET_CODE (x) != CONST_DOUBLE || GET_MODE_CLASS (GET_MODE (x)) != MODE_FLOAT) fatal_insn ("bad insn for 'A'", x); ! ! real_to_decimal (str, CONST_DOUBLE_REAL_VALUE (x), sizeof (str), 0, 1); fprintf (file, "%s", str); return; } *************** zero_and_one (operand1, operand2) *** 2582,2588 **** ||((INTVAL (operand1) == 1) && (INTVAL (operand2) == 0))); } ! /* Return non-zero if the operand is suitable for use in a conditional move sequence. */ int conditional_move_operand (operand, mode) rtx operand; --- 2589,2595 ---- ||((INTVAL (operand1) == 1) && (INTVAL (operand2) == 0))); } ! /* Return nonzero if the operand is suitable for use in a conditional move sequence. */ int conditional_move_operand (operand, mode) rtx operand; *************** m32r_output_block_move (insn, operands) *** 2854,2860 **** stores are done without any increment, then the remaining ones can use the pre-increment addressing mode. ! Note: expand_block_move() also relies upon this behaviour when building loops to copy large blocks. */ first_time = 1; --- 2861,2867 ---- stores are done without any increment, then the remaining ones can use the pre-increment addressing mode. ! Note: expand_block_move() also relies upon this behavior when building loops to copy large blocks. */ first_time = 1; diff -Nrc3pad gcc-3.2.3/gcc/config/m32r/m32r.h gcc-3.3/gcc/config/m32r/m32r.h *** gcc-3.2.3/gcc/config/m32r/m32r.h 2002-01-08 22:51:33.000000000 +0000 --- gcc-3.3/gcc/config/m32r/m32r.h 2002-09-24 12:48:57.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 185,191 **** extern int target_flags; ! /* If non-zero, tell the linker to do relaxing. We don't do anything with the option, other than recognize it. LINK_SPEC handles passing -relax to the linker. This can cause incorrect debugging information as line numbers may --- 185,191 ---- extern int target_flags; ! /* If nonzero, tell the linker to do relaxing. We don't do anything with the option, other than recognize it. LINK_SPEC handles passing -relax to the linker. This can cause incorrect debugging information as line numbers may *************** extern enum m32r_sdata m32r_sdata; *** 421,430 **** /* Target machine storage layout. */ - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN 1 --- 421,426 ---- *************** extern enum m32r_sdata m32r_sdata; *** 442,456 **** value will be set based on preprocessor defines. */ /*#define LIBGCC2_WORDS_BIG_ENDIAN 1*/ - /* Number of bits in an addressable storage unit. */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 --- 438,443 ---- *************** extern enum m32r_sdata m32r_sdata; *** 475,484 **** PROMOTE_MODE. */ /*#define PROMOTE_FUNCTION_RETURN*/ - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 --- 462,467 ---- *************** extern enum m32r_sdata m32r_sdata; *** 497,503 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ --- 480,486 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ *************** extern enum m32r_sdata m32r_sdata; *** 651,657 **** ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */ ! extern unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER]; extern unsigned int m32r_mode_class[]; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((m32r_hard_regno_mode_ok[REGNO] & m32r_mode_class[MODE]) != 0) --- 634,640 ---- ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */ ! extern const unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER]; extern unsigned int m32r_mode_class[]; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((m32r_hard_regno_mode_ok[REGNO] & m32r_mode_class[MODE]) != 0) *************** M32R_STACK_ALIGN (current_function_outgo *** 989,995 **** { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }} ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the --- 972,978 ---- { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }} ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the *************** M32R_STACK_ALIGN (current_function_outgo *** 1101,1107 **** pointer to them is passed in a reg if one is available (and that is what we're given). This macro is only used in this file. */ ! #define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \ (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) < M32R_MAX_PARM_REGS) /* Determine where to put an argument to a function. --- 1084,1090 ---- pointer to them is passed in a reg if one is available (and that is what we're given). This macro is only used in this file. */ ! #define PASS_IN_REG_P(CUM, MODE, TYPE) \ (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) < M32R_MAX_PARM_REGS) /* Determine where to put an argument to a function. *************** M32R_STACK_ALIGN (current_function_outgo *** 1119,1132 **** /* On the M32R the first M32R_MAX_PARM_REGS args are normally in registers and the rest are pushed. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! (PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED)) \ ! ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \ ! : 0) ! ! /* ??? Quick hack to try to get varargs working the normal way. */ ! #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ ! (((! current_function_varargs || (NAMED)) \ ! && PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED))) \ ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \ : 0) --- 1102,1108 ---- /* On the M32R the first M32R_MAX_PARM_REGS args are normally in registers and the rest are pushed. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! (PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \ ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \ : 0) *************** do { \ *** 1438,1449 **** /* Condition code usage. */ ! /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, ! return the mode to be used for the comparison. */ ! #define SELECT_CC_MODE(OP, X, Y) \ ! ((enum machine_mode)m32r_select_cc_mode ((int)OP, X, Y)) ! ! /* Return non-zero if SELECT_CC_MODE will never return MODE for a floating point inequality comparison. */ #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/ --- 1414,1420 ---- /* Condition code usage. */ ! /* Return nonzero if SELECT_CC_MODE will never return MODE for a floating point inequality comparison. */ #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/ *************** do { \ *** 1543,1556 **** #define SDATA_SECTION_ASM_OP "\t.section .sdata" #define SBSS_SECTION_ASM_OP "\t.section .sbss" /* This one is for svr4.h. */ ! #undef CONST_SECTION_ASM_OP ! #define CONST_SECTION_ASM_OP "\t.section .rodata" /* A list of names for sections other than the standard two, which are `in_text' and `in_data'. You need not define this macro on a system with no other sections (that GCC needs to use). */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_sbss, in_const /* One or more functions to be defined in "varasm.c". These functions should do jobs analogous to those of `text_section' and --- 1514,1527 ---- #define SDATA_SECTION_ASM_OP "\t.section .sdata" #define SBSS_SECTION_ASM_OP "\t.section .sbss" /* This one is for svr4.h. */ ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP "\t.section .rodata" /* A list of names for sections other than the standard two, which are `in_text' and `in_data'. You need not define this macro on a system with no other sections (that GCC needs to use). */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_sbss /* One or more functions to be defined in "varasm.c". These functions should do jobs analogous to those of `text_section' and *************** do { \ *** 1558,1564 **** macro if you do not define `EXTRA_SECTIONS'. */ #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ SDATA_SECTION_FUNCTION \ SBSS_SECTION_FUNCTION --- 1529,1534 ---- *************** sbss_section () \ *** 1584,1608 **** } \ } \ ! /* A C statement or statements to switch to the appropriate section for ! output of EXP. You can assume that EXP is either a `VAR_DECL' node ! or a constant of some sort. RELOC indicates whether the initial value ! of EXP requires link-time relocations. */ ! #undef SELECT_SECTION ! #define SELECT_SECTION(EXP, RELOC, ALIGN) \ ! m32r_select_section ((EXP), (RELOC)) ! ! /* A C statement or statements to switch to the appropriate section for ! output of RTX in mode MODE. You can assume that RTX ! is some kind of constant in RTL. The argument MODE is redundant ! except in the case of a `const_int' rtx. Select the section by ! calling `text_section' or one of the alternatives for other ! sections. ! ! Do not define this macro if you put all constants in the read-only ! data section. */ ! ! #undef SELECT_RTX_SECTION /* Define this macro if jump tables (for tablejump insns) should be output in the text section, along with the assembler instructions. --- 1554,1561 ---- } \ } \ ! #undef TARGET_ASM_SELECT_SECTION ! #define TARGET_ASM_SELECT_SECTION m32r_select_section /* Define this macro if jump tables (for tablejump insns) should be output in the text section, along with the assembler instructions. *************** sbss_section () \ *** 1646,1663 **** /*|| SMALL_NAME_P (SYMBOL_NAME)*/ \ || MEDIUM_NAME_P (SYMBOL_NAME) \ || LARGE_NAME_P (SYMBOL_NAME)) - - #define ENCODE_SECTION_INFO(DECL) m32r_encode_section_info (DECL) - - /* Decode SYM_NAME and store the real name part in VAR, sans - the characters that encode section info. Define this macro if - ENCODE_SECTION_INFO alters the symbol's name string. */ - /* Note that we have to handle symbols like "%*start". */ - #define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \ - do { \ - (VAR) = (SYMBOL_NAME) + ENCODED_NAME_P (SYMBOL_NAME); \ - (VAR) += *(VAR) == '*'; \ - } while (0) /* PIC */ --- 1599,1604 ---- *************** do { \ *** 1719,1758 **** no longer contain unusual constructs. */ #define ASM_APP_OFF "" ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! /* On the M32R we need to ensure the next instruction starts on a 32 bit ! boundary [the previous insn must either be 2 16 bit insns or 1 32 bit]. */ ! #define ASM_OUTPUT_LABEL(FILE, NAME) \ ! do \ ! { \ ! assemble_name (FILE, NAME); \ ! fputs (":\n", FILE); \ ! } \ ! while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do \ ! { \ ! fputs ("\t.global\t", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE); \ ! } \ ! while (0) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! do \ ! { \ ! const char * real_name; \ ! STRIP_NAME_ENCODING (real_name, (NAME)); \ ! asm_fprintf (FILE, "%U%s", real_name); \ ! } \ ! while (0) /* If -Os, don't force line number labels to begin at the beginning of the word; we still want the assembler to try to put things in parallel, --- 1660,1673 ---- no longer contain unusual constructs. */ #define ASM_APP_OFF "" ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global\t" /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! asm_fprintf (FILE, "%U%s", (*targetm.strip_name_encoding) (NAME)) /* If -Os, don't force line number labels to begin at the beginning of the word; we still want the assembler to try to put things in parallel, *************** extern char m32r_punct_chars[256]; *** 1835,1846 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on ! the section that the address refers to. On these machines, ! define the macro `ENCODE_SECTION_INFO' to store the information ! into the `symbol_ref', and then check for it here. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ m32r_print_operand_address (FILE, ADDR) --- 1750,1756 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ m32r_print_operand_address (FILE, ADDR) *************** extern char m32r_punct_chars[256]; *** 1942,1948 **** #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do \ { \ ! ASM_GLOBALIZE_LABEL (FILE, NAME); \ ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ } \ while (0) --- 1852,1858 ---- #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do \ { \ ! (*targetm.asm_out.globalize_label) (FILE, NAME); \ ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ } \ while (0) *************** extern char m32r_punct_chars[256]; *** 1950,1962 **** /* Debugging information. */ /* Generate DBX and DWARF debugging information. */ ! #undef DBX_DEBUGGING_INFO ! #undef DWARF_DEBUGGING_INFO ! #undef DWARF2_DEBUGGING_INFO ! ! #define DBX_DEBUGGING_INFO ! #define DWARF_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO /* Prefer STABS (for now). */ #undef PREFERRED_DEBUGGING_TYPE --- 1860,1868 ---- /* Debugging information. */ /* Generate DBX and DWARF debugging information. */ ! #define DBX_DEBUGGING_INFO 1 ! #define DWARF_DEBUGGING_INFO 1 ! #define DWARF2_DEBUGGING_INFO 1 /* Prefer STABS (for now). */ #undef PREFERRED_DEBUGGING_TYPE diff -Nrc3pad gcc-3.2.3/gcc/config/m32r/m32r.md gcc-3.3/gcc/config/m32r/m32r.md *** gcc-3.2.3/gcc/config/m32r/m32r.md 2002-01-09 11:02:07.000000000 +0000 --- gcc-3.3/gcc/config/m32r/m32r.md 2002-09-20 23:46:54.000000000 +0000 *************** *** 1242,1248 **** ;; reg == small constant comparisons are best handled by putting the result ;; of the comparison in a tmp reg and then using beqz/bnez. ;; ??? The result register doesn't contain 0/STORE_FLAG_VALUE, ! ;; it contains 0/non-zero. (define_insn "cmp_ne_small_const_insn" [(set (match_operand:SI 0 "register_operand" "=r,r") --- 1242,1248 ---- ;; reg == small constant comparisons are best handled by putting the result ;; of the comparison in a tmp reg and then using beqz/bnez. ;; ??? The result register doesn't contain 0/STORE_FLAG_VALUE, ! ;; it contains 0/nonzero. (define_insn "cmp_ne_small_const_insn" [(set (match_operand:SI 0 "register_operand" "=r,r") *************** *** 1681,1687 **** start_sequence (); emit_insn (gen_cmp_ltusi_insn (op1, GEN_INT (1))); emit_insn (gen_movcc_insn (op0)); ! operands[3] = gen_sequence (); end_sequence (); }") --- 1681,1687 ---- start_sequence (); emit_insn (gen_cmp_ltusi_insn (op1, GEN_INT (1))); emit_insn (gen_movcc_insn (op0)); ! operands[3] = get_insns (); end_sequence (); }") *************** *** 1735,1741 **** emit_insn (gen_cmp_ltusi_insn (op3, GEN_INT (1))); emit_insn (gen_movcc_insn (op0)); ! operands[4] = gen_sequence (); end_sequence (); }") --- 1735,1741 ---- emit_insn (gen_cmp_ltusi_insn (op3, GEN_INT (1))); emit_insn (gen_movcc_insn (op0)); ! operands[4] = get_insns (); end_sequence (); }") diff -Nrc3pad gcc-3.2.3/gcc/config/m32r/m32r-protos.h gcc-3.3/gcc/config/m32r/m32r-protos.h *** gcc-3.2.3/gcc/config/m32r/m32r-protos.h 2001-12-09 20:13:14.000000000 +0000 --- gcc-3.3/gcc/config/m32r/m32r-protos.h 2002-06-10 22:20:47.000000000 +0000 *************** *** 1,5 **** /* Prototypes for m32r.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Prototypes for m32r.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** extern void m32r_finalize_pic PARAMS *** 33,42 **** extern void m32r_asm_file_start PARAMS ((FILE *)); extern int direct_return PARAMS ((void)); #ifdef TREE_CODE - extern void m32r_select_section PARAMS ((tree, int)); - extern void m32r_encode_section_info PARAMS ((tree)); extern enum m32r_function_type m32r_compute_function_type PARAMS ((tree)); - extern void m32r_select_section PARAMS ((tree, int)); #ifdef HAVE_MACHINE_MODES extern void m32r_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, Mmode, tree, int *, int)); --- 33,39 ---- *************** extern int function_arg_partial_nregs *** 47,53 **** #ifdef RTX_CODE extern int easy_di_const PARAMS ((rtx)); extern int easy_df_const PARAMS ((rtx)); - extern int m32r_select_cc_mode PARAMS ((int, rtx, rtx)); extern rtx gen_compare PARAMS ((enum rtx_code, rtx, rtx, int)); extern rtx gen_split_move_double PARAMS ((rtx *)); extern int m32r_address_code PARAMS ((rtx)); --- 44,49 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/larith.asm gcc-3.3/gcc/config/m68hc11/larith.asm *** gcc-3.2.3/gcc/config/m68hc11/larith.asm 2002-04-09 18:56:42.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/larith.asm 2003-04-12 14:53:47.000000000 +0000 *************** *** 1,5 **** /* libgcc routines for M68HC11 & M68HC12. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* libgcc routines for M68HC11 & M68HC12. ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 35,57 **** .file "larith.asm" .sect .text #define REG(NAME) \ ! NAME: .word 0; \ .type NAME,@object ; \ .size NAME,2 #ifdef L_regs_min /* Pseudo hard registers used by gcc. ! They must be located in page0. ! They will normally appear at the end of .page0 section. */ ! #ifdef mc68hc12 ! .sect .bss ! #else ! .sect .page0 ! #endif .globl _.tmp .globl _.z,_.xy REG(_.tmp) --- 35,108 ---- .file "larith.asm" + #ifdef __HAVE_SHORT_INT__ + .mode mshort + #else + .mode mlong + #endif + + .macro declare_near name + .globl \name + .type \name,@function + .size \name,.Lend-\name + \name: + .endm + + #if defined(__USE_RTC__) + # define ARG(N) N+1 + + .macro ret + #if defined(mc68hc12) + rtc + #else + jmp __return_32 + #endif + .endm + + .macro declare name + .globl \name + .type \name,@function + .size \name,.Lend-\name + .far \name + \name: + .endm + + .macro farsym name + .far NAME + .endm + + #else + # define ARG(N) N + + .macro ret + rts + .endm + + .macro farsym name + .endm + + .macro declare name + .globl \name + .type \name,@function + .size \name,.Lend-\name + \name: + .endm + + #endif + .sect .text #define REG(NAME) \ ! NAME: .dc.w 1; \ .type NAME,@object ; \ .size NAME,2 #ifdef L_regs_min /* Pseudo hard registers used by gcc. ! They should be located in page0. */ ! ! .sect .softregs .globl _.tmp .globl _.z,_.xy REG(_.tmp) *************** REG(_.xy) *** 61,114 **** #endif #ifdef L_regs_frame ! #ifdef mc68hc12 ! .sect .bss ! #else ! .sect .page0 ! #endif .globl _.frame REG(_.frame) #endif #ifdef L_regs_d1_2 ! #ifdef mc68hc12 ! .sect .bss ! #else ! .sect .page0 ! #endif .globl _.d1,_.d2 REG(_.d1) REG(_.d2) #endif #ifdef L_regs_d3_4 ! #ifdef mc68hc12 ! .sect .bss ! #else ! .sect .page0 ! #endif .globl _.d3,_.d4 REG(_.d3) REG(_.d4) #endif #ifdef L_regs_d5_6 ! #ifdef mc68hc12 ! .sect .bss ! #else ! .sect .page0 ! #endif .globl _.d5,_.d6 REG(_.d5) REG(_.d6) #endif #ifdef L_regs_d7_8 ! #ifdef mc68hc12 ! .sect .bss ! #else ! .sect .page0 ! #endif .globl _.d7,_.d8 REG(_.d7) REG(_.d8) --- 112,145 ---- #endif #ifdef L_regs_frame ! .sect .softregs .globl _.frame REG(_.frame) #endif #ifdef L_regs_d1_2 ! .sect .softregs .globl _.d1,_.d2 REG(_.d1) REG(_.d2) #endif #ifdef L_regs_d3_4 ! .sect .softregs .globl _.d3,_.d4 REG(_.d3) REG(_.d4) #endif #ifdef L_regs_d5_6 ! .sect .softregs .globl _.d5,_.d6 REG(_.d5) REG(_.d6) #endif #ifdef L_regs_d7_8 ! .sect .softregs .globl _.d7,_.d8 REG(_.d7) REG(_.d8) *************** REG(_.d8) *** 116,124 **** #ifdef L_regs_d9_16 /* Pseudo hard registers used by gcc. ! They must be located in page0. ! They will normally appear at the end of .page0 section. */ ! .sect .page0 .globl _.d9,_.d10,_.d11,_.d12,_.d13,_.d14 .globl _.d15,_.d16 REG(_.d9) --- 147,154 ---- #ifdef L_regs_d9_16 /* Pseudo hard registers used by gcc. ! They should be located in page0. */ ! .sect .softregs .globl _.d9,_.d10,_.d11,_.d12,_.d13,_.d14 .globl _.d15,_.d16 REG(_.d9) *************** REG(_.d16) *** 134,146 **** #ifdef L_regs_d17_32 /* Pseudo hard registers used by gcc. ! They must be located in page0. ! They will normally appear at the end of .page0 section. */ ! #ifdef mc68hc12 ! .sect .bss ! #else ! .sect .page0 ! #endif .globl _.d17,_.d18,_.d19,_.d20,_.d21,_.d22 .globl _.d23,_.d24,_.d25,_.d26,_.d27,_.d28 .globl _.d29,_.d30,_.d31,_.d32 --- 164,171 ---- #ifdef L_regs_d17_32 /* Pseudo hard registers used by gcc. ! They should be located in page0. */ ! .sect .softregs .globl _.d17,_.d18,_.d19,_.d20,_.d21,_.d22 .globl _.d23,_.d24,_.d25,_.d26,_.d27,_.d28 .globl _.d29,_.d30,_.d31,_.d32 *************** REG(_.d32) *** 167,175 **** ;; Specific initialization for 68hc11 before the main. ;; Nothing special for a generic routine; Just enable interrupts. ;; ! .sect .text ! .globl __premain ! __premain: clra tap ; Clear both I and X. rts --- 192,198 ---- ;; Specific initialization for 68hc11 before the main. ;; Nothing special for a generic routine; Just enable interrupts. ;; ! declare_near __premain clra tap ; Clear both I and X. rts *************** __premain: *** 195,200 **** --- 218,225 ---- .globl _exit .globl exit .weak exit + farsym exit + farsym _exit exit: _exit: *************** fatal: *** 209,217 **** ;; ;; Abort operation. This is defined for the GCC testsuite. ;; ! .sect .text ! .globl abort ! abort: ldd #255 ; #ifdef mc68hc12 trap #0x30 --- 234,241 ---- ;; ;; Abort operation. This is defined for the GCC testsuite. ;; ! declare abort ! ldd #255 ; #ifdef mc68hc12 trap #0x30 *************** abort: *** 226,245 **** ;; ;; Cleanup operation used by exit(). ;; ! .sect .text ! .globl _cleanup ! _cleanup: ! rts #endif ;----------------------------------------- ; required gcclib code ;----------------------------------------- #ifdef L_memcpy ! .sect .text .weak memcpy - .globl memcpy - .globl __memcpy ;;; ;;; void* memcpy(void*, const void*, size_t) ;;; --- 250,268 ---- ;; ;; Cleanup operation used by exit(). ;; ! declare _cleanup ! ! ret #endif ;----------------------------------------- ; required gcclib code ;----------------------------------------- #ifdef L_memcpy ! declare memcpy ! declare __memcpy ! .weak memcpy ;;; ;;; void* memcpy(void*, const void*, size_t) ;;; *************** _cleanup: *** 247,257 **** ;;; 2,sp = src Pmode ;;; 4,sp = size HImode (size_t) ;;; - __memcpy: - memcpy: #ifdef mc68hc12 ! ldx 2,sp ! ldy 4,sp pshd xgdy lsrd --- 270,278 ---- ;;; 2,sp = src Pmode ;;; 4,sp = size HImode (size_t) ;;; #ifdef mc68hc12 ! ldx ARG(2),sp ! ldy ARG(4),sp pshd xgdy lsrd *************** Loop: *** 264,275 **** dbne d,Loop Done: puld ! rts #else xgdy tsx ! ldd 4,x ! ldx 2,x ; SRC = X, DST = Y cpd #0 beq End pshy --- 285,296 ---- dbne d,Loop Done: puld ! ret #else xgdy tsx ! ldd ARG(4),x ! ldx ARG(2),x ; SRC = X, DST = Y cpd #0 beq End pshy *************** L1: *** 289,302 **** puly ; Restore Y to return the DST End: xgdy ! rts #endif #endif #ifdef L_memset ! .sect .text ! .globl memset ! .globl __memset ;;; ;;; void* memset(void*, int value, size_t) ;;; --- 310,322 ---- puly ; Restore Y to return the DST End: xgdy ! ret #endif #endif #ifdef L_memset ! declare memset ! declare __memset ;;; ;;; void* memset(void*, int value, size_t) ;;; *************** End: *** 304,320 **** ;;; D = dst Pmode ;;; 2,sp = src SImode ;;; 6,sp = size HImode (size_t) ! val = 5 ! size = 6 #else ;;; D = dst Pmode ;;; 2,sp = src SImode ;;; 6,sp = size HImode (size_t) ! val = 3 ! size = 4 #endif - __memset: - memset: #ifdef mc68hc12 xgdx ldab val,sp --- 324,338 ---- ;;; D = dst Pmode ;;; 2,sp = src SImode ;;; 6,sp = size HImode (size_t) ! val = ARG(5) ! size = ARG(6) #else ;;; D = dst Pmode ;;; 2,sp = src SImode ;;; 6,sp = size HImode (size_t) ! val = ARG(3) ! size = ARG(4) #endif #ifdef mc68hc12 xgdx ldab val,sp *************** Loop: *** 326,332 **** dbne y,Loop End: puld ! rts #else xgdx tsy --- 344,350 ---- dbne y,Loop End: puld ! ret #else xgdx tsy *************** L0: *** 342,446 **** pulx ; Restore X to return the DST End: xgdx ! rts #endif #endif ! #ifdef L_adddi3 ! .sect .text ! .globl ___adddi3 - ___adddi3: tsx xgdy ! ldd 8,x ; Add LSB ! addd 16,x std 6,y ; Save (carry preserved) ! ldd 6,x ! adcb 15,x ! adca 14,x std 4,y ! ldd 4,x ! adcb 13,x ! adca 12,x std 2,y ! ldd 2,x ! adcb 11,x ; Add MSB ! adca 10,x std 0,y xgdy ! rts #endif #ifdef L_subdi3 ! .sect .text ! .globl ___subdi3 - ___subdi3: tsx xgdy ! ldd 8,x ; Subtract LSB ! subd 16,x ! std 6,y ; Save, borrow preserved ! ldd 6,x ! sbcb 15,x ! sbca 14,x std 4,y ! ldd 4,x ! sbcb 13,x ! sbca 12,x std 2,y ! ldd 2,x ; Subtract MSB ! sbcb 11,x ! sbca 10,x std 0,y xgdy ; ! rts #endif #ifdef L_notdi2 ! .sect .text ! .globl ___notdi2 - ___notdi2: tsy xgdx ! ldd 8,y coma comb std 6,x ! ldd 6,y coma comb std 4,x ! ldd 4,y coma comb std 2,x ! ldd 2,y coma comb std 0,x xgdx ! rts #endif #ifdef L_negsi2 ! .sect .text ! .globl ___negsi2 - ___negsi2: comb coma xgdx --- 360,456 ---- pulx ; Restore X to return the DST End: xgdx ! ret #endif #endif ! #ifdef L_adddi3 ! declare ___adddi3 tsx xgdy ! ldd ARG(8),x ; Add LSB ! addd ARG(16),x std 6,y ; Save (carry preserved) ! ldd ARG(6),x ! adcb ARG(15),x ! adca ARG(14),x std 4,y ! ldd ARG(4),x ! adcb ARG(13),x ! adca ARG(12),x std 2,y ! ldd ARG(2),x ! adcb ARG(11),x ; Add MSB ! adca ARG(10),x std 0,y xgdy ! ret #endif #ifdef L_subdi3 ! declare ___subdi3 tsx xgdy ! ldd ARG(8),x ; Subtract LSB ! subd ARG(16),x ! std 6,y ; Save, borrow preserved ! ldd ARG(6),x ! sbcb ARG(15),x ! sbca ARG(14),x std 4,y ! ldd ARG(4),x ! sbcb ARG(13),x ! sbca ARG(12),x std 2,y ! ldd ARG(2),x ; Subtract MSB ! sbcb ARG(11),x ! sbca ARG(10),x std 0,y xgdy ; ! ret #endif #ifdef L_notdi2 ! declare ___notdi2 tsy xgdx ! ldd ARG(8),y coma comb std 6,x ! ldd ARG(6),y coma comb std 4,x ! ldd ARG(4),y coma comb std 2,x ! ldd ARG(2),y coma comb std 0,x xgdx ! ret #endif #ifdef L_negsi2 ! declare_near ___negsi2 comb coma xgdx *************** done: *** 455,464 **** #endif #ifdef L_one_cmplsi2 ! .sect .text ! .globl ___one_cmplsi2 - ___one_cmplsi2: comb coma xgdx --- 465,472 ---- #endif #ifdef L_one_cmplsi2 ! declare_near ___one_cmplsi2 comb coma xgdx *************** ___one_cmplsi2: *** 469,478 **** #endif #ifdef L_ashlsi3 ! .sect .text ! .globl ___ashlsi3 - ___ashlsi3: xgdy clra andb #0x1f --- 477,484 ---- #endif #ifdef L_ashlsi3 ! declare_near ___ashlsi3 xgdy clra andb #0x1f *************** Return: *** 491,500 **** #endif #ifdef L_ashrsi3 ! .sect .text ! .globl ___ashrsi3 - ___ashrsi3: xgdy clra andb #0x1f --- 497,504 ---- #endif #ifdef L_ashrsi3 ! declare_near ___ashrsi3 xgdy clra andb #0x1f *************** Return: *** 514,523 **** #endif #ifdef L_lshrsi3 ! .sect .text ! .globl ___lshrsi3 - ___lshrsi3: xgdy clra andb #0x1f --- 518,525 ---- #endif #ifdef L_lshrsi3 ! declare_near ___lshrsi3 xgdy clra andb #0x1f *************** Return: *** 536,545 **** #endif #ifdef L_lshrhi3 ! .sect .text ! .globl ___lshrhi3 - ___lshrhi3: cpx #16 bge Return_zero cpx #0 --- 538,545 ---- #endif #ifdef L_lshrhi3 ! declare_near ___lshrhi3 cpx #16 bge Return_zero cpx #0 *************** Return_zero: *** 557,566 **** #endif #ifdef L_lshlhi3 ! .sect .text ! .globl ___lshlhi3 - ___lshlhi3: cpx #16 bge Return_zero cpx #0 --- 557,564 ---- #endif #ifdef L_lshlhi3 ! declare_near ___lshlhi3 cpx #16 bge Return_zero cpx #0 *************** Return_zero: *** 577,587 **** rts #endif #ifdef L_ashrhi3 ! .sect .text ! .globl ___ashrhi3 - ___ashrhi3: cpx #16 bge Return_minus_1_or_zero cpx #0 --- 575,622 ---- rts #endif + #ifdef L_rotrhi3 + declare_near ___rotrhi3 + + ___rotrhi3: + xgdx + clra + andb #0x0f + xgdx + beq Return + Loop: + tap + rorb + rora + dex + bne Loop + Return: + rts + #endif + + #ifdef L_rotlhi3 + declare_near ___rotlhi3 + + ___rotlhi3: + xgdx + clra + andb #0x0f + xgdx + beq Return + Loop: + asrb + rolb + rola + rolb + dex + bne Loop + Return: + rts + #endif + #ifdef L_ashrhi3 ! declare_near ___ashrhi3 cpx #16 bge Return_minus_1_or_zero cpx #0 *************** Return_zero: *** 604,613 **** #endif #ifdef L_ashrqi3 ! .sect .text ! .globl ___ashrqi3 - ___ashrqi3: cmpa #8 bge Return_minus_1_or_zero tsta --- 639,646 ---- #endif #ifdef L_ashrqi3 ! declare_near ___ashrqi3 cmpa #8 bge Return_minus_1_or_zero tsta *************** Return_zero: *** 629,638 **** #endif #ifdef L_lshlqi3 ! .sect .text ! .globl ___lshlqi3 - ___lshlqi3: cmpa #8 bge Return_zero tsta --- 662,669 ---- #endif #ifdef L_lshlqi3 ! declare_near ___lshlqi3 cmpa #8 bge Return_zero tsta *************** Return_zero: *** 652,659 **** #ifndef mc68hc12 /* 68HC12 signed divisions are generated inline (idivs). */ ! .sect .text ! .globl __divmodhi4 ; ;; D = numerator --- 683,689 ---- #ifndef mc68hc12 /* 68HC12 signed divisions are generated inline (idivs). */ ! declare_near __divmodhi4 ; ;; D = numerator *************** Return_zero: *** 662,668 **** ;; Result: D = D / X ;; X = D % X ;; - __divmodhi4: tsta bpl Numerator_pos comb ; D = -D <=> D = (~D) + 1 --- 692,697 ---- *************** Numerator_neg_denominator_pos: *** 720,727 **** #endif #ifdef L_mulqi3 ! .sect .text ! .globl __mulqi3 ; ; short __mulqi3(signed char a, signed char b); --- 749,755 ---- #endif #ifdef L_mulqi3 ! declare_near ___mulqi3 ; ; short __mulqi3(signed char a, signed char b); *************** Numerator_neg_denominator_pos: *** 731,737 **** ; ; returns the signed result of A * B in register D. ; - __mulqi3: tsta bmi A_neg tstb --- 759,764 ---- *************** AB_neg: *** 758,765 **** #endif #ifdef L_mulhi3 ! .sect .text ! .globl ___mulhi3 ; ; --- 785,791 ---- #endif #ifdef L_mulhi3 ! declare_near ___mulhi3 ; ; *************** AB_neg: *** 768,774 **** ; a = register D ; b = register X ; - ___mulhi3: #ifdef mc68hc12 pshx ; Preserve X exg x,y --- 794,799 ---- *************** ___mulhi3: *** 804,827 **** ; --- ; 91 cycles #else - stx _.tmp ; (4/5) - pshb ; (3) - ldab _.tmp+1 ; (3/4) - mul ; (10) B.high * A.low - xgdx ; (3) - pulb ; (4) - stab _.tmp ; (3/4) - mul ; (10) B.low * A.high - abx ; (3) - ldd _.tmp ; (4/5) - mul ; (10) B.low * A.low - stx _.tmp ; (4) - adda _.tmp+1 ; (4/5) - rts ; (5) 20/26 bytes - ; --- - ; 70/76 cycles - - #ifdef OLD_MUL stx *_.tmp ; (4) pshb ; (3) ldab *_.tmp+1 ; (3) --- 829,834 ---- *************** ___mulhi3: *** 842,852 **** #endif #endif #endif - #endif #ifdef L_mulhi32 - .sect .text - .globl __mulhi32 ; ; --- 849,856 ---- *************** ___mulhi3: *** 880,886 **** ; 1,x ; 0,x ; ! __mulhi32: #ifdef mc68hc12 ldy 2,sp emul --- 884,891 ---- ; 1,x ; 0,x ; ! declare_near __mulhi32 ! #ifdef mc68hc12 ldy 2,sp emul *************** Ret: *** 925,932 **** #endif #ifdef L_mulsi3 - .sect .text - .globl __mulsi3 ; ; 8,y --- 930,935 ---- *************** Ret: *** 945,969 **** ; ; ! __mulsi3: #ifdef mc68hc12 pshd ; Save A.low ! ldy 4,sp emul ; A.low * B.high ! ldy 6,sp exg x,d emul ; A.high * B.low leax d,x ! ldy 6,sp puld emul ; A.low * B.low exg d,y leax d,x exg d,y ! rts #else ! B_low = 8 ! B_high = 6 A_low = 0 A_high = 2 pshx --- 948,973 ---- ; ; ! declare __mulsi3 ! #ifdef mc68hc12 pshd ; Save A.low ! ldy ARG(4),sp emul ; A.low * B.high ! ldy ARG(6),sp exg x,d emul ; A.high * B.low leax d,x ! ldy ARG(6),sp puld emul ; A.low * B.low exg d,y leax d,x exg d,y ! ret #else ! B_low = ARG(8) ! B_high = ARG(6) A_low = 0 A_high = 2 pshx *************** Return: *** 1011,1017 **** ins ins ins ! rts ; ; ; A_low_zero_non_optimized: --- 1015,1021 ---- ins ins ins ! ret ; ; ; A_low_zero_non_optimized: *************** dtors_done: *** 1186,1191 **** --- 1190,1345 ---- #endif + #ifdef L_far_tramp + #ifdef mc68hc12 + .sect .tramp,"ax",@progbits + .globl __far_trampoline + + ;; This is a trampoline used by the linker to invoke a function + ;; using rtc to return and being called with jsr/bsr. + ;; The trampoline generated is: + ;; + ;; foo_tramp: + ;; ldy #foo + ;; call __far_trampoline,page(foo) + ;; + ;; The linker transforms: + ;; + ;; jsr foo + ;; + ;; into + ;; jsr foo_tramp + ;; + ;; The linker generated trampoline and _far_trampoline must be in + ;; non-banked memory. + ;; + __far_trampoline: + movb 0,sp, 2,sp ; Copy page register below the caller's return + leas 2,sp ; address. + jmp 0,y ; We have a 'call/rtc' stack layout now + ; and can jump to the far handler + ; (whose memory bank is mapped due to the + ; call to the trampoline). + #endif + + #ifdef mc68hc11 + .sect .tramp,"ax",@progbits + .globl __far_trampoline + + ;; Trampoline generated by gcc for 68HC11: + ;; + ;; pshb + ;; ldab #%page(func) + ;; ldy #%addr(func) + ;; jmp __far_trampoline + ;; + __far_trampoline: + psha ; (2) Save function parameter (high) + ;; + psha ; (2) + ;; + pshx ; (4) + tsx ; (3) + ldab 4,x ; (4) Restore function parameter (low) + ldaa 2,x ; (4) Get saved page number + staa 4,x ; (4) Save it below return PC + pulx ; (5) + pula ; (3) + pula ; (3) Restore function parameter (high) + jmp 0,y ; (4) + #endif + #endif + + #ifdef L_call_far + #ifdef mc68hc11 + .sect .tramp,"ax",@progbits + .globl __call_a16 + .globl __call_a32 + ;; + ;; The call methods are used for 68HC11 to support memory bank switching. + ;; Every far call is redirected to these call methods. Its purpose is to: + ;; + ;; 1/ Save the current page on the stack (1 byte to follow 68HC12 call frame) + ;; 2/ Install the new page + ;; 3/ Jump to the real function + ;; + ;; The page switching (get/save) is board dependent. The default provided + ;; here does nothing (just create the appropriate call frame). + ;; + ;; Call sequence (10 bytes, 13 cycles): + ;; + ;; ldx #page ; (3) + ;; ldy #func ; (4) + ;; jsr __call_a16 ; (6) + ;; + ;; Call trampoline (11 bytes, 19 cycles): + ;; + __call_a16: + ;; xgdx ; (3) + ;; ; (3) ldaa _current_page + psha ; (2) + ;; ; (4) staa _current_page + ;; xgdx ; (3) + jmp 0,y ; (4) + + ;; + ;; Call sequence (10 bytes, 14 cycles): + ;; + ;; pshb ; (2) + ;; ldab #page ; (2) + ;; ldy #func ; (4) + ;; jsr __call_a32 ; (6) + ;; + ;; Call trampoline (87 bytes, 57 cycles): + ;; + __call_a32: + pshx ; (4) + psha ; (2) + ;; ; (3) ldaa _current_page + psha ; (2) + ;; ; (4) staa _current_page + tsx ; (3) + ldab 6,x ; (4) Restore function parameter + ldaa 5,x ; (4) Move PC return at good place + staa 6,x ; (4) + ldaa 4,x ; (4) + staa 5,x ; (4) + pula ; (3) + staa 4,x ; (4) + pula ; (3) + pulx ; (5) + jmp 0,y ; (4) + #endif + #endif + + #ifdef L_return_far + #ifdef mc68hc11 + .sect .tramp,"ax",@progbits + .globl __return_void + .globl __return_16 + .globl __return_32 + + __return_void: + ;; pulb + ;; (Board specific) + ;; rts + __return_16: + ;; xgdx + ;; pulb + ;; (Board specific) + ;; xgdx + ;; rts + __return_32: + ;; xgdy + ;; pulb + ;; (Board specific) + ;; xgdy + ;; rts + ins + rts + #endif + #endif + .Lend: ;----------------------------------------- ; end required gcclib code ;----------------------------------------- diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/m68hc11.c gcc-3.3/gcc/config/m68hc11/m68hc11.c *** gcc-3.2.3/gcc/config/m68hc11/m68hc11.c 2002-06-28 20:55:10.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/m68hc11.c 2003-04-12 21:53:41.000000000 +0000 *************** *** 1,5 **** /* Subroutines for code generation on Motorola 68HC11 and 68HC12. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. --- 1,5 ---- /* Subroutines for code generation on Motorola 68HC11 and 68HC12. ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. *************** static int register_indirect_p PARAMS((r *** 66,84 **** static rtx m68hc11_expand_compare PARAMS((enum rtx_code, rtx, rtx)); static int must_parenthesize PARAMS ((rtx)); static int m68hc11_shift_cost PARAMS ((enum machine_mode, rtx, int)); static int m68hc11_auto_inc_p PARAMS ((rtx)); static tree m68hc11_handle_fntype_attribute PARAMS ((tree *, tree, tree, int, bool *)); const struct attribute_spec m68hc11_attribute_table[]; void create_regs_rtx PARAMS ((void)); - static void m68hc11_add_gc_roots PARAMS ((void)); static void asm_print_register PARAMS ((FILE *, int)); static void m68hc11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void m68hc11_asm_out_constructor PARAMS ((rtx, int)); static void m68hc11_asm_out_destructor PARAMS ((rtx, int)); ! ! rtx m68hc11_soft_tmp_reg; /* Must be set to 1 to produce debug messages. */ int debug_m6811 = 0; --- 66,84 ---- static rtx m68hc11_expand_compare PARAMS((enum rtx_code, rtx, rtx)); static int must_parenthesize PARAMS ((rtx)); static int m68hc11_shift_cost PARAMS ((enum machine_mode, rtx, int)); + static int autoinc_mode PARAMS ((rtx)); + static int m68hc11_make_autoinc_notes PARAMS ((rtx*, void*)); static int m68hc11_auto_inc_p PARAMS ((rtx)); static tree m68hc11_handle_fntype_attribute PARAMS ((tree *, tree, tree, int, bool *)); const struct attribute_spec m68hc11_attribute_table[]; void create_regs_rtx PARAMS ((void)); static void asm_print_register PARAMS ((FILE *, int)); static void m68hc11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void m68hc11_asm_out_constructor PARAMS ((rtx, int)); static void m68hc11_asm_out_destructor PARAMS ((rtx, int)); ! static void m68hc11_encode_section_info PARAMS((tree, int)); /* Must be set to 1 to produce debug messages. */ int debug_m6811 = 0; *************** extern FILE *asm_out_file; *** 88,98 **** rtx ix_reg; rtx iy_reg; rtx d_reg; ! rtx da_reg; ! rtx stack_push_word; ! rtx stack_pop_word; static int regs_inited = 0; - static rtx z_reg; /* Set to 1 by expand_prologue() when the function is an interrupt handler. */ int current_function_interrupt; --- 88,99 ---- rtx ix_reg; rtx iy_reg; rtx d_reg; ! rtx m68hc11_soft_tmp_reg; ! static GTY(()) rtx stack_push_word; ! static GTY(()) rtx stack_pop_word; ! static GTY(()) rtx z_reg; ! static GTY(()) rtx z_reg_qi; static int regs_inited = 0; /* Set to 1 by expand_prologue() when the function is an interrupt handler. */ int current_function_interrupt; *************** int current_function_interrupt; *** 100,105 **** --- 101,110 ---- /* Set to 1 by expand_prologue() when the function is a trap handler. */ int current_function_trap; + /* Set to 1 when the current function is placed in 68HC12 banked + memory and must return with rtc. */ + int current_function_far; + /* Min offset that is valid for the indirect addressing mode. */ HOST_WIDE_INT m68hc11_min_offset = 0; *************** static int nb_soft_regs; *** 219,231 **** #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE m68hc11_output_function_epilogue struct gcc_target targetm = TARGET_INITIALIZER; int m68hc11_override_options () { - m68hc11_add_gc_roots (); - memset (m68hc11_reg_valid_for_index, 0, sizeof (m68hc11_reg_valid_for_index)); memset (m68hc11_reg_valid_for_base, 0, sizeof (m68hc11_reg_valid_for_base)); --- 224,237 ---- #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE m68hc11_output_function_epilogue + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO m68hc11_encode_section_info + struct gcc_target targetm = TARGET_INITIALIZER; int m68hc11_override_options () { memset (m68hc11_reg_valid_for_index, 0, sizeof (m68hc11_reg_valid_for_index)); memset (m68hc11_reg_valid_for_base, 0, sizeof (m68hc11_reg_valid_for_base)); *************** m68hc11_override_options () *** 247,253 **** target_flags &= ~TARGET_DEFAULT; if (!TARGET_M6812) ! target_flags &= ~TARGET_AUTO_INC_DEC; m68hc11_cost = &m6811_cost; m68hc11_min_offset = 0; m68hc11_max_offset = 256; --- 253,259 ---- target_flags &= ~TARGET_DEFAULT; if (!TARGET_M6812) ! target_flags &= ~(TARGET_AUTO_INC_DEC | TARGET_MIN_MAX); m68hc11_cost = &m6811_cost; m68hc11_min_offset = 0; m68hc11_max_offset = 256; *************** m68hc11_override_options () *** 281,306 **** target_flags |= MASK_NO_DIRECT_MODE; if (m68hc11_soft_reg_count == 0) m68hc11_soft_reg_count = "0"; - } - return 0; - } ! ! int ! m68hc11_optimization_options (level, size) ! int level ATTRIBUTE_UNUSED; ! int size; ! { ! /* When optimizing for size, do not reorder basic blocks because ! it duplicates some insns for speed and this results in larder code. ! This reordering can still be enabled but explicitly. */ ! if (size) ! { ! flag_reorder_blocks = 0; } return 0; } void m68hc11_conditional_register_usage () { --- 287,300 ---- target_flags |= MASK_NO_DIRECT_MODE; if (m68hc11_soft_reg_count == 0) m68hc11_soft_reg_count = "0"; ! if (TARGET_LONG_CALLS) ! current_function_far = 1; } return 0; } + void m68hc11_conditional_register_usage () { *************** create_regs_rtx () *** 341,347 **** ix_reg = gen_rtx (REG, HImode, HARD_X_REGNUM); iy_reg = gen_rtx (REG, HImode, HARD_Y_REGNUM); d_reg = gen_rtx (REG, HImode, HARD_D_REGNUM); - da_reg = gen_rtx (REG, QImode, HARD_A_REGNUM); m68hc11_soft_tmp_reg = gen_rtx (REG, HImode, SOFT_TMP_REGNUM); stack_push_word = gen_rtx (MEM, HImode, --- 335,340 ---- *************** hard_regno_mode_ok (regno, mode) *** 391,396 **** --- 384,406 ---- } } + int + m68hc11_hard_regno_rename_ok (reg1, reg2) + int reg1, reg2; + { + /* Don't accept renaming to Z register. We will replace it to + X,Y or D during machine reorg pass. */ + if (reg2 == HARD_Z_REGNUM) + return 0; + + /* Don't accept renaming D,X to Y register as the code will be bigger. */ + if (TARGET_M6811 && reg2 == HARD_Y_REGNUM + && (D_REGNO_P (reg1) || X_REGNO_P (reg1))) + return 0; + + return 1; + } + enum reg_class preferred_reload_class (operand, class) rtx operand; *************** go_if_legitimate_address_internal (opera *** 658,664 **** enum machine_mode mode; int strict; { ! if (CONSTANT_ADDRESS_P (operand)) { /* Reject the global variables if they are too wide. This forces a load of their address in a register and generates smaller code. */ --- 668,674 ---- enum machine_mode mode; int strict; { ! if (CONSTANT_ADDRESS_P (operand) && TARGET_M6812) { /* Reject the global variables if they are too wide. This forces a load of their address in a register and generates smaller code. */ *************** d_register_operand (operand, mode) *** 1006,1011 **** --- 1016,1024 ---- rtx operand; enum machine_mode mode ATTRIBUTE_UNUSED; { + if (GET_MODE (operand) != mode && mode != VOIDmode) + return 0; + if (GET_CODE (operand) == SUBREG) operand = XEXP (operand, 0); *************** hard_addr_reg_operand (operand, mode) *** 1020,1025 **** --- 1033,1041 ---- rtx operand; enum machine_mode mode ATTRIBUTE_UNUSED; { + if (GET_MODE (operand) != mode && mode != VOIDmode) + return 0; + if (GET_CODE (operand) == SUBREG) operand = XEXP (operand, 0); *************** hard_addr_reg_operand (operand, mode) *** 1032,1039 **** int hard_reg_operand (operand, mode) rtx operand; ! enum machine_mode mode ATTRIBUTE_UNUSED; { if (GET_CODE (operand) == SUBREG) operand = XEXP (operand, 0); --- 1048,1058 ---- int hard_reg_operand (operand, mode) rtx operand; ! enum machine_mode mode; { + if (GET_MODE (operand) != mode && mode != VOIDmode) + return 0; + if (GET_CODE (operand) == SUBREG) operand = XEXP (operand, 0); *************** symbolic_memory_operand (op, mode) *** 1109,1114 **** --- 1128,1141 ---- } int + m68hc11_eq_compare_operator (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return GET_CODE (op) == EQ || GET_CODE (op) == NE; + } + + int m68hc11_logical_operator (op, mode) register rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; *************** m68hc11_non_shift_operator (op, mode) *** 1137,1142 **** --- 1164,1179 ---- || GET_CODE (op) == PLUS || GET_CODE (op) == MINUS; } + /* Return true if op is a shift operator. */ + int + m68hc11_shift_operator (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return GET_CODE (op) == ROTATE || GET_CODE (op) == ROTATERT + || GET_CODE (op) == LSHIFTRT || GET_CODE (op) == ASHIFT + || GET_CODE (op) == ASHIFTRT; + } int m68hc11_unary_operator (op, mode) *************** const struct attribute_spec m68hc11_attr *** 1202,1210 **** --- 1239,1254 ---- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ { "interrupt", 0, 0, false, true, true, m68hc11_handle_fntype_attribute }, { "trap", 0, 0, false, true, true, m68hc11_handle_fntype_attribute }, + { "far", 0, 0, false, true, true, m68hc11_handle_fntype_attribute }, + { "near", 0, 0, false, true, true, m68hc11_handle_fntype_attribute }, { NULL, 0, 0, false, false, false, NULL } }; + /* Keep track of the symbol which has a `trap' attribute and which uses + the `swi' calling convention. Since there is only one trap, we only + record one such symbol. If there are several, a warning is reported. */ + static rtx trap_handler_symbol = 0; + /* Handle an attribute requiring a FUNCTION_TYPE, FIELD_DECL or TYPE_DECL; arguments as in struct attribute_spec.handler. */ static tree *************** m68hc11_handle_fntype_attribute (node, n *** 1216,1221 **** --- 1260,1266 ---- bool *no_add_attrs; { if (TREE_CODE (*node) != FUNCTION_TYPE + && TREE_CODE (*node) != METHOD_TYPE && TREE_CODE (*node) != FIELD_DECL && TREE_CODE (*node) != TYPE_DECL) { *************** m68hc11_handle_fntype_attribute (node, n *** 1227,1255 **** return NULL_TREE; } ! /* Define this macro if references to a symbol must be treated ! differently depending on something about the variable or function ! named by the symbol (such as what section it is in). ! For the 68HC11, we want to recognize trap handlers so that we ! handle calls to traps in a special manner (by issuing the trap). ! This information is stored in SYMBOL_REF_FLAG. */ ! void ! m68hc11_encode_section_info (decl) tree decl; { tree func_attr; int trap_handler; rtx rtl; ! if (TREE_CODE (decl) != FUNCTION_DECL) return; rtl = DECL_RTL (decl); func_attr = TYPE_ATTRIBUTES (TREE_TYPE (decl)); trap_handler = lookup_attribute ("trap", func_attr) != NULL_TREE; ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) = trap_handler; } --- 1272,1338 ---- return NULL_TREE; } ! /* We want to recognize trap handlers so that we handle calls to traps ! in a special manner (by issuing the trap). This information is stored ! in SYMBOL_REF_FLAG. */ ! static void ! m68hc11_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { tree func_attr; int trap_handler; + int is_far = 0; rtx rtl; ! if (TREE_CODE (decl) != FUNCTION_DECL) return; rtl = DECL_RTL (decl); func_attr = TYPE_ATTRIBUTES (TREE_TYPE (decl)); + + + if (lookup_attribute ("far", func_attr) != NULL_TREE) + is_far = 1; + else if (lookup_attribute ("near", func_attr) == NULL_TREE) + is_far = TARGET_LONG_CALLS != 0; + trap_handler = lookup_attribute ("trap", func_attr) != NULL_TREE; ! if (trap_handler && is_far) ! { ! warning ("`trap' and `far' attributes are not compatible, ignoring `far'"); ! trap_handler = 0; ! } ! if (trap_handler) ! { ! if (trap_handler_symbol != 0) ! warning ("`trap' attribute is already used"); ! else ! trap_handler_symbol = XEXP (rtl, 0); ! } ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) = is_far; ! } ! ! int ! m68hc11_is_far_symbol (sym) ! rtx sym; ! { ! if (GET_CODE (sym) == MEM) ! sym = XEXP (sym, 0); ! ! return SYMBOL_REF_FLAG (sym); ! } ! ! int ! m68hc11_is_trap_symbol (sym) ! rtx sym; ! { ! if (GET_CODE (sym) == MEM) ! sym = XEXP (sym, 0); ! ! return trap_handler_symbol != 0 && rtx_equal_p (trap_handler_symbol, sym); } *************** m68hc11_initial_elimination_offset (from *** 1289,1297 **** --- 1372,1393 ---- /* For a trap handler, we must take into account the registers which are pushed on the stack during the trap (except the PC). */ func_attr = TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)); + + if (lookup_attribute ("far", func_attr) != 0) + current_function_far = 1; + else if (lookup_attribute ("near", func_attr) != 0) + current_function_far = 0; + else + current_function_far = TARGET_LONG_CALLS != 0; + trap_handler = lookup_attribute ("trap", func_attr) != NULL_TREE; if (trap_handler && from == ARG_POINTER_REGNUM) size = 7; + + /* For a function using 'call/rtc' we must take into account the + page register which is pushed in the call. */ + else if (current_function_far && from == ARG_POINTER_REGNUM) + size = 1; else size = 0; *************** m68hc11_function_arg (cum, mode, type, n *** 1455,1528 **** return NULL_RTX; } - /* The "standard" implementation of va_start: just assign `nextarg' to - the variable. */ - void - m68hc11_expand_builtin_va_start (stdarg_p, valist, nextarg) - int stdarg_p ATTRIBUTE_UNUSED; - tree valist; - rtx nextarg; - { - tree t; - - /* SCz: the default implementation in builtins.c adjust the - nextarg using UNITS_PER_WORD. This works only with -mshort - and fails when integers are 32-bit. Here is the correct way. */ - if (!stdarg_p) - nextarg = plus_constant (nextarg, -INT_TYPE_SIZE / 8); - - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, - make_tree (ptr_type_node, nextarg)); - TREE_SIDE_EFFECTS (t) = 1; - - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - } - - rtx - m68hc11_va_arg (valist, type) - tree valist; - tree type; - { - tree addr_tree, t; - HOST_WIDE_INT align; - HOST_WIDE_INT rounded_size; - rtx addr; - int pad_direction; - - /* Compute the rounded size of the type. */ - align = PARM_BOUNDARY / BITS_PER_UNIT; - rounded_size = (((int_size_in_bytes (type) + align - 1) / align) * align); - - /* Get AP. */ - addr_tree = valist; - pad_direction = m68hc11_function_arg_padding (TYPE_MODE (type), type); - - if (pad_direction == downward) - { - /* Small args are padded downward. */ - - HOST_WIDE_INT adj; - adj = TREE_INT_CST_LOW (TYPE_SIZE (type)) / BITS_PER_UNIT; - if (rounded_size > align) - adj = rounded_size; - - addr_tree = build (PLUS_EXPR, TREE_TYPE (addr_tree), addr_tree, - build_int_2 (rounded_size - adj, 0)); - } - - addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL); - addr = copy_to_reg (addr); - - /* Compute new value for AP. */ - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, - build (PLUS_EXPR, TREE_TYPE (valist), valist, - build_int_2 (rounded_size, 0))); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - return addr; - } - /* If defined, a C expression which determines whether, and in which direction, to pad out an argument with extra space. The value should be of type `enum direction': either `upward' to pad above the argument, --- 1551,1556 ---- *************** expand_prologue () *** 1646,1651 **** --- 1674,1685 ---- current_function_interrupt = lookup_attribute ("interrupt", func_attr) != NULL_TREE; current_function_trap = lookup_attribute ("trap", func_attr) != NULL_TREE; + if (lookup_attribute ("far", func_attr) != NULL_TREE) + current_function_far = 1; + else if (lookup_attribute ("near", func_attr) != NULL_TREE) + current_function_far = 0; + else + current_function_far = TARGET_LONG_CALLS != 0; /* Get the scratch register to build the frame and push registers. If the first argument is a 32-bit quantity, the D+X registers *************** expand_prologue () *** 1656,1661 **** --- 1690,1699 ---- else scratch = ix_reg; + /* Save current stack frame. */ + if (frame_pointer_needed) + emit_move_after_reload (stack_push_word, hard_frame_pointer_rtx, scratch); + /* For an interrupt handler, we must preserve _.tmp, _.z and _.xy. Other soft registers in page0 need not to be saved because they will be restored by C functions. For a trap handler, we don't *************** expand_prologue () *** 1670,1686 **** scratch); } - /* Save current stack frame. */ - if (frame_pointer_needed) - emit_move_after_reload (stack_push_word, hard_frame_pointer_rtx, scratch); - /* Allocate local variables. */ if (TARGET_M6812 && (size > 4 || size == 3)) { emit_insn (gen_addhi3 (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (-size))); } ! else if (size > 8) { rtx insn; --- 1708,1720 ---- scratch); } /* Allocate local variables. */ if (TARGET_M6812 && (size > 4 || size == 3)) { emit_insn (gen_addhi3 (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (-size))); } ! else if ((!optimize_size && size > 8) || (optimize_size && size > 10)) { rtx insn; *************** expand_epilogue () *** 1747,1753 **** else return_size = GET_MODE_SIZE (GET_MODE (current_function_return_rtx)); ! if (return_size > HARD_REG_SIZE) scratch = iy_reg; else scratch = ix_reg; --- 1781,1787 ---- else return_size = GET_MODE_SIZE (GET_MODE (current_function_return_rtx)); ! if (return_size > HARD_REG_SIZE && return_size <= 2 * HARD_REG_SIZE) scratch = iy_reg; else scratch = ix_reg; *************** expand_epilogue () *** 1768,1774 **** emit_insn (gen_addhi3 (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (size))); } ! else if (size > 8) { rtx insn; --- 1802,1808 ---- emit_insn (gen_addhi3 (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (size))); } ! else if ((!optimize_size && size > 8) || (optimize_size && size > 10)) { rtx insn; *************** expand_epilogue () *** 1794,1803 **** stack_pointer_rtx, GEN_INT (1))); } - /* Restore previous frame pointer. */ - if (frame_pointer_needed) - emit_move_after_reload (hard_frame_pointer_rtx, stack_pop_word, scratch); - /* For an interrupt handler, restore ZTMP, ZREG and XYREG. */ if (current_function_interrupt) { --- 1828,1833 ---- *************** expand_epilogue () *** 1808,1813 **** --- 1838,1847 ---- emit_move_after_reload (m68hc11_soft_tmp_reg, stack_pop_word, scratch); } + /* Restore previous frame pointer. */ + if (frame_pointer_needed) + emit_move_after_reload (hard_frame_pointer_rtx, stack_pop_word, scratch); + /* If the trap handler returns some value, copy the value in D, X onto the stack so that the rti will pop the return value correctly. */ *************** m68hc11_gen_lowpart (mode, x) *** 1877,1883 **** if (mode == SImode) return GEN_INT (l[0]); ! return GEN_INT (trunc_int_for_mode (l[0], HImode)); } else { --- 1911,1917 ---- if (mode == SImode) return GEN_INT (l[0]); ! return gen_int_mode (l[0], HImode); } else { *************** m68hc11_gen_lowpart (mode, x) *** 1886,1892 **** if (mode == SImode) return GEN_INT (l[0]); else if (mode == HImode && GET_MODE (x) == SFmode) ! return GEN_INT (trunc_int_for_mode (l[0], HImode)); else abort (); } --- 1920,1926 ---- if (mode == SImode) return GEN_INT (l[0]); else if (mode == HImode && GET_MODE (x) == SFmode) ! return gen_int_mode (l[0], HImode); else abort (); } *************** m68hc11_gen_highpart (mode, x) *** 1954,1960 **** if (mode == SImode) return GEN_INT (l[1]); ! return GEN_INT (trunc_int_for_mode ((l[1] >> 16), HImode)); } else { --- 1988,1994 ---- if (mode == SImode) return GEN_INT (l[1]); ! return gen_int_mode ((l[1] >> 16), HImode); } else { *************** m68hc11_gen_highpart (mode, x) *** 1964,1970 **** if (mode == SImode) return GEN_INT (l[1]); else if (mode == HImode && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) ! return GEN_INT (trunc_int_for_mode ((l[0] >> 16), HImode)); else abort (); } --- 1998,2004 ---- if (mode == SImode) return GEN_INT (l[1]); else if (mode == HImode && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) ! return gen_int_mode ((l[0] >> 16), HImode); else abort (); } *************** m68hc11_gen_highpart (mode, x) *** 1974,1984 **** if (mode == QImode) { ! return GEN_INT (trunc_int_for_mode (val >> 8, QImode)); } else if (mode == HImode) { ! return GEN_INT (trunc_int_for_mode (val >> 16, HImode)); } } if (mode == QImode && D_REG_P (x)) --- 2008,2018 ---- if (mode == QImode) { ! return gen_int_mode (val >> 8, QImode); } else if (mode == HImode) { ! return gen_int_mode (val >> 16, HImode); } } if (mode == QImode && D_REG_P (x)) *************** asm_print_register (file, regno) *** 2125,2131 **** if (TARGET_NO_DIRECT_MODE && name[0] == '*') name++; ! asm_fprintf (file, "%s", name); } /* A C compound statement to output to stdio stream STREAM the --- 2159,2165 ---- if (TARGET_NO_DIRECT_MODE && name[0] == '*') name++; ! fprintf (file, "%s", name); } /* A C compound statement to output to stdio stream STREAM the *************** print_operand (file, op, letter) *** 2174,2180 **** else if (letter == 'T') { asm_print_register (file, SOFT_TMP_REGNUM); ! asm_fprintf (file, "+1"); return; } else if (letter == '#') --- 2208,2214 ---- else if (letter == 'T') { asm_print_register (file, SOFT_TMP_REGNUM); ! fprintf (file, "+1"); return; } else if (letter == '#') *************** print_operand (file, op, letter) *** 2187,2193 **** if (letter == 'b' && S_REG_P (op)) { asm_print_register (file, REGNO (op)); ! asm_fprintf (file, "+1"); } else { --- 2221,2231 ---- if (letter == 'b' && S_REG_P (op)) { asm_print_register (file, REGNO (op)); ! fprintf (file, "+1"); ! } ! else if (letter == 'b' && D_REG_P (op)) ! { ! asm_print_register (file, HARD_B_REGNUM); } else { *************** print_operand (file, op, letter) *** 2204,2210 **** asm_fprintf (file, "%0I%%hi("); output_addr_const (file, op); ! asm_fprintf (file, ")"); return; } --- 2242,2248 ---- asm_fprintf (file, "%0I%%hi("); output_addr_const (file, op); ! fprintf (file, ")"); return; } *************** print_operand (file, op, letter) *** 2230,2236 **** case PRE_DEC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,-", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); } else --- 2268,2274 ---- case PRE_DEC: if (TARGET_M6812) { ! fprintf (file, "%u,-", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); } else *************** print_operand (file, op, letter) *** 2240,2248 **** case POST_DEC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); ! asm_fprintf (file, "-"); } else abort (); --- 2278,2286 ---- case POST_DEC: if (TARGET_M6812) { ! fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); ! fprintf (file, "-"); } else abort (); *************** print_operand (file, op, letter) *** 2251,2259 **** case POST_INC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); ! asm_fprintf (file, "+"); } else abort (); --- 2289,2297 ---- case POST_INC: if (TARGET_M6812) { ! fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); ! fprintf (file, "+"); } else abort (); *************** print_operand (file, op, letter) *** 2262,2268 **** case PRE_INC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,+", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); } else --- 2300,2306 ---- case PRE_INC: if (TARGET_M6812) { ! fprintf (file, "%u,+", GET_MODE_SIZE (GET_MODE (op))); asm_print_register (file, REGNO (XEXP (base, 0))); } else *************** print_operand (file, op, letter) *** 2286,2296 **** else if (GET_CODE (op) == CONST_DOUBLE && (GET_MODE (op) == DFmode || GET_MODE (op) == XFmode)) { - REAL_VALUE_TYPE r; char dstr[30]; ! REAL_VALUE_FROM_CONST_DOUBLE (r, op); ! REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr); asm_fprintf (file, "%I0r%s", dstr); } else --- 2324,2333 ---- else if (GET_CODE (op) == CONST_DOUBLE && (GET_MODE (op) == DFmode || GET_MODE (op) == XFmode)) { char dstr[30]; ! real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (op), ! sizeof (dstr), 0, 1); asm_fprintf (file, "%I0r%s", dstr); } else *************** print_operand (file, op, letter) *** 2303,2313 **** need_parenthesize = must_parenthesize (op); if (need_parenthesize) ! asm_fprintf (file, "("); output_addr_const (file, op); if (need_parenthesize) ! asm_fprintf (file, ")"); } } --- 2340,2350 ---- need_parenthesize = must_parenthesize (op); if (need_parenthesize) ! fprintf (file, "("); output_addr_const (file, op); if (need_parenthesize) ! fprintf (file, ")"); } } *************** print_operand_address (file, addr) *** 2376,2382 **** if (!REG_P (addr) || !REG_OK_FOR_BASE_STRICT_P (addr)) abort (); ! asm_fprintf (file, "0,"); asm_print_register (file, REGNO (addr)); break; --- 2413,2419 ---- if (!REG_P (addr) || !REG_OK_FOR_BASE_STRICT_P (addr)) abort (); ! fprintf (file, "0,"); asm_print_register (file, REGNO (addr)); break; *************** print_operand_address (file, addr) *** 2387,2393 **** case PRE_DEC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,-", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); } else --- 2424,2430 ---- case PRE_DEC: if (TARGET_M6812) { ! fprintf (file, "%u,-", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); } else *************** print_operand_address (file, addr) *** 2397,2405 **** case POST_DEC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); ! asm_fprintf (file, "-"); } else abort (); --- 2434,2442 ---- case POST_DEC: if (TARGET_M6812) { ! fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); ! fprintf (file, "-"); } else abort (); *************** print_operand_address (file, addr) *** 2408,2416 **** case POST_INC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); ! asm_fprintf (file, "+"); } else abort (); --- 2445,2453 ---- case POST_INC: if (TARGET_M6812) { ! fprintf (file, "%u,", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); ! fprintf (file, "+"); } else abort (); *************** print_operand_address (file, addr) *** 2419,2425 **** case PRE_INC: if (TARGET_M6812) { ! asm_fprintf (file, "%u,+", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); } else --- 2456,2462 ---- case PRE_INC: if (TARGET_M6812) { ! fprintf (file, "%u,+", GET_MODE_SIZE (GET_MODE (addr))); asm_print_register (file, REGNO (XEXP (base, 0))); } else *************** print_operand_address (file, addr) *** 2429,2439 **** default: need_parenthesis = must_parenthesize (base); if (need_parenthesis) ! asm_fprintf (file, "("); output_addr_const (file, base); if (need_parenthesis) ! asm_fprintf (file, ")"); break; } break; --- 2466,2476 ---- default: need_parenthesis = must_parenthesize (base); if (need_parenthesis) ! fprintf (file, "("); output_addr_const (file, base); if (need_parenthesis) ! fprintf (file, ")"); break; } break; *************** print_operand_address (file, addr) *** 2451,2463 **** need_parenthesis = must_parenthesize (addr); if (need_parenthesis) ! asm_fprintf (file, "("); output_addr_const (file, base); ! asm_fprintf (file, "+"); output_addr_const (file, offset); if (need_parenthesis) ! asm_fprintf (file, ")"); } else if (REG_P (base) && REG_OK_FOR_BASE_STRICT_P (base)) { --- 2488,2500 ---- need_parenthesis = must_parenthesize (addr); if (need_parenthesis) ! fprintf (file, "("); output_addr_const (file, base); ! fprintf (file, "+"); output_addr_const (file, offset); if (need_parenthesis) ! fprintf (file, ")"); } else if (REG_P (base) && REG_OK_FOR_BASE_STRICT_P (base)) { *************** print_operand_address (file, addr) *** 2466,2472 **** if (TARGET_M6812) { asm_print_register (file, REGNO (offset)); ! asm_fprintf (file, ","); asm_print_register (file, REGNO (base)); } else --- 2503,2509 ---- if (TARGET_M6812) { asm_print_register (file, REGNO (offset)); ! fprintf (file, ","); asm_print_register (file, REGNO (base)); } else *************** print_operand_address (file, addr) *** 2476,2487 **** { need_parenthesis = must_parenthesize (offset); if (need_parenthesis) ! asm_fprintf (file, "("); output_addr_const (file, offset); if (need_parenthesis) ! asm_fprintf (file, ")"); ! asm_fprintf (file, ","); asm_print_register (file, REGNO (base)); } } --- 2513,2524 ---- { need_parenthesis = must_parenthesize (offset); if (need_parenthesis) ! fprintf (file, "("); output_addr_const (file, offset); if (need_parenthesis) ! fprintf (file, ")"); ! fprintf (file, ","); asm_print_register (file, REGNO (base)); } } *************** print_operand_address (file, addr) *** 2495,2511 **** if (GET_CODE (addr) == CONST_INT && INTVAL (addr) < 0x8000 && INTVAL (addr) >= -0x8000) { ! asm_fprintf (file, "%d", INTVAL (addr)); } else { need_parenthesis = must_parenthesize (addr); if (need_parenthesis) ! asm_fprintf (file, "("); output_addr_const (file, addr); if (need_parenthesis) ! asm_fprintf (file, ")"); } break; } --- 2532,2548 ---- if (GET_CODE (addr) == CONST_INT && INTVAL (addr) < 0x8000 && INTVAL (addr) >= -0x8000) { ! fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (addr)); } else { need_parenthesis = must_parenthesize (addr); if (need_parenthesis) ! fprintf (file, "("); output_addr_const (file, addr); if (need_parenthesis) ! fprintf (file, ")"); } break; } *************** m68hc11_gen_movhi (insn, operands) *** 3241,3246 **** --- 3278,3294 ---- { if (SP_REG_P (operands[0])) output_asm_insn ("lds\t%1", operands); + else if (0 /* REG_WAS_0 note is boggus; don't rely on it. */ + && !D_REG_P (operands[0]) + && GET_CODE (operands[1]) == CONST_INT + && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1) + && find_reg_note (insn, REG_WAS_0, 0)) + { + if (INTVAL (operands[1]) == 1) + output_asm_insn ("in%0", operands); + else + output_asm_insn ("de%0", operands); + } else output_asm_insn ("ld%0\t%1", operands); } *************** m68hc11_gen_movhi (insn, operands) *** 3406,3416 **** output_asm_insn ("xgdx", operands); CC_STATUS_INIT; } ! else { output_asm_insn ("sty\t%t1", operands); output_asm_insn ("ldx\t%t1", operands); } } else if (SP_REG_P (operands[1])) { --- 3454,3470 ---- output_asm_insn ("xgdx", operands); CC_STATUS_INIT; } ! else if (!optimize_size) { output_asm_insn ("sty\t%t1", operands); output_asm_insn ("ldx\t%t1", operands); } + else + { + CC_STATUS_INIT; + output_asm_insn ("pshy", operands); + output_asm_insn ("pulx", operands); + } } else if (SP_REG_P (operands[1])) { *************** m68hc11_gen_movhi (insn, operands) *** 3418,3423 **** --- 3472,3487 ---- cc_status = cc_prev_status; output_asm_insn ("tsx", operands); } + else if (0 /* REG_WAS_0 note is boggus; don't rely on it. */ + && GET_CODE (operands[1]) == CONST_INT + && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1) + && find_reg_note (insn, REG_WAS_0, 0)) + { + if (INTVAL (operands[1]) == 1) + output_asm_insn ("in%0", operands); + else + output_asm_insn ("de%0", operands); + } else { output_asm_insn ("ldx\t%1", operands); *************** m68hc11_gen_movhi (insn, operands) *** 3448,3458 **** output_asm_insn ("xgdy", operands); CC_STATUS_INIT; } ! else { output_asm_insn ("stx\t%t1", operands); output_asm_insn ("ldy\t%t1", operands); } } else if (SP_REG_P (operands[1])) { --- 3512,3528 ---- output_asm_insn ("xgdy", operands); CC_STATUS_INIT; } ! else if (!optimize_size) { output_asm_insn ("stx\t%t1", operands); output_asm_insn ("ldy\t%t1", operands); } + else + { + CC_STATUS_INIT; + output_asm_insn ("pshx", operands); + output_asm_insn ("puly", operands); + } } else if (SP_REG_P (operands[1])) { *************** m68hc11_gen_movhi (insn, operands) *** 3460,3466 **** cc_status = cc_prev_status; output_asm_insn ("tsy", operands); } ! else { output_asm_insn ("ldy\t%1", operands); } --- 3530,3546 ---- cc_status = cc_prev_status; output_asm_insn ("tsy", operands); } ! else if (0 /* REG_WAS_0 note is boggus; don't rely on it. */ ! && GET_CODE (operands[1]) == CONST_INT ! && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1) ! && find_reg_note (insn, REG_WAS_0, 0)) ! { ! if (INTVAL (operands[1]) == 1) ! output_asm_insn ("in%0", operands); ! else ! output_asm_insn ("de%0", operands); ! } ! else { output_asm_insn ("ldy\t%1", operands); } *************** m68hc11_gen_movqi (insn, operands) *** 3700,3705 **** --- 3780,3795 ---- output_asm_insn ("ldab\t%T0", operands); } } + else if (0 /* REG_WAS_0 note is boggus; don't rely on it. */ + && GET_CODE (operands[1]) == CONST_INT + && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1) + && find_reg_note (insn, REG_WAS_0, 0)) + { + if (INTVAL (operands[1]) == 1) + output_asm_insn ("inc%b0", operands); + else + output_asm_insn ("dec%b0", operands); + } else if (!DB_REG_P (operands[1]) && !D_REG_P (operands[1]) && !DA_REG_P (operands[1])) { *************** m68hc11_gen_rotate (code, insn, operands *** 3908,3922 **** if (val > 0) { - /* Set the carry to bit-15, but don't change D yet. */ - if (GET_MODE (operands[0]) != QImode) - { - output_asm_insn ("asra", operands); - output_asm_insn ("rola", operands); - } - while (--val >= 0) { /* Rotate B first to move the carry to bit-0. */ if (D_REG_P (operands[0])) output_asm_insn ("rolb", operands); --- 3998,4012 ---- if (val > 0) { while (--val >= 0) { + /* Set the carry to bit-15, but don't change D yet. */ + if (GET_MODE (operands[0]) != QImode) + { + output_asm_insn ("asra", operands); + output_asm_insn ("rola", operands); + } + /* Rotate B first to move the carry to bit-0. */ if (D_REG_P (operands[0])) output_asm_insn ("rolb", operands); *************** m68hc11_gen_rotate (code, insn, operands *** 3927,3940 **** } else { - /* Set the carry to bit-8 of D. */ - if (val != 0 && GET_MODE (operands[0]) != QImode) - { - output_asm_insn ("tap", operands); - } - while (++val <= 0) { /* Rotate B first to move the carry to bit-7. */ if (D_REG_P (operands[0])) output_asm_insn ("rorb", operands); --- 4017,4028 ---- } else { while (++val <= 0) { + /* Set the carry to bit-8 of D. */ + if (GET_MODE (operands[0]) != QImode) + output_asm_insn ("tap", operands); + /* Rotate B first to move the carry to bit-7. */ if (D_REG_P (operands[0])) output_asm_insn ("rorb", operands); *************** struct replace_info *** 4130,4137 **** int z_loaded_with_sp; }; - static rtx z_reg_qi; - static int m68hc11_check_z_replacement PARAMS ((rtx, struct replace_info *)); static void m68hc11_find_z_replacement PARAMS ((rtx, struct replace_info *)); static void m68hc11_z_replacement PARAMS ((rtx)); --- 4218,4223 ---- *************** m68hc11_check_z_replacement (insn, info) *** 4231,4237 **** info->need_save_z = 0; info->found_call = 1; info->regno = SOFT_Z_REGNUM; ! info->last = insn; } return 0; } --- 4317,4323 ---- info->need_save_z = 0; info->found_call = 1; info->regno = SOFT_Z_REGNUM; ! info->last = NEXT_INSN (insn); } return 0; } *************** m68hc11_check_z_replacement (insn, info) *** 4365,4371 **** info->z_died = 1; info->need_save_z = 0; } ! else { info->save_before_last = 1; } --- 4451,4463 ---- info->z_died = 1; info->need_save_z = 0; } ! else if (TARGET_M6812 && side_effects_p (src)) ! { ! info->last = 0; ! info->must_restore_reg = 0; ! return 0; ! } ! else { info->save_before_last = 1; } *************** m68hc11_check_z_replacement (insn, info) *** 4442,4448 **** info->z_died = 1; info->need_save_z = 0; } ! else { info->save_before_last = 1; } --- 4534,4546 ---- info->z_died = 1; info->need_save_z = 0; } ! else if (TARGET_M6812 && side_effects_p (src)) ! { ! info->last = 0; ! info->must_restore_reg = 0; ! return 0; ! } ! else { info->save_before_last = 1; } *************** m68hc11_z_replacement (insn) *** 4900,4905 **** --- 4998,5004 ---- body = PATTERN (insn); if (GET_CODE (body) == SET || GET_CODE (body) == PARALLEL + || GET_CODE (body) == ASM_OPERANDS || GET_CODE (insn) == CALL_INSN || GET_CODE (insn) == JUMP_INSN) { rtx note; *************** m68hc11_reorg (first) *** 5084,5089 **** --- 5183,5194 ---- int split_done = 0; rtx insn; + compute_bb_for_insn (); + + /* ??? update_life_info_in_dirty_blocks fails to terminate during + non-optimizing bootstrap. + + update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES, PROP_DEATH_NOTES); */ z_replacement_completed = 0; z_reg = gen_rtx (REG, HImode, HARD_Z_REGNUM); *************** m68hc11_reorg (first) *** 5103,5109 **** This happens quite often when 32-bit or above patterns are split. */ if (optimize > 0 && split_done) { - find_basic_blocks (first, max_reg_num (), 0); reload_cse_regs (first); } --- 5208,5213 ---- *************** m68hc11_reorg (first) *** 5133,5139 **** } } - find_basic_blocks (first, max_reg_num (), 0); life_analysis (first, 0, PROP_REG_INFO | PROP_DEATH_NOTES); } --- 5237,5242 ---- *************** m68hc11_memory_move_cost (mode, class, i *** 5199,5205 **** else { if (GET_MODE_SIZE (mode) <= 2) ! return COSTS_N_INSNS (2); else return COSTS_N_INSNS (4); } --- 5302,5308 ---- else { if (GET_MODE_SIZE (mode) <= 2) ! return COSTS_N_INSNS (3); else return COSTS_N_INSNS (4); } *************** m68hc11_asm_file_start (out, main_file) *** 5531,5558 **** const char *main_file; { fprintf (out, ";;;-----------------------------------------\n"); ! fprintf (out, ";;; Start MC68HC11 gcc assembly output\n"); fprintf (out, ";;; gcc compiler %s\n", version_string); print_options (out); fprintf (out, ";;;-----------------------------------------\n"); output_file_directive (out, main_file); - } ! ! static void ! m68hc11_add_gc_roots () ! { ! ggc_add_rtx_root (&m68hc11_soft_tmp_reg, 1); ! ggc_add_rtx_root (&ix_reg, 1); ! ggc_add_rtx_root (&iy_reg, 1); ! ggc_add_rtx_root (&d_reg, 1); ! ggc_add_rtx_root (&da_reg, 1); ! ggc_add_rtx_root (&z_reg, 1); ! ggc_add_rtx_root (&z_reg_qi, 1); ! ggc_add_rtx_root (&stack_push_word, 1); ! ggc_add_rtx_root (&stack_pop_word, 1); } static void m68hc11_asm_out_constructor (symbol, priority) rtx symbol; --- 5634,5655 ---- const char *main_file; { fprintf (out, ";;;-----------------------------------------\n"); ! fprintf (out, ";;; Start %s gcc assembly output\n", ! TARGET_M6811 ! ? "MC68HC11" ! : TARGET_M68S12 ? "MC68HCS12" : "MC68HC12"); fprintf (out, ";;; gcc compiler %s\n", version_string); print_options (out); fprintf (out, ";;;-----------------------------------------\n"); output_file_directive (out, main_file); ! if (TARGET_SHORT) ! fprintf (out, "\t.mode mshort\n"); ! else ! fprintf (out, "\t.mode mlong\n"); } + static void m68hc11_asm_out_constructor (symbol, priority) rtx symbol; *************** m68hc11_asm_out_destructor (symbol, prio *** 5570,5572 **** --- 5667,5671 ---- default_dtor_section_asm_out_destructor (symbol, priority); fprintf (asm_out_file, "\t.globl\t__do_global_dtors\n"); } + + #include "gt-m68hc11.h" diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/m68hc11-crt0.S gcc-3.3/gcc/config/m68hc11/m68hc11-crt0.S *** gcc-3.2.3/gcc/config/m68hc11/m68hc11-crt0.S 2000-09-08 20:54:44.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/m68hc11-crt0.S 2002-08-14 07:32:52.000000000 +0000 *************** *** 1,5 **** /* Startup code for M68HC11. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the --- 1,5 ---- /* Startup code for M68HC11. ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the *************** Boston, MA 02111-1307, USA. */ *** 36,41 **** --- 36,52 ---- ;----------------------------------------- .file "crt0.s" + #ifdef __HAVE_SHORT_INT__ + .mode mshort + #else + .mode mlong + #endif + + #if defined(__USE_RTC__) && defined(mc68hc12) + .macro jsr name + call \name + .endm + #endif ;; ;; ;; The linker concatenate the .install* sections in the following order: diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/m68hc11.h gcc-3.3/gcc/config/m68hc11/m68hc11.h *** gcc-3.2.3/gcc/config/m68hc11/m68hc11.h 2002-06-28 20:55:10.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/m68hc11.h 2003-04-12 21:53:41.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. Motorola 68HC11 and 68HC12. ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. --- 1,6 ---- /* Definitions of target machine for GNU compiler. Motorola 68HC11 and 68HC12. ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. *************** Note: *** 43,55 **** /* Compile and assemble for a 68hc11 unless there is a -m68hc12 option. */ #ifndef ASM_SPEC ! #define ASM_SPEC "%{m68hc12:-m68hc12}%{!m68hc12:-m68hc11}" #endif /* We need to tell the linker the target elf format. Just pass an emulation option. This can be overriden by -Wl option of gcc. */ #ifndef LINK_SPEC ! #define LINK_SPEC "%{m68hc12:-m m68hc12elf}%{!m68hc12:-m m68hc11elf}" #endif #ifndef LIB_SPEC --- 43,64 ---- /* Compile and assemble for a 68hc11 unless there is a -m68hc12 option. */ #ifndef ASM_SPEC ! #define ASM_SPEC \ ! "%{m68hc12:-m68hc12}" \ ! "%{m68hcs12:-m68hcs12}" \ ! "%{!m68hc12:%{!m68hcs12:-m68hc11}} " \ ! "%{mshort:-mshort}%{!mshort:-mlong} " \ ! "%{fshort-double:-mshort-double}%{!fshort-double:-mlong-double}" #endif /* We need to tell the linker the target elf format. Just pass an emulation option. This can be overriden by -Wl option of gcc. */ #ifndef LINK_SPEC ! #define LINK_SPEC \ ! "%{m68hc12:-m m68hc12elf}" \ ! "%{m68hcs12:-m m68hc12elf}" \ ! "%{!m68hc12:%{!m68hcs12:-m m68hc11elf}} " \ ! "%{!mnorelax:%{!m68hc12:%{!m68hcs12:-relax}}}" #endif #ifndef LIB_SPEC *************** Note: *** 62,72 **** #ifndef CPP_SPEC #define CPP_SPEC \ ! "%{mshort:-D__HAVE_SHORT_INT__ -D__INT__=16 -D__INT_MAX__=32767}\ ! %{!mshort:-D__INT__=32 -D__INT_MAX__=2147483647}\ %{m68hc12:-Dmc6812 -DMC6812 -Dmc68hc12}\ ! %{!m68hc12:-Dmc6811 -DMC6811 -Dmc68hc11}\ ! %{fshort-double:-D__HAVE_SHORT_DOUBLE__}" #endif #undef STARTFILE_SPEC --- 71,83 ---- #ifndef CPP_SPEC #define CPP_SPEC \ ! "%{mshort:-D__HAVE_SHORT_INT__ -D__INT__=16}\ ! %{!mshort:-D__INT__=32}\ %{m68hc12:-Dmc6812 -DMC6812 -Dmc68hc12}\ ! %{m68hcs12:-Dmc6812 -DMC6812 -Dmc68hcs12}\ ! %{!m68hc12:%{!m68hcs12:-Dmc6811 -DMC6811 -Dmc68hc11}}\ ! %{fshort-double:-D__HAVE_SHORT_DOUBLE__}\ ! %{mlong-calls:-D__USE_RTC__}" #endif #undef STARTFILE_SPEC *************** extern short *reg_renumber; /* def in lo *** 118,132 **** #define MASK_AUTO_INC_DEC 0004 #define MASK_M6811 0010 #define MASK_M6812 0020 ! #define MASK_NO_DIRECT_MODE 0040 #define TARGET_OP_TIME (optimize && optimize_size == 0) #define TARGET_SHORT (target_flags & MASK_SHORT) #define TARGET_M6811 (target_flags & MASK_M6811) #define TARGET_M6812 (target_flags & MASK_M6812) #define TARGET_AUTO_INC_DEC (target_flags & MASK_AUTO_INC_DEC) #define TARGET_NO_DIRECT_MODE (target_flags & MASK_NO_DIRECT_MODE) #define TARGET_RELAX (TARGET_NO_DIRECT_MODE) /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT --- 129,149 ---- #define MASK_AUTO_INC_DEC 0004 #define MASK_M6811 0010 #define MASK_M6812 0020 ! #define MASK_M68S12 0040 ! #define MASK_NO_DIRECT_MODE 0100 ! #define MASK_MIN_MAX 0200 ! #define MASK_LONG_CALLS 0400 #define TARGET_OP_TIME (optimize && optimize_size == 0) #define TARGET_SHORT (target_flags & MASK_SHORT) #define TARGET_M6811 (target_flags & MASK_M6811) #define TARGET_M6812 (target_flags & MASK_M6812) + #define TARGET_M68S12 (target_flags & MASK_M68S12) #define TARGET_AUTO_INC_DEC (target_flags & MASK_AUTO_INC_DEC) + #define TARGET_MIN_MAX (target_flags & MASK_MIN_MAX) #define TARGET_NO_DIRECT_MODE (target_flags & MASK_NO_DIRECT_MODE) #define TARGET_RELAX (TARGET_NO_DIRECT_MODE) + #define TARGET_LONG_CALLS (target_flags & MASK_LONG_CALLS) /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT *************** extern short *reg_renumber; /* def in lo *** 159,174 **** --- 176,205 ---- N_("Auto pre/post decrement increment allowed")}, \ { "noauto-incdec", - MASK_AUTO_INC_DEC, \ N_("Auto pre/post decrement increment not allowed")}, \ + { "inmax", MASK_MIN_MAX, \ + N_("Min/max instructions allowed")}, \ + { "nominmax", - MASK_MIN_MAX, \ + N_("Min/max instructions not allowed")}, \ + { "long-calls", MASK_LONG_CALLS, \ + N_("Use call and rtc for function calls and returns")}, \ + { "nolong-calls", - MASK_LONG_CALLS, \ + N_("Use jsr and rts for function calls and returns")}, \ { "relax", MASK_NO_DIRECT_MODE, \ N_("Do not use direct addressing mode for soft registers")},\ + { "norelax", -MASK_NO_DIRECT_MODE, \ + N_("Use direct addressing mode for soft registers")}, \ { "68hc11", MASK_M6811, \ N_("Compile for a 68HC11")}, \ { "68hc12", MASK_M6812, \ N_("Compile for a 68HC12")}, \ + { "68hcs12", MASK_M6812 | MASK_M68S12, \ + N_("Compile for a 68HCS12")}, \ { "6811", MASK_M6811, \ N_("Compile for a 68HC11")}, \ { "6812", MASK_M6812, \ N_("Compile for a 68HC12")}, \ + { "68S12", MASK_M6812 | MASK_M68S12, \ + N_("Compile for a 68HCS12")}, \ { "", TARGET_DEFAULT, 0 }} /* This macro is similar to `TARGET_SWITCHES' but defines names of *************** extern const char *m68hc11_soft_reg_coun *** 201,207 **** #endif /* Print subsidiary information on the compiler version in use. */ ! #define TARGET_VERSION fprintf (stderr, " (MC68HC11/MC68HC12)") /* Sometimes certain combinations of command options do not make sense on a particular target machine. You can define a macro --- 232,238 ---- #endif /* Print subsidiary information on the compiler version in use. */ ! #define TARGET_VERSION fprintf (stderr, " (MC68HC11/MC68HC12/MC68HCS12)") /* Sometimes certain combinations of command options do not make sense on a particular target machine. You can define a macro *************** extern const char *m68hc11_soft_reg_coun *** 214,223 **** #define OVERRIDE_OPTIONS m68hc11_override_options (); - /* Define this to change the optimizations performed by default. */ - #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \ - m68hc11_optimization_options(LEVEL, SIZE) - /* Define cost parameters for a given processor variant. */ struct processor_costs { --- 245,250 ---- *************** extern const struct processor_costs *m68 *** 250,271 **** /* Define this if most significant word of a multiword number is numbered. */ #define WORDS_BIG_ENDIAN 1 - /* Number of bits in an addressible storage unit */ - #define BITS_PER_UNIT 8 - - /* Number of bits in a word */ - #define BITS_PER_WORD 16 - /* Width of a word, in units (bytes). */ ! #define UNITS_PER_WORD (BITS_PER_WORD/8) ! ! /* Define if you don't want extended real, but do want to use the ! software floating point emulator for REAL_ARITHMETIC and ! decimal <-> binary conversion. */ ! #define REAL_ARITHMETIC ! ! /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ ! #define POINTER_SIZE 16 /* Definition of size_t. This is really an unsigned short as the 68hc11 only handles a 64K address space. */ --- 277,284 ---- /* Define this if most significant word of a multiword number is numbered. */ #define WORDS_BIG_ENDIAN 1 /* Width of a word, in units (bytes). */ ! #define UNITS_PER_WORD 2 /* Definition of size_t. This is really an unsigned short as the 68hc11 only handles a 64K address space. */ *************** extern const struct processor_costs *m68 *** 308,318 **** this size or smaller can be used for structures and unions with the appropriate sizes. */ #define MAX_FIXED_MODE_SIZE 64 - - /* Floats are checked in a generic way. */ - /* #define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) */ - - /* target machine storage layout */ --- 321,326 ---- *************** extern const struct processor_costs *m68 *** 329,337 **** /* Size (bits) of the type "long long" on target machine */ #define LONG_LONG_TYPE_SIZE 64 - /* Size (bits) of the type "char" on target machine */ - #define CHAR_TYPE_SIZE 8 - /* A C expression for the size in bits of the type `float' on the target machine. If you don't define this, the default is one word. Don't use default: a word is only 16. */ --- 337,342 ---- *************** enum reg_class *** 568,573 **** --- 573,579 ---- D_OR_S_REGS, /* 16-bit soft register or D register */ X_OR_S_REGS, /* 16-bit soft register or X register */ Y_OR_S_REGS, /* 16-bit soft register or Y register */ + Z_OR_S_REGS, /* 16-bit soft register or Z register */ SP_OR_S_REGS, /* 16-bit soft register or SP register */ D_OR_X_OR_S_REGS, /* 16-bit soft register or D or X register */ D_OR_Y_OR_S_REGS, /* 16-bit soft register or D or Y register */ *************** enum reg_class *** 614,619 **** --- 620,626 ---- "D_OR_S_REGS", \ "X_OR_S_REGS", \ "Y_OR_S_REGS", \ + "Z_OR_S_REGS", \ "SP_OR_S_REGS", \ "D_OR_X_OR_S_REGS", \ "D_OR_Y_OR_S_REGS", \ *************** enum reg_class *** 682,687 **** --- 689,695 ---- /* D_OR_S_REGS */ { 0xFFFFDE02, 0x00007FFF }, /* D _.D */ \ /* X_OR_S_REGS */ { 0xFFFFDE01, 0x00007FFF }, /* X _.D */ \ /* Y_OR_S_REGS */ { 0xFFFFDE04, 0x00007FFF }, /* Y _.D */ \ + /* Z_OR_S_REGS */ { 0xFFFFDF00, 0x00007FFF }, /* Z _.D */ \ /* SP_OR_S_REGS */ { 0xFFFFDE08, 0x00007FFF }, /* SP _.D */ \ /* D_OR_X_OR_S_REGS */ { 0xFFFFDE03, 0x00007FFF }, /* D X _.D */ \ /* D_OR_Y_OR_S_REGS */ { 0xFFFFDE06, 0x00007FFF }, /* D Y _.D */ \ *************** extern enum reg_class m68hc11_tmp_regs_c *** 793,798 **** --- 801,812 ---- #define SMALL_REGISTER_CLASSES 1 + /* A C expression that is nonzero if hard register number REGNO2 can be + considered for use as a rename register for REGNO1 */ + + #define HARD_REGNO_RENAME_OK(REGNO1,REGNO2) \ + m68hc11_hard_regno_rename_ok ((REGNO1), (REGNO2)) + /* A C expression whose value is nonzero if pseudos that have been assigned to registers of class CLASS would likely be spilled because registers of CLASS are needed for spill registers. *************** extern enum reg_class m68hc11_tmp_regs_c *** 848,853 **** --- 862,868 ---- (C) == 'L' ? ((VALUE) >= -65536 && (VALUE) <= 65535) : \ (C) == 'M' ? ((VALUE) & 0x0ffffL) == 0 : \ (C) == 'N' ? ((VALUE) == 1 || (VALUE) == -1) : \ + (C) == 'I' ? ((VALUE) >= -2 && (VALUE) <= 2) : \ (C) == 'O' ? (VALUE) == 16 : \ (C) == 'P' ? ((VALUE) <= 2 && (VALUE) >= -8) : 0) *************** typedef struct m68hc11_args *** 1044,1049 **** --- 1059,1068 ---- #define FUNCTION_ARG_PADDING(MODE, TYPE) \ m68hc11_function_arg_padding ((MODE), (TYPE)) + #undef PAD_VARARGS_DOWN + #define PAD_VARARGS_DOWN \ + (m68hc11_function_arg_padding (TYPE_MODE (type), type) == downward) + /* A C expression that indicates when it is the called function's responsibility to make a copy of arguments passed by invisible reference. Normally, the caller makes a copy and passes the *************** typedef struct m68hc11_args *** 1090,1102 **** caller saving results in spill failure. */ #define CALLER_SAVE_PROFITABLE(REFS,CALLS) 0 - /* Implement `va_arg'. */ - #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ - m68hc11_expand_builtin_va_start (stdarg, valist, nextarg) - - #define EXPAND_BUILTIN_VA_ARG(valist, type) \ - m68hc11_va_arg (valist, type) - /* For an arg passed partly in registers and partly in memory, this is the number of registers used. For args passed entirely in registers or entirely in memory, zero. --- 1109,1114 ---- *************** typedef struct m68hc11_args *** 1146,1152 **** /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ #define FUNCTION_PROFILER(FILE, LABELNO) \ ! asm_fprintf (FILE, "\tldy\t.LP%d\n\tjsr mcount\n", (LABELNO)) /* Length in units of the trampoline for entering a nested function. */ #define TRAMPOLINE_SIZE (TARGET_M6811 ? 11 : 9) --- 1158,1164 ---- /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ #define FUNCTION_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\tldy\t.LP%d\n\tjsr mcount\n", (LABELNO)) /* Length in units of the trampoline for entering a nested function. */ #define TRAMPOLINE_SIZE (TARGET_M6811 ? 11 : 9) *************** typedef struct m68hc11_args *** 1159,1178 **** m68hc11_initialize_trampoline ((TRAMP), (FNADDR), (CXT)) - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or function - named by the symbol (such as what section it is in). - - For the 68HC11, we want to recognize trap handlers so that we - handle calls to traps in a special manner (by issuing the trap). - This information is stored in SYMBOL_REF_FLAG. */ - - #define ENCODE_SECTION_INFO(DECL) m68hc11_encode_section_info (DECL) - - /* Override what GCC does for section info to let us recognize traps. */ - - #define REDO_SECTION_INFO_P(DECL) 1 - /* `INIT_TARGET_OPTABS' Define this macro as a C statement that declares additional library routines renames existing ones. `init_optabs' calls this macro --- 1171,1176 ---- *************** do { *** 1587,1608 **** no longer contain unusual constructs. */ #define ASM_APP_OFF "; End of inline assembler code\n#NO_APP\n" ! /* Output #ident as a .ident. */ ! ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fprintf (FILE, "%s", GLOBAL_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE);} while (0) /* output external reference */ #define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \ --- 1585,1630 ---- no longer contain unusual constructs. */ #define ASM_APP_OFF "; End of inline assembler code\n#NO_APP\n" ! /* Write the extra assembler code needed to declare a function properly. ! Some svr4 assemblers need to also have something extra said about the ! function's return value. We allow for that here. ! For 68HC12 we mark functions that return with 'rtc'. The linker ! will ensure that a 'call' is really made (instead of 'jsr'). ! The debugger needs this information to correctly compute the stack frame. + For 68HC11/68HC12 we also mark interrupt handlers for gdb to + compute the correct stack frame. */ ! #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ! \ ! if (current_function_far) \ ! { \ ! fprintf (FILE, "\t.far\t"); \ ! assemble_name (FILE, NAME); \ ! putc ('\n', FILE); \ ! } \ ! else if (current_function_interrupt \ ! || current_function_trap) \ ! { \ ! fprintf (FILE, "\t.interrupt\t"); \ ! assemble_name (FILE, NAME); \ ! putc ('\n', FILE); \ ! } \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ ! while (0) ! /* Output #ident as a .ident. */ /* output external reference */ #define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \ *************** do { *** 1651,1668 **** /* This is how to output an element of a case-vector that is relative. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ! asm_fprintf (FILE, "\t%s\tL%d-L%d\n", integer_asm_op (2, TRUE), VALUE, REL) /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! asm_fprintf (FILE, "\t%s\t.L%d\n", integer_asm_op (2, TRUE), VALUE) /* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) \ do { \ if ((LOG) > 1) \ ! asm_fprintf ((FILE), "%s\n", ALIGN_ASM_OP); \ } while (0) --- 1673,1690 ---- /* This is how to output an element of a case-vector that is relative. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ! fprintf (FILE, "\t%s\tL%d-L%d\n", integer_asm_op (2, TRUE), VALUE, REL) /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! fprintf (FILE, "\t%s\t.L%d\n", integer_asm_op (2, TRUE), VALUE) /* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) \ do { \ if ((LOG) > 1) \ ! fprintf ((FILE), "%s\n", ALIGN_ASM_OP); \ } while (0) *************** do { *** 1674,1679 **** --- 1696,1705 ---- #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG + /* For the support of memory banks we need addresses that indicate + the page number. */ + #define DWARF2_ADDR_SIZE 4 + /* The prefix for local labels. You should be able to define this as an empty string, or any arbitrary string (such as ".", ".L%", etc) without having to make any other changes to account for the specific *************** do { *** 1700,1705 **** --- 1726,1733 ---- ROTATE, ROTATERT }}, \ {"m68hc11_non_shift_operator", {AND, IOR, XOR, PLUS, MINUS}}, \ {"m68hc11_unary_operator", {NEG, NOT, SIGN_EXTEND, ZERO_EXTEND}}, \ + {"m68hc11_shift_operator", {ASHIFT, ASHIFTRT, LSHIFTRT, ROTATE, ROTATERT}},\ + {"m68hc11_eq_compare_operator", {EQ, NE}}, \ {"non_push_operand", {SUBREG, REG, MEM}}, \ {"reg_or_some_mem_operand", {SUBREG, REG, MEM}}, \ {"tst_operand", {SUBREG, REG, MEM}}, \ *************** do { *** 1740,1748 **** purposes) so give the MEM rtx a byte's mode. */ #define FUNCTION_MODE QImode - /* define SCCS_DIRECTIVE if SCCS directives should be ignored */ - #define SCCS_DIRECTIVE 1 - /* Allow $ in identifiers */ #define DOLLARS_IN_IDENTIFIERS 1 --- 1768,1773 ---- *************** extern int debug_m6811; *** 1759,1761 **** --- 1784,1794 ---- extern int z_replacement_completed; extern int current_function_interrupt; extern int current_function_trap; + extern int current_function_far; + + extern GTY(()) rtx m68hc11_compare_op0; + extern GTY(()) rtx m68hc11_compare_op1; + extern GTY(()) rtx m68hc11_soft_tmp_reg; + extern GTY(()) rtx ix_reg; + extern GTY(()) rtx iy_reg; + extern GTY(()) rtx d_reg; diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/m68hc11.md gcc-3.3/gcc/config/m68hc11/m68hc11.md *** gcc-3.2.3/gcc/config/m68hc11/m68hc11.md 2003-01-15 20:44:29.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/m68hc11.md 2003-04-12 21:25:37.000000000 +0000 *************** *** 1,5 **** ;;- Machine description file for Motorola 68HC11 and 68HC12. ! ;;- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;;- Contributed by Stephane Carrez (stcarrez@nerim.fr) ;; This file is part of GNU CC. --- 1,5 ---- ;;- Machine description file for Motorola 68HC11 and 68HC12. ! ;;- Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;;- Contributed by Stephane Carrez (stcarrez@nerim.fr) ;; This file is part of GNU CC. *************** *** 143,148 **** --- 143,149 ---- (A_REGNUM 5) ; A (high part of D) (B_REGNUM 6) ; B (low part of D) (CC_REGNUM 7) ; Condition code register + (SOFT_Z_REGNUM 11) ; Z soft register ]) ;;-------------------------------------------------------------------- *************** *** 258,264 **** [(set (cc0) (match_operand:QI 0 "tst_operand" "")) (use (match_operand:HI 1 "hard_reg_operand" "")) ! (use (reg:HI 11))] "z_replacement_completed == 2" [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 1)) (set (match_dup 1) (match_dup 2)) --- 259,265 ---- [(set (cc0) (match_operand:QI 0 "tst_operand" "")) (use (match_operand:HI 1 "hard_reg_operand" "")) ! (use (reg:HI SOFT_Z_REGNUM))] "z_replacement_completed == 2" [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 1)) (set (match_dup 1) (match_dup 2)) *************** *** 365,371 **** (compare (match_operand:HI 0 "tst_operand" "dxy,m") (match_operand:HI 1 "cmp_operand" "m,dxy"))) (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy")) ! (use (reg:HI 11))] "" "#") --- 366,372 ---- (compare (match_operand:HI 0 "tst_operand" "dxy,m") (match_operand:HI 1 "cmp_operand" "m,dxy"))) (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy")) ! (use (reg:HI SOFT_Z_REGNUM))] "" "#") *************** *** 374,380 **** (compare (match_operand:HI 0 "tst_operand" "") (match_operand:HI 1 "cmp_operand" ""))) (use (match_operand:HI 2 "hard_reg_operand" "")) ! (use (reg:HI 11))] "z_replacement_completed == 2" [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2)) (set (match_dup 2) (match_dup 3)) --- 375,381 ---- (compare (match_operand:HI 0 "tst_operand" "") (match_operand:HI 1 "cmp_operand" ""))) (use (match_operand:HI 2 "hard_reg_operand" "")) ! (use (reg:HI SOFT_Z_REGNUM))] "z_replacement_completed == 2" [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2)) (set (match_dup 2) (match_dup 3)) *************** *** 444,450 **** [(set (cc0) (and:QI (match_operand:QI 0 "tst_operand" "") (match_operand:QI 1 "hard_addr_reg_operand" "")))] ! "z_replacement_completed == 2 && GET_MODE (operands[0]) == QImode" [(set (match_dup 3) (match_dup 2)) (set (cc0) (and:QI (match_dup 0) (match_dup 4)))] "operands[2] = gen_rtx (REG, HImode, REGNO (operands[1])); --- 445,451 ---- [(set (cc0) (and:QI (match_operand:QI 0 "tst_operand" "") (match_operand:QI 1 "hard_addr_reg_operand" "")))] ! "z_replacement_completed == 2" [(set (match_dup 3) (match_dup 2)) (set (cc0) (and:QI (match_dup 0) (match_dup 4)))] "operands[2] = gen_rtx (REG, HImode, REGNO (operands[1])); *************** *** 456,462 **** (and:QI (match_operand:QI 0 "tst_operand" "d,m") (match_operand:QI 1 "cmp_operand" "m,d"))) (use (match_operand:HI 2 "hard_reg_operand" "xy,xy")) ! (use (reg:HI 11))] "" "#") --- 457,463 ---- (and:QI (match_operand:QI 0 "tst_operand" "d,m") (match_operand:QI 1 "cmp_operand" "m,d"))) (use (match_operand:HI 2 "hard_reg_operand" "xy,xy")) ! (use (reg:HI SOFT_Z_REGNUM))] "" "#") *************** *** 465,476 **** (and:QI (match_operand:QI 0 "tst_operand" "") (match_operand:QI 1 "cmp_operand" ""))) (use (match_operand:HI 2 "hard_reg_operand" "")) ! (use (reg:HI 11))] "z_replacement_completed == 2" ! [(set (mem:HI (pre_dec:HI (reg:HI 3))) (match_dup 2)) (set (match_dup 2) (match_dup 3)) (set (cc0) (and:QI (match_dup 0) (match_dup 1))) ! (set (match_dup 2) (mem:HI (post_inc:HI (reg:HI 3))))] "operands[3] = gen_rtx (REG, HImode, SOFT_Z_REGNUM);") (define_insn "bitcmphi" --- 466,477 ---- (and:QI (match_operand:QI 0 "tst_operand" "") (match_operand:QI 1 "cmp_operand" ""))) (use (match_operand:HI 2 "hard_reg_operand" "")) ! (use (reg:HI SOFT_Z_REGNUM))] "z_replacement_completed == 2" ! [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2)) (set (match_dup 2) (match_dup 3)) (set (cc0) (and:QI (match_dup 0) (match_dup 1))) ! (set (match_dup 2) (mem:HI (post_inc:HI (reg:HI SP_REGNUM))))] "operands[3] = gen_rtx (REG, HImode, SOFT_Z_REGNUM);") (define_insn "bitcmphi" *************** *** 546,552 **** (compare (match_operand:QI 0 "tst_operand" "dxy,m") (match_operand:QI 1 "cmp_operand" "m,dxy"))) (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy")) ! (use (reg:HI 11))] "" "#") --- 547,553 ---- (compare (match_operand:QI 0 "tst_operand" "dxy,m") (match_operand:QI 1 "cmp_operand" "m,dxy"))) (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy")) ! (use (reg:HI SOFT_Z_REGNUM))] "" "#") *************** *** 555,561 **** (compare (match_operand:QI 0 "tst_operand" "") (match_operand:QI 1 "cmp_operand" ""))) (use (match_operand:HI 2 "hard_reg_operand" "")) ! (use (reg:HI 11))] "z_replacement_completed == 2" [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2)) (set (match_dup 2) (match_dup 3)) --- 556,562 ---- (compare (match_operand:QI 0 "tst_operand" "") (match_operand:QI 1 "cmp_operand" ""))) (use (match_operand:HI 2 "hard_reg_operand" "")) ! (use (reg:HI SOFT_Z_REGNUM))] "z_replacement_completed == 2" [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2)) (set (match_dup 2) (match_dup 3)) *************** *** 620,626 **** ;; because there is no memory->memory moves. It must be defined with ;; earlyclobber (&) so that it does not appear in the source or destination ;; address. Providing patterns for movdi/movdf allows GCC to generate ! ;; better code. [Until now, the scratch register is limited to D becuse ;; otherwise we can run out of registers in the A_REGS class for reload]. ;; ;; For 68HC12, the scratch register is not necessary. To use the same --- 621,627 ---- ;; because there is no memory->memory moves. It must be defined with ;; earlyclobber (&) so that it does not appear in the source or destination ;; address. Providing patterns for movdi/movdf allows GCC to generate ! ;; better code. [Until now, the scratch register is limited to D because ;; otherwise we can run out of registers in the A_REGS class for reload]. ;; ;; For 68HC12, the scratch register is not necessary. To use the same *************** *** 1666,1672 **** [(set (match_operand:QI 0 "nonimmediate_operand" "=d,m") (umin:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0") (match_operand:QI 2 "general_operand" "m,d")))] ! "TARGET_M6812" "* { /* Flags are set according to (sub:QI (operand 1) (operand2)). --- 1667,1673 ---- [(set (match_operand:QI 0 "nonimmediate_operand" "=d,m") (umin:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0") (match_operand:QI 2 "general_operand" "m,d")))] ! "TARGET_M6812 && TARGET_MIN_MAX" "* { /* Flags are set according to (sub:QI (operand 1) (operand2)). *************** *** 1688,1694 **** [(set (match_operand:QI 0 "nonimmediate_operand" "=d,m") (umax:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0") (match_operand:QI 2 "general_operand" "m,d")))] ! "TARGET_M6812" "* { /* Flags are set according to (sub:QI (operand 1) (operand2)). --- 1689,1695 ---- [(set (match_operand:QI 0 "nonimmediate_operand" "=d,m") (umax:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0") (match_operand:QI 2 "general_operand" "m,d")))] ! "TARGET_M6812 && TARGET_MIN_MAX" "* { /* Flags are set according to (sub:QI (operand 1) (operand2)). *************** *** 1710,1716 **** [(set (match_operand:HI 0 "nonimmediate_operand" "=d,m") (umin:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0") (match_operand:HI 2 "general_operand" "m,d")))] ! "TARGET_M6812" "* { /* Flags are set according to (sub:HI (operand 1) (operand2)). */ --- 1711,1717 ---- [(set (match_operand:HI 0 "nonimmediate_operand" "=d,m") (umin:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0") (match_operand:HI 2 "general_operand" "m,d")))] ! "TARGET_M6812 && TARGET_MIN_MAX" "* { /* Flags are set according to (sub:HI (operand 1) (operand2)). */ *************** *** 1729,1735 **** [(set (match_operand:HI 0 "nonimmediate_operand" "=d,m") (umax:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0") (match_operand:HI 2 "general_operand" "m,d")))] ! "TARGET_M6812" "* { /* Flags are set according to (sub:HI (operand 1) (operand2)). */ --- 1730,1736 ---- [(set (match_operand:HI 0 "nonimmediate_operand" "=d,m") (umax:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0") (match_operand:HI 2 "general_operand" "m,d")))] ! "TARGET_M6812 && TARGET_MIN_MAX" "* { /* Flags are set according to (sub:HI (operand 1) (operand2)). */ *************** *** 2089,2097 **** }") (define_insn "*addhi3_68hc12" ! [(set (match_operand:HI 0 "register_operand" "=xy,d,xy*z*w,xy*z*w,xy*z") (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,xy*zw,0") ! (match_operand:HI 2 "general_operand" "N,im*A*wu,id,id,!mu*A")))] "TARGET_M6812" "* { --- 2090,2098 ---- }") (define_insn "*addhi3_68hc12" ! [(set (match_operand:HI 0 "register_operand" "=xyd,d,xy*z*w,xy*z*w,xy*z") (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,xy*zw,0") ! (match_operand:HI 2 "general_operand" "i,m*A*wu,id,id,!mu*A")))] "TARGET_M6812" "* { *************** *** 2258,2264 **** Register X/Y is lost, this is specified by the (clobber) statement. */ output_asm_insn (\"ts%3\", operands); if (GET_CODE (operands[2]) == CONST_INT ! && ((val = INTVAL (operands[2]) >= 0 && val < 0x100)) && dead_register_here (insn, gen_rtx (REG, HImode, HARD_D_REGNUM))) { output_asm_insn (\"ldab\\t%2\", operands); --- 2259,2265 ---- Register X/Y is lost, this is specified by the (clobber) statement. */ output_asm_insn (\"ts%3\", operands); if (GET_CODE (operands[2]) == CONST_INT ! && ((val = INTVAL (operands[2])) >= 0 && val < 0x100) && dead_register_here (insn, gen_rtx (REG, HImode, HARD_D_REGNUM))) { output_asm_insn (\"ldab\\t%2\", operands); *************** *** 2278,2286 **** }") (define_insn "*addhi3" ! [(set (match_operand:HI 0 "hard_reg_operand" "=A,d,!A,d*A,!d*A") ! (plus:HI (match_operand:HI 1 "general_operand" "%0,0,0,0,0") ! (match_operand:HI 2 "general_operand" "N,i,I,mi*A*d,!u*d*w")))] "TARGET_M6811" "* { --- 2279,2287 ---- }") (define_insn "*addhi3" ! [(set (match_operand:HI 0 "hard_reg_operand" "=A,dA,d,!A,d*A,!d*A") ! (plus:HI (match_operand:HI 1 "general_operand" "%0,0,0,0,0,0") ! (match_operand:HI 2 "general_operand" "N,I,i,I,mi*A*d,!u*d*w")))] "TARGET_M6811" "* { *************** *** 2894,2905 **** }") (define_insn "mulqi3" ! [(set (match_operand:QI 0 "register_operand" "=d") ! (mult:QI (match_operand:QI 1 "nonimmediate_operand" "dum") ! (match_operand:QI 2 "nonimmediate_operand" "dum")))] "" "* { if (D_REG_P (operands[1]) && D_REG_P (operands[2])) { output_asm_insn (\"tba\", operands); --- 2895,2909 ---- }") (define_insn "mulqi3" ! [(set (match_operand:QI 0 "register_operand" "=d,*x,*y") ! (mult:QI (match_operand:QI 1 "nonimmediate_operand" "%dum,0,0") ! (match_operand:QI 2 "general_operand" "dium,*xium,*yium")))] "" "* { + if (A_REG_P (operands[0])) + return \"#\"; + if (D_REG_P (operands[1]) && D_REG_P (operands[2])) { output_asm_insn (\"tba\", operands); *************** *** 2925,2930 **** --- 2929,2956 ---- return \"mul\"; }") + (define_split + [(set (match_operand:QI 0 "hard_addr_reg_operand" "") + (mult:QI (match_operand:QI 1 "general_operand" "") + (match_operand:QI 2 "general_operand" "")))] + "z_replacement_completed == 2" + [(parallel [(set (reg:HI D_REGNUM) (match_dup 3)) + (set (match_dup 3) (reg:HI D_REGNUM))]) + (set (reg:QI D_REGNUM) (mult:QI (match_dup 5) (match_dup 6))) + (parallel [(set (reg:HI D_REGNUM) (match_dup 3)) + (set (match_dup 3) (reg:HI D_REGNUM))])] + " + operands[3] = gen_rtx (REG, HImode, REGNO (operands[0])); + if (A_REG_P (operands[1])) + operands[5] = gen_rtx (REG, QImode, HARD_D_REGNUM); + else + operands[5] = operands[1]; + if (A_REG_P (operands[2])) + operands[6] = gen_rtx (REG, QImode, HARD_D_REGNUM); + else + operands[6] = operands[2]; + ") + (define_insn "mulqihi3" [(set (match_operand:HI 0 "register_operand" "=d,d") (mult:HI (sign_extend:HI *************** *** 4446,4460 **** (set (match_dup 4) (match_dup 2)) (set (match_dup 2) (match_dup 5)) ! (set (match_dup 2) (rotate:HI (match_dup 2) (reg:HI CC_REGNUM))) (set (match_dup 6) (match_dup 2)) (set (match_dup 2) (match_dup 7)) ! (set (match_dup 2) (rotate:HI (match_dup 2) (reg:HI CC_REGNUM))) (set (match_dup 8) (match_dup 2)) (set (match_dup 2) (match_dup 9)) ! (set (match_dup 2) (rotate:HI (match_dup 2) (reg:HI CC_REGNUM))) (set (match_dup 10) (match_dup 2))] "operands[3] = m68hc11_gen_lowpart (SImode, operands[1]); operands[5] = m68hc11_gen_highpart (HImode, operands[3]); --- 4472,4492 ---- (set (match_dup 4) (match_dup 2)) (set (match_dup 2) (match_dup 5)) ! (parallel [(set (match_dup 2) ! (rotate:HI (match_dup 2) (const_int 1))) ! (clobber (reg:HI CC_REGNUM))]) (set (match_dup 6) (match_dup 2)) (set (match_dup 2) (match_dup 7)) ! (parallel [(set (match_dup 2) ! (rotate:HI (match_dup 2) (const_int 1))) ! (clobber (reg:HI CC_REGNUM))]) (set (match_dup 8) (match_dup 2)) (set (match_dup 2) (match_dup 9)) ! (parallel [(set (match_dup 2) ! (rotate:HI (match_dup 2) (const_int 1))) ! (clobber (reg:HI CC_REGNUM))]) (set (match_dup 10) (match_dup 2))] "operands[3] = m68hc11_gen_lowpart (SImode, operands[1]); operands[5] = m68hc11_gen_highpart (HImode, operands[3]); *************** *** 4757,4769 **** (define_insn "*ashlhi3_2" ! [(set (match_operand:HI 0 "register_operand" "=d") ! (ashift:HI (match_operand:HI 1 "register_operand" "0") ! (match_operand:HI 2 "register_operand" "+x"))) (clobber (match_dup 2))] "" "* { CC_STATUS_INIT; return \"bsr\\t___lshlhi3\"; }") --- 4789,4804 ---- (define_insn "*ashlhi3_2" ! [(set (match_operand:HI 0 "register_operand" "=d,*x") ! (ashift:HI (match_operand:HI 1 "register_operand" "0,0") ! (match_operand:HI 2 "register_operand" "+x,+d"))) (clobber (match_dup 2))] "" "* { + if (A_REG_P (operands[0])) + return \"#\"; + CC_STATUS_INIT; return \"bsr\\t___lshlhi3\"; }") *************** *** 5046,5066 **** }") (define_insn "*ashrhi3" ! [(set (match_operand:HI 0 "register_operand" "=d,x") (ashiftrt:HI (match_operand:HI 1 "register_operand" "0,0") (match_operand:HI 2 "register_operand" "+x,+d"))) (clobber (match_dup 2))] "" "* { ! CC_STATUS_INIT; ! if (D_REG_P (operands[2])) ! output_asm_insn (\"xgd%0\", operands); output_asm_insn (\"bsr\\t___ashrhi3\", operands); - if (D_REG_P (operands[2])) - output_asm_insn (\"xgd%0\", operands); - return \"\"; }") --- 5081,5097 ---- }") (define_insn "*ashrhi3" ! [(set (match_operand:HI 0 "register_operand" "=d,*x") (ashiftrt:HI (match_operand:HI 1 "register_operand" "0,0") (match_operand:HI 2 "register_operand" "+x,+d"))) (clobber (match_dup 2))] "" "* { ! if (A_REG_P (operands[0])) ! return \"#\"; output_asm_insn (\"bsr\\t___ashrhi3\", operands); return \"\"; }") *************** *** 5310,5324 **** (set (match_dup 4) (match_dup 2)) (set (match_dup 2) (match_dup 5)) ! (set (match_dup 2) (rotatert:HI (match_dup 2) (reg:HI CC_REGNUM))) (set (match_dup 6) (match_dup 2)) (set (match_dup 2) (match_dup 7)) ! (set (match_dup 2) (rotatert:HI (match_dup 2) (reg:HI CC_REGNUM))) (set (match_dup 8) (match_dup 2)) (set (match_dup 2) (match_dup 9)) ! (set (match_dup 2) (rotatert:HI (match_dup 2) (reg:HI CC_REGNUM))) (set (match_dup 10) (match_dup 2))] "operands[3] = m68hc11_gen_highpart (SImode, operands[1]); operands[5] = m68hc11_gen_lowpart (HImode, operands[3]); --- 5341,5358 ---- (set (match_dup 4) (match_dup 2)) (set (match_dup 2) (match_dup 5)) ! (parallel [(set (match_dup 2) (rotatert:HI (match_dup 2) (const_int 1))) ! (clobber (reg:HI CC_REGNUM))]) (set (match_dup 6) (match_dup 2)) (set (match_dup 2) (match_dup 7)) ! (parallel [(set (match_dup 2) (rotatert:HI (match_dup 2) (const_int 1))) ! (clobber (reg:HI CC_REGNUM))]) (set (match_dup 8) (match_dup 2)) (set (match_dup 2) (match_dup 9)) ! (parallel [(set (match_dup 2) (rotatert:HI (match_dup 2) (const_int 1))) ! (clobber (reg:HI CC_REGNUM))]) (set (match_dup 10) (match_dup 2))] "operands[3] = m68hc11_gen_highpart (SImode, operands[1]); operands[5] = m68hc11_gen_lowpart (HImode, operands[3]); *************** *** 5594,5615 **** }") (define_insn "*lshrhi3" ! [(set (match_operand:HI 0 "register_operand" "=d,x") (lshiftrt:HI (match_operand:HI 1 "register_operand" "0,0") (match_operand:HI 2 "register_operand" "+x,+d"))) (clobber (match_dup 2))] "" "* { ! CC_STATUS_INIT; ! if (D_REG_P (operands[2])) ! output_asm_insn (\"xgd%0\", operands); ! ! output_asm_insn (\"bsr\\t___lshrhi3\", operands); ! if (D_REG_P (operands[2])) ! output_asm_insn (\"xgd%0\", operands); ! return \"\"; }") (define_expand "lshrqi3" --- 5628,5644 ---- }") (define_insn "*lshrhi3" ! [(set (match_operand:HI 0 "register_operand" "=d,*x") (lshiftrt:HI (match_operand:HI 1 "register_operand" "0,0") (match_operand:HI 2 "register_operand" "+x,+d"))) (clobber (match_dup 2))] "" "* { ! if (A_REG_P (operands[0])) ! return \"#\"; ! return \"bsr\\t___lshrhi3\"; }") (define_expand "lshrqi3" *************** *** 5750,5756 **** (define_insn "*rotlhi3_with_carry" [(set (match_operand:HI 0 "register_operand" "=d") (rotate:HI (match_operand:HI 1 "register_operand" "0") ! (reg:HI CC_REGNUM)))] "" "* { --- 5779,5786 ---- (define_insn "*rotlhi3_with_carry" [(set (match_operand:HI 0 "register_operand" "=d") (rotate:HI (match_operand:HI 1 "register_operand" "0") ! (const_int 1))) ! (clobber (reg:HI CC_REGNUM))] "" "* { *************** *** 5761,5767 **** (define_insn "*rotrhi3_with_carry" [(set (match_operand:HI 0 "register_operand" "=d") (rotatert:HI (match_operand:HI 1 "register_operand" "0") ! (reg:HI CC_REGNUM)))] "" "* { --- 5791,5798 ---- (define_insn "*rotrhi3_with_carry" [(set (match_operand:HI 0 "register_operand" "=d") (rotatert:HI (match_operand:HI 1 "register_operand" "0") ! (const_int 1))) ! (clobber (reg:HI CC_REGNUM))] "" "* { *************** *** 5780,5786 **** return \"\"; }") ! (define_insn "rotlhi3" [(set (match_operand:HI 0 "register_operand" "=d") (rotate:HI (match_operand:HI 1 "register_operand" "0") (match_operand:HI 2 "const_int_operand" "i")))] --- 5811,5851 ---- return \"\"; }") ! (define_insn "rotrqi3" ! [(set (match_operand:QI 0 "register_operand" "=d,!q") ! (rotatert:QI (match_operand:QI 1 "register_operand" "0,0") ! (match_operand:QI 2 "const_int_operand" "i,i")))] ! "" ! "* ! { ! m68hc11_gen_rotate (ROTATERT, insn, operands); ! return \"\"; ! }") ! ! (define_expand "rotlhi3" ! [(set (match_operand:HI 0 "register_operand" "") ! (rotate:HI (match_operand:HI 1 "register_operand" "") ! (match_operand:HI 2 "general_operand" "")))] ! "" ! " ! { ! if (GET_CODE (operands[2]) != CONST_INT) ! { ! rtx scratch = gen_reg_rtx (HImode); ! operand1 = force_reg (HImode, operand1); ! ! emit_move_insn (scratch, operands[2]); ! emit_insn (gen_rtx (PARALLEL, VOIDmode, ! gen_rtvec (2, gen_rtx (SET, VOIDmode, ! operand0, ! gen_rtx_ROTATE (HImode, ! operand1, scratch)), ! gen_rtx (CLOBBER, VOIDmode, scratch)))); ! DONE; ! } ! }") ! ! (define_insn "rotlhi3_const" [(set (match_operand:HI 0 "register_operand" "=d") (rotate:HI (match_operand:HI 1 "register_operand" "0") (match_operand:HI 2 "const_int_operand" "i")))] *************** *** 5791,5808 **** return \"\"; }") ! (define_insn "rotrqi3" ! [(set (match_operand:QI 0 "register_operand" "=d,!q") ! (rotatert:QI (match_operand:QI 1 "register_operand" "0,0") ! (match_operand:QI 2 "const_int_operand" "i,i")))] "" "* { ! m68hc11_gen_rotate (ROTATERT, insn, operands); ! return \"\"; }") ! (define_insn "rotrhi3" [(set (match_operand:HI 0 "register_operand" "=d") (rotatert:HI (match_operand:HI 1 "register_operand" "0") (match_operand:HI 2 "const_int_operand" "i")))] --- 5856,5899 ---- return \"\"; }") ! (define_insn "*rotlhi3" ! [(set (match_operand:HI 0 "register_operand" "=d,*x") ! (rotate:HI (match_operand:HI 1 "register_operand" "0,0") ! (match_operand:HI 2 "general_operand" "+x,+d"))) ! (clobber (match_dup 2))] "" "* { ! if (A_REG_P (operands[0])) ! return \"#\"; ! ! return \"bsr\\t___rotlhi3\"; }") ! (define_expand "rotrhi3" ! [(set (match_operand:HI 0 "register_operand" "") ! (rotatert:HI (match_operand:HI 1 "general_operand" "") ! (match_operand:HI 2 "general_operand" "")))] ! "" ! " ! { ! if (GET_CODE (operands[2]) != CONST_INT) ! { ! rtx scratch = gen_reg_rtx (HImode); ! operand1 = force_reg (HImode, operand1); ! ! emit_move_insn (scratch, operands[2]); ! emit_insn (gen_rtx (PARALLEL, VOIDmode, ! gen_rtvec (2, gen_rtx (SET, VOIDmode, ! operand0, ! gen_rtx_ROTATERT (HImode, ! operand1, scratch)), ! gen_rtx (CLOBBER, VOIDmode, scratch)))); ! DONE; ! } ! }") ! ! (define_insn "rotrhi3_const" [(set (match_operand:HI 0 "register_operand" "=d") (rotatert:HI (match_operand:HI 1 "register_operand" "0") (match_operand:HI 2 "const_int_operand" "i")))] *************** *** 5813,5818 **** --- 5904,6145 ---- return \"\"; }") + (define_insn "*rotrhi3" + [(set (match_operand:HI 0 "register_operand" "=d,*x") + (rotatert:HI (match_operand:HI 1 "register_operand" "0,0") + (match_operand:HI 2 "general_operand" "+x,+d"))) + (clobber (match_dup 2))] + "" + "* + { + if (A_REG_P (operands[0])) + return \"#\"; + + return \"bsr\\t___rotrhi3\"; + }") + + ;; Split a shift operation on an address register in a shift + ;; on D_REGNUM. + (define_split /* "*rotrhi3_addr" */ + [(set (match_operand:HI 0 "hard_addr_reg_operand" "") + (match_operator:HI 3 "m68hc11_shift_operator" + [(match_operand:HI 1 "register_operand" "") + (match_operand:HI 2 "register_operand" "")])) + (clobber (match_dup 2))] + "z_replacement_completed == 2" + [(parallel [(set (reg:HI D_REGNUM) (match_dup 0)) + (set (match_dup 0) (reg:HI D_REGNUM))]) + (parallel [(set (reg:HI D_REGNUM) + (match_op_dup 3 [(reg:HI D_REGNUM) (match_dup 0)])) + (clobber (match_dup 0))]) + (parallel [(set (reg:HI D_REGNUM) (match_dup 0)) + (set (match_dup 0) (reg:HI D_REGNUM))])] + "") + + ;;-------------------------------------------------------------------- + ;;- 68HC12 Decrement/Increment and branch + ;;-------------------------------------------------------------------- + ;; These patterns are used by loop optimization as well as peephole2 + ;; They must handle reloading themselves and the scratch register + ;; is used for that. Even if we accept memory operand, we must not + ;; accept them on the predicate because it might create too many reloads. + ;; (specially on HC12 due to its auto-incdec addressing modes). + ;; + (define_expand "decrement_and_branch_until_zero" + [(parallel [(set (pc) + (if_then_else + (ne (plus:HI (match_operand:HI 0 "register_operand" "") + (const_int 0)) + (const_int 1)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) + (plus:HI (match_dup 0) + (const_int -1))) + (clobber (match_scratch:HI 2 ""))])] + "TARGET_M6812" + "") + + (define_expand "doloop_end" + [(use (match_operand 0 "" "")) ; loop pseudo + (use (match_operand 1 "" "")) ; iterations; zero if unknown + (use (match_operand 2 "" "")) ; max iterations + (use (match_operand 3 "" "")) ; loop level + (use (match_operand 4 "" ""))] ; label + "TARGET_M6812" + " + { + /* Reject non-constant loops as it generates bigger code due to + the handling of the loop register. We can do better by using + the peephole2 dbcc/ibcc patterns. */ + if (INTVAL (operands[1]) == 0) + { + FAIL; + } + if (GET_MODE (operands[0]) == HImode) + { + emit_jump_insn (gen_m68hc12_dbcc_dec_hi (operands[0], + gen_rtx (NE, HImode), + operands[4])); + DONE; + } + if (GET_MODE (operands[0]) == QImode) + { + emit_jump_insn (gen_m68hc12_dbcc_dec_qi (operands[0], + gen_rtx (NE, QImode), + operands[4])); + DONE; + } + + FAIL; + }") + + ;; Decrement-and-branch insns. + (define_insn "m68hc12_dbcc_dec_hi" + [(set (pc) + (if_then_else + (match_operator 1 "m68hc11_eq_compare_operator" + [(match_operand:HI 0 "register_operand" "+dxy,m*u*z") + (const_int 1)]) + (label_ref (match_operand 2 "" "")) + (pc))) + (set (match_dup 0) + (plus:HI (match_dup 0) (const_int -1))) + (clobber (match_scratch:HI 3 "=X,dxy"))] + "TARGET_M6812" + "* + { + if (!H_REG_P (operands[0])) + return \"#\"; + + CC_STATUS_INIT; + if (GET_CODE (operands[1]) == EQ) + return \"dbeq\\t%0,%l2\"; + else + return \"dbne\\t%0,%l2\"; + }") + + ;; Decrement-and-branch insns. + (define_insn "m68hc12_dbcc_inc_hi" + [(set (pc) + (if_then_else + (match_operator 1 "m68hc11_eq_compare_operator" + [(match_operand:HI 0 "register_operand" "+dxy,m*u*z") + (const_int -1)]) + (label_ref (match_operand 2 "" "")) + (pc))) + (set (match_dup 0) + (plus:HI (match_dup 0) (const_int 1))) + (clobber (match_scratch:HI 3 "=X,dxy"))] + "TARGET_M6812" + "* + { + if (!H_REG_P (operands[0])) + return \"#\"; + + CC_STATUS_INIT; + if (GET_CODE (operands[1]) == EQ) + return \"ibeq\\t%0,%l2\"; + else + return \"ibeq\\t%0,%l2\"; + }") + + ;; Decrement-and-branch (QImode). + (define_insn "m68hc12_dbcc_dec_qi" + [(set (pc) + (if_then_else + (match_operator 1 "m68hc11_eq_compare_operator" + [(match_operand:QI 0 "register_operand" "+d,m*u*A") + (const_int 1)]) + (label_ref (match_operand 2 "" "")) + (pc))) + (set (match_dup 0) + (plus:QI (match_dup 0) (const_int -1))) + (clobber (match_scratch:QI 3 "=X,d"))] + "TARGET_M6812" + "* + { + if (!D_REG_P (operands[0])) + return \"#\"; + + CC_STATUS_INIT; + if (GET_CODE (operands[1]) == EQ) + return \"dbeq\\tb,%l2\"; + else + return \"dbne\\tb,%l2\"; + }") + + ;; Increment-and-branch (QImode). + (define_insn "m68hc12_dbcc_inc_qi" + [(set (pc) + (if_then_else + (match_operator 1 "m68hc11_eq_compare_operator" + [(match_operand:QI 0 "register_operand" "+d,m*u*A") + (const_int -1)]) + (label_ref (match_operand 2 "" "")) + (pc))) + (set (match_dup 0) + (plus:QI (match_dup 0) (const_int 1))) + (clobber (match_scratch:QI 3 "=X,d"))] + "TARGET_M6812" + "* + { + if (!D_REG_P (operands[0])) + return \"#\"; + + CC_STATUS_INIT; + if (GET_CODE (operands[1]) == EQ) + return \"ibeq\\tb,%l2\"; + else + return \"ibeq\\tb,%l2\"; + }") + + ;; Split the above to handle the case where operand 0 is in memory + ;; (a register that couldn't get a hard register) + (define_split + [(set (pc) + (if_then_else + (match_operator 3 "m68hc11_eq_compare_operator" + [(match_operand:HI 0 "general_operand" "") + (match_operand:HI 1 "const_int_operand" "")]) + (label_ref (match_operand 4 "" "")) + (pc))) + (set (match_dup 0) + (plus:HI (match_dup 0) (match_operand 2 "const_int_operand" ""))) + (clobber (match_operand:HI 5 "hard_reg_operand" ""))] + "TARGET_M6812 && reload_completed" + [(set (match_dup 5) (match_dup 0)) + (set (match_dup 5) (plus:HI (match_dup 5) (match_dup 2))) + (set (match_dup 0) (match_dup 5)) + (set (pc) + (if_then_else (match_op_dup 3 + [(match_dup 5) (const_int 0)]) + (label_ref (match_dup 4)) (pc)))] + "") + + ;; Split the above to handle the case where operand 0 is in memory + ;; (a register that couldn't get a hard register) + (define_split + [(set (pc) + (if_then_else + (match_operator 3 "m68hc11_eq_compare_operator" + [(match_operand:QI 0 "general_operand" "") + (match_operand:QI 1 "const_int_operand" "")]) + (label_ref (match_operand 4 "" "")) + (pc))) + (set (match_dup 0) + (plus:QI (match_dup 0) (match_operand 2 "const_int_operand" ""))) + (clobber (match_operand:QI 5 "hard_reg_operand" ""))] + "TARGET_M6812 && reload_completed" + [(set (match_dup 5) (match_dup 0)) + (set (match_dup 5) (plus:QI (match_dup 5) (match_dup 2))) + (set (match_dup 0) (match_dup 5)) + (set (pc) + (if_then_else (match_op_dup 3 + [(match_dup 5) (const_int 0)]) + (label_ref (match_dup 4)) (pc)))] + "") + ;;-------------------------------------------------------------------- ;;- Jumps and transfers ;;-------------------------------------------------------------------- *************** *** 6281,6287 **** { if (GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF) { ! if (SYMBOL_REF_FLAG (XEXP (operands[0], 0)) == 1) return \"swi\"; else return \"bsr\\t%0\"; --- 6608,6629 ---- { if (GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF) { ! if (m68hc11_is_far_symbol (operands[0])) ! { ! if (TARGET_M6812) ! { ! output_asm_insn (\"call\\t%0\", operands); ! return \"\"; ! } ! else ! { ! output_asm_insn (\"pshb\", operands); ! output_asm_insn (\"ldab\\t#%%page(%0)\", operands); ! output_asm_insn (\"ldy\\t#%%addr(%0)\", operands); ! return \"jsr\\t__call_a32\"; ! } ! } ! if (m68hc11_is_trap_symbol (operands[0])) return \"swi\"; else return \"bsr\\t%0\"; *************** *** 6301,6307 **** { if (GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF) { ! if (SYMBOL_REF_FLAG (XEXP (operands[1], 0)) == 1) return \"swi\"; else return \"bsr\\t%1\"; --- 6643,6664 ---- { if (GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF) { ! if (m68hc11_is_far_symbol (operands[1])) ! { ! if (TARGET_M6812) ! { ! output_asm_insn (\"call\\t%1\", operands); ! return \"\"; ! } ! else ! { ! output_asm_insn (\"pshb\", operands); ! output_asm_insn (\"ldab\\t#%%page(%1)\", operands); ! output_asm_insn (\"ldy\\t#%%addr(%1)\", operands); ! return \"jsr\\t__call_a32\"; ! } ! } ! if (m68hc11_is_trap_symbol (operands[1])) return \"swi\"; else return \"bsr\\t%1\"; *************** *** 6391,6398 **** { emit_jump_insn (gen_rtx (PARALLEL, VOIDmode, gen_rtvec (2, gen_rtx_RETURN (VOIDmode), ! gen_rtx_USE (VOIDmode, ! gen_rtx_REG (HImode, 1))))); DONE; } if (ret_size) --- 6748,6755 ---- { emit_jump_insn (gen_rtx (PARALLEL, VOIDmode, gen_rtvec (2, gen_rtx_RETURN (VOIDmode), ! gen_rtx_USE (VOIDmode, ! gen_rtx_REG (HImode, 1))))); DONE; } if (ret_size) *************** *** 6418,6424 **** return \"\"; if (current_function_interrupt || current_function_trap) return \"rti\"; ! return \"rts\"; }") (define_insn "*return_16bit" --- 6775,6799 ---- return \"\"; if (current_function_interrupt || current_function_trap) return \"rti\"; ! else if (!current_function_far) ! return \"rts\"; ! else if (TARGET_M6812) ! return \"rtc\"; ! else ! { ! int ret_size = 0; ! ! if (current_function_return_rtx) ! ret_size = GET_MODE_SIZE (GET_MODE (current_function_return_rtx)); ! ! if (ret_size == 0) ! return \"jmp\\t__return_void\"; ! if (ret_size <= 2) ! return \"jmp\\t__return_16\"; ! if (ret_size <= 4) ! return \"jmp\\t__return_32\"; ! return \"jmp\\t__return_16\"; ! } }") (define_insn "*return_16bit" *************** *** 6435,6441 **** return \"\"; if (current_function_interrupt || current_function_trap) return \"rti\"; ! return \"rts\"; }") (define_insn "*return_32bit" --- 6810,6821 ---- return \"\"; if (current_function_interrupt || current_function_trap) return \"rti\"; ! else if (!current_function_far) ! return \"rts\"; ! else if (TARGET_M6812) ! return \"rtc\"; ! else ! return \"jmp\\t__return_16\"; }") (define_insn "*return_32bit" *************** *** 6452,6458 **** return \"\"; if (current_function_interrupt || current_function_trap) return \"rti\"; ! return \"rts\"; }") (define_insn "indirect_jump" --- 6832,6843 ---- return \"\"; if (current_function_interrupt || current_function_trap) return \"rti\"; ! else if (!current_function_far) ! return \"rts\"; ! else if (TARGET_M6812) ! return \"rtc\"; ! else ! return \"jmp\\t__return_32\"; }") (define_insn "indirect_jump" *************** *** 6484,6489 **** --- 6869,6930 ---- ;;- Peepholes ;;-------------------------------------------------------------------- + ;;-------------------------------------------------------------------- + ;;- 68HC12 dbcc/ibcc peepholes + ;;-------------------------------------------------------------------- + ;; + ;; Replace: "addd #-1; bne L1" into "dbne d,L1" + ;; "addd #-1; beq L1" into "dbeq d,L1" + ;; "addd #1; bne L1" into "ibne d,L1" + ;; "addd #1; beq L1" into "ibeq d,L1" + ;; + (define_peephole2 + [(set (match_operand:HI 0 "hard_reg_operand" "") + (plus:HI (match_dup 0) + (match_operand:HI 1 "const_int_operand" ""))) + (set (pc) + (if_then_else (match_operator 2 "m68hc11_eq_compare_operator" + [(match_dup 0) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) (pc)))] + "TARGET_M6812 && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1)" + [(parallel [ + (set (pc) (if_then_else (match_op_dup 2 [(match_dup 0) (match_dup 5)]) + (label_ref (match_dup 3)) (pc))) + (set (match_dup 0) (plus:HI (match_dup 0) (match_dup 1))) + (clobber (match_dup 4))])] + "operands[4] = gen_rtx_SCRATCH(HImode); + operands[5] = GEN_INT (-INTVAL (operands[1]));") + + + ;; + ;; Replace: "addb #-1; bne L1" into "dbne b,L1" + ;; "addb #-1; beq L1" into "dbeq b,L1" + ;; + (define_peephole2 + [(set (match_operand:QI 0 "hard_reg_operand" "") + (plus:QI (match_dup 0) + (match_operand:QI 1 "const_int_operand" ""))) + (set (pc) + (if_then_else (match_operator 2 "m68hc11_eq_compare_operator" + [(match_dup 0) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) (pc)))] + "TARGET_M6812 && D_REG_P (operands[0]) + && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1)" + [(parallel [ + (set (pc) (if_then_else (match_op_dup 2 [(match_dup 0) (match_dup 5)]) + (label_ref (match_dup 3)) (pc))) + (set (match_dup 0) (plus:QI (match_dup 0) (match_dup 1))) + (clobber (match_dup 4))])] + "operands[4] = gen_rtx_SCRATCH(QImode); + operands[5] = GEN_INT (-INTVAL (operands[1]));") + + + ;;-------------------------------------------------------------------- + ;;- Move peephole2 + ;;-------------------------------------------------------------------- + ;; ;; Replace "leas 2,sp" with a "pulx" or a "puly". ;; On 68HC12, this is one cycle slower but one byte smaller. *************** *** 6543,6550 **** (set (match_operand:HI 2 "hard_reg_operand" "") (match_dup 1))] "(D_REG_P (operands[2]) || X_REG_P (operands[2]) || Y_REG_P (operands[2])) ! && !reg_mentioned_p (operands[2], operands[0]) ! && GET_MODE (operands[2]) == HImode" [(set (match_dup 2) (match_dup 1)) (set (match_dup 0) (match_dup 2))] "") --- 6984,6990 ---- (set (match_operand:HI 2 "hard_reg_operand" "") (match_dup 1))] "(D_REG_P (operands[2]) || X_REG_P (operands[2]) || Y_REG_P (operands[2])) ! && !reg_mentioned_p (operands[2], operands[0])" [(set (match_dup 2) (match_dup 1)) (set (match_dup 0) (match_dup 2))] "") *************** *** 6669,6674 **** --- 7109,7137 ---- "") ;; + ;; Replace a "ldd ; addd #N; std " into a + ;; "ldx ; leax; stx " if we have a free X/Y register + ;; and the constant is small. + ;; + (define_peephole2 + [(set (match_operand:HI 0 "hard_reg_operand" "") + (match_operand:HI 1 "general_operand" "")) + (set (match_dup 0) (plus:HI (match_dup 0) + (match_operand:HI 2 "const_int_operand" ""))) + (set (match_operand:HI 3 "nonimmediate_operand" "") + (match_dup 0)) + (match_scratch:HI 4 "xy")] + "D_REG_P (operands[0]) + && (TARGET_M6812 + || (INTVAL (operands[2]) >= -2 && INTVAL (operands[2]) <= 2)) + && peep2_reg_dead_p (3, operands[0])" + [(set (match_dup 4) (match_dup 1)) + (set (match_dup 4) (plus:HI (match_dup 4) (match_dup 2))) + (set (match_dup 3) (match_dup 4))] + "if (reg_mentioned_p (operands[4], operands[1])) FAIL; + if (reg_mentioned_p (operands[4], operands[3])) FAIL;") + + ;; ;; This peephole catches the address computations generated by the reload ;; pass. (define_peephole diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/m68hc11-protos.h gcc-3.3/gcc/config/m68hc11/m68hc11-protos.h *** gcc-3.2.3/gcc/config/m68hc11/m68hc11-protos.h 2002-06-28 20:55:10.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/m68hc11-protos.h 2003-04-12 21:53:41.000000000 +0000 *************** *** 1,5 **** /* Prototypes for exported functions defined in m68hc11.c ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. --- 1,5 ---- /* Prototypes for exported functions defined in m68hc11.c ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. *************** extern int m68hc11_override_options PARA *** 24,29 **** --- 24,30 ---- extern int m68hc11_optimization_options PARAMS((int,int)); extern void m68hc11_conditional_register_usage PARAMS((void)); extern int hard_regno_mode_ok PARAMS((int, enum machine_mode)); + extern int m68hc11_hard_regno_rename_ok PARAMS((int, int)); extern int m68hc11_total_frame_size PARAMS((void)); extern int m68hc11_initial_frame_pointer_offset PARAMS((void)); *************** extern void m68hc11_function_arg_advance *** 39,55 **** enum machine_mode, tree, int)); - extern void m68hc11_encode_section_info PARAMS((tree)); #endif #ifdef RTX_CODE - extern rtx m68hc11_compare_op0; - extern rtx m68hc11_compare_op1; - extern rtx m68hc11_soft_tmp_reg; - extern rtx iy_reg; - extern rtx ix_reg; - extern rtx d_reg; - extern void m68hc11_initialize_trampoline PARAMS((rtx, rtx, rtx)); extern rtx m68hc11_expand_compare_and_branch PARAMS((enum rtx_code, --- 40,48 ---- *************** extern int arith_src_operand PARAMS((rtx *** 128,134 **** --- 121,129 ---- extern int m68hc11_logical_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_arith_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_non_shift_operator PARAMS((rtx, enum machine_mode)); + extern int m68hc11_shift_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_unary_operator PARAMS((rtx, enum machine_mode)); + extern int m68hc11_eq_compare_operator PARAMS((rtx, enum machine_mode)); extern int non_push_operand PARAMS((rtx, enum machine_mode)); extern int hard_reg_operand PARAMS((rtx, enum machine_mode)); extern int soft_reg_operand PARAMS((rtx, enum machine_mode)); *************** extern int m68hc11_function_arg_pass_by_ *** 148,160 **** int)); extern int m68hc11_function_arg_padding PARAMS((enum machine_mode, tree)); - extern void m68hc11_expand_builtin_va_start PARAMS((int, tree, rtx)); - - extern rtx m68hc11_va_arg PARAMS((tree,tree)); - extern void m68hc11_expand_builtin_va_start PARAMS((int,tree,rtx)); - extern void m68hc11_function_epilogue PARAMS((FILE*,int)); #endif /* TREE_CODE */ extern HOST_WIDE_INT m68hc11_min_offset; --- 143,153 ---- int)); extern int m68hc11_function_arg_padding PARAMS((enum machine_mode, tree)); extern void m68hc11_function_epilogue PARAMS((FILE*,int)); + extern int m68hc11_is_far_symbol PARAMS((rtx)); + extern int m68hc11_is_trap_symbol PARAMS((rtx)); + #endif /* TREE_CODE */ extern HOST_WIDE_INT m68hc11_min_offset; diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/m68hc12.h gcc-3.3/gcc/config/m68hc11/m68hc12.h *** gcc-3.2.3/gcc/config/m68hc11/m68hc12.h 2001-05-04 19:49:25.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/m68hc12.h 2003-01-15 23:00:12.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler, for m68hc12. ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. ! Contributed by Stephane Carrez (stcarrez@worldnet.fr). This file is part of GNU CC. --- 1,6 ---- /* Definitions of target machine for GNU compiler, for m68hc12. ! Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! Contributed by Stephane Carrez (stcarrez@nerim.fr). This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 20,37 **** Boston, MA 02111-1307, USA. */ /* Compile and assemble for a 68hc12 unless there is a -m68hc11 option. */ ! #define ASM_SPEC "%{m68hc11:-m68hc11}%{!m68hc11:-m68hc12}" #define LIB_SPEC "" #define CC1_SPEC "" /* We need to tell the linker the target elf format. Just pass an emulation option. This can be overriden by -Wl option of gcc. */ ! #define LINK_SPEC "%{m68hc11:-m m68hc11elf}%{!m68hc11:-m m68hc12elf}" #define CPP_SPEC \ ! "%{mshort:-D__HAVE_SHORT_INT__ -D__INT__=16 -D__INT_MAX__=32767}\ ! %{!mshort:-D__INT__=32 -D__INT_MAX__=2147483647}\ %{m68hc11:-Dmc6811 -DMC6811 -Dmc68hc11}\ %{!m68hc11:-Dmc6812 -DMC6812 -Dmc68hc12}\ %{fshort-double:-D__HAVE_SHORT_DOUBLE__}" --- 20,45 ---- Boston, MA 02111-1307, USA. */ /* Compile and assemble for a 68hc12 unless there is a -m68hc11 option. */ ! #define ASM_SPEC \ ! "%{m68hc11:-m68hc11}" \ ! "%{m68hcs12:-m68hcs12}" \ ! "%{!m68hc11:%{!m68hcs12:-m68hc12}}" #define LIB_SPEC "" #define CC1_SPEC "" /* We need to tell the linker the target elf format. Just pass an emulation option. This can be overriden by -Wl option of gcc. */ ! #define LINK_SPEC \ ! "%{m68hc11:-m m68hc11elf}" \ ! "%{m68hcs12:-m m68hc12elf}" \ ! "%{!m68hc11:%{!m68hcs12:-m m68hc11elf}} %{mrelax:-relax}" #define CPP_SPEC \ ! "%{mshort:-D__HAVE_SHORT_INT__ -D__INT__=16}\ ! %{!mshort:-D__INT__=32}\ %{m68hc11:-Dmc6811 -DMC6811 -Dmc68hc11}\ + %{!m68hc11:%{!m68hc12:-Dmc6812 -DMC6812 -Dmc68hc12}}\ + %{m68hcs12:-Dmc6812 -DMC6812 -Dmc68hcs12}\ %{!m68hc11:-Dmc6812 -DMC6812 -Dmc68hc12}\ %{fshort-double:-D__HAVE_SHORT_DOUBLE__}" diff -Nrc3pad gcc-3.2.3/gcc/config/m68hc11/t-m68hc11-gas gcc-3.3/gcc/config/m68hc11/t-m68hc11-gas *** gcc-3.2.3/gcc/config/m68hc11/t-m68hc11-gas 2001-08-03 21:01:06.000000000 +0000 --- gcc-3.3/gcc/config/m68hc11/t-m68hc11-gas 2003-03-24 22:27:36.000000000 +0000 *************** LIB1ASMFUNCS = _mulsi3 \ *** 23,31 **** _regs_min _regs_frame _regs_d1_2 \ _regs_d3_4 _regs_d5_6 _regs_d7_8 _regs_d9_16 _regs_d17_32 \ _premain __exit _abort _cleanup \ ! _adddi3 _subdi3 _notdi2 \ _ashrhi3 _lshrhi3 _lshlhi3 _ashrqi3 _lshlqi3 _map_data _init_bss \ ! _ctor _dtor TARGET_LIBGCC2_CFLAGS = -DUSE_GAS -DIN_GCC --- 23,31 ---- _regs_min _regs_frame _regs_d1_2 \ _regs_d3_4 _regs_d5_6 _regs_d7_8 _regs_d9_16 _regs_d17_32 \ _premain __exit _abort _cleanup \ ! _adddi3 _subdi3 _notdi2 _rotlhi3 _rotrhi3 \ _ashrhi3 _lshrhi3 _lshlhi3 _ashrqi3 _lshlqi3 _map_data _init_bss \ ! _ctor _dtor _far_tramp _call_far _return_far TARGET_LIBGCC2_CFLAGS = -DUSE_GAS -DIN_GCC *************** LIB2FUNCS_EXTRA = $(srcdir)/config/udivm *** 34,41 **** $(srcdir)/config/divmod.c $(srcdir)/config/udivmod.c # Don't compile with -g1 this reduces the size of some sections (.eh_frame). ! LIBGCC2_DEBUG_CFLAGS = ! LIBGCC2_CFLAGS = -Os $(LIBGCC2_INCLUDES) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 MULTILIB_OPTIONS = m68hc11/m68hc12 mshort fshort-double MULTILIB_DIRNAMES = --- 34,41 ---- $(srcdir)/config/divmod.c $(srcdir)/config/udivmod.c # Don't compile with -g1 this reduces the size of some sections (.eh_frame). ! LIBGCC2_DEBUG_CFLAGS =-g ! LIBGCC2_CFLAGS = -Os -mrelax $(LIBGCC2_INCLUDES) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 MULTILIB_OPTIONS = m68hc11/m68hc12 mshort fshort-double MULTILIB_DIRNAMES = diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/3b1g.h gcc-3.3/gcc/config/m68k/3b1g.h *** gcc-3.2.3/gcc/config/m68k/3b1g.h 2001-11-01 14:49:32.000000000 +0000 --- gcc-3.3/gcc/config/m68k/3b1g.h 2002-08-29 21:40:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 41,50 **** #define CPP_PREDEFINES "-Dmc68000 -Dmc68k -Dunix -Dunixpc -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k" /* This is (not really) BSD, so (but) it wants DBX format. */ ! #define DBX_DEBUGGING_INFO ! ! /* Brain damage. */ ! #define SCCS_DIRECTIVE /* Specify how to pad function arguments. Value should be `upward', `downward' or `none'. --- 41,47 ---- #define CPP_PREDEFINES "-Dmc68000 -Dmc68k -Dunix -Dunixpc -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k" /* This is (not really) BSD, so (but) it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Specify how to pad function arguments. Value should be `upward', `downward' or `none'. diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/3b1.h gcc-3.3/gcc/config/m68k/3b1.h *** gcc-3.2.3/gcc/config/m68k/3b1.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/3b1.h 2002-08-29 21:40:12.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 50,62 **** "%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ %{shlib:crt0s.o%s shlib.ifile%s} " - /* cpp has to support a #sccs directive for the /usr/include files */ - - #define SCCS_DIRECTIVE - /* Make output for SDB. */ ! #define SDB_DEBUGGING_INFO /* The .file command should always begin the output. */ --- 50,58 ---- "%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ %{shlib:crt0s.o%s shlib.ifile%s} " /* Make output for SDB. */ ! #define SDB_DEBUGGING_INFO 1 /* The .file command should always begin the output. */ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/altos3068.h gcc-3.3/gcc/config/m68k/altos3068.h *** gcc-3.2.3/gcc/config/m68k/altos3068.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/altos3068.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,116 **** - /* Definitions of target machine for GNU compiler. Altos 3068 68020 version. - Copyright (C) 1988, 1989, 1993, 1996 Free Software Foundation, Inc. - Contributed by Jyrki Kuoppala - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #include "m68k/m68k.h" - - /* See m68k.h. 7 means 68020 with 68881. */ - /* 5 is without 68881. Change to 7 if you have 68881 */ - - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68020) - - /* Don't try using XFmode. */ - #undef LONG_DOUBLE_TYPE_SIZE - #define LONG_DOUBLE_TYPE_SIZE 64 - #endif - - /* Define __HAVE_68881__ in preprocessor, - according to the -m flags. - This will control the use of inline 68881 insns in certain macros. - Also inform the program which CPU this is for. */ - - #if TARGET_DEFAULT & MASK_68881 - - /* -m68881 is the default */ - #define CPP_SPEC \ - "%{!msoft-float:-D__HAVE_68881__ }\ - %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" - - #else - - /* -msoft-float is the default */ - #define CPP_SPEC \ - "%{m68881:-D__HAVE_68881__ }\ - %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" - - #endif - - /* -m68000 requires special flags to the assembler. */ - - #define ASM_SPEC \ - "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}" - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix -Asystem=unix -Acpu=m68k -Amachine=m68k" - - /* Every structure or union's size must be a multiple of 2 bytes. */ - - #define STRUCTURE_SIZE_BOUNDARY 16 - - /* Generate calls to memcpy, memcmp and memset. */ - #define TARGET_MEM_FUNCTIONS - - /* We use gnu assembler, linker and gdb, so we want DBX format. */ - - #define DBX_DEBUGGING_INFO - - /* Tell some conditionals we will use GAS. Is this really used? */ - - #define USE_GAS - - #undef ASM_OUTPUT_FLOAT_OPERAND - #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ - do { \ - if (CODE == 'f') \ - { \ - char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \ - fprintf (FILE, "#0r%s", dstr); \ - } \ - else \ - { \ - long l; \ - REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", (int) l); \ - else \ - asm_fprintf ((FILE), "%I0x%lx", l); \ - } \ - } while (0) - - #undef ASM_OUTPUT_DOUBLE_OPERAND - #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ - do { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ - fprintf (FILE, "#0r%s", dstr); \ - } while (0) - - /* Return pointer values in both d0 and a0. */ - - #undef FUNCTION_EXTRA_EPILOGUE - #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ - { \ - if (current_function_returns_pointer \ - && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ - fprintf (FILE, "\tmovel d0,a0\n"); \ - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/amix.h gcc-3.3/gcc/config/m68k/amix.h *** gcc-3.2.3/gcc/config/m68k/amix.h 2001-12-17 15:05:34.000000000 +0000 --- gcc-3.3/gcc/config/m68k/amix.h 2002-08-20 23:27:02.000000000 +0000 *************** do { \ *** 146,151 **** #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ if (flag_pic && !strcmp(PREFIX,"LC")) \ ! asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM); \ else \ asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM) --- 146,151 ---- #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ if (flag_pic && !strcmp(PREFIX,"LC")) \ ! fprintf (FILE, "%s%%%d:\n", PREFIX, NUM); \ else \ asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM) diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/apollo68.h gcc-3.3/gcc/config/m68k/apollo68.h *** gcc-3.2.3/gcc/config/m68k/apollo68.h 2003-01-30 16:57:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/apollo68.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,210 **** - /* Definitions of target machine for GNU compiler. Apollo 680X0 version. - Copyright (C) 1989, 1992, 1996, 1997, 1999, 2002 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "m68k/m68k.h" - - /* This symbol may be tested in other files for special Apollo handling */ - - #define TM_APOLLO - - /* See m68k.h. 7 means 68020 with 68881. */ - - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) - #endif - - /* Target switches for the Apollo is the same as in m68k.h, except - there is no Sun FPA. */ - - #undef TARGET_SWITCHES - #define TARGET_SWITCHES \ - { { "68020", 5}, \ - { "c68020", 5}, \ - { "68881", 2}, \ - { "bitfield", 4}, \ - { "68000", -5}, \ - { "c68000", -5}, \ - { "soft-float", -0102}, \ - { "nobitfield", -4}, \ - { "rtd", 8}, \ - { "nortd", -8}, \ - { "short", 040}, \ - { "noshort", -040}, \ - { "", TARGET_DEFAULT}} - - /* Define __HAVE_68881__ in preprocessor, - according to the -m flags. - This will control the use of inline 68881 insns in certain macros. - Also inform the program which CPU this is for. */ - - #if TARGET_DEFAULT & MASK_68881 - - /* -m68881 is the default */ - #define CPP_SPEC \ - "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\ - %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\ - %{!ansi:-D_APOLLO_SOURCE}}" - - #else - - /* -msoft-float is the default */ - #define CPP_SPEC \ - "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\ - %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\ - %{!ansi:-D_APOLLO_SOURCE}}" - - #endif - - /* Names to predefine in the preprocessor for this target machine. */ - /* These are the ones defined by Apollo, plus mc68000 for uniformity with - GCC on other 68000 systems. */ - - #define CPP_PREDEFINES "-Dapollo -Daegis -Dunix -Asystem=unix -Acpu=m68k -Amachine=m68k" - - /* cpp has to support a #sccs directive for the /usr/include files */ - - #define SCCS_DIRECTIVE - - /* Allow #ident but output nothing for it. */ - - #define IDENT_DIRECTIVE - #define ASM_OUTPUT_IDENT(FILE, NAME) - - /* -m68000 requires special flags to the assembler. */ - - #define ASM_SPEC \ - "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}" - - /* STARTFILE_SPEC - Note that includes knowledge of the default specs for gcc, ie. no - args translates to the same effect as -m68881 */ - - #if TARGET_DEFAULT & MASK_68881 - /* -m68881 is the default */ - #define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - #else - /* -msoft-float is the default */ - #define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - #endif - - /* Specify library to handle `-a' basic block profiling. */ - - #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \ - %{a:/usr/lib/bb_link.o} " - - /* Debugging is not supported yet */ - - #undef DBX_DEBUGGING_INFO - #undef SDB_DEBUGGING_INFO - - /* troy@cbme.unsw.edu.au says people are still using sr10.2 - and it does not support atexit. */ - #define NEED_ATEXIT - - /* Every structure or union's size must be a multiple of 2 bytes. */ - - #define STRUCTURE_SIZE_BOUNDARY 16 - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #undef STACK_BOUNDARY - #define STACK_BOUNDARY 32 - - /* Functions which return large structures get the address - to place the wanted value from a hidden parameter. */ - - #undef PCC_STATIC_STRUCT_RETURN - #undef STRUCT_VALUE_REGNUM - #define STRUCT_VALUE 0 - #define STRUCT_VALUE_INCOMING 0 - - /* Specify how to pad function arguments. - Arguments are not padded at all; the stack is kept aligned on long - boundaries. */ - - #define FUNCTION_ARG_PADDING(mode, size) none - - /* The definition of this macro imposes a limit on the size of - an aggregate object which can be treated as if it were a scalar - object. */ - - #define MAX_FIXED_MODE_SIZE BITS_PER_WORD - - /* The definition of this macro implies that there are cases where - a scalar value cannot be returned in registers. - For Apollo, anything larger than one integer register is returned - using the structure-value mechanism, i.e. objects of DFmode are - returned that way. */ - - #define RETURN_IN_MEMORY(type) \ - (TYPE_MODE (type) == BLKmode \ - || GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD) - - /* In order to link with Apollo libraries, we can't prefix external - symbols with an underscore. */ - - #undef USER_LABEL_PREFIX - - /* Use a prefix for local labels, just to be on the save side. */ - - #undef LOCAL_LABEL_PREFIX - #define LOCAL_LABEL_PREFIX "." - - /* Use a register prefix to avoid clashes with external symbols (classic - example: `extern char PC;' in termcap). */ - - #undef REGISTER_PREFIX - #define REGISTER_PREFIX "%" - - /* config/m68k.md has an explicit reference to the program counter, - prefix this by the register prefix. */ - - #define ASM_RETURN_CASE_JUMP \ - do { \ - if (TARGET_5200) \ - { \ - if (ADDRESS_REG_P (operands[0])) \ - return "jmp %%pc@(2,%0:l)"; \ - else \ - return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \ - } \ - else \ - return "jmp %%pc@(2,%0:w)"; \ - } while (0) - - /* Here are the new register names. */ - - #undef REGISTER_NAMES - #ifndef SUPPORT_SUN_FPA - #define REGISTER_NAMES \ - {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ - "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ - "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" } - #else /* SUPPORTED_SUN_FPA */ - #define REGISTER_NAMES \ - {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ - "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ - "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \ - "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \ - "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \ - "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \ - "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" } - #endif /* defined SUPPORT_SUN_FPA */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/atari.h gcc-3.3/gcc/config/m68k/atari.h *** gcc-3.2.3/gcc/config/m68k/atari.h 2001-12-17 15:05:34.000000000 +0000 --- gcc-3.3/gcc/config/m68k/atari.h 2002-08-20 23:27:02.000000000 +0000 *************** do { \ *** 103,108 **** #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ if (flag_pic && !strcmp(PREFIX,"LC")) \ ! asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM); \ else \ asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM) --- 103,108 ---- #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ if (flag_pic && !strcmp(PREFIX,"LC")) \ ! fprintf (FILE, "%s%%%d:\n", PREFIX, NUM); \ else \ asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM) diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/auxas.h gcc-3.3/gcc/config/m68k/auxas.h *** gcc-3.2.3/gcc/config/m68k/auxas.h 2001-12-17 15:05:34.000000000 +0000 --- gcc-3.3/gcc/config/m68k/auxas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,177 **** - /* Definitions for Motorola 680x0 running A/UX using /bin/as - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define USE_BIN_AS - - #ifndef USE_COLLECT2 - #define USE_COLLECT2 - #endif - - #ifndef __ASSEMBLY__ - - #include "m68k/sgs.h" - - #define ASM_SPEC "%{m68030:-68030 }%{m68040:-68040 }" - - /* Modify AT&T SGS assembler syntax */ - /* A/UX's as doesn't do dots in pseudo-ops */ - - #define SDB_DEBUGGING_INFO - - #define NO_DOLLAR_IN_LABEL - #define NO_DOT_IN_LABEL - - #undef INT_OP_GROUP - #define INT_OP_GROUP INT_OP_NO_DOT - - #undef TEXT_SECTION_ASM_OP - #define TEXT_SECTION_ASM_OP "\ttext" - - #undef DATA_SECTION_ASM_OP - #define DATA_SECTION_ASM_OP "\tdata\t1" - - #undef SPACE_ASM_OP - #define SPACE_ASM_OP "\tspace\t" - - #undef ALIGN_ASM_OP - #define ALIGN_ASM_OP "\talign\t" - - #undef GLOBAL_ASM_OP - #define GLOBAL_ASM_OP "\tglobal\t" - - #undef SWBEG_ASM_OP - #define SWBEG_ASM_OP "\tswbeg\t" - - #undef SET_ASM_OP - #define SET_ASM_OP "\tset\t" - - #undef ASM_PN_FORMAT - #define ASM_PN_FORMAT "%s%%%d" - - #undef LOCAL_LABEL_PREFIX - #define LOCAL_LABEL_PREFIX "L%" - - #define ADDITIONAL_REGISTER_NAMES { {"%a6", 14}, {"%a7", 15} } - - #undef ASM_OUTPUT_COMMON - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\tcomm\t", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - #undef ASM_OUTPUT_LOCAL - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\tlcomm\t", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - output_file_directive ((FILE), main_input_filename) - - #undef ASM_OUTPUT_SOURCE_FILENAME - #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \ - ( fputs ("\tfile\t", (FILE)), \ - output_quoted_string ((FILE), (NAME)), \ - fputc ('\n', (FILE)) ) - - #undef ASM_OUTPUT_CASE_FETCH - #define ASM_OUTPUT_CASE_FETCH(file, labelno, regname) \ - asm_fprintf (file, "10(%Rpc,%s.", regname) - - #define SGS_NO_LI - - /* Random macros describing parts of SDB data. */ - - #define PUT_SDB_SCL(a) \ - fprintf(asm_out_file, "\tscl\t%d%s", (a), SDB_DELIM) - - #define PUT_SDB_INT_VAL(a) \ - fprintf (asm_out_file, "\tval\t%d%s", (a), SDB_DELIM) - - #define PUT_SDB_VAL(a) \ - ( fputs ("\tval\t", asm_out_file), \ - output_addr_const (asm_out_file, (a)), \ - fprintf (asm_out_file, SDB_DELIM)) - - #define PUT_SDB_DEF(a) \ - do { fprintf (asm_out_file, "\tdef\t"); \ - ASM_OUTPUT_LABELREF (asm_out_file, a); \ - fprintf (asm_out_file, SDB_DELIM); } while (0) - - #define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\tdef\t~%s%s", a, SDB_DELIM) - - #define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file) - - #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o%s", a, SDB_DELIM) - - #define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d%s", a, SDB_DELIM) - - #define PUT_SDB_START_DIM fprintf(asm_out_file, "\tdim\t") - - #define PUT_SDB_NEXT_DIM(a) fprintf(asm_out_file, "%d,", a) - - #define PUT_SDB_LAST_DIM(a) fprintf(asm_out_file, "%d%s", a, SDB_DELIM) - - #define PUT_SDB_TAG(a) \ - do { fprintf (asm_out_file, "\ttag\t"); \ - ASM_OUTPUT_LABELREF (asm_out_file, a); \ - fprintf (asm_out_file, SDB_DELIM); } while (0) - - #define PUT_SDB_BLOCK_START(LINE) \ - fprintf (asm_out_file, \ - "\tdef\t~bb%s\tval\t~%s\tscl\t100%s\tline\t%d%s\tendef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_BLOCK_END(LINE) \ - fprintf (asm_out_file, \ - "\tdef\t~eb%s\tval\t~%s\tscl\t100%s\tline\t%d%s\tendef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_FUNCTION_START(LINE) \ - fprintf (asm_out_file, \ - "\tdef\t~bf%s\tval\t~%s\tscl\t101%s\tline\t%d%s\tendef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_FUNCTION_END(LINE) \ - fprintf (asm_out_file, \ - "\tdef\t~ef%s\tval\t~%s\tscl\t101%s\tline\t%d%s\tendef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_EPILOGUE_END(NAME) \ - do { fprintf (asm_out_file, "\tdef\t"); \ - ASM_OUTPUT_LABELREF (asm_out_file, NAME); \ - fprintf (asm_out_file, \ - "%s\tval\t~%s\tscl\t-1%s\tendef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM); } while (0) - - #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \ - sprintf ((BUFFER), "~%dfake", (NUMBER)); - - #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ - fprintf((FILE), "\tln\t%d\n", \ - (sdb_begin_function_line > 1 ? \ - (LINE) - sdb_begin_function_line : 1)) - - #define ASM_MOV_INSN "mov.l" - - #define FUNCTION_PROFILER_SYMBOL "mcount%" - - #endif /* !__ASSEMBLY__ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/aux-crt1.c gcc-3.3/gcc/config/m68k/aux-crt1.c *** gcc-3.2.3/gcc/config/m68k/aux-crt1.c 2000-05-15 23:14:16.000000000 +0000 --- gcc-3.3/gcc/config/m68k/aux-crt1.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,129 **** - /* Startup code for A/UX - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - In addition to the permissions in the GNU General Public License, the - Free Software Foundation gives you unlimited permission to link the - compiled version of this file into combinations with other programs, - and to distribute those combinations without any restriction coming - from the use of this file. (The General Public License restrictions - do apply in other respects; for example, they cover modification of - the file, and distribution when not linked into a combine - executable.) - - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This file is compiled three times to produce crt1.o, mcrt1.o, and - maccrt1.o. The final two are created by defining MCRT1 and MACCRT1 - respectively. */ - - #include - #ifdef MCRT1 - #include - #include - #endif - - /* Extern function declarations */ - - extern void initfpu(void); - extern void __istart(void); - extern void __compatmode(void); - extern void _cleanup(void); - extern int main(int, char **, char **); - extern void exit(int) __attribute__((noreturn)); - extern void _exit(int) __attribute__((noreturn)); - - #ifdef MACCRT1 - extern void InitMac(void); - #endif - #ifdef MCRT1 - static void monitor_start(void); - #endif - - /* Global variables */ - - char **environ; - char *__splimit; /* address of top of stack */ - - - /* Initialize system and run */ - - void _start() __attribute__((noreturn)); - void _start() - { - register int *fp __asm__("%a6"); - register char *d0 __asm__("%d0"); - char **argv; - int argc; - - __splimit = d0; - argc = fp[1]; - argv = (char **)&fp[2]; - environ = &argv[argc+1]; - - initfpu(); - __istart(); - __compatmode(); - - atexit(_cleanup); - #ifdef MCRT1 - monitor_start(); - #endif - #ifdef MACCRT1 - InitMac(); - #endif - - exit(main(argc, argv, environ)); - } - - - #ifdef MCRT1 - /* Start/Stop program monitor */ - - extern void monitor(void *, void *, WORD *, int, int); - - static WORD *monitor_buffer; - - static void monitor_cleanup(void) - { - monitor(NULL, NULL, NULL, 0, 0); - free(monitor_buffer); - } - - static void monitor_start(void) - { - extern int etext; - extern int stext __asm__(".text"); - - /* Choice of buffer size should be "no more than a few times - smaller than the program size" -- I don't believe that there - are any (useful) functions smaller than two insns (4 bytes) - so that is the scale factor used here */ - int len = (&etext - &stext + 1) / 4; - - monitor_buffer = (WORD *)calloc(len, sizeof(WORD)); - if (monitor_buffer == NULL) - { - static const char msg[] = "mcrt1: could not allocate monitor buffer\n"; - write(2, msg, sizeof(msg)-1); - _exit(-1); - } - - /* I'm not sure why the count cap at 600 -- but that is what A/UX does */ - monitor(&stext, &etext, monitor_buffer, len, 600); - - atexit(monitor_cleanup); - } - #endif /* MCRT1 */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/aux-crt2.asm gcc-3.3/gcc/config/m68k/aux-crt2.asm *** gcc-3.2.3/gcc/config/m68k/aux-crt2.asm 2001-03-03 03:32:02.000000000 +0000 --- gcc-3.3/gcc/config/m68k/aux-crt2.asm 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,42 **** - /* More startup code for A/UX */ - - #include "tconfig.h" - - #ifdef USE_BIN_AS - file "crt2.s" - - /* The init section is used to support shared libraries */ - init - global __istart - - __istart: - link %fp,&-4 - #else - .file "crt2.s" - - /* The init section is used to support shared libraries */ - .section .init, "x" - .even - .globl __istart - - __istart: - link %fp,#-4 - - #ifndef USE_COLLECT2 - /* The ctors and dtors sections are used to support COFF collection of - c++ constructors and destructors */ - .section .ctors, "d" - .even - .globl __CTOR_LIST__ - - __CTOR_LIST__: - .long -1 - - .section .dtors, "d" - .even - .globl __DTOR_LIST__ - - __DTOR_LIST__: - .long -1 - #endif /* USE_COLLECT2 */ - #endif /* USE_BIN_AS */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/aux-crtn.asm gcc-3.3/gcc/config/m68k/aux-crtn.asm *** gcc-3.2.3/gcc/config/m68k/aux-crtn.asm 2001-03-03 03:32:02.000000000 +0000 --- gcc-3.3/gcc/config/m68k/aux-crtn.asm 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,26 **** - /* More startup code for A/UX */ - - #include "tconfig.h" - - #ifdef USE_BIN_AS - file "crtn.s" - - init - - unlk %fp - rts - #else - .file "crtn.s" - - .section .init, "x" - unlk %fp - rts - - #ifndef USE_COLLECT2 - .section .ctors, "d" - .long 0 - - .section .dtors, "d" - .long 0 - #endif /* USE_COLLECT2 */ - #endif /* USE_BIN_AS */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/aux-exit.c gcc-3.3/gcc/config/m68k/aux-exit.c *** gcc-3.2.3/gcc/config/m68k/aux-exit.c 2001-11-01 14:49:32.000000000 +0000 --- gcc-3.3/gcc/config/m68k/aux-exit.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,94 **** - /* Generic atexit() - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - In addition to the permissions in the GNU General Public License, the - Free Software Foundation gives you unlimited permission to link the - compiled version of this file into combinations with other programs, - and to distribute those combinations without any restriction coming - from the use of this file. (The General Public License restrictions - do apply in other respects; for example, they cover modification of - the file, and distribution when not linked into a combine - executable.) - - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Rather than come up with some ugly hack to make mcrt1 work, it is - better to just go ahead and provide atexit(). */ - - - #include - - - void exit(int) __attribute__((noreturn)); - void _exit(int) __attribute__((noreturn)); - void _cleanup(void); - - - #define FNS_PER_BLOCK 32 - - struct atexit_fn_block - { - struct atexit_fn_block *next; - void (*fns[FNS_PER_BLOCK])(void); - short used; - }; - - - /* statically allocate the first block */ - static struct atexit_fn_block atexit_fns; - static struct atexit_fn_block *current_block = &atexit_fns; - - - int atexit(void (*fn)(void)) - { - if (current_block->used >= FNS_PER_BLOCK) - { - struct atexit_fn_block *new_block = - (struct atexit_fn_block *)malloc(sizeof(struct atexit_fn_block)); - if (new_block == NULL) - return -1; - - new_block->used = 0; - new_block->next = current_block; - current_block = new_block; - } - - current_block->fns[current_block->used++] = fn; - - return 0; - } - - - void exit(int status) - { - struct atexit_fn_block *block = current_block, *old_block; - short i; - - while (1) - { - for (i = block->used; --i >= 0 ;) - (*block->fns[i])(); - if (block == &atexit_fns) - break; - /* I know what you are thinking -- we are about to exit, why free? - Because it is friendly to memory leak detectors, that's why. */ - old_block = block; - block = block->next; - free(old_block); - } - - _exit(status); - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/auxgas.h gcc-3.3/gcc/config/m68k/auxgas.h *** gcc-3.2.3/gcc/config/m68k/auxgas.h 2001-11-19 18:30:03.000000000 +0000 --- gcc-3.3/gcc/config/m68k/auxgas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - /* Definitions for Motorola 680x0 running A/UX using GAS - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define USE_GAS - - #ifndef __ASSEMBLY__ - - #include "m68k/m68k.h" - #include "m68k/coff.h" - - #define ASM_SPEC "%{m68000:-Am68000 }%{m68030:-Am68030 }%{m68040:-Am68040 }" - - /* Output #ident as a .ident. */ - #define ASM_OUTPUT_IDENT(FILE, NAME) \ - fprintf (FILE, "\t.ident \"%s\"\n", NAME); - - #ifdef USE_COLLECT2 - /* for the sake of link-level compatibility with /bin/as version */ - #define NO_DOLLAR_IN_LABEL - #define NO_DOT_IN_LABEL - #endif - - #define ADDITIONAL_REGISTER_NAMES { {"%fp", 14}, {"%a7", 15} } - - #define ASM_MOV_INSN "movel" - - #define FUNCTION_PROFILER_SYMBOL "__mcount" - - #endif /* !__ASSEMBLY__ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/auxgld.h gcc-3.3/gcc/config/m68k/auxgld.h *** gcc-3.2.3/gcc/config/m68k/auxgld.h 1998-12-16 21:06:23.000000000 +0000 --- gcc-3.3/gcc/config/m68k/auxgld.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,29 **** - /* Definitions for Motorola 680x0 running A/UX using GLD - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define USE_GNU_LD - - #ifndef __ASSEMBLY__ - - #define LINK_SPEC \ - "%{p:-L/lib/libp -L/usr/lib/libp }%{pg:-L/lib/libp -L/usr/lib/libp }\ - %{smac:-T low.gld%s }" - - #endif /* !__ASSEMBLY__ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/a-ux.h gcc-3.3/gcc/config/m68k/a-ux.h *** gcc-3.2.3/gcc/config/m68k/a-ux.h 2001-11-01 14:49:32.000000000 +0000 --- gcc-3.3/gcc/config/m68k/a-ux.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,203 **** - /* Definitions for Motorola 680x0 running A/UX - Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This file was renamed from aux.h because of MSDOS: aux.anything - isn't usable. Sigh. */ - - /* Execution environment */ - - #undef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) /* 68020, 68881 */ - - #define CPP_PREDEFINES "-Dunix -Dm68k -DAUX -DmacII \ - -Asystem=unix -Asystem=AUX -Acpu=m68k -Amachine=m68k -Amachine=macII" - - #define CPP_SPEC \ - "%{!msoft-float:%{!ansi:-Dmc68881 }-D__HAVE_68881__ }\ - -Acpu=mc68000 -D__mc68000__ %{!ansi:-Dmc68000 }\ - %{!mc68000:%{!m68000:-Acpu=mc68020 -D__mc68020__ %{!ansi:-Dmc68020 }}}\ - %{m68030:-Acpu=mc68030 -D__mc68030__ %{!ansi:-Dmc68030 }}\ - %{m68040:-Acpu=mc68040 -D__mc68040__ %{!ansi:-Dmc68040 }}\ - %{!ansi:%{!traditional:-D__STDC__=2 }}\ - %{sbsd:-D_BSD_SOURCE -DBSD }%{ZB:-D_BSD_SOURCE -DBSD }\ - %{ssysv:-D_SYSV_SOURCE -DSYSV -DUSG }%{ZS:-D_SYSV_SOURCE -DSYSV -DUSG }\ - %{sposix:-D_POSIX_SOURCE -DPOSIX }%{ZP:-D_POSIX_SOURCE -DPOSIX }\ - %{sposix+:-D_POSIX_SOURCE -DPOSIX }\ - %{saux:-D_AUX_SOURCE }%{ZA:-D_AUX_SOURCE }\ - %{!sbsd:%{!ZB:%{!ssysv:%{!ZS:%{!sposix:%{!ZP:%{!snone:\ - -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE }}}}}}}" - - #define LIB_SPEC \ - "%{sbsd:-lbsd }%{ZB:-lbsd }\ - %{ssysv:-lsvid }%{ZS:-lsvid }\ - %{sposix:-lposix }%{ZP:-lposix }%{sposix+:-lposix }\ - %{!static:%{smac:-lmac_s -lat -lld -lmr }-lc_s }\ - %{static:%{smac:-lmac -lat -lld -lmr }-lc }" - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{pg:mcrt0.o%s }%{!pg:%{p:mcrt1.o%s }\ - %{!p:%{smac:maccrt1.o%s low.o%s }%{!smac:crt1.o%s }}}\ - crt2.o%s " - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtn.o%s " - - - /*===================================================================*/ - /* Compilation environment -- mostly */ - - /* We provide atexit(), A/UX does not have it */ - #define NEED_ATEXIT - - /* Generate calls to memcpy, memcmp and memset, as opposed to bcopy, bcmp, - and bzero */ - #define TARGET_MEM_FUNCTIONS - - /* Resize standard types */ - - #undef SIZE_TYPE - #define SIZE_TYPE "unsigned int" - - #undef PTRDIFF_TYPE - #define PTRDIFF_TYPE "int" - - #undef WCHAR_TYPE - #define WCHAR_TYPE "unsigned int" - - /* Every structure or union's size must be a multiple of 2 bytes. */ - #define STRUCTURE_SIZE_BOUNDARY 16 - - /* Bits needed by collect */ - - #define OBJECT_FORMAT_COFF - #define MY_ISCOFF(m) ((m) == M68TVMAGIC || \ - (m) == M68MAGIC || \ - (m) == MC68TVMAGIC || \ - (m) == MC68MAGIC || \ - (m) == M68NSMAGIC) - - - #ifndef USE_COLLECT2 - /* For .ctor/.dtor sections for collecting constructors */ - /* We have special start/end files for defining [cd]tor lists */ - #define CTOR_LISTS_DEFINED_EXTERNALLY - #endif - - - /*======================================================================*/ - /* Calling convention and library support changes */ - - /* Define how to generate (in the callee) the output value of a function - and how to find (in the caller) the value returned by a function. VALTYPE - is the data type of the value (as a tree). If the precise function being - called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0. - For A/UX generate the result in d0, a0, or fp0 as appropriate. */ - - #undef FUNCTION_VALUE - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \ - ? gen_rtx_REG (TYPE_MODE (VALTYPE), 16) \ - : (POINTER_TYPE_P (VALTYPE) \ - ? gen_rtx_REG (TYPE_MODE (VALTYPE), 8) \ - : gen_rtx_REG (TYPE_MODE (VALTYPE), 0))) - - #undef LIBCALL_VALUE - #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG ((MODE), ((TARGET_68881 && \ - ((MODE) == SFmode || (MODE) == DFmode)) ? 16 : 0)) - - /* 1 if N is a possible register number for a function value. - For A/UX allow d0, a0, or fp0 as return registers, for integral, - pointer, or floating types, respectively. Reject fp0 if not using a - 68881 coprocessor. */ - - #undef FUNCTION_VALUE_REGNO_P - #define FUNCTION_VALUE_REGNO_P(N) \ - ((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16)) - - /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for - more than one register. */ - - #undef NEEDS_UNTYPED_CALL - #define NEEDS_UNTYPED_CALL 1 - - /* For compatibility with the large body of existing code which does not - always properly declare external functions returning pointer types, the - A/UX convention is to copy the value returned for pointer functions - from a0 to d0 in the function epilogue, so that callers that have - neglected to properly declare the callee can still find the correct return - value. */ - - #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ - { \ - if (current_function_returns_pointer \ - && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ - asm_fprintf (FILE, "\t%s %Ra0,%Rd0\n", ASM_MOV_INSN); \ - } - - /* How to call the function profiler */ - - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - asm_fprintf (FILE, "\t%Olea %LLP%d,%Ra0\n\t%Ojbsr %s\n", \ - (LABELNO), FUNCTION_PROFILER_SYMBOL) - - /* Finalize the trampoline by flushing the insn cache */ - - #undef FINALIZE_TRAMPOLINE - #define FINALIZE_TRAMPOLINE(TRAMP) \ - emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \ - 0, VOIDmode, 2, TRAMP, Pmode, \ - plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); - - /* Clear the instruction cache from `beg' to `end'. This makes an - inline system call to SYS_sysm68k. The arguments are as follows: - - sysm68k(105, addr, scope, cache, len) - - 105 - the subfunction code to clear the cache - addr - the start address for the flush - scope - the scope of the flush (see the cpush insn) - cache - which cache to flush (see the cpush insn) - len - a factor relating to the number of flushes to perform : - len/16 lines, or len/4096 pages. - - While all this is only really relevant to 040's, the system call - will just return an error (which we ignore) on other systems. */ - - #define CLEAR_INSN_CACHE(beg, end) \ - { \ - unsigned _beg = (unsigned)(beg), _end = (unsigned)(end); \ - unsigned _len = ((_end / 16) - (_beg / 16) + 1) * 16; \ - __asm __volatile( \ - ASM_MOV_INSN " %1, %-\n\t" /* nr lines */ \ - ASM_MOV_INSN " %#3, %-\n\t" /* insn+data caches */ \ - ASM_MOV_INSN " %#1, %-\n\t" /* clear lines */ \ - ASM_MOV_INSN " %0, %-\n\t" /* beginning of buffer */ \ - ASM_MOV_INSN " %#105, %-\n\t" /* cache sub-function nr */ \ - ASM_MOV_INSN " %#0, %-\n\t" /* dummy return address */ \ - ASM_MOV_INSN " %#38, %/d0\n\t" /* system call nr */ \ - "trap %#0\n\t" \ - "add%.l %#24, %/sp" \ - : /* no outputs */ \ - : "g"(_beg), "g"(_len) \ - : "%d0"); \ - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/auxld.h gcc-3.3/gcc/config/m68k/auxld.h *** gcc-3.2.3/gcc/config/m68k/auxld.h 1998-12-16 21:06:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/auxld.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,35 **** - /* Definitions for Motorola 680x0 running A/UX using /bin/ld - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define USE_BIN_LD - - #ifndef USE_COLLECT2 - #define USE_COLLECT2 - #endif - - #ifndef __ASSEMBLY__ - - #define LINK_SPEC \ - "%{p:-L/lib/libp -L/usr/lib/libp }%{pg:-L/lib/libp -L/usr/lib/libp }\ - %{smac:low.ld%s }%{!smac:shlib.ld%s }" - - #define SWITCHES_NEED_SPACES "o" - - #endif /* !__ASSEMBLY__ */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/aux-low.gld gcc-3.3/gcc/config/m68k/aux-low.gld *** gcc-3.2.3/gcc/config/m68k/aux-low.gld 1998-12-16 21:06:19.000000000 +0000 --- gcc-3.3/gcc/config/m68k/aux-low.gld 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,38 **** - /* GLD link script for building mac-compatible executables */ - - OUTPUT_FORMAT("coff-m68k") - - SEARCH_DIR(@tooldir@/lib); - SEARCH_DIR(@libdir@); - SEARCH_DIR(/lib); - SEARCH_DIR(/usr/lib); - SEARCH_DIR(@local_prefix@/lib); - - ENTRY(_start) - - SECTIONS - { - .lowmem 0 (DSECT) : { - /usr/lib/low.o (.data) - } - .text 0x10000000 : { - *(.text) - *(.init) - *(.fini) - etext = .; - _etext = .; - } - .data ALIGN(0x40000) : { - *(.data) - *(.ctors) - *(.dtors) - edata = .; - _edata = .; - } - .bss : { - *(.bss) - *(COMMON) - end = .; - _end = .; - } - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/aux-mcount.c gcc-3.3/gcc/config/m68k/aux-mcount.c *** gcc-3.2.3/gcc/config/m68k/aux-mcount.c 2001-03-03 03:32:02.000000000 +0000 --- gcc-3.3/gcc/config/m68k/aux-mcount.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,61 **** - /* Profiling support code for A/UX - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - In addition to the permissions in the GNU General Public License, the - Free Software Foundation gives you unlimited permission to link the - compiled version of this file into combinations with other programs, - and to distribute those combinations without any restriction coming - from the use of this file. (The General Public License restrictions - do apply in other respects; for example, they cover modification of - the file, and distribution when not linked into a combine - executable.) - - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This routine is called at the beginning of functions compiled with -p - or -pg. The A/UX libraries call mcount%, but gas cannot generate - symbols with embedded percent signs. Previous ports of GCC to A/UX - have done things like (1) assemble a stub routine with the native - assembler, or (2) assemble a stub routine with gas and edit the object - file. This solution has the advantage that it can interoperate with - the A/UX version and can be used in an eventual port of glibc to A/UX. */ - - #ifndef __GNUC__ - #error This file uses GNU C extensions - #endif - - #include "tconfig.h" - #include - - struct cnt *_countbase; - - #ifdef FUNCTION_PROFILER_SYMBOL - void __mcount() __asm__(FUNCTION_PROFILER_SYMBOL); - #endif - - void __mcount() - { - register long **pfncnt __asm__("%a0"); - register long *fncnt = *pfncnt; - - if (!fncnt) - { - struct cnt *newcnt = _countbase++; - newcnt->fnpc = (char *)__builtin_return_address(0); - *pfncnt = fncnt = &newcnt->mcnt; - } - *fncnt += 1; - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/ccur-GAS.h gcc-3.3/gcc/config/m68k/ccur-GAS.h *** gcc-3.2.3/gcc/config/m68k/ccur-GAS.h 2001-11-01 14:49:32.000000000 +0000 --- gcc-3.3/gcc/config/m68k/ccur-GAS.h 2002-08-29 21:40:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 93,99 **** && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Override parts of m68k.h */ --- 93,99 ---- && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Override parts of m68k.h */ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/coff.h gcc-3.3/gcc/config/m68k/coff.h *** gcc-3.2.3/gcc/config/m68k/coff.h 2003-01-30 16:57:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/coff.h 2003-01-28 22:18:15.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,30 **** /* Generate sdb debugging information. */ ! #define SDB_DEBUGGING_INFO /* Output DBX (stabs) debugging information if using -gstabs. */ --- 24,30 ---- /* Generate sdb debugging information. */ ! #define SDB_DEBUGGING_INFO 1 /* Output DBX (stabs) debugging information if using -gstabs. */ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/crds.h gcc-3.3/gcc/config/m68k/crds.h *** gcc-3.2.3/gcc/config/m68k/crds.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/crds.h 2002-07-17 21:31:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 68,77 **** #undef CC1_SPEC #define CC1_SPEC "%{O2:-fstrength-reduce}" - /* cpp has to support a #sccs directive for the /usr/include files */ - - #define SCCS_DIRECTIVE - /* Make output for SDB. */ /* #define SDB_DEBUGGING_INFO UNOS casm has no debugging :-( */ --- 68,73 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/ctix.h gcc-3.3/gcc/config/m68k/ctix.h *** gcc-3.2.3/gcc/config/m68k/ctix.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/m68k/ctix.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,48 **** - /* Definitions of target machine for GNU compiler. - Convergent Technologies MiniFrame version, - using GAS and binutils with COFF encapsulation. - - Written by Ronald Cole - - Because the MiniFrame's C compiler is so completely lobotomized, - bootstrapping this is damn near impossible! - Write to me for information on obtaining the binaries... - - bug reports to csusac!unify!rjc@ucdavis.edu - - Copyright (C) 1990 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "m68k/3b1g.h" - - /* Names to predefine in the preprocessor for this target machine. */ - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dmc68000 -Dmc68k -Dunix -Dctix -Asystem=unix -Acpu=m68k -Amachine=m68k" - - /* Where to look for robotussinized startfiles. */ - #undef STANDARD_STARTFILE_PREFIX - #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/gnu/" - - /* Generate calls to the MiniFrame's library (for speed). */ - #define DIVSI3_LIBCALL "ldiv" - #define UDIVSI3_LIBCALL "uldiv" - #define MODSI3_LIBCALL "lrem" - #define UMODSI3_LIBCALL "ulrem" - #define MULSI3_LIBCALL "lmul" - #define UMULSI3_LIBCALL "ulmul" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/dpx2cdbx.h gcc-3.3/gcc/config/m68k/dpx2cdbx.h *** gcc-3.2.3/gcc/config/m68k/dpx2cdbx.h 1998-12-16 21:06:31.000000000 +0000 --- gcc-3.3/gcc/config/m68k/dpx2cdbx.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,31 **** - /* Definitions for Bull dpx/2 200 and 300 with gas - using dbx-in-coff encapsulation. - Copyright (C) 1992, 1994 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #include "m68k/dpx2g.h" - - /* Use STABS debugging information inside COFF. */ - #ifndef DBX_DEBUGGING_INFO - #define DBX_DEBUGGING_INFO - #endif - - /* Let sbd debugging be the default. */ - #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/dpx2g.h gcc-3.3/gcc/config/m68k/dpx2g.h *** gcc-3.2.3/gcc/config/m68k/dpx2g.h 2001-12-17 15:05:34.000000000 +0000 --- gcc-3.3/gcc/config/m68k/dpx2g.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,18 **** - /* - * dpx2g.h - Bull DPX/2 200 and 300 systems (m68k, SysVr3) with gas - */ - - #define USE_GAS - #include "m68k/dpx2.h" - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\ - huge.o%s" - - /* Gas understands dollars in labels. */ - #undef NO_DOLLAR_IN_LABEL - /* GAS does not understand .ident so don't output anything for #ident. */ - #undef ASM_OUTPUT_IDENT - - /* end of dpx2g.h */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/dpx2.h gcc-3.3/gcc/config/m68k/dpx2.h *** gcc-3.2.3/gcc/config/m68k/dpx2.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/dpx2.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,495 **** - /* Definitions of target machine for GNU compiler. - Bull DPX/2 200 and 300 systems (m68k, SysVr3). - Copyright (C) 1987, 1993, 1994, 1995, 1996, 1999, 2000 Free Software Foundation, Inc. - Contributed by Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #ifndef USE_GAS - #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ - #define SGS_NO_LI /* Suppress jump table label usage */ - #define VERSADOS /* This is the name of the assembler we have */ - #endif - - #include "m68k/m68k.h" - #undef SELECT_RTX_SECTION - #include "svr3.h" - - #undef INT_OP_GROUP - #define INT_OP_GROUP INT_OP_DC - - /* We use collect2 instead of ctors_section constructors. */ - #undef INIT_SECTION_ASM_OP - #undef FINI_SECTION_ASM_OP - #undef DTORS_SECTION_ASM_OP - #undef DO_GLOBAL_CTORS_BODY - - /* Remove handling for a separate constant data section. We put - constant data in text_section, which is the default. */ - #undef SELECT_SECTION - #undef SELECT_RTX_SECTION - #undef EXTRA_SECTIONS - #undef EXTRA_SECTION_FUNCTIONS - #undef CONST_SECTION_ASM_OP - #undef READONLY_DATA_SECTION - - #define DPX2 - - /* See m68k.h. 7 means 68020 with 68881. - * We really have 68030 and 68882, - * but this will get us going. - */ - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) - #endif - - #define OBJECT_FORMAT_COFF - - #ifdef CPP_PREDEFINES - #undef CPP_PREDEFINES - #endif - /* - * define all the things the compiler should - */ - #ifdef ncl_mr - # define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_mr=1 -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k" - #else - # ifdef ncl_el - # define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_el -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k" - # else - # define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k" - # endif - #endif - - #undef CPP_SPEC - /* - * you can't get a DPX/2 without a 68882 but allow it - * to be ignored... - */ - # define __HAVE_68881__ 1 - # define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ }" - - #undef DO_GLOBAL_CTORS_BODY /* don't use svr3.h version */ - #undef DO_GLOBAL_DTORS_BODY - - #ifndef USE_GAS - /* - * handle the native MOTOROLA VERSAdos assembler. - */ - - /* See m68k.h. 3 means 68020 with 68881 and no bitfield - * bitfield instructions do not seem to work a clean way. - */ - #undef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_68881|MASK_68020) - - /* The native assembler doesn't support fmovecr. */ - #define NO_ASM_FMOVECR - - #undef TEXT_SECTION_ASM_OP - #define TEXT_SECTION_ASM_OP "\tsection 10" - #undef DATA_SECTION_ASM_OP - #define DATA_SECTION_ASM_OP "\tsection 15" - #define BSS_SECTION_ASM_OP "\tsection 14" - - - /* Don't try using XFmode. */ - #undef LONG_DOUBLE_TYPE_SIZE - #define LONG_DOUBLE_TYPE_SIZE 64 - - /* Define if you don't want extended real, but do want to use the - software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - - #undef ASM_OUTPUT_SOURCE_FILENAME - #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NA) \ - do { fprintf ((FILE), "\t.file\t'%s'\n", (NA)); } while (0) - - /* - * we don't seem to support any of: - * .globl - * .even - * .align - * .ascii - */ - #undef ASM_OUTPUT_SKIP - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\tdcb.b %u,0\n", (SIZE)) - - #undef GLOBAL_ASM_OP - #define GLOBAL_ASM_OP "\txdef\t" - - #undef ASM_OUTPUT_ALIGN - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG) >= 1) \ - fprintf (FILE, "\tds.w 0\n"); - - - #define STRING_LIMIT (0) - #undef ASM_APP_ON - #define ASM_APP_ON "" - #undef ASM_APP_OFF - #define ASM_APP_OFF "" - /* - * dc.b 'hello, world!' - * dc.b 10,0 - * is how we have to output "hello, world!\n" - */ - #undef ASM_OUTPUT_ASCII - #define ASM_OUTPUT_ASCII(asm_out_file, p, thissize) \ - do { register int i, c, f=0, len=0; \ - for (i = 0; i < thissize; i++) { \ - c = p[i]; \ - if (c == '\'' || c < ' ' || c > 127) { \ - switch(f) { \ - case 0: /* need to output dc.b etc */ \ - fprintf(asm_out_file, "\tdc.b %d", c); \ - f=1; \ - break; \ - case 1: \ - fprintf(asm_out_file, ",%d", c); \ - break; \ - default: \ - /* close a string */ \ - fprintf(asm_out_file, "'\n\tdc.b %d", c); \ - f=1; \ - break; \ - } \ - } else { \ - switch(f) { \ - case 0: \ - fprintf(asm_out_file, "\tdc.b '%c", c); \ - f=2; \ - break; \ - case 2: \ - if (len >= 79) { \ - fprintf(asm_out_file, "'\n\tdc.b '%c", c); \ - len = 0; } \ - else \ - fprintf(asm_out_file, "%c", c); \ - break; \ - default: \ - len = 0; \ - fprintf(asm_out_file, "\n\tdc.b '%c", c); \ - f=2; \ - break; \ - } \ - } \ - len++; \ - } \ - if (f==2) \ - putc('\'', asm_out_file); \ - putc('\n', asm_out_file); } while (0) - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #undef ASM_OUTPUT_REG_PUSH - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tmove.l %s,-(sp)\n", reg_names[REGNO]) - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #undef ASM_OUTPUT_REG_POP - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tmove.l (sp)+,%s\n", reg_names[REGNO]) - - - #define PUT_SDB_FUNCTION_START(LINE) \ - fprintf (asm_out_file, \ - "\t.def\t.bf%s\t.val\t*%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_FUNCTION_END(LINE) \ - fprintf (asm_out_file, \ - "\t.def\t.ef%s\t.val\t*%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_BLOCK_START(LINE) \ - fprintf (asm_out_file, \ - "\t.def\t.bb%s\t.val\t*%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_BLOCK_END(LINE) \ - fprintf (asm_out_file, \ - "\t.def\t.eb%s\t.val\t*%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \ - SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) - - #define PUT_SDB_EPILOGUE_END(NAME) - - /* Output type in decimal not in octal as done in sdbout.c */ - #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\t.type\t0%d%s", a, SDB_DELIM) - - /* Translate Motorola opcodes such as `jbeq' - into VERSAdos opcodes such as `beq'. - Change `fbeq' to `fbseq', `fbne' to `fbsneq'. - */ - - #undef ASM_OUTPUT_OPCODE - #define ASM_OUTPUT_OPCODE(FILE, PTR) \ - { if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \ - { ++(PTR); \ - while (*(PTR) != ' ') \ - { putc (*(PTR), (FILE)); ++(PTR); } \ - } \ - else if ((PTR)[0] == 'f') \ - { \ - if (!strncmp ((PTR), "fbeq", 4)) \ - { fprintf ((FILE), "fbseq"); (PTR) += 4; } \ - else if (!strncmp ((PTR), "fbne", 4)) \ - { fprintf ((FILE), "fbsneq"); (PTR) += 4; } \ - } \ - else if ((PTR)[0] == 'b' && (PTR)[1] == 'f') \ - { \ - char *s; \ - if ((s = (char*)strchr ((PTR), '{'))) \ - while (*s != '}') { \ - if (*s == 'b') \ - /* hack, I replace it with R ie nothing */ \ - *s = '0'; \ - s++; } \ - } \ - } - - /* This is how to output an element of a case-vector that is absolute. - (The 68000 does not use such vectors, - but we must define this macro anyway.) */ - #undef ASM_OUTPUT_ADDR_VEC_ELT - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - asm_fprintf (FILE, "\tdc.l %LL%d\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. */ - #undef ASM_OUTPUT_ADDR_DIFF_ELT - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - asm_fprintf (FILE, "\tdc.w %LL%d-%LL%d\n", VALUE, REL) - - /* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to - keep switch tables in the text section. */ - #define JUMP_TABLES_IN_TEXT_SECTION 1 - - /* Output a float value (represented as a C double) as an immediate operand. - This macro is a 68k-specific macro. */ - #undef ASM_OUTPUT_FLOAT_OPERAND - #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ - do { \ - if (CODE == 'f') \ - { \ - char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \ - asm_fprintf ((FILE), "%I%s", dstr); \ - } \ - else \ - { \ - long l; \ - REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I$%x", (int) l); \ - else \ - asm_fprintf ((FILE), "%I$%lx", l); \ - } \ - } while (0) - - /* Output a double value (represented as a C double) as an immediate operand. - This macro is a 68k-specific macro. */ - #undef ASM_OUTPUT_DOUBLE_OPERAND - #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ - do { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ - asm_fprintf (FILE, "%I%s", dstr); \ - } while (0) - - /* Note, long double immediate operands are not actually - generated by m68k.md. */ - #undef ASM_OUTPUT_LONG_DOUBLE_OPERAND - #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \ - do { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ - asm_fprintf (FILE, "%I%s", dstr); \ - } while (0) - - #undef ASM_OUTPUT_COMMON - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\t.comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - - #undef ASM_OUTPUT_LOCAL - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - do { \ - int align = exact_log2 (ROUNDED); \ - /*fprintf ((FILE), "\tsection 14\n"); */ \ - data_section (); \ - ASM_OUTPUT_ALIGN ((FILE), align) \ - ASM_OUTPUT_LABEL ((FILE), (NAME)); \ - fprintf ((FILE), "\tdcb.b %u,0\n", (ROUNDED)); \ - /* fprintf ((FILE), "\tsection 10\n"); */ \ - } while (0) - - #undef PRINT_OPERAND_ADDRESS - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - { register rtx reg1, reg2, breg, ireg; \ - register rtx addr = ADDR; \ - rtx offset; \ - switch (GET_CODE (addr)) \ - { \ - case REG: \ - fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \ - break; \ - case PRE_DEC: \ - fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \ - break; \ - case POST_INC: \ - fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \ - break; \ - case PLUS: \ - reg1 = 0; reg2 = 0; \ - ireg = 0; breg = 0; \ - offset = 0; \ - if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) \ - { \ - offset = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) \ - { \ - offset = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - if (GET_CODE (addr) != PLUS) ; \ - else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) \ - { \ - reg1 = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) \ - { \ - reg1 = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - else if (GET_CODE (XEXP (addr, 0)) == MULT) \ - { \ - reg1 = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (GET_CODE (XEXP (addr, 1)) == MULT) \ - { \ - reg1 = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - else if (GET_CODE (XEXP (addr, 0)) == REG) \ - { \ - reg1 = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (GET_CODE (XEXP (addr, 1)) == REG) \ - { \ - reg1 = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT \ - || GET_CODE (addr) == SIGN_EXTEND) \ - { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; } \ - /* for OLD_INDEXING \ - else if (GET_CODE (addr) == PLUS) \ - { \ - if (GET_CODE (XEXP (addr, 0)) == REG) \ - { \ - reg2 = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (GET_CODE (XEXP (addr, 1)) == REG) \ - { \ - reg2 = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - } \ - */ \ - if (offset != 0) { if (addr != 0) abort (); addr = offset; } \ - if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND \ - || GET_CODE (reg1) == MULT)) \ - || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) \ - { breg = reg2; ireg = reg1; } \ - else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) \ - { breg = reg1; ireg = reg2; } \ - if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF) \ - { int scale = 1; \ - if (GET_CODE (ireg) == MULT) \ - { scale = INTVAL (XEXP (ireg, 1)); \ - ireg = XEXP (ireg, 0); } \ - if (GET_CODE (ireg) == SIGN_EXTEND) \ - fprintf (FILE, "(.L%d,pc,%s.w", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (XEXP (ireg, 0))]); \ - else \ - fprintf (FILE, "(.L%d,pc,%s.l", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (ireg)]); \ - if (scale != 1) fprintf (FILE, "*%d", scale); \ - putc (')', FILE); \ - break; } \ - if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF \ - && ! (flag_pic && breg == pic_offset_table_rtx)) \ - { \ - fprintf (FILE, "(.L%d,pc,%s.l", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (breg)]); \ - putc (')', FILE); \ - break; } \ - if (ireg != 0 || breg != 0) \ - { int scale = 1; \ - if (breg == 0) \ - abort (); \ - putc ('(', FILE); \ - if (addr != 0) \ - { \ - output_addr_const (FILE, addr); \ - putc (',', FILE); \ - } \ - fprintf (FILE, "%s", reg_names[REGNO (breg)]); \ - if (ireg != 0) \ - putc (',', FILE); \ - if (ireg != 0 && GET_CODE (ireg) == MULT) \ - { scale = INTVAL (XEXP (ireg, 1)); \ - ireg = XEXP (ireg, 0); } \ - if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ - fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \ - else if (ireg != 0) \ - fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \ - if (scale != 1) fprintf (FILE, "*%d", scale); \ - putc (')', FILE); \ - break; \ - } \ - else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF) \ - { fprintf (FILE, "(.L%d,pc,%s.w)", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (reg1)]); \ - break; } \ - default: \ - if (GET_CODE (addr) == CONST_INT \ - && INTVAL (addr) < 0x8000 \ - && INTVAL (addr) >= -0x8000) \ - fprintf (FILE, "%d.w", INTVAL (addr)); \ - else \ - output_addr_const (FILE, addr); \ - }} - - - #endif /* ! use gas */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/dpx2.ifile gcc-3.3/gcc/config/m68k/dpx2.ifile *** gcc-3.2.3/gcc/config/m68k/dpx2.ifile 1998-12-16 21:06:30.000000000 +0000 --- gcc-3.3/gcc/config/m68k/dpx2.ifile 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,55 **** - /* - * dpx2.ifile - for collectless G++ on Bull DPX/2 - * - * Peter Schauer - * - * Install this file as $prefix/gcc-lib/dpx2/VERSION/gcc.ifile - * and comment out the lines referring to COLLECT at the top - * of Makefile before building GCC. - * - * This file has been tested with gcc-2.2.2 on a DPX/2 340 - * running BOS 2.00.45, if it doesn't work for you, stick - * with collect. - * --sjg - */ - /* - * Ifile to link with memory configured at 0. - * BLOCK to an offset that leaves room for many headers ( the value - * here allows for a file header, an outheader, and up to 11 section - * headers on most systems. - * BIND to an address that excludes page 0 from being mapped. The value - * used for BLOCK should be or'd into this value. Here I'm setting BLOCK - * to 0x200 and BIND to ( 0x100000 | value_used_for(BLOCK) ) - * If you are using shared libraries, watch that you don't overlap the - * address ranges assigned for shared libs. - * - * GROUP BIND to a location in the next segment. Here, the only value - * that you should change (I think) is that within NEXT, which I've set - * to my hardware segment size. You can always use a larger size, but not - * a smaller one. - */ - SECTIONS - { - .text BIND(0x100200) BLOCK (0x200) : - { - /* plenty of room for headers */ - *(.init) - *(.text) - _vfork = _fork; /* I got tired of editing peoples sloppy code */ - *(.fini) - } - GROUP BIND( NEXT(0x100000) + (ADDR(.text) + (SIZEOF(.text)) % 0x1000)): - { - .data : { - ___CTOR_LIST__ = . ; - . += 4 ; /* leading NULL */ - *(.ctor) - . += 4 ; /* trailing NULL */ - ___DTOR_LIST__ = . ; - . += 4 ; /* leading NULL */ - *(.dtor) - . += 4 ; /* trailing NULL */ - } - .bss : { } - } - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/hp2bsd.h gcc-3.3/gcc/config/m68k/hp2bsd.h *** gcc-3.2.3/gcc/config/m68k/hp2bsd.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/m68k/hp2bsd.h 2002-08-29 21:40:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 59,65 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Define subroutines to call to handle multiply, divide, and remainder. These routines are built into the c-library on the hp200. --- 59,65 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Define subroutines to call to handle multiply, divide, and remainder. These routines are built into the c-library on the hp200. diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/hp310g.h gcc-3.3/gcc/config/m68k/hp310g.h *** gcc-3.2.3/gcc/config/m68k/hp310g.h 1998-12-16 21:06:37.000000000 +0000 --- gcc-3.3/gcc/config/m68k/hp310g.h 2002-08-29 21:40:13.000000000 +0000 *************** *** 5,11 **** /* This wants DBX format. */ ! #define DBX_DEBUGGING_INFO #define USE_GAS --- 5,11 ---- /* This wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 #define USE_GAS diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/hp310.h gcc-3.3/gcc/config/m68k/hp310.h *** gcc-3.2.3/gcc/config/m68k/hp310.h 2001-11-01 14:49:32.000000000 +0000 --- gcc-3.3/gcc/config/m68k/hp310.h 2002-02-27 18:47:35.000000000 +0000 *************** *** 19,34 **** #ifdef HPUX_ASM #define CPP_SPEC "-D__HPUX_ASM__ %{m68881: -D__HAVE_68881__}\ ! %{m68020: -Dmc68020}%{mc68020: -Dmc68020}\ ! %{!traditional:-D_INCLUDE__STDC__}" #define ASM_SPEC "%{!m68020:%{!mc68020:+X}}" #else /* not HPUX_ASM */ #define CPP_SPEC "%{m68881: -D__HAVE_68881__}\ ! %{m68020: -Dmc68020}%{mc68020: -Dmc68020}\ ! %{!traditional:-D_INCLUDE__STDC__}" #define ASM_SPEC \ "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}" --- 19,32 ---- #ifdef HPUX_ASM #define CPP_SPEC "-D__HPUX_ASM__ %{m68881: -D__HAVE_68881__}\ ! %{m68020: -Dmc68020}%{mc68020: -Dmc68020} -D_INCLUDE__STDC__" #define ASM_SPEC "%{!m68020:%{!mc68020:+X}}" #else /* not HPUX_ASM */ #define CPP_SPEC "%{m68881: -D__HAVE_68881__}\ ! %{m68020: -Dmc68020}%{mc68020: -Dmc68020} -D_INCLUDE__STDC__" #define ASM_SPEC \ "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}" diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/hp320g.h gcc-3.3/gcc/config/m68k/hp320g.h *** gcc-3.2.3/gcc/config/m68k/hp320g.h 1998-12-16 21:06:39.000000000 +0000 --- gcc-3.3/gcc/config/m68k/hp320g.h 2002-08-29 21:40:13.000000000 +0000 *************** *** 5,11 **** /* This wants DBX format. */ ! #define DBX_DEBUGGING_INFO #define USE_GAS --- 5,11 ---- /* This wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 #define USE_GAS diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/hp320.h gcc-3.3/gcc/config/m68k/hp320.h *** gcc-3.2.3/gcc/config/m68k/hp320.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/hp320.h 2002-10-16 00:40:33.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. HP-UX 68000/68020 version. ! Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. HP-UX 68000/68020 version. ! Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 164,170 **** #undef ASM_APP_OFF #undef TEXT_SECTION_ASM_OP #undef DATA_SECTION_ASM_OP ! #undef READONLY_DATA_SECTION #undef ASM_OUTPUT_ADDR_VEC_ELT #undef ASM_OUTPUT_ADDR_DIFF_ELT #undef ASM_OUTPUT_ALIGN --- 164,170 ---- #undef ASM_APP_OFF #undef TEXT_SECTION_ASM_OP #undef DATA_SECTION_ASM_OP ! #undef READONLY_DATA_SECTION_ASM_OP #undef ASM_OUTPUT_ADDR_VEC_ELT #undef ASM_OUTPUT_ADDR_DIFF_ELT #undef ASM_OUTPUT_ALIGN *************** do { \ *** 300,306 **** if (CODE == 'f') \ { \ char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \ fprintf ((FILE), "&0f%s", dstr); \ } \ else \ --- 300,306 ---- if (CODE == 'f') \ { \ char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 9, 0); \ fprintf ((FILE), "&0f%s", dstr); \ } \ else \ *************** do { \ *** 317,323 **** #undef ASM_OUTPUT_DOUBLE_OPERAND #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ fprintf (FILE, "&0f%s", dstr); \ } while (0) --- 317,323 ---- #undef ASM_OUTPUT_DOUBLE_OPERAND #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1); \ fprintf (FILE, "&0f%s", dstr); \ } while (0) *************** do { \ *** 326,332 **** #undef ASM_OUTPUT_LONG_DOUBLE_OPERAND #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ fprintf (FILE, "&0f%s", dstr); \ } while (0) --- 326,332 ---- #undef ASM_OUTPUT_LONG_DOUBLE_OPERAND #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1); \ fprintf (FILE, "&0f%s", dstr); \ } while (0) *************** do { \ *** 351,365 **** { REAL_VALUE_TYPE r; long l; \ REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ PRINT_OPERAND_FLOAT (CODE, FILE, r, l); } \ ! else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ ! { REAL_VALUE_TYPE r; char dstr[30]; \ ! REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ ! REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr); \ ! fprintf (FILE, "&0f%s", dstr); } \ ! else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \ ! { REAL_VALUE_TYPE r; char dstr[30]; \ ! REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ ! REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr); \ fprintf (FILE, "&0f%s", dstr); } \ else { putc ('&', FILE); output_addr_const (FILE, X); }} #endif --- 351,361 ---- { REAL_VALUE_TYPE r; long l; \ REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ PRINT_OPERAND_FLOAT (CODE, FILE, r, l); } \ ! else if (GET_CODE (X) == CONST_DOUBLE \ ! && (GET_MODE (X) == DFmode || GET_MODE (X) == XFmode)) \ ! { char dstr[30]; \ ! real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X), \ ! sizeof (dstr), 0, 1); \ fprintf (FILE, "&0f%s", dstr); } \ else { putc ('&', FILE); output_addr_const (FILE, X); }} #endif diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/hp3bsd44.h gcc-3.3/gcc/config/m68k/hp3bsd44.h *** gcc-3.2.3/gcc/config/m68k/hp3bsd44.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/m68k/hp3bsd44.h 2002-08-29 21:40:13.000000000 +0000 *************** *** 32,38 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Do not break .stabs pseudos into continuations. */ --- 32,38 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Do not break .stabs pseudos into continuations. */ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/hp3bsd.h gcc-3.3/gcc/config/m68k/hp3bsd.h *** gcc-3.2.3/gcc/config/m68k/hp3bsd.h 2000-11-02 23:29:10.000000000 +0000 --- gcc-3.3/gcc/config/m68k/hp3bsd.h 2002-08-29 21:40:13.000000000 +0000 *************** *** 23,29 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Do not break .stabs pseudos into continuations. */ --- 23,29 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Do not break .stabs pseudos into continuations. */ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/isi.h gcc-3.3/gcc/config/m68k/isi.h *** gcc-3.2.3/gcc/config/m68k/isi.h 2001-11-01 14:49:32.000000000 +0000 --- gcc-3.3/gcc/config/m68k/isi.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,91 **** - /* Definitions of target machine for GNU compiler. ISI 68000/68020 version. - Intended only for use with GAS, and not ISI's assembler, which is buggy - Copyright (C) 1988, 1996, 1998, 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "m68k/m68k.h" - - /* See m68k.h. 7 means 68020 with 68881. */ - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) - #endif - - #if TARGET_DEFAULT & MASK_68881 - /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. - This will control the use of inline 68881 insns in certain macros. */ - - #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" - - /* If the 68881 is used, link must load libmc.a before libc.a. */ - - #define LIB_SPEC "%{!msoft-float:%{!p:%{!pg:-lmc}}%{p:-lmc_p}%{pg:-lmc_p}} \ - %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}" - - #else - /* Define __HAVE_68881__ in preprocessor if -m68881 is specified. - This will control the use of inline 68881 insns in certain macros. */ - - #define CPP_SPEC "%{m68881:-D__HAVE_68881__}" - - /* If the 68881 is used, link must load libmc.a instead of libc.a */ - - #define LIB_SPEC "%{m68881:%{!p:%{!pg:-lmc}}%{p:-lmc_p}%{pg:-lmc_p}} \ - %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}" - #endif - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dunix -Dmc68000 -Dis68k -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - - /* This is BSD, so it wants DBX format. */ - - #define DBX_DEBUGGING_INFO - - /* Override parts of m68k.h to fit the ISI 68k machine. */ - - #undef FUNCTION_VALUE - #undef LIBCALL_VALUE - #undef FUNCTION_VALUE_REGNO_P - #undef NEEDS_UNTYPED_CALL - #undef ASM_FILE_START - - /* Every structure or union's size must be a multiple of 2 bytes. */ - - #define STRUCTURE_SIZE_BOUNDARY 16 - - /* If TARGET_68881, return SF and DF values in f0 instead of d0. */ - - #define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE)) - - #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG ((MODE), ((TARGET_68881 && ((MODE) == SFmode || (MODE) == DFmode)) ? 16 : 0)) - - /* 1 if N is a possible register number for a function value. - D0 may be used, and F0 as well if -m68881 is specified. */ - - #define FUNCTION_VALUE_REGNO_P(N) \ - ((N) == 0 || (TARGET_68881 && (N) == 16)) - - /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for - more than one register. */ - - #define NEEDS_UNTYPED_CALL 1 - - /* Also output something to cause the correct _doprnt to be loaded. */ - #define ASM_FILE_START(FILE) fprintf (FILE, "#NO_APP\n%s\n", TARGET_68881 ? ".globl fltused" : "") --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/isi-nfp.h gcc-3.3/gcc/config/m68k/isi-nfp.h *** gcc-3.2.3/gcc/config/m68k/isi-nfp.h 1998-12-16 21:06:43.000000000 +0000 --- gcc-3.3/gcc/config/m68k/isi-nfp.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,9 **** - /* Define target machine as an ISI 68000/68020 with no 68881. */ - - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68020) - - #include "m68k/isi.h" - - /* Don't try using XFmode. */ - #undef LONG_DOUBLE_TYPE_SIZE - #define LONG_DOUBLE_TYPE_SIZE 64 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/linux-aout.h gcc-3.3/gcc/config/m68k/linux-aout.h *** gcc-3.2.3/gcc/config/m68k/linux-aout.h 2002-04-15 20:27:31.000000000 +0000 --- gcc-3.3/gcc/config/m68k/linux-aout.h 2002-08-29 21:40:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,30 **** /* 68020 with 68881 */ #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) ! #define DBX_DEBUGGING_INFO #define ASM_COMMENT_START "|" --- 24,30 ---- /* 68020 with 68881 */ #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) ! #define DBX_DEBUGGING_INFO 1 #define ASM_COMMENT_START "|" *************** Boston, MA 02111-1307, USA. */ *** 73,78 **** /* Don't default to pcc-struct-return, because gcc is the only compiler. */ #undef PCC_STATIC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 0 - - /* Allow folding division by zero. */ - #define REAL_INFINITY --- 73,75 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/linux.h gcc-3.3/gcc/config/m68k/linux.h *** gcc-3.2.3/gcc/config/m68k/linux.h 2003-01-30 16:57:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/linux.h 2003-01-28 22:18:15.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 252,260 **** #define DBX_CONTIN_LENGTH 0 - /* Allow folding division by zero. */ - #define REAL_INFINITY - /* 1 if N is a possible register number for a function value. For m68k/SVR4 allow d0, a0, or fp0 as return registers, for integral, pointer, or floating types, respectively. Reject fp0 if not using --- 252,257 ---- *************** do { \ *** 323,337 **** || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \ || PCREL_GENERAL_OPERAND_OK) - /* Turn off function cse if we are doing PIC. We always want function - call to be done as `bsr foo@PLTPC', so it will force the assembler - to create the PLT entry for `foo'. Doing function cse will cause - the address of `foo' to be loaded into a register, which is exactly - what we want to avoid when we are doing PIC on svr4 m68k. */ - #undef SUBTARGET_OVERRIDE_OPTIONS - #define SUBTARGET_OVERRIDE_OPTIONS \ - if (flag_pic) flag_no_function_cse = 1; - /* For m68k SVR4, structures are returned using the reentrant technique. */ #undef PCC_STATIC_STRUCT_RETURN --- 320,325 ---- *************** do { \ *** 371,398 **** : "d" (_beg), "d" (_len) \ : "%d0", "%d2", "%d3"); \ } - - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - do { \ - if (DELTA > 0 && DELTA <= 8) \ - asm_fprintf (FILE, "\taddq.l %I%d,4(%Rsp)\n", DELTA); \ - else if (DELTA < 0 && DELTA >= -8) \ - asm_fprintf (FILE, "\tsubq.l %I%d,4(%Rsp)\n", -DELTA); \ - else \ - asm_fprintf (FILE, "\tadd.l %I%d,4(%Rsp)\n", DELTA); \ - \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tbra.l "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "@PLTPC\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tjmp "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "\n"); \ - } \ - } while (0) --- 359,361 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/lynx.h gcc-3.3/gcc/config/m68k/lynx.h *** gcc-3.2.3/gcc/config/m68k/lynx.h 2001-12-17 15:05:34.000000000 +0000 --- gcc-3.3/gcc/config/m68k/lynx.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,74 **** - /* Definitions for Motorola 680x0 running LynxOS. - Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000 - Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include - #include - - #undef CTORS_SECTION_ASM_OP - #undef DTORS_SECTION_ASM_OP - #undef ASM_OUTPUT_DESTRUCTOR - #undef SELECT_RTX_SECTION - - #define BSS_SECTION_ASM_OP "\t.bss" - - #include - - /* See m68k.h. 7 means 68020 with 68881. */ - - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) - #endif - - /* Names to predefine in the preprocessor for this target machine. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -Dmc68000 -DM68K -DLynx -DIBITS32 -Asystem=unix -Asystem=lynx -Acpu=m68k -Amachine=m68k" - - /* Every structure or union's size must be a multiple of 2 bytes. */ - - #define STRUCTURE_SIZE_BOUNDARY 16 - - /* Lynx uses d2 and d3 as scratch registers. */ - #undef CALL_USED_REGISTERS - #define CALL_USED_REGISTERS \ - {1, 1, 1, 1, 0, 0, 0, 0, \ - 1, 1, 0, 0, 0, 0, 0, 1, \ - 1, 1, 0, 0, 0, 0, 0, 0 } - - /* Return floating point values in a fp register. This make fp code a - little bit faster. It also makes -msoft-float code incompatible with - -m68881 code, so people have to be careful not to mix the two. */ - #undef FUNCTION_VALUE - #define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE)) - - #undef LIBCALL_VALUE - #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG ((MODE), \ - ((TARGET_68881 \ - && ((MODE) == SFmode || (MODE) == DFmode \ - || (MODE) == XFmode)) \ - ? 16 : 0)) - - #undef FUNCTION_VALUE_REGNO_P - #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (TARGET_68881 && (N) == 16)) - - #undef NEEDS_UNTYPED_CALL - #define NEEDS_UNTYPED_CALL 1 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/lynx-ng.h gcc-3.3/gcc/config/m68k/lynx-ng.h *** gcc-3.2.3/gcc/config/m68k/lynx-ng.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m68k/lynx-ng.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,43 **** - /* Definitions for Motorola 680x0 running LynxOS, using Lynx's old as and ld. - Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include - #include - #include - - /* See m68k.h. 7 means 68020 with 68881. */ - - #ifndef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) - #endif - - /* Names to predefine in the preprocessor for this target machine. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -Dmc68000 -DM68K -DLynx -DIBITS32 -Asystem=unix -Asystem=lynx -Acpu=m68k -Amachine=m68k" - - /* Provide required defaults for linker switches. */ - - #undef LINK_SPEC - #define LINK_SPEC "-P1000 %{msystem-v:-V} %{mcoff:-k}" - - /* Every structure or union's size must be a multiple of 2 bytes. */ - - #define STRUCTURE_SIZE_BOUNDARY 16 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/m68k-aout.h gcc-3.3/gcc/config/m68k/m68k-aout.h *** gcc-3.2.3/gcc/config/m68k/m68k-aout.h 1998-12-16 21:06:52.000000000 +0000 --- gcc-3.3/gcc/config/m68k/m68k-aout.h 2002-08-29 21:40:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 25,31 **** #include "m68k/m68kemb.h" #include "aoutos.h" ! #define DBX_DEBUGGING_INFO #undef SDB_DEBUGGING_INFO /* If defined, a C expression whose value is a string containing the --- 25,31 ---- #include "m68k/m68kemb.h" #include "aoutos.h" ! #define DBX_DEBUGGING_INFO 1 #undef SDB_DEBUGGING_INFO /* If defined, a C expression whose value is a string containing the diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/m68k.c gcc-3.3/gcc/config/m68k/m68k.c *** gcc-3.2.3/gcc/config/m68k/m68k.c 2001-12-23 16:07:14.000000000 +0000 --- gcc-3.3/gcc/config/m68k/m68k.c 2003-03-04 20:26:01.000000000 +0000 *************** *** 1,5 **** /* Subroutines for insn-output.c for Motorola 68000 family. ! Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Subroutines for insn-output.c for Motorola 68000 family. ! Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** static void m68k_coff_asm_named_section *** 65,70 **** --- 65,73 ---- #ifdef CTOR_LIST_BEGIN static void m68k_svr3_asm_out_constructor PARAMS ((rtx, int)); #endif + static void m68k_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); + static int m68k_save_reg PARAMS ((unsigned int)); /* Alignment to use for loops and jumps */ *************** int m68k_last_compare_had_fp_operands; *** 122,127 **** --- 125,135 ---- #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE m68k_output_function_epilogue + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK m68k_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + struct gcc_target targetm = TARGET_INITIALIZER; /* Sometimes certain combinations of command options do not make *************** override_options () *** 174,181 **** --- 182,241 ---- else m68k_align_funcs = i; } + + /* -fPIC uses 32-bit pc-relative displacements, which don't exist + until the 68020. */ + if (! TARGET_68020 && flag_pic == 2) + error("-fPIC is not currently supported on the 68000 or 68010\n"); + + /* ??? A historic way of turning on pic, or is this intended to + be an embedded thing that doesn't have the same name binding + significance that it does on hosted ELF systems? */ + if (TARGET_PCREL && flag_pic == 0) + flag_pic = 1; + + /* Turn off function cse if we are doing PIC. We always want function call + to be done as `bsr foo@PLTPC', so it will force the assembler to create + the PLT entry for `foo'. Doing function cse will cause the address of + `foo' to be loaded into a register, which is exactly what we want to + avoid when we are doing PIC on svr4 m68k. */ + if (flag_pic) + flag_no_function_cse = 1; + + SUBTARGET_OVERRIDE_OPTIONS; + + /* Tell the compiler which flavor of XFmode we're using. */ + real_format_for_mode[XFmode - QFmode] = &ieee_extended_motorola_format; } + /* Return 1 if we need to save REGNO. */ + static int + m68k_save_reg (regno) + unsigned int regno; + { + if (flag_pic && current_function_uses_pic_offset_table + && regno == PIC_OFFSET_TABLE_REGNUM) + return 1; + + if (current_function_calls_eh_return) + { + unsigned int i; + for (i = 0; ; i++) + { + unsigned int test = EH_RETURN_DATA_REGNO (i); + if (test == INVALID_REGNUM) + break; + if (test == regno) + return 1; + } + } + + return (regs_ever_live[regno] + && !call_used_regs[regno] + && !fixed_regs[regno] + && !(regno == FRAME_POINTER_REGNUM && frame_pointer_needed)); + } + /* This function generates the assembly code for function entry. STREAM is a stdio stream to output the code to. SIZE is an int: how many units of temporary storage to allocate. *************** m68k_output_function_prologue (stream, s *** 220,232 **** { /* Adding negative number is faster on the 68040. */ if (fsize + 4 < 0x8000) ! fprintf (stream, "\tadd.w #%d,sp\n", - (fsize + 4)); else ! fprintf (stream, "\tadd.l #%d,sp\n", - (fsize + 4)); } for (regno = 16; regno < 24; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) mask |= 1 << (regno - 16); if ((mask & 0xff) != 0) --- 280,292 ---- { /* Adding negative number is faster on the 68040. */ if (fsize + 4 < 0x8000) ! fprintf (stream, "\tadd.w $%d,sp\n", - (fsize + 4)); else ! fprintf (stream, "\tadd.l $%d,sp\n", - (fsize + 4)); } for (regno = 16; regno < 24; regno++) ! if (m68k_save_reg (regno)) mask |= 1 << (regno - 16); if ((mask & 0xff) != 0) *************** m68k_output_function_prologue (stream, s *** 234,243 **** mask = 0; for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) mask |= 1 << (15 - regno); - if (frame_pointer_needed) - mask &= ~ (1 << (15-FRAME_POINTER_REGNUM)); if (exact_log2 (mask) >= 0) fprintf (stream, "\tmovel %s,-(sp)\n", reg_names[15 - exact_log2 (mask)]); --- 294,301 ---- mask = 0; for (regno = 0; regno < 16; regno++) ! if (m68k_save_reg (regno)) mask |= 1 << (15 - regno); if (exact_log2 (mask) >= 0) fprintf (stream, "\tmovel %s,-(sp)\n", reg_names[15 - exact_log2 (mask)]); *************** m68k_output_function_prologue (stream, s *** 245,407 **** fprintf (stream, "\tmovem $0x%x,-(sp)\n", mask); } ! #else ! #if defined (DPX2) && defined (MOTOROLA) ! ! static void ! m68k_output_function_prologue (stream, size) ! FILE *stream; ! HOST_WIDE_INT size; ! { ! register int regno; ! register int mask = 0; ! int num_saved_regs = 0, first = 1; ! HOST_WIDE_INT fsize = ((size) + 3) & -4; ! ! if (frame_pointer_needed) ! { ! /* Adding negative number is faster on the 68040. */ ! if (fsize < 0x8000 && !TARGET_68040) ! fprintf (stream, "\tlink %s,#%d\n", ! reg_names[FRAME_POINTER_REGNUM], -fsize); ! else if (TARGET_68020) ! fprintf (stream, "\tlink %s,#%d\n", ! reg_names[FRAME_POINTER_REGNUM], -fsize); ! else ! fprintf (stream, "\tlink %s,#0\n\tadd.l #%d,sp\n", ! reg_names[FRAME_POINTER_REGNUM], -fsize); ! } ! else if (fsize) ! { ! /* Adding negative number is faster on the 68040. */ ! if (fsize + 4 < 0x8000) ! fprintf (stream, "\tadd.w #%d,sp\n", - (fsize + 4)); ! else ! fprintf (stream, "\tadd.l #%d,sp\n", - (fsize + 4)); ! } ! ! for (regno = 23; regno >= 16; regno--) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! { ! if (first) ! { ! fprintf (stream, "\tfmovem.x %s", reg_names[regno]); ! first = 0; ! } ! else ! fprintf (stream, "/%s", reg_names[regno]); ! } ! if (!first) ! fprintf (stream, ",-(sp)\n"); ! ! mask = 0; ! for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! { ! mask |= 1 << (15 - regno); ! num_saved_regs++; ! } ! ! if (frame_pointer_needed) ! { ! mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM)); ! num_saved_regs--; ! } ! ! if (num_saved_regs <= 2) ! { ! /* Store each separately in the same order moveml uses. ! Using two movel instructions instead of a single moveml ! is about 15% faster for the 68020 and 68030 at no expense ! in code size */ ! ! int i; ! ! /* Undo the work from above. */ ! for (i = 0; i< 16; i++) ! if (mask & (1 << i)) ! fprintf (stream, "\tmove.l %s,-(sp)\n", reg_names[15 - i]); ! } ! else if (mask) ! { ! first = 1; ! for (regno = 0; regno < 16; regno++) ! if (mask & (1 << regno)) ! { ! if (first) ! { ! fprintf (stream, "\tmovem.l %s", reg_names[15 - regno]); ! first = 0; ! } ! else ! fprintf (stream, "/%s", reg_names[15 - regno]); ! } ! fprintf (stream, ",-(sp)\n"); ! } ! ! if (flag_pic && current_function_uses_pic_offset_table) ! { ! fprintf (stream, "\tmove.l #__GLOBAL_OFFSET_TABLE_, %s\n", ! reg_names[PIC_OFFSET_TABLE_REGNUM]); ! fprintf (stream, "\tlea.l (pc,%s.l),%s\n", ! reg_names[PIC_OFFSET_TABLE_REGNUM], ! reg_names[PIC_OFFSET_TABLE_REGNUM]); ! } ! } ! ! #else ! #if defined (NEWS) && defined (MOTOROLA) ! ! static void ! m68k_output_function_prologue (stream, size) ! FILE *stream; ! HOST_WIDE_INT size; ! { ! register int regno; ! register int mask = 0; ! HOST_WIDE_INT fsize = ((size) + 3) & -4; ! ! if (frame_pointer_needed) ! { ! if (fsize < 0x8000) ! fprintf (stream, "\tlink fp,#%d\n", -fsize); ! else if (TARGET_68020) ! fprintf (stream, "\tlink.l fp,#%d\n", -fsize); ! else ! fprintf (stream, "\tlink fp,#0\n\tsub.l #%d,sp\n", fsize); ! } ! else if (fsize) ! { ! int amt = fsize + 4; ! /* Adding negative number is faster on the 68040. */ ! if (fsize + 4 < 0x8000) ! asm_fprintf (stream, "\tadd.w %0I%d,%Rsp\n", - amt); ! else ! asm_fprintf (stream, "\tadd.l %0I%d,%Rsp\n", - amt); ! } ! ! for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! mask |= 1 << (regno - 16); ! ! if (mask != 0) ! fprintf (stream, "\tfmovem.x #0x%x,-(sp)\n", mask & 0xff); ! ! mask = 0; ! for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! mask |= 1 << (15 - regno); ! ! if (frame_pointer_needed) ! mask &= ~ (1 << (15-FRAME_POINTER_REGNUM)); ! ! if (exact_log2 (mask) >= 0) ! fprintf (stream, "\tmove.l %s,-(sp)\n", reg_names[15 - exact_log2 (mask)]); ! else ! if (mask) fprintf (stream, "\tmovem.l #0x%x,-(sp)\n", mask); ! } ! ! #else /* !CRDS && ! (NEWS && MOTOROLA) && ! (DPX2 && MOTOROLA) */ static void m68k_output_function_prologue (stream, size) --- 303,309 ---- fprintf (stream, "\tmovem $0x%x,-(sp)\n", mask); } ! #else /* !CRDS */ static void m68k_output_function_prologue (stream, size) *************** m68k_output_function_prologue (stream, s *** 435,447 **** { /* on the 68040, pea + move is faster than link.w 0 */ #ifdef MOTOROLA ! asm_fprintf (stream, "\tpea (%s)\n\tmove.l %s,%s\n", ! reg_names[FRAME_POINTER_REGNUM], reg_names[STACK_POINTER_REGNUM], ! reg_names[FRAME_POINTER_REGNUM]); #else ! asm_fprintf (stream, "\tpea %s@\n\tmovel %s,%s\n", ! reg_names[FRAME_POINTER_REGNUM], reg_names[STACK_POINTER_REGNUM], ! reg_names[FRAME_POINTER_REGNUM]); #endif } else if (fsize < 0x8000) --- 337,351 ---- { /* on the 68040, pea + move is faster than link.w 0 */ #ifdef MOTOROLA ! fprintf (stream, "\tpea (%s)\n\tmove.l %s,%s\n", ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[STACK_POINTER_REGNUM], ! reg_names[FRAME_POINTER_REGNUM]); #else ! fprintf (stream, "\tpea %s@\n\tmovel %s,%s\n", ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[STACK_POINTER_REGNUM], ! reg_names[FRAME_POINTER_REGNUM]); #endif } else if (fsize < 0x8000) *************** m68k_output_function_prologue (stream, s *** 557,570 **** } if (dwarf2out_do_frame ()) { ! cfa_store_offset += fsize; cfa_offset = cfa_store_offset; dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, cfa_offset); } } #ifdef SUPPORT_SUN_FPA for (regno = 24; regno < 56; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { #ifdef MOTOROLA asm_fprintf (stream, "\tfpmovd %s,-(%Rsp)\n", --- 461,474 ---- } if (dwarf2out_do_frame ()) { ! cfa_store_offset += fsize + 4; cfa_offset = cfa_store_offset; dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, cfa_offset); } } #ifdef SUPPORT_SUN_FPA for (regno = 24; regno < 56; regno++) ! if (m68k_save_reg (regno)) { #ifdef MOTOROLA asm_fprintf (stream, "\tfpmovd %s,-(%Rsp)\n", *************** m68k_output_function_prologue (stream, s *** 590,596 **** if (TARGET_68881) { for (regno = 16; regno < 24; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { mask |= 1 << (regno - 16); num_saved_regs++; --- 494,500 ---- if (TARGET_68881) { for (regno = 16; regno < 24; regno++) ! if (m68k_save_reg (regno)) { mask |= 1 << (regno - 16); num_saved_regs++; *************** m68k_output_function_prologue (stream, s *** 623,643 **** num_saved_regs = 0; } for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { mask |= 1 << (15 - regno); num_saved_regs++; } - if (frame_pointer_needed) - { - mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM)); - num_saved_regs--; - } - if (flag_pic && current_function_uses_pic_offset_table) - { - mask |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM); - num_saved_regs++; - } #if NEED_PROBE #ifdef MOTOROLA --- 527,537 ---- num_saved_regs = 0; } for (regno = 0; regno < 16; regno++) ! if (m68k_save_reg (regno)) { mask |= 1 << (15 - regno); num_saved_regs++; } #if NEED_PROBE #ifdef MOTOROLA *************** m68k_output_function_prologue (stream, s *** 767,774 **** #endif } } - #endif /* ! (DPX2 && MOTOROLA) */ - #endif /* ! (NEWS && MOTOROLA) */ #endif /* !CRDS */ /* Return true if this function's epilogue can be output as RTL. */ --- 661,666 ---- *************** use_return_insn () *** 781,796 **** if (!reload_completed || frame_pointer_needed || get_frame_size () != 0) return 0; ! /* Copied from output_function_epilogue (). We should probably create a ! separate layout routine to perform the common work. */ ! ! for (regno = 0 ; regno < FIRST_PSEUDO_REGISTER ; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) return 0; - if (flag_pic && current_function_uses_pic_offset_table) - return 0; - return 1; } --- 673,682 ---- if (!reload_completed || frame_pointer_needed || get_frame_size () != 0) return 0; ! for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) ! if (m68k_save_reg (regno)) return 0; return 1; } *************** m68k_output_function_epilogue (stream, s *** 818,824 **** nregs = 0; fmask = 0; fpoffset = 0; for (regno = 16; regno < 24; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { nregs++; fmask |= 1 << (23 - regno); --- 704,710 ---- nregs = 0; fmask = 0; fpoffset = 0; for (regno = 16; regno < 24; regno++) ! if (m68k_save_reg (regno)) { nregs++; fmask |= 1 << (23 - regno); *************** m68k_output_function_epilogue (stream, s *** 826,836 **** foffset = fpoffset + nregs * 12; nregs = 0; mask = 0; - if (frame_pointer_needed) - regs_ever_live[FRAME_POINTER_REGNUM] = 0; for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { nregs++; mask |= 1 << regno; --- 712,720 ---- foffset = fpoffset + nregs * 12; nregs = 0; mask = 0; for (regno = 0; regno < 16; regno++) ! if (m68k_save_reg (regno)) { nregs++; mask |= 1 << regno; *************** m68k_output_function_epilogue (stream, s *** 883,889 **** if (fpoffset != 0) for (regno = 55; regno >= 24; regno--) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { if (big) fprintf(stream, "\tfpmoved -%d(a6,a0.l), %s\n", --- 767,773 ---- if (fpoffset != 0) for (regno = 55; regno >= 24; regno--) ! if (m68k_save_reg (regno)) { if (big) fprintf(stream, "\tfpmoved -%d(a6,a0.l), %s\n", *************** m68k_output_function_epilogue (stream, s *** 902,1185 **** else if (fsize) { if (fsize + 4 < 0x8000) ! fprintf (stream, "\tadd.w #%d,sp\n", fsize + 4); ! else ! fprintf (stream, "\tadd.l #%d,sp\n", fsize + 4); ! } ! ! if (current_function_pops_args) ! fprintf (stream, "\trtd $%d\n", current_function_pops_args); ! else ! fprintf (stream, "\trts\n"); ! } ! ! #else ! #if defined (DPX2) && defined (MOTOROLA) ! ! static void ! m68k_output_function_epilogue (stream, size) ! FILE *stream; ! HOST_WIDE_INT size; ! { ! register int regno; ! register int mask, fmask; ! register int nregs; ! HOST_WIDE_INT offset, foffset, fpoffset, first = 1; ! HOST_WIDE_INT fsize = ((size) + 3) & -4; ! int big = 0; ! rtx insn = get_last_insn (); ! ! /* If the last insn was a BARRIER, we don't have to write any code. */ ! if (GET_CODE (insn) == NOTE) ! insn = prev_nonnote_insn (insn); ! if (insn && GET_CODE (insn) == BARRIER) ! { ! /* Output just a no-op so that debuggers don't get confused ! about which function the pc is in at this address. */ ! fprintf (stream, "\tnop\n"); ! return; ! } ! ! nregs = 0; fmask = 0; fpoffset = 0; ! for (regno = 16; regno < 24; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! { ! nregs++; ! fmask |= 1 << (23 - regno); ! } ! ! foffset = fpoffset + nregs * 12; ! nregs = 0; mask = 0; ! if (frame_pointer_needed) ! regs_ever_live[FRAME_POINTER_REGNUM] = 0; ! ! for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! { ! nregs++; ! mask |= 1 << regno; ! } ! ! offset = foffset + nregs * 4; ! if (offset + fsize >= 0x8000 ! && frame_pointer_needed ! && (mask || fmask || fpoffset)) ! { ! fprintf (stream, "\tmove.l #%d,a0\n", -fsize); ! fsize = 0, big = 1; ! } ! ! if (nregs <= 2) ! { ! /* Restore each separately in the same order moveml does. ! Using two movel instructions instead of a single moveml ! is about 15% faster for the 68020 and 68030 at no expense ! in code size. */ ! ! int i; ! ! /* Undo the work from above. */ ! for (i = 0; i< 16; i++) ! if (mask & (1 << i)) ! { ! if (big) ! fprintf (stream, "\tmove.l -%d(%s,a0.l),%s\n", ! offset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[i]); ! else if (! frame_pointer_needed) ! fprintf (stream, "\tmove.l (sp)+,%s\n", ! reg_names[i]); ! else ! fprintf (stream, "\tmove.l -%d(%s),%s\n", ! offset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[i]); ! offset = offset - 4; ! } ! } ! else if (mask) ! { ! first = 1; ! for (regno = 0; regno < 16; regno++) ! if (mask & (1 << regno)) ! { ! if (first && big) ! { ! fprintf (stream, "\tmovem.l -%d(%s,a0.l),%s", ! offset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[regno]); ! first = 0; ! } ! else if (first && ! frame_pointer_needed) ! { ! fprintf (stream, "\tmovem.l (sp)+,%s", ! reg_names[regno]); ! first = 0; ! } ! else if (first) ! { ! fprintf (stream, "\tmovem.l -%d(%s),%s", ! offset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[regno]); ! first = 0; ! } ! else ! fprintf (stream, "/%s", reg_names[regno]); ! } ! fprintf (stream, "\n"); ! } ! ! if (fmask) ! { ! first = 1; ! for (regno = 16; regno < 24; regno++) ! if (fmask & (1 << (23 - regno))) ! { ! if (first && big) ! { ! fprintf (stream, "\tfmovem.x -%d(%s,a0.l),%s", ! foffset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[regno]); ! first = 0; ! } ! else if (first && ! frame_pointer_needed) ! { ! fprintf (stream, "\tfmovem.x (sp)+,%s", ! reg_names[regno]); ! first = 0; ! } ! else if (first) ! { ! fprintf (stream, "\tfmovem.x -%d(%s),%s", ! foffset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[regno]); ! first = 0; ! } ! else ! fprintf (stream, "/%s", reg_names[regno]); ! } ! fprintf (stream, "\n"); ! } ! ! if (frame_pointer_needed) ! fprintf (stream, "\tunlk %s\n", ! reg_names[FRAME_POINTER_REGNUM]); ! else if (fsize) ! { ! if (fsize + 4 < 0x8000) ! fprintf (stream, "\tadd.w #%d,sp\n", fsize + 4); ! else ! fprintf (stream, "\tadd.l #%d,sp\n", fsize + 4); ! } ! ! if (current_function_pops_args) ! fprintf (stream, "\trtd #%d\n", current_function_pops_args); ! else ! fprintf (stream, "\trts\n"); ! } ! ! #else ! #if defined (NEWS) && defined (MOTOROLA) ! ! static void ! m68k_output_function_epilogue (stream, size) ! FILE *stream; ! HOST_WIDE_INT size; ! { ! register int regno; ! register int mask, fmask; ! register int nregs; ! HOST_WIDE_INT offset, foffset; ! HOST_WIDE_INT fsize = ((size) + 3) & -4; ! int big = 0; ! ! nregs = 0; fmask = 0; ! for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! { ! nregs++; ! fmask |= 1 << (23 - regno); ! } ! ! foffset = nregs * 12; ! nregs = 0; mask = 0; ! if (frame_pointer_needed) ! regs_ever_live[FRAME_POINTER_REGNUM] = 0; ! ! for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) ! { ! nregs++; ! mask |= 1 << regno; ! } ! ! offset = foffset + nregs * 4; ! if (offset + fsize >= 0x8000 ! && frame_pointer_needed ! && (mask || fmask)) ! { ! fprintf (stream, "\tmove.l #%d,a0\n", -fsize); ! fsize = 0, big = 1; ! } ! ! if (exact_log2 (mask) >= 0) ! { ! if (big) ! fprintf (stream, "\tmove.l (-%d,fp,a0.l),%s\n", ! offset + fsize, reg_names[exact_log2 (mask)]); ! else if (! frame_pointer_needed) ! fprintf (stream, "\tmove.l (sp)+,%s\n", ! reg_names[exact_log2 (mask)]); ! else ! fprintf (stream, "\tmove.l (-%d,fp),%s\n", ! offset + fsize, reg_names[exact_log2 (mask)]); ! } ! else if (mask) ! { ! if (big) ! fprintf (stream, "\tmovem.l (-%d,fp,a0.l),#0x%x\n", ! offset + fsize, mask); ! else if (! frame_pointer_needed) ! fprintf (stream, "\tmovem.l (sp)+,#0x%x\n", mask); ! else ! fprintf (stream, "\tmovem.l (-%d,fp),#0x%x\n", ! offset + fsize, mask); ! } ! ! if (fmask) ! { ! if (big) ! fprintf (stream, "\tfmovem.x (-%d,fp,a0.l),#0x%x\n", ! foffset + fsize, fmask); ! else if (! frame_pointer_needed) ! fprintf (stream, "\tfmovem.x (sp)+,#0x%x\n", fmask); else ! fprintf (stream, "\tfmovem.x (-%d,fp),#0x%x\n", ! foffset + fsize, fmask); } ! if (frame_pointer_needed) ! fprintf (stream, "\tunlk fp\n"); ! else if (fsize) ! { ! if (fsize + 4 < 0x8000) ! fprintf (stream, "\tadd.w #%d,sp\n", fsize + 4); ! else ! fprintf (stream, "\tadd.l #%d,sp\n", fsize + 4); ! } if (current_function_pops_args) ! fprintf (stream, "\trtd #%d\n", current_function_pops_args); else fprintf (stream, "\trts\n"); } ! #else /* !CRDS && ! (NEWS && MOTOROLA) && ! (DPX2 && MOTOROLA) */ static void m68k_output_function_epilogue (stream, size) --- 786,806 ---- else if (fsize) { if (fsize + 4 < 0x8000) ! fprintf (stream, "\tadd.w $%d,sp\n", fsize + 4); else ! fprintf (stream, "\tadd.l $%d,sp\n", fsize + 4); } ! if (current_function_calls_eh_return) ! fprintf (stream, "\tadd.l a0,sp\n"); if (current_function_pops_args) ! fprintf (stream, "\trtd $%d\n", current_function_pops_args); else fprintf (stream, "\trts\n"); } ! #else /* !CRDS */ static void m68k_output_function_epilogue (stream, size) *************** m68k_output_function_epilogue (stream, s *** 1202,1208 **** { /* Output just a no-op so that debuggers don't get confused about which function the pc is in at this address. */ ! asm_fprintf (stream, "\tnop\n"); return; } --- 823,829 ---- { /* Output just a no-op so that debuggers don't get confused about which function the pc is in at this address. */ ! fprintf (stream, "\tnop\n"); return; } *************** m68k_output_function_epilogue (stream, s *** 1212,1218 **** nregs = 0; fmask = 0; fpoffset = 0; #ifdef SUPPORT_SUN_FPA for (regno = 24 ; regno < 56 ; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) nregs++; fpoffset = nregs * 8; #endif --- 833,839 ---- nregs = 0; fmask = 0; fpoffset = 0; #ifdef SUPPORT_SUN_FPA for (regno = 24 ; regno < 56 ; regno++) ! if (m68k_save_reg (regno)) nregs++; fpoffset = nregs * 8; #endif *************** m68k_output_function_epilogue (stream, s *** 1220,1226 **** if (TARGET_68881) { for (regno = 16; regno < 24; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { nregs++; fmask |= 1 << (23 - regno); --- 841,847 ---- if (TARGET_68881) { for (regno = 16; regno < 24; regno++) ! if (m68k_save_reg (regno)) { nregs++; fmask |= 1 << (23 - regno); *************** m68k_output_function_epilogue (stream, s *** 1228,1246 **** } foffset = fpoffset + nregs * 12; nregs = 0; mask = 0; - if (frame_pointer_needed) - regs_ever_live[FRAME_POINTER_REGNUM] = 0; for (regno = 0; regno < 16; regno++) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { nregs++; mask |= 1 << regno; } - if (flag_pic && current_function_uses_pic_offset_table) - { - nregs++; - mask |= 1 << PIC_OFFSET_TABLE_REGNUM; - } offset = foffset + nregs * 4; /* FIXME : leaf_function_p below is too strong. What we really need to know there is if there could be pending --- 849,860 ---- } foffset = fpoffset + nregs * 12; nregs = 0; mask = 0; for (regno = 0; regno < 16; regno++) ! if (m68k_save_reg (regno)) { nregs++; mask |= 1 << regno; } offset = foffset + nregs * 4; /* FIXME : leaf_function_p below is too strong. What we really need to know there is if there could be pending *************** m68k_output_function_epilogue (stream, s *** 1302,1310 **** reg_names[FRAME_POINTER_REGNUM], reg_names[i]); #else ! asm_fprintf (stream, "\tmovel %s@(-%d),%s\n", ! reg_names[FRAME_POINTER_REGNUM], ! offset + fsize, reg_names[i]); #endif } offset = offset - 4; --- 916,924 ---- reg_names[FRAME_POINTER_REGNUM], reg_names[i]); #else ! fprintf (stream, "\tmovel %s@(-%d),%s\n", ! reg_names[FRAME_POINTER_REGNUM], ! offset + fsize, reg_names[i]); #endif } offset = offset - 4; *************** m68k_output_function_epilogue (stream, s *** 1386,1392 **** } if (fpoffset != 0) for (regno = 55; regno >= 24; regno--) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { if (big) { --- 1000,1006 ---- } if (fpoffset != 0) for (regno = 55; regno >= 24; regno--) ! if (m68k_save_reg (regno)) { if (big) { *************** m68k_output_function_epilogue (stream, s *** 1414,1427 **** else { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfpmovd -%d(%s), %s\n", ! fpoffset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[regno]); #else ! asm_fprintf (stream, "\tfpmoved %s@(-%d), %s\n", ! reg_names[FRAME_POINTER_REGNUM], ! fpoffset + fsize, reg_names[regno]); #endif } fpoffset -= 8; --- 1028,1041 ---- else { #ifdef MOTOROLA ! fprintf (stream, "\tfpmovd -%d(%s), %s\n", ! fpoffset + fsize, ! reg_names[FRAME_POINTER_REGNUM], ! reg_names[regno]); #else ! fprintf (stream, "\tfpmoved %s@(-%d), %s\n", ! reg_names[FRAME_POINTER_REGNUM], ! fpoffset + fsize, reg_names[regno]); #endif } fpoffset -= 8; *************** m68k_output_function_epilogue (stream, s *** 1496,1509 **** #endif } } if (current_function_pops_args) asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args); else fprintf (stream, "\trts\n"); } - - #endif /* ! (DPX2 && MOTOROLA) */ - #endif /* ! (NEWS && MOTOROLA) */ #endif /* !CRDS */ /* Similar to general_operand, but exclude stack_pointer_rtx. */ --- 1110,1128 ---- #endif } } + if (current_function_calls_eh_return) + { + #ifdef MOTOROLA + asm_fprintf (stream, "\tadd.l %Ra0,%Rsp\n"); + #else + asm_fprintf (stream, "\taddl %Ra0,%Rsp\n"); + #endif + } if (current_function_pops_args) asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args); else fprintf (stream, "\trts\n"); } #endif /* !CRDS */ /* Similar to general_operand, but exclude stack_pointer_rtx. */ *************** valid_dbcc_comparison_p (x, mode) *** 1544,1550 **** } } ! /* Return non-zero if flags are currently in the 68881 flag register. */ int flags_in_68881 () { --- 1163,1169 ---- } } ! /* Return nonzero if flags are currently in the 68881 flag register. */ int flags_in_68881 () { *************** standard_68881_constant_p (x) *** 3112,3124 **** if (TARGET_68040 || TARGET_68060) return 0; - #ifndef REAL_ARITHMETIC - #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT - if (! flag_pretend_float) - return 0; - #endif - #endif - if (! inited_68881_table) init_68881_table (); --- 2731,2736 ---- *************** floating_exact_log2 (x) *** 3151,3179 **** rtx x; { REAL_VALUE_TYPE r, r1; ! int i; ! ! #ifndef REAL_ARITHMETIC ! #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT ! if (! flag_pretend_float) ! return 0; ! #endif ! #endif REAL_VALUE_FROM_CONST_DOUBLE (r, x); ! if (REAL_VALUES_LESS (r, dconst0)) return 0; ! r1 = dconst1; ! i = 0; ! while (REAL_VALUES_LESS (r1, r)) ! { ! r1 = REAL_VALUE_LDEXP (dconst1, i); ! if (REAL_VALUES_EQUAL (r1, r)) ! return i; ! i = i + 1; ! } return 0; } --- 2763,2780 ---- rtx x; { REAL_VALUE_TYPE r, r1; ! int exp; REAL_VALUE_FROM_CONST_DOUBLE (r, x); ! if (REAL_VALUES_LESS (r, dconst1)) return 0; ! exp = real_exponent (&r); ! real_2expN (&r1, exp); ! if (REAL_VALUES_EQUAL (r1, r)) ! return exp; ! return 0; } *************** standard_sun_fpa_constant_p (x) *** 3305,3317 **** REAL_VALUE_TYPE r; int i; - #ifndef REAL_ARITHMETIC - #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT - if (! flag_pretend_float) - return 0; - #endif - #endif - if (! inited_FPA_table) init_FPA_table (); --- 2906,2911 ---- *************** print_operand (file, op, letter) *** 3407,3413 **** if (letter == '.') { #if defined (MOTOROLA) && !defined (CRDS) ! asm_fprintf (file, "."); #endif } else if (letter == '#') --- 3001,3007 ---- if (letter == '.') { #if defined (MOTOROLA) && !defined (CRDS) ! fprintf (file, "."); #endif } else if (letter == '#') *************** print_operand (file, op, letter) *** 3565,3571 **** macro. See m68k/sgs.h for an example; for versions without the bug. Some assemblers refuse all the above solutions. The workaround is to emit "K(pc,d0.l*2)" with K being a small constant known to give the ! right behaviour. They also do not like things like "pea 1.w", so we simple leave off the .w on small constants. --- 3159,3165 ---- macro. See m68k/sgs.h for an example; for versions without the bug. Some assemblers refuse all the above solutions. The workaround is to emit "K(pc,d0.l*2)" with K being a small constant known to give the ! right behavior. They also do not like things like "pea 1.w", so we simple leave off the .w on small constants. *************** m68k_svr3_asm_out_constructor (symbol, p *** 4261,4263 **** --- 3855,3923 ---- output_asm_insn (output_move_simode (xop), xop); } #endif + + static void + m68k_output_mi_thunk (file, thunk, delta, vcall_offset, function) + FILE *file; + tree thunk ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; + tree function; + { + rtx xops[1]; + const char *fmt; + + if (delta > 0 && delta <= 8) + asm_fprintf (file, "\taddq.l %I%d,4(%Rsp)\n", (int) delta); + else if (delta < 0 && delta >= -8) + asm_fprintf (file, "\tsubq.l %I%d,4(%Rsp)\n", (int) -delta); + else + { + asm_fprintf (file, "\tadd.l %I"); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + asm_fprintf (file, ",4(%Rsp)\n"); + } + + xops[0] = DECL_RTL (function); + + /* Logic taken from call patterns in m68k.md. */ + if (flag_pic) + { + if (TARGET_PCREL) + fmt = "bra.l %o0"; + else + { + #ifdef MOTOROLA + #ifdef HPUX_ASM + fmt = "bra.l %0"; + #else + #ifdef USE_GAS + fmt = "bra.l %0@PLTPC"; + #else + fmt = "bra %0@PLTPC"; + #endif + #endif + #else + #ifdef USE_GAS + fmt = "bra.l %0"; + #else + fmt = "jbra %0,a1"; + #endif + #endif + } + } + else + { + #if defined (MOTOROLA) && !defined (USE_GAS) + #ifdef MOTOROLA_BSR + fmt = "bra %0"; + #else + fmt = "jmp %0"; + #endif + #else + fmt = "jbra %0"; + #endif + } + + output_asm_insn (fmt, xops); + } diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/m68kelf.h gcc-3.3/gcc/config/m68k/m68kelf.h *** gcc-3.2.3/gcc/config/m68k/m68kelf.h 2003-01-30 16:57:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/m68kelf.h 2003-01-28 22:18:19.000000000 +0000 *************** do { \ *** 151,159 **** #define ASM_COMMENT_START "|" - #undef TYPE_OPERAND_FMT - #define TYPE_OPERAND_FMT "@%s" - /* Define how the m68k registers should be numbered for Dwarf output. The numbering provided here should be compatible with the native SVR4 SDB debugger in the m68k/SVR4 reference port, where d0-d7 --- 151,156 ---- *************** extern int switch_table_difference_label *** 259,278 **** || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \ || PCREL_GENERAL_OPERAND_OK) - /* Turn off function cse if we are doing PIC. We always want function call - to be done as `bsr foo@PLTPC', so it will force the assembler to create - the PLT entry for `foo'. Doing function cse will cause the address of `foo' - to be loaded into a register, which is exactly what we want to avoid when - we are doing PIC on svr4 m68k. */ - #undef OVERRIDE_OPTIONS - #define OVERRIDE_OPTIONS \ - { \ - if (flag_pic) flag_no_function_cse = 1; \ - if (! TARGET_68020 && flag_pic == 2) \ - error("-fPIC is not currently supported on the 68000 or 68010\n"); \ - if (TARGET_PCREL && flag_pic == 0) \ - flag_pic = 1; \ - } /* end of stuff from m68kv4.h */ #undef SGS_CMP_ORDER --- 256,261 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/m68k.h gcc-3.3/gcc/config/m68k/m68k.h *** gcc-3.2.3/gcc/config/m68k/m68k.h 2002-07-15 06:33:38.000000000 +0000 --- gcc-3.3/gcc/config/m68k/m68k.h 2002-12-03 19:45:30.000000000 +0000 *************** extern int target_flags; *** 69,75 **** #define MASK_68881 2 #define TARGET_68881 (target_flags & MASK_68881) ! /* Compile using 68020 bitfield insns. */ #define MASK_BITFIELD 4 #define TARGET_BITFIELD (target_flags & MASK_BITFIELD) --- 69,75 ---- #define MASK_68881 2 #define TARGET_68881 (target_flags & MASK_68881) ! /* Compile using 68020 bit-field insns. */ #define MASK_BITFIELD 4 #define TARGET_BITFIELD (target_flags & MASK_BITFIELD) *************** extern int target_flags; *** 277,291 **** Don't use this macro to turn on various extra optimizations for `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ ! #define OVERRIDE_OPTIONS \ ! { \ ! override_options(); \ ! if (! TARGET_68020 && flag_pic == 2) \ ! error("-fPIC is not currently supported on the 68000 or 68010\n"); \ ! if (TARGET_PCREL && flag_pic == 0) \ ! flag_pic = 1; \ ! SUBTARGET_OVERRIDE_OPTIONS; \ ! } /* These are meant to be redefined in the host dependent files */ #define SUBTARGET_SWITCHES --- 277,283 ---- Don't use this macro to turn on various extra optimizations for `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ ! #define OVERRIDE_OPTIONS override_options() /* These are meant to be redefined in the host dependent files */ #define SUBTARGET_SWITCHES *************** extern int target_flags; *** 294,307 **** /* target machine storage layout */ ! /* Define for XFmode extended real floating point support. ! This will automatically cause REAL_ARITHMETIC to be defined. */ #define LONG_DOUBLE_TYPE_SIZE 96 ! /* Define if you don't want extended real, but do want to use the ! software floating point emulator for REAL_ARITHMETIC and ! decimal <-> binary conversion. */ ! /* #define REAL_ARITHMETIC */ /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. --- 286,298 ---- /* target machine storage layout */ ! /* Define for XFmode extended real floating point support. */ #define LONG_DOUBLE_TYPE_SIZE 96 ! /* Set the value of FLT_EVAL_METHOD in float.h. When using 68040 fp ! instructions, we get proper intermediate rounding, otherwise we ! get extended precision results. */ ! #define TARGET_FLT_EVAL_METHOD (TARGET_68040_ONLY ? 0 : 2) /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. *************** extern int target_flags; *** 321,342 **** So let's be consistent. */ #define WORDS_BIG_ENDIAN 1 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY (TARGET_SHORT ? 16 : 32) --- 312,320 ---- *************** extern int target_flags; *** 369,384 **** /* This is how to align an instruction for optimal branching. */ #define LABEL_ALIGN_AFTER_BARRIER(LABEL) (m68k_align_jumps) - #define SELECT_RTX_SECTION(MODE, X, ALIGN) \ - { \ - if (!flag_pic) \ - readonly_data_section(); \ - else if (LEGITIMATE_PIC_OPERAND_P (X)) \ - readonly_data_section(); \ - else \ - data_section(); \ - } - /* Define number of bits in most basic integer type. (If undefined, default is BITS_PER_WORD). */ --- 347,352 ---- *************** __transfer_from_trampoline () \ *** 1570,1575 **** --- 1538,1549 ---- case SYMBOL_REF: \ return 3; \ case CONST_DOUBLE: \ + /* Make 0.0 cheaper than other floating constants to \ + encourage creating tstsf and tstdf insns. */ \ + if ((OUTER_CODE) == COMPARE \ + && ((RTX) == CONST0_RTX (SFmode) \ + || (RTX) == CONST0_RTX (DFmode))) \ + return 4; \ return 5; /* Compute the cost of various arithmetic operations. *************** __transfer_from_trampoline () \ *** 1691,1696 **** --- 1665,1672 ---- #define DATA_SECTION_ASM_OP "\t.data" + #define GLOBAL_ASM_OP "\t.globl\t" + /* Here are four prefixes that are used by asm_fprintf to facilitate customization for alternate assembler syntaxes. Machines with no likelihood of an alternate syntax need not *************** __transfer_from_trampoline () \ *** 1758,1777 **** /* Before the prologue, the top of the frame is at 4(%sp). */ #define INCOMING_FRAME_SP_OFFSET 4 ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! #define GLOBAL_ASM_OP "\t.globl\t" ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fprintf (FILE, "%s", GLOBAL_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE);} while (0) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ --- 1734,1756 ---- /* Before the prologue, the top of the frame is at 4(%sp). */ #define INCOMING_FRAME_SP_OFFSET 4 ! /* Describe how we implement __builtin_eh_return. */ ! #define EH_RETURN_DATA_REGNO(N) \ ! ((N) < 2 ? (N) : INVALID_REGNUM) ! #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 8) ! #define EH_RETURN_HANDLER_RTX \ ! gen_rtx_MEM (Pmode, \ ! gen_rtx_PLUS (Pmode, arg_pointer_rtx, \ ! plus_constant (EH_RETURN_STACKADJ_RTX, \ ! UNITS_PER_WORD))) ! /* Select a format to encode pointers in exception handling data. CODE ! is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ! true if the symbol may be affected by dynamic relocations. */ ! #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ ! (flag_pic \ ! ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \ ! : DW_EH_PE_absptr) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ *************** __transfer_from_trampoline () \ *** 1862,1868 **** if (CODE == 'f') \ { \ char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \ asm_fprintf ((FILE), "%I0r%s", dstr); \ } \ else \ --- 1841,1847 ---- if (CODE == 'f') \ { \ char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 9, 0); \ asm_fprintf ((FILE), "%I0r%s", dstr); \ } \ else \ *************** __transfer_from_trampoline () \ *** 1877,1883 **** This macro is a 68k-specific macro. */ #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } while (0) --- 1856,1862 ---- This macro is a 68k-specific macro. */ #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } while (0) *************** __transfer_from_trampoline () \ *** 1885,1891 **** generated by m68k.md. */ #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } while (0) --- 1864,1870 ---- generated by m68k.md. */ #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \ do { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } while (0) *************** __transfer_from_trampoline () \ *** 1952,1963 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on ! the section that the address refers to. On these machines, ! define the macro `ENCODE_SECTION_INFO' to store the information ! into the `symbol_ref', and then check for it here. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) --- 1931,1937 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/m68k.md gcc-3.3/gcc/config/m68k/m68k.md *** gcc-3.2.3/gcc/config/m68k/m68k.md 2003-03-17 10:22:00.000000000 +0000 --- gcc-3.3/gcc/config/m68k/m68k.md 2003-03-18 19:45:12.000000000 +0000 *************** *** 1525,1534 **** }") ;; this is the canonical form for (lshiftrt:DI x 32) ! (define_insn "zero_extendsidi2" [(set (match_operand:DI 0 "nonimmediate_operand" "=rm") (zero_extend:DI (match_operand:SI 1 "general_operand" "rm")))] ! "" "* { CC_STATUS_INIT; --- 1525,1564 ---- }") ;; this is the canonical form for (lshiftrt:DI x 32) ! (define_expand "zero_extendsidi2" ! [(set (match_operand:DI 0 "nonimmediate_operand" "") ! (zero_extend:DI (match_operand:SI 1 "general_operand" "")))] ! "" ! "") ! ! (define_insn "*zero_extendsidi2_cf" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=r,m") ! (zero_extend:DI (match_operand:SI 1 "general_operand" "rm,r")))] ! "TARGET_5200" ! "* ! { ! CC_STATUS_INIT; ! if (GET_CODE (operands[0]) == REG) ! operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); ! else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) ! return \"move%.l %1,%0\;clr%.l %0\"; ! else if (GET_CODE (XEXP (operands[0], 0)) == POST_INC) ! return \"clr%.l %0\;move%.l %1,%0\"; ! else ! operands[2] = adjust_address (operands[0], SImode, 4); ! if (GET_CODE (operands[1]) != REG || GET_CODE (operands[2]) != REG ! || REGNO (operands[1]) != REGNO (operands[2])) ! output_asm_insn (\"move%.l %1,%2\", operands); ! if (ADDRESS_REG_P (operands[0])) ! return \"sub%.l %0,%0\"; ! else ! return \"clr%.l %0\"; ! }") ! ! (define_insn "*zero_extendsidi2" [(set (match_operand:DI 0 "nonimmediate_operand" "=rm") (zero_extend:DI (match_operand:SI 1 "general_operand" "rm")))] ! "!TARGET_5200" "* { CC_STATUS_INIT; diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/m68k-protos.h gcc-3.3/gcc/config/m68k/m68k-protos.h *** gcc-3.2.3/gcc/config/m68k/m68k-protos.h 2001-07-06 18:40:13.000000000 +0000 --- gcc-3.3/gcc/config/m68k/m68k-protos.h 2002-10-20 22:37:11.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. ! Copyright (C) 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/m68kv4.h gcc-3.3/gcc/config/m68k/m68kv4.h *** gcc-3.2.3/gcc/config/m68k/m68kv4.h 2001-12-17 15:05:34.000000000 +0000 --- gcc-3.3/gcc/config/m68k/m68kv4.h 2002-10-04 02:19:40.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 109,117 **** #define ASM_COMMENT_START "#" - #undef TYPE_OPERAND_FMT - #define TYPE_OPERAND_FMT "@%s" - /* Define how the m68k registers should be numbered for Dwarf output. The numbering provided here should be compatible with the native SVR4 SDB debugger in the m68k/SVR4 reference port, where d0-d7 --- 109,114 ---- *************** int switch_table_difference_label_flag; *** 286,304 **** || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \ || PCREL_GENERAL_OPERAND_OK) - /* Turn off function cse if we are doing PIC. We always want function call - to be done as `bsr foo@PLTPC', so it will force the assembler to create - the PLT entry for `foo'. Doing function cse will cause the address of `foo' - to be loaded into a register, which is exactly what we want to avoid when - we are doing PIC on svr4 m68k. */ - #undef OVERRIDE_OPTIONS - #define OVERRIDE_OPTIONS \ - { \ - if (flag_pic) flag_no_function_cse = 1; \ - if (! TARGET_68020 && flag_pic == 2) \ - error("-fPIC is not currently supported on the 68000 or 68010\n"); \ - } - /* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. */ --- 283,288 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/math-3300.h gcc-3.3/gcc/config/m68k/math-3300.h *** gcc-3.2.3/gcc/config/m68k/math-3300.h 2002-01-01 23:21:01.000000000 +0000 --- gcc-3.3/gcc/config/m68k/math-3300.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,461 **** - /******************************************************************\ - * * - * last modified: 18 May 1989. * - * * - * Copyright (C) 1989 by Matthew Self. * - * You may freely distribute verbatim copies of this software * - * provided that this copyright notice is retained in all copies. * - * You may distribute modifications to this software under the * - * conditions above if you also clearly note such modifications * - * with their author and date. * - * * - * Note: errno is not set to EDOM when domain errors occur for * - * most of these functions. Rather, it is assumed that the * - * 68881's OPERR exception will be enabled and handled * - * appropriately by the operating system. Similarly, overflow * - * and underflow do not set errno to ERANGE. * - * * - * Send bugs to Matthew Self (self@bayes.arc.nasa.gov). * - * * - \******************************************************************/ - - #include - - #undef HUGE_VAL - #define HUGE_VAL \ - ({ \ - double huge_val; \ - \ - __asm ("fmove%.d %#0x7ff0000000000000,%0" /* Infinity */ \ - : "=f" (huge_val) \ - : /* no inputs */); \ - huge_val; \ - }) - - __inline static const double sin (double x) - { - double value; - - __asm ("fsin%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double cos (double x) - { - double value; - - __asm ("fcos%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double tan (double x) - { - double value; - - __asm ("ftan%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double asin (double x) - { - double value; - - __asm ("fasin%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double acos (double x) - { - double value; - - __asm ("facos%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double atan (double x) - { - double value; - - __asm ("fatan%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double atan2 (double y, double x) - { - double pi, pi_over_2; - - __asm ("fmovecr%.x %#0,%0" /* extended precision pi */ - : "=f" (pi) - : /* no inputs */ ); - __asm ("fscale%.b %#-1,%0" /* no loss of accuracy */ - : "=f" (pi_over_2) - : "0" (pi)); - if (x > 0) - { - if (y > 0) - { - if (x > y) - return atan (y / x); - else - return pi_over_2 - atan (x / y); - } - else - { - if (x > -y) - return atan (y / x); - else - return - pi_over_2 - atan (x / y); - } - } - else - { - if (y > 0) - { - if (-x > y) - return pi + atan (y / x); - else - return pi_over_2 - atan (x / y); - } - else - { - if (-x > -y) - return - pi + atan (y / x); - else if (y < 0) - return - pi_over_2 - atan (x / y); - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } - } - } - - __inline static const double sinh (double x) - { - double value; - - __asm ("fsinh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double cosh (double x) - { - double value; - - __asm ("fcosh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double tanh (double x) - { - double value; - - __asm ("ftanh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double atanh (double x) - { - double value; - - __asm ("fatanh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double exp (double x) - { - double value; - - __asm ("fetox%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double expm1 (double x) - { - double value; - - __asm ("fetoxm1%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double log (double x) - { - double value; - - __asm ("flogn%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double log1p (double x) - { - double value; - - __asm ("flognp1%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double log10 (double x) - { - double value; - - __asm ("flog10%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double sqrt (double x) - { - double value; - - __asm ("fsqrt%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double pow (const double x, const double y) - { - if (x > 0) - return exp (y * log (x)); - else if (x == 0) - { - if (y > 0) - return 0.0; - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } - else - { - double temp; - - __asm ("fintrz%.x %1,%0" - : "=f" (temp) /* integer-valued float */ - : "f" (y)); - if (y == temp) - { - int i = (int) y; - - if ((i & 1) == 0) /* even */ - return exp (y * log (x)); - else - return - exp (y * log (x)); - } - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } - } - - __inline static const double fabs (double x) - { - double value; - - __asm ("fabs%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; - } - - __inline static const double ceil (double x) - { - int rounding_mode, round_up; - double value; - - __asm volatile ("fmove%.l %%fpcr,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_up = rounding_mode | 0x30; - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (round_up)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; - } - - __inline static const double floor (double x) - { - int rounding_mode, round_down; - double value; - - __asm volatile ("fmove%.l %%fpcr,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_down = (rounding_mode & ~0x10) - | 0x20; - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (round_down)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; - } - - __inline static const double rint (double x) - { - int rounding_mode, round_nearest; - double value; - - __asm volatile ("fmove%.l %%fpcr,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_nearest = rounding_mode & ~0x30; - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (round_nearest)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; - } - - __inline static const double fmod (double x, double y) - { - double value; - - __asm ("fmod%.x %2,%0" - : "=f" (value) - : "0" (x), - "f" (y)); - return value; - } - - __inline static const double drem (double x, double y) - { - double value; - - __asm ("frem%.x %2,%0" - : "=f" (value) - : "0" (x), - "f" (y)); - return value; - } - - __inline static const double scalb (double x, int n) - { - double value; - - __asm ("fscale%.l %2,%0" - : "=f" (value) - : "0" (x), - "dmi" (n)); - return value; - } - - __inline static double logb (double x) - { - double exponent; - - __asm ("fgetexp%.x %1,%0" - : "=f" (exponent) - : "f" (x)); - return exponent; - } - - __inline static const double ldexp (double x, int n) - { - double value; - - __asm ("fscale%.l %2,%0" - : "=f" (value) - : "0" (x), - "dmi" (n)); - return value; - } - - __inline static double frexp (double x, int *exp) - { - double float_exponent; - int int_exponent; - double mantissa; - - __asm ("fgetexp%.x %1,%0" - : "=f" (float_exponent) /* integer-valued float */ - : "f" (x)); - int_exponent = (int) float_exponent; - __asm ("fgetman%.x %1,%0" - : "=f" (mantissa) /* 1.0 <= mantissa < 2.0 */ - : "f" (x)); - if (mantissa != 0) - { - __asm ("fscale%.b %#-1,%0" - : "=f" (mantissa) /* mantissa /= 2.0 */ - : "0" (mantissa)); - int_exponent += 1; - } - *exp = int_exponent; - return mantissa; - } - - __inline static double modf (double x, double *ip) - { - double temp; - - __asm ("fintrz%.x %1,%0" - : "=f" (temp) /* integer-valued float */ - : "f" (x)); - *ip = temp; - return x - temp; - } - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/mot3300.h gcc-3.3/gcc/config/m68k/mot3300.h *** gcc-3.2.3/gcc/config/m68k/mot3300.h 2003-01-30 16:57:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/mot3300.h 2003-01-28 22:18:19.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 118,130 **** #undef PARM_BOUNDARY #define PARM_BOUNDARY 16 - /* cpp has to support a #sccs directive for the /usr/include files */ - - #define SCCS_DIRECTIVE - /* Make output for SDB. */ ! #define SDB_DEBUGGING_INFO #undef REGISTER_PREFIX #define REGISTER_PREFIX "%" --- 118,126 ---- #undef PARM_BOUNDARY #define PARM_BOUNDARY 16 /* Make output for SDB. */ ! #define SDB_DEBUGGING_INFO 1 #undef REGISTER_PREFIX #define REGISTER_PREFIX "%" diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/netbsd-elf.h gcc-3.3/gcc/config/m68k/netbsd-elf.h *** gcc-3.2.3/gcc/config/m68k/netbsd-elf.h 2003-01-30 16:57:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/netbsd-elf.h 2003-01-28 22:18:19.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 24,29 **** --- 24,40 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + NETBSD_OS_CPP_BUILTINS_ELF(); \ + builtin_define ("__m68k__"); \ + builtin_define ("__SVR4_ABI__"); \ + builtin_define ("__motorola__"); \ + builtin_assert ("cpu=m68k"); \ + builtin_assert ("machine=m68k"); \ + } \ + while (0) /* Default target comes from config.gcc */ #undef TARGET_DEFAULT *************** Boston, MA 02111-1307, USA. */ *** 31,44 **** /* Don't try using XFmode on the 68010. */ - #if TARGET_DEFAULT == 0 #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE 64 ! ! /* Use software floating point emulator for REAL_ARITHMETIC and ! decimal <-> binary conversion. */ ! #define REAL_ARITHMETIC ! #endif #ifdef __mc68010__ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 --- 42,51 ---- /* Don't try using XFmode on the 68010. */ #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE \ ! ((TARGET_68020 || TARGET_68040 || TARGET_68040_ONLY || \ ! TARGET_68060) ? 96 : 64) #ifdef __mc68010__ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 *************** Boston, MA 02111-1307, USA. */ *** 50,56 **** { "cpp_cpu_default_spec", CPP_CPU_DEFAULT_SPEC }, \ { "cpp_cpu_spec", CPP_CPU_SPEC }, \ { "cpp_fpu_spec", CPP_FPU_SPEC }, \ ! { "asm_default_spec", ASM_DEFAULT_SPEC }, #define CPP_CPU_SPEC \ --- 57,65 ---- { "cpp_cpu_default_spec", CPP_CPU_DEFAULT_SPEC }, \ { "cpp_cpu_spec", CPP_CPU_SPEC }, \ { "cpp_fpu_spec", CPP_FPU_SPEC }, \ ! { "asm_default_spec", ASM_DEFAULT_SPEC }, \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ ! { "netbsd_entry_point", NETBSD_ENTRY_POINT }, #define CPP_CPU_SPEC \ *************** Boston, MA 02111-1307, USA. */ *** 86,92 **** #undef CPP_SPEC #define CPP_SPEC \ ! "%{posix:-D_POSIX_SOURCE} %(cpp_cpu_spec) %(cpp_fpu_spec)" /* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We pass --- 95,101 ---- #undef CPP_SPEC #define CPP_SPEC \ ! "%(netbsd_cpp_spec) %(cpp_cpu_spec) %(cpp_fpu_spec)" /* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We pass *************** Boston, MA 02111-1307, USA. */ *** 98,131 **** %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \ %{fpic:-k} %{fPIC:-k -K}" ! ! /* Provide a set of CPP pre-definitions and pre-assertions appropriate ! for NetBSD m68k ELF targets (using the SVR4 ABI). */ ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-D__NetBSD__ -D__ELF__ -D__m68k__ -D__SVR4_ABI__ -D__motorola__ \ ! -Asystem=unix -Asystem=NetBSD -Acpu=m68k -Amachine=m68k" ! ! ! /* Provide a LINK_SPEC appropriate for a NetBSD/m68k ELF target. ! This is a copy of LINK_SPEC from tweaked for ! the m68k target. */ #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{assert*} %{R*} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dc -dp \ ! %{!nostdlib: \ ! %{!r*: \ ! %{!e*:-e _start}}} \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ ! %{static:-static}}" /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function only. */ --- 107,118 ---- %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \ %{fpic:-k} %{fPIC:-k -K}" ! /* Provide a LINK_SPEC appropriate for a NetBSD/m68k ELF target. */ #undef LINK_SPEC ! #define LINK_SPEC NETBSD_LINK_SPEC_ELF + #define NETBSD_ENTRY_POINT "_start" /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function only. */ *************** while (0) *** 289,305 **** fprintf ((FILE), ",%u\n", (SIZE))) - /* Turn off function cse if we are doing PIC. We always want function - call to be done as `bsr foo@PLTPC', so it will force the assembler - to create the PLT entry for `foo'. Doing function cse will cause - the address of `foo' to be loaded into a register, which is exactly - what we want to avoid when we are doing PIC on svr4 m68k. */ - - #undef SUBTARGET_OVERRIDE_OPTIONS - #define SUBTARGET_OVERRIDE_OPTIONS \ - if (flag_pic) flag_no_function_cse = 1; - - /* XXX This is the end of the chunk lifted from m68kelf.h */ --- 276,281 ---- *************** while (0) *** 448,483 **** #undef DEFAULT_PCC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 1 - - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - do \ - { \ - if (DELTA > 0 && DELTA <= 8) \ - asm_fprintf (FILE, "\taddq.l %I%d,4(%Rsp)\n", DELTA); \ - else if (DELTA < 0 && DELTA >= -8) \ - asm_fprintf (FILE, "\tsubq.l %I%d,4(%Rsp)\n", -DELTA); \ - else \ - asm_fprintf (FILE, "\tadd.l %I%d,4(%Rsp)\n", DELTA); \ - \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tbra.l "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "@PLTPC\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tjmp "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "\n"); \ - } \ - } \ - while (0) - - /* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. */ --- 424,429 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/netbsd.h gcc-3.3/gcc/config/m68k/netbsd.h *** gcc-3.2.3/gcc/config/m68k/netbsd.h 2002-02-05 19:01:52.000000000 +0000 --- gcc-3.3/gcc/config/m68k/netbsd.h 2002-08-29 21:40:13.000000000 +0000 *************** *** 1,3 **** --- 1,16 ---- + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + NETBSD_OS_CPP_BUILTINS_AOUT(); \ + builtin_define_std ("unix"); \ + builtin_define_std ("m68k"); \ + builtin_define_std ("mc68000"); \ + builtin_define_std ("mc68020"); \ + builtin_assert ("cpu=m68k"); \ + builtin_assert ("machine=m68k"); \ + } \ + while (0) + #include /* Get generic NetBSD definitions. */ *************** *** 7,24 **** #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. This will control the use of inline 68881 insns in certain macros. */ #undef CPP_SPEC ! #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}" #undef ASM_SPEC #define ASM_SPEC " %| %{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}" - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__NetBSD__ -Asystem=unix -Asystem=NetBSD -Acpu=m68k -Amachine=m68k" /* Make gcc agree with */ --- 20,38 ---- #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) + #define EXTRA_SPECS \ + { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, + /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. This will control the use of inline 68881 insns in certain macros. */ #undef CPP_SPEC ! #define CPP_SPEC \ ! "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %(netbsd_cpp_spec)" #undef ASM_SPEC #define ASM_SPEC " %| %{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}" /* Make gcc agree with */ *************** *** 34,40 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Do not break .stabs pseudos into continuations. */ --- 48,54 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Do not break .stabs pseudos into continuations. */ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/news3gas.h gcc-3.3/gcc/config/m68k/news3gas.h *** gcc-3.2.3/gcc/config/m68k/news3gas.h 1998-12-16 21:07:09.000000000 +0000 --- gcc-3.3/gcc/config/m68k/news3gas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,6 **** - #include "m68k/newsgas.h" - - /* This is to be compatible with types.h. - It was found to be necessary with Newsos 3. */ - - #define SIZE_TYPE "long int" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/news3.h gcc-3.3/gcc/config/m68k/news3.h *** gcc-3.2.3/gcc/config/m68k/news3.h 1998-12-16 21:07:08.000000000 +0000 --- gcc-3.3/gcc/config/m68k/news3.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,6 **** - #include "m68k/news.h" - - /* This is to be compatible with types.h. - It was found to be necessary with Newsos 3. */ - - #define SIZE_TYPE "long int" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/newsgas.h gcc-3.3/gcc/config/m68k/newsgas.h *** gcc-3.2.3/gcc/config/m68k/newsgas.h 2000-09-25 09:49:20.000000000 +0000 --- gcc-3.3/gcc/config/m68k/newsgas.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,19 **** - /* In Sony versions before 3.0, use the GNU Assembler, because the - system's assembler has no way to assemble the difference of two - labels for the displacement in a switch-dispatch instruction. */ - - #define USE_GAS - - /* This is the assembler directive to equate two values. */ - - #undef SET_ASM_OP - #define SET_ASM_OP "\t.set\t" - - /* This is how we tell the assembler that a symbol is weak. */ - - #undef ASM_WEAKEN_LABEL - #define ASM_WEAKEN_LABEL(FILE,NAME) \ - do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ - fputc ('\n', FILE); } while (0) - - #include "m68k/news.h" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/news.h gcc-3.3/gcc/config/m68k/news.h *** gcc-3.2.3/gcc/config/m68k/news.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/news.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,439 **** - /* Definitions of target machine for GNU compiler. SONY NEWS-OS 4 version. - Copyright (C) 1987, 1989, 1993, 1994, 1996, 1997, 1998, 1999 - Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #ifndef USE_GAS - /* This controls conditionals in m68k.h. */ - #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ - #define SGS_NO_LI /* Suppress jump table label usage */ - #endif - - #define NEWS - #define NO_DOLLAR_IN_LABEL - #define NO_DOT_IN_LABEL - - #include "m68k/m68k.h" - - /* See m68k.h. 7 means 68020 with 68881. */ - - #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) - - /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. - This will control the use of inline 68881 insns in certain macros. */ - - #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" - - /* Names to predefine in the preprocessor for this target machine. */ - /* These are the ones defined by Sony, plus mc68000 for uniformity with - GCC on other 68000 systems. */ - - #ifdef MOTOROLA - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dnews700 -D__motorola__ -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #else - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dnews700 -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #endif - - /* These conditionals tested for different submodels, - but they were incorrect since they tested the host rather than the target. - The choice of model shouldn't actually matter. */ - - #if 0 - #ifdef news800 - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dnews800 -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #endif - #ifdef news900 - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dnews900 -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #endif - #ifdef news1500 - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dmc68030 -Dnews1500 -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #endif - #ifdef news1700 - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dmc68030 -Dnews1700 -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #endif - #ifdef news1800 - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dmc68030 -Dnews1800 -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #endif - #ifdef news1900 - #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68000 -Dmc68020 -Dmc68030 -Dnews1900 -Asystem=unix -Asystem=bsd -Acpu=m68k -Amachine=m68k" - #endif - #endif - - /* Link with libg.a when debugging, for dbx's sake. */ - - #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} " - - /* This is BSD, so it wants DBX format. */ - - #define DBX_DEBUGGING_INFO - - #if 0 - /* This is to be compatible with types.h. - It was found to be necessary with Newsos 3. */ - - #define SIZE_TYPE "long int" - #endif - - /* Override parts of m68k.h to fit Sony's assembler syntax. */ - - #undef BIGGEST_ALIGNMENT - #undef CALL_USED_REGISTERS - #undef FUNCTION_VALUE - #undef LIBCALL_VALUE - #undef FUNCTION_PROFILER - - #ifdef MOTOROLA - #undef REGISTER_NAMES - #undef ASM_OUTPUT_REG_PUSH - #undef ASM_OUTPUT_REG_POP - #undef ASM_OUTPUT_SKIP - #undef ASM_FORMAT_PRIVATE_NAME - #endif - - #undef ASM_OUTPUT_ALIGN - - /* There is no point aligning anything to a rounder boundary than this. */ - #define BIGGEST_ALIGNMENT 32 - - /* A bitfield declared as `int' forces `int' alignment for the struct. */ - #define PCC_BITFIELD_TYPE_MATTERS 1 - - /* NEWS makes d2, d3, fp2 and fp3 unsaved registers, unlike the Sun system. */ - - #define CALL_USED_REGISTERS \ - {1, 1, 1, 1, 0, 0, 0, 0, \ - 1, 1, 0, 0, 0, 0, 0, 1, \ - 1, 1, 1, 1, 0, 0, 0, 0} - - /* NEWS returns floats and doubles in fp0, not d0/d1. */ - - #define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE)) - - #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG ((MODE), \ - ((TARGET_68881 \ - && ((MODE) == SFmode || (MODE) == DFmode \ - || (MODE) == XFmode)) \ - ? 16 : 0)) - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - fprintf (FILE, "\t.align %d\n", (LOG)) - - #ifdef MOTOROLA - - #define FUNCTION_PROFILER(FILE, LABEL_NO) \ - fprintf (FILE, "\tmove.l #LP%d,d0\n\tjsr mcount\n", (LABEL_NO)); - - /* Difference from m68k.h is in `fp' instead of `a6'. */ - - #define REGISTER_NAMES \ - {"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", \ - "a0", "a1", "a2", "a3", "a4", "a5", "fp", "sp", \ - "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7"} - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tmove.l %s,-(sp)\n", reg_names[REGNO]) - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tmove.l (sp)+,%s\n", reg_names[REGNO]) - - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\t.space %u\n", (SIZE)) - - #if 0 - /* The NEWS assembler in version 3.4 complains about fmove.d, but this - macro proved not to work right. 3.4 is old, so forget about it. */ - #define ASM_OUTPUT_OPCODE(FILE, STRING) \ - { \ - if (!strncmp (STRING, "fmove.d", 7) \ - && CONSTANT_P (operands[1])) \ - { \ - fprintf (FILE, "fmove.x"); \ - STRING += 7; \ - } \ - } - #endif - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 13), \ - sprintf ((OUTPUT), "%s$$$%d", (NAME), (LABELNO))) - - /* Output a float value (represented as a C double) as an immediate operand. - This macro is a 68k-specific macro. */ - - #undef ASM_OUTPUT_FLOAT_OPERAND - #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ - do { \ - if (CODE == 'f') \ - { \ - char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.9e", dstr); \ - if (REAL_VALUE_ISINF (VALUE) || REAL_VALUE_ISNAN (VALUE)) \ - { \ - if (REAL_VALUE_NEGATIVE (VALUE)) \ - fprintf (FILE, "#0f-99e999"); \ - else \ - fprintf (FILE, "#0f99e999"); \ - } \ - else if (REAL_VALUE_MINUS_ZERO (VALUE)) \ - fprintf (FILE, "#0f-0.0"); \ - else \ - fprintf (FILE, "#0f%s", dstr); \ - } \ - else \ - { \ - long l; \ - REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - fprintf (FILE, "#0x%lx", l); \ - } \ - } while (0) - - /* Output a double value (represented as a C double) as an immediate operand. - This macro is a 68k-specific macro. */ - #undef ASM_OUTPUT_DOUBLE_OPERAND - #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ - do { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr ); \ - if (REAL_VALUE_ISINF (VALUE) || REAL_VALUE_ISNAN (VALUE)) \ - { \ - if (REAL_VALUE_NEGATIVE (VALUE)) \ - fprintf (FILE, "#0d-99e999"); \ - else \ - fprintf (FILE, "#0d99e999"); \ - } \ - else if (REAL_VALUE_MINUS_ZERO (VALUE)) \ - fprintf (FILE, "#0d-0.0"); \ - else \ - fprintf (FILE, "#0d%s", dstr); \ - } while (0) - - /* Note, long double immediate operands are not actually - generated by m68k.md. */ - #undef ASM_OUTPUT_LONG_DOUBLE_OPERAND - #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \ - do { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ - asm_fprintf (FILE, "%I0r%s", dstr); \ - } while (0) - - #if 0 - #undef PRINT_OPERAND - #define PRINT_OPERAND(FILE, X, CODE) \ - { if (CODE == '.') fprintf (FILE, "."); \ - else if (CODE == '#') fprintf (FILE, "#"); \ - else if (CODE == '-') fprintf (FILE, "-(sp)"); \ - else if (CODE == '+') fprintf (FILE, "(sp)+"); \ - else if (CODE == '@') fprintf (FILE, "(sp)"); \ - else if (CODE == '!') fprintf (FILE, "fpcr"); \ - else if (CODE == '$') {if (TARGET_68040_ONLY) fprintf (FILE, "s");} \ - else if (CODE == '&') {if (TARGET_68040_ONLY) fprintf (FILE, "d");} \ - else if (CODE == '/') \ - ; \ - else if (GET_CODE (X) == REG) \ - fprintf (FILE, "%s", reg_names[REGNO (X)]); \ - else if (GET_CODE (X) == MEM) \ - output_address (XEXP (X, 0)); \ - else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \ - { REAL_VALUE_TYPE r; \ - REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ - if (CODE == 'f') \ - { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL (r, "%.9e", dstr); \ - if (REAL_VALUE_ISINF (r) || REAL_VALUE_ISNAN (r)) { \ - if (REAL_VALUE_NEGATIVE (r)) \ - fprintf (FILE, "#0f-99e999"); \ - else \ - fprintf (FILE, "#0f99e999"); } \ - else if (REAL_VALUE_MINUS_ZERO (r)) \ - fprintf (FILE, "#0f-0.0"); \ - else \ - fprintf (FILE, "#0f%s", dstr); \ - } \ - else \ - { long l; \ - REAL_VALUE_TO_TARGET_SINGLE (r, l); \ - fprintf (FILE, "#0x%lx", l); \ - }} \ - else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \ - { REAL_VALUE_TYPE r; \ - REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ - ASM_OUTPUT_LONG_DOUBLE_OPERAND (FILE, r); } \ - else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ - { REAL_VALUE_TYPE r; char dstr[30]; \ - REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ - REAL_VALUE_TO_DECIMAL (r, "%.20e", dstr ); \ - if (REAL_VALUE_ISINF (r) || REAL_VALUE_ISNAN (r)) { \ - if (REAL_VALUE_NEGATIVE (r)) \ - fprintf (FILE, "#0d-99e999"); \ - else \ - fprintf (FILE, "#0d99e999"); } \ - else if (REAL_VALUE_MINUS_ZERO (r)) \ - fprintf (FILE, "#0d-0.0"); \ - else \ - fprintf (FILE, "#0d%s", dstr); } \ - else if (CODE == 'b') output_addr_const (FILE, X); \ - else { putc ('#', FILE); output_addr_const (FILE, X); }} - #endif - - #undef PRINT_OPERAND_ADDRESS - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - { register rtx reg1, reg2, breg, ireg; \ - register rtx addr = ADDR; \ - rtx offset; \ - switch (GET_CODE (addr)) \ - { \ - case REG: \ - fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \ - break; \ - case PRE_DEC: \ - fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \ - break; \ - case POST_INC: \ - fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \ - break; \ - case PLUS: \ - reg1 = 0; reg2 = 0; \ - ireg = 0; breg = 0; \ - offset = 0; \ - if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) \ - { \ - offset = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) \ - { \ - offset = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - if (GET_CODE (addr) != PLUS) ; \ - else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) \ - { \ - reg1 = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) \ - { \ - reg1 = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - else if (GET_CODE (XEXP (addr, 0)) == MULT) \ - { \ - reg1 = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (GET_CODE (XEXP (addr, 1)) == MULT) \ - { \ - reg1 = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - else if (GET_CODE (XEXP (addr, 0)) == REG) \ - { \ - reg1 = XEXP (addr, 0); \ - addr = XEXP (addr, 1); \ - } \ - else if (GET_CODE (XEXP (addr, 1)) == REG) \ - { \ - reg1 = XEXP (addr, 1); \ - addr = XEXP (addr, 0); \ - } \ - if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT \ - || GET_CODE (addr) == SIGN_EXTEND) \ - { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; } \ - if (offset != 0) { if (addr != 0) abort (); addr = offset; } \ - if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND \ - || GET_CODE (reg1) == MULT)) \ - || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) \ - { breg = reg2; ireg = reg1; } \ - else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) \ - { breg = reg1; ireg = reg2; } \ - if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF) \ - { int scale = 1; \ - if (GET_CODE (ireg) == MULT) \ - { scale = INTVAL (XEXP (ireg, 1)); \ - ireg = XEXP (ireg, 0); } \ - if (GET_CODE (ireg) == SIGN_EXTEND) \ - fprintf (FILE, "(L%d.b,pc,%s.w", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (XEXP (ireg, 0))]); \ - else \ - fprintf (FILE, "(L%d.b,pc,%s.l", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (ireg)]); \ - if (scale != 1) fprintf (FILE, "*%d", scale); \ - putc (')', FILE); \ - break; } \ - if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF) \ - { fprintf (FILE, "(L%d.b,pc,%s.l", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (breg)]); \ - putc (')', FILE); \ - break; } \ - if (ireg != 0 || breg != 0) \ - { int scale = 1; \ - if (breg == 0) \ - abort (); \ - if (addr && GET_CODE (addr) == LABEL_REF) abort (); \ - fprintf (FILE, "("); \ - if (addr != 0) { \ - output_addr_const (FILE, addr); \ - putc (',', FILE); } \ - fprintf (FILE, "%s", reg_names[REGNO (breg)]); \ - if (ireg != 0) \ - putc (',', FILE); \ - if (ireg != 0 && GET_CODE (ireg) == MULT) \ - { scale = INTVAL (XEXP (ireg, 1)); \ - ireg = XEXP (ireg, 0); } \ - if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ - fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \ - else if (ireg != 0) \ - fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \ - if (scale != 1) fprintf (FILE, "*%d", scale); \ - putc (')', FILE); \ - break; \ - } \ - else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF) \ - { fprintf (FILE, "(L%d.b,pc,%s.l)", \ - CODE_LABEL_NUMBER (XEXP (addr, 0)), \ - reg_names[REGNO (reg1)]); \ - break; } \ - default: \ - if (GET_CODE (addr) == CONST_INT \ - && INTVAL (addr) < 0x8000 \ - && INTVAL (addr) >= -0x8000) \ - fprintf (FILE, "%d.w", INTVAL (addr)); \ - else \ - output_addr_const (FILE, addr); \ - }} - - #else /* Using GAS, which uses the MIT assembler syntax, like a Sun. */ - - #define FUNCTION_PROFILER(FILE, LABEL_NO) \ - fprintf (FILE, "\tmovl #LP%d,d0\n\tjsr mcount\n", (LABEL_NO)); - - #endif /* MOTOROLA */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/next21.h gcc-3.3/gcc/config/m68k/next21.h *** gcc-3.2.3/gcc/config/m68k/next21.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/next21.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,72 **** - /* Target definitions for GNU compiler for mc680x0 running NeXTSTEP 2.1 - Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994 - Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */ - - #include "m68k/next.h" - #include "nextstep21.h" - - /* for #include in libgcc2.c */ - #define NeXTStep21 - - /* called from m68k.c line 1881 */ - #undef ASM_OUTPUT_FLOAT_OPERAND - #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ - do{ \ - if (CODE != 'f') \ - { \ - long l; \ - REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", (int) l); \ - else \ - asm_fprintf ((FILE), "%I0x%lx", l); \ - } \ - else if (REAL_VALUE_ISINF (VALUE)) \ - { \ - if (REAL_VALUE_NEGATIVE (VALUE)) \ - fprintf (FILE, "#0r-99e999"); \ - else \ - fprintf (FILE, "#0r99e999"); \ - } \ - else \ - { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \ - fprintf (FILE, "#0r%s", dstr); \ - } \ - } while (0) - - #undef ASM_OUTPUT_DOUBLE_OPERAND - #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ - do { if (REAL_VALUE_ISINF (VALUE)) \ - { \ - if (REAL_VALUE_NEGATIVE (VALUE)) \ - fprintf (FILE, "#0r-99e999"); \ - else \ - fprintf (FILE, "#0r99e999"); \ - } \ - else \ - { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \ - fprintf (FILE, "#0r%s", dstr); \ - } \ - } while (0) - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/next.h gcc-3.3/gcc/config/m68k/next.h *** gcc-3.2.3/gcc/config/m68k/next.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/next.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,147 **** - /* Target definitions for GNU compiler for mc680x0 running NeXTSTEP - Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999 - Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "m68k/m68k.h" - #include "nextstep.h" - - /* See m68k.h. 0407 means 68040 (or 68030 or 68020, with 68881/2). */ - - #define TARGET_DEFAULT (MASK_68040|MASK_BITFIELD|MASK_68881|MASK_68020) - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - - #undef STACK_BOUNDARY - #define STACK_BOUNDARY 32 - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dmc68000 -Dm68k -DNeXT -Dunix -D__MACH__ -D__BIG_ENDIAN__ -D__ARCHITECTURE__=\"m68k\" -Asystem=unix -Asystem=mach -Acpu=m68k -Amachine=m68k -D_NEXT_SOURCE" - - /* Every structure or union's size must be a multiple of 2 bytes. - (Why isn't this in m68k.h?) */ - - #define STRUCTURE_SIZE_BOUNDARY 16 - - #undef ASM_OUTPUT_FLOAT_OPERAND - #ifdef REAL_VALUE_TO_TARGET_SINGLE - #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ - do { \ - long hex; \ - REAL_VALUE_TO_TARGET_SINGLE (VALUE, hex); \ - fprintf (FILE, "#0%c%lx", (CODE) == 'f' ? 'b' : 'x', hex); \ - } while (0) - #else - #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ - do{ \ - if (CODE != 'f') \ - { \ - long l; \ - REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", (int) l); \ - else \ - asm_fprintf ((FILE), "%I0x%lx", l); \ - } \ - else if (REAL_VALUE_ISINF (VALUE)) \ - { \ - if (REAL_VALUE_NEGATIVE (VALUE)) \ - fprintf (FILE, "#0r-99e999"); \ - else \ - fprintf (FILE, "#0r99e999"); \ - } \ - else \ - { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \ - fprintf (FILE, "#0r%s", dstr); \ - } \ - } while (0) - #endif - - #undef ASM_OUTPUT_DOUBLE_OPERAND - #ifdef REAL_VALUE_TO_TARGET_DOUBLE - #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ - do { \ - long hex[2]; \ - REAL_VALUE_TO_TARGET_DOUBLE (VALUE, hex); \ - fprintf (FILE, "#0b%lx%08lx", hex[0], hex[1]); \ - } while (0) - #else - #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ - do { if (REAL_VALUE_ISINF (VALUE)) \ - { \ - if (REAL_VALUE_NEGATIVE (VALUE)) \ - fprintf (FILE, "#0r-99e999"); \ - else \ - fprintf (FILE, "#0r99e999"); \ - } \ - else \ - { char dstr[30]; \ - REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \ - fprintf (FILE, "#0r%s", dstr); \ - } \ - } while (0) - #endif - - /* We do not define JUMP_TABLES_IN_TEXT_SECTION, since we wish to keep - the text section pure. There is no point in addressing the jump - tables using pc relative addressing, since they are not in the text - section, so we undefine CASE_VECTOR_PC_RELATIVE. This also - causes the compiler to use absolute addresses in the jump table, - so we redefine CASE_VECTOR_MODE to be SImode. */ - - #undef CASE_VECTOR_MODE - #define CASE_VECTOR_MODE SImode - #undef CASE_VECTOR_PC_RELATIVE - - /* Make sure jump tables have the same alignment as other pointers. */ - - #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \ - { ASM_OUTPUT_ALIGN (FILE, 1); ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); } - - /* Don't treat addresses involving labels differently from symbol names. - Previously, references to labels generated pc-relative addressing modes - while references to symbol names generated absolute addressing modes. */ - - #undef GO_IF_INDEXABLE_BASE - #define GO_IF_INDEXABLE_BASE(X, ADDR) \ - { if (LEGITIMATE_BASE_REG_P (X)) goto ADDR; } - - /* This accounts for the return pc and saved fp on the m68k. */ - - #define OBJC_FORWARDING_STACK_OFFSET 8 - #define OBJC_FORWARDING_MIN_OFFSET 8 - - /* FINALIZE_TRAMPOLINE enables executable stack. The - __enable_execute_stack also clears the insn cache. */ - - #undef FINALIZE_TRAMPOLINE - #define FINALIZE_TRAMPOLINE(TRAMP) \ - emit_library_call(gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), \ - 0, VOIDmode, 1, memory_address (SImode, (TRAMP)), Pmode) - - /* A C expression used to clear the instruction cache from - address BEG to address END. On NeXTSTEP this i a system trap. */ - - #define CLEAR_INSN_CACHE(BEG, END) \ - asm volatile ("trap #2") - - /* GCC is the primary compiler for NeXTSTEP, so we don't need this. */ - #undef PCC_STATIC_STRUCT_RETURN --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/openbsd.h gcc-3.3/gcc/config/m68k/openbsd.h *** gcc-3.2.3/gcc/config/m68k/openbsd.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m68k/openbsd.h 2002-10-20 22:37:11.000000000 +0000 *************** *** 1,5 **** /* Configuration file for an m68k OpenBSD target. ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Configuration file for an m68k OpenBSD target. ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 63,69 **** /* Specific options for DBX Output. */ /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Do not break .stabs pseudos into continuations. */ #define DBX_CONTIN_LENGTH 0 --- 63,69 ---- /* Specific options for DBX Output. */ /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Do not break .stabs pseudos into continuations. */ #define DBX_CONTIN_LENGTH 0 *************** Boston, MA 02111-1307, USA. */ *** 84,121 **** dwarf unwind information. egcs doesn't try too hard to check internal configuration files... */ #define DWARF2_UNWIND_INFO 0 - - - /* TODO: ASM_OUTPUT_MI_THUNK is busted. I need to figure out - what bra func@PLTPC means under linux, and find the corresponding - construction for our gas/pic setup. */ - #if 0 - /* Taken from linux.h. Processor dependent optimized code to handle C++ - multiple inheritance vtable lookup. */ - - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - do { \ - if (DELTA > 0 && DELTA <= 8) \ - asm_fprintf (FILE, "\taddq.l %I%d,4(%Rsp)\n", DELTA); \ - else if (DELTA < 0 && DELTA >= -8) \ - asm_fprintf (FILE, "\tsubq.l %I%d,4(%Rsp)\n", -DELTA); \ - else \ - asm_fprintf (FILE, "\tadd.l %I%d,4(%Rsp)\n", DELTA); \ - \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tbra.l "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "@PLTPC\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tjmp "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "\n"); \ - } \ - } while (0) - #endif - --- 84,86 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/pbb.h gcc-3.3/gcc/config/m68k/pbb.h *** gcc-3.2.3/gcc/config/m68k/pbb.h 2003-01-30 16:57:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/pbb.h 2003-01-28 22:18:20.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 47,53 **** /* We want DBX format for use with gdb under COFF. */ ! #define DBX_DEBUGGING_INFO /* Generate calls to memcpy, memcmp and memset. */ --- 47,53 ---- /* We want DBX format for use with gdb under COFF. */ ! #define DBX_DEBUGGING_INFO 1 /* Generate calls to memcpy, memcmp and memset. */ *************** Boston, MA 02111-1307, USA. */ *** 83,92 **** #define ENDFILE_SPEC "crtn.o%s" - /* cpp has to support a #sccs directive for the /usr/include files */ - - #define SCCS_DIRECTIVE - /* GAS register prefix assembly syntax: */ /* User labels have no prefix */ --- 83,88 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/plexus.h gcc-3.3/gcc/config/m68k/plexus.h *** gcc-3.2.3/gcc/config/m68k/plexus.h 2001-11-27 15:36:24.000000000 +0000 --- gcc-3.3/gcc/config/m68k/plexus.h 2002-08-29 21:40:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 85,91 **** #ifdef HAVE_GAS_2_X #undef DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ --- 85,91 ---- #ifdef HAVE_GAS_2_X #undef DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO 1 #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/rtems.h gcc-3.3/gcc/config/m68k/rtems.h *** gcc-3.2.3/gcc/config/m68k/rtems.h 2002-04-12 13:09:30.000000000 +0000 --- gcc-3.3/gcc/config/m68k/rtems.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,26 **** - /* Definitions for rtems targeting a Motorola m68k using coff. - Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. - Contributed by Joel Sherrill (joel@OARcorp.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Specify predefined symbols in preprocessor. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dmc68000 -D__rtems__ \ - -Asystem=rtems -Acpu=mc68000 -Acpu=m68k -Amachine=m68k" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/sun2.h gcc-3.3/gcc/config/m68k/sun2.h *** gcc-3.2.3/gcc/config/m68k/sun2.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m68k/sun2.h 2002-08-29 21:40:13.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 74,77 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO --- 74,77 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/sun2o4.h gcc-3.3/gcc/config/m68k/sun2o4.h *** gcc-3.2.3/gcc/config/m68k/sun2o4.h 2001-12-20 17:36:36.000000000 +0000 --- gcc-3.3/gcc/config/m68k/sun2o4.h 2002-10-16 00:40:33.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 121,127 **** } \ else \ { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \ fprintf (FILE, "#0r%s", dstr); \ } \ } while (0) --- 121,127 ---- } \ else \ { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 9, 0); \ fprintf (FILE, "#0r%s", dstr); \ } \ } while (0) *************** Boston, MA 02111-1307, USA. */ *** 141,147 **** } \ else \ { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \ fprintf (FILE, "#0r%s", dstr); \ } \ } while (0) --- 141,147 ---- } \ else \ { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1); \ fprintf (FILE, "#0r%s", dstr); \ } \ } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/sun3.h gcc-3.3/gcc/config/m68k/sun3.h *** gcc-3.2.3/gcc/config/m68k/sun3.h 2002-05-21 23:45:06.000000000 +0000 --- gcc-3.3/gcc/config/m68k/sun3.h 2002-10-16 00:40:33.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 161,170 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO ! ! /* Allow folding division by zero. */ ! #define REAL_INFINITY /* Generate calls to memcpy, memcmp and memset. */ #define TARGET_MEM_FUNCTIONS --- 161,167 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Generate calls to memcpy, memcmp and memset. */ #define TARGET_MEM_FUNCTIONS *************** Boston, MA 02111-1307, USA. */ *** 211,217 **** } \ else \ { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } \ } while (0) --- 208,214 ---- } \ else \ { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 9, 0); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } \ } while (0) *************** Boston, MA 02111-1307, USA. */ *** 231,237 **** } \ else \ { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL ((VALUE), "%.17g", dstr); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } \ } while (0) --- 228,234 ---- } \ else \ { char dstr[30]; \ ! real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1); \ asm_fprintf (FILE, "%I0r%s", dstr); \ } \ } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/t-aux gcc-3.3/gcc/config/m68k/t-aux *** gcc-3.2.3/gcc/config/m68k/t-aux 2001-05-01 17:45:05.000000000 +0000 --- gcc-3.3/gcc/config/m68k/t-aux 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,41 **** - # Makefile additions for A/UX - - LIB2FUNCS_EXTRA=aux-mcount.c aux-exit.c - - FIXPROTO_DEFINES=-D_POSIX_SOURCE - - # Needed to support builds for multiple versions of A/UX - # LDFLAGS=-static - - # Make sure we get the right assembler by letting gcc choose - AS = $(GCC_FOR_TARGET) -xassembler-with-cpp -D__ASSEMBLY__ $(INCLUDES) -c - - aux-mcount.c: $(srcdir)/config/m68k/aux-mcount.c - cp $(srcdir)/config/m68k/aux-mcount.c aux-mcount.c - - aux-exit.c: $(srcdir)/config/m68k/aux-exit.c - cp $(srcdir)/config/m68k/aux-exit.c aux-exit.c - - crt1.o: $(srcdir)/config/m68k/aux-crt1.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -o crt1.o -c \ - -fno-omit-frame-pointer $(srcdir)/config/m68k/aux-crt1.c - - mcrt1.o: $(srcdir)/config/m68k/aux-crt1.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -o mcrt1.o -c \ - -fno-omit-frame-pointer -DMCRT1 $(srcdir)/config/m68k/aux-crt1.c - - maccrt1.o: $(srcdir)/config/m68k/aux-crt1.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -o maccrt1.o -c \ - -fno-omit-frame-pointer -DMACCRT1 $(srcdir)/config/m68k/aux-crt1.c - - crt2.o: $(srcdir)/config/m68k/aux-crt2.asm $(GCC_PASSES) - $(AS) -o crt2.o $(srcdir)/config/m68k/aux-crt2.asm - - crtn.o: $(srcdir)/config/m68k/aux-crtn.asm $(GCC_PASSES) - $(AS) -o crtn.o $(srcdir)/config/m68k/aux-crtn.asm - - low.gld: $(srcdir)/config/m68k/aux-low.gld - sed -e 's|@libdir@|$(libdir)|' -e 's|@tooldir@|$(tooldir)|' \ - -e 's|@local_prefix@|$(local_prefix)|' \ - $(srcdir)/config/m68k/aux-low.gld > tmp-low.gld - mv tmp-low.gld low.gld --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/t-lynx gcc-3.3/gcc/config/m68k/t-lynx *** gcc-3.2.3/gcc/config/m68k/t-lynx 2001-05-17 03:16:01.000000000 +0000 --- gcc-3.3/gcc/config/m68k/t-lynx 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,5 **** - LIB1ASMSRC = m68k/lb1sf68.asm - LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ - _double _float _floatex \ - _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ - _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/t-next gcc-3.3/gcc/config/m68k/t-next *** gcc-3.2.3/gcc/config/m68k/t-next 2002-01-10 22:03:05.000000000 +0000 --- gcc-3.3/gcc/config/m68k/t-next 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,8 **** - # Specify other dirs of system header files to be fixed. - OTHER_FIXINCLUDES_DIRS= /LocalDeveloper/Headers - - # is sometimes in /usr/include/ansi/limits.h. - LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h -o -f $(SYSTEM_HEADER_DIR)/ansi/limits.h ] - - nextstep.o: $(srcdir)/config/nextstep.c $(CONFIG_H) flags.h tree.h - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/tower-as.h gcc-3.3/gcc/config/m68k/tower-as.h *** gcc-3.2.3/gcc/config/m68k/tower-as.h 2002-05-21 23:45:06.000000000 +0000 --- gcc-3.3/gcc/config/m68k/tower-as.h 2002-08-29 21:40:13.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. For NCR Tower 32/4x0 and 32/6x0 running System V Release 3. ! Copyright (C) 1990, 1993, 1994, 1996, 1997, 2000 Free Software Foundation, Inc. Contributed by Robert Andersson (ra@intsys.no), International Systems, Oslo, Norway. --- 1,7 ---- /* Definitions of target machine for GNU compiler. For NCR Tower 32/4x0 and 32/6x0 running System V Release 3. ! Copyright (C) 1990, 1993, 1994, 1996, 1997, 2000, 2002 ! Free Software Foundation, Inc. Contributed by Robert Andersson (ra@intsys.no), International Systems, Oslo, Norway. *************** Boston, MA 02111-1307, USA. */ *** 29,35 **** 1.37.1 version. */ #include "m68k/tower.h" - #undef SELECT_RTX_SECTION /* Use default settings for system V.3. */ --- 30,35 ---- *************** Boston, MA 02111-1307, USA. */ *** 68,74 **** /* Turn on SDB debugging info. */ ! #define SDB_DEBUGGING_INFO /* All the ASM_OUTPUT macros need to conform to the Tower as syntax. */ --- 68,74 ---- /* Turn on SDB debugging info. */ ! #define SDB_DEBUGGING_INFO 1 /* All the ASM_OUTPUT macros need to conform to the Tower as syntax. */ *************** do { fprintf (asm_out_file, "\ttag\t"); *** 523,530 **** #define INIT_SECTION_ASM_OP "\tsection\t~init" #undef FINI_SECTION_ASM_OP #define FINI_SECTION_ASM_OP "\tsection\t~fini" ! #undef CONST_SECTION_ASM_OP ! #define CONST_SECTION_ASM_OP "\tsection\t~rodata" #define CTOR_LIST_BEGIN \ asm (INIT_SECTION_ASM_OP); \ --- 523,530 ---- #define INIT_SECTION_ASM_OP "\tsection\t~init" #undef FINI_SECTION_ASM_OP #define FINI_SECTION_ASM_OP "\tsection\t~fini" ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP "\tsection\t~rodata" #define CTOR_LIST_BEGIN \ asm (INIT_SECTION_ASM_OP); \ diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/vxm68k.h gcc-3.3/gcc/config/m68k/vxm68k.h *** gcc-3.2.3/gcc/config/m68k/vxm68k.h 2001-11-01 14:49:33.000000000 +0000 --- gcc-3.3/gcc/config/m68k/vxm68k.h 2002-08-29 21:40:14.000000000 +0000 *************** Unrecognized value in TARGET_CPU_DEFAULT *** 65,71 **** %{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:%(cpp_subtarget_cpu_default) }}}}}}}}}} \ " ! #define DBX_DEBUGGING_INFO #undef SDB_DEBUGGING_INFO /* These are the official values from WRS. */ --- 65,71 ---- %{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:%(cpp_subtarget_cpu_default) }}}}}}}}}} \ " ! #define DBX_DEBUGGING_INFO 1 #undef SDB_DEBUGGING_INFO /* These are the official values from WRS. */ *************** Unrecognized value in TARGET_CPU_DEFAULT *** 94,102 **** #define STRUCTURE_SIZE_BOUNDARY 16 - /* Allow folding division by zero. */ - #define REAL_INFINITY - /* GCC is the primary compiler for VxWorks, so we don't need this. */ #undef PCC_STATIC_STRUCT_RETURN --- 94,99 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m68k/x-next gcc-3.3/gcc/config/m68k/x-next *** gcc-3.2.3/gcc/config/m68k/x-next 2002-01-10 22:03:05.000000000 +0000 --- gcc-3.3/gcc/config/m68k/x-next 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # f771 is so big, we need to tell linker on m68k-next-nextstep* to - # make enough room for it. - BOOT_LDFLAGS=-segaddr __DATA 6000000 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/aout-dbx.h gcc-3.3/gcc/config/m88k/aout-dbx.h *** gcc-3.2.3/gcc/config/m88k/aout-dbx.h 2000-07-12 19:19:18.000000000 +0000 --- gcc-3.3/gcc/config/m88k/aout-dbx.h 2002-08-29 21:40:14.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 20,25 **** /* a.out with DBX. */ ! #define DBX_DEBUGGING_INFO #define DEFAULT_GDB_EXTENSIONS 0 --- 20,25 ---- /* a.out with DBX. */ ! #define DBX_DEBUGGING_INFO 1 #define DEFAULT_GDB_EXTENSIONS 0 diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/dguxbcs.h gcc-3.3/gcc/config/m88k/dguxbcs.h *** gcc-3.2.3/gcc/config/m88k/dguxbcs.h 2001-10-19 22:27:33.000000000 +0000 --- gcc-3.3/gcc/config/m88k/dguxbcs.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,62 **** - /* Definitions of target machine for GNU compiler. - Motorola m88100 running DG/UX. - Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 2001 - Free Software Foundation, Inc. - Contributed by Michael Tiemann (tiemann@mcc.com) - Currently maintained by (gcc@dg-rtp.dg.com) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* dgux.h builds an elf gcc which compiles elf objects by default. - dguxbcs.h builds a bcs gcc which compiles bcs objects by default. - The default can be overridden in either case with -msvr3 and -msvr4 */ - - /* Default switches */ - #undef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_CHECK_ZERO_DIV | \ - MASK_OCS_DEBUG_INFO | \ - MASK_OCS_FRAME_POSITION | \ - MASK_SVR3) - - /* Assembler support (-V, silicon filter, legends for mxdb). */ - #undef ASM_SPEC - #define ASM_SPEC "%{pipe:%{!.s: - }\ - %{msvr4:%{!m88110:-KV3 }%{m88110:-KV04.00 }}}\ - %(asm_cpu)" - - /* If -m88100 is in effect, add -Dm88100; similarly for -m88110. - Here, the CPU_DEFAULT is assumed to be -m88000. If not -ansi, - -traditional, or restricting include files to one specific source - target, specify full DG/UX features. */ - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) \ - %{!msvr4:-D_M88KBCS_TARGET} %{msvr4:-D_DGUX_TARGET}" - - /* Linker and library spec's. - -msvr3 is the default if -msvr4 is not specified. */ - #undef LIB_SPEC - #define LIB_SPEC "%{msvr4:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}}" - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%(startfile_default)" - - #undef STARTFILE_CRTBEGIN_SPEC - #define STARTFILE_CRTBEGIN_SPEC "\ - %{!msvr4:m88kdgux.ld%s bcscrtbegin.o%s} \ - %{msvr4:crtbegin.o%s}" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/dgux.h gcc-3.3/gcc/config/m88k/dgux.h *** gcc-3.2.3/gcc/config/m88k/dgux.h 2001-11-04 22:37:46.000000000 +0000 --- gcc-3.3/gcc/config/m88k/dgux.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,305 **** - /* Definitions of target machine for GNU compiler. - Motorola m88100 running DG/UX. - Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001 - Free Software Foundation, Inc. - Contributed by Michael Tiemann (tiemann@mcc.com) - Currently maintained by (gcc@dg-rtp.dg.com) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* You're not seeing double! To transition to dwarf debugging, both are - supported. The option -msvr4 specifies elf. With these combinations, - -g means dwarf. */ - /* DWARF_DEBUGGING_INFO defined in svr4.h. */ - #undef SDB_DEBUGGING_INFO - #define SDB_DEBUGGING_INFO - #undef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE \ - (TARGET_SVR4 ? DWARF_DEBUG : SDB_DEBUG) - - #ifndef NO_BUGS - #define AS_BUG_IMMEDIATE_LABEL - /* The DG/UX 4.30 assembler doesn't accept the symbol `fcr63'. */ - #define AS_BUG_FLDCR - #endif - - /* TODO: convert includes to ${tm_file} list in config.gcc. */ - #include "m88k/m88k.h" - - /* Augment TARGET_SWITCHES with the MXDB options. */ - #define MASK_STANDARD 0x40000000 /* Retain standard information */ - #define MASK_NOLEGEND 0x20000000 /* Discard legend information */ - #define MASK_EXTERNAL_LEGEND 0x10000000 /* Make external legends */ - - #define TARGET_STANDARD (target_flags & MASK_STANDARD) - #define TARGET_NOLEGEND (target_flags & MASK_NOLEGEND) - #define TARGET_EXTERNAL_LEGEND (target_flags & MASK_EXTERNAL_LEGEND) - - #undef SUBTARGET_SWITCHES - #define SUBTARGET_SWITCHES \ - { "standard", MASK_STANDARD }, \ - { "legend", -MASK_NOLEGEND }, \ - { "no-legend", MASK_NOLEGEND }, \ - { "external-legend", MASK_EXTERNAL_LEGEND }, \ - /* the following is used only in the *_SPEC's */ \ - { "keep-coff", 0 }, - - /* Default switches */ - #undef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_CHECK_ZERO_DIV | \ - MASK_OCS_DEBUG_INFO | \ - MASK_OCS_FRAME_POSITION | \ - MASK_STANDARD | \ - MASK_SVR4) - #undef CPU_DEFAULT - #define CPU_DEFAULT MASK_88000 - - /* Macros to be automatically defined. __svr4__ is our extension. - __CLASSIFY_TYPE__ is used in the and header - files with DG/UX revision 5.40 and later. This allows GNU CC to - operate without installing the header files. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -DDGUX -D__CLASSIFY_TYPE__=2\ - -D__svr4__ -Asystem=unix -Acpu=m88k -Amachine=m88k" - - /* If -m88100 is in effect, add -Dm88100; similarly for -m88110. - Here, the CPU_DEFAULT is assumed to be -m88000. If not -ansi, - -traditional, or restricting include files to one specific source - target, specify full DG/UX features. */ - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) %{msvr3:-D_M88KBCS_TARGET} %{!msvr3:-D_DGUX_TARGET}" - - /* Assembler support (-V, silicon filter, legends for mxdb). */ - #undef ASM_SPEC - #define ASM_SPEC "%{pipe:%{!.s: - }\ - %{!msvr3:%{!m88110:-KV3 }%{m88110:-KV04.00 }}}\ - %(asm_cpu)" - - /* Override svr4.h. */ - #undef ASM_FINAL_SPEC - #undef STARTFILE_SPEC - - /* Linker and library spec's. - -msvr4 is the default if -msvr3 is not specified. - -static, -shared, -symbolic, -h* and -z* access AT&T V.4 link options. - -svr4 instructs gcc to place /usr/lib/values-X[cat].o on the link line. - -msvr3 indicates linking done in a COFF environment and the link - script is added to the link line. In all environments, the first - and last objects are crtbegin.o (or bcscrtbegin.o) and crtend.o. - When the -G link option is used (-shared and -symbolic) a final - link is not being done. */ - #undef ENDFILE_SPEC - #define ENDFILE_SPEC "crtend.o%s" - #undef LIB_SPEC - #define LIB_SPEC "%{!msvr3:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}}" - #undef LINK_SPEC - #define LINK_SPEC "%{z*} %{h*} %{v:-V} \ - %{static:-dn -Bstatic} \ - %{shared:-G -dy} \ - %{symbolic:-Bsymbolic -G -dy} \ - %{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}" - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%(startfile_default)" - - - /* This macro defines names of additional specifications to put in the specs - that can be used in various specifications like CC1_SPEC. Its definition - is an initializer with a subgrouping for each command option. - - Each subgrouping contains a string constant, that defines the - specification name, and a string constant that used by the GNU CC driver - program. - - Do not define this macro if it does not need to do anything. */ - - #define EXTRA_SPECS \ - { "cpp_cpu", CPP_CPU_SPEC }, \ - { "asm_cpu", ASM_CPU_SPEC }, \ - { "startfile_default", STARTFILE_DEFAULT_SPEC }, \ - { "startfile_crtbegin", STARTFILE_CRTBEGIN_SPEC } - - /* Keep this left justified, no white space is allowed between - the arguments to the -Wc option */ - #define ASM_CPU_SPEC "\ - %{v:-V}\ - %{g:\ - %{mno-legend:-Wc,off}\ - %{!mno-legend:-Wc,-fix-bb,-s\"%i\"\ - %{traditional:,-lc}\ - %{!traditional:,-lansi-c}\ - %{mstandard:,-keep-std}\ - %{mexternal-legend:,-external}\ - %{mocs-frame-position:,-ocs}}}" - - #define CPP_CPU_SPEC "\ - %{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \ - %{!m88000:%{!m88110:%{m88100:-D__m88100__}}} \ - %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}" - - #define STARTFILE_DEFAULT_SPEC "\ - %{!shared:%{!symbolic:%{pg:gcrt0.o%s} \ - %{!pg:%{p:/lib/mcrt0.o}%{!p:/lib/crt0.o}} \ - %(startfile_crtbegin) \ - %{svr4:%{ansi:/lib/values-Xc.o} \ - %{!ansi:%{traditional:/lib/values-Xt.o} \ - %{!traditional:/usr/lib/values-Xa.o}}}}}" - - #define STARTFILE_CRTBEGIN_SPEC "\ - %{msvr3:m88kdgux.ld%s bcscrtbegin.o%s} \ - %{!msvr3:crtbegin.o%s}" - - #undef GPLUSPLUS_INCLUDE_DIR - #define GPLUSPLUS_INCLUDE_DIR "/usr/opt/g++/lib/g++-include" - - /* Fast DG/UX version of profiler that does not require lots of - registers to be stored. */ - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - output_function_profiler (FILE, LABELNO, "gcc.mcount", 0) - - /* Output the legend info for mxdb when debugging except if standard - debugging information only is explicitly requested. */ - #undef ASM_FIRST_LINE - #define ASM_FIRST_LINE(FILE) \ - do { \ - if (TARGET_SVR4) \ - { \ - if (TARGET_88110) \ - fprintf (FILE, "%s\"%s\"\n", VERSION_ASM_OP, "04.00"); \ - else \ - fprintf (FILE, "%s\"%s\"\n", VERSION_ASM_OP, "03.00"); \ - } \ - if (write_symbols != NO_DEBUG && !TARGET_NOLEGEND) \ - { \ - fprintf (FILE, ";legend_info -fix-bb -h\"gcc-%s\" -s\"%s\"", \ - version_string, main_input_filename); \ - fputs (flag_traditional ? " -lc" : " -lansi-c", FILE); \ - if (TARGET_STANDARD) \ - fputs (" -keep-std", FILE); \ - if (TARGET_EXTERNAL_LEGEND) \ - fputs (" -external", FILE); \ - if (TARGET_OCS_FRAME_POSITION) \ - fputs (" -ocs", FILE); \ - fputc ('\n', FILE); \ - } \ - } while (0) - - /* Override svr4.h. */ - #undef PTRDIFF_TYPE - #undef WCHAR_TYPE - #undef WCHAR_TYPE_SIZE - - /* Override svr4.h and m88k.h except when compiling crtstuff.c. These must - be constant strings when compiling crtstuff.c. Otherwise, respect the - -mversion-STRING option used. */ - #undef INIT_SECTION_PREAMBLE - #undef INIT_SECTION_ASM_OP - #undef FINI_SECTION_ASM_OP - #undef CTORS_SECTION_ASM_OP - #undef DTORS_SECTION_ASM_OP - - #if defined (CRT_BEGIN) || defined (CRT_END) || defined (L__main) - /* routines to invoke global constructors and destructors are always COFF - to enable linking mixed COFF and ELF objects */ - #define FINI_SECTION_ASM_OP ("\tsection .fini,\"x\"") - #ifndef BCS - #define INIT_SECTION_PREAMBLE asm ("\taddu\tr31,r31,0x20") - #endif - #undef INIT_SECTION_ASM_OP - #define INIT_SECTION_ASM_OP ("\tsection\t .init,\"x\"") - #undef CTORS_SECTION_ASM_OP - #define CTORS_SECTION_ASM_OP ("\tsection\t .ctors,\"d\"") - #undef DTORS_SECTION_ASM_OP - #define DTORS_SECTION_ASM_OP ("\tsection\t .dtors,\"d\"") - #undef OBJECT_FORMAT_ELF - #else - #undef INIT_SECTION_ASM_OP - #define INIT_SECTION_ASM_OP (TARGET_SVR4 \ - ? "\tsection\t .init,\"xa\"" \ - : "\tsection\t .init,\"x\"") - #undef CTORS_SECTION_ASM_OP - #define CTORS_SECTION_ASM_OP (TARGET_SVR4 \ - ? "\tsection\t .ctors,\"aw\"" \ - : "\tsection\t .ctors,\"d\"") - #undef DTORS_SECTION_ASM_OP - #define DTORS_SECTION_ASM_OP (TARGET_SVR4 \ - ? "\tsection\t .dtors,\"aw\"" \ - : "\tsection\t .dtors,\"d\"") - #endif /* crtstuff.c */ - - /* The lists of global object constructors and global destructors are always - placed in the .ctors/.dtors sections. This requires the use of a link - script if the COFF linker is used, but otherwise COFF and ELF objects - can be intermixed. A COFF object will pad the section to 16 bytes with - zeros; and ELF object will not contain padding. We deal with this by - putting a -1 marker at the begin and end of the list and ignoring zero - entries. */ - - /* Mark the end of the .ctors/.dtors sections with a -1. */ - - #define CTOR_LIST_BEGIN \ - asm (CTORS_SECTION_ASM_OP); \ - func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) } - - #define CTOR_LIST_END \ - asm (CTORS_SECTION_ASM_OP); \ - func_ptr __CTOR_END__[1] = { (func_ptr) (-1) } - - #define DTOR_LIST_BEGIN \ - asm (DTORS_SECTION_ASM_OP); \ - func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) } - - #define DTOR_LIST_END \ - asm (DTORS_SECTION_ASM_OP); \ - func_ptr __DTOR_END__[1] = { (func_ptr) (-1) } - - /* Walk the list ignoring NULL entries till we hit the terminating -1. */ - #define DO_GLOBAL_CTORS_BODY \ - do { \ - int i; \ - for (i=1;(int)(__CTOR_LIST__[i]) != -1; i++) \ - if (((int *)__CTOR_LIST__)[i] != 0) \ - __CTOR_LIST__[i] (); \ - } while (0) - - /* Walk the list looking for the terminating -1 that marks the end. - Go backward and ignore any NULL entries. */ - #define DO_GLOBAL_DTORS_BODY \ - do { \ - int i; \ - for (i=1;(int)(__DTOR_LIST__[i]) != -1; i++); \ - for (i-=1;(int)(__DTOR_LIST__[i]) != -1; i--) \ - if (((int *)__DTOR_LIST__)[i] != 0) \ - __DTOR_LIST__[i] (); \ - } while (0) - - /* The maximum alignment which the object file format can support. - page alignment would seem to be enough */ - #undef MAX_OFILE_ALIGNMENT - #define MAX_OFILE_ALIGNMENT 0x1000 - - /* Must use data section for relocatable constants when pic. */ - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \ - { \ - if (flag_pic && symbolic_operand ((RTX), (MODE))) \ - data_section (); \ - else \ - const_section (); \ - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/dgux.ld gcc-3.3/gcc/config/m88k/dgux.ld *** gcc-3.2.3/gcc/config/m88k/dgux.ld 1998-12-16 21:08:13.000000000 +0000 --- gcc-3.3/gcc/config/m88k/dgux.ld 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,48 **** - /* m88kdgux.ld - COFF linker directives for G++ on an AViiON - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - On The AViiON we start the output .text section somewhere after the - first 64kb (0x10000) of logical address space so that the first - 64kb can be mapped out, thus catching references through null - pointers. We actually start at 0x10200 (for efficiency). Ideally, - we want the page offset of a given word of the .text (output) - section to be the same as its page offset in the actual (output) - linked core file so that paging of the .text section is efficient. - In order to do this we allow for up to 0x200 bytes of header stuff - in the output (linked) object file. - - For .data, the OCS says that regions with different "protections" - (i.e. read/write, read-only) should not share any 4 megabyte chunk - of the logical address space, so we start the .data segment at the - first (lowest) 4 MB boundary past the end of the .text segment. - - For some reason, you can't start right at the 4 MB boundary. You - have to start at some distance past that. The distance must be - equal to the distance from the start of the last 64 KB segment in - the (output) .text segment to the actual end of the (output) .text - segment. */ - - SECTIONS { - .text 0x10200 BLOCK(0x200) : - { *(.init) *(.initp) *(.finip) *(.text) *(.tdesc) } - - GROUP BIND (((((ADDR(.text) + SIZEOF(.text) - 1) / 0x400000) + 1) * 0x400000) + ((ADDR(.text) + SIZEOF (.text)) % 0x10000)) : - { .data : { *(.data) *(.ctors) *(.dtors) } - .bss : {} } - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/dolph.h gcc-3.3/gcc/config/m88k/dolph.h *** gcc-3.2.3/gcc/config/m88k/dolph.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/dolph.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,43 **** - /* Definitions of target machine for GNU compiler. - Motorola m88100 running the Dolphin UNIX System V/88 Release 3.2, - Version 3.8/7.83 and 3.6/5.86 - Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "m88k/sysv3.h" - - #define SDB_ALLOW_FORWARD_REFERENCES - #define SDB_ALLOW_UNKNOWN_REFERENCES - - /* Override m88k/sysv3.h */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dm88000 -Dm88k -DOCS88 -DDOLPHIN -Dunix -DsysV88 -D__CLASSIFY_TYPE__=2 -Asystem=unix -Asystem=svr3 -Acpu=m88k -Amachine=m88k" - - /* - If you want to detect dereferencing of NULL pointers, uncomment the - following two lines. Alternatively, edit the appropriate specs file. - - #undef LINK_SPEC - #define LINK_SPEC "gcc.ld%s" - - */ - - #undef CPU_DEFAULT - #define CPU_DEFAULT MASK_88000 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/dolphin.ld gcc-3.3/gcc/config/m88k/dolphin.ld *** gcc-3.2.3/gcc/config/m88k/dolphin.ld 1998-12-16 21:08:17.000000000 +0000 --- gcc-3.3/gcc/config/m88k/dolphin.ld 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,40 **** - /* COFF linker directives for the Dolphin Triton88 for GNU compiler. - Copyright (C) 1993 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* This file does the following: - - - Sets VIRTUAL addr of .text to 0x400200 - Sets FILE addr of .text to 0x200 (BLOCK directive) - - Depending on size of .text section rounds up to next - 4 MG boundary, adds (size of .text and vaddr of .text) mod 64K - This is to handle sections larger than 4 MG. */ - - SECTIONS { - .text 0x400200 BLOCK (0x200): - { *(.init) *(.text) *(.rodata) *(.tdesc) *(.fini)} - - GROUP BIND( (((SIZEOF(.text)+ADDR(.text)) / 0x400000 * 0x400000) + 0x400000) + - ((SIZEOF(.text) + ADDR(.text)) % 0x10000) ) : - { - .data : { } - .bss : { } - } - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/luna.h gcc-3.3/gcc/config/m88k/luna.h *** gcc-3.2.3/gcc/config/m88k/luna.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/luna.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,58 **** - /* Definitions of target machine for GNU compiler. - Motorola m88100 running Omron Luna/88k. - Copyright (C) 1991, 1997 Free Software Foundation, Inc. - Contributed by Jeffrey Friedl (jfriedl@omron.co.jp) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* The Omron Luna/88k is MACH and uses BSD a.out, not COFF or ELF. */ - #ifndef MACH - #define MACH - #endif - #define DBX_DEBUGGING_INFO - #define DEFAULT_GDB_EXTENSIONS 0 - - #include "aoutos.h" - #include "m88k/m88k.h" - - /* Identify the compiler. */ - #undef VERSION_INFO1 - #define VERSION_INFO1 "Omron Luna/88k" - - /* Macros to be automatically defined. */ - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-DMACH -Dm88k -Dunix -Dluna -Dluna88k -D__CLASSIFY_TYPE__=2 -Asystem=unix -Asystem=mach -Acpu=m88k -Amachine=m88k" - - /* If -m88000 is in effect, add -Dmc88000; similarly for -m88100 and -m88110. - However, reproduce the effect of -Dmc88100 previously in CPP_PREDEFINES. - Here, the CPU_DEFAULT is assumed to be -m88100. */ - #undef CPP_SPEC - #define CPP_SPEC "%{m88000:-D__mc88000__} \ - %{!m88000:%{m88100:%{m88110:-D__mc88000__}}} \ - %{!m88000:%{!m88100:%{m88110:-D__mc88110__}}} \ - %{!m88000:%{!m88110:%{!ansi:%{traditional:-Dmc88100}} \ - -D__mc88100__ -D__mc88100}}" - - /* Specify extra dir to search for include files. */ - #undef SYSTEM_INCLUDE_DIR - #define SYSTEM_INCLUDE_DIR "/usr/mach/include" - - /* For the Omron Luna/88k, a float function returns a double in traditional - mode (and a float in ansi mode). */ - #undef TRADITIONAL_RETURN_FLOAT --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k-aout.h gcc-3.3/gcc/config/m88k/m88k-aout.h *** gcc-3.2.3/gcc/config/m88k/m88k-aout.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k-aout.h 2002-08-29 21:40:14.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 21,27 **** Boston, MA 02111-1307, USA. */ #undef SDB_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO #include "m88k/m88k.h" #include "aoutos.h" --- 21,27 ---- Boston, MA 02111-1307, USA. */ #undef SDB_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO 1 #include "m88k/m88k.h" #include "aoutos.h" diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k.c gcc-3.3/gcc/config/m88k/m88k.c *** gcc-3.2.3/gcc/config/m88k/m88k.c 2002-05-21 23:45:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k.c 2002-09-28 15:29:42.000000000 +0000 *************** *** 1,6 **** /* Subroutines for insn-output.c for Motorola 88000. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! 2001 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) Currently maintained by (gcc@dg-rtp.dg.com) --- 1,6 ---- /* Subroutines for insn-output.c for Motorola 88000. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! 2001, 2002 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) Currently maintained by (gcc@dg-rtp.dg.com) *************** Boston, MA 02111-1307, USA. */ *** 43,49 **** #include "target.h" #include "target-def.h" - extern int flag_traditional; extern FILE *asm_out_file; const char *m88k_pound_sign = ""; /* Either # for SVR4 or empty for SVR3 */ --- 43,48 ---- *************** static void m88k_output_function_begin_e *** 72,79 **** static void m88k_svr3_asm_out_constructor PARAMS ((rtx, int)); static void m88k_svr3_asm_out_destructor PARAMS ((rtx, int)); #endif ! static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int)); /* Initialize the GCC target structure. */ #undef TARGET_ASM_BYTE_OP --- 71,79 ---- static void m88k_svr3_asm_out_constructor PARAMS ((rtx, int)); static void m88k_svr3_asm_out_destructor PARAMS ((rtx, int)); #endif ! static void m88k_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)); static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int)); + static void m88k_encode_section_info PARAMS ((tree, int)); /* Initialize the GCC target structure. */ #undef TARGET_ASM_BYTE_OP *************** static int m88k_adjust_cost PARAMS ((rtx *** 99,104 **** --- 99,107 ---- #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST m88k_adjust_cost + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO m88k_encode_section_info + struct gcc_target targetm = TARGET_INITIALIZER; /* Determine what instructions are needed to manufacture the integer VALUE *************** output_load_const_dimode (operands) *** 243,249 **** do the move. Otherwise, return 0 and the caller will emit the move normally. ! SCRATCH if non zero can be used as a scratch register for the move operation. It is provided by a SECONDARY_RELOAD_* macro if needed. */ int --- 246,252 ---- do the move. Otherwise, return 0 and the caller will emit the move normally. ! SCRATCH if nonzero can be used as a scratch register for the move operation. It is provided by a SECONDARY_RELOAD_* macro if needed. */ int *************** emit_move_sequence (operands, mode, scra *** 312,318 **** /* Return a legitimate reference for ORIG (either an address or a MEM) using the register REG. If PIC and the address is already position-independent, use ORIG. Newly generated position-independent ! addresses go into a reg. This is REG if non zero, otherwise we allocate register(s) as necessary. If this is called during reload, and we need a second temp register, then we use SCRATCH, which is provided via the SECONDARY_INPUT_RELOAD_CLASS mechanism. */ --- 315,321 ---- /* Return a legitimate reference for ORIG (either an address or a MEM) using the register REG. If PIC and the address is already position-independent, use ORIG. Newly generated position-independent ! addresses go into a reg. This is REG if nonzero, otherwise we allocate register(s) as necessary. If this is called during reload, and we need a second temp register, then we use SCRATCH, which is provided via the SECONDARY_INPUT_RELOAD_CLASS mechanism. */ *************** real_power_of_2_operand (op, mode) *** 1124,1132 **** rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; { union { ! REAL_VALUE_TYPE d; ! int i[sizeof (REAL_VALUE_TYPE) / sizeof (int)]; struct { /* IEEE double precision format */ unsigned sign : 1; unsigned exponent : 11; --- 1127,1135 ---- rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; { + REAL_VALUE_TYPE d; union { ! long l[2]; struct { /* IEEE double precision format */ unsigned sign : 1; unsigned exponent : 11; *************** real_power_of_2_operand (op, mode) *** 1148,1155 **** if (GET_CODE (op) != CONST_DOUBLE) return 0; ! u.i[0] = CONST_DOUBLE_LOW (op); ! u.i[1] = CONST_DOUBLE_HIGH (op); if (u.s.mantissa1 != 0 || u.s.mantissa2 != 0 /* not a power of two */ || u.s.exponent == 0 /* constant 0.0 */ --- 1151,1158 ---- if (GET_CODE (op) != CONST_DOUBLE) return 0; ! REAL_VALUE_FROM_CONST_DOUBLE (d, op); ! REAL_VALUE_TO_TARGET_DOUBLE (d, u.l); if (u.s.mantissa1 != 0 || u.s.mantissa2 != 0 /* not a power of two */ || u.s.exponent == 0 /* constant 0.0 */ *************** legitimize_operand (op, mode) *** 1170,1177 **** enum machine_mode mode; { rtx temp; union { ! union real_extract r; struct { /* IEEE double precision format */ unsigned sign : 1; unsigned exponent : 11; --- 1173,1181 ---- enum machine_mode mode; { rtx temp; + REAL_VALUE_TYPE r; union { ! long l[2]; struct { /* IEEE double precision format */ unsigned sign : 1; unsigned exponent : 11; *************** legitimize_operand (op, mode) *** 1192,1198 **** if (GET_CODE (op) == CONST_DOUBLE) { ! memcpy (&u.r, &CONST_DOUBLE_LOW (op), sizeof u); if (u.d.exponent != 0x7ff /* NaN */ && u.d.mantissa2 == 0 /* Mantissa fits */ && (u.s.exponent1 == 0x8 || u.s.exponent1 == 0x7) /* Exponent fits */ --- 1196,1203 ---- if (GET_CODE (op) == CONST_DOUBLE) { ! REAL_VALUE_FROM_CONST_DOUBLE (r, op); ! REAL_VALUE_TO_TARGET_DOUBLE (r, u.l); if (u.d.exponent != 0x7ff /* NaN */ && u.d.mantissa2 == 0 /* Mantissa fits */ && (u.s.exponent1 == 0x8 || u.s.exponent1 == 0x7) /* Exponent fits */ *************** output_options (file, f_options, f_len, *** 1567,1574 **** pos = output_option (file, sep, "-O", "", indent, pos, max); if (write_symbols != NO_DEBUG) pos = output_option (file, sep, "-g", "", indent, pos, max); - if (flag_traditional) - pos = output_option (file, sep, "-traditional", "", indent, pos, max); if (profile_flag) pos = output_option (file, sep, "-p", "", indent, pos, max); for (j = 0; j < f_len; j++) --- 1572,1577 ---- *************** m88k_layout_frame () *** 1903,1909 **** m88k_stack_size = m88k_fp_offset + STARTING_FRAME_OFFSET; /* First, combine m88k_stack_size and size. If m88k_stack_size is ! non-zero, align the frame size to 8 mod 16; otherwise align the frame size to 0 mod 16. (If stacks are 8 byte aligned, this ends up as a NOP. */ { --- 1906,1912 ---- m88k_stack_size = m88k_fp_offset + STARTING_FRAME_OFFSET; /* First, combine m88k_stack_size and size. If m88k_stack_size is ! nonzero, align the frame size to 8 mod 16; otherwise align the frame size to 0 mod 16. (If stacks are 8 byte aligned, this ends up as a NOP. */ { *************** uses_arg_area_p () *** 1944,1950 **** register tree parm; if (current_function_decl == 0 - || current_function_varargs || variable_args_p) return 1; --- 1947,1952 ---- *************** m88k_build_va_list () *** 2616,2623 **** /* Implement `va_start' for varargs and stdarg. */ void ! m88k_va_start (stdarg_p, valist, nextarg) ! int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg ATTRIBUTE_UNUSED; { --- 2618,2624 ---- /* Implement `va_start' for varargs and stdarg. */ void ! m88k_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { *************** print_operand (file, x, code) *** 2920,2926 **** fprintf (file, "%d", value); return; ! case 'S': /* compliment the value and then... */ value = ~value; case 's': /* print the width and offset values forming the integer constant with a SET instruction. See integer_ok_for_set. */ --- 2921,2927 ---- fprintf (file, "%d", value); return; ! case 'S': /* complement the value and then... */ value = ~value; case 's': /* print the width and offset values forming the integer constant with a SET instruction. See integer_ok_for_set. */ *************** m88k_svr3_asm_out_destructor (symbol, pr *** 3254,3259 **** --- 3255,3292 ---- } #endif /* INIT_SECTION_ASM_OP && ! OBJECT_FORMAT_ELF */ + static void + m88k_select_section (decl, reloc, align) + tree decl; + int reloc; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + if (TREE_CODE (decl) == STRING_CST) + { + if (! flag_writable_strings) + readonly_data_section (); + else if (TREE_STRING_LENGTH (decl) <= m88k_gp_threshold) + sdata_section (); + else + data_section (); + } + else if (TREE_CODE (decl) == VAR_DECL) + { + if (SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0))) + sdata_section (); + else if ((flag_pic && reloc) + || !TREE_READONLY (decl) || TREE_SIDE_EFFECTS (decl) + || !DECL_INITIAL (decl) + || (DECL_INITIAL (decl) != error_mark_node + && !TREE_CONSTANT (DECL_INITIAL (decl)))) + data_section (); + else + readonly_data_section (); + } + else + readonly_data_section (); + } + /* Adjust the cost of INSN based on the relationship between INSN that is dependent on DEP_INSN through the dependence LINK. The default is to make no adjustment to COST. *************** m88k_adjust_cost (insn, link, dep, cost) *** 3280,3282 **** --- 3313,3341 ---- return cost; } + + /* For the m88k, determine if the item should go in the global pool. */ + + static void + m88k_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (m88k_gp_threshold > 0) + { + if (TREE_CODE (decl) == VAR_DECL) + { + if (!TREE_READONLY (decl) || TREE_SIDE_EFFECTS (decl)) + { + int size = int_size_in_bytes (TREE_TYPE (decl)); + + if (size > 0 && size <= m88k_gp_threshold) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + } + else if (TREE_CODE (decl) == STRING_CST + && flag_writable_strings + && TREE_STRING_LENGTH (decl) <= m88k_gp_threshold) + SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (decl), 0)) = 1; + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k-coff.h gcc-3.3/gcc/config/m88k/m88k-coff.h *** gcc-3.2.3/gcc/config/m88k/m88k-coff.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k-coff.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,34 **** - /* Definitions for "naked" Motorola 88k using coff object format files - and coff debugging info. - - Copyright (C) 1994, 1996 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "m88k/m88k.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dm88000 -Dm88k -Acpu=m88k -Amachine=m88k" - - #define SDB_DEBUGGING_INFO - - /* Output DBX (stabs) debugging information if using -gstabs. */ - - #include "dbxcoff.h" - - /* end of m88k-coff.h */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k.h gcc-3.3/gcc/config/m88k/m88k.h *** gcc-3.2.3/gcc/config/m88k/m88k.h 2002-05-21 23:45:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k.h 2002-11-26 04:54:49.000000000 +0000 *************** extern int flag_pic; /* -fpic */ *** 312,318 **** /*** Storage Layout ***/ /* Sizes in bits of the various types. */ - #define CHAR_TYPE_SIZE 8 #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE 32 #define LONG_TYPE_SIZE 32 --- 312,317 ---- *************** extern int flag_pic; /* -fpic */ *** 336,357 **** instructions for them. */ #define WORDS_BIG_ENDIAN 1 - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 --- 335,343 ---- *************** extern int flag_pic; /* -fpic */ *** 397,416 **** when given unaligned data. */ #define STRICT_ALIGNMENT 1 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Maximum size (in bits) to use for the largest integral type that replaces a BLKmode type. */ /* #define MAX_FIXED_MODE_SIZE 0 */ - - /* Check a `double' value for validity for a particular machine mode. - This is defined to avoid crashes outputting certain constants. - Since we output the number in hex, the assembler won't choke on it. */ - /* #define CHECK_FLOAT_VALUE(MODE,VALUE) */ - - /* A code distinguishing the floating point format of the target machine. */ - /* #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT */ /*** Register Usage ***/ --- 383,394 ---- when given unaligned data. */ #define STRICT_ALIGNMENT 1 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Maximum size (in bits) to use for the largest integral type that replaces a BLKmode type. */ /* #define MAX_FIXED_MODE_SIZE 0 */ /*** Register Usage ***/ *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1039,1046 **** (VALIST) = m88k_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! m88k_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 1017,1024 ---- (VALIST) = m88k_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! m88k_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1066,1073 **** may be accessed via the stack pointer) in functions that seem suitable. This is computed in `reload', in reload1.c. */ #define FRAME_POINTER_REQUIRED \ ! (current_function_varargs \ ! || (TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) \ || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION)) /* Definitions for register eliminations. --- 1044,1050 ---- may be accessed via the stack pointer) in functions that seem suitable. This is computed in `reload', in reload1.c. */ #define FRAME_POINTER_REQUIRED \ ! ((TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) \ || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION)) /* Definitions for register eliminations. *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1176,1183 **** /*** Addressing Modes ***/ - #define EXTRA_CC_MODES CC(CCEVENmode, "CCEVEN") - #define SELECT_CC_MODE(OP,X,Y) CCmode /* #define HAVE_POST_INCREMENT 0 */ --- 1153,1158 ---- *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1463,1473 **** /* The 88open ABI says size_t is unsigned int. */ #define SIZE_TYPE "unsigned int" - /* Allow and ignore #sccs directives */ - #define SCCS_DIRECTIVE - /* Handle #pragma pack and sometimes #pragma weak. */ ! #define HANDLE_SYSV_PRAGMA /* Tell when to handle #pragma weak. This is only done for V.4. */ #define SUPPORTS_WEAK TARGET_SVR4 --- 1438,1445 ---- /* The 88open ABI says size_t is unsigned int. */ #define SIZE_TYPE "unsigned int" /* Handle #pragma pack and sometimes #pragma weak. */ ! #define HANDLE_SYSV_PRAGMA 1 /* Tell when to handle #pragma weak. This is only done for V.4. */ #define SUPPORTS_WEAK TARGET_SVR4 *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1500,1509 **** mismatch, it also makes for better code on certain machines. */ #define PROMOTE_PROTOTYPES 1 - /* Define this macro if a float function always returns float - (even in traditional mode). Redefined in luna.h. */ - #define TRADITIONAL_RETURN_FLOAT - /* We assume that the store-condition-codes instructions store 0 for false and some other value for true. This is the value stored for true. */ #define STORE_FLAG_VALUE (-1) --- 1472,1477 ---- *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1621,1627 **** /* Allow pseudo-ops to be overridden. Override these in svr[34].h. */ #undef ASCII_DATA_ASM_OP ! #undef CONST_SECTION_ASM_OP #undef CTORS_SECTION_ASM_OP #undef DTORS_SECTION_ASM_OP #undef TARGET_ASM_NAMED_SECTION --- 1589,1595 ---- /* Allow pseudo-ops to be overridden. Override these in svr[34].h. */ #undef ASCII_DATA_ASM_OP ! #undef READONLY_DATA_SECTION_ASM_OP #undef CTORS_SECTION_ASM_OP #undef DTORS_SECTION_ASM_OP #undef TARGET_ASM_NAMED_SECTION *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1640,1646 **** #define DATA_SECTION_ASM_OP "\tdata" /* Other sections. */ ! #define CONST_SECTION_ASM_OP (TARGET_SVR4 \ ? "\tsection\t .rodata,\"a\"" \ : "\tsection\t .rodata,\"x\"") #define TDESC_SECTION_ASM_OP (TARGET_SVR4 \ --- 1608,1614 ---- #define DATA_SECTION_ASM_OP "\tdata" /* Other sections. */ ! #define READONLY_DATA_SECTION_ASM_OP (TARGET_SVR4 \ ? "\tsection\t .rodata,\"a\"" \ : "\tsection\t .rodata,\"x\"") #define TDESC_SECTION_ASM_OP (TARGET_SVR4 \ *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1656,1662 **** /* These are pretty much common to all assemblers. */ #define IDENT_ASM_OP "\tident\t" #define FILE_ASM_OP "\tfile\t" - #define SECTION_ASM_OP "\tsection\t" #define SET_ASM_OP "\tdef\t" #define GLOBAL_ASM_OP "\tglobal\t" #define ALIGN_ASM_OP "\talign\t" --- 1624,1629 ---- *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1758,1764 **** #undef ASM_FILE_END #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \ ! fprintf (FILE, "%s\"%s\"\n", FILE_ASM_OP, NAME) #ifdef SDB_DEBUGGING_INFO #undef ASM_OUTPUT_SOURCE_LINE --- 1725,1735 ---- #undef ASM_FILE_END #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \ ! do { \ ! fputs (FILE_ASM_OP, FILE); \ ! output_quoted_string (FILE, NAME); \ ! putc ('\n', FILE); \ ! } while (0) #ifdef SDB_DEBUGGING_INFO #undef ASM_OUTPUT_SOURCE_LINE *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1834,1871 **** #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ if (DECLARE_ASM_NAME) \ ! { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ! } \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) /* Write the extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! if (DECLARE_ASM_NAME) \ ! { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ ! } \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } while (0) /* Output the size directive for a decl in rest_of_decl_compilation in the case where we did not do so before the initializer. --- 1805,1835 ---- #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ if (DECLARE_ASM_NAME) \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) /* Write the extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! if (DECLARE_ASM_NAME) \ ! { \ ! HOST_WIDE_INT size; \ ! \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive \ ! && (DECL) && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ ! } \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } while (0); /* Output the size directive for a decl in rest_of_decl_compilation in the case where we did not do so before the initializer. *************** enum reg_class { NO_REGS, AP_REG, XRF_RE *** 1877,1882 **** --- 1841,1847 ---- #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && DECLARE_ASM_NAME \ && ! AT_END && TOP_LEVEL \ *************** do { \ *** 1884,1892 **** && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ } \ } while (0) --- 1849,1856 ---- && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) *************** do { \ *** 1894,1929 **** #undef ASM_DECLARE_FUNCTION_SIZE #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ ! if (DECLARE_ASM_NAME) \ ! { \ ! if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno = 0; \ ! labelno++; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ",%s-", &label[1]); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ ! } \ ! } while (0) ! ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { \ ! fprintf (FILE, "%s", GLOBAL_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc ('\n', FILE); \ } while (0) /* The prefix to add to user-visible assembler symbols. --- 1858,1865 ---- #undef ASM_DECLARE_FUNCTION_SIZE #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ ! if (DECLARE_ASM_NAME && !flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } while (0) /* The prefix to add to user-visible assembler symbols. *************** do { \ *** 2297,2328 **** and so follows DECLARE_ASM_NAME. Note that strings go in text rather than const. Override svr[34].h. */ - #undef USE_CONST_SECTION #undef EXTRA_SECTIONS - #define USE_CONST_SECTION DECLARE_ASM_NAME - #if defined(USING_SVR4_H) ! #define EXTRA_SECTIONS in_const, in_tdesc, in_sdata #define INIT_SECTION_FUNCTION #define FINI_SECTION_FUNCTION #else #if defined(USING_SVR3_H) ! #define EXTRA_SECTIONS in_const, in_tdesc, in_sdata, in_init, in_fini #else /* luna or other not based on svr[34].h. */ #undef INIT_SECTION_ASM_OP ! #define EXTRA_SECTIONS in_const, in_tdesc, in_sdata ! #define CONST_SECTION_FUNCTION \ ! void \ ! const_section () \ ! { \ ! text_section(); \ ! } #define INIT_SECTION_FUNCTION #define FINI_SECTION_FUNCTION --- 2233,2256 ---- and so follows DECLARE_ASM_NAME. Note that strings go in text rather than const. Override svr[34].h. */ #undef EXTRA_SECTIONS #if defined(USING_SVR4_H) ! #define EXTRA_SECTIONS in_tdesc, in_sdata #define INIT_SECTION_FUNCTION #define FINI_SECTION_FUNCTION #else #if defined(USING_SVR3_H) ! #define EXTRA_SECTIONS in_tdesc, in_sdata, in_init, in_fini #else /* luna or other not based on svr[34].h. */ + #undef READONLY_DATA_SECTION_ASM_OP #undef INIT_SECTION_ASM_OP ! #define EXTRA_SECTIONS in_tdesc, in_sdata #define INIT_SECTION_FUNCTION #define FINI_SECTION_FUNCTION *************** const_section () \ *** 2331,2338 **** #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ - \ void \ tdesc_section () \ { \ --- 2259,2264 ---- *************** sdata_section () \ *** 2356,2430 **** INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION ! /* A C statement or statements to switch to the appropriate ! section for output of DECL. DECL is either a `VAR_DECL' node ! or a constant of some sort. RELOC indicates whether forming ! the initial value of DECL requires link-time relocations. ! ! For strings, the section is selected before the segment info is encoded. */ ! #undef SELECT_SECTION ! #define SELECT_SECTION(DECL,RELOC,ALIGN) \ ! { \ ! if (TREE_CODE (DECL) == STRING_CST) \ ! { \ ! if (! flag_writable_strings) \ ! const_section (); \ ! else if ( TREE_STRING_LENGTH (DECL) <= m88k_gp_threshold) \ ! sdata_section (); \ ! else \ ! data_section (); \ ! } \ ! else if (TREE_CODE (DECL) == VAR_DECL) \ ! { \ ! if (SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0))) \ ! sdata_section (); \ ! else if ((flag_pic && RELOC) \ ! || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ ! || !DECL_INITIAL (DECL) \ ! || (DECL_INITIAL (DECL) != error_mark_node \ ! && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ ! data_section (); \ ! else \ ! const_section (); \ ! } \ ! else \ ! const_section (); \ ! } /* Jump tables consist of branch instructions and should be output in the text section. When we use a table of addresses, we explicitly change to the readonly data section. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 - - /* Define this macro if references to a symbol must be treated differently - depending on something about the variable or function named by the - symbol (such as what section it is in). - - The macro definition, if any, is executed immediately after the rtl for - DECL has been created and stored in `DECL_RTL (DECL)'. The value of the - rtl will be a `mem' whose address is a `symbol_ref'. - - For the m88k, determine if the item should go in the global pool. */ - #define ENCODE_SECTION_INFO(DECL) \ - do { \ - if (m88k_gp_threshold > 0) \ - { \ - if (TREE_CODE (DECL) == VAR_DECL) \ - { \ - if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)) \ - { \ - int size = int_size_in_bytes (TREE_TYPE (DECL)); \ - \ - if (size > 0 && size <= m88k_gp_threshold) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - } \ - } \ - else if (TREE_CODE (DECL) == STRING_CST \ - && flag_writable_strings \ - && TREE_STRING_LENGTH (DECL) <= m88k_gp_threshold) \ - SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 1; \ - } \ - } while (0) /* Print operand X (an rtx) in assembler syntax to file FILE. CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. --- 2282,2293 ---- INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION ! #define TARGET_ASM_SELECT_SECTION m88k_select_section /* Jump tables consist of branch instructions and should be output in the text section. When we use a table of addresses, we explicitly change to the readonly data section. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 /* Print operand X (an rtx) in assembler syntax to file FILE. CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k.md gcc-3.3/gcc/config/m88k/m88k.md *** gcc-3.2.3/gcc/config/m88k/m88k.md 2001-11-21 04:57:09.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k.md 2002-09-28 15:29:42.000000000 +0000 *************** *** 398,407 **** ;; ;; When the extracted conditions are the same, the define_split patterns ;; below change extu/extu/{and,or} into {and,or}/extu. If the reversed ! ;; conditions match, one compare word can be complimented, resulting in ;; {and.c,or.c}/extu. These changes are done for ext/ext/{and,or} as well. ;; If the conditions don't line up, one can be rotated. To keep the pairwise ! ;; relationship, it may be necessary to both rotate and compliment. Rotating ;; makes branching cheaper, but doesn't help (or hurt) creating a value, so ;; we don't do this for ext/ext/{and,or}. ;; --- 398,407 ---- ;; ;; When the extracted conditions are the same, the define_split patterns ;; below change extu/extu/{and,or} into {and,or}/extu. If the reversed ! ;; conditions match, one compare word can be complemented, resulting in ;; {and.c,or.c}/extu. These changes are done for ext/ext/{and,or} as well. ;; If the conditions don't line up, one can be rotated. To keep the pairwise ! ;; relationship, it may be necessary to both rotate and complement. Rotating ;; makes branching cheaper, but doesn't help (or hurt) creating a value, so ;; we don't do this for ext/ext/{and,or}. ;; *************** *** 430,436 **** ; /* The conditions match. */ else if (GET_CODE (operands[1]) == reverse_condition (GET_CODE (operands[3]))) ! /* Reverse the condition by complimenting the compare word. */ operands[4] = gen_rtx_NOT (CCmode, operands[4]); else { --- 430,436 ---- ; /* The conditions match. */ else if (GET_CODE (operands[1]) == reverse_condition (GET_CODE (operands[3]))) ! /* Reverse the condition by complementing the compare word. */ operands[4] = gen_rtx_NOT (CCmode, operands[4]); else { *************** *** 525,531 **** (set (match_dup 0) (match_op_dup 1 [(match_dup 5) (const_int 0)]))] "operands[5] = gen_rtx_SUBREG (CCEVENmode, operands[5], 0); ! /* Reverse the condition by complimenting the compare word. */ if (GET_CODE (operands[1]) != GET_CODE (operands[3])) operands[4] = gen_rtx_NOT (CCmode, operands[4]);") --- 525,531 ---- (set (match_dup 0) (match_op_dup 1 [(match_dup 5) (const_int 0)]))] "operands[5] = gen_rtx_SUBREG (CCEVENmode, operands[5], 0); ! /* Reverse the condition by complementing the compare word. */ if (GET_CODE (operands[1]) != GET_CODE (operands[3])) operands[4] = gen_rtx_NOT (CCmode, operands[4]);") *************** *** 585,591 **** ; /* The conditions match. */ else if (GET_CODE (operands[1]) == reverse_condition (GET_CODE (operands[3]))) ! /* Reverse the condition by complimenting the compare word. */ operands[4] = gen_rtx_NOT (CCmode, operands[4]); else { --- 585,591 ---- ; /* The conditions match. */ else if (GET_CODE (operands[1]) == reverse_condition (GET_CODE (operands[3]))) ! /* Reverse the condition by complementing the compare word. */ operands[4] = gen_rtx_NOT (CCmode, operands[4]); else { *************** *** 677,683 **** (set (match_dup 0) (match_op_dup 1 [(match_dup 5) (const_int 0)]))] "operands[5] = gen_rtx_SUBREG (CCEVENmode, operands[5], 0); ! /* Reverse the condition by complimenting the compare word. */ if (GET_CODE (operands[1]) != GET_CODE (operands[3])) operands[4] = gen_rtx_NOT (CCmode, operands[4]);") --- 677,683 ---- (set (match_dup 0) (match_op_dup 1 [(match_dup 5) (const_int 0)]))] "operands[5] = gen_rtx_SUBREG (CCEVENmode, operands[5], 0); ! /* Reverse the condition by complementing the compare word. */ if (GET_CODE (operands[1]) != GET_CODE (operands[3])) operands[4] = gen_rtx_NOT (CCmode, operands[4]);") *************** *** 3053,3062 **** operands[1] = legitimize_operand (operands[1], DFmode); if (real_power_of_2_operand (operands[2], DFmode)) { ! union real_extract u; ! memcpy (&u, &CONST_DOUBLE_LOW (operands[2]), sizeof u); emit_insn (gen_muldf3 (operands[0], operands[1], ! CONST_DOUBLE_FROM_REAL_VALUE (1.0/u.d, DFmode))); DONE; } else if (! register_operand (operands[2], DFmode)) --- 3053,3064 ---- operands[1] = legitimize_operand (operands[1], DFmode); if (real_power_of_2_operand (operands[2], DFmode)) { ! REAL_VALUE_TYPE r; ! REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]); ! if (!exact_real_inverse (DFmode, &r)) ! abort (); emit_insn (gen_muldf3 (operands[0], operands[1], ! CONST_DOUBLE_FROM_REAL_VALUE (r, DFmode))); DONE; } else if (! register_operand (operands[2], DFmode)) diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k-modes.def gcc-3.3/gcc/config/m88k/m88k-modes.def *** gcc-3.2.3/gcc/config/m88k/m88k-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k-modes.def 2002-06-10 22:35:48.000000000 +0000 *************** *** 0 **** --- 1,27 ---- + /* Definitions of target machine for GNU compiler for Motorola m88100. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com). + Currently maintained by (gcc@dg-rtp.dg.com) + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Extra machine modes to represent the condition code. */ + + CC (CCEVEN) + + diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k-move.sh gcc-3.3/gcc/config/m88k/m88k-move.sh *** gcc-3.2.3/gcc/config/m88k/m88k-move.sh 1998-12-16 21:08:21.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k-move.sh 2002-09-15 22:48:04.000000000 +0000 *************** *** 44,50 **** # 27-Aug-90 Vince Guarna/Tom Wood # Version 3 assembler syntax (-abi). # 16-Aug-90 Ron Guilmette ! # Avoid problems on a Sparc. The common # denominator among shells seems to be '...\' # rather than '...\\'. # 15-Aug-90 Ron Guilmette --- 44,50 ---- # 27-Aug-90 Vince Guarna/Tom Wood # Version 3 assembler syntax (-abi). # 16-Aug-90 Ron Guilmette ! # Avoid problems on a SPARC. The common # denominator among shells seems to be '...\' # rather than '...\\'. # 15-Aug-90 Ron Guilmette diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/m88k-protos.h gcc-3.3/gcc/config/m88k/m88k-protos.h *** gcc-3.2.3/gcc/config/m88k/m88k-protos.h 2002-05-21 23:45:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/m88k-protos.h 2002-07-16 20:58:59.000000000 +0000 *************** extern int equality_op PARAMS ((rtx, enu *** 67,73 **** extern int pc_or_label_ref PARAMS ((rtx, enum machine_mode)); extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); #ifdef TREE_CODE ! extern void m88k_va_start PARAMS ((int, tree, rtx)); #endif /* TREE_CODE */ #endif /* RTX_CODE */ --- 67,73 ---- extern int pc_or_label_ref PARAMS ((rtx, enum machine_mode)); extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); #ifdef TREE_CODE ! extern void m88k_va_start PARAMS ((tree, rtx)); #endif /* TREE_CODE */ #endif /* RTX_CODE */ diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/openbsd.h gcc-3.3/gcc/config/m88k/openbsd.h *** gcc-3.2.3/gcc/config/m88k/openbsd.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/m88k/openbsd.h 2002-02-27 18:47:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 33,46 **** #define CPP_SPEC "%{m88000:-D__mc88000__} \ %{!m88000:%{m88100:%{m88110:-D__mc88000__}}} \ %{!m88000:%{!m88100:%{m88110:-D__mc88110__}}} \ ! %{!m88000:%{!m88110:%{!ansi:%{traditional:-Dmc88100}} \ ! -D__mc88100__ -D__mc88100}} %{posix:-D_POSIX_SOURCE} \ %{pthread:-D_POSIX_THREADS}" - /* For the Omron Luna/88k, a float function returns a double in traditional - mode (and a float in ansi mode). */ - #undef TRADITIONAL_RETURN_FLOAT - /* Layout of source language data types. */ /* This must agree with */ --- 33,42 ---- #define CPP_SPEC "%{m88000:-D__mc88000__} \ %{!m88000:%{m88100:%{m88110:-D__mc88000__}}} \ %{!m88000:%{!m88100:%{m88110:-D__mc88110__}}} \ ! %{!m88000:%{!m88110:-D__mc88100__ -D__mc88100}} \ ! %{posix:-D_POSIX_SOURCE} \ %{pthread:-D_POSIX_THREADS}" /* Layout of source language data types. */ /* This must agree with */ diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/sysv3.h gcc-3.3/gcc/config/m88k/sysv3.h *** gcc-3.2.3/gcc/config/m88k/sysv3.h 2001-08-09 22:33:27.000000000 +0000 --- gcc-3.3/gcc/config/m88k/sysv3.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,120 **** - /* Definitions of target machine for GNU compiler. - Motorola m88100 running the AT&T/Unisoft/Motorola V.3 reference port. - Copyright (C) 1990, 1991, 1997, 1998, 1999 Free Software Foundation, Inc. - Contributed by Ray Essick (ressick@mot.com) - Enhanced by Tom Wood (Tom_Wood@NeXT.com) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "m88k/m88k.h" - - /* Default switches */ - #undef TARGET_DEFAULT - #define TARGET_DEFAULT (MASK_CHECK_ZERO_DIV | \ - MASK_OCS_DEBUG_INFO | \ - MASK_OCS_FRAME_POSITION) - - /* Macros to be automatically defined. */ - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -DsysV88 -D__CLASSIFY_TYPE__=2 -Asystem=unix -Asystem=svr3 -Acpu=m88k -Amachine=m88k" - - /* Override svr3.h to link with ?crt0.o instead of ?crt1.o and ?crtn.o. - From arul@sdsu.edu. */ - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}} crtbegin.o%s" - - /* Profiled libraries live in a different directory but keep the same - names other than that. arul@sdsu.edu says -lg is always needed. */ - #undef LIB_SPEC - #define LIB_SPEC "%{p:-L/lib/libp}%{pg:%{!p:-L/lib/libp}} -lg -lc crtend.o%s" - - /* We need POSIX/XOPEN symbols; otherwise building libio will fail. */ - #define ADD_MISSING_POSIX 1 - #define ADD_MISSING_XOPEN 1 - - /* Hot version of the profiler that uses r10 to pass the address of - the counter. the _gcc_mcount routine knows not to screw with - the parameter registers. - - DG/UX does this; i wrote a gnu-c/88k specific version and put it - in libgcc2.c -- RBE; this macro knows about the leading underscore - convention. */ - #undef FUNCTION_PROFILER - #define FUNCTION_PROFILER(FILE, LABELNO) \ - output_function_profiler (FILE, LABELNO, "_gcc_mcount", 0) - - /* Various other changes that we want to have in place without - too many changes to the m88k.h file. */ - #undef USE_LIBG - #define USE_LIBG - - /* Define a few machine-specific details of the implementation of - constructors. */ - - /* Although the .init section is used, it is not automatically invoked. */ - #define INVOKE__main - - #define CTOR_LIST_BEGIN \ - asm (INIT_SECTION_ASM_OP); \ - asm ("\tsubu\t r31,r31,16"); /* (STACK_BOUNDARY / BITS_PER_UNIT) == 16 */ \ - asm ("\tst\t r0,r31,32"); /* REG_PARM_STACK_SPACE (0) == 32 */ - #define CTOR_LIST_END - - #define TARGET_ASM_CONSTRUCTOR m88k_svr3_asm_out_constructor - #define TARGET_ASM_DESTRUCTOR m88k_svr3_asm_out_destructor - - #undef DO_GLOBAL_CTORS_BODY - #define DO_GLOBAL_CTORS_BODY \ - do { \ - func_ptr *__CTOR_LIST__ = __builtin_alloca (1), *p; \ - for (p = __CTOR_LIST__ + 4; *p; p += 4) \ - (*p) (); \ - } while (0) - - #define DTOR_LIST_BEGIN \ - asm (FINI_SECTION_ASM_OP); \ - func_ptr __DTOR_LIST__[4] = { (func_ptr) (-1), (func_ptr) (-1), \ - (func_ptr) (-1), (func_ptr) (-1) } - #define DTOR_LIST_END \ - asm (FINI_SECTION_ASM_OP); \ - func_ptr __DTOR_END__[4] = { (func_ptr) 0, (func_ptr) 0, \ - (func_ptr) 0, (func_ptr) 0 } - - /* Walk the list looking for the terminating zero and ignoring all values of - -1. */ - #undef DO_GLOBAL_DTORS_BODY - #define DO_GLOBAL_DTORS_BODY \ - do { \ - int i; \ - for (i = 0; __DTOR_LIST__[i] != 0; i++) \ - if (((int *)__DTOR_LIST__)[i] != -1) \ - __DTOR_LIST__[i] (); \ - } while (0) - - #undef INITIALIZE_TRAMPOLINE - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - { \ - emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 40)), FNADDR); \ - emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 36)), CXT); \ - emit_call_insn (gen_call \ - (gen_rtx_MEM \ - (SImode, \ - gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack")), \ - const0_rtx)); \ - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/t-bug gcc-3.3/gcc/config/m88k/t-bug *** gcc-3.2.3/gcc/config/m88k/t-bug 2001-05-17 03:16:02.000000000 +0000 --- gcc-3.3/gcc/config/m88k/t-bug 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,10 **** - # Specify how to create the *.asm files - - MOVE_ASM = moveHI15x.asm moveQI16x.asm moveSI46x.asm moveSI64n.asm \ - moveHI48x.asm moveSI45x.asm moveSI47x.asm moveSI96x.asm \ - moveDI96x.asm - - $(MOVE_ASM): $(srcdir)/config/m88k/m88k-move.sh - $(srcdir)/config/m88k/m88k-move.sh - - LIB2FUNCS_EXTRA = $(MOVE_ASM) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/t-dgux gcc-3.3/gcc/config/m88k/t-dgux *** gcc-3.2.3/gcc/config/m88k/t-dgux 2001-11-15 13:05:54.000000000 +0000 --- gcc-3.3/gcc/config/m88k/t-dgux 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,27 **** - # Specify how to create the *.asm files - - MOVE_ASM = moveHI15x.asm moveQI16x.asm moveSI46x.asm moveSI64n.asm \ - moveHI48x.asm moveSI45x.asm moveSI47x.asm moveSI96x.asm \ - moveDI96x.asm - - $(MOVE_ASM): $(srcdir)/config/m88k/m88k-move.sh - $(srcdir)/config/m88k/m88k-move.sh - - LIB2FUNCS_EXTRA = $(MOVE_ASM) - - # In a coff environment, a link script is required for ctors and dtors. - m88kdgux.ld: $(srcdir)/config/m88k/dgux.ld - rm -f m88kdgux.ld; cp $(srcdir)/config/m88k/dgux.ld ./m88kdgux.ld - - # A bcs crtbegin.o is needed since bcs does not - # increment the stack pointer in the init section as elf does - bcscrtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN -DBCS \ - -finhibit-size-directive -fno-inline-functions \ - -g0 -c $(srcdir)/crtstuff.c -o bcscrtbegin.o - - # Build libgcc.a, crtbegin.o, and crtend.o as bcs objects - GCC_FOR_TARGET = PATH=/usr/sde/m88kbcs/usr/bin/:/usr/bin TARGET_BINARY_INTERFACE=m88kbcs ./xgcc -B./ -msvr3 -D_M88KBCS_TARGET -mno-ocs-debug-info - - # Don't run fixproto - STMP_FIXPROTO = --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/t-dguxbcs gcc-3.3/gcc/config/m88k/t-dguxbcs *** gcc-3.2.3/gcc/config/m88k/t-dguxbcs 2001-11-15 13:05:54.000000000 +0000 --- gcc-3.3/gcc/config/m88k/t-dguxbcs 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - T_CFLAGS = -O -D_M88KBCS_TARGET --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/t-dgux-gas gcc-3.3/gcc/config/m88k/t-dgux-gas *** gcc-3.2.3/gcc/config/m88k/t-dgux-gas 2001-05-17 03:16:02.000000000 +0000 --- gcc-3.3/gcc/config/m88k/t-dgux-gas 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,15 **** - # Specify how to create the *.asm files - - MOVE_ASM = moveHI15x.asm moveQI16x.asm moveSI46x.asm moveSI64n.asm \ - moveHI48x.asm moveSI45x.asm moveSI47x.asm moveSI96x.asm \ - moveDI96x.asm - - $(MOVE_ASM): $(srcdir)/config/m88k/m88k-move.sh - $(srcdir)/config/m88k/m88k-move.sh - - LIB2FUNCS_EXTRA = $(MOVE_ASM) - T_CPPFLAGS = -DUSE_GAS - - # In a coff environment, a link script is required. - m88kdgux.ld: $(srcdir)/config/m88k/dgux.ld - rm -f m88kdgux.ld; cp $(srcdir)/config/m88k/dgux.ld ./m88kdgux.ld --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/t-dolph gcc-3.3/gcc/config/m88k/t-dolph *** gcc-3.2.3/gcc/config/m88k/t-dolph 2002-01-10 22:03:05.000000000 +0000 --- gcc-3.3/gcc/config/m88k/t-dolph 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - # Use link editor directives to make NULL pointers point to - # invalid addresses. - - EXTRA_PARTS=crtbegin.o crtend.o gcc.ld - - gcc.ld: $(srcdir)/config/m88k/dolphin.ld - rm -f gcc.ld; cp $(srcdir)/config/m88k/dolphin.ld gcc.ld --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/tekXD88.h gcc-3.3/gcc/config/m88k/tekXD88.h *** gcc-3.2.3/gcc/config/m88k/tekXD88.h 2000-01-12 19:50:19.000000000 +0000 --- gcc-3.3/gcc/config/m88k/tekXD88.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,54 **** - /* Tektronix XD88 UTekV 3.2e (svr3 derived from UniSoft System V/88) - - Copyright (C) 1993, 2000 Free Software Foundation, Inc. - Contributed by Kaveh R. Ghazi (ghazi@caip.rutgers.edu) 2/22/93. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - */ - - #include "m88k/sysv3.h" - - /* Don't output structure tag names when it causes a forward reference. - Symptom: - Error messages like - as: "/usr/tmp/cca22733.s": cannot reduce symbol table, unused symbols remain - when compiling some programs. - example program (C++): struct bad { bad(); }; bad::bad() {} - - This problem seems to have gone away, perhaps with release 3.6 of the O/S - from Dolphin. */ - /* #undef SDB_ALLOW_FORWARD_REFERENCES */ - /* I don't know if this SDB thing is needed or not --KRG */ - - - /* Use T_ARG as T_VOID. T_VOID is not defined in as it - should be. If we're cross compiling, then don't do this because - "gsyms.h" has T_VOID. */ - #ifndef CROSS_COMPILE - #define T_VOID T_ARG - #endif - - - /* The bundled ld program needs link editor directives which normally - reside in /lib/default.ld. We'll pass our own copy during the link - phase because additional information about extra sections must be added - so that gcc generated files will link properly. - --KRG. - */ - #undef LINK_SPEC - #define LINK_SPEC "gcc.ld%s" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/tekXD88.ld gcc-3.3/gcc/config/m88k/tekXD88.ld *** gcc-3.2.3/gcc/config/m88k/tekXD88.ld 1998-12-16 21:08:38.000000000 +0000 --- gcc-3.3/gcc/config/m88k/tekXD88.ld 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,39 **** - /* gcc.ld - COFF linker directives for the Tektronix XD88. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - - This file does the following: - - Sets VIRTUAL addr of .text to 0x10200 - Sets FILE addr of .text to 0x200 (BLOCK directive) - - Depending on size of .text section rounds up to next - 4 MG boundary, adds (size of .text and vaddr of .text) mod 64K - This is to handle sections larger than 4 MG. - */ - - SECTIONS { - .text 0x10200 BLOCK (0x200): - { *(.init) *(.text) *(.rodata) *(.tdesc) *(.fini)} - - GROUP BIND( ((SIZEOF(.text) / 0x400000 * 0x400000) + 0x400000) + - ((SIZEOF(.text) + ADDR(.text)) % 0x10000) ) : - { - .data : { } - .bss : { } - } - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/t-m88k-gas gcc-3.3/gcc/config/m88k/t-m88k-gas *** gcc-3.2.3/gcc/config/m88k/t-m88k-gas 2001-05-17 03:16:02.000000000 +0000 --- gcc-3.3/gcc/config/m88k/t-m88k-gas 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,16 **** - # Specify how to create the *.asm files - - MOVE_ASM = moveHI15x.asm moveQI16x.asm moveSI46x.asm moveSI64n.asm \ - moveHI48x.asm moveSI45x.asm moveSI47x.asm moveSI96x.asm \ - moveDI96x.asm - - $(MOVE_ASM): $(srcdir)/config/m88k/m88k-move.sh - $(srcdir)/config/m88k/m88k-move.sh - - LIB2FUNCS_EXTRA = $(MOVE_ASM) - T_CPPFLAGS = -DUSE_GAS - - # For svr4 we build crtbegin.o and crtend.o which serve to add begin and - # end labels to the .ctors and .dtors section when we link using gcc. - - EXTRA_PARTS=crtbegin.o crtend.o --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/m88k/t-tekXD88 gcc-3.3/gcc/config/m88k/t-tekXD88 *** gcc-3.2.3/gcc/config/m88k/t-tekXD88 2002-01-10 22:03:05.000000000 +0000 --- gcc-3.3/gcc/config/m88k/t-tekXD88 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,5 **** - # Install the custom Tektronix XD88 link editor directives file. - EXTRA_PARTS=crtbegin.o crtend.o gcc.ld - - gcc.ld: $(srcdir)/config/m88k/tekXD88.ld - rm -f gcc.ld; cp $(srcdir)/config/m88k/tekXD88.ld ./gcc.ld --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mcore/mcore.c gcc-3.3/gcc/config/mcore/mcore.c *** gcc-3.2.3/gcc/config/mcore/mcore.c 2001-12-23 16:07:15.000000000 +0000 --- gcc-3.3/gcc/config/mcore/mcore.c 2002-09-24 12:48:59.000000000 +0000 *************** *** 1,5 **** /* Output routines for Motorola MCore processor ! Copyright (C) 1993, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Output routines for Motorola MCore processor ! Copyright (C) 1993, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** rtx arch_compare_op1; *** 62,68 **** /* Provides the class number of the smallest class containing reg number. */ ! int regno_reg_class[FIRST_PSEUDO_REGISTER] = { GENERAL_REGS, ONLYR1_REGS, LRW_REGS, LRW_REGS, LRW_REGS, LRW_REGS, LRW_REGS, LRW_REGS, --- 62,68 ---- /* Provides the class number of the smallest class containing reg number. */ ! const int regno_reg_class[FIRST_PSEUDO_REGISTER] = { GENERAL_REGS, ONLYR1_REGS, LRW_REGS, LRW_REGS, LRW_REGS, LRW_REGS, LRW_REGS, LRW_REGS, *************** static cond_type is_cond_candidate *** 125,131 **** static rtx emit_new_cond_insn PARAMS ((rtx, int)); static rtx conditionalize_block PARAMS ((rtx)); static void conditionalize_optimization PARAMS ((rtx)); - static void mcore_add_gc_roots PARAMS ((void)); static rtx handle_structs_in_regs PARAMS ((enum machine_mode, tree, int)); static void mcore_mark_dllexport PARAMS ((tree)); static void mcore_mark_dllimport PARAMS ((tree)); --- 125,130 ---- *************** static tree mcore_handle_naked_att *** 137,142 **** --- 136,144 ---- static void mcore_asm_named_section PARAMS ((const char *, unsigned int)); #endif + static void mcore_unique_section PARAMS ((tree, int)); + static void mcore_encode_section_info PARAMS ((tree, int)); + static const char *mcore_strip_name_encoding PARAMS ((const char *)); /* Initialize the GCC target structure. */ #ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES *************** static void mcore_asm_named_section *** 153,158 **** --- 155,166 ---- #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE mcore_attribute_table + #undef TARGET_ASM_UNIQUE_SECTION + #define TARGET_ASM_UNIQUE_SECTION mcore_unique_section + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO mcore_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING mcore_strip_name_encoding struct gcc_target targetm = TARGET_INITIALIZER; *************** mcore_output_inline_const_forced (insn, *** 1288,1294 **** /* Now, work our way backwards emitting the constant. */ ! /* Emit the value that remains -- it will be non-zero. */ operands[1] = GEN_INT (value); output_asm_insn (output_inline_const (SImode, operands), operands); --- 1296,1302 ---- /* Now, work our way backwards emitting the constant. */ ! /* Emit the value that remains -- it will be nonzero. */ operands[1] = GEN_INT (value); output_asm_insn (output_inline_const (SImode, operands), operands); *************** mcore_output_movedouble (operands, mode) *** 1429,1435 **** /* Predicates used by the templates. */ ! /* Non zero if OP can be source of a simple move operation. */ int mcore_general_movsrc_operand (op, mode) --- 1437,1443 ---- /* Predicates used by the templates. */ ! /* Nonzero if OP can be source of a simple move operation. */ int mcore_general_movsrc_operand (op, mode) *************** mcore_general_movsrc_operand (op, mode) *** 1443,1449 **** return general_operand (op, mode); } ! /* Non zero if OP can be destination of a simple move operation. */ int mcore_general_movdst_operand (op, mode) --- 1451,1457 ---- return general_operand (op, mode); } ! /* Nonzero if OP can be destination of a simple move operation. */ int mcore_general_movdst_operand (op, mode) *************** mcore_arith_reg_operand (op, mode) *** 1475,1481 **** return 1; } ! /* Non zero if OP should be recognized during reload for an ixh/ixw operand. See the ixh/ixw patterns. */ int --- 1483,1489 ---- return 1; } ! /* Nonzero if OP should be recognized during reload for an ixh/ixw operand. See the ixh/ixw patterns. */ int *************** mcore_expand_insv (operands) *** 1721,1727 **** return 1; } ! /* Look at some bitfield placements that we aren't interested in handling ourselves, unless specifically directed to do so. */ if (! TARGET_W_FIELD) return 0; /* Generally, give up about now. */ --- 1729,1735 ---- return 1; } ! /* Look at some bit-field placements that we aren't interested in handling ourselves, unless specifically directed to do so. */ if (! TARGET_W_FIELD) return 0; /* Generally, give up about now. */ *************** mcore_expand_prolog () *** 2333,2339 **** { /* Emit a symbol for this routine's frame size. */ rtx x; - int len; x = DECL_RTL (current_function_decl); --- 2341,2346 ---- *************** mcore_expand_prolog () *** 2348,2357 **** if (mcore_current_function_name) free (mcore_current_function_name); ! len = strlen (XSTR (x, 0)) + 1; ! mcore_current_function_name = (char *) xmalloc (len); ! ! memcpy (mcore_current_function_name, XSTR (x, 0), len); ASM_OUTPUT_CG_NODE (asm_out_file, mcore_current_function_name, space_allocated); --- 2355,2361 ---- if (mcore_current_function_name) free (mcore_current_function_name); ! mcore_current_function_name = xstrdup (XSTR (x, 0)); ASM_OUTPUT_CG_NODE (asm_out_file, mcore_current_function_name, space_allocated); *************** mcore_is_same_reg (x, y) *** 3060,3074 **** return 0; } - /* Called to register all of our global variables with the garbage - collector. */ - static void - mcore_add_gc_roots () - { - ggc_add_rtx_root (&arch_compare_op0, 1); - ggc_add_rtx_root (&arch_compare_op1, 1); - } - void mcore_override_options () { --- 3064,3069 ---- *************** mcore_override_options () *** 3087,3094 **** /* Only the m340 supports little endian code. */ if (TARGET_LITTLE_END && ! TARGET_M340) target_flags |= M340_BIT; - - mcore_add_gc_roots (); } int --- 3082,3087 ---- *************** mcore_function_arg_partial_nregs (cum, m *** 3275,3281 **** return reg; } ! /* Return non-zero if SYMBOL is marked as being dllexport'd. */ int mcore_dllexport_name_p (symbol) const char * symbol; --- 3268,3274 ---- return reg; } ! /* Return nonzero if SYMBOL is marked as being dllexport'd. */ int mcore_dllexport_name_p (symbol) const char * symbol; *************** mcore_dllexport_name_p (symbol) *** 3283,3289 **** return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.'; } ! /* Return non-zero if SYMBOL is marked as being dllimport'd. */ int mcore_dllimport_name_p (symbol) const char * symbol; --- 3276,3282 ---- return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.'; } ! /* Return nonzero if SYMBOL is marked as being dllimport'd. */ int mcore_dllimport_name_p (symbol) const char * symbol; *************** mcore_dllimport_p (decl) *** 3414,3423 **** return lookup_attribute ("dllimport", DECL_ATTRIBUTES (decl)) != 0; } ! /* Cover function to implement ENCODE_SECTION_INFO. */ ! void ! mcore_encode_section_info (decl) tree decl; { /* This bit is copied from arm.h. */ if (optimize > 0 --- 3407,3419 ---- return lookup_attribute ("dllimport", DECL_ATTRIBUTES (decl)) != 0; } ! /* We must mark dll symbols specially. Definitions of dllexport'd objects ! install some info in the .drective (PE) or .exports (ELF) sections. */ ! ! static void ! mcore_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { /* This bit is copied from arm.h. */ if (optimize > 0 *************** mcore_encode_section_info (decl) *** 3458,3463 **** --- 3454,3468 ---- } } + /* Undo the effects of the above. */ + + static const char * + mcore_strip_name_encoding (str) + const char *str; + { + return str + (str[0] == '@' ? 3 : 0); + } + /* MCore specific attribute support. dllexport - for exporting a function/variable that will live in a dll dllimport - for importing a function/variable from a dll *************** mcore_handle_naked_attribute (node, name *** 3510,3531 **** return NULL_TREE; } ! /* Cover function for UNIQUE_SECTION. */ ! void mcore_unique_section (decl, reloc) tree decl; int reloc ATTRIBUTE_UNUSED; { int len; ! char * name; char * string; const char * prefix; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); /* Strip off any encoding in name. */ ! STRIP_NAME_ENCODING (name, name); /* The object is put in, for example, section .text$foo. The linker will then ultimately place them in .text --- 3515,3537 ---- return NULL_TREE; } ! /* ??? It looks like this is PE specific? Oh well, this is what the ! old code did as well. */ ! static void mcore_unique_section (decl, reloc) tree decl; int reloc ATTRIBUTE_UNUSED; { int len; ! const char * name; char * string; const char * prefix; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); /* Strip off any encoding in name. */ ! name = (* targetm.strip_name_encoding) (name); /* The object is put in, for example, section .text$foo. The linker will then ultimately place them in .text *************** mcore_unique_section (decl, reloc) *** 3534,3540 **** prefix = ".text$"; /* For compatibility with EPOC, we ignore the fact that the section might have relocs against it. */ ! else if (DECL_READONLY_SECTION (decl, 0)) prefix = ".rdata$"; else prefix = ".data$"; --- 3540,3546 ---- prefix = ".text$"; /* For compatibility with EPOC, we ignore the fact that the section might have relocs against it. */ ! else if (decl_readonly_section (decl, 0)) prefix = ".rdata$"; else prefix = ".data$"; diff -Nrc3pad gcc-3.2.3/gcc/config/mcore/mcore-elf.h gcc-3.3/gcc/config/mcore/mcore-elf.h *** gcc-3.2.3/gcc/config/mcore/mcore-elf.h 2002-01-27 04:18:10.000000000 +0000 --- gcc-3.3/gcc/config/mcore/mcore-elf.h 2002-08-29 21:40:15.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 28,54 **** #define SUBTARGET_CPP_PREDEFINES " -D__ELF__" /* Use DWARF2 debugging info. */ - #ifndef DWARF2_DEBUGGING_INFO #define DWARF2_DEBUGGING_INFO 1 - #endif #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG /* But allow DWARF 1 if the user wants it. */ - #ifndef DWARF_DEBUGGING_INFO #define DWARF_DEBUGGING_INFO 1 - #endif #define EXPORTS_SECTION_ASM_OP "\t.section .exports" ! #define SUBTARGET_EXTRA_SECTIONS in_const, in_exports #define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ ! CONST_SECTION_FUNCTION \ ! EXPORT_SECTION_FUNCTION \ ! ! /* CONST_SECTION_FUNCTION is defined svr4.h. */ #define EXPORT_SECTION_FUNCTION \ void \ --- 28,47 ---- #define SUBTARGET_CPP_PREDEFINES " -D__ELF__" /* Use DWARF2 debugging info. */ #define DWARF2_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG /* But allow DWARF 1 if the user wants it. */ #define DWARF_DEBUGGING_INFO 1 #define EXPORTS_SECTION_ASM_OP "\t.section .exports" ! #define SUBTARGET_EXTRA_SECTIONS in_exports #define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ ! EXPORT_SECTION_FUNCTION #define EXPORT_SECTION_FUNCTION \ void \ *************** exports_section () \ *** 62,69 **** } #define SUBTARGET_SWITCH_SECTIONS \ ! case in_exports: exports_section (); break; \ ! case in_const: const_section (); break; #define MCORE_EXPORT_NAME(STREAM, NAME) \ --- 55,61 ---- } #define SUBTARGET_SWITCH_SECTIONS \ ! case in_exports: exports_section (); break; #define MCORE_EXPORT_NAME(STREAM, NAME) \ *************** exports_section () \ *** 71,77 **** { \ exports_section (); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \ ! MCORE_STRIP_NAME_ENCODING (NAME)); \ } \ while (0); --- 63,69 ---- { \ exports_section (); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \ ! (* targetm.strip_name_encoding) (NAME)); \ } \ while (0); *************** exports_section () \ *** 79,128 **** Some svr4 assemblers need to also have something extra said about the function's return value. We allow for that here. */ #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! if (mcore_dllexport_name_p (NAME)) \ ! { \ ! MCORE_EXPORT_NAME (FILE, NAME); \ ! function_section (DECL); \ ! } \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ ! } \ while (0) /* Write the extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! if (mcore_dllexport_name_p (NAME)) \ ! { \ ! enum in_section save_section = in_section; \ ! MCORE_EXPORT_NAME (FILE, NAME); \ ! switch_to_section (save_section, (DECL)); \ ! } \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ while (0) /* Output the size directive for a decl in rest_of_decl_compilation --- 71,112 ---- Some svr4 assemblers need to also have something extra said about the function's return value. We allow for that here. */ #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! if (mcore_dllexport_name_p (NAME)) \ ! { \ ! MCORE_EXPORT_NAME (FILE, NAME); \ ! function_section (DECL); \ ! } \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ ! } \ while (0) /* Write the extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! HOST_WIDE_INT size; \ ! if (mcore_dllexport_name_p (NAME)) \ ! { \ ! enum in_section save_section = in_section; \ ! MCORE_EXPORT_NAME (FILE, NAME); \ ! switch_to_section (save_section, (DECL)); \ ! } \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ while (0) /* Output the size directive for a decl in rest_of_decl_compilation *************** exports_section () \ *** 135,148 **** do \ { \ const char * name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL)));\ } \ } \ while (0) --- 119,133 ---- do \ { \ const char * name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } \ while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/mcore/mcore.h gcc-3.3/gcc/config/mcore/mcore.h *** gcc-3.2.3/gcc/config/mcore/mcore.h 2002-05-03 12:07:08.000000000 +0000 --- gcc-3.3/gcc/config/mcore/mcore.h 2003-04-29 14:31:53.000000000 +0000 *************** extern int target_flags; *** 137,143 **** {"relax-immediates", RELAX_IMM_BIT, \ "" }, \ {"no-relax-immediates", - RELAX_IMM_BIT, \ ! N_("Do not arbitary sized immediates in bit operations") }, \ {"wide-bitfields", W_FIELD_BIT, \ N_("Always treat bit-field as int-sized") }, \ {"no-wide-bitfields", - W_FIELD_BIT, \ --- 137,143 ---- {"relax-immediates", RELAX_IMM_BIT, \ "" }, \ {"no-relax-immediates", - RELAX_IMM_BIT, \ ! N_("Do not arbitrary sized immediates in bit operations") }, \ {"wide-bitfields", W_FIELD_BIT, \ N_("Always treat bit-field as int-sized") }, \ {"no-wide-bitfields", - W_FIELD_BIT, \ *************** extern const char * mcore_stack_incremen *** 179,185 **** } #ifndef CC1_SPEC ! /* The MCore ABI says that bitfields are unsigned by default. */ #define CC1_SPEC "-funsigned-bitfields" #endif --- 179,185 ---- } #ifndef CC1_SPEC ! /* The MCore ABI says that bitfields are unsigned by default. */ #define CC1_SPEC "-funsigned-bitfields" #endif *************** extern const char * mcore_stack_incremen *** 215,224 **** /* Target machine storage Layout. */ - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ if (GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ --- 215,220 ---- *************** extern const char * mcore_stack_incremen *** 248,270 **** #define LIBGCC2_WORDS_BIG_ENDIAN 0 #endif - /* Number of bits in an addressable storage unit. */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 #define MAX_BITS_PER_WORD 32 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* A C expression for the size in bits of the type `long long' on the target machine. If you don't define this, the default is two words. */ --- 244,254 ---- *************** extern int mcore_stack_increment; *** 300,306 **** /* Every structures size must be a multiple of 8 bits. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* Look at the fundamental type that is used for a bitfield and use that to impose alignment on the enclosing structure. struct s {int a:8}; should have same alignment as "int", not "char". */ #define PCC_BITFIELD_TYPE_MATTERS 1 --- 284,290 ---- /* Every structures size must be a multiple of 8 bits. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* Look at the fundamental type that is used for a bit-field and use that to impose alignment on the enclosing structure. struct s {int a:8}; should have same alignment as "int", not "char". */ #define PCC_BITFIELD_TYPE_MATTERS 1 *************** enum reg_class *** 528,534 **** reg number REGNO. This could be a conditional expression or could index an array. */ ! extern int regno_reg_class[FIRST_PSEUDO_REGISTER]; #define REGNO_REG_CLASS(REGNO) regno_reg_class[REGNO] /* When defined, the compiler allows registers explicitly used in the --- 512,518 ---- reg number REGNO. This could be a conditional expression or could index an array. */ ! extern const int regno_reg_class[FIRST_PSEUDO_REGISTER]; #define REGNO_REG_CLASS(REGNO) regno_reg_class[REGNO] /* When defined, the compiler allows registers explicitly used in the *************** switch_to_section (section, decl) \ *** 1128,1142 **** (STACK_BOUNDARY / BITS_PER_UNIT)) - /* Output a label definition. */ - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - /* Output a reference to a label. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ ! fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, MCORE_STRIP_NAME_ENCODING (NAME)) ! /* This is how to output an assembler line that says to advance the location counter --- 1112,1122 ---- (STACK_BOUNDARY / BITS_PER_UNIT)) /* Output a reference to a label. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ ! fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \ ! (* targetm.strip_name_encoding) (NAME)) /* This is how to output an assembler line that says to advance the location counter *************** switch_to_section (section, decl) \ *** 1149,1169 **** #define ASM_DECLARE_RESULT(FILE, RESULT) #endif - /* Strip export encoding from a function name. */ - #define MCORE_STRIP_NAME_ENCODING(SYM_NAME) \ - ((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0)) - - /* Strip any text from SYM_NAME added by ENCODE_SECTION_INFO and store - the result in VAR. */ - #undef STRIP_NAME_ENCODING - #define STRIP_NAME_ENCODING(VAR, SYM_NAME) \ - (VAR) = MCORE_STRIP_NAME_ENCODING (SYM_NAME) - - #undef UNIQUE_SECTION - #define UNIQUE_SECTION(DECL, RELOC) mcore_unique_section (DECL, RELOC) - - #define REDO_SECTION_INFO_P(DECL) 1 - #define MULTIPLE_SYMBOL_SPACES 1 #define SUPPORTS_ONE_ONLY 1 --- 1129,1134 ---- *************** extern long mcore_current_compilation_ti *** 1196,1206 **** } \ while (0) ! /* Output a globalising directive for a label. */ ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! (fprintf (STREAM, "\t.export\t"), \ ! assemble_name (STREAM, NAME), \ ! fputc ('\n',STREAM)) \ /* The prefix to add to user-visible assembler symbols. */ #undef USER_LABEL_PREFIX --- 1161,1168 ---- } \ while (0) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.export\t" /* The prefix to add to user-visible assembler symbols. */ #undef USER_LABEL_PREFIX *************** extern long mcore_current_compilation_ti *** 1313,1323 **** } \ while (0) - /* We must mark dll symbols specially. Definitions of dllexport'd objects - install some info in the .drective (PE) or .exports (ELF) sections. */ - #undef ENCODE_SECTION_INFO - #define ENCODE_SECTION_INFO(DECL) mcore_encode_section_info (DECL) - /* Print operand X (an rtx) in assembler syntax to file FILE. CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. For `%' followed by punctuation, CODE is the punctuation and X is null. */ --- 1275,1280 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mcore/mcore.md gcc-3.3/gcc/config/mcore/mcore.md *** gcc-3.2.3/gcc/config/mcore/mcore.md 2001-10-09 10:16:13.000000000 +0000 --- gcc-3.3/gcc/config/mcore/mcore.md 2002-09-24 12:48:59.000000000 +0000 *************** *** 2881,2887 **** } else if (CONST_OK_FOR_K ((1 << INTVAL (operands[2])) - 1)) { ! /* A narrow bitfield (<=5 bits) means we can do a shift to put it in place and then use an andi to extract it. This is as good as a shiftleft/shiftright. */ --- 2881,2887 ---- } else if (CONST_OK_FOR_K ((1 << INTVAL (operands[2])) - 1)) { ! /* A narrow bit-field (<=5 bits) means we can do a shift to put it in place and then use an andi to extract it. This is as good as a shiftleft/shiftright. */ diff -Nrc3pad gcc-3.2.3/gcc/config/mcore/mcore-pe.h gcc-3.3/gcc/config/mcore/mcore-pe.h *** gcc-3.2.3/gcc/config/mcore/mcore-pe.h 2002-03-25 19:15:06.000000000 +0000 --- gcc-3.3/gcc/config/mcore/mcore-pe.h 2002-08-29 21:40:15.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for MCore using COFF/PE. ! Copyright (C) 1994, 1999, 2000 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com). This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for MCore using COFF/PE. ! Copyright (C) 1994, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 33,39 **** #include "dbxcoff.h" #undef SDB_DEBUGGING_INFO - #undef DBX_DEBUGGING_INFO #define DBX_DEBUGGING_INFO 1 /* Computed in toplev.c. */ --- 33,38 ---- *************** Boston, MA 02111-1307, USA. */ *** 43,59 **** and readonly data. This gets them out of default places. */ #define SUBTARGET_SWITCH_SECTIONS \ ! case in_drectve: drectve_section (); break; \ ! case in_rdata: rdata_section (); break; #define DRECTVE_SECTION_ASM_OP "\t.section .drectve" ! #define RDATA_SECTION_ASM_OP "\t.section .rdata" ! #define SUBTARGET_EXTRA_SECTIONS in_drectve, in_rdata #define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ ! DRECTVE_SECTION_FUNCTION \ ! RDATA_SECTION_FUNCTION #define DRECTVE_SECTION_FUNCTION \ void \ --- 42,56 ---- and readonly data. This gets them out of default places. */ #define SUBTARGET_SWITCH_SECTIONS \ ! case in_drectve: drectve_section (); break; #define DRECTVE_SECTION_ASM_OP "\t.section .drectve" ! #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata" ! #define SUBTARGET_EXTRA_SECTIONS in_drectve #define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ ! DRECTVE_SECTION_FUNCTION #define DRECTVE_SECTION_FUNCTION \ void \ *************** drectve_section () \ *** 66,128 **** } \ } - #define RDATA_SECTION_FUNCTION \ - void \ - rdata_section () \ - { \ - if (in_section != in_rdata) \ - { \ - fprintf (asm_out_file, "%s\n", RDATA_SECTION_ASM_OP); \ - in_section = in_rdata; \ - } \ - } - - #undef READONLY_DATA_SECTION - #define READONLY_DATA_SECTION() rdata_section () - - /* A C statement or statements to switch to the appropriate - section for output of DECL. DECL is either a `VAR_DECL' node - or a constant of some sort. RELOC indicates whether forming - the initial value of DECL requires link-time relocations. */ - #undef SELECT_SECTION - #define SELECT_SECTION(DECL, RELOC, ALIGN) \ - { \ - if (TREE_CODE (DECL) == STRING_CST) \ - { \ - if (! flag_writable_strings) \ - rdata_section (); \ - else \ - data_section (); \ - } \ - else if (TREE_CODE (DECL) == VAR_DECL) \ - { \ - if ((0 && RELOC) /* should be (flag_pic && RELOC) */ \ - || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ - || !DECL_INITIAL (DECL) \ - || (DECL_INITIAL (DECL) != error_mark_node \ - && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ - data_section (); \ - else \ - rdata_section (); \ - } \ - else \ - rdata_section (); \ - } - - /* A C statement or statements to switch to the appropriate - section for output of RTX in mode MODE. RTX is some kind - of constant in RTL. The argument MODE is redundant except - in the case of a `const_int' rtx. Currently, these always - go into the const section. */ - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) rdata_section () - #define MCORE_EXPORT_NAME(STREAM, NAME) \ do \ { \ drectve_section (); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \ ! MCORE_STRIP_NAME_ENCODING (NAME)); \ } \ while (0); --- 63,74 ---- } \ } #define MCORE_EXPORT_NAME(STREAM, NAME) \ do \ { \ drectve_section (); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \ ! (* targetm.strip_name_encoding) (NAME)); \ } \ while (0); diff -Nrc3pad gcc-3.2.3/gcc/config/mcore/mcore-protos.h gcc-3.3/gcc/config/mcore/mcore-protos.h *** gcc-3.2.3/gcc/config/mcore/mcore-protos.h 2001-11-04 02:40:39.000000000 +0000 --- gcc-3.3/gcc/config/mcore/mcore-protos.h 2002-06-04 07:09:11.000000000 +0000 *************** *** 1,5 **** /* Prototypes for exported functions defined in mcore.c ! Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Nick Clifton (nickc@redhat.com) This file is part of GNU CC. --- 1,5 ---- /* Prototypes for exported functions defined in mcore.c ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. Contributed by Nick Clifton (nickc@redhat.com) This file is part of GNU CC. *************** extern int mcore_dllimport_name *** 35,43 **** extern int mcore_naked_function_p PARAMS ((void)); #ifdef TREE_CODE - extern void mcore_unique_section PARAMS ((tree, int)); - extern void mcore_encode_section_info PARAMS ((tree)); - #ifdef HAVE_MACHINE_MODES extern int mcore_function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS, enum machine_mode, tree, int)); extern void mcore_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS, enum machine_mode, tree, int *)); --- 35,40 ---- *************** extern rtx mcore_function_value *** 52,59 **** #ifdef RTX_CODE ! extern rtx arch_compare_op0; ! extern rtx arch_compare_op1; extern const char * mcore_output_bclri PARAMS ((rtx, int)); extern const char * mcore_output_bseti PARAMS ((rtx, int)); --- 49,56 ---- #ifdef RTX_CODE ! extern GTY(()) rtx arch_compare_op0; ! extern GTY(()) rtx arch_compare_op1; extern const char * mcore_output_bclri PARAMS ((rtx, int)); extern const char * mcore_output_bseti PARAMS ((rtx, int)); diff -Nrc3pad gcc-3.2.3/gcc/config/mcore/t-mcore-pe gcc-3.3/gcc/config/mcore/t-mcore-pe *** gcc-3.2.3/gcc/config/mcore/t-mcore-pe 2001-05-17 03:16:03.000000000 +0000 --- gcc-3.3/gcc/config/mcore/t-mcore-pe 2002-03-25 19:17:40.000000000 +0000 *************** MULTILIB_MATCHES = *** 30,36 **** MULTILIB_EXTRA_OPTS = MULTILIB_EXCEPTIONS = ! EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib --- 30,36 ---- MULTILIB_EXTRA_OPTS = MULTILIB_EXCEPTIONS = ! # EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/mips/5400.md gcc-3.3/gcc/config/mips/5400.md *** gcc-3.2.3/gcc/config/mips/5400.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/5400.md 2002-08-20 21:53:28.000000000 +0000 *************** *** 0 **** --- 1,170 ---- + ;; DFA-based pipeline description for 5400 + (define_automaton "vr54") + (define_cpu_unit "vr54_dp0" "vr54") + (define_cpu_unit "vr54_dp1" "vr54") + (define_cpu_unit "vr54_mem" "vr54") + (define_cpu_unit "vr54_mac" "vr54") + + ;; + ;; The ordering of the instruction-execution-path/resource-usage + ;; descriptions (also known as reservation RTL) is roughly ordered + ;; based on the define attribute RTL for the "type" classification. + ;; When modifying, remember that the first test that matches is the + ;; reservation used! + ;; + + (define_insn_reservation "ir_vr54_unknown" 1 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "unknown")) + "vr54_dp0+vr54_dp1+vr54_mem+vr54_mac") + + ;; Assume prediction fails. + (define_insn_reservation "ir_vr54_branch" 3 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "branch,jump,call")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_load" 2 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "load") + (eq_attr "mode" "!SF,DF,FPSW"))) + "vr54_mem") + + (define_insn_reservation "ir_vr54_store" 1 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "store") + (eq_attr "mode" "!SF,DF,FPSW"))) + "vr54_mem") + + (define_insn_reservation "ir_vr54_fstore" 1 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "store") + (eq_attr "mode" "SF,DF"))) + "vr54_mem") + + + ;; This reservation is for conditional move based on integer + ;; or floating point CC. This could probably use some refinement + ;; as "move" type attr seems to be overloaded in rtl. + (define_insn_reservation "ir_vr54_move" 4 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "move")) + "vr54_dp0|vr54_dp1") + + ;; Move to/from FPU registers + (define_insn_reservation "ir_vr54_xfer" 2 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "xfer")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_hilo" 1 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "hilo")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_arith" 1 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "arith,darith,icmp,nop")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_imul_si" 3 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "imul") + (eq_attr "mode" "SI"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_imul_di" 4 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "imul") + (eq_attr "mode" "DI"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_imadd_si" 3 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "imul")) + "vr54_mac") + + (define_insn_reservation "ir_vr54_idiv_si" 42 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "idiv") + (eq_attr "mode" "SI"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_idiv_di" 74 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "idiv") + (eq_attr "mode" "DI"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fadd" 4 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "fadd")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fmul_sf" 5 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "fmul") + (eq_attr "mode" "SF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fmul_df" 6 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "fmul") + (eq_attr "mode" "DF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fmadd_sf" 9 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "fmadd") + (eq_attr "mode" "SF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fmadd_df" 10 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "fmadd") + (eq_attr "mode" "DF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fdiv_sf" 42 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "fdiv,fsqrt") + (eq_attr "mode" "SF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fdiv_df" 72 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "fdiv,fsqrt") + (eq_attr "mode" "DF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fabs" 2 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "fabs,fneg")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fcmp" 2 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "fcmp")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_fcvt" 6 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "fcvt")) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_frsqrt_sf" 61 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "frsqrt") + (eq_attr "mode" "SF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_frsqrt_df" 121 + (and (eq_attr "cpu" "r5400") + (and (eq_attr "type" "frsqrt") + (eq_attr "mode" "DF"))) + "vr54_dp0|vr54_dp1") + + (define_insn_reservation "ir_vr54_multi" 1 + (and (eq_attr "cpu" "r5400") + (eq_attr "type" "multi")) + "vr54_dp0+vr54_dp1+vr54_mem+vr54_mac") diff -Nrc3pad gcc-3.2.3/gcc/config/mips/5500.md gcc-3.3/gcc/config/mips/5500.md *** gcc-3.2.3/gcc/config/mips/5500.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/5500.md 2002-08-20 21:53:28.000000000 +0000 *************** *** 0 **** --- 1,172 ---- + ;; DFA-based pipeline description for 5500 + (define_automaton "vr55") + (define_cpu_unit "vr55_dp0" "vr55") + (define_cpu_unit "vr55_dp1" "vr55") + (define_cpu_unit "vr55_mem" "vr55") + (define_cpu_unit "vr55_mac" "vr55") + (define_cpu_unit "vr55_fp" "vr55") + (define_cpu_unit "vr55_bru" "vr55") + + ;; + ;; The ordering of the instruction-execution-path/resource-usage + ;; descriptions (also known as reservation RTL) is roughly ordered + ;; based on the define attribute RTL for the "type" classification. + ;; When modifying, remember that the first test that matches is the + ;; reservation used! + ;; + + (define_insn_reservation "ir_vr55_unknown" 1 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "unknown")) + "vr55_dp0+vr55_dp1+vr55_mem+vr55_mac+vr55_fp+vr55_bru") + + ;; Assume prediction fails. + (define_insn_reservation "ir_vr55_branch" 2 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "branch,jump,call")) + "vr55_bru") + + (define_insn_reservation "ir_vr55_load" 3 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "load")) + "vr55_mem") + + (define_insn_reservation "ir_vr55_store" 1 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "store")) + "vr55_mem") + + ;; This reservation is for conditional move based on integer + ;; or floating point CC. This could probably use some refinement + ;; as "move" type attr seems to be overloaded in rtl. + (define_insn_reservation "ir_vr55_move" 2 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "move")) + "vr55_dp0|vr55_dp1") + + ;; Move to/from FPU registers + (define_insn_reservation "ir_vr55_xfer" 2 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "xfer")) + "vr55_dp0|vr55_dp1") + + (define_insn_reservation "ir_vr55_hilo" 2 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "hilo")) + "vr55_dp0|vr55_dp1") + + (define_insn_reservation "ir_vr55_arith" 1 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "arith,darith,icmp,nop")) + "vr55_dp0|vr55_dp1") + + (define_insn_reservation "ir_vr55_imul_si" 3 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "imul") + (eq_attr "mode" "SI"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_imul_di" 4 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "imul") + (eq_attr "mode" "DI"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_imadd_si" 3 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "imul")) + "vr55_mac") + + ;; Divide algorithm is early out with best latency of 7 pcycles. + ;; Use worst case for scheduling purposes. + (define_insn_reservation "ir_vr55_idiv_si" 42 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "idiv") + (eq_attr "mode" "SI"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_idiv_di" 74 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "idiv") + (eq_attr "mode" "DI"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_fadd" 4 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "fadd")) + "vr55_fp") + + (define_insn_reservation "ir_vr55_fmul_sf" 5 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fmul") + (eq_attr "mode" "SF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_fmul_df" 6 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fmul") + (eq_attr "mode" "DF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_fmadd_sf" 9 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fmadd") + (eq_attr "mode" "SF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_fmadd_df" 10 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fmadd") + (eq_attr "mode" "DF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_fdiv_sf" 30 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fdiv,fsqrt") + (eq_attr "mode" "SF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_fdiv_df" 59 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fdiv,fsqrt") + (eq_attr "mode" "DF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_fabs" 2 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "fabs,fneg")) + "vr55_fp") + + (define_insn_reservation "ir_vr55_fcmp" 2 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "fcmp")) + "vr55_fp") + + (define_insn_reservation "ir_vr55_fcvt_sf" 4 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fcvt") + (eq_attr "mode" "SF"))) + "vr55_fp") + + (define_insn_reservation "ir_vr55_fcvt_df" 6 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "fcvt") + (eq_attr "mode" "DF"))) + "vr55_fp") + + (define_insn_reservation "ir_vr55_frsqrt_sf" 60 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "frsqrt") + (eq_attr "mode" "SF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_frsqrt_df" 118 + (and (eq_attr "cpu" "r5500") + (and (eq_attr "type" "frsqrt") + (eq_attr "mode" "DF"))) + "vr55_mac") + + (define_insn_reservation "ir_vr55_multi" 1 + (and (eq_attr "cpu" "r5500") + (eq_attr "type" "multi")) + "vr55_dp0+vr55_dp1+vr55_mem+vr55_mac+vr55_fp+vr55_bru") diff -Nrc3pad gcc-3.2.3/gcc/config/mips/abi64.h gcc-3.3/gcc/config/mips/abi64.h *** gcc-3.2.3/gcc/config/mips/abi64.h 2002-04-16 02:50:20.000000000 +0000 --- gcc-3.3/gcc/config/mips/abi64.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,262 **** - /* Definitions of target machine for GNU compiler. 64 bit ABI support. - Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Macros to implement the 64 bit ABI. This file is meant to be included - after mips.h. */ - - #undef SUBTARGET_TARGET_OPTIONS - #define SUBTARGET_TARGET_OPTIONS \ - { "abi=", &mips_abi_string, \ - "Specify ABI to use"}, - - #undef STACK_BOUNDARY - #define STACK_BOUNDARY \ - ((mips_abi == ABI_32 || mips_abi == ABI_O64 || mips_abi == ABI_EABI) \ - ? 64 : 128) - - #undef MIPS_STACK_ALIGN - #define MIPS_STACK_ALIGN(LOC) \ - ((mips_abi == ABI_32 || mips_abi == ABI_O64 || mips_abi == ABI_EABI) \ - ? ((LOC) + 7) & ~7 \ - : ((LOC) + 15) & ~15) - - #undef GP_ARG_LAST - #define GP_ARG_LAST ((mips_abi == ABI_32 || mips_abi == ABI_O64) \ - ? GP_REG_FIRST + 7 : GP_REG_FIRST + 11) - #undef FP_ARG_LAST - #define FP_ARG_LAST ((mips_abi == ABI_32 || mips_abi == ABI_O64) \ - ? FP_REG_FIRST + 15 : FP_REG_FIRST + 19) - - #undef SUBTARGET_CONDITIONAL_REGISTER_USAGE - #define SUBTARGET_CONDITIONAL_REGISTER_USAGE \ - { \ - /* fp20-23 are now caller saved. */ \ - if (mips_abi == ABI_64) \ - { \ - int regno; \ - for (regno = FP_REG_FIRST + 20; regno < FP_REG_FIRST + 24; regno++) \ - call_really_used_regs[regno] = call_used_regs[regno] = 1; \ - } \ - /* odd registers from fp21 to fp31 are now caller saved. */ \ - if (mips_abi == ABI_N32 || mips_abi == ABI_MEABI) \ - { \ - int regno; \ - for (regno = FP_REG_FIRST + 21; regno <= FP_REG_FIRST + 31; regno+=2) \ - call_really_used_regs[regno] = call_used_regs[regno] = 1; \ - } \ - } - - #undef MAX_ARGS_IN_REGISTERS - #define MAX_ARGS_IN_REGISTERS ((mips_abi == ABI_32 || mips_abi == ABI_O64) \ - ? 4 : 8) - - #undef REG_PARM_STACK_SPACE - #define REG_PARM_STACK_SPACE(FNDECL) \ - ((mips_abi == ABI_32 || mips_abi == ABI_O64) \ - ? (MAX_ARGS_IN_REGISTERS*UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL) \ - : 0) - - #define FUNCTION_ARG_PADDING(MODE, TYPE) \ - (! BYTES_BIG_ENDIAN \ - ? upward \ - : (((MODE) == BLKmode \ - ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ - && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT))\ - : (GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY \ - && (mips_abi == ABI_32 \ - || mips_abi == ABI_O64 \ - || mips_abi == ABI_EABI \ - || GET_MODE_CLASS (MODE) == MODE_INT))) \ - ? downward : upward)) - - /* Modified version of the macro in expr.h. */ - #define MUST_PASS_IN_STACK(MODE,TYPE) \ - ((TYPE) != 0 \ - && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ - || TREE_ADDRESSABLE (TYPE) \ - || ((MODE) == BLKmode \ - && mips_abi != ABI_32 && mips_abi != ABI_O64 \ - && ! ((TYPE) != 0 && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ - && 0 == (int_size_in_bytes (TYPE) \ - % (PARM_BOUNDARY / BITS_PER_UNIT))) \ - && (FUNCTION_ARG_PADDING (MODE, TYPE) \ - == (BYTES_BIG_ENDIAN ? upward : downward))))) - - /* Under the old (i.e., 32 and O64 ABIs) all BLKmode objects are - returned in memory. Under the new (N32 and 64-bit MIPS ABIs) small - structures are returned in a register. Objects with varying size - must still be returned in memory, of course. */ - #undef RETURN_IN_MEMORY - #define RETURN_IN_MEMORY(TYPE) \ - ((mips_abi == ABI_32 || mips_abi == ABI_O64) \ - ? TYPE_MODE (TYPE) == BLKmode \ - : ((int_size_in_bytes (TYPE) \ - > (2 * UNITS_PER_WORD)) \ - || (int_size_in_bytes (TYPE) == -1))) - - /* For varargs, we must save the current argument, because it is the fake - argument va_alist, and will need to be converted to the real argument. - For stdarg, we do not need to save the current argument, because it - is a real argument. */ - #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ - { unsigned int mips_off \ - = (! current_function_varargs) && (! (CUM).last_arg_fp); \ - unsigned int mips_fp_off \ - = (! current_function_varargs) && ((CUM).last_arg_fp); \ - if (((mips_abi != ABI_32 && mips_abi != ABI_O64) \ - && (CUM).arg_words < MAX_ARGS_IN_REGISTERS - mips_off) \ - || (mips_abi == ABI_EABI \ - && ! TARGET_SOFT_FLOAT \ - && (CUM).fp_arg_words < MAX_ARGS_IN_REGISTERS - mips_fp_off)) \ - { \ - int mips_save_gp_regs \ - = MAX_ARGS_IN_REGISTERS - (CUM).arg_words - mips_off; \ - int mips_save_fp_regs \ - = (mips_abi != ABI_EABI ? 0 \ - : MAX_ARGS_IN_REGISTERS - (CUM).fp_arg_words - mips_fp_off); \ - \ - if (mips_save_gp_regs < 0) \ - mips_save_gp_regs = 0; \ - if (mips_save_fp_regs < 0) \ - mips_save_fp_regs = 0; \ - PRETEND_SIZE = ((mips_save_gp_regs * UNITS_PER_WORD) \ - + (mips_save_fp_regs * UNITS_PER_FPREG)); \ - \ - if (! (NO_RTL)) \ - { \ - if ((CUM).arg_words < MAX_ARGS_IN_REGISTERS - mips_off) \ - { \ - rtx ptr, mem; \ - if (mips_abi != ABI_EABI) \ - ptr = virtual_incoming_args_rtx; \ - else \ - ptr = plus_constant (virtual_incoming_args_rtx, \ - - (mips_save_gp_regs \ - * UNITS_PER_WORD)); \ - mem = gen_rtx_MEM (BLKmode, ptr); \ - /* va_arg is an array access in this case, which causes \ - it to get MEM_IN_STRUCT_P set. We must set it here \ - so that the insn scheduler won't assume that these \ - stores can't possibly overlap with the va_arg loads. */ \ - if (mips_abi != ABI_EABI && BYTES_BIG_ENDIAN) \ - MEM_SET_IN_STRUCT_P (mem, 1); \ - move_block_from_reg \ - ((CUM).arg_words + GP_ARG_FIRST + mips_off, \ - mem, \ - mips_save_gp_regs, \ - mips_save_gp_regs * UNITS_PER_WORD); \ - } \ - if (mips_abi == ABI_EABI \ - && ! TARGET_SOFT_FLOAT \ - && (CUM).fp_arg_words < MAX_ARGS_IN_REGISTERS - mips_fp_off) \ - { \ - enum machine_mode mode = TARGET_SINGLE_FLOAT ? SFmode : DFmode; \ - int size = GET_MODE_SIZE (mode); \ - int off; \ - int i; \ - /* We can't use move_block_from_reg, because it will use \ - the wrong mode. */ \ - off = - (mips_save_gp_regs * UNITS_PER_WORD); \ - if (! TARGET_SINGLE_FLOAT) \ - off &= ~ 7; \ - if (! TARGET_FLOAT64 || TARGET_SINGLE_FLOAT) \ - off -= (mips_save_fp_regs / 2) * size; \ - else \ - off -= mips_save_fp_regs * size; \ - for (i = 0; i < mips_save_fp_regs; i++) \ - { \ - rtx tem = \ - gen_rtx_MEM (mode, \ - plus_constant (virtual_incoming_args_rtx, \ - off)); \ - emit_move_insn (tem, \ - gen_rtx_REG (mode, \ - ((CUM).fp_arg_words \ - + FP_ARG_FIRST \ - + i \ - + mips_fp_off))); \ - off += size; \ - if (! TARGET_FLOAT64 || TARGET_SINGLE_FLOAT) \ - ++i; \ - } \ - } \ - } \ - } \ - } - - #define STRICT_ARGUMENT_NAMING (mips_abi != ABI_32 && mips_abi != ABI_O64) - - /* A C expression that indicates when an argument must be passed by - reference. If nonzero for an argument, a copy of that argument is - made in memory and a pointer to the argument is passed instead of the - argument itself. The pointer is passed in whatever way is appropriate - for passing a pointer to that type. */ - #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED) - - /* A C expression that indicates when it is the called function's - responsibility to make a copy of arguments passed by invisible - reference. Normally, the caller makes a copy and passes the - address of the copy to the routine being called. When - FUNCTION_ARG_CALLEE_COPIES is defined and is nonzero, the caller - does not make a copy. Instead, it passes a pointer to the "live" - value. The called function must not modify this value. If it can - be determined that the value won't be modified, it need not make a - copy; otherwise a copy must be made. - - ??? The MIPS EABI says that the caller should copy in ``K&R mode.'' - I don't know how to detect that here, since flag_traditional is not - a back end flag. */ - #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ - (mips_abi == ABI_EABI && (NAMED) \ - && FUNCTION_ARG_PASS_BY_REFERENCE (CUM, MODE, TYPE, NAMED)) - - /* Define LONG_MAX correctly for all users. We need to handle 32 bit EABI, - 64 bit EABI, N32, and N64 as possible defaults. The checks performed here - are the same as the checks in override_options in mips.c that determines - whether MASK_LONG64 will be set. - - This does not handle inappropriate options or ununusal option - combinations. */ - - #undef LONG_MAX_SPEC - #if ((MIPS_ABI_DEFAULT == ABI_64) || ((MIPS_ABI_DEFAULT == ABI_EABI) && ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_64BIT))) - #define LONG_MAX_SPEC \ - "%{!mabi=32:%{!mabi=n32:%{!mlong32:%{!mgp32:%{!mips1:%{!mips2:-D__LONG_MAX__=9223372036854775807L}}}}}}" - #else - #define LONG_MAX_SPEC \ - "%{mabi=64:-D__LONG_MAX__=9223372036854775807L} \ - %{mlong64:-D__LONG_MAX__=9223372036854775807L} \ - %{mgp64:-D__LONG_MAX__=9223372036854775807L}" - #endif - - /* ??? Unimplemented stuff follows. */ - - /* ??? Add support for 16 byte/128 bit long doubles here when - mips_abi != ABI32. */ - - /* ??? Make main return zero if user did not specify return value. */ - - /* ??? Add support for .interfaces section, so as to get linker warnings - when stdarg functions called without prototype in scope? */ - - /* ??? Could optimize structure passing by putting the right register rtx - into the field decl, so that if we use the field, we can take the value from - a register instead of from memory. */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/bsd-4.h gcc-3.3/gcc/config/mips/bsd-4.h *** gcc-3.2.3/gcc/config/mips/bsd-4.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/mips/bsd-4.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - /* Definitions of target machine for GNU compiler. MIPS RISC-OS BSD version. - Copyright (C) 1991 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_BSD43 - - #define CPP_PREDEFINES "\ - -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 \ - -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43 \ - -Asystem=unix -Asystem=bsd -Acpu=mips -Amachine=mips" - - #define STANDARD_INCLUDE_DIR "/bsd43/usr/include" - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - -systype /bsd43/" - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s crtn.o%s}}" - - #define MACHINE_TYPE "RISC-OS BSD Mips" - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - - /* Override defaults for finding the MIPS tools. */ - #define MD_STARTFILE_PREFIX "/bsd43/usr/lib/cmplrs/cc/" - #define MD_EXEC_PREFIX "/bsd43/usr/lib/cmplrs/cc/" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/bsd-5.h gcc-3.3/gcc/config/mips/bsd-5.h *** gcc-3.2.3/gcc/config/mips/bsd-5.h 2001-12-16 15:43:41.000000000 +0000 --- gcc-3.3/gcc/config/mips/bsd-5.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,67 **** - /* Definitions of target machine for GNU compiler. - MIPS RISC-OS, 5.0 BSD version. - Copyright (C) 1991 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_BSD43 - - #define CPP_PREDEFINES "\ - -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 \ - -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43 \ - -Asystem=unix -Asystem=bsd -Acpu=mips -Amachine=mips" - - #define STANDARD_INCLUDE_DIR "/bsd43/usr/include" - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - %{call_shared} %{no_archive} %{exact_version} \ - %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \ - -systype /bsd43/" - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s crtn.o%s}}" - - #define MACHINE_TYPE "RISC-OS BSD Mips" - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - - /* Override defaults for finding the MIPS tools. */ - #define MD_STARTFILE_PREFIX "/bsd43/usr/lib/cmplrs/cc/" - #define MD_EXEC_PREFIX "/bsd43/usr/lib/cmplrs/cc/" - - #include "mips/mips.h" - - /* Some assemblers have a bug that causes backslash escaped chars in .ascii - to be misassembled, so we just completely avoid it. */ - #undef ASM_OUTPUT_ASCII - #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ - do { \ - const unsigned char *s; \ - size_t i, limit = (LEN); \ - for (i = 0, s = (const unsigned char *)(PTR); i < limit; s++, i++) \ - { \ - if ((i % 8) == 0) \ - fputs ("\n\t.byte\t", (FILE)); \ - fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ - } \ - fputs ("\n", (FILE)); \ - } while (0) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/crtn.asm gcc-3.3/gcc/config/mips/crtn.asm *** gcc-3.2.3/gcc/config/mips/crtn.asm 2002-02-07 23:43:23.000000000 +0000 --- gcc-3.3/gcc/config/mips/crtn.asm 2002-07-31 08:55:57.000000000 +0000 *************** *** 1,39 **** /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - .section .init,"ax",@progbits #ifdef __mips16 ! /* The mips16 uses $7 for a return address. We use that here too. */ ! lw $7,20($sp) ! addu $sp,$sp,32 ! ! j $7 #else #ifdef __mips64 ! ld $31,40($sp) daddu $sp,$sp,48 #else ! lw $31,20($sp) addu $sp,$sp,32 #endif ! j $31 ! ! #endif .section .fini,"ax",@progbits - #ifdef __mips16 - /* The mips16 uses $7 for a return address. We use that here too. */ - lw $7,20($sp) - addu $sp,$sp,32 - - j $7 - #else #ifdef __mips64 ! ld $31,40($sp) daddu $sp,$sp,48 #else ! lw $31,20($sp) addu $sp,$sp,32 #endif ! j $31 ! #endif --- 1,29 ---- /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ #ifdef __mips16 ! #define RA $7 #else + #define RA $31 + #endif + + .section .init,"ax",@progbits #ifdef __mips64 ! ld RA,40($sp) daddu $sp,$sp,48 #else ! lw RA,20($sp) addu $sp,$sp,32 #endif ! j RA .section .fini,"ax",@progbits #ifdef __mips64 ! ld RA,40($sp) daddu $sp,$sp,48 #else ! lw RA,20($sp) addu $sp,$sp,32 #endif ! j RA ! diff -Nrc3pad gcc-3.2.3/gcc/config/mips/dec-bsd.h gcc-3.3/gcc/config/mips/dec-bsd.h *** gcc-3.2.3/gcc/config/mips/dec-bsd.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/mips/dec-bsd.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,53 **** - /* Definitions for DECstation running BSD as target machine for GNU compiler. - Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define DECSTATION - - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__ANSI_COMPAT \ - -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -Dbsd4_4 -Dhost_mips -Dmips \ - -Dunix -D_mips -D_unix -D_host_mips -D_MIPSEL -D_R3000 \ - -Asystem=unix -Asystem=bsd -Amachine=mips" - #endif - - /* Always uses GNU ld. */ - #ifndef LINK_SPEC - #define LINK_SPEC "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3}" - #endif - - #define LIB_SPEC "" - #define STARTFILE_SPEC "" - - #ifndef MACHINE_TYPE - #define MACHINE_TYPE "DECstation running BSD 4.4" - #endif - - #define TARGET_DEFAULT MASK_GAS - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - - #include "mips/mips.h" - - /* Since gas and gld are standard on 4.4 BSD, we don't need these */ - #undef MD_EXEC_PREFIX - #undef MD_STARTFILE_PREFIX - #undef ASM_FINAL_SPEC - #undef LIB_SPEC - #undef STARTFILE_SPEC - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/dec-osf1.h gcc-3.3/gcc/config/mips/dec-osf1.h *** gcc-3.2.3/gcc/config/mips/dec-osf1.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/mips/dec-osf1.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,55 **** - /* Definitions of target machine for GNU compiler. DECstation (OSF/1) version. - Copyright (C) 1992, 1996, 1998 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define DEC_OSF1 - - #define CPP_PREDEFINES "\ - -D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \ - -Dbsd4_2 -Dhost_mips -Dmips -Dosf -Dunix \ - -Asystem=unix -Asystem=xpg4 -Acpu=mips -Amachine=mips" - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - %{call_shared} %{no_archive} %{exact_version} \ - %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}" - - #include "mips/ultrix.h" - #include "mips/mips.h" - - /* Specify size_t and wchar_t types. */ - #undef SIZE_TYPE - #undef WCHAR_TYPE - #undef WCHAR_TYPE_SIZE - - #define SIZE_TYPE "long unsigned int" - #define WCHAR_TYPE "short unsigned int" - #define WCHAR_TYPE_SIZE SHORT_TYPE_SIZE - - #undef SUBTARGET_CPP_SIZE_SPEC - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ - %{!mlong64:-D__PTRDIFF_TYPE__=int}" - - /* turn off collect2 COFF support, since ldfcn now has elf declaration */ - #undef OBJECT_FORMAT_COFF - - #undef MACHINE_TYPE - #define MACHINE_TYPE "DECstation running DEC OSF/1" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/ecoff.h gcc-3.3/gcc/config/mips/ecoff.h *** gcc-3.2.3/gcc/config/mips/ecoff.h 2001-04-26 16:02:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/ecoff.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,36 **** - /* Definitions of target machine for GNU compiler. MIPS version with - GOFAST floating point library. - Copyright (C) 1994, 1998 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* US Software GOFAST library support. */ - #define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS - - #include "mips/mips.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR3000 -D_mips -D_MIPSEB -D_R3000" - - /* Use memcpy, et. al., rather than bcopy. */ - #define TARGET_MEM_FUNCTIONS - - /* Don't assume anything about startfiles. The linker script will load the - appropriate startfiles. */ - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/ecoffl.h gcc-3.3/gcc/config/mips/ecoffl.h *** gcc-3.2.3/gcc/config/mips/ecoffl.h 1998-12-16 21:08:56.000000000 +0000 --- gcc-3.3/gcc/config/mips/ecoffl.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,30 **** - /* Definitions of target machine for GNU compiler. Little endian MIPS - version with GOFAST floating point library. - Copyright (C) 1994, 1998 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This is a little endian version of ecoff.h. */ - - #define TARGET_ENDIAN_DEFAULT 0 - - #include "gofast.h" - #include "mips/ecoff.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dmips -DMIPSEL -DR3000 -D_mips -D_MIPSEL -D_R3000" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/elf64.h gcc-3.3/gcc/config/mips/elf64.h *** gcc-3.2.3/gcc/config/mips/elf64.h 2001-11-11 05:56:43.000000000 +0000 --- gcc-3.3/gcc/config/mips/elf64.h 2002-10-17 06:53:35.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. MIPS R4000 version with GOFAST floating point library. ! Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Definitions of target machine for GNU compiler. MIPS R4000 version with GOFAST floating point library. ! Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2002 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,56 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define OBJECT_FORMAT_ELF ! ! /* Default to -mips3. */ ! #define TARGET_DEFAULT MASK_FLOAT64|MASK_64BIT ! #define MIPS_ISA_DEFAULT 3 ! ! /* This should change to n32 when it is supported in gas. */ ! #define MIPS_ABI_DEFAULT ABI_O64 ! ! /* Until we figure out what MIPS ELF targets normally use, just do ! stabs in ELF. */ ! #ifndef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ! #endif ! ! /* US Software GOFAST library support. */ ! #include "gofast.h" ! #define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS ! ! #include "mips/mips.h" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000" ! /* I would rather put this in CPP_PREDEFINES, but the gcc driver ! doesn't handle -U options in CPP_PREDEFINES. */ ! #undef SUBTARGET_CPP_SPEC ! #define SUBTARGET_CPP_SPEC "\ ! %{!mips1:%{!mips2:-U__mips -D__mips=3 -D__mips64}}" ! /* Use memcpy, et. al., rather than bcopy. */ ! #define TARGET_MEM_FUNCTIONS /* Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be --- 20,37 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef OBJECT_FORMAT_COFF ! #undef EXTENDED_COFF ! #undef SDB_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO 1 ! #define DWARF2_DEBUGGING_INFO 1 ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! #undef SUBTARGET_ASM_DEBUGGING_SPEC ! #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0" /* Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be *************** Boston, MA 02111-1307, USA. */ *** 60,83 **** #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (32768*8) - /* We need to use .esize and .etype instead of .size and .type to - avoid conflicting with ELF directives. */ - #undef PUT_SDB_SIZE - #define PUT_SDB_SIZE(a) \ - do { \ - extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.esize\t"); \ - fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \ - fprintf (asm_out_text_file, ";"); \ - } while (0) - - #undef PUT_SDB_TYPE - #define PUT_SDB_TYPE(a) \ - do { \ - extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a)); \ - } while (0) - /* Switch into a generic section. */ #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section --- 41,46 ---- *************** do { \ *** 124,144 **** #undef ASM_DECLARE_OBJECT_NAME #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ size_directive_output = 0; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ","); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! fprintf (FILE, "\n"); \ } \ mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) --- 87,100 ---- #undef ASM_DECLARE_OBJECT_NAME #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ ! HOST_WIDE_INT size; \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ size_directive_output = 0; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) *************** do { \ *** 153,170 **** #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ","); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! fprintf (FILE, "\n"); \ } \ } while (0) --- 109,123 ---- #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) *************** do { \ *** 201,282 **** } while (0) #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! #undef UNIQUE_SECTION ! #define UNIQUE_SECTION(DECL,RELOC) \ ! do { \ ! int len, size, sec; \ ! const char *name, *prefix; \ ! char *string; \ ! static const char *const prefixes[4][2] = { \ ! { ".text.", ".gnu.linkonce.t." }, \ ! { ".rodata.", ".gnu.linkonce.r." }, \ ! { ".data.", ".gnu.linkonce.d." }, \ ! { ".sdata.", ".gnu.linkonce.s." } \ ! }; \ ! \ ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ ! size = int_size_in_bytes (TREE_TYPE (decl)); \ ! \ ! /* Determine the base section we are interested in: \ ! 0=text, 1=rodata, 2=data, 3=sdata, [4=bss]. */ \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! sec = 0; \ ! else if (DECL_INITIAL (DECL) == 0 \ ! || DECL_INITIAL (DECL) == error_mark_node) \ ! sec = 2; \ ! else if ((TARGET_EMBEDDED_PIC || TARGET_MIPS16) \ ! && TREE_CODE (decl) == STRING_CST \ ! && !flag_writable_strings) \ ! { \ ! /* For embedded position independent code, put constant strings \ ! in the text section, because the data section is limited to \ ! 64K in size. For mips16 code, put strings in the text \ ! section so that a PC relative load instruction can be used to \ ! get their address. */ \ ! sec = 0; \ ! } \ ! else if (TARGET_EMBEDDED_DATA) \ ! { \ ! /* For embedded applications, always put an object in read-only data \ ! if possible, in order to reduce RAM usage. */ \ ! \ ! if (DECL_READONLY_SECTION (DECL, RELOC)) \ ! sec = 1; \ ! else if (size > 0 && size <= mips_section_threshold) \ ! sec = 3; \ ! else \ ! sec = 2; \ ! } \ ! else \ ! { \ ! /* For hosted applications, always put an object in small data if \ ! possible, as this gives the best performance. */ \ ! \ ! if (size > 0 && size <= mips_section_threshold) \ ! sec = 3; \ ! else if (DECL_READONLY_SECTION (DECL, RELOC)) \ ! sec = 1; \ ! else \ ! sec = 2; \ ! } \ ! \ ! prefix = prefixes[sec][DECL_ONE_ONLY (DECL)]; \ ! len = strlen (name) + strlen (prefix); \ ! string = alloca (len + 1); \ ! sprintf (string, "%s%s", prefix, name); \ ! \ ! DECL_SECTION_NAME (DECL) = build_string (len, string); \ ! } while (0) /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_rdata #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ ! SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ --- 154,170 ---- } while (0) #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! ! #define TARGET_ASM_UNIQUE_SECTION mips_unique_section /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ ! SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ *************** void FN () *** 304,310 **** --- 192,206 ---- #define LIB_SPEC "" #undef STARTFILE_SPEC + #if defined(HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES) \ + || (MIPS_ABI_DEFAULT == ABI_MEABI) + #define STARTFILE_SPEC "crti%O%s crtbegin%O%s" + #else #define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0:crt0%O%s}" + #endif #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend%O%s crtn%O%s" + + /* We support #pragma. */ + #define HANDLE_SYSV_PRAGMA 1 diff -Nrc3pad gcc-3.2.3/gcc/config/mips/elf.h gcc-3.3/gcc/config/mips/elf.h *** gcc-3.2.3/gcc/config/mips/elf.h 2002-06-12 18:04:10.000000000 +0000 --- gcc-3.3/gcc/config/mips/elf.h 2002-10-17 06:53:35.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. MIPS R3000 version with GOFAST floating point library. ! Copyright (C) 1994, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Definitions of target machine for GNU compiler. MIPS R3000 version with GOFAST floating point library. ! Copyright (C) 1994, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 20,78 **** Boston, MA 02111-1307, USA. */ /* Use ELF. */ ! #define OBJECT_FORMAT_ELF ! /* All ELF targets can support DWARF-2. */ ! #ifndef DWARF2_DEBUGGING_INFO #define DWARF2_DEBUGGING_INFO 1 - #endif - - /* Until we figure out what MIPS ELF targets normally use, just do - stabs in ELF. */ - #ifndef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - #endif ! /* Mostly like ECOFF. */ ! #include "gofast.h" ! #include "mips/ecoff.h" ! ! /* We need to use .esize and .etype instead of .size and .type to ! avoid conflicting with ELF directives. */ ! #undef PUT_SDB_SIZE ! #define PUT_SDB_SIZE(a) \ ! do { \ ! extern FILE *asm_out_text_file; \ ! fprintf (asm_out_text_file, "\t.esize\t"); \ ! fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \ ! fprintf (asm_out_text_file, ";"); \ ! } while (0) ! #undef PUT_SDB_TYPE ! #define PUT_SDB_TYPE(a) \ ! do { \ ! extern FILE *asm_out_text_file; \ ! fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a)); \ ! } while (0) /* Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be specified using the `__attribute__ ((aligned (N)))' construct. If not defined, the default value is `BIGGEST_ALIGNMENT'. */ ! #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (32768*8) /* Switch into a generic section. */ ! #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section /* Given that Irix has it's own headers, not having TARGET_GAS here seems a mistake. If we actually need to be prepared for file switching, then we need a custom TARGET_ASM_NAMED_SECTION too. */ ! #undef TEXT_SECTION #define TEXT_SECTION() \ do { \ if (TARGET_FILE_SWITCHING) \ --- 20,57 ---- Boston, MA 02111-1307, USA. */ /* Use ELF. */ ! #undef OBJECT_FORMAT_COFF ! #undef EXTENDED_COFF ! /* ??? Move all SDB stuff into separate header file. */ ! #undef SDB_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO 1 #define DWARF2_DEBUGGING_INFO 1 ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! #undef SUBTARGET_ASM_DEBUGGING_SPEC ! #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0" /* Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be specified using the `__attribute__ ((aligned (N)))' construct. If not defined, the default value is `BIGGEST_ALIGNMENT'. */ ! #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (32768*8) /* Switch into a generic section. */ ! #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section /* Given that Irix has it's own headers, not having TARGET_GAS here seems a mistake. If we actually need to be prepared for file switching, then we need a custom TARGET_ASM_NAMED_SECTION too. */ ! #undef TEXT_SECTION #define TEXT_SECTION() \ do { \ if (TARGET_FILE_SWITCHING) \ *************** do { \ *** 126,132 **** #ifndef ASM_OUTPUT_ALIGNED_BSS #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! ASM_GLOBALIZE_LABEL (FILE, NAME); \ if (SIZE > 0 && SIZE <= mips_section_threshold) \ sbss_section (); \ else \ --- 105,111 ---- #ifndef ASM_OUTPUT_ALIGNED_BSS #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! (*targetm.asm_out.globalize_label) (FILE, NAME); \ if (SIZE > 0 && SIZE <= mips_section_threshold) \ sbss_section (); \ else \ *************** do { \ *** 145,168 **** /* Write the extra assembler code needed to declare an object properly. */ ! #undef ASM_DECLARE_OBJECT_NAME #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ size_directive_output = 0; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ","); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! fprintf (FILE, "\n"); \ } \ mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) --- 124,140 ---- /* Write the extra assembler code needed to declare an object properly. */ ! #undef ASM_DECLARE_OBJECT_NAME #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ ! HOST_WIDE_INT size; \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ size_directive_output = 0; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) *************** do { \ *** 173,194 **** size_directive_output was set by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ ! #undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ","); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! fprintf (FILE, "\n"); \ } \ } while (0) --- 145,164 ---- size_directive_output was set by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ ! #undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ + \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) *************** do { \ *** 207,213 **** but until that support is generally available, the 'if' below should serve. */ ! #undef ASM_WEAKEN_LABEL #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0) #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \ do { \ --- 177,183 ---- but until that support is generally available, the 'if' below should serve. */ ! #undef ASM_WEAKEN_LABEL #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0) #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \ do { \ *************** do { \ *** 225,244 **** } while (0) #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! #undef UNIQUE_SECTION ! #define UNIQUE_SECTION(DECL,RELOC) \ ! mips_unique_section ((DECL), (RELOC)) /* A list of other sections which the compiler might be "in" at any given time. */ ! #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_sbss, in_rdata ! #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ --- 195,212 ---- } while (0) #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! ! #define TARGET_ASM_UNIQUE_SECTION mips_unique_section /* A list of other sections which the compiler might be "in" at any given time. */ ! #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_sbss ! #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ *************** void FN () *** 262,272 **** #define FINI_SECTION_ASM_OP "\t.section\t.fini" /* Don't set the target flags, this is done by the linker script */ ! #undef LIB_SPEC #define LIB_SPEC "" #undef STARTFILE_SPEC #define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0:crt0%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend%O%s crtn%O%s" --- 230,248 ---- #define FINI_SECTION_ASM_OP "\t.section\t.fini" /* Don't set the target flags, this is done by the linker script */ ! #undef LIB_SPEC #define LIB_SPEC "" #undef STARTFILE_SPEC + #if defined(HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES) \ + || (MIPS_ABI_DEFAULT == ABI_MEABI) + #define STARTFILE_SPEC "crti%O%s crtbegin%O%s" + #else #define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0:crt0%O%s}" + #endif #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend%O%s crtn%O%s" + + /* We support #pragma. */ + #define HANDLE_SYSV_PRAGMA 1 diff -Nrc3pad gcc-3.2.3/gcc/config/mips/elfl64.h gcc-3.3/gcc/config/mips/elfl64.h *** gcc-3.2.3/gcc/config/mips/elfl64.h 1998-12-16 21:09:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/elfl64.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,29 **** - /* Definitions of target machine for GNU compiler. Little endian MIPS - R4000 version with GOFAST floating point library. - Copyright (C) 1994 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This is a little endian version of elf64.h. */ - - #define TARGET_ENDIAN_DEFAULT 0 - - #include "mips/elf64.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dmips -DMIPSEL -DR4000 -D_mips -D_MIPSEL -D_R4000" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/elfl.h gcc-3.3/gcc/config/mips/elfl.h *** gcc-3.2.3/gcc/config/mips/elfl.h 1998-12-16 21:08:59.000000000 +0000 --- gcc-3.3/gcc/config/mips/elfl.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,29 **** - /* Definitions of target machine for GNU compiler. Little endian MIPS - R3000 version with GOFAST floating point library. - Copyright (C) 1994 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* This is a little endian version of elf.h. */ - - #define TARGET_ENDIAN_DEFAULT 0 - - #include "mips/elf.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dmips -DMIPSEL -DR3000 -D_mips -D_MIPSEL -D_R3000" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/elflorion.h gcc-3.3/gcc/config/mips/elflorion.h *** gcc-3.2.3/gcc/config/mips/elflorion.h 1998-12-16 21:09:01.000000000 +0000 --- gcc-3.3/gcc/config/mips/elflorion.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,24 **** - /* Definitions of target machine for GNU compiler. MIPS ORION version with - GOFAST floating point library. - Copyright (C) 1994 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_CPU_STRING_DEFAULT "orion" - - #include "mips/elfl64.h" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris3.h gcc-3.3/gcc/config/mips/iris3.h *** gcc-3.2.3/gcc/config/mips/iris3.h 2000-11-02 23:29:11.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris3.h 2002-07-29 22:21:41.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 21,36 **** #define SGI_TARGET 1 /* inform other mips files this is SGI */ /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "\ -Dunix -Dmips -Dsgi -DSVR3 -Dhost_mips -DMIPSEB -DSYSTYPE_SYSV \ -Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips" - - #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" - #define SUBTARGET_CPP_SPEC "\ %{!ansi:-D__EXTENSIONS__} -D_MIPSEB -D_SYSTYPE_SYSV" #define LIB_SPEC \ "%{!p:%{!pg:%{!static:%{!g*:-lc_s}} -lc}}%{p:-lc_p}%{pg:-lc_p} crtn.o%s" --- 21,36 ---- #define SGI_TARGET 1 /* inform other mips files this is SGI */ /* Names to predefine in the preprocessor for this target machine. */ ! /* Temporarily #if 0'd until Irix header consolidation. */ ! #if 0 #define CPP_PREDEFINES "\ -Dunix -Dmips -Dsgi -DSVR3 -Dhost_mips -DMIPSEB -DSYSTYPE_SYSV \ -Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips" #define SUBTARGET_CPP_SPEC "\ %{!ansi:-D__EXTENSIONS__} -D_MIPSEB -D_SYSTYPE_SYSV" + #endif + #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" #define LIB_SPEC \ "%{!p:%{!pg:%{!static:%{!g*:-lc_s}} -lc}}%{p:-lc_p}%{pg:-lc_p} crtn.o%s" *************** Boston, MA 02111-1307, USA. */ *** 65,72 **** #define WCHAR_TYPE "unsigned char" #define WCHAR_TYPE_SIZE BITS_PER_UNIT - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - /* Plain char is unsigned in the SGI compiler. */ #define DEFAULT_SIGNED_CHAR 0 --- 65,69 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris4loser.h gcc-3.3/gcc/config/mips/iris4loser.h *** gcc-3.2.3/gcc/config/mips/iris4loser.h 1998-12-16 21:09:06.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris4loser.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,5 **** - /* Like iris4.h, but always inhibits assembler optimization for MIPS as. - Use this via mips-sgi-iris4loser if you need it. */ - - #define SUBTARGET_MIPS_AS_ASM_SPEC "-O0 %{v}" - #define SUBTARGET_ASM_OPTIMIZING_SPEC "" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris5gas.h gcc-3.3/gcc/config/mips/iris5gas.h *** gcc-3.2.3/gcc/config/mips/iris5gas.h 2001-11-11 05:56:43.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris5gas.h 2002-08-29 21:40:15.000000000 +0000 *************** *** 1,15 **** /* Definitions of target machine for GNU compiler. Irix version 5 with gas. */ /* Enable debugging. */ ! #define DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO ! #define MIPS_DEBUGGING_INFO ! #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG /* GNU as does handle DWARF2 directives. */ #undef DWARF2_UNWIND_INFO #define DWARF2_UNWIND_INFO 1 /* Irix 5 does not have some strange restrictions that Irix 3 had. */ #undef SET_FILE_NUMBER #define SET_FILE_NUMBER() ++num_source_filenames --- 1,45 ---- /* Definitions of target machine for GNU compiler. Irix version 5 with gas. */ /* Enable debugging. */ ! #define DBX_DEBUGGING_INFO 1 ! #define DWARF2_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 ! #define MIPS_DEBUGGING_INFO 1 ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG /* GNU as does handle DWARF2 directives. */ #undef DWARF2_UNWIND_INFO #define DWARF2_UNWIND_INFO 1 + /* Override iris5.h version to invoke [cd]tors and register eh frame + information. */ + #undef LINK_SPEC + #define LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ + %{bestGnum} %{shared} %{non_shared} \ + %{call_shared} %{no_archive} %{exact_version} \ + %{static: -non_shared} \ + %{!static: \ + %{!shared:%{!non_shared:%{!call_shared: -call_shared -no_unresolved}}}} \ + %{rpath} -init __do_global_ctors -fini __do_global_dtors \ + %{shared:-hidden_symbol __do_global_ctors,__do_global_ctors_1,__do_global_dtors} \ + -_SYSTYPE_SVR4" + + /* Override iris5.h versions to include crtbegin.o and crtend.o. */ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "\ + %{!static: \ + %{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}} \ + %{static: \ + %{pg:gcrt1.o%s} \ + %{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s libprof1.a%s} \ + %{!p:/usr/lib/nonshared/crt1.o%s}}} \ + crtbegin.o%s" + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "crtend.o%s %{!shared:crtn.o%s}" + /* Irix 5 does not have some strange restrictions that Irix 3 had. */ #undef SET_FILE_NUMBER #define SET_FILE_NUMBER() ++num_source_filenames *************** do { *** 34,36 **** --- 64,79 ---- extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a)); \ } while (0) + + /* Switch into a generic section. */ + #undef TARGET_ASM_NAMED_SECTION + #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section + + /* Add -g to mips.h default to avoid confusing gas with local symbols + generated from stabs info. */ + #undef NM_FLAGS + #define NM_FLAGS "-Bng" + + /* Disable SHF_MERGE support. Even if gas supports it, the IRIX ld does not + without a special elspec(5) file. */ + #undef HAVE_GAS_SHF_MERGE diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris5.h gcc-3.3/gcc/config/mips/iris5.h *** gcc-3.2.3/gcc/config/mips/iris5.h 2002-01-08 22:51:37.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris5.h 2002-11-26 04:54:50.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 62,91 **** (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ || !strcmp (STR, "rpath")) #undef SUBTARGET_CC1_SPEC #define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}" - /* ??? _MIPS_SIM and _MIPS_SZPTR should eventually depend on options when - options for them exist. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \ - -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \ - -D_MIPS_SIM=_MIPS_SIM_ABI32 -D_MIPS_SZPTR=32 \ - -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=sgi" - - #undef SUBTARGET_CPP_SPEC - #define SUBTARGET_CPP_SPEC "\ - %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE -D_LONGLONG} \ - %{!mfp64: -D_MIPS_FPSET=16}%{mfp64: -D_MIPS_FPSET=32} \ - %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ - %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \ - %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \ - %{!mips1: %{!mips2: %{!mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS1}}} \ - %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \ - %{!mlong64: -D_MIPS_SZLONG=32}%{mlong64: -D_MIPS_SZLONG=64}" - #undef LINK_SPEC #define LINK_SPEC "\ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ --- 62,107 ---- (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ || !strcmp (STR, "rpath")) + #define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define_std ("host_mips"); \ + builtin_define_std ("sgi"); \ + builtin_define_std ("unix"); \ + builtin_define_std ("SYSTYPE_SVR4"); \ + builtin_define ("_MODERN_C"); \ + builtin_define ("_SVR4_SOURCE"); \ + builtin_define ("__DSO__"); \ + builtin_define ("_MIPS_SIM=_MIPS_SIM_ABI32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=svr4"); \ + builtin_assert ("machine=sgi"); \ + \ + if (!TARGET_FLOAT64) \ + builtin_define ("_MIPS_FPSET=16"); \ + else \ + builtin_define ("_MIPS_FPSET=32"); \ + \ + if (!TARGET_INT64) \ + builtin_define ("_MIPS_SZINT=32"); \ + else \ + builtin_define ("_MIPS_SZINT=64"); \ + \ + if (!TARGET_LONG64) \ + builtin_define ("_MIPS_SZLONG=32"); \ + else \ + builtin_define ("_MIPS_SZLONG=64"); \ + \ + if (!flag_iso) \ + { \ + builtin_define ("__EXTENSIONS__"); \ + builtin_define ("_SGI_SOURCE"); \ + } \ + } while (0); + #undef SUBTARGET_CC1_SPEC #define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}" #undef LINK_SPEC #define LINK_SPEC "\ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ *************** do { \ *** 174,180 **** #define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ do \ { \ ! ASM_GLOBALIZE_LABEL (FILE, NAME); \ fputs ("\t.weakext\t", FILE); \ assemble_name (FILE, NAME); \ if (VALUE) \ --- 190,196 ---- #define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ do \ { \ ! (*targetm.asm_out.globalize_label) (FILE, NAME); \ fputs ("\t.weakext\t", FILE); \ assemble_name (FILE, NAME); \ if (VALUE) \ *************** do { \ *** 189,193 **** #define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0) /* Handle #pragma weak and #pragma pack. */ - #undef HANDLE_SYSV_PRAGMA #define HANDLE_SYSV_PRAGMA 1 --- 205,208 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris6gld.h gcc-3.3/gcc/config/mips/iris6gld.h *** gcc-3.2.3/gcc/config/mips/iris6gld.h 2001-10-07 16:51:10.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris6gld.h 2002-05-17 07:43:33.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. Iris version 6 with GNU ld. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. Written by Mark Mitchell . This file is part of GNU CC. --- 1,6 ---- /* Definitions of target machine for GNU compiler. Iris version 6 with GNU ld. ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. Written by Mark Mitchell . This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 49,90 **** /* The GNU linker supports one-only sections. */ #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! #define UNIQUE_SECTION(DECL, RELOC) \ ! do \ ! { \ ! int len; \ ! int sec; \ ! const char *name; \ ! char *string; \ ! const char *prefix; \ ! static const char *const prefixes[/*4*/3][2] = \ ! { \ ! { ".text.", ".gnu.linkonce.t." }, \ ! { ".rodata.", ".gnu.linkonce.r." }, \ ! { ".data.", ".gnu.linkonce.d." } \ ! /* Do not generate unique sections for uninitialised \ ! data since we do not have support for this in the \ ! linker scripts yet... \ ! , { ".bss.", ".gnu.linkonce.b." } */ \ ! }; \ ! \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! sec = 0; \ ! /* else if (DECL_INITIAL (DECL) == 0 \ ! || DECL_INITIAL (DECL) == error_mark_node) \ ! sec = 3; */ \ ! else if (DECL_READONLY_SECTION (DECL, RELOC)) \ ! sec = 1; \ ! else \ ! sec = 2; \ ! \ ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ ! prefix = prefixes[sec][DECL_ONE_ONLY(DECL)]; \ ! len = strlen (name) + strlen (prefix); \ ! string = alloca (len + 1); \ ! \ ! sprintf (string, "%s%s", prefix, name); \ ! \ ! DECL_SECTION_NAME (DECL) = build_string (len, string); \ ! } \ ! while (0) --- 49,52 ---- /* The GNU linker supports one-only sections. */ #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! #define TARGET_ASM_UNIQUE_SECTION mips_unique_section diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris6.h gcc-3.3/gcc/config/mips/iris6.h *** gcc-3.2.3/gcc/config/mips/iris6.h 2003-03-27 20:08:13.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris6.h 2003-02-24 19:08:07.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** #endif #include "mips/iris5.h" - #include "mips/abi64.h" /* Irix6 assembler does handle DWARF2 directives. Override setting in irix5.h file. */ --- 32,37 ---- *************** Boston, MA 02111-1307, USA. */ *** 45,52 **** /* wchar_t is defined differently with and without -mabi=64. */ - #define NO_BUILTIN_WCHAR_TYPE - #undef WCHAR_TYPE #define WCHAR_TYPE (Pmode == DImode ? "int" : "long int") --- 44,49 ---- *************** Boston, MA 02111-1307, USA. */ *** 55,62 **** /* Same for wint_t. */ - #define NO_BUILTIN_WINT_TYPE - #undef WINT_TYPE #define WINT_TYPE (Pmode == DImode ? "int" : "long int") --- 52,57 ---- *************** Boston, MA 02111-1307, USA. */ *** 73,146 **** system header files require it. This is OK, because gcc never warns when long long is used in system header files. Alternatively, we can add support for the SGI builtin type __long_long. */ - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \ - -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \ - -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=sgi" - - #undef SUBTARGET_CPP_SIZE_SPEC - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=32|mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ - -D__WCHAR_TYPE__=long\\ int -D__WINT_TYPE__=long\\ int} \ - %{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ - -D__WCHAR_TYPE__=int -D__WINT_TYPE__=int} \ - %{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ - -D__WCHAR_TYPE__=long\\ int -D__WINT_TYPE__=long\\ int}" - - /* We must make -mips3 do what -mlong64 used to do. */ - /* ??? If no mipsX option given, but a mabi=X option is, then should set - _MIPS_ISA based on the mabi=X option. */ - /* ??? If no mabi=X option give, but a mipsX option is, then should set - _MIPS_SIM based on the mipsX option. */ - /* ??? Same for _MIPS_SZINT. */ - /* ??? Same for _MIPS_SZPTR. */ - /* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE. */ - #undef SUBTARGET_CPP_SPEC - #define SUBTARGET_CPP_SPEC "\ - %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} \ - %{mfp32: -D_MIPS_FPSET=16}%{!mfp32: -D_MIPS_FPSET=32} \ - %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ - %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \ - %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \ - %{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \ - %{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \ - %{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ - %{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \ - %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \ - %{!mabi*: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \ - %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \ - %{mabi=32: -D_MIPS_SZLONG=32} \ - %{mabi=n32: -D_MIPS_SZLONG=32} \ - %{mabi=64: -D_MIPS_SZLONG=64} \ - %{!mabi*: -D_MIPS_SZLONG=32} \ - %{mabi=32: -D_MIPS_SZPTR=32} \ - %{mabi=n32: -D_MIPS_SZPTR=32} \ - %{mabi=64: -D_MIPS_SZPTR=64} \ - %{!mabi*: -D_MIPS_SZPTR=32} \ - %{!mips1:%{!mips2: -D_COMPILER_VERSION=601}} \ - %{!mips*: -U__mips -D__mips=3} \ - %{mabi=32: -U__mips64} \ - %{mabi=n32: -D__mips64} \ - %{mabi=64: -D__mips64} \ - %{!mabi*: -D__mips64}" /* The GNU C++ standard library requires that __EXTENSIONS__ and ! _SGI_SOURCE be defined on at least irix6.2 and probably all irix6 ! prior to 6.5. They normally get defined in SUBTARGET_CPP_SPEC if ! !ansi, for g++ we want them regardless. We don't need this on ! irix6.5 itself, but it shouldn't hurt other than the namespace ! pollution. libstdc++ v3 needs many ISO C99 features provided ! in IRIX 6.5.18, but protected by the __c99 macro. */ ! #undef CPLUSPLUS_CPP_SPEC ! #define CPLUSPLUS_CPP_SPEC "\ ! -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \ ! %{ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} -D__c99 %(cpp) \ ! " /* Irix 6 uses DWARF-2. */ ! #define DWARF2_DEBUGGING_INFO ! #define MIPS_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG --- 68,153 ---- system header files require it. This is OK, because gcc never warns when long long is used in system header files. Alternatively, we can add support for the SGI builtin type __long_long. */ /* The GNU C++ standard library requires that __EXTENSIONS__ and ! _SGI_SOURCE be defined on at least irix6.2 and probably all IRIX 6 ! prior to 6.5. They normally get defined if !ansi, for g++ we want ! them regardless. We don't need this on IRIX 6.5 itself, but it ! shouldn't hurt other than the namespace pollution. */ ! ! /* Undefine because this includes iris5.h. */ ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("host_mips"); \ ! builtin_define ("_LONGLONG"); \ ! builtin_define ("_MODERN_C"); \ ! builtin_define ("_SVR4_SOURCE"); \ ! builtin_define_std ("SYSTYPE_SVR4"); \ ! builtin_define ("__DSO__"); \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("sgi"); \ ! builtin_assert ("system=svr4"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("machine=sgi"); \ ! \ ! if (mips_abi == ABI_32) \ ! { \ ! builtin_define ("_MIPS_SIM=_MIPS_SIM_ABI32"); \ ! builtin_define ("_MIPS_SZLONG=32"); \ ! builtin_define ("_MIPS_SZPTR=32"); \ ! } \ ! else if (mips_abi == ABI_64) \ ! { \ ! builtin_define ("_ABI64=3"); \ ! builtin_define ("_MIPS_SIM=_ABI64"); \ ! builtin_define ("_MIPS_SZLONG=64"); \ ! builtin_define ("_MIPS_SZPTR=64"); \ ! } \ ! else \ ! { \ ! builtin_define ("_ABIN32=2"); \ ! builtin_define ("_MIPS_SIM=_ABIN32"); \ ! builtin_define ("_MIPS_SZLONG=32"); \ ! builtin_define ("_MIPS_SZPTR=32"); \ ! } \ ! \ ! if (!TARGET_FLOAT64) \ ! builtin_define ("_MIPS_FPSET=16"); \ ! else \ ! builtin_define ("_MIPS_FPSET=32"); \ ! \ ! if (!TARGET_INT64) \ ! builtin_define ("_MIPS_SZINT=32"); \ ! else \ ! builtin_define ("_MIPS_SZINT=64"); \ ! \ ! if (!ISA_MIPS1 && !ISA_MIPS2) \ ! builtin_define ("_COMPILER_VERSION=601"); \ ! \ ! /* IRIX 6.5.18 and above provide many ISO C99 \ ! features protected by the __c99 macro. \ ! libstdc++ v3 needs them as well. */ \ ! if ((c_language == clk_c && flag_isoc99) \ ! || c_language == clk_cplusplus) \ ! builtin_define ("__c99"); \ ! \ ! if (c_language == clk_cplusplus) \ ! { \ ! builtin_define ("__EXTENSIONS__"); \ ! builtin_define ("_SGI_SOURCE"); \ ! } \ ! \ ! if (!flag_iso) \ ! { \ ! builtin_define ("__EXTENSIONS__"); \ ! builtin_define ("_SGI_SOURCE"); \ ! } \ ! } while (0) /* Irix 6 uses DWARF-2. */ ! #define DWARF2_DEBUGGING_INFO 1 ! #define MIPS_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG *************** Boston, MA 02111-1307, USA. */ *** 237,243 **** on the mipsX option. */ /* If no mips[3,4] option given, give the appropriate default for mabi=X */ #undef SUBTARGET_ASM_SPEC ! #define SUBTARGET_ASM_SPEC "%{!mabi*:-n32} %{!mips*: %{!mabi*:-mips3} %{mabi=n32:-mips3} %{mabi=64:-mips4}}" /* Must pass -g0 to the assembler, otherwise it may overwrite our debug info with its own debug info. */ --- 244,250 ---- on the mipsX option. */ /* If no mips[3,4] option given, give the appropriate default for mabi=X */ #undef SUBTARGET_ASM_SPEC ! #define SUBTARGET_ASM_SPEC "%{!mabi*:-n32} %{!mips*: %{!mabi*:-mips3} %{mabi=n32|mabi=64:-mips3}}" /* Must pass -g0 to the assembler, otherwise it may overwrite our debug info with its own debug info. */ *************** Boston, MA 02111-1307, USA. */ *** 265,272 **** do_global_* functions instead of running collect2. */ #define BSS_SECTION_ASM_OP "\t.section\t.bss" ! #define CONST_SECTION_ASM_OP_32 "\t.rdata" ! #define CONST_SECTION_ASM_OP_64 "\t.section\t.rodata" /* A default list of other sections which we might be "in" at any given time. For targets that use additional sections (e.g. .tdesc) you --- 272,285 ---- do_global_* functions instead of running collect2. */ #define BSS_SECTION_ASM_OP "\t.section\t.bss" ! ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP_32 "\t.rdata" ! #define READONLY_DATA_SECTION_ASM_OP_64 "\t.section\t.rodata" ! #define READONLY_DATA_SECTION_ASM_OP \ ! (mips_abi != ABI_32 && mips_abi != ABI_O64 \ ! ? READONLY_DATA_SECTION_ASM_OP_64 \ ! : READONLY_DATA_SECTION_ASM_OP_32) /* A default list of other sections which we might be "in" at any given time. For targets that use additional sections (e.g. .tdesc) you *************** Boston, MA 02111-1307, USA. */ *** 274,287 **** includes this file. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_rdata, in_const /* A default list of extra section function definitions. For targets that use additional sections (e.g. .tdesc) you should override this definition in the target-specific file which includes this file. */ - /* ??? rdata_section is now same as svr4 const_section. */ - #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ void \ --- 287,298 ---- includes this file. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata /* A default list of extra section function definitions. For targets that use additional sections (e.g. .tdesc) you should override this definition in the target-specific file which includes this file. */ #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ void \ *************** sdata_section () \ *** 294,312 **** } \ } \ \ - void \ - rdata_section () \ - { \ - if (in_section != in_rdata) \ - { \ - if (mips_abi != ABI_32 && mips_abi != ABI_O64) \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64); \ - else \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32); \ - in_section = in_rdata; \ - } \ - } \ - \ const char * \ current_section_name () \ { \ --- 305,310 ---- *************** current_section_name () \ *** 317,324 **** case in_data: return ".data"; \ case in_sdata: return ".sdata"; \ case in_bss: return ".bss"; \ ! case in_rdata: \ ! case in_const: \ if (mips_abi != ABI_32 && mips_abi != ABI_O64) \ return ".rodata"; \ else \ --- 315,321 ---- case in_data: return ".data"; \ case in_sdata: return ".sdata"; \ case in_bss: return ".bss"; \ ! case in_readonly_data: \ if (mips_abi != ABI_32 && mips_abi != ABI_O64) \ return ".rodata"; \ else \ *************** current_section_flags () \ *** 339,346 **** case in_data: return SECTION_WRITE; \ case in_sdata: return SECTION_WRITE | SECTION_SMALL; \ case in_bss: return SECTION_WRITE | SECTION_BSS; \ ! case in_rdata: \ ! case in_const: return 0; \ case in_named: return get_named_section_flags (in_named_name); \ } \ abort (); \ --- 336,342 ---- case in_data: return SECTION_WRITE; \ case in_sdata: return SECTION_WRITE | SECTION_SMALL; \ case in_bss: return SECTION_WRITE | SECTION_BSS; \ ! case in_readonly_data: return 0; \ case in_named: return get_named_section_flags (in_named_name); \ } \ abort (); \ *************** while (0) *** 405,419 **** #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ do \ { \ size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! fprintf (STREAM, "%s", SIZE_ASM_OP); \ ! assemble_name (STREAM, NAME); \ ! fprintf (STREAM, ","); \ ! fprintf (STREAM, HOST_WIDE_INT_PRINT_DEC, int_size_in_bytes (TREE_TYPE (DECL))); \ ! fprintf (STREAM, "\n"); \ } \ mips_declare_object (STREAM, NAME, "", ":\n", 0); \ } \ --- 401,413 ---- #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ do \ { \ + HOST_WIDE_INT size; \ size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (STREAM, NAME, size); \ } \ mips_declare_object (STREAM, NAME, "", ":\n", 0); \ } \ *************** while (0) *** 434,450 **** #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ","); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, int_size_in_bytes (TREE_TYPE (DECL))); \ ! fprintf (FILE, "\n"); \ } \ } while (0) --- 428,442 ---- #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) *************** do { \ *** 524,526 **** --- 516,520 ---- %{shared:-hidden_symbol __do_global_ctors,__do_global_ctors_1,__do_global_dtors} \ -_SYSTYPE_SVR4 -woff 131 \ %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}" + + #define MIPS_TFMODE_FORMAT ibm_extended_format diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris6-o32-as.h gcc-3.3/gcc/config/mips/iris6-o32-as.h *** gcc-3.2.3/gcc/config/mips/iris6-o32-as.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris6-o32-as.h 2002-07-19 21:58:12.000000000 +0000 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine for GNU compiler, for MIPS running IRIX 6 + (O32 ABI) using the SGI assembler. */ + + /* Override mips.h default: the IRIX 6 O32 assembler warns about -O3: + + as: Warning: -O3 is not supported for assembly compiles for ucode + compilers; changing to -O2. + + So avoid passing it in the first place. */ + #undef SUBTARGET_ASM_OPTIMIZING_SPEC + #define SUBTARGET_ASM_OPTIMIZING_SPEC "\ + %{noasmopt:-O0} \ + %{!noasmopt:%{O|O1|O2|O3:-O2}}" + + /* Enforce use of O32 linker, irrespective of SGI_ABI environment variable + and machine type (e.g., R8000 systems default to -64). Copied from + iris5.h, only adding -32. The default options -call_shared -no_unresolved + are only passed if not invoked with -r. */ + #undef LINK_SPEC + #define LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ + %{bestGnum} %{shared} %{non_shared} \ + %{call_shared} %{no_archive} %{exact_version} \ + %{static: -non_shared} \ + %{!static: \ + %{!shared:%{!non_shared:%{!call_shared:%{!r: -call_shared -no_unresolved}}}}} \ + %{rpath} \ + -_SYSTYPE_SVR4 \ + -32" diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris6-o32-gas.h gcc-3.3/gcc/config/mips/iris6-o32-gas.h *** gcc-3.2.3/gcc/config/mips/iris6-o32-gas.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris6-o32-gas.h 2002-07-19 21:58:12.000000000 +0000 *************** *** 0 **** --- 1,19 ---- + /* Definitions of target machine for GNU compiler, for MIPS running IRIX 6 + (O32 ABI) using the GNU assembler. */ + + /* Enforce use of O32 linker, irrespective of SGI_ABI environment variable + and machine type (e.g., R8000 systems default to -64). Copied from + iris5gas.h, only adding -32. The default options -call_shared + -no_unresolved are only passed if not invoked with -r. */ + #undef LINK_SPEC + #define LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ + %{bestGnum} %{shared} %{non_shared} \ + %{call_shared} %{no_archive} %{exact_version} \ + %{static: -non_shared} \ + %{!static: \ + %{!shared:%{!non_shared:%{!call_shared:%{!r: -call_shared -no_unresolved}}}}} \ + %{rpath} -init __do_global_ctors -fini __do_global_dtors \ + %{shared:-hidden_symbol __do_global_ctors,__do_global_ctors_1,__do_global_dtors} \ + -_SYSTYPE_SVR4 \ + -32" diff -Nrc3pad gcc-3.2.3/gcc/config/mips/iris6-o32.h gcc-3.3/gcc/config/mips/iris6-o32.h *** gcc-3.2.3/gcc/config/mips/iris6-o32.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/iris6-o32.h 2002-07-19 21:58:12.000000000 +0000 *************** *** 0 **** --- 1,68 ---- + /* Definitions of target machine for GNU compiler, for MIPS running IRIX 6 + (O32 ABI). */ + + /* The O32 ABI on IRIX 6 defaults to the mips2 ISA. */ + #undef MIPS_ISA_DEFAULT + #define MIPS_ISA_DEFAULT 2 + + /* Specify wchar_t and wint_t types. */ + #undef WCHAR_TYPE + #define WCHAR_TYPE "long int" + + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE 32 + + #undef WINT_TYPE + #define WINT_TYPE "long int" + + #undef WINT_TYPE_SIZE + #define WINT_TYPE_SIZE 32 + + /* Copied from iris5.h, with _MIPS_SIM definition adapted to SGI cc usage + and -D_LONGLONG added as in iris6.h. */ + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define_std ("host_mips"); \ + builtin_define_std ("sgi"); \ + builtin_define_std ("unix"); \ + builtin_define_std ("SYSTYPE_SVR4"); \ + builtin_define ("_LONGLONG"); \ + builtin_define ("_MODERN_C"); \ + builtin_define ("_SVR4_SOURCE"); \ + builtin_define ("__DSO__"); \ + builtin_define ("_ABIO32=1"); \ + builtin_define ("_MIPS_SIM=_ABIO32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=svr4"); \ + builtin_assert ("machine=sgi"); \ + \ + if (!TARGET_FLOAT64) \ + builtin_define ("_MIPS_FPSET=16"); \ + else \ + builtin_define ("_MIPS_FPSET=32"); \ + \ + if (!TARGET_INT64) \ + builtin_define ("_MIPS_SZINT=32"); \ + else \ + builtin_define ("_MIPS_SZINT=64"); \ + \ + if (!TARGET_LONG64) \ + builtin_define ("_MIPS_SZLONG=32"); \ + else \ + builtin_define ("_MIPS_SZLONG=64"); \ + \ + if (!flag_iso) \ + { \ + builtin_define ("__EXTENSIONS__"); \ + builtin_define ("_SGI_SOURCE"); \ + } \ + } while (0); + + /* Enforce use of O32 assembler, irrespective of SGI_ABI environment variable + and machine type (e.g., R8000 systems default to -64). Gas doesn't need + this, but doesn't hurt either. Need to pass -mips2 to gas which defaults + to -mips1 if no ISA is specified. */ + #undef SUBTARGET_ASM_SPEC + #define SUBTARGET_ASM_SPEC "-32 %{!mips*:-mips2}" diff -Nrc3pad gcc-3.2.3/gcc/config/mips/isa3264.h gcc-3.3/gcc/config/mips/isa3264.h *** gcc-3.2.3/gcc/config/mips/isa3264.h 2002-01-17 07:53:55.000000000 +0000 --- gcc-3.3/gcc/config/mips/isa3264.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,45 **** - /* Definitions of target machine for GNU compiler. - MIPS 32 and MIPS 64 version. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #ifndef MIPS_ISA_DEFAULT - #define MIPS_ISA_DEFAULT 32 - #endif - - #ifndef MIPS_ABI_DEFAULT - #define MIPS_ABI_DEFAULT ABI_MEABI - #endif - - #ifndef MIPS_ENABLE_EMBEDDED_O32 - #define MIPS_ENABLE_EMBEDDED_O32 1 - #endif - - #ifndef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - #endif - - #include "mips/elf.h" - - #if MIPS_ABI_DEFAULT == ABI_MEABI - /* For MEABI, don't link with crt0 files, let the linker start files specify - the appropriate crt0 file. */ - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0: }" - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/isa32-linux.h gcc-3.3/gcc/config/mips/isa32-linux.h *** gcc-3.2.3/gcc/config/mips/isa32-linux.h 2001-09-15 02:03:13.000000000 +0000 --- gcc-3.3/gcc/config/mips/isa32-linux.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,29 **** - /* Definitions for MIPS32 running Linux-based GNU systems with ELF format. - Copyright (C) 2001 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #undef TARGET_VERSION - #if TARGET_ENDIAN_DEFAULT == 0 - #define TARGET_VERSION fprintf (stderr, " (MIPS32el GNU/Linux with ELF)"); - #else - #define TARGET_VERSION fprintf (stderr, " (MIPS32 GNU/Linux with ELF)"); - #endif - - #undef MIPS_ISA_DEFAULT - #define MIPS_ISA_DEFAULT 32 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/linux.h gcc-3.3/gcc/config/mips/linux.h *** gcc-3.2.3/gcc/config/mips/linux.h 2002-04-15 20:27:33.000000000 +0000 --- gcc-3.3/gcc/config/mips/linux.h 2003-05-08 17:31:34.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 18,26 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include "mips/mips.h" - #include "mips/abi64.h" - #undef WCHAR_TYPE #define WCHAR_TYPE "int" --- 18,23 ---- *************** Boston, MA 02111-1307, USA. */ *** 48,54 **** `varasm.c' when defining this macro. */ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! ASM_GLOBALIZE_LABEL (FILE, NAME); \ if (SIZE > 0 && SIZE <= mips_section_threshold) \ sbss_section (); \ else \ --- 45,51 ---- `varasm.c' when defining this macro. */ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ! (*targetm.asm_out.globalize_label) (FILE, NAME); \ if (SIZE > 0 && SIZE <= mips_section_threshold) \ sbss_section (); \ else \ *************** do { \ *** 67,107 **** /* Write the extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ","); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! fprintf (FILE, "\n"); \ ! } \ ! mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) ! #undef UNIQUE_SECTION ! #define UNIQUE_SECTION(DECL,RELOC) \ ! mips_unique_section ((DECL), (RELOC)) /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_sbss, in_rdata #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ --- 64,94 ---- /* Write the extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! HOST_WIDE_INT size; \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ ! } \ ! mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) ! #define TARGET_ASM_UNIQUE_SECTION mips_unique_section /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_sbss #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ *************** void FN () \ *** 130,201 **** #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_ABICALLS|MASK_GAS) ! /* Specify predefined symbols in preprocessor. */ ! #undef CPP_PREDEFINES ! #if TARGET_ENDIAN_DEFAULT == 0 ! #define CPP_PREDEFINES "-DMIPSEL -D_MIPSEL -Dunix -Dmips -D_mips \ ! -DR3000 -D_R3000 -D__gnu_linux__ -Dlinux -Asystem=posix -Acpu=mips \ ! -Amachine=mips -D__ELF__ -D__PIC__ -D__pic__" ! #else ! #define CPP_PREDEFINES "-DMIPSEB -D_MIPSEB -Dunix -Dmips -D_mips \ ! -DR3000 -D_R3000 -D__gnu_linux__ -Dlinux -Asystem=posix -Acpu=mips \ ! -Amachine=mips -D__ELF__ -D__PIC__ -D__pic__" ! #endif ! ! #undef SUBTARGET_CPP_SIZE_SPEC ! #define SUBTARGET_CPP_SIZE_SPEC "\ ! %{mabi=32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ ! %{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}" ! /* We must make -mips3 do what -mlong64 used to do. */ ! /* ??? If no mipsX option given, but a mabi=X option is, then should set ! _MIPS_ISA based on the mabi=X option. */ ! /* ??? If no mabi=X option give, but a mipsX option is, then should set ! _MIPS_SIM based on the mipsX option. */ ! /* ??? Same for _MIPS_SZINT. */ ! /* ??? Same for _MIPS_SZPTR. */ ! /* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE. */ ! #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "\ - %{mfp32: -D_MIPS_FPSET=16} \ - %{mfp64: -D_MIPS_FPSET=32} \ - %{!mfp*: -D_MIPS_FPSET=32} \ - %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ - %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \ - %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \ - %{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \ - %{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ - %{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ - %{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \ - %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \ - %{!mabi*: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ - %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \ - %{mabi=32: -D_MIPS_SZLONG=32} \ - %{mabi=n32: -D_MIPS_SZLONG=32} \ - %{mabi=64: -D_MIPS_SZLONG=64} \ - %{!mabi*: -D_MIPS_SZLONG=32} \ - %{mabi=32: -D_MIPS_SZPTR=32} \ - %{mabi=n32: -D_MIPS_SZPTR=32} \ - %{mabi=64: -D_MIPS_SZPTR=64} \ - %{!mabi*: -D_MIPS_SZPTR=32} \ - %{!mips*: -U__mips -D__mips} \ - %{mabi=32: -U__mips64} \ - %{mabi=n32: -D__mips64} \ - %{mabi=64: -U__mips64} \ - %{!mabi*: -U__mips64} \ %{fno-PIC:-U__PIC__ -U__pic__} %{fno-pic:-U__PIC__ -U__pic__} \ %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ %{pthread:-D_REENTRANT}" - /* The GNU C++ standard library requires that these macros be defined. */ - #undef CPLUSPLUS_CPP_SPEC - #define CPLUSPLUS_CPP_SPEC "\ - -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \ - -D_GNU_SOURCE %(cpp) \ - " - /* From iris5.h */ /* -G is incompatible with -KPIC which is the default, so only allow objects in the small data section if the user explicitly asks for it. */ --- 117,172 ---- #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_ABICALLS|MASK_GAS) ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__gnu_linux__"); \ ! builtin_define ("__ELF__"); \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("linux"); \ ! builtin_assert ("system=linux"); \ ! /* The GNU C++ standard library requires this. */ \ ! if (c_language == clk_cplusplus) \ ! builtin_define ("_GNU_SOURCE"); \ ! \ ! if (mips_abi == ABI_N32) \ ! { \ ! builtin_define ("_ABIN32=2"); \ ! builtin_define ("_MIPS_SIM=_ABIN32"); \ ! builtin_define ("_MIPS_SZLONG=32"); \ ! builtin_define ("_MIPS_SZPTR=32"); \ ! } \ ! else if (mips_abi == ABI_64) \ ! { \ ! builtin_define ("_ABI64=3"); \ ! builtin_define ("_MIPS_SIM=_ABI64"); \ ! builtin_define ("_MIPS_SZLONG=64"); \ ! builtin_define ("_MIPS_SZPTR=64"); \ ! } \ ! else \ ! { \ ! builtin_define ("_MIPS_SIM=_MIPS_SIM_ABI32"); \ ! builtin_define ("_MIPS_SZLONG=32"); \ ! builtin_define ("_MIPS_SZPTR=32"); \ ! } \ ! if (TARGET_FLOAT64) \ ! builtin_define ("_MIPS_FPSET=32"); \ ! else \ ! builtin_define ("_MIPS_FPSET=16"); \ ! \ ! if (TARGET_INT64) \ ! builtin_define ("_MIPS_SZINT=64"); \ ! else \ ! builtin_define ("_MIPS_SZINT=32"); \ ! } while (0) ! #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "\ %{fno-PIC:-U__PIC__ -U__pic__} %{fno-pic:-U__PIC__ -U__pic__} \ %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ %{pthread:-D_REENTRANT}" /* From iris5.h */ /* -G is incompatible with -KPIC which is the default, so only allow objects in the small data section if the user explicitly asks for it. */ *************** void FN () \ *** 214,227 **** %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{static:-static}}}" - #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC "\ %{mabi=64: -64} \ %{!fno-PIC:%{!fno-pic:-KPIC}} \ %{fno-PIC:-non_shared} %{fno-pic:-non_shared}" ! #undef SUBTARGET_ASM_DEBUGGING_SPEC #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0" /* The MIPS assembler has different syntax for .set. We set it to --- 185,197 ---- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{static:-static}}}" #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC "\ %{mabi=64: -64} \ %{!fno-PIC:%{!fno-pic:-KPIC}} \ %{fno-PIC:-non_shared} %{fno-pic:-non_shared}" ! #undef SUBTARGET_ASM_DEBUGGING_SPEC #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0" /* The MIPS assembler has different syntax for .set. We set it to *************** void FN () \ *** 239,255 **** fputc ( '\n', FILE); \ } while (0) - #undef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL - #define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \ - do { \ - fputc ('\t', FILE); \ - assemble_name (FILE, SY); \ - fputc ('=', FILE); \ - assemble_name (FILE, HI); \ - fputc ('-', FILE); \ - assemble_name (FILE, LO); \ - } while (0) - #undef ASM_DECLARE_FUNCTION_NAME #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \ do { \ --- 209,214 ---- *************** void FN () \ *** 259,269 **** assemble_name (STREAM, NAME); \ putc ('\n', STREAM); \ } \ ! fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \ ! assemble_name (STREAM, NAME); \ ! putc (',', STREAM); \ ! fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', STREAM); \ assemble_name (STREAM, NAME); \ fputs (":\n", STREAM); \ } while (0) --- 218,224 ---- assemble_name (STREAM, NAME); \ putc ('\n', STREAM); \ } \ ! ASM_OUTPUT_TYPE_DIRECTIVE (STREAM, NAME, "function"); \ assemble_name (STREAM, NAME); \ fputs (":\n", STREAM); \ } while (0) *************** void FN () \ *** 293,295 **** --- 248,254 ---- presence of $gp-relative calls. */ #undef ASM_OUTPUT_REG_PUSH #undef ASM_OUTPUT_REG_POP + + /* The current Linux binutils uses MIPS_STABS_ELF and doesn't support + COFF. */ + #undef SDB_DEBUGGING_INFO diff -Nrc3pad gcc-3.2.3/gcc/config/mips/little.h gcc-3.3/gcc/config/mips/little.h *** gcc-3.2.3/gcc/config/mips/little.h 2001-08-08 15:40:57.000000000 +0000 --- gcc-3.3/gcc/config/mips/little.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,22 **** - /* Definition of little endian mips machine for GNU compiler. - - Copyright (C) 2001 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define TARGET_ENDIAN_DEFAULT 0 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/mips-5.h gcc-3.3/gcc/config/mips/mips-5.h *** gcc-3.2.3/gcc/config/mips/mips-5.h 2001-12-16 15:43:41.000000000 +0000 --- gcc-3.3/gcc/config/mips/mips-5.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - /* Definitions of target machine for GNU compiler. MIPS RISC-OS 5.0 - default version. - Copyright (C) 1992 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - %{call_shared} %{no_archive} %{exact_version} \ - %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s crtn.o%s}}" - - #include "mips/mips.h" - - /* Some assemblers have a bug that causes backslash escaped chars in .ascii - to be misassembled, so we just completely avoid it. */ - #undef ASM_OUTPUT_ASCII - #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ - do { \ - const unsigned char *s; \ - size_t i, limit = (LEN); \ - for (i = 0, s = (const unsigned char *)(PTR); i < limit; s++, i++) \ - { \ - if ((i % 8) == 0) \ - fputs ("\n\t.byte\t", (FILE)); \ - fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ - } \ - fputs ("\n", (FILE)); \ - } while (0) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/mips.c gcc-3.3/gcc/config/mips/mips.c *** gcc-3.2.3/gcc/config/mips/mips.c 2003-02-12 15:25:49.000000000 +0000 --- gcc-3.3/gcc/config/mips/mips.c 2003-01-31 23:51:23.000000000 +0000 *************** *** 1,6 **** /* Subroutines for insn-output.c for MIPS Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by A. Lichnewsky, lich@inria.inria.fr. Changes by Michael Meissner, meissner@osf.org. 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and --- 1,6 ---- /* Subroutines for insn-output.c for MIPS Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by A. Lichnewsky, lich@inria.inria.fr. Changes by Michael Meissner, meissner@osf.org. 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and *************** Boston, MA 02111-1307, USA. */ *** 54,63 **** #include "target.h" #include "target-def.h" - #ifdef HALF_PIC_DEBUG - #include "halfpic.h" - #endif - #ifdef __GNU_STAB__ #define STAB_CODE_TYPE enum __stab_debug_code #else --- 54,59 ---- *************** enum internal_test { *** 86,92 **** --- 82,91 ---- struct constant; + struct mips_arg_info; static enum internal_test map_test_to_internal_test PARAMS ((enum rtx_code)); + static void get_float_compare_codes PARAMS ((enum rtx_code, enum rtx_code *, + enum rtx_code *)); static int mips16_simple_memory_operand PARAMS ((rtx, rtx, enum machine_mode)); static int m16_check_op PARAMS ((rtx, int, int, int)); *************** static void block_move_loop PARAMS ((r *** 95,109 **** int, rtx, rtx)); static void block_move_call PARAMS ((rtx, rtx, rtx)); ! static rtx mips_add_large_offset_to_sp PARAMS ((HOST_WIDE_INT, ! FILE *)); static void mips_annotate_frame_insn PARAMS ((rtx, rtx)); static rtx mips_frame_set PARAMS ((enum machine_mode, int, int)); static void mips_emit_frame_related_store PARAMS ((rtx, rtx, HOST_WIDE_INT)); ! static void save_restore_insns PARAMS ((int, rtx, ! long, FILE *)); static void mips16_output_gp_offset PARAMS ((FILE *, rtx)); static void mips16_fp_args PARAMS ((FILE *, int, int)); static void build_mips16_function_stub PARAMS ((FILE *)); --- 94,110 ---- int, rtx, rtx)); static void block_move_call PARAMS ((rtx, rtx, rtx)); ! static void mips_arg_info PARAMS ((const CUMULATIVE_ARGS *, ! enum machine_mode, ! tree, int, ! struct mips_arg_info *)); ! static rtx mips_add_large_offset_to_sp PARAMS ((HOST_WIDE_INT)); static void mips_annotate_frame_insn PARAMS ((rtx, rtx)); static rtx mips_frame_set PARAMS ((enum machine_mode, int, int)); static void mips_emit_frame_related_store PARAMS ((rtx, rtx, HOST_WIDE_INT)); ! static void save_restore_insns PARAMS ((int, rtx, long)); static void mips16_output_gp_offset PARAMS ((FILE *, rtx)); static void mips16_fp_args PARAMS ((FILE *, int, int)); static void build_mips16_function_stub PARAMS ((FILE *)); *************** static rtx mips_find_symbol PARAMS ((r *** 117,127 **** static void abort_with_insn PARAMS ((rtx, const char *)) ATTRIBUTE_NORETURN; static int symbolic_expression_p PARAMS ((rtx)); - static void mips_add_gc_roots PARAMS ((void)); static bool mips_assemble_integer PARAMS ((rtx, unsigned int, int)); static void mips_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void mips_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); ! static enum processor_type mips_parse_cpu PARAMS ((const char *)); static void copy_file_data PARAMS ((FILE *, FILE *)); #ifdef TARGET_IRIX6 static void iris6_asm_named_section_1 PARAMS ((const char *, --- 118,135 ---- static void abort_with_insn PARAMS ((rtx, const char *)) ATTRIBUTE_NORETURN; static int symbolic_expression_p PARAMS ((rtx)); static bool mips_assemble_integer PARAMS ((rtx, unsigned int, int)); static void mips_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void mips_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); ! static void mips_set_architecture PARAMS ((const struct mips_cpu_info *)); ! static void mips_set_tune PARAMS ((const struct mips_cpu_info *)); ! static bool mips_strict_matching_cpu_name_p PARAMS ((const char *, ! const char *)); ! static bool mips_matching_cpu_name_p PARAMS ((const char *, ! const char *)); ! static const struct mips_cpu_info *mips_parse_cpu PARAMS ((const char *, ! const char *)); ! static const struct mips_cpu_info *mips_cpu_info_from_isa PARAMS ((int)); static void copy_file_data PARAMS ((FILE *, FILE *)); #ifdef TARGET_IRIX6 static void iris6_asm_named_section_1 PARAMS ((const char *, *************** static hashval_t iris_section_align_entr *** 134,139 **** --- 142,226 ---- static int iris6_section_align_1 PARAMS ((void **, void *)); #endif static int mips_adjust_cost PARAMS ((rtx, rtx, rtx, int)); + static int mips_issue_rate PARAMS ((void)); + + static struct machine_function * mips_init_machine_status PARAMS ((void)); + static void mips_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)) + ATTRIBUTE_UNUSED; + static void mips_unique_section PARAMS ((tree, int)) + ATTRIBUTE_UNUSED; + static void mips_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)); + static int mips_use_dfa_pipeline_interface PARAMS ((void)); + static void mips_encode_section_info PARAMS ((tree, int)); + + /* Structure to be filled in by compute_frame_size with register + save masks, and offsets for the current function. */ + + struct mips_frame_info GTY(()) + { + long total_size; /* # bytes that the entire frame takes up */ + long var_size; /* # bytes that variables take up */ + long args_size; /* # bytes that outgoing arguments take up */ + long extra_size; /* # bytes of extra gunk */ + int gp_reg_size; /* # bytes needed to store gp regs */ + int fp_reg_size; /* # bytes needed to store fp regs */ + long mask; /* mask of saved gp registers */ + long fmask; /* mask of saved fp registers */ + long gp_save_offset; /* offset from vfp to store gp registers */ + long fp_save_offset; /* offset from vfp to store fp registers */ + long gp_sp_offset; /* offset from new sp to store gp registers */ + long fp_sp_offset; /* offset from new sp to store fp registers */ + int initialized; /* != 0 if frame size already calculated */ + int num_gp; /* number of gp registers saved */ + int num_fp; /* number of fp registers saved */ + }; + + struct machine_function GTY(()) { + /* Pseudo-reg holding the address of the current function when + generating embedded PIC code. Created by LEGITIMIZE_ADDRESS, + used by mips_finalize_pic if it was created. */ + rtx embedded_pic_fnaddr_rtx; + + /* Pseudo-reg holding the value of $28 in a mips16 function which + refers to GP relative global variables. */ + rtx mips16_gp_pseudo_rtx; + + /* Current frame information, calculated by compute_frame_size. */ + struct mips_frame_info frame; + + /* Length of instructions in function; mips16 only. */ + long insns_len; + }; + + /* Information about a single argument. */ + struct mips_arg_info + { + /* True if the argument is a record or union type. */ + bool struct_p; + + /* True if the argument is passed in a floating-point register, or + would have been if we hadn't run out of registers. */ + bool fpr_p; + + /* The argument's size, in bytes. */ + unsigned int num_bytes; + + /* The number of words passed in registers, rounded up. */ + unsigned int reg_words; + + /* The offset of the first register from GP_ARG_FIRST or FP_ARG_FIRST, + or MAX_ARGS_IN_REGISTERS if the argument is passed entirely + on the stack. */ + unsigned int reg_offset; + + /* The number of words that must be passed on the stack, rounded up. */ + unsigned int stack_words; + + /* The offset from the start of the stack overflow area of the argument's + first stack word. Only meaningful when STACK_WORDS is nonzero. */ + unsigned int stack_offset; + }; /* Global variables for machine-dependent things. */ *************** int sdb_label_count = 0; *** 153,159 **** /* Next label # for each statement for Silicon Graphics IRIS systems. */ int sym_lineno = 0; ! /* Non-zero if inside of a function, because the stupid MIPS asm can't handle .files inside of functions. */ int inside_function = 0; --- 240,246 ---- /* Next label # for each statement for Silicon Graphics IRIS systems. */ int sym_lineno = 0; ! /* Nonzero if inside of a function, because the stupid MIPS asm can't handle .files inside of functions. */ int inside_function = 0; *************** rtx branch_cmp[2]; *** 216,230 **** /* what type of branch to use */ enum cmp_type branch_type; - /* Number of previously seen half-pic pointers and references. */ - static int prev_half_pic_ptrs = 0; - static int prev_half_pic_refs = 0; - /* The target cpu for code generation. */ enum processor_type mips_arch; /* The target cpu for optimization and scheduling. */ enum processor_type mips_tune; /* which instruction set architecture to use. */ int mips_isa; --- 303,315 ---- /* what type of branch to use */ enum cmp_type branch_type; /* The target cpu for code generation. */ enum processor_type mips_arch; + const struct mips_cpu_info *mips_arch_info; /* The target cpu for optimization and scheduling. */ enum processor_type mips_tune; + const struct mips_cpu_info *mips_tune_info; /* which instruction set architecture to use. */ int mips_isa; *************** int mips_isa; *** 233,239 **** int mips_abi; /* Strings to hold which cpu and instruction set architecture to use. */ - const char *mips_cpu_string; /* for -mcpu= */ const char *mips_arch_string; /* for -march= */ const char *mips_tune_string; /* for -mtune= */ const char *mips_isa_string; /* for -mips{1,2,3,4} */ --- 318,323 ---- *************** int mips16; *** 248,258 **** just a way to avoid using up another bit in target_flags. */ const char *mips_no_mips16_string; - /* This is only used to determine if an type size setting option was - explicitly specified (-mlong64, -mint64, -mlong32). The specs - set this option if such an option is used. */ - const char *mips_explicit_type_size_string; - /* Whether we are generating mips16 hard float code. In mips16 mode we always set TARGET_SOFT_FLOAT; this variable is nonzero if -msoft-float was not specified by the user, which means that we --- 332,337 ---- *************** int mips_split_addresses; *** 275,285 **** /* Generating calls to position independent functions? */ enum mips_abicalls_type mips_abicalls; - /* High and low marks for floating point values which we will accept - as legitimate constants for LEGITIMATE_CONSTANT_P. These are - initialized in override_options. */ - REAL_VALUE_TYPE dfhigh, dflow, sfhigh, sflow; - /* Mode used for saving/restoring general purpose registers. */ static enum machine_mode gpr_mode; --- 354,359 ---- *************** static enum machine_mode gpr_mode; *** 287,312 **** can support a given mode. */ char mips_hard_regno_mode_ok[(int)MAX_MACHINE_MODE][FIRST_PSEUDO_REGISTER]; - /* Current frame information calculated by compute_frame_size. */ - struct mips_frame_info current_frame_info; - - /* Zero structure to initialize current_frame_info. */ - struct mips_frame_info zero_frame_info; - - /* Pseudo-reg holding the address of the current function when - generating embedded PIC code. Created by LEGITIMIZE_ADDRESS, used - by mips_finalize_pic if it was created. */ - rtx embedded_pic_fnaddr_rtx; - /* The length of all strings seen when compiling for the mips16. This is used to tell how many strings are in the constant pool, so that we can see if we may have an overflow. This is reset each time the constant pool is output. */ int mips_string_length; ! /* Pseudo-reg holding the value of $28 in a mips16 function which ! refers to GP relative global variables. */ ! rtx mips16_gp_pseudo_rtx; /* In mips16 mode, we build a list of all the string constants we see in a particular function. */ --- 361,376 ---- can support a given mode. */ char mips_hard_regno_mode_ok[(int)MAX_MACHINE_MODE][FIRST_PSEUDO_REGISTER]; /* The length of all strings seen when compiling for the mips16. This is used to tell how many strings are in the constant pool, so that we can see if we may have an overflow. This is reset each time the constant pool is output. */ int mips_string_length; ! /* When generating mips16 code, a list of all strings that are to be ! output after the current function. */ ! ! static GTY(()) rtx mips16_strings; /* In mips16 mode, we build a list of all the string constants we see in a particular function. */ *************** char mips_reg_names[][8] = *** 343,355 **** "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", "hi", "lo", "accum","$fcc0","$fcc1","$fcc2","$fcc3","$fcc4", ! "$fcc5","$fcc6","$fcc7","$rap" }; /* Mips software names for the registers, used to overwrite the mips_reg_names array. */ ! static const char mips_sw_reg_names[][8] = { "$zero","$at", "$v0", "$v1", "$a0", "$a1", "$a2", "$a3", "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7", --- 407,431 ---- "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", "hi", "lo", "accum","$fcc0","$fcc1","$fcc2","$fcc3","$fcc4", ! "$fcc5","$fcc6","$fcc7","$rap", "", "", "", "", ! "$c0r0", "$c0r1", "$c0r2", "$c0r3", "$c0r4", "$c0r5", "$c0r6", "$c0r7", ! "$c0r8", "$c0r9", "$c0r10","$c0r11","$c0r12","$c0r13","$c0r14","$c0r15", ! "$c0r16","$c0r17","$c0r18","$c0r19","$c0r20","$c0r21","$c0r22","$c0r23", ! "$c0r24","$c0r25","$c0r26","$c0r27","$c0r28","$c0r29","$c0r30","$c0r31", ! "$c2r0", "$c2r1", "$c2r2", "$c2r3", "$c2r4", "$c2r5", "$c2r6", "$c2r7", ! "$c2r8", "$c2r9", "$c2r10","$c2r11","$c2r12","$c2r13","$c2r14","$c2r15", ! "$c2r16","$c2r17","$c2r18","$c2r19","$c2r20","$c2r21","$c2r22","$c2r23", ! "$c2r24","$c2r25","$c2r26","$c2r27","$c2r28","$c2r29","$c2r30","$c2r31", ! "$c3r0", "$c3r1", "$c3r2", "$c3r3", "$c3r4", "$c3r5", "$c3r6", "$c3r7", ! "$c3r8", "$c3r9", "$c3r10","$c3r11","$c3r12","$c3r13","$c3r14","$c3r15", ! "$c3r16","$c3r17","$c3r18","$c3r19","$c3r20","$c3r21","$c3r22","$c3r23", ! "$c3r24","$c3r25","$c3r26","$c3r27","$c3r28","$c3r29","$c3r30","$c3r31" }; /* Mips software names for the registers, used to overwrite the mips_reg_names array. */ ! char mips_sw_reg_names[][8] = { "$zero","$at", "$v0", "$v1", "$a0", "$a1", "$a2", "$a3", "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7", *************** static const char mips_sw_reg_names[][8] *** 360,366 **** "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", "hi", "lo", "accum","$fcc0","$fcc1","$fcc2","$fcc3","$fcc4", ! "$fcc5","$fcc6","$fcc7","$rap" }; /* Map hard register number to register class */ --- 436,454 ---- "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", "hi", "lo", "accum","$fcc0","$fcc1","$fcc2","$fcc3","$fcc4", ! "$fcc5","$fcc6","$fcc7","$rap", "", "", "", "", ! "$c0r0", "$c0r1", "$c0r2", "$c0r3", "$c0r4", "$c0r5", "$c0r6", "$c0r7", ! "$c0r8", "$c0r9", "$c0r10","$c0r11","$c0r12","$c0r13","$c0r14","$c0r15", ! "$c0r16","$c0r17","$c0r18","$c0r19","$c0r20","$c0r21","$c0r22","$c0r23", ! "$c0r24","$c0r25","$c0r26","$c0r27","$c0r28","$c0r29","$c0r30","$c0r31", ! "$c2r0", "$c2r1", "$c2r2", "$c2r3", "$c2r4", "$c2r5", "$c2r6", "$c2r7", ! "$c2r8", "$c2r9", "$c2r10","$c2r11","$c2r12","$c2r13","$c2r14","$c2r15", ! "$c2r16","$c2r17","$c2r18","$c2r19","$c2r20","$c2r21","$c2r22","$c2r23", ! "$c2r24","$c2r25","$c2r26","$c2r27","$c2r28","$c2r29","$c2r30","$c2r31", ! "$c3r0", "$c3r1", "$c3r2", "$c3r3", "$c3r4", "$c3r5", "$c3r6", "$c3r7", ! "$c3r8", "$c3r9", "$c3r10","$c3r11","$c3r12","$c3r13","$c3r14","$c3r15", ! "$c3r16","$c3r17","$c3r18","$c3r19","$c3r20","$c3r21","$c3r22","$c3r23", ! "$c3r24","$c3r25","$c3r26","$c3r27","$c3r28","$c3r29","$c3r30","$c3r31" }; /* Map hard register number to register class */ *************** const enum reg_class mips_regno_to_class *** 384,390 **** FP_REGS, FP_REGS, FP_REGS, FP_REGS, HI_REG, LO_REG, HILO_REG, ST_REGS, ST_REGS, ST_REGS, ST_REGS, ST_REGS, ! ST_REGS, ST_REGS, ST_REGS, GR_REGS }; /* Map register constraint character to register class. */ --- 472,503 ---- FP_REGS, FP_REGS, FP_REGS, FP_REGS, HI_REG, LO_REG, HILO_REG, ST_REGS, ST_REGS, ST_REGS, ST_REGS, ST_REGS, ! ST_REGS, ST_REGS, ST_REGS, GR_REGS, ! NO_REGS, NO_REGS, NO_REGS, NO_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP0_REGS, COP0_REGS, COP0_REGS, COP0_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP2_REGS, COP2_REGS, COP2_REGS, COP2_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS, ! COP3_REGS, COP3_REGS, COP3_REGS, COP3_REGS }; /* Map register constraint character to register class. */ *************** enum reg_class mips_char_to_class[256] = *** 456,461 **** --- 569,636 ---- NO_REGS, NO_REGS, NO_REGS, NO_REGS, }; + /* A table describing all the processors gcc knows about. Names are + matched in the order listed. The first mention of an ISA level is + taken as the canonical name for that ISA. + + To ease comparison, please keep this table in the same order as + gas's mips_cpu_info_table[]. */ + const struct mips_cpu_info mips_cpu_info_table[] = { + /* Entries for generic ISAs */ + { "mips1", PROCESSOR_R3000, 1 }, + { "mips2", PROCESSOR_R6000, 2 }, + { "mips3", PROCESSOR_R4000, 3 }, + { "mips4", PROCESSOR_R8000, 4 }, + { "mips32", PROCESSOR_R4KC, 32 }, + { "mips64", PROCESSOR_R5KC, 64 }, + + /* MIPS I */ + { "r3000", PROCESSOR_R3000, 1 }, + { "r2000", PROCESSOR_R3000, 1 }, /* = r3000 */ + { "r3900", PROCESSOR_R3900, 1 }, + + /* MIPS II */ + { "r6000", PROCESSOR_R6000, 2 }, + + /* MIPS III */ + { "r4000", PROCESSOR_R4000, 3 }, + { "vr4100", PROCESSOR_R4100, 3 }, + { "vr4111", PROCESSOR_R4111, 3 }, + { "vr4120", PROCESSOR_R4120, 3 }, + { "vr4300", PROCESSOR_R4300, 3 }, + { "r4400", PROCESSOR_R4000, 3 }, /* = r4000 */ + { "r4600", PROCESSOR_R4600, 3 }, + { "orion", PROCESSOR_R4600, 3 }, /* = r4600 */ + { "r4650", PROCESSOR_R4650, 3 }, + + /* MIPS IV */ + { "r8000", PROCESSOR_R8000, 4 }, + { "vr5000", PROCESSOR_R5000, 4 }, + { "vr5400", PROCESSOR_R5400, 4 }, + { "vr5500", PROCESSOR_R5500, 4 }, + + + /* MIPS 32 */ + { "4kc", PROCESSOR_R4KC, 32 }, + { "4kp", PROCESSOR_R4KC, 32 }, /* = 4kc */ + + /* MIPS 64 */ + { "5kc", PROCESSOR_R5KC, 64 }, + { "20kc", PROCESSOR_R20KC, 64 }, + { "sr71000", PROCESSOR_SR71000, 64 }, + + /* Broadcom SB-1 CPU core */ + { "sb1", PROCESSOR_SB1, 64 }, + + /* End marker */ + { 0, 0, 0 } + }; + + /* Nonzero if -march should decide the default value of MASK_SOFT_FLOAT. */ + #ifndef MIPS_MARCH_CONTROLS_SOFT_FLOAT + #define MIPS_MARCH_CONTROLS_SOFT_FLOAT 0 + #endif + /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.half\t" *************** enum reg_class mips_char_to_class[256] = *** 469,483 **** --- 644,669 ---- #define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.half\t" #undef TARGET_ASM_UNALIGNED_SI_OP #define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.word\t" + #undef TARGET_ASM_UNALIGNED_DI_OP + #define TARGET_ASM_UNALIGNED_DI_OP "\t.align 0\n\t.dword\t" #endif #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE mips_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE mips_output_function_epilogue + #undef TARGET_ASM_SELECT_RTX_SECTION + #define TARGET_ASM_SELECT_RTX_SECTION mips_select_rtx_section #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST mips_adjust_cost + #undef TARGET_SCHED_ISSUE_RATE + #define TARGET_SCHED_ISSUE_RATE mips_issue_rate + #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE + #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE mips_use_dfa_pipeline_interface + + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO mips_encode_section_info struct gcc_target targetm = TARGET_INITIALIZER; *************** mips_const_double_ok (op, mode) *** 633,677 **** rtx op; enum machine_mode mode; { - REAL_VALUE_TYPE d; - if (GET_CODE (op) != CONST_DOUBLE) return 0; if (mode == VOIDmode) return 1; if (mode != SFmode && mode != DFmode) return 0; if (op == CONST0_RTX (mode)) return 1; - /* ??? li.s does not work right with SGI's Irix 6 assembler. */ - if (mips_abi != ABI_32 && mips_abi != ABI_O64 && mips_abi != ABI_EABI) - return 0; - - REAL_VALUE_FROM_CONST_DOUBLE (d, op); - - if (REAL_VALUE_ISNAN (d)) - return FALSE; - - if (REAL_VALUE_NEGATIVE (d)) - d = REAL_VALUE_NEGATE (d); - - if (mode == DFmode) - { - if (REAL_VALUES_LESS (d, dfhigh) - && REAL_VALUES_LESS (dflow, d)) - return 1; - } - else - { - if (REAL_VALUES_LESS (d, sfhigh) - && REAL_VALUES_LESS (sflow, d)) - return 1; - } - return 0; } --- 819,840 ---- rtx op; enum machine_mode mode; { if (GET_CODE (op) != CONST_DOUBLE) return 0; if (mode == VOIDmode) return 1; + /* We've no zero register in mips16 mode. */ + if (TARGET_MIPS16) + return 0; + if (mode != SFmode && mode != DFmode) return 0; if (op == CONST0_RTX (mode)) return 1; return 0; } *************** const_float_1_operand (op, mode) *** 683,691 **** enum machine_mode mode; { REAL_VALUE_TYPE d; - static REAL_VALUE_TYPE onedf; - static REAL_VALUE_TYPE onesf; - static int one_initialized; if (GET_CODE (op) != CONST_DOUBLE || mode != GET_MODE (op) --- 846,851 ---- *************** const_float_1_operand (op, mode) *** 694,712 **** REAL_VALUE_FROM_CONST_DOUBLE (d, op); ! /* We only initialize these values if we need them, since we will ! never get called unless mips_isa >= 4. */ ! if (! one_initialized) ! { ! onedf = REAL_VALUE_ATOF ("1.0", DFmode); ! onesf = REAL_VALUE_ATOF ("1.0", SFmode); ! one_initialized = 1; ! } ! ! if (mode == DFmode) ! return REAL_VALUES_EQUAL (d, onedf); ! else ! return REAL_VALUES_EQUAL (d, onesf); } /* Return true if a memory load or store of REG plus OFFSET in MODE --- 854,860 ---- REAL_VALUE_FROM_CONST_DOUBLE (d, op); ! return REAL_VALUES_EQUAL (d, dconst1); } /* Return true if a memory load or store of REG plus OFFSET in MODE *************** simple_memory_operand (op, mode) *** 834,851 **** getting this right is during delayed branch scheduling, so don't need to check until then. The machine_dependent_reorg function will set the total length of the instructions used ! in the function in current_frame_info. If that is small enough, we know for sure that this is a small offset. It would be better if we could take into account the location of the instruction within the function, but we can't, because we don't know where we are. */ if (TARGET_MIPS16 && CONSTANT_POOL_ADDRESS_P (addr) ! && current_frame_info.insns_len > 0) { long size; ! size = current_frame_info.insns_len + get_pool_size (); if (GET_MODE_SIZE (mode) == 4) return size < 4 * 0x100; else if (GET_MODE_SIZE (mode) == 8) --- 982,999 ---- getting this right is during delayed branch scheduling, so don't need to check until then. The machine_dependent_reorg function will set the total length of the instructions used ! in the function (cfun->machine->insns_len). If that is small enough, we know for sure that this is a small offset. It would be better if we could take into account the location of the instruction within the function, but we can't, because we don't know where we are. */ if (TARGET_MIPS16 && CONSTANT_POOL_ADDRESS_P (addr) ! && cfun->machine->insns_len > 0) { long size; ! size = cfun->machine->insns_len + get_pool_size (); if (GET_MODE_SIZE (mode) == 4) return size < 4 * 0x100; else if (GET_MODE_SIZE (mode) == 8) *************** move_operand (op, mode) *** 1085,1093 **** /* Return nonzero if OPERAND is valid as a source operand for movdi. This accepts not only general_operand, but also sign extended ! constants and registers. We need to accept sign extended constants in case a sign extended register which is used in an expression, ! and is equivalent to a constant, is spilled. */ int movdi_operand (op, mode) --- 1233,1243 ---- /* Return nonzero if OPERAND is valid as a source operand for movdi. This accepts not only general_operand, but also sign extended ! move_operands. Note that we need to accept sign extended constants in case a sign extended register which is used in an expression, ! and is equivalent to a constant, is spilled. We need to accept ! sign-extended memory in order to reload registers from stack slots, ! and so that we generate efficient code for extendsidi2. */ int movdi_operand (op, mode) *************** movdi_operand (op, mode) *** 1098,1108 **** && mode == DImode && GET_CODE (op) == SIGN_EXTEND && GET_MODE (op) == DImode ! && (GET_MODE (XEXP (op, 0)) == SImode ! || (GET_CODE (XEXP (op, 0)) == CONST_INT ! && GET_MODE (XEXP (op, 0)) == VOIDmode)) ! && (register_operand (XEXP (op, 0), SImode) ! || immediate_operand (XEXP (op, 0), SImode))) return 1; return (general_operand (op, mode) --- 1248,1254 ---- && mode == DImode && GET_CODE (op) == SIGN_EXTEND && GET_MODE (op) == DImode ! && move_operand (XEXP (op, 0), SImode)) return 1; return (general_operand (op, mode) *************** se_nonmemory_operand (op, mode) *** 1211,1236 **** return nonmemory_operand (op, mode); } - /* Like nonimmediate_operand, but when in 64 bit mode also accept a - sign extend of a 32 bit register, since the value is known to be - already sign extended. */ - - int - se_nonimmediate_operand (op, mode) - rtx op; - enum machine_mode mode; - { - if (TARGET_64BIT - && mode == DImode - && GET_CODE (op) == SIGN_EXTEND - && GET_MODE (op) == DImode - && GET_MODE (XEXP (op, 0)) == SImode - && register_operand (XEXP (op, 0), SImode)) - return 1; - - return nonimmediate_operand (op, mode); - } - /* Accept any operand that can appear in a mips16 constant table instruction. We can't use any of the standard operand functions because for these instructions we accept values that are not --- 1357,1362 ---- *************** consttable_operand (op, mode) *** 1244,1249 **** --- 1370,1418 ---- return CONSTANT_P (op); } + /* Coprocessor operand; return true if rtx is a REG and refers to a + coprocessor. */ + + int + coprocessor_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return (GET_CODE (op) == REG + && COP0_REG_FIRST <= REGNO (op) + && REGNO (op) <= COP3_REG_LAST); + } + + int + coprocessor2_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return (GET_CODE (op) == REG + && COP2_REG_FIRST <= REGNO (op) + && REGNO (op) <= COP2_REG_LAST); + } + + /* Returns 1 if OP is a symbolic operand, i.e. a symbol_ref or a label_ref, + possibly with an offset. */ + + int + symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode; + { + if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) + return 0; + if (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF) + return 1; + if (GET_CODE (op) == CONST + && GET_CODE (XEXP (op,0)) == PLUS + && GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF + && GET_CODE (XEXP (XEXP (op,0), 1)) == CONST_INT) + return 1; + return 0; + } + /* Return nonzero if we split the address into high and low parts. */ /* ??? We should also handle reg+array somewhere. We get four *************** mips_reg_mode_ok_for_base_p (reg, mode, *** 1295,1301 **** /* This function is used to implement GO_IF_LEGITIMATE_ADDRESS. It returns a nonzero value if XINSN is a legitimate address for a ! memory operand of the indicated MODE. STRICT is non-zero if this function is called during reload. */ int --- 1464,1470 ---- /* This function is used to implement GO_IF_LEGITIMATE_ADDRESS. It returns a nonzero value if XINSN is a legitimate address for a ! memory operand of the indicated MODE. STRICT is nonzero if this function is called during reload. */ int *************** m16_usym8_4 (op, mode) *** 1577,1587 **** { if (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FLAG (op) ! && current_frame_info.insns_len > 0 && XSTR (op, 0)[0] == '*' && strncmp (XSTR (op, 0) + 1, LOCAL_LABEL_PREFIX, sizeof LOCAL_LABEL_PREFIX - 1) == 0 ! && (current_frame_info.insns_len + get_pool_size () + mips_string_length < 4 * 0x100)) { struct string_constant *l; --- 1746,1756 ---- { if (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FLAG (op) ! && cfun->machine->insns_len > 0 && XSTR (op, 0)[0] == '*' && strncmp (XSTR (op, 0) + 1, LOCAL_LABEL_PREFIX, sizeof LOCAL_LABEL_PREFIX - 1) == 0 ! && (cfun->machine->insns_len + get_pool_size () + mips_string_length < 4 * 0x100)) { struct string_constant *l; *************** m16_usym5_4 (op, mode) *** 1604,1614 **** { if (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FLAG (op) ! && current_frame_info.insns_len > 0 && XSTR (op, 0)[0] == '*' && strncmp (XSTR (op, 0) + 1, LOCAL_LABEL_PREFIX, sizeof LOCAL_LABEL_PREFIX - 1) == 0 ! && (current_frame_info.insns_len + get_pool_size () + mips_string_length < 4 * 0x20)) { struct string_constant *l; --- 1773,1783 ---- { if (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FLAG (op) ! && cfun->machine->insns_len > 0 && XSTR (op, 0)[0] == '*' && strncmp (XSTR (op, 0) + 1, LOCAL_LABEL_PREFIX, sizeof LOCAL_LABEL_PREFIX - 1) == 0 ! && (cfun->machine->insns_len + get_pool_size () + mips_string_length < 4 * 0x20)) { struct string_constant *l; *************** mips_count_memory_refs (op, num) *** 1828,1846 **** } ! /* Return RTL for the offset from the current function to the argument. ! ! ??? Which argument is this? */ rtx ! embedded_pic_offset (x) ! rtx x; { ! if (embedded_pic_fnaddr_rtx == NULL) { rtx seq; ! embedded_pic_fnaddr_rtx = gen_reg_rtx (Pmode); /* Output code at function start to initialize the pseudo-reg. */ /* ??? We used to do this in FINALIZE_PIC, but that does not work for --- 1997,2014 ---- } ! /* Return a pseudo that points to the address of the current function. ! The first time it is called for a function, an initializer for the ! pseudo is emitted in the beginning of the function. */ rtx ! embedded_pic_fnaddr_reg () { ! if (cfun->machine->embedded_pic_fnaddr_rtx == NULL) { rtx seq; ! cfun->machine->embedded_pic_fnaddr_rtx = gen_reg_rtx (Pmode); /* Output code at function start to initialize the pseudo-reg. */ /* ??? We used to do this in FINALIZE_PIC, but that does not work for *************** embedded_pic_offset (x) *** 1851,1865 **** initialize this value every time a function is inlined into another function. */ start_sequence (); ! emit_insn (gen_get_fnaddr (embedded_pic_fnaddr_rtx, XEXP (DECL_RTL (current_function_decl), 0))); ! seq = gen_sequence (); end_sequence (); push_topmost_sequence (); emit_insn_after (seq, get_insns ()); pop_topmost_sequence (); } return gen_rtx_CONST (Pmode, gen_rtx_MINUS (Pmode, x, --- 2019,2046 ---- initialize this value every time a function is inlined into another function. */ start_sequence (); ! emit_insn (gen_get_fnaddr (cfun->machine->embedded_pic_fnaddr_rtx, XEXP (DECL_RTL (current_function_decl), 0))); ! seq = get_insns (); end_sequence (); push_topmost_sequence (); emit_insn_after (seq, get_insns ()); pop_topmost_sequence (); } + return cfun->machine->embedded_pic_fnaddr_rtx; + } + + /* Return RTL for the offset from the current function to the argument. + X is the symbol whose offset from the current function we want. */ + + rtx + embedded_pic_offset (x) + rtx x; + { + /* Make sure it is emitted. */ + embedded_pic_fnaddr_reg (); + return gen_rtx_CONST (Pmode, gen_rtx_MINUS (Pmode, x, *************** mips_move_1word (operands, insn, unsigne *** 1943,1949 **** --- 2124,2136 ---- delay = DELAY_LOAD; if (FP_REG_P (regno1)) ret = "mfc1\t%0,%1"; + else if (ALL_COP_REG_P (regno1)) + { + static char retval[] = "mfc_\t%0,%1"; + retval[3] = COPNUM_AS_CHAR_FROM_REGNUM (regno1); + ret = retval; + } else if (regno1 == FPSW_REGNUM && ! ISA_HAS_8CC) ret = "cfc1\t%0,$31"; } *************** mips_move_1word (operands, insn, unsigne *** 1979,1984 **** --- 2166,2186 ---- ret = "ctc1\t%0,$31"; } } + else if (ALL_COP_REG_P (regno0)) + { + if (GP_REG_P (regno1)) + { + static char retval[] = "mtc_\t%1,%0"; + char cop = COPNUM_AS_CHAR_FROM_REGNUM (regno0); + + if (cop == '0') + abort_with_insn (insn, + "mtc0 not supported; it disturbs virtual address translation"); + delay = DELAY_LOAD; + retval[3] = cop; + ret = retval; + } + } } else if (code1 == MEM) *************** mips_move_1word (operands, insn, unsigne *** 2017,2022 **** --- 2219,2237 ---- else if (FP_REG_P (regno0) && (mode == SImode || mode == SFmode)) ret = "l.s\t%0,%1"; + else if (ALL_COP_REG_P (regno0)) + { + static char retval[] = "lwc_\t%0,%1"; + char cop = COPNUM_AS_CHAR_FROM_REGNUM (regno0); + + if (cop == '0') + abort_with_insn (insn, + "loads from memory to COP0 are illegal"); + delay = DELAY_LOAD; + retval[3] = cop; + ret = retval; + } + if (ret != (char *)0 && MEM_VOLATILE_P (op1)) { size_t i = strlen (ret); *************** mips_move_1word (operands, insn, unsigne *** 2105,2150 **** else if (code1 == SYMBOL_REF || code1 == CONST) { ! if (HALF_PIC_P () && CONSTANT_P (op1) && HALF_PIC_ADDRESS_P (op1)) ! { ! rtx offset = const0_rtx; ! ! if (GET_CODE (op1) == CONST) ! op1 = eliminate_constant_term (XEXP (op1, 0), &offset); ! ! if (GET_CODE (op1) == SYMBOL_REF) ! { ! operands[2] = HALF_PIC_PTR (op1); ! ! if (TARGET_STATS) ! mips_count_memory_refs (operands[2], 1); ! ! if (INTVAL (offset) == 0) ! { ! delay = DELAY_LOAD; ! ret = (unsignedp && TARGET_64BIT ! ? "lwu\t%0,%2" ! : "lw\t%0,%2"); ! } ! else ! { ! dslots_load_total++; ! operands[3] = offset; ! if (unsignedp && TARGET_64BIT) ! ret = (SMALL_INT (offset) ! ? "lwu\t%0,%2%#\n\tadd\t%0,%0,%3" ! : "lwu\t%0,%2%#\n\t%[li\t%@,%3\n\tadd\t%0,%0,%@%]"); ! else ! ret = (SMALL_INT (offset) ! ? "lw\t%0,%2%#\n\tadd\t%0,%0,%3" ! : "lw\t%0,%2%#\n\t%[li\t%@,%3\n\tadd\t%0,%0,%@%]"); ! } ! } ! } ! else if (TARGET_MIPS16 ! && code1 == CONST ! && GET_CODE (XEXP (op1, 0)) == REG ! && REGNO (XEXP (op1, 0)) == GP_REG_FIRST + 28) { /* This case arises on the mips16; see mips16_gp_pseudo_reg. */ --- 2320,2329 ---- else if (code1 == SYMBOL_REF || code1 == CONST) { ! if (TARGET_MIPS16 ! && code1 == CONST ! && GET_CODE (XEXP (op1, 0)) == REG ! && REGNO (XEXP (op1, 0)) == GP_REG_FIRST + 28) { /* This case arises on the mips16; see mips16_gp_pseudo_reg. */ *************** mips_move_1word (operands, insn, unsigne *** 2215,2220 **** --- 2394,2406 ---- else if (FP_REG_P (regno1) && (mode == SImode || mode == SFmode)) ret = "s.s\t%1,%0"; + else if (ALL_COP_REG_P (regno1)) + { + static char retval[] = "swc_\t%1,%0"; + + retval[3] = COPNUM_AS_CHAR_FROM_REGNUM (regno1); + ret = retval; + } } else if (code1 == CONST_INT && INTVAL (op1) == 0) *************** mips_move_1word (operands, insn, unsigne *** 2264,2270 **** --- 2450,2506 ---- return ret; } + + /* Return instructions to restore the global pointer from the stack, + assuming TARGET_ABICALLS. Used by exception_receiver to set up + the GP for exception handlers. + + OPERANDS is an array of operands whose contents are undefined + on entry. INSN is the exception_handler instruction. */ + + const char * + mips_restore_gp (operands, insn) + rtx *operands, insn; + { + rtx loc; + operands[0] = pic_offset_table_rtx; + if (frame_pointer_needed) + loc = hard_frame_pointer_rtx; + else + loc = stack_pointer_rtx; + loc = plus_constant (loc, cfun->machine->frame.args_size); + operands[1] = gen_rtx_MEM (Pmode, loc); + + return mips_move_1word (operands, insn, 0); + } + + /* Return an instruction to sign-extend SImode value SRC and store it + in DImode value DEST. INSN is the original extendsidi2-type insn. */ + + const char * + mips_sign_extend (insn, dest, src) + rtx insn, dest, src; + { + rtx operands[MAX_RECOG_OPERANDS]; + + if ((register_operand (src, SImode) && FP_REG_P (true_regnum (src))) + || memory_operand (src, SImode)) + { + /* If the source is a floating-point register, we need to use a + 32-bit move, since the float register is not kept sign-extended. + If the source is in memory, we need a 32-bit load. */ + operands[0] = gen_lowpart_SUBREG (SImode, dest); + operands[1] = src; + return mips_move_1word (operands, insn, false); + } + else + { + operands[0] = dest; + operands[1] = src; + return mips_move_2words (operands, insn); + } + } /* Return the appropriate instructions to move 2 words */ *************** mips_move_2words (operands, insn) *** 2282,2287 **** --- 2518,2526 ---- int subreg_offset1 = 0; enum delay_type delay = DELAY_NONE; + if (code1 == SIGN_EXTEND) + return mips_sign_extend (insn, op0, XEXP (op1, 0)); + while (code0 == SUBREG) { subreg_offset0 += subreg_regno_offset (REGNO (SUBREG_REG (op0)), *************** mips_move_2words (operands, insn) *** 2292,2303 **** code0 = GET_CODE (op0); } - if (code1 == SIGN_EXTEND) - { - op1 = XEXP (op1, 0); - code1 = GET_CODE (op1); - } - while (code1 == SUBREG) { subreg_offset1 += subreg_regno_offset (REGNO (SUBREG_REG (op1)), --- 2531,2536 ---- *************** mips_move_2words (operands, insn) *** 2308,2324 **** code1 = GET_CODE (op1); } - /* Sanity check. */ - if (GET_CODE (operands[1]) == SIGN_EXTEND - && code1 != REG - && code1 != CONST_INT - /* The following three can happen as the result of a questionable - cast. */ - && code1 != LABEL_REF - && code1 != SYMBOL_REF - && code1 != CONST) - abort (); - if (code0 == REG) { int regno0 = REGNO (op0) + subreg_offset0; --- 2541,2546 ---- *************** mips_move_2words (operands, insn) *** 2401,2407 **** --- 2623,2650 ---- else ret = "mfhi\t%M0\n\tmflo\t%L0"; } + else if (GP_REG_P (regno0) && ALL_COP_REG_P (regno1) + && TARGET_64BIT) + { + static char retval[] = "dmfc_\t%0,%1"; + + delay = DELAY_LOAD; + retval[4] = COPNUM_AS_CHAR_FROM_REGNUM (regno1); + ret = retval; + } + else if (ALL_COP_REG_P (regno0) && GP_REG_P (regno1) + && TARGET_64BIT) + { + static char retval[] = "dmtc_\t%1,%0"; + char cop = COPNUM_AS_CHAR_FROM_REGNUM (regno0); + if (cop == '0') + abort_with_insn (insn, + "dmtc0 not supported; it disturbs virtual address translation"); + delay = DELAY_LOAD; + retval[4] = cop; + ret = retval; + } else if (TARGET_64BIT) ret = "move\t%0,%1"; *************** mips_move_2words (operands, insn) *** 2582,2587 **** --- 2825,2843 ---- if (FP_REG_P (regno0)) ret = "l.d\t%0,%1"; + else if (ALL_COP_REG_P (regno0) && TARGET_64BIT) + { + static char retval[] = "ldc_\t%0,%1"; + char cop = COPNUM_AS_CHAR_FROM_REGNUM (regno0); + + if (cop == '0') + abort_with_insn (insn, + "loads from memory to COP0 are illegal"); + delay = DELAY_LOAD; + retval[3] = cop; + ret = retval; + } + else if (TARGET_64BIT) { *************** mips_move_2words (operands, insn) *** 2675,2680 **** --- 2931,2943 ---- if (FP_REG_P (regno1)) ret = "s.d\t%1,%0"; + else if (ALL_COP_REG_P (regno1) && TARGET_64BIT) + { + static char retval[] = "sdc_\t%1,%0"; + + retval[3] = COPNUM_AS_CHAR_FROM_REGNUM (regno1); + ret = retval; + } else if (TARGET_64BIT) { *************** map_test_to_internal_test (test_code) *** 2849,2855 **** ??? This is called with result nonzero by the Scond patterns in mips.md. These patterns are called with a target in the mode of the Scond instruction pattern. Since this must be a constant, we ! must use SImode. This means that if RESULT is non-zero, it will always be an SImode register, even if TARGET_64BIT is true. We cope with this by calling convert_move rather than emit_move_insn. This will sometimes lead to an unnecessary extension of the result; --- 3112,3118 ---- ??? This is called with result nonzero by the Scond patterns in mips.md. These patterns are called with a target in the mode of the Scond instruction pattern. Since this must be a constant, we ! must use SImode. This means that if RESULT is nonzero, it will always be an SImode register, even if TARGET_64BIT is true. We cope with this by calling convert_move rather than emit_move_insn. This will sometimes lead to an unnecessary extension of the result; *************** gen_int_relational (test_code, result, c *** 2884,2890 **** int unsignedp; /* != 0 for unsigned comparisons. */ }; ! static struct cmp_info info[ (int)ITEST_MAX ] = { { XOR, 0, 65535, 0, 0, 0, 0, 0 }, /* EQ */ { XOR, 0, 65535, 0, 0, 1, 1, 0 }, /* NE */ --- 3147,3153 ---- int unsignedp; /* != 0 for unsigned comparisons. */ }; ! static const struct cmp_info info[ (int)ITEST_MAX ] = { { XOR, 0, 65535, 0, 0, 0, 0, 0 }, /* EQ */ { XOR, 0, 65535, 0, 0, 1, 1, 0 }, /* NE */ *************** gen_int_relational (test_code, result, c *** 2900,2906 **** enum internal_test test; enum machine_mode mode; ! struct cmp_info *p_info; int branch_p; int eqne_p; int invert; --- 3163,3169 ---- enum internal_test test; enum machine_mode mode; ! const struct cmp_info *p_info; int branch_p; int eqne_p; int invert; *************** gen_int_relational (test_code, result, c *** 3059,3064 **** --- 3322,3355 ---- return result; } + /* Work out how to check a floating-point condition. We need a + separate comparison instruction (C.cond.fmt), followed by a + branch or conditional move. Given that IN_CODE is the + required condition, set *CMP_CODE to the C.cond.fmt code + and *action_code to the branch or move code. */ + + static void + get_float_compare_codes (in_code, cmp_code, action_code) + enum rtx_code in_code, *cmp_code, *action_code; + { + switch (in_code) + { + case NE: + case UNGE: + case UNGT: + case LTGT: + case ORDERED: + *cmp_code = reverse_condition_maybe_unordered (in_code); + *action_code = EQ; + break; + + default: + *cmp_code = in_code; + *action_code = NE; + break; + } + } + /* Emit the common code for doing conditional branches. operand[0] is the label to jump to. The comparison operands are saved away by cmp{si,di,sf,df}. */ *************** gen_conditional_branch (operands, test_c *** 3072,3077 **** --- 3363,3369 ---- rtx cmp0 = branch_cmp[0]; rtx cmp1 = branch_cmp[1]; enum machine_mode mode; + enum rtx_code cmp_code; rtx reg; int invert; rtx label1, label2; *************** gen_conditional_branch (operands, test_c *** 3091,3097 **** test_code = NE; } else if (GET_CODE (cmp1) == CONST_INT && INTVAL (cmp1) != 0) ! /* We don't want to build a comparison against a non-zero constant. */ cmp1 = force_reg (mode, cmp1); --- 3383,3389 ---- test_code = NE; } else if (GET_CODE (cmp1) == CONST_INT && INTVAL (cmp1) != 0) ! /* We don't want to build a comparison against a nonzero constant. */ cmp1 = force_reg (mode, cmp1); *************** gen_conditional_branch (operands, test_c *** 3104,3118 **** else reg = gen_reg_rtx (CCmode); ! /* For cmp0 != cmp1, build cmp0 == cmp1, and test for result == ! 0 in the instruction built below. The MIPS FPU handles ! inequality testing by testing for equality and looking for a ! false result. */ emit_insn (gen_rtx_SET (VOIDmode, reg, ! gen_rtx (test_code == NE ? EQ : test_code, ! CCmode, cmp0, cmp1))); - test_code = test_code == NE ? EQ : NE; mode = CCmode; cmp0 = reg; cmp1 = const0_rtx; --- 3396,3405 ---- else reg = gen_reg_rtx (CCmode); ! get_float_compare_codes (test_code, &cmp_code, &test_code); emit_insn (gen_rtx_SET (VOIDmode, reg, ! gen_rtx (cmp_code, CCmode, cmp0, cmp1))); mode = CCmode; cmp0 = reg; cmp1 = const0_rtx; *************** gen_conditional_move (operands) *** 3206,3213 **** abort (); } } ! else if (cmp_code == NE) ! cmp_code = EQ, move_code = EQ; if (mode == SImode || mode == DImode) cmp_mode = mode; --- 3493,3500 ---- abort (); } } ! else ! get_float_compare_codes (cmp_code, &cmp_code, &move_code); if (mode == SImode || mode == DImode) cmp_mode = mode; *************** mips_gen_conditional_trap (operands) *** 3267,3273 **** gen_rtx (cmp_code, GET_MODE (operands[0]), op0, op1), operands[1])); } ! /* Return true if operand OP is a condition code register. Only for use during or after reload. */ --- 3554,3560 ---- gen_rtx (cmp_code, GET_MODE (operands[0]), op0, op1), operands[1])); } ! /* Return true if operand OP is a condition code register. Only for use during or after reload. */ *************** mips_emit_fcc_reload (dest, src, scratch *** 3313,3318 **** --- 3600,3635 ---- emit_insn (gen_slt_sf (dest, fp2, fp1)); } + /* Emit code to change the current function's return address to + ADDRESS. SCRATCH is available as a scratch register, if needed. + ADDRESS and SCRATCH are both word-mode GPRs. */ + + void + mips_set_return_address (address, scratch) + rtx address, scratch; + { + HOST_WIDE_INT gp_offset; + + compute_frame_size (get_frame_size ()); + if (((cfun->machine->frame.mask >> 31) & 1) == 0) + abort (); + gp_offset = cfun->machine->frame.gp_sp_offset; + + /* Reduce SP + GP_OFSET to a legitimate address and put it in SCRATCH. */ + if (gp_offset < 32768) + scratch = plus_constant (stack_pointer_rtx, gp_offset); + else + { + emit_move_insn (scratch, GEN_INT (gp_offset)); + if (Pmode == DImode) + emit_insn (gen_adddi3 (scratch, scratch, stack_pointer_rtx)); + else + emit_insn (gen_addsi3 (scratch, scratch, stack_pointer_rtx)); + } + + emit_move_insn (gen_rtx_MEM (GET_MODE (address), scratch), address); + } + /* Write a loop to move a constant number of bytes. Generate load/stores as follows: *************** output_block_move (insn, operands, num_r *** 3711,3717 **** } /* ??? Fails because of a MIPS assembler bug? */ ! else if (TARGET_64BIT && bytes >= 8 && ! TARGET_MIPS16) { if (BYTES_BIG_ENDIAN) { --- 4028,4036 ---- } /* ??? Fails because of a MIPS assembler bug? */ ! else if (TARGET_64BIT && bytes >= 8 ! && ! TARGET_SR71K ! && ! TARGET_MIPS16) { if (BYTES_BIG_ENDIAN) { *************** output_block_move (insn, operands, num_r *** 3748,3754 **** bytes -= 4; } ! else if (bytes >= 4 && ! TARGET_MIPS16) { if (BYTES_BIG_ENDIAN) { --- 4067,4075 ---- bytes -= 4; } ! else if (bytes >= 4 ! && ! TARGET_SR71K ! && ! TARGET_MIPS16) { if (BYTES_BIG_ENDIAN) { *************** init_cumulative_args (cum, fntype, libna *** 3944,3949 **** --- 4265,4369 ---- } } + static void + mips_arg_info (cum, mode, type, named, info) + const CUMULATIVE_ARGS *cum; + enum machine_mode mode; + tree type; + int named; + struct mips_arg_info *info; + { + bool even_reg_p; + unsigned int num_words, max_regs; + + info->struct_p = (type != 0 + && (TREE_CODE (type) == RECORD_TYPE + || TREE_CODE (type) == UNION_TYPE + || TREE_CODE (type) == QUAL_UNION_TYPE)); + + /* Decide whether this argument should go in a floating-point register, + assuming one is free. Later code checks for availablity. */ + + info->fpr_p = false; + if (GET_MODE_CLASS (mode) == MODE_FLOAT + && GET_MODE_SIZE (mode) <= UNITS_PER_FPVALUE) + { + switch (mips_abi) + { + case ABI_32: + case ABI_O64: + info->fpr_p = (!cum->gp_reg_found && cum->arg_number < 2); + break; + + case ABI_EABI: + info->fpr_p = true; + break; + + case ABI_MEABI: + /* The MIPS eabi says only structures containing doubles get + passed in a fp register, so force a structure containing + a float to be passed in the integer registers. */ + info->fpr_p = (named && !(mode == SFmode && info->struct_p)); + break; + + default: + info->fpr_p = named; + break; + } + } + + /* Now decide whether the argument must go in an even-numbered register. */ + + even_reg_p = false; + if (info->fpr_p) + { + /* Under the O64 ABI, the second float argument goes in $f13 if it + is a double, but $f14 if it is a single. Otherwise, on a + 32-bit double-float machine, each FP argument must start in a + new register pair. */ + even_reg_p = (GET_MODE_SIZE (mode) > UNITS_PER_HWFPVALUE + || (mips_abi == ABI_O64 && mode == SFmode) + || FP_INC > 1); + } + else if (!TARGET_64BIT || LONG_DOUBLE_TYPE_SIZE == 128) + { + if (GET_MODE_CLASS (mode) == MODE_INT + || GET_MODE_CLASS (mode) == MODE_FLOAT) + even_reg_p = (GET_MODE_SIZE (mode) > UNITS_PER_WORD); + + else if (type != NULL_TREE && TYPE_ALIGN (type) > BITS_PER_WORD) + even_reg_p = true; + } + + /* Set REG_OFFSET to the register count we're interested in. + The EABI allocates the floating-point registers separately, + but the other ABIs allocate them like integer registers. */ + info->reg_offset = (mips_abi == ABI_EABI && info->fpr_p + ? cum->num_fprs + : cum->num_gprs); + + if (even_reg_p) + info->reg_offset += info->reg_offset & 1; + + /* The alignment applied to registers is also applied to stack arguments. */ + info->stack_offset = cum->stack_words; + if (even_reg_p) + info->stack_offset += info->stack_offset & 1; + + if (mode == BLKmode) + info->num_bytes = int_size_in_bytes (type); + else + info->num_bytes = GET_MODE_SIZE (mode); + + num_words = (info->num_bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + max_regs = MAX_ARGS_IN_REGISTERS - info->reg_offset; + + /* Partition the argument between registers and stack. */ + info->reg_words = MIN (num_words, max_regs); + info->stack_words = num_words - info->reg_words; + } + + /* Advance the argument to the next argument position. */ void *************** function_arg_advance (cum, mode, type, n *** 3953,4021 **** tree type; /* type of the argument or 0 if lib support */ int named; /* whether or not the argument was named */ { ! if (TARGET_DEBUG_E_MODE) ! { ! fprintf (stderr, ! "function_adv({gp reg found = %d, arg # = %2d, words = %2d}, %4s, ", ! cum->gp_reg_found, cum->arg_number, cum->arg_words, ! GET_MODE_NAME (mode)); ! fprintf (stderr, HOST_PTR_PRINTF, (const PTR) type); ! fprintf (stderr, ", %d )\n\n", named); ! } ! cum->arg_number++; ! switch (mode) ! { ! case VOIDmode: ! break; ! default: ! if (GET_MODE_CLASS (mode) != MODE_COMPLEX_INT ! && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT) ! abort (); ! cum->gp_reg_found = 1; ! cum->arg_words += ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) ! / UNITS_PER_WORD); ! break; ! case BLKmode: ! cum->gp_reg_found = 1; ! cum->arg_words += ((int_size_in_bytes (type) + UNITS_PER_WORD - 1) ! / UNITS_PER_WORD); ! break; ! case SFmode: ! if (mips_abi == ABI_EABI && ! TARGET_SOFT_FLOAT) ! cum->fp_arg_words++; else ! cum->arg_words++; ! if (! cum->gp_reg_found && cum->arg_number <= 2) ! cum->fp_code += 1 << ((cum->arg_number - 1) * 2); ! break; ! case DFmode: ! if (mips_abi == ABI_EABI && ! TARGET_SOFT_FLOAT && ! TARGET_SINGLE_FLOAT) ! cum->fp_arg_words += (TARGET_64BIT ? 1 : 2); ! else ! cum->arg_words += (TARGET_64BIT ? 1 : 2); ! if (! cum->gp_reg_found && ! TARGET_SINGLE_FLOAT && cum->arg_number <= 2) ! cum->fp_code += 2 << ((cum->arg_number - 1) * 2); ! break; ! case DImode: ! case TImode: ! cum->gp_reg_found = 1; ! cum->arg_words += (TARGET_64BIT ? 1 : 2); ! break; ! case QImode: ! case HImode: ! case SImode: ! cum->gp_reg_found = 1; ! cum->arg_words++; ! break; ! } } /* Return an RTL expression containing the register for the given mode, --- 4373,4431 ---- tree type; /* type of the argument or 0 if lib support */ int named; /* whether or not the argument was named */ { ! struct mips_arg_info info; ! mips_arg_info (cum, mode, type, named, &info); ! /* The following is a hack in order to pass 1 byte structures ! the same way that the MIPS compiler does (namely by passing ! the structure in the high byte or half word of the register). ! This also makes varargs work. If we have such a structure, ! we save the adjustment RTL, and the call define expands will ! emit them. For the VOIDmode argument (argument after the ! last real argument), pass back a parallel vector holding each ! of the adjustments. */ ! /* ??? This scheme requires everything smaller than the word size to ! shifted to the left, but when TARGET_64BIT and ! TARGET_INT64, ! that would mean every int needs to be shifted left, which is very ! inefficient. Let's not carry this compatibility to the 64 bit ! calling convention for now. */ ! if (info.struct_p ! && info.reg_words == 1 ! && info.num_bytes < UNITS_PER_WORD ! && !TARGET_64BIT ! && mips_abi != ABI_EABI ! && mips_abi != ABI_MEABI) ! { ! rtx amount = GEN_INT (BITS_PER_WORD - info.num_bytes * BITS_PER_UNIT); ! rtx reg = gen_rtx_REG (word_mode, GP_ARG_FIRST + info.reg_offset); ! if (TARGET_64BIT) ! cum->adjust[cum->num_adjusts++] = PATTERN (gen_ashldi3 (reg, reg, amount)); else ! cum->adjust[cum->num_adjusts++] = PATTERN (gen_ashlsi3 (reg, reg, amount)); ! } ! if (!info.fpr_p) ! cum->gp_reg_found = true; ! /* See the comment above the cumulative args structure in mips.h ! for an explanation of what this code does. It assumes the O32 ! ABI, which passes at most 2 arguments in float registers. */ ! if (cum->arg_number < 2 && info.fpr_p) ! cum->fp_code += (mode == SFmode ? 1 : 2) << ((cum->arg_number - 1) * 2); ! if (mips_abi != ABI_EABI || !info.fpr_p) ! cum->num_gprs = info.reg_offset + info.reg_words; ! else if (info.reg_words > 0) ! cum->num_fprs += FP_INC; ! ! if (info.stack_words > 0) ! cum->stack_words = info.stack_offset + info.stack_words; ! ! cum->arg_number++; } /* Return an RTL expression containing the register for the given mode, *************** function_arg_advance (cum, mode, type, n *** 4023,4351 **** struct rtx_def * function_arg (cum, mode, type, named) ! CUMULATIVE_ARGS *cum; /* current arg information */ enum machine_mode mode; /* current arg mode */ tree type; /* type of the argument or 0 if lib support */ int named; /* != 0 for normal args, == 0 for ... args */ { ! rtx ret; ! int regbase = -1; ! int bias = 0; ! unsigned int *arg_words = &cum->arg_words; ! int struct_p = (type != 0 ! && (TREE_CODE (type) == RECORD_TYPE ! || TREE_CODE (type) == UNION_TYPE ! || TREE_CODE (type) == QUAL_UNION_TYPE)); ! ! if (TARGET_DEBUG_E_MODE) ! { ! fprintf (stderr, ! "function_arg( {gp reg found = %d, arg # = %2d, words = %2d}, %4s, ", ! cum->gp_reg_found, cum->arg_number, cum->arg_words, ! GET_MODE_NAME (mode)); ! fprintf (stderr, HOST_PTR_PRINTF, (const PTR) type); ! fprintf (stderr, ", %d ) = ", named); ! } ! ! cum->last_arg_fp = 0; ! switch (mode) { ! case SFmode: ! if (mips_abi == ABI_32 || mips_abi == ABI_O64) ! { ! if (cum->gp_reg_found || cum->arg_number >= 2 || TARGET_SOFT_FLOAT) ! regbase = GP_ARG_FIRST; ! else ! { ! regbase = FP_ARG_FIRST; ! ! /* If the first arg was a float in a floating point register, ! then set bias to align this float arg properly. */ ! if (cum->arg_words == 1) ! bias = 1; ! } ! } ! else if (mips_abi == ABI_EABI && ! TARGET_SOFT_FLOAT) ! { ! if (! TARGET_64BIT) ! cum->fp_arg_words += cum->fp_arg_words & 1; ! cum->last_arg_fp = 1; ! arg_words = &cum->fp_arg_words; ! regbase = FP_ARG_FIRST; ! } ! /* The MIPS eabi says only structures containing doubles get passed in a ! fp register, so force a structure containing a float to be passed in ! the integer registers. */ ! else if (mips_abi == ABI_MEABI && struct_p) ! regbase = GP_ARG_FIRST; ! else ! regbase = (TARGET_SOFT_FLOAT || ! named ? GP_ARG_FIRST : FP_ARG_FIRST); ! break; ! case DFmode: ! if (! TARGET_64BIT) ! { ! if (mips_abi == ABI_EABI ! && ! TARGET_SOFT_FLOAT && ! TARGET_SINGLE_FLOAT) ! cum->fp_arg_words += cum->fp_arg_words & 1; ! else ! cum->arg_words += cum->arg_words & 1; ! } - if (mips_abi == ABI_32 || mips_abi == ABI_O64) - regbase = ((cum->gp_reg_found - || TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT - || cum->arg_number >= 2) - ? GP_ARG_FIRST : FP_ARG_FIRST); - else if (mips_abi == ABI_EABI - && ! TARGET_SOFT_FLOAT && ! TARGET_SINGLE_FLOAT) - { - cum->last_arg_fp = 1; - arg_words = &cum->fp_arg_words; - regbase = FP_ARG_FIRST; - } else ! regbase = (TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT || ! named ! ? GP_ARG_FIRST : FP_ARG_FIRST); ! break; ! ! default: ! if (GET_MODE_CLASS (mode) != MODE_COMPLEX_INT ! && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT) ! abort (); ! ! /* Drops through. */ ! case BLKmode: ! if (type != NULL_TREE && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD ! && ! TARGET_64BIT && mips_abi != ABI_EABI) ! cum->arg_words += (cum->arg_words & 1); ! regbase = GP_ARG_FIRST; ! break; ! ! case VOIDmode: ! case QImode: ! case HImode: ! case SImode: ! regbase = GP_ARG_FIRST; ! break; ! ! case DImode: ! case TImode: ! if (! TARGET_64BIT) ! cum->arg_words += (cum->arg_words & 1); ! regbase = GP_ARG_FIRST; } ! if (*arg_words >= (unsigned) MAX_ARGS_IN_REGISTERS) ! { ! if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "%s\n", struct_p ? ", [struct]" : ""); ! ret = 0; ! } ! else { ! if (regbase == -1) ! abort (); ! if (! type || TREE_CODE (type) != RECORD_TYPE ! || mips_abi == ABI_32 || mips_abi == ABI_EABI ! || mips_abi == ABI_O64 || mips_abi == ABI_MEABI ! || ! named ! || ! TYPE_SIZE_UNIT (type) ! || ! host_integerp (TYPE_SIZE_UNIT (type), 1)) ! { ! unsigned int arg_reg = (regbase + *arg_words + bias); ! ret = gen_rtx_REG (mode, arg_reg); ! if (mips_abi == ABI_MEABI ! && regbase == FP_ARG_FIRST ! && ! cum->prototype) ! { ! /* To make K&R varargs work we need to pass floating ! point arguments in both integer and FP registers. */ ! ret = gen_rtx_PARALLEL (mode, ! gen_rtvec (2, ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (mode, ! arg_reg + GP_ARG_FIRST - FP_ARG_FIRST), ! const0_rtx), gen_rtx_EXPR_LIST (VOIDmode, ret, const0_rtx))); ! } ! } ! else { ! /* The Irix 6 n32/n64 ABIs say that if any 64 bit chunk of the ! structure contains a double in its entirety, then that 64 bit ! chunk is passed in a floating point register. */ ! tree field; ! /* First check to see if there is any such field. */ ! for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field)) ! if (TREE_CODE (field) == FIELD_DECL ! && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE ! && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD ! && host_integerp (bit_position (field), 0) ! && int_bit_position (field) % BITS_PER_WORD == 0) ! break; ! /* If the whole struct fits a DFmode register, ! we don't need the PARALLEL. */ ! if (! field || mode == DFmode) ! ret = gen_rtx_REG (mode, regbase + *arg_words + bias); ! else { ! /* Now handle the special case by returning a PARALLEL ! indicating where each 64 bit chunk goes. */ ! unsigned int chunks; ! HOST_WIDE_INT bitpos; ! unsigned int regno; ! unsigned int i; ! ! /* ??? If this is a packed structure, then the last hunk won't ! be 64 bits. */ ! ! chunks ! = tree_low_cst (TYPE_SIZE_UNIT (type), 1) / UNITS_PER_WORD; ! if (chunks + *arg_words + bias > (unsigned) MAX_ARGS_IN_REGISTERS) ! chunks = MAX_ARGS_IN_REGISTERS - *arg_words - bias; ! ! /* assign_parms checks the mode of ENTRY_PARM, so we must ! use the actual mode here. */ ! ret = gen_rtx_PARALLEL (mode, rtvec_alloc (chunks)); ! ! bitpos = 0; ! regno = regbase + *arg_words + bias; ! field = TYPE_FIELDS (type); ! for (i = 0; i < chunks; i++) ! { ! rtx reg; ! for (; field; field = TREE_CHAIN (field)) ! if (TREE_CODE (field) == FIELD_DECL ! && int_bit_position (field) >= bitpos) ! break; ! if (field ! && int_bit_position (field) == bitpos ! && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE ! && !TARGET_SOFT_FLOAT ! && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD) ! reg = gen_rtx_REG (DFmode, ! regno + FP_ARG_FIRST - GP_ARG_FIRST); ! else ! reg = gen_rtx_REG (word_mode, regno); ! XVECEXP (ret, 0, i) ! = gen_rtx_EXPR_LIST (VOIDmode, reg, ! GEN_INT (bitpos / BITS_PER_UNIT)); ! bitpos += 64; ! regno++; ! } } ! } ! ! if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "%s%s\n", reg_names[regbase + *arg_words + bias], ! struct_p ? ", [struct]" : ""); ! ! /* The following is a hack in order to pass 1 byte structures ! the same way that the MIPS compiler does (namely by passing ! the structure in the high byte or half word of the register). ! This also makes varargs work. If we have such a structure, ! we save the adjustment RTL, and the call define expands will ! emit them. For the VOIDmode argument (argument after the ! last real argument), pass back a parallel vector holding each ! of the adjustments. */ ! ! /* ??? function_arg can be called more than once for each argument. ! As a result, we compute more adjustments than we need here. ! See the CUMULATIVE_ARGS definition in mips.h. */ ! ! /* ??? This scheme requires everything smaller than the word size to ! shifted to the left, but when TARGET_64BIT and ! TARGET_INT64, ! that would mean every int needs to be shifted left, which is very ! inefficient. Let's not carry this compatibility to the 64 bit ! calling convention for now. */ ! ! if (struct_p && int_size_in_bytes (type) < UNITS_PER_WORD ! && ! TARGET_64BIT ! && mips_abi != ABI_EABI ! && mips_abi != ABI_MEABI) ! { ! rtx amount = GEN_INT (BITS_PER_WORD ! - int_size_in_bytes (type) * BITS_PER_UNIT); ! rtx reg = gen_rtx_REG (word_mode, regbase + *arg_words + bias); ! ! if (TARGET_64BIT) ! cum->adjust[cum->num_adjusts++] = gen_ashldi3 (reg, reg, amount); ! else ! cum->adjust[cum->num_adjusts++] = gen_ashlsi3 (reg, reg, amount); } } ! /* We will be called with a mode of VOIDmode after the last argument ! has been seen. Whatever we return will be passed to the call ! insn. If we need any shifts for small structures, return them in ! a PARALLEL; in that case, stuff the mips16 fp_code in as the ! mode. Otherwise, if we have need a mips16 fp_code, return a REG ! with the code stored as the mode. */ ! if (mode == VOIDmode) { ! if (cum->num_adjusts > 0) ! ret = gen_rtx (PARALLEL, (enum machine_mode) cum->fp_code, ! gen_rtvec_v (cum->num_adjusts, cum->adjust)); ! else if (TARGET_MIPS16 && cum->fp_code != 0) ! ret = gen_rtx (REG, (enum machine_mode) cum->fp_code, 0); } ! return ret; } int function_arg_partial_nregs (cum, mode, type, named) ! CUMULATIVE_ARGS *cum; /* current arg information */ enum machine_mode mode; /* current arg mode */ tree type; /* type of the argument or 0 if lib support */ ! int named ATTRIBUTE_UNUSED;/* != 0 for normal args, == 0 for ... args */ { ! if ((mode == BLKmode ! || GET_MODE_CLASS (mode) != MODE_COMPLEX_INT ! || GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT) ! && cum->arg_words < (unsigned) MAX_ARGS_IN_REGISTERS ! && mips_abi != ABI_EABI) ! { ! int words; ! if (mode == BLKmode) ! words = ((int_size_in_bytes (type) + UNITS_PER_WORD - 1) ! / UNITS_PER_WORD); ! else ! words = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; ! if (words + cum->arg_words <= (unsigned) MAX_ARGS_IN_REGISTERS) ! return 0; /* structure fits in registers */ ! if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "function_arg_partial_nregs = %d\n", ! MAX_ARGS_IN_REGISTERS - cum->arg_words); ! return MAX_ARGS_IN_REGISTERS - cum->arg_words; ! } ! else if (mode == DImode ! && cum->arg_words == MAX_ARGS_IN_REGISTERS - (unsigned)1 ! && ! TARGET_64BIT && mips_abi != ABI_EABI) { ! if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "function_arg_partial_nregs = 1\n"); ! return 1; ! } ! return 0; } ! /* Create the va_list data type. We keep 3 pointers, and two offsets. Two pointers are to the overflow area, which starts at the CFA. --- 4433,4649 ---- struct rtx_def * function_arg (cum, mode, type, named) ! const CUMULATIVE_ARGS *cum; /* current arg information */ enum machine_mode mode; /* current arg mode */ tree type; /* type of the argument or 0 if lib support */ int named; /* != 0 for normal args, == 0 for ... args */ { ! struct mips_arg_info info; ! /* We will be called with a mode of VOIDmode after the last argument ! has been seen. Whatever we return will be passed to the call ! insn. If we need any shifts for small structures, return them in ! a PARALLEL; in that case, stuff the mips16 fp_code in as the ! mode. Otherwise, if we need a mips16 fp_code, return a REG ! with the code stored as the mode. */ ! if (mode == VOIDmode) { ! if (cum->num_adjusts > 0) ! return gen_rtx_PARALLEL ((enum machine_mode) cum->fp_code, ! gen_rtvec_v (cum->num_adjusts, ! (rtx *) cum->adjust)); ! else if (TARGET_MIPS16 && cum->fp_code != 0) ! return gen_rtx_REG ((enum machine_mode) cum->fp_code, 0); else ! return 0; } ! mips_arg_info (cum, mode, type, named, &info); ! /* Return straight away if the whole argument is passed on the stack. */ ! if (info.reg_offset == MAX_ARGS_IN_REGISTERS) ! return 0; ! ! if (type != 0 ! && TREE_CODE (type) == RECORD_TYPE ! && (mips_abi == ABI_N32 || mips_abi == ABI_64) ! && TYPE_SIZE_UNIT (type) ! && host_integerp (TYPE_SIZE_UNIT (type), 1) ! && named ! && mode != DFmode) { ! /* The Irix 6 n32/n64 ABIs say that if any 64 bit chunk of the ! structure contains a double in its entirety, then that 64 bit ! chunk is passed in a floating point register. */ ! tree field; ! /* First check to see if there is any such field. */ ! for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field)) ! if (TREE_CODE (field) == FIELD_DECL ! && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE ! && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD ! && host_integerp (bit_position (field), 0) ! && int_bit_position (field) % BITS_PER_WORD == 0) ! break; ! if (field != 0) { ! /* Now handle the special case by returning a PARALLEL ! indicating where each 64 bit chunk goes. INFO.REG_WORDS ! chunks are passed in registers. */ ! unsigned int i; ! HOST_WIDE_INT bitpos; ! rtx ret; ! /* assign_parms checks the mode of ENTRY_PARM, so we must ! use the actual mode here. */ ! ret = gen_rtx_PARALLEL (mode, rtvec_alloc (info.reg_words)); ! bitpos = 0; ! field = TYPE_FIELDS (type); ! for (i = 0; i < info.reg_words; i++) { ! rtx reg; ! for (; field; field = TREE_CHAIN (field)) ! if (TREE_CODE (field) == FIELD_DECL ! && int_bit_position (field) >= bitpos) ! break; ! if (field ! && int_bit_position (field) == bitpos ! && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE ! && !TARGET_SOFT_FLOAT ! && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD) ! reg = gen_rtx_REG (DFmode, FP_ARG_FIRST + info.reg_offset + i); ! else ! reg = gen_rtx_REG (DImode, GP_ARG_FIRST + info.reg_offset + i); ! XVECEXP (ret, 0, i) ! = gen_rtx_EXPR_LIST (VOIDmode, reg, ! GEN_INT (bitpos / BITS_PER_UNIT)); ! bitpos += BITS_PER_WORD; } ! return ret; } } ! if (mips_abi == ABI_MEABI && info.fpr_p && !cum->prototype) { ! /* To make K&R varargs work we need to pass floating ! point arguments in both integer and FP registers. */ ! return gen_rtx_PARALLEL ! (mode, ! gen_rtvec (2, ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (mode, ! GP_ARG_FIRST ! + info.reg_offset), ! const0_rtx), ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (mode, ! FP_ARG_FIRST ! + info.reg_offset), ! const0_rtx))); } ! if (info.fpr_p) ! return gen_rtx_REG (mode, FP_ARG_FIRST + info.reg_offset); ! else ! return gen_rtx_REG (mode, GP_ARG_FIRST + info.reg_offset); } int function_arg_partial_nregs (cum, mode, type, named) ! const CUMULATIVE_ARGS *cum; /* current arg information */ enum machine_mode mode; /* current arg mode */ tree type; /* type of the argument or 0 if lib support */ ! int named; /* != 0 for normal args, == 0 for ... args */ { ! struct mips_arg_info info; ! mips_arg_info (cum, mode, type, named, &info); ! return info.stack_words > 0 ? info.reg_words : 0; ! } ! ! int ! mips_setup_incoming_varargs (cum, mode, type, no_rtl) ! const CUMULATIVE_ARGS *cum; ! enum machine_mode mode; ! tree type; ! int no_rtl; ! { ! CUMULATIVE_ARGS local_cum; ! int gp_saved, fp_saved; ! if (mips_abi == ABI_32 || mips_abi == ABI_O64) ! return 0; ! /* The caller has advanced CUM up to, but not beyond, the last named ! argument. Advance a local copy of CUM past the last "real" named ! argument, to find out how many registers are left over. */ ! local_cum = *cum; ! FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1); ! ! /* Found out how many registers we need to save. */ ! gp_saved = MAX_ARGS_IN_REGISTERS - local_cum.num_gprs; ! fp_saved = (EABI_FLOAT_VARARGS_P ! ? MAX_ARGS_IN_REGISTERS - local_cum.num_fprs ! : 0); ! ! if (!no_rtl) { ! if (gp_saved > 0) ! { ! rtx ptr, mem; ! ptr = virtual_incoming_args_rtx; ! if (mips_abi == ABI_EABI) ! ptr = plus_constant (ptr, -gp_saved * UNITS_PER_WORD); ! mem = gen_rtx_MEM (BLKmode, ptr); ! /* va_arg is an array access in this case, which causes ! it to get MEM_IN_STRUCT_P set. We must set it here ! so that the insn scheduler won't assume that these ! stores can't possibly overlap with the va_arg loads. */ ! if (mips_abi != ABI_EABI && BYTES_BIG_ENDIAN) ! MEM_SET_IN_STRUCT_P (mem, 1); ! ! move_block_from_reg (local_cum.num_gprs + GP_ARG_FIRST, mem, ! gp_saved, gp_saved * UNITS_PER_WORD); ! } ! if (fp_saved > 0) ! { ! /* We can't use move_block_from_reg, because it will use ! the wrong mode. */ ! enum machine_mode mode; ! int off, i; ! ! /* Set OFF to the offset from virtual_incoming_args_rtx of ! the first float register. The FP save area lies below ! the integer one, and is aligned to UNITS_PER_FPVALUE bytes. */ ! off = -gp_saved * UNITS_PER_WORD; ! off &= ~(UNITS_PER_FPVALUE - 1); ! off -= fp_saved * UNITS_PER_FPREG; ! ! mode = TARGET_SINGLE_FLOAT ? SFmode : DFmode; ! ! for (i = local_cum.num_fprs; i < MAX_ARGS_IN_REGISTERS; i += FP_INC) ! { ! rtx ptr = plus_constant (virtual_incoming_args_rtx, off); ! emit_move_insn (gen_rtx_MEM (mode, ptr), ! gen_rtx_REG (mode, FP_ARG_FIRST + i)); ! off += UNITS_PER_HWFPVALUE; ! } ! } ! } ! return (gp_saved * UNITS_PER_WORD) + (fp_saved * UNITS_PER_FPREG); } ! /* Create the va_list data type. We keep 3 pointers, and two offsets. Two pointers are to the overflow area, which starts at the CFA. *************** function_arg_partial_nregs (cum, mode, t *** 4358,4366 **** These are downcounted as float or non-float arguments are used, and when they get to zero, the argument must be obtained from the overflow region. ! If TARGET_SOFT_FLOAT or TARGET_SINGLE_FLOAT, then no FPR save area exists, ! and a single pointer is enough. It's started at the GPR save area, ! and is advanced, period. Note that the GPR save area is not constant size, due to optimization in the prologue. Hence, we can't use a design with two pointers and two offsets, although we could have designed this with two pointers --- 4656,4664 ---- These are downcounted as float or non-float arguments are used, and when they get to zero, the argument must be obtained from the overflow region. ! If !EABI_FLOAT_VARARGS_P, then no FPR save area exists, and a single ! pointer is enough. It's started at the GPR save area, and is ! advanced, period. Note that the GPR save area is not constant size, due to optimization in the prologue. Hence, we can't use a design with two pointers and two offsets, although we could have designed this with two pointers *************** function_arg_partial_nregs (cum, mode, t *** 4370,4376 **** tree mips_build_va_list () { ! if (mips_abi == ABI_EABI && !TARGET_SOFT_FLOAT && !TARGET_SINGLE_FLOAT) { tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff, record; --- 4668,4674 ---- tree mips_build_va_list () { ! if (EABI_FLOAT_VARARGS_P) { tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff, record; *************** mips_build_va_list () *** 4407,4454 **** return ptr_type_node; } ! /* Implement va_start. stdarg_p is 0 if implementing ! __builtin_varargs_va_start, 1 if implementing __builtin_stdarg_va_start. ! Note that this routine isn't called when compiling e.g. "_vfprintf_r". ! (It doesn't have "...", so it inherits the pointers of its caller.) */ void ! mips_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg; { ! int int_arg_words; ! tree t; ! /* Find out how many non-float named formals */ ! int_arg_words = current_function_args_info.arg_words; if (mips_abi == ABI_EABI) { int gpr_save_area_size; - /* Note UNITS_PER_WORD is 4 bytes or 8, depending on TARGET_64BIT. */ - if (int_arg_words < 8 ) - /* Adjust for the prologue's economy measure */ - gpr_save_area_size = (8 - int_arg_words) * UNITS_PER_WORD; - else - gpr_save_area_size = 0; ! if (!TARGET_SOFT_FLOAT && !TARGET_SINGLE_FLOAT) { tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff; tree ovfl, gtop, ftop, goff, foff; ! tree gprv; ! int float_formals, fpr_offset, size_excess, floats_passed_in_regs; ! int fpr_save_offset; ! ! float_formals = current_function_args_info.fp_arg_words; ! /* If mips2, the number of formals is half the reported # of words */ ! if (!TARGET_64BIT) ! float_formals /= 2; ! floats_passed_in_regs = (TARGET_64BIT ? 8 : 4); ! f_ovfl = TYPE_FIELDS (va_list_type_node); f_gtop = TREE_CHAIN (f_ovfl); f_ftop = TREE_CHAIN (f_gtop); f_goff = TREE_CHAIN (f_ftop); --- 4705,4744 ---- return ptr_type_node; } ! /* Implement va_start. stdarg_p is always 1. */ void ! mips_va_start (valist, nextarg) tree valist; rtx nextarg; { ! const CUMULATIVE_ARGS *cum = ¤t_function_args_info; ! /* ARG_POINTER_REGNUM is initialized to STACK_POINTER_BOUNDARY, but ! since the stack is aligned for a pair of argument-passing slots, ! and the beginning of a variable argument list may be an odd slot, ! we have to decrease its alignment. */ ! if (cfun && cfun->emit->regno_pointer_align) ! while (((current_function_pretend_args_size * BITS_PER_UNIT) ! & (REGNO_POINTER_ALIGN (ARG_POINTER_REGNUM) - 1)) != 0) ! REGNO_POINTER_ALIGN (ARG_POINTER_REGNUM) /= 2; if (mips_abi == ABI_EABI) { int gpr_save_area_size; ! gpr_save_area_size ! = (MAX_ARGS_IN_REGISTERS - cum->num_gprs) * UNITS_PER_WORD; ! ! if (EABI_FLOAT_VARARGS_P) { tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff; tree ovfl, gtop, ftop, goff, foff; ! tree t; ! int fpr_offset; ! int fpr_save_area_size; ! f_ovfl = TYPE_FIELDS (va_list_type_node); f_gtop = TREE_CHAIN (f_ovfl); f_ftop = TREE_CHAIN (f_gtop); f_goff = TREE_CHAIN (f_ftop); *************** mips_va_start (stdarg_p, valist, nextarg *** 4460,4576 **** goff = build (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff); foff = build (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff); ! /* Emit code setting a pointer into the overflow (shared-stack) area. ! If there were more than 8 non-float formals, or more than 8 ! float formals, then this pointer isn't to the base of the area. ! In that case, it must point to where the first vararg is. */ ! size_excess = 0; ! if (float_formals > floats_passed_in_regs) ! size_excess += (float_formals-floats_passed_in_regs) * 8; ! if (int_arg_words > 8) ! size_excess += (int_arg_words-8) * UNITS_PER_WORD; ! ! /* FIXME: for mips2, the above size_excess can be wrong. Because the ! overflow stack holds mixed size items, there can be alignments, ! so that an 8 byte double following a 4 byte int will be on an ! 8 byte boundary. This means that the above calculation should ! take into account the exact sequence of floats and non-floats ! which make up the excess. That calculation should be rolled ! into the code which sets the current_function_args_info struct. ! The above then reduces to a fetch from that struct. */ ! ! t = make_tree (TREE_TYPE (ovfl), virtual_incoming_args_rtx); ! if (size_excess) t = build (PLUS_EXPR, TREE_TYPE (ovfl), t, ! build_int_2 (size_excess, 0)); t = build (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Emit code setting a ptr to the base of the overflow area. */ t = make_tree (TREE_TYPE (gtop), virtual_incoming_args_rtx); t = build (MODIFY_EXPR, TREE_TYPE (gtop), gtop, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Emit code setting a pointer to the GPR save area. ! More precisely, a pointer to off-the-end of the FPR save area. ! If mips4, this is gpr_save_area_size below the overflow area. ! If mips2, also round down to an 8-byte boundary, since the FPR ! save area is 8-byte aligned, and GPR is 4-byte-aligned. ! Therefore there can be a 4-byte gap between the save areas. */ ! gprv = make_tree (TREE_TYPE (ftop), virtual_incoming_args_rtx); ! fpr_save_offset = gpr_save_area_size; ! if (!TARGET_64BIT) ! { ! if (fpr_save_offset & 7) ! fpr_save_offset += 4; ! } ! if (fpr_save_offset) ! gprv = build (PLUS_EXPR, TREE_TYPE (ftop), gprv, ! build_int_2 (-fpr_save_offset,-1)); ! t = build (MODIFY_EXPR, TREE_TYPE (ftop), ftop, gprv); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Emit code initting an offset to the size of the GPR save area */ t = build (MODIFY_EXPR, TREE_TYPE (goff), goff, ! build_int_2 (gpr_save_area_size,0)); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Emit code initting an offset from ftop to the first float ! vararg. This varies in size, since any float ! varargs are put in the FPR save area after the formals. ! Note it's 8 bytes/formal regardless of TARGET_64BIT. ! However, mips2 stores 4 GPRs, mips4 stores 8 GPRs. ! If there are 8 or more float formals, init to zero. ! (In fact, the formals aren't stored in the bottom of the ! FPR save area: they are elsewhere, and the size of the FPR ! save area is economized by the prologue. But this code doesn't ! care. This design is unaffected by that fact.) */ ! if (float_formals >= floats_passed_in_regs) ! fpr_offset = 0; ! else ! fpr_offset = (floats_passed_in_regs - float_formals) * 8; t = build (MODIFY_EXPR, TREE_TYPE (foff), foff, ! build_int_2 (fpr_offset,0)); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } else { - /* TARGET_SOFT_FLOAT or TARGET_SINGLE_FLOAT */ - /* Everything is in the GPR save area, or in the overflow area which is contiguous with it. */ ! ! int offset = -gpr_save_area_size; ! if (gpr_save_area_size == 0) ! offset = (stdarg_p ? 0 : -UNITS_PER_WORD); ! nextarg = plus_constant (nextarg, offset); ! std_expand_builtin_va_start (1, valist, nextarg); } } else ! { ! /* not EABI */ ! int ofs; ! ! if (stdarg_p) ! ofs = 0; ! else ! { ! /* ??? This had been conditional on ! _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 ! and both iris5.h and iris6.h define _MIPS_SIM. */ ! if (mips_abi == ABI_N32 || mips_abi == ABI_64) ! ofs = (int_arg_words >= 8 ? -UNITS_PER_WORD : 0); ! else if (mips_abi == ABI_MEABI) ! ofs = (int_arg_words >= 8 ? -UNITS_PER_WORD : 0); ! else ! ofs = -UNITS_PER_WORD; ! } ! ! nextarg = plus_constant (nextarg, ofs); ! std_expand_builtin_va_start (1, valist, nextarg); ! } } /* Implement va_arg. */ --- 4750,4806 ---- goff = build (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff); foff = build (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff); ! /* Emit code to initialize OVFL, which points to the next varargs ! stack argument. CUM->STACK_WORDS gives the number of stack ! words used by named arguments. */ t = make_tree (TREE_TYPE (ovfl), virtual_incoming_args_rtx); ! if (cum->stack_words > 0) t = build (PLUS_EXPR, TREE_TYPE (ovfl), t, ! build_int_2 (cum->stack_words * UNITS_PER_WORD, 0)); t = build (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Emit code to initialize GTOP, the top of the GPR save area. */ t = make_tree (TREE_TYPE (gtop), virtual_incoming_args_rtx); t = build (MODIFY_EXPR, TREE_TYPE (gtop), gtop, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Emit code to initialize FTOP, the top of the FPR save area. ! This address is gpr_save_area_bytes below GTOP, rounded ! down to the next fp-aligned boundary. */ ! t = make_tree (TREE_TYPE (ftop), virtual_incoming_args_rtx); ! fpr_offset = gpr_save_area_size + UNITS_PER_FPVALUE - 1; ! fpr_offset &= ~(UNITS_PER_FPVALUE - 1); ! if (fpr_offset) ! t = build (PLUS_EXPR, TREE_TYPE (ftop), t, ! build_int_2 (-fpr_offset, -1)); ! t = build (MODIFY_EXPR, TREE_TYPE (ftop), ftop, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Emit code to initialize GOFF, the offset from GTOP of the ! next GPR argument. */ t = build (MODIFY_EXPR, TREE_TYPE (goff), goff, ! build_int_2 (gpr_save_area_size, 0)); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* Likewise emit code to initialize FOFF, the offset from FTOP ! of the next FPR argument. */ ! fpr_save_area_size ! = (MAX_ARGS_IN_REGISTERS - cum->num_fprs) * UNITS_PER_FPREG; t = build (MODIFY_EXPR, TREE_TYPE (foff), foff, ! build_int_2 (fpr_save_area_size, 0)); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } else { /* Everything is in the GPR save area, or in the overflow area which is contiguous with it. */ ! nextarg = plus_constant (nextarg, -gpr_save_area_size); ! std_expand_builtin_va_start (valist, nextarg); } } else ! std_expand_builtin_va_start (valist, nextarg); } /* Implement va_arg. */ *************** mips_va_arg (valist, type) *** 4588,4600 **** if (mips_abi == ABI_EABI) { ! int indirect; ! rtx r, lab_over = NULL_RTX, lab_false; ! tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff; ! tree ovfl, gtop, ftop, goff, foff; indirect = function_arg_pass_by_reference (NULL, TYPE_MODE (type), type, 0); if (indirect) { size = POINTER_SIZE / BITS_PER_UNIT; --- 4818,4829 ---- if (mips_abi == ABI_EABI) { ! bool indirect; ! rtx r; indirect = function_arg_pass_by_reference (NULL, TYPE_MODE (type), type, 0); + if (indirect) { size = POINTER_SIZE / BITS_PER_UNIT; *************** mips_va_arg (valist, type) *** 4603,4789 **** addr_rtx = gen_reg_rtx (Pmode); ! if (TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT) { ! /* Case of all args in a merged stack. No need to check bounds, just advance valist along the stack. */ tree gpr = valist; ! if (! indirect ! && ! TARGET_64BIT && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD) { t = build (PLUS_EXPR, TREE_TYPE (gpr), gpr, ! build_int_2 (2*UNITS_PER_WORD - 1, 0)); t = build (BIT_AND_EXPR, TREE_TYPE (t), t, ! build_int_2 (-2*UNITS_PER_WORD, -1)); t = build (MODIFY_EXPR, TREE_TYPE (gpr), gpr, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } ! t = build (POSTINCREMENT_EXPR, TREE_TYPE (gpr), gpr, ! size_int (rsize)); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) emit_move_insn (addr_rtx, r); ! /* flush the POSTINCREMENT */ ! emit_queue(); ! ! if (indirect) ! { ! r = gen_rtx_MEM (Pmode, addr_rtx); ! set_mem_alias_set (r, get_varargs_alias_set ()); ! emit_move_insn (addr_rtx, r); ! } ! else ! { ! if (BYTES_BIG_ENDIAN && rsize != size) ! addr_rtx = plus_constant (addr_rtx, rsize - size); ! } ! return addr_rtx; } ! /* Not a simple merged stack. Need ptrs and indexes left by va_start. */ ! f_ovfl = TYPE_FIELDS (va_list_type_node); ! f_gtop = TREE_CHAIN (f_ovfl); ! f_ftop = TREE_CHAIN (f_gtop); ! f_goff = TREE_CHAIN (f_ftop); ! f_foff = TREE_CHAIN (f_goff); ! ovfl = build (COMPONENT_REF, TREE_TYPE (f_ovfl), valist, f_ovfl); ! gtop = build (COMPONENT_REF, TREE_TYPE (f_gtop), valist, f_gtop); ! ftop = build (COMPONENT_REF, TREE_TYPE (f_ftop), valist, f_ftop); ! goff = build (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff); ! foff = build (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff); ! lab_false = gen_label_rtx (); ! lab_over = gen_label_rtx (); ! if (TREE_CODE (type) == REAL_TYPE) ! { ! /* Emit code to branch if foff == 0. */ ! r = expand_expr (foff, NULL_RTX, TYPE_MODE (TREE_TYPE (foff)), ! EXPAND_NORMAL); ! emit_cmp_and_jump_insns (r, const0_rtx, EQ, const1_rtx, GET_MODE (r), ! 1, lab_false); ! /* Emit code for addr_rtx = ftop - foff */ ! t = build (MINUS_EXPR, TREE_TYPE (ftop), ftop, foff ); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) ! emit_move_insn (addr_rtx, r); ! /* Emit code for foff-=8. ! Advances the offset up FPR save area by one double */ ! t = build (MINUS_EXPR, TREE_TYPE (foff), foff, build_int_2 (8, 0)); ! t = build (MODIFY_EXPR, TREE_TYPE (foff), foff, t); ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! emit_queue(); ! emit_jump (lab_over); ! emit_barrier (); ! emit_label (lab_false); ! if (!TARGET_64BIT) { ! /* For mips2, the overflow area contains mixed size items. ! If a 4-byte int is followed by an 8-byte float, then ! natural alignment causes a 4 byte gap. ! So, dynamically adjust ovfl up to a multiple of 8. */ ! t = build (BIT_AND_EXPR, TREE_TYPE (ovfl), ovfl, ! build_int_2 (7, 0)); ! t = build (PLUS_EXPR, TREE_TYPE (ovfl), ovfl, t); ! t = build (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! } ! ! /* Emit code for addr_rtx = the ovfl pointer into overflow area. ! Regardless of mips2, postincrement the ovfl pointer by 8. */ ! t = build (POSTINCREMENT_EXPR, TREE_TYPE(ovfl), ovfl, ! size_int (8)); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) ! emit_move_insn (addr_rtx, r); ! ! emit_queue(); ! emit_label (lab_over); ! return addr_rtx; ! } ! else ! { ! /* not REAL_TYPE */ ! int step_size; ! if (! TARGET_64BIT ! && TREE_CODE (type) == INTEGER_TYPE ! && TYPE_PRECISION (type) == 64) { ! /* In mips2, int takes 32 bits of the GPR save area, but ! longlong takes an aligned 64 bits. So, emit code ! to zero the low order bits of goff, thus aligning ! the later calculation of (gtop-goff) upwards. */ ! t = build (BIT_AND_EXPR, TREE_TYPE (goff), goff, ! build_int_2 (-8, -1)); ! t = build (MODIFY_EXPR, TREE_TYPE (goff), goff, t); ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } ! /* Emit code to branch if goff == 0. */ ! r = expand_expr (goff, NULL_RTX, TYPE_MODE (TREE_TYPE (goff)), ! EXPAND_NORMAL); ! emit_cmp_and_jump_insns (r, const0_rtx, EQ, const1_rtx, GET_MODE (r), 1, lab_false); ! /* Emit code for addr_rtx = gtop - goff. */ ! t = build (MINUS_EXPR, TREE_TYPE (gtop), gtop, goff); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) ! emit_move_insn (addr_rtx, r); ! ! /* Note that mips2 int is 32 bit, but mips2 longlong is 64. */ ! if (! TARGET_64BIT && TYPE_PRECISION (type) == 64) ! step_size = 8; ! else ! step_size = UNITS_PER_WORD; ! /* Emit code for goff = goff - step_size. ! Advances the offset up GPR save area over the item. */ ! t = build (MINUS_EXPR, TREE_TYPE (goff), goff, ! build_int_2 (step_size, 0)); ! t = build (MODIFY_EXPR, TREE_TYPE (goff), goff, t); ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! emit_queue(); ! emit_jump (lab_over); ! emit_barrier (); ! emit_label (lab_false); ! /* Emit code for addr_rtx -> overflow area, postinc by step_size */ ! t = build (POSTINCREMENT_EXPR, TREE_TYPE(ovfl), ovfl, ! size_int (step_size)); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) ! emit_move_insn (addr_rtx, r); ! emit_queue(); ! emit_label (lab_over); if (BYTES_BIG_ENDIAN && rsize != size) addr_rtx = plus_constant (addr_rtx, rsize - size); - - if (indirect) - { - addr_rtx = force_reg (Pmode, addr_rtx); - r = gen_rtx_MEM (Pmode, addr_rtx); - set_mem_alias_set (r, get_varargs_alias_set ()); - emit_move_insn (addr_rtx, r); - } - - return addr_rtx; } } else { --- 4832,5013 ---- addr_rtx = gen_reg_rtx (Pmode); ! if (!EABI_FLOAT_VARARGS_P) { ! /* Case of all args in a merged stack. No need to check bounds, just advance valist along the stack. */ tree gpr = valist; ! if (!indirect ! && !TARGET_64BIT && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD) { + /* Align the pointer using: ap = (ap + align - 1) & -align, + where align is 2 * UNITS_PER_WORD. */ t = build (PLUS_EXPR, TREE_TYPE (gpr), gpr, ! build_int_2 (2 * UNITS_PER_WORD - 1, 0)); t = build (BIT_AND_EXPR, TREE_TYPE (t), t, ! build_int_2 (-2 * UNITS_PER_WORD, -1)); t = build (MODIFY_EXPR, TREE_TYPE (gpr), gpr, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } ! /* Emit code to set addr_rtx to the valist, and postincrement ! the valist by the size of the argument, rounded up to the ! next word. */ ! t = build (POSTINCREMENT_EXPR, TREE_TYPE (gpr), gpr, ! size_int (rsize)); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) emit_move_insn (addr_rtx, r); ! /* Flush the POSTINCREMENT. */ ! emit_queue(); } + else + { + /* Not a simple merged stack. */ ! tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff; ! tree ovfl, top, off; ! rtx lab_over = NULL_RTX, lab_false; ! HOST_WIDE_INT osize; ! f_ovfl = TYPE_FIELDS (va_list_type_node); ! f_gtop = TREE_CHAIN (f_ovfl); ! f_ftop = TREE_CHAIN (f_gtop); ! f_goff = TREE_CHAIN (f_ftop); ! f_foff = TREE_CHAIN (f_goff); ! /* We maintain separate pointers and offsets for floating-point ! and integer arguments, but we need similar code in both cases. ! Let: ! TOP be the top of the register save area; ! OFF be the offset from TOP of the next register; ! ADDR_RTX be the address of the argument; and ! RSIZE be the number of bytes used to store the argument ! when it's in the register save area ! OSIZE be the number of bytes used to store it when it's ! in the stack overflow area ! PADDING be (BYTES_BIG_ENDIAN ? OSIZE - RSIZE : 0) ! The code we want is: ! 1: off &= -rsize; // round down ! 2: if (off != 0) ! 3: { ! 4: addr_rtx = top - off; ! 5: off -= rsize; ! 6: } ! 7: else ! 8: { ! 9: ovfl += ((intptr_t) ovfl + osize - 1) & -osize; ! 10: addr_rtx = ovfl + PADDING; ! 11: ovfl += osize; ! 14: } ! [1] and [9] can sometimes be optimized away. */ ! lab_false = gen_label_rtx (); ! lab_over = gen_label_rtx (); ! ovfl = build (COMPONENT_REF, TREE_TYPE (f_ovfl), valist, f_ovfl); ! if (TREE_CODE (type) == REAL_TYPE) { ! top = build (COMPONENT_REF, TREE_TYPE (f_ftop), valist, f_ftop); ! off = build (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff); ! /* When floating-point registers are saved to the stack, ! each one will take up UNITS_PER_HWFPVALUE bytes, regardless ! of the float's precision. */ ! rsize = UNITS_PER_HWFPVALUE; ! } ! else { ! top = build (COMPONENT_REF, TREE_TYPE (f_gtop), valist, f_gtop); ! off = build (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff); ! if (rsize > UNITS_PER_WORD) ! { ! /* [1] Emit code for: off &= -rsize. */ ! t = build (BIT_AND_EXPR, TREE_TYPE (off), off, ! build_int_2 (-rsize, -1)); ! t = build (MODIFY_EXPR, TREE_TYPE (off), off, t); ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! } } + /* Every overflow argument must take up at least UNITS_PER_WORD + bytes (= PARM_BOUNDARY bits). RSIZE can sometimes be smaller + than that, such as in the combination -mgp64 -msingle-float + -fshort-double. Doubles passed in registers will then take + up UNITS_PER_HWFPVALUE bytes, but those passed on the stack + take up UNITS_PER_WORD bytes. */ + osize = MAX (rsize, UNITS_PER_WORD); ! /* [2] Emit code to branch if off == 0. */ ! r = expand_expr (off, NULL_RTX, TYPE_MODE (TREE_TYPE (off)), ! EXPAND_NORMAL); ! emit_cmp_and_jump_insns (r, const0_rtx, EQ, const1_rtx, GET_MODE (r), 1, lab_false); ! /* [4] Emit code for: addr_rtx = top - off. */ ! t = build (MINUS_EXPR, TREE_TYPE (top), top, off); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) ! emit_move_insn (addr_rtx, r); ! /* [5] Emit code for: off -= rsize. */ ! t = build (MINUS_EXPR, TREE_TYPE (off), off, build_int_2 (rsize, 0)); ! t = build (MODIFY_EXPR, TREE_TYPE (off), off, t); ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! /* [7] Emit code to jump over the else clause, then the label ! that starts it. */ ! emit_queue(); ! emit_jump (lab_over); ! emit_barrier (); ! emit_label (lab_false); ! if (osize > UNITS_PER_WORD) ! { ! /* [9] Emit: ovfl += ((intptr_t) ovfl + osize - 1) & -osize. */ ! t = build (PLUS_EXPR, TREE_TYPE (ovfl), ovfl, ! build_int_2 (osize - 1, 0)); ! t = build (BIT_AND_EXPR, TREE_TYPE (ovfl), t, ! build_int_2 (-osize, -1)); ! t = build (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); ! } ! /* [10, 11]. Emit code to store ovfl in addr_rtx, then ! post-increment ovfl by osize. On big-endian machines, ! the argument has OSIZE - RSIZE bytes of leading padding. */ ! t = build (POSTINCREMENT_EXPR, TREE_TYPE (ovfl), ovfl, ! size_int (osize)); ! if (BYTES_BIG_ENDIAN && osize > rsize) ! t = build (PLUS_EXPR, TREE_TYPE (t), t, ! build_int_2 (osize - rsize, 0)); ! r = expand_expr (t, addr_rtx, Pmode, EXPAND_NORMAL); ! if (r != addr_rtx) ! emit_move_insn (addr_rtx, r); + emit_queue(); + emit_label (lab_over); + } + if (indirect) + { + addr_rtx = force_reg (Pmode, addr_rtx); + r = gen_rtx_MEM (Pmode, addr_rtx); + set_mem_alias_set (r, get_varargs_alias_set ()); + emit_move_insn (addr_rtx, r); + } + else + { if (BYTES_BIG_ENDIAN && rsize != size) addr_rtx = plus_constant (addr_rtx, rsize - size); } + return addr_rtx; } else { *************** mips_va_arg (valist, type) *** 4794,4800 **** that alignments <= UNITS_PER_WORD are preserved by the va_arg increment mechanism. */ ! if (TARGET_64BIT) align = 8; else if (TYPE_ALIGN (type) > 32) align = 8; --- 5018,5027 ---- that alignments <= UNITS_PER_WORD are preserved by the va_arg increment mechanism. */ ! if ((mips_abi == ABI_N32 || mips_abi == ABI_64) ! && TYPE_ALIGN (type) > 64) ! align = 16; ! else if (TARGET_64BIT) align = 8; else if (TYPE_ALIGN (type) > 32) align = 8; *************** abort_with_insn (insn, reason) *** 4824,4839 **** abort (); } /* Set up the threshold for data to go into the small data area, instead of the normal data area, and detect any conflicts in the switches. */ void override_options () { ! register int i, start; ! register int regno; ! register enum machine_mode mode; ! register enum processor_type mips_cpu; mips_section_threshold = g_switch_set ? g_switch_value : MIPS_DEFAULT_GVALUE; --- 5051,5094 ---- abort (); } + /* Set up globals to generate code for the ISA or processor + described by INFO. */ + + static void + mips_set_architecture (info) + const struct mips_cpu_info *info; + { + if (info != 0) + { + mips_arch_info = info; + mips_arch = info->cpu; + mips_isa = info->isa; + } + } + + + /* Likewise for tuning. */ + + static void + mips_set_tune (info) + const struct mips_cpu_info *info; + { + if (info != 0) + { + mips_tune_info = info; + mips_tune = info->cpu; + } + } + + /* Set up the threshold for data to go into the small data area, instead of the normal data area, and detect any conflicts in the switches. */ void override_options () { ! int i, start, regno; ! enum machine_mode mode; mips_section_threshold = g_switch_set ? g_switch_value : MIPS_DEFAULT_GVALUE; *************** override_options () *** 4851,5108 **** target_flags &= ~((TARGET_DEFAULT) & (MASK_SOFT_FLOAT | MASK_SINGLE_FLOAT)); #endif ! /* Get the architectural level. */ ! if (mips_isa_string == 0) ! mips_isa = MIPS_ISA_DEFAULT; ! else if (mips_isa_string != 0 ! && mips_arch_string != 0) ! warning ("The -march option is incompatible to -mipsN and therefore ignored."); ! else if (ISDIGIT (*mips_isa_string)) { ! mips_isa = atoi (mips_isa_string); ! if (mips_isa == 16) { ! /* -mno-mips16 overrides -mips16. */ if (mips_no_mips16_string == NULL) ! { ! target_flags |= MASK_MIPS16; ! if (TARGET_64BIT) ! mips_isa = 3; ! else ! mips_isa = MIPS_ISA_DEFAULT; ! } ! else ! { ! mips_isa = MIPS_ISA_DEFAULT; ! } } ! else if (mips_isa < 1 ! || (mips_isa > 4 ! && mips_isa != 32 ! && mips_isa != 64)) { ! error ("-mips%d not supported", mips_isa); ! mips_isa = 1; } - } - - else - { - error ("bad value (%s) for -mips switch", mips_isa_string); - mips_isa = 1; - } - - #ifdef MIPS_ABI_DEFAULT - /* Get the ABI to use. */ - if (mips_abi_string == (char *) 0) - mips_abi = MIPS_ABI_DEFAULT; - else if (! strcmp (mips_abi_string, "32")) - mips_abi = ABI_32; - else if (! strcmp (mips_abi_string, "o64")) - mips_abi = ABI_O64; - else if (! strcmp (mips_abi_string, "n32")) - mips_abi = ABI_N32; - else if (! strcmp (mips_abi_string, "64")) - mips_abi = ABI_64; - else if (! strcmp (mips_abi_string, "eabi")) - mips_abi = ABI_EABI; - else if (! strcmp (mips_abi_string, "meabi")) - mips_abi = ABI_MEABI; - else - error ("bad value (%s) for -mabi= switch", mips_abi_string); - - /* A specified ISA defaults the ABI if it was not specified. */ - if (mips_abi_string == 0 && mips_isa_string - && mips_abi != ABI_EABI - && mips_abi != ABI_O64 - && mips_abi != ABI_MEABI) - { - if (mips_isa == 64) - mips_abi = ABI_O64; else { ! if (! ISA_HAS_64BIT_REGS) ! mips_abi = ABI_32; ! else if (mips_abi != ABI_N32) ! mips_abi = ABI_64; } } ! #ifdef MIPS_CPU_STRING_DEFAULT ! /* A specified ABI defaults the ISA if it was not specified. */ ! else if (mips_isa_string == 0 && mips_abi_string ! && mips_abi != ABI_EABI && mips_abi != ABI_O64) ! { ! if (mips_abi == ABI_32) ! mips_isa = 1; ! else if (mips_abi == ABI_N32) ! mips_isa = 3; ! else ! mips_isa = 4; ! } ! #endif ! ! /* If both ABI and ISA were specified, check for conflicts. */ ! else if (mips_isa_string && mips_abi_string) { ! if (! ISA_HAS_64BIT_REGS && (mips_abi == ABI_N32 || mips_abi == ABI_64 ! || mips_abi == ABI_O64)) ! error ("-mabi=%s does not support -mips%d", mips_abi_string, mips_isa); ! } ! ! /* Override TARGET_DEFAULT if necessary. */ ! if (mips_abi == ABI_32) ! target_flags &= ~ (MASK_FLOAT64|MASK_64BIT); ! ! /* If no type size setting options (-mlong64,-mint64,-mlong32) were used ! then set the type sizes. In the EABI in 64 bit mode, longs and ! pointers are 64 bits. Likewise for the SGI Irix6 N64 ABI. */ ! if (mips_explicit_type_size_string == NULL ! && ((mips_abi == ABI_EABI && TARGET_64BIT) ! || mips_abi == ABI_64)) ! target_flags |= MASK_LONG64; ! #else ! if (mips_abi_string) ! error ("this target does not support the -mabi switch"); #endif ! #ifdef MIPS_CPU_STRING_DEFAULT ! /* ??? There is a minor inconsistency here. If the user specifies an ISA ! greater than that supported by the default processor, then the user gets ! an error. Normally, the compiler will just default to the base level cpu ! for the indicated isa. */ ! if (mips_arch_string == 0) ! mips_arch_string = MIPS_CPU_STRING_DEFAULT; ! if (mips_tune_string == 0) ! mips_tune_string = MIPS_CPU_STRING_DEFAULT; ! #endif ! /* Identify the processor type. */ ! if (mips_cpu_string != 0) { ! mips_cpu = mips_parse_cpu (mips_cpu_string); ! if (mips_cpu == PROCESSOR_DEFAULT) ! { ! error ("bad value (%s) for -mcpu= switch", mips_cpu_string); ! mips_cpu_string = "default"; ! } ! mips_arch = mips_cpu; ! mips_tune = mips_cpu; } ! ! if (mips_arch_string == 0 ! || ! strcmp (mips_arch_string, "default") ! || ! strcmp (mips_arch_string, "DEFAULT")) { ! switch (mips_isa) ! { ! default: ! mips_arch_string = "3000"; ! mips_arch = PROCESSOR_R3000; ! break; ! case 2: ! mips_arch_string = "6000"; ! mips_arch = PROCESSOR_R6000; ! break; ! case 3: ! mips_arch_string = "4000"; ! mips_arch = PROCESSOR_R4000; ! break; ! case 4: ! mips_arch_string = "8000"; ! mips_arch = PROCESSOR_R8000; ! break; ! case 32: ! mips_arch_string = "4kc"; ! mips_arch = PROCESSOR_R4KC; ! break; ! case 64: ! mips_arch_string = "5kc"; ! mips_arch = PROCESSOR_R5KC; ! break; ! } } ! else { ! mips_arch = mips_parse_cpu (mips_arch_string); ! if (mips_arch == PROCESSOR_DEFAULT) ! { ! error ("bad value (%s) for -march= switch", mips_arch_string); ! mips_arch_string = "default"; ! } } ! if (mips_tune_string == 0 ! || ! strcmp (mips_tune_string, "default") ! || ! strcmp (mips_tune_string, "DEFAULT")) { ! if (mips_arch != PROCESSOR_DEFAULT) ! mips_tune = mips_arch; else ! switch (mips_isa) ! { ! default: ! mips_tune_string = "3000"; ! mips_tune = PROCESSOR_R3000; ! break; ! case 2: ! mips_tune_string = "6000"; ! mips_tune = PROCESSOR_R6000; ! break; ! case 3: ! mips_tune_string = "4000"; ! mips_tune = PROCESSOR_R4000; ! break; ! case 4: ! mips_tune_string = "8000"; ! mips_tune = PROCESSOR_R8000; ! break; ! case 32: ! mips_tune_string = "4kc"; ! mips_tune = PROCESSOR_R4KC; ! break; ! case 64: ! mips_tune_string = "5kc"; ! mips_tune = PROCESSOR_R5KC; ! break; ! } ! } ! else { ! mips_tune = mips_parse_cpu (mips_tune_string); ! if (mips_tune == PROCESSOR_DEFAULT) ! { ! error ("bad value (%s) for -mtune= switch", mips_tune_string); ! mips_tune_string = "default"; ! } } ! /* make sure sizes of ints/longs/etc. are ok */ ! if (! ISA_HAS_64BIT_REGS) { ! if (TARGET_FLOAT64) { ! error ("-mips%d does not support 64 bit fp registers", mips_isa); ! target_flags &= ~ MASK_FLOAT64; ! } ! else if (TARGET_64BIT) ! { ! error ("-mips%d does not support 64 bit gp registers", mips_isa); ! target_flags &= ~MASK_64BIT; } } if (mips_abi != ABI_32 && mips_abi != ABI_O64) flag_pcc_struct_return = 0; ! /* Tell halfpic.c that we have half-pic code if we do. */ ! if (TARGET_HALF_PIC) ! HALF_PIC_INIT (); /* -fpic (-KPIC) is the default when TARGET_ABICALLS is defined. We need to set flag_pic so that the LEGITIMATE_PIC_OPERAND_P macro will work. */ --- 5106,5289 ---- target_flags &= ~((TARGET_DEFAULT) & (MASK_SOFT_FLOAT | MASK_SINGLE_FLOAT)); #endif ! /* Interpret -mabi. */ ! mips_abi = MIPS_ABI_DEFAULT; ! if (mips_abi_string != 0) ! { ! if (strcmp (mips_abi_string, "32") == 0) ! mips_abi = ABI_32; ! else if (strcmp (mips_abi_string, "o64") == 0) ! mips_abi = ABI_O64; ! else if (strcmp (mips_abi_string, "n32") == 0) ! mips_abi = ABI_N32; ! else if (strcmp (mips_abi_string, "64") == 0) ! mips_abi = ABI_64; ! else if (strcmp (mips_abi_string, "eabi") == 0) ! mips_abi = ABI_EABI; ! else if (strcmp (mips_abi_string, "meabi") == 0) ! mips_abi = ABI_MEABI; ! else ! fatal_error ("bad value (%s) for -mabi= switch", mips_abi_string); ! } ! /* The following code determines the architecture and register size. ! Similar code was added to GAS 2.14 (see tc-mips.c:md_after_parse_args()). ! The GAS and GCC code should be kept in sync as much as possible. */ ! if (mips_arch_string != 0) ! mips_set_architecture (mips_parse_cpu ("-march", mips_arch_string)); ! ! if (mips_tune_string != 0) ! mips_set_tune (mips_parse_cpu ("-mtune", mips_tune_string)); ! ! if (mips_isa_string != 0) { ! /* Handle -mipsN. */ ! int level = atoi (mips_isa_string); ! if (level == 16) { ! /* -mips16 specifies an ASE rather than a processor, so don't ! change mips_arch here. -mno-mips16 overrides -mips16. */ if (mips_no_mips16_string == NULL) ! target_flags |= MASK_MIPS16; } ! else if (mips_arch_info != 0) { ! /* -march takes precedence over -mipsN, since it is more descriptive. ! There's no harm in specifying both as long as the ISA levels ! are the same. */ ! if (mips_isa != level) ! error ("-mips%d conflicts with the other architecture options, which specify a MIPS%d processor", ! level, mips_isa); } else { ! mips_set_architecture (mips_cpu_info_from_isa (level)); ! if (mips_arch_info == 0) ! error ("bad value (%s) for -mips switch", mips_isa_string); } } ! if (mips_arch_info == 0) { ! #ifdef MIPS_CPU_STRING_DEFAULT ! mips_set_architecture (mips_parse_cpu ("default CPU", ! MIPS_CPU_STRING_DEFAULT)); #else ! mips_set_architecture (mips_cpu_info_from_isa (MIPS_ISA_DEFAULT)); #endif + } ! if (ABI_NEEDS_64BIT_REGS && !ISA_HAS_64BIT_REGS) ! error ("-march=%s is not compatible with the selected ABI", ! mips_arch_info->name); ! /* Optimize for mips_arch, unless -mtune selects a different processor. */ ! if (mips_tune_info == 0) ! mips_set_tune (mips_arch_info); ! if ((target_flags_explicit & MASK_64BIT) != 0) { ! /* The user specified the size of the integer registers. Make sure ! it agrees with the ABI and ISA. */ ! if (TARGET_64BIT && !ISA_HAS_64BIT_REGS) ! error ("-mgp64 used with a 32-bit processor"); ! else if (!TARGET_64BIT && ABI_NEEDS_64BIT_REGS) ! error ("-mgp32 used with a 64-bit ABI"); ! else if (TARGET_64BIT && ABI_NEEDS_32BIT_REGS) ! error ("-mgp64 used with a 32-bit ABI"); } ! else { ! /* Infer the integer register size from the ABI and processor. ! Restrict ourselves to 32-bit registers if that's all the ! processor has, or if the ABI cannot handle 64-bit registers. */ ! if (ABI_NEEDS_32BIT_REGS || !ISA_HAS_64BIT_REGS) ! target_flags &= ~MASK_64BIT; ! else ! target_flags |= MASK_64BIT; } ! ! if ((target_flags_explicit & MASK_FLOAT64) != 0) { ! /* Really, -mfp32 and -mfp64 are ornamental options. There's ! only one right answer here. */ ! if (TARGET_64BIT && TARGET_DOUBLE_FLOAT && !TARGET_FLOAT64) ! error ("unsupported combination: %s", "-mgp64 -mfp32 -mdouble-float"); ! else if (!TARGET_64BIT && TARGET_FLOAT64) ! error ("unsupported combination: %s", "-mgp32 -mfp64"); ! else if (TARGET_SINGLE_FLOAT && TARGET_FLOAT64) ! error ("unsupported combination: %s", "-mfp64 -msingle-float"); } ! else { ! /* -msingle-float selects 32-bit float registers. Otherwise the ! float registers should be the same size as the integer ones. */ ! if (TARGET_64BIT && TARGET_DOUBLE_FLOAT) ! target_flags |= MASK_FLOAT64; else ! target_flags &= ~MASK_FLOAT64; } ! ! /* End of code shared with GAS. */ ! ! if ((target_flags_explicit & MASK_LONG64) == 0) { ! /* If no type size setting options (-mlong64,-mint64,-mlong32) ! were used, then set the type sizes. In the EABI in 64 bit mode, ! longs and pointers are 64 bits. Likewise for the SGI Irix6 N64 ! ABI. */ ! if ((mips_abi == ABI_EABI && TARGET_64BIT) || mips_abi == ABI_64) ! target_flags |= MASK_LONG64; ! else ! target_flags &= ~MASK_LONG64; } ! if (MIPS_MARCH_CONTROLS_SOFT_FLOAT ! && (target_flags_explicit & MASK_SOFT_FLOAT) == 0) { ! /* For some configurations, it is useful to have -march control ! the default setting of MASK_SOFT_FLOAT. */ ! switch ((int) mips_arch) { ! case PROCESSOR_R4100: ! case PROCESSOR_R4120: ! target_flags |= MASK_SOFT_FLOAT; ! break; ! default: ! target_flags &= ~MASK_SOFT_FLOAT; ! break; } } if (mips_abi != ABI_32 && mips_abi != ABI_O64) flag_pcc_struct_return = 0; ! if ((target_flags_explicit & MASK_BRANCHLIKELY) == 0) ! { ! /* If neither -mbranch-likely nor -mno-branch-likely was given ! on the command line, set MASK_BRANCHLIKELY based on the target ! architecture. ! ! By default, we enable use of Branch Likely instructions on ! all architectures which support them except for MIPS32 and MIPS64 ! (i.e., the generic MIPS32 and MIPS64 ISAs, and processors which ! implement them). ! ! The MIPS32 and MIPS64 architecture specifications say "Software ! is strongly encouraged to avoid use of Branch Likely ! instructions, as they will be removed from a future revision ! of the [MIPS32 and MIPS64] architecture." Therefore, we do not ! issue those instructions unless instructed to do so by ! -mbranch-likely. */ ! if (ISA_HAS_BRANCHLIKELY && !(ISA_MIPS32 || ISA_MIPS64)) ! target_flags |= MASK_BRANCHLIKELY; ! else ! target_flags &= ~MASK_BRANCHLIKELY; ! } ! if (TARGET_BRANCHLIKELY && !ISA_HAS_BRANCHLIKELY) ! warning ("generation of Branch Likely instructions enabled, but not supported by architecture"); /* -fpic (-KPIC) is the default when TARGET_ABICALLS is defined. We need to set flag_pic so that the LEGITIMATE_PIC_OPERAND_P macro will work. */ *************** override_options () *** 5198,5211 **** else mips16 = 0; ! /* Initialize the high and low values for legitimate floating point ! constants. Rather than trying to get the accuracy down to the ! last bit, just use approximate ranges. */ ! dfhigh = REAL_VALUE_ATOF ("1.0e300", DFmode); ! dflow = REAL_VALUE_ATOF ("1.0e-300", DFmode); ! sfhigh = REAL_VALUE_ATOF ("1.0e38", SFmode); ! sflow = REAL_VALUE_ATOF ("1.0e-38", SFmode); ! mips_print_operand_punct['?'] = 1; mips_print_operand_punct['#'] = 1; mips_print_operand_punct['&'] = 1; --- 5379,5388 ---- else mips16 = 0; ! #ifdef MIPS_TFMODE_FORMAT ! real_format_for_mode[TFmode - QFmode] = &MIPS_TFMODE_FORMAT; ! #endif ! mips_print_operand_punct['?'] = 1; mips_print_operand_punct['#'] = 1; mips_print_operand_punct['&'] = 1; *************** override_options () *** 5237,5242 **** --- 5414,5422 ---- mips_char_to_class['b'] = ALL_REGS; mips_char_to_class['y'] = GR_REGS; mips_char_to_class['z'] = ST_REGS; + mips_char_to_class['B'] = COP0_REGS; + mips_char_to_class['C'] = COP2_REGS; + mips_char_to_class['D'] = COP3_REGS; /* Set up array to map GCC register number to debug register number. Ignore the special purpose register numbers. */ *************** override_options () *** 5283,5300 **** temp = ((regno & 1) == 0 || size <= UNITS_PER_WORD); else if (FP_REG_P (regno)) ! temp = ((TARGET_FLOAT64 || ((regno & 1) == 0) ! /* I think this change is OK regardless of abi, but I'm being cautions untill I can test this more. HARD_REGNO_MODE_OK is about whether or not you can move to and from a register without changing the value, not about whether math works on the ! register. */ ! || (mips_abi == ABI_MEABI && size <= 4)) ! && (class == MODE_FLOAT ! || class == MODE_COMPLEX_FLOAT ! || (TARGET_DEBUG_H_MODE && class == MODE_INT)) ! && (! TARGET_SINGLE_FLOAT || size <= 4)); else if (MD_REG_P (regno)) temp = (class == MODE_INT --- 5463,5484 ---- temp = ((regno & 1) == 0 || size <= UNITS_PER_WORD); else if (FP_REG_P (regno)) ! temp = (((regno % FP_INC) == 0 ! /* I think this change is OK regardless of abi, but I'm being cautions untill I can test this more. HARD_REGNO_MODE_OK is about whether or not you can move to and from a register without changing the value, not about whether math works on the ! register. */ ! || (mips_abi == ABI_MEABI && size <= 4)) ! && (((class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) ! && size <= UNITS_PER_FPVALUE) ! /* Allow integer modes that fit into a single ! register. We need to put integers into FPRs ! when using instructions like cvt and trunc. */ ! || (class == MODE_INT && size <= UNITS_PER_FPREG) ! /* Allow TFmode for CCmode reloads. */ ! || (ISA_HAS_8CC && mode == TFmode))); else if (MD_REG_P (regno)) temp = (class == MODE_INT *************** override_options () *** 5302,5307 **** --- 5486,5493 ---- || (regno == MD_REG_FIRST && size == 2 * UNITS_PER_WORD))); + else if (ALL_COP_REG_P (regno)) + temp = (class == MODE_INT && size <= UNITS_PER_WORD); else temp = 0; *************** override_options () *** 5324,5331 **** align_functions = 8; } ! /* Register global variables with the garbage collector. */ ! mips_add_gc_roots (); } /* On the mips16, we want to allocate $24 (T_REG) before other --- 5510,5581 ---- align_functions = 8; } ! /* Function to allocate machine-dependent function status. */ ! init_machine_status = &mips_init_machine_status; ! } ! ! /* Implement CONDITIONAL_REGISTER_USAGE. */ ! ! void ! mips_conditional_register_usage () ! { ! if (!TARGET_HARD_FLOAT) ! { ! int regno; ! ! for (regno = FP_REG_FIRST; regno <= FP_REG_LAST; regno++) ! fixed_regs[regno] = call_used_regs[regno] = 1; ! for (regno = ST_REG_FIRST; regno <= ST_REG_LAST; regno++) ! fixed_regs[regno] = call_used_regs[regno] = 1; ! } ! else if (! ISA_HAS_8CC) ! { ! int regno; ! ! /* We only have a single condition code register. We ! implement this by hiding all the condition code registers, ! and generating RTL that refers directly to ST_REG_FIRST. */ ! for (regno = ST_REG_FIRST; regno <= ST_REG_LAST; regno++) ! fixed_regs[regno] = call_used_regs[regno] = 1; ! } ! /* In mips16 mode, we permit the $t temporary registers to be used ! for reload. We prohibit the unused $s registers, since they ! are caller saved, and saving them via a mips16 register would ! probably waste more time than just reloading the value. */ ! if (TARGET_MIPS16) ! { ! fixed_regs[18] = call_used_regs[18] = 1; ! fixed_regs[19] = call_used_regs[19] = 1; ! fixed_regs[20] = call_used_regs[20] = 1; ! fixed_regs[21] = call_used_regs[21] = 1; ! fixed_regs[22] = call_used_regs[22] = 1; ! fixed_regs[23] = call_used_regs[23] = 1; ! fixed_regs[26] = call_used_regs[26] = 1; ! fixed_regs[27] = call_used_regs[27] = 1; ! fixed_regs[30] = call_used_regs[30] = 1; ! } ! /* fp20-23 are now caller saved. */ ! if (mips_abi == ABI_64) ! { ! int regno; ! for (regno = FP_REG_FIRST + 20; regno < FP_REG_FIRST + 24; regno++) ! call_really_used_regs[regno] = call_used_regs[regno] = 1; ! } ! /* odd registers from fp21 to fp31 are now caller saved. */ ! if (mips_abi == ABI_N32 || mips_abi == ABI_MEABI) ! { ! int regno; ! for (regno = FP_REG_FIRST + 21; regno <= FP_REG_FIRST + 31; regno+=2) ! call_really_used_regs[regno] = call_used_regs[regno] = 1; ! } ! } ! ! /* Allocate a chunk of memory for per-function machine-dependent data. */ ! static struct machine_function * ! mips_init_machine_status () ! { ! return ((struct machine_function *) ! ggc_alloc_cleared (sizeof (struct machine_function))); } /* On the mips16, we want to allocate $24 (T_REG) before other *************** mips_debugger_offset (addr, offset) *** 5374,5382 **** if (reg == stack_pointer_rtx || reg == frame_pointer_rtx || reg == hard_frame_pointer_rtx) { ! HOST_WIDE_INT frame_size = (!current_frame_info.initialized) ? compute_frame_size (get_frame_size ()) ! : current_frame_info.total_size; /* MIPS16 frame is smaller */ if (frame_pointer_needed && TARGET_MIPS16) --- 5624,5632 ---- if (reg == stack_pointer_rtx || reg == frame_pointer_rtx || reg == hard_frame_pointer_rtx) { ! HOST_WIDE_INT frame_size = (!cfun->machine->frame.initialized) ? compute_frame_size (get_frame_size ()) ! : cfun->machine->frame.total_size; /* MIPS16 frame is smaller */ if (frame_pointer_needed && TARGET_MIPS16) *************** print_operand (file, op, letter) *** 5701,5712 **** else if (code == CONST_DOUBLE && GET_MODE_CLASS (GET_MODE (op)) == MODE_FLOAT) { ! REAL_VALUE_TYPE d; ! char s[30]; ! REAL_VALUE_FROM_CONST_DOUBLE (d, op); ! REAL_VALUE_TO_DECIMAL (d, "%.20e", s); ! fprintf (file, s); } else if (letter == 'x' && GET_CODE (op) == CONST_INT) --- 5951,5960 ---- else if (code == CONST_DOUBLE && GET_MODE_CLASS (GET_MODE (op)) == MODE_FLOAT) { ! char s[60]; ! real_to_decimal (s, CONST_DOUBLE_REAL_VALUE (op), sizeof (s), 0, 1); ! fputs (s, file); } else if (letter == 'x' && GET_CODE (op) == CONST_INT) *************** print_operand (file, op, letter) *** 5752,5763 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on ! the section that the address refers to. On these machines, ! define the macro `ENCODE_SECTION_INFO' to store the information ! into the `symbol_ref', and then check for it here. */ void print_operand_address (file, addr) --- 6000,6006 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. */ void print_operand_address (file, addr) *************** mips_assemble_integer (x, size, aligned_ *** 5884,5890 **** If we have -G 0, or the extern size is unknown, or the object is in a user specified section that is not .sbss/.sdata, don't bother emitting the ! .externs. In the case of user specified sections this behaviour is required as otherwise GAS will think the object lives in .sbss/.sdata. */ int --- 6127,6133 ---- If we have -G 0, or the extern size is unknown, or the object is in a user specified section that is not .sbss/.sdata, don't bother emitting the ! .externs. In the case of user specified sections this behavior is required as otherwise GAS will think the object lives in .sbss/.sdata. */ int *************** mips_output_external (file, decl, name) *** 5905,5911 **** || strcmp (TREE_STRING_POINTER (section_name), ".sbss") == 0 || strcmp (TREE_STRING_POINTER (section_name), ".sdata") == 0)) { ! p = (struct extern_list *) permalloc (sizeof (struct extern_list)); p->next = extern_head; p->name = name; p->size = len; --- 6148,6154 ---- || strcmp (TREE_STRING_POINTER (section_name), ".sbss") == 0 || strcmp (TREE_STRING_POINTER (section_name), ".sdata") == 0)) { ! p = (struct extern_list *) xmalloc (sizeof (struct extern_list)); p->next = extern_head; p->name = name; p->size = len; *************** mips_output_external (file, decl, name) *** 5921,5927 **** bootstrap under Irix 5.1. */ && strcmp (name, "__builtin_next_arg")) { ! p = (struct extern_list *) permalloc (sizeof (struct extern_list)); p->next = extern_head; p->name = name; p->size = -1; --- 6164,6170 ---- bootstrap under Irix 5.1. */ && strcmp (name, "__builtin_next_arg")) { ! p = (struct extern_list *) xmalloc (sizeof (struct extern_list)); p->next = extern_head; p->name = name; p->size = -1; *************** mips_output_external_libcall (file, name *** 5940,5946 **** { register struct extern_list *p; ! p = (struct extern_list *) permalloc (sizeof (struct extern_list)); p->next = extern_head; p->name = name; p->size = -1; --- 6183,6189 ---- { register struct extern_list *p; ! p = (struct extern_list *) xmalloc (sizeof (struct extern_list)); p->next = extern_head; p->name = name; p->size = -1; *************** mips_asm_file_start (stream) *** 6189,6201 **** if (TARGET_GAS) { ! #if defined(OBJECT_FORMAT_ELF) /* Generate a special section to describe the ABI switches used to produce the resultant binary. This used to be done by the assembler setting bits in the ELF header's flags field, but we have run out of bits. GDB needs this information in order to be able to correctly ! debug these binaries. See the function mips_gdbarch_init() in ! gdb/mips-tdep.c. */ const char * abi_string = NULL; switch (mips_abi) --- 6432,6445 ---- if (TARGET_GAS) { ! #if defined(OBJECT_FORMAT_ELF) && !(TARGET_IRIX5 || TARGET_IRIX6) /* Generate a special section to describe the ABI switches used to produce the resultant binary. This used to be done by the assembler setting bits in the ELF header's flags field, but we have run out of bits. GDB needs this information in order to be able to correctly ! debug these binaries. See the function mips_gdbarch_init() in ! gdb/mips-tdep.c. This is unnecessary for the IRIX 5/6 ABIs and ! causes unnecessary IRIX 6 ld warnings. */ const char * abi_string = NULL; switch (mips_abi) *************** mips_asm_file_start (stream) *** 6247,6253 **** if (flag_verbose_asm) fprintf (stream, "\n%s -G value = %d, Arch = %s, ISA = %d\n", ASM_COMMENT_START, ! mips_section_threshold, mips_arch_string, mips_isa); } /* If we are optimizing the global pointer, emit the text section now and any --- 6491,6497 ---- if (flag_verbose_asm) fprintf (stream, "\n%s -G value = %d, Arch = %s, ISA = %d\n", ASM_COMMENT_START, ! mips_section_threshold, mips_arch_info->name, mips_isa); } /* If we are optimizing the global pointer, emit the text section now and any *************** mips_asm_file_end (file) *** 6262,6272 **** tree name_tree; struct extern_list *p; - if (HALF_PIC_P ()) - { - HALF_PIC_FINISH (file); - } - if (extern_head) { fputs ("\n", file); --- 6506,6511 ---- *************** compute_frame_size (size) *** 6410,6417 **** HOST_WIDE_INT fp_reg_size; /* # bytes needed to store fp regs */ long mask; /* mask of saved gp registers */ long fmask; /* mask of saved fp registers */ ! int fp_inc; /* 1 or 2 depending on the size of fp regs */ ! long fp_bits; /* bitmask to use for each fp register */ gp_reg_size = 0; fp_reg_size = 0; --- 6649,6655 ---- HOST_WIDE_INT fp_reg_size; /* # bytes needed to store fp regs */ long mask; /* mask of saved gp registers */ long fmask; /* mask of saved fp registers */ ! tree return_type; gp_reg_size = 0; fp_reg_size = 0; *************** compute_frame_size (size) *** 6430,6435 **** --- 6668,6674 ---- args_size = 4 * UNITS_PER_WORD; total_size = var_size + args_size + extra_size; + return_type = DECL_RESULT (current_function_decl); /* Calculate space needed for gp registers. */ for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++) *************** compute_frame_size (size) *** 6448,6459 **** && regno == GP_REG_FIRST + 31 && mips16_hard_float && ! mips_entry ! && ! aggregate_value_p (DECL_RESULT (current_function_decl)) ! && (GET_MODE_CLASS (DECL_MODE (DECL_RESULT (current_function_decl))) ! == MODE_FLOAT) ! && (! TARGET_SINGLE_FLOAT ! || (GET_MODE_SIZE (DECL_MODE (DECL_RESULT (current_function_decl))) ! <= 4)))) { gp_reg_size += GET_MODE_SIZE (gpr_mode); mask |= 1L << (regno - GP_REG_FIRST); --- 6687,6695 ---- && regno == GP_REG_FIRST + 31 && mips16_hard_float && ! mips_entry ! && ! aggregate_value_p (return_type) ! && GET_MODE_CLASS (DECL_MODE (return_type)) == MODE_FLOAT ! && GET_MODE_SIZE (DECL_MODE (return_type)) <= UNITS_PER_FPVALUE)) { gp_reg_size += GET_MODE_SIZE (gpr_mode); mask |= 1L << (regno - GP_REG_FIRST); *************** compute_frame_size (size) *** 6484,6511 **** } } - /* Calculate space needed for fp registers. */ - if (TARGET_FLOAT64 || TARGET_SINGLE_FLOAT) - { - fp_inc = 1; - fp_bits = 1; - } - else - { - fp_inc = 2; - fp_bits = 3; - } - /* This loop must iterate over the same space as its companion in save_restore_insns. */ ! for (regno = (FP_REG_LAST - fp_inc + 1); regno >= FP_REG_FIRST; ! regno -= fp_inc) { if (regs_ever_live[regno] && !call_used_regs[regno]) { ! fp_reg_size += fp_inc * UNITS_PER_FPREG; ! fmask |= fp_bits << (regno - FP_REG_FIRST); } } --- 6720,6735 ---- } } /* This loop must iterate over the same space as its companion in save_restore_insns. */ ! for (regno = (FP_REG_LAST - FP_INC + 1); regno >= FP_REG_FIRST; ! regno -= FP_INC) { if (regs_ever_live[regno] && !call_used_regs[regno]) { ! fp_reg_size += FP_INC * UNITS_PER_FPREG; ! fmask |= ((1 << FP_INC) - 1) << (regno - FP_REG_FIRST); } } *************** compute_frame_size (size) *** 6541,6557 **** total_size = 32; /* Save other computed information. */ ! current_frame_info.total_size = total_size; ! current_frame_info.var_size = var_size; ! current_frame_info.args_size = args_size; ! current_frame_info.extra_size = extra_size; ! current_frame_info.gp_reg_size = gp_reg_size; ! current_frame_info.fp_reg_size = fp_reg_size; ! current_frame_info.mask = mask; ! current_frame_info.fmask = fmask; ! current_frame_info.initialized = reload_completed; ! current_frame_info.num_gp = gp_reg_size / UNITS_PER_WORD; ! current_frame_info.num_fp = fp_reg_size / (fp_inc * UNITS_PER_FPREG); if (mask) { --- 6765,6781 ---- total_size = 32; /* Save other computed information. */ ! cfun->machine->frame.total_size = total_size; ! cfun->machine->frame.var_size = var_size; ! cfun->machine->frame.args_size = args_size; ! cfun->machine->frame.extra_size = extra_size; ! cfun->machine->frame.gp_reg_size = gp_reg_size; ! cfun->machine->frame.fp_reg_size = fp_reg_size; ! cfun->machine->frame.mask = mask; ! cfun->machine->frame.fmask = fmask; ! cfun->machine->frame.initialized = reload_completed; ! cfun->machine->frame.num_gp = gp_reg_size / UNITS_PER_WORD; ! cfun->machine->frame.num_fp = fp_reg_size / (FP_INC * UNITS_PER_FPREG); if (mask) { *************** compute_frame_size (size) *** 6565,6597 **** else offset = total_size - GET_MODE_SIZE (gpr_mode); ! current_frame_info.gp_sp_offset = offset; ! current_frame_info.gp_save_offset = offset - total_size; } else { ! current_frame_info.gp_sp_offset = 0; ! current_frame_info.gp_save_offset = 0; } if (fmask) { unsigned long offset = (args_size + extra_size + var_size + gp_reg_rounded + fp_reg_size ! - fp_inc * UNITS_PER_FPREG); ! current_frame_info.fp_sp_offset = offset; ! current_frame_info.fp_save_offset = offset - total_size; } else { ! current_frame_info.fp_sp_offset = 0; ! current_frame_info.fp_save_offset = 0; } /* Ok, we're done. */ return total_size; } /* Common code to emit the insns (or to write the instructions to a file) to save/restore registers. --- 6789,6862 ---- else offset = total_size - GET_MODE_SIZE (gpr_mode); ! cfun->machine->frame.gp_sp_offset = offset; ! cfun->machine->frame.gp_save_offset = offset - total_size; } else { ! cfun->machine->frame.gp_sp_offset = 0; ! cfun->machine->frame.gp_save_offset = 0; } if (fmask) { unsigned long offset = (args_size + extra_size + var_size + gp_reg_rounded + fp_reg_size ! - FP_INC * UNITS_PER_FPREG); ! cfun->machine->frame.fp_sp_offset = offset; ! cfun->machine->frame.fp_save_offset = offset - total_size; } else { ! cfun->machine->frame.fp_sp_offset = 0; ! cfun->machine->frame.fp_save_offset = 0; } /* Ok, we're done. */ return total_size; } + /* Implement INITIAL_ELIMINATION_OFFSET. FROM is either the frame + pointer, argument pointer, or return address pointer. TO is either + the stack pointer or hard frame pointer. */ + + int + mips_initial_elimination_offset (from, to) + int from, to; + { + int offset; + + /* Set OFFSET to the offset from the stack pointer. */ + switch (from) + { + case FRAME_POINTER_REGNUM: + offset = 0; + break; + + case ARG_POINTER_REGNUM: + compute_frame_size (get_frame_size ()); + offset = cfun->machine->frame.total_size; + if (mips_abi == ABI_N32 || mips_abi == ABI_64 || mips_abi == ABI_MEABI) + offset -= current_function_pretend_args_size; + break; + + case RETURN_ADDRESS_POINTER_REGNUM: + compute_frame_size (get_frame_size ()); + offset = cfun->machine->frame.gp_sp_offset; + if (BYTES_BIG_ENDIAN) + offset += UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT); + break; + + default: + abort (); + } + + if (TARGET_MIPS16 && to == HARD_FRAME_POINTER_REGNUM) + offset -= current_function_outgoing_args_size; + + return offset; + } + /* Common code to emit the insns (or to write the instructions to a file) to save/restore registers. *************** compute_frame_size (size) *** 6601,6640 **** #define BITSET_P(VALUE,BIT) (((VALUE) & (1L << (BIT))) != 0) /* Emit instructions to load the value (SP + OFFSET) into MIPS_TEMP2_REGNUM ! and return an rtl expression for the register. Write the assembly ! instructions directly to FILE if it is not null, otherwise emit them as ! rtl. This function is a subroutine of save_restore_insns. It is used when OFFSET is too large to add in a single instruction. */ static rtx ! mips_add_large_offset_to_sp (offset, file) HOST_WIDE_INT offset; - FILE *file; { rtx reg = gen_rtx_REG (Pmode, MIPS_TEMP2_REGNUM); ! if (file == 0) ! { ! rtx offset_rtx = GEN_INT (offset); ! emit_move_insn (reg, offset_rtx); ! if (Pmode == DImode) ! emit_insn (gen_adddi3 (reg, reg, stack_pointer_rtx)); ! else ! emit_insn (gen_addsi3 (reg, reg, stack_pointer_rtx)); ! } else ! { ! fprintf (file, "\tli\t%s,0x%.08lx\t# ", ! reg_names[MIPS_TEMP2_REGNUM], (long) offset); ! fprintf (file, HOST_WIDE_INT_PRINT_DEC, offset); ! fprintf (file, "\n\t%s\t%s,%s,%s\n", ! Pmode == DImode ? "daddu" : "addu", ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[STACK_POINTER_REGNUM]); ! } return reg; } --- 6866,6888 ---- #define BITSET_P(VALUE,BIT) (((VALUE) & (1L << (BIT))) != 0) /* Emit instructions to load the value (SP + OFFSET) into MIPS_TEMP2_REGNUM ! and return an rtl expression for the register. This function is a subroutine of save_restore_insns. It is used when OFFSET is too large to add in a single instruction. */ static rtx ! mips_add_large_offset_to_sp (offset) HOST_WIDE_INT offset; { rtx reg = gen_rtx_REG (Pmode, MIPS_TEMP2_REGNUM); ! rtx offset_rtx = GEN_INT (offset); ! emit_move_insn (reg, offset_rtx); ! if (Pmode == DImode) ! emit_insn (gen_adddi3 (reg, reg, stack_pointer_rtx)); else ! emit_insn (gen_addsi3 (reg, reg, stack_pointer_rtx)); return reg; } *************** mips_emit_frame_related_store (mem, reg, *** 6700,6713 **** } static void ! save_restore_insns (store_p, large_reg, large_offset, file) int store_p; /* true if this is prologue */ rtx large_reg; /* register holding large offset constant or NULL */ long large_offset; /* large constant offset value */ - FILE *file; /* file to write instructions instead of making RTL */ { ! long mask = current_frame_info.mask; ! long fmask = current_frame_info.fmask; long real_mask = mask; int regno; rtx base_reg_rtx; --- 6948,6960 ---- } static void ! save_restore_insns (store_p, large_reg, large_offset) int store_p; /* true if this is prologue */ rtx large_reg; /* register holding large offset constant or NULL */ long large_offset; /* large constant offset value */ { ! long mask = cfun->machine->frame.mask; ! long fmask = cfun->machine->frame.fmask; long real_mask = mask; int regno; rtx base_reg_rtx; *************** save_restore_insns (store_p, large_reg, *** 6744,6752 **** the constant created in the prologue/epilogue to adjust the stack frame. */ ! gp_offset = current_frame_info.gp_sp_offset; end_offset ! = gp_offset - (current_frame_info.gp_reg_size - GET_MODE_SIZE (gpr_mode)); if (gp_offset < 0 || end_offset < 0) --- 6991,6999 ---- the constant created in the prologue/epilogue to adjust the stack frame. */ ! gp_offset = cfun->machine->frame.gp_sp_offset; end_offset ! = gp_offset - (cfun->machine->frame.gp_reg_size - GET_MODE_SIZE (gpr_mode)); if (gp_offset < 0 || end_offset < 0) *************** save_restore_insns (store_p, large_reg, *** 6768,6793 **** { base_reg_rtx = gen_rtx_REG (Pmode, MIPS_TEMP2_REGNUM); base_offset = large_offset; ! if (file == 0) ! { ! if (Pmode == DImode) ! insn = emit_insn (gen_adddi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); ! else ! insn = emit_insn (gen_addsi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); ! } else ! fprintf (file, "\t%s\t%s,%s,%s\n", ! Pmode == DImode ? "daddu" : "addu", ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[REGNO (large_reg)], ! reg_names[STACK_POINTER_REGNUM]); } else { base_offset = gp_offset; ! base_reg_rtx = mips_add_large_offset_to_sp (base_offset, file); } /* When we restore the registers in MIPS16 mode, then if we are --- 7015,7031 ---- { base_reg_rtx = gen_rtx_REG (Pmode, MIPS_TEMP2_REGNUM); base_offset = large_offset; ! if (Pmode == DImode) ! insn = emit_insn (gen_adddi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); else ! insn = emit_insn (gen_addsi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); } else { base_offset = gp_offset; ! base_reg_rtx = mips_add_large_offset_to_sp (base_offset); } /* When we restore the registers in MIPS16 mode, then if we are *************** save_restore_insns (store_p, large_reg, *** 6804,6902 **** base_offset += current_function_outgoing_args_size; for (regno = GP_REG_LAST; regno >= GP_REG_FIRST; regno--) ! if (BITSET_P (mask, regno - GP_REG_FIRST)) ! { ! if (file == 0) ! { ! rtx reg_rtx; ! rtx mem_rtx ! = gen_rtx (MEM, gpr_mode, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (gp_offset - base_offset))); ! ! if (! current_function_calls_eh_return) ! RTX_UNCHANGING_P (mem_rtx) = 1; ! /* The mips16 does not have an instruction to load ! $31, so we load $7 instead, and work things out ! in mips_expand_epilogue. */ ! if (TARGET_MIPS16 && ! store_p && regno == GP_REG_FIRST + 31) ! reg_rtx = gen_rtx (REG, gpr_mode, GP_REG_FIRST + 7); ! /* The mips16 sometimes needs to save $18. */ ! else if (TARGET_MIPS16 ! && regno != GP_REG_FIRST + 31 ! && ! M16_REG_P (regno)) ! { ! if (! store_p) ! reg_rtx = gen_rtx (REG, gpr_mode, 6); ! else ! { ! reg_rtx = gen_rtx (REG, gpr_mode, 3); ! emit_move_insn (reg_rtx, ! gen_rtx (REG, gpr_mode, regno)); ! } ! } ! else ! reg_rtx = gen_rtx (REG, gpr_mode, regno); ! if (store_p) ! mips_emit_frame_related_store (mem_rtx, reg_rtx, gp_offset); ! else ! { ! emit_move_insn (reg_rtx, mem_rtx); ! if (TARGET_MIPS16 ! && regno != GP_REG_FIRST + 31 ! && ! M16_REG_P (regno)) ! emit_move_insn (gen_rtx (REG, gpr_mode, regno), ! reg_rtx); ! } ! } ! else ! { ! int r = regno; ! /* The mips16 does not have an instruction to ! load $31, so we load $7 instead, and work ! things out in the caller. */ ! if (TARGET_MIPS16 && ! store_p && r == GP_REG_FIRST + 31) ! r = GP_REG_FIRST + 7; ! /* The mips16 sometimes needs to save $18. */ ! if (TARGET_MIPS16 ! && regno != GP_REG_FIRST + 31 ! && ! M16_REG_P (regno)) ! { ! if (! store_p) ! r = GP_REG_FIRST + 6; ! else ! { ! r = GP_REG_FIRST + 3; ! fprintf (file, "\tmove\t%s,%s\n", ! reg_names[r], reg_names[regno]); ! } ! } ! fprintf (file, "\t%s\t%s,", ! (TARGET_64BIT ! ? (store_p) ? "sd" : "ld" ! : (store_p) ? "sw" : "lw"), ! reg_names[r]); ! fprintf (file, HOST_WIDE_INT_PRINT_DEC, ! gp_offset - base_offset); ! fprintf (file, "(%s)\n", reg_names[REGNO(base_reg_rtx)]); ! if (! store_p ! && TARGET_MIPS16 ! && regno != GP_REG_FIRST + 31 ! && ! M16_REG_P (regno)) ! fprintf (file, "\tmove\t%s,%s\n", ! reg_names[regno], reg_names[r]); ! } ! gp_offset -= GET_MODE_SIZE (gpr_mode); ! } ! /* If the restore is being supressed, still take into account ! the offset at which it is stored. */ ! else if (BITSET_P (real_mask, regno - GP_REG_FIRST)) ! { gp_offset -= GET_MODE_SIZE (gpr_mode); ! } } else base_reg_rtx = 0, base_offset = 0; --- 7042,7098 ---- base_offset += current_function_outgoing_args_size; for (regno = GP_REG_LAST; regno >= GP_REG_FIRST; regno--) ! { ! if (BITSET_P (mask, regno - GP_REG_FIRST)) ! { ! rtx reg_rtx; ! rtx mem_rtx ! = gen_rtx (MEM, gpr_mode, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (gp_offset - base_offset))); ! if (! current_function_calls_eh_return) ! RTX_UNCHANGING_P (mem_rtx) = 1; ! /* The mips16 does not have an instruction to load ! $31, so we load $7 instead, and work things out ! in mips_expand_epilogue. */ ! if (TARGET_MIPS16 && ! store_p && regno == GP_REG_FIRST + 31) ! reg_rtx = gen_rtx (REG, gpr_mode, GP_REG_FIRST + 7); ! /* The mips16 sometimes needs to save $18. */ ! else if (TARGET_MIPS16 ! && regno != GP_REG_FIRST + 31 ! && ! M16_REG_P (regno)) ! { ! if (! store_p) ! reg_rtx = gen_rtx (REG, gpr_mode, 6); ! else ! { ! reg_rtx = gen_rtx (REG, gpr_mode, 3); ! emit_move_insn (reg_rtx, ! gen_rtx (REG, gpr_mode, regno)); ! } ! } ! else ! reg_rtx = gen_rtx (REG, gpr_mode, regno); ! if (store_p) ! mips_emit_frame_related_store (mem_rtx, reg_rtx, gp_offset); ! else ! { ! emit_move_insn (reg_rtx, mem_rtx); ! if (TARGET_MIPS16 ! && regno != GP_REG_FIRST + 31 ! && ! M16_REG_P (regno)) ! emit_move_insn (gen_rtx (REG, gpr_mode, regno), ! reg_rtx); ! } ! } ! /* If the restore is being supressed, still take into account ! the offset at which it is stored. */ ! if (BITSET_P (real_mask, regno - GP_REG_FIRST)) gp_offset -= GET_MODE_SIZE (gpr_mode); ! } } else base_reg_rtx = 0, base_offset = 0; *************** save_restore_insns (store_p, large_reg, *** 6904,6915 **** /* Save floating point registers if needed. */ if (fmask) { - int fp_inc = (TARGET_FLOAT64 || TARGET_SINGLE_FLOAT) ? 1 : 2; - int fp_size = fp_inc * UNITS_PER_FPREG; - /* Pick which pointer to use as a base register. */ ! fp_offset = current_frame_info.fp_sp_offset; ! end_offset = fp_offset - (current_frame_info.fp_reg_size - fp_size); if (fp_offset < 0 || end_offset < 0) internal_error --- 7100,7109 ---- /* Save floating point registers if needed. */ if (fmask) { /* Pick which pointer to use as a base register. */ ! fp_offset = cfun->machine->frame.fp_sp_offset; ! end_offset = fp_offset - (cfun->machine->frame.fp_reg_size ! - UNITS_PER_HWFPVALUE); if (fp_offset < 0 || end_offset < 0) internal_error *************** save_restore_insns (store_p, large_reg, *** 6930,6995 **** { base_reg_rtx = gen_rtx_REG (Pmode, MIPS_TEMP2_REGNUM); base_offset = large_offset; ! if (file == 0) ! { ! if (Pmode == DImode) ! insn = emit_insn (gen_adddi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); ! else ! insn = emit_insn (gen_addsi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); ! } ! else ! fprintf (file, "\t%s\t%s,%s,%s\n", ! Pmode == DImode ? "daddu" : "addu", ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[REGNO (large_reg)], ! reg_names[STACK_POINTER_REGNUM]); } else { base_offset = fp_offset; ! base_reg_rtx = mips_add_large_offset_to_sp (fp_offset, file); } /* This loop must iterate over the same space as its companion in compute_frame_size. */ ! for (regno = (FP_REG_LAST - fp_inc + 1); regno >= FP_REG_FIRST; ! regno -= fp_inc) if (BITSET_P (fmask, regno - FP_REG_FIRST)) { ! if (file == 0) ! { ! enum machine_mode sz ! = TARGET_SINGLE_FLOAT ? SFmode : DFmode; ! rtx reg_rtx = gen_rtx (REG, sz, regno); ! rtx mem_rtx = gen_rtx (MEM, sz, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (fp_offset ! - base_offset))); ! if (! current_function_calls_eh_return) ! RTX_UNCHANGING_P (mem_rtx) = 1; ! if (store_p) ! mips_emit_frame_related_store (mem_rtx, reg_rtx, fp_offset); ! else ! emit_move_insn (reg_rtx, mem_rtx); ! } else ! { ! fprintf (file, "\t%s\t%s,", ! (TARGET_SINGLE_FLOAT ! ? (store_p ? "s.s" : "l.s") ! : (store_p ? "s.d" : "l.d")), ! reg_names[regno]); ! fprintf (file, HOST_WIDE_INT_PRINT_DEC, ! fp_offset - base_offset); ! fprintf (file, "(%s)\n", reg_names[REGNO(base_reg_rtx)]); ! } ! fp_offset -= fp_size; } } } --- 7124,7164 ---- { base_reg_rtx = gen_rtx_REG (Pmode, MIPS_TEMP2_REGNUM); base_offset = large_offset; ! if (Pmode == DImode) ! insn = emit_insn (gen_adddi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); else ! insn = emit_insn (gen_addsi3 (base_reg_rtx, large_reg, ! stack_pointer_rtx)); } else { base_offset = fp_offset; ! base_reg_rtx = mips_add_large_offset_to_sp (fp_offset); } /* This loop must iterate over the same space as its companion in compute_frame_size. */ ! for (regno = (FP_REG_LAST - FP_INC + 1); regno >= FP_REG_FIRST; ! regno -= FP_INC) if (BITSET_P (fmask, regno - FP_REG_FIRST)) { ! enum machine_mode sz = TARGET_SINGLE_FLOAT ? SFmode : DFmode; ! rtx reg_rtx = gen_rtx (REG, sz, regno); ! rtx mem_rtx = gen_rtx (MEM, sz, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (fp_offset ! - base_offset))); ! if (! current_function_calls_eh_return) ! RTX_UNCHANGING_P (mem_rtx) = 1; ! if (store_p) ! mips_emit_frame_related_store (mem_rtx, reg_rtx, fp_offset); else ! emit_move_insn (reg_rtx, mem_rtx); ! fp_offset -= UNITS_PER_HWFPVALUE; } } } *************** mips_output_function_prologue (file, siz *** 7004,7010 **** #ifndef FUNCTION_NAME_ALREADY_DECLARED const char *fnname; #endif ! HOST_WIDE_INT tsize = current_frame_info.total_size; /* ??? When is this really needed? At least the GNU assembler does not need the source filename more than once in the file, beyond what is --- 7173,7179 ---- #ifndef FUNCTION_NAME_ALREADY_DECLARED const char *fnname; #endif ! HOST_WIDE_INT tsize = cfun->machine->frame.total_size; /* ??? When is this really needed? At least the GNU assembler does not need the source filename more than once in the file, beyond what is *************** mips_output_function_prologue (file, siz *** 7055,7072 **** ? ((long) tsize - current_function_outgoing_args_size) : (long) tsize), reg_names[GP_REG_FIRST + 31], ! current_frame_info.var_size, ! current_frame_info.num_gp, ! current_frame_info.num_fp, current_function_outgoing_args_size, ! current_frame_info.extra_size); /* .mask MASK, GPOFFSET; .fmask FPOFFSET */ fprintf (file, "\t.mask\t0x%08lx,%ld\n\t.fmask\t0x%08lx,%ld\n", ! current_frame_info.mask, ! current_frame_info.gp_save_offset, ! current_frame_info.fmask, ! current_frame_info.fp_save_offset); /* Require: OLD_SP == *FRAMEREG + FRAMESIZE => can find old_sp from nominated FP reg. --- 7224,7241 ---- ? ((long) tsize - current_function_outgoing_args_size) : (long) tsize), reg_names[GP_REG_FIRST + 31], ! cfun->machine->frame.var_size, ! cfun->machine->frame.num_gp, ! cfun->machine->frame.num_fp, current_function_outgoing_args_size, ! cfun->machine->frame.extra_size); /* .mask MASK, GPOFFSET; .fmask FPOFFSET */ fprintf (file, "\t.mask\t0x%08lx,%ld\n\t.fmask\t0x%08lx,%ld\n", ! cfun->machine->frame.mask, ! cfun->machine->frame.gp_save_offset, ! cfun->machine->frame.fmask, ! cfun->machine->frame.fp_save_offset); /* Require: OLD_SP == *FRAMEREG + FRAMESIZE => can find old_sp from nominated FP reg. *************** mips_output_function_prologue (file, siz *** 7075,7083 **** if (mips_entry && ! mips_can_use_return_insn ()) { ! int save16 = BITSET_P (current_frame_info.mask, 16); ! int save17 = BITSET_P (current_frame_info.mask, 17); ! int save31 = BITSET_P (current_frame_info.mask, 31); int savearg = 0; rtx insn; --- 7244,7252 ---- if (mips_entry && ! mips_can_use_return_insn ()) { ! int save16 = BITSET_P (cfun->machine->frame.mask, 16); ! int save17 = BITSET_P (cfun->machine->frame.mask, 17); ! int save31 = BITSET_P (cfun->machine->frame.mask, 31); int savearg = 0; rtx insn; *************** mips_output_function_prologue (file, siz *** 7159,7165 **** /* If this is a varargs function, we need to save all the registers onto the stack anyhow. */ ! if (current_function_stdarg || current_function_varargs) savearg = GP_REG_FIRST + 7; fprintf (file, "\tentry\t"); --- 7328,7334 ---- /* If this is a varargs function, we need to save all the registers onto the stack anyhow. */ ! if (current_function_stdarg) savearg = GP_REG_FIRST + 7; fprintf (file, "\tentry\t"); *************** mips_output_function_prologue (file, siz *** 7199,7205 **** fprintf (file, "\t%s\t%s,%s,%ld\n", (Pmode == DImode ? "dsubu" : "subu"), sp_str, sp_str, (long) tsize); ! fprintf (file, "\t.cprestore %ld\n", current_frame_info.args_size); } if (dwarf2out_do_frame ()) --- 7368,7374 ---- fprintf (file, "\t%s\t%s,%s,%ld\n", (Pmode == DImode ? "dsubu" : "subu"), sp_str, sp_str, (long) tsize); ! fprintf (file, "\t.cprestore %ld\n", cfun->machine->frame.args_size); } if (dwarf2out_do_frame ()) *************** mips_expand_prologue () *** 7279,7284 **** --- 7448,7457 ---- "va_alist")))) { last_arg_is_vararg_marker = 1; + if (GET_CODE (entry_parm) == REG) + regno = REGNO (entry_parm); + else + regno = GP_ARG_LAST + 1; break; } else *************** mips_expand_prologue () *** 7404,7420 **** which may return a floating point value. Set up a sequence of instructions to do so. Later on we emit them at the right moment. */ ! if (TARGET_MIPS16 && BITSET_P (current_frame_info.mask, 18)) { rtx reg_rtx = gen_rtx (REG, gpr_mode, GP_REG_FIRST + 3); long gp_offset, base_offset; ! gp_offset = current_frame_info.gp_sp_offset; ! if (BITSET_P (current_frame_info.mask, 16)) gp_offset -= UNITS_PER_WORD; ! if (BITSET_P (current_frame_info.mask, 17)) gp_offset -= UNITS_PER_WORD; ! if (BITSET_P (current_frame_info.mask, 31)) gp_offset -= UNITS_PER_WORD; if (tsize > 32767) base_offset = tsize; --- 7577,7593 ---- which may return a floating point value. Set up a sequence of instructions to do so. Later on we emit them at the right moment. */ ! if (TARGET_MIPS16 && BITSET_P (cfun->machine->frame.mask, 18)) { rtx reg_rtx = gen_rtx (REG, gpr_mode, GP_REG_FIRST + 3); long gp_offset, base_offset; ! gp_offset = cfun->machine->frame.gp_sp_offset; ! if (BITSET_P (cfun->machine->frame.mask, 16)) gp_offset -= UNITS_PER_WORD; ! if (BITSET_P (cfun->machine->frame.mask, 17)) gp_offset -= UNITS_PER_WORD; ! if (BITSET_P (cfun->machine->frame.mask, 31)) gp_offset -= UNITS_PER_WORD; if (tsize > 32767) base_offset = tsize; *************** mips_expand_prologue () *** 7428,7434 **** GEN_INT (gp_offset - base_offset))), reg_rtx); ! reg_18_save = gen_sequence (); end_sequence (); } --- 7601,7607 ---- GEN_INT (gp_offset - base_offset))), reg_rtx); ! reg_18_save = get_insns (); end_sequence (); } *************** mips_expand_prologue () *** 7477,7483 **** } if (! mips_entry) ! save_restore_insns (1, tmp_rtx, tsize, (FILE *)0); else if (reg_18_save != NULL_RTX) emit_insn (reg_18_save); --- 7650,7656 ---- } if (! mips_entry) ! save_restore_insns (1, tmp_rtx, tsize); else if (reg_18_save != NULL_RTX) emit_insn (reg_18_save); *************** mips_output_function_epilogue (file, siz *** 7579,7584 **** --- 7752,7758 ---- HOST_WIDE_INT size ATTRIBUTE_UNUSED; { const char *fnname = ""; /* FIXME: Correct initialisation? */ + rtx string; #ifndef FUNCTION_NAME_ALREADY_DECLARED /* Get the function name the same way that toplev.c does before calling *************** mips_output_function_epilogue (file, siz *** 7596,7603 **** if (TARGET_STATS) { ! int num_gp_regs = current_frame_info.gp_reg_size / 4; ! int num_fp_regs = current_frame_info.fp_reg_size / 8; int num_regs = num_gp_regs + num_fp_regs; const char *name = fnname; --- 7770,7777 ---- if (TARGET_STATS) { ! int num_gp_regs = cfun->machine->frame.gp_reg_size / 4; ! int num_fp_regs = cfun->machine->frame.fp_reg_size / 8; int num_regs = num_gp_regs + num_fp_regs; const char *name = fnname; *************** mips_output_function_epilogue (file, siz *** 7609,7637 **** fprintf (stderr, "%-20s fp=%c leaf=%c alloca=%c setjmp=%c stack=%4ld arg=%3d reg=%2d/%d delay=%3d/%3dL %3d/%3dJ refs=%3d/%3d/%3d", name, frame_pointer_needed ? 'y' : 'n', ! (current_frame_info.mask & RA_MASK) != 0 ? 'n' : 'y', current_function_calls_alloca ? 'y' : 'n', current_function_calls_setjmp ? 'y' : 'n', ! current_frame_info.total_size, current_function_outgoing_args_size, num_gp_regs, num_fp_regs, dslots_load_total, dslots_load_filled, dslots_jump_total, dslots_jump_filled, num_refs[0], num_refs[1], num_refs[2]); - if (HALF_PIC_NUMBER_PTRS > prev_half_pic_ptrs) - { - fprintf (stderr, - " half-pic=%3d", HALF_PIC_NUMBER_PTRS - prev_half_pic_ptrs); - prev_half_pic_ptrs = HALF_PIC_NUMBER_PTRS; - } - - if (HALF_PIC_NUMBER_REFS > prev_half_pic_refs) - { - fprintf (stderr, - " pic-ref=%3d", HALF_PIC_NUMBER_REFS - prev_half_pic_refs); - prev_half_pic_refs = HALF_PIC_NUMBER_REFS; - } - fputc ('\n', stderr); } --- 7783,7797 ---- fprintf (stderr, "%-20s fp=%c leaf=%c alloca=%c setjmp=%c stack=%4ld arg=%3d reg=%2d/%d delay=%3d/%3dL %3d/%3dJ refs=%3d/%3d/%3d", name, frame_pointer_needed ? 'y' : 'n', ! (cfun->machine->frame.mask & RA_MASK) != 0 ? 'n' : 'y', current_function_calls_alloca ? 'y' : 'n', current_function_calls_setjmp ? 'y' : 'n', ! cfun->machine->frame.total_size, current_function_outgoing_args_size, num_gp_regs, num_fp_regs, dslots_load_total, dslots_load_filled, dslots_jump_total, dslots_jump_filled, num_refs[0], num_refs[1], num_refs[2]); fputc ('\n', stderr); } *************** mips_output_function_epilogue (file, siz *** 7647,7653 **** num_refs[2] = 0; mips_load_reg = 0; mips_load_reg2 = 0; - current_frame_info = zero_frame_info; while (string_constants != NULL) { --- 7807,7812 ---- *************** mips_output_function_epilogue (file, siz *** 7658,7663 **** --- 7817,7833 ---- string_constants = next; } + /* If any following function uses the same strings as this one, force + them to refer those strings indirectly. Nearby functions could + refer them using pc-relative addressing, but it isn't safe in + general. For instance, some functions may be placed in sections + other than .text, and we don't know whether they be close enough + to this one. In large files, even other .text functions can be + too far away. */ + for (string = mips16_strings; string != 0; string = XEXP (string, 1)) + SYMBOL_REF_FLAG (XEXP (string, 0)) = 0; + free_EXPR_LIST_list (&mips16_strings); + /* Restore the output file if optimizing the GP (optimizing the GP causes the text to be diverted to a tempfile, so that data decls come before references to the data). */ *************** mips_output_function_epilogue (file, siz *** 7673,7685 **** void mips_expand_epilogue () { ! HOST_WIDE_INT tsize = current_frame_info.total_size; rtx tsize_rtx = GEN_INT (tsize); rtx tmp_rtx = (rtx)0; if (mips_can_use_return_insn ()) { ! emit_insn (gen_return ()); return; } --- 7843,7855 ---- void mips_expand_epilogue () { ! HOST_WIDE_INT tsize = cfun->machine->frame.total_size; rtx tsize_rtx = GEN_INT (tsize); rtx tmp_rtx = (rtx)0; if (mips_can_use_return_insn ()) { ! emit_jump_insn (gen_return ()); return; } *************** mips_expand_epilogue () *** 7742,7752 **** are going to restore it, then we must emit a blockage insn to prevent the scheduler from moving the restore out of the epilogue. */ else if (TARGET_ABICALLS && mips_abi != ABI_32 && mips_abi != ABI_O64 ! && (current_frame_info.mask & (1L << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST)))) emit_insn (gen_blockage ()); ! save_restore_insns (0, tmp_rtx, orig_tsize, (FILE *)0); /* In mips16 mode with a large frame, we adjust the stack pointer before restoring the registers. In this case, we --- 7912,7922 ---- are going to restore it, then we must emit a blockage insn to prevent the scheduler from moving the restore out of the epilogue. */ else if (TARGET_ABICALLS && mips_abi != ABI_32 && mips_abi != ABI_O64 ! && (cfun->machine->frame.mask & (1L << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST)))) emit_insn (gen_blockage ()); ! save_restore_insns (0, tmp_rtx, orig_tsize); /* In mips16 mode with a large frame, we adjust the stack pointer before restoring the registers. In this case, we *************** mips_expand_epilogue () *** 7804,7810 **** } /* The mips16 loads the return address into $7, not $31. */ ! if (TARGET_MIPS16 && (current_frame_info.mask & RA_MASK) != 0) emit_jump_insn (gen_return_internal (gen_rtx (REG, Pmode, GP_REG_FIRST + 7))); else --- 7974,7980 ---- } /* The mips16 loads the return address into $7, not $31. */ ! if (TARGET_MIPS16 && (cfun->machine->frame.mask & RA_MASK) != 0) emit_jump_insn (gen_return_internal (gen_rtx (REG, Pmode, GP_REG_FIRST + 7))); else *************** mips_expand_epilogue () *** 7819,7850 **** int mips_can_use_return_insn () { if (! reload_completed) return 0; if (regs_ever_live[31] || current_function_profile) return 0; /* In mips16 mode, a function which returns a floating point value needs to arrange to copy the return value into the floating point registers. */ if (TARGET_MIPS16 && mips16_hard_float ! && ! aggregate_value_p (DECL_RESULT (current_function_decl)) ! && (GET_MODE_CLASS (DECL_MODE (DECL_RESULT (current_function_decl))) ! == MODE_FLOAT) ! && (! TARGET_SINGLE_FLOAT ! || (GET_MODE_SIZE (DECL_MODE (DECL_RESULT (current_function_decl))) ! <= 4))) return 0; ! if (current_frame_info.initialized) ! return current_frame_info.total_size == 0; return compute_frame_size (get_frame_size ()) == 0; } ! /* Returns non-zero if X contains a SYMBOL_REF. */ static int symbolic_expression_p (x) --- 7989,8021 ---- int mips_can_use_return_insn () { + tree return_type; + if (! reload_completed) return 0; if (regs_ever_live[31] || current_function_profile) return 0; + return_type = DECL_RESULT (current_function_decl); + /* In mips16 mode, a function which returns a floating point value needs to arrange to copy the return value into the floating point registers. */ if (TARGET_MIPS16 && mips16_hard_float ! && ! aggregate_value_p (return_type) ! && GET_MODE_CLASS (DECL_MODE (return_type)) == MODE_FLOAT ! && GET_MODE_SIZE (DECL_MODE (return_type)) <= UNITS_PER_FPVALUE) return 0; ! if (cfun->machine->frame.initialized) ! return cfun->machine->frame.total_size == 0; return compute_frame_size (get_frame_size ()) == 0; } ! /* Returns nonzero if X contains a SYMBOL_REF. */ static int symbolic_expression_p (x) *************** symbolic_expression_p (x) *** 7870,7879 **** /* Choose the section to use for the constant rtx expression X that has mode MODE. */ ! void ! mips_select_rtx_section (mode, x) enum machine_mode mode; ! rtx x ATTRIBUTE_UNUSED; { if (TARGET_MIPS16) { --- 8041,8051 ---- /* Choose the section to use for the constant rtx expression X that has mode MODE. */ ! static void ! mips_select_rtx_section (mode, x, align) enum machine_mode mode; ! rtx x; ! unsigned HOST_WIDE_INT align; { if (TARGET_MIPS16) { *************** mips_select_rtx_section (mode, x) *** 7886,7911 **** { /* For embedded applications, always put constants in read-only data, in order to reduce RAM usage. */ ! READONLY_DATA_SECTION (); } else { /* For hosted applications, always put constants in small data if possible, as this gives the best performance. */ if (GET_MODE_SIZE (mode) <= (unsigned) mips_section_threshold && mips_section_threshold > 0) SMALL_DATA_SECTION (); else if (flag_pic && symbolic_expression_p (x)) ! /* Any expression involving a SYMBOL_REF might need a run-time ! relocation. (The symbol might be defined in a shared ! library loaded at an unexpected base address.) So, we must ! put such expressions in the data segment (which is ! writable), rather than the text segment (which is ! read-only). */ ! data_section (); else ! READONLY_DATA_SECTION (); } } --- 8058,8083 ---- { /* For embedded applications, always put constants in read-only data, in order to reduce RAM usage. */ ! mergeable_constant_section (mode, align, 0); } else { /* For hosted applications, always put constants in small data if possible, as this gives the best performance. */ + /* ??? Consider using mergable small data sections. */ if (GET_MODE_SIZE (mode) <= (unsigned) mips_section_threshold && mips_section_threshold > 0) SMALL_DATA_SECTION (); else if (flag_pic && symbolic_expression_p (x)) ! { ! if (targetm.have_named_sections) ! named_section (NULL_TREE, ".data.rel.ro", 3); ! else ! data_section (); ! } else ! mergeable_constant_section (mode, align, 0); } } *************** mips_select_rtx_section (mode, x) *** 7913,7930 **** any relocatable expression. Some of the logic used here needs to be replicated in ! ENCODE_SECTION_INFO in mips.h so that references to these symbols ! are done correctly. Specifically, at least all symbols assigned ! here to rom (.text and/or .rodata) must not be referenced via ! ENCODE_SECTION_INFO with %gprel, as the rom might be too far away. If you need to make a change here, you probably should check ! ENCODE_SECTION_INFO to see if it needs a similar change. */ ! void ! mips_select_section (decl, reloc) tree decl; int reloc; { int size = int_size_in_bytes (TREE_TYPE (decl)); --- 8085,8106 ---- any relocatable expression. Some of the logic used here needs to be replicated in ! mips_encode_section_info so that references to these symbols are ! done correctly. Specifically, at least all symbols assigned here ! to rom (.text and/or .rodata) must not be referenced via ! mips_encode_section_info with %gprel, as the rom might be too far ! away. If you need to make a change here, you probably should check ! mips_encode_section_info to see if it needs a similar change. ! ??? This would be fixed by implementing targetm.is_small_data_p. */ ! ! static void ! mips_select_section (decl, reloc, align) tree decl; int reloc; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; { int size = int_size_in_bytes (TREE_TYPE (decl)); *************** mips_select_section (decl, reloc) *** 7951,7957 **** && (TREE_CODE (decl) != STRING_CST || !flag_writable_strings))) && ! (flag_pic && reloc)) ! READONLY_DATA_SECTION (); else if (size > 0 && size <= mips_section_threshold) SMALL_DATA_SECTION (); else --- 8127,8133 ---- && (TREE_CODE (decl) != STRING_CST || !flag_writable_strings))) && ! (flag_pic && reloc)) ! readonly_data_section (); else if (size > 0 && size <= mips_section_threshold) SMALL_DATA_SECTION (); else *************** mips_select_section (decl, reloc) *** 7974,7984 **** && (TREE_CODE (decl) != STRING_CST || !flag_writable_strings))) && ! (flag_pic && reloc)) ! READONLY_DATA_SECTION (); else data_section (); } } /* Return register to use for a function return value with VALTYPE for function FUNC. MODE is used instead of VALTYPE for LIBCALLs. */ --- 8150,8269 ---- && (TREE_CODE (decl) != STRING_CST || !flag_writable_strings))) && ! (flag_pic && reloc)) ! readonly_data_section (); else data_section (); } } + + /* When optimizing for the $gp pointer, SYMBOL_REF_FLAG is set for all + small objects. + + When generating embedded PIC code, SYMBOL_REF_FLAG is set for + symbols which are not in the .text section. + + When generating mips16 code, SYMBOL_REF_FLAG is set for string + constants which are put in the .text section. We also record the + total length of all such strings; this total is used to decide + whether we need to split the constant table, and need not be + precisely correct. + + When not mips16 code nor embedded PIC, if a symbol is in a + gp addressable section, SYMBOL_REF_FLAG is set prevent gcc from + splitting the reference so that gas can generate a gp relative + reference. + + When TARGET_EMBEDDED_DATA is set, we assume that all const + variables will be stored in ROM, which is too far from %gp to use + %gprel addressing. Note that (1) we include "extern const" + variables in this, which mips_select_section doesn't, and (2) we + can't always tell if they're really const (they might be const C++ + objects with non-const constructors), so we err on the side of + caution and won't use %gprel anyway (otherwise we'd have to defer + this decision to the linker/loader). The handling of extern consts + is why the DECL_INITIAL macros differ from mips_select_section. */ + + static void + mips_encode_section_info (decl, first) + tree decl; + int first; + { + if (TARGET_MIPS16) + { + if (first && TREE_CODE (decl) == STRING_CST + && ! flag_writable_strings + /* If this string is from a function, and the function will + go in a gnu linkonce section, then we can't directly + access the string. This gets an assembler error + "unsupported PC relative reference to different section". + If we modify SELECT_SECTION to put it in function_section + instead of text_section, it still fails because + DECL_SECTION_NAME isn't set until assemble_start_function. + If we fix that, it still fails because strings are shared + among multiple functions, and we have cross section + references again. We force it to work by putting string + addresses in the constant pool and indirecting. */ + && (! current_function_decl + || ! DECL_ONE_ONLY (current_function_decl))) + { + rtx symref; + + symref = XEXP (TREE_CST_RTL (decl), 0); + mips16_strings = alloc_EXPR_LIST (0, symref, mips16_strings); + SYMBOL_REF_FLAG (symref) = 1; + mips_string_length += TREE_STRING_LENGTH (decl); + } + } + + if (TARGET_EMBEDDED_DATA + && (TREE_CODE (decl) == VAR_DECL + && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl)) + && (!DECL_INITIAL (decl) + || TREE_CONSTANT (DECL_INITIAL (decl)))) + { + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 0; + } + + else if (TARGET_EMBEDDED_PIC) + { + if (TREE_CODE (decl) == VAR_DECL) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + else if (TREE_CODE (decl) == FUNCTION_DECL) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 0; + else if (TREE_CODE (decl) == STRING_CST + && ! flag_writable_strings) + SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (decl), 0)) = 0; + else + SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (decl), 0)) = 1; + } + + else if (TREE_CODE (decl) == VAR_DECL + && DECL_SECTION_NAME (decl) != NULL_TREE + && (0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), + ".sdata") + || 0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), + ".sbss"))) + { + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + + /* We can not perform GP optimizations on variables which are in + specific sections, except for .sdata and .sbss which are + handled above. */ + else if (TARGET_GP_OPT && TREE_CODE (decl) == VAR_DECL + && DECL_SECTION_NAME (decl) == NULL_TREE + && ! (TARGET_MIPS16 && TREE_PUBLIC (decl) + && (DECL_COMMON (decl) + || DECL_ONE_ONLY (decl) + || DECL_WEAK (decl)))) + { + int size = int_size_in_bytes (TREE_TYPE (decl)); + + if (size > 0 && size <= mips_section_threshold) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + + } /* Return register to use for a function return value with VALTYPE for function FUNC. MODE is used instead of VALTYPE for LIBCALLs. */ *************** mips_function_value (valtype, func, mode *** 8004,8044 **** } mclass = GET_MODE_CLASS (mode); ! if (mclass == MODE_FLOAT) ! { ! if (TARGET_SINGLE_FLOAT ! && (mclass == MODE_FLOAT ! ? GET_MODE_SIZE (mode) > 4 : GET_MODE_SIZE (mode) / 2 > 4)) ! reg = GP_RETURN; ! else ! reg = FP_RETURN; ! } ! else if (mclass == MODE_COMPLEX_FLOAT) ! { ! if (TARGET_FLOAT64) ! reg = FP_RETURN; ! else if (mode == SCmode) ! { ! /* When FP registers are 32 bits, we can't directly reference ! the odd numbered ones, so let's make a pair of evens. */ ! enum machine_mode cmode = GET_MODE_INNER (mode); ! return gen_rtx_PARALLEL ! (VOIDmode, ! gen_rtvec (2, ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (cmode, ! FP_RETURN), ! GEN_INT (0)), ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (cmode, ! FP_RETURN + 2), ! GEN_INT (4)))); ! } ! else ! reg = FP_RETURN; } else if (valtype && TREE_CODE (valtype) == RECORD_TYPE --- 8289,8326 ---- } mclass = GET_MODE_CLASS (mode); ! if (mclass == MODE_FLOAT && GET_MODE_SIZE (mode) <= UNITS_PER_HWFPVALUE) ! reg = FP_RETURN; ! else if (mclass == MODE_FLOAT && mode == TFmode) ! /* long doubles are really split between f0 and f2, not f1. Eek. ! Use DImode for each component, since GCC wants integer modes ! for subregs. */ ! return gen_rtx_PARALLEL ! (VOIDmode, ! gen_rtvec (2, ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (DImode, FP_RETURN), ! GEN_INT (0)), ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (DImode, FP_RETURN + 2), ! GEN_INT (GET_MODE_SIZE (mode) / 2)))); ! ! else if (mclass == MODE_COMPLEX_FLOAT ! && GET_MODE_SIZE (mode) <= UNITS_PER_HWFPVALUE * 2) ! { ! enum machine_mode cmode = GET_MODE_INNER (mode); ! return gen_rtx_PARALLEL ! (VOIDmode, ! gen_rtvec (2, ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (cmode, FP_RETURN), ! GEN_INT (0)), ! gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (cmode, FP_RETURN + FP_INC), ! GEN_INT (GET_MODE_SIZE (cmode))))); } else if (valtype && TREE_CODE (valtype) == RECORD_TYPE *************** mips_function_value (valtype, func, mode *** 8114,8120 **** int function_arg_pass_by_reference (cum, mode, type, named) ! CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; enum machine_mode mode; tree type; int named ATTRIBUTE_UNUSED; --- 8396,8402 ---- int function_arg_pass_by_reference (cum, mode, type, named) ! const CUMULATIVE_ARGS *cum; enum machine_mode mode; tree type; int named ATTRIBUTE_UNUSED; *************** function_arg_pass_by_reference (cum, mod *** 8134,8149 **** /* ??? cum can be NULL when called from mips_va_arg. The problem handled here hopefully is not relevant to mips_va_arg. */ if (cum && MUST_PASS_IN_STACK (mode, type) ! && mips_abi != ABI_MEABI) ! { ! /* Don't pass the actual CUM to FUNCTION_ARG, because we would ! get double copies of any offsets generated for small structs ! passed in registers. */ ! CUMULATIVE_ARGS temp; ! temp = *cum; ! if (FUNCTION_ARG (temp, mode, type, named) != 0) ! return 1; ! } /* Otherwise, we only do this if EABI is selected. */ if (mips_abi != ABI_EABI) --- 8416,8424 ---- /* ??? cum can be NULL when called from mips_va_arg. The problem handled here hopefully is not relevant to mips_va_arg. */ if (cum && MUST_PASS_IN_STACK (mode, type) ! && mips_abi != ABI_MEABI ! && FUNCTION_ARG (*cum, mode, type, named) != 0) ! return 1; /* Otherwise, we only do this if EABI is selected. */ if (mips_abi != ABI_EABI) *************** function_arg_pass_by_reference (cum, mod *** 8157,8162 **** --- 8432,8470 ---- return size == -1 || size > UNITS_PER_WORD; } + /* Return the class of registers for which a mode change from FROM to TO + is invalid. + + In little-endian mode, the hi-lo registers are numbered backwards, + so (subreg:SI (reg:DI hi) 0) gets the high word instead of the low + word as intended. + + Similarly, when using paired floating-point registers, the first + register holds the low word, regardless of endianness. So in big + endian mode, (subreg:SI (reg:DF $f0) 0) does not get the high word + as intended. + + Also, loading a 32-bit value into a 64-bit floating-point register + will not sign-extend the value, despite what LOAD_EXTEND_OP says. + We can't allow 64-bit float registers to change from a 32-bit + mode to a 64-bit mode. */ + + bool + mips_cannot_change_mode_class (from, to, class) + enum machine_mode from, to; + enum reg_class class; + { + if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to)) + { + if (TARGET_BIG_ENDIAN) + return reg_classes_intersect_p (FP_REGS, class); + if (TARGET_FLOAT64) + return reg_classes_intersect_p (HI_AND_FP_REGS, class); + return reg_classes_intersect_p (HI_REG, class); + } + return false; + } + /* This function returns the register class required for a secondary register when copying between one of the registers in CLASS, and X, using MODE. If IN_P is nonzero, the copy is going from X to the *************** mips_secondary_reload_class (class, mode *** 8198,8203 **** --- 8506,8523 ---- if (GET_CODE (x) == REG) regno = REGNO (x) + off; } + + /* 64-bit floating-point registers don't store 32-bit values + in sign-extended form. The only way we can reload + (sign_extend:DI (reg:SI $f0)) is by moving $f0 into + an integer register using a 32-bit move. */ + if (FP_REG_P (regno)) + return (class == GR_REGS ? NO_REGS : GR_REGS); + + /* For the same reason, we can only reload (sign_extend:DI FOO) into + a floating-point register when FOO is an integer register. */ + if (class == FP_REGS) + return (GP_REG_P (regno) ? NO_REGS : GR_REGS); } else if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG) *************** mips_secondary_reload_class (class, mode *** 8257,8262 **** --- 8577,8613 ---- return class == GR_REGS ? NO_REGS : GR_REGS; } + if (class == FP_REGS) + { + if (GET_CODE (x) == MEM) + { + /* In this case we can use lwc1, swc1, ldc1 or sdc1. */ + return NO_REGS; + } + else if (CONSTANT_P (x) && GET_MODE_CLASS (mode) == MODE_FLOAT) + { + /* We can use the l.s and l.d macros to load floating-point + constants. ??? For l.s, we could probably get better + code by returning GR_REGS here. */ + return NO_REGS; + } + else if (GP_REG_P (regno) || x == CONST0_RTX (mode)) + { + /* In this case we can use mtc1, mfc1, dmtc1 or dmfc1. */ + return NO_REGS; + } + else if (FP_REG_P (regno)) + { + /* In this case we can use mov.s or mov.d. */ + return NO_REGS; + } + else + { + /* Otherwise, we need to reload through an integer register. */ + return GR_REGS; + } + } + /* In mips16 mode, going between memory and anything but M16_REGS requires an M16_REG. */ if (TARGET_MIPS16) *************** mips_secondary_reload_class (class, mode *** 8290,8295 **** --- 8641,8660 ---- return NO_REGS; } + + /* This function returns the maximum number of consecutive registers + needed to represent mode MODE in registers of class CLASS. */ + + int + mips_class_max_nregs (class, mode) + enum reg_class class; + enum machine_mode mode; + { + if (class == FP_REGS) + return FP_INC; + else + return (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + } /* For each mips16 function which refers to GP relative symbols, we use a pseudo register, initialized at the start of the function, to *************** mips_secondary_reload_class (class, mode *** 8298,8310 **** rtx mips16_gp_pseudo_reg () { ! if (mips16_gp_pseudo_rtx == NULL_RTX) { rtx const_gp; rtx insn, scan; ! mips16_gp_pseudo_rtx = gen_reg_rtx (Pmode); ! RTX_UNCHANGING_P (mips16_gp_pseudo_rtx) = 1; /* We want to initialize this to a value which gcc will believe is constant. */ --- 8663,8675 ---- rtx mips16_gp_pseudo_reg () { ! if (cfun->machine->mips16_gp_pseudo_rtx == NULL_RTX) { rtx const_gp; rtx insn, scan; ! cfun->machine->mips16_gp_pseudo_rtx = gen_reg_rtx (Pmode); ! RTX_UNCHANGING_P (cfun->machine->mips16_gp_pseudo_rtx) = 1; /* We want to initialize this to a value which gcc will believe is constant. */ *************** mips16_gp_pseudo_reg () *** 8312,8319 **** gen_rtx (REG, Pmode, GP_REG_FIRST + 28)); start_sequence (); ! emit_move_insn (mips16_gp_pseudo_rtx, const_gp); ! insn = gen_sequence (); end_sequence (); push_topmost_sequence (); --- 8677,8685 ---- gen_rtx (REG, Pmode, GP_REG_FIRST + 28)); start_sequence (); ! emit_move_insn (cfun->machine->mips16_gp_pseudo_rtx, ! const_gp); ! insn = get_insns (); end_sequence (); push_topmost_sequence (); *************** mips16_gp_pseudo_reg () *** 8329,8335 **** pop_topmost_sequence (); } ! return mips16_gp_pseudo_rtx; } /* Return an RTX which represents the signed 16 bit offset from the --- 8695,8701 ---- pop_topmost_sequence (); } ! return cfun->machine->mips16_gp_pseudo_rtx; } /* Return an RTX which represents the signed 16 bit offset from the *************** mips16_constant (x, mode, addr, addend) *** 8534,8540 **** /* Write out code to move floating point arguments in or out of general registers. Output the instructions to FILE. FP_CODE is the code describing which arguments are present (see the comment at ! the definition of CUMULATIVE_ARGS in mips.h). FROM_FP_P is non-zero if we are copying from the floating point registers. */ static void --- 8900,8906 ---- /* Write out code to move floating point arguments in or out of general registers. Output the instructions to FILE. FP_CODE is the code describing which arguments are present (see the comment at ! the definition of CUMULATIVE_ARGS in mips.h). FROM_FP_P is nonzero if we are copying from the floating point registers. */ static void *************** build_mips16_call_stub (retval, fnmem, a *** 8732,8739 **** register. */ fpret = (retval != 0 && GET_MODE_CLASS (GET_MODE (retval)) == MODE_FLOAT ! && (! TARGET_SINGLE_FLOAT ! || GET_MODE_SIZE (GET_MODE (retval)) <= 4)); /* We don't need to do anything if there were no floating point arguments and the value will not be returned in a floating point --- 9098,9104 ---- register. */ fpret = (retval != 0 && GET_MODE_CLASS (GET_MODE (retval)) == MODE_FLOAT ! && GET_MODE_SIZE (GET_MODE (retval)) <= UNITS_PER_FPVALUE); /* We don't need to do anything if there were no floating point arguments and the value will not be returned in a floating point *************** machine_dependent_reorg (first) *** 9420,9428 **** } } ! /* Store the original value of insns_len in current_frame_info, so that simple_memory_operand can look at it. */ ! current_frame_info.insns_len = insns_len; pool_size = get_pool_size (); if (insns_len + pool_size + mips_string_length < 0x8000) --- 9785,9793 ---- } } ! /* Store the original value of insns_len in cfun->machine, so that simple_memory_operand can look at it. */ ! cfun->machine->insns_len = insns_len; pool_size = get_pool_size (); if (insns_len + pool_size + mips_string_length < 0x8000) *************** highpart_shift_operator (x, mode) *** 9604,9609 **** --- 9969,10074 ---- || code == ROTATE); } + /* Return a number assessing the cost of moving a register in class + FROM to class TO. The classes are expressed using the enumeration + values such as `GENERAL_REGS'. A value of 2 is the default; other + values are interpreted relative to that. + + It is not required that the cost always equal 2 when FROM is the + same as TO; on some machines it is expensive to move between + registers if they are not general registers. + + If reload sees an insn consisting of a single `set' between two + hard registers, and if `REGISTER_MOVE_COST' applied to their + classes returns a value of 2, reload does not check to ensure that + the constraints of the insn are met. Setting a cost of other than + 2 will allow reload to verify that the constraints are met. You + should do this if the `movM' pattern's constraints do not allow + such copying. + + ??? We make make the cost of moving from HI/LO/HILO/MD into general + registers the same as for one of moving general registers to + HI/LO/HILO/MD for TARGET_MIPS16 in order to prevent allocating a + pseudo to HI/LO/HILO/MD. This might hurt optimizations though, it + isn't clear if it is wise. And it might not work in all cases. We + could solve the DImode LO reg problem by using a multiply, just + like reload_{in,out}si. We could solve the SImode/HImode HI reg + problem by using divide instructions. divu puts the remainder in + the HI reg, so doing a divide by -1 will move the value in the HI + reg for all values except -1. We could handle that case by using a + signed divide, e.g. -1 / 2 (or maybe 1 / -2?). We'd have to emit + a compare/branch to test the input value to see which instruction + we need to use. This gets pretty messy, but it is feasible. */ + + int + mips_register_move_cost (mode, to, from) + enum machine_mode mode ATTRIBUTE_UNUSED; + enum reg_class to, from; + { + if (from == M16_REGS && GR_REG_CLASS_P (to)) + return 2; + else if (from == M16_NA_REGS && GR_REG_CLASS_P (to)) + return 2; + else if (GR_REG_CLASS_P (from)) + { + if (to == M16_REGS) + return 2; + else if (to == M16_NA_REGS) + return 2; + else if (GR_REG_CLASS_P (to)) + { + if (TARGET_MIPS16) + return 4; + else + return 2; + } + else if (to == FP_REGS) + return 4; + else if (to == HI_REG || to == LO_REG || to == MD_REGS + || to == HILO_REG) + { + if (TARGET_MIPS16) + return 12; + else + return 6; + } + else if (COP_REG_CLASS_P (to)) + { + return 5; + } + } /* GR_REG_CLASS_P (from) */ + else if (from == FP_REGS) + { + if (GR_REG_CLASS_P (to)) + return 4; + else if (to == FP_REGS) + return 2; + else if (to == ST_REGS) + return 8; + } /* from == FP_REGS */ + else if (from == HI_REG || from == LO_REG || from == MD_REGS + || from == HILO_REG) + { + if (GR_REG_CLASS_P (to)) + { + if (TARGET_MIPS16) + return 12; + else + return 6; + } + } /* from == HI_REG, etc. */ + else if (from == ST_REGS && GR_REG_CLASS_P (to)) + return 4; + else if (COP_REG_CLASS_P (from)) + { + return 5; + } /* COP_REG_CLASS_P (from) */ + + /* fallthru */ + + return 12; + } + /* Return the length of INSN. LENGTH is the initial length computed by attributes in the machine-description file. */ *************** mips_adjust_insn_length (insn, length) *** 9632,9642 **** INSN is the branch instruction. OPERANDS[0] is the condition. OPERANDS[1] is the target of the branch. OPERANDS[2] is the target of the first operand to the condition. If TWO_OPERANDS_P is ! non-zero the comparison takes two operands; OPERANDS[3] will be the second operand. ! If INVERTED_P is non-zero we are to branch if the condition does ! not hold. If FLOAT_P is non-zero this is a floating-point comparison. LENGTH is the length (in bytes) of the sequence we are to generate. That tells us whether to generate a simple conditional branch, or a --- 10097,10107 ---- INSN is the branch instruction. OPERANDS[0] is the condition. OPERANDS[1] is the target of the branch. OPERANDS[2] is the target of the first operand to the condition. If TWO_OPERANDS_P is ! nonzero the comparison takes two operands; OPERANDS[3] will be the second operand. ! If INVERTED_P is nonzero we are to branch if the condition does ! not hold. If FLOAT_P is nonzero this is a floating-point comparison. LENGTH is the length (in bytes) of the sequence we are to generate. That tells us whether to generate a simple conditional branch, or a *************** mips_output_conditional_branch (insn, *** 9658,9664 **** static char buffer[200]; /* The kind of comparison we are doing. */ enum rtx_code code = GET_CODE (operands[0]); ! /* Non-zero if the opcode for the comparison needs a `z' indicating that it is a comparision against zero. */ int need_z_p; /* A string to use in the assembly output to represent the first --- 10123,10129 ---- static char buffer[200]; /* The kind of comparison we are doing. */ enum rtx_code code = GET_CODE (operands[0]); ! /* Nonzero if the opcode for the comparison needs a `z' indicating that it is a comparision against zero. */ int need_z_p; /* A string to use in the assembly output to represent the first *************** mips_output_conditional_branch (insn, *** 9685,9691 **** subtract B from A and then look at the sign bit. But, if we are doing an unsigned comparison, and B is zero, we don't have to do the subtraction. Instead, we can just check to ! see if A is non-zero. Thus, we change the CODE here to reflect the simpler comparison operation. */ switch (code) { --- 10150,10156 ---- subtract B from A and then look at the sign bit. But, if we are doing an unsigned comparison, and B is zero, we don't have to do the subtraction. Instead, we can just check to ! see if A is nonzero. Thus, we change the CODE here to reflect the simpler comparison operation. */ switch (code) { *************** mips_output_conditional_branch (insn, *** 9746,9751 **** --- 10211,10218 ---- case 12: case 16: + case 24: + case 28: { /* Generate a reversed conditional branch around ` j' instruction: *************** mips_output_conditional_branch (insn, *** 9753,9770 **** .set noreorder .set nomacro bc l ! nop j target .set macro .set reorder l: */ rtx orig_target; rtx target = gen_label_rtx (); - output_asm_insn ("%(%<", 0); orig_target = operands[1]; operands[1] = target; /* Generate the reversed comparison. This takes four --- 10220,10260 ---- .set noreorder .set nomacro bc l ! delay_slot or #nop j target + #nop + l: .set macro .set reorder + + If the original branch was a likely branch, the delay slot + must be executed only if the branch is taken, so generate: + + .set noreorder + .set nomacro + bc l + #nop + j target + delay slot or #nop l: + .set macro + .set reorder + + When generating non-embedded PIC, instead of: + + j target + + we emit: + .set noat + la $at, target + jr $at + .set at */ rtx orig_target; rtx target = gen_label_rtx (); orig_target = operands[1]; operands[1] = target; /* Generate the reversed comparison. This takes four *************** mips_output_conditional_branch (insn, *** 9779,9791 **** op1, op2); output_asm_insn (buffer, operands); - operands[1] = orig_target; ! output_asm_insn ("nop\n\tj\t%1", operands); ! if (length == 16) ! output_asm_insn ("nop", 0); ! else { /* Output delay slot instruction. */ rtx insn = final_sequence; --- 10269,10297 ---- op1, op2); output_asm_insn (buffer, operands); ! if (length != 16 && length != 28 && ! mips_branch_likely) ! { ! /* Output delay slot instruction. */ ! rtx insn = final_sequence; ! final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, ! optimize, 0, 1); ! INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; ! } ! else ! output_asm_insn ("%#", 0); ! if (length <= 16) ! output_asm_insn ("j\t%0", &orig_target); ! else ! { ! if (Pmode == DImode) ! output_asm_insn ("%[dla\t%@,%0\n\tjr\t%@%]", &orig_target); ! else ! output_asm_insn ("%[la\t%@,%0\n\tjr\t%@%]", &orig_target); ! } ! ! if (length != 16 && length != 28 && mips_branch_likely) { /* Output delay slot instruction. */ rtx insn = final_sequence; *************** mips_output_conditional_branch (insn, *** 9793,9801 **** optimize, 0, 1); INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; } ! output_asm_insn ("%>%)", 0); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (target)); return ""; } --- 10299,10310 ---- optimize, 0, 1); INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; } ! else ! output_asm_insn ("%#", 0); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (target)); + return ""; } *************** mips_output_conditional_branch (insn, *** 9895,10012 **** /* NOTREACHED */ return 0; } ! /* Called to register all of our global variables with the garbage ! collector. */ ! static void ! mips_add_gc_roots () { ! ggc_add_rtx_root (&mips_load_reg, 1); ! ggc_add_rtx_root (&mips_load_reg2, 1); ! ggc_add_rtx_root (&mips_load_reg3, 1); ! ggc_add_rtx_root (&mips_load_reg4, 1); ! ggc_add_rtx_root (branch_cmp, sizeof (branch_cmp) / sizeof (rtx)); ! ggc_add_rtx_root (&embedded_pic_fnaddr_rtx, 1); ! ggc_add_rtx_root (&mips16_gp_pseudo_rtx, 1); } ! static enum processor_type ! mips_parse_cpu (cpu_string) ! const char *cpu_string; { ! const char *p = cpu_string; ! int seen_v = 0; ! enum processor_type cpu; ! /* We need to cope with the various "vr" prefixes for the NEC 4300 ! and 4100 processors. */ ! if (*p == 'v' || *p == 'V') ! seen_v = 1, p++; ! if (*p == 'r' || *p == 'R') ! p++; ! /* Since there is no difference between a R2000 and R3000 in ! terms of the scheduler, we collapse them into just an R3000. */ - cpu = PROCESSOR_DEFAULT; - switch (*p) - { - case '2': - if (!strcmp (p, "2000") || !strcmp (p, "2k") || !strcmp (p, "2K")) - cpu = PROCESSOR_R3000; - else if (!strcmp (p, "20kc") || !strcmp (p, "20Kc") ) - cpu = PROCESSOR_R20KC; - break; ! case '3': ! if (!strcmp (p, "3000") || !strcmp (p, "3k") || !strcmp (p, "3K")) ! cpu = PROCESSOR_R3000; ! else if (!strcmp (p, "3900")) ! cpu = PROCESSOR_R3900; ! break; ! case '4': ! if (!strcmp (p, "4000") || !strcmp (p, "4k") || !strcmp (p, "4K")) ! cpu = PROCESSOR_R4000; ! /* The vr4100 is a non-FP ISA III processor with some extra ! instructions. */ ! else if (!strcmp (p, "4100")) ! cpu = PROCESSOR_R4100; ! /* The vr4300 is a standard ISA III processor, but with a different ! pipeline. */ ! else if (!strcmp (p, "4300")) ! cpu = PROCESSOR_R4300; ! /* The r4400 is exactly the same as the r4000 from the compiler's ! viewpoint. */ ! else if (!strcmp (p, "4400")) ! cpu = PROCESSOR_R4000; ! else if (!strcmp (p, "4600")) ! cpu = PROCESSOR_R4600; ! else if (!strcmp (p, "4650")) ! cpu = PROCESSOR_R4650; ! /* The 4kc and 4kp processor cores are the same for ! scheduling purposes; they both implement the MIPS32 ! ISA and only differ in their memory management ! methods. */ ! else if (!strcmp (p, "4kc") || !strcmp (p, "4Kc") ! || !strcmp (p, "4kp") || !strcmp (p, "4Kp") ) ! cpu = PROCESSOR_R4KC; ! break; ! case '5': ! if (!strcmp (p, "5000") || !strcmp (p, "5k") || !strcmp (p, "5K")) ! cpu = PROCESSOR_R5000; ! else if (!strcmp (p, "5kc") || !strcmp (p, "5Kc") ) ! cpu = PROCESSOR_R5KC; ! break; ! case '6': ! if (!strcmp (p, "6000") || !strcmp (p, "6k") || !strcmp (p, "6K")) ! cpu = PROCESSOR_R6000; ! break; ! case '8': ! if (!strcmp (p, "8000")) ! cpu = PROCESSOR_R8000; ! break; ! case 'o': ! if (!strcmp (p, "orion")) ! cpu = PROCESSOR_R4600; ! break; ! } ! if (seen_v ! && cpu != PROCESSOR_R4300 ! && cpu != PROCESSOR_R4100 ! && cpu != PROCESSOR_R5000) ! cpu = PROCESSOR_DEFAULT; ! return cpu; } /* Adjust the cost of INSN based on the relationship between INSN that is dependent on DEP_INSN through the dependence LINK. The default is to make no adjustment to COST. --- 10404,10523 ---- /* NOTREACHED */ return 0; } + + /* Return true if GIVEN is the same as CANONICAL, or if it is CANONICAL + with a final "000" replaced by "k". Ignore case. ! Note: this function is shared between GCC and GAS. */ ! static bool ! mips_strict_matching_cpu_name_p (canonical, given) ! const char *canonical, *given; { ! while (*given != 0 && TOLOWER (*given) == TOLOWER (*canonical)) ! given++, canonical++; ! ! return ((*given == 0 && *canonical == 0) ! || (strcmp (canonical, "000") == 0 && strcasecmp (given, "k") == 0)); } ! ! /* Return true if GIVEN matches CANONICAL, where GIVEN is a user-supplied ! CPU name. We've traditionally allowed a lot of variation here. ! ! Note: this function is shared between GCC and GAS. */ ! ! static bool ! mips_matching_cpu_name_p (canonical, given) ! const char *canonical, *given; { ! /* First see if the name matches exactly, or with a final "000" ! turned into "k". */ ! if (mips_strict_matching_cpu_name_p (canonical, given)) ! return true; ! /* If not, try comparing based on numerical designation alone. ! See if GIVEN is an unadorned number, or 'r' followed by a number. */ ! if (TOLOWER (*given) == 'r') ! given++; ! if (!ISDIGIT (*given)) ! return false; ! /* Skip over some well-known prefixes in the canonical name, ! hoping to find a number there too. */ ! if (TOLOWER (canonical[0]) == 'v' && TOLOWER (canonical[1]) == 'r') ! canonical += 2; ! else if (TOLOWER (canonical[0]) == 'r' && TOLOWER (canonical[1]) == 'm') ! canonical += 2; ! else if (TOLOWER (canonical[0]) == 'r') ! canonical += 1; ! return mips_strict_matching_cpu_name_p (canonical, given); ! } ! /* Parse an option that takes the name of a processor as its argument. ! OPTION is the name of the option and CPU_STRING is the argument. ! Return the corresponding processor enumeration if the CPU_STRING is ! recognized, otherwise report an error and return null. ! A similar function exists in GAS. */ ! static const struct mips_cpu_info * ! mips_parse_cpu (option, cpu_string) ! const char *option, *cpu_string; ! { ! const struct mips_cpu_info *p; ! const char *s; ! /* In the past, we allowed upper-case CPU names, but it doesn't ! work well with the multilib machinery. */ ! for (s = cpu_string; *s != 0; s++) ! if (ISUPPER (*s)) ! { ! warning ("the cpu name must be lower case"); ! break; ! } ! /* 'from-abi' selects the most compatible architecture for the given ! ABI: MIPS I for 32-bit ABIs and MIPS III for 64-bit ABIs. For the ! EABIs, we have to decide whether we're using the 32-bit or 64-bit ! version. Look first at the -mgp options, if given, otherwise base ! the choice on MASK_64BIT in TARGET_DEFAULT. */ ! if (strcasecmp (cpu_string, "from-abi") == 0) ! return mips_cpu_info_from_isa (ABI_NEEDS_32BIT_REGS ? 1 ! : ABI_NEEDS_64BIT_REGS ? 3 ! : (TARGET_64BIT ? 3 : 1)); ! /* 'default' has traditionally been a no-op. Probably not very useful. */ ! if (strcasecmp (cpu_string, "default") == 0) ! return 0; ! for (p = mips_cpu_info_table; p->name != 0; p++) ! if (mips_matching_cpu_name_p (p->name, cpu_string)) ! return p; ! error ("bad value (%s) for %s", cpu_string, option); ! return 0; } + + /* Return the processor associated with the given ISA level, or null + if the ISA isn't valid. */ + + static const struct mips_cpu_info * + mips_cpu_info_from_isa (isa) + int isa; + { + const struct mips_cpu_info *p; + + for (p = mips_cpu_info_table; p->name != 0; p++) + if (p->isa == isa) + return p; + + return 0; + } + /* Adjust the cost of INSN based on the relationship between INSN that is dependent on DEP_INSN through the dependence LINK. The default is to make no adjustment to COST. *************** mips_adjust_cost (insn, link, dep, cost) *** 10024,10032 **** return cost; } ! /* Cover function for UNIQUE_SECTION. */ ! void mips_unique_section (decl, reloc) tree decl; int reloc; --- 10535,10544 ---- return cost; } ! /* ??? This could be replaced with the default elf version if ! TARGET_IS_SMALL_DATA_P is set properly. */ ! static void mips_unique_section (decl, reloc) tree decl; int reloc; *************** mips_unique_section (decl, reloc) *** 10042,10047 **** --- 10554,10560 ---- }; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + name = (* targetm.strip_name_encoding) (name); size = int_size_in_bytes (TREE_TYPE (decl)); /* Determine the base section we are interested in: *************** mips_unique_section (decl, reloc) *** 10068,10074 **** read-only data if possible, in order to reduce RAM usage. */ ! if (DECL_READONLY_SECTION (decl, reloc)) sec = 1; else if (size > 0 && size <= mips_section_threshold) sec = 3; --- 10581,10587 ---- read-only data if possible, in order to reduce RAM usage. */ ! if (decl_readonly_section (decl, reloc)) sec = 1; else if (size > 0 && size <= mips_section_threshold) sec = 3; *************** mips_unique_section (decl, reloc) *** 10083,10089 **** if (size > 0 && size <= mips_section_threshold) sec = 3; ! else if (DECL_READONLY_SECTION (decl, reloc)) sec = 1; else sec = 2; --- 10596,10602 ---- if (size > 0 && size <= mips_section_threshold) sec = 3; ! else if (decl_readonly_section (decl, reloc)) sec = 1; else sec = 2; *************** mips_hard_regno_nregs (regno, mode) *** 10108,10113 **** --- 10621,10709 ---- return ((GET_MODE_SIZE (mode) + UNITS_PER_FPREG - 1) / UNITS_PER_FPREG); } + int + mips_return_in_memory (type) + tree type; + { + /* Under the old (i.e., 32 and O64 ABIs) all BLKmode objects are + returned in memory. Under the new (N32 and 64-bit MIPS ABIs) small + structures are returned in a register. Objects with varying size + must still be returned in memory, of course. */ + + if (mips_abi == ABI_32 || mips_abi == ABI_O64) + return (TYPE_MODE (type) == BLKmode); + else + return ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD)) + || (int_size_in_bytes (type) == -1)); + } + + static int + mips_issue_rate () + { + switch (mips_tune) + { + case PROCESSOR_R3000: return 1; + case PROCESSOR_R5400: return 2; + case PROCESSOR_R5500: return 2; + + default: + return 1; + } + + abort (); + + } + + /* Implements TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE. Return true for + processors that have a DFA pipeline description. */ + + static int + mips_use_dfa_pipeline_interface () + { + switch (mips_tune) + { + case PROCESSOR_R5400: + case PROCESSOR_R5500: + case PROCESSOR_SR71000: + return true; + + default: + return false; + } + } + + + const char * + mips_emit_prefetch (operands) + rtx operands[]; + { + /* For the mips32/64 architectures the hint fields are arranged + by operation (load/store) and locality (normal/streamed/retained). + Irritatingly, numbers 2 and 3 are reserved leaving no simple + algorithm for figuring the hint. */ + + int write = INTVAL (operands[1]); + int locality = INTVAL (operands[2]); + + static const char * const alt[2][4] = { + { + "pref\t4,%a0", + "pref\t0,%a0", + "pref\t0,%a0", + "pref\t6,%a0" + }, + { + "pref\t5,%a0", + "pref\t1,%a0", + "pref\t1,%a0", + "pref\t7,%a0" + } + }; + + return alt[write][locality]; + } + + #ifdef TARGET_IRIX6 /* Output assembly to switch to section NAME with attribute FLAGS. */ *************** iris6_asm_file_end (stream) *** 10268,10270 **** --- 10864,10868 ---- mips_asm_file_end (stream); } #endif /* TARGET_IRIX6 */ + + #include "gt-mips.h" diff -Nrc3pad gcc-3.2.3/gcc/config/mips/mips.h gcc-3.3/gcc/config/mips/mips.h *** gcc-3.2.3/gcc/config/mips/mips.h 2003-02-12 15:25:48.000000000 +0000 --- gcc-3.3/gcc/config/mips/mips.h 2003-02-28 10:41:20.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler. MIPS version. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998 ! 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by A. Lichnewsky (lich@inria.inria.fr). Changed by Michael Meissner (meissner@osf.org). 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and --- 1,6 ---- /* Definitions of target machine for GNU compiler. MIPS version. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998 ! 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by A. Lichnewsky (lich@inria.inria.fr). Changed by Michael Meissner (meissner@osf.org). 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and *************** enum processor_type { *** 63,86 **** PROCESSOR_R6000, PROCESSOR_R4000, PROCESSOR_R4100, PROCESSOR_R4300, PROCESSOR_R4600, PROCESSOR_R4650, PROCESSOR_R5000, PROCESSOR_R8000, PROCESSOR_R4KC, PROCESSOR_R5KC, ! PROCESSOR_R20KC }; /* Recast the cpu class to be the cpu attribute. */ #define mips_cpu_attr ((enum attr_cpu)mips_tune) ! /* Which ABI to use. These are constants because abi64.h must check their ! value at preprocessing time. ! ! ABI_32 (original 32, or o32), ABI_N32 (n32), ABI_64 (n64) are all ! defined by SGI. ABI_O64 is o32 extended to work on a 64 bit machine. */ #define ABI_32 0 #define ABI_N32 1 --- 63,90 ---- PROCESSOR_R6000, PROCESSOR_R4000, PROCESSOR_R4100, + PROCESSOR_R4111, + PROCESSOR_R4120, PROCESSOR_R4300, PROCESSOR_R4600, PROCESSOR_R4650, PROCESSOR_R5000, + PROCESSOR_R5400, + PROCESSOR_R5500, PROCESSOR_R8000, PROCESSOR_R4KC, PROCESSOR_R5KC, ! PROCESSOR_R20KC, ! PROCESSOR_SR71000, ! PROCESSOR_SB1 }; /* Recast the cpu class to be the cpu attribute. */ #define mips_cpu_attr ((enum attr_cpu)mips_tune) ! /* Which ABI to use. ABI_32 (original 32, or o32), ABI_N32 (n32), ! ABI_64 (n64) are all defined by SGI. ABI_O64 is o32 extended ! to work on a 64 bit machine. */ #define ABI_32 0 #define ABI_N32 1 *************** enum block_move_type { *** 118,123 **** --- 122,144 ---- BLOCK_MOVE_LAST /* generate just the last store */ }; + /* Information about one recognized processor. Defined here for the + benefit of TARGET_CPU_CPP_BUILTINS. */ + struct mips_cpu_info { + /* The 'canonical' name of the processor as far as GCC is concerned. + It's typically a manufacturer's prefix followed by a numerical + designation. It should be lower case. */ + const char *name; + + /* The internal processor number that most closely matches this + entry. Several processors can have the same value, if there's no + difference between them from GCC's point of view. */ + enum processor_type cpu; + + /* The ISA level that the processor implements. */ + int isa; + }; + extern char mips_reg_names[][8]; /* register names (a0 vs. $4). */ extern char mips_print_operand_punct[256]; /* print_operand punctuation chars */ extern const char *current_function_file; /* filename current function is in */ *************** extern int set_noat; /* # of nested .s *** 137,143 **** extern int set_volatile; /* # of nested .set volatile's */ extern int mips_branch_likely; /* emit 'l' after br (branch likely) */ extern int mips_dbx_regno[]; /* Map register # to debug register # */ ! extern struct rtx_def *branch_cmp[2]; /* operands for compare */ extern enum cmp_type branch_type; /* what type of branch to use */ extern enum processor_type mips_arch; /* which cpu to codegen for */ extern enum processor_type mips_tune; /* which cpu to schedule for */ --- 158,164 ---- extern int set_volatile; /* # of nested .set volatile's */ extern int mips_branch_likely; /* emit 'l' after br (branch likely) */ extern int mips_dbx_regno[]; /* Map register # to debug register # */ ! extern GTY(()) rtx branch_cmp[2]; /* operands for compare */ extern enum cmp_type branch_type; /* what type of branch to use */ extern enum processor_type mips_arch; /* which cpu to codegen for */ extern enum processor_type mips_tune; /* which cpu to schedule for */ *************** extern int mips_isa; /* architectural *** 146,159 **** extern int mips16; /* whether generating mips16 code */ extern int mips16_hard_float; /* mips16 without -msoft-float */ extern int mips_entry; /* generate entry/exit for mips16 */ - extern const char *mips_cpu_string; /* for -mcpu= */ extern const char *mips_arch_string; /* for -march= */ extern const char *mips_tune_string; /* for -mtune= */ extern const char *mips_isa_string; /* for -mips{1,2,3,4} */ extern const char *mips_abi_string; /* for -mabi={32,n32,64} */ extern const char *mips_entry_string; /* for -mentry */ extern const char *mips_no_mips16_string;/* for -mno-mips16 */ - extern const char *mips_explicit_type_size_string;/* for -mexplicit-type-size */ extern const char *mips_cache_flush_func;/* for -mflush-func= and -mno-flush-func */ extern int mips_split_addresses; /* perform high/lo_sum support */ extern int dslots_load_total; /* total # load related delay slots */ --- 167,178 ---- *************** extern int dslots_jump_total; /* total *** 162,194 **** extern int dslots_jump_filled; /* # filled jump delay slots */ extern int dslots_number_nops; /* # of nops needed by previous insn */ extern int num_refs[3]; /* # 1/2/3 word references */ ! extern struct rtx_def *mips_load_reg; /* register to check for load delay */ ! extern struct rtx_def *mips_load_reg2; /* 2nd reg to check for load delay */ ! extern struct rtx_def *mips_load_reg3; /* 3rd reg to check for load delay */ ! extern struct rtx_def *mips_load_reg4; /* 4th reg to check for load delay */ ! extern struct rtx_def *embedded_pic_fnaddr_rtx; /* function address */ extern int mips_string_length; /* length of strings for mips16 */ ! extern struct rtx_def *mips16_gp_pseudo_rtx; /* psuedo reg holding $gp */ /* Functions to change what output section we are using. */ - extern void rdata_section PARAMS ((void)); extern void sdata_section PARAMS ((void)); extern void sbss_section PARAMS ((void)); - /* Stubs for half-pic support if not OSF/1 reference platform. */ - - #ifndef HALF_PIC_P - #define HALF_PIC_P() 0 - #define HALF_PIC_NUMBER_PTRS 0 - #define HALF_PIC_NUMBER_REFS 0 - #define HALF_PIC_ENCODE(DECL) - #define HALF_PIC_DECLARE(NAME) - #define HALF_PIC_INIT() error ("half-pic init called on systems that don't support it") - #define HALF_PIC_ADDRESS_P(X) 0 - #define HALF_PIC_PTR(X) X - #define HALF_PIC_FINISH(STREAM) - #endif - /* Macros to silence warnings about numbers being signed in traditional C and unsigned in ISO C when compiled on 32-bit hosts. */ --- 181,199 ---- extern int dslots_jump_filled; /* # filled jump delay slots */ extern int dslots_number_nops; /* # of nops needed by previous insn */ extern int num_refs[3]; /* # 1/2/3 word references */ ! extern GTY(()) rtx mips_load_reg; /* register to check for load delay */ ! extern GTY(()) rtx mips_load_reg2; /* 2nd reg to check for load delay */ ! extern GTY(()) rtx mips_load_reg3; /* 3rd reg to check for load delay */ ! extern GTY(()) rtx mips_load_reg4; /* 4th reg to check for load delay */ extern int mips_string_length; /* length of strings for mips16 */ ! extern const struct mips_cpu_info mips_cpu_info_table[]; ! extern const struct mips_cpu_info *mips_arch_info; ! extern const struct mips_cpu_info *mips_tune_info; /* Functions to change what output section we are using. */ extern void sdata_section PARAMS ((void)); extern void sbss_section PARAMS ((void)); /* Macros to silence warnings about numbers being signed in traditional C and unsigned in ISO C when compiled on 32-bit hosts. */ *************** extern void sbss_section PARAMS ((void) *** 213,219 **** #define MASK_SOFT_FLOAT 0x00000100 /* software floating point */ #define MASK_FLOAT64 0x00000200 /* fp registers are 64 bits */ #define MASK_ABICALLS 0x00000400 /* emit .abicalls/.cprestore/.cpload */ ! #define MASK_HALF_PIC 0x00000800 /* Emit OSF-style pic refs to externs*/ #define MASK_LONG_CALLS 0x00001000 /* Always call through a register */ #define MASK_64BIT 0x00002000 /* Use 64 bit GP registers and insns */ #define MASK_EMBEDDED_PIC 0x00004000 /* Generate embedded PIC code */ --- 218,224 ---- #define MASK_SOFT_FLOAT 0x00000100 /* software floating point */ #define MASK_FLOAT64 0x00000200 /* fp registers are 64 bits */ #define MASK_ABICALLS 0x00000400 /* emit .abicalls/.cprestore/.cpload */ ! #define MASK_UNUSED1 0x00000800 /* Unused Mask. */ #define MASK_LONG_CALLS 0x00001000 /* Always call through a register */ #define MASK_64BIT 0x00002000 /* Use 64 bit GP registers and insns */ #define MASK_EMBEDDED_PIC 0x00004000 /* Generate embedded PIC code */ *************** extern void sbss_section PARAMS ((void) *** 232,237 **** --- 237,244 ---- consts in rodata */ #define MASK_NO_FUSED_MADD 0x01000000 /* Don't generate floating point multiply-add operations. */ + #define MASK_BRANCHLIKELY 0x02000000 /* Generate Branch Likely + instructions. */ /* Debug switches, not documented */ #define MASK_DEBUG 0 /* unused */ *************** extern void sbss_section PARAMS ((void) *** 242,248 **** #define MASK_DEBUG_E 0 /* function_arg debug */ #define MASK_DEBUG_F 0 /* ??? */ #define MASK_DEBUG_G 0 /* don't support 64 bit arithmetic */ - #define MASK_DEBUG_H 0 /* allow ints in FP registers */ #define MASK_DEBUG_I 0 /* unused */ /* Dummy switches used only in specs */ --- 249,254 ---- *************** extern void sbss_section PARAMS ((void) *** 270,276 **** #define TARGET_DEBUG_E_MODE (target_flags & MASK_DEBUG_E) #define TARGET_DEBUG_F_MODE (target_flags & MASK_DEBUG_F) #define TARGET_DEBUG_G_MODE (target_flags & MASK_DEBUG_G) - #define TARGET_DEBUG_H_MODE (target_flags & MASK_DEBUG_H) #define TARGET_DEBUG_I_MODE (target_flags & MASK_DEBUG_I) /* Reg. Naming in .s ($21 vs. $a0) */ --- 276,281 ---- *************** extern void sbss_section PARAMS ((void) *** 288,296 **** /* .abicalls, etc from Pyramid V.4 */ #define TARGET_ABICALLS (target_flags & MASK_ABICALLS) - /* OSF pic references to externs */ - #define TARGET_HALF_PIC (target_flags & MASK_HALF_PIC) - /* software floating point */ #define TARGET_SOFT_FLOAT (target_flags & MASK_SOFT_FLOAT) #define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) --- 293,298 ---- *************** extern void sbss_section PARAMS ((void) *** 327,332 **** --- 329,336 ---- #define TARGET_NO_CHECK_ZERO_DIV (target_flags & MASK_NO_CHECK_ZERO_DIV) #define TARGET_CHECK_RANGE_DIV (target_flags & MASK_CHECK_RANGE_DIV) + #define TARGET_BRANCHLIKELY (target_flags & MASK_BRANCHLIKELY) + /* This is true if we must enable the assembly language file switching code. */ *************** extern void sbss_section PARAMS ((void) *** 341,360 **** --- 345,520 ---- /* Generate mips16 code */ #define TARGET_MIPS16 (target_flags & MASK_MIPS16) + /* Generic ISA defines. */ + #define ISA_MIPS1 (mips_isa == 1) + #define ISA_MIPS2 (mips_isa == 2) + #define ISA_MIPS3 (mips_isa == 3) + #define ISA_MIPS4 (mips_isa == 4) + #define ISA_MIPS32 (mips_isa == 32) + #define ISA_MIPS64 (mips_isa == 64) + /* Architecture target defines. */ #define TARGET_MIPS3900 (mips_arch == PROCESSOR_R3900) #define TARGET_MIPS4000 (mips_arch == PROCESSOR_R4000) #define TARGET_MIPS4100 (mips_arch == PROCESSOR_R4100) + #define TARGET_MIPS4120 (mips_arch == PROCESSOR_R4120) #define TARGET_MIPS4300 (mips_arch == PROCESSOR_R4300) #define TARGET_MIPS4KC (mips_arch == PROCESSOR_R4KC) #define TARGET_MIPS5KC (mips_arch == PROCESSOR_R5KC) + #define TARGET_MIPS5400 (mips_arch == PROCESSOR_R5400) + #define TARGET_MIPS5500 (mips_arch == PROCESSOR_R5500) + #define TARGET_SB1 (mips_arch == PROCESSOR_SB1) + #define TARGET_SR71K (mips_arch == PROCESSOR_SR71000) /* Scheduling target defines. */ #define TUNE_MIPS3000 (mips_tune == PROCESSOR_R3000) #define TUNE_MIPS3900 (mips_tune == PROCESSOR_R3900) #define TUNE_MIPS4000 (mips_tune == PROCESSOR_R4000) #define TUNE_MIPS5000 (mips_tune == PROCESSOR_R5000) + #define TUNE_MIPS5400 (mips_tune == PROCESSOR_R5400) + #define TUNE_MIPS5500 (mips_tune == PROCESSOR_R5500) #define TUNE_MIPS6000 (mips_tune == PROCESSOR_R6000) + #define TUNE_SB1 (mips_tune == PROCESSOR_SB1) + #define TUNE_SR71K (mips_tune == PROCESSOR_SR71000) + + /* Define preprocessor macros for the -march and -mtune options. + PREFIX is either _MIPS_ARCH or _MIPS_TUNE, INFO is the selected + processor. If INFO's canonical name is "foo", define PREFIX to + be "foo", and define an additional macro PREFIX_FOO. */ + #define MIPS_CPP_SET_PROCESSOR(PREFIX, INFO) \ + do \ + { \ + char *macro, *p; \ + \ + macro = concat ((PREFIX), "_", (INFO)->name, NULL); \ + for (p = macro; *p != 0; p++) \ + *p = TOUPPER (*p); \ + \ + builtin_define (macro); \ + builtin_define_with_value ((PREFIX), (INFO)->name, 1); \ + free (macro); \ + } \ + while (0) + + /* Target CPU builtins. */ + #define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + builtin_assert ("cpu=mips"); \ + builtin_define ("__mips__"); \ + builtin_define ("_mips"); \ + \ + /* We do this here because __mips is defined below \ + and so we can't use builtin_define_std. */ \ + if (!flag_iso) \ + builtin_define ("mips"); \ + \ + /* Treat _R3000 and _R4000 like register-size defines, \ + which is how they've historically been used. */ \ + if (TARGET_64BIT) \ + { \ + builtin_define ("__mips64"); \ + builtin_define_std ("R4000"); \ + builtin_define ("_R4000"); \ + } \ + else \ + { \ + builtin_define_std ("R3000"); \ + builtin_define ("_R3000"); \ + } \ + if (TARGET_FLOAT64) \ + builtin_define ("__mips_fpr=64"); \ + else \ + builtin_define ("__mips_fpr=32"); \ + \ + if (TARGET_MIPS16) \ + builtin_define ("__mips16"); \ + \ + MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \ + MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \ + \ + if (ISA_MIPS1) \ + { \ + builtin_define ("__mips=1"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS1"); \ + } \ + else if (ISA_MIPS2) \ + { \ + builtin_define ("__mips=2"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS2"); \ + } \ + else if (ISA_MIPS3) \ + { \ + builtin_define ("__mips=3"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS3"); \ + } \ + else if (ISA_MIPS4) \ + { \ + builtin_define ("__mips=4"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS4"); \ + } \ + else if (ISA_MIPS32) \ + { \ + builtin_define ("__mips=32"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS32"); \ + } \ + else if (ISA_MIPS64) \ + { \ + builtin_define ("__mips=64"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64"); \ + } \ + \ + if (TARGET_HARD_FLOAT) \ + builtin_define ("__mips_hard_float"); \ + else if (TARGET_SOFT_FLOAT) \ + builtin_define ("__mips_soft_float"); \ + \ + if (TARGET_SINGLE_FLOAT) \ + builtin_define ("__mips_single_float"); \ + \ + if (TARGET_BIG_ENDIAN) \ + { \ + builtin_define_std ("MIPSEB"); \ + builtin_define ("_MIPSEB"); \ + } \ + else \ + { \ + builtin_define_std ("MIPSEL"); \ + builtin_define ("_MIPSEL"); \ + } \ + \ + /* Macros dependent on the C dialect. */ \ + if (preprocessing_asm_p ()) \ + { \ + builtin_define_std ("LANGUAGE_ASSEMBLY"); \ + builtin_define ("_LANGUAGE_ASSEMBLY"); \ + } \ + else if (c_language == clk_c) \ + { \ + builtin_define_std ("LANGUAGE_C"); \ + builtin_define ("_LANGUAGE_C"); \ + } \ + else if (c_language == clk_cplusplus) \ + { \ + builtin_define ("_LANGUAGE_C_PLUS_PLUS"); \ + builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \ + builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \ + } \ + if (flag_objc) \ + { \ + builtin_define ("_LANGUAGE_OBJECTIVE_C"); \ + builtin_define ("__LANGUAGE_OBJECTIVE_C"); \ + /* Bizzare, but needed at least for Irix. */ \ + builtin_define_std ("LANGUAGE_C"); \ + builtin_define ("_LANGUAGE_C"); \ + } \ + \ + if (mips_abi == ABI_EABI) \ + builtin_define ("__mips_eabi"); \ + \ + } while (0) + + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** extern void sbss_section PARAMS ((void) *** 420,429 **** N_("Use Irix PIC")}, \ {"no-abicalls", -MASK_ABICALLS, \ N_("Don't use Irix PIC")}, \ - {"half-pic", MASK_HALF_PIC, \ - N_("Use OSF PIC")}, \ - {"no-half-pic", -MASK_HALF_PIC, \ - N_("Don't use OSF PIC")}, \ {"long-calls", MASK_LONG_CALLS, \ N_("Use indirect calls")}, \ {"no-long-calls", -MASK_LONG_CALLS, \ --- 580,585 ---- *************** extern void sbss_section PARAMS ((void) *** 460,469 **** N_("Work around early 4300 hardware bug")}, \ {"no-fix4300", -MASK_4300_MUL_FIX, \ N_("Don't work around early 4300 hardware bug")}, \ - {"3900", 0, \ - N_("Optimize for 3900")}, \ - {"4650", 0, \ - N_("Optimize for 4650")}, \ {"check-zero-division",-MASK_NO_CHECK_ZERO_DIV, \ N_("Trap on integer divide by zero")}, \ {"no-check-zero-division", MASK_NO_CHECK_ZERO_DIV, \ --- 616,621 ---- *************** extern void sbss_section PARAMS ((void) *** 472,477 **** --- 624,633 ---- N_("Trap on integer divide overflow")}, \ {"no-check-range-division",-MASK_CHECK_RANGE_DIV, \ N_("Don't trap on integer divide overflow")}, \ + { "branch-likely", MASK_BRANCHLIKELY, \ + N_("Use Branch Likely instructions, overriding default for arch")}, \ + { "no-branch-likely", -MASK_BRANCHLIKELY, \ + N_("Don't use Branch Likely instructions, overriding default for arch")}, \ {"debug", MASK_DEBUG, \ NULL}, \ {"debuga", MASK_DEBUG_A, \ *************** extern void sbss_section PARAMS ((void) *** 488,495 **** NULL}, \ {"debugg", MASK_DEBUG_G, \ NULL}, \ - {"debugh", MASK_DEBUG_H, \ - NULL}, \ {"debugi", MASK_DEBUG_I, \ NULL}, \ {"", (TARGET_DEFAULT \ --- 644,649 ---- *************** extern void sbss_section PARAMS ((void) *** 509,523 **** #endif #ifndef TARGET_ENDIAN_DEFAULT - #ifndef DECSTATION #define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN - #else - #define TARGET_ENDIAN_DEFAULT 0 - #endif #endif #ifndef MIPS_ISA_DEFAULT ! #define MIPS_ISA_DEFAULT 1 #endif #ifdef IN_LIBGCC2 --- 663,676 ---- #endif #ifndef TARGET_ENDIAN_DEFAULT #define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN #endif + /* 'from-abi' makes a good default: you get whatever the ABI requires. */ #ifndef MIPS_ISA_DEFAULT ! #ifndef MIPS_CPU_STRING_DEFAULT ! #define MIPS_CPU_STRING_DEFAULT "from-abi" ! #endif #endif #ifdef IN_LIBGCC2 *************** extern void sbss_section PARAMS ((void) *** 567,573 **** #endif #ifndef MULTILIB_DEFAULTS ! #define MULTILIB_DEFAULTS { MULTILIB_ENDIAN_DEFAULT, MULTILIB_ISA_DEFAULT } #endif /* We must pass -EL to the linker by default for little endian embedded --- 720,727 ---- #endif #ifndef MULTILIB_DEFAULTS ! #define MULTILIB_DEFAULTS \ ! { MULTILIB_ENDIAN_DEFAULT, MULTILIB_ISA_DEFAULT, MULTILIB_ABI_DEFAULT } #endif /* We must pass -EL to the linker by default for little endian embedded *************** extern void sbss_section PARAMS ((void) *** 586,605 **** #define TARGET_OPTIONS \ { \ SUBTARGET_TARGET_OPTIONS \ ! { "cpu=", &mips_cpu_string, \ ! N_("Specify CPU for scheduling purposes")}, \ ! { "tune=", &mips_tune_string, \ N_("Specify CPU for scheduling purposes")}, \ { "arch=", &mips_arch_string, \ N_("Specify CPU for code generation purposes")}, \ { "ips", &mips_isa_string, \ N_("Specify a Standard MIPS ISA")}, \ { "entry", &mips_entry_string, \ N_("Use mips16 entry/exit psuedo ops")}, \ { "no-mips16", &mips_no_mips16_string, \ N_("Don't use MIPS16 instructions")}, \ - { "explicit-type-size", &mips_explicit_type_size_string, \ - NULL}, \ { "no-flush-func", &mips_cache_flush_func, \ N_("Don't call any cache flush functions")}, \ { "flush-func=", &mips_cache_flush_func, \ --- 740,757 ---- #define TARGET_OPTIONS \ { \ SUBTARGET_TARGET_OPTIONS \ ! { "tune=", &mips_tune_string, \ N_("Specify CPU for scheduling purposes")}, \ { "arch=", &mips_arch_string, \ N_("Specify CPU for code generation purposes")}, \ + { "abi=", &mips_abi_string, \ + N_("Specify an ABI")}, \ { "ips", &mips_isa_string, \ N_("Specify a Standard MIPS ISA")}, \ { "entry", &mips_entry_string, \ N_("Use mips16 entry/exit psuedo ops")}, \ { "no-mips16", &mips_no_mips16_string, \ N_("Don't use MIPS16 instructions")}, \ { "no-flush-func", &mips_cache_flush_func, \ N_("Don't call any cache flush functions")}, \ { "flush-func=", &mips_cache_flush_func, \ *************** extern void sbss_section PARAMS ((void) *** 609,620 **** /* This is meant to be redefined in the host dependent files. */ #define SUBTARGET_TARGET_OPTIONS ! #define GENERATE_BRANCHLIKELY (!TARGET_MIPS16 && ISA_HAS_BRANCHLIKELY) /* Generate three-operand multiply instructions for SImode. */ #define GENERATE_MULT3_SI ((TARGET_MIPS3900 \ ! || mips_isa == 32 \ ! || mips_isa == 64) \ && !TARGET_MIPS16) /* Generate three-operand multiply instructions for DImode. */ --- 761,776 ---- /* This is meant to be redefined in the host dependent files. */ #define SUBTARGET_TARGET_OPTIONS ! #define GENERATE_BRANCHLIKELY (TARGET_BRANCHLIKELY \ ! && !TARGET_SR71K \ ! && !TARGET_MIPS16) /* Generate three-operand multiply instructions for SImode. */ #define GENERATE_MULT3_SI ((TARGET_MIPS3900 \ ! || TARGET_MIPS5400 \ ! || TARGET_MIPS5500 \ ! || ISA_MIPS32 \ ! || ISA_MIPS64) \ && !TARGET_MIPS16) /* Generate three-operand multiply instructions for DImode. */ *************** extern void sbss_section PARAMS ((void) *** 624,687 **** /* Macros to decide whether certain features are available or not, depending on the instruction set architecture level. */ ! #define BRANCH_LIKELY_P() GENERATE_BRANCHLIKELY ! #define HAVE_SQRT_P() (mips_isa != 1) /* ISA has instructions for managing 64 bit fp and gp regs (eg. mips3). */ ! #define ISA_HAS_64BIT_REGS (mips_isa == 3 \ ! || mips_isa == 4 \ ! || mips_isa == 64) /* ISA has branch likely instructions (eg. mips2). */ /* Disable branchlikely for tx39 until compare rewrite. They haven't been generated up to this point. */ ! #define ISA_HAS_BRANCHLIKELY (mips_isa != 1 \ ! /* || TARGET_MIPS3900 */) /* ISA has the conditional move instructions introduced in mips4. */ ! #define ISA_HAS_CONDMOVE (mips_isa == 4 \ ! || mips_isa == 32 \ ! || mips_isa == 64) /* ISA has just the integer condition move instructions (movn,movz) */ #define ISA_HAS_INT_CONDMOVE 0 - - /* ISA has the mips4 FP condition code instructions: FP-compare to CC, branch on CC, and move (both FP and non-FP) on CC. */ ! #define ISA_HAS_8CC (mips_isa == 4 \ ! || mips_isa == 32 \ ! || mips_isa == 64) ! /* This is a catch all for the other new mips4 instructions: indexed load and ! indexed prefetch instructions, the FP madd,msub,nmadd, and nmsub instructions, and the FP recip and recip sqrt instructions */ ! #define ISA_HAS_FP4 (mips_isa == 4 \ ! ) /* ISA has conditional trap instructions. */ ! #define ISA_HAS_COND_TRAP (mips_isa >= 2) ! /* ISA has multiply-accumulate instructions, madd and msub. */ ! #define ISA_HAS_MADD_MSUB (mips_isa == 32 \ ! || mips_isa == 64 \ ! ) ! /* ISA has nmadd and nmsub instructions. */ ! #define ISA_HAS_NMADD_NMSUB (mips_isa == 4 \ ! ) /* ISA has count leading zeroes/ones instruction (not implemented). */ ! #define ISA_HAS_CLZ_CLO (mips_isa == 32 \ ! || mips_isa == 64 \ ! ) /* ISA has double-word count leading zeroes/ones instruction (not implemented). */ ! #define ISA_HAS_DCLZ_DCLO (mips_isa == 64) /* CC1_SPEC causes -mips3 and -mips4 to set -mfp64 and -mgp64; -mips1 or -mips2 sets -mfp32 and -mgp32. This can be overridden by an explicit --- 780,907 ---- /* Macros to decide whether certain features are available or not, depending on the instruction set architecture level. */ ! #define HAVE_SQRT_P() (!ISA_MIPS1) ! ! /* True if the ABI can only work with 64-bit integer registers. We ! generally allow ad-hoc variations for TARGET_SINGLE_FLOAT, but ! otherwise floating-point registers must also be 64-bit. */ ! #define ABI_NEEDS_64BIT_REGS (mips_abi == ABI_64 \ ! || mips_abi == ABI_O64 \ ! || mips_abi == ABI_N32) ! ! /* Likewise for 32-bit regs. */ ! #define ABI_NEEDS_32BIT_REGS (mips_abi == ABI_32) /* ISA has instructions for managing 64 bit fp and gp regs (eg. mips3). */ ! #define ISA_HAS_64BIT_REGS (ISA_MIPS3 \ ! || ISA_MIPS4 \ ! || ISA_MIPS64) /* ISA has branch likely instructions (eg. mips2). */ /* Disable branchlikely for tx39 until compare rewrite. They haven't been generated up to this point. */ ! #define ISA_HAS_BRANCHLIKELY (!ISA_MIPS1 \ ! && !TARGET_MIPS5500) /* ISA has the conditional move instructions introduced in mips4. */ ! #define ISA_HAS_CONDMOVE ((ISA_MIPS4 \ ! || ISA_MIPS32 \ ! || ISA_MIPS64) \ ! && !TARGET_MIPS5500 \ ! && !TARGET_MIPS16) /* ISA has just the integer condition move instructions (movn,movz) */ #define ISA_HAS_INT_CONDMOVE 0 /* ISA has the mips4 FP condition code instructions: FP-compare to CC, branch on CC, and move (both FP and non-FP) on CC. */ ! #define ISA_HAS_8CC (ISA_MIPS4 \ ! || ISA_MIPS32 \ ! || ISA_MIPS64) /* This is a catch all for the other new mips4 instructions: indexed load and ! indexed prefetch instructions, the FP madd and msub instructions, and the FP recip and recip sqrt instructions */ ! #define ISA_HAS_FP4 ((ISA_MIPS4 \ ! || ISA_MIPS64) \ ! && !TARGET_MIPS16) /* ISA has conditional trap instructions. */ ! #define ISA_HAS_COND_TRAP (!ISA_MIPS1 \ ! && !TARGET_MIPS16) ! /* ISA has integer multiply-accumulate instructions, madd and msub. */ ! #define ISA_HAS_MADD_MSUB ((ISA_MIPS32 \ ! || ISA_MIPS64 \ ! ) && !TARGET_MIPS16) ! /* ISA has floating-point nmadd and nmsub instructions. */ ! #define ISA_HAS_NMADD_NMSUB ((ISA_MIPS4 \ ! || ISA_MIPS64) \ ! && (!TARGET_MIPS5400 || TARGET_MAD) \ ! && ! TARGET_MIPS16) /* ISA has count leading zeroes/ones instruction (not implemented). */ ! #define ISA_HAS_CLZ_CLO ((ISA_MIPS32 \ ! || ISA_MIPS64 \ ! ) && !TARGET_MIPS16) /* ISA has double-word count leading zeroes/ones instruction (not implemented). */ ! #define ISA_HAS_DCLZ_DCLO (ISA_MIPS64 \ ! && !TARGET_MIPS16) ! ! /* ISA has three operand multiply instructions that put ! the high part in an accumulator: mulhi or mulhiu. */ ! #define ISA_HAS_MULHI (TARGET_MIPS5400 \ ! || TARGET_MIPS5500 \ ! || TARGET_SR71K \ ! ) ! ! /* ISA has three operand multiply instructions that ! negates the result and puts the result in an accumulator. */ ! #define ISA_HAS_MULS (TARGET_MIPS5400 \ ! || TARGET_MIPS5500 \ ! || TARGET_SR71K \ ! ) + /* ISA has three operand multiply instructions that subtracts the + result from a 4th operand and puts the result in an accumulator. */ + #define ISA_HAS_MSAC (TARGET_MIPS5400 \ + || TARGET_MIPS5500 \ + || TARGET_SR71K \ + ) + /* ISA has three operand multiply instructions that the result + from a 4th operand and puts the result in an accumulator. */ + #define ISA_HAS_MACC (TARGET_MIPS5400 \ + || TARGET_MIPS5500 \ + || TARGET_SR71K \ + ) + + /* ISA has 32-bit rotate right instruction. */ + #define ISA_HAS_ROTR_SI (TARGET_MIPS5400 \ + || TARGET_MIPS5500 \ + || TARGET_SR71K \ + ) + + /* ISA has 32-bit rotate right instruction. */ + #define ISA_HAS_ROTR_DI (TARGET_64BIT \ + && (TARGET_MIPS5400 \ + || TARGET_MIPS5500 \ + || TARGET_SR71K \ + )) + + + /* ISA has data prefetch instruction. */ + #define ISA_HAS_PREFETCH ((ISA_MIPS4 \ + || ISA_MIPS32 \ + || ISA_MIPS64) \ + && !TARGET_MIPS16) + + /* True if trunc.w.s and trunc.w.d are real (not synthetic) + instructions. Both require TARGET_HARD_FLOAT, and trunc.w.d + also requires TARGET_DOUBLE_FLOAT. */ + #define ISA_HAS_TRUNC_W (!ISA_MIPS1) /* CC1_SPEC causes -mips3 and -mips4 to set -mfp64 and -mgp64; -mips1 or -mips2 sets -mfp32 and -mgp32. This can be overridden by an explicit *************** extern void sbss_section PARAMS ((void) *** 713,832 **** #define OVERRIDE_OPTIONS override_options () ! /* Zero or more C statements that may conditionally modify two ! variables `fixed_regs' and `call_used_regs' (both of type `char ! []') after they have been initialized from the two preceding ! macros. ! ! This is necessary in case the fixed or call-clobbered registers ! depend on target flags. ! ! You need not define this macro if it has no work to do. ! ! If the usage of an entire class of registers depends on the target ! flags, you may indicate this to GCC by using this macro to modify ! `fixed_regs' and `call_used_regs' to 1 for each of the registers in ! the classes which should not be used by GCC. Also define the macro ! `REG_CLASS_FROM_LETTER' to return `NO_REGS' if it is called with a ! letter for a class that shouldn't be used. ! ! (However, if this class is not included in `GENERAL_REGS' and all ! of the insn patterns whose constraints permit this class are ! controlled by target switches, then GCC will automatically avoid ! using these registers when the target switches are opposed to ! them.) */ ! ! #define CONDITIONAL_REGISTER_USAGE \ ! do \ ! { \ ! if (!TARGET_HARD_FLOAT) \ ! { \ ! int regno; \ ! \ ! for (regno = FP_REG_FIRST; regno <= FP_REG_LAST; regno++) \ ! fixed_regs[regno] = call_used_regs[regno] = 1; \ ! for (regno = ST_REG_FIRST; regno <= ST_REG_LAST; regno++) \ ! fixed_regs[regno] = call_used_regs[regno] = 1; \ ! } \ ! else if (! ISA_HAS_8CC) \ ! { \ ! int regno; \ ! \ ! /* We only have a single condition code register. We \ ! implement this by hiding all the condition code registers, \ ! and generating RTL that refers directly to ST_REG_FIRST. */ \ ! for (regno = ST_REG_FIRST; regno <= ST_REG_LAST; regno++) \ ! fixed_regs[regno] = call_used_regs[regno] = 1; \ ! } \ ! /* In mips16 mode, we permit the $t temporary registers to be used \ ! for reload. We prohibit the unused $s registers, since they \ ! are caller saved, and saving them via a mips16 register would \ ! probably waste more time than just reloading the value. */ \ ! if (TARGET_MIPS16) \ ! { \ ! fixed_regs[18] = call_used_regs[18] = 1; \ ! fixed_regs[19] = call_used_regs[19] = 1; \ ! fixed_regs[20] = call_used_regs[20] = 1; \ ! fixed_regs[21] = call_used_regs[21] = 1; \ ! fixed_regs[22] = call_used_regs[22] = 1; \ ! fixed_regs[23] = call_used_regs[23] = 1; \ ! fixed_regs[26] = call_used_regs[26] = 1; \ ! fixed_regs[27] = call_used_regs[27] = 1; \ ! fixed_regs[30] = call_used_regs[30] = 1; \ ! } \ ! SUBTARGET_CONDITIONAL_REGISTER_USAGE \ ! } \ ! while (0) ! ! /* This is meant to be redefined in the host dependent files. */ ! #define SUBTARGET_CONDITIONAL_REGISTER_USAGE /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP - /* Complain about missing specs and predefines that should be defined in each - of the target tm files to override the defaults. This is mostly a place- - holder until I can get each of the files updated [mm]. */ - - #if defined(OSF_OS) \ - || defined(DECSTATION) \ - || defined(SGI_TARGET) \ - || defined(MIPS_NEWS) \ - || defined(MIPS_SYSV) \ - || defined(MIPS_SVR4) \ - || defined(MIPS_BSD43) - - #ifndef CPP_PREDEFINES - #error "Define CPP_PREDEFINES in the appropriate tm.h file" - #endif - - #ifndef LIB_SPEC - #error "Define LIB_SPEC in the appropriate tm.h file" - #endif - - #ifndef STARTFILE_SPEC - #error "Define STARTFILE_SPEC in the appropriate tm.h file" - #endif - - #ifndef MACHINE_TYPE - #error "Define MACHINE_TYPE in the appropriate tm.h file" - #endif - #endif - /* Tell collect what flags to pass to nm. */ #ifndef NM_FLAGS #define NM_FLAGS "-Bn" #endif - /* Names to predefine in the preprocessor for this target machine. */ - - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 \ - -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43 \ - -Asystem=unix -Asystem=bsd -Acpu=mips -Amachine=mips" - #endif - /* Assembler specs. */ /* MIPS_AS_ASM_SPEC is passed when using the MIPS assembler rather --- 933,949 ---- #define OVERRIDE_OPTIONS override_options () ! #define CONDITIONAL_REGISTER_USAGE mips_conditional_register_usage () /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP /* Tell collect what flags to pass to nm. */ #ifndef NM_FLAGS #define NM_FLAGS "-Bn" #endif /* Assembler specs. */ /* MIPS_AS_ASM_SPEC is passed when using the MIPS assembler rather *************** while (0) *** 847,853 **** /* GAS_ASM_SPEC is passed when using gas, rather than the MIPS assembler. */ ! #define GAS_ASM_SPEC "%{march=*} %{mtune=*} %{mcpu=*} %{m4650} %{mmad:-m4650} %{m3900} %{v} %{mgp32} %{mgp64} %(abi_gas_asm_spec) %{mabi=32:%{!mips*:-mips1}}" extern int mips_abi; --- 964,970 ---- /* GAS_ASM_SPEC is passed when using gas, rather than the MIPS assembler. */ ! #define GAS_ASM_SPEC "%{mtune=*} %{v}" extern int mips_abi; *************** extern int mips_abi; *** 856,863 **** #define MIPS_ABI_DEFAULT ABI_32 #endif ! #ifndef ABI_GAS_ASM_SPEC ! #define ABI_GAS_ASM_SPEC "" #endif /* TARGET_ASM_SPEC is used to select either MIPS_AS_ASM_SPEC or --- 973,1015 ---- #define MIPS_ABI_DEFAULT ABI_32 #endif ! /* Use the most portable ABI flag for the ASM specs. */ ! ! #if MIPS_ABI_DEFAULT == ABI_32 ! #define MULTILIB_ABI_DEFAULT "mabi=32" ! #define ASM_ABI_DEFAULT_SPEC "-32" ! #endif ! ! #if MIPS_ABI_DEFAULT == ABI_O64 ! #define MULTILIB_ABI_DEFAULT "mabi=o64" ! #define ASM_ABI_DEFAULT_SPEC "-mabi=o64" ! #endif ! ! #if MIPS_ABI_DEFAULT == ABI_N32 ! #define MULTILIB_ABI_DEFAULT "mabi=n32" ! #define ASM_ABI_DEFAULT_SPEC "-n32" ! #endif ! ! #if MIPS_ABI_DEFAULT == ABI_64 ! #define MULTILIB_ABI_DEFAULT "mabi=64" ! #define ASM_ABI_DEFAULT_SPEC "-64" ! #endif ! ! #if MIPS_ABI_DEFAULT == ABI_EABI ! #define MULTILIB_ABI_DEFAULT "mabi=eabi" ! #define ASM_ABI_DEFAULT_SPEC "-mabi=eabi" ! #endif ! ! #if MIPS_ABI_DEFAULT == ABI_MEABI ! /* Most GAS don't know about MEABI. */ ! #define MULTILIB_ABI_DEFAULT "mabi=meabi" ! #define ASM_ABI_DEFAULT_SPEC "" ! #endif ! ! /* Only ELF targets can switch the ABI. */ ! #ifndef OBJECT_FORMAT_ELF ! #undef ASM_ABI_DEFAULT_SPEC ! #define ASM_ABI_DEFAULT_SPEC "" #endif /* TARGET_ASM_SPEC is used to select either MIPS_AS_ASM_SPEC or *************** extern int mips_abi; *** 895,901 **** %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ ! %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}" #endif /* SUBTARGET_ASM_SPEC is always passed to the assembler. It may be --- 1047,1054 ---- %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ ! %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \ ! %{!gdwarf*:-mdebug} %{gdwarf*:-no-mdebug}" #endif /* SUBTARGET_ASM_SPEC is always passed to the assembler. It may be *************** extern int mips_abi; *** 905,920 **** #define SUBTARGET_ASM_SPEC "" #endif ! /* ASM_SPEC is the set of arguments to pass to the assembler. */ #undef ASM_SPEC #define ASM_SPEC "\ ! %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64}\ %{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \ %(subtarget_asm_optimizing_spec) \ %(subtarget_asm_debugging_spec) \ %{membedded-pic} \ ! %{mabi=32:-32}%{mabi=o32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} \ %(target_asm_spec) \ %(subtarget_asm_spec)" --- 1058,1079 ---- #define SUBTARGET_ASM_SPEC "" #endif ! /* ASM_SPEC is the set of arguments to pass to the assembler. Note: we ! pass -mgp32, -mgp64, -march, -mabi=eabi and -meabi=o64 regardless of ! whether we're using GAS. These options can only be used properly ! with GAS, and it is better to get an error from a non-GAS assembler ! than to silently generate bad code. */ #undef ASM_SPEC #define ASM_SPEC "\ ! %{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64}\ %{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \ %(subtarget_asm_optimizing_spec) \ %(subtarget_asm_debugging_spec) \ %{membedded-pic} \ ! %{mabi=32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} \ ! %{mabi=eabi} %{mabi=o64} %{!mabi*: %(asm_abi_default_spec)} \ ! %{mgp32} %{mgp64} %{march=*} \ %(target_asm_spec) \ %(subtarget_asm_spec)" *************** extern int mips_abi; *** 977,992 **** #define SUBTARGET_CC1_SPEC "" #endif - /* Deal with historic options. */ - #ifndef CC1_CPU_SPEC - #define CC1_CPU_SPEC "\ - %{!mcpu*: \ - %{m3900:-march=r3900 -mips1 -mfp32 -mgp32 \ - %n`-m3900' is deprecated. Use `-march=r3900' instead.\n} \ - %{m4650:-march=r4650 -mmad -msingle-float \ - %n`-m4650' is deprecated. Use `-march=r4650' instead.\n}}" - #endif - /* CC1_SPEC is the set of arguments to pass to the compiler proper. */ /* Note, we will need to adjust the following if we ever find a MIPS variant that has 32-bit GPRs and 64-bit FPRs as well as fix all of the reload bugs --- 1136,1141 ---- *************** extern int mips_abi; *** 995,1244 **** #ifndef CC1_SPEC #define CC1_SPEC "\ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ - %{mips1:-mfp32 -mgp32} %{mips2:-mfp32 -mgp32}\ - %{mips3:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} \ - %{mips4:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} \ - %{mips32:-mfp32 -mgp32} \ - %{mips64:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} \ - %{mfp64:%{msingle-float:%emay not use both -mfp64 and -msingle-float}} \ - %{mfp64:%{m4650:%emay not use both -mfp64 and -m4650}} \ - %{mint64|mlong64|mlong32:-mexplicit-type-size }\ - %{mgp32: %{mfp64:%emay not use both -mgp32 and -mfp64} %{!mfp32: -mfp32}} \ %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \ - %{pic-none: -mno-half-pic} \ - %{pic-lib: -mhalf-pic} \ - %{pic-extern: -mhalf-pic} \ - %{pic-calls: -mhalf-pic} \ %{save-temps: } \ ! %(subtarget_cc1_spec) \ ! %(cc1_cpu_spec)" #endif /* Preprocessor specs. */ - /* SUBTARGET_CPP_SIZE_SPEC defines SIZE_TYPE and PTRDIFF_TYPE. It may - be overridden by subtargets. */ - - #ifndef SUBTARGET_CPP_SIZE_SPEC - - #if MIPS_ISA_DEFAULT != 3 && MIPS_ISA_DEFAULT != 4 && MIPS_ISA_DEFAULT != 5 && MIPS_ISA_DEFAULT != 64 - - /* 32-bit cases first. */ - - #if MIPS_ABI_DEFAULT == ABI_EABI - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi|!mabi=*:\ - %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ - %{mlong64:\ - %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ - %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\ - %{mabi=o64:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - " - #endif - - #if MIPS_ABI_DEFAULT == ABI_O64 - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi:\ - %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ - %{mlong64:\ - %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ - %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\ - %{mabi=o64|!mabi=*:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\ - " - #endif - - #if MIPS_ABI_DEFAULT == ABI_32 - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi:\ - %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ - %{mlong64:\ - %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ - %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\ - %{mabi=o64:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\ - " - #endif - - #if MIPS_ABI_DEFAULT == ABI_MEABI - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi:\ - %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ - %{mlong64:\ - %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ - %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\ - %{mabi=o64:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\ - %{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - " - #endif - - #else - - /* 64-bit default ISA. */ - - #if MIPS_ABI_DEFAULT == ABI_EABI - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi|!mabi=*: \ - %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ - %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\ - %{mabi=o64:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - " - #endif - - #if MIPS_ABI_DEFAULT == ABI_O64 - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi: \ - %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ - %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\ - %{mabi=o64|!mabi=*:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\ - " - #endif - - #if MIPS_ABI_DEFAULT == ABI_32 - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi:\ - %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ - %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\ - %{mabi=o64:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\ - " - #endif - - #if MIPS_ABI_DEFAULT == ABI_MEABI - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mabi=eabi:\ - %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ - %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ - %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\ - %{mabi=o64:\ - %{mlong64:\ - %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\ - %{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - " - #endif - - #endif - - #endif - /* SUBTARGET_CPP_SPEC is passed to the preprocessor. It may be overridden by subtargets. */ #ifndef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "" #endif ! /* If we're using 64bit longs, then we have to define __LONG_MAX__ ! correctly. Similarly for 64bit ints and __INT_MAX__. */ ! #ifndef LONG_MAX_SPEC ! #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_LONG64) ! #define LONG_MAX_SPEC "%{!mlong32:-D__LONG_MAX__=9223372036854775807L}" ! #else ! #define LONG_MAX_SPEC "%{mlong64:-D__LONG_MAX__=9223372036854775807L}" ! #endif ! #endif ! ! /* Define appropriate macros for fpr register size. */ ! #ifndef CPP_FPR_SPEC ! #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_FLOAT64) ! #define CPP_FPR_SPEC "-D__mips_fpr=64" ! #else ! #define CPP_FPR_SPEC "-D__mips_fpr=32" ! #endif ! #endif ! ! /* For C++ we need to ensure that _LANGUAGE_C_PLUS_PLUS is defined independent ! of the source file extension. */ ! #undef CPLUSPLUS_CPP_SPEC ! #define CPLUSPLUS_CPP_SPEC "\ ! -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \ ! %(cpp) \ ! " ! /* CPP_SPEC is the set of arguments to pass to the preprocessor. */ ! ! #ifndef CPP_SPEC ! #define CPP_SPEC "\ ! %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C -D__LANGUAGE_C -D_LANGUAGE_C} \ ! %{.S|.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ ! %{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.cpp: %{!.cp: %{!.c++: %{!.C: %{!.m: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}}}} \ ! %(subtarget_cpp_size_spec) \ ! %{mips3:-U__mips -D__mips=3 -D__mips64} \ ! %{mips4:-U__mips -D__mips=4 -D__mips64} \ ! %{mips32:-U__mips -D__mips=32} \ ! %{mips64:-U__mips -D__mips=64 -D__mips64} \ ! %{mgp32:-U__mips64} %{mgp64:-D__mips64} \ ! %{mfp32:-D__mips_fpr=32} %{mfp64:-D__mips_fpr=64} %{!mfp32: %{!mfp64: %{mgp32:-D__mips_fpr=32} %{!mgp32: %(cpp_fpr_spec)}}} \ ! %{msingle-float:%{!msoft-float:-D__mips_single_float}} \ ! %{m4650:%{!msoft-float:-D__mips_single_float}} \ ! %{msoft-float:-D__mips_soft_float} \ ! %{mabi=eabi:-D__mips_eabi} \ ! %{mips16:%{!mno-mips16:-D__mips16}} \ ! %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ ! %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}} \ ! %(long_max_spec) \ ! %(subtarget_cpp_spec) " ! #endif /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition --- 1144,1163 ---- #ifndef CC1_SPEC #define CC1_SPEC "\ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \ %{save-temps: } \ ! %(subtarget_cc1_spec)" #endif /* Preprocessor specs. */ /* SUBTARGET_CPP_SPEC is passed to the preprocessor. It may be overridden by subtargets. */ #ifndef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "" #endif ! #define CPP_SPEC "%(subtarget_cpp_spec)" /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition *************** extern int mips_abi; *** 1252,1270 **** #define EXTRA_SPECS \ { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ - { "cc1_cpu_spec", CC1_CPU_SPEC}, \ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ - { "subtarget_cpp_size_spec", SUBTARGET_CPP_SIZE_SPEC }, \ - { "long_max_spec", LONG_MAX_SPEC }, \ - { "cpp_fpr_spec", CPP_FPR_SPEC }, \ { "mips_as_asm_spec", MIPS_AS_ASM_SPEC }, \ { "gas_asm_spec", GAS_ASM_SPEC }, \ - { "abi_gas_asm_spec", ABI_GAS_ASM_SPEC }, \ { "target_asm_spec", TARGET_ASM_SPEC }, \ { "subtarget_mips_as_asm_spec", SUBTARGET_MIPS_AS_ASM_SPEC }, \ { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC }, \ { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ { "endian_spec", ENDIAN_SPEC }, \ SUBTARGET_EXTRA_SPECS --- 1171,1185 ---- #define EXTRA_SPECS \ { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ { "mips_as_asm_spec", MIPS_AS_ASM_SPEC }, \ { "gas_asm_spec", GAS_ASM_SPEC }, \ { "target_asm_spec", TARGET_ASM_SPEC }, \ { "subtarget_mips_as_asm_spec", SUBTARGET_MIPS_AS_ASM_SPEC }, \ { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC }, \ { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ + { "asm_abi_default_spec", ASM_ABI_DEFAULT_SPEC }, \ { "endian_spec", ENDIAN_SPEC }, \ SUBTARGET_EXTRA_SPECS *************** extern int mips_abi; *** 1302,1310 **** #endif ! #define SDB_DEBUGGING_INFO /* generate info for mips-tfile */ ! #define DBX_DEBUGGING_INFO /* generate stabs (OSF/rose) */ ! #define MIPS_DEBUGGING_INFO /* MIPS specific debugging info */ #ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG --- 1217,1225 ---- #endif ! #define SDB_DEBUGGING_INFO 1 /* generate info for mips-tfile */ ! #define DBX_DEBUGGING_INFO 1 /* generate stabs (OSF/rose) */ ! #define MIPS_DEBUGGING_INFO 1 /* MIPS specific debugging info */ #ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG *************** do { \ *** 1505,1525 **** #define PUT_SDB_FUNCTION_START(LINE) ! #define PUT_SDB_FUNCTION_END(LINE) \ ! do { \ ! extern FILE *asm_out_text_file; \ ASM_OUTPUT_SOURCE_LINE (asm_out_text_file, LINE + sdb_begin_function_line); \ } while (0) #define PUT_SDB_EPILOGUE_END(NAME) ! #define PUT_SDB_SRC_FILE(FILENAME) \ do { \ extern FILE *asm_out_text_file; \ ! output_file_directive (asm_out_text_file, (FILENAME)); \ } while (0) ! #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \ sprintf ((BUFFER), ".%dfake", (NUMBER)); /* Correct the offset of automatic variables and arguments. Note that --- 1420,1440 ---- #define PUT_SDB_FUNCTION_START(LINE) ! #define PUT_SDB_FUNCTION_END(LINE) \ ! do { \ ! extern FILE *asm_out_text_file; \ ASM_OUTPUT_SOURCE_LINE (asm_out_text_file, LINE + sdb_begin_function_line); \ } while (0) #define PUT_SDB_EPILOGUE_END(NAME) ! #define PUT_SDB_SRC_FILE(FILENAME) \ do { \ extern FILE *asm_out_text_file; \ ! output_file_directive (asm_out_text_file, (FILENAME));\ } while (0) ! #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \ sprintf ((BUFFER), ".%dfake", (NUMBER)); /* Correct the offset of automatic variables and arguments. Note that *************** do { \ *** 1529,1551 **** the frame pointer to be the stack pointer after the initial adjustment. */ ! #define DEBUGGER_AUTO_OFFSET(X) \ mips_debugger_offset (X, (HOST_WIDE_INT) 0) ! #define DEBUGGER_ARG_OFFSET(OFFSET, X) \ mips_debugger_offset (X, (HOST_WIDE_INT) OFFSET) /* Tell collect that the object format is ECOFF */ - #ifndef OBJECT_FORMAT_ROSE #define OBJECT_FORMAT_COFF /* Object file looks like COFF */ #define EXTENDED_COFF /* ECOFF, not normal coff */ - #endif /* Target machine storage layout */ - /* Define in order to support both big and little endian float formats - in the same gcc binary. */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ --- 1444,1460 ---- the frame pointer to be the stack pointer after the initial adjustment. */ ! #define DEBUGGER_AUTO_OFFSET(X) \ mips_debugger_offset (X, (HOST_WIDE_INT) 0) ! #define DEBUGGER_ARG_OFFSET(OFFSET, X) \ mips_debugger_offset (X, (HOST_WIDE_INT) OFFSET) /* Tell collect that the object format is ECOFF */ #define OBJECT_FORMAT_COFF /* Object file looks like COFF */ #define EXTENDED_COFF /* ECOFF, not normal coff */ /* Target machine storage layout */ /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ *************** do { \ *** 1565,1578 **** #define LIBGCC2_WORDS_BIG_ENDIAN 0 #endif - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD (TARGET_64BIT ? 64 : 32) #define MAX_BITS_PER_WORD 64 /* Width of a word, in units (bytes). */ --- 1474,1479 ---- *************** do { \ *** 1586,1591 **** --- 1487,1504 ---- the next available register. */ #define FP_INC (TARGET_FLOAT64 || TARGET_SINGLE_FLOAT ? 1 : 2) + /* The largest size of value that can be held in floating-point + registers and moved with a single instruction. */ + #define UNITS_PER_HWFPVALUE (TARGET_SOFT_FLOAT ? 0 : FP_INC * UNITS_PER_FPREG) + + /* The largest size of value that can be held in floating-point + registers. */ + #define UNITS_PER_FPVALUE \ + (TARGET_SOFT_FLOAT ? 0 : (LONG_DOUBLE_TYPE_SIZE / BITS_PER_UNIT)) + + /* The number of bytes in a double. */ + #define UNITS_PER_DOUBLE (TYPE_PRECISION (double_type_node) / BITS_PER_UNIT) + /* A C expression for the size in bits of the type `int' on the target machine. If you don't define this, the default is one word. */ *************** do { \ *** 1615,1626 **** words. */ #define LONG_LONG_TYPE_SIZE 64 - /* A C expression for the size in bits of the type `char' on the - target machine. If you don't define this, the default is one - quarter of a word. (If this would be less than one storage unit, - it is rounded up to one unit.) */ - #define CHAR_TYPE_SIZE BITS_PER_UNIT - /* A C expression for the size in bits of the type `float' on the target machine. If you don't define this, the default is one word. */ --- 1528,1533 ---- *************** do { \ *** 1634,1640 **** /* A C expression for the size in bits of the type `long double' on the target machine. If you don't define this, the default is two words. */ ! #define LONG_DOUBLE_TYPE_SIZE 64 /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ --- 1541,1561 ---- /* A C expression for the size in bits of the type `long double' on the target machine. If you don't define this, the default is two words. */ ! #define LONG_DOUBLE_TYPE_SIZE \ ! (mips_abi == ABI_N32 || mips_abi == ABI_64 ? 128 : 64) ! ! /* long double is not a fixed mode, but the idea is that, if we ! support long double, we also want a 128-bit integer type. */ ! #define MAX_FIXED_MODE_SIZE LONG_DOUBLE_TYPE_SIZE ! ! #ifdef IN_LIBGCC2 ! #if (defined _ABIN32 && _MIPS_SIM == _ABIN32) \ ! || (defined _ABI64 && _MIPS_SIM == _ABI64) ! # define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 ! # else ! # define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 ! # endif ! #endif /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ *************** do { \ *** 1661,1667 **** #define STRUCTURE_SIZE_BOUNDARY 8 /* There is no point aligning anything to a rounder boundary than this. */ ! #define BIGGEST_ALIGNMENT 64 /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ --- 1582,1588 ---- #define STRUCTURE_SIZE_BOUNDARY 8 /* There is no point aligning anything to a rounder boundary than this. */ ! #define BIGGEST_ALIGNMENT LONG_DOUBLE_TYPE_SIZE /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ *************** do { \ *** 1671,1684 **** handle alignment of bitfields and the structures that contain them. ! The behavior is that the type written for a bitfield (`int', `short', or other integer type) imposes an alignment for the entire structure, as if the structure really did contain an ! ordinary field of that type. In addition, the bitfield is placed within the structure so that it would fit within such a field, not crossing a boundary for it. ! Thus, on most machines, a bitfield whose type is written as `int' would not cross a four-byte boundary, and would force four-byte alignment for the whole structure. (The alignment used may not be four bytes; it is controlled by the other alignment --- 1592,1605 ---- handle alignment of bitfields and the structures that contain them. ! The behavior is that the type written for a bit-field (`int', `short', or other integer type) imposes an alignment for the entire structure, as if the structure really did contain an ! ordinary field of that type. In addition, the bit-field is placed within the structure so that it would fit within such a field, not crossing a boundary for it. ! Thus, on most machines, a bit-field whose type is written as `int' would not cross a four-byte boundary, and would force four-byte alignment for the whole structure. (The alignment used may not be four bytes; it is controlled by the other alignment *************** do { \ *** 1788,1815 **** On the Mips, we have 32 integer registers, 32 floating point registers, 8 condition code registers, and the special registers ! hi, lo, hilo, and rap. The 8 condition code registers are only ! used if mips_isa >= 4. The hilo register is only used in 64 bit ! mode. It represents a 64 bit value stored as two 32 bit values in ! the hi and lo registers; this is the result of the mult ! instruction. rap is a pointer to the stack where the return ! address reg ($31) was stored. This is needed for C++ exception ! handling. */ ! #define FIRST_PSEUDO_REGISTER 76 /* 1 for registers that have pervasive standard uses and are not available for the register allocator. On the MIPS, see conventions, page D-2 */ #define FIXED_REGISTERS \ { \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 \ } --- 1709,1752 ---- On the Mips, we have 32 integer registers, 32 floating point registers, 8 condition code registers, and the special registers ! hi, lo, hilo, and rap. Afetr that we have 32 COP0 registers, 32 ! COP2 registers, and 32 COp3 registers. (COP1 is the floating-point ! processor.) The 8 condition code registers are only used if ! mips_isa >= 4. The hilo register is only used in 64 bit mode. It ! represents a 64 bit value stored as two 32 bit values in the hi and ! lo registers; this is the result of the mult instruction. rap is a ! pointer to the stack where the return address reg ($31) was stored. ! This is needed for C++ exception handling. */ ! #define FIRST_PSEUDO_REGISTER 176 /* 1 for registers that have pervasive standard uses and are not available for the register allocator. On the MIPS, see conventions, page D-2 */ + /* Regarding coprocessor registers: without evidence to the contrary, + it's best to assume that each coprocessor register has a unique + use. This can be overridden, in, e.g., override_options() or + CONDITIONAL_REGISTER_USAGE should the assumption be inappropriate + for a particular target. */ + #define FIXED_REGISTERS \ { \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, \ ! /* COP0 registers */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! /* COP2 registers */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! /* COP3 registers */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \ } *************** do { \ *** 1826,1832 **** 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \ } /* Like `CALL_USED_REGISTERS' but used to overcome a historical --- 1763,1778 ---- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \ ! /* COP0 registers */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! /* COP2 registers */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! /* COP3 registers */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \ } /* Like `CALL_USED_REGISTERS' but used to overcome a historical *************** do { \ *** 1846,1852 **** 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ /* Others. */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \ } /* Internal macros to classify a register number as to whether it's a --- 1792,1807 ---- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ /* Others. */ \ ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \ ! /* COP0 registers */ \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! /* COP2 registers */ \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! /* COP3 registers */ \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \ } /* Internal macros to classify a register number as to whether it's a *************** do { \ *** 1873,1878 **** --- 1828,1847 ---- #define RAP_REG_NUM 75 + #define COP0_REG_FIRST 80 + #define COP0_REG_LAST 111 + #define COP0_REG_NUM (COP0_REG_LAST - COP0_REG_FIRST + 1) + + #define COP2_REG_FIRST 112 + #define COP2_REG_LAST 143 + #define COP2_REG_NUM (COP2_REG_LAST - COP2_REG_FIRST + 1) + + #define COP3_REG_FIRST 144 + #define COP3_REG_LAST 175 + #define COP3_REG_NUM (COP3_REG_LAST - COP3_REG_FIRST + 1) + /* ALL_COP_REG_NUM assumes that COP0,2,and 3 are numbered consecutively. */ + #define ALL_COP_REG_NUM (COP3_REG_LAST - COP0_REG_FIRST + 1) + #define AT_REGNUM (GP_REG_FIRST + 1) #define HI_REGNUM (MD_REG_FIRST + 0) #define LO_REGNUM (MD_REG_FIRST + 1) *************** do { \ *** 1893,1898 **** --- 1862,1881 ---- ((unsigned int) ((int) (REGNO) - MD_REG_FIRST) < MD_REG_NUM) #define ST_REG_P(REGNO) \ ((unsigned int) ((int) (REGNO) - ST_REG_FIRST) < ST_REG_NUM) + #define COP0_REG_P(REGNO) \ + ((unsigned int) ((int) (REGNO) - COP0_REG_FIRST) < COP0_REG_NUM) + #define COP2_REG_P(REGNO) \ + ((unsigned int) ((int) (REGNO) - COP2_REG_FIRST) < COP2_REG_NUM) + #define COP3_REG_P(REGNO) \ + ((unsigned int) ((int) (REGNO) - COP3_REG_FIRST) < COP3_REG_NUM) + #define ALL_COP_REG_P(REGNO) \ + ((unsigned int) ((int) (REGNO) - COP0_REG_FIRST) < ALL_COP_REG_NUM) + + /* Return coprocessor number from register number. */ + + #define COPNUM_AS_CHAR_FROM_REGNUM(REGNO) \ + (COP0_REG_P (REGNO) ? '0' : COP2_REG_P (REGNO) ? '2' \ + : COP3_REG_P (REGNO) ? '3' : '?') /* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. *************** extern char mips_hard_regno_mode_ok[][FI *** 2010,2024 **** #define PIC_OFFSET_TABLE_REGNUM (GP_REG_FIRST + 28) #define PIC_FUNCTION_ADDR_REGNUM (GP_REG_FIRST + 25) - - /* Initialize embedded_pic_fnaddr_rtx before RTL generation for - each function. We used to do this in FINALIZE_PIC, but FINALIZE_PIC - isn't always called for static inline functions. */ - #define INIT_EXPANDERS \ - do { \ - embedded_pic_fnaddr_rtx = NULL; \ - mips16_gp_pseudo_rtx = NULL; \ - } while (0) /* Define the classes of registers for register constraints in the machine description. Also define ranges of constants. --- 1993,1998 ---- *************** enum reg_class *** 2053,2062 **** --- 2027,2044 ---- LO_REG, /* lo register */ HILO_REG, /* hilo register pair for 64 bit mode mult */ MD_REGS, /* multiply/divide registers (hi/lo) */ + COP0_REGS, /* generic coprocessor classes */ + COP2_REGS, + COP3_REGS, HI_AND_GR_REGS, /* union classes */ LO_AND_GR_REGS, HILO_AND_GR_REGS, HI_AND_FP_REGS, + COP0_AND_GR_REGS, + COP2_AND_GR_REGS, + COP3_AND_GR_REGS, + ALL_COP_REGS, + ALL_COP_AND_GR_REGS, ST_REGS, /* status registers (fp status) */ ALL_REGS, /* all registers */ LIM_REG_CLASSES /* max value + 1 */ *************** enum reg_class *** 2083,2092 **** --- 2065,2083 ---- "LO_REG", \ "HILO_REG", \ "MD_REGS", \ + /* coprocessor registers */ \ + "COP0_REGS", \ + "COP2_REGS", \ + "COP3_REGS", \ "HI_AND_GR_REGS", \ "LO_AND_GR_REGS", \ "HILO_AND_GR_REGS", \ "HI_AND_FP_REGS", \ + "COP0_AND_GR_REGS", \ + "COP2_AND_GR_REGS", \ + "COP3_AND_GR_REGS", \ + "ALL_COP_REGS", \ + "ALL_COP_AND_GR_REGS", \ "ST_REGS", \ "ALL_REGS" \ } *************** enum reg_class *** 2104,2126 **** #define REG_CLASS_CONTENTS \ { \ ! { 0x00000000, 0x00000000, 0x00000000 }, /* no registers */ \ ! { 0x0003000c, 0x00000000, 0x00000000 }, /* mips16 nonarg regs */\ ! { 0x000300fc, 0x00000000, 0x00000000 }, /* mips16 registers */ \ ! { 0x01000000, 0x00000000, 0x00000000 }, /* mips16 T register */ \ ! { 0x010300fc, 0x00000000, 0x00000000 }, /* mips16 and T regs */ \ ! { 0xffffffff, 0x00000000, 0x00000000 }, /* integer registers */ \ ! { 0x00000000, 0xffffffff, 0x00000000 }, /* floating registers*/ \ ! { 0x00000000, 0x00000000, 0x00000001 }, /* hi register */ \ ! { 0x00000000, 0x00000000, 0x00000002 }, /* lo register */ \ ! { 0x00000000, 0x00000000, 0x00000004 }, /* hilo register */ \ ! { 0x00000000, 0x00000000, 0x00000003 }, /* mul/div registers */ \ ! { 0xffffffff, 0x00000000, 0x00000001 }, /* union classes */ \ ! { 0xffffffff, 0x00000000, 0x00000002 }, \ ! { 0xffffffff, 0x00000000, 0x00000004 }, \ ! { 0x00000000, 0xffffffff, 0x00000001 }, \ ! { 0x00000000, 0x00000000, 0x000007f8 }, /* status registers */ \ ! { 0xffffffff, 0xffffffff, 0x000007ff } /* all registers */ \ } --- 2095,2125 ---- #define REG_CLASS_CONTENTS \ { \ ! { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* no registers */ \ ! { 0x0003000c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* mips16 nonarg regs */\ ! { 0x000300fc, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* mips16 registers */ \ ! { 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* mips16 T register */ \ ! { 0x010300fc, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* mips16 and T regs */ \ ! { 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* integer registers */ \ ! { 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* floating registers*/ \ ! { 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000 }, /* hi register */ \ ! { 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000 }, /* lo register */ \ ! { 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000 }, /* hilo register */ \ ! { 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000 }, /* mul/div registers */ \ ! { 0x00000000, 0x00000000, 0xffff0000, 0x0000ffff, 0x00000000, 0x00000000 }, /* cop0 registers */ \ ! { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x0000ffff, 0x00000000 }, /* cop2 registers */ \ ! { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x0000ffff }, /* cop3 registers */ \ ! { 0xffffffff, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000 }, /* union classes */ \ ! { 0xffffffff, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000 }, \ ! { 0xffffffff, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000 }, \ ! { 0x00000000, 0xffffffff, 0x00000001, 0x00000000, 0x00000000, 0x00000000 }, \ ! { 0xffffffff, 0x00000000, 0xffff0000, 0x0000ffff, 0x00000000, 0x00000000 }, \ ! { 0xffffffff, 0x00000000, 0x00000000, 0xffff0000, 0x0000ffff, 0x00000000 }, \ ! { 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x0000ffff }, \ ! { 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff, 0x0000ffff }, \ ! { 0xffffffff, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff, 0x0000ffff }, \ ! { 0x00000000, 0x00000000, 0x000007f8, 0x00000000, 0x00000000, 0x00000000 }, /* status registers */ \ ! { 0xffffffff, 0xffffffff, 0xffff07ff, 0xffffffff, 0xffffffff, 0x0000ffff } /* all registers */ \ } *************** extern const enum reg_class mips_regno_t *** 2159,2164 **** --- 2158,2167 ---- ((CLASS) == GR_REGS || (CLASS) == M16_REGS || (CLASS) == T_REG \ || (CLASS) == M16_T_REGS || (CLASS) == M16_NA_REGS) + /* This macro is also used later on in the file. */ + #define COP_REG_CLASS_P(CLASS) \ + ((CLASS) == COP0_REGS || (CLASS) == COP2_REGS || (CLASS) == COP3_REGS) + /* REG_ALLOC_ORDER is to order in which to allocate registers. This is the default value (allocate the registers in numeric order). We define it just so that we can override it for the mips16 target in *************** extern const enum reg_class mips_regno_t *** 2169,2175 **** 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, \ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, \ ! 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 \ } /* ORDER_REGS_FOR_LOCAL_ALLOC is a macro which permits reg_alloc_order --- 2172,2184 ---- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, \ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, \ ! 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \ ! 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, \ ! 96, 97, 98, 99, 100,101,102,103,104,105,106,107,108,109,110,111, \ ! 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, \ ! 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, \ ! 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, \ ! 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175 \ } /* ORDER_REGS_FOR_LOCAL_ALLOC is a macro which permits reg_alloc_order *************** extern const enum reg_class mips_regno_t *** 2197,2202 **** --- 2206,2214 ---- 'x' Multiply/divide registers 'a' HILO_REG 'z' FP Status register + 'B' Cop0 register + 'C' Cop2 register + 'D' Cop3 register 'b' All registers */ extern enum reg_class mips_char_to_class[256]; *************** extern enum reg_class mips_char_to_class *** 2270,2276 **** `Q' is for mips16 GP relative constants `R' is for memory references which take 1 word for the instruction. - `S' is for references to extern items which are PIC for OSF/rose. `T' is for memory addresses that can be used to load two words. */ #define EXTRA_CONSTRAINT(OP,CODE) \ --- 2282,2287 ---- *************** extern enum reg_class mips_char_to_class *** 2279,2286 **** && mips16_gp_offset_p (OP)) \ : (GET_CODE (OP) != MEM) ? FALSE \ : ((CODE) == 'R') ? simple_memory_operand (OP, GET_MODE (OP)) \ - : ((CODE) == 'S') ? (HALF_PIC_P () && CONSTANT_P (OP) \ - && HALF_PIC_ADDRESS_P (OP)) \ : FALSE) /* Given an rtx X being reloaded into a reg required to be --- 2290,2295 ---- *************** extern enum reg_class mips_char_to_class *** 2307,2319 **** /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this ! macro on those machines to be a C expression that is non-zero if objects of mode MODE in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. Do not define this macro if its value would always be zero. */ ! #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ ((!TARGET_DEBUG_H_MODE \ && GET_MODE_CLASS (MODE) == MODE_INT \ --- 2316,2328 ---- /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this ! macro on those machines to be a C expression that is nonzero if objects of mode MODE in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. Do not define this macro if its value would always be zero. */ ! #if 0 #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ ((!TARGET_DEBUG_H_MODE \ && GET_MODE_CLASS (MODE) == MODE_INT \ *************** extern enum reg_class mips_char_to_class *** 2322,2328 **** || (TARGET_FLOAT64 && !TARGET_64BIT && (MODE) == DFmode \ && ((GR_REG_CLASS_P (CLASS1) && CLASS2 == FP_REGS) \ || (GR_REG_CLASS_P (CLASS2) && CLASS1 == FP_REGS)))) ! /* The HI and LO registers can only be reloaded via the general registers. Condition code registers can only be loaded to the general registers, and from the floating point registers. */ --- 2331,2337 ---- || (TARGET_FLOAT64 && !TARGET_64BIT && (MODE) == DFmode \ && ((GR_REG_CLASS_P (CLASS1) && CLASS2 == FP_REGS) \ || (GR_REG_CLASS_P (CLASS2) && CLASS1 == FP_REGS)))) ! #endif /* The HI and LO registers can only be reloaded via the general registers. Condition code registers can only be loaded to the general registers, and from the floating point registers. */ *************** extern enum reg_class mips_char_to_class *** 2335,2368 **** /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. */ ! #define CLASS_UNITS(mode, size) \ ! ((GET_MODE_SIZE (mode) + (size) - 1) / (size)) ! ! #define CLASS_MAX_NREGS(CLASS, MODE) \ ! ((CLASS) == FP_REGS \ ! ? (TARGET_FLOAT64 \ ! ? CLASS_UNITS (MODE, 8) \ ! : 2 * CLASS_UNITS (MODE, 8)) \ ! : CLASS_UNITS (MODE, UNITS_PER_WORD)) ! ! /* If defined, gives a class of registers that cannot be used as the ! operand of a SUBREG that changes the mode of the object illegally. ! When FP regs are larger than integer regs... Er, anyone remember what ! goes wrong? ! ! In little-endian mode, the hi-lo registers are numbered backwards, ! so (subreg:SI (reg:DI hi) 0) gets the high word instead of the low ! word as intended. */ ! ! #define CLASS_CANNOT_CHANGE_MODE \ ! (TARGET_BIG_ENDIAN \ ! ? (TARGET_FLOAT64 && ! TARGET_64BIT ? FP_REGS : NO_REGS) \ ! : (TARGET_FLOAT64 && ! TARGET_64BIT ? HI_AND_FP_REGS : HI_REG)) ! ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ ! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) /* Stack layout; function entry, exit and calling. */ --- 2344,2353 ---- /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. */ ! #define CLASS_MAX_NREGS(CLASS, MODE) mips_class_max_nregs (CLASS, MODE) ! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ ! mips_cannot_change_mode_class (FROM, TO, CLASS) /* Stack layout; function entry, exit and calling. */ *************** extern enum reg_class mips_char_to_class *** 2407,2413 **** : current_function_outgoing_args_size) #endif ! /* The return address for the current frame is in r31 is this is a leaf function. Otherwise, it is on the stack. It is at a variable offset from sp/fp/ap, so we define a fake hard register rap which is a poiner to the return address on the stack. This always gets eliminated --- 2392,2398 ---- : current_function_outgoing_args_size) #endif ! /* The return address for the current frame is in r31 if this is a leaf function. Otherwise, it is on the stack. It is at a variable offset from sp/fp/ap, so we define a fake hard register rap which is a poiner to the return address on the stack. This always gets eliminated *************** extern enum reg_class mips_char_to_class *** 2421,2429 **** frame except by disassembling instructions in the prologue/epilogue. So currently we support only the current frame. */ ! #define RETURN_ADDR_RTX(count, frame) \ ! ((count == 0) \ ! ? gen_rtx_MEM (Pmode, gen_rtx_REG (Pmode, RETURN_ADDRESS_POINTER_REGNUM))\ : (rtx) 0) /* Since the mips16 ISA mode is encoded in the least-significant bit --- 2406,2417 ---- frame except by disassembling instructions in the prologue/epilogue. So currently we support only the current frame. */ ! #define RETURN_ADDR_RTX(count, frame) \ ! (((count) == 0) \ ! ? (leaf_function_p () \ ! ? gen_rtx_REG (Pmode, GP_REG_FIRST + 31) \ ! : gen_rtx_MEM (Pmode, gen_rtx_REG (Pmode, \ ! RETURN_ADDRESS_POINTER_REGNUM))) \ : (rtx) 0) /* Since the mips16 ISA mode is encoded in the least-significant bit *************** extern enum reg_class mips_char_to_class *** 2437,2467 **** #define TARGET_PTRMEMFUNC_VBIT_LOCATION ptrmemfunc_vbit_in_delta - /* Structure to be filled in by compute_frame_size with register - save masks, and offsets for the current function. */ - - struct mips_frame_info - { - long total_size; /* # bytes that the entire frame takes up */ - long var_size; /* # bytes that variables take up */ - long args_size; /* # bytes that outgoing arguments take up */ - long extra_size; /* # bytes of extra gunk */ - int gp_reg_size; /* # bytes needed to store gp regs */ - int fp_reg_size; /* # bytes needed to store fp regs */ - long mask; /* mask of saved gp registers */ - long fmask; /* mask of saved fp registers */ - long gp_save_offset; /* offset from vfp to store gp registers */ - long fp_save_offset; /* offset from vfp to store fp registers */ - long gp_sp_offset; /* offset from new sp to store gp registers */ - long fp_sp_offset; /* offset from new sp to store fp registers */ - int initialized; /* != 0 if frame size already calculated */ - int num_gp; /* number of gp registers saved */ - int num_fp; /* number of fp registers saved */ - long insns_len; /* length of insns; mips16 only */ - }; - - extern struct mips_frame_info current_frame_info; - /* If defined, this macro specifies a table of register pairs used to eliminate unneeded registers that point into the stack frame. If it is not defined, the only elimination attempted by the compiler --- 2425,2430 ---- *************** extern struct mips_frame_info current_fr *** 2498,2509 **** { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { RETURN_ADDRESS_POINTER_REGNUM, GP_REG_FIRST + 30}, \ { RETURN_ADDRESS_POINTER_REGNUM, GP_REG_FIRST + 17}, \ - { RETURN_ADDRESS_POINTER_REGNUM, GP_REG_FIRST + 31}, \ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { FRAME_POINTER_REGNUM, GP_REG_FIRST + 30}, \ { FRAME_POINTER_REGNUM, GP_REG_FIRST + 17}} ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the --- 2461,2471 ---- { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { RETURN_ADDRESS_POINTER_REGNUM, GP_REG_FIRST + 30}, \ { RETURN_ADDRESS_POINTER_REGNUM, GP_REG_FIRST + 17}, \ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { FRAME_POINTER_REGNUM, GP_REG_FIRST + 30}, \ { FRAME_POINTER_REGNUM, GP_REG_FIRST + 17}} ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the *************** extern struct mips_frame_info current_fr *** 2524,2579 **** */ #define CAN_ELIMINATE(FROM, TO) \ ! (((FROM) == RETURN_ADDRESS_POINTER_REGNUM && (! leaf_function_p () \ ! || (TO == GP_REG_FIRST + 31 && leaf_function_p))) \ ! || ((FROM) != RETURN_ADDRESS_POINTER_REGNUM \ ! && ((TO) == HARD_FRAME_POINTER_REGNUM \ ! || ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed \ ! && ! (TARGET_MIPS16 && TARGET_64BIT) \ ! && (! TARGET_MIPS16 \ ! || compute_frame_size (get_frame_size ()) < 32768))))) ! ! /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It ! specifies the initial difference between the specified pair of ! registers. This macro must be defined if `ELIMINABLE_REGS' is ! defined. */ ! #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ! { compute_frame_size (get_frame_size ()); \ ! if (TARGET_MIPS16 && (FROM) == FRAME_POINTER_REGNUM \ ! && (TO) == HARD_FRAME_POINTER_REGNUM) \ ! (OFFSET) = - current_function_outgoing_args_size; \ ! else if ((FROM) == FRAME_POINTER_REGNUM) \ ! (OFFSET) = 0; \ ! else if (TARGET_MIPS16 && (FROM) == ARG_POINTER_REGNUM \ ! && (TO) == HARD_FRAME_POINTER_REGNUM) \ ! (OFFSET) = (current_frame_info.total_size \ ! - current_function_outgoing_args_size \ ! - ((mips_abi != ABI_32 \ ! && mips_abi != ABI_O64 \ ! && mips_abi != ABI_EABI) \ ! ? current_function_pretend_args_size \ ! : 0)); \ ! else if ((FROM) == ARG_POINTER_REGNUM) \ ! (OFFSET) = (current_frame_info.total_size \ ! - ((mips_abi != ABI_32 \ ! && mips_abi != ABI_O64 \ ! && mips_abi != ABI_EABI) \ ! ? current_function_pretend_args_size \ ! : 0)); \ ! /* Some ABIs store 64 bits to the stack, but Pmode is 32 bits, \ ! so we must add 4 bytes to the offset to get the right value. */ \ ! else if ((FROM) == RETURN_ADDRESS_POINTER_REGNUM) \ ! { \ ! if (leaf_function_p ()) \ ! (OFFSET) = 0; \ ! else (OFFSET) = current_frame_info.gp_sp_offset \ ! + ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT)) \ ! * (BYTES_BIG_ENDIAN != 0)); \ ! } \ ! else \ ! abort(); \ ! } /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. --- 2486,2503 ---- */ #define CAN_ELIMINATE(FROM, TO) \ ! (((FROM) == RETURN_ADDRESS_POINTER_REGNUM \ ! && (((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed) \ ! || (TO) == HARD_FRAME_POINTER_REGNUM)) \ ! || ((FROM) != RETURN_ADDRESS_POINTER_REGNUM \ ! && ((TO) == HARD_FRAME_POINTER_REGNUM \ ! || ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed \ ! && ! (TARGET_MIPS16 && TARGET_64BIT) \ ! && (! TARGET_MIPS16 \ ! || compute_frame_size (get_frame_size ()) < 32768))))) ! #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ! (OFFSET) = mips_initial_elimination_offset ((FROM), (TO)) /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. *************** extern struct mips_frame_info current_fr *** 2624,2631 **** in register. In case an argument list is of form GF used registers are a0 (a2,a3), but we should push over a1... */ ! #define REG_PARM_STACK_SPACE(FNDECL) \ ! ((MAX_ARGS_IN_REGISTERS*UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL)) /* Define this if it is the responsibility of the caller to allocate the area reserved for arguments passed in registers. --- 2548,2557 ---- in register. In case an argument list is of form GF used registers are a0 (a2,a3), but we should push over a1... */ ! #define REG_PARM_STACK_SPACE(FNDECL) \ ! ((mips_abi == ABI_32 || mips_abi == ABI_O64) \ ! ? (MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL) \ ! : 0) /* Define this if it is the responsibility of the caller to allocate the area reserved for arguments passed in registers. *************** extern struct mips_frame_info current_fr *** 2634,2643 **** `current_function_outgoing_args_size'. */ #define OUTGOING_REG_PARM_STACK_SPACE ! /* Align stack frames on 64 bits (Double Word ). */ ! #ifndef STACK_BOUNDARY ! #define STACK_BOUNDARY 64 ! #endif /* Make sure 4 words are always allocated on the stack. */ --- 2560,2568 ---- `current_function_outgoing_args_size'. */ #define OUTGOING_REG_PARM_STACK_SPACE ! #define STACK_BOUNDARY \ ! ((mips_abi == ABI_32 || mips_abi == ABI_O64 || mips_abi == ABI_EABI) \ ! ? 64 : 128) /* Make sure 4 words are always allocated on the stack. */ *************** extern struct mips_frame_info current_fr *** 2685,2698 **** #define GP_RETURN (GP_REG_FIRST + 2) #define FP_RETURN ((TARGET_SOFT_FLOAT) ? GP_RETURN : (FP_REG_FIRST + 0)) /* Symbolic macros for the first/last argument registers. */ #define GP_ARG_FIRST (GP_REG_FIRST + 4) ! #define GP_ARG_LAST (GP_REG_FIRST + 7) #define FP_ARG_FIRST (FP_REG_FIRST + 12) ! #define FP_ARG_LAST (FP_REG_FIRST + 15) ! ! #define MAX_ARGS_IN_REGISTERS 4 /* Define how to find the value returned by a library function assuming the value has mode MODE. Because we define --- 2610,2628 ---- #define GP_RETURN (GP_REG_FIRST + 2) #define FP_RETURN ((TARGET_SOFT_FLOAT) ? GP_RETURN : (FP_REG_FIRST + 0)) + #define MAX_ARGS_IN_REGISTERS \ + ((mips_abi == ABI_32 || mips_abi == ABI_O64) ? 4 : 8) + + /* Largest possible value of MAX_ARGS_IN_REGISTERS. */ + + #define BIGGEST_MAX_ARGS_IN_REGISTERS 8 + /* Symbolic macros for the first/last argument registers. */ #define GP_ARG_FIRST (GP_REG_FIRST + 4) ! #define GP_ARG_LAST (GP_ARG_FIRST + MAX_ARGS_IN_REGISTERS - 1) #define FP_ARG_FIRST (FP_REG_FIRST + 12) ! #define FP_ARG_LAST (FP_ARG_FIRST + MAX_ARGS_IN_REGISTERS - 1) /* Define how to find the value returned by a library function assuming the value has mode MODE. Because we define *************** extern struct mips_frame_info current_fr *** 2714,2731 **** On the MIPS, R2 R3 and F0 F2 are the only register thus used. Currently, R2 and F0 are only implemented here (C has no complex type) */ ! #define FUNCTION_VALUE_REGNO_P(N) ((N) == GP_RETURN || (N) == FP_RETURN) /* 1 if N is a possible register number for function argument passing. We have no FP argument registers when soft-float. When FP registers are 32 bits, we can't directly reference the odd numbered ones. */ #define FUNCTION_ARG_REGNO_P(N) \ ! (((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST) \ ! || ((! TARGET_SOFT_FLOAT \ ! && ((N) >= FP_ARG_FIRST && (N) <= FP_ARG_LAST) \ ! && (TARGET_FLOAT64 || (0 == (N) % 2))) \ ! && ! fixed_regs[N])) /* A C expression which can inhibit the returning of certain function values in registers, based on the type of value. A nonzero value says --- 2644,2662 ---- On the MIPS, R2 R3 and F0 F2 are the only register thus used. Currently, R2 and F0 are only implemented here (C has no complex type) */ ! #define FUNCTION_VALUE_REGNO_P(N) ((N) == GP_RETURN || (N) == FP_RETURN \ ! || (LONG_DOUBLE_TYPE_SIZE == 128 && FP_RETURN != GP_RETURN \ ! && (N) == FP_RETURN + 2)) /* 1 if N is a possible register number for function argument passing. We have no FP argument registers when soft-float. When FP registers are 32 bits, we can't directly reference the odd numbered ones. */ #define FUNCTION_ARG_REGNO_P(N) \ ! ((IN_RANGE((N), GP_ARG_FIRST, GP_ARG_LAST) \ ! || (IN_RANGE((N), FP_ARG_FIRST, FP_ARG_LAST) \ ! && ((N) % FP_INC == 0) && mips_abi != ABI_O64)) \ ! && !fixed_regs[N]) /* A C expression which can inhibit the returning of certain function values in registers, based on the type of value. A nonzero value says *************** extern struct mips_frame_info current_fr *** 2746,2789 **** to give us MIPS cc compatibility. */ #define RETURN_IN_MEMORY(TYPE) \ ! (TYPE_MODE (TYPE) == BLKmode) ! ! ! #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT /* Define a data type for recording info about an argument list during the scan of that argument list. This data type should hold all necessary information about the function itself and about the args processed so far, enough to enable macros such as FUNCTION_ARG to determine where the next arg should go. ! On the mips16, we need to keep track of which floating point ! arguments were passed in general registers, but would have been ! passed in the FP regs if this were a 32 bit function, so that we ! can move them to the FP regs if we wind up calling a 32 bit ! function. We record this information in fp_code, encoded in base ! four. A zero digit means no floating point argument, a one digit ! means an SFmode argument, and a two digit means a DFmode argument, ! and a three digit is not used. The low order digit is the first ! argument. Thus 6 == 1 * 4 + 2 means a DFmode argument followed by ! an SFmode argument. ??? A more sophisticated approach will be ! needed if MIPS_ABI != ABI_32. */ typedef struct mips_args { ! int gp_reg_found; /* whether a gp register was found yet */ ! unsigned int arg_number; /* argument number */ ! unsigned int arg_words; /* # total words the arguments take */ ! unsigned int fp_arg_words; /* # words for FP args (MIPS_EABI only) */ ! int last_arg_fp; /* nonzero if last arg was FP (EABI only) */ ! int fp_code; /* Mode of FP arguments (mips16) */ ! unsigned int num_adjusts; /* number of adjustments made */ ! /* Adjustments made to args pass in regs. */ ! /* ??? The size is doubled to work around a ! bug in the code that sets the adjustments ! in function_arg. */ ! int prototype; /* True if the function has a prototype. */ ! struct rtx_def *adjust[MAX_ARGS_IN_REGISTERS*2]; } CUMULATIVE_ARGS; /* Initialize a variable CUM of type CUMULATIVE_ARGS --- 2677,2765 ---- to give us MIPS cc compatibility. */ #define RETURN_IN_MEMORY(TYPE) \ ! mips_return_in_memory (TYPE) + #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ + (PRETEND_SIZE) = mips_setup_incoming_varargs (&(CUM), (MODE), \ + (TYPE), (NO_RTL)) + #define STRICT_ARGUMENT_NAMING (mips_abi != ABI_32 && mips_abi != ABI_O64) + /* Define a data type for recording info about an argument list during the scan of that argument list. This data type should hold all necessary information about the function itself and about the args processed so far, enough to enable macros such as FUNCTION_ARG to determine where the next arg should go. ! This structure has to cope with two different argument allocation ! schemes. Most MIPS ABIs view the arguments as a struct, of which the ! first N words go in registers and the rest go on the stack. If I < N, ! the Ith word might go in Ith integer argument register or the ! Ith floating-point one. In some cases, it has to go in both (see ! function_arg). For these ABIs, we only need to remember the number ! of words passed so far. ! ! The EABI instead allocates the integer and floating-point arguments ! separately. The first N words of FP arguments go in FP registers, ! the rest go on the stack. Likewise, the first N words of the other ! arguments go in integer registers, and the rest go on the stack. We ! need to maintain three counts: the number of integer registers used, ! the number of floating-point registers used, and the number of words ! passed on the stack. ! ! We could keep separate information for the two ABIs (a word count for ! the standard ABIs, and three separate counts for the EABI). But it ! seems simpler to view the standard ABIs as forms of EABI that do not ! allocate floating-point registers. ! ! So for the standard ABIs, the first N words are allocated to integer ! registers, and function_arg decides on an argument-by-argument basis ! whether that argument should really go in an integer register, or in ! a floating-point one. */ typedef struct mips_args { ! /* Always true for varargs functions. Otherwise true if at least ! one argument has been passed in an integer register. */ ! int gp_reg_found; ! ! /* The number of arguments seen so far. */ ! unsigned int arg_number; ! ! /* For EABI, the number of integer registers used so far. For other ! ABIs, the number of words passed in registers (whether integer ! or floating-point). */ ! unsigned int num_gprs; ! ! /* For EABI, the number of floating-point registers used so far. */ ! unsigned int num_fprs; ! ! /* The number of words passed on the stack. */ ! unsigned int stack_words; ! ! /* On the mips16, we need to keep track of which floating point ! arguments were passed in general registers, but would have been ! passed in the FP regs if this were a 32 bit function, so that we ! can move them to the FP regs if we wind up calling a 32 bit ! function. We record this information in fp_code, encoded in base ! four. A zero digit means no floating point argument, a one digit ! means an SFmode argument, and a two digit means a DFmode argument, ! and a three digit is not used. The low order digit is the first ! argument. Thus 6 == 1 * 4 + 2 means a DFmode argument followed by ! an SFmode argument. ??? A more sophisticated approach will be ! needed if MIPS_ABI != ABI_32. */ ! int fp_code; ! ! /* True if the function has a prototype. */ ! int prototype; ! ! /* When a structure does not take up a full register, the argument ! should sometimes be shifted left so that it occupies the high part ! of the register. These two fields describe an array of ashl ! patterns for doing this. See function_arg_advance, which creates ! the shift patterns, and function_arg, which returns them when given ! a VOIDmode argument. */ ! unsigned int num_adjusts; ! rtx adjust[BIGGEST_MAX_ARGS_IN_REGISTERS]; } CUMULATIVE_ARGS; /* Initialize a variable CUM of type CUMULATIVE_ARGS *************** typedef struct mips_args { *** 2838,2843 **** --- 2814,2858 ---- ? PARM_BOUNDARY \ : GET_MODE_ALIGNMENT(MODE))) + #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ + function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED) + + #define FUNCTION_ARG_PADDING(MODE, TYPE) \ + (! BYTES_BIG_ENDIAN \ + ? upward \ + : (((MODE) == BLKmode \ + ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ + && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT))\ + : (GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY \ + && (mips_abi == ABI_32 \ + || mips_abi == ABI_O64 \ + || mips_abi == ABI_EABI \ + || GET_MODE_CLASS (MODE) == MODE_INT))) \ + ? downward : upward)) + + #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ + (mips_abi == ABI_EABI && (NAMED) \ + && FUNCTION_ARG_PASS_BY_REFERENCE (CUM, MODE, TYPE, NAMED)) + + /* Modified version of the macro in expr.h. */ + #define MUST_PASS_IN_STACK(MODE,TYPE) \ + ((TYPE) != 0 \ + && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ + || TREE_ADDRESSABLE (TYPE) \ + || ((MODE) == BLKmode \ + && mips_abi != ABI_32 && mips_abi != ABI_O64 \ + && ! ((TYPE) != 0 && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ + && 0 == (int_size_in_bytes (TYPE) \ + % (PARM_BOUNDARY / BITS_PER_UNIT))) \ + && (FUNCTION_ARG_PADDING (MODE, TYPE) \ + == (BYTES_BIG_ENDIAN ? upward : downward))))) + + /* True if using EABI and varargs can be passed in floating-point + registers. Under these conditions, we need a more complex form + of va_list, which tracks GPR, FPR and stack arguments separately. */ + #define EABI_FLOAT_VARARGS_P \ + (mips_abi == ABI_EABI && UNITS_PER_FPVALUE >= UNITS_PER_DOUBLE) + /* Tell prologue and epilogue if register REGNO should be saved / restored. */ *************** typedef struct mips_args { *** 2846,2855 **** || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) \ || (regno == (GP_REG_FIRST + 31) && regs_ever_live[GP_REG_FIRST + 31])) ! /* ALIGN FRAMES on double word boundaries */ ! #ifndef MIPS_STACK_ALIGN ! #define MIPS_STACK_ALIGN(LOC) (((LOC) + 7) & ~7) ! #endif /* Define the `__builtin_va_list' type for the ABI. */ --- 2861,2872 ---- || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) \ || (regno == (GP_REG_FIRST + 31) && regs_ever_live[GP_REG_FIRST + 31])) ! /* Treat LOC as a byte offset from the stack pointer and round it up ! to the next fully-aligned offset. */ ! #define MIPS_STACK_ALIGN(LOC) \ ! ((mips_abi == ABI_32 || mips_abi == ABI_O64 || mips_abi == ABI_EABI) \ ! ? ((LOC) + 7) & ~7 \ ! : ((LOC) + 15) & ~15) /* Define the `__builtin_va_list' type for the ABI. */ *************** typedef struct mips_args { *** 2857,2864 **** (VALIST) = mips_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! mips_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 2874,2881 ---- (VALIST) = mips_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! mips_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** typedef struct mips_args { *** 3041,3093 **** /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target ! machine for a memory operand of mode MODE. ! ! It usually pays to define several simpler macros to serve as ! subroutines for this one. Otherwise it may be too complicated ! to understand. ! ! This macro must exist in two variants: a strict variant and a ! non-strict one. The strict variant is used in the reload pass. ! It must be defined so that any pseudo-register that has not been ! allocated a hard register is considered a memory reference. In ! contexts where some kind of register is required, a ! pseudo-register with no hard register must be rejected. ! ! The non-strict variant is used in other passes. It must be ! defined to accept all pseudo-registers in every context where ! some kind of register is required. ! ! Compiler source files that want to use the strict variant of ! this macro define the macro `REG_OK_STRICT'. You should use an ! `#ifdef REG_OK_STRICT' conditional to define the strict variant ! in that case and the non-strict variant otherwise. ! ! Typically among the subroutines used to define ! `GO_IF_LEGITIMATE_ADDRESS' are subroutines to check for ! acceptable registers for various purposes (one for base ! registers, one for index registers, and so on). Then only these ! subroutine macros need have two variants; the higher levels of ! macros may be the same whether strict or not. ! ! Normally, constant addresses which are the sum of a `symbol_ref' ! and an integer are stored inside a `const' RTX to mark them as ! constant. Therefore, there is no need to recognize such sums ! specifically as legitimate addresses. Normally you would simply ! recognize any `const' as legitimate. ! ! Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle ! constant sums that are not marked with `const'. It assumes ! that a naked `plus' indicates indexing. If so, then you *must* ! reject such naked constant sums as illegitimate addresses, so ! that none of them will be given to `PRINT_OPERAND_ADDRESS'. ! ! On some machines, whether a symbolic address is legitimate ! depends on the section that the address refers to. On these ! machines, define the macro `ENCODE_SECTION_INFO' to store the ! information into the `symbol_ref', and then check for it here. ! When you see a `const', you will have to look inside it to find ! the `symbol_ref' in order to determine the section. */ #if 1 #define GO_PRINTF(x) fprintf(stderr, (x)) --- 3058,3064 ---- /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target ! machine for a memory operand of mode MODE. */ #if 1 #define GO_PRINTF(x) fprintf(stderr, (x)) *************** typedef struct mips_args { *** 3123,3138 **** assembler would use $at as a temp to load in the large offset. In this case $at is already in use. We convert such problem addresses to `la $5,s;sw $4,70000($5)' via LEGITIMIZE_ADDRESS. */ ! /* ??? SGI Irix 6 assembler fails for CONST address, so reject them. */ #define CONSTANT_ADDRESS_P(X) \ ! ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \ || (GET_CODE (X) == CONST \ && ! (flag_pic && pic_address_needs_scratch (X)) \ ! && (mips_abi == ABI_32 \ ! || mips_abi == ABI_O64 \ ! || mips_abi == ABI_EABI))) \ ! && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X))) /* Define this, so that when PIC, reload won't try to reload invalid addresses which require two reload registers. */ --- 3094,3111 ---- assembler would use $at as a temp to load in the large offset. In this case $at is already in use. We convert such problem addresses to `la $5,s;sw $4,70000($5)' via LEGITIMIZE_ADDRESS. */ ! /* ??? SGI Irix 6 assembler fails for CONST address, so reject them ! when !TARGET_GAS. */ ! /* We should be rejecting everything but const addresses. */ #define CONSTANT_ADDRESS_P(X) \ ! (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \ || (GET_CODE (X) == CONST \ && ! (flag_pic && pic_address_needs_scratch (X)) \ ! && (TARGET_GAS) \ ! && (mips_abi != ABI_N32 \ ! && mips_abi != ABI_64))) ! /* Define this, so that when PIC, reload won't try to reload invalid addresses which require two reload registers. */ *************** typedef struct mips_args { *** 3223,3231 **** if (GET_CODE (xinsn) == CONST \ && ((flag_pic && pic_address_needs_scratch (xinsn)) \ /* ??? SGI's Irix 6 assembler can't handle CONST. */ \ ! || (mips_abi != ABI_32 \ ! && mips_abi != ABI_O64 \ ! && mips_abi != ABI_EABI))) \ { \ rtx ptr_reg = gen_reg_rtx (Pmode); \ rtx constant = XEXP (XEXP (xinsn, 0), 1); \ --- 3196,3204 ---- if (GET_CODE (xinsn) == CONST \ && ((flag_pic && pic_address_needs_scratch (xinsn)) \ /* ??? SGI's Irix 6 assembler can't handle CONST. */ \ ! || (!TARGET_GAS \ ! && (mips_abi == ABI_N32 \ ! || mips_abi == ABI_64)))) \ { \ rtx ptr_reg = gen_reg_rtx (Pmode); \ rtx constant = XEXP (XEXP (xinsn, 0), 1); \ *************** typedef struct mips_args { *** 3293,3430 **** #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {} - - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or - function named by the symbol (such as what section it is in). - - The macro definition, if any, is executed immediately after the - rtl for DECL has been created and stored in `DECL_RTL (DECL)'. - The value of the rtl will be a `mem' whose address is a - `symbol_ref'. - - The usual thing for this macro to do is to a flag in the - `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified - name string in the `symbol_ref' (if one bit is not enough - information). - - The best way to modify the name string is by adding text to the - beginning, with suitable punctuation to prevent any ambiguity. - Allocate the new name in `saveable_obstack'. You will have to - modify `ASM_OUTPUT_LABELREF' to remove and decode the added text - and output the name accordingly. - - You can also check the information stored in the `symbol_ref' in - the definition of `GO_IF_LEGITIMATE_ADDRESS' or - `PRINT_OPERAND_ADDRESS'. - - When optimizing for the $gp pointer, SYMBOL_REF_FLAG is set for all - small objects. - - When generating embedded PIC code, SYMBOL_REF_FLAG is set for - symbols which are not in the .text section. - - When generating mips16 code, SYMBOL_REF_FLAG is set for string - constants which are put in the .text section. We also record the - total length of all such strings; this total is used to decide - whether we need to split the constant table, and need not be - precisely correct. - - When not mips16 code nor embedded PIC, if a symbol is in a - gp addresable section, SYMBOL_REF_FLAG is set prevent gcc from - splitting the reference so that gas can generate a gp relative - reference. - - When TARGET_EMBEDDED_DATA is set, we assume that all const - variables will be stored in ROM, which is too far from %gp to use - %gprel addressing. Note that (1) we include "extern const" - variables in this, which mips_select_section doesn't, and (2) we - can't always tell if they're really const (they might be const C++ - objects with non-const constructors), so we err on the side of - caution and won't use %gprel anyway (otherwise we'd have to defer - this decision to the linker/loader). The handling of extern consts - is why the DECL_INITIAL macros differ from mips_select_section. - - If you are changing this macro, you should look at - mips_select_section and see if it needs a similar change. */ - - #define ENCODE_SECTION_INFO(DECL) \ - do \ - { \ - if (TARGET_MIPS16) \ - { \ - if (TREE_CODE (DECL) == STRING_CST \ - && ! flag_writable_strings \ - /* If this string is from a function, and the function will \ - go in a gnu linkonce section, then we can't directly \ - access the string. This gets an assembler error \ - "unsupported PC relative reference to different section".\ - If we modify SELECT_SECTION to put it in function_section\ - instead of text_section, it still fails because \ - DECL_SECTION_NAME isn't set until assemble_start_function.\ - If we fix that, it still fails because strings are shared\ - among multiple functions, and we have cross section \ - references again. We force it to work by putting string \ - addresses in the constant pool and indirecting. */ \ - && (! current_function_decl \ - || ! DECL_ONE_ONLY (current_function_decl))) \ - { \ - SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 1; \ - mips_string_length += TREE_STRING_LENGTH (DECL); \ - } \ - } \ - \ - if (TARGET_EMBEDDED_DATA \ - && (TREE_CODE (DECL) == VAR_DECL \ - && TREE_READONLY (DECL) && !TREE_SIDE_EFFECTS (DECL)) \ - && (!DECL_INITIAL (DECL) \ - || TREE_CONSTANT (DECL_INITIAL (DECL)))) \ - { \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 0; \ - } \ - \ - else if (TARGET_EMBEDDED_PIC) \ - { \ - if (TREE_CODE (DECL) == VAR_DECL) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - else if (TREE_CODE (DECL) == FUNCTION_DECL) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 0; \ - else if (TREE_CODE (DECL) == STRING_CST \ - && ! flag_writable_strings) \ - SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 0; \ - else \ - SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 1; \ - } \ - \ - else if (TREE_CODE (DECL) == VAR_DECL \ - && DECL_SECTION_NAME (DECL) != NULL_TREE \ - && (0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (DECL)), \ - ".sdata") \ - || 0 == strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (DECL)),\ - ".sbss"))) \ - { \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - } \ - \ - /* We can not perform GP optimizations on variables which are in \ - specific sections, except for .sdata and .sbss which are \ - handled above. */ \ - else if (TARGET_GP_OPT && TREE_CODE (DECL) == VAR_DECL \ - && DECL_SECTION_NAME (DECL) == NULL_TREE) \ - { \ - int size = int_size_in_bytes (TREE_TYPE (DECL)); \ - \ - if (size > 0 && size <= mips_section_threshold) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - } \ - \ - else if (HALF_PIC_P ()) \ - { \ - HALF_PIC_ENCODE (DECL); \ - } \ - } \ - while (0) - /* This handles the magic '..CURRENT_FUNCTION' symbol, which means 'the start of the function that this code is output in'. */ --- 3266,3271 ---- *************** while (0) *** 3519,3531 **** #define FUNCTION_MODE (Pmode == DImode ? DImode : SImode) - /* Define TARGET_MEM_FUNCTIONS if we want to use calls to memcpy and - memset, instead of the BSD functions bcopy and bzero. */ - - #if defined(MIPS_SYSV) || defined(OSF_OS) - #define TARGET_MEM_FUNCTIONS - #endif - /* A part of a C `switch' statement that describes the relative costs of constant RTL expressions. It must contain `case' --- 3360,3365 ---- *************** while (0) *** 3734,3744 **** enum machine_mode xmode = GET_MODE (X); \ if (xmode == SFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900 \ ! || TUNE_MIPS5000) \ return COSTS_N_INSNS (4); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (5); \ else \ return COSTS_N_INSNS (7); \ --- 3568,3580 ---- enum machine_mode xmode = GET_MODE (X); \ if (xmode == SFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900 \ ! || TUNE_MIPS5000) \ return COSTS_N_INSNS (4); \ ! else if (TUNE_MIPS6000 \ ! || TUNE_MIPS5400 \ ! || TUNE_MIPS5500) \ return COSTS_N_INSNS (5); \ else \ return COSTS_N_INSNS (7); \ *************** while (0) *** 3746,3768 **** \ if (xmode == DFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900 \ ! || TUNE_MIPS5000) \ return COSTS_N_INSNS (5); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (6); \ else \ return COSTS_N_INSNS (8); \ } \ \ ! if (TUNE_MIPS3000) \ return COSTS_N_INSNS (12); \ ! else if (TUNE_MIPS3900) \ return COSTS_N_INSNS (2); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (17); \ ! else if (TUNE_MIPS5000) \ return COSTS_N_INSNS (5); \ else \ return COSTS_N_INSNS (10); \ --- 3582,3608 ---- \ if (xmode == DFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900 \ ! || TUNE_MIPS5000) \ return COSTS_N_INSNS (5); \ ! else if (TUNE_MIPS6000 \ ! || TUNE_MIPS5400 \ ! || TUNE_MIPS5500) \ return COSTS_N_INSNS (6); \ else \ return COSTS_N_INSNS (8); \ } \ \ ! if (TUNE_MIPS3000) \ return COSTS_N_INSNS (12); \ ! else if (TUNE_MIPS3900) \ return COSTS_N_INSNS (2); \ ! else if (TUNE_MIPS5400 || TUNE_MIPS5500) \ ! return COSTS_N_INSNS ((xmode == DImode) ? 4 : 3); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (17); \ ! else if (TUNE_MIPS5000) \ return COSTS_N_INSNS (5); \ else \ return COSTS_N_INSNS (10); \ *************** while (0) *** 3774,3794 **** enum machine_mode xmode = GET_MODE (X); \ if (xmode == SFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900) \ return COSTS_N_INSNS (12); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (15); \ else \ return COSTS_N_INSNS (23); \ } \ \ if (xmode == DFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900) \ return COSTS_N_INSNS (19); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (16); \ else \ return COSTS_N_INSNS (36); \ --- 3614,3638 ---- enum machine_mode xmode = GET_MODE (X); \ if (xmode == SFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900) \ return COSTS_N_INSNS (12); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (15); \ + else if (TUNE_MIPS5400 || TUNE_MIPS5500) \ + return COSTS_N_INSNS (30); \ else \ return COSTS_N_INSNS (23); \ } \ \ if (xmode == DFmode) \ { \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900) \ return COSTS_N_INSNS (19); \ ! else if (TUNE_MIPS5400 || TUNE_MIPS5500) \ ! return COSTS_N_INSNS (59); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (16); \ else \ return COSTS_N_INSNS (36); \ *************** while (0) *** 3798,3810 **** \ case UDIV: \ case UMOD: \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900) \ return COSTS_N_INSNS (35); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (38); \ ! else if (TUNE_MIPS5000) \ return COSTS_N_INSNS (36); \ else \ return COSTS_N_INSNS (69); \ \ --- 3642,3656 ---- \ case UDIV: \ case UMOD: \ ! if (TUNE_MIPS3000 \ ! || TUNE_MIPS3900) \ return COSTS_N_INSNS (35); \ ! else if (TUNE_MIPS6000) \ return COSTS_N_INSNS (38); \ ! else if (TUNE_MIPS5000) \ return COSTS_N_INSNS (36); \ + else if (TUNE_MIPS5400 || TUNE_MIPS5500) \ + return COSTS_N_INSNS ((GET_MODE (X) == SImode) ? 42 : 74); \ else \ return COSTS_N_INSNS (69); \ \ *************** while (0) *** 3884,3923 **** that the constraints of the insn are met. Setting a cost of other than 2 will allow reload to verify that the constraints are met. You should do this if the `movM' pattern's constraints do ! not allow such copying. ! ! ??? We make make the cost of moving from HI/LO/HILO/MD into general ! registers the same as for one of moving general registers to ! HI/LO/HILO/MD for TARGET_MIPS16 in order to prevent allocating a ! pseudo to HI/LO/HILO/MD. This might hurt optimizations though, it ! isn't clear if it is wise. And it might not work in all cases. We ! could solve the DImode LO reg problem by using a multiply, just like ! reload_{in,out}si. We could solve the SImode/HImode HI reg problem ! by using divide instructions. divu puts the remainder in the HI ! reg, so doing a divide by -1 will move the value in the HI reg for ! all values except -1. We could handle that case by using a signed ! divide, e.g. -1 / 2 (or maybe 1 / -2?). We'd have to emit a ! compare/branch to test the input value to see which instruction we ! need to use. This gets pretty messy, but it is feasible. */ ! #define REGISTER_MOVE_COST(MODE, FROM, TO) \ ! ((FROM) == M16_REGS && GR_REG_CLASS_P (TO) ? 2 \ ! : (FROM) == M16_NA_REGS && GR_REG_CLASS_P (TO) ? 2 \ ! : GR_REG_CLASS_P (FROM) && (TO) == M16_REGS ? 2 \ ! : GR_REG_CLASS_P (FROM) && (TO) == M16_NA_REGS ? 2 \ ! : GR_REG_CLASS_P (FROM) && GR_REG_CLASS_P (TO) ? (TARGET_MIPS16 ? 4 : 2) \ ! : (FROM) == FP_REGS && (TO) == FP_REGS ? 2 \ ! : GR_REG_CLASS_P (FROM) && (TO) == FP_REGS ? 4 \ ! : (FROM) == FP_REGS && GR_REG_CLASS_P (TO) ? 4 \ ! : (((FROM) == HI_REG || (FROM) == LO_REG \ ! || (FROM) == MD_REGS || (FROM) == HILO_REG) \ ! && GR_REG_CLASS_P (TO)) ? (TARGET_MIPS16 ? 12 : 6) \ ! : (((TO) == HI_REG || (TO) == LO_REG \ ! || (TO) == MD_REGS || (TO) == HILO_REG) \ ! && GR_REG_CLASS_P (FROM)) ? (TARGET_MIPS16 ? 12 : 6) \ ! : (FROM) == ST_REGS && GR_REG_CLASS_P (TO) ? 4 \ ! : (FROM) == FP_REGS && (TO) == ST_REGS ? 8 \ ! : 12) /* ??? Fix this to be right for the R8000. */ #define MEMORY_MOVE_COST(MODE,CLASS,TO_P) \ --- 3730,3739 ---- that the constraints of the insn are met. Setting a cost of other than 2 will allow reload to verify that the constraints are met. You should do this if the `movM' pattern's constraints do ! not allow such copying. */ ! #define REGISTER_MOVE_COST(MODE, FROM, TO) \ ! mips_register_move_cost (MODE, FROM, TO) /* ??? Fix this to be right for the R8000. */ #define MEMORY_MOVE_COST(MODE,CLASS,TO_P) \ *************** while (0) *** 4002,4008 **** {"se_nonmemory_operand", { CONST_INT, CONST_DOUBLE, CONST, \ SYMBOL_REF, LABEL_REF, SUBREG, \ REG, SIGN_EXTEND }}, \ - {"se_nonimmediate_operand", { SUBREG, REG, MEM, SIGN_EXTEND }}, \ {"consttable_operand", { LABEL_REF, SYMBOL_REF, CONST_INT, \ CONST_DOUBLE, CONST }}, \ {"fcc_register_operand", { REG, SUBREG }}, \ --- 3818,3823 ---- *************** while (0) *** 4147,4152 **** --- 3962,4067 ---- &mips_reg_names[73][0], \ &mips_reg_names[74][0], \ &mips_reg_names[75][0], \ + &mips_reg_names[76][0], \ + &mips_reg_names[77][0], \ + &mips_reg_names[78][0], \ + &mips_reg_names[79][0], \ + &mips_reg_names[80][0], \ + &mips_reg_names[81][0], \ + &mips_reg_names[82][0], \ + &mips_reg_names[83][0], \ + &mips_reg_names[84][0], \ + &mips_reg_names[85][0], \ + &mips_reg_names[86][0], \ + &mips_reg_names[87][0], \ + &mips_reg_names[88][0], \ + &mips_reg_names[89][0], \ + &mips_reg_names[90][0], \ + &mips_reg_names[91][0], \ + &mips_reg_names[92][0], \ + &mips_reg_names[93][0], \ + &mips_reg_names[94][0], \ + &mips_reg_names[95][0], \ + &mips_reg_names[96][0], \ + &mips_reg_names[97][0], \ + &mips_reg_names[98][0], \ + &mips_reg_names[99][0], \ + &mips_reg_names[100][0], \ + &mips_reg_names[101][0], \ + &mips_reg_names[102][0], \ + &mips_reg_names[103][0], \ + &mips_reg_names[104][0], \ + &mips_reg_names[105][0], \ + &mips_reg_names[106][0], \ + &mips_reg_names[107][0], \ + &mips_reg_names[108][0], \ + &mips_reg_names[109][0], \ + &mips_reg_names[110][0], \ + &mips_reg_names[111][0], \ + &mips_reg_names[112][0], \ + &mips_reg_names[113][0], \ + &mips_reg_names[114][0], \ + &mips_reg_names[115][0], \ + &mips_reg_names[116][0], \ + &mips_reg_names[117][0], \ + &mips_reg_names[118][0], \ + &mips_reg_names[119][0], \ + &mips_reg_names[120][0], \ + &mips_reg_names[121][0], \ + &mips_reg_names[122][0], \ + &mips_reg_names[123][0], \ + &mips_reg_names[124][0], \ + &mips_reg_names[125][0], \ + &mips_reg_names[126][0], \ + &mips_reg_names[127][0], \ + &mips_reg_names[128][0], \ + &mips_reg_names[129][0], \ + &mips_reg_names[130][0], \ + &mips_reg_names[131][0], \ + &mips_reg_names[132][0], \ + &mips_reg_names[133][0], \ + &mips_reg_names[134][0], \ + &mips_reg_names[135][0], \ + &mips_reg_names[136][0], \ + &mips_reg_names[137][0], \ + &mips_reg_names[138][0], \ + &mips_reg_names[139][0], \ + &mips_reg_names[140][0], \ + &mips_reg_names[141][0], \ + &mips_reg_names[142][0], \ + &mips_reg_names[143][0], \ + &mips_reg_names[144][0], \ + &mips_reg_names[145][0], \ + &mips_reg_names[146][0], \ + &mips_reg_names[147][0], \ + &mips_reg_names[148][0], \ + &mips_reg_names[149][0], \ + &mips_reg_names[150][0], \ + &mips_reg_names[151][0], \ + &mips_reg_names[152][0], \ + &mips_reg_names[153][0], \ + &mips_reg_names[154][0], \ + &mips_reg_names[155][0], \ + &mips_reg_names[156][0], \ + &mips_reg_names[157][0], \ + &mips_reg_names[158][0], \ + &mips_reg_names[159][0], \ + &mips_reg_names[160][0], \ + &mips_reg_names[161][0], \ + &mips_reg_names[162][0], \ + &mips_reg_names[163][0], \ + &mips_reg_names[164][0], \ + &mips_reg_names[165][0], \ + &mips_reg_names[166][0], \ + &mips_reg_names[167][0], \ + &mips_reg_names[168][0], \ + &mips_reg_names[169][0], \ + &mips_reg_names[170][0], \ + &mips_reg_names[171][0], \ + &mips_reg_names[172][0], \ + &mips_reg_names[173][0], \ + &mips_reg_names[174][0], \ + &mips_reg_names[175][0] \ } /* print-rtl.c can't use REGISTER_NAMES, since it depends on mips.c. *************** while (0) *** 4156,4168 **** "$0", "at", "v0", "v1", "a0", "a1", "a2", "a3", \ "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", \ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \ ! "t8", "t9", "k0", "k1", "gp", "sp", "$fp", "ra", \ "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", \ "$f8", "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15", \ "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", \ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", \ "hi", "lo", "accum","$fcc0","$fcc1","$fcc2","$fcc3","$fcc4", \ ! "$fcc5","$fcc6","$fcc7","$rap" \ } /* If defined, a C initializer for an array of structures --- 4071,4095 ---- "$0", "at", "v0", "v1", "a0", "a1", "a2", "a3", \ "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", \ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \ ! "t8", "t9", "k0", "k1", "gp", "sp", "$fp", "ra", \ "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", \ "$f8", "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15", \ "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", \ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", \ "hi", "lo", "accum","$fcc0","$fcc1","$fcc2","$fcc3","$fcc4", \ ! "$fcc5","$fcc6","$fcc7","$rap", "", "", "", "", \ ! "$c0r0", "$c0r1", "$c0r2", "$c0r3", "$c0r4", "$c0r5", "$c0r6", "$c0r7",\ ! "$c0r8", "$c0r9", "$c0r10","$c0r11","$c0r12","$c0r13","$c0r14","$c0r15",\ ! "$c0r16","$c0r17","$c0r18","$c0r19","$c0r20","$c0r21","$c0r22","$c0r23",\ ! "$c0r24","$c0r25","$c0r26","$c0r27","$c0r28","$c0r29","$c0r30","$c0r31",\ ! "$c2r0", "$c2r1", "$c2r2", "$c2r3", "$c2r4", "$c2r5", "$c2r6", "$c2r7",\ ! "$c2r8", "$c2r9", "$c2r10","$c2r11","$c2r12","$c2r13","$c2r14","$c2r15",\ ! "$c2r16","$c2r17","$c2r18","$c2r19","$c2r20","$c2r21","$c2r22","$c2r23",\ ! "$c2r24","$c2r25","$c2r26","$c2r27","$c2r28","$c2r29","$c2r30","$c2r31",\ ! "$c3r0", "$c3r1", "$c3r2", "$c3r3", "$c3r4", "$c3r5", "$c3r6", "$c3r7",\ ! "$c3r8", "$c3r9", "$c3r10","$c3r11","$c3r12","$c3r13","$c3r14","$c3r15",\ ! "$c3r16","$c3r17","$c3r18","$c3r19","$c3r20","$c3r21","$c3r22","$c3r23",\ ! "$c3r24","$c3r25","$c3r26","$c3r27","$c3r28","$c3r29","$c3r30","$c3r31"\ } /* If defined, a C initializer for an array of structures *************** while (0) *** 4242,4249 **** --- 4169,4182 ---- { "ra", 31 + GP_REG_FIRST }, \ { "$sp", 29 + GP_REG_FIRST }, \ { "$fp", 30 + GP_REG_FIRST } \ + ALL_COP_ADDITIONAL_REGISTER_NAMES \ } + /* This is meant to be redefined in the host dependent files. It is a + set of alternative names and regnums for mips coprocessors. */ + + #define ALL_COP_ADDITIONAL_REGISTER_NAMES + /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand X. X is an RTL expression. *************** while (0) *** 4278,4289 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on ! the section that the address refers to. On these machines, ! define the macro `ENCODE_SECTION_INFO' to store the information ! into the `symbol_ref', and then check for it here. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) --- 4211,4217 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. */ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) *************** while (0) *** 4365,4388 **** LM[0-9]+ Silicon Graphics/ECOFF stabs label before each stmt. $Lb[0-9]+ Begin blocks for MIPS debug support $Lc[0-9]+ Label for use in s operation. ! $Le[0-9]+ End blocks for MIPS debug support ! $Lp\..+ Half-pic labels. */ ! ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. ! ! If we are optimizing the gp, remember that this label has been put ! out, so we know not to emit an .extern for it in mips_asm_file_end. ! We use one of the common bits in the IDENTIFIER tree node for this, ! since those bits seem to be unused, and we don't have any method ! of getting the decl nodes from the name. */ ! ! #define ASM_OUTPUT_LABEL(STREAM,NAME) \ ! do { \ ! assemble_name (STREAM, NAME); \ ! fputs (":\n", STREAM); \ ! } while (0) ! /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of an --- 4293,4299 ---- LM[0-9]+ Silicon Graphics/ECOFF stabs label before each stmt. $Lb[0-9]+ Begin blocks for MIPS debug support $Lc[0-9]+ Label for use in s operation. ! $Le[0-9]+ End blocks for MIPS debug support */ /* A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of an *************** do { \ *** 4399,4418 **** do \ { \ mips_declare_object (STREAM, NAME, "", ":\n", 0); \ - HALF_PIC_DECLARE (NAME); \ } \ while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do { \ ! fputs ("\t.globl\t", STREAM); \ ! assemble_name (STREAM, NAME); \ ! fputs ("\n", STREAM); \ ! } while (0) /* This says how to define a global common symbol. */ --- 4310,4320 ---- do \ { \ mips_declare_object (STREAM, NAME, "", ":\n", 0); \ } \ while (0) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl\t" /* This says how to define a global common symbol. */ *************** while (0) *** 4426,4440 **** || DECL_INITIAL (DECL) == error_mark_node)) \ { \ if (TREE_PUBLIC (DECL) && DECL_NAME (DECL)) \ ! ASM_GLOBALIZE_LABEL (STREAM, NAME); \ \ ! READONLY_DATA_SECTION (); \ ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \ mips_declare_object (STREAM, NAME, "", ":\n\t.space\t%u\n", \ (SIZE)); \ } \ else \ ! mips_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", \ (SIZE)); \ } while (0) --- 4328,4342 ---- || DECL_INITIAL (DECL) == error_mark_node)) \ { \ if (TREE_PUBLIC (DECL) && DECL_NAME (DECL)) \ ! (*targetm.asm_out.globalize_label) (STREAM, NAME); \ \ ! readonly_data_section (); \ ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \ mips_declare_object (STREAM, NAME, "", ":\n\t.space\t%u\n", \ (SIZE)); \ } \ else \ ! mips_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", \ (SIZE)); \ } while (0) *************** do { \ *** 4475,4485 **** /* This is how to declare a function name. The actual work of emitting the label is moved to function_prologue, so that we can get the line number correctly emitted before the .ent directive, ! and after any .file directives. */ #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \ ! HALF_PIC_DECLARE (NAME) /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ --- 4377,4388 ---- /* This is how to declare a function name. The actual work of emitting the label is moved to function_prologue, so that we can get the line number correctly emitted before the .ent directive, ! and after any .file directives. Define as empty so that the function ! is not declared before the .ent directive elsewhere. */ #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) ! /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ *************** do { \ *** 4561,4576 **** #define ASM_OUTPUT_ASCII(STREAM, STRING, LEN) \ mips_output_ascii (STREAM, STRING, LEN) - /* Handle certain cpp directives used in header files on sysV. */ - #define SCCS_DIRECTIVE - /* Output #ident as a in the read-only data section. */ #undef ASM_OUTPUT_IDENT #define ASM_OUTPUT_IDENT(FILE, STRING) \ { \ const char *p = STRING; \ int size = strlen (p) + 1; \ ! rdata_section (); \ assemble_string (p, size); \ } --- 4464,4476 ---- #define ASM_OUTPUT_ASCII(STREAM, STRING, LEN) \ mips_output_ascii (STREAM, STRING, LEN) /* Output #ident as a in the read-only data section. */ #undef ASM_OUTPUT_IDENT #define ASM_OUTPUT_IDENT(FILE, STRING) \ { \ const char *p = STRING; \ int size = strlen (p) + 1; \ ! readonly_data_section (); \ assemble_string (p, size); \ } *************** do { \ *** 4583,4597 **** #define TEXT_SECTION_ASM_OP "\t.text" /* instructions */ #define DATA_SECTION_ASM_OP "\t.data" /* large data */ #define SDATA_SECTION_ASM_OP "\t.sdata" /* small data */ ! #define RDATA_SECTION_ASM_OP "\t.rdata" /* read-only data */ ! #undef READONLY_DATA_SECTION ! #define READONLY_DATA_SECTION rdata_section #define SMALL_DATA_SECTION sdata_section /* What other sections we support other than the normal .data/.text. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_rdata /* Define the additional functions to select our additional sections. */ --- 4483,4498 ---- #define TEXT_SECTION_ASM_OP "\t.text" /* instructions */ #define DATA_SECTION_ASM_OP "\t.data" /* large data */ #define SDATA_SECTION_ASM_OP "\t.sdata" /* small data */ ! ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP "\t.rdata" /* read-only data */ ! #define SMALL_DATA_SECTION sdata_section /* What other sections we support other than the normal .data/.text. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata /* Define the additional functions to select our additional sections. */ *************** sdata_section () \ *** 4613,4641 **** fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ in_section = in_sdata; \ } \ - } \ - \ - void \ - rdata_section () \ - { \ - if (in_section != in_rdata) \ - { \ - fprintf (asm_out_file, "%s\n", RDATA_SECTION_ASM_OP); \ - in_section = in_rdata; \ - } \ } /* Given a decl node or constant node, choose the section to output it in and select that section. */ ! #undef SELECT_RTX_SECTION ! #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) \ ! mips_select_rtx_section (MODE, RTX) ! ! #undef SELECT_SECTION ! #define SELECT_SECTION(DECL, RELOC, ALIGN) \ ! mips_select_section (DECL, RELOC) ! /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. --- 4514,4526 ---- fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ in_section = in_sdata; \ } \ } /* Given a decl node or constant node, choose the section to output it in and select that section. */ ! #undef TARGET_ASM_SELECT_SECTION ! #define TARGET_ASM_SELECT_SECTION mips_select_section /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. *************** while (0) *** 4698,4714 **** #define MIPS_UNMARK_STAB(code) ((code)-CODE_MASK) ! /* Default definitions for size_t and ptrdiff_t. */ ! #ifndef SIZE_TYPE ! #define NO_BUILTIN_SIZE_TYPE #define SIZE_TYPE (Pmode == DImode ? "long unsigned int" : "unsigned int") - #endif ! #ifndef PTRDIFF_TYPE ! #define NO_BUILTIN_PTRDIFF_TYPE #define PTRDIFF_TYPE (Pmode == DImode ? "long int" : "int") - #endif /* See mips_expand_prologue's use of loadgp for when this should be true. */ --- 4583,4596 ---- #define MIPS_UNMARK_STAB(code) ((code)-CODE_MASK) ! /* Default definitions for size_t and ptrdiff_t. We must override the ! definitions from ../svr4.h on mips-*-linux-gnu. */ ! #undef SIZE_TYPE #define SIZE_TYPE (Pmode == DImode ? "long unsigned int" : "unsigned int") ! #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (Pmode == DImode ? "long int" : "int") /* See mips_expand_prologue's use of loadgp for when this should be true. */ *************** do \ *** 4793,4795 **** --- 4675,4718 ---- } \ } \ while (0) + + #define DFMODE_NAN \ + unsigned short DFbignan[4] = {0x7ff7, 0xffff, 0xffff, 0xffff}; \ + unsigned short DFlittlenan[4] = {0xffff, 0xffff, 0xffff, 0xfff7} + #define SFMODE_NAN \ + unsigned short SFbignan[2] = {0x7fbf, 0xffff}; \ + unsigned short SFlittlenan[2] = {0xffff, 0xffbf} + + /* Generate calls to memcpy, etc., not bcopy, etc. */ + #define TARGET_MEM_FUNCTIONS + + #ifndef __mips16 + /* Since the bits of the _init and _fini function is spread across + many object files, each potentially with its own GP, we must assume + we need to load our GP. We don't preserve $gp or $ra, since each + init/fini chunk is supposed to initialize $gp, and crti/crtn + already take care of preserving $ra and, when appropriate, $gp. */ + #if _MIPS_SIM == _MIPS_SIM_ABI32 + #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ + asm (SECTION_OP "\n\ + .set noreorder\n\ + bal 1f\n\ + nop\n\ + 1: .cpload $31\n\ + .set reorder\n\ + jal " USER_LABEL_PREFIX #FUNC "\n\ + " TEXT_SECTION_ASM_OP); + #endif /* Switch to #elif when we're no longer limited by K&R C. */ + #if (defined _ABIN32 && _MIPS_SIM == _ABIN32) \ + || (defined _ABI64 && _MIPS_SIM == _ABI64) + #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ + asm (SECTION_OP "\n\ + .set noreorder\n\ + bal 1f\n\ + nop\n\ + 1: .set reorder\n\ + .cpsetup $31, $2, 1b\n\ + jal " USER_LABEL_PREFIX #FUNC "\n\ + " TEXT_SECTION_ASM_OP); + #endif + #endif diff -Nrc3pad gcc-3.2.3/gcc/config/mips/mips.md gcc-3.3/gcc/config/mips/mips.md *** gcc-3.2.3/gcc/config/mips/mips.md 2003-02-12 15:25:50.000000000 +0000 --- gcc-3.3/gcc/config/mips/mips.md 2003-02-28 15:02:22.000000000 +0000 *************** *** 1,6 **** ;; Mips.md Machine Description for MIPS based processors ;; Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! ;; 1999, 2000, 2001 Free Software Foundation, Inc. ;; Contributed by A. Lichnewsky, lich@inria.inria.fr ;; Changes by Michael Meissner, meissner@osf.org ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and --- 1,6 ---- ;; Mips.md Machine Description for MIPS based processors ;; Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! ;; 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Contributed by A. Lichnewsky, lich@inria.inria.fr ;; Changes by Michael Meissner, meissner@osf.org ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and *************** *** 26,54 **** ;; ??? Currently does not have define_function_unit support for the R8000. ;; Must include new entries for fmadd in addition to existing entries. ! ;; UNSPEC values used in mips.md ! ;; Number USE ! ;; 0 movsi_ul ! ;; 1 movsi_usw, get_fnaddr ! ;; 2 reload_in*, reload_out* : sets delay on HILO register ! ;; 3 eh_set_return ! ;; 20 builtin_setjmp_setup ! ;; 111 movdi_usd ! ;; ! ;; UNSPEC_VOLATILE values ! ;; 0 blockage ! ;; 2 loadgp ! ;; 3 builtin_longjmp ! ;; 4 exception_receiver ! ;; 10 consttable_qi ! ;; 11 consttable_hi ! ;; 12 consttable_si ! ;; 13 consttable_di ! ;; 14 consttable_sf ! ;; 15 consttable_df ! ;; 16 align_2 ! ;; 17 align_4 ! ;; 18 align_8 ;; .................... --- 26,53 ---- ;; ??? Currently does not have define_function_unit support for the R8000. ;; Must include new entries for fmadd in addition to existing entries. ! (define_constants ! [(UNSPEC_ULW 0) ! (UNSPEC_USW 1) ! (UNSPEC_ULD 2) ! (UNSPEC_USD 3) ! (UNSPEC_GET_FNADDR 4) ! (UNSPEC_HILO_DELAY 5) ! (UNSPEC_BLOCKAGE 6) ! (UNSPEC_LOADGP 7) ! (UNSPEC_SETJMP 8) ! (UNSPEC_LONGJMP 9) ! (UNSPEC_EH_RECEIVER 10) ! (UNSPEC_EH_RETURN 11) ! (UNSPEC_CONSTTABLE_QI 12) ! (UNSPEC_CONSTTABLE_HI 13) ! (UNSPEC_CONSTTABLE_SI 14) ! (UNSPEC_CONSTTABLE_DI 15) ! (UNSPEC_CONSTTABLE_SF 16) ! (UNSPEC_CONSTTABLE_DF 17) ! (UNSPEC_ALIGN_2 18) ! (UNSPEC_ALIGN_4 19) ! (UNSPEC_ALIGN_8 20)]) ;; .................... *************** *** 69,74 **** --- 68,74 ---- ;; arith integer arithmetic instruction ;; darith double precision integer arithmetic instructions ;; imul integer multiply + ;; imadd integer multiply-add ;; idiv integer divide ;; icmp integer compare ;; fadd floating point add/subtract *************** *** 80,90 **** ;; fcmp floating point compare ;; fcvt floating point convert ;; fsqrt floating point square root ;; multi multiword sequence (or user asm statements) ;; nop no operation (define_attr "type" ! "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop" (const_string "unknown")) ;; Main data type used by the insn --- 80,91 ---- ;; fcmp floating point compare ;; fcvt floating point convert ;; fsqrt floating point square root + ;; frsqrt floating point reciprocal square root ;; multi multiword sequence (or user asm statements) ;; nop no operation (define_attr "type" ! "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,imadd,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,frsqrt,multi,nop" (const_string "unknown")) ;; Main data type used by the insn *************** *** 104,112 **** (cond [(eq_attr "type" "branch") (cond [(lt (abs (minus (match_dup 1) (plus (pc) (const_int 4)))) (const_int 131072)) ! (const_int 4)] ! (const_int 12))] ! (const_int 4))) ;; Attribute describing the processor. This attribute must match exactly ;; with the processor_type enumeration in mips.h. --- 105,116 ---- (cond [(eq_attr "type" "branch") (cond [(lt (abs (minus (match_dup 1) (plus (pc) (const_int 4)))) (const_int 131072)) ! (const_int 4) ! (ne (symbol_ref "flag_pic && ! TARGET_EMBEDDED_PIC") ! (const_int 0)) ! (const_int 24) ! ] (const_int 12)) ! ] (const_int 4))) ;; Attribute describing the processor. This attribute must match exactly ;; with the processor_type enumeration in mips.h. *************** *** 121,127 **** ;; ??? Fix everything that tests this attribute. (define_attr "cpu" ! "default,r3000,r3900,r6000,r4000,r4100,r4300,r4600,r4650,r5000,r8000,r4kc,r5kc,r20kc" (const (symbol_ref "mips_cpu_attr"))) ;; Does the instruction have a mandatory delay slot? --- 125,131 ---- ;; ??? Fix everything that tests this attribute. (define_attr "cpu" ! "default,r3000,r3900,r6000,r4000,r4100,r4111,r4120,r4300,r4600,r4650,r5000,r5400,r5500,r8000,sr71000,r4kc,r5kc,r20kc" (const (symbol_ref "mips_cpu_attr"))) ;; Does the instruction have a mandatory delay slot? *************** *** 206,217 **** (define_function_unit "memory" 1 0 (and (eq_attr "type" "load") ! (eq_attr "cpu" "!r3000,r3900,r4600,r4650,r4100,r4300,r5000")) 3 0) (define_function_unit "memory" 1 0 (and (eq_attr "type" "load") ! (eq_attr "cpu" "r3000,r3900,r4600,r4650,r4100,r4300,r5000")) 2 0) (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0) --- 210,221 ---- (define_function_unit "memory" 1 0 (and (eq_attr "type" "load") ! (eq_attr "cpu" "!r3000,r3900,r4600,r4650,r4100,r4120,r4300,r5000")) 3 0) (define_function_unit "memory" 1 0 (and (eq_attr "type" "load") ! (eq_attr "cpu" "r3000,r3900,r4600,r4650,r4100,r4120,r4300,r5000")) 2 0) (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0) *************** *** 223,230 **** 1 3) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") ! (eq_attr "cpu" "!r3000,r3900,r4000,r4600,r4650,r4100,r4300,r5000")) 17 17) ;; On them mips16, we want to stronly discourage a mult from appearing --- 227,234 ---- 1 3) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") ! (eq_attr "cpu" "!r3000,r3900,r4000,r4600,r4650,r4100,r4120,r4300,r5000")) 17 17) ;; On them mips16, we want to stronly discourage a mult from appearing *************** *** 238,282 **** 1 5) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (eq_attr "cpu" "r3000,r3900")) 12 12) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (eq_attr "cpu" "r4000,r4600")) 10 10) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (eq_attr "cpu" "r4650")) 4 4) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") ! (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4100"))) 1 1) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") ! (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4100"))) 4 4) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4300,r5000"))) 5 5) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4300"))) 8 8) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (and (eq_attr "mode" "DI") (eq_attr "cpu" "r5000"))) 9 9) (define_function_unit "imuldiv" 1 0 (and (eq_attr "type" "idiv") ! (eq_attr "cpu" "!r3000,r3900,r4000,r4600,r4650,r4100,r4300,r5000")) 38 38) (define_function_unit "imuldiv" 1 0 --- 242,286 ---- 1 5) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") (eq_attr "cpu" "r3000,r3900")) 12 12) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") (eq_attr "cpu" "r4000,r4600")) 10 10) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") (eq_attr "cpu" "r4650")) 4 4) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") ! (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4100,r4120"))) 1 1) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") ! (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4100,r4120"))) 4 4) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4300,r5000"))) 5 5) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4300"))) 8 8) (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul,imadd") (and (eq_attr "mode" "DI") (eq_attr "cpu" "r5000"))) 9 9) (define_function_unit "imuldiv" 1 0 (and (eq_attr "type" "idiv") ! (eq_attr "cpu" "!r3000,r3900,r4000,r4600,r4650,r4100,r4120,r4300,r5000")) 38 38) (define_function_unit "imuldiv" 1 0 *************** *** 297,308 **** (define_function_unit "imuldiv" 1 0 (and (eq_attr "type" "idiv") ! (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4100"))) 35 35) (define_function_unit "imuldiv" 1 0 (and (eq_attr "type" "idiv") ! (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4100"))) 67 67) (define_function_unit "imuldiv" 1 0 --- 301,312 ---- (define_function_unit "imuldiv" 1 0 (and (eq_attr "type" "idiv") ! (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4100,r4120"))) 35 35) (define_function_unit "imuldiv" 1 0 (and (eq_attr "type" "idiv") ! (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4100,r4120"))) 67 67) (define_function_unit "imuldiv" 1 0 *************** *** 450,482 **** ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r4600,r4650,r4300,r5000"))) 54 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600,r4650"))) 31 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r5000"))) 21 0) ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r4600,r4650,r4300,r5000"))) 112 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4600,r4650"))) 60 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r5000"))) 36 0) --- 454,486 ---- ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt,frsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r4600,r4650,r4300,r5000"))) 54 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt,frsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600,r4650"))) 31 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt,frsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r5000"))) 21 0) ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt,frsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r4600,r4650,r4300,r5000"))) 112 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt,frsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4600,r4650"))) 60 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt,frsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r5000"))) 36 0) *************** *** 499,509 **** 8 8) (define_function_unit "imuldiv" 1 0 ! (and (and (eq_attr "type" "fdiv") (eq_attr "type" "fsqrt")) (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4300"))) 29 29) (define_function_unit "imuldiv" 1 0 ! (and (and (eq_attr "type" "fdiv") (eq_attr "type" "fsqrt")) (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4300"))) 58 58) --- 503,513 ---- 8 8) (define_function_unit "imuldiv" 1 0 ! (and (and (eq_attr "type" "fdiv") (eq_attr "type" "fsqrt,frsqrt")) (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4300"))) 29 29) (define_function_unit "imuldiv" 1 0 ! (and (and (eq_attr "type" "fdiv") (eq_attr "type" "fsqrt,frsqrt")) (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4300"))) 58 58) *************** *** 533,538 **** --- 537,549 ---- ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 0) ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 0) + ;; Include scheduling descriptions. + + (include "5400.md") + (include "5500.md") + (include "sr71k.md") + + ;; ;; .................... ;; *************** *** 548,553 **** --- 559,566 ---- { if (ISA_HAS_COND_TRAP) return \"teq\\t$0,$0\"; + else if (TARGET_MIPS16) + return \"break 0\"; else return \"break\"; }") *************** *** 616,621 **** --- 629,655 ---- && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == -32768) operands[2] = force_reg (SImode, operands[2]); + + /* If a large stack adjustment was forced into a register, we may be + asked to generate rtx such as: + + (set (reg:SI sp) (plus:SI (reg:SI sp) (reg:SI pseudo))) + + but no such instruction is available in mips16. Handle it by + using a temporary. */ + if (TARGET_MIPS16 + && REGNO (operands[0]) == STACK_POINTER_REGNUM + && ((GET_CODE (operands[1]) == REG + && REGNO (operands[1]) != STACK_POINTER_REGNUM) + || GET_CODE (operands[2]) != CONST_INT)) + { + rtx tmp = gen_reg_rtx (SImode); + + emit_move_insn (tmp, operands[1]); + emit_insn (gen_addsi3 (tmp, tmp, operands[2])); + emit_move_insn (operands[0], tmp); + DONE; + } }") (define_insn "addsi3_internal" *************** *** 779,784 **** --- 813,839 ---- && INTVAL (operands[2]) == -32768) operands[2] = force_reg (DImode, operands[2]); + /* If a large stack adjustment was forced into a register, we may be + asked to generate rtx such as: + + (set (reg:DI sp) (plus:DI (reg:DI sp) (reg:DI pseudo))) + + but no such instruction is available in mips16. Handle it by + using a temporary. */ + if (TARGET_MIPS16 + && REGNO (operands[0]) == STACK_POINTER_REGNUM + && ((GET_CODE (operands[1]) == REG + && REGNO (operands[1]) != STACK_POINTER_REGNUM) + || GET_CODE (operands[2]) != CONST_INT)) + { + rtx tmp = gen_reg_rtx (DImode); + + emit_move_insn (tmp, operands[1]); + emit_insn (gen_addsi3 (tmp, tmp, operands[2])); + emit_move_insn (operands[0], tmp); + DONE; + } + if (TARGET_64BIT) { emit_insn (gen_adddi3_internal_3 (operands[0], operands[1], *************** *** 1750,1757 **** if (which_alternative == 1) return \"mult\\t%1,%2\"; if (TARGET_MAD ! || mips_isa == 32 ! || mips_isa == 64) return \"mul\\t%0,%1,%2\"; return \"mult\\t%0,%1,%2\"; }" --- 1805,1814 ---- if (which_alternative == 1) return \"mult\\t%1,%2\"; if (TARGET_MAD ! || TARGET_MIPS5400 ! || TARGET_MIPS5500 ! || ISA_MIPS32 ! || ISA_MIPS64) return \"mul\\t%0,%1,%2\"; return \"mult\\t%0,%1,%2\"; }" *************** *** 1814,1831 **** (clobber (match_scratch:SI 6 "=a,a,a")) (clobber (match_scratch:SI 7 "=X,X,d"))] "(TARGET_MIPS3900 || ISA_HAS_MADD_MSUB) && !TARGET_MIPS16" "* { static const char *const madd[] = { \"madd\\t%1,%2\", \"madd\\t%0,%1,%2\" }; if (which_alternative == 2) return \"#\"; if (ISA_HAS_MADD_MSUB && which_alternative != 0) return \"#\"; return madd[which_alternative]; }" ! [(set_attr "type" "imul,imul,multi") (set_attr "mode" "SI") (set_attr "length" "4,4,8")]) --- 1871,1903 ---- (clobber (match_scratch:SI 6 "=a,a,a")) (clobber (match_scratch:SI 7 "=X,X,d"))] "(TARGET_MIPS3900 + || TARGET_MIPS5400 + || TARGET_MIPS5500 || ISA_HAS_MADD_MSUB) && !TARGET_MIPS16" "* { static const char *const madd[] = { \"madd\\t%1,%2\", \"madd\\t%0,%1,%2\" }; + static const char *const macc[] = { \"macc\\t$0,%1,%2\", \"macc\\t%0,%1,%2\" }; if (which_alternative == 2) return \"#\"; if (ISA_HAS_MADD_MSUB && which_alternative != 0) return \"#\"; + + if (TARGET_MIPS5400) + return macc[which_alternative]; + + if (TARGET_MIPS5500) + { + if (which_alternative == 0) + return madd[0]; + else + return macc[which_alternative]; + } + return madd[which_alternative]; }" ! [(set_attr "type" "imadd,imadd,multi") (set_attr "mode" "SI") (set_attr "length" "4,4,8")]) *************** *** 1889,1895 **** return \"#\"; return \"msub\\t%2,%3\"; }" ! [(set_attr "type" "imul,imul,multi") (set_attr "mode" "SI") (set_attr "length" "4,8,8")]) --- 1961,1967 ---- return \"#\"; return \"msub\\t%2,%3\"; }" ! [(set_attr "type" "imadd,multi,multi") (set_attr "mode" "SI") (set_attr "length" "4,8,8")]) *************** *** 1937,1942 **** --- 2009,2046 ---- (set (match_dup 0) (match_dup 1))] "") + (define_insn "*muls" + [(set (match_operand:SI 0 "register_operand" "=l,d") + (neg:SI (mult:SI (match_operand:SI 1 "register_operand" "d,d") + (match_operand:SI 2 "register_operand" "d,d")))) + (clobber (match_scratch:SI 3 "=h,h")) + (clobber (match_scratch:SI 4 "=a,a")) + (clobber (match_scratch:SI 5 "=X,l"))] + "ISA_HAS_MULS && TARGET_64BIT" + "@ + muls\\t$0,%1,%2 + muls\\t%0,%1,%2" + [(set_attr "type" "imul") + (set_attr "mode" "SI")]) + + ;; See comments above for mul_acc_si. + (define_insn "*msac" + [(set (match_operand:SI 0 "register_operand" "=l,*d,*d") + (minus:SI (match_operand:SI 1 "register_operand" "0,l,*d") + (mult:SI (match_operand:SI 2 "register_operand" "d,d,d") + (match_operand:SI 3 "register_operand" "d,d,d")))) + (clobber (match_scratch:SI 4 "=h,h,h")) + (clobber (match_scratch:SI 5 "=X,1,l")) + (clobber (match_scratch:SI 6 "=a,a,a")) + (clobber (match_scratch:SI 7 "=X,X,d"))] + "ISA_HAS_MSAC && TARGET_64BIT" + "@ + msac\\t$0,%2,%3 + msac\\t%0,%2,%3 + #" + [(set_attr "type" "imadd,imadd,multi") + (set_attr "mode" "SI") + (set_attr "length" "4,4,8")]) (define_split [(set (match_operand:SI 0 "register_operand" "") *************** *** 2093,2098 **** --- 2197,2263 ---- [(set_attr "type" "imul") (set_attr "mode" "SI")]) + ;; widening multiply with accumulator and/or negation + ;; These don't match yet for zero-extending; too complex for combine? + ;; Possible additions we should have: + ;; "=x" variants for when !TARGET_64BIT ? + ;; all-d alternatives with splits like pure SImode versions + (define_insn "*muls_di" + [(set (match_operand:DI 0 "register_operand" "=a") + (neg:DI + (mult:DI (match_operator:DI 3 "extend_operator" + [(match_operand:SI 1 "register_operand" "d")]) + (match_operator:DI 4 "extend_operator" + [(match_operand:SI 2 "register_operand" "d")])))) + (clobber (match_scratch:SI 5 "=h")) + (clobber (match_scratch:SI 6 "=l"))] + "TARGET_64BIT + && ISA_HAS_MULS + && GET_CODE (operands[3]) == GET_CODE (operands[4])" + "* + { + if (GET_CODE (operands[3]) == SIGN_EXTEND) + return \"muls\\t$0,%1,%2\"; + else + return \"mulsu\\t$0,%1,%2\"; + }" + [(set_attr "type" "imul") + (set_attr "length" "4") + (set_attr "mode" "SI")]) + + (define_insn "*msac_di" + [(set (match_operand:DI 0 "register_operand" "=a") + (minus:DI (match_operand:DI 3 "register_operand" "0") + (mult:DI (match_operator:DI 4 "extend_operator" + [(match_operand:SI 1 "register_operand" "d")]) + (match_operator:DI 5 "extend_operator" + [(match_operand:SI 2 "register_operand" "d")])))) + (clobber (match_scratch:SI 6 "=h")) + (clobber (match_scratch:SI 7 "=l"))] + "TARGET_64BIT + && ISA_HAS_MSAC + && GET_CODE (operands[4]) == GET_CODE (operands[5])" + "* + { + if (GET_CODE (operands[4]) == SIGN_EXTEND) + { + if (TARGET_MIPS5500) + return \"msub\\t%1,%2\"; + else + return \"msac\\t$0,%1,%2\"; + } + else + { + if (TARGET_MIPS5500) + return \"msubu\\t%1,%2\"; + else + return \"msacu\\t$0,%1,%2\"; + } + }" + [(set_attr "type" "imadd") + (set_attr "length" "4") + (set_attr "mode" "SI")]) + ;; _highpart patterns (define_expand "smulsi3_highpart" [(set (match_operand:SI 0 "register_operand" "=h") *************** *** 2110,2116 **** #else rtx (*genfn) (); #endif ! genfn = gen_xmulsi3_highpart_internal; emit_insn ((*genfn) (operands[0], operands[1], operands[2], dummy, dummy, dummy2)); DONE; --- 2275,2284 ---- #else rtx (*genfn) (); #endif ! if (ISA_HAS_MULHI && TARGET_64BIT) ! genfn = gen_xmulsi3_highpart_mulhi; ! else ! genfn = gen_xmulsi3_highpart_internal; emit_insn ((*genfn) (operands[0], operands[1], operands[2], dummy, dummy, dummy2)); DONE; *************** *** 2132,2138 **** #else rtx (*genfn) (); #endif ! genfn = gen_xmulsi3_highpart_internal; emit_insn ((*genfn) (operands[0], operands[1], operands[2], dummy, dummy, dummy2)); DONE; --- 2300,2309 ---- #else rtx (*genfn) (); #endif ! if (ISA_HAS_MULHI && TARGET_64BIT) ! genfn = gen_xmulsi3_highpart_mulhi; ! else ! genfn = gen_xmulsi3_highpart_internal; emit_insn ((*genfn) (operands[0], operands[1], operands[2], dummy, dummy, dummy2)); DONE; *************** *** 2160,2165 **** --- 2331,2394 ---- [(set_attr "type" "imul") (set_attr "mode" "SI")]) + (define_insn "xmulsi3_highpart_mulhi" + [(set (match_operand:SI 0 "register_operand" "=h,d") + (truncate:SI + (match_operator:DI 5 "highpart_shift_operator" + [(mult:DI (match_operator:DI 3 "extend_operator" + [(match_operand:SI 1 "register_operand" "d,d")]) + (match_operator:DI 4 "extend_operator" + [(match_operand:SI 2 "register_operand" "d,d")])) + (const_int 32)]))) + (clobber (match_scratch:SI 6 "=l,l")) + (clobber (match_scratch:SI 7 "=a,a")) + (clobber (match_scratch:SI 8 "=X,h"))] + "ISA_HAS_MULHI + && TARGET_64BIT + && GET_CODE (operands[3]) == GET_CODE (operands[4])" + "* + { + static char const *const sign[] = { \"mult\\t%1,%2\", \"mulhi\\t%0,%1,%2\" }; + static char const *const zero[] = { \"multu\\t%1,%2\", \"mulhiu\\t%0,%1,%2\" }; + if (GET_CODE (operands[3]) == SIGN_EXTEND) + return sign[which_alternative]; + else + return zero[which_alternative]; + }" + [(set_attr "type" "imul") + (set_attr "mode" "SI") + (set_attr "length" "4")]) + + (define_insn "*xmulsi3_neg_highpart_mulhi" + [(set (match_operand:SI 0 "register_operand" "=h,d") + (truncate:SI + (match_operator:DI 5 "highpart_shift_operator" + [(neg:DI + (mult:DI (match_operator:DI 3 "extend_operator" + [(match_operand:SI 1 "register_operand" "d,d")]) + (match_operator:DI 4 "extend_operator" + [(match_operand:SI 2 "register_operand" "d,d")]))) + (const_int 32)]))) + (clobber (match_scratch:SI 6 "=l,l")) + (clobber (match_scratch:SI 7 "=a,a")) + (clobber (match_scratch:SI 8 "=X,h"))] + "ISA_HAS_MULHI + && TARGET_64BIT + && GET_CODE (operands[3]) == GET_CODE (operands[4])" + "* + { + static char const *const sign[] = { \"mulshi\\t$0,%1,%2\", \"mulshi\\t%0,%1,%2\" }; + static char const *const zero[] = { \"mulshiu\\t$0,%1,%2\", \"mulshiu\\t%0,%1,%2\" }; + if (GET_CODE (operands[3]) == SIGN_EXTEND) + return sign[which_alternative]; + else + return zero[which_alternative]; + }" + [(set_attr "type" "imul") + (set_attr "mode" "SI") + (set_attr "length" "4")]) + + (define_insn "smuldi3_highpart" [(set (match_operand:DI 0 "register_operand" "=h") (truncate:DI *************** *** 2198,2204 **** (clobber (match_scratch:SI 4 "=a"))] "TARGET_MAD" "mad\\t%1,%2" ! [(set_attr "type" "imul") (set_attr "mode" "SI")]) (define_insn "*mul_acc_di" --- 2427,2433 ---- (clobber (match_scratch:SI 4 "=a"))] "TARGET_MAD" "mad\\t%1,%2" ! [(set_attr "type" "imadd") (set_attr "mode" "SI")]) (define_insn "*mul_acc_di" *************** *** 2219,2225 **** else return \"madu\\t%1,%2\"; }" ! [(set_attr "type" "imul") (set_attr "mode" "SI")]) (define_insn "*mul_acc_64bit_di" --- 2448,2454 ---- else return \"madu\\t%1,%2\"; }" ! [(set_attr "type" "imadd") (set_attr "mode" "SI")]) (define_insn "*mul_acc_64bit_di" *************** *** 2236,2247 **** && GET_CODE (operands[3]) == GET_CODE (operands[4])" "* { ! if (GET_CODE (operands[3]) == SIGN_EXTEND) ! return \"mad\\t%1,%2\"; else ! return \"madu\\t%1,%2\"; }" ! [(set_attr "type" "imul") (set_attr "mode" "SI")]) ;; Floating point multiply accumulate instructions. --- 2465,2499 ---- && GET_CODE (operands[3]) == GET_CODE (operands[4])" "* { ! if (TARGET_MAD) ! { ! if (GET_CODE (operands[3]) == SIGN_EXTEND) ! return \"mad\\t%1,%2\"; ! else ! return \"madu\\t%1,%2\"; ! } ! else if (ISA_HAS_MACC) ! { ! if (GET_CODE (operands[3]) == SIGN_EXTEND) ! { ! if (TARGET_MIPS5500) ! return \"madd\\t%1,%2\"; ! else ! return \"macc\\t$0,%1,%2\"; ! } ! else ! { ! if (TARGET_MIPS5500) ! return \"maddu\\t%1,%2\"; ! else ! return \"maccu\\t$0,%1,%2\"; ! } ! } else ! abort (); ! }" ! [(set_attr "type" "imadd") (set_attr "mode" "SI")]) ;; Floating point multiply accumulate instructions. *************** *** 2972,2978 **** (sqrt:DF (match_operand:DF 2 "register_operand" "f"))))] "ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && flag_unsafe_math_optimizations" "rsqrt.d\\t%0,%2" ! [(set_attr "type" "fsqrt") (set_attr "mode" "DF")]) (define_insn "" --- 3224,3230 ---- (sqrt:DF (match_operand:DF 2 "register_operand" "f"))))] "ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && flag_unsafe_math_optimizations" "rsqrt.d\\t%0,%2" ! [(set_attr "type" "frsqrt") (set_attr "mode" "DF")]) (define_insn "" *************** *** 2981,2987 **** (sqrt:SF (match_operand:SF 2 "register_operand" "f"))))] "ISA_HAS_FP4 && TARGET_HARD_FLOAT && flag_unsafe_math_optimizations" "rsqrt.s\\t%0,%2" ! [(set_attr "type" "fsqrt") (set_attr "mode" "SF")]) --- 3233,3239 ---- (sqrt:SF (match_operand:SF 2 "register_operand" "f"))))] "ISA_HAS_FP4 && TARGET_HARD_FLOAT && flag_unsafe_math_optimizations" "rsqrt.s\\t%0,%2" ! [(set_attr "type" "frsqrt") (set_attr "mode" "SF")]) *************** move\\t%0,%z4\\n\\ *** 3291,3297 **** " { if (TARGET_MIPS16) ! operands[2] = force_reg (SImode, operands[2]); }") (define_insn "" --- 3543,3552 ---- " { if (TARGET_MIPS16) ! { ! operands[1] = force_reg (SImode, operands[1]); ! operands[2] = force_reg (SImode, operands[2]); ! } }") (define_insn "" *************** move\\t%0,%z4\\n\\ *** 3322,3328 **** " { if (TARGET_MIPS16) ! operands[2] = force_reg (DImode, operands[2]); }") (define_insn "" --- 3577,3586 ---- " { if (TARGET_MIPS16) ! { ! operands[1] = force_reg (DImode, operands[1]); ! operands[2] = force_reg (DImode, operands[2]); ! } }") (define_insn "" *************** move\\t%0,%z4\\n\\ *** 3394,3400 **** " { if (TARGET_MIPS16) ! operands[2] = force_reg (SImode, operands[2]); }") (define_insn "" --- 3652,3661 ---- " { if (TARGET_MIPS16) ! { ! operands[1] = force_reg (SImode, operands[1]); ! operands[2] = force_reg (SImode, operands[2]); ! } }") (define_insn "" *************** move\\t%0,%z4\\n\\ *** 4069,4084 **** ;; In 64 bit mode, 32 bit values in general registers are always ;; correctly sign extended. That means that if the target is a ;; general register, we can sign extend from SImode to DImode just by ! ;; doing a move. ! (define_insn "extendsidi2" ! [(set (match_operand:DI 0 "register_operand" "=d,y,d,*d,d,d") ! (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "d,d,y,*x,R,m")))] "TARGET_64BIT" ! "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,move,move,hilo,load,load") ! (set_attr "mode" "DI") ! (set_attr "length" "4,4,4,4,4,8")]) ;; These patterns originally accepted general_operands, however, slightly ;; better code is generated by only accepting register_operands, and then --- 4330,4343 ---- ;; In 64 bit mode, 32 bit values in general registers are always ;; correctly sign extended. That means that if the target is a ;; general register, we can sign extend from SImode to DImode just by ! ;; doing a move. The matching define_insns are *movdi_internal2_extend ! ;; and *movdi_internal2_mips16. ! (define_expand "extendsidi2" ! [(set (match_operand:DI 0 "register_operand" "") ! (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))] "TARGET_64BIT" ! "") ;; These patterns originally accepted general_operands, however, slightly ;; better code is generated by only accepting register_operands, and then *************** move\\t%0,%z4\\n\\ *** 4254,4318 **** ;; ;; .................... ! ;; The SImode scratch register can not be shared with address regs used for ! ;; operand zero, because then the address in the move instruction will be ! ;; clobbered. We mark the scratch register as early clobbered to prevent this. ! ! ;; We need the ?X in alternative 1 so that it will be chosen only if the ! ;; destination is a floating point register. Otherwise, alternative 1 can ! ;; have lower cost than alternative 0 (because there is one less loser), and ! ;; can be chosen when it won't work (because integral reloads into FP ! ;; registers are not supported). ! ! (define_insn "fix_truncdfsi2" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,*f,R,To") ! (fix:SI (match_operand:DF 1 "register_operand" "f,*f,f,f"))) ! (clobber (match_scratch:SI 2 "=d,*d,&d,&d")) ! (clobber (match_scratch:DF 3 "=f,?*X,f,f"))] "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" - "* { ! rtx xoperands[10]; ! ! if (which_alternative == 1) ! return \"trunc.w.d %0,%1,%2\"; ! ! output_asm_insn (\"trunc.w.d %3,%1,%2\", operands); ! xoperands[0] = operands[0]; ! xoperands[1] = operands[3]; ! output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands); ! return \"\"; ! }" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "44,36,40,44")]) ! (define_insn "fix_truncsfsi2" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,*f,R,To") ! (fix:SI (match_operand:SF 1 "register_operand" "f,*f,f,f"))) ! (clobber (match_scratch:SI 2 "=d,*d,&d,&d")) ! (clobber (match_scratch:SF 3 "=f,?*X,f,f"))] "TARGET_HARD_FLOAT" - "* { ! rtx xoperands[10]; ! ! if (which_alternative == 1) ! return \"trunc.w.s %0,%1,%2\"; ! ! output_asm_insn (\"trunc.w.s %3,%1,%2\", operands); ! xoperands[0] = operands[0]; ! xoperands[1] = operands[3]; ! output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands); ! return \"\"; ! }" [(set_attr "type" "fcvt") ! (set_attr "mode" "SF") ! (set_attr "length" "44,36,40,44")]) ;;; ??? trunc.l.d is mentioned in the appendix of the 1993 r4000/r4600 manuals ;;; but not in the chapter that describes the FPU. It is not mentioned at all --- 4513,4579 ---- ;; ;; .................... ! (define_expand "fix_truncdfsi2" ! [(set (match_operand:SI 0 "register_operand" "=f") ! (fix:SI (match_operand:DF 1 "register_operand" "f")))] "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" { ! if (!ISA_HAS_TRUNC_W) ! { ! emit_insn (gen_fix_truncdfsi2_macro (operands[0], operands[1])); ! DONE; ! } ! }) ! (define_insn "fix_truncdfsi2_insn" ! [(set (match_operand:SI 0 "register_operand" "=f") ! (fix:SI (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && ISA_HAS_TRUNC_W" ! "trunc.w.d %0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "4")]) + (define_insn "fix_truncdfsi2_macro" + [(set (match_operand:SI 0 "register_operand" "=f") + (fix:SI (match_operand:DF 1 "register_operand" "f"))) + (clobber (match_scratch:DF 2 "=d"))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && !ISA_HAS_TRUNC_W" + "trunc.w.d %0,%1,%2" + [(set_attr "type" "fcvt") + (set_attr "mode" "DF") + (set_attr "length" "36")]) ! (define_expand "fix_truncsfsi2" ! [(set (match_operand:SI 0 "register_operand" "=f") ! (fix:SI (match_operand:SF 1 "register_operand" "f")))] "TARGET_HARD_FLOAT" { ! if (!ISA_HAS_TRUNC_W) ! { ! emit_insn (gen_fix_truncsfsi2_macro (operands[0], operands[1])); ! DONE; ! } ! }) ! (define_insn "fix_truncsfsi2_insn" ! [(set (match_operand:SI 0 "register_operand" "=f") ! (fix:SI (match_operand:SF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && ISA_HAS_TRUNC_W" ! "trunc.w.s %0,%1" [(set_attr "type" "fcvt") ! (set_attr "mode" "DF") ! (set_attr "length" "4")]) + (define_insn "fix_truncsfsi2_macro" + [(set (match_operand:SI 0 "register_operand" "=f") + (fix:SI (match_operand:SF 1 "register_operand" "f"))) + (clobber (match_scratch:SF 2 "=d"))] + "TARGET_HARD_FLOAT && !ISA_HAS_TRUNC_W" + "trunc.w.s %0,%1,%2" + [(set_attr "type" "fcvt") + (set_attr "mode" "DF") + (set_attr "length" "36")]) ;;; ??? trunc.l.d is mentioned in the appendix of the 1993 r4000/r4600 manuals ;;; but not in the chapter that describes the FPU. It is not mentioned at all *************** move\\t%0,%z4\\n\\ *** 4324,4445 **** ;;; If this is disabled, then fixuns_truncdfdi2 must be disabled also. (define_insn "fix_truncdfdi2" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,*f,R,To") ! (fix:DI (match_operand:DF 1 "register_operand" "f,*f,f,f"))) ! (clobber (match_scratch:DF 2 "=f,?*X,f,f"))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" ! "* ! { ! rtx xoperands[10]; ! ! if (which_alternative == 1) ! return \"trunc.l.d %0,%1\"; ! ! output_asm_insn (\"trunc.l.d %2,%1\", operands); ! ! xoperands[0] = operands[0]; ! xoperands[1] = operands[2]; ! output_asm_insn (mips_move_2words (xoperands, insn), xoperands); ! return \"\"; ! }" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "8,4,8,12")]) ;;; ??? trunc.l.s is mentioned in the appendix of the 1993 r4000/r4600 manuals ;;; but not in the chapter that describes the FPU. It is not mentioned at all ;;; in the 1991 manuals. The r4000 at Cygnus does not have this instruction. (define_insn "fix_truncsfdi2" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,*f,R,To") ! (fix:DI (match_operand:SF 1 "register_operand" "f,*f,f,f"))) ! (clobber (match_scratch:DF 2 "=f,?*X,f,f"))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" ! "* ! { ! rtx xoperands[10]; ! ! if (which_alternative == 1) ! return \"trunc.l.s %0,%1\"; ! ! output_asm_insn (\"trunc.l.s %2,%1\", operands); ! ! xoperands[0] = operands[0]; ! xoperands[1] = operands[2]; ! output_asm_insn (mips_move_2words (xoperands, insn), xoperands); ! return \"\"; ! }" [(set_attr "type" "fcvt") (set_attr "mode" "SF") ! (set_attr "length" "8,4,8,12")]) (define_insn "floatsidf2" ! [(set (match_operand:DF 0 "register_operand" "=f,f,f") ! (float:DF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))] "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" ! "* ! { ! dslots_load_total++; ! if (GET_CODE (operands[1]) == MEM) ! return \"l.s\\t%0,%1%#\;cvt.d.w\\t%0,%0\"; ! ! return \"mtc1\\t%1,%0%#\;cvt.d.w\\t%0,%0\"; ! }" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "12,16,12")]) (define_insn "floatdidf2" ! [(set (match_operand:DF 0 "register_operand" "=f,f,f") ! (float:DF (match_operand:DI 1 "se_nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" ! "* ! { ! dslots_load_total++; ! if (GET_CODE (operands[1]) == MEM) ! return \"l.d\\t%0,%1%#\;cvt.d.l\\t%0,%0\"; ! ! return \"dmtc1\\t%1,%0%#\;cvt.d.l\\t%0,%0\"; ! }" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "12,16,12")]) (define_insn "floatsisf2" ! [(set (match_operand:SF 0 "register_operand" "=f,f,f") ! (float:SF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))] "TARGET_HARD_FLOAT" ! "* ! { ! dslots_load_total++; ! if (GET_CODE (operands[1]) == MEM) ! return \"l.s\\t%0,%1%#\;cvt.s.w\\t%0,%0\"; ! ! return \"mtc1\\t%1,%0%#\;cvt.s.w\\t%0,%0\"; ! }" [(set_attr "type" "fcvt") (set_attr "mode" "SF") ! (set_attr "length" "12,16,12")]) (define_insn "floatdisf2" ! [(set (match_operand:SF 0 "register_operand" "=f,f,f") ! (float:SF (match_operand:DI 1 "se_nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" ! "* ! { ! dslots_load_total++; ! if (GET_CODE (operands[1]) == MEM) ! return \"l.d\\t%0,%1%#\;cvt.s.l\\t%0,%0\"; ! ! return \"dmtc1\\t%1,%0%#\;cvt.s.l\\t%0,%0\"; ! }" [(set_attr "type" "fcvt") (set_attr "mode" "SF") ! (set_attr "length" "12,16,12")]) (define_expand "fixuns_truncdfsi2" --- 4585,4650 ---- ;;; If this is disabled, then fixuns_truncdfdi2 must be disabled also. (define_insn "fix_truncdfdi2" ! [(set (match_operand:DI 0 "register_operand" "=f") ! (fix:DI (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FLOAT64 && TARGET_DOUBLE_FLOAT" ! "trunc.l.d %0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "4")]) ;;; ??? trunc.l.s is mentioned in the appendix of the 1993 r4000/r4600 manuals ;;; but not in the chapter that describes the FPU. It is not mentioned at all ;;; in the 1991 manuals. The r4000 at Cygnus does not have this instruction. (define_insn "fix_truncsfdi2" ! [(set (match_operand:DI 0 "register_operand" "=f") ! (fix:DI (match_operand:SF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FLOAT64 && TARGET_DOUBLE_FLOAT" ! "trunc.l.s %0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "SF") ! (set_attr "length" "4")]) (define_insn "floatsidf2" ! [(set (match_operand:DF 0 "register_operand" "=f") ! (float:DF (match_operand:SI 1 "register_operand" "f")))] "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" ! "cvt.d.w\\t%0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "4")]) (define_insn "floatdidf2" ! [(set (match_operand:DF 0 "register_operand" "=f") ! (float:DF (match_operand:DI 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FLOAT64 && TARGET_DOUBLE_FLOAT" ! "cvt.d.l\\t%0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "DF") ! (set_attr "length" "4")]) (define_insn "floatsisf2" ! [(set (match_operand:SF 0 "register_operand" "=f") ! (float:SF (match_operand:SI 1 "register_operand" "f")))] "TARGET_HARD_FLOAT" ! "cvt.s.w\\t%0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "SF") ! (set_attr "length" "4")]) (define_insn "floatdisf2" ! [(set (match_operand:SF 0 "register_operand" "=f") ! (float:SF (match_operand:DI 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FLOAT64 && TARGET_DOUBLE_FLOAT" ! "cvt.s.l\\t%0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "SF") ! (set_attr "length" "4")]) (define_expand "fixuns_truncdfsi2" *************** move\\t%0,%z4\\n\\ *** 4453,4463 **** rtx reg3 = gen_reg_rtx (SImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 31); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, immed_real_const_1 (offset, DFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpdf (operands[1], reg1)); --- 4658,4670 ---- rtx reg3 = gen_reg_rtx (SImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset; ! ! real_2expN (&offset, 31); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpdf (operands[1], reg1)); *************** move\\t%0,%z4\\n\\ *** 4497,4507 **** rtx reg3 = gen_reg_rtx (DImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 63); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, immed_real_const_1 (offset, DFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpdf (operands[1], reg1)); --- 4704,4716 ---- rtx reg3 = gen_reg_rtx (DImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset; ! ! real_2expN (&offset, 63); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpdf (operands[1], reg1)); *************** move\\t%0,%z4\\n\\ *** 4541,4551 **** rtx reg3 = gen_reg_rtx (SImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 31); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, immed_real_const_1 (offset, SFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpsf (operands[1], reg1)); --- 4750,4762 ---- rtx reg3 = gen_reg_rtx (SImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset; ! ! real_2expN (&offset, 31); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpsf (operands[1], reg1)); *************** move\\t%0,%z4\\n\\ *** 4585,4595 **** rtx reg3 = gen_reg_rtx (DImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 63); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, immed_real_const_1 (offset, SFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpsf (operands[1], reg1)); --- 4796,4808 ---- rtx reg3 = gen_reg_rtx (DImode); rtx label1 = gen_label_rtx (); rtx label2 = gen_label_rtx (); ! REAL_VALUE_TYPE offset; ! ! real_2expN (&offset, 63); if (reg1) /* turn off complaints about unreached code */ { ! emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode)); do_pending_stack_adjust (); emit_insn (gen_cmpsf (operands[1], reg1)); *************** move\\t%0,%z4\\n\\ *** 4661,4666 **** --- 4874,4880 ---- /* Change the mode to BLKmode for aliasing purposes. */ operands[1] = adjust_address (operands[1], BLKmode, 0); + set_mem_size (operands[1], GEN_INT (INTVAL (operands[2]) / BITS_PER_UNIT)); /* Otherwise, emit a l[wd]l/l[wd]r pair to load the value. */ if (INTVAL (operands[2]) == 64) *************** move\\t%0,%z4\\n\\ *** 4709,4714 **** --- 4923,4929 ---- /* Change the mode to BLKmode for aliasing purposes. */ operands[1] = adjust_address (operands[1], BLKmode, 0); + set_mem_size (operands[1], GEN_INT (INTVAL (operands[2]) / BITS_PER_UNIT)); /* Otherwise, emit a lwl/lwr pair to load the value. */ if (INTVAL (operands[2]) == 64) *************** move\\t%0,%z4\\n\\ *** 4757,4762 **** --- 4972,4978 ---- /* Change the mode to BLKmode for aliasing purposes. */ operands[0] = adjust_address (operands[0], BLKmode, 0); + set_mem_size (operands[0], GEN_INT (INTVAL (operands[1]) / BITS_PER_UNIT)); /* Otherwise, emit a s[wd]l/s[wd]r pair to load the value. */ if (INTVAL (operands[1]) == 64) *************** move\\t%0,%z4\\n\\ *** 4778,4784 **** (define_insn "movsi_ulw" [(set (match_operand:SI 0 "register_operand" "=&d,&d") ! (unspec:SI [(match_operand:BLK 1 "general_operand" "R,o")] 0))] "!TARGET_MIPS16" "* { --- 4994,5001 ---- (define_insn "movsi_ulw" [(set (match_operand:SI 0 "register_operand" "=&d,&d") ! (unspec:SI [(match_operand:BLK 1 "general_operand" "R,o")] ! UNSPEC_ULW))] "!TARGET_MIPS16" "* { *************** move\\t%0,%z4\\n\\ *** 4807,4813 **** (define_insn "movsi_usw" [(set (match_operand:BLK 0 "memory_operand" "=R,o") ! (unspec:BLK [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")] 1))] "!TARGET_MIPS16" "* { --- 5024,5031 ---- (define_insn "movsi_usw" [(set (match_operand:BLK 0 "memory_operand" "=R,o") ! (unspec:BLK [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")] ! UNSPEC_USW))] "!TARGET_MIPS16" "* { *************** move\\t%0,%z4\\n\\ *** 4837,4843 **** (define_insn "movdi_uld" [(set (match_operand:DI 0 "register_operand" "=&d,&d") ! (unspec:DI [(match_operand:BLK 1 "general_operand" "R,o")] 0))] "" "* { --- 5055,5062 ---- (define_insn "movdi_uld" [(set (match_operand:DI 0 "register_operand" "=&d,&d") ! (unspec:DI [(match_operand:BLK 1 "general_operand" "R,o")] ! UNSPEC_ULD))] "" "* { *************** move\\t%0,%z4\\n\\ *** 4866,4872 **** (define_insn "movdi_usd" [(set (match_operand:BLK 0 "memory_operand" "=R,o") ! (unspec:BLK [(match_operand:DI 1 "reg_or_0_operand" "dJ,dJ")] 111))] "" "* { --- 5085,5092 ---- (define_insn "movdi_usd" [(set (match_operand:BLK 0 "memory_operand" "=R,o") ! (unspec:BLK [(match_operand:DI 1 "reg_or_0_operand" "dJ,dJ")] ! UNSPEC_USD))] "" "* { *************** move\\t%0,%z4\\n\\ *** 4947,4953 **** rtx temp; temp = embedded_pic_offset (operands[1]); ! temp = gen_rtx_PLUS (Pmode, embedded_pic_fnaddr_rtx, force_reg (DImode, temp)); emit_move_insn (operands[0], force_reg (DImode, temp)); DONE; --- 5167,5173 ---- rtx temp; temp = embedded_pic_offset (operands[1]); ! temp = gen_rtx_PLUS (Pmode, embedded_pic_fnaddr_reg (), force_reg (DImode, temp)); emit_move_insn (operands[0], force_reg (DImode, temp)); DONE; *************** move\\t%0,%z4\\n\\ *** 5039,5055 **** (set_attr "length" "4,8")]) (define_insn "movdi_internal" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,R,o,*x,*d,*x") ! (match_operand:DI 1 "general_operand" "d,iF,R,o,d,d,J,*x,*d"))] "!TARGET_64BIT && !TARGET_MIPS16 && (register_operand (operands[0], DImode) || register_operand (operands[1], DImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) || operands[1] == CONST0_RTX (DImode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,arith,load,load,store,store,hilo,hilo,hilo") (set_attr "mode" "DI") ! (set_attr "length" "8,16,8,16,8,16,8,8,8")]) (define_insn "" [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,R,To,*d") --- 5259,5275 ---- (set_attr "length" "4,8")]) (define_insn "movdi_internal" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,R,o,*x,*d,*x,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R") ! (match_operand:DI 1 "general_operand" "d,iF,R,o,d,d,J,*x,*d,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D"))] "!TARGET_64BIT && !TARGET_MIPS16 && (register_operand (operands[0], DImode) || register_operand (operands[1], DImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) || operands[1] == CONST0_RTX (DImode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,arith,load,load,store,store,hilo,hilo,hilo,xfer,load,load,xfer,store,store") (set_attr "mode" "DI") ! (set_attr "length" "8,16,8,16,8,16,8,8,8,8,8,8,8,8,8")]) (define_insn "" [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,R,To,*d") *************** move\\t%0,%z4\\n\\ *** 5075,5093 **** "") (define_insn "movdi_internal2" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*x,*d,*x,*a") ! (match_operand:DI 1 "movdi_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,J,*x,*d,*J"))] "TARGET_64BIT && !TARGET_MIPS16 && (register_operand (operands[0], DImode) ! || se_register_operand (operands[1], DImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) || operands[1] == CONST0_RTX (DImode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,hilo,hilo,hilo,hilo") (set_attr "mode" "DI") ! (set_attr "length" "4,8,4,8,4,8,4,8,4,4,4,8")]) ! (define_insn "" [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,d,R,m,*d") (match_operand:DI 1 "movdi_operand" "d,d,y,K,N,s,R,m,d,d,*x"))] "TARGET_64BIT && TARGET_MIPS16 --- 5295,5338 ---- "") (define_insn "movdi_internal2" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,m,*f,*f,*f,*f,*d,*R,*m,*x,*d,*x,*a,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R") ! (match_operand:DI 1 "move_operand" "d,IKL,Mnis,R,m,dJ,dJ,*f,*d*J,*R,*m,*f,*f,*f,*J,*x,*d,*J,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D"))] "TARGET_64BIT && !TARGET_MIPS16 && (register_operand (operands[0], DImode) ! || register_operand (operands[1], DImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) || operands[1] == CONST0_RTX (DImode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,arith,arith,load,load,store,store,move,xfer,load,load,xfer,store,store,hilo,hilo,hilo,hilo,xfer,load,load,xfer,store,store") (set_attr "mode" "DI") ! (set_attr "length" "4,4,8,4,8,4,8,4,4,4,8,4,4,8,4,4,4,8,8,8,8,8,8,8")]) ! ;; Sign-extended operands are reloaded using this instruction, so the ! ;; constraints must handle every SImode source operand X and destination ! ;; register R for which: ! ;; ! ;; mips_secondary_reload_class (CLASS_OF (R), DImode, true, ! ;; gen_rtx_SIGN_EXTEND (DImode, X)) ! ;; ! ;; returns NO_REGS. Also handle memory destinations, where allowed. ! ;; ! ;; This pattern is essentially a trimmed-down version of movdi_internal2. ! ;; The main difference is that dJ -> f and f -> d are the only constraints ! ;; involving float registers. See mips_secondary_reload_class for details. ! (define_insn "*movdi_internal2_extend" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,m,*d,*f,*x,*d,*x,*a,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R") ! (sign_extend:DI (match_operand:SI 1 "move_operand" "d,IKL,Mnis,R,m,dJ,dJ,*f,*d*J,*J,*x,*d,*J,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D")))] ! "TARGET_64BIT && !TARGET_MIPS16 ! && (register_operand (operands[0], DImode) ! || register_operand (operands[1], DImode) ! || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) ! || operands[1] == CONST0_RTX (DImode))" ! "* return mips_sign_extend (insn, operands[0], operands[1]);" ! [(set_attr "type" "move,arith,arith,load,load,store,store,xfer,xfer,hilo,hilo,hilo,hilo,xfer,load,load,xfer,store,store") ! (set_attr "mode" "DI") ! (set_attr "length" "4,4,8,4,8,4,8,4,4,4,4,4,8,8,8,8,8,8,8")]) ! ! (define_insn "*movdi_internal2_mips16" [(set (match_operand:DI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,d,R,m,*d") (match_operand:DI 1 "movdi_operand" "d,d,y,K,N,s,R,m,d,d,*x"))] "TARGET_64BIT && TARGET_MIPS16 *************** move\\t%0,%z4\\n\\ *** 5206,5212 **** emit_move_insn (gen_rtx_REG (SImode, 64), scratch); emit_move_insn (scratch, lo_word); emit_move_insn (gen_rtx (REG, SImode, 65), scratch); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[0]), 2)); } else { --- 5451,5457 ---- emit_move_insn (gen_rtx_REG (SImode, 64), scratch); emit_move_insn (scratch, lo_word); emit_move_insn (gen_rtx (REG, SImode, 65), scratch); ! emit_insn (gen_hilo_delay (operands[0])); } else { *************** move\\t%0,%z4\\n\\ *** 5215,5221 **** emit_insn (gen_ashldi3 (scratch, operands[1], GEN_INT (32))); emit_insn (gen_ashrdi3 (scratch, scratch, GEN_INT (32))); emit_insn (gen_movdi (gen_rtx (REG, DImode, 65), scratch)); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[0]), 2)); } DONE; } --- 5460,5466 ---- emit_insn (gen_ashldi3 (scratch, operands[1], GEN_INT (32))); emit_insn (gen_ashrdi3 (scratch, scratch, GEN_INT (32))); emit_insn (gen_movdi (gen_rtx (REG, DImode, 65), scratch)); ! emit_insn (gen_hilo_delay (operands[0])); } DONE; } *************** move\\t%0,%z4\\n\\ *** 5227,5233 **** emit_insn (gen_movdi (operands[0], gen_rtx_REG (DImode, 64))); emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32))); emit_insn (gen_iordi3 (operands[0], operands[0], scratch)); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[1]), 2)); DONE; } /* This handles moves between a float register and HI/LO. */ --- 5472,5478 ---- emit_insn (gen_movdi (operands[0], gen_rtx_REG (DImode, 64))); emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32))); emit_insn (gen_iordi3 (operands[0], operands[0], scratch)); ! emit_insn (gen_hilo_delay (operands[1])); DONE; } /* This handles moves between a float register and HI/LO. */ *************** move\\t%0,%z4\\n\\ *** 5257,5263 **** emit_insn (gen_ashldi3 (scratch, operands[1], GEN_INT (32))); emit_insn (gen_ashrdi3 (scratch, scratch, GEN_INT (32))); emit_insn (gen_movdi (gen_rtx (REG, DImode, 65), scratch)); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[0]), 2)); DONE; } if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) == HILO_REGNUM) --- 5502,5508 ---- emit_insn (gen_ashldi3 (scratch, operands[1], GEN_INT (32))); emit_insn (gen_ashrdi3 (scratch, scratch, GEN_INT (32))); emit_insn (gen_movdi (gen_rtx (REG, DImode, 65), scratch)); ! emit_insn (gen_hilo_delay (operands[0])); DONE; } if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) == HILO_REGNUM) *************** move\\t%0,%z4\\n\\ *** 5286,5292 **** emit_move_insn (hi_word, scratch); emit_move_insn (scratch, gen_rtx_REG (SImode, 65)); emit_move_insn (lo_word, scratch); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[1]), 2)); } else if (TARGET_MIPS16 && ! M16_REG_P (REGNO (operands[0]))) { --- 5531,5537 ---- emit_move_insn (hi_word, scratch); emit_move_insn (scratch, gen_rtx_REG (SImode, 65)); emit_move_insn (lo_word, scratch); ! emit_insn (gen_hilo_delay (operands[1])); } else if (TARGET_MIPS16 && ! M16_REG_P (REGNO (operands[0]))) { *************** move\\t%0,%z4\\n\\ *** 5301,5307 **** emit_insn (gen_ashldi3 (scratch2, scratch2, GEN_INT (32))); emit_insn (gen_iordi3 (scratch, scratch, scratch2)); emit_insn (gen_movdi (operands[0], scratch)); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[1]), 2)); } else { --- 5546,5552 ---- emit_insn (gen_ashldi3 (scratch2, scratch2, GEN_INT (32))); emit_insn (gen_iordi3 (scratch, scratch, scratch2)); emit_insn (gen_movdi (operands[0], scratch)); ! emit_insn (gen_hilo_delay (operands[1])); } else { *************** move\\t%0,%z4\\n\\ *** 5311,5317 **** emit_insn (gen_movdi (operands[0], gen_rtx (REG, DImode, 64))); emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32))); emit_insn (gen_iordi3 (operands[0], operands[0], scratch)); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[1]), 2)); } DONE; } --- 5556,5562 ---- emit_insn (gen_movdi (operands[0], gen_rtx (REG, DImode, 64))); emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32))); emit_insn (gen_iordi3 (operands[0], operands[0], scratch)); ! emit_insn (gen_hilo_delay (operands[1])); } DONE; } *************** move\\t%0,%z4\\n\\ *** 5373,5379 **** rtx temp; temp = embedded_pic_offset (operands[1]); ! temp = gen_rtx_PLUS (Pmode, embedded_pic_fnaddr_rtx, force_reg (SImode, temp)); emit_move_insn (operands[0], force_reg (SImode, temp)); DONE; --- 5618,5624 ---- rtx temp; temp = embedded_pic_offset (operands[1]); ! temp = gen_rtx_PLUS (Pmode, embedded_pic_fnaddr_reg (), force_reg (SImode, temp)); emit_move_insn (operands[0], force_reg (SImode, temp)); DONE; *************** move\\t%0,%z4\\n\\ *** 5447,5495 **** } }") ! ;; For mips16, we need a special case to handle storing $31 into ! ;; memory, since we don't have a constraint to match $31. This ! ;; instruction can be generated by save_restore_insns. (define_insn "" ! [(set (match_operand:SI 0 "memory_operand" "=R,m") (reg:SI 31))] "TARGET_MIPS16" ! "* ! { ! operands[1] = gen_rtx (REG, SImode, 31); ! return mips_move_1word (operands, insn, FALSE); ! }" [(set_attr "type" "store") (set_attr "mode" "SI") ! (set_attr "length" "4,8")]) ;; The difference between these two is whether or not ints are allowed ;; in FP registers (off by default, use -mdebugh to enable). ! (define_insn "movsi_internal1" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*f*z,*f,*f,*f,*R,*m,*x,*x,*d,*d") ! (match_operand:SI 1 "move_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*f*z,*d,*f,*R,*m,*f,*f,J,*d,*x,*a"))] ! "TARGET_DEBUG_H_MODE && !TARGET_MIPS16 ! && (register_operand (operands[0], SImode) ! || register_operand (operands[1], SImode) ! || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" ! "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,move,load,load,store,store,hilo,hilo,hilo,hilo") ! (set_attr "mode" "SI") ! (set_attr "length" "4,8,4,8,4,8,4,8,4,4,4,4,8,4,8,4,4,4,4")]) ! ! (define_insn "movsi_internal2" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*z,*x,*d,*x,*d") ! (match_operand:SI 1 "move_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*z,*d,J,*x,*d,*a"))] ! "!TARGET_DEBUG_H_MODE && !TARGET_MIPS16 && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,hilo,hilo,hilo,hilo") (set_attr "mode" "SI") ! (set_attr "length" "4,8,4,8,4,8,4,8,4,4,4,4,4,4")]) ;; This is the mips16 movsi instruction. We accept a small integer as ;; the source if the destination is a GP memory reference. This is --- 5692,5731 ---- } }") ! ;; We can only store $ra directly into a small sp offset. Should the ! ;; offset be too wide, non-constant or not sp-based, leave it up to ! ;; reload to choose a scratch register. (define_insn "" ! [(set (mem:SI (plus:SI (reg:SI 29) ! (match_operand:SI 0 "small_int" "n"))) (reg:SI 31))] "TARGET_MIPS16" ! "sw\\t$31,%0($sp)" [(set_attr "type" "store") (set_attr "mode" "SI") ! (set_attr_alternative ! "length" ! [(if_then_else ! (lt (symbol_ref "(unsigned HOST_WIDE_INT) INTVAL (operands[0])") ! (const_int 1024)) ! (const_int 4) ! (const_int 8))])]) ;; The difference between these two is whether or not ints are allowed ;; in FP registers (off by default, use -mdebugh to enable). ! (define_insn "movsi_internal" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,R,m,*f,*f,*f,?*f,*d,*R,*m,*d,*z,*x,*d,*x,*d,*B*C*D,*B*C*D,*B*C*D,*d,*m,*R") ! (match_operand:SI 1 "move_operand" "d,IKL,Mnis,R,m,dJ,dJ,*f,*d*J,*R,*m,*f,*f,*f,*z,*d,J,*x,*d,*a,*d,*m,*R,*B*C*D,*B*C*D,*B*C*D"))] ! "!TARGET_MIPS16 && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,arith,arith,load,load,store,store,move,xfer,load,load,xfer,store,store,xfer,xfer,hilo,hilo,hilo,hilo,xfer,load,load,xfer,store,store") (set_attr "mode" "SI") ! (set_attr "length" "4,4,8,4,8,4,8,4,4,4,8,4,4,8,4,4,4,4,4,4,4,4,8,4,4,8")]) ;; This is the mips16 movsi instruction. We accept a small integer as ;; the source if the destination is a GP memory reference. This is *************** move\\t%0,%z4\\n\\ *** 5500,5507 **** ;; into a register. (define_insn "" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,d,d,R,m,*d,*d") ! (match_operand:SI 1 "move_operand" "d,d,y,S,K,N,s,R,m,d,d,*x,*a"))] "TARGET_MIPS16 && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode) --- 5736,5743 ---- ;; into a register. (define_insn "" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,d,R,m,*d,*d") ! (match_operand:SI 1 "move_operand" "d,d,y,K,N,s,R,m,d,d,*x,*a"))] "TARGET_MIPS16 && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode) *************** move\\t%0,%z4\\n\\ *** 5513,5525 **** && (SMALL_INT (operands[1]) || SMALL_INT_UNSIGNED (operands[1]))))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,move,move,load,arith,arith,arith,load,load,store,store,hilo,hilo") (set_attr "mode" "SI") (set_attr_alternative "length" [(const_int 4) (const_int 4) (const_int 4) - (const_int 8) (if_then_else (match_operand:VOID 1 "m16_uimm8_1" "") (const_int 4) (const_int 8)) --- 5749,5760 ---- && (SMALL_INT (operands[1]) || SMALL_INT_UNSIGNED (operands[1]))))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,move,move,arith,arith,arith,load,load,store,store,hilo,hilo") (set_attr "mode" "SI") (set_attr_alternative "length" [(const_int 4) (const_int 4) (const_int 4) (if_then_else (match_operand:VOID 1 "m16_uimm8_1" "") (const_int 4) (const_int 8)) *************** move\\t%0,%z4\\n\\ *** 5637,5643 **** emit_insn (gen_movsi (gen_rtx_REG (SImode, 65), operands[1])); emit_insn (gen_ashrsi3 (operands[2], operands[1], GEN_INT (31))); emit_insn (gen_movsi (gen_rtx (REG, SImode, 64), operands[2])); ! emit_insn (gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, operands[0]), 2)); DONE; } /* Use a mult to reload LO on mips16. ??? This is hideous. */ --- 5872,5878 ---- emit_insn (gen_movsi (gen_rtx_REG (SImode, 65), operands[1])); emit_insn (gen_ashrsi3 (operands[2], operands[1], GEN_INT (31))); emit_insn (gen_movsi (gen_rtx (REG, SImode, 64), operands[2])); ! emit_insn (gen_hilo_delay (operands[0])); DONE; } /* Use a mult to reload LO on mips16. ??? This is hideous. */ *************** move\\t%0,%z4\\n\\ *** 5764,5771 **** ;; This insn is for the unspec delay for HILO. ! (define_insn "*HILO_delay" ! [(unspec [(match_operand 0 "register_operand" "=b")] 2 )] "" "" [(set_attr "type" "nop") --- 5999,6006 ---- ;; This insn is for the unspec delay for HILO. ! (define_insn "hilo_delay" ! [(unspec [(match_operand 0 "register_operand" "=b")] UNSPEC_HILO_DELAY)] "" "" [(set_attr "type" "nop") *************** move\\t%0,%z4\\n\\ *** 5936,5945 **** ;; The difference between these two is whether or not ints are allowed ;; in FP registers (off by default, use -mdebugh to enable). ! (define_insn "movhi_internal1" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f,*f*z,*x,*d") (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))] ! "TARGET_DEBUG_H_MODE && !TARGET_MIPS16 && (register_operand (operands[0], HImode) || register_operand (operands[1], HImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" --- 6171,6180 ---- ;; The difference between these two is whether or not ints are allowed ;; in FP registers (off by default, use -mdebugh to enable). ! (define_insn "movhi_internal" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f*z,*f,*x,*d") (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))] ! "!TARGET_MIPS16 && (register_operand (operands[0], HImode) || register_operand (operands[1], HImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" *************** move\\t%0,%z4\\n\\ *** 5948,5965 **** (set_attr "mode" "HI") (set_attr "length" "4,4,4,8,4,8,4,4,4,4,4")]) - (define_insn "movhi_internal2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*z,*x,*d") - (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*z,*d,*d,*x"))] - "!TARGET_DEBUG_H_MODE && !TARGET_MIPS16 - && (register_operand (operands[0], HImode) - || register_operand (operands[1], HImode) - || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" - "* return mips_move_1word (operands, insn, TRUE);" - [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,hilo,hilo") - (set_attr "mode" "HI") - (set_attr "length" "4,4,4,8,4,8,4,4,4,4")]) - (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,R,m,*d") (match_operand:HI 1 "general_operand" "d,d,y,K,N,R,m,d,d,*x"))] --- 6183,6188 ---- *************** move\\t%0,%z4\\n\\ *** 6058,6067 **** ;; The difference between these two is whether or not ints are allowed ;; in FP registers (off by default, use -mdebugh to enable). ! (define_insn "movqi_internal1" [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f*z,*f,*x,*d") (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))] ! "TARGET_DEBUG_H_MODE && !TARGET_MIPS16 && (register_operand (operands[0], QImode) || register_operand (operands[1], QImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" --- 6281,6290 ---- ;; The difference between these two is whether or not ints are allowed ;; in FP registers (off by default, use -mdebugh to enable). ! (define_insn "movqi_internal" [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f*z,*f,*x,*d") (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))] ! "!TARGET_MIPS16 && (register_operand (operands[0], QImode) || register_operand (operands[1], QImode) || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" *************** move\\t%0,%z4\\n\\ *** 6070,6087 **** (set_attr "mode" "QI") (set_attr "length" "4,4,4,8,4,8,4,4,4,4,4")]) - (define_insn "movqi_internal2" - [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*z,*x,*d") - (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*z,*d,*d,*x"))] - "!TARGET_DEBUG_H_MODE && !TARGET_MIPS16 - && (register_operand (operands[0], QImode) - || register_operand (operands[1], QImode) - || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" - "* return mips_move_1word (operands, insn, TRUE);" - [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,hilo,hilo") - (set_attr "mode" "QI") - (set_attr "length" "4,4,4,8,4,8,4,4,4,4")]) - (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=d,y,d,d,d,d,d,R,m,*d") (match_operand:QI 1 "general_operand" "d,d,y,K,N,R,m,d,d,*x"))] --- 6293,6298 ---- *************** move\\t%0,%z4\\n\\ *** 6149,6187 **** { if ((reload_in_progress | reload_completed) == 0 && !register_operand (operands[0], SFmode) ! && !register_operand (operands[1], SFmode) ! && (TARGET_MIPS16 ! || ((GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0) ! && operands[1] != CONST0_RTX (SFmode)))) ! { ! rtx temp = force_reg (SFmode, operands[1]); ! emit_move_insn (operands[0], temp); ! DONE; ! } }") (define_insn "movsf_internal1" [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,f,f,R,m,*f,*d,*d,*d,*d,*R,*m") ! (match_operand:SF 1 "general_operand" "f,G,R,Fm,fG,fG,*d,*f,*G*d,*R,*F*m,*d,*d"))] "TARGET_HARD_FLOAT && (register_operand (operands[0], SFmode) ! || register_operand (operands[1], SFmode) ! || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) ! || operands[1] == CONST0_RTX (SFmode))" "* return mips_move_1word (operands, insn, FALSE);" [(set_attr "type" "move,xfer,load,load,store,store,xfer,xfer,move,load,load,store,store") (set_attr "mode" "SF") (set_attr "length" "4,4,4,8,4,8,4,4,4,4,8,4,8")]) - (define_insn "movsf_internal2" [(set (match_operand:SF 0 "nonimmediate_operand" "=d,d,d,R,m") ! (match_operand:SF 1 "general_operand" " Gd,R,Fm,d,d"))] "TARGET_SOFT_FLOAT && !TARGET_MIPS16 && (register_operand (operands[0], SFmode) ! || register_operand (operands[1], SFmode) ! || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) ! || operands[1] == CONST0_RTX (SFmode))" "* return mips_move_1word (operands, insn, FALSE);" [(set_attr "type" "move,load,load,store,store") (set_attr "mode" "SF") --- 6360,6386 ---- { if ((reload_in_progress | reload_completed) == 0 && !register_operand (operands[0], SFmode) ! && !nonmemory_operand (operands[1], SFmode)) ! operands[1] = force_reg (SFmode, operands[1]); }") (define_insn "movsf_internal1" [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,f,f,R,m,*f,*d,*d,*d,*d,*R,*m") ! (match_operand:SF 1 "general_operand" "f,G,R,m,fG,fG,*d,*f,*G*d,*R,*m,*d,*d"))] "TARGET_HARD_FLOAT && (register_operand (operands[0], SFmode) ! || nonmemory_operand (operands[1], SFmode))" "* return mips_move_1word (operands, insn, FALSE);" [(set_attr "type" "move,xfer,load,load,store,store,xfer,xfer,move,load,load,store,store") (set_attr "mode" "SF") (set_attr "length" "4,4,4,8,4,8,4,4,4,4,8,4,8")]) (define_insn "movsf_internal2" [(set (match_operand:SF 0 "nonimmediate_operand" "=d,d,d,R,m") ! (match_operand:SF 1 "general_operand" " Gd,R,m,d,d"))] "TARGET_SOFT_FLOAT && !TARGET_MIPS16 && (register_operand (operands[0], SFmode) ! || nonmemory_operand (operands[1], SFmode))" "* return mips_move_1word (operands, insn, FALSE);" [(set_attr "type" "move,load,load,store,store") (set_attr "mode" "SF") *************** move\\t%0,%z4\\n\\ *** 6189,6195 **** (define_insn "" [(set (match_operand:SF 0 "nonimmediate_operand" "=d,y,d,d,d,R,m") ! (match_operand:SF 1 "general_operand" "d,d,y,R,Fm,d,d"))] "TARGET_MIPS16 && (register_operand (operands[0], SFmode) || register_operand (operands[1], SFmode))" --- 6388,6394 ---- (define_insn "" [(set (match_operand:SF 0 "nonimmediate_operand" "=d,y,d,d,d,R,m") ! (match_operand:SF 1 "nonimmediate_operand" "d,d,y,R,m,d,d"))] "TARGET_MIPS16 && (register_operand (operands[0], SFmode) || register_operand (operands[1], SFmode))" *************** move\\t%0,%z4\\n\\ *** 6209,6271 **** { if ((reload_in_progress | reload_completed) == 0 && !register_operand (operands[0], DFmode) ! && !register_operand (operands[1], DFmode) ! && (TARGET_MIPS16 ! || ((GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0) ! && operands[1] != CONST0_RTX (DFmode)))) ! { ! rtx temp = force_reg (DFmode, operands[1]); ! emit_move_insn (operands[0], temp); ! DONE; ! } }") (define_insn "movdf_internal1" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,R,To,f,*f,*d,*d,*d,*d,*R,*T") ! (match_operand:DF 1 "general_operand" "f,R,To,fG,fG,F,*d,*f,*d*G,*R,*T*F,*d,*d"))] "TARGET_HARD_FLOAT && !(TARGET_FLOAT64 && !TARGET_64BIT) && TARGET_DOUBLE_FLOAT && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode) ! || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) ! || operands[1] == CONST0_RTX (DFmode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,load,store,store,load,xfer,xfer,move,load,load,store,store") ! (set_attr "mode" "DF") ! (set_attr "length" "4,8,16,8,16,16,8,8,8,8,16,8,16")]) (define_insn "movdf_internal1a" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,R,R,To,To,*d,*d,*d,*To,*R,*d") ! (match_operand:DF 1 "general_operand" " f,To,f,G,f,G,*F,*To,*R,*d,*d,*d"))] "TARGET_HARD_FLOAT && (TARGET_FLOAT64 && !TARGET_64BIT) && TARGET_DOUBLE_FLOAT && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode) ! || (GET_CODE (operands [0]) == MEM ! && ((GET_CODE (operands[1]) == CONST_INT ! && INTVAL (operands[1]) == 0) ! || operands[1] == CONST0_RTX (DFmode))))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,store,store,store,store,load,load,load,store,store,move") (set_attr "mode" "DF") ! (set_attr "length" "4,8,4,4,8,8,8,8,4,8,4,4")]) (define_insn "movdf_internal2" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,R,To,*d") ! (match_operand:DF 1 "general_operand" "dG,R,ToF,d,d,*f"))] "(TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT) && !TARGET_MIPS16 && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode) ! || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0) ! || operands[1] == CONST0_RTX (DFmode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,load,store,store,xfer") (set_attr "mode" "DF") ! (set_attr "length" "8,8,16,8,16,8")]) (define_insn "" [(set (match_operand:DF 0 "nonimmediate_operand" "=d,y,d,d,d,R,To") ! (match_operand:DF 1 "general_operand" "d,d,y,R,ToF,d,d"))] "TARGET_MIPS16 && (register_operand (operands[0], DFmode) || register_operand (operands[1], DFmode))" --- 6408,6455 ---- { if ((reload_in_progress | reload_completed) == 0 && !register_operand (operands[0], DFmode) ! && !nonmemory_operand (operands[1], DFmode)) ! operands[1] = force_reg (DFmode, operands[1]); }") (define_insn "movdf_internal1" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,f,R,To,*f,*d,*d,*d,*d,*R,*T") ! (match_operand:DF 1 "general_operand" "f,G,R,To,fG,fG,*d,*f,*d*G,*R,*T,*d,*d"))] "TARGET_HARD_FLOAT && !(TARGET_FLOAT64 && !TARGET_64BIT) && TARGET_DOUBLE_FLOAT && (register_operand (operands[0], DFmode) ! || nonmemory_operand (operands[1], DFmode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,move,load,load,store,store,xfer,xfer,move,load,load,store,store") ! (set_attr "mode" "DF") ! (set_attr "length" "4,8,8,16,8,16,8,8,8,8,16,8,16")]) (define_insn "movdf_internal1a" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,R,R,To,To,*d,*d,*To,*R,*d") ! (match_operand:DF 1 "general_operand" " f,To,f,G,f,G,*To,*R,*d,*d,*d"))] "TARGET_HARD_FLOAT && (TARGET_FLOAT64 && !TARGET_64BIT) && TARGET_DOUBLE_FLOAT && (register_operand (operands[0], DFmode) ! || nonmemory_operand (operands[1], DFmode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,store,store,store,store,load,load,store,store,move") (set_attr "mode" "DF") ! (set_attr "length" "4,8,4,4,8,8,8,4,8,4,4")]) (define_insn "movdf_internal2" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,R,To,d,f,f") ! (match_operand:DF 1 "general_operand" "dG,R,To,d,d,f,d,f"))] "(TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT) && !TARGET_MIPS16 && (register_operand (operands[0], DFmode) ! || nonmemory_operand (operands[1], DFmode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,load,store,store,xfer,load,move") (set_attr "mode" "DF") ! (set_attr "length" "8,8,16,8,16,8,8,4")]) (define_insn "" [(set (match_operand:DF 0 "nonimmediate_operand" "=d,y,d,d,d,R,To") ! (match_operand:DF 1 "nonimmediate_operand" "d,d,y,R,To,d,d"))] "TARGET_MIPS16 && (register_operand (operands[0], DFmode) || register_operand (operands[1], DFmode))" *************** move\\t%0,%z4\\n\\ *** 6292,6298 **** (define_insn "loadgp" [(set (reg:DI 28) (unspec_volatile:DI [(match_operand:DI 0 "address_operand" "") ! (match_operand:DI 1 "register_operand" "")] 2)) (clobber (reg:DI 1))] "" "%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%a0)))\\n\\tdaddu\\t$gp,$1,%1%]" --- 6476,6483 ---- (define_insn "loadgp" [(set (reg:DI 28) (unspec_volatile:DI [(match_operand:DI 0 "address_operand" "") ! (match_operand:DI 1 "register_operand" "")] ! UNSPEC_LOADGP)) (clobber (reg:DI 1))] "" "%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%a0)))\\n\\tdaddu\\t$gp,$1,%1%]" *************** move\\t%0,%z4\\n\\ *** 6365,6370 **** --- 6550,6561 ---- ;; fill a delay slot. This also prevents a bug in delayed branches ;; from showing up, which reuses one of the registers in our clobbers. + ;; ??? Disabled because it doesn't preserve alias information for + ;; operands 0 and 1. Also, the rtl for the second insn doesn't mention + ;; that it uses the registers clobbered by the first. + ;; + ;; It would probably be better to split the block into individual + ;; instructions instead. (define_split [(set (mem:BLK (match_operand:SI 0 "register_operand" "")) (mem:BLK (match_operand:SI 1 "register_operand" ""))) *************** move\\t%0,%z4\\n\\ *** 6376,6382 **** (use (match_operand:SI 3 "small_int" "")) (use (const_int 0))] ! "reload_completed && !TARGET_DEBUG_D_MODE && INTVAL (operands[2]) > 0" ;; All but the last move [(parallel [(set (mem:BLK (match_dup 0)) --- 6567,6573 ---- (use (match_operand:SI 3 "small_int" "")) (use (const_int 0))] ! "reload_completed && 0 && INTVAL (operands[2]) > 0" ;; All but the last move [(parallel [(set (mem:BLK (match_dup 0)) *************** move\\t%0,%z4\\n\\ *** 7539,7544 **** --- 7730,7780 ---- (const_int 4) (const_int 8))])]) + (define_insn "rotrsi3" + [(set (match_operand:SI 0 "register_operand" "=d") + (rotatert:SI (match_operand:SI 1 "register_operand" "d") + (match_operand:SI 2 "arith_operand" "dn")))] + "ISA_HAS_ROTR_SI" + "* + { + if (TARGET_SR71K && GET_CODE (operands[2]) != CONST_INT) + return \"rorv\\t%0,%1,%2\"; + + if ((GET_CODE (operands[2]) == CONST_INT) + && (INTVAL (operands[2]) < 0 || INTVAL (operands[2]) >= 32)) + abort (); + + return \"ror\\t%0,%1,%2\"; + }" + [(set_attr "type" "arith") + (set_attr "mode" "SI")]) + + (define_insn "rotrdi3" + [(set (match_operand:DI 0 "register_operand" "=d") + (rotatert:DI (match_operand:DI 1 "register_operand" "d") + (match_operand:DI 2 "arith_operand" "dn")))] + "ISA_HAS_ROTR_DI" + "* + { + if (TARGET_SR71K) + { + if (GET_CODE (operands[2]) != CONST_INT) + return \"drorv\\t%0,%1,%2\"; + + if (INTVAL (operands[2]) >= 32 && INTVAL (operands[2]) <= 63) + return \"dror32\\t%0,%1,%2\"; + } + + if ((GET_CODE (operands[2]) == CONST_INT) + && (INTVAL (operands[2]) < 0 || INTVAL (operands[2]) >= 64)) + abort (); + + return \"dror\\t%0,%1,%2\"; + }" + [(set_attr "type" "arith") + (set_attr "mode" "DI")]) + + ;; On the mips16, we can split a 4 byte shift into 2 2 byte shifts. (define_split *************** move\\t%0,%z4\\n\\ *** 7958,7963 **** --- 8194,8318 ---- (set_attr "mode" "none") (set_attr "length" "8")]) + (define_expand "bunordered" + [(set (pc) + (if_then_else (unordered:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + if (operands[0]) /* avoid unused code warning */ + { + gen_conditional_branch (operands, UNORDERED); + DONE; + } + }") + + (define_expand "bordered" + [(set (pc) + (if_then_else (ordered:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + if (operands[0]) /* avoid unused code warning */ + { + gen_conditional_branch (operands, ORDERED); + DONE; + } + }") + + (define_expand "bunlt" + [(set (pc) + (if_then_else (unlt:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + if (operands[0]) /* avoid unused code warning */ + { + gen_conditional_branch (operands, UNLT); + DONE; + } + }") + + (define_expand "bunge" + [(set (pc) + (if_then_else (unge:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + gen_conditional_branch (operands, UNGE); + DONE; + }") + + (define_expand "buneq" + [(set (pc) + (if_then_else (uneq:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + if (operands[0]) /* avoid unused code warning */ + { + gen_conditional_branch (operands, UNEQ); + DONE; + } + }") + + (define_expand "bltgt" + [(set (pc) + (if_then_else (ltgt:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + gen_conditional_branch (operands, LTGT); + DONE; + }") + + (define_expand "bunle" + [(set (pc) + (if_then_else (unle:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + if (operands[0]) /* avoid unused code warning */ + { + gen_conditional_branch (operands, UNLE); + DONE; + } + }") + + (define_expand "bungt" + [(set (pc) + (if_then_else (ungt:CC (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + " + { + gen_conditional_branch (operands, UNGT); + DONE; + }") + (define_expand "beq" [(set (pc) (if_then_else (eq:CC (cc0) *************** move\\t%0,%z4\\n\\ *** 8704,8710 **** [(set (match_operand:SI 0 "register_operand" "=d") (gtu:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "reg_or_0_operand" "dJ")))] ! "" "sltu\\t%0,%z2,%1" [(set_attr "type" "arith") (set_attr "mode" "SI")]) --- 9059,9065 ---- [(set (match_operand:SI 0 "register_operand" "=d") (gtu:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "reg_or_0_operand" "dJ")))] ! "!TARGET_MIPS16" "sltu\\t%0,%z2,%1" [(set_attr "type" "arith") (set_attr "mode" "SI")]) *************** move\\t%0,%z4\\n\\ *** 8713,8719 **** [(set (match_operand:SI 0 "register_operand" "=t") (gtu:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "register_operand" "d")))] ! "" "sltu\\t%2,%1" [(set_attr "type" "arith") (set_attr "mode" "SI")]) --- 9068,9074 ---- [(set (match_operand:SI 0 "register_operand" "=t") (gtu:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "register_operand" "d")))] ! "TARGET_MIPS16" "sltu\\t%2,%1" [(set_attr "type" "arith") (set_attr "mode" "SI")]) *************** move\\t%0,%z4\\n\\ *** 8722,8728 **** [(set (match_operand:DI 0 "register_operand" "=d") (gtu:DI (match_operand:DI 1 "se_register_operand" "d") (match_operand:DI 2 "se_reg_or_0_operand" "dJ")))] ! "TARGET_64BIT" "sltu\\t%0,%z2,%1" [(set_attr "type" "arith") (set_attr "mode" "DI")]) --- 9077,9083 ---- [(set (match_operand:DI 0 "register_operand" "=d") (gtu:DI (match_operand:DI 1 "se_register_operand" "d") (match_operand:DI 2 "se_reg_or_0_operand" "dJ")))] ! "TARGET_64BIT && !TARGET_MIPS16" "sltu\\t%0,%z2,%1" [(set_attr "type" "arith") (set_attr "mode" "DI")]) *************** move\\t%0,%z4\\n\\ *** 8731,8737 **** [(set (match_operand:DI 0 "register_operand" "=t") (gtu:DI (match_operand:DI 1 "se_register_operand" "d") (match_operand:DI 2 "se_register_operand" "d")))] ! "TARGET_64BIT" "sltu\\t%2,%1" [(set_attr "type" "arith") (set_attr "mode" "DI")]) --- 9086,9092 ---- [(set (match_operand:DI 0 "register_operand" "=t") (gtu:DI (match_operand:DI 1 "se_register_operand" "d") (match_operand:DI 2 "se_register_operand" "d")))] ! "TARGET_64BIT && TARGET_MIPS16" "sltu\\t%2,%1" [(set_attr "type" "arith") (set_attr "mode" "DI")]) *************** move\\t%0,%z4\\n\\ *** 9014,9019 **** --- 9369,9422 ---- ;; ;; .................... + (define_insn "sunordered_df" + [(set (match_operand:CC 0 "register_operand" "=z") + (unordered:CC (match_operand:DF 1 "register_operand" "f") + (match_operand:DF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.un.d\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + + (define_insn "sunlt_df" + [(set (match_operand:CC 0 "register_operand" "=z") + (unlt:CC (match_operand:DF 1 "register_operand" "f") + (match_operand:DF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.ult.d\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + + (define_insn "suneq_df" + [(set (match_operand:CC 0 "register_operand" "=z") + (uneq:CC (match_operand:DF 1 "register_operand" "f") + (match_operand:DF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.ueq.d\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + + (define_insn "sunle_df" + [(set (match_operand:CC 0 "register_operand" "=z") + (unle:CC (match_operand:DF 1 "register_operand" "f") + (match_operand:DF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.ule.d\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + (define_insn "seq_df" [(set (match_operand:CC 0 "register_operand" "=z") (eq:CC (match_operand:DF 1 "register_operand" "f") *************** move\\t%0,%z4\\n\\ *** 9074,9079 **** --- 9477,9530 ---- [(set_attr "type" "fcmp") (set_attr "mode" "FPSW")]) + (define_insn "sunordered_sf" + [(set (match_operand:CC 0 "register_operand" "=z") + (unordered:CC (match_operand:SF 1 "register_operand" "f") + (match_operand:SF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.un.s\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + + (define_insn "sunlt_sf" + [(set (match_operand:CC 0 "register_operand" "=z") + (unlt:CC (match_operand:SF 1 "register_operand" "f") + (match_operand:SF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.ult.s\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + + (define_insn "suneq_sf" + [(set (match_operand:CC 0 "register_operand" "=z") + (uneq:CC (match_operand:SF 1 "register_operand" "f") + (match_operand:SF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.ueq.s\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + + (define_insn "sunle_sf" + [(set (match_operand:CC 0 "register_operand" "=z") + (unle:CC (match_operand:SF 1 "register_operand" "f") + (match_operand:SF 2 "register_operand" "f")))] + "TARGET_HARD_FLOAT" + "* + { + return mips_fill_delay_slot (\"c.ule.s\\t%Z0%1,%2\", DELAY_FCMP, operands, insn); + }" + [(set_attr "type" "fcmp") + (set_attr "mode" "FPSW")]) + (define_insn "seq_sf" [(set (match_operand:CC 0 "register_operand" "=z") (eq:CC (match_operand:SF 1 "register_operand" "f") *************** move\\t%0,%z4\\n\\ *** 9150,9167 **** "!TARGET_MIPS16" "* { ! if (GET_CODE (operands[0]) == REG) ! return \"%*j\\t%0\"; ! /* ??? I don't know why this is necessary. This works around an ! assembler problem that appears when a label is defined, then referenced ! in a switch table, then used in a `j' instruction. */ ! else if (mips_abi != ABI_32 && mips_abi != ABI_O64) ! return \"%*b\\t%l0\"; else return \"%*j\\t%l0\"; }" [(set_attr "type" "jump") ! (set_attr "mode" "none")]) ;; We need a different insn for the mips16, because a mips16 branch ;; does not have a delay slot. --- 9601,9631 ---- "!TARGET_MIPS16" "* { ! if (flag_pic && ! TARGET_EMBEDDED_PIC) ! { ! if (get_attr_length (insn) <= 8) ! return \"%*b\\t%l0\"; ! else if (Pmode == DImode) ! return \"%[dla\\t%@,%l0\;%*jr\\t%@%]\"; ! else ! return \"%[la\\t%@,%l0\;%*jr\\t%@%]\"; ! } else return \"%*j\\t%l0\"; }" [(set_attr "type" "jump") ! (set_attr "mode" "none") ! (set (attr "length") ! ;; we can't use `j' when emitting non-embedded PIC, so we emit ! ;; branch, if it's in range, or load the address of the branch ! ;; target into $at in a PIC-compatible way and then jump to it. ! (if_then_else ! (ior (eq (symbol_ref "flag_pic && ! TARGET_EMBEDDED_PIC") ! (const_int 0)) ! (lt (abs (minus (match_dup 0) ! (plus (pc) (const_int 4)))) ! (const_int 131072))) ! (const_int 4) (const_int 16)))]) ;; We need a different insn for the mips16, because a mips16 branch ;; does not have a delay slot. *************** move\\t%0,%z4\\n\\ *** 9169,9175 **** (define_insn "" [(set (pc) (label_ref (match_operand 0 "" "")))] ! "TARGET_MIPS16 && GET_CODE (operands[0]) != REG" "b\\t%l0" [(set_attr "type" "branch") (set_attr "mode" "none") --- 9633,9639 ---- (define_insn "" [(set (pc) (label_ref (match_operand 0 "" "")))] ! "TARGET_MIPS16" "b\\t%l0" [(set_attr "type" "branch") (set_attr "mode" "none") *************** move\\t%0,%z4\\n\\ *** 9294,9300 **** t2 = gen_reg_rtx (SImode); t3 = gen_reg_rtx (SImode); emit_insn (gen_extendhisi2 (t1, operands[0])); ! emit_move_insn (t2, gen_rtx (LABEL_REF, SImode, operands[1])); emit_insn (gen_addsi3 (t3, t1, t2)); emit_jump_insn (gen_tablejump_internal1 (t3, operands[1])); DONE; --- 9758,9764 ---- t2 = gen_reg_rtx (SImode); t3 = gen_reg_rtx (SImode); emit_insn (gen_extendhisi2 (t1, operands[0])); ! emit_move_insn (t2, gen_rtx_LABEL_REF (SImode, operands[1])); emit_insn (gen_addsi3 (t3, t1, t2)); emit_jump_insn (gen_tablejump_internal1 (t3, operands[1])); DONE; *************** move\\t%0,%z4\\n\\ *** 9316,9322 **** t2 = gen_reg_rtx (DImode); t3 = gen_reg_rtx (DImode); emit_insn (gen_extendhidi2 (t1, operands[0])); ! emit_move_insn (t2, gen_rtx (LABEL_REF, DImode, operands[1])); emit_insn (gen_adddi3 (t3, t1, t2)); emit_jump_insn (gen_tablejump_internal2 (t3, operands[1])); DONE; --- 9780,9786 ---- t2 = gen_reg_rtx (DImode); t3 = gen_reg_rtx (DImode); emit_insn (gen_extendhidi2 (t1, operands[0])); ! emit_move_insn (t2, gen_rtx_LABEL_REF (DImode, operands[1])); emit_insn (gen_adddi3 (t3, t1, t2)); emit_jump_insn (gen_tablejump_internal2 (t3, operands[1])); DONE; *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 9469,9475 **** ;; this is easy. (define_expand "builtin_setjmp_setup" ! [(unspec [(match_operand 0 "register_operand" "r")] 20)] "TARGET_ABICALLS" " { --- 9933,9939 ---- ;; this is easy. (define_expand "builtin_setjmp_setup" ! [(unspec [(match_operand 0 "register_operand" "r")] UNSPEC_SETJMP)] "TARGET_ABICALLS" " { *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 9498,9504 **** ;; target address in t9 so that we can use it for loading $gp. (define_expand "builtin_longjmp" ! [(unspec_volatile [(match_operand 0 "register_operand" "r")] 3)] "TARGET_ABICALLS" " { --- 9962,9968 ---- ;; target address in t9 so that we can use it for loading $gp. (define_expand "builtin_longjmp" ! [(unspec_volatile [(match_operand 0 "register_operand" "r")] UNSPEC_LONGJMP)] "TARGET_ABICALLS" " { *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 9548,9554 **** ;; saved or used to pass arguments. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] 0)] "" "" [(set_attr "type" "unknown") --- 10012,10018 ---- ;; saved or used to pass arguments. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] "" "" [(set_attr "type" "unknown") *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 9594,9607 **** (define_insn "get_fnaddr" [(set (match_operand 0 "register_operand" "=d") ! (unspec [(match_operand 1 "" "")] 1)) (clobber (reg:SI 31))] "TARGET_EMBEDDED_PIC && GET_CODE (operands[1]) == SYMBOL_REF" ! "%($LF%= = . + 8\;bal\\t$LF%=\;la\\t%0,%1-$LF%=%)\;addu\\t%0,%0,$31" [(set_attr "type" "call") (set_attr "mode" "none") ! (set_attr "length" "16")]) ;; This is used in compiling the unwind routines. (define_expand "eh_return" --- 10058,10071 ---- (define_insn "get_fnaddr" [(set (match_operand 0 "register_operand" "=d") ! (unspec [(match_operand 1 "" "")] UNSPEC_GET_FNADDR)) (clobber (reg:SI 31))] "TARGET_EMBEDDED_PIC && GET_CODE (operands[1]) == SYMBOL_REF" ! "%($LF%= = . + 8\;bal\\t$LF%=\;nop;la\\t%0,%1-$LF%=%)\;addu\\t%0,%0,$31" [(set_attr "type" "call") (set_attr "mode" "none") ! (set_attr "length" "20")]) ;; This is used in compiling the unwind routines. (define_expand "eh_return" *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 9627,9693 **** ;; until we know where it will be put in the stack frame. (define_insn "eh_set_lr_si" ! [(unspec [(match_operand:SI 0 "register_operand" "r")] 3) ! (clobber (match_scratch:SI 1 "=&r"))] "! TARGET_64BIT" "#") (define_insn "eh_set_lr_di" ! [(unspec [(match_operand:DI 0 "register_operand" "r")] 3) ! (clobber (match_scratch:DI 1 "=&r"))] "TARGET_64BIT" "#") (define_split ! [(unspec [(match_operand 0 "register_operand" "")] 3) (clobber (match_scratch 1 ""))] "reload_completed && !TARGET_DEBUG_D_MODE" [(const_int 0)] " { ! HOST_WIDE_INT gp_offset; ! rtx base; ! ! compute_frame_size (get_frame_size ()); ! if (((current_frame_info.mask >> 31) & 1) == 0) ! abort (); ! gp_offset = current_frame_info.gp_sp_offset; ! ! if (gp_offset < 32768) ! base = stack_pointer_rtx; ! else ! { ! base = operands[1]; ! emit_move_insn (base, GEN_INT (gp_offset)); ! if (Pmode == DImode) ! emit_insn (gen_adddi3 (base, base, stack_pointer_rtx)); ! else ! emit_insn (gen_addsi3 (base, base, stack_pointer_rtx)); ! gp_offset = 0; ! } ! emit_move_insn (gen_rtx_MEM (GET_MODE (operands[0]), ! plus_constant (base, gp_offset)), ! operands[0]); DONE; }") (define_insn "exception_receiver" ! [(unspec_volatile [(const_int 0)] 4)] "TARGET_ABICALLS && (mips_abi == ABI_32 || mips_abi == ABI_O64)" ! "* ! { ! rtx loc; ! ! operands[0] = pic_offset_table_rtx; ! if (frame_pointer_needed) ! loc = hard_frame_pointer_rtx; ! else ! loc = stack_pointer_rtx; ! loc = plus_constant (loc, current_frame_info.args_size); ! operands[1] = gen_rtx_MEM (Pmode, loc); ! ! return mips_move_1word (operands, insn, 0); ! }" [(set_attr "type" "load") (set_attr "length" "8")]) --- 10091,10122 ---- ;; until we know where it will be put in the stack frame. (define_insn "eh_set_lr_si" ! [(unspec [(match_operand:SI 0 "register_operand" "d")] UNSPEC_EH_RETURN) ! (clobber (match_scratch:SI 1 "=&d"))] "! TARGET_64BIT" "#") (define_insn "eh_set_lr_di" ! [(unspec [(match_operand:DI 0 "register_operand" "d")] UNSPEC_EH_RETURN) ! (clobber (match_scratch:DI 1 "=&d"))] "TARGET_64BIT" "#") (define_split ! [(unspec [(match_operand 0 "register_operand" "")] UNSPEC_EH_RETURN) (clobber (match_scratch 1 ""))] "reload_completed && !TARGET_DEBUG_D_MODE" [(const_int 0)] " { ! mips_set_return_address (operands[0], operands[1]); DONE; }") (define_insn "exception_receiver" ! [(unspec_volatile [(const_int 0)] UNSPEC_EH_RECEIVER)] "TARGET_ABICALLS && (mips_abi == ABI_32 || mips_abi == ABI_O64)" ! "* return mips_restore_gp (operands, insn);" [(set_attr "type" "load") (set_attr "length" "8")]) *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10151,10157 **** if (GET_MODE (target) == SImode) return \"la\\t%^,%1\\n\\tjal\\t%4,%^\"; else ! return \"la\\t%^,%1\\n\\tjal\\t%4,%^\"; } else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM) return \"move\\t%^,%1\\n\\tjal\\t%4,%^\"; --- 10580,10586 ---- if (GET_MODE (target) == SImode) return \"la\\t%^,%1\\n\\tjal\\t%4,%^\"; else ! return \"dla\\t%^,%1\\n\\tjal\\t%4,%^\"; } else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM) return \"move\\t%^,%1\\n\\tjal\\t%4,%^\"; *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10198,10203 **** --- 10627,10677 ---- ;; .................... ;; + + (define_expand "prefetch" + [(prefetch (match_operand 0 "address_operand" "") + (match_operand 1 "const_int_operand" "") + (match_operand 2 "const_int_operand" ""))] + "ISA_HAS_PREFETCH" + "{ + if (symbolic_operand (operands[0], GET_MODE (operands[0]))) + operands[0] = force_reg (GET_MODE (operands[0]), operands[0]); + }") + + (define_insn "prefetch_si_address" + [(prefetch (plus:SI (match_operand:SI 0 "register_operand" "r") + (match_operand:SI 3 "const_int_operand" "i")) + (match_operand:SI 1 "const_int_operand" "n") + (match_operand:SI 2 "const_int_operand" "n"))] + "ISA_HAS_PREFETCH && Pmode == SImode" + "* return mips_emit_prefetch (operands);" + [(set_attr "type" "load")]) + + (define_insn "prefetch_si" + [(prefetch (match_operand:SI 0 "register_operand" "r") + (match_operand:SI 1 "const_int_operand" "n") + (match_operand:SI 2 "const_int_operand" "n"))] + "ISA_HAS_PREFETCH && Pmode == SImode" + "* return mips_emit_prefetch (operands);" + [(set_attr "type" "load")]) + + (define_insn "prefetch_di_address" + [(prefetch (plus:DI (match_operand:DI 0 "se_register_operand" "r") + (match_operand:DI 3 "const_int_operand" "i")) + (match_operand:DI 1 "const_int_operand" "n") + (match_operand:DI 2 "const_int_operand" "n"))] + "ISA_HAS_PREFETCH && Pmode == DImode" + "* return mips_emit_prefetch (operands);" + [(set_attr "type" "load")]) + + (define_insn "prefetch_di" + [(prefetch (match_operand:DI 0 "se_register_operand" "r") + (match_operand:DI 1 "const_int_operand" "n") + (match_operand:DI 2 "const_int_operand" "n"))] + "ISA_HAS_PREFETCH && Pmode == DImode" + "* return mips_emit_prefetch (operands);" + [(set_attr "type" "load")]) + (define_insn "nop" [(const_int 0)] "" *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10432,10439 **** "(ISA_HAS_CONDMOVE || ISA_HAS_INT_CONDMOVE) && TARGET_64BIT" " { - if (mips_isa == 32) - FAIL; gen_conditional_move (operands); DONE; }") --- 10906,10911 ---- *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10473,10479 **** ;; (define_insn "consttable_qi" ! [(unspec_volatile [(match_operand:QI 0 "consttable_operand" "=g")] 10)] "TARGET_MIPS16" "* { --- 10945,10952 ---- ;; (define_insn "consttable_qi" ! [(unspec_volatile [(match_operand:QI 0 "consttable_operand" "=g")] ! UNSPEC_CONSTTABLE_QI)] "TARGET_MIPS16" "* { *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10485,10491 **** (set_attr "length" "8")]) (define_insn "consttable_hi" ! [(unspec_volatile [(match_operand:HI 0 "consttable_operand" "=g")] 11)] "TARGET_MIPS16" "* { --- 10958,10965 ---- (set_attr "length" "8")]) (define_insn "consttable_hi" ! [(unspec_volatile [(match_operand:HI 0 "consttable_operand" "=g")] ! UNSPEC_CONSTTABLE_HI)] "TARGET_MIPS16" "* { *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10497,10503 **** (set_attr "length" "8")]) (define_insn "consttable_si" ! [(unspec_volatile [(match_operand:SI 0 "consttable_operand" "=g")] 12)] "TARGET_MIPS16" "* { --- 10971,10978 ---- (set_attr "length" "8")]) (define_insn "consttable_si" ! [(unspec_volatile [(match_operand:SI 0 "consttable_operand" "=g")] ! UNSPEC_CONSTTABLE_SI)] "TARGET_MIPS16" "* { *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10509,10515 **** (set_attr "length" "8")]) (define_insn "consttable_di" ! [(unspec_volatile [(match_operand:DI 0 "consttable_operand" "=g")] 13)] "TARGET_MIPS16" "* { --- 10984,10991 ---- (set_attr "length" "8")]) (define_insn "consttable_di" ! [(unspec_volatile [(match_operand:DI 0 "consttable_operand" "=g")] ! UNSPEC_CONSTTABLE_DI)] "TARGET_MIPS16" "* { *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10521,10536 **** (set_attr "length" "16")]) (define_insn "consttable_sf" ! [(unspec_volatile [(match_operand:SF 0 "consttable_operand" "=g")] 14)] "TARGET_MIPS16" "* { ! union real_extract u; if (GET_CODE (operands[0]) != CONST_DOUBLE) abort (); ! memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u); ! assemble_real (u.d, SFmode, GET_MODE_ALIGNMENT (SFmode)); return \"\"; }" [(set_attr "type" "unknown") --- 10997,11013 ---- (set_attr "length" "16")]) (define_insn "consttable_sf" ! [(unspec_volatile [(match_operand:SF 0 "consttable_operand" "=g")] ! UNSPEC_CONSTTABLE_SF)] "TARGET_MIPS16" "* { ! REAL_VALUE_TYPE d; if (GET_CODE (operands[0]) != CONST_DOUBLE) abort (); ! REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]); ! assemble_real (d, SFmode, GET_MODE_ALIGNMENT (SFmode)); return \"\"; }" [(set_attr "type" "unknown") *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10538,10553 **** (set_attr "length" "8")]) (define_insn "consttable_df" ! [(unspec_volatile [(match_operand:DF 0 "consttable_operand" "=g")] 15)] "TARGET_MIPS16" "* { ! union real_extract u; if (GET_CODE (operands[0]) != CONST_DOUBLE) abort (); ! memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u); ! assemble_real (u.d, DFmode, GET_MODE_ALIGNMENT (DFmode)); return \"\"; }" [(set_attr "type" "unknown") --- 11015,11031 ---- (set_attr "length" "8")]) (define_insn "consttable_df" ! [(unspec_volatile [(match_operand:DF 0 "consttable_operand" "=g")] ! UNSPEC_CONSTTABLE_DF)] "TARGET_MIPS16" "* { ! REAL_VALUE_TYPE d; if (GET_CODE (operands[0]) != CONST_DOUBLE) abort (); ! REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]); ! assemble_real (d, DFmode, GET_MODE_ALIGNMENT (DFmode)); return \"\"; }" [(set_attr "type" "unknown") *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10555,10561 **** (set_attr "length" "16")]) (define_insn "align_2" ! [(unspec_volatile [(const_int 0)] 16)] "TARGET_MIPS16" ".align 1" [(set_attr "type" "unknown") --- 11033,11039 ---- (set_attr "length" "16")]) (define_insn "align_2" ! [(unspec_volatile [(const_int 0)] UNSPEC_ALIGN_2)] "TARGET_MIPS16" ".align 1" [(set_attr "type" "unknown") *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10563,10569 **** (set_attr "length" "8")]) (define_insn "align_4" ! [(unspec_volatile [(const_int 0)] 17)] "TARGET_MIPS16" ".align 2" [(set_attr "type" "unknown") --- 11041,11047 ---- (set_attr "length" "8")]) (define_insn "align_4" ! [(unspec_volatile [(const_int 0)] UNSPEC_ALIGN_4)] "TARGET_MIPS16" ".align 2" [(set_attr "type" "unknown") *************** ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n *** 10571,10577 **** (set_attr "length" "8")]) (define_insn "align_8" ! [(unspec_volatile [(const_int 0)] 18)] "TARGET_MIPS16" ".align 3" [(set_attr "type" "unknown") --- 11049,11055 ---- (set_attr "length" "8")]) (define_insn "align_8" ! [(unspec_volatile [(const_int 0)] UNSPEC_ALIGN_8)] "TARGET_MIPS16" ".align 3" [(set_attr "type" "unknown") diff -Nrc3pad gcc-3.2.3/gcc/config/mips/mips-protos.h gcc-3.3/gcc/config/mips/mips-protos.h *** gcc-3.2.3/gcc/config/mips/mips-protos.h 2003-02-12 15:25:45.000000000 +0000 --- gcc-3.3/gcc/config/mips/mips-protos.h 2003-01-31 23:51:22.000000000 +0000 *************** *** 1,6 **** /* Prototypes of target machine for GNU compiler. MIPS version. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2001 Free Software Foundation, Inc. Contributed by A. Lichnewsky (lich@inria.inria.fr). Changed by Michael Meissner (meissner@osf.org). 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and --- 1,6 ---- /* Prototypes of target machine for GNU compiler. MIPS version. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2001, 2002 Free Software Foundation, Inc. Contributed by A. Lichnewsky (lich@inria.inria.fr). Changed by Michael Meissner (meissner@osf.org). 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and *************** Boston, MA 02111-1307, USA. */ *** 27,32 **** --- 27,33 ---- #define GCC_MIPS_PROTOS_H extern HOST_WIDE_INT compute_frame_size PARAMS ((HOST_WIDE_INT)); + extern int mips_initial_elimination_offset PARAMS ((int, int)); extern void mips_asm_file_end PARAMS ((FILE *)); extern void mips_asm_file_start PARAMS ((FILE *)); extern void iris6_asm_file_start PARAMS ((FILE *)); *************** extern void mips_output_lineno PARAMS ( *** 45,50 **** --- 46,52 ---- extern void mips_output_ascii PARAMS ((FILE *, const char *, size_t)); extern void mips_order_regs_for_local_alloc PARAMS ((void)); + extern struct rtx_def * embedded_pic_fnaddr_reg PARAMS ((void)); extern struct rtx_def * mips16_gp_pseudo_reg PARAMS ((void)); #ifdef ASM_OUTPUT_UNDEF_FUNCTION extern int mips_output_external_libcall PARAMS ((FILE *, const char *)); *************** extern struct rtx_def *mips_function_va *** 54,78 **** extern unsigned int mips_hard_regno_nregs PARAMS ((int, enum machine_mode)); ! extern struct rtx_def *function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); ! extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, ! enum machine_mode, ! tree, int)); extern int function_arg_pass_by_reference ! PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern int mips16_constant_after_function_p PARAMS ((tree)); extern int mips_output_external PARAMS ((FILE *, tree, const char *)); extern tree mips_build_va_list PARAMS ((void)); ! extern void mips_va_start PARAMS ((int, tree, rtx)); extern struct rtx_def *mips_va_arg PARAMS ((tree, tree)); - extern void mips_select_section PARAMS ((tree, int)); - extern void mips_unique_section PARAMS ((tree, int)); extern void expand_block_move PARAMS ((rtx *)); extern void final_prescan_insn PARAMS ((rtx, rtx *, int)); --- 56,85 ---- extern unsigned int mips_hard_regno_nregs PARAMS ((int, enum machine_mode)); ! extern int mips_return_in_memory PARAMS ((tree)); ! ! extern struct rtx_def *function_arg PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); ! extern int function_arg_partial_nregs ! PARAMS ((const CUMULATIVE_ARGS *, ! enum machine_mode, ! tree, int)); ! extern int mips_setup_incoming_varargs ! PARAMS ((const CUMULATIVE_ARGS *, ! enum machine_mode, ! tree, int)); extern int function_arg_pass_by_reference ! PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern int mips16_constant_after_function_p PARAMS ((tree)); extern int mips_output_external PARAMS ((FILE *, tree, const char *)); extern tree mips_build_va_list PARAMS ((void)); ! extern void mips_va_start PARAMS ((tree, rtx)); extern struct rtx_def *mips_va_arg PARAMS ((tree, tree)); extern void expand_block_move PARAMS ((rtx *)); extern void final_prescan_insn PARAMS ((rtx, rtx *, int)); *************** extern void init_cumulative_args PARAMS *** 81,86 **** --- 88,94 ---- extern void gen_conditional_move PARAMS ((rtx *)); extern void mips_gen_conditional_trap PARAMS ((rtx *)); extern void mips_emit_fcc_reload PARAMS ((rtx, rtx, rtx)); + extern void mips_set_return_address PARAMS ((rtx, rtx)); extern void machine_dependent_reorg PARAMS ((rtx)); extern int mips_address_cost PARAMS ((rtx)); extern void mips_count_memory_refs PARAMS ((rtx, int)); *************** extern const char *mips_fill_delay_ *** 91,99 **** --- 99,111 ---- rtx)); extern const char *mips_move_1word PARAMS ((rtx *, rtx, int)); extern const char *mips_move_2words PARAMS ((rtx *, rtx)); + extern const char *mips_sign_extend PARAMS ((rtx, rtx, rtx)); + extern const char *mips_emit_prefetch PARAMS ((rtx *)); + extern const char *mips_restore_gp PARAMS ((rtx *, rtx)); extern const char *output_block_move PARAMS ((rtx, rtx *, int, enum block_move_type)); extern void override_options PARAMS ((void)); + extern void mips_conditional_register_usage PARAMS ((void)); extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand PARAMS ((FILE *, rtx, int)); extern int double_memory_operand PARAMS ((rtx,enum machine_mode)); *************** extern int mips_adjust_insn *** 110,120 **** extern enum reg_class mips_secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx, int)); ! extern void mips_select_rtx_section PARAMS ((enum machine_mode, ! rtx)); extern int pic_address_needs_scratch PARAMS ((rtx)); extern int se_arith_operand PARAMS ((rtx, enum machine_mode)); extern int mips_legitimate_address_p PARAMS ((enum machine_mode, rtx, int)); extern int mips_reg_mode_ok_for_base_p PARAMS ((rtx, --- 122,141 ---- extern enum reg_class mips_secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx, int)); ! extern bool mips_cannot_change_mode_class ! PARAMS ((enum machine_mode, enum machine_mode, ! enum reg_class)); ! extern int mips_class_max_nregs PARAMS ((enum reg_class, ! enum machine_mode)); ! extern int mips_register_move_cost PARAMS ((enum machine_mode, ! enum reg_class, ! enum reg_class)); extern int pic_address_needs_scratch PARAMS ((rtx)); extern int se_arith_operand PARAMS ((rtx, enum machine_mode)); + extern int coprocessor_operand PARAMS ((rtx, enum machine_mode)); + extern int coprocessor2_operand PARAMS ((rtx, enum machine_mode)); + extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int mips_legitimate_address_p PARAMS ((enum machine_mode, rtx, int)); extern int mips_reg_mode_ok_for_base_p PARAMS ((rtx, diff -Nrc3pad gcc-3.2.3/gcc/config/mips/netbsd.h gcc-3.3/gcc/config/mips/netbsd.h *** gcc-3.2.3/gcc/config/mips/netbsd.h 2002-06-07 16:13:32.000000000 +0000 --- gcc-3.3/gcc/config/mips/netbsd.h 2002-11-10 18:28:39.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 22,60 **** /* Define default target values. */ ! #ifndef TARGET_ENDIAN_DEFAULT ! #define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN ! #endif ! ! #ifndef MACHINE_TYPE #if TARGET_ENDIAN_DEFAULT != 0 #define MACHINE_TYPE "NetBSD/mipseb ELF" #else #define MACHINE_TYPE "NetBSD/mipsel ELF" #endif - #endif ! #define TARGET_DEFAULT (MASK_GAS|MASK_ABICALLS) ! /* XXX Don't use DWARF-2 debugging info, for now. */ ! #undef DBX_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG /* Include the generic MIPS ELF configuration. */ #include /* Now clean up after it. */ - #undef OBJECT_FORMAT_COFF #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX - #undef US_SOFTWARE_GOFAST - #undef INIT_SUBTARGET_OPTABS - #define INIT_SUBTARGET_OPTABS - /* Get generic NetBSD definitions. */ #include --- 22,128 ---- /* Define default target values. */ ! #undef MACHINE_TYPE #if TARGET_ENDIAN_DEFAULT != 0 #define MACHINE_TYPE "NetBSD/mipseb ELF" #else #define MACHINE_TYPE "NetBSD/mipsel ELF" #endif ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_ELF(); \ ! builtin_define ("__NO_LEADING_UNDERSCORES__"); \ ! builtin_define ("__GP_SUPPORT__"); \ ! builtin_assert ("machine=mips"); \ ! if (TARGET_LONG64) \ ! builtin_define ("__LONG64"); \ ! \ ! if (TARGET_ABICALLS) \ ! builtin_define ("__ABICALLS__"); \ ! \ ! if (mips_abi == ABI_EABI) \ ! builtin_define ("__mips_eabi"); \ ! else if (mips_abi == ABI_N32) \ ! builtin_define ("__mips_n32"); \ ! else if (mips_abi == ABI_64) \ ! builtin_define ("__mips_n64"); \ ! else if (mips_abi == ABI_O64) \ ! builtin_define ("__mips_o64"); \ ! } \ ! while (0) + /* The generic MIPS TARGET_CPU_CPP_BUILTINS are incorrect for NetBSD. + Specifically, they define too many namespace-invasive macros. Override + them here. Note this is structured for easy comparison to the version + in mips.h. ! FIXME: This probably isn't the best solution. But in the absense ! of something better, it will have to do, for now. */ ! ! #undef TARGET_CPU_CPP_BUILTINS ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_assert ("cpu=mips"); \ ! builtin_define ("__mips__"); \ ! builtin_define ("_mips"); \ ! \ ! /* No _R3000 or _R4000. */ \ ! if (TARGET_64BIT) \ ! builtin_define ("__mips64"); \ ! \ ! if (TARGET_FLOAT64) \ ! builtin_define ("__mips_fpr=64"); \ ! else \ ! builtin_define ("__mips_fpr=32"); \ ! \ ! if (TARGET_MIPS16) \ ! builtin_define ("__mips16"); \ ! \ ! MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \ ! MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \ ! \ ! if (ISA_MIPS1) \ ! builtin_define ("__mips=1"); \ ! else if (ISA_MIPS2) \ ! builtin_define ("__mips=2"); \ ! else if (ISA_MIPS3) \ ! builtin_define ("__mips=3"); \ ! else if (ISA_MIPS4) \ ! builtin_define ("__mips=4"); \ ! else if (ISA_MIPS32) \ ! builtin_define ("__mips=32"); \ ! else if (ISA_MIPS64) \ ! builtin_define ("__mips=64"); \ ! \ ! if (TARGET_HARD_FLOAT) \ ! builtin_define ("__mips_hard_float"); \ ! else if (TARGET_SOFT_FLOAT) \ ! builtin_define ("__mips_soft_float"); \ ! \ ! if (TARGET_SINGLE_FLOAT) \ ! builtin_define ("__mips_single_float"); \ ! \ ! if (TARGET_BIG_ENDIAN) \ ! builtin_define ("__MIPSEB__"); \ ! else \ ! builtin_define ("__MIPSEL__"); \ ! \ ! /* No language dialect defines. */ \ ! \ ! /* ABIs handled in TARGET_OS_CPP_BUILTINS. */ \ ! } \ ! while (0) /* Include the generic MIPS ELF configuration. */ #include /* Now clean up after it. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX /* Get generic NetBSD definitions. */ #include *************** Boston, MA 02111-1307, USA. */ *** 64,169 **** #include ! /* Provide CPP predefines appropriate for NetBSD. We default to ! MIPS-I. */ ! ! #undef CPP_PREDEFINES ! #if TARGET_ENDIAN_DEFAULT != 0 ! #define CPP_PREDEFINES \ ! "-D__NetBSD__ -D__ELF__ -D__mips__ -D__mips=1 -D__MIPSEB__ \ ! -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \ ! -Asystem=unix -Asystem=NetBSD -Amachine=mips" ! #else ! #define CPP_PREDEFINES \ ! "-D__NetBSD__ -D__ELF__ -D__mips__ -D__mips=1 -D__MIPSEL__ \ ! -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \ ! -Asystem=unix -Asystem=NetBSD -Amachine=mips" ! #endif ! ! ! /* Provide a CPP_SPEC appropriate for NetBSD. This is a simplified ! CPP_SPEC from . We use the SUBTARGET_CPP_SPEC to ! deal with NetBSD-specific CPP options. */ ! ! #undef CPP_SPEC ! #define CPP_SPEC \ ! "%(subtarget_cpp_size_spec) \ ! %{mips3:-U__mips -D__mips=3 -D__mips64} \ ! %{mips4:-U__mips -D__mips=4 -D__mips64} \ ! %{mips32:-U__mips -D__mips=32} \ ! %{mips64:-U__mips -D__mips=64 -D__mips64} \ ! %{mgp32:-U__mips64} %{mgp64:-D__mips64} \ ! %{mfp32:-D__mips_fpr=32} %{mfp64:-D__mips_fpr=64} \ ! %{!mfp32: \ ! %{!mfp64: \ ! %{mgp32:-D__mips_fpr=32} \ ! %{!mgp32: %(cpp_fpr_spec)}}} \ ! %{msingle-float: \ ! %{!msoft-float:-D__mips_single_float}} \ ! %{m4650: \ ! %{!msoft-float:-D__mips_single_float}} \ ! %{msoft-float:-D__mips_soft_float} \ ! %{mabi=eabi:-D__mips_eabi} \ ! %{mips16:%{!mno-mips16:-D__mips16}} \ ! %{EB:-U__MIPSEL__ -D__MIPSEB__} \ ! %{EL:-U__MIPSEB__ -D__MIPSEL__} \ ! %(subtarget_cpp_spec) " ! ! ! /* Provide a SUBTARGET_CPP_SIZE_SPEC appropriate for NetBSD. In ! addition to the normal work done by this spec, we also define ! __LONG64 or not (so that can tell). */ ! ! #undef SUBTARGET_CPP_SIZE_SPEC ! #define SUBTARGET_CPP_SIZE_SPEC \ ! "%{mlong64: \ ! %{!mips1: \ ! %{!mips2: \ ! %{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int -D__LONG64}}}} \ ! %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int -U__LONG64}" ! ! /* Provide a SUBTARGET_CPP_SPEC appropriate for NetBSD. Currently, ! we just deal with the GCC option '-posix'. */ #undef SUBTARGET_CPP_SPEC ! #define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE}" ! /* Provide a LINK_SPEC appropriate for a NetBSD/mips target. This is a copy of LINK_SPEC from tweaked for the MIPS target. */ #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{assert*} %{R*} %{rpath*} \ ! %{EL:-m elf32lmip} \ ! %{EB:-m elf32bmip} \ ! %(endian_spec) \ ! %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \ ! %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dc -dp \ ! %{!nostdlib: \ ! %{!r*: \ ! %{!e*:-e __start}}} \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ ! %{static:-static}}" #undef SUBTARGET_ASM_SPEC ! #define SUBTARGET_ASM_SPEC \ ! "%{fpic:-KPIC} %{fPIC:-KPIC}" /* -G is incompatible with -KPIC which is the default, so only allow objects in the small data section if the user explicitly asks for it. */ ! #undef MIPS_DEFAULT_GVALUE ! #define MIPS_DEFAULT_GVALUE 0 /* This defines which switch letters take arguments. -G is a MIPS --- 132,175 ---- #include ! /* Extra specs we need. */ ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ ! { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ ! { "netbsd_entry_point", NETBSD_ENTRY_POINT }, ! /* Provide a SUBTARGET_CPP_SPEC appropriate for NetBSD. */ #undef SUBTARGET_CPP_SPEC ! #define SUBTARGET_CPP_SPEC "%(netbsd_cpp_spec)" /* Provide a LINK_SPEC appropriate for a NetBSD/mips target. This is a copy of LINK_SPEC from tweaked for the MIPS target. */ #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{EL:-m elf32lmip} \ ! %{EB:-m elf32bmip} \ ! %(endian_spec) \ ! %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \ ! %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ ! %(netbsd_link_spec)" + #define NETBSD_ENTRY_POINT "__start" #undef SUBTARGET_ASM_SPEC ! #define SUBTARGET_ASM_SPEC \ ! "%{!mno-abicalls: \ ! %{!fno-PIC:%{!fno-pic:-KPIC}}}" /* -G is incompatible with -KPIC which is the default, so only allow objects in the small data section if the user explicitly asks for it. */ ! #undef MIPS_DEFAULT_GVALUE ! #define MIPS_DEFAULT_GVALUE 0 /* This defines which switch letters take arguments. -G is a MIPS *************** Boston, MA 02111-1307, USA. */ *** 191,199 **** #undef WCHAR_TYPE #define WCHAR_TYPE "int" - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 --- 197,202 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/news4.h gcc-3.3/gcc/config/mips/news4.h *** gcc-3.2.3/gcc/config/mips/news4.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/mips/news4.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,39 **** - /* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips) - Copyright (C) 1991, 1997 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_NEWS - - #define CPP_PREDEFINES "\ - -Dr3000 -Dnews3700 -DLANGUAGE_C -DMIPSEB -DSYSTYPE_BSD \ - -Dsony_news -Dsony -Dunix -Dmips -Dhost_mips \ - -Asystem=unix -Asystem=bsd -Acpu=mips -Amachine=mips" - - #define SYSTEM_INCLUDE_DIR "/usr/include2.0" - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - - #define MACHINE_TYPE "RISC NEWS-OS" - - /* INITIALIZE_TRAMPOLINE calls this library function to flush - program and data caches. */ - #define CACHE_FLUSH_FUNC "cacheflush" - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/news5.h gcc-3.3/gcc/config/mips/news5.h *** gcc-3.2.3/gcc/config/mips/news5.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/mips/news5.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,62 **** - /* Definitions of target machine for GNU compiler. - Sony RISC NEWS (mips) System V version. - Copyright (C) 1992 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_SYSV - - #define CPP_PREDEFINES "\ - -Dmips -Dunix -Dhost_mips -Dsony -Dsonyrisc -DMIPSEB -DSYSTYPE_SYSV \ - -Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips" - - #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" - - #define LIB_SPEC "\ - %{ZBSD43: -L/usr/ucblib -lucb -lresolv -lsocket -lnsl} \ - -nocount %{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s values-Xt.o%s" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:-nocount crt1.o%s -count}}" - - #define MACHINE_TYPE "Sony RISC NEWS (SVR4 mips)" - - #define NO_LIB_PROTOTYPE - - #define NO_DOLLAR_IN_LABEL - - #define NM_FLAGS "-Bp" - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - - /* Mips System V.4 doesn't have a getpagesize() function needed by the - trampoline code, so use the POSIX sysconf function to get it. - This is only done when compiling the trampoline code. */ - - #ifdef L_trampoline - #include - #include - - #ifdef _SC_PAGE_SIZE - #define getpagesize() sysconf(_SC_PAGE_SIZE) - - #else /* older rev of OS */ - #define getpagesize() (NBPC) - #endif /* !_SC_PAGE_SIZE */ - #endif /* L_trampoline */ - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/nws3250v4.h gcc-3.3/gcc/config/mips/nws3250v4.h *** gcc-3.2.3/gcc/config/mips/nws3250v4.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/mips/nws3250v4.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,36 **** - /* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips) - Copyright (C) 1991 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_NEWS - - #define CPP_PREDEFINES "\ - -Dmips -Dhost_mips -Dsony -Dsonyrisc -Dunix \ - -DLANGUAGE_C -DMIPSEB -DSYSTYPE_SYSV \ - -Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips" - - #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s values-Xt.o%s" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}" - - #define MACHINE_TYPE "RISC NEWS-OS SVr4" - - #include "mips/mips.h" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/openbsd.h gcc-3.3/gcc/config/mips/openbsd.h *** gcc-3.2.3/gcc/config/mips/openbsd.h 2001-08-17 19:40:03.000000000 +0000 --- gcc-3.3/gcc/config/mips/openbsd.h 2002-06-11 07:26:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 35,41 **** #define LIB_SPEC OBSD_LIB_SPEC /* By default, OpenBSD mips is little endian. This is important to set ! here as mips/mips.h defaults to big endian unless DECSTATION. */ #ifndef TARGET_ENDIAN_DEFAULT #define TARGET_ENDIAN_DEFAULT 0 #endif --- 35,41 ---- #define LIB_SPEC OBSD_LIB_SPEC /* By default, OpenBSD mips is little endian. This is important to set ! here as mips/mips.h defaults to big endian. */ #ifndef TARGET_ENDIAN_DEFAULT #define TARGET_ENDIAN_DEFAULT 0 #endif *************** Boston, MA 02111-1307, USA. */ *** 53,68 **** support. */ #undef SET_ASM_OP ! /* Run-time target specifications. */ ! #if TARGET_ENDIAN_DEFAULT != 0 ! #define CPP_PREDEFINES "-D__SYSTYPE_BSD__ -D__NO_LEADING_UNDERSCORES__ \ ! -D__GP_SUPPORT__ -D__MIPSEB__ -D__unix__ -D__OpenBSD__ -D__mips__ \ ! -Asystem=unix -Asystem=OpenBSD -Acpu=mips -Amachine=mips -Aendian=big" ! #else ! #define CPP_PREDEFINES "-D__SYSTYPE_BSD__ -D__NO_LEADING_UNDERSCORES__ \ ! -D__GP_SUPPORT__ -D__MIPSEL__ -D__unix__ -D__OpenBSD__ -D__mips__ \ ! -Asystem=unix -Asystem=OpenBSD -Acpu=mips -Amachine=mips -Aendian=little" ! #endif /* Layout of source language data types. */ --- 53,69 ---- support. */ #undef SET_ASM_OP ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__unix__"); \ ! builtin_define ("__SYSTYPE_BSD__"); \ ! builtin_define ("__NO_LEADING_UNDERSCORES__"); \ ! builtin_define ("__GP_SUPPORT__"); \ ! builtin_define ("__OpenBSD__"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=OpenBSD"); \ ! builtin_assert ("machine=mips"); \ ! } while (0) /* Layout of source language data types. */ *************** Boston, MA 02111-1307, USA. */ *** 81,87 **** /* Controlling the compilation driver. */ ! /* LINK_SPEC appropriate for OpenBSD: support for GCC options -static, -assert, and -nostdlib. Dynamic loader control. */ #undef LINK_SPEC #define LINK_SPEC \ --- 82,88 ---- /* Controlling the compilation driver. */ ! /* LINK_SPEC appropriate for OpenBSD: support for GCC options -static, -assert, and -nostdlib. Dynamic loader control. */ #undef LINK_SPEC #define LINK_SPEC \ diff -Nrc3pad gcc-3.2.3/gcc/config/mips/osfrose.h gcc-3.3/gcc/config/mips/osfrose.h *** gcc-3.2.3/gcc/config/mips/osfrose.h 2001-10-31 04:08:19.000000000 +0000 --- gcc-3.3/gcc/config/mips/osfrose.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,117 **** - /* Definitions of target machine for GNU compiler. - DECstation (OSF/1 reference port with OSF/rose) version. - Copyright (C) 1991, 1992, 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define DECSTATION - #define OSF_OS - - #define HALF_PIC_DEBUG TARGET_DEBUG_B_MODE - #define HALF_PIC_PREFIX "$Lp." - - #include "halfpic.h" - - #define WORD_SWITCH_TAKES_ARG(STR) \ - (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) || !strcmp (STR, "pic-names")) - - #define CPP_PREDEFINES "\ - -DOSF -DOSF1 -Dbsd4_2 -DMIPSEL -Dhost_mips -Dmips -Dunix -DR3000 -DSYSTYPE_BSD \ - -Asystem=unix -Asystem=xpg4 -Acpu=mips -Amachine=mips" - - #define SUBTARGET_CPP_SIZE_SPEC "\ - %{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ - %{!mlong64:-D__PTRDIFF_TYPE__=int}" - - #define SUBTARGET_CPP_SPEC "\ - %{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \ - %{.s: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}}" - - /* ??? This assumes that GNU as is always used with GNU ld, and MIPS as is - always used with MIPS ld. */ - #define LINK_SPEC "\ - %{G*} %{EL} %{EB} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} \ - %{!mmips-as: \ - %{v*: -v} \ - %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \ - %{nostdlib} %{noshrlib} %{glue}}" - - #define LIB_SPEC "-lc" - - /* Define this macro meaning that `gcc' should find the library - `libgcc.a' by hand, rather than passing the argument `-lgcc' to - tell the linker to do the search. */ - - #define LINK_LIBGCC_SPECIAL 1 - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - - #define MACHINE_TYPE "DECstation with OSF/rose objects" - - #ifndef MD_EXEC_PREFIX - #define MD_EXEC_PREFIX "/usr/ccs/gcc/" - #endif - - #ifndef MD_STARTFILE_PREFIX - #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" - #endif - - /* Turn on -mpic-extern by default. */ - #define CC1_SPEC "\ - %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ - %{mips1:-mfp32 -mgp32} %{mips2:-mfp32 -mgp32} %{mips3:-mfp64 -mgp64} \ - %{mint64|mlong64|mlong32:-mexplicit-type-size }\ - %{G*} \ - %{pic-none: -mno-half-pic} \ - %{pic-lib: -mhalf-pic} \ - %{pic-extern: -mhalf-pic} \ - %{pic-calls: -mhalf-pic} \ - %{pic-names*: -mhalf-pic} \ - %{!pic-*: -mhalf-pic}" - - /* Specify size_t and wchar_t types. */ - #define SIZE_TYPE "long unsigned int" - #define WCHAR_TYPE "unsigned int" - #define WCHAR_TYPE_SIZE BITS_PER_WORD - #define MAX_WCHAR_TYPE_SIZE MAX_LONG_TYPE_SIZE - - /* OSF/1 uses gas, not the mips assembler. */ - #define TARGET_DEFAULT MASK_GAS - - /* OSF/rose uses stabs, not ECOFF. */ - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - - /* enable dwarf debugging for testing */ - #define DWARF_DEBUGGING_INFO - /* This is needed by dwarfout.c. */ - #define SET_ASM_OP "\t.set\t" - - /* Tell collect that the object format is OSF/rose. */ - #define OBJECT_FORMAT_ROSE - - /* Tell collect where the appropriate binaries are. */ - #define REAL_LD_FILE_NAME "/usr/ccs/gcc/gld" - #define REAL_NM_FILE_NAME "/usr/ccs/bin/nm" - #define REAL_STRIP_FILE_NAME "/usr/ccs/bin/strip" - - /* Default to -G 0 unless doing ecoff work. */ - #define MIPS_DEFAULT_GVALUE ((TARGET_MIPS_AS) ? 8 : 0) - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/r3900.h gcc-3.3/gcc/config/mips/r3900.h *** gcc-3.2.3/gcc/config/mips/r3900.h 2002-01-17 07:53:56.000000000 +0000 --- gcc-3.3/gcc/config/mips/r3900.h 2002-07-29 22:21:41.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 22,28 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define MIPS_CPU_STRING_DEFAULT "R3900" #define MIPS_ISA_DEFAULT 1 #define MULTILIB_DEFAULTS { MULTILIB_ENDIAN_DEFAULT, "msoft-float" } --- 22,28 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define MIPS_CPU_STRING_DEFAULT "r3900" #define MIPS_ISA_DEFAULT 1 #define MULTILIB_DEFAULTS { MULTILIB_ENDIAN_DEFAULT, "msoft-float" } *************** Boston, MA 02111-1307, USA. */ *** 30,63 **** /* We use the MIPS EABI by default. */ #define MIPS_ABI_DEFAULT ABI_EABI ! #define SUBTARGET_CPP_SPEC "\ ! %{!mabi=32: %{!mabi=n32: %{!mabi=64: -D__mips_eabi}}} \ ! %{!msingle-float:-D__mips_soft_float} \ ! %{mhard-float:%e-mhard-float not supported} \ ! %{msingle-float:%{msoft-float: \ ! %e-msingle-float and -msoft-float can not both be specified}}" ! ! /* by default (if not mips-something-else) produce code for the r3900 */ #define SUBTARGET_CC1_SPEC "\ %{mhard-float:%e-mhard-float not supported} \ %{msingle-float:%{msoft-float: \ %e-msingle-float and -msoft-float can not both be specified}}" - - /* Debugging */ - - #define DWARF2_DEBUGGING_INFO - #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG - - /* For the 'preferred' cases ("gN" and "ggdbN") we need to tell the - gnu assembler not to generate debugging information. */ - - #define SUBTARGET_ASM_DEBUGGING_SPEC "\ - %{!mmips-as: \ - %{g:-g0} %{g0:-g0} %{g1:-g0} %{g2:-g0} %{g3:-g0} \ - %{ggdb:-g0} %{ggdb0:-g0} %{ggdb1:-g0} %{ggdb2:-g0} %{ggdb3:-g0} \ - %{gdwarf-2*:-g0}} \ - %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ - %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ - %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}" - - /* eof */ --- 30,37 ---- /* We use the MIPS EABI by default. */ #define MIPS_ABI_DEFAULT ABI_EABI ! /* By default (if not mips-something-else) produce code for the r3900 */ #define SUBTARGET_CC1_SPEC "\ %{mhard-float:%e-mhard-float not supported} \ %{msingle-float:%{msoft-float: \ %e-msingle-float and -msoft-float can not both be specified}}" diff -Nrc3pad gcc-3.2.3/gcc/config/mips/rtems64.h gcc-3.3/gcc/config/mips/rtems64.h *** gcc-3.2.3/gcc/config/mips/rtems64.h 2002-04-12 13:09:31.000000000 +0000 --- gcc-3.3/gcc/config/mips/rtems64.h 2002-06-11 07:26:38.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 20,37 **** Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000 \ ! -D__rtems__ -Asystem=rtems" #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata, in_rdata #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ ! SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ ! SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) #undef STARTFILE_SPEC #undef ENDFILE_SPEC --- 20,37 ---- Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__rtems__"); \ ! builtin_assert ("system=rtems"); \ ! } while (0) #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_sdata #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ ! SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) #undef STARTFILE_SPEC #undef ENDFILE_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/mips/rtems.h gcc-3.3/gcc/config/mips/rtems.h *** gcc-3.2.3/gcc/config/mips/rtems.h 2003-01-29 15:55:28.000000000 +0000 --- gcc-3.3/gcc/config/mips/rtems.h 2003-01-29 15:00:43.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 21,26 **** /* Specify predefined symbols in preprocessor. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dmips -DMIPSEB -D_mips -D_MIPSEB \ ! -D__rtems__ -D__USE_INIT_FINI__ -Asystem=rtems" --- 21,29 ---- /* Specify predefined symbols in preprocessor. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__rtems__"); \ ! builtin_define ("__USE_INIT_FINI__"); \ ! builtin_assert ("system=rtems"); \ ! } while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/mips/sni-gas.h gcc-3.3/gcc/config/mips/sni-gas.h *** gcc-3.2.3/gcc/config/mips/sni-gas.h 2001-11-11 05:56:44.000000000 +0000 --- gcc-3.3/gcc/config/mips/sni-gas.h 2002-08-29 21:40:15.000000000 +0000 *************** *** 1,9 **** /* Enable debugging. */ ! #define DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO ! #define MIPS_DEBUGGING_INFO - #define DWARF_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG --- 1,9 ---- /* Enable debugging. */ ! #define DBX_DEBUGGING_INFO 1 ! #define SDB_DEBUGGING_INFO 1 ! #define MIPS_DEBUGGING_INFO 1 ! #define DWARF_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG diff -Nrc3pad gcc-3.2.3/gcc/config/mips/sni-svr4.h gcc-3.3/gcc/config/mips/sni-svr4.h *** gcc-3.2.3/gcc/config/mips/sni-svr4.h 2001-12-17 15:05:35.000000000 +0000 --- gcc-3.3/gcc/config/mips/sni-svr4.h 2002-07-29 22:21:41.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. SNI SINIX version. ! Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. Contributed by Marco Walther (Marco.Walther@mch.sni.de). This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. SNI SINIX version. ! Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Marco Walther (Marco.Walther@mch.sni.de). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 21,39 **** #define MIPS_SVR4 ! #define CPP_PREDEFINES "\ ! -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4 -Dsinix -DSNI \ ! -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4 \ ! -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=mips" ! ! #define SUBTARGET_CPP_SIZE_SPEC "\ ! -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int" #define LINK_SPEC "\ %{G*} \ %{!mgas: \ %{dy} %{dn}}" ! #define LIB_SPEC "\ %{p:-lprof1} \ %{!p:%{pg:-lprof1} \ --- 21,44 ---- #define MIPS_SVR4 ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("host_mips"); \ ! builtin_define_std ("SYSTYPE_SVR4"); \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("mips"); \ ! builtin_define_std ("sinix"); \ ! builtin_define_std ("SNI"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=svr4"); \ ! builtin_assert ("machine=mips"); \ ! } while (0) #define LINK_SPEC "\ %{G*} \ %{!mgas: \ %{dy} %{dn}}" ! #define LIB_SPEC "\ %{p:-lprof1} \ %{!p:%{pg:-lprof1} \ *************** Boston, MA 02111-1307, USA. */ *** 54,62 **** #define getpagesize() sysconf(_SC_PAGE_SIZE) #endif /* L_trampoline */ - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - #define OBJECT_FORMAT_ELF #define TARGET_DEFAULT MASK_ABICALLS --- 59,64 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/sr71k.md gcc-3.3/gcc/config/mips/sr71k.md *** gcc-3.2.3/gcc/config/mips/sr71k.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/sr71k.md 2002-09-28 15:29:43.000000000 +0000 *************** *** 0 **** --- 1,362 ---- + ;; ......................... + ;; + ;; DFA-based pipeline description for Sandcraft SR3 (MIPS64 based) + ;; + ;; The SR3 is describeds as: + ;; - nine-stage pipeline, insn buffering with out-of-order issue to + ;; multiple function units, with an average dispatch rate of 2 + ;; insn.s per cycle (max 6 insns: 2 fpu, 4 cpu). + ;; + ;; The details on this are scant except for a diagram in + ;; Chap. 6 of Rev. 1.0 SR3 Spec. + ;; + ;; The model employed below is designed to closely approximate the + ;; published latencies. Emulation of out-of-order issue and the insn + ;; buffering is done via a VLIW dispatch style (with a packing of 6 insns); + ;; the function unit reservations restrictions (define_*_set) are + ;; contrived to support published timings. + ;; + ;; Reference: + ;; "SR3 Microporocessor Specification, System development information," + ;; Revision 1.0, 13 December 2000. + ;; + ;; + ;; Reservation model is based on: + ;; 1) Figure 6-1, from the 1.0 specicification. + ;; 2) Chapter 19, from the 1.0 specificication. + ;; 3) following questions(Red Hat)/answers(Sandcraft): + ;; RH> From Section 19.1 + ;; RH> 1) In terms of figure 6-1, are all the instructions in + ;; RH> table 19-1 restricted + ;; RH> to ALUx? When ALUx is not in use for an instruction in table;; RH> 19-1 is + ;; RH> it fully compatible with all insns that issue to ALUy? + ;; + ;; Yes, all the instructions in Table 19-1 only go to ALUX, and all the + ;; instructions that can be issued to ALUY can also be issued to ALUX. + ;; + ;; + ;; RH> From Section 19.2 + ;; RH> 2) Explain conditional moves execution path (in terms of + ;; RH> figure 6-1) + ;; + ;; Conditional move of integer registers (based on floating point condition + ;; codes or integer register value) go to ALUX or ALUY. + ;; + ;; RH> 3) Explain floating point store execution path (in terms of + ;; RH> figure 6-1) + ;; + ;; Floating point stores go to Ld/St and go to MOV in the floating point + ;; pipeline. + ;; + ;; Floating point loads go to Ld/St and go to LOAD in the floating point + ;; pipeline. + ;; + ;; RH> 4) Explain branch on floating condition (in terms of figure 6-1);; + ;; Branch on floating condition go to BRU. + ;; + ;; RH> 5) Is the column for single RECIP instruction latency correct? + ;; RH> What about for RSQRT single and double? + ;; + ;; The latency/repeat for RECIP and RSQRT are correct. + ;; + + ;; + ;; Use four automata to isolate long latency operations, and to + ;; reduce the complexity of cpu+fpu, reducing space. + ;; + (define_automaton "sr71_cpu, sr71_cpu1, sr71_cp1, sr71_cp2, sr71_fextra, sr71_imacc") + + ;; feeders for CPU function units and feeders for fpu (CP1 interface) + (define_cpu_unit "sr_iss0,sr_iss1,sr_iss2,sr_iss3,sr_iss4,sr_iss5" "sr71_cpu") + + ;; CPU function units + (define_cpu_unit "ipu_bru" "sr71_cpu1") + (define_cpu_unit "ipu_alux" "sr71_cpu1") + (define_cpu_unit "ipu_aluy" "sr71_cpu1") + (define_cpu_unit "ipu_ldst" "sr71_cpu1") + (define_cpu_unit "ipu_macc_iter" "sr71_imacc") + + + ;; Floating-point unit (Co-processor interface 1). + (define_cpu_unit "fpu_mov" "sr71_cp1") + (define_cpu_unit "fpu_load" "sr71_cp1") + (define_cpu_unit "fpu_fpu" "sr71_cp2") + + ;; fictitous unit to track long float insns with separate automaton + (define_cpu_unit "fpu_iter" "sr71_fextra") + + + ;; + ;; Define common execution path (reservation) combinations + ;; + + ;; + (define_reservation "cpu_iss" "sr_iss0|sr_iss1|sr_iss2|sr_iss3") + + ;; two cycles are used for instruction using the fpu as it runs + ;; at half the clock speed of the cpu. By adding an extra cycle + ;; to the issue units, the default/minimum "repeat" dispatch delay is + ;; accounted for all insn.s + (define_reservation "cp1_iss" "(sr_iss4*2)|(sr_iss5*2)") + + (define_reservation "serial_dispatch" "sr_iss0+sr_iss1+sr_iss2+sr_iss3+sr_iss4+sr_iss5") + + ;; Simulate a 6 insn VLIW dispatch, 1 cycle in dispatch followed by + ;; reservation of function unit. + (define_reservation "ri_insns" "cpu_iss,(ipu_alux|ipu_aluy)") + (define_reservation "ri_mem" "cpu_iss,ipu_ldst") + (define_reservation "ri_alux" "cpu_iss,ipu_alux") + (define_reservation "ri_branch" "cpu_iss,ipu_bru") + + (define_reservation "rf_insn" "cp1_iss,fpu_fpu") + (define_reservation "rf_ldmem" "cp1_iss,fpu_load") + + ; simultaneous reservation of pseudo-unit keeps cp1 fpu tied + ; up until long cycle insn is finished... + (define_reservation "rf_multi1" "rf_insn+fpu_iter") + + ;; + ;; The ordering of the instruction-execution-path/resource-usage + ;; descriptions (also known as reservation RTL) is roughly ordered + ;; based on the define attribute RTL for the "type" classification. + ;; When modifying, remember that the first test that matches is the + ;; reservation used! + ;; + + + (define_insn_reservation "ir_sr70_unknown" + 1 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "unknown")) + "serial_dispatch") + + + ;; Assume prediction fails. + (define_insn_reservation "ir_sr70_branch" + 6 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "branch,jump,call")) + "ri_branch") + + (define_insn_reservation "ir_sr70_load" + 2 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "load") + (eq_attr "mode" "!SF,DF,FPSW"))) + "ri_mem") + + (define_insn_reservation "ir_sr70_store" + 1 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "store") + (eq_attr "mode" "!SF,DF,FPSW"))) + "ri_mem") + + + ;; + ;; float loads/stores flow through both cpu and cp1... + ;; + (define_insn_reservation "ir_sr70_fload" + 9 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "load") + (eq_attr "mode" "SF,DF"))) + "(cpu_iss+cp1_iss),(ri_mem+rf_ldmem)") + + (define_insn_reservation "ir_sr70_fstore" + 1 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "store") + (eq_attr "mode" "SF,DF"))) + "(cpu_iss+cp1_iss),(fpu_mov+ri_mem)") + + + ;; This reservation is for conditional move based on integer + ;; or floating point CC. This could probably use some refinement + ;; as "move" type attr seems to be overloaded in rtl. + (define_insn_reservation "ir_sr70_move" + 4 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "move")) + "ri_insns") + + ;; Try to discriminate move-from-cp1 versus move-to-cp1 as latencies + ;; are different. Like float load/store, these insns use multiple + ;; resources simultaneously + (define_insn_reservation "ir_sr70_xfer_from" + 6 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "xfer") + (eq_attr "mode" "!SF,DF,FPSW"))) + "(cpu_iss+cp1_iss),(fpu_mov+ri_mem)") + + (define_insn_reservation "ir_sr70_xfer_to" + 9 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "xfer") + (eq_attr "mode" "SF,DF"))) + "(cpu_iss+cp1_iss),(ri_mem+rf_ldmem)") + + (define_insn_reservation "ir_sr70_hilo" + 1 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "hilo")) + "ri_insns") + + (define_insn_reservation "ir_sr70_arith" + 1 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "arith,darith")) + "ri_insns") + + ;; emulate repeat (dispatch stall) by spending extra cycle(s) in + ;; in iter unit + (define_insn_reservation "ir_sr70_imul_si" + 4 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "imul,imadd") + (eq_attr "mode" "SI"))) + "ri_alux,ipu_alux,ipu_macc_iter") + + (define_insn_reservation "ir_sr70_imul_di" + 6 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "imul,imadd") + (eq_attr "mode" "DI"))) + "ri_alux,ipu_alux,(ipu_macc_iter*3)") + + ;; Divide algorithm is early out with best latency of 7 pcycles. + ;; Use worst case for scheduling purposes. + (define_insn_reservation "ir_sr70_idiv_si" + 41 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "idiv") + (eq_attr "mode" "SI"))) + "ri_alux,ipu_alux,(ipu_macc_iter*38)") + + (define_insn_reservation "ir_sr70_idiv_di" + 73 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "idiv") + (eq_attr "mode" "DI"))) + "ri_alux,ipu_alux,(ipu_macc_iter*70)") + + (define_insn_reservation "ir_sr70_icmp" + 1 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "icmp")) + "ri_insns") + + ;; extra reservations of fpu_fpu are for repeat latency + (define_insn_reservation "ir_sr70_fadd_sf" + 8 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fadd") + (eq_attr "mode" "SF"))) + "rf_insn,fpu_fpu") + + (define_insn_reservation "ir_sr70_fadd_df" + 10 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fadd") + (eq_attr "mode" "DF"))) + "rf_insn,fpu_fpu") + + ;; Latencies for MADD,MSUB, NMADD, NMSUB assume the Multiply is fused + ;; with the sub or add. + (define_insn_reservation "ir_sr70_fmul_sf" + 8 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fmul,fmadd") + (eq_attr "mode" "SF"))) + "rf_insn,fpu_fpu") + + ;; tie up the fpu unit to emulate the balance for the "repeat + ;; rate" of 8 (2 are spent in the iss unit) + (define_insn_reservation "ir_sr70_fmul_df" + 16 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fmul,fmadd") + (eq_attr "mode" "DF"))) + "rf_insn,fpu_fpu*6") + + + ;; RECIP insn uses same type attr as div, and for SR3, has same + ;; timings for double. However, single RECIP has a latency of + ;; 28 -- only way to fix this is to introduce new insn attrs. + ;; cycles spent in iter unit are designed to satisfy balance + ;; of "repeat" latency after insn uses up rf_multi1 reservation + (define_insn_reservation "ir_sr70_fdiv_sf" + 60 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fdiv") + (eq_attr "mode" "SF"))) + "rf_multi1+(fpu_iter*51)") + + (define_insn_reservation "ir_sr70_fdiv_df" + 120 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fdiv") + (eq_attr "mode" "DF"))) + "rf_multi1+(fpu_iter*109)") + + (define_insn_reservation "ir_sr70_fabs" + 4 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "fabs,fneg")) + "rf_insn,fpu_fpu") + + (define_insn_reservation "ir_sr70_fcmp" + 10 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "fcmp")) + "rf_insn,fpu_fpu") + + ;; "fcvt" type attribute covers a number of diff insns, most have the same + ;; latency descriptions, a few vary. We use the + ;; most common timing (which is also worst case). + (define_insn_reservation "ir_sr70_fcvt" + 12 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "fcvt")) + "rf_insn,fpu_fpu*4") + + (define_insn_reservation "ir_sr70_fsqrt_sf" + 62 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fsqrt") + (eq_attr "mode" "SF"))) + "rf_multi1+(fpu_iter*53)") + + (define_insn_reservation "ir_sr70_fsqrt_df" + 122 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "fsqrt") + (eq_attr "mode" "DF"))) + "rf_multi1+(fpu_iter*111)") + + (define_insn_reservation "ir_sr70_frsqrt_sf" + 48 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "frsqrt") + (eq_attr "mode" "SF"))) + "rf_multi1+(fpu_iter*39)") + + (define_insn_reservation "ir_sr70_frsqrt_df" + 240 + (and (eq_attr "cpu" "sr71000") + (and (eq_attr "type" "frsqrt") + (eq_attr "mode" "DF"))) + "rf_multi1+(fpu_iter*229)") + + (define_insn_reservation "ir_sr70_multi" + 1 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "multi")) + "serial_dispatch") + + (define_insn_reservation "ir_sr70_nop" + 1 + (and (eq_attr "cpu" "sr71000") + (eq_attr "type" "nop")) + "ri_insns") diff -Nrc3pad gcc-3.2.3/gcc/config/mips/svr3-4.h gcc-3.3/gcc/config/mips/svr3-4.h *** gcc-3.2.3/gcc/config/mips/svr3-4.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/mips/svr3-4.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,63 **** - /* Definitions of target machine for GNU compiler. - MIPS RISC-OS System V version. - Copyright (C) 1991 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_SYSV - - #define CPP_PREDEFINES "\ - -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SYSV \ - -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV \ - -Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips" - - #define STANDARD_INCLUDE_DIR "/sysv/usr/include" - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - -systype /sysv/" - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}" - - #define MACHINE_TYPE "RISC-OS System V Mips" - - /* Override defaults for finding the MIPS tools. */ - #define MD_STARTFILE_PREFIX "/sysv/usr/lib/cmplrs/cc/" - #define MD_EXEC_PREFIX "/sysv/usr/lib/cmplrs/cc/" - - /* Mips System V doesn't have a getpagesize() function needed by the - trampoline code, so use the POSIX sysconf function to get it. - This is only done when compiling the trampoline code. */ - - #ifdef L_trampoline - #include - #include - - #ifdef _SC_PAGE_SIZE - #define getpagesize() sysconf(_SC_PAGE_SIZE) - - #else /* older rev of OS */ - #define getpagesize() (NBPC) - #endif /* !_SC_PAGE_SIZE */ - #endif /* L_trampoline */ - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/svr3-5.h gcc-3.3/gcc/config/mips/svr3-5.h *** gcc-3.2.3/gcc/config/mips/svr3-5.h 2001-12-16 15:43:41.000000000 +0000 --- gcc-3.3/gcc/config/mips/svr3-5.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,89 **** - /* Definitions of target machine for GNU compiler. - MIPS RISC-OS 5.0 System V version. - Copyright (C) 1991, 1998 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_SYSV - - #define CPP_PREDEFINES "\ - -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SYSV \ - -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV \ - -Asystem=unix -Asystem=svr3 -Acpu=mips -Amachine=mips" - - #define STANDARD_INCLUDE_DIR "/sysv/usr/include" - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - %{call_shared} %{no_archive} %{exact_version} \ - %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \ - -systype /sysv/ " - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}" - - #define MACHINE_TYPE "RISC-OS System V Mips" - - /* Override defaults for finding the MIPS tools. */ - #define MD_STARTFILE_PREFIX "/sysv/usr/lib/cmplrs/cc/" - #define MD_EXEC_PREFIX "/sysv/usr/lib/cmplrs/cc/" - - /* Mips System V doesn't have a getpagesize() function needed by the - trampoline code, so use the POSIX sysconf function to get it. - This is only done when compiling the trampoline code. */ - - #ifdef L_trampoline - #include - #include - - /* In at least 5.0 and 5.01, there is no _SC_PAGE_SIZE macro, only a - _SC_PAGESIZE macro. */ - #ifdef _SC_PAGESIZE - #define _SC_PAGE_SIZE _SC_PAGESIZE - #endif - - #ifdef _SC_PAGE_SIZE - #define getpagesize() sysconf(_SC_PAGE_SIZE) - - #else /* older rev of OS */ - #define getpagesize() (NBPC) - #endif /* !_SC_PAGE_SIZE */ - #endif /* L_trampoline */ - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - - #include "mips/mips.h" - - /* Some assemblers have a bug that causes backslash escaped chars in .ascii - to be misassembled, so we just completely avoid it. */ - #undef ASM_OUTPUT_ASCII - #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ - do { \ - const unsigned char *s; \ - size_t i, limit = (LEN); \ - for (i = 0, s = (const unsigned char *)(PTR); i < limit; s++, i++) \ - { \ - if ((i % 8) == 0) \ - fputs ("\n\t.byte\t", (FILE)); \ - fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ - } \ - fputs ("\n", (FILE)); \ - } while (0) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/svr4-4.h gcc-3.3/gcc/config/mips/svr4-4.h *** gcc-3.2.3/gcc/config/mips/svr4-4.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/mips/svr4-4.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,57 **** - /* Definitions of target machine for GNU compiler. - MIPS RISC-OS System V.4 version. - Copyright (C) 1992, 1998, 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_SVR4 - - #define CPP_PREDEFINES "\ - -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4 \ - -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4 \ - -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=mips" - - #define STANDARD_INCLUDE_DIR "/svr4/usr/include" - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - -systype /svr4/" - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}" - - #define MACHINE_TYPE "RISC-OS System V.4 Mips" - - /* Override defaults for finding the MIPS tools. */ - #define MD_STARTFILE_PREFIX "/svr4/usr/lib/cmplrs/cc/" - #define MD_EXEC_PREFIX "/svr4/usr/lib/cmplrs/cc/" - - /* Mips System V.4 doesn't have a getpagesize() function needed by the - trampoline code, so use the POSIX sysconf function to get it. - This is only done when compiling the trampoline code. */ - - #ifdef L_trampoline - #include - - #define getpagesize() sysconf(_SC_PAGE_SIZE) - #endif /* L_trampoline */ - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/svr4-5.h gcc-3.3/gcc/config/mips/svr4-5.h *** gcc-3.2.3/gcc/config/mips/svr4-5.h 2001-12-16 15:43:41.000000000 +0000 --- gcc-3.3/gcc/config/mips/svr4-5.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,88 **** - /* Definitions of target machine for GNU compiler. - MIPS RISC-OS 5.0 System V.4 version. - Copyright (C) 1992, 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define MIPS_SVR4 - - #define CPP_PREDEFINES \ - "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4 \ - -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4 \ - -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 \ - -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=mips" - - #define STANDARD_INCLUDE_DIR "/svr4/usr/include" - - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - %{call_shared} %{no_archive} %{exact_version} \ - %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \ - -systype /svr4/ " - - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" - - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}\ - %{ansi:/svr4/usr/ccs/lib/values-Xc.o%s} \ - %{!ansi: \ - %{traditional:/svr4/usr/ccs/lib/values-Xt.o%s} \ - %{!traditional:/svr4/usr/ccs/lib/values-Xa.o%s}}" - - #define MACHINE_TYPE "RISC-OS System V.4 Mips" - - /* Override defaults for finding the MIPS tools. */ - #define MD_STARTFILE_PREFIX "/svr4/usr/lib/cmplrs/cc/" - #define MD_EXEC_PREFIX "/svr4/usr/lib/cmplrs/cc/" - - /* Mips System V.4 doesn't have a getpagesize() function needed by the - trampoline code, so use the POSIX sysconf function to get it. - This is only done when compiling the trampoline code. */ - - #ifdef L_trampoline - #include - - /* In at least 5.0 and 5.01, there is no _SC_PAGE_SIZE macro, only a - _SC_PAGESIZE macro. */ - #ifdef _SC_PAGESIZE - #define _SC_PAGE_SIZE _SC_PAGESIZE - #endif - - #define getpagesize() sysconf(_SC_PAGE_SIZE) - #endif /* L_trampoline */ - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - - #include "mips/mips.h" - - /* Some assemblers have a bug that causes backslash escaped chars in .ascii - to be misassembled, so we just completely avoid it. */ - #undef ASM_OUTPUT_ASCII - #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ - do { \ - const unsigned char *s; \ - size_t i, limit = (LEN); \ - for (i = 0, s = (const unsigned char *)(PTR); i < limit; s++, i++) \ - { \ - if ((i % 8) == 0) \ - fputs ("\n\t.byte\t", (FILE)); \ - fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ - } \ - fputs ("\n", (FILE)); \ - } while (0) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/svr4-t.h gcc-3.3/gcc/config/mips/svr4-t.h *** gcc-3.2.3/gcc/config/mips/svr4-t.h 2001-10-31 04:08:19.000000000 +0000 --- gcc-3.3/gcc/config/mips/svr4-t.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,29 **** - /* Definitions of target machine for GNU compiler. Tandem S2 w/ NonStop UX. */ - - /* Use the default value for this. */ - #undef STANDARD_INCLUDE_DIR - - #undef MACHINE_TYPE - #define MACHINE_TYPE "TANDEM System V.4 Mips" - - /* Use the default values in mips.h. */ - #undef MD_STARTFILE_PREFIX - #undef MD_EXEC_PREFIX - #define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" - #define MD_EXEC_PREFIX "/usr/lib/cmplrs/cc/" - - /* These are the same as the ones in svr4-5.h, except that references to - /svr4/ have been removed. */ - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}\ - %{ansi:/usr/lib/values-Xc.o%s} \ - %{!ansi: \ - %{traditional:/usr/lib/values-Xt.o%s} \ - %{!traditional:/usr/lib/values-Xa.o%s}}" - - #undef LINK_SPEC - #define LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ - %{bestGnum} %{shared} %{non_shared} \ - %{call_shared} %{no_archive} %{exact_version} \ - %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-bsd gcc-3.3/gcc/config/mips/t-bsd *** gcc-3.2.3/gcc/config/mips/t-bsd 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-bsd 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Exactly the same as t-mips, except we must define SYSTEM_HEADER_DIR - # to point to the bsd43 include files. - SYSTEM_HEADER_DIR = /bsd43/usr/include --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-bsd-gas gcc-3.3/gcc/config/mips/t-bsd-gas *** gcc-3.2.3/gcc/config/mips/t-bsd-gas 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-bsd-gas 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Exactly the same as t-mips-gas, except we must define SYSTEM_HEADER_DIR - # to point to the bsd43 include files. - SYSTEM_HEADER_DIR = /bsd43/usr/include --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-ecoff gcc-3.3/gcc/config/mips/t-ecoff *** gcc-3.2.3/gcc/config/mips/t-ecoff 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-ecoff 2002-08-17 13:04:39.000000000 +0000 *************** *** 1,5 **** - CONFIG2_H = $(srcdir)/config/mips/ecoff.h - LIB1ASMSRC = mips/mips16.S LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3 \ _m16eqsf2 _m16nesf2 _m16gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2 \ --- 1,3 ---- *************** LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m1 *** 19,48 **** # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __MIPSEL__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Build the libraries for both hard and soft floating point MULTILIB_OPTIONS = msoft-float/msingle-float EL/EB mips1/mips3 MULTILIB_DIRNAMES = soft-float single el eb mips1 mips3 MULTILIB_MATCHES = msingle-float=m4650 LIBGCC = stmp-multilib --- 17,27 ---- # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 # Build the libraries for both hard and soft floating point MULTILIB_OPTIONS = msoft-float/msingle-float EL/EB mips1/mips3 MULTILIB_DIRNAMES = soft-float single el eb mips1 mips3 + MULTILIB_MATCHES = EL=mel EB=meb MULTILIB_MATCHES = msingle-float=m4650 LIBGCC = stmp-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-elf gcc-3.3/gcc/config/mips/t-elf *** gcc-3.2.3/gcc/config/mips/t-elf 2002-01-17 07:53:56.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-elf 2002-08-17 13:04:39.000000000 +0000 *************** *** 1,5 **** - CONFIG2_H = $(srcdir)/config/mips/ecoff.h - # Don't let CTOR_LIST end up in sdata section. CRTSTUFF_T_CFLAGS = -G 0 --- 1,3 ---- *************** LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m1 *** 31,61 **** # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __MIPSEL__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Build the libraries for both hard and soft floating point ! MULTILIB_OPTIONS = msoft-float/msingle-float EL/EB ! MULTILIB_DIRNAMES = soft-float single el eb ! MULTILIB_MATCHES = msingle-float=m4650 EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib --- 29,40 ---- # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 # Build the libraries for both hard and soft floating point ! MULTILIB_OPTIONS = msoft-float EL/EB ! MULTILIB_DIRNAMES = soft-float el eb ! MULTILIB_MATCHES = EL=mel EB=meb ! #MULTILIB_MATCHES = msingle-float=m4650 EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-gofast gcc-3.3/gcc/config/mips/t-gofast *** gcc-3.2.3/gcc/config/mips/t-gofast 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-gofast 2002-07-29 22:21:41.000000000 +0000 *************** *** 0 **** --- 1,19 ---- + # We want fine grained libraries, so use the new code to build the + # floating point emulation libraries. + FPBIT = fp-bit.c + DPBIT = dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#ifdef __MIPSEL__' > dp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c + echo '#endif' >> dp-bit.c + echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#ifdef __MIPSEL__' >> fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c + echo '#endif' >> fp-bit.c + echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c diff -Nrc3pad gcc-3.2.3/gcc/config/mips/_tilib.c gcc-3.3/gcc/config/mips/_tilib.c *** gcc-3.2.3/gcc/config/mips/_tilib.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/_tilib.c 2003-02-02 19:57:56.000000000 +0000 *************** *** 0 **** --- 1,156 ---- + /* A few TImode functions needed for TFmode emulated arithmetic. + Copyright 2002, 2003 Free Software Foundation, Inc. + Contributed by Alexandre Oliva + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + #include "tconfig.h" + + #if _MIPS_SIM == 2 /* N32 */ || _MIPS_SIM == 3 /* 64 */ + + typedef int TItype __attribute__ ((mode (TI))); + typedef int DItype __attribute__ ((mode (DI))); + typedef int SItype __attribute__ ((mode (SI))); + + typedef unsigned int UDItype __attribute__ ((mode (DI))); + + typedef union + { + struct TIstruct { + #if LIBGCC2_WORDS_BIG_ENDIAN + DItype high, low; + #else + DItype low, high; + #endif + } s; + TItype ll; + } TIunion; + + TItype __negti2 (TItype); + TItype __ashlti3 (TItype, int); + #if 0 + TItype __ashrti3 (TItype, int); + #endif + TItype __lshrti3 (TItype, int); + + TItype + __negti2 (TItype u) + { + TIunion w; + TIunion uu; + + uu.ll = u; + + w.s.low = -uu.s.low; + w.s.high = -uu.s.high - ((UDItype) w.s.low > 0); + + return w.ll; + } + + TItype + __ashlti3 (TItype u, int b) + { + TIunion w; + int bm; + TIunion uu; + + if (b == 0) + return u; + + uu.ll = u; + + bm = (sizeof (DItype) * BITS_PER_UNIT) - b; + if (bm <= 0) + { + w.s.low = 0; + w.s.high = (UDItype) uu.s.low << -bm; + } + else + { + UDItype carries = (UDItype) uu.s.low >> bm; + + w.s.low = (UDItype) uu.s.low << b; + w.s.high = ((UDItype) uu.s.high << b) | carries; + } + + return w.ll; + } + + #if 0 + TItype + __ashrti3 (TItype u, int b) + { + TIunion w; + int bm; + TIunion uu; + + if (b == 0) + return u; + + uu.ll = u; + + bm = (sizeof (DItype) * BITS_PER_UNIT) - b; + if (bm <= 0) + { + /* w.s.high = 1..1 or 0..0 */ + w.s.high = uu.s.high >> (sizeof (DItype) * BITS_PER_UNIT - 1); + w.s.low = uu.s.high >> -bm; + } + else + { + UDItype carries = (UDItype) uu.s.high << bm; + + w.s.high = uu.s.high >> b; + w.s.low = ((UDItype) uu.s.low >> b) | carries; + } + + return w.ll; + } + #endif + + TItype + __lshrti3 (TItype u, int b) + { + TIunion w; + int bm; + TIunion uu; + + if (b == 0) + return u; + + uu.ll = u; + + bm = (sizeof (DItype) * BITS_PER_UNIT) - b; + if (bm <= 0) + { + w.s.high = 0; + w.s.low = (UDItype) uu.s.high >> -bm; + } + else + { + UDItype carries = (UDItype) uu.s.high << bm; + + w.s.high = (UDItype) uu.s.high >> b; + w.s.low = ((UDItype) uu.s.low >> b) | carries; + } + + return w.ll; + } + + #endif /* N32 or N64 */ diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-iris5-6 gcc-3.3/gcc/config/mips/t-iris5-6 *** gcc-3.2.3/gcc/config/mips/t-iris5-6 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-iris5-6 2003-01-26 11:35:08.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + # Build a shared libgcc library. + SHLIB_EXT = .so + SHLIB_SOLINK = @shlib_base_name@.so + SHLIB_SONAME = @shlib_so_name@.so.1 + SHLIB_NAME = @shlib_dir@@shlib_so_name@.so.1 + SHLIB_MAP = @shlib_map_file@ + SHLIB_OBJS = @shlib_objs@ + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ + + SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ + -Wl,-soname,$(SHLIB_SONAME) \ + -o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \ + rm -f $(SHLIB_SOLINK) && \ + $(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK) + # ??? Irix 6.5 seems to eat the option fine (if we somehow remove the + # -hidden_symbol option, which is documented to be ignored in conjunction + # with -exports_file), but fails to actually hide any symbols. + # -Wl,-exports_file,$(SHLIB_MAP) + + # $(slibdir) double quoted to protect it from expansion while building + # libgcc.mk. We want this delayed until actual install time. + SHLIB_INSTALL = \ + $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ + $(INSTALL_DATA) $(SHLIB_NAME) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \ + rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ + $(LN_S) $(SHLIB_SONAME) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) + SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk + SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-iris5-as gcc-3.3/gcc/config/mips/t-iris5-as *** gcc-3.2.3/gcc/config/mips/t-iris5-as 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-iris5-as 2002-07-11 18:56:56.000000000 +0000 *************** *** 0 **** --- 1,7 ---- + # omit -g, gcc doesn't support the o32 mdebug debugging format and warns about + # every invokation with -g* + # add -save-temps to avoid comparison failure due to embedded temp file names + BOOT_CFLAGS = -O2 -save-temps + + # omit -g1 + LIBGCC2_DEBUG_CFLAGS = diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-iris5-gas gcc-3.3/gcc/config/mips/t-iris5-gas *** gcc-3.2.3/gcc/config/mips/t-iris5-gas 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-iris5-gas 2002-07-19 21:58:12.000000000 +0000 *************** *** 0 **** --- 1,5 ---- + # For svr4 we build crtbegin.o and crtend.o which serve to add begin and + # end labels to the .ctors and .dtors section when we link using gcc. + + EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o + CRTSTUFF_T_CFLAGS=-g1 diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-iris6 gcc-3.3/gcc/config/mips/t-iris6 *** gcc-3.2.3/gcc/config/mips/t-iris6 2003-01-28 21:57:40.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-iris6 2003-01-28 02:18:38.000000000 +0000 *************** INSTALL_LIBGCC = install-multilib *** 15,66 **** EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o CRTSTUFF_T_CFLAGS=-g1 - # Build a shared libgcc library. - SHLIB_EXT = .so - SHLIB_SOLINK = @shlib_base_name@.so - SHLIB_SONAME = @shlib_so_name@.so.1 - SHLIB_NAME = @shlib_dir@@shlib_so_name@.so.1 - SHLIB_MAP = @shlib_map_file@ - SHLIB_OBJS = @shlib_objs@ - SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ - - SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ - -Wl,-soname,$(SHLIB_SONAME) \ - -o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \ - rm -f $(SHLIB_SOLINK) && \ - $(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK) - # ??? Irix 6.5 seems to eat the option fine (if we somehow remove the - # -hidden_symbol option, which is documented to be ignored in conjunction - # with -exports_file), but fails to actually hide any symbols. - # -Wl,-exports_file,$(SHLIB_MAP) - - # $(slibdir) double quoted to protect it from expansion while building - # libgcc.mk. We want this delayed until actual install time. - SHLIB_INSTALL = \ - $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ - $(INSTALL_DATA) $(SHLIB_NAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \ - rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ - $(LN_S) $(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) - SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk - SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver - - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#undef US_SOFTWARE_GOFAST' > dp-bit.c - echo '#undef FLOAT' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#undef US_SOFTWARE_GOFAST' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # This is only needed in the static libgcc as a band-aid until gcc correctly # implements the N32/N64 ABI structure passing conventions LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/mips/irix6-libc-compat.c --- 15,33 ---- EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o CRTSTUFF_T_CFLAGS=-g1 # This is only needed in the static libgcc as a band-aid until gcc correctly # implements the N32/N64 ABI structure passing conventions LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/mips/irix6-libc-compat.c + + LIB2FUNCS_EXTRA = $(srcdir)/config/mips/_tilib.c + + TPBIT = tp-bit.c + + tp-bit.c: $(srcdir)/config/fp-bit.c + echo '#ifdef __MIPSEL__' > tp-bit.c + echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c + echo '#endif' >> tp-bit.c + echo '#if __LDBL_MANT_DIG__ == 106' >> tp-bit.c + echo '# define TFLOAT' >> tp-bit.c + cat $(srcdir)/config/fp-bit.c >> tp-bit.c + echo '#endif' >> tp-bit.c diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-isa3264 gcc-3.3/gcc/config/mips/t-isa3264 *** gcc-3.2.3/gcc/config/mips/t-isa3264 2001-09-15 02:03:14.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-isa3264 2002-08-17 13:04:39.000000000 +0000 *************** *** 1,8 **** ! CONFIG2_H = $(srcdir)/config/mips/isa3264.h $(srcdir)/config/mips/elf.h $(srcdir)/config/mips/ecoff.h $(srcdir)/config/mips/mips.h ! ! # Suppress building libgcc1.a, since the MIPS compiler port is complete ! # and does not need anything from libgcc1.a. ! LIBGCC1 = # Don't let CTOR_LIST end up in sdata section. CRTSTUFF_T_CFLAGS = -G 0 --- 1,4 ---- ! CONFIG2_H = $(srcdir)/config/mips/elf.h $(srcdir)/config/mips/mips.h # Don't let CTOR_LIST end up in sdata section. CRTSTUFF_T_CFLAGS = -G 0 *************** $(T)crtn.o: $(srcdir)/config/mips/crtn.a *** 16,24 **** $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm - # When building a cross compiler, put the mips16 support functions in - # libgcc1.a. - CROSS_LIBGCC1 = libgcc1-asm.a LIB1ASMSRC = mips/mips16.S LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3 \ _m16eqsf2 _m16nesf2 _m16gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2 \ --- 12,17 ---- *************** LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m1 *** 38,69 **** # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 - # fp-bit and dp-bit are really part of libgcc1, but this will cause - # them to be built correctly, so... [taken from t-sparclite] - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __MIPSEL__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Build the libraries for both hard and soft floating point MULTILIB_OPTIONS = msoft-float EL/EB mips32/mips64 MULTILIB_DIRNAMES = soft-float el eb mips32 mips64 EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib --- 31,41 ---- # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 # Build the libraries for both hard and soft floating point MULTILIB_OPTIONS = msoft-float EL/EB mips32/mips64 MULTILIB_DIRNAMES = soft-float el eb mips32 mips64 + MULTILIB_MATCHES = EL=mel EB=meb EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-linux gcc-3.3/gcc/config/mips/t-linux *** gcc-3.2.3/gcc/config/mips/t-linux 2002-01-17 01:22:02.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-linux 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,20 **** - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - echo '#undef US_SOFTWARE_GOFAST' >> dp-bit.c - echo '#undef FLOAT' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - echo '#undef US_SOFTWARE_GOFAST' >> fp-bit.c - echo '#define FLOAT' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-mips gcc-3.3/gcc/config/mips/t-mips *** gcc-3.2.3/gcc/config/mips/t-mips 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-mips 2002-07-29 22:21:41.000000000 +0000 *************** *** 0 **** --- 1,19 ---- + # fp-bit and dp-bit are really part of libgcc1, but this will cause + # them to be built correctly, so... [taken from t-sparclite] + # We want fine grained libraries, so use the new code to build the + # floating point emulation libraries. + FPBIT = fp-bit.c + DPBIT = dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#ifdef __MIPSEL__' > dp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c + echo '#endif' >> dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#ifdef __MIPSEL__' >> fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c + echo '#endif' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-netbsd gcc-3.3/gcc/config/mips/t-netbsd *** gcc-3.2.3/gcc/config/mips/t-netbsd 2002-06-07 23:35:32.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-netbsd 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,20 **** - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - echo '#undef US_SOFTWARE_GOFAST' >> dp-bit.c - echo '#undef FLOAT' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - echo '#undef US_SOFTWARE_GOFAST' >> fp-bit.c - echo '#define FLOAT' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-r3900 gcc-3.3/gcc/config/mips/t-r3900 *** gcc-3.2.3/gcc/config/mips/t-r3900 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-r3900 2002-08-17 13:04:39.000000000 +0000 *************** *** 1,5 **** - CONFIG2_H = $(srcdir)/config/mips/ecoff.h - LIB1ASMSRC = mips/mips16.S LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3 \ _m16eqsf2 _m16nesf2 _m16gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2 \ --- 1,3 ---- *************** LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m1 *** 19,52 **** # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __MIPSEL__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o # Don't let CTOR_LIST end up in sdata section. CRTSTUFF_T_CFLAGS = -G 0 # Build the libraries for both hard and soft floating point ! MULTILIB_OPTIONS = msoft-float/msingle-float EL/EB ! MULTILIB_DIRNAMES = soft-float single el eb LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib --- 17,31 ---- # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o # Don't let CTOR_LIST end up in sdata section. CRTSTUFF_T_CFLAGS = -G 0 # Build the libraries for both hard and soft floating point ! MULTILIB_OPTIONS = msoft-float EL/EB ! MULTILIB_DIRNAMES = soft-float el eb ! MULTILIB_MATCHES = EL=mel EB=meb LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-sr71k gcc-3.3/gcc/config/mips/t-sr71k *** gcc-3.2.3/gcc/config/mips/t-sr71k 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-sr71k 2002-08-20 21:53:28.000000000 +0000 *************** *** 0 **** --- 1,86 ---- + CONFIG2_H = $(srcdir)/config/mips/elf.h $(srcdir)/config/mips/mips.h + + # Suppress building libgcc1.a, since the MIPS compiler port is complete + # and does not need anything from libgcc1.a. + LIBGCC1 = + CROSS_LIBGCC1 = + + EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o + # Don't let CTOR_LIST end up in sdata section. + CRTSTUFF_T_CFLAGS = -G 0 + + # Assemble startup files. + $(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm + + $(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm + + # We must build libgcc2.a with -G 0, in case the user wants to link + # without the $gp register. + TARGET_LIBGCC2_CFLAGS = -G 0 + + # fp-bit and dp-bit are really part of libgcc1, but this will cause + # them to be built correctly, so... [taken from t-sparclite] + # We want fine grained libraries, so use the new code to build the + # floating point emulation libraries. + FPBIT = fp-bit.c + DPBIT = dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#ifdef __MIPSEL__' > dp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c + echo '#endif' >> dp-bit.c + echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#ifdef __MIPSEL__' >> fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c + echo '#endif' >> fp-bit.c + echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + # Build the libraries for both hard and soft floating point + + MULTILIB_OPTIONS = EL/EB msoft-float mips2 + MULTILIB_DIRNAMES = el eb soft-float mips2 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib + + # Add additional dependencies to recompile selected modules whenever the + # tm.h file changes. The files compiled are: + # + # gcc.c (*_SPEC changes) + # toplev.c (new switches + assembly output changes) + # sdbout.c (debug format changes) + # dbxout.c (debug format changes) + # dwarfout.c (debug format changes) + # final.c (assembly output changes) + # varasm.c (assembly output changes) + # cse.c (cost functions) + # insn-output.c (possible ifdef changes in tm.h) + # regclass.c (fixed/call used register changes) + # cccp.c (new preprocessor macros, -v version #) + # explow.c (GO_IF_LEGITIMATE_ADDRESS) + # recog.c (GO_IF_LEGITIMATE_ADDRESS) + # reload.c (GO_IF_LEGITIMATE_ADDRESS) + + gcc.o: $(CONFIG2_H) + toplev.o: $(CONFIG2_H) + sdbout.o: $(CONFIG2_H) + dbxout.o: $(CONFIG2_H) + dwarfout.o: $(CONFIG2_H) + final.o: $(CONFIG2_H) + varasm.o: $(CONFIG2_H) + cse.o: $(CONFIG2_H) + insn-output.o: $(CONFIG2_H) + regclass.o: $(CONFIG2_H) + cccp.o: $(CONFIG2_H) + explow.o: $(CONFIG2_H) + recog.o: $(CONFIG2_H) + reload.o: $(CONFIG2_H) diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-svr3 gcc-3.3/gcc/config/mips/t-svr3 *** gcc-3.2.3/gcc/config/mips/t-svr3 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-svr3 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Exactly the same as t-mips, except we must define SYSTEM_HEADER_DIR - # to point to the svr3 include files. - SYSTEM_HEADER_DIR = /sysv/usr/include --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-svr3-gas gcc-3.3/gcc/config/mips/t-svr3-gas *** gcc-3.2.3/gcc/config/mips/t-svr3-gas 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-svr3-gas 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Exactly the same as t-mips-gas, except we must define SYSTEM_HEADER_DIR - # to point to the svr3 include files. - SYSTEM_HEADER_DIR = /sysv/usr/include --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-svr4 gcc-3.3/gcc/config/mips/t-svr4 *** gcc-3.2.3/gcc/config/mips/t-svr4 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-svr4 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Exactly the same as t-mips, except we must define SYSTEM_HEADER_DIR - # to point to the svr4 include files. - SYSTEM_HEADER_DIR = /svr4/usr/include --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-svr4-gas gcc-3.3/gcc/config/mips/t-svr4-gas *** gcc-3.2.3/gcc/config/mips/t-svr4-gas 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-svr4-gas 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Exactly the same as t-mips-gas, except we must define SYSTEM_HEADER_DIR - # to point to the svr4 include files. - SYSTEM_HEADER_DIR = /svr4/usr/include --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-ultrix gcc-3.3/gcc/config/mips/t-ultrix *** gcc-3.2.3/gcc/config/mips/t-ultrix 2001-05-17 03:16:05.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-ultrix 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - CONFIG2_H = $(srcdir)/config/mips/mips.h --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/t-vr gcc-3.3/gcc/config/mips/t-vr *** gcc-3.2.3/gcc/config/mips/t-vr 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/t-vr 2002-10-14 07:17:41.000000000 +0000 *************** *** 0 **** --- 1,67 ---- + # BEGIN boiler-plate MIPS stuff + + # Don't let CTOR_LIST end up in sdata section. + CRTSTUFF_T_CFLAGS = -G 0 + + # We must build libgcc2.a with -G 0, in case the user wants to link + # without the $gp register. + TARGET_LIBGCC2_CFLAGS = -G 0 + + LIB2FUNCS_EXTRA = $(srcdir)/config/mips/mips16.S + EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o + + # Assemble startup files. + $(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm + + $(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm + + # END boiler-plate + + # Endianness: EB or EL + # + # ABIs: mabi=32 + # mabi=o64 + # mabi=eabi + # meabi=eabi/mlong32 + # mabi=eabi/mgp32 + # mabi=eabi/mgp32/mlong64 + # + # Architecture: march=vr5400 + # march=vr4100 + # march=vr4100/mips16 + # + # Total: 2 * 6 * 3 = 36 multilibs. + MULTILIB_OPTIONS = \ + EL/EB \ + mabi=32/mabi=o64/mabi=eabi \ + mgp32 \ + mlong64 \ + mips16 \ + march=vr5400/march=vr4100 + + MULTILIB_DIRNAMES = \ + el eb \ + o32 o64 eabi \ + gp32 \ + long64 \ + mips16 \ + vr5400 vr4100 + + MULTILIB_MATCHES = EL=mel EB=meb + + # Assume a 4000-series is the default: we'd need a *mips16 entry if + # the default processor didn't support mips16. Also assume o64, + # which means we need to extend the o64 exceptions to combinations + # without a -mabi flag. + MULTILIB_EXCEPTIONS = \ + *mabi=32/mlong64* \ + *mabi=32/mgp32* \ + *mabi=o64/mgp32* \ + *mabi=o64/mlong64* \ + mgp32* E[LB]/mgp32* \ + mlong64* E[LB]/mlong64* \ + *mips16/march=vr5* diff -Nrc3pad gcc-3.2.3/gcc/config/mips/ultrix.h gcc-3.3/gcc/config/mips/ultrix.h *** gcc-3.2.3/gcc/config/mips/ultrix.h 2001-10-31 04:08:19.000000000 +0000 --- gcc-3.3/gcc/config/mips/ultrix.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,57 **** - /* Definitions of target machine for GNU compiler; DECstation (Ultrix) version. - Copyright (C) 1991, 1997, 1998, 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #define DECSTATION - - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES "\ - -D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \ - -Dbsd4_2 -Dhost_mips -Dmips -Dultrix -Dunix \ - -Asystem=unix -Asystem=bsd -Acpu=mips -Amachine=mips" - #endif - - #ifndef LIB_SPEC - #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc" - #endif - - #define SUBTARGET_CPP_SPEC "\ - %{.cc: -D__LANGUAGE_C -D_LANGUAGE_C} \ - %{.cxx: -D__LANGUAGE_C -D_LANGUAGE_C} \ - %{.C: -D__LANGUAGE_C -D_LANGUAGE_C} \ - " - - #ifndef STARTFILE_SPEC - #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" - #endif - - #ifndef MACHINE_TYPE - #define MACHINE_TYPE "DECstation running ultrix" - #endif - - /* Generate calls to memcpy, etc., not bcopy, etc. */ - #define TARGET_MEM_FUNCTIONS - - /* Work around assembler forward label references generated in exception - handling code. */ - #define DWARF2_UNWIND_INFO 0 - - /* INITIALIZE_TRAMPOLINE calls this library function to flush - program and data caches. */ - #define CACHE_FLUSH_FUNC "cacheflush" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mips/vr.h gcc-3.3/gcc/config/mips/vr.h *** gcc-3.2.3/gcc/config/mips/vr.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mips/vr.h 2002-10-15 17:02:56.000000000 +0000 *************** *** 0 **** --- 1,31 ---- + /* Definitions of target machine for GNU compiler. + NEC VR Series Processors + Copyright (c) 2002 Free Software Foundation, Inc. + Contributed by Red Hat, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define MIPS_CPU_STRING_DEFAULT "vr4100" + #define MULTILIB_DEFAULTS \ + { MULTILIB_ENDIAN_DEFAULT, MULTILIB_ABI_DEFAULT, "march=vr4100" } + + /* Make sure that -mlong64 always appears on the command line when + 64-bit longs are needed. Also make sure that -mgp32 doesn't appear + if it is redundant. */ + #define DRIVER_SELF_SPECS \ + "%{mabi=eabi:%{!mlong*:%{!mgp32:-mlong64}}}", \ + "%{mabi=32:%{ MMIX_LAST_STACK_REGISTER_REGNUM \ + || cfun == NULL \ + || cfun->machine == NULL \ + || cfun->machine->in_prologue \ + ? (N) : ((N) - MMIX_RETURN_VALUE_REGNUM \ + + cfun->machine->highest_saved_stack_register + 1)) + + /* The %d in "POP %d,0". */ + #define MMIX_POP_ARGUMENT() \ + ((! TARGET_ABI_GNU \ + && current_function_return_rtx != NULL \ + && ! current_function_returns_struct) \ + ? (GET_CODE (current_function_return_rtx) == PARALLEL \ + ? GET_NUM_ELEM (XVEC (current_function_return_rtx, 0)) : 1) \ + : 0) + /* The canonical saved comparison operands for non-cc0 machines, set in the compare expander. */ rtx mmix_compare_op0; *************** const char *mmix_cc1_ignored_option; *** 74,83 **** /* Declarations of locals. */ - /* This is used in the prologue for what number to pass in a PUSHJ or - PUSHGO insn. */ - static int mmix_highest_saved_stack_register; - /* Intermediate for insn output. */ static int mmix_output_destination_register; --- 111,116 ---- *************** static void mmix_output_condition PARAMS *** 88,99 **** static HOST_WIDEST_INT mmix_intval PARAMS ((rtx)); static void mmix_output_octa PARAMS ((FILE *, HOST_WIDEST_INT, int)); static bool mmix_assemble_integer PARAMS ((rtx, unsigned int, int)); ! static void mmix_init_machine_status PARAMS ((struct function *)); ! ! extern void mmix_target_asm_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); ! extern void mmix_target_asm_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); /* Target structure macros. Listed by node. See `Using and Porting GCC' --- 121,137 ---- static HOST_WIDEST_INT mmix_intval PARAMS ((rtx)); static void mmix_output_octa PARAMS ((FILE *, HOST_WIDEST_INT, int)); static bool mmix_assemble_integer PARAMS ((rtx, unsigned int, int)); ! static struct machine_function * mmix_init_machine_status PARAMS ((void)); ! static void mmix_encode_section_info PARAMS ((tree, int)); ! static const char *mmix_strip_name_encoding PARAMS ((const char *)); ! static void mmix_emit_sp_add PARAMS ((HOST_WIDE_INT offset)); ! static void mmix_target_asm_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); ! static void mmix_target_asm_function_end_prologue PARAMS ((FILE *)); ! static void mmix_target_asm_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void mmix_asm_output_mi_thunk + PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree)); /* Target structure macros. Listed by node. See `Using and Porting GCC' *************** extern void mmix_target_asm_function_epi *** 115,123 **** --- 153,174 ---- #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE mmix_target_asm_function_prologue + #undef TARGET_ASM_FUNCTION_END_PROLOGUE + #define TARGET_ASM_FUNCTION_END_PROLOGUE mmix_target_asm_function_end_prologue + #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE mmix_target_asm_function_epilogue + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO mmix_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING mmix_strip_name_encoding + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK mmix_asm_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + struct gcc_target targetm = TARGET_INITIALIZER; /* Functions that are expansions for target macros. *************** mmix_override_options () *** 138,148 **** warning ("-f%s not supported: ignored", (flag_pic > 1) ? "PIC" : "pic"); flag_pic = 0; } - - /* All other targets add GC roots from their override_options function, - so play along. */ - ggc_add_rtx_root (&mmix_compare_op0, 1); - ggc_add_rtx_root (&mmix_compare_op1, 1); } /* INIT_EXPANDERS. */ --- 189,194 ---- *************** mmix_init_expanders () *** 155,165 **** /* Set the per-function data. */ ! static void ! mmix_init_machine_status (f) ! struct function *f; { ! f->machine = xcalloc (1, sizeof (struct machine_function)); } /* DATA_ALIGNMENT. --- 201,210 ---- /* Set the per-function data. */ ! static struct machine_function * ! mmix_init_machine_status () { ! return ggc_alloc_cleared (sizeof (struct machine_function)); } /* DATA_ALIGNMENT. *************** mmix_conditional_register_usage () *** 221,231 **** /* Change the default from the mmixware ABI. For the GNU ABI, $15..$30 are call-saved just as $0..$14. There must be one ! call-clobbered local register for the "hole" describing number of ! saved local registers saved by PUSHJ/PUSHGO during the function ! call, receiving the return value at return. So best is to use ! the highest, $31. It's already marked call-clobbered for the ! mmixware ABI. */ for (i = 15; i <= 30; i++) call_used_regs[i] = 0; --- 266,276 ---- /* Change the default from the mmixware ABI. For the GNU ABI, $15..$30 are call-saved just as $0..$14. There must be one ! call-clobbered local register for the "hole" that holds the ! number of saved local registers saved by PUSHJ/PUSHGO during the ! function call, receiving the return value at return. So best is ! to use the highest, $31. It's already marked call-clobbered for ! the mmixware ABI. */ for (i = 15; i <= 30; i++) call_used_regs[i] = 0; *************** mmix_conditional_register_usage () *** 243,248 **** --- 288,304 ---- reg_names[i]++; } + /* LOCAL_REGNO. + All registers that are part of the register stack and that will be + saved are local. */ + + int + mmix_local_regno (regno) + int regno; + { + return regno <= MMIX_LAST_STACK_REGISTER_REGNUM && !call_used_regs[regno]; + } + /* PREFERRED_RELOAD_CLASS. We need to extend the reload class of REMAINDER_REG and HIMULT_REG. */ *************** mmix_function_arg (argsp, mode, type, na *** 497,510 **** int named ATTRIBUTE_UNUSED; int incoming; { - /* Handling of the positional dummy parameter for varargs gets nasty. - Check execute/991216-3 and function.c:assign_params. We have to say - that the dummy parameter goes on stack in order to get the correct - offset when va_start and va_arg is applied. FIXME: Should do TRT by - itself in the gcc core. */ - if ((! named && incoming && current_function_varargs) || argsp->now_varargs) - return NULL_RTX; - /* Last-argument marker. */ if (type == void_type_node) return (argsp->regs < MMIX_MAX_ARGS_IN_REGS) --- 553,558 ---- *************** mmix_function_outgoing_value (valtype, f *** 612,617 **** --- 660,674 ---- return gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (nregs, vec)); } + /* FUNCTION_VALUE_REGNO_P. */ + + int + mmix_function_value_regno_p (regno) + int regno; + { + return regno == MMIX_RETURN_VALUE_REGNUM; + } + /* EH_RETURN_DATA_REGNO. */ int *************** mmix_asm_preferred_eh_data_format (code, *** 652,1176 **** return DW_EH_PE_absptr; } ! /* Emit the function prologue. For simplicity while the port is still ! in a flux, we do it as text rather than the now preferred RTL way, ! as (define_insn "function_prologue"). ! ! FIXME: Translate to RTL and/or optimize some of the DWARF 2 stuff. */ ! void ! mmix_target_asm_function_prologue (stream, locals_size) ! FILE *stream; ! HOST_WIDE_INT locals_size; { ! int regno; ! int stack_space_to_allocate ! = (current_function_outgoing_args_size ! + current_function_pretend_args_size ! + (int) locals_size + 7) & ~7; ! int offset = -8; ! int doing_dwarf = dwarf2out_do_frame (); ! long cfa_offset = 0; ! ! /* Guard our assumptions. Very low priority FIXME. */ ! if (locals_size != (int) locals_size) ! error ("stack frame too big"); ! ! /* Add room needed to save global non-register-stack registers. */ ! for (regno = 255; ! regno >= MMIX_FIRST_GLOBAL_REGNUM; ! regno--) ! /* Note that we assume that the frame-pointer-register is one of these ! registers, in which case we don't count it here. */ ! if ((((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) ! && regs_ever_live[regno] && !call_used_regs[regno])) ! || IS_MMIX_EH_RETURN_DATA_REG (regno)) ! stack_space_to_allocate += 8; ! ! /* If we do have a frame-pointer, add room for it. */ ! if (frame_pointer_needed) ! stack_space_to_allocate += 8; ! ! /* If we have a non-local label, we need to be able to unwind to it, so ! store the current register stack pointer. Also store the return ! address if we do that. */ ! if (MMIX_CFUN_HAS_LANDING_PAD) ! stack_space_to_allocate += 16; ! else if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) ! /* If we do have a saved return-address slot, add room for it. */ ! stack_space_to_allocate += 8; ! ! /* Make sure we don't get an unaligned stack. */ ! if ((stack_space_to_allocate % 8) != 0) ! internal_error ("stack frame not a multiple of 8 bytes: %d", ! stack_space_to_allocate); ! ! if (current_function_pretend_args_size) ! { ! int mmix_first_vararg_reg ! = (MMIX_FIRST_INCOMING_ARG_REGNUM ! + (MMIX_MAX_ARGS_IN_REGS ! - current_function_pretend_args_size / 8)); ! ! for (regno ! = MMIX_FIRST_INCOMING_ARG_REGNUM + MMIX_MAX_ARGS_IN_REGS - 1; ! regno >= mmix_first_vararg_reg; ! regno--) ! { ! if (offset < 0) ! { ! int stack_chunk ! = stack_space_to_allocate > (256 - 8) ! ? (256 - 8) : stack_space_to_allocate; ! ! fprintf (stream, "\tSUBU %s,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! stack_chunk); ! ! if (doing_dwarf) ! { ! /* Each call to dwarf2out_def_cfa overrides the previous ! setting; they don't accumulate. We must keep track ! of the offset ourselves. */ ! cfa_offset += stack_chunk; ! if (!frame_pointer_needed) ! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM, ! cfa_offset); ! } ! offset += stack_chunk; ! stack_space_to_allocate -= stack_chunk; ! } ! ! fprintf (stream, "\tSTOU %s,%s,%d\n", reg_names[regno], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! offset); ! ! /* These registers aren't actually saved (as in "will be ! restored"), so don't tell DWARF2 they're saved. */ ! ! offset -= 8; ! } ! } ! ! /* Store the frame-pointer. */ ! ! if (frame_pointer_needed) ! { ! if (offset < 0) ! { ! /* Get 8 less than otherwise, since we need to reach offset + 8. */ ! int stack_chunk ! = stack_space_to_allocate > (256 - 8 - 8) ! ? (256 - 8 - 8) : stack_space_to_allocate; ! ! fprintf (stream, "\tSUBU %s,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! stack_chunk); ! if (doing_dwarf) ! cfa_offset += stack_chunk; ! offset += stack_chunk; ! stack_space_to_allocate -= stack_chunk; ! } ! ! fprintf (stream, "\tSTOU %s,%s,%d\n\tADDU %s,%s,%d\n", ! reg_names[MMIX_FRAME_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! offset, ! reg_names[MMIX_FRAME_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! offset + 8); ! if (doing_dwarf) ! { ! /* If we're using the frame-pointer, then we just need this CFA ! definition basing on that value (often equal to the CFA). ! Further changes to the stack-pointer do not affect the ! frame-pointer, so we conditionalize them below on ! !frame_pointer_needed. */ ! dwarf2out_def_cfa ("", MMIX_FRAME_POINTER_REGNUM, ! -cfa_offset + offset + 8); ! ! dwarf2out_reg_save ("", MMIX_FRAME_POINTER_REGNUM, ! -cfa_offset + offset); ! } ! ! offset -= 8; ! } ! ! if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) ! { ! /* Store the return-address, if one is needed on the stack. We ! usually store it in a register when needed, but that doesn't work ! with -fexceptions. */ ! ! if (offset < 0) ! { ! /* Get 8 less than otherwise, since we need to reach offset + 8. */ ! int stack_chunk ! = stack_space_to_allocate > (256 - 8 - 8) ! ? (256 - 8 - 8) : stack_space_to_allocate; ! ! fprintf (stream, "\tSUBU %s,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! stack_chunk); ! if (doing_dwarf) ! { ! cfa_offset += stack_chunk; ! if (!frame_pointer_needed) ! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM, ! cfa_offset); ! } ! offset += stack_chunk; ! stack_space_to_allocate -= stack_chunk; ! } ! ! fprintf (stream, "\tGET $255,rJ\n\tSTOU $255,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! offset); ! if (doing_dwarf) ! dwarf2out_return_save ("", -cfa_offset + offset); ! offset -= 8; ! } ! else if (MMIX_CFUN_HAS_LANDING_PAD) ! offset -= 8; ! ! if (MMIX_CFUN_HAS_LANDING_PAD) ! { ! /* Store the register defining the numbering of local registers, so ! we know how long to unwind the register stack. */ ! ! if (offset < 0) ! { ! /* Get 8 less than otherwise, since we need to reach offset + 8. */ ! int stack_chunk ! = stack_space_to_allocate > (256 - 8 - 8) ! ? (256 - 8 - 8) : stack_space_to_allocate; ! ! fprintf (stream, "\tSUBU %s,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! stack_chunk); ! offset += stack_chunk; ! stack_space_to_allocate -= stack_chunk; ! ! if (doing_dwarf) ! { ! cfa_offset += stack_chunk; ! if (!frame_pointer_needed) ! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM, ! cfa_offset); ! } ! } ! ! /* We don't tell dwarf2 about this one; we just have it to unwind ! the register stack at landing pads. FIXME: It's a kludge because ! we can't describe the effect of the PUSHJ and PUSHGO insns on the ! register stack at the moment. Best thing would be to handle it ! like stack-pointer offsets. Better: some hook into dwarf2out.c ! to produce DW_CFA_expression:s that specify the increment of rO, ! and unwind it at eh_return (preferred) or at the landing pad. ! Then saves to $0..$G-1 could be specified through that register. */ ! ! fprintf (stream, "\tGET $255,rO\n\tSTOU $255,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], offset); ! ! offset -= 8; ! } ! ! /* After the return-address and the frame-pointer, we have the local ! variables. They're the ones that may have an "unaligned" size. */ ! offset -= (locals_size + 7) & ~7; ! ! /* Now store all registers that are global, i.e. not saved by the ! register file machinery. ! ! It is assumed that the frame-pointer is one of these registers, so it ! is explicitly excluded in the count. */ ! ! for (regno = 255; ! regno >= MMIX_FIRST_GLOBAL_REGNUM; ! regno--) ! if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) ! && regs_ever_live[regno] && ! call_used_regs[regno]) ! || IS_MMIX_EH_RETURN_DATA_REG (regno)) ! { ! if (offset < 0) ! { ! int stack_chunk; ! ! /* Since the local variables go above, we may get a large ! offset here. */ ! if (offset < -248) ! { ! /* We're not going to access the locals area in the ! prologue, so we'll just silently subtract the slab we ! will not access. */ ! stack_chunk = ! stack_space_to_allocate > (256 - offset - 8) ! ? (256 - offset - 8) : stack_space_to_allocate; ! ! mmix_output_register_setting (stream, 255, stack_chunk, 1); ! fprintf (stream, "\tSUBU %s,%s,$255\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM]); ! ! if (doing_dwarf) ! { ! cfa_offset += stack_chunk; ! if (!frame_pointer_needed) ! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM, ! cfa_offset); ! } ! } ! else ! { ! stack_chunk = stack_space_to_allocate > (256 - 8) ! ? (256 - 8) : stack_space_to_allocate; ! ! fprintf (stream, "\tSUBU %s,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], stack_chunk); ! if (doing_dwarf) ! { ! cfa_offset += stack_chunk; ! if (!frame_pointer_needed) ! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM, ! cfa_offset); ! } ! } ! offset += stack_chunk; ! stack_space_to_allocate -= stack_chunk; ! } ! fprintf (stream, "\tSTOU %s,%s,%d\n", reg_names[regno], ! reg_names[MMIX_STACK_POINTER_REGNUM], offset); ! if (doing_dwarf) ! dwarf2out_reg_save ("", regno, -cfa_offset + offset); ! offset -= 8; ! } ! /* Finally, allocate room for outgoing args and local vars if room ! wasn't allocated above. This might be any number of bytes (well, we ! assume it fits in a host-int). */ ! if (stack_space_to_allocate) ! { ! if (stack_space_to_allocate < 256) ! { ! fprintf (stream, "\tSUBU %s,%s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! stack_space_to_allocate); ! } ! else ! { ! mmix_output_register_setting (stream, 255, ! stack_space_to_allocate, 1); ! fprintf (stream, "\tSUBU %s,%s,$255\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM]); ! } ! if (doing_dwarf) ! { ! cfa_offset += stack_space_to_allocate; ! if (!frame_pointer_needed) ! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM, ! cfa_offset); ! } ! } /* We put the number of the highest saved register-file register in a location convenient for the call-patterns to output. Note that we don't tell dwarf2 about these registers, since it can't restore them anyway. */ ! for (regno = MMIX_LAST_REGISTER_FILE_REGNUM; regno >= 0; regno--) if ((regs_ever_live[regno] && !call_used_regs[regno]) || (regno == MMIX_FRAME_POINTER_REGNUM && frame_pointer_needed)) break; ! mmix_highest_saved_stack_register = regno; } /* TARGET_ASM_FUNCTION_EPILOGUE. */ ! void mmix_target_asm_function_epilogue (stream, locals_size) FILE *stream; ! HOST_WIDE_INT locals_size; { ! int regno; ! int stack_space_to_deallocate ! = (current_function_outgoing_args_size ! + current_function_pretend_args_size ! + (int) locals_size + 7) & ~7; ! ! /* The assumption that locals_size fits in an int is asserted in ! mmix_target_asm_function_prologue. */ ! ! /* The first address to access is beyond the outgoing_args area. */ ! int offset = current_function_outgoing_args_size; ! ! /* Add the space for global non-register-stack registers. ! It is assumed that the frame-pointer register can be one of these ! registers, in which case it is excluded from the count when needed. */ ! for (regno = 255; ! regno >= MMIX_FIRST_GLOBAL_REGNUM; ! regno--) ! if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) ! && regs_ever_live[regno] && !call_used_regs[regno]) ! || IS_MMIX_EH_RETURN_DATA_REG (regno)) ! stack_space_to_deallocate += 8; ! ! /* Add in the space for register stack-pointer. If so, always add room ! for the saved PC. */ ! if (MMIX_CFUN_HAS_LANDING_PAD) ! stack_space_to_deallocate += 16; ! else if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) ! /* If we have a saved return-address slot, add it in. */ ! stack_space_to_deallocate += 8; ! ! /* Add in the frame-pointer. */ ! if (frame_pointer_needed) ! stack_space_to_deallocate += 8; ! ! /* Make sure we don't get an unaligned stack. */ ! if ((stack_space_to_deallocate % 8) != 0) ! internal_error ("stack frame not a multiple of octabyte: %d", ! stack_space_to_deallocate); ! ! /* We will add back small offsets to the stack pointer as we go. ! First, we restore all registers that are global, i.e. not saved by ! the register file machinery. */ ! ! for (regno = MMIX_FIRST_GLOBAL_REGNUM; ! regno <= 255; ! regno++) ! if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) ! && regs_ever_live[regno] && !call_used_regs[regno]) ! || IS_MMIX_EH_RETURN_DATA_REG (regno)) ! { ! if (offset > 255) ! { ! if (offset > 65535) ! { ! /* There's better support for incrementing than ! decrementing, so we might be able to optimize this as ! we see a need. */ ! mmix_output_register_setting (stream, 255, offset, 1); ! fprintf (stream, "\tADDU %s,%s,$255\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM]); ! } ! else ! fprintf (stream, "\tINCL %s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], offset); ! ! stack_space_to_deallocate -= offset; ! offset = 0; ! } ! ! fprintf (stream, "\tLDOU %s,%s,%d\n", ! reg_names[regno], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! offset); ! offset += 8; ! } ! ! /* Here is where the local variables were. As in the prologue, they ! might be of an unaligned size. */ ! offset += (locals_size + 7) & ~7; ! ! ! /* The saved register stack pointer is just below the frame-pointer ! register. We don't need to restore it "manually"; the POP ! instruction does that. */ ! if (MMIX_CFUN_HAS_LANDING_PAD) ! offset += 16; ! else if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) ! /* The return-address slot is just below the frame-pointer register. ! We don't need to restore it because we don't really use it. */ ! offset += 8; ! ! /* Get back the old frame-pointer-value. */ ! if (frame_pointer_needed) ! { ! if (offset > 255) ! { ! if (offset > 65535) ! { ! /* There's better support for incrementing than ! decrementing, so we might be able to optimize this as ! we see a need. */ ! mmix_output_register_setting (stream, 255, offset, 1); ! fprintf (stream, "\tADDU %s,%s,$255\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM]); ! } ! else ! fprintf (stream, "\tINCL %s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], offset); ! ! stack_space_to_deallocate -= offset; ! offset = 0; ! } ! ! fprintf (stream, "\tLDOU %s,%s,%d\n", ! reg_names[MMIX_FRAME_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM], ! offset); ! offset += 8; ! } ! ! /* We do not need to restore pretended incoming args, just add back ! offset to sp. */ ! if (stack_space_to_deallocate > 65535) ! { ! /* There's better support for incrementing than decrementing, so ! we might be able to optimize this as we see a need. */ ! mmix_output_register_setting (stream, 255, ! stack_space_to_deallocate, 1); ! fprintf (stream, "\tADDU %s,%s,$255\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_STACK_POINTER_REGNUM]); ! } ! else if (stack_space_to_deallocate != 0) ! fprintf (stream, "\tINCL %s,%d\n", ! reg_names[MMIX_STACK_POINTER_REGNUM], ! stack_space_to_deallocate); ! ! if (current_function_calls_eh_return) ! /* Adjustment the (normal) stack-pointer to that of the receiver. ! FIXME: It would be nice if we could also adjust the register stack ! here, but we need to express it through DWARF 2 too. */ ! fprintf (stream, "\tADDU %s,%s,%s\n", ! reg_names [MMIX_STACK_POINTER_REGNUM], ! reg_names [MMIX_STACK_POINTER_REGNUM], ! reg_names [MMIX_EH_RETURN_STACKADJ_REGNUM]); ! ! /* The extra \n is so we have a blank line between the assembly code of ! separate functions. */ ! fprintf (stream, "\tPOP %d,0\n\n", ! (! TARGET_ABI_GNU ! && current_function_return_rtx != NULL ! && ! current_function_returns_struct) ! ? (GET_CODE (current_function_return_rtx) == PARALLEL ! ? GET_NUM_ELEM (XVEC (current_function_return_rtx, 0)) : 1) ! : 0); } ! /* ASM_OUTPUT_MI_THUNK. */ ! void ! mmix_asm_output_mi_thunk (stream, fndecl, delta, func) FILE * stream; tree fndecl ATTRIBUTE_UNUSED; ! int delta; tree func; { /* If you define STRUCT_VALUE to 0, rather than use STRUCT_VALUE_REGNUM, --- 709,799 ---- return DW_EH_PE_absptr; } ! /* Make a note that we've seen the beginning of the prologue. This ! matters to whether we'll translate register numbers as calculated by ! mmix_machine_dependent_reorg. */ ! static void ! mmix_target_asm_function_prologue (stream, framesize) ! FILE *stream ATTRIBUTE_UNUSED; ! HOST_WIDE_INT framesize ATTRIBUTE_UNUSED; { ! cfun->machine->in_prologue = 1; ! } ! /* Make a note that we've seen the end of the prologue. */ ! static void ! mmix_target_asm_function_end_prologue (stream) ! FILE *stream ATTRIBUTE_UNUSED; ! { ! cfun->machine->in_prologue = 0; ! } ! /* MACHINE_DEPENDENT_REORG. ! No actual rearrangements done here; just virtually by calculating the ! highest saved stack register number used to modify the register numbers ! at output time. */ ! void ! mmix_machine_dependent_reorg (first) ! rtx first ATTRIBUTE_UNUSED; ! { ! int regno; /* We put the number of the highest saved register-file register in a location convenient for the call-patterns to output. Note that we don't tell dwarf2 about these registers, since it can't restore them anyway. */ ! for (regno = MMIX_LAST_STACK_REGISTER_REGNUM; regno >= 0; regno--) if ((regs_ever_live[regno] && !call_used_regs[regno]) || (regno == MMIX_FRAME_POINTER_REGNUM && frame_pointer_needed)) break; ! /* Regardless of whether they're saved (they might be just read), we ! mustn't include registers that carry parameters. We could scan the ! insns to see whether they're actually used (and indeed do other less ! trivial register usage analysis and transformations), but it seems ! wasteful to optimize for unused parameter registers. As of ! 2002-04-30, regs_ever_live[n] seems to be set for only-reads too, but ! that might change. */ ! if (!TARGET_ABI_GNU && regno < current_function_args_info.regs - 1) ! { ! regno = current_function_args_info.regs - 1; ! ! /* We don't want to let this cause us to go over the limit and make ! incoming parameter registers be misnumbered and treating the last ! parameter register and incoming return value register call-saved. ! Stop things at the unmodified scheme. */ ! if (regno > MMIX_RETURN_VALUE_REGNUM - 1) ! regno = MMIX_RETURN_VALUE_REGNUM - 1; ! } ! ! cfun->machine->highest_saved_stack_register = regno; } /* TARGET_ASM_FUNCTION_EPILOGUE. */ ! static void mmix_target_asm_function_epilogue (stream, locals_size) FILE *stream; ! HOST_WIDE_INT locals_size ATTRIBUTE_UNUSED; { ! /* Emit an \n for readability of the generated assembly. */ ! fputc ('\n', stream); } ! /* TARGET_ASM_OUTPUT_MI_THUNK. */ ! static void ! mmix_asm_output_mi_thunk (stream, fndecl, delta, vcall_offset, func) FILE * stream; tree fndecl ATTRIBUTE_UNUSED; ! HOST_WIDE_INT delta; ! HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; tree func; { /* If you define STRUCT_VALUE to 0, rather than use STRUCT_VALUE_REGNUM, *************** mmix_asm_output_mi_thunk (stream, fndecl *** 1179,1191 **** const char *regname = reg_names[MMIX_FIRST_INCOMING_ARG_REGNUM]; if (delta >= 0 && delta < 65536) ! asm_fprintf (stream, "\tINCL %s,%d\n", delta, regname); else if (delta < 0 && delta >= -255) ! asm_fprintf (stream, "\tSUBU %s,%s,%d\n", regname, regname, -delta); else { mmix_output_register_setting (stream, 255, delta, 1); ! asm_fprintf (stream, "\tADDU %s,%s,$255\n", regname, regname); } fprintf (stream, "\tJMP "); --- 802,814 ---- const char *regname = reg_names[MMIX_FIRST_INCOMING_ARG_REGNUM]; if (delta >= 0 && delta < 65536) ! fprintf (stream, "\tINCL %s,%d\n", regname, (int)delta); else if (delta < 0 && delta >= -255) ! fprintf (stream, "\tSUBU %s,%s,%d\n", regname, regname, (int)-delta); else { mmix_output_register_setting (stream, 255, delta, 1); ! fprintf (stream, "\tADDU %s,%s,$255\n", regname, regname); } fprintf (stream, "\tJMP "); *************** mmix_setup_incoming_varargs (args_so_far *** 1214,1244 **** int * pretend_sizep; int second_time ATTRIBUTE_UNUSED; { ! /* For stdarg, the last named variable has been handled, but ! args_so_farp has not been advanced for it. For varargs, the current ! argument is to be counted to the anonymous ones. */ ! if (current_function_stdarg) ! { ! if (args_so_farp->regs + 1 < MMIX_MAX_ARGS_IN_REGS) ! *pretend_sizep ! = (MMIX_MAX_ARGS_IN_REGS - (args_so_farp->regs + 1)) * 8; ! } ! else if (current_function_varargs) ! { ! if (args_so_farp->regs < MMIX_MAX_ARGS_IN_REGS) ! *pretend_sizep ! = (MMIX_MAX_ARGS_IN_REGS - args_so_farp->regs) * 8; ! ! /* For varargs, we get here when we see the last named parameter, ! which will actually be passed on stack. So make the next call ! (there will be one) to FUNCTION_ARG return 0, to count it on ! stack, so va_arg for it will get right. FIXME: The GCC core ! should provide TRT. */ ! args_so_farp->now_varargs = 1; ! } ! else ! internal_error ("neither varargs or stdarg in mmix_setup_incoming_varargs"); ! /* We assume that one argument takes up one register here. That should be true until we start messing with multi-reg parameters. */ --- 837,846 ---- int * pretend_sizep; int second_time ATTRIBUTE_UNUSED; { ! /* The last named variable has been handled, but ! args_so_farp has not been advanced for it. */ ! if (args_so_farp->regs + 1 < MMIX_MAX_ARGS_IN_REGS) ! *pretend_sizep = (MMIX_MAX_ARGS_IN_REGS - (args_so_farp->regs + 1)) * 8; /* We assume that one argument takes up one register here. That should be true until we start messing with multi-reg parameters. */ *************** mmix_constant_address_p (x) *** 1412,1424 **** /* When using "base addresses", anything constant goes. */ int constant_ok = TARGET_BASE_ADDRESSES != 0; - if (code == LABEL_REF || code == SYMBOL_REF) - return 1; - - if (code == CONSTANT_P_RTX || code == HIGH) - /* FIXME: Don't know how to dissect these. Avoid them for now. */ - return constant_ok; - switch (code) { case LABEL_REF: --- 1014,1019 ---- *************** mmix_select_cc_mode (op, x, y) *** 1581,1617 **** return CCmode; } - /* CANONICALIZE_COMPARISON. - FIXME: Check if the number adjustments trig. */ - - void - mmix_canonicalize_comparison (codep, op0p, op1p) - RTX_CODE * codep; - rtx * op0p ATTRIBUTE_UNUSED; - rtx * op1p; - { - /* Change -1 to zero, if possible. */ - if ((*codep == LE || *codep == GT) - && GET_CODE (*op1p) == CONST_INT - && *op1p == constm1_rtx) - { - *codep = *codep == LE ? LT : GE; - *op1p = const0_rtx; - } - - /* Fix up 256 to 255, if possible. */ - if ((*codep == LT || *codep == LTU || *codep == GE || *codep == GEU) - && GET_CODE (*op1p) == CONST_INT - && INTVAL (*op1p) == 256) - { - /* FIXME: Remove when I know this trigs. */ - fatal_insn ("oops, not debugged; fixing up value:", *op1p); - *codep = *codep == LT ? LE : *codep == LTU ? LEU : *codep - == GE ? GT : GTU; - *op1p = GEN_INT (255); - } - } - /* REVERSIBLE_CC_MODE. */ int --- 1176,1181 ---- *************** mmix_reversible_cc_mode (mode) *** 1619,1625 **** enum machine_mode mode; { /* That is, all integer and the EQ, NE, ORDERED and UNORDERED float ! cmpares. */ return mode != CC_FPmode; } --- 1183,1189 ---- enum machine_mode mode; { /* That is, all integer and the EQ, NE, ORDERED and UNORDERED float ! compares. */ return mode != CC_FPmode; } *************** mmix_data_section_asm_op () *** 1673,1730 **** return "\t.data ! mmixal:= 8H LOC 9B"; } ! /* SELECT_SECTION. ! The meat is from elfos.h, which we will eventually consider using. */ ! ! void ! mmix_select_section (decl, reloc, align) ! tree decl; ! int reloc; ! int align ATTRIBUTE_UNUSED; ! { ! if (TREE_CODE (decl) == STRING_CST) ! { ! if (! flag_writable_strings) ! const_section (); ! else ! data_section (); ! } ! else if (TREE_CODE (decl) == VAR_DECL) ! { ! if ((flag_pic && reloc) ! || !TREE_READONLY (decl) || TREE_SIDE_EFFECTS (decl) ! || !DECL_INITIAL (decl) ! || (DECL_INITIAL (decl) != error_mark_node ! && !TREE_CONSTANT (DECL_INITIAL (decl)))) ! data_section (); ! else ! const_section (); ! } ! else if (TREE_CODE (decl) == CONSTRUCTOR) ! { ! if ((flag_pic && reloc) ! || !TREE_READONLY (decl) || TREE_SIDE_EFFECTS (decl) ! || ! TREE_CONSTANT (decl)) ! data_section (); ! else ! const_section (); ! } ! else ! const_section (); ! } ! ! /* ENCODE_SECTION_INFO. */ ! ! void ! mmix_encode_section_info (decl) tree decl; { /* Test for an external declaration, and do nothing if it is one. */ if ((TREE_CODE (decl) == VAR_DECL && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl))) || (TREE_CODE (decl) == FUNCTION_DECL && TREE_PUBLIC (decl))) ; ! else if (DECL_P (decl)) { /* For non-visible declarations, add a "@" prefix, which we skip when the label is output. If the label does not have this --- 1237,1253 ---- return "\t.data ! mmixal:= 8H LOC 9B"; } ! static void ! mmix_encode_section_info (decl, first) tree decl; + int first; { /* Test for an external declaration, and do nothing if it is one. */ if ((TREE_CODE (decl) == VAR_DECL && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl))) || (TREE_CODE (decl) == FUNCTION_DECL && TREE_PUBLIC (decl))) ; ! else if (first && DECL_P (decl)) { /* For non-visible declarations, add a "@" prefix, which we skip when the label is output. If the label does not have this *************** mmix_encode_section_info (decl) *** 1765,1773 **** } } ! /* STRIP_NAME_ENCODING. */ ! ! const char * mmix_strip_name_encoding (name) const char *name; { --- 1288,1294 ---- } } ! static const char * mmix_strip_name_encoding (name) const char *name; { *************** mmix_strip_name_encoding (name) *** 1777,1825 **** return name; } - /* UNIQUE_SECTION. - The meat is from elfos.h, which we should consider using. */ - - void - mmix_unique_section (decl, reloc) - tree decl; - int reloc; - { - int len; - int sec; - const char *name; - char *string; - const char *prefix; - static const char *const prefixes[4][2] = - { - { ".text.", ".gnu.linkonce.t." }, - { ".rodata.", ".gnu.linkonce.r." }, - { ".data.", ".gnu.linkonce.d." }, - { ".bss.", ".gnu.linkonce.b." } - }; - - if (TREE_CODE (decl) == FUNCTION_DECL) - sec = 0; - else if (DECL_INITIAL (decl) == 0 - || DECL_INITIAL (decl) == error_mark_node) - sec = 3; - else if (DECL_READONLY_SECTION (decl, reloc)) - sec = 1; - else - sec = 2; - - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - /* Strip off any encoding in name. */ - STRIP_NAME_ENCODING (name, name); - prefix = prefixes[sec][DECL_ONE_ONLY (decl)]; - len = strlen (name) + strlen (prefix); - string = alloca (len + 1); - - sprintf (string, "%s%s", prefix, name); - - DECL_SECTION_NAME (decl) = build_string (len, string); - } - /* ASM_FILE_START. */ void --- 1298,1303 ---- *************** mmix_asm_declare_register_global (stream *** 2059,2076 **** here. */ } - /* ASM_GLOBALIZE_LABEL. */ - - void - mmix_asm_globalize_label (stream, name) - FILE * stream ATTRIBUTE_UNUSED; - const char * name ATTRIBUTE_UNUSED; - { - asm_fprintf (stream, "\t.global "); - assemble_name (stream, name); - putc ('\n', stream); - } - /* ASM_WEAKEN_LABEL. */ void --- 1537,1542 ---- *************** mmix_asm_weaken_label (stream, name) *** 2078,2086 **** FILE * stream ATTRIBUTE_UNUSED; const char * name ATTRIBUTE_UNUSED; { ! asm_fprintf (stream, "\t.weak "); assemble_name (stream, name); ! asm_fprintf (stream, " ! mmixal-incompatible\n"); } /* MAKE_DECL_ONE_ONLY. */ --- 1544,1552 ---- FILE * stream ATTRIBUTE_UNUSED; const char * name ATTRIBUTE_UNUSED; { ! fprintf (stream, "\t.weak "); assemble_name (stream, name); ! fprintf (stream, " ! mmixal-incompatible\n"); } /* MAKE_DECL_ONE_ONLY. */ *************** mmix_asm_output_def (stream, name, value *** 2136,2158 **** fputc ('\n', stream); } - /* ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL. */ - - void - mmix_asm_output_define_label_difference_symbol (stream, symbol, hi, lo) - FILE *stream; - const char *symbol; - const char *hi; - const char *lo; - { - assemble_name (stream, symbol); - fprintf (stream, "\tIS\t"); - assemble_name (stream, hi); - fputc ('-', stream); - assemble_name (stream, lo); - fprintf (stream, "\n"); - } - /* PRINT_OPERAND. */ void --- 1602,1607 ---- *************** mmix_print_operand (stream, x, code) *** 2164,2169 **** --- 1613,1619 ---- /* When we add support for different codes later, we can, when needed, drop through to the main handler with a modified operand. */ rtx modified_x = x; + int regno = x != NULL_RTX && REG_P (x) ? REGNO (x) : 0; switch (code) { *************** mmix_print_operand (stream, x, code) *** 2179,2184 **** --- 1629,1639 ---- } return; + case '.': + /* For the %d in POP %d,0. */ + fprintf (stream, "%d", MMIX_POP_ARGUMENT ()); + return; + case 'B': if (GET_CODE (x) != CONST_INT) fatal_insn ("MMIX Internal: Expected a CONST_INT, not this", x); *************** mmix_print_operand (stream, x, code) *** 2188,2198 **** case 'H': /* Highpart. Must be general register, and not the last one, as that one cannot be part of a consecutive register pair. */ ! if (REGNO (x) > MMIX_LAST_GENERAL_REGISTER - 1) ! internal_error ("MMIX Internal: Bad register: %d", REGNO (x)); /* This is big-endian, so the high-part is the first one. */ ! fprintf (stream, "%s", reg_names[REGNO (x)]); return; case 'L': --- 1643,1653 ---- case 'H': /* Highpart. Must be general register, and not the last one, as that one cannot be part of a consecutive register pair. */ ! if (regno > MMIX_LAST_GENERAL_REGISTER - 1) ! internal_error ("MMIX Internal: Bad register: %d", regno); /* This is big-endian, so the high-part is the first one. */ ! fprintf (stream, "%s", reg_names[MMIX_OUTPUT_REGNO (regno)]); return; case 'L': *************** mmix_print_operand (stream, x, code) *** 2212,2222 **** return; } ! if (REGNO (x) > MMIX_LAST_GENERAL_REGISTER - 1) ! internal_error ("MMIX Internal: Bad register: %d", REGNO (x)); /* This is big-endian, so the low-part is + 1. */ ! fprintf (stream, "%s", reg_names[REGNO (x) + 1]); return; /* Can't use 'a' because that's a generic modifier for address --- 1667,1677 ---- return; } ! if (regno > MMIX_LAST_GENERAL_REGISTER - 1) ! internal_error ("MMIX Internal: Bad register: %d", regno); /* This is big-endian, so the low-part is + 1. */ ! fprintf (stream, "%s", reg_names[MMIX_OUTPUT_REGNO (regno) + 1]); return; /* Can't use 'a' because that's a generic modifier for address *************** mmix_print_operand (stream, x, code) *** 2272,2290 **** by the prologue. The actual operand contains the number of registers to pass, but we don't use it currently. Anyway, we need to output the number of saved registers here. */ ! if (TARGET_ABI_GNU) ! fprintf (stream, "%d", mmix_highest_saved_stack_register + 1); ! else ! /* FIXME: Get the effect of renaming $16, $17.. to the first ! unused call-saved reg. */ ! fprintf (stream, "15"); return; case 'r': /* Store the register to output a constant to. */ if (! REG_P (x)) fatal_insn ("MMIX Internal: Expected a register, not this", x); ! mmix_output_destination_register = REGNO (x); return; case 'I': --- 1727,1741 ---- by the prologue. The actual operand contains the number of registers to pass, but we don't use it currently. Anyway, we need to output the number of saved registers here. */ ! fprintf (stream, "%d", ! cfun->machine->highest_saved_stack_register + 1); return; case 'r': /* Store the register to output a constant to. */ if (! REG_P (x)) fatal_insn ("MMIX Internal: Expected a register, not this", x); ! mmix_output_destination_register = MMIX_OUTPUT_REGNO (regno); return; case 'I': *************** mmix_print_operand (stream, x, code) *** 2331,2339 **** switch (GET_CODE (modified_x)) { case REG: ! if (REGNO (modified_x) >= FIRST_PSEUDO_REGISTER) ! internal_error ("MMIX Internal: Bad register: %d", REGNO (modified_x)); ! fprintf (stream, "%s", reg_names[REGNO (modified_x)]); return; case MEM: --- 1782,1791 ---- switch (GET_CODE (modified_x)) { case REG: ! regno = REGNO (modified_x); ! if (regno >= FIRST_PSEUDO_REGISTER) ! internal_error ("MMIX Internal: Bad register: %d", regno); ! fprintf (stream, "%s", reg_names[MMIX_OUTPUT_REGNO (regno)]); return; case MEM: *************** mmix_print_operand_punct_valid_p (code) *** 2387,2393 **** int code ATTRIBUTE_UNUSED; { /* A '+' is used for branch prediction, similar to other ports. */ ! return code == '+'; } /* PRINT_OPERAND_ADDRESS. */ --- 1839,1847 ---- int code ATTRIBUTE_UNUSED; { /* A '+' is used for branch prediction, similar to other ports. */ ! return code == '+' ! /* A '.' is used for the %d in the POP %d,0 return insn. */ ! || code == '.'; } /* PRINT_OPERAND_ADDRESS. */ *************** mmix_print_operand_address (stream, x) *** 2401,2407 **** { /* I find the generated assembly code harder to read without the ",0". */ ! fprintf (stream, "%s,0",reg_names[REGNO (x)]); return; } else if (GET_CODE (x) == PLUS) --- 1855,1861 ---- { /* I find the generated assembly code harder to read without the ",0". */ ! fprintf (stream, "%s,0", reg_names[MMIX_OUTPUT_REGNO (REGNO (x))]); return; } else if (GET_CODE (x) == PLUS) *************** mmix_print_operand_address (stream, x) *** 2409,2429 **** rtx x1 = XEXP (x, 0); rtx x2 = XEXP (x, 1); - /* Try swap the order. FIXME: Do we need this? */ - if (! REG_P (x1)) - { - rtx tem = x1; - x1 = x2; - x2 = tem; - } - if (REG_P (x1)) { ! fprintf (stream, "%s,", reg_names[REGNO (x1)]); if (REG_P (x2)) { ! fprintf (stream, "%s", reg_names[REGNO (x2)]); return; } else if (GET_CODE (x2) == CONST_INT --- 1863,1876 ---- rtx x1 = XEXP (x, 0); rtx x2 = XEXP (x, 1); if (REG_P (x1)) { ! fprintf (stream, "%s,", reg_names[MMIX_OUTPUT_REGNO (REGNO (x1))]); if (REG_P (x2)) { ! fprintf (stream, "%s", ! reg_names[MMIX_OUTPUT_REGNO (REGNO (x2))]); return; } else if (GET_CODE (x2) == CONST_INT *************** mmix_asm_output_reg_push (stream, regno) *** 2454,2460 **** fprintf (stream, "\tSUBU %s,%s,8\n\tSTOU %s,%s,0\n", reg_names[MMIX_STACK_POINTER_REGNUM], reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[regno], reg_names[MMIX_STACK_POINTER_REGNUM]); } --- 1901,1907 ---- fprintf (stream, "\tSUBU %s,%s,8\n\tSTOU %s,%s,0\n", reg_names[MMIX_STACK_POINTER_REGNUM], reg_names[MMIX_STACK_POINTER_REGNUM], ! reg_names[MMIX_OUTPUT_REGNO (regno)], reg_names[MMIX_STACK_POINTER_REGNUM]); } *************** mmix_asm_output_reg_pop (stream, regno) *** 2466,2472 **** int regno; { fprintf (stream, "\tLDOU %s,%s,0\n\tINCL %s,8\n", ! reg_names[regno], reg_names[MMIX_STACK_POINTER_REGNUM], reg_names[MMIX_STACK_POINTER_REGNUM]); } --- 1913,1919 ---- int regno; { fprintf (stream, "\tLDOU %s,%s,0\n\tINCL %s,8\n", ! reg_names[MMIX_OUTPUT_REGNO (regno)], reg_names[MMIX_STACK_POINTER_REGNUM], reg_names[MMIX_STACK_POINTER_REGNUM]); } *************** int *** 2526,2533 **** mmix_dbx_register_number (regno) int regno; { ! /* FIXME: Implement final register renumbering if necessary. (Use ! target state in cfun). */ /* We need to renumber registers to get the number of the return address register in the range 0..255. It is also space-saving if registers --- 1973,1983 ---- mmix_dbx_register_number (regno) int regno; { ! /* Adjust the register number to the one it will be output as, dammit. ! It'd be nice if we could check the assumption that we're filling a ! gap, but every register between the last saved register and parameter ! registers might be a valid parameter register. */ ! regno = MMIX_OUTPUT_REGNO (regno); /* We need to renumber registers to get the number of the return address register in the range 0..255. It is also space-saving if registers *************** mmix_dbx_register_number (regno) *** 2541,2546 **** --- 1991,2398 ---- Now MMIX's own functions. First the exported ones. */ + /* Wrapper for get_hard_reg_initial_val since integrate.h isn't included + from insn-emit.c. */ + + rtx + mmix_get_hard_reg_initial_val (mode, regno) + enum machine_mode mode; + int regno; + { + return get_hard_reg_initial_val (mode, regno); + } + + /* Nonzero when the function epilogue is simple enough that a single + "POP %d,0" should be used even within the function. */ + + int + mmix_use_simple_return () + { + int regno; + + int stack_space_to_allocate + = (current_function_outgoing_args_size + + current_function_pretend_args_size + + get_frame_size () + 7) & ~7; + + if (!TARGET_USE_RETURN_INSN || !reload_completed) + return 0; + + for (regno = 255; + regno >= MMIX_FIRST_GLOBAL_REGNUM; + regno--) + /* Note that we assume that the frame-pointer-register is one of these + registers, in which case we don't count it here. */ + if ((((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) + && regs_ever_live[regno] && !call_used_regs[regno])) + || IS_MMIX_EH_RETURN_DATA_REG (regno)) + return 0; + + if (frame_pointer_needed) + stack_space_to_allocate += 8; + + if (MMIX_CFUN_HAS_LANDING_PAD) + stack_space_to_allocate += 16; + else if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) + stack_space_to_allocate += 8; + + return stack_space_to_allocate == 0; + } + + + /* Expands the function prologue into RTX. */ + + void + mmix_expand_prologue () + { + HOST_WIDE_INT locals_size = get_frame_size (); + int regno; + HOST_WIDE_INT stack_space_to_allocate + = (current_function_outgoing_args_size + + current_function_pretend_args_size + + locals_size + 7) & ~7; + HOST_WIDE_INT offset = -8; + + /* Add room needed to save global non-register-stack registers. */ + for (regno = 255; + regno >= MMIX_FIRST_GLOBAL_REGNUM; + regno--) + /* Note that we assume that the frame-pointer-register is one of these + registers, in which case we don't count it here. */ + if ((((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) + && regs_ever_live[regno] && !call_used_regs[regno])) + || IS_MMIX_EH_RETURN_DATA_REG (regno)) + stack_space_to_allocate += 8; + + /* If we do have a frame-pointer, add room for it. */ + if (frame_pointer_needed) + stack_space_to_allocate += 8; + + /* If we have a non-local label, we need to be able to unwind to it, so + store the current register stack pointer. Also store the return + address if we do that. */ + if (MMIX_CFUN_HAS_LANDING_PAD) + stack_space_to_allocate += 16; + else if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) + /* If we do have a saved return-address slot, add room for it. */ + stack_space_to_allocate += 8; + + /* Make sure we don't get an unaligned stack. */ + if ((stack_space_to_allocate % 8) != 0) + internal_error ("stack frame not a multiple of 8 bytes: %d", + stack_space_to_allocate); + + if (current_function_pretend_args_size) + { + int mmix_first_vararg_reg + = (MMIX_FIRST_INCOMING_ARG_REGNUM + + (MMIX_MAX_ARGS_IN_REGS + - current_function_pretend_args_size / 8)); + + for (regno + = MMIX_FIRST_INCOMING_ARG_REGNUM + MMIX_MAX_ARGS_IN_REGS - 1; + regno >= mmix_first_vararg_reg; + regno--) + { + if (offset < 0) + { + HOST_WIDE_INT stack_chunk + = stack_space_to_allocate > (256 - 8) + ? (256 - 8) : stack_space_to_allocate; + + mmix_emit_sp_add (-stack_chunk); + offset += stack_chunk; + stack_space_to_allocate -= stack_chunk; + } + + /* These registers aren't actually saved (as in "will be + restored"), so don't tell DWARF2 they're saved. */ + emit_move_insn (gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, + offset)), + gen_rtx_REG (DImode, regno)); + offset -= 8; + } + } + + /* Store the frame-pointer. */ + + if (frame_pointer_needed) + { + rtx insn; + + if (offset < 0) + { + /* Get 8 less than otherwise, since we need to reach offset + 8. */ + HOST_WIDE_INT stack_chunk + = stack_space_to_allocate > (256 - 8 - 8) + ? (256 - 8 - 8) : stack_space_to_allocate; + + mmix_emit_sp_add (-stack_chunk); + + offset += stack_chunk; + stack_space_to_allocate -= stack_chunk; + } + + insn = emit_move_insn (gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, + offset)), + hard_frame_pointer_rtx); + RTX_FRAME_RELATED_P (insn) = 1; + insn = emit_insn (gen_adddi3 (hard_frame_pointer_rtx, + stack_pointer_rtx, + GEN_INT (offset + 8))); + RTX_FRAME_RELATED_P (insn) = 1; + offset -= 8; + } + + if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) + { + rtx tmpreg, retreg; + rtx insn; + + /* Store the return-address, if one is needed on the stack. We + usually store it in a register when needed, but that doesn't work + with -fexceptions. */ + + if (offset < 0) + { + /* Get 8 less than otherwise, since we need to reach offset + 8. */ + HOST_WIDE_INT stack_chunk + = stack_space_to_allocate > (256 - 8 - 8) + ? (256 - 8 - 8) : stack_space_to_allocate; + + mmix_emit_sp_add (-stack_chunk); + + offset += stack_chunk; + stack_space_to_allocate -= stack_chunk; + } + + tmpreg = gen_rtx_REG (DImode, 255); + retreg = gen_rtx_REG (DImode, MMIX_rJ_REGNUM); + + /* Dwarf2 code is confused by the use of a temporary register for + storing the return address, so we have to express it as a note, + which we attach to the actual store insn. */ + emit_move_insn (tmpreg, retreg); + + insn = emit_move_insn (gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, + offset)), + tmpreg); + RTX_FRAME_RELATED_P (insn) = 1; + REG_NOTES (insn) + = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, + gen_rtx_SET (VOIDmode, + gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, + offset)), + retreg), + REG_NOTES (insn)); + + offset -= 8; + } + else if (MMIX_CFUN_HAS_LANDING_PAD) + offset -= 8; + + if (MMIX_CFUN_HAS_LANDING_PAD) + { + /* Store the register defining the numbering of local registers, so + we know how long to unwind the register stack. */ + + if (offset < 0) + { + /* Get 8 less than otherwise, since we need to reach offset + 8. */ + HOST_WIDE_INT stack_chunk + = stack_space_to_allocate > (256 - 8 - 8) + ? (256 - 8 - 8) : stack_space_to_allocate; + + mmix_emit_sp_add (-stack_chunk); + + offset += stack_chunk; + stack_space_to_allocate -= stack_chunk; + } + + /* We don't tell dwarf2 about this one; we just have it to unwind + the register stack at landing pads. FIXME: It's a kludge because + we can't describe the effect of the PUSHJ and PUSHGO insns on the + register stack at the moment. Best thing would be to handle it + like stack-pointer offsets. Better: some hook into dwarf2out.c + to produce DW_CFA_expression:s that specify the increment of rO, + and unwind it at eh_return (preferred) or at the landing pad. + Then saves to $0..$G-1 could be specified through that register. */ + + emit_move_insn (gen_rtx_REG (DImode, 255), + gen_rtx_REG (DImode, + MMIX_rO_REGNUM)); + emit_move_insn (gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, offset)), + gen_rtx_REG (DImode, 255)); + offset -= 8; + } + + /* After the return-address and the frame-pointer, we have the local + variables. They're the ones that may have an "unaligned" size. */ + offset -= (locals_size + 7) & ~7; + + /* Now store all registers that are global, i.e. not saved by the + register file machinery. + + It is assumed that the frame-pointer is one of these registers, so it + is explicitly excluded in the count. */ + + for (regno = 255; + regno >= MMIX_FIRST_GLOBAL_REGNUM; + regno--) + if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) + && regs_ever_live[regno] && ! call_used_regs[regno]) + || IS_MMIX_EH_RETURN_DATA_REG (regno)) + { + rtx insn; + + if (offset < 0) + { + HOST_WIDE_INT stack_chunk + = (stack_space_to_allocate > (256 - offset - 8) + ? (256 - offset - 8) : stack_space_to_allocate); + + mmix_emit_sp_add (-stack_chunk); + offset += stack_chunk; + stack_space_to_allocate -= stack_chunk; + } + + insn = emit_move_insn (gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, + offset)), + gen_rtx_REG (DImode, regno)); + RTX_FRAME_RELATED_P (insn) = 1; + offset -= 8; + } + + /* Finally, allocate room for outgoing args and local vars if room + wasn't allocated above. */ + if (stack_space_to_allocate) + mmix_emit_sp_add (-stack_space_to_allocate); + } + + /* Expands the function epilogue into RTX. */ + + void + mmix_expand_epilogue () + { + HOST_WIDE_INT locals_size = get_frame_size (); + int regno; + HOST_WIDE_INT stack_space_to_deallocate + = (current_function_outgoing_args_size + + current_function_pretend_args_size + + locals_size + 7) & ~7; + + /* The assumption that locals_size fits in an int is asserted in + mmix_expand_prologue. */ + + /* The first address to access is beyond the outgoing_args area. */ + int offset = current_function_outgoing_args_size; + + /* Add the space for global non-register-stack registers. + It is assumed that the frame-pointer register can be one of these + registers, in which case it is excluded from the count when needed. */ + for (regno = 255; + regno >= MMIX_FIRST_GLOBAL_REGNUM; + regno--) + if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) + && regs_ever_live[regno] && !call_used_regs[regno]) + || IS_MMIX_EH_RETURN_DATA_REG (regno)) + stack_space_to_deallocate += 8; + + /* Add in the space for register stack-pointer. If so, always add room + for the saved PC. */ + if (MMIX_CFUN_HAS_LANDING_PAD) + stack_space_to_deallocate += 16; + else if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) + /* If we have a saved return-address slot, add it in. */ + stack_space_to_deallocate += 8; + + /* Add in the frame-pointer. */ + if (frame_pointer_needed) + stack_space_to_deallocate += 8; + + /* Make sure we don't get an unaligned stack. */ + if ((stack_space_to_deallocate % 8) != 0) + internal_error ("stack frame not a multiple of octabyte: %d", + stack_space_to_deallocate); + + /* We will add back small offsets to the stack pointer as we go. + First, we restore all registers that are global, i.e. not saved by + the register file machinery. */ + + for (regno = MMIX_FIRST_GLOBAL_REGNUM; + regno <= 255; + regno++) + if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed) + && regs_ever_live[regno] && !call_used_regs[regno]) + || IS_MMIX_EH_RETURN_DATA_REG (regno)) + { + if (offset > 255) + { + mmix_emit_sp_add (offset); + stack_space_to_deallocate -= offset; + offset = 0; + } + + emit_move_insn (gen_rtx_REG (DImode, regno), + gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, + offset))); + offset += 8; + } + + /* Here is where the local variables were. As in the prologue, they + might be of an unaligned size. */ + offset += (locals_size + 7) & ~7; + + + /* The saved register stack pointer is just below the frame-pointer + register. We don't need to restore it "manually"; the POP + instruction does that. */ + if (MMIX_CFUN_HAS_LANDING_PAD) + offset += 16; + else if (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS) + /* The return-address slot is just below the frame-pointer register. + We don't need to restore it because we don't really use it. */ + offset += 8; + + /* Get back the old frame-pointer-value. */ + if (frame_pointer_needed) + { + if (offset > 255) + { + mmix_emit_sp_add (offset); + + stack_space_to_deallocate -= offset; + offset = 0; + } + + emit_move_insn (hard_frame_pointer_rtx, + gen_rtx_MEM (DImode, + plus_constant (stack_pointer_rtx, + offset))); + offset += 8; + } + + /* We do not need to restore pretended incoming args, just add back + offset to sp. */ + if (stack_space_to_deallocate != 0) + mmix_emit_sp_add (stack_space_to_deallocate); + + if (current_function_calls_eh_return) + /* Adjust the (normal) stack-pointer to that of the receiver. + FIXME: It would be nice if we could also adjust the register stack + here, but we need to express it through DWARF 2 too. */ + emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx, + gen_rtx_REG (DImode, + MMIX_EH_RETURN_STACKADJ_REGNUM))); + } + /* Output an optimal sequence for setting a register to a specific constant. Used in an alternative for const_ints in movdi, and when using large stack-frame offsets. *************** mmix_reg_or_8bit_operand (op, mode) *** 2832,2851 **** && CONST_OK_FOR_LETTER_P (INTVAL (op), 'I')); } - /* True if this is a register or an int 0..256. We include 256, - because it can be canonicalized into 255 for comparisons, which is - currently the only use of this predicate. - FIXME: Check that this happens and does TRT. */ - - int - mmix_reg_or_8bit_or_256_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return mmix_reg_or_8bit_operand (op, mode) - || (GET_CODE (op) == CONST_INT && INTVAL (op) == 256); - } - /* Returns zero if code and mode is not a valid condition from a compare-type insn. Nonzero if it is. The parameter op, if non-NULL, is the comparison of mode is CC-somethingmode. */ --- 2684,2689 ---- *************** mmix_gen_compare_reg (code, x, y) *** 2905,2912 **** if (! REG_P (x) && ! REG_P (y)) x = force_reg (mode, x); - CANONICALIZE_COMPARISON (code, x, y); - /* If it's not quite right yet, put y in a register. */ if (! REG_P (y) && (GET_CODE (y) != CONST_INT --- 2743,2748 ---- *************** mmix_gen_compare_reg (code, x, y) *** 2921,2926 **** --- 2757,2804 ---- /* Local (static) helper functions. */ + static void + mmix_emit_sp_add (offset) + HOST_WIDE_INT offset; + { + rtx insn; + + if (offset < 0) + { + /* Negative stack-pointer adjustments are allocations and appear in + the prologue only. We mark them as frame-related so unwind and + debug info is properly emitted for them. */ + if (offset > -255) + insn = emit_insn (gen_adddi3 (stack_pointer_rtx, + stack_pointer_rtx, + GEN_INT (offset))); + else + { + rtx tmpr = gen_rtx_REG (DImode, 255); + RTX_FRAME_RELATED_P (emit_move_insn (tmpr, GEN_INT (offset))) = 1; + insn = emit_insn (gen_adddi3 (stack_pointer_rtx, + stack_pointer_rtx, tmpr)); + } + RTX_FRAME_RELATED_P (insn) = 1; + } + else + { + /* Positive adjustments are in the epilogue only. Don't mark them + as "frame-related" for unwind info. */ + if (CONST_OK_FOR_LETTER_P (offset, 'L')) + emit_insn (gen_adddi3 (stack_pointer_rtx, + stack_pointer_rtx, + GEN_INT (offset))); + else + { + rtx tmpr = gen_rtx_REG (DImode, 255); + emit_move_insn (tmpr, GEN_INT (offset)); + insn = emit_insn (gen_adddi3 (stack_pointer_rtx, + stack_pointer_rtx, tmpr)); + } + } + } + /* Print operator suitable for doing something with a shiftable wyde. The type of operator is passed as an asm output modifier. */ *************** mmix_output_condition (stream, x, revers *** 3107,3119 **** {CCmode, cc_signed_convs}, {DImode, cc_di_convs}}; ! unsigned int i; int j; enum machine_mode mode = GET_MODE (XEXP (x, 0)); RTX_CODE cc = GET_CODE (x); ! for (i = 0; i < sizeof (cc_convs)/sizeof(*cc_convs); i++) { if (mode == cc_convs[i].cc_mode) { --- 2985,2997 ---- {CCmode, cc_signed_convs}, {DImode, cc_di_convs}}; ! size_t i; int j; enum machine_mode mode = GET_MODE (XEXP (x, 0)); RTX_CODE cc = GET_CODE (x); ! for (i = 0; i < ARRAY_SIZE (cc_convs); i++) { if (mode == cc_convs[i].cc_mode) { diff -Nrc3pad gcc-3.2.3/gcc/config/mmix/mmix.h gcc-3.3/gcc/config/mmix/mmix.h *** gcc-3.2.3/gcc/config/mmix/mmix.h 2002-04-09 00:12:50.000000000 +0000 --- gcc-3.3/gcc/config/mmix/mmix.h 2002-11-26 04:54:49.000000000 +0000 *************** *** 2,21 **** Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson (hp@bitrange.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ --- 2,21 ---- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson (hp@bitrange.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ *************** Boston, MA 02111-1307, USA. */ *** 47,55 **** #define MMIX_LAST_GENERAL_REGISTER 255 #define MMIX_INCOMING_RETURN_ADDRESS_REGNUM MMIX_rJ_REGNUM #define MMIX_HIMULT_REGNUM 258 ! #define MMIX_REMAINDER_REGNUM 260 #define MMIX_ARG_POINTER_REGNUM 261 ! #define MMIX_LAST_REGISTER_FILE_REGNUM 31 /* Four registers; "ideally, these registers should be call-clobbered", so just grab a bunch of the common clobbered registers. FIXME: Last --- 47,56 ---- #define MMIX_LAST_GENERAL_REGISTER 255 #define MMIX_INCOMING_RETURN_ADDRESS_REGNUM MMIX_rJ_REGNUM #define MMIX_HIMULT_REGNUM 258 ! #define MMIX_REMAINDER_REGNUM MMIX_rR_REGNUM #define MMIX_ARG_POINTER_REGNUM 261 ! #define MMIX_rO_REGNUM 262 ! #define MMIX_LAST_STACK_REGISTER_REGNUM 31 /* Four registers; "ideally, these registers should be call-clobbered", so just grab a bunch of the common clobbered registers. FIXME: Last *************** Boston, MA 02111-1307, USA. */ *** 82,96 **** /* Declarations for helper variables that are not tied to a particular target macro. */ ! extern struct rtx_def *mmix_compare_op0; ! extern struct rtx_def *mmix_compare_op1; /* Per-function machine data. This is normally an opaque type just defined and used in the tm.c file, but we need to see the definition in mmix.md too. */ ! struct machine_function { int has_landing_pad; }; /* For these target macros, there is no generic documentation here. You --- 83,99 ---- /* Declarations for helper variables that are not tied to a particular target macro. */ ! extern GTY(()) rtx mmix_compare_op0; ! extern GTY(()) rtx mmix_compare_op1; /* Per-function machine data. This is normally an opaque type just defined and used in the tm.c file, but we need to see the definition in mmix.md too. */ ! struct machine_function GTY(()) { int has_landing_pad; + int highest_saved_stack_register; + int in_prologue; }; /* For these target macros, there is no generic documentation here. You *************** struct machine_function *** 104,117 **** /* Node: Driver */ - /* When both ABI:s work, this is how we tell them apart in code. The - GNU abi is implied the default. Also implied in TARGET_DEFAULT. */ - #define CPP_SPEC \ - "%{mabi=gnu:-D__MMIX_ABI_GNU__\ - %{mabi=mmixware:\ - %eoptions -mabi=mmixware and -mabi=gnu are mutually exclusive}}\ - %{!mabi=gnu:-D__MMIX_ABI_MMIXWARE__}" - /* User symbols are in the same name-space as built-in symbols, but we don't need the built-in symbols, so remove those and instead apply stricter operand checking. Don't warn when expanding insns. */ --- 107,112 ---- *************** extern const char *mmix_cc1_ignored_opti *** 147,153 **** /* Node: Run-time Target */ /* Define __LONG_MAX__, since we're advised not to change glimits.h. */ ! #define CPP_PREDEFINES "-D__mmix__ -D__MMIX__ -D__LONG_MAX__=9223372036854775807L" extern int target_flags; --- 142,158 ---- /* Node: Run-time Target */ /* Define __LONG_MAX__, since we're advised not to change glimits.h. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__mmix__"); \ ! builtin_define ("__MMIX__"); \ ! if (TARGET_ABI_GNU) \ ! builtin_define ("__MMIX_ABI_GNU__"); \ ! else \ ! builtin_define ("__MMIX_ABI_MMIXWARE__"); \ ! } \ ! while (0) extern int target_flags; *************** extern int target_flags; *** 158,163 **** --- 163,169 ---- #define TARGET_MASK_KNUTH_DIVISION 16 #define TARGET_MASK_TOPLEVEL_SYMBOLS 32 #define TARGET_MASK_BRANCH_PREDICT 64 + #define TARGET_MASK_USE_RETURN_INSN 128 /* We use the term "base address" since that's what Knuth uses. The base address goes in a global register. When addressing, it's more like *************** extern int target_flags; *** 166,172 **** a constant pool in global registers, code offseting from those registers (automatically causing a request for a suitable constant base address register) without having to know the specific register or the ! specific offset. */ #define TARGET_MASK_BASE_ADDRESSES 128 /* FIXME: Get rid of this one. */ --- 172,180 ---- a constant pool in global registers, code offseting from those registers (automatically causing a request for a suitable constant base address register) without having to know the specific register or the ! specific offset. The setback is that there's a limited number of ! registers, and you'll not find out until link time whether you ! should've compiled with -mno-base-addresses. */ #define TARGET_MASK_BASE_ADDRESSES 128 /* FIXME: Get rid of this one. */ *************** extern int target_flags; *** 178,186 **** #define TARGET_TOPLEVEL_SYMBOLS (target_flags & TARGET_MASK_TOPLEVEL_SYMBOLS) #define TARGET_BRANCH_PREDICT (target_flags & TARGET_MASK_BRANCH_PREDICT) #define TARGET_BASE_ADDRESSES (target_flags & TARGET_MASK_BASE_ADDRESSES) #define TARGET_DEFAULT \ ! (TARGET_MASK_BRANCH_PREDICT | TARGET_MASK_BASE_ADDRESSES) /* FIXME: Provide a way to *load* the epsilon register. */ #define TARGET_SWITCHES \ --- 186,196 ---- #define TARGET_TOPLEVEL_SYMBOLS (target_flags & TARGET_MASK_TOPLEVEL_SYMBOLS) #define TARGET_BRANCH_PREDICT (target_flags & TARGET_MASK_BRANCH_PREDICT) #define TARGET_BASE_ADDRESSES (target_flags & TARGET_MASK_BASE_ADDRESSES) + #define TARGET_USE_RETURN_INSN (target_flags & TARGET_MASK_USE_RETURN_INSN) #define TARGET_DEFAULT \ ! (TARGET_MASK_BRANCH_PREDICT | TARGET_MASK_BASE_ADDRESSES \ ! | TARGET_MASK_USE_RETURN_INSN) /* FIXME: Provide a way to *load* the epsilon register. */ #define TARGET_SWITCHES \ *************** extern int target_flags; *** 215,220 **** --- 225,234 ---- N_("Use addresses that allocate global registers")}, \ {"no-base-addresses", -TARGET_MASK_BASE_ADDRESSES, \ N_("Do not use addresses that allocate global registers")}, \ + {"single-exit", -TARGET_MASK_USE_RETURN_INSN, \ + N_("Generate a single exit point for each function")}, \ + {"no-single-exit", TARGET_MASK_USE_RETURN_INSN, \ + N_("Do not generate a single exit point for each function")}, \ {"", TARGET_DEFAULT, ""}} /* Unfortunately, this must not reference anything in "mmix.c". */ *************** extern int target_flags; *** 247,262 **** /* Node: Storage Layout */ ! /* I see no bitfield instructions. Anyway, the common order is from low to high, as the power of two, hence little-endian. */ #define BITS_BIG_ENDIAN 0 #define BYTES_BIG_ENDIAN 1 #define WORDS_BIG_ENDIAN 1 #define FLOAT_WORDS_BIG_ENDIAN 1 - #define BITS_PER_UNIT 8 - #define BITS_PER_WORD 64 #define UNITS_PER_WORD 8 - #define POINTER_SIZE 64 /* FIXME: This macro is correlated to MAX_FIXED_MODE_SIZE in that e.g. this macro must not be 8 (default, UNITS_PER_WORD) when --- 261,273 ---- /* Node: Storage Layout */ ! /* I see no bit-field instructions. Anyway, the common order is from low to high, as the power of two, hence little-endian. */ #define BITS_BIG_ENDIAN 0 #define BYTES_BIG_ENDIAN 1 #define WORDS_BIG_ENDIAN 1 #define FLOAT_WORDS_BIG_ENDIAN 1 #define UNITS_PER_WORD 8 /* FIXME: This macro is correlated to MAX_FIXED_MODE_SIZE in that e.g. this macro must not be 8 (default, UNITS_PER_WORD) when *************** extern int target_flags; *** 351,363 **** /* Node: Register Basics */ /* We tell GCC about all 256 general registers, and we also include ! rD, rE, rH, rJ and rR (in that order) so we can describe what insns clobber them. We use a faked register for the argument pointer. It is always eliminated towards the frame-pointer or the stack-pointer, never output in assembly. Any fixed register would do for this, like $255, but future debugging is easier when using a separate register. It counts as a global register for pseudorandom reasons. */ ! #define FIRST_PSEUDO_REGISTER 262 /* We treat general registers with no assigned purpose as fixed. The stack pointer, $254, is also fixed. Register $255 is referred to as a --- 362,374 ---- /* Node: Register Basics */ /* We tell GCC about all 256 general registers, and we also include ! rD, rE, rH, rJ, rR and rO (in that order) so we can describe what insns clobber them. We use a faked register for the argument pointer. It is always eliminated towards the frame-pointer or the stack-pointer, never output in assembly. Any fixed register would do for this, like $255, but future debugging is easier when using a separate register. It counts as a global register for pseudorandom reasons. */ ! #define FIRST_PSEUDO_REGISTER 263 /* We treat general registers with no assigned purpose as fixed. The stack pointer, $254, is also fixed. Register $255 is referred to as a *************** extern int target_flags; *** 381,387 **** 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, \ ! 1, 1, 0, 0, 0, 1 \ } /* General registers are fixed and therefore "historically" marked --- 392,398 ---- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, \ ! 1, 1, 0, 0, 0, 1, 1 \ } /* General registers are fixed and therefore "historically" marked *************** extern int target_flags; *** 405,423 **** 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, \ ! 1, 1, 1, 1, 1, 1 \ } #define CONDITIONAL_REGISTER_USAGE mmix_conditional_register_usage () ! /* No LOCAL_REGNO, INCOMING_REGNO or OUTGOING_REGNO, since those macros ! are not usable for MMIX: it doesn't have a fixed register window size. ! FIXME: Perhaps we should say something about $0..$15 may sometimes be ! the incoming $16..$31. Those macros need better documentation; it ! looks like they're just bogus and that FUNCTION_INCOMING_ARG_REGNO_P ! and FUNCTION_OUTGOING_VALUE should be used where they're used. For the moment, do nothing; things seem to work anyway. */ /* Node: Allocation Order */ --- 416,438 ---- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, \ ! 1, 1, 1, 1, 1, 1, 1 \ } #define CONDITIONAL_REGISTER_USAGE mmix_conditional_register_usage () ! /* No INCOMING_REGNO or OUTGOING_REGNO, since those macros are not usable ! for MMIX: it doesn't have a fixed register window size. FIXME: Perhaps ! we should say something about $0..$15 may sometimes be the incoming ! $16..$31. Those macros need better documentation; it looks like ! they're just bogus and that FUNCTION_INCOMING_ARG_REGNO_P and ! FUNCTION_OUTGOING_VALUE should be used where they're used. For the moment, do nothing; things seem to work anyway. */ + /* Defining LOCAL_REGNO is necessary in presence of prologue/epilogue, + else GCC will be confused that those registers aren't saved and + restored. */ + #define LOCAL_REGNO(REGNO) mmix_local_regno (REGNO) /* Node: Allocation Order */ *************** extern int target_flags; *** 465,471 **** 232, 233, 234, 235, 236, 237, 238, 239, \ 240, 241, 242, 243, 244, 245, 246, \ \ ! 254, 255, 256, 257, 261 \ } /* As a convenience, we put this nearby, for ease of comparison. --- 480,486 ---- 232, 233, 234, 235, 236, 237, 238, 239, \ 240, 241, 242, 243, 244, 245, 246, \ \ ! 254, 255, 256, 257, 261, 262 \ } /* As a convenience, we put this nearby, for ease of comparison. *************** extern int target_flags; *** 520,526 **** 216, 217, 218, 219, 220, 221, 222, 223, \ 224, 225, 226, 227, 228, 229, 230, \ \ ! 254, 255, 256, 257, 261 \ } /* The default one. */ --- 535,541 ---- 216, 217, 218, 219, 220, 221, 222, 223, \ 224, 225, 226, 227, 228, 229, 230, \ \ ! 254, 255, 256, 257, 261, 262 \ } /* The default one. */ *************** enum reg_class *** 564,571 **** {~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 0x20}, \ {0, 0, 0, 0, 0, 0, 0, 0, 0x10}, \ {0, 0, 0, 0, 0, 0, 0, 0, 4}, \ ! {0, 0, 0, 0, 0, 0, 0, 0, 0x3f}, \ ! {~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 0x3f}} #define REGNO_REG_CLASS(REGNO) \ ((REGNO) <= MMIX_LAST_GENERAL_REGISTER \ --- 579,586 ---- {~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 0x20}, \ {0, 0, 0, 0, 0, 0, 0, 0, 0x10}, \ {0, 0, 0, 0, 0, 0, 0, 0, 4}, \ ! {0, 0, 0, 0, 0, 0, 0, 0, 0x7f}, \ ! {~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 0x7f}} #define REGNO_REG_CLASS(REGNO) \ ((REGNO) <= MMIX_LAST_GENERAL_REGISTER \ *************** enum reg_class *** 720,732 **** /* This *sounds* good, but does not seem to be implemented correctly to be a win; at least it wasn't in 2.7.2. FIXME: Check and perhaps ! replace with a big comment. */ ! #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 1 ! typedef struct { int regs; int lib; int now_varargs; } CUMULATIVE_ARGS; #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ ! ((CUM).regs = 0, (CUM).lib = ((LIBNAME) != 0), (CUM).now_varargs = 0) #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ((CUM).regs \ --- 735,752 ---- /* This *sounds* good, but does not seem to be implemented correctly to be a win; at least it wasn't in 2.7.2. FIXME: Check and perhaps ! replace with a big comment. ! The definition needs to match or be a subset of ! FUNCTION_ARG_PASS_BY_REFERENCE, since not all callers check that before ! usage. Watch lots of C++ test-cases fail if set to 1, for example ! g++.dg/init/byval1.C. */ ! #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ ! mmix_function_arg_pass_by_reference (&(CUM), MODE, TYPE, NAMED) ! typedef struct { int regs; int lib; } CUMULATIVE_ARGS; #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ ! ((CUM).regs = 0, (CUM).lib = ((LIBNAME) != 0)) #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ((CUM).regs \ *************** typedef struct { int regs; int lib; int *** 753,762 **** mmix_function_outgoing_value (VALTYPE, FUNC) #define LIBCALL_VALUE(MODE) \ ! gen_rtx_REG (MODE, MMIX_OUTGOING_RETURN_VALUE_REGNUM) #define FUNCTION_VALUE_REGNO_P(REGNO) \ ! ((REGNO) == MMIX_OUTGOING_RETURN_VALUE_REGNUM) /* Node: Aggregate Return */ --- 773,782 ---- mmix_function_outgoing_value (VALTYPE, FUNC) #define LIBCALL_VALUE(MODE) \ ! gen_rtx_REG (MODE, MMIX_RETURN_VALUE_REGNUM) #define FUNCTION_VALUE_REGNO_P(REGNO) \ ! mmix_function_value_regno_p (REGNO) /* Node: Aggregate Return */ *************** typedef struct { int regs; int lib; int *** 780,789 **** #define EPILOGUE_USES(REGNO) \ ((REGNO) == MMIX_INCOMING_RETURN_ADDRESS_REGNUM) - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - mmix_asm_output_mi_thunk (FILE, THUNK_FNDECL, DELTA, FUNCTION) - - /* Node: Profiling */ #define FUNCTION_PROFILER(FILE, LABELNO) \ mmix_function_profiler (FILE, LABELNO) --- 800,805 ---- *************** typedef struct { int regs; int lib; int *** 848,864 **** /* Node: Condition Code */ - #define EXTRA_CC_MODES \ - CC(CC_UNSmode, "CC_UNS") \ - CC(CC_FPmode, "CC_FP") \ - CC(CC_FPEQmode, "CC_FPEQ") \ - CC(CC_FUNmode, "CC_FUN") - #define SELECT_CC_MODE(OP, X, Y) \ mmix_select_cc_mode (OP, X, Y) ! #define CANONICALIZE_COMPARISON(CODE, OP0, OP1) \ ! mmix_canonicalize_comparison (&(CODE), &(OP0), &(OP1)); #define REVERSIBLE_CC_MODE(MODE) \ mmix_reversible_cc_mode (MODE) --- 864,879 ---- /* Node: Condition Code */ #define SELECT_CC_MODE(OP, X, Y) \ mmix_select_cc_mode (OP, X, Y) ! /* A definition of CANONICALIZE_COMPARISON that changed LE and GT ! comparisons with -1 to LT and GE respectively, and LT, LTU, GE or GEU ! comparisons with 256 to 255 and LE, LEU, GT and GTU has been ! ineffective; the code path for performing the changes did not trig for ! neither the GCC test-suite nor ghostscript-6.52 nor Knuth's mmix.tar.gz ! itself (core GCC functionality supposedly handling it) with sources ! from 2002-06-06. */ #define REVERSIBLE_CC_MODE(MODE) \ mmix_reversible_cc_mode (MODE) *************** typedef struct { int regs; int lib; int *** 907,947 **** #define DATA_SECTION_ASM_OP \ mmix_data_section_asm_op () ! /* Stuff copied from elfos.h. */ ! #define EXTRA_SECTIONS in_const ! ! #define EXTRA_SECTION_FUNCTIONS \ ! CONST_SECTION_FUNCTION ! ! #define READONLY_DATA_SECTION() const_section () ! ! #define CONST_SECTION_ASM_OP "\t.section\t.rodata" ! ! #define CONST_SECTION_FUNCTION \ ! void \ ! const_section () \ ! { \ ! if (in_section != in_const) \ ! { \ ! fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ ! in_section = in_const; \ ! } \ ! } ! ! #undef SELECT_RTX_SECTION ! #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) const_section () ! ! #define SELECT_SECTION(DECL, RELOC, ALIGN) \ ! mmix_select_section (DECL, RELOC, ALIGN) ! ! #define ENCODE_SECTION_INFO(DECL) \ ! mmix_encode_section_info (DECL) ! ! #define STRIP_NAME_ENCODING(VAR, SYM_NAME) \ ! (VAR) = mmix_strip_name_encoding (SYM_NAME) ! ! #define UNIQUE_SECTION(DECL, RELOC) \ ! mmix_unique_section (decl, reloc) /* Node: PIC */ /* (empty) */ --- 922,928 ---- #define DATA_SECTION_ASM_OP \ mmix_data_section_asm_op () ! #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata" /* Node: PIC */ /* (empty) */ *************** const_section () \ *** 1000,1007 **** #define ASM_DECLARE_REGISTER_GLOBAL(STREAM, DECL, REGNO, NAME) \ mmix_asm_declare_register_global (STREAM, DECL, REGNO, NAME) ! #define ASM_GLOBALIZE_LABEL(STREAM, NAME) \ ! mmix_asm_globalize_label (STREAM, NAME) #define ASM_WEAKEN_LABEL(STREAM, NAME) \ mmix_asm_weaken_label (STREAM, NAME) --- 981,987 ---- #define ASM_DECLARE_REGISTER_GLOBAL(STREAM, DECL, REGNO, NAME) \ mmix_asm_declare_register_global (STREAM, DECL, REGNO, NAME) ! #define GLOBAL_ASM_OP "\t.global " #define ASM_WEAKEN_LABEL(STREAM, NAME) \ mmix_asm_weaken_label (STREAM, NAME) *************** const_section () \ *** 1030,1042 **** #define ASM_OUTPUT_DEF(STREAM, NAME, VALUE) \ mmix_asm_output_def (STREAM, NAME, VALUE) - #define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(STREAM, SY, HI, LO) \ - mmix_asm_output_define_label_difference_symbol (STREAM, SY, HI, LO) - - /* Node: Macros for Initialization */ ! /* We're compiling to ELF and linking to MMO; all ELF features that GCC ! care for are there. FIXME: Are they? */ /* These must be constant strings, since they're used in crtstuff.c. */ #define INIT_SECTION_ASM_OP "\t.section .init,\"ax\" ! mmixal-incompatible" --- 1010,1018 ---- #define ASM_OUTPUT_DEF(STREAM, NAME, VALUE) \ mmix_asm_output_def (STREAM, NAME, VALUE) /* Node: Macros for Initialization */ ! /* We're compiling to ELF and linking to MMO; fundamental ELF features ! that GCC depend on are there. */ /* These must be constant strings, since they're used in crtstuff.c. */ #define INIT_SECTION_ASM_OP "\t.section .init,\"ax\" ! mmixal-incompatible" *************** const_section () \ *** 1084,1094 **** "$232", "$233", "$234", "$235", "$236", "$237", "$238", "$239", \ "$240", "$241", "$242", "$243", "$244", "$245", "$246", "$247", \ "$248", "$249", "$250", "$251", "$252", "$253", "$254", "$255", \ ! ":rD", ":rE", ":rH", ":rJ", ":rR", "ap_!BAD!"} #define ADDITIONAL_REGISTER_NAMES \ {{"sp", 254}, {":sp", 254}, {"rD", 256}, {"rE", 257}, \ ! {"rH", 258}, {"rJ", MMIX_rJ_REGNUM}} #define PRINT_OPERAND(STREAM, X, CODE) \ mmix_print_operand (STREAM, X, CODE) --- 1060,1070 ---- "$232", "$233", "$234", "$235", "$236", "$237", "$238", "$239", \ "$240", "$241", "$242", "$243", "$244", "$245", "$246", "$247", \ "$248", "$249", "$250", "$251", "$252", "$253", "$254", "$255", \ ! ":rD", ":rE", ":rH", ":rJ", ":rR", "ap_!BAD!", ":rO"} #define ADDITIONAL_REGISTER_NAMES \ {{"sp", 254}, {":sp", 254}, {"rD", 256}, {"rE", 257}, \ ! {"rH", 258}, {"rJ", MMIX_rJ_REGNUM}, {"rO", MMIX_rO_REGNUM}} #define PRINT_OPERAND(STREAM, X, CODE) \ mmix_print_operand (STREAM, X, CODE) *************** const_section () \ *** 1144,1163 **** /* Node: SDB and DWARF */ ! #define DWARF2_DEBUGGING_INFO #define DWARF2_ASM_LINE_DEBUG_INFO 1 - /* Node: Cross-compilation */ - - /* FIXME: I don't know whether it is best to tweak emit-rtl.c to handle - the case where sizeof (float) == word_size / 2 on the target, or to fix - real.h to define REAL_ARITHMETIC in that case. Anyway, it should be - documented that a target can define this to force emulation. Note that - we don't check #ifdef CROSS_COMPILE here; not even if mmix gets - self-hosted must we do that. Case gcc.c-torture/compile/930611-1.c. */ - #define REAL_ARITHMETIC - - /* Node: Misc */ #define PREDICATE_CODES \ --- 1120,1128 ---- /* Node: SDB and DWARF */ ! #define DWARF2_DEBUGGING_INFO 1 #define DWARF2_ASM_LINE_DEBUG_INFO 1 /* Node: Misc */ #define PREDICATE_CODES \ *************** const_section () \ *** 1174,1181 **** SUBREG, REG, PLUS}}, \ {"mmix_reg_or_constant_operand", \ {CONST_INT, CONST_DOUBLE, SUBREG, REG}}, \ - {"mmix_reg_or_8bit_or_256_operand", \ - {CONST_INT, CONST_DOUBLE, SUBREG, REG}}, \ {"mmix_reg_or_8bit_operand", \ {CONST_INT, CONST_DOUBLE, SUBREG, REG}}, \ {"mmix_reg_or_0_operand", \ --- 1139,1144 ---- *************** const_section () \ *** 1210,1225 **** #define FUNCTION_MODE QImode - /* When in due time we *will* have some specific headers. */ #define NO_IMPLICIT_EXTERN_C ! #define HANDLE_SYSV_PRAGMA /* These are checked. */ #define DOLLARS_IN_IDENTIFIERS 0 #define NO_DOLLAR_IN_LABEL #define NO_DOT_IN_LABEL #endif /* GCC_MMIX_H */ /* * Local variables: --- 1173,1191 ---- #define FUNCTION_MODE QImode #define NO_IMPLICIT_EXTERN_C ! #define HANDLE_SYSV_PRAGMA 1 /* These are checked. */ #define DOLLARS_IN_IDENTIFIERS 0 #define NO_DOLLAR_IN_LABEL #define NO_DOT_IN_LABEL + /* Calculate the highest used supposed saved stack register. */ + #define MACHINE_DEPENDENT_REORG(INSN) \ + mmix_machine_dependent_reorg (INSN) + #endif /* GCC_MMIX_H */ /* * Local variables: diff -Nrc3pad gcc-3.2.3/gcc/config/mmix/mmix.md gcc-3.3/gcc/config/mmix/mmix.md *** gcc-3.2.3/gcc/config/mmix/mmix.md 2002-04-03 02:23:07.000000000 +0000 --- gcc-3.3/gcc/config/mmix/mmix.md 2002-10-26 02:27:17.000000000 +0000 *************** *** 2,21 **** ;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Contributed by Hans-Peter Nilsson (hp@bitrange.com) ! ;; This file is part of GNU CC. ! ;; GNU CC is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ! ;; GNU CC is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ! ;; along with GNU CC; see the file COPYING. If not, write to ;; the Free Software Foundation, 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. --- 2,21 ---- ;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Contributed by Hans-Peter Nilsson (hp@bitrange.com) ! ;; This file is part of GCC. ! ;; GCC is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ! ;; GCC is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ! ;; along with GCC; see the file COPYING. If not, write to ;; the Free Software Foundation, 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. *************** *** 36,41 **** --- 36,42 ---- (define_constants [(MMIX_rJ_REGNUM 259) + (MMIX_rR_REGNUM 260) (MMIX_fp_rO_OFFSET -24)] ) *************** *** 241,248 **** ;; One day we might persuade GCC to expand divisions with constants the ;; way MMIX does; giving the remainder the sign of the divisor. But even ;; then, it might be good to have an option to divide the way "everybody ! ;; else" does. Perhaps then, this option can be on by default. Until ! ;; then, we do division and modulus in a library function. (define_insn "divmoddi4" [(set (match_operand:DI 0 "register_operand" "=r") --- 242,251 ---- ;; One day we might persuade GCC to expand divisions with constants the ;; way MMIX does; giving the remainder the sign of the divisor. But even ;; then, it might be good to have an option to divide the way "everybody ! ;; else" does. Perhaps then, this option can be on by default. However, ! ;; it's not likely to happen because major (C, C++, Fortran) language ! ;; standards in effect at 2002-04-29 reportedly demand that the sign of ! ;; the remainder must follow the sign of the dividend. (define_insn "divmoddi4" [(set (match_operand:DI 0 "register_operand" "=r") *************** *** 269,275 **** (div:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "register_operand" "r"))) (clobber (scratch:DI)) ! (clobber (scratch:DI))])] "! TARGET_KNUTH_DIVISION" "") --- 272,279 ---- (div:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "register_operand" "r"))) (clobber (scratch:DI)) ! (clobber (scratch:DI)) ! (clobber (reg:DI MMIX_rR_REGNUM))])] "! TARGET_KNUTH_DIVISION" "") *************** *** 280,286 **** (div:DI (match_operand:DI 1 "register_operand" "r,r") (match_operand:DI 2 "register_operand" "1,r"))) (clobber (match_scratch:DI 3 "=1,1")) ! (clobber (match_scratch:DI 4 "=2,2"))] "! TARGET_KNUTH_DIVISION" "@ SETL %0,1 --- 284,291 ---- (div:DI (match_operand:DI 1 "register_operand" "r,r") (match_operand:DI 2 "register_operand" "1,r"))) (clobber (match_scratch:DI 3 "=1,1")) ! (clobber (match_scratch:DI 4 "=2,2")) ! (clobber (reg:DI MMIX_rR_REGNUM))] "! TARGET_KNUTH_DIVISION" "@ SETL %0,1 *************** DIVU %0,%1,%2\;NEGU %1,0,%0\;CSN %0,$255 *** 293,299 **** (mod:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "register_operand" "r"))) (clobber (scratch:DI)) ! (clobber (scratch:DI))])] "! TARGET_KNUTH_DIVISION" "") --- 298,305 ---- (mod:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "register_operand" "r"))) (clobber (scratch:DI)) ! (clobber (scratch:DI)) ! (clobber (reg:DI MMIX_rR_REGNUM))])] "! TARGET_KNUTH_DIVISION" "") *************** DIVU %0,%1,%2\;NEGU %1,0,%0\;CSN %0,$255 *** 304,310 **** (mod:DI (match_operand:DI 1 "register_operand" "r,r") (match_operand:DI 2 "register_operand" "1,r"))) (clobber (match_scratch:DI 3 "=1,1")) ! (clobber (match_scratch:DI 4 "=2,2"))] "! TARGET_KNUTH_DIVISION" "@ SETL %0,0 --- 310,317 ---- (mod:DI (match_operand:DI 1 "register_operand" "r,r") (match_operand:DI 2 "register_operand" "1,r"))) (clobber (match_scratch:DI 3 "=1,1")) ! (clobber (match_scratch:DI 4 "=2,2")) ! (clobber (reg:DI MMIX_rR_REGNUM))] "! TARGET_KNUTH_DIVISION" "@ SETL %0,0 *************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\ *** 341,353 **** "" "NEGU %0,0,%1") - ;; FIXME: GCC should be able to synthesize this by itself as "0.0 - x". (define_expand "negdf2" [(set (match_operand:DF 0 "register_operand" "=r") ! (minus:DF (match_dup 2) ! (match_operand:DF 1 "register_operand" "r")))] "" ! "operands[2] = force_reg (DFmode, CONST0_RTX (DFmode));") ;; FIXME: define_expand for absdi2? --- 348,369 ---- "" "NEGU %0,0,%1") (define_expand "negdf2" + [(parallel [(set (match_operand:DF 0 "register_operand" "=r") + (neg:DF (match_operand:DF 1 "register_operand" "r"))) + (use (match_dup 2))])] + "" + { + /* Emit bit-flipping sequence to be IEEE-safe wrt. -+0. */ + operands[2] = force_reg (DImode, GEN_INT ((HOST_WIDE_INT) 1 << 63)); + }) + + (define_insn "*expanded_negdf2" [(set (match_operand:DF 0 "register_operand" "=r") ! (neg:DF (match_operand:DF 1 "register_operand" "r"))) ! (use (match_operand:DI 2 "register_operand" "r"))] "" ! "XOR %0,%1,%2") ;; FIXME: define_expand for absdi2? *************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\ *** 567,573 **** (define_insn "fixuns_truncdfdi2" [(set (match_operand:DI 0 "register_operand" "=r") (unsigned_fix:DI ! (unsigned_fix:DF (match_operand:DF 1 "register_operand" "r"))))] "" ;; ROUND_OFF "FIXU %0,1,%1") --- 583,589 ---- (define_insn "fixuns_truncdfdi2" [(set (match_operand:DI 0 "register_operand" "=r") (unsigned_fix:DI ! (fix:DF (match_operand:DF 1 "register_operand" "r"))))] "" ;; ROUND_OFF "FIXU %0,1,%1") *************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\ *** 986,992 **** in the call, and we set it back after every call (all but one setting will be optimized away), integrity is maintained. */ operands[3] ! = get_hard_reg_initial_val (Pmode, MMIX_INCOMING_RETURN_ADDRESS_REGNUM); /* FIXME: There's a bug in gcc which causes NULL to be passed as operand[2] when we get out of registers, which later confuses gcc. --- 1002,1009 ---- in the call, and we set it back after every call (all but one setting will be optimized away), integrity is maintained. */ operands[3] ! = mmix_get_hard_reg_initial_val (Pmode, ! MMIX_INCOMING_RETURN_ADDRESS_REGNUM); /* FIXME: There's a bug in gcc which causes NULL to be passed as operand[2] when we get out of registers, which later confuses gcc. *************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\ *** 1012,1018 **** in the call, and we set it back after every call (all but one setting will be optimized away), integrity is maintained. */ operands[4] ! = get_hard_reg_initial_val (Pmode, MMIX_INCOMING_RETURN_ADDRESS_REGNUM); /* FIXME: See 'call'. */ if (operands[3] == NULL_RTX) --- 1029,1036 ---- in the call, and we set it back after every call (all but one setting will be optimized away), integrity is maintained. */ operands[4] ! = mmix_get_hard_reg_initial_val (Pmode, ! MMIX_INCOMING_RETURN_ADDRESS_REGNUM); /* FIXME: See 'call'. */ if (operands[3] == NULL_RTX) *************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\ *** 1063,1072 **** PUSHGO $%p3,%a1") ;; I hope untyped_call and untyped_return are not needed for MMIX. ! ;; Users of Objective C will notice. ! ;; FIXME: Add "return" pattern where the epilogue is just "pop ! ;; 0,0" or similar. (define_insn "nop" [(const_int 0)] --- 1081,1111 ---- PUSHGO $%p3,%a1") ;; I hope untyped_call and untyped_return are not needed for MMIX. ! ;; Users of Objective-C will notice. ! ; Generated by GCC. ! (define_expand "return" ! [(return)] ! "mmix_use_simple_return ()" ! "") ! ! ; Generated by the epilogue expander. ! (define_insn "*expanded_return" ! [(return)] ! "" ! "POP %.,0") ! ! (define_expand "prologue" ! [(const_int 0)] ! "" ! "mmix_expand_prologue (); DONE;") ! ! ; Note that the (return) from the expander itself is always the last insn ! ; in the epilogue. ! (define_expand "epilogue" ! [(return)] ! "" ! "mmix_expand_epilogue ();") (define_insn "nop" [(const_int 0)] *************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\ *** 1107,1113 **** " { operands[0] ! = get_hard_reg_initial_val (Pmode, MMIX_INCOMING_RETURN_ADDRESS_REGNUM); /* Mark this function as containing a landing-pad. */ cfun->machine->has_landing_pad = 1; --- 1146,1153 ---- " { operands[0] ! = mmix_get_hard_reg_initial_val (Pmode, ! MMIX_INCOMING_RETURN_ADDRESS_REGNUM); /* Mark this function as containing a landing-pad. */ cfun->machine->has_landing_pad = 1; diff -Nrc3pad gcc-3.2.3/gcc/config/mmix/mmix-modes.def gcc-3.3/gcc/config/mmix/mmix-modes.def *** gcc-3.2.3/gcc/config/mmix/mmix-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/mmix/mmix-modes.def 2002-06-21 03:55:47.000000000 +0000 *************** *** 0 **** --- 1,50 ---- + /* Definitions of target machine for GNU compiler, for MMIX. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Hans-Peter Nilsson (hp@bitrange.com) + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Node: Condition Code */ + + /* Like other non-CC0 ports, MMIX need to code which combination of + comparison insn and branch insn or conditional-set insn to use into the + condition mode. The CC mode depends partly on which condition is used + and partly on the type of the operands. */ + + /* The "usual" CC mode is used for a signed operands integer comparison, + where the CMP insn is used and the result is (integer) -1, 0 or 1 for + respectively a < b, a == b and a > b. */ + + /* The CC_UNS mode is for an unsigned operands integer comparison using + the CMPU insn. Result values correspond to those in CCmode. */ + CC (CC_UNS) + + /* The CC_FP mode is for an non-equality floating-point comparison, using + the FCMP or FCMPE insn. The result is (integer) -1 or 1 for + espectively a < b and a > b, otherwise 0. */ + CC (CC_FP) + + /* The CC_FPEQ mode is for an equality floating-point comparison, using + the FEQL or FEQLE insn. The result is (integer) 1 for a == b, + otherwise 0 (including NaN:s). */ + CC (CC_FPEQ) + + /* The CC_FUN mode is for an ordering comparison, using the FUN or FUNE + insn. The result is (integer) 1 if a is unordered to b, otherwise the + result is 0. */ + CC (CC_FUN) diff -Nrc3pad gcc-3.2.3/gcc/config/mmix/mmix-protos.h gcc-3.3/gcc/config/mmix/mmix-protos.h *** gcc-3.2.3/gcc/config/mmix/mmix-protos.h 2002-01-10 01:23:07.000000000 +0000 --- gcc-3.3/gcc/config/mmix/mmix-protos.h 2002-10-26 18:06:01.000000000 +0000 *************** *** 2,21 **** Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson (hp@bitrange.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ --- 2,21 ---- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson (hp@bitrange.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ *************** extern int mmix_register_move_cost *** 33,39 **** PARAMS ((enum machine_mode, enum reg_class, enum reg_class)); extern const char *mmix_text_section_asm_op PARAMS ((void)); extern const char *mmix_data_section_asm_op PARAMS ((void)); - extern const char *mmix_strip_name_encoding PARAMS ((const char *)); extern void mmix_asm_file_start PARAMS ((FILE *)); extern void mmix_asm_file_end PARAMS ((FILE *)); extern void mmix_asm_output_source_filename PARAMS ((FILE *, const char *)); --- 33,38 ---- *************** extern void mmix_output_quoted_string PA *** 41,54 **** extern void mmix_asm_output_source_line PARAMS ((FILE *, int)); extern void mmix_asm_output_ascii PARAMS ((FILE *, const char *, int)); extern void mmix_asm_output_label PARAMS ((FILE *, const char *)); - extern void mmix_asm_globalize_label PARAMS ((FILE *, const char *)); extern void mmix_asm_weaken_label PARAMS ((FILE *, const char *)); extern void mmix_asm_output_labelref PARAMS ((FILE *, const char *)); extern void mmix_asm_output_internal_label PARAMS ((FILE *, const char *, int)); extern void mmix_asm_output_def PARAMS ((FILE *, const char *, const char *)); - extern void mmix_asm_output_define_label_difference_symbol - PARAMS ((FILE *, const char *, const char *, const char *)); extern int mmix_print_operand_punct_valid_p PARAMS ((int)); extern void mmix_asm_output_reg_push PARAMS ((FILE *, int)); extern void mmix_asm_output_reg_pop PARAMS ((FILE *, int)); --- 40,50 ---- *************** extern int mmix_shiftable_wyde_value PAR *** 58,82 **** extern void mmix_output_register_setting PARAMS ((FILE *, int, HOST_WIDEST_INT, int)); extern void mmix_conditional_register_usage PARAMS ((void)); extern int mmix_dbx_register_number PARAMS ((int)); ! ! /* Things that need rtl.h, tree.h or real.h included, or in combination. */ ! ! /* Need tree.h */ ! #ifdef TREE_CODE ! extern void mmix_make_decl_one_only PARAMS ((tree)); extern int mmix_function_arg_pass_by_reference PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern rtx mmix_function_outgoing_value PARAMS ((tree, tree)); extern int mmix_data_alignment PARAMS ((tree, int)); extern int mmix_constant_alignment PARAMS ((tree, int)); extern int mmix_local_alignment PARAMS ((tree, int)); extern void mmix_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int)); - extern void mmix_select_section PARAMS ((tree, int, int)); - extern void mmix_encode_section_info PARAMS ((tree)); - extern void mmix_unique_section PARAMS ((tree, int)); extern void mmix_asm_output_pool_prologue PARAMS ((FILE *, const char *, tree, int)); extern void mmix_asm_output_aligned_common --- 54,72 ---- extern void mmix_output_register_setting PARAMS ((FILE *, int, HOST_WIDEST_INT, int)); extern void mmix_conditional_register_usage PARAMS ((void)); + extern int mmix_local_regno PARAMS ((int)); extern int mmix_dbx_register_number PARAMS ((int)); ! extern int mmix_use_simple_return PARAMS ((void)); extern void mmix_make_decl_one_only PARAMS ((tree)); extern int mmix_function_arg_pass_by_reference PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern rtx mmix_function_outgoing_value PARAMS ((tree, tree)); + extern int mmix_function_value_regno_p PARAMS ((int)); extern int mmix_data_alignment PARAMS ((tree, int)); extern int mmix_constant_alignment PARAMS ((tree, int)); extern int mmix_local_alignment PARAMS ((tree, int)); extern void mmix_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int)); extern void mmix_asm_output_pool_prologue PARAMS ((FILE *, const char *, tree, int)); extern void mmix_asm_output_aligned_common *************** extern void mmix_asm_output_aligned_loca *** 85,102 **** PARAMS ((FILE *, const char *, int, int)); extern void mmix_asm_declare_register_global PARAMS ((FILE *, tree, int, const char *)); - extern void mmix_asm_output_mi_thunk PARAMS ((FILE *, tree, int, tree)); - - /* Need tree.h and rtl.h */ - # ifdef RTX_CODE extern rtx mmix_function_arg PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int, int)); extern rtx mmix_expand_builtin_va_arg PARAMS ((tree, tree)); - # endif /* RTX_CODE */ - #endif /* TREE_CODE */ - - /* Need rtl.h */ - #ifdef RTX_CODE extern void mmix_asm_output_addr_diff_elt PARAMS ((FILE *, rtx, int, int)); extern void mmix_asm_output_addr_vec_elt PARAMS ((FILE *, int)); extern enum reg_class mmix_preferred_reload_class --- 75,83 ---- *************** extern void mmix_initialize_trampoline P *** 116,135 **** extern int mmix_constant_address_p PARAMS ((rtx)); extern int mmix_legitimate_address PARAMS ((enum machine_mode, rtx, int)); extern int mmix_legitimate_constant_p PARAMS ((rtx)); - extern enum machine_mode mmix_select_cc_mode PARAMS ((RTX_CODE, rtx, rtx)); - extern void mmix_canonicalize_comparison PARAMS ((RTX_CODE *, rtx *, rtx *)); - extern int mmix_rtx_cost_recalculated - PARAMS ((rtx, RTX_CODE, RTX_CODE, int *)); extern int mmix_address_cost PARAMS ((rtx)); extern void mmix_print_operand PARAMS ((FILE *, rtx, int)); extern void mmix_print_operand_address PARAMS ((FILE *, rtx)); ! extern int mmix_valid_comparison PARAMS ((RTX_CODE, enum machine_mode, rtx)); ! extern rtx mmix_gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx)); ! #endif /* RTX_CODE */ ! extern int mmix_asm_preferred_eh_data_format PARAMS ((int, int)); extern void mmix_setup_frame_addresses PARAMS ((void)); /* * Local variables: * eval: (c-set-style "gnu") --- 97,122 ---- extern int mmix_constant_address_p PARAMS ((rtx)); extern int mmix_legitimate_address PARAMS ((enum machine_mode, rtx, int)); extern int mmix_legitimate_constant_p PARAMS ((rtx)); extern int mmix_address_cost PARAMS ((rtx)); extern void mmix_print_operand PARAMS ((FILE *, rtx, int)); extern void mmix_print_operand_address PARAMS ((FILE *, rtx)); ! extern void mmix_machine_dependent_reorg PARAMS ((rtx)); ! extern void mmix_expand_prologue PARAMS ((void)); ! extern void mmix_expand_epilogue PARAMS ((void)); ! extern rtx mmix_get_hard_reg_initial_val PARAMS ((enum machine_mode, int)); extern int mmix_asm_preferred_eh_data_format PARAMS ((int, int)); extern void mmix_setup_frame_addresses PARAMS ((void)); + #ifdef RTX_CODE + /* Needs to be ifdef:d for sake of enum rtx_code. */ + extern enum machine_mode mmix_select_cc_mode PARAMS ((enum rtx_code, rtx, rtx)); + extern void mmix_canonicalize_comparison PARAMS ((enum rtx_code *, rtx *, rtx *)); + extern int mmix_rtx_cost_recalculated + PARAMS ((rtx, enum rtx_code, enum rtx_code, int *)); + extern int mmix_valid_comparison PARAMS ((enum rtx_code, enum machine_mode, rtx)); + extern rtx mmix_gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx)); + #endif + /* * Local variables: * eval: (c-set-style "gnu") diff -Nrc3pad gcc-3.2.3/gcc/config/mmix/t-mmix gcc-3.3/gcc/config/mmix/t-mmix *** gcc-3.2.3/gcc/config/mmix/t-mmix 2002-04-09 00:12:50.000000000 +0000 --- gcc-3.3/gcc/config/mmix/t-mmix 2002-07-01 21:21:37.000000000 +0000 *************** *** 1,10 **** # See "Target Fragment" in GCC info. That same order is used here. - LIBGCC1 = - - # libgcc1-test doesn't work. There's critical stuff in crti and crtn and - # we know the result of running libgcc1-test anyway. - LIBGCC1_TEST = - CROSS_LIBGCC1 = TARGET_LIBGCC2_CFLAGS = -mlibfuncs -O2 --- 1,4 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mn10200/mn10200.c gcc-3.3/gcc/config/mn10200/mn10200.c *** gcc-3.2.3/gcc/config/mn10200/mn10200.c 2002-01-03 05:04:31.000000000 +0000 --- gcc-3.3/gcc/config/mn10200/mn10200.c 2002-09-20 23:46:57.000000000 +0000 *************** asm_file_start (file) *** 85,92 **** else fprintf (file, "\n\n"); output_file_directive (file, main_input_filename); - ggc_add_rtx_root (&zero_dreg, 1); - ggc_add_rtx_root (&zero_areg, 1); } /* Print operand X using operand code CODE to assembly language output file --- 85,90 ---- *************** expand_prologue () *** 692,704 **** } /* Now put the static chain back where the rest of the function ! expects to find it. */ if (current_function_needs_context) { ! emit_move_insn (gen_rtx_REG (PSImode, STATIC_CHAIN_REGNUM), ! gen_rtx (MEM, PSImode, ! gen_rtx_PLUS (PSImode, stack_pointer_rtx, ! GEN_INT (size)))); } } --- 690,712 ---- } /* Now put the static chain back where the rest of the function ! expects to find it. ! ! Note that we may eliminate all references to this later, so we ! mark the static chain as maybe dead. */ if (current_function_needs_context) { ! rtx insn; ! ! insn = emit_move_insn (gen_rtx_REG (PSImode, STATIC_CHAIN_REGNUM), ! gen_rtx (MEM, PSImode, ! gen_rtx_PLUS (PSImode, ! stack_pointer_rtx, ! GEN_INT (size)))); ! REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, ! const0_rtx, ! REG_NOTES (insn)); ! } } *************** expand_epilogue () *** 714,723 **** size = total_frame_size (); if (DECL_RESULT (current_function_decl) ! && DECL_RTL (DECL_RESULT (current_function_decl)) ! && REG_P (DECL_RTL (DECL_RESULT (current_function_decl)))) ! temp_regno = (REGNO (DECL_RTL (DECL_RESULT (current_function_decl))) == 4 ! ? 0 : 4); else temp_regno = 4; --- 722,729 ---- size = total_frame_size (); if (DECL_RESULT (current_function_decl) ! && POINTER_TYPE_P (TREE_TYPE (DECL_RESULT (current_function_decl)))) ! temp_regno = 0; else temp_regno = 4; *************** secondary_reload_class (class, mode, in, *** 937,943 **** The basic shift methods: ! * loop shifts -- emit a loop using one (or two on H8/S) bit shifts; this is the default. SHIFT_LOOP * inlined shifts -- emit straight line code for the shift; this is --- 943,949 ---- The basic shift methods: ! * loop shifts -- emit a loop using one (or two on H8S) bit shifts; this is the default. SHIFT_LOOP * inlined shifts -- emit straight line code for the shift; this is diff -Nrc3pad gcc-3.2.3/gcc/config/mn10200/mn10200.h gcc-3.3/gcc/config/mn10200/mn10200.h *** gcc-3.2.3/gcc/config/mn10200/mn10200.h 2002-01-08 22:51:38.000000000 +0000 --- gcc-3.3/gcc/config/mn10200/mn10200.h 2002-08-20 23:27:02.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-D__mn10200__ -D__MN10200__ -D__LONG_MAX__=2147483647L -D__LONG_LONG_MAX__=2147483647L -D__INT_MAX__=32767" /* Run-time compilation parameters selecting different hardware subsets. */ --- 32,38 ---- /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-D__mn10200__ -D__MN10200__" /* Run-time compilation parameters selecting different hardware subsets. */ *************** extern int target_flags; *** 81,99 **** This is not true on the Matsushita MN10200. */ #define WORDS_BIG_ENDIAN 0 ! /* Number of bits in an addressable storage unit */ ! #define BITS_PER_UNIT 8 ! ! /* Width in bits of a "word", which is the contents of a machine register. ! Note that this is not necessarily the width of data type `int'; ! if using 16-bit ints on a 68000, this would still be 32. ! But on a machine with 16-bit registers, this would be 16. ! ! This is a white lie. Registers are really 24bits, but most operations only operate on 16 bits. GCC chokes badly if we set this to a value that is not a power of two. */ - #define BITS_PER_WORD 16 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 2 --- 81,89 ---- This is not true on the Matsushita MN10200. */ #define WORDS_BIG_ENDIAN 0 ! /* This is a white lie. Registers are really 24bits, but most operations only operate on 16 bits. GCC chokes badly if we set this to a value that is not a power of two. */ /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 2 *************** enum reg_class { *** 428,434 **** #undef SIZE_TYPE #undef PTRDIFF_TYPE #define SIZE_TYPE "long unsigned int" ! #define PTRDIFF_TYPE "long unsigned int" /* Note sizeof (WCHAR_TYPE) must be equal to the value of WCHAR_TYPE_SIZE! */ #undef WCHAR_TYPE --- 418,424 ---- #undef SIZE_TYPE #undef PTRDIFF_TYPE #define SIZE_TYPE "long unsigned int" ! #define PTRDIFF_TYPE "long int" /* Note sizeof (WCHAR_TYPE) must be equal to the value of WCHAR_TYPE_SIZE! */ #undef WCHAR_TYPE *************** struct cum_arg { int nbytes; }; *** 824,851 **** #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE, NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! do { \ ! const char* real_name; \ ! STRIP_NAME_ENCODING (real_name, (NAME)); \ ! fprintf (FILE, "_%s", real_name); \ ! } while (0) /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. --- 814,828 ---- #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global " /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! fprintf (FILE, "_%s", (*targetm.strip_name_encoding) (NAME)) /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. *************** struct cum_arg { int nbytes; }; *** 886,892 **** /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! asm_fprintf (FILE, "\t%s .L%d\n", ".long", VALUE) /* This is how to output an element of a case-vector that is relative. */ --- 863,869 ---- /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! fprintf (FILE, "\t%s .L%d\n", ".long", VALUE) /* This is how to output an element of a case-vector that is relative. */ *************** struct cum_arg { int nbytes; }; *** 925,934 **** ((GET_CODE (X) == PLUS ? OFFSET : 0) \ + (frame_pointer_needed ? 0 : -total_frame_size ())) - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ #define CASE_VECTOR_MODE Pmode --- 902,907 ---- *************** struct cum_arg { int nbytes; }; *** 1001,1005 **** SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM }}, \ {"nshift_operator", { ASHIFTRT, LSHIFTRT, ASHIFT }}, ! extern struct rtx_def *zero_dreg; ! extern struct rtx_def *zero_areg; --- 974,978 ---- SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM }}, \ {"nshift_operator", { ASHIFTRT, LSHIFTRT, ASHIFT }}, ! extern GTY(()) rtx zero_dreg; ! extern GTY(()) rtx zero_areg; diff -Nrc3pad gcc-3.2.3/gcc/config/mn10300/mn10300.c gcc-3.3/gcc/config/mn10300/mn10300.c *** gcc-3.2.3/gcc/config/mn10300/mn10300.c 2001-12-17 15:05:35.000000000 +0000 --- gcc-3.3/gcc/config/mn10300/mn10300.c 2003-02-14 21:50:18.000000000 +0000 *************** *** 1,5 **** /* Subroutines for insn-output.c for Matsushita MN10300 series ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). --- 1,5 ---- /* Subroutines for insn-output.c for Matsushita MN10300 series ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). *************** print_operand (file, x, code) *** 264,270 **** break; case 'N': ! output_address (GEN_INT ((~INTVAL (x)) & 0xff)); break; /* For shift counts. The hardware ignores the upper bits of --- 264,278 ---- break; case 'N': ! if (INTVAL (x) < -128 || INTVAL (x) > 255) ! abort (); ! fprintf (file, "%d", (int)((~INTVAL (x)) & 0xff)); ! break; ! ! case 'U': ! if (INTVAL (x) < -128 || INTVAL (x) > 255) ! abort (); ! fprintf (file, "%d", (int)(INTVAL (x) & 0xff)); break; /* For shift counts. The hardware ignores the upper bits of *************** print_operand (file, x, code) *** 274,280 **** case 'S': if (GET_CODE (x) == CONST_INT) { ! fprintf (file, "%d", INTVAL (x) & 0x1f); break; } /* FALL THROUGH */ --- 282,288 ---- case 'S': if (GET_CODE (x) == CONST_INT) { ! fprintf (file, "%d", (int)(INTVAL (x) & 0x1f)); break; } /* FALL THROUGH */ *************** expand_prologue () *** 525,542 **** size = get_frame_size () + current_function_outgoing_args_size; size += (current_function_outgoing_args_size ? 4 : 0); - /* If this is an old-style varargs function, then its arguments - need to be flushed back to the stack. */ - if (current_function_varargs) - { - emit_move_insn (gen_rtx_MEM (SImode, - plus_constant (stack_pointer_rtx, 4)), - gen_rtx_REG (SImode, 0)); - emit_move_insn (gen_rtx_MEM (SImode, - plus_constant (stack_pointer_rtx, 8)), - gen_rtx_REG (SImode, 1)); - } - /* If we use any of the callee-saved registers, save them now. */ mn10300_gen_multiple_store (mn10300_get_live_callee_saved_regs ()); --- 533,538 ---- *************** notice_update_cc (body, insn) *** 659,665 **** } } ! /* Recognise the PARALLEL rtx generated by mn10300_gen_multiple_store(). This function is for MATCH_PARALLEL and so assumes OP is known to be parallel. If OP is a multiple store, return a mask indicating which registers it saves. Return 0 otherwise. */ --- 655,661 ---- } } ! /* Recognize the PARALLEL rtx generated by mn10300_gen_multiple_store(). This function is for MATCH_PARALLEL and so assumes OP is known to be parallel. If OP is a multiple store, return a mask indicating which registers it saves. Return 0 otherwise. */ *************** mn10300_builtin_saveregs () *** 886,900 **** } void ! mn10300_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg; { ! if (stdarg_p) ! nextarg = expand_builtin_saveregs (); ! ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); } rtx --- 882,893 ---- } void ! mn10300_va_start (valist, nextarg) tree valist; rtx nextarg; { ! nextarg = expand_builtin_saveregs (); ! std_expand_builtin_va_start (valist, nextarg); } rtx *************** mn10300_address_cost (x, unsig) *** 1329,1331 **** --- 1322,1372 ---- } } + + /* Check whether a constant used to initialize a DImode or DFmode can + use a clr instruction. The code here must be kept in sync with + movdf and movdi. */ + + bool + mn10300_wide_const_load_uses_clr (operands) + rtx operands[2]; + { + long val[2]; + + if (GET_CODE (operands[0]) != REG + || REGNO_REG_CLASS (REGNO (operands[0])) != DATA_REGS) + return false; + + switch (GET_CODE (operands[1])) + { + case CONST_INT: + { + rtx low, high; + split_double (operands[1], &low, &high); + val[0] = INTVAL (low); + val[1] = INTVAL (high); + } + break; + + case CONST_DOUBLE: + if (GET_MODE (operands[1]) == DFmode) + { + REAL_VALUE_TYPE rv; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); + REAL_VALUE_TO_TARGET_DOUBLE (rv, val); + } + else if (GET_MODE (operands[1]) == VOIDmode + || GET_MODE (operands[1]) == DImode) + { + val[0] = CONST_DOUBLE_LOW (operands[1]); + val[1] = CONST_DOUBLE_HIGH (operands[1]); + } + break; + + default: + return false; + } + + return val[0] == 0 || val[1] == 0; + } diff -Nrc3pad gcc-3.2.3/gcc/config/mn10300/mn10300.h gcc-3.3/gcc/config/mn10300/mn10300.h *** gcc-3.2.3/gcc/config/mn10300/mn10300.h 2002-01-08 22:51:38.000000000 +0000 --- gcc-3.3/gcc/config/mn10300/mn10300.h 2002-12-13 23:07:47.000000000 +0000 *************** extern int target_flags; *** 90,111 **** This is not true on the Matsushita MN10300. */ #define WORDS_BIG_ENDIAN 0 - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 --- 90,98 ---- *************** struct cum_arg {int nbytes; }; *** 661,668 **** #define EXPAND_BUILTIN_SAVEREGS() mn10300_builtin_saveregs () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! mn10300_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 648,655 ---- #define EXPAND_BUILTIN_SAVEREGS() mn10300_builtin_saveregs () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! mn10300_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** struct cum_arg {int nbytes; }; *** 691,699 **** --- 678,694 ---- && GET_CODE (XEXP (XEXP (OP, 0), 1)) == CONST_INT \ && INT_8_BITS (INTVAL (XEXP (XEXP (OP, 0), 1)))))) + #define OK_FOR_T(OP) \ + (GET_CODE (OP) == MEM \ + && GET_MODE (OP) == QImode \ + && (GET_CODE (XEXP (OP, 0)) == REG \ + && REG_OK_FOR_BIT_BASE_P (XEXP (OP, 0)) \ + && XEXP (OP, 0) != stack_pointer_rtx)) + #define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'R' ? OK_FOR_R (OP) \ : (C) == 'S' ? GET_CODE (OP) == SYMBOL_REF \ + : (C) == 'T' ? OK_FOR_T (OP) \ : 0) /* Maximum number of registers that can appear in a valid memory address. */ *************** struct cum_arg {int nbytes; }; *** 908,935 **** #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE, NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! do { \ ! const char* real_name; \ ! STRIP_NAME_ENCODING (real_name, (NAME)); \ ! fprintf (FILE, "_%s", real_name); \ ! } while (0) /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. --- 903,917 ---- #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global " /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! fprintf (FILE, "_%s", (*targetm.strip_name_encoding) (NAME)) /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. *************** struct cum_arg {int nbytes; }; *** 979,985 **** /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! asm_fprintf (FILE, "\t%s .L%d\n", ".long", VALUE) /* This is how to output an element of a case-vector that is relative. */ --- 961,967 ---- /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! fprintf (FILE, "\t%s .L%d\n", ".long", VALUE) /* This is how to output an element of a case-vector that is relative. */ *************** struct cum_arg {int nbytes; }; *** 1022,1031 **** + (frame_pointer_needed \ ? 0 : -initial_offset (ARG_POINTER_REGNUM, STACK_POINTER_REGNUM))) - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ #define CASE_VECTOR_MODE Pmode --- 1004,1009 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/mn10300/mn10300.md gcc-3.3/gcc/config/mn10300/mn10300.md *** gcc-3.2.3/gcc/config/mn10300/mn10300.md 2001-05-03 18:41:29.000000000 +0000 --- gcc-3.3/gcc/config/mn10300/mn10300.md 2003-02-14 21:50:18.000000000 +0000 *************** *** 1,5 **** ;; GCC machine description for Matsushita MN10300 ! ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 ;; Free Software Foundation, Inc. ;; Contributed by Jeff Law (law@cygnus.com). --- 1,5 ---- ;; GCC machine description for Matsushita MN10300 ! ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ;; Free Software Foundation, Inc. ;; Contributed by Jeff Law (law@cygnus.com). *************** *** 520,526 **** abort (); } }" ! [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) (define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") --- 520,545 ---- abort (); } }" ! [(set (attr "cc") ! (cond ! [ ! (lt (symbol_ref "which_alternative") (const_int 2) ! ) (const_string "none") ! (eq (symbol_ref "which_alternative") (const_int 2) ! ) (const_string "clobber") ! (eq (symbol_ref "which_alternative") (const_int 3) ! ) (if_then_else ! (ne (symbol_ref "rtx_equal_p (operands[0], operands[1])") ! (const_int 0)) (const_string "clobber") ! (const_string "none_0hit")) ! (ior (eq (symbol_ref "which_alternative") (const_int 8)) ! (eq (symbol_ref "which_alternative") (const_int 9)) ! ) (if_then_else ! (ne (symbol_ref "mn10300_wide_const_load_uses_clr ! (operands)") ! (const_int 0)) (const_string "clobber") ! (const_string "none_0hit")) ! ] (const_string "none_0hit")))]) (define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") *************** *** 670,676 **** abort (); } }" ! [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) --- 689,714 ---- abort (); } }" ! [(set (attr "cc") ! (cond ! [ ! (lt (symbol_ref "which_alternative") (const_int 2) ! ) (const_string "none") ! (eq (symbol_ref "which_alternative") (const_int 2) ! ) (const_string "clobber") ! (eq (symbol_ref "which_alternative") (const_int 3) ! ) (if_then_else ! (ne (symbol_ref "rtx_equal_p (operands[0], operands[1])") ! (const_int 0)) (const_string "clobber") ! (const_string "none_0hit")) ! (ior (eq (symbol_ref "which_alternative") (const_int 8)) ! (eq (symbol_ref "which_alternative") (const_int 9)) ! ) (if_then_else ! (ne (symbol_ref "mn10300_wide_const_load_uses_clr ! (operands)") ! (const_int 0)) (const_string "clobber") ! (const_string "none_0hit")) ! ] (const_string "none_0hit")))]) *************** *** 1258,1273 **** [(set_attr "cc" "clobber,set_znv")]) (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "+R,d") (subreg:QI (ior:SI (subreg:SI (match_dup 0) 0) (match_operand:SI 1 "const_int_operand" "i,i")) 0))] "" "@ ! bset %1,%A0 or %1,%0" [(set_attr "cc" "clobber,set_znv")]) (define_insn "" [(set (cc0) (zero_extract:SI (match_operand:SI 0 "register_operand" "dx") --- 1296,1360 ---- [(set_attr "cc" "clobber,set_znv")]) (define_insn "" + [(set (match_operand:QI 0 "memory_operand" "=R,T") + (and:QI + (match_dup 0) + (not:QI (match_operand:QI 1 "nonmemory_operand" "i,d"))))] + "" + "@ + bclr %U1,%A0 + bclr %1,%0" + [(set_attr "cc" "clobber,clobber")]) + + (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "+R,d") (subreg:QI (ior:SI (subreg:SI (match_dup 0) 0) (match_operand:SI 1 "const_int_operand" "i,i")) 0))] "" "@ ! bset %U1,%A0 or %1,%0" [(set_attr "cc" "clobber,set_znv")]) + (define_expand "iorqi3" + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (ior:QI (match_operand:QI 1 "nonimmediate_operand" "") + (match_operand:QI 2 "nonmemory_operand" "")))] + "" + "") + + (define_insn "" + [(set (match_operand:QI 0 "nonimmediate_operand" "=R,T,r") + (ior:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0,0") + ;; This constraint should really be nonmemory_operand, + ;; but making it general_operand, along with the + ;; condition that not both input operands are MEMs, it + ;; here helps combine do a better job. + (match_operand:QI 2 "general_operand" "i,d,ir")))] + "TARGET_AM33 && + (GET_CODE (operands[2]) != MEM || GET_CODE (operands[1]) != MEM)" + "@ + bset %U2,%A0 + bset %2,%0 + or %2,%0" + [(set_attr "cc" "clobber,clobber,set_znv")]) + + (define_insn "" + [(set (match_operand:QI 0 "nonimmediate_operand" "=R,T,d") + (ior:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0,0") + ;; This constraint should really be nonmemory_operand, + ;; but making it general_operand, along with the + ;; condition that not both input operands are MEMs, it + ;; here helps combine do a better job. + (match_operand:QI 2 "general_operand" "i,d,id")))] + "GET_CODE (operands[2]) != MEM || GET_CODE (operands[1]) != MEM" + "@ + bset %U2,%A0 + bset %2,%0 + or %2,%0" + [(set_attr "cc" "clobber,clobber,set_znv")]) + (define_insn "" [(set (cc0) (zero_extract:SI (match_operand:SI 0 "register_operand" "dx") *************** *** 1335,1341 **** if (GET_CODE (operands[0]) == REG) output_asm_insn (\"btst %1,%0\", xoperands); else ! output_asm_insn (\"btst %1,%A0\", xoperands); return \"\"; }" [(set_attr "cc" "clobber")]) --- 1422,1428 ---- if (GET_CODE (operands[0]) == REG) output_asm_insn (\"btst %1,%0\", xoperands); else ! output_asm_insn (\"btst %U1,%A0\", xoperands); return \"\"; }" [(set_attr "cc" "clobber")]) *************** *** 1354,1360 **** (match_operand:SI 1 "const_8bit_operand" "")))] "" "@ ! btst %1,%A0 btst %1,%0" [(set_attr "cc" "clobber")]) --- 1441,1447 ---- (match_operand:SI 1 "const_8bit_operand" "")))] "" "@ ! btst %U1,%A0 btst %1,%0" [(set_attr "cc" "clobber")]) diff -Nrc3pad gcc-3.2.3/gcc/config/mn10300/mn10300-protos.h gcc-3.3/gcc/config/mn10300/mn10300-protos.h *** gcc-3.2.3/gcc/config/mn10300/mn10300-protos.h 2001-11-04 02:12:12.000000000 +0000 --- gcc-3.3/gcc/config/mn10300/mn10300-protos.h 2003-02-14 21:50:17.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. Matsushita MN10300 series ! Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. Matsushita MN10300 series ! Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 22,28 **** #ifdef RTX_CODE #ifdef TREE_CODE ! extern void mn10300_va_start PARAMS ((int, tree, rtx)); #endif /* TREE_CODE */ extern struct rtx_def *legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); --- 22,28 ---- #ifdef RTX_CODE #ifdef TREE_CODE ! extern void mn10300_va_start PARAMS ((tree, rtx)); #endif /* TREE_CODE */ extern struct rtx_def *legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); *************** extern int impossible_plus_operand PARAM *** 42,47 **** --- 42,49 ---- extern int const_8bit_operand PARAMS ((rtx, enum machine_mode)); extern int mn10300_address_cost PARAMS ((rtx, int *)); + + extern bool mn10300_wide_const_load_uses_clr PARAMS ((rtx operands[2])); #endif /* RTX_CODE */ #ifdef TREE_CODE *************** extern void expand_epilogue PARAMS ((voi *** 59,62 **** extern int initial_offset PARAMS ((int, int)); extern int can_use_return_insn PARAMS ((void)); extern int mask_ok_for_mem_btst PARAMS ((int, int)); - --- 61,63 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/netbsd-aout.h gcc-3.3/gcc/config/netbsd-aout.h *** gcc-3.2.3/gcc/config/netbsd-aout.h 2002-01-28 16:25:14.000000000 +0000 --- gcc-3.3/gcc/config/netbsd-aout.h 2002-09-29 13:16:44.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,25 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* This defines which switch letters take arguments. */ #undef SWITCH_TAKES_ARG #define SWITCH_TAKES_ARG(CHAR) \ --- 19,33 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* TARGET_OS_CPP_BUILTINS() common to all NetBSD a.out targets. */ ! #define NETBSD_OS_CPP_BUILTINS_AOUT() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_COMMON(); \ ! } \ ! while (0) ! ! /* This defines which switch letters take arguments. */ #undef SWITCH_TAKES_ARG #define SWITCH_TAKES_ARG(CHAR) \ *************** Boston, MA 02111-1307, USA. */ *** 50,57 **** /* Provide a LINK_SPEC appropriate for NetBSD a.out. Here we provide support for the special GCC options -static, -assert, and -nostdlib. */ ! #undef LINK_SPEC ! #define LINK_SPEC \ "%{nostdlib:-nostdlib} \ %{!shared: \ %{!nostdlib: \ --- 58,65 ---- /* Provide a LINK_SPEC appropriate for NetBSD a.out. Here we provide support for the special GCC options -static, -assert, and -nostdlib. */ ! #undef NETBSD_LINK_SPEC_AOUT ! #define NETBSD_LINK_SPEC_AOUT \ "%{nostdlib:-nostdlib} \ %{!shared: \ %{!nostdlib: \ *************** Boston, MA 02111-1307, USA. */ *** 63,68 **** --- 71,79 ---- %{R*} \ %{assert*}" + /* Default LINK_SPEC. */ + #undef LINK_SPEC + #define LINK_SPEC NETBSD_LINK_SPEC_AOUT /* Some imports from svr4.h in support of shared libraries. */ *************** Boston, MA 02111-1307, USA. */ *** 127,137 **** #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do \ { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ASM_OUTPUT_LABEL(FILE, NAME); \ } \ --- 138,144 ---- #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do \ { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ASM_OUTPUT_LABEL(FILE, NAME); \ } \ *************** Boston, MA 02111-1307, USA. */ *** 140,168 **** /* Write the extra assembler code needed to declare an object properly. */ ! #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ ! } \ ! ASM_OUTPUT_LABEL(FILE, NAME); \ ! } \ while (0) - /* Output the size directive for a decl in rest_of_decl_compilation in the case where we did not do so before the initializer. Once we find the error_mark_node, we know that the value of --- 147,172 ---- /* Write the extra assembler code needed to declare an object properly. */ ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do \ ! { \ ! HOST_WIDE_INT size; \ ! \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive \ ! && (DECL) && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ ! } \ ! \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ ! } \ while (0) /* Output the size directive for a decl in rest_of_decl_compilation in the case where we did not do so before the initializer. Once we find the error_mark_node, we know that the value of *************** Boston, MA 02111-1307, USA. */ *** 174,189 **** do \ { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, ",%d\n", \ ! int_size_in_bytes (TREE_TYPE (DECL))); \ } \ } \ while (0) --- 178,192 ---- do \ { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } \ while (0) *************** Boston, MA 02111-1307, USA. */ *** 196,214 **** do \ { \ if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno; \ ! labelno++; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ","); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ } \ while (0) --- 199,204 ---- do \ { \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } \ while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/netbsd-elf.h gcc-3.3/gcc/config/netbsd-elf.h *** gcc-3.2.3/gcc/config/netbsd-elf.h 2002-01-22 04:23:02.000000000 +0000 --- gcc-3.3/gcc/config/netbsd-elf.h 2002-11-26 00:31:31.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,24 **** --- 19,32 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* TARGET_OS_CPP_BUILTINS() common to all NetBSD ELF targets. */ + #define NETBSD_OS_CPP_BUILTINS_ELF() \ + do \ + { \ + NETBSD_OS_CPP_BUILTINS_COMMON(); \ + builtin_define ("__ELF__"); \ + } \ + while (0) /* This defines which switch letters take arguments. On NetBSD, most of the normal cases (defined by gcc.c) apply, and we also have -h* *************** Boston, MA 02111-1307, USA. */ *** 38,76 **** of the support for getting C++ file-scope static objects constructed before entering "main". */ ! #undef STARTFILE_SPEC ! #define STARTFILE_SPEC \ "%{!shared: \ %{pg:gcrt0%O%s} \ %{!pg: \ %{p:gcrt0%O%s} \ %{!p:crt0%O%s}}} \ ! %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}" /* Provide an ENDFILE_SPEC appropriate for NetBSD ELF. Here we add crtend.o, which provides part of the support for getting C++ file-scope static objects deconstructed after exiting "main". */ ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC \ ! "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" /* Provide a LINK_SPEC appropriate for NetBSD ELF. Here we provide support for the special GCC options -assert, -R, -rpath, -shared, ! -nostdlib, -static, -rdynamic, and -dynamic-linker. */ ! #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{assert*} %{R*} %{rpath*} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dc -dp \ ! %{!nostdlib: \ ! %{!r*: \ ! %{!e*:-e __start}}} \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ %{static:-static}}" --- 46,95 ---- of the support for getting C++ file-scope static objects constructed before entering "main". */ ! #define NETBSD_STARTFILE_SPEC \ "%{!shared: \ %{pg:gcrt0%O%s} \ %{!pg: \ %{p:gcrt0%O%s} \ %{!p:crt0%O%s}}} \ ! %:if-exists(crti%O%s) \ ! %{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \ ! %{!static: \ ! %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}}" ! ! #undef STARTFILE_SPEC ! #define STARTFILE_SPEC NETBSD_STARTFILE_SPEC /* Provide an ENDFILE_SPEC appropriate for NetBSD ELF. Here we add crtend.o, which provides part of the support for getting C++ file-scope static objects deconstructed after exiting "main". */ ! #define NETBSD_ENDFILE_SPEC \ ! "%{!shared:crtend%O%s} %{shared:crtendS%O%s} \ ! %:if-exists(crtn%O%s)" + #undef ENDFILE_SPEC + #define ENDFILE_SPEC NETBSD_ENDFILE_SPEC /* Provide a LINK_SPEC appropriate for NetBSD ELF. Here we provide support for the special GCC options -assert, -R, -rpath, -shared, ! -nostdlib, -static, -rdynamic, and -dynamic-linker. ! Target-specific code can use this in conjunction with any other ! target-specific LINK_SPEC options. ! ! Target-specific code must provide the %(netbsd_entry_point) spec. */ ! ! #define NETBSD_LINK_SPEC_ELF \ ! "%{assert*} %{R*} %{rpath*} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dc -dp \ ! %{!nostdlib: \ ! %{!r*: \ ! %{!e*:-e %(netbsd_entry_point)}}} \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ %{static:-static}}" diff -Nrc3pad gcc-3.2.3/gcc/config/netbsd.h gcc-3.3/gcc/config/netbsd.h *** gcc-3.2.3/gcc/config/netbsd.h 2002-02-05 19:01:43.000000000 +0000 --- gcc-3.3/gcc/config/netbsd.h 2003-02-28 19:09:45.000000000 +0000 *************** *** 1,6 **** /* NETBSD_NATIVE is defined when gcc is integrated into the NetBSD source tree so it can be configured appropriately without using ! the GNU configure/build mechanism. */ #ifdef NETBSD_NATIVE --- 1,50 ---- + /* Base configuration file for all NetBSD targets. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* TARGET_OS_CPP_BUILTINS() common to all NetBSD targets. */ + #define NETBSD_OS_CPP_BUILTINS_COMMON() \ + do \ + { \ + builtin_define ("__NetBSD__"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=NetBSD"); \ + } \ + while (0) + + /* TARGET_OS_CPP_BUILTINS() common to all LP64 NetBSD targets. */ + #define NETBSD_OS_CPP_BUILTINS_LP64() \ + do \ + { \ + builtin_define ("_LP64"); \ + } \ + while (0) + + /* CPP_SPEC parts common to all NetBSD targets. */ + #define NETBSD_CPP_SPEC \ + "%{posix:-D_POSIX_SOURCE} \ + %{pthread:-D_REENTRANT -D_PTHREADS}" + /* NETBSD_NATIVE is defined when gcc is integrated into the NetBSD source tree so it can be configured appropriately without using ! the GNU configure/build mechanism. */ #ifdef NETBSD_NATIVE *************** *** 35,54 **** #endif /* NETBSD_NATIVE */ ! /* Provide a CPP_SPEC appropriate for NetBSD. Currently we just deal with ! the GCC option `-posix'. */ ! #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}" ! /* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate ! libc, depending on whether we're doing profiling; if `-posix' is specified, ! link against the appropriate libposix first. Don't include libc when ! linking a shared library. */ ! #undef LIB_SPEC ! #define LIB_SPEC \ "%{posix: \ %{!p: \ %{!pg:-lposix}} \ --- 79,117 ---- #endif /* NETBSD_NATIVE */ ! /* Provide a LIB_SPEC appropriate for NetBSD. Here we: ! 1. Select the appropriate set of libs, depending on whether we're ! profiling. + 2. Include the pthread library if -pthread is specified (only + if threads are enabled). ! 3. Include the posix library if -posix is specified. ! FIXME: Could eliminate the duplication here if we were allowed to ! use string concatenation. */ ! ! #ifdef NETBSD_ENABLE_PTHREADS ! #define NETBSD_LIB_SPEC \ ! "%{pthread: \ ! %{!p: \ ! %{!pg:-lpthread}} \ ! %{p:-lpthread_p} \ ! %{pg:-lpthread_p}} \ ! %{posix: \ ! %{!p: \ ! %{!pg:-lposix}} \ ! %{p:-lposix_p} \ ! %{pg:-lposix_p}} \ ! %{!shared: \ ! %{!symbolic: \ ! %{!p: \ ! %{!pg:-lc}} \ ! %{p:-lc_p} \ ! %{pg:-lc_p}}}" ! #else ! #define NETBSD_LIB_SPEC \ "%{posix: \ %{!p: \ %{!pg:-lposix}} \ *************** *** 60,83 **** %{!pg:-lc}} \ %{p:-lc_p} \ %{pg:-lc_p}}}" /* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude libgcc with -symbolic. */ - #undef LIBGCC_SPEC #ifdef NETBSD_NATIVE ! #define LIBGCC_SPEC \ "%{!symbolic: \ %{!shared: \ %{!p: \ ! %{!pg: -lgcc}}} \ %{shared: -lgcc_pic} \ %{p: -lgcc_p} \ %{pg: -lgcc_p}}" #else ! #define LIBGCC_SPEC "%{!shared:%{!symbolic: -lgcc}}" #endif /* When building shared libraries, the initialization and finalization functions for the library are .init and .fini respectively. */ --- 123,152 ---- %{!pg:-lc}} \ %{p:-lc_p} \ %{pg:-lc_p}}}" + #endif + + #undef LIB_SPEC + #define LIB_SPEC NETBSD_LIB_SPEC /* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude libgcc with -symbolic. */ #ifdef NETBSD_NATIVE ! #define NETBSD_LIBGCC_SPEC \ "%{!symbolic: \ %{!shared: \ %{!p: \ ! %{!pg: -lgcc}}} \ %{shared: -lgcc_pic} \ %{p: -lgcc_p} \ %{pg: -lgcc_p}}" #else ! #define NETBSD_LIBGCC_SPEC "%{!shared:%{!symbolic: -lgcc}}" #endif + #undef LIBGCC_SPEC + #define LIBGCC_SPEC NETBSD_LIBGCC_SPEC + /* When building shared libraries, the initialization and finalization functions for the library are .init and .fini respectively. */ *************** *** 93,103 **** fprintf ((STREAM), "void __fini() {\n\t%s();\n}\n", (FUNC)); \ } while (0) - /* Allow #sccs in preprocessor. */ - - #undef SCCS_DIRECTIVE - #define SCCS_DIRECTIVE - #undef TARGET_HAS_F_SETLKW #define TARGET_HAS_F_SETLKW --- 162,167 ---- *************** *** 108,114 **** /* Handle #pragma weak and #pragma pack. */ ! #define HANDLE_SYSV_PRAGMA /* Define some types that are the same on all NetBSD platforms, --- 172,178 ---- /* Handle #pragma weak and #pragma pack. */ ! #define HANDLE_SYSV_PRAGMA 1 /* Define some types that are the same on all NetBSD platforms, *************** *** 122,124 **** --- 186,236 ---- #undef WINT_TYPE #define WINT_TYPE "int" + + + /* Attempt to turn on execute permission for the stack. This may be + used by TRANSFER_FROM_TRAMPOLINE of the target needs it (that is, + if the target machine can change execute permissions on a page). + + There is no way to query the execute permission of the stack, so + we always issue the mprotect() call. + + Note that we go out of our way to use namespace-non-invasive calls + here. Unfortunately, there is no libc-internal name for mprotect(). + + Also note that no errors should be emitted by this code; it is considered + dangerous for library calls to send messages to stdout/stderr. */ + + #define NETBSD_ENABLE_EXECUTE_STACK \ + extern void __enable_execute_stack (void *); \ + void \ + __enable_execute_stack (addr) \ + void *addr; \ + { \ + extern int mprotect (void *, size_t, int); \ + extern int __sysctl (int *, unsigned int, void *, size_t *, \ + void *, size_t); \ + \ + static int size; \ + static long mask; \ + \ + char *page, *end; \ + \ + if (size == 0) \ + { \ + int mib[2]; \ + size_t len; \ + \ + mib[0] = 6; /* CTL_HW */ \ + mib[1] = 7; /* HW_PAGESIZE */ \ + len = sizeof (size); \ + (void) __sysctl (mib, 2, &size, &len, NULL, 0); \ + mask = ~((long) size - 1); \ + } \ + \ + page = (char *) (((long) addr) & mask); \ + end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \ + \ + /* 7 == PROT_READ | PROT_WRITE | PROT_EXEC */ \ + (void) mprotect (page, end - page, 7); \ + } diff -Nrc3pad gcc-3.2.3/gcc/config/netware.h gcc-3.3/gcc/config/netware.h *** gcc-3.2.3/gcc/config/netware.h 2001-11-15 17:55:26.000000000 +0000 --- gcc-3.3/gcc/config/netware.h 2002-09-29 13:16:44.000000000 +0000 *************** *** 1,6 **** /* netware.h -- operating system specific defines to be used when targeting GCC for some generic NetWare 4 system. ! Copyright (C) 1993, 1994, 2000, 2001 Free Software Foundation, Inc. Written by David V. Henkel-Wallace (gumby@cygnus.com) --- 1,6 ---- /* netware.h -- operating system specific defines to be used when targeting GCC for some generic NetWare 4 system. ! Copyright (C) 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc. Written by David V. Henkel-Wallace (gumby@cygnus.com) *************** Boston, MA 02111-1307, USA. */ *** 25,31 **** anyway for cross-compilers, and the other specs won't get picked up 'coz the user is supposed to do ld -r (hmm, perhaps that should be the default). In any case, setting them thus will catch some ! common user errors. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX --- 25,31 ---- anyway for cross-compilers, and the other specs won't get picked up 'coz the user is supposed to do ld -r (hmm, perhaps that should be the default). In any case, setting them thus will catch some ! common user errors. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX *************** Boston, MA 02111-1307, USA. */ *** 49,102 **** #undef LIBGCC_SPEC /* set debugging info */ ! #define DBX_DEBUGGING_INFO #undef SDB_DEBUGGING_INFO #undef DWARF_DEBUGGING_INFO #undef XCOFF_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ! /* Support const sections and the ctors and dtors sections for g++. ! Note that there appears to be two different ways to support const ! sections at the moment. You can either #define the symbol ! READONLY_DATA_SECTION (giving it some code which switches to the ! readonly data section) or else you can #define the symbols ! EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and ! SELECT_RTX_SECTION. We do both here just to be on the safe side. */ #undef HAS_INIT_SECTION #undef INIT_SECTION_ASM_OP ! #undef READONLY_DATA_SECTION ! #define READONLY_DATA_SECTION const_section ! ! #undef CONST_SECTION_ASM_OP ! #define CONST_SECTION_ASM_OP ".section\t.rodata" #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" #undef DTORS_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" - - /* A list of other sections which the compiler might be "in" at any - given time. */ - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS in_const - - /* A list of extra section function definitions. */ - - #undef EXTRA_SECTION_FUNCTIONS - #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION - - #undef CONST_SECTION_FUNCTION - #define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - if (in_section != in_const) \ - { \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ - in_section = in_const; \ - } \ - } --- 49,69 ---- #undef LIBGCC_SPEC /* set debugging info */ ! #define DBX_DEBUGGING_INFO 1 #undef SDB_DEBUGGING_INFO #undef DWARF_DEBUGGING_INFO #undef XCOFF_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ! /* Support const sections and the ctors and dtors sections for g++. */ #undef HAS_INIT_SECTION #undef INIT_SECTION_ASM_OP ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP ".section\t.rodata" #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" #undef DTORS_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" diff -Nrc3pad gcc-3.2.3/gcc/config/nextstep21.h gcc-3.3/gcc/config/nextstep21.h *** gcc-3.2.3/gcc/config/nextstep21.h 2001-11-09 07:14:16.000000000 +0000 --- gcc-3.3/gcc/config/nextstep21.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,64 **** - /* nextstep.h -- operating system specific defines to be used when - targeting GCC for NeXTSTEP. - Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* changed for NeXTStep 2.1, Ch. Kranz, 2/94, 3/94 */ - #include "nextstep.h" - - /* set flag_gnu_linker=0, use collect2 for linking */ - #undef USE_COLLECT2 - #define USE_COLLECT2 - - /* use this until a newer gdb for NeXTStep21 is available */ - #define DEFAULT_GDB_EXTENSIONS 0 - - /* we need the call to __main to start all global destructors and constructors - correctly, so undef INIT_SECTION_ASM_OP, (see libgcc2.c line 1965) - and define INVOKE_main */ - #undef INIT_SECTION_ASM_OP - #define INVOKE__main - - /* We call the global destructors, constructors from __main */ - #undef TARGET_ASM_CONSTRUCTOR - #undef TARGET_ASM_DESTRUCTOR - - #undef ASM_FILE_END - #define ASM_FILE_END(FILE) \ - do { \ - if (strcmp (lang_hooks.name, "GNU C++") == 0) \ - { \ - ASM_OUTPUT_ALIGN (FILE, 1); \ - } \ - } while (0) - /* deleted: destructor_section (); \ */ - /* deleted: constructor_section (); \ */ - - /* Ensure correct alignment of bss data. */ - /* ASM_OUTPUT_ALIGNED_LOCAL not needed */ - /* need ASM_OUTPUT_LOCAL instead for old NeXT-as */ - /* look in varasm.c, line 1062 and 1476 */ - #undef ASM_OUTPUT_ALIGNED_LOCAL - #undef ASM_OUTPUT_LOCAL - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (ROUNDED))) - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/nextstep.c gcc-3.3/gcc/config/nextstep.c *** gcc-3.2.3/gcc/config/nextstep.c 2001-12-16 13:42:53.000000000 +0000 --- gcc-3.3/gcc/config/nextstep.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,117 **** - /* Functions for generic NeXT as target machine for GNU C compiler. - Copyright (C) 1989, 1990, 1991, 1992, 1993, 1996, 1997, 1998, - 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "config.h" - #include "system.h" - #include "flags.h" - #include "tree.h" - #include "rtl.h" - #include "toplev.h" - #include "output.h" - #include "tm_p.h" - - /* Make everything that used to go in the text section really go there. */ - - int flag_no_mach_text_sections = 0; - - #define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1)) - - /* 1 if handle_pragma has been called yet. */ - - static int pragma_initialized; - - /* Initial setting of `optimize'. */ - - static int initial_optimize_flag; - - /* Called from check_newline via the macro HANDLE_PRAGMA. - FINPUT is the source file input stream. - CH is the first character after `#pragma'. - The result is 1 if the pragma was handled. */ - - int - handle_pragma (p_getc, p_ungetc, pname) - int (* p_getc) PARAMS ((void)) ATTRIBUTE_UNUSED; - void (* p_ungetc) PARAMS ((int)) ATTRIBUTE_UNUSED; - const char *pname; - { - int retval = 0; - - /* Record initial setting of optimize flag, so we can restore it. */ - if (!pragma_initialized) - { - pragma_initialized = 1; - initial_optimize_flag = optimize; - } - - if (strcmp (pname, "CC_OPT_ON") == 0) - { - optimize = 1; - warning ("optimization turned on"); - retval = 1; - } - else if (strcmp (pname, "CC_OPT_OFF") == 0) - { - optimize = 0; - warning ("optimization turned off"); - retval = 1; - } - else if (strcmp (pname, "CC_OPT_RESTORE") == 0) - { - extern int initial_optimize_flag; - - if (optimize != initial_optimize_flag) - optimize = initial_optimize_flag; - warning ("optimization level restored"); - retval = 1; - } - else if (strcmp (pname, "CC_WRITABLE_STRINGS") == 0) - flag_writable_strings = retval = 1; - else if (strcmp (pname, "CC_NON_WRITABLE_STRINGS") == 0) - flag_writable_strings = 0, retval = 1; - else if (strcmp (pname, "CC_NO_MACH_TEXT_SECTIONS") == 0) - flag_no_mach_text_sections = retval = 1; - - return retval; - } - - void - nextstep_asm_out_constructor (symbol, priority) - rtx symbol; - int priority ATTRIBUTE_UNUSED; - { - constructor_section (); - assemble_align (POINTER_SIZE); - assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); - fprintf (asm_out_file, ".reference .constructors_used\n"); - } - - void - nextstep_asm_out_destructor (symbol, priority) - rtx symbol; - int priority ATTRIBUTE_UNUSED; - { - destructor_section (); - assemble_align (POINTER_SIZE); - assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); - fprintf (asm_out_file, ".reference .destructors_used\n"); - } - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/nextstep.h gcc-3.3/gcc/config/nextstep.h *** gcc-3.2.3/gcc/config/nextstep.h 2001-12-16 13:42:53.000000000 +0000 --- gcc-3.3/gcc/config/nextstep.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,581 **** - /* Operating system specific defines to be used when targeting GCC - for NeXTSTEP. - Copyright (C) 1989, 1990, 1991, 1992, 1993, 1996, 1997, - 1999 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Use new NeXT include file search path. - In a cross compiler with NeXT as target, don't expect - the host to use Next's directory scheme. */ - - #ifndef CROSS_COMPILE - #undef INCLUDE_DEFAULTS - #define INCLUDE_DEFAULTS \ - { \ - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \ - { LOCAL_INCLUDE_DIR, 0, 0, 1 }, \ - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 }, \ - { GCC_INCLUDE_DIR, "GCC", 0, 0 }, \ - /* These are for fixincludes-fixed ansi/bsd headers \ - which wouldn't be found otherwise. \ - (The use of string catenation here is OK since \ - NeXT's native compiler is derived from GCC.) */ \ - { GCC_INCLUDE_DIR "/ansi", 0, 0, 0 }, \ - { GCC_INCLUDE_DIR "/bsd", 0, 0, 0 }, \ - { "/NextDeveloper/Headers", 0, 0, 0 }, \ - { "/NextDeveloper/Headers/ansi", 0, 0, 0 }, \ - { "/NextDeveloper/Headers/bsd", 0, 0, 0 }, \ - { "/LocalDeveloper/Headers", 0, 0, 0 }, \ - { "/LocalDeveloper/Headers/ansi", 0, 0, 0 }, \ - { "/LocalDeveloper/Headers/bsd", 0, 0, 0 }, \ - { "/NextDeveloper/2.0CompatibleHeaders", 0, 0, 0 }, \ - { STANDARD_INCLUDE_DIR, 0, 0, 0 }, \ - { "/usr/include/bsd", 0, 0, 0 }, \ - { 0, 0, 0, 0 } \ - } - #else /* CROSS_COMPILE */ - #undef INCLUDE_DEFAULTS - #define INCLUDE_DEFAULTS \ - { \ - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \ - { GPLUSPLUS_INCLUDE_DIR, 0, 1, 1 }, \ - { GCC_INCLUDE_DIR, "GCC", 0, 0 }, \ - { GCC_INCLUDE_DIR "/ansi", 0, 0, 0 }, \ - { GCC_INCLUDE_DIR "/bsd", 0, 0, 0 }, \ - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 }, \ - { TOOL_INCLUDE_DIR "/ansi", 0, 0, 0 }, \ - { TOOL_INCLUDE_DIR "/bsd", 0, 0, 0 }, \ - { "/usr/include/bsd", 0, 0, 0 }, \ - { 0, 0, 0, 0 } \ - } - #endif /* CROSS_COMPILE */ - - #undef EXTRA_FORMAT_FUNCTIONS - #define EXTRA_FORMAT_FUNCTIONS \ - "NXPrintf", FALSE, 2, FALSE, \ - "NXScanf", TRUE, 2, FALSE, \ - "NXVPrintf", FALSE, 2, TRUE, \ - "NXVScanf", TRUE, 2, TRUE, \ - "DPSPrintf", FALSE, 2, FALSE, \ - "bsd_sprintf", FALSE, 2, FALSE, \ - "bsd_vsprintf", FALSE, 2, TRUE, - - /* Make -fnext-runtime the default. */ - - #define NEXT_OBJC_RUNTIME - - /* Enable recent gcc to compile under the old gcc in Next release 1.0. */ - - #define __inline inline - - /* wchar_t is unsigned short */ - - #undef WCHAR_TYPE - #define WCHAR_TYPE "short unsigned int" - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE (BITS_PER_WORD / 2) - - /* Don't default to pcc-struct-return, because gcc is the only compiler, and - we want to retain compatibility with older gcc versions. */ - - #undef DEFAULT_PCC_STRUCT_RETURN - #define DEFAULT_PCC_STRUCT_RETURN 0 - - /* These compiler options take n arguments. */ - - #undef WORD_SWITCH_TAKES_ARG - #define WORD_SWITCH_TAKES_ARG(STR) \ - (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) ? 1 : \ - !strcmp (STR, "segalign") ? 1 : \ - !strcmp (STR, "seg1addr") ? 1 : \ - !strcmp (STR, "segaddr") ? 2 : \ - !strcmp (STR, "sectobjectsymbols") ? 2 : \ - !strcmp (STR, "segprot") ? 3 : \ - !strcmp (STR, "sectcreate") ? 3 : \ - !strcmp (STR, "sectalign") ? 3 : \ - !strcmp (STR, "segcreate") ? 3 : \ - !strcmp (STR, "sectorder") ? 3 : \ - !strcmp (STR, "siff-mask") ? 1 : \ - !strcmp (STR, "siff-filter") ? 1 : \ - !strcmp (STR, "siff-warning") ? 1 : \ - !strcmp (STR, "arch") ? 1 : \ - !strcmp (STR, "pagezero_size") ? 1 : \ - 0) - - #undef WORD_SWITCH - #define WORD_SWITCH(STR) \ - (WORD_SWITCH_TAKES_ARG (STR) \ - || !strcmp (STR, "bsd") \ - || !strcmp (STR, "object") \ - || !strcmp (STR, "ObjC") \ - || !strcmp (STR, "all_load")) - - /* Machine dependent ccp options. */ - - #undef CPP_SPEC - #define CPP_SPEC "%{!traditional: -D__STDC__} \ - %{posixstrict:-D_POSIX_SOURCE} \ - %{!posixstrict:%{bsd:-D__STRICT_BSD__} \ - %{posix:-D_POSIX_SOURCE} \ - %{!ansi:-D_NEXT_SOURCE}} \ - %{MD:-MD %M} %{MMD:-MMD %M}" - - /* Machine dependent ld options. */ - - #undef LINK_SPEC - #define LINK_SPEC "%{Z} %{M} \ - %{execute*} %{preload*} %{fvmlib*} \ - %{segalign*} %{seg1addr*} %{segaddr*} %{segprot*} \ - %{pagezero_size*} \ - %{seglinkedit*} %{noseglinkedit*} \ - %{sectcreate*} %{sectalign*} %{sectobjectsymbols}\ - %{segcreate*} %{Mach*} %{whyload} %{w} \ - %{sectorder*} %{whatsloaded} %{ObjC} %{all_load} %{object}" - - /* Machine dependent libraries. */ - - #undef LIB_SPEC - #define LIB_SPEC "%{!posix*:-lsys_s} %{posix*:-lposix}" - - /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{!posix*:%{pg:-lgcrt0.o}%{!pg: \ - %{p:%e-p profiling is no longer supported. Use -pg instead} \ - %{!p:-lcrt0.o}}}\ - %{posix*:%{pg:-lgposixcrt0.o}%{!pg: \ - %{p:%e-p profiling is no longer supported. Use -pg instead} \ - %{!p:-lposixcrt0.o}}} \ - -lcrtbegin.o" - - #undef ENDFILE_SPEC - #define ENDFILE_SPEC \ - "-lcrtend.o" - - /* Allow #sscs (but don't do anything). */ - - #define SCCS_DIRECTIVE - - /* We use Dbx symbol format. */ - - #undef SDB_DEBUGGING_INFO - #undef XCOFF_DEBUGGING_INFO - #define DBX_DEBUGGING_INFO - - /* This saves a fair amount of space. */ - - #undef DBX_CONTIN_LENGTH - #define DBX_CONTIN_LENGTH 0 - - /* These screw up NeXT's gdb at the moment, so don't use them. */ - - #undef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY - #define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(FILE, FILENAME) - - /* These come from bsd386.h, but are specific to sequent, so make sure - they don't bite us. */ - - #undef DBX_NO_XREFS - #undef DBX_CONTIN_LENGTH - - /* gdb needs a null N_SO at the end of each file for scattered loading. */ - - #undef DBX_OUTPUT_MAIN_SOURCE_FILE_END - #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ - fprintf (FILE, \ - "\t.text\n\t.stabs \"%s\",%d,0,0,Letext\nLetext:\n", \ - "" , N_SO) - - /* Define our object format type for crtstuff.c */ - #define OBJECT_FORMAT_MACHO - - #undef INIT_SECTION_ASM_OP - #define INIT_SECTION_ASM_OP - #undef INVOKE__main - - #define TARGET_ASM_CONSTRUCTOR nextstep_asm_out_constructor - #define TARGET_ASM_DESTRUCTOR nextstep_asm_out_destructor - - #define TARGET_ASM_EXCEPTION_SECTION nextstep_exception_section - - #define TARGET_ASM_EH_FRAME_SECTION nextstep_eh_frame_section - - /* Don't output a .file directive. That is only used by the assembler for - error reporting. */ - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) - - #undef ASM_FILE_END - #define ASM_FILE_END(FILE) \ - do { \ - if (strcmp (lang_hooks.name, "GNU C++") == 0) \ - { \ - constructor_section (); \ - destructor_section (); \ - ASM_OUTPUT_ALIGN (FILE, 1); \ - } \ - } while (0) - - /* How to parse #pragma's */ - - #undef HANDLE_PRAGMA - #define HANDLE_PRAGMA(GETC, UNGETC, NAME) handle_pragma (GETC, UNGETC, NAME) - - /* Give methods pretty symbol names on NeXT. */ - - #undef OBJC_GEN_METHOD_LABEL - #define OBJC_GEN_METHOD_LABEL(BUF,IS_INST,CLASS_NAME,CAT_NAME,SEL_NAME,NUM) \ - do { if (CAT_NAME) \ - sprintf (BUF, "%c[%s(%s) %s]", (IS_INST) ? '-' : '+', \ - (CLASS_NAME), (CAT_NAME), (SEL_NAME)); \ - else \ - sprintf (BUF, "%c[%s %s]", (IS_INST) ? '-' : '+', \ - (CLASS_NAME), (SEL_NAME)); \ - } while (0) - - /* The prefix to add to user-visible assembler symbols. */ - - #undef USER_LABEL_PREFIX - #define USER_LABEL_PREFIX "_" - - /* Wrap new method names in quotes so the assembler doesn't gag. - Make Objective-C internal symbols local. */ - - #undef ASM_OUTPUT_LABELREF - #define ASM_OUTPUT_LABELREF(FILE,NAME) \ - do { if (NAME[0] == '+' || NAME[0] == '-') fprintf (FILE, "\"%s\"", NAME); \ - else if (!strncmp (NAME, "_OBJC_", 6)) fprintf (FILE, "L%s", NAME); \ - else if (!strncmp (NAME, ".objc_class_name_", 17)) \ - fprintf (FILE, "%s", NAME); \ - else asm_fprintf (FILE, "%U%s", NAME); } while (0) - - #undef ALIGN_ASM_OP - #define ALIGN_ASM_OP "\t.align\t" - - #undef ASM_OUTPUT_ALIGN - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG) != 0) \ - fprintf (FILE, "%s%d\n", ALIGN_ASM_OP, (LOG)) - - /* Ensure correct alignment of bss data. */ - - #undef ASM_OUTPUT_ALIGNED_LOCAL - #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ - ( fputs (".lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u,%u\n", (SIZE), floor_log2 ((ALIGN) / BITS_PER_UNIT))) - - /* Output #ident as a .ident. */ - - #undef ASM_OUTPUT_IDENT - #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); - - /* The maximum alignment which the object file format can support. - For NeXT's Mach-O format, this is 2^15. */ - - #undef MAX_OFILE_ALIGNMENT - #define MAX_OFILE_ALIGNMENT 0x8000 - - /* Create new Mach-O sections. */ - - #undef SECTION_FUNCTION - #define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, WAS_TEXT, OBJC) \ - extern void FUNCTION PARAMS ((void)); \ - void \ - FUNCTION () \ - { \ - extern int flag_no_mach_text_sections; \ - \ - if (WAS_TEXT && flag_no_mach_text_sections) \ - text_section (); \ - else if (in_section != SECTION) \ - { \ - if (OBJC) \ - objc_section_init (); \ - fprintf (asm_out_file, "%s\n", DIRECTIVE); \ - in_section = SECTION; \ - } \ - } \ - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS \ - in_const, in_cstring, in_literal4, in_literal8, \ - in_constructor, in_destructor, \ - in_nextstep_exception, in_nextstep_eh_frame, \ - in_objc_class, in_objc_meta_class, in_objc_category, \ - in_objc_class_vars, in_objc_instance_vars, \ - in_objc_cls_meth, in_objc_inst_meth, \ - in_objc_cat_cls_meth, in_objc_cat_inst_meth, \ - in_objc_selector_refs, \ - in_objc_symbols, in_objc_module_info, \ - in_objc_protocol, in_objc_string_object, \ - in_objc_class_names, in_objc_meth_var_names, \ - in_objc_meth_var_types, in_objc_cls_refs - - #undef EXTRA_SECTION_FUNCTIONS - #define EXTRA_SECTION_FUNCTIONS \ - extern void objc_section_init PARAMS ((void)); \ - SECTION_FUNCTION (const_section, \ - in_const, \ - ".const", 1, 0) \ - SECTION_FUNCTION (cstring_section, \ - in_cstring, \ - ".cstring", 1, 0) \ - SECTION_FUNCTION (literal4_section, \ - in_literal4, \ - ".literal4", 1, 0) \ - SECTION_FUNCTION (literal8_section, \ - in_literal8, \ - ".literal8", 1, 0) \ - SECTION_FUNCTION (constructor_section, \ - in_constructor, \ - ".constructor", 0, 0) \ - SECTION_FUNCTION (destructor_section, \ - in_destructor, \ - ".destructor", 0, 0) \ - SECTION_FUNCTION (nextstep_exception_section, \ - in_nextstep_exception, \ - ".section __TEXT,__gcc_except_tab,regular", 0, 0) \ - SECTION_FUNCTION (nextstep_eh_frame_section, \ - in_nextstep_eh_frame, \ - ".section __TEXT,__eh_frame,regular", 0, 0) \ - SECTION_FUNCTION (objc_class_section, \ - in_objc_class, \ - ".objc_class", 0, 1) \ - SECTION_FUNCTION (objc_meta_class_section, \ - in_objc_meta_class, \ - ".objc_meta_class", 0, 1) \ - SECTION_FUNCTION (objc_category_section, \ - in_objc_category, \ - ".objc_category", 0, 1) \ - SECTION_FUNCTION (objc_class_vars_section, \ - in_objc_class_vars, \ - ".objc_class_vars", 0, 1) \ - SECTION_FUNCTION (objc_instance_vars_section, \ - in_objc_instance_vars, \ - ".objc_instance_vars", 0, 1) \ - SECTION_FUNCTION (objc_cls_meth_section, \ - in_objc_cls_meth, \ - ".objc_cls_meth", 0, 1) \ - SECTION_FUNCTION (objc_inst_meth_section, \ - in_objc_inst_meth, \ - ".objc_inst_meth", 0, 1) \ - SECTION_FUNCTION (objc_cat_cls_meth_section, \ - in_objc_cat_cls_meth, \ - ".objc_cat_cls_meth", 0, 1) \ - SECTION_FUNCTION (objc_cat_inst_meth_section, \ - in_objc_cat_inst_meth, \ - ".objc_cat_inst_meth", 0, 1) \ - SECTION_FUNCTION (objc_selector_refs_section, \ - in_objc_selector_refs, \ - ".objc_message_refs", 0, 1) \ - SECTION_FUNCTION (objc_symbols_section, \ - in_objc_symbols, \ - ".objc_symbols", 0, 1) \ - SECTION_FUNCTION (objc_module_info_section, \ - in_objc_module_info, \ - ".objc_module_info", 0, 1) \ - SECTION_FUNCTION (objc_protocol_section, \ - in_objc_protocol, \ - ".objc_protocol", 0, 1) \ - SECTION_FUNCTION (objc_string_object_section, \ - in_objc_string_object, \ - ".objc_string_object", 0, 1) \ - SECTION_FUNCTION (objc_class_names_section, \ - in_objc_class_names, \ - ".objc_class_names", 0, 1) \ - SECTION_FUNCTION (objc_meth_var_names_section, \ - in_objc_meth_var_names, \ - ".objc_meth_var_names", 0, 1) \ - SECTION_FUNCTION (objc_meth_var_types_section, \ - in_objc_meth_var_types, \ - ".objc_meth_var_types", 0, 1) \ - SECTION_FUNCTION (objc_cls_refs_section, \ - in_objc_cls_refs, \ - ".objc_cls_refs", 0, 1) \ - \ - void \ - objc_section_init () \ - { \ - static int been_here = 0; \ - \ - if (been_here == 0) \ - { \ - been_here = 1; \ - objc_class_section (); \ - objc_meta_class_section (); \ - objc_cat_cls_meth_section (); \ - objc_cat_inst_meth_section (); \ - objc_cls_meth_section (); \ - objc_inst_meth_section (); \ - objc_selector_refs_section (); \ - objc_symbols_section (); \ - objc_category_section (); \ - objc_protocol_section (); \ - objc_class_vars_section (); \ - objc_instance_vars_section (); \ - objc_module_info_section (); \ - objc_string_object_section (); \ - objc_class_names_section (); \ - objc_meth_var_names_section (); \ - objc_meth_var_types_section (); \ - objc_cls_refs_section (); \ - } \ - } - - #undef READONLY_DATA_SECTION - #define READONLY_DATA_SECTION const_section - - #undef SELECT_SECTION - #define SELECT_SECTION(exp,reloc,align) \ - do \ - { \ - if (TREE_CODE (exp) == STRING_CST) \ - { \ - if (flag_writable_strings) \ - data_section (); \ - else if (TREE_STRING_LENGTH (exp) != \ - strlen (TREE_STRING_POINTER (exp)) + 1) \ - readonly_data_section (); \ - else \ - cstring_section (); \ - } \ - else if (TREE_CODE (exp) == INTEGER_CST \ - || TREE_CODE (exp) == REAL_CST) \ - { \ - tree size = TYPE_SIZE (TREE_TYPE (exp)); \ - \ - if (TREE_CODE (size) == INTEGER_CST && \ - TREE_INT_CST_LOW (size) == 4 && \ - TREE_INT_CST_HIGH (size) == 0) \ - literal4_section (); \ - else if (TREE_CODE (size) == INTEGER_CST && \ - TREE_INT_CST_LOW (size) == 8 && \ - TREE_INT_CST_HIGH (size) == 0) \ - literal8_section (); \ - else \ - readonly_data_section (); \ - } \ - else if (TREE_CODE (exp) == CONSTRUCTOR \ - && TREE_TYPE (exp) \ - && TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE \ - && TYPE_NAME (TREE_TYPE (exp)) \ - && TREE_CODE (TYPE_NAME (TREE_TYPE (exp))) == IDENTIFIER_NODE \ - && IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (exp)))) \ - { \ - if (!strcmp (IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (exp))), \ - "NXConstantString")) \ - objc_string_object_section (); \ - else if ((TREE_READONLY (exp) || TREE_CONSTANT (exp)) \ - && !TREE_SIDE_EFFECTS (exp)) \ - readonly_data_section (); \ - else \ - data_section (); \ - } \ - else if (TREE_CODE (exp) == VAR_DECL && \ - DECL_NAME (exp) && \ - TREE_CODE (DECL_NAME (exp)) == IDENTIFIER_NODE && \ - IDENTIFIER_POINTER (DECL_NAME (exp)) && \ - !strncmp (IDENTIFIER_POINTER (DECL_NAME (exp)), "_OBJC_", 6)) \ - { \ - const char *name = IDENTIFIER_POINTER (DECL_NAME (exp)); \ - \ - if (!strncmp (name, "_OBJC_CLASS_METHODS_", 20)) \ - objc_cls_meth_section (); \ - else if (!strncmp (name, "_OBJC_INSTANCE_METHODS_", 23)) \ - objc_inst_meth_section (); \ - else if (!strncmp (name, "_OBJC_CATEGORY_CLASS_METHODS_", 20)) \ - objc_cat_cls_meth_section (); \ - else if (!strncmp (name, "_OBJC_CATEGORY_INSTANCE_METHODS_", 23)) \ - objc_cat_inst_meth_section (); \ - else if (!strncmp (name, "_OBJC_CLASS_VARIABLES_", 22)) \ - objc_class_vars_section (); \ - else if (!strncmp (name, "_OBJC_INSTANCE_VARIABLES_", 25)) \ - objc_instance_vars_section (); \ - else if (!strncmp (name, "_OBJC_CLASS_PROTOCOLS_", 22)) \ - objc_cat_cls_meth_section (); \ - else if (!strncmp (name, "_OBJC_CLASS_NAME_", 17)) \ - objc_class_names_section (); \ - else if (!strncmp (name, "_OBJC_METH_VAR_NAME_", 20)) \ - objc_meth_var_names_section (); \ - else if (!strncmp (name, "_OBJC_METH_VAR_TYPE_", 20)) \ - objc_meth_var_types_section (); \ - else if (!strncmp (name, "_OBJC_CLASS_REFERENCES", 22)) \ - objc_cls_refs_section (); \ - else if (!strncmp (name, "_OBJC_CLASS_", 12)) \ - objc_class_section (); \ - else if (!strncmp (name, "_OBJC_METACLASS_", 16)) \ - objc_meta_class_section (); \ - else if (!strncmp (name, "_OBJC_CATEGORY_", 15)) \ - objc_category_section (); \ - else if (!strncmp (name, "_OBJC_SELECTOR_REFERENCES", 25)) \ - objc_selector_refs_section (); \ - else if (!strncmp (name, "_OBJC_SYMBOLS", 13)) \ - objc_symbols_section (); \ - else if (!strncmp (name, "_OBJC_MODULES", 13)) \ - objc_module_info_section (); \ - else if (!strncmp (name, "_OBJC_PROTOCOL_INSTANCE_METHODS_", 32)) \ - objc_cat_inst_meth_section (); \ - else if (!strncmp (name, "_OBJC_PROTOCOL_CLASS_METHODS_", 29)) \ - objc_cat_cls_meth_section (); \ - else if (!strncmp (name, "_OBJC_PROTOCOL_REFS_", 20)) \ - objc_cat_cls_meth_section (); \ - else if (!strncmp (name, "_OBJC_PROTOCOL_", 15)) \ - objc_protocol_section (); \ - else if ((TREE_READONLY (exp) || TREE_CONSTANT (exp)) \ - && !TREE_SIDE_EFFECTS (exp)) \ - readonly_data_section (); \ - else \ - data_section (); \ - } \ - else if (TREE_CODE (exp) == VAR_DECL) \ - { \ - if ((flag_pic && reloc) \ - || !TREE_READONLY (exp) || TREE_SIDE_EFFECTS (exp) \ - || !DECL_INITIAL (exp) \ - || (DECL_INITIAL (exp) != error_mark_node \ - && !TREE_CONSTANT (DECL_INITIAL (exp)))) \ - data_section (); \ - else \ - readonly_data_section (); \ - } \ - else \ - readonly_data_section (); \ - } \ - while (0) - - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(mode, rtx, align) \ - do \ - { \ - if (GET_MODE_SIZE(mode) == 8) \ - literal8_section(); \ - else if (GET_MODE_SIZE(mode) == 4) \ - literal4_section(); \ - else \ - const_section (); \ - } \ - while (0) - - #ifdef ASM_COMMENT_START - # undef ASM_COMMENT_START - #endif - - #define ASM_COMMENT_START ";#" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/nextstep-protos.h gcc-3.3/gcc/config/nextstep-protos.h *** gcc-3.2.3/gcc/config/nextstep-protos.h 2001-12-16 13:42:53.000000000 +0000 --- gcc-3.3/gcc/config/nextstep-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,28 **** - /* Operating system specific defines to be used when targeting GCC - for NeXTSTEP. - Copyright (C) 2001 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - extern void nextstep_asm_out_constructor PARAMS ((struct rtx_def *, int)); - extern void nextstep_asm_out_destructor PARAMS ((struct rtx_def *, int)); - extern int handle_pragma PARAMS ((int(*)(void), void (*)(int), const char *)); - extern void constructor_section PARAMS ((void)); - extern void destructor_section PARAMS ((void)); - extern void nextstep_exception_section PARAMS ((void)); - extern void nextstep_eh_frame_section PARAMS ((void)); --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/encore.h gcc-3.3/gcc/config/ns32k/encore.h *** gcc-3.2.3/gcc/config/ns32k/encore.h 2002-01-08 18:16:24.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/encore.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,178 **** - /* Definitions of target machine for GNU compiler. ENCORE NS32000 version. - Copyright (C) 1988, 1993, 2000, 2001, 2002 Free Software Foundation, Inc. - Adapted by Robert Brown (brown@harvard.harvard.edu) from the Sequent - version by Michael Tiemann (tiemann@mcc.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #define EXTERNAL_PREFIX '?' - #define IMMEDIATE_PREFIX '$' - - #include "ns32k/ns32k.h" - - #define SDB_DEBUGGING_INFO - #undef DBX_REGISTER_NUMBER - #define DBX_REGISTER_NUMBER(REGNO) (REGNO) - - /* Cause long-jump assembler to be used, - since otherwise some files fail to be assembled right. */ - #define ASM_SPEC "-j" - - #undef ASM_FILE_START - #undef ASM_GENERATE_INTERNAL_LABEL - #undef ASM_OUTPUT_ADDR_DIFF_ELT - #undef ASM_OUTPUT_ALIGN - #undef ASM_OUTPUT_ASCII - #undef ASM_OUTPUT_INTERNAL_LABEL - #undef ASM_OUTPUT_LOCAL - #undef CPP_PREDEFINES - #undef FUNCTION_BOUNDARY - #undef PRINT_OPERAND - #undef PRINT_OPERAND_ADDRESS - #undef TARGET_VERSION - #undef FUNCTION_PROFILER - - #define TARGET_DEFAULT 9 /* 32332 with 32081. */ - #define TARGET_VERSION fprintf (stderr, " (32000, Encore syntax)"); - /* Note Encore does not standardly do -Dencore. */ - /* budd: should have a -ns32332 (or -apc) switch! but no harm for now */ - #define CPP_PREDEFINES "-Dns32000 -Dn16 -Dns16000 -Dns32332 -Dunix -Asystem=unix -Acpu=ns32k -Amachine=ns32k" - - /* Ignore certain cpp directives used in header files on sysV. */ - #define SCCS_DIRECTIVE - - /* Output #ident as a .ident. */ - #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); - - /* The .file command should always begin the output. */ - #define ASM_FILE_START(FILE) \ - output_file_directive ((FILE), main_input_filename) - - #define FUNCTION_BOUNDARY 128 /* speed optimization */ - - /* - * The Encore assembler uses ".align 2" to align on 2-byte boundaries. - */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - fprintf (FILE, "\t.align %d\n", 1 << (LOG)) - - /* The Encore assembler doesn't seem to accept the usual second argument - and warns that .align may not work in the text section if optimization - is on. */ - #undef LABEL_ALIGN_AFTER_BARRIER - #define LABEL_ALIGN_AFTER_BARRIER(LABEL) 0 - - /* - * Internal labels are prefixed with a period. - */ - - #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.%s%ld", PREFIX, (long)(NUM)) - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.double .L%d-.LI%d\n", VALUE, REL) - - /* - * Different syntax for integer constants, double constants, and - * uninitialized locals. - */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\t.bss ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u,%u\n", (SIZE), (ROUNDED))) - - /* - * Encore assembler can't handle huge string constants like the one in - * gcc.c. If the default routine in varasm.c were more conservative, this - * code could be eliminated. It starts a new .ascii directive every 40 - * characters. - */ - - #define ASM_OUTPUT_ASCII(file, p, size) \ - do { \ - size_t i, limit = (size); \ - for (i = 0; i < limit; i++) \ - { \ - register int c = (p)[i]; \ - if ((i / 40) * 40 == i) \ - { \ - if (i == 0) \ - fprintf ((file), "\t.ascii \""); \ - else \ - fprintf ((file), "\"\n\t.ascii \""); \ - } \ - if (c == '\"' || c == '\\') \ - putc ('\\', (file)); \ - if (c >= ' ' && c < 0177) \ - putc (c, (file)); \ - else \ - { \ - fprintf ((file), "\\%o", c); \ - if (i < limit - 1 && ISDIGIT ((p)[i + 1])) \ - fprintf ((file), "\"\n\t.ascii \""); \ - } \ - } \ - fprintf ((file), "\"\n"); \ - } while (0) - - /* Modify syntax of jsr instructions. */ - #define CALL_MEMREF_IMPLICIT - - #define NO_ABSOLUTE_PREFIX_IF_SYMBOLIC - - #define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE, X, CODE) - - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR) - - /* Change the way in which data is allocated and initialized on the - encore so that both private and shared data are supported. Shared data - that is initialized must be contained in the ".shrdata" section - of the program. This is accomplished by defining the SHARED_SECTION_ASM_OP - macro. Share data that is simply allocated, and not initialized must - be prefixed with the ".shrcomm" or ".shrbss" pseudo op, for common or - local data respectively. This is accomplished by redefining the - ASM_OUTPUT_COMMON and ASM_OUTPUT_LOCAL macros. */ - - /* Assembler pseudo-op for shared data segment. */ - - #define SHARED_SECTION_ASM_OP "\t.shrdata" - - /* This says how to output an assembler line - to define a shared common symbol. */ - - #define ASM_OUTPUT_SHARED_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".shrcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (ROUNDED))) - - /* This says how to output an assembler line - to define a shared local symbol. */ - - #define ASM_OUTPUT_SHARED_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\t.shrbss ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d,%d\n", (SIZE), (ROUNDED))) - - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\taddr .LP%d,r0\n\tjsr mcount\n", (LABELNO)) - - #define ENCORE_ASM --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/merlin.h gcc-3.3/gcc/config/ns32k/merlin.h *** gcc-3.2.3/gcc/config/ns32k/merlin.h 2001-07-06 18:40:14.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/merlin.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,131 **** - /* Definitions of target machine for GNU compiler. MERLIN NS32000 version. - Copyright (C) 1990, 1994, 2000 Free Software Foundation, Inc. - By Mark Mason (mason@reed.bitnet, pyramid!unify!mason@uunet.uu.net). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Two flags to control how addresses are printed in assembler insns. */ - - #define SEQUENT_ADDRESS_BUG 1 - #define SEQUENT_BASE_REGS - - #include "ns32k/ns32k.h" - - #define MERLIN_TARGET - - /* This is BSD, so it wants DBX format. */ - #define DBX_DEBUGGING_INFO - - /* Sequent has some changes in the format of DBX symbols. */ - #define DBX_NO_XREFS 1 - - /* Don't split DBX symbols into continuations. */ - #define DBX_CONTIN_LENGTH 0 - - #define TARGET_DEFAULT 1 - - /* Print subsidiary information on the compiler version in use. */ - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (32000, UTek syntax)"); - - /* These control the C++ compiler somehow. */ - #define FASCIST_ASSEMBLER - #define USE_COLLECT - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-Dns32000 -Dns32k -Dns16000 -Dmerlin -Dunix -DUtek -Dbsd \ - -Asystem=unix -Asystem=bsd -Acpu=ns32k -Amachine=ns32k" - - /* This is how to align the code that follows an unconditional branch. - Don't define it, since it confuses the assembler (we hear). */ - - #undef LABEL_ALIGN_AFTER_BARRIER - - /* Assembler pseudo-op for shared data segment. */ - #define SHARED_SECTION_ASM_OP "\t.shdata" - - /* %$ means print the prefix for an immediate operand. */ - - #ifdef UTEK_ASM - #undef PRINT_OPERAND - #define PRINT_OPERAND(FILE, X, CODE) \ - { if (CODE == '$') putc('$', FILE); \ - else if (CODE == '?'); \ - else if (GET_CODE (X) == CONST_INT) \ - fprintf(FILE, "$%d", INTVAL(X)); \ - else if (GET_CODE (X) == REG) \ - fprintf (FILE, "%s", reg_names[REGNO (X)]); \ - else if (GET_CODE (X) == MEM) \ - { \ - rtx xfoo; \ - xfoo = XEXP (X, 0); \ - switch (GET_CODE (xfoo)) \ - { \ - case MEM: \ - if (GET_CODE (XEXP (xfoo, 0)) == REG) \ - if (REGNO (XEXP (xfoo, 0)) == STACK_POINTER_REGNUM) \ - fprintf (FILE, "0(0(sp))"); \ - else fprintf (FILE, "0(0(%s))", \ - reg_names[REGNO (XEXP (xfoo, 0))]); \ - else \ - { \ - if (GET_CODE (XEXP (xfoo, 0)) == SYMBOL_REF \ - || GET_CODE (XEXP (xfoo, 0)) == CONST) \ - { \ - fprintf(FILE, "0("); \ - output_address(xfoo); \ - fprintf(FILE, "(sb))"); \ - } \ - else \ - { \ - fprintf (FILE, "0("); \ - output_address (xfoo); \ - putc (')', FILE); \ - } \ - } \ - break; \ - case REG: \ - fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]); \ - break; \ - case PRE_DEC: \ - case POST_INC: \ - fprintf (FILE, "tos"); \ - break; \ - case CONST_INT: \ - fprintf (FILE, "$%d", INTVAL (xfoo)); \ - break; \ - default: \ - output_address (xfoo); \ - break; \ - } \ - } \ - else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode) \ - if (GET_MODE (X) == DFmode) \ - { union { double d; int i[2]; } u; \ - u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ - fprintf (FILE, "$0d%.20e", u.d); } \ - else { union { double d; int i[2]; } u; \ - u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ - fprintf (FILE, "$0f%.20e", u.d); } \ - else output_addr_const (FILE, X); } - - #endif /* UTEK_ASM */ - - #undef PRINT_OPERAND_ADDRESS - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/netbsd.h gcc-3.3/gcc/config/ns32k/netbsd.h *** gcc-3.2.3/gcc/config/ns32k/netbsd.h 2002-02-05 19:01:53.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/netbsd.h 2002-09-24 12:49:01.000000000 +0000 *************** *** 1,5 **** /* Configuration for a ns32532 running NetBSD as the target machine. ! Copyright (C) 1988, 1994, 1995, 1996, 1998 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Configuration for a ns32532 running NetBSD as the target machine. ! Copyright (C) 1988, 1994, 1995, 1996, 1998, 2002 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** GNU General Public License for more deta *** 16,34 **** You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. - */ ! #include /* Compile for the floating point unit & 32532 by default; Don't assume SB is zero; ! Don't use bitfield instructions; FPU is 32381; Use multiply-add instructions */ ! #define TARGET_DEFAULT (1 + 24 + 32 + 64 + 256 + 512) /* 32-bit alignment for efficiency */ --- 17,43 ---- You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_AOUT(); \ ! builtin_define ("__ns32k__"); \ ! } \ ! while (0) /* Compile for the floating point unit & 32532 by default; Don't assume SB is zero; ! Don't use bit-field instructions; FPU is 32381; Use multiply-add instructions */ ! #undef TARGET_DEFAULT ! #define TARGET_DEFAULT \ ! (MASK_32532 | MASK_NO_SB | MASK_NO_BITFIELD | \ ! MASK_32381 | MASK_IEEE_COMPARE | MASK_MULT_ADD) /* 32-bit alignment for efficiency */ *************** Boston, MA 02111-1307, USA. *** 64,77 **** #define MOVD_FLOAT_OK ! /* Get generic NetBSD definitions. */ ! #include ! #include ! ! /* Names to predefine in the preprocessor for this target machine. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dns32k -Dns32000 -Dns32532 -D__NetBSD__ -Dpc532 -D__ns32k__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=NetBSD -Acpu=ns32k -Amachine=ns32k" /* Make gcc agree with */ --- 73,82 ---- #define MOVD_FLOAT_OK ! /* Define a CPP_SPEC appropriate for NetBSD. */ ! #undef CPP_SPEC ! #define CPP_SPEC NETBSD_CPP_SPEC /* Make gcc agree with */ *************** Boston, MA 02111-1307, USA. *** 83,89 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Do not break .stabs pseudos into continuations. */ --- 88,94 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Do not break .stabs pseudos into continuations. */ diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/ns32k.c gcc-3.3/gcc/config/ns32k/ns32k.c *** gcc-3.2.3/gcc/config/ns32k/ns32k.c 2001-12-22 20:55:03.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/ns32k.c 2002-10-16 00:40:34.000000000 +0000 *************** int ns32k_num_files = 0; *** 47,55 **** initialized in time. Also this is more convenient as an array of ints. We know that HARD_REG_SET fits in an unsigned int */ ! unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1] = REG_CLASS_CONTENTS; ! enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] = { GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, --- 47,55 ---- initialized in time. Also this is more convenient as an array of ints. We know that HARD_REG_SET fits in an unsigned int */ ! const unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1] = REG_CLASS_CONTENTS; ! const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] = { GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, *************** static tree ns32k_handle_fntype_attribut *** 69,74 **** --- 69,75 ---- const struct attribute_spec ns32k_attribute_table[]; static void ns32k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void ns32k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void ns32k_encode_section_info PARAMS ((tree, int)); /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE *************** static void ns32k_output_function_epilog *** 86,91 **** --- 87,94 ---- #define TARGET_ASM_FUNCTION_PROLOGUE ns32k_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE ns32k_output_function_epilogue + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO ns32k_encode_section_info struct gcc_target targetm = TARGET_INITIALIZER; *************** print_operand (file, x, code) *** 1119,1158 **** } else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != VOIDmode) { if (GET_MODE (x) == DFmode) { - union { double d; int i[2]; } u; - u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); - PUT_IMMEDIATE_PREFIX (file); #ifdef SEQUENT_ASM /* Sequent likes its floating point constants as integers */ ! fprintf (file, "0Dx%08x%08x", u.i[1], u.i[0]); #else #ifdef ENCORE_ASM ! fprintf (file, "0f%.20e", u.d); #else ! fprintf (file, "0d%.20e", u.d); #endif #endif } else ! { ! union { double d; int i[2]; } u; ! u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); ! PUT_IMMEDIATE_PREFIX (file); #ifdef SEQUENT_ASM ! /* We have no way of winning if we can't get the bits ! for a sequent floating point number. */ ! #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT ! abort (); ! #endif ! { ! union { float f; long l; } uu; ! uu.f = u.d; ! fprintf (file, "0Fx%08lx", uu.l); ! } #else ! fprintf (file, "0f%.20e", u.d); #endif } } --- 1122,1159 ---- } else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != VOIDmode) { + REAL_VALUE_TYPE r; + + REAL_VALUE_FROM_CONST_DOUBLE (r, x); + PUT_IMMEDIATE_PREFIX (file); if (GET_MODE (x) == DFmode) { #ifdef SEQUENT_ASM /* Sequent likes its floating point constants as integers */ ! long l[2]; ! REAL_VALUE_TO_TARGET_DOUBLE (r, l); ! fprintf (file, "0Dx%08x%08x", ! l[!WORDS_BIG_ENDIAN], l[WORDS_BIG_ENDIAN]); #else + char s[30]; + real_to_decimal (s, &r, sizeof (s), 0, 1); #ifdef ENCORE_ASM ! fprintf (file, "0f%s", s); #else ! fprintf (file, "0d%s", s); #endif #endif } else ! { #ifdef SEQUENT_ASM ! long l; ! REAL_VALUE_TO_TARGET_SINGLE (r, l); ! fprintf (file, "0Fx%08lx", l); #else ! char s[30]; ! real_to_decimal (s, &r, sizeof (s), 0, 1); ! fprintf (file, "0f%s", s); #endif } } *************** output_move_dconst (n, s) *** 1556,1558 **** --- 1557,1577 ---- strcat (r, s); return r; } + + /* If using PIC, mark a SYMBOL_REF for a non-global symbol or a code + symbol. These symbols are referenced via pc and not via sb. */ + + static void + ns32k_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (flag_pic) + { + rtx rtl = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' + ? TREE_CST_RTL (decl) : DECL_RTL (decl)); + SYMBOL_REF_FLAG (XEXP (rtl, 0)) + = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' + || ! TREE_PUBLIC (decl)); + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/ns32k.h gcc-3.3/gcc/config/ns32k/ns32k.h *** gcc-3.2.3/gcc/config/ns32k/ns32k.h 2002-01-16 02:37:31.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/ns32k.h 2002-09-24 12:49:01.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 21,32 **** Boston, MA 02111-1307, USA. */ ! /* Note that some other tm.h files include this one and then override ! many of the definitions that relate to assembler syntax. */ ! ! /* Names to predefine in the preprocessor for this target machine. */ ! ! #define CPP_PREDEFINES "-Dns32000 -Dunix -Asystem=unix -Acpu=ns32k -Amachine=ns32k" /* Print subsidiary information on the compiler version in use. */ #define TARGET_VERSION fprintf (stderr, " (32000, GAS syntax)"); --- 21,53 ---- Boston, MA 02111-1307, USA. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__ns32000__"); \ ! \ ! /* CPU type */ \ ! if (TARGET_32532) \ ! builtin_define ("__ns32532__"); \ ! else if (TARGET_32332) \ ! builtin_define ("__ns32332__"); \ ! else \ ! builtin_define ("__ns32032__"); \ ! \ ! /* FPU type */ \ ! if (TARGET_32381) \ ! builtin_define ("__ns32381__"); \ ! else if (TARGET_32081) \ ! builtin_define ("__ns32081__"); \ ! \ ! /* Misc. */ \ ! if (TARGET_RTD) \ ! builtin_define ("__RTD__"); \ ! \ ! builtin_assert ("cpu=ns32k"); \ ! builtin_assert ("machine=ns32k"); \ ! } \ ! while (0) /* Print subsidiary information on the compiler version in use. */ #define TARGET_VERSION fprintf (stderr, " (32000, GAS syntax)"); *************** Boston, MA 02111-1307, USA. */ *** 61,128 **** extern int target_flags; /* Macros used in the machine description to test the flags. */ /* Compile 32081 insns for floating point (not library calls). */ ! #define TARGET_32081 (target_flags & 1) ! #define TARGET_32381 (target_flags & 256) /* The use of multiply-add instructions is optional because there may * be cases where it produces worse code. */ ! #define TARGET_MULT_ADD (target_flags & 512) /* Compile using rtd insn calling sequence. This will not work unless you use prototypes at least for all functions that can take varying numbers of args. */ ! #define TARGET_RTD (target_flags & 2) /* Compile passing first two args in regs 0 and 1. */ ! #define TARGET_REGPARM (target_flags & 4) /* Options to select type of CPU, for better optimization. The output is correct for any kind of 32000 regardless of these options. */ ! #define TARGET_32532 (target_flags & 8) ! #define TARGET_32332 (target_flags & 16) /* Ok to use the static base register (and presume it's 0) */ ! #define TARGET_SB ((target_flags & 32) == 0) ! #define TARGET_HIMEM (target_flags & 128) ! /* Compile using bitfield insns. */ ! #define TARGET_BITFIELD ((target_flags & 64) == 0) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } where VALUE is the bits to set or minus the bits to clear. An empty string NAME is used to identify the default VALUE. */ - #define TARGET_SWITCHES \ ! { { "32081", 1, N_("Use hardware fp")}, \ ! { "soft-float", -257, N_("Don't use hardware fp")}, \ ! { "rtd", 2, N_("Alternative calling convention")}, \ ! { "nortd", -2, N_("Use normal calling convention")}, \ ! { "regparm", 4, N_("Pass some arguments in registers")}, \ ! { "noregparm", -4, N_("Pass all arguments on stack")}, \ ! { "32532", 24, N_("Optimize for 32532 cpu")}, \ ! { "32332", 16, N_("Optimize for 32332 cpu")}, \ ! { "32332", -8, 0}, \ ! { "32032", -24, N_("Optimize for 32032")}, \ ! { "sb", -32, \ N_("Register sb is zero. Use for absolute addressing")}, \ ! { "nosb", 32, N_("Do not use register sb")}, \ ! { "bitfield", -64, N_("Do not use bit-field instructions")}, \ ! { "nobitfield", 64, N_("Use bit-field instructions")}, \ ! { "himem", 128, N_("Generate code for high memory")}, \ ! { "nohimem", -128, N_("Generate code for low memory")}, \ ! { "32381", 256, N_("32381 fpu")}, \ ! { "mult-add", 512, N_("Use multiply-accumulate fp instructions")}, \ ! { "nomult-add", -512, \ ! N_("Do not use multiply-accumulate fp instructions") }, \ ! { "src", 1024, N_("\"Small register classes\" kludge")}, \ ! { "nosrc", -1024, N_("No \"Small register classes\" kludge")}, \ { "", TARGET_DEFAULT, 0}} /* TARGET_DEFAULT is defined in encore.h, pc532.h, etc. */ --- 82,172 ---- extern int target_flags; + /* Masks for target_flags */ + #define MASK_32081 1 + #define MASK_RTD 2 + #define MASK_REGPARM 4 + #define MASK_32532 8 + #define MASK_32332 16 + #define MASK_NO_SB 32 + #define MASK_NO_BITFIELD 64 + #define MASK_HIMEM 128 + #define MASK_32381 256 + #define MASK_MULT_ADD 512 + #define MASK_SRC 1024 + #define MASK_IEEE_COMPARE 2048 + /* Macros used in the machine description to test the flags. */ /* Compile 32081 insns for floating point (not library calls). */ ! #define TARGET_32081 (target_flags & MASK_32081) ! #define TARGET_32381 (target_flags & MASK_32381) /* The use of multiply-add instructions is optional because there may * be cases where it produces worse code. */ ! #define TARGET_MULT_ADD (target_flags & MASK_MULT_ADD) /* Compile using rtd insn calling sequence. This will not work unless you use prototypes at least for all functions that can take varying numbers of args. */ ! #define TARGET_RTD (target_flags & MASK_RTD) /* Compile passing first two args in regs 0 and 1. */ ! #define TARGET_REGPARM (target_flags & MASK_REGPARM) /* Options to select type of CPU, for better optimization. The output is correct for any kind of 32000 regardless of these options. */ ! #define TARGET_32532 (target_flags & MASK_32532) ! #define TARGET_32332 (target_flags & MASK_32332) /* Ok to use the static base register (and presume it's 0) */ ! #define TARGET_SB ((target_flags & MASK_NO_SB) == 0) ! #define TARGET_HIMEM (target_flags & MASK_HIMEM) ! ! /* Compile using bit-field insns. */ ! #define TARGET_BITFIELD ((target_flags & MASK_NO_BITFIELD) == 0) ! ! #define TARGET_IEEE_COMPARE (target_flags & MASK_IEEE_COMPARE) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } where VALUE is the bits to set or minus the bits to clear. An empty string NAME is used to identify the default VALUE. */ #define TARGET_SWITCHES \ ! { { "32081", MASK_32081, N_("Use hardware fp")}, \ ! { "soft-float", -(MASK_32081|MASK_32381), \ ! N_("Don't use hardware fp")}, \ ! { "rtd", MASK_RTD, N_("Alternative calling convention")}, \ ! { "nortd", -MASK_RTD, N_("Use normal calling convention")}, \ ! { "regparm", MASK_REGPARM, N_("Pass some arguments in registers")}, \ ! { "noregparm", -MASK_REGPARM, N_("Pass all arguments on stack")}, \ ! { "32532", MASK_32532|MASK_32332, N_("Optimize for 32532 cpu")}, \ ! { "32332", MASK_32332, N_("Optimize for 32332 cpu")}, \ ! { "32332", -MASK_32532, 0}, \ ! { "32032", -(MASK_32532|MASK_32332), N_("Optimize for 32032")}, \ ! { "sb", -MASK_NO_SB, \ N_("Register sb is zero. Use for absolute addressing")}, \ ! { "nosb", MASK_NO_SB, N_("Do not use register sb")}, \ ! { "bitfield", -MASK_NO_BITFIELD, \ ! N_("Use bit-field instructions")}, \ ! { "nobitfield", MASK_NO_BITFIELD, \ ! N_("Do not use bit-field instructions")}, \ ! { "himem", MASK_HIMEM, N_("Generate code for high memory")}, \ ! { "nohimem", -MASK_HIMEM, N_("Generate code for low memory")}, \ ! { "32381", MASK_32381, N_("32381 fpu")}, \ ! { "mult-add", MASK_MULT_ADD, \ ! N_("Use multiply-accumulate fp instructions")}, \ ! { "nomult-add", -MASK_MULT_ADD, \ ! N_("Do not use multiply-accumulate fp instructions") }, \ ! { "src", MASK_SRC, N_("\"Small register classes\" kludge")}, \ ! { "nosrc", -MASK_SRC, N_("No \"Small register classes\" kludge")}, \ ! { "ieee-compare", MASK_IEEE_COMPARE, N_("Use IEEE math for fp comparisons")}, \ ! { "noieee-compare", -MASK_IEEE_COMPARE, \ ! N_("Do not use IEEE math for fp comparisons")}, \ { "", TARGET_DEFAULT, 0}} /* TARGET_DEFAULT is defined in encore.h, pc532.h, etc. */ *************** extern int target_flags; *** 130,140 **** /* When we are generating PIC, the sb is used as a pointer to the GOT. 32381 is a superset of 32081 */ ! #define OVERRIDE_OPTIONS \ ! { \ ! if (flag_pic || TARGET_HIMEM) target_flags |= 32; \ ! if (TARGET_32381) target_flags |= 1; \ ! else target_flags &= ~512; \ } /* Zero or more C statements that may conditionally modify two --- 174,191 ---- /* When we are generating PIC, the sb is used as a pointer to the GOT. 32381 is a superset of 32081 */ ! #define OVERRIDE_OPTIONS \ ! { \ ! if (target_flags & MASK_32532) \ ! target_flags |= MASK_32332; \ ! if (flag_pic || TARGET_HIMEM) \ ! target_flags |= MASK_NO_SB; \ ! if (TARGET_32381) \ ! target_flags |= MASK_32081; \ ! else \ ! target_flags &= ~MASK_MULT_ADD; \ ! if (flag_unsafe_math_optimizations) \ ! target_flags &= ~MASK_IEEE_COMPARE; \ } /* Zero or more C statements that may conditionally modify two *************** while (0) *** 196,217 **** numbered. This is not true on the ns32k. */ #define WORDS_BIG_ENDIAN 0 - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 32000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 --- 247,255 ---- *************** while (0) *** 238,244 **** /* If bit field type is int, don't let it cross an int, and give entire struct the alignment of an int. */ ! /* Required on the 386 since it doesn't have a full set of bitfield insns. (There is no signed extv insn.) */ #define PCC_BITFIELD_TYPE_MATTERS 1 --- 276,282 ---- /* If bit field type is int, don't let it cross an int, and give entire struct the alignment of an int. */ ! /* Required on the 386 since it doesn't have a full set of bit-field insns. (There is no signed extv insn.) */ #define PCC_BITFIELD_TYPE_MATTERS 1 *************** enum reg_class *** 540,546 **** After the prologue, RA is at 4(fp) in the current frame. */ #define RETURN_ADDR_RTX(COUNT, FRAME) \ ! (gen_rtx (MEM, Pmode, gen_rtx (PLUS, Pmode, (FRAME), GEN_INT(4)))) /* A C expression whose value is an integer giving the offset, in bytes, from the value of the stack pointer register to the top of --- 578,585 ---- After the prologue, RA is at 4(fp) in the current frame. */ #define RETURN_ADDR_RTX(COUNT, FRAME) \ ! ((COUNT> 0 && flag_omit_frame_pointer)? NULL_RTX \ ! : gen_rtx (MEM, Pmode, gen_rtx (PLUS, Pmode, (FRAME), GEN_INT(4)))) /* A C expression whose value is an integer giving the offset, in bytes, from the value of the stack pointer register to the top of *************** enum reg_class *** 705,716 **** { \ int regno; \ int offset = -4; \ ! for (regno = 0; regno < L1_REGNUM; regno++) \ if (regs_ever_live[regno] && ! call_used_regs[regno]) \ offset += 4; \ - for (; regno < FRAME_POINTER_REGNUM; regno++) \ - if (regs_ever_live[regno] && ! call_used_regs[regno]) \ - offset += 8; \ if (flag_pic && current_function_uses_pic_offset_table) \ offset += 4; \ (DEPTH) = (offset + get_frame_size () \ --- 744,752 ---- { \ int regno; \ int offset = -4; \ ! for (regno = 0; regno < FRAME_POINTER_REGNUM; regno++) \ if (regs_ever_live[regno] && ! call_used_regs[regno]) \ offset += 4; \ if (flag_pic && current_function_uses_pic_offset_table) \ offset += 4; \ (DEPTH) = (offset + get_frame_size () \ *************** __transfer_from_trampoline () \ *** 827,833 **** /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this ! macro on those machines to be a C expression that is non-zero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. --- 863,869 ---- /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this ! macro on those machines to be a C expression that is nonzero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. *************** __transfer_from_trampoline () \ *** 848,854 **** /* SMALL_REGISTER_CLASSES is a run time option. This should no longer be necessay and should go when we have confidence that we won't run out of spill registers */ ! #define SMALL_REGISTER_CLASSES (target_flags & 1024) /* A C expression whose value is nonzero if pseudos that have been assigned to registers of class CLASS would likely be spilled --- 884,890 ---- /* SMALL_REGISTER_CLASSES is a run time option. This should no longer be necessay and should go when we have confidence that we won't run out of spill registers */ ! #define SMALL_REGISTER_CLASSES (target_flags & MASK_SRC) /* A C expression whose value is nonzero if pseudos that have been assigned to registers of class CLASS would likely be spilled *************** __transfer_from_trampoline () \ *** 1059,1087 **** || GET_CODE (X) == LABEL_REF \ || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X))) - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or - function named by the symbol (such as what section it is in). - - On the ns32k, if using PIC, mark a SYMBOL_REF for a non-global - symbol or a code symbol. These symbols are referenced via pc - and not via sb. */ - - #define ENCODE_SECTION_INFO(DECL) \ - do \ - { \ - extern int flag_pic; \ - if (flag_pic) \ - { \ - rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ - SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ - = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - || ! TREE_PUBLIC (DECL)); \ - } \ - } \ - while (0) - /* Go to LABEL if ADDR (a legitimate address expression) has an effect that depends on the machine mode it is used for. On the ns32k, only predecrement and postincrement address depend thus --- 1095,1100 ---- *************** while (0) *** 1177,1182 **** --- 1190,1199 ---- is complemented in the F bit. */ #define CC_Z_IN_NOT_F 010000 + /* This bit means that the L bit indicates unordered (IEEE) comparison. + */ + #define CC_UNORD 020000 + /* Store in cc_status the expressions that the condition codes will describe after execution of an instruction whose pattern is EXP. *************** while (0) *** 1292,1322 **** #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ fprintf (FILE, "\tmovd tos,%s\n", reg_names[REGNO]) - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #ifndef COLLECT - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - #else - #define ASM_OUTPUT_LABEL(STREAM,NAME) \ - do { \ - fprintf (STREAM, "%s:\n", NAME); \ - } while (0) - #endif - /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! #ifndef COLLECT ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) ! #else ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do { \ ! fprintf (STREAM, "\t.globl\t%s\n", NAME); \ ! } while (0) ! #endif /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ --- 1309,1319 ---- #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ fprintf (FILE, "\tmovd tos,%s\n", reg_names[REGNO]) /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP ".globl " /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ *************** do { \ *** 1397,1404 **** #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR) ! extern unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1]; ! extern enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smallest class containing REGNO */ /* Local variables: --- 1394,1401 ---- #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR) ! extern const unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1]; ! extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smallest class containing REGNO */ /* Local variables: diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/ns32k.md gcc-3.3/gcc/config/ns32k/ns32k.md *** gcc-3.2.3/gcc/config/ns32k/ns32k.md 2002-01-11 22:46:40.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/ns32k.md 2002-09-24 12:49:01.000000000 +0000 *************** *** 94,99 **** --- 94,101 ---- "TARGET_32081" "* { cc_status.flags |= CC_REVERSED; + if (TARGET_IEEE_COMPARE) + cc_status.flags |= CC_UNORD; operands[1] = CONST0_RTX (DFmode); return \"cmpl %1,%0\"; }") *************** *** 103,108 **** --- 105,112 ---- "TARGET_32081" "* { cc_status.flags |= CC_REVERSED; + if (TARGET_IEEE_COMPARE) + cc_status.flags |= CC_UNORD; operands[1] = CONST0_RTX (SFmode); return \"cmpf %1,%0\"; }") *************** *** 202,215 **** (compare (match_operand:DF 0 "general_operand" "lmF") (match_operand:DF 1 "general_operand" "lmF")))] "TARGET_32081" ! "cmpl %0,%1") (define_insn "cmpsf" [(set (cc0) (compare (match_operand:SF 0 "general_operand" "fmF") (match_operand:SF 1 "general_operand" "fmF")))] "TARGET_32081" ! "cmpf %0,%1") ;; movdf and movsf copy between general and floating registers using ;; the stack. In principle, we could get better code not allowing --- 206,227 ---- (compare (match_operand:DF 0 "general_operand" "lmF") (match_operand:DF 1 "general_operand" "lmF")))] "TARGET_32081" ! "* ! { ! if (TARGET_IEEE_COMPARE) ! cc_status.flags |= CC_UNORD; ! return \"cmpl %0,%1\";}") (define_insn "cmpsf" [(set (cc0) (compare (match_operand:SF 0 "general_operand" "fmF") (match_operand:SF 1 "general_operand" "fmF")))] "TARGET_32081" ! "* ! { ! if (TARGET_IEEE_COMPARE) ! cc_status.flags |= CC_UNORD; ! return \"cmpf %0,%1\";}") ;; movdf and movsf copy between general and floating registers using ;; the stack. In principle, we could get better code not allowing *************** *** 293,299 **** else return \"movd %1,%0\"; }") ! (define_insn "" [(set (match_operand:TI 0 "memory_operand" "=m") (match_operand:TI 1 "memory_operand" "m"))] "" --- 305,311 ---- else return \"movd %1,%0\"; }") ! (define_insn "*movti" [(set (match_operand:TI 0 "memory_operand" "=m") (match_operand:TI 1 "memory_operand" "m"))] "" *************** *** 334,340 **** }") ;; This special case must precede movsi. ! (define_insn "" [(set (reg:SI 25) (match_operand:SI 0 "general_operand" "g"))] "" --- 346,352 ---- }") ;; This special case must precede movsi. ! (define_insn "*ldsp" [(set (reg:SI 25) (match_operand:SI 0 "general_operand" "g"))] "" *************** *** 797,804 **** "truncld %1,%0") ;; Multiply-add instructions ! (define_insn "" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=v,v,lm") (plus:DF (mult:DF (match_operand:DF 1 "general_operand" "%lmF,0,0") (match_operand:DF 2 "general_operand" "lmF,lmF,lmF")) (match_operand:DF 3 "general_operand" "0,lmF,lmF")))] --- 809,816 ---- "truncld %1,%0") ;; Multiply-add instructions ! (define_insn "*madddf" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=v,v,&lm") (plus:DF (mult:DF (match_operand:DF 1 "general_operand" "%lmF,0,0") (match_operand:DF 2 "general_operand" "lmF,lmF,lmF")) (match_operand:DF 3 "general_operand" "0,lmF,lmF")))] *************** *** 808,815 **** polyl %2,%3 mull %2,%0\;addl %3,%0") ! (define_insn "" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=u,u,fm") (plus:SF (mult:SF (match_operand:SF 1 "general_operand" "%fmF,0,0") (match_operand:SF 2 "general_operand" "fmF,fmF,fmF")) (match_operand:SF 3 "general_operand" "0,fmF,fmF")))] --- 820,827 ---- polyl %2,%3 mull %2,%0\;addl %3,%0") ! (define_insn "*maddsf" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=u,u,&fm") (plus:SF (mult:SF (match_operand:SF 1 "general_operand" "%fmF,0,0") (match_operand:SF 2 "general_operand" "fmF,fmF,fmF")) (match_operand:SF 3 "general_operand" "0,fmF,fmF")))] *************** *** 821,828 **** ;; Multiply-sub instructions ! (define_insn "" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=v,lm") (minus:DF (mult:DF (match_operand:DF 1 "general_operand" "%lmF,0") (match_operand:DF 2 "general_operand" "lmF,lmF")) (match_operand:DF 3 "general_operand" "lmF,lmF")))] --- 833,840 ---- ;; Multiply-sub instructions ! (define_insn "*msubdf" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=&v,&lm") (minus:DF (mult:DF (match_operand:DF 1 "general_operand" "%lmF,0") (match_operand:DF 2 "general_operand" "lmF,lmF")) (match_operand:DF 3 "general_operand" "lmF,lmF")))] *************** *** 831,838 **** negl %3,%0\;dotl %1,%2 mull %2,%0\;subl %3,%0") ! (define_insn "" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=u,fm") (minus:SF (mult:SF (match_operand:SF 1 "general_operand" "%fmF,0") (match_operand:SF 2 "general_operand" "fmF,fmF")) (match_operand:SF 3 "general_operand" "fmF,fmF")))] --- 843,850 ---- negl %3,%0\;dotl %1,%2 mull %2,%0\;subl %3,%0") ! (define_insn "*msubsf" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=&u,&fm") (minus:SF (mult:SF (match_operand:SF 1 "general_operand" "%fmF,0") (match_operand:SF 2 "general_operand" "fmF,fmF")) (match_operand:SF 3 "general_operand" "fmF,fmF")))] *************** *** 858,864 **** "TARGET_32081" "addf %2,%0") ! (define_insn "" [(set (reg:SI 25) (plus:SI (reg:SI 25) (match_operand:SI 0 "immediate_operand" "i")))] --- 870,876 ---- "TARGET_32081" "addf %2,%0") ! (define_insn "*add_to_sp" [(set (reg:SI 25) (plus:SI (reg:SI 25) (match_operand:SI 0 "immediate_operand" "i")))] *************** *** 883,902 **** return \"adjspd %n0\"; }") - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") - (plus:SI (reg:SI 24) - (match_operand:SI 1 "immediate_operand" "i")))] - "GET_CODE (operands[1]) == CONST_INT" - "addr %c1(fp),%0") - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") - (plus:SI (reg:SI 25) - (match_operand:SI 1 "immediate_operand" "i")))] - "GET_CODE (operands[1]) == CONST_INT" - "addr %c1(sp),%0") - (define_insn "adddi3" [(set (match_operand:DI 0 "nonimmediate_operand" "=ro") (plus:DI (match_operand:DI 1 "general_operand" "%0") --- 895,900 ---- *************** *** 940,948 **** ;; See Note 1 (define_insn "addsi3" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,=rm&<") ! (plus:SI (match_operand:SI 1 "general_operand" "%0,r") ! (match_operand:SI 2 "general_operand" "g,i")))] "" "* { --- 938,946 ---- ;; See Note 1 (define_insn "addsi3" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,=rm<,=rm<") ! (plus:SI (match_operand:SI 1 "general_operand" "%0,r,xy") ! (match_operand:SI 2 "general_operand" "g,i,i")))] "" "* { *************** *** 964,969 **** --- 962,975 ---- return \"addr %c2(%1),%0\"; } } + else if (which_alternative == 2) + { + if (GET_CODE (operands[2]) == CONST_INT && + NS32K_DISPLACEMENT_P (INTVAL (operands[2]))) + return \"addr %c2(%1),%0\"; + else + return \"sprd %1,%0\;addd %2,%0\"; + } else if (GET_CODE (operands[2]) == CONST_INT) { int i = INTVAL (operands[2]); *************** *** 992,998 **** return \"addw %2,%0\"; }") ! (define_insn "" [(set (strict_low_part (match_operand:HI 0 "register_operand" "+r")) (plus:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "g")))] --- 998,1004 ---- return \"addw %2,%0\"; }") ! (define_insn "*addhi_strict_low3" [(set (strict_low_part (match_operand:HI 0 "register_operand" "+r")) (plus:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "g")))] *************** *** 1020,1026 **** return \"addb %2,%0\"; }") ! (define_insn "" [(set (strict_low_part (match_operand:QI 0 "register_operand" "+r")) (plus:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "g")))] --- 1026,1032 ---- return \"addb %2,%0\"; }") ! (define_insn "*addqi_strict_low3" [(set (strict_low_part (match_operand:QI 0 "register_operand" "+r")) (plus:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "g")))] *************** *** 1049,1055 **** "TARGET_32081" "subf %2,%0") ! (define_insn "" [(set (reg:SI 25) (minus:SI (reg:SI 25) (match_operand:SI 0 "immediate_operand" "i")))] --- 1055,1061 ---- "TARGET_32081" "subf %2,%0") ! (define_insn "*sub_from_sp" [(set (reg:SI 25) (minus:SI (reg:SI 25) (match_operand:SI 0 "immediate_operand" "i")))] *************** *** 1135,1141 **** return \"subw %2,%0\"; }") ! (define_insn "" [(set (strict_low_part (match_operand:HI 0 "register_operand" "+r")) (minus:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "g")))] --- 1141,1147 ---- return \"subw %2,%0\"; }") ! (define_insn "*subhi_strict_low3" [(set (strict_low_part (match_operand:HI 0 "register_operand" "+r")) (minus:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "g")))] *************** *** 1164,1170 **** return \"subb %2,%0\"; }") ! (define_insn "" [(set (strict_low_part (match_operand:QI 0 "register_operand" "+r")) (minus:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "g")))] --- 1170,1176 ---- return \"subb %2,%0\"; }") ! (define_insn "*subqi_strict_low3" [(set (strict_low_part (match_operand:QI 0 "register_operand" "+r")) (minus:QI (match_operand:QI 1 "general_operand" "0") (match_operand:QI 2 "general_operand" "g")))] *************** *** 1283,1407 **** "" "deid %2,%0") ! ;; Part word variants. These seem to never be used at the moment (gcc ! ;; 2.7.2.2). The code generation prefers to zero extend hi's and qi's ! ;; and use signed div and mod. Keep these insns incase that changes. ! ;; divmod should have an advantage when both div and mod are needed. However, ! ;; divmod uses two registers, so maybe the compiler knows best. ! ! (define_expand "udivmodhi4" ! [(parallel ! [(set (match_operand:HI 0 "nonimmediate_operand" "") ! (udiv:HI (match_operand:HI 1 "general_operand" "") ! (match_operand:HI 2 "general_operand" ""))) ! (set (match_operand:HI 3 "nonimmediate_operand" "") ! (umod:HI (match_dup 1) (match_dup 2)))])] ! "" ! " ! { ! rtx temp = gen_reg_rtx(DImode); ! rtx insn, first, last; ! first = emit_move_insn(gen_lowpart(HImode, temp), operands[1]); ! emit_move_insn(gen_highpart (HImode, temp), const0_rtx); ! operands[2] = force_reg(HImode, operands[2]); ! emit_insn(gen_udivmoddihi4_internal(temp, temp, operands[2])); ! last = emit_move_insn(temp, temp); ! { ! rtx divdi, moddi, divhi, modhi; ! divhi = gen_rtx (UDIV, HImode, operands[1], operands[2]); ! modhi = gen_rtx (UMOD, HImode, operands[1], operands[2]); ! divdi = gen_rtx (ZERO_EXTEND, DImode, divhi); ! moddi = gen_rtx (ZERO_EXTEND, DImode, modhi); ! REG_NOTES (first) = gen_rtx (INSN_LIST, REG_LIBCALL, last, ! REG_NOTES (first)); ! REG_NOTES (last) = gen_rtx (INSN_LIST, REG_RETVAL, first, ! gen_rtx (EXPR_LIST, REG_EQUAL, ! gen_rtx(IOR, DImode, moddi, ! gen_rtx(ASHIFT, DImode, divdi, GEN_INT(32))), ! REG_NOTES (last))); ! } ! ! insn = emit_move_insn(operands[0], gen_highpart(HImode, temp)); ! insn = emit_move_insn(operands[3], gen_lowpart(HImode, temp)); ! DONE; ! }") ! ! ;; deiw wants two hi's in separate registers or else they can be adjacent ! ;; in memory. DI mode will ensure two registers are available, but if we ! ;; want to allow memory as an operand we would need SI mode. There is no ! ;; way to do this, so just restrict operand 0 and 1 to be in registers. ! (define_insn "udivmoddihi4_internal" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "register_operand" "0") ! (match_operand:HI 2 "general_operand" "g")] 0))] ! "" ! "deiw %2,%0") ! ! (define_insn "udivmoddihi4" ! [(set (subreg:HI (match_operand:DI 0 "register_operand" "=r") 2) ! (truncate:HI (udiv:DI (match_operand:DI 1 "register_operand" "0") ! (zero_extend:DI (match_operand:HI 2 "nonimmediate_operand" "rm"))))) ! (set (subreg:HI (match_operand:DI 3 "register_operand" "=0") 0) ! (truncate:HI (umod:DI (match_dup 1) (zero_extend:DI (match_dup 2)))))] ! "" ! "deiw %2,%0") ! ! (define_expand "udivmodqi4" ! [(parallel ! [(set (match_operand:QI 0 "nonimmediate_operand" "") ! (udiv:QI (match_operand:QI 1 "general_operand" "") ! (match_operand:QI 2 "general_operand" ""))) ! (set (match_operand:QI 3 "nonimmediate_operand" "") ! (umod:QI (match_dup 1) (match_dup 2)))])] ! "" ! " ! { ! rtx temp = gen_reg_rtx(DImode); ! rtx insn, first, last; ! first = emit_move_insn(gen_lowpart(QImode, temp), operands[1]); ! emit_move_insn(gen_highpart(QImode, temp), const0_rtx); ! operands[2] = force_reg(QImode, operands[2]); ! emit_insn(gen_udivmoddiqi4_internal(temp, temp, operands[2])); ! last = emit_move_insn(temp, temp); ! { ! rtx divdi, moddi, divqi, modqi; ! divqi = gen_rtx (UDIV, QImode, operands[1], operands[2]); ! modqi = gen_rtx (UMOD, QImode, operands[1], operands[2]); ! divdi = gen_rtx (ZERO_EXTEND, DImode, divqi); ! moddi = gen_rtx (ZERO_EXTEND, DImode, modqi); ! REG_NOTES (first) = gen_rtx (INSN_LIST, REG_LIBCALL, last, ! REG_NOTES (first)); ! REG_NOTES (last) = gen_rtx (INSN_LIST, REG_RETVAL, first, ! gen_rtx (EXPR_LIST, REG_EQUAL, ! gen_rtx(IOR, DImode, moddi, ! gen_rtx(ASHIFT, DImode, divdi, GEN_INT(32))), ! REG_NOTES (last))); ! } ! ! insn = emit_move_insn(operands[0], gen_highpart(QImode, temp)); ! insn = emit_move_insn(operands[3], gen_lowpart(QImode, temp)); ! DONE; ! }") ! ! ;; deib wants two qi's in separate registers or else they can be adjacent ! ;; in memory. DI mode will ensure two registers are available, but if we ! ;; want to allow memory as an operand we would need HI mode. There is no ! ;; way to do this, so just restrict operand 0 and 1 to be in registers. ! (define_insn "udivmoddiqi4_internal" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "register_operand" "0") ! (match_operand:QI 2 "general_operand" "g")] 0))] ! "" ! "deib %2,%0") ! ! (define_insn "udivmoddiqi4" ! [(set (subreg:QI (match_operand:DI 0 "register_operand" "=r") 1) ! (truncate:QI (udiv:DI (match_operand:DI 1 "register_operand" "0") ! (zero_extend:DI (match_operand:QI 2 "nonimmediate_operand" "rm"))))) ! (set (subreg:QI (match_operand:DI 3 "register_operand" "=0") 0) ! (truncate:QI (umod:DI (match_dup 1) (zero_extend:DI (match_dup 2)))))] ! "" ! "deib %2,%0") ;;- Divide instructions. --- 1289,1413 ---- "" "deid %2,%0") ! ;;;; Part word variants. These seem to never be used at the moment (gcc ! ;;;; 2.7.2.2). The code generation prefers to zero extend hi's and qi's ! ;;;; and use signed div and mod. Keep these insns incase that changes. ! ;;;; divmod should have an advantage when both div and mod are needed. However, ! ;;;; divmod uses two registers, so maybe the compiler knows best. ! ;; ! ;;(define_expand "udivmodhi4" ! ;; [(parallel ! ;; [(set (match_operand:HI 0 "nonimmediate_operand" "") ! ;; (udiv:HI (match_operand:HI 1 "general_operand" "") ! ;; (match_operand:HI 2 "general_operand" ""))) ! ;; (set (match_operand:HI 3 "nonimmediate_operand" "") ! ;; (umod:HI (match_dup 1) (match_dup 2)))])] ! ;; "" ! ;; " ! ;;{ ! ;; rtx temp = gen_reg_rtx(DImode); ! ;; rtx insn, first, last; ! ;; first = emit_move_insn(gen_lowpart(HImode, temp), operands[1]); ! ;; emit_move_insn(gen_highpart (HImode, temp), const0_rtx); ! ;; operands[2] = force_reg(HImode, operands[2]); ! ;; emit_insn(gen_udivmoddihi4_internal(temp, temp, operands[2])); ! ;; last = emit_move_insn(temp, temp); ! ;; { ! ;; rtx divdi, moddi, divhi, modhi; ! ;; divhi = gen_rtx (UDIV, HImode, operands[1], operands[2]); ! ;; modhi = gen_rtx (UMOD, HImode, operands[1], operands[2]); ! ;; divdi = gen_rtx (ZERO_EXTEND, DImode, divhi); ! ;; moddi = gen_rtx (ZERO_EXTEND, DImode, modhi); ! ;; REG_NOTES (first) = gen_rtx (INSN_LIST, REG_LIBCALL, last, ! ;; REG_NOTES (first)); ! ;; REG_NOTES (last) = gen_rtx (INSN_LIST, REG_RETVAL, first, ! ;; gen_rtx (EXPR_LIST, REG_EQUAL, ! ;; gen_rtx(IOR, DImode, moddi, ! ;; gen_rtx(ASHIFT, DImode, divdi, GEN_INT(32))), ! ;; REG_NOTES (last))); ! ;; } ! ;; ! ;; insn = emit_move_insn(operands[0], gen_highpart(HImode, temp)); ! ;; insn = emit_move_insn(operands[3], gen_lowpart(HImode, temp)); ! ;; DONE; ! ;;}") ! ;; ! ;;;; deiw wants two hi's in separate registers or else they can be adjacent ! ;;;; in memory. DI mode will ensure two registers are available, but if we ! ;;;; want to allow memory as an operand we would need SI mode. There is no ! ;;;; way to do this, so just restrict operand 0 and 1 to be in registers. ! ;;(define_insn "udivmoddihi4_internal" ! ;; [(set (match_operand:DI 0 "register_operand" "=r") ! ;; (unspec:DI [(match_operand:DI 1 "register_operand" "0") ! ;; (match_operand:HI 2 "general_operand" "g")] 0))] ! ;; "" ! ;; "deiw %2,%0") ! ;; ! ;;(define_insn "udivmoddihi4" ! ;; [(set (subreg:HI (match_operand:DI 0 "register_operand" "=r") 2) ! ;; (truncate:HI (udiv:DI (match_operand:DI 1 "register_operand" "0") ! ;; (zero_extend:DI (match_operand:HI 2 "nonimmediate_operand" "rm"))))) ! ;; (set (subreg:HI (match_operand:DI 3 "register_operand" "=0") 0) ! ;; (truncate:HI (umod:DI (match_dup 1) (zero_extend:DI (match_dup 2)))))] ! ;; "" ! ;; "deiw %2,%0") ! ;; ! ;;(define_expand "udivmodqi4" ! ;; [(parallel ! ;; [(set (match_operand:QI 0 "nonimmediate_operand" "") ! ;; (udiv:QI (match_operand:QI 1 "general_operand" "") ! ;; (match_operand:QI 2 "general_operand" ""))) ! ;; (set (match_operand:QI 3 "nonimmediate_operand" "") ! ;; (umod:QI (match_dup 1) (match_dup 2)))])] ! ;; "" ! ;; " ! ;;{ ! ;; rtx temp = gen_reg_rtx(DImode); ! ;; rtx insn, first, last; ! ;; first = emit_move_insn(gen_lowpart(QImode, temp), operands[1]); ! ;; emit_move_insn(gen_highpart(QImode, temp), const0_rtx); ! ;; operands[2] = force_reg(QImode, operands[2]); ! ;; emit_insn(gen_udivmoddiqi4_internal(temp, temp, operands[2])); ! ;; last = emit_move_insn(temp, temp); ! ;; { ! ;; rtx divdi, moddi, divqi, modqi; ! ;; divqi = gen_rtx (UDIV, QImode, operands[1], operands[2]); ! ;; modqi = gen_rtx (UMOD, QImode, operands[1], operands[2]); ! ;; divdi = gen_rtx (ZERO_EXTEND, DImode, divqi); ! ;; moddi = gen_rtx (ZERO_EXTEND, DImode, modqi); ! ;; REG_NOTES (first) = gen_rtx (INSN_LIST, REG_LIBCALL, last, ! ;; REG_NOTES (first)); ! ;; REG_NOTES (last) = gen_rtx (INSN_LIST, REG_RETVAL, first, ! ;; gen_rtx (EXPR_LIST, REG_EQUAL, ! ;; gen_rtx(IOR, DImode, moddi, ! ;; gen_rtx(ASHIFT, DImode, divdi, GEN_INT(32))), ! ;; REG_NOTES (last))); ! ;; } ! ;; ! ;; insn = emit_move_insn(operands[0], gen_highpart(QImode, temp)); ! ;; insn = emit_move_insn(operands[3], gen_lowpart(QImode, temp)); ! ;; DONE; ! ;;}") ! ;; ! ;;;; deib wants two qi's in separate registers or else they can be adjacent ! ;;;; in memory. DI mode will ensure two registers are available, but if we ! ;;;; want to allow memory as an operand we would need HI mode. There is no ! ;;;; way to do this, so just restrict operand 0 and 1 to be in registers. ! ;;(define_insn "udivmoddiqi4_internal" ! ;; [(set (match_operand:DI 0 "register_operand" "=r") ! ;; (unspec:DI [(match_operand:DI 1 "register_operand" "0") ! ;; (match_operand:QI 2 "general_operand" "g")] 0))] ! ;; "" ! ;; "deib %2,%0") ! ;; ! ;;(define_insn "udivmoddiqi4" ! ;; [(set (subreg:QI (match_operand:DI 0 "register_operand" "=r") 1) ! ;; (truncate:QI (udiv:DI (match_operand:DI 1 "register_operand" "0") ! ;; (zero_extend:DI (match_operand:QI 2 "nonimmediate_operand" "rm"))))) ! ;; (set (subreg:QI (match_operand:DI 3 "register_operand" "=0") 0) ! ;; (truncate:QI (umod:DI (match_dup 1) (zero_extend:DI (match_dup 2)))))] ! ;; "" ! ;; "deib %2,%0") ;;- Divide instructions. *************** *** 1531,1551 **** "andb %2,%0") ;; See note 1 ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (and:SI (not:SI (match_operand:SI 1 "general_operand" "g")) (match_operand:SI 2 "general_operand" "0")))] "" "bicd %1,%0") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (and:HI (not:HI (match_operand:HI 1 "general_operand" "g")) (match_operand:HI 2 "general_operand" "0")))] "" "bicw %1,%0") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (and:QI (not:QI (match_operand:QI 1 "general_operand" "g")) (match_operand:QI 2 "general_operand" "0")))] --- 1537,1557 ---- "andb %2,%0") ;; See note 1 ! (define_insn "*bicsi" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (and:SI (not:SI (match_operand:SI 1 "general_operand" "g")) (match_operand:SI 2 "general_operand" "0")))] "" "bicd %1,%0") ! (define_insn "*bichi" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (and:HI (not:HI (match_operand:HI 1 "general_operand" "g")) (match_operand:HI 2 "general_operand" "0")))] "" "bicw %1,%0") ! (define_insn "*bicqi" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (and:QI (not:QI (match_operand:QI 1 "general_operand" "g")) (match_operand:QI 2 "general_operand" "0")))] *************** *** 1778,1791 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (ashiftrt:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "ashd %n2,%0") ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (ashiftrt:SI (match_operand:SI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1784,1797 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*ashrisi3" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (ashiftrt:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "ashd %n2,%0") ! (define_insn "*ashrsi3" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (ashiftrt:SI (match_operand:SI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 1803,1816 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (ashiftrt:HI (match_operand:HI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "ashw %n2,%0") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (ashiftrt:HI (match_operand:HI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1809,1822 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*ashrihi3" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (ashiftrt:HI (match_operand:HI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "ashw %n2,%0") ! (define_insn "*ashrhi3" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (ashiftrt:HI (match_operand:HI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 1828,1841 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (ashiftrt:QI (match_operand:QI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "ashb %n2,%0") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (ashiftrt:QI (match_operand:QI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1834,1847 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*ashriqi3" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (ashiftrt:QI (match_operand:QI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "ashb %n2,%0") ! (define_insn "*ashrqi3" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (ashiftrt:QI (match_operand:QI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 1856,1869 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (lshiftrt:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "lshd %n2,%0") ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (lshiftrt:SI (match_operand:SI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1862,1875 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*lshrisi3" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (lshiftrt:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "lshd %n2,%0") ! (define_insn "*lshrsi3" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (lshiftrt:SI (match_operand:SI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 1881,1894 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (lshiftrt:HI (match_operand:HI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "lshw %n2,%0") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (lshiftrt:HI (match_operand:HI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1887,1900 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*lshrihi3" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (lshiftrt:HI (match_operand:HI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "lshw %n2,%0") ! (define_insn "*lshrhi3" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (lshiftrt:HI (match_operand:HI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 1906,1919 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (lshiftrt:QI (match_operand:QI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "lshb %n2,%0") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (lshiftrt:QI (match_operand:QI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1912,1925 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*lshriqi3" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (lshiftrt:QI (match_operand:QI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "lshb %n2,%0") ! (define_insn "*lshrqi3" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (lshiftrt:QI (match_operand:QI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 1956,1969 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (rotatert:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "rotd %n2,%0") ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (rotatert:SI (match_operand:SI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1962,1975 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*rotrisi3" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (rotatert:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "rotd %n2,%0") ! (define_insn "*rotrsi3" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm") (rotatert:SI (match_operand:SI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 1981,1994 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (rotatert:HI (match_operand:HI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "rotw %n2,%0") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (rotatert:HI (match_operand:HI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 1987,2000 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*rotrihi3" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (rotatert:HI (match_operand:HI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "rotw %n2,%0") ! (define_insn "*rotrhi3" [(set (match_operand:HI 0 "nonimmediate_operand" "=rm") (rotatert:HI (match_operand:HI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 2006,2019 **** operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (rotatert:QI (match_operand:QI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "rotb %n2,%0") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (rotatert:QI (match_operand:QI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] --- 2012,2025 ---- operands[2] = gen_rtx_NEG (SImode, negate_rtx (SImode, operands[2])); }") ! (define_insn "*rotriqi3" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (rotatert:QI (match_operand:QI 1 "general_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "" "rotb %n2,%0") ! (define_insn "*rotrqi3" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (rotatert:QI (match_operand:QI 1 "general_operand" "0") (neg:SI (match_operand:SI 2 "register_operand" "r"))))] *************** *** 2024,2030 **** ;; These come after the move, add, and multiply patterns ;; because we don't want pushl $1 turned into pushad 1. ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (match_operand:QI 1 "address_operand" "p"))] "" --- 2030,2036 ---- ;; These come after the move, add, and multiply patterns ;; because we don't want pushl $1 turned into pushad 1. ! (define_insn "*addrsi" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (match_operand:QI 1 "address_operand" "p"))] "" *************** *** 2068,2074 **** ;; Set, Clear, and Invert bit ;; See note 1 ! (define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "nonimmediate_operand" "+rm") (const_int 1) (match_operand:SI 1 "general_operand" "g")) --- 2074,2080 ---- ;; Set, Clear, and Invert bit ;; See note 1 ! (define_insn "*sbitsi" [(set (zero_extract:SI (match_operand:SI 0 "nonimmediate_operand" "+rm") (const_int 1) (match_operand:SI 1 "general_operand" "g")) *************** *** 2077,2083 **** "sbitd %1,%0") ;; See note 1 ! (define_insn "" [(set (zero_extract:SI (match_operand:SI 0 "nonimmediate_operand" "+rm") (const_int 1) (match_operand:SI 1 "general_operand" "g")) --- 2083,2089 ---- "sbitd %1,%0") ;; See note 1 ! (define_insn "*cbitsi" [(set (zero_extract:SI (match_operand:SI 0 "nonimmediate_operand" "+rm") (const_int 1) (match_operand:SI 1 "general_operand" "g")) *************** *** 2086,2092 **** "cbitd %1,%0") ;; See note 1 ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "+rm") (xor:SI (ashift:SI (const_int 1) (match_operand:SI 1 "general_operand" "g")) --- 2092,2098 ---- "cbitd %1,%0") ;; See note 1 ! (define_insn "*ibitsi" [(set (match_operand:SI 0 "nonimmediate_operand" "+rm") (xor:SI (ashift:SI (const_int 1) (match_operand:SI 1 "general_operand" "g")) *************** *** 2095,2101 **** "ibitd %1,%0") ;; See note 1 ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (xor:QI (subreg:QI (ashift:SI (const_int 1) --- 2101,2107 ---- "ibitd %1,%0") ;; See note 1 ! (define_insn "*ibitqi" [(set (match_operand:QI 0 "nonimmediate_operand" "=rm") (xor:QI (subreg:QI (ashift:SI (const_int 1) *************** *** 2106,2112 **** ;; Recognize jbs and jbc instructions. ! (define_insn "" [(set (cc0) (zero_extract (match_operand:SI 0 "nonimmediate_operand" "rm") (const_int 1) --- 2112,2118 ---- ;; Recognize jbs and jbc instructions. ! (define_insn "*tbit" [(set (cc0) (zero_extract (match_operand:SI 0 "nonimmediate_operand" "rm") (const_int 1) *************** *** 2118,2124 **** }") ;; extract(base, width, offset) ! ;; Signed bitfield extraction is not supported in hardware on the ;; NS 32032. It is therefore better to let GCC figure out a ;; good strategy for generating the proper instruction sequence ;; and represent it as rtl. --- 2124,2130 ---- }") ;; extract(base, width, offset) ! ;; Signed bit-field extraction is not supported in hardware on the ;; NS 32032. It is therefore better to let GCC figure out a ;; good strategy for generating the proper instruction sequence ;; and represent it as rtl. *************** *** 2130,2136 **** ;; we cannot use it for a destination. Perhaps things are fast ;; enough on the 32532 that such hacks are not needed. ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=ro") (zero_extract:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "const_int_operand" "i") --- 2136,2142 ---- ;; we cannot use it for a destination. Perhaps things are fast ;; enough on the 32532 that such hacks are not needed. ! (define_insn "*extract_bytes" [(set (match_operand:SI 0 "nonimmediate_operand" "=ro") (zero_extract:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "const_int_operand" "i") *************** *** 2163,2169 **** }") ;; The exts/ext instructions have the problem that they always access ! ;; 32 bits even if the bitfield is smaller. For example the instruction ;; extsd 7(r1),r0,2,5 ;; would read not only at address 7(r1) but also at 8(r1) to 10(r1). ;; If these addresses are in a different (unmapped) page a memory fault --- 2169,2175 ---- }") ;; The exts/ext instructions have the problem that they always access ! ;; 32 bits even if the bit-field is smaller. For example the instruction ;; extsd 7(r1),r0,2,5 ;; would read not only at address 7(r1) but also at 8(r1) to 10(r1). ;; If these addresses are in a different (unmapped) page a memory fault *************** *** 2182,2188 **** ;; A machine specific option (-mbitfield/-mnobitfield) is used ;; to allow/disallow the use of these instructions. ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (zero_extract:SI (match_operand:SI 1 "register_operand" "g") (match_operand:SI 2 "const_int_operand" "i") --- 2188,2194 ---- ;; A machine specific option (-mbitfield/-mnobitfield) is used ;; to allow/disallow the use of these instructions. ! (define_insn "*bitfield_ext" [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (zero_extract:SI (match_operand:SI 1 "register_operand" "g") (match_operand:SI 2 "const_int_operand" "i") *************** *** 2206,2221 **** else return \"extd %3,%1,%0,%2\"; }") ! (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "memory_operand" "+o") ! (match_operand:SI 1 "const_int_operand" "i") ! (match_operand:SI 2 "nonmemory_operand" "rn")) ! (match_operand:SI 3 "nonimmediate_operand" "rm"))] "TARGET_BITFIELD" "* { if (GET_CODE (operands[2]) == CONST_INT) { ! if (INTVAL (operands[2]) >= 8) { operands[0] = adjust_address (operands[0], QImode, INTVAL (operands[2]) / 8); --- 2212,2227 ---- else return \"extd %3,%1,%0,%2\"; }") ! (define_insn "*bitfield_set" ! [(set (zero_extract:SI (match_operand:SI 0 "memory_operand" "+o,+r") ! (match_operand:SI 1 "const_int_operand" "i,i") ! (match_operand:SI 2 "nonmemory_operand" "rn,rK")) ! (match_operand:SI 3 "nonimmediate_operand" "rm,rm"))] "TARGET_BITFIELD" "* { if (GET_CODE (operands[2]) == CONST_INT) { ! if (which_alternative == 0 && INTVAL (operands[2]) >= 8) { operands[0] = adjust_address (operands[0], QImode, INTVAL (operands[2]) / 8); *************** *** 2231,2254 **** return \"insd %2,%3,%0,%1\"; }") - (define_insn "" - [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r") - (match_operand:SI 1 "const_int_operand" "i") - (match_operand:SI 2 "nonmemory_operand" "rK")) - (match_operand:SI 3 "nonimmediate_operand" "rm"))] - "TARGET_BITFIELD" - "* - { if (GET_CODE (operands[2]) == CONST_INT) - { - if (INTVAL (operands[1]) <= 8) - return \"inssb %3,%0,%2,%1\"; - else if (INTVAL (operands[1]) <= 16) - return \"inssw %3,%0,%2,%1\"; - else - return \"inssd %3,%0,%2,%1\"; - } - return \"insd %2,%3,%0,%1\"; - }") (define_insn "insv" [(set (zero_extract:SI (match_operand:QI 0 "nonimmediate_operand" "+rm") --- 2237,2242 ---- *************** *** 2331,2337 **** (label_ref (match_operand 0 "" "")) (pc)))] "" ! "blt %l0") (define_insn "bltu" [(set (pc) --- 2319,2331 ---- (label_ref (match_operand 0 "" "")) (pc)))] "" ! "* ! { ! if (cc_prev_status.flags & CC_UNORD) ! return \"bhi 0f\;blt %l0\;0:\"; ! else ! return \"blt %l0\"; ! }") (define_insn "bltu" [(set (pc) *************** *** 2367,2373 **** (label_ref (match_operand 0 "" "")) (pc)))] "" ! "ble %l0") (define_insn "bleu" [(set (pc) --- 2361,2373 ---- (label_ref (match_operand 0 "" "")) (pc)))] "" ! "* ! { ! if (cc_prev_status.flags & CC_UNORD) ! return \"bhi 0f\;ble %l0\;0:\"; ! else ! return \"ble %l0\"; ! }") (define_insn "bleu" [(set (pc) *************** *** 2378,2384 **** "" "bls %l0") ! (define_insn "" [(set (pc) (if_then_else (eq (cc0) (const_int 0)) --- 2378,2386 ---- "" "bls %l0") ! ;; "Reversed" jump instructions. Are these ever generated? ! ! (define_insn "*bne" [(set (pc) (if_then_else (eq (cc0) (const_int 0)) *************** *** 2393,2399 **** else return \"bne %l0\"; }") ! (define_insn "" [(set (pc) (if_then_else (ne (cc0) (const_int 0)) --- 2395,2401 ---- else return \"bne %l0\"; }") ! (define_insn "*beq" [(set (pc) (if_then_else (ne (cc0) (const_int 0)) *************** *** 2408,2423 **** else return \"beq %l0\"; }") ! (define_insn "" [(set (pc) (if_then_else (gt (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" ! "ble %l0") ! (define_insn "" [(set (pc) (if_then_else (gtu (cc0) (const_int 0)) --- 2410,2431 ---- else return \"beq %l0\"; }") ! (define_insn "*ble" [(set (pc) (if_then_else (gt (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" ! "* ! { ! if (cc_prev_status.flags & CC_UNORD) ! return \"bhi 0f\;ble %l0\;0:\"; ! else ! return \"ble %l0\"; ! }") ! (define_insn "*bleu" [(set (pc) (if_then_else (gtu (cc0) (const_int 0)) *************** *** 2426,2432 **** "" "bls %l0") ! (define_insn "" [(set (pc) (if_then_else (lt (cc0) (const_int 0)) --- 2434,2440 ---- "" "bls %l0") ! (define_insn "*bge" [(set (pc) (if_then_else (lt (cc0) (const_int 0)) *************** *** 2435,2441 **** "" "bge %l0") ! (define_insn "" [(set (pc) (if_then_else (ltu (cc0) (const_int 0)) --- 2443,2449 ---- "" "bge %l0") ! (define_insn "*bgeu" [(set (pc) (if_then_else (ltu (cc0) (const_int 0)) *************** *** 2444,2459 **** "" "bhs %l0") ! (define_insn "" [(set (pc) (if_then_else (ge (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" ! "blt %l0") ! (define_insn "" [(set (pc) (if_then_else (geu (cc0) (const_int 0)) --- 2452,2473 ---- "" "bhs %l0") ! (define_insn "*blt" [(set (pc) (if_then_else (ge (cc0) (const_int 0)) (pc) (label_ref (match_operand 0 "" ""))))] "" ! "* ! { ! if (cc_prev_status.flags & CC_UNORD) ! return \"bhi 0f\;blt %l0\;0:\"; ! else ! return \"blt %l0\"; ! }") ! (define_insn "*bltu" [(set (pc) (if_then_else (geu (cc0) (const_int 0)) *************** *** 2462,2468 **** "" "blo %l0") ! (define_insn "" [(set (pc) (if_then_else (le (cc0) (const_int 0)) --- 2476,2482 ---- "" "blo %l0") ! (define_insn "*bgt" [(set (pc) (if_then_else (le (cc0) (const_int 0)) *************** *** 2471,2477 **** "" "bgt %l0") ! (define_insn "" [(set (pc) (if_then_else (leu (cc0) (const_int 0)) --- 2485,2491 ---- "" "bgt %l0") ! (define_insn "*bgtu" [(set (pc) (if_then_else (leu (cc0) (const_int 0)) *************** *** 2483,2489 **** ;; Subtract-and-jump and Add-and-jump insns. ;; These can actually be used for adding numbers in the range -8 to 7 ! (define_insn "" [(set (pc) (if_then_else (ne (match_operand:SI 0 "nonimmediate_operand" "+rm") --- 2497,2503 ---- ;; Subtract-and-jump and Add-and-jump insns. ;; These can actually be used for adding numbers in the range -8 to 7 ! (define_insn "*sub_br" [(set (pc) (if_then_else (ne (match_operand:SI 0 "nonimmediate_operand" "+rm") *************** *** 2496,2502 **** "INTVAL (operands[1]) > -8 && INTVAL (operands[1]) <= 8" "acbd %n1,%0,%l2") ! (define_insn "" [(set (pc) (if_then_else (ne (match_operand:SI 0 "nonimmediate_operand" "+rm") --- 2510,2516 ---- "INTVAL (operands[1]) > -8 && INTVAL (operands[1]) <= 8" "acbd %n1,%0,%l2") ! (define_insn "*add_br" [(set (pc) (if_then_else (ne (match_operand:SI 0 "nonimmediate_operand" "+rm") *************** *** 2512,2518 **** (define_insn "call" [(call (match_operand:QI 0 "memory_operand" "m") ! (match_operand:QI 1 "general_operand" "g"))] "" "* { --- 2526,2533 ---- (define_insn "call" [(call (match_operand:QI 0 "memory_operand" "m") ! (match_operand 1 "" ""))] ! ;; Operand 1 is not used "" "* { *************** *** 2551,2557 **** (define_insn "call_value" [(set (match_operand 0 "" "=rf") (call (match_operand:QI 1 "memory_operand" "m") ! (match_operand:QI 2 "general_operand" "g")))] "" "* { --- 2566,2573 ---- (define_insn "call_value" [(set (match_operand 0 "" "=rf") (call (match_operand:QI 1 "memory_operand" "m") ! (match_operand 2 "" "")))] ! ;; Operand 2 is not used "" "* { *************** *** 2684,2690 **** ;; Scondi instructions (define_insn "seq" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (eq:SI (cc0) (const_int 0)))] "" "* --- 2700,2706 ---- ;; Scondi instructions (define_insn "seq" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (eq:SI (cc0) (const_int 0)))] "" "* *************** *** 2695,2702 **** else return \"seqd %0\"; }") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (eq:HI (cc0) (const_int 0)))] "" "* --- 2711,2718 ---- else return \"seqd %0\"; }") ! (define_insn "*seqhi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (eq:HI (cc0) (const_int 0)))] "" "* *************** *** 2707,2714 **** else return \"seqw %0\"; }") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (eq:QI (cc0) (const_int 0)))] "" "* --- 2723,2730 ---- else return \"seqw %0\"; }") ! (define_insn "*seqqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (eq:QI (cc0) (const_int 0)))] "" "* *************** *** 2720,2726 **** }") (define_insn "sne" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (ne:SI (cc0) (const_int 0)))] "" "* --- 2736,2742 ---- }") (define_insn "sne" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (ne:SI (cc0) (const_int 0)))] "" "* *************** *** 2731,2738 **** else return \"sned %0\"; }") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (ne:HI (cc0) (const_int 0)))] "" "* --- 2747,2754 ---- else return \"sned %0\"; }") ! (define_insn "*snehi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (ne:HI (cc0) (const_int 0)))] "" "* *************** *** 2743,2750 **** else return \"snew %0\"; }") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (ne:QI (cc0) (const_int 0)))] "" "* --- 2759,2766 ---- else return \"snew %0\"; }") ! (define_insn "*sneqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (ne:QI (cc0) (const_int 0)))] "" "* *************** *** 2756,2907 **** }") (define_insn "sgt" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (gt:SI (cc0) (const_int 0)))] "" "sgtd %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (gt:HI (cc0) (const_int 0)))] "" "sgtw %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (gt:QI (cc0) (const_int 0)))] "" "sgtb %0") (define_insn "sgtu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (gtu:SI (cc0) (const_int 0)))] "" "shid %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (gtu:HI (cc0) (const_int 0)))] "" "shiw %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (gtu:QI (cc0) (const_int 0)))] "" "shib %0") (define_insn "slt" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (lt:SI (cc0) (const_int 0)))] "" "sltd %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (lt:HI (cc0) (const_int 0)))] "" "sltw %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (lt:QI (cc0) (const_int 0)))] "" "sltb %0") (define_insn "sltu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (ltu:SI (cc0) (const_int 0)))] "" "slod %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (ltu:HI (cc0) (const_int 0)))] "" "slow %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (ltu:QI (cc0) (const_int 0)))] "" "slob %0") (define_insn "sge" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (ge:SI (cc0) (const_int 0)))] "" "sged %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (ge:HI (cc0) (const_int 0)))] "" "sgew %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (ge:QI (cc0) (const_int 0)))] "" "sgeb %0") (define_insn "sgeu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (geu:SI (cc0) (const_int 0)))] "" "shsd %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (geu:HI (cc0) (const_int 0)))] "" "shsw %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (geu:QI (cc0) (const_int 0)))] "" "shsb %0") (define_insn "sle" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (le:SI (cc0) (const_int 0)))] "" "sled %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (le:HI (cc0) (const_int 0)))] "" "slew %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (le:QI (cc0) (const_int 0)))] "" "sleb %0") (define_insn "sleu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=rm<") (leu:SI (cc0) (const_int 0)))] "" "slsd %0") ! (define_insn "" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=rm<") (leu:HI (cc0) (const_int 0)))] "" "slsw %0") ! (define_insn "" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=rm<") (leu:QI (cc0) (const_int 0)))] "" "slsb %0") ;; ffs instructions ! (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=ro") (minus:SI (plus:SI (ffs:SI (zero_extract:SI --- 2772,2923 ---- }") (define_insn "sgt" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (gt:SI (cc0) (const_int 0)))] "" "sgtd %0") ! (define_insn "*sgthi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (gt:HI (cc0) (const_int 0)))] "" "sgtw %0") ! (define_insn "*sgtqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (gt:QI (cc0) (const_int 0)))] "" "sgtb %0") (define_insn "sgtu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (gtu:SI (cc0) (const_int 0)))] "" "shid %0") ! (define_insn "*sgtuhi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (gtu:HI (cc0) (const_int 0)))] "" "shiw %0") ! (define_insn "*sgtuqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (gtu:QI (cc0) (const_int 0)))] "" "shib %0") (define_insn "slt" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (lt:SI (cc0) (const_int 0)))] "" "sltd %0") ! (define_insn "*slthi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (lt:HI (cc0) (const_int 0)))] "" "sltw %0") ! (define_insn "*sltqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (lt:QI (cc0) (const_int 0)))] "" "sltb %0") (define_insn "sltu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (ltu:SI (cc0) (const_int 0)))] "" "slod %0") ! (define_insn "*sltuhi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (ltu:HI (cc0) (const_int 0)))] "" "slow %0") ! (define_insn "*sltuqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (ltu:QI (cc0) (const_int 0)))] "" "slob %0") (define_insn "sge" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (ge:SI (cc0) (const_int 0)))] "" "sged %0") ! (define_insn "*sgehi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (ge:HI (cc0) (const_int 0)))] "" "sgew %0") ! (define_insn "*sgeqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (ge:QI (cc0) (const_int 0)))] "" "sgeb %0") (define_insn "sgeu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (geu:SI (cc0) (const_int 0)))] "" "shsd %0") ! (define_insn "*sgeuhi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (geu:HI (cc0) (const_int 0)))] "" "shsw %0") ! (define_insn "*sgeuqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (geu:QI (cc0) (const_int 0)))] "" "shsb %0") (define_insn "sle" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (le:SI (cc0) (const_int 0)))] "" "sled %0") ! (define_insn "*slehi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (le:HI (cc0) (const_int 0)))] "" "slew %0") ! (define_insn "*sleqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (le:QI (cc0) (const_int 0)))] "" "sleb %0") (define_insn "sleu" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r<") (leu:SI (cc0) (const_int 0)))] "" "slsd %0") ! (define_insn "*sleuhi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=r<") (leu:HI (cc0) (const_int 0)))] "" "slsw %0") ! (define_insn "*sleuqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=r<") (leu:QI (cc0) (const_int 0)))] "" "slsb %0") ;; ffs instructions ! (define_insn "*ffs" [(set (match_operand:SI 0 "nonimmediate_operand" "=ro") (minus:SI (plus:SI (ffs:SI (zero_extract:SI diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/pc532.h gcc-3.3/gcc/config/ns32k/pc532.h *** gcc-3.2.3/gcc/config/ns32k/pc532.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/pc532.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,73 **** - /* Definitions of target machine for GNU compiler. - PC532 with National 32532. - Copyright (C) 1990, 1994 Free Software Foundation, Inc. - Contributed by Jukka Virtanen , Jyrki Kuoppala , - Tatu Yl|nen , Johannes Helander . - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "ns32k/ns32k.h" - - /* Compile for the floating point unit & 32532 by default; - also presume SB is zero and no bitfield instructions */ - - #define TARGET_DEFAULT (1 + 24 + 64) - - /* Write DBX debugging info for gdb to read */ - - #define DBX_DEBUGGING_INFO - - /* Use the re-entrant and potentially faster method */ - - #undef PCC_STATIC_STRUCT_RETURN - - /* 32-bit alignment for efficiency */ - #undef POINTER_BOUNDARY - #define POINTER_BOUNDARY 32 - - /* 32-bit alignment for efficiency */ - #undef FUNCTION_BOUNDARY - #define FUNCTION_BOUNDARY 32 - - /* 32532 spec says it can handle any alignment. Rumor from tm-ns32k.h - tells this might not be actually true (but it's for 32032, perhaps - National has fixed the bug for 32532). You might have to change this - if the bug still exists. */ - - #undef STRICT_ALIGNMENT - #define STRICT_ALIGNMENT 0 - - /* Maybe someone needs to know which processor we're running on */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dns32000 -Dns32532 -Dpc532 -Dunix -Asystem=unix -Acpu=ns32k -Amachine=ns32k" - - /* Use pc relative addressing whenever possible, - it's more efficient than absolute (ns32k.c) - You have to fix a bug in gas 1.38.1 to make this work with gas, - patch available from jkp@cs.hut.fi. */ - - #define PC_RELATIVE - - /* Operand of bsr or jsr should be just the address. */ - - #define CALL_MEMREF_IMPLICIT - - /* movd insns may have floating point constant operands. */ - - #define MOVD_FLOAT_OK --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/pc532-mach.h gcc-3.3/gcc/config/ns32k/pc532-mach.h *** gcc-3.2.3/gcc/config/ns32k/pc532-mach.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/pc532-mach.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,30 **** - /* Definitions of target machine for GNU compiler. - PC532 with National 32532, running Mach 3.0. - Copyright (C) 1992, 1994 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "ns32k/pc532.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dns32532 -DPC532 -DMACH=1 -Asystem=unix -Asystem=mach -Acpu=ns32k -Amachine=ns32k" - - /* There's a bug in the setjmp implementation that strikes - if the caller of setjmp doesn't have a frame pointer. */ - #undef FRAME_POINTER_REQUIRED - #define FRAME_POINTER_REQUIRED current_function_calls_setjmp --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/pc532-min.h gcc-3.3/gcc/config/ns32k/pc532-min.h *** gcc-3.2.3/gcc/config/ns32k/pc532-min.h 1999-09-15 21:41:15.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/pc532-min.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,37 **** - /* Definitions of target machine for GNU compiler. - PC532 with National 32532, running Minix. - Works with pc532 Minix 1.5hybrid. - Copyright (C) 1990, 1999 Free Software Foundation, Inc. - - Derived from SEQUENT NS32000, written originally - by Bruce Culbertson , - hacked for easier fit in gcc by Jyrki Kuoppala . - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "ns32k/pc532.h" - - /* Minix has crtso.o instead of crt0.o */ - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ - "%{pg:gcrtso.o%s}%{!pg:%{p:mcrtso.o%s}%{!p:crtso.o%s}}" - - /* our setjmp doesn't save registers, so we must tell gcc to save - call-saved-regs in a function calling setjmp */ - - #define NON_SAVING_SETJMP (current_function_calls_setjmp) --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/sequent.h gcc-3.3/gcc/config/ns32k/sequent.h *** gcc-3.2.3/gcc/config/ns32k/sequent.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/sequent.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,77 **** - /* Definitions of target machine for GNU compiler. SEQUENT NS32000 version. - Copyright (C) 1987, 2000 Free Software Foundation, Inc. - Contributed by Michael Tiemann (tiemann@mcc.com) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #include "ns32k/ns32k.h" - - /* This is BSD, so it wants DBX format. */ - #define DBX_DEBUGGING_INFO - - /* Sequent has some changes in the format of DBX symbols. */ - #define DBX_NO_XREFS 1 - - /* Don't split DBX symbols into continuations. */ - #define DBX_CONTIN_LENGTH 0 - - #define TARGET_DEFAULT 9 /* 32332 with 32081 (guessing). */ - - /* Print subsidiary information on the compiler version in use. */ - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (32000, Sequent syntax)"); - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dns32000 -Dsequent -Dunix -Asystem=unix -Asystem=bsd -Acpu=ns32k -Amachine=ns32k" - - /* Link with libg.a when debugging, for dbx's sake. */ - - #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} " - - /* gcc should find libgcc.a itself, not ask linker to do so. */ - - #define LINK_LIBGCC_SPECIAL - - /* GCC must match what sys/types.h uses for size_t. */ - - #define SIZE_TYPE "int" - - /* This is how to align the code that follows an unconditional branch. - Don't define it, since it confuses the assembler (we hear). */ - - #undef LABEL_ALIGN_AFTER_BARRIER - - /* Assembler pseudo-op for shared data segment. */ - #define SHARED_SECTION_ASM_OP "\t.shdata" - - /* Control how stack adjust insns are output. */ - #define SEQUENT_ADJUST_STACK - - #define NO_ABSOLUTE_PREFIX_IF_SYMBOLIC - - #define IMMEDIATE_PREFIX 0 - - #define SEQUENT_ASM - - /* Operand of bsr or jsr should be just the address. */ - - #define CALL_MEMREF_IMPLICIT - - /* Output a reg as an index rather than a base if we have the choice. */ - - #define INDEX_RATHER_THAN_BASE --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/tek6000.h gcc-3.3/gcc/config/ns32k/tek6000.h *** gcc-3.2.3/gcc/config/ns32k/tek6000.h 2001-07-06 18:40:14.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/tek6000.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,136 **** - /* Definitions of target machine for GNU compiler. - Generic Tektronix 6000 series NS32000 version. - See ns32k/tek6100.h and ns32k/tek6200.h, which include this file. - Copyright (C) 1990, 2000 Free Software Foundation, Inc. - Created by Snoopy (sopwith.uucp!snoopy). - Based on work by Mark Mason (mason@reed.bitnet, - pyramid!unify!mason@uunet.uu.net) and Keith Packard. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Generate syntax for the UTek assembler. */ - #ifndef UTEK_ASM - #define UTEK_ASM - #endif - - /* Two flags to control how addresses are printed in assembler insns. */ - - /* The way PUT_ABSOLUTE_PREFIX in ns32k.h works, setting it to 0 will - * turn it off. Define ABSOLUTE_PREFIX before including ns32k.h. - */ - #define ABSOLUTE_PREFIX 0 - #define IMMEDIATE_PREFIX '$' - - #include "ns32k/ns32k.h" - - /* Define these after ns32k.c so we will notice if gcc tries to - * output external mode addressing. UTek's as and ld do not support - * external mode addressing, according to Daryl McDaniel (illian.uucp!darylm). - * Hopefully the UTek assembler will complain if gcc feeds it this stuff. - * They don't seem to do anything, I think that gcc is not actually - * trying to generate external mode operands. - */ - #undef PUT_EXTERNAL_PREFIX - #define PUT_EXTERNAL_PREFIX(arg) fprintf(arg, " Should not be using external mode under UTek. ") - #define EXTERNAL_PREFIX '%' - - /* Used in ns32k.c to control syntax. */ - #define NO_ABSOLUTE_PREFIX_IF_SYMBOLIC - #define NO_IMMEDIATE_PREFIX_IF_SYMBOLIC - - /* Used in ns32k.md to specify syntax of bsr/jsr operand. */ - #define CALL_MEMREF_IMPLICIT - - /* #define PC_RELATIVE */ /* Seems to break things. */ - #define BASE_REG_NEEDED /* Seems to fix problem where external mode - * syntax was being generated. - */ - - /* ------------ Debugging Support ----------------------------- */ - - /* The sdb support does not yet work with UTek. Need to teach gcc - * how to create sdb type stabs as well as dbx style stabs. - */ - #define DBX_DEBUGGING_INFO - /* #define SDB_DEBUGGING_INFO */ - - /* Act the same as the UTek complier: -g for dbx, -go for sdb. - * This is used in toplev.c. - */ - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - - #define CC1_SPEC "{go:-gcoff}" - #define CC1PLUS_SPEC "{go:-gcoff}" - - /* Sequent has some changes in the format of DBX symbols. */ - #define DBX_NO_XREFS 1 - - /* Don't split DBX symbols into continuations. */ - #define DBX_CONTIN_LENGTH 0 - - /* ------------------------------------------- */ - - #define TARGET_DEFAULT 1 - - /* These control the C++ compiler somehow. */ - #define FASCIST_ASSEMBLER - #define USE_COLLECT - - /* Print subsidiary information on the compiler version in use. */ - #undef TARGET_VERSION - #define TARGET_VERSION fprintf (stderr, " (ns32k, UTek syntax)"); - - /* The tek6100.h and tek6200.h files add stratos or merlin respectively. */ - - #define CPP_PREDEFINES_Tek6000 \ - "-Dns16000 -Dns32000 -Dns32k -Dns32016 -DUTek -DUTEK -Dbsd -DBSD \ - -Asystem=unix -Asystem=bsd -Acpu=ns32k -Amachine=ns32k" - #undef CPP_PREDEFINES - #define CPP_PREDEFINES CPP_PREDEFINES_Tek6000 - - /* This is how to align the code that follows an unconditional branch. - Don't define it, since it confuses the assembler (we hear). */ - - #undef LABEL_ALIGN_AFTER_BARRIER - - /* Assembler pseudo-op for shared data segment. */ - #define SHARED_SECTION_ASM_OP "\t.shdata" - - #ifdef UTEK_ASM - - /* UTek assembler needs "ret $0", not "ret 0". */ - #undef TRANSFER_FROM_TRAMPOLINE - #define TRANSFER_FROM_TRAMPOLINE \ - void \ - __transfer_from_trampoline () \ - { \ - asm ("___trampoline:"); \ - asm ("movd 16(r2),tos"); \ - asm ("movd 12(r2),r2"); \ - asm ("ret $0"); \ - } - - #endif /* UTEK_ASM */ - - #undef PRINT_OPERAND_ADDRESS - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR) - - /* The UTek library supplies bcopy() and friends, not memcpy(). */ - #ifdef TARGET_MEM_FUNCTIONS - #undef TARGET_MEM_FUNCTIONS - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/tek6100.h gcc-3.3/gcc/config/ns32k/tek6100.h *** gcc-3.2.3/gcc/config/ns32k/tek6100.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/tek6100.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - #include "ns32k/tek6000.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-Dns32000 -Dns32k -Dns16000 -Dns32016 -DUTek -DUTEK -Dbsd -DBSD -Dstratos \ - -Asystem=unix -Asystem=bsd -Acpu=ns32k -Amachine=ns32k" - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/tek6200.h gcc-3.3/gcc/config/ns32k/tek6200.h *** gcc-3.2.3/gcc/config/ns32k/tek6200.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/tek6200.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - #include "ns32k/tek6000.h" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-Dns32000 -Dns32k -Dns16000 -Dns32016 -DUTek -DUTEK -Dbsd -DBSD -Dmerlin \ - -Asystem=unix -Asystem=bsd -Acpu=ns32k -Amachine=ns32k" - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/t-ns32k gcc-3.3/gcc/config/ns32k/t-ns32k *** gcc-3.2.3/gcc/config/ns32k/t-ns32k 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/t-ns32k 2002-08-01 21:21:52.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + # We want fine grained libraries, so use the new code to build the + # floating point emulation libraries. + LIB2FUNCS_EXTRA = $(srcdir)/config/ns32k/__unorddf2.c \ + $(srcdir)/config/ns32k/__unordsf2.c diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/__unorddf2.c gcc-3.3/gcc/config/ns32k/__unorddf2.c *** gcc-3.2.3/gcc/config/ns32k/__unorddf2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/__unorddf2.c 2002-08-01 21:21:52.000000000 +0000 *************** *** 0 **** --- 1,34 ---- + /* Lightweight function to test for ieee unordered comparison + Copyright (C) 2002 + Free Software Foundation, Inc. + Contributed by Ian Dall + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + # define ISNAN(x) ( \ + { \ + union u { double d; unsigned int i[2]; } *t = (union u *)&(x); \ + ((t->i[1] & 0x7ff00000) == 0x7ff00000) && \ + (t->i[0] != 0 || (t->i[1] & 0xfffff) != 0); \ + }) + + int __unorddf2 (double, double); + int __unorddf2 (double a, double b) + { + return ISNAN(a) || ISNAN(b); + } diff -Nrc3pad gcc-3.2.3/gcc/config/ns32k/__unordsf2.c gcc-3.3/gcc/config/ns32k/__unordsf2.c *** gcc-3.2.3/gcc/config/ns32k/__unordsf2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/ns32k/__unordsf2.c 2002-08-01 21:21:52.000000000 +0000 *************** *** 0 **** --- 1,34 ---- + /* Lightweight function to test for ieee unordered comparison + Copyright (C) 2002 + Free Software Foundation, Inc. + Contributed by Ian Dall + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + # define ISNAN(x) ( \ + { \ + union u { float f; unsigned int i; } *t = (union u *)&(x); \ + ((t->i & 0x7f800000) == 0x7f800000) && \ + ((t->i & 0x7fffff) != 0); \ + }) + + int __unordsf2 ( float, float); + int __unordsf2 ( float a, float b) + { + return ISNAN(a) || ISNAN(b); + } diff -Nrc3pad gcc-3.2.3/gcc/config/openbsd.h gcc-3.3/gcc/config/openbsd.h *** gcc-3.2.3/gcc/config/openbsd.h 2001-11-11 21:20:02.000000000 +0000 --- gcc-3.3/gcc/config/openbsd.h 2002-11-26 04:54:46.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 175,184 **** --- 175,186 ---- #undef TYPE_ASM_OP #undef SIZE_ASM_OP #undef SET_ASM_OP + #undef GLOBAL_ASM_OP #define TYPE_ASM_OP "\t.type\t" #define SIZE_ASM_OP "\t.size\t" #define SET_ASM_OP "\t.set\t" + #define GLOBAL_ASM_OP "\t.globl\t" /* The following macro defines the format used to output the second operand of the .type assembler directive. */ *************** Boston, MA 02111-1307, USA. */ *** 203,213 **** #undef ASM_DECLARE_FUNCTION_NAME #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fputs (" , ", FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) --- 205,211 ---- #undef ASM_DECLARE_FUNCTION_NAME #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) *************** Boston, MA 02111-1307, USA. */ *** 216,253 **** #ifndef OBSD_HAS_DECLARE_FUNCTION_SIZE /* Declare the size of a function. */ #undef ASM_DECLARE_FUNCTION_SIZE ! #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ ! do { \ ! if (!flag_inhibit_size_directive) \ ! { \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fputs (" , . - ", FILE); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ } while (0) #endif #ifndef OBSD_HAS_DECLARE_OBJECT /* Extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fputs (" , ", FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ ! putc ('\n', FILE); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, " , %d\n", int_size_in_bytes (TREE_TYPE (DECL)));\ ! } \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ } while (0) /* Output the size directive for a decl in rest_of_decl_compilation --- 214,242 ---- #ifndef OBSD_HAS_DECLARE_FUNCTION_SIZE /* Declare the size of a function. */ #undef ASM_DECLARE_FUNCTION_SIZE ! #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ ! do { \ ! if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } while (0) #endif #ifndef OBSD_HAS_DECLARE_OBJECT /* Extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME ! #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ ! do { \ ! HOST_WIDE_INT size; \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! size_directive_output = 0; \ ! if (!flag_inhibit_size_directive \ ! && (DECL) && DECL_SIZE (DECL)) \ ! { \ ! size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ ! } \ ! ASM_OUTPUT_LABEL (FILE, NAME); \ } while (0) /* Output the size directive for a decl in rest_of_decl_compilation *************** Boston, MA 02111-1307, USA. */ *** 259,273 **** #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, name); \ ! fprintf (FILE, " , %d\n", int_size_in_bytes (TREE_TYPE (DECL)));\ } \ } while (0) #endif --- 248,262 ---- #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ ! size = int_size_in_bytes (TREE_TYPE (DECL)); \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) #endif *************** do { \ *** 286,299 **** do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ fputc ('\n', FILE); } while (0) #endif - - /* Tell the assembler that a symbol is global. */ - #ifndef ASM_GLOBALIZE_LABEL - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs ("\t.globl\t", FILE); assemble_name (FILE, NAME); \ - fputc ('\n', FILE); } while(0) - #endif - /* Storage layout. */ --- 275,280 ---- *************** do { \ *** 306,310 **** code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly, as this depends on a few other details as well... */ ! #define HANDLE_SYSV_PRAGMA --- 287,291 ---- code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly, as this depends on a few other details as well... */ ! #define HANDLE_SYSV_PRAGMA 1 diff -Nrc3pad gcc-3.2.3/gcc/config/openbsd-oldgas.h gcc-3.3/gcc/config/openbsd-oldgas.h *** gcc-3.2.3/gcc/config/openbsd-oldgas.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/openbsd-oldgas.h 2002-04-03 03:47:35.000000000 +0000 *************** *** 0 **** --- 1,23 ---- + /* Generic settings for a.out OpenBSD systems. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by David E. O'Brien . + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + #define OBSD_OLD_GAS diff -Nrc3pad gcc-3.2.3/gcc/config/pa/elf.h gcc-3.3/gcc/config/pa/elf.h *** gcc-3.2.3/gcc/config/pa/elf.h 2002-01-04 15:43:30.000000000 +0000 --- gcc-3.3/gcc/config/pa/elf.h 2002-05-19 05:23:18.000000000 +0000 *************** do { \ *** 85,93 **** "imported", even library calls. They look a bit different, so here's this macro. ! Also note not all libcall names are passed to ENCODE_SECTION_INFO ! (__main for example). To make sure all libcall names have section ! info recorded in them, we do it here. */ #undef ASM_OUTPUT_EXTERNAL_LIBCALL #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, RTL) \ --- 85,93 ---- "imported", even library calls. They look a bit different, so here's this macro. ! Also note not all libcall names are passed to ! targetm.encode_section_info (__main for example). To make sure all ! libcall names have section info recorded in them, we do it here. */ #undef ASM_OUTPUT_EXTERNAL_LIBCALL #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, RTL) \ diff -Nrc3pad gcc-3.2.3/gcc/config/pa/fptr.c gcc-3.3/gcc/config/pa/fptr.c *** gcc-3.2.3/gcc/config/pa/fptr.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/pa/fptr.c 2002-12-09 19:16:14.000000000 +0000 *************** *** 0 **** --- 1,127 ---- + /* Subroutine for function pointer canonicalization on PA-RISC with ELF32. + Copyright 2002 Free Software Foundation, Inc. + Contributed by John David Anglin (dave.anglin@nrc.ca). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* WARNING: The code is this function depends on internal and undocumented + details of the GNU linker and dynamic loader as implemented for parisc + linux. */ + + /* This MUST match the defines sysdeps/hppa/dl-machine.h and + bfd/elf32-hppa.c. */ + #define GOT_FROM_PLT_STUB (4*4) + + /* List of byte offsets in _dl_runtime_resolve to search for "bl" branches. + The first "bl" branch instruction found MUST be a call to fixup. See + the define for TRAMPOLINE_TEMPLATE in sysdeps/hppa/dl-machine.h. If + the trampoline template is changed, the list must be appropriately + updated. The offset of -4 allows for a magic branch at the start of + the template should it be necessary to change the current branch + position. */ + #define NOFFSETS 2 + static int fixup_branch_offset[NOFFSETS] = { 32, -4 }; + + #define GET_FIELD(X, FROM, TO) \ + ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1)) + #define SIGN_EXTEND(VAL,BITS) \ + ((int) ((VAL) >> ((BITS) - 1) ? (-1 << (BITS)) | (VAL) : (VAL))) + + struct link_map; + typedef int (*fptr_t) (void); + typedef int (*fixup_t) (struct link_map *, unsigned int); + extern unsigned int _GLOBAL_OFFSET_TABLE_; + + /* __canonicalize_funcptr_for_compare must be hidden so that it is not + placed in the dynamic symbol table. Like millicode functions, it + must be linked into all binaries in order access the got table of + that binary. However, we don't use the millicode calling convention + and the routine must be a normal function so that it can be compiled + as pic code. */ + unsigned int __canonicalize_funcptr_for_compare (fptr_t) + __attribute__ ((visibility ("hidden"))); + + unsigned int + __canonicalize_funcptr_for_compare (fptr) + fptr_t fptr; + { + static unsigned int fixup_plabel[2]; + static fixup_t fixup; + unsigned int *plabel, *got; + + /* -1 and page 0 are special. -1 is used in crtend to mark the end of + a list of function pointers. Also return immediately if the plabel + bit is not set in the function pointer. In this case, the function + pointer points directly to the function. */ + if ((int) fptr == -1 || (unsigned int) fptr < 4096 || !((int) fptr & 2)) + return (unsigned int) fptr; + + /* The function pointer points to a function descriptor (plabel). If + the plabel hasn't been resolved, the first word of the plabel points + to the entry of the PLT stub just before the global offset table. + The second word in the plabel contains the relocation offset for the + function. */ + plabel = (unsigned int *) ((unsigned int) fptr & ~3); + got = (unsigned int *) (plabel[0] + GOT_FROM_PLT_STUB); + + /* Return the address of the function if the plabel has been resolved. */ + if (got != &_GLOBAL_OFFSET_TABLE_) + return plabel[0]; + + /* Initialize our plabel for calling fixup if we haven't done so already. + This code needs to be thread safe but we don't have to be too careful + as the result is invariant. */ + if (!fixup) + { + int i; + unsigned int *iptr; + + /* Find the first "bl" branch in the offset search list. This is a + call to fixup or a magic branch to fixup at the beginning of the + trampoline template. The fixup function does the actual runtime + resolution of function decriptors. We only look for "bl" branches + with a 17-bit pc-relative displacement. */ + for (i = 0; i < NOFFSETS; i++) + { + iptr = (unsigned int *) (got[-2] + fixup_branch_offset[i]); + if ((*iptr & 0xfc00e000) == 0xe8000000) + break; + } + + /* This should not happen... */ + if (i == NOFFSETS) + return ~0; + + /* Extract the 17-bit displacement from the instruction. */ + iptr += SIGN_EXTEND (GET_FIELD (*iptr, 19, 28) | + GET_FIELD (*iptr, 29, 29) << 10 | + GET_FIELD (*iptr, 11, 15) << 11 | + GET_FIELD (*iptr, 31, 31) << 16, 17); + + /* Build a plabel for an indirect call to fixup. */ + fixup_plabel[0] = (unsigned int) iptr + 8; /* address of fixup */ + fixup_plabel[1] = got[-1]; /* ltp for fixup */ + fixup = (fixup_t) ((int) fixup_plabel | 3); + } + + /* Call fixup to resolve the function address. got[1] contains the + link_map pointer and plabel[1] the relocation offset. */ + fixup ((struct link_map *) got[1], plabel[1]); + + return plabel[0]; + } diff -Nrc3pad gcc-3.2.3/gcc/config/pa/lib1funcs.asm gcc-3.3/gcc/config/pa/lib1funcs.asm *** gcc-3.2.3/gcc/config/pa/lib1funcs.asm 2000-05-15 23:14:16.000000000 +0000 --- gcc-3.3/gcc/config/pa/lib1funcs.asm 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1147 **** - ; Low level integer divide, multiply, remainder, etc routines for the HPPA. - ; Copyright (C) 1995 Free Software Foundation, Inc. - - ; This file is part of GNU CC. - - ; GNU CC is free software; you can redistribute it and/or modify - ; it under the terms of the GNU General Public License as published by - ; the Free Software Foundation; either version 2, or (at your option) - ; any later version. - - ; In addition to the permissions in the GNU General Public License, the - ; Free Software Foundation gives you unlimited permission to link the - ; compiled version of this file into combinations with other programs, - ; and to distribute those combinations without any restriction coming - ; from the use of this file. (The General Public License restrictions - ; do apply in other respects; for example, they cover modification of - ; the file, and distribution when not linked into a combine - ; executable.) - - ; GNU CC is distributed in the hope that it will be useful, - ; but WITHOUT ANY WARRANTY; without even the implied warranty of - ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ; GNU General Public License for more details. - - ; You should have received a copy of the GNU General Public License - ; along with GNU CC; see the file COPYING. If not, write to - ; the Free Software Foundation, 59 Temple Place - Suite 330, - ; Boston, MA 02111-1307, USA. - - #ifdef L_dyncall - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .export $$dyncall - $$dyncall - .proc - .callinfo frame=0,no_calls - .entry - bb,>=,n %r22,30,L$1 ; branch if not plabel address - depi 0,31,2,%r22 ; clear the two least significant bits - ldw 4(%sr0,%r22),%r19 ; load new LTP value - ldw 0(%sr0,%r22),%r22 ; load address of target - L$1 ldsid (%sr0,%r22),%r1 ; get the "space ident" selected by r22 - mtsp %r1,%sr0 ; move that space identifier into sr0 - be 0(%sr0,%r22) ; branch to the real target - stw %r2,-24(%sr0,%r30) ; save return address into frame marker - .exit - .procend - #endif - - - #ifdef L_multiply - #define op0 %r26 - #define op1 %r25 - #define res %r29 - #define ret %r31 - #define tmp %r1 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$mulU - .export $$mulI - $$mulU - $$mulI - .proc - .callinfo frame=0,no_calls - .entry - addi,tr 0,%r0,res ; clear out res, skip next insn - L$loop zdep op1,26,27,op1 ; shift up op1 by 5 - L$lo zdep op0,30,5,tmp ; extract next 5 bits and shift up - blr tmp,%r0 - extru op0,26,27,op0 ; shift down op0 by 5 - L$0 comib,<> 0,op0,L$lo - zdep op1,26,27,op1 ; shift up op1 by 5 - bv %r0(ret) - nop - L$1 b L$loop - addl op1,res,res - nop - nop - L$2 b L$loop - sh1addl op1,res,res - nop - nop - L$3 sh1addl op1,op1,tmp ; 3x - b L$loop - addl tmp,res,res - nop - L$4 b L$loop - sh2addl op1,res,res - nop - nop - L$5 sh2addl op1,op1,tmp ; 5x - b L$loop - addl tmp,res,res - nop - L$6 sh1addl op1,op1,tmp ; 3x - b L$loop - sh1addl tmp,res,res - nop - L$7 zdep op1,28,29,tmp ; 8x - sub tmp,op1,tmp ; 7x - b L$loop - addl tmp,res,res - L$8 b L$loop - sh3addl op1,res,res - nop - nop - L$9 sh3addl op1,op1,tmp ; 9x - b L$loop - addl tmp,res,res - nop - L$10 sh2addl op1,op1,tmp ; 5x - b L$loop - sh1addl tmp,res,res - nop - L$11 sh2addl op1,op1,tmp ; 5x - sh1addl tmp,op1,tmp ; 11x - b L$loop - addl tmp,res,res - L$12 sh1addl op1,op1,tmp ; 3x - b L$loop - sh2addl tmp,res,res - nop - L$13 sh1addl op1,op1,tmp ; 3x - sh2addl tmp,op1,tmp ; 13x - b L$loop - addl tmp,res,res - L$14 zdep op1,28,29,tmp ; 8x - sub tmp,op1,tmp ; 7x - b L$loop - sh1addl tmp,res,res - L$15 zdep op1,27,28,tmp ; 16x - sub tmp,op1,tmp ; 15x - b L$loop - addl tmp,res,res - L$16 zdep op1,27,28,tmp ; 16x - b L$loop - addl tmp,res,res - nop - L$17 zdep op1,27,28,tmp ; 16x - addl tmp,op1,tmp ; 17x - b L$loop - addl tmp,res,res - L$18 sh3addl op1,op1,tmp ; 9x - b L$loop - sh1addl tmp,res,res - nop - L$19 sh3addl op1,op1,tmp ; 9x - sh1addl tmp,op1,tmp ; 19x - b L$loop - addl tmp,res,res - L$20 sh2addl op1,op1,tmp ; 5x - b L$loop - sh2addl tmp,res,res - nop - L$21 sh2addl op1,op1,tmp ; 5x - sh2addl tmp,op1,tmp ; 21x - b L$loop - addl tmp,res,res - L$22 sh2addl op1,op1,tmp ; 5x - sh1addl tmp,op1,tmp ; 11x - b L$loop - sh1addl tmp,res,res - L$23 sh1addl op1,op1,tmp ; 3x - sh3addl tmp,res,res ; += 8x3 - b L$loop - sub res,op1,res ; -= x - L$24 sh1addl op1,op1,tmp ; 3x - b L$loop - sh3addl tmp,res,res ; += 8x3 - nop - L$25 sh2addl op1,op1,tmp ; 5x - sh2addl tmp,tmp,tmp ; 25x - b L$loop - addl tmp,res,res - L$26 sh1addl op1,op1,tmp ; 3x - sh2addl tmp,op1,tmp ; 13x - b L$loop - sh1addl tmp,res,res ; += 2x13 - L$27 sh1addl op1,op1,tmp ; 3x - sh3addl tmp,tmp,tmp ; 27x - b L$loop - addl tmp,res,res - L$28 zdep op1,28,29,tmp ; 8x - sub tmp,op1,tmp ; 7x - b L$loop - sh2addl tmp,res,res ; += 4x7 - L$29 sh1addl op1,op1,tmp ; 3x - sub res,tmp,res ; -= 3x - b L$foo - zdep op1,26,27,tmp ; 32x - L$30 zdep op1,27,28,tmp ; 16x - sub tmp,op1,tmp ; 15x - b L$loop - sh1addl tmp,res,res ; += 2x15 - L$31 zdep op1,26,27,tmp ; 32x - sub tmp,op1,tmp ; 31x - L$foo b L$loop - addl tmp,res,res - .exit - .procend - #endif - - - #ifdef L_divU - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define quotient %r29 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU - $$divU - .proc - .callinfo frame=0,no_calls - .entry - comb,< divisor,0,L$largedivisor - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,quotient - ds %r1,divisor,%r1 - bv %r0(ret) - addc quotient,quotient,quotient - L$largedivisor - comclr,<< dividend,divisor,quotient - ldi 1,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #ifdef L_remU - #define dividend %r26 - #define divisor %r25 - #define quotient %r29 - #define tmp %r1 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$remU - $$remU - .proc - .callinfo frame=0,no_calls - .entry - comb,< divisor,0,L$largedivisor - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,quotient - ds %r1,divisor,%r1 - comclr,>= %r1,%r0,%r0 - addl %r1,divisor,%r1 - bv %r0(ret) - copy %r1,quotient - L$largedivisor - sub,>>= dividend,divisor,quotient - copy dividend,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #ifdef L_divI - #define dividend %r26 - #define divisor %r25 - #define quotient %r29 - #define tmp %r1 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI - $$divI - .proc - .callinfo frame=0,no_calls - .entry - xor dividend,divisor,quotient ; result sign - comclr,>= divisor,%r0,%r0 ; get absolute values - sub %r0,divisor,divisor - comclr,>= dividend,%r0,%r0 - sub %r0,dividend,dividend - - comb,< divisor,0,L$largedivisor - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - comclr,>= %r1,%r0,%r0 - addl %r1,divisor,%r1 - comclr,>= quotient,%r0,%r0 ; skip of no need to negate - sub %r0,dividend,dividend - bv %r0(ret) - copy dividend,quotient - L$largedivisor - comclr,<< dividend,divisor,quotient - ldi 1,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #ifdef L_remI - #define dividend %r26 - #define divisor %r25 - #define quotient %r29 - #define tmp %r1 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$remI - $$remI - .proc - .callinfo frame=0,no_calls - .entry - xor dividend,%r0,quotient ; result sign - comclr,>= divisor,%r0,%r0 ; get absolute values - sub %r0,divisor,divisor - comclr,>= dividend,%r0,%r0 - sub %r0,dividend,dividend - - comb,< divisor,0,L$largedivisor - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - comclr,>= %r1,%r0,%r0 - addl %r1,divisor,%r1 - comclr,>= quotient,%r0,%r0 ; skip of no need to negate - sub %r0,%r1,%r1 - bv %r0(ret) - copy %r1,quotient - L$largedivisor - sub,>>= dividend,divisor,quotient - copy dividend,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #if defined (L_divU_3) && !defined (SMALL_LIB) - #undef L_divU_3 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_3 - $$divU_3 - .proc - .callinfo frame=0,no_calls - .entry - sh2add %r26,%r26,%r29 ; r29 = lo(101 x r) - shd %r0,%r26,30,%r1 ; r1 = hi(100 x r) - addc %r1,%r0,%r1 ; r1 = hi(101 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend - shd %r1,%r29,31,%r29 ; r29 = hi(10 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,30,31,result - .exit - .procend - #endif - - - #if defined (L_divU_5) && !defined (SMALL_LIB) - #undef L_divU_5 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_5 - $$divU_5 - .proc - .callinfo frame=0,no_calls - .entry - sh1add %r26,%r26,%r29 ; r29 = lo(11 x r) - shd %r0,%r26,31,%r1 ; r1 = hi(10 x r) - addc %r1,%r0,%r1 ; r1 = hi(11 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh2add %r29,%r26,%r0 ; r0 = lo(1000 x r) + dividend - shd %r1,%r29,30,%r29 ; r29 = hi(1000 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,29,30,result - .exit - .procend - #endif - - - #if defined (L_divU_6) && !defined (SMALL_LIB) - #undef L_divU_6 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_6 - $$divU_6 - .proc - .callinfo frame=0,no_calls - .entry - sh2add %r26,%r26,%r29 ; r29 = lo(101 x r) - shd %r0,%r26,30,%r1 ; r1 = hi(100 x r) - addc %r1,%r0,%r1 ; r1 = hi(101 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend - shd %r1,%r29,31,%r29 ; r29 = hi(10 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,29,30,result - .exit - .procend - #endif - - - #if defined (L_divU_9) && !defined (SMALL_LIB) - #undef L_divU_9 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_9 - $$divU_9 - .proc - .callinfo frame=0,no_calls - .entry - zdep %r26,28,29,%r29 - sub %r29,%r26,%r29 - shd 0,%r26,29,%r1 - subb %r1,0,%r1 /* 111 */ - - zdep %r29,25,26,%r25 - add %r25,%r29,%r25 - shd %r1,%r29,26,%r29 - addc %r29,%r1,%r29 /* 111000111 */ - - sh3add %r25,%r26,%r1 - shd %r29,%r25,29,%r25 - addc %r25,0,%r25 /* 111000111001 */ - - zdep %r1,16,17,%r29 - sub %r29,%r1,%r29 - shd %r25,%r1,17,%r1 - subb %r1,%r25,%r1 /* 111000111000111000111000111 */ - - sh3add %r29,%r26,%r0 - shd %r1,%r29,29,%r29 - addc %r29,0,%r29 /* 111000111000111000111000111001 */ - bv %r0(ret) - extru %r29,30,31,result - .exit - .procend - #endif - - - #if defined (L_divU_10) && !defined (SMALL_LIB) - #undef L_divU_10 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_10 - $$divU_10 - .proc - .callinfo frame=0,no_calls - .entry - sh1add %r26,%r26,%r29 ; r29 = lo(11 x r) - shd %r0,%r26,31,%r1 ; r1 = hi(10 x r) - addc %r1,%r0,%r1 ; r1 = hi(11 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh2add %r29,%r26,%r0 ; r0 = lo(1000 x r) + dividend - shd %r1,%r29,30,%r29 ; r29 = hi(1000 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,28,29,result - .exit - .procend - #endif - - - #if defined (L_divU_12) && !defined (SMALL_LIB) - #undef L_divU_12 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_12 - $$divU_12 - .proc - .callinfo frame=0,no_calls - .entry - sh2add %r26,%r26,%r29 ; r29 = lo(101 x r) - shd %r0,%r26,30,%r1 ; r1 = hi(100 x r) - addc %r1,%r0,%r1 ; r1 = hi(101 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend - shd %r1,%r29,31,%r29 ; r29 = hi(10 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,28,29,result - .exit - .procend - #endif - - - #ifdef L_divU_3 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_3 - $$divU_3 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 3,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_5 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_5 - $$divU_5 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 5,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_6 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_6 - $$divU_6 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 6,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_7 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_7 - $$divU_7 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 7,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_9 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_9 - $$divU_9 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 9,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_10 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_10 - $$divU_10 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 10,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_12 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_12 - $$divU_12 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 12,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_14 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_14 - $$divU_14 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 14,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_15 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divU_15 - $$divU_15 - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 15,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divI_3 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_3 - $$divI_3 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 3,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_5 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_5 - $$divI_5 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 5,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_6 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_6 - $$divI_6 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 6,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_7 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_7 - $$divI_7 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 7,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_9 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_9 - $$divI_9 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 9,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_10 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_10 - $$divI_10 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 10,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_12 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_12 - $$divI_12 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 12,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_14 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_14 - $$divI_14 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 14,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_15 - .space $TEXT$ - .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8 - .align 4 - .export $$divI_15 - $$divI_15 - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 15,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pa/long_double.h gcc-3.3/gcc/config/pa/long_double.h *** gcc-3.2.3/gcc/config/pa/long_double.h 2001-12-20 17:36:37.000000000 +0000 --- gcc-3.3/gcc/config/pa/long_double.h 2002-07-16 19:39:27.000000000 +0000 *************** *** 1,5 **** /* Definitions of long double support for GNU compiler. ! Copyright (C) 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of long double support for GNU compiler. ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 42,47 **** --- 42,48 ---- #define FIX_TRUNCTFSI2_LIBCALL \ (TARGET_64BIT ? "__U_Qfcnvfxt_quad_to_sgl" : "_U_Qfcnvfxt_quad_to_sgl") #define FIXUNS_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_usgl" + #define FIXUNS_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_udbl" #define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl" #define EQTF2_LIBCALL "_U_Qfeq" #define NETF2_LIBCALL "_U_Qfne" *************** Boston, MA 02111-1307, USA. */ *** 80,86 **** fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\ fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\ fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL);\ ! fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \ --- 81,87 ---- fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\ fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\ fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL);\ ! fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFDI2_LIBCALL);\ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \ diff -Nrc3pad gcc-3.2.3/gcc/config/pa/milli32.S gcc-3.3/gcc/config/pa/milli32.S *** gcc-3.2.3/gcc/config/pa/milli32.S 2001-04-13 05:19:02.000000000 +0000 --- gcc-3.3/gcc/config/pa/milli32.S 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1134 **** - ; Low level integer divide, multiply, remainder, etc routines for the HPPA. - ; Copyright 1995, 2000, 2001 Free Software Foundation, Inc. - - ; This file is part of GNU CC. - - ; GNU CC is free software; you can redistribute it and/or modify - ; it under the terms of the GNU General Public License as published by - ; the Free Software Foundation; either version 2, or (at your option) - ; any later version. - - ; In addition to the permissions in the GNU General Public License, the - ; Free Software Foundation gives you unlimited permission to link the - ; compiled version of this file with other programs, and to distribute - ; those programs without any restriction coming from the use of this - ; file. (The General Public License restrictions do apply in other - ; respects; for example, they cover modification of the file, and - ; distribution when not linked into another program.) - - ; GNU CC is distributed in the hope that it will be useful, - ; but WITHOUT ANY WARRANTY; without even the implied warranty of - ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ; GNU General Public License for more details. - - ; You should have received a copy of the GNU General Public License - ; along with GNU CC; see the file COPYING. If not, write to - ; the Free Software Foundation, 59 Temple Place - Suite 330, - ; Boston, MA 02111-1307, USA. - - #ifdef __STDC__ - #define CAT(a,b) a##b - #else - #define CAT(a,b) a/**/b - #endif - - #ifdef ELF - - #define SPACE \ - ! .text! .align 4 - #define GSYM(sym) \ - ! .export sym,millicode!sym: - #define LSYM(sym) \ - !CAT(.L,sym:) - #define LREF(sym) CAT(.L,sym) - - #else - - #define SPACE \ - ! .space $TEXT$! .subspa $MILLICODE$,quad=0,align=8,access=0x2c,sort=8! .align 4 - #define GSYM(sym) \ - ! .export sym,millicode!sym - #define LSYM(sym) \ - !CAT(L$,sym) - #define LREF(sym) CAT(L$,sym) - #endif - - #ifdef L_dyncall - SPACE - GSYM($$dyncall) - .proc - .callinfo frame=0,no_calls - .entry - bb,>=,n %r22,30,LREF(1) ; branch if not plabel address - depi 0,31,2,%r22 ; clear the two least significant bits - ldw 4(%r22),%r19 ; load new LTP value - ldw 0(%r22),%r22 ; load address of target - LSYM(1) - #ifdef LINUX - bv %r0(%r22) ; branch to the real target - #else - ldsid (%sr0,%r22),%r1 ; get the "space ident" selected by r22 - mtsp %r1,%sr0 ; move that space identifier into sr0 - be 0(%sr0,%r22) ; branch to the real target - #endif - stw %r2,-24(%r30) ; save return address into frame marker - .exit - .procend - #endif - - - #ifdef L_multiply - #define op0 %r26 - #define op1 %r25 - #define res %r29 - #define ret %r31 - #define tmp %r1 - - SPACE - GSYM($$mulU) - GSYM($$mulI) - .proc - .callinfo frame=0,no_calls - .entry - addi,tr 0,%r0,res ; clear out res, skip next insn - LSYM(loop) - zdep op1,26,27,op1 ; shift up op1 by 5 - LSYM(lo) - zdep op0,30,5,tmp ; extract next 5 bits and shift up - blr tmp,%r0 - extru op0,26,27,op0 ; shift down op0 by 5 - LSYM(0) - comib,<> 0,op0,LREF(lo) - zdep op1,26,27,op1 ; shift up op1 by 5 - bv %r0(ret) - nop - LSYM(1) - b LREF(loop) - addl op1,res,res - nop - nop - LSYM(2) - b LREF(loop) - sh1addl op1,res,res - nop - nop - LSYM(3) - sh1addl op1,op1,tmp ; 3x - b LREF(loop) - addl tmp,res,res - nop - LSYM(4) - b LREF(loop) - sh2addl op1,res,res - nop - nop - LSYM(5) - sh2addl op1,op1,tmp ; 5x - b LREF(loop) - addl tmp,res,res - nop - LSYM(6) - sh1addl op1,op1,tmp ; 3x - b LREF(loop) - sh1addl tmp,res,res - nop - LSYM(7) - zdep op1,28,29,tmp ; 8x - sub tmp,op1,tmp ; 7x - b LREF(loop) - addl tmp,res,res - LSYM(8) - b LREF(loop) - sh3addl op1,res,res - nop - nop - LSYM(9) - sh3addl op1,op1,tmp ; 9x - b LREF(loop) - addl tmp,res,res - nop - LSYM(10) - sh2addl op1,op1,tmp ; 5x - b LREF(loop) - sh1addl tmp,res,res - nop - LSYM(11) - sh2addl op1,op1,tmp ; 5x - sh1addl tmp,op1,tmp ; 11x - b LREF(loop) - addl tmp,res,res - LSYM(12) - sh1addl op1,op1,tmp ; 3x - b LREF(loop) - sh2addl tmp,res,res - nop - LSYM(13) - sh1addl op1,op1,tmp ; 3x - sh2addl tmp,op1,tmp ; 13x - b LREF(loop) - addl tmp,res,res - LSYM(14) - zdep op1,28,29,tmp ; 8x - sub tmp,op1,tmp ; 7x - b LREF(loop) - sh1addl tmp,res,res - LSYM(15) - zdep op1,27,28,tmp ; 16x - sub tmp,op1,tmp ; 15x - b LREF(loop) - addl tmp,res,res - LSYM(16) - zdep op1,27,28,tmp ; 16x - b LREF(loop) - addl tmp,res,res - nop - LSYM(17) - zdep op1,27,28,tmp ; 16x - addl tmp,op1,tmp ; 17x - b LREF(loop) - addl tmp,res,res - LSYM(18) - sh3addl op1,op1,tmp ; 9x - b LREF(loop) - sh1addl tmp,res,res - nop - LSYM(19) - sh3addl op1,op1,tmp ; 9x - sh1addl tmp,op1,tmp ; 19x - b LREF(loop) - addl tmp,res,res - LSYM(20) - sh2addl op1,op1,tmp ; 5x - b LREF(loop) - sh2addl tmp,res,res - nop - LSYM(21) - sh2addl op1,op1,tmp ; 5x - sh2addl tmp,op1,tmp ; 21x - b LREF(loop) - addl tmp,res,res - LSYM(22) - sh2addl op1,op1,tmp ; 5x - sh1addl tmp,op1,tmp ; 11x - b LREF(loop) - sh1addl tmp,res,res - LSYM(23) - sh1addl op1,op1,tmp ; 3x - sh3addl tmp,res,res ; += 8x3 - b LREF(loop) - sub res,op1,res ; -= x - LSYM(24) - sh1addl op1,op1,tmp ; 3x - b LREF(loop) - sh3addl tmp,res,res ; += 8x3 - nop - LSYM(25) - sh2addl op1,op1,tmp ; 5x - sh2addl tmp,tmp,tmp ; 25x - b LREF(loop) - addl tmp,res,res - LSYM(26) - sh1addl op1,op1,tmp ; 3x - sh2addl tmp,op1,tmp ; 13x - b LREF(loop) - sh1addl tmp,res,res ; += 2x13 - LSYM(27) - sh1addl op1,op1,tmp ; 3x - sh3addl tmp,tmp,tmp ; 27x - b LREF(loop) - addl tmp,res,res - LSYM(28) - zdep op1,28,29,tmp ; 8x - sub tmp,op1,tmp ; 7x - b LREF(loop) - sh2addl tmp,res,res ; += 4x7 - LSYM(29) - sh1addl op1,op1,tmp ; 3x - sub res,tmp,res ; -= 3x - b LREF(foo) - zdep op1,26,27,tmp ; 32x - LSYM(30) - zdep op1,27,28,tmp ; 16x - sub tmp,op1,tmp ; 15x - b LREF(loop) - sh1addl tmp,res,res ; += 2x15 - LSYM(31) - zdep op1,26,27,tmp ; 32x - sub tmp,op1,tmp ; 31x - LSYM(foo) - b LREF(loop) - addl tmp,res,res - .exit - .procend - #endif - - - #ifdef L_divU - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define quotient %r29 - #define ret %r31 - - SPACE - GSYM($$divU) - .proc - .callinfo frame=0,no_calls - .entry - comb,< divisor,0,LREF(largedivisor) - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,quotient - ds %r1,divisor,%r1 - bv %r0(ret) - addc quotient,quotient,quotient - LSYM(largedivisor) - comclr,<< dividend,divisor,quotient - ldi 1,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #ifdef L_remU - #define dividend %r26 - #define divisor %r25 - #define quotient %r29 - #define tmp %r1 - #define ret %r31 - - SPACE - GSYM($$remU) - .proc - .callinfo frame=0,no_calls - .entry - comb,< divisor,0,LREF(largedivisor) - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,quotient - ds %r1,divisor,%r1 - comclr,>= %r1,%r0,%r0 - addl %r1,divisor,%r1 - bv %r0(ret) - copy %r1,quotient - LSYM(largedivisor) - sub,>>= dividend,divisor,quotient - copy dividend,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #ifdef L_divI - #define dividend %r26 - #define divisor %r25 - #define quotient %r29 - #define tmp %r1 - #define ret %r31 - - SPACE - GSYM($$divI) - .proc - .callinfo frame=0,no_calls - .entry - xor dividend,divisor,quotient ; result sign - comclr,>= divisor,%r0,%r0 ; get absolute values - sub %r0,divisor,divisor - comclr,>= dividend,%r0,%r0 - sub %r0,dividend,dividend - - comb,< divisor,0,LREF(largedivisor) - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - comclr,>= %r1,%r0,%r0 - addl %r1,divisor,%r1 - comclr,>= quotient,%r0,%r0 ; skip of no need to negate - sub %r0,dividend,dividend - bv %r0(ret) - copy dividend,quotient - LSYM(largedivisor) - comclr,<< dividend,divisor,quotient - ldi 1,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #ifdef L_remI - #define dividend %r26 - #define divisor %r25 - #define quotient %r29 - #define tmp %r1 - #define ret %r31 - - SPACE - GSYM($$remI) - .proc - .callinfo frame=0,no_calls - .entry - xor dividend,%r0,quotient ; result sign - comclr,>= divisor,%r0,%r0 ; get absolute values - sub %r0,divisor,divisor - comclr,>= dividend,%r0,%r0 - sub %r0,dividend,dividend - - comb,< divisor,0,LREF(largedivisor) - sub %r0,divisor,%r1 ; clear cy as side-effect - ds %r0,%r1,%r0 - addc dividend,dividend,dividend - ds %r0,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - ds %r1,divisor,%r1 - addc dividend,dividend,dividend - comclr,>= %r1,%r0,%r0 - addl %r1,divisor,%r1 - comclr,>= quotient,%r0,%r0 ; skip of no need to negate - sub %r0,%r1,%r1 - bv %r0(ret) - copy %r1,quotient - LSYM(largedivisor) - sub,>>= dividend,divisor,quotient - copy dividend,quotient - bv,n %r0(ret) - .exit - .procend - #endif - - - #if defined (L_divU_3) && !defined (SMALL_LIB) - #undef L_divU_3 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - - SPACE - GSYM($$divU_3) - .proc - .callinfo frame=0,no_calls - .entry - sh2add %r26,%r26,%r29 ; r29 = lo(101 x r) - shd %r0,%r26,30,%r1 ; r1 = hi(100 x r) - addc %r1,%r0,%r1 ; r1 = hi(101 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend - shd %r1,%r29,31,%r29 ; r29 = hi(10 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,30,31,result - .exit - .procend - #endif - - - #if defined (L_divU_5) && !defined (SMALL_LIB) - #undef L_divU_5 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - - SPACE - GSYM($$divU_5) - .proc - .callinfo frame=0,no_calls - .entry - sh1add %r26,%r26,%r29 ; r29 = lo(11 x r) - shd %r0,%r26,31,%r1 ; r1 = hi(10 x r) - addc %r1,%r0,%r1 ; r1 = hi(11 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh2add %r29,%r26,%r0 ; r0 = lo(1000 x r) + dividend - shd %r1,%r29,30,%r29 ; r29 = hi(1000 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,29,30,result - .exit - .procend - #endif - - - #if defined (L_divU_6) && !defined (SMALL_LIB) - #undef L_divU_6 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - - SPACE - GSYM($$divU_6) - .proc - .callinfo frame=0,no_calls - .entry - sh2add %r26,%r26,%r29 ; r29 = lo(101 x r) - shd %r0,%r26,30,%r1 ; r1 = hi(100 x r) - addc %r1,%r0,%r1 ; r1 = hi(101 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend - shd %r1,%r29,31,%r29 ; r29 = hi(10 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,29,30,result - .exit - .procend - #endif - - - #if defined (L_divU_9) && !defined (SMALL_LIB) - #undef L_divU_9 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - - SPACE - GSYM($$divU_9) - .proc - .callinfo frame=0,no_calls - .entry - zdep %r26,28,29,%r29 - sub %r29,%r26,%r29 - shd 0,%r26,29,%r1 - subb %r1,0,%r1 /* 111 */ - - zdep %r29,25,26,%r25 - add %r25,%r29,%r25 - shd %r1,%r29,26,%r29 - addc %r29,%r1,%r29 /* 111000111 */ - - sh3add %r25,%r26,%r1 - shd %r29,%r25,29,%r25 - addc %r25,0,%r25 /* 111000111001 */ - - zdep %r1,16,17,%r29 - sub %r29,%r1,%r29 - shd %r25,%r1,17,%r1 - subb %r1,%r25,%r1 /* 111000111000111000111000111 */ - - sh3add %r29,%r26,%r0 - shd %r1,%r29,29,%r29 - addc %r29,0,%r29 /* 111000111000111000111000111001 */ - bv %r0(ret) - extru %r29,30,31,result - .exit - .procend - #endif - - - #if defined (L_divU_10) && !defined (SMALL_LIB) - #undef L_divU_10 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - - SPACE - GSYM($$divU_10) - .proc - .callinfo frame=0,no_calls - .entry - sh1add %r26,%r26,%r29 ; r29 = lo(11 x r) - shd %r0,%r26,31,%r1 ; r1 = hi(10 x r) - addc %r1,%r0,%r1 ; r1 = hi(11 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh2add %r29,%r26,%r0 ; r0 = lo(1000 x r) + dividend - shd %r1,%r29,30,%r29 ; r29 = hi(1000 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,28,29,result - .exit - .procend - #endif - - - #if defined (L_divU_12) && !defined (SMALL_LIB) - #undef L_divU_12 - #define dividend %r26 - #define divisor %r25 - #define tmp %r1 - #define result %r29 - #define ret %r31 - - SPACE - GSYM($$divU_12) - .proc - .callinfo frame=0,no_calls - .entry - sh2add %r26,%r26,%r29 ; r29 = lo(101 x r) - shd %r0,%r26,30,%r1 ; r1 = hi(100 x r) - addc %r1,%r0,%r1 ; r1 = hi(101 x r) - ; r in r1,,r29 - zdep %r29,27,28,%r25 ; r25 = lo(10000 x r) - add %r25,%r29,%r25 ; r25 = lo(10001 x r) - shd %r1,%r29,28,%r29 ; r29 = hi(10000 x r) - addc %r29,%r1,%r29 ; r29 = hi(10001 x r) - ; r in r29,,r25 - zdep %r25,23,24,%r1 ; r1 = lo(100000000 x r) - add %r1,%r25,%r1 ; r1 = lo(100000001 x r) - shd %r29,%r25,24,%r25 ; r25 = hi(100000000 x r) - addc %r25,%r29,%r25 ; r25 = hi(100000001 x r) - ; r in r25,,r1 - zdep %r1,15,16,%r29 - add %r29,%r1,%r29 - shd %r25,%r1,16,%r1 - addc %r1,%r25,%r1 - ; r in r1,,r29 - sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend - shd %r1,%r29,31,%r29 ; r29 = hi(10 x r) - addc %r29,%r0,%r29 - bv %r0(ret) - extru %r29,28,29,result - .exit - .procend - #endif - - - #ifdef L_divU_3 - SPACE - GSYM($$divU_3) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 3,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_5 - SPACE - GSYM($$divU_5) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 5,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_6 - SPACE - GSYM($$divU_6) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 6,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_7 - SPACE - GSYM($$divU_7) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 7,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_9 - SPACE - GSYM($$divU_9) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 9,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_10 - SPACE - GSYM($$divU_10) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 10,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_12 - SPACE - GSYM($$divU_12) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 12,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_14 - SPACE - GSYM($$divU_14) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 14,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divU_15 - SPACE - GSYM($$divU_15) - .proc - .callinfo frame=0,no_calls - .entry - b $$divU - ldi 15,%r25 - .exit - .procend - .import $$divU,MILLICODE - #endif - - #ifdef L_divI_3 - SPACE - GSYM($$divI_3) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 3,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_5 - SPACE - GSYM($$divI_5) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 5,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_6 - SPACE - GSYM($$divI_6) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 6,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_7 - SPACE - GSYM($$divI_7) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 7,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_9 - SPACE - GSYM($$divI_9) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 9,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_10 - SPACE - GSYM($$divI_10) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 10,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_12 - SPACE - GSYM($$divI_12) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 12,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_14 - SPACE - GSYM($$divI_14) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 14,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif - - #ifdef L_divI_15 - SPACE - GSYM($$divI_15) - .proc - .callinfo frame=0,no_calls - .entry - b $$divI - ldi 15,%r25 - .exit - .procend - .import $$divI,MILLICODE - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pa/milli64.S gcc-3.3/gcc/config/pa/milli64.S *** gcc-3.2.3/gcc/config/pa/milli64.S 2001-11-11 17:45:02.000000000 +0000 --- gcc-3.3/gcc/config/pa/milli64.S 2002-04-02 19:44:45.000000000 +0000 *************** *** 1,8 **** ! /* 64-bit millicode, original author Hewlett-Packard adapted for gcc by Paul Bame ! and Alan Modra ! Copyright 2001 Free Software Foundation, Inc. This file is part of GNU CC and is released under the terms of of the GNU General Public License as published by the Free Software --- 1,8 ---- ! /* 32 and 64-bit millicode, original author Hewlett-Packard adapted for gcc by Paul Bame ! and Alan Modra . ! Copyright 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC and is released under the terms of of the GNU General Public License as published by the Free Software *************** mrp_slot: .equ -20 /* "current RP" s *** 194,199 **** --- 194,223 ---- #define LREF(sym) CAT(L$,sym) #endif + #ifdef L_dyncall + SUBSPA_MILLI + ATTR_DATA + GSYM($$dyncall) + .export $$dyncall,millicode + .proc + .callinfo millicode + .entry + bb,>=,n %r22,30,LREF(1) ; branch if not plabel address + depi 0,31,2,%r22 ; clear the two least significant bits + ldw 4(%r22),%r19 ; load new LTP value + ldw 0(%r22),%r22 ; load address of target + LSYM(1) + #ifdef LINUX + bv %r0(%r22) ; branch to the real target + #else + ldsid (%sr0,%r22),%r1 ; get the "space ident" selected by r22 + mtsp %r1,%sr0 ; move that space identifier into sr0 + be 0(%sr0,%r22) ; branch to the real target + #endif + stw %r2,-24(%r30) ; save return address into frame marker + .exit + .procend + #endif #ifdef L_divI /* ROUTINES: $$divI, $$divoI diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa32-linux.h gcc-3.3/gcc/config/pa/pa32-linux.h *** gcc-3.2.3/gcc/config/pa/pa32-linux.h 2002-02-26 23:29:24.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa32-linux.h 2002-12-06 02:54:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 22,26 **** #undef TARGET_ELF32 #define TARGET_ELF32 1 ! #undef CPP_SPEC ! #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{mhppa:-D__hppa__} %{posix:-D_POSIX_SOURCE} -D_PA_RISC1_1" --- 22,45 ---- #undef TARGET_ELF32 #define TARGET_ELF32 1 ! /* Sibcalls are ok when ld is used in single subspace mode. The ! multiple subspace mode is not compatible with sibcalls to external ! functions because the linker generated stubs store the return ! pointer into the frame. This target does not need multiple ! subspace stubs, so we allow sibcalls to all functions. */ ! #undef FUNCTION_OK_FOR_SIBCALL ! #define FUNCTION_OK_FOR_SIBCALL(DECL) 1 ! ! /* The libcall __canonicalize_funcptr_for_compare is referenced in ! crtend.o and the reference isn't resolved in objects that don't ! compare function pointers. Thus, we need to play games to provide ! a reference in crtbegin.o. The rest of the define is the same ! as that in crtstuff.c */ ! #define CTOR_LIST_BEGIN \ ! asm (".type __canonicalize_funcptr_for_compare,@function\n" \ ! " .text\n" \ ! " .word __canonicalize_funcptr_for_compare-$PIC_pcrel$0"); \ ! STATIC func_ptr __CTOR_LIST__[1] \ ! __attribute__ ((__unused__, section(".ctors"), \ ! aligned(sizeof(func_ptr)))) \ ! = { (func_ptr) (-1) } diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa32-regs.h gcc-3.3/gcc/config/pa/pa32-regs.h *** gcc-3.2.3/gcc/config/pa/pa32-regs.h 2001-11-11 17:45:02.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa32-regs.h 2003-01-31 20:38:54.000000000 +0000 *************** *** 164,171 **** : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. ! On the HP-PA, the cpu registers can hold any mode. We ! force this to be an even register is it cannot hold the full mode. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((REGNO) == 0 ? (MODE) == CCmode || (MODE) == CCFPmode \ /* On 1.0 machines, don't allow wide non-fp modes in fp regs. */ \ --- 164,174 ---- : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. ! On the HP-PA, the cpu registers can hold any mode. For DImode, we ! choose a set of general register that includes the incoming arguments ! and the return value. We specify a set with no overlaps so that we don't ! have to specify that the destination register in patterns using this mode ! is an early clobber. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((REGNO) == 0 ? (MODE) == CCmode || (MODE) == CCFPmode \ /* On 1.0 machines, don't allow wide non-fp modes in fp regs. */ \ *************** *** 173,181 **** ? GET_MODE_SIZE (MODE) <= 4 || GET_MODE_CLASS (MODE) == MODE_FLOAT \ : FP_REGNO_P (REGNO) \ ? GET_MODE_SIZE (MODE) <= 4 || ((REGNO) & 1) == 0 \ - /* Make wide modes be in aligned registers. */ \ : (GET_MODE_SIZE (MODE) <= UNITS_PER_WORD \ ! || (GET_MODE_SIZE (MODE) <= 4 * UNITS_PER_WORD && ((REGNO) & 1) == 0))) /* How to renumber registers for dbx and gdb. --- 176,186 ---- ? GET_MODE_SIZE (MODE) <= 4 || GET_MODE_CLASS (MODE) == MODE_FLOAT \ : FP_REGNO_P (REGNO) \ ? GET_MODE_SIZE (MODE) <= 4 || ((REGNO) & 1) == 0 \ : (GET_MODE_SIZE (MODE) <= UNITS_PER_WORD \ ! || (GET_MODE_SIZE (MODE) == 2 * UNITS_PER_WORD \ ! && ((((REGNO) & 1) == 1 && (REGNO) <= 25) || (REGNO) == 28)) \ ! || (GET_MODE_SIZE (MODE) == 4 * UNITS_PER_WORD \ ! && (((REGNO) & 3) == 3 && (REGNO) <= 23)))) /* How to renumber registers for dbx and gdb. *************** enum reg_class { NO_REGS, R1_REGS, GENER *** 244,259 **** {0x00000000, 0x00000000, 0x01000000}, /* SHIFT_REGS */ \ {0xfffffffe, 0xffffffff, 0x01ffffff}} /* ALL_REGS */ ! /* This may not actually be necessary anymore. But until I can prove ! otherwise it will stay. */ ! #define CLASS_CANNOT_CHANGE_MODE NO_REGS ! ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ ! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) ! ! /* The same information, inverted: ! Return the class number of the smallest class containing reg number REGNO. This could be a conditional expression or could index an array. */ --- 249,255 ---- {0x00000000, 0x00000000, 0x01000000}, /* SHIFT_REGS */ \ {0xfffffffe, 0xffffffff, 0x01ffffff}} /* ALL_REGS */ ! /* Return the class number of the smallest class containing reg number REGNO. This could be a conditional expression or could index an array. */ *************** enum reg_class { NO_REGS, R1_REGS, GENER *** 263,269 **** : (REGNO) < 32 ? GENERAL_REGS \ : (REGNO) < 56 ? FP_REGS \ : (REGNO) < 88 ? FPUPPER_REGS \ - : (REGNO) < 88 ? FPUPPER_REGS \ : SHIFT_REGS) /* Get reg_class from a letter such as appears in the machine description. */ --- 259,264 ---- *************** enum reg_class { NO_REGS, R1_REGS, GENER *** 271,277 **** #define REG_CLASS_FROM_LETTER(C) \ ((C) == 'f' ? FP_REGS : \ (C) == 'y' ? FPUPPER_REGS : \ - (C) == 'y' ? FPUPPER_REGS : \ (C) == 'x' ? FP_REGS : \ (C) == 'q' ? SHIFT_REGS : \ (C) == 'a' ? R1_REGS : \ --- 266,271 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-64.h gcc-3.3/gcc/config/pa/pa-64.h *** gcc-3.2.3/gcc/config/pa/pa-64.h 2001-12-17 15:05:36.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-64.h 2002-09-17 03:30:37.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 65,75 **** #define FLOAT_TYPE_SIZE 32 #undef DOUBLE_TYPE_SIZE #define DOUBLE_TYPE_SIZE 64 - /* This should be 128, but until we work out the ABI for the 128bit - FP codes supplied by HP we'll keep it at 64 bits. */ #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE 64 ! #define MAX_WCHAR_TYPE_SIZE 32 /* Temporary until we figure out what to do with those *(&@$ 32bit relocs which appear in stabs. */ --- 65,72 ---- #define FLOAT_TYPE_SIZE 32 #undef DOUBLE_TYPE_SIZE #define DOUBLE_TYPE_SIZE 64 #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE 128 /* Temporary until we figure out what to do with those *(&@$ 32bit relocs which appear in stabs. */ *************** Boston, MA 02111-1307, USA. */ *** 91,98 **** #undef STATIC_CHAIN_REGNUM #define STATIC_CHAIN_REGNUM 31 ! /* Nonzero if we do not know how to pass TYPE solely in registers. */ ! #define MUST_PASS_IN_STACK(MODE,TYPE) \ ! ((TYPE) != 0 \ ! && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ ! || TREE_ADDRESSABLE (TYPE))) --- 88,98 ---- #undef STATIC_CHAIN_REGNUM #define STATIC_CHAIN_REGNUM 31 ! /* If defined, a C expression which determines whether the default ! implementation of va_arg will attempt to pad down before reading the ! next argument, if that argument is smaller than its aligned space as ! controlled by PARM_BOUNDARY. If this macro is not defined, all such ! arguments are padded down when BYTES_BIG_ENDIAN is true. We don't ! want aggregrates padded down. */ ! ! #define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type)) diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa64-hpux.h gcc-3.3/gcc/config/pa/pa64-hpux.h *** gcc-3.2.3/gcc/config/pa/pa64-hpux.h 2003-02-03 16:14:27.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa64-hpux.h 2003-04-11 18:57:56.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,40 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* We can debug dynamically linked executables on hpux11; we also ! want dereferencing of a NULL pointer to cause a SEGV. */ #undef LINK_SPEC #define LINK_SPEC \ ! "-E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-shared}" /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC \ "%{!shared:\ ! %{!p:\ ! %{!pg:\ ! %{!threads:-lc}\ ! %{threads:-lcma -lc_r}}\ ! %{p: -L/lib/libp/ -lc}\ ! %{pg: -L/lib/libp/ -lc}}} /usr/lib/pa20_64/milli.a" /* Under hpux11, the normal location of the `ld' and `as' programs is the /usr/ccs/bin directory. */ --- 19,58 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #undef SUBTARGET_SWITCHES + #define SUBTARGET_SWITCHES \ + { "sio", MASK_SIO, \ + N_("Generate cpp defines for server IO") }, \ + { "wsio", -MASK_SIO, \ + N_("Generate cpp defines for workstation IO") }, \ + {"gnu-ld", MASK_GNU_LD, \ + N_("Assume code will be linked by GNU ld") }, \ + {"hp-ld", -MASK_GNU_LD, \ + N_("Assume code will be linked by HP ld") }, + /* We can debug dynamically linked executables on hpux11; we also ! want dereferencing of a NULL pointer to cause a SEGV. Do not move ! the "+Accept TypeMismatch" switch. We check for it in collect2 ! to determine which init/fini is needed. */ #undef LINK_SPEC + #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD) #define LINK_SPEC \ ! "%{mhp-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}}" ! #else ! #define LINK_SPEC \ ! "%{!mgnu-ld:+Accept TypeMismatch} -E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}}" ! #endif /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC \ "%{!shared:\ ! %{!p:%{!pg: -lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ ! %{pg: -L/usr/lib/pa20_64/libp/ -lgprof -lc\ ! %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\ ! %{p: -L/usr/lib/pa20_64/libp/ -lprof -lc\ ! %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ ! /usr/lib/pa20_64/milli.a" /* Under hpux11, the normal location of the `ld' and `as' programs is the /usr/ccs/bin directory. */ *************** Boston, MA 02111-1307, USA. */ *** 58,236 **** #define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/pa20_64/" #endif ! /* hpux11 has the new HP assembler. It's still lousy, but it's a whole lot ! better than the assembler shipped with older versions of hpux. */ ! #undef NEW_HP_ASSEMBLER ! #define NEW_HP_ASSEMBLER 1 #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ ! do { \ ! if (TARGET_64BIT) \ ! fputs("\t.LEVEL 2.0w\n", FILE); \ ! else if (TARGET_PA_20) \ ! fputs("\t.LEVEL 2.0\n", FILE); \ ! else if (TARGET_PA_11) \ ! fputs("\t.LEVEL 1.1\n", FILE); \ ! else \ ! fputs("\t.LEVEL 1.0\n", FILE); \ ! if (profile_flag)\ ! fprintf (FILE, "\t.IMPORT _mcount, CODE\n");\ ! if (write_symbols != NO_DEBUG) \ ! output_file_directive ((FILE), main_input_filename); \ ! } while (0) ! /* It looks like DWARF2 will be the easiest debug format to handle on this ! platform. */ ! #define OBJECT_FORMAT_ELF ! #define DWARF2_DEBUGGING_INFO ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! /* This isn't quite ready yet. I'm seeing it mess up some line ! tables. For example, we're getting lines starting/ending at ! impossible addresses. */ ! #define DWARF2_ASM_LINE_DEBUG_INFO 1 ! /* The rest of this file is copied from the generic svr4.h. One day we ! would like to simply include svr4.h instead of copying all these ! definitions. */ ! /* Support const sections and the ctors and dtors sections for g++. ! Note that there appears to be two different ways to support const ! sections at the moment. You can either #define the symbol ! READONLY_DATA_SECTION (giving it some code which switches to the ! readonly data section) or else you can #define the symbols ! EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and ! SELECT_RTX_SECTION. We do both here just to be on the safe side. */ ! #define USE_CONST_SECTION 1 ! #define CONST_SECTION_ASM_OP "\t.section\t.rodata" ! /* On svr4, we *do* have support for the .init and .fini sections, and we ! can put stuff in there to be executed before and after `main'. We let ! crtstuff.c and other files know this by defining the following symbols. ! The definitions say how to change sections to the .init and .fini ! sections. This is the same for all known svr4 assemblers. */ ! /* For the time being, we aren't using init sections. `P' relocations ! are currently used for function references. However, P relocations are ! treated as data references and data references are bound by dld.sl ! immediately at program startup. This causes an abort due to undefined ! weak symbols in crtbegin.o (e.g., __register_frame_info). Possibly ! Q relocations might avoid this problem but the GNU assembler doesn't ! support them. */ ! #if 0 ! #define INIT_SECTION_ASM_OP "\t.section\t.init" ! #define FINI_SECTION_ASM_OP "\t.section\t.fini" ! #else ! #define EH_FRAME_IN_DATA_SECTION 1 ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "" ! #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{!shared: \ ! %{!symbolic: \ ! %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}" ! #endif ! /* A default list of other sections which we might be "in" at any given ! time. For targets that use additional sections (e.g. .tdesc) you ! should override this definition in the target-specific file which ! includes this file. */ ! #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const ! /* A default list of extra section function definitions. For targets ! that use additional sections (e.g. .tdesc) you should override this ! definition in the target-specific file which includes this file. */ ! #undef EXTRA_SECTION_FUNCTIONS ! #define EXTRA_SECTION_FUNCTIONS \ ! CONST_SECTION_FUNCTION ! #define READONLY_DATA_SECTION() const_section () ! #define CONST_SECTION_FUNCTION \ ! void \ ! const_section () \ ! { \ ! if (!USE_CONST_SECTION) \ ! text_section(); \ ! else if (in_section != in_const) \ ! { \ ! fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ ! in_section = in_const; \ ! } \ ! } ! /* Switch into a generic section. */ ! #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section ! #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! #define UNIQUE_SECTION(DECL,RELOC) \ do { \ ! int len; \ ! char *string; \ ! const char *prefix, \ ! *const name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));\ ! \ ! if (! DECL_ONE_ONLY (DECL)) \ ! { \ ! prefix = "."; \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! prefix = ".text."; \ ! else if (DECL_READONLY_SECTION (DECL, RELOC)) \ ! prefix = ".rodata."; \ ! else \ ! prefix = ".data."; \ ! } \ ! else if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! prefix = ".gnu.linkonce.t."; \ ! else if (DECL_READONLY_SECTION (DECL, RELOC)) \ ! prefix = ".gnu.linkonce.r."; \ else \ ! prefix = ".gnu.linkonce.d."; \ ! \ ! len = strlen (name) + strlen (prefix); \ ! string = alloca (len + 1); \ ! sprintf (string, "%s%s", prefix, name); \ ! \ ! DECL_SECTION_NAME (DECL) = build_string (len, string); \ } while (0) ! /* Define the strings used for the special svr4 .type and .size directives. ! These strings generally do not vary from one system running svr4 to ! another, but if a given system (e.g. m88k running svr) needs to use ! different pseudo-op names for these, they may be overridden in the ! file which includes this one. */ ! #define TYPE_ASM_OP "\t.type\t" ! #define SIZE_ASM_OP "\t.size\t" ! /* This is how we tell the assembler that a symbol is weak. */ ! #define ASM_WEAKEN_LABEL(FILE,NAME) \ ! do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ ! fputc ('\n', FILE); } while (0) ! /* The following macro defines the format used to output the second ! operand of the .type assembler directive. Different svr4 assemblers ! expect various different forms for this operand. The one given here ! is just a default. You may need to override it in your machine- ! specific tm.h file (depending upon the particulars of your assembler). */ ! #define TYPE_OPERAND_FMT "@%s" ! /* Write the extra assembler code needed to declare a function's result. ! Most svr4 assemblers don't require any special declaration of the ! result value, but there are exceptions. */ ! #ifndef ASM_DECLARE_RESULT ! #define ASM_DECLARE_RESULT(FILE, RESULT) #endif /* If using HP ld do not call pxdb. Use size as a program that does nothing --- 76,407 ---- #define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/pa20_64/" #endif ! /* Due to limitations in the target structure, it isn't currently possible ! to dynamically switch between the GNU and HP assemblers. */ ! #undef TARGET_GAS ! ! /* Configure selects the standard ELFOS defines for use with GAS. */ ! #ifdef USING_ELFOS_H ! ! /* We are using GAS. */ ! #define TARGET_GAS 1 #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ ! do { \ ! if (TARGET_64BIT) \ ! fputs("\t.LEVEL 2.0w\n", FILE); \ ! else if (TARGET_PA_20) \ ! fputs("\t.LEVEL 2.0\n", FILE); \ ! else if (TARGET_PA_11) \ ! fputs("\t.LEVEL 1.1\n", FILE); \ ! else \ ! fputs("\t.LEVEL 1.0\n", FILE); \ ! if (profile_flag) \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, "_mcount", "function"); \ ! if (write_symbols != NO_DEBUG) \ ! { \ ! output_file_directive ((FILE), main_input_filename); \ ! fputs ("\t.version\t\"01.01\"\n", FILE); \ ! } \ ! } while (0) ! /* This is how we output a null terminated string. */ ! #undef STRING_ASM_OP ! #define STRING_ASM_OP "\t.stringz\t" + #define TEXT_SECTION_ASM_OP "\t.text" + #define DATA_SECTION_ASM_OP "\t.data" + #define BSS_SECTION_ASM_OP "\t.section\t.bss" ! #define JCR_SECTION_NAME ".jcr" ! #define HP_INIT_ARRAY_SECTION_ASM_OP "\t.section\t.init" ! #define GNU_INIT_ARRAY_SECTION_ASM_OP "\t.section\t.init_array" ! #define HP_FINI_ARRAY_SECTION_ASM_OP "\t.section\t.fini" ! #define GNU_FINI_ARRAY_SECTION_ASM_OP "\t.section\t.fini_array" ! #undef ASM_OUTPUT_ALIGNED_COMMON ! #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ ! do { \ ! bss_section (); \ ! assemble_name ((FILE), (NAME)); \ ! fputs ("\t.comm ", (FILE)); \ ! fprintf ((FILE), "%d\n", MAX ((SIZE), ((ALIGN) / BITS_PER_UNIT))); \ ! } while (0) ! #undef ASM_OUTPUT_ALIGNED_LOCAL ! #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ ! do { \ ! bss_section (); \ ! fprintf ((FILE), "\t.align %d\n", ((ALIGN) / BITS_PER_UNIT)); \ ! assemble_name ((FILE), (NAME)); \ ! fprintf ((FILE), "\n\t.block %d\n", (SIZE)); \ ! } while (0) ! /* The define in pa.h doesn't work with the alias attribute. The ! default is ok with the following define for GLOBAL_ASM_OP. */ ! #undef TARGET_ASM_GLOBALIZE_LABEL ! /* This is how we globalize a label. */ ! #define GLOBAL_ASM_OP "\t.globl\t" ! /* Hacked version from elfos.h that doesn't output a label. */ ! #undef ASM_DECLARE_FUNCTION_NAME ! #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ! ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ! } while (0) ! /* The type of external references must be set correctly for the ! dynamic loader to work correctly. This is equivalent to the ! HP assembler's .IMPORT directive but relates more directly to ! ELF object file types. */ ! #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ ! do { \ ! int save_referenced; \ ! save_referenced = TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (DECL));\ ! if (FUNCTION_NAME_P (NAME)) \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ! else \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (DECL)) = save_referenced;\ ! } while (0) ! /* We need set the type for external libcalls. Also note that not all ! libcall names are passed to targetm.encode_section_info (e.g., __main). ! Thus, we also have to do the section encoding if it hasn't been done ! already. */ ! #undef ASM_OUTPUT_EXTERNAL_LIBCALL ! #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ! do { \ ! if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \ ! hppa_encode_label (FUN); \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, XSTR (FUN, 0), "function"); \ ! } while (0) ! /* We need to use the HP style for internal labels. */ ! #undef ASM_OUTPUT_INTERNAL_LABEL ! #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \ ! fprintf (FILE, "%c$%s%04d\n", (PREFIX)[0], (PREFIX) + 1, NUM) ! #undef ASM_GENERATE_INTERNAL_LABEL ! #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ ! sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM)) ! #else /* USING_ELFOS_H */ + /* We are not using GAS. */ + #define TARGET_GAS 0 ! /* HPUX 11 has the "new" HP assembler. It's still lousy, but it's a whole ! lot better than the assembler shipped with older versions of hpux. ! However, it doesn't support weak symbols and is a bad fit with ELF. */ ! #undef NEW_HP_ASSEMBLER ! #define NEW_HP_ASSEMBLER 1 ! /* It looks like DWARF2 will be the easiest debug format to handle on this ! platform. */ ! #define DWARF2_DEBUGGING_INFO 1 ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! /* This target uses the ELF object file format. */ ! #define OBJECT_FORMAT_ELF ! #undef ASM_FILE_START ! #define ASM_FILE_START(FILE) \ do { \ ! if (TARGET_64BIT) \ ! fputs("\t.LEVEL 2.0w\n", FILE); \ ! else if (TARGET_PA_20) \ ! fputs("\t.LEVEL 2.0\n", FILE); \ ! else if (TARGET_PA_11) \ ! fputs("\t.LEVEL 1.1\n", FILE); \ else \ ! fputs("\t.LEVEL 1.0\n", FILE); \ ! fputs("\t.SPACE $PRIVATE$,SORT=16\n\ ! \t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31\n\ ! \t.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82\n\ ! \t.SPACE $TEXT$,SORT=8\n\ ! \t.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44\n\ ! \t.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n", FILE); \ ! if (profile_flag) \ ! fprintf (FILE, "\t.IMPORT _mcount, CODE\n"); \ ! if (write_symbols != NO_DEBUG) \ ! output_file_directive ((FILE), main_input_filename); \ } while (0) ! #undef TEXT_SECTION_ASM_OP ! #define TEXT_SECTION_ASM_OP "\t.SUBSPA $CODE$\n" ! #undef READONLY_DATA_SECTION_ASM_OP ! #define READONLY_DATA_SECTION_ASM_OP "\t.SUBSPA $LIT$\n" ! #undef DATA_SECTION_ASM_OP ! #define DATA_SECTION_ASM_OP "\t.SUBSPA $DATA$\n" ! #undef BSS_SECTION_ASM_OP ! #define BSS_SECTION_ASM_OP "\t.SUBSPA $BSS$\n" ! /* We provide explicit defines for CTORS_SECTION_ASM_OP and ! DTORS_SECTION_ASM_OP since we don't yet have support for ! named sections with the HP assembler. */ ! #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "\t.SUBSPA \\.ctors,QUAD=1,ALIGN=8,ACCESS=31" ! #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "\t.SUBSPA \\.dtors,QUAD=1,ALIGN=8,ACCESS=31" ! #define HP_INIT_ARRAY_SECTION_ASM_OP \ ! "\t.SUBSPA \\.init,QUAD=1,ALIGN=8,ACCESS=31" ! #define GNU_INIT_ARRAY_SECTION_ASM_OP \ ! "\t.SUBSPA \\.init_array,QUAD=1,ALIGN=8,ACCESS=31" ! #define HP_FINI_ARRAY_SECTION_ASM_OP \ ! "\t.SUBSPA \\.fini,QUAD=1,ALIGN=8,ACCESS=31" ! #define GNU_FINI_ARRAY_SECTION_ASM_OP \ ! "\t.SUBSPA \\.fini_array,QUAD=1,ALIGN=8,ACCESS=31" ! #endif /* USING_ELFOS_H */ ! /* The following defines, used to run constructors and destructors with ! the SOM linker under HP-UX 11, are not needed. */ ! #undef HAS_INIT_SECTION ! #undef LD_INIT_SWITCH ! #undef LD_FINI_SWITCH ! /* The following STARTFILE_SPEC and ENDFILE_SPEC defines provide the ! magic needed to run initializers and finalizers. */ ! #undef STARTFILE_SPEC ! #define STARTFILE_SPEC \ ! "%{!shared: %{!symbolic: crt0.o%s}} %{static:crtbeginT.o%s} \ ! %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s}" ! /* Since HP uses the .init and .fini sections for array initializers ! and finalizers, we need different defines for INIT_SECTION_ASM_OP ! and FINI_SECTION_ASM_OP. With the implementation adopted below, ! the sections are not actually used. However, we still must provide ! defines to select the proper code path. */ ! #undef INIT_SECTION_ASM_OP ! #define INIT_SECTION_ASM_OP ! #undef FINI_SECTION_ASM_OP ! #define FINI_SECTION_ASM_OP ! /* We are using array initializers and don't want calls in the INIT ! and FINI sections. */ ! #undef CRT_CALL_STATIC_FUNCTION ! #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) ! ! /* The init_priority attribute is not supported with HP ld. This could be ! supported if collect2 was used with LD_INIT_SWITCH. Unfortunately, this ! approach doesn't work with GNU ld since HP-UX doesn't support DT_INIT, ! and therefore the -init and -fini GNU ld switches. */ ! #undef SUPPORTS_INIT_PRIORITY ! #define SUPPORTS_INIT_PRIORITY (TARGET_GNU_LD ? 1 : 0) ! ! /* We use DTOR_LIST_BEGIN to carry a bunch of hacks to allow us to use ! the init and fini array sections with both the HP and GNU linkers. ! The linkers setup the required dynamic entries in the dynamic segment ! and the dynamic linker does the calls. This approach avoids using ! collect2. ! ! The first hack is to implement __do_global_ctors_aux in crtbegin as ! it needs to be the first entry in the init array so that it is called ! last. HP got the order of the init array backwards. The DT_INIT_ARRAY ! is supposed to be executed in the same order as the addresses appear in ! the array. DT_FINI_ARRAY is supposed to be executed in the opposite ! order. ! ! The second hack is stubs for __cxa_finalize and _Jv_RegisterClasses. ! The HP implementation of undefined weak symbols is broken. The linker ! and dynamic loader both search for undefined weak symbols contrary the ! generic System V ABI. An undefined weak symbol should resolve to a ! value of 0 rather than causing an error. The prototypes for ! __cxa_finalize and _Jv_RegisterClasses in crtstuff.c are weak when ! weak is supported (GNU as), so in theory a strong define should override ! the stub functions provided here. ! ! The final hack is a set of plabels to implement the effect of ! CRT_CALL_STATIC_FUNCTION. HP-UX 11 only supports DI_INIT_ARRAY and ! DT_FINI_ARRAY and they put the arrays in .init and .fini, rather than ! in .init_array and .fini_array. The standard defines for .init and ! .fini have the execute flag set. So, the assembler has to be hacked ! to munge the standard flags for these sections to make them agree ! with what the HP linker expects. With the GNU linker, we need to ! used the .init_array and .fini_array sections. So, we set up for ! both just in case. Once we have built the table, the linker does ! the rest of the work. ! ! The order is significant. Placing __do_global_ctors_aux first in ! the list, results in it being called last. User specified initializers, ! either using the linker +init command or a plabel, run before the ! initializers specified here. */ ! ! /* We need a __cxa_finalize stub if CRTSTUFFS_O is defined. */ ! #ifdef CRTSTUFFS_O ! #define PA_CXA_FINALIZE_STUB \ ! extern void __cxa_finalize (void *) TARGET_ATTRIBUTE_WEAK; \ ! void \ ! __cxa_finalize (void *p __attribute__((unused))) {} ! #else ! #define PA_CXA_FINALIZE_STUB ! #endif ! ! /* We need a _Jv_RegisterClasses stub if JCR_SECTION_NAME is defined. */ ! #ifdef JCR_SECTION_NAME ! #define PA_JV_REGISTERCLASSES_STUB \ ! void \ ! _Jv_RegisterClasses (void *p __attribute__((unused))) {} ! #else ! #define PA_JV_REGISTERCLASSES_STUB ! #endif ! ! /* We need to add frame_dummy to the initializer list if EH_FRAME_SECTION_NAME ! or JCR_SECTION_NAME is defined. */ ! #if defined(EH_FRAME_SECTION_NAME) || defined(JCR_SECTION_NAME) ! #define PA_INIT_FRAME_DUMMY_ASM_OP ".dword P%frame_dummy" ! #else ! #define PA_INIT_FRAME_DUMMY_ASM_OP "" ! #endif ! ! #define PA_INIT_FINI_HACK \ ! static void __attribute__((used)) \ ! __do_global_ctors_aux (void) \ ! { \ ! func_ptr *p = __CTOR_LIST__; \ ! while (*(p + 1)) \ ! p++; \ ! for (; *p != (func_ptr) -1; p--) \ ! (*p) (); \ ! } \ ! \ ! PA_CXA_FINALIZE_STUB \ ! PA_JV_REGISTERCLASSES_STUB \ ! \ ! asm (HP_INIT_ARRAY_SECTION_ASM_OP); \ ! asm (".dword P%__do_global_ctors_aux"); \ ! asm (PA_INIT_FRAME_DUMMY_ASM_OP); \ ! asm (GNU_INIT_ARRAY_SECTION_ASM_OP); \ ! asm (".dword P%__do_global_ctors_aux"); \ ! asm (PA_INIT_FRAME_DUMMY_ASM_OP); \ ! asm (HP_FINI_ARRAY_SECTION_ASM_OP); \ ! asm (".dword P%__do_global_dtors_aux"); \ ! asm (GNU_FINI_ARRAY_SECTION_ASM_OP); \ ! asm (".dword P%__do_global_dtors_aux") ! ! /* The following two variants of DTOR_LIST_BEGIN are identical to those ! in crtstuff.c except for the addition of the above init-fini hack. */ ! #ifdef DTORS_SECTION_ASM_OP ! #define DTOR_LIST_BEGIN \ ! asm (DTORS_SECTION_ASM_OP); \ ! STATIC func_ptr __DTOR_LIST__[1] \ ! __attribute__ ((aligned(sizeof(func_ptr)))) \ ! = { (func_ptr) (-1) }; \ ! PA_INIT_FINI_HACK ! #else ! #define DTOR_LIST_BEGIN \ ! STATIC func_ptr __DTOR_LIST__[1] \ ! __attribute__ ((section(".dtors"), aligned(sizeof(func_ptr)))) \ ! = { (func_ptr) (-1) }; \ ! PA_INIT_FINI_HACK #endif /* If using HP ld do not call pxdb. Use size as a program that does nothing diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa64-linux.h gcc-3.3/gcc/config/pa/pa64-linux.h *** gcc-3.2.3/gcc/config/pa/pa64-linux.h 2001-04-13 05:13:43.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa64-linux.h 2002-09-22 19:23:19.000000000 +0000 *************** *** 1,5 **** /* Definitions for PA_RISC with ELF format on 64-bit Linux ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for PA_RISC with ELF format on 64-bit Linux ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,26 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #undef CPP_SPEC - #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{mhppa:-D__hppa__} %{posix:-D_POSIX_SOURCE} -D_PA_RISC2_0 -D__LP64__" - #if 0 /* needs some work :-( */ /* If defined, this macro specifies a table of register pairs used to eliminate unneeded registers that point into the stack frame. */ --- 18,23 ---- *************** Boston, MA 02111-1307, USA. */ *** 32,38 **** {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ } ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM with register number TO. The frame pointer is automatically handled. */ --- 29,35 ---- {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ } ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM with register number TO. The frame pointer is automatically handled. */ diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa64-regs.h gcc-3.3/gcc/config/pa/pa64-regs.h *** gcc-3.2.3/gcc/config/pa/pa64-regs.h 2001-11-11 17:45:02.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa64-regs.h 2003-01-31 23:51:23.000000000 +0000 *************** enum reg_class { NO_REGS, R1_REGS, GENER *** 232,249 **** {0x00000000, 0x10000000}, /* SHIFT_REGS */ \ {0xfffffffe, 0x1fffffff}} /* ALL_REGS */ ! /* If defined, gives a class of registers that cannot be used as the ! operand of a SUBREG that changes the mode of the object illegally. */ ! /* ??? This may not actually be necessary anymore. But until I can prove ! otherwise it will stay. */ ! #define CLASS_CANNOT_CHANGE_MODE (FP_REGS) ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ ! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) ! /* The same information, inverted: ! Return the class number of the smallest class containing reg number REGNO. This could be a conditional expression or could index an array. */ --- 232,250 ---- {0x00000000, 0x10000000}, /* SHIFT_REGS */ \ {0xfffffffe, 0x1fffffff}} /* ALL_REGS */ ! /* Defines invalid mode changes. ! SImode loads to floating-point registers are not zero-extended. ! The definition for LOAD_EXTEND_OP specifies that integer loads ! narrower than BITS_PER_WORD will be zero-extended. As a result, ! we inhibit changes from SImode unless they are to a mode that is ! identical in size. */ ! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ ! ((FROM) == SImode && GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ ! ? reg_classes_intersect_p (CLASS, FP_REGS) : 0) ! ! /* Return the class number of the smallest class containing reg number REGNO. This could be a conditional expression or could index an array. */ diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa.c gcc-3.3/gcc/config/pa/pa.c *** gcc-3.2.3/gcc/config/pa/pa.c 2003-04-16 23:00:23.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa.c 2003-04-16 17:33:39.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 28,37 **** #include "real.h" #include "insn-config.h" #include "conditions.h" - #include "output.h" #include "insn-attr.h" #include "flags.h" #include "tree.h" #include "expr.h" #include "optabs.h" #include "libfuncs.h" --- 28,38 ---- #include "real.h" #include "insn-config.h" #include "conditions.h" #include "insn-attr.h" #include "flags.h" #include "tree.h" + #include "output.h" + #include "except.h" #include "expr.h" #include "optabs.h" #include "libfuncs.h" *************** Boston, MA 02111-1307, USA. */ *** 43,52 **** --- 44,92 ---- #include "toplev.h" #include "ggc.h" #include "recog.h" + #include "predict.h" #include "tm_p.h" #include "target.h" #include "target-def.h" + static int hppa_use_dfa_pipeline_interface PARAMS ((void)); + + #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE + #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE hppa_use_dfa_pipeline_interface + + static int + hppa_use_dfa_pipeline_interface () + { + return 1; + } + + /* Return nonzero if there is a bypass for the output of + OUT_INSN and the fp store IN_INSN. */ + int + hppa_fpstore_bypass_p (out_insn, in_insn) + rtx out_insn, in_insn; + { + enum machine_mode store_mode; + enum machine_mode other_mode; + rtx set; + + if (recog_memoized (in_insn) < 0 + || get_attr_type (in_insn) != TYPE_FPSTORE + || recog_memoized (out_insn) < 0) + return 0; + + store_mode = GET_MODE (SET_SRC (PATTERN (in_insn))); + + set = single_set (out_insn); + if (!set) + return 0; + + other_mode = GET_MODE (SET_SRC (set)); + + return (GET_MODE_SIZE (store_mode) == GET_MODE_SIZE (other_mode)); + } + + #ifndef DO_FRAME_NOTES #ifdef INCOMING_RETURN_ADDR_RTX #define DO_FRAME_NOTES 1 *************** Boston, MA 02111-1307, USA. */ *** 55,95 **** #endif #endif - #if DO_FRAME_NOTES - #define FRP(INSN) \ - do \ - { \ - rtx insn = INSN; \ - RTX_FRAME_RELATED_P (insn) = 1; \ - } \ - while (0) - #else - #define FRP(INSN) INSN - #endif - static inline rtx force_mode PARAMS ((enum machine_mode, rtx)); static void pa_combine_instructions PARAMS ((rtx)); static int pa_can_combine_p PARAMS ((rtx, rtx, rtx, int, rtx, rtx, rtx)); static int forward_branch_p PARAMS ((rtx)); static int shadd_constant_p PARAMS ((int)); - static void pa_add_gc_roots PARAMS ((void)); - static void mark_deferred_plabels PARAMS ((void *)); static void compute_zdepwi_operands PARAMS ((unsigned HOST_WIDE_INT, unsigned *)); static int compute_movstrsi_length PARAMS ((rtx)); static bool pa_assemble_integer PARAMS ((rtx, unsigned int, int)); static void remove_useless_addtr_insns PARAMS ((rtx, int)); static void store_reg PARAMS ((int, int, int)); static void load_reg PARAMS ((int, int, int)); ! static void set_reg_plus_d PARAMS ((int, int, int)); ! static rtx get_last_nonnote_insn PARAMS ((void)); static void pa_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static int pa_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int pa_adjust_priority PARAMS ((rtx, int)); static int pa_issue_rate PARAMS ((void)); /* Save the operands last given to a compare for use when we generate a scc or bcc insn. */ - rtx hppa_compare_op0, hppa_compare_op1; enum cmp_type hppa_branch_type; --- 95,138 ---- #endif #endif static inline rtx force_mode PARAMS ((enum machine_mode, rtx)); static void pa_combine_instructions PARAMS ((rtx)); static int pa_can_combine_p PARAMS ((rtx, rtx, rtx, int, rtx, rtx, rtx)); static int forward_branch_p PARAMS ((rtx)); static int shadd_constant_p PARAMS ((int)); static void compute_zdepwi_operands PARAMS ((unsigned HOST_WIDE_INT, unsigned *)); static int compute_movstrsi_length PARAMS ((rtx)); static bool pa_assemble_integer PARAMS ((rtx, unsigned int, int)); static void remove_useless_addtr_insns PARAMS ((rtx, int)); static void store_reg PARAMS ((int, int, int)); + static void store_reg_modify PARAMS ((int, int, int)); static void load_reg PARAMS ((int, int, int)); ! static void set_reg_plus_d PARAMS ((int, int, int, int)); ! static void pa_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void pa_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static int pa_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int pa_adjust_priority PARAMS ((rtx, int)); static int pa_issue_rate PARAMS ((void)); + static void pa_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)) + ATTRIBUTE_UNUSED; + static void pa_encode_section_info PARAMS ((tree, int)); + static const char *pa_strip_name_encoding PARAMS ((const char *)); + static void pa_globalize_label PARAMS ((FILE *, const char *)) + ATTRIBUTE_UNUSED; + static void pa_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); + #if !defined(USE_COLLECT2) + static void pa_asm_out_constructor PARAMS ((rtx, int)); + static void pa_asm_out_destructor PARAMS ((rtx, int)); + #endif + static void pa_init_builtins PARAMS ((void)); + static void copy_fp_args PARAMS ((rtx)) ATTRIBUTE_UNUSED; + static int length_fp_args PARAMS ((rtx)) ATTRIBUTE_UNUSED; + static struct deferred_plabel *get_plabel PARAMS ((const char *)) + ATTRIBUTE_UNUSED; /* Save the operands last given to a compare for use when we generate a scc or bcc insn. */ rtx hppa_compare_op0, hppa_compare_op1; enum cmp_type hppa_branch_type; *************** static rtx find_addr_reg PARAMS ((rtx)); *** 113,130 **** /* Keep track of the number of bytes we have output in the CODE subspaces during this compilation so we'll know when to emit inline long-calls. */ ! ! unsigned int total_code_bytes; /* Variables to handle plabels that we discover are necessary at assembly output time. They are output after the current function. */ ! ! struct deferred_plabel { rtx internal_label; ! char *name; ! } *deferred_plabels = 0; ! int n_deferred_plabels = 0; /* Initialize the GCC target structure. */ --- 156,173 ---- /* Keep track of the number of bytes we have output in the CODE subspaces during this compilation so we'll know when to emit inline long-calls. */ ! unsigned long total_code_bytes; /* Variables to handle plabels that we discover are necessary at assembly output time. They are output after the current function. */ ! struct deferred_plabel GTY(()) { rtx internal_label; ! const char *name; ! }; ! static GTY((length ("n_deferred_plabels"))) struct deferred_plabel * ! deferred_plabels; ! static size_t n_deferred_plabels = 0; /* Initialize the GCC target structure. */ *************** int n_deferred_plabels = 0; *** 155,195 **** #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE pa_issue_rate struct gcc_target targetm = TARGET_INITIALIZER; void override_options () { ! /* Default to 7100LC scheduling. */ ! if (pa_cpu_string && ! strcmp (pa_cpu_string, "7100")) { pa_cpu_string = "7100"; pa_cpu = PROCESSOR_7100; } ! else if (pa_cpu_string && ! strcmp (pa_cpu_string, "700")) { pa_cpu_string = "700"; pa_cpu = PROCESSOR_700; } ! else if (pa_cpu_string == NULL ! || ! strcmp (pa_cpu_string, "7100LC")) { pa_cpu_string = "7100LC"; pa_cpu = PROCESSOR_7100LC; } ! else if (pa_cpu_string && ! strcmp (pa_cpu_string, "7200")) { pa_cpu_string = "7200"; pa_cpu = PROCESSOR_7200; } ! else if (pa_cpu_string && ! strcmp (pa_cpu_string, "8000")) { ! pa_cpu_string = "8000"; ! pa_cpu = PROCESSOR_8000; } else { ! warning ("unknown -mschedule= option (%s).\nValid options are 700, 7100, 7100LC, 7200, and 8000\n", pa_cpu_string); } /* Set the instruction set architecture. */ --- 198,264 ---- #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE pa_issue_rate + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO pa_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING pa_strip_name_encoding + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK pa_asm_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + + #if !defined(USE_COLLECT2) + #undef TARGET_ASM_CONSTRUCTOR + #define TARGET_ASM_CONSTRUCTOR pa_asm_out_constructor + #undef TARGET_ASM_DESTRUCTOR + #define TARGET_ASM_DESTRUCTOR pa_asm_out_destructor + #endif + + #undef TARGET_INIT_BUILTINS + #define TARGET_INIT_BUILTINS pa_init_builtins + struct gcc_target targetm = TARGET_INITIALIZER; void override_options () { ! if (pa_cpu_string == NULL) ! pa_cpu_string = TARGET_SCHED_DEFAULT; ! ! if (! strcmp (pa_cpu_string, "8000")) ! { ! pa_cpu_string = "8000"; ! pa_cpu = PROCESSOR_8000; ! } ! else if (! strcmp (pa_cpu_string, "7100")) { pa_cpu_string = "7100"; pa_cpu = PROCESSOR_7100; } ! else if (! strcmp (pa_cpu_string, "700")) { pa_cpu_string = "700"; pa_cpu = PROCESSOR_700; } ! else if (! strcmp (pa_cpu_string, "7100LC")) { pa_cpu_string = "7100LC"; pa_cpu = PROCESSOR_7100LC; } ! else if (! strcmp (pa_cpu_string, "7200")) { pa_cpu_string = "7200"; pa_cpu = PROCESSOR_7200; } ! else if (! strcmp (pa_cpu_string, "7300")) { ! pa_cpu_string = "7300"; ! pa_cpu = PROCESSOR_7300; } else { ! warning ("unknown -mschedule= option (%s).\nValid options are 700, 7100, 7100LC, 7200, 7300, and 8000\n", pa_cpu_string); } /* Set the instruction set architecture. */ *************** override_options () *** 217,222 **** --- 286,299 ---- warning ("unknown -march= option (%s).\nValid options are 1.0, 1.1, and 2.0\n", pa_arch_string); } + /* Unconditional branches in the delay slot are not compatible with dwarf2 + call frame information. There is no benefit in using this optimization + on PA8000 and later processors. */ + if (pa_cpu >= PROCESSOR_8000 + || (! USING_SJLJ_EXCEPTIONS && flag_exceptions) + || flag_unwind_tables) + target_flags &= ~MASK_JUMP_IN_DELAY; + if (flag_pic && TARGET_PORTABLE_RUNTIME) { warning ("PIC code generation is not supported in the portable runtime model\n"); *************** override_options () *** 250,261 **** targetm.asm_out.unaligned_op.si = NULL; targetm.asm_out.unaligned_op.di = NULL; } ! /* Register global variables with the garbage collector. */ ! pa_add_gc_roots (); } ! /* Return non-zero only if OP is a register of mode MODE, or CONST0_RTX. */ int reg_or_0_operand (op, mode) --- 327,343 ---- targetm.asm_out.unaligned_op.si = NULL; targetm.asm_out.unaligned_op.di = NULL; } + } ! static void ! pa_init_builtins () ! { ! #ifdef DONT_HAVE_FPUTC_UNLOCKED ! built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = NULL_TREE; ! #endif } ! /* Return nonzero only if OP is a register of mode MODE, or CONST0_RTX. */ int reg_or_0_operand (op, mode) *************** reg_or_0_operand (op, mode) *** 265,271 **** return (op == CONST0_RTX (mode) || register_operand (op, mode)); } ! /* Return non-zero if OP is suitable for use in a call to a named function. For 2.5 try to eliminate either call_operand_address or --- 347,353 ---- return (op == CONST0_RTX (mode) || register_operand (op, mode)); } ! /* Return nonzero if OP is suitable for use in a call to a named function. For 2.5 try to eliminate either call_operand_address or *************** reloc_needed (exp) *** 1801,1808 **** return reloc; } ! /* Does operand (which is a symbolic_operand) live in text space? If ! so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true. */ int read_only_operand (operand, mode) --- 1883,1891 ---- return reloc; } ! /* Does operand (which is a symbolic_operand) live in text space? ! If so, SYMBOL_REF_FLAG, which is set by pa_encode_section_info, ! will be true. */ int read_only_operand (operand, mode) *************** output_ascii (file, p, size) *** 2670,2676 **** fputs ("\"\n\t.STRING \"", file); chars_output = 0; } ! fwrite (partial_output, 1, co, file); chars_output += co; co = 0; } --- 2753,2759 ---- fputs ("\"\n\t.STRING \"", file); chars_output = 0; } ! fwrite (partial_output, 1, (size_t) co, file); chars_output += co; co = 0; } *************** store_reg (reg, disp, base) *** 2941,2955 **** RTX_FRAME_RELATED_P (insn) = 1; } ! /* Emit RTL to set REG to the value specified by BASE+DISP. ! Handle case where DISP > 8k by using the add_high_const patterns. ! Note in DISP > 8k case, we will leave the high part of the address ! in %r1. There is code in expand_hppa_{prologue,epilogue} that knows this.*/ static void ! set_reg_plus_d (reg, base, disp) ! int reg, base, disp; { rtx insn; --- 3024,3083 ---- RTX_FRAME_RELATED_P (insn) = 1; } ! /* Emit RTL to store REG at the memory location specified by BASE and then ! add MOD to BASE. MOD must be <= 8k. */ ! static void ! store_reg_modify (base, reg, mod) ! int base, reg, mod; ! { ! rtx insn, basereg, srcreg, delta; ! ! if (! VAL_14_BITS_P (mod)) ! abort (); ! ! basereg = gen_rtx_REG (Pmode, base); ! srcreg = gen_rtx_REG (word_mode, reg); ! delta = GEN_INT (mod); ! ! insn = emit_insn (gen_post_store (basereg, srcreg, delta)); ! if (DO_FRAME_NOTES) ! { ! RTX_FRAME_RELATED_P (insn) = 1; ! ! /* RTX_FRAME_RELATED_P must be set on each frame related set ! in a parallel with more than one element. Don't set ! RTX_FRAME_RELATED_P in the first set if reg is temporary ! register 1. The effect of this operation is recorded in ! the initial copy. */ ! if (reg != 1) ! { ! RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 0)) = 1; ! RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1; ! } ! else ! { ! /* The first element of a PARALLEL is always processed if it is ! a SET. Thus, we need an expression list for this case. */ ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SET (VOIDmode, basereg, ! gen_rtx_PLUS (word_mode, basereg, delta)), ! REG_NOTES (insn)); ! } ! } ! } ! ! /* Emit RTL to set REG to the value specified by BASE+DISP. Handle case ! where DISP > 8k by using the add_high_const patterns. NOTE indicates ! whether to add a frame note or not. ! ! In the DISP > 8k case, we leave the high part of the address in %r1. ! There is code in expand_hppa_{prologue,epilogue} that knows about this. */ static void ! set_reg_plus_d (reg, base, disp, note) ! int reg, base, disp, note; { rtx insn; *************** set_reg_plus_d (reg, base, disp) *** 2971,2977 **** delta)); } ! if (DO_FRAME_NOTES && reg == STACK_POINTER_REGNUM) RTX_FRAME_RELATED_P (insn) = 1; } --- 3099,3105 ---- delta)); } ! if (DO_FRAME_NOTES && note) RTX_FRAME_RELATED_P (insn) = 1; } *************** compute_frame_size (size, fregs_live) *** 2989,2994 **** --- 3117,3134 ---- of them at the same time. */ fsize = size + (size || frame_pointer_needed ? STARTING_FRAME_OFFSET : 0); + /* If the current function calls __builtin_eh_return, then we need + to allocate stack space for registers that will hold data for + the exception handler. */ + if (DO_FRAME_NOTES && current_function_calls_eh_return) + { + unsigned int i; + + for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; ++i) + continue; + fsize += i * UNITS_PER_WORD; + } + /* Account for space used by the callee general register saves. */ for (i = 18; i >= 3; i--) if (regs_ever_live[i]) *************** compute_frame_size (size, fregs_live) *** 3015,3026 **** fsize += current_function_outgoing_args_size; /* Allocate space for the fixed frame marker. This space must be ! allocated for any function that makes calls or otherwise allocates stack space. */ if (!current_function_is_leaf || fsize) ! fsize += TARGET_64BIT ? 16 : 32; ! return (fsize + STACK_BOUNDARY - 1) & ~(STACK_BOUNDARY - 1); } /* Generate the assembly code for function entry. FILE is a stdio --- 3155,3167 ---- fsize += current_function_outgoing_args_size; /* Allocate space for the fixed frame marker. This space must be ! allocated for any function that makes calls or allocates stack space. */ if (!current_function_is_leaf || fsize) ! fsize += TARGET_64BIT ? 48 : 32; ! return ((fsize + PREFERRED_STACK_BOUNDARY / 8 - 1) ! & ~(PREFERRED_STACK_BOUNDARY / 8 - 1)); } /* Generate the assembly code for function entry. FILE is a stdio *************** compute_frame_size (size, fregs_live) *** 3040,3046 **** to do a "save" insn. The decision about whether or not to do this is made in regclass.c. */ ! void pa_output_function_prologue (file, size) FILE *file; HOST_WIDE_INT size ATTRIBUTE_UNUSED; --- 3181,3187 ---- to do a "save" insn. The decision about whether or not to do this is made in regclass.c. */ ! static void pa_output_function_prologue (file, size) FILE *file; HOST_WIDE_INT size ATTRIBUTE_UNUSED; *************** pa_output_function_prologue (file, size) *** 3060,3065 **** --- 3201,3215 ---- else fputs (",NO_CALLS", file); + /* The SAVE_SP flag is used to indicate that register %r3 is stored + at the beginning of the frame and that it is used as the frame + pointer for the frame. We do this because our current frame + layout doesn't conform to that specified in the the HP runtime + documentation and we need a way to indicate to programs such as + GDB where %r3 is saved. The SAVE_SP flag was chosen because it + isn't used by HP compilers but is supported by the assembler. + However, SAVE_SP is supposed to indicate that the previous stack + pointer has been saved in the frame marker. */ if (frame_pointer_needed) fputs (",SAVE_SP", file); *************** hppa_expand_prologue () *** 3088,3094 **** int size = get_frame_size (); int merge_sp_adjust_with_store = 0; int i, offset; ! rtx tmpreg, size_rtx; gr_saved = 0; fr_saved = 0; --- 3238,3244 ---- int size = get_frame_size (); int merge_sp_adjust_with_store = 0; int i, offset; ! rtx insn, tmpreg; gr_saved = 0; fr_saved = 0; *************** hppa_expand_prologue () *** 3106,3117 **** /* Compute a few things we will use often. */ tmpreg = gen_rtx_REG (word_mode, 1); - size_rtx = GEN_INT (actual_fsize); /* Save RP first. The calling conventions manual states RP will always be stored into the caller's frame at sp - 20 or sp - 16 depending on which ABI is in use. */ ! if (regs_ever_live[2]) store_reg (2, TARGET_64BIT ? -16 : -20, STACK_POINTER_REGNUM); /* Allocate the local frame and set up the frame pointer if needed. */ --- 3256,3266 ---- /* Compute a few things we will use often. */ tmpreg = gen_rtx_REG (word_mode, 1); /* Save RP first. The calling conventions manual states RP will always be stored into the caller's frame at sp - 20 or sp - 16 depending on which ABI is in use. */ ! if (regs_ever_live[2] || current_function_calls_eh_return) store_reg (2, TARGET_64BIT ? -16 : -20, STACK_POINTER_REGNUM); /* Allocate the local frame and set up the frame pointer if needed. */ *************** hppa_expand_prologue () *** 3121,3156 **** { /* Copy the old frame pointer temporarily into %r1. Set up the new stack pointer, then store away the saved old frame pointer ! into the stack at sp+actual_fsize and at the same time update ! the stack pointer by actual_fsize bytes. Two versions, first handles small (<8k) frames. The second handles large (>=8k) frames. */ ! emit_move_insn (tmpreg, frame_pointer_rtx); ! FRP (emit_move_insn (frame_pointer_rtx, stack_pointer_rtx)); ! if (VAL_14_BITS_P (actual_fsize)) { ! rtx insn = emit_insn (gen_post_store (stack_pointer_rtx, tmpreg, ! size_rtx)); ! if (DO_FRAME_NOTES) ! { ! rtvec vec; ! RTX_FRAME_RELATED_P (insn) = 1; ! vec = gen_rtvec (2, ! gen_rtx_SET (VOIDmode, ! gen_rtx_MEM (word_mode, ! stack_pointer_rtx), ! frame_pointer_rtx), ! gen_rtx_SET (VOIDmode, ! stack_pointer_rtx, ! gen_rtx_PLUS (word_mode, ! stack_pointer_rtx, ! size_rtx))); ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SEQUENCE (VOIDmode, vec), ! REG_NOTES (insn)); ! } } else { /* It is incorrect to store the saved frame pointer at *sp, --- 3270,3299 ---- { /* Copy the old frame pointer temporarily into %r1. Set up the new stack pointer, then store away the saved old frame pointer ! into the stack at sp and at the same time update the stack ! pointer by actual_fsize bytes. Two versions, first handles small (<8k) frames. The second handles large (>=8k) frames. */ ! insn = emit_move_insn (tmpreg, frame_pointer_rtx); ! if (DO_FRAME_NOTES) { ! /* We need to record the frame pointer save here since the ! new frame pointer is set in the following insn. */ ! RTX_FRAME_RELATED_P (insn) = 1; ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SET (VOIDmode, ! gen_rtx_MEM (word_mode, stack_pointer_rtx), ! frame_pointer_rtx), ! REG_NOTES (insn)); } + + insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx); + if (DO_FRAME_NOTES) + RTX_FRAME_RELATED_P (insn) = 1; + + if (VAL_14_BITS_P (actual_fsize)) + store_reg_modify (STACK_POINTER_REGNUM, 1, actual_fsize); else { /* It is incorrect to store the saved frame pointer at *sp, *************** hppa_expand_prologue () *** 3161,3197 **** finish allocating the new frame. */ int adjust1 = 8192 - 64; int adjust2 = actual_fsize - adjust1; - rtx delta = GEN_INT (adjust1); - rtx insn = emit_insn (gen_post_store (stack_pointer_rtx, tmpreg, - delta)); - if (DO_FRAME_NOTES) - { - rtvec vec; - RTX_FRAME_RELATED_P (insn) = 1; - vec = gen_rtvec (2, - gen_rtx_SET (VOIDmode, - gen_rtx_MEM (word_mode, - stack_pointer_rtx), - frame_pointer_rtx), - gen_rtx_SET (VOIDmode, - stack_pointer_rtx, - gen_rtx_PLUS (word_mode, - stack_pointer_rtx, - delta))); - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, - gen_rtx_SEQUENCE (VOIDmode, vec), - REG_NOTES (insn)); - } set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, ! adjust2); } ! /* Prevent register spills from being scheduled before the ! stack pointer is raised. Necessary as we will be storing ! registers using the frame pointer as a base register, and ! we happen to set fp before raising sp. */ ! emit_insn (gen_blockage ()); } /* no frame pointer needed. */ else --- 3304,3341 ---- finish allocating the new frame. */ int adjust1 = 8192 - 64; int adjust2 = actual_fsize - adjust1; + store_reg_modify (STACK_POINTER_REGNUM, 1, adjust1); set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, ! adjust2, 1); } ! ! /* We set SAVE_SP in frames that need a frame pointer. Thus, ! we need to store the previous stack pointer (frame pointer) ! into the frame marker on targets that use the HP unwind ! library. This allows the HP unwind library to be used to ! unwind GCC frames. However, we are not fully compatible ! with the HP library because our frame layout differs from ! that specified in the HP runtime specification. ! ! We don't want a frame note on this instruction as the frame ! marker moves during dynamic stack allocation. ! ! This instruction also serves as a blockage to prevent ! register spills from being scheduled before the stack ! pointer is raised. This is necessary as we store ! registers using the frame pointer as a base register, ! and the frame pointer is set before sp is raised. */ ! if (TARGET_HPUX_UNWIND_LIBRARY) ! { ! rtx addr = gen_rtx_PLUS (word_mode, stack_pointer_rtx, ! GEN_INT (TARGET_64BIT ? -8 : -4)); ! ! emit_move_insn (gen_rtx_MEM (word_mode, addr), ! frame_pointer_rtx); ! } ! else ! emit_insn (gen_blockage ()); } /* no frame pointer needed. */ else *************** hppa_expand_prologue () *** 3206,3212 **** bytes. */ else set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, ! actual_fsize); } } --- 3350,3356 ---- bytes. */ else set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, ! actual_fsize, 1); } } *************** hppa_expand_prologue () *** 3216,3222 **** was done earlier. */ if (frame_pointer_needed) { ! for (i = 18, offset = local_fsize; i >= 4; i--) if (regs_ever_live[i] && ! call_used_regs[i]) { store_reg (i, offset, FRAME_POINTER_REGNUM); --- 3360,3386 ---- was done earlier. */ if (frame_pointer_needed) { ! offset = local_fsize; ! ! /* Saving the EH return data registers in the frame is the simplest ! way to get the frame unwind information emitted. We put them ! just before the general registers. */ ! if (DO_FRAME_NOTES && current_function_calls_eh_return) ! { ! unsigned int i, regno; ! ! for (i = 0; ; ++i) ! { ! regno = EH_RETURN_DATA_REGNO (i); ! if (regno == INVALID_REGNUM) ! break; ! ! store_reg (regno, offset, FRAME_POINTER_REGNUM); ! offset += UNITS_PER_WORD; ! } ! } ! ! for (i = 18; i >= 4; i--) if (regs_ever_live[i] && ! call_used_regs[i]) { store_reg (i, offset, FRAME_POINTER_REGNUM); *************** hppa_expand_prologue () *** 3229,3246 **** /* No frame pointer needed. */ else { ! for (i = 18, offset = local_fsize - actual_fsize; i >= 3; i--) if (regs_ever_live[i] && ! call_used_regs[i]) { /* If merge_sp_adjust_with_store is nonzero, then we can optimize the first GR save. */ if (merge_sp_adjust_with_store) { ! rtx delta = GEN_INT (-offset); merge_sp_adjust_with_store = 0; - FRP (emit_insn (gen_post_store (stack_pointer_rtx, - gen_rtx_REG (word_mode, i), - delta))); } else store_reg (i, offset, STACK_POINTER_REGNUM); --- 3393,3434 ---- /* No frame pointer needed. */ else { ! offset = local_fsize - actual_fsize; ! ! /* Saving the EH return data registers in the frame is the simplest ! way to get the frame unwind information emitted. */ ! if (DO_FRAME_NOTES && current_function_calls_eh_return) ! { ! unsigned int i, regno; ! ! for (i = 0; ; ++i) ! { ! regno = EH_RETURN_DATA_REGNO (i); ! if (regno == INVALID_REGNUM) ! break; ! ! /* If merge_sp_adjust_with_store is nonzero, then we can ! optimize the first save. */ ! if (merge_sp_adjust_with_store) ! { ! store_reg_modify (STACK_POINTER_REGNUM, regno, -offset); ! merge_sp_adjust_with_store = 0; ! } ! else ! store_reg (regno, offset, STACK_POINTER_REGNUM); ! offset += UNITS_PER_WORD; ! } ! } ! ! for (i = 18; i >= 3; i--) if (regs_ever_live[i] && ! call_used_regs[i]) { /* If merge_sp_adjust_with_store is nonzero, then we can optimize the first GR save. */ if (merge_sp_adjust_with_store) { ! store_reg_modify (STACK_POINTER_REGNUM, i, -offset); merge_sp_adjust_with_store = 0; } else store_reg (i, offset, STACK_POINTER_REGNUM); *************** hppa_expand_prologue () *** 3252,3258 **** did any GR saves, then just emit the adjustment here. */ if (merge_sp_adjust_with_store) set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, ! actual_fsize); } /* The hppa calling conventions say that %r19, the pic offset --- 3440,3446 ---- did any GR saves, then just emit the adjustment here. */ if (merge_sp_adjust_with_store) set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, ! actual_fsize, 1); } /* The hppa calling conventions say that %r19, the pic offset *************** hppa_expand_prologue () *** 3270,3281 **** /* Floating point register store. */ if (save_fregs) { /* First get the frame or stack pointer to the start of the FP register save area. */ if (frame_pointer_needed) ! set_reg_plus_d (1, FRAME_POINTER_REGNUM, offset); else ! set_reg_plus_d (1, STACK_POINTER_REGNUM, offset); /* Now actually save the FP registers. */ for (i = FP_SAVED_REG_LAST; i >= FP_SAVED_REG_FIRST; i -= FP_REG_STEP) --- 3458,3477 ---- /* Floating point register store. */ if (save_fregs) { + rtx base; + /* First get the frame or stack pointer to the start of the FP register save area. */ if (frame_pointer_needed) ! { ! set_reg_plus_d (1, FRAME_POINTER_REGNUM, offset, 0); ! base = frame_pointer_rtx; ! } else ! { ! set_reg_plus_d (1, STACK_POINTER_REGNUM, offset, 0); ! base = stack_pointer_rtx; ! } /* Now actually save the FP registers. */ for (i = FP_SAVED_REG_LAST; i >= FP_SAVED_REG_FIRST; i -= FP_REG_STEP) *************** hppa_expand_prologue () *** 3290,3309 **** if (DO_FRAME_NOTES) { RTX_FRAME_RELATED_P (insn) = 1; ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SET (VOIDmode, ! gen_rtx_MEM (DFmode, ! plus_constant (stack_pointer_rtx, ! offset)), ! reg), ! REG_NOTES (insn)); } offset += GET_MODE_SIZE (DFmode); fr_saved++; } } } } /* Emit RTL to load REG from the memory location specified by BASE+DISP. --- 3486,3534 ---- if (DO_FRAME_NOTES) { RTX_FRAME_RELATED_P (insn) = 1; ! if (TARGET_64BIT) ! { ! rtx mem = gen_rtx_MEM (DFmode, ! plus_constant (base, offset)); ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SET (VOIDmode, mem, reg), ! REG_NOTES (insn)); ! } ! else ! { ! rtx meml = gen_rtx_MEM (SFmode, ! plus_constant (base, offset)); ! rtx memr = gen_rtx_MEM (SFmode, ! plus_constant (base, offset + 4)); ! rtx regl = gen_rtx_REG (SFmode, i); ! rtx regr = gen_rtx_REG (SFmode, i + 1); ! rtx setl = gen_rtx_SET (VOIDmode, meml, regl); ! rtx setr = gen_rtx_SET (VOIDmode, memr, regr); ! rtvec vec; ! ! RTX_FRAME_RELATED_P (setl) = 1; ! RTX_FRAME_RELATED_P (setr) = 1; ! vec = gen_rtvec (2, setl, setr); ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SEQUENCE (VOIDmode, vec), ! REG_NOTES (insn)); ! } } offset += GET_MODE_SIZE (DFmode); fr_saved++; } } } + + /* FIXME: expand_call and expand_millicode_call need to be fixed to + prevent insns with frame notes being scheduled in the delay slot + of calls. This causes problems because the dwarf2 output code + processes the insn list serially. For now, limit the migration + of prologue insns with a blockage. */ + if (DO_FRAME_NOTES) + emit_insn (gen_blockage ()); } /* Emit RTL to load REG from the memory location specified by BASE+DISP. *************** load_reg (reg, disp, base) *** 3333,3356 **** } } - /* Return the last nonnote insn emitted in current sequence or current - function. This routine looks inside SEQUENCEs. */ - - static rtx - get_last_nonnote_insn () - { - rtx insn = get_last_insn (); - - while (insn) - { - insn = previous_insn (insn); - if (insn == 0 || GET_CODE (insn) != NOTE) - break; - } - - return insn; - } - /* This function generates the assembly code for function exit. Args are as for output_function_prologue (). --- 3558,3563 ---- *************** hppa_expand_epilogue () *** 3433,3439 **** /* Try to restore RP early to avoid load/use interlocks when RP gets used in the return (bv) instruction. This appears to still be necessary even when we schedule the prologue and epilogue. */ ! if (regs_ever_live [2]) { ret_off = TARGET_64BIT ? -16 : -20; if (frame_pointer_needed) --- 3640,3646 ---- /* Try to restore RP early to avoid load/use interlocks when RP gets used in the return (bv) instruction. This appears to still be necessary even when we schedule the prologue and epilogue. */ ! if (regs_ever_live [2] || current_function_calls_eh_return) { ret_off = TARGET_64BIT ? -16 : -20; if (frame_pointer_needed) *************** hppa_expand_epilogue () *** 3455,3461 **** /* General register restores. */ if (frame_pointer_needed) { ! for (i = 18, offset = local_fsize; i >= 4; i--) if (regs_ever_live[i] && ! call_used_regs[i]) { load_reg (i, offset, FRAME_POINTER_REGNUM); --- 3662,3687 ---- /* General register restores. */ if (frame_pointer_needed) { ! offset = local_fsize; ! ! /* If the current function calls __builtin_eh_return, then we need ! to restore the saved EH data registers. */ ! if (DO_FRAME_NOTES && current_function_calls_eh_return) ! { ! unsigned int i, regno; ! ! for (i = 0; ; ++i) ! { ! regno = EH_RETURN_DATA_REGNO (i); ! if (regno == INVALID_REGNUM) ! break; ! ! load_reg (regno, offset, FRAME_POINTER_REGNUM); ! offset += UNITS_PER_WORD; ! } ! } ! ! for (i = 18; i >= 4; i--) if (regs_ever_live[i] && ! call_used_regs[i]) { load_reg (i, offset, FRAME_POINTER_REGNUM); *************** hppa_expand_epilogue () *** 3464,3470 **** } else { ! for (i = 18, offset = local_fsize - actual_fsize; i >= 3; i--) { if (regs_ever_live[i] && ! call_used_regs[i]) { --- 3690,3723 ---- } else { ! offset = local_fsize - actual_fsize; ! ! /* If the current function calls __builtin_eh_return, then we need ! to restore the saved EH data registers. */ ! if (DO_FRAME_NOTES && current_function_calls_eh_return) ! { ! unsigned int i, regno; ! ! for (i = 0; ; ++i) ! { ! regno = EH_RETURN_DATA_REGNO (i); ! if (regno == INVALID_REGNUM) ! break; ! ! /* Only for the first load. ! merge_sp_adjust_with_load holds the register load ! with which we will merge the sp adjustment. */ ! if (merge_sp_adjust_with_load == 0 ! && local_fsize == 0 ! && VAL_14_BITS_P (-actual_fsize)) ! merge_sp_adjust_with_load = regno; ! else ! load_reg (regno, offset, STACK_POINTER_REGNUM); ! offset += UNITS_PER_WORD; ! } ! } ! ! for (i = 18; i >= 3; i--) { if (regs_ever_live[i] && ! call_used_regs[i]) { *************** hppa_expand_epilogue () *** 3490,3498 **** { /* Adjust the register to index off of. */ if (frame_pointer_needed) ! set_reg_plus_d (1, FRAME_POINTER_REGNUM, offset); else ! set_reg_plus_d (1, STACK_POINTER_REGNUM, offset); /* Actually do the restores now. */ for (i = FP_SAVED_REG_LAST; i >= FP_SAVED_REG_FIRST; i -= FP_REG_STEP) --- 3743,3751 ---- { /* Adjust the register to index off of. */ if (frame_pointer_needed) ! set_reg_plus_d (1, FRAME_POINTER_REGNUM, offset, 0); else ! set_reg_plus_d (1, STACK_POINTER_REGNUM, offset, 0); /* Actually do the restores now. */ for (i = FP_SAVED_REG_LAST; i >= FP_SAVED_REG_FIRST; i -= FP_REG_STEP) *************** hppa_expand_epilogue () *** 3517,3561 **** if (frame_pointer_needed) { rtx delta = GEN_INT (-64); ! rtx insn; ! set_reg_plus_d (STACK_POINTER_REGNUM, FRAME_POINTER_REGNUM, 64); ! insn = emit_insn (gen_pre_load (frame_pointer_rtx, stack_pointer_rtx, ! delta)); ! if (DO_FRAME_NOTES) ! { ! RTX_FRAME_RELATED_P (insn) = 1; ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SET (VOIDmode, stack_pointer_rtx, ! gen_rtx_PLUS (word_mode, stack_pointer_rtx, ! delta)), ! REG_NOTES (insn)); ! } } /* If we were deferring a callee register restore, do it now. */ else if (merge_sp_adjust_with_load) { rtx delta = GEN_INT (-actual_fsize); rtx dest = gen_rtx_REG (word_mode, merge_sp_adjust_with_load); ! rtx insn = emit_insn (gen_pre_load (dest, stack_pointer_rtx, delta)); ! if (DO_FRAME_NOTES) ! { ! RTX_FRAME_RELATED_P (insn) = 1; ! REG_NOTES (insn) ! = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! gen_rtx_SET (VOIDmode, stack_pointer_rtx, ! gen_rtx_PLUS (word_mode, stack_pointer_rtx, ! delta)), ! REG_NOTES (insn)); ! } } else if (actual_fsize != 0) ! set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, - actual_fsize); /* If we haven't restored %r2 yet (no frame pointer, and a stack frame greater than 8k), do so now. */ if (ret_off != 0) load_reg (2, ret_off, STACK_POINTER_REGNUM); } rtx --- 3770,3805 ---- if (frame_pointer_needed) { rtx delta = GEN_INT (-64); ! ! set_reg_plus_d (STACK_POINTER_REGNUM, FRAME_POINTER_REGNUM, 64, 0); ! emit_insn (gen_pre_load (frame_pointer_rtx, stack_pointer_rtx, delta)); } /* If we were deferring a callee register restore, do it now. */ else if (merge_sp_adjust_with_load) { rtx delta = GEN_INT (-actual_fsize); rtx dest = gen_rtx_REG (word_mode, merge_sp_adjust_with_load); ! ! emit_insn (gen_pre_load (dest, stack_pointer_rtx, delta)); } else if (actual_fsize != 0) ! set_reg_plus_d (STACK_POINTER_REGNUM, STACK_POINTER_REGNUM, ! - actual_fsize, 0); /* If we haven't restored %r2 yet (no frame pointer, and a stack frame greater than 8k), do so now. */ if (ret_off != 0) load_reg (2, ret_off, STACK_POINTER_REGNUM); + + if (DO_FRAME_NOTES && current_function_calls_eh_return) + { + rtx sa = EH_RETURN_STACKADJ_RTX; + + emit_insn (gen_blockage ()); + emit_insn (TARGET_64BIT + ? gen_subdi3 (stack_pointer_rtx, stack_pointer_rtx, sa) + : gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, sa)); + } } rtx *************** pa_adjust_cost (insn, link, dep_insn, co *** 3778,3785 **** { enum attr_type attr_type; ! /* Don't adjust costs for a pa8000 chip. */ ! if (pa_cpu >= PROCESSOR_8000) return cost; if (! recog_memoized (insn)) --- 4022,4030 ---- { enum attr_type attr_type; ! /* Don't adjust costs for a pa8000 chip, also do not adjust any ! true dependencies as they are described with bypasses now. */ ! if (pa_cpu >= PROCESSOR_8000 || REG_NOTE_KIND (link) == 0) return cost; if (! recog_memoized (insn)) *************** pa_adjust_cost (insn, link, dep_insn, co *** 3787,3846 **** attr_type = get_attr_type (insn); ! if (REG_NOTE_KIND (link) == 0) ! { ! /* Data dependency; DEP_INSN writes a register that INSN reads some ! cycles later. */ ! ! if (attr_type == TYPE_FPSTORE) ! { ! rtx pat = PATTERN (insn); ! rtx dep_pat = PATTERN (dep_insn); ! if (GET_CODE (pat) == PARALLEL) ! { ! /* This happens for the fstXs,mb patterns. */ ! pat = XVECEXP (pat, 0, 0); ! } ! if (GET_CODE (pat) != SET || GET_CODE (dep_pat) != SET) ! /* If this happens, we have to extend this to schedule ! optimally. Return 0 for now. */ ! return 0; ! ! if (rtx_equal_p (SET_DEST (dep_pat), SET_SRC (pat))) ! { ! if (! recog_memoized (dep_insn)) ! return 0; ! /* DEP_INSN is writing its result to the register ! being stored in the fpstore INSN. */ ! switch (get_attr_type (dep_insn)) ! { ! case TYPE_FPLOAD: ! /* This cost 3 cycles, not 2 as the md says for the ! 700 and 7100. */ ! return cost + 1; ! ! case TYPE_FPALU: ! case TYPE_FPMULSGL: ! case TYPE_FPMULDBL: ! case TYPE_FPDIVSGL: ! case TYPE_FPDIVDBL: ! case TYPE_FPSQRTSGL: ! case TYPE_FPSQRTDBL: ! /* In these important cases, we save one cycle compared to ! when flop instruction feed each other. */ ! return cost - 1; ! ! default: ! return cost; ! } ! } ! } ! ! /* For other data dependencies, the default cost specified in the ! md is correct. */ ! return cost; ! } ! else if (REG_NOTE_KIND (link) == REG_DEP_ANTI) { /* Anti dependency; DEP_INSN reads a register that INSN writes some cycles later. */ --- 4032,4038 ---- attr_type = get_attr_type (insn); ! if (REG_NOTE_KIND (link) == REG_DEP_ANTI) { /* Anti dependency; DEP_INSN reads a register that INSN writes some cycles later. */ *************** pa_adjust_cost (insn, link, dep_insn, co *** 3876,3882 **** preceding arithmetic operation has finished if the target of the fpload is any of the sources (or destination) of the arithmetic operation. */ ! return cost - 1; default: return 0; --- 4068,4074 ---- preceding arithmetic operation has finished if the target of the fpload is any of the sources (or destination) of the arithmetic operation. */ ! return insn_default_latency (dep_insn) - 1; default: return 0; *************** pa_adjust_cost (insn, link, dep_insn, co *** 3911,3917 **** preceding divide or sqrt operation has finished if the target of the ALU flop is any of the sources (or destination) of the divide or sqrt operation. */ ! return cost - 2; default: return 0; --- 4103,4109 ---- preceding divide or sqrt operation has finished if the target of the ALU flop is any of the sources (or destination) of the divide or sqrt operation. */ ! return insn_default_latency (dep_insn) - 2; default: return 0; *************** pa_adjust_cost (insn, link, dep_insn, co *** 3956,3963 **** /* A fpload can't be issued until one cycle before a preceding arithmetic operation has finished if the target of the fpload is the destination of the ! arithmetic operation. */ ! return cost - 1; default: return 0; --- 4148,4159 ---- /* A fpload can't be issued until one cycle before a preceding arithmetic operation has finished if the target of the fpload is the destination of the ! arithmetic operation. ! ! Exception: For PA7100LC, PA7200 and PA7300, the cost ! is 3 cycles, unless they bundle together. We also ! pay the penalty if the second insn is a fpload. */ ! return insn_default_latency (dep_insn) - 1; default: return 0; *************** pa_adjust_cost (insn, link, dep_insn, co *** 3992,3998 **** preceding divide or sqrt operation has finished if the target of the ALU flop is also the target of the divide or sqrt operation. */ ! return cost - 2; default: return 0; --- 4188,4194 ---- preceding divide or sqrt operation has finished if the target of the ALU flop is also the target of the divide or sqrt operation. */ ! return insn_default_latency (dep_insn) - 2; default: return 0; *************** pa_issue_rate () *** 4052,4057 **** --- 4248,4254 ---- case PROCESSOR_7100: return 2; case PROCESSOR_7100LC: return 2; case PROCESSOR_7200: return 2; + case PROCESSOR_7300: return 2; case PROCESSOR_8000: return 4; default: *************** output_global_address (file, x, round_co *** 4591,4626 **** output_addr_const (file, x); } void output_deferred_plabels (file) FILE *file; { ! int i; /* If we have deferred plabels, then we need to switch into the data section and align it to a 4 byte boundary before we output the deferred plabels. */ if (n_deferred_plabels) { data_section (); ! ASM_OUTPUT_ALIGN (file, 2); } /* Now output the deferred plabels. */ for (i = 0; i < n_deferred_plabels; i++) { ! ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (deferred_plabels[i].internal_label)); assemble_integer (gen_rtx_SYMBOL_REF (Pmode, deferred_plabels[i].name), ! 4, 32, 1); } } /* HP's millicode routines mean something special to the assembler. Keep track of which ones we have used. */ ! enum millicodes { remI, remU, divI, divU, mulI, mulU, end1000 }; static void import_milli PARAMS ((enum millicodes)); static char imported[(int) end1000]; ! static const char * const milli_names[] = {"remI", "remU", "divI", "divU", "mulI", "mulU"}; static const char import_string[] = ".IMPORT $$....,MILLICODE"; #define MILLI_START 10 --- 4788,4866 ---- output_addr_const (file, x); } + static struct deferred_plabel * + get_plabel (fname) + const char *fname; + { + size_t i; + + /* See if we have already put this function on the list of deferred + plabels. This list is generally small, so a liner search is not + too ugly. If it proves too slow replace it with something faster. */ + for (i = 0; i < n_deferred_plabels; i++) + if (strcmp (fname, deferred_plabels[i].name) == 0) + break; + + /* If the deferred plabel list is empty, or this entry was not found + on the list, create a new entry on the list. */ + if (deferred_plabels == NULL || i == n_deferred_plabels) + { + const char *real_name; + + if (deferred_plabels == 0) + deferred_plabels = (struct deferred_plabel *) + ggc_alloc (sizeof (struct deferred_plabel)); + else + deferred_plabels = (struct deferred_plabel *) + ggc_realloc (deferred_plabels, + ((n_deferred_plabels + 1) + * sizeof (struct deferred_plabel))); + + i = n_deferred_plabels++; + deferred_plabels[i].internal_label = gen_label_rtx (); + deferred_plabels[i].name = ggc_strdup (fname); + + /* Gross. We have just implicitly taken the address of this function, + mark it as such. */ + real_name = (*targetm.strip_name_encoding) (fname); + TREE_SYMBOL_REFERENCED (get_identifier (real_name)) = 1; + } + + return &deferred_plabels[i]; + } + void output_deferred_plabels (file) FILE *file; { ! size_t i; /* If we have deferred plabels, then we need to switch into the data section and align it to a 4 byte boundary before we output the deferred plabels. */ if (n_deferred_plabels) { data_section (); ! ASM_OUTPUT_ALIGN (file, TARGET_64BIT ? 3 : 2); } /* Now output the deferred plabels. */ for (i = 0; i < n_deferred_plabels; i++) { ! rtx label = deferred_plabels[i].internal_label; ! ! ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (label)); assemble_integer (gen_rtx_SYMBOL_REF (Pmode, deferred_plabels[i].name), ! TARGET_64BIT ? 8 : 4, TARGET_64BIT ? 64 : 32, 1); } } /* HP's millicode routines mean something special to the assembler. Keep track of which ones we have used. */ ! enum millicodes { remI, remU, divI, divU, mulI, end1000 }; static void import_milli PARAMS ((enum millicodes)); static char imported[(int) end1000]; ! static const char * const milli_names[] = {"remI", "remU", "divI", "divU", "mulI"}; static const char import_string[] = ".IMPORT $$....,MILLICODE"; #define MILLI_START 10 *************** function_arg_padding (mode, type) *** 4963,4984 **** enum machine_mode mode; tree type; { ! int size; ! ! if (mode == BLKmode) { ! if (type && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST) ! size = int_size_in_bytes (type) * BITS_PER_UNIT; else ! return upward; /* Don't know if this is right, but */ ! /* same as old definition. */ } ! else ! size = GET_MODE_BITSIZE (mode); ! if (size < PARM_BOUNDARY) return downward; - else if (size % PARM_BOUNDARY) - return upward; else return none; } --- 5203,5235 ---- enum machine_mode mode; tree type; { ! if (mode == BLKmode ! || (TARGET_64BIT && type && AGGREGATE_TYPE_P (type))) { ! /* Return none if justification is not required. */ ! if (type ! && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST ! && (int_size_in_bytes (type) * BITS_PER_UNIT) % PARM_BOUNDARY == 0) ! return none; ! ! /* The directions set here are ignored when a BLKmode argument larger ! than a word is placed in a register. Different code is used for ! the stack and registers. This makes it difficult to have a ! consistent data representation for both the stack and registers. ! For both runtimes, the justification and padding for arguments on ! the stack and in registers should be identical. */ ! if (TARGET_64BIT) ! /* The 64-bit runtime specifies left justification for aggregates. */ ! return upward; else ! /* The 32-bit runtime architecture specifies right justification. ! When the argument is passed on the stack, the argument is padded ! with garbage on the left. The HP compiler pads with zeros. */ ! return downward; } ! ! if (GET_MODE_BITSIZE (mode) < PARM_BOUNDARY) return downward; else return none; } *************** hppa_builtin_saveregs () *** 5058,5085 **** } void ! hppa_va_start (stdarg_p, valist, nextarg) ! int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg; { nextarg = expand_builtin_saveregs (); ! std_expand_builtin_va_start (1, valist, nextarg); } rtx hppa_va_arg (valist, type) tree valist, type; { ! HOST_WIDE_INT align, size, ofs; tree t, ptr, pptr; if (TARGET_64BIT) { ! /* Every argument in PA64 is passed by value (including large structs). ! Arguments with size greater than 8 must be aligned 0 MOD 16. */ - size = int_size_in_bytes (type); if (size > UNITS_PER_WORD) { t = build (PLUS_EXPR, TREE_TYPE (valist), valist, --- 5309,5343 ---- } void ! hppa_va_start (valist, nextarg) tree valist; rtx nextarg; { nextarg = expand_builtin_saveregs (); ! std_expand_builtin_va_start (valist, nextarg); } rtx hppa_va_arg (valist, type) tree valist, type; { ! HOST_WIDE_INT size = int_size_in_bytes (type); ! HOST_WIDE_INT ofs; tree t, ptr, pptr; if (TARGET_64BIT) { ! /* Every argument in PA64 is supposed to be passed by value ! (including large structs). However, as a GCC extension, we ! pass zero and variable sized arguments by reference. Empty ! structures are a GCC extension not supported by the HP ! compilers. Thus, passing them by reference isn't likely ! to conflict with the ABI. For variable sized arguments, ! GCC doesn't have the infrastructure to allocate these to ! registers. */ ! ! /* Arguments with a size greater than 8 must be aligned 0 MOD 16. */ if (size > UNITS_PER_WORD) { t = build (PLUS_EXPR, TREE_TYPE (valist), valist, *************** hppa_va_arg (valist, type) *** 5088,5144 **** build_int_2 (-2 * UNITS_PER_WORD, -1)); t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, t); TREE_SIDE_EFFECTS (t) = 1; ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } - return std_expand_builtin_va_arg (valist, type); - } - - /* Compute the rounded size of the type. */ - align = PARM_BOUNDARY / BITS_PER_UNIT; - size = int_size_in_bytes (type); ! ptr = build_pointer_type (type); ! /* "Large" types are passed by reference. */ ! if (size > 8) ! { ! t = build (PREDECREMENT_EXPR, TREE_TYPE (valist), valist, ! build_int_2 (POINTER_SIZE / BITS_PER_UNIT, 0)); ! TREE_SIDE_EFFECTS (t) = 1; ! pptr = build_pointer_type (ptr); ! t = build1 (NOP_EXPR, pptr, t); ! TREE_SIDE_EFFECTS (t) = 1; ! t = build1 (INDIRECT_REF, ptr, t); ! TREE_SIDE_EFFECTS (t) = 1; } ! else { ! t = build (PLUS_EXPR, TREE_TYPE (valist), valist, ! build_int_2 (-size, -1)); ! /* Copied from va-pa.h, but we probably don't need to align ! to word size, since we generate and preserve that invariant. */ ! t = build (BIT_AND_EXPR, TREE_TYPE (valist), t, ! build_int_2 ((size > 4 ? -8 : -4), -1)); ! t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, t); ! TREE_SIDE_EFFECTS (t) = 1; ! ofs = (8 - size) % 4; ! if (ofs) ! { ! t = build (PLUS_EXPR, TREE_TYPE (valist), t, build_int_2 (ofs, 0)); TREE_SIDE_EFFECTS (t) = 1; } ! t = build1 (NOP_EXPR, ptr, t); ! TREE_SIDE_EFFECTS (t) = 1; } /* Calculate! */ ! return expand_expr (t, NULL_RTX, Pmode, EXPAND_NORMAL); } --- 5346,5420 ---- build_int_2 (-2 * UNITS_PER_WORD, -1)); t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, t); TREE_SIDE_EFFECTS (t) = 1; ! expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } ! if (size > 0) ! return std_expand_builtin_va_arg (valist, type); ! else ! { ! ptr = build_pointer_type (type); ! /* Args grow upward. */ ! t = build (POSTINCREMENT_EXPR, TREE_TYPE (valist), valist, ! build_int_2 (POINTER_SIZE / BITS_PER_UNIT, 0)); ! TREE_SIDE_EFFECTS (t) = 1; ! pptr = build_pointer_type (ptr); ! t = build1 (NOP_EXPR, pptr, t); ! TREE_SIDE_EFFECTS (t) = 1; ! t = build1 (INDIRECT_REF, ptr, t); ! TREE_SIDE_EFFECTS (t) = 1; ! } } ! else /* !TARGET_64BIT */ { ! ptr = build_pointer_type (type); ! /* "Large" and variable sized types are passed by reference. */ ! if (size > 8 || size <= 0) ! { ! /* Args grow downward. */ ! t = build (PREDECREMENT_EXPR, TREE_TYPE (valist), valist, ! build_int_2 (POINTER_SIZE / BITS_PER_UNIT, 0)); ! TREE_SIDE_EFFECTS (t) = 1; ! pptr = build_pointer_type (ptr); ! t = build1 (NOP_EXPR, pptr, t); ! TREE_SIDE_EFFECTS (t) = 1; ! t = build1 (INDIRECT_REF, ptr, t); TREE_SIDE_EFFECTS (t) = 1; } + else + { + t = build (PLUS_EXPR, TREE_TYPE (valist), valist, + build_int_2 (-size, -1)); ! /* Copied from va-pa.h, but we probably don't need to align to ! word size, since we generate and preserve that invariant. */ ! t = build (BIT_AND_EXPR, TREE_TYPE (valist), t, ! build_int_2 ((size > 4 ? -8 : -4), -1)); ! ! t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, t); ! TREE_SIDE_EFFECTS (t) = 1; ! ! ofs = (8 - size) % 4; ! if (ofs) ! { ! t = build (PLUS_EXPR, TREE_TYPE (valist), t, ! build_int_2 (ofs, 0)); ! TREE_SIDE_EFFECTS (t) = 1; ! } ! ! t = build1 (NOP_EXPR, ptr, t); ! TREE_SIDE_EFFECTS (t) = 1; ! } } /* Calculate! */ ! return expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL); } *************** hppa_va_arg (valist, type) *** 5152,5175 **** const char * output_cbranch (operands, nullify, length, negated, insn) ! rtx *operands; ! int nullify, length, negated; ! rtx insn; { static char buf[100]; int useskip = 0; /* A conditional branch to the following instruction (eg the delay slot) is asking for a disaster. This can happen when not optimizing and when jump optimization fails. ! While it is usually safe to emit nothing, this can fail if the preceding ! instruction is a nullified branch with an empty delay slot and the ! same branch target as this branch. We could check for this but ! jump optimization should eliminate these jumps. It is always ! safe to emit a nop. */ ! ! if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn)) return "nop"; /* If this is a long branch with its delay slot unfilled, set `nullify' --- 5428,5451 ---- const char * output_cbranch (operands, nullify, length, negated, insn) ! rtx *operands; ! int nullify, length, negated; ! rtx insn; { static char buf[100]; int useskip = 0; + rtx xoperands[5]; /* A conditional branch to the following instruction (eg the delay slot) is asking for a disaster. This can happen when not optimizing and when jump optimization fails. ! While it is usually safe to emit nothing, this can fail if the ! preceding instruction is a nullified branch with an empty delay ! slot and the same branch target as this branch. We could check ! for this but jump optimization should eliminate nop jumps. It ! is always safe to emit a nop. */ ! if (next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn)) return "nop"; /* If this is a long branch with its delay slot unfilled, set `nullify' *************** output_cbranch (operands, nullify, lengt *** 5268,5356 **** break; case 20: ! /* Very long branch. Right now we only handle these when not ! optimizing. See "jump" pattern in pa.md for details. */ ! if (optimize) ! abort (); /* Create a reversed conditional branch which branches around the following insns. */ ! if (negated) ! strcpy (buf, "{com%I2b,%S3,n %2,%r1,.+20|cmp%I2b,%S3,n %2,%r1,.+20}"); else - strcpy (buf, "{com%I2b,%B3,n %2,%r1,.+20|cmp%I2b,%B3,n %2,%r1,.+20}"); - if (GET_MODE (operands[1]) == DImode) { ! if (negated) ! strcpy (buf, ! "{com%I2b,*%S3,n %2,%r1,.+20|cmp%I2b,*%S3,n %2,%r1,.+20}"); else ! strcpy (buf, ! "{com%I2b,*%B3,n %2,%r1,.+20|cmp%I2b,*%B3,n %2,%r1,.+20}"); } - output_asm_insn (buf, operands); ! /* Output an insn to save %r1. */ ! output_asm_insn ("stw %%r1,-16(%%r30)", operands); ! /* Now output a very long branch to the original target. */ ! output_asm_insn ("ldil L'%l0,%%r1\n\tbe R'%l0(%%sr4,%%r1)", operands); ! /* Now restore the value of %r1 in the delay slot. We're not ! optimizing so we know nothing else can be in the delay slot. */ ! return "ldw -16(%%r30),%%r1"; ! case 28: ! /* Very long branch when generating PIC code. Right now we only ! handle these when not optimizing. See "jump" pattern in pa.md ! for details. */ ! if (optimize) ! abort (); ! /* Create a reversed conditional branch which branches around ! the following insns. */ ! if (negated) ! strcpy (buf, "{com%I2b,%S3,n %2,%r1,.+28|cmp%I2b,%S3,n %2,%r1,.+28}"); ! else ! strcpy (buf, "{com%I2b,%B3,n %2,%r1,.+28|cmp%I2b,%B3,n %2,%r1,.+28}"); ! if (GET_MODE (operands[1]) == DImode) ! { ! if (negated) ! strcpy (buf, "{com%I2b,*%S3,n %2,%r1,.+28|cmp%I2b,*%S3,n %2,%r1,.+28}"); ! else ! strcpy (buf, "{com%I2b,*%B3,n %2,%r1,.+28|cmp%I2b,*%B3,n %2,%r1,.+28}"); ! } ! output_asm_insn (buf, operands); ! /* Output an insn to save %r1. */ ! output_asm_insn ("stw %%r1,-16(%%r30)", operands); ! /* Now output a very long PIC branch to the original target. */ ! { ! rtx xoperands[5]; ! xoperands[0] = operands[0]; ! xoperands[1] = operands[1]; ! xoperands[2] = operands[2]; ! xoperands[3] = operands[3]; ! xoperands[4] = gen_label_rtx (); ! output_asm_insn ("{bl|b,l} .+8,%%r1\n\taddil L'%l0-%l4,%%r1", ! xoperands); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (xoperands[4])); ! output_asm_insn ("ldo R'%l0-%l4(%%r1),%%r1\n\tbv %%r0(%%r1)", ! xoperands); } ! /* Now restore the value of %r1 in the delay slot. We're not ! optimizing so we know nothing else can be in the delay slot. */ ! return "ldw -16(%%r30),%%r1"; ! ! default: ! abort (); } - return buf; } /* This routine handles all the branch-on-bit conditional branch sequences we --- 5544,5725 ---- break; case 20: ! case 28: ! xoperands[0] = operands[0]; ! xoperands[1] = operands[1]; ! xoperands[2] = operands[2]; ! xoperands[3] = operands[3]; ! ! /* The reversed conditional branch must branch over one additional ! instruction if the delay slot is filled. If the delay slot ! is empty, the instruction after the reversed condition branch ! must be nullified. */ ! nullify = dbr_sequence_length () == 0; ! xoperands[4] = nullify ? GEN_INT (length) : GEN_INT (length + 4); /* Create a reversed conditional branch which branches around the following insns. */ ! if (GET_MODE (operands[1]) != DImode) ! { ! if (nullify) ! { ! if (negated) ! strcpy (buf, ! "{com%I2b,%S3,n %2,%r1,.+%4|cmp%I2b,%S3,n %2,%r1,.+%4}"); ! else ! strcpy (buf, ! "{com%I2b,%B3,n %2,%r1,.+%4|cmp%I2b,%B3,n %2,%r1,.+%4}"); ! } ! else ! { ! if (negated) ! strcpy (buf, ! "{com%I2b,%S3 %2,%r1,.+%4|cmp%I2b,%S3 %2,%r1,.+%4}"); ! else ! strcpy (buf, ! "{com%I2b,%B3 %2,%r1,.+%4|cmp%I2b,%B3 %2,%r1,.+%4}"); ! } ! } else { ! if (nullify) ! { ! if (negated) ! strcpy (buf, ! "{com%I2b,*%S3,n %2,%r1,.+%4|cmp%I2b,*%S3,n %2,%r1,.+%4}"); ! else ! strcpy (buf, ! "{com%I2b,*%B3,n %2,%r1,.+%4|cmp%I2b,*%B3,n %2,%r1,.+%4}"); ! } else ! { ! if (negated) ! strcpy (buf, ! "{com%I2b,*%S3 %2,%r1,.+%4|cmp%I2b,*%S3 %2,%r1,.+%4}"); ! else ! strcpy (buf, ! "{com%I2b,*%B3 %2,%r1,.+%4|cmp%I2b,*%B3 %2,%r1,.+%4}"); ! } } ! output_asm_insn (buf, xoperands); ! return output_lbranch (operands[0], insn); ! default: ! abort (); ! } ! return buf; ! } ! /* This routine handles long unconditional branches that exceed the ! maximum range of a simple branch instruction. */ ! const char * ! output_lbranch (dest, insn) ! rtx dest, insn; ! { ! rtx xoperands[2]; ! ! xoperands[0] = dest; ! /* First, free up the delay slot. */ ! if (dbr_sequence_length () != 0) ! { ! /* We can't handle a jump in the delay slot. */ ! if (GET_CODE (NEXT_INSN (insn)) == JUMP_INSN) ! abort (); ! final_scan_insn (NEXT_INSN (insn), asm_out_file, ! optimize, 0, 0); ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! } ! /* Output an insn to save %r1. The runtime documentation doesn't ! specify whether the "Clean Up" slot in the callers frame can ! be clobbered by the callee. It isn't copied by HP's builtin ! alloca, so this suggests that it can be clobbered if necessary. ! The "Static Link" location is copied by HP builtin alloca, so ! we avoid using it. Using the cleanup slot might be a problem ! if we have to interoperate with languages that pass cleanup ! information. However, it should be possible to handle these ! situations with GCC's asm feature. ! The "Current RP" slot is reserved for the called procedure, so ! we try to use it when we don't have a frame of our own. It's ! rather unlikely that we won't have a frame when we need to emit ! a very long branch. ! ! Really the way to go long term is a register scavenger; goto ! the target of the jump and find a register which we can use ! as a scratch to hold the value in %r1. Then, we wouldn't have ! to free up the delay slot or clobber a slot that may be needed ! for other purposes. */ ! if (TARGET_64BIT) ! { ! if (actual_fsize == 0 && !regs_ever_live[2]) ! /* Use the return pointer slot in the frame marker. */ ! output_asm_insn ("std %%r1,-16(%%r30)", xoperands); ! else ! /* Use the slot at -40 in the frame marker since HP builtin ! alloca doesn't copy it. */ ! output_asm_insn ("std %%r1,-40(%%r30)", xoperands); ! } ! else ! { ! if (actual_fsize == 0 && !regs_ever_live[2]) ! /* Use the return pointer slot in the frame marker. */ ! output_asm_insn ("stw %%r1,-20(%%r30)", xoperands); ! else ! /* Use the "Clean Up" slot in the frame marker. In GCC, ! the only other use of this location is for copying a ! floating point double argument from a floating-point ! register to two general registers. The copy is done ! as an "atomic" operation when outputing a call, so it ! won't interfere with our using the location here. */ ! output_asm_insn ("stw %%r1,-12(%%r30)", xoperands); ! } ! ! if (flag_pic) ! { ! output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); ! if (TARGET_SOM || !TARGET_GAS) ! { ! xoperands[1] = gen_label_rtx (); ! output_asm_insn ("addil L'%l0-%l1,%%r1", xoperands); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn ("ldo R'%l0-%l1(%%r1),%%r1", xoperands); } + else + { + output_asm_insn ("addil L'%l0-$PIC_pcrel$0+4,%%r1", xoperands); + output_asm_insn ("ldo R'%l0-$PIC_pcrel$0+8(%%r1),%%r1", xoperands); + } + output_asm_insn ("bv %%r0(%%r1)", xoperands); + } + else + /* Now output a very long branch to the original target. */ + output_asm_insn ("ldil L'%l0,%%r1\n\tbe R'%l0(%%sr4,%%r1)", xoperands); ! /* Now restore the value of %r1 in the delay slot. */ ! if (TARGET_64BIT) ! { ! if (actual_fsize == 0 && !regs_ever_live[2]) ! return "ldd -16(%%r30),%%r1"; ! else ! return "ldd -40(%%r30),%%r1"; ! } ! else ! { ! if (actual_fsize == 0 && !regs_ever_live[2]) ! return "ldw -20(%%r30),%%r1"; ! else ! return "ldw -12(%%r30),%%r1"; } } /* This routine handles all the branch-on-bit conditional branch sequences we *************** output_cbranch (operands, nullify, lengt *** 5360,5369 **** const char * output_bb (operands, nullify, length, negated, insn, which) ! rtx *operands ATTRIBUTE_UNUSED; ! int nullify, length, negated; ! rtx insn; ! int which; { static char buf[100]; int useskip = 0; --- 5729,5738 ---- const char * output_bb (operands, nullify, length, negated, insn, which) ! rtx *operands ATTRIBUTE_UNUSED; ! int nullify, length, negated; ! rtx insn; ! int which; { static char buf[100]; int useskip = 0; *************** output_bb (operands, nullify, length, ne *** 5373,5379 **** is only used when optimizing; jump optimization should eliminate the jump. But be prepared just in case. */ ! if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn)) return "nop"; /* If this is a long branch with its delay slot unfilled, set `nullify' --- 5742,5748 ---- is only used when optimizing; jump optimization should eliminate the jump. But be prepared just in case. */ ! if (next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn)) return "nop"; /* If this is a long branch with its delay slot unfilled, set `nullify' *************** output_bb (operands, nullify, length, ne *** 5508,5517 **** const char * output_bvb (operands, nullify, length, negated, insn, which) ! rtx *operands ATTRIBUTE_UNUSED; ! int nullify, length, negated; ! rtx insn; ! int which; { static char buf[100]; int useskip = 0; --- 5877,5886 ---- const char * output_bvb (operands, nullify, length, negated, insn, which) ! rtx *operands ATTRIBUTE_UNUSED; ! int nullify, length, negated; ! rtx insn; ! int which; { static char buf[100]; int useskip = 0; *************** output_bvb (operands, nullify, length, n *** 5521,5527 **** is only used when optimizing; jump optimization should eliminate the jump. But be prepared just in case. */ ! if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn)) return "nop"; /* If this is a long branch with its delay slot unfilled, set `nullify' --- 5890,5896 ---- is only used when optimizing; jump optimization should eliminate the jump. But be prepared just in case. */ ! if (next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn)) return "nop"; /* If this is a long branch with its delay slot unfilled, set `nullify' *************** output_dbra (operands, insn, which_alter *** 5662,5668 **** /* A conditional branch to the following instruction (eg the delay slot) is asking for a disaster. Be prepared! */ ! if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn)) { if (which_alternative == 0) return "ldo %1(%0),%0"; --- 6031,6037 ---- /* A conditional branch to the following instruction (eg the delay slot) is asking for a disaster. Be prepared! */ ! if (next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn)) { if (which_alternative == 0) return "ldo %1(%0),%0"; *************** output_movb (operands, insn, which_alter *** 5769,5775 **** /* A conditional branch to the following instruction (eg the delay slot) is asking for a disaster. Be prepared! */ ! if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn)) { if (which_alternative == 0) return "copy %1,%0"; --- 6138,6144 ---- /* A conditional branch to the following instruction (eg the delay slot) is asking for a disaster. Be prepared! */ ! if (next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn)) { if (which_alternative == 0) return "copy %1,%0"; *************** output_movb (operands, insn, which_alter *** 5867,5942 **** } } ! /* INSN is a millicode call. It may have an unconditional jump in its delay ! slot. CALL_DEST is the routine we are calling. */ const char * output_millicode_call (insn, call_dest) ! rtx insn; ! rtx call_dest; { int distance; - rtx xoperands[4]; rtx seq_insn; ! xoperands[3] = gen_rtx_REG (Pmode, TARGET_64BIT ? 2 : 31); ! /* Handle common case -- empty delay slot or no jump in the delay slot, ! and we're sure that the branch will reach the beginning of the $CODE$ ! subspace. The within reach form of the $$sh_func_adrs call has ! a length of 28 and attribute type of multi. This length is the ! same as the maximum length of an out of reach PIC call to $$div. */ ! if ((dbr_sequence_length () == 0 ! && (get_attr_length (insn) == 8 ! || (get_attr_length (insn) == 28 ! && get_attr_type (insn) == TYPE_MULTI))) ! || (dbr_sequence_length () != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN ! && get_attr_length (insn) == 4)) { ! xoperands[0] = call_dest; ! output_asm_insn ("{bl|b,l} %0,%3%#", xoperands); ! return ""; } ! ! /* This call may not reach the beginning of the $CODE$ subspace. */ ! if (get_attr_length (insn) > 8) { ! int delay_insn_deleted = 0; ! ! /* We need to emit an inline long-call branch. */ ! if (dbr_sequence_length () != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN) { ! /* A non-jump insn in the delay slot. By definition we can ! emit this insn before the call. */ ! final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, 0); ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! delay_insn_deleted = 1; } ! /* PIC long millicode call sequence. */ ! if (flag_pic) { - xoperands[0] = call_dest; - xoperands[1] = gen_label_rtx (); - /* Get our address + 8 into %r1. */ output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); - /* Add %r1 to the offset of our target from the next insn. */ if (TARGET_SOM || !TARGET_GAS) { ! output_asm_insn ("addil L%%%0-%1,%%r1", xoperands); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn ("ldo R%%%0-%1(%%r1),%%r1", xoperands); } else { --- 6236,6459 ---- } } + /* Copy any FP arguments in INSN into integer registers. */ + static void + copy_fp_args (insn) + rtx insn; + { + rtx link; + rtx xoperands[2]; ! for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1)) ! { ! int arg_mode, regno; ! rtx use = XEXP (link, 0); ! ! if (! (GET_CODE (use) == USE ! && GET_CODE (XEXP (use, 0)) == REG ! && FUNCTION_ARG_REGNO_P (REGNO (XEXP (use, 0))))) ! continue; ! ! arg_mode = GET_MODE (XEXP (use, 0)); ! regno = REGNO (XEXP (use, 0)); ! ! /* Is it a floating point register? */ ! if (regno >= 32 && regno <= 39) ! { ! /* Copy the FP register into an integer register via memory. */ ! if (arg_mode == SFmode) ! { ! xoperands[0] = XEXP (use, 0); ! xoperands[1] = gen_rtx_REG (SImode, 26 - (regno - 32) / 2); ! output_asm_insn ("{fstws|fstw} %0,-16(%%sr0,%%r30)", xoperands); ! output_asm_insn ("ldw -16(%%sr0,%%r30),%1", xoperands); ! } ! else ! { ! xoperands[0] = XEXP (use, 0); ! xoperands[1] = gen_rtx_REG (DImode, 25 - (regno - 34) / 2); ! output_asm_insn ("{fstds|fstd} %0,-16(%%sr0,%%r30)", xoperands); ! output_asm_insn ("ldw -12(%%sr0,%%r30),%R1", xoperands); ! output_asm_insn ("ldw -16(%%sr0,%%r30),%1", xoperands); ! } ! } ! } ! } ! ! /* Compute length of the FP argument copy sequence for INSN. */ ! static int ! length_fp_args (insn) ! rtx insn; ! { ! int length = 0; ! rtx link; ! ! for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1)) ! { ! int arg_mode, regno; ! rtx use = XEXP (link, 0); ! ! if (! (GET_CODE (use) == USE ! && GET_CODE (XEXP (use, 0)) == REG ! && FUNCTION_ARG_REGNO_P (REGNO (XEXP (use, 0))))) ! continue; ! ! arg_mode = GET_MODE (XEXP (use, 0)); ! regno = REGNO (XEXP (use, 0)); ! ! /* Is it a floating point register? */ ! if (regno >= 32 && regno <= 39) ! { ! if (arg_mode == SFmode) ! length += 8; ! else ! length += 12; ! } ! } ! ! return length; ! } ! ! /* Return the attribute length for the millicode call instruction INSN. ! The length must match the code generated by output_millicode_call. ! We include the delay slot in the returned length as it is better to ! over estimate the length than to under estimate it. */ ! ! int ! attr_length_millicode_call (insn) ! rtx insn; ! { ! unsigned long distance = -1; ! ! if (INSN_ADDRESSES_SET_P ()) ! { ! distance = (total_code_bytes + insn_current_reference_address (insn)); ! if (distance < total_code_bytes) ! distance = -1; ! } ! ! if (TARGET_64BIT) ! { ! if (!TARGET_LONG_CALLS && distance < 7600000) ! return 8; ! ! return 20; ! } ! else if (TARGET_PORTABLE_RUNTIME) ! return 24; ! else ! { ! if (!TARGET_LONG_CALLS && distance < 240000) ! return 8; ! ! if (TARGET_LONG_ABS_CALL && !flag_pic) ! return 12; ! ! return 24; ! } ! } ! ! /* INSN is a function call. It may have an unconditional jump ! in its delay slot. CALL_DEST is the routine we are calling. */ const char * output_millicode_call (insn, call_dest) ! rtx insn; ! rtx call_dest; { + int attr_length = get_attr_length (insn); + int seq_length = dbr_sequence_length (); int distance; rtx seq_insn; + rtx xoperands[3]; ! xoperands[0] = call_dest; ! xoperands[2] = gen_rtx_REG (Pmode, TARGET_64BIT ? 2 : 31); ! /* Handle the common case where we are sure that the branch will ! reach the beginning of the $CODE$ subspace. The within reach ! form of the $$sh_func_adrs call has a length of 28. Because ! it has an attribute type of multi, it never has a non-zero ! sequence length. The length of the $$sh_func_adrs is the same ! as certain out of reach PIC calls to other routines. */ ! if (!TARGET_LONG_CALLS ! && ((seq_length == 0 ! && (attr_length == 12 ! || (attr_length == 28 && get_attr_type (insn) == TYPE_MULTI))) ! || (seq_length != 0 && attr_length == 8))) { ! output_asm_insn ("{bl|b,l} %0,%2", xoperands); } ! else { ! if (TARGET_64BIT) { ! /* It might seem that one insn could be saved by accessing ! the millicode function using the linkage table. However, ! this doesn't work in shared libraries and other dynamically ! loaded objects. Using a pc-relative sequence also avoids ! problems related to the implicit use of the gp register. */ ! output_asm_insn ("b,l .+8,%%r1", xoperands); ! if (TARGET_GAS) ! { ! output_asm_insn ("addil L'%0-$PIC_pcrel$0+4,%%r1", xoperands); ! output_asm_insn ("ldo R'%0-$PIC_pcrel$0+8(%%r1),%%r1", xoperands); ! } ! else ! { ! xoperands[1] = gen_label_rtx (); ! output_asm_insn ("addil L'%0-%l1,%%r1", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn ("ldo R'%0-%l1(%%r1),%%r1", xoperands); ! } ! ! output_asm_insn ("bve,l (%%r1),%%r2", xoperands); } + else if (TARGET_PORTABLE_RUNTIME) + { + /* Pure portable runtime doesn't allow be/ble; we also don't + have PIC support in the assembler/linker, so this sequence + is needed. */ ! /* Get the address of our target into %r1. */ ! output_asm_insn ("ldil L'%0,%%r1", xoperands); ! output_asm_insn ("ldo R'%0(%%r1),%%r1", xoperands); ! ! /* Get our return address into %r31. */ ! output_asm_insn ("{bl|b,l} .+8,%%r31", xoperands); ! output_asm_insn ("addi 8,%%r31,%%r31", xoperands); ! ! /* Jump to our target address in %r1. */ ! output_asm_insn ("bv %%r0(%%r1)", xoperands); ! } ! else if (!flag_pic) ! { ! output_asm_insn ("ldil L'%0,%%r1", xoperands); ! if (TARGET_PA_20) ! output_asm_insn ("be,l R'%0(%%sr4,%%r1),%%sr0,%%r31", xoperands); ! else ! output_asm_insn ("ble R'%0(%%sr4,%%r1)", xoperands); ! } ! else { output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); + output_asm_insn ("addi 16,%%r1,%%r31", xoperands); if (TARGET_SOM || !TARGET_GAS) { ! /* The HP assembler can generate relocations for the ! difference of two symbols. GAS can do this for a ! millicode symbol but not an arbitrary external ! symbol when generating SOM output. */ ! xoperands[1] = gen_label_rtx (); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn ("addil L'%0-%l1,%%r1", xoperands); ! output_asm_insn ("ldo R'%0-%l1(%%r1),%%r1", xoperands); } else { *************** output_millicode_call (insn, call_dest) *** 5945,6314 **** xoperands); } ! /* Get the return address into %r31. */ ! output_asm_insn ("blr 0,%3", xoperands); ! /* Branch to our target which is in %r1. */ ! output_asm_insn ("bv,n %%r0(%%r1)", xoperands); ! /* Empty delay slot. Note this insn gets fetched twice and ! executed once. To be safe we use a nop. */ ! output_asm_insn ("nop", xoperands); ! } ! /* Pure portable runtime doesn't allow be/ble; we also don't have ! PIC support in the assembler/linker, so this sequence is needed. */ ! else if (TARGET_PORTABLE_RUNTIME) ! { ! xoperands[0] = call_dest; ! /* Get the address of our target into %r29. */ ! output_asm_insn ("ldil L%%%0,%%r29", xoperands); ! output_asm_insn ("ldo R%%%0(%%r29),%%r29", xoperands); ! /* Get our return address into %r31. */ ! output_asm_insn ("blr %%r0,%3", xoperands); ! /* Jump to our target address in %r29. */ ! output_asm_insn ("bv,n %%r0(%%r29)", xoperands); ! /* Empty delay slot. Note this insn gets fetched twice and ! executed once. To be safe we use a nop. */ ! output_asm_insn ("nop", xoperands); ! } ! /* If we're allowed to use be/ble instructions, then this is the ! best sequence to use for a long millicode call. */ ! else { ! xoperands[0] = call_dest; ! output_asm_insn ("ldil L%%%0,%3", xoperands); ! if (TARGET_PA_20) ! output_asm_insn ("be,l R%%%0(%%sr4,%3),%%sr0,%%r31", xoperands); ! else ! output_asm_insn ("ble R%%%0(%%sr4,%3)", xoperands); ! output_asm_insn ("nop", xoperands); } ! /* If we had a jump in the call's delay slot, output it now. */ ! if (dbr_sequence_length () != 0 ! && !delay_insn_deleted) { ! xoperands[0] = XEXP (PATTERN (NEXT_INSN (insn)), 1); ! output_asm_insn ("b,n %0", xoperands); ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; } ! return ""; ! } ! /* This call has an unconditional jump in its delay slot and the ! call is known to reach its target or the beginning of the current ! subspace. */ ! /* Use the containing sequence insn's address. */ ! seq_insn = NEXT_INSN (PREV_INSN (XVECEXP (final_sequence, 0, 0))); ! distance = INSN_ADDRESSES (INSN_UID (JUMP_LABEL (NEXT_INSN (insn)))) ! - INSN_ADDRESSES (INSN_UID (seq_insn)) - 8; ! /* If the branch was too far away, emit a normal call followed ! by a nop, followed by the unconditional branch. ! If the branch is close, then adjust %r2 from within the ! call's delay slot. */ ! xoperands[0] = call_dest; ! xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1); ! if (! VAL_14_BITS_P (distance)) ! output_asm_insn ("{bl|b,l} %0,%3\n\tnop\n\tb,n %1", xoperands); ! else ! { ! xoperands[2] = gen_label_rtx (); ! output_asm_insn ("\n\t{bl|b,l} %0,%3\n\tldo %1-%2(%3),%3", ! xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (xoperands[2])); } - - /* Delete the jump. */ - PUT_CODE (NEXT_INSN (insn), NOTE); - NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; - NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; - return ""; } ! extern struct obstack permanent_obstack; ! ! /* INSN is either a function call. It may have an unconditional jump in its delay slot. CALL_DEST is the routine we are calling. */ const char * output_call (insn, call_dest, sibcall) ! rtx insn; ! rtx call_dest; ! int sibcall; { ! int distance; ! rtx xoperands[4]; ! rtx seq_insn; ! /* Handle common case -- empty delay slot or no jump in the delay slot, ! and we're sure that the branch will reach the beginning of the $CODE$ ! subspace. */ ! if ((dbr_sequence_length () == 0 ! && get_attr_length (insn) == 8) ! || (dbr_sequence_length () != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN ! && get_attr_length (insn) == 4)) { - xoperands[0] = call_dest; xoperands[1] = gen_rtx_REG (word_mode, sibcall ? 0 : 2); ! output_asm_insn ("{bl|b,l} %0,%1%#", xoperands); ! return ""; } ! ! /* This call may not reach the beginning of the $CODE$ subspace. */ ! if (get_attr_length (insn) > 8) { ! int delay_insn_deleted = 0; ! rtx xoperands[2]; ! rtx link; ! ! /* We need to emit an inline long-call branch. Furthermore, ! because we're changing a named function call into an indirect ! function call well after the parameters have been set up, we ! need to make sure any FP args appear in both the integer ! and FP registers. Also, we need move any delay slot insn ! out of the delay slot. And finally, we can't rely on the linker ! being able to fix the call to $$dyncall! -- Yuk!. */ ! if (dbr_sequence_length () != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN) { ! /* A non-jump insn in the delay slot. By definition we can ! emit this insn before the call (and in fact before argument ! relocating. */ ! final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, 0); ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! delay_insn_deleted = 1; ! } ! /* Now copy any FP arguments into integer registers. */ ! for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1)) ! { ! int arg_mode, regno; ! rtx use = XEXP (link, 0); ! if (! (GET_CODE (use) == USE ! && GET_CODE (XEXP (use, 0)) == REG ! && FUNCTION_ARG_REGNO_P (REGNO (XEXP (use, 0))))) ! continue; ! arg_mode = GET_MODE (XEXP (use, 0)); ! regno = REGNO (XEXP (use, 0)); ! /* Is it a floating point register? */ ! if (regno >= 32 && regno <= 39) { ! /* Copy from the FP register into an integer register ! (via memory). */ ! if (arg_mode == SFmode) ! { ! xoperands[0] = XEXP (use, 0); ! xoperands[1] = gen_rtx_REG (SImode, 26 - (regno - 32) / 2); ! output_asm_insn ("{fstws|fstw} %0,-16(%%sr0,%%r30)", ! xoperands); ! output_asm_insn ("ldw -16(%%sr0,%%r30),%1", xoperands); ! } ! else ! { ! xoperands[0] = XEXP (use, 0); ! xoperands[1] = gen_rtx_REG (DImode, 25 - (regno - 34) / 2); ! output_asm_insn ("{fstds|fstd} %0,-16(%%sr0,%%r30)", ! xoperands); ! output_asm_insn ("ldw -12(%%sr0,%%r30),%R1", xoperands); ! output_asm_insn ("ldw -16(%%sr0,%%r30),%1", xoperands); ! } } } ! ! /* Don't have to worry about TARGET_PORTABLE_RUNTIME here since ! we don't have any direct calls in that case. */ { ! int i; ! const char *name = XSTR (call_dest, 0); ! /* See if we have already put this function on the list ! of deferred plabels. This list is generally small, ! so a liner search is not too ugly. If it proves too ! slow replace it with something faster. */ ! for (i = 0; i < n_deferred_plabels; i++) ! if (strcmp (name, deferred_plabels[i].name) == 0) ! break; ! /* If the deferred plabel list is empty, or this entry was ! not found on the list, create a new entry on the list. */ ! if (deferred_plabels == NULL || i == n_deferred_plabels) { ! const char *real_name; ! ! if (deferred_plabels == 0) ! deferred_plabels = (struct deferred_plabel *) ! xmalloc (1 * sizeof (struct deferred_plabel)); ! else ! deferred_plabels = (struct deferred_plabel *) ! xrealloc (deferred_plabels, ! ((n_deferred_plabels + 1) ! * sizeof (struct deferred_plabel))); ! ! i = n_deferred_plabels++; ! deferred_plabels[i].internal_label = gen_label_rtx (); ! deferred_plabels[i].name = obstack_alloc (&permanent_obstack, ! strlen (name) + 1); ! strcpy (deferred_plabels[i].name, name); ! /* Gross. We have just implicitly taken the address of this ! function, mark it as such. */ ! STRIP_NAME_ENCODING (real_name, name); ! TREE_SYMBOL_REFERENCED (get_identifier (real_name)) = 1; } ! /* We have to load the address of the function using a procedure ! label (plabel). Inline plabels can lose for PIC and other ! cases, so avoid them by creating a 32bit plabel in the data ! segment. */ ! if (flag_pic) { ! xoperands[0] = deferred_plabels[i].internal_label; ! xoperands[1] = gen_label_rtx (); ! ! output_asm_insn ("addil LT%%%0,%%r19", xoperands); ! output_asm_insn ("ldw RT%%%0(%%r1),%%r22", xoperands); ! output_asm_insn ("ldw 0(%%r22),%%r22", xoperands); ! ! /* Get our address + 8 into %r1. */ ! output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); ! /* Add %r1 to the offset of dyncall from the next insn. */ ! if (TARGET_SOM || !TARGET_GAS) { ! output_asm_insn ("addil L%%$$dyncall-%1,%%r1", xoperands); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn ("ldo R%%$$dyncall-%1(%%r1),%%r1", xoperands); } ! else { ! output_asm_insn ("addil L%%$$dyncall-$PIC_pcrel$0+4,%%r1", xoperands); ! output_asm_insn ("ldo R%%$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1", xoperands); } ! /* Get the return address into %r31. */ ! output_asm_insn ("blr %%r0,%%r31", xoperands); ! /* Branch to our target which is in %r1. */ ! output_asm_insn ("bv %%r0(%%r1)", xoperands); ! if (sibcall) ! { ! /* This call never returns, so we do not need to fix the ! return pointer. */ ! output_asm_insn ("nop", xoperands); ! } ! else ! { ! /* Copy the return address into %r2 also. */ ! output_asm_insn ("copy %%r31,%%r2", xoperands); ! } ! } ! else ! { ! xoperands[0] = deferred_plabels[i].internal_label; ! /* Get the address of our target into %r22. */ ! output_asm_insn ("addil LR%%%0-$global$,%%r27", xoperands); ! output_asm_insn ("ldw RR%%%0-$global$(%%r1),%%r22", xoperands); ! /* Get the high part of the address of $dyncall into %r2, then ! add in the low part in the branch instruction. */ ! output_asm_insn ("ldil L%%$$dyncall,%%r2", xoperands); ! if (TARGET_PA_20) ! output_asm_insn ("be,l R%%$$dyncall(%%sr4,%%r2),%%sr0,%%r31", ! xoperands); ! else ! output_asm_insn ("ble R%%$$dyncall(%%sr4,%%r2)", xoperands); ! if (sibcall) { ! /* This call never returns, so we do not need to fix the ! return pointer. */ ! output_asm_insn ("nop", xoperands); } else { ! /* Copy the return address into %r2 also. */ ! output_asm_insn ("copy %%r31,%%r2", xoperands); } } } ! /* If we had a jump in the call's delay slot, output it now. */ ! if (dbr_sequence_length () != 0 ! && !delay_insn_deleted) ! { ! xoperands[0] = XEXP (PATTERN (NEXT_INSN (insn)), 1); ! output_asm_insn ("b,n %0", xoperands); ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; } return ""; } ! /* This call has an unconditional jump in its delay slot and the ! call is known to reach its target or the beginning of the current ! subspace. */ ! /* Use the containing sequence insn's address. */ ! seq_insn = NEXT_INSN (PREV_INSN (XVECEXP (final_sequence, 0, 0))); ! distance = INSN_ADDRESSES (INSN_UID (JUMP_LABEL (NEXT_INSN (insn)))) ! - INSN_ADDRESSES (INSN_UID (seq_insn)) - 8; ! /* If the branch was too far away, emit a normal call followed ! by a nop, followed by the unconditional branch. ! If the branch is close, then adjust %r2 from within the ! call's delay slot. */ ! xoperands[0] = call_dest; ! xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1); ! if (! VAL_14_BITS_P (distance)) ! output_asm_insn ("{bl|b,l} %0,%%r2\n\tnop\n\tb,n %1", xoperands); else { ! xoperands[3] = gen_label_rtx (); ! output_asm_insn ("\n\t{bl|b,l} %0,%%r2\n\tldo %1-%3(%%r2),%%r2", xoperands); - ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", - CODE_LABEL_NUMBER (xoperands[3])); } ! ! /* Delete the jump. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; return ""; } /* In HPUX 8.0's shared library scheme, special relocations are needed for function labels if they might be passed to a function in a shared library (because shared libraries don't live in code --- 6462,6982 ---- xoperands); } ! /* Jump to our target address in %r1. */ ! output_asm_insn ("bv %%r0(%%r1)", xoperands); ! } ! } ! if (seq_length == 0) ! output_asm_insn ("nop", xoperands); ! /* We are done if there isn't a jump in the delay slot. */ ! if (seq_length == 0 || GET_CODE (NEXT_INSN (insn)) != JUMP_INSN) ! return ""; ! /* This call has an unconditional jump in its delay slot. */ ! xoperands[0] = XEXP (PATTERN (NEXT_INSN (insn)), 1); ! /* See if the return address can be adjusted. Use the containing ! sequence insn's address. */ ! if (INSN_ADDRESSES_SET_P ()) ! { ! seq_insn = NEXT_INSN (PREV_INSN (XVECEXP (final_sequence, 0, 0))); ! distance = (INSN_ADDRESSES (INSN_UID (JUMP_LABEL (NEXT_INSN (insn)))) ! - INSN_ADDRESSES (INSN_UID (seq_insn)) - 8); ! if (VAL_14_BITS_P (distance)) { ! xoperands[1] = gen_label_rtx (); ! output_asm_insn ("ldo %0-%1(%2),%2", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (xoperands[1])); } + else + /* ??? This branch may not reach its target. */ + output_asm_insn ("nop\n\tb,n %0", xoperands); + } + else + /* ??? This branch may not reach its target. */ + output_asm_insn ("nop\n\tb,n %0", xoperands); ! /* Delete the jump. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! ! return ""; ! } ! ! /* Return the attribute length of the call instruction INSN. The SIBCALL ! flag indicates whether INSN is a regular call or a sibling call. The ! length must match the code generated by output_call. We include the delay ! slot in the returned length as it is better to over estimate the length ! than to under estimate it. */ ! ! int ! attr_length_call (insn, sibcall) ! rtx insn; ! int sibcall; ! { ! unsigned long distance = -1; ! ! if (INSN_ADDRESSES_SET_P ()) ! { ! distance = (total_code_bytes + insn_current_reference_address (insn)); ! if (distance < total_code_bytes) ! distance = -1; ! } ! ! if (TARGET_64BIT) ! { ! if (!TARGET_LONG_CALLS ! && ((!sibcall && distance < 7600000) || distance < 240000)) ! return 8; ! ! return (sibcall ? 28 : 24); ! } ! else ! { ! if (!TARGET_LONG_CALLS ! && ((TARGET_PA_20 && !sibcall && distance < 7600000) ! || distance < 240000)) ! return 8; ! ! if (TARGET_LONG_ABS_CALL && !flag_pic) ! return 12; ! ! if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) ! || (TARGET_GAS && TARGET_LONG_PIC_PCREL_CALL)) { ! if (TARGET_PA_20) ! return 20; ! return 28; } ! else ! { ! int length = 0; ! if (TARGET_SOM) ! length += length_fp_args (insn); ! if (flag_pic) ! length += 4; ! if (TARGET_PA_20) ! return (length + 32); ! if (!TARGET_NO_SPACE_REGS) ! length += 8; ! if (!sibcall) ! length += 8; ! return (length + 32); ! } } } ! /* INSN is a function call. It may have an unconditional jump in its delay slot. CALL_DEST is the routine we are calling. */ const char * output_call (insn, call_dest, sibcall) ! rtx insn; ! rtx call_dest; ! int sibcall; { ! int delay_insn_deleted = 0; ! int delay_slot_filled = 0; ! int seq_length = dbr_sequence_length (); ! rtx xoperands[2]; ! xoperands[0] = call_dest; ! ! /* Handle the common case where we're sure that the branch will reach ! the beginning of the $CODE$ subspace. */ ! if (!TARGET_LONG_CALLS && attr_length_call (insn, sibcall) == 8) { xoperands[1] = gen_rtx_REG (word_mode, sibcall ? 0 : 2); ! output_asm_insn ("{bl|b,l} %0,%1", xoperands); } ! else { ! if (TARGET_64BIT) { ! /* ??? As far as I can tell, the HP linker doesn't support the ! long pc-relative sequence described in the 64-bit runtime ! architecture. So, we use a slightly longer indirect call. */ ! struct deferred_plabel *p = get_plabel (XSTR (call_dest, 0)); ! xoperands[0] = p->internal_label; ! xoperands[1] = gen_label_rtx (); ! /* If this isn't a sibcall, we put the load of %r27 into the ! delay slot. We can't do this in a sibcall as we don't ! have a second call-clobbered scratch register available. */ ! if (seq_length != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN ! && !sibcall) ! { ! final_scan_insn (NEXT_INSN (insn), asm_out_file, ! optimize, 0, 0); ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! delay_insn_deleted = 1; ! } ! ! output_asm_insn ("addil LT'%0,%%r27", xoperands); ! output_asm_insn ("ldd RT'%0(%%r1),%%r1", xoperands); ! output_asm_insn ("ldd 0(%%r1),%%r1", xoperands); ! ! if (sibcall) { ! output_asm_insn ("ldd 24(%%r1),%%r27", xoperands); ! output_asm_insn ("ldd 16(%%r1),%%r1", xoperands); ! output_asm_insn ("bve (%%r1)", xoperands); ! } ! else ! { ! output_asm_insn ("ldd 16(%%r1),%%r2", xoperands); ! output_asm_insn ("bve,l (%%r2),%%r2", xoperands); ! output_asm_insn ("ldd 24(%%r1),%%r27", xoperands); ! delay_slot_filled = 1; } } ! else { ! int indirect_call = 0; ! /* Emit a long call. There are several different sequences ! of increasing length and complexity. In most cases, ! they don't allow an instruction in the delay slot. */ ! if (!(TARGET_LONG_ABS_CALL && !flag_pic) ! && !(TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) ! && !(TARGET_GAS && TARGET_LONG_PIC_PCREL_CALL)) ! indirect_call = 1; ! if (seq_length != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN ! && !sibcall ! && (!TARGET_PA_20 || indirect_call)) { ! /* A non-jump insn in the delay slot. By definition we can ! emit this insn before the call (and in fact before argument ! relocating. */ ! final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, 0); ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! delay_insn_deleted = 1; } ! if (TARGET_LONG_ABS_CALL && !flag_pic) { ! /* This is the best sequence for making long calls in ! non-pic code. Unfortunately, GNU ld doesn't provide ! the stub needed for external calls, and GAS's support ! for this with the SOM linker is buggy. */ ! output_asm_insn ("ldil L'%0,%%r1", xoperands); ! if (sibcall) ! output_asm_insn ("be R'%0(%%sr4,%%r1)", xoperands); ! else ! { ! if (TARGET_PA_20) ! output_asm_insn ("be,l R'%0(%%sr4,%%r1),%%sr0,%%r31", ! xoperands); ! else ! output_asm_insn ("ble R'%0(%%sr4,%%r1)", xoperands); ! output_asm_insn ("copy %%r31,%%r2", xoperands); ! delay_slot_filled = 1; ! } ! } ! else ! { ! if (TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) { ! /* The HP assembler and linker can handle relocations ! for the difference of two symbols. GAS and the HP ! linker can't do this when one of the symbols is ! external. */ ! xoperands[1] = gen_label_rtx (); ! output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); ! output_asm_insn ("addil L'%0-%l1,%%r1", xoperands); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn ("ldo R'%0-%l1(%%r1),%%r1", xoperands); } ! else if (TARGET_GAS && TARGET_LONG_PIC_PCREL_CALL) { ! /* GAS currently can't generate the relocations that ! are needed for the SOM linker under HP-UX using this ! sequence. The GNU linker doesn't generate the stubs ! that are needed for external calls on TARGET_ELF32 ! with this sequence. For now, we have to use a ! longer plabel sequence when using GAS. */ ! output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); ! output_asm_insn ("addil L'%0-$PIC_pcrel$0+4,%%r1", xoperands); ! output_asm_insn ("ldo R'%0-$PIC_pcrel$0+8(%%r1),%%r1", xoperands); } + else + { + /* Emit a long plabel-based call sequence. This is + essentially an inline implementation of $$dyncall. + We don't actually try to call $$dyncall as this is + as difficult as calling the function itself. */ + struct deferred_plabel *p = get_plabel (XSTR (call_dest, 0)); ! xoperands[0] = p->internal_label; ! xoperands[1] = gen_label_rtx (); ! /* Since the call is indirect, FP arguments in registers ! need to be copied to the general registers. Then, the ! argument relocation stub will copy them back. */ ! if (TARGET_SOM) ! copy_fp_args (insn); ! if (flag_pic) ! { ! output_asm_insn ("addil LT'%0,%%r19", xoperands); ! output_asm_insn ("ldw RT'%0(%%r1),%%r1", xoperands); ! output_asm_insn ("ldw 0(%%r1),%%r1", xoperands); ! } ! else ! { ! output_asm_insn ("addil LR'%0-$global$,%%r27", ! xoperands); ! output_asm_insn ("ldw RR'%0-$global$(%%r1),%%r1", ! xoperands); ! } ! output_asm_insn ("bb,>=,n %%r1,30,.+16", xoperands); ! output_asm_insn ("depi 0,31,2,%%r1", xoperands); ! output_asm_insn ("ldw 4(%%sr0,%%r1),%%r19", xoperands); ! output_asm_insn ("ldw 0(%%sr0,%%r1),%%r1", xoperands); ! if (!sibcall && !TARGET_PA_20) ! { ! output_asm_insn ("{bl|b,l} .+8,%%r2", xoperands); ! if (TARGET_NO_SPACE_REGS) ! output_asm_insn ("addi 8,%%r2,%%r2", xoperands); ! else ! output_asm_insn ("addi 16,%%r2,%%r2", xoperands); ! } ! } ! if (TARGET_PA_20) { ! if (sibcall) ! output_asm_insn ("bve (%%r1)", xoperands); ! else ! { ! if (indirect_call) ! { ! output_asm_insn ("bve,l (%%r1),%%r2", xoperands); ! output_asm_insn ("stw %%r2,-24(%%sp)", xoperands); ! delay_slot_filled = 1; ! } ! else ! output_asm_insn ("bve,l (%%r1),%%r2", xoperands); ! } } else { ! if (!TARGET_NO_SPACE_REGS) ! output_asm_insn ("ldsid (%%r1),%%r31\n\tmtsp %%r31,%%sr0", ! xoperands); ! ! if (sibcall) ! { ! if (TARGET_NO_SPACE_REGS) ! output_asm_insn ("be 0(%%sr4,%%r1)", xoperands); ! else ! output_asm_insn ("be 0(%%sr0,%%r1)", xoperands); ! } ! else ! { ! if (TARGET_NO_SPACE_REGS) ! output_asm_insn ("ble 0(%%sr4,%%r1)", xoperands); ! else ! output_asm_insn ("ble 0(%%sr0,%%r1)", xoperands); ! ! if (indirect_call) ! output_asm_insn ("stw %%r31,-24(%%sp)", xoperands); ! else ! output_asm_insn ("copy %%r31,%%r2", xoperands); ! delay_slot_filled = 1; ! } } } } + } ! if (seq_length == 0 || (delay_insn_deleted && !delay_slot_filled)) ! output_asm_insn ("nop", xoperands); ! /* We are done if there isn't a jump in the delay slot. */ ! if (seq_length == 0 ! || delay_insn_deleted ! || GET_CODE (NEXT_INSN (insn)) != JUMP_INSN) ! return ""; ! ! /* A sibcall should never have a branch in the delay slot. */ ! if (sibcall) ! abort (); ! ! /* This call has an unconditional jump in its delay slot. */ ! xoperands[0] = XEXP (PATTERN (NEXT_INSN (insn)), 1); ! ! if (!delay_slot_filled && INSN_ADDRESSES_SET_P ()) ! { ! /* See if the return address can be adjusted. Use the containing ! sequence insn's address. */ ! rtx seq_insn = NEXT_INSN (PREV_INSN (XVECEXP (final_sequence, 0, 0))); ! int distance = (INSN_ADDRESSES (INSN_UID (JUMP_LABEL (NEXT_INSN (insn)))) ! - INSN_ADDRESSES (INSN_UID (seq_insn)) - 8); ! ! if (VAL_14_BITS_P (distance)) ! { ! xoperands[1] = gen_label_rtx (); ! output_asm_insn ("ldo %0-%1(%%r2),%%r2", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (xoperands[1])); } + else + /* ??? This branch may not reach its target. */ + output_asm_insn ("nop\n\tb,n %0", xoperands); + } + else + /* ??? This branch may not reach its target. */ + output_asm_insn ("b,n %0", xoperands); + + /* Delete the jump. */ + PUT_CODE (NEXT_INSN (insn), NOTE); + NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; + NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; + + return ""; + } + + /* Return the attribute length of the indirect call instruction INSN. + The length must match the code generated by output_indirect call. + The returned length includes the delay slot. Currently, the delay + slot of an indirect call sequence is not exposed and it is used by + the sequence itself. */ + + int + attr_length_indirect_call (insn) + rtx insn; + { + unsigned long distance = -1; + + if (INSN_ADDRESSES_SET_P ()) + { + distance = (total_code_bytes + insn_current_reference_address (insn)); + if (distance < total_code_bytes) + distance = -1; + } + + if (TARGET_64BIT) + return 12; + + if (TARGET_FAST_INDIRECT_CALLS + || (!TARGET_PORTABLE_RUNTIME + && ((TARGET_PA_20 && distance < 7600000) || distance < 240000))) + return 8; + + if (flag_pic) + return 24; + + if (TARGET_PORTABLE_RUNTIME) + return 20; + + /* Out of reach, can use ble. */ + return 12; + } + + const char * + output_indirect_call (insn, call_dest) + rtx insn; + rtx call_dest; + { + rtx xoperands[1]; + + if (TARGET_64BIT) + { + xoperands[0] = call_dest; + output_asm_insn ("ldd 16(%0),%%r2", xoperands); + output_asm_insn ("bve,l (%%r2),%%r2\n\tldd 24(%0),%%r27", xoperands); return ""; } ! /* First the special case for kernels, level 0 systems, etc. */ ! if (TARGET_FAST_INDIRECT_CALLS) ! return "ble 0(%%sr4,%%r22)\n\tcopy %%r31,%%r2"; ! /* Now the normal case -- we can reach $$dyncall directly or ! we're sure that we can get there via a long-branch stub. ! No need to check target flags as the length uniquely identifies ! the remaining cases. */ ! if (attr_length_indirect_call (insn) == 8) ! return ".CALL\tARGW0=GR\n\t{bl|b,l} $$dyncall,%%r31\n\tcopy %%r31,%%r2"; ! /* Long millicode call, but we are not generating PIC or portable runtime ! code. */ ! if (attr_length_indirect_call (insn) == 12) ! return ".CALL\tARGW0=GR\n\tldil L'$$dyncall,%%r2\n\tble R'$$dyncall(%%sr4,%%r2)\n\tcopy %%r31,%%r2"; ! /* Long millicode call for portable runtime. */ ! if (attr_length_indirect_call (insn) == 20) ! return "ldil L'$$dyncall,%%r31\n\tldo R'$$dyncall(%%r31),%%r31\n\tblr %%r0,%%r2\n\tbv,n %%r0(%%r31)\n\tnop"; ! /* We need a long PIC call to $$dyncall. */ ! xoperands[0] = NULL_RTX; ! output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); ! if (TARGET_SOM || !TARGET_GAS) ! { ! xoperands[0] = gen_label_rtx (); ! output_asm_insn ("addil L'$$dyncall-%0,%%r1", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (xoperands[0])); ! output_asm_insn ("ldo R'$$dyncall-%0(%%r1),%%r1", xoperands); ! } else { ! output_asm_insn ("addil L'$$dyncall-$PIC_pcrel$0+4,%%r1", xoperands); ! output_asm_insn ("ldo R'$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1", xoperands); } ! output_asm_insn ("blr %%r0,%%r2", xoperands); ! output_asm_insn ("bv,n %%r0(%%r1)\n\tnop", xoperands); return ""; } + /* Return the total length of the save and restore instructions needed for + the data linkage table pointer (i.e., the PIC register) across the call instruction INSN. No-return calls do not require a save and restore. In addition, we may be able to avoid the save and restore for calls within the same translation unit. */ + + int + attr_length_save_restore_dltp (insn) + rtx insn; + { + if (find_reg_note (insn, REG_NORETURN, NULL_RTX)) + return 0; + + return 8; + } + /* In HPUX 8.0's shared library scheme, special relocations are needed for function labels if they might be passed to a function in a shared library (because shared libraries don't live in code *************** hppa_encode_label (sym) *** 6323,6339 **** char *newstr, *p; p = newstr = alloca (len + 1); - if (str[0] == '*') - { - str++; - len--; - } *p++ = '@'; strcpy (p, str); XSTR (sym, 0) = ggc_alloc_string (newstr, len); } int function_label_operand (op, mode) rtx op; --- 6991,7032 ---- char *newstr, *p; p = newstr = alloca (len + 1); *p++ = '@'; strcpy (p, str); XSTR (sym, 0) = ggc_alloc_string (newstr, len); } + static void + pa_encode_section_info (decl, first) + tree decl; + int first; + { + if (first && TEXT_SPACE_P (decl)) + { + rtx rtl; + if (TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == VAR_DECL) + rtl = DECL_RTL (decl); + else + rtl = TREE_CST_RTL (decl); + SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; + if (TREE_CODE (decl) == FUNCTION_DECL) + hppa_encode_label (XEXP (DECL_RTL (decl), 0)); + } + } + + /* This is sort of inverse to pa_encode_section_info. */ + + static const char * + pa_strip_name_encoding (str) + const char *str; + { + str += (*str == '@'); + str += (*str == '*'); + return str; + } + int function_label_operand (op, mode) rtx op; *************** is_function_label_plus_const (op) *** 6358,6363 **** --- 7051,7152 ---- && GET_CODE (XEXP (op, 1)) == CONST_INT); } + /* Output assembly code for a thunk to FUNCTION. */ + + static void + pa_asm_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) + FILE *file; + tree thunk_fndecl; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; + tree function; + { + const char *target_name = XSTR (XEXP (DECL_RTL (function), 0), 0); + static unsigned int current_thunk_number; + char label[16]; + const char *lab; + ASM_GENERATE_INTERNAL_LABEL (label, "LTHN", current_thunk_number); + lab = (*targetm.strip_name_encoding) (label); + target_name = (*targetm.strip_name_encoding) (target_name); + /* FIXME: total_code_bytes is not handled correctly in files with + mi thunks. */ + pa_output_function_prologue (file, 0); + if (VAL_14_BITS_P (delta)) + { + if (!TARGET_64BIT && !TARGET_PORTABLE_RUNTIME && flag_pic) + { + fprintf (file, "\taddil LT'%s,%%r19\n", lab); + fprintf (file, "\tldw RT'%s(%%r1),%%r22\n", lab); + fprintf (file, "\tldw 0(%%sr0,%%r22),%%r22\n"); + fprintf (file, "\tbb,>=,n %%r22,30,.+16\n"); + fprintf (file, "\tdepi 0,31,2,%%r22\n"); + fprintf (file, "\tldw 4(%%sr0,%%r22),%%r19\n"); + fprintf (file, "\tldw 0(%%sr0,%%r22),%%r22\n"); + if (TARGET_NO_SPACE_REGS) + fprintf (file, "\tbe 0(%%sr4,%%r22)\n\tldo "); + else + { + fprintf (file, "\tldsid (%%sr0,%%r22),%%r1\n"); + fprintf (file, "\tmtsp %%r1,%%sr0\n"); + fprintf (file, "\tbe 0(%%sr0,%%r22)\n\tldo "); + } + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, "(%%r26),%%r26\n"); + } + else + { + fprintf (file, "\tb %s\n\tldo ", target_name); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, "(%%r26),%%r26\n"); + } + } + else + { + if (!TARGET_64BIT && !TARGET_PORTABLE_RUNTIME && flag_pic) + { + fprintf (file, "\taddil L'"); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, ",%%r26\n\tldo R'"); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, "(%%r1),%%r26\n"); + fprintf (file, "\taddil LT'%s,%%r19\n", lab); + fprintf (file, "\tldw RT'%s(%%r1),%%r22\n", lab); + fprintf (file, "\tldw 0(%%sr0,%%r22),%%r22\n"); + fprintf (file, "\tbb,>=,n %%r22,30,.+16\n"); + fprintf (file, "\tdepi 0,31,2,%%r22\n"); + fprintf (file, "\tldw 4(%%sr0,%%r22),%%r19\n"); + fprintf (file, "\tldw 0(%%sr0,%%r22),%%r22\n"); + if (TARGET_NO_SPACE_REGS) + fprintf (file, "\tbe 0(%%sr4,%%r22)"); + else + { + fprintf (file, "\tldsid (%%sr0,%%r22),%%r1\n"); + fprintf (file, "\tmtsp %%r1,%%sr0\n"); + fprintf (file, "\tbe,n 0(%%sr0,%%r22)\n"); + } + } + else + { + fprintf (file, "\taddil L'"); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, ",%%r26\n\tb %s\n\tldo R'", target_name); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + fprintf (file, "(%%r1),%%r26\n"); + } + } + + fprintf (file, "\t.EXIT\n\t.PROCEND\n"); + if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) + { + data_section (); + fprintf (file, "\t.align 4\n"); + ASM_OUTPUT_INTERNAL_LABEL (file, "LTHN", current_thunk_number); + fprintf (file, "\t.word P'%s\n", target_name); + function_section (thunk_fndecl); + } + current_thunk_number++; + } + /* Returns 1 if the 6 operands specified in OPERANDS are suitable for use in fmpyadd instructions. */ int *************** fmpyaddoperands (operands) *** 6417,6422 **** --- 7206,7251 ---- return 1; } + #if !defined(USE_COLLECT2) + static void + pa_asm_out_constructor (symbol, priority) + rtx symbol; + int priority; + { + if (!function_label_operand (symbol, VOIDmode)) + hppa_encode_label (symbol); + + #ifdef CTORS_SECTION_ASM_OP + default_ctor_section_asm_out_constructor (symbol, priority); + #else + # ifdef TARGET_ASM_NAMED_SECTION + default_named_section_asm_out_constructor (symbol, priority); + # else + default_stabs_asm_out_constructor (symbol, priority); + # endif + #endif + } + + static void + pa_asm_out_destructor (symbol, priority) + rtx symbol; + int priority; + { + if (!function_label_operand (symbol, VOIDmode)) + hppa_encode_label (symbol); + + #ifdef DTORS_SECTION_ASM_OP + default_dtor_section_asm_out_destructor (symbol, priority); + #else + # ifdef TARGET_ASM_NAMED_SECTION + default_named_section_asm_out_destructor (symbol, priority); + # else + default_stabs_asm_out_destructor (symbol, priority); + # endif + #endif + } + #endif + /* Returns 1 if the 6 operands specified in OPERANDS are suitable for use in fmpysub instructions. */ int *************** jump_in_call_delay (insn) *** 6594,6602 **** if (PREV_INSN (insn) && PREV_INSN (PREV_INSN (insn)) ! && GET_CODE (next_active_insn (PREV_INSN (PREV_INSN (insn)))) == INSN) { ! rtx test_insn = next_active_insn (PREV_INSN (PREV_INSN (insn))); return (GET_CODE (PATTERN (test_insn)) == SEQUENCE && XVECEXP (PATTERN (test_insn), 0, 1) == insn); --- 7423,7431 ---- if (PREV_INSN (insn) && PREV_INSN (PREV_INSN (insn)) ! && GET_CODE (next_real_insn (PREV_INSN (PREV_INSN (insn)))) == INSN) { ! rtx test_insn = next_real_insn (PREV_INSN (PREV_INSN (insn))); return (GET_CODE (PATTERN (test_insn)) == SEQUENCE && XVECEXP (PATTERN (test_insn), 0, 1) == insn); *************** output_parallel_addb (operands, length) *** 6667,6688 **** } } ! /* Return nonzero if INSN (a jump insn) immediately follows a call to ! a named function. This is used to discourage creating parallel movb/addb ! insns since a jump which immediately follows a call can execute in the ! delay slot of the call. ! ! It is also used to avoid filling the delay slot of a jump which ! immediately follows a call since the jump can usually be eliminated ! completely by modifying RP in the delay slot of the call. */ int following_call (insn) rtx insn; { ! /* We do not parallel movb,addb or place jumps into call delay slots when ! optimizing for the PA8000. */ ! if (pa_cpu != PROCESSOR_8000) return 0; /* Find the previous real insn, skipping NOTEs. */ --- 7496,7511 ---- } } ! /* Return nonzero if INSN (a jump insn) immediately follows a call ! to a named function. This is used to avoid filling the delay slot ! of the jump since it can usually be eliminated by modifying RP in ! the delay slot of the call. */ int following_call (insn) rtx insn; { ! if (! TARGET_JUMP_IN_DELAY) return 0; /* Find the previous real insn, skipping NOTEs. */ *************** insn_refs_are_delayed (insn) *** 7197,7202 **** --- 8020,8076 ---- && get_attr_type (insn) == TYPE_MILLI)); } + /* On the HP-PA the value is found in register(s) 28(-29), unless + the mode is SF or DF. Then the value is returned in fr4 (32). + + This must perform the same promotions as PROMOTE_MODE, else + PROMOTE_FUNCTION_RETURN will not work correctly. + + Small structures must be returned in a PARALLEL on PA64 in order + to match the HP Compiler ABI. */ + + rtx + function_value (valtype, func) + tree valtype; + tree func ATTRIBUTE_UNUSED; + { + enum machine_mode valmode; + + /* Aggregates with a size less than or equal to 128 bits are returned + in GR 28(-29). They are left justified. The pad bits are undefined. + Larger aggregates are returned in memory. */ + if (TARGET_64BIT && AGGREGATE_TYPE_P (valtype)) + { + rtx loc[2]; + int i, offset = 0; + int ub = int_size_in_bytes (valtype) <= UNITS_PER_WORD ? 1 : 2; + + for (i = 0; i < ub; i++) + { + loc[i] = gen_rtx_EXPR_LIST (VOIDmode, + gen_rtx_REG (DImode, 28 + i), + GEN_INT (offset)); + offset += 8; + } + + return gen_rtx_PARALLEL (BLKmode, gen_rtvec_v (ub, loc)); + } + + if ((INTEGRAL_TYPE_P (valtype) + && TYPE_PRECISION (valtype) < BITS_PER_WORD) + || POINTER_TYPE_P (valtype)) + valmode = word_mode; + else + valmode = TYPE_MODE (valtype); + + if (TREE_CODE (valtype) == REAL_TYPE + && TYPE_MODE (valtype) != TFmode + && !TARGET_SOFT_FLOAT) + return gen_rtx_REG (valmode, 32); + + return gen_rtx_REG (valmode, 28); + } + /* Return the location of a parameter that is passed in a register or NULL if the parameter has any component that is passed in memory. *************** function_arg (cum, mode, type, named) *** 7213,7239 **** int named ATTRIBUTE_UNUSED; { int max_arg_words = (TARGET_64BIT ? 8 : 4); int fpr_reg_base; int gpr_reg_base; rtx retval; if (! TARGET_64BIT) { ! /* If this arg would be passed partially or totally on the stack, then ! this routine should return zero. FUNCTION_ARG_PARTIAL_NREGS will ! handle arguments which are split between regs and stack slots if ! the ABI mandates split arguments. */ ! if (cum->words + FUNCTION_ARG_SIZE (mode, type) > max_arg_words ! || mode == VOIDmode) return NULL_RTX; } else { ! int offset = 0; ! if (FUNCTION_ARG_SIZE (mode, type) > 1 && (cum->words & 1)) ! offset = 1; ! if (cum->words + offset >= max_arg_words ! || mode == VOIDmode) return NULL_RTX; } --- 8087,8118 ---- int named ATTRIBUTE_UNUSED; { int max_arg_words = (TARGET_64BIT ? 8 : 4); + int alignment = 0; + int arg_size; int fpr_reg_base; int gpr_reg_base; rtx retval; + if (mode == VOIDmode) + return NULL_RTX; + + arg_size = FUNCTION_ARG_SIZE (mode, type); + + /* If this arg would be passed partially or totally on the stack, then + this routine should return zero. FUNCTION_ARG_PARTIAL_NREGS will + handle arguments which are split between regs and stack slots if + the ABI mandates split arguments. */ if (! TARGET_64BIT) { ! /* The 32-bit ABI does not split arguments. */ ! if (cum->words + arg_size > max_arg_words) return NULL_RTX; } else { ! if (arg_size > 1) ! alignment = cum->words & 1; ! if (cum->words + alignment >= max_arg_words) return NULL_RTX; } *************** function_arg (cum, mode, type, named) *** 7241,7310 **** particularly in their handling of FP registers. We might be able to cleverly share code between them, but I'm not going to bother in the hope that splitting them up results ! in code that is more easily understood. - The 64bit code probably is very wrong for structure passing. */ if (TARGET_64BIT) { /* Advance the base registers to their current locations. Remember, gprs grow towards smaller register numbers while ! fprs grow to higher register numbers. Also remember FP regs ! are always 4 bytes wide, while the size of an integer register ! varies based on the size of the target word. */ gpr_reg_base = 26 - cum->words; fpr_reg_base = 32 + cum->words; ! /* If the argument is more than a word long, then we need to align ! the base registers. Same caveats as above. */ ! if (FUNCTION_ARG_SIZE (mode, type) > 1) { ! if (mode != BLKmode) ! { ! /* First deal with alignment of the doubleword. */ ! gpr_reg_base -= (cum->words & 1); ! /* This seems backwards, but it is what HP specifies. We need ! gpr_reg_base to point to the smaller numbered register of ! the integer register pair. So if we have an even register ! number, then decrement the gpr base. */ ! gpr_reg_base -= ((gpr_reg_base % 2) == 0); ! /* FP values behave sanely, except that each FP reg is only ! half of word. */ ! fpr_reg_base += ((fpr_reg_base % 2) == 0); ! } ! else { ! rtx loc[8]; ! int i, offset = 0, ub; ! ub = FUNCTION_ARG_SIZE (mode, type); ! ub = MIN (ub, ! MAX (0, max_arg_words - cum->words - (cum->words & 1))); ! gpr_reg_base -= (cum->words & 1); ! for (i = 0; i < ub; i++) ! { ! loc[i] = gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (DImode, ! gpr_reg_base), ! GEN_INT (offset)); ! gpr_reg_base -= 1; ! offset += 8; ! } ! if (ub == 0) ! return NULL_RTX; ! else if (ub == 1) ! return XEXP (loc[0], 0); ! else ! return gen_rtx_PARALLEL (mode, gen_rtvec_v (ub, loc)); } } ! } else { /* If the argument is larger than a word, then we know precisely which registers we must use. */ ! if (FUNCTION_ARG_SIZE (mode, type) > 1) { if (cum->words) { --- 8120,8179 ---- particularly in their handling of FP registers. We might be able to cleverly share code between them, but I'm not going to bother in the hope that splitting them up results ! in code that is more easily understood. */ if (TARGET_64BIT) { /* Advance the base registers to their current locations. Remember, gprs grow towards smaller register numbers while ! fprs grow to higher register numbers. Also remember that ! although FP regs are 32-bit addressable, we pretend that ! the registers are 64-bits wide. */ gpr_reg_base = 26 - cum->words; fpr_reg_base = 32 + cum->words; ! /* Arguments wider than one word and small aggregates need special ! treatment. */ ! if (arg_size > 1 ! || mode == BLKmode ! || (type && AGGREGATE_TYPE_P (type))) { ! /* Double-extended precision (80-bit), quad-precision (128-bit) ! and aggregates including complex numbers are aligned on ! 128-bit boundaries. The first eight 64-bit argument slots ! are associated one-to-one, with general registers r26 ! through r19, and also with floating-point registers fr4 ! through fr11. Arguments larger than one word are always ! passed in general registers. ! Using a PARALLEL with a word mode register results in left ! justified data on a big-endian target. */ ! rtx loc[8]; ! int i, offset = 0, ub = arg_size; ! ! /* Align the base register. */ ! gpr_reg_base -= alignment; ! ! ub = MIN (ub, max_arg_words - cum->words - alignment); ! for (i = 0; i < ub; i++) { ! loc[i] = gen_rtx_EXPR_LIST (VOIDmode, ! gen_rtx_REG (DImode, gpr_reg_base), ! GEN_INT (offset)); ! gpr_reg_base -= 1; ! offset += 8; } + + return gen_rtx_PARALLEL (mode, gen_rtvec_v (ub, loc)); } ! } else { /* If the argument is larger than a word, then we know precisely which registers we must use. */ ! if (arg_size > 1) { if (cum->words) { *************** function_arg (cum, mode, type, named) *** 7316,7321 **** --- 8185,8216 ---- gpr_reg_base = 25; fpr_reg_base = 34; } + + /* Structures 5 to 8 bytes in size are passed in the general + registers in the same manner as other non floating-point + objects. The data is right-justified and zero-extended + to 64 bits. + + This is magic. Normally, using a PARALLEL results in left + justified data on a big-endian target. However, using a + single double-word register provides the required right + justication for 5 to 8 byte structures. This has nothing + to do with the direction of padding specified for the argument. + It has to do with how the data is widened and shifted into + and from the register. + + Aside from adding load_multiple and store_multiple patterns, + this is the only way that I have found to obtain right + justification of BLKmode data when it has a size greater + than one word. Splitting the operation into two SImode loads + or returning a DImode REG results in left justified data. */ + if (mode == BLKmode) + { + rtx loc = gen_rtx_EXPR_LIST (VOIDmode, + gen_rtx_REG (DImode, gpr_reg_base), + const0_rtx); + return gen_rtx_PARALLEL (mode, gen_rtvec (1, loc)); + } } else { *************** function_arg (cum, mode, type, named) *** 7326,7344 **** } } - if (TARGET_64BIT && mode == TFmode) - { - return - gen_rtx_PARALLEL - (mode, - gen_rtvec (2, - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (DImode, gpr_reg_base + 1), - const0_rtx), - gen_rtx_EXPR_LIST (VOIDmode, - gen_rtx_REG (DImode, gpr_reg_base), - GEN_INT (8)))); - } /* Determine if the argument needs to be passed in both general and floating point registers. */ if (((TARGET_PORTABLE_RUNTIME || TARGET_64BIT || TARGET_ELF32) --- 8221,8226 ---- *************** cmpib_comparison_operator (op, mode) *** 7444,7470 **** || GET_CODE (op) == LEU)); } ! /* Mark ARG (which is really a struct deferred_plabel **) for GC. */ static void ! mark_deferred_plabels (arg) ! void *arg; { ! struct deferred_plabel *dp = *(struct deferred_plabel **) arg; ! int i; ! ! for (i = 0; i < n_deferred_plabels; ++i) ! ggc_mark_rtx (dp[i].internal_label); } - /* Called to register all of our global variables with the garbage - collector. */ - static void ! pa_add_gc_roots () { ! ggc_add_rtx_root (&hppa_compare_op0, 1); ! ggc_add_rtx_root (&hppa_compare_op1, 1); ! ggc_add_root (&deferred_plabels, 1, sizeof (&deferred_plabels), ! &mark_deferred_plabels); } --- 8326,8370 ---- || GET_CODE (op) == LEU)); } ! /* On hpux10, the linker will give an error if we have a reference ! in the read-only data section to a symbol defined in a shared ! library. Therefore, expressions that might require a reloc can ! not be placed in the read-only data section. */ static void ! pa_select_section (exp, reloc, align) ! tree exp; ! int reloc; ! unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; { ! if (TREE_CODE (exp) == VAR_DECL ! && TREE_READONLY (exp) ! && !TREE_THIS_VOLATILE (exp) ! && DECL_INITIAL (exp) ! && (DECL_INITIAL (exp) == error_mark_node ! || TREE_CONSTANT (DECL_INITIAL (exp))) ! && !reloc) ! readonly_data_section (); ! else if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'c' ! && !(TREE_CODE (exp) == STRING_CST && flag_writable_strings) ! && !reloc) ! readonly_data_section (); ! else ! data_section (); } static void ! pa_globalize_label (stream, name) ! FILE *stream; ! const char *name; { ! /* We only handle DATA objects here, functions are globalized in ! ASM_DECLARE_FUNCTION_NAME. */ ! if (! FUNCTION_NAME_P (name)) ! { ! fputs ("\t.EXPORT ", stream); ! assemble_name (stream, name); ! fputs (",DATA\n", stream); ! } } + #include "gt-pa.h" diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa.h gcc-3.3/gcc/config/pa/pa.h *** gcc-3.2.3/gcc/config/pa/pa.h 2003-04-16 23:00:25.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa.h 2003-04-16 17:33:40.000000000 +0000 *************** enum cmp_type /* comparison type */ *** 31,37 **** }; /* For long call handling. */ ! extern unsigned int total_code_bytes; /* Which processor to schedule for. */ --- 31,37 ---- }; /* For long call handling. */ ! extern unsigned long total_code_bytes; /* Which processor to schedule for. */ *************** enum processor_type *** 41,46 **** --- 41,47 ---- PROCESSOR_7100, PROCESSOR_7100LC, PROCESSOR_7200, + PROCESSOR_7300, PROCESSOR_8000 }; *************** extern enum architecture_type pa_arch; *** 73,86 **** extern int target_flags; ! /* compile code for HP-PA 1.1 ("Snake") */ #define MASK_PA_11 1 - #ifndef TARGET_PA_11 - #define TARGET_PA_11 (target_flags & MASK_PA_11) - #endif - /* Disable all FP registers (they all become fixed). This may be necessary for compiling kernels which perform lazy context switching of FP regs. Note if you use this option and try to perform floating point operations --- 74,83 ---- extern int target_flags; ! /* compile code for HP-PA 1.1 ("Snake"). */ #define MASK_PA_11 1 /* Disable all FP registers (they all become fixed). This may be necessary for compiling kernels which perform lazy context switching of FP regs. Note if you use this option and try to perform floating point operations *************** extern int target_flags; *** 141,150 **** #define MASK_BIG_SWITCH 2048 #define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH) - /* Generate code for the HPPA 2.0 architecture. TARGET_PA_11 should also be true when this is true. */ #define MASK_PA_20 4096 #ifndef TARGET_PA_20 #define TARGET_PA_20 (target_flags & MASK_PA_20) #endif --- 138,171 ---- #define MASK_BIG_SWITCH 2048 #define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH) /* Generate code for the HPPA 2.0 architecture. TARGET_PA_11 should also be true when this is true. */ #define MASK_PA_20 4096 + + /* Generate cpp defines for server I/O. */ + #define MASK_SIO 8192 + #define TARGET_SIO (target_flags & MASK_SIO) + + /* Assume GNU linker by default. */ + #define MASK_GNU_LD 16384 + #ifndef TARGET_GNU_LD + #define TARGET_GNU_LD (target_flags & MASK_GNU_LD) + #endif + + /* Force generation of long calls. */ + #define MASK_LONG_CALLS 32768 + #ifndef TARGET_LONG_CALLS + #define TARGET_LONG_CALLS (target_flags & MASK_LONG_CALLS) + #endif + + #ifndef TARGET_PA_10 + #define TARGET_PA_10 (target_flags & (MASK_PA_11 | MASK_PA_20) == 0) + #endif + + #ifndef TARGET_PA_11 + #define TARGET_PA_11 (target_flags & MASK_PA_11) + #endif + #ifndef TARGET_PA_20 #define TARGET_PA_20 (target_flags & MASK_PA_20) #endif *************** extern int target_flags; *** 159,203 **** #define TARGET_ELF32 0 #endif ! /* Generate code for SOM ABI. */ #ifndef TARGET_SOM #define TARGET_SOM 0 #endif ! /* Macro to define tables used to set the flags. ! This is a list in braces of pairs in braces, ! each pair being { "NAME", VALUE } ! where VALUE is the bits to set or minus the bits to clear. ! An empty string NAME is used to identify the default VALUE. */ #define TARGET_SWITCHES \ ! {{"snake", MASK_PA_11, "Generate PA1.1 code"}, \ ! {"nosnake", -(MASK_PA_11 | MASK_PA_20), "Generate PA1.0 code"}, \ ! {"pa-risc-1-0", -(MASK_PA_11 | MASK_PA_20), "Generate PA1.0 code"}, \ ! {"pa-risc-1-1", MASK_PA_11, "Generate PA1.1 code"}, \ ! {"pa-risc-2-0", MASK_PA_20, "Generate PA2.0 code. This option requires binutils 2.10 or later"}, \ ! {"disable-fpregs", MASK_DISABLE_FPREGS, "Disable FP regs"}, \ ! {"no-disable-fpregs", -MASK_DISABLE_FPREGS, "Do not disable FP regs"},\ ! {"no-space-regs", MASK_NO_SPACE_REGS, "Disable space regs"}, \ ! {"space-regs", -MASK_NO_SPACE_REGS, "Do not disable space regs"}, \ ! {"jump-in-delay", MASK_JUMP_IN_DELAY, "Put jumps in call delay slots"},\ ! {"no-jump-in-delay", -MASK_JUMP_IN_DELAY, "Do not put jumps in call delay slots"}, \ ! {"disable-indexing", MASK_DISABLE_INDEXING, "Disable indexed addressing"},\ ! {"no-disable-indexing", -MASK_DISABLE_INDEXING, "Do not disable indexed addressing"},\ ! {"portable-runtime", MASK_PORTABLE_RUNTIME, "Use portable calling conventions"}, \ ! {"no-portable-runtime", -MASK_PORTABLE_RUNTIME, "Do not use portable calling conventions"},\ ! {"gas", MASK_GAS, "Assume code will be assembled by GAS"}, \ ! {"no-gas", -MASK_GAS, "Do not assume code will be assembled by GAS"}, \ ! {"soft-float", MASK_SOFT_FLOAT, "Use software floating point"}, \ ! {"no-soft-float", -MASK_SOFT_FLOAT, "Do not use software floating point"}, \ ! {"long-load-store", MASK_LONG_LOAD_STORE, "Emit long load/store sequences"}, \ ! {"no-long-load-store", -MASK_LONG_LOAD_STORE, "Do not emit long load/store sequences"},\ ! {"fast-indirect-calls", MASK_FAST_INDIRECT_CALLS, "Generate fast indirect calls"},\ ! {"no-fast-indirect-calls", -MASK_FAST_INDIRECT_CALLS, "Do not generate fast indirect calls"},\ ! {"big-switch", MASK_BIG_SWITCH, "Generate code for huge switch statements"}, \ ! {"no-big-switch", -MASK_BIG_SWITCH, "Do not generate code for huge switch statements"}, \ ! {"linker-opt", 0, "Enable linker optimizations"}, \ ! { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT, NULL}} #ifndef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_GAS | MASK_JUMP_IN_DELAY) --- 180,292 ---- #define TARGET_ELF32 0 #endif ! /* Generate code for SOM 32bit ABI. */ #ifndef TARGET_SOM #define TARGET_SOM 0 #endif ! /* The following three defines are potential target switches. The current ! defines are optimal given the current capabilities of GAS and GNU ld. */ ! ! /* Define to a C expression evaluating to true to use long absolute calls. ! Currently, only the HP assembler and SOM linker support long absolute ! calls. They are used only in non-pic code. */ ! #define TARGET_LONG_ABS_CALL (TARGET_SOM && !TARGET_GAS) ! ! /* Define to a C expression evaluating to true to use long pic symbol ! difference calls. This is a call variant similar to the long pic ! pc-relative call. Long pic symbol difference calls are only used with ! the HP SOM linker. Currently, only the HP assembler supports these ! calls. GAS doesn't allow an arbritrary difference of two symbols. */ ! #define TARGET_LONG_PIC_SDIFF_CALL (!TARGET_GAS) ! ! /* Define to a C expression evaluating to true to use long pic ! pc-relative calls. Long pic pc-relative calls are only used with ! GAS. Currently, they are usable for calls within a module but ! not for external calls. */ ! #define TARGET_LONG_PIC_PCREL_CALL 0 ! ! /* Define to a C expression evaluating to true to use SOM secondary ! definition symbols for weak support. Linker support for secondary ! definition symbols is buggy prior to HP-UX 11.X. */ ! #define TARGET_SOM_SDEF 0 ! ! /* Define to a C expression evaluating to true to save the entry value ! of SP in the current frame marker. This is normally unnecessary. ! However, the HP-UX unwind library looks at the SAVE_SP callinfo flag. ! HP compilers don't use this flag but it is supported by the assembler. ! We set this flag to indicate that register %r3 has been saved at the ! start of the frame. Thus, when the HP unwind library is used, we ! need to generate additional code to save SP into the frame marker. */ ! #define TARGET_HPUX_UNWIND_LIBRARY 0 ! ! /* Macro to define tables used to set the flags. This is a ! list in braces of target switches with each switch being ! { "NAME", VALUE, "HELP_STRING" }. VALUE is the bits to set, ! or minus the bits to clear. An empty string NAME is used to ! identify the default VALUE. Do not mark empty strings for ! translation. */ #define TARGET_SWITCHES \ ! {{ "snake", MASK_PA_11, \ ! N_("Generate PA1.1 code") }, \ ! { "nosnake", -(MASK_PA_11 | MASK_PA_20), \ ! N_("Generate PA1.0 code") }, \ ! { "pa-risc-1-0", -(MASK_PA_11 | MASK_PA_20), \ ! N_("Generate PA1.0 code") }, \ ! { "pa-risc-1-1", MASK_PA_11, \ ! N_("Generate PA1.1 code") }, \ ! { "pa-risc-2-0", MASK_PA_20, \ ! N_("Generate PA2.0 code (requires binutils 2.10 or later)") }, \ ! { "disable-fpregs", MASK_DISABLE_FPREGS, \ ! N_("Disable FP regs") }, \ ! { "no-disable-fpregs", -MASK_DISABLE_FPREGS, \ ! N_("Do not disable FP regs") }, \ ! { "no-space-regs", MASK_NO_SPACE_REGS, \ ! N_("Disable space regs") }, \ ! { "space-regs", -MASK_NO_SPACE_REGS, \ ! N_("Do not disable space regs") }, \ ! { "jump-in-delay", MASK_JUMP_IN_DELAY, \ ! N_("Put jumps in call delay slots") }, \ ! { "no-jump-in-delay", -MASK_JUMP_IN_DELAY, \ ! N_("Do not put jumps in call delay slots") }, \ ! { "disable-indexing", MASK_DISABLE_INDEXING, \ ! N_("Disable indexed addressing") }, \ ! { "no-disable-indexing", -MASK_DISABLE_INDEXING, \ ! N_("Do not disable indexed addressing") }, \ ! { "portable-runtime", MASK_PORTABLE_RUNTIME, \ ! N_("Use portable calling conventions") }, \ ! { "no-portable-runtime", -MASK_PORTABLE_RUNTIME, \ ! N_("Do not use portable calling conventions") }, \ ! { "gas", MASK_GAS, \ ! N_("Assume code will be assembled by GAS") }, \ ! { "no-gas", -MASK_GAS, \ ! N_("Do not assume code will be assembled by GAS") }, \ ! { "soft-float", MASK_SOFT_FLOAT, \ ! N_("Use software floating point") }, \ ! { "no-soft-float", -MASK_SOFT_FLOAT, \ ! N_("Do not use software floating point") }, \ ! { "long-load-store", MASK_LONG_LOAD_STORE, \ ! N_("Emit long load/store sequences") }, \ ! { "no-long-load-store", -MASK_LONG_LOAD_STORE, \ ! N_("Do not emit long load/store sequences") }, \ ! { "fast-indirect-calls", MASK_FAST_INDIRECT_CALLS, \ ! N_("Generate fast indirect calls") }, \ ! { "no-fast-indirect-calls", -MASK_FAST_INDIRECT_CALLS, \ ! N_("Do not generate fast indirect calls") }, \ ! { "big-switch", MASK_BIG_SWITCH, \ ! N_("Generate code for huge switch statements") }, \ ! { "no-big-switch", -MASK_BIG_SWITCH, \ ! N_("Do not generate code for huge switch statements") }, \ ! { "long-calls", MASK_LONG_CALLS, \ ! N_("Always generate long calls") }, \ ! { "no-long-calls", -MASK_LONG_CALLS, \ ! N_("Generate long calls only when needed") }, \ ! { "linker-opt", 0, \ ! N_("Enable linker optimizations") }, \ ! SUBTARGET_SWITCHES \ ! { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT, \ ! NULL }} #ifndef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_GAS | MASK_JUMP_IN_DELAY) *************** extern int target_flags; *** 207,216 **** #define TARGET_CPU_DEFAULT 0 #endif ! #define TARGET_OPTIONS \ ! { \ ! { "schedule=", &pa_cpu_string, "Specify CPU for scheduling purposes" },\ ! { "arch=", &pa_arch_string, "Specify architecture for code generation. Values are 1.0, 1.1, and 2.0. 2.0 requires gas snapshot 19990413 or later." }\ } /* Specify the dialect of assembler to use. New mnemonics is dialect one --- 296,315 ---- #define TARGET_CPU_DEFAULT 0 #endif ! #ifndef SUBTARGET_SWITCHES ! #define SUBTARGET_SWITCHES ! #endif ! ! #ifndef TARGET_SCHED_DEFAULT ! #define TARGET_SCHED_DEFAULT "8000" ! #endif ! ! #define TARGET_OPTIONS \ ! { \ ! { "schedule=", &pa_cpu_string, \ ! N_("Specify CPU for scheduling purposes") }, \ ! { "arch=", &pa_arch_string, \ ! N_("Specify architecture for code generation. Values are 1.0, 1.1, and 2.0. 2.0 requires gas snapshot 19990413 or later.") }\ } /* Specify the dialect of assembler to use. New mnemonics is dialect one *************** extern int target_flags; *** 260,334 **** ((GET_CODE (X) == PLUS ? OFFSET : 0) \ + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0))) ! #define CPP_PA10_SPEC "" ! #define CPP_PA11_SPEC "-D_PA_RISC1_1 -D__hp9000s700" ! #define CPP_PA20_SPEC "-D_PA_RISC2_0 -D__hp9000s800" ! #define CPP_64BIT_SPEC "-D__LP64__ -D__LONG_MAX__=9223372036854775807L" ! ! #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) == 0 ! #define CPP_CPU_DEFAULT_SPEC "%(cpp_pa10)" ! #endif ! ! #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) != 0 ! #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_20) != 0 ! #define CPP_CPU_DEFAULT_SPEC "%(cpp_pa11) %(cpp_pa20)" ! #else ! #define CPP_CPU_DEFAULT_SPEC "%(cpp_pa11)" ! #endif ! #endif ! ! #if TARGET_64BIT ! #define CPP_64BIT_DEFAULT_SPEC "%(cpp_64bit)" ! #else ! #define CPP_64BIT_DEFAULT_SPEC "" ! #endif ! ! /* This macro defines names of additional specifications to put in the ! specs that can be used in various specifications like CC1_SPEC. Its ! definition is an initializer with a subgrouping for each command option. ! ! Each subgrouping contains a string constant, that defines the ! specification name, and a string constant that used by the GNU CC driver ! program. ! ! Do not define this macro if it does not need to do anything. */ ! ! #ifndef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS ! #endif ! ! #define EXTRA_SPECS \ ! { "cpp_pa10", CPP_PA10_SPEC}, \ ! { "cpp_pa11", CPP_PA11_SPEC}, \ ! { "cpp_pa20", CPP_PA20_SPEC}, \ ! { "cpp_64bit", CPP_64BIT_SPEC}, \ ! { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \ ! { "cpp_64bit_default", CPP_64BIT_DEFAULT_SPEC }, \ ! SUBTARGET_EXTRA_SPECS ! ! #define CPP_SPEC "\ ! %{mpa-risc-1-0:%(cpp_pa10)} \ ! %{mpa-risc-1-1:%(cpp_pa11)} \ ! %{msnake:%(cpp_pa11)} \ ! %{mpa-risc-2-0:%(cpp_pa20)} \ ! %{!mpa-risc-1-0:%{!mpa-risc-1-1:%{!mpa-risc-2-0:%{!msnake:%(cpp_cpu_default)}}}} \ ! %{m64bit:%(cpp_64bit)} \ ! %{!m64bit:%(cpp_64bit_default)} \ ! %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__ -D_INCLUDE_LONGLONG} \ ! %{threads: -D_REENTRANT -D_DCE_THREADS}" ! ! #define CPLUSPLUS_CPP_SPEC "\ ! -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__ -D_INCLUDE_LONGLONG \ ! %{mpa-risc-1-0:%(cpp_pa10)} \ ! %{mpa-risc-1-1:%(cpp_pa11)} \ ! %{msnake:%(cpp_pa11)} \ ! %{mpa-risc-2-0:%(cpp_pa20)} \ ! %{!mpa-risc-1-0:%{!mpa-risc-1-1:%{!mpa-risc-2-0:%{!msnake:%(cpp_cpu_default)}}}} \ ! %{m64bit:%(cpp_64bit)} \ ! %{!m64bit:%(cpp_64bit_default)} \ ! %{threads: -D_REENTRANT -D_DCE_THREADS}" ! /* Defines for a K&R CC */ #define CC1_SPEC "%{pg:} %{p:}" --- 359,400 ---- ((GET_CODE (X) == PLUS ? OFFSET : 0) \ + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0))) ! #define TARGET_CPU_CPP_BUILTINS() \ ! do { \ ! builtin_assert("cpu=hppa"); \ ! builtin_assert("machine=hppa"); \ ! builtin_define("__hppa"); \ ! builtin_define("__hppa__"); \ ! if (TARGET_64BIT) \ ! { \ ! builtin_define("_LP64"); \ ! builtin_define("__LP64__"); \ ! } \ ! if (TARGET_PA_20) \ ! builtin_define("_PA_RISC2_0"); \ ! else if (TARGET_PA_11) \ ! builtin_define("_PA_RISC1_1"); \ ! else \ ! builtin_define("_PA_RISC1_0"); \ ! } while (0) ! /* An old set of OS defines for various BSD-like systems. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("REVARGV"); \ ! builtin_define_std ("hp800"); \ ! builtin_define_std ("hp9000"); \ ! builtin_define_std ("hp9k8"); \ ! if (c_language != clk_cplusplus \ ! && !flag_iso) \ ! builtin_define ("hppa"); \ ! builtin_define_std ("spectrum"); \ ! builtin_define_std ("unix"); \ ! builtin_assert ("system=bsd"); \ ! builtin_assert ("system=unix"); \ ! } \ ! while (0) #define CC1_SPEC "%{pg:} %{p:}" *************** extern int target_flags; *** 353,359 **** #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" #define WCHAR_TYPE "unsigned int" - #define WCHAR_UNSIGNED 1 #define WCHAR_TYPE_SIZE 32 /* Show we can debug even without a frame pointer. */ --- 419,424 ---- *************** extern int target_flags; *** 362,377 **** /* Machine dependent reorg pass. */ #define MACHINE_DEPENDENT_REORG(X) pa_reorg(X) - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Asystem=unix -Asystem=bsd -Acpu=hppa -Amachine=hppa" /* target machine storage layout */ - /* Define for cross-compilation from a host with a different float format - or endianness (e.g. VAX, x86). */ - #define REAL_ARITHMETIC - /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared --- 427,435 ---- *************** extern int target_flags; *** 395,420 **** numbered. */ #define WORDS_BIG_ENDIAN 1 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD (TARGET_64BIT ? 64 : 32) #define MAX_BITS_PER_WORD 64 #define MAX_LONG_TYPE_SIZE 32 - #define MAX_WCHAR_TYPE_SIZE 32 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) #define MIN_UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE BITS_PER_WORD - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY BITS_PER_WORD --- 453,465 ---- *************** extern int target_flags; *** 425,435 **** /* Boundary (in *bits*) on which stack pointer is always aligned; certain optimizations in combine depend on this. ! GCC for the PA always rounds its stacks to a 8 * STACK_BOUNDARY ! boundary, but that happens late in the compilation process. */ #define STACK_BOUNDARY BIGGEST_ALIGNMENT ! ! #define PREFERRED_STACK_BOUNDARY (8 * STACK_BOUNDARY) /* Allocation boundary (in *bits*) for the code of a function. */ #define FUNCTION_BOUNDARY BITS_PER_WORD --- 470,481 ---- /* Boundary (in *bits*) on which stack pointer is always aligned; certain optimizations in combine depend on this. ! The HP-UX runtime documents mandate 64-byte and 16-byte alignment for ! the stack on the 32 and 64-bit ports, respectively. However, we ! are only guaranteed that the stack is aligned to BIGGEST_ALIGNMENT ! in main. Thus, we treat the former as the preferred alignment. */ #define STACK_BOUNDARY BIGGEST_ALIGNMENT ! #define PREFERRED_STACK_BOUNDARY (TARGET_64BIT ? 128 : 512) /* Allocation boundary (in *bits*) for the code of a function. */ #define FUNCTION_BOUNDARY BITS_PER_WORD *************** extern int target_flags; *** 440,446 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ --- 486,492 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ *************** extern struct rtx_def *hppa_pic_save_rtx *** 517,525 **** PA64 ABI says that objects larger than 128 bits are returned in memory. Note, int_size_in_bytes can return -1 if the size of the object is variable or larger than the maximum value that can be expressed as ! a HOST_WIDE_INT. */ #define RETURN_IN_MEMORY(TYPE) \ ! ((unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > (TARGET_64BIT ? 16 : 8)) /* Register in which address to store a structure value is passed to a function. */ --- 563,575 ---- PA64 ABI says that objects larger than 128 bits are returned in memory. Note, int_size_in_bytes can return -1 if the size of the object is variable or larger than the maximum value that can be expressed as ! a HOST_WIDE_INT. It can also return zero for an empty type. The ! simplest way to handle variable and empty types is to pass them in ! memory. This avoids problems in defining the boundaries of argument ! slots, allocating registers, etc. */ #define RETURN_IN_MEMORY(TYPE) \ ! (int_size_in_bytes (TYPE) > (TARGET_64BIT ? 16 : 8) \ ! || int_size_in_bytes (TYPE) <= 0) /* Register in which address to store a structure value is passed to a function. */ *************** extern struct rtx_def *hppa_pic_save_rtx *** 527,535 **** /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) \ ! ((N) < 3 ? (N) + 20 : (N) == 4 ? 31 : INVALID_REGNUM) #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 29) ! #define EH_RETURN_HANDLER_RTX gen_rtx_REG (Pmode, 2) /* The letters I, J, K, L and M in a register constraint string can be used to stand for particular ranges of immediate operands. --- 577,594 ---- /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) \ ! ((N) < 3 ? (N) + 20 : (N) == 3 ? 31 : INVALID_REGNUM) #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 29) ! #define EH_RETURN_HANDLER_RTX \ ! gen_rtx_MEM (word_mode, \ ! gen_rtx_PLUS (word_mode, frame_pointer_rtx, \ ! TARGET_64BIT ? GEN_INT (-16) : GEN_INT (-20))) ! ! ! /* Offset from the argument pointer register value to the top of ! stack. This is different from FIRST_PARM_OFFSET because of the ! frame marker. */ ! #define ARG_POINTER_CFA_OFFSET(FNDECL) 0 /* The letters I, J, K, L and M in a register constraint string can be used to stand for particular ranges of immediate operands. *************** extern struct rtx_def *hppa_pic_save_rtx *** 626,633 **** /* Offset within stack frame to start allocating local variables at. If FRAME_GROWS_DOWNWARD, this is the offset to the END of the first local allocated. Otherwise, it is the offset to the BEGINNING ! of the first local allocated. */ ! #define STARTING_FRAME_OFFSET 8 /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. --- 685,694 ---- /* Offset within stack frame to start allocating local variables at. If FRAME_GROWS_DOWNWARD, this is the offset to the END of the first local allocated. Otherwise, it is the offset to the BEGINNING ! of the first local allocated. The start of the locals must lie on ! a STACK_BOUNDARY or else the frame size of leaf functions will not ! be zero. */ ! #define STARTING_FRAME_OFFSET (TARGET_64BIT ? 16 : 8) /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. *************** extern struct rtx_def *hppa_pic_save_rtx *** 660,668 **** /* The weird HPPA calling conventions require a minimum of 48 bytes on the stack: 16 bytes for register saves, and 32 bytes for magic. This is the difference between the logical top of stack and the ! actual sp. */ #define STACK_POINTER_OFFSET \ ! (TARGET_64BIT ? -(current_function_outgoing_args_size + 16): -32) #define STACK_DYNAMIC_OFFSET(FNDECL) \ (TARGET_64BIT \ --- 721,733 ---- /* The weird HPPA calling conventions require a minimum of 48 bytes on the stack: 16 bytes for register saves, and 32 bytes for magic. This is the difference between the logical top of stack and the ! actual sp. ! ! On the 64-bit port, the HP C compiler allocates a 48-byte frame ! marker, although the runtime documentation only describes a 16 ! byte marker. For compatibility, we allocate 48 bytes. */ #define STACK_POINTER_OFFSET \ ! (TARGET_64BIT ? -(current_function_outgoing_args_size + 48): -32) #define STACK_DYNAMIC_OFFSET(FNDECL) \ (TARGET_64BIT \ *************** extern struct rtx_def *hppa_pic_save_rtx *** 682,698 **** If the precise function being called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0. */ ! /* On the HP-PA the value is found in register(s) 28(-29), unless ! the mode is SF or DF. Then the value is returned in fr4 (32, ) */ ! ! /* This must perform the same promotions as PROMOTE_MODE, else ! PROMOTE_FUNCTION_RETURN will not work correctly. */ ! #define FUNCTION_VALUE(VALTYPE, FUNC) \ ! gen_rtx_REG (((INTEGRAL_TYPE_P (VALTYPE) \ ! && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ ! || POINTER_TYPE_P (VALTYPE)) \ ! ? word_mode : TYPE_MODE (VALTYPE), \ ! TREE_CODE (VALTYPE) == REAL_TYPE && !TARGET_SOFT_FLOAT ? 32 : 28) /* Define how to find the value returned by a library function assuming the value has mode MODE. */ --- 747,753 ---- If the precise function being called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0. */ ! #define FUNCTION_VALUE(VALTYPE, FUNC) function_value (VALTYPE, FUNC) /* Define how to find the value returned by a library function assuming the value has mode MODE. */ *************** struct hppa_args {int words, nargs_proto *** 758,764 **** (CUM).indirect = 0, \ (CUM).nargs_prototype = 1000 ! /* Figure out the size in words of the function argument. */ #define FUNCTION_ARG_SIZE(MODE, TYPE) \ ((((MODE) != BLKmode \ --- 813,821 ---- (CUM).indirect = 0, \ (CUM).nargs_prototype = 1000 ! /* Figure out the size in words of the function argument. The size ! returned by this macro should always be greater than zero because ! we pass variable and zero sized objects by reference. */ #define FUNCTION_ARG_SIZE(MODE, TYPE) \ ((((MODE) != BLKmode \ *************** struct hppa_args {int words, nargs_proto *** 830,835 **** --- 887,898 ---- #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ function_arg (&CUM, MODE, TYPE, NAMED) + /* Nonzero if we do not know how to pass TYPE solely in registers. */ + #define MUST_PASS_IN_STACK(MODE,TYPE) \ + ((TYPE) != 0 \ + && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ + || TREE_ADDRESSABLE (TYPE))) + /* For an arg passed partly in registers and partly in memory, this is the number of registers used. For args passed entirely in registers or entirely in memory, zero. */ *************** struct hppa_args {int words, nargs_proto *** 843,954 **** bits, of an argument with the specified mode and type. If it is not defined, `PARM_BOUNDARY' is used for all arguments. */ ! #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ! (((TYPE) != 0) \ ! ? ((integer_zerop (TYPE_SIZE (TYPE)) \ ! || ! TREE_CONSTANT (TYPE_SIZE (TYPE))) \ ! ? BITS_PER_UNIT \ ! : (((int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) \ ! / UNITS_PER_WORD) * BITS_PER_WORD) \ ! : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \ ! ? PARM_BOUNDARY : GET_MODE_ALIGNMENT(MODE))) ! /* Arguments larger than eight bytes are passed by invisible reference */ ! /* PA64 does not pass anything by invisible reference. */ #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ (TARGET_64BIT \ ! ? 0 \ ! : (((TYPE) && int_size_in_bytes (TYPE) > 8) \ || ((MODE) && GET_MODE_SIZE (MODE) > 8))) ! /* PA64 does not pass anything by invisible reference. ! This should be undef'ed for 64bit, but we'll see if this works. The ! problem is that we can't test TARGET_64BIT from the preprocessor. */ ! #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ ! (TARGET_64BIT \ ! ? 0 \ ! : (((TYPE) && int_size_in_bytes (TYPE) > 8) \ ! || ((MODE) && GET_MODE_SIZE (MODE) > 8))) ! extern struct rtx_def *hppa_compare_op0, *hppa_compare_op1; extern enum cmp_type hppa_branch_type; - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - { const char *target_name = XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0); \ - static unsigned int current_thunk_number; \ - char label[16]; \ - char *lab; \ - ASM_GENERATE_INTERNAL_LABEL (label, "LTHN", current_thunk_number); \ - STRIP_NAME_ENCODING (lab, label); \ - STRIP_NAME_ENCODING (target_name, target_name); \ - /* FIXME: total_code_bytes is not handled correctly in files with \ - mi thunks. */ \ - pa_output_function_prologue (FILE, 0); \ - if (VAL_14_BITS_P (DELTA)) \ - { \ - if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \ - { \ - fprintf (FILE, "\taddil LT%%%s,%%r19\n", lab); \ - fprintf (FILE, "\tldw RT%%%s(%%r1),%%r22\n", lab); \ - fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \ - fprintf (FILE, "\tbb,>=,n %%r22,30,.+16\n"); \ - fprintf (FILE, "\tdepi 0,31,2,%%r22\n"); \ - fprintf (FILE, "\tldw 4(%%sr0,%%r22),%%r19\n"); \ - fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \ - fprintf (FILE, "\tldsid (%%sr0,%%r22),%%r1\n\tmtsp %%r1,%%sr0\n"); \ - fprintf (FILE, "\tbe 0(%%sr0,%%r22)\n\tldo "); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ - fprintf (FILE, "(%%r26),%%r26\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tb %s\n\tldo ", target_name); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ - fprintf (FILE, "(%%r26),%%r26\n"); \ - } \ - } \ - else \ - { \ - if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \ - { \ - fprintf (FILE, "\taddil L%%"); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ - fprintf (FILE, ",%%r26\n\tldo R%%"); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ - fprintf (FILE, "(%%r1),%%r26\n"); \ - fprintf (FILE, "\taddil LT%%%s,%%r19\n", lab); \ - fprintf (FILE, "\tldw RT%%%s(%%r1),%%r22\n", lab); \ - fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \ - fprintf (FILE, "\tbb,>=,n %%r22,30,.+16\n"); \ - fprintf (FILE, "\tdepi 0,31,2,%%r22\n"); \ - fprintf (FILE, "\tldw 4(%%sr0,%%r22),%%r19\n"); \ - fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \ - fprintf (FILE, "\tldsid (%%sr0,%%r22),%%r1\n\tmtsp %%r1,%%sr0\n"); \ - fprintf (FILE, "\tbe,n 0(%%sr0,%%r22)\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\taddil L%%"); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ - fprintf (FILE, ",%%r26\n\tb %s\n\tldo R%%", target_name); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ - fprintf (FILE, "(%%r1),%%r26\n"); \ - } \ - } \ - fprintf (FILE, "\t.EXIT\n\t.PROCEND\n"); \ - if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \ - { \ - data_section (); \ - fprintf (FILE, "\t.align 4\n"); \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, "LTHN", current_thunk_number); \ - fprintf (FILE, "\t.word P%%%s\n", target_name); \ - function_section (THUNK_FNDECL); \ - } \ - current_thunk_number++; \ - } - /* On HPPA, we emit profiling code as rtl via PROFILE_HOOK rather than as assembly via FUNCTION_PROFILER. Just output a local label. We can't use the function label because the GAS SOM target can't --- 906,948 ---- bits, of an argument with the specified mode and type. If it is not defined, `PARM_BOUNDARY' is used for all arguments. */ ! /* Arguments larger than one word are double word aligned. */ ! #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ! (((TYPE) \ ! ? (integer_zerop (TYPE_SIZE (TYPE)) \ ! || !TREE_CONSTANT (TYPE_SIZE (TYPE)) \ ! || int_size_in_bytes (TYPE) <= UNITS_PER_WORD) \ ! : GET_MODE_SIZE(MODE) <= UNITS_PER_WORD) \ ! ? PARM_BOUNDARY : MAX_PARM_BOUNDARY) ! /* In the 32-bit runtime, arguments larger than eight bytes are passed ! by invisible reference. As a GCC extension, we also pass anything ! with a zero or variable size by reference. ! ! The 64-bit runtime does not describe passing any types by invisible ! reference. The internals of GCC can't currently handle passing ! empty structures, and zero or variable length arrays when they are ! not passed entirely on the stack or by reference. Thus, as a GCC ! extension, we pass these types by reference. The HP compiler doesn't ! support these types, so hopefully there shouldn't be any compatibility ! issues. This may have to be revisited when HP releases a C99 compiler ! or updates the ABI. */ #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ (TARGET_64BIT \ ! ? ((TYPE) && int_size_in_bytes (TYPE) <= 0) \ ! : (((TYPE) && (int_size_in_bytes (TYPE) > 8 \ ! || int_size_in_bytes (TYPE) <= 0)) \ || ((MODE) && GET_MODE_SIZE (MODE) > 8))) ! #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ ! FUNCTION_ARG_PASS_BY_REFERENCE (CUM, MODE, TYPE, NAMED) ! extern GTY(()) rtx hppa_compare_op0; ! extern GTY(()) rtx hppa_compare_op1; extern enum cmp_type hppa_branch_type; /* On HPPA, we emit profiling code as rtl via PROFILE_HOOK rather than as assembly via FUNCTION_PROFILER. Just output a local label. We can't use the function label because the GAS SOM target can't *************** extern int may_call_alloca; *** 1116,1123 **** /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! hppa_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ --- 1110,1117 ---- /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! hppa_va_start (valist, nextarg) /* Implement `va_arg'. */ *************** extern int may_call_alloca; *** 1245,1252 **** /* Using DFmode forces only short displacements \ to be recognized as valid in reg+d addresses. \ However, this is not necessary for PA2.0 since\ ! it has long FP loads/stores. */ \ && memory_address_p ((TARGET_PA_20 \ ? GET_MODE (OP) \ : DFmode), \ XEXP (OP, 0)) \ --- 1239,1252 ---- /* Using DFmode forces only short displacements \ to be recognized as valid in reg+d addresses. \ However, this is not necessary for PA2.0 since\ ! it has long FP loads/stores. \ ! \ ! FIXME: the ELF32 linker clobbers the LSB of \ ! the FP register number in {fldw,fstw} insns. \ ! Thus, we only allow long FP loads/stores on \ ! TARGET_64BIT. */ \ && memory_address_p ((TARGET_PA_20 \ + && !TARGET_ELF32 \ ? GET_MODE (OP) \ : DFmode), \ XEXP (OP, 0)) \ *************** extern int may_call_alloca; *** 1352,1358 **** if (GET_CODE (index) == CONST_INT \ && ((INT_14_BITS (index) \ && (TARGET_SOFT_FLOAT \ ! || (TARGET_PA_20 \ && ((MODE == SFmode \ && (INTVAL (index) % 4) == 0)\ || (MODE == DFmode \ --- 1352,1358 ---- if (GET_CODE (index) == CONST_INT \ && ((INT_14_BITS (index) \ && (TARGET_SOFT_FLOAT \ ! || (TARGET_PA_20 \ && ((MODE == SFmode \ && (INTVAL (index) % 4) == 0)\ || (MODE == DFmode \ *************** extern int may_call_alloca; *** 1379,1384 **** --- 1379,1385 ---- /* We can allow symbolic LO_SUM addresses\ for PA2.0. */ \ || (TARGET_PA_20 \ + && !TARGET_ELF32 \ && GET_CODE (XEXP (X, 1)) != CONST_INT)\ || ((MODE) != SFmode \ && (MODE) != DFmode))) \ *************** extern int may_call_alloca; *** 1392,1397 **** --- 1393,1399 ---- /* We can allow symbolic LO_SUM addresses\ for PA2.0. */ \ || (TARGET_PA_20 \ + && !TARGET_ELF32 \ && GET_CODE (XEXP (X, 1)) != CONST_INT)\ || ((MODE) != SFmode \ && (MODE) != DFmode))) \ *************** extern int may_call_alloca; *** 1406,1412 **** && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && GET_CODE (XEXP (X, 1)) == UNSPEC \ && (TARGET_SOFT_FLOAT \ ! || TARGET_PA_20 \ || ((MODE) != SFmode \ && (MODE) != DFmode))) \ goto ADDR; \ --- 1408,1414 ---- && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && GET_CODE (XEXP (X, 1)) == UNSPEC \ && (TARGET_SOFT_FLOAT \ ! || (TARGET_PA_20 && !TARGET_ELF32) \ || ((MODE) != SFmode \ && (MODE) != DFmode))) \ goto ADDR; \ *************** do { \ *** 1438,1444 **** rtx new, temp = NULL_RTX; \ \ mask = (GET_MODE_CLASS (MODE) == MODE_FLOAT \ ! ? (TARGET_PA_20 ? 0x3fff : 0x1f) : 0x3fff); \ \ if (optimize \ && GET_CODE (AD) == PLUS) \ --- 1440,1446 ---- rtx new, temp = NULL_RTX; \ \ mask = (GET_MODE_CLASS (MODE) == MODE_FLOAT \ ! ? (TARGET_PA_20 && !TARGET_ELF32 ? 0x3fff : 0x1f) : 0x3fff); \ \ if (optimize \ && GET_CODE (AD) == PLUS) \ *************** do { \ *** 1507,1542 **** || GET_CODE (ADDR) == POST_INC) \ goto LABEL ! /* Arghh. The hpux10 linker chokes if we have a reference to symbols ! in a readonly data section when the symbol is defined in a shared ! library. Since we can't know at compile time if a symbol will be ! satisfied by a shared library or main program we put any symbolic ! constant into the normal data section. */ ! #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \ ! if (symbolic_operand (RTX, MODE)) \ ! data_section (); \ ! else \ ! readonly_data_section (); ! ! /* On hpux10, the linker will give an error if we have a reference ! in the read-only data section to a symbol defined in a shared ! library. Therefore, expressions that might require a reloc can ! not be placed in the read-only data section. */ ! #define SELECT_SECTION(EXP,RELOC,ALIGN) \ ! if (TREE_CODE (EXP) == VAR_DECL \ ! && TREE_READONLY (EXP) \ ! && !TREE_THIS_VOLATILE (EXP) \ ! && DECL_INITIAL (EXP) \ ! && (DECL_INITIAL (EXP) == error_mark_node \ ! || TREE_CONSTANT (DECL_INITIAL (EXP))) \ ! && !RELOC) \ ! readonly_data_section (); \ ! else if (TREE_CODE_CLASS (TREE_CODE (EXP)) == 'c' \ ! && !(TREE_CODE (EXP) == STRING_CST && flag_writable_strings) \ ! && !RELOC) \ ! readonly_data_section (); \ ! else \ ! data_section (); /* Define this macro if references to a symbol must be treated differently depending on something about the variable or --- 1509,1515 ---- || GET_CODE (ADDR) == POST_INC) \ goto LABEL ! #define TARGET_ASM_SELECT_SECTION pa_select_section /* Define this macro if references to a symbol must be treated differently depending on something about the variable or *************** do { \ *** 1566,1594 **** #define FUNCTION_NAME_P(NAME) (*(NAME) == '@') - #define ENCODE_SECTION_INFO(DECL)\ - do \ - { if (TEXT_SPACE_P (DECL)) \ - { rtx _rtl; \ - if (TREE_CODE (DECL) == FUNCTION_DECL \ - || TREE_CODE (DECL) == VAR_DECL) \ - _rtl = DECL_RTL (DECL); \ - else \ - _rtl = TREE_CST_RTL (DECL); \ - SYMBOL_REF_FLAG (XEXP (_rtl, 0)) = 1; \ - if (TREE_CODE (DECL) == FUNCTION_DECL) \ - hppa_encode_label (XEXP (DECL_RTL (DECL), 0));\ - } \ - } \ - while (0) - - /* Store the user-specified part of SYMBOL_NAME in VAR. - This is sort of inverse to ENCODE_SECTION_INFO. */ - - #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ - (VAR) = ((SYMBOL_NAME) \ - + (*(SYMBOL_NAME) == '*' || *(SYMBOL_NAME) == '@')) - /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ #define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? TImode : DImode) --- 1539,1544 ---- *************** while (0) *** 1644,1654 **** between pointers and any other objects of this machine mode. */ #define Pmode word_mode - /* Add any extra modes needed to represent the condition code. - - HPPA floating comparisons produce condition codes. */ - #define EXTRA_CC_MODES CC(CCFPmode, "CCFP") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. CC_NOOVmode should be used when the first operand is a --- 1594,1599 ---- *************** while (0) *** 1800,1806 **** `assemble_name' uses this. */ #define ASM_OUTPUT_LABELREF(FILE,NAME) \ ! fprintf ((FILE), "%s", (NAME) + (FUNCTION_NAME_P (NAME) ? 1 : 0)) /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ --- 1745,1760 ---- `assemble_name' uses this. */ #define ASM_OUTPUT_LABELREF(FILE,NAME) \ ! do { \ ! const char *xname = (NAME); \ ! if (FUNCTION_NAME_P (NAME)) \ ! xname += 1; \ ! if (xname[0] == '*') \ ! xname += 1; \ ! else \ ! fputs (user_label_prefix, FILE); \ ! fputs (xname, FILE); \ ! } while (0) /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ *************** while (0) *** 1816,1832 **** #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM)) ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do { \ ! /* We only handle DATA objects here, functions are globalized in \ ! ASM_DECLARE_FUNCTION_NAME. */ \ ! if (! FUNCTION_NAME_P (NAME)) \ ! { \ ! fputs ("\t.EXPORT ", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs (",DATA\n", FILE); \ ! } \ ! } while (0) #define ASM_OUTPUT_ASCII(FILE, P, SIZE) \ output_ascii ((FILE), (P), (SIZE)) --- 1770,1776 ---- #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM)) ! #define TARGET_ASM_GLOBALIZE_LABEL pa_globalize_label #define ASM_OUTPUT_ASCII(FILE, P, SIZE) \ output_ascii ((FILE), (P), (SIZE)) *************** while (0) *** 2041,2043 **** --- 1985,1991 ---- {"cmpib_comparison_operator", {EQ, NE, LT, LE, LEU, \ GT, GTU, GE}}, \ {"movb_comparison_operator", {EQ, NE, LT, GE}}, + + /* We need a libcall to canonicalize function pointers on TARGET_ELF32. */ + #define CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL \ + "__canonicalize_funcptr_for_compare" diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-hiux.h gcc-3.3/gcc/config/pa/pa-hiux.h *** gcc-3.2.3/gcc/config/pa/pa-hiux.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-hiux.h 2002-09-22 19:23:19.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for HI-UX. ! Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for HI-UX. ! Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 21,26 **** /* HIUX is just a HPUX variant. We can simply use the HPUX configuration for just about everything. */ ! /* Predefines are the one noteworthy difference between HPUX and HIUX. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Dunix -D__H3050R -D__H3050RX -Asystem=unix -Asystem=hiux -Acpu=hppa -Amachine=hppa" --- 21,76 ---- /* HIUX is just a HPUX variant. We can simply use the HPUX configuration for just about everything. */ ! /* OS cpp builtins are the one noteworthy difference between HPUX and HIUX. ! The following defines are similar to those for hpux10 with the addition ! of __H3050R and __H3050RX. */ ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_assert ("system=hiux"); \ ! builtin_assert ("system=unix"); \ ! builtin_define ("__hp9000s800"); \ ! builtin_define ("__hp9000s800__"); \ ! builtin_define ("__hiux"); \ ! builtin_define ("__hiux__"); \ ! builtin_define ("__unix"); \ ! builtin_define ("__unix__"); \ ! builtin_define ("__H3050R"); \ ! builtin_define ("__H3050RX"); \ ! if (c_language == clk_cplusplus) \ ! { \ ! builtin_define ("_HIUX_SOURCE"); \ ! builtin_define ("_INCLUDE_LONGLONG"); \ ! } \ ! else if (!flag_iso) \ ! { \ ! builtin_define ("_HIUX_SOURCE"); \ ! if (preprocessing_trad_p ()) \ ! { \ ! builtin_define ("hp9000s800"); \ ! builtin_define ("hppa"); \ ! builtin_define ("hiux"); \ ! builtin_define ("unix"); \ ! builtin_define ("__CLASSIC_C__"); \ ! builtin_define ("_PWB"); \ ! builtin_define ("PWB"); \ ! } \ ! else \ ! builtin_define ("__STDC_EXT__"); \ ! } \ ! if (TARGET_SIO) \ ! builtin_define ("_SIO"); \ ! else \ ! { \ ! builtin_define ("__hp9000s700"); \ ! builtin_define ("__hp9000s700__"); \ ! builtin_define ("_WSIO"); \ ! } \ ! } \ ! while (0) ! ! #undef SUBTARGET_SWITCHES ! #define SUBTARGET_SWITCHES \ ! { "sio", MASK_SIO, N_("Generate cpp defines for server IO") }, \ ! { "wsio", -MASK_SIO, N_("Generate cpp defines for workstation IO") }, diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-hpux10.h gcc-3.3/gcc/config/pa/pa-hpux10.h *** gcc-3.2.3/gcc/config/pa/pa-hpux10.h 2001-05-16 16:08:41.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-hpux10.h 2003-04-11 18:57:56.000000000 +0000 *************** *** 1,5 **** ! /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 ! Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. Contributed by Tim Moore (moore@defmacro.cs.utah.edu) This file is part of GNU CC. --- 1,6 ---- ! /* Definitions of target machine for GNU compiler, for HP PA-RISC ! Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002 ! Free Software Foundation, Inc. Contributed by Tim Moore (moore@defmacro.cs.utah.edu) This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,24 **** --- 20,71 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_assert ("system=hpux"); \ + builtin_assert ("system=unix"); \ + builtin_define ("__hp9000s800"); \ + builtin_define ("__hp9000s800__"); \ + builtin_define ("__hpux"); \ + builtin_define ("__hpux__"); \ + builtin_define ("__unix"); \ + builtin_define ("__unix__"); \ + if (c_language == clk_cplusplus) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + builtin_define ("_INCLUDE_LONGLONG"); \ + } \ + else if (!flag_iso) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + if (preprocessing_trad_p ()) \ + { \ + builtin_define ("hp9000s800"); \ + builtin_define ("hppa"); \ + builtin_define ("hpux"); \ + builtin_define ("unix"); \ + builtin_define ("__CLASSIC_C__"); \ + builtin_define ("_PWB"); \ + builtin_define ("PWB"); \ + } \ + else \ + builtin_define ("__STDC_EXT__"); \ + } \ + if (TARGET_SIO) \ + builtin_define ("_SIO"); \ + else \ + { \ + builtin_define ("__hp9000s700"); \ + builtin_define ("__hp9000s700__"); \ + builtin_define ("_WSIO"); \ + } \ + } \ + while (0) + + #define CPP_SPEC "%{threads: -D_REENTRANT -D_DCE_THREADS}" + /* We can debug dynamically linked executables on hpux9; we also want dereferencing of a NULL pointer to cause a SEGV. */ #undef LINK_SPEC *************** Boston, MA 02111-1307, USA. */ *** 35,44 **** #define LIB_SPEC \ "%{!shared:\ %{!p:%{!pg:\ ! %{!threads:-lc}\ %{threads:-lcma -lc_r}}}\ ! %{p: -L/lib/libp/ -lc}\ ! %{pg: -L/lib/libp/ -lc}}" #undef THREAD_MODEL_SPEC #define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}" --- 82,93 ---- #define LIB_SPEC \ "%{!shared:\ %{!p:%{!pg:\ ! %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\ %{threads:-lcma -lc_r}}}\ ! %{p: -L/lib/libp/ -lc\ ! %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\ ! %{pg: -L/lib/libp/ -lc\ ! %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}" #undef THREAD_MODEL_SPEC #define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}" diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-hpux11.h gcc-3.3/gcc/config/pa/pa-hpux11.h *** gcc-3.2.3/gcc/config/pa/pa-hpux11.h 2001-04-13 05:34:06.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-hpux11.h 2003-04-11 18:57:56.000000000 +0000 *************** *** 1,5 **** ! /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 ! Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- ! /* Definitions of target machine for GNU compiler, for HP PA-RISC ! Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,32 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* We can debug dynamically linked executables on hpux11; we also want dereferencing of a NULL pointer to cause a SEGV. */ #undef LINK_SPEC #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1) #define LINK_SPEC \ ! "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" #else #define LINK_SPEC \ ! "-z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" #endif /* Like the default, except no -lg. */ --- 18,84 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_assert ("system=hpux"); \ + builtin_assert ("system=unix"); \ + builtin_define ("__hp9000s800"); \ + builtin_define ("__hp9000s800__"); \ + builtin_define ("__hpux"); \ + builtin_define ("__hpux__"); \ + builtin_define ("__unix"); \ + builtin_define ("__unix__"); \ + if (c_language == clk_cplusplus) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + builtin_define ("_INCLUDE_LONGLONG"); \ + } \ + else \ + { \ + if (!flag_iso) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + if (preprocessing_trad_p ()) \ + { \ + builtin_define ("hp9000s800"); \ + builtin_define ("hppa"); \ + builtin_define ("hpux"); \ + builtin_define ("unix"); \ + builtin_define ("__CLASSIC_C__"); \ + builtin_define ("_PWB"); \ + builtin_define ("PWB"); \ + } \ + else \ + builtin_define ("__STDC_EXT__"); \ + } \ + if (!TARGET_64BIT) \ + builtin_define ("_ILP32"); \ + } \ + if (TARGET_SIO) \ + builtin_define ("_SIO"); \ + else \ + { \ + builtin_define ("__hp9000s700"); \ + builtin_define ("__hp9000s700__"); \ + builtin_define ("_WSIO"); \ + } \ + } \ + while (0) + /* We can debug dynamically linked executables on hpux11; we also want dereferencing of a NULL pointer to cause a SEGV. */ #undef LINK_SPEC #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1) #define LINK_SPEC \ ! "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z\ ! %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\ ! %{static:-a archive} %{shared:-b}" #else #define LINK_SPEC \ ! "-z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\ ! %{static:-a archive} %{shared:-b}" #endif /* Like the default, except no -lg. */ *************** Boston, MA 02111-1307, USA. */ *** 34,43 **** #define LIB_SPEC \ "%{!shared:\ %{!p:%{!pg:\ ! %{!threads:-lc}\ %{threads:-lcma -lc_r}}}\ ! %{p: -L/lib/libp/ -lc}\ ! %{pg: -L/lib/libp/ -lc}}" /* Under hpux11, the normal location of the `ld' and `as' programs is the /usr/ccs/bin directory. */ --- 86,97 ---- #define LIB_SPEC \ "%{!shared:\ %{!p:%{!pg:\ ! %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\ %{threads:-lcma -lc_r}}}\ ! %{p: -L/lib/libp/ -lc\ ! %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\ ! %{pg: -L/lib/libp/ -lc\ ! %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}" /* Under hpux11, the normal location of the `ld' and `as' programs is the /usr/ccs/bin directory. */ *************** Boston, MA 02111-1307, USA. */ *** 68,70 **** --- 122,142 ---- #define SIZE_TYPE "long unsigned int" #define PTRDIFF_TYPE "long int" + + /* HP-UX 11.0 and above provides initialization and finalization function + support from linker command line. We don't need to invoke __main to run + constructors. We also don't need chatr to determine the dependencies of + dynamically linked executables and shared libraries. */ + #undef LDD_SUFFIX + #undef PARSE_LDD_OUTPUT + #undef HAS_INIT_SECTION + #define HAS_INIT_SECTION 1 + #undef LD_INIT_SWITCH + #define LD_INIT_SWITCH "+init" + #undef LD_FINI_SWITCH + #define LD_FINI_SWITCH "+fini" + + /* The HP-UX 11.X SOM linker (ld32) can successfully link shared libraries + with secondary definition (weak) symbols. */ + #undef TARGET_SOM_SDEF + #define TARGET_SOM_SDEF 1 diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-hpux7.h gcc-3.3/gcc/config/pa/pa-hpux7.h *** gcc-3.2.3/gcc/config/pa/pa-hpux7.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-hpux7.h 2002-09-22 19:23:19.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for HP-UX. ! Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for HP-UX. ! Copyright (C) 1991, 1995, 1996, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 29,37 **** #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}" - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -Asystem=unix -Asystem=hpux -Acpu=hppa -Amachine=hppa" --- 29,86 ---- #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_assert ("system=hpux"); \ + builtin_assert ("system=unix"); \ + builtin_define ("__hp9000s800"); \ + builtin_define ("__hp9000s800__"); \ + builtin_define ("__hp9k8"); \ + builtin_define ("__hp9k8__"); \ + builtin_define ("__hpux"); \ + builtin_define ("__hpux__"); \ + builtin_define ("__unix"); \ + builtin_define ("__unix__"); \ + if (c_language == clk_cplusplus) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + builtin_define ("_INCLUDE_LONGLONG"); \ + } \ + else if (!flag_iso) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + if (preprocessing_trad_p ()) \ + { \ + builtin_define ("hp9000s800"); \ + builtin_define ("hp9k8"); \ + builtin_define ("hppa"); \ + builtin_define ("hpux"); \ + builtin_define ("unix"); \ + builtin_define ("__CLASSIC_C__"); \ + builtin_define ("_PWB"); \ + builtin_define ("PWB"); \ + } \ + else \ + builtin_define ("__STDC_EXT__"); \ + } \ + if (TARGET_SIO) \ + builtin_define ("_SIO"); \ + else \ + { \ + builtin_define ("__hp9000s700"); \ + builtin_define ("__hp9000s700__"); \ + builtin_define ("_WSIO"); \ + } \ + } \ + while (0) + + #undef SUBTARGET_SWITCHES + #define SUBTARGET_SWITCHES \ + { "sio", MASK_SIO, N_("Generate cpp defines for server IO") }, \ + { "wsio", -MASK_SIO, N_("Generate cpp defines for workstation IO") }, + /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}" diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-hpux.h gcc-3.3/gcc/config/pa/pa-hpux.h *** gcc-3.2.3/gcc/config/pa/pa-hpux.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-hpux.h 2003-03-19 05:07:26.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for HP-UX. ! Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for HP-UX. ! Copyright (C) 1991, 1995, 1996, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 28,40 **** #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}" - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -Asystem=unix -Asystem=hpux -Acpu=hppa -Amachine=hppa" - #undef LINK_SPEC #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) #define LINK_SPEC \ --- 28,89 ---- #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_assert ("system=hpux"); \ + builtin_assert ("system=unix"); \ + builtin_define ("__hp9000s800"); \ + builtin_define ("__hp9000s800__"); \ + builtin_define ("__hp9k8"); \ + builtin_define ("__hp9k8__"); \ + builtin_define ("__hpux"); \ + builtin_define ("__hpux__"); \ + builtin_define ("__unix"); \ + builtin_define ("__unix__"); \ + if (c_language == clk_cplusplus) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + builtin_define ("_INCLUDE_LONGLONG"); \ + } \ + else if (!flag_iso) \ + { \ + builtin_define ("_HPUX_SOURCE"); \ + if (preprocessing_trad_p ()) \ + { \ + builtin_define ("hp9000s800"); \ + builtin_define ("hp9k8"); \ + builtin_define ("hppa"); \ + builtin_define ("hpux"); \ + builtin_define ("unix"); \ + builtin_define ("__CLASSIC_C__"); \ + builtin_define ("_PWB"); \ + builtin_define ("PWB"); \ + } \ + else \ + builtin_define ("__STDC_EXT__"); \ + } \ + if (TARGET_SIO) \ + builtin_define ("_SIO"); \ + else \ + { \ + builtin_define ("__hp9000s700"); \ + builtin_define ("__hp9000s700__"); \ + builtin_define ("_WSIO"); \ + } \ + } \ + while (0) + + #undef SUBTARGET_SWITCHES + #define SUBTARGET_SWITCHES \ + { "sio", MASK_SIO, N_("Generate cpp defines for server IO") }, \ + { "wsio", -MASK_SIO, N_("Generate cpp defines for workstation IO") }, + /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}" #undef LINK_SPEC #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) #define LINK_SPEC \ *************** Boston, MA 02111-1307, USA. */ *** 47,49 **** --- 96,107 ---- /* hpux8 and later have C++ compatible include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C + + /* hpux11 and earlier don't have fputc_unlocked, so we must inhibit the + transformation of fputs_unlocked and fprintf_unlocked to fputc_unlocked. */ + #define DONT_HAVE_FPUTC_UNLOCKED + + /* We want the entry value of SP saved in the frame marker for + compatibility with the HP-UX unwind library. */ + #undef TARGET_HPUX_UNWIND_LIBRARY + #define TARGET_HPUX_UNWIND_LIBRARY 1 diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-linux.h gcc-3.3/gcc/config/pa/pa-linux.h *** gcc-3.2.3/gcc/config/pa/pa-linux.h 2003-01-19 19:07:34.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-linux.h 2002-12-10 10:55:31.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 18,40 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* Wide characters are signed. */ - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 ! /* Use DWARF2 debugging info and unwind. */ ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! #define DWARF2_ASM_LINE_DEBUG_INFO 1 ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__hppa__ -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix -Acpu=hppa -Amachine=hppa -Amachine=bigendian" #undef LIB_SPEC #define LIB_SPEC \ ! "%{shared: -lgcc -lc} \ ! %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ ! %{shared-libgcc: -lgcc} %{profile:-lc_p} %{!profile: -lc}}" #undef ASM_SPEC #define ASM_SPEC \ --- 18,79 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* A C expression whose value is RTL representing the location of the ! incoming return address at the beginning of any function, before the ! prologue. You only need to define this macro if you want to support ! call frame debugging information like that provided by DWARF 2. */ ! #define INCOMING_RETURN_ADDR_RTX (gen_rtx_REG (word_mode, 2)) ! #define DWARF_FRAME_RETURN_COLUMN (DWARF_FRAME_REGNUM (2)) ! /* This macro chooses the encoding of pointers embedded in the exception ! handling sections. If at all possible, this should be defined such ! that the exception handling section will not require dynamic relocations, ! and so may be read-only. ! ! FIXME: We use DW_EH_PE_aligned to output a PLABEL constructor for ! global function pointers. */ ! #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ ! (CODE == 2 && GLOBAL ? DW_EH_PE_aligned : DW_EH_PE_absptr) ! ! /* Handle special EH pointer encodings. Absolute, pc-relative, and ! indirect are handled automatically. Since pc-relative encoding is ! not possible on the PA and we don't have the infrastructure for ! data relative encoding, we use aligned plabels for global function ! pointers. */ ! #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \ ! do { \ ! if (((ENCODING) & 0x0F) == DW_EH_PE_aligned) \ ! { \ ! fputs (integer_asm_op (SIZE, FALSE), FILE); \ ! fputs ("P%", FILE); \ ! assemble_name (FILE, XSTR (ADDR, 0)); \ ! goto DONE; \ ! } \ ! } while (0) ! ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__ELF__"); \ ! builtin_define ("__gnu_linux__"); \ ! builtin_define_std ("linux"); \ ! builtin_define_std ("unix"); \ ! builtin_assert ("machine=bigendian"); \ ! builtin_assert ("system=posix"); \ ! builtin_assert ("system=unix"); \ ! } \ ! while (0) ! ! #undef CPP_SPEC ! #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}" #undef LIB_SPEC #define LIB_SPEC \ ! "%{pthread:-lpthread} \ ! %{shared:-lgcc -lc} \ ! %{!shared:%{mieee-fp:-lieee} %{shared-libgcc:-lgcc} %{profile:-lc_p}%{!profile:-lc}}" #undef ASM_SPEC #define ASM_SPEC \ *************** Boston, MA 02111-1307, USA. */ *** 52,72 **** %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{static:-static}}" - /* Sibcalls are ok. */ - #undef FUNCTION_OK_FOR_SIBCALL - #define FUNCTION_OK_FOR_SIBCALL(x) 1 - /* glibc's profiling functions don't need gcc to allocate counters. */ #define NO_PROFILE_COUNTERS 1 - /* Put plabels into the data section so we can relocate them. */ - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \ - if (flag_pic && function_label_operand (RTX, MODE)) \ - data_section (); \ - else \ - readonly_data_section (); - /* Define the strings used for the special svr4 .type and .size directives. These strings generally do not vary from one system running svr4 to another, but if a given system (e.g. m88k running svr) needs to use --- 91,99 ---- *************** Boston, MA 02111-1307, USA. */ *** 104,121 **** } \ while (0) - /* Output a definition */ - #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ - do \ - { \ - fprintf ((FILE), "\t%s\t", SET_ASM_OP); \ - assemble_name (FILE, LABEL1); \ - fprintf (FILE, ","); \ - assemble_name (FILE, LABEL2); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - /* We want local labels to start with period if made with asm_fprintf. */ #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." --- 131,136 ---- *************** Boston, MA 02111-1307, USA. */ *** 140,164 **** else \ fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE) ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! #undef ASM_OUTPUT_LABEL - #define ASM_OUTPUT_LABEL(FILE, NAME) \ - do \ - { \ - assemble_name (FILE, NAME); \ - fputs (":\n", FILE); \ - } \ - while (0) /* NOTE: ASM_OUTPUT_INTERNAL_LABEL() is defined for us by elfos.h, and does what we want (i.e. uses colons). It must be compatible with ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */ ! #undef ASM_GLOBALIZE_LABEL ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE)) /* FIXME: Hacked from the one so that we avoid multiple labels in a function declaration (since pa.c seems determined to do --- 155,171 ---- else \ fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE) ! /* Use the default. */ #undef ASM_OUTPUT_LABEL /* NOTE: ASM_OUTPUT_INTERNAL_LABEL() is defined for us by elfos.h, and does what we want (i.e. uses colons). It must be compatible with ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */ ! /* Use the default. */ ! #undef TARGET_ASM_GLOBALIZE_LABEL ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP ".globl " /* FIXME: Hacked from the one so that we avoid multiple labels in a function declaration (since pa.c seems determined to do *************** Boston, MA 02111-1307, USA. */ *** 168,182 **** #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do \ { \ ! fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ } \ while (0) /* Linux always uses gas. */ #undef TARGET_GAS #define TARGET_GAS 1 --- 175,198 ---- #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do \ { \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ } \ while (0) + /* As well as globalizing the label, we need to encode the label + to ensure a plabel is generated in an indirect call. */ + + #undef ASM_OUTPUT_EXTERNAL_LIBCALL + #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ + do \ + { \ + if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \ + hppa_encode_label (FUN); \ + (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \ + } \ + while (0) + /* Linux always uses gas. */ #undef TARGET_GAS #define TARGET_GAS 1 diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa.md gcc-3.3/gcc/config/pa/pa.md *** gcc-3.2.3/gcc/config/pa/pa.md 2003-02-07 22:59:30.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa.md 2003-04-23 22:10:30.000000000 +0000 *************** *** 1,6 **** ;;- Machine description for HP PA-RISC architecture for GNU C compiler ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ! ;; 2002 Free Software Foundation, Inc. ;; Contributed by the Center for Software Science at the University ;; of Utah. --- 1,6 ---- ;;- Machine description for HP PA-RISC architecture for GNU C compiler ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ! ;; 2002, 2003 Free Software Foundation, Inc. ;; Contributed by the Center for Software Science at the University ;; of Utah. *************** *** 44,50 **** ;; ;; FIXME: Add 800 scheduling for completeness? ! (define_attr "cpu" "700,7100,7100LC,7200,8000" (const (symbol_ref "pa_cpu_attr"))) ;; Length (in # of bytes). (define_attr "length" "" --- 44,50 ---- ;; ;; FIXME: Add 800 scheduling for completeness? ! (define_attr "cpu" "700,7100,7100LC,7200,7300,8000" (const (symbol_ref "pa_cpu_attr"))) ;; Length (in # of bytes). (define_attr "length" "" *************** *** 105,116 **** (define_delay (eq_attr "type" "call") [(eq_attr "in_call_delay" "true") (nil) (nil)]) ! ;; millicode call delay slot description. Note it disallows delay slot ! ;; when TARGET_PORTABLE_RUNTIME is true. (define_delay (eq_attr "type" "milli") ! [(and (eq_attr "in_call_delay" "true") ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))) ! (nil) (nil)]) ;; Return and other similar instructions. (define_delay (eq_attr "type" "branch,parallel_branch") --- 105,113 ---- (define_delay (eq_attr "type" "call") [(eq_attr "in_call_delay" "true") (nil) (nil)]) ! ;; Millicode call delay slot description. (define_delay (eq_attr "type" "milli") ! [(eq_attr "in_call_delay" "true") (nil) (nil)]) ;; Return and other similar instructions. (define_delay (eq_attr "type" "branch,parallel_branch") *************** *** 139,173 **** (const_int 0))) [(eq_attr "in_branch_delay" "true") (nil) (nil)]) - ;; Function units of the HPPA. The following data is for the 700 CPUs - ;; (Mustang CPU + Timex FPU aka PA-89) because that's what I have the docs for. - ;; Scheduling instructions for PA-83 machines according to the Snake - ;; constraints shouldn't hurt. - - ;; (define_function_unit {name} {num-units} {n-users} {test} - ;; {ready-delay} {issue-delay} [{conflict-list}]) - - ;; The integer ALU. - ;; (Noted only for documentation; units that take one cycle do not need to - ;; be specified.) - - ;; (define_function_unit "alu" 1 0 - ;; (and (eq_attr "type" "unary,shift,nullshift,binary,move,address") - ;; (eq_attr "cpu" "700")) - ;; 1 0) - - ;; Memory. Disregarding Cache misses, the Mustang memory times are: ;; load: 2, fpload: 3 ;; store, fpstore: 3, no D-cache operations should be scheduled. - (define_function_unit "pa700memory" 1 0 - (and (eq_attr "type" "load,fpload") - (eq_attr "cpu" "700")) 2 0) - (define_function_unit "pa700memory" 1 0 - (and (eq_attr "type" "store,fpstore") - (eq_attr "cpu" "700")) 3 3) - ;; The Timex (aka 700) has two floating-point units: ALU, and MUL/DIV/SQRT. ;; Timings: ;; Instruction Time Unit Minimum Distance (unit contention) --- 136,145 ---- *************** *** 186,231 **** ;; fdiv,dbl 12 MPY 12 ;; fsqrt,sgl 14 MPY 14 ;; fsqrt,dbl 18 MPY 18 ! (define_function_unit "pa700fp_alu" 1 0 (and (eq_attr "type" "fpcc") ! (eq_attr "cpu" "700")) 4 2) ! (define_function_unit "pa700fp_alu" 1 0 (and (eq_attr "type" "fpalu") ! (eq_attr "cpu" "700")) 3 2) ! (define_function_unit "pa700fp_mpy" 1 0 (and (eq_attr "type" "fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "700")) 3 2) ! (define_function_unit "pa700fp_mpy" 1 0 (and (eq_attr "type" "fpdivsgl") ! (eq_attr "cpu" "700")) 10 10) ! (define_function_unit "pa700fp_mpy" 1 0 (and (eq_attr "type" "fpdivdbl") ! (eq_attr "cpu" "700")) 12 12) ! (define_function_unit "pa700fp_mpy" 1 0 (and (eq_attr "type" "fpsqrtsgl") ! (eq_attr "cpu" "700")) 14 14) ! (define_function_unit "pa700fp_mpy" 1 0 (and (eq_attr "type" "fpsqrtdbl") ! (eq_attr "cpu" "700")) 18 18) ;; Function units for the 7100 and 7150. The 7100/7150 can dual-issue ;; floating point computations with non-floating point computations (fp loads ;; and stores are not fp computations). ;; - ;; Memory. Disregarding Cache misses, memory loads take two cycles; stores also ;; take two cycles, during which no Dcache operations should be scheduled. ;; Any special cases are handled in pa_adjust_cost. The 7100, 7150 and 7100LC ;; all have the same memory characteristics if one disregards cache misses. ! (define_function_unit "pa7100memory" 1 0 ! (and (eq_attr "type" "load,fpload") ! (eq_attr "cpu" "7100,7100LC")) 2 0) ! (define_function_unit "pa7100memory" 1 0 ! (and (eq_attr "type" "store,fpstore") ! (eq_attr "cpu" "7100,7100LC")) 2 2) ! ;; The 7100/7150 has three floating-point units: ALU, MUL, and DIV. ;; Timings: ;; Instruction Time Unit Minimum Distance (unit contention) ;; fcpy 2 ALU 1 --- 158,257 ---- ;; fdiv,dbl 12 MPY 12 ;; fsqrt,sgl 14 MPY 14 ;; fsqrt,dbl 18 MPY 18 + ;; + ;; We don't model fmpyadd/fmpysub properly as those instructions + ;; keep both the FP ALU and MPY units busy. Given that these + ;; processors are obsolete, I'm not going to spend the time to + ;; model those instructions correctly. ! (define_automaton "pa700") ! (define_cpu_unit "dummy_700,mem_700,fpalu_700,fpmpy_700" "pa700") ! ! (define_insn_reservation "W0" 4 (and (eq_attr "type" "fpcc") ! (eq_attr "cpu" "700")) ! "fpalu_700*2") ! ! (define_insn_reservation "W1" 3 (and (eq_attr "type" "fpalu") ! (eq_attr "cpu" "700")) ! "fpalu_700*2") ! ! (define_insn_reservation "W2" 3 (and (eq_attr "type" "fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "700")) ! "fpmpy_700*2") ! ! (define_insn_reservation "W3" 10 (and (eq_attr "type" "fpdivsgl") ! (eq_attr "cpu" "700")) ! "fpmpy_700*10") ! ! (define_insn_reservation "W4" 12 (and (eq_attr "type" "fpdivdbl") ! (eq_attr "cpu" "700")) ! "fpmpy_700*12") ! ! (define_insn_reservation "W5" 14 (and (eq_attr "type" "fpsqrtsgl") ! (eq_attr "cpu" "700")) ! "fpmpy_700*14") ! ! (define_insn_reservation "W6" 18 (and (eq_attr "type" "fpsqrtdbl") ! (eq_attr "cpu" "700")) ! "fpmpy_700*18") ! ! (define_insn_reservation "W7" 2 ! (and (eq_attr "type" "load") ! (eq_attr "cpu" "700")) ! "mem_700") ! ! (define_insn_reservation "W8" 2 ! (and (eq_attr "type" "fpload") ! (eq_attr "cpu" "700")) ! "mem_700") ! ! (define_insn_reservation "W9" 3 ! (and (eq_attr "type" "store") ! (eq_attr "cpu" "700")) ! "mem_700*3") ! ! (define_insn_reservation "W10" 3 ! (and (eq_attr "type" "fpstore") ! (eq_attr "cpu" "700")) ! "mem_700*3") ! ! (define_insn_reservation "W11" 1 ! (and (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,load,fpload,store,fpstore") ! (eq_attr "cpu" "700")) ! "dummy_700") ! ! ;; We have a bypass for all computations in the FP unit which feed an ! ;; FP store as long as the sizes are the same. ! (define_bypass 2 "W1,W2" "W10" "hppa_fpstore_bypass_p") ! (define_bypass 9 "W3" "W10" "hppa_fpstore_bypass_p") ! (define_bypass 11 "W4" "W10" "hppa_fpstore_bypass_p") ! (define_bypass 13 "W5" "W10" "hppa_fpstore_bypass_p") ! (define_bypass 17 "W6" "W10" "hppa_fpstore_bypass_p") ! ! ;; We have an "anti-bypass" for FP loads which feed an FP store. ! (define_bypass 4 "W8" "W10" "hppa_fpstore_bypass_p") ;; Function units for the 7100 and 7150. The 7100/7150 can dual-issue ;; floating point computations with non-floating point computations (fp loads ;; and stores are not fp computations). ;; ;; Memory. Disregarding Cache misses, memory loads take two cycles; stores also ;; take two cycles, during which no Dcache operations should be scheduled. ;; Any special cases are handled in pa_adjust_cost. The 7100, 7150 and 7100LC ;; all have the same memory characteristics if one disregards cache misses. ! ;; ;; The 7100/7150 has three floating-point units: ALU, MUL, and DIV. + ;; There's no value in modeling the ALU and MUL separately though + ;; since there can never be a functional unit conflict given the + ;; latency and issue rates for those units. + ;; ;; Timings: ;; Instruction Time Unit Minimum Distance (unit contention) ;; fcpy 2 ALU 1 *************** *** 244,283 **** ;; fsqrt,sgl 8 DIV 8 ;; fsqrt,dbl 15 DIV 15 ! (define_function_unit "pa7100fp_alu" 1 0 ! (and (eq_attr "type" "fpcc,fpalu") ! (eq_attr "cpu" "7100")) 2 1) ! (define_function_unit "pa7100fp_mpy" 1 0 ! (and (eq_attr "type" "fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "7100")) 2 1) ! (define_function_unit "pa7100fp_div" 1 0 (and (eq_attr "type" "fpdivsgl,fpsqrtsgl") ! (eq_attr "cpu" "7100")) 8 8) ! (define_function_unit "pa7100fp_div" 1 0 (and (eq_attr "type" "fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100")) 15 15) ! ;; To encourage dual issue we define function units corresponding to ! ;; the instructions which can be dual issued. This is a rather crude ! ;; approximation, the "pa7100nonflop" test in particular could be refined. ! (define_function_unit "pa7100flop" 1 1 ! (and ! (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100")) 1 1) ! (define_function_unit "pa7100nonflop" 1 1 ! (and ! (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100")) 1 1) ! ;; Memory subsystem works just like 7100/7150 (except for cache miss times which ! ;; we don't model here). ;; The 7100LC has three floating-point units: ALU, MUL, and DIV. ! ;; Note divides and sqrt flops lock the cpu until the flop is ! ;; finished. fmpy and xmpyu (fmpyi) lock the cpu for one cycle. ! ;; There's no way to avoid the penalty. ;; Timings: ;; Instruction Time Unit Minimum Distance (unit contention) ;; fcpy 2 ALU 1 --- 270,333 ---- ;; fsqrt,sgl 8 DIV 8 ;; fsqrt,dbl 15 DIV 15 ! (define_automaton "pa7100") ! (define_cpu_unit "i_7100, f_7100,fpmac_7100,fpdivsqrt_7100,mem_7100" "pa7100") ! ! (define_insn_reservation "X0" 2 ! (and (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "7100")) ! "f_7100,fpmac_7100") ! ! (define_insn_reservation "X1" 8 (and (eq_attr "type" "fpdivsgl,fpsqrtsgl") ! (eq_attr "cpu" "7100")) ! "f_7100+fpdivsqrt_7100,fpdivsqrt_7100*7") ! ! (define_insn_reservation "X2" 15 (and (eq_attr "type" "fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100")) ! "f_7100+fpdivsqrt_7100,fpdivsqrt_7100*14") ! (define_insn_reservation "X3" 2 ! (and (eq_attr "type" "load") ! (eq_attr "cpu" "7100")) ! "i_7100+mem_7100") ! (define_insn_reservation "X4" 2 ! (and (eq_attr "type" "fpload") ! (eq_attr "cpu" "7100")) ! "i_7100+mem_7100") + (define_insn_reservation "X5" 2 + (and (eq_attr "type" "store") + (eq_attr "cpu" "7100")) + "i_7100+mem_7100,mem_7100") ! (define_insn_reservation "X6" 2 ! (and (eq_attr "type" "fpstore") ! (eq_attr "cpu" "7100")) ! "i_7100+mem_7100,mem_7100") ! ! (define_insn_reservation "X7" 1 ! (and (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl,load,fpload,store,fpstore") ! (eq_attr "cpu" "7100")) ! "i_7100") ! ! ;; We have a bypass for all computations in the FP unit which feed an ! ;; FP store as long as the sizes are the same. ! (define_bypass 1 "X0" "X6" "hppa_fpstore_bypass_p") ! (define_bypass 7 "X1" "X6" "hppa_fpstore_bypass_p") ! (define_bypass 14 "X2" "X6" "hppa_fpstore_bypass_p") ! ! ;; We have an "anti-bypass" for FP loads which feed an FP store. ! (define_bypass 3 "X4" "X6" "hppa_fpstore_bypass_p") ;; The 7100LC has three floating-point units: ALU, MUL, and DIV. ! ;; There's no value in modeling the ALU and MUL separately though ! ;; since there can never be a functional unit conflict that ! ;; can be avoided given the latency, issue rates and mandatory ! ;; one cycle cpu-wide lock for a double precision fp multiply. ! ;; ;; Timings: ;; Instruction Time Unit Minimum Distance (unit contention) ;; fcpy 2 ALU 1 *************** *** 299,404 **** ;; fdiv,dbl 15 DIV 15 ;; fsqrt,sgl 8 DIV 8 ;; fsqrt,dbl 15 DIV 15 ! (define_function_unit "pa7100LCfp_alu" 1 0 ! (and (eq_attr "type" "fpcc,fpalu") ! (eq_attr "cpu" "7100LC,7200")) 2 1) ! (define_function_unit "pa7100LCfp_mpy" 1 0 ! (and (eq_attr "type" "fpmulsgl") ! (eq_attr "cpu" "7100LC,7200")) 2 1) ! (define_function_unit "pa7100LCfp_mpy" 1 0 ! (and (eq_attr "type" "fpmuldbl") ! (eq_attr "cpu" "7100LC,7200")) 3 2) ! (define_function_unit "pa7100LCfp_div" 1 0 ! (and (eq_attr "type" "fpdivsgl,fpsqrtsgl") ! (eq_attr "cpu" "7100LC,7200")) 8 8) ! (define_function_unit "pa7100LCfp_div" 1 0 ! (and (eq_attr "type" "fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100LC,7200")) 15 15) ! ;; Define the various functional units for dual-issue. ! ;; There's only one floating point unit. ! (define_function_unit "pa7100LCflop" 1 1 ! (and ! (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100LC,7200")) 1 1) ! ;; Shifts and memory ops execute in only one of the integer ALUs ! (define_function_unit "pa7100LCshiftmem" 1 1 ! (and ! (eq_attr "type" "shift,nullshift,load,fpload,store,fpstore") ! (eq_attr "cpu" "7100LC,7200")) 1 1) ! ;; We have two basic ALUs. ! (define_function_unit "pa7100LCalu" 2 1 ! (and ! (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100LC,7200")) 1 1) ! ;; I don't have complete information on the PA7200; however, most of ! ;; what I've heard makes it look like a 7100LC without the store-store ! ;; penalty. So that's how we'll model it. ! ;; Memory. Disregarding Cache misses, memory loads and stores take ! ;; two cycles. Any special cases are handled in pa_adjust_cost. ! (define_function_unit "pa7200memory" 1 0 ! (and (eq_attr "type" "load,fpload,store,fpstore") ! (eq_attr "cpu" "7200")) 2 0) ! ;; I don't have detailed information on the PA7200 FP pipeline, so I ! ;; treat it just like the 7100LC pipeline. ! ;; Similarly for the multi-issue fake units. - ;; ;; Scheduling for the PA8000 is somewhat different than scheduling for a ;; traditional architecture. ;; ;; The PA8000 has a large (56) entry reorder buffer that is split between ;; memory and non-memory operations. ;; ! ;; The PA800 can issue two memory and two non-memory operations per cycle to ! ;; the function units. Similarly, the PA8000 can retire two memory and two ! ;; non-memory operations per cycle. ;; ;; Given the large reorder buffer, the processor can hide most latencies. ;; According to HP, they've got the best results by scheduling for retirement ;; bandwidth with limited latency scheduling for floating point operations. ;; Latency for integer operations and memory references is ignored. ;; - ;; We claim floating point operations have a 2 cycle latency and are - ;; fully pipelined, except for div and sqrt which are not pipelined. ;; ! ;; It is not necessary to define the shifter and integer alu units. ;; ! ;; These first two define_unit_unit descriptions model retirement from ! ;; the reorder buffer. ! (define_function_unit "pa8000lsu" 2 1 ! (and ! (eq_attr "type" "load,fpload,store,fpstore") ! (eq_attr "cpu" "8000")) 1 1) ! (define_function_unit "pa8000alu" 2 1 (and ! (eq_attr "type" "!load,fpload,store,fpstore") ! (eq_attr "cpu" "8000")) 1 1) ! ;; Claim floating point ops have a 2 cycle latency, excluding div and ! ;; sqrt, which are not pipelined and issue to different units. ! (define_function_unit "pa8000fmac" 2 0 (and ! (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "8000")) 2 1) ! (define_function_unit "pa8000fdiv" 2 1 (and ! (eq_attr "type" "fpdivsgl,fpsqrtsgl") ! (eq_attr "cpu" "8000")) 17 17) ! (define_function_unit "pa8000fdiv" 2 1 (and ! (eq_attr "type" "fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "8000")) 31 31) ;; Compare instructions. --- 349,547 ---- ;; fdiv,dbl 15 DIV 15 ;; fsqrt,sgl 8 DIV 8 ;; fsqrt,dbl 15 DIV 15 + ;; + ;; The PA7200 is just like the PA7100LC except that there is + ;; no store-store penalty. + ;; + ;; The PA7300 is just like the PA7200 except that there is + ;; no store-load penalty. + ;; + ;; Note there are some aspects of the 7100LC we are not modeling + ;; at the moment. I'll be reviewing the 7100LC scheduling info + ;; shortly and updating this description. + ;; + ;; load-load pairs + ;; store-store pairs + ;; other issue modeling ! (define_automaton "pa7100lc") ! (define_cpu_unit "i0_7100lc, i1_7100lc, f_7100lc" "pa7100lc") ! (define_cpu_unit "fpmac_7100lc" "pa7100lc") ! (define_cpu_unit "mem_7100lc" "pa7100lc") ! ;; Double precision multiplies lock the entire CPU for one ! ;; cycle. There is no way to avoid this lock and trying to ! ;; schedule around the lock is pointless and thus there is no ! ;; value in trying to model this lock. ! ;; ! ;; Not modeling the lock allows us to treat fp multiplies just ! ;; like any other FP alu instruction. It allows for a smaller ! ;; DFA and may reduce register pressure. ! (define_insn_reservation "Y0" 2 ! (and (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "7100LC,7200,7300")) ! "f_7100lc,fpmac_7100lc") ! ;; fp division and sqrt instructions lock the entire CPU for ! ;; 7 cycles (single precision) or 14 cycles (double precision). ! ;; There is no way to avoid this lock and trying to schedule ! ;; around the lock is pointless and thus there is no value in ! ;; trying to model this lock. Not modeling the lock allows ! ;; for a smaller DFA and may reduce register pressure. ! (define_insn_reservation "Y1" 1 ! (and (eq_attr "type" "fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100LC,7200,7300")) ! "f_7100lc") ! (define_insn_reservation "Y2" 2 ! (and (eq_attr "type" "load") ! (eq_attr "cpu" "7100LC,7200,7300")) ! "i1_7100lc+mem_7100lc") ! (define_insn_reservation "Y3" 2 ! (and (eq_attr "type" "fpload") ! (eq_attr "cpu" "7100LC,7200,7300")) ! "i1_7100lc+mem_7100lc") ! (define_insn_reservation "Y4" 2 ! (and (eq_attr "type" "store") ! (eq_attr "cpu" "7100LC")) ! "i1_7100lc+mem_7100lc,mem_7100lc") ! (define_insn_reservation "Y5" 2 ! (and (eq_attr "type" "fpstore") ! (eq_attr "cpu" "7100LC")) ! "i1_7100lc+mem_7100lc,mem_7100lc") ! (define_insn_reservation "Y6" 1 ! (and (eq_attr "type" "shift,nullshift") ! (eq_attr "cpu" "7100LC,7200,7300")) ! "i1_7100lc") ! ! (define_insn_reservation "Y7" 1 ! (and (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl,load,fpload,store,fpstore,shift,nullshift") ! (eq_attr "cpu" "7100LC,7200,7300")) ! "(i0_7100lc|i1_7100lc)") ! ! ;; The 7200 has a store-load penalty ! (define_insn_reservation "Y8" 2 ! (and (eq_attr "type" "store") ! (eq_attr "cpu" "7200")) ! "i1_7100lc,mem_7100lc") ! ! (define_insn_reservation "Y9" 2 ! (and (eq_attr "type" "fpstore") ! (eq_attr "cpu" "7200")) ! "i1_7100lc,mem_7100lc") ! ! ;; The 7300 has no penalty for store-store or store-load ! (define_insn_reservation "Y10" 2 ! (and (eq_attr "type" "store") ! (eq_attr "cpu" "7300")) ! "i1_7100lc") ! ! (define_insn_reservation "Y11" 2 ! (and (eq_attr "type" "fpstore") ! (eq_attr "cpu" "7300")) ! "i1_7100lc") ! ! ;; We have an "anti-bypass" for FP loads which feed an FP store. ! (define_bypass 3 "Y3" "Y5,Y9,Y11" "hppa_fpstore_bypass_p") ;; Scheduling for the PA8000 is somewhat different than scheduling for a ;; traditional architecture. ;; ;; The PA8000 has a large (56) entry reorder buffer that is split between ;; memory and non-memory operations. ;; ! ;; The PA8000 can issue two memory and two non-memory operations per cycle to ! ;; the function units, with the exception of branches and multi-output ! ;; instructions. The PA8000 can retire two non-memory operations per cycle ! ;; and two memory operations per cycle, only one of which may be a store. ;; ;; Given the large reorder buffer, the processor can hide most latencies. ;; According to HP, they've got the best results by scheduling for retirement ;; bandwidth with limited latency scheduling for floating point operations. ;; Latency for integer operations and memory references is ignored. ;; ;; ! ;; We claim floating point operations have a 2 cycle latency and are ! ;; fully pipelined, except for div and sqrt which are not pipelined and ! ;; take from 17 to 31 cycles to complete. ;; ! ;; It's worth noting that there is no way to saturate all the functional ! ;; units on the PA8000 as there is not enough issue bandwidth. ! (define_automaton "pa8000") ! (define_cpu_unit "inm0_8000, inm1_8000, im0_8000, im1_8000" "pa8000") ! (define_cpu_unit "rnm0_8000, rnm1_8000, rm0_8000, rm1_8000" "pa8000") ! (define_cpu_unit "store_8000" "pa8000") ! (define_cpu_unit "f0_8000, f1_8000" "pa8000") ! (define_cpu_unit "fdivsqrt0_8000, fdivsqrt1_8000" "pa8000") ! (define_reservation "inm_8000" "inm0_8000 | inm1_8000") ! (define_reservation "im_8000" "im0_8000 | im1_8000") ! (define_reservation "rnm_8000" "rnm0_8000 | rnm1_8000") ! (define_reservation "rm_8000" "rm0_8000 | rm1_8000") ! (define_reservation "f_8000" "f0_8000 | f1_8000") ! (define_reservation "fdivsqrt_8000" "fdivsqrt0_8000 | fdivsqrt1_8000") ! ! ;; We can issue any two memops per cycle, but we can only retire ! ;; one memory store per cycle. We assume that the reorder buffer ! ;; will hide any memory latencies per HP's recommendation. ! (define_insn_reservation "Z0" 0 (and ! (eq_attr "type" "load,fpload") ! (eq_attr "cpu" "8000")) ! "im_8000,rm_8000") ! (define_insn_reservation "Z1" 0 (and ! (eq_attr "type" "store,fpstore") ! (eq_attr "cpu" "8000")) ! "im_8000,rm_8000+store_8000") ! ;; We can issue and retire two non-memory operations per cycle with ! ;; a few exceptions (branches). This group catches those we want ! ;; to assume have zero latency. ! (define_insn_reservation "Z2" 0 (and ! (eq_attr "type" "!load,fpload,store,fpstore,uncond_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch,fpcc,fpalu,fpmulsgl,fpmuldbl,fpsqrtsgl,fpsqrtdbl,fpdivsgl,fpdivdbl") ! (eq_attr "cpu" "8000")) ! "inm_8000,rnm_8000") ! ;; Branches use both slots in the non-memory issue and ! ;; retirement unit. ! (define_insn_reservation "Z3" 0 (and ! (eq_attr "type" "uncond_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch") ! (eq_attr "cpu" "8000")) ! "inm0_8000+inm1_8000,rnm0_8000+rnm1_8000") ! ! ;; We partial latency schedule the floating point units. ! ;; They can issue/retire two at a time in the non-memory ! ;; units. We fix their latency at 2 cycles and they ! ;; are fully pipelined. ! (define_insn_reservation "Z4" 1 ! (and ! (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "8000")) ! "inm_8000,f_8000,rnm_8000") ! ! ;; The fdivsqrt units are not pipelined and have a very long latency. ! ;; To keep the DFA from exploding, we do not show all the ! ;; reservations for the divsqrt unit. ! (define_insn_reservation "Z5" 17 ! (and ! (eq_attr "type" "fpdivsgl,fpsqrtsgl") ! (eq_attr "cpu" "8000")) ! "inm_8000,fdivsqrt_8000*6,rnm_8000") ! ! (define_insn_reservation "Z6" 31 ! (and ! (eq_attr "type" "fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "8000")) ! "inm_8000,fdivsqrt_8000*6,rnm_8000") ! ;; Compare instructions. *************** *** 482,487 **** --- 625,664 ---- [(set_attr "length" "4") (set_attr "type" "fpcc")]) + ;; Provide a means to emit the movccfp0 and movccfp1 optimization + ;; placeholders. This is necessary in rare situations when a + ;; placeholder is re-emitted (see PR 8705). + + (define_expand "movccfp" + [(set (reg:CCFP 0) + (match_operand 0 "const_int_operand" ""))] + "! TARGET_SOFT_FLOAT" + " + { + if ((unsigned HOST_WIDE_INT) INTVAL (operands[0]) > 1) + FAIL; + }") + + ;; The following patterns are optimization placeholders. In almost + ;; all cases, the user of the condition code will be simplified and the + ;; original condition code setting insn should be eliminated. + + (define_insn "*movccfp0" + [(set (reg:CCFP 0) + (const_int 0))] + "! TARGET_SOFT_FLOAT" + "fcmp,dbl,= %%fr0,%%fr0" + [(set_attr "length" "4") + (set_attr "type" "fpcc")]) + + (define_insn "*movccfp1" + [(set (reg:CCFP 0) + (const_int 1))] + "! TARGET_SOFT_FLOAT" + "fcmp,dbl,!= %%fr0,%%fr0" + [(set_attr "length" "4") + (set_attr "type" "fpcc")]) + ;; scc insns. (define_expand "seq" *************** *** 2281,2297 **** "" "* { - rtx label_rtx = gen_label_rtx (); rtx xoperands[3]; extern FILE *asm_out_file; xoperands[0] = operands[0]; xoperands[1] = operands[1]; ! xoperands[2] = label_rtx; output_asm_insn (\"{bl|b,l} .+8,%0\", xoperands); output_asm_insn (\"{depi|depwi} 0,31,2,%0\", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ! CODE_LABEL_NUMBER (label_rtx)); /* If we're trying to load the address of a label that happens to be close, then we can use a shorter sequence. */ --- 2458,2476 ---- "" "* { rtx xoperands[3]; extern FILE *asm_out_file; xoperands[0] = operands[0]; xoperands[1] = operands[1]; ! if (TARGET_SOM || ! TARGET_GAS) ! xoperands[2] = gen_label_rtx (); ! output_asm_insn (\"{bl|b,l} .+8,%0\", xoperands); output_asm_insn (\"{depi|depwi} 0,31,2,%0\", xoperands); ! if (TARGET_SOM || ! TARGET_GAS) ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ! CODE_LABEL_NUMBER (xoperands[2])); /* If we're trying to load the address of a label that happens to be close, then we can use a shorter sequence. */ *************** *** 2302,2313 **** { /* Prefixing with R% here is wrong, it extracts just 11 bits and is always non-negative. */ ! output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands); } else { ! output_asm_insn (\"addil L%%%1-%2,%0\", xoperands); ! output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands); } return \"\"; }" --- 2481,2504 ---- { /* Prefixing with R% here is wrong, it extracts just 11 bits and is always non-negative. */ ! if (TARGET_SOM || ! TARGET_GAS) ! output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands); ! else ! output_asm_insn (\"ldo %1-$PIC_pcrel$0+8(%0),%0\", xoperands); } else { ! if (TARGET_SOM || ! TARGET_GAS) ! { ! output_asm_insn (\"addil L%%%1-%2,%0\", xoperands); ! output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands); ! } ! else ! { ! output_asm_insn (\"addil L%%%1-$PIC_pcrel$0+8,%0\", xoperands); ! output_asm_insn (\"ldo R%%%1-$PIC_pcrel$0+12(%0),%0\", ! xoperands); ! } } return \"\"; }" *************** *** 3909,3935 **** "!TARGET_64BIT" "* return output_mul_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (cond [ ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 4) ! ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 24) ! ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 20)] ! ! ;; Out of reach, can use ble ! (const_int 12)))]) (define_insn "" [(set (reg:SI 29) (mult:SI (reg:SI 26) (reg:SI 25))) --- 4100,4106 ---- "!TARGET_64BIT" "* return output_mul_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_insn "" [(set (reg:SI 29) (mult:SI (reg:SI 26) (reg:SI 25))) *************** *** 3940,3946 **** "TARGET_64BIT" "* return output_mul_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (const_int 4))]) (define_expand "muldi3" [(set (match_operand:DI 0 "register_operand" "") --- 4111,4117 ---- "TARGET_64BIT" "* return output_mul_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_expand "muldi3" [(set (match_operand:DI 0 "register_operand" "") *************** *** 4031,4057 **** "* return output_div_insn (operands, 0, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (cond [ ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 4) ! ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 24) ! ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 20)] ! ! ;; Out of reach, can use ble ! (const_int 12)))]) (define_insn "" [(set (reg:SI 29) --- 4202,4208 ---- "* return output_div_insn (operands, 0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_insn "" [(set (reg:SI 29) *************** *** 4065,4071 **** "* return output_div_insn (operands, 0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (const_int 4))]) (define_expand "udivsi3" [(set (reg:SI 26) (match_operand:SI 1 "move_operand" "")) --- 4216,4222 ---- "* return output_div_insn (operands, 0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_expand "udivsi3" [(set (reg:SI 26) (match_operand:SI 1 "move_operand" "")) *************** *** 4081,4086 **** --- 4232,4238 ---- " { operands[3] = gen_reg_rtx (SImode); + if (TARGET_64BIT) { operands[5] = gen_rtx_REG (SImode, 2); *************** *** 4107,4133 **** "* return output_div_insn (operands, 1, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (cond [ ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 4) ! ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 24) ! ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 20)] ! ! ;; Out of reach, can use ble ! (const_int 12)))]) (define_insn "" [(set (reg:SI 29) --- 4259,4265 ---- "* return output_div_insn (operands, 1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_insn "" [(set (reg:SI 29) *************** *** 4141,4147 **** "* return output_div_insn (operands, 1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (const_int 4))]) (define_expand "modsi3" [(set (reg:SI 26) (match_operand:SI 1 "move_operand" "")) --- 4273,4279 ---- "* return output_div_insn (operands, 1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_expand "modsi3" [(set (reg:SI 26) (match_operand:SI 1 "move_operand" "")) *************** *** 4180,4206 **** "* return output_mod_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (cond [ ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 4) ! ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 24) ! ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 20)] ! ! ;; Out of reach, can use ble ! (const_int 12)))]) (define_insn "" [(set (reg:SI 29) (mod:SI (reg:SI 26) (reg:SI 25))) --- 4312,4318 ---- "* return output_mod_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_insn "" [(set (reg:SI 29) (mod:SI (reg:SI 26) (reg:SI 25))) *************** *** 4213,4219 **** "* return output_mod_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (const_int 4))]) (define_expand "umodsi3" [(set (reg:SI 26) (match_operand:SI 1 "move_operand" "")) --- 4325,4331 ---- "* return output_mod_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_expand "umodsi3" [(set (reg:SI 26) (match_operand:SI 1 "move_operand" "")) *************** *** 4252,4278 **** "* return output_mod_insn (1, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (cond [ ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 4) ! ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 24) ! ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 20)] ! ! ;; Out of reach, can use ble ! (const_int 12)))]) (define_insn "" [(set (reg:SI 29) (umod:SI (reg:SI 26) (reg:SI 25))) --- 4364,4370 ---- "* return output_mod_insn (1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) (define_insn "" [(set (reg:SI 29) (umod:SI (reg:SI 26) (reg:SI 25))) *************** *** 4285,4291 **** "* return output_mod_insn (1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (const_int 4))]) ;;- and instructions ;; We define DImode `and` so with DImode `not` we can get --- 4377,4383 ---- "* return output_mod_insn (1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (symbol_ref "attr_length_millicode_call (insn)"))]) ;;- and instructions ;; We define DImode `and` so with DImode `not` we can get *************** *** 4628,4634 **** emit_insn (gen_negdf2_fast (operands[0], operands[1])); else { ! operands[2] = force_reg (DFmode, immed_real_const_1 (dconstm1, DFmode)); emit_insn (gen_muldf3 (operands[0], operands[1], operands[2])); } DONE; --- 4720,4727 ---- emit_insn (gen_negdf2_fast (operands[0], operands[1])); else { ! operands[2] = force_reg (DFmode, ! CONST_DOUBLE_FROM_REAL_VALUE (dconstm1, DFmode)); emit_insn (gen_muldf3 (operands[0], operands[1], operands[2])); } DONE; *************** *** 4658,4664 **** emit_insn (gen_negsf2_fast (operands[0], operands[1])); else { ! operands[2] = force_reg (SFmode, immed_real_const_1 (dconstm1, SFmode)); emit_insn (gen_mulsf3 (operands[0], operands[1], operands[2])); } DONE; --- 4751,4758 ---- emit_insn (gen_negsf2_fast (operands[0], operands[1])); else { ! operands[2] = force_reg (SFmode, ! CONST_DOUBLE_FROM_REAL_VALUE (dconstm1, SFmode)); emit_insn (gen_mulsf3 (operands[0], operands[1], operands[2])); } DONE; *************** *** 5534,5540 **** [(return) (use (reg:SI 2)) (const_int 1)] ! "! flag_pic" "* { if (TARGET_PA_20) --- 5628,5634 ---- [(return) (use (reg:SI 2)) (const_int 1)] ! "" "* { if (TARGET_PA_20) *************** *** 5544,5564 **** [(set_attr "type" "branch") (set_attr "length" "4")]) ! ;; Use the PIC register to ensure it's restored after a ! ;; call in PIC mode. ! (define_insn "return_internal_pic" [(return) ! (use (match_operand 0 "register_operand" "r")) (use (reg:SI 2))] ! "flag_pic && true_regnum (operands[0]) == PIC_OFFSET_TABLE_REGNUM" ! "* ! { ! if (TARGET_PA_20) ! return \"bve%* (%%r2)\"; ! return \"bv%* %%r0(%%r2)\"; ! }" [(set_attr "type" "branch") ! (set_attr "length" "4")]) (define_expand "prologue" [(const_int 0)] --- 5638,5654 ---- [(set_attr "type" "branch") (set_attr "length" "4")]) ! ;; This is used for eh returns which bypass the return stub. ! (define_insn "return_external_pic" [(return) ! (clobber (reg:SI 1)) (use (reg:SI 2))] ! "!TARGET_NO_SPACE_REGS ! && !TARGET_PA_20 ! && flag_pic && current_function_calls_eh_return" ! "ldsid (%%sr0,%%r2),%%r1\;mtsp %%r1,%%sr0\;be%* 0(%%sr0,%%r2)" [(set_attr "type" "branch") ! (set_attr "length" "12")]) (define_expand "prologue" [(const_int 0)] *************** *** 5582,5598 **** /* Try to use the trivial return first. Else use the full epilogue. */ if (hppa_can_use_return_insn_p ()) ! emit_jump_insn (gen_return ()); else { rtx x; hppa_expand_epilogue (); ! if (flag_pic) ! x = gen_return_internal_pic (gen_rtx_REG (word_mode, ! PIC_OFFSET_TABLE_REGNUM)); else x = gen_return_internal (); emit_jump_insn (x); } DONE; --- 5672,5695 ---- /* Try to use the trivial return first. Else use the full epilogue. */ if (hppa_can_use_return_insn_p ()) ! emit_jump_insn (gen_return ()); else { rtx x; hppa_expand_epilogue (); ! ! /* EH returns bypass the normal return stub. Thus, we must do an ! interspace branch to return from functions that call eh_return. ! This is only a problem for returns from shared code on ports ! using space registers. */ ! if (!TARGET_NO_SPACE_REGS ! && !TARGET_PA_20 ! && flag_pic && current_function_calls_eh_return) ! x = gen_return_external_pic (); else x = gen_return_internal (); + emit_jump_insn (x); } DONE; *************** *** 5638,5645 **** "" "* { - extern int optimize; - if (GET_MODE (insn) == SImode) return \"b %l0%#\"; --- 5735,5740 ---- *************** *** 5648,5708 **** && get_attr_length (insn) != 16) return \"b%* %l0\"; ! /* An unconditional branch which can not reach its target. ! ! We need to be able to use %r1 as a scratch register; however, ! we can never be sure whether or not it's got a live value in ! it. Therefore, we must restore its original value after the ! jump. ! ! To make matters worse, we don't have a stack slot which we ! can always clobber. sp-12/sp-16 shouldn't ever have a live ! value during a non-optimizing compilation, so we use those ! slots for now. We don't support very long branches when ! optimizing -- they should be quite rare when optimizing. ! ! Really the way to go long term is a register scavenger; goto ! the target of the jump and find a register which we can use ! as a scratch to hold the value in %r1. */ ! ! /* We don't know how to register scavenge yet. */ ! if (optimize) ! abort (); ! ! /* First store %r1 into the stack. */ ! output_asm_insn (\"stw %%r1,-16(%%r30)\", operands); ! ! /* Now load the target address into %r1 and do an indirect jump ! to the value specified in %r1. Be careful to generate PIC ! code as needed. */ ! if (flag_pic) ! { ! rtx xoperands[2]; ! xoperands[0] = operands[0]; ! xoperands[1] = gen_label_rtx (); ! ! if (TARGET_SOM || !TARGET_GAS) ! { ! output_asm_insn (\"{bl|b,l} .+8,%%r1\\n\\taddil L'%l0-%l1,%%r1\", ! xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ! CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn (\"ldo R'%l0-%l1(%%r1),%%r1\\n\\tbv %%r0(%%r1)\", ! xoperands); ! } ! else ! { ! output_asm_insn (\"{bl|b,l} .+8,%%r1\", xoperands); ! output_asm_insn (\"addil L'%l0-$PIC_pcrel$0+4,%%r1\", xoperands); ! output_asm_insn (\"ldo R'%l0-$PIC_pcrel$0+8(%%r1),%%r1\", xoperands); ! } ! } ! else ! output_asm_insn (\"ldil L'%l0,%%r1\\n\\tbe R'%l0(%%sr4,%%r1)\", operands);; ! ! /* And restore the value of %r1 in the delay slot. We're not optimizing, ! so we know nothing else can be in the delay slot. */ ! return \"ldw -16(%%r30),%%r1\"; }" [(set_attr "type" "uncond_branch") (set_attr "pa_combine_type" "uncond_branch") --- 5743,5749 ---- && get_attr_length (insn) != 16) return \"b%* %l0\"; ! return output_lbranch (operands[0], insn); }" [(set_attr "type" "uncond_branch") (set_attr "pa_combine_type" "uncond_branch") *************** *** 5797,5804 **** "" " { ! rtx op; ! rtx call_insn; if (TARGET_PORTABLE_RUNTIME) op = force_reg (SImode, XEXP (operands[0], 0)); --- 5838,5845 ---- "" " { ! rtx op, call_insn; ! rtx nb = operands[1]; if (TARGET_PORTABLE_RUNTIME) op = force_reg (SImode, XEXP (operands[0], 0)); *************** *** 5806,5854 **** op = XEXP (operands[0], 0); if (TARGET_64BIT) ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, virtual_outgoing_args_rtx, ! GEN_INT (64))); /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two types of calls use different calling conventions, and CSE might try to change the named call into an indirect call in some cases (using ! two patterns keeps CSE from performing this optimization). */ ! if (GET_CODE (op) == SYMBOL_REF) ! call_insn = emit_call_insn (gen_call_internal_symref (op, operands[1])); ! else if (TARGET_64BIT) { ! rtx tmpreg = force_reg (word_mode, op); ! call_insn = emit_call_insn (gen_call_internal_reg_64bit (tmpreg, ! operands[1])); } else { ! rtx tmpreg = gen_rtx_REG (word_mode, 22); ! emit_move_insn (tmpreg, force_reg (word_mode, op)); ! call_insn = emit_call_insn (gen_call_internal_reg (operands[1])); ! } ! ! if (flag_pic) ! { ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); ! if (TARGET_64BIT) ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), arg_pointer_rtx); ! /* After each call we must restore the PIC register, even if it ! doesn't appear to be used. */ ! emit_move_insn (pic_offset_table_rtx, hppa_pic_save_rtx ()); } DONE; }") ! (define_insn "call_internal_symref" [(call (mem:SI (match_operand 0 "call_operand_address" "")) (match_operand 1 "" "i")) (clobber (reg:SI 2)) (use (const_int 0))] ! "! TARGET_PORTABLE_RUNTIME" "* { output_arg_descriptor (insn); --- 5847,5990 ---- op = XEXP (operands[0], 0); if (TARGET_64BIT) ! { ! if (!virtuals_instantiated) ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, virtual_outgoing_args_rtx, ! GEN_INT (64))); ! else ! { ! /* The loop pass can generate new libcalls after the virtual ! registers are instantiated when fpregs are disabled because ! the only method that we have for doing DImode multiplication ! is with a libcall. This could be trouble if we haven't ! allocated enough space for the outgoing arguments. */ ! if (INTVAL (nb) > current_function_outgoing_args_size) ! abort (); ! ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, stack_pointer_rtx, ! GEN_INT (STACK_POINTER_OFFSET + 64))); ! } ! } /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two types of calls use different calling conventions, and CSE might try to change the named call into an indirect call in some cases (using ! two patterns keeps CSE from performing this optimization). ! ! We now use even more call patterns as there was a subtle bug in ! attempting to restore the pic register after a call using a simple ! move insn. During reload, a instruction involving a pseudo register ! with no explicit dependence on the PIC register can be converted ! to an equivalent load from memory using the PIC register. If we ! emit a simple move to restore the PIC register in the initial rtl ! generation, then it can potentially be repositioned during scheduling. ! and an instruction that eventually uses the PIC register may end up ! between the call and the PIC register restore. ! ! This only worked because there is a post call group of instructions ! that are scheduled with the call. These instructions are included ! in the same basic block as the call. However, calls can throw in ! C++ code and a basic block has to terminate at the call if the call ! can throw. This results in the PIC register restore being scheduled ! independently from the call. So, we now hide the save and restore ! of the PIC register in the call pattern until after reload. Then, ! we split the moves out. A small side benefit is that we now don't ! need to have a use of the PIC register in the return pattern and ! the final save/restore operation is not needed. ! ! I elected to just clobber %r4 in the PIC patterns and use it instead ! of trying to force hppa_pic_save_rtx () to a callee saved register. ! This might have required a new register class and constraint. It ! was also simpler to just handle the restore from a register than a ! generic pseudo. */ ! if (TARGET_64BIT) { ! if (GET_CODE (op) == SYMBOL_REF) ! call_insn = emit_call_insn (gen_call_symref_64bit (op, nb)); ! else ! { ! op = force_reg (word_mode, op); ! call_insn = emit_call_insn (gen_call_reg_64bit (op, nb)); ! } } else { ! if (GET_CODE (op) == SYMBOL_REF) ! { ! if (flag_pic) ! call_insn = emit_call_insn (gen_call_symref_pic (op, nb)); ! else ! call_insn = emit_call_insn (gen_call_symref (op, nb)); ! } ! else ! { ! rtx tmpreg = gen_rtx_REG (word_mode, 22); ! emit_move_insn (tmpreg, force_reg (word_mode, op)); ! if (flag_pic) ! call_insn = emit_call_insn (gen_call_reg_pic (nb)); ! else ! call_insn = emit_call_insn (gen_call_reg (nb)); ! } } + DONE; }") ! ;; We use function calls to set the attribute length of calls and millicode ! ;; calls. This is necessary because of the large variety of call sequences. ! ;; Implementing the calculation in rtl is difficult as well as ugly. As ! ;; we need the same calculation in several places, maintenance becomes a ! ;; nightmare. ! ;; ! ;; However, this has a subtle impact on branch shortening. When the ! ;; expression used to set the length attribute of an instruction depends ! ;; on a relative address (e.g., pc or a branch address), genattrtab ! ;; notes that the insn's length is variable, and attempts to determine a ! ;; worst-case default length and code to compute an insn's current length. ! ! ;; The use of a function call hides the variable dependence of our calls ! ;; and millicode calls. The result is genattrtab doesn't treat the operation ! ;; as variable and it only generates code for the default case using our ! ;; function call. Because of this, calls and millicode calls have a fixed ! ;; length in the branch shortening pass, and some branches will use a longer ! ;; code sequence than necessary. However, the length of any given call ! ;; will still reflect its final code location and it may be shorter than ! ;; the initial length estimate. ! ! ;; It's possible to trick genattrtab by adding an expression involving `pc' ! ;; in the set. However, when genattrtab hits a function call in its attempt ! ;; to compute the default length, it marks the result as unknown and sets ! ;; the default result to MAX_INT ;-( One possible fix that would allow ! ;; calls to participate in branch shortening would be to make the call to ;; insn_default_length a target option. Then, we could massage unknown ;; results. Another fix might be to change genattrtab so that it just does ;; the call in the variable case as it already does for the fixed case. ! ! (define_insn "call_symref" [(call (mem:SI (match_operand 0 "call_operand_address" "")) (match_operand 1 "" "i")) + (clobber (reg:SI 1)) (clobber (reg:SI 2)) (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[0], 0); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 0)"))]) ! ! (define_insn "call_symref_pic" ! [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "i")) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" "* { output_arg_descriptor (insn); *************** *** 5856,5969 **** }" [(set_attr "type" "call") (set (attr "length") ! ;; If we're sure that we can either reach the target or that the ! ;; linker can use a long-branch stub, then the length is 4 bytes. ! ;; ! ;; For long-calls the length will be either 52 bytes (non-pic) ! ;; or 68 bytes (pic). */ ! ;; Else we have to use a long-call; ! (if_then_else (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (const_int 4) ! (if_then_else (eq (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 52) ! (const_int 68))))]) ! (define_insn "call_internal_reg_64bit" ! [(call (mem:SI (match_operand:DI 0 "register_operand" "r")) (match_operand 1 "" "i")) (clobber (reg:SI 2)) ! (use (const_int 1))] "TARGET_64BIT" "* { ! /* ??? Needs more work. Length computation, split into multiple insns, ! do not use %r22 directly, expose delay slot. */ ! return \"ldd 16(%0),%%r2\;ldd 24(%0),%%r27\;bve,l (%%r2),%%r2\;nop\"; }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (const_int 16))]) ! (define_insn "call_internal_reg" [(call (mem:SI (reg:SI 22)) (match_operand 0 "" "i")) (clobber (reg:SI 2)) (use (const_int 1))] ! "" "* { ! rtx xoperands[2]; ! ! /* First the special case for kernels, level 0 systems, etc. */ ! if (TARGET_FAST_INDIRECT_CALLS) ! return \"ble 0(%%sr4,%%r22)\;copy %%r31,%%r2\"; ! /* Now the normal case -- we can reach $$dyncall directly or ! we're sure that we can get there via a long-branch stub. ! No need to check target flags as the length uniquely identifies ! the remaining cases. */ ! if (get_attr_length (insn) == 8) ! return \".CALL\\tARGW0=GR\;{bl|b,l} $$dyncall,%%r31\;copy %%r31,%%r2\"; ! /* Long millicode call, but we are not generating PIC or portable runtime ! code. */ ! if (get_attr_length (insn) == 12) ! return \".CALL\\tARGW0=GR\;ldil L%%$$dyncall,%%r2\;ble R%%$$dyncall(%%sr4,%%r2)\;copy %%r31,%%r2\"; ! /* Long millicode call for portable runtime. */ ! if (get_attr_length (insn) == 20) ! return \"ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr %%r0,%%r2\;bv,n %%r0(%%r31)\;nop\"; ! /* If we're generating PIC code. */ ! xoperands[0] = operands[0]; ! output_asm_insn (\"{bl|b,l} .+8,%%r1\", xoperands); ! if (TARGET_SOM || !TARGET_GAS) ! { ! xoperands[1] = gen_label_rtx (); ! output_asm_insn (\"addil L%%$$dyncall-%1,%%r1\", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ! CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands); ! } ! else ! { ! output_asm_insn (\"addil L%%$$dyncall-$PIC_pcrel$0+4,%%r1\", xoperands); ! output_asm_insn (\"ldo R%%$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1\", ! xoperands); ! } ! output_asm_insn (\"blr %%r0,%%r2\", xoperands); ! output_asm_insn (\"bv,n %%r0(%%r1)\\n\\tnop\", xoperands); ! return \"\"; }" [(set_attr "type" "dyncall") (set (attr "length") ! (cond [ ! ;; First FAST_INDIRECT_CALLS ! (ne (symbol_ref "TARGET_FAST_INDIRECT_CALLS") ! (const_int 0)) ! (const_int 8) ! ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 8) ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 24) ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 20)] ! ;; Out of reach, can use ble ! (const_int 12)))]) (define_expand "call_value" [(parallel [(set (match_operand 0 "" "") --- 5992,6331 ---- }" [(set_attr "type" "call") (set (attr "length") ! (plus (symbol_ref "attr_length_call (insn, 0)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "")) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 0))])] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:SI 4) (reg:SI 19)) ! (parallel [(call (mem:SI (match_dup 0)) ! (match_dup 1)) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 0))]) ! (set (reg:SI 19) (reg:SI 4))] ! "") ! ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "")) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 0))])] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT && reload_completed" ! [(parallel [(call (mem:SI (match_dup 0)) ! (match_dup 1)) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 0))])] ! "") ! ! (define_insn "*call_symref_pic_post_reload" ! [(call (mem:SI (match_operand 0 "call_operand_address" "")) (match_operand 1 "" "i")) + (clobber (reg:SI 1)) (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[0], 0); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 0)"))]) ! ! ;; This pattern is split if it is necessary to save and restore the ! ;; PIC register. ! (define_insn "call_symref_64bit" ! [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "i")) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))] "TARGET_64BIT" "* { ! output_arg_descriptor (insn); ! return output_call (insn, operands[0], 0); }" ! [(set_attr "type" "call") ! (set (attr "length") ! (plus (symbol_ref "attr_length_call (insn, 0)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "")) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))])] ! "TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:DI 4) (reg:DI 27)) ! (parallel [(call (mem:SI (match_dup 0)) ! (match_dup 1)) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))]) ! (set (reg:DI 27) (reg:DI 4))] ! "") ! ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "")) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))])] ! "TARGET_64BIT && reload_completed" ! [(parallel [(call (mem:SI (match_dup 0)) ! (match_dup 1)) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))])] ! "") ! ! (define_insn "*call_symref_64bit_post_reload" ! [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "i")) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))] ! "TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[0], 0); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 0)"))]) ! ! (define_insn "call_reg" [(call (mem:SI (reg:SI 22)) (match_operand 0 "" "i")) + (clobber (reg:SI 1)) (clobber (reg:SI 2)) (use (const_int 1))] ! "!TARGET_64BIT" "* { ! return output_indirect_call (insn, gen_rtx_REG (word_mode, 22)); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (symbol_ref "attr_length_indirect_call (insn)"))]) ! ;; This pattern is split if it is necessary to save and restore the ! ;; PIC register. ! (define_insn "call_reg_pic" ! [(call (mem:SI (reg:SI 22)) ! (match_operand 0 "" "i")) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 1))] ! "!TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, gen_rtx_REG (word_mode, 22)); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") ! (plus (symbol_ref "attr_length_indirect_call (insn)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(call (mem:SI (reg:SI 22)) ! (match_operand 0 "" "")) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 1))])] ! "!TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:SI 4) (reg:SI 19)) ! (parallel [(call (mem:SI (reg:SI 22)) ! (match_dup 0)) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 1))]) ! (set (reg:SI 19) (reg:SI 4))] ! "") ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(call (mem:SI (reg:SI 22)) ! (match_operand 0 "" "")) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 1))])] ! "!TARGET_64BIT && reload_completed" ! [(parallel [(call (mem:SI (reg:SI 22)) ! (match_dup 0)) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 1))])] ! "") ! (define_insn "*call_reg_pic_post_reload" ! [(call (mem:SI (reg:SI 22)) ! (match_operand 0 "" "i")) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 1))] ! "!TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, gen_rtx_REG (word_mode, 22)); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (symbol_ref "attr_length_indirect_call (insn)"))]) ! ;; This pattern is split if it is necessary to save and restore the ! ;; PIC register. ! (define_insn "call_reg_64bit" ! [(call (mem:SI (match_operand:DI 0 "register_operand" "r")) ! (match_operand 1 "" "i")) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))] ! "TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, operands[0]); }" [(set_attr "type" "dyncall") (set (attr "length") ! (plus (symbol_ref "attr_length_indirect_call (insn)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(call (mem:SI (match_operand 0 "register_operand" "")) ! (match_operand 1 "" "")) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))])] ! "TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:DI 4) (reg:DI 27)) ! (parallel [(call (mem:SI (match_dup 0)) ! (match_dup 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))]) ! (set (reg:DI 27) (reg:DI 4))] ! "") ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(call (mem:SI (match_operand 0 "register_operand" "")) ! (match_operand 1 "" "")) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))])] ! "TARGET_64BIT && reload_completed" ! [(parallel [(call (mem:SI (match_dup 0)) ! (match_dup 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))])] ! "") ! (define_insn "*call_reg_64bit_post_reload" ! [(call (mem:SI (match_operand:DI 0 "register_operand" "r")) ! (match_operand 1 "" "i")) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))] ! "TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, operands[0]); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (symbol_ref "attr_length_indirect_call (insn)"))]) (define_expand "call_value" [(parallel [(set (match_operand 0 "" "") *************** *** 5973,6036 **** "" " { ! rtx op; ! rtx call_insn; if (TARGET_PORTABLE_RUNTIME) ! op = force_reg (word_mode, XEXP (operands[1], 0)); else op = XEXP (operands[1], 0); if (TARGET_64BIT) ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, virtual_outgoing_args_rtx, ! GEN_INT (64))); /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two types of calls use different calling conventions, and CSE might try to change the named call into an indirect call in some cases (using ! two patterns keeps CSE from performing this optimization). */ ! if (GET_CODE (op) == SYMBOL_REF) ! call_insn = emit_call_insn (gen_call_value_internal_symref (operands[0], ! op, ! operands[2])); ! else if (TARGET_64BIT) { ! rtx tmpreg = force_reg (word_mode, op); ! call_insn ! = emit_call_insn (gen_call_value_internal_reg_64bit (operands[0], ! tmpreg, ! operands[2])); } else { ! rtx tmpreg = gen_rtx_REG (word_mode, 22); ! emit_move_insn (tmpreg, force_reg (word_mode, op)); ! call_insn = emit_call_insn (gen_call_value_internal_reg (operands[0], ! operands[2])); ! } ! if (flag_pic) ! { ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); ! if (TARGET_64BIT) ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), arg_pointer_rtx); ! /* After each call we must restore the PIC register, even if it ! doesn't appear to be used. */ ! emit_move_insn (pic_offset_table_rtx, hppa_pic_save_rtx ()); } DONE; }") ! (define_insn "call_value_internal_symref" ! [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand 1 "call_operand_address" "")) (match_operand 2 "" "i"))) (clobber (reg:SI 2)) (use (const_int 0))] ! ;;- Don't use operand 1 for most machines. ! "! TARGET_PORTABLE_RUNTIME" "* { output_arg_descriptor (insn); --- 6335,6463 ---- "" " { ! rtx op, call_insn; ! rtx dst = operands[0]; ! rtx nb = operands[2]; if (TARGET_PORTABLE_RUNTIME) ! op = force_reg (SImode, XEXP (operands[1], 0)); else op = XEXP (operands[1], 0); if (TARGET_64BIT) ! { ! if (!virtuals_instantiated) ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, virtual_outgoing_args_rtx, ! GEN_INT (64))); ! else ! { ! /* The loop pass can generate new libcalls after the virtual ! registers are instantiated when fpregs are disabled because ! the only method that we have for doing DImode multiplication ! is with a libcall. This could be trouble if we haven't ! allocated enough space for the outgoing arguments. */ ! if (INTVAL (nb) > current_function_outgoing_args_size) ! abort (); ! ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, stack_pointer_rtx, ! GEN_INT (STACK_POINTER_OFFSET + 64))); ! } ! } /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two types of calls use different calling conventions, and CSE might try to change the named call into an indirect call in some cases (using ! two patterns keeps CSE from performing this optimization). ! ! We now use even more call patterns as there was a subtle bug in ! attempting to restore the pic register after a call using a simple ! move insn. During reload, a instruction involving a pseudo register ! with no explicit dependence on the PIC register can be converted ! to an equivalent load from memory using the PIC register. If we ! emit a simple move to restore the PIC register in the initial rtl ! generation, then it can potentially be repositioned during scheduling. ! and an instruction that eventually uses the PIC register may end up ! between the call and the PIC register restore. ! ! This only worked because there is a post call group of instructions ! that are scheduled with the call. These instructions are included ! in the same basic block as the call. However, calls can throw in ! C++ code and a basic block has to terminate at the call if the call ! can throw. This results in the PIC register restore being scheduled ! independently from the call. So, we now hide the save and restore ! of the PIC register in the call pattern until after reload. Then, ! we split the moves out. A small side benefit is that we now don't ! need to have a use of the PIC register in the return pattern and ! the final save/restore operation is not needed. ! ! I elected to just clobber %r4 in the PIC patterns and use it instead ! of trying to force hppa_pic_save_rtx () to a callee saved register. ! This might have required a new register class and constraint. It ! was also simpler to just handle the restore from a register than a ! generic pseudo. */ ! if (TARGET_64BIT) { ! if (GET_CODE (op) == SYMBOL_REF) ! call_insn = emit_call_insn (gen_call_val_symref_64bit (dst, op, nb)); ! else ! { ! op = force_reg (word_mode, op); ! call_insn = emit_call_insn (gen_call_val_reg_64bit (dst, op, nb)); ! } } else { ! if (GET_CODE (op) == SYMBOL_REF) ! { ! if (flag_pic) ! call_insn = emit_call_insn (gen_call_val_symref_pic (dst, op, nb)); ! else ! call_insn = emit_call_insn (gen_call_val_symref (dst, op, nb)); ! } ! else ! { ! rtx tmpreg = gen_rtx_REG (word_mode, 22); ! emit_move_insn (tmpreg, force_reg (word_mode, op)); ! if (flag_pic) ! call_insn = emit_call_insn (gen_call_val_reg_pic (dst, nb)); ! else ! call_insn = emit_call_insn (gen_call_val_reg (dst, nb)); ! } } + DONE; }") ! (define_insn "call_val_symref" ! [(set (match_operand 0 "" "") (call (mem:SI (match_operand 1 "call_operand_address" "")) (match_operand 2 "" "i"))) + (clobber (reg:SI 1)) (clobber (reg:SI 2)) (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[1], 0); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 0)"))]) ! ! (define_insn "call_val_symref_pic" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" "i"))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" "* { output_arg_descriptor (insn); *************** *** 6038,6153 **** }" [(set_attr "type" "call") (set (attr "length") ! ;; If we're sure that we can either reach the target or that the ! ;; linker can use a long-branch stub, then the length is 4 bytes. ! ;; ! ;; For long-calls the length will be either 52 bytes (non-pic) ! ;; or 68 bytes (pic). */ ! ;; Else we have to use a long-call; ! (if_then_else (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (const_int 4) ! (if_then_else (eq (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 52) ! (const_int 68))))]) ! (define_insn "call_value_internal_reg_64bit" ! [(set (match_operand 0 "" "=rf") ! (call (mem:SI (match_operand:DI 1 "register_operand" "r")) ! (match_operand 2 "" "i"))) (clobber (reg:SI 2)) ! (use (const_int 1))] "TARGET_64BIT" "* { ! /* ??? Needs more work. Length computation, split into multiple insns, ! do not use %r22 directly, expose delay slot. */ ! return \"ldd 16(%1),%%r2\;ldd 24(%1),%%r27\;bve,l (%%r2),%%r2\;nop\"; }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (const_int 16))]) ! (define_insn "call_value_internal_reg" ! [(set (match_operand 0 "" "=rf") (call (mem:SI (reg:SI 22)) (match_operand 1 "" "i"))) (clobber (reg:SI 2)) (use (const_int 1))] ! "" "* { ! rtx xoperands[2]; ! ! /* First the special case for kernels, level 0 systems, etc. */ ! if (TARGET_FAST_INDIRECT_CALLS) ! return \"ble 0(%%sr4,%%r22)\;copy %%r31,%%r2\"; ! /* Now the normal case -- we can reach $$dyncall directly or ! we're sure that we can get there via a long-branch stub. ! No need to check target flags as the length uniquely identifies ! the remaining cases. */ ! if (get_attr_length (insn) == 8) ! return \".CALL\\tARGW0=GR\;{bl|b,l} $$dyncall,%%r31\;copy %%r31,%%r2\"; ! /* Long millicode call, but we are not generating PIC or portable runtime ! code. */ ! if (get_attr_length (insn) == 12) ! return \".CALL\\tARGW0=GR\;ldil L%%$$dyncall,%%r2\;ble R%%$$dyncall(%%sr4,%%r2)\;copy %%r31,%%r2\"; ! /* Long millicode call for portable runtime. */ ! if (get_attr_length (insn) == 20) ! return \"ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr %%r0,%%r2\;bv,n %%r0(%%r31)\;nop\"; ! /* If we're generating PIC code. */ ! xoperands[0] = operands[1]; ! output_asm_insn (\"{bl|b,l} .+8,%%r1\", xoperands); ! if (TARGET_SOM || !TARGET_GAS) ! { ! xoperands[1] = gen_label_rtx (); ! output_asm_insn (\"addil L%%$$dyncall-%1,%%r1\", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ! CODE_LABEL_NUMBER (xoperands[1])); ! output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands); ! } ! else ! { ! output_asm_insn (\"addil L%%$$dyncall-$PIC_pcrel$0+4,%%r1\", xoperands); ! output_asm_insn (\"ldo R%%$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1\", ! xoperands); ! } ! output_asm_insn (\"blr %%r0,%%r2\", xoperands); ! output_asm_insn (\"bv,n %%r0(%%r1)\\n\\tnop\", xoperands); ! return \"\"; }" [(set_attr "type" "dyncall") (set (attr "length") ! (cond [ ! ;; First FAST_INDIRECT_CALLS ! (ne (symbol_ref "TARGET_FAST_INDIRECT_CALLS") ! (const_int 0)) ! (const_int 8) ! ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 8) ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 24) ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 20)] ! ;; Out of reach, can use ble ! (const_int 12)))]) ;; Call subroutine returning any type. --- 6465,6827 ---- }" [(set_attr "type" "call") (set (attr "length") ! (plus (symbol_ref "attr_length_call (insn, 0)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 0))])] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:SI 4) (reg:SI 19)) ! (parallel [(set (match_dup 0) ! (call (mem:SI (match_dup 1)) ! (match_dup 2))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 0))]) ! (set (reg:SI 19) (reg:SI 4))] ! "") ! ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 0))])] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT && reload_completed" ! [(parallel [(set (match_dup 0) ! (call (mem:SI (match_dup 1)) ! (match_dup 2))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 0))])] ! "") ! ! (define_insn "*call_val_symref_pic_post_reload" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" "i"))) ! (clobber (reg:SI 1)) (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[1], 0); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 0)"))]) ! ! ;; This pattern is split if it is necessary to save and restore the ! ;; PIC register. ! (define_insn "call_val_symref_64bit" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" "i"))) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))] "TARGET_64BIT" "* { ! output_arg_descriptor (insn); ! return output_call (insn, operands[1], 0); }" ! [(set_attr "type" "call") ! (set (attr "length") ! (plus (symbol_ref "attr_length_call (insn, 0)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))])] ! "TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:DI 4) (reg:DI 27)) ! (parallel [(set (match_dup 0) ! (call (mem:SI (match_dup 1)) ! (match_dup 2))) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))]) ! (set (reg:DI 27) (reg:DI 4))] ! "") ! ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))])] ! "TARGET_64BIT && reload_completed" ! [(parallel [(set (match_dup 0) ! (call (mem:SI (match_dup 1)) ! (match_dup 2))) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))])] ! "") ! ! (define_insn "*call_val_symref_64bit_post_reload" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" "i"))) ! (clobber (reg:DI 1)) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 0))] ! "TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[1], 0); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 0)"))]) ! ! (define_insn "call_val_reg" ! [(set (match_operand 0 "" "") (call (mem:SI (reg:SI 22)) (match_operand 1 "" "i"))) + (clobber (reg:SI 1)) (clobber (reg:SI 2)) (use (const_int 1))] ! "!TARGET_64BIT" "* { ! return output_indirect_call (insn, gen_rtx_REG (word_mode, 22)); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (symbol_ref "attr_length_indirect_call (insn)"))]) ! ;; This pattern is split if it is necessary to save and restore the ! ;; PIC register. ! (define_insn "call_val_reg_pic" ! [(set (match_operand 0 "" "") ! (call (mem:SI (reg:SI 22)) ! (match_operand 1 "" "i"))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 1))] ! "!TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, gen_rtx_REG (word_mode, 22)); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") ! (plus (symbol_ref "attr_length_indirect_call (insn)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (reg:SI 22)) ! (match_operand 1 "" ""))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 1))])] ! "!TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:SI 4) (reg:SI 19)) ! (parallel [(set (match_dup 0) ! (call (mem:SI (reg:SI 22)) ! (match_dup 1))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 1))]) ! (set (reg:SI 19) (reg:SI 4))] ! "") ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (reg:SI 22)) ! (match_operand 1 "" ""))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 4)) ! (use (reg:SI 19)) ! (use (const_int 1))])] ! "!TARGET_64BIT && reload_completed" ! [(parallel [(set (match_dup 0) ! (call (mem:SI (reg:SI 22)) ! (match_dup 1))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 1))])] ! "") ! (define_insn "*call_val_reg_pic_post_reload" ! [(set (match_operand 0 "" "") ! (call (mem:SI (reg:SI 22)) ! (match_operand 1 "" "i"))) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (use (reg:SI 19)) ! (use (const_int 1))] ! "!TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, gen_rtx_REG (word_mode, 22)); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (symbol_ref "attr_length_indirect_call (insn)"))]) ! ;; This pattern is split if it is necessary to save and restore the ! ;; PIC register. ! (define_insn "call_val_reg_64bit" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:DI 1 "register_operand" "r")) ! (match_operand 2 "" "i"))) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))] ! "TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, operands[1]); }" [(set_attr "type" "dyncall") (set (attr "length") ! (plus (symbol_ref "attr_length_indirect_call (insn)") ! (symbol_ref "attr_length_save_restore_dltp (insn)")))]) ! ;; Split out the PIC register save and restore after reload. This is ! ;; done only if the function returns. As the split is done after reload, ! ;; there are some situations in which we unnecessarily save and restore ! ;; %r4. This happens when there is a single call and the PIC register ! ;; is "dead" after the call. This isn't easy to fix as the usage of ! ;; the PIC register isn't completely determined until the reload pass. ! (define_split ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:DI 1 "register_operand" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))])] ! "TARGET_64BIT ! && reload_completed ! && !find_reg_note (insn, REG_NORETURN, NULL_RTX)" ! [(set (reg:DI 4) (reg:DI 27)) ! (parallel [(set (match_dup 0) ! (call (mem:SI (match_dup 1)) ! (match_dup 2))) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))]) ! (set (reg:DI 27) (reg:DI 4))] ! "") ! ;; Remove the clobber of register 4 when optimizing. This has to be ! ;; done with a peephole optimization rather than a split because the ! ;; split sequence for a call must be longer than one instruction. ! (define_peephole2 ! [(parallel [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:DI 1 "register_operand" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:DI 2)) ! (clobber (reg:DI 4)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))])] ! "TARGET_64BIT && reload_completed" ! [(parallel [(set (match_dup 0) ! (call (mem:SI (match_dup 1)) ! (match_dup 2))) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))])] ! "") ! (define_insn "*call_val_reg_64bit_post_reload" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:DI 1 "register_operand" "r")) ! (match_operand 2 "" "i"))) ! (clobber (reg:DI 2)) ! (use (reg:DI 27)) ! (use (reg:DI 29)) ! (use (const_int 1))] ! "TARGET_64BIT" ! "* ! { ! return output_indirect_call (insn, operands[1]); ! }" ! [(set_attr "type" "dyncall") ! (set (attr "length") (symbol_ref "attr_length_indirect_call (insn)"))]) ;; Call subroutine returning any type. *************** *** 6179,6294 **** }") (define_expand "sibcall" ! [(parallel [(call (match_operand:SI 0 "" "") ! (match_operand 1 "" "")) ! (clobber (reg:SI 0))])] ! "! TARGET_PORTABLE_RUNTIME" " { ! rtx op; ! rtx call_insn; op = XEXP (operands[0], 0); ! /* We do not allow indirect sibling calls. */ ! call_insn = emit_call_insn (gen_sibcall_internal_symref (op, operands[1])); ! ! if (flag_pic) { ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); ! /* After each call we must restore the PIC register, even if it ! doesn't appear to be used. */ ! emit_move_insn (pic_offset_table_rtx, hppa_pic_save_rtx ()); } DONE; }") (define_insn "sibcall_internal_symref" [(call (mem:SI (match_operand 0 "call_operand_address" "")) (match_operand 1 "" "i")) ! (clobber (reg:SI 0)) (use (reg:SI 2)) (use (const_int 0))] ! "! TARGET_PORTABLE_RUNTIME" "* { output_arg_descriptor (insn); return output_call (insn, operands[0], 1); }" [(set_attr "type" "call") ! (set (attr "length") ! ;; If we're sure that we can either reach the target or that the ! ;; linker can use a long-branch stub, then the length is 4 bytes. ! ;; ! ;; For long-calls the length will be either 52 bytes (non-pic) ! ;; or 68 bytes (pic). */ ! ;; Else we have to use a long-call; ! (if_then_else (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (const_int 4) ! (if_then_else (eq (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 52) ! (const_int 68))))]) (define_expand "sibcall_value" ! [(parallel [(set (match_operand 0 "" "") (call (match_operand:SI 1 "" "") ! (match_operand 2 "" ""))) ! (clobber (reg:SI 0))])] ! "! TARGET_PORTABLE_RUNTIME" " { ! rtx op; ! rtx call_insn; op = XEXP (operands[1], 0); ! /* We do not allow indirect sibling calls. */ ! call_insn = emit_call_insn (gen_sibcall_value_internal_symref (operands[0], ! op, ! operands[2])); ! if (flag_pic) { ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); ! /* After each call we must restore the PIC register, even if it ! doesn't appear to be used. */ ! emit_move_insn (pic_offset_table_rtx, hppa_pic_save_rtx ()); } DONE; }") (define_insn "sibcall_value_internal_symref" ! [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand 1 "call_operand_address" "")) (match_operand 2 "" "i"))) ! (clobber (reg:SI 0)) (use (reg:SI 2)) (use (const_int 0))] ! ;;- Don't use operand 1 for most machines. ! "! TARGET_PORTABLE_RUNTIME" "* { output_arg_descriptor (insn); return output_call (insn, operands[1], 1); }" [(set_attr "type" "call") ! (set (attr "length") ! ;; If we're sure that we can either reach the target or that the ! ;; linker can use a long-branch stub, then the length is 4 bytes. ! ;; ! ;; For long-calls the length will be either 52 bytes (non-pic) ! ;; or 68 bytes (pic). */ ! ;; Else we have to use a long-call; ! (if_then_else (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (const_int 4) ! (if_then_else (eq (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 52) ! (const_int 68))))]) (define_insn "nop" [(const_int 0)] --- 6853,7023 ---- }") (define_expand "sibcall" ! [(call (match_operand:SI 0 "" "") ! (match_operand 1 "" ""))] ! "!TARGET_PORTABLE_RUNTIME" " { ! rtx op, call_insn; ! rtx nb = operands[1]; op = XEXP (operands[0], 0); ! if (TARGET_64BIT) { ! if (!virtuals_instantiated) ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, virtual_outgoing_args_rtx, ! GEN_INT (64))); ! else ! { ! /* The loop pass can generate new libcalls after the virtual ! registers are instantiated when fpregs are disabled because ! the only method that we have for doing DImode multiplication ! is with a libcall. This could be trouble if we haven't ! allocated enough space for the outgoing arguments. */ ! if (INTVAL (nb) > current_function_outgoing_args_size) ! abort (); ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, stack_pointer_rtx, ! GEN_INT (STACK_POINTER_OFFSET + 64))); ! } } + + /* Indirect sibling calls are not allowed. */ + if (TARGET_64BIT) + call_insn = gen_sibcall_internal_symref_64bit (op, operands[1]); + else + call_insn = gen_sibcall_internal_symref (op, operands[1]); + + call_insn = emit_call_insn (call_insn); + + if (TARGET_64BIT) + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), arg_pointer_rtx); + + /* We don't have to restore the PIC register. */ + if (flag_pic) + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); + DONE; }") (define_insn "sibcall_internal_symref" [(call (mem:SI (match_operand 0 "call_operand_address" "")) (match_operand 1 "" "i")) ! (clobber (reg:SI 1)) (use (reg:SI 2)) (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" "* { output_arg_descriptor (insn); return output_call (insn, operands[0], 1); }" [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 1)"))]) ! ! (define_insn "sibcall_internal_symref_64bit" ! [(call (mem:SI (match_operand 0 "call_operand_address" "")) ! (match_operand 1 "" "i")) ! (clobber (reg:DI 1)) ! (use (reg:DI 2)) ! (use (const_int 0))] ! "TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[0], 1); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 1)"))]) (define_expand "sibcall_value" ! [(set (match_operand 0 "" "") (call (match_operand:SI 1 "" "") ! (match_operand 2 "" "")))] ! "!TARGET_PORTABLE_RUNTIME" " { ! rtx op, call_insn; ! rtx nb = operands[1]; op = XEXP (operands[1], 0); ! if (TARGET_64BIT) { ! if (!virtuals_instantiated) ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, virtual_outgoing_args_rtx, ! GEN_INT (64))); ! else ! { ! /* The loop pass can generate new libcalls after the virtual ! registers are instantiated when fpregs are disabled because ! the only method that we have for doing DImode multiplication ! is with a libcall. This could be trouble if we haven't ! allocated enough space for the outgoing arguments. */ ! if (INTVAL (nb) > current_function_outgoing_args_size) ! abort (); ! emit_move_insn (arg_pointer_rtx, ! gen_rtx_PLUS (word_mode, stack_pointer_rtx, ! GEN_INT (STACK_POINTER_OFFSET + 64))); ! } } + + /* Indirect sibling calls are not allowed. */ + if (TARGET_64BIT) + call_insn + = gen_sibcall_value_internal_symref_64bit (operands[0], op, operands[2]); + else + call_insn + = gen_sibcall_value_internal_symref (operands[0], op, operands[2]); + + call_insn = emit_call_insn (call_insn); + + if (TARGET_64BIT) + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), arg_pointer_rtx); + + /* We don't have to restore the PIC register. */ + if (flag_pic) + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); + DONE; }") (define_insn "sibcall_value_internal_symref" ! [(set (match_operand 0 "" "") (call (mem:SI (match_operand 1 "call_operand_address" "")) (match_operand 2 "" "i"))) ! (clobber (reg:SI 1)) (use (reg:SI 2)) (use (const_int 0))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" "* { output_arg_descriptor (insn); return output_call (insn, operands[1], 1); }" [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 1)"))]) ! ! (define_insn "sibcall_value_internal_symref_64bit" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand 1 "call_operand_address" "")) ! (match_operand 2 "" "i"))) ! (clobber (reg:DI 1)) ! (use (reg:DI 2)) ! (use (const_int 0))] ! "TARGET_64BIT" ! "* ! { ! output_arg_descriptor (insn); ! return output_call (insn, operands[1], 1); ! }" ! [(set_attr "type" "call") ! (set (attr "length") (symbol_ref "attr_length_call (insn, 1)"))]) (define_insn "nop" [(const_int 0)] *************** *** 6329,6335 **** ;;; EH does longjmp's from and within the data section. Thus, ;;; an interspace branch is required for the longjmp implementation. ! ;;; Registers r1 and r2 are used as scratch registers for the jump. (define_expand "interspace_jump" [(parallel [(set (pc) (match_operand 0 "pmode_register_operand" "a")) --- 7058,7065 ---- ;;; EH does longjmp's from and within the data section. Thus, ;;; an interspace branch is required for the longjmp implementation. ! ;;; Registers r1 and r2 are used as scratch registers for the jump ! ;;; when necessary. (define_expand "interspace_jump" [(parallel [(set (pc) (match_operand 0 "pmode_register_operand" "a")) *************** *** 6343,6348 **** --- 7073,7094 ---- (define_insn "" [(set (pc) (match_operand 0 "pmode_register_operand" "a")) (clobber (reg:SI 2))] + "TARGET_PA_20 && !TARGET_64BIT" + "bve%* (%0)" + [(set_attr "type" "branch") + (set_attr "length" "4")]) + + (define_insn "" + [(set (pc) (match_operand 0 "pmode_register_operand" "a")) + (clobber (reg:SI 2))] + "TARGET_NO_SPACE_REGS && !TARGET_64BIT" + "be%* 0(%%sr4,%0)" + [(set_attr "type" "branch") + (set_attr "length" "4")]) + + (define_insn "" + [(set (pc) (match_operand 0 "pmode_register_operand" "a")) + (clobber (reg:SI 2))] "!TARGET_64BIT" "ldsid (%%sr0,%0),%%r2\; mtsp %%r2,%%sr0\; be%* 0(%%sr0,%0)" [(set_attr "type" "branch") *************** *** 6352,6360 **** [(set (pc) (match_operand 0 "pmode_register_operand" "a")) (clobber (reg:DI 2))] "TARGET_64BIT" ! "ldsid (%%sr0,%0),%%r2\; mtsp %%r2,%%sr0\; be%* 0(%%sr0,%0)" [(set_attr "type" "branch") ! (set_attr "length" "12")]) (define_expand "builtin_longjmp" [(unspec_volatile [(match_operand 0 "register_operand" "r")] 3)] --- 7098,7106 ---- [(set (pc) (match_operand 0 "pmode_register_operand" "a")) (clobber (reg:DI 2))] "TARGET_64BIT" ! "bve%* (%0)" [(set_attr "type" "branch") ! (set_attr "length" "4")]) (define_expand "builtin_longjmp" [(unspec_volatile [(match_operand 0 "register_operand" "r")] 3)] *************** *** 6405,6416 **** "" " { if (TARGET_64BIT) emit_insn (gen_extzv_64 (operands[0], operands[1], operands[2], operands[3])); else ! emit_insn (gen_extzv_32 (operands[0], operands[1], ! operands[2], operands[3])); DONE; }") --- 7151,7171 ---- "" " { + /* PA extraction insns don't support zero length bitfields. */ + if (INTVAL (operands[2]) == 0) + FAIL; + if (TARGET_64BIT) emit_insn (gen_extzv_64 (operands[0], operands[1], operands[2], operands[3])); else ! { ! if (! uint5_operand (operands[2], SImode) ! || ! uint5_operand (operands[3], SImode)) ! FAIL; ! emit_insn (gen_extzv_32 (operands[0], operands[1], ! operands[2], operands[3])); ! } DONE; }") *************** *** 6462,6473 **** "" " { if (TARGET_64BIT) emit_insn (gen_extv_64 (operands[0], operands[1], operands[2], operands[3])); else ! emit_insn (gen_extv_32 (operands[0], operands[1], ! operands[2], operands[3])); DONE; }") --- 7217,7237 ---- "" " { + /* PA extraction insns don't support zero length bitfields. */ + if (INTVAL (operands[2]) == 0) + FAIL; + if (TARGET_64BIT) emit_insn (gen_extv_64 (operands[0], operands[1], operands[2], operands[3])); else ! { ! if (! uint5_operand (operands[2], SImode) ! || ! uint5_operand (operands[3], SImode)) ! FAIL; ! emit_insn (gen_extv_32 (operands[0], operands[1], ! operands[2], operands[3])); ! } DONE; }") *************** *** 6524,6531 **** emit_insn (gen_insv_64 (operands[0], operands[1], operands[2], operands[3])); else ! emit_insn (gen_insv_32 (operands[0], operands[1], ! operands[2], operands[3])); DONE; }") --- 7288,7300 ---- emit_insn (gen_insv_64 (operands[0], operands[1], operands[2], operands[3])); else ! { ! if (! uint5_operand (operands[2], SImode) ! || ! uint5_operand (operands[3], SImode)) ! FAIL; ! emit_insn (gen_insv_32 (operands[0], operands[1], ! operands[2], operands[3])); ! } DONE; }") *************** *** 7144,7152 **** (clobber (reg:SI 31))]) (set (match_operand:SI 0 "register_operand" "") (reg:SI 29))] ! "! TARGET_PORTABLE_RUNTIME && !TARGET_64BIT && !TARGET_ELF32" " { operands[2] = gen_reg_rtx (SImode); if (GET_CODE (operands[1]) != REG) { --- 7913,7932 ---- (clobber (reg:SI 31))]) (set (match_operand:SI 0 "register_operand" "") (reg:SI 29))] ! "!TARGET_PORTABLE_RUNTIME && !TARGET_64BIT" " { + if (TARGET_ELF32) + { + rtx canonicalize_funcptr_for_compare_libfunc + = init_one_libfunc (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL); + + emit_library_call_value (canonicalize_funcptr_for_compare_libfunc, + operands[0], LCT_NORMAL, Pmode, + 1, operands[1], Pmode); + DONE; + } + operands[2] = gen_reg_rtx (SImode); if (GET_CODE (operands[1]) != REG) { *************** *** 7165,7170 **** --- 7945,7956 ---- "!TARGET_64BIT" "* { + int length = get_attr_length (insn); + rtx xoperands[2]; + + xoperands[0] = GEN_INT (length - 8); + xoperands[1] = GEN_INT (length - 16); + /* Must import the magic millicode routine. */ output_asm_insn (\".IMPORT $$sh_func_adrs,MILLICODE\", NULL); *************** *** 7173,7232 **** First, copy our input parameter into %r29 just in case we don't need to call $$sh_func_adrs. */ output_asm_insn (\"copy %%r26,%%r29\", NULL); /* Next, examine the low two bits in %r26, if they aren't 0x2, then we use %r26 unchanged. */ ! if (get_attr_length (insn) == 32) ! output_asm_insn (\"{extru|extrw,u} %%r26,31,2,%%r31\;{comib|cmpib},<>,n 2,%%r31,.+24\", NULL); ! else if (get_attr_length (insn) == 40) ! output_asm_insn (\"{extru|extrw,u} %%r26,31,2,%%r31\;{comib|cmpib},<>,n 2,%%r31,.+32\", NULL); ! else if (get_attr_length (insn) == 44) ! output_asm_insn (\"{extru|extrw,u} %%r26,31,2,%%r31\;{comib|cmpib},<>,n 2,%%r31,.+36\", NULL); ! else ! output_asm_insn (\"{extru|extrw,u} %%r26,31,2,%%r31\;{comib|cmpib},<>,n 2,%%r31,.+20\", NULL); /* Next, compare %r26 with 4096, if %r26 is less than or equal to ! 4096, then we use %r26 unchanged. */ ! if (get_attr_length (insn) == 32) ! output_asm_insn (\"ldi 4096,%%r31\;{comb|cmpb},<<,n %%r26,%%r31,.+16\", ! NULL); ! else if (get_attr_length (insn) == 40) ! output_asm_insn (\"ldi 4096,%%r31\;{comb|cmpb},<<,n %%r26,%%r31,.+24\", ! NULL); ! else if (get_attr_length (insn) == 44) ! output_asm_insn (\"ldi 4096,%%r31\;{comb|cmpb},<<,n %%r26,%%r31,.+28\", ! NULL); ! else ! output_asm_insn (\"ldi 4096,%%r31\;{comb|cmpb},<<,n %%r26,%%r31,.+12\", ! NULL); ! /* Else call $$sh_func_adrs to extract the function's real add24. */ return output_millicode_call (insn, gen_rtx_SYMBOL_REF (SImode, ! \"$$sh_func_adrs\")); }" [(set_attr "type" "multi") (set (attr "length") ! (cond [ ! ;; Target (or stub) within reach ! (and (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0))) ! (const_int 28) ! ! ;; Out of reach PIC ! (ne (symbol_ref "flag_pic") ! (const_int 0)) ! (const_int 44) ! ! ;; Out of reach PORTABLE_RUNTIME ! (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (const_int 40)] ! ! ;; Out of reach, can use ble ! (const_int 32)))]) ;; On the PA, the PIC register is call clobbered, so it must ;; be saved & restored around calls by the caller. If the call --- 7959,7984 ---- First, copy our input parameter into %r29 just in case we don't need to call $$sh_func_adrs. */ output_asm_insn (\"copy %%r26,%%r29\", NULL); + output_asm_insn (\"{extru|extrw,u} %%r26,31,2,%%r31\", NULL); /* Next, examine the low two bits in %r26, if they aren't 0x2, then we use %r26 unchanged. */ ! output_asm_insn (\"{comib|cmpib},<>,n 2,%%r31,.+%0\", xoperands); ! output_asm_insn (\"ldi 4096,%%r31\", NULL); /* Next, compare %r26 with 4096, if %r26 is less than or equal to ! 4096, then again we use %r26 unchanged. */ ! output_asm_insn (\"{comb|cmpb},<<,n %%r26,%%r31,.+%1\", xoperands); ! /* Finally, call $$sh_func_adrs to extract the function's real add24. */ return output_millicode_call (insn, gen_rtx_SYMBOL_REF (SImode, ! \"$$sh_func_adrs\")); }" [(set_attr "type" "multi") (set (attr "length") ! (plus (symbol_ref "attr_length_millicode_call (insn)") ! (const_int 20)))]) ;; On the PA, the PIC register is call clobbered, so it must ;; be saved & restored around calls by the caller. If the call *************** *** 7235,7249 **** ;; restore the PIC register. (define_expand "exception_receiver" [(const_int 4)] ! "!TARGET_PORTABLE_RUNTIME && flag_pic" " { ! /* Load the PIC register from the stack slot (in our caller's ! frame). */ ! emit_move_insn (pic_offset_table_rtx, ! gen_rtx_MEM (SImode, ! plus_constant (stack_pointer_rtx, -32))); ! emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx)); emit_insn (gen_blockage ()); DONE; }") --- 7987,8004 ---- ;; restore the PIC register. (define_expand "exception_receiver" [(const_int 4)] ! "flag_pic" " { ! /* On the 64-bit port, we need a blockage because there is ! confusion regarding the dependence of the restore on the ! frame pointer. As a result, the frame pointer and pic ! register restores sometimes are interchanged erroneously. */ ! if (TARGET_64BIT) ! emit_insn (gen_blockage ()); ! /* Restore the PIC register using hppa_pic_save_rtx (). The ! PIC register is not saved in the frame in 64-bit ABI. */ ! emit_move_insn (pic_offset_table_rtx, hppa_pic_save_rtx ()); emit_insn (gen_blockage ()); DONE; }") *************** *** 7253,7261 **** --- 8008,8054 ---- "flag_pic" " { + if (TARGET_64BIT) + emit_insn (gen_blockage ()); /* Restore the PIC register. Hopefully, this will always be from a stack slot. The only registers that are valid after a builtin_longjmp are the stack and frame pointers. */ emit_move_insn (pic_offset_table_rtx, hppa_pic_save_rtx ()); + emit_insn (gen_blockage ()); + DONE; + }") + + ;; Allocate new stack space and update the saved stack pointer in the + ;; frame marker. The HP C compilers also copy additional words in the + ;; frame marker. The 64-bit compiler copies words at -48, -32 and -24. + ;; The 32-bit compiler copies the word at -16 (Static Link). We + ;; currently don't copy these values. + ;; + ;; Since the copy of the frame marker can't be done atomically, I + ;; suspect that using it for unwind purposes may be somewhat unreliable. + ;; The HP compilers appear to raise the stack and copy the frame + ;; marker in a strict instruction sequence. This suggests that the + ;; unwind library may check for an alloca sequence when ALLOCA_FRAME + ;; is set in the callinfo data. We currently don't set ALLOCA_FRAME + ;; as GAS doesn't support it, or try to keep the instructions emitted + ;; here in strict sequence. + (define_expand "allocate_stack" + [(match_operand 0 "" "") + (match_operand 1 "" "")] + "" + " + { + /* Since the stack grows upward, we need to store virtual_stack_dynamic_rtx + in operand 0 before adjusting the stack. */ + emit_move_insn (operands[0], virtual_stack_dynamic_rtx); + anti_adjust_stack (operands[1]); + if (TARGET_HPUX_UNWIND_LIBRARY) + { + rtx dst = gen_rtx_MEM (word_mode, + gen_rtx_PLUS (word_mode, stack_pointer_rtx, + GEN_INT (TARGET_64BIT ? -8 : -4))); + + emit_move_insn (dst, frame_pointer_rtx); + } DONE; }") diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-modes.def gcc-3.3/gcc/config/pa/pa-modes.def *** gcc-3.2.3/gcc/config/pa/pa-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-modes.def 2002-06-10 22:35:49.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + /* Definitions of target machine for GNU compiler, for the HP Spectrum. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support + and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for + Software Science at the University of Utah. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + + HPPA floating comparisons produce condition codes. */ + + CC (CCFP) + + diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-osf.h gcc-3.3/gcc/config/pa/pa-osf.h *** gcc-3.2.3/gcc/config/pa/pa-osf.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-osf.h 2002-09-22 19:23:19.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 ! Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. Contributed by Tim Moore (moore@defmacro.cs.utah.edu) This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 ! Copyright (C) 1991, 1995, 1996, 2002 Free Software Foundation, Inc. Contributed by Tim Moore (moore@defmacro.cs.utah.edu) This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,30 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef CPP_PREDEFINES ! #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) ! #define CPP_PREDEFINES "-Dhppa -Dunix -Dhp9000 -Dspectrum -DREVARGV -Dhp700 -DHP700 -Dparisc -D__pa_risc -DPARISC -DBYTE_MSF -DBIT_MSF -Asystem=unix -Asystem=mach -Acpu=hppa -Amachine=hppa" ! #else ! #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Dparisc -D__pa_risc -DPARISC -DBYTE_MSF -DBIT_MSF -Asystem=unix -Asystem=mach -Acpu=hppa -Amachine=hppa" ! #endif /* Don't default to pcc-struct-return, because gcc is the only compiler, and we want to retain compatibility with older gcc versions. */ --- 19,52 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! if (TARGET_PA_11) \ ! { \ ! builtin_define_std ("hp700"); \ ! builtin_define_std ("HP700"); \ ! } \ ! else \ ! { \ ! builtin_define_std ("hp800"); \ ! builtin_define_std ("hp9k8"); \ ! builtin_define_std ("hp9000s800"); \ ! } \ ! builtin_define_std ("BIT_MSF"); \ ! builtin_define_std ("BYTE_MSF"); \ ! builtin_define_std ("PARISC"); \ ! builtin_define_std ("REVARGV"); \ ! builtin_define_std ("hp9000"); \ ! builtin_define ("__pa_risc"); \ ! builtin_define_std ("parisc"); \ ! builtin_define_std ("spectrum"); \ ! builtin_define_std ("unix"); \ ! builtin_assert ("system=mach"); \ ! builtin_assert ("system=unix"); \ ! } \ ! while (0) /* Don't default to pcc-struct-return, because gcc is the only compiler, and we want to retain compatibility with older gcc versions. */ diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-pro-end.h gcc-3.3/gcc/config/pa/pa-pro-end.h *** gcc-3.2.3/gcc/config/pa/pa-pro-end.h 2002-04-01 22:45:32.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-pro-end.h 2002-09-22 19:23:19.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for PRO. ! Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for PRO. ! Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 25,37 **** #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}" - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dhppa -DPWB -Acpu=hppa -D__pro__ -Amachine=hppa" - /* hpux8 and later have C++ compatible include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C --- 25,49 ---- #define SIZE_TYPE "unsigned int" #define PTRDIFF_TYPE "int" + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + if (c_language != clk_cplusplus \ + && !flag_iso) \ + { \ + builtin_define ("hppa"); \ + builtin_define_std ("PWB"); \ + } \ + builtin_define ("__pro__"); \ + builtin_assert ("system=pro"); \ + } \ + while (0) + /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}" /* hpux8 and later have C++ compatible include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C diff -Nrc3pad gcc-3.2.3/gcc/config/pa/pa-protos.h gcc-3.3/gcc/config/pa/pa-protos.h *** gcc-3.2.3/gcc/config/pa/pa-protos.h 2003-04-16 23:00:20.000000000 +0000 --- gcc-3.3/gcc/config/pa/pa-protos.h 2003-04-16 17:33:39.000000000 +0000 *************** *** 1,5 **** /* Prototypes for pa.c functions used in the md file & elsewhere. ! Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Prototypes for pa.c functions used in the md file & elsewhere. ! Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** extern int function_label_operand PARAMS *** 31,37 **** extern int lhs_lshift_cint_operand PARAMS ((rtx, enum machine_mode)); #ifdef TREE_CODE ! extern void hppa_va_start PARAMS ((int, tree, rtx)); extern rtx hppa_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ extern rtx hppa_legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); --- 31,37 ---- extern int lhs_lshift_cint_operand PARAMS ((rtx, enum machine_mode)); #ifdef TREE_CODE ! extern void hppa_va_start PARAMS ((tree, rtx)); extern rtx hppa_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ extern rtx hppa_legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); *************** extern const char *output_move_double PA *** 44,49 **** --- 44,50 ---- extern const char *output_fp_move_double PARAMS ((rtx *)); extern const char *output_block_move PARAMS ((rtx *, int)); extern const char *output_cbranch PARAMS ((rtx *, int, int, int, rtx)); + extern const char *output_lbranch PARAMS ((rtx, rtx)); extern const char *output_bb PARAMS ((rtx *, int, int, int, rtx, int)); extern const char *output_bvb PARAMS ((rtx *, int, int, int, rtx, int)); extern const char *output_dbra PARAMS ((rtx *, rtx, int)); *************** extern const char *output_movb PARAMS (( *** 51,56 **** --- 52,58 ---- extern const char *output_parallel_movb PARAMS ((rtx *, int)); extern const char *output_parallel_addb PARAMS ((rtx *, int)); extern const char *output_call PARAMS ((rtx, rtx, int)); + extern const char *output_indirect_call PARAMS ((rtx, rtx)); extern const char *output_millicode_call PARAMS ((rtx, rtx)); extern const char *output_mul_insn PARAMS ((int, rtx)); extern const char *output_div_insn PARAMS ((rtx *, int, rtx)); *************** extern int is_function_label_plus_const *** 104,109 **** --- 106,116 ---- extern int jump_in_call_delay PARAMS ((rtx)); extern enum reg_class secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx)); + extern int hppa_fpstore_bypass_p PARAMS ((rtx, rtx)); + extern int attr_length_millicode_call PARAMS ((rtx)); + extern int attr_length_call PARAMS ((rtx, int)); + extern int attr_length_indirect_call PARAMS ((rtx)); + extern int attr_length_save_restore_dltp PARAMS ((rtx)); /* Declare functions defined in pa.c and used in templates. */ *************** extern int eq_neq_comparison_operator PA *** 125,133 **** extern int insn_refs_are_delayed PARAMS ((rtx)); #endif /* RTX_CODE */ - /* Prototype function used in macro ASM_OUTPUT_MI_THUNK. */ - extern void pa_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - /* Prototype function used in macro CONST_OK_FOR_LETTER_P. */ extern int zdepi_cint_p PARAMS ((unsigned HOST_WIDE_INT)); --- 132,137 ---- *************** extern int reloc_needed PARAMS ((tree)); *** 158,163 **** --- 162,168 ---- #ifdef RTX_CODE extern rtx function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); + extern rtx function_value PARAMS ((tree, tree)); #endif extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, diff -Nrc3pad gcc-3.2.3/gcc/config/pa/quadlib.c gcc-3.3/gcc/config/pa/quadlib.c *** gcc-3.2.3/gcc/config/pa/quadlib.c 2001-04-13 00:12:12.000000000 +0000 --- gcc-3.3/gcc/config/pa/quadlib.c 2002-07-16 19:39:27.000000000 +0000 *************** *** 1,5 **** /* Subroutines for long double support. ! Copyright (C) 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Subroutines for long double support. ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** long double _U_Qfneg (long double); *** 42,47 **** --- 42,48 ---- int __U_Qfcnvfxt_quad_to_sgl (long double); #endif unsigned int _U_Qfcnvfxt_quad_to_usgl(long double); + unsigned long long _U_Qfcnvfxt_quad_to_udbl(long double); int _U_Qfeq (long double a, long double b) *************** _U_Qfcnvfxt_quad_to_usgl(long double a) *** 114,116 **** --- 115,133 ---- extern long long _U_Qfcnvfxt_quad_to_dbl (long double a); return (unsigned int) _U_Qfcnvfxt_quad_to_dbl (a); } + + /* HP only has signed conversion in library, so need to synthesize an + unsigned version */ + typedef union { + long long unsigned int u[2]; + long double d[1]; + } quad_type; + + unsigned long long + _U_Qfcnvfxt_quad_to_udbl(long double a) + { + extern quad_type _U_Qfcnvfxt_quad_to_quad (long double a); + quad_type u; + u = _U_Qfcnvfxt_quad_to_quad(a); + return u.u[1]; + } diff -Nrc3pad gcc-3.2.3/gcc/config/pa/rtems.h gcc-3.3/gcc/config/pa/rtems.h *** gcc-3.2.3/gcc/config/pa/rtems.h 2003-01-29 15:52:11.000000000 +0000 --- gcc-3.3/gcc/config/pa/rtems.h 2003-01-29 14:51:32.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 21,29 **** /* Specify predefined symbols in preprocessor. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Acpu=hppa -Amachine=hppa \ ! -D__rtems__ -Asystem=rtems" #undef LIB_SPEC #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -lc}%{pg: -lc} -N" --- 21,40 ---- /* Specify predefined symbols in preprocessor. */ ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! if (c_language != clk_cplusplus \ ! && !flag_iso) \ ! { \ ! builtin_define ("hppa"); \ ! builtin_define_std ("PWB"); \ ! } \ ! builtin_define ("__rtems__"); \ ! builtin_assert ("system=rtems"); \ ! } \ ! while (0) #undef LIB_SPEC #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -lc}%{pg: -lc} -N" diff -Nrc3pad gcc-3.2.3/gcc/config/pa/som.h gcc-3.3/gcc/config/pa/som.h *** gcc-3.2.3/gcc/config/pa/som.h 2002-12-28 23:27:08.000000000 +0000 --- gcc-3.3/gcc/config/pa/som.h 2003-01-15 23:09:42.000000000 +0000 *************** do { \ *** 131,138 **** that the section name will have a "." prefix. */ #define ASM_OUTPUT_FUNCTION_PREFIX(FILE, NAME) \ { \ ! const char *name; \ ! STRIP_NAME_ENCODING (name, NAME); \ if (TARGET_GAS && in_section == in_text) \ fputs ("\t.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n", FILE); \ else if (TARGET_GAS) \ --- 131,137 ---- that the section name will have a "." prefix. */ #define ASM_OUTPUT_FUNCTION_PREFIX(FILE, NAME) \ { \ ! const char *name = (*targetm.strip_name_encoding) (NAME); \ if (TARGET_GAS && in_section == in_text) \ fputs ("\t.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n", FILE); \ else if (TARGET_GAS) \ *************** do { \ *** 199,208 **** } \ } \ /* anonymous args */ \ ! if ((TYPE_ARG_TYPES (tree_type) != 0 \ ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\ ! != void_type_node)) \ ! || current_function_varargs) \ { \ for (; i < 4; i++) \ fprintf (FILE, ",ARGW%d=GR", i); \ --- 198,206 ---- } \ } \ /* anonymous args */ \ ! if (TYPE_ARG_TYPES (tree_type) != 0 \ ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\ ! != void_type_node)) \ { \ for (; i < 4; i++) \ fprintf (FILE, ",ARGW%d=GR", i); \ *************** do { \ *** 250,256 **** /* Supposedly the assembler rejects the command if there is no tab! */ #define READONLY_DATA_ASM_OP "\t.SPACE $TEXT$\n\t.SUBSPA $LIT$\n" ! #define READONLY_DATA_SECTION readonly_data /* Output before writable data. */ --- 248,281 ---- /* Supposedly the assembler rejects the command if there is no tab! */ #define READONLY_DATA_ASM_OP "\t.SPACE $TEXT$\n\t.SUBSPA $LIT$\n" ! #define EXTRA_SECTIONS in_readonly_data ! ! #define EXTRA_SECTION_FUNCTIONS \ ! extern void readonly_data PARAMS ((void)); \ ! void \ ! readonly_data () \ ! { \ ! if (in_section != in_readonly_data) \ ! { \ ! in_section = in_readonly_data; \ ! fprintf (asm_out_file, "%s\n", READONLY_DATA_ASM_OP); \ ! } \ ! } ! ! /* FIXME: HPUX ld generates incorrect GOT entries for "T" fixups ! which reference data within the $TEXT$ space (for example constant ! strings in the $LIT$ subspace). ! ! The assemblers (GAS and HP as) both have problems with handling ! the difference of two symbols which is the other correct way to ! reference constant data during PIC code generation. ! ! So, there's no way to reference constant data which is in the ! $TEXT$ space during PIC generation. Instead place all constant ! data into the $PRIVATE$ subspace (this reduces sharing, but it ! works correctly). */ ! ! #define READONLY_DATA_SECTION (flag_pic ? data_section : readonly_data) /* Output before writable data. */ *************** do { \ *** 268,305 **** So, we force exception information into the data section. */ #define TARGET_ASM_EXCEPTION_SECTION data_section - /* Define the .bss section for ASM_OUTPUT_LOCAL to use. */ - - #define EXTRA_SECTIONS in_readonly_data - - /* FIXME: HPUX ld generates incorrect GOT entries for "T" fixups - which reference data within the $TEXT$ space (for example constant - strings in the $LIT$ subspace). - - The assemblers (GAS and HP as) both have problems with handling - the difference of two symbols which is the other correct way to - reference constant data during PIC code generation. - - So, there's no way to reference constant data which is in the - $TEXT$ space during PIC generation. Instead place all constant - data into the $PRIVATE$ subspace (this reduces sharing, but it - works correctly). */ - - #define EXTRA_SECTION_FUNCTIONS \ - extern void readonly_data PARAMS ((void)); \ - void \ - readonly_data () \ - { \ - if (in_section != in_readonly_data) \ - { \ - if (flag_pic) \ - fprintf (asm_out_file, "%s\n", DATA_SECTION_ASM_OP); \ - else \ - fprintf (asm_out_file, "%s\n", READONLY_DATA_ASM_OP); \ - in_section = in_readonly_data; \ - } \ - } - /* This is how to output a command to make the user-level label named NAME defined for reference from other files. --- 293,298 ---- *************** readonly_data () \ *** 327,333 **** "imported", even library calls. They look a bit different, so here's this macro. ! Also note not all libcall names are passed to ENCODE_SECTION_INFO (__main for example). To make sure all libcall names have section info recorded in them, we do it here. We must also ensure that we don't import a libcall that has been previously exported since --- 320,326 ---- "imported", even library calls. They look a bit different, so here's this macro. ! Also note not all libcall names are passed to pa_encode_section_info (__main for example). To make sure all libcall names have section info recorded in them, we do it here. We must also ensure that we don't import a libcall that has been previously exported since *************** readonly_data () \ *** 340,346 **** if (!function_label_operand (RTL, VOIDmode)) \ hppa_encode_label (RTL); \ \ ! STRIP_NAME_ENCODING (name, XSTR ((RTL), 0)); \ id = maybe_get_identifier (name); \ if (! id || ! TREE_SYMBOL_REFERENCED (id)) \ { \ --- 333,339 ---- if (!function_label_operand (RTL, VOIDmode)) \ hppa_encode_label (RTL); \ \ ! name = (*targetm.strip_name_encoding) (XSTR ((RTL), 0)); \ id = maybe_get_identifier (name); \ if (! id || ! TREE_SYMBOL_REFERENCED (id)) \ { \ *************** do { \ *** 369,374 **** /* The .align directive in the HP assembler allows up to a 32 alignment. */ #define MAX_OFILE_ALIGNMENT 32768 ! /* SOM does not support the init_priority C++ attribute. */ ! #undef SUPPORTS_INIT_PRIORITY ! #define SUPPORTS_INIT_PRIORITY 0 --- 362,422 ---- /* The .align directive in the HP assembler allows up to a 32 alignment. */ #define MAX_OFILE_ALIGNMENT 32768 ! /* The SOM linker hardcodes paths into binaries. As a result, dotdots ! must be removed from library prefixes to prevent binaries from depending ! on the location of the GCC tool directory. The downside is GCC ! cannot be moved after installation using a symlink. */ ! #define ALWAYS_STRIP_DOTDOT 1 ! ! /* Aggregates with a single float or double field should be passed and ! returned in the general registers. */ ! #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) (MODE==SFmode || MODE==DFmode) ! ! /* If GAS supports weak, we can support weak when we have working linker ! support for secondary definitions and are generating code for GAS. */ ! #ifdef HAVE_GAS_WEAK ! #define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS) ! #else ! #define SUPPORTS_WEAK 0 ! #endif ! ! /* We can support one only if we support weak. */ ! #define SUPPORTS_ONE_ONLY SUPPORTS_WEAK ! ! /* Use weak (secondary definitions) to make one only declarations. */ ! #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) ! ! /* This is how we tell the assembler that a symbol is weak. The SOM ! weak implementation uses the secondary definition (sdef) flag. ! ! The behavior of sdef symbols is similar to ELF weak symbols in that ! multiple definitions can occur without incurring a link error. ! However, they differ in the following ways: ! 1) Undefined sdef symbols are not allowed. ! 2) The linker searches for undefined sdef symbols and will load an ! archive library member to resolve an undefined sdef symbol. ! 3) The exported symbol from a shared library is a primary symbol ! rather than a sdef symbol. Thus, more care is needed in the ! ordering of libraries. ! ! It appears that the linker discards extra copies of "weak" functions ! when linking shared libraries, independent of whether or not they ! are in their own section. In linking final executables, -Wl,-O can ! be used to remove dead procedures. Thus, support for named sections ! is not needed and in previous testing caused problems with various ! HP tools. */ ! #define ASM_WEAKEN_LABEL(FILE,NAME) \ ! do { fputs ("\t.weak\t", FILE); \ ! assemble_name (FILE, NAME); \ ! fputc ('\n', FILE); \ ! if (! FUNCTION_NAME_P (NAME)) \ ! { \ ! fputs ("\t.EXPORT ", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs (",DATA\n", FILE); \ ! } \ ! } while (0) ! ! /* We can't handle weak aliases, and therefore can't support pragma weak. ! Suppress the use of pragma weak in gthr-dce.h and gthr-posix.h. */ ! #define GTHREAD_USE_WEAK 0 diff -Nrc3pad gcc-3.2.3/gcc/config/pa/t-linux gcc-3.3/gcc/config/pa/t-linux *** gcc-3.2.3/gcc/config/pa/t-linux 2002-04-30 19:02:21.000000000 +0000 --- gcc-3.3/gcc/config/pa/t-linux 2002-12-05 01:57:27.000000000 +0000 *************** *** 1,16 **** #Plug millicode routines into libgcc.a We want these on both native and ! #cross compiles. ! LIB1ASMFUNCS = _divI _divU _remI _remU _multiply \ ! _divI_15 _divI_14 _divI_12 _divI_10 _divI_9 \ ! _divI_7 _divI_6 _divI_5 _divI_3 \ ! _divU_15 _divU_14 _divU_12 _divU_10 _divU_9 \ ! _divU_7 _divU_6 _divU_5 _divU_3 _dyncall ! LIB1ASMSRC = pa/milli32.S # Compile crtbeginS.o and crtendS.o as PIC. CRTSTUFF_T_CFLAGS_S = -fPIC - - # Compile libgcc2.a as PIC. - TARGET_LIBGCC2_CFLAGS = -fPIC -DELF=1 -DLINUX=1 --- 1,18 ---- #Plug millicode routines into libgcc.a We want these on both native and ! #cross compiles. We use the "64-bit" routines because the "32-bit" code ! #is broken for certain corner cases. ! LIB1ASMFUNCS = _divI _divU _remI _remU _div_const _mulI _dyncall ! LIB1ASMSRC = pa/milli64.S ! # Compile libgcc2.a as PIC. ! TARGET_LIBGCC2_CFLAGS = -fPIC -DELF=1 -DLINUX=1 ! ! LIB2FUNCS_EXTRA=fptr.c ! ! fptr.c: $(srcdir)/config/pa/fptr.c ! rm -f fptr.c ! cp $(srcdir)/config/pa/fptr.c . # Compile crtbeginS.o and crtendS.o as PIC. CRTSTUFF_T_CFLAGS_S = -fPIC diff -Nrc3pad gcc-3.2.3/gcc/config/pa/t-pa64 gcc-3.3/gcc/config/pa/t-pa64 *** gcc-3.2.3/gcc/config/pa/t-pa64 2002-04-30 19:02:21.000000000 +0000 --- gcc-3.3/gcc/config/pa/t-pa64 2002-10-31 03:13:44.000000000 +0000 *************** *** 1,6 **** ! LIB1ASMFUNCS = _divI _divU _remI _remU _div_const ! LIB1ASMSRC = pa/milli64.S ! TARGET_LIBGCC2_CFLAGS = -fPIC -Dpa64=1 -DELF=1 LIB2FUNCS_EXTRA=quadlib.c --- 1,4 ---- ! TARGET_LIBGCC2_CFLAGS = -fPIC -Dpa64=1 -DELF=1 -mlong-calls LIB2FUNCS_EXTRA=quadlib.c diff -Nrc3pad gcc-3.2.3/gcc/config/pa/x-ada gcc-3.3/gcc/config/pa/x-ada *** gcc-3.2.3/gcc/config/pa/x-ada 2002-04-30 19:02:22.000000000 +0000 --- gcc-3.3/gcc/config/pa/x-ada 2002-05-02 15:07:09.000000000 +0000 *************** *** 1,4 **** # The ada virtual array implementation requires that indexing be disabled on # hosts such as hpux that use a segmented memory architecture. Both the c # and ada files need to be compiled with this option for correct operation. ! ADA_CFLAGS=-mdisable-indexing --- 1,4 ---- # The ada virtual array implementation requires that indexing be disabled on # hosts such as hpux that use a segmented memory architecture. Both the c # and ada files need to be compiled with this option for correct operation. ! X_ADA_CFLAGS=-mdisable-indexing diff -Nrc3pad gcc-3.2.3/gcc/config/pdp11/pdp11.c gcc-3.3/gcc/config/pdp11/pdp11.c *** gcc-3.2.3/gcc/config/pdp11/pdp11.c 2001-12-17 15:05:36.000000000 +0000 --- gcc-3.3/gcc/config/pdp11/pdp11.c 2002-10-12 16:38:01.000000000 +0000 *************** pdp11_output_function_prologue (stream, *** 137,143 **** { fprintf (stream, "\t/*abuse empty parameter slot for locals!*/\n"); if (size > 2) ! fprintf(stream, "\tsub $%d, sp\n", size - 2); } } --- 137,143 ---- { fprintf (stream, "\t/*abuse empty parameter slot for locals!*/\n"); if (size > 2) ! fprintf(stream, "\tsub $%#o, sp\n", size - 2); } } *************** pdp11_output_function_prologue (stream, *** 168,175 **** if (frame_pointer_needed) { ! fprintf(stream, "\tmov fp, -(sp)\n"); ! fprintf(stream, "\tmov sp, fp\n"); } else { --- 168,175 ---- if (frame_pointer_needed) { ! fprintf(stream, "\tmov r5, -(sp)\n"); ! fprintf(stream, "\tmov sp, r5\n"); } else { *************** pdp11_output_function_prologue (stream, *** 178,184 **** /* make frame */ if (fsize) ! fprintf (stream, "\tsub $%o, sp\n", fsize); /* save CPU registers */ for (regno = 0; regno < 8; regno++) --- 178,184 ---- /* make frame */ if (fsize) ! fprintf (stream, "\tsub $%#o, sp\n", fsize); /* save CPU registers */ for (regno = 0; regno < 8; regno++) *************** pdp11_output_function_prologue (stream, *** 198,204 **** && regs_ever_live[regno] && ! call_used_regs[regno]) { ! fprintf (stream, "\tfstd %s, -(sp)\n", reg_names[regno]); via_ac = regno; } --- 198,204 ---- && regs_ever_live[regno] && ! call_used_regs[regno]) { ! fprintf (stream, "\tstd %s, -(sp)\n", reg_names[regno]); via_ac = regno; } *************** pdp11_output_function_prologue (stream, *** 211,218 **** if (via_ac == -1) abort(); ! fprintf (stream, "\tfldd %s, %s\n", reg_names[regno], reg_names[via_ac]); ! fprintf (stream, "\tfstd %s, -(sp)\n", reg_names[via_ac]); } } --- 211,218 ---- if (via_ac == -1) abort(); ! fprintf (stream, "\tldd %s, %s\n", reg_names[regno], reg_names[via_ac]); ! fprintf (stream, "\tstd %s, -(sp)\n", reg_names[via_ac]); } } *************** pdp11_output_function_epilogue (stream, *** 277,285 **** /* remember # of pushed bytes for CPU regs */ k = 2*j; for (i =7 ; i >= 0 ; i--) if (regs_ever_live[i] && ! call_used_regs[i]) ! fprintf(stream, "\tmov %o(fp), %s\n",-fsize-2*j--, reg_names[i]); /* get ACs */ via_ac = FIRST_PSEUDO_REGISTER -1; --- 277,286 ---- /* remember # of pushed bytes for CPU regs */ k = 2*j; + /* change fp -> r5 due to the compile error on libgcc2.c */ for (i =7 ; i >= 0 ; i--) if (regs_ever_live[i] && ! call_used_regs[i]) ! fprintf(stream, "\tmov %#o(r5), %s\n",(-fsize-2*j--)&0xffff, reg_names[i]); /* get ACs */ via_ac = FIRST_PSEUDO_REGISTER -1; *************** pdp11_output_function_epilogue (stream, *** 297,303 **** && regs_ever_live[i] && ! call_used_regs[i]) { ! fprintf(stream, "\tfldd %o(fp), %s\n", -fsize-k, reg_names[i]); k -= 8; } --- 298,304 ---- && regs_ever_live[i] && ! call_used_regs[i]) { ! fprintf(stream, "\tldd %#o(r5), %s\n", (-fsize-k)&0xffff, reg_names[i]); k -= 8; } *************** pdp11_output_function_epilogue (stream, *** 308,321 **** if (! LOAD_FPU_REG_P(via_ac)) abort(); ! fprintf(stream, "\tfldd %o(fp), %s\n", -fsize-k, reg_names[via_ac]); ! fprintf(stream, "\tfstd %s, %s\n", reg_names[via_ac], reg_names[i]); k -= 8; } } ! fprintf(stream, "\tmov fp, sp\n"); ! fprintf (stream, "\tmov (sp)+, fp\n"); } else { --- 309,322 ---- if (! LOAD_FPU_REG_P(via_ac)) abort(); ! fprintf(stream, "\tldd %#o(r5), %s\n", (-fsize-k)&0xffff, reg_names[via_ac]); ! fprintf(stream, "\tstd %s, %s\n", reg_names[via_ac], reg_names[i]); k -= 8; } } ! fprintf(stream, "\tmov r5, sp\n"); ! fprintf (stream, "\tmov (sp)+, r5\n"); } else { *************** pdp11_output_function_epilogue (stream, *** 331,337 **** if (LOAD_FPU_REG_P(i) && regs_ever_live[i] && ! call_used_regs[i]) ! fprintf(stream, "\tfldd (sp)+, %s\n", reg_names[i]); if (NO_LOAD_FPU_REG_P(i) && regs_ever_live[i] --- 332,338 ---- if (LOAD_FPU_REG_P(i) && regs_ever_live[i] && ! call_used_regs[i]) ! fprintf(stream, "\tldd (sp)+, %s\n", reg_names[i]); if (NO_LOAD_FPU_REG_P(i) && regs_ever_live[i] *************** pdp11_output_function_epilogue (stream, *** 340,347 **** if (! LOAD_FPU_REG_P(via_ac)) abort(); ! fprintf(stream, "\tfldd (sp)+, %s\n", reg_names[via_ac]); ! fprintf(stream, "\tfstd %s, %s\n", reg_names[via_ac], reg_names[i]); } } --- 341,348 ---- if (! LOAD_FPU_REG_P(via_ac)) abort(); ! fprintf(stream, "\tldd (sp)+, %s\n", reg_names[via_ac]); ! fprintf(stream, "\tstd %s, %s\n", reg_names[via_ac], reg_names[i]); } } *************** pdp11_output_function_epilogue (stream, *** 350,356 **** fprintf(stream, "\tmov (sp)+, %s\n", reg_names[i]); if (fsize) ! fprintf((stream), "\tadd $%o, sp\n", fsize); } fprintf (stream, "\trts pc\n"); --- 351,357 ---- fprintf(stream, "\tmov (sp)+, %s\n", reg_names[i]); if (fsize) ! fprintf((stream), "\tadd $%#o, sp\n", (fsize)&0xffff); } fprintf (stream, "\trts pc\n"); *************** output_move_double (operands) *** 400,409 **** if (REG_P (operands[1])) optype1 = REGOP; ! else if (CONSTANT_P (operands[1])) #if 0 ! || GET_CODE (operands[1]) == CONST_DOUBLE) #endif optype1 = CNSTOP; else if (offsettable_memref_p (operands[1])) optype1 = OFFSOP; --- 401,411 ---- if (REG_P (operands[1])) optype1 = REGOP; ! else if (CONSTANT_P (operands[1]) #if 0 ! || GET_CODE (operands[1]) == CONST_DOUBLE #endif + ) optype1 = CNSTOP; else if (offsettable_memref_p (operands[1])) optype1 = OFFSOP; *************** output_move_quad (operands) *** 561,567 **** rtx latehalf[2]; rtx addreg0 = 0, addreg1 = 0; ! output_asm_insn(";; movdi/df: %1 -> %0", operands); if (REG_P (operands[0])) optype0 = REGOP; --- 563,569 ---- rtx latehalf[2]; rtx addreg0 = 0, addreg1 = 0; ! output_asm_insn(";/* movdi/df: %1 -> %0 */", operands); if (REG_P (operands[0])) optype0 = REGOP; *************** output_move_quad (operands) *** 620,630 **** { if (GET_CODE(operands[1]) == CONST_DOUBLE) { ! union { double d; int i[2]; } u; ! u.i[0] = CONST_DOUBLE_LOW (operands[1]); ! u.i[1] = CONST_DOUBLE_HIGH (operands[1]); ! ! if (u.d == 0.0) return "{clrd|clrf} %0"; } --- 622,631 ---- { if (GET_CODE(operands[1]) == CONST_DOUBLE) { ! REAL_VALUE_TYPE r; ! REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); ! ! if (REAL_VALUES_EQUAL (r, dconst0)) return "{clrd|clrf} %0"; } *************** output_ascii (file, p, size) *** 817,823 **** register int c = p[i]; if (c < 0) c += 256; ! fprintf (file, "%o", c); if (i < size - 1) putc (',', file); } --- 818,824 ---- register int c = p[i]; if (c < 0) c += 256; ! fprintf (file, "%#o", c); if (i < size - 1) putc (',', file); } *************** print_operand_address (file, addr) *** 851,860 **** --- 852,863 ---- fprintf (file, "(%s)", reg_names[REGNO (addr)]); break; + case PRE_MODIFY: case PRE_DEC: fprintf (file, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); break; + case POST_MODIFY: case POST_INC: fprintf (file, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); break; *************** pdp11_assemble_integer (x, size, aligned *** 984,990 **** /* register move costs, indexed by regs */ ! static int move_costs[N_REG_CLASSES][N_REG_CLASSES] = { /* NO MUL GEN LFPU NLFPU FPU ALL */ --- 987,993 ---- /* register move costs, indexed by regs */ ! static const int move_costs[N_REG_CLASSES][N_REG_CLASSES] = { /* NO MUL GEN LFPU NLFPU FPU ALL */ *************** output_addr_const_pdp11 (file, x) *** 1546,1552 **** case CONST_INT: /* Should we check for constants which are too big? Maybe cutting them off to 16 bits is OK? */ ! fprintf (file, "%ho", (unsigned short) INTVAL (x)); break; case CONST: --- 1549,1555 ---- case CONST_INT: /* Should we check for constants which are too big? Maybe cutting them off to 16 bits is OK? */ ! fprintf (file, "%#ho", (unsigned short) INTVAL (x)); break; case CONST: *************** output_addr_const_pdp11 (file, x) *** 1562,1568 **** if (CONST_DOUBLE_HIGH (x)) abort (); /* Should we just silently drop the high part? */ else ! fprintf (file, "%ho", (unsigned short) CONST_DOUBLE_LOW (x)); } else /* We can't handle floating point constants; --- 1565,1571 ---- if (CONST_DOUBLE_HIGH (x)) abort (); /* Should we just silently drop the high part? */ else ! fprintf (file, "%#ho", (unsigned short) CONST_DOUBLE_LOW (x)); } else /* We can't handle floating point constants; diff -Nrc3pad gcc-3.2.3/gcc/config/pdp11/pdp11.h gcc-3.3/gcc/config/pdp11/pdp11.h *** gcc-3.2.3/gcc/config/pdp11/pdp11.h 2002-01-16 02:37:32.000000000 +0000 --- gcc-3.3/gcc/config/pdp11/pdp11.h 2002-10-16 00:40:34.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,25 **** --- 20,26 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #define CONSTANT_POOL_BEFORE_FUNCTION 0 /* check whether load_fpu_reg or not */ #define LOAD_FPU_REG_P(x) ((x)>=8 && (x)<=11) *************** extern int target_flags; *** 131,137 **** /* TYPE SIZES */ - #define CHAR_TYPE_SIZE 8 #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE (TARGET_INT16 ? 16 : 32) #define LONG_TYPE_SIZE 32 --- 132,137 ---- *************** extern int target_flags; *** 165,180 **** /* Define this if most significant word of a multiword number is numbered. */ #define WORDS_BIG_ENDIAN 1 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - /* This is a machine with 16-bit registers */ - #define BITS_PER_WORD 16 - /* Width of a word, in units (bytes). UNITS OR BYTES - seems like units */ --- 165,170 ---- *************** extern int target_flags; *** 184,193 **** DImode or Dfmode ...*/ #define MAX_FIXED_MODE_SIZE 64 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 16 - /* Allocation boundary (in *bits*) for storing pointers in memory. */ #define POINTER_BOUNDARY 16 --- 174,179 ---- *************** loading is easier into LOAD_FPU_REGS tha *** 523,529 **** extern int current_first_parm_offset; /* Offset of first parameter from the argument pointer register value. ! For the pdp11, this is non-zero to account for the return address. 1 - return address 2 - frame pointer (always saved, even when not used!!!!) -- chnage some day !!!:q! --- 509,515 ---- extern int current_first_parm_offset; /* Offset of first parameter from the argument pointer register value. ! For the pdp11, this is nonzero to account for the return address. 1 - return address 2 - frame pointer (always saved, even when not used!!!!) -- chnage some day !!!:q! *************** extern int may_call_alloca; *** 717,723 **** /* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! #define LEGITIMATE_CONSTANT_P(X) (1) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. --- 703,709 ---- /* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! #define LEGITIMATE_CONSTANT_P(X) (TARGET_FPU? 1: !(GET_CODE(X) == CONST_DOUBLE)) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. *************** extern int may_call_alloca; *** 788,793 **** --- 774,802 ---- && GET_CODE (XEXP (operand, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (operand, 0))) \ goto ADDR; \ + \ + /* accept -(SP) -- which uses PRE_MODIFY for byte mode */ \ + if (GET_CODE (operand) == PRE_MODIFY \ + && GET_CODE (XEXP (operand, 0)) == REG \ + && REGNO (XEXP (operand, 0)) == 6 \ + && GET_CODE ((xfoob = XEXP (operand, 1))) == PLUS \ + && GET_CODE (XEXP (xfoob, 0)) == REG \ + && REGNO (XEXP (xfoob, 0)) == 6 \ + && CONSTANT_P (XEXP (xfoob, 1)) \ + && INTVAL (XEXP (xfoob,1)) == -2) \ + goto ADDR; \ + \ + /* accept (SP)+ -- which uses POST_MODIFY for byte mode */ \ + if (GET_CODE (operand) == POST_MODIFY \ + && GET_CODE (XEXP (operand, 0)) == REG \ + && REGNO (XEXP (operand, 0)) == 6 \ + && GET_CODE ((xfoob = XEXP (operand, 1))) == PLUS \ + && GET_CODE (XEXP (xfoob, 0)) == REG \ + && REGNO (XEXP (xfoob, 0)) == 6 \ + && CONSTANT_P (XEXP (xfoob, 1)) \ + && INTVAL (XEXP (xfoob,1)) == 2) \ + goto ADDR; \ + \ \ /* handle another level of indirection ! */ \ if (GET_CODE(operand) != MEM) \ *************** extern int may_call_alloca; *** 899,910 **** is done just by pretending it is already truncated. */ #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* Add any extra modes needed to represent the condition code. - - CCFPmode is used for FPU, but should we use a separate reg? */ - #define EXTRA_CC_MODES CC(CCFPmode, "CCFP") - /* Give a comparison code (EQ, NE etc) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. */ --- 908,913 ---- *************** fprintf (FILE, "$help$: . = .+8 ; space *** 1050,1066 **** {"r0", "r1", "r2", "r3", "r4", "r5", "sp", "pc", \ "ac0", "ac1", "ac2", "ac3", "ac4", "ac5" } ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs("\n", FILE); } while (0) /* The prefix to add to user-visible assembler symbols. */ --- 1053,1060 ---- {"r0", "r1", "r2", "r3", "r4", "r5", "sp", "pc", \ "ac0", "ac1", "ac2", "ac3", "ac4", "ac5" } ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* The prefix to add to user-visible assembler symbols. */ *************** fprintf (FILE, "$help$: . = .+8 ; space *** 1113,1119 **** } #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "\t.=.+ %o\n", (SIZE)) /* This says how to output an assembler line to define a global common symbol. */ --- 1107,1113 ---- } #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "\t.=.+ %#ho\n", (unsigned short)(SIZE)) /* This says how to output an assembler line to define a global common symbol. */ *************** fprintf (FILE, "$help$: . = .+8 ; space *** 1123,1129 **** assemble_name ((FILE), (NAME)), \ fprintf ((FILE), "\n"), \ assemble_name ((FILE), (NAME)), \ ! fprintf ((FILE), ": .=.+ %o\n", (ROUNDED)) \ ) /* This says how to output an assembler line --- 1117,1123 ---- assemble_name ((FILE), (NAME)), \ fprintf ((FILE), "\n"), \ assemble_name ((FILE), (NAME)), \ ! fprintf ((FILE), ": .=.+ %#ho\n", (unsigned short)(ROUNDED)) \ ) /* This says how to output an assembler line *************** fprintf (FILE, "$help$: . = .+8 ; space *** 1131,1137 **** #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ ( assemble_name ((FILE), (NAME)), \ ! fprintf ((FILE), ":\t.=.+ %o\n", (ROUNDED))) /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. --- 1125,1131 ---- #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ ( assemble_name ((FILE), (NAME)), \ ! fprintf ((FILE), ":\t.=.+ %#ho\n", (unsigned short)(ROUNDED))) /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. *************** fprintf (FILE, "$help$: . = .+8 ; space *** 1155,1163 **** else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != SImode) \ ! { union { double d; int i[2]; } u; \ ! u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ ! fprintf (FILE, "#%.20e", u.d); } \ else { putc ('$', FILE); output_addr_const_pdp11 (FILE, X); }} /* Print a memory address as an operand to reference that memory location. */ --- 1149,1157 ---- else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != SImode) \ ! { char buf[30]; \ ! real_to_decimal (buf, CONST_DOUBLE_REAL_VALUE (X), sizeof (buf), 0, 1); \ ! fprintf (FILE, "$0F%s", buf); } \ else { putc ('$', FILE); output_addr_const_pdp11 (FILE, X); }} /* Print a memory address as an operand to reference that memory location. */ diff -Nrc3pad gcc-3.2.3/gcc/config/pdp11/pdp11.md gcc-3.3/gcc/config/pdp11/pdp11.md *** gcc-3.2.3/gcc/config/pdp11/pdp11.md 2001-11-04 02:12:13.000000000 +0000 --- gcc-3.3/gcc/config/pdp11/pdp11.md 2002-10-12 16:38:01.000000000 +0000 *************** *** 621,632 **** ;; Move instructions (define_insn "movdi" ! [(set (match_operand:DI 0 "general_operand" "=g") ! (match_operand:DI 1 "general_operand" "g"))] "" "* return output_move_quad (operands);" ;; what's the mose expensive code - say twice movsi = 16 ! [(set_attr "length" "16")]) (define_insn "movsi" [(set (match_operand:SI 0 "general_operand" "=r,r,r,rm,m") --- 621,632 ---- ;; Move instructions (define_insn "movdi" ! [(set (match_operand:DI 0 "general_operand" "=g,rm,o") ! (match_operand:DI 1 "general_operand" "m,r,a"))] "" "* return output_move_quad (operands);" ;; what's the mose expensive code - say twice movsi = 16 ! [(set_attr "length" "16,16,16")]) (define_insn "movsi" [(set (match_operand:SI 0 "general_operand" "=r,r,r,rm,m") *************** *** 651,658 **** [(set_attr "length" "1,2,2,3")]) (define_insn "movqi" ! [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q") ! (match_operand:QI 1 "general_operand" "rRN,Qi,rRN,Qi"))] "" "* { --- 651,658 ---- [(set_attr "length" "1,2,2,3")]) (define_insn "movqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=g") ! (match_operand:QI 1 "general_operand" "g"))] "" "* { *************** *** 661,677 **** return \"movb %1, %0\"; }" ! [(set_attr "length" "1,2,2,3")]) ;; do we have to supply all these moves? e.g. to ;; NO_LOAD_FPU_REGs ? (define_insn "movdf" ! [(set (match_operand:DF 0 "general_operand" "=f,R,f,Q,f,m") ! (match_operand:DF 1 "general_operand" "fR,f,Q,f,F,m"))] "" ! "* return output_move_quad (operands);" ;; just a guess.. ! [(set_attr "length" "1,1,2,2,5,16")]) (define_insn "movsf" [(set (match_operand:SF 0 "general_operand" "=g,r,g") --- 661,682 ---- return \"movb %1, %0\"; }" ! [(set_attr "length" "1")]) ;; do we have to supply all these moves? e.g. to ;; NO_LOAD_FPU_REGs ? (define_insn "movdf" ! [(set (match_operand:DF 0 "general_operand" "=a,fR,a,Q,m") ! (match_operand:DF 1 "general_operand" "fFR,a,Q,a,m"))] "" ! "* if (which_alternative ==0) ! return \"ldd %1, %0\"; ! else if (which_alternative == 1) ! return \"std %1, %0\"; ! else ! return output_move_quad (operands); " ;; just a guess.. ! [(set_attr "length" "1,1,5,5,16")]) (define_insn "movsf" [(set (match_operand:SF 0 "general_operand" "=g,r,g") *************** *** 760,766 **** [(set (match_operand:HI 0 "general_operand" "=r") (zero_extend:HI (match_operand:QI 1 "general_operand" "0")))] "" ! "bic $(256*255), %0" [(set_attr "length" "2")]) (define_expand "zero_extendhisi2" --- 765,771 ---- [(set (match_operand:HI 0 "general_operand" "=r") (zero_extend:HI (match_operand:QI 1 "general_operand" "0")))] "" ! "bic $0177400, %0" [(set_attr "length" "2")]) (define_expand "zero_extendhisi2" *************** *** 919,925 **** rtx latehalf[2]; latehalf[0] = NULL; ! latehalf[1] = gen_rtx_REG (HImode, REGNO (operands[0]) + 1); output_asm_insn(\"mov %1, -(sp)\", latehalf); output_asm_insn(\"mov %1, -(sp)\", operands); --- 924,930 ---- rtx latehalf[2]; latehalf[0] = NULL; ! latehalf[1] = gen_rtx_REG (HImode, REGNO (operands[1]) + 1); output_asm_insn(\"mov %1, -(sp)\", latehalf); output_asm_insn(\"mov %1, -(sp)\", operands); *************** *** 1067,1073 **** return \"decb %0\"; } ! return \"addb %2, %0\"; }" [(set_attr "length" "1,2,2,3")]) --- 1072,1078 ---- return \"decb %0\"; } ! return \"add %2, %0\"; }" [(set_attr "length" "1,2,2,3")]) *************** *** 1143,1195 **** if (GET_CODE (operands[2]) == CONST_INT) abort(); ! return \"subb %2, %0\"; }" [(set_attr "length" "1,2,2,3")]) ;;;;- and instructions ;; Bit-and on the pdp (like on the VAX) is done with a clear-bits insn. - (define_expand "andsi3" - [(set (match_operand:SI 0 "general_operand" "=g") - (and:SI (match_operand:SI 1 "general_operand" "0") - (not:SI (match_operand:SI 2 "general_operand" "g"))))] - "" - " - { - if (GET_CODE (operands[2]) == CONST_INT) - operands[2] = GEN_INT (~INTVAL (operands[2])); - else - operands[2] = expand_unop (SImode, one_cmpl_optab, operands[2], 0, 1); - }") ! (define_expand "andhi3" ! [(set (match_operand:HI 0 "general_operand" "=g") ! (and:HI (match_operand:HI 1 "general_operand" "0") ! (not:HI (match_operand:HI 2 "general_operand" "g"))))] ! "" ! " ! { ! if (GET_CODE (operands[2]) == CONST_INT) ! operands[2] = GEN_INT (~INTVAL (operands[2])); ! else ! operands[2] = expand_unop (HImode, one_cmpl_optab, operands[2], 0, 1); ! }") ! ! (define_expand "andqi3" ! [(set (match_operand:QI 0 "general_operand" "=g") ! (and:QI (match_operand:QI 1 "general_operand" "0") ! (not:QI (match_operand:QI 2 "general_operand" "g"))))] ! "" ! " ! { ! rtx op = operands[2]; ! if (GET_CODE (op) == CONST_INT) ! operands[2] = GEN_INT (((1 << 8) - 1) & ~INTVAL (op)); ! else ! operands[2] = expand_unop (QImode, one_cmpl_optab, op, 0, 1); ! }") ! ! (define_insn "andcbsi3" [(set (match_operand:SI 0 "general_operand" "=r,r,o,o,r,r,r,o,o,o") (and:SI (match_operand:SI 1 "general_operand" "%0,0,0,0,0,0,0,0,0,0") (not:SI (match_operand:SI 2 "general_operand" "r,o,r,o,I,J,K,I,J,K"))))] --- 1148,1161 ---- if (GET_CODE (operands[2]) == CONST_INT) abort(); ! return \"sub %2, %0\"; }" [(set_attr "length" "1,2,2,3")]) ;;;;- and instructions ;; Bit-and on the pdp (like on the VAX) is done with a clear-bits insn. ! (define_insn "andsi3" [(set (match_operand:SI 0 "general_operand" "=r,r,o,o,r,r,r,o,o,o") (and:SI (match_operand:SI 1 "general_operand" "%0,0,0,0,0,0,0,0,0,0") (not:SI (match_operand:SI 2 "general_operand" "r,o,r,o,I,J,K,I,J,K"))))] *************** *** 1237,1243 **** }" [(set_attr "length" "2,4,4,6,2,2,4,3,3,6")]) ! (define_insn "andcbhi3" [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q") (and:HI (match_operand:HI 1 "general_operand" "0,0,0,0") (not:HI (match_operand:HI 2 "general_operand" "rR,Qi,rR,Qi"))))] --- 1203,1209 ---- }" [(set_attr "length" "2,4,4,6,2,2,4,3,3,6")]) ! (define_insn "andhi3" [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q") (and:HI (match_operand:HI 1 "general_operand" "0,0,0,0") (not:HI (match_operand:HI 2 "general_operand" "rR,Qi,rR,Qi"))))] *************** *** 1245,1251 **** "bic %2, %0" [(set_attr "length" "1,2,2,3")]) ! (define_insn "andcbqi3" [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q") (and:QI (match_operand:QI 1 "general_operand" "0,0,0,0") (not:QI (match_operand:QI 2 "general_operand" "rR,Qi,rR,Qi"))))] --- 1211,1217 ---- "bic %2, %0" [(set_attr "length" "1,2,2,3")]) ! (define_insn "andqi3" [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q") (and:QI (match_operand:QI 1 "general_operand" "0,0,0,0") (not:QI (match_operand:QI 2 "general_operand" "rR,Qi,rR,Qi"))))] *************** *** 1319,1327 **** ;;- xor instructions (define_insn "xorsi3" ! [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") ! (xor:SI (match_operand:SI 1 "register_operand" "%0,0,0,0") ! (match_operand:SI 2 "arith_operand" "r,I,J,K")))] "TARGET_40_PLUS" "* { /* Here we trust that operands don't overlap */ --- 1285,1293 ---- ;;- xor instructions (define_insn "xorsi3" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (xor:SI (match_operand:SI 1 "register_operand" "%0") ! (match_operand:SI 2 "arith_operand" "r")))] "TARGET_40_PLUS" "* { /* Here we trust that operands don't overlap */ *************** *** 1342,1359 **** return \"\"; } - lateoperands[2] = GEN_INT ((INTVAL (operands[2]) >> 16) & 0xffff); - operands[2] = GEN_INT (INTVAL(operands[2]) & 0xffff); - - if (INTVAL (operands[2])) - output_asm_insn (\"xor %2, %0\", operands); - - if (INTVAL (lateoperands[2])) - output_asm_insn (\"xor %2, %0\", lateoperands); - - return \"\"; }" ! [(set_attr "length" "2,1,1,2")]) (define_insn "xorhi3" [(set (match_operand:HI 0 "general_operand" "=rR,Q") --- 1308,1315 ---- return \"\"; } }" ! [(set_attr "length" "2")]) (define_insn "xorhi3" [(set (match_operand:HI 0 "general_operand" "=rR,Q") *************** *** 1373,1382 **** [(set_attr "length" "1,2")]) (define_insn "one_cmplqi2" ! [(set (match_operand:QI 0 "general_operand" "=rR,Q") ! (not:QI (match_operand:QI 1 "general_operand" "0,0")))] "" ! "comb %0" [(set_attr "length" "1,2")]) ;;- arithmetic shift instructions --- 1329,1340 ---- [(set_attr "length" "1,2")]) (define_insn "one_cmplqi2" ! [(set (match_operand:QI 0 "general_operand" "=rR,rR") ! (not:QI (match_operand:QI 1 "general_operand" "0,g")))] "" ! "@ ! comb %0 ! movb %1, %0\; comb %0" [(set_attr "length" "1,2")]) ;;- arithmetic shift instructions *************** *** 1423,1428 **** --- 1381,1418 ---- "asr %0" [(set_attr "length" "1,2")]) + ;; lsr + (define_insn "" + [(set (match_operand:HI 0 "general_operand" "=rR,Q") + (lshiftrt:HI (match_operand:HI 1 "general_operand" "0,0") + (const_int 1)))] + "" + "clc\;ror %0" + [(set_attr "length" "1,2")]) + + (define_insn "lshrsi3" + [(set (match_operand:SI 0 "register_operand" "=r") + (lshiftrt:SI (match_operand:SI 1 "general_operand" "0") + (const_int 1)))] + "" + { + + rtx lateoperands[2]; + + lateoperands[0] = operands[0]; + operands[0] = gen_rtx_REG (HImode, REGNO (operands[0]) + 1); + + lateoperands[1] = operands[1]; + operands[1] = gen_rtx_REG (HImode, REGNO (operands[1]) + 1); + + output_asm_insn (\"clc\", operands); + output_asm_insn (\"ror %0\", lateoperands); + output_asm_insn (\"ror %0\", operands); + + return \"\"; + } + [(set_attr "length" "5")]) + ;; shift is by arbitrary count is expensive, ;; shift by one cheap - so let's do that, if ;; space doesn't matter *************** *** 1620,1625 **** --- 1610,1638 ---- "{negd|negf} %0" [(set_attr "length" "1,2")]) + (define_insn "negsi2" + [(set (match_operand:SI 0 "register_operand" "=r") + (neg:SI (match_operand:SI 1 "general_operand" "0")))] + "" + { + + rtx lateoperands[2]; + + lateoperands[0] = operands[0]; + operands[0] = gen_rtx_REG (HImode, REGNO (operands[0]) + 1); + + lateoperands[1] = operands[1]; + operands[1] = gen_rtx_REG (HImode, REGNO (operands[1]) + 1); + + output_asm_insn (\"com %0\", operands); + output_asm_insn (\"com %0\", lateoperands); + output_asm_insn (\"inc %0\", operands); + output_asm_insn (\"adc %0\", lateoperands); + + return \"\"; + } + [(set_attr "length" "5")]) + (define_insn "neghi2" [(set (match_operand:HI 0 "general_operand" "=rR,Q") (neg:HI (match_operand:HI 1 "general_operand" "0,0")))] *************** *** 1670,1676 **** ;;- jump to subroutine (define_insn "call" ! [(call (match_operand:HI 0 "general_operand" "R,Q") (match_operand:HI 1 "general_operand" "g,g")) ;; (use (reg:HI 0)) what was that ??? ] --- 1683,1689 ---- ;;- jump to subroutine (define_insn "call" ! [(call (match_operand:HI 0 "general_operand" "rR,Q") (match_operand:HI 1 "general_operand" "g,g")) ;; (use (reg:HI 0)) what was that ??? ] *************** *** 1682,1688 **** ;;- jump to subroutine (define_insn "call_value" [(set (match_operand 0 "" "") ! (call (match_operand:HI 1 "general_operand" "R,Q") (match_operand:HI 2 "general_operand" "g,g"))) ;; (use (reg:HI 0)) - what was that ???? ] --- 1695,1701 ---- ;;- jump to subroutine (define_insn "call_value" [(set (match_operand 0 "" "") ! (call (match_operand:HI 1 "general_operand" "rR,Q") (match_operand:HI 2 "general_operand" "g,g"))) ;; (use (reg:HI 0)) - what was that ???? ] *************** *** 1788,1794 **** "") (define_insn "" ! [(set (subreg:HI (match_operand:SI 0 "general_operand" "=r") 4) (mod:HI (match_operand:SI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "g")))] "TARGET_45" --- 1801,1807 ---- "") (define_insn "" ! [(set (subreg:HI (match_operand:SI 0 "general_operand" "=r") 2) (mod:HI (match_operand:SI 1 "general_operand" "0") (match_operand:HI 2 "general_operand" "g")))] "TARGET_45" diff -Nrc3pad gcc-3.2.3/gcc/config/pdp11/pdp11-modes.def gcc-3.3/gcc/config/pdp11/pdp11-modes.def *** gcc-3.2.3/gcc/config/pdp11/pdp11-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/pdp11/pdp11-modes.def 2002-06-10 22:35:53.000000000 +0000 *************** *** 0 **** --- 1,26 ---- + /* Definitions of target machine for GNU compiler, for the pdp-11 + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + CCFPmode is used for FPU, but should we use a separate reg? */ + + CC (CCFP) + diff -Nrc3pad gcc-3.2.3/gcc/config/pdp11/t-pdp11 gcc-3.3/gcc/config/pdp11/t-pdp11 *** gcc-3.2.3/gcc/config/pdp11/t-pdp11 2001-05-17 03:16:09.000000000 +0000 --- gcc-3.3/gcc/config/pdp11/t-pdp11 2002-10-07 08:21:21.000000000 +0000 *************** *** 1 **** --- 1,15 ---- TARGET_LIBGCC2_CFLAGS = -O2 -mfloat32 + LIB2FUNCS_EXTRA = $(srcdir)/config/udivmod.c $(srcdir)/config/udivmodsi4.c + # floating point emulation libraries + + FPBIT = fp-bit.c + DPBIT = dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + MULTILIB_OPTIONS = msoft-float diff -Nrc3pad gcc-3.2.3/gcc/config/pj/lib1funcs.S gcc-3.3/gcc/config/pj/lib1funcs.S *** gcc-3.2.3/gcc/config/pj/lib1funcs.S 2001-03-18 20:52:02.000000000 +0000 --- gcc-3.3/gcc/config/pj/lib1funcs.S 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,187 **** - ! lib1funcs.S for picoJava. - ! Copyright (C) 2000, 2001 Free Software Foundation, Inc. - ! - ! This file is free software; you can redistribute it and/or modify it - ! under the terms of the GNU General Public License as published by the - ! Free Software Foundation; either version 2, or (at your option) any - ! later version. - ! - ! In addition to the permissions in the GNU General Public License, the - ! Free Software Foundation gives you unlimited permission to link the - ! compiled version of this file into combinations with other programs, - ! and to distribute those combinations without any restriction coming - ! from the use of this file. (The General Public License restrictions - ! do apply in other respects; for example, they cover modification of - ! the file, and distribution when not linked into a combine - ! executable.) - ! - ! This file is distributed in the hope that it will be useful, but - ! WITHOUT ANY WARRANTY; without even the implied warranty of - ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - ! General Public License for more details. - ! - ! You should have received a copy of the GNU General Public License - ! along with this program; see the file COPYING. If not, write to - ! the Free Software Foundation, 59 Temple Place - Suite 330, - ! Boston, MA 02111-1307, USA. - ! - - - #ifdef Lvhelper - - ! The vhelper copies unnamed args in a varargs function from the - ! opstack onto the aggregate stack. It is a bit tricky since the - ! opstack does not exist in real memory, so can not have its address taken, - ! and since the opstack is being played with, there is nowhere to stick - ! the temporaries. - - .globl __vhelper - __vhelper: - - - ! incoming - ! vars-> named0 - ! named1 - ! ... - ! unnamed0 - ! unnamed1 - ! ... - ! pc - ! vars - ! #named - ! return pc - - ! work out total size everything below the named args and - ! allocate that space on the aggregate stack + 3 extra words - ! for some temps. - ! g0 = old g0 - ! g0+4 = vars - ! g0+8 = pc - ! g0+12 = last unnamed arg - ! .... - - write_global1 - write_global2 - - ! tos = #named args provided by callee. - - ! move down the aggstack to make room for all the unnamed args - ! and the 12 bytes of extra stuff we have to pay attention to. - ! g0 = old_g0 - ((vars - optop) + named_bytes + 12) - stuff we just pushed - - ! build new global0 - read_global0 - read_vars - read_optop - isub ! tos = vars - optop (# bytes in all args) - bipush 4 - isub ! subtract out fudge for current stuff on stack. - read_global2 - isub ! subtract out # words named. - isub - - dup - dup - ! store old global0 in new global0 spot. - - read_global0 - swap - store_word - - ! store new global0 value into global0 - write_global0 - - ! work out address to stop copying, which is vars - #named args bytes - ! but since we will have pushed stuff onto the stack when the comparison - ! is made, adjust by the fudge factor. - read_vars - read_global2 - bipush 12 - iadd - isub - - ! optop= finish, vars, pc, ... - ! now pop off args from the opstack and copy to aggstack till all done. - ! during the loop the opstack looks like - ! (optop_finish_addr) (destination_addr) (named_n) (named_n-1) .... - ! each iteration pops off one more element. - - - again: - dup_x2 - read_optop - if_icmpeq done - iconst_4 - iadd - dup_x2 - store_word - goto again - - done: - dup2_x1 ; pop2 ; pop !leave pointer on top. - - ! return to caller with varargs pointer as - ! the next argument and the restoring global0 as the next. - - read_global0 ; load_word - - ! restore returning pc and vars - read_global0 ; bipush 8; iadd; load_word - read_global0 ; bipush 4; iadd; load_word - - ! return to caller. - read_global1 - write_pc - #endif - - - #ifdef __LITTLE_ENDIAN__ - #define AL iload_1 - #define AH iload_0 - #define BL iload_3 - #define BH iload_2 - #else - #define AL iload_0 - #define AH iload_1 - #define BL iload_2 - #define BH iload_3 - #endif - #ifdef Lpjucmpdi2 - - ! like ucmpdi2, but returns <0,0,>0 depending on comparison input. - ! and returns answer on the stack, not in global1. - much like an - ! actual lucmp instruction would do if there was one. - ! big little - ! - ! vars-> 0 a low high - ! 1 a high low - ! 2 b low high - ! 3 b high low - ! - ! compares a to b - ! a > b return 1 - ! a = b return 0 - ! a < b return -1 - - .globl __pjucmpdi2 - __pjucmpdi2: - - ! first see if we can compare the numbers using - ! the signed instruction. - - AH - BH - if_icmpne high_words_diff - AL - BL - iucmp - return1 - - ! and low word if high word is equal. - - high_words_diff: - AH - BH - iucmp - return1 - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pj/linux.h gcc-3.3/gcc/config/pj/linux.h *** gcc-3.2.3/gcc/config/pj/linux.h 2002-04-15 20:27:36.000000000 +0000 --- gcc-3.3/gcc/config/pj/linux.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,36 **** - /* Definitions for a picoJava Linux-based GNU system. - Copyright (C) 2000, 2002 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* contributed by Steve Chamberlain, of Transmeta. sac@pobox.com. */ - - #define TARGET_LITTLE_ENDIAN_DEFAULT 1 - - #undef CPP_PREDEFINES - #undef STARTFILE_SPEC - #undef ENDFILE_SPEC - - #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__pj__ -D__gnu_linux__ -Dlinux -Asystem=posix" - #define STARTFILE_SPEC "crt1.o%s crti.o%s crtbegin.o%s" - #define ENDFILE_SPEC "crtend.o%s crtn.o%s" - - #undef WCHAR_TYPE_SIZE - #undef WCHAR_TYPE - #define WCHAR_TYPE "long int" - #define WCHAR_TYPE_SIZE BITS_PER_WORD --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pj/pj.c gcc-3.3/gcc/config/pj/pj.c *** gcc-3.2.3/gcc/config/pj/pj.c 2002-03-22 19:25:53.000000000 +0000 --- gcc-3.3/gcc/config/pj/pj.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1286 **** - /* Output routines for GCC for picoJava II - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Contributed by Steve Chamberlain (sac@pobox.com), of Transmeta. */ - - /* The picoJava architecture doesn't have general registers, it has an - operand stack. Any of the first 256 words on the operand stack between - the locations indicated by the vars register and the optop register - are accessible with one instruction, almost as if they were registers. - The opstack isn't aliased into memory, so deferecencing address of - something on the opstack is impossible. - - Small scalar incoming arguments to a function arrive on the operand - stack, large scalars and aggregates arrive in the `aggregate' - stack. The aggregate stack lives in normal memory. - - - just before a call after the call insn and frame setup. - - vars-> .... - - arg-5 vars->arg-5 - arg-4 arg-4 - arg-3 arg-3 - arg-2 arg-2 - arg-1 arg-1 - arg-0 arg-0 - target-addr old-vars - #arg words old-pc - optop-> saved globals - local-0 - local-1 - .... - optop-> - - This port generates code for a machine with 32 general purpose - registers, and on output changes the references to the fake registers - into offsets from the vars register. Because the opstack grows - downwards and all indexes are negated, some care has to be taken here - to deal with endian problems; for example after a call on a little endian - machine, an incoming DImode argument of value 0x1122334455667788 in - `register 0', would live on the opstack like this: - - vars - 0 0x11223344 - vars - 4 0x55667788 - vars - 8 old-vars - vars - 12 old-pc - - The picoJava instructon to read and put that onto the opstack as a - DImode value is `lload 0', yet the least significant word lives at - vars - 4, for which the instruction is `iload 1'. The incoming - argument code remembers which arguments arrive swapped in the - CUMULATIVE_ARGS structure. The information is used to fill in - pj_si_vars_offset_vec and pj_di_vars_offset_vec during the prologue - printing. - - Outgoing arguments are collected in fake `outgoing' registers, or - in the aggregate stack. The emitted code to write into an outgoing - register does nothing, which leaves the expression to be written on - the top of the opstack. GCC always evaluates arguments in the right - order, so nothing more needs to be done. */ - - - #include "config.h" - #include "system.h" - #include "rtl.h" - #include "tree.h" - #include "tm_p.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "real.h" - #include "insn-config.h" - #include "conditions.h" - #include "output.h" - #include "insn-attr.h" - #include "flags.h" - #include "except.h" - #include "function.h" - #include "recog.h" - #include "expr.h" - #include "optabs.h" - #include "toplev.h" - #include "basic-block.h" - #include "ggc.h" - #include "target.h" - #include "target-def.h" - - /* Compare insns in pj.md store the information needed to generate - branch instructions here. */ - rtx pj_cmp_op0; - rtx pj_cmp_op1; - enum machine_mode pj_cmp_mode; - - static void pj_output_rval PARAMS ((rtx, enum machine_mode, rtx)); - static void pj_output_store_into_lval PARAMS ((enum machine_mode mode, rtx op)); - static void pj_output_push_int PARAMS ((int)); - static void pj_output_load PARAMS ((enum machine_mode, int)); - static void pj_output_inc PARAMS ((rtx, int)); - static void pj_output_cnv_op PARAMS ((enum insn_code, rtx)); - static char mode_to_char PARAMS ((enum machine_mode)); - static void pj_output_varidx PARAMS ((enum machine_mode, int, int)); - static void pj_print_cond PARAMS ((enum rtx_code)); - static rtx *unique_src_operand PARAMS ((rtx *, rtx)); - - /* These vectors turn a register number into an offset from the vars - pointer register. */ - short pj_si_vars_offset_vec[FIRST_PSEUDO_REGISTER]; - short pj_di_vars_offset_vec[FIRST_PSEUDO_REGISTER]; - short pj_debugreg_renumber_vec[FIRST_PSEUDO_REGISTER]; - - /* Number of fake registers in the frame, used by prologue and epilogue - code. */ - static int nfakes; - - /* Whether anything has been printed to the current assembly output - line. */ - int pj_stuff_on_line; - - /* Initialize the GCC target structure. */ - - struct gcc_target targetm = TARGET_INITIALIZER; - - /* printf to the asm_out_file, with special format control characters - for decoding operands. - - %* - start of opcode - %d,%x,%c,%s - as printf - %X - address constant. - % - operand passed to pj_print_operand with code . */ - - static void - pj_printf VPARAMS ((const char *template, ...)) - { - register int c; - int ops_read = 0; - rtx operands[10]; - - VA_OPEN (argptr, template); - VA_FIXEDARG (argptr, const char *, template); - - while ((c = *template++)) - { - int was_stuff_on_line = pj_stuff_on_line; - pj_stuff_on_line = 1; - switch (c) - { - case '\n': - putc (c, asm_out_file); - pj_stuff_on_line = 0; - break; - default: - putc (c, asm_out_file); - break; - case '%': - { - switch (*template) - { - case '%': - putc ('%', asm_out_file); - template++; - pj_stuff_on_line = 1; - break; - case '*': - /* Marks start of opcode, tab out. */ - if (was_stuff_on_line) - fprintf (asm_out_file, "; "); - template++; - break; - case 'd': - template++; - fprintf (asm_out_file, "%d", va_arg (argptr, int)); - break; - case 'x': - template++; - fprintf (asm_out_file, "%x", va_arg (argptr, int)); - break; - case 'c': - template++; - fprintf (asm_out_file, "%c", va_arg (argptr, int)); - break; - case 's': - template++; - fputs (va_arg (argptr, const char *), asm_out_file); - break; - case 'X': - template++; - output_addr_const (asm_out_file, va_arg (argptr, rtx)); - break; - default: - { - int code = 0; - rtx send; - - if (ISALPHA (*template)) - code = *template++; - if (ISDIGIT (*template)) - { - int num = atoi (template); - template++; - while (ops_read <= num) - operands[ops_read++] = va_arg (argptr, rtx); - send = operands[num]; - } - else - send = va_arg (argptr, rtx); - - /* A null means leave the word on the stack, so there's - no need to do anything for that. */ - - if (send) - pj_print_operand (asm_out_file, send, code); - } - } - } - } - } - VA_CLOSE (argptr); - } - - /* Output code to efficiently push a single word integer constant onto - the opstack. */ - - static void - pj_output_push_int (val) - int val; - { - int low = ((val & 0x8000) ? ~0xffff : 0) | (val & 0xffff); - - if (low == -1) - pj_printf ("%*iconst_m1"); - else if (low >= 0 && low <= 5) - pj_printf ("%*iconst_%d", low); - else if (low >= -128 && low < 128) - pj_printf ("%*bipush %d", low); - else - pj_printf ("%*sipush %d", low); - - if ((low & 0xffff0000) != (val & 0xffff0000)) - pj_printf ("%*sethi 0x%x", (val >> 16) & 0xffff); - } - - /* Output code to add a constant to the value on the top of the - opstack. */ - - static void - pj_output_print_add_k (int size) - { - if (size >= 0) - { - pj_output_push_int (size); - pj_printf ("%*iadd"); - } - else - { - pj_output_push_int (-size); - pj_printf ("%*isub"); - } - } - - /* Output code to load the value pointed to by the top of stack onto - the stack. */ - - static void - pj_output_load (mode, uns) - enum machine_mode mode; - int uns; - { - int i; - switch (GET_MODE_SIZE (mode)) - { - case 1: - pj_printf (uns ? "%*load_ubyte" : "%*load_byte"); - break; - case 2: - pj_printf (uns ? "%*load_char" : "%*load_short"); - break; - case 8: - if (TARGET_TM_EXTENSIONS) - { - pj_printf ("%*tm_load_long"); - break; - } - /* Fall through. */ - default: - for (i = GET_MODE_SIZE (mode); i > 4; i -= 4) - { - pj_printf ("%*dup"); - pj_output_print_add_k (i - 4); - pj_printf ("%*load_word"); - pj_printf ("%*swap"); - } - pj_printf ("%*load_word"); - } - } - - /* Output code to increment the provided lval operand. */ - - static void - pj_output_inc (op, size) - rtx op; - int size; - { - if (STACK_REG_RTX_P (op)) - pj_printf ("%*iinc %d,%d", pj_si_vars_offset_vec[REGNO (op)], size); - else - { - pj_output_rval (op, SImode, 0); - pj_output_push_int (size); - pj_printf ("%*iadd"); - pj_output_store_into_lval (SImode, op); - } - } - - /* Output the text for a conversion operator. */ - - static void - pj_output_cnv_op (e, op) - enum insn_code e; - rtx op; - { - pj_printf ((const char *) insn_data[(int) e].output, 0, XEXP (op, 0)); - } - - /* Turn a machine_mode into an opcode modifier chararacter. */ - - static char - mode_to_char (mode) - enum machine_mode mode; - { - switch (mode) - { - case QImode: - case HImode: - case SImode: - return 'i'; - break; - case DImode: - return 'l'; - break; - case DFmode: - return 'd'; - break; - case SFmode: - return 'f'; - break; - default: - abort (); - } - } - - /* Output an index off the var register. If we're moving an 8 byte - value then reduce the index, since the picoJava instruction loading - the value uses the index of the highest part of the register as - it's name. */ - - static void - pj_output_varidx (mode, do_store, idx) - enum machine_mode mode; - int do_store; - int idx; - { - pj_printf ("%*%c%s%c%d", - mode_to_char (mode), - do_store ? "store" : "load", - (GET_MODE_SIZE (mode) == 4 || GET_MODE_SIZE (mode) == 8) - && idx <= 3 ? '_' : ' ', idx); - } - - /* Output an rvalue expression. */ - - static void - pj_output_rval (op, mode, outer_op) - rtx op; - enum machine_mode mode; - rtx outer_op; - { - enum rtx_code code = GET_CODE (op); - - optab tab; - - if (code == DIV && GET_MODE_CLASS (mode) == MODE_INT) - tab = sdiv_optab; - else - tab = code_to_optab[code]; - - if (code == PLUS) - { - pj_output_rval (XEXP (op, 0), mode, op); - pj_output_rval (XEXP (op, 1), mode, op); - pj_printf ("%*%cadd", mode_to_char (mode)); - } - else if (tab && tab->handlers[mode].insn_code != CODE_FOR_nothing) - { - const char *const template = - (const char *) insn_data[tab->handlers[mode].insn_code].output; - if (code == NEG) - pj_printf (template, 0, XEXP (op, 0)); - else - pj_printf (template, 0, XEXP (op, 0), XEXP (op, 1)); - } - else - switch (GET_CODE (op)) - { - case PC: - fprintf (asm_out_file, " pc "); - break; - - case CONST: - pj_output_rval (XEXP (op, 0), mode, op); - break; - - case MEM: - pj_output_rval (XEXP (op, 0), Pmode, op); - pj_output_load (mode, 0); - break; - - case SYMBOL_REF: - pj_printf ("%*ipush %X", op); - break; - - case REG: - switch (mode) - { - case SImode: - case SFmode: - case HImode: - case QImode: - if (pj_si_vars_offset_vec[REGNO (op)] >= 0) - pj_output_varidx (mode, 0, pj_si_vars_offset_vec[REGNO (op)]); - else - pj_printf ("%*read_%s", reg_names[REGNO (op)]); - break; - case DImode: - case DFmode: - if (pj_di_vars_offset_vec[REGNO (op)] >= 0) - pj_output_varidx (mode, 0, pj_di_vars_offset_vec[REGNO (op)]); - else - switch (REGNO (op)) - { - case G1_REG: - pj_printf ("%*read_global2"); - pj_printf ("%*read_global1"); - break; - - /* A 64 bit read of global0 gives global0 and - optop. */ - case G0_REG: - pj_printf ("%*read_optop"); - pj_printf ("%*read_global0"); - break; - - default: - abort (); - } - break; - default: - abort (); - } - break; - - case CONST_DOUBLE: - pj_printf (pj_standard_float_constant (op)); - break; - - case CONST_INT: - if (mode == SImode || mode == HImode || mode == QImode) - pj_output_push_int (INTVAL (op)); - else if (mode == DImode) - { - int v = INTVAL (op); - if (v == 1) - pj_printf ("%*lconst_1", 0); - else if (v == 0) - pj_printf ("%*lconst_0", 0); - else - { - rtx hi = GEN_INT (v < 0 ? -1 : 0); - rtx lo = op; - pj_output_rval (TARGET_LITTLE_ENDIAN ? hi : lo, SImode, op); - pj_output_rval (TARGET_LITTLE_ENDIAN ? lo : hi, SImode, op); - } - } - else - abort (); - break; - - case FLOAT_TRUNCATE: - pj_printf ("%S0%*d2f", XEXP (op, 0)); - break; - case LABEL_REF: - pj_printf ("%*ipush %X", XEXP (op, 0)); - break; - - case SUBREG: - pj_output_rval (alter_subreg (&op), mode, outer_op); - break; - - case POST_INC: - pj_output_rval (XEXP (op, 0), mode, op); - pj_output_inc (XEXP (op, 0), GET_MODE_SIZE (GET_MODE (outer_op))); - break; - - case POST_DEC: - pj_output_rval (XEXP (op, 0), mode, op); - pj_output_inc (XEXP (op, 0), -GET_MODE_SIZE (GET_MODE (outer_op))); - break; - - case PRE_INC: - pj_output_inc (XEXP (op, 0), GET_MODE_SIZE (GET_MODE (outer_op))); - pj_output_rval (XEXP (op, 0), mode, op); - break; - - case PRE_DEC: - if (OPTOP_REG_RTX_P (XEXP (op, 0))) - pj_output_rval (XEXP (op, 0), mode, op); - else if (STACK_REG_RTX_P (XEXP (op, 0))) - { - pj_output_inc (XEXP (op, 0), - -GET_MODE_SIZE (GET_MODE (outer_op))); - pj_output_rval (XEXP (op, 0), mode, op); - } - else - { - pj_printf ("%S0", XEXP (op, 0)); - pj_output_print_add_k (-GET_MODE_SIZE (GET_MODE (outer_op))); - pj_printf ("%*dup%R0", XEXP (op, 0)); - } - break; - - case FIX: - pj_output_cnv_op (fixtrunctab[GET_MODE (XEXP (op, 0))][mode][0], op); - break; - - case FLOAT: - if (mode == DFmode && GET_CODE (XEXP (op, 0)) == CONST_INT) - pj_output_cnv_op (floattab[mode][SImode][0], op); - else - pj_output_cnv_op (floattab[mode][GET_MODE (XEXP (op, 0))][0], op); - break; - - case FLOAT_EXTEND: - case SIGN_EXTEND: - /* Sign extending from a memop to register is automatic. */ - if (mode == SImode && GET_CODE (XEXP (op, 0)) == MEM) - pj_output_rval (XEXP (op, 0), GET_MODE (XEXP (op, 0)), op); - else - pj_output_cnv_op (extendtab[mode][GET_MODE (XEXP (op, 0))][0], op); - break; - - case ZERO_EXTEND: - pj_output_cnv_op (extendtab[mode][GET_MODE (XEXP (op, 0))][1], op); - break; - - default: - abort (); - break; - } - } - - /* Store the top of stack into the lval operand OP. */ - - static void - pj_output_store_into_lval (mode, op) - enum machine_mode mode; - rtx op; - { - if (GET_CODE (op) == REG) - { - int rn = REGNO (op); - - /* Outgoing values are left on the stack and not written - anywhere. */ - if (!OUTGOING_REG_RTX_P (op)) - { - switch (GET_MODE (op)) - { - case SImode: - case QImode: - case HImode: - case SFmode: - if (pj_si_vars_offset_vec[rn] >= 0) - pj_output_varidx (mode, 1, pj_si_vars_offset_vec[rn]); - else - pj_printf ("%*write_%s", reg_names[rn]); - break; - case DImode: - case DFmode: - if (pj_di_vars_offset_vec[rn] >= 0) - pj_output_varidx (mode, 1, pj_di_vars_offset_vec[rn]); - else - switch (rn) - { - case G1_REG: - pj_printf ("%*write_global1"); - pj_printf ("%*write_global2"); - break; - default: - abort (); - } - break; - default: - abort (); - } - } - } - else - { - pj_output_rval (XEXP (op, 0), Pmode, op); - - switch (GET_MODE_SIZE (mode)) - { - case 1: - pj_printf ("%*store_byte", 0); - break; - case 2: - pj_printf ("%*store_short", 0); - break; - case 8: - if (TARGET_TM_EXTENSIONS) - { - pj_printf ("%*tm_store_long"); - break; - } - /* Fall through. */ - default: - { - int i; - for (i = GET_MODE_SIZE (mode); i > 4; i -= 4) - { - pj_printf ("%*dup_x1", 0); - pj_printf ("%*store_word", 0); - pj_printf ("%*iconst_4", 0); - pj_printf ("%*iadd", 0); - } - } - pj_printf ("%*store_word", 0); - break; - } - } - } - - /* Print a condition, unsigned and signed have the same text because - the unsigned operands have been run through icmp first. */ - - static void - pj_print_cond (code) - enum rtx_code code; - { - switch (code) - { - case EQ: - fputs ("eq", asm_out_file); - break; - case NE: - fputs ("ne", asm_out_file); - break; - case GT: - case GTU: - fputs ("gt", asm_out_file); - break; - case GE: - case GEU: - fputs ("ge", asm_out_file); - break; - case LT: - case LTU: - fputs ("lt", asm_out_file); - break; - case LE: - case LEU: - fputs ("le", asm_out_file); - break; - default: - abort (); - } - } - /* Print operand X (an rtx) in assembler syntax to file STREAM - according to modifier CODE. - - C emit the first part of a Check_call pseudop. - D emit operand, if no mode, assume DImode. - E emit the second part of a check_call pseudop. - I print the XEXP (X, 0) Inside of the operand. - J print Just the integer or register part of an operand, for iinc. - P emit source is SI padded to DI with 0, used for unsigned mod and divide. - R emit the operand as an lval Result. - S emit Source operand, if no mode, assume SImode. - X nan choice suffix for floating point comparision. - Y condition name from op. - Z Y, reversed. - * marks start of opcode. */ - - void - pj_print_operand (stream, x, code) - FILE *stream; - rtx x; - int code; - { - static int last_call_known; - switch (code) - { - case 'C': - if (GET_CODE (x) == SYMBOL_REF) - { - last_call_known = 1; - pj_printf ("%*.check_call %0", x); - } - else - last_call_known = 0; - break; - - case 'D': - pj_output_rval (x, - GET_MODE (x) == VOIDmode ? DImode : GET_MODE (x), - NULL_RTX); - break; - - case 'E': - if (last_call_known) - pj_printf (",%d", INTVAL (x)); - break; - - case 'I': - pj_output_rval (XEXP (x, 0), GET_MODE (XEXP (x, 0)), NULL_RTX); - break; - - case 'J': - if (GET_CODE (x) == CONST_INT) - pj_printf ("%d", INTVAL (x)); - else if (GET_CODE (x) == REG) - pj_printf ("%d", pj_si_vars_offset_vec[REGNO (x)]); - else - abort (); - break; - - case 'P': - if (TARGET_LITTLE_ENDIAN) - pj_printf ("%*iconst_0", 0); - pj_output_rval (x, - GET_MODE (x) == VOIDmode ? SImode : GET_MODE (x), - NULL_RTX); - if (!TARGET_LITTLE_ENDIAN) - pj_printf ("%*iconst_0", 0); - break; - - case 'R': - pj_output_store_into_lval (GET_MODE (x), x); - break; - - case 'S': - pj_output_rval (x, - GET_MODE (x) == VOIDmode ? SImode : GET_MODE (x), - NULL_RTX); - break; - - case 'X': - fputc (GET_CODE (x) == LT || GET_CODE (x) == LE ? 'g' : 'l', stream); - break; - - case 'Y': - pj_print_cond (GET_CODE (x)); - break; - - case 'Z': - pj_print_cond (reverse_condition (GET_CODE (x))); - break; - - case '*': - pj_printf ("%*"); - break; - - default: - output_addr_const (stream, x); - break; - } - } - - /* Return in an rtx the number of words pushed onto the optop to be - used as the word count in a call insn. (NEXT_ARG_REG is NULL when - called from expand_builtin_apply). */ - - rtx - pj_workout_arg_words (stack_size, next_arg_reg) - rtx stack_size ATTRIBUTE_UNUSED; - rtx next_arg_reg; - { - return GEN_INT ((next_arg_reg ? REGNO (next_arg_reg) - O0_REG : 0) + 2); - } - - /* Handle the INCOMING_FUNCTION_ARG macro. - Determine where to put an argument to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). */ - - rtx - pj_function_incoming_arg (cum, mode, passed_type, named_arg) - CUMULATIVE_ARGS *cum; - enum machine_mode mode; - tree passed_type ATTRIBUTE_UNUSED; - int named_arg ATTRIBUTE_UNUSED; - { - int arg_words = PJ_ARG_WORDS (mode); - - /* If the whole argument will fit into registers, return the first - register needed. Also fill in the arg_adjust information so that - we can work out the right offset to use when looking at the - insides of a DI or DF value. */ - - if (cum->total_words + arg_words <= ARGS_IN_REGS) - { - int i; - if (mode == DImode || mode == DFmode) - { - cum->arg_adjust[cum->total_words + 0] = 1; - cum->arg_adjust[cum->total_words + 1] = -1; - } - else - for (i = 0; i < arg_words; i++) - cum->arg_adjust[cum->total_words + i] = 0; - - return gen_rtx (REG, mode, I0_REG + cum->total_words); - } - return NULL_RTX; - } - - /* Output code to add two SImode values. Deals carefully with the the common - case of moving the optop. */ - - const char * - pj_output_addsi3 (operands) - rtx *operands; - { - if (OPTOP_REG_RTX_P (operands[0]) && OPTOP_REG_RTX_P (operands[1]) - && GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) >= -32 && INTVAL (operands[2]) <= 32) - { - static struct - { - const char *two; - const char *one; - } - name[2] = - { - { "pop2", "pop"}, - { "lconst_0", "iconst_0"} - }; - int size = INTVAL (operands[2]); - int d = 0; - - if (size < 0) - { - d = 1; - size = -size; - } - - for (; size >= 8; size -= 8) - output_asm_insn (name[d].two, 0); - - - if (size > 0) - output_asm_insn (name[d].one, 0); - - return ""; - } - - if (STACK_REG_RTX_P (operands[0]) - && rtx_equal_p (operands[0], operands[1]) - && GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) <= 127) - { - return "iinc %J0,%J2"; - } - - return "%S1%S2%*iadd%R0"; - } - - /* Generate rtl for the prologue of the current function. */ - - void - pj_expand_prologue () - { - int i; - int off = 0; - int arg_words = current_function_args_info.named_words; - - memset (pj_si_vars_offset_vec, -1, sizeof (pj_si_vars_offset_vec)); - memset (pj_di_vars_offset_vec, -1, sizeof (pj_di_vars_offset_vec)); - - /* Work out the register numbers of the named arguments. */ - for (i = 0; i < current_function_args_info.named_words; i++) - { - pj_debugreg_renumber_vec[I0_REG + i] - = off + R0_REG + current_function_args_info.arg_adjust[i]; - pj_si_vars_offset_vec[I0_REG + i] - = off + current_function_args_info.arg_adjust[i]; - pj_di_vars_offset_vec[I0_REG + i] = off; - off++; - } - - if (current_function_varargs || current_function_stdarg) - { - /* If the function is varadic we need to call the vhelper - function. vhelper pops off the unnamed argument words from - the opstack and puts them onto the the aggregate stack. The - unnamed words are replacedwith two extra arguments, a pointer - to the aggreagate stack for the first vararg and the original - global0 value. */ - - emit_insn (gen_varargs (GEN_INT (arg_words * 4))); - pj_si_vars_offset_vec[VA_REG] = off++; - off++; - arg_words += 2; - } - - /* Skip over the return pc and old vars in the frame. */ - off += 2; - - /* Work out the register numbers and offsets from the var pointer - for the normal registers. */ - nfakes = 0; - - for (i = LAST_I_REG; i >= R0_REG; i--) - if (regs_ever_live[i] && pj_si_vars_offset_vec[i] == -1) - { - nfakes++; - pj_si_vars_offset_vec[i] = off; - pj_di_vars_offset_vec[i] = off - 1; - pj_debugreg_renumber_vec[i] = off + R0_REG; - off++; - } - - if (TARGET_TEST) - { - fprintf (asm_out_file, "\n\t! args %d, size %d, fakes %d\n", - arg_words, - get_frame_size () / 4, - nfakes); - - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (pj_si_vars_offset_vec[i] >= 0) - fprintf (asm_out_file, "\t!vars - %d %d: %s\n", - pj_si_vars_offset_vec[i], - pj_di_vars_offset_vec[i], - reg_names[i]); - } - - /* Make room on the opstack for the fake registers. */ - if (TARGET_TM_EXTENSIONS) - RTX_FRAME_RELATED_P (emit_insn (gen_tm_frame (GEN_INT (arg_words), - GEN_INT (nfakes)))) = 1; - else - RTX_FRAME_RELATED_P (emit_insn - (gen_addsi3 - (gen_rtx_REG (SImode, OPTOP_REG), - gen_rtx_REG (SImode, OPTOP_REG), - GEN_INT (-nfakes * 4)))) = 1; - - - if (frame_pointer_needed) - emit_move_insn (frame_pointer_rtx, stack_pointer_rtx); - - if (get_frame_size ()) - RTX_FRAME_RELATED_P (emit_insn (gen_addsi3 (stack_pointer_rtx, - stack_pointer_rtx, - GEN_INT - (-get_frame_size ())))) = 1; - - emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode, OPTOP_REG))); - } - - /* Generate rtl for the epilogue of the current function. */ - - void - pj_expand_epilogue () - { - if (frame_pointer_needed) - emit_move_insn (stack_pointer_rtx, frame_pointer_rtx); - else if (get_frame_size ()) - emit_insn (gen_addsi3 (stack_pointer_rtx, - stack_pointer_rtx, GEN_INT (get_frame_size ()))); - if (nfakes) - emit_insn (gen_addsi3 (gen_rtx_REG (SImode, OPTOP_REG), - gen_rtx_REG (SImode, OPTOP_REG), - GEN_INT (nfakes * 4))); - - - /* If this is a varargs function, then global0 is stashed away on - the top of the optop stack as the last secret argument by the - __vhelper. Pop off the va pointer provided too. */ - - if (current_function_varargs || current_function_stdarg) - emit_insn (gen_varargs_finish - (GEN_INT (current_function_args_info.named_words + 1))); - - emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode, OPTOP_REG))); - } - - /* Return the opcode name for an instruction to load a standard - floating point constant, or NULL. */ - - const char * - pj_standard_float_constant (op) - rtx op; - { - REAL_VALUE_TYPE r; - enum machine_mode mode = GET_MODE (op); - - if (GET_CODE (op) != CONST_DOUBLE || (mode != DFmode && mode != SFmode)) - return NULL; - - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - - if (REAL_VALUES_EQUAL (r, dconst0) && !REAL_VALUE_MINUS_ZERO (r)) - return mode == DFmode ? "%*dconst_0" : "%*fconst_0"; - - if (REAL_VALUES_EQUAL (r, dconst1)) - return mode == DFmode ? "%*dconst_1" : "%*fconst_1"; - - if (REAL_VALUES_EQUAL (r, dconst2)) - return mode == DFmode ? 0 : "%*fconst_2"; - - return NULL; - } - - /* Read the value at the current address, and decrement by the size. - The function is interesting because we're reading from high memory to low memory - and have to adjust the addresses of reads of 8 byte values - accordingly. */ - - rtx - pj_expand_builtin_va_arg (valist, type) - tree valist; - tree type; - { - tree addr_tree, t; - HOST_WIDE_INT align; - HOST_WIDE_INT rounded_size; - rtx addr; - - /* Compute the rounded size of the type. */ - align = PARM_BOUNDARY / BITS_PER_UNIT; - rounded_size = (((int_size_in_bytes (type) + align - 1) / align) * align); - - /* Get AP. */ - addr_tree = valist; - addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL); - addr = copy_to_reg (addr); - - /* Aggregates and large scalars are passed by reference. */ - if (AGGREGATE_TYPE_P (type) || rounded_size > 8) - { - addr = gen_rtx_MEM (Pmode, addr); - rounded_size = 4; - } - - /* adjust address to cope with double word sizes */ - if (rounded_size > 4) - addr = gen_rtx_PLUS (Pmode, addr, GEN_INT (-4)); - - /* Compute new value for AP; AP = AP - SIZE */ - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, - build (MINUS_EXPR, TREE_TYPE (valist), valist, - build_int_2 (rounded_size, 0))); - - TREE_SIDE_EFFECTS (t) = 1; - - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - return addr; - } - - /* Return nonzero if the operand is valid as a source operand; it's - general and it's not an outgoing argument register. */ - - int - pj_source_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return !OUTGOING_REG_RTX_P (op) && general_operand (op, mode); - } - - /* Return nonzero if the operator is a signed compare. */ - - int - pj_signed_comparison_operator (op, mode) - rtx op; - enum machine_mode mode; - { - if (mode != GET_MODE (op)) - return 0; - - switch (GET_CODE (op)) - { - case EQ: - case NE: - case LE: - case LT: - case GE: - case GT: - return 1; - default: - return 0; - } - } - - /* Return nonzero if the operator is an unsigned compare. */ - - int - pj_unsigned_comparison_operator (op, mode) - rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; - { - if (mode != GET_MODE (op)) - return 0; - - switch (GET_CODE (op)) - { - case GTU: - case GEU: - case LTU: - case LEU: - return 1; - default: - return 0; - } - } - - /* Helper function for pj_machine_dependent_reorg. Find the one - instance of register OP in the source part of PAT. If there are no - copies return NULL, if there are more than one, return NOT_UNIQUE. */ - - #define NOT_UNIQUE (&const0_rtx) - - static rtx * - unique_src_operand (pat, reg) - rtx *pat; - rtx reg; - { - register rtx *result = 0; - register const char *fmt; - register int i; - register int j; - - if (GET_CODE (*pat) == SET) - { - if (GET_CODE (XEXP (*pat, 0)) == MEM) - result = unique_src_operand (&XEXP (SET_DEST (*pat), 0), reg); - pat = &SET_SRC (*pat); - } - - if (GET_CODE (*pat) == REG && REGNO (*pat) == REGNO (reg)) - return pat; - - fmt = GET_RTX_FORMAT (GET_CODE (*pat)); - for (i = GET_RTX_LENGTH (GET_CODE (*pat)) - 1; i >= 0; i--) - { - if (fmt[i] == 'e') - { - rtx *new_result = unique_src_operand (&XEXP (*pat, i), reg); - - if (new_result) - { - if (result) - return NOT_UNIQUE; - result = new_result; - } - } - else if (fmt[i] == 'E') - { - for (j = XVECLEN (*pat, i) - 1; j >= 0; j--) - { - rtx *new_result = - unique_src_operand (&XVECEXP (*pat, i, j), reg); - - if (new_result) - { - if (result) - return NOT_UNIQUE; - result = new_result; - } - } - } - } - return result; - } - - /* Clean up the instructions to remove unneeded loads and stores. - - For example, rewrite - - iload a; iload b; iadd; istore z - iload z; iload c; iadd; istore z - - as - - iload a; iload b; iadd ; iload c; iadd; istore z - - This function moves a cursor over each instruction, inspecting the - LOG_LINKS. Each of the cursor's LOG_LINK incoming instructions are - inspected, any which have a simple register destination which is - also used as a source in the cursor instruction, and aren't used - again between the the incoming instruction and the cursor, and - which become dead or set after the cursor get their sources - substituted into the position of the source register in the cursor - instruction. */ - - void - pj_machine_dependent_reorg (insns) - rtx insns; - { - rtx cursor; - - if (!optimize || !TARGET_REORG) - return; - - for (cursor = insns; cursor; cursor = NEXT_INSN (cursor)) - { - rtx links; - rtx cursor_pat; - - /* We only care about INSNs, JUMP_INSNs. Ignore any special USE insns. */ - - if ((GET_CODE (cursor) != INSN && GET_CODE (cursor) != JUMP_INSN) - || GET_CODE (cursor_pat = PATTERN (cursor)) == USE - || GET_CODE (cursor_pat) == CLOBBER - || GET_CODE (cursor_pat) == ADDR_VEC - || GET_CODE (cursor_pat) == ADDR_DIFF_VEC) - continue; - - for (links = LOG_LINKS (cursor); links; links = XEXP (links, 1)) - { - rtx prev = XEXP (links, 0); - rtx prev_pat; - rtx prev_dest; - rtx prev_src; - rtx *dst_place; - - if (GET_CODE (prev) == INSN - && GET_CODE (prev_pat = PATTERN (prev)) == SET - && GET_CODE (prev_dest = SET_DEST (prev_pat)) == REG - && dead_or_set_p (cursor, prev_dest) - && !reg_used_between_p (prev_dest, prev, cursor) - && no_labels_between_p (prev, cursor) - && no_jumps_between_p (prev, cursor) - && !modified_between_p ((prev_src = SET_SRC (prev_pat)), prev, - cursor) - && (dst_place = unique_src_operand (&cursor_pat, prev_dest)) - && dst_place != NOT_UNIQUE - && REGNO (prev_dest) != OPTOP_REG - && GET_MODE (prev_dest) != XFmode - && GET_MODE (*dst_place) == GET_MODE (SET_DEST (prev_pat))) - { - *dst_place = SET_SRC (prev_pat); - PUT_CODE (prev, NOTE); - NOTE_LINE_NUMBER (prev) = NOTE_INSN_DELETED; - } - } - } - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pj/pj.h gcc-3.3/gcc/config/pj/pj.h *** gcc-3.2.3/gcc/config/pj/pj.h 2002-02-20 18:31:20.000000000 +0000 --- gcc-3.3/gcc/config/pj/pj.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1294 **** - /* Definitions of target machine for GNU compiler for picoJava - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - /* Contributed by Steve Chamberlain of Transmeta (sac@pobox.com). */ - - - #define TARGET_VERSION fputs ("(picoJava)", stderr); - - /* We support two different default configurations. */ - #undef ASM_SPEC - #ifdef TARGET_LITTLE_ENDIAN_DEFAULT - #define CPP_SPEC "%{mb:-D__BIG_ENDIAN__ }%{!mb:-D__LITTLE_ENDIAN__ }" - #define ASM_SPEC "%{mb:-EB }%{!mb:-EL }" - #else - #define CPP_SPEC "%{ml:-D__LITTLE_ENDIAN__ }%{!ml:-D__BIG_ENDIAN__}" - #define ASM_SPEC "%{ml:-EL } %{!ml:-EB }" - #endif - - #ifndef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__ELF__ -D__pj__ -Asystem=posix" - #endif - - /* Run-time compilation parameters selecting different hardware subsets. */ - - extern int target_flags; - - #define LITTLE_ENDIAN_BIT (1<<0) - #define EXTENSIONS_BIT (1<<1) - #define PJ_TEST_BIT (1<<2) - #define REORG_BIT (1<<3) - - /* Nonzero if generating code for a little endian pico java. */ - - #define TARGET_LITTLE_ENDIAN (target_flags & LITTLE_ENDIAN_BIT) - - /* Nonzero to turn on internal tests. */ - - #define TARGET_TEST (target_flags & PJ_TEST_BIT) - - /* Nonzero to turn on picoJava extensions. */ - - #define TARGET_TM_EXTENSIONS (target_flags & EXTENSIONS_BIT) - - /* Nonzero to turn on the reorganization pass. */ - - #define TARGET_REORG (target_flags & REORG_BIT) - - #ifdef TARGET_LITTLE_ENDIAN_DEFAULT - #define TARGET_DEFAULT (LITTLE_ENDIAN_BIT|EXTENSIONS_BIT|REORG_BIT) - #else - #define TARGET_DEFAULT REORG_BIT - #endif - - #define TARGET_SWITCHES \ - { {"l", LITTLE_ENDIAN_BIT, \ - N_("Generate little endian data") }, \ - {"b", -LITTLE_ENDIAN_BIT, \ - N_("Generate big endian data") }, \ - {"t", PJ_TEST_BIT, \ - N_("Turn on maintainer testing code") }, \ - {"ext", EXTENSIONS_BIT, \ - N_("Enable Transmeta picoJava extensions") }, \ - {"no-ext", -EXTENSIONS_BIT, \ - N_("Disable Transmeta picoJava extensions") }, \ - {"no-reorg", -REORG_BIT, \ - N_("Disable reorganization pass") }, \ - {"", TARGET_DEFAULT, 0 }} - - /* Sometimes certain combinations of command options do not make - sense on a particular target machine. You can define a macro - `OVERRIDE_OPTIONS' to take account of this. This macro, if - defined, is executed once just after all the command options have - been parsed. - - Don't use this macro to turn on various extra optimizations for - `-O'. That is what `OPTIMIZATION_OPTIONS' is for. - - We take this chance to register the global variables with the garbage - collector. */ - - #define OVERRIDE_OPTIONS \ - do { \ - ggc_add_rtx_root (&pj_cmp_op0, 1); \ - ggc_add_rtx_root (&pj_cmp_op1, 1); \ - } while (0) - - /* Define this to change the optimizations performed by default. */ - #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \ - do { \ - if (optimize) \ - flag_force_addr = 1; \ - } while (0) - - /* Target machine storage layout. */ - - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - - /* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. */ - #define BITS_BIG_ENDIAN 0 - - /* Define this if most significant byte of a word is the lowest numbered. */ - #define BYTES_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) - - /* Define this if most significant word of a multiword number is the lowest - numbered. */ - #define WORDS_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) - - /* Define this to set the endianness to use in libgcc2.c, which can - not depend on target_flags. */ - #if defined(TARGET_LITTLE_ENDIAN_DEFAULT) - #define LIBGCC2_WORDS_BIG_ENDIAN 0 - #else - #define LIBGCC2_WORDS_BIG_ENDIAN 1 - #endif - - /* Number of bits in an addressable storage unit. */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - #define MAX_BITS_PER_WORD 32 - - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD 4 - - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - #define PARM_BOUNDARY 32 - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #define STACK_BOUNDARY 32 - - /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 8 - - /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 32 - - /* No data type wants to be aligned rounder than this. */ - #define BIGGEST_ALIGNMENT 32 - - /* The best alignment to use in cases where we have a choice. */ - #define FASTEST_ALIGNMENT 32 - - /* Make strings word-aligned so strcpy from constants will be faster. */ - #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ - ((TREE_CODE (EXP) == STRING_CST \ - && (ALIGN) < FASTEST_ALIGNMENT) \ - ? FASTEST_ALIGNMENT : (ALIGN)) - - /* Make arrays of chars word-aligned for the same reasons. */ - #define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ - && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN)) - - /* Set this non-zero if move instructions will actually fail to work - when given unaligned data. */ - #define STRICT_ALIGNMENT 1 - - - /* Standard register usage. */ - - /* Enumerate the hardware registers. */ - - enum - { - R0_REG, R1_REG, R2_REG, R3_REG, - R4_REG, R5_REG, R6_REG, R7_REG, - R8_REG, R9_REG, R10_REG, R11_REG, - R12_REG, R13_REG, R14_REG, R15_REG, - - R16_REG, R17_REG, R18_REG, R19_REG, - R20_REG, R21_REG, R22_REG, R23_REG, - R24_REG, R25_REG, R26_REG, R27_REG, - R28_REG, R29_REG, R30_REG, R31_REG, - - I0_REG, I1_REG, I2_REG, I3_REG, - I4_REG, I5_REG, I6_REG, I7_REG, - I8_REG, I9_REG, I10_REG, I11_REG, - I12_REG, I13_REG, I14_REG, I15_REG, - - I16_REG, I17_REG, I18_REG, I19_REG, - I20_REG, I21_REG, I22_REG, I23_REG, - I24_REG, I25_REG, I26_REG, I27_REG, - I28_REG, I29_REG, I30_REG, ISC_REG, - - G0_REG, G1_REG, G2_REG, G3_REG, - G4_REG, G5_REG, G6_REG, G7_REG, - VARS_REG, OPTOP_REG, SC_REG, PC_REG, - TICKS_REG, SLOW_REG, VA_REG, D3_REG, - - D4_REG, D5_REG, D6_REG, D7_REG, - Q0_REG, Q1_REG, Q2_REG, Q3_REG, - P0_REG, P1_REG, P2_REG, P3_REG, - P4_REG, P5_REG, P6_REG, P7_REG, - - O0_REG, O1_REG, O2_REG, O3_REG, - O4_REG, O5_REG, O6_REG, O7_REG, - O8_REG, O9_REG, O10_REG, O11_REG, - O12_REG, O13_REG, O14_REG, O15_REG, - - O16_REG, O17_REG, O18_REG, O19_REG, - O20_REG, O21_REG, O22_REG, O23_REG, - O24_REG, O25_REG, O26_REG, O27_REG, - O28_REG, O29_REG, O30_REG, OSC_REG, - - LAST_O_REG=OSC_REG, - LAST_R_REG=R31_REG, - LAST_I_REG=ISC_REG, - LAST_S_REG=P7_REG - - }; - - /* Useful predicates. */ - - #define STACK_REGNO_P(REGNO) \ - (((unsigned) (REGNO)) <= LAST_I_REG) - - #define OUTGOING_REGNO_P(REGNO) \ - (((REGNO) >= O0_REG) && ((REGNO) <= LAST_O_REG)) - - #define INCOMING_REGNO_P(REGNO) \ - (((REGNO) >= I0_REG) && ((REGNO) <= LAST_I_REG)) - - #define STACK_REG_RTX_P(RTX) \ - (GET_CODE (RTX) == REG && STACK_REGNO_P (REGNO (RTX))) - - #define OUTGOING_REG_RTX_P(RTX) \ - (GET_CODE (RTX) == REG && OUTGOING_REGNO_P (REGNO (RTX))) - - #define OPTOP_REG_RTX_P(RTX) \ - (GET_CODE (RTX) == REG && REGNO (RTX) == OPTOP_REG) - - #define FIRST_PSEUDO_REGISTER 128 - - /* 1 for registers that have pervasive standard uses - and are not available for the register allocator. */ - - #define FIXED_REGISTERS \ - { \ - 0,0,0,0, 0,0,0,0, /* r0 .. r7 */ \ - 0,0,0,0, 0,0,0,0, /* r8 .. r15 */ \ - 0,0,0,0, 0,0,0,0, /* r16.. r23 */ \ - 0,0,0,0, 0,0,0,0, /* r24.. r31 */ \ - \ - 0,0,0,0, 0,0,0,0, /* i0 .. i7 */ \ - 0,0,0,0, 0,0,0,0, /* i8 .. i15 */ \ - 0,0,0,0, 0,0,0,0, /* i16.. i23 */ \ - 0,0,0,0, 0,0,0,0, /* i24.. i31 */ \ - \ - 1,0,0,1, 1,1,1,1, /* g0 .. g7 */ \ - 1,1,1,1, 1,1,1,1, /* vars, optop, sc, pc, ticks, slow, va, sgo */ \ - 1,1,1,1, 1,1,1,1, /* d4 d5 d6 ap p0 p1 p2 p3 */ \ - 1,1,1,1, 1,1,1,1, /* q1 .. q7 */ \ - \ - 0,0,0,0, 0,0,0,0, /* o0 .. o7 */ \ - 0,0,0,0, 0,0,0,0, /* o8 .. o15 */ \ - 0,0,0,0, 0,0,0,0, /* o16.. o23 */ \ - 0,0,0,0, 0,0,0,0 } /* o24.. o31 */ - - - /* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. - - We pretend that some standard registers are call clobbered so the - exception handler code has somewhere to play. */ - - #define CALL_USED_REGISTERS \ - { \ - 0,0,0,0, 0,0,0,0, /* r0 ..r7 */ \ - 0,0,0,0, 0,0,0,0, /* r8 ..r15 */ \ - 0,0,0,0, 1,1,1,1, /* r16..r23 */ \ - 1,1,1,1, 1,1,1,1, /* r24..r31 */ \ - \ - 0,0,0,0, 0,0,0,0, /* i0 ..i7 */ \ - 0,0,0,0, 0,0,0,0, /* i8 ..i15 */ \ - 0,0,0,0, 0,0,0,0, /* i16..i23 */ \ - 0,0,0,0, 0,0,0,0, /* i24..i31 */ \ - \ - 1,1,1,1, 0,0,0,0, /* g0 ..g7 */ \ - 1,1,1,1, 1,1,1,1, /* vars, optop, sc, pc, ticls, slow, va, sgo */ \ - 1,1,1,1, 1,1,1,1, /* d4 d5 d6 ap p0..p3*/ \ - 1,1,1,1, 1,1,1,1, /* q0..q7 */ \ - \ - 1,1,1,1, 1,1,1,1, /* o0 ..o7 */ \ - 1,1,1,1, 1,1,1,1, /* o8 ..o15 */ \ - 1,1,1,1, 1,1,1,1, /* o16..o23 */ \ - 1,1,1,1, 1,1,1,1 } /* o24..o31 */ - - /* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. */ - - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. - - We can allow any mode in the general register or the result - register. It's only safe to put up to 4 bytes values elsewhere. */ - - #define HARD_REGNO_MODE_OK(REGNO, MODE) \ - (((REGNO) <= LAST_R_REG || (REGNO) == G1_REG || GET_MODE_SIZE(MODE) <= 4 ) && !OUTGOING_REGNO_P(REGNO)) - - /* Value is 1 if it is a good idea to tie two pseudo registers - when one has mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. */ - #define MODES_TIEABLE_P(MODE1, MODE2) 1 - - /* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - - /* Define this if the program counter is overloaded on a register. */ - #define PC_REGNUM PC_REG - - /* Register to use for pushing function arguments. */ - #define STACK_POINTER_REGNUM G0_REG - - /* Base register for access to local variables of the function. */ - #define FRAME_POINTER_REGNUM R31_REG - - /* Base register for access to arguments of the function. */ - #define ARG_POINTER_REGNUM R30_REG - - /* Register in which the static-chain is passed to a function. */ - #define STATIC_CHAIN_REGNUM G1_REG - - /* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms may be - accessed via the stack pointer) in functions that seem suitable. */ - #define FRAME_POINTER_REQUIRED 0 - - /* This is an array of structures. Each structure initializes one pair - of eliminable registers. The "from" register number is given first, - followed by "to". Eliminations of the same "from" register are listed - in order of preference. */ - - #define ELIMINABLE_REGS \ - { { VA_REG, STACK_POINTER_REGNUM }, \ - { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ - { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM } } - - /* Given FROM and TO register numbers, say whether this elimination - is allowed. */ - #define CAN_ELIMINATE(FROM, TO) 1 - - /* Define the offset between two registers, one to be eliminated, and the other - its replacement, at the start of a routine. */ - #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - OFFSET = (((FROM) == FRAME_POINTER_REGNUM) ? get_frame_size() : 0) - - /* For picoJava we have to save 12 bytes of information for a non local - jump. */ - - #define STACK_SAVEAREA_MODE(x) ((x)==SAVE_NONLOCAL ? XFmode : Pmode) - - /* If the structure value address is not passed in a register, define - `STRUCT_VALUE' as an expression returning an RTX for the place - where the address is passed. If it returns 0, the address is - passed as an "invisible" first argument. */ - #define STRUCT_VALUE 0 - - /* A C expression which can inhibit the returning of certain function - values in registers, based on the type of value. A nonzero value - says to return the function value in memory, just as large - structures are always returned. Here TYPE will be a C expression - of type `tree', representing the data type of the value. - - Note that values of mode `BLKmode' must be explicitly handled by - this macro. Also, the option `-fpcc-struct-return' takes effect - regardless of this macro. On most systems, it is possible to - leave the macro undefined; this causes a default definition to be - used, whose value is the constant 1 for `BLKmode' values, and 0 - otherwise. - - Do not use this macro to indicate that structures and unions - should always be returned in memory. You should instead use - `DEFAULT_PCC_STRUCT_RETURN' to indicate this. */ - #define RETURN_IN_MEMORY(TYPE) \ - ((TYPE_MODE (TYPE) == BLKmode) || int_size_in_bytes (TYPE) > 8) - - /* Don't default to pcc-struct-return, because we have already specified - exactly how to return structures in the RETURN_IN_MEMORY macro. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 - - /* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. */ - - enum reg_class - { - NO_REGS, - OUT_REGS, /* Registers for passing outgoing parameters. */ - STD_REGS, /* Standard registers, on opstack. */ - ARG_REGS, /* Incoming argument registers. */ - SRC_REGS, /* All registers valid as a source. */ - DST_REGS, /* All registers valid as a destination. */ - ALL_REGS, - LIM_REG_CLASSES - }; - - #define GENERAL_REGS SRC_REGS - #define N_REG_CLASSES (int) LIM_REG_CLASSES - - /* Give names of register classes as strings for dump files. */ - #define REG_CLASS_NAMES \ - { \ - "NO_REGS", \ - "OUT_REGS", \ - "STD_REGS", \ - "ARG_REGS", \ - "SRC_REGS", \ - "DST_REGS", \ - "ALL_REGS" \ - } - - /* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. */ - - #define REG_CLASS_CONTENTS \ - { \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \ - { 0x00000000, 0x00000000, 0x00000000, 0xffffffff }, /* OUT_REGS */ \ - { 0xffffffff, 0x00000000, 0x00000000, 0x00000000 }, /* STD_REGS */ \ - { 0x00000000, 0xffffffff, 0x00000000, 0x00000000 }, /* ARG_REGS */ \ - { 0xffffffff, 0xffffffff, 0x000fff0f, 0x00000000 }, /* SRC_REGS */ \ - { 0xffffffff, 0xffffffff, 0x000fff0f, 0xffffffff }, /* DST_REGS */ \ - { 0xffffffff, 0xffffffff, 0x000fff0f, 0xffffffff }, /* ALL_REGS */ \ - } - - /* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - - #define REGNO_REG_CLASS(REGNO) \ - ( ((REGNO) <= LAST_R_REG) ? STD_REGS \ - : ((REGNO) <= LAST_I_REG) ? ARG_REGS \ - : ((REGNO) <= LAST_S_REG) ? SRC_REGS \ - : OUT_REGS) - - /* The class value for index registers, and the one for base regs. */ - #define INDEX_REG_CLASS GENERAL_REGS - #define BASE_REG_CLASS GENERAL_REGS - - /* Get reg_class from a letter such as appears in the machine - description. */ - - #define REG_CLASS_FROM_LETTER(C) \ - ( (C) == 'S' ? SRC_REGS \ - : (C) == 'D' ? DST_REGS \ - : NO_REGS) - - /* The letters I, J, K, L and M in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. - - I: arithmetic operand -127..128, as used in inc. - K: 0. - */ - - #define CONST_OK_FOR_I(VALUE) \ - (((HOST_WIDE_INT)(VALUE))>= -128 && ((HOST_WIDE_INT)(VALUE)) <= 127) - - #define CONST_OK_FOR_K(VALUE) ((VALUE)==0) - - #define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'I' ? CONST_OK_FOR_I (VALUE) \ - : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ - : 0) - - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 - - /* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. */ - - #define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS) - - /* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. - - With picoJava this is the size of MODE in words. */ - - #define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - - /* A C expression whose value is nonzero if pseudos that have been - assigned to registers of class CLASS would likely be spilled - because registers of CLASS are needed for spill registers. - - For picoJava, something that isn't an incoming argument or a normal - register is going to be very hard to get at. */ - - #define CLASS_LIKELY_SPILLED_P(X) ((X) != STD_REGS && (X) != ARG_REGS) - - /* Stack layout; function entry, exit and calling. */ - - /* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ - - #define STACK_GROWS_DOWNWARD 1 - - /* Define this macro if successive arguments to a function occupy - decreasing addresses on the stack. */ - - #define ARGS_GROW_DOWNWARD 1 - - /* Define this macro if the addresses of local variable slots are at - negative offsets from the frame pointer. */ - - #define FRAME_GROWS_DOWNWARD 1 - - /* Offset from the frame pointer to the first local variable slot to - be allocated. */ - - #define STARTING_FRAME_OFFSET 0 - - /* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. */ - - /* Don't define PUSH_ROUNDING, since the hardware doesn't do this. - When PUSH_ROUNDING is not defined, PARM_BOUNDARY will cause gcc to - do correct alignment. */ - - #define PUSH_ROUNDING(NPUSHED) (((NPUSHED) + 3) & ~3) - - /* Offset of first parameter from the argument pointer register value. */ - - #define FIRST_PARM_OFFSET(FNDECL) 0 - - /* Value is the number of byte of arguments automatically - popped when returning from a subroutine call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - SIZE is the number of bytes of arguments passed on the stack. */ - - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 - - /* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), G1_REG) - - /* 1 if N is a possible register number for a function value - as seen by the caller. */ - - #define FUNCTION_VALUE_REGNO_P(N) \ - ((N) == G1_REG) - - /* 1 if N is a possible register number for function argument passing. */ - #define FUNCTION_ARG_REGNO_P(N) 0 - - /* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - - #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG (MODE, G1_REG) - - /* Define this macro to be a nonzero value if the location where a - function argument is passed depends on whether or not it is a - named argument. */ - - #define STRICT_ARGUMENT_NAMING 1 - - /* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - For picoJava this is a struct which remembers the number of - arguments named, the total number of words passed and an adjustment - factor to use if accessing a double word argument with a single - word memop. See the comments at the head pj.c for more information */ - - #define ARGS_IN_REGS 32 - - struct pj_args - { - int named_words; - int total_words; - int arg_count; - int arg_adjust[ARGS_IN_REGS]; - }; - - #define CUMULATIVE_ARGS struct pj_args - - #define FUNCTION_INCOMING_ARG(asf,pmode,passtyped,named) \ - pj_function_incoming_arg(&asf,pmode,passtyped,named) - - /* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. - */ - - #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ - (CUM).named_words = 0; \ - (CUM).total_words = 0; \ - (CUM).arg_count = 0; - - /* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - - picoJava only ever sends scalars as arguments. Aggregates are sent - by reference. */ - - #define PJ_ARG_WORDS(MODE) \ - ((GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) - - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - { \ - (CUM).total_words += PJ_ARG_WORDS (MODE); \ - if (NAMED) \ - (CUM).named_words += PJ_ARG_WORDS (MODE); \ - (CUM).arg_count++; \ - } - - /* Define where to put the arguments to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). - - For picoJava scalar arguments are normally in registers. */ - - - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - ( ((CUM).total_words + PJ_ARG_WORDS (MODE) < ARGS_IN_REGS) \ - ? gen_rtx (REG, MODE, O0_REG + (CUM).total_words) \ - : NULL_RTX) - - - /* A C expression that indicates when an argument must be passed by - reference. If nonzero for an argument, a copy of that argument is - made in memory and a pointer to the argument is passed instead of - the argument itself. The pointer is passed in whatever way is - appropriate for passing a pointer to that type. */ - - /* All aggregates and arguments larger than 8 bytes are passed this way. */ - - #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - (TYPE && (AGGREGATE_TYPE_P (TYPE) || int_size_in_bytes (TYPE) > 8)) - - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - - #define EXIT_IGNORE_STACK 0 - - /* Trampoline support. */ - - /* A picoJava trampoline looks like: - - 0000 11DEAD sipush %lo16(static) - 0003 EDDEAD sethi %hi16(static) - 0006 FF7D write_global1 - 0008 11DEAD sipush %lo16(fn) - 000b EDDEAD sethi %hi16(fn) - 000e FF60 write_pc - */ - - /* Length in units of the trampoline for entering a nested function. */ - #define TRAMPOLINE_SIZE 16 - - /* Alignment required for a trampoline in bits . */ - #define TRAMPOLINE_ALIGNMENT 32 - - #define TRAMPOLINE_TEMPLATE(FILE) \ - fprintf (FILE, "\tsipush 0xdead\n"); \ - fprintf (FILE, "\tsethi 0xdead\n"); \ - fprintf (FILE, "\twrite_global1\n"); \ - fprintf (FILE, "\tsipush 0xdead\n"); \ - fprintf (FILE, "\tsethi 0xdead\n"); \ - fprintf (FILE, "\twrite_pc\n"); - - /* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. */ - - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - { \ - static int off[4] = { 1, 0, 4, 3 }; \ - int i; \ - \ - /* Move the FNADDR and CXT into the instruction stream. Do this byte \ - by byte to make sure it works for either endianness. */ \ - \ - for (i = 0; i < 4; i++) \ - emit_move_insn \ - (gen_rtx_MEM (QImode, \ - plus_constant (tramp, off[i] + 1)), \ - gen_rtx_TRUNCATE (QImode, \ - expand_shift (RSHIFT_EXPR, SImode, \ - CXT, size_int (i * 8), 0, 1))); \ - \ - for (i = 0; i < 4; i++) \ - emit_move_insn \ - (gen_rtx_MEM (QImode, \ - plus_constant (tramp, off[i] + 9)), \ - gen_rtx_TRUNCATE (QImode, \ - expand_shift (RSHIFT_EXPR, SImode, \ - FNADDR, size_int (i * 8), 0, 1))); \ - } - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\tsipush %%lo16(.LP%d)\n", (LABELNO)); \ - fprintf (FILE, "\tsethi %%hi16(.LP%d)\n", (LABELNO)); \ - fprintf (FILE, "\tsipush %%lo16(_mcount)\n"); \ - fprintf (FILE, "\tsethi %%hi16(_mcount)\n"); \ - fprintf (FILE, "\ticonst_3\n"); \ - fprintf (FILE, "\tcall\n"); - - - /* Addressing modes, and classification of registers for them. */ - - #define HAVE_POST_INCREMENT 1 - #define HAVE_PRE_INCREMENT 1 - #define HAVE_POST_DECREMENT 1 - #define HAVE_PRE_DECREMENT 1 - - /* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. */ - - /* Any register is OK for a base or an index. As is something that has - been spilled to memory. */ - - #define REGNO_OK_FOR_BASE_P(REGNO) 1 - #define REGNO_OK_FOR_INDEX_P(REGNO) 1 - - /* Maximum number of registers that can appear in a valid memory - address. - - Arbitarily limited to 20. */ - - #define MAX_REGS_PER_ADDRESS 20 - - /* Recognize any constant value that is a valid address. */ - - #define CONSTANT_ADDRESS_P(X) \ - (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ - || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST) - - /* Nonzero if the constant value X is a legitimate general operand. */ - - #define LEGITIMATE_CONSTANT_P(X) \ - (GET_CODE (X) == CONST_DOUBLE ? (pj_standard_float_constant (X)!=0) : 1) - - /* Letters in the range `Q' through `U' in a register constraint string - may be defined in a machine-dependent fashion to stand for arbitrary - operand types. - - For picoJava, `S' handles a source operand. */ - - #define EXTRA_CONSTRAINT(OP, C) \ - ((C) == 'S' ? pj_source_operand (OP, GET_MODE (OP)) : 0) - - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and - check its validity for a certain class. */ - - #define REG_OK_FOR_BASE_P(X) 1 - #define REG_OK_FOR_INDEX_P(x) 0 - - - /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. - - We may have arbitrarily complex addressing modes, but we get better - cse of address expressions if we generate code with simple - addressing modes and clean up redundant register operations later - in the machine dependent reorg pass. */ - - #define SRC_REG_P(X) \ - (REG_P(X) && !OUTGOING_REG_RTX_P (X)) - - #define SIMPLE_ADDRESS(X) \ - (SRC_REG_P(X) || CONSTANT_ADDRESS_P(X)) - - #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ - if (SIMPLE_ADDRESS(X)) goto LABEL; \ - if ((GET_CODE (X) == POST_INC \ - || GET_CODE (X) == PRE_INC \ - || GET_CODE (X) == POST_DEC \ - || GET_CODE (X) == PRE_DEC) && SRC_REG_P(XEXP (X, 0))) goto LABEL; \ - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ - { \ - if (GET_CODE(ADDR) == PRE_DEC || GET_CODE(ADDR) == POST_INC \ - || GET_CODE(ADDR) == PRE_INC || GET_CODE(ADDR) == POST_DEC) \ - goto LABEL; \ - } - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE SImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. */ - - #define CASE_VECTOR_PC_RELATIVE 1 - - /* 'char' is signed by default. */ - #define DEFAULT_SIGNED_CHAR 1 - - /* The type of size_t unsigned int. */ - #define SIZE_TYPE "unsigned int" - - /* Don't cse the address of the function being compiled. */ - - #define NO_RECURSIVE_FUNCTION_CSE (!optimize_size) - - /* Max number of bytes we can move from memory to memory - in one reasonably fast instruction. */ - - #define MOVE_MAX 4 - - /* Max number of bytes we want move_by_pieces to be able to copy - efficiently. */ - - #define MOVE_MAX_PIECES 4 - - /* Define if operations between registers always perform the operation - on the full register even if a narrower mode is specified. */ - /*#define WORD_REGISTER_OPERATIONS*/ - - /* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD - will either zero-extend or sign-extend. The value of this macro should - be the code that says which one of the two operations is implicitly - done, NIL if none. */ - - #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND - - /* We assume that the store-condition-codes instructions store 0 for false - and some other value for true. This is the value stored for true. */ - - #define STORE_FLAG_VALUE 1 - - /* Define if loading short immediate values into registers sign extends. */ - - #define SHORT_IMMEDIATES_SIGN_EXTEND - - /* Nonzero if access to memory by bytes is no faster than for words. */ - #define SLOW_BYTE_ACCESS 1 - - #define INT_TYPE_SIZE 32 - - /* A C expression that is nonzero if on this machine the number of - bits actually used for the count of a shift operation is equal to the - number of bits needed to represent the size of the object being - shifted. */ - - #define SHIFT_COUNT_TRUNCATED 1 - - /* All integers have the same format so truncation is easy. */ - - #define TRULY_NOOP_TRUNCATION(OUTPREC,INPREC) 1 - - /* Define this if addresses of constant functions - shouldn't be put through pseudo regs where they can be cse'd. - Desirable on machines where ordinary constants are expensive - but a CALL with constant address is cheap. */ - - #define NO_FUNCTION_CSE (!optimize_size) - - /* Chars and shorts should be passed as ints. */ - - #define PROMOTE_PROTOTYPES 1 - - /* The machine modes of pointers and functions. */ - - #define Pmode SImode - #define FUNCTION_MODE Pmode - - - /* A part of a C `switch' statement that describes the relative costs - of constant RTL expressions. It must contain `case' labels for - expression codes `const_int', `const', `symbol_ref', `label_ref' - and `const_double'. Each case must ultimately reach a `return' - statement to return the relative cost of the use of that kind of - constant value in an expression. The cost may depend on the - precise value of the constant, which is available for examination - in X, and the rtx code of the expression in which it is contained, - found in OUTER_CODE. - - CODE is the expression code--redundant, since it can be obtained - with `GET_CODE (X)'. */ - - #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST_INT: \ - return INTVAL (RTX) >= -1 && INTVAL (RTX) <= 5 ? 1 \ - : INTVAL (RTX) >= -32768 && INTVAL (RTX) <= 32767 ? 2 \ - : 3; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 3; \ - case CONST_DOUBLE: \ - return pj_standard_float_constant (RTX) ? 1 : 4; \ - - /* Like `CONST_COSTS' but applies to nonconstant RTL expressions. - This can be used, for example, to indicate how costly a multiply - instruction is. In writing this macro, you can use the construct - `COSTS_N_INSNS (N)' to specify a cost equal to N fast - instructions. OUTER_CODE is the code of the expression in which X - is contained. */ - - #define RTX_COSTS(X,CODE,OUTER_CODE) \ - case MULT: \ - if (GET_CODE (XEXP (X, 1)) == CONST_INT) \ - { \ - unsigned HOST_WIDE_INT value = INTVAL (XEXP (X, 1)); \ - int nbits = 0; \ - \ - while (value != 0) \ - { \ - nbits++; \ - value >>= 1; \ - } \ - \ - total = COSTS_N_INSNS (nbits); \ - } \ - else \ - total = COSTS_N_INSNS (10); \ - break; - - /* Compute extra cost of moving data between one register class and - another. */ - - #define REGISTER_MOVE_COST(MODE, SRC_CLASS, DST_CLASS) \ - ((SRC_CLASS == STD_REGS || SRC_CLASS == ARG_REGS)? 2 : 10) - - - /* Assembler output control. */ - - /* A C string constant describing how to begin a comment in the target - assembler language. The compiler assumes that the comment will end at - the end of the line. */ - #define ASM_COMMENT_START "!" - - /* The text to go at the start of the assembler file. */ - - #undef ASM_FILE_START - #define ASM_FILE_START(FILE) \ - fprintf (FILE,"\t.file\t\"%s\"\n", main_input_filename); \ - fprintf (FILE,"\t! %s\n", TARGET_LITTLE_ENDIAN ? ".little" : ".big"); \ - fprintf (FILE,"\t.align 4\n"); - - #define ASM_APP_ON "" - #define ASM_APP_OFF "" - #define FILE_ASM_OP "\t.file\n" - - #define SET_ASM_OP "\t.set\t" - - /* How to change between sections. */ - - #define TEXT_SECTION_ASM_OP "\t.text" - #define DATA_SECTION_ASM_OP "\t.data" - - /* This special macro is used to output the asm pseduo op which allows - the linker to fixup broken calling conentions. */ - - #define ASM_OUTPUT_FUNCTION_PREFIX(FILE, FNNAME) \ - do { fputs (current_function_varargs || current_function_stdarg \ - ? "\t.varargs_words_needed\t" : "\t.words_needed\t", \ - FILE); \ - assemble_name (FILE, FNNAME); \ - fprintf (FILE, ", %d\n", current_function_args_info.named_words); \ - } while (0) - - /* If defined, a C expression whose value is a string containing the - assembler operation to identify the following data as - uninitialized G data. If not defined, and neither - `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined, - uninitialized global data will be output in the data section if - `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be - used. */ - - #define BSS_SECTION_ASM_OP "\t.section\t.bss" - - /* Like `ASM_OUTPUT_BSS' except takes the required alignment as a - separate, explicit argument. If you define this macro, it is used - in place of `ASM_OUTPUT_BSS', and gives you more flexibility in - handling the required alignment of the variable. The alignment is - specified as the number of bits. - - Try to use function `asm_output_aligned_bss' defined in file - `varasm.c' when defining this macro. */ - - #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ - asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) - - - /* Define this so that jump tables go in same section as the current function, - which could be text or it could be a user defined section. */ - #define JUMP_TABLES_IN_TEXT_SECTION 1 - - /* The assembler's names for the registers. */ - - #define REGISTER_NAMES \ - { \ - "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ - "r8", "r9", "r10", "r11", "r12", "r13", "r14","r15", \ - "r16","r17", "r18", "r19", "r20", "r21", "r22","r23", \ - "r24","r25", "r26", "r27", "r28", "r29", "r30","r31", \ - \ - "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", \ - "i8", "i9", "i10", "i11", "i12", "i13", "i14","i15", \ - "i16","i17", "i18", "i19", "i20", "i21", "i22","i23", \ - "i24","i25", "i26", "i27", "i28", "i29", "i30","i31", \ - \ - "global0", "global1", "global2", "global3", \ - "global4", "global5", "global6", "global7", \ - "vars", "optop", "sc", "pc", \ - "ticks", "slow", "va", "d3", \ - "d4", "d5", "d6", "ap", \ - "p0", "p1", "p2", "p3", \ - "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", \ - \ - "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", \ - "o8", "o9", "o10", "o11", "o12", "o13", "o14","o15", \ - "o16","o17", "o18", "o19", "o20", "o21", "o22","o23", \ - "o24","o25", "o26", "o27", "o28", "o29", "o30","o31"} \ - - - /* Output a label definition. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0) - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG) != 0) \ - fprintf ((FILE), "\t.align %d\n", (LOG)) - - /* Output a globalising directive for a label. */ - - #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ - (fprintf ((STREAM), "\t.global\t"), \ - assemble_name ((STREAM), (NAME)), \ - fputc ('\n', (STREAM))) - - /* After an opcode has been printed, there's nothing on the line any - more. */ - - #define ASM_OUTPUT_OPCODE(STREAM, P) \ - pj_stuff_on_line = 0; - - /* The prefix to add to user-visible assembler symbols. */ - - #define USER_LABEL_PREFIX "" - - /* The prefix to add to an internally generated label. */ - - #define LOCAL_LABEL_PREFIX "." - - /* Make an internal label into a string. */ - #undef ASM_GENERATE_INTERNAL_LABEL - #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ - sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM)) - - /* Output an internal label definition. */ - #undef ASM_OUTPUT_INTERNAL_LABEL - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM)) - - /* Construct a private name. */ - #define ASM_FORMAT_PRIVATE_NAME(OUTVAR,NAME,NUMBER) \ - ((OUTVAR) = (char *) alloca (strlen (NAME) + 10), \ - sprintf ((OUTVAR), "%s.%d", (NAME), (NUMBER))) - - /* Output a relative address table. */ - - #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL) \ - asm_fprintf ((STREAM), "\t.long\t.L%d-.L%di\n", (VALUE),(REL)); - - #define ADDR_VEC_ALIGN(VEC) 0 - - /* Output various types of constants. */ - - /* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - - #undef ASM_OUTPUT_SKIP - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf ((FILE), "\t.space %d\n", (SIZE)) - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\t.comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (SIZE))) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\t.lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (SIZE))) - - /* We don't want the default switch handling. */ - #undef ASM_OUTPUT_BEFORE_CASE_LABEL - #undef ASM_OUTPUT_CASE_LABEL - - /* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or star or 0 if no letter was specified. - For `%' followed by punctuation, CODE is the punctuation and X is null. */ - - #define PRINT_OPERAND(STREAM, X, CODE) pj_print_operand ((STREAM), (X), (CODE)) - - /* Print a memory address as an operand to reference that memory location. */ - - #define PRINT_OPERAND_ADDRESS(STREAM,X) output_addr_const (STREAM, X) - - /* Punctuation valid for print_operand. */ - - #define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '*') - - - /* Define this macro if it is advisable to hold scalars in registers - in a wider mode than that declared by the program. In such cases, - the value is constrained to be within the bounds of the declared - type, but kept valid in the wider mode. The signedness of the - extension may differ from that of the type. - - Since picoJava doesn't have unsigned compares, prefer signed - arithmetic. */ - - #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ - { \ - (MODE) = SImode; \ - (UNSIGNEDP) = 0; \ - } - - /* Defining PROMOTE_FUNCTION_ARGS eliminates some unnecessary zero/sign - extensions applied to char/short functions arguments. Defining - PROMOTE_FUNCTION_RETURN does the same for function returns. */ - #define PROMOTE_FUNCTION_ARGS - - - /* We can debug without a frame pointer. */ - #define CAN_DEBUG_WITHOUT_FP - - /* How to renumber registers for dbx and gdb. */ - extern short pj_debugreg_renumber_vec[FIRST_PSEUDO_REGISTER]; - - #define DBX_REGISTER_NUMBER(REG) (pj_debugreg_renumber_vec[REG]) - - #define DONT_USE_BUILTIN_SETJMP - - /* We prefer to use dwarf2. */ - #undef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG - #define DWARF2_UNWIND_INFO 1 - - - /* varargs and stdarg builtins. */ - - #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ - do { \ - tree t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, \ - make_tree (ptr_type_node, gen_rtx_REG (Pmode, VA_REG))); \ - TREE_SIDE_EFFECTS (t) = 1; \ - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); \ - } while (0) - - - #define EXPAND_BUILTIN_VA_ARG(valist, type) \ - pj_expand_builtin_va_arg(valist, type) - - #define EXPAND_BUILTIN_NEXT_ARG(OFFSET) \ - gen_rtx_MEM (Pmode, \ - plus_constant (gen_rtx_REG (SImode, VARS_REG), \ - (INTVAL (offset) + 1) * -4)); - - /* Before the prologue, the return address is just above optop. */ - #define INCOMING_RETURN_ADDR_RTX \ - plus_constant (gen_rtx_REG (Pmode, OPTOP_REG), 4) - - /* Rewrite the rtl to use take advantage of the opstack. */ - #define MACHINE_DEPENDENT_REORG(INSNS) pj_machine_dependent_reorg(INSNS) - - - /* Define the codes that are matched by predicates in pj.c. */ - #define PREDICATE_CODES \ - {"pj_dest_operand", {SUBREG, REG, MEM}}, \ - {"pj_signed_comparison_operator", {EQ, NE, LE, LT, GE,GT}}, \ - {"pj_unsigned_comparison_operator", {LEU, LTU, GEU, GTU}}, \ - {"pj_source_operand", {CONST_INT, CONST_DOUBLE, CONST, \ - SYMBOL_REF, LABEL_REF, SUBREG, \ - REG, MEM}}, - - /* Generate calls to memcpy, memcmp and memset. */ - #define TARGET_MEM_FUNCTIONS --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pj/pjl.h gcc-3.3/gcc/config/pj/pjl.h *** gcc-3.2.3/gcc/config/pj/pjl.h 2000-01-05 05:57:17.000000000 +0000 --- gcc-3.3/gcc/config/pj/pjl.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - #define TARGET_LITTLE_ENDIAN_DEFAULT 1 --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pj/pj.md gcc-3.3/gcc/config/pj/pj.md *** gcc-3.2.3/gcc/config/pj/pj.md 2000-08-06 10:07:31.000000000 +0000 --- gcc-3.3/gcc/config/pj/pj.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,980 **** - ;; Machine description for GNU compiler, picoJava Version - ;; Copyright (C) 2000 Free Software Foundation, Inc. - ;; Contributed by Steve Chamberlain, of Transmeta (sac@pobox.com). - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - ;; Move instructions. - - (define_insn "movsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (match_operand:SI 1 "pj_source_operand" "gS"))] - "" - "%S1%R0") - - (define_insn "movhi" - [(set (match_operand:HI 0 "nonimmediate_operand" "=gD") - (match_operand:HI 1 "pj_source_operand" "gS"))] - "" - "%S1%R0") - - (define_insn "movqi" - [(set (match_operand:QI 0 "nonimmediate_operand" "=gD") - (match_operand:QI 1 "pj_source_operand" "gS"))] - "" - "%S1%R0") - - (define_insn "movdi" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (match_operand:DI 1 "pj_source_operand" "gS"))] - "" - "%D1%*%R0") - - (define_insn "movdf" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (match_operand:DF 1 "pj_source_operand" "gS"))] - "" - "%D1%R0") - - (define_insn "movsf" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (match_operand:SF 1 "pj_source_operand" "gS"))] - "" - "%S1%R0") - - - ;; Arithmetic. - - (define_insn "addsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (plus:SI (match_operand:SI 1 "pj_source_operand" "%gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "* return pj_output_addsi3 (operands);") - - (define_insn "adddi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (plus:DI (match_operand:DI 1 "pj_source_operand" "%gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*ladd%R0") - - (define_insn "addsf3" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (plus:SF (match_operand:SF 1 "pj_source_operand" "%gS") - (match_operand:SF 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*fadd%R0") - - (define_insn "adddf3" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (plus:DF (match_operand:DF 1 "pj_source_operand" "%gS") - (match_operand:DF 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*dadd%R0") - - (define_insn "negsi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (neg:SI (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%S1%*ineg%R0") - - (define_insn "negdi2" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (neg:DI (match_operand:DI 1 "pj_source_operand" "gS")))] - "" - "%S1%*lneg%R0") - - (define_insn "negsf2" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (neg:SF (match_operand:SF 1 "pj_source_operand" "gS")))] - "" - "%S1%*fneg%R0") - - (define_insn "negdf2" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (neg:DF (match_operand:DF 1 "pj_source_operand" "gS")))] - "" - "%D1%*dneg%R0") - - (define_insn "subsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (minus:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*isub%R0") - - (define_insn "subdi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (minus:DI (match_operand:DI 1 "pj_source_operand" "gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*lsub%R0") - - (define_insn "subsf3" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (minus:SF (match_operand:SF 1 "pj_source_operand" "gS") - (match_operand:SF 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*fsub%R0") - - (define_insn "subdf3" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (minus:DF (match_operand:DF 1 "pj_source_operand" "gS") - (match_operand:DF 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*dsub%R0") - - (define_insn "divsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (div:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*idiv%R0") - - (define_insn "divdi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (div:DI (match_operand:DI 1 "pj_source_operand" "gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*ldiv%R0") - - (define_insn "divsf3" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (div:SF (match_operand:SF 1 "pj_source_operand" "gS") - (match_operand:SF 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*fdiv%R0") - - (define_insn "divdf3" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (div:DF (match_operand:DF 1 "pj_source_operand" "gS") - (match_operand:DF 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*ddiv%R0") - - (define_insn "udivsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (udiv:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%P1%P2%*ldiv%*l2i%R0") - - (define_insn "mulsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (mult:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*imul%R0") - - (define_insn "muldi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (mult:DI (match_operand:DI 1 "pj_source_operand" "gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*lmul%R0") - - (define_insn "muldf3" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (mult:DF (match_operand:DF 1 "pj_source_operand" "%gS") - (match_operand:DF 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*dmul%R0") - - (define_insn "mulsf3" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (mult:SF (match_operand:SF 1 "pj_source_operand" "%gS") - (match_operand:SF 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*fmul%R0") - - (define_insn "modsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (mod:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*irem%R0") - - (define_insn "moddi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (mod:DI (match_operand:DI 1 "pj_source_operand" "gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*lrem%R0") - - (define_insn "moddf3" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (mod:DF (match_operand:DF 1 "pj_source_operand" "gS") - (match_operand:DF 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*drem%R0") - - (define_insn "modsf3" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (mod:SF (match_operand:SF 1 "pj_source_operand" "gS") - (match_operand:SF 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*frem%R0") - - (define_insn "umodsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (umod:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%P1%P2%*lrem%*l2i%R0") - - - ;; Logical operations. - - (define_insn "andsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (and:SI (match_operand:SI 1 "pj_source_operand" "%gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*iand%R0") - - (define_insn "anddi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (and:DI (match_operand:DI 1 "pj_source_operand" "%gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*land%R0") - - (define_insn "iorsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (ior:SI (match_operand:SI 1 "pj_source_operand" "%gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*ior%R0") - - (define_insn "iordi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (ior:DI (match_operand:DI 1 "pj_source_operand" "%gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*lor%R0") - - (define_insn "xorsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (xor:SI (match_operand:SI 1 "pj_source_operand" "%gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*ixor%R0") - - (define_insn "xordi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (xor:DI (match_operand:DI 1 "pj_source_operand" "%gS") - (match_operand:DI 2 "pj_source_operand" "gS")))] - "" - "%D1%D2%*lxor%R0") - - (define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (not:SI (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%S1%*iconst_m1%*ixor%R0") - - (define_insn "one_cmpldi2" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (not:DI (match_operand:DI 1 "pj_source_operand" "gS")))] - "" - "%S1%*iconst_m1%*iconst_m1%*lxor%R0") - - - ;; Shift instructions. - - (define_insn "ashlsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (ashift:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*ishl%R0") - - - (define_insn "ashldi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (ashift:DI (match_operand:DI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%D1%S2%*lshl%R0") - - (define_insn "ashrsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (ashiftrt:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*ishr%R0") - - (define_insn "ashrdi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (ashiftrt:DI (match_operand:DI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%D1%S2%*lshr%R0") - - (define_insn "lshrsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (lshiftrt:SI (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%S1%S2%*iushr%R0") - - (define_insn "lshrdi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (lshiftrt:DI (match_operand:DI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "pj_source_operand" "gS")))] - "" - "%D1%S2%*lushr%R0") - - - ;; Comparisons. - - (define_expand "cmpsi" - [(set (cc0) (compare (match_operand:SI 0 "pj_source_operand" "gS") - (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "{ - pj_cmp_op0 = operands[0]; - pj_cmp_op1 = operands[1]; - pj_cmp_mode = SImode; - DONE; - }") - - (define_expand "cmpdi" - [(set (cc0) (compare (match_operand:DI 0 "pj_source_operand" "gS") - (match_operand:DI 1 "pj_source_operand" "gS")))] - "" - "{ - pj_cmp_op0 = operands[0]; - pj_cmp_op1 = operands[1]; - pj_cmp_mode = DImode; - DONE; - }") - - (define_expand "cmpsf" - [(set (cc0) (compare (match_operand:SF 0 "pj_source_operand" "gS") - (match_operand:SF 1 "pj_source_operand" "gS")))] - "" - "{ - pj_cmp_op0 = operands[0]; - pj_cmp_op1 = operands[1]; - pj_cmp_mode = SFmode; - DONE; - }") - - (define_expand "cmpdf" - [(set (cc0) (compare (match_operand:DF 0 "pj_source_operand" "gS") - (match_operand:DF 1 "pj_source_operand" "gS")))] - "" - "{ - pj_cmp_op0 = operands[0]; - pj_cmp_op1 = operands[1]; - pj_cmp_mode = DFmode; - DONE; - }") - - - ;; Conversions. - - (define_insn "truncsiqi2" - [(set (match_operand:QI 0 "nonimmediate_operand" "=gD") - (truncate:QI (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%S1%*%R0") - - (define_insn "truncsihi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=gD") - (truncate:HI (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%S1%*i2c%R0") - - (define_insn "truncdisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (truncate:SI (match_operand:DI 1 "pj_source_operand" "gS")))] - "" - "%D1%*l2i%R0") - - (define_insn "fix_truncsfsi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (fix:SI (match_operand:SF 1 "pj_source_operand" "gS")))] - "" - "%S1%*f2i%R0") - - (define_insn "fix_truncsfdi2" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (fix:DI (match_operand:SF 1 "pj_source_operand" "gS")))] - "" - "%S1%*f2l%R0") - - (define_insn "truncdfsf2" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (float_truncate:SF (match_operand:DF 1 "pj_source_operand" "gS")))] - "" - "%D1%*d2f%R0") - - (define_insn "fix_truncdfsi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (fix:SI (match_operand:DF 1 "pj_source_operand" "gS")))] - "" - "%D1%*d2i%R0") - - (define_insn "fix_truncdfdi2" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (fix:DI (match_operand:DF 1 "pj_source_operand" "gS")))] - "" - "%D1%*d2l%R0") - - (define_insn "floatsisf2" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (float:SF (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%S1%*i2f%R0") - - (define_insn "floatsidf2" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (float:DF (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%S1%*i2d%R0") - - (define_insn "floatdisf2" - [(set (match_operand:SF 0 "nonimmediate_operand" "=gD") - (float:SF (match_operand:DI 1 "pj_source_operand" "gS")))] - "" - "%D1%*l2f%R0") - - (define_insn "floatdidf2" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (float:DF (match_operand:DI 1 "pj_source_operand" "gS")))] - "" - "%D1%*l2d%R0") - - - ;; Zero-extend move instructions. - - (define_insn "zero_extendsidi2" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (zero_extend:DI (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%P1%R0") - - (define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (zero_extend:SI (match_operand:HI 1 "pj_source_operand" "gS")))] - "" - "%S1%*i2c%R0") - - (define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (zero_extend:SI (match_operand:QI 1 "pj_source_operand" "gS")))] - "" - "%S1%*sipush 0xff%*iand%R0") - - - ;; Conditional branch instructions. - - (define_expand "beq" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (EQ, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "bne" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (NE, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "bgt" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (GT, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "blt" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (LT, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "bge" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (GE, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "ble" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (LE, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "bgtu" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (GTU, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "bltu" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (LTU, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "bgeu" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (GEU, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_expand "bleu" - [(set (pc) (if_then_else (match_op_dup 3 [(match_dup 1) (match_dup 2)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "operands[3] = gen_rtx (LEU, pj_cmp_mode); - operands[1] = pj_cmp_op0; - operands[2] = pj_cmp_op1;") - - (define_insn "*bop" - [(set (pc) (if_then_else (match_operand:SI 0 "pj_source_operand" "gS") - (label_ref (match_operand 1 "" "")) - (pc)))] - "" - "%S0%*ifne %1") - - (define_insn "*rev_bop" - [(set (pc) (if_then_else (match_operand:SI 0 "pj_source_operand" "gS") - (pc) - (label_ref (match_operand 1 "" ""))))] - - "" - "%S0%*ifeq %1") - - (define_insn "*blopsi" - [(set (pc) - (if_then_else - (match_operator:SI 3 "pj_signed_comparison_operator" - [(match_operand:SI 0 "pj_source_operand" "gS,gS") - (match_operand:SI 1 "pj_source_operand" "K,gS")]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "@ - %S0%*if%Y3 %2 - %S0%S1%*if_icmp%Y3 %2") - - (define_insn "*rev_blopsi" - [(set (pc) - (if_then_else - (match_operator:SI 3 "pj_signed_comparison_operator" - [(match_operand:SI 0 "pj_source_operand" "gS,gS") - (match_operand:SI 1 "pj_source_operand" "K,gS")]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "@ - %S0%*if%Z3 %2 - %S0%S1%*if_icmp%Z3 %2") - - (define_insn "*bluopsi" - [(set (pc) - (if_then_else - (match_operator:SI 3 "pj_unsigned_comparison_operator" - [(match_operand:SI 0 "pj_source_operand" "gS") - (match_operand:SI 1 "pj_source_operand" "gS")]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "%S0%S1%*iucmp%*if%Y3 %2") - - (define_insn "*rev_bluopsi" - [(set (pc) - (if_then_else - (match_operator:SI 3 "pj_unsigned_comparison_operator" - [(match_operand:SI 0 "pj_source_operand" "gS") - (match_operand:SI 1 "pj_source_operand" "gS")]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "%S0%S1%*iucmp%*if%Z3 %2") - - (define_insn "*blopdi" - [(set (pc) - (if_then_else - (match_operator:DI 3 "pj_signed_comparison_operator" - [(match_operand:DI 0 "pj_source_operand" "gS") - (match_operand:DI 1 "pj_source_operand" "gS")]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "%D0%D1%*lcmp%*if%Y3 %2") - - (define_insn "*rev_blopdi" - [(set (pc) - (if_then_else - (match_operator:DI 3 "pj_signed_comparison_operator" - [(match_operand:DI 0 "pj_source_operand" "gS") - (match_operand:DI 1 "pj_source_operand" "gS")]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "%D0%D1%*lcmp%*if%Z3 %2") - - (define_insn "*bluopdi" - [(set (pc) - (if_then_else - (match_operator:DI 3 "pj_unsigned_comparison_operator" - [(match_operand:DI 0 "pj_source_operand" "gS") - (match_operand:DI 1 "pj_source_operand" "gS")]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "%D0%D1%*ipush __pjucmpdi2%*bipush 6%*call%*if%Y3 %2") - - (define_insn "*rev_bluopdi" - [(set (pc) - (if_then_else - (match_operator:DI 3 "pj_unsigned_comparison_operator" - [(match_operand:DI 0 "pj_source_operand" "gS") - (match_operand:DI 1 "pj_source_operand" "gS")]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "%D0%D1%*ipush __pjucmpdi2%*bipush 6%*call%*if%Z3 %2") - - (define_insn "*blopsf" - [(set (pc) - (if_then_else - (match_operator:SF 3 "comparison_operator" - [(match_operand:SF 0 "pj_source_operand" "gS") - (match_operand:SF 1 "pj_source_operand" "gS")]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "%S0%S1%*fcmp%X3%*if%Y3 %2") - - (define_insn "*rev_bluopsf" - [(set (pc) - (if_then_else - (match_operator:SF 3 "comparison_operator" - [(match_operand:SF 0 "pj_source_operand" "gS") - (match_operand:SF 1 "pj_source_operand" "gS")]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "%S0%S1%*fcmp%X3%*if%Z3 %2") - - (define_insn "*blopdf" - [(set (pc) - (if_then_else - (match_operator:DF 3 "comparison_operator" - [(match_operand:DF 0 "pj_source_operand" "gS") - (match_operand:DF 1 "pj_source_operand" "gS")]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "%D0%D1%*dcmp%X3%*if%Y3 %2") - - (define_insn "*rev_bluopdf" - [(set (pc) - (if_then_else - (match_operator:DF 3 "comparison_operator" - [(match_operand:DF 0 "pj_source_operand" "gS") - (match_operand:DF 1 "pj_source_operand" "gS")]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "%D0%D1%*dcmp%X3%*if%Z3 %2") - - - ;; call instructions - - (define_insn "pj_call" - [(call (mem:QI (match_operand:SI 0 "pj_source_operand" "gS")) - (match_operand:SI 1 "immediate_operand" "i"))] - "" - "%C0%E1%S0%S1%*call") - - (define_insn "pj_call_value" - [(set (match_operand 0 "nonimmediate_operand" "=gD") - (call (mem:QI (match_operand:SI 1 "pj_source_operand" "gS")) - (match_operand:SI 2 "immediate_operand" "i")))] - - "" - "%C1%E2%S1%S2%*call") - - (define_expand "call" - [(call (match_operand:SI 0 "pj_source_operand" "gS") - (match_operand:SI 1 "immediate_operand" "i")) - (use (match_operand:SI 2 "register_operand" "r")) - (use (match_operand:SI 3 "" ""))] - "" - "{ - emit_call_insn (gen_pj_call (XEXP (operands[0], 0), - pj_workout_arg_words (operands[1], - operands[2]))); - DONE; - }") - - (define_expand "call_value" - [(set (match_operand:SI 0 "nonimmediate_operand" "gS") - (call (match_operand:SI 1 "pj_source_operand" "gS") - (match_operand:SI 2 "immediate_operand" "i"))) - (use (match_operand:SI 3 "register_operand" "r")) - (use (match_operand:SI 4 "" ""))] - "" - "{ - emit_call_insn (gen_pj_call_value (operands[0], - XEXP (operands[1], 0), - pj_workout_arg_words (operands[2], - operands[3]))); - DONE; - }") - - - ;; No-op instruction. - - (define_insn "nop" - [(const_int 0)] - "" - "nop") - - - ;; Jump instructions - - (define_insn "jump" - [(set (pc) (label_ref (match_operand 0 "" "")))] - "" - "%*goto %l0") - - (define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "pj_source_operand" "gS"))] - "" - "%S0%*write_pc") - - (define_insn "casesi" - [(set (pc) - (if_then_else - (leu (minus:SI (match_operand:SI 0 "pj_source_operand" "gS") - (match_operand:SI 1 "immediate_operand" "i")) - (match_operand:SI 2 "immediate_operand" "i")) - (plus:SI (sign_extend:SI - (mem:SI - (plus:SI (pc) - (mult:SI (minus:SI (match_dup 0) - (match_dup 1)) - (const_int 4))))) - (label_ref (match_operand 3 "" ""))) - (label_ref (match_operand 4 "" ""))))] - "" - "%S0\\n%3i:%*tableswitch\\n\\t%*.align 2%*.long %4-%3i%*.long %1%*.long %1+%2") - - ;; Sign-extend move instructions. - - (define_insn "extendsfdf2" - [(set (match_operand:DF 0 "nonimmediate_operand" "=gD") - (float_extend:DF (match_operand:SF 1 "pj_source_operand" "gS")))] - "" - "%S1%*f2d%R0") - - (define_insn "extendhisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (sign_extend:SI (match_operand:HI 1 "pj_source_operand" "gS")))] - "" - "%S1%*bipush 16%*ishl%*bipush 16%*ishr%R0") - - (define_insn "extendqisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (sign_extend:SI (match_operand:QI 1 "pj_source_operand" "gS")))] - "" - "%S1%*bipush 24%*ishl%*bipush 24%*ishr%R0") - - (define_insn "extendqihi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=gD") - (sign_extend:HI (match_operand:QI 1 "pj_source_operand" "gS")))] - "" - "%S1%*bipush 24%*ishl%*bipush 24%*ishr%R0") - - (define_insn "extendsidi2" - [(set (match_operand:DI 0 "nonimmediate_operand" "=gD") - (sign_extend:DI (match_operand:SI 1 "pj_source_operand" "gS")))] - "" - "%S1%*i2l%R0") - - - ;; non local control flow. - - (define_expand "save_stack_nonlocal" - [(set (match_operand 0 "nonimmediate_operand" "=gD") - (match_operand 1 "pj_source_operand" "gS"))] - "" - "{ - rtx reg = force_reg (Pmode, XEXP (operands[0], 0)); - rtx addr0 = gen_rtx_MEM (SImode,reg); - rtx addr1 = gen_rtx_MEM (SImode, gen_rtx_PRE_INC (SImode, reg)); - rtx addr2 = gen_rtx_MEM (SImode, gen_rtx_PRE_INC (SImode, reg)); - - emit_move_insn (addr0, gen_rtx_REG (SImode, 64)); - emit_move_insn (addr1, gen_rtx_REG (SImode, 72)); - emit_move_insn (addr2, gen_rtx_REG (SImode, 73)); - - DONE; - }") - - (define_insn "restore_stack_nonlocal_helper" - [(set (reg:SI 64) (mem:SI (match_operand:SI 0 "register_operand" "r"))) - (set (reg:SI 72) (mem:SI (pre_inc:SI (match_dup 0)))) - (set (reg:SI 73) (mem:SI (pre_inc:SI (match_dup 0))))] - "" - "%S0%*load_word%*write_global0%*iinc %J0,4%S0%*load_word%*iinc %J0,4%S0%*load_word%*write_vars%*write_optop") - - (define_expand "restore_stack_nonlocal" - [(set (match_operand 0 "nonimmediate_operand" "=gD") - (match_operand 1 "pj_source_operand" "gS"))] - "" - "{ - rtx reg = force_reg (Pmode, XEXP (operands[1], 0)); - emit_insn (gen_restore_stack_nonlocal_helper (reg)); - DONE; - }") - - (define_insn "nonlocal_goto_helper" - [(set (reg:SI 64) (mem:SI (match_operand:SI 0 "register_operand" "r"))) - (set (reg:SI 72) (mem:SI (pre_inc:SI (match_dup 0)))) - (set (reg:SI 73) (mem:SI (pre_inc:SI (match_dup 0)))) - (set (pc) (match_operand:SI 1 "pj_source_operand" "gS"))] - "" - "%S0%*load_word%*write_global0%*iinc %J0,4%*%S0%*load_word%*%S1%*iinc %J0,4%*%S0%*load_word%*iinc %J0,4%*write_vars%*return0") - - (define_expand "nonlocal_goto" - [(match_operand:SI 0 "pj_source_operand" "") - (match_operand:SI 1 "pj_source_operand" "") - (match_operand:SI 2 "pj_source_operand" "") - (match_operand:SI 3 "" "")] - "" - "{ - operands[2] = force_reg (Pmode, XEXP (operands[2], 0)); - emit_move_insn (hard_frame_pointer_rtx, operands[0]); - emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx)); - emit_insn (gen_nonlocal_goto_helper (operands[2], operands[1])); - emit_barrier (); - DONE; - }") - - ;; Function overhead. - - (define_expand "prologue" - [(const_int 0)] - "" - "pj_expand_prologue (); DONE;") - - (define_expand "epilogue" - [(return)] - "" - "pj_expand_epilogue();") - - (define_insn "return" - [(return)] - "reload_completed" - "%*return0") - - (define_insn "tm_frame" - [(use (match_operand:SI 0 "pj_source_operand" "gS")) - (set (reg:SI 73) - (minus:SI (reg:SI 73) - (mult:SI (match_operand:SI 1 "pj_source_operand" "gS") - (const_int 4))))] - - "" - "%S0%S1%*tm_frame") - - (define_insn "varargs" - [(unspec_volatile [(match_operand:SI 0 "pj_source_operand" "gS")] 10)] - "" - "%S0%*jsr_w __vhelper") - - (define_insn "varargs_finish" - [(unspec_volatile [(match_operand:SI 0 "pj_source_operand" "gS")] 11)] - "" - "%*iload %J0%*write_global0") - - ;; Extensions to picoJava. - - (define_insn "strlensi" - [(set (match_operand:SI 0 "nonimmediate_operand" "=g") - (unspec:SI [(match_operand:BLK 1 "memory_operand" "gS") - (match_operand:QI 2 "pj_source_operand" "gS") - (match_operand:SI 3 "immediate_operand" "gS")] 0)) - (clobber (reg:SI 65))] - "TARGET_TM_EXTENSIONS" - "%I1%S2%S3%*iconst_0%*write_global1%*tm_strlensi%R0") - - (define_insn "movstrsi" - [(set (match_operand:BLK 0 "memory_operand" "=gS") - (match_operand:BLK 1 "memory_operand" "gS")) - (use (match_operand:SI 2 "pj_source_operand" "gS")) - (use (match_operand:SI 3 "pj_source_operand" "gS")) - (clobber (reg:SI 65))] - "TARGET_TM_EXTENSIONS" - "%I0%I1%S2%S3%*iconst_0%*write_global1%*tm_movstrsi") - - (define_insn "clrstrsi" - [(set (match_operand:BLK 0 "memory_operand" "=gS") - (const_int 0)) - (use (match_operand:SI 1 "pj_source_operand" "gS")) - (use (match_operand:SI 2 "pj_source_operand" "gS")) - (clobber (reg:SI 65))] - "TARGET_TM_EXTENSIONS" - "%I0%*iconst_0%S1%S2%*iconst_0%*write_global1%*tm_memsetsi") - - (define_insn "cmpstrsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "=gD") - (compare:SI (match_operand:BLK 1 "memory_operand" "g") - (match_operand:BLK 2 "memory_operand" "g"))) - (use (match_operand:SI 3 "pj_source_operand" "gS")) - (use (match_operand:SI 4 "pj_source_operand" "gS")) - (clobber (reg:SI 65))] - "TARGET_TM_EXTENSIONS" - "%I1%I2%S3%S4%*iconst_0%*write_global1%*tm_cmpstrsi%R0") --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pj/pj-protos.h gcc-3.3/gcc/config/pj/pj-protos.h *** gcc-3.2.3/gcc/config/pj/pj-protos.h 2001-11-04 02:12:13.000000000 +0000 --- gcc-3.3/gcc/config/pj/pj-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - /* Prototypes for pj.c functions used in the md file & elsewhere. - Copyright (C) 2000 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - void pj_expand_prologue PARAMS ((void)); - void pj_expand_epilogue PARAMS ((void)); - void pj_asm_output_opcode PARAMS ((FILE *, const char *)); - - #ifdef RTX_CODE - extern rtx pj_cmp_op0; - extern rtx pj_cmp_op1; - extern enum machine_mode pj_cmp_mode; - extern int pj_stuff_on_line; - extern const char *pj_standard_float_constant PARAMS ((rtx)); - extern int pj_source_operand PARAMS ((rtx op, enum machine_mode mode)); - extern int pj_signed_comparison_operator PARAMS ((rtx, enum machine_mode)); - extern int pj_unsigned_comparison_operator PARAMS ((rtx, enum machine_mode)); - extern rtx pj_workout_arg_words PARAMS ((rtx, rtx)); - extern void pj_machine_dependent_reorg PARAMS ((rtx)); - extern void pj_print_operand PARAMS ((FILE * stream, rtx x, int code)); - extern const char *pj_output_addsi3 PARAMS ((rtx * operands)); - - #ifdef TREE_CODE - extern rtx pj_expand_builtin_va_arg PARAMS ((tree valist, tree type)); - extern rtx pj_function_incoming_arg PARAMS ((CUMULATIVE_ARGS * args_so_far, - enum machine_mode promote_mode, - tree passed_type, - int named_arg)); - #endif - #endif --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/pj/t-pj gcc-3.3/gcc/config/pj/t-pj *** gcc-3.2.3/gcc/config/pj/t-pj 2001-05-17 03:16:10.000000000 +0000 --- gcc-3.3/gcc/config/pj/t-pj 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - LIB1ASMSRC = pj/lib1funcs.S - LIB1ASMFUNCS = vhelper pjucmpdi2 - - # For svr4 we build crtbegin.o and crtend.o which serve to add begin and - # end labels to the .ctors and .dtors section when we link using gcc. - - EXTRA_PARTS=crtbegin.o crtend.o --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/psos.h gcc-3.3/gcc/config/psos.h *** gcc-3.2.3/gcc/config/psos.h 2001-12-16 15:40:57.000000000 +0000 --- gcc-3.3/gcc/config/psos.h 2002-09-29 13:16:44.000000000 +0000 *************** Boston, MA 02111-1307, USA. *** 51,63 **** board-support package (e.g. M162) and the run-time configuration (e.g. application vs. ram-image vs. rom-image). Specify the startfile in a linker-script created from the generic ! architecture-specific linker-scripts. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "" ! /* Predefined macros (independent of processor type). */ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dpsos" --- 51,63 ---- board-support package (e.g. M162) and the run-time configuration (e.g. application vs. ram-image vs. rom-image). Specify the startfile in a linker-script created from the generic ! architecture-specific linker-scripts. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "" ! /* Predefined macros (independent of processor type). */ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dpsos" *************** Boston, MA 02111-1307, USA. *** 85,88 **** /* For pSOS we use DBX debugging info. */ ! #define DBX_DEBUGGING_INFO --- 85,88 ---- /* For pSOS we use DBX debugging info. */ ! #define DBX_DEBUGGING_INFO 1 diff -Nrc3pad gcc-3.2.3/gcc/config/ptx4.h gcc-3.3/gcc/config/ptx4.h *** gcc-3.2.3/gcc/config/ptx4.h 2001-10-19 22:27:22.000000000 +0000 --- gcc-3.3/gcc/config/ptx4.h 2002-09-29 13:16:44.000000000 +0000 *************** Boston, MA 02111-1307, USA. *** 160,175 **** %{!p:-Y P,/lib:/usr/lib}} \ %{Qy:} %{!Qn:-Qy}" ! /* Gcc automatically adds in one of the files /lib/values-Xc.o, ! /lib/values-Xa.o, or /lib/values-Xt.o for each final link ! step (depending upon the other gcc options selected, such as ! -traditional and -ansi). These files each contain one (initialized) ! copy of a special variable called `_lib_version'. Each one of these ! files has `_lib_version' initialized to a different (enum) value. ! The SVR4 library routines query the value of `_lib_version' at run ! to decide how they should behave. Specifically, they decide (based ! upon the value of `_lib_version') if they will act in a strictly ANSI ! conforming manner or not. */ #undef STARTFILE_SPEC --- 160,174 ---- %{!p:-Y P,/lib:/usr/lib}} \ %{Qy:} %{!Qn:-Qy}" ! /* Gcc automatically adds in one of the files /lib/values-Xc.o ! or /lib/values-Xa.o, for each final link step (depending upon the other ! gcc options selected, such as -ansi). These files each contain one ! (initialized) copy of a special variable called `_lib_version'. Each ! one of these files has `_lib_version' initialized to a different (enum) ! value. The SVR4 library routines query the value of `_lib_version' ! at run to decide how they should behave. Specifically, they decide ! (based upon the value of `_lib_version') if they will act in a strictly ! ANSI conforming manner or not. */ #undef STARTFILE_SPEC *************** Boston, MA 02111-1307, USA. *** 178,193 **** %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ %{pg:gcrti.o%s}%{!pg:crti.o%s} \ %{ansi:values-Xc.o%s} \ ! %{!ansi: \ ! %{traditional:values-Xt.o%s} \ ! %{!traditional:values-Xa.o%s}} \ crtbegin.o%s" ! /* Allow #sccs in preprocessor. */ ! ! #define SCCS_DIRECTIVE ! ! /* Don't use bcopy, which doesn't handle overlaps before DYNIX/ptx 4.6. */ #undef HAVE_BCOPY --- 177,186 ---- %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ %{pg:gcrti.o%s}%{!pg:crti.o%s} \ %{ansi:values-Xc.o%s} \ ! %{!ansi:values-Xa.o%s} \ crtbegin.o%s" ! /* Don't use bcopy, which doesn't handle overlaps before DYNIX/ptx 4.6. */ #undef HAVE_BCOPY *************** while (0) *** 246,252 **** /* This says how to output assembler code to declare an uninitialized external linkage data item. There's a bug in the DYNIX/ptx linker (PR 254649) when the alignment for such an object is specified, so ! ignore the ALIGN parameter. */ #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ --- 239,245 ---- /* This says how to output assembler code to declare an uninitialized external linkage data item. There's a bug in the DYNIX/ptx linker (PR 254649) when the alignment for such an object is specified, so ! ignore the ALIGN parameter. */ #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ diff -Nrc3pad gcc-3.2.3/gcc/config/romp/romp.c gcc-3.3/gcc/config/romp/romp.c *** gcc-3.2.3/gcc/config/romp/romp.c 2002-01-03 17:40:05.000000000 +0000 --- gcc-3.3/gcc/config/romp/romp.c 2002-09-20 23:46:58.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 37,42 **** --- 37,43 ---- #include "tree.h" #include "function.h" #include "expr.h" + #include "ggc.h" #include "toplev.h" #include "tm_p.h" #include "target.h" *************** static int memory_offset_in_range_p PARA *** 53,64 **** --- 54,72 ---- static unsigned int hash_rtx PARAMS ((rtx)); static void romp_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void romp_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void romp_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)); + static void romp_encode_section_info PARAMS ((tree, int)); /* Initialize the GCC target structure. */ #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE romp_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE romp_output_function_epilogue + #undef TARGET_ASM_SELECT_RTX_SECTION + #define TARGET_ASM_SELECT_RTX_SECTION romp_select_rtx_section + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO romp_encode_section_info struct gcc_target targetm = TARGET_INITIALIZER; *************** update_cc (body, insn) *** 221,227 **** break; case CC_TBIT: ! /* Insn sets T bit if result is non-zero. Next insn must be branch. */ CC_STATUS_INIT; cc_status.flags = CC_IN_TB | CC_NOT_NEGATIVE; break; --- 229,235 ---- break; case CC_TBIT: ! /* Insn sets T bit if result is nonzero. Next insn must be branch. */ CC_STATUS_INIT; cc_status.flags = CC_IN_TB | CC_NOT_NEGATIVE; break; *************** current_function_operand (op, mode) *** 381,387 **** && ! strcmp (current_function_name, XSTR (op, 0))); } ! /* Return non-zero if this function is known to have a null epilogue. */ int null_epilogue () --- 389,395 ---- && ! strcmp (current_function_name, XSTR (op, 0))); } ! /* Return nonzero if this function is known to have a null epilogue. */ int null_epilogue () *************** print_operand (file, x, code) *** 778,784 **** break; case 'Z': ! /* Upper or lower half, depending on which is non-zero or not all ones. Must be consistent with 'z' above. */ if (GET_CODE (x) != CONST_INT) output_operand_lossage ("invalid %%Z value"); --- 786,792 ---- break; case 'Z': ! /* Upper or lower half, depending on which is nonzero or not all ones. Must be consistent with 'z' above. */ if (GET_CODE (x) != CONST_INT) output_operand_lossage ("invalid %%Z value"); *************** romp_sa_size () *** 1024,1030 **** return size * 4; } ! /* Return non-zero if this function makes calls or has fp operations (which are really calls). */ int --- 1032,1038 ---- return size * 4; } ! /* Return nonzero if this function makes calls or has fp operations (which are really calls). */ int *************** romp_makes_calls () *** 1051,1057 **** return 0; } ! /* Return non-zero if this function will use r14 as a pointer to its constant pool. */ int --- 1059,1065 ---- return 0; } ! /* Return nonzero if this function will use r14 as a pointer to its constant pool. */ int *************** romp_using_r14 () *** 1063,1069 **** || get_pool_size () != 0 || romp_makes_calls ()); } ! /* Return non-zero if this function needs to push space on the stack. */ int romp_pushes_stack () --- 1071,1077 ---- || get_pool_size () != 0 || romp_makes_calls ()); } ! /* Return nonzero if this function needs to push space on the stack. */ int romp_pushes_stack () *************** rtx *** 1338,1344 **** get_symref (name) register const char *name; { - extern struct obstack permanent_obstack; register const char *sp = name; unsigned int hash = 0; struct symref_hashent *p, **last_p; --- 1346,1351 ---- *************** get_symref (name) *** 1360,1369 **** { /* Ensure SYMBOL_REF will stay around. */ p = *last_p = (struct symref_hashent *) ! permalloc (sizeof (struct symref_hashent)); ! p->symref = gen_rtx_SYMBOL_REF (Pmode, ! obstack_copy0 (&permanent_obstack, ! name, strlen (name))); p->next = 0; } --- 1367,1374 ---- { /* Ensure SYMBOL_REF will stay around. */ p = *last_p = (struct symref_hashent *) ! xmalloc (sizeof (struct symref_hashent)); ! p->symref = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name)); p->next = 0; } *************** output_fpops (file) *** 1962,1971 **** size_so_far += 4; if (GET_CODE (immed[i]) == CONST_DOUBLE) { ! union real_extract u; ! ! memcpy (&u, &CONST_DOUBLE_LOW (immed[i]), sizeof u); ! assemble_real (u.d, GET_MODE (immed[i]), GET_MODE_ALIGNMENT (GET_MODE (immed[i]))); } else --- 1967,1975 ---- size_so_far += 4; if (GET_CODE (immed[i]) == CONST_DOUBLE) { ! REAL_VALUE_TYPE r; ! REAL_VALUE_FROM_CONST_DOUBLE (r, immed[i]); ! assemble_real (r, GET_MODE (immed[i]), GET_MODE_ALIGNMENT (GET_MODE (immed[i]))); } else *************** romp_initialize_trampoline (tramp, fnadd *** 2069,2071 **** --- 2073,2099 ---- addr = memory_address (HImode, plus_constant (tramp, 20)); emit_move_insn (gen_rtx_MEM (HImode, addr), gen_lowpart (HImode, temp)); } + + /* On ROMP, all constants are in the data area. */ + + static void + romp_select_rtx_section (mode, x, align) + enum machine_mode mode ATTRIBUTE_UNUSED; + rtx x ATTRIBUTE_UNUSED; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + data section (); + } + + /* For no good reason, we do the same as the other RT compilers and load + the addresses of data areas for a function from our data area. That means + that we need to mark such SYMBOL_REFs. We do so here. */ + + static void + romp_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (TREE_CODE (TREE_TYPE (decl)) == FUNCTION_TYPE) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } diff -Nrc3pad gcc-3.2.3/gcc/config/romp/romp.h gcc-3.3/gcc/config/romp/romp.h *** gcc-3.2.3/gcc/config/romp/romp.h 2002-01-08 22:51:41.000000000 +0000 --- gcc-3.3/gcc/config/romp/romp.h 2002-09-24 12:49:02.000000000 +0000 *************** extern int target_flags; *** 90,111 **** for them. Might as well be consistent with bits and bytes. */ #define WORDS_BIG_ENDIAN 1 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 --- 90,98 ---- *************** extern int target_flags; *** 124,130 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Make strings word-aligned so strcpy from constants will be faster. */ --- 111,117 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Make strings word-aligned so strcpy from constants will be faster. */ *************** struct rt_cargs {int gregs, fregs; }; *** 713,724 **** data_offset = ((SIZE) + 12 + 3) / 4; \ } - /* Select section for constant in constant pool. - - On ROMP, all constants are in the data area. */ - - #define SELECT_RTX_SECTION(MODE, X, ALIGN) data_section () - /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ --- 700,705 ---- *************** struct rt_cargs {int gregs, fregs; }; *** 923,935 **** || GET_CODE (X) == CONST_DOUBLE) \ && ! (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X))) - /* For no good reason, we do the same as the other RT compilers and load - the addresses of data areas for a function from our data area. That means - that we need to mark such SYMBOL_REFs. We do so here. */ - #define ENCODE_SECTION_INFO(DECL) \ - if (TREE_CODE (TREE_TYPE (DECL)) == FUNCTION_TYPE) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. We have two alternate definitions for each of them. --- 904,909 ---- *************** struct rt_cargs {int gregs, fregs; }; *** 1111,1117 **** #define MOVE_MAX 4 /* Nonzero if access to memory by bytes is no faster than for words. ! Also non-zero if doing byte operations (specifically shifts) in registers is undesirable. */ #define SLOW_BYTE_ACCESS 1 --- 1085,1091 ---- #define MOVE_MAX 4 /* Nonzero if access to memory by bytes is no faster than for words. ! Also nonzero if doing byte operations (specifically shifts) in registers is undesirable. */ #define SLOW_BYTE_ACCESS 1 *************** struct rt_cargs {int gregs, fregs; }; *** 1126,1132 **** #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Define the letter code used in a stabs entry for parameters passed with the register attribute. --- 1100,1106 ---- #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Define the letter code used in a stabs entry for parameters passed with the register attribute. *************** struct rt_cargs {int gregs, fregs; }; *** 1341,1357 **** "r10", "r11", "r12", "r13", "r14", "r15", "ap", \ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7" } ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) /* The prefix to add to user-visible assembler symbols. */ --- 1315,1322 ---- "r10", "r11", "r12", "r13", "r14", "r15", "ap", \ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7" } ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* The prefix to add to user-visible assembler symbols. */ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/aix31.h gcc-3.3/gcc/config/rs6000/aix31.h *** gcc-3.2.3/gcc/config/rs6000/aix31.h 2001-11-15 05:21:06.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/aix31.h 2002-08-04 22:45:25.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 29,53 **** where we can't, it gets stripped off. */ #undef ASM_OUTPUT_EXTERNAL ! #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ ! { rtx _symref = XEXP (DECL_RTL (DECL), 0); \ ! if ((TREE_CODE (DECL) == VAR_DECL \ ! || TREE_CODE (DECL) == FUNCTION_DECL) \ ! && (NAME)[strlen (NAME) - 1] != ']') \ ! { \ ! char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \ ! strcpy (_name, XSTR (_symref, 0)); \ ! strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \ ! XSTR (_symref, 0) = _name; \ ! } \ ! fputs ("\t.extern ", FILE); \ ! assemble_name (FILE, XSTR (_symref, 0)); \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! { \ ! fputs ("\n\t.extern .", FILE); \ ! RS6000_OUTPUT_BASENAME (FILE, XSTR (_symref, 0)); \ ! } \ ! putc ('\n', FILE); \ } /* Similar, but for libcall. We only have to worry about the function name, --- 29,53 ---- where we can't, it gets stripped off. */ #undef ASM_OUTPUT_EXTERNAL ! #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ ! { rtx _symref = XEXP (DECL_RTL (DECL), 0); \ ! if ((TREE_CODE (DECL) == VAR_DECL \ ! || TREE_CODE (DECL) == FUNCTION_DECL) \ ! && (NAME)[strlen (NAME) - 1] != ']') \ ! { \ ! XSTR (_symref, 0) = concat (XSTR (_symref, 0), \ ! (TREE_CODE (DECL) == FUNCTION_DECL \ ! ? "[DS]" : "[RW]"), \ ! NULL); \ ! } \ ! fputs ("\t.extern ", FILE); \ ! assemble_name (FILE, XSTR (_symref, 0)); \ ! if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! { \ ! fputs ("\n\t.extern .", FILE); \ ! RS6000_OUTPUT_BASENAME (FILE, XSTR (_symref, 0)); \ ! } \ ! putc ('\n', FILE); \ } /* Similar, but for libcall. We only have to worry about the function name, *************** Boston, MA 02111-1307, USA. */ *** 60,67 **** } /* AIX 3.2 defined _AIX32, but older versions do not. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_IBMR2 -D_AIX -Asystem=unix -Asystem=aix -Acpu=rs6000 -Amachine=rs6000" /* AIX 3.1 uses bit 15 in CROR as the magic nop. */ #undef RS6000_CALL_GLUE --- 60,77 ---- } /* AIX 3.2 defined _AIX32, but older versions do not. */ ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_IBMR2"); \ ! builtin_define ("_AIX"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=aix"); \ ! builtin_assert ("cpu=rs6000"); \ ! builtin_assert ("machine=rs6000"); \ ! } \ ! while (0) /* AIX 3.1 uses bit 15 in CROR as the magic nop. */ #undef RS6000_CALL_GLUE diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/aix41.h gcc-3.3/gcc/config/rs6000/aix41.h *** gcc-3.2.3/gcc/config/rs6000/aix41.h 2001-01-09 20:46:11.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/aix41.h 2002-07-10 00:33:51.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 33,51 **** #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mcom" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 \ ! -D_LONG_LONG -Asystem=unix -Asystem=aix" #undef CPP_SPEC #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ %{ansi: -D_ANSI_C_SOURCE}\ %{mpe: -I/usr/lpp/ppe.poe/include}\ ! %{pthread: -D_THREAD_SAFE}\ ! %(cpp_cpu)" ! ! #undef CPP_DEFAULT_SPEC ! #define CPP_DEFAULT_SPEC "-D_ARCH_COM" #undef TARGET_DEFAULT #define TARGET_DEFAULT MASK_NEW_MNEMONICS --- 33,58 ---- #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mcom" ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_IBMR2"); \ ! builtin_define ("_POWER"); \ ! builtin_define ("_AIX"); \ ! builtin_define ("_AIX32"); \ ! builtin_define ("_AIX41"); \ ! builtin_define ("_LONG_LONG"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=aix"); \ ! } \ ! while (0) #undef CPP_SPEC #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ %{ansi: -D_ANSI_C_SOURCE}\ %{mpe: -I/usr/lpp/ppe.poe/include}\ ! %{pthread: -D_THREAD_SAFE}" #undef TARGET_DEFAULT #define TARGET_DEFAULT MASK_NEW_MNEMONICS diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/aix43.h gcc-3.3/gcc/config/rs6000/aix43.h *** gcc-3.2.3/gcc/config/rs6000/aix43.h 2002-05-24 19:27:08.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/aix43.h 2002-07-10 00:33:51.000000000 +0000 *************** do { \ *** 75,80 **** --- 75,82 ---- %{mcpu=common: -mcom} \ %{mcpu=power: -mpwr} \ %{mcpu=power2: -mpwr2} \ + %{mcpu=power3: -m604} \ + %{mcpu=power4: -m604} \ %{mcpu=powerpc: -mppc} \ %{mcpu=rios: -mpwr} \ %{mcpu=rios1: -mpwr} \ *************** do { \ *** 82,89 **** %{mcpu=rsc: -mpwr} \ %{mcpu=rsc1: -mpwr} \ %{mcpu=rs64a: -mppc} \ - %{mcpu=403: -mppc} \ - %{mcpu=505: -mppc} \ %{mcpu=601: -m601} \ %{mcpu=602: -mppc} \ %{mcpu=603: -m603} \ --- 84,89 ---- *************** do { \ *** 91,114 **** %{mcpu=604: -m604} \ %{mcpu=604e: -m604} \ %{mcpu=620: -mppc} \ ! %{mcpu=630: -mppc} \ ! %{mcpu=821: -mppc} \ ! %{mcpu=860: -mppc}" #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mcom" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 \ ! -D_LONG_LONG -Asystem=unix -Asystem=aix" #undef CPP_SPEC #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ %{ansi: -D_ANSI_C_SOURCE}\ ! %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L}\ %{mpe: -I/usr/lpp/ppe.poe/include}\ ! %{pthread: -D_THREAD_SAFE}\ ! %(cpp_cpu)" /* The GNU C++ standard library requires that these macros be defined. */ --- 91,123 ---- %{mcpu=604: -m604} \ %{mcpu=604e: -m604} \ %{mcpu=620: -mppc} \ ! %{mcpu=630: -m604}" #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mcom" ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_IBMR2"); \ ! builtin_define ("_POWER"); \ ! builtin_define ("_AIX"); \ ! builtin_define ("_AIX32"); \ ! builtin_define ("_AIX41"); \ ! builtin_define ("_AIX43"); \ ! builtin_define ("_LONG_LONG"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=aix"); \ ! } \ ! while (0) #undef CPP_SPEC #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ %{ansi: -D_ANSI_C_SOURCE}\ ! %{maix64: -D__64BIT__}\ %{mpe: -I/usr/lpp/ppe.poe/include}\ ! %{pthread: -D_THREAD_SAFE}" /* The GNU C++ standard library requires that these macros be defined. */ *************** do { \ *** 117,167 **** "-D_XOPEN_SOURCE=500 \ -D_XOPEN_SOURCE_EXTENDED=1 \ -D_LARGE_FILE_API \ ! -D_ALL_SOURCE \ ! %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L}\ ! %{mpe: -I/usr/lpp/ppe.poe/include}\ ! %{pthread: -D_THREAD_SAFE}\ ! %(cpp_cpu)" ! ! /* Common CPP definitions used by CPP_SPEC among the various targets ! for handling -mcpu=xxx switches. */ ! #undef CPP_CPU_SPEC ! #define CPP_CPU_SPEC \ ! "%{!mcpu*: %{!maix64: \ ! %{mpower: %{!mpower2: -D_ARCH_PWR}} \ ! %{mpower2: -D_ARCH_PWR2} \ ! %{mpowerpc*: -D_ARCH_PPC} \ ! %{!mpower*: %{!mpowerpc*: %(cpp_default)}}}} \ ! %{mcpu=common: -D_ARCH_COM} \ ! %{mcpu=power: -D_ARCH_PWR} \ ! %{mcpu=power2: -D_ARCH_PWR2} \ ! %{mcpu=powerpc: -D_ARCH_PPC} \ ! %{mcpu=rios: -D_ARCH_PWR} \ ! %{mcpu=rios1: -D_ARCH_PWR} \ ! %{mcpu=rios2: -D_ARCH_PWR2} \ ! %{mcpu=rsc: -D_ARCH_PWR} \ ! %{mcpu=rsc1: -D_ARCH_PWR} \ ! %{mcpu=rs64a: -D_ARCH_PPC} \ ! %{mcpu=403: -D_ARCH_PPC} \ ! %{mcpu=505: -D_ARCH_PPC} \ ! %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ ! %{mcpu=602: -D_ARCH_PPC} \ ! %{mcpu=603: -D_ARCH_PPC} \ ! %{mcpu=603e: -D_ARCH_PPC} \ ! %{mcpu=604: -D_ARCH_PPC} \ ! %{mcpu=620: -D_ARCH_PPC} \ ! %{mcpu=630: -D_ARCH_PPC} \ ! %{mcpu=821: -D_ARCH_PPC} \ ! %{mcpu=860: -D_ARCH_PPC}" ! ! #undef CPP_DEFAULT_SPEC ! #define CPP_DEFAULT_SPEC "-D_ARCH_COM" #undef TARGET_DEFAULT #define TARGET_DEFAULT MASK_NEW_MNEMONICS #undef PROCESSOR_DEFAULT ! #define PROCESSOR_DEFAULT PROCESSOR_PPC604 /* Define this macro as a C expression for the initializer of an array of string to tell the driver program which options are --- 126,141 ---- "-D_XOPEN_SOURCE=500 \ -D_XOPEN_SOURCE_EXTENDED=1 \ -D_LARGE_FILE_API \ ! -D_ALL_SOURCE \ ! %{maix64: -D__64BIT__} \ ! %{mpe: -I/usr/lpp/ppe.poe/include} \ ! %{pthread: -D_THREAD_SAFE}" #undef TARGET_DEFAULT #define TARGET_DEFAULT MASK_NEW_MNEMONICS #undef PROCESSOR_DEFAULT ! #define PROCESSOR_DEFAULT PROCESSOR_PPC604e /* Define this macro as a C expression for the initializer of an array of string to tell the driver program which options are diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/aix51.h gcc-3.3/gcc/config/rs6000/aix51.h *** gcc-3.2.3/gcc/config/rs6000/aix51.h 2002-05-24 19:27:08.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/aix51.h 2002-07-10 00:33:51.000000000 +0000 *************** do { \ *** 75,80 **** --- 75,82 ---- %{mcpu=common: -mcom} \ %{mcpu=power: -mpwr} \ %{mcpu=power2: -mpwr2} \ + %{mcpu=power3: -m604} \ + %{mcpu=power4: -m604} \ %{mcpu=powerpc: -mppc} \ %{mcpu=rios: -mpwr} \ %{mcpu=rios1: -mpwr} \ *************** do { \ *** 82,89 **** %{mcpu=rsc: -mpwr} \ %{mcpu=rsc1: -mpwr} \ %{mcpu=rs64a: -mppc} \ - %{mcpu=403: -mppc} \ - %{mcpu=505: -mppc} \ %{mcpu=601: -m601} \ %{mcpu=602: -mppc} \ %{mcpu=603: -m603} \ --- 84,89 ---- *************** do { \ *** 91,171 **** %{mcpu=604: -m604} \ %{mcpu=604e: -m604} \ %{mcpu=620: -mppc} \ ! %{mcpu=630: -mppc} \ ! %{mcpu=821: -mppc} \ ! %{mcpu=860: -mppc}" #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mcom" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_LONG_LONG \ ! -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -Asystem=unix -Asystem=aix" #undef CPP_SPEC ! #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ ! %{ansi: -D_ANSI_C_SOURCE}\ ! %{!maix64: -D__WCHAR_TYPE__=short\\ unsigned\\ int}\ ! %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L \ ! -D__WCHAR_TYPE__=unsigned\\ int}\ ! %{mpe: -I/usr/lpp/ppe.poe/include}\ ! %{pthread: -D_THREAD_SAFE}\ ! %(cpp_cpu)" /* The GNU C++ standard library requires that these macros be defined. */ #undef CPLUSPLUS_CPP_SPEC ! #define CPLUSPLUS_CPP_SPEC \ ! "-D_XOPEN_SOURCE=500 \ ! -D_XOPEN_SOURCE_EXTENDED=1 \ ! -D_LARGE_FILE_API \ ! -D_ALL_SOURCE \ ! %{!maix64: -D__WCHAR_TYPE__=short\\ unsigned\\ int}\ ! %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L \ ! -D__WCHAR_TYPE__=unsigned\\ int}\ ! %{mpe: -I/usr/lpp/ppe.poe/include}\ ! %{pthread: -D_THREAD_SAFE}\ ! %(cpp_cpu)" ! ! /* Common CPP definitions used by CPP_SPEC among the various targets ! for handling -mcpu=xxx switches. */ ! #undef CPP_CPU_SPEC ! #define CPP_CPU_SPEC \ ! "%{!mcpu*: %{!maix64: \ ! %{mpower: %{!mpower2: -D_ARCH_PWR}} \ ! %{mpower2: -D_ARCH_PWR2} \ ! %{mpowerpc*: -D_ARCH_PPC} \ ! %{!mpower*: %{!mpowerpc*: %(cpp_default)}}}} \ ! %{mcpu=common: -D_ARCH_COM} \ ! %{mcpu=power: -D_ARCH_PWR} \ ! %{mcpu=power2: -D_ARCH_PWR2} \ ! %{mcpu=powerpc: -D_ARCH_PPC} \ ! %{mcpu=rios: -D_ARCH_PWR} \ ! %{mcpu=rios1: -D_ARCH_PWR} \ ! %{mcpu=rios2: -D_ARCH_PWR2} \ ! %{mcpu=rsc: -D_ARCH_PWR} \ ! %{mcpu=rsc1: -D_ARCH_PWR} \ ! %{mcpu=rs64a: -D_ARCH_PPC} \ ! %{mcpu=403: -D_ARCH_PPC} \ ! %{mcpu=505: -D_ARCH_PPC} \ ! %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ ! %{mcpu=602: -D_ARCH_PPC} \ ! %{mcpu=603: -D_ARCH_PPC} \ ! %{mcpu=603e: -D_ARCH_PPC} \ ! %{mcpu=604: -D_ARCH_PPC} \ ! %{mcpu=620: -D_ARCH_PPC} \ ! %{mcpu=630: -D_ARCH_PPC} \ ! %{mcpu=821: -D_ARCH_PPC} \ ! %{mcpu=860: -D_ARCH_PPC}" ! ! #undef CPP_DEFAULT_SPEC ! #define CPP_DEFAULT_SPEC "-D_ARCH_COM" #undef TARGET_DEFAULT #define TARGET_DEFAULT MASK_NEW_MNEMONICS #undef PROCESSOR_DEFAULT ! #define PROCESSOR_DEFAULT PROCESSOR_PPC604 /* Define this macro as a C expression for the initializer of an array of string to tell the driver program which options are --- 91,142 ---- %{mcpu=604: -m604} \ %{mcpu=604e: -m604} \ %{mcpu=620: -mppc} \ ! %{mcpu=630: -m604}" #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mcom" ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_IBMR2"); \ ! builtin_define ("_POWER"); \ ! builtin_define ("_LONG_LONG"); \ ! builtin_define ("_AIX"); \ ! builtin_define ("_AIX32"); \ ! builtin_define ("_AIX41"); \ ! builtin_define ("_AIX43"); \ ! builtin_define ("_AIX51"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=aix"); \ ! } \ ! while (0) #undef CPP_SPEC ! #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \ ! %{ansi: -D_ANSI_C_SOURCE} \ ! %{maix64: -D__64BIT__} \ ! %{mpe: -I/usr/lpp/ppe.poe/include} \ ! %{pthread: -D_THREAD_SAFE}" /* The GNU C++ standard library requires that these macros be defined. */ #undef CPLUSPLUS_CPP_SPEC ! #define CPLUSPLUS_CPP_SPEC \ ! "-D_XOPEN_SOURCE=500 \ ! -D_XOPEN_SOURCE_EXTENDED=1 \ ! -D_LARGE_FILE_API \ ! -D_ALL_SOURCE \ ! %{maix64: -D__64BIT__} \ ! %{mpe: -I/usr/lpp/ppe.poe/include} \ ! %{pthread: -D_THREAD_SAFE}" #undef TARGET_DEFAULT #define TARGET_DEFAULT MASK_NEW_MNEMONICS #undef PROCESSOR_DEFAULT ! #define PROCESSOR_DEFAULT PROCESSOR_PPC604e /* Define this macro as a C expression for the initializer of an array of string to tell the driver program which options are *************** do { \ *** 204,212 **** #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "long int" - /* __WCHAR_TYPE__ is dynamic, so do not define it statically. */ - #define NO_BUILTIN_WCHAR_TYPE - /* Type used for wchar_t, as a string used in a declaration. */ #undef WCHAR_TYPE #define WCHAR_TYPE (!TARGET_64BIT ? "short unsigned int" : "unsigned int") --- 175,180 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/aix52.h gcc-3.3/gcc/config/rs6000/aix52.h *** gcc-3.2.3/gcc/config/rs6000/aix52.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/aix52.h 2002-10-10 18:29:33.000000000 +0000 *************** *** 0 **** --- 1,191 ---- + /* Definitions of target machine for GNU compiler, + for IBM RS/6000 POWER running AIX V5.2. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by David Edelsohn (edelsohn@gnu.org). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + /* AIX V5 and above support 64-bit executables. */ + #undef SUBSUBTARGET_SWITCHES + #define SUBSUBTARGET_SWITCHES \ + {"aix64", MASK_64BIT | MASK_POWERPC64 | MASK_POWERPC, \ + N_("Compile for 64-bit pointers") }, \ + {"aix32", - (MASK_64BIT | MASK_POWERPC64), \ + N_("Compile for 32-bit pointers") }, \ + {"pe", 0, \ + N_("Support message passing with the Parallel Environment") }, + + /* Sometimes certain combinations of command options do not make sense + on a particular target machine. You can define a macro + `OVERRIDE_OPTIONS' to take account of this. This macro, if + defined, is executed once just after all the command options have + been parsed. + + The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to + get control. */ + + #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2) + #define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + if (TARGET_64BIT && (target_flags & NON_POWERPC_MASKS)) \ + { \ + target_flags &= ~NON_POWERPC_MASKS; \ + warning ("-maix64 and POWER architecture are incompatible"); \ + } \ + if (TARGET_64BIT && ! TARGET_POWERPC64) \ + { \ + target_flags |= MASK_POWERPC64; \ + warning ("-maix64 requires PowerPC64 architecture remain enabled"); \ + } \ + if (TARGET_POWERPC64 && ! TARGET_64BIT) \ + { \ + error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ + } \ + } while (0); + + #undef ASM_SPEC + #define ASM_SPEC "-u %{maix64:-a64 -mppc64} %(asm_cpu)" + + /* Common ASM definitions used by ASM_SPEC amonst the various targets + for handling -mcpu=xxx switches. */ + #undef ASM_CPU_SPEC + #define ASM_CPU_SPEC \ + "%{!mcpu*: %{!maix64: \ + %{mpowerpc64: -mppc64} \ + %{!mpower64: %(asm_default)}}} \ + %{mcpu=power3: -m604} \ + %{mcpu=power4: -m604} \ + %{mcpu=powerpc: -mppc} \ + %{mcpu=rs64a: -mppc} \ + %{mcpu=603: -m603} \ + %{mcpu=603e: -m603} \ + %{mcpu=604: -m604} \ + %{mcpu=604e: -m604} \ + %{mcpu=620: -mppc} \ + %{mcpu=630: -m604}" + + #undef ASM_DEFAULT_SPEC + #define ASM_DEFAULT_SPEC "-mppc" + + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("_IBMR2"); \ + builtin_define ("_POWER"); \ + builtin_define ("_LONG_LONG"); \ + builtin_define ("_AIX"); \ + builtin_define ("_AIX32"); \ + builtin_define ("_AIX41"); \ + builtin_define ("_AIX43"); \ + builtin_define ("_AIX51"); \ + builtin_define ("_AIX52"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=aix"); \ + } \ + while (0) + + #undef CPP_SPEC + #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \ + %{ansi: -D_ANSI_C_SOURCE} \ + %{maix64: -D__64BIT__} \ + %{mpe: -I/usr/lpp/ppe.poe/include} \ + %{pthread: -D_THREAD_SAFE}" + + /* The GNU C++ standard library requires that these macros be + defined. */ + #undef CPLUSPLUS_CPP_SPEC + #define CPLUSPLUS_CPP_SPEC \ + "-D_XOPEN_SOURCE=500 \ + -D_XOPEN_SOURCE_EXTENDED=1 \ + -D_LARGE_FILE_API \ + -D_ALL_SOURCE \ + %{maix64: -D__64BIT__} \ + %{mpe: -I/usr/lpp/ppe.poe/include} \ + %{pthread: -D_THREAD_SAFE}" + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS) + + #undef PROCESSOR_DEFAULT + #define PROCESSOR_DEFAULT PROCESSOR_PPC630 + #undef PROCESSOR_DEFAULT64 + #define PROCESSOR_DEFAULT64 PROCESSOR_POWER4 + + #undef TARGET_POWER + #define TARGET_POWER 0 + + /* Define this macro as a C expression for the initializer of an + array of string to tell the driver program which options are + defaults for this target and thus do not need to be handled + specially when using `MULTILIB_OPTIONS'. + + Do not define this macro if `MULTILIB_OPTIONS' is not defined in + the target makefile fragment or if none of the options listed in + `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */ + + #undef MULTILIB_DEFAULTS + + #undef LIB_SPEC + #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\ + %{p:-L/lib/profiled -L/usr/lib/profiled}\ + %{!maix64:%{!shared:%{g*:-lg}}}\ + %{mpe:-L/usr/lpp/ppe.poe/lib -lmpi -lvtd}\ + %{pthread:-lpthreads} -lc" + + #undef LINK_SPEC + #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ + %{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\ + %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\ + %{mpe:-binitfini:poe_remote_main}" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{!shared:\ + %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\ + %{!maix64:\ + %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\ + %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}" + + /* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */ + + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "long int" + + /* Type used for wchar_t, as a string used in a declaration. */ + #undef WCHAR_TYPE + #define WCHAR_TYPE (!TARGET_64BIT ? "short unsigned int" : "unsigned int") + + /* Width of wchar_t in bits. */ + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE (!TARGET_64BIT ? 16 : 32) + #define MAX_WCHAR_TYPE_SIZE 32 + + /* AIX V5 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC + and "cror 31,31,31" for POWER architecture. */ + + #undef RS6000_CALL_GLUE + #define RS6000_CALL_GLUE "{cror 31,31,31|nop}" + + /* AIX 4.2 and above provides initialization and finalization function + support from linker command line. */ + #undef HAS_INIT_SECTION + #define HAS_INIT_SECTION + + #undef LD_INIT_SWITCH + #define LD_INIT_SWITCH "-binitfini" diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/aix.h gcc-3.3/gcc/config/rs6000/aix.h *** gcc-3.2.3/gcc/config/rs6000/aix.h 2002-08-08 17:52:40.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/aix.h 2002-11-26 04:54:49.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 21,34 **** /* Yes! We are AIX! */ #define DEFAULT_ABI ABI_AIX ! #undef TARGET_AIX #define TARGET_AIX 1 /* The AIX linker will discard static constructors in object files before collect has a chance to see them, so scan the object files directly. */ #define COLLECT_EXPORT_LIST /* Handle #pragma weak and #pragma pack. */ ! #define HANDLE_SYSV_PRAGMA /* This is the only version of nm that collect2 can work with. */ #define REAL_NM_FILE_NAME "/usr/ucb/nm" --- 21,51 ---- /* Yes! We are AIX! */ #define DEFAULT_ABI ABI_AIX ! #undef TARGET_AIX #define TARGET_AIX 1 + + /* AIX always has a TOC. */ + #define TARGET_NO_TOC 0 + #define TARGET_TOC 1 + #define FIXED_R2 1 + + /* AIX allows r13 to be used in 32-bit mode. */ + #define FIXED_R13 0 + + /* AIX does not support Altivec. */ + #undef TARGET_ALTIVEC + #define TARGET_ALTIVEC 0 + #undef TARGET_ALTIVEC_ABI + #define TARGET_ALTIVEC_ABI 0 + #undef TARGET_ALTIVEC_VRSAVE + #define TARGET_ALTIVEC_VRSAVE 0 + /* The AIX linker will discard static constructors in object files before collect has a chance to see them, so scan the object files directly. */ #define COLLECT_EXPORT_LIST /* Handle #pragma weak and #pragma pack. */ ! #define HANDLE_SYSV_PRAGMA 1 /* This is the only version of nm that collect2 can work with. */ #define REAL_NM_FILE_NAME "/usr/ucb/nm" *************** Boston, MA 02111-1307, USA. */ *** 41,58 **** #define LINK_LIBGCC_SPECIAL_1 /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_LONG_LONG \ ! -Asystem=unix -Asystem=aix -Acpu=rs6000 -Amachine=rs6000" /* Define appropriate architecture macros for preprocessor depending on target switches. */ #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ ! %{ansi: -D_ANSI_C_SOURCE}\ ! %(cpp_cpu)" ! ! #undef CPP_DEFAULT_SPEC ! #define CPP_DEFAULT_SPEC "-D_ARCH_PWR" #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "" --- 58,83 ---- #define LINK_LIBGCC_SPECIAL_1 /* Names to predefine in the preprocessor for this target machine. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("_IBMR2"); \ ! builtin_define ("_POWER"); \ ! builtin_define ("_AIX"); \ ! builtin_define ("_AIX32"); \ ! builtin_define ("_LONG_LONG"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=aix"); \ ! builtin_assert ("cpu=rs6000"); \ ! builtin_assert ("machine=rs6000"); \ ! } \ ! while (0) /* Define appropriate architecture macros for preprocessor depending on target switches. */ #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ ! %{ansi: -D_ANSI_C_SOURCE}" #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "" *************** Boston, MA 02111-1307, USA. */ *** 121,128 **** ? MAX (MAX ((COMPUTED), (SPECIFIED)), 64) \ : MAX ((COMPUTED), (SPECIFIED))) - - /* Indicate that jump tables go in the text section. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 --- 146,151 ---- *************** Boston, MA 02111-1307, USA. */ *** 176,189 **** } \ } while (0) - /* AIX always has a TOC. */ - #define TARGET_NO_TOC 0 - #define TARGET_TOC 1 - - #define FIXED_R2 1 - /* AIX allows r13 to be used. */ - #define FIXED_R13 0 - /* __throw will restore its own return address to be the same as the return address of the function that the throw is being made to. This is unfortunate, because we want to check the original --- 199,204 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/altivec.h gcc-3.3/gcc/config/rs6000/altivec.h *** gcc-3.2.3/gcc/config/rs6000/altivec.h 2002-05-18 05:40:16.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/altivec.h 2002-12-18 23:43:20.000000000 +0000 *************** vec_cmple (vector float a1, vector float *** 1102,1144 **** inline vector signed char vec_cmplt (vector unsigned char a1, vector unsigned char a2) { ! return (vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) a1, (vector signed char) a2); } inline vector signed char vec_cmplt (vector signed char a1, vector signed char a2) { ! return (vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) a1, (vector signed char) a2); } inline vector signed short vec_cmplt (vector unsigned short a1, vector unsigned short a2) { ! return (vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) a1, (vector signed short) a2); } inline vector signed short vec_cmplt (vector signed short a1, vector signed short a2) { ! return (vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) a1, (vector signed short) a2); } inline vector signed int vec_cmplt (vector unsigned int a1, vector unsigned int a2) { ! return (vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) a1, (vector signed int) a2); } inline vector signed int vec_cmplt (vector signed int a1, vector signed int a2) { ! return (vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) a1, (vector signed int) a2); } inline vector signed int vec_cmplt (vector float a1, vector float a2) { ! return (vector signed int) __builtin_altivec_vcmpgtfp ((vector float) a1, (vector float) a2); } /* vec_ctf */ --- 1102,1144 ---- inline vector signed char vec_cmplt (vector unsigned char a1, vector unsigned char a2) { ! return (vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) a2, (vector signed char) a1); } inline vector signed char vec_cmplt (vector signed char a1, vector signed char a2) { ! return (vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) a2, (vector signed char) a1); } inline vector signed short vec_cmplt (vector unsigned short a1, vector unsigned short a2) { ! return (vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) a2, (vector signed short) a1); } inline vector signed short vec_cmplt (vector signed short a1, vector signed short a2) { ! return (vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) a2, (vector signed short) a1); } inline vector signed int vec_cmplt (vector unsigned int a1, vector unsigned int a2) { ! return (vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) a2, (vector signed int) a1); } inline vector signed int vec_cmplt (vector signed int a1, vector signed int a2) { ! return (vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) a2, (vector signed int) a1); } inline vector signed int vec_cmplt (vector float a1, vector float a2) { ! return (vector signed int) __builtin_altivec_vcmpgtfp ((vector float) a2, (vector float) a1); } /* vec_ctf */ *************** __ch (__bin_args_eq (vector unsigned cha *** 6523,6529 **** #define vec_cmple(a1, a2) __builtin_altivec_vcmpgefp ((a1), (a2)) ! #define vec_cmplt(a1, a2) \ __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ ((vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) (a1), (vector signed char) (a2))), \ __ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ --- 6523,6529 ---- #define vec_cmple(a1, a2) __builtin_altivec_vcmpgefp ((a1), (a2)) ! #define vec_cmplt(a2, a1) \ __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ ((vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) (a1), (vector signed char) (a2))), \ __ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/altivec.md gcc-3.3/gcc/config/rs6000/altivec.md *** gcc-3.2.3/gcc/config/rs6000/altivec.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/altivec.md 2002-12-23 22:10:58.000000000 +0000 *************** *** 0 **** --- 1,1915 ---- + ;; AltiVec patterns. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; Contributed by Aldy Hernandez (aldy@quesejoda.com) + + ;; This file is part of GNU CC. + + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; Generic LVX load instruction. + (define_insn "altivec_lvx_4si" + [(set (match_operand:V4SI 0 "altivec_register_operand" "=v") + (match_operand:V4SI 1 "memory_operand" "m"))] + "TARGET_ALTIVEC" + "lvx %0,%y1" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvx_8hi" + [(set (match_operand:V8HI 0 "altivec_register_operand" "=v") + (match_operand:V8HI 1 "memory_operand" "m"))] + "TARGET_ALTIVEC" + "lvx %0,%y1" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvx_16qi" + [(set (match_operand:V16QI 0 "altivec_register_operand" "=v") + (match_operand:V16QI 1 "memory_operand" "m"))] + "TARGET_ALTIVEC" + "lvx %0,%y1" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvx_4sf" + [(set (match_operand:V4SF 0 "altivec_register_operand" "=v") + (match_operand:V4SF 1 "memory_operand" "m"))] + "TARGET_ALTIVEC" + "lvx %0,%y1" + [(set_attr "type" "vecload")]) + + ;; Generic STVX store instruction. + (define_insn "altivec_stvx_4si" + [(set (match_operand:V4SI 0 "memory_operand" "=m") + (match_operand:V4SI 1 "altivec_register_operand" "v"))] + "TARGET_ALTIVEC" + "stvx %1,%y0" + [(set_attr "type" "vecstore")]) + + (define_insn "altivec_stvx_8hi" + [(set (match_operand:V8HI 0 "memory_operand" "=m") + (match_operand:V8HI 1 "altivec_register_operand" "v"))] + "TARGET_ALTIVEC" + "stvx %1,%y0" + [(set_attr "type" "vecstore")]) + + (define_insn "altivec_stvx_16qi" + [(set (match_operand:V16QI 0 "memory_operand" "=m") + (match_operand:V16QI 1 "altivec_register_operand" "v"))] + "TARGET_ALTIVEC" + "stvx %1,%y0" + [(set_attr "type" "vecstore")]) + + (define_insn "altivec_stvx_4sf" + [(set (match_operand:V4SF 0 "memory_operand" "=m") + (match_operand:V4SF 1 "altivec_register_operand" "v"))] + "TARGET_ALTIVEC" + "stvx %1,%y0" + [(set_attr "type" "vecstore")]) + + ;; Vector move instructions. + (define_expand "movv4si" + [(set (match_operand:V4SI 0 "nonimmediate_operand" "") + (match_operand:V4SI 1 "any_operand" ""))] + "TARGET_ALTIVEC" + "{ rs6000_emit_move (operands[0], operands[1], V4SImode); DONE; }") + + (define_insn "*movv4si_internal" + [(set (match_operand:V4SI 0 "nonimmediate_operand" "=m,v,v,o,r,r") + (match_operand:V4SI 1 "input_operand" "v,m,v,r,o,r"))] + "TARGET_ALTIVEC" + "@ + stvx %1,%y0 + lvx %0,%y1 + vor %0,%1,%1 + stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 + lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 + mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" + [(set_attr "type" "altivec") + (set_attr "length" "*,*,*,16,16,16")]) + + (define_expand "movv8hi" + [(set (match_operand:V8HI 0 "nonimmediate_operand" "") + (match_operand:V8HI 1 "any_operand" ""))] + "TARGET_ALTIVEC" + "{ rs6000_emit_move (operands[0], operands[1], V8HImode); DONE; }") + + (define_insn "*movv8hi_internal1" + [(set (match_operand:V8HI 0 "nonimmediate_operand" "=m,v,v,o,r,r") + (match_operand:V8HI 1 "input_operand" "v,m,v,r,o,r"))] + "TARGET_ALTIVEC" + "@ + stvx %1,%y0 + lvx %0,%y1 + vor %0,%1,%1 + stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 + lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 + mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" + [(set_attr "type" "altivec") + (set_attr "length" "*,*,*,16,16,16")]) + + (define_expand "movv16qi" + [(set (match_operand:V16QI 0 "nonimmediate_operand" "") + (match_operand:V16QI 1 "any_operand" ""))] + "TARGET_ALTIVEC" + "{ rs6000_emit_move (operands[0], operands[1], V16QImode); DONE; }") + + (define_insn "*movv16qi_internal1" + [(set (match_operand:V16QI 0 "nonimmediate_operand" "=m,v,v,o,r,r") + (match_operand:V16QI 1 "input_operand" "v,m,v,r,o,r"))] + "TARGET_ALTIVEC" + "@ + stvx %1,%y0 + lvx %0,%y1 + vor %0,%1,%1 + stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 + lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 + mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" + [(set_attr "type" "altivec") + (set_attr "length" "*,*,*,16,16,16")]) + + (define_expand "movv4sf" + [(set (match_operand:V4SF 0 "nonimmediate_operand" "") + (match_operand:V4SF 1 "any_operand" ""))] + "TARGET_ALTIVEC" + "{ rs6000_emit_move (operands[0], operands[1], V4SFmode); DONE; }") + + (define_insn "*movv4sf_internal1" + [(set (match_operand:V4SF 0 "nonimmediate_operand" "=m,v,v,o,r,r") + (match_operand:V4SF 1 "input_operand" "v,m,v,r,o,r"))] + "TARGET_ALTIVEC" + "@ + stvx %1,%y0 + lvx %0,%y1 + vor %0,%1,%1 + stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 + lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 + mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" + [(set_attr "type" "altivec") + (set_attr "length" "*,*,*,16,16,16")]) + + (define_insn "get_vrsave_internal" + [(set (match_operand:SI 0 "register_operand" "=r") + (unspec:SI [(reg:SI 109)] 214))] + "TARGET_ALTIVEC" + "* + { + if (TARGET_MACHO) + return \"mfspr %0,256\"; + else + return \"mfvrsave %0\"; + }" + [(set_attr "type" "altivec")]) + + (define_insn "*set_vrsave_internal" + [(match_parallel 0 "vrsave_operation" + [(set (reg:SI 109) + (unspec_volatile:SI [(match_operand:SI 1 "register_operand" "r") + (reg:SI 109)] 30))])] + "TARGET_ALTIVEC" + "* + { + if (TARGET_MACHO) + return \"mtspr 256,%1\"; + else + return \"mtvrsave %1\"; + }" + [(set_attr "type" "altivec")]) + + ;; Vector clears + (define_insn "*movv4si_const0" + [(set (match_operand:V4SI 0 "altivec_register_operand" "=v") + (match_operand:V4SI 1 "zero_constant" ""))] + "TARGET_ALTIVEC" + "vxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + (define_insn "*movv4sf_const0" + [(set (match_operand:V4SF 0 "altivec_register_operand" "=v") + (match_operand:V4SF 1 "zero_constant" ""))] + + "TARGET_ALTIVEC" + "vxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + (define_insn "*movv8hi_const0" + [(set (match_operand:V8HI 0 "altivec_register_operand" "=v") + (match_operand:V8HI 1 "zero_constant" ""))] + "TARGET_ALTIVEC" + "vxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + (define_insn "*movv16qi_const0" + [(set (match_operand:V16QI 0 "altivec_register_operand" "=v") + (match_operand:V16QI 1 "zero_constant" ""))] + "TARGET_ALTIVEC" + "vxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + ;; Simple binary operations. + + (define_insn "addv16qi3" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (plus:V16QI (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vaddubm %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "addv8hi3" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (plus:V8HI (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vadduhm %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "addv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (plus:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vadduwm %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "addv4sf3" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (plus:V4SF (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vaddfp %0,%1,%2" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vaddcuw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 35))] + "TARGET_ALTIVEC" + "vaddcuw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vaddubs" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 36)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vaddubs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vaddsbs" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 37)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vaddsbs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vadduhs" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 38)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vadduhs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vaddshs" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 39)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vaddshs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vadduws" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 40)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vadduws %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vaddsws" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 41)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vaddsws %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "andv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (and:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vand %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vandc" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (and:V4SI (match_operand:V4SI 1 "register_operand" "v") + (not:V4SI (match_operand:V4SI 2 "register_operand" "v"))))] + "TARGET_ALTIVEC" + "vandc %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vavgub" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 44))] + "TARGET_ALTIVEC" + "vavgub %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vavgsb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 45))] + "TARGET_ALTIVEC" + "vavgsb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vavguh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 46))] + "TARGET_ALTIVEC" + "vavguh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vavgsh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 47))] + "TARGET_ALTIVEC" + "vavgsh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vavguw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 48))] + "TARGET_ALTIVEC" + "vavguw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vavgsw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 49))] + "TARGET_ALTIVEC" + "vavgsw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpbfp" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")] 50))] + "TARGET_ALTIVEC" + "vcmpbfp %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_vcmpequb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 51))] + "TARGET_ALTIVEC" + "vcmpequb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpequh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 52))] + "TARGET_ALTIVEC" + "vcmpequh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpequw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 53))] + "TARGET_ALTIVEC" + "vcmpequw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpeqfp" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")] 54))] + "TARGET_ALTIVEC" + "vcmpeqfp %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_vcmpgefp" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")] 55))] + "TARGET_ALTIVEC" + "vcmpgefp %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_vcmpgtub" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 56))] + "TARGET_ALTIVEC" + "vcmpgtub %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpgtsb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 57))] + "TARGET_ALTIVEC" + "vcmpgtsb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpgtuh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 58))] + "TARGET_ALTIVEC" + "vcmpgtuh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpgtsh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 59))] + "TARGET_ALTIVEC" + "vcmpgtsh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpgtuw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 60))] + "TARGET_ALTIVEC" + "vcmpgtuw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpgtsw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 61))] + "TARGET_ALTIVEC" + "vcmpgtsw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vcmpgtfp" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")] 62))] + "TARGET_ALTIVEC" + "vcmpgtfp %0,%1,%2" + [(set_attr "type" "veccmp")]) + + ;; Fused multiply add + (define_insn "altivec_vmaddfp" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (plus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")) + (match_operand:V4SF 3 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaddfp %0,%1,%2,%3" + [(set_attr "type" "vecfloat")]) + + ;; We do multiply as a fused multiply-add with an add of a -0.0 vector. + + (define_expand "mulv4sf3" + [(use (match_operand:V4SF 0 "register_operand" "")) + (use (match_operand:V4SF 1 "register_operand" "")) + (use (match_operand:V4SF 2 "register_operand" ""))] + "TARGET_ALTIVEC && TARGET_FUSED_MADD" + " + { + rtx neg0; + + /* Generate [-0.0, -0.0, -0.0, -0.0]. */ + neg0 = gen_reg_rtx (V4SFmode); + emit_insn (gen_altivec_vspltisw_v4sf (neg0, GEN_INT (-1))); + emit_insn (gen_altivec_vslw_v4sf (neg0, neg0, neg0)); + + /* Use the multiply-add. */ + emit_insn (gen_altivec_vmaddfp (operands[0], operands[1], operands[2], + neg0)); + DONE; + }") + + ;; Fused multiply subtract + (define_insn "altivec_vnmsubfp" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (minus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")) + (match_operand:V4SF 3 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vnmsubfp %0,%1,%2,%3" + [(set_attr "type" "vecfloat")]) + + + (define_insn "altivec_vmsumubm" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 65))] + "TARGET_ALTIVEC" + "vmsumubm %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmsummbm" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 66))] + "TARGET_ALTIVEC" + "vmsumubm %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmsumuhm" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 67))] + "TARGET_ALTIVEC" + "vmsumuhm %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmsumshm" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 68))] + "TARGET_ALTIVEC" + "vmsumshm %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmsumuhs" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 69)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vmsumuhs %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmsumshs" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 70)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vmsumshs %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + + (define_insn "umaxv16qi3" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (umax:V16QI (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaxub %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "smaxv16qi3" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (smax:V16QI (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaxsb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "umaxv8hi3" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (umax:V8HI (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaxuh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "smaxv8hi3" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (smax:V8HI (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaxsh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "umaxv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (umax:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaxuw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "smaxv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (smax:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaxsw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "smaxv4sf3" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (smax:V4SF (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vmaxfp %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_vmhaddshs" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V8HI 3 "register_operand" "v")] 71)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vmhaddshs %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + (define_insn "altivec_vmhraddshs" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V8HI 3 "register_operand" "v")] 72)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vmhraddshs %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + (define_insn "altivec_vmladduhm" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V8HI 3 "register_operand" "v")] 73))] + "TARGET_ALTIVEC" + "vmladduhm %0, %1, %2, %3" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmrghb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 1 "register_operand" "v") + (parallel [(const_int 8) + (const_int 9) + (const_int 10) + (const_int 11) + (const_int 12) + (const_int 13) + (const_int 14) + (const_int 15) + (const_int 0) + (const_int 1) + (const_int 2) + (const_int 3) + (const_int 4) + (const_int 5) + (const_int 6) + (const_int 7)])) + (match_operand:V16QI 2 "register_operand" "v") + (const_int 255)))] + "TARGET_ALTIVEC" + "vmrghb %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vmrghh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (vec_merge:V8HI (vec_select:V8HI (match_operand:V8HI 1 "register_operand" "v") + (parallel [(const_int 4) + (const_int 5) + (const_int 6) + (const_int 7) + (const_int 0) + (const_int 1) + (const_int 2) + (const_int 3)])) + (match_operand:V8HI 2 "register_operand" "v") + (const_int 15)))] + "TARGET_ALTIVEC" + "vmrghh %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vmrghw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (vec_merge:V4SI (vec_select:V4SI (match_operand:V4SI 1 "register_operand" "v") + (parallel [(const_int 2) + (const_int 3) + (const_int 0) + (const_int 1)])) + (match_operand:V4SI 2 "register_operand" "v") + (const_int 12)))] + "TARGET_ALTIVEC" + "vmrghw %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vmrglb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 2 "register_operand" "v") + (parallel [(const_int 0) + (const_int 1) + (const_int 2) + (const_int 3) + (const_int 4) + (const_int 5) + (const_int 6) + (const_int 7) + (const_int 8) + (const_int 9) + (const_int 10) + (const_int 11) + (const_int 12) + (const_int 13) + (const_int 14) + (const_int 15)])) + (match_operand:V16QI 1 "register_operand" "v") + (const_int 255)))] + "TARGET_ALTIVEC" + "vmrglb %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vmrglh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (vec_merge:V8HI (vec_select:V8HI (match_operand:V8HI 2 "register_operand" "v") + (parallel [(const_int 0) + (const_int 1) + (const_int 2) + (const_int 3) + (const_int 4) + (const_int 5) + (const_int 6) + (const_int 7)])) + (match_operand:V8HI 1 "register_operand" "v") + (const_int 15)))] + "TARGET_ALTIVEC" + "vmrglh %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vmrglw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (vec_merge:V4SI (vec_select:V4SI (match_operand:V4SI 2 "register_operand" "v") + (parallel [(const_int 0) + (const_int 1) + (const_int 2) + (const_int 3)])) + (match_operand:V4SI 1 "register_operand" "v") + (const_int 12)))] + "TARGET_ALTIVEC" + "vmrglw %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "uminv16qi3" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (umin:V16QI (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vminub %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "sminv16qi3" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (smin:V16QI (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vminsb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "uminv8hi3" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (umin:V8HI (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vminuh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "sminv8hi3" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (smin:V8HI (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vminsh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "uminv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (umin:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vminuw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "sminv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (smin:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vminsw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "sminv4sf3" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (smin:V4SF (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vminfp %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_vmuleub" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 83))] + "TARGET_ALTIVEC" + "vmuleub %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmulesb" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 84))] + "TARGET_ALTIVEC" + "vmulesb %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmuleuh" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 85))] + "TARGET_ALTIVEC" + "vmuleuh %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmulesh" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 86))] + "TARGET_ALTIVEC" + "vmulesh %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmuloub" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 87))] + "TARGET_ALTIVEC" + "vmuloub %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmulosb" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 88))] + "TARGET_ALTIVEC" + "vmulosb %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmulouh" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 89))] + "TARGET_ALTIVEC" + "vmulouh %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vmulosh" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 90))] + "TARGET_ALTIVEC" + "vmulosh %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vnor" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (not:V4SI (ior:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v"))))] + "TARGET_ALTIVEC" + "vnor %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "iorv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (ior:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vor %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vpkuhum" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 93))] + "TARGET_ALTIVEC" + "vpkuhum %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkuwum" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 94))] + "TARGET_ALTIVEC" + "vpkuwum %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkpx" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 95))] + "TARGET_ALTIVEC" + "vpkpx %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkuhss" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 96)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkuhss %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkshss" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 97)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkshss %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkuwss" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 98)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkuwss %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkswss" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 99)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkswss %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkuhus" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 100)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkuhus %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkshus" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 101)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkshus %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkuwus" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 102)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkuwus %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vpkswus" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 103)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vpkswus %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vrlb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 104))] + "TARGET_ALTIVEC" + "vrlb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vrlh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 105))] + "TARGET_ALTIVEC" + "vrlh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vrlw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 106))] + "TARGET_ALTIVEC" + "vrlw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vslb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 107))] + "TARGET_ALTIVEC" + "vslb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vslh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 108))] + "TARGET_ALTIVEC" + "vslh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vslw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 109))] + "TARGET_ALTIVEC" + "vslw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vslw_v4sf" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")] 109))] + "TARGET_ALTIVEC" + "vslw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsl" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 110))] + "TARGET_ALTIVEC" + "vsl %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vslo" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 111))] + "TARGET_ALTIVEC" + "vslo %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsrb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 112))] + "TARGET_ALTIVEC" + "vsrb %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsrh" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 113))] + "TARGET_ALTIVEC" + "vsrh %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsrw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 114))] + "TARGET_ALTIVEC" + "vsrw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsrab" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 115))] + "TARGET_ALTIVEC" + "vsrab %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsrah" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 116))] + "TARGET_ALTIVEC" + "vsrah %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsraw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 117))] + "TARGET_ALTIVEC" + "vsraw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsr" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 118))] + "TARGET_ALTIVEC" + "vsr %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsro" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 119))] + "TARGET_ALTIVEC" + "vsro %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "subv16qi3" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (minus:V16QI (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vsububm %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "subv8hi3" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (minus:V8HI (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vsubuhm %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "subv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (minus:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vsubuwm %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "subv4sf3" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (minus:V4SF (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vsubfp %0,%1,%2" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vsubcuw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 124))] + "TARGET_ALTIVEC" + "vsubcuw %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsububs" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 125)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsububs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsubsbs" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")] 126)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsubsbs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsubuhs" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 127)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsubuhs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsubshs" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")] 128)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsubshs %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsubuws" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 129)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsubuws %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsubsws" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 130)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsubsws %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vsum4ubs" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 131)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsum4ubs %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vsum4sbs" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 132)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsum4sbs %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vsum4shs" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 133)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsum4shs %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vsum2sws" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 134)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsum2sws %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "altivec_vsumsws" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")] 135)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vsumsws %0,%1,%2" + [(set_attr "type" "veccomplex")]) + + (define_insn "xorv4si3" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (xor:V4SI (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vxor %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vspltb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:QI 2 "immediate_operand" "i")] 136))] + "TARGET_ALTIVEC" + "vspltb %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsplth" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:QI 2 "immediate_operand" "i")] 137))] + "TARGET_ALTIVEC" + "vsplth %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vspltw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:QI 2 "immediate_operand" "i")] 138))] + "TARGET_ALTIVEC" + "vspltw %0,%1,%2" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vspltisb" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:QI 1 "immediate_operand" "i")] 139))] + "TARGET_ALTIVEC" + "vspltisb %0, %1" + [(set_attr "type" "vecsimple")]) + + + (define_insn "altivec_vspltish" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:QI 1 "immediate_operand" "i")] 140))] + "TARGET_ALTIVEC" + "vspltish %0, %1" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vspltisw" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:QI 1 "immediate_operand" "i")] 141))] + "TARGET_ALTIVEC" + "vspltisw %0, %1" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_vspltisw_v4sf" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:QI 1 "immediate_operand" "i")] 142))] + "TARGET_ALTIVEC" + "vspltisw %0, %1" + [(set_attr "type" "vecsimple")]) + + (define_insn "ftruncv4sf2" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (fix:V4SF (match_operand:V4SF 1 "register_operand" "v")))] + "TARGET_ALTIVEC" + "vrfiz %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vperm_4si" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v") + (match_operand:V16QI 3 "register_operand" "v")] 144))] + "TARGET_ALTIVEC" + "vperm %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vperm_4sf" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v") + (match_operand:V16QI 3 "register_operand" "v")] 145))] + "TARGET_ALTIVEC" + "vperm %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vperm_8hi" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V16QI 3 "register_operand" "v")] 146))] + "TARGET_ALTIVEC" + "vperm %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vperm_16qi" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v") + (match_operand:V16QI 3 "register_operand" "v")] 147))] + "TARGET_ALTIVEC" + "vperm %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vrfip" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 148))] + "TARGET_ALTIVEC" + "vrfip %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vrfin" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 149))] + "TARGET_ALTIVEC" + "vrfin %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vrfim" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 150))] + "TARGET_ALTIVEC" + "vrfim %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vcfux" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:QI 2 "immediate_operand" "i")] 151))] + "TARGET_ALTIVEC" + "vcfux %0, %1, %2" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vcfsx" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:QI 2 "immediate_operand" "i")] 152))] + "TARGET_ALTIVEC" + "vcfsx %0, %1, %2" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vctuxs" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:QI 2 "immediate_operand" "i")] 153)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vctuxs %0, %1, %2" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vctsxs" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:QI 2 "immediate_operand" "i")] 154)) + (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))] + "TARGET_ALTIVEC" + "vctsxs %0, %1, %2" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vlogefp" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 155))] + "TARGET_ALTIVEC" + "vlogefp %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vexptefp" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 156))] + "TARGET_ALTIVEC" + "vexptefp %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vrsqrtefp" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 157))] + "TARGET_ALTIVEC" + "vrsqrtefp %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vrefp" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 158))] + "TARGET_ALTIVEC" + "vrefp %0, %1" + [(set_attr "type" "vecfloat")]) + + (define_insn "altivec_vsel_4si" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 159))] + "TARGET_ALTIVEC" + "vsel %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsel_4sf" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v") + (match_operand:V4SI 3 "register_operand" "v")] 160))] + "TARGET_ALTIVEC" + "vsel %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsel_8hi" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:V8HI 3 "register_operand" "v")] 161))] + "TARGET_ALTIVEC" + "vsel %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsel_16qi" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v") + (match_operand:V16QI 3 "register_operand" "v")] 162))] + "TARGET_ALTIVEC" + "vsel %0,%1,%2,%3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsldoi_4si" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v") + (match_operand:QI 3 "immediate_operand" "i")] 163))] + "TARGET_ALTIVEC" + "vsldoi %0, %1, %2, %3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsldoi_4sf" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v") + (match_operand:QI 3 "immediate_operand" "i")] 164))] + "TARGET_ALTIVEC" + "vsldoi %0, %1, %2, %3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsldoi_8hi" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand:QI 3 "immediate_operand" "i")] 165))] + "TARGET_ALTIVEC" + "vsldoi %0, %1, %2, %3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vsldoi_16qi" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v") + (match_operand:QI 3 "immediate_operand" "i")] 166))] + "TARGET_ALTIVEC" + "vsldoi %0, %1, %2, %3" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vupkhsb" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] 167))] + "TARGET_ALTIVEC" + "vupkhsb %0, %1" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vupkhpx" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 168))] + "TARGET_ALTIVEC" + "vupkhpx %0, %1" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vupkhsh" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 169))] + "TARGET_ALTIVEC" + "vupkhsh %0, %1" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vupklsb" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] 170))] + "TARGET_ALTIVEC" + "vupklsb %0, %1" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vupklpx" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 171))] + "TARGET_ALTIVEC" + "vupklpx %0, %1" + [(set_attr "type" "vecperm")]) + + (define_insn "altivec_vupklsh" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 172))] + "TARGET_ALTIVEC" + "vupklsh %0, %1" + [(set_attr "type" "vecperm")]) + + ;; AltiVec predicates. + + (define_expand "cr6_test_for_zero" + [(set (match_operand:SI 0 "register_operand" "=r") + (eq:SI (reg:CC 74) + (const_int 0)))] + "TARGET_ALTIVEC" + "") + + (define_expand "cr6_test_for_zero_reverse" + [(set (match_operand:SI 0 "register_operand" "=r") + (eq:SI (reg:CC 74) + (const_int 0))) + (set (match_dup 0) (minus:SI (const_int 1) (match_dup 0)))] + "TARGET_ALTIVEC" + "") + + (define_expand "cr6_test_for_lt" + [(set (match_operand:SI 0 "register_operand" "=r") + (lt:SI (reg:CC 74) + (const_int 0)))] + "TARGET_ALTIVEC" + "") + + (define_expand "cr6_test_for_lt_reverse" + [(set (match_operand:SI 0 "register_operand" "=r") + (lt:SI (reg:CC 74) + (const_int 0))) + (set (match_dup 0) (minus:SI (const_int 1) (match_dup 0)))] + "TARGET_ALTIVEC" + "") + + ;; We can get away with generating the opcode on the fly (%3 below) + ;; because all the predicates have the same scheduling parameters. + + (define_insn "altivec_predicate_v4si" + [(set (reg:CC 74) + (unspec:CC [(match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v") + (match_operand 3 "any_operand" "")] 173)) + (clobber (match_scratch:V4SI 0 "=v"))] + "TARGET_ALTIVEC" + "%3 %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_predicate_v4sf" + [(set (reg:CC 74) + (unspec:CC [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v") + (match_operand 3 "any_operand" "")] 174)) + (clobber (match_scratch:V4SF 0 "=v"))] + "TARGET_ALTIVEC" + "%3 %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_predicate_v8hi" + [(set (reg:CC 74) + (unspec:CC [(match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v") + (match_operand 3 "any_operand" "")] 175)) + (clobber (match_scratch:V8HI 0 "=v"))] + "TARGET_ALTIVEC" + "%3 %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_predicate_v16qi" + [(set (reg:CC 74) + (unspec:CC [(match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v") + (match_operand 3 "any_operand" "")] 175)) + (clobber (match_scratch:V16QI 0 "=v"))] + "TARGET_ALTIVEC" + "%3 %0,%1,%2" + [(set_attr "type" "veccmp")]) + + (define_insn "altivec_mtvscr" + [(set (reg:SI 110) + (unspec_volatile:SI + [(match_operand:V4SI 0 "register_operand" "v")] 186))] + "TARGET_ALTIVEC" + "mtvscr %0" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_mfvscr" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec_volatile:V8HI [(reg:SI 110)] 187))] + "TARGET_ALTIVEC" + "mfvscr %0" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_dssall" + [(unspec [(const_int 0)] 188)] + "TARGET_ALTIVEC" + "dssall" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_dss" + [(unspec [(match_operand:QI 0 "immediate_operand" "i")] 189)] + "TARGET_ALTIVEC" + "dss %0" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_dst" + [(unspec [(match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] 190)] + "TARGET_ALTIVEC" + "dst %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_dstt" + [(unspec [(match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] 191)] + "TARGET_ALTIVEC" + "dstt %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_dstst" + [(unspec [(match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] 192)] + "TARGET_ALTIVEC" + "dstst %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_dststt" + [(unspec [(match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] 193)] + "TARGET_ALTIVEC" + "dststt %0,%1,%2" + [(set_attr "type" "vecsimple")]) + + (define_insn "altivec_lvsl" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "register_operand" "r")] 194))] + "TARGET_ALTIVEC" + "lvsl %0,%1,%2" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvsr" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "register_operand" "r")] 195))] + "TARGET_ALTIVEC" + "lvsr %0,%1,%2" + [(set_attr "type" "vecload")]) + + ;; Parallel some of the LVE* and STV*'s with unspecs because some have + ;; identical rtl but different instructions-- and gcc gets confused. + + (define_insn "altivec_lvebx" + [(parallel + [(set (match_operand:V16QI 0 "register_operand" "=v") + (mem:V16QI (plus:SI (match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "register_operand" "r")))) + (unspec [(const_int 0)] 196)])] + "TARGET_ALTIVEC" + "lvebx %0,%1,%2" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvehx" + [(parallel + [(set (match_operand:V8HI 0 "register_operand" "=v") + (mem:V8HI + (and:SI (plus:SI (match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "register_operand" "r")) + (const_int -2)))) + (unspec [(const_int 0)] 197)])] + "TARGET_ALTIVEC" + "lvehx %0,%1,%2" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvewx" + [(parallel + [(set (match_operand:V4SI 0 "register_operand" "=v") + (mem:V4SI + (and:SI (plus:SI (match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "register_operand" "r")) + (const_int -4)))) + (unspec [(const_int 0)] 198)])] + "TARGET_ALTIVEC" + "lvewx %0,%1,%2" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvxl" + [(parallel + [(set (match_operand:V4SI 0 "register_operand" "=v") + (mem:V4SI (plus:SI (match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "register_operand" "r")))) + (unspec [(const_int 0)] 213)])] + "TARGET_ALTIVEC" + "lvxl %0,%1,%2" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_lvx" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (mem:V4SI (plus:SI (match_operand:SI 1 "register_operand" "b") + (match_operand:SI 2 "register_operand" "r"))))] + "TARGET_ALTIVEC" + "lvx %0,%1,%2" + [(set_attr "type" "vecload")]) + + (define_insn "altivec_stvx" + [(parallel + [(set (mem:V4SI + (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r")) + (const_int -16))) + (match_operand:V4SI 2 "register_operand" "v")) + (unspec [(const_int 0)] 201)])] + "TARGET_ALTIVEC" + "stvx %2,%0,%1" + [(set_attr "type" "vecstore")]) + + (define_insn "altivec_stvxl" + [(parallel + [(set (mem:V4SI + (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r")) + (const_int -16))) + (match_operand:V4SI 2 "register_operand" "v")) + (unspec [(const_int 0)] 202)])] + "TARGET_ALTIVEC" + "stvxl %2,%0,%1" + [(set_attr "type" "vecstore")]) + + (define_insn "altivec_stvebx" + [(parallel + [(set (mem:V16QI + (plus:SI (match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r"))) + (match_operand:V16QI 2 "register_operand" "v")) + (unspec [(const_int 0)] 203)])] + "TARGET_ALTIVEC" + "stvebx %2,%0,%1" + [(set_attr "type" "vecstore")]) + + (define_insn "altivec_stvehx" + [(parallel + [(set (mem:V8HI + (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r")) + (const_int -2))) + (match_operand:V8HI 2 "register_operand" "v")) + (unspec [(const_int 0)] 204)])] + "TARGET_ALTIVEC" + "stvehx %2,%0,%1" + [(set_attr "type" "vecstore")]) + + (define_insn "altivec_stvewx" + [(parallel + [(set (mem:V4SI + (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") + (match_operand:SI 1 "register_operand" "r")) + (const_int -4))) + (match_operand:V4SI 2 "register_operand" "v")) + (unspec [(const_int 0)] 205)])] + "TARGET_ALTIVEC" + "stvewx %2,%0,%1" + [(set_attr "type" "vecstore")]) + + (define_insn "absv16qi2" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (abs:V16QI (match_operand:V16QI 1 "register_operand" "v"))) + (clobber (match_scratch:V16QI 2 "=&v")) + (clobber (match_scratch:V16QI 3 "=&v"))] + "TARGET_ALTIVEC" + "vspltisb %2,0\;vsububm %3,%2,%1\;vmaxsb %0,%1,%3" + [(set_attr "type" "altivec") + (set_attr "length" "12")]) + + (define_insn "absv8hi2" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (abs:V8HI (match_operand:V8HI 1 "register_operand" "v"))) + (clobber (match_scratch:V8HI 2 "=&v")) + (clobber (match_scratch:V8HI 3 "=&v"))] + "TARGET_ALTIVEC" + "vspltisb %2,0\;vsubuhm %3,%2,%1\;vmaxsh %0,%1,%3" + [(set_attr "type" "altivec") + (set_attr "length" "12")]) + + (define_insn "absv4si2" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (abs:V4SI (match_operand:V4SI 1 "register_operand" "v"))) + (clobber (match_scratch:V4SI 2 "=&v")) + (clobber (match_scratch:V4SI 3 "=&v"))] + "TARGET_ALTIVEC" + "vspltisb %2,0\;vsubuwm %3,%2,%1\;vmaxsw %0,%1,%3" + [(set_attr "type" "altivec") + (set_attr "length" "12")]) + + (define_insn "absv4sf2" + [(set (match_operand:V4SF 0 "register_operand" "=v") + (abs:V4SF (match_operand:V4SF 1 "register_operand" "v"))) + (clobber (match_scratch:V4SF 2 "=&v")) + (clobber (match_scratch:V4SF 3 "=&v"))] + "TARGET_ALTIVEC" + "vspltisw %2, -1\;vslw %3,%2,%2\;vandc %0,%1,%3" + [(set_attr "type" "altivec") + (set_attr "length" "12")]) + + (define_insn "altivec_abss_v16qi" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")] 210)) + (clobber (match_scratch:V16QI 2 "=&v")) + (clobber (match_scratch:V16QI 3 "=&v"))] + "TARGET_ALTIVEC" + "vspltisb %2,0\;vsubsbs %3,%2,%1\;vmaxsb %0,%1,%3" + [(set_attr "type" "altivec") + (set_attr "length" "12")]) + + (define_insn "altivec_abss_v8hi" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")] 211)) + (clobber (match_scratch:V8HI 2 "=&v")) + (clobber (match_scratch:V8HI 3 "=&v"))] + "TARGET_ALTIVEC" + "vspltisb %2,0\;vsubshs %3,%2,%1\;vmaxsh %0,%1,%3" + [(set_attr "type" "altivec") + (set_attr "length" "12")]) + + (define_insn "altivec_abss_v4si" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")] 212)) + (clobber (match_scratch:V4SI 2 "=&v")) + (clobber (match_scratch:V4SI 3 "=&v"))] + "TARGET_ALTIVEC" + "vspltisb %2,0\;vsubsws %3,%2,%1\;vmaxsw %0,%1,%3" + [(set_attr "type" "altivec") + (set_attr "length" "12")]) diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/beos.h gcc-3.3/gcc/config/rs6000/beos.h *** gcc-3.2.3/gcc/config/rs6000/beos.h 2002-01-10 22:03:06.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/beos.h 2002-07-10 00:33:51.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 38,52 **** #undef ASM_SPEC #define ASM_SPEC "-u %(asm_cpu)" ! #undef CPP_PREDEFINES /* __POWERPC__ must be defined for some header files */ ! #define CPP_PREDEFINES "-D__BEOS__ -D__POWERPC__ -Asystem=beos -Acpu=powerpc -Amachine=powerpc" #undef CPP_SPEC ! #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_cpu)" ! ! #undef CPP_DEFAULT_SPEC ! #define CPP_DEFAULT_SPEC "-D_ARCH_PPC" /* This is the easiest way to disable use of gcc's builtin alloca, which in the current BeOS release (DR9) is a problem because of the --- 38,58 ---- #undef ASM_SPEC #define ASM_SPEC "-u %(asm_cpu)" ! #undef TARGET_OS_CPP_BUILTINS /* __POWERPC__ must be defined for some header files */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__BEOS__"); \ ! builtin_define ("__POWERPC__"); \ ! builtin_assert ("system=beos"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) #undef CPP_SPEC ! #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}" /* This is the easiest way to disable use of gcc's builtin alloca, which in the current BeOS release (DR9) is a problem because of the diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/darwin.h gcc-3.3/gcc/config/rs6000/darwin.h *** gcc-3.2.3/gcc/config/rs6000/darwin.h 2002-08-08 17:52:40.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/darwin.h 2002-12-20 01:49:57.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 36,42 **** #define TARGET_NO_TOC 1 /* Handle #pragma weak and #pragma pack. */ ! #define HANDLE_SYSV_PRAGMA /* The Darwin ABI always includes AltiVec, can't be (validly) turned off. */ --- 36,42 ---- #define TARGET_NO_TOC 1 /* Handle #pragma weak and #pragma pack. */ ! #define HANDLE_SYSV_PRAGMA 1 /* The Darwin ABI always includes AltiVec, can't be (validly) turned off. */ *************** Boston, MA 02111-1307, USA. */ *** 44,55 **** #define SUBTARGET_OVERRIDE_OPTIONS \ rs6000_altivec_abi = 1; ! #define CPP_PREDEFINES "-D__ppc__ -D__POWERPC__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__" /* We want -fPIC by default, unless we're using -static to compile for the kernel or some such. */ ! #define CC1_SPEC "%{!static:-fPIC}" /* Make both r2 and r3 available for allocation. */ #define FIXED_R2 0 --- 44,66 ---- #define SUBTARGET_OVERRIDE_OPTIONS \ rs6000_altivec_abi = 1; ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__ppc__"); \ ! builtin_define ("__POWERPC__"); \ ! builtin_define ("__NATURAL_ALIGNMENT__"); \ ! builtin_define ("__MACH__"); \ ! builtin_define ("__APPLE__"); \ ! } \ ! while (0) /* We want -fPIC by default, unless we're using -static to compile for the kernel or some such. */ ! #define CC1_SPEC "\ ! %{static: %{Zdynamic: %e conflicting code gen style switches are used}}\ ! %{!static:-fPIC}" /* Make both r2 and r3 available for allocation. */ #define FIXED_R2 0 *************** Boston, MA 02111-1307, USA. */ *** 94,113 **** #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ assemble_name (FILE, NAME); ! /* Output before instructions. */ ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #undef ASM_GLOBALIZE_LABEL ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs ("\t.globl ", FILE); \ ! RS6000_OUTPUT_BASENAME (FILE, NAME); putc ('\n', FILE);} while (0) /* This is how to output an internal label prefix. rs6000.c uses this when generating traceback tables. */ --- 105,114 ---- #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ assemble_name (FILE, NAME); ! /* Globalizing directive for a label. */ ! #undef GLOBAL_ASM_OP ! #define GLOBAL_ASM_OP "\t.globl " ! #undef TARGET_ASM_GLOBALIZE_LABEL /* This is how to output an internal label prefix. rs6000.c uses this when generating traceback tables. */ *************** Boston, MA 02111-1307, USA. */ *** 117,130 **** #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ fprintf (FILE, "%s", PREFIX) - #undef TEXT_SECTION_ASM_OP - #define TEXT_SECTION_ASM_OP ".text" - - /* Output before writable data. */ - - #undef DATA_SECTION_ASM_OP - #define DATA_SECTION_ASM_OP ".data" - /* This says how to output an assembler line to define a global common symbol. */ /* ? */ --- 118,123 ---- *************** Boston, MA 02111-1307, USA. */ *** 134,142 **** RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ fprintf ((FILE), ",%d\n", (SIZE)); } while (0) - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\t.space %d\n", SIZE) - /* Override the standard rs6000 definition. */ #undef ASM_COMMENT_START --- 127,132 ---- *************** Boston, MA 02111-1307, USA. */ *** 148,153 **** --- 138,158 ---- #define RESTORE_FP_PREFIX "._restf" #define RESTORE_FP_SUFFIX "" + /* This is how to output an assembler line that says to advance + the location counter to a multiple of 2**LOG bytes using the + "nop" instruction as padding. */ + + #define ASM_OUTPUT_ALIGN_WITH_NOP(FILE,LOG) \ + do \ + { \ + if ((LOG) < 3) \ + { \ + ASM_OUTPUT_ALIGN (FILE,LOG); \ + } \ + else /* nop == ori r0,r0,0 */ \ + fprintf (FILE, "\t.align32 %d,0x60000000\n", (LOG)); \ + } while (0) + /* Generate insns to call the profiler. */ #define PROFILE_HOOK(LABEL) output_profile_hook (LABEL) *************** Boston, MA 02111-1307, USA. */ *** 226,232 **** : MAX ((COMPUTED), (SPECIFIED))) /* XXX: Darwin supports neither .quad, or .llong, but it also doesn't ! support 64 bit powerpc either, so this just keeps things happy. */ #define DOUBLE_INT_ASM_OP "\t.quad\t" /* Get HOST_WIDE_INT and CONST_INT to be 32 bits, for compile time --- 231,237 ---- : MAX ((COMPUTED), (SPECIFIED))) /* XXX: Darwin supports neither .quad, or .llong, but it also doesn't ! support 64 bit PowerPC either, so this just keeps things happy. */ #define DOUBLE_INT_ASM_OP "\t.quad\t" /* Get HOST_WIDE_INT and CONST_INT to be 32 bits, for compile time *************** Boston, MA 02111-1307, USA. */ *** 237,239 **** --- 242,247 ---- /* For binary compatibility with 2.95; Darwin C APIs use bool from stdbool.h, which was an int-sized enum in 2.95. */ #define BOOL_TYPE_SIZE INT_TYPE_SIZE + + #undef REGISTER_TARGET_PRAGMAS + #define REGISTER_TARGET_PRAGMAS DARWIN_REGISTER_TARGET_PRAGMAS diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/eabiaix.h gcc-3.3/gcc/config/rs6000/eabiaix.h *** gcc-3.2.3/gcc/config/rs6000/eabiaix.h 2000-04-05 01:22:36.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/eabiaix.h 2002-06-11 23:14:47.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,31 **** #undef RS6000_ABI_NAME #define RS6000_ABI_NAME "aix" - #undef CPP_SYSV_DEFAULT_SPEC - #define CPP_SYSV_DEFAULT_SPEC "-D_CALL_AIX" - /* Define this macro as a C expression for the initializer of an array of string to tell the driver program which options are defaults for this target and thus do not need to be handled --- 23,28 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/eabi.asm gcc-3.3/gcc/config/rs6000/eabi.asm *** gcc-3.2.3/gcc/config/rs6000/eabi.asm 2002-02-19 19:40:41.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/eabi.asm 2002-09-20 23:46:58.000000000 +0000 *************** FUNC_START(__eabi) *** 139,145 **** addi 11,11,.LCTOC1@l cmplwi 2,9,0 /* init flag != 0? */ bnelr 2 /* return now, if we've been called already */ ! stw 1,.Linit_p@l(10) /* store a non-zero value in the done flag */ #else /* -mrelocatable */ mflr 0 --- 139,145 ---- addi 11,11,.LCTOC1@l cmplwi 2,9,0 /* init flag != 0? */ bnelr 2 /* return now, if we've been called already */ ! stw 1,.Linit_p@l(10) /* store a nonzero value in the done flag */ #else /* -mrelocatable */ mflr 0 *************** FUNC_START(__eabi) *** 155,161 **** cmplwi 2,9,0 /* init flag != 0? */ mtlr 0 /* restore in case branch was taken */ bnelr 2 /* return now, if we've been called already */ ! stwx 1,10,12 /* store a non-zero value in the done flag */ beq+ 0,.Lsdata /* skip if we don't need to relocate */ /* We need to relocate the .got2 pointers. */ --- 155,161 ---- cmplwi 2,9,0 /* init flag != 0? */ mtlr 0 /* restore in case branch was taken */ bnelr 2 /* return now, if we've been called already */ ! stwx 1,10,12 /* store a nonzero value in the done flag */ beq+ 0,.Lsdata /* skip if we don't need to relocate */ /* We need to relocate the .got2 pointers. */ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/eabi.h gcc-3.3/gcc/config/rs6000/eabi.h *** gcc-3.2.3/gcc/config/rs6000/eabi.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/eabi.h 2002-07-25 02:22:47.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 31,36 **** #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)"); ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-DPPC -D__embedded__ -Asystem=embedded -Acpu=powerpc -Amachine=powerpc" --- 31,54 ---- #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)"); ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("PPC"); \ ! builtin_define ("__embedded__"); \ ! builtin_assert ("system=embedded"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) ! ! #undef TARGET_SPE_ABI ! #undef TARGET_SPE ! #undef TARGET_ISEL ! #undef TARGET_FPRS ! ! #define TARGET_SPE_ABI rs6000_spe_abi ! #define TARGET_SPE (rs6000_cpu == PROCESSOR_PPC8540) ! #define TARGET_ISEL rs6000_isel ! #define TARGET_FPRS rs6000_fprs diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/eabisim.h gcc-3.3/gcc/config/rs6000/eabisim.h *** gcc-3.2.3/gcc/config/rs6000/eabisim.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/eabisim.h 2002-07-10 00:33:51.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,31 **** #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (PowerPC Simulated)"); ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-DPPC -D__embedded__ -D__simulator__ -Asystem=embedded -Asystem=simulator -Acpu=powerpc -Amachine=powerpc" /* Make the simulator the default */ #undef LIB_DEFAULT_SPEC --- 23,41 ---- #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (PowerPC Simulated)"); ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("PPC"); \ ! builtin_define ("__embedded__"); \ ! builtin_define ("__simulator__"); \ ! builtin_assert ("system=embedded"); \ ! builtin_assert ("system=simulator"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) /* Make the simulator the default */ #undef LIB_DEFAULT_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/eabispe.h gcc-3.3/gcc/config/rs6000/eabispe.h *** gcc-3.2.3/gcc/config/rs6000/eabispe.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/eabispe.h 2002-07-25 02:22:47.000000000 +0000 *************** *** 0 **** --- 1,51 ---- + /* Core target definitions for GNU compiler + for PowerPC embedded targeted systems with SPE support. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez (aldyh@redhat.com). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_EABI) + + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded SPE)"); + + #undef SUBSUBTARGET_OVERRIDE_OPTIONS + #define SUBSUBTARGET_OVERRIDE_OPTIONS \ + rs6000_cpu = PROCESSOR_PPC8540; \ + rs6000_spe_abi = 1; \ + rs6000_fprs = 0; \ + /* See note below. */ \ + /*rs6000_long_double_type_size = 128;*/ \ + rs6000_isel = 1 + + /* + The e500 ABI says that either long doubles are 128 bits, or if + implemented in any other size, the compiler/linker should error out. + We have no emulation libraries for 128 bit long doubles, and I hate + the dozens of failures on the regression suite. So I'm breaking ABI + specifications, until I properly fix the emulation. + + Enable these later. + #undef CPP_LONGDOUBLE_DEFAULT_SPEC + #define CPP_LONGDOUBLE_DEFAULT_SPEC "-D__LONG_DOUBLE_128__=1" + */ + + #undef ASM_DEFAULT_SPEC + #define ASM_DEFAULT_SPEC "-mppc -mspe -me500" diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/freebsd.h gcc-3.3/gcc/config/rs6000/freebsd.h *** gcc-3.2.3/gcc/config/rs6000/freebsd.h 2001-12-29 09:07:56.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/freebsd.h 2003-04-29 12:06:24.000000000 +0000 *************** the Free Software Foundation, 675 Mass A *** 38,43 **** --- 38,48 ---- #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_freebsd)" + /* XXX: This is wrong for many platforms in sysv4.h. + We should work on getting that defination fixed. */ + #undef LINK_SHLIB_SPEC + #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" + /************************[ Target stuff ]***********************************/ *************** the Free Software Foundation, 675 Mass A *** 45,56 **** Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ /* rs6000.h gets this wrong for FreeBSD. We use the GCC defaults instead. */ #undef WCHAR_TYPE - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 --- 50,61 ---- Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ + #undef SIZE_TYPE + #define SIZE_TYPE "unsigned int" + /* rs6000.h gets this wrong for FreeBSD. We use the GCC defaults instead. */ #undef WCHAR_TYPE #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/gnu.h gcc-3.3/gcc/config/rs6000/gnu.h *** gcc-3.2.3/gcc/config/rs6000/gnu.h 2002-02-17 23:06:55.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/gnu.h 2002-09-14 13:12:53.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, ! for powerpc machines running GNU. Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, ! for PowerPC machines running GNU. Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU CC. diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/linux64.h gcc-3.3/gcc/config/rs6000/linux64.h *** gcc-3.2.3/gcc/config/rs6000/linux64.h 2002-09-14 00:26:39.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/linux64.h 2002-11-10 20:47:44.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, ! for 64 bit powerpc linux. Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, ! for 64 bit PowerPC linux. Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 31,38 **** #define TARGET_DEFAULT \ (MASK_POWERPC | MASK_POWERPC64 | MASK_64BIT | MASK_NEW_MNEMONICS) ! #undef CPP_DEFAULT_SPEC ! #define CPP_DEFAULT_SPEC "-D_ARCH_PPC64" #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mppc64" --- 31,40 ---- #define TARGET_DEFAULT \ (MASK_POWERPC | MASK_POWERPC64 | MASK_64BIT | MASK_NEW_MNEMONICS) ! #undef PROCESSOR_DEFAULT ! #define PROCESSOR_DEFAULT PROCESSOR_PPC630 ! #undef PROCESSOR_DEFAULT64 ! #define PROCESSOR_DEFAULT64 PROCESSOR_PPC630 #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mppc64" *************** Boston, MA 02111-1307, USA. */ *** 104,121 **** So we have to squirrel it away with this. */ #define SETUP_FRAME_ADDRESSES() rs6000_aix_emit_builtin_unwind_init () ! /* Don't assume anything about the header files. */ ! #define NO_IMPLICIT_EXTERN_C ! #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-D_PPC_ -D__PPC__ -D_PPC64_ -D__PPC64__ -D__powerpc__ -D__powerpc64__ \ ! -D_PIC_ -D__PIC__ -D_BIG_ENDIAN -D__BIG_ENDIAN__ -D__ELF__ \ ! -D__LONG_MAX__=9223372036854775807L \ ! -Acpu=powerpc64 -Amachine=powerpc64" #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" --- 106,129 ---- So we have to squirrel it away with this. */ #define SETUP_FRAME_ADDRESSES() rs6000_aix_emit_builtin_unwind_init () ! /* Override svr4.h */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__PPC__"); \ ! builtin_define ("__PPC64__"); \ ! builtin_define ("__powerpc__"); \ ! builtin_define ("__powerpc64__"); \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__ELF__"); \ ! builtin_assert ("cpu=powerpc64"); \ ! builtin_assert ("machine=powerpc64"); \ ! } \ ! while (0) #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" *************** Boston, MA 02111-1307, USA. */ *** 145,173 **** #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" #undef LINK_OS_LINUX_SPEC - #ifndef CROSS_COMPILE #define LINK_OS_LINUX_SPEC "-m elf64ppc %{!shared: %{!static: \ %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /lib64/ld.so.1}}}" ! #else ! #define LINK_OS_LINUX_SPEC "-m elf64ppc %{!shared: %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker ld.so.1}}}" #endif - #ifndef CROSS_COMPILE #undef STARTFILE_LINUX_SPEC #define STARTFILE_LINUX_SPEC "\ ! %{!shared: %{pg:/usr/lib64/gcrt1.o%s} %{!pg:%{p:/usr/lib64/gcrt1.o%s} \ ! %{!p:/usr/lib64/crt1.o%s}}} /usr/lib64/crti.o%s \ ! %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ! #endif - #ifndef CROSS_COMPILE #undef ENDFILE_LINUX_SPEC #define ENDFILE_LINUX_SPEC "\ ! %{!shared:crtend.o%s} %{shared:crtendS.o%s} /usr/lib64/crtn.o%s" ! #endif #undef TOC_SECTION_ASM_OP #define TOC_SECTION_ASM_OP "\t.section\t\".toc\",\"aw\"" --- 153,175 ---- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" #undef LINK_OS_LINUX_SPEC #define LINK_OS_LINUX_SPEC "-m elf64ppc %{!shared: %{!static: \ %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}" ! ! #ifdef NATIVE_CROSS ! #define STARTFILE_PREFIX_SPEC "/usr/local/lib64/ /lib64/ /usr/lib64/" #endif #undef STARTFILE_LINUX_SPEC #define STARTFILE_LINUX_SPEC "\ ! %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} crti.o%s \ ! %{static:crtbeginT.o%s} \ ! %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" #undef ENDFILE_LINUX_SPEC #define ENDFILE_LINUX_SPEC "\ ! %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" #undef TOC_SECTION_ASM_OP #define TOC_SECTION_ASM_OP "\t.section\t\".toc\",\"aw\"" *************** Boston, MA 02111-1307, USA. */ *** 219,235 **** #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! /* If we are referencing a function that is static or is known to be ! in this file, make the SYMBOL_REF special. We can use this to indicate ! that we can branch to this function without emitting a no-op after the ! call. Do not set this flag if the function is weakly defined. */ ! ! #undef ENCODE_SECTION_INFO ! #define ENCODE_SECTION_INFO(DECL) \ ! if (TREE_CODE (DECL) == FUNCTION_DECL \ ! && (TREE_ASM_WRITTEN (DECL) || ! TREE_PUBLIC (DECL)) \ ! && ! DECL_WEAK (DECL)) \ ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ --- 221,228 ---- #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG ! #undef TARGET_ENCODE_SECTION_INFO ! #define TARGET_ENCODE_SECTION_INFO rs6000_xcoff_encode_section_info /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ *************** do { \ *** 290,296 **** } \ while (0) ! /* Return non-zero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only --- 283,289 ---- } \ while (0) ! /* Return nonzero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/linux.h gcc-3.3/gcc/config/rs6000/linux.h *** gcc-3.2.3/gcc/config/rs6000/linux.h 2003-01-23 22:19:42.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/linux.h 2003-01-23 22:26:47.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler, ! for powerpc machines running Linux. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Michael Meissner (meissner@cygnus.com). --- 1,6 ---- /* Definitions of target machine for GNU compiler, ! for PowerPC machines running Linux. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Michael Meissner (meissner@cygnus.com). *************** along with GNU CC; see the file COPYING. *** 21,35 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* Don't assume anything about the header files. */ - #define NO_IMPLICIT_EXTERN_C - #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-DPPC -D__ELF__ -Dpowerpc -Acpu=powerpc -Amachine=powerpc" #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" --- 21,40 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("PPC"); \ ! builtin_define ("__ELF__"); \ ! builtin_define_std ("powerpc"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/lynx.h gcc-3.3/gcc/config/rs6000/lynx.h *** gcc-3.2.3/gcc/config/rs6000/lynx.h 2001-11-20 19:43:28.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/lynx.h 2002-07-10 00:33:51.000000000 +0000 *************** *** 1,5 **** /* Definitions for Rs6000 running LynxOS. ! Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc. Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com) This file is part of GNU CC. --- 1,5 ---- /* Definitions for Rs6000 running LynxOS. ! Copyright (C) 1995, 1996, 2000, 2002 Free Software Foundation, Inc. Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com) This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 27,35 **** #undef ASM_FILE_START #undef EXTRA_SECTIONS #undef READONLY_DATA_SECTION #undef EXTRA_SECTION_FUNCTIONS ! #undef SELECT_RTX_SECTION ! #undef SELECT_SECTION #undef USER_LABEL_PREFIX #undef ASM_OUTPUT_LABELREF #undef ASM_OUTPUT_INTERNAL_LABEL --- 27,36 ---- #undef ASM_FILE_START #undef EXTRA_SECTIONS #undef READONLY_DATA_SECTION + #undef READONLY_DATA_SECTION_ASM_OP #undef EXTRA_SECTION_FUNCTIONS ! #undef TARGET_ASM_SELECT_RTX_SECTION ! #undef TARGET_ASM_SELECT_SECTION #undef USER_LABEL_PREFIX #undef ASM_OUTPUT_LABELREF #undef ASM_OUTPUT_INTERNAL_LABEL *************** Boston, MA 02111-1307, USA. */ *** 52,59 **** #undef DEFAULT_SIGNED_CHAR #define DEFAULT_SIGNED_CHAR 1 ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Acpu=rs6000 -Amachine=rs6000 -Asystem=lynx -Asystem=unix -DLynx -D_IBMR2 -Dunix -Drs6000 -Dlynx -DLYNX" #undef LINK_SPEC #define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}" --- 53,74 ---- #undef DEFAULT_SIGNED_CHAR #define DEFAULT_SIGNED_CHAR 1 ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_assert ("cpu=rs6000"); \ ! builtin_assert ("machine=rs6000"); \ ! builtin_assert ("system=lynx"); \ ! builtin_assert ("system=unix"); \ ! builtin_define_std ("Lynx"); \ ! builtin_define ("_IBMR2"); \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("rs6000"); \ ! builtin_define_std ("lynx"); \ ! builtin_define_std ("LYNX"); \ ! } \ ! while (0) #undef LINK_SPEC #define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}" diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/mach.h gcc-3.3/gcc/config/rs6000/mach.h *** gcc-3.2.3/gcc/config/rs6000/mach.h 2001-11-20 19:43:28.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/mach.h 2002-07-10 00:33:51.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 26,33 **** #define TARGET_VERSION fprintf (stderr, " (Mach-RS/6000)"); /* We don't define AIX under MACH; instead we define `unix'. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Drios -D_IBMR2 -Dunix -Asystem=unix -Asystem=mach -Acpu=rs6000 -Amachine=rs6000" /* Define different binder options for MACH. */ #undef LINK_SPEC --- 26,44 ---- #define TARGET_VERSION fprintf (stderr, " (Mach-RS/6000)"); /* We don't define AIX under MACH; instead we define `unix'. */ ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("rios"); \ ! builtin_define ("_IBMR2"); \ ! builtin_define_std ("unix"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=mach"); \ ! builtin_assert ("cpu=rs6000"); \ ! builtin_assert ("machine=rs6000"); \ ! } \ ! while (0) /* Define different binder options for MACH. */ #undef LINK_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/netbsd.h gcc-3.3/gcc/config/rs6000/netbsd.h *** gcc-3.2.3/gcc/config/rs6000/netbsd.h 2002-06-03 00:28:58.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/netbsd.h 2002-11-26 15:46:40.000000000 +0000 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler, for PowerPC NetBSD systems. ! Copyright 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Definitions of target machine for GNU compiler, for PowerPC NetBSD systems. ! Copyright 2002 Free Software Foundation, Inc. ! Contributed by Wasabi Systems, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,66 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Under NetBSD, the normal location of the various *crt*.o files is ! the /usr/lib directory [from config/netbsd.h]. */ ! #undef STANDARD_STARTFILE_PREFIX ! #define STANDARD_STARTFILE_PREFIX "/usr/lib/" ! /* FIXME: Should this macro be treated the same as for the other ! spec's? */ ! /* NOTE: -dc and -dp are equivalent yet NetBSD's CC passes both both! ! NetBSD's CC also passes -O1 but we can skip that. NetBSD explictly ! sets ``-e _start'', since LD knows this, skip it. */ ! #undef LINK_SHLIB_SPEC ! #define LINK_SHLIB_SPEC "\ ! %{shared:-shared} \ ! %{!shared: %{static:-dc -dp -static}} \ ! %{!shared: %{!static:-dc -dp}} \ ! " ! /* Override the defaults. */ ! #undef LIB_DEFAULT_SPEC ! #define LIB_DEFAULT_SPEC "%(lib_netbsd)" ! #undef STARTFILE_DEFAULT_SPEC ! #define STARTFILE_DEFAULT_SPEC "%(startfile_netbsd)" ! #undef ENDFILE_DEFAULT_SPEC ! #define ENDFILE_DEFAULT_SPEC "%(endfile_netbsd)" ! #undef LINK_START_DEFAULT_SPEC ! #define LINK_START_DEFAULT_SPEC "%(link_start_netbsd)" ! #undef LINK_OS_DEFAULT_SPEC ! #define LINK_OS_DEFAULT_SPEC "%(link_os_netbsd)" ! #undef CPP_OS_DEFAULT_SPEC ! #define CPP_OS_DEFAULT_SPEC "%(cpp_os_netbsd)" ! #undef TARGET_VERSION ! #define TARGET_VERSION fprintf (stderr, " (PowerPC NetBSD/ELF)"); ! /* Use STABS debugging information by default. DWARF2 makes a mess of ! the 1.5.2 linker. */ ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 20,93 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_ELF(); \ ! builtin_define ("__powerpc__"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) ! /* Override the default from rs6000.h to avoid conflicts with macros ! defined in NetBSD header files. */ ! #undef RS6000_CPU_CPP_ENDIAN_BUILTINS ! #define RS6000_CPU_CPP_ENDIAN_BUILTINS() \ ! do \ ! { \ ! if (BYTES_BIG_ENDIAN) \ ! { \ ! builtin_define ("__BIG_ENDIAN__"); \ ! builtin_assert ("machine=bigendian"); \ ! } \ ! else \ ! { \ ! builtin_define ("__LITTLE_ENDIAN__"); \ ! builtin_assert ("machine=littleendian"); \ ! } \ ! } \ ! while (0) ! /* Make GCC agree with . */ ! #undef SIZE_TYPE ! #define SIZE_TYPE "unsigned int" ! #undef PTRDIFF_TYPE ! #define PTRDIFF_TYPE "int" ! /* Undo the spec mess from sysv4.h, and just define the specs ! the way NetBSD systems actually expect. */ ! #undef CPP_SPEC ! #define CPP_SPEC NETBSD_CPP_SPEC ! #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{!msdata=none:%{G*}} %{msdata=none:-G0} \ ! %(netbsd_link_spec)" ! #define NETBSD_ENTRY_POINT "_start" ! #undef STARTFILE_SPEC ! #define STARTFILE_SPEC NETBSD_STARTFILE_SPEC ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC \ ! "crtsavres%O%s %(netbsd_endfile_spec)" ! ! #undef LIB_SPEC ! #define LIB_SPEC NETBSD_LIB_SPEC ! ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ ! { "netbsd_entry_point", NETBSD_ENTRY_POINT }, \ ! { "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC }, ! ! ! #undef TARGET_VERSION ! #define TARGET_VERSION fprintf (stderr, " (NetBSD/powerpc ELF)"); diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/ppc64-fp.c gcc-3.3/gcc/config/rs6000/ppc64-fp.c *** gcc-3.2.3/gcc/config/rs6000/ppc64-fp.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/ppc64-fp.c 2003-02-11 20:55:15.000000000 +0000 *************** *** 0 **** --- 1,146 ---- + /* Functions needed for soft-float on powerpc64-linux, copied from + libgcc2.c with macros expanded to force the use of specific types. + + Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file into combinations with other programs, + and to distribute those combinations without any restriction coming + from the use of this file. (The General Public License restrictions + do apply in other respects; for example, they cover modification of + the file, and distribution when not linked into a combine + executable.) + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + #if defined(__powerpc64__) + #include "fp-bit.h" + + extern DItype __fixdfdi (DFtype); + extern DItype __fixsfdi (SFtype); + extern USItype __fixunsdfsi (DFtype); + extern USItype __fixunssfsi (SFtype); + extern DFtype __floatdidf (DItype); + extern SFtype __floatdisf (DItype); + + static DItype local_fixunssfdi (SFtype); + static DItype local_fixunsdfdi (DFtype); + + DItype + __fixdfdi (DFtype a) + { + if (a < 0) + return - local_fixunsdfdi (-a); + return local_fixunsdfdi (a); + } + + DItype + __fixsfdi (SFtype a) + { + if (a < 0) + return - local_fixunssfdi (-a); + return local_fixunssfdi (a); + } + + USItype + __fixunsdfsi (DFtype a) + { + if (a >= - (DFtype) (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) + return (SItype) (a + (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) + - (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1); + return (SItype) a; + } + + USItype + __fixunssfsi (SFtype a) + { + if (a >= - (SFtype) (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) + return (SItype) (a + (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) + - (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1); + return (SItype) a; + } + + DFtype + __floatdidf (DItype u) + { + DFtype d; + + d = (SItype) (u >> (sizeof (SItype) * 8)); + d *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2)); + d *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2)); + d += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); + + return d; + } + + SFtype + __floatdisf (DItype u) + { + DFtype f; + + if (53 < (sizeof (DItype) * 8) + && 53 > ((sizeof (DItype) * 8) - 53 + 24)) + { + if (! (- ((DItype) 1 << 53) < u + && u < ((DItype) 1 << 53))) + { + if ((UDItype) u & (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1)) + { + u &= ~ (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1); + u |= ((UDItype) 1 << ((sizeof (DItype) * 8) - 53)); + } + } + } + f = (SItype) (u >> (sizeof (SItype) * 8)); + f *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2)); + f *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2)); + f += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); + + return (SFtype) f; + } + + /* This version is needed to prevent recursion; fixunsdfdi in libgcc + calls fixdfdi, which in turn calls calls fixunsdfdi. */ + + static DItype + local_fixunsdfdi (DFtype a) + { + USItype hi, lo; + + hi = a / (((UDItype) 1) << (sizeof (SItype) * 8)); + lo = (a - ((DFtype) hi) * (((UDItype) 1) << (sizeof (SItype) * 8))); + return ((UDItype) hi << (sizeof (SItype) * 8)) | lo; + } + + /* This version is needed to prevent recursion; fixunssfdi in libgcc + calls fixsfdi, which in turn calls calls fixunssfdi. */ + + static DItype + local_fixunssfdi (SFtype original_a) + { + DFtype a = original_a; + USItype hi, lo; + + hi = a / (((UDItype) 1) << (sizeof (SItype) * 8)); + lo = (a - ((DFtype) hi) * (((UDItype) 1) << (sizeof (SItype) * 8))); + return ((UDItype) hi << (sizeof (SItype) * 8)) | lo; + } + + #endif /* __powerpc64__ */ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/ppc-asm.h gcc-3.3/gcc/config/rs6000/ppc-asm.h *** gcc-3.2.3/gcc/config/rs6000/ppc-asm.h 2002-02-15 21:04:53.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/ppc-asm.h 2002-06-11 22:24:49.000000000 +0000 *************** *** 2,8 **** /* Under winnt, 1) gas supports the following as names and 2) in particular defining "toc" breaks the FUNC_START macro as ".toc" becomes ".2" */ - #if !defined(__WINNT__) #define r0 0 #define sp 1 #define toc 2 --- 2,7 ---- *************** *** 77,83 **** #define f29 29 #define f30 30 #define f31 31 - #endif /* * Macros to glue together two tokens. --- 76,81 ---- *************** GLUE(.,name): *** 122,164 **** GLUE(.L,name): \ .size GLUE(.,name),GLUE(.L,name)-GLUE(.,name) - #elif defined(__WINNT__) - #define FUNC_NAME(name) GLUE(..,name) - #define JUMP_TARGET(name) FUNC_NAME(name) - #define FUNC_START(name) \ - .pdata; \ - .align 2; \ - .ualong GLUE(..,name),GLUE(name,.e),0,0,GLUE(..,name); \ - .reldata; \ - name: \ - .ualong GLUE(..,name),.toc; \ - .section .text; \ - .globl name; \ - .globl GLUE(..,name); \ - GLUE(..,name): - - #define FUNC_END(name) \ - GLUE(name,.e): ; \ - GLUE(FE_MOT_RESVD..,name): - - #elif defined(_CALL_NT) - #define FUNC_NAME(name) GLUE(..,name) - #define JUMP_TARGET(name) FUNC_NAME(name) - #define FUNC_START(name) \ - .section DESC_SECTION,"aw"; \ - name: \ - .long GLUE(..,name); \ - .long _GLOBAL_OFFSET_TABLE_; \ - .previous; \ - .type GLUE(..,name),@function; \ - .globl name; \ - .globl GLUE(..,name); \ - GLUE(..,name): - - #define FUNC_END(name) \ - GLUE(.L,name): \ - .size GLUE(..,name),GLUE(.L,name)-GLUE(..,name) - #elif defined (__powerpc64__) #define FUNC_NAME(name) GLUE(.,name) #define JUMP_TARGET(name) FUNC_NAME(name) --- 120,125 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/rs6000.c gcc-3.3/gcc/config/rs6000/rs6000.c *** gcc-3.2.3/gcc/config/rs6000/rs6000.c 2003-04-08 22:03:23.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/rs6000.c 2003-04-25 17:42:16.000000000 +0000 *************** int rs6000_long_double_type_size; *** 74,80 **** /* Whether -mabi=altivec has appeared */ int rs6000_altivec_abi; ! /* Set to non-zero once AIX common-mode calls have been defined. */ static int common_mode_defined; /* Private copy of original value of flag_pic for ABI_AIX. */ --- 74,98 ---- /* Whether -mabi=altivec has appeared */ int rs6000_altivec_abi; ! /* Whether VRSAVE instructions should be generated. */ ! int rs6000_altivec_vrsave; ! ! /* String from -mvrsave= option. */ ! const char *rs6000_altivec_vrsave_string; ! ! /* Nonzero if we want SPE ABI extensions. */ ! int rs6000_spe_abi; ! ! /* Whether isel instructions should be generated. */ ! int rs6000_isel; ! ! /* Nonzero if we have FPRs. */ ! int rs6000_fprs = 1; ! ! /* String from -misel=. */ ! const char *rs6000_isel_string; ! ! /* Set to nonzero once AIX common-mode calls have been defined. */ static int common_mode_defined; /* Private copy of original value of flag_pic for ABI_AIX. */ *************** const char *rs6000_debug_name; *** 114,119 **** --- 132,145 ---- int rs6000_debug_stack; /* debug stack applications */ int rs6000_debug_arg; /* debug argument handling */ + const char *rs6000_traceback_name; + static enum { + traceback_default = 0, + traceback_none, + traceback_part, + traceback_full + } rs6000_traceback; + /* Flag to say the TOC is initialized */ int toc_initialized; char toc_label_name[10]; *************** char toc_label_name[10]; *** 121,126 **** --- 147,170 ---- /* Alias set for saves and restores from the rs6000 stack. */ static int rs6000_sr_alias_set; + /* Call distance, overridden by -mlongcall and #pragma longcall(1). + The only place that looks at this is rs6000_set_default_type_attributes; + everywhere else should rely on the presence or absence of a longcall + attribute on the function declaration. */ + int rs6000_default_long_calls; + const char *rs6000_longcall_switch; + + struct builtin_description + { + /* mask is not const because we're going to alter it below. This + nonsense will go away when we rewrite the -march infrastructure + to give us more target flag bits. */ + unsigned int mask; + const enum insn_code icode; + const char *const name; + const enum rs6000_builtins code; + }; + static void rs6000_add_gc_roots PARAMS ((void)); static int num_insns_constant_wide PARAMS ((HOST_WIDE_INT)); static void validate_condition_mode *************** static rtx rs6000_generate_compare PARAM *** 129,134 **** --- 173,181 ---- static void rs6000_maybe_dead PARAMS ((rtx)); static void rs6000_emit_stack_tie PARAMS ((void)); static void rs6000_frame_related PARAMS ((rtx, rtx, HOST_WIDE_INT, rtx, rtx)); + static void emit_frame_save PARAMS ((rtx, rtx, enum machine_mode, + unsigned int, int, int)); + static rtx gen_frame_mem_offset PARAMS ((enum machine_mode, rtx, int)); static void rs6000_emit_allocate_stack PARAMS ((HOST_WIDE_INT, int)); static unsigned rs6000_hash_constant PARAMS ((rtx)); static unsigned toc_hash_function PARAMS ((const void *)); *************** static int toc_hash_eq PARAMS ((const vo *** 136,149 **** static int toc_hash_mark_entry PARAMS ((void **, void *)); static void toc_hash_mark_table PARAMS ((void *)); static int constant_pool_expr_1 PARAMS ((rtx, int *, int *)); ! static void rs6000_free_machine_status PARAMS ((struct function *)); ! static void rs6000_init_machine_status PARAMS ((struct function *)); static bool rs6000_assemble_integer PARAMS ((rtx, unsigned int, int)); static int rs6000_ra_ever_killed PARAMS ((void)); static tree rs6000_handle_longcall_attribute PARAMS ((tree *, tree, tree, int, bool *)); const struct attribute_spec rs6000_attribute_table[]; static void rs6000_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void rs6000_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static rtx rs6000_emit_set_long_const PARAMS ((rtx, HOST_WIDE_INT, HOST_WIDE_INT)); #if TARGET_ELF --- 183,201 ---- static int toc_hash_mark_entry PARAMS ((void **, void *)); static void toc_hash_mark_table PARAMS ((void *)); static int constant_pool_expr_1 PARAMS ((rtx, int *, int *)); ! static struct machine_function * rs6000_init_machine_status PARAMS ((void)); static bool rs6000_assemble_integer PARAMS ((rtx, unsigned int, int)); + #ifdef HAVE_GAS_HIDDEN + static void rs6000_assemble_visibility PARAMS ((tree, int)); + #endif static int rs6000_ra_ever_killed PARAMS ((void)); static tree rs6000_handle_longcall_attribute PARAMS ((tree *, tree, tree, int, bool *)); const struct attribute_spec rs6000_attribute_table[]; + static void rs6000_set_default_type_attributes PARAMS ((tree)); static void rs6000_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void rs6000_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); + static void rs6000_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); static rtx rs6000_emit_set_long_const PARAMS ((rtx, HOST_WIDE_INT, HOST_WIDE_INT)); #if TARGET_ELF *************** static unsigned int rs6000_elf_section_t *** 151,180 **** int)); static void rs6000_elf_asm_out_constructor PARAMS ((rtx, int)); static void rs6000_elf_asm_out_destructor PARAMS ((rtx, int)); #endif ! #ifdef OBJECT_FORMAT_COFF ! static void xcoff_asm_named_section PARAMS ((const char *, unsigned int)); #endif static bool rs6000_binds_local_p PARAMS ((tree)); static int rs6000_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int rs6000_adjust_priority PARAMS ((rtx, int)); static int rs6000_issue_rate PARAMS ((void)); static void rs6000_init_builtins PARAMS ((void)); ! static void altivec_init_builtins PARAMS ((void)); static rtx rs6000_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); ! static rtx altivec_expand_builtin PARAMS ((tree, rtx)); ! static rtx altivec_expand_unop_builtin PARAMS ((enum insn_code, tree, rtx)); ! static rtx altivec_expand_binop_builtin PARAMS ((enum insn_code, tree, rtx)); static rtx altivec_expand_abs_builtin PARAMS ((enum insn_code, tree, rtx)); static rtx altivec_expand_predicate_builtin PARAMS ((enum insn_code, const char *, tree, rtx)); - static rtx altivec_expand_ternop_builtin PARAMS ((enum insn_code, tree, rtx)); static rtx altivec_expand_stv_builtin PARAMS ((enum insn_code, tree)); static void rs6000_parse_abi_options PARAMS ((void)); static int first_altivec_reg_to_save PARAMS ((void)); static unsigned int compute_vrsave_mask PARAMS ((void)); static void is_altivec_return_reg PARAMS ((rtx, void *)); - int vrsave_operation PARAMS ((rtx, enum machine_mode)); static rtx generate_set_vrsave PARAMS ((rtx, rs6000_stack_t *, int)); static void altivec_frame_fixup PARAMS ((rtx, rtx, HOST_WIDE_INT)); static int easy_vector_constant PARAMS ((rtx)); --- 203,266 ---- int)); static void rs6000_elf_asm_out_constructor PARAMS ((rtx, int)); static void rs6000_elf_asm_out_destructor PARAMS ((rtx, int)); + static void rs6000_elf_select_section PARAMS ((tree, int, + unsigned HOST_WIDE_INT)); + static void rs6000_elf_unique_section PARAMS ((tree, int)); + static void rs6000_elf_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)); + static void rs6000_elf_encode_section_info PARAMS ((tree, int)) + ATTRIBUTE_UNUSED; + static const char *rs6000_elf_strip_name_encoding PARAMS ((const char *)); + static bool rs6000_elf_in_small_data_p PARAMS ((tree)); #endif ! #if TARGET_XCOFF ! static void rs6000_xcoff_asm_globalize_label PARAMS ((FILE *, const char *)); ! static void rs6000_xcoff_asm_named_section PARAMS ((const char *, unsigned int)); ! static void rs6000_xcoff_select_section PARAMS ((tree, int, ! unsigned HOST_WIDE_INT)); ! static void rs6000_xcoff_unique_section PARAMS ((tree, int)); ! static void rs6000_xcoff_select_rtx_section PARAMS ((enum machine_mode, rtx, ! unsigned HOST_WIDE_INT)); ! static const char * rs6000_xcoff_strip_name_encoding PARAMS ((const char *)); ! static unsigned int rs6000_xcoff_section_type_flags PARAMS ((tree, const char *, int)); #endif + static void rs6000_xcoff_encode_section_info PARAMS ((tree, int)) + ATTRIBUTE_UNUSED; static bool rs6000_binds_local_p PARAMS ((tree)); static int rs6000_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int rs6000_adjust_priority PARAMS ((rtx, int)); static int rs6000_issue_rate PARAMS ((void)); static void rs6000_init_builtins PARAMS ((void)); ! static rtx rs6000_expand_unop_builtin PARAMS ((enum insn_code, tree, rtx)); ! static rtx rs6000_expand_binop_builtin PARAMS ((enum insn_code, tree, rtx)); ! static rtx rs6000_expand_ternop_builtin PARAMS ((enum insn_code, tree, rtx)); static rtx rs6000_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); ! static void altivec_init_builtins PARAMS ((void)); ! static void rs6000_common_init_builtins PARAMS ((void)); ! ! static void enable_mask_for_builtins PARAMS ((struct builtin_description *, ! int, enum rs6000_builtins, ! enum rs6000_builtins)); ! static void spe_init_builtins PARAMS ((void)); ! static rtx spe_expand_builtin PARAMS ((tree, rtx, bool *)); ! static rtx spe_expand_predicate_builtin PARAMS ((enum insn_code, tree, rtx)); ! static rtx spe_expand_evsel_builtin PARAMS ((enum insn_code, tree, rtx)); ! static int rs6000_emit_int_cmove PARAMS ((rtx, rtx, rtx, rtx)); ! ! static rtx altivec_expand_builtin PARAMS ((tree, rtx, bool *)); ! static rtx altivec_expand_ld_builtin PARAMS ((tree, rtx, bool *)); ! static rtx altivec_expand_st_builtin PARAMS ((tree, rtx, bool *)); ! static rtx altivec_expand_dst_builtin PARAMS ((tree, rtx, bool *)); static rtx altivec_expand_abs_builtin PARAMS ((enum insn_code, tree, rtx)); static rtx altivec_expand_predicate_builtin PARAMS ((enum insn_code, const char *, tree, rtx)); static rtx altivec_expand_stv_builtin PARAMS ((enum insn_code, tree)); static void rs6000_parse_abi_options PARAMS ((void)); + static void rs6000_parse_vrsave_option PARAMS ((void)); + static void rs6000_parse_isel_option PARAMS ((void)); static int first_altivec_reg_to_save PARAMS ((void)); static unsigned int compute_vrsave_mask PARAMS ((void)); static void is_altivec_return_reg PARAMS ((rtx, void *)); static rtx generate_set_vrsave PARAMS ((rtx, rs6000_stack_t *, int)); static void altivec_frame_fixup PARAMS ((rtx, rtx, HOST_WIDE_INT)); static int easy_vector_constant PARAMS ((rtx)); *************** char rs6000_reg_names[][8] = *** 198,204 **** "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", ! "vrsave" }; #ifdef TARGET_REGNAMES --- 284,292 ---- "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", ! "vrsave", "vscr", ! /* SPE registers. */ ! "spe_acc", "spefscr" }; #ifdef TARGET_REGNAMES *************** static const char alt_reg_names[][8] = *** 215,236 **** "mq", "lr", "ctr", "ap", "%cr0", "%cr1", "%cr2", "%cr3", "%cr4", "%cr5", "%cr6", "%cr7", "xer", ! /* AltiVec registers. */ "%v0", "%v1", "%v2", "%v3", "%v4", "%v5", "%v6", "%v7", ! "%v8", "%v9", "%v10", "%v11", "%v12", "%v13", "%v14", "%v15", ! "%v16", "%v17", "%v18", "%v19", "%v20", "%v21", "%v22", "%v23", ! "%v24", "%v25", "%v26", "%v27", "%v28", "%v29", "%v30", "%v31", ! "vrsave" }; #endif #ifndef MASK_STRICT_ALIGN #define MASK_STRICT_ALIGN 0 #endif /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE rs6000_attribute_table #undef TARGET_ASM_ALIGNED_DI_OP #define TARGET_ASM_ALIGNED_DI_OP DOUBLE_INT_ASM_OP --- 303,331 ---- "mq", "lr", "ctr", "ap", "%cr0", "%cr1", "%cr2", "%cr3", "%cr4", "%cr5", "%cr6", "%cr7", "xer", ! /* AltiVec registers. */ "%v0", "%v1", "%v2", "%v3", "%v4", "%v5", "%v6", "%v7", ! "%v8", "%v9", "%v10", "%v11", "%v12", "%v13", "%v14", "%v15", ! "%v16", "%v17", "%v18", "%v19", "%v20", "%v21", "%v22", "%v23", ! "%v24", "%v25", "%v26", "%v27", "%v28", "%v29", "%v30", "%v31", ! "vrsave", "vscr", ! /* SPE registers. */ ! "spe_acc", "spefscr" }; #endif #ifndef MASK_STRICT_ALIGN #define MASK_STRICT_ALIGN 0 #endif + + /* The VRSAVE bitmask puts bit %v0 as the most significant bit. */ + #define ALTIVEC_REG_BIT(REGNO) (0x80000000 >> ((REGNO) - FIRST_ALTIVEC_REGNO)) /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE rs6000_attribute_table + #undef TARGET_SET_DEFAULT_TYPE_ATTRIBUTES + #define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES rs6000_set_default_type_attributes #undef TARGET_ASM_ALIGNED_DI_OP #define TARGET_ASM_ALIGNED_DI_OP DOUBLE_INT_ASM_OP *************** static const char alt_reg_names[][8] = *** 238,244 **** /* Default unaligned ops are only provided for ELF. Find the ops needed for non-ELF systems. */ #ifndef OBJECT_FORMAT_ELF ! #ifdef OBJECT_FORMAT_COFF /* For XCOFF. rs6000_assemble_integer will handle unaligned DIs on 64-bit targets. */ #undef TARGET_ASM_UNALIGNED_HI_OP --- 333,339 ---- /* Default unaligned ops are only provided for ELF. Find the ops needed for non-ELF systems. */ #ifndef OBJECT_FORMAT_ELF ! #if TARGET_XCOFF /* For XCOFF. rs6000_assemble_integer will handle unaligned DIs on 64-bit targets. */ #undef TARGET_ASM_UNALIGNED_HI_OP *************** static const char alt_reg_names[][8] = *** 261,276 **** #undef TARGET_ASM_INTEGER #define TARGET_ASM_INTEGER rs6000_assemble_integer #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE rs6000_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE rs6000_output_function_epilogue - #if TARGET_ELF - #undef TARGET_SECTION_TYPE_FLAGS - #define TARGET_SECTION_TYPE_FLAGS rs6000_elf_section_type_flags - #endif - #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE rs6000_issue_rate #undef TARGET_SCHED_ADJUST_COST --- 356,371 ---- #undef TARGET_ASM_INTEGER #define TARGET_ASM_INTEGER rs6000_assemble_integer + #ifdef HAVE_GAS_HIDDEN + #undef TARGET_ASM_ASSEMBLE_VISIBILITY + #define TARGET_ASM_ASSEMBLE_VISIBILITY rs6000_assemble_visibility + #endif + #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE rs6000_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE rs6000_output_function_epilogue #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE rs6000_issue_rate #undef TARGET_SCHED_ADJUST_COST *************** static const char alt_reg_names[][8] = *** 284,291 **** #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN rs6000_expand_builtin ! /* The VRSAVE bitmask puts bit %v0 as the most significant bit. */ ! #define ALTIVEC_REG_BIT(REGNO) (0x80000000 >> ((REGNO) - FIRST_ALTIVEC_REGNO)) struct gcc_target targetm = TARGET_INITIALIZER; --- 379,396 ---- #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN rs6000_expand_builtin ! #undef TARGET_BINDS_LOCAL_P ! #define TARGET_BINDS_LOCAL_P rs6000_binds_local_p ! ! #undef TARGET_ASM_OUTPUT_MI_THUNK ! #define TARGET_ASM_OUTPUT_MI_THUNK rs6000_output_mi_thunk ! ! /* ??? Should work everywhere, but ask dje@watson.ibm.com before ! enabling for AIX. */ ! #if TARGET_OBJECT_FORMAT != OBJECT_XCOFF ! #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK ! #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall ! #endif struct gcc_target targetm = TARGET_INITIALIZER; *************** rs6000_override_options (default_cpu) *** 325,330 **** --- 430,438 ---- {"power3", PROCESSOR_PPC630, MASK_POWERPC | MASK_PPC_GFXOPT | MASK_NEW_MNEMONICS, POWER_MASKS | MASK_PPC_GPOPT}, + {"power4", PROCESSOR_POWER4, + MASK_POWERPC | MASK_PPC_GFXOPT | MASK_NEW_MNEMONICS, + POWER_MASKS | MASK_PPC_GPOPT}, {"powerpc", PROCESSOR_POWERPC, MASK_POWERPC | MASK_NEW_MNEMONICS, POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, *************** rs6000_override_options (default_cpu) *** 400,405 **** --- 508,516 ---- {"7450", PROCESSOR_PPC7450, MASK_POWERPC | MASK_PPC_GFXOPT | MASK_NEW_MNEMONICS, POWER_MASKS | MASK_PPC_GPOPT | MASK_POWERPC64}, + {"8540", PROCESSOR_PPC8540, + MASK_POWERPC | MASK_PPC_GFXOPT | MASK_NEW_MNEMONICS, + POWER_MASKS | MASK_PPC_GPOPT | MASK_POWERPC64}, {"801", PROCESSOR_MPCCORE, MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS, POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, *************** rs6000_override_options (default_cpu) *** 413,419 **** MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS, POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}}; ! size_t ptt_size = sizeof (processor_target_table) / sizeof (struct ptt); /* Save current -mmultiple/-mno-multiple status. */ int multiple = TARGET_MULTIPLE; --- 524,530 ---- MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS, POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}}; ! const size_t ptt_size = ARRAY_SIZE (processor_target_table); /* Save current -mmultiple/-mno-multiple status. */ int multiple = TARGET_MULTIPLE; *************** rs6000_override_options (default_cpu) *** 448,457 **** } } ! /* If we are optimizing big endian systems for space, use the store ! multiple instructions. */ if (BYTES_BIG_ENDIAN && optimize_size) ! target_flags |= MASK_MULTIPLE; /* If -mmultiple or -mno-multiple was explicitly used, don't override with the processor default */ --- 559,571 ---- } } ! if (rs6000_cpu == PROCESSOR_PPC8540) ! rs6000_isel = 1; ! ! /* If we are optimizing big endian systems for space, use the load/store ! multiple and string instructions. */ if (BYTES_BIG_ENDIAN && optimize_size) ! target_flags |= MASK_MULTIPLE | MASK_STRING; /* If -mmultiple or -mno-multiple was explicitly used, don't override with the processor default */ *************** rs6000_override_options (default_cpu) *** 492,511 **** flag_pic = 0; } ! #ifdef XCOFF_DEBUGGING_INFO ! if (flag_function_sections && (write_symbols != NO_DEBUG) ! && DEFAULT_ABI == ABI_AIX) ! { ! warning ("-ffunction-sections disabled on AIX when debugging"); ! flag_function_sections = 0; ! } ! ! if (flag_data_sections && (DEFAULT_ABI == ABI_AIX)) ! { ! warning ("-fdata-sections not supported on AIX"); ! flag_data_sections = 0; ! } ! #endif /* Set debug flags */ if (rs6000_debug_name) --- 606,614 ---- flag_pic = 0; } ! /* For Darwin, always silently make -fpic and -fPIC identical. */ ! if (flag_pic == 1 && DEFAULT_ABI == ABI_DARWIN) ! flag_pic = 2; /* Set debug flags */ if (rs6000_debug_name) *************** rs6000_override_options (default_cpu) *** 520,525 **** --- 623,641 ---- error ("unknown -mdebug-%s switch", rs6000_debug_name); } + if (rs6000_traceback_name) + { + if (! strncmp (rs6000_traceback_name, "full", 4)) + rs6000_traceback = traceback_full; + else if (! strncmp (rs6000_traceback_name, "part", 4)) + rs6000_traceback = traceback_part; + else if (! strncmp (rs6000_traceback_name, "no", 2)) + rs6000_traceback = traceback_none; + else + error ("unknown -mtraceback arg `%s'; expecting `full', `partial' or `none'", + rs6000_traceback_name); + } + /* Set size of long double */ rs6000_long_double_type_size = 64; if (rs6000_long_double_size_string) *************** rs6000_override_options (default_cpu) *** 536,547 **** /* Handle -mabi= options. */ rs6000_parse_abi_options (); ! #ifdef TARGET_REGNAMES ! /* If the user desires alternate register names, copy in the ! alternate names now. */ ! if (TARGET_REGNAMES) ! memcpy (rs6000_reg_names, alt_reg_names, sizeof (rs6000_reg_names)); ! #endif #ifdef SUBTARGET_OVERRIDE_OPTIONS SUBTARGET_OVERRIDE_OPTIONS; --- 652,662 ---- /* Handle -mabi= options. */ rs6000_parse_abi_options (); ! /* Handle -mvrsave= option. */ ! rs6000_parse_vrsave_option (); ! ! /* Handle -misel= option. */ ! rs6000_parse_isel_option (); #ifdef SUBTARGET_OVERRIDE_OPTIONS SUBTARGET_OVERRIDE_OPTIONS; *************** rs6000_override_options (default_cpu) *** 550,555 **** --- 665,693 ---- SUBSUBTARGET_OVERRIDE_OPTIONS; #endif + /* Handle -m(no-)longcall option. This is a bit of a cheap hack, + using TARGET_OPTIONS to handle a toggle switch, but we're out of + bits in target_flags so TARGET_SWITCHES cannot be used. + Assumption here is that rs6000_longcall_switch points into the + text of the complete option, rather than being a copy, so we can + scan back for the presence or absence of the no- modifier. */ + if (rs6000_longcall_switch) + { + const char *base = rs6000_longcall_switch; + while (base[-1] != 'm') base--; + + if (*rs6000_longcall_switch != '\0') + error ("invalid option `%s'", base); + rs6000_default_long_calls = (base[0] != 'n'); + } + + #ifdef TARGET_REGNAMES + /* If the user desires alternate register names, copy in the + alternate names now. */ + if (TARGET_REGNAMES) + memcpy (rs6000_reg_names, alt_reg_names, sizeof (rs6000_reg_names)); + #endif + /* Set TARGET_AIX_STRUCT_RET last, after the ABI is determined. If -maix-struct-return or -msvr4-struct-return was explicitly used, don't override with the ABI default. */ *************** rs6000_override_options (default_cpu) *** 561,566 **** --- 699,708 ---- target_flags |= MASK_AIX_STRUCT_RET; } + if (TARGET_LONG_DOUBLE_128 + && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)) + real_format_for_mode[TFmode - QFmode] = &ibm_extended_format; + /* Register global variables with the garbage collector. */ rs6000_add_gc_roots (); *************** rs6000_override_options (default_cpu) *** 580,586 **** /* Arrange to save and restore machine status around nested functions. */ init_machine_status = rs6000_init_machine_status; ! free_machine_status = rs6000_free_machine_status; } /* Handle -mabi= options. */ --- 722,757 ---- /* Arrange to save and restore machine status around nested functions. */ init_machine_status = rs6000_init_machine_status; ! } ! ! /* Handle -misel= option. */ ! static void ! rs6000_parse_isel_option () ! { ! if (rs6000_isel_string == 0) ! return; ! else if (! strcmp (rs6000_isel_string, "yes")) ! rs6000_isel = 1; ! else if (! strcmp (rs6000_isel_string, "no")) ! rs6000_isel = 0; ! else ! error ("unknown -misel= option specified: '%s'", ! rs6000_isel_string); ! } ! ! /* Handle -mvrsave= options. */ ! static void ! rs6000_parse_vrsave_option () ! { ! /* Generate VRSAVE instructions by default. */ ! if (rs6000_altivec_vrsave_string == 0 ! || ! strcmp (rs6000_altivec_vrsave_string, "yes")) ! rs6000_altivec_vrsave = 1; ! else if (! strcmp (rs6000_altivec_vrsave_string, "no")) ! rs6000_altivec_vrsave = 0; ! else ! error ("unknown -mvrsave= option specified: '%s'", ! rs6000_altivec_vrsave_string); } /* Handle -mabi= options. */ *************** rs6000_parse_abi_options () *** 593,598 **** --- 764,773 ---- rs6000_altivec_abi = 1; else if (! strcmp (rs6000_abi_string, "no-altivec")) rs6000_altivec_abi = 0; + else if (! strcmp (rs6000_abi_string, "spe")) + rs6000_spe_abi = 1; + else if (! strcmp (rs6000_abi_string, "no-spe")) + rs6000_spe_abi = 0; else error ("unknown ABI specified: '%s'", rs6000_abi_string); } *************** rs6000_file_start (file, default_cpu) *** 651,671 **** putc ('\n', file); } } - - - /* Create a CONST_DOUBLE from a string. */ - - struct rtx_def * - rs6000_float_const (string, mode) - const char *string; - enum machine_mode mode; - { - REAL_VALUE_TYPE value; - value = REAL_VALUE_ATOF (string, mode); - return immed_real_const_1 (value, mode); - } ! /* Return non-zero if this function is known to have a null epilogue. */ int direct_return () --- 826,833 ---- putc ('\n', file); } } ! /* Return nonzero if this function is known to have a null epilogue. */ int direct_return () *************** reg_or_add_cint64_operand (op, mode) *** 936,943 **** { return (gpc_reg_operand (op, mode) || (GET_CODE (op) == CONST_INT && INTVAL (op) < 0x7fff8000 ! #if HOST_BITS_PER_WIDE_INT != 32 && ((unsigned HOST_WIDE_INT) (INTVAL (op) + 0x80008000) < 0x100000000ll) #endif --- 1098,1106 ---- { return (gpc_reg_operand (op, mode) || (GET_CODE (op) == CONST_INT + #if HOST_BITS_PER_WIDE_INT == 32 && INTVAL (op) < 0x7fff8000 ! #else && ((unsigned HOST_WIDE_INT) (INTVAL (op) + 0x80008000) < 0x100000000ll) #endif *************** reg_or_sub_cint64_operand (op, mode) *** 954,961 **** { return (gpc_reg_operand (op, mode) || (GET_CODE (op) == CONST_INT && (- INTVAL (op)) < 0x7fff8000 ! #if HOST_BITS_PER_WIDE_INT != 32 && ((unsigned HOST_WIDE_INT) ((- INTVAL (op)) + 0x80008000) < 0x100000000ll) #endif --- 1117,1125 ---- { return (gpc_reg_operand (op, mode) || (GET_CODE (op) == CONST_INT + #if HOST_BITS_PER_WIDE_INT == 32 && (- INTVAL (op)) < 0x7fff8000 ! #else && ((unsigned HOST_WIDE_INT) ((- INTVAL (op)) + 0x80008000) < 0x100000000ll) #endif *************** num_insns_constant_wide (value) *** 1037,1056 **** #if HOST_BITS_PER_WIDE_INT == 64 else if (TARGET_POWERPC64) { ! HOST_WIDE_INT low = value & 0xffffffff; ! HOST_WIDE_INT high = value >> 32; ! ! low = (low ^ 0x80000000) - 0x80000000; /* sign extend */ ! if (high == 0 && (low & 0x80000000) == 0) return 2; ! else if (high == -1 && (low & 0x80000000) != 0) ! return 2; ! else if (! low) return num_insns_constant_wide (high) + 1; - else return (num_insns_constant_wide (high) + num_insns_constant_wide (low) + 1); --- 1201,1216 ---- #if HOST_BITS_PER_WIDE_INT == 64 else if (TARGET_POWERPC64) { ! HOST_WIDE_INT low = ((value & 0xffffffff) ^ 0x80000000) - 0x80000000; ! HOST_WIDE_INT high = value >> 31; ! if (high == 0 || high == -1) return 2; ! high >>= 1; ! if (low == 0) return num_insns_constant_wide (high) + 1; else return (num_insns_constant_wide (high) + num_insns_constant_wide (low) + 1); *************** easy_fp_constant (op, mode) *** 1151,1157 **** return 0; /* Consider all constants with -msoft-float to be easy. */ ! if (TARGET_SOFT_FLOAT && mode != DImode) return 1; /* If we are using V.4 style PIC, consider all constants to be hard. */ --- 1311,1318 ---- return 0; /* Consider all constants with -msoft-float to be easy. */ ! if ((TARGET_SOFT_FLOAT || !TARGET_FPRS) ! && mode != DImode) return 1; /* If we are using V.4 style PIC, consider all constants to be hard. */ *************** easy_fp_constant (op, mode) *** 1165,1171 **** return 0; #endif ! if (mode == DFmode) { long k[2]; REAL_VALUE_TYPE rv; --- 1326,1346 ---- return 0; #endif ! if (mode == TFmode) ! { ! long k[4]; ! REAL_VALUE_TYPE rv; ! ! REAL_VALUE_FROM_CONST_DOUBLE (rv, op); ! REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, k); ! ! return (num_insns_constant_wide ((HOST_WIDE_INT) k[0]) == 1 ! && num_insns_constant_wide ((HOST_WIDE_INT) k[1]) == 1 ! && num_insns_constant_wide ((HOST_WIDE_INT) k[2]) == 1 ! && num_insns_constant_wide ((HOST_WIDE_INT) k[3]) == 1); ! } ! ! else if (mode == DFmode) { long k[2]; REAL_VALUE_TYPE rv; *************** easy_fp_constant (op, mode) *** 1173,1180 **** REAL_VALUE_FROM_CONST_DOUBLE (rv, op); REAL_VALUE_TO_TARGET_DOUBLE (rv, k); ! return (num_insns_constant_wide ((HOST_WIDE_INT)k[0]) == 1 ! && num_insns_constant_wide ((HOST_WIDE_INT)k[1]) == 1); } else if (mode == SFmode) --- 1348,1355 ---- REAL_VALUE_FROM_CONST_DOUBLE (rv, op); REAL_VALUE_TO_TARGET_DOUBLE (rv, k); ! return (num_insns_constant_wide ((HOST_WIDE_INT) k[0]) == 1 ! && num_insns_constant_wide ((HOST_WIDE_INT) k[1]) == 1); } else if (mode == SFmode) *************** mask_operand (op, mode) *** 1439,1502 **** return c == -lsb; } /* Return 1 if the operand is a constant that is a PowerPC64 mask. It is if there are no more than one 1->0 or 0->1 transitions. ! Reject all ones and all zeros, since these should have been optimized ! away and confuse the making of MB and ME. */ int mask64_operand (op, mode) rtx op; ! enum machine_mode mode; { if (GET_CODE (op) == CONST_INT) { HOST_WIDE_INT c, lsb; - /* We don't change the number of transitions by inverting, - so make sure we start with the LS bit zero. */ c = INTVAL (op); - if (c & 1) - c = ~c; ! /* Reject all zeros or all ones. */ if (c == 0) return 0; /* Find the transition, and check that all bits above are 1's. */ lsb = c & -c; return c == -lsb; } ! else if (GET_CODE (op) == CONST_DOUBLE ! && (mode == VOIDmode || mode == DImode)) { ! HOST_WIDE_INT low, high, lsb; ! if (HOST_BITS_PER_WIDE_INT < 64) ! high = CONST_DOUBLE_HIGH (op); ! low = CONST_DOUBLE_LOW (op); ! if (low & 1) ! { ! if (HOST_BITS_PER_WIDE_INT < 64) ! high = ~high; ! low = ~low; ! } ! if (low == 0) ! { ! if (HOST_BITS_PER_WIDE_INT >= 64 || high == 0) ! return 0; ! lsb = high & -high; ! return high == -lsb; ! } ! lsb = low & -low; ! return low == -lsb && (HOST_BITS_PER_WIDE_INT >= 64 || high == ~0); } else ! return 0; } /* Return 1 if the operand is either a non-special register or a constant --- 1614,1800 ---- return c == -lsb; } + /* Return 1 for the PowerPC64 rlwinm corner case. */ + + int + mask_operand_wrap (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + HOST_WIDE_INT c, lsb; + + if (GET_CODE (op) != CONST_INT) + return 0; + + c = INTVAL (op); + + if ((c & 0x80000001) != 0x80000001) + return 0; + + c = ~c; + if (c == 0) + return 0; + + lsb = c & -c; + c = ~c; + c &= -lsb; + lsb = c & -c; + return c == -lsb; + } + /* Return 1 if the operand is a constant that is a PowerPC64 mask. It is if there are no more than one 1->0 or 0->1 transitions. ! Reject all zeros, since zero should have been optimized away and ! confuses the making of MB and ME. */ int mask64_operand (op, mode) rtx op; ! enum machine_mode mode ATTRIBUTE_UNUSED; { if (GET_CODE (op) == CONST_INT) { HOST_WIDE_INT c, lsb; c = INTVAL (op); ! /* Reject all zeros. */ if (c == 0) return 0; + /* We don't change the number of transitions by inverting, + so make sure we start with the LS bit zero. */ + if (c & 1) + c = ~c; + /* Find the transition, and check that all bits above are 1's. */ lsb = c & -c; return c == -lsb; } ! return 0; ! } ! ! /* Like mask64_operand, but allow up to three transitions. This ! predicate is used by insn patterns that generate two rldicl or ! rldicr machine insns. */ ! ! int ! mask64_2_operand (op, mode) ! rtx op; ! enum machine_mode mode ATTRIBUTE_UNUSED; ! { ! if (GET_CODE (op) == CONST_INT) { ! HOST_WIDE_INT c, lsb; ! c = INTVAL (op); ! /* Disallow all zeros. */ ! if (c == 0) ! return 0; ! /* We don't change the number of transitions by inverting, ! so make sure we start with the LS bit zero. */ ! if (c & 1) ! c = ~c; ! /* Find the first transition. */ ! lsb = c & -c; ! /* Invert to look for a second transition. */ ! c = ~c; ! ! /* Erase first transition. */ ! c &= -lsb; ! ! /* Find the second transition. */ ! lsb = c & -c; ! ! /* Invert to look for a third transition. */ ! c = ~c; ! ! /* Erase second transition. */ ! c &= -lsb; ! ! /* Find the third transition (if any). */ ! lsb = c & -c; ! ! /* Match if all the bits above are 1's (or c is zero). */ ! return c == -lsb; ! } ! return 0; ! } ! ! /* Generates shifts and masks for a pair of rldicl or rldicr insns to ! implement ANDing by the mask IN. */ ! void ! build_mask64_2_operands (in, out) ! rtx in; ! rtx *out; ! { ! #if HOST_BITS_PER_WIDE_INT >= 64 ! unsigned HOST_WIDE_INT c, lsb, m1, m2; ! int shift; ! ! if (GET_CODE (in) != CONST_INT) ! abort (); ! ! c = INTVAL (in); ! if (c & 1) ! { ! /* Assume c initially something like 0x00fff000000fffff. The idea ! is to rotate the word so that the middle ^^^^^^ group of zeros ! is at the MS end and can be cleared with an rldicl mask. We then ! rotate back and clear off the MS ^^ group of zeros with a ! second rldicl. */ ! c = ~c; /* c == 0xff000ffffff00000 */ ! lsb = c & -c; /* lsb == 0x0000000000100000 */ ! m1 = -lsb; /* m1 == 0xfffffffffff00000 */ ! c = ~c; /* c == 0x00fff000000fffff */ ! c &= -lsb; /* c == 0x00fff00000000000 */ ! lsb = c & -c; /* lsb == 0x0000100000000000 */ ! c = ~c; /* c == 0xff000fffffffffff */ ! c &= -lsb; /* c == 0xff00000000000000 */ ! shift = 0; ! while ((lsb >>= 1) != 0) ! shift++; /* shift == 44 on exit from loop */ ! m1 <<= 64 - shift; /* m1 == 0xffffff0000000000 */ ! m1 = ~m1; /* m1 == 0x000000ffffffffff */ ! m2 = ~c; /* m2 == 0x00ffffffffffffff */ } else ! { ! /* Assume c initially something like 0xff000f0000000000. The idea ! is to rotate the word so that the ^^^ middle group of zeros ! is at the LS end and can be cleared with an rldicr mask. We then ! rotate back and clear off the LS group of ^^^^^^^^^^ zeros with ! a second rldicr. */ ! lsb = c & -c; /* lsb == 0x0000010000000000 */ ! m2 = -lsb; /* m2 == 0xffffff0000000000 */ ! c = ~c; /* c == 0x00fff0ffffffffff */ ! c &= -lsb; /* c == 0x00fff00000000000 */ ! lsb = c & -c; /* lsb == 0x0000100000000000 */ ! c = ~c; /* c == 0xff000fffffffffff */ ! c &= -lsb; /* c == 0xff00000000000000 */ ! shift = 0; ! while ((lsb >>= 1) != 0) ! shift++; /* shift == 44 on exit from loop */ ! m1 = ~c; /* m1 == 0x00ffffffffffffff */ ! m1 >>= shift; /* m1 == 0x0000000000000fff */ ! m1 = ~m1; /* m1 == 0xfffffffffffff000 */ ! } ! ! /* Note that when we only have two 0->1 and 1->0 transitions, one of the ! masks will be all 1's. We are guaranteed more than one transition. */ ! out[0] = GEN_INT (64 - shift); ! out[1] = GEN_INT (m1); ! out[2] = GEN_INT (shift); ! out[3] = GEN_INT (m2); ! #else ! (void)in; ! (void)out; ! abort (); ! #endif } /* Return 1 if the operand is either a non-special register or a constant *************** and64_operand (op, mode) *** 1513,1518 **** --- 1811,1830 ---- return (logical_operand (op, mode) || mask64_operand (op, mode)); } + /* Like the above, but also match constants that can be implemented + with two rldicl or rldicr insns. */ + + int + and64_2_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (fixed_regs[CR0_REGNO]) /* CR0 not available, don't do andi./andis. */ + return gpc_reg_operand (op, mode) || mask64_2_operand (op, mode); + + return logical_operand (op, mode) || mask64_2_operand (op, mode); + } + /* Return 1 if the operand is either a non-special register or a constant that can be used as the operand of an RS/6000 logical AND insn. */ *************** lwa_operand (op, mode) *** 1562,1570 **** || INTVAL (XEXP (XEXP (inner, 0), 1)) % 4 == 0)); } /* Return 1 if the operand, used inside a MEM, is a valid first argument ! to CALL. This is a SYMBOL_REF or a pseudo-register, which will be ! forced to lr. */ int call_operand (op, mode) --- 1874,1894 ---- || INTVAL (XEXP (XEXP (inner, 0), 1)) % 4 == 0)); } + /* Return 1 if the operand, used inside a MEM, is a SYMBOL_REF. */ + + int + symbol_ref_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (mode != VOIDmode && GET_MODE (op) != mode) + return 0; + + return (GET_CODE (op) == SYMBOL_REF); + } + /* Return 1 if the operand, used inside a MEM, is a valid first argument ! to CALL. This is a SYMBOL_REF, a pseudo-register, LR or CTR. */ int call_operand (op, mode) *************** call_operand (op, mode) *** 1575,1581 **** return 0; return (GET_CODE (op) == SYMBOL_REF ! || (GET_CODE (op) == REG && REGNO (op) >= FIRST_PSEUDO_REGISTER)); } /* Return 1 if the operand is a SYMBOL_REF for a function known to be in --- 1899,1908 ---- return 0; return (GET_CODE (op) == SYMBOL_REF ! || (GET_CODE (op) == REG ! && (REGNO (op) == LINK_REGISTER_REGNUM ! || REGNO (op) == COUNT_REGISTER_REGNUM ! || REGNO (op) >= FIRST_PSEUDO_REGISTER))); } /* Return 1 if the operand is a SYMBOL_REF for a function known to be in *************** rs6000_legitimize_address (x, oldx, mode *** 1790,1799 **** { HOST_WIDE_INT high_int, low_int; rtx sum; ! high_int = INTVAL (XEXP (x, 1)) & (~ (HOST_WIDE_INT) 0xffff); ! low_int = INTVAL (XEXP (x, 1)) & 0xffff; ! if (low_int & 0x8000) ! high_int += 0x10000, low_int |= ((HOST_WIDE_INT) -1) << 16; sum = force_operand (gen_rtx_PLUS (Pmode, XEXP (x, 0), GEN_INT (high_int)), 0); return gen_rtx_PLUS (Pmode, sum, GEN_INT (low_int)); --- 2117,2124 ---- { HOST_WIDE_INT high_int, low_int; rtx sum; ! low_int = ((INTVAL (XEXP (x, 1)) & 0xffff) ^ 0x8000) - 0x8000; ! high_int = INTVAL (XEXP (x, 1)) - low_int; sum = force_operand (gen_rtx_PLUS (Pmode, XEXP (x, 0), GEN_INT (high_int)), 0); return gen_rtx_PLUS (Pmode, sum, GEN_INT (low_int)); *************** rs6000_legitimize_address (x, oldx, mode *** 1802,1808 **** && GET_CODE (XEXP (x, 0)) == REG && GET_CODE (XEXP (x, 1)) != CONST_INT && GET_MODE_NUNITS (mode) == 1 ! && (TARGET_HARD_FLOAT || TARGET_POWERPC64 || mode != DFmode) && (TARGET_POWERPC64 || mode != DImode) && mode != TImode) { --- 2127,2135 ---- && GET_CODE (XEXP (x, 0)) == REG && GET_CODE (XEXP (x, 1)) != CONST_INT && GET_MODE_NUNITS (mode) == 1 ! && ((TARGET_HARD_FLOAT && TARGET_FPRS) ! || TARGET_POWERPC64 ! || (mode != DFmode && mode != TFmode)) && (TARGET_POWERPC64 || mode != DImode) && mode != TImode) { *************** rs6000_legitimize_address (x, oldx, mode *** 1821,1833 **** reg = force_reg (Pmode, x); return reg; } else if (TARGET_ELF && TARGET_32BIT && TARGET_NO_TOC && ! flag_pic && GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE && CONSTANT_P (x) && GET_MODE_NUNITS (mode) == 1 && (GET_MODE_BITSIZE (mode) <= 32 ! || (TARGET_HARD_FLOAT && mode == DFmode))) { rtx reg = gen_reg_rtx (Pmode); emit_insn (gen_elf_high (reg, (x))); --- 2148,2181 ---- reg = force_reg (Pmode, x); return reg; } + else if (SPE_VECTOR_MODE (mode)) + { + /* We accept [reg + reg] and [reg + OFFSET]. */ + + if (GET_CODE (x) == PLUS) + { + rtx op1 = XEXP (x, 0); + rtx op2 = XEXP (x, 1); + + op1 = force_reg (Pmode, op1); + + if (GET_CODE (op2) != REG + && (GET_CODE (op2) != CONST_INT + || !SPE_CONST_OFFSET_OK (INTVAL (op2)))) + op2 = force_reg (Pmode, op2); + + return gen_rtx_PLUS (Pmode, op1, op2); + } + + return force_reg (Pmode, x); + } else if (TARGET_ELF && TARGET_32BIT && TARGET_NO_TOC && ! flag_pic && GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE && CONSTANT_P (x) && GET_MODE_NUNITS (mode) == 1 && (GET_MODE_BITSIZE (mode) <= 32 ! || ((TARGET_HARD_FLOAT && TARGET_FPRS) && mode == DFmode))) { rtx reg = gen_reg_rtx (Pmode); emit_insn (gen_elf_high (reg, (x))); *************** rs6000_legitimize_address (x, oldx, mode *** 1838,1844 **** && GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE && CONSTANT_P (x) ! && (TARGET_HARD_FLOAT || mode != DFmode) && mode != DImode && mode != TImode) { --- 2186,2192 ---- && GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE && CONSTANT_P (x) ! && ((TARGET_HARD_FLOAT && TARGET_FPRS) || mode != DFmode) && mode != DImode && mode != TImode) { *************** rs6000_legitimize_reload_address (x, mod *** 1925,1930 **** --- 2273,2279 ---- && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER && REG_MODE_OK_FOR_BASE_P (XEXP (x, 0), mode) && GET_CODE (XEXP (x, 1)) == CONST_INT + && !SPE_VECTOR_MODE (mode) && !ALTIVEC_VECTOR_MODE (mode)) { HOST_WIDE_INT val = INTVAL (XEXP (x, 1)); *************** rs6000_legitimate_address (mode, x, reg_ *** 2013,2018 **** --- 2362,2368 ---- return 1; if ((GET_CODE (x) == PRE_INC || GET_CODE (x) == PRE_DEC) && !ALTIVEC_VECTOR_MODE (mode) + && !SPE_VECTOR_MODE (mode) && TARGET_UPDATE && LEGITIMATE_INDIRECT_ADDRESS_P (XEXP (x, 0), reg_ok_strict)) return 1; *************** rs6000_legitimate_address (mode, x, reg_ *** 2030,2036 **** if (LEGITIMATE_OFFSET_ADDRESS_P (mode, x, reg_ok_strict)) return 1; if (mode != TImode ! && (TARGET_HARD_FLOAT || TARGET_POWERPC64 || mode != DFmode) && (TARGET_POWERPC64 || mode != DImode) && LEGITIMATE_INDEXED_ADDRESS_P (x, reg_ok_strict)) return 1; --- 2380,2388 ---- if (LEGITIMATE_OFFSET_ADDRESS_P (mode, x, reg_ok_strict)) return 1; if (mode != TImode ! && ((TARGET_HARD_FLOAT && TARGET_FPRS) ! || TARGET_POWERPC64 ! || (mode != DFmode && mode != TFmode)) && (TARGET_POWERPC64 || mode != DImode) && LEGITIMATE_INDEXED_ADDRESS_P (x, reg_ok_strict)) return 1; *************** rs6000_emit_set_const (dest, mode, sourc *** 2051,2085 **** enum machine_mode mode; int n ATTRIBUTE_UNUSED; { HOST_WIDE_INT c0, c1; ! if (mode == QImode || mode == HImode || mode == SImode) { if (dest == NULL) dest = gen_reg_rtx (mode); emit_insn (gen_rtx_SET (VOIDmode, dest, source)); return dest; } ! ! if (GET_CODE (source) == CONST_INT) { ! c0 = INTVAL (source); ! c1 = -(c0 < 0); } ! else if (GET_CODE (source) == CONST_DOUBLE) { #if HOST_BITS_PER_WIDE_INT >= 64 ! c0 = CONST_DOUBLE_LOW (source); ! c1 = -(c0 < 0); #else ! c0 = CONST_DOUBLE_LOW (source); ! c1 = CONST_DOUBLE_HIGH (source); #endif } else abort (); ! return rs6000_emit_set_long_const (dest, c0, c1); } /* Having failed to find a 3 insn sequence in rs6000_emit_set_const, --- 2403,2461 ---- enum machine_mode mode; int n ATTRIBUTE_UNUSED; { + rtx result, insn, set; HOST_WIDE_INT c0, c1; ! if (mode == QImode || mode == HImode) { if (dest == NULL) dest = gen_reg_rtx (mode); emit_insn (gen_rtx_SET (VOIDmode, dest, source)); return dest; } ! else if (mode == SImode) { ! result = no_new_pseudos ? dest : gen_reg_rtx (SImode); ! ! emit_insn (gen_rtx_SET (VOIDmode, result, ! GEN_INT (INTVAL (source) ! & (~ (HOST_WIDE_INT) 0xffff)))); ! emit_insn (gen_rtx_SET (VOIDmode, dest, ! gen_rtx_IOR (SImode, result, ! GEN_INT (INTVAL (source) & 0xffff)))); ! result = dest; } ! else if (mode == DImode) { + if (GET_CODE (source) == CONST_INT) + { + c0 = INTVAL (source); + c1 = -(c0 < 0); + } + else if (GET_CODE (source) == CONST_DOUBLE) + { #if HOST_BITS_PER_WIDE_INT >= 64 ! c0 = CONST_DOUBLE_LOW (source); ! c1 = -(c0 < 0); #else ! c0 = CONST_DOUBLE_LOW (source); ! c1 = CONST_DOUBLE_HIGH (source); #endif + } + else + abort (); + + result = rs6000_emit_set_long_const (dest, c0, c1); } else abort (); ! insn = get_last_insn (); ! set = single_set (insn); ! if (! CONSTANT_P (SET_SRC (set))) ! set_unique_reg_note (insn, REG_EQUAL, source); ! ! return result; } /* Having failed to find a 3 insn sequence in rs6000_emit_set_const, *************** rs6000_emit_move (dest, source, mode) *** 2190,2197 **** /* FIXME. This should never happen. */ /* Since it seems that it does, do the safe thing and convert to a CONST_INT. */ ! operands[1] = ! GEN_INT (trunc_int_for_mode (CONST_DOUBLE_LOW (operands[1]), mode)); } if (GET_CODE (operands[1]) == CONST_DOUBLE && ! FLOAT_MODE_P (mode) --- 2566,2572 ---- /* FIXME. This should never happen. */ /* Since it seems that it does, do the safe thing and convert to a CONST_INT. */ ! operands[1] = gen_int_mode (CONST_DOUBLE_LOW (operands[1]), mode); } if (GET_CODE (operands[1]) == CONST_DOUBLE && ! FLOAT_MODE_P (mode) *************** rs6000_emit_move (dest, source, mode) *** 2223,2232 **** return; } ! if (! no_new_pseudos && GET_CODE (operands[0]) != REG) ! operands[1] = force_reg (mode, operands[1]); ! if (mode == SFmode && ! TARGET_POWERPC && TARGET_HARD_FLOAT && GET_CODE (operands[0]) == MEM) { int regnum; --- 2598,2622 ---- return; } ! if (!no_new_pseudos) ! { ! if (GET_CODE (operands[1]) == MEM && optimize > 0 ! && (mode == QImode || mode == HImode || mode == SImode) ! && GET_MODE_SIZE (mode) < GET_MODE_SIZE (word_mode)) ! { ! rtx reg = gen_reg_rtx (word_mode); ! emit_insn (gen_rtx_SET (word_mode, reg, ! gen_rtx_ZERO_EXTEND (word_mode, ! operands[1]))); ! operands[1] = gen_lowpart (mode, reg); ! } ! if (GET_CODE (operands[0]) != REG) ! operands[1] = force_reg (mode, operands[1]); ! } ! ! if (mode == SFmode && ! TARGET_POWERPC ! && TARGET_HARD_FLOAT && TARGET_FPRS && GET_CODE (operands[0]) == MEM) { int regnum; *************** rs6000_emit_move (dest, source, mode) *** 2250,2265 **** } } ! /* Handle the case where reload calls us with an invalid address; ! and the case of CONSTANT_P_RTX. */ ! if (!VECTOR_MODE_P (mode) && (! general_operand (operands[1], mode) ! || ! nonimmediate_operand (operands[0], mode) ! || GET_CODE (operands[1]) == CONSTANT_P_RTX)) ! { ! emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); ! return; ! } /* FIXME: In the long term, this switch statement should go away and be replaced by a sequence of tests based on things like --- 2640,2654 ---- } } ! /* Handle the case where reload calls us with an invalid address. */ ! if (reload_in_progress && mode == Pmode && (! general_operand (operands[1], mode) ! || ! nonimmediate_operand (operands[0], mode))) ! goto emit_set; ! ! /* Handle the case of CONSTANT_P_RTX. */ ! if (GET_CODE (operands[1]) == CONSTANT_P_RTX) ! goto emit_set; /* FIXME: In the long term, this switch statement should go away and be replaced by a sequence of tests based on things like *************** rs6000_emit_move (dest, source, mode) *** 2285,2290 **** --- 2674,2683 ---- case V8HImode: case V4SFmode: case V4SImode: + case V4HImode: + case V2SFmode: + case V2SImode: + case V1DImode: if (CONSTANT_P (operands[1]) && !easy_vector_constant (operands[1])) operands[1] = force_const_mem (mode, operands[1]); *************** rs6000_emit_move (dest, source, mode) *** 2451,2456 **** --- 2844,2859 ---- operands[1] = replace_equiv_address (operands[1], copy_addr_to_reg (XEXP (operands[1], 0))); + if (TARGET_POWER) + { + emit_insn (gen_rtx_PARALLEL (VOIDmode, + gen_rtvec (2, + gen_rtx_SET (VOIDmode, + operands[0], operands[1]), + gen_rtx_CLOBBER (VOIDmode, + gen_rtx_SCRATCH (SImode))))); + return; + } break; default: *************** rs6000_emit_move (dest, source, mode) *** 2460,2472 **** /* Above, we may have called force_const_mem which may have returned an invalid address. If we can, fix this up; otherwise, reload will have to deal with it. */ ! if (GET_CODE (operands[1]) == MEM ! && ! memory_address_p (mode, XEXP (operands[1], 0)) ! && ! reload_in_progress) ! operands[1] = adjust_address (operands[1], mode, 0); emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); - return; } /* Initialize a variable CUM of type CUMULATIVE_ARGS --- 2863,2873 ---- /* Above, we may have called force_const_mem which may have returned an invalid address. If we can, fix this up; otherwise, reload will have to deal with it. */ ! if (GET_CODE (operands[1]) == MEM && ! reload_in_progress) ! operands[1] = validize_mem (operands[1]); + emit_set: emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); } /* Initialize a variable CUM of type CUMULATIVE_ARGS *************** init_cumulative_args (cum, fntype, libna *** 2506,2513 **** cum->orig_nargs = cum->nargs_prototype; ! /* Check for longcall's */ ! if (fntype && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))) cum->call_cookie = CALL_LONG; if (TARGET_DEBUG_ARG) --- 2907,2916 ---- cum->orig_nargs = cum->nargs_prototype; ! /* Check for a longcall attribute. */ ! if (fntype ! && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype)) ! && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))) cum->call_cookie = CALL_LONG; if (TARGET_DEBUG_ARG) *************** function_arg_boundary (mode, type) *** 2568,2573 **** --- 2971,2978 ---- { if (DEFAULT_ABI == ABI_V4 && (mode == DImode || mode == DFmode)) return 64; + else if (SPE_VECTOR_MODE (mode)) + return 64; else if (TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode)) return 128; else *************** function_arg_advance (cum, mode, type, n *** 2594,2602 **** else cum->words += RS6000_ARG_SIZE (mode, type); } else if (DEFAULT_ABI == ABI_V4) { ! if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode)) { if (cum->fregno <= FP_ARG_V4_MAX_REG) --- 2999,3010 ---- else cum->words += RS6000_ARG_SIZE (mode, type); } + else if (TARGET_SPE_ABI && TARGET_SPE && SPE_VECTOR_MODE (mode) + && named && cum->sysv_gregno <= GP_ARG_MAX_REG) + cum->sysv_gregno++; else if (DEFAULT_ABI == ABI_V4) { ! if (TARGET_HARD_FLOAT && TARGET_FPRS && (mode == SFmode || mode == DFmode)) { if (cum->fregno <= FP_ARG_V4_MAX_REG) *************** function_arg_advance (cum, mode, type, n *** 2620,2630 **** else n_words = RS6000_ARG_SIZE (mode, type); ! /* Long long is put in odd registers. */ if (n_words == 2 && (gregno & 1) == 0) gregno += 1; ! /* Long long is not split between registers and stack. */ if (gregno + n_words - 1 > GP_ARG_MAX_REG) { /* Long long is aligned on the stack. */ --- 3028,3039 ---- else n_words = RS6000_ARG_SIZE (mode, type); ! /* Long long and SPE vectors are put in odd registers. */ if (n_words == 2 && (gregno & 1) == 0) gregno += 1; ! /* Long long and SPE vectors are not split between registers ! and stack. */ if (gregno + n_words - 1 > GP_ARG_MAX_REG) { /* Long long is aligned on the stack. */ *************** function_arg_advance (cum, mode, type, n *** 2656,2663 **** cum->words += align + RS6000_ARG_SIZE (mode, type); ! if (GET_MODE_CLASS (mode) == MODE_FLOAT && TARGET_HARD_FLOAT) ! cum->fregno++; if (TARGET_DEBUG_ARG) { --- 3065,3073 ---- cum->words += align + RS6000_ARG_SIZE (mode, type); ! if (GET_MODE_CLASS (mode) == MODE_FLOAT ! && TARGET_HARD_FLOAT && TARGET_FPRS) ! cum->fregno += (mode == TFmode ? 2 : 1); if (TARGET_DEBUG_ARG) { *************** function_arg (cum, mode, type, named) *** 2709,2722 **** if (mode == VOIDmode) { if (abi == ABI_V4 - && TARGET_HARD_FLOAT && cum->nargs_prototype < 0 && type && (cum->prototype || TARGET_NO_PROTOTYPE)) { ! return GEN_INT (cum->call_cookie ! | ((cum->fregno == FP_ARG_MIN_REG) ! ? CALL_V4_SET_FP_ARGS ! : CALL_V4_CLEAR_FP_ARGS)); } return GEN_INT (cum->call_cookie); --- 3119,3135 ---- if (mode == VOIDmode) { if (abi == ABI_V4 && cum->nargs_prototype < 0 && type && (cum->prototype || TARGET_NO_PROTOTYPE)) { ! /* For the SPE, we need to crxor CR6 always. */ ! if (TARGET_SPE_ABI) ! return GEN_INT (cum->call_cookie | CALL_V4_SET_FP_ARGS); ! else if (TARGET_HARD_FLOAT && TARGET_FPRS) ! return GEN_INT (cum->call_cookie ! | ((cum->fregno == FP_ARG_MIN_REG) ! ? CALL_V4_SET_FP_ARGS ! : CALL_V4_CLEAR_FP_ARGS)); } return GEN_INT (cum->call_cookie); *************** function_arg (cum, mode, type, named) *** 2729,2737 **** else return NULL; } else if (abi == ABI_V4) { ! if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode)) { if (cum->fregno <= FP_ARG_V4_MAX_REG) --- 3142,3157 ---- else return NULL; } + else if (TARGET_SPE_ABI && TARGET_SPE && SPE_VECTOR_MODE (mode) && named) + { + if (cum->sysv_gregno <= GP_ARG_MAX_REG) + return gen_rtx_REG (mode, cum->sysv_gregno); + else + return NULL; + } else if (abi == ABI_V4) { ! if (TARGET_HARD_FLOAT && TARGET_FPRS && (mode == SFmode || mode == DFmode)) { if (cum->fregno <= FP_ARG_V4_MAX_REG) *************** function_arg (cum, mode, type, named) *** 2751,2763 **** else n_words = RS6000_ARG_SIZE (mode, type); ! /* Long long is put in odd registers. */ if (n_words == 2 && (gregno & 1) == 0) gregno += 1; ! /* Long long is not split between registers and stack. */ if (gregno + n_words - 1 <= GP_ARG_MAX_REG) ! return gen_rtx_REG (mode, gregno); else return NULL; } --- 3171,3199 ---- else n_words = RS6000_ARG_SIZE (mode, type); ! /* Long long and SPE vectors are put in odd registers. */ if (n_words == 2 && (gregno & 1) == 0) gregno += 1; ! /* Long long and SPE vectors are not split between registers ! and stack. */ if (gregno + n_words - 1 <= GP_ARG_MAX_REG) ! { ! /* SPE vectors in ... get split into 2 registers. */ ! if (TARGET_SPE && TARGET_SPE_ABI ! && SPE_VECTOR_MODE (mode) && !named) ! { ! rtx r1, r2; ! enum machine_mode m = SImode; ! ! r1 = gen_rtx_REG (m, gregno); ! r1 = gen_rtx_EXPR_LIST (m, r1, const0_rtx); ! r2 = gen_rtx_REG (m, gregno + 1); ! r2 = gen_rtx_EXPR_LIST (m, r2, GEN_INT (4)); ! return gen_rtx_PARALLEL (mode, gen_rtvec (2, r1, r2)); ! } ! return gen_rtx_REG (mode, gregno); ! } else return NULL; } *************** function_arg_partial_nregs (cum, mode, t *** 2850,2856 **** the argument itself. The pointer is passed in whatever way is appropriate for passing a pointer to that type. ! Under V.4, structures and unions are passed by reference. */ int function_arg_pass_by_reference (cum, mode, type, named) --- 3286,3295 ---- the argument itself. The pointer is passed in whatever way is appropriate for passing a pointer to that type. ! Under V.4, structures and unions are passed by reference. ! ! As an extension to all ABIs, variable sized types are passed by ! reference. */ int function_arg_pass_by_reference (cum, mode, type, named) *************** function_arg_pass_by_reference (cum, mod *** 2868,2875 **** return 1; } ! ! return 0; } /* Perform any needed actions needed for a function that is receiving a --- 3307,3313 ---- return 1; } ! return type && int_size_in_bytes (type) <= 0; } /* Perform any needed actions needed for a function that is receiving a *************** setup_incoming_varargs (cum, mode, type, *** 2916,2923 **** if (DEFAULT_ABI == ABI_V4) { /* Indicate to allocate space on the stack for varargs save area. */ - /* ??? Does this really have to be located at a magic spot on the - stack, or can we allocate this with assign_stack_local instead. */ cfun->machine->sysv_varargs_p = 1; if (! no_rtl) save_area = plus_constant (virtual_stack_vars_rtx, --- 3354,3359 ---- *************** setup_incoming_varargs (cum, mode, type, *** 2955,2961 **** /* Save FP registers if needed. */ if (DEFAULT_ABI == ABI_V4 ! && TARGET_HARD_FLOAT && ! no_rtl && next_cum.fregno <= FP_ARG_V4_MAX_REG) { int fregno = next_cum.fregno; --- 3391,3398 ---- /* Save FP registers if needed. */ if (DEFAULT_ABI == ABI_V4 ! && TARGET_HARD_FLOAT && TARGET_FPRS ! && ! no_rtl && next_cum.fregno <= FP_ARG_V4_MAX_REG) { int fregno = next_cum.fregno; *************** rs6000_build_va_list () *** 2996,3002 **** if (DEFAULT_ABI != ABI_V4) return build_pointer_type (char_type_node); ! record = make_lang_type (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); f_gpr = build_decl (FIELD_DECL, get_identifier ("gpr"), --- 3433,3439 ---- if (DEFAULT_ABI != ABI_V4) return build_pointer_type (char_type_node); ! record = (*lang_hooks.types.make_type) (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); f_gpr = build_decl (FIELD_DECL, get_identifier ("gpr"), *************** rs6000_build_va_list () *** 3029,3036 **** /* Implement va_start. */ void ! rs6000_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg; { --- 3466,3472 ---- /* Implement va_start. */ void ! rs6000_va_start (valist, nextarg) tree valist; rtx nextarg; { *************** rs6000_va_start (stdarg_p, valist, nexta *** 3041,3047 **** /* Only SVR4 needs something special. */ if (DEFAULT_ABI != ABI_V4) { ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); return; } --- 3477,3483 ---- /* Only SVR4 needs something special. */ if (DEFAULT_ABI != ABI_V4) { ! std_expand_builtin_va_start (valist, nextarg); return; } *************** rs6000_va_arg (valist, type) *** 3109,3121 **** int indirect_p, size, rsize, n_reg, sav_ofs, sav_scale; rtx lab_false, lab_over, addr_rtx, r; - /* For AIX, the rule is that structures are passed left-aligned in - their stack slot. However, GCC does not presently do this: - structures which are the same size as integer types are passed - right-aligned, as if they were in fact integers. This only - matters for structures of size 1 or 2, or 4 when TARGET_64BIT. */ if (DEFAULT_ABI != ABI_V4) ! return std_expand_builtin_va_arg (valist, type); f_gpr = TYPE_FIELDS (TREE_TYPE (va_list_type_node)); f_fpr = TREE_CHAIN (f_gpr); --- 3545,3573 ---- int indirect_p, size, rsize, n_reg, sav_ofs, sav_scale; rtx lab_false, lab_over, addr_rtx, r; if (DEFAULT_ABI != ABI_V4) ! { ! /* Variable sized types are passed by reference. */ ! if (int_size_in_bytes (type) <= 0) ! { ! u = build_pointer_type (type); ! ! /* Args grow upward. */ ! t = build (POSTINCREMENT_EXPR, TREE_TYPE (valist), valist, ! build_int_2 (POINTER_SIZE / BITS_PER_UNIT, 0)); ! TREE_SIDE_EFFECTS (t) = 1; ! ! t = build1 (NOP_EXPR, build_pointer_type (u), t); ! TREE_SIDE_EFFECTS (t) = 1; ! ! t = build1 (INDIRECT_REF, u, t); ! TREE_SIDE_EFFECTS (t) = 1; ! ! return expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL); ! } ! else ! return std_expand_builtin_va_arg (valist, type); ! } f_gpr = TYPE_FIELDS (TREE_TYPE (va_list_type_node)); f_fpr = TREE_CHAIN (f_gpr); *************** rs6000_va_arg (valist, type) *** 3142,3148 **** size = UNITS_PER_WORD; rsize = 1; } ! else if (FLOAT_TYPE_P (type) && ! TARGET_SOFT_FLOAT) { /* FP args go in FP registers, if present. */ indirect_p = 0; --- 3594,3600 ---- size = UNITS_PER_WORD; rsize = 1; } ! else if (FLOAT_TYPE_P (type) && TARGET_HARD_FLOAT && TARGET_FPRS) { /* FP args go in FP registers, if present. */ indirect_p = 0; *************** rs6000_va_arg (valist, type) *** 3167,3174 **** lab_over = gen_label_rtx (); addr_rtx = gen_reg_rtx (Pmode); ! /* Vectors never go in registers. */ ! if (TREE_CODE (type) != VECTOR_TYPE) { TREE_THIS_VOLATILE (reg) = 1; emit_cmp_and_jump_insns --- 3619,3626 ---- lab_over = gen_label_rtx (); addr_rtx = gen_reg_rtx (Pmode); ! /* AltiVec vectors never go in registers. */ ! if (!TARGET_ALTIVEC || TREE_CODE (type) != VECTOR_TYPE) { TREE_THIS_VOLATILE (reg) = 1; emit_cmp_and_jump_insns *************** rs6000_va_arg (valist, type) *** 3222,3228 **** All AltiVec vectors go in the overflow area. So in the AltiVec case we need to get the vectors from the overflow area, but remember where the GPRs and FPRs are. */ ! if (n_reg > 1 && TREE_CODE (type) != VECTOR_TYPE) { t = build (MODIFY_EXPR, TREE_TYPE (reg), reg, build_int_2 (8, 0)); TREE_SIDE_EFFECTS (t) = 1; --- 3674,3681 ---- All AltiVec vectors go in the overflow area. So in the AltiVec case we need to get the vectors from the overflow area, but remember where the GPRs and FPRs are. */ ! if (n_reg > 1 && (TREE_CODE (type) != VECTOR_TYPE ! || !TARGET_ALTIVEC)) { t = build (MODIFY_EXPR, TREE_TYPE (reg), reg, build_int_2 (8, 0)); TREE_SIDE_EFFECTS (t) = 1; *************** rs6000_va_arg (valist, type) *** 3236,3243 **** { int align; ! /* Vectors are 16 byte aligned. */ ! if (TREE_CODE (type) == VECTOR_TYPE) align = 15; else align = 7; --- 3689,3696 ---- { int align; ! /* AltiVec vectors are 16 byte aligned. */ ! if (TARGET_ALTIVEC && TREE_CODE (type) == VECTOR_TYPE) align = 15; else align = 7; *************** rs6000_va_arg (valist, type) *** 3270,3289 **** /* Builtins. */ ! #define def_builtin(MASK, NAME, TYPE, CODE) \ ! do { \ ! if ((MASK) & target_flags) \ ! builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL); \ } while (0) - struct builtin_description - { - const unsigned int mask; - const enum insn_code icode; - const char *const name; - const enum rs6000_builtins code; - }; - /* Simple ternary operations: VECd = foo (VECa, VECb, VECc). */ static const struct builtin_description bdesc_3arg[] = --- 3723,3735 ---- /* Builtins. */ ! #define def_builtin(MASK, NAME, TYPE, CODE) \ ! do { \ ! if ((MASK) & target_flags) \ ! builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \ ! NULL, NULL_TREE); \ } while (0) /* Simple ternary operations: VECd = foo (VECa, VECb, VECc). */ static const struct builtin_description bdesc_3arg[] = *************** static const struct builtin_description *** 3325,3331 **** /* Simple binary operations: VECc = foo (VECa, VECb). */ ! static const struct builtin_description bdesc_2arg[] = { { MASK_ALTIVEC, CODE_FOR_addv16qi3, "__builtin_altivec_vaddubm", ALTIVEC_BUILTIN_VADDUBM }, { MASK_ALTIVEC, CODE_FOR_addv8hi3, "__builtin_altivec_vadduhm", ALTIVEC_BUILTIN_VADDUHM }, --- 3771,3777 ---- /* Simple binary operations: VECc = foo (VECa, VECb). */ ! static struct builtin_description bdesc_2arg[] = { { MASK_ALTIVEC, CODE_FOR_addv16qi3, "__builtin_altivec_vaddubm", ALTIVEC_BUILTIN_VADDUBM }, { MASK_ALTIVEC, CODE_FOR_addv8hi3, "__builtin_altivec_vadduhm", ALTIVEC_BUILTIN_VADDUHM }, *************** static const struct builtin_description *** 3365,3375 **** { MASK_ALTIVEC, CODE_FOR_altivec_vctuxs, "__builtin_altivec_vctuxs", ALTIVEC_BUILTIN_VCTUXS }, { MASK_ALTIVEC, CODE_FOR_umaxv16qi3, "__builtin_altivec_vmaxub", ALTIVEC_BUILTIN_VMAXUB }, { MASK_ALTIVEC, CODE_FOR_smaxv16qi3, "__builtin_altivec_vmaxsb", ALTIVEC_BUILTIN_VMAXSB }, ! { MASK_ALTIVEC, CODE_FOR_uminv8hi3, "__builtin_altivec_vmaxuh", ALTIVEC_BUILTIN_VMAXUH }, ! { MASK_ALTIVEC, CODE_FOR_sminv8hi3, "__builtin_altivec_vmaxsh", ALTIVEC_BUILTIN_VMAXSH }, ! { MASK_ALTIVEC, CODE_FOR_uminv4si3, "__builtin_altivec_vmaxuw", ALTIVEC_BUILTIN_VMAXUW }, ! { MASK_ALTIVEC, CODE_FOR_sminv4si3, "__builtin_altivec_vmaxsw", ALTIVEC_BUILTIN_VMAXSW }, ! { MASK_ALTIVEC, CODE_FOR_sminv4sf3, "__builtin_altivec_vmaxfp", ALTIVEC_BUILTIN_VMAXFP }, { MASK_ALTIVEC, CODE_FOR_altivec_vmrghb, "__builtin_altivec_vmrghb", ALTIVEC_BUILTIN_VMRGHB }, { MASK_ALTIVEC, CODE_FOR_altivec_vmrghh, "__builtin_altivec_vmrghh", ALTIVEC_BUILTIN_VMRGHH }, { MASK_ALTIVEC, CODE_FOR_altivec_vmrghw, "__builtin_altivec_vmrghw", ALTIVEC_BUILTIN_VMRGHW }, --- 3811,3821 ---- { MASK_ALTIVEC, CODE_FOR_altivec_vctuxs, "__builtin_altivec_vctuxs", ALTIVEC_BUILTIN_VCTUXS }, { MASK_ALTIVEC, CODE_FOR_umaxv16qi3, "__builtin_altivec_vmaxub", ALTIVEC_BUILTIN_VMAXUB }, { MASK_ALTIVEC, CODE_FOR_smaxv16qi3, "__builtin_altivec_vmaxsb", ALTIVEC_BUILTIN_VMAXSB }, ! { MASK_ALTIVEC, CODE_FOR_umaxv8hi3, "__builtin_altivec_vmaxuh", ALTIVEC_BUILTIN_VMAXUH }, ! { MASK_ALTIVEC, CODE_FOR_smaxv8hi3, "__builtin_altivec_vmaxsh", ALTIVEC_BUILTIN_VMAXSH }, ! { MASK_ALTIVEC, CODE_FOR_umaxv4si3, "__builtin_altivec_vmaxuw", ALTIVEC_BUILTIN_VMAXUW }, ! { MASK_ALTIVEC, CODE_FOR_smaxv4si3, "__builtin_altivec_vmaxsw", ALTIVEC_BUILTIN_VMAXSW }, ! { MASK_ALTIVEC, CODE_FOR_smaxv4sf3, "__builtin_altivec_vmaxfp", ALTIVEC_BUILTIN_VMAXFP }, { MASK_ALTIVEC, CODE_FOR_altivec_vmrghb, "__builtin_altivec_vmrghb", ALTIVEC_BUILTIN_VMRGHB }, { MASK_ALTIVEC, CODE_FOR_altivec_vmrghh, "__builtin_altivec_vmrghh", ALTIVEC_BUILTIN_VMRGHH }, { MASK_ALTIVEC, CODE_FOR_altivec_vmrghw, "__builtin_altivec_vmrghw", ALTIVEC_BUILTIN_VMRGHW }, *************** static const struct builtin_description *** 3440,3445 **** --- 3886,4035 ---- { MASK_ALTIVEC, CODE_FOR_altivec_vsum2sws, "__builtin_altivec_vsum2sws", ALTIVEC_BUILTIN_VSUM2SWS }, { MASK_ALTIVEC, CODE_FOR_altivec_vsumsws, "__builtin_altivec_vsumsws", ALTIVEC_BUILTIN_VSUMSWS }, { MASK_ALTIVEC, CODE_FOR_xorv4si3, "__builtin_altivec_vxor", ALTIVEC_BUILTIN_VXOR }, + + /* Place holder, leave as first spe builtin. */ + { 0, CODE_FOR_spe_evaddw, "__builtin_spe_evaddw", SPE_BUILTIN_EVADDW }, + { 0, CODE_FOR_spe_evand, "__builtin_spe_evand", SPE_BUILTIN_EVAND }, + { 0, CODE_FOR_spe_evandc, "__builtin_spe_evandc", SPE_BUILTIN_EVANDC }, + { 0, CODE_FOR_spe_evdivws, "__builtin_spe_evdivws", SPE_BUILTIN_EVDIVWS }, + { 0, CODE_FOR_spe_evdivwu, "__builtin_spe_evdivwu", SPE_BUILTIN_EVDIVWU }, + { 0, CODE_FOR_spe_eveqv, "__builtin_spe_eveqv", SPE_BUILTIN_EVEQV }, + { 0, CODE_FOR_spe_evfsadd, "__builtin_spe_evfsadd", SPE_BUILTIN_EVFSADD }, + { 0, CODE_FOR_spe_evfsdiv, "__builtin_spe_evfsdiv", SPE_BUILTIN_EVFSDIV }, + { 0, CODE_FOR_spe_evfsmul, "__builtin_spe_evfsmul", SPE_BUILTIN_EVFSMUL }, + { 0, CODE_FOR_spe_evfssub, "__builtin_spe_evfssub", SPE_BUILTIN_EVFSSUB }, + { 0, CODE_FOR_spe_evmergehi, "__builtin_spe_evmergehi", SPE_BUILTIN_EVMERGEHI }, + { 0, CODE_FOR_spe_evmergehilo, "__builtin_spe_evmergehilo", SPE_BUILTIN_EVMERGEHILO }, + { 0, CODE_FOR_spe_evmergelo, "__builtin_spe_evmergelo", SPE_BUILTIN_EVMERGELO }, + { 0, CODE_FOR_spe_evmergelohi, "__builtin_spe_evmergelohi", SPE_BUILTIN_EVMERGELOHI }, + { 0, CODE_FOR_spe_evmhegsmfaa, "__builtin_spe_evmhegsmfaa", SPE_BUILTIN_EVMHEGSMFAA }, + { 0, CODE_FOR_spe_evmhegsmfan, "__builtin_spe_evmhegsmfan", SPE_BUILTIN_EVMHEGSMFAN }, + { 0, CODE_FOR_spe_evmhegsmiaa, "__builtin_spe_evmhegsmiaa", SPE_BUILTIN_EVMHEGSMIAA }, + { 0, CODE_FOR_spe_evmhegsmian, "__builtin_spe_evmhegsmian", SPE_BUILTIN_EVMHEGSMIAN }, + { 0, CODE_FOR_spe_evmhegumiaa, "__builtin_spe_evmhegumiaa", SPE_BUILTIN_EVMHEGUMIAA }, + { 0, CODE_FOR_spe_evmhegumian, "__builtin_spe_evmhegumian", SPE_BUILTIN_EVMHEGUMIAN }, + { 0, CODE_FOR_spe_evmhesmf, "__builtin_spe_evmhesmf", SPE_BUILTIN_EVMHESMF }, + { 0, CODE_FOR_spe_evmhesmfa, "__builtin_spe_evmhesmfa", SPE_BUILTIN_EVMHESMFA }, + { 0, CODE_FOR_spe_evmhesmfaaw, "__builtin_spe_evmhesmfaaw", SPE_BUILTIN_EVMHESMFAAW }, + { 0, CODE_FOR_spe_evmhesmfanw, "__builtin_spe_evmhesmfanw", SPE_BUILTIN_EVMHESMFANW }, + { 0, CODE_FOR_spe_evmhesmi, "__builtin_spe_evmhesmi", SPE_BUILTIN_EVMHESMI }, + { 0, CODE_FOR_spe_evmhesmia, "__builtin_spe_evmhesmia", SPE_BUILTIN_EVMHESMIA }, + { 0, CODE_FOR_spe_evmhesmiaaw, "__builtin_spe_evmhesmiaaw", SPE_BUILTIN_EVMHESMIAAW }, + { 0, CODE_FOR_spe_evmhesmianw, "__builtin_spe_evmhesmianw", SPE_BUILTIN_EVMHESMIANW }, + { 0, CODE_FOR_spe_evmhessf, "__builtin_spe_evmhessf", SPE_BUILTIN_EVMHESSF }, + { 0, CODE_FOR_spe_evmhessfa, "__builtin_spe_evmhessfa", SPE_BUILTIN_EVMHESSFA }, + { 0, CODE_FOR_spe_evmhessfaaw, "__builtin_spe_evmhessfaaw", SPE_BUILTIN_EVMHESSFAAW }, + { 0, CODE_FOR_spe_evmhessfanw, "__builtin_spe_evmhessfanw", SPE_BUILTIN_EVMHESSFANW }, + { 0, CODE_FOR_spe_evmhessiaaw, "__builtin_spe_evmhessiaaw", SPE_BUILTIN_EVMHESSIAAW }, + { 0, CODE_FOR_spe_evmhessianw, "__builtin_spe_evmhessianw", SPE_BUILTIN_EVMHESSIANW }, + { 0, CODE_FOR_spe_evmheumi, "__builtin_spe_evmheumi", SPE_BUILTIN_EVMHEUMI }, + { 0, CODE_FOR_spe_evmheumia, "__builtin_spe_evmheumia", SPE_BUILTIN_EVMHEUMIA }, + { 0, CODE_FOR_spe_evmheumiaaw, "__builtin_spe_evmheumiaaw", SPE_BUILTIN_EVMHEUMIAAW }, + { 0, CODE_FOR_spe_evmheumianw, "__builtin_spe_evmheumianw", SPE_BUILTIN_EVMHEUMIANW }, + { 0, CODE_FOR_spe_evmheusiaaw, "__builtin_spe_evmheusiaaw", SPE_BUILTIN_EVMHEUSIAAW }, + { 0, CODE_FOR_spe_evmheusianw, "__builtin_spe_evmheusianw", SPE_BUILTIN_EVMHEUSIANW }, + { 0, CODE_FOR_spe_evmhogsmfaa, "__builtin_spe_evmhogsmfaa", SPE_BUILTIN_EVMHOGSMFAA }, + { 0, CODE_FOR_spe_evmhogsmfan, "__builtin_spe_evmhogsmfan", SPE_BUILTIN_EVMHOGSMFAN }, + { 0, CODE_FOR_spe_evmhogsmiaa, "__builtin_spe_evmhogsmiaa", SPE_BUILTIN_EVMHOGSMIAA }, + { 0, CODE_FOR_spe_evmhogsmian, "__builtin_spe_evmhogsmian", SPE_BUILTIN_EVMHOGSMIAN }, + { 0, CODE_FOR_spe_evmhogumiaa, "__builtin_spe_evmhogumiaa", SPE_BUILTIN_EVMHOGUMIAA }, + { 0, CODE_FOR_spe_evmhogumian, "__builtin_spe_evmhogumian", SPE_BUILTIN_EVMHOGUMIAN }, + { 0, CODE_FOR_spe_evmhosmf, "__builtin_spe_evmhosmf", SPE_BUILTIN_EVMHOSMF }, + { 0, CODE_FOR_spe_evmhosmfa, "__builtin_spe_evmhosmfa", SPE_BUILTIN_EVMHOSMFA }, + { 0, CODE_FOR_spe_evmhosmfaaw, "__builtin_spe_evmhosmfaaw", SPE_BUILTIN_EVMHOSMFAAW }, + { 0, CODE_FOR_spe_evmhosmfanw, "__builtin_spe_evmhosmfanw", SPE_BUILTIN_EVMHOSMFANW }, + { 0, CODE_FOR_spe_evmhosmi, "__builtin_spe_evmhosmi", SPE_BUILTIN_EVMHOSMI }, + { 0, CODE_FOR_spe_evmhosmia, "__builtin_spe_evmhosmia", SPE_BUILTIN_EVMHOSMIA }, + { 0, CODE_FOR_spe_evmhosmiaaw, "__builtin_spe_evmhosmiaaw", SPE_BUILTIN_EVMHOSMIAAW }, + { 0, CODE_FOR_spe_evmhosmianw, "__builtin_spe_evmhosmianw", SPE_BUILTIN_EVMHOSMIANW }, + { 0, CODE_FOR_spe_evmhossf, "__builtin_spe_evmhossf", SPE_BUILTIN_EVMHOSSF }, + { 0, CODE_FOR_spe_evmhossfa, "__builtin_spe_evmhossfa", SPE_BUILTIN_EVMHOSSFA }, + { 0, CODE_FOR_spe_evmhossfaaw, "__builtin_spe_evmhossfaaw", SPE_BUILTIN_EVMHOSSFAAW }, + { 0, CODE_FOR_spe_evmhossfanw, "__builtin_spe_evmhossfanw", SPE_BUILTIN_EVMHOSSFANW }, + { 0, CODE_FOR_spe_evmhossiaaw, "__builtin_spe_evmhossiaaw", SPE_BUILTIN_EVMHOSSIAAW }, + { 0, CODE_FOR_spe_evmhossianw, "__builtin_spe_evmhossianw", SPE_BUILTIN_EVMHOSSIANW }, + { 0, CODE_FOR_spe_evmhoumi, "__builtin_spe_evmhoumi", SPE_BUILTIN_EVMHOUMI }, + { 0, CODE_FOR_spe_evmhoumia, "__builtin_spe_evmhoumia", SPE_BUILTIN_EVMHOUMIA }, + { 0, CODE_FOR_spe_evmhoumiaaw, "__builtin_spe_evmhoumiaaw", SPE_BUILTIN_EVMHOUMIAAW }, + { 0, CODE_FOR_spe_evmhoumianw, "__builtin_spe_evmhoumianw", SPE_BUILTIN_EVMHOUMIANW }, + { 0, CODE_FOR_spe_evmhousiaaw, "__builtin_spe_evmhousiaaw", SPE_BUILTIN_EVMHOUSIAAW }, + { 0, CODE_FOR_spe_evmhousianw, "__builtin_spe_evmhousianw", SPE_BUILTIN_EVMHOUSIANW }, + { 0, CODE_FOR_spe_evmwhsmf, "__builtin_spe_evmwhsmf", SPE_BUILTIN_EVMWHSMF }, + { 0, CODE_FOR_spe_evmwhsmfa, "__builtin_spe_evmwhsmfa", SPE_BUILTIN_EVMWHSMFA }, + { 0, CODE_FOR_spe_evmwhsmi, "__builtin_spe_evmwhsmi", SPE_BUILTIN_EVMWHSMI }, + { 0, CODE_FOR_spe_evmwhsmia, "__builtin_spe_evmwhsmia", SPE_BUILTIN_EVMWHSMIA }, + { 0, CODE_FOR_spe_evmwhssf, "__builtin_spe_evmwhssf", SPE_BUILTIN_EVMWHSSF }, + { 0, CODE_FOR_spe_evmwhssfa, "__builtin_spe_evmwhssfa", SPE_BUILTIN_EVMWHSSFA }, + { 0, CODE_FOR_spe_evmwhumi, "__builtin_spe_evmwhumi", SPE_BUILTIN_EVMWHUMI }, + { 0, CODE_FOR_spe_evmwhumia, "__builtin_spe_evmwhumia", SPE_BUILTIN_EVMWHUMIA }, + { 0, CODE_FOR_spe_evmwlsmiaaw, "__builtin_spe_evmwlsmiaaw", SPE_BUILTIN_EVMWLSMIAAW }, + { 0, CODE_FOR_spe_evmwlsmianw, "__builtin_spe_evmwlsmianw", SPE_BUILTIN_EVMWLSMIANW }, + { 0, CODE_FOR_spe_evmwlssiaaw, "__builtin_spe_evmwlssiaaw", SPE_BUILTIN_EVMWLSSIAAW }, + { 0, CODE_FOR_spe_evmwlssianw, "__builtin_spe_evmwlssianw", SPE_BUILTIN_EVMWLSSIANW }, + { 0, CODE_FOR_spe_evmwlumi, "__builtin_spe_evmwlumi", SPE_BUILTIN_EVMWLUMI }, + { 0, CODE_FOR_spe_evmwlumia, "__builtin_spe_evmwlumia", SPE_BUILTIN_EVMWLUMIA }, + { 0, CODE_FOR_spe_evmwlumiaaw, "__builtin_spe_evmwlumiaaw", SPE_BUILTIN_EVMWLUMIAAW }, + { 0, CODE_FOR_spe_evmwlumianw, "__builtin_spe_evmwlumianw", SPE_BUILTIN_EVMWLUMIANW }, + { 0, CODE_FOR_spe_evmwlusiaaw, "__builtin_spe_evmwlusiaaw", SPE_BUILTIN_EVMWLUSIAAW }, + { 0, CODE_FOR_spe_evmwlusianw, "__builtin_spe_evmwlusianw", SPE_BUILTIN_EVMWLUSIANW }, + { 0, CODE_FOR_spe_evmwsmf, "__builtin_spe_evmwsmf", SPE_BUILTIN_EVMWSMF }, + { 0, CODE_FOR_spe_evmwsmfa, "__builtin_spe_evmwsmfa", SPE_BUILTIN_EVMWSMFA }, + { 0, CODE_FOR_spe_evmwsmfaa, "__builtin_spe_evmwsmfaa", SPE_BUILTIN_EVMWSMFAA }, + { 0, CODE_FOR_spe_evmwsmfan, "__builtin_spe_evmwsmfan", SPE_BUILTIN_EVMWSMFAN }, + { 0, CODE_FOR_spe_evmwsmi, "__builtin_spe_evmwsmi", SPE_BUILTIN_EVMWSMI }, + { 0, CODE_FOR_spe_evmwsmia, "__builtin_spe_evmwsmia", SPE_BUILTIN_EVMWSMIA }, + { 0, CODE_FOR_spe_evmwsmiaa, "__builtin_spe_evmwsmiaa", SPE_BUILTIN_EVMWSMIAA }, + { 0, CODE_FOR_spe_evmwsmian, "__builtin_spe_evmwsmian", SPE_BUILTIN_EVMWSMIAN }, + { 0, CODE_FOR_spe_evmwssf, "__builtin_spe_evmwssf", SPE_BUILTIN_EVMWSSF }, + { 0, CODE_FOR_spe_evmwssfa, "__builtin_spe_evmwssfa", SPE_BUILTIN_EVMWSSFA }, + { 0, CODE_FOR_spe_evmwssfaa, "__builtin_spe_evmwssfaa", SPE_BUILTIN_EVMWSSFAA }, + { 0, CODE_FOR_spe_evmwssfan, "__builtin_spe_evmwssfan", SPE_BUILTIN_EVMWSSFAN }, + { 0, CODE_FOR_spe_evmwumi, "__builtin_spe_evmwumi", SPE_BUILTIN_EVMWUMI }, + { 0, CODE_FOR_spe_evmwumia, "__builtin_spe_evmwumia", SPE_BUILTIN_EVMWUMIA }, + { 0, CODE_FOR_spe_evmwumiaa, "__builtin_spe_evmwumiaa", SPE_BUILTIN_EVMWUMIAA }, + { 0, CODE_FOR_spe_evmwumian, "__builtin_spe_evmwumian", SPE_BUILTIN_EVMWUMIAN }, + { 0, CODE_FOR_spe_evnand, "__builtin_spe_evnand", SPE_BUILTIN_EVNAND }, + { 0, CODE_FOR_spe_evnor, "__builtin_spe_evnor", SPE_BUILTIN_EVNOR }, + { 0, CODE_FOR_spe_evor, "__builtin_spe_evor", SPE_BUILTIN_EVOR }, + { 0, CODE_FOR_spe_evorc, "__builtin_spe_evorc", SPE_BUILTIN_EVORC }, + { 0, CODE_FOR_spe_evrlw, "__builtin_spe_evrlw", SPE_BUILTIN_EVRLW }, + { 0, CODE_FOR_spe_evslw, "__builtin_spe_evslw", SPE_BUILTIN_EVSLW }, + { 0, CODE_FOR_spe_evsrws, "__builtin_spe_evsrws", SPE_BUILTIN_EVSRWS }, + { 0, CODE_FOR_spe_evsrwu, "__builtin_spe_evsrwu", SPE_BUILTIN_EVSRWU }, + { 0, CODE_FOR_spe_evsubfw, "__builtin_spe_evsubfw", SPE_BUILTIN_EVSUBFW }, + + /* SPE binary operations expecting a 5-bit unsigned literal. */ + { 0, CODE_FOR_spe_evaddiw, "__builtin_spe_evaddiw", SPE_BUILTIN_EVADDIW }, + + { 0, CODE_FOR_spe_evrlwi, "__builtin_spe_evrlwi", SPE_BUILTIN_EVRLWI }, + { 0, CODE_FOR_spe_evslwi, "__builtin_spe_evslwi", SPE_BUILTIN_EVSLWI }, + { 0, CODE_FOR_spe_evsrwis, "__builtin_spe_evsrwis", SPE_BUILTIN_EVSRWIS }, + { 0, CODE_FOR_spe_evsrwiu, "__builtin_spe_evsrwiu", SPE_BUILTIN_EVSRWIU }, + { 0, CODE_FOR_spe_evsubifw, "__builtin_spe_evsubifw", SPE_BUILTIN_EVSUBIFW }, + { 0, CODE_FOR_spe_evmwhssfaa, "__builtin_spe_evmwhssfaa", SPE_BUILTIN_EVMWHSSFAA }, + { 0, CODE_FOR_spe_evmwhssmaa, "__builtin_spe_evmwhssmaa", SPE_BUILTIN_EVMWHSSMAA }, + { 0, CODE_FOR_spe_evmwhsmfaa, "__builtin_spe_evmwhsmfaa", SPE_BUILTIN_EVMWHSMFAA }, + { 0, CODE_FOR_spe_evmwhsmiaa, "__builtin_spe_evmwhsmiaa", SPE_BUILTIN_EVMWHSMIAA }, + { 0, CODE_FOR_spe_evmwhusiaa, "__builtin_spe_evmwhusiaa", SPE_BUILTIN_EVMWHUSIAA }, + { 0, CODE_FOR_spe_evmwhumiaa, "__builtin_spe_evmwhumiaa", SPE_BUILTIN_EVMWHUMIAA }, + { 0, CODE_FOR_spe_evmwhssfan, "__builtin_spe_evmwhssfan", SPE_BUILTIN_EVMWHSSFAN }, + { 0, CODE_FOR_spe_evmwhssian, "__builtin_spe_evmwhssian", SPE_BUILTIN_EVMWHSSIAN }, + { 0, CODE_FOR_spe_evmwhsmfan, "__builtin_spe_evmwhsmfan", SPE_BUILTIN_EVMWHSMFAN }, + { 0, CODE_FOR_spe_evmwhsmian, "__builtin_spe_evmwhsmian", SPE_BUILTIN_EVMWHSMIAN }, + { 0, CODE_FOR_spe_evmwhusian, "__builtin_spe_evmwhusian", SPE_BUILTIN_EVMWHUSIAN }, + { 0, CODE_FOR_spe_evmwhumian, "__builtin_spe_evmwhumian", SPE_BUILTIN_EVMWHUMIAN }, + { 0, CODE_FOR_spe_evmwhgssfaa, "__builtin_spe_evmwhgssfaa", SPE_BUILTIN_EVMWHGSSFAA }, + { 0, CODE_FOR_spe_evmwhgsmfaa, "__builtin_spe_evmwhgsmfaa", SPE_BUILTIN_EVMWHGSMFAA }, + { 0, CODE_FOR_spe_evmwhgsmiaa, "__builtin_spe_evmwhgsmiaa", SPE_BUILTIN_EVMWHGSMIAA }, + { 0, CODE_FOR_spe_evmwhgumiaa, "__builtin_spe_evmwhgumiaa", SPE_BUILTIN_EVMWHGUMIAA }, + { 0, CODE_FOR_spe_evmwhgssfan, "__builtin_spe_evmwhgssfan", SPE_BUILTIN_EVMWHGSSFAN }, + { 0, CODE_FOR_spe_evmwhgsmfan, "__builtin_spe_evmwhgsmfan", SPE_BUILTIN_EVMWHGSMFAN }, + { 0, CODE_FOR_spe_evmwhgsmian, "__builtin_spe_evmwhgsmian", SPE_BUILTIN_EVMWHGSMIAN }, + { 0, CODE_FOR_spe_evmwhgumian, "__builtin_spe_evmwhgumian", SPE_BUILTIN_EVMWHGUMIAN }, + { 0, CODE_FOR_spe_brinc, "__builtin_spe_brinc", SPE_BUILTIN_BRINC }, + + /* Place-holder. Leave as last binary SPE builtin. */ + { 0, CODE_FOR_spe_evxor, "__builtin_spe_evxor", SPE_BUILTIN_EVXOR }, }; /* AltiVec predicates. */ *************** static const struct builtin_description_ *** 3470,3475 **** --- 4060,4101 ---- { MASK_ALTIVEC, CODE_FOR_altivec_predicate_v16qi, "*vcmpgtub.", "__builtin_altivec_vcmpgtub_p", ALTIVEC_BUILTIN_VCMPGTUB_P } }; + /* SPE predicates. */ + static struct builtin_description bdesc_spe_predicates[] = + { + /* Place-holder. Leave as first. */ + { 0, CODE_FOR_spe_evcmpeq, "__builtin_spe_evcmpeq", SPE_BUILTIN_EVCMPEQ }, + { 0, CODE_FOR_spe_evcmpgts, "__builtin_spe_evcmpgts", SPE_BUILTIN_EVCMPGTS }, + { 0, CODE_FOR_spe_evcmpgtu, "__builtin_spe_evcmpgtu", SPE_BUILTIN_EVCMPGTU }, + { 0, CODE_FOR_spe_evcmplts, "__builtin_spe_evcmplts", SPE_BUILTIN_EVCMPLTS }, + { 0, CODE_FOR_spe_evcmpltu, "__builtin_spe_evcmpltu", SPE_BUILTIN_EVCMPLTU }, + { 0, CODE_FOR_spe_evfscmpeq, "__builtin_spe_evfscmpeq", SPE_BUILTIN_EVFSCMPEQ }, + { 0, CODE_FOR_spe_evfscmpgt, "__builtin_spe_evfscmpgt", SPE_BUILTIN_EVFSCMPGT }, + { 0, CODE_FOR_spe_evfscmplt, "__builtin_spe_evfscmplt", SPE_BUILTIN_EVFSCMPLT }, + { 0, CODE_FOR_spe_evfststeq, "__builtin_spe_evfststeq", SPE_BUILTIN_EVFSTSTEQ }, + { 0, CODE_FOR_spe_evfststgt, "__builtin_spe_evfststgt", SPE_BUILTIN_EVFSTSTGT }, + /* Place-holder. Leave as last. */ + { 0, CODE_FOR_spe_evfststlt, "__builtin_spe_evfststlt", SPE_BUILTIN_EVFSTSTLT }, + }; + + /* SPE evsel predicates. */ + static struct builtin_description bdesc_spe_evsel[] = + { + /* Place-holder. Leave as first. */ + { 0, CODE_FOR_spe_evcmpgts, "__builtin_spe_evsel_gts", SPE_BUILTIN_EVSEL_CMPGTS }, + { 0, CODE_FOR_spe_evcmpgtu, "__builtin_spe_evsel_gtu", SPE_BUILTIN_EVSEL_CMPGTU }, + { 0, CODE_FOR_spe_evcmplts, "__builtin_spe_evsel_lts", SPE_BUILTIN_EVSEL_CMPLTS }, + { 0, CODE_FOR_spe_evcmpltu, "__builtin_spe_evsel_ltu", SPE_BUILTIN_EVSEL_CMPLTU }, + { 0, CODE_FOR_spe_evcmpeq, "__builtin_spe_evsel_eq", SPE_BUILTIN_EVSEL_CMPEQ }, + { 0, CODE_FOR_spe_evfscmpgt, "__builtin_spe_evsel_fsgt", SPE_BUILTIN_EVSEL_FSCMPGT }, + { 0, CODE_FOR_spe_evfscmplt, "__builtin_spe_evsel_fslt", SPE_BUILTIN_EVSEL_FSCMPLT }, + { 0, CODE_FOR_spe_evfscmpeq, "__builtin_spe_evsel_fseq", SPE_BUILTIN_EVSEL_FSCMPEQ }, + { 0, CODE_FOR_spe_evfststgt, "__builtin_spe_evsel_fststgt", SPE_BUILTIN_EVSEL_FSTSTGT }, + { 0, CODE_FOR_spe_evfststlt, "__builtin_spe_evsel_fststlt", SPE_BUILTIN_EVSEL_FSTSTLT }, + /* Place-holder. Leave as last. */ + { 0, CODE_FOR_spe_evfststeq, "__builtin_spe_evsel_fststeq", SPE_BUILTIN_EVSEL_FSTSTEQ }, + }; + /* ABS* opreations. */ static const struct builtin_description bdesc_abs[] = *************** static const struct builtin_description *** 3486,3492 **** /* Simple unary operations: VECb = foo (unsigned literal) or VECb = foo (VECa). */ ! static const struct builtin_description bdesc_1arg[] = { { MASK_ALTIVEC, CODE_FOR_altivec_vexptefp, "__builtin_altivec_vexptefp", ALTIVEC_BUILTIN_VEXPTEFP }, { MASK_ALTIVEC, CODE_FOR_altivec_vlogefp, "__builtin_altivec_vlogefp", ALTIVEC_BUILTIN_VLOGEFP }, --- 4112,4118 ---- /* Simple unary operations: VECb = foo (unsigned literal) or VECb = foo (VECa). */ ! static struct builtin_description bdesc_1arg[] = { { MASK_ALTIVEC, CODE_FOR_altivec_vexptefp, "__builtin_altivec_vexptefp", ALTIVEC_BUILTIN_VEXPTEFP }, { MASK_ALTIVEC, CODE_FOR_altivec_vlogefp, "__builtin_altivec_vlogefp", ALTIVEC_BUILTIN_VLOGEFP }, *************** static const struct builtin_description *** 3505,3514 **** { MASK_ALTIVEC, CODE_FOR_altivec_vupklsb, "__builtin_altivec_vupklsb", ALTIVEC_BUILTIN_VUPKLSB }, { MASK_ALTIVEC, CODE_FOR_altivec_vupklpx, "__builtin_altivec_vupklpx", ALTIVEC_BUILTIN_VUPKLPX }, { MASK_ALTIVEC, CODE_FOR_altivec_vupklsh, "__builtin_altivec_vupklsh", ALTIVEC_BUILTIN_VUPKLSH }, }; static rtx ! altivec_expand_unop_builtin (icode, arglist, target) enum insn_code icode; tree arglist; rtx target; --- 4131,4176 ---- { MASK_ALTIVEC, CODE_FOR_altivec_vupklsb, "__builtin_altivec_vupklsb", ALTIVEC_BUILTIN_VUPKLSB }, { MASK_ALTIVEC, CODE_FOR_altivec_vupklpx, "__builtin_altivec_vupklpx", ALTIVEC_BUILTIN_VUPKLPX }, { MASK_ALTIVEC, CODE_FOR_altivec_vupklsh, "__builtin_altivec_vupklsh", ALTIVEC_BUILTIN_VUPKLSH }, + + /* The SPE unary builtins must start with SPE_BUILTIN_EVABS and + end with SPE_BUILTIN_EVSUBFUSIAAW. */ + { 0, CODE_FOR_spe_evabs, "__builtin_spe_evabs", SPE_BUILTIN_EVABS }, + { 0, CODE_FOR_spe_evaddsmiaaw, "__builtin_spe_evaddsmiaaw", SPE_BUILTIN_EVADDSMIAAW }, + { 0, CODE_FOR_spe_evaddssiaaw, "__builtin_spe_evaddssiaaw", SPE_BUILTIN_EVADDSSIAAW }, + { 0, CODE_FOR_spe_evaddumiaaw, "__builtin_spe_evaddumiaaw", SPE_BUILTIN_EVADDUMIAAW }, + { 0, CODE_FOR_spe_evaddusiaaw, "__builtin_spe_evaddusiaaw", SPE_BUILTIN_EVADDUSIAAW }, + { 0, CODE_FOR_spe_evcntlsw, "__builtin_spe_evcntlsw", SPE_BUILTIN_EVCNTLSW }, + { 0, CODE_FOR_spe_evcntlzw, "__builtin_spe_evcntlzw", SPE_BUILTIN_EVCNTLZW }, + { 0, CODE_FOR_spe_evextsb, "__builtin_spe_evextsb", SPE_BUILTIN_EVEXTSB }, + { 0, CODE_FOR_spe_evextsh, "__builtin_spe_evextsh", SPE_BUILTIN_EVEXTSH }, + { 0, CODE_FOR_spe_evfsabs, "__builtin_spe_evfsabs", SPE_BUILTIN_EVFSABS }, + { 0, CODE_FOR_spe_evfscfsf, "__builtin_spe_evfscfsf", SPE_BUILTIN_EVFSCFSF }, + { 0, CODE_FOR_spe_evfscfsi, "__builtin_spe_evfscfsi", SPE_BUILTIN_EVFSCFSI }, + { 0, CODE_FOR_spe_evfscfuf, "__builtin_spe_evfscfuf", SPE_BUILTIN_EVFSCFUF }, + { 0, CODE_FOR_spe_evfscfui, "__builtin_spe_evfscfui", SPE_BUILTIN_EVFSCFUI }, + { 0, CODE_FOR_spe_evfsctsf, "__builtin_spe_evfsctsf", SPE_BUILTIN_EVFSCTSF }, + { 0, CODE_FOR_spe_evfsctsi, "__builtin_spe_evfsctsi", SPE_BUILTIN_EVFSCTSI }, + { 0, CODE_FOR_spe_evfsctsiz, "__builtin_spe_evfsctsiz", SPE_BUILTIN_EVFSCTSIZ }, + { 0, CODE_FOR_spe_evfsctuf, "__builtin_spe_evfsctuf", SPE_BUILTIN_EVFSCTUF }, + { 0, CODE_FOR_spe_evfsctui, "__builtin_spe_evfsctui", SPE_BUILTIN_EVFSCTUI }, + { 0, CODE_FOR_spe_evfsctuiz, "__builtin_spe_evfsctuiz", SPE_BUILTIN_EVFSCTUIZ }, + { 0, CODE_FOR_spe_evfsnabs, "__builtin_spe_evfsnabs", SPE_BUILTIN_EVFSNABS }, + { 0, CODE_FOR_spe_evfsneg, "__builtin_spe_evfsneg", SPE_BUILTIN_EVFSNEG }, + { 0, CODE_FOR_spe_evmra, "__builtin_spe_evmra", SPE_BUILTIN_EVMRA }, + { 0, CODE_FOR_spe_evneg, "__builtin_spe_evneg", SPE_BUILTIN_EVNEG }, + { 0, CODE_FOR_spe_evrndw, "__builtin_spe_evrndw", SPE_BUILTIN_EVRNDW }, + { 0, CODE_FOR_spe_evsubfsmiaaw, "__builtin_spe_evsubfsmiaaw", SPE_BUILTIN_EVSUBFSMIAAW }, + { 0, CODE_FOR_spe_evsubfssiaaw, "__builtin_spe_evsubfssiaaw", SPE_BUILTIN_EVSUBFSSIAAW }, + { 0, CODE_FOR_spe_evsubfumiaaw, "__builtin_spe_evsubfumiaaw", SPE_BUILTIN_EVSUBFUMIAAW }, + { 0, CODE_FOR_spe_evsplatfi, "__builtin_spe_evsplatfi", SPE_BUILTIN_EVSPLATFI }, + { 0, CODE_FOR_spe_evsplati, "__builtin_spe_evsplati", SPE_BUILTIN_EVSPLATI }, + + /* Place-holder. Leave as last unary SPE builtin. */ + { 0, CODE_FOR_spe_evsubfusiaaw, "__builtin_spe_evsubfusiaaw", SPE_BUILTIN_EVSUBFUSIAAW }, }; static rtx ! rs6000_expand_unop_builtin (icode, arglist, target) enum insn_code icode; tree arglist; rtx target; *************** altivec_expand_unop_builtin (icode, argl *** 3519,3527 **** enum machine_mode tmode = insn_data[icode].operand[0].mode; enum machine_mode mode0 = insn_data[icode].operand[1].mode; /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return NULL_RTX; if (target == 0 || GET_MODE (target) != tmode --- 4181,4209 ---- enum machine_mode tmode = insn_data[icode].operand[0].mode; enum machine_mode mode0 = insn_data[icode].operand[1].mode; + if (icode == CODE_FOR_nothing) + /* Builtin not supported on this processor. */ + return 0; + /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return const0_rtx; ! ! if (icode == CODE_FOR_altivec_vspltisb ! || icode == CODE_FOR_altivec_vspltish ! || icode == CODE_FOR_altivec_vspltisw ! || icode == CODE_FOR_spe_evsplatfi ! || icode == CODE_FOR_spe_evsplati) ! { ! /* Only allow 5-bit *signed* literals. */ ! if (GET_CODE (op0) != CONST_INT ! || INTVAL (op0) > 0x1f ! || INTVAL (op0) < -0x1f) ! { ! error ("argument 1 must be a 5-bit signed literal"); ! return const0_rtx; ! } ! } if (target == 0 || GET_MODE (target) != tmode *************** altivec_expand_abs_builtin (icode, argli *** 3553,3559 **** /* If we have invalid arguments, bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return NULL_RTX; if (target == 0 || GET_MODE (target) != tmode --- 4235,4241 ---- /* If we have invalid arguments, bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return const0_rtx; if (target == 0 || GET_MODE (target) != tmode *************** altivec_expand_abs_builtin (icode, argli *** 3575,3581 **** } static rtx ! altivec_expand_binop_builtin (icode, arglist, target) enum insn_code icode; tree arglist; rtx target; --- 4257,4263 ---- } static rtx ! rs6000_expand_binop_builtin (icode, arglist, target) enum insn_code icode; tree arglist; rtx target; *************** altivec_expand_binop_builtin (icode, arg *** 3589,3597 **** enum machine_mode mode0 = insn_data[icode].operand[1].mode; enum machine_mode mode1 = insn_data[icode].operand[2].mode; /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node || arg1 == error_mark_node) ! return NULL_RTX; if (target == 0 || GET_MODE (target) != tmode --- 4271,4316 ---- enum machine_mode mode0 = insn_data[icode].operand[1].mode; enum machine_mode mode1 = insn_data[icode].operand[2].mode; + if (icode == CODE_FOR_nothing) + /* Builtin not supported on this processor. */ + return 0; + /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node || arg1 == error_mark_node) ! return const0_rtx; ! ! if (icode == CODE_FOR_altivec_vcfux ! || icode == CODE_FOR_altivec_vcfsx ! || icode == CODE_FOR_altivec_vctsxs ! || icode == CODE_FOR_altivec_vctuxs ! || icode == CODE_FOR_altivec_vspltb ! || icode == CODE_FOR_altivec_vsplth ! || icode == CODE_FOR_altivec_vspltw ! || icode == CODE_FOR_spe_evaddiw ! || icode == CODE_FOR_spe_evldd ! || icode == CODE_FOR_spe_evldh ! || icode == CODE_FOR_spe_evldw ! || icode == CODE_FOR_spe_evlhhesplat ! || icode == CODE_FOR_spe_evlhhossplat ! || icode == CODE_FOR_spe_evlhhousplat ! || icode == CODE_FOR_spe_evlwhe ! || icode == CODE_FOR_spe_evlwhos ! || icode == CODE_FOR_spe_evlwhou ! || icode == CODE_FOR_spe_evlwhsplat ! || icode == CODE_FOR_spe_evlwwsplat ! || icode == CODE_FOR_spe_evrlwi ! || icode == CODE_FOR_spe_evslwi ! || icode == CODE_FOR_spe_evsrwis ! || icode == CODE_FOR_spe_evsrwiu) ! { ! /* Only allow 5-bit unsigned literals. */ ! if (TREE_CODE (arg1) != INTEGER_CST ! || TREE_INT_CST_LOW (arg1) & ~0x1f) ! { ! error ("argument 2 must be a 5-bit unsigned literal"); ! return const0_rtx; ! } ! } if (target == 0 || GET_MODE (target) != tmode *************** altivec_expand_predicate_builtin (icode, *** 3632,3638 **** if (TREE_CODE (cr6_form) != INTEGER_CST) { error ("argument 1 of __builtin_altivec_predicate must be a constant"); ! return NULL_RTX; } else cr6_form_int = TREE_INT_CST_LOW (cr6_form); --- 4351,4357 ---- if (TREE_CODE (cr6_form) != INTEGER_CST) { error ("argument 1 of __builtin_altivec_predicate must be a constant"); ! return const0_rtx; } else cr6_form_int = TREE_INT_CST_LOW (cr6_form); *************** altivec_expand_predicate_builtin (icode, *** 3642,3648 **** /* If we have invalid arguments, bail out before generating bad rtl. */ if (arg0 == error_mark_node || arg1 == error_mark_node) ! return NULL_RTX; if (target == 0 || GET_MODE (target) != tmode --- 4361,4367 ---- /* If we have invalid arguments, bail out before generating bad rtl. */ if (arg0 == error_mark_node || arg1 == error_mark_node) ! return const0_rtx; if (target == 0 || GET_MODE (target) != tmode *************** altivec_expand_stv_builtin (icode, argli *** 3712,3718 **** if (arg0 == error_mark_node || arg1 == error_mark_node || arg2 == error_mark_node) ! return NULL_RTX; if (! (*insn_data[icode].operand[2].predicate) (op0, mode2)) op0 = copy_to_mode_reg (mode2, op0); --- 4431,4437 ---- if (arg0 == error_mark_node || arg1 == error_mark_node || arg2 == error_mark_node) ! return const0_rtx; if (! (*insn_data[icode].operand[2].predicate) (op0, mode2)) op0 = copy_to_mode_reg (mode2, op0); *************** altivec_expand_stv_builtin (icode, argli *** 3728,3734 **** } static rtx ! altivec_expand_ternop_builtin (icode, arglist, target) enum insn_code icode; tree arglist; rtx target; --- 4447,4453 ---- } static rtx ! rs6000_expand_ternop_builtin (icode, arglist, target) enum insn_code icode; tree arglist; rtx target; *************** altivec_expand_ternop_builtin (icode, ar *** 3745,3755 **** enum machine_mode mode1 = insn_data[icode].operand[2].mode; enum machine_mode mode2 = insn_data[icode].operand[3].mode; /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node || arg1 == error_mark_node || arg2 == error_mark_node) ! return NULL_RTX; if (target == 0 || GET_MODE (target) != tmode --- 4464,4492 ---- enum machine_mode mode1 = insn_data[icode].operand[2].mode; enum machine_mode mode2 = insn_data[icode].operand[3].mode; + if (icode == CODE_FOR_nothing) + /* Builtin not supported on this processor. */ + return 0; + /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node || arg1 == error_mark_node || arg2 == error_mark_node) ! return const0_rtx; ! ! if (icode == CODE_FOR_altivec_vsldoi_4sf ! || icode == CODE_FOR_altivec_vsldoi_4si ! || icode == CODE_FOR_altivec_vsldoi_8hi ! || icode == CODE_FOR_altivec_vsldoi_16qi) ! { ! /* Only allow 4-bit unsigned literals. */ ! if (TREE_CODE (arg2) != INTEGER_CST ! || TREE_INT_CST_LOW (arg2) & ~0xf) ! { ! error ("argument 3 must be a 4-bit unsigned literal"); ! return const0_rtx; ! } ! } if (target == 0 || GET_MODE (target) != tmode *************** altivec_expand_ternop_builtin (icode, ar *** 3770,3953 **** return target; } static rtx ! altivec_expand_builtin (exp, target) tree exp; rtx target; { - struct builtin_description *d; - struct builtin_description_predicates *dp; - size_t i; - enum insn_code icode; tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree arglist = TREE_OPERAND (exp, 1); - tree arg0, arg1, arg2; - rtx op0, op1, op2, pat; - enum machine_mode tmode, mode0, mode1, mode2; unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ! switch (fcode) { case ALTIVEC_BUILTIN_LD_INTERNAL_16qi: icode = CODE_FOR_altivec_lvx_16qi; ! arg0 = TREE_VALUE (arglist); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! tmode = insn_data[icode].operand[0].mode; ! mode0 = insn_data[icode].operand[1].mode; ! ! if (target == 0 ! || GET_MODE (target) != tmode ! || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) ! target = gen_reg_rtx (tmode); ! ! if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! ! pat = GEN_FCN (icode) (target, op0); ! if (! pat) ! return 0; ! emit_insn (pat); ! return target; ! case ALTIVEC_BUILTIN_LD_INTERNAL_8hi: icode = CODE_FOR_altivec_lvx_8hi; ! arg0 = TREE_VALUE (arglist); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! tmode = insn_data[icode].operand[0].mode; ! mode0 = insn_data[icode].operand[1].mode; ! if (target == 0 ! || GET_MODE (target) != tmode ! || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) ! target = gen_reg_rtx (tmode); ! if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! pat = GEN_FCN (icode) (target, op0); ! if (! pat) ! return 0; ! emit_insn (pat); ! return target; ! case ALTIVEC_BUILTIN_LD_INTERNAL_4si: ! icode = CODE_FOR_altivec_lvx_4si; ! arg0 = TREE_VALUE (arglist); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! tmode = insn_data[icode].operand[0].mode; ! mode0 = insn_data[icode].operand[1].mode; ! if (target == 0 ! || GET_MODE (target) != tmode ! || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) ! target = gen_reg_rtx (tmode); ! if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! pat = GEN_FCN (icode) (target, op0); ! if (! pat) ! return 0; ! emit_insn (pat); ! return target; ! case ALTIVEC_BUILTIN_LD_INTERNAL_4sf: ! icode = CODE_FOR_altivec_lvx_4sf; ! arg0 = TREE_VALUE (arglist); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! tmode = insn_data[icode].operand[0].mode; ! mode0 = insn_data[icode].operand[1].mode; ! if (target == 0 ! || GET_MODE (target) != tmode ! || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) ! target = gen_reg_rtx (tmode); ! if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! pat = GEN_FCN (icode) (target, op0); ! if (! pat) ! return 0; ! emit_insn (pat); ! return target; ! case ALTIVEC_BUILTIN_ST_INTERNAL_16qi: ! icode = CODE_FOR_altivec_stvx_16qi; ! arg0 = TREE_VALUE (arglist); ! arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); ! mode0 = insn_data[icode].operand[0].mode; ! mode1 = insn_data[icode].operand[1].mode; ! if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! if (! (*insn_data[icode].operand[1].predicate) (op1, mode1)) ! op1 = copy_to_mode_reg (mode1, op1); ! pat = GEN_FCN (icode) (op0, op1); ! if (pat) ! emit_insn (pat); ! return NULL_RTX; ! case ALTIVEC_BUILTIN_ST_INTERNAL_8hi: ! icode = CODE_FOR_altivec_stvx_8hi; ! arg0 = TREE_VALUE (arglist); ! arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); ! mode0 = insn_data[icode].operand[0].mode; ! mode1 = insn_data[icode].operand[1].mode; ! if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! if (! (*insn_data[icode].operand[1].predicate) (op1, mode1)) ! op1 = copy_to_mode_reg (mode1, op1); ! pat = GEN_FCN (icode) (op0, op1); ! if (pat) ! emit_insn (pat); ! return NULL_RTX; ! case ALTIVEC_BUILTIN_ST_INTERNAL_4si: ! icode = CODE_FOR_altivec_stvx_4si; ! arg0 = TREE_VALUE (arglist); ! arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); ! mode0 = insn_data[icode].operand[0].mode; ! mode1 = insn_data[icode].operand[1].mode; ! if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! if (! (*insn_data[icode].operand[1].predicate) (op1, mode1)) ! op1 = copy_to_mode_reg (mode1, op1); ! pat = GEN_FCN (icode) (op0, op1); ! if (pat) ! emit_insn (pat); ! return NULL_RTX; ! case ALTIVEC_BUILTIN_ST_INTERNAL_4sf: ! icode = CODE_FOR_altivec_stvx_4sf; ! arg0 = TREE_VALUE (arglist); ! arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); ! mode0 = insn_data[icode].operand[0].mode; ! mode1 = insn_data[icode].operand[1].mode; ! if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! if (! (*insn_data[icode].operand[1].predicate) (op1, mode1)) ! op1 = copy_to_mode_reg (mode1, op1); ! pat = GEN_FCN (icode) (op0, op1); ! if (pat) ! emit_insn (pat); ! return NULL_RTX; case ALTIVEC_BUILTIN_STVX: return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx, arglist); case ALTIVEC_BUILTIN_STVEBX: --- 4507,4720 ---- return target; } + + /* Expand the lvx builtins. */ static rtx ! altivec_expand_ld_builtin (exp, target, expandedp) tree exp; rtx target; + bool *expandedp; { tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree arglist = TREE_OPERAND (exp, 1); unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ! tree arg0; ! enum machine_mode tmode, mode0; ! rtx pat, op0; ! enum insn_code icode; ! switch (fcode) { case ALTIVEC_BUILTIN_LD_INTERNAL_16qi: icode = CODE_FOR_altivec_lvx_16qi; ! break; case ALTIVEC_BUILTIN_LD_INTERNAL_8hi: icode = CODE_FOR_altivec_lvx_8hi; ! break; ! case ALTIVEC_BUILTIN_LD_INTERNAL_4si: ! icode = CODE_FOR_altivec_lvx_4si; ! break; ! case ALTIVEC_BUILTIN_LD_INTERNAL_4sf: ! icode = CODE_FOR_altivec_lvx_4sf; ! break; ! default: ! *expandedp = false; ! return NULL_RTX; ! } ! *expandedp = true; ! arg0 = TREE_VALUE (arglist); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! tmode = insn_data[icode].operand[0].mode; ! mode0 = insn_data[icode].operand[1].mode; ! if (target == 0 ! || GET_MODE (target) != tmode ! || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) ! target = gen_reg_rtx (tmode); ! if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! pat = GEN_FCN (icode) (target, op0); ! if (! pat) ! return 0; ! emit_insn (pat); ! return target; ! } ! /* Expand the stvx builtins. */ ! static rtx ! altivec_expand_st_builtin (exp, target, expandedp) ! tree exp; ! rtx target ATTRIBUTE_UNUSED; ! bool *expandedp; ! { ! tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); ! tree arglist = TREE_OPERAND (exp, 1); ! unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ! tree arg0, arg1; ! enum machine_mode mode0, mode1; ! rtx pat, op0, op1; ! enum insn_code icode; ! switch (fcode) ! { ! case ALTIVEC_BUILTIN_ST_INTERNAL_16qi: ! icode = CODE_FOR_altivec_stvx_16qi; ! break; ! case ALTIVEC_BUILTIN_ST_INTERNAL_8hi: ! icode = CODE_FOR_altivec_stvx_8hi; ! break; ! case ALTIVEC_BUILTIN_ST_INTERNAL_4si: ! icode = CODE_FOR_altivec_stvx_4si; ! break; ! case ALTIVEC_BUILTIN_ST_INTERNAL_4sf: ! icode = CODE_FOR_altivec_stvx_4sf; ! break; ! default: ! *expandedp = false; ! return NULL_RTX; ! } ! arg0 = TREE_VALUE (arglist); ! arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); ! mode0 = insn_data[icode].operand[0].mode; ! mode1 = insn_data[icode].operand[1].mode; ! if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) ! op0 = gen_rtx_MEM (mode0, copy_to_mode_reg (Pmode, op0)); ! if (! (*insn_data[icode].operand[1].predicate) (op1, mode1)) ! op1 = copy_to_mode_reg (mode1, op1); ! pat = GEN_FCN (icode) (op0, op1); ! if (pat) ! emit_insn (pat); ! *expandedp = true; ! return NULL_RTX; ! } ! /* Expand the dst builtins. */ ! static rtx ! altivec_expand_dst_builtin (exp, target, expandedp) ! tree exp; ! rtx target ATTRIBUTE_UNUSED; ! bool *expandedp; ! { ! tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); ! tree arglist = TREE_OPERAND (exp, 1); ! unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ! tree arg0, arg1, arg2; ! enum machine_mode mode0, mode1, mode2; ! rtx pat, op0, op1, op2; ! struct builtin_description *d; ! size_t i; ! *expandedp = false; ! /* Handle DST variants. */ ! d = (struct builtin_description *) bdesc_dst; ! for (i = 0; i < ARRAY_SIZE (bdesc_dst); i++, d++) ! if (d->code == fcode) ! { ! arg0 = TREE_VALUE (arglist); ! arg1 = TREE_VALUE (TREE_CHAIN (arglist)); ! arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); ! op2 = expand_expr (arg2, NULL_RTX, VOIDmode, 0); ! mode0 = insn_data[d->icode].operand[0].mode; ! mode1 = insn_data[d->icode].operand[1].mode; ! mode2 = insn_data[d->icode].operand[2].mode; ! /* Invalid arguments, bail out before generating bad rtl. */ ! if (arg0 == error_mark_node ! || arg1 == error_mark_node ! || arg2 == error_mark_node) ! return const0_rtx; ! if (TREE_CODE (arg2) != INTEGER_CST ! || TREE_INT_CST_LOW (arg2) & ~0x3) ! { ! error ("argument to `%s' must be a 2-bit unsigned literal", d->name); ! return const0_rtx; ! } ! if (! (*insn_data[d->icode].operand[0].predicate) (op0, mode0)) ! op0 = copy_to_mode_reg (mode0, op0); ! if (! (*insn_data[d->icode].operand[1].predicate) (op1, mode1)) ! op1 = copy_to_mode_reg (mode1, op1); ! pat = GEN_FCN (d->icode) (op0, op1, op2); ! if (pat != 0) ! emit_insn (pat); ! *expandedp = true; ! return NULL_RTX; ! } ! return NULL_RTX; ! } ! /* Expand the builtin in EXP and store the result in TARGET. Store ! true in *EXPANDEDP if we found a builtin to expand. */ ! static rtx ! altivec_expand_builtin (exp, target, expandedp) ! tree exp; ! rtx target; ! bool *expandedp; ! { ! struct builtin_description *d; ! struct builtin_description_predicates *dp; ! size_t i; ! enum insn_code icode; ! tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); ! tree arglist = TREE_OPERAND (exp, 1); ! tree arg0; ! rtx op0, pat; ! enum machine_mode tmode, mode0; ! unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ! target = altivec_expand_ld_builtin (exp, target, expandedp); ! if (*expandedp) ! return target; ! target = altivec_expand_st_builtin (exp, target, expandedp); ! if (*expandedp) ! return target; ! ! target = altivec_expand_dst_builtin (exp, target, expandedp); ! if (*expandedp) ! return target; + *expandedp = true; + + switch (fcode) + { case ALTIVEC_BUILTIN_STVX: return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx, arglist); case ALTIVEC_BUILTIN_STVEBX: *************** altivec_expand_builtin (exp, target) *** 3958,3964 **** return altivec_expand_stv_builtin (CODE_FOR_altivec_stvewx, arglist); case ALTIVEC_BUILTIN_STVXL: return altivec_expand_stv_builtin (CODE_FOR_altivec_stvxl, arglist); ! case ALTIVEC_BUILTIN_MFVSCR: icode = CODE_FOR_altivec_mfvscr; tmode = insn_data[icode].operand[0].mode; --- 4725,4731 ---- return altivec_expand_stv_builtin (CODE_FOR_altivec_stvewx, arglist); case ALTIVEC_BUILTIN_STVXL: return altivec_expand_stv_builtin (CODE_FOR_altivec_stvxl, arglist); ! case ALTIVEC_BUILTIN_MFVSCR: icode = CODE_FOR_altivec_mfvscr; tmode = insn_data[icode].operand[0].mode; *************** altivec_expand_builtin (exp, target) *** 3982,3988 **** /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return NULL_RTX; if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); --- 4749,4755 ---- /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return const0_rtx; if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); *************** altivec_expand_builtin (exp, target) *** 3991,3997 **** if (pat) emit_insn (pat); return NULL_RTX; ! case ALTIVEC_BUILTIN_DSSALL: emit_insn (gen_altivec_dssall ()); return NULL_RTX; --- 4758,4764 ---- if (pat) emit_insn (pat); return NULL_RTX; ! case ALTIVEC_BUILTIN_DSSALL: emit_insn (gen_altivec_dssall ()); return NULL_RTX; *************** altivec_expand_builtin (exp, target) *** 4004,4010 **** /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return NULL_RTX; if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); --- 4771,4784 ---- /* If we got invalid arguments bail out before generating bad rtl. */ if (arg0 == error_mark_node) ! return const0_rtx; ! ! if (TREE_CODE (arg0) != INTEGER_CST ! || TREE_INT_CST_LOW (arg0) & ~0x3) ! { ! error ("argument to dss must be a 2-bit unsigned literal"); ! return const0_rtx; ! } if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); *************** altivec_expand_builtin (exp, target) *** 4013,4078 **** return NULL_RTX; } - /* Handle DST variants. */ - d = (struct builtin_description *) bdesc_dst; - for (i = 0; i < sizeof (bdesc_dst) / sizeof *d; i++, d++) - if (d->code == fcode) - { - arg0 = TREE_VALUE (arglist); - arg1 = TREE_VALUE (TREE_CHAIN (arglist)); - arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); - op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); - op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); - op2 = expand_expr (arg2, NULL_RTX, VOIDmode, 0); - mode0 = insn_data[d->icode].operand[0].mode; - mode1 = insn_data[d->icode].operand[1].mode; - mode2 = insn_data[d->icode].operand[2].mode; - - /* Invalid arguments, bail out before generating bad rtl. */ - if (arg0 == error_mark_node - || arg1 == error_mark_node - || arg2 == error_mark_node) - return NULL_RTX; - - if (! (*insn_data[d->icode].operand[0].predicate) (op0, mode0)) - op0 = copy_to_mode_reg (mode0, op0); - if (! (*insn_data[d->icode].operand[1].predicate) (op1, mode1)) - op1 = copy_to_mode_reg (mode1, op1); - - if (GET_CODE (op2) != CONST_INT || INTVAL (op2) > 3) - { - error ("argument 3 of `%s' must be a 2-bit literal", d->name); - return NULL_RTX; - } - - pat = GEN_FCN (d->icode) (op0, op1, op2); - if (pat != 0) - emit_insn (pat); - - return NULL_RTX; - } - /* Expand abs* operations. */ d = (struct builtin_description *) bdesc_abs; ! for (i = 0; i < sizeof (bdesc_abs) / sizeof *d; i++, d++) if (d->code == fcode) return altivec_expand_abs_builtin (d->icode, arglist, target); - /* Handle simple unary operations. */ - d = (struct builtin_description *) bdesc_1arg; - for (i = 0; i < sizeof (bdesc_1arg) / sizeof *d; i++, d++) - if (d->code == fcode) - return altivec_expand_unop_builtin (d->icode, arglist, target); - - /* Handle simple binary operations. */ - d = (struct builtin_description *) bdesc_2arg; - for (i = 0; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++) - if (d->code == fcode) - return altivec_expand_binop_builtin (d->icode, arglist, target); - /* Expand the AltiVec predicates. */ dp = (struct builtin_description_predicates *) bdesc_altivec_preds; ! for (i = 0; i < sizeof (bdesc_altivec_preds) / sizeof *dp; i++, dp++) if (dp->code == fcode) return altivec_expand_predicate_builtin (dp->icode, dp->opcode, arglist, target); --- 4787,4801 ---- return NULL_RTX; } /* Expand abs* operations. */ d = (struct builtin_description *) bdesc_abs; ! for (i = 0; i < ARRAY_SIZE (bdesc_abs); i++, d++) if (d->code == fcode) return altivec_expand_abs_builtin (d->icode, arglist, target); /* Expand the AltiVec predicates. */ dp = (struct builtin_description_predicates *) bdesc_altivec_preds; ! for (i = 0; i < ARRAY_SIZE (bdesc_altivec_preds); i++, dp++) if (dp->code == fcode) return altivec_expand_predicate_builtin (dp->icode, dp->opcode, arglist, target); *************** altivec_expand_builtin (exp, target) *** 4080,4120 **** switch (fcode) { case ALTIVEC_BUILTIN_LVSL: ! return altivec_expand_binop_builtin (CODE_FOR_altivec_lvsl, arglist, target); case ALTIVEC_BUILTIN_LVSR: ! return altivec_expand_binop_builtin (CODE_FOR_altivec_lvsr, ! arglist, target); case ALTIVEC_BUILTIN_LVEBX: ! return altivec_expand_binop_builtin (CODE_FOR_altivec_lvebx, ! arglist, target); case ALTIVEC_BUILTIN_LVEHX: ! return altivec_expand_binop_builtin (CODE_FOR_altivec_lvehx, ! arglist, target); case ALTIVEC_BUILTIN_LVEWX: ! return altivec_expand_binop_builtin (CODE_FOR_altivec_lvewx, ! arglist, target); case ALTIVEC_BUILTIN_LVXL: ! return altivec_expand_binop_builtin (CODE_FOR_altivec_lvxl, ! arglist, target); case ALTIVEC_BUILTIN_LVX: ! return altivec_expand_binop_builtin (CODE_FOR_altivec_lvx, ! arglist, target); default: break; /* Fall through. */ } ! /* Handle simple ternary operations. */ ! d = (struct builtin_description *) bdesc_3arg; ! for (i = 0; i < sizeof (bdesc_3arg) / sizeof *d; i++, d++) if (d->code == fcode) ! return altivec_expand_ternop_builtin (d->icode, arglist, target); ! abort (); return NULL_RTX; } /* Expand an expression EXP that calls a built-in function, with result going to TARGET if that's convenient (and in mode MODE if that's convenient). --- 4803,5159 ---- switch (fcode) { case ALTIVEC_BUILTIN_LVSL: ! return rs6000_expand_binop_builtin (CODE_FOR_altivec_lvsl, arglist, target); case ALTIVEC_BUILTIN_LVSR: ! return rs6000_expand_binop_builtin (CODE_FOR_altivec_lvsr, ! arglist, target); case ALTIVEC_BUILTIN_LVEBX: ! return rs6000_expand_binop_builtin (CODE_FOR_altivec_lvebx, ! arglist, target); case ALTIVEC_BUILTIN_LVEHX: ! return rs6000_expand_binop_builtin (CODE_FOR_altivec_lvehx, ! arglist, target); case ALTIVEC_BUILTIN_LVEWX: ! return rs6000_expand_binop_builtin (CODE_FOR_altivec_lvewx, ! arglist, target); case ALTIVEC_BUILTIN_LVXL: ! return rs6000_expand_binop_builtin (CODE_FOR_altivec_lvxl, ! arglist, target); case ALTIVEC_BUILTIN_LVX: ! return rs6000_expand_binop_builtin (CODE_FOR_altivec_lvx, ! arglist, target); default: break; /* Fall through. */ } ! *expandedp = false; ! return NULL_RTX; ! } ! ! /* Binops that need to be initialized manually, but can be expanded ! automagically by rs6000_expand_binop_builtin. */ ! static struct builtin_description bdesc_2arg_spe[] = ! { ! { 0, CODE_FOR_spe_evlddx, "__builtin_spe_evlddx", SPE_BUILTIN_EVLDDX }, ! { 0, CODE_FOR_spe_evldwx, "__builtin_spe_evldwx", SPE_BUILTIN_EVLDWX }, ! { 0, CODE_FOR_spe_evldhx, "__builtin_spe_evldhx", SPE_BUILTIN_EVLDHX }, ! { 0, CODE_FOR_spe_evlwhex, "__builtin_spe_evlwhex", SPE_BUILTIN_EVLWHEX }, ! { 0, CODE_FOR_spe_evlwhoux, "__builtin_spe_evlwhoux", SPE_BUILTIN_EVLWHOUX }, ! { 0, CODE_FOR_spe_evlwhosx, "__builtin_spe_evlwhosx", SPE_BUILTIN_EVLWHOSX }, ! { 0, CODE_FOR_spe_evlwwsplatx, "__builtin_spe_evlwwsplatx", SPE_BUILTIN_EVLWWSPLATX }, ! { 0, CODE_FOR_spe_evlwhsplatx, "__builtin_spe_evlwhsplatx", SPE_BUILTIN_EVLWHSPLATX }, ! { 0, CODE_FOR_spe_evlhhesplatx, "__builtin_spe_evlhhesplatx", SPE_BUILTIN_EVLHHESPLATX }, ! { 0, CODE_FOR_spe_evlhhousplatx, "__builtin_spe_evlhhousplatx", SPE_BUILTIN_EVLHHOUSPLATX }, ! { 0, CODE_FOR_spe_evlhhossplatx, "__builtin_spe_evlhhossplatx", SPE_BUILTIN_EVLHHOSSPLATX }, ! { 0, CODE_FOR_spe_evldd, "__builtin_spe_evldd", SPE_BUILTIN_EVLDD }, ! { 0, CODE_FOR_spe_evldw, "__builtin_spe_evldw", SPE_BUILTIN_EVLDW }, ! { 0, CODE_FOR_spe_evldh, "__builtin_spe_evldh", SPE_BUILTIN_EVLDH }, ! { 0, CODE_FOR_spe_evlwhe, "__builtin_spe_evlwhe", SPE_BUILTIN_EVLWHE }, ! { 0, CODE_FOR_spe_evlwhou, "__builtin_spe_evlwhou", SPE_BUILTIN_EVLWHOU }, ! { 0, CODE_FOR_spe_evlwhos, "__builtin_spe_evlwhos", SPE_BUILTIN_EVLWHOS }, ! { 0, CODE_FOR_spe_evlwwsplat, "__builtin_spe_evlwwsplat", SPE_BUILTIN_EVLWWSPLAT }, ! { 0, CODE_FOR_spe_evlwhsplat, "__builtin_spe_evlwhsplat", SPE_BUILTIN_EVLWHSPLAT }, ! { 0, CODE_FOR_spe_evlhhesplat, "__builtin_spe_evlhhesplat", SPE_BUILTIN_EVLHHESPLAT }, ! { 0, CODE_FOR_spe_evlhhousplat, "__builtin_spe_evlhhousplat", SPE_BUILTIN_EVLHHOUSPLAT }, ! { 0, CODE_FOR_spe_evlhhossplat, "__builtin_spe_evlhhossplat", SPE_BUILTIN_EVLHHOSSPLAT } ! }; ! ! /* Expand the builtin in EXP and store the result in TARGET. Store ! true in *EXPANDEDP if we found a builtin to expand. ! ! This expands the SPE builtins that are not simple unary and binary ! operations. */ ! static rtx ! spe_expand_builtin (exp, target, expandedp) ! tree exp; ! rtx target; ! bool *expandedp; ! { ! tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); ! tree arglist = TREE_OPERAND (exp, 1); ! tree arg1, arg0; ! unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ! enum insn_code icode; ! enum machine_mode tmode, mode0; ! rtx pat, op0; ! struct builtin_description *d; ! size_t i; ! ! *expandedp = true; ! ! /* Syntax check for a 5-bit unsigned immediate. */ ! switch (fcode) ! { ! case SPE_BUILTIN_EVSTDD: ! case SPE_BUILTIN_EVSTDH: ! case SPE_BUILTIN_EVSTDW: ! case SPE_BUILTIN_EVSTWHE: ! case SPE_BUILTIN_EVSTWHO: ! case SPE_BUILTIN_EVSTWWE: ! case SPE_BUILTIN_EVSTWWO: ! arg1 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); ! if (TREE_CODE (arg1) != INTEGER_CST ! || TREE_INT_CST_LOW (arg1) & ~0x1f) ! { ! error ("argument 2 must be a 5-bit unsigned literal"); ! return const0_rtx; ! } ! break; ! default: ! break; ! } ! ! d = (struct builtin_description *) bdesc_2arg_spe; ! for (i = 0; i < ARRAY_SIZE (bdesc_2arg_spe); ++i, ++d) if (d->code == fcode) ! return rs6000_expand_binop_builtin (d->icode, arglist, target); ! d = (struct builtin_description *) bdesc_spe_predicates; ! for (i = 0; i < ARRAY_SIZE (bdesc_spe_predicates); ++i, ++d) ! if (d->code == fcode) ! return spe_expand_predicate_builtin (d->icode, arglist, target); ! ! d = (struct builtin_description *) bdesc_spe_evsel; ! for (i = 0; i < ARRAY_SIZE (bdesc_spe_evsel); ++i, ++d) ! if (d->code == fcode) ! return spe_expand_evsel_builtin (d->icode, arglist, target); ! ! switch (fcode) ! { ! case SPE_BUILTIN_EVSTDDX: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstddx, arglist); ! case SPE_BUILTIN_EVSTDHX: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstdhx, arglist); ! case SPE_BUILTIN_EVSTDWX: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstdwx, arglist); ! case SPE_BUILTIN_EVSTWHEX: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwhex, arglist); ! case SPE_BUILTIN_EVSTWHOX: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwhox, arglist); ! case SPE_BUILTIN_EVSTWWEX: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwwex, arglist); ! case SPE_BUILTIN_EVSTWWOX: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwwox, arglist); ! case SPE_BUILTIN_EVSTDD: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstdd, arglist); ! case SPE_BUILTIN_EVSTDH: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstdh, arglist); ! case SPE_BUILTIN_EVSTDW: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstdw, arglist); ! case SPE_BUILTIN_EVSTWHE: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwhe, arglist); ! case SPE_BUILTIN_EVSTWHO: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwho, arglist); ! case SPE_BUILTIN_EVSTWWE: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwwe, arglist); ! case SPE_BUILTIN_EVSTWWO: ! return altivec_expand_stv_builtin (CODE_FOR_spe_evstwwo, arglist); ! case SPE_BUILTIN_MFSPEFSCR: ! icode = CODE_FOR_spe_mfspefscr; ! tmode = insn_data[icode].operand[0].mode; ! ! if (target == 0 ! || GET_MODE (target) != tmode ! || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) ! target = gen_reg_rtx (tmode); ! ! pat = GEN_FCN (icode) (target); ! if (! pat) ! return 0; ! emit_insn (pat); ! return target; ! case SPE_BUILTIN_MTSPEFSCR: ! icode = CODE_FOR_spe_mtspefscr; ! arg0 = TREE_VALUE (arglist); ! op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); ! mode0 = insn_data[icode].operand[0].mode; ! ! if (arg0 == error_mark_node) ! return const0_rtx; ! ! if (! (*insn_data[icode].operand[0].predicate) (op0, mode0)) ! op0 = copy_to_mode_reg (mode0, op0); ! ! pat = GEN_FCN (icode) (op0); ! if (pat) ! emit_insn (pat); ! return NULL_RTX; ! default: ! break; ! } ! ! *expandedp = false; return NULL_RTX; } + static rtx + spe_expand_predicate_builtin (icode, arglist, target) + enum insn_code icode; + tree arglist; + rtx target; + { + rtx pat, scratch, tmp; + tree form = TREE_VALUE (arglist); + tree arg0 = TREE_VALUE (TREE_CHAIN (arglist)); + tree arg1 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); + rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); + rtx op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); + enum machine_mode mode0 = insn_data[icode].operand[1].mode; + enum machine_mode mode1 = insn_data[icode].operand[2].mode; + int form_int; + enum rtx_code code; + + if (TREE_CODE (form) != INTEGER_CST) + { + error ("argument 1 of __builtin_spe_predicate must be a constant"); + return const0_rtx; + } + else + form_int = TREE_INT_CST_LOW (form); + + if (mode0 != mode1) + abort (); + + if (arg0 == error_mark_node || arg1 == error_mark_node) + return const0_rtx; + + if (target == 0 + || GET_MODE (target) != SImode + || ! (*insn_data[icode].operand[0].predicate) (target, SImode)) + target = gen_reg_rtx (SImode); + + if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) + op0 = copy_to_mode_reg (mode0, op0); + if (! (*insn_data[icode].operand[2].predicate) (op1, mode1)) + op1 = copy_to_mode_reg (mode1, op1); + + scratch = gen_reg_rtx (CCmode); + + pat = GEN_FCN (icode) (scratch, op0, op1); + if (! pat) + return const0_rtx; + emit_insn (pat); + + /* There are 4 variants for each predicate: _any_, _all_, _upper_, + _lower_. We use one compare, but look in different bits of the + CR for each variant. + + There are 2 elements in each SPE simd type (upper/lower). The CR + bits are set as follows: + + BIT0 | BIT 1 | BIT 2 | BIT 3 + U | L | (U | L) | (U & L) + + So, for an "all" relationship, BIT 3 would be set. + For an "any" relationship, BIT 2 would be set. Etc. + + Following traditional nomenclature, these bits map to: + + BIT0 | BIT 1 | BIT 2 | BIT 3 + LT | GT | EQ | OV + + Later, we will generate rtl to look in the LT/EQ/EQ/OV bits. + */ + + switch (form_int) + { + /* All variant. OV bit. */ + case 0: + /* We need to get to the OV bit, which is the ORDERED bit. We + could generate (ordered:SI (reg:CC xx) (const_int 0)), but + that's ugly and will trigger a validate_condition_mode abort. + So let's just use another pattern. */ + emit_insn (gen_move_from_CR_ov_bit (target, scratch)); + return target; + /* Any variant. EQ bit. */ + case 1: + code = EQ; + break; + /* Upper variant. LT bit. */ + case 2: + code = LT; + break; + /* Lower variant. GT bit. */ + case 3: + code = GT; + break; + default: + error ("argument 1 of __builtin_spe_predicate is out of range"); + return const0_rtx; + } + + tmp = gen_rtx_fmt_ee (code, SImode, scratch, const0_rtx); + emit_move_insn (target, tmp); + + return target; + } + + /* The evsel builtins look like this: + + e = __builtin_spe_evsel_OP (a, b, c, d); + + and work like this: + + e[upper] = a[upper] *OP* b[upper] ? c[upper] : d[upper]; + e[lower] = a[lower] *OP* b[lower] ? c[lower] : d[lower]; + */ + + static rtx + spe_expand_evsel_builtin (icode, arglist, target) + enum insn_code icode; + tree arglist; + rtx target; + { + rtx pat, scratch; + tree arg0 = TREE_VALUE (arglist); + tree arg1 = TREE_VALUE (TREE_CHAIN (arglist)); + tree arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); + tree arg3 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arglist)))); + rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); + rtx op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); + rtx op2 = expand_expr (arg2, NULL_RTX, VOIDmode, 0); + rtx op3 = expand_expr (arg3, NULL_RTX, VOIDmode, 0); + enum machine_mode mode0 = insn_data[icode].operand[1].mode; + enum machine_mode mode1 = insn_data[icode].operand[2].mode; + + if (mode0 != mode1) + abort (); + + if (arg0 == error_mark_node || arg1 == error_mark_node + || arg2 == error_mark_node || arg3 == error_mark_node) + return const0_rtx; + + if (target == 0 + || GET_MODE (target) != mode0 + || ! (*insn_data[icode].operand[0].predicate) (target, mode0)) + target = gen_reg_rtx (mode0); + + if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) + op0 = copy_to_mode_reg (mode0, op0); + if (! (*insn_data[icode].operand[1].predicate) (op1, mode1)) + op1 = copy_to_mode_reg (mode0, op1); + if (! (*insn_data[icode].operand[1].predicate) (op2, mode1)) + op2 = copy_to_mode_reg (mode0, op2); + if (! (*insn_data[icode].operand[1].predicate) (op3, mode1)) + op3 = copy_to_mode_reg (mode0, op3); + + /* Generate the compare. */ + scratch = gen_reg_rtx (CCmode); + pat = GEN_FCN (icode) (scratch, op0, op1); + if (! pat) + return const0_rtx; + emit_insn (pat); + + if (mode0 == V2SImode) + emit_insn (gen_spe_evsel (target, op2, op3, scratch)); + else + emit_insn (gen_spe_evsel_fs (target, op2, op3, scratch)); + + return target; + } + /* Expand an expression EXP that calls a built-in function, with result going to TARGET if that's convenient (and in mode MODE if that's convenient). *************** rs6000_expand_builtin (exp, target, subt *** 4129,4615 **** enum machine_mode mode ATTRIBUTE_UNUSED; int ignore ATTRIBUTE_UNUSED; { if (TARGET_ALTIVEC) ! return altivec_expand_builtin (exp, target); abort (); } static void rs6000_init_builtins () { if (TARGET_ALTIVEC) altivec_init_builtins (); } static void ! altivec_init_builtins (void) { ! struct builtin_description *d; ! struct builtin_description_predicates *dp; ! size_t i; ! tree endlink = void_list_node; ! tree pint_type_node = build_pointer_type (integer_type_node); ! tree pvoid_type_node = build_pointer_type (void_type_node); ! tree pshort_type_node = build_pointer_type (short_integer_type_node); ! tree pchar_type_node = build_pointer_type (char_type_node); ! tree pfloat_type_node = build_pointer_type (float_type_node); ! tree v4sf_ftype_v4sf_v4sf_v16qi ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, ! V16QI_type_node, ! endlink)))); ! tree v4si_ftype_v4si_v4si_v16qi ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, ! V16QI_type_node, ! endlink)))); ! tree v8hi_ftype_v8hi_v8hi_v16qi ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, ! V16QI_type_node, ! endlink)))); ! tree v16qi_ftype_v16qi_v16qi_v16qi ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, ! V16QI_type_node, ! endlink)))); ! /* V4SI foo (char). */ ! tree v4si_ftype_char ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, char_type_node, endlink)); ! /* V8HI foo (char). */ ! tree v8hi_ftype_char ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, char_type_node, endlink)); ! /* V16QI foo (char). */ ! tree v16qi_ftype_char ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, char_type_node, endlink)); ! /* V4SF foo (V4SF). */ ! tree v4sf_ftype_v4sf ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, endlink)); ! /* V4SI foo (int *). */ ! tree v4si_ftype_pint ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, pint_type_node, endlink)); ! /* V8HI foo (short *). */ ! tree v8hi_ftype_pshort ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, pshort_type_node, endlink)); ! /* V16QI foo (char *). */ ! tree v16qi_ftype_pchar ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, pchar_type_node, endlink)); ! /* V4SF foo (float *). */ ! tree v4sf_ftype_pfloat ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, pfloat_type_node, endlink)); ! /* V8HI foo (V16QI). */ ! tree v8hi_ftype_v16qi ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, endlink)); ! /* void foo (void *, int, char/literal). */ ! tree void_ftype_pvoid_int_char = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pvoid_type_node, ! tree_cons (NULL_TREE, integer_type_node, tree_cons (NULL_TREE, ! char_type_node, endlink)))); ! /* void foo (int *, V4SI). */ ! tree void_ftype_pint_v4si ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pint_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! endlink))); ! /* void foo (short *, V8HI). */ ! tree void_ftype_pshort_v8hi ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pshort_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! endlink))); ! /* void foo (char *, V16QI). */ ! tree void_ftype_pchar_v16qi ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pchar_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! endlink))); ! /* void foo (float *, V4SF). */ ! tree void_ftype_pfloat_v4sf ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, pfloat_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink))); ! ! /* void foo (V4SI). */ ! tree void_ftype_v4si ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! endlink)); ! ! /* void foo (vint, int, void *). */ ! tree void_ftype_v4si_int_pvoid = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, integer_type_node, tree_cons (NULL_TREE, ! pvoid_type_node, endlink)))); ! /* void foo (vchar, int, void *). */ ! tree void_ftype_v16qi_int_pvoid = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, integer_type_node, tree_cons (NULL_TREE, ! pvoid_type_node, endlink)))); ! /* void foo (vshort, int, void *). */ ! tree void_ftype_v8hi_int_pvoid = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, integer_type_node, tree_cons (NULL_TREE, ! pvoid_type_node, endlink)))); ! /* void foo (char). */ ! tree void_ftype_qi = build_function_type (void_type_node, ! tree_cons (NULL_TREE, char_type_node, ! endlink)); ! ! /* void foo (void). */ ! tree void_ftype_void ! = build_function_type (void_type_node, void_list_node); ! /* vshort foo (void). */ ! tree v8hi_ftype_void ! = build_function_type (V8HI_type_node, void_list_node); ! tree v4si_ftype_v4si_v4si ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, endlink))); ! /* These are for the unsigned 5 bit literals. */ ! ! tree v4sf_ftype_v4si_char ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, char_type_node, ! endlink))); ! tree v4si_ftype_v4sf_char ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, char_type_node, ! endlink))); ! tree v4si_ftype_v4si_char ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, char_type_node, ! endlink))); ! tree v8hi_ftype_v8hi_char ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, char_type_node, endlink))); ! tree v16qi_ftype_v16qi_char ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, char_type_node, endlink))); ! /* These are for the unsigned 4 bit literals. */ ! tree v16qi_ftype_v16qi_v16qi_char ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, ! char_type_node, ! endlink)))); ! tree v8hi_ftype_v8hi_v8hi_char ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, ! char_type_node, ! endlink)))); ! tree v4si_ftype_v4si_v4si_char ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, ! char_type_node, ! endlink)))); ! tree v4sf_ftype_v4sf_v4sf_char ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, ! char_type_node, ! endlink)))); ! /* End of 4 bit literals. */ ! tree v4sf_ftype_v4sf_v4sf ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink))); ! tree v4sf_ftype_v4sf_v4sf_v4si ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, ! V4SI_type_node, ! endlink)))); ! tree v4sf_ftype_v4sf_v4sf_v4sf ! = build_function_type (V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, ! V4SF_type_node, ! endlink)))); ! tree v4si_ftype_v4si_v4si_v4si ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, ! V4SI_type_node, ! endlink)))); ! tree v8hi_ftype_v8hi_v8hi ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! endlink))); ! tree v8hi_ftype_v8hi_v8hi_v8hi ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, ! V8HI_type_node, ! endlink)))); ! tree v4si_ftype_v8hi_v8hi_v4si ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, ! V4SI_type_node, ! endlink)))); ! tree v4si_ftype_v16qi_v16qi_v4si ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, ! V4SI_type_node, ! endlink)))); ! ! tree v16qi_ftype_v16qi_v16qi ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! endlink))); ! ! tree v4si_ftype_v4sf_v4sf ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink))); ! tree v4si_ftype_v4si ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, endlink)); ! tree v8hi_ftype_v8hi ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, endlink)); tree v16qi_ftype_v16qi ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, endlink)); ! tree v8hi_ftype_v16qi_v16qi ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! endlink))); ! tree v4si_ftype_v8hi_v8hi ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! endlink))); ! tree v8hi_ftype_v4si_v4si ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! endlink))); ! tree v16qi_ftype_v8hi_v8hi ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! endlink))); ! tree v4si_ftype_v16qi_v4si ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! endlink))); ! tree v4si_ftype_v16qi_v16qi ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! endlink))); ! tree v4si_ftype_v8hi_v4si ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! endlink))); ! tree v4si_ftype_v8hi ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, endlink)); ! tree int_ftype_v4si_v4si ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! endlink))); ! tree int_ftype_v4sf_v4sf ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink))); ! tree int_ftype_v16qi_v16qi ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! endlink))); ! tree int_ftype_int_v4si_v4si ! = build_function_type ! (integer_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! tree_cons (NULL_TREE, V4SI_type_node, ! endlink)))); ! tree int_ftype_int_v4sf_v4sf ! = build_function_type ! (integer_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! tree_cons (NULL_TREE, V4SF_type_node, ! endlink)))); ! tree int_ftype_int_v8hi_v8hi ! = build_function_type ! (integer_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! endlink)))); ! tree int_ftype_int_v16qi_v16qi ! = build_function_type ! (integer_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! tree_cons (NULL_TREE, V16QI_type_node, ! endlink)))); ! tree v16qi_ftype_int_pvoid ! = build_function_type (V16QI_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, pvoid_type_node, ! endlink))); ! tree v4si_ftype_int_pvoid ! = build_function_type (V4SI_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, pvoid_type_node, ! endlink))); ! tree v8hi_ftype_int_pvoid ! = build_function_type (V8HI_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, pvoid_type_node, ! endlink))); ! tree int_ftype_v8hi_v8hi ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! tree_cons (NULL_TREE, V8HI_type_node, ! endlink))); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4sf", v4sf_ftype_pfloat, ALTIVEC_BUILTIN_LD_INTERNAL_4sf); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4sf", void_ftype_pfloat_v4sf, ALTIVEC_BUILTIN_ST_INTERNAL_4sf); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4si", v4si_ftype_pint, ALTIVEC_BUILTIN_LD_INTERNAL_4si); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4si", void_ftype_pint_v4si, ALTIVEC_BUILTIN_ST_INTERNAL_4si); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_8hi", v8hi_ftype_pshort, ALTIVEC_BUILTIN_LD_INTERNAL_8hi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_8hi", void_ftype_pshort_v8hi, ALTIVEC_BUILTIN_ST_INTERNAL_8hi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_16qi", v16qi_ftype_pchar, ALTIVEC_BUILTIN_LD_INTERNAL_16qi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_16qi", void_ftype_pchar_v16qi, ALTIVEC_BUILTIN_ST_INTERNAL_16qi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_mtvscr", void_ftype_v4si, ALTIVEC_BUILTIN_MTVSCR); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_mfvscr", v8hi_ftype_void, ALTIVEC_BUILTIN_MFVSCR); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_dssall", void_ftype_void, ALTIVEC_BUILTIN_DSSALL); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_dss", void_ftype_qi, ALTIVEC_BUILTIN_DSS); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvsl", v16qi_ftype_int_pvoid, ALTIVEC_BUILTIN_LVSL); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvsr", v16qi_ftype_int_pvoid, ALTIVEC_BUILTIN_LVSR); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvebx", v16qi_ftype_int_pvoid, ALTIVEC_BUILTIN_LVEBX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvehx", v8hi_ftype_int_pvoid, ALTIVEC_BUILTIN_LVEHX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvewx", v4si_ftype_int_pvoid, ALTIVEC_BUILTIN_LVEWX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvxl", v4si_ftype_int_pvoid, ALTIVEC_BUILTIN_LVXL); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvx", v4si_ftype_int_pvoid, ALTIVEC_BUILTIN_LVX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvx", void_ftype_v4si_int_pvoid, ALTIVEC_BUILTIN_STVX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvebx", void_ftype_v16qi_int_pvoid, ALTIVEC_BUILTIN_STVEBX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvehx", void_ftype_v8hi_int_pvoid, ALTIVEC_BUILTIN_STVEHX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvewx", void_ftype_v4si_int_pvoid, ALTIVEC_BUILTIN_STVEWX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvxl", void_ftype_v4si_int_pvoid, ALTIVEC_BUILTIN_STVXL); /* Add the simple ternary operators. */ d = (struct builtin_description *) bdesc_3arg; ! for (i = 0; i < sizeof (bdesc_3arg) / sizeof *d; i++, d++) { enum machine_mode mode0, mode1, mode2, mode3; tree type; ! if (d->name == 0) continue; mode0 = insn_data[d->icode].operand[0].mode; --- 5168,5862 ---- enum machine_mode mode ATTRIBUTE_UNUSED; int ignore ATTRIBUTE_UNUSED; { + tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); + tree arglist = TREE_OPERAND (exp, 1); + unsigned int fcode = DECL_FUNCTION_CODE (fndecl); + struct builtin_description *d; + size_t i; + rtx ret; + bool success; + if (TARGET_ALTIVEC) ! { ! ret = altivec_expand_builtin (exp, target, &success); ! ! if (success) ! return ret; ! } ! if (TARGET_SPE) ! { ! ret = spe_expand_builtin (exp, target, &success); ! ! if (success) ! return ret; ! } ! ! if (TARGET_ALTIVEC || TARGET_SPE) ! { ! /* Handle simple unary operations. */ ! d = (struct builtin_description *) bdesc_1arg; ! for (i = 0; i < ARRAY_SIZE (bdesc_1arg); i++, d++) ! if (d->code == fcode) ! return rs6000_expand_unop_builtin (d->icode, arglist, target); ! ! /* Handle simple binary operations. */ ! d = (struct builtin_description *) bdesc_2arg; ! for (i = 0; i < ARRAY_SIZE (bdesc_2arg); i++, d++) ! if (d->code == fcode) ! return rs6000_expand_binop_builtin (d->icode, arglist, target); ! ! /* Handle simple ternary operations. */ ! d = (struct builtin_description *) bdesc_3arg; ! for (i = 0; i < ARRAY_SIZE (bdesc_3arg); i++, d++) ! if (d->code == fcode) ! return rs6000_expand_ternop_builtin (d->icode, arglist, target); ! } abort (); + return NULL_RTX; } static void rs6000_init_builtins () { + if (TARGET_SPE) + spe_init_builtins (); if (TARGET_ALTIVEC) altivec_init_builtins (); + if (TARGET_ALTIVEC || TARGET_SPE) + rs6000_common_init_builtins (); } + /* Search through a set of builtins and enable the mask bits. + DESC is an array of builtins. + SIZE is the totaly number of builtins. + START is the builtin enum at which to start. + END is the builtin enum at which to end. */ static void ! enable_mask_for_builtins (desc, size, start, end) ! struct builtin_description *desc; ! int size; ! enum rs6000_builtins start, end; { ! int i; ! for (i = 0; i < size; ++i) ! if (desc[i].code == start) ! break; ! if (i == size) ! return; ! for (; i < size; ++i) ! { ! /* Flip all the bits on. */ ! desc[i].mask = target_flags; ! if (desc[i].code == end) ! break; ! } ! } ! static void ! spe_init_builtins () ! { ! tree endlink = void_list_node; ! tree puint_type_node = build_pointer_type (unsigned_type_node); ! tree pushort_type_node = build_pointer_type (short_unsigned_type_node); ! tree pv2si_type_node = build_pointer_type (V2SI_type_node); ! struct builtin_description *d; ! size_t i; ! tree v2si_ftype_4_v2si ! = build_function_type ! (V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! endlink))))); ! tree v2sf_ftype_4_v2sf ! = build_function_type ! (V2SF_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! endlink))))); ! tree int_ftype_int_v2si_v2si ! = build_function_type ! (integer_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! endlink)))); ! tree int_ftype_int_v2sf_v2sf ! = build_function_type ! (integer_type_node, ! tree_cons (NULL_TREE, integer_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! tree_cons (NULL_TREE, V2SF_type_node, ! endlink)))); ! tree void_ftype_v2si_puint_int = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, puint_type_node, tree_cons (NULL_TREE, ! integer_type_node, endlink)))); ! tree void_ftype_v2si_puint_char = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, puint_type_node, tree_cons (NULL_TREE, ! char_type_node, endlink)))); ! tree void_ftype_v2si_pv2si_int = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, pv2si_type_node, tree_cons (NULL_TREE, ! integer_type_node, endlink)))); ! tree void_ftype_v2si_pv2si_char = build_function_type (void_type_node, ! tree_cons (NULL_TREE, V2SI_type_node, ! tree_cons (NULL_TREE, pv2si_type_node, tree_cons (NULL_TREE, ! char_type_node, endlink)))); ! tree void_ftype_int = build_function_type (void_type_node, ! tree_cons (NULL_TREE, integer_type_node, endlink)); ! tree int_ftype_void ! = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, void_type_node, endlink)); ! tree v2si_ftype_pv2si_int ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, pv2si_type_node, ! tree_cons (NULL_TREE, integer_type_node, endlink))); ! tree v2si_ftype_puint_int ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, puint_type_node, ! tree_cons (NULL_TREE, integer_type_node, endlink))); ! ! tree v2si_ftype_pushort_int ! = build_function_type (V2SI_type_node, ! tree_cons (NULL_TREE, pushort_type_node, ! tree_cons (NULL_TREE, integer_type_node, endlink))); ! /* The initialization of the simple binary and unary builtins is ! done in rs6000_common_init_builtins, but we have to enable the ! mask bits here manually because we have run out of `target_flags' ! bits. We really need to redesign this mask business. */ ! enable_mask_for_builtins ((struct builtin_description *) bdesc_2arg, ! ARRAY_SIZE (bdesc_2arg), ! SPE_BUILTIN_EVADDW, ! SPE_BUILTIN_EVXOR); ! enable_mask_for_builtins ((struct builtin_description *) bdesc_1arg, ! ARRAY_SIZE (bdesc_1arg), ! SPE_BUILTIN_EVABS, ! SPE_BUILTIN_EVSUBFUSIAAW); ! enable_mask_for_builtins ((struct builtin_description *) bdesc_spe_predicates, ! ARRAY_SIZE (bdesc_spe_predicates), ! SPE_BUILTIN_EVCMPEQ, ! SPE_BUILTIN_EVFSTSTLT); ! enable_mask_for_builtins ((struct builtin_description *) bdesc_spe_evsel, ! ARRAY_SIZE (bdesc_spe_evsel), ! SPE_BUILTIN_EVSEL_CMPGTS, ! SPE_BUILTIN_EVSEL_FSTSTEQ); ! /* Initialize irregular SPE builtins. */ ! ! def_builtin (target_flags, "__builtin_spe_mtspefscr", void_ftype_int, SPE_BUILTIN_MTSPEFSCR); ! def_builtin (target_flags, "__builtin_spe_mfspefscr", int_ftype_void, SPE_BUILTIN_MFSPEFSCR); ! def_builtin (target_flags, "__builtin_spe_evstddx", void_ftype_v2si_pv2si_int, SPE_BUILTIN_EVSTDDX); ! def_builtin (target_flags, "__builtin_spe_evstdhx", void_ftype_v2si_pv2si_int, SPE_BUILTIN_EVSTDHX); ! def_builtin (target_flags, "__builtin_spe_evstdwx", void_ftype_v2si_pv2si_int, SPE_BUILTIN_EVSTDWX); ! def_builtin (target_flags, "__builtin_spe_evstwhex", void_ftype_v2si_puint_int, SPE_BUILTIN_EVSTWHEX); ! def_builtin (target_flags, "__builtin_spe_evstwhox", void_ftype_v2si_puint_int, SPE_BUILTIN_EVSTWHOX); ! def_builtin (target_flags, "__builtin_spe_evstwwex", void_ftype_v2si_puint_int, SPE_BUILTIN_EVSTWWEX); ! def_builtin (target_flags, "__builtin_spe_evstwwox", void_ftype_v2si_puint_int, SPE_BUILTIN_EVSTWWOX); ! def_builtin (target_flags, "__builtin_spe_evstdd", void_ftype_v2si_pv2si_char, SPE_BUILTIN_EVSTDD); ! def_builtin (target_flags, "__builtin_spe_evstdh", void_ftype_v2si_pv2si_char, SPE_BUILTIN_EVSTDH); ! def_builtin (target_flags, "__builtin_spe_evstdw", void_ftype_v2si_pv2si_char, SPE_BUILTIN_EVSTDW); ! def_builtin (target_flags, "__builtin_spe_evstwhe", void_ftype_v2si_puint_char, SPE_BUILTIN_EVSTWHE); ! def_builtin (target_flags, "__builtin_spe_evstwho", void_ftype_v2si_puint_char, SPE_BUILTIN_EVSTWHO); ! def_builtin (target_flags, "__builtin_spe_evstwwe", void_ftype_v2si_puint_char, SPE_BUILTIN_EVSTWWE); ! def_builtin (target_flags, "__builtin_spe_evstwwo", void_ftype_v2si_puint_char, SPE_BUILTIN_EVSTWWO); ! /* Loads. */ ! def_builtin (target_flags, "__builtin_spe_evlddx", v2si_ftype_pv2si_int, SPE_BUILTIN_EVLDDX); ! def_builtin (target_flags, "__builtin_spe_evldwx", v2si_ftype_pv2si_int, SPE_BUILTIN_EVLDWX); ! def_builtin (target_flags, "__builtin_spe_evldhx", v2si_ftype_pv2si_int, SPE_BUILTIN_EVLDHX); ! def_builtin (target_flags, "__builtin_spe_evlwhex", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHEX); ! def_builtin (target_flags, "__builtin_spe_evlwhoux", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHOUX); ! def_builtin (target_flags, "__builtin_spe_evlwhosx", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHOSX); ! def_builtin (target_flags, "__builtin_spe_evlwwsplatx", v2si_ftype_puint_int, SPE_BUILTIN_EVLWWSPLATX); ! def_builtin (target_flags, "__builtin_spe_evlwhsplatx", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHSPLATX); ! def_builtin (target_flags, "__builtin_spe_evlhhesplatx", v2si_ftype_pushort_int, SPE_BUILTIN_EVLHHESPLATX); ! def_builtin (target_flags, "__builtin_spe_evlhhousplatx", v2si_ftype_pushort_int, SPE_BUILTIN_EVLHHOUSPLATX); ! def_builtin (target_flags, "__builtin_spe_evlhhossplatx", v2si_ftype_pushort_int, SPE_BUILTIN_EVLHHOSSPLATX); ! def_builtin (target_flags, "__builtin_spe_evldd", v2si_ftype_pv2si_int, SPE_BUILTIN_EVLDD); ! def_builtin (target_flags, "__builtin_spe_evldw", v2si_ftype_pv2si_int, SPE_BUILTIN_EVLDW); ! def_builtin (target_flags, "__builtin_spe_evldh", v2si_ftype_pv2si_int, SPE_BUILTIN_EVLDH); ! def_builtin (target_flags, "__builtin_spe_evlhhesplat", v2si_ftype_pushort_int, SPE_BUILTIN_EVLHHESPLAT); ! def_builtin (target_flags, "__builtin_spe_evlhhossplat", v2si_ftype_pushort_int, SPE_BUILTIN_EVLHHOSSPLAT); ! def_builtin (target_flags, "__builtin_spe_evlhhousplat", v2si_ftype_pushort_int, SPE_BUILTIN_EVLHHOUSPLAT); ! def_builtin (target_flags, "__builtin_spe_evlwhe", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHE); ! def_builtin (target_flags, "__builtin_spe_evlwhos", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHOS); ! def_builtin (target_flags, "__builtin_spe_evlwhou", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHOU); ! def_builtin (target_flags, "__builtin_spe_evlwhsplat", v2si_ftype_puint_int, SPE_BUILTIN_EVLWHSPLAT); ! def_builtin (target_flags, "__builtin_spe_evlwwsplat", v2si_ftype_puint_int, SPE_BUILTIN_EVLWWSPLAT); ! /* Predicates. */ ! d = (struct builtin_description *) bdesc_spe_predicates; ! for (i = 0; i < ARRAY_SIZE (bdesc_spe_predicates); ++i, d++) ! { ! tree type; ! switch (insn_data[d->icode].operand[1].mode) ! { ! case V2SImode: ! type = int_ftype_int_v2si_v2si; ! break; ! case V2SFmode: ! type = int_ftype_int_v2sf_v2sf; ! break; ! default: ! abort (); ! } ! def_builtin (d->mask, d->name, type, d->code); ! } ! /* Evsel predicates. */ ! d = (struct builtin_description *) bdesc_spe_evsel; ! for (i = 0; i < ARRAY_SIZE (bdesc_spe_evsel); ++i, d++) ! { ! tree type; ! switch (insn_data[d->icode].operand[1].mode) ! { ! case V2SImode: ! type = v2si_ftype_4_v2si; ! break; ! case V2SFmode: ! type = v2sf_ftype_4_v2sf; ! break; ! default: ! abort (); ! } ! def_builtin (d->mask, d->name, type, d->code); ! } ! } ! ! static void ! altivec_init_builtins () ! { ! struct builtin_description *d; ! struct builtin_description_predicates *dp; ! size_t i; ! tree pfloat_type_node = build_pointer_type (float_type_node); ! tree pint_type_node = build_pointer_type (integer_type_node); ! tree pshort_type_node = build_pointer_type (short_integer_type_node); ! tree pchar_type_node = build_pointer_type (char_type_node); ! ! tree pvoid_type_node = build_pointer_type (void_type_node); ! ! tree pcfloat_type_node = build_pointer_type (build_qualified_type (float_type_node, TYPE_QUAL_CONST)); ! tree pcint_type_node = build_pointer_type (build_qualified_type (integer_type_node, TYPE_QUAL_CONST)); ! tree pcshort_type_node = build_pointer_type (build_qualified_type (short_integer_type_node, TYPE_QUAL_CONST)); ! tree pcchar_type_node = build_pointer_type (build_qualified_type (char_type_node, TYPE_QUAL_CONST)); ! ! tree pcvoid_type_node = build_pointer_type (build_qualified_type (void_type_node, TYPE_QUAL_CONST)); + tree int_ftype_int_v4si_v4si + = build_function_type_list (integer_type_node, + integer_type_node, V4SI_type_node, + V4SI_type_node, NULL_TREE); + tree v4sf_ftype_pcfloat + = build_function_type_list (V4SF_type_node, pcfloat_type_node, NULL_TREE); + tree void_ftype_pfloat_v4sf + = build_function_type_list (void_type_node, + pfloat_type_node, V4SF_type_node, NULL_TREE); + tree v4si_ftype_pcint + = build_function_type_list (V4SI_type_node, pcint_type_node, NULL_TREE); + tree void_ftype_pint_v4si + = build_function_type_list (void_type_node, + pint_type_node, V4SI_type_node, NULL_TREE); + tree v8hi_ftype_pcshort + = build_function_type_list (V8HI_type_node, pcshort_type_node, NULL_TREE); + tree void_ftype_pshort_v8hi + = build_function_type_list (void_type_node, + pshort_type_node, V8HI_type_node, NULL_TREE); + tree v16qi_ftype_pcchar + = build_function_type_list (V16QI_type_node, pcchar_type_node, NULL_TREE); + tree void_ftype_pchar_v16qi + = build_function_type_list (void_type_node, + pchar_type_node, V16QI_type_node, NULL_TREE); + tree void_ftype_v4si + = build_function_type_list (void_type_node, V4SI_type_node, NULL_TREE); + tree v8hi_ftype_void + = build_function_type (V8HI_type_node, void_list_node); + tree void_ftype_void + = build_function_type (void_type_node, void_list_node); + tree void_ftype_qi + = build_function_type_list (void_type_node, char_type_node, NULL_TREE); + + tree v16qi_ftype_int_pcvoid + = build_function_type_list (V16QI_type_node, + integer_type_node, pcvoid_type_node, NULL_TREE); + tree v8hi_ftype_int_pcvoid + = build_function_type_list (V8HI_type_node, + integer_type_node, pcvoid_type_node, NULL_TREE); + tree v4si_ftype_int_pcvoid + = build_function_type_list (V4SI_type_node, + integer_type_node, pcvoid_type_node, NULL_TREE); + + tree void_ftype_v4si_int_pvoid + = build_function_type_list (void_type_node, + V4SI_type_node, integer_type_node, + pvoid_type_node, NULL_TREE); + tree void_ftype_v16qi_int_pvoid + = build_function_type_list (void_type_node, + V16QI_type_node, integer_type_node, + pvoid_type_node, NULL_TREE); + tree void_ftype_v8hi_int_pvoid + = build_function_type_list (void_type_node, + V8HI_type_node, integer_type_node, + pvoid_type_node, NULL_TREE); + tree int_ftype_int_v8hi_v8hi + = build_function_type_list (integer_type_node, + integer_type_node, V8HI_type_node, + V8HI_type_node, NULL_TREE); + tree int_ftype_int_v16qi_v16qi + = build_function_type_list (integer_type_node, + integer_type_node, V16QI_type_node, + V16QI_type_node, NULL_TREE); + tree int_ftype_int_v4sf_v4sf + = build_function_type_list (integer_type_node, + integer_type_node, V4SF_type_node, + V4SF_type_node, NULL_TREE); + tree v4si_ftype_v4si + = build_function_type_list (V4SI_type_node, V4SI_type_node, NULL_TREE); + tree v8hi_ftype_v8hi + = build_function_type_list (V8HI_type_node, V8HI_type_node, NULL_TREE); tree v16qi_ftype_v16qi ! = build_function_type_list (V16QI_type_node, V16QI_type_node, NULL_TREE); ! tree v4sf_ftype_v4sf ! = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE); ! tree void_ftype_pcvoid_int_char ! = build_function_type_list (void_type_node, ! pcvoid_type_node, integer_type_node, ! char_type_node, NULL_TREE); ! ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4sf", v4sf_ftype_pcfloat, ! ALTIVEC_BUILTIN_LD_INTERNAL_4sf); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4sf", void_ftype_pfloat_v4sf, ! ALTIVEC_BUILTIN_ST_INTERNAL_4sf); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4si", v4si_ftype_pcint, ! ALTIVEC_BUILTIN_LD_INTERNAL_4si); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4si", void_ftype_pint_v4si, ! ALTIVEC_BUILTIN_ST_INTERNAL_4si); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_8hi", v8hi_ftype_pcshort, ! ALTIVEC_BUILTIN_LD_INTERNAL_8hi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_8hi", void_ftype_pshort_v8hi, ! ALTIVEC_BUILTIN_ST_INTERNAL_8hi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_16qi", v16qi_ftype_pcchar, ! ALTIVEC_BUILTIN_LD_INTERNAL_16qi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_16qi", void_ftype_pchar_v16qi, ! ALTIVEC_BUILTIN_ST_INTERNAL_16qi); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_mtvscr", void_ftype_v4si, ALTIVEC_BUILTIN_MTVSCR); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_mfvscr", v8hi_ftype_void, ALTIVEC_BUILTIN_MFVSCR); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_dssall", void_ftype_void, ALTIVEC_BUILTIN_DSSALL); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_dss", void_ftype_qi, ALTIVEC_BUILTIN_DSS); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvsl", v16qi_ftype_int_pcvoid, ALTIVEC_BUILTIN_LVSL); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvsr", v16qi_ftype_int_pcvoid, ALTIVEC_BUILTIN_LVSR); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvebx", v16qi_ftype_int_pcvoid, ALTIVEC_BUILTIN_LVEBX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvehx", v8hi_ftype_int_pcvoid, ALTIVEC_BUILTIN_LVEHX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvewx", v4si_ftype_int_pcvoid, ALTIVEC_BUILTIN_LVEWX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvxl", v4si_ftype_int_pcvoid, ALTIVEC_BUILTIN_LVXL); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvx", v4si_ftype_int_pcvoid, ALTIVEC_BUILTIN_LVX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvx", void_ftype_v4si_int_pvoid, ALTIVEC_BUILTIN_STVX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvewx", void_ftype_v4si_int_pvoid, ALTIVEC_BUILTIN_STVEWX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvxl", void_ftype_v4si_int_pvoid, ALTIVEC_BUILTIN_STVXL); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvebx", void_ftype_v16qi_int_pvoid, ALTIVEC_BUILTIN_STVEBX); ! def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvehx", void_ftype_v8hi_int_pvoid, ALTIVEC_BUILTIN_STVEHX); ! /* Add the DST variants. */ ! d = (struct builtin_description *) bdesc_dst; ! for (i = 0; i < ARRAY_SIZE (bdesc_dst); i++, d++) ! def_builtin (d->mask, d->name, void_ftype_pcvoid_int_char, d->code); ! /* Initialize the predicates. */ ! dp = (struct builtin_description_predicates *) bdesc_altivec_preds; ! for (i = 0; i < ARRAY_SIZE (bdesc_altivec_preds); i++, dp++) ! { ! enum machine_mode mode1; ! tree type; ! mode1 = insn_data[dp->icode].operand[1].mode; ! switch (mode1) ! { ! case V4SImode: ! type = int_ftype_int_v4si_v4si; ! break; ! case V8HImode: ! type = int_ftype_int_v8hi_v8hi; ! break; ! case V16QImode: ! type = int_ftype_int_v16qi_v16qi; ! break; ! case V4SFmode: ! type = int_ftype_int_v4sf_v4sf; ! break; ! default: ! abort (); ! } ! ! def_builtin (dp->mask, dp->name, type, dp->code); ! } ! /* Initialize the abs* operators. */ ! d = (struct builtin_description *) bdesc_abs; ! for (i = 0; i < ARRAY_SIZE (bdesc_abs); i++, d++) ! { ! enum machine_mode mode0; ! tree type; ! mode0 = insn_data[d->icode].operand[0].mode; ! switch (mode0) ! { ! case V4SImode: ! type = v4si_ftype_v4si; ! break; ! case V8HImode: ! type = v8hi_ftype_v8hi; ! break; ! case V16QImode: ! type = v16qi_ftype_v16qi; ! break; ! case V4SFmode: ! type = v4sf_ftype_v4sf; ! break; ! default: ! abort (); ! } ! ! def_builtin (d->mask, d->name, type, d->code); ! } ! } ! static void ! rs6000_common_init_builtins () ! { ! struct builtin_description *d; ! size_t i; ! tree v4sf_ftype_v4sf_v4sf_v16qi ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V4SF_type_node, ! V16QI_type_node, NULL_TREE); ! tree v4si_ftype_v4si_v4si_v16qi ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, V4SI_type_node, ! V16QI_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_v8hi_v16qi ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, V8HI_type_node, ! V16QI_type_node, NULL_TREE); ! tree v16qi_ftype_v16qi_v16qi_v16qi ! = build_function_type_list (V16QI_type_node, ! V16QI_type_node, V16QI_type_node, ! V16QI_type_node, NULL_TREE); ! tree v4si_ftype_char ! = build_function_type_list (V4SI_type_node, char_type_node, NULL_TREE); ! tree v8hi_ftype_char ! = build_function_type_list (V8HI_type_node, char_type_node, NULL_TREE); ! tree v16qi_ftype_char ! = build_function_type_list (V16QI_type_node, char_type_node, NULL_TREE); ! tree v8hi_ftype_v16qi ! = build_function_type_list (V8HI_type_node, V16QI_type_node, NULL_TREE); ! tree v4sf_ftype_v4sf ! = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE); ! tree v2si_ftype_v2si_v2si ! = build_function_type_list (V2SI_type_node, ! V2SI_type_node, V2SI_type_node, NULL_TREE); ! tree v2sf_ftype_v2sf_v2sf ! = build_function_type_list (V2SF_type_node, ! V2SF_type_node, V2SF_type_node, NULL_TREE); ! tree v2si_ftype_int_int ! = build_function_type_list (V2SI_type_node, ! integer_type_node, integer_type_node, ! NULL_TREE); ! tree v2si_ftype_v2si ! = build_function_type_list (V2SI_type_node, V2SI_type_node, NULL_TREE); ! tree v2sf_ftype_v2sf ! = build_function_type_list (V2SF_type_node, ! V2SF_type_node, NULL_TREE); ! ! tree v2sf_ftype_v2si ! = build_function_type_list (V2SF_type_node, ! V2SI_type_node, NULL_TREE); ! tree v2si_ftype_v2sf ! = build_function_type_list (V2SI_type_node, ! V2SF_type_node, NULL_TREE); ! tree v2si_ftype_v2si_char ! = build_function_type_list (V2SI_type_node, ! V2SI_type_node, char_type_node, NULL_TREE); ! tree v2si_ftype_int_char ! = build_function_type_list (V2SI_type_node, ! integer_type_node, char_type_node, NULL_TREE); ! tree v2si_ftype_char ! = build_function_type_list (V2SI_type_node, char_type_node, NULL_TREE); ! tree int_ftype_int_int ! = build_function_type_list (integer_type_node, ! integer_type_node, integer_type_node, ! NULL_TREE); ! tree v4si_ftype_v4si_v4si ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, V4SI_type_node, NULL_TREE); ! tree v4sf_ftype_v4si_char ! = build_function_type_list (V4SF_type_node, ! V4SI_type_node, char_type_node, NULL_TREE); ! tree v4si_ftype_v4sf_char ! = build_function_type_list (V4SI_type_node, ! V4SF_type_node, char_type_node, NULL_TREE); ! tree v4si_ftype_v4si_char ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, char_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_char ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, char_type_node, NULL_TREE); ! tree v16qi_ftype_v16qi_char ! = build_function_type_list (V16QI_type_node, ! V16QI_type_node, char_type_node, NULL_TREE); ! tree v16qi_ftype_v16qi_v16qi_char ! = build_function_type_list (V16QI_type_node, ! V16QI_type_node, V16QI_type_node, ! char_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_v8hi_char ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, V8HI_type_node, ! char_type_node, NULL_TREE); ! tree v4si_ftype_v4si_v4si_char ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, V4SI_type_node, ! char_type_node, NULL_TREE); ! tree v4sf_ftype_v4sf_v4sf_char ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V4SF_type_node, ! char_type_node, NULL_TREE); ! tree v4sf_ftype_v4sf_v4sf ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V4SF_type_node, NULL_TREE); ! tree v4sf_ftype_v4sf_v4sf_v4si ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V4SF_type_node, ! V4SI_type_node, NULL_TREE); ! tree v4sf_ftype_v4sf_v4sf_v4sf ! = build_function_type_list (V4SF_type_node, ! V4SF_type_node, V4SF_type_node, ! V4SF_type_node, NULL_TREE); ! tree v4si_ftype_v4si_v4si_v4si ! = build_function_type_list (V4SI_type_node, ! V4SI_type_node, V4SI_type_node, ! V4SI_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_v8hi ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, V8HI_type_node, NULL_TREE); ! tree v8hi_ftype_v8hi_v8hi_v8hi ! = build_function_type_list (V8HI_type_node, ! V8HI_type_node, V8HI_type_node, ! V8HI_type_node, NULL_TREE); ! tree v4si_ftype_v8hi_v8hi_v4si ! = build_function_type_list (V4SI_type_node, ! V8HI_type_node, V8HI_type_node, ! V4SI_type_node, NULL_TREE); ! tree v4si_ftype_v16qi_v16qi_v4si ! = build_function_type_list (V4SI_type_node, ! V16QI_type_node, V16QI_type_node, ! V4SI_type_node, NULL_TREE); ! tree v16qi_ftype_v16qi_v16qi ! = build_function_type_list (V16QI_type_node, ! V16QI_type_node, V16QI_type_node, NULL_TREE); ! tree v4si_ftype_v4sf_v4sf ! = build_function_type_list (V4SI_type_node, ! V4SF_type_node, V4SF_type_node, NULL_TREE); ! tree v8hi_ftype_v16qi_v16qi ! = build_function_type_list (V8HI_type_node, ! V16QI_type_node, V16QI_type_node, NULL_TREE); ! tree v4si_ftype_v8hi_v8hi ! = build_function_type_list (V4SI_type_node, ! V8HI_type_node, V8HI_type_node, NULL_TREE); ! tree v8hi_ftype_v4si_v4si ! = build_function_type_list (V8HI_type_node, ! V4SI_type_node, V4SI_type_node, NULL_TREE); ! tree v16qi_ftype_v8hi_v8hi ! = build_function_type_list (V16QI_type_node, ! V8HI_type_node, V8HI_type_node, NULL_TREE); ! tree v4si_ftype_v16qi_v4si ! = build_function_type_list (V4SI_type_node, ! V16QI_type_node, V4SI_type_node, NULL_TREE); ! tree v4si_ftype_v16qi_v16qi ! = build_function_type_list (V4SI_type_node, ! V16QI_type_node, V16QI_type_node, NULL_TREE); ! tree v4si_ftype_v8hi_v4si ! = build_function_type_list (V4SI_type_node, ! V8HI_type_node, V4SI_type_node, NULL_TREE); ! tree v4si_ftype_v8hi ! = build_function_type_list (V4SI_type_node, V8HI_type_node, NULL_TREE); ! tree int_ftype_v4si_v4si ! = build_function_type_list (integer_type_node, ! V4SI_type_node, V4SI_type_node, NULL_TREE); ! tree int_ftype_v4sf_v4sf ! = build_function_type_list (integer_type_node, ! V4SF_type_node, V4SF_type_node, NULL_TREE); ! tree int_ftype_v16qi_v16qi ! = build_function_type_list (integer_type_node, ! V16QI_type_node, V16QI_type_node, NULL_TREE); ! tree int_ftype_v8hi_v8hi ! = build_function_type_list (integer_type_node, ! V8HI_type_node, V8HI_type_node, NULL_TREE); /* Add the simple ternary operators. */ d = (struct builtin_description *) bdesc_3arg; ! for (i = 0; i < ARRAY_SIZE (bdesc_3arg); i++, d++) { enum machine_mode mode0, mode1, mode2, mode3; tree type; ! if (d->name == 0 || d->icode == CODE_FOR_nothing) continue; mode0 = insn_data[d->icode].operand[0].mode; *************** altivec_init_builtins (void) *** 4694,4742 **** def_builtin (d->mask, d->name, type, d->code); } - /* Add the DST variants. */ - d = (struct builtin_description *) bdesc_dst; - for (i = 0; i < sizeof (bdesc_dst) / sizeof *d; i++, d++) - def_builtin (d->mask, d->name, void_ftype_pvoid_int_char, d->code); - - /* Initialize the predicates. */ - dp = (struct builtin_description_predicates *) bdesc_altivec_preds; - for (i = 0; i < sizeof (bdesc_altivec_preds) / sizeof *dp; i++, dp++) - { - enum machine_mode mode1; - tree type; - - mode1 = insn_data[dp->icode].operand[1].mode; - - switch (mode1) - { - case V4SImode: - type = int_ftype_int_v4si_v4si; - break; - case V8HImode: - type = int_ftype_int_v8hi_v8hi; - break; - case V16QImode: - type = int_ftype_int_v16qi_v16qi; - break; - case V4SFmode: - type = int_ftype_int_v4sf_v4sf; - break; - default: - abort (); - } - - def_builtin (dp->mask, dp->name, type, dp->code); - } - /* Add the simple binary operators. */ d = (struct builtin_description *) bdesc_2arg; ! for (i = 0; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++) { enum machine_mode mode0, mode1, mode2; tree type; ! if (d->name == 0) continue; mode0 = insn_data[d->icode].operand[0].mode; --- 5941,5954 ---- def_builtin (d->mask, d->name, type, d->code); } /* Add the simple binary operators. */ d = (struct builtin_description *) bdesc_2arg; ! for (i = 0; i < ARRAY_SIZE (bdesc_2arg); i++, d++) { enum machine_mode mode0, mode1, mode2; tree type; ! if (d->name == 0 || d->icode == CODE_FOR_nothing) continue; mode0 = insn_data[d->icode].operand[0].mode; *************** altivec_init_builtins (void) *** 4760,4765 **** --- 5972,5986 ---- case V8HImode: type = v8hi_ftype_v8hi_v8hi; break; + case V2SImode: + type = v2si_ftype_v2si_v2si; + break; + case V2SFmode: + type = v2sf_ftype_v2sf_v2sf; + break; + case SImode: + type = int_ftype_int_int; + break; default: abort (); } *************** altivec_init_builtins (void) *** 4819,4824 **** --- 6040,6054 ---- else if (mode0 == V4SImode && mode1 == V4SFmode && mode2 == QImode) type = v4si_ftype_v4sf_char; + else if (mode0 == V2SImode && mode1 == SImode && mode2 == SImode) + type = v2si_ftype_int_int; + + else if (mode0 == V2SImode && mode1 == V2SImode && mode2 == QImode) + type = v2si_ftype_v2si_char; + + else if (mode0 == V2SImode && mode1 == SImode && mode2 == QImode) + type = v2si_ftype_int_char; + /* int, x, x. */ else if (mode0 == SImode) { *************** altivec_init_builtins (void) *** 4847,4890 **** def_builtin (d->mask, d->name, type, d->code); } - /* Initialize the abs* operators. */ - d = (struct builtin_description *) bdesc_abs; - for (i = 0; i < sizeof (bdesc_abs) / sizeof *d; i++, d++) - { - enum machine_mode mode0; - tree type; - - mode0 = insn_data[d->icode].operand[0].mode; - - switch (mode0) - { - case V4SImode: - type = v4si_ftype_v4si; - break; - case V8HImode: - type = v8hi_ftype_v8hi; - break; - case V16QImode: - type = v16qi_ftype_v16qi; - break; - case V4SFmode: - type = v4sf_ftype_v4sf; - break; - default: - abort (); - } - - def_builtin (d->mask, d->name, type, d->code); - } - /* Add the simple unary operators. */ d = (struct builtin_description *) bdesc_1arg; ! for (i = 0; i < sizeof (bdesc_1arg) / sizeof *d; i++, d++) { enum machine_mode mode0, mode1; tree type; ! if (d->name == 0) continue; mode0 = insn_data[d->icode].operand[0].mode; --- 6077,6090 ---- def_builtin (d->mask, d->name, type, d->code); } /* Add the simple unary operators. */ d = (struct builtin_description *) bdesc_1arg; ! for (i = 0; i < ARRAY_SIZE (bdesc_1arg); i++, d++) { enum machine_mode mode0, mode1; tree type; ! if (d->name == 0 || d->icode == CODE_FOR_nothing) continue; mode0 = insn_data[d->icode].operand[0].mode; *************** altivec_init_builtins (void) *** 4902,4907 **** --- 6102,6117 ---- type = v8hi_ftype_v16qi; else if (mode0 == V4SImode && mode1 == V8HImode) type = v4si_ftype_v8hi; + else if (mode0 == V2SImode && mode1 == V2SImode) + type = v2si_ftype_v2si; + else if (mode0 == V2SFmode && mode1 == V2SFmode) + type = v2sf_ftype_v2sf; + else if (mode0 == V2SFmode && mode1 == V2SImode) + type = v2sf_ftype_v2si; + else if (mode0 == V2SImode && mode1 == V2SFmode) + type = v2si_ftype_v2sf; + else if (mode0 == V2SImode && mode1 == QImode) + type = v2si_ftype_char; else abort (); *************** validate_condition_mode (code, mode) *** 5550,5558 **** abort (); /* These should never be generated except for ! flag_unsafe_math_optimizations. */ if (mode == CCFPmode && ! flag_unsafe_math_optimizations && (code == LE || code == GE || code == UNEQ || code == LTGT || code == UNGT || code == UNLT)) --- 6760,6769 ---- abort (); /* These should never be generated except for ! flag_unsafe_math_optimizations and flag_finite_math_only. */ if (mode == CCFPmode && ! flag_unsafe_math_optimizations + && ! flag_finite_math_only && (code == LE || code == GE || code == UNEQ || code == LTGT || code == UNGT || code == UNLT)) *************** branch_positive_comparison_operator (op, *** 5603,5608 **** --- 6814,6820 ---- code = GET_CODE (op); return (code == EQ || code == LT || code == GT + || (TARGET_SPE && TARGET_HARD_FLOAT && !TARGET_FPRS && code == NE) || code == LTU || code == GTU || code == UNORDERED); } *************** ccr_bit (op, scc_p) *** 6054,6061 **** --- 7266,7277 ---- switch (code) { case NE: + if (TARGET_SPE && TARGET_HARD_FLOAT && cc_mode == CCFPmode) + return base_bit + 1; return scc_p ? base_bit + 3 : base_bit + 2; case EQ: + if (TARGET_SPE && TARGET_HARD_FLOAT && cc_mode == CCFPmode) + return base_bit + 1; return base_bit + 2; case GT: case GTU: case UNLE: return base_bit + 1; *************** rs6000_got_register (value) *** 6095,6123 **** return pic_offset_table_rtx; } ! /* Functions to init, mark and free struct machine_function. ! These will be called, via pointer variables, ! from push_function_context and pop_function_context. */ ! static void ! rs6000_init_machine_status (p) ! struct function *p; { ! p->machine = (machine_function *) xcalloc (1, sizeof (machine_function)); } ! static void ! rs6000_free_machine_status (p) ! struct function *p; { ! if (p->machine == NULL) ! return; ! free (p->machine); ! p->machine = NULL; } - /* Print an operand. Recognize special options, documented below. */ #if TARGET_ELF --- 7311,7403 ---- return pic_offset_table_rtx; } ! /* Function to init struct machine_function. ! This will be called, via a pointer variable, ! from push_function_context. */ ! static struct machine_function * ! rs6000_init_machine_status () { ! return ggc_alloc_cleared (sizeof (machine_function)); } + + /* These macros test for integers and extract the low-order bits. */ + #define INT_P(X) \ + ((GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST_DOUBLE) \ + && GET_MODE (X) == VOIDmode) ! #define INT_LOWPART(X) \ ! (GET_CODE (X) == CONST_INT ? INTVAL (X) : CONST_DOUBLE_LOW (X)) ! ! int ! extract_MB (op) ! rtx op; { ! int i; ! unsigned long val = INT_LOWPART (op); ! /* If the high bit is zero, the value is the first 1 bit we find ! from the left. */ ! if ((val & 0x80000000) == 0) ! { ! if ((val & 0xffffffff) == 0) ! abort (); ! ! i = 1; ! while (((val <<= 1) & 0x80000000) == 0) ! ++i; ! return i; ! } ! ! /* If the high bit is set and the low bit is not, or the mask is all ! 1's, the value is zero. */ ! if ((val & 1) == 0 || (val & 0xffffffff) == 0xffffffff) ! return 0; ! ! /* Otherwise we have a wrap-around mask. Look for the first 0 bit ! from the right. */ ! i = 31; ! while (((val >>= 1) & 1) != 0) ! --i; ! ! return i; ! } ! ! int ! extract_ME (op) ! rtx op; ! { ! int i; ! unsigned long val = INT_LOWPART (op); ! ! /* If the low bit is zero, the value is the first 1 bit we find from ! the right. */ ! if ((val & 1) == 0) ! { ! if ((val & 0xffffffff) == 0) ! abort (); ! ! i = 30; ! while (((val >>= 1) & 1) == 0) ! --i; ! ! return i; ! } ! ! /* If the low bit is set and the high bit is not, or the mask is all ! 1's, the value is 31. */ ! if ((val & 0x80000000) == 0 || (val & 0xffffffff) == 0xffffffff) ! return 31; ! ! /* Otherwise we have a wrap-around mask. Look for the first 0 bit ! from the left. */ ! i = 0; ! while (((val <<= 1) & 0x80000000) != 0) ! ++i; ! ! return i; } /* Print an operand. Recognize special options, documented below. */ #if TARGET_ELF *************** print_operand (file, x, code) *** 6136,6149 **** { int i; HOST_WIDE_INT val; ! ! /* These macros test for integers and extract the low-order bits. */ ! #define INT_P(X) \ ! ((GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST_DOUBLE) \ ! && GET_MODE (X) == VOIDmode) ! ! #define INT_LOWPART(X) \ ! (GET_CODE (X) == CONST_INT ? INTVAL (X) : CONST_DOUBLE_LOW (X)) switch (code) { --- 7416,7422 ---- { int i; HOST_WIDE_INT val; ! unsigned HOST_WIDE_INT uval; switch (code) { *************** print_operand (file, x, code) *** 6209,6214 **** --- 7482,7496 ---- fprintf (file, "crnor %d,%d,%d\n\t", base_bit + 3, base_bit + 2, base_bit + 2); } + else if (TARGET_SPE && TARGET_HARD_FLOAT + && GET_CODE (x) == EQ + && GET_MODE (XEXP (x, 0)) == CCFPmode) + { + int base_bit = 4 * (REGNO (XEXP (x, 0)) - CR0_REGNO); + + fprintf (file, "crnor %d,%d,%d\n\t", base_bit + 1, + base_bit + 1, base_bit + 1); + } return; case 'E': *************** print_operand (file, x, code) *** 6239,6245 **** case 'G': /* X is a constant integer. If it is negative, print "m", ! otherwise print "z". This is to make a aze or ame insn. */ if (GET_CODE (x) != CONST_INT) output_operand_lossage ("invalid %%G value"); else if (INTVAL (x) >= 0) --- 7521,7527 ---- case 'G': /* X is a constant integer. If it is negative, print "m", ! otherwise print "z". This is to make an aze or ame insn. */ if (GET_CODE (x) != CONST_INT) output_operand_lossage ("invalid %%G value"); else if (INTVAL (x) >= 0) *************** print_operand (file, x, code) *** 6319,6324 **** --- 7601,7611 ---- output_operand_lossage ("invalid %%K value"); print_operand_address (file, XEXP (XEXP (x, 0), 0)); fputs ("@l", file); + /* For GNU as, there must be a non-alphanumeric character + between 'l' and the number. The '-' is added by + print_operand() already. */ + if (INTVAL (XEXP (XEXP (x, 0), 1)) >= 0) + fputs ("+", file); print_operand (file, XEXP (XEXP (x, 0), 1), 0); } return; *************** print_operand (file, x, code) *** 6354,6387 **** if (! mask_operand (x, SImode)) output_operand_lossage ("invalid %%m value"); ! val = INT_LOWPART (x); ! ! /* If the high bit is set and the low bit is not, the value is zero. ! If the high bit is zero, the value is the first 1 bit we find from ! the left. */ ! if ((val & 0x80000000) && ((val & 1) == 0)) ! { ! putc ('0', file); ! return; ! } ! else if ((val & 0x80000000) == 0) ! { ! for (i = 1; i < 32; i++) ! if ((val <<= 1) & 0x80000000) ! break; ! fprintf (file, "%d", i); ! return; ! } ! ! /* Otherwise, look for the first 0 bit from the right. The result is its ! number plus 1. We know the low-order bit is one. */ ! for (i = 0; i < 32; i++) ! if (((val >>= 1) & 1) == 0) ! break; ! ! /* If we ended in ...01, i would be 0. The correct value is 31, so ! we want 31 - i. */ ! fprintf (file, "%d", 31 - i); return; case 'M': --- 7641,7647 ---- if (! mask_operand (x, SImode)) output_operand_lossage ("invalid %%m value"); ! fprintf (file, "%d", extract_MB (x)); return; case 'M': *************** print_operand (file, x, code) *** 6389,6423 **** if (! mask_operand (x, SImode)) output_operand_lossage ("invalid %%M value"); ! val = INT_LOWPART (x); ! ! /* If the low bit is set and the high bit is not, the value is 31. ! If the low bit is zero, the value is the first 1 bit we find from ! the right. */ ! if ((val & 1) && ((val & 0x80000000) == 0)) ! { ! fputs ("31", file); ! return; ! } ! else if ((val & 1) == 0) ! { ! for (i = 0; i < 32; i++) ! if ((val >>= 1) & 1) ! break; ! ! /* If we had ....10, i would be 0. The result should be ! 30, so we need 30 - i. */ ! fprintf (file, "%d", 30 - i); ! return; ! } ! ! /* Otherwise, look for the first 0 bit from the left. The result is its ! number minus 1. We know the high-order bit is one. */ ! for (i = 0; i < 32; i++) ! if (((val <<= 1) & 0x80000000) == 0) ! break; ! ! fprintf (file, "%d", i); return; /* %n outputs the negative of its operand. */ --- 7649,7655 ---- if (! mask_operand (x, SImode)) output_operand_lossage ("invalid %%M value"); ! fprintf (file, "%d", extract_ME (x)); return; /* %n outputs the negative of its operand. */ *************** print_operand (file, x, code) *** 6513,6580 **** return; case 'S': ! /* PowerPC64 mask position. All 0's and all 1's are excluded. CONST_INT 32-bit mask is considered sign-extended so any transition must occur within the CONST_INT, not on the boundary. */ if (! mask64_operand (x, DImode)) output_operand_lossage ("invalid %%S value"); ! val = INT_LOWPART (x); ! if (val & 1) /* Clear Left */ { ! for (i = 0; i < HOST_BITS_PER_WIDE_INT; i++) ! if (!((val >>= 1) & 1)) ! break; ! ! #if HOST_BITS_PER_WIDE_INT == 32 ! if (GET_CODE (x) == CONST_DOUBLE && i == 32) ! { ! val = CONST_DOUBLE_HIGH (x); ! ! if (val == 0) ! --i; ! else ! for (i = 32; i < 64; i++) ! if (!((val >>= 1) & 1)) ! break; ! } ! #endif ! /* i = index of last set bit from right ! mask begins at 63 - i from left */ ! if (i > 63) ! output_operand_lossage ("%%S computed all 1's mask"); ! ! fprintf (file, "%d", 63 - i); ! return; } ! else /* Clear Right */ { ! for (i = 0; i < HOST_BITS_PER_WIDE_INT; i++) ! if ((val >>= 1) & 1) ! break; ! #if HOST_BITS_PER_WIDE_INT == 32 ! if (GET_CODE (x) == CONST_DOUBLE && i == 32) ! { ! val = CONST_DOUBLE_HIGH (x); ! if (val == (HOST_WIDE_INT) -1) ! --i; ! else ! for (i = 32; i < 64; i++) ! if ((val >>= 1) & 1) ! break; ! } ! #endif ! /* i = index of last clear bit from right ! mask ends at 62 - i from left */ ! if (i > 62) ! output_operand_lossage ("%%S computed all 0's mask"); ! fprintf (file, "%d", 62 - i); ! return; ! } case 'T': /* Print the symbolic name of a branch target register. */ --- 7745,7787 ---- return; case 'S': ! /* PowerPC64 mask position. All 0's is excluded. CONST_INT 32-bit mask is considered sign-extended so any transition must occur within the CONST_INT, not on the boundary. */ if (! mask64_operand (x, DImode)) output_operand_lossage ("invalid %%S value"); ! uval = INT_LOWPART (x); ! if (uval & 1) /* Clear Left */ { ! uval &= ((unsigned HOST_WIDE_INT) 1 << 63 << 1) - 1; ! i = 64; } ! else /* Clear Right */ { ! uval = ~uval; ! uval &= ((unsigned HOST_WIDE_INT) 1 << 63 << 1) - 1; ! i = 63; ! } ! while (uval != 0) ! --i, uval >>= 1; ! if (i < 0) ! abort (); ! fprintf (file, "%d", i); ! return; ! case 't': ! /* Like 'J' but get to the OVERFLOW/UNORDERED bit. */ ! if (GET_CODE (x) != REG || GET_MODE (x) != CCmode) ! abort (); ! /* Bit 3 is OV bit. */ ! i = 4 * (REGNO (x) - CR0_REGNO) + 3; ! /* If we want bit 31, write a shift count of zero, not 32. */ ! fprintf (file, "%d", i == 31 ? 0 : i + 1); ! return; case 'T': /* Print the symbolic name of a branch target register. */ *************** print_operand (file, x, code) *** 6768,6774 **** } return; ! /* Print AltiVec memory operand. */ case 'y': { rtx tmp; --- 7975,7981 ---- } return; ! /* Print AltiVec or SPE memory operand. */ case 'y': { rtx tmp; *************** print_operand (file, x, code) *** 6778,6783 **** --- 7985,8014 ---- tmp = XEXP (x, 0); + if (TARGET_SPE) + { + /* Handle [reg]. */ + if (GET_CODE (tmp) == REG) + { + fprintf (file, "0(%s)", reg_names[REGNO (tmp)]); + break; + } + /* Handle [reg+UIMM]. */ + else if (GET_CODE (tmp) == PLUS && + GET_CODE (XEXP (tmp, 1)) == CONST_INT) + { + int x; + + if (GET_CODE (XEXP (tmp, 0)) != REG) + abort (); + + x = INTVAL (XEXP (tmp, 1)); + fprintf (file, "%d(%s)", x, reg_names[REGNO (XEXP (tmp, 0))]); + break; + } + + /* Fall through. Must be [reg+reg]. */ + } if (GET_CODE (tmp) == REG) fprintf (file, "0,%s", reg_names[REGNO (tmp)]); else if (GET_CODE (tmp) == PLUS && GET_CODE (XEXP (tmp, 1)) == REG) *************** print_operand_address (file, x) *** 6909,6915 **** abort (); } ! /* Target hook for assembling integer objects. The powerpc version has to handle fixup entries for relocatable code if RELOCATABLE_NEEDS_FIXUP is defined. It also needs to handle DI-mode objects on 64-bit targets. */ --- 8140,8146 ---- abort (); } ! /* Target hook for assembling integer objects. The PowerPC version has to handle fixup entries for relocatable code if RELOCATABLE_NEEDS_FIXUP is defined. It also needs to handle DI-mode objects on 64-bit targets. */ *************** rs6000_assemble_integer (x, size, aligne *** 6972,6977 **** --- 8203,8239 ---- #endif /* RELOCATABLE_NEEDS_FIXUP */ return default_assemble_integer (x, size, aligned_p); } + + #ifdef HAVE_GAS_HIDDEN + /* Emit an assembler directive to set symbol visibility for DECL to + VISIBILITY_TYPE. */ + + static void + rs6000_assemble_visibility (decl, vis) + tree decl; + int vis; + { + /* Functions need to have their entry point symbol visibility set as + well as their descriptor symbol visibility. */ + if (DEFAULT_ABI == ABI_AIX && TREE_CODE (decl) == FUNCTION_DECL) + { + static const char * const visibility_types[] = { + NULL, "internal", "hidden", "protected" + }; + + const char *name, *type; + + name = ((* targetm.strip_name_encoding) + (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)))); + type = visibility_types[vis]; + + fprintf (asm_out_file, "\t.%s\t%s\n", type, name); + fprintf (asm_out_file, "\t.%s\t.%s\n", type, name); + } + else + default_assemble_visibility (decl, vis); + } + #endif enum rtx_code rs6000_reverse_condition (mode, code) *************** rs6000_generate_compare (code) *** 7006,7020 **** /* First, the compare. */ compare_result = gen_reg_rtx (comp_mode); ! emit_insn (gen_rtx_SET (VOIDmode, compare_result, ! gen_rtx_COMPARE (comp_mode, ! rs6000_compare_op0, ! rs6000_compare_op1))); /* Some kinds of FP comparisons need an OR operation; except for flag_unsafe_math_optimizations we don't bother. */ if (rs6000_compare_fp_p && ! flag_unsafe_math_optimizations && (code == LE || code == GE || code == UNEQ || code == LTGT || code == UNGT || code == UNLT)) --- 8268,8401 ---- /* First, the compare. */ compare_result = gen_reg_rtx (comp_mode); ! ! /* SPE FP compare instructions on the GPRs. Yuck! */ ! if ((TARGET_SPE && TARGET_HARD_FLOAT) && rs6000_compare_fp_p) ! { ! rtx cmp, or1, or2, or_result, compare_result2; ! ! switch (code) ! { ! case EQ: ! case UNEQ: ! case NE: ! case LTGT: ! cmp = flag_unsafe_math_optimizations ! ? gen_tstsfeq_gpr (compare_result, rs6000_compare_op0, ! rs6000_compare_op1) ! : gen_cmpsfeq_gpr (compare_result, rs6000_compare_op0, ! rs6000_compare_op1); ! break; ! case GT: ! case GTU: ! case UNGT: ! case UNGE: ! case GE: ! case GEU: ! cmp = flag_unsafe_math_optimizations ! ? gen_tstsfgt_gpr (compare_result, rs6000_compare_op0, ! rs6000_compare_op1) ! : gen_cmpsfgt_gpr (compare_result, rs6000_compare_op0, ! rs6000_compare_op1); ! break; ! case LT: ! case LTU: ! case UNLT: ! case UNLE: ! case LE: ! case LEU: ! cmp = flag_unsafe_math_optimizations ! ? gen_tstsflt_gpr (compare_result, rs6000_compare_op0, ! rs6000_compare_op1) ! : gen_cmpsflt_gpr (compare_result, rs6000_compare_op0, ! rs6000_compare_op1); ! break; ! default: ! abort (); ! } ! ! /* Synthesize LE and GE from LT/GT || EQ. */ ! if (code == LE || code == GE || code == LEU || code == GEU) ! { ! /* Synthesize GE/LE frome GT/LT || EQ. */ ! ! emit_insn (cmp); ! ! switch (code) ! { ! case LE: code = LT; break; ! case GE: code = GT; break; ! case LEU: code = LT; break; ! case GEU: code = GT; break; ! default: abort (); ! } ! ! or1 = gen_reg_rtx (SImode); ! or2 = gen_reg_rtx (SImode); ! or_result = gen_reg_rtx (CCEQmode); ! compare_result2 = gen_reg_rtx (CCFPmode); ! ! /* Do the EQ. */ ! cmp = flag_unsafe_math_optimizations ! ? gen_tstsfeq_gpr (compare_result2, rs6000_compare_op0, ! rs6000_compare_op1) ! : gen_cmpsfeq_gpr (compare_result2, rs6000_compare_op0, ! rs6000_compare_op1); ! emit_insn (cmp); ! ! /* The MC8540 FP compare instructions set the CR bits ! differently than other PPC compare instructions. For ! that matter, there is no generic test instruction, but a ! testgt, testlt, and testeq. For a true condition, bit 2 ! is set (x1xx) in the CR. Following the traditional CR ! values: ! ! LT GT EQ OV ! bit3 bit2 bit1 bit0 ! ! ... bit 2 would be a GT CR alias, so later on we ! look in the GT bits for the branch instructins. ! However, we must be careful to emit correct RTL in ! the meantime, so optimizations don't get confused. */ ! ! or1 = gen_rtx (NE, SImode, compare_result, const0_rtx); ! or2 = gen_rtx (NE, SImode, compare_result2, const0_rtx); ! ! /* OR them together. */ ! cmp = gen_rtx_SET (VOIDmode, or_result, ! gen_rtx_COMPARE (CCEQmode, ! gen_rtx_IOR (SImode, or1, or2), ! const_true_rtx)); ! compare_result = or_result; ! code = EQ; ! } ! else ! { ! /* We only care about 1 bit (x1xx), so map everything to NE to ! maintain rtl sanity. We'll get to the right bit (x1xx) at ! code output time. */ ! if (code == NE || code == LTGT) ! /* Do the inverse here because we have no cmpne ! instruction. We use the cmpeq instruction and expect ! to get a 0 instead. */ ! code = EQ; ! else ! code = NE; ! } ! ! emit_insn (cmp); ! } ! else ! emit_insn (gen_rtx_SET (VOIDmode, compare_result, ! gen_rtx_COMPARE (comp_mode, ! rs6000_compare_op0, ! rs6000_compare_op1))); /* Some kinds of FP comparisons need an OR operation; except for flag_unsafe_math_optimizations we don't bother. */ if (rs6000_compare_fp_p && ! flag_unsafe_math_optimizations + && ! (TARGET_HARD_FLOAT && TARGET_SPE) && (code == LE || code == GE || code == UNEQ || code == LTGT || code == UNGT || code == UNLT)) *************** rs6000_emit_cbranch (code, loc) *** 7104,7110 **** condition code register and its mode specifies what kind of comparison we made. ! REVERSED is non-zero if we should reverse the sense of the comparison. INSN is the insn. */ --- 8485,8491 ---- condition code register and its mode specifies what kind of comparison we made. ! REVERSED is nonzero if we should reverse the sense of the comparison. INSN is the insn. */ *************** output_cbranch (op, label, reversed, ins *** 7142,7147 **** --- 8523,8541 ---- code = reverse_condition (code); } + if ((TARGET_SPE && TARGET_HARD_FLOAT) && mode == CCFPmode) + { + /* The efscmp/tst* instructions twiddle bit 2, which maps nicely + to the GT bit. */ + if (code == EQ) + /* Opposite of GT. */ + code = UNLE; + else if (code == NE) + code = GT; + else + abort (); + } + switch (code) { /* Not all of these are actually distinct opcodes, but *************** output_cbranch (op, label, reversed, ins *** 7168,7188 **** /* Maybe we have a guess as to how likely the branch is. The old mnemonics don't have a way to specify this information. */ note = find_reg_note (insn, REG_BR_PROB, NULL_RTX); if (note != NULL_RTX) { /* PROB is the difference from 50%. */ int prob = INTVAL (XEXP (note, 0)) - REG_BR_PROB_BASE / 2; ! ! /* For branches that are very close to 50%, assume not-taken. */ ! if (abs (prob) > REG_BR_PROB_BASE / 20 ! && ((prob > 0) ^ need_longbranch)) ! pred = "+"; ! else ! pred = "-"; } - else - pred = ""; if (label == NULL) s += sprintf (s, "{b%sr|b%slr%s} ", ccode, ccode, pred); --- 8562,8591 ---- /* Maybe we have a guess as to how likely the branch is. The old mnemonics don't have a way to specify this information. */ + pred = ""; note = find_reg_note (insn, REG_BR_PROB, NULL_RTX); if (note != NULL_RTX) { /* PROB is the difference from 50%. */ int prob = INTVAL (XEXP (note, 0)) - REG_BR_PROB_BASE / 2; ! bool always_hint = rs6000_cpu != PROCESSOR_POWER4; ! ! /* Only hint for highly probable/improbable branches on newer ! cpus as static prediction overrides processor dynamic ! prediction. For older cpus we may as well always hint, but ! assume not taken for branches that are very close to 50% as a ! mispredicted taken branch is more expensive than a ! mispredicted not-taken branch. */ ! if (always_hint ! || abs (prob) > REG_BR_PROB_BASE / 100 * 48) ! { ! if (abs (prob) > REG_BR_PROB_BASE / 20 ! && ((prob > 0) ^ need_longbranch)) ! pred = "+"; ! else ! pred = "-"; ! } } if (label == NULL) s += sprintf (s, "{b%sr|b%slr%s} ", ccode, ccode, pred); *************** rs6000_emit_cmove (dest, op, true_cond, *** 7228,7234 **** rtx temp; /* These modes should always match. */ ! if (GET_MODE (op1) != compare_mode) return 0; if (GET_MODE (true_cond) != result_mode) return 0; --- 8631,8640 ---- rtx temp; /* These modes should always match. */ ! if (GET_MODE (op1) != compare_mode ! /* In the isel case however, we can use a compare immediate, so ! op1 may be a small constant. */ ! && (!TARGET_ISEL || !short_cint_operand (op1, VOIDmode))) return 0; if (GET_MODE (true_cond) != result_mode) return 0; *************** rs6000_emit_cmove (dest, op, true_cond, *** 7237,7246 **** /* First, work out if the hardware can do this at all, or if it's too slow... */ - /* If the comparison is an integer one, since we only have fsel - it'll be cheaper to use a branch. */ if (! rs6000_compare_fp_p) ! return 0; /* Eliminate half of the comparisons by switching operands, this makes the remaining code simpler. */ --- 8643,8654 ---- /* First, work out if the hardware can do this at all, or if it's too slow... */ if (! rs6000_compare_fp_p) ! { ! if (TARGET_ISEL) ! return rs6000_emit_int_cmove (dest, op, true_cond, false_cond); ! return 0; ! } /* Eliminate half of the comparisons by switching operands, this makes the remaining code simpler. */ *************** rs6000_emit_cmove (dest, op, true_cond, *** 7264,7274 **** /* We're going to try to implement comparions by performing a subtract, then comparing against zero. Unfortunately, Inf - Inf is NaN which is not zero, and so if we don't ! know that the the operand is finite and the comparison would treat EQ different to UNORDERED, we can't do it. */ if (! flag_unsafe_math_optimizations && code != GT && code != UNGE ! && (GET_CODE (op1) != CONST_DOUBLE || target_isinf (c1)) /* Constructs of the form (a OP b ? a : b) are safe. */ && ((! rtx_equal_p (op0, false_cond) && ! rtx_equal_p (op1, false_cond)) || (! rtx_equal_p (op0, true_cond) --- 8672,8682 ---- /* We're going to try to implement comparions by performing a subtract, then comparing against zero. Unfortunately, Inf - Inf is NaN which is not zero, and so if we don't ! know that the operand is finite and the comparison would treat EQ different to UNORDERED, we can't do it. */ if (! flag_unsafe_math_optimizations && code != GT && code != UNGE ! && (GET_CODE (op1) != CONST_DOUBLE || real_isinf (&c1)) /* Constructs of the form (a OP b ? a : b) are safe. */ && ((! rtx_equal_p (op0, false_cond) && ! rtx_equal_p (op1, false_cond)) || (! rtx_equal_p (op0, true_cond) *************** rs6000_emit_cmove (dest, op, true_cond, *** 7372,7377 **** --- 8780,8832 ---- return 1; } + /* Same as above, but for ints (isel). */ + + static int + rs6000_emit_int_cmove (dest, op, true_cond, false_cond) + rtx dest; + rtx op; + rtx true_cond; + rtx false_cond; + { + rtx condition_rtx, cr; + + /* All isel implementations thus far are 32-bits. */ + if (GET_MODE (rs6000_compare_op0) != SImode) + return 0; + + /* We still have to do the compare, because isel doesn't do a + compare, it just looks at the CRx bits set by a previous compare + instruction. */ + condition_rtx = rs6000_generate_compare (GET_CODE (op)); + cr = XEXP (condition_rtx, 0); + + if (GET_MODE (cr) == CCmode) + emit_insn (gen_isel_signed (dest, condition_rtx, + true_cond, false_cond, cr)); + else + emit_insn (gen_isel_unsigned (dest, condition_rtx, + true_cond, false_cond, cr)); + + return 1; + } + + const char * + output_isel (operands) + rtx *operands; + { + enum rtx_code code; + + code = GET_CODE (operands[1]); + if (code == GE || code == GEU || code == LE || code == LEU || code == NE) + { + PUT_CODE (operands[1], reverse_condition (code)); + return "isel %0,%3,%2,%j1"; + } + else + return "isel %0,%2,%3,%j1"; + } + void rs6000_emit_minmax (dest, code, op0, op1) rtx dest; *************** rs6000_emit_minmax (dest, code, op0, op1 *** 7380,7391 **** rtx op1; { enum machine_mode mode = GET_MODE (op0); rtx target; if (code == SMAX || code == UMAX) ! target = emit_conditional_move (dest, GE, op0, op1, mode, op0, op1, mode, 0); else ! target = emit_conditional_move (dest, GE, op0, op1, mode, op1, op0, mode, 0); if (target == NULL_RTX) abort (); --- 8835,8853 ---- rtx op1; { enum machine_mode mode = GET_MODE (op0); + enum rtx_code c; rtx target; + + if (code == SMAX || code == SMIN) + c = GE; + else + c = GEU; + if (code == SMAX || code == UMAX) ! target = emit_conditional_move (dest, c, op0, op1, mode, op0, op1, mode, 0); else ! target = emit_conditional_move (dest, c, op0, op1, mode, op1, op0, mode, 0); if (target == NULL_RTX) abort (); *************** first_reg_to_save () *** 7414,7421 **** break; #if TARGET_MACHO ! if (flag_pic && current_function_uses_pic_offset_table && ! (first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM)) return RS6000_PIC_OFFSET_TABLE_REGNUM; #endif --- 8876,8884 ---- break; #if TARGET_MACHO ! if (flag_pic ! && current_function_uses_pic_offset_table ! && first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM) return RS6000_PIC_OFFSET_TABLE_REGNUM; #endif *************** is_altivec_return_reg (reg, xyes) *** 7583,7588 **** --- 9046,9055 ---- +---------------------------------------+ | Save area for VRSAVE register (Z) | 8+P+A+V+L+X+W+Y +---------------------------------------+ + | SPE: area for 64-bit GP registers | + +---------------------------------------+ + | SPE alignment padding | + +---------------------------------------+ | saved CR (C) | 8+P+A+V+L+X+W+Y+Z +---------------------------------------+ | Save area for GP registers (G) | 8+P+A+V+L+X+W+Y+Z+C *************** rs6000_stack_info () *** 7638,7643 **** --- 9105,9124 ---- else info_ptr->gp_size = reg_size * (32 - info_ptr->first_gp_reg_save); + /* For the SPE, we have an additional upper 32-bits on each GPR. + Ideally we should save the entire 64-bits only when the upper + half is used in SIMD instructions. Since we only record + registers live (not the size they are used in), this proves + difficult because we'd have to traverse the instruction chain at + the right time, taking reload into account. This is a real pain, + so we opt to save the GPRs in 64-bits always. Anyone overly + concerned with frame size can fix this. ;-). + + So... since we save all GPRs (except the SP) in 64-bits, the + traditional GP save area will be empty. */ + if (TARGET_SPE_ABI) + info_ptr->gp_size = 0; + info_ptr->first_fp_reg_save = first_fp_reg_to_save (); info_ptr->fp_size = 8 * (64 - info_ptr->first_fp_reg_save); *************** rs6000_stack_info () *** 7686,7692 **** unsigned int i; for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; ++i) continue; ! ehrd_size = i * UNITS_PER_WORD; } else ehrd_size = 0; --- 9167,9175 ---- unsigned int i; for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; ++i) continue; ! ! /* SPE saves EH registers in 64-bits. */ ! ehrd_size = i * (TARGET_SPE_ABI ? UNITS_PER_SPE_WORD : UNITS_PER_WORD); } else ehrd_size = 0; *************** rs6000_stack_info () *** 7699,7705 **** info_ptr->parm_size = RS6000_ALIGN (current_function_outgoing_args_size, 8); ! if (TARGET_ALTIVEC_ABI) { info_ptr->vrsave_mask = compute_vrsave_mask (); info_ptr->vrsave_size = info_ptr->vrsave_mask ? 4 : 0; --- 9182,9193 ---- info_ptr->parm_size = RS6000_ALIGN (current_function_outgoing_args_size, 8); ! if (TARGET_SPE_ABI) ! info_ptr->spe_gp_size = 8 * (32 - info_ptr->first_gp_reg_save); ! else ! info_ptr->spe_gp_size = 0; ! ! if (TARGET_ALTIVEC_ABI && TARGET_ALTIVEC_VRSAVE) { info_ptr->vrsave_mask = compute_vrsave_mask (); info_ptr->vrsave_size = info_ptr->vrsave_mask ? 4 : 0; *************** rs6000_stack_info () *** 7754,7760 **** info_ptr->gp_save_offset = info_ptr->fp_save_offset - info_ptr->gp_size; info_ptr->cr_save_offset = info_ptr->gp_save_offset - info_ptr->cr_size; ! if (TARGET_ALTIVEC_ABI) { info_ptr->vrsave_save_offset = info_ptr->cr_save_offset - info_ptr->vrsave_size; --- 9242,9267 ---- info_ptr->gp_save_offset = info_ptr->fp_save_offset - info_ptr->gp_size; info_ptr->cr_save_offset = info_ptr->gp_save_offset - info_ptr->cr_size; ! if (TARGET_SPE_ABI) ! { ! /* Align stack so SPE GPR save area is aligned on a ! double-word boundary. */ ! if (info_ptr->spe_gp_size != 0) ! info_ptr->spe_padding_size ! = 8 - (-info_ptr->cr_save_offset % 8); ! else ! info_ptr->spe_padding_size = 0; ! ! info_ptr->spe_gp_save_offset ! = info_ptr->cr_save_offset ! - info_ptr->spe_padding_size ! - info_ptr->spe_gp_size; ! ! /* Adjust for SPE case. */ ! info_ptr->toc_save_offset ! = info_ptr->spe_gp_save_offset - info_ptr->toc_size; ! } ! else if (TARGET_ALTIVEC_ABI) { info_ptr->vrsave_save_offset = info_ptr->cr_save_offset - info_ptr->vrsave_size; *************** rs6000_stack_info () *** 7787,7792 **** --- 9294,9301 ---- + info_ptr->altivec_size + info_ptr->altivec_padding_size + info_ptr->vrsave_size + + info_ptr->spe_gp_size + + info_ptr->spe_padding_size + ehrd_size + info_ptr->cr_size + info_ptr->lr_size *************** rs6000_stack_info () *** 7841,7846 **** --- 9350,9358 ---- if (! TARGET_ALTIVEC_ABI || info_ptr->vrsave_mask == 0) info_ptr->vrsave_save_offset = 0; + if (! TARGET_SPE_ABI || info_ptr->spe_gp_size == 0) + info_ptr->spe_gp_save_offset = 0; + if (! info_ptr->lr_save_p) info_ptr->lr_save_offset = 0; *************** debug_stack_info (info) *** 7882,7887 **** --- 9394,9402 ---- if (TARGET_ALTIVEC_ABI) fprintf (stderr, "\tALTIVEC ABI extensions enabled.\n"); + if (TARGET_SPE_ABI) + fprintf (stderr, "\tSPE ABI extensions enabled.\n"); + if (info->first_gp_reg_save != 32) fprintf (stderr, "\tfirst_gp_reg_save = %5d\n", info->first_gp_reg_save); *************** debug_stack_info (info) *** 7920,7925 **** --- 9435,9444 ---- fprintf (stderr, "\taltivec_save_offset = %5d\n", info->altivec_save_offset); + if (info->spe_gp_save_offset) + fprintf (stderr, "\tspe_gp_save_offset = %5d\n", + info->spe_gp_save_offset); + if (info->vrsave_save_offset) fprintf (stderr, "\tvrsave_save_offset = %5d\n", info->vrsave_save_offset); *************** debug_stack_info (info) *** 7954,7959 **** --- 9473,9481 ---- if (info->gp_size) fprintf (stderr, "\tgp_size = %5d\n", info->gp_size); + if (info->spe_gp_size) + fprintf (stderr, "\tspe_gp_size = %5d\n", info->spe_gp_size); + if (info->fp_size) fprintf (stderr, "\tfp_size = %5d\n", info->fp_size); *************** debug_stack_info (info) *** 7967,7972 **** --- 9489,9498 ---- fprintf (stderr, "\taltivec_padding_size= %5d\n", info->altivec_padding_size); + if (info->spe_padding_size) + fprintf (stderr, "\tspe_padding_size = %5d\n", + info->spe_padding_size); + if (info->lr_size) fprintf (stderr, "\tlr_size = %5d\n", info->lr_size); *************** rs6000_return_addr (count, frame) *** 7993,8002 **** /* Currently we don't optimize very well between prolog and body code and for PIC code the code can be actually quite bad, so don't try to be too clever here. */ ! if (count != 0 ! || flag_pic != 0 ! || DEFAULT_ABI == ABI_AIX ! || DEFAULT_ABI == ABI_AIX_NODESC) { cfun->machine->ra_needs_full_frame = 1; --- 9519,9525 ---- /* Currently we don't optimize very well between prolog and body code and for PIC code the code can be actually quite bad, so don't try to be too clever here. */ ! if (count != 0 || flag_pic != 0) { cfun->machine->ra_needs_full_frame = 1; *************** rs6000_return_addr (count, frame) *** 8014,8038 **** return get_hard_reg_initial_val (Pmode, LINK_REGISTER_REGNUM); } static int rs6000_ra_ever_killed () { rtx top; ! #ifdef ASM_OUTPUT_MI_THUNK ! if (current_function_is_thunk) return 0; - #endif - if (!has_hard_reg_initial_val (Pmode, LINK_REGISTER_REGNUM) - || cfun->machine->ra_needs_full_frame) - return regs_ever_live[LINK_REGISTER_REGNUM]; push_topmost_sequence (); top = get_insns (); pop_topmost_sequence (); ! return reg_set_between_p (gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM), ! top, NULL_RTX); } /* Add a REG_MAYBE_DEAD note to the insn. */ --- 9537,9628 ---- return get_hard_reg_initial_val (Pmode, LINK_REGISTER_REGNUM); } + /* Say whether a function is a candidate for sibcall handling or not. + We do not allow indirect calls to be optimized into sibling calls. + Also, we can't do it if there are any vector parameters; there's + nowhere to put the VRsave code so it works; note that functions with + vector parameters are required to have a prototype, so the argument + type info must be available here. (The tail recursion case can work + with vector parameters, but there's no way to distinguish here.) */ + int + function_ok_for_sibcall (fndecl) + tree fndecl; + { + tree type; + if (fndecl) + { + if (TARGET_ALTIVEC_VRSAVE) + { + for (type = TYPE_ARG_TYPES (TREE_TYPE (fndecl)); + type; type = TREE_CHAIN (type)) + { + if (TREE_CODE (TREE_VALUE (type)) == VECTOR_TYPE) + return 0; + } + } + if (DEFAULT_ABI == ABI_DARWIN + || (*targetm.binds_local_p) (fndecl)) + { + tree attr_list = TYPE_ATTRIBUTES (TREE_TYPE (fndecl)); + + if (!lookup_attribute ("longcall", attr_list) + || lookup_attribute ("shortcall", attr_list)) + return 1; + } + } + return 0; + } + static int rs6000_ra_ever_killed () { rtx top; + rtx reg; + rtx insn; ! /* Irritatingly, there are two kinds of thunks -- those created with ! TARGET_ASM_OUTPUT_MI_THUNK and those with DECL_THUNK_P that go ! through the regular part of the compiler. This is a very hacky ! way to tell them apart. */ ! if (current_function_is_thunk && !no_new_pseudos) return 0; + /* regs_ever_live has LR marked as used if any sibcalls are present, + but this should not force saving and restoring in the + pro/epilogue. Likewise, reg_set_between_p thinks a sibcall + clobbers LR, so that is inappropriate. */ + + /* Also, the prologue can generate a store into LR that + doesn't really count, like this: + + move LR->R0 + bcl to set PIC register + move LR->R31 + move R0->LR + + When we're called from the epilogue, we need to avoid counting + this as a store. */ + push_topmost_sequence (); top = get_insns (); pop_topmost_sequence (); + reg = gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM); ! for (insn = NEXT_INSN (top); insn != NULL_RTX; insn = NEXT_INSN (insn)) ! { ! if (INSN_P (insn)) ! { ! if (FIND_REG_INC_NOTE (insn, reg)) ! return 1; ! else if (GET_CODE (insn) == CALL_INSN ! && !SIBLING_CALL_P (insn)) ! return 1; ! else if (set_of (reg, insn) != NULL_RTX ! && !prologue_epilogue_contains (insn)) ! return 1; ! } ! } ! return 0; } /* Add a REG_MAYBE_DEAD note to the insn. */ *************** rs6000_emit_eh_toc_restore (stacksize) *** 8282,8291 **** bottom_of_stack, stacksize, NULL_RTX, 1, OPTAB_WIDEN); ! emit_move_insn (tocompare, ! GEN_INT (trunc_int_for_mode (TARGET_32BIT ! ? 0x80410014 ! : 0xE8410028, SImode))); if (insn_after_throw == NULL_RTX) abort (); --- 9872,9879 ---- bottom_of_stack, stacksize, NULL_RTX, 1, OPTAB_WIDEN); ! emit_move_insn (tocompare, gen_int_mode (TARGET_32BIT ? 0x80410014 ! : 0xE8410028, SImode)); if (insn_after_throw == NULL_RTX) abort (); *************** rs6000_frame_related (insn, reg, val, re *** 8469,8476 **** --- 10057,10075 ---- { rtx real, temp; + /* copy_rtx will not make unique copies of registers, so we need to + ensure we don't have unwanted sharing here. */ + if (reg == reg2) + reg = gen_raw_REG (GET_MODE (reg), REGNO (reg)); + + if (reg == rreg) + reg = gen_raw_REG (GET_MODE (reg), REGNO (reg)); + real = copy_rtx (PATTERN (insn)); + if (reg2 != NULL_RTX) + real = replace_rtx (real, reg2, rreg); + real = replace_rtx (real, reg, gen_rtx_PLUS (Pmode, gen_rtx_REG (Pmode, STACK_POINTER_REGNUM), *************** rs6000_frame_related (insn, reg, val, re *** 8523,8531 **** else abort (); - if (reg2 != NULL_RTX) - real = replace_rtx (real, reg2, rreg); - RTX_FRAME_RELATED_P (insn) = 1; REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, real, --- 10122,10127 ---- *************** generate_set_vrsave (reg, info, epilogue *** 8594,8599 **** --- 10190,10267 ---- return insn; } + /* Save a register into the frame, and emit RTX_FRAME_RELATED_P notes. + Save REGNO into [FRAME_REG + OFFSET] in mode MODE. */ + + static void + emit_frame_save (frame_reg, frame_ptr, mode, regno, offset, total_size) + rtx frame_reg; + rtx frame_ptr; + enum machine_mode mode; + unsigned int regno; + int offset; + int total_size; + { + rtx reg, offset_rtx, insn, mem, addr, int_rtx; + rtx replacea, replaceb; + + int_rtx = GEN_INT (offset); + + /* Some cases that need register indexed addressing. */ + if ((TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode)) + || (TARGET_SPE_ABI + && SPE_VECTOR_MODE (mode) + && !SPE_CONST_OFFSET_OK (offset))) + { + /* Whomever calls us must make sure r11 is available in the + flow path of instructions in the prologue. */ + offset_rtx = gen_rtx_REG (Pmode, 11); + emit_move_insn (offset_rtx, int_rtx); + + replacea = offset_rtx; + replaceb = int_rtx; + } + else + { + offset_rtx = int_rtx; + replacea = NULL_RTX; + replaceb = NULL_RTX; + } + + reg = gen_rtx_REG (mode, regno); + addr = gen_rtx_PLUS (Pmode, frame_reg, offset_rtx); + mem = gen_rtx_MEM (mode, addr); + set_mem_alias_set (mem, rs6000_sr_alias_set); + + insn = emit_move_insn (mem, reg); + + rs6000_frame_related (insn, frame_ptr, total_size, replacea, replaceb); + } + + /* Emit an offset memory reference suitable for a frame store, while + converting to a valid addressing mode. */ + + static rtx + gen_frame_mem_offset (mode, reg, offset) + enum machine_mode mode; + rtx reg; + int offset; + { + rtx int_rtx, offset_rtx; + + int_rtx = GEN_INT (offset); + + if (TARGET_SPE_ABI && SPE_VECTOR_MODE (mode)) + { + offset_rtx = gen_rtx_REG (Pmode, FIXED_SCRATCH); + emit_move_insn (offset_rtx, int_rtx); + } + else + offset_rtx = int_rtx; + + return gen_rtx_MEM (mode, gen_rtx_PLUS (Pmode, reg, offset_rtx)); + } + /* Emit function prologue as insns. */ void *************** rs6000_emit_prologue () *** 8611,8617 **** --- 10279,10292 ---- int using_store_multiple; HOST_WIDE_INT sp_offset = 0; + if (TARGET_SPE_ABI) + { + reg_mode = V2SImode; + reg_size = 8; + } + using_store_multiple = (TARGET_MULTIPLE && ! TARGET_POWERPC64 + && !TARGET_SPE_ABI && info->first_gp_reg_save < 31); saving_FPRs_inline = (info->first_fp_reg_save == 64 || FP_SAVE_INLINE (info->first_fp_reg_save)); *************** rs6000_emit_prologue () *** 8721,8740 **** for (i = 0; i < 64 - info->first_fp_reg_save; i++) if ((regs_ever_live[info->first_fp_reg_save+i] && ! call_used_regs[info->first_fp_reg_save+i])) ! { ! rtx addr, reg, mem; ! reg = gen_rtx_REG (DFmode, info->first_fp_reg_save + i); ! addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, ! GEN_INT (info->fp_save_offset ! + sp_offset ! + 8 * i)); ! mem = gen_rtx_MEM (DFmode, addr); ! set_mem_alias_set (mem, rs6000_sr_alias_set); ! ! insn = emit_move_insn (mem, reg); ! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ! NULL_RTX, NULL_RTX); ! } } else if (info->first_fp_reg_save != 64) { --- 10396,10405 ---- for (i = 0; i < 64 - info->first_fp_reg_save; i++) if ((regs_ever_live[info->first_fp_reg_save+i] && ! call_used_regs[info->first_fp_reg_save+i])) ! emit_frame_save (frame_reg_rtx, frame_ptr_rtx, DFmode, ! info->first_fp_reg_save + i, ! info->fp_save_offset + sp_offset + 8 * i, ! info->total_size); } else if (info->first_fp_reg_save != 64) { *************** rs6000_emit_prologue () *** 8774,8783 **** the store-multiple instructions. */ if (using_store_multiple) { ! rtvec p, dwarfp; int i; p = rtvec_alloc (32 - info->first_gp_reg_save); - dwarfp = rtvec_alloc (32 - info->first_gp_reg_save); for (i = 0; i < 32 - info->first_gp_reg_save; i++) { rtx addr, reg, mem; --- 10439,10447 ---- the store-multiple instructions. */ if (using_store_multiple) { ! rtvec p; int i; p = rtvec_alloc (32 - info->first_gp_reg_save); for (i = 0; i < 32 - info->first_gp_reg_save; i++) { rtx addr, reg, mem; *************** rs6000_emit_prologue () *** 8807,8822 **** { rtx addr, reg, mem; reg = gen_rtx_REG (reg_mode, info->first_gp_reg_save + i); - addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, - GEN_INT (info->gp_save_offset - + sp_offset - + reg_size * i)); - mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); ! insn = emit_move_insn (mem, reg); ! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ! NULL_RTX, NULL_RTX); } } --- 10471,10515 ---- { rtx addr, reg, mem; reg = gen_rtx_REG (reg_mode, info->first_gp_reg_save + i); ! if (TARGET_SPE_ABI) ! { ! int offset = info->spe_gp_save_offset + sp_offset + 8 * i; ! rtx b; ! ! if (!SPE_CONST_OFFSET_OK (offset)) ! { ! b = gen_rtx_REG (Pmode, FIXED_SCRATCH); ! emit_move_insn (b, GEN_INT (offset)); ! } ! else ! b = GEN_INT (offset); ! ! addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, b); ! mem = gen_rtx_MEM (V2SImode, addr); ! set_mem_alias_set (mem, rs6000_sr_alias_set); ! insn = emit_move_insn (mem, reg); ! ! if (GET_CODE (b) == CONST_INT) ! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ! NULL_RTX, NULL_RTX); ! else ! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ! b, GEN_INT (offset)); ! } ! else ! { ! addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, ! GEN_INT (info->gp_save_offset ! + sp_offset ! + reg_size * i)); ! mem = gen_rtx_MEM (reg_mode, addr); ! set_mem_alias_set (mem, rs6000_sr_alias_set); ! ! insn = emit_move_insn (mem, reg); ! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ! NULL_RTX, NULL_RTX); ! } } } *************** rs6000_emit_prologue () *** 8828,8849 **** for (i = 0; ; ++i) { - rtx addr, reg, mem; - regno = EH_RETURN_DATA_REGNO (i); if (regno == INVALID_REGNUM) break; ! reg = gen_rtx_REG (reg_mode, regno); ! addr = plus_constant (frame_reg_rtx, ! info->ehrd_offset + sp_offset ! + reg_size * (int) i); ! mem = gen_rtx_MEM (reg_mode, addr); ! set_mem_alias_set (mem, rs6000_sr_alias_set); ! ! insn = emit_move_insn (mem, reg); ! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ! NULL_RTX, NULL_RTX); } } --- 10521,10534 ---- for (i = 0; ; ++i) { regno = EH_RETURN_DATA_REGNO (i); if (regno == INVALID_REGNUM) break; ! emit_frame_save (frame_reg_rtx, frame_ptr_rtx, reg_mode, regno, ! info->ehrd_offset + sp_offset ! + reg_size * (int) i, ! info->total_size); } } *************** rs6000_emit_prologue () *** 8898,8904 **** /* Set frame pointer, if needed. */ if (frame_pointer_needed) { ! insn = emit_move_insn (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM), sp_reg_rtx); RTX_FRAME_RELATED_P (insn) = 1; } --- 10583,10589 ---- /* Set frame pointer, if needed. */ if (frame_pointer_needed) { ! insn = emit_move_insn (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM), sp_reg_rtx); RTX_FRAME_RELATED_P (insn) = 1; } *************** rs6000_emit_prologue () *** 8926,8942 **** gen_rtx_REG (Pmode, 11)); } if (DEFAULT_ABI == ABI_DARWIN && flag_pic && current_function_uses_pic_offset_table) { rtx dest = gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM); ! rs6000_maybe_dead (emit_insn (gen_load_macho_picbase (dest))); rs6000_maybe_dead ( emit_move_insn (gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM), gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM))); } } /* Write function prologue. */ --- 10611,10631 ---- gen_rtx_REG (Pmode, 11)); } + #if TARGET_MACHO if (DEFAULT_ABI == ABI_DARWIN && flag_pic && current_function_uses_pic_offset_table) { rtx dest = gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM); + char *picbase = machopic_function_base_name (); + rtx src = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (picbase, -1)); ! rs6000_maybe_dead (emit_insn (gen_load_macho_picbase (dest, src))); rs6000_maybe_dead ( emit_move_insn (gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM), gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM))); } + #endif } /* Write function prologue. */ *************** rs6000_emit_epilogue (sibcall) *** 9025,9032 **** --- 10714,10728 ---- int reg_size = TARGET_POWERPC64 ? 8 : 4; int i; + if (TARGET_SPE_ABI) + { + reg_mode = V2SImode; + reg_size = 8; + } + info = rs6000_stack_info (); using_load_multiple = (TARGET_MULTIPLE && ! TARGET_POWERPC64 + && !TARGET_SPE_ABI && info->first_gp_reg_save < 31); restoring_FPRs_inline = (sibcall || current_function_calls_eh_return *************** rs6000_emit_epilogue (sibcall) *** 9111,9119 **** /* Get the old lr if we saved it. */ if (info->lr_save_p) { ! rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, ! GEN_INT (info->lr_save_offset + sp_offset)); ! rtx mem = gen_rtx_MEM (Pmode, addr); set_mem_alias_set (mem, rs6000_sr_alias_set); --- 10807,10814 ---- /* Get the old lr if we saved it. */ if (info->lr_save_p) { ! rtx mem = gen_frame_mem_offset (Pmode, frame_reg_rtx, ! info->lr_save_offset + sp_offset); set_mem_alias_set (mem, rs6000_sr_alias_set); *************** rs6000_emit_epilogue (sibcall) *** 9144,9159 **** for (i = 0; ; ++i) { ! rtx addr, mem; regno = EH_RETURN_DATA_REGNO (i); if (regno == INVALID_REGNUM) break; ! addr = plus_constant (frame_reg_rtx, ! info->ehrd_offset + sp_offset ! + reg_size * (int) i); ! mem = gen_rtx_MEM (reg_mode, addr); set_mem_alias_set (mem, rs6000_sr_alias_set); emit_move_insn (gen_rtx_REG (reg_mode, regno), mem); --- 10839,10853 ---- for (i = 0; ; ++i) { ! rtx mem; regno = EH_RETURN_DATA_REGNO (i); if (regno == INVALID_REGNUM) break; ! mem = gen_frame_mem_offset (reg_mode, frame_reg_rtx, ! info->ehrd_offset + sp_offset ! + reg_size * (int) i); set_mem_alias_set (mem, rs6000_sr_alias_set); emit_move_insn (gen_rtx_REG (reg_mode, regno), mem); *************** rs6000_emit_epilogue (sibcall) *** 9197,9207 **** + reg_size * i)); rtx mem = gen_rtx_MEM (reg_mode, addr); set_mem_alias_set (mem, rs6000_sr_alias_set); emit_move_insn (gen_rtx_REG (reg_mode, ! info->first_gp_reg_save + i), ! mem); } /* Restore fpr's if we need to do it without calling a function. */ --- 10891,10918 ---- + reg_size * i)); rtx mem = gen_rtx_MEM (reg_mode, addr); + /* Restore 64-bit quantities for SPE. */ + if (TARGET_SPE_ABI) + { + int offset = info->spe_gp_save_offset + sp_offset + 8 * i; + rtx b; + + if (!SPE_CONST_OFFSET_OK (offset)) + { + b = gen_rtx_REG (Pmode, FIXED_SCRATCH); + emit_move_insn (b, GEN_INT (offset)); + } + else + b = GEN_INT (offset); + + addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, b); + mem = gen_rtx_MEM (V2SImode, addr); + } + set_mem_alias_set (mem, rs6000_sr_alias_set); emit_move_insn (gen_rtx_REG (reg_mode, ! info->first_gp_reg_save + i), mem); } /* Restore fpr's if we need to do it without calling a function. */ *************** rs6000_output_function_epilogue (file, s *** 9359,9365 **** HOST_WIDE_INT size ATTRIBUTE_UNUSED; { rs6000_stack_t *info = rs6000_stack_info (); - int optional_tbtab = (optimize_size || TARGET_ELF) ? 0 : 1; if (! HAVE_epilogue) { --- 11070,11075 ---- *************** rs6000_output_function_epilogue (file, s *** 9412,9433 **** System V.4 Powerpc's (and the embedded ABI derived from it) use a different traceback table. */ ! if (DEFAULT_ABI == ABI_AIX && ! flag_inhibit_size_directive) { ! const char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); const char *language_string = lang_hooks.name; int fixed_parms = 0, float_parms = 0, parm_info = 0; int i; ! while (*fname == '.') /* V.4 encodes . in the name */ ! fname++; ! /* Need label immediately before tbtab, so we can compute its offset ! from the function start. */ ! if (*fname == '*') ! ++fname; ! ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LT"); ! ASM_OUTPUT_LABEL (file, fname); /* The .tbtab pseudo-op can only be used for the first eight expressions, since it can't handle the possibly variable --- 11122,11154 ---- System V.4 Powerpc's (and the embedded ABI derived from it) use a different traceback table. */ ! if (DEFAULT_ABI == ABI_AIX && ! flag_inhibit_size_directive ! && rs6000_traceback != traceback_none) { ! const char *fname = NULL; const char *language_string = lang_hooks.name; int fixed_parms = 0, float_parms = 0, parm_info = 0; int i; + int optional_tbtab; ! if (rs6000_traceback == traceback_full) ! optional_tbtab = 1; ! else if (rs6000_traceback == traceback_part) ! optional_tbtab = 0; ! else ! optional_tbtab = !optimize_size && !TARGET_ELF; ! if (optional_tbtab) ! { ! fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); ! while (*fname == '.') /* V.4 encodes . in the name */ ! fname++; ! ! /* Need label immediately before tbtab, so we can compute ! its offset from the function start. */ ! ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LT"); ! ASM_OUTPUT_LABEL (file, fname); ! } /* The .tbtab pseudo-op can only be used for the first eight expressions, since it can't handle the possibly variable *************** rs6000_output_function_epilogue (file, s *** 9522,9528 **** if (mode == SFmode) bits = 0x2; ! else if (mode == DFmode) bits = 0x3; else abort (); --- 11243,11249 ---- if (mode == SFmode) bits = 0x2; ! else if (mode == DFmode || mode == TFmode) bits = 0x3; else abort (); *************** rs6000_output_function_epilogue (file, s *** 9599,9604 **** --- 11320,11327 ---- /* Omit this list of longs, because there are no CTL anchors. */ /* Length of function name. */ + if (*fname == '*') + ++fname; fprintf (file, "\t.short %d\n", (int) strlen (fname)); /* Function name. */ *************** rs6000_output_function_epilogue (file, s *** 9611,9617 **** fputs ("\t.align 2\n", file); } - return; } /* A C compound statement that outputs the assembler code for a thunk --- 11334,11339 ---- *************** rs6000_output_function_epilogue (file, s *** 9646,9656 **** calls FUNCTION instead of jumping to it. The generic approach does not support varargs. */ ! void ! output_mi_thunk (file, thunk_fndecl, delta, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; ! int delta; tree function; { const char *this_reg = --- 11368,11379 ---- calls FUNCTION instead of jumping to it. The generic approach does not support varargs. */ ! static void ! rs6000_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; ! HOST_WIDE_INT delta; ! HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; tree function; { const char *this_reg = *************** output_mi_thunk (file, thunk_fndecl, del *** 9668,9676 **** if (delta >= -32768 && delta <= 32767) { if (! TARGET_NEW_MNEMONICS) ! fprintf (file, "\tcal %s,%d(%s)\n", this_reg, delta, this_reg); else ! fprintf (file, "\taddi %s,%s,%d\n", this_reg, this_reg, delta); } /* 64-bit constants. If "int" is 32 bits, we'll never hit this abort. */ --- 11391,11399 ---- if (delta >= -32768 && delta <= 32767) { if (! TARGET_NEW_MNEMONICS) ! fprintf (file, "\tcal %s,%d(%s)\n", this_reg, (int) delta, this_reg); else ! fprintf (file, "\taddi %s,%s,%d\n", this_reg, this_reg, (int) delta); } /* 64-bit constants. If "int" is 32 bits, we'll never hit this abort. */ *************** output_mi_thunk (file, thunk_fndecl, del *** 9680,9686 **** /* Large constants that can be done by one addis instruction. */ else if ((delta & 0xffff) == 0) asm_fprintf (file, "\t{cau|addis} %s,%s,%d\n", this_reg, this_reg, ! delta >> 16); /* 32-bit constants that can be done by an add and addis instruction. */ else --- 11403,11409 ---- /* Large constants that can be done by one addis instruction. */ else if ((delta & 0xffff) == 0) asm_fprintf (file, "\t{cau|addis} %s,%s,%d\n", this_reg, this_reg, ! (int) (delta >> 16)); /* 32-bit constants that can be done by an add and addis instruction. */ else *************** output_mi_thunk (file, thunk_fndecl, del *** 9711,9716 **** --- 11434,11440 ---- case ABI_V4: case ABI_AIX_NODESC: + case ABI_DARWIN: prefix = ""; break; } *************** output_mi_thunk (file, thunk_fndecl, del *** 9721,9728 **** fname = XSTR (XEXP (DECL_RTL (function), 0), 0); if (current_file_function_operand (XEXP (DECL_RTL (function), 0), VOIDmode) ! && ! lookup_attribute ("longcall", ! TYPE_ATTRIBUTES (TREE_TYPE (function)))) { fprintf (file, "\tb %s", prefix); assemble_name (file, fname); --- 11445,11454 ---- fname = XSTR (XEXP (DECL_RTL (function), 0), 0); if (current_file_function_operand (XEXP (DECL_RTL (function), 0), VOIDmode) ! && (! lookup_attribute ("longcall", ! TYPE_ATTRIBUTES (TREE_TYPE (function))) ! || lookup_attribute ("shortcall", ! TYPE_ATTRIBUTES (TREE_TYPE (function))))) { fprintf (file, "\tb %s", prefix); assemble_name (file, fname); *************** output_mi_thunk (file, thunk_fndecl, del *** 9754,9763 **** } assemble_name (file, fname); putc ('\n', file); ! if (TARGET_ELF) ! function_section (current_function_decl); ! else ! text_section (); if (TARGET_MINIMAL_TOC) asm_fprintf (file, (TARGET_32BIT) ? "\t{l|lwz} %s,%s(%s)\n" : "\tld %s,%s(%s)\n", r12, --- 11480,11486 ---- } assemble_name (file, fname); putc ('\n', file); ! function_section (current_function_decl); if (TARGET_MINIMAL_TOC) asm_fprintf (file, (TARGET_32BIT) ? "\t{l|lwz} %s,%s(%s)\n" : "\tld %s,%s(%s)\n", r12, *************** output_mi_thunk (file, thunk_fndecl, del *** 9804,9810 **** } } } - /* A quick summary of the various types of 'constant-pool tables' under PowerPC: --- 11527,11532 ---- *************** static unsigned *** 9852,9871 **** rs6000_hash_constant (k) rtx k; { ! unsigned result = (GET_CODE (k) << 3) ^ GET_MODE (k); ! const char *format = GET_RTX_FORMAT (GET_CODE (k)); ! int flen = strlen (format); ! int fidx; ! if (GET_CODE (k) == LABEL_REF) ! return result * 1231 + X0INT (XEXP (k, 0), 3); ! if (GET_CODE (k) == CONST_DOUBLE) ! fidx = 1; ! else if (GET_CODE (k) == CODE_LABEL) ! fidx = 3; ! else ! fidx = 0; for (; fidx < flen; fidx++) switch (format[fidx]) --- 11574,11607 ---- rs6000_hash_constant (k) rtx k; { ! enum rtx_code code = GET_CODE (k); ! enum machine_mode mode = GET_MODE (k); ! unsigned result = (code << 3) ^ mode; ! const char *format; ! int flen, fidx; ! format = GET_RTX_FORMAT (code); ! flen = strlen (format); ! fidx = 0; ! switch (code) ! { ! case LABEL_REF: ! return result * 1231 + (unsigned) INSN_UID (XEXP (k, 0)); ! ! case CONST_DOUBLE: ! if (mode != VOIDmode) ! return real_hash (CONST_DOUBLE_REAL_VALUE (k)) * result; ! flen = 2; ! break; ! ! case CODE_LABEL: ! fidx = 3; ! break; ! ! default: ! break; ! } for (; fidx < flen; fidx++) switch (format[fidx]) *************** rs6000_hash_constant (k) *** 9902,9907 **** --- 11638,11644 ---- default: abort (); } + return result; } *************** toc_hash_eq (h1, h2) *** 9928,9956 **** != ((const struct toc_hash_struct *) h2)->key_mode) return 0; ! /* Gotcha: One of these const_doubles will be in memory. ! The other may be on the constant-pool chain. ! So rtx_equal_p will think they are different... */ ! if (r1 == r2) ! return 1; ! if (GET_CODE (r1) != GET_CODE (r2) ! || GET_MODE (r1) != GET_MODE (r2)) ! return 0; ! if (GET_CODE (r1) == CONST_DOUBLE) ! { ! int format_len = strlen (GET_RTX_FORMAT (CONST_DOUBLE)); ! int i; ! for (i = 1; i < format_len; i++) ! if (XWINT (r1, i) != XWINT (r2, i)) ! return 0; ! ! return 1; ! } ! else if (GET_CODE (r1) == LABEL_REF) ! return (CODE_LABEL_NUMBER (XEXP (r1, 0)) ! == CODE_LABEL_NUMBER (XEXP (r2, 0))); ! else ! return rtx_equal_p (r1, r2); } /* Mark the hash table-entry HASH_ENTRY. */ --- 11665,11671 ---- != ((const struct toc_hash_struct *) h2)->key_mode) return 0; ! return rtx_equal_p (r1, r2); } /* Mark the hash table-entry HASH_ENTRY. */ *************** output_toc (file, x, labelno, mode) *** 10080,10086 **** /* Handle FP constants specially. Note that if we have a minimal TOC, things we put here aren't actually in the TOC, so we can allow FP constants. */ ! if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode) { REAL_VALUE_TYPE rv; long k[2]; --- 11795,11836 ---- /* Handle FP constants specially. Note that if we have a minimal TOC, things we put here aren't actually in the TOC, so we can allow FP constants. */ ! if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == TFmode) ! { ! REAL_VALUE_TYPE rv; ! long k[4]; ! ! REAL_VALUE_FROM_CONST_DOUBLE (rv, x); ! REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, k); ! ! if (TARGET_64BIT) ! { ! if (TARGET_MINIMAL_TOC) ! fputs (DOUBLE_INT_ASM_OP, file); ! else ! fprintf (file, "\t.tc FT_%lx_%lx_%lx_%lx[TC],", ! k[0] & 0xffffffff, k[1] & 0xffffffff, ! k[2] & 0xffffffff, k[3] & 0xffffffff); ! fprintf (file, "0x%lx%08lx,0x%lx%08lx\n", ! k[0] & 0xffffffff, k[1] & 0xffffffff, ! k[2] & 0xffffffff, k[3] & 0xffffffff); ! return; ! } ! else ! { ! if (TARGET_MINIMAL_TOC) ! fputs ("\t.long ", file); ! else ! fprintf (file, "\t.tc FT_%lx_%lx_%lx_%lx[TC],", ! k[0] & 0xffffffff, k[1] & 0xffffffff, ! k[2] & 0xffffffff, k[3] & 0xffffffff); ! fprintf (file, "0x%lx,0x%lx,0x%lx,0x%lx\n", ! k[0] & 0xffffffff, k[1] & 0xffffffff, ! k[2] & 0xffffffff, k[3] & 0xffffffff); ! return; ! } ! } ! else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode) { REAL_VALUE_TYPE rv; long k[2]; *************** output_toc (file, x, labelno, mode) *** 10241,10247 **** else abort (); ! STRIP_NAME_ENCODING (real_name, name); if (TARGET_MINIMAL_TOC) fputs (TARGET_32BIT ? "\t.long " : DOUBLE_INT_ASM_OP, file); else --- 11991,11997 ---- else abort (); ! real_name = (*targetm.strip_name_encoding) (name); if (TARGET_MINIMAL_TOC) fputs (TARGET_32BIT ? "\t.long " : DOUBLE_INT_ASM_OP, file); else *************** rs6000_gen_section_name (buf, filename, *** 10377,10383 **** } len = strlen (after_last_slash) + strlen (section_desc) + 2; ! *buf = (char *) permalloc (len); p = *buf; *p++ = '_'; --- 12127,12133 ---- } len = strlen (after_last_slash) + strlen (section_desc) + 2; ! *buf = (char *) xmalloc (len); p = *buf; *p++ = '_'; *************** output_profile_hook (labelno) *** 10416,10422 **** rtx fun; ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno); ! STRIP_NAME_ENCODING (label_name, ggc_strdup (buf)); fun = gen_rtx_SYMBOL_REF (Pmode, label_name); emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1, --- 12166,12172 ---- rtx fun; ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno); ! label_name = (*targetm.strip_name_encoding) (ggc_strdup (buf)); fun = gen_rtx_SYMBOL_REF (Pmode, label_name); emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1, *************** rs6000_adjust_cost (insn, link, dep_insn *** 10555,10572 **** switch (get_attr_type (insn)) { case TYPE_JMPREG: ! /* Tell the first scheduling pass about the latency between a mtctr and bctr (and mtlr and br/blr). The first scheduling pass will not know about this latency since the mtctr instruction, which has the latency associated to it, will be generated by reload. */ ! return TARGET_POWER ? 5 : 4; case TYPE_BRANCH: /* Leave some extra cycles between a compare and its dependent branch, to inhibit expensive mispredicts. */ ! if ((rs6000_cpu_attr == CPU_PPC750 ! || rs6000_cpu_attr == CPU_PPC7400 ! || rs6000_cpu_attr == CPU_PPC7450) && recog_memoized (dep_insn) && (INSN_CODE (dep_insn) >= 0) && (get_attr_type (dep_insn) == TYPE_COMPARE --- 12305,12328 ---- switch (get_attr_type (insn)) { case TYPE_JMPREG: ! /* Tell the first scheduling pass about the latency between a mtctr and bctr (and mtlr and br/blr). The first scheduling pass will not know about this latency since the mtctr instruction, which has the latency associated to it, will be generated by reload. */ ! return TARGET_POWER ? 5 : 4; case TYPE_BRANCH: /* Leave some extra cycles between a compare and its dependent branch, to inhibit expensive mispredicts. */ ! if ((rs6000_cpu_attr == CPU_PPC603 ! || rs6000_cpu_attr == CPU_PPC604 ! || rs6000_cpu_attr == CPU_PPC604E ! || rs6000_cpu_attr == CPU_PPC620 ! || rs6000_cpu_attr == CPU_PPC630 ! || rs6000_cpu_attr == CPU_PPC750 ! || rs6000_cpu_attr == CPU_PPC7400 ! || rs6000_cpu_attr == CPU_PPC7450 ! || rs6000_cpu_attr == CPU_POWER4) && recog_memoized (dep_insn) && (INSN_CODE (dep_insn) >= 0) && (get_attr_type (dep_insn) == TYPE_COMPARE *************** rs6000_issue_rate () *** 10647,10652 **** --- 12403,12409 ---- case CPU_PPC604E: case CPU_PPC620: case CPU_PPC630: + case CPU_POWER4: return 4; default: return 1; *************** rs6000_initialize_trampoline (addr, fnad *** 10739,10750 **** const struct attribute_spec rs6000_attribute_table[] = { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ ! { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute }, ! { NULL, 0, 0, false, false, false, NULL } }; ! /* Handle a "longcall" attribute; arguments as in struct ! attribute_spec.handler. */ static tree rs6000_handle_longcall_attribute (node, name, args, flags, no_add_attrs) --- 12496,12508 ---- const struct attribute_spec rs6000_attribute_table[] = { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ ! { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute }, ! { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute }, ! { NULL, 0, 0, false, false, false, NULL } }; ! /* Handle a "longcall" or "shortcall" attribute; arguments as in ! struct attribute_spec.handler. */ static tree rs6000_handle_longcall_attribute (node, name, args, flags, no_add_attrs) *************** rs6000_handle_longcall_attribute (node, *** 10766,10771 **** --- 12524,12543 ---- return NULL_TREE; } + /* Set longcall attributes on all functions declared when + rs6000_default_long_calls is true. */ + static void + rs6000_set_default_type_attributes (type) + tree type; + { + if (rs6000_default_long_calls + && (TREE_CODE (type) == FUNCTION_TYPE + || TREE_CODE (type) == METHOD_TYPE)) + TYPE_ATTRIBUTES (type) = tree_cons (get_identifier ("longcall"), + NULL_TREE, + TYPE_ATTRIBUTES (type)); + } + /* Return a reference suitable for calling a function with the longcall attribute. */ *************** rs6000_longcall_ref (call_ref) *** 10794,10799 **** --- 12566,12573 ---- } + #ifdef USING_ELFOS_H + /* A C statement or statements to switch to the appropriate section for output of RTX in mode MODE. You can assume that RTX is some kind of constant in RTL. The argument MODE is redundant except in *************** rs6000_longcall_ref (call_ref) *** 10803,10824 **** Do not define this macro if you put all constants in the read-only data section. */ ! #ifdef USING_ELFOS_H ! ! void ! rs6000_select_rtx_section (mode, x) enum machine_mode mode; rtx x; { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (x, mode)) toc_section (); - else if (flag_pic - && (GET_CODE (x) == SYMBOL_REF - || GET_CODE (x) == LABEL_REF - || GET_CODE (x) == CONST)) - data_section (); else ! const_section (); } /* A C statement or statements to switch to the appropriate --- 12577,12592 ---- Do not define this macro if you put all constants in the read-only data section. */ ! static void ! rs6000_elf_select_rtx_section (mode, x, align) enum machine_mode mode; rtx x; + unsigned HOST_WIDE_INT align; { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (x, mode)) toc_section (); else ! default_elf_select_rtx_section (mode, x, align); } /* A C statement or statements to switch to the appropriate *************** rs6000_select_rtx_section (mode, x) *** 10826,10871 **** or a constant of some sort. RELOC indicates whether forming the initial value of DECL requires link-time relocations. */ ! void ! rs6000_select_section (decl, reloc) tree decl; int reloc; { ! int size = int_size_in_bytes (TREE_TYPE (decl)); ! int needs_sdata; ! int readonly; ! static void (* const sec_funcs[4]) PARAMS ((void)) = { ! &const_section, ! &sdata2_section, ! &data_section, ! &sdata_section ! }; ! ! needs_sdata = (size > 0 ! && size <= g_switch_value ! && rs6000_sdata != SDATA_NONE ! && (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl))); ! ! if (TREE_CODE (decl) == STRING_CST) ! readonly = ! flag_writable_strings; ! else if (TREE_CODE (decl) == VAR_DECL) ! readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc) ! && TREE_READONLY (decl) ! && ! TREE_SIDE_EFFECTS (decl) ! && DECL_INITIAL (decl) ! && DECL_INITIAL (decl) != error_mark_node ! && TREE_CONSTANT (DECL_INITIAL (decl))); ! else if (TREE_CODE (decl) == CONSTRUCTOR) ! readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc) ! && ! TREE_SIDE_EFFECTS (decl) ! && TREE_CONSTANT (decl)); ! else ! readonly = ! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc); ! ! if (needs_sdata && rs6000_sdata != SDATA_EABI) ! readonly = 0; ! ! (*sec_funcs[(readonly ? 0 : 2) + (needs_sdata ? 1 : 0)])(); } /* A C statement to build up a unique section name, expressed as a --- 12594,12607 ---- or a constant of some sort. RELOC indicates whether forming the initial value of DECL requires link-time relocations. */ ! static void ! rs6000_elf_select_section (decl, reloc, align) tree decl; int reloc; + unsigned HOST_WIDE_INT align; { ! default_elf_select_section_1 (decl, reloc, align, ! flag_pic || DEFAULT_ABI == ABI_AIX); } /* A C statement to build up a unique section name, expressed as a *************** rs6000_select_section (decl, reloc) *** 10874,10993 **** link-time relocations. If you do not define this macro, GCC will use the symbol name prefixed by `.' as the section name. Note - this macro can now be called for uninitialized data items as well as ! initialised data and functions. */ ! void ! rs6000_unique_section (decl, reloc) tree decl; int reloc; { ! int len; ! int sec; ! const char *name; ! char *string; ! const char *prefix; ! ! static const char *const prefixes[7][2] = ! { ! { ".rodata.", ".gnu.linkonce.r." }, ! { ".sdata2.", ".gnu.linkonce.s2." }, ! { ".data.", ".gnu.linkonce.d." }, ! { ".sdata.", ".gnu.linkonce.s." }, ! { ".bss.", ".gnu.linkonce.b." }, ! { ".sbss.", ".gnu.linkonce.sb." }, ! { ".text.", ".gnu.linkonce.t." } ! }; ! ! if (TREE_CODE (decl) == FUNCTION_DECL) ! sec = 6; ! else ! { ! int readonly; ! int needs_sdata; ! int size; ! ! if (TREE_CODE (decl) == STRING_CST) ! readonly = ! flag_writable_strings; ! else if (TREE_CODE (decl) == VAR_DECL) ! readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc) ! && TREE_READONLY (decl) ! && ! TREE_SIDE_EFFECTS (decl) ! && TREE_CONSTANT (DECL_INITIAL (decl))); ! else ! readonly = ! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc); ! ! size = int_size_in_bytes (TREE_TYPE (decl)); ! needs_sdata = (size > 0 ! && size <= g_switch_value ! && rs6000_sdata != SDATA_NONE ! && (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl))); ! ! if (DECL_INITIAL (decl) == 0 ! || DECL_INITIAL (decl) == error_mark_node) ! sec = 4; ! else if (! readonly) ! sec = 2; ! else ! sec = 0; ! ! if (needs_sdata) ! { ! /* .sdata2 is only for EABI. */ ! if (sec == 0 && rs6000_sdata != SDATA_EABI) ! sec = 2; ! sec += 1; ! } ! } ! ! STRIP_NAME_ENCODING (name, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); ! prefix = prefixes[sec][DECL_ONE_ONLY (decl)]; ! len = strlen (name) + strlen (prefix); ! string = alloca (len + 1); ! ! sprintf (string, "%s%s", prefix, name); ! ! DECL_SECTION_NAME (decl) = build_string (len, string); ! } ! ! ! static bool ! rs6000_binds_local_p (exp) ! tree exp; ! { ! bool local_p; ! tree attr; ! ! /* A non-decl is an entry in the constant pool. */ ! if (!DECL_P (exp)) ! local_p = true; ! /* Static variables are always local. */ ! else if (! TREE_PUBLIC (exp)) ! local_p = true; ! /* Otherwise, variables defined outside this object may not be local. */ ! else if (DECL_EXTERNAL (exp)) ! local_p = false; ! /* Linkonce and weak data are never local. */ ! else if (DECL_ONE_ONLY (exp) || DECL_WEAK (exp)) ! local_p = false; ! /* If PIC, then assume that any global name can be overridden by ! * symbols resolved from other modules. */ ! else if (flag_pic || rs6000_flag_pic) ! local_p = false; ! /* Uninitialized COMMON variable may be unified with symbols ! * resolved from other modules. */ ! else if (DECL_COMMON (exp) ! && (DECL_INITIAL (exp) == NULL ! || DECL_INITIAL (exp) == error_mark_node)) ! local_p = false; ! /* Otherwise we're left with initialized (or non-common) global data ! * which is of necessity defined locally. */ ! else ! local_p = true; ! ! return local_p; } ! /* If we are referencing a function that is static or is known to be in this file, make the SYMBOL_REF special. We can use this to indicate that we can branch to this function without emitting a no-op after the --- 12610,12627 ---- link-time relocations. If you do not define this macro, GCC will use the symbol name prefixed by `.' as the section name. Note - this macro can now be called for uninitialized data items as well as ! initialized data and functions. */ ! static void ! rs6000_elf_unique_section (decl, reloc) tree decl; int reloc; { ! default_unique_section_1 (decl, reloc, ! flag_pic || DEFAULT_ABI == ABI_AIX); } ! /* If we are referencing a function that is static or is known to be in this file, make the SYMBOL_REF special. We can use this to indicate that we can branch to this function without emitting a no-op after the *************** rs6000_binds_local_p (exp) *** 10996,11009 **** the function descriptor name. This saves a lot of overriding code to read the prefixes. */ ! void ! rs6000_encode_section_info (decl) tree decl; { if (TREE_CODE (decl) == FUNCTION_DECL) { rtx sym_ref = XEXP (DECL_RTL (decl), 0); ! if (rs6000_binds_local_p (decl)) SYMBOL_REF_FLAG (sym_ref) = 1; if (DEFAULT_ABI == ABI_AIX) --- 12630,12647 ---- the function descriptor name. This saves a lot of overriding code to read the prefixes. */ ! static void ! rs6000_elf_encode_section_info (decl, first) tree decl; + int first; { + if (!first) + return; + if (TREE_CODE (decl) == FUNCTION_DECL) { rtx sym_ref = XEXP (DECL_RTL (decl), 0); ! if ((*targetm.binds_local_p) (decl)) SYMBOL_REF_FLAG (sym_ref) = 1; if (DEFAULT_ABI == ABI_AIX) *************** rs6000_encode_section_info (decl) *** 11028,11034 **** const char *name = (char *)0; int len = 0; ! if (rs6000_binds_local_p (decl)) SYMBOL_REF_FLAG (sym_ref) = 1; if (section_name) --- 12666,12672 ---- const char *name = (char *)0; int len = 0; ! if ((*targetm.binds_local_p) (decl)) SYMBOL_REF_FLAG (sym_ref) = 1; if (section_name) *************** rs6000_encode_section_info (decl) *** 11057,11063 **** || (len == sizeof (".PPC.EMB.sbss0") - 1 && strcmp (name, ".PPC.EMB.sbss0") == 0)))) { - rtx sym_ref = XEXP (DECL_RTL (decl), 0); size_t len = strlen (XSTR (sym_ref, 0)); char *str = alloca (len + 2); --- 12695,12700 ---- *************** rs6000_encode_section_info (decl) *** 11068,11073 **** --- 12705,12747 ---- } } + static const char * + rs6000_elf_strip_name_encoding (str) + const char *str; + { + while (*str == '*' || *str == '@') + str++; + return str; + } + + static bool + rs6000_elf_in_small_data_p (decl) + tree decl; + { + if (rs6000_sdata == SDATA_NONE) + return false; + + if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl)) + { + const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); + if (strcmp (section, ".sdata") == 0 + || strcmp (section, ".sdata2") == 0 + || strcmp (section, ".sbss") == 0) + return true; + } + else + { + HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl)); + + if (size > 0 + && size <= g_switch_value + && (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl))) + return true; + } + + return false; + } + #endif /* USING_ELFOS_H */ *************** rs6000_fatal_bad_address (op) *** 11115,11130 **** static void rs6000_add_gc_roots () { - ggc_add_rtx_root (&rs6000_compare_op0, 1); - ggc_add_rtx_root (&rs6000_compare_op1, 1); - toc_hash_table = htab_create (1021, toc_hash_function, toc_hash_eq, NULL); ggc_add_root (&toc_hash_table, 1, sizeof (toc_hash_table), toc_hash_mark_table); - - #if TARGET_MACHO - machopic_add_gc_roots (); - #endif } #if TARGET_MACHO --- 12789,12797 ---- *************** output_compiler_stub () *** 11186,11193 **** { char tmp_buf[256]; char label_buf[256]; ! char *label; ! tree tmp_stub, stub; if (!flag_pic) for (stub = stub_list; stub; stub = TREE_CHAIN (stub)) --- 12853,12859 ---- { char tmp_buf[256]; char label_buf[256]; ! tree stub; if (!flag_pic) for (stub = stub_list; stub; stub = TREE_CHAIN (stub)) *************** output_call (insn, call_dest, operand_nu *** 11273,11279 **** if (no_previous_def (funname)) { ! int line_number; rtx label_rtx = gen_label_rtx (); char *label_buf, temp_buf[256]; ASM_GENERATE_INTERNAL_LABEL (temp_buf, "L", --- 12939,12945 ---- if (no_previous_def (funname)) { ! int line_number = 0; rtx label_rtx = gen_label_rtx (); char *label_buf, temp_buf[256]; ASM_GENERATE_INTERNAL_LABEL (temp_buf, "L", *************** machopic_output_stub (file, symb, stub) *** 11333,11339 **** static int label = 0; /* Lose our funky encoding stuff so it doesn't contaminate the stub. */ ! STRIP_NAME_ENCODING (symb, symb); label += 1; --- 12999,13005 ---- static int label = 0; /* Lose our funky encoding stuff so it doesn't contaminate the stub. */ ! symb = (*targetm.strip_name_encoding) (symb); label += 1; *************** rs6000_elf_section_type_flags (decl, nam *** 11453,11459 **** const char *name; int reloc; { ! unsigned int flags = default_section_type_flags (decl, name, reloc); if (TARGET_RELOCATABLE) flags |= SECTION_WRITE; --- 13119,13127 ---- const char *name; int reloc; { ! unsigned int flags ! = default_section_type_flags_1 (decl, name, reloc, ! flag_pic || DEFAULT_ABI == ABI_AIX); if (TARGET_RELOCATABLE) flags |= SECTION_WRITE; *************** rs6000_elf_asm_out_destructor (symbol, p *** 11531,11542 **** } #endif ! #ifdef OBJECT_FORMAT_COFF static void ! xcoff_asm_named_section (name, flags) const char *name; - unsigned int flags ATTRIBUTE_UNUSED; { ! fprintf (asm_out_file, "\t.csect %s\n", name); } ! #endif --- 13199,13413 ---- } #endif ! #if TARGET_XCOFF static void ! rs6000_xcoff_asm_globalize_label (stream, name) ! FILE *stream; const char *name; { ! fputs (GLOBAL_ASM_OP, stream); ! RS6000_OUTPUT_BASENAME (stream, name); ! putc ('\n', stream); } ! ! static void ! rs6000_xcoff_asm_named_section (name, flags) ! const char *name; ! unsigned int flags; ! { ! int smclass; ! static const char * const suffix[3] = { "PR", "RO", "RW" }; ! ! if (flags & SECTION_CODE) ! smclass = 0; ! else if (flags & SECTION_WRITE) ! smclass = 2; ! else ! smclass = 1; ! ! fprintf (asm_out_file, "\t.csect %s%s[%s],%u\n", ! (flags & SECTION_CODE) ? "." : "", ! name, suffix[smclass], flags & SECTION_ENTSIZE); ! } ! ! static void ! rs6000_xcoff_select_section (decl, reloc, align) ! tree decl; ! int reloc; ! unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; ! { ! if (decl_readonly_section_1 (decl, reloc, 1)) ! { ! if (TREE_PUBLIC (decl)) ! read_only_data_section (); ! else ! read_only_private_data_section (); ! } ! else ! { ! if (TREE_PUBLIC (decl)) ! data_section (); ! else ! private_data_section (); ! } ! } ! ! static void ! rs6000_xcoff_unique_section (decl, reloc) ! tree decl; ! int reloc ATTRIBUTE_UNUSED; ! { ! const char *name; ! ! /* Use select_section for private and uninitialized data. */ ! if (!TREE_PUBLIC (decl) ! || DECL_COMMON (decl) ! || DECL_INITIAL (decl) == NULL_TREE ! || DECL_INITIAL (decl) == error_mark_node ! || (flag_zero_initialized_in_bss ! && initializer_zerop (DECL_INITIAL (decl)))) ! return; ! ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! name = (*targetm.strip_name_encoding) (name); ! DECL_SECTION_NAME (decl) = build_string (strlen (name), name); ! } ! ! /* Select section for constant in constant pool. ! ! On RS/6000, all constants are in the private read-only data area. ! However, if this is being placed in the TOC it must be output as a ! toc entry. */ ! ! static void ! rs6000_xcoff_select_rtx_section (mode, x, align) ! enum machine_mode mode; ! rtx x; ! unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; ! { ! if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (x, mode)) ! toc_section (); ! else ! read_only_private_data_section (); ! } ! ! /* Remove any trailing [DS] or the like from the symbol name. */ ! ! static const char * ! rs6000_xcoff_strip_name_encoding (name) ! const char *name; ! { ! size_t len; ! if (*name == '*') ! name++; ! len = strlen (name); ! if (name[len - 1] == ']') ! return ggc_alloc_string (name, len - 4); ! else ! return name; ! } ! ! /* Section attributes. AIX is always PIC. */ ! ! static unsigned int ! rs6000_xcoff_section_type_flags (decl, name, reloc) ! tree decl; ! const char *name; ! int reloc; ! { ! unsigned int align; ! unsigned int flags = default_section_type_flags_1 (decl, name, reloc, 1); ! ! /* Align to at least UNIT size. */ ! if (flags & SECTION_CODE) ! align = MIN_UNITS_PER_WORD; ! else ! /* Increase alignment of large objects if not already stricter. */ ! align = MAX ((DECL_ALIGN (decl) / BITS_PER_UNIT), ! int_size_in_bytes (TREE_TYPE (decl)) > MIN_UNITS_PER_WORD ! ? UNITS_PER_FP_WORD : MIN_UNITS_PER_WORD); ! ! return flags | (exact_log2 (align) & SECTION_ENTSIZE); ! } ! ! #endif /* TARGET_XCOFF */ ! ! /* Note that this is also used for PPC64 Linux. */ ! ! static void ! rs6000_xcoff_encode_section_info (decl, first) ! tree decl; ! int first ATTRIBUTE_UNUSED; ! { ! if (TREE_CODE (decl) == FUNCTION_DECL ! && (*targetm.binds_local_p) (decl)) ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; ! } ! ! /* Cross-module name binding. For AIX and PPC64 Linux, which always are ! PIC, use private copy of flag_pic. */ ! ! static bool ! rs6000_binds_local_p (decl) ! tree decl; ! { ! return default_binds_local_p_1 (decl, flag_pic || rs6000_flag_pic); ! } ! ! /* A C expression returning the cost of moving data from a register of class ! CLASS1 to one of CLASS2. */ ! ! int ! rs6000_register_move_cost (mode, from, to) ! enum machine_mode mode; ! enum reg_class from, to; ! { ! /* Moves from/to GENERAL_REGS. */ ! if (reg_classes_intersect_p (to, GENERAL_REGS) ! || reg_classes_intersect_p (from, GENERAL_REGS)) ! { ! if (! reg_classes_intersect_p (to, GENERAL_REGS)) ! from = to; ! ! if (from == FLOAT_REGS || from == ALTIVEC_REGS) ! return (rs6000_memory_move_cost (mode, from, 0) ! + rs6000_memory_move_cost (mode, GENERAL_REGS, 0)); ! ! /* It's more expensive to move CR_REGS than CR0_REGS because of the shift...*/ ! else if (from == CR_REGS) ! return 4; ! ! else ! /* A move will cost one instruction per GPR moved. */ ! return 2 * HARD_REGNO_NREGS (0, mode); ! } ! ! /* Moving between two similar registers is just one instruction. */ ! else if (reg_classes_intersect_p (to, from)) ! return mode == TFmode ? 4 : 2; ! ! /* Everything else has to go through GENERAL_REGS. */ ! else ! return (rs6000_register_move_cost (mode, GENERAL_REGS, to) ! + rs6000_register_move_cost (mode, from, GENERAL_REGS)); ! } ! ! /* A C expressions returning the cost of moving data of MODE from a register to ! or from memory. */ ! ! int ! rs6000_memory_move_cost (mode, class, in) ! enum machine_mode mode; ! enum reg_class class; ! int in ATTRIBUTE_UNUSED; ! { ! if (reg_classes_intersect_p (class, GENERAL_REGS)) ! return 4 * HARD_REGNO_NREGS (0, mode); ! else if (reg_classes_intersect_p (class, FLOAT_REGS)) ! return 4 * HARD_REGNO_NREGS (32, mode); ! else if (reg_classes_intersect_p (class, ALTIVEC_REGS)) ! return 4 * HARD_REGNO_NREGS (FIRST_ALTIVEC_REGNO, mode); ! else ! return 4 + rs6000_register_move_cost (mode, class, GENERAL_REGS); ! } ! diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/rs6000-c.c gcc-3.3/gcc/config/rs6000/rs6000-c.c *** gcc-3.2.3/gcc/config/rs6000/rs6000-c.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/rs6000-c.c 2002-11-26 15:46:40.000000000 +0000 *************** *** 0 **** --- 1,128 ---- + /* Subroutines for the C front end on the POWER and PowerPC architectures. + Copyright (C) 2002 + Free Software Foundation, Inc. + + Contributed by Zack Weinberg + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "cpplib.h" + #include "tree.h" + #include "c-pragma.h" + #include "errors.h" + #include "tm_p.h" + + /* Handle the machine specific pragma longcall. Its syntax is + + # pragma longcall ( TOGGLE ) + + where TOGGLE is either 0 or 1. + + rs6000_default_long_calls is set to the value of TOGGLE, changing + whether or not new function declarations receive a longcall + attribute by default. */ + + #define SYNTAX_ERROR(msgid) do { \ + warning (msgid); \ + warning ("ignoring malformed #pragma longcall"); \ + return; \ + } while (0) + + void + rs6000_pragma_longcall (pfile) + cpp_reader *pfile ATTRIBUTE_UNUSED; + { + tree x, n; + + /* If we get here, generic code has already scanned the directive + leader and the word "longcall". */ + + if (c_lex (&x) != CPP_OPEN_PAREN) + SYNTAX_ERROR ("missing open paren"); + if (c_lex (&n) != CPP_NUMBER) + SYNTAX_ERROR ("missing number"); + if (c_lex (&x) != CPP_CLOSE_PAREN) + SYNTAX_ERROR ("missing close paren"); + + if (n != integer_zero_node && n != integer_one_node) + SYNTAX_ERROR ("number must be 0 or 1"); + + if (c_lex (&x) != CPP_EOF) + warning ("junk at end of #pragma longcall"); + + rs6000_default_long_calls = (n == integer_one_node); + } + + /* Handle defining many CPP flags based on TARGET_xxx. As a general + policy, rather than trying to guess what flags a user might want a + #define for, it's better to define a flag for everything. */ + + #define builtin_define(TXT) cpp_define (pfile, TXT) + #define builtin_assert(TXT) cpp_assert (pfile, TXT) + + void + rs6000_cpu_cpp_builtins (pfile) + cpp_reader *pfile; + { + if (TARGET_POWER2) + builtin_define ("_ARCH_PWR2"); + else if (TARGET_POWER) + builtin_define ("_ARCH_PWR"); + if (TARGET_POWERPC) + builtin_define ("_ARCH_PPC"); + if (TARGET_POWERPC64) + builtin_define ("_ARCH_PPC64"); + if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC) + builtin_define ("_ARCH_COM"); + if (TARGET_ALTIVEC) + builtin_define ("__ALTIVEC__"); + if (TARGET_SPE) + builtin_define ("__SPE__"); + if (TARGET_SOFT_FLOAT) + builtin_define ("_SOFT_FLOAT"); + /* Used by lwarx/stwcx. errata work-around. */ + if (rs6000_cpu == PROCESSOR_PPC405) + builtin_define ("__PPC405__"); + + /* May be overridden by target configuration. */ + RS6000_CPU_CPP_ENDIAN_BUILTINS(); + + if (TARGET_LONG_DOUBLE_128) + builtin_define ("__LONG_DOUBLE_128__"); + + switch (rs6000_current_abi) + { + case ABI_V4: + builtin_define ("_CALL_SYSV"); + break; + case ABI_AIX_NODESC: + builtin_define ("_CALL_AIX"); + break; + case ABI_AIX: + builtin_define ("_CALL_AIXDESC"); + builtin_define ("_CALL_AIX"); + break; + case ABI_DARWIN: + builtin_define ("_CALL_DARWIN"); + break; + default: + break; + } + } diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/rs6000.h gcc-3.3/gcc/config/rs6000/rs6000.h *** gcc-3.2.3/gcc/config/rs6000/rs6000.h 2003-03-29 12:39:20.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/rs6000.h 2003-04-15 10:00:30.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 46,91 **** #define TARGET_CPU_DEFAULT ((char *)0) #endif - /* Common CPP definitions used by CPP_SPEC among the various targets - for handling -mcpu=xxx switches. */ - #define CPP_CPU_SPEC \ - "%{!mcpu*: \ - %{mpower: %{!mpower2: -D_ARCH_PWR}} \ - %{mpower2: -D_ARCH_PWR2} \ - %{mpowerpc*: -D_ARCH_PPC} \ - %{mno-power: %{!mpowerpc*: -D_ARCH_COM}} \ - %{!mno-power: %{!mpower2: %(cpp_default)}}} \ - %{mcpu=common: -D_ARCH_COM} \ - %{mcpu=power: -D_ARCH_PWR} \ - %{mcpu=power2: -D_ARCH_PWR2} \ - %{mcpu=powerpc: -D_ARCH_PPC} \ - %{mcpu=rios: -D_ARCH_PWR} \ - %{mcpu=rios1: -D_ARCH_PWR} \ - %{mcpu=rios2: -D_ARCH_PWR2} \ - %{mcpu=rsc: -D_ARCH_PWR} \ - %{mcpu=rsc1: -D_ARCH_PWR} \ - %{mcpu=401: -D_ARCH_PPC} \ - %{mcpu=403: -D_ARCH_PPC} \ - %{mcpu=405: -D_ARCH_PPC} \ - %{mcpu=505: -D_ARCH_PPC} \ - %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ - %{mcpu=602: -D_ARCH_PPC} \ - %{mcpu=603: -D_ARCH_PPC} \ - %{mcpu=603e: -D_ARCH_PPC} \ - %{mcpu=ec603e: -D_ARCH_PPC} \ - %{mcpu=604: -D_ARCH_PPC} \ - %{mcpu=604e: -D_ARCH_PPC} \ - %{mcpu=620: -D_ARCH_PPC} \ - %{mcpu=740: -D_ARCH_PPC} \ - %{mcpu=7400: -D_ARCH_PPC} \ - %{mcpu=7450: -D_ARCH_PPC} \ - %{mcpu=750: -D_ARCH_PPC} \ - %{mcpu=801: -D_ARCH_PPC} \ - %{mcpu=821: -D_ARCH_PPC} \ - %{mcpu=823: -D_ARCH_PPC} \ - %{mcpu=860: -D_ARCH_PPC} \ - %{maltivec: -D__ALTIVEC__}" - /* Common ASM definitions used by ASM_SPEC among the various targets for handling -mcpu=xxx switches. */ #define ASM_CPU_SPEC \ --- 46,51 ---- *************** Boston, MA 02111-1307, USA. */ *** 98,103 **** --- 58,65 ---- %{mcpu=common: -mcom} \ %{mcpu=power: -mpwr} \ %{mcpu=power2: -mpwrx} \ + %{mcpu=power3: -m604} \ + %{mcpu=power4: -mpower4} \ %{mcpu=powerpc: -mppc} \ %{mcpu=rios: -mpwr} \ %{mcpu=rios1: -mpwr} \ *************** Boston, MA 02111-1307, USA. */ *** 116,121 **** --- 78,84 ---- %{mcpu=604: -mppc} \ %{mcpu=604e: -mppc} \ %{mcpu=620: -mppc} \ + %{mcpu=630: -m604} \ %{mcpu=740: -mppc} \ %{mcpu=7400: -mppc} \ %{mcpu=7450: -mppc} \ *************** Boston, MA 02111-1307, USA. */ *** 124,129 **** --- 87,93 ---- %{mcpu=821: -mppc} \ %{mcpu=823: -mppc} \ %{mcpu=860: -mppc} \ + %{mcpu=8540: -me500} \ %{maltivec: -maltivec}" #define CPP_DEFAULT_SPEC "" *************** Boston, MA 02111-1307, USA. */ *** 143,149 **** #define SUBTARGET_EXTRA_SPECS #define EXTRA_SPECS \ - { "cpp_cpu", CPP_CPU_SPEC }, \ { "cpp_default", CPP_DEFAULT_SPEC }, \ { "asm_cpu", ASM_CPU_SPEC }, \ { "asm_default", ASM_DEFAULT_SPEC }, \ --- 107,112 ---- *************** extern int target_flags; *** 197,203 **** /* Disable use of FPRs. */ #define MASK_SOFT_FLOAT 0x00000800 ! /* Enable load/store multiple, even on powerpc */ #define MASK_MULTIPLE 0x00001000 #define MASK_MULTIPLE_SET 0x00002000 --- 160,166 ---- /* Disable use of FPRs. */ #define MASK_SOFT_FLOAT 0x00000800 ! /* Enable load/store multiple, even on PowerPC */ #define MASK_MULTIPLE 0x00001000 #define MASK_MULTIPLE_SET 0x00002000 *************** enum processor_type *** 395,401 **** PROCESSOR_PPC630, PROCESSOR_PPC750, PROCESSOR_PPC7400, ! PROCESSOR_PPC7450 }; extern enum processor_type rs6000_cpu; --- 358,366 ---- PROCESSOR_PPC630, PROCESSOR_PPC750, PROCESSOR_PPC7400, ! PROCESSOR_PPC7450, ! PROCESSOR_PPC8540, ! PROCESSOR_POWER4 }; extern enum processor_type rs6000_cpu; *************** extern enum processor_type rs6000_cpu; *** 427,435 **** --- 392,409 ---- {"tune=", &rs6000_select[2].string, \ N_("Schedule code for given CPU") }, \ {"debug=", &rs6000_debug_name, N_("Enable debug output") }, \ + {"traceback=", &rs6000_traceback_name, \ + N_("Select full, part, or no traceback table") }, \ {"abi=", &rs6000_abi_string, N_("Specify ABI to use") }, \ {"long-double-", &rs6000_long_double_size_string, \ N_("Specify size of long double (64 or 128 bits)") }, \ + {"isel=", &rs6000_isel_string, \ + N_("Specify yes/no if isel instructions should be generated") }, \ + {"vrsave=", &rs6000_altivec_vrsave_string, \ + N_("Specify yes/no if VRSAVE instructions should be generated for AltiVec") }, \ + {"longcall", &rs6000_longcall_switch, \ + N_("Avoid all range limits on call instructions") }, \ + {"no-longcall", &rs6000_longcall_switch, "" }, \ SUBTARGET_OPTIONS \ } *************** extern int rs6000_debug_arg; /* debug a *** 453,466 **** --- 427,456 ---- #define TARGET_DEBUG_STACK rs6000_debug_stack #define TARGET_DEBUG_ARG rs6000_debug_arg + extern const char *rs6000_traceback_name; /* Type of traceback table. */ + /* These are separate from target_flags because we've run out of bits there. */ extern const char *rs6000_long_double_size_string; extern int rs6000_long_double_type_size; extern int rs6000_altivec_abi; + extern int rs6000_spe_abi; + extern int rs6000_isel; + extern int rs6000_fprs; + extern const char *rs6000_isel_string; + extern const char *rs6000_altivec_vrsave_string; + extern int rs6000_altivec_vrsave; + extern const char *rs6000_longcall_switch; + extern int rs6000_default_long_calls; #define TARGET_LONG_DOUBLE_128 (rs6000_long_double_type_size == 128) #define TARGET_ALTIVEC_ABI rs6000_altivec_abi + #define TARGET_ALTIVEC_VRSAVE rs6000_altivec_vrsave + + #define TARGET_SPE_ABI 0 + #define TARGET_SPE 0 + #define TARGET_ISEL 0 + #define TARGET_FPRS 1 /* Sometimes certain combinations of command options do not make sense on a particular target machine. You can define a macro *************** extern int rs6000_altivec_abi; *** 480,490 **** /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP - - /* target machine storage layout */ ! /* Define to support cross compilation to an RS6000 target. */ ! #define REAL_ARITHMETIC /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, --- 470,506 ---- /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP ! /* Target pragma. */ ! #define REGISTER_TARGET_PRAGMAS(PFILE) do { \ ! cpp_register_pragma (PFILE, 0, "longcall", rs6000_pragma_longcall); \ ! } while (0) ! ! /* Target #defines. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! rs6000_cpu_cpp_builtins (pfile) ! ! /* This is used by rs6000_cpu_cpp_builtins to indicate the byte order ! we're compiling for. Some configurations may need to override it. */ ! #define RS6000_CPU_CPP_ENDIAN_BUILTINS() \ ! do \ ! { \ ! if (BYTES_BIG_ENDIAN) \ ! { \ ! builtin_define ("__BIG_ENDIAN__"); \ ! builtin_define ("_BIG_ENDIAN"); \ ! builtin_assert ("machine=bigendian"); \ ! } \ ! else \ ! { \ ! builtin_define ("__LITTLE_ENDIAN__"); \ ! builtin_define ("_LITTLE_ENDIAN"); \ ! builtin_assert ("machine=littleendian"); \ ! } \ ! } \ ! while (0) ! ! /* Target machine storage layout. */ /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, *************** extern int rs6000_altivec_abi; *** 522,542 **** instructions for them. Might as well be consistent with bits and bytes. */ #define WORDS_BIG_ENDIAN 1 - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD (! TARGET_POWERPC64 ? 32 : 64) #define MAX_BITS_PER_WORD 64 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (! TARGET_POWERPC64 ? 4 : 8) #define MIN_UNITS_PER_WORD 4 #define UNITS_PER_FP_WORD 8 #define UNITS_PER_ALTIVEC_WORD 16 /* Type used for ptrdiff_t, as a string used in a declaration. */ #define PTRDIFF_TYPE "int" --- 538,555 ---- instructions for them. Might as well be consistent with bits and bytes. */ #define WORDS_BIG_ENDIAN 1 #define MAX_BITS_PER_WORD 64 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (! TARGET_POWERPC64 ? 4 : 8) + #ifdef IN_LIBGCC2 + #define MIN_UNITS_PER_WORD UNITS_PER_WORD + #else #define MIN_UNITS_PER_WORD 4 + #endif #define UNITS_PER_FP_WORD 8 #define UNITS_PER_ALTIVEC_WORD 16 + #define UNITS_PER_SPE_WORD 8 /* Type used for ptrdiff_t, as a string used in a declaration. */ #define PTRDIFF_TYPE "int" *************** extern int rs6000_altivec_abi; *** 572,583 **** words. */ #define LONG_LONG_TYPE_SIZE 64 - /* A C expression for the size in bits of the type `char' on the - target machine. If you don't define this, the default is one - quarter of a word. (If this would be less than one storage unit, - it is rounded up to one unit.) */ - #define CHAR_TYPE_SIZE BITS_PER_UNIT - /* A C expression for the size in bits of the type `float' on the target machine. If you don't define this, the default is one word. */ --- 585,590 ---- *************** extern int rs6000_altivec_abi; *** 627,633 **** local store. TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. */ #define LOCAL_ALIGNMENT(TYPE, ALIGN) \ ! ((TARGET_ALTIVEC && TREE_CODE (TYPE) == VECTOR_TYPE) ? 128 : ALIGN) /* Alignment of field after `int : 0' in a structure. */ #define EMPTY_FIELD_BOUNDARY 32 --- 634,641 ---- local store. TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. */ #define LOCAL_ALIGNMENT(TYPE, ALIGN) \ ! ((TARGET_ALTIVEC && TREE_CODE (TYPE) == VECTOR_TYPE) ? 128 : \ ! (TARGET_SPE && TREE_CODE (TYPE) == VECTOR_TYPE) ? 64 : ALIGN) /* Alignment of field after `int : 0' in a structure. */ #define EMPTY_FIELD_BOUNDARY 32 *************** extern int rs6000_altivec_abi; *** 635,641 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Make strings word-aligned so strcpy from constants will be faster. --- 643,661 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* Return 1 if a structure or array containing FIELD should be ! accessed using `BLKMODE'. ! ! For the SPE, simd types are V2SI, and gcc can be tempted to put the ! entire thing in a DI and use subregs to access the internals. ! store_bit_field() will force (subreg:DI (reg:V2SI x))'s to the ! back-end. Because a single GPR can hold a V2SI, but not a DI, the ! best thing to do is set structs to BLKmode and avoid Severe Tire ! Damage. */ ! #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) \ ! (TARGET_SPE && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) ! ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* Make strings word-aligned so strcpy from constants will be faster. *************** extern int rs6000_altivec_abi; *** 649,660 **** /* Make arrays of chars word-aligned for the same reasons. Align vectors to 128 bits. */ #define DATA_ALIGNMENT(TYPE, ALIGN) \ ! (TREE_CODE (TYPE) == VECTOR_TYPE ? 128 \ : TREE_CODE (TYPE) == ARRAY_TYPE \ && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Non-zero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 0 --- 669,680 ---- /* Make arrays of chars word-aligned for the same reasons. Align vectors to 128 bits. */ #define DATA_ALIGNMENT(TYPE, ALIGN) \ ! (TREE_CODE (TYPE) == VECTOR_TYPE ? (TARGET_SPE_ABI ? 64 : 128) \ : TREE_CODE (TYPE) == ARRAY_TYPE \ && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Nonzero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 0 *************** extern int rs6000_altivec_abi; *** 663,669 **** emulated in a trap handler. */ #define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) \ (STRICT_ALIGNMENT \ ! || (((MODE) == SFmode || (MODE) == DFmode || (MODE) == DImode) \ && (ALIGN) < 32)) /* Standard register usage. */ --- 683,690 ---- emulated in a trap handler. */ #define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) \ (STRICT_ALIGNMENT \ ! || (((MODE) == SFmode || (MODE) == DFmode || (MODE) == TFmode \ ! || (MODE) == DImode) \ && (ALIGN) < 32)) /* Standard register usage. */ *************** extern int rs6000_altivec_abi; *** 688,694 **** a register, in order to work around problems in allocating stack storage in inline functions. */ ! #define FIRST_PSEUDO_REGISTER 110 /* This must be included for pre gcc 3.0 glibc compatibility. */ #define PRE_GCC3_DWARF_FRAME_REGISTERS 77 --- 709,715 ---- a register, in order to work around problems in allocating stack storage in inline functions. */ ! #define FIRST_PSEUDO_REGISTER 113 /* This must be included for pre gcc 3.0 glibc compatibility. */ #define PRE_GCC3_DWARF_FRAME_REGISTERS 77 *************** extern int rs6000_altivec_abi; *** 712,718 **** /* AltiVec registers. */ \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 1 \ } /* 1 for registers not available across function calls. --- 733,740 ---- /* AltiVec registers. */ \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 1, 1 \ ! , 1, 1 \ } /* 1 for registers not available across function calls. *************** extern int rs6000_altivec_abi; *** 731,737 **** /* AltiVec registers. */ \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 1 \ } /* Like `CALL_USED_REGISTERS' except this macro doesn't require that --- 753,760 ---- /* AltiVec registers. */ \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 1, 1 \ ! , 1, 1 \ } /* Like `CALL_USED_REGISTERS' except this macro doesn't require that *************** extern int rs6000_altivec_abi; *** 749,755 **** /* AltiVec registers. */ \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 0 \ } #define MQ_REGNO 64 --- 772,779 ---- /* AltiVec registers. */ \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ! 0, 0 \ ! , 0, 0 \ } #define MQ_REGNO 64 *************** extern int rs6000_altivec_abi; *** 764,769 **** --- 788,796 ---- #define LAST_ALTIVEC_REGNO 108 #define TOTAL_ALTIVEC_REGS (LAST_ALTIVEC_REGNO - FIRST_ALTIVEC_REGNO + 1) #define VRSAVE_REGNO 109 + #define VSCR_REGNO 110 + #define SPE_ACC_REGNO 111 + #define SPEFSCR_REGNO 112 /* List the order in which to allocate registers. Each register must be listed once, even those in FIXED_REGISTERS. *************** extern int rs6000_altivec_abi; *** 786,792 **** mq (not saved; best to use it if we can) ctr (not saved; when we have the choice ctr is better) lr (saved) ! cr5, r1, r2, ap, xer, vrsave (fixed) AltiVec registers: v0 - v1 (not saved or used for anything) --- 813,820 ---- mq (not saved; best to use it if we can) ctr (not saved; when we have the choice ctr is better) lr (saved) ! cr5, r1, r2, ap, xer, vrsave, vscr (fixed) ! spe_acc, spefscr (fixed) AltiVec registers: v0 - v1 (not saved or used for anything) *************** extern int rs6000_altivec_abi; *** 817,823 **** 79, \ 96, 95, 94, 93, 92, 91, \ 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, \ ! 97, 109 \ } /* True if register is floating-point. */ --- 845,852 ---- 79, \ 96, 95, 94, 93, 92, 91, \ 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, \ ! 97, 109, 110 \ ! , 111, 112 \ } /* True if register is floating-point. */ *************** extern int rs6000_altivec_abi; *** 832,837 **** --- 861,869 ---- /* True if register is an integer register. */ #define INT_REGNO_P(N) ((N) <= 31 || (N) == ARG_POINTER_REGNUM) + /* SPE SIMD registers are just the GPRs. */ + #define SPE_SIMD_REGNO_P(N) ((N) <= 31) + /* True if register is the XER register. */ #define XER_REGNO_P(N) ((N) == XER_REGNO) *************** extern int rs6000_altivec_abi; *** 843,870 **** This is ordinarily the length in words of a value of mode MODE but can be less for certain modes in special long registers. POWER and PowerPC GPRs hold 32 bits worth; PowerPC64 GPRs and FPRs point register holds 64 bits worth. */ #define HARD_REGNO_NREGS(REGNO, MODE) \ (FP_REGNO_P (REGNO) \ ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \ : ALTIVEC_REGNO_P (REGNO) \ ? ((GET_MODE_SIZE (MODE) + UNITS_PER_ALTIVEC_WORD - 1) / UNITS_PER_ALTIVEC_WORD) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) #define ALTIVEC_VECTOR_MODE(MODE) \ ! ((MODE) == V16QImode \ ! || (MODE) == V8HImode \ ! || (MODE) == V4SFmode \ ! || (MODE) == V4SImode) /* Define this macro to be nonzero if the port is prepared to handle insns involving vector mode MODE. At the very least, it must have move patterns for this mode. */ ! #define VECTOR_MODE_SUPPORTED_P(MODE) \ ! (TARGET_ALTIVEC && ALTIVEC_VECTOR_MODE (MODE)) /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. For POWER and PowerPC, the GPRs can hold any mode, but the float --- 875,915 ---- This is ordinarily the length in words of a value of mode MODE but can be less for certain modes in special long registers. + For the SPE, GPRs are 64 bits but only 32 bits are visible in + scalar instructions. The upper 32 bits are only available to the + SIMD instructions. + POWER and PowerPC GPRs hold 32 bits worth; PowerPC64 GPRs and FPRs point register holds 64 bits worth. */ #define HARD_REGNO_NREGS(REGNO, MODE) \ (FP_REGNO_P (REGNO) \ ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \ + : (SPE_SIMD_REGNO_P (REGNO) && TARGET_SPE && SPE_VECTOR_MODE (MODE)) \ + ? ((GET_MODE_SIZE (MODE) + UNITS_PER_SPE_WORD - 1) / UNITS_PER_SPE_WORD) \ : ALTIVEC_REGNO_P (REGNO) \ ? ((GET_MODE_SIZE (MODE) + UNITS_PER_ALTIVEC_WORD - 1) / UNITS_PER_ALTIVEC_WORD) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) #define ALTIVEC_VECTOR_MODE(MODE) \ ! ((MODE) == V16QImode \ ! || (MODE) == V8HImode \ ! || (MODE) == V4SFmode \ ! || (MODE) == V4SImode) ! ! #define SPE_VECTOR_MODE(MODE) \ ! ((MODE) == V4HImode \ ! || (MODE) == V2SFmode \ ! || (MODE) == V1DImode \ ! || (MODE) == V2SImode) /* Define this macro to be nonzero if the port is prepared to handle insns involving vector mode MODE. At the very least, it must have move patterns for this mode. */ ! #define VECTOR_MODE_SUPPORTED_P(MODE) \ ! ((TARGET_SPE && SPE_VECTOR_MODE (MODE)) \ ! || (TARGET_ALTIVEC && ALTIVEC_VECTOR_MODE (MODE))) /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. For POWER and PowerPC, the GPRs can hold any mode, but the float *************** extern int rs6000_altivec_abi; *** 878,887 **** || (GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) == UNITS_PER_FP_WORD)) \ : ALTIVEC_REGNO_P (REGNO) ? ALTIVEC_VECTOR_MODE (MODE) \ : CR_REGNO_P (REGNO) ? GET_MODE_CLASS (MODE) == MODE_CC \ : XER_REGNO_P (REGNO) ? (MODE) == PSImode \ ! : ! INT_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_INT \ ! && GET_MODE_SIZE (MODE) <= UNITS_PER_WORD) \ : 1) /* Value is 1 if it is a good idea to tie two pseudo registers --- 923,932 ---- || (GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) == UNITS_PER_FP_WORD)) \ : ALTIVEC_REGNO_P (REGNO) ? ALTIVEC_VECTOR_MODE (MODE) \ + : SPE_SIMD_REGNO_P (REGNO) && TARGET_SPE && SPE_VECTOR_MODE (MODE) ? 1 \ : CR_REGNO_P (REGNO) ? GET_MODE_CLASS (MODE) == MODE_CC \ : XER_REGNO_P (REGNO) ? (MODE) == PSImode \ ! : ! INT_REGNO_P (REGNO) ? GET_MODE_SIZE (MODE) <= UNITS_PER_WORD \ : 1) /* Value is 1 if it is a good idea to tie two pseudo registers *************** extern int rs6000_altivec_abi; *** 904,938 **** : 1) /* A C expression returning the cost of moving data from a register of class ! CLASS1 to one of CLASS2. ! ! On the RS/6000, copying between floating-point and fixed-point ! registers is expensive. */ ! #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ ! ((CLASS1) == FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 2 \ ! : (CLASS1) == FLOAT_REGS && (CLASS2) != FLOAT_REGS ? 10 \ ! : (CLASS1) != FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 10 \ ! : (CLASS1) == ALTIVEC_REGS && (CLASS2) != ALTIVEC_REGS ? 20 \ ! : (CLASS1) != ALTIVEC_REGS && (CLASS2) == ALTIVEC_REGS ? 20 \ ! : (((CLASS1) == SPECIAL_REGS || (CLASS1) == MQ_REGS \ ! || (CLASS1) == LINK_REGS || (CLASS1) == CTR_REGS \ ! || (CLASS1) == LINK_OR_CTR_REGS) \ ! && ((CLASS2) == SPECIAL_REGS || (CLASS2) == MQ_REGS \ ! || (CLASS2) == LINK_REGS || (CLASS2) == CTR_REGS \ ! || (CLASS2) == LINK_OR_CTR_REGS)) ? 10 \ ! : 2) /* A C expressions returning the cost of moving data of MODE from a register to ! or from memory. ! ! On the RS/6000, bump this up a bit. */ ! #define MEMORY_MOVE_COST(MODE, CLASS, IN) \ ! ((GET_MODE_CLASS (MODE) == MODE_FLOAT \ ! && (rs6000_cpu == PROCESSOR_RIOS1 || rs6000_cpu == PROCESSOR_PPC601) \ ! ? 3 : 2) \ ! + 4) /* Specify the cost of a branch insn; roughly the number of extra insns that should be added to avoid a branch. --- 949,962 ---- : 1) /* A C expression returning the cost of moving data from a register of class ! CLASS1 to one of CLASS2. */ ! #define REGISTER_MOVE_COST rs6000_register_move_cost /* A C expressions returning the cost of moving data of MODE from a register to ! or from memory. */ ! #define MEMORY_MOVE_COST rs6000_memory_move_cost /* Specify the cost of a branch insn; roughly the number of extra insns that should be added to avoid a branch. *************** extern int rs6000_altivec_abi; *** 942,947 **** --- 966,985 ---- #define BRANCH_COST 3 + + /* A fixed register used at prologue and epilogue generation to fix + addressing modes. The SPE needs heavy addressing fixes at the last + minute, and it's best to save a register for it. + + AltiVec also needs fixes, but we've gotten around using r11, which + is actually wrong because when use_backchain_to_restore_sp is true, + we end up clobbering r11. + + The AltiVec case needs to be fixed. Dunno if we should break ABI + compatability and reserve a register for it as well.. */ + + #define FIXED_SCRATCH (TARGET_SPE ? 14 : 11) + /* Define this macro to change register usage conditional on target flags. Set MQ register fixed (already call_used) if not POWER architecture (RIOS1, RIOS2, RSC, and PPC601) so that it will not be allocated. *************** extern int rs6000_altivec_abi; *** 956,962 **** if (TARGET_64BIT) \ fixed_regs[13] = call_used_regs[13] \ = call_really_used_regs[13] = 1; \ ! if (TARGET_SOFT_FLOAT) \ for (i = 32; i < 64; i++) \ fixed_regs[i] = call_used_regs[i] \ = call_really_used_regs[i] = 1; \ --- 994,1000 ---- if (TARGET_64BIT) \ fixed_regs[13] = call_used_regs[13] \ = call_really_used_regs[13] = 1; \ ! if (TARGET_SOFT_FLOAT || !TARGET_FPRS) \ for (i = 32; i < 64; i++) \ fixed_regs[i] = call_used_regs[i] \ = call_really_used_regs[i] = 1; \ *************** extern int rs6000_altivec_abi; *** 976,981 **** --- 1014,1028 ---- = fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \ = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] \ = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1; \ + if (TARGET_ALTIVEC) \ + global_regs[VSCR_REGNO] = 1; \ + if (TARGET_SPE) \ + { \ + global_regs[SPEFSCR_REGNO] = 1; \ + fixed_regs[FIXED_SCRATCH] \ + = call_used_regs[FIXED_SCRATCH] \ + = call_really_used_regs[FIXED_SCRATCH] = 1; \ + } \ if (! TARGET_ALTIVEC) \ { \ for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) \ *************** enum reg_class *** 1060,1065 **** --- 1107,1115 ---- FLOAT_REGS, ALTIVEC_REGS, VRSAVE_REGS, + VSCR_REGS, + SPE_ACC_REGS, + SPEFSCR_REGS, NON_SPECIAL_REGS, MQ_REGS, LINK_REGS, *************** enum reg_class *** 1087,1092 **** --- 1137,1145 ---- "FLOAT_REGS", \ "ALTIVEC_REGS", \ "VRSAVE_REGS", \ + "VSCR_REGS", \ + "SPE_ACC_REGS", \ + "SPEFSCR_REGS", \ "NON_SPECIAL_REGS", \ "MQ_REGS", \ "LINK_REGS", \ *************** enum reg_class *** 1113,1118 **** --- 1166,1174 ---- { 0x00000000, 0xffffffff, 0x00000000, 0x00000000 }, /* FLOAT_REGS */ \ { 0x00000000, 0x00000000, 0xffffe000, 0x00001fff }, /* ALTIVEC_REGS */ \ { 0x00000000, 0x00000000, 0x00000000, 0x00002000 }, /* VRSAVE_REGS */ \ + { 0x00000000, 0x00000000, 0x00000000, 0x00004000 }, /* VSCR_REGS */ \ + { 0x00000000, 0x00000000, 0x00000000, 0x00008000 }, /* SPE_ACC_REGS */ \ + { 0x00000000, 0x00000000, 0x00000000, 0x00010000 }, /* SPEFSCR_REGS */ \ { 0xffffffff, 0xffffffff, 0x00000008, 0x00000000 }, /* NON_SPECIAL_REGS */ \ { 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, /* MQ_REGS */ \ { 0x00000000, 0x00000000, 0x00000002, 0x00000000 }, /* LINK_REGS */ \ *************** enum reg_class *** 1145,1150 **** --- 1201,1209 ---- : (REGNO) == ARG_POINTER_REGNUM ? BASE_REGS \ : (REGNO) == XER_REGNO ? XER_REGS \ : (REGNO) == VRSAVE_REGNO ? VRSAVE_REGS \ + : (REGNO) == VSCR_REGNO ? VRSAVE_REGS \ + : (REGNO) == SPE_ACC_REGNO ? SPE_ACC_REGS \ + : (REGNO) == SPEFSCR_REGNO ? SPEFSCR_REGS \ : NO_REGS) /* The class value for index registers, and the one for base regs. */ *************** enum reg_class *** 1173,1180 **** Return 1 if VALUE is in the range specified by C. `I' is a signed 16-bit constant ! `J' is a constant with only the high-order 16 bits non-zero ! `K' is a constant with only the low-order 16 bits non-zero `L' is a signed 16-bit constant shifted left 16 bits `M' is a constant that is greater than 31 `N' is a positive constant that is an exact power of two --- 1232,1239 ---- Return 1 if VALUE is in the range specified by C. `I' is a signed 16-bit constant ! `J' is a constant with only the high-order 16 bits nonzero ! `K' is a constant with only the low-order 16 bits nonzero `L' is a signed 16-bit constant shifted left 16 bits `M' is a constant that is greater than 31 `N' is a positive constant that is an exact power of two *************** enum reg_class *** 1213,1219 **** 'R' is for AIX TOC entries. 'S' is a constant that can be placed into a 64-bit mask operand 'T' is a constant that can be placed into a 32-bit mask operand ! 'U' is for V.4 small data references. */ #define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' ? GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG \ --- 1272,1279 ---- 'R' is for AIX TOC entries. 'S' is a constant that can be placed into a 64-bit mask operand 'T' is a constant that can be placed into a 32-bit mask operand ! 'U' is for V.4 small data references. ! 't' is for AND masks that can be performed by two rldic{l,r} insns. */ #define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' ? GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG \ *************** enum reg_class *** 1222,1227 **** --- 1282,1291 ---- : (C) == 'T' ? mask_operand (OP, SImode) \ : (C) == 'U' ? (DEFAULT_ABI == ABI_V4 \ && small_data_operand (OP, GET_MODE (OP))) \ + : (C) == 't' ? (mask64_2_operand (OP, DImode) \ + && (fixed_regs[CR0_REGNO] \ + || !logical_operand (OP, DImode)) \ + && !mask64_operand (OP, DImode)) \ : 0) /* Given an rtx X being reloaded into a reg required to be *************** enum reg_class *** 1277,1292 **** ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) - /* If defined, gives a class of registers that cannot be used as the - operand of a SUBREG that changes the mode of the object illegally. */ ! #define CLASS_CANNOT_CHANGE_MODE FLOAT_REGS ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ - #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ - (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) - /* Stack layout; function entry, exit and calling. */ /* Enumeration to give which calling sequence to use. */ --- 1341,1356 ---- ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) ! /* Return a class of registers that cannot change FROM mode to TO mode. */ ! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ ! ? reg_classes_intersect_p (FLOAT_REGS, CLASS) \ ! : (SPE_VECTOR_MODE (FROM) + SPE_VECTOR_MODE (TO)) == 1 \ ! ? reg_classes_intersect_p (GENERAL_REGS, CLASS) \ ! : 0) /* Stack layout; function entry, exit and calling. */ /* Enumeration to give which calling sequence to use. */ *************** typedef struct rs6000_stack { *** 1319,1324 **** --- 1383,1389 ---- int lr_save_offset; /* offset to save LR from initial SP */ int cr_save_offset; /* offset to save CR from initial SP */ int vrsave_save_offset; /* offset to save VRSAVE from initial SP */ + int spe_gp_save_offset; /* offset to save spe 64-bit gprs */ int toc_save_offset; /* offset to save the TOC pointer */ int varargs_save_offset; /* offset to save the varargs registers */ int ehrd_offset; /* offset to EH return data */ *************** typedef struct rs6000_stack { *** 1336,1341 **** --- 1401,1408 ---- int vrsave_size; /* size to hold VRSAVE if not in save_size */ int altivec_padding_size; /* size of altivec alignment padding if not in save_size */ + int spe_gp_size; /* size of 64-bit GPR save size for SPE */ + int spe_padding_size; int toc_size; /* size to hold TOC if not in save_size */ int total_size; /* total bytes allocated for stack */ } rs6000_stack_t; *************** typedef struct rs6000_stack { *** 1454,1459 **** --- 1521,1528 ---- If the precise function being called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0. + On the SPE, both FPs and vectors are returned in r3. + On RS/6000 an integer value is in r3 and a floating-point value is in fp1, unless -msoft-float. */ *************** typedef struct rs6000_stack { *** 1462,1469 **** && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ || POINTER_TYPE_P (VALTYPE) \ ? word_mode : TYPE_MODE (VALTYPE), \ ! TREE_CODE (VALTYPE) == VECTOR_TYPE ? ALTIVEC_ARG_RETURN \ ! : TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_HARD_FLOAT \ ? FP_ARG_RETURN : GP_ARG_RETURN) /* Define how to find the value returned by a library function --- 1531,1543 ---- && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ || POINTER_TYPE_P (VALTYPE) \ ? word_mode : TYPE_MODE (VALTYPE), \ ! TREE_CODE (VALTYPE) == VECTOR_TYPE \ ! && TARGET_ALTIVEC ? ALTIVEC_ARG_RETURN \ ! : TREE_CODE (VALTYPE) == REAL_TYPE \ ! && TARGET_SPE_ABI && !TARGET_FPRS \ ! ? GP_ARG_RETURN \ ! : TREE_CODE (VALTYPE) == REAL_TYPE \ ! && TARGET_HARD_FLOAT && TARGET_FPRS \ ? FP_ARG_RETURN : GP_ARG_RETURN) /* Define how to find the value returned by a library function *************** typedef struct rs6000_stack { *** 1472,1478 **** #define LIBCALL_VALUE(MODE) \ gen_rtx_REG (MODE, ALTIVEC_VECTOR_MODE (MODE) ? ALTIVEC_ARG_RETURN \ : GET_MODE_CLASS (MODE) == MODE_FLOAT \ ! && TARGET_HARD_FLOAT \ ? FP_ARG_RETURN : GP_ARG_RETURN) /* The AIX ABI for the RS/6000 specifies that all structures are --- 1546,1552 ---- #define LIBCALL_VALUE(MODE) \ gen_rtx_REG (MODE, ALTIVEC_VECTOR_MODE (MODE) ? ALTIVEC_ARG_RETURN \ : GET_MODE_CLASS (MODE) == MODE_FLOAT \ ! && TARGET_HARD_FLOAT && TARGET_FPRS \ ? FP_ARG_RETURN : GP_ARG_RETURN) /* The AIX ABI for the RS/6000 specifies that all structures are *************** typedef struct rs6000_stack { *** 1485,1497 **** default, and -m switches get the final word. See rs6000_override_options for more details. int_size_in_bytes returns -1 for variable size objects, which go in memory always. The cast to unsigned makes -1 > 8. */ #define RETURN_IN_MEMORY(TYPE) \ ! (AGGREGATE_TYPE_P (TYPE) && \ ! (TARGET_AIX_STRUCT_RET || \ ! (unsigned HOST_WIDEST_INT) int_size_in_bytes (TYPE) > 8)) /* DRAFT_V4_STRUCT_RET defaults off. */ #define DRAFT_V4_STRUCT_RET 0 --- 1559,1575 ---- default, and -m switches get the final word. See rs6000_override_options for more details. + The PPC32 SVR4 ABI uses IEEE double extended for long double, if 128-bit + long double support is enabled. These values are returned in memory. + int_size_in_bytes returns -1 for variable size objects, which go in memory always. The cast to unsigned makes -1 > 8. */ #define RETURN_IN_MEMORY(TYPE) \ ! ((AGGREGATE_TYPE_P (TYPE) \ ! && (TARGET_AIX_STRUCT_RET \ ! || (unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > 8)) \ ! || (DEFAULT_ABI == ABI_V4 && TYPE_MODE (TYPE) == TFmode)) /* DRAFT_V4_STRUCT_RET defaults off. */ #define DRAFT_V4_STRUCT_RET 0 *************** typedef struct rs6000_stack { *** 1560,1566 **** /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ ! typedef struct machine_function { /* Whether a System V.4 varargs area was created. */ int sysv_varargs_p; --- 1638,1644 ---- /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ ! typedef struct machine_function GTY(()) { /* Whether a System V.4 varargs area was created. */ int sysv_varargs_p; *************** typedef struct rs6000_args *** 1626,1638 **** #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ function_arg_advance (&CUM, MODE, TYPE, NAMED) ! /* Non-zero if we can use a floating-point register to pass this arg. */ #define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \ (GET_MODE_CLASS (MODE) == MODE_FLOAT \ && (CUM).fregno <= FP_ARG_MAX_REG \ ! && TARGET_HARD_FLOAT) ! /* Non-zero if we can use an AltiVec register to pass this arg. */ #define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE) \ (ALTIVEC_VECTOR_MODE (MODE) \ && (CUM).vregno <= ALTIVEC_ARG_MAX_REG \ --- 1704,1716 ---- #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ function_arg_advance (&CUM, MODE, TYPE, NAMED) ! /* Nonzero if we can use a floating-point register to pass this arg. */ #define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \ (GET_MODE_CLASS (MODE) == MODE_FLOAT \ && (CUM).fregno <= FP_ARG_MAX_REG \ ! && TARGET_HARD_FLOAT && TARGET_FPRS) ! /* Nonzero if we can use an AltiVec register to pass this arg. */ #define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE) \ (ALTIVEC_VECTOR_MODE (MODE) \ && (CUM).vregno <= ALTIVEC_ARG_MAX_REG \ *************** typedef struct rs6000_args *** 1716,1723 **** (VALIST) = rs6000_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! rs6000_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 1794,1801 ---- (VALIST) = rs6000_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! rs6000_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** typedef struct rs6000_args *** 1735,1740 **** --- 1813,1822 ---- argument is passed depends on whether or not it is a named argument. */ #define STRICT_ARGUMENT_NAMING 1 + /* We do not allow indirect calls to be optimized into sibling calls, nor + do we allow calls with vector parameters. */ + #define FUNCTION_OK_FOR_SIBCALL(DECL) function_ok_for_sibcall ((DECL)) + /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ *************** typedef struct rs6000_args *** 1745,1751 **** the stack pointer does not matter. No definition is equivalent to always zero. ! On the RS/6000, this is non-zero because we can restore the stack from its backpointer, which we maintain. */ #define EXIT_IGNORE_STACK 1 --- 1827,1833 ---- the stack pointer does not matter. No definition is equivalent to always zero. ! On the RS/6000, this is nonzero because we can restore the stack from its backpointer, which we maintain. */ #define EXIT_IGNORE_STACK 1 *************** typedef struct rs6000_args *** 1759,1765 **** || (TARGET_ALTIVEC && (REGNO) == VRSAVE_REGNO) \ || (current_function_calls_eh_return \ && TARGET_AIX \ ! && (REGNO) == TOC_REGISTER)) /* TRAMPOLINE_TEMPLATE deleted */ --- 1841,1847 ---- || (TARGET_ALTIVEC && (REGNO) == VRSAVE_REGNO) \ || (current_function_calls_eh_return \ && TARGET_AIX \ ! && (REGNO) == 2)) /* TRAMPOLINE_TEMPLATE deleted */ *************** typedef struct rs6000_args *** 1822,1828 **** {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ ! { 30, 30} } /* Given FROM and TO register numbers, say whether this elimination is allowed. Frame pointer elimination is automatically handled. --- 1904,1910 ---- {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ ! { RS6000_PIC_OFFSET_TABLE_REGNUM, RS6000_PIC_OFFSET_TABLE_REGNUM } } /* Given FROM and TO register numbers, say whether this elimination is allowed. Frame pointer elimination is automatically handled. *************** typedef struct rs6000_args *** 1833,1842 **** We need r30 if -mminimal-toc was specified, and there are constant pool references. */ ! #define CAN_ELIMINATE(FROM, TO) \ ! ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM \ ! ? ! frame_pointer_needed \ ! : (FROM) == 30 ? ! TARGET_MINIMAL_TOC || TARGET_NO_TOC || get_pool_size () == 0 \ : 1) /* Define the offset between two registers, one to be eliminated, and the other --- 1915,1925 ---- We need r30 if -mminimal-toc was specified, and there are constant pool references. */ ! #define CAN_ELIMINATE(FROM, TO) \ ! ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM \ ! ? ! frame_pointer_needed \ ! : (FROM) == RS6000_PIC_OFFSET_TABLE_REGNUM \ ! ? ! TARGET_MINIMAL_TOC || TARGET_NO_TOC || get_pool_size () == 0 \ : 1) /* Define the offset between two registers, one to be eliminated, and the other *************** typedef struct rs6000_args *** 1851,1857 **** (OFFSET) = info->total_size; \ else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ (OFFSET) = (info->push_p) ? info->total_size : 0; \ ! else if ((FROM) == 30) \ (OFFSET) = 0; \ else \ abort (); \ --- 1934,1940 ---- (OFFSET) = info->total_size; \ else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ (OFFSET) = (info->push_p) ? info->total_size : 0; \ ! else if ((FROM) == RS6000_PIC_OFFSET_TABLE_REGNUM) \ (OFFSET) = 0; \ else \ abort (); \ *************** typedef struct rs6000_args *** 1966,1971 **** --- 2049,2057 ---- #define TOC_RELATIVE_EXPR_P(X) (toc_relative_expr_p (X)) + /* SPE offset addressing is limited to 5-bits worth of double words. */ + #define SPE_CONST_OFFSET_OK(x) (((x) & ~0xf8) == 0) + #define LEGITIMATE_CONSTANT_POOL_ADDRESS_P(X) \ (TARGET_TOC \ && GET_CODE (X) == PLUS \ *************** typedef struct rs6000_args *** 1990,2000 **** && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 0) \ && (! ALTIVEC_VECTOR_MODE (MODE) \ || (GET_CODE (XEXP (X,1)) == CONST_INT && INTVAL (XEXP (X,1)) == 0)) \ && (((MODE) != DFmode && (MODE) != DImode) \ || (TARGET_32BIT \ ? LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 4) \ : ! (INTVAL (XEXP (X, 1)) & 3))) \ ! && ((MODE) != TImode \ || (TARGET_32BIT \ ? LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 12) \ : (LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 8) \ --- 2076,2089 ---- && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 0) \ && (! ALTIVEC_VECTOR_MODE (MODE) \ || (GET_CODE (XEXP (X,1)) == CONST_INT && INTVAL (XEXP (X,1)) == 0)) \ + && (! SPE_VECTOR_MODE (MODE) \ + || (GET_CODE (XEXP (X, 1)) == CONST_INT \ + && SPE_CONST_OFFSET_OK (INTVAL (XEXP (X, 1))))) \ && (((MODE) != DFmode && (MODE) != DImode) \ || (TARGET_32BIT \ ? LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 4) \ : ! (INTVAL (XEXP (X, 1)) & 3))) \ ! && (((MODE) != TFmode && (MODE) != TImode) \ || (TARGET_32BIT \ ? LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 12) \ : (LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 8) \ *************** typedef struct rs6000_args *** 2017,2023 **** && ! flag_pic && ! TARGET_TOC \ && GET_MODE_NUNITS (MODE) == 1 \ && (GET_MODE_BITSIZE (MODE) <= 32 \ ! || (TARGET_HARD_FLOAT && (MODE) == DFmode)) \ && GET_CODE (X) == LO_SUM \ && GET_CODE (XEXP (X, 0)) == REG \ && INT_REG_OK_FOR_BASE_P (XEXP (X, 0), (STRICT)) \ --- 2106,2112 ---- && ! flag_pic && ! TARGET_TOC \ && GET_MODE_NUNITS (MODE) == 1 \ && (GET_MODE_BITSIZE (MODE) <= 32 \ ! || (TARGET_HARD_FLOAT && TARGET_FPRS && (MODE) == DFmode)) \ && GET_CODE (X) == LO_SUM \ && GET_CODE (XEXP (X, 0)) == REG \ && INT_REG_OK_FOR_BASE_P (XEXP (X, 0), (STRICT)) \ *************** do { \ *** 2110,2116 **** #define RS6000_PIC_OFFSET_TABLE_REGNUM 30 #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? RS6000_PIC_OFFSET_TABLE_REGNUM : INVALID_REGNUM) ! #define TOC_REGISTER (TARGET_MINIMAL_TOC ? 30 : 2) /* Define this macro if the register defined by `PIC_OFFSET_TABLE_REGNUM' is clobbered by calls. Do not define --- 2199,2205 ---- #define RS6000_PIC_OFFSET_TABLE_REGNUM 30 #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? RS6000_PIC_OFFSET_TABLE_REGNUM : INVALID_REGNUM) ! #define TOC_REGISTER (TARGET_MINIMAL_TOC ? RS6000_PIC_OFFSET_TABLE_REGNUM : 2) /* Define this macro if the register defined by `PIC_OFFSET_TABLE_REGNUM' is clobbered by calls. Do not define *************** do { \ *** 2182,2188 **** #define MAX_MOVE_MAX 8 /* Nonzero if access to memory by bytes is no faster than for words. ! Also non-zero if doing byte operations (specifically shifts) in registers is undesirable. */ #define SLOW_BYTE_ACCESS 1 --- 2271,2277 ---- #define MAX_MOVE_MAX 8 /* Nonzero if access to memory by bytes is no faster than for words. ! Also nonzero if doing byte operations (specifically shifts) in registers is undesirable. */ #define SLOW_BYTE_ACCESS 1 *************** do { \ *** 2263,2268 **** --- 2352,2359 ---- ? COSTS_N_INSNS (2) \ : COSTS_N_INSNS (1)); \ case MULT: \ + if (optimize_size) \ + return COSTS_N_INSNS (2); \ switch (rs6000_cpu) \ { \ case PROCESSOR_RIOS1: \ *************** do { \ *** 2296,2301 **** --- 2387,2393 ---- : COSTS_N_INSNS (3)); \ case PROCESSOR_PPC403: \ case PROCESSOR_PPC604: \ + case PROCESSOR_PPC8540: \ return COSTS_N_INSNS (4); \ case PROCESSOR_PPC620: \ case PROCESSOR_PPC630: \ *************** do { \ *** 2304,2309 **** --- 2396,2406 ---- ? COSTS_N_INSNS (5) : COSTS_N_INSNS (7) \ : INTVAL (XEXP (X, 1)) >= -256 && INTVAL (XEXP (X, 1)) <= 255 \ ? COSTS_N_INSNS (3) : COSTS_N_INSNS (4)); \ + case PROCESSOR_POWER4: \ + return (GET_CODE (XEXP (X, 1)) != CONST_INT \ + ? GET_MODE (XEXP (X, 1)) != DImode \ + ? COSTS_N_INSNS (3) : COSTS_N_INSNS (4) \ + : COSTS_N_INSNS (2)); \ } \ case DIV: \ case MOD: \ *************** do { \ *** 2338,2347 **** --- 2435,2446 ---- return COSTS_N_INSNS (20); \ case PROCESSOR_PPC620: \ case PROCESSOR_PPC630: \ + case PROCESSOR_POWER4: \ return (GET_MODE (XEXP (X, 1)) != DImode \ ? COSTS_N_INSNS (21) \ : COSTS_N_INSNS (37)); \ case PROCESSOR_PPC750: \ + case PROCESSOR_PPC8540: \ case PROCESSOR_PPC7400: \ return COSTS_N_INSNS (19); \ case PROCESSOR_PPC7450: \ *************** do { \ *** 2372,2389 **** /* #define ADJUST_INSN_LENGTH(X,LENGTH) */ - /* Add any extra modes needed to represent the condition code. - - For the RS/6000, we need separate modes when unsigned (logical) comparisons - are being done and we need a separate mode for floating-point. We also - use a mode for the case when we are comparing the results of two - comparisons, as then only the EQ bit is valid in the register. */ - - #define EXTRA_CC_MODES \ - CC(CCUNSmode, "CCUNS") \ - CC(CCFPmode, "CCFP") \ - CC(CCEQmode, "CCEQ") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. CCUNSmode should be used --- 2471,2476 ---- *************** do { \ *** 2401,2407 **** stored from the compare operation. Note that we can't use "rtx" here since it hasn't been defined! */ ! extern struct rtx_def *rs6000_compare_op0, *rs6000_compare_op1; extern int rs6000_compare_fp_p; /* Control the assembler format that we output. */ --- 2488,2495 ---- stored from the compare operation. Note that we can't use "rtx" here since it hasn't been defined! */ ! extern GTY(()) rtx rs6000_compare_op0; ! extern GTY(()) rtx rs6000_compare_op1; extern int rs6000_compare_fp_p; /* Control the assembler format that we output. */ *************** extern char rs6000_reg_names[][8]; /* re *** 2637,2642 **** --- 2725,2733 ---- &rs6000_reg_names[107][0], /* v30 */ \ &rs6000_reg_names[108][0], /* v31 */ \ &rs6000_reg_names[109][0], /* vrsave */ \ + &rs6000_reg_names[110][0], /* vscr */ \ + &rs6000_reg_names[111][0], /* spe_acc */ \ + &rs6000_reg_names[112][0], /* spefscr */ \ } /* print-rtl can't handle the above REGISTER_NAMES, so define the *************** extern char rs6000_reg_names[][8]; /* re *** 2645,2652 **** #define DEBUG_REGISTER_NAMES \ { \ ! "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ ! "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \ --- 2736,2743 ---- #define DEBUG_REGISTER_NAMES \ { \ ! "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ ! "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \ *************** extern char rs6000_reg_names[][8]; /* re *** 2655,2666 **** "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \ "mq", "lr", "ctr", "ap", \ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ ! "xer", \ "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", \ "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", \ "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", \ "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", \ ! "vrsave" \ } /* Table of additional register names to use in user input. */ --- 2746,2758 ---- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \ "mq", "lr", "ctr", "ap", \ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ ! "xer", \ "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", \ "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", \ "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", \ "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", \ ! "vrsave", "vscr", \ ! "spe_acc", "spefscr" \ } /* Table of additional register names to use in user input. */ *************** extern char rs6000_reg_names[][8]; /* re *** 2690,2696 **** {"v20", 97}, {"v21", 98}, {"v22", 99}, {"v23", 100}, \ {"v24", 101},{"v25", 102},{"v26", 103},{"v27", 104}, \ {"v28", 105},{"v29", 106},{"v30", 107},{"v31", 108}, \ ! {"vrsave", 109}, \ /* no additional names for: mq, lr, ctr, ap */ \ {"cr0", 68}, {"cr1", 69}, {"cr2", 70}, {"cr3", 71}, \ {"cr4", 72}, {"cr5", 73}, {"cr6", 74}, {"cr7", 75}, \ --- 2782,2789 ---- {"v20", 97}, {"v21", 98}, {"v22", 99}, {"v23", 100}, \ {"v24", 101},{"v25", 102},{"v26", 103},{"v27", 104}, \ {"v28", 105},{"v29", 106},{"v30", 107},{"v31", 108}, \ ! {"vrsave", 109}, {"vscr", 110}, \ ! {"spe_acc", 111}, {"spefscr", 112}, \ /* no additional names for: mq, lr, ctr, ap */ \ {"cr0", 68}, {"cr1", 69}, {"cr2", 70}, {"cr3", 71}, \ {"cr4", 72}, {"cr5", 73}, {"cr6", 74}, {"cr7", 75}, \ *************** extern char rs6000_reg_names[][8]; /* re *** 2791,2802 **** {"non_add_cint_operand", {CONST_INT}}, \ {"and_operand", {SUBREG, REG, CONST_INT}}, \ {"and64_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \ {"logical_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \ {"non_logical_cint_operand", {CONST_INT, CONST_DOUBLE}}, \ {"mask_operand", {CONST_INT}}, \ ! {"mask64_operand", {CONST_INT, CONST_DOUBLE}}, \ {"count_register_operand", {REG}}, \ {"xer_operand", {REG}}, \ {"call_operand", {SYMBOL_REF, REG}}, \ {"current_file_function_operand", {SYMBOL_REF}}, \ {"input_operand", {SUBREG, MEM, REG, CONST_INT, \ --- 2884,2899 ---- {"non_add_cint_operand", {CONST_INT}}, \ {"and_operand", {SUBREG, REG, CONST_INT}}, \ {"and64_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \ + {"and64_2_operand", {SUBREG, REG, CONST_INT}}, \ {"logical_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \ {"non_logical_cint_operand", {CONST_INT, CONST_DOUBLE}}, \ {"mask_operand", {CONST_INT}}, \ ! {"mask_operand_wrap", {CONST_INT}}, \ ! {"mask64_operand", {CONST_INT}}, \ ! {"mask64_2_operand", {CONST_INT}}, \ {"count_register_operand", {REG}}, \ {"xer_operand", {REG}}, \ + {"symbol_ref_operand", {SYMBOL_REF}}, \ {"call_operand", {SYMBOL_REF, REG}}, \ {"current_file_function_operand", {SYMBOL_REF}}, \ {"input_operand", {SUBREG, MEM, REG, CONST_INT, \ *************** enum rs6000_builtins *** 3036,3039 **** --- 3133,3370 ---- ALTIVEC_BUILTIN_ABS_V4SF, ALTIVEC_BUILTIN_ABS_V8HI, ALTIVEC_BUILTIN_ABS_V16QI + /* SPE builtins. */ + , SPE_BUILTIN_EVADDW, + SPE_BUILTIN_EVAND, + SPE_BUILTIN_EVANDC, + SPE_BUILTIN_EVDIVWS, + SPE_BUILTIN_EVDIVWU, + SPE_BUILTIN_EVEQV, + SPE_BUILTIN_EVFSADD, + SPE_BUILTIN_EVFSDIV, + SPE_BUILTIN_EVFSMUL, + SPE_BUILTIN_EVFSSUB, + SPE_BUILTIN_EVLDDX, + SPE_BUILTIN_EVLDHX, + SPE_BUILTIN_EVLDWX, + SPE_BUILTIN_EVLHHESPLATX, + SPE_BUILTIN_EVLHHOSSPLATX, + SPE_BUILTIN_EVLHHOUSPLATX, + SPE_BUILTIN_EVLWHEX, + SPE_BUILTIN_EVLWHOSX, + SPE_BUILTIN_EVLWHOUX, + SPE_BUILTIN_EVLWHSPLATX, + SPE_BUILTIN_EVLWWSPLATX, + SPE_BUILTIN_EVMERGEHI, + SPE_BUILTIN_EVMERGEHILO, + SPE_BUILTIN_EVMERGELO, + SPE_BUILTIN_EVMERGELOHI, + SPE_BUILTIN_EVMHEGSMFAA, + SPE_BUILTIN_EVMHEGSMFAN, + SPE_BUILTIN_EVMHEGSMIAA, + SPE_BUILTIN_EVMHEGSMIAN, + SPE_BUILTIN_EVMHEGUMIAA, + SPE_BUILTIN_EVMHEGUMIAN, + SPE_BUILTIN_EVMHESMF, + SPE_BUILTIN_EVMHESMFA, + SPE_BUILTIN_EVMHESMFAAW, + SPE_BUILTIN_EVMHESMFANW, + SPE_BUILTIN_EVMHESMI, + SPE_BUILTIN_EVMHESMIA, + SPE_BUILTIN_EVMHESMIAAW, + SPE_BUILTIN_EVMHESMIANW, + SPE_BUILTIN_EVMHESSF, + SPE_BUILTIN_EVMHESSFA, + SPE_BUILTIN_EVMHESSFAAW, + SPE_BUILTIN_EVMHESSFANW, + SPE_BUILTIN_EVMHESSIAAW, + SPE_BUILTIN_EVMHESSIANW, + SPE_BUILTIN_EVMHEUMI, + SPE_BUILTIN_EVMHEUMIA, + SPE_BUILTIN_EVMHEUMIAAW, + SPE_BUILTIN_EVMHEUMIANW, + SPE_BUILTIN_EVMHEUSIAAW, + SPE_BUILTIN_EVMHEUSIANW, + SPE_BUILTIN_EVMHOGSMFAA, + SPE_BUILTIN_EVMHOGSMFAN, + SPE_BUILTIN_EVMHOGSMIAA, + SPE_BUILTIN_EVMHOGSMIAN, + SPE_BUILTIN_EVMHOGUMIAA, + SPE_BUILTIN_EVMHOGUMIAN, + SPE_BUILTIN_EVMHOSMF, + SPE_BUILTIN_EVMHOSMFA, + SPE_BUILTIN_EVMHOSMFAAW, + SPE_BUILTIN_EVMHOSMFANW, + SPE_BUILTIN_EVMHOSMI, + SPE_BUILTIN_EVMHOSMIA, + SPE_BUILTIN_EVMHOSMIAAW, + SPE_BUILTIN_EVMHOSMIANW, + SPE_BUILTIN_EVMHOSSF, + SPE_BUILTIN_EVMHOSSFA, + SPE_BUILTIN_EVMHOSSFAAW, + SPE_BUILTIN_EVMHOSSFANW, + SPE_BUILTIN_EVMHOSSIAAW, + SPE_BUILTIN_EVMHOSSIANW, + SPE_BUILTIN_EVMHOUMI, + SPE_BUILTIN_EVMHOUMIA, + SPE_BUILTIN_EVMHOUMIAAW, + SPE_BUILTIN_EVMHOUMIANW, + SPE_BUILTIN_EVMHOUSIAAW, + SPE_BUILTIN_EVMHOUSIANW, + SPE_BUILTIN_EVMWHSMF, + SPE_BUILTIN_EVMWHSMFA, + SPE_BUILTIN_EVMWHSMI, + SPE_BUILTIN_EVMWHSMIA, + SPE_BUILTIN_EVMWHSSF, + SPE_BUILTIN_EVMWHSSFA, + SPE_BUILTIN_EVMWHUMI, + SPE_BUILTIN_EVMWHUMIA, + SPE_BUILTIN_EVMWLSMIAAW, + SPE_BUILTIN_EVMWLSMIANW, + SPE_BUILTIN_EVMWLSSIAAW, + SPE_BUILTIN_EVMWLSSIANW, + SPE_BUILTIN_EVMWLUMI, + SPE_BUILTIN_EVMWLUMIA, + SPE_BUILTIN_EVMWLUMIAAW, + SPE_BUILTIN_EVMWLUMIANW, + SPE_BUILTIN_EVMWLUSIAAW, + SPE_BUILTIN_EVMWLUSIANW, + SPE_BUILTIN_EVMWSMF, + SPE_BUILTIN_EVMWSMFA, + SPE_BUILTIN_EVMWSMFAA, + SPE_BUILTIN_EVMWSMFAN, + SPE_BUILTIN_EVMWSMI, + SPE_BUILTIN_EVMWSMIA, + SPE_BUILTIN_EVMWSMIAA, + SPE_BUILTIN_EVMWSMIAN, + SPE_BUILTIN_EVMWHSSFAA, + SPE_BUILTIN_EVMWSSF, + SPE_BUILTIN_EVMWSSFA, + SPE_BUILTIN_EVMWSSFAA, + SPE_BUILTIN_EVMWSSFAN, + SPE_BUILTIN_EVMWUMI, + SPE_BUILTIN_EVMWUMIA, + SPE_BUILTIN_EVMWUMIAA, + SPE_BUILTIN_EVMWUMIAN, + SPE_BUILTIN_EVNAND, + SPE_BUILTIN_EVNOR, + SPE_BUILTIN_EVOR, + SPE_BUILTIN_EVORC, + SPE_BUILTIN_EVRLW, + SPE_BUILTIN_EVSLW, + SPE_BUILTIN_EVSRWS, + SPE_BUILTIN_EVSRWU, + SPE_BUILTIN_EVSTDDX, + SPE_BUILTIN_EVSTDHX, + SPE_BUILTIN_EVSTDWX, + SPE_BUILTIN_EVSTWHEX, + SPE_BUILTIN_EVSTWHOX, + SPE_BUILTIN_EVSTWWEX, + SPE_BUILTIN_EVSTWWOX, + SPE_BUILTIN_EVSUBFW, + SPE_BUILTIN_EVXOR, + SPE_BUILTIN_EVABS, + SPE_BUILTIN_EVADDSMIAAW, + SPE_BUILTIN_EVADDSSIAAW, + SPE_BUILTIN_EVADDUMIAAW, + SPE_BUILTIN_EVADDUSIAAW, + SPE_BUILTIN_EVCNTLSW, + SPE_BUILTIN_EVCNTLZW, + SPE_BUILTIN_EVEXTSB, + SPE_BUILTIN_EVEXTSH, + SPE_BUILTIN_EVFSABS, + SPE_BUILTIN_EVFSCFSF, + SPE_BUILTIN_EVFSCFSI, + SPE_BUILTIN_EVFSCFUF, + SPE_BUILTIN_EVFSCFUI, + SPE_BUILTIN_EVFSCTSF, + SPE_BUILTIN_EVFSCTSI, + SPE_BUILTIN_EVFSCTSIZ, + SPE_BUILTIN_EVFSCTUF, + SPE_BUILTIN_EVFSCTUI, + SPE_BUILTIN_EVFSCTUIZ, + SPE_BUILTIN_EVFSNABS, + SPE_BUILTIN_EVFSNEG, + SPE_BUILTIN_EVMRA, + SPE_BUILTIN_EVNEG, + SPE_BUILTIN_EVRNDW, + SPE_BUILTIN_EVSUBFSMIAAW, + SPE_BUILTIN_EVSUBFSSIAAW, + SPE_BUILTIN_EVSUBFUMIAAW, + SPE_BUILTIN_EVSUBFUSIAAW, + SPE_BUILTIN_EVADDIW, + SPE_BUILTIN_EVLDD, + SPE_BUILTIN_EVLDH, + SPE_BUILTIN_EVLDW, + SPE_BUILTIN_EVLHHESPLAT, + SPE_BUILTIN_EVLHHOSSPLAT, + SPE_BUILTIN_EVLHHOUSPLAT, + SPE_BUILTIN_EVLWHE, + SPE_BUILTIN_EVLWHOS, + SPE_BUILTIN_EVLWHOU, + SPE_BUILTIN_EVLWHSPLAT, + SPE_BUILTIN_EVLWWSPLAT, + SPE_BUILTIN_EVRLWI, + SPE_BUILTIN_EVSLWI, + SPE_BUILTIN_EVSRWIS, + SPE_BUILTIN_EVSRWIU, + SPE_BUILTIN_EVSTDD, + SPE_BUILTIN_EVSTDH, + SPE_BUILTIN_EVSTDW, + SPE_BUILTIN_EVSTWHE, + SPE_BUILTIN_EVSTWHO, + SPE_BUILTIN_EVSTWWE, + SPE_BUILTIN_EVSTWWO, + SPE_BUILTIN_EVSUBIFW, + + /* Compares. */ + SPE_BUILTIN_EVCMPEQ, + SPE_BUILTIN_EVCMPGTS, + SPE_BUILTIN_EVCMPGTU, + SPE_BUILTIN_EVCMPLTS, + SPE_BUILTIN_EVCMPLTU, + SPE_BUILTIN_EVFSCMPEQ, + SPE_BUILTIN_EVFSCMPGT, + SPE_BUILTIN_EVFSCMPLT, + SPE_BUILTIN_EVFSTSTEQ, + SPE_BUILTIN_EVFSTSTGT, + SPE_BUILTIN_EVFSTSTLT, + + /* EVSEL compares. */ + SPE_BUILTIN_EVSEL_CMPEQ, + SPE_BUILTIN_EVSEL_CMPGTS, + SPE_BUILTIN_EVSEL_CMPGTU, + SPE_BUILTIN_EVSEL_CMPLTS, + SPE_BUILTIN_EVSEL_CMPLTU, + SPE_BUILTIN_EVSEL_FSCMPEQ, + SPE_BUILTIN_EVSEL_FSCMPGT, + SPE_BUILTIN_EVSEL_FSCMPLT, + SPE_BUILTIN_EVSEL_FSTSTEQ, + SPE_BUILTIN_EVSEL_FSTSTGT, + SPE_BUILTIN_EVSEL_FSTSTLT, + + SPE_BUILTIN_EVSPLATFI, + SPE_BUILTIN_EVSPLATI, + SPE_BUILTIN_EVMWHSSMAA, + SPE_BUILTIN_EVMWHSMFAA, + SPE_BUILTIN_EVMWHSMIAA, + SPE_BUILTIN_EVMWHUSIAA, + SPE_BUILTIN_EVMWHUMIAA, + SPE_BUILTIN_EVMWHSSFAN, + SPE_BUILTIN_EVMWHSSIAN, + SPE_BUILTIN_EVMWHSMFAN, + SPE_BUILTIN_EVMWHSMIAN, + SPE_BUILTIN_EVMWHUSIAN, + SPE_BUILTIN_EVMWHUMIAN, + SPE_BUILTIN_EVMWHGSSFAA, + SPE_BUILTIN_EVMWHGSMFAA, + SPE_BUILTIN_EVMWHGSMIAA, + SPE_BUILTIN_EVMWHGUMIAA, + SPE_BUILTIN_EVMWHGSSFAN, + SPE_BUILTIN_EVMWHGSMFAN, + SPE_BUILTIN_EVMWHGSMIAN, + SPE_BUILTIN_EVMWHGUMIAN, + SPE_BUILTIN_MTSPEFSCR, + SPE_BUILTIN_MFSPEFSCR, + SPE_BUILTIN_BRINC }; diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/rs6000.md gcc-3.3/gcc/config/rs6000/rs6000.md *** gcc-3.2.3/gcc/config/rs6000/rs6000.md 2003-02-27 02:08:01.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/rs6000.md 2003-04-06 02:02:21.000000000 +0000 *************** *** 1,6 **** ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler ;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! ;; 1999, 2000, 2001 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; This file is part of GNU CC. --- 1,6 ---- ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler ;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! ;; 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; This file is part of GNU CC. *************** *** 32,37 **** --- 32,39 ---- ;; 8 movsi_got ;; 9/v eh_reg_restore ;; 10 fctiwz + ;; 15 load_macho_picbase + ;; 16 macho_correct_pic ;; 19 movesi_from_cr ;; 20 movesi_to_cr *************** *** 56,62 **** ;; Processor type -- this attribute must exactly match the processor_type ;; enumeration in rs6000.h. ! (define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450" (const (symbol_ref "rs6000_cpu_attr"))) ; (define_function_unit NAME MULTIPLICITY SIMULTANEITY --- 58,64 ---- ;; Processor type -- this attribute must exactly match the processor_type ;; enumeration in rs6000.h. ! (define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4" (const (symbol_ref "rs6000_cpu_attr"))) ; (define_function_unit NAME MULTIPLICITY SIMULTANEITY *************** *** 375,416 **** --- 377,428 ---- (and (eq_attr "type" "cr_logical") (eq_attr "cpu" "ppc7450")) 1 1) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "vecsimple") (eq_attr "cpu" "ppc7450")) 1 2 [(eq_attr "type" "vecsimple")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "vecsimple") (eq_attr "cpu" "ppc7450")) 1 1 [(eq_attr "type" "!vecsimple")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "veccomplex") (eq_attr "cpu" "ppc7450")) 4 2 [(eq_attr "type" "veccomplex")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "veccomplex") (eq_attr "cpu" "ppc7450")) 4 1 [(eq_attr "type" "!veccomplex")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "veccmp") (eq_attr "cpu" "ppc7450")) 2 2 [(eq_attr "type" "veccmp")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "veccmp") (eq_attr "cpu" "ppc7450")) 2 1 [(eq_attr "type" "!veccmp")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "vecfloat") (eq_attr "cpu" "ppc7450")) 4 2 [(eq_attr "type" "vecfloat")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "vecfloat") (eq_attr "cpu" "ppc7450")) 4 1 [(eq_attr "type" "!vecfloat")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "vecperm") (eq_attr "cpu" "ppc7450")) 2 2 [(eq_attr "type" "vecperm")]) + (define_function_unit "vec_alu2" 2 0 (and (eq_attr "type" "vecperm") (eq_attr "cpu" "ppc7450")) *************** *** 489,495 **** (define_function_unit "iu" 1 0 (and (eq_attr "type" "compare,delayed_compare") ! (eq_attr "cpu" "rs64a,mpccore,ppc403,ppc405,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630")) 3 1) ; some extra cycles added by TARGET_SCHED_ADJUST_COST between compare --- 501,507 ---- (define_function_unit "iu" 1 0 (and (eq_attr "type" "compare,delayed_compare") ! (eq_attr "cpu" "rs64a,mpccore,ppc403,ppc405,ppc601,ppc603")) 3 1) ; some extra cycles added by TARGET_SCHED_ADJUST_COST between compare *************** *** 533,539 **** ; fp compare uses fp unit (define_function_unit "fpu" 1 0 (and (eq_attr "type" "fpcompare") ! (eq_attr "cpu" "rs64a,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630")) 5 1) (define_function_unit "fpu" 1 0 --- 545,551 ---- ; fp compare uses fp unit (define_function_unit "fpu" 1 0 (and (eq_attr "type" "fpcompare") ! (eq_attr "cpu" "rs64a,ppc601,ppc603,ppc604,ppc604e,ppc620")) 5 1) (define_function_unit "fpu" 1 0 *************** *** 699,720 **** ; RIOS2 has two symmetric FPUs. (define_function_unit "fpu2" 2 0 ! (and (eq_attr "type" "fp") ! (eq_attr "cpu" "rios2")) ! 2 1) ! ! (define_function_unit "fpu2" 2 0 ! (and (eq_attr "type" "fp") ! (eq_attr "cpu" "ppc630")) ! 3 1) ! ! (define_function_unit "fpu2" 2 0 ! (and (eq_attr "type" "dmul") (eq_attr "cpu" "rios2")) 2 1) (define_function_unit "fpu2" 2 0 ! (and (eq_attr "type" "dmul") (eq_attr "cpu" "ppc630")) 3 1) --- 711,722 ---- ; RIOS2 has two symmetric FPUs. (define_function_unit "fpu2" 2 0 ! (and (eq_attr "type" "fp,dmul") (eq_attr "cpu" "rios2")) 2 1) (define_function_unit "fpu2" 2 0 ! (and (eq_attr "type" "fp,dmul") (eq_attr "cpu" "ppc630")) 3 1) *************** *** 748,753 **** --- 750,858 ---- (eq_attr "cpu" "ppc630")) 26 26) + ;; Power4 + (define_function_unit "lsu2" 2 0 + (and (eq_attr "type" "load") + (eq_attr "cpu" "power4")) + 3 1) + + (define_function_unit "lsu2" 2 0 + (and (eq_attr "type" "fpload") + (eq_attr "cpu" "power4")) + 5 1) + + (define_function_unit "lsu2" 2 0 + (and (eq_attr "type" "store,fpstore") + (eq_attr "cpu" "power4")) + 1 1) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "integer") + (eq_attr "cpu" "power4")) + 2 1) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "lmul") + (eq_attr "cpu" "power4")) + 7 6) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "imul") + (eq_attr "cpu" "power4")) + 5 4) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "imul2,imul3") + (eq_attr "cpu" "power4")) + 4 3) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "idiv") + (eq_attr "cpu" "power4")) + 36 35) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "ldiv") + (eq_attr "cpu" "power4")) + 68 67) + + (define_function_unit "imuldiv" 1 0 + (and (eq_attr "type" "idiv") + (eq_attr "cpu" "power4")) + 36 35) + + (define_function_unit "imuldiv" 1 0 + (and (eq_attr "type" "ldiv") + (eq_attr "cpu" "power4")) + 68 67) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "compare") + (eq_attr "cpu" "power4")) + 3 1) + + (define_function_unit "iu2" 2 0 + (and (eq_attr "type" "delayed_compare") + (eq_attr "cpu" "power4")) + 4 1) + + (define_function_unit "bpu" 1 0 + (and (eq_attr "type" "mtjmpr") + (eq_attr "cpu" "power4")) + 3 1) + + (define_function_unit "bpu" 1 0 + (and (eq_attr "type" "jmpreg,branch") + (eq_attr "cpu" "power4")) + 2 1) + + (define_function_unit "cru" 1 0 + (and (eq_attr "type" "cr_logical") + (eq_attr "cpu" "power4")) + 4 1) + + (define_function_unit "fpu2" 2 0 + (and (eq_attr "type" "fp,dmul") + (eq_attr "cpu" "power4")) + 6 1) + + ; adjust_cost increases the cost of dependent branches, + ; so shave a few cycles off for fpcompare. + (define_function_unit "fpu2" 2 0 + (and (eq_attr "type" "fpcompare") + (eq_attr "cpu" "power4")) + 5 1) + + (define_function_unit "fpu2" 2 0 + (and (eq_attr "type" "sdiv,ddiv") + (eq_attr "cpu" "power4")) + 33 28) + + (define_function_unit "fpu2" 2 0 + (and (eq_attr "type" "ssqrt,dsqrt") + (eq_attr "cpu" "power4")) + 40 35) + ;; Start with fixed-point load and store insns. Here we put only the more ;; complex forms. Basic data transfer is done later. *************** *** 1631,1637 **** ? operands[0] : gen_reg_rtx (SImode)); HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = (val & 0xffff) - 2 * (val & 0x8000); HOST_WIDE_INT rest = trunc_int_for_mode (val - low, SImode); /* The ordering here is important for the prolog expander. --- 1736,1742 ---- ? operands[0] : gen_reg_rtx (SImode)); HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000; HOST_WIDE_INT rest = trunc_int_for_mode (val - low, SImode); /* The ordering here is important for the prolog expander. *************** *** 1740,1746 **** " { HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = (val & 0xffff) - 2 * (val & 0x8000); HOST_WIDE_INT rest = trunc_int_for_mode (val - low, SImode); operands[3] = GEN_INT (rest); --- 1845,1851 ---- " { HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000; HOST_WIDE_INT rest = trunc_int_for_mode (val - low, SImode); operands[3] = GEN_INT (rest); *************** *** 1936,1944 **** (minus:SI (match_dup 2) (match_dup 1)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (minus:SI (match_dup 2) (match_dup 3)))] ! "TARGET_POWER" " ! { operands[3] = gen_reg_rtx (SImode); }") (define_split [(set (match_operand:SI 0 "gpc_reg_operand" "") --- 2041,2058 ---- (minus:SI (match_dup 2) (match_dup 1)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (minus:SI (match_dup 2) (match_dup 3)))] ! "TARGET_POWER || TARGET_ISEL" " ! { ! if (TARGET_ISEL) ! { ! operands[2] = force_reg (SImode, operands[2]); ! rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]); ! DONE; ! } ! ! operands[3] = gen_reg_rtx (SImode); ! }") (define_split [(set (match_operand:SI 0 "gpc_reg_operand" "") *************** *** 1961,1969 **** (minus:SI (match_dup 2) (match_dup 1)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (plus:SI (match_dup 3) (match_dup 1)))] ! "TARGET_POWER" " ! { operands[3] = gen_reg_rtx (SImode); }") (define_split [(set (match_operand:SI 0 "gpc_reg_operand" "") --- 2075,2091 ---- (minus:SI (match_dup 2) (match_dup 1)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (plus:SI (match_dup 3) (match_dup 1)))] ! "TARGET_POWER || TARGET_ISEL" " ! { ! if (TARGET_ISEL) ! { ! operands[2] = force_reg (SImode, operands[2]); ! rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]); ! DONE; ! } ! operands[3] = gen_reg_rtx (SImode); ! }") (define_split [(set (match_operand:SI 0 "gpc_reg_operand" "") *************** *** 1988,1996 **** (minus:SI (match_dup 4) (match_dup 3)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (minus:SI (match_dup 2) (match_dup 3)))] ! "TARGET_POWER" " { operands[3] = gen_reg_rtx (SImode); operands[4] = gen_reg_rtx (SImode); operands[5] = GEN_INT (-2147483647 - 1); --- 2110,2123 ---- (minus:SI (match_dup 4) (match_dup 3)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (minus:SI (match_dup 2) (match_dup 3)))] ! "TARGET_POWER || TARGET_ISEL" " { + if (TARGET_ISEL) + { + rs6000_emit_minmax (operands[0], UMIN, operands[1], operands[2]); + DONE; + } operands[3] = gen_reg_rtx (SImode); operands[4] = gen_reg_rtx (SImode); operands[5] = GEN_INT (-2147483647 - 1); *************** *** 2006,2014 **** (minus:SI (match_dup 4) (match_dup 3)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (plus:SI (match_dup 3) (match_dup 1)))] ! "TARGET_POWER" " { operands[3] = gen_reg_rtx (SImode); operands[4] = gen_reg_rtx (SImode); operands[5] = GEN_INT (-2147483647 - 1); --- 2133,2146 ---- (minus:SI (match_dup 4) (match_dup 3)))) (set (match_operand:SI 0 "gpc_reg_operand" "") (plus:SI (match_dup 3) (match_dup 1)))] ! "TARGET_POWER || TARGET_ISEL" " { + if (TARGET_ISEL) + { + rs6000_emit_minmax (operands[0], UMAX, operands[1], operands[2]); + DONE; + } operands[3] = gen_reg_rtx (SImode); operands[4] = gen_reg_rtx (SImode); operands[5] = GEN_INT (-2147483647 - 1); *************** *** 2107,2143 **** "" " { ! if (! TARGET_POWER) { emit_insn (gen_abssi2_nopower (operands[0], operands[1])); DONE; } }") ! (define_insn "abssi2_power" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r")))] "TARGET_POWER" "abs %0,%1") ! (define_insn "abssi2_nopower" [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") ! (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0"))) (clobber (match_scratch:SI 2 "=&r,&r"))] ! "! TARGET_POWER" ! "* ! { ! return (TARGET_POWERPC) ! ? \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%2,%0\" ! : \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;{sf|subfc} %0,%2,%0\"; ! }" ! [(set_attr "length" "12")]) ! ! (define_split ! [(set (match_operand:SI 0 "gpc_reg_operand" "") ! (abs:SI (match_operand:SI 1 "gpc_reg_operand" ""))) ! (clobber (match_scratch:SI 2 ""))] ! "! TARGET_POWER && reload_completed" [(set (match_dup 2) (ashiftrt:SI (match_dup 1) (const_int 31))) (set (match_dup 0) (xor:SI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:SI (match_dup 0) (match_dup 2)))] --- 2239,2288 ---- "" " { ! if (TARGET_ISEL) ! { ! emit_insn (gen_abssi2_isel (operands[0], operands[1])); ! DONE; ! } ! else if (! TARGET_POWER) { emit_insn (gen_abssi2_nopower (operands[0], operands[1])); DONE; } }") ! (define_insn "*abssi2_power" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r")))] "TARGET_POWER" "abs %0,%1") ! (define_insn_and_split "abssi2_isel" ! [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ! (abs:SI (match_operand:SI 1 "gpc_reg_operand" "b"))) ! (clobber (match_scratch:SI 2 "=b")) ! (clobber (match_scratch:CC 3 "=y"))] ! "TARGET_ISEL" ! "#" ! "&& reload_completed" ! [(set (match_dup 2) (neg:SI (match_dup 1))) ! (set (match_dup 3) ! (compare:CC (match_dup 1) ! (const_int 0))) ! (set (match_dup 0) ! (if_then_else:SI (ge (match_dup 3) ! (const_int 0)) ! (match_dup 1) ! (match_dup 2)))] ! "") ! ! (define_insn_and_split "abssi2_nopower" [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") ! (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0"))) (clobber (match_scratch:SI 2 "=&r,&r"))] ! "! TARGET_POWER && ! TARGET_ISEL" ! "#" ! "&& reload_completed" [(set (match_dup 2) (ashiftrt:SI (match_dup 1) (const_int 31))) (set (match_dup 0) (xor:SI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:SI (match_dup 0) (match_dup 2)))] *************** *** 2149,2172 **** "TARGET_POWER" "nabs %0,%1") ! (define_insn "*nabs_no_power" [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") ! (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0")))) (clobber (match_scratch:SI 2 "=&r,&r"))] "! TARGET_POWER" ! "* ! { ! return (TARGET_POWERPC) ! ? \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%0,%2\" ! : \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;{sf|subfc} %0,%0,%2\"; ! }" ! [(set_attr "length" "12")]) ! ! (define_split ! [(set (match_operand:SI 0 "gpc_reg_operand" "") ! (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "")))) ! (clobber (match_scratch:SI 2 ""))] ! "! TARGET_POWER && reload_completed" [(set (match_dup 2) (ashiftrt:SI (match_dup 1) (const_int 31))) (set (match_dup 0) (xor:SI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:SI (match_dup 2) (match_dup 0)))] --- 2294,2306 ---- "TARGET_POWER" "nabs %0,%1") ! (define_insn_and_split "*nabs_nopower" [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") ! (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0")))) (clobber (match_scratch:SI 2 "=&r,&r"))] "! TARGET_POWER" ! "#" ! "&& reload_completed" [(set (match_dup 2) (ashiftrt:SI (match_dup 1) (const_int 31))) (set (match_dup 0) (xor:SI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:SI (match_dup 2) (match_dup 0)))] *************** *** 2538,2544 **** rtx temp2; if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) < 0 || (i = exact_log2 (INTVAL (operands[2]))) < 0) FAIL; --- 2672,2678 ---- rtx temp2; if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) <= 0 || (i = exact_log2 (INTVAL (operands[2]))) < 0) FAIL; *************** *** 2804,2810 **** {andiu.|andis.} %0,%1,%u2") ;; Note to set cr's other than cr0 we do the and immediate and then ! ;; the test again -- this avoids a mcrf which on the higher end ;; machines causes an execution serialization (define_insn "*andsi3_internal2" --- 2938,2944 ---- {andiu.|andis.} %0,%1,%u2") ;; Note to set cr's other than cr0 we do the and immediate and then ! ;; the test again -- this avoids a mfcr which on the higher end ;; machines causes an execution serialization (define_insn "*andsi3_internal2" *************** *** 2827,2832 **** --- 2961,2986 ---- [(set_attr "type" "compare,compare,compare,delayed_compare,compare,compare,compare,compare") (set_attr "length" "4,4,4,4,8,8,8,8")]) + (define_insn "*andsi3_internal3" + [(set (match_operand:CC 0 "cc_reg_operand" "=x,x,x,x,?y,??y,??y,?y") + (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,r") + (match_operand:SI 2 "and_operand" "r,K,L,T,r,K,L,T")) + (const_int 0))) + (clobber (match_scratch:SI 3 "=r,r,r,r,r,r,r,r")) + (clobber (match_scratch:CC 4 "=X,X,X,X,X,x,x,X"))] + "TARGET_POWERPC64" + "@ + # + {andil.|andi.} %3,%1,%b2 + {andiu.|andis.} %3,%1,%u2 + {rlinm.|rlwinm.} %3,%1,0,%m2,%M2 + # + # + # + #" + [(set_attr "type" "compare,compare,compare,delayed_compare,compare,compare,compare,compare") + (set_attr "length" "8,4,4,4,8,8,8,8")]) + (define_split [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "") (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "") *************** *** 2834,2840 **** (const_int 0))) (clobber (match_scratch:SI 3 "")) (clobber (match_scratch:CC 4 ""))] ! "! TARGET_POWERPC64 && reload_completed" [(parallel [(set (match_dup 3) (and:SI (match_dup 1) (match_dup 2))) --- 2988,2994 ---- (const_int 0))) (clobber (match_scratch:SI 3 "")) (clobber (match_scratch:CC 4 ""))] ! "reload_completed" [(parallel [(set (match_dup 3) (and:SI (match_dup 1) (match_dup 2))) *************** *** 2844,2850 **** (const_int 0)))] "") ! (define_insn "*andsi3_internal3" [(set (match_operand:CC 3 "cc_reg_operand" "=x,x,x,x,?y,??y,??y,?y") (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,r") (match_operand:SI 2 "and_operand" "r,K,L,T,r,K,L,T")) --- 2998,3024 ---- (const_int 0)))] "") ! ;; We don't have a 32 bit "and. rt,ra,rb" for ppc64. cr is set from the ! ;; whole 64 bit reg, and we don't know what is in the high 32 bits. ! ! (define_split ! [(set (match_operand:CC 0 "cc_reg_operand" "") ! (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "") ! (match_operand:SI 2 "gpc_reg_operand" "")) ! (const_int 0))) ! (clobber (match_scratch:SI 3 "")) ! (clobber (match_scratch:CC 4 ""))] ! "TARGET_POWERPC64 && reload_completed" ! [(parallel [(set (match_dup 3) ! (and:SI (match_dup 1) ! (match_dup 2))) ! (clobber (match_dup 4))]) ! (set (match_dup 0) ! (compare:CC (match_dup 3) ! (const_int 0)))] ! "") ! ! (define_insn "*andsi3_internal4" [(set (match_operand:CC 3 "cc_reg_operand" "=x,x,x,x,?y,??y,??y,?y") (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,r") (match_operand:SI 2 "and_operand" "r,K,L,T,r,K,L,T")) *************** *** 2866,2871 **** --- 3040,3067 ---- [(set_attr "type" "compare,compare,compare,delayed_compare,compare,compare,compare,compare") (set_attr "length" "4,4,4,4,8,8,8,8")]) + (define_insn "*andsi3_internal5" + [(set (match_operand:CC 3 "cc_reg_operand" "=x,x,x,x,?y,??y,??y,?y") + (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,r") + (match_operand:SI 2 "and_operand" "r,K,L,T,r,K,L,T")) + (const_int 0))) + (set (match_operand:SI 0 "gpc_reg_operand" "=r,r,r,r,r,r,r,r") + (and:SI (match_dup 1) + (match_dup 2))) + (clobber (match_scratch:CC 4 "=X,X,X,X,X,x,x,X"))] + "TARGET_POWERPC64" + "@ + # + {andil.|andi.} %0,%1,%b2 + {andiu.|andis.} %0,%1,%u2 + {rlinm.|rlwinm.} %0,%1,0,%m2,%M2 + # + # + # + #" + [(set_attr "type" "compare,compare,compare,delayed_compare,compare,compare,compare,compare") + (set_attr "length" "8,4,4,4,8,8,8,8")]) + (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "") *************** *** 2875,2881 **** (and:SI (match_dup 1) (match_dup 2))) (clobber (match_scratch:CC 4 ""))] ! "! TARGET_POWERPC64 && reload_completed" [(parallel [(set (match_dup 0) (and:SI (match_dup 1) (match_dup 2))) --- 3071,3096 ---- (and:SI (match_dup 1) (match_dup 2))) (clobber (match_scratch:CC 4 ""))] ! "reload_completed" ! [(parallel [(set (match_dup 0) ! (and:SI (match_dup 1) ! (match_dup 2))) ! (clobber (match_dup 4))]) ! (set (match_dup 3) ! (compare:CC (match_dup 0) ! (const_int 0)))] ! "") ! ! (define_split ! [(set (match_operand:CC 3 "cc_reg_operand" "") ! (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "") ! (match_operand:SI 2 "gpc_reg_operand" "")) ! (const_int 0))) ! (set (match_operand:SI 0 "gpc_reg_operand" "") ! (and:SI (match_dup 1) ! (match_dup 2))) ! (clobber (match_scratch:CC 4 ""))] ! "TARGET_POWERPC64 && reload_completed" [(parallel [(set (match_dup 0) (and:SI (match_dup 1) (match_dup 2))) *************** *** 2885,2890 **** --- 3100,3184 ---- (const_int 0)))] "") + ;; Handle the PowerPC64 rlwinm corner case + + (define_insn_and_split "*andsi3_internal6" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (and:SI (match_operand:SI 1 "gpc_reg_operand" "r") + (match_operand:SI 2 "mask_operand_wrap" "i")))] + "TARGET_POWERPC64" + "#" + "TARGET_POWERPC64" + [(set (match_dup 0) + (and:SI (rotate:SI (match_dup 1) (match_dup 3)) + (match_dup 4))) + (set (match_dup 0) + (rotate:SI (match_dup 0) (match_dup 5)))] + " + { + int mb = extract_MB (operands[2]); + int me = extract_ME (operands[2]); + operands[3] = GEN_INT (me + 1); + operands[5] = GEN_INT (32 - (me + 1)); + operands[4] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb))); + }" + [(set_attr "length" "8")]) + + (define_insn_and_split "*andsi3_internal7" + [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y") + (compare:CC (and:SI (match_operand:SI 0 "gpc_reg_operand" "r,r") + (match_operand:SI 1 "mask_operand_wrap" "i,i")) + (const_int 0))) + (clobber (match_scratch:SI 3 "=r,r"))] + "TARGET_POWERPC64" + "#" + "TARGET_POWERPC64" + [(parallel [(set (match_dup 2) + (compare:CC (and:SI (rotate:SI (match_dup 0) (match_dup 4)) + (match_dup 5)) + (const_int 0))) + (clobber (match_dup 3))])] + " + { + int mb = extract_MB (operands[1]); + int me = extract_ME (operands[1]); + operands[4] = GEN_INT (me + 1); + operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb))); + }" + [(set_attr "type" "delayed_compare,compare") + (set_attr "length" "4,8")]) + + (define_insn_and_split "*andsi3_internal8" + [(set (match_operand:CC 3 "cc_reg_operand" "=x,??y") + (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") + (match_operand:SI 2 "mask_operand_wrap" "i,i")) + (const_int 0))) + (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") + (and:SI (match_dup 1) + (match_dup 2)))] + "TARGET_POWERPC64" + "#" + "TARGET_POWERPC64" + [(parallel [(set (match_dup 3) + (compare:CC (and:SI (rotate:SI (match_dup 1) (match_dup 4)) + (match_dup 5)) + (const_int 0))) + (set (match_dup 0) + (and:SI (rotate:SI (match_dup 1) (match_dup 4)) + (match_dup 5)))]) + (set (match_dup 0) + (rotate:SI (match_dup 0) (match_dup 6)))] + " + { + int mb = extract_MB (operands[2]); + int me = extract_ME (operands[2]); + operands[4] = GEN_INT (me + 1); + operands[6] = GEN_INT (32 - (me + 1)); + operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb))); + }" + [(set_attr "type" "delayed_compare,compare") + (set_attr "length" "8,12")]) + (define_expand "iorsi3" [(set (match_operand:SI 0 "gpc_reg_operand" "") (ior:SI (match_operand:SI 1 "gpc_reg_operand" "") *************** *** 3321,3327 **** #" [(set_attr "type" "compare") (set_attr "length" "4,8")]) ! (define_split [(set (match_operand:CC 4 "cc_reg_not_cr0_operand" "") (compare:CC --- 3615,3621 ---- #" [(set_attr "type" "compare") (set_attr "length" "4,8")]) ! (define_split [(set (match_operand:CC 4 "cc_reg_not_cr0_operand" "") (compare:CC *************** *** 3341,3347 **** (compare:CC (match_dup 0) (const_int 0)))] "") ! ;; Rotate and shift insns, in all their variants. These support shifts, ;; field inserts and extracts, and various combinations thereof. (define_expand "insv" --- 3635,3641 ---- (compare:CC (match_dup 0) (const_int 0)))] "") ! ;; Rotate and shift insns, in all their variants. These support shifts, ;; field inserts and extracts, and various combinations thereof. (define_expand "insv" *************** *** 3519,3525 **** (match_operand:SI 3 "const_int_operand" "i,i")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "! TARGET_POWERPC64" "* { int start = INTVAL (operands[3]) & 31; --- 3813,3819 ---- (match_operand:SI 3 "const_int_operand" "i,i")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "" "* { int start = INTVAL (operands[3]) & 31; *************** *** 3529,3535 **** if (which_alternative == 1) return \"#\"; ! /* If the bitfield being tested fits in the upper or lower half of a word, it is possible to use andiu. or andil. to test it. This is useful because the condition register set-use delay is smaller for andi[ul]. than for rlinm. This doesn't work when the starting bit --- 3823,3829 ---- if (which_alternative == 1) return \"#\"; ! /* If the bit-field being tested fits in the upper or lower half of a word, it is possible to use andiu. or andil. to test it. This is useful because the condition register set-use delay is smaller for andi[ul]. than for rlinm. This doesn't work when the starting bit *************** *** 3561,3567 **** (match_operand:SI 3 "const_int_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "! TARGET_POWERPC64 && reload_completed" [(set (match_dup 4) (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3))) --- 3855,3861 ---- (match_operand:SI 3 "const_int_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "reload_completed" [(set (match_dup 4) (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3))) *************** *** 3578,3584 **** (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3)))] ! "! TARGET_POWERPC64" "* { int start = INTVAL (operands[3]) & 31; --- 3872,3878 ---- (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3)))] ! "" "* { int start = INTVAL (operands[3]) & 31; *************** *** 3588,3596 **** if (which_alternative == 1) return \"#\"; if (start >= 16 && start + size == 32) { ! operands[3] = GEN_INT ((1 << (32 - start)) - 1); return \"{andil.|andi.} %0,%1,%3\"; } --- 3882,3892 ---- if (which_alternative == 1) return \"#\"; + /* Since we are using the output value, we can't ignore any need for + a shift. The bit-field must end at the LSB. */ if (start >= 16 && start + size == 32) { ! operands[3] = GEN_INT ((1 << size) - 1); return \"{andil.|andi.} %0,%1,%3\"; } *************** *** 3600,3606 **** operands[3] = GEN_INT (start + size); return \"{rlinm.|rlwinm.} %0,%1,%3,%s2,31\"; }" ! [(set_attr "type" "delayed_compare") (set_attr "length" "4,8")]) (define_split --- 3896,3902 ---- operands[3] = GEN_INT (start + size); return \"{rlinm.|rlwinm.} %0,%1,%3,%s2,31\"; }" ! [(set_attr "type" "compare") (set_attr "length" "4,8")]) (define_split *************** *** 3611,3617 **** (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3)))] ! "! TARGET_POWERPC64 && reload_completed" [(set (match_dup 0) (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3))) (set (match_dup 4) --- 3907,3913 ---- (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3)))] ! "reload_completed" [(set (match_dup 0) (zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3))) (set (match_dup 4) *************** *** 3694,3700 **** (match_operand:SI 2 "reg_or_cint_operand" "ri,ri")) (const_int 0))) (clobber (match_scratch:SI 3 "=r,r"))] ! "! TARGET_POWERPC64" "@ {rl%I2nm.|rlw%I2nm.} %3,%1,%h2,0xffffffff #" --- 3990,3996 ---- (match_operand:SI 2 "reg_or_cint_operand" "ri,ri")) (const_int 0))) (clobber (match_scratch:SI 3 "=r,r"))] ! "" "@ {rl%I2nm.|rlw%I2nm.} %3,%1,%h2,0xffffffff #" *************** *** 3707,3713 **** (match_operand:SI 2 "reg_or_cint_operand" "")) (const_int 0))) (clobber (match_scratch:SI 3 ""))] ! "! TARGET_POWERPC64 && reload_completed" [(set (match_dup 3) (rotate:SI (match_dup 1) (match_dup 2))) (set (match_dup 0) --- 4003,4009 ---- (match_operand:SI 2 "reg_or_cint_operand" "")) (const_int 0))) (clobber (match_scratch:SI 3 ""))] ! "reload_completed" [(set (match_dup 3) (rotate:SI (match_dup 1) (match_dup 2))) (set (match_dup 0) *************** *** 3722,3728 **** (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (rotate:SI (match_dup 1) (match_dup 2)))] ! "! TARGET_POWERPC64" "@ {rl%I2nm.|rlw%I2nm.} %0,%1,%h2,0xffffffff #" --- 4018,4024 ---- (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (rotate:SI (match_dup 1) (match_dup 2)))] ! "" "@ {rl%I2nm.|rlw%I2nm.} %0,%1,%h2,0xffffffff #" *************** *** 3736,3742 **** (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (rotate:SI (match_dup 1) (match_dup 2)))] ! "! TARGET_POWERPC64 && reload_completed" [(set (match_dup 0) (rotate:SI (match_dup 1) (match_dup 2))) (set (match_dup 3) --- 4032,4038 ---- (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (rotate:SI (match_dup 1) (match_dup 2)))] ! "reload_completed" [(set (match_dup 0) (rotate:SI (match_dup 1) (match_dup 2))) (set (match_dup 3) *************** *** 3748,3754 **** [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "reg_or_cint_operand" "ri")) ! (match_operand:SI 3 "mask_operand" "T")))] "" "{rl%I2nm|rlw%I2nm} %0,%1,%h2,%m3,%M3") --- 4044,4050 ---- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "reg_or_cint_operand" "ri")) ! (match_operand:SI 3 "mask_operand" "n")))] "" "{rl%I2nm|rlw%I2nm} %0,%1,%h2,%m3,%M3") *************** *** 3757,3766 **** (compare:CC (and:SI (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:SI 3 "mask_operand" "T,T")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "! TARGET_POWERPC64" "@ {rl%I2nm.|rlw%I2nm.} %4,%1,%h2,%m3,%M3 #" --- 4053,4062 ---- (compare:CC (and:SI (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:SI 3 "mask_operand" "n,n")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "" "@ {rl%I2nm.|rlw%I2nm.} %4,%1,%h2,%m3,%M3 #" *************** *** 3775,3781 **** (match_operand:SI 3 "mask_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "! TARGET_POWERPC64 && reload_completed" [(set (match_dup 4) (and:SI (rotate:SI (match_dup 1) (match_dup 2)) --- 4071,4077 ---- (match_operand:SI 3 "mask_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "reload_completed" [(set (match_dup 4) (and:SI (rotate:SI (match_dup 1) (match_dup 2)) *************** *** 3790,3800 **** (compare:CC (and:SI (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:SI 3 "mask_operand" "T,T")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (and:SI (rotate:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "! TARGET_POWERPC64" "@ {rl%I2nm.|rlw%I2nm.} %0,%1,%h2,%m3,%M3 #" --- 4086,4096 ---- (compare:CC (and:SI (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:SI 3 "mask_operand" "n,n")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (and:SI (rotate:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "" "@ {rl%I2nm.|rlw%I2nm.} %0,%1,%h2,%m3,%M3 #" *************** *** 3810,3816 **** (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (and:SI (rotate:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "! TARGET_POWERPC64 && reload_completed" [(set (match_dup 0) (and:SI (rotate:SI (match_dup 1) (match_dup 2)) (match_dup 3))) (set (match_dup 4) --- 4106,4112 ---- (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (and:SI (rotate:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "reload_completed" [(set (match_dup 0) (and:SI (rotate:SI (match_dup 1) (match_dup 2)) (match_dup 3))) (set (match_dup 4) *************** *** 4128,4134 **** [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (ashift:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) ! (match_operand:SI 3 "mask_operand" "T")))] "includes_lshift_p (operands[2], operands[3])" "{rlinm|rlwinm} %0,%1,%h2,%m3,%M3") --- 4424,4430 ---- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (ashift:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) ! (match_operand:SI 3 "mask_operand" "n")))] "includes_lshift_p (operands[2], operands[3])" "{rlinm|rlwinm} %0,%1,%h2,%m3,%M3") *************** *** 4137,4146 **** (compare:CC (and:SI (ashift:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "T,T")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "! TARGET_POWERPC64 && includes_lshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %4,%1,%h2,%m3,%M3 #" --- 4433,4442 ---- (compare:CC (and:SI (ashift:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "n,n")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "includes_lshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %4,%1,%h2,%m3,%M3 #" *************** *** 4155,4161 **** (match_operand:SI 3 "mask_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "! TARGET_POWERPC64 && includes_lshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 4) (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3))) --- 4451,4457 ---- (match_operand:SI 3 "mask_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "includes_lshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 4) (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3))) *************** *** 4169,4179 **** (compare:CC (and:SI (ashift:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "T,T")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "! TARGET_POWERPC64 && includes_lshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %0,%1,%h2,%m3,%M3 #" --- 4465,4475 ---- (compare:CC (and:SI (ashift:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "n,n")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "includes_lshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %0,%1,%h2,%m3,%M3 #" *************** *** 4189,4195 **** (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "! TARGET_POWERPC64 && includes_lshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 0) (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3))) (set (match_dup 4) --- 4485,4491 ---- (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "includes_lshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 0) (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3))) (set (match_dup 4) *************** *** 4367,4373 **** [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) ! (match_operand:SI 3 "mask_operand" "T")))] "includes_rshift_p (operands[2], operands[3])" "{rlinm|rlwinm} %0,%1,%s2,%m3,%M3") --- 4663,4669 ---- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (and:SI (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) ! (match_operand:SI 3 "mask_operand" "n")))] "includes_rshift_p (operands[2], operands[3])" "{rlinm|rlwinm} %0,%1,%s2,%m3,%M3") *************** *** 4376,4385 **** (compare:CC (and:SI (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "T,T")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "! TARGET_POWERPC64 && includes_rshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %4,%1,%s2,%m3,%M3 #" --- 4672,4681 ---- (compare:CC (and:SI (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "n,n")) (const_int 0))) (clobber (match_scratch:SI 4 "=r,r"))] ! "includes_rshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %4,%1,%s2,%m3,%M3 #" *************** *** 4394,4400 **** (match_operand:SI 3 "mask_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "! TARGET_POWERPC64 && includes_rshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 4) (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3))) --- 4690,4696 ---- (match_operand:SI 3 "mask_operand" "")) (const_int 0))) (clobber (match_scratch:SI 4 ""))] ! "includes_rshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 4) (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3))) *************** *** 4408,4418 **** (compare:CC (and:SI (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "T,T")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "! TARGET_POWERPC64 && includes_rshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %0,%1,%s2,%m3,%M3 #" --- 4704,4714 ---- (compare:CC (and:SI (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:SI 3 "mask_operand" "n,n")) (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "includes_rshift_p (operands[2], operands[3])" "@ {rlinm.|rlwinm.} %0,%1,%s2,%m3,%M3 #" *************** *** 4428,4434 **** (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "! TARGET_POWERPC64 && includes_rshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 0) (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3))) (set (match_dup 4) --- 4724,4730 ---- (const_int 0))) (set (match_operand:SI 0 "gpc_reg_operand" "") (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] ! "includes_rshift_p (operands[2], operands[3]) && reload_completed" [(set (match_dup 0) (and:SI (lshiftrt:SI (match_dup 1) (match_dup 2)) (match_dup 3))) (set (match_dup 4) *************** *** 4794,4800 **** (define_insn "extendsfdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_extend:DF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { if (REGNO (operands[0]) == REGNO (operands[1])) --- 5090,5096 ---- (define_insn "extendsfdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_extend:DF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "* { if (REGNO (operands[0]) == REGNO (operands[1])) *************** *** 4807,4841 **** (define_insn "truncdfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "frsp %0,%1" [(set_attr "type" "fp")]) (define_insn "aux_truncdfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] 0))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "frsp %0,%1" [(set_attr "type" "fp")]) ! (define_insn "negsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fneg %0,%1" [(set_attr "type" "fp")]) ! (define_insn "abssf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fabs %0,%1" [(set_attr "type" "fp")]) (define_insn "" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT" "fnabs %0,%1" [(set_attr "type" "fp")]) --- 5103,5149 ---- (define_insn "truncdfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "frsp %0,%1" [(set_attr "type" "fp")]) (define_insn "aux_truncdfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] 0))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "frsp %0,%1" [(set_attr "type" "fp")]) ! (define_expand "negsf2" ! [(set (match_operand:SF 0 "gpc_reg_operand" "") ! (neg:SF (match_operand:SF 1 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" ! "") ! ! (define_insn "*negsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fneg %0,%1" [(set_attr "type" "fp")]) ! (define_expand "abssf2" ! [(set (match_operand:SF 0 "gpc_reg_operand" "") ! (abs:SF (match_operand:SF 1 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" ! "") ! ! (define_insn "*abssf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fabs %0,%1" [(set_attr "type" "fp")]) (define_insn "" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fnabs %0,%1" [(set_attr "type" "fp")]) *************** *** 4850,4856 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fadds %0,%1,%2" [(set_attr "type" "fp")]) --- 5158,5164 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "fadds %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 4858,4864 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) --- 5166,5172 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 4873,4879 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fsubs %0,%1,%2" [(set_attr "type" "fp")]) --- 5181,5187 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "fsubs %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 4881,4887 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) --- 5189,5195 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 4896,4902 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fmuls %0,%1,%2" [(set_attr "type" "fp")]) --- 5204,5210 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "fmuls %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 4904,4910 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fm|fmul} %0,%1,%2" [(set_attr "type" "dmul")]) --- 5212,5218 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "{fm|fmul} %0,%1,%2" [(set_attr "type" "dmul")]) *************** *** 4919,4925 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fdivs %0,%1,%2" [(set_attr "type" "sdiv")]) --- 5227,5233 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "fdivs %0,%1,%2" [(set_attr "type" "sdiv")]) *************** *** 4927,4933 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "ddiv")]) --- 5235,5241 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "ddiv")]) *************** *** 4936,4942 **** (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "fmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 5244,5250 ---- (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" "fmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 4945,4951 **** (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 5253,5259 ---- (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 4954,4960 **** (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "fmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 5262,5268 ---- (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" "fmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 4963,4969 **** (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 5271,5277 ---- (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 4972,4978 **** (neg:SF (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "fnmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 5280,5297 ---- (neg:SF (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && HONOR_SIGNED_ZEROS (SFmode)" ! "fnmadds %0,%1,%2,%3" ! [(set_attr "type" "fp")]) ! ! (define_insn "" ! [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (minus:SF (mult:SF (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f")) ! (match_operand:SF 2 "gpc_reg_operand" "f")) ! (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && ! HONOR_SIGNED_ZEROS (SFmode)" "fnmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 4981,4987 **** (neg:SF (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 5300,5316 ---- (neg:SF (plus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" ! "{fnma|fnmadd} %0,%1,%2,%3" ! [(set_attr "type" "dmul")]) ! ! (define_insn "" ! [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (minus:SF (mult:SF (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f")) ! (match_operand:SF 2 "gpc_reg_operand" "f")) ! (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && ! HONOR_SIGNED_ZEROS (SFmode)" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 4990,4996 **** (neg:SF (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "fnmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 5319,5336 ---- (neg:SF (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && HONOR_SIGNED_ZEROS (SFmode)" ! "fnmsubs %0,%1,%2,%3" ! [(set_attr "type" "fp")]) ! ! (define_insn "" ! [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (minus:SF (match_operand:SF 3 "gpc_reg_operand" "f") ! (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") ! (match_operand:SF 2 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && ! HONOR_SIGNED_ZEROS (SFmode)" "fnmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 4999,5025 **** (neg:SF (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) (define_expand "sqrtsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "")))] ! "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT" "") (define_insn "" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GPOPT && TARGET_HARD_FLOAT" "fsqrts %0,%1" [(set_attr "type" "ssqrt")]) (define_insn "" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWER2 && TARGET_HARD_FLOAT" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) --- 5339,5375 ---- (neg:SF (minus:SF (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) + (define_insn "" + [(set (match_operand:SF 0 "gpc_reg_operand" "=f") + (minus:SF (match_operand:SF 3 "gpc_reg_operand" "f") + (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") + (match_operand:SF 2 "gpc_reg_operand" "f"))))] + "! TARGET_POWERPC && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD + && ! HONOR_SIGNED_ZEROS (SFmode)" + "{fnms|fnmsub} %0,%1,%2,%3" + [(set_attr "type" "fp")]) + (define_expand "sqrtsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "")))] ! "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS" "") (define_insn "" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GPOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "fsqrts %0,%1" [(set_attr "type" "ssqrt")]) (define_insn "" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWER2 && TARGET_HARD_FLOAT && TARGET_FPRS" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) *************** *** 5033,5039 **** (match_operand:SF 2 "gpc_reg_operand" "")) (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "{ rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]); DONE;}") (define_expand "minsf3" --- 5383,5389 ---- (match_operand:SF 2 "gpc_reg_operand" "")) (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "{ rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]); DONE;}") (define_expand "minsf3" *************** *** 5042,5048 **** (match_operand:SF 2 "gpc_reg_operand" "")) (match_dup 2) (match_dup 1)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "{ rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]); DONE;}") (define_split --- 5392,5398 ---- (match_operand:SF 2 "gpc_reg_operand" "")) (match_dup 2) (match_dup 1)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "{ rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]); DONE;}") (define_split *************** *** 5050,5056 **** (match_operator:SF 3 "min_max_operator" [(match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")]))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" [(const_int 0)] " { rs6000_emit_minmax (operands[0], GET_CODE (operands[3]), --- 5400,5406 ---- (match_operator:SF 3 "min_max_operator" [(match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")]))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" [(const_int 0)] " { rs6000_emit_minmax (operands[0], GET_CODE (operands[3]), *************** *** 5058,5069 **** DONE; }") (define_expand "movsfcc" [(set (match_operand:SF 0 "gpc_reg_operand" "") (if_then_else:SF (match_operand 1 "comparison_operator" "") (match_operand:SF 2 "gpc_reg_operand" "") (match_operand:SF 3 "gpc_reg_operand" "")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" " { if (rs6000_emit_cmove (operands[0], operands[1], operands[2], operands[3])) --- 5408,5467 ---- DONE; }") + (define_expand "movsicc" + [(set (match_operand:SI 0 "gpc_reg_operand" "") + (if_then_else:SI (match_operand 1 "comparison_operator" "") + (match_operand:SI 2 "gpc_reg_operand" "") + (match_operand:SI 3 "gpc_reg_operand" "")))] + "TARGET_ISEL" + " + { + if (rs6000_emit_cmove (operands[0], operands[1], operands[2], operands[3])) + DONE; + else + FAIL; + }") + + ;; We use the BASE_REGS for the isel input operands because, if rA is + ;; 0, the value of 0 is placed in rD upon truth. Similarly for rB + ;; because we may switch the operands and rB may end up being rA. + ;; + ;; We need 2 patterns: an unsigned and a signed pattern. We could + ;; leave out the mode in operand 4 and use one pattern, but reload can + ;; change the mode underneath our feet and then gets confused trying + ;; to reload the value. + (define_insn "isel_signed" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(match_operand:CC 4 "cc_reg_operand" "y") + (const_int 0)]) + (match_operand:SI 2 "gpc_reg_operand" "b") + (match_operand:SI 3 "gpc_reg_operand" "b")))] + "TARGET_ISEL" + "* + { return output_isel (operands); }" + [(set_attr "length" "4")]) + + (define_insn "isel_unsigned" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(match_operand:CCUNS 4 "cc_reg_operand" "y") + (const_int 0)]) + (match_operand:SI 2 "gpc_reg_operand" "b") + (match_operand:SI 3 "gpc_reg_operand" "b")))] + "TARGET_ISEL" + "* + { return output_isel (operands); }" + [(set_attr "length" "4")]) + (define_expand "movsfcc" [(set (match_operand:SF 0 "gpc_reg_operand" "") (if_then_else:SF (match_operand 1 "comparison_operator" "") (match_operand:SF 2 "gpc_reg_operand" "") (match_operand:SF 3 "gpc_reg_operand" "")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" " { if (rs6000_emit_cmove (operands[0], operands[1], operands[2], operands[3])) *************** *** 5078,5084 **** (match_operand:SF 4 "zero_fp_constant" "F")) (match_operand:SF 2 "gpc_reg_operand" "f") (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 5476,5482 ---- (match_operand:SF 4 "zero_fp_constant" "F")) (match_operand:SF 2 "gpc_reg_operand" "f") (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 5088,5115 **** (match_operand:DF 4 "zero_fp_constant" "F")) (match_operand:SF 2 "gpc_reg_operand" "f") (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) (define_insn "negdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fneg %0,%1" [(set_attr "type" "fp")]) (define_insn "absdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fabs %0,%1" [(set_attr "type" "fp")]) (define_insn "" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT" "fnabs %0,%1" [(set_attr "type" "fp")]) --- 5486,5513 ---- (match_operand:DF 4 "zero_fp_constant" "F")) (match_operand:SF 2 "gpc_reg_operand" "f") (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) (define_insn "negdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fneg %0,%1" [(set_attr "type" "fp")]) (define_insn "absdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fabs %0,%1" [(set_attr "type" "fp")]) (define_insn "" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fnabs %0,%1" [(set_attr "type" "fp")]) *************** *** 5117,5123 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) --- 5515,5521 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 5125,5131 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (minus:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) --- 5523,5529 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (minus:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 5133,5139 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fm|fmul} %0,%1,%2" [(set_attr "type" "dmul")]) --- 5531,5537 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "{fm|fmul} %0,%1,%2" [(set_attr "type" "dmul")]) *************** *** 5141,5147 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (div:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "ddiv")]) --- 5539,5545 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (div:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "ddiv")]) *************** *** 5150,5156 **** (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 5548,5554 ---- (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 5159,5165 **** (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 5557,5563 ---- (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 5168,5174 **** (neg:DF (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 5566,5583 ---- (neg:DF (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && HONOR_SIGNED_ZEROS (DFmode)" ! "{fnma|fnmadd} %0,%1,%2,%3" ! [(set_attr "type" "dmul")]) ! ! (define_insn "" ! [(set (match_operand:DF 0 "gpc_reg_operand" "=f") ! (minus:DF (mult:DF (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")) ! (match_operand:DF 2 "gpc_reg_operand" "f")) ! (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && ! HONOR_SIGNED_ZEROS (DFmode)" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 5177,5190 **** (neg:DF (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT && TARGET_FUSED_MADD" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) (define_insn "sqrtdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) --- 5586,5610 ---- (neg:DF (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && HONOR_SIGNED_ZEROS (DFmode)" ! "{fnms|fnmsub} %0,%1,%2,%3" ! [(set_attr "type" "dmul")]) ! ! (define_insn "" ! [(set (match_operand:DF 0 "gpc_reg_operand" "=f") ! (minus:DF (match_operand:DF 3 "gpc_reg_operand" "f") ! (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") ! (match_operand:DF 2 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD ! && ! HONOR_SIGNED_ZEROS (DFmode)" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) (define_insn "sqrtdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) *************** *** 5197,5203 **** (match_operand:DF 2 "gpc_reg_operand" "")) (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "{ rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]); DONE;}") (define_expand "mindf3" --- 5617,5623 ---- (match_operand:DF 2 "gpc_reg_operand" "")) (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "{ rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]); DONE;}") (define_expand "mindf3" *************** *** 5206,5212 **** (match_operand:DF 2 "gpc_reg_operand" "")) (match_dup 2) (match_dup 1)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "{ rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]); DONE;}") (define_split --- 5626,5632 ---- (match_operand:DF 2 "gpc_reg_operand" "")) (match_dup 2) (match_dup 1)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "{ rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]); DONE;}") (define_split *************** *** 5214,5220 **** (match_operator:DF 3 "min_max_operator" [(match_operand:DF 1 "gpc_reg_operand" "") (match_operand:DF 2 "gpc_reg_operand" "")]))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" [(const_int 0)] " { rs6000_emit_minmax (operands[0], GET_CODE (operands[3]), --- 5634,5640 ---- (match_operator:DF 3 "min_max_operator" [(match_operand:DF 1 "gpc_reg_operand" "") (match_operand:DF 2 "gpc_reg_operand" "")]))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" [(const_int 0)] " { rs6000_emit_minmax (operands[0], GET_CODE (operands[3]), *************** *** 5227,5233 **** (if_then_else:DF (match_operand 1 "comparison_operator" "") (match_operand:DF 2 "gpc_reg_operand" "") (match_operand:DF 3 "gpc_reg_operand" "")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" " { if (rs6000_emit_cmove (operands[0], operands[1], operands[2], operands[3])) --- 5647,5653 ---- (if_then_else:DF (match_operand 1 "comparison_operator" "") (match_operand:DF 2 "gpc_reg_operand" "") (match_operand:DF 3 "gpc_reg_operand" "")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" " { if (rs6000_emit_cmove (operands[0], operands[1], operands[2], operands[3])) *************** *** 5242,5248 **** (match_operand:DF 4 "zero_fp_constant" "F")) (match_operand:DF 2 "gpc_reg_operand" "f") (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 5662,5668 ---- (match_operand:DF 4 "zero_fp_constant" "F")) (match_operand:DF 2 "gpc_reg_operand" "f") (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 5258,5263 **** --- 5678,5695 ---- ;; Conversions to and from floating-point. + (define_expand "fixunssfsi2" + [(set (match_operand:SI 0 "gpc_reg_operand" "") + (unsigned_fix:SI (fix:SF (match_operand:SF 1 "gpc_reg_operand" ""))))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "") + + (define_expand "fix_truncsfsi2" + [(set (match_operand:SI 0 "gpc_reg_operand" "") + (fix:SI (match_operand:SF 1 "gpc_reg_operand" "")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "") + ; For each of these conversions, there is a define_expand, a define_insn ; with a '#' template, and a define_split (with C code). The idea is ; to allow constant folding with the template of the define_insn, *************** *** 5271,5277 **** (clobber (match_dup 4)) (clobber (match_dup 5)) (clobber (match_dup 6))])] ! "TARGET_HARD_FLOAT" " { if (TARGET_POWERPC64) --- 5703,5709 ---- (clobber (match_dup 4)) (clobber (match_dup 5)) (clobber (match_dup 6))])] ! "TARGET_HARD_FLOAT && TARGET_FPRS" " { if (TARGET_POWERPC64) *************** *** 5284,5290 **** } operands[2] = force_reg (SImode, GEN_INT (0x43300000)); ! operands[3] = force_reg (DFmode, rs6000_float_const (\"4503601774854144\", DFmode)); operands[4] = assign_stack_temp (DFmode, GET_MODE_SIZE (DFmode), 0); operands[5] = gen_reg_rtx (DFmode); operands[6] = gen_reg_rtx (SImode); --- 5716,5722 ---- } operands[2] = force_reg (SImode, GEN_INT (0x43300000)); ! operands[3] = force_reg (DFmode, CONST_DOUBLE_ATOF (\"4503601774854144\", DFmode)); operands[4] = assign_stack_temp (DFmode, GET_MODE_SIZE (DFmode), 0); operands[5] = gen_reg_rtx (DFmode); operands[6] = gen_reg_rtx (SImode); *************** *** 5298,5304 **** (clobber (match_operand:DF 4 "memory_operand" "=o")) (clobber (match_operand:DF 5 "gpc_reg_operand" "=f")) (clobber (match_operand:SI 6 "gpc_reg_operand" "=r"))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT" "#" [(set_attr "length" "24")]) --- 5730,5736 ---- (clobber (match_operand:DF 4 "memory_operand" "=o")) (clobber (match_operand:DF 5 "gpc_reg_operand" "=f")) (clobber (match_operand:SI 6 "gpc_reg_operand" "=r"))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" "#" [(set_attr "length" "24")]) *************** *** 5310,5316 **** (clobber (match_operand:DF 4 "offsettable_mem_operand" "")) (clobber (match_operand:DF 5 "gpc_reg_operand" "")) (clobber (match_operand:SI 6 "gpc_reg_operand" ""))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT" [(set (match_operand:DF 0 "gpc_reg_operand" "") (float:DF (match_operand:SI 1 "gpc_reg_operand" ""))) (use (match_operand:SI 2 "gpc_reg_operand" "")) --- 5742,5748 ---- (clobber (match_operand:DF 4 "offsettable_mem_operand" "")) (clobber (match_operand:DF 5 "gpc_reg_operand" "")) (clobber (match_operand:SI 6 "gpc_reg_operand" ""))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" [(set (match_operand:DF 0 "gpc_reg_operand" "") (float:DF (match_operand:SI 1 "gpc_reg_operand" ""))) (use (match_operand:SI 2 "gpc_reg_operand" "")) *************** *** 5340,5345 **** --- 5772,5783 ---- DONE; }") + (define_expand "floatunssisf2" + [(set (match_operand:SF 0 "gpc_reg_operand" "") + (unsigned_float:SF (match_operand:SI 1 "gpc_reg_operand" "")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "") + (define_expand "floatunssidf2" [(parallel [(set (match_operand:DF 0 "gpc_reg_operand" "") (unsigned_float:DF (match_operand:SI 1 "gpc_reg_operand" ""))) *************** *** 5347,5353 **** (use (match_dup 3)) (clobber (match_dup 4)) (clobber (match_dup 5))])] ! "TARGET_HARD_FLOAT" " { if (TARGET_POWERPC64) --- 5785,5791 ---- (use (match_dup 3)) (clobber (match_dup 4)) (clobber (match_dup 5))])] ! "TARGET_HARD_FLOAT && TARGET_FPRS" " { if (TARGET_POWERPC64) *************** *** 5361,5367 **** } operands[2] = force_reg (SImode, GEN_INT (0x43300000)); ! operands[3] = force_reg (DFmode, rs6000_float_const (\"4503599627370496\", DFmode)); operands[4] = assign_stack_temp (DFmode, GET_MODE_SIZE (DFmode), 0); operands[5] = gen_reg_rtx (DFmode); }") --- 5799,5805 ---- } operands[2] = force_reg (SImode, GEN_INT (0x43300000)); ! operands[3] = force_reg (DFmode, CONST_DOUBLE_ATOF (\"4503599627370496\", DFmode)); operands[4] = assign_stack_temp (DFmode, GET_MODE_SIZE (DFmode), 0); operands[5] = gen_reg_rtx (DFmode); }") *************** *** 5373,5379 **** (use (match_operand:DF 3 "gpc_reg_operand" "f")) (clobber (match_operand:DF 4 "memory_operand" "=o")) (clobber (match_operand:DF 5 "gpc_reg_operand" "=f"))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT" "#" [(set_attr "length" "20")]) --- 5811,5817 ---- (use (match_operand:DF 3 "gpc_reg_operand" "f")) (clobber (match_operand:DF 4 "memory_operand" "=o")) (clobber (match_operand:DF 5 "gpc_reg_operand" "=f"))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" "#" [(set_attr "length" "20")]) *************** *** 5384,5390 **** (use (match_operand:DF 3 "gpc_reg_operand" "")) (clobber (match_operand:DF 4 "offsettable_mem_operand" "")) (clobber (match_operand:DF 5 "gpc_reg_operand" ""))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT" [(set (match_operand:DF 0 "gpc_reg_operand" "") (unsigned_float:DF (match_operand:SI 1 "gpc_reg_operand" ""))) (use (match_operand:SI 2 "gpc_reg_operand" "")) --- 5822,5828 ---- (use (match_operand:DF 3 "gpc_reg_operand" "")) (clobber (match_operand:DF 4 "offsettable_mem_operand" "")) (clobber (match_operand:DF 5 "gpc_reg_operand" ""))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" [(set (match_operand:DF 0 "gpc_reg_operand" "") (unsigned_float:DF (match_operand:SI 1 "gpc_reg_operand" ""))) (use (match_operand:SI 2 "gpc_reg_operand" "")) *************** *** 5416,5422 **** (fix:SI (match_operand:DF 1 "gpc_reg_operand" ""))) (clobber (match_dup 2)) (clobber (match_dup 3))])] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT" " { operands[2] = gen_reg_rtx (DImode); --- 5854,5860 ---- (fix:SI (match_operand:DF 1 "gpc_reg_operand" ""))) (clobber (match_dup 2)) (clobber (match_dup 3))])] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS" " { operands[2] = gen_reg_rtx (DImode); *************** *** 5426,5434 **** (define_insn "*fix_truncdfsi2_internal" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))) ! (clobber (match_operand:DI 2 "gpc_reg_operand" "=*f")) (clobber (match_operand:DI 3 "memory_operand" "=o"))] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT" "#" [(set_attr "length" "16")]) --- 5864,5872 ---- (define_insn "*fix_truncdfsi2_internal" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))) ! (clobber (match_operand:DI 2 "gpc_reg_operand" "=f")) (clobber (match_operand:DI 3 "memory_operand" "=o"))] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS" "#" [(set_attr "length" "16")]) *************** *** 5437,5443 **** (fix:SI (match_operand:DF 1 "gpc_reg_operand" ""))) (clobber (match_operand:DI 2 "gpc_reg_operand" "")) (clobber (match_operand:DI 3 "offsettable_mem_operand" ""))] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT" [(set (match_operand:SI 0 "gpc_reg_operand" "") (fix:SI (match_operand:DF 1 "gpc_reg_operand" ""))) (clobber (match_operand:DI 2 "gpc_reg_operand" "")) --- 5875,5881 ---- (fix:SI (match_operand:DF 1 "gpc_reg_operand" ""))) (clobber (match_operand:DI 2 "gpc_reg_operand" "")) (clobber (match_operand:DI 3 "offsettable_mem_operand" ""))] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS" [(set (match_operand:SI 0 "gpc_reg_operand" "") (fix:SI (match_operand:DF 1 "gpc_reg_operand" ""))) (clobber (match_operand:DI 2 "gpc_reg_operand" "")) *************** *** 5464,5477 **** (define_insn "fctiwz" [(set (match_operand:DI 0 "gpc_reg_operand" "=*f") (unspec:DI [(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))] 10))] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT" "{fcirz|fctiwz} %0,%1" [(set_attr "type" "fp")]) (define_insn "floatdidf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float:DF (match_operand:DI 1 "gpc_reg_operand" "*f")))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT" "fcfid %0,%1" [(set_attr "type" "fp")]) --- 5902,5921 ---- (define_insn "fctiwz" [(set (match_operand:DI 0 "gpc_reg_operand" "=*f") (unspec:DI [(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))] 10))] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS" "{fcirz|fctiwz} %0,%1" [(set_attr "type" "fp")]) + (define_expand "floatsisf2" + [(set (match_operand:SF 0 "gpc_reg_operand" "") + (float:SF (match_operand:SI 1 "gpc_reg_operand" "")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "") + (define_insn "floatdidf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float:DF (match_operand:DI 1 "gpc_reg_operand" "*f")))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" "fcfid %0,%1" [(set_attr "type" "fp")]) *************** *** 5481,5487 **** (clobber (match_operand:DI 2 "memory_operand" "=o")) (clobber (match_operand:DI 3 "gpc_reg_operand" "=r")) (clobber (match_operand:DI 4 "gpc_reg_operand" "=f"))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT" "#" "" [(set (match_dup 3) (sign_extend:DI (match_dup 1))) --- 5925,5931 ---- (clobber (match_operand:DI 2 "memory_operand" "=o")) (clobber (match_operand:DI 3 "gpc_reg_operand" "=r")) (clobber (match_operand:DI 4 "gpc_reg_operand" "=f"))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" "#" "" [(set (match_dup 3) (sign_extend:DI (match_dup 1))) *************** *** 5496,5502 **** (clobber (match_operand:DI 2 "memory_operand" "=o")) (clobber (match_operand:DI 3 "gpc_reg_operand" "=r")) (clobber (match_operand:DI 4 "gpc_reg_operand" "=f"))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT" "#" "" [(set (match_dup 3) (zero_extend:DI (match_dup 1))) --- 5940,5946 ---- (clobber (match_operand:DI 2 "memory_operand" "=o")) (clobber (match_operand:DI 3 "gpc_reg_operand" "=r")) (clobber (match_operand:DI 4 "gpc_reg_operand" "=f"))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" "#" "" [(set (match_dup 3) (zero_extend:DI (match_dup 1))) *************** *** 5508,5516 **** (define_insn "fix_truncdfdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=*f") (fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT" "fctidz %0,%1" [(set_attr "type" "fp")]) ;; Define the DImode operations that can be done in a small number ;; of instructions. The & constraints are to prevent the register --- 5952,6023 ---- (define_insn "fix_truncdfdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=*f") (fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" "fctidz %0,%1" [(set_attr "type" "fp")]) + + (define_expand "floatdisf2" + [(set (match_operand:SF 0 "gpc_reg_operand" "") + (float:SF (match_operand:DI 1 "gpc_reg_operand" "")))] + "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" + " + { + if (!flag_unsafe_math_optimizations) + { + rtx label = gen_label_rtx (); + emit_insn (gen_floatdisf2_internal2 (operands[1], label)); + emit_label (label); + } + emit_insn (gen_floatdisf2_internal1 (operands[0], operands[1])); + DONE; + }") + + ;; This is not IEEE compliant if rounding mode is "round to nearest". + ;; If the DI->DF conversion is inexact, then it's possible to suffer + ;; from double rounding. + (define_insn_and_split "floatdisf2_internal1" + [(set (match_operand:SF 0 "gpc_reg_operand" "=f") + (float:SF (match_operand:DI 1 "gpc_reg_operand" "*f"))) + (clobber (match_scratch:DF 2 "=f"))] + "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" + "#" + "&& reload_completed" + [(set (match_dup 2) + (float:DF (match_dup 1))) + (set (match_dup 0) + (float_truncate:SF (match_dup 2)))] + "") + + ;; Twiddles bits to avoid double rounding. + ;; Bits that might be trucated when converting to DFmode are replaced + ;; by a bit that won't be lost at that stage, but is below the SFmode + ;; rounding position. + (define_expand "floatdisf2_internal2" + [(parallel [(set (match_dup 4) + (compare:CC (and:DI (match_operand:DI 0 "" "") + (const_int 2047)) + (const_int 0))) + (set (match_dup 2) (and:DI (match_dup 0) (const_int 2047))) + (clobber (match_scratch:CC 7 ""))]) + (set (match_dup 3) (ashiftrt:DI (match_dup 0) (const_int 53))) + (set (match_dup 3) (plus:DI (match_dup 3) (const_int 1))) + (set (pc) (if_then_else (eq (match_dup 4) (const_int 0)) + (label_ref (match_operand:DI 1 "" "")) + (pc))) + (set (match_dup 5) (compare:CCUNS (match_dup 3) (const_int 2))) + (set (pc) (if_then_else (ltu (match_dup 5) (const_int 0)) + (label_ref (match_dup 1)) + (pc))) + (set (match_dup 0) (xor:DI (match_dup 0) (match_dup 2))) + (set (match_dup 0) (ior:DI (match_dup 0) (const_int 2048)))] + "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS" + " + { + operands[2] = gen_reg_rtx (DImode); + operands[3] = gen_reg_rtx (DImode); + operands[4] = gen_reg_rtx (CCmode); + operands[5] = gen_reg_rtx (CCUNSmode); + }") ;; Define the DImode operations that can be done in a small number ;; of instructions. The & constraints are to prevent the register *************** *** 5838,5843 **** --- 6345,6360 ---- {srai|srawi} %0,%1,31\;{srai|srawi} %L0,%1,%h2 sraiq %0,%1,%h2\;srliq %L0,%L1,%h2" [(set_attr "length" "8")]) + + (define_insn "ashrdi3_no_power" + [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,&r") + (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") + (match_operand:SI 2 "const_int_operand" "M,i")))] + "TARGET_32BIT && !TARGET_POWER" + "@ + {srai|srawi} %0,%1,31\;{srai|srawi} %L0,%1,%h2 + {sri|srwi} %L0,%L1,%h2\;insrwi %L0,%1,%h2,0\;{srai|srawi} %0,%1,%h2" + [(set_attr "length" "8,12")]) ;; PowerPC64 DImode operations. *************** *** 5861,5867 **** ? operands[0] : gen_reg_rtx (DImode)); HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = (val & 0xffff) - 2 * (val & 0x8000); HOST_WIDE_INT rest = trunc_int_for_mode (val - low, DImode); if (!CONST_OK_FOR_LETTER_P (rest, 'L')) --- 6378,6384 ---- ? operands[0] : gen_reg_rtx (DImode)); HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000; HOST_WIDE_INT rest = trunc_int_for_mode (val - low, DImode); if (!CONST_OK_FOR_LETTER_P (rest, 'L')) *************** *** 5964,5970 **** " { HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = (val & 0xffff) - 2 * (val & 0x8000); HOST_WIDE_INT rest = trunc_int_for_mode (val - low, DImode); operands[4] = GEN_INT (low); --- 6481,6487 ---- " { HOST_WIDE_INT val = INTVAL (operands[2]); ! HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000; HOST_WIDE_INT rest = trunc_int_for_mode (val - low, DImode); operands[4] = GEN_INT (low); *************** *** 6119,6155 **** } }") ! (define_insn "absdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,r") ! (abs:DI (match_operand:DI 1 "gpc_reg_operand" "r,0"))) (clobber (match_scratch:DI 2 "=&r,&r"))] "TARGET_POWERPC64" ! "sradi %2,%1,63\;xor %0,%2,%1\;subf %0,%2,%0" ! [(set_attr "length" "12")]) ! ! (define_split ! [(set (match_operand:DI 0 "gpc_reg_operand" "") ! (abs:DI (match_operand:DI 1 "gpc_reg_operand" ""))) ! (clobber (match_scratch:DI 2 ""))] ! "TARGET_POWERPC64 && reload_completed" [(set (match_dup 2) (ashiftrt:DI (match_dup 1) (const_int 63))) (set (match_dup 0) (xor:DI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:DI (match_dup 0) (match_dup 2)))] "") ! (define_insn "*nabsdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,r") ! (neg:DI (abs:DI (match_operand:DI 1 "gpc_reg_operand" "r,0")))) (clobber (match_scratch:DI 2 "=&r,&r"))] "TARGET_POWERPC64" ! "sradi %2,%1,63\;xor %0,%2,%1\;subf %0,%0,%2" ! [(set_attr "length" "12")]) ! ! (define_split ! [(set (match_operand:DI 0 "gpc_reg_operand" "") ! (neg:DI (abs:DI (match_operand:DI 1 "gpc_reg_operand" "")))) ! (clobber (match_scratch:DI 2 ""))] ! "TARGET_POWERPC64 && reload_completed" [(set (match_dup 2) (ashiftrt:DI (match_dup 1) (const_int 63))) (set (match_dup 0) (xor:DI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:DI (match_dup 2) (match_dup 0)))] --- 6636,6660 ---- } }") ! (define_insn_and_split "absdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,r") ! (abs:DI (match_operand:DI 1 "gpc_reg_operand" "r,0"))) (clobber (match_scratch:DI 2 "=&r,&r"))] "TARGET_POWERPC64" ! "#" ! "&& reload_completed" [(set (match_dup 2) (ashiftrt:DI (match_dup 1) (const_int 63))) (set (match_dup 0) (xor:DI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:DI (match_dup 0) (match_dup 2)))] "") ! (define_insn_and_split "*nabsdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,r") ! (neg:DI (abs:DI (match_operand:DI 1 "gpc_reg_operand" "r,0")))) (clobber (match_scratch:DI 2 "=&r,&r"))] "TARGET_POWERPC64" ! "#" ! "&& reload_completed" [(set (match_dup 2) (ashiftrt:DI (match_dup 1) (const_int 63))) (set (match_dup 0) (xor:DI (match_dup 2) (match_dup 1))) (set (match_dup 0) (minus:DI (match_dup 2) (match_dup 0)))] *************** *** 6445,6451 **** [(set (match_operand:DI 0 "gpc_reg_operand" "=r") (and:DI (rotate:DI (match_operand:DI 1 "gpc_reg_operand" "r") (match_operand:DI 2 "reg_or_cint_operand" "ri")) ! (match_operand:DI 3 "mask64_operand" "S")))] "TARGET_POWERPC64" "rld%I2c%B3 %0,%1,%H2,%S3") --- 6950,6956 ---- [(set (match_operand:DI 0 "gpc_reg_operand" "=r") (and:DI (rotate:DI (match_operand:DI 1 "gpc_reg_operand" "r") (match_operand:DI 2 "reg_or_cint_operand" "ri")) ! (match_operand:DI 3 "mask64_operand" "n")))] "TARGET_POWERPC64" "rld%I2c%B3 %0,%1,%H2,%S3") *************** *** 6454,6460 **** (compare:CC (and:DI (rotate:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:DI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:DI 3 "mask64_operand" "S,S")) (const_int 0))) (clobber (match_scratch:DI 4 "=r,r"))] "TARGET_POWERPC64" --- 6959,6965 ---- (compare:CC (and:DI (rotate:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:DI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:DI 3 "mask64_operand" "n,n")) (const_int 0))) (clobber (match_scratch:DI 4 "=r,r"))] "TARGET_POWERPC64" *************** *** 6487,6493 **** (compare:CC (and:DI (rotate:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:DI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:DI 3 "mask64_operand" "S,S")) (const_int 0))) (set (match_operand:DI 0 "gpc_reg_operand" "=r,r") (and:DI (rotate:DI (match_dup 1) (match_dup 2)) (match_dup 3)))] --- 6992,6998 ---- (compare:CC (and:DI (rotate:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:DI 2 "reg_or_cint_operand" "ri,ri")) ! (match_operand:DI 3 "mask64_operand" "n,n")) (const_int 0))) (set (match_operand:DI 0 "gpc_reg_operand" "=r,r") (and:DI (rotate:DI (match_dup 1) (match_dup 2)) (match_dup 3)))] *************** *** 6902,6908 **** [(set (match_operand:DI 0 "gpc_reg_operand" "=r") (and:DI (ashift:DI (match_operand:DI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) ! (match_operand:DI 3 "mask64_operand" "S")))] "TARGET_POWERPC64 && includes_rldicr_lshift_p (operands[2], operands[3])" "rldicr %0,%1,%H2,%S3") --- 7407,7413 ---- [(set (match_operand:DI 0 "gpc_reg_operand" "=r") (and:DI (ashift:DI (match_operand:DI 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) ! (match_operand:DI 3 "mask64_operand" "n")))] "TARGET_POWERPC64 && includes_rldicr_lshift_p (operands[2], operands[3])" "rldicr %0,%1,%H2,%S3") *************** *** 6911,6917 **** (compare:CC (and:DI (ashift:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:DI 3 "mask64_operand" "S,S")) (const_int 0))) (clobber (match_scratch:DI 4 "=r,r"))] "TARGET_POWERPC64 && includes_rldicr_lshift_p (operands[2], operands[3])" --- 7416,7422 ---- (compare:CC (and:DI (ashift:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:DI 3 "mask64_operand" "n,n")) (const_int 0))) (clobber (match_scratch:DI 4 "=r,r"))] "TARGET_POWERPC64 && includes_rldicr_lshift_p (operands[2], operands[3])" *************** *** 6944,6950 **** (compare:CC (and:DI (ashift:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:DI 3 "mask64_operand" "S,S")) (const_int 0))) (set (match_operand:DI 0 "gpc_reg_operand" "=r,r") (and:DI (ashift:DI (match_dup 1) (match_dup 2)) (match_dup 3)))] --- 7449,7455 ---- (compare:CC (and:DI (ashift:DI (match_operand:DI 1 "gpc_reg_operand" "r,r") (match_operand:SI 2 "const_int_operand" "i,i")) ! (match_operand:DI 3 "mask64_operand" "n,n")) (const_int 0))) (set (match_operand:DI 0 "gpc_reg_operand" "=r,r") (and:DI (ashift:DI (match_dup 1) (match_dup 2)) (match_dup 3)))] *************** *** 7059,7065 **** [(set (match_operand:DI 0 "gpc_reg_operand" "") (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "") (match_operand:SI 2 "reg_or_cint_operand" "")))] ! "TARGET_POWERPC64 || TARGET_POWER" " { if (TARGET_POWERPC64) --- 7564,7570 ---- [(set (match_operand:DI 0 "gpc_reg_operand" "") (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "") (match_operand:SI 2 "reg_or_cint_operand" "")))] ! "" " { if (TARGET_POWERPC64) *************** *** 7069,7074 **** --- 7574,7584 ---- emit_insn (gen_ashrdi3_power (operands[0], operands[1], operands[2])); DONE; } + else if (TARGET_32BIT && GET_CODE (operands[2]) == CONST_INT) + { + emit_insn (gen_ashrdi3_no_power (operands[0], operands[1], operands[2])); + DONE; + } else FAIL; }") *************** *** 7137,7160 **** "") (define_insn "anddi3" ! [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r,r") ! (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r") ! (match_operand:DI 2 "and64_operand" "?r,S,K,J"))) ! (clobber (match_scratch:CC 3 "=X,X,x,x"))] "TARGET_POWERPC64" "@ and %0,%1,%2 rldic%B2 %0,%1,0,%S2 andi. %0,%1,%b2 ! andis. %0,%1,%u2") (define_insn "*anddi3_internal2" ! [(set (match_operand:CC 0 "cc_reg_operand" "=x,x,x,x,?y,?y,??y,??y") ! (compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,") ! (match_operand:DI 2 "and64_operand" "r,S,K,J,r,S,K,J")) (const_int 0))) ! (clobber (match_scratch:DI 3 "=r,r,r,r,r,r,r,r")) ! (clobber (match_scratch:CC 4 "=X,X,X,X,X,X,x,x"))] "TARGET_POWERPC64" "@ and. %3,%1,%2 --- 7647,7693 ---- "") (define_insn "anddi3" ! [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r,r,r") ! (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r,r") ! (match_operand:DI 2 "and64_2_operand" "?r,S,K,J,t"))) ! (clobber (match_scratch:CC 3 "=X,X,x,x,X"))] "TARGET_POWERPC64" "@ and %0,%1,%2 rldic%B2 %0,%1,0,%S2 andi. %0,%1,%b2 ! andis. %0,%1,%u2 ! #" ! [(set_attr "length" "4,4,4,4,8")]) ! ! (define_split ! [(set (match_operand:DI 0 "gpc_reg_operand" "") ! (and:DI (match_operand:DI 1 "gpc_reg_operand" "") ! (match_operand:DI 2 "mask64_2_operand" ""))) ! (clobber (match_scratch:CC 3 ""))] ! "TARGET_POWERPC64 ! && (fixed_regs[CR0_REGNO] || !logical_operand (operands[2], DImode)) ! && !mask64_operand (operands[2], DImode)" ! [(set (match_dup 0) ! (and:DI (rotate:DI (match_dup 1) ! (match_dup 4)) ! (match_dup 5))) ! (set (match_dup 0) ! (and:DI (rotate:DI (match_dup 0) ! (match_dup 6)) ! (match_dup 7)))] ! " ! { ! build_mask64_2_operands (operands[2], &operands[4]); ! }") (define_insn "*anddi3_internal2" ! [(set (match_operand:CC 0 "cc_reg_operand" "=x,x,x,x,x,?y,?y,??y,??y,?y") ! (compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,r,r,r") ! (match_operand:DI 2 "and64_2_operand" "r,S,K,J,t,r,S,K,J,t")) (const_int 0))) ! (clobber (match_scratch:DI 3 "=r,r,r,r,r,r,r,r,r,r")) ! (clobber (match_scratch:CC 4 "=X,X,X,X,X,X,X,x,x,X"))] "TARGET_POWERPC64" "@ and. %3,%1,%2 *************** *** 7164,7172 **** # # # #" ! [(set_attr "type" "compare,delayed_compare,compare,compare,compare,delayed_compare,compare,compare") ! (set_attr "length" "4,4,4,4,8,8,8,8")]) (define_split [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "") --- 7697,7707 ---- # # # + # + # #" ! [(set_attr "type" "compare,delayed_compare,compare,compare,delayed_compare,compare,compare,compare,compare,compare") ! (set_attr "length" "4,4,4,4,8,8,8,8,8,12")]) (define_split [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "") *************** *** 7185,7198 **** (const_int 0)))] "") (define_insn "*anddi3_internal3" ! [(set (match_operand:CC 3 "cc_reg_operand" "=x,x,x,x,?y,?y,??y,??y") ! (compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,r") ! (match_operand:DI 2 "and64_operand" "r,S,K,J,r,S,K,J")) (const_int 0))) ! (set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r,r,r,r,r,r") (and:DI (match_dup 1) (match_dup 2))) ! (clobber (match_scratch:CC 4 "=X,X,X,X,X,X,x,x"))] "TARGET_POWERPC64" "@ and. %0,%1,%2 --- 7720,7758 ---- (const_int 0)))] "") + (define_split + [(set (match_operand:CC 0 "cc_reg_operand" "") + (compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "") + (match_operand:DI 2 "mask64_2_operand" "")) + (const_int 0))) + (clobber (match_scratch:DI 3 "")) + (clobber (match_scratch:CC 4 ""))] + "TARGET_POWERPC64 && reload_completed + && (fixed_regs[CR0_REGNO] || !logical_operand (operands[2], DImode)) + && !mask64_operand (operands[2], DImode)" + [(set (match_dup 3) + (and:DI (rotate:DI (match_dup 1) + (match_dup 5)) + (match_dup 6))) + (parallel [(set (match_dup 0) + (compare:CC (and:DI (rotate:DI (match_dup 3) + (match_dup 7)) + (match_dup 8)) + (const_int 0))) + (clobber (match_dup 3))])] + " + { + build_mask64_2_operands (operands[2], &operands[5]); + }") + (define_insn "*anddi3_internal3" ! [(set (match_operand:CC 3 "cc_reg_operand" "=x,x,x,x,x,?y,?y,??y,??y,?y") ! (compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r,r,r,r,r,r,r") ! (match_operand:DI 2 "and64_2_operand" "r,S,K,J,t,r,S,K,J,t")) (const_int 0))) ! (set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r,r,r,r,r,r,r,r") (and:DI (match_dup 1) (match_dup 2))) ! (clobber (match_scratch:CC 4 "=X,X,X,X,X,X,X,x,x,X"))] "TARGET_POWERPC64" "@ and. %0,%1,%2 *************** *** 7202,7210 **** # # # #" ! [(set_attr "type" "compare,delayed_compare,compare,compare,compare,delayed_compare,compare,compare") ! (set_attr "length" "4,4,4,4,8,8,8,8")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") --- 7762,7772 ---- # # # + # + # #" ! [(set_attr "type" "compare,delayed_compare,compare,compare,delayed_compare,compare,compare,compare,compare,compare") ! (set_attr "length" "4,4,4,4,8,8,8,8,8,12")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") *************** *** 7223,7228 **** --- 7785,7819 ---- (const_int 0)))] "") + (define_split + [(set (match_operand:CC 3 "cc_reg_operand" "") + (compare:CC (and:DI (match_operand:DI 1 "gpc_reg_operand" "") + (match_operand:DI 2 "mask64_2_operand" "")) + (const_int 0))) + (set (match_operand:DI 0 "gpc_reg_operand" "") + (and:DI (match_dup 1) (match_dup 2))) + (clobber (match_scratch:CC 4 ""))] + "TARGET_POWERPC64 && reload_completed + && (fixed_regs[CR0_REGNO] || !logical_operand (operands[2], DImode)) + && !mask64_operand (operands[2], DImode)" + [(set (match_dup 0) + (and:DI (rotate:DI (match_dup 1) + (match_dup 5)) + (match_dup 6))) + (parallel [(set (match_dup 3) + (compare:CC (and:DI (rotate:DI (match_dup 0) + (match_dup 7)) + (match_dup 8)) + (const_int 0))) + (set (match_dup 0) + (and:DI (rotate:DI (match_dup 0) + (match_dup 7)) + (match_dup 8)))])] + " + { + build_mask64_2_operands (operands[2], &operands[5]); + }") + (define_expand "iordi3" [(set (match_operand:DI 0 "gpc_reg_operand" "") (ior:DI (match_operand:DI 1 "gpc_reg_operand" "") *************** *** 7622,7628 **** (define_insn "movsi_low" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ! (mem:SI (lo_sum:SI (match_operand:SI 1 "register_operand" "b") (match_operand 2 "" ""))))] "TARGET_MACHO && ! TARGET_64BIT" "{l|lwz} %0,lo16(%2)(%1)" --- 8213,8219 ---- (define_insn "movsi_low" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ! (mem:SI (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b") (match_operand 2 "" ""))))] "TARGET_MACHO && ! TARGET_64BIT" "{l|lwz} %0,lo16(%2)(%1)" *************** *** 7630,7636 **** (set_attr "length" "4")]) (define_insn "movsi_low_st" ! [(set (mem:SI (lo_sum:SI (match_operand:SI 1 "register_operand" "b") (match_operand 2 "" ""))) (match_operand:SI 0 "gpc_reg_operand" "r"))] "TARGET_MACHO && ! TARGET_64BIT" --- 8221,8227 ---- (set_attr "length" "4")]) (define_insn "movsi_low_st" ! [(set (mem:SI (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b") (match_operand 2 "" ""))) (match_operand:SI 0 "gpc_reg_operand" "r"))] "TARGET_MACHO && ! TARGET_64BIT" *************** *** 7640,7648 **** (define_insn "movdf_low" [(set (match_operand:DF 0 "gpc_reg_operand" "=f,!r") ! (mem:DF (lo_sum:SI (match_operand:SI 1 "register_operand" "b,b") (match_operand 2 "" ""))))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && ! TARGET_64BIT" "* { switch (which_alternative) --- 8231,8239 ---- (define_insn "movdf_low" [(set (match_operand:DF 0 "gpc_reg_operand" "=f,!r") ! (mem:DF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,b") (match_operand 2 "" ""))))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_64BIT" "* { switch (which_alternative) *************** *** 7670,7688 **** (set_attr "length" "4,12")]) (define_insn "movdf_low_st" ! [(set (mem:DF (lo_sum:SI (match_operand:SI 1 "register_operand" "b") (match_operand 2 "" ""))) (match_operand:DF 0 "gpc_reg_operand" "f"))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && ! TARGET_64BIT" "stfd %0,lo16(%2)(%1)" [(set_attr "type" "store") (set_attr "length" "4")]) (define_insn "movsf_low" [(set (match_operand:SF 0 "gpc_reg_operand" "=f,!r") ! (mem:SF (lo_sum:SI (match_operand:SI 1 "register_operand" "b,b") (match_operand 2 "" ""))))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && ! TARGET_64BIT" "@ lfs %0,lo16(%2)(%1) {l|lwz} %0,lo16(%2)(%1)" --- 8261,8279 ---- (set_attr "length" "4,12")]) (define_insn "movdf_low_st" ! [(set (mem:DF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b") (match_operand 2 "" ""))) (match_operand:DF 0 "gpc_reg_operand" "f"))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_64BIT" "stfd %0,lo16(%2)(%1)" [(set_attr "type" "store") (set_attr "length" "4")]) (define_insn "movsf_low" [(set (match_operand:SF 0 "gpc_reg_operand" "=f,!r") ! (mem:SF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,b") (match_operand 2 "" ""))))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_64BIT" "@ lfs %0,lo16(%2)(%1) {l|lwz} %0,lo16(%2)(%1)" *************** *** 7690,7699 **** (set_attr "length" "4")]) (define_insn "movsf_low_st" ! [(set (mem:SF (lo_sum:SI (match_operand:SI 1 "register_operand" "b,b") (match_operand 2 "" ""))) (match_operand:SF 0 "gpc_reg_operand" "f,!r"))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && ! TARGET_64BIT" "@ stfs %0,lo16(%2)(%1) {st|stw} %0,lo16(%2)(%1)" --- 8281,8290 ---- (set_attr "length" "4")]) (define_insn "movsf_low_st" ! [(set (mem:SF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,b") (match_operand 2 "" ""))) (match_operand:SF 0 "gpc_reg_operand" "f,!r"))] ! "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_64BIT" "@ stfs %0,lo16(%2)(%1) {st|stw} %0,lo16(%2)(%1)" *************** *** 7718,7724 **** mt%0 %1 mt%0 %1 mt%0 %1 ! cror 0,0,0" [(set_attr "type" "*,*,load,store,*,*,*,*,*,*,mtjmpr,*,*") (set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4")]) --- 8309,8315 ---- mt%0 %1 mt%0 %1 mt%0 %1 ! {cror 0,0,0|nop}" [(set_attr "type" "*,*,load,store,*,*,*,*,*,*,mtjmpr,*,*") (set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4")]) *************** *** 7736,7744 **** (ior:SI (match_dup 0) (match_dup 3)))] " ! { ! operands[2] = GEN_INT (INTVAL (operands[1]) & (~ (HOST_WIDE_INT) 0xffff)); ! operands[3] = GEN_INT (INTVAL (operands[1]) & 0xffff); }") (define_insn "*movsi_internal2" --- 8327,8338 ---- (ior:SI (match_dup 0) (match_dup 3)))] " ! { rtx tem = rs6000_emit_set_const (operands[0], SImode, operands[1], 2); ! ! if (tem == operands[0]) ! DONE; ! else ! FAIL; }") (define_insn "*movsi_internal2" *************** *** 7771,7777 **** "" "{ rs6000_emit_move (operands[0], operands[1], HImode); DONE; }") ! (define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r,r,*q,*c*l,*h") (match_operand:HI 1 "input_operand" "r,m,r,i,*h,r,r,0"))] "gpc_reg_operand (operands[0], HImode) --- 8365,8371 ---- "" "{ rs6000_emit_move (operands[0], operands[1], HImode); DONE; }") ! (define_insn "*movhi_internal" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r,r,*q,*c*l,*h") (match_operand:HI 1 "input_operand" "r,m,r,i,*h,r,r,0"))] "gpc_reg_operand (operands[0], HImode) *************** *** 7784,7790 **** mf%1 %0 mt%0 %1 mt%0 %1 ! cror 0,0,0" [(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")]) (define_expand "movqi" --- 8378,8384 ---- mf%1 %0 mt%0 %1 mt%0 %1 ! {cror 0,0,0|nop}" [(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")]) (define_expand "movqi" *************** *** 7793,7799 **** "" "{ rs6000_emit_move (operands[0], operands[1], QImode); DONE; }") ! (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m,r,r,*q,*c*l,*h") (match_operand:QI 1 "input_operand" "r,m,r,i,*h,r,r,0"))] "gpc_reg_operand (operands[0], QImode) --- 8387,8393 ---- "" "{ rs6000_emit_move (operands[0], operands[1], QImode); DONE; }") ! (define_insn "*movqi_internal" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m,r,r,*q,*c*l,*h") (match_operand:QI 1 "input_operand" "r,m,r,i,*h,r,r,0"))] "gpc_reg_operand (operands[0], QImode) *************** *** 7806,7812 **** mf%1 %0 mt%0 %1 mt%0 %1 ! cror 0,0,0" [(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")]) ;; Here is how to move condition codes around. When we store CC data in --- 8400,8406 ---- mf%1 %0 mt%0 %1 mt%0 %1 ! {cror 0,0,0|nop}" [(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")]) ;; Here is how to move condition codes around. When we store CC data in *************** *** 7818,7826 **** "" "") ! (define_insn "" ! [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,y,r,r,r,r,m") ! (match_operand:CC 1 "nonimmediate_operand" "y,r,r,x,y,r,m,r"))] "register_operand (operands[0], CCmode) || register_operand (operands[1], CCmode)" "@ --- 8412,8420 ---- "" "") ! (define_insn "*movcc_internal1" ! [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,y,r,r,r,cl,q,r,r,m") ! (match_operand:CC 1 "nonimmediate_operand" "y,r,r,x,y,r,r,r,h,m,r"))] "register_operand (operands[0], CCmode) || register_operand (operands[1], CCmode)" "@ *************** *** 7830,7839 **** mfcr %0 mfcr %0\;{rlinm|rlwinm} %0,%0,%f1,0xf0000000 mr %0,%1 {l%U1%X1|lwz%U1%X1} %0,%1 {st%U0%U1|stw%U0%U1} %1,%0" ! [(set_attr "type" "*,*,*,compare,*,*,load,store") ! (set_attr "length" "*,*,12,*,8,*,*,*")]) ;; For floating-point, we normally deal with the floating-point registers ;; unless -msoft-float is used. The sole exception is that parameter passing --- 8424,8436 ---- mfcr %0 mfcr %0\;{rlinm|rlwinm} %0,%0,%f1,0xf0000000 mr %0,%1 + mt%0 %1 + mt%0 %1 + mf%1 %0 {l%U1%X1|lwz%U1%X1} %0,%1 {st%U0%U1|stw%U0%U1} %1,%0" ! [(set_attr "type" "cr_logical,cr_logical,cr_logical,cr_logical,cr_logical,*,*,mtjmpr,*,load,store") ! (set_attr "length" "4,4,12,4,8,4,4,4,4,4,4")]) ;; For floating-point, we normally deal with the floating-point registers ;; unless -msoft-float is used. The sole exception is that parameter passing *************** *** 7868,7881 **** else operands[2] = gen_lowpart (SImode, operands[0]); ! operands[3] = GEN_INT (trunc_int_for_mode (l, SImode)); }") (define_insn "*movsf_hardfloat" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=!r,!r,m,f,f,m,!r,!r") ! (match_operand:SF 1 "input_operand" "r,m,r,f,m,f,G,Fn"))] "(gpc_reg_operand (operands[0], SFmode) ! || gpc_reg_operand (operands[1], SFmode)) && TARGET_HARD_FLOAT" "@ mr %0,%1 {l%U1%X1|lwz%U1%X1} %0,%1 --- 8465,8479 ---- else operands[2] = gen_lowpart (SImode, operands[0]); ! operands[3] = gen_int_mode (l, SImode); }") (define_insn "*movsf_hardfloat" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=!r,!r,m,f,f,m,!cl,!q,!r,!r,!r") ! (match_operand:SF 1 "input_operand" "r,m,r,f,m,f,r,r,h,G,Fn"))] "(gpc_reg_operand (operands[0], SFmode) ! || gpc_reg_operand (operands[1], SFmode)) ! && (TARGET_HARD_FLOAT && TARGET_FPRS)" "@ mr %0,%1 {l%U1%X1|lwz%U1%X1} %0,%1 *************** *** 7883,7900 **** fmr %0,%1 lfs%U1%X1 %0,%1 stfs%U0%X0 %1,%0 # #" ! [(set_attr "type" "*,load,store,fp,fpload,fpstore,*,*") ! (set_attr "length" "4,4,4,4,4,4,4,8")]) (define_insn "*movsf_softfloat" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,r") ! (match_operand:SF 1 "input_operand" "r,m,r,I,L,R,G,Fn"))] "(gpc_reg_operand (operands[0], SFmode) ! || gpc_reg_operand (operands[1], SFmode)) && TARGET_SOFT_FLOAT" "@ mr %0,%1 {l%U1%X1|lwz%U1%X1} %0,%1 {st%U0%X0|stw%U0%X0} %1,%0 {lil|li} %0,%1 --- 8481,8505 ---- fmr %0,%1 lfs%U1%X1 %0,%1 stfs%U0%X0 %1,%0 + mt%0 %1 + mt%0 %1 + mf%1 %0 # #" ! [(set_attr "type" "*,load,store,fp,fpload,fpstore,*,mtjmpr,*,*,*") ! (set_attr "length" "4,4,4,4,4,4,4,4,4,4,8")]) (define_insn "*movsf_softfloat" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=r,cl,q,r,r,m,r,r,r,r,r") ! (match_operand:SF 1 "input_operand" "r,r,r,h,m,r,I,L,R,G,Fn"))] "(gpc_reg_operand (operands[0], SFmode) ! || gpc_reg_operand (operands[1], SFmode)) ! && (TARGET_SOFT_FLOAT || !TARGET_FPRS)" "@ mr %0,%1 + mt%0 %1 + mt%0 %1 + mf%1 %0 {l%U1%X1|lwz%U1%X1} %0,%1 {st%U0%X0|stw%U0%X0} %1,%0 {lil|li} %0,%1 *************** *** 7902,7909 **** {cal|la} %0,%a1 # #" ! [(set_attr "type" "*,load,store,*,*,*,*,*") ! (set_attr "length" "4,4,4,4,4,4,4,8")]) (define_expand "movdf" --- 8507,8514 ---- {cal|la} %0,%a1 # #" ! [(set_attr "type" "*,mtjmpr,*,*,load,store,*,*,*,*,*") ! (set_attr "length" "4,4,4,4,4,4,4,4,4,4,8")]) (define_expand "movdf" *************** *** 7933,7939 **** operands[4] = (value & 0x80000000) ? constm1_rtx : const0_rtx; #else operands[4] = GEN_INT (value >> 32); ! operands[1] = GEN_INT ((value & 0x7fffffff) - (value & 0x80000000)); #endif }") --- 8538,8544 ---- operands[4] = (value & 0x80000000) ? constm1_rtx : const0_rtx; #else operands[4] = GEN_INT (value >> 32); ! operands[1] = GEN_INT (((value & 0xffffffff) ^ 0x80000000) - 0x80000000); #endif }") *************** *** 7958,7965 **** operands[2] = operand_subword (operands[0], endian, 0, DFmode); operands[3] = operand_subword (operands[0], 1 - endian, 0, DFmode); ! operands[4] = GEN_INT (trunc_int_for_mode (l[endian], SImode)); ! operands[5] = GEN_INT (trunc_int_for_mode (l[1 - endian], SImode)); }") (define_split --- 8563,8570 ---- operands[2] = operand_subword (operands[0], endian, 0, DFmode); operands[3] = operand_subword (operands[0], 1 - endian, 0, DFmode); ! operands[4] = gen_int_mode (l[endian], SImode); ! operands[5] = gen_int_mode (l[1 - endian], SImode); }") (define_split *************** *** 7984,7993 **** operands[2] = gen_lowpart (DImode, operands[0]); /* HIGHPART is lower memory address when WORDS_BIG_ENDIAN. */ #if HOST_BITS_PER_WIDE_INT >= 64 ! val = ((HOST_WIDE_INT)(unsigned long)l[endian] << 32 | ! ((HOST_WIDE_INT)(unsigned long)l[1 - endian])); ! operands[3] = immed_double_const (val, -(val < 0), DImode); #else operands[3] = immed_double_const (l[1 - endian], l[endian], DImode); #endif --- 8589,8598 ---- operands[2] = gen_lowpart (DImode, operands[0]); /* HIGHPART is lower memory address when WORDS_BIG_ENDIAN. */ #if HOST_BITS_PER_WIDE_INT >= 64 ! val = ((HOST_WIDE_INT)(unsigned long)l[endian] << 32 ! | ((HOST_WIDE_INT)(unsigned long)l[1 - endian])); ! operands[3] = gen_int_mode (val, DImode); #else operands[3] = immed_double_const (l[1 - endian], l[endian], DImode); #endif *************** *** 8000,8008 **** ;; The "??" is a kludge until we can figure out a more reasonable way ;; of handling these non-offsettable values. (define_insn "*movdf_hardfloat32" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,!r,!r,!r,f,f,m") ! (match_operand:DF 1 "input_operand" "r,m,r,G,H,F,f,m,f"))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "* --- 8605,8613 ---- ;; The "??" is a kludge until we can figure out a more reasonable way ;; of handling these non-offsettable values. (define_insn "*movdf_hardfloat32" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,f,f,m,!r,!r,!r") ! (match_operand:DF 1 "input_operand" "r,m,r,f,m,f,G,H,F"))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "* *************** *** 8078,8101 **** return \"\"; } case 3: case 4: case 5: ! return \"#\"; case 6: - return \"fmr %0,%1\"; case 7: - return \"lfd%U1%X1 %0,%1\"; case 8: ! return \"stfd%U0%X0 %1,%0\"; } }" ! [(set_attr "type" "*,load,store,*,*,*,fp,fpload,fpstore") ! (set_attr "length" "8,16,16,8,12,16,*,*,*")]) (define_insn "*movdf_softfloat32" [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m,r,r,r") (match_operand:DF 1 "input_operand" "r,m,r,G,H,F"))] ! "! TARGET_POWERPC64 && TARGET_SOFT_FLOAT && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "* --- 8683,8706 ---- return \"\"; } case 3: + return \"fmr %0,%1\"; case 4: + return \"lfd%U1%X1 %0,%1\"; case 5: ! return \"stfd%U0%X0 %1,%0\"; case 6: case 7: case 8: ! return \"#\"; } }" ! [(set_attr "type" "*,load,store,fp,fpload,fpstore,*,*,*") ! (set_attr "length" "8,16,16,4,4,4,8,12,16")]) (define_insn "*movdf_softfloat32" [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m,r,r,r") (match_operand:DF 1 "input_operand" "r,m,r,G,H,F"))] ! "! TARGET_POWERPC64 && (TARGET_SOFT_FLOAT || !TARGET_FPRS) && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "* *************** *** 8134,8183 **** (set_attr "length" "8,8,8,8,12,16")]) (define_insn "*movdf_hardfloat64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,!r,!r,!r,f,f,m") ! (match_operand:DF 1 "input_operand" "r,m,r,G,H,F,f,m,f"))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "@ mr %0,%1 ld%U1%X1 %0,%1 std%U0%X0 %1,%0 - # - # - # fmr %0,%1 lfd%U1%X1 %0,%1 ! stfd%U0%X0 %1,%0" ! [(set_attr "type" "*,load,store,*,*,*,fp,fpload,fpstore") ! (set_attr "length" "4,4,4,8,12,16,4,4,4")]) (define_insn "*movdf_softfloat64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m,r,r,r") ! (match_operand:DF 1 "input_operand" "r,m,r,G,H,F"))] ! "TARGET_POWERPC64 && TARGET_SOFT_FLOAT && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "@ mr %0,%1 ld%U1%X1 %0,%1 std%U0%X0 %1,%0 # # #" ! [(set_attr "type" "*,load,store,*,*,*") ! (set_attr "length" "*,*,*,8,12,16")]) (define_expand "movtf" [(set (match_operand:TF 0 "general_operand" "") (match_operand:TF 1 "any_operand" ""))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" "{ rs6000_emit_move (operands[0], operands[1], TFmode); DONE; }") (define_insn "*movtf_internal" [(set (match_operand:TF 0 "nonimmediate_operand" "=f,f,m,!r,!r,!r") (match_operand:TF 1 "input_operand" "f,m,f,G,H,F"))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128 && (gpc_reg_operand (operands[0], TFmode) || gpc_reg_operand (operands[1], TFmode))" "* --- 8739,8794 ---- (set_attr "length" "8,8,8,8,12,16")]) (define_insn "*movdf_hardfloat64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,f,f,m,!cl,!r,!r,!r,!r") ! (match_operand:DF 1 "input_operand" "r,m,r,f,m,f,r,h,G,H,F"))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "@ mr %0,%1 ld%U1%X1 %0,%1 std%U0%X0 %1,%0 fmr %0,%1 lfd%U1%X1 %0,%1 ! stfd%U0%X0 %1,%0 ! mt%0 %1 ! mf%1 %0 ! # ! # ! #" ! [(set_attr "type" "*,load,store,fp,fpload,fpstore,mtjmpr,*,*,*,*") ! (set_attr "length" "4,4,4,4,4,4,4,4,8,12,16")]) (define_insn "*movdf_softfloat64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=r,cl,r,r,m,r,r,r") ! (match_operand:DF 1 "input_operand" "r,r,h,m,r,G,H,F"))] ! "TARGET_POWERPC64 && (TARGET_SOFT_FLOAT || !TARGET_FPRS) && (gpc_reg_operand (operands[0], DFmode) || gpc_reg_operand (operands[1], DFmode))" "@ mr %0,%1 + mt%0 %1 + mf%1 %0 ld%U1%X1 %0,%1 std%U0%X0 %1,%0 # # #" ! [(set_attr "type" "*,*,*,load,store,*,*,*") ! (set_attr "length" "4,4,4,4,4,8,12,16")]) (define_expand "movtf" [(set (match_operand:TF 0 "general_operand" "") (match_operand:TF 1 "any_operand" ""))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" "{ rs6000_emit_move (operands[0], operands[1], TFmode); DONE; }") (define_insn "*movtf_internal" [(set (match_operand:TF 0 "nonimmediate_operand" "=f,f,m,!r,!r,!r") (match_operand:TF 1 "input_operand" "f,m,f,G,H,F"))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128 && (gpc_reg_operand (operands[0], TFmode) || gpc_reg_operand (operands[1], TFmode))" "* *************** *** 8195,8203 **** else return \"fmr %0,%1\;fmr %L0,%L1\"; case 1: ! return \"lfd %0,%1\;lfd %L0,%L1\"; case 2: ! return \"stfd %1,%0\;stfd %L1,%L0\"; case 3: case 4: case 5: --- 8806,8814 ---- else return \"fmr %0,%1\;fmr %L0,%L1\"; case 1: ! return \"lfd %0,%1\;lfd %L0,%Y1\"; case 2: ! return \"stfd %1,%0\;stfd %L1,%Y0\"; case 3: case 4: case 5: *************** *** 8209,8312 **** (define_split [(set (match_operand:TF 0 "gpc_reg_operand" "") ! (match_operand:TF 1 "const_double_operand" ""))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" ! [(set (match_dup 3) (match_dup 1)) ! (set (match_dup 0) ! (float_extend:TF (match_dup 3)))] " { ! operands[2] = operand_subword (operands[1], 0, 0, DFmode); ! operands[3] = gen_reg_rtx (DFmode); }") ! (define_insn_and_split "extenddftf2" ! [(set (match_operand:TF 0 "gpc_reg_operand" "=f") ! (float_extend:TF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" ! "#" ! "" ! [(set (match_dup 2) (match_dup 3))] " { ! operands[2] = gen_rtx_REG (DFmode, REGNO (operands[0] + 1)); ! operands[3] = CONST0_RTX (DFmode); }") ! (define_insn_and_split "extendsftf2" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (float_extend:TF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" ! "#" ! "" ! [(set (match_dup 2) (match_dup 3))] ! " { ! operands[2] = gen_rtx_REG (SFmode, REGNO (operands[0] + 1)); ! operands[3] = CONST0_RTX (SFmode); ! }") (define_insn "trunctfdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" "fadd %0,%1,%L1" [(set_attr "type" "fp") (set_attr "length" "8")]) (define_insn_and_split "trunctfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (float_truncate:SF (match_operand:TF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" "#" ! "" [(set (match_dup 2) (float_truncate:DF (match_dup 1))) (set (match_dup 0) (float_truncate:SF (match_dup 2)))] ! " ! { ! operands[2] = gen_reg_rtx (DFmode); ! }") ! (define_expand "floatditf2" [(set (match_dup 2) ! (float:DF (match_operand:DI 1 "gpc_reg_operand" ""))) ! (set (match_operand:TF 0 "gpc_reg_operand" "") (float_extend:TF (match_dup 2)))] ! "DEFAULT_ABI == ABI_AIX && TARGET_POWERPC64 ! && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" ! "{ operands[2] = gen_reg_rtx (DFmode); }") ! (define_expand "floatsitf2" [(set (match_dup 2) ! (float:DF (match_operand:SI 1 "gpc_reg_operand" ""))) ! (set (match_operand:TF 0 "gpc_reg_operand" "") (float_extend:TF (match_dup 2)))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" ! "{ operands[2] = gen_reg_rtx (DFmode); }") ! (define_expand "fix_trunctfdi2" ! [(set (match_dup 2) ! (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" ""))) ! (set (match_operand:DI 0 "gpc_reg_operand" "") ! (fix:SI (match_dup 2)))] "DEFAULT_ABI == ABI_AIX && TARGET_POWERPC64 ! && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" ! "{ operands[2] = gen_reg_rtx (DFmode); }") ! (define_expand "fix_trunctfsi2" [(set (match_dup 2) ! (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" ""))) ! (set (match_operand:SI 0 "gpc_reg_operand" "") (fix:SI (match_dup 2)))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" ! "{ operands[2] = gen_reg_rtx (DFmode); }") (define_insn "negtf2" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (neg:TF (match_operand:TF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" "* { if (REGNO (operands[0]) == REGNO (operands[1]) + 1) --- 8820,9004 ---- (define_split [(set (match_operand:TF 0 "gpc_reg_operand" "") ! (match_operand:TF 1 "easy_fp_constant" ""))] ! "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) ! && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_POWERPC64 ! && TARGET_LONG_DOUBLE_128 && reload_completed ! && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) <= 31) ! || (GET_CODE (operands[0]) == SUBREG ! && GET_CODE (SUBREG_REG (operands[0])) == REG ! && REGNO (SUBREG_REG (operands[0])) <= 31))" ! [(set (match_dup 2) (match_dup 6)) ! (set (match_dup 3) (match_dup 7)) ! (set (match_dup 4) (match_dup 8)) ! (set (match_dup 5) (match_dup 9))] " { ! long l[4]; ! REAL_VALUE_TYPE rv; ! ! REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); ! REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, l); ! ! operands[2] = operand_subword (operands[0], 0, 0, TFmode); ! operands[3] = operand_subword (operands[0], 1, 0, TFmode); ! operands[4] = operand_subword (operands[0], 2, 0, TFmode); ! operands[5] = operand_subword (operands[0], 3, 0, TFmode); ! operands[6] = gen_int_mode (l[0], SImode); ! operands[7] = gen_int_mode (l[1], SImode); ! operands[8] = gen_int_mode (l[2], SImode); ! operands[9] = gen_int_mode (l[3], SImode); }") ! (define_split ! [(set (match_operand:TF 0 "gpc_reg_operand" "") ! (match_operand:TF 1 "easy_fp_constant" ""))] ! "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) ! && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_POWERPC64 ! && TARGET_LONG_DOUBLE_128 && reload_completed ! && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) <= 31) ! || (GET_CODE (operands[0]) == SUBREG ! && GET_CODE (SUBREG_REG (operands[0])) == REG ! && REGNO (SUBREG_REG (operands[0])) <= 31))" ! [(set (match_dup 2) (match_dup 4)) ! (set (match_dup 3) (match_dup 5))] " { ! long l[4]; ! REAL_VALUE_TYPE rv; ! HOST_WIDE_INT val; ! ! REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); ! REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, l); ! ! operands[2] = gen_lowpart (DImode, operands[0]); ! operands[3] = gen_highpart (DImode, operands[0]); ! #if HOST_BITS_PER_WIDE_INT >= 64 ! val = ((HOST_WIDE_INT)(unsigned long)l[0] << 32 ! | ((HOST_WIDE_INT)(unsigned long)l[1])); ! operands[4] = gen_int_mode (val, DImode); ! ! val = ((HOST_WIDE_INT)(unsigned long)l[2] << 32 ! | ((HOST_WIDE_INT)(unsigned long)l[3])); ! operands[5] = gen_int_mode (val, DImode); ! #else ! operands[4] = immed_double_const (l[1], l[0], DImode); ! operands[5] = immed_double_const (l[3], l[2], DImode); ! #endif }") ! (define_insn "extenddftf2" ! [(set (match_operand:TF 0 "gpc_reg_operand" "=f") ! (float_extend:TF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" ! "* ! { ! if (REGNO (operands[0]) == REGNO (operands[1])) ! return \"fsub %L0,%L0,%L0\"; ! else ! return \"fmr %0,%1\;fsub %L0,%L0,%L0\"; ! }" ! [(set_attr "type" "fp")]) ! ! (define_insn "extendsftf2" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (float_extend:TF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" ! "* { ! if (REGNO (operands[0]) == REGNO (operands[1])) ! return \"fsub %L0,%L0,%L0\"; ! else ! return \"fmr %0,%1\;fsub %L0,%L0,%L0\"; ! }" ! [(set_attr "type" "fp")]) (define_insn "trunctfdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" "fadd %0,%1,%L1" [(set_attr "type" "fp") (set_attr "length" "8")]) (define_insn_and_split "trunctfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (float_truncate:SF (match_operand:TF 1 "gpc_reg_operand" "f"))) ! (clobber (match_scratch:DF 2 "=f"))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT ! && TARGET_FPRS && TARGET_LONG_DOUBLE_128" "#" ! "&& reload_completed" [(set (match_dup 2) (float_truncate:DF (match_dup 1))) (set (match_dup 0) (float_truncate:SF (match_dup 2)))] ! "") ! (define_insn_and_split "floatditf2" ! [(set (match_operand:TF 0 "gpc_reg_operand" "=f") ! (float:TF (match_operand:DI 1 "gpc_reg_operand" "*f"))) ! (clobber (match_scratch:DF 2 "=f"))] ! "DEFAULT_ABI == ABI_AIX && TARGET_POWERPC64 ! && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" ! "#" ! "&& reload_completed" [(set (match_dup 2) ! (float:DF (match_dup 1))) ! (set (match_dup 0) (float_extend:TF (match_dup 2)))] ! "") ! (define_insn_and_split "floatsitf2" ! [(set (match_operand:TF 0 "gpc_reg_operand" "=f") ! (float:TF (match_operand:SI 1 "gpc_reg_operand" "r"))) ! (clobber (match_scratch:DF 2 "=f"))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" ! "#" ! "&& reload_completed" [(set (match_dup 2) ! (float:DF (match_dup 1))) ! (set (match_dup 0) (float_extend:TF (match_dup 2)))] ! "") ! (define_insn_and_split "fix_trunctfdi2" ! [(set (match_operand:DI 0 "gpc_reg_operand" "=*f") ! (fix:DI (match_operand:TF 1 "gpc_reg_operand" "f"))) ! (clobber (match_scratch:DF 2 "=f"))] "DEFAULT_ABI == ABI_AIX && TARGET_POWERPC64 ! && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" ! "#" ! "&& reload_completed" ! [(set (match_dup 2) ! (float_truncate:DF (match_dup 1))) ! (set (match_dup 0) ! (fix:DI (match_dup 2)))] ! "") ! (define_insn_and_split "fix_trunctfsi2" ! [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ! (fix:SI (match_operand:TF 1 "gpc_reg_operand" "f"))) ! (clobber (match_scratch:DF 2 "=f"))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" ! "#" ! "&& reload_completed" [(set (match_dup 2) ! (float_truncate:DF (match_dup 1))) ! (set (match_dup 0) (fix:SI (match_dup 2)))] ! "") (define_insn "negtf2" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (neg:TF (match_operand:TF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" "* { if (REGNO (operands[0]) == REGNO (operands[1]) + 1) *************** *** 8320,8326 **** (define_insn "abstf2" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (abs:TF (match_operand:TF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" "* { if (REGNO (operands[0]) == REGNO (operands[1]) + 1) --- 9012,9019 ---- (define_insn "abstf2" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (abs:TF (match_operand:TF 1 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" "* { if (REGNO (operands[0]) == REGNO (operands[1]) + 1) *************** *** 8334,8340 **** (define_insn "" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (neg:TF (abs:TF (match_operand:TF 1 "gpc_reg_operand" "f"))))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" "* { if (REGNO (operands[0]) == REGNO (operands[1]) + 1) --- 9027,9034 ---- (define_insn "" [(set (match_operand:TF 0 "gpc_reg_operand" "=f") (neg:TF (abs:TF (match_operand:TF 1 "gpc_reg_operand" "f"))))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" "* { if (REGNO (operands[0]) == REGNO (operands[1]) + 1) *************** *** 8400,8406 **** } }" [(set_attr "type" "*,load,store,fp,fpload,fpstore,*,*,*,*,*") ! (set_attr "length" "8,8,8,*,*,*,8,12,8,12,16")]) (define_split [(set (match_operand:DI 0 "gpc_reg_operand" "") --- 9094,9100 ---- } }" [(set_attr "type" "*,load,store,fp,fpload,fpstore,*,*,*,*,*") ! (set_attr "length" "8,8,8,4,4,4,8,12,8,12,16")]) (define_split [(set (match_operand:DI 0 "gpc_reg_operand" "") *************** *** 8419,8425 **** operands[4] = (value & 0x80000000) ? constm1_rtx : const0_rtx; #else operands[4] = GEN_INT (value >> 32); ! operands[1] = GEN_INT ((value & 0x7fffffff) - (value & 0x80000000)); #endif }") --- 9113,9119 ---- operands[4] = (value & 0x80000000) ? constm1_rtx : const0_rtx; #else operands[4] = GEN_INT (value >> 32); ! operands[1] = GEN_INT (((value & 0xffffffff) ^ 0x80000000) - 0x80000000); #endif }") *************** *** 8466,8472 **** }") (define_insn "*movdi_internal64" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,f,f,m,r,*h,*h") (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))] "TARGET_POWERPC64 && (gpc_reg_operand (operands[0], DImode) --- 9160,9166 ---- }") (define_insn "*movdi_internal64" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,?f,f,m,r,*h,*h") (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))] "TARGET_POWERPC64 && (gpc_reg_operand (operands[0], DImode) *************** *** 8484,8490 **** stfd%U0%X0 %1,%0 mf%1 %0 mt%0 %1 ! cror 0,0,0" [(set_attr "type" "*,load,store,*,*,*,*,fp,fpload,fpstore,*,mtjmpr,*") (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4")]) --- 9178,9184 ---- stfd%U0%X0 %1,%0 mf%1 %0 mt%0 %1 ! {cror 0,0,0|nop}" [(set_attr "type" "*,load,store,*,*,*,*,fp,fpload,fpstore,*,mtjmpr,*") (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4")]) *************** *** 8641,8652 **** } }" [(set_attr "type" "store,store,*,load,load") ! (set_attr "length" "*,16,16,*,16")]) (define_insn "*movti_string" ! [(set (match_operand:TI 0 "reg_or_mem_operand" "=m,????r,????r") ! (match_operand:TI 1 "reg_or_mem_operand" "r,r,m")) ! (clobber (match_scratch:SI 2 "=X,X,X"))] "TARGET_STRING && ! TARGET_POWER && ! TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))" "* --- 9335,9345 ---- } }" [(set_attr "type" "store,store,*,load,load") ! (set_attr "length" "4,16,16,4,16")]) (define_insn "*movti_string" ! [(set (match_operand:TI 0 "reg_or_mem_operand" "=Q,m,????r,????r,????r") ! (match_operand:TI 1 "reg_or_mem_operand" "r,r,r,Q,m"))] "TARGET_STRING && ! TARGET_POWER && ! TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))" "* *************** *** 8657,8665 **** abort (); case 0: ! return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\;{st|stw} %Y1,%Y0\;{st|stw} %Z1,%Z0\"; ! case 1: /* Normally copy registers with lowest numbered register copied first. But copy in the other order if the first register of the output is the second, third, or fourth register in the input. */ --- 9350,9359 ---- abort (); case 0: ! return \"{stsi|stswi} %1,%P0,16\"; case 1: + return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\;{st|stw} %Y1,%Y0\;{st|stw} %Z1,%Z0\"; + case 2: /* Normally copy registers with lowest numbered register copied first. But copy in the other order if the first register of the output is the second, third, or fourth register in the input. */ *************** *** 8668,8674 **** return \"mr %Z0,%Z1\;mr %Y0,%Y1\;mr %L0,%L1\;mr %0,%1\"; else return \"mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1\"; ! case 2: /* If the address register is the same as the register for the lowest- addressed word, load it last. Similarly for the next two words. Otherwise load lowest address to highest. */ --- 9362,9374 ---- return \"mr %Z0,%Z1\;mr %Y0,%Y1\;mr %L0,%L1\;mr %0,%1\"; else return \"mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1\"; ! case 3: ! /* If the address is not used in the output, we can use lsi. Otherwise, ! fall through to generating four loads. */ ! if (! reg_overlap_mentioned_p (operands[0], operands[1])) ! return \"{lsi|lswi} %0,%P1,16\"; ! /* ... fall through ... */ ! case 4: /* If the address register is the same as the register for the lowest- addressed word, load it last. Similarly for the next two words. Otherwise load lowest address to highest. */ *************** *** 8685,8692 **** return \"{l%U1|lwz%U1} %0,%1\;{l|lwz} %L0,%L1\;{l|lwz} %Y0,%Y1\;{l|lwz} %Z0,%Z1\"; } }" ! [(set_attr "type" "store,*,load") ! (set_attr "length" "16,16,16")]) (define_insn "*movti_ppc64" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,r,m") --- 9385,9392 ---- return \"{l%U1|lwz%U1} %0,%1\;{l|lwz} %L0,%L1\;{l|lwz} %Y0,%Y1\;{l|lwz} %Z0,%Z1\"; } }" ! [(set_attr "type" "store,store,*,load,load") ! (set_attr "length" "4,16,16,4,16")]) (define_insn "*movti_ppc64" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,r,m") *************** *** 8757,8763 **** for (i = 0; i < count; i++) XVECEXP (operands[3], 0, i) = gen_rtx_SET (VOIDmode, gen_rtx_REG (SImode, regno + i), ! adjust_address (op1, SImode, i * 4)); }") (define_insn "*ldmsi8" --- 9457,9463 ---- for (i = 0; i < count; i++) XVECEXP (operands[3], 0, i) = gen_rtx_SET (VOIDmode, gen_rtx_REG (SImode, regno + i), ! adjust_address_nv (op1, SImode, i * 4)); }") (define_insn "*ldmsi8" *************** *** 8907,8920 **** op0 = replace_equiv_address (operands[0], to); XVECEXP (operands[3], 0, 0) ! = gen_rtx_SET (VOIDmode, adjust_address (op0, SImode, 0), operands[1]); XVECEXP (operands[3], 0, 1) = gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (SImode)); for (i = 1; i < count; i++) XVECEXP (operands[3], 0, i + 1) = gen_rtx_SET (VOIDmode, ! adjust_address (op0, SImode, i * 4), gen_rtx_REG (SImode, regno + i)); }") --- 9607,9620 ---- op0 = replace_equiv_address (operands[0], to); XVECEXP (operands[3], 0, 0) ! = gen_rtx_SET (VOIDmode, adjust_address_nv (op0, SImode, 0), operands[1]); XVECEXP (operands[3], 0, 1) = gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (SImode)); for (i = 1; i < count; i++) XVECEXP (operands[3], 0, i + 1) = gen_rtx_SET (VOIDmode, ! adjust_address_nv (op0, SImode, i * 4), gen_rtx_REG (SImode, regno + i)); }") *************** *** 9452,9458 **** (match_operand:SI 2 "reg_or_short_operand" "r,I")))) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_UPDATE" "@ lfsux %3,%0,%2 lfsu %3,%2(%0)" --- 10152,10158 ---- (match_operand:SI 2 "reg_or_short_operand" "r,I")))) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE" "@ lfsux %3,%0,%2 lfsu %3,%2(%0)" *************** *** 9464,9470 **** (match_operand:SF 3 "gpc_reg_operand" "f,f")) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_UPDATE" "@ stfsux %3,%0,%2 stfsu %3,%2(%0)" --- 10164,10170 ---- (match_operand:SF 3 "gpc_reg_operand" "f,f")) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE" "@ stfsux %3,%0,%2 stfsu %3,%2(%0)" *************** *** 9476,9482 **** (match_operand:SI 2 "reg_or_short_operand" "r,I")))) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_SOFT_FLOAT && TARGET_UPDATE" "@ {lux|lwzux} %3,%0,%2 {lu|lwzu} %3,%2(%0)" --- 10176,10182 ---- (match_operand:SI 2 "reg_or_short_operand" "r,I")))) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "(TARGET_SOFT_FLOAT || !TARGET_FPRS) && TARGET_UPDATE" "@ {lux|lwzux} %3,%0,%2 {lu|lwzu} %3,%2(%0)" *************** *** 9488,9494 **** (match_operand:SF 3 "gpc_reg_operand" "r,r")) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_SOFT_FLOAT && TARGET_UPDATE" "@ {stux|stwux} %3,%0,%2 {stu|stwu} %3,%2(%0)" --- 10188,10194 ---- (match_operand:SF 3 "gpc_reg_operand" "r,r")) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "(TARGET_SOFT_FLOAT || !TARGET_FPRS) && TARGET_UPDATE" "@ {stux|stwux} %3,%0,%2 {stu|stwu} %3,%2(%0)" *************** *** 9500,9506 **** (match_operand:SI 2 "reg_or_short_operand" "r,I")))) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_UPDATE" "@ lfdux %3,%0,%2 lfdu %3,%2(%0)" --- 10200,10206 ---- (match_operand:SI 2 "reg_or_short_operand" "r,I")))) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE" "@ lfdux %3,%0,%2 lfdu %3,%2(%0)" *************** *** 9512,9518 **** (match_operand:DF 3 "gpc_reg_operand" "f,f")) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_UPDATE" "@ stfdux %3,%0,%2 stfdu %3,%2(%0)" --- 10212,10218 ---- (match_operand:DF 3 "gpc_reg_operand" "f,f")) (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_UPDATE" "@ stfdux %3,%0,%2 stfdu %3,%2(%0)" *************** *** 9526,9532 **** (set (match_operand:DF 2 "gpc_reg_operand" "=f") (match_operand:DF 3 "memory_operand" ""))] "TARGET_POWER2 ! && TARGET_HARD_FLOAT && registers_ok_for_quad_peep (operands[0], operands[2]) && ! MEM_VOLATILE_P (operands[1]) && ! MEM_VOLATILE_P (operands[3]) && addrs_ok_for_quad_peep (XEXP (operands[1], 0), XEXP (operands[3], 0))" --- 10226,10232 ---- (set (match_operand:DF 2 "gpc_reg_operand" "=f") (match_operand:DF 3 "memory_operand" ""))] "TARGET_POWER2 ! && TARGET_HARD_FLOAT && TARGET_FPRS && registers_ok_for_quad_peep (operands[0], operands[2]) && ! MEM_VOLATILE_P (operands[1]) && ! MEM_VOLATILE_P (operands[3]) && addrs_ok_for_quad_peep (XEXP (operands[1], 0), XEXP (operands[3], 0))" *************** *** 9538,9544 **** (set (match_operand:DF 2 "memory_operand" "") (match_operand:DF 3 "gpc_reg_operand" "f"))] "TARGET_POWER2 ! && TARGET_HARD_FLOAT && registers_ok_for_quad_peep (operands[1], operands[3]) && ! MEM_VOLATILE_P (operands[0]) && ! MEM_VOLATILE_P (operands[2]) && addrs_ok_for_quad_peep (XEXP (operands[0], 0), XEXP (operands[2], 0))" --- 10238,10244 ---- (set (match_operand:DF 2 "memory_operand" "") (match_operand:DF 3 "gpc_reg_operand" "f"))] "TARGET_POWER2 ! && TARGET_HARD_FLOAT && TARGET_FPRS && registers_ok_for_quad_peep (operands[1], operands[3]) && ! MEM_VOLATILE_P (operands[0]) && ! MEM_VOLATILE_P (operands[2]) && addrs_ok_for_quad_peep (XEXP (operands[0], 0), XEXP (operands[2], 0))" *************** *** 9723,9729 **** (match_operand:SI 1 "immediate_operand" "s")) (unspec [(match_dup 1)] 7)] "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2" ! "bl %1\\n%1:" [(set_attr "type" "branch") (set_attr "length" "4")]) --- 10423,10429 ---- (match_operand:SI 1 "immediate_operand" "s")) (unspec [(match_dup 1)] 7)] "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2" ! "bcl 20,31,%1\\n%1:" [(set_attr "type" "branch") (set_attr "length" "4")]) *************** *** 9732,9744 **** (match_operand:SI 1 "immediate_operand" "s")) (unspec [(match_dup 1) (match_operand 2 "immediate_operand" "s")] 6)] "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2" ! "bl %1\\n\\t.long %2-%1+4\\n%1:" [(set_attr "type" "branch") (set_attr "length" "8")]) (define_insn "load_toc_v4_PIC_2" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "b") (minus:SI (match_operand:SI 2 "immediate_operand" "s") (match_operand:SI 3 "immediate_operand" "s")))))] "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2" --- 10432,10444 ---- (match_operand:SI 1 "immediate_operand" "s")) (unspec [(match_dup 1) (match_operand 2 "immediate_operand" "s")] 6)] "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2" ! "bcl 20,31,%1\\n\\t.long %2-%1+4\\n%1:" [(set_attr "type" "branch") (set_attr "length" "8")]) (define_insn "load_toc_v4_PIC_2" ! [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ! (mem:SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") (minus:SI (match_operand:SI 2 "immediate_operand" "s") (match_operand:SI 3 "immediate_operand" "s")))))] "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2" *************** *** 9747,9776 **** (define_insn "load_macho_picbase" [(set (match_operand:SI 0 "register_operand" "=l") ! (unspec:SI [(const_int 0)] 15))] "(DEFAULT_ABI == ABI_DARWIN) && flag_pic" ! "* ! { ! #if TARGET_MACHO ! char *picbase = machopic_function_base_name (); ! operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (picbase, -1)); ! #endif ! return \"bcl 20,31,%1\\n%1:\"; ! }" [(set_attr "type" "branch") (set_attr "length" "4")]) ;; If the TOC is shared over a translation unit, as happens with all ;; the kinds of PIC that we support, we need to restore the TOC ;; pointer only when jumping over units of translation. (define_expand "builtin_setjmp_receiver" [(use (label_ref (match_operand 0 "" "")))] "(DEFAULT_ABI == ABI_V4 && flag_pic == 1) ! || (TARGET_TOC && TARGET_MINIMAL_TOC)" " { ! rs6000_emit_load_toc_table (FALSE); DONE; }") --- 10447,10499 ---- (define_insn "load_macho_picbase" [(set (match_operand:SI 0 "register_operand" "=l") ! (unspec:SI [(match_operand:SI 1 "immediate_operand" "s")] 15))] "(DEFAULT_ABI == ABI_DARWIN) && flag_pic" ! "bcl 20,31,%1\\n%1:" [(set_attr "type" "branch") (set_attr "length" "4")]) + (define_insn "macho_correct_pic" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (plus:SI (match_operand:SI 1 "gpc_reg_operand" "=r") + (unspec:SI [(match_operand:SI 2 "immediate_operand" "s") + (match_operand:SI 3 "immediate_operand" "s")] + 16)))] + "DEFAULT_ABI == ABI_DARWIN" + "addis %0,%1,ha16(%2-%3)\n\taddi %1,%1,lo16(%2-%3)" + [(set_attr "length" "8")]) + ;; If the TOC is shared over a translation unit, as happens with all ;; the kinds of PIC that we support, we need to restore the TOC ;; pointer only when jumping over units of translation. + ;; On Darwin, we need to reload the picbase. (define_expand "builtin_setjmp_receiver" [(use (label_ref (match_operand 0 "" "")))] "(DEFAULT_ABI == ABI_V4 && flag_pic == 1) ! || (TARGET_TOC && TARGET_MINIMAL_TOC) ! || (DEFAULT_ABI == ABI_DARWIN && flag_pic)" " { ! #if TARGET_MACHO ! if (DEFAULT_ABI == ABI_DARWIN) ! { ! char *picbase = machopic_function_base_name (); ! rtx picrtx = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (picbase, -1)); ! rtx picreg = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM); ! rtx tmplabrtx; ! char tmplab[20]; ! ! ASM_GENERATE_INTERNAL_LABEL(tmplab, \"LSJR\", ! CODE_LABEL_NUMBER (operands[0])); ! tmplabrtx = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (tmplab, -1)); ! ! emit_insn (gen_load_macho_picbase (picreg, tmplabrtx)); ! emit_insn (gen_macho_correct_pic (picreg, picreg, picrtx, tmplabrtx)); ! } ! else ! #endif ! rs6000_emit_load_toc_table (FALSE); DONE; }") *************** *** 9969,9975 **** }") ;; Call to function in current module. No TOC pointer reload needed. ! ;; Operand2 is non-zero if we are using the V.4 calling sequence and ;; either the function was not prototyped, or it was prototyped as a ;; variable argument function. It is > 0 if FP registers were passed ;; and < 0 if they were not. --- 10692,10698 ---- }") ;; Call to function in current module. No TOC pointer reload needed. ! ;; Operand2 is nonzero if we are using the V.4 calling sequence and ;; either the function was not prototyped, or it was prototyped as a ;; variable argument function. It is > 0 if FP registers were passed ;; and < 0 if they were not. *************** *** 10055,10061 **** ;; Call to function which may be in another module. Restore the TOC ;; pointer (r2) after the call unless this is System V. ! ;; Operand2 is non-zero if we are using the V.4 calling sequence and ;; either the function was not prototyped, or it was prototyped as a ;; variable argument function. It is > 0 if FP registers were passed ;; and < 0 if they were not. --- 10778,10784 ---- ;; Call to function which may be in another module. Restore the TOC ;; pointer (r2) after the call unless this is System V. ! ;; Operand2 is nonzero if we are using the V.4 calling sequence and ;; either the function was not prototyped, or it was prototyped as a ;; variable argument function. It is > 0 if FP registers were passed ;; and < 0 if they were not. *************** *** 10074,10080 **** (set_attr "length" "8")]) (define_insn "*call_nonlocal_aix32" ! [(call (mem:SI (match_operand:SI 0 "call_operand" "s")) (match_operand 1 "" "g")) (use (match_operand:SI 2 "immediate_operand" "O")) (clobber (match_scratch:SI 3 "=l"))] --- 10797,10803 ---- (set_attr "length" "8")]) (define_insn "*call_nonlocal_aix32" ! [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s")) (match_operand 1 "" "g")) (use (match_operand:SI 2 "immediate_operand" "O")) (clobber (match_scratch:SI 3 "=l"))] *************** *** 10099,10105 **** (set_attr "length" "8")]) (define_insn "*call_nonlocal_aix64" ! [(call (mem:SI (match_operand:DI 0 "call_operand" "s")) (match_operand 1 "" "g")) (use (match_operand:SI 2 "immediate_operand" "O")) (clobber (match_scratch:SI 3 "=l"))] --- 10822,10828 ---- (set_attr "length" "8")]) (define_insn "*call_nonlocal_aix64" ! [(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s")) (match_operand 1 "" "g")) (use (match_operand:SI 2 "immediate_operand" "O")) (clobber (match_scratch:SI 3 "=l"))] *************** *** 10126,10132 **** (define_insn "*call_value_nonlocal_aix32" [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:SI 1 "call_operand" "s")) (match_operand 2 "" "g"))) (use (match_operand:SI 3 "immediate_operand" "O")) (clobber (match_scratch:SI 4 "=l"))] --- 10849,10855 ---- (define_insn "*call_value_nonlocal_aix32" [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s")) (match_operand 2 "" "g"))) (use (match_operand:SI 3 "immediate_operand" "O")) (clobber (match_scratch:SI 4 "=l"))] *************** *** 10153,10159 **** (define_insn "*call_value_nonlocal_aix64" [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:DI 1 "call_operand" "s")) (match_operand 2 "" "g"))) (use (match_operand:SI 3 "immediate_operand" "O")) (clobber (match_scratch:SI 4 "=l"))] --- 10876,10882 ---- (define_insn "*call_value_nonlocal_aix64" [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s")) (match_operand 2 "" "g"))) (use (match_operand:SI 3 "immediate_operand" "O")) (clobber (match_scratch:SI 4 "=l"))] *************** *** 10170,10237 **** ;; operands[2] is the value FUNCTION_ARG returns for the VOID argument ;; which indicates how to set cr1 ! (define_insn "*call_nonlocal_sysv" ! [(call (mem:SI (match_operand:SI 0 "call_operand" "cl,cl,s,s")) ! (match_operand 1 "" "g,g,g,g")) ! (use (match_operand:SI 2 "immediate_operand" "O,n,O,n")) ! (clobber (match_scratch:SI 3 "=l,l,l,l"))] "DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN" - "* { if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) ! output_asm_insn (\"crxor 6,6,6\", operands); else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) ! output_asm_insn (\"creqv 6,6,6\", operands); ! switch (which_alternative) ! { ! default: ! abort (); ! case 0: ! case 1: ! return \"b%T0l\"; ! case 2: ! case 3: ! return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"bl %z0@plt\" : \"bl %z0\"; ! } ! }" ! [(set_attr "type" "jmpreg,jmpreg,branch,branch") ! (set_attr "length" "4,8,4,8")]) ! (define_insn "*call_value_nonlocal_sysv" [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:SI 1 "call_operand" "cl,cl,s,s")) ! (match_operand 2 "" "g,g,g,g"))) ! (use (match_operand:SI 3 "immediate_operand" "O,n,O,n")) ! (clobber (match_scratch:SI 4 "=l,l,l,l"))] "DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN" - "* { if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS) ! output_asm_insn (\"crxor 6,6,6\", operands); else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS) ! output_asm_insn (\"creqv 6,6,6\", operands); ! switch (which_alternative) ! { ! default: ! abort (); ! case 0: ! case 1: ! return \"b%T1l\"; ! case 2: ! case 3: ! return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"bl %z1@plt\" : \"bl %z1\"; ! } ! }" ! [(set_attr "type" "jmpreg,jmpreg,branch,branch") ! (set_attr "length" "4,8,4,8")]) ;; Call subroutine returning any type. (define_expand "untyped_call" --- 10893,10981 ---- ;; operands[2] is the value FUNCTION_ARG returns for the VOID argument ;; which indicates how to set cr1 ! (define_insn "*call_indirect_nonlocal_sysv" ! [(call (mem:SI (match_operand:SI 0 "register_operand" "cl,cl")) ! (match_operand 1 "" "g,g")) ! (use (match_operand:SI 2 "immediate_operand" "O,n")) ! (clobber (match_scratch:SI 3 "=l,l"))] "DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN" { if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) ! output_asm_insn ("crxor 6,6,6", operands); else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) ! output_asm_insn ("creqv 6,6,6", operands); ! return "b%T0l"; ! } ! [(set_attr "type" "jmpreg,jmpreg") ! (set_attr "length" "4,8")]) ! (define_insn "*call_nonlocal_sysv" ! [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s,s")) ! (match_operand 1 "" "g,g")) ! (use (match_operand:SI 2 "immediate_operand" "O,n")) ! (clobber (match_scratch:SI 3 "=l,l"))] ! "(DEFAULT_ABI == ABI_AIX_NODESC ! || DEFAULT_ABI == ABI_V4 ! || DEFAULT_ABI == ABI_DARWIN) ! && (INTVAL (operands[2]) & CALL_LONG) == 0" ! { ! if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) ! output_asm_insn ("crxor 6,6,6", operands); ! ! else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) ! output_asm_insn ("creqv 6,6,6", operands); ! ! return (DEFAULT_ABI == ABI_V4 && flag_pic) ? "bl %z0@plt" : "bl %z0"; ! } ! [(set_attr "type" "branch,branch") ! (set_attr "length" "4,8")]) ! ! (define_insn "*call_value_indirect_nonlocal_sysv" [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:SI 1 "register_operand" "cl,cl")) ! (match_operand 2 "" "g,g"))) ! (use (match_operand:SI 3 "immediate_operand" "O,n")) ! (clobber (match_scratch:SI 4 "=l,l"))] "DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN" { if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS) ! output_asm_insn ("crxor 6,6,6", operands); else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS) ! output_asm_insn ("creqv 6,6,6", operands); ! return "b%T1l"; ! } ! [(set_attr "type" "jmpreg,jmpreg") ! (set_attr "length" "4,8")]) ! ! (define_insn "*call_value_nonlocal_sysv" ! [(set (match_operand 0 "" "") ! (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s,s")) ! (match_operand 2 "" "g,g"))) ! (use (match_operand:SI 3 "immediate_operand" "O,n")) ! (clobber (match_scratch:SI 4 "=l,l"))] ! "(DEFAULT_ABI == ABI_AIX_NODESC ! || DEFAULT_ABI == ABI_V4 ! || DEFAULT_ABI == ABI_DARWIN) ! && (INTVAL (operands[3]) & CALL_LONG) == 0" ! { ! if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS) ! output_asm_insn ("crxor 6,6,6", operands); ! ! else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS) ! output_asm_insn ("creqv 6,6,6", operands); ! ! return (DEFAULT_ABI == ABI_V4 && flag_pic) ? "bl %z1@plt" : "bl %z1"; ! } ! [(set_attr "type" "branch,branch") ! (set_attr "length" "4,8")]) ;; Call subroutine returning any type. (define_expand "untyped_call" *************** *** 10261,10266 **** --- 11005,11251 ---- DONE; }") + ;; sibling call patterns + (define_expand "sibcall" + [(parallel [(call (mem:SI (match_operand 0 "address_operand" "")) + (match_operand 1 "" "")) + (use (match_operand 2 "" "")) + (use (scratch:SI)) + (return)])] + "" + " + { + #if TARGET_MACHO + if (flag_pic) + operands[0] = machopic_indirect_call_target (operands[0]); + #endif + + if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != CONST_INT) + abort (); + + operands[0] = XEXP (operands[0], 0); + + }") + + ;; this and similar patterns must be marked as using LR, otherwise + ;; dataflow will try to delete the store into it. This is true + ;; even when the actual reg to jump to is in CTR, when LR was + ;; saved and restored around the PIC-setting BCL. + (define_insn "*sibcall_local32" + [(call (mem:SI (match_operand:SI 0 "current_file_function_operand" "s,s")) + (match_operand 1 "" "g,g")) + (use (match_operand:SI 2 "immediate_operand" "O,n")) + (use (match_scratch:SI 3 "=l,l")) + (return)] + "(INTVAL (operands[2]) & CALL_LONG) == 0" + "* + { + if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) + output_asm_insn (\"crxor 6,6,6\", operands); + + else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) + output_asm_insn (\"creqv 6,6,6\", operands); + + return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z0@local\" : \"b %z0\"; + }" + [(set_attr "type" "branch") + (set_attr "length" "4,8")]) + + (define_insn "*sibcall_local64" + [(call (mem:SI (match_operand:DI 0 "current_file_function_operand" "s,s")) + (match_operand 1 "" "g,g")) + (use (match_operand:SI 2 "immediate_operand" "O,n")) + (use (match_scratch:SI 3 "=l,l")) + (return)] + "TARGET_64BIT && (INTVAL (operands[2]) & CALL_LONG) == 0" + "* + { + if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) + output_asm_insn (\"crxor 6,6,6\", operands); + + else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) + output_asm_insn (\"creqv 6,6,6\", operands); + + return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z0@local\" : \"b %z0\"; + }" + [(set_attr "type" "branch") + (set_attr "length" "4,8")]) + + (define_insn "*sibcall_value_local32" + [(set (match_operand 0 "" "") + (call (mem:SI (match_operand:SI 1 "current_file_function_operand" "s,s")) + (match_operand 2 "" "g,g"))) + (use (match_operand:SI 3 "immediate_operand" "O,n")) + (use (match_scratch:SI 4 "=l,l")) + (return)] + "(INTVAL (operands[3]) & CALL_LONG) == 0" + "* + { + if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS) + output_asm_insn (\"crxor 6,6,6\", operands); + + else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS) + output_asm_insn (\"creqv 6,6,6\", operands); + + return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z1@local\" : \"b %z1\"; + }" + [(set_attr "type" "branch") + (set_attr "length" "4,8")]) + + + (define_insn "*sibcall_value_local64" + [(set (match_operand 0 "" "") + (call (mem:SI (match_operand:DI 1 "current_file_function_operand" "s,s")) + (match_operand 2 "" "g,g"))) + (use (match_operand:SI 3 "immediate_operand" "O,n")) + (use (match_scratch:SI 4 "=l,l")) + (return)] + "TARGET_64BIT && (INTVAL (operands[3]) & CALL_LONG) == 0" + "* + { + if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS) + output_asm_insn (\"crxor 6,6,6\", operands); + + else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS) + output_asm_insn (\"creqv 6,6,6\", operands); + + return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z1@local\" : \"b %z1\"; + }" + [(set_attr "type" "branch") + (set_attr "length" "4,8")]) + + (define_insn "*sibcall_nonlocal_aix32" + [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s")) + (match_operand 1 "" "g")) + (use (match_operand:SI 2 "immediate_operand" "O")) + (use (match_scratch:SI 3 "=l")) + (return)] + "TARGET_32BIT + && DEFAULT_ABI == ABI_AIX + && (INTVAL (operands[2]) & CALL_LONG) == 0" + "b %z0" + [(set_attr "type" "branch") + (set_attr "length" "4")]) + + (define_insn "*sibcall_nonlocal_aix64" + [(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s")) + (match_operand 1 "" "g")) + (use (match_operand:SI 2 "immediate_operand" "O")) + (use (match_scratch:SI 3 "=l")) + (return)] + "TARGET_64BIT + && DEFAULT_ABI == ABI_AIX + && (INTVAL (operands[2]) & CALL_LONG) == 0" + "b %z0" + [(set_attr "type" "branch") + (set_attr "length" "4")]) + + (define_insn "*sibcall_value_nonlocal_aix32" + [(set (match_operand 0 "" "") + (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s")) + (match_operand 2 "" "g"))) + (use (match_operand:SI 3 "immediate_operand" "O")) + (use (match_scratch:SI 4 "=l")) + (return)] + "TARGET_32BIT + && DEFAULT_ABI == ABI_AIX + && (INTVAL (operands[3]) & CALL_LONG) == 0" + "b %z1" + [(set_attr "type" "branch") + (set_attr "length" "4")]) + + (define_insn "*sibcall_value_nonlocal_aix64" + [(set (match_operand 0 "" "") + (call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s")) + (match_operand 2 "" "g"))) + (use (match_operand:SI 3 "immediate_operand" "O")) + (use (match_scratch:SI 4 "=l")) + (return)] + "TARGET_64BIT + && DEFAULT_ABI == ABI_AIX + && (INTVAL (operands[3]) & CALL_LONG) == 0" + "b %z1" + [(set_attr "type" "branch") + (set_attr "length" "4")]) + + (define_insn "*sibcall_nonlocal_sysv" + [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s,s")) + (match_operand 1 "" "")) + (use (match_operand 2 "immediate_operand" "O,n")) + (use (match_scratch:SI 3 "=l,l")) + (return)] + "(DEFAULT_ABI == ABI_DARWIN + || DEFAULT_ABI == ABI_V4 + || DEFAULT_ABI == ABI_AIX_NODESC) + && (INTVAL (operands[2]) & CALL_LONG) == 0" + "* + { + if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) + output_asm_insn (\"crxor 6,6,6\", operands); + + else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) + output_asm_insn (\"creqv 6,6,6\", operands); + + return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z0@plt\" : \"b %z0\"; + }" + [(set_attr "type" "branch,branch") + (set_attr "length" "4,8")]) + + (define_expand "sibcall_value" + [(parallel [(set (match_operand 0 "register_operand" "") + (call (mem:SI (match_operand 1 "address_operand" "")) + (match_operand 2 "" ""))) + (use (match_operand 3 "" "")) + (use (scratch:SI)) + (return)])] + "" + " + { + #if TARGET_MACHO + if (flag_pic) + operands[1] = machopic_indirect_call_target (operands[1]); + #endif + + if (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != CONST_INT) + abort (); + + operands[1] = XEXP (operands[1], 0); + + }") + + (define_insn "*sibcall_value_nonlocal_sysv" + [(set (match_operand 0 "" "") + (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s,s")) + (match_operand 2 "" ""))) + (use (match_operand:SI 3 "immediate_operand" "O,n")) + (use (match_scratch:SI 4 "=l,l")) + (return)] + "(DEFAULT_ABI == ABI_DARWIN + || DEFAULT_ABI == ABI_V4 + || DEFAULT_ABI == ABI_AIX_NODESC) + && (INTVAL (operands[3]) & CALL_LONG) == 0" + "* + { + if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) + output_asm_insn (\"crxor 6,6,6\", operands); + + else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) + output_asm_insn (\"creqv 6,6,6\", operands); + + return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z1@plt\" : \"b %z1\"; + }" + [(set_attr "type" "branch,branch") + (set_attr "length" "4,8")]) + + (define_expand "sibcall_epilogue" + [(use (const_int 0))] + "TARGET_SCHED_PROLOG" + " + { + rs6000_emit_epilogue (TRUE); + DONE; + }") + ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and ;; all of memory. This blocks insns from being moved across this point. *************** *** 10328,10334 **** (define_expand "cmpdf" [(set (cc0) (compare (match_operand:DF 0 "gpc_reg_operand" "") (match_operand:DF 1 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" " { rs6000_compare_op0 = operands[0]; --- 11313,11319 ---- (define_expand "cmpdf" [(set (cc0) (compare (match_operand:DF 0 "gpc_reg_operand" "") (match_operand:DF 1 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" " { rs6000_compare_op0 = operands[0]; *************** *** 10340,10346 **** (define_expand "cmptf" [(set (cc0) (compare (match_operand:TF 0 "gpc_reg_operand" "") (match_operand:TF 1 "gpc_reg_operand" "")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" " { rs6000_compare_op0 = operands[0]; --- 11325,11332 ---- (define_expand "cmptf" [(set (cc0) (compare (match_operand:TF 0 "gpc_reg_operand" "") (match_operand:TF 1 "gpc_reg_operand" "")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT ! && TARGET_FPRS && TARGET_LONG_DOUBLE_128" " { rs6000_compare_op0 = operands[0]; *************** *** 10575,10581 **** with C to get the sign-extended value. */ HOST_WIDE_INT c = INTVAL (operands[2]); ! HOST_WIDE_INT sextc = (c & 0x7fff) - (c & 0x8000); HOST_WIDE_INT xorv = c ^ sextc; operands[4] = GEN_INT (xorv); --- 11561,11567 ---- with C to get the sign-extended value. */ HOST_WIDE_INT c = INTVAL (operands[2]); ! HOST_WIDE_INT sextc = ((c & 0xffff) ^ 0x8000) - 0x8000; HOST_WIDE_INT xorv = c ^ sextc; operands[4] = GEN_INT (xorv); *************** *** 10647,10653 **** [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) --- 11633,11639 ---- [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) *************** *** 10655,10661 **** [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) --- 11641,11647 ---- [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_FPRS" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) *************** *** 10664,10670 **** [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") (match_operand:TF 2 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_LONG_DOUBLE_128" "fcmpu %0,%1,%2\;bne %0,$+4\;fcmpu %0,%L1,%L2" [(set_attr "type" "fpcompare") (set_attr "length" "12")]) --- 11650,11657 ---- [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") (match_operand:TF 2 "gpc_reg_operand" "f")))] ! "DEFAULT_ABI == ABI_AIX && TARGET_HARD_FLOAT && TARGET_FPRS ! && TARGET_LONG_DOUBLE_128" "fcmpu %0,%1,%2\;bne %0,$+4\;fcmpu %0,%L1,%L2" [(set_attr "type" "fpcompare") (set_attr "length" "12")]) *************** *** 10683,10688 **** --- 11670,11684 ---- (const_int 0)]))] "" "%D1mfcr %0\;{rlinm|rlwinm} %0,%0,%J1,1" + [(set_attr "type" "cr_logical") + (set_attr "length" "12")]) + + ;; Same as above, but get the OV/ORDERED bit. + (define_insn "move_from_CR_ov_bit" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (unspec:SI [(match_operand 1 "cc_reg_operand" "y")] 724))] + "TARGET_ISEL" + "%D1mfcr %0\;{rlinm|rlwinm} %0,%0,%t1,1" [(set_attr "length" "12")]) (define_insn "" *************** *** 10692,10698 **** (const_int 0)]))] "TARGET_POWERPC64" "%D1mfcr %0\;{rlinm|rlwinm} %0,%0,%J1,1" ! [(set_attr "length" "12")]) (define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y") --- 11688,11695 ---- (const_int 0)]))] "TARGET_POWERPC64" "%D1mfcr %0\;{rlinm|rlwinm} %0,%0,%J1,1" ! [(set_attr "type" "cr_logical") ! (set_attr "length" "12")]) (define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y") *************** *** 10748,10754 **** return \"%D1mfcr %0\;{rlinm|rlwinm} %0,%0,%4,%5,%5\"; }" ! [(set_attr "length" "12")]) (define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y") --- 11745,11752 ---- return \"%D1mfcr %0\;{rlinm|rlwinm} %0,%0,%4,%5,%5\"; }" ! [(set_attr "type" "cr_logical") ! (set_attr "length" "12")]) (define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y") *************** *** 10761,10767 **** (set (match_operand:SI 4 "gpc_reg_operand" "=r,r") (ashift:SI (match_op_dup 1 [(match_dup 2) (const_int 0)]) (match_dup 3)))] ! "! TARGET_POWERPC64" "* { int is_bit = ccr_bit (operands[1], 1); --- 11759,11765 ---- (set (match_operand:SI 4 "gpc_reg_operand" "=r,r") (ashift:SI (match_op_dup 1 [(match_dup 2) (const_int 0)]) (match_dup 3)))] ! "" "* { int is_bit = ccr_bit (operands[1], 1); *************** *** 10796,10802 **** (set (match_operand:SI 4 "gpc_reg_operand" "") (ashift:SI (match_op_dup 1 [(match_dup 2) (const_int 0)]) (match_dup 3)))] ! "! TARGET_POWERPC64 && reload_completed" [(set (match_dup 4) (ashift:SI (match_op_dup 1 [(match_dup 2) (const_int 0)]) (match_dup 3))) --- 11794,11800 ---- (set (match_operand:SI 4 "gpc_reg_operand" "") (ashift:SI (match_op_dup 1 [(match_dup 2) (const_int 0)]) (match_dup 3)))] ! "reload_completed" [(set (match_dup 4) (ashift:SI (match_op_dup 1 [(match_dup 2) (const_int 0)]) (match_dup 3))) *************** *** 10817,10825 **** (match_operator:SI 4 "scc_comparison_operator" [(match_operand 5 "cc_reg_operand" "y") (const_int 0)]))] ! "REGNO (operands[2]) != REGNO (operands[5])" ! "%D1%D4mfcr %3\;{rlinm|rlwinm} %0,%3,%J1,1\;{rlinm|rlwinm} %3,%3,%J4,1" ! [(set_attr "length" "20")]) (define_peephole [(set (match_operand:DI 0 "gpc_reg_operand" "=r") --- 11815,11824 ---- (match_operator:SI 4 "scc_comparison_operator" [(match_operand 5 "cc_reg_operand" "y") (const_int 0)]))] ! "REGNO (operands[2]) != REGNO (operands[5])" ! "%D1%D4mfcr %3\;{rlinm|rlwinm} %0,%3,%J1,1\;{rlinm|rlwinm} %3,%3,%J4,1" ! [(set_attr "type" "cr_logical") ! (set_attr "length" "20")]) (define_peephole [(set (match_operand:DI 0 "gpc_reg_operand" "=r") *************** *** 10830,10838 **** (match_operator:DI 4 "scc_comparison_operator" [(match_operand 5 "cc_reg_operand" "y") (const_int 0)]))] ! "TARGET_POWERPC64 && REGNO (operands[2]) != REGNO (operands[5])" ! "%D1%D4mfcr %3\;{rlinm|rlwinm} %0,%3,%J1,1\;{rlinm|rlwinm} %3,%3,%J4,1" ! [(set_attr "length" "20")]) ;; There are some scc insns that can be done directly, without a compare. ;; These are faster because they don't involve the communications between --- 11829,11838 ---- (match_operator:DI 4 "scc_comparison_operator" [(match_operand 5 "cc_reg_operand" "y") (const_int 0)]))] ! "TARGET_POWERPC64 && REGNO (operands[2]) != REGNO (operands[5])" ! "%D1%D4mfcr %3\;{rlinm|rlwinm} %0,%3,%J1,1\;{rlinm|rlwinm} %3,%3,%J4,1" ! [(set_attr "type" "cr_logical") ! (set_attr "length" "20")]) ;; There are some scc insns that can be done directly, without a compare. ;; These are faster because they don't involve the communications between *************** *** 11095,11101 **** (lshiftrt:SI (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r"))) (const_int 31))) (clobber (match_scratch:SI 2 "=&r"))] ! "! TARGET_POWER && ! TARGET_POWERPC64" "{ai|addic} %2,%1,-1\;{sfe|subfe} %0,%2,%1" [(set_attr "length" "8")]) --- 12095,12101 ---- (lshiftrt:SI (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r"))) (const_int 31))) (clobber (match_scratch:SI 2 "=&r"))] ! "! TARGET_POWER && ! TARGET_POWERPC64 && !TARGET_ISEL" "{ai|addic} %2,%1,-1\;{sfe|subfe} %0,%2,%1" [(set_attr "length" "8")]) *************** *** 11160,11168 **** (clobber (match_scratch:SI 4 ""))] "! TARGET_POWERPC64 && reload_completed" [(parallel [(set (match_dup 3) ! (plus:SI (lshiftrt:SI (neg:SI (abs:SI (match_dup 1))) ! (const_int 31)) ! (match_dup 2))) (clobber (match_dup 4))]) (set (match_dup 0) (compare:CC (match_dup 3) --- 12160,12168 ---- (clobber (match_scratch:SI 4 ""))] "! TARGET_POWERPC64 && reload_completed" [(parallel [(set (match_dup 3) ! (plus:SI (lshiftrt:SI (neg:SI (abs:SI (match_dup 1))) ! (const_int 31)) ! (match_dup 2))) (clobber (match_dup 4))]) (set (match_dup 0) (compare:CC (match_dup 3) *************** *** 13054,13060 **** "cc_reg_operand" "y") (const_int 0)]) (const_int 0)))] ! "" "{crnor %E0,%j1,%j1|crnot %E0,%j1}" [(set_attr "type" "cr_logical")]) --- 14054,14060 ---- "cc_reg_operand" "y") (const_int 0)]) (const_int 0)))] ! "!TARGET_SPE" "{crnor %E0,%j1,%j1|crnot %E0,%j1}" [(set_attr "type" "cr_logical")]) *************** *** 13308,13314 **** return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrsi_internal2" [(set (pc) --- 14308,14314 ---- return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrsi_internal2" [(set (pc) *************** *** 13332,13338 **** return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrdi_internal1" [(set (pc) --- 14332,14338 ---- return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrdi_internal1" [(set (pc) *************** *** 13356,13362 **** return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrdi_internal2" [(set (pc) --- 14356,14362 ---- return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrdi_internal2" [(set (pc) *************** *** 13380,13386 **** return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) ;; Similar, but we can use GE since we have a REG_NONNEG. --- 14380,14386 ---- return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) ;; Similar, but we can use GE since we have a REG_NONNEG. *************** *** 13406,13412 **** return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrsi_internal4" [(set (pc) --- 14406,14412 ---- return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrsi_internal4" [(set (pc) *************** *** 13430,13436 **** return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrdi_internal3" [(set (pc) --- 14430,14436 ---- return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrdi_internal3" [(set (pc) *************** *** 13454,13460 **** return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrdi_internal4" [(set (pc) --- 14454,14460 ---- return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrdi_internal4" [(set (pc) *************** *** 13478,13484 **** return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) ;; Similar but use EQ --- 14478,14484 ---- return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) ;; Similar but use EQ *************** *** 13504,13510 **** return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrsi_internal6" [(set (pc) --- 14504,14510 ---- return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrsi_internal6" [(set (pc) *************** *** 13528,13534 **** return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrdi_internal5" [(set (pc) --- 14528,14534 ---- return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrdi_internal5" [(set (pc) *************** *** 13552,13558 **** return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) (define_insn "*ctrdi_internal6" [(set (pc) --- 14552,14558 ---- return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) (define_insn "*ctrdi_internal6" [(set (pc) *************** *** 13576,13582 **** return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "*,12,16")]) ;; Now the splitters if we could not allocate the CTR register --- 14576,14582 ---- return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") ! (set_attr "length" "4,12,16")]) ;; Now the splitters if we could not allocate the CTR register *************** *** 13738,13744 **** (unspec:SI [(reg:CC 68) (reg:CC 69) (reg:CC 70) (reg:CC 71) (reg:CC 72) (reg:CC 73) (reg:CC 74) (reg:CC 75)] 19))] "" ! "mfcr %0") (define_insn "*stmw" [(match_parallel 0 "stmw_operation" --- 14738,14745 ---- (unspec:SI [(reg:CC 68) (reg:CC 69) (reg:CC 70) (reg:CC 71) (reg:CC 72) (reg:CC 73) (reg:CC 74) (reg:CC 75)] 19))] "" ! "mfcr %0" ! [(set_attr "type" "cr_logical")]) (define_insn "*stmw" [(match_parallel 0 "stmw_operation" *************** *** 13789,13805 **** ; faster; for instance, on the 601 and 750. (define_expand "movsi_to_cr_one" ! [(set (match_operand:CC 0 "cc_reg_operand" "=y") ! (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ! (match_dup 2)] 20))] ! "" ! "operands[2] = GEN_INT (1 << (75 - REGNO (operands[0])));") (define_insn "*movsi_to_cr" ! [(match_parallel 0 "mtcrf_operation" ! [(set (match_operand:CC 1 "cc_reg_operand" "=y") ! (unspec:CC [(match_operand:SI 2 "gpc_reg_operand" "r") ! (match_operand 3 "immediate_operand" "n")] 20))])] "" "* --- 14790,14806 ---- ; faster; for instance, on the 601 and 750. (define_expand "movsi_to_cr_one" ! [(set (match_operand:CC 0 "cc_reg_operand" "=y") ! (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ! (match_dup 2)] 20))] ! "" ! "operands[2] = GEN_INT (1 << (75 - REGNO (operands[0])));") (define_insn "*movsi_to_cr" ! [(match_parallel 0 "mtcrf_operation" ! [(set (match_operand:CC 1 "cc_reg_operand" "=y") ! (unspec:CC [(match_operand:SI 2 "gpc_reg_operand" "r") ! (match_operand 3 "immediate_operand" "n")] 20))])] "" "* *************** *** 13810,13837 **** mask |= INTVAL (XVECEXP (SET_SRC (XVECEXP (operands[0], 0, i)), 0, 1)); operands[4] = GEN_INT (mask); return \"mtcrf %4,%2\"; ! }") (define_insn "" ! [(set (match_operand:CC 0 "cc_reg_operand" "=y") ! (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ! (match_operand 2 "immediate_operand" "n")] 20))] ! "GET_CODE (operands[0]) == REG ! && CR_REGNO_P (REGNO (operands[0])) ! && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 1 << (75 - REGNO (operands[0]))" ! "mtcrf %R0,%1") ; The load-multiple instructions have similar properties. ; Note that "load_multiple" is a name known to the machine-independent ; code that actually corresponds to the powerpc load-string. (define_insn "*lmw" ! [(match_parallel 0 "lmw_operation" ! [(set (match_operand:SI 1 "gpc_reg_operand" "=r") ! (match_operand:SI 2 "memory_operand" "m"))])] ! "TARGET_MULTIPLE" ! "{lm|lmw} %1,%2") (define_insn "*return_internal_si" [(return) --- 14811,14840 ---- mask |= INTVAL (XVECEXP (SET_SRC (XVECEXP (operands[0], 0, i)), 0, 1)); operands[4] = GEN_INT (mask); return \"mtcrf %4,%2\"; ! }" ! [(set_attr "type" "cr_logical")]) (define_insn "" ! [(set (match_operand:CC 0 "cc_reg_operand" "=y") ! (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r") ! (match_operand 2 "immediate_operand" "n")] 20))] ! "GET_CODE (operands[0]) == REG ! && CR_REGNO_P (REGNO (operands[0])) ! && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) == 1 << (75 - REGNO (operands[0]))" ! "mtcrf %R0,%1" ! [(set_attr "type" "cr_logical")]) ; The load-multiple instructions have similar properties. ; Note that "load_multiple" is a name known to the machine-independent ; code that actually corresponds to the powerpc load-string. (define_insn "*lmw" ! [(match_parallel 0 "lmw_operation" ! [(set (match_operand:SI 1 "gpc_reg_operand" "=r") ! (match_operand:SI 2 "memory_operand" "m"))])] ! "TARGET_MULTIPLE" ! "{lm|lmw} %1,%2") (define_insn "*return_internal_si" [(return) *************** *** 13947,15796 **** return INTVAL (operands[1]) ? \"dcbtst %a0\" : \"dcbt %a0\"; }" [(set_attr "type" "load")]) - - ;; AltiVec patterns - - ;; Generic LVX load instruction. - (define_insn "altivec_lvx_4si" - [(set (match_operand:V4SI 0 "altivec_register_operand" "=v") - (match_operand:V4SI 1 "memory_operand" "m"))] - "TARGET_ALTIVEC" - "lvx %0,%y1" - [(set_attr "type" "vecload")]) - - (define_insn "altivec_lvx_8hi" - [(set (match_operand:V8HI 0 "altivec_register_operand" "=v") - (match_operand:V8HI 1 "memory_operand" "m"))] - "TARGET_ALTIVEC" - "lvx %0,%y1" - [(set_attr "type" "vecload")]) - - (define_insn "altivec_lvx_16qi" - [(set (match_operand:V16QI 0 "altivec_register_operand" "=v") - (match_operand:V16QI 1 "memory_operand" "m"))] - "TARGET_ALTIVEC" - "lvx %0,%y1" - [(set_attr "type" "vecload")]) - - (define_insn "altivec_lvx_4sf" - [(set (match_operand:V4SF 0 "altivec_register_operand" "=v") - (match_operand:V4SF 1 "memory_operand" "m"))] - "TARGET_ALTIVEC" - "lvx %0,%y1" - [(set_attr "type" "vecload")]) - - ;; Generic STVX store instruction. - (define_insn "altivec_stvx_4si" - [(set (match_operand:V4SI 0 "memory_operand" "=m") - (match_operand:V4SI 1 "altivec_register_operand" "v"))] - "TARGET_ALTIVEC" - "stvx %1,%y0" - [(set_attr "type" "vecstore")]) - - (define_insn "altivec_stvx_8hi" - [(set (match_operand:V8HI 0 "memory_operand" "=m") - (match_operand:V8HI 1 "altivec_register_operand" "v"))] - "TARGET_ALTIVEC" - "stvx %1,%y0" - [(set_attr "type" "vecstore")]) - - (define_insn "altivec_stvx_16qi" - [(set (match_operand:V16QI 0 "memory_operand" "=m") - (match_operand:V16QI 1 "altivec_register_operand" "v"))] - "TARGET_ALTIVEC" - "stvx %1,%y0" - [(set_attr "type" "vecstore")]) - - (define_insn "altivec_stvx_4sf" - [(set (match_operand:V4SF 0 "memory_operand" "=m") - (match_operand:V4SF 1 "altivec_register_operand" "v"))] - "TARGET_ALTIVEC" - "stvx %1,%y0" - [(set_attr "type" "vecstore")]) - - ;; Vector move instructions. - (define_expand "movv4si" - [(set (match_operand:V4SI 0 "nonimmediate_operand" "") - (match_operand:V4SI 1 "any_operand" ""))] - "TARGET_ALTIVEC" - "{ rs6000_emit_move (operands[0], operands[1], V4SImode); DONE; }") - - (define_insn "*movv4si_internal" - [(set (match_operand:V4SI 0 "nonimmediate_operand" "=m,v,v,o,r,r") - (match_operand:V4SI 1 "input_operand" "v,m,v,r,o,r"))] - "TARGET_ALTIVEC" - "@ - stvx %1,%y0 - lvx %0,%y1 - vor %0,%1,%1 - stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 - lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 - mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" - [(set_attr "type" "altivec") - (set_attr "length" "*,*,*,16,16,16")]) - - (define_expand "movv8hi" - [(set (match_operand:V8HI 0 "nonimmediate_operand" "") - (match_operand:V8HI 1 "any_operand" ""))] - "TARGET_ALTIVEC" - "{ rs6000_emit_move (operands[0], operands[1], V8HImode); DONE; }") - - (define_insn "*movv8hi_internal1" - [(set (match_operand:V8HI 0 "nonimmediate_operand" "=m,v,v,o,r,r") - (match_operand:V8HI 1 "input_operand" "v,m,v,r,o,r"))] - "TARGET_ALTIVEC" - "@ - stvx %1,%y0 - lvx %0,%y1 - vor %0,%1,%1 - stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 - lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 - mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" - [(set_attr "type" "altivec") - (set_attr "length" "*,*,*,16,16,16")]) - - (define_expand "movv16qi" - [(set (match_operand:V16QI 0 "nonimmediate_operand" "") - (match_operand:V16QI 1 "any_operand" ""))] - "TARGET_ALTIVEC" - "{ rs6000_emit_move (operands[0], operands[1], V16QImode); DONE; }") - - (define_insn "*movv16qi_internal1" - [(set (match_operand:V16QI 0 "nonimmediate_operand" "=m,v,v,o,r,r") - (match_operand:V16QI 1 "input_operand" "v,m,v,r,o,r"))] - "TARGET_ALTIVEC" - "@ - stvx %1,%y0 - lvx %0,%y1 - vor %0,%1,%1 - stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 - lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 - mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" - [(set_attr "type" "altivec") - (set_attr "length" "*,*,*,16,16,16")]) - - (define_expand "movv4sf" - [(set (match_operand:V4SF 0 "nonimmediate_operand" "") - (match_operand:V4SF 1 "any_operand" ""))] - "TARGET_ALTIVEC" - "{ rs6000_emit_move (operands[0], operands[1], V4SFmode); DONE; }") - - (define_insn "*movv4sf_internal1" - [(set (match_operand:V4SF 0 "nonimmediate_operand" "=m,v,v,o,r,r") - (match_operand:V4SF 1 "input_operand" "v,m,v,r,o,r"))] - "TARGET_ALTIVEC" - "@ - stvx %1,%y0 - lvx %0,%y1 - vor %0,%1,%1 - stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0 - lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1 - mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1" - [(set_attr "type" "altivec") - (set_attr "length" "*,*,*,16,16,16")]) - - (define_insn "get_vrsave_internal" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(reg:SI 109)] 214))] - "TARGET_ALTIVEC" - "* - { - if (TARGET_MACHO) - return \"mtspr 256,%0\"; - else - return \"mtvrsave %0\"; - }" - [(set_attr "type" "altivec")]) - - (define_insn "*set_vrsave_internal" - [(match_parallel 0 "vrsave_operation" - [(set (reg:SI 109) - (unspec_volatile:SI [(match_operand:SI 1 "register_operand" "r") - (reg:SI 109)] 30))])] - "TARGET_ALTIVEC" - "* - { - if (TARGET_MACHO) - return \"mfspr %1,256\"; - else - return \"mtvrsave %1\"; - }" - [(set_attr "type" "altivec")]) - - ;; Vector clears - (define_insn "*movv4si_const0" - [(set (match_operand:V4SI 0 "altivec_register_operand" "=v") - (match_operand:V4SI 1 "zero_constant" ""))] - "TARGET_ALTIVEC" - "vxor %0,%0,%0" - [(set_attr "type" "vecsimple")]) - - (define_insn "*movv4sf_const0" - [(set (match_operand:V4SF 0 "altivec_register_operand" "=v") - (match_operand:V4SF 1 "zero_constant" ""))] - - "TARGET_ALTIVEC" - "vxor %0,%0,%0" - [(set_attr "type" "vecsimple")]) - - (define_insn "*movv8hi_const0" - [(set (match_operand:V8HI 0 "altivec_register_operand" "=v") - (match_operand:V8HI 1 "zero_constant" ""))] - "TARGET_ALTIVEC" - "vxor %0,%0,%0" - [(set_attr "type" "vecsimple")]) - - (define_insn "*movv16qi_const0" - [(set (match_operand:V16QI 0 "altivec_register_operand" "=v") - (match_operand:V16QI 1 "zero_constant" ""))] - "TARGET_ALTIVEC" - "vxor %0,%0,%0" - [(set_attr "type" "vecsimple")]) - - ;; Simple binary operations. - - (define_insn "addv16qi3" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (plus:V16QI (match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")))] - "TARGET_ALTIVEC" - "vaddubm %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "addv8hi3" - [(set (match_operand:V8HI 0 "register_operand" "=v") - (plus:V8HI (match_operand:V8HI 1 "register_operand" "v") - (match_operand:V8HI 2 "register_operand" "v")))] - "TARGET_ALTIVEC" - "vadduhm %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "addv4si3" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (plus:V4SI (match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")))] - "TARGET_ALTIVEC" - "vadduwm %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "addv4sf3" - [(set (match_operand:V4SF 0 "register_operand" "=v") - (plus:V4SF (match_operand:V4SF 1 "register_operand" "v") - (match_operand:V4SF 2 "register_operand" "v")))] - "TARGET_ALTIVEC" - "vaddfp %0,%1,%2" - [(set_attr "type" "vecfloat")]) - - (define_insn "altivec_vaddcuw" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")] 35))] - "TARGET_ALTIVEC" - "vaddcuw %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vaddubs" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")] 36))] - "TARGET_ALTIVEC" - "vaddubs %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vaddsbs" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")] 37))] - "TARGET_ALTIVEC" - "vaddsbs %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vadduhs" - [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") - (match_operand:V8HI 2 "register_operand" "v")] 38))] - "TARGET_ALTIVEC" - "vadduhs %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vaddshs" - [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") - (match_operand:V8HI 2 "register_operand" "v")] 39))] - "TARGET_ALTIVEC" - "vaddshs %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vadduws" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")] 40))] - "TARGET_ALTIVEC" - "vadduws %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vaddsws" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")] 41))] - "TARGET_ALTIVEC" - "vaddsws %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "andv4si3" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (and:V4SI (match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")))] - "TARGET_ALTIVEC" - "vand %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vandc" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (and:V4SI (match_operand:V4SI 1 "register_operand" "v") - (not:V4SI (match_operand:V4SI 2 "register_operand" "v"))))] - "TARGET_ALTIVEC" - "vandc %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vavgub" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")] 44))] - "TARGET_ALTIVEC" - "vavgub %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vavgsb" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")] 45))] - "TARGET_ALTIVEC" - "vavgsb %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vavguh" - [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") - (match_operand:V8HI 2 "register_operand" "v")] 46))] - "TARGET_ALTIVEC" - "vavguh %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vavgsh" - [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") - (match_operand:V8HI 2 "register_operand" "v")] 47))] - "TARGET_ALTIVEC" - "vavgsh %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vavguw" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")] 48))] - "TARGET_ALTIVEC" - "vavguw %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vavgsw" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")] 49))] - "TARGET_ALTIVEC" - "vavgsw %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vcmpbfp" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") - (match_operand:V4SF 2 "register_operand" "v")] 50))] - "TARGET_ALTIVEC" - "vcmpbfp %0,%1,%2" - [(set_attr "type" "veccmp")]) - - (define_insn "altivec_vcmpequb" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")] 51))] - "TARGET_ALTIVEC" - "vcmpequb %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vcmpequh" - [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") - (match_operand:V8HI 2 "register_operand" "v")] 52))] - "TARGET_ALTIVEC" - "vcmpequh %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vcmpequw" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") - (match_operand:V4SI 2 "register_operand" "v")] 53))] - "TARGET_ALTIVEC" - "vcmpequw %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vcmpeqfp" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") - (match_operand:V4SF 2 "register_operand" "v")] 54))] - "TARGET_ALTIVEC" - "vcmpeqfp %0,%1,%2" - [(set_attr "type" "veccmp")]) - - (define_insn "altivec_vcmpgefp" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") - (match_operand:V4SF 2 "register_operand" "v")] 55))] - "TARGET_ALTIVEC" - "vcmpgefp %0,%1,%2" - [(set_attr "type" "veccmp")]) - - (define_insn "altivec_vcmpgtub" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")] 56))] - "TARGET_ALTIVEC" - "vcmpgtub %0,%1,%2" - [(set_attr "type" "vecsimple")]) - - (define_insn "altivec_vcmpgtsb" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") - (match_operand:V16QI 2 "register_operand" "v")] 57))] - "TARGET_ALTIVEC" - "vcmpgtsb %0,%1,%2" - [(set_attr "type" "vecsimple")]) ! (define_insn "altivec_vcmpgtuh" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 58))] ! "TARGET_ALTIVEC" ! "vcmpgtuh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vcmpgtsh" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 59))] ! "TARGET_ALTIVEC" ! "vcmpgtsh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vcmpgtuw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 60))] ! "TARGET_ALTIVEC" ! "vcmpgtuw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vcmpgtsw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 61))] ! "TARGET_ALTIVEC" ! "vcmpgtsw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vcmpgtfp" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v")] 62))] ! "TARGET_ALTIVEC" ! "vcmpgtfp %0,%1,%2" ! [(set_attr "type" "veccmp")]) ! ! ;; Fused multiply add ! (define_insn "altivec_vmaddfp" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (plus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v")) ! (match_operand:V4SF 3 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaddfp %0,%1,%2,%3" ! [(set_attr "type" "vecfloat")]) ! ! ;; The unspec here is a vec splat of 0. We do multiply as a fused ! ;; multiply-add with an add of a 0 vector. ! ! (define_expand "mulv4sf3" ! [(set (match_dup 3) (unspec:V4SF [(const_int 0)] 142)) ! (set (match_operand:V4SF 0 "register_operand" "=v") ! (plus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v")) ! (match_dup 3)))] ! "TARGET_ALTIVEC && TARGET_FUSED_MADD" ! " ! { operands[3] = gen_reg_rtx (V4SFmode); }") ! ! ;; Fused multiply subtract ! (define_insn "altivec_vnmsubfp" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (minus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v")) ! (match_operand:V4SF 3 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vnmsubfp %0,%1,%2,%3" ! [(set_attr "type" "vecfloat")]) ! ! ! (define_insn "altivec_vmsumubm" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 65))] ! "TARGET_ALTIVEC" ! "vmsumubm %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmsummbm" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 66))] ! "TARGET_ALTIVEC" ! "vmsumubm %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmsumuhm" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 67))] ! "TARGET_ALTIVEC" ! "vmsumuhm %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmsumshm" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 68))] ! "TARGET_ALTIVEC" ! "vmsumshm %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmsumuhs" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 69))] ! "TARGET_ALTIVEC" ! "vmsumuhs %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmsumshs" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 70))] ! "TARGET_ALTIVEC" ! "vmsumshs %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "umaxv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (umax:V16QI (match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaxub %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "smaxv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (smax:V16QI (match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaxsb %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "umaxv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (umax:V8HI (match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaxuh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "smaxv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (smax:V8HI (match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaxsh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "umaxv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (umax:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaxuw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "smaxv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (smax:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaxsw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "smaxv4sf3" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (smax:V4SF (match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vmaxfp %0,%1,%2" ! [(set_attr "type" "veccmp")]) ! ! (define_insn "altivec_vmhaddshs" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V8HI 3 "register_operand" "v")] 71))] ! "TARGET_ALTIVEC" ! "vmhaddshs %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! (define_insn "altivec_vmhraddshs" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V8HI 3 "register_operand" "v")] 72))] ! "TARGET_ALTIVEC" ! "vmhraddshs %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! (define_insn "altivec_vmladduhm" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V8HI 3 "register_operand" "v")] 73))] ! "TARGET_ALTIVEC" ! "vmladduhm %0, %1, %2, %3" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmrghb" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 1 "register_operand" "v") ! (parallel [(const_int 8) ! (const_int 9) ! (const_int 10) ! (const_int 11) ! (const_int 12) ! (const_int 13) ! (const_int 14) ! (const_int 15) ! (const_int 0) ! (const_int 1) ! (const_int 2) ! (const_int 3) ! (const_int 4) ! (const_int 5) ! (const_int 6) ! (const_int 7)])) ! (match_operand:V16QI 2 "register_operand" "v") ! (const_int 255)))] ! "TARGET_ALTIVEC" ! "vmrghb %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vmrghh" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (vec_merge:V8HI (vec_select:V8HI (match_operand:V8HI 1 "register_operand" "v") ! (parallel [(const_int 4) ! (const_int 5) ! (const_int 6) ! (const_int 7) ! (const_int 0) ! (const_int 1) ! (const_int 2) ! (const_int 3)])) ! (match_operand:V8HI 2 "register_operand" "v") ! (const_int 15)))] ! "TARGET_ALTIVEC" ! "vmrghh %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vmrghw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (vec_merge:V4SI (vec_select:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (parallel [(const_int 2) ! (const_int 3) ! (const_int 0) ! (const_int 1)])) ! (match_operand:V4SI 2 "register_operand" "v") ! (const_int 12)))] ! "TARGET_ALTIVEC" ! "vmrghw %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vmrglb" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 2 "register_operand" "v") ! (parallel [(const_int 8) ! (const_int 9) ! (const_int 10) ! (const_int 11) ! (const_int 12) ! (const_int 13) ! (const_int 14) ! (const_int 15) ! (const_int 0) ! (const_int 1) ! (const_int 2) ! (const_int 3) ! (const_int 4) ! (const_int 5) ! (const_int 6) ! (const_int 7)])) ! (match_operand:V16QI 1 "register_operand" "v") ! (const_int 255)))] ! "TARGET_ALTIVEC" ! "vmrglb %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vmrglh" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (vec_merge:V8HI (vec_select:V8HI (match_operand:V8HI 2 "register_operand" "v") ! (parallel [(const_int 4) ! (const_int 5) ! (const_int 6) ! (const_int 7) ! (const_int 0) ! (const_int 1) ! (const_int 2) ! (const_int 3)])) ! (match_operand:V8HI 1 "register_operand" "v") ! (const_int 15)))] ! "TARGET_ALTIVEC" ! "vmrglh %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vmrglw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (vec_merge:V4SI (vec_select:V4SI (match_operand:V4SI 2 "register_operand" "v") ! (parallel [(const_int 2) ! (const_int 3) ! (const_int 0) ! (const_int 1)])) ! (match_operand:V4SI 1 "register_operand" "v") ! (const_int 12)))] ! "TARGET_ALTIVEC" ! "vmrglw %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "uminv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (umin:V16QI (match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vminub %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "sminv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (smin:V16QI (match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vminsb %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "uminv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (umin:V8HI (match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vminuh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "sminv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (smin:V8HI (match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vminsh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "uminv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (umin:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vminuw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "sminv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (smin:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vminsw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "sminv4sf3" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (smin:V4SF (match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vminfp %0,%1,%2" ! [(set_attr "type" "veccmp")]) ! ! (define_insn "altivec_vmuleub" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 83))] ! "TARGET_ALTIVEC" ! "vmuleub %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmulesb" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 84))] ! "TARGET_ALTIVEC" ! "vmulesb %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmuleuh" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 85))] ! "TARGET_ALTIVEC" ! "vmuleuh %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmulesh" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 86))] ! "TARGET_ALTIVEC" ! "vmulesh %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmuloub" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 87))] ! "TARGET_ALTIVEC" ! "vmuloub %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmulosb" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 88))] ! "TARGET_ALTIVEC" ! "vmulosb %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmulouh" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 89))] ! "TARGET_ALTIVEC" ! "vmulouh %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vmulosh" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 90))] ! "TARGET_ALTIVEC" ! "vmulosh %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vnor" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (not:V4SI (ior:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v"))))] ! "TARGET_ALTIVEC" ! "vnor %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "iorv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (ior:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vor %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vpkuhum" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 93))] ! "TARGET_ALTIVEC" ! "vpkuhum %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkuwum" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 94))] ! "TARGET_ALTIVEC" ! "vpkuwum %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkpx" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 95))] ! "TARGET_ALTIVEC" ! "vpkpx %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkuhss" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 96))] ! "TARGET_ALTIVEC" ! "vpkuhss %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkshss" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 97))] ! "TARGET_ALTIVEC" ! "vpkshss %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkuwss" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 98))] ! "TARGET_ALTIVEC" ! "vpkuwss %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkswss" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 99))] ! "TARGET_ALTIVEC" ! "vpkswss %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkuhus" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 100))] ! "TARGET_ALTIVEC" ! "vpkuhus %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkshus" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 101))] ! "TARGET_ALTIVEC" ! "vpkshus %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkuwus" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 102))] ! "TARGET_ALTIVEC" ! "vpkuwus %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vpkswus" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 103))] ! "TARGET_ALTIVEC" ! "vpkswus %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vrlb" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 104))] ! "TARGET_ALTIVEC" ! "vrlb %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vrlh" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 105))] ! "TARGET_ALTIVEC" ! "vrlh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vrlw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 106))] ! "TARGET_ALTIVEC" ! "vrlw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vslb" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 107))] ! "TARGET_ALTIVEC" ! "vslb %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vslh" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 108))] ! "TARGET_ALTIVEC" ! "vslh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vslw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 109))] ! "TARGET_ALTIVEC" ! "vslw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsl" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 110))] ! "TARGET_ALTIVEC" ! "vsl %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vslo" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 111))] ! "TARGET_ALTIVEC" ! "vslo %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsrb" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 112))] ! "TARGET_ALTIVEC" ! "vsrb %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsrh" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 113))] ! "TARGET_ALTIVEC" ! "vsrh %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsrw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 114))] ! "TARGET_ALTIVEC" ! "vsrw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsrab" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 115))] ! "TARGET_ALTIVEC" ! "vsrab %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsrah" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 116))] ! "TARGET_ALTIVEC" ! "vsrah %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsraw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 117))] ! "TARGET_ALTIVEC" ! "vsraw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsr" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 118))] ! "TARGET_ALTIVEC" ! "vsr %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsro" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 119))] ! "TARGET_ALTIVEC" ! "vsro %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "subv16qi3" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (minus:V16QI (match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vsububm %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "subv8hi3" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (minus:V8HI (match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vsubuhm %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "subv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (minus:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vsubuwm %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "subv4sf3" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (minus:V4SF (match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vsubfp %0,%1,%2" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vsubcuw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 124))] ! "TARGET_ALTIVEC" ! "vsubcuw %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsububs" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 125))] ! "TARGET_ALTIVEC" ! "vsububs %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsubsbs" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v")] 126))] ! "TARGET_ALTIVEC" ! "vsubsbs %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsubuhs" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 127))] ! "TARGET_ALTIVEC" ! "vsubuhs %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsubshs" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v")] 128))] ! "TARGET_ALTIVEC" ! "vsubshs %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsubuws" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 129))] ! "TARGET_ALTIVEC" ! "vsubuws %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsubsws" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 130))] ! "TARGET_ALTIVEC" ! "vsubsws %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vsum4ubs" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 131))] ! "TARGET_ALTIVEC" ! "vsum4ubs %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vsum4sbs" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 132))] ! "TARGET_ALTIVEC" ! "vsum4sbs %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vsum4shs" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 133))] ! "TARGET_ALTIVEC" ! "vsum4shs %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vsum2sws" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 134))] ! "TARGET_ALTIVEC" ! "vsum2sws %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "altivec_vsumsws" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")] 135))] ! "TARGET_ALTIVEC" ! "vsumsws %0,%1,%2" ! [(set_attr "type" "veccomplex")]) ! ! (define_insn "xorv4si3" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (xor:V4SI (match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vxor %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vspltb" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:QI 2 "immediate_operand" "i")] 136))] ! "TARGET_ALTIVEC" ! "vspltb %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsplth" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:QI 2 "immediate_operand" "i")] 137))] ! "TARGET_ALTIVEC" ! "vsplth %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vspltw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:QI 2 "immediate_operand" "i")] 138))] ! "TARGET_ALTIVEC" ! "vspltw %0,%1,%2" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vspltisb" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:QI 1 "immediate_operand" "i")] 139))] ! "TARGET_ALTIVEC" ! "vspltisb %0, %1" ! [(set_attr "type" "vecsimple")]) ! ! ! (define_insn "altivec_vspltish" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:QI 1 "immediate_operand" "i")] 140))] ! "TARGET_ALTIVEC" ! "vspltish %0, %1" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_vspltisw" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:QI 1 "immediate_operand" "i")] 141))] ! "TARGET_ALTIVEC" ! "vspltisw %0, %1" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:QI 1 "immediate_operand" "i")] 142))] ! "TARGET_ALTIVEC" ! "vspltisw %0, %1" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "ftruncv4sf2" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (fix:V4SF (match_operand:V4SF 1 "register_operand" "v")))] ! "TARGET_ALTIVEC" ! "vrfiz %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vperm_4si" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v") ! (match_operand:V16QI 3 "register_operand" "v")] 144))] ! "TARGET_ALTIVEC" ! "vperm %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vperm_4sf" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v") ! (match_operand:V16QI 3 "register_operand" "v")] 145))] ! "TARGET_ALTIVEC" ! "vperm %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vperm_8hi" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V16QI 3 "register_operand" "v")] 146))] ! "TARGET_ALTIVEC" ! "vperm %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vperm_16qi" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v") ! (match_operand:V16QI 3 "register_operand" "v")] 147))] ! "TARGET_ALTIVEC" ! "vperm %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vrfip" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 148))] ! "TARGET_ALTIVEC" ! "vrfip %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vrfin" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 149))] ! "TARGET_ALTIVEC" ! "vrfin %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vrfim" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 150))] ! "TARGET_ALTIVEC" ! "vrfim %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vcfux" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:QI 2 "immediate_operand" "i")] 151))] ! "TARGET_ALTIVEC" ! "vcfux %0, %1, %2" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vcfsx" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:QI 2 "immediate_operand" "i")] 152))] ! "TARGET_ALTIVEC" ! "vcfsx %0, %1, %2" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vctuxs" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") ! (match_operand:QI 2 "immediate_operand" "i")] 153))] ! "TARGET_ALTIVEC" ! "vctuxs %0, %1, %2" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vctsxs" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v") ! (match_operand:QI 2 "immediate_operand" "i")] 154))] ! "TARGET_ALTIVEC" ! "vctsxs %0, %1, %2" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vlogefp" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 155))] ! "TARGET_ALTIVEC" ! "vlogefp %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vexptefp" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 156))] ! "TARGET_ALTIVEC" ! "vexptefp %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vrsqrtefp" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 157))] ! "TARGET_ALTIVEC" ! "vrsqrtefp %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vrefp" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] 158))] ! "TARGET_ALTIVEC" ! "vrefp %0, %1" ! [(set_attr "type" "vecfloat")]) ! ! (define_insn "altivec_vsel_4si" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 159))] ! "TARGET_ALTIVEC" ! "vsel %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsel_4sf" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v") ! (match_operand:V4SI 3 "register_operand" "v")] 160))] ! "TARGET_ALTIVEC" ! "vsel %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsel_8hi" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:V8HI 3 "register_operand" "v")] 161))] ! "TARGET_ALTIVEC" ! "vsel %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsel_16qi" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v") ! (match_operand:V16QI 3 "register_operand" "v")] 162))] ! "TARGET_ALTIVEC" ! "vsel %0,%1,%2,%3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsldoi_4si" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v") ! (match_operand:QI 3 "immediate_operand" "i")] 163))] ! "TARGET_ALTIVEC" ! "vsldoi %0, %1, %2, %3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsldoi_4sf" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v") ! (match_operand:QI 3 "immediate_operand" "i")] 164))] ! "TARGET_ALTIVEC" ! "vsldoi %0, %1, %2, %3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsldoi_8hi" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand:QI 3 "immediate_operand" "i")] 165))] ! "TARGET_ALTIVEC" ! "vsldoi %0, %1, %2, %3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vsldoi_16qi" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v") ! (match_operand:QI 3 "immediate_operand" "i")] 166))] ! "TARGET_ALTIVEC" ! "vsldoi %0, %1, %2, %3" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vupkhsb" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] 167))] ! "TARGET_ALTIVEC" ! "vupkhsb %0, %1" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vupkhpx" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 168))] ! "TARGET_ALTIVEC" ! "vupkhpx %0, %1" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vupkhsh" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 169))] ! "TARGET_ALTIVEC" ! "vupkhsh %0, %1" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vupklsb" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] 170))] ! "TARGET_ALTIVEC" ! "vupklsb %0, %1" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vupklpx" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 171))] ! "TARGET_ALTIVEC" ! "vupklpx %0, %1" ! [(set_attr "type" "vecperm")]) ! ! (define_insn "altivec_vupklsh" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 172))] ! "TARGET_ALTIVEC" ! "vupklsh %0, %1" ! [(set_attr "type" "vecperm")]) ! ! ;; AltiVec predicates. ! ! (define_expand "cr6_test_for_zero" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (eq:SI (reg:CC 74) ! (const_int 0)))] ! "TARGET_ALTIVEC" ! "") ! ! (define_expand "cr6_test_for_zero_reverse" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (eq:SI (reg:CC 74) ! (const_int 0))) ! (set (match_dup 0) (minus:SI (const_int 1) (match_dup 0)))] ! "TARGET_ALTIVEC" ! "") ! ! (define_expand "cr6_test_for_lt" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (lt:SI (reg:CC 74) ! (const_int 0)))] ! "TARGET_ALTIVEC" ! "") ! ! (define_expand "cr6_test_for_lt_reverse" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (lt:SI (reg:CC 74) ! (const_int 0))) ! (set (match_dup 0) (minus:SI (const_int 1) (match_dup 0)))] ! "TARGET_ALTIVEC" ! "") ! ! ;; We can get away with generating the opcode on the fly (%3 below) ! ;; because all the predicates have the same scheduling parameters. ! ! (define_insn "altivec_predicate_v4si" ! [(set (reg:CC 74) ! (unspec:CC [(match_operand:V4SI 1 "register_operand" "v") ! (match_operand:V4SI 2 "register_operand" "v") ! (match_operand 3 "any_operand" "")] 173)) ! (clobber (match_scratch:V4SI 0 "=v"))] ! "TARGET_ALTIVEC" ! "%3 %0,%1,%2" ! [(set_attr "type" "veccmp")]) ! ! (define_insn "altivec_predicate_v4sf" ! [(set (reg:CC 74) ! (unspec:CC [(match_operand:V4SF 1 "register_operand" "v") ! (match_operand:V4SF 2 "register_operand" "v") ! (match_operand 3 "any_operand" "")] 174)) ! (clobber (match_scratch:V4SF 0 "=v"))] ! "TARGET_ALTIVEC" ! "%3 %0,%1,%2" ! [(set_attr "type" "veccmp")]) ! ! (define_insn "altivec_predicate_v8hi" ! [(set (reg:CC 74) ! (unspec:CC [(match_operand:V8HI 1 "register_operand" "v") ! (match_operand:V8HI 2 "register_operand" "v") ! (match_operand 3 "any_operand" "")] 175)) ! (clobber (match_scratch:V8HI 0 "=v"))] ! "TARGET_ALTIVEC" ! "%3 %0,%1,%2" ! [(set_attr "type" "veccmp")]) ! ! (define_insn "altivec_predicate_v16qi" ! [(set (reg:CC 74) ! (unspec:CC [(match_operand:V16QI 1 "register_operand" "v") ! (match_operand:V16QI 2 "register_operand" "v") ! (match_operand 3 "any_operand" "")] 175)) ! (clobber (match_scratch:V16QI 0 "=v"))] ! "TARGET_ALTIVEC" ! "%3 %0,%1,%2" ! [(set_attr "type" "veccmp")]) ! ! (define_insn "altivec_mtvscr" ! [(unspec [(match_operand:V4SI 0 "register_operand" "v")] 186)] ! "TARGET_ALTIVEC" ! "mtvscr %0" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_mfvscr" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(const_int 0)] 187))] ! "TARGET_ALTIVEC" ! "mfvscr %0" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_dssall" ! [(unspec [(const_int 0)] 188)] ! "TARGET_ALTIVEC" ! "dssall" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_dss" ! [(unspec [(match_operand:QI 0 "immediate_operand" "i")] 189)] ! "TARGET_ALTIVEC" ! "dss %0" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_dst" ! [(unspec [(match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r") ! (match_operand:QI 2 "immediate_operand" "i")] 190)] ! "TARGET_ALTIVEC" ! "dst %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_dstt" ! [(unspec [(match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r") ! (match_operand:QI 2 "immediate_operand" "i")] 191)] ! "TARGET_ALTIVEC" ! "dstt %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_dstst" ! [(unspec [(match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r") ! (match_operand:QI 2 "immediate_operand" "i")] 192)] ! "TARGET_ALTIVEC" ! "dstst %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_dststt" ! [(unspec [(match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r") ! (match_operand:QI 2 "immediate_operand" "i")] 193)] ! "TARGET_ALTIVEC" ! "dststt %0,%1,%2" ! [(set_attr "type" "vecsimple")]) ! ! (define_insn "altivec_lvsl" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:SI 1 "register_operand" "b") ! (match_operand:SI 2 "register_operand" "r")] 194))] ! "TARGET_ALTIVEC" ! "lvsl %0,%1,%2" ! [(set_attr "type" "vecload")]) ! ! (define_insn "altivec_lvsr" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:SI 1 "register_operand" "b") ! (match_operand:SI 2 "register_operand" "r")] 195))] ! "TARGET_ALTIVEC" ! "lvsr %0,%1,%2" ! [(set_attr "type" "vecload")]) ! ! ;; Parallel some of the LVE* and STV*'s with unspecs because some have ! ;; identical rtl but different instructions-- and gcc gets confused. ! ! (define_insn "altivec_lvebx" ! [(parallel ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (mem:V16QI (plus:SI (match_operand:SI 1 "register_operand" "b") ! (match_operand:SI 2 "register_operand" "r")))) ! (unspec [(const_int 0)] 196)])] ! "TARGET_ALTIVEC" ! "lvebx %0,%1,%2" ! [(set_attr "type" "vecload")]) ! ! (define_insn "altivec_lvehx" ! [(parallel ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (mem:V8HI ! (and:SI (plus:SI (match_operand:SI 1 "register_operand" "b") ! (match_operand:SI 2 "register_operand" "r")) ! (const_int -2)))) ! (unspec [(const_int 0)] 197)])] ! "TARGET_ALTIVEC" ! "lvehx %0,%1,%2" ! [(set_attr "type" "vecload")]) ! ! (define_insn "altivec_lvewx" ! [(parallel ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (mem:V4SI ! (and:SI (plus:SI (match_operand:SI 1 "register_operand" "b") ! (match_operand:SI 2 "register_operand" "r")) ! (const_int -4)))) ! (unspec [(const_int 0)] 198)])] ! "TARGET_ALTIVEC" ! "lvewx %0,%1,%2" ! [(set_attr "type" "vecload")]) ! ! (define_insn "altivec_lvxl" ! [(parallel ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (mem:V4SI (plus:SI (match_operand:SI 1 "register_operand" "b") ! (match_operand:SI 2 "register_operand" "r")))) ! (unspec [(const_int 0)] 213)])] ! "TARGET_ALTIVEC" ! "lvxl %0,%1,%2" ! [(set_attr "type" "vecload")]) ! ! (define_insn "altivec_lvx" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (mem:V4SI (plus:SI (match_operand:SI 1 "register_operand" "b") ! (match_operand:SI 2 "register_operand" "r"))))] ! "TARGET_ALTIVEC" ! "lvx %0,%1,%2" ! [(set_attr "type" "vecload")]) ! ! (define_insn "altivec_stvx" ! [(parallel ! [(set (mem:V4SI ! (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r")) ! (const_int -16))) ! (match_operand:V4SI 2 "register_operand" "v")) ! (unspec [(const_int 0)] 201)])] ! "TARGET_ALTIVEC" ! "stvx %2,%0,%1" ! [(set_attr "type" "vecstore")]) ! ! (define_insn "altivec_stvxl" ! [(parallel ! [(set (mem:V4SI ! (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r")) ! (const_int -16))) ! (match_operand:V4SI 2 "register_operand" "v")) ! (unspec [(const_int 0)] 202)])] ! "TARGET_ALTIVEC" ! "stvxl %2,%0,%1" ! [(set_attr "type" "vecstore")]) ! ! (define_insn "altivec_stvebx" ! [(parallel ! [(set (mem:V16QI ! (plus:SI (match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r"))) ! (match_operand:V16QI 2 "register_operand" "v")) ! (unspec [(const_int 0)] 203)])] ! "TARGET_ALTIVEC" ! "stvebx %2,%0,%1" ! [(set_attr "type" "vecstore")]) ! ! (define_insn "altivec_stvehx" ! [(parallel ! [(set (mem:V8HI ! (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r")) ! (const_int -2))) ! (match_operand:V8HI 2 "register_operand" "v")) ! (unspec [(const_int 0)] 204)])] ! "TARGET_ALTIVEC" ! "stvehx %2,%0,%1" ! [(set_attr "type" "vecstore")]) ! ! (define_insn "altivec_stvewx" ! [(parallel ! [(set (mem:V4SI ! (and:SI (plus:SI (match_operand:SI 0 "register_operand" "b") ! (match_operand:SI 1 "register_operand" "r")) ! (const_int -4))) ! (match_operand:V4SI 2 "register_operand" "v")) ! (unspec [(const_int 0)] 205)])] ! "TARGET_ALTIVEC" ! "stvewx %2,%0,%1" ! [(set_attr "type" "vecstore")]) ! ! (define_insn "absv16qi2" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (abs:V16QI (match_operand:V16QI 1 "register_operand" "v"))) ! (clobber (match_scratch:V16QI 2 "=v")) ! (clobber (match_scratch:V16QI 3 "=v"))] ! "TARGET_ALTIVEC" ! "vspltisb %2,0\;vsububm %3,%2,%1\;vmaxsb %0,%1,%3" ! [(set_attr "type" "altivec") ! (set_attr "length" "12")]) ! ! (define_insn "absv8hi2" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (abs:V8HI (match_operand:V8HI 1 "register_operand" "v"))) ! (clobber (match_scratch:V8HI 2 "=v")) ! (clobber (match_scratch:V8HI 3 "=v"))] ! "TARGET_ALTIVEC" ! "vspltisb %2,0\;vsubuhm %3,%2,%1\;vmaxsh %0,%1,%3" ! [(set_attr "type" "altivec") ! (set_attr "length" "12")]) ! ! (define_insn "absv4si2" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (abs:V4SI (match_operand:V4SI 1 "register_operand" "v"))) ! (clobber (match_scratch:V4SI 2 "=v")) ! (clobber (match_scratch:V4SI 3 "=v"))] ! "TARGET_ALTIVEC" ! "vspltisb %2,0\;vsubuwm %3,%2,%1\;vmaxsw %0,%1,%3" ! [(set_attr "type" "altivec") ! (set_attr "length" "12")]) ! ! (define_insn "absv4sf2" ! [(set (match_operand:V4SF 0 "register_operand" "=v") ! (abs:V4SF (match_operand:V4SF 1 "register_operand" "v"))) ! (clobber (match_scratch:V4SF 2 "=v")) ! (clobber (match_scratch:V4SF 3 "=v"))] ! "TARGET_ALTIVEC" ! "vspltisw %2, -1\;vslw %3,%2,%2\;vandc %0,%1,%3" ! [(set_attr "type" "altivec") ! (set_attr "length" "12")]) ! ! (define_insn "altivec_abss_v16qi" ! [(set (match_operand:V16QI 0 "register_operand" "=v") ! (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")] 210)) ! (clobber (match_scratch:V16QI 2 "=v")) ! (clobber (match_scratch:V16QI 3 "=v"))] ! "TARGET_ALTIVEC" ! "vspltisb %2,0\;vsubsbs %3,%2,%1\;vmaxsb %0,%1,%3" ! [(set_attr "type" "altivec") ! (set_attr "length" "12")]) ! ! (define_insn "altivec_abss_v8hi" ! [(set (match_operand:V8HI 0 "register_operand" "=v") ! (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")] 211)) ! (clobber (match_scratch:V8HI 2 "=v")) ! (clobber (match_scratch:V8HI 3 "=v"))] ! "TARGET_ALTIVEC" ! "vspltisb %2,0\;vsubshs %3,%2,%1\;vmaxsh %0,%1,%3" ! [(set_attr "type" "altivec") ! (set_attr "length" "12")]) ! ! (define_insn "altivec_abss_v4si" ! [(set (match_operand:V4SI 0 "register_operand" "=v") ! (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")] 212)) ! (clobber (match_scratch:V4SI 2 "=v")) ! (clobber (match_scratch:V4SI 3 "=v"))] ! "TARGET_ALTIVEC" ! "vspltisb %2,0\;vsubsws %3,%2,%1\;vmaxsw %0,%1,%3" ! [(set_attr "type" "altivec") ! (set_attr "length" "12")]) --- 14950,14955 ---- return INTVAL (operands[1]) ? \"dcbtst %a0\" : \"dcbt %a0\"; }" [(set_attr "type" "load")]) ! (include "altivec.md") ! (include "spe.md") diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/rs6000-modes.def gcc-3.3/gcc/config/rs6000/rs6000-modes.def *** gcc-3.2.3/gcc/config/rs6000/rs6000-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/rs6000-modes.def 2002-06-10 22:35:54.000000000 +0000 *************** *** 0 **** --- 1,31 ---- + /* Definitions of target machine for GNU compiler, for IBM RS/6000. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + + For the RS/6000, we need separate modes when unsigned (logical) comparisons + are being done and we need a separate mode for floating-point. We also + use a mode for the case when we are comparing the results of two + comparisons, as then only the EQ bit is valid in the register. */ + + CC (CCUNS) + CC (CCFP) + CC (CCEQ) diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/rs6000-protos.h gcc-3.3/gcc/config/rs6000/rs6000-protos.h *** gcc-3.2.3/gcc/config/rs6000/rs6000-protos.h 2002-11-26 15:59:55.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/rs6000-protos.h 2002-11-16 18:01:50.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for IBM RS/6000. ! Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for IBM RS/6000. ! Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,31 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Declare functions in rs6000.c */ #ifdef RTX_CODE #ifdef TREE_CODE extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int)); ! extern void rs6000_va_start PARAMS ((int, tree, rtx)); #endif /* TREE_CODE */ extern struct rtx_def *rs6000_got_register PARAMS ((rtx)); --- 19,34 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #ifndef GCC_RS6000_PROTOS_H + #define GCC_RS6000_PROTOS_H + /* Declare functions in rs6000.c */ #ifdef RTX_CODE #ifdef TREE_CODE extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int)); ! extern void rs6000_va_start PARAMS ((tree, rtx)); #endif /* TREE_CODE */ extern struct rtx_def *rs6000_got_register PARAMS ((rtx)); *************** extern int non_add_cint_operand PARAMS ( *** 61,68 **** --- 64,75 ---- extern int non_logical_cint_operand PARAMS ((rtx, enum machine_mode)); extern int logical_operand PARAMS ((rtx, enum machine_mode)); extern int mask_operand PARAMS ((rtx, enum machine_mode)); + extern int mask_operand_wrap PARAMS ((rtx, enum machine_mode)); extern int mask64_operand PARAMS ((rtx, enum machine_mode)); + extern int mask64_2_operand PARAMS ((rtx, enum machine_mode)); + extern void build_mask64_2_operands PARAMS ((rtx, rtx *)); extern int and64_operand PARAMS ((rtx, enum machine_mode)); + extern int and64_2_operand PARAMS ((rtx, enum machine_mode)); extern int and_operand PARAMS ((rtx, enum machine_mode)); extern int count_register_operand PARAMS ((rtx, enum machine_mode)); extern int xer_operand PARAMS ((rtx, enum machine_mode)); *************** extern int addrs_ok_for_quad_peep PARAMS *** 96,101 **** --- 103,110 ---- extern enum reg_class secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx)); extern int ccr_bit PARAMS ((rtx, int)); + extern int extract_MB PARAMS ((rtx)); + extern int extract_ME PARAMS ((rtx)); extern void print_operand PARAMS ((FILE *, rtx, int)); extern void print_operand_address PARAMS ((FILE *, rtx)); extern enum rtx_code rs6000_reverse_condition PARAMS ((enum machine_mode, *************** extern rtx rs6000_legitimize_address PAR *** 120,127 **** extern rtx rs6000_legitimize_reload_address PARAMS ((rtx, enum machine_mode, int, int, int, int *)); extern int rs6000_legitimate_address PARAMS ((enum machine_mode, rtx, int)); - extern void rs6000_select_rtx_section PARAMS ((enum machine_mode, rtx)); - extern rtx rs6000_return_addr PARAMS ((int, rtx)); extern void rs6000_output_symbol_ref PARAMS ((FILE*, rtx)); --- 129,134 ---- *************** extern void setup_incoming_varargs PARAM *** 144,153 **** enum machine_mode, tree, int *, int)); extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree)); ! extern void output_mi_thunk PARAMS ((FILE *, tree, int, tree)); ! extern void rs6000_encode_section_info PARAMS ((tree)); ! extern void rs6000_select_section PARAMS ((tree, int)); ! extern void rs6000_unique_section PARAMS ((tree, int)); #ifdef ARGS_SIZE_RTX /* expr.h defines ARGS_SIZE_RTX and `enum direction' */ extern enum direction function_arg_padding PARAMS ((enum machine_mode, tree)); --- 151,157 ---- enum machine_mode, tree, int *, int)); extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree)); ! extern int function_ok_for_sibcall PARAMS ((tree)); #ifdef ARGS_SIZE_RTX /* expr.h defines ARGS_SIZE_RTX and `enum direction' */ extern enum direction function_arg_padding PARAMS ((enum machine_mode, tree)); *************** extern enum direction function_arg_paddi *** 158,165 **** extern void optimization_options PARAMS ((int, int)); extern void rs6000_override_options PARAMS ((const char *)); extern void rs6000_file_start PARAMS ((FILE *, const char *)); - extern struct rtx_def *rs6000_float_const PARAMS ((const char *, - enum machine_mode)); extern int direct_return PARAMS ((void)); extern union tree_node *rs6000_build_va_list PARAMS ((void)); extern int first_reg_to_save PARAMS ((void)); --- 162,167 ---- *************** extern void rs6000_emit_load_toc_table P *** 185,189 **** extern void rs6000_aix_emit_builtin_unwind_init PARAMS ((void)); extern void rs6000_emit_epilogue PARAMS ((int)); extern void debug_stack_info PARAMS ((rs6000_stack_t *)); ! extern void machopic_output_stub PARAMS ((FILE *, const char *, const char *)); --- 187,204 ---- extern void rs6000_aix_emit_builtin_unwind_init PARAMS ((void)); extern void rs6000_emit_epilogue PARAMS ((int)); extern void debug_stack_info PARAMS ((rs6000_stack_t *)); + extern const char * output_isel PARAMS ((rtx *)); + extern int vrsave_operation PARAMS ((rtx, enum machine_mode)); + extern int rs6000_register_move_cost PARAMS ((enum machine_mode, + enum reg_class, enum reg_class)); + extern int rs6000_memory_move_cost PARAMS ((enum machine_mode, + enum reg_class, int)); ! /* Declare functions in rs6000-c.c */ ! ! #ifdef GCC_CPPLIB_H ! extern void rs6000_pragma_longcall PARAMS ((cpp_reader *)); ! extern void rs6000_cpu_cpp_builtins PARAMS ((cpp_reader *)); ! #endif ! ! #endif /* rs6000-protos.h */ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/rtems.h gcc-3.3/gcc/config/rs6000/rtems.h *** gcc-3.2.3/gcc/config/rs6000/rtems.h 2003-01-30 14:03:42.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/rtems.h 2003-01-30 14:10:52.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 21,29 **** /* Specify predefined symbols in preprocessor. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-DPPC -D__rtems__ -D__USE_INIT_FINI__ \ ! -Asystem=rtems -Acpu=powerpc -Amachine=powerpc" #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)" --- 21,37 ---- /* Specify predefined symbols in preprocessor. */ ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("PPC"); \ ! builtin_define ("__rtems__"); \ ! builtin_assert ("system=rtems"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)" diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/softfloat.h gcc-3.3/gcc/config/rs6000/softfloat.h *** gcc-3.2.3/gcc/config/rs6000/softfloat.h 2001-11-13 22:08:28.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/softfloat.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,24 **** - /* Target definitions for GNU compiler for PowerPC defaulting to -msoft-float - Copyright (C) 2001 - Free Software Foundation, Inc. - Contributed by Red Hat Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #undef CPP_FLOAT_DEFAULT_SPEC - #define CPP_FLOAT_DEFAULT_SPEC "-D_SOFT_FLOAT" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/spe.h gcc-3.3/gcc/config/rs6000/spe.h *** gcc-3.2.3/gcc/config/rs6000/spe.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/spe.h 2003-03-10 18:54:48.000000000 +0000 *************** *** 0 **** --- 1,1096 ---- + /* PowerPC E500 user include file. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Contributed by Aldy Hernandez (aldyh@redhat.com). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* As a special exception, if you include this header file into source + files compiled by GCC, this header file does not by itself cause + the resulting executable to be covered by the GNU General Public + License. This exception does not however invalidate any other + reasons why the executable file might be covered by the GNU General + Public License. */ + + #ifndef _SPE_H + #define _SPE_H + + #define __vector __attribute__((vector_size(8))) + + typedef int int32_t; + typedef unsigned uint32_t; + typedef short int16_t; + typedef unsigned short uint16_t; + typedef long long int64_t; + typedef unsigned long long uint64_t; + + typedef short __vector __ev64_s16__; + typedef unsigned short __vector __ev64_u16__; + typedef int __vector __ev64_s32__; + typedef unsigned __vector __ev64_u32__; + typedef long long __vector __ev64_s64__; + typedef unsigned long long __vector __ev64_u64__; + typedef float __vector __ev64_fs__; + typedef int __vector __ev64_opaque__; + + #define __v2si __ev64_opaque__ + #define __v2sf __ev64_fs__ + + #define __ev_addw(a,b) __builtin_spe_evaddw((__v2si) (a), (__v2si) (b)) + #define __ev_addiw(a,b) __builtin_spe_evaddiw ((__v2si) (a), (b)) + #define __ev_subfw(a,b) __builtin_spe_evsubfw ((__v2si) (a), (__v2si) (b)) + #define __ev_subw(a,b) __builtin_spe_evsubfw ((__v2si) (b), (__v2si) (a)) + /* ??? The spe_evsubifw pattern accepts operands reversed, so we need to also + reverse them here between the intrinsic and the builtin function. */ + #define __ev_subifw(a,b) __builtin_spe_evsubifw ((__v2si) (b), (a)) + #define __ev_subiw(a,b) __builtin_spe_evsubifw ((__v2si) (a), (b)) + #define __ev_abs(a) __builtin_spe_evabs ((__v2si) (a)) + #define __ev_neg(a) __builtin_spe_evneg ((__v2si) (a)) + #define __ev_extsb(a) __builtin_spe_evextsb ((__v2si) (a)) + #define __ev_extsh(a) __builtin_spe_evextsh ((__v2si) (a)) + #define __ev_and(a,b) __builtin_spe_evand ((__v2si) (a), (__v2si) (b)) + #define __ev_or(a,b) __builtin_spe_evor ((__v2si) (a), (__v2si) (b)) + #define __ev_xor(a,b) __builtin_spe_evxor ((__v2si) (a), (__v2si) (b)) + #define __ev_nand(a,b) __builtin_spe_evnand ((__v2si) (a), (__v2si) (b)) + #define __ev_nor(a,b) __builtin_spe_evnor ((__v2si) (a), (__v2si) (b)) + #define __ev_eqv(a,b) __builtin_spe_eveqv ((__v2si) (a), (__v2si) (b)) + #define __ev_andc(a,b) __builtin_spe_evandc ((__v2si) (a), (__v2si) (b)) + #define __ev_orc(a,b) __builtin_spe_evorc ((__v2si) (a), (__v2si) (b)) + #define __ev_rlw(a,b) __builtin_spe_evrlw ((__v2si) (a), (__v2si) (b)) + #define __ev_rlwi(a,b) __builtin_spe_evrlwi ((__v2si) (a), (b)) + #define __ev_slw(a,b) __builtin_spe_evslw ((__v2si) (a), (__v2si) (b)) + #define __ev_slwi(a,b) __builtin_spe_evslwi ((__v2si) (a), (b)) + #define __ev_srws(a,b) __builtin_spe_evsrws ((__v2si) (a), (__v2si) (b)) + #define __ev_srwu(a,b) __builtin_spe_evsrwu ((__v2si) (a), (__v2si) (b)) + #define __ev_srwis(a,b) __builtin_spe_evsrwis ((__v2si) (a), (b)) + #define __ev_srwiu(a,b) __builtin_spe_evsrwiu ((__v2si) (a), (b)) + #define __ev_cntlzw(a) __builtin_spe_evcntlzw ((__v2si) (a)) + #define __ev_cntlsw(a) __builtin_spe_evcntlsw ((__v2si) (a)) + #define __ev_rndw(a) __builtin_spe_evrndw ((__v2si) (a)) + #define __ev_mergehi(a,b) __builtin_spe_evmergehi ((__v2si) (a), (__v2si) (b)) + #define __ev_mergelo(a,b) __builtin_spe_evmergelo ((__v2si) (a), (__v2si) (b)) + #define __ev_mergelohi(a,b) __builtin_spe_evmergelohi ((__v2si) (a), (__v2si) (b)) + #define __ev_mergehilo(a,b) __builtin_spe_evmergehilo ((__v2si) (a), (__v2si) (b)) + #define __ev_splati(a) __builtin_spe_evsplati ((a)) + #define __ev_splatfi(a) __builtin_spe_evsplatfi ((a)) + #define __ev_divws(a,b) __builtin_spe_evdivws ((__v2si) (a), (__v2si) (b)) + #define __ev_divwu(a,b) __builtin_spe_evdivwu ((__v2si) (a), (__v2si) (b)) + #define __ev_mra(a) __builtin_spe_evmra ((__v2si) (a)) + + #define __brinc __builtin_spe_brinc + + /* Loads. */ + + #define __ev_lddx(a,b) __builtin_spe_evlddx ((void *)(a), (b)) + #define __ev_ldwx(a,b) __builtin_spe_evldwx ((void *)(a), (b)) + #define __ev_ldhx(a,b) __builtin_spe_evldhx ((void *)(a), (b)) + #define __ev_lwhex(a,b) __builtin_spe_evlwhex ((a), (b)) + #define __ev_lwhoux(a,b) __builtin_spe_evlwhoux ((a), (b)) + #define __ev_lwhosx(a,b) __builtin_spe_evlwhosx ((a), (b)) + #define __ev_lwwsplatx(a,b) __builtin_spe_evlwwsplatx ((a), (b)) + #define __ev_lwhsplatx(a,b) __builtin_spe_evlwhsplatx ((a), (b)) + #define __ev_lhhesplatx(a,b) __builtin_spe_evlhhesplatx ((a), (b)) + #define __ev_lhhousplatx(a,b) __builtin_spe_evlhhousplatx ((a), (b)) + #define __ev_lhhossplatx(a,b) __builtin_spe_evlhhossplatx ((a), (b)) + #define __ev_ldd(a,b) __builtin_spe_evldd ((void *)(a), (b)) + #define __ev_ldw(a,b) __builtin_spe_evldw ((void *)(a), (b)) + #define __ev_ldh(a,b) __builtin_spe_evldh ((void *)(a), (b)) + #define __ev_lwhe(a,b) __builtin_spe_evlwhe ((a), (b)) + #define __ev_lwhou(a,b) __builtin_spe_evlwhou ((a), (b)) + #define __ev_lwhos(a,b) __builtin_spe_evlwhos ((a), (b)) + #define __ev_lwwsplat(a,b) __builtin_spe_evlwwsplat ((a), (b)) + #define __ev_lwhsplat(a,b) __builtin_spe_evlwhsplat ((a), (b)) + #define __ev_lhhesplat(a,b) __builtin_spe_evlhhesplat ((a), (b)) + #define __ev_lhhousplat(a,b) __builtin_spe_evlhhousplat ((a), (b)) + #define __ev_lhhossplat(a,b) __builtin_spe_evlhhossplat ((a), (b)) + + /* Stores. */ + + #define __ev_stddx(a,b,c) __builtin_spe_evstddx ((__v2si)(a), (void *)(b), (c)) + #define __ev_stdwx(a,b,c) __builtin_spe_evstdwx ((__v2si)(a), (void *)(b), (c)) + #define __ev_stdhx(a,b,c) __builtin_spe_evstdhx ((__v2si)(a), (void *)(b), (c)) + #define __ev_stwwex(a,b,c) __builtin_spe_evstwwex ((__v2si)(a), (b), (c)) + #define __ev_stwwox(a,b,c) __builtin_spe_evstwwox ((__v2si)(a), (b), (c)) + #define __ev_stwhex(a,b,c) __builtin_spe_evstwhex ((__v2si)(a), (b), (c)) + #define __ev_stwhox(a,b,c) __builtin_spe_evstwhox ((__v2si)(a), (b), (c)) + #define __ev_stdd(a,b,c) __builtin_spe_evstdd ((__v2si)(a), (void *)(b), (c)) + #define __ev_stdw(a,b,c) __builtin_spe_evstdw ((__v2si)(a), (void *)(b), (c)) + #define __ev_stdh(a,b,c) __builtin_spe_evstdh ((__v2si)(a), (void *)(b), (c)) + #define __ev_stwwe(a,b,c) __builtin_spe_evstwwe ((__v2si)(a), (b), (c)) + #define __ev_stwwo(a,b,c) __builtin_spe_evstwwo ((__v2si)(a), (b), (c)) + #define __ev_stwhe(a,b,c) __builtin_spe_evstwhe ((__v2si)(a), (b), (c)) + #define __ev_stwho(a,b,c) __builtin_spe_evstwho ((__v2si)(a), (b), (c)) + + /* Fixed point complex. */ + + #define __ev_mhossf(a, b) __builtin_spe_evmhossf ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmf(a, b) __builtin_spe_evmhosmf ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmi(a, b) __builtin_spe_evmhosmi ((__v2si) (a), (__v2si) (b)) + #define __ev_mhoumi(a, b) __builtin_spe_evmhoumi ((__v2si) (a), (__v2si) (b)) + #define __ev_mhessf(a, b) __builtin_spe_evmhessf ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmf(a, b) __builtin_spe_evmhesmf ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmi(a, b) __builtin_spe_evmhesmi ((__v2si) (a), (__v2si) (b)) + #define __ev_mheumi(a, b) __builtin_spe_evmheumi ((__v2si) (a), (__v2si) (b)) + #define __ev_mhossfa(a, b) __builtin_spe_evmhossfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmfa(a, b) __builtin_spe_evmhosmfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmia(a, b) __builtin_spe_evmhosmia ((__v2si) (a), (__v2si) (b)) + #define __ev_mhoumia(a, b) __builtin_spe_evmhoumia ((__v2si) (a), (__v2si) (b)) + #define __ev_mhessfa(a, b) __builtin_spe_evmhessfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmfa(a, b) __builtin_spe_evmhesmfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmia(a, b) __builtin_spe_evmhesmia ((__v2si) (a), (__v2si) (b)) + #define __ev_mheumia(a, b) __builtin_spe_evmheumia ((__v2si) (a), (__v2si) (b)) + + #define __ev_mhoumf __ev_mhoumi + #define __ev_mheumf __ev_mheumi + #define __ev_mhoumfa __ev_mhoumia + #define __ev_mheumfa __ev_mheumia + + #define __ev_mhossfaaw(a, b) __builtin_spe_evmhossfaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhossiaaw(a, b) __builtin_spe_evmhossiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmfaaw(a, b) __builtin_spe_evmhosmfaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmiaaw(a, b) __builtin_spe_evmhosmiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhousiaaw(a, b) __builtin_spe_evmhousiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhoumiaaw(a, b) __builtin_spe_evmhoumiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhessfaaw(a, b) __builtin_spe_evmhessfaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhessiaaw(a, b) __builtin_spe_evmhessiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmfaaw(a, b) __builtin_spe_evmhesmfaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmiaaw(a, b) __builtin_spe_evmhesmiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mheusiaaw(a, b) __builtin_spe_evmheusiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mheumiaaw(a, b) __builtin_spe_evmheumiaaw ((__v2si) (a), (__v2si) (b)) + + #define __ev_mhousfaaw __ev_mhousiaaw + #define __ev_mhoumfaaw __ev_mhoumiaaw + #define __ev_mheusfaaw __ev_mheusiaaw + #define __ev_mheumfaaw __ev_mheumiaaw + + #define __ev_mhossfanw(a, b) __builtin_spe_evmhossfanw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhossianw(a, b) __builtin_spe_evmhossianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmfanw(a, b) __builtin_spe_evmhosmfanw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhosmianw(a, b) __builtin_spe_evmhosmianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhousianw(a, b) __builtin_spe_evmhousianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhoumianw(a, b) __builtin_spe_evmhoumianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhessfanw(a, b) __builtin_spe_evmhessfanw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhessianw(a, b) __builtin_spe_evmhessianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmfanw(a, b) __builtin_spe_evmhesmfanw ((__v2si) (a), (__v2si) (b)) + #define __ev_mhesmianw(a, b) __builtin_spe_evmhesmianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mheusianw(a, b) __builtin_spe_evmheusianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mheumianw(a, b) __builtin_spe_evmheumianw ((__v2si) (a), (__v2si) (b)) + + #define __ev_mhousfanw __ev_mhousianw + #define __ev_mhoumfanw __ev_mhoumianw + #define __ev_mheusfanw __ev_mheusianw + #define __ev_mheumfanw __ev_mheumianw + + #define __ev_mhogsmfaa(a, b) __builtin_spe_evmhogsmfaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhogsmiaa(a, b) __builtin_spe_evmhogsmiaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhogumiaa(a, b) __builtin_spe_evmhogumiaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhegsmfaa(a, b) __builtin_spe_evmhegsmfaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhegsmiaa(a, b) __builtin_spe_evmhegsmiaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mhegumiaa(a, b) __builtin_spe_evmhegumiaa ((__v2si) (a), (__v2si) (b)) + + #define __ev_mhogumfaa __ev_mhogumiaa + #define __ev_mhegumfaa __ev_mhegumiaa + + #define __ev_mhogsmfan(a, b) __builtin_spe_evmhogsmfan ((__v2si) (a), (__v2si) (b)) + #define __ev_mhogsmian(a, b) __builtin_spe_evmhogsmian ((__v2si) (a), (__v2si) (b)) + #define __ev_mhogumian(a, b) __builtin_spe_evmhogumian ((__v2si) (a), (__v2si) (b)) + #define __ev_mhegsmfan(a, b) __builtin_spe_evmhegsmfan ((__v2si) (a), (__v2si) (b)) + #define __ev_mhegsmian(a, b) __builtin_spe_evmhegsmian ((__v2si) (a), (__v2si) (b)) + #define __ev_mhegumian(a, b) __builtin_spe_evmhegumian ((__v2si) (a), (__v2si) (b)) + + #define __ev_mhogumfan __ev_mhogumian + #define __ev_mhegumfan __ev_mhegumian + + #define __ev_mwhssf(a, b) __builtin_spe_evmwhssf ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmf(a, b) __builtin_spe_evmwhsmf ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmi(a, b) __builtin_spe_evmwhsmi ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhumi(a, b) __builtin_spe_evmwhumi ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhssfa(a, b) __builtin_spe_evmwhssfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmfa(a, b) __builtin_spe_evmwhsmfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmia(a, b) __builtin_spe_evmwhsmia ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhumia(a, b) __builtin_spe_evmwhumia ((__v2si) (a), (__v2si) (b)) + + #define __ev_mwhumf __ev_mwhumi + #define __ev_mwhumfa __ev_mwhumia + + #define __ev_mwlumi(a, b) __builtin_spe_evmwlumi ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlumia(a, b) __builtin_spe_evmwlumia ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlumiaaw(a, b) __builtin_spe_evmwlumiaaw ((__v2si) (a), (__v2si) (b)) + + #define __ev_mwlssiaaw(a, b) __builtin_spe_evmwlssiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlsmiaaw(a, b) __builtin_spe_evmwlsmiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlusiaaw(a, b) __builtin_spe_evmwlusiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlusiaaw(a, b) __builtin_spe_evmwlusiaaw ((__v2si) (a), (__v2si) (b)) + + #define __ev_mwlssianw(a, b) __builtin_spe_evmwlssianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlsmianw(a, b) __builtin_spe_evmwlsmianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlusianw(a, b) __builtin_spe_evmwlusianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwlumianw(a, b) __builtin_spe_evmwlumianw ((__v2si) (a), (__v2si) (b)) + + #define __ev_mwssf(a, b) __builtin_spe_evmwssf ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmf(a, b) __builtin_spe_evmwsmf ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmi(a, b) __builtin_spe_evmwsmi ((__v2si) (a), (__v2si) (b)) + #define __ev_mwumi(a, b) __builtin_spe_evmwumi ((__v2si) (a), (__v2si) (b)) + #define __ev_mwssfa(a, b) __builtin_spe_evmwssfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmfa(a, b) __builtin_spe_evmwsmfa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmia(a, b) __builtin_spe_evmwsmia ((__v2si) (a), (__v2si) (b)) + #define __ev_mwumia(a, b) __builtin_spe_evmwumia ((__v2si) (a), (__v2si) (b)) + + #define __ev_mwumf __ev_mwumi + #define __ev_mwumfa __ev_mwumia + + #define __ev_mwssfaa(a, b) __builtin_spe_evmwssfaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmfaa(a, b) __builtin_spe_evmwsmfaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmiaa(a, b) __builtin_spe_evmwsmiaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwumiaa(a, b) __builtin_spe_evmwumiaa ((__v2si) (a), (__v2si) (b)) + + #define __ev_mwumfaa __ev_mwumiaa + + #define __ev_mwssfan(a, b) __builtin_spe_evmwssfan ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmfan(a, b) __builtin_spe_evmwsmfan ((__v2si) (a), (__v2si) (b)) + #define __ev_mwsmian(a, b) __builtin_spe_evmwsmian ((__v2si) (a), (__v2si) (b)) + #define __ev_mwumian(a, b) __builtin_spe_evmwumian ((__v2si) (a), (__v2si) (b)) + + #define __ev_mwumfan __ev_mwumian + + #define __ev_addssiaaw(a) __builtin_spe_evaddssiaaw ((__v2si) (a)) + #define __ev_addsmiaaw(a) __builtin_spe_evaddsmiaaw ((__v2si) (a)) + #define __ev_addusiaaw(a) __builtin_spe_evaddusiaaw ((__v2si) (a)) + #define __ev_addumiaaw(a) __builtin_spe_evaddumiaaw ((__v2si) (a)) + + #define __ev_addusfaaw __ev_addusiaaw + #define __ev_addumfaaw __ev_addumiaaw + #define __ev_addsmfaaw __ev_addsmiaaw + #define __ev_addssfaaw __ev_addssiaaw + + #define __ev_subfssiaaw(a) __builtin_spe_evsubfssiaaw ((__v2si) (a)) + #define __ev_subfsmiaaw(a) __builtin_spe_evsubfsmiaaw ((__v2si) (a)) + #define __ev_subfusiaaw(a) __builtin_spe_evsubfusiaaw ((__v2si) (a)) + #define __ev_subfumiaaw(a) __builtin_spe_evsubfumiaaw ((__v2si) (a)) + + #define __ev_subfusfaaw __ev_subfusiaaw + #define __ev_subfumfaaw __ev_subfumiaaw + #define __ev_subfsmfaaw __ev_subfsmiaaw + #define __ev_subfssfaaw __ev_subfssiaaw + + /* Floating Point SIMD Instructions */ + + /* These all return V2SF, but we need to cast them to V2SI + because the SPE expect all functions to be __ev64_opaque__. */ + + #define __ev_fsabs(a) ((__v2si) __builtin_spe_evfsabs ((__v2sf) (a))) + #define __ev_fsnabs(a) ((__v2si) __builtin_spe_evfsnabs ((__v2sf) (a))) + #define __ev_fsneg(a) ((__v2si) __builtin_spe_evfsneg ((__v2sf) (a))) + #define __ev_fsadd(a, b) ((__v2si) __builtin_spe_evfsadd ((__v2sf) (a), (__v2sf) (b))) + #define __ev_fssub(a, b) ((__v2si) __builtin_spe_evfssub ((__v2sf) (a), (__v2sf) (b))) + #define __ev_fsmul(a, b) ((__v2si) __builtin_spe_evfsmul ((__v2sf) (a), (__v2sf) b)) + #define __ev_fsdiv(a, b) ((__v2si) __builtin_spe_evfsdiv ((__v2sf) (a), (__v2sf) b)) + #define __ev_fscfui(a) ((__v2si) __builtin_spe_evfscfui ((__v2si) (a))) + #define __ev_fscfsi(a) ((__v2si) __builtin_spe_evfscfsi ((__v2sf) (a))) + #define __ev_fscfuf(a) ((__v2si) __builtin_spe_evfscfuf ((__v2sf) (a))) + #define __ev_fscfsf(a) ((__v2si) __builtin_spe_evfscfsf ((__v2sf) (a))) + #define __ev_fsctui(a) ((__v2si) __builtin_spe_evfsctui ((__v2sf) (a))) + #define __ev_fsctsi(a) ((__v2si) __builtin_spe_evfsctsi ((__v2sf) (a))) + #define __ev_fsctuf(a) ((__v2si) __builtin_spe_evfsctuf ((__v2sf) (a))) + #define __ev_fsctsf(a) ((__v2si) __builtin_spe_evfsctsf ((__v2sf) (a))) + #define __ev_fsctuiz(a) ((__v2si) __builtin_spe_evfsctuiz ((__v2sf) (a))) + #define __ev_fsctsiz(a) ((__v2si) __builtin_spe_evfsctsiz ((__v2sf) (a))) + + /* NOT SUPPORTED IN FIRST e500, support via two instructions: */ + + #define __ev_mwhusfaaw __ev_mwhusiaaw + #define __ev_mwhumfaaw __ev_mwhumiaaw + #define __ev_mwhusfanw __ev_mwhusianw + #define __ev_mwhumfanw __ev_mwhumianw + #define __ev_mwhgumfaa __ev_mwhgumiaa + #define __ev_mwhgumfan __ev_mwhgumian + + #define __ev_mwhgssfaa(a, b) __internal_ev_mwhgssfaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhgsmfaa(a, b) __internal_ev_mwhgsmfaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhgsmiaa(a, b) __internal_ev_mwhgsmiaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhgumiaa(a, b) __internal_ev_mwhgumiaa ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhgssfan(a, b) __internal_ev_mwhgssfan ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhgsmfan(a, b) __internal_ev_mwhgsmfan ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhgsmian(a, b) __internal_ev_mwhgsmian ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhgumian(a, b) __internal_ev_mwhgumian ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhssiaaw(a, b) __internal_ev_mwhssiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhssfaaw(a, b) __internal_ev_mwhssfaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmfaaw(a, b) __internal_ev_mwhsmfaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmiaaw(a, b) __internal_ev_mwhsmiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhusiaaw(a, b) __internal_ev_mwhusiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhumiaaw(a, b) __internal_ev_mwhumiaaw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhssfanw(a, b) __internal_ev_mwhssfanw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhssianw(a, b) __internal_ev_mwhssianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmfanw(a, b) __internal_ev_mwhsmfanw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhsmianw(a, b) __internal_ev_mwhsmianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhusianw(a, b) __internal_ev_mwhusianw ((__v2si) (a), (__v2si) (b)) + #define __ev_mwhumianw(a, b) __internal_ev_mwhumianw ((__v2si) (a), (__v2si) (b)) + + static inline __ev64_opaque__ + __internal_ev_mwhssfaaw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhssf (a, b); + return __ev_addssiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhssiaaw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmi (a, b); + return __ev_addssiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhsmfaaw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmf (a, b); + return __ev_addsmiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhsmiaaw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmi (a, b); + return __ev_addsmiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhusiaaw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhumi (a, b); + return __ev_addusiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhumiaaw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhumi (a, b); + return __ev_addumiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhssfanw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhssf (a, b); + return __ev_subfssiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhssianw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmi (a, b); + return __ev_subfssiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhsmfanw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmf (a, b); + return __ev_subfsmiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhsmianw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmi (a, b); + return __ev_subfsmiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhusianw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhumi (a, b); + return __ev_subfusiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhumianw (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhumi (a, b); + return __ev_subfumiaaw (t); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgssfaa (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhssf (a, b); + return __ev_mwsmiaa (t, ((__ev64_s32__){1, 1})); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgsmfaa (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmf (a, b); + return __ev_mwsmiaa (t, ((__ev64_s32__){1, 1})); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgsmiaa (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmi (a, b); + return __ev_mwsmiaa (t, ((__ev64_s32__){1, 1})); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgumiaa (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhumi (a, b); + return __ev_mwumiaa (t, ((__ev64_s32__){1, 1})); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgssfan (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhssf (a, b); + return __ev_mwsmian (t, ((__ev64_s32__){1, 1})); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgsmfan (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmf (a, b); + return __ev_mwsmian (t, ((__ev64_s32__){1, 1})); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgsmian (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhsmi (a, b); + return __ev_mwsmian (t, ((__ev64_s32__){1, 1})); + } + + static inline __ev64_opaque__ + __internal_ev_mwhgumian (__ev64_opaque__ a, __ev64_opaque__ b) + { + __ev64_opaque__ t; + + t = __ev_mwhumi (a, b); + return __ev_mwumian (t, ((__ev64_s32__){1, 1})); + } + + /* END OF NOT SUPPORTED */ + + /* __ev_create* functions. */ + + #define __ev_create_ufix32_u32 __ev_create_u32 + #define __ev_create_sfix32_s32 __ev_create_s32 + + static inline __ev64_opaque__ + __ev_create_s16 (int16_t a, int16_t b, int16_t c, int16_t d) + { + union + { + __ev64_opaque__ v; + int16_t i[4]; + } u; + + u.i[0] = a; + u.i[1] = b; + u.i[2] = c; + u.i[3] = d; + + return u.v; + } + + static inline __ev64_opaque__ + __ev_create_u16 (uint16_t a, uint16_t b, uint16_t c, uint16_t d) + + { + union + { + __ev64_opaque__ v; + uint16_t i[4]; + } u; + + u.i[0] = a; + u.i[1] = b; + u.i[2] = c; + u.i[3] = d; + + return u.v; + } + + static inline __ev64_opaque__ + __ev_create_s32 (int32_t a, int32_t b) + { + union + { + __ev64_opaque__ v; + int32_t i[2]; + } u; + + u.i[0] = a; + u.i[1] = b; + + return u.v; + } + + static inline __ev64_opaque__ + __ev_create_u32 (uint32_t a, uint32_t b) + { + union + { + __ev64_opaque__ v; + uint32_t i[2]; + } u; + + u.i[0] = a; + u.i[1] = b; + + return u.v; + } + + static inline __ev64_opaque__ + __ev_create_fs (float a, float b) + { + union + { + __ev64_opaque__ v; + float f[2]; + } u; + + u.f[0] = a; + u.f[1] = b; + + return u.v; + } + + static inline __ev64_opaque__ + __ev_create_sfix32_fs (float a, float b) + { + __ev64_opaque__ ev; + + ev = (__ev64_opaque__) __ev_create_fs (a, b); + return (__ev64_opaque__) __builtin_spe_evfsctsf ((__v2sf) ev); + } + + static inline __ev64_opaque__ + __ev_create_ufix32_fs (float a, float b) + { + __ev64_opaque__ ev; + + ev = (__ev64_opaque__) __ev_create_fs (a, b); + return (__ev64_opaque__) __builtin_spe_evfsctuf ((__v2sf) ev); + } + + static inline __ev64_opaque__ + __ev_create_s64 (int64_t a) + { + union + { + __ev64_opaque__ v; + int64_t i; + } u; + + u.i = a; + return u.v; + } + + static inline __ev64_opaque__ + __ev_create_u64 (uint64_t a) + { + union + { + __ev64_opaque__ v; + uint64_t i; + } u; + + u.i = a; + return u.v; + } + + static inline uint64_t + __ev_convert_u64 (__ev64_opaque__ a) + { + return (uint64_t) a; + } + + static inline int64_t + __ev_convert_s64 (__ev64_opaque__ a) + { + return (int64_t) a; + } + + /* __ev_get_* functions. */ + + #define __ev_get_upper_u32(a) __ev_get_u32_internal ((__ev64_opaque__) (a), 0) + #define __ev_get_lower_u32(a) __ev_get_u32_internal ((__ev64_opaque__) (a), 1) + #define __ev_get_upper_s32(a) __ev_get_s32_internal ((__ev64_opaque__) (a), 0) + #define __ev_get_lower_s32(a) __ev_get_s32_internal ((__ev64_opaque__) (a), 1) + #define __ev_get_upper_fs(a) __ev_get_fs_internal ((__ev64_opaque__) (a), 0) + #define __ev_get_lower_fs(a) __ev_get_fs_internal ((__ev64_opaque__) (a), 1) + #define __ev_get_upper_ufix32_u32(a) __ev_get_upper_u32(a) + #define __ev_get_lower_ufix32_u32(a) __ev_get_lower_u32(a) + #define __ev_get_upper_sfix32_s32(a) __ev_get_upper_s32(a) + #define __ev_get_lower_sfix32_s32(a) __ev_get_lower_s32(a) + #define __ev_get_upper_sfix32_fs(a) __ev_get_sfix32_fs (a, 0) + #define __ev_get_lower_sfix32_fs(a) __ev_get_sfix32_fs (a, 1) + #define __ev_get_upper_ufix32_fs(a) __ev_get_ufix32_fs (a, 0) + #define __ev_get_lower_ufix32_fs(a) __ev_get_ufix32_fs (a, 1) + + #define __ev_get_u32(a, b) __ev_get_u32_internal ((__ev64_opaque__) (a), b) + #define __ev_get_s32(a, b) __ev_get_s32_internal ((__ev64_opaque__) (a), b) + #define __ev_get_fs(a, b) __ev_get_fs_internal ((__ev64_opaque__) (a), b) + #define __ev_get_u16(a, b) __ev_get_u16_internal ((__ev64_opaque__) (a), b) + #define __ev_get_s16(a, b) __ev_get_s16_internal ((__ev64_opaque__) (a), b) + + #define __ev_get_ufix32_u32(a, b) __ev_get_u32 (a, b) + #define __ev_get_sfix32_s32(a, b) __ev_get_s32 (a, b) + #define __ev_get_ufix32_fs(a, b) __ev_get_ufix32_fs_internal ((__ev64_opaque__)(a), b) + #define __ev_get_sfix32_fs(a, b) __ev_get_sfix32_fs_internal ((__ev64_opaque__)(a), b) + + static inline uint32_t + __ev_get_u32_internal (__ev64_opaque__ a, uint32_t pos) + { + union + { + __ev64_opaque__ v; + uint32_t i[2]; + } u; + + u.v = a; + return u.i[pos]; + } + + static inline int32_t + __ev_get_s32_internal (__ev64_opaque__ a, uint32_t pos) + { + union + { + __ev64_opaque__ v; + int32_t i[2]; + } u; + + u.v = a; + return u.i[pos]; + } + + static inline float + __ev_get_fs_internal (__ev64_opaque__ a, uint32_t pos) + { + union + { + __ev64_opaque__ v; + float f[2]; + } u; + + u.v = a; + return u.f[pos]; + } + + static inline float + __ev_get_sfix32_fs_internal (__ev64_opaque__ a, uint32_t pos) + { + __ev64_fs__ v; + + v = __builtin_spe_evfscfsf ((__v2sf) a); + return __ev_get_fs_internal ((__ev64_opaque__) v, pos); + } + + static inline float + __ev_get_ufix32_fs_internal (__ev64_opaque__ a, uint32_t pos) + { + __ev64_fs__ v; + + v = __builtin_spe_evfscfuf ((__v2sf) a); + return __ev_get_fs_internal ((__ev64_opaque__) v, pos); + } + + static inline uint16_t + __ev_get_u16_internal (__ev64_opaque__ a, uint32_t pos) + { + union + { + __ev64_opaque__ v; + uint16_t i[4]; + } u; + + u.v = a; + return u.i[pos]; + } + + static inline int16_t + __ev_get_s16_internal (__ev64_opaque__ a, uint32_t pos) + { + union + { + __ev64_opaque__ v; + int16_t i[4]; + } u; + + u.v = a; + return u.i[pos]; + } + + /* __ev_set_* functions. */ + + #define __ev_set_u32(a, b, c) __ev_set_u32_internal ((__ev64_opaque__) a, b, c) + #define __ev_set_s32(a, b, c) __ev_set_s32_internal ((__ev64_opaque__) a, b, c) + #define __ev_set_fs(a, b, c) __ev_set_fs_internal ((__ev64_opaque__) a, b, c) + #define __ev_set_u16(a, b, c) __ev_set_u16_internal ((__ev64_opaque__) a, b, c) + #define __ev_set_s16(a, b, c) __ev_set_s16_internal ((__ev64_opaque__) a, b, c) + + #define __ev_set_ufix32_u32 __ev_set_u32 + #define __ev_set_sfix32_s32 __ev_set_s32 + + #define __ev_set_sfix32_fs(a, b, c) __ev_set_sfix32_fs_internal ((__ev64_opaque__) (a), b, c) + #define __ev_set_ufix32_fs(a, b, c) __ev_set_ufix32_fs_internal ((__ev64_opaque__) (a), b, c) + + #define __ev_set_upper_u32(a, b) __ev_set_u32 (a, b, 0) + #define __ev_set_lower_u32(a, b) __ev_set_u32 (a, b, 1) + #define __ev_set_upper_s32(a, b) __ev_set_s32 (a, b, 0) + #define __ev_set_lower_s32(a, b) __ev_set_s32 (a, b, 1) + #define __ev_set_upper_fs(a, b) __ev_set_fs (a, b, 0) + #define __ev_set_lower_fs(a, b) __ev_set_fs (a, b, 1) + #define __ev_set_upper_ufix32_u32 __ev_set_upper_u32 + #define __ev_set_lower_ufix32_u32 __ev_set_lower_u32 + #define __ev_set_upper_sfix32_s32 __ev_set_upper_s32 + #define __ev_set_lower_sfix32_s32 __ev_set_lower_s32 + #define __ev_set_upper_sfix32_fs(a, b) __ev_set_sfix32_fs (a, b, 0) + #define __ev_set_lower_sfix32_fs(a, b) __ev_set_sfix32_fs (a, b, 1) + #define __ev_set_upper_ufix32_fs(a, b) __ev_set_ufix32_fs (a, b, 0) + #define __ev_set_lower_ufix32_fs(a, b) __ev_set_ufix32_fs (a, b, 1) + + #define __ev_set_acc_vec64(a) __builtin_spe_evmra ((__ev64_opaque__)(a)) + + static inline __ev64_opaque__ + __ev_set_acc_u64 (uint64_t a) + { + __ev64_opaque__ ev32; + ev32 = __ev_create_u64 (a); + __ev_mra (ev32); + return ev32; + } + + static inline __ev64_opaque__ + __ev_set_acc_s64 (int64_t a) + { + __ev64_opaque__ ev32; + ev32 = __ev_create_s64 (a); + __ev_mra (ev32); + return ev32; + } + + static inline __ev64_opaque__ + __ev_set_u32_internal (__ev64_opaque__ a, uint32_t b, uint32_t pos) + { + union + { + __ev64_opaque__ v; + uint32_t i[2]; + } u; + + u.v = a; + u.i[pos] = b; + return u.v; + } + + static inline __ev64_opaque__ + __ev_set_s32_internal (__ev64_opaque__ a, int32_t b, uint32_t pos) + { + union + { + __ev64_opaque__ v; + int32_t i[2]; + } u; + + u.v = a; + u.i[pos] = b; + return u.v; + } + + static inline __ev64_opaque__ + __ev_set_fs_internal (__ev64_opaque__ a, float b, uint32_t pos) + { + union + { + __ev64_opaque__ v; + float f[2]; + } u; + + u.v = a; + u.f[pos] = b; + return u.v; + } + + static inline __ev64_opaque__ + __ev_set_sfix32_fs_internal (__ev64_opaque__ a, float b, uint32_t pos) + { + __ev64_opaque__ v; + float other; + + /* Get other half. */ + other = __ev_get_fs_internal (a, pos ^ 1); + + /* Make an sfix32 with 'b'. */ + v = __ev_create_sfix32_fs (b, b); + + /* Set other half to what it used to be. */ + return __ev_set_fs_internal (v, other, pos ^ 1); + } + + static inline __ev64_opaque__ + __ev_set_ufix32_fs_internal (__ev64_opaque__ a, float b, uint32_t pos) + { + __ev64_opaque__ v; + float other; + + /* Get other half. */ + other = __ev_get_fs_internal (a, pos ^ 1); + + /* Make an ufix32 with 'b'. */ + v = __ev_create_ufix32_fs (b, b); + + /* Set other half to what it used to be. */ + return __ev_set_fs_internal (v, other, pos ^ 1); + } + + static inline __ev64_opaque__ + __ev_set_u16_internal (__ev64_opaque__ a, uint16_t b, uint32_t pos) + { + union + { + __ev64_opaque__ v; + uint16_t i[4]; + } u; + + u.v = a; + u.i[pos] = b; + return u.v; + } + + static inline __ev64_opaque__ + __ev_set_s16_internal (__ev64_opaque__ a, int16_t b, uint32_t pos) + { + union + { + __ev64_opaque__ v; + int16_t i[4]; + } u; + + u.v = a; + u.i[pos] = b; + return u.v; + } + + /* Predicates. */ + + #define __pred_all 0 + #define __pred_any 1 + #define __pred_upper 2 + #define __pred_lower 3 + + #define __ev_any_gts(a, b) __builtin_spe_evcmpgts (__pred_any, (__v2si) (a), (__v2si) (b)) + #define __ev_all_gts(a, b) __builtin_spe_evcmpgts (__pred_all, (__v2si) (a), (__v2si) (b)) + #define __ev_upper_gts(a, b) __builtin_spe_evcmpgts (__pred_upper, (__v2si) (a), (__v2si) (b)) + #define __ev_lower_gts(a, b) __builtin_spe_evcmpgts (__pred_lower, (__v2si) (a), (__v2si) (b)) + #define __ev_select_gts(a, b, c, d) ((__v2si) __builtin_spe_evsel_gts ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d))) + + #define __ev_any_gtu(a, b) __builtin_spe_evcmpgtu (__pred_any, (__v2si) (a), (__v2si) (b)) + #define __ev_all_gtu(a, b) __builtin_spe_evcmpgtu (__pred_all, (__v2si) (a), (__v2si) (b)) + #define __ev_upper_gtu(a, b) __builtin_spe_evcmpgtu (__pred_upper, (__v2si) (a), (__v2si) (b)) + #define __ev_lower_gtu(a, b) __builtin_spe_evcmpgtu (__pred_lower, (__v2si) (a), (__v2si) (b)) + #define __ev_select_gtu(a, b, c, d) ((__v2si) __builtin_spe_evsel_gtu ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d))) + + #define __ev_any_lts(a, b) __builtin_spe_evcmplts (__pred_any, (__v2si) (a), (__v2si) (b)) + #define __ev_all_lts(a, b) __builtin_spe_evcmplts (__pred_all, (__v2si) (a), (__v2si) (b)) + #define __ev_upper_lts(a, b) __builtin_spe_evcmplts (__pred_upper, (__v2si) (a), (__v2si) (b)) + #define __ev_lower_lts(a, b) __builtin_spe_evcmplts (__pred_lower, (__v2si) (a), (__v2si) (b)) + #define __ev_select_lts(a, b, c, d) ((__v2si) __builtin_spe_evsel_lts ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d))) + + #define __ev_any_ltu(a, b) __builtin_spe_evcmpltu (__pred_any, (__v2si) (a), (__v2si) (b)) + #define __ev_all_ltu(a, b) __builtin_spe_evcmpltu (__pred_all, (__v2si) (a), (__v2si) (b)) + #define __ev_upper_ltu(a, b) __builtin_spe_evcmpltu (__pred_upper, (__v2si) (a), (__v2si) (b)) + #define __ev_lower_ltu(a, b) __builtin_spe_evcmpltu (__pred_lower, (__v2si) (a), (__v2si) (b)) + #define __ev_select_ltu(a, b, c, d) ((__v2si) __builtin_spe_evsel_ltu ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d))) + #define __ev_any_eq(a, b) __builtin_spe_evcmpeq (__pred_any, (__v2si) (a), (__v2si) (b)) + #define __ev_all_eq(a, b) __builtin_spe_evcmpeq (__pred_all, (__v2si) (a), (__v2si) (b)) + #define __ev_upper_eq(a, b) __builtin_spe_evcmpeq (__pred_upper, (__v2si) (a), (__v2si) (b)) + #define __ev_lower_eq(a, b) __builtin_spe_evcmpeq (__pred_lower, (__v2si) (a), (__v2si) (b)) + #define __ev_select_eq(a, b, c, d) ((__v2si) __builtin_spe_evsel_eq ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d))) + + #define __ev_any_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_any, (__v2sf) (a), (__v2sf) (b)) + #define __ev_all_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_all, (__v2sf) (a), (__v2sf) (b)) + #define __ev_upper_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_upper, (__v2sf) (a), (__v2sf) (b)) + #define __ev_lower_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_lower, (__v2sf) (a), (__v2sf) (b)) + #define __ev_select_fs_gt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fsgt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d))) + + #define __ev_any_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_any, (__v2sf) (a), (__v2sf) (b)) + #define __ev_all_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_all, (__v2sf) (a), (__v2sf) (b)) + #define __ev_upper_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_upper, (__v2sf) (a), (__v2sf) (b)) + #define __ev_lower_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_lower, (__v2sf) (a), (__v2sf) (b)) + #define __ev_select_fs_lt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fslt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d))) + + #define __ev_any_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_any, (__v2sf) (a), (__v2sf) (b)) + #define __ev_all_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_all, (__v2sf) (a), (__v2sf) (b)) + #define __ev_upper_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_upper, (__v2sf) (a), (__v2sf) (b)) + #define __ev_lower_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_lower, (__v2sf) (a), (__v2sf) (b)) + #define __ev_select_fs_eq(a, b, c, d) ((__v2si) __builtin_spe_evsel_fseq ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d))) + + #define __ev_any_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_any, (__v2sf) (a), (__v2sf) (b)) + #define __ev_all_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_all, (__v2sf) (a), (__v2sf) (b)) + #define __ev_upper_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_upper, (__v2sf) (a), (__v2sf) (b)) + #define __ev_lower_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_lower, (__v2sf) (a), (__v2sf) (b)) + #define __ev_select_fs_tst_gt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fststgt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d))) + + #define __ev_any_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_any, (__v2sf) (a), (__v2sf) (b)) + #define __ev_all_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_all, (__v2sf) (a), (__v2sf) (b)) + #define __ev_upper_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_upper, (__v2sf) (a), (__v2sf) (b)) + #define __ev_lower_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_lower, (__v2sf) (a), (__v2sf) (b)) + #define __ev_select_fs_tst_lt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fststlt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d))) + + #define __ev_any_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_any, (__v2sf) (a), (__v2sf) (b)) + #define __ev_all_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_all, (__v2sf) (a), (__v2sf) (b)) + #define __ev_upper_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_upper, (__v2sf) (a), (__v2sf) (b)) + #define __ev_lower_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_lower, (__v2sf) (a), (__v2sf) (b)) + #define __ev_select_fs_tst_eq(a, b, c, d) ((__v2si) __builtin_spe_evsel_fststeq ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d))) + + /* SPEFSCR accesor functions. */ + + #define __SPEFSCR_SOVH 0x80000000 + #define __SPEFSCR_OVH 0x40000000 + #define __SPEFSCR_FGH 0x20000000 + #define __SPEFSCR_FXH 0x10000000 + #define __SPEFSCR_FINVH 0x08000000 + #define __SPEFSCR_FDBZH 0x04000000 + #define __SPEFSCR_FUNFH 0x02000000 + #define __SPEFSCR_FOVFH 0x01000000 + /* 2 unused bits. */ + #define __SPEFSCR_FINXS 0x00200000 + #define __SPEFSCR_FINVS 0x00100000 + #define __SPEFSCR_FDBZS 0x00080000 + #define __SPEFSCR_FUNFS 0x00040000 + #define __SPEFSCR_FOVFS 0x00020000 + #define __SPEFSCR_MODE 0x00010000 + #define __SPEFSCR_SOV 0x00008000 + #define __SPEFSCR_OV 0x00004000 + #define __SPEFSCR_FG 0x00002000 + #define __SPEFSCR_FX 0x00001000 + #define __SPEFSCR_FINV 0x00000800 + #define __SPEFSCR_FDBZ 0x00000400 + #define __SPEFSCR_FUNF 0x00000200 + #define __SPEFSCR_FOVF 0x00000100 + /* 1 unused bit. */ + #define __SPEFSCR_FINXE 0x00000040 + #define __SPEFSCR_FINVE 0x00000020 + #define __SPEFSCR_FDBZE 0x00000010 + #define __SPEFSCR_FUNFE 0x00000008 + #define __SPEFSCR_FOVFE 0x00000004 + #define __SPEFSCR_FRMC 0x00000003 + + #define __ev_get_spefscr_sovh() (__builtin_spe_mfspefscr () & __SPEFSCR_SOVH) + #define __ev_get_spefscr_ovh() (__builtin_spe_mfspefscr () & __SPEFSCR_OVH) + #define __ev_get_spefscr_fgh() (__builtin_spe_mfspefscr () & __SPEFSCR_FGH) + #define __ev_get_spefscr_fxh() (__builtin_spe_mfspefscr () & __SPEFSCR_FXH) + #define __ev_get_spefscr_finvh() (__builtin_spe_mfspefscr () & __SPEFSCR_FINVH) + #define __ev_get_spefscr_fdbzh() (__builtin_spe_mfspefscr () & __SPEFSCR_FDBZH) + #define __ev_get_spefscr_funfh() (__builtin_spe_mfspefscr () & __SPEFSCR_FUNFH) + #define __ev_get_spefscr_fovfh() (__builtin_spe_mfspefscr () & __SPEFSCR_FOVFH) + #define __ev_get_spefscr_finxs() (__builtin_spe_mfspefscr () & __SPEFSCR_FINXS) + #define __ev_get_spefscr_finvs() (__builtin_spe_mfspefscr () & __SPEFSCR_FINVS) + #define __ev_get_spefscr_fdbzs() (__builtin_spe_mfspefscr () & __SPEFSCR_FDBZS) + #define __ev_get_spefscr_funfs() (__builtin_spe_mfspefscr () & __SPEFSCR_FUNFS) + #define __ev_get_spefscr_fovfs() (__builtin_spe_mfspefscr () & __SPEFSCR_FOVFS) + #define __ev_get_spefscr_mode() (__builtin_spe_mfspefscr () & __SPEFSCR_MODE) + #define __ev_get_spefscr_sov() (__builtin_spe_mfspefscr () & __SPEFSCR_SOV) + #define __ev_get_spefscr_ov() (__builtin_spe_mfspefscr () & __SPEFSCR_OV) + #define __ev_get_spefscr_fg() (__builtin_spe_mfspefscr () & __SPEFSCR_FG) + #define __ev_get_spefscr_fx() (__builtin_spe_mfspefscr () & __SPEFSCR_FX) + #define __ev_get_spefscr_finv() (__builtin_spe_mfspefscr () & __SPEFSCR_FINV) + #define __ev_get_spefscr_fdbz() (__builtin_spe_mfspefscr () & __SPEFSCR_FDBZ) + #define __ev_get_spefscr_funf() (__builtin_spe_mfspefscr () & __SPEFSCR_FUNF) + #define __ev_get_spefscr_fovf() (__builtin_spe_mfspefscr () & __SPEFSCR_FOVF) + #define __ev_get_spefscr_finxe() (__builtin_spe_mfspefscr () & __SPEFSCR_FINXE) + #define __ev_get_spefscr_finve() (__builtin_spe_mfspefscr () & __SPEFSCR_FINVE) + #define __ev_get_spefscr_fdbze() (__builtin_spe_mfspefscr () & __SPEFSCR_FDBZE) + #define __ev_get_spefscr_funfe() (__builtin_spe_mfspefscr () & __SPEFSCR_FUNFE) + #define __ev_get_spefscr_fovfe() (__builtin_spe_mfspefscr () & __SPEFSCR_FOVFE) + #define __ev_get_spefscr_frmc() (__builtin_spe_mfspefscr () & __SPEFSCR_FRMC) + + static inline void + __ev_clr_spefscr_field (int mask) + { + int i; + + i = __builtin_spe_mfspefscr (); + i &= ~mask; + __builtin_spe_mtspefscr (i); + } + + #define __ev_clr_spefscr_sovh() __ev_clr_spefscr_field (__SPEFSCR_SOVH) + #define __ev_clr_spefscr_sov() __ev_clr_spefscr_field (__SPEFSCR_SOV) + #define __ev_clr_spefscr_finxs() __ev_clr_spefscr_field (__SPEFSCR_FINXS) + #define __ev_clr_spefscr_finvs() __ev_clr_spefscr_field (__SPEFSCR_FINVS) + #define __ev_clr_spefscr_fdbzs() __ev_clr_spefscr_field (__SPEFSCR_FDBZS) + #define __ev_clr_spefscr_funfs() __ev_clr_spefscr_field (__SPEFSCR_FUNFS) + #define __ev_clr_spefscr_fovfs() __ev_clr_spefscr_field (__SPEFSCR_FOVFS) + + /* Set rounding mode: + rnd = 0 (nearest) + rnd = 1 (zero) + rnd = 2 (+inf) + rnd = 3 (-inf). */ + + static inline void + __ev_set_spefscr_frmc (int rnd) + { + int i; + + i = __builtin_spe_mfspefscr (); + i &= ~__SPEFSCR_FRMC; + i |= rnd; + } + + #endif /* _SPE_H */ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/spe.md gcc-3.3/gcc/config/rs6000/spe.md *** gcc-3.2.3/gcc/config/rs6000/spe.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/spe.md 2002-12-03 23:41:32.000000000 +0000 *************** *** 0 **** --- 1,2488 ---- + ;; e500 SPE description + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; Contributed by Aldy Hernandez (aldy@quesejoda.com) + + ;; This file is part of GNU CC. + + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + (define_constants + [(SPE_ACC_REGNO 111) + (SPEFSCR_REGNO 112)]) + + (define_insn "*negsf2_gpr" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (neg:SF (match_operand:SF 1 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsneg %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "*abssf2_gpr" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (abs:SF (match_operand:SF 1 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsabs %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "*addsf3_gpr" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsadd %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "*subsf3_gpr" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (minus:SF (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efssub %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "*mulsf3_gpr" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsmul %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "*divsf3_gpr" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (div:SF (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsdiv %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "spe_efsctuiz" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (unspec:SI [(match_operand:SF 1 "gpc_reg_operand" "r")] 700))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsctuiz %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "spe_fixunssfsi2" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (unsigned_fix:SI (fix:SF (match_operand:SF 1 "gpc_reg_operand" "r"))))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsctui %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "spe_fix_truncsfsi2" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (fix:SI (match_operand:SF 1 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efsctsi %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "spe_floatunssisf2" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (unsigned_float:SF (match_operand:SI 1 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efscfui %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "spe_floatsisf2" + [(set (match_operand:SF 0 "gpc_reg_operand" "=r") + (float:SF (match_operand:SI 1 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS" + "efscfsi %0,%1" + [(set_attr "type" "fp")]) + + + ;; SPE SIMD instructions + + (define_insn "spe_evabs" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (abs:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evabs %0,%1" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evandc" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (and:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (not:V2SI (match_operand:V2SI 2 "gpc_reg_operand" "r"))))] + "TARGET_SPE" + "evandc %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evand" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (and:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evand %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + ;; Vector compare instructions + + (define_insn "spe_evcmpeq" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 500))] + "TARGET_SPE" + "evcmpeq %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evcmpgts" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 501))] + "TARGET_SPE" + "evcmpgts %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evcmpgtu" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 502))] + "TARGET_SPE" + "evcmpgtu %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evcmplts" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 503))] + "TARGET_SPE" + "evcmplts %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evcmpltu" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 504))] + "TARGET_SPE" + "evcmpltu %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + ;; Floating point vector compare instructions + + (define_insn "spe_evfscmpeq" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r")] 538)) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evfscmpeq %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evfscmpgt" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r")] 539)) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evfscmpgt %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evfscmplt" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r")] 540)) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evfscmplt %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evfststeq" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r")] 541))] + "TARGET_SPE" + "evfststeq %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evfststgt" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r")] 542))] + "TARGET_SPE" + "evfststgt %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evfststlt" + [(set (match_operand:CC 0 "cc_reg_operand" "=y") + (unspec:CC [(match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r")] 543))] + "TARGET_SPE" + "evfststlt %0,%1,%2" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + ;; End of vector compare instructions + + (define_insn "spe_evcntlsw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r")] 505))] + "TARGET_SPE" + "evcntlsw %0,%1" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evcntlzw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r")] 506))] + "TARGET_SPE" + "evcntlzw %0,%1" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_eveqv" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (not:V2SI (xor:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r"))))] + "TARGET_SPE" + "eveqv %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evextsb" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r")] 507))] + "TARGET_SPE" + "evextsb %0,%1" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evextsh" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r")] 508))] + "TARGET_SPE" + "evextsh %0,%1" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evlhhesplat" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 509)] + "TARGET_SPE" + "evlhhesplat %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlhhesplatx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 510)] + "TARGET_SPE" + "evlhhesplatx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlhhossplat" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 511)] + "TARGET_SPE" + "evlhhossplat %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlhhossplatx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 512)] + "TARGET_SPE" + "evlhhossplatx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlhhousplat" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 513)] + "TARGET_SPE" + "evlhhousplat %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlhhousplatx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 514)] + "TARGET_SPE" + "evlhhousplatx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhsplat" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 515)] + "TARGET_SPE" + "evlwhsplat %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhsplatx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 516)] + "TARGET_SPE" + "evlwhsplatx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwwsplat" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 517)] + "TARGET_SPE" + "evlwwsplat %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwwsplatx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 518)] + "TARGET_SPE" + "evlwwsplatx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evmergehi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (vec_merge:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (vec_select:V2SI + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (parallel [(const_int 1) + (const_int 0)])) + (const_int 2)))] + "TARGET_SPE" + "evmergehi %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evmergehilo" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (vec_merge:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (const_int 2)))] + "TARGET_SPE" + "evmergehilo %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evmergelo" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (vec_merge:V2SI (vec_select:V2SI + (match_operand:V2SI 1 "gpc_reg_operand" "r") + (parallel [(const_int 1) + (const_int 0)])) + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (const_int 2)))] + "TARGET_SPE" + "evmergelo %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evmergelohi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (vec_merge:V2SI (vec_select:V2SI + (match_operand:V2SI 1 "gpc_reg_operand" "r") + (parallel [(const_int 1) + (const_int 0)])) + (vec_select:V2SI + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (parallel [(const_int 1) + (const_int 0)])) + (const_int 2)))] + "TARGET_SPE" + "evmergelohi %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evnand" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (not:V2SI (and:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r"))))] + "TARGET_SPE" + "evnand %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evneg" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (neg:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evneg %0,%1" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evnor" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (not:V2SI (ior:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r"))))] + "TARGET_SPE" + "evnor %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evorc" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (ior:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (not:V2SI (match_operand:V2SI 2 "gpc_reg_operand" "r"))))] + "TARGET_SPE" + "evorc %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evor" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (ior:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evor %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evrlwi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] 519))] + "TARGET_SPE" + "evrlwi %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evrlw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 520))] + "TARGET_SPE" + "evrlw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evrndw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r")] 521))] + "TARGET_SPE" + "evrndw %0,%1" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evsel" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (match_operand:CC 3 "cc_reg_operand" "y")] 522))] + "TARGET_SPE" + "evsel %0,%1,%2,%3" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evsel_fs" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r") + (match_operand:CC 3 "cc_reg_operand" "y")] 725))] + "TARGET_SPE" + "evsel %0,%1,%2,%3" + [(set_attr "type" "veccmp") + (set_attr "length" "4")]) + + (define_insn "spe_evslwi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] + 523))] + "TARGET_SPE" + "evslwi %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evslw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 524))] + "TARGET_SPE" + "evslw %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evsrwis" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] + 525))] + "TARGET_SPE" + "evsrwis %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evsrwiu" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] + 526))] + "TARGET_SPE" + "evsrwiu %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evsrws" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 527))] + "TARGET_SPE" + "evsrws %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evsrwu" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 528))] + "TARGET_SPE" + "evsrwu %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evxor" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (xor:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evxor %0,%1,%2" + [(set_attr "type" "vecsimple") + (set_attr "length" "4")]) + + (define_insn "spe_evfsabs" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (abs:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evfsabs %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsadd" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (plus:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r"))) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evfsadd %0,%1,%2" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfscfsf" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 529))] + "TARGET_SPE" + "evfscfsf %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfscfsi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (fix:V2SI (match_operand:V2SF 1 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evfscfsi %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfscfuf" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 530))] + "TARGET_SPE" + "evfscfuf %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfscfui" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (unspec:V2SF [(match_operand:V2SI 1 "gpc_reg_operand" "r")] 701))] + "TARGET_SPE" + "evfscfui %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsctsf" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 531))] + "TARGET_SPE" + "evfsctsf %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsctsi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 532))] + "TARGET_SPE" + "evfsctsi %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsctsiz" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 533))] + "TARGET_SPE" + "evfsctsiz %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsctuf" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 534))] + "TARGET_SPE" + "evfsctuf %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsctui" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 535))] + "TARGET_SPE" + "evfsctui %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsctuiz" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 536))] + "TARGET_SPE" + "evfsctuiz %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsdiv" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (div:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r"))) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evfsdiv %0,%1,%2" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsmul" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (mult:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r"))) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evfsmul %0,%1,%2" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsnabs" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "r")] 537))] + "TARGET_SPE" + "evfsnabs %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfsneg" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (neg:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evfsneg %0,%1" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + (define_insn "spe_evfssub" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (minus:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "r") + (match_operand:V2SF 2 "gpc_reg_operand" "r"))) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evfssub %0,%1,%2" + [(set_attr "type" "vecfloat") + (set_attr "length" "4")]) + + ;; SPE SIMD load instructions. + + ;; Only the hardware engineer who designed the SPE inderstands the + ;; plethora of load and store instructions ;-). We have no way of + ;; differentiating between them with RTL so use an unspec of const_int 0 + ;; to avoid identical RTL. + + (define_insn "spe_evldd" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 544)] + "TARGET_SPE && INTVAL (operands[2]) >= 0 && INTVAL (operands[2]) <= 31" + "evldd %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlddx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 545)] + "TARGET_SPE" + "evlddx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evldh" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 546)] + "TARGET_SPE && INTVAL (operands[2]) >= 0 && INTVAL (operands[2]) <= 31" + "evldh %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evldhx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 547)] + "TARGET_SPE" + "evldhx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evldw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 548)] + "TARGET_SPE" + "evldw %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evldwx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 549)] + "TARGET_SPE" + "evldwx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhe" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 550)] + "TARGET_SPE" + "evlwhe %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhex" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 551)] + "TARGET_SPE" + "evlwhex %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhos" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 552)] + "TARGET_SPE" + "evlwhos %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhosx" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 553)] + "TARGET_SPE" + "evlwhosx %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhou" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:QI 2 "immediate_operand" "i")))) + (unspec [(const_int 0)] 554)] + "TARGET_SPE" + "evlwhou %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_evlwhoux" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (mem:V2SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand:SI 2 "gpc_reg_operand" "r")))) + (unspec [(const_int 0)] 555)] + "TARGET_SPE" + "evlwhoux %0,%1,%2" + [(set_attr "type" "vecload") + (set_attr "length" "4")]) + + (define_insn "spe_brinc" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (unspec:SI [(match_operand:SI 1 "gpc_reg_operand" "r") + (match_operand:SI 2 "gpc_reg_operand" "r")] 556))] + "TARGET_SPE" + "brinc %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhegsmfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 557)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhegsmfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhegsmfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 558)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhegsmfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhegsmiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 559)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhegsmiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhegsmian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 560)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhegsmian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhegumiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 561)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhegumiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhegumian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 562)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhegumian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmfaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 563)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhesmfaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmfanw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 564)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhesmfanw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 565)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhesmfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 566))] + "TARGET_SPE" + "evmhesmf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 567)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhesmiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 568)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhesmianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 569)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhesmia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhesmi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 570))] + "TARGET_SPE" + "evmhesmi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhessfaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 571)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhessfaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhessfanw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 572)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhessfanw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhessfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 573)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhessfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhessf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 574)) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evmhessf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhessiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 575)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhessiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhessianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 576)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhessianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmheumiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 577)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmheumiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmheumianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 578)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmheumianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmheumia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 579)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmheumia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmheumi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 580))] + "TARGET_SPE" + "evmheumi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmheusiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 581)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmheusiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmheusianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 582)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmheusianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhogsmfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 583)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhogsmfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhogsmfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 584)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhogsmfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhogsmiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 585)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhogsmiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhogsmian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 586)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhogsmian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhogumiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 587)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhogumiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhogumian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 588)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhogumian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmfaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 589)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhosmfaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmfanw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 590)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhosmfanw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 591))] + "TARGET_SPE" + "evmhosmfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 592)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhosmf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 593)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhosmiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 594)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhosmianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 595)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhosmia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhosmi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 596))] + "TARGET_SPE" + "evmhosmi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhossfaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 597)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhossfaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhossfanw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 598)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhossfanw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhossfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 599)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhossfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhossf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 600)) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evmhossf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhossiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 601)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhossiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhossianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 602)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhossianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhoumiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 603)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhoumiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhoumianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 604)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhoumianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhoumia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 605)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhoumia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhoumi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 606))] + "TARGET_SPE" + "evmhoumi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhousiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 607)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhousiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmhousianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 608)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmhousianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmmlssfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 609))] + "TARGET_SPE" + "evmmlssfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmmlssf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 610))] + "TARGET_SPE" + "evmmlssf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 611)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhsmfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 612))] + "TARGET_SPE" + "evmwhsmf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 613)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhsmia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 614))] + "TARGET_SPE" + "evmwhsmi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhssfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 615)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhssfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhusian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 626))] + "TARGET_SPE" + "evmwhusian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhssf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 628)) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evmwhssf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhumia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 629)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhumia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhumi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 630))] + "TARGET_SPE" + "evmwhumi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlsmiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 635)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlsmiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlsmianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 636)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlsmianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlssiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 641)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlssiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlssianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 642)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlssianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlumiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 643)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlumiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlumianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 644)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlumianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlumia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 645)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlumia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlumi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 646))] + "TARGET_SPE" + "evmwlumi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlusiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 647)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlusiaaw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwlusianw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 648)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwlusianw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 649)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwsmfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 650)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwsmfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 651)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwsmfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 652))] + "TARGET_SPE" + "evmwsmf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 653)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwsmiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 654)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwsmian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 655)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwsmia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwsmi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 656))] + "TARGET_SPE" + "evmwsmi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwssfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 657)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwssfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwssfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 658)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwssfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwssfa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 659)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwssfa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwssf" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 660)) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evmwssf %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwumiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 661)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwumiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwumian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 662)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwumian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwumia" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 663)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwumia %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwumi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 664))] + "TARGET_SPE" + "evmwumi %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evaddw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (plus:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evaddw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evaddusiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 673)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evaddusiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evaddumiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 674)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evaddumiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evaddssiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 675)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evaddssiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evaddsmiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 676)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evaddsmiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evaddiw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] 677))] + "TARGET_SPE" + "evaddiw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evsubifw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:QI 2 "immediate_operand" "i")] 678))] + "TARGET_SPE" + "evsubifw %0,%2,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evsubfw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (minus:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")))] + "TARGET_SPE" + "evsubfw %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evsubfusiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 679)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evsubfusiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evsubfumiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 680)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evsubfumiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evsubfssiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 681)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evsubfssiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evsubfsmiaaw" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (reg:V2SI SPE_ACC_REGNO)] 682)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evsubfsmiaaw %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmra" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (match_operand:V2SI 1 "gpc_reg_operand" "r")) + (set (reg:V2SI SPE_ACC_REGNO) + (unspec:V2SI [(match_dup 1)] 726))] + "TARGET_SPE" + "evmra %0,%1" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evdivws" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (div:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r"))) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evdivws %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evdivwu" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (udiv:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r"))) + (clobber (reg:SI SPEFSCR_REGNO))] + "TARGET_SPE" + "evdivwu %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evsplatfi" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:QI 1 "immediate_operand" "i")] 684))] + "TARGET_SPE" + "evsplatfi %0,%1" + [(set_attr "type" "vecperm") + (set_attr "length" "4")]) + + (define_insn "spe_evsplati" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:QI 1 "immediate_operand" "i")] 685))] + "TARGET_SPE" + "evsplati %0,%1" + [(set_attr "type" "vecperm") + (set_attr "length" "4")]) + + (define_insn "spe_evstdd" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:QI 1 "immediate_operand" "i"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 686)] + "TARGET_SPE" + "evstdd %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstddx" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:SI 1 "gpc_reg_operand" "r"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 687)] + "TARGET_SPE" + "evstddx %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstdh" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:QI 1 "immediate_operand" "i"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 688)] + "TARGET_SPE" + "evstdh %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstdhx" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:SI 1 "gpc_reg_operand" "r"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 689)] + "TARGET_SPE" + "evstdhx %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstdw" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:QI 1 "immediate_operand" "i"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 690)] + "TARGET_SPE" + "evstdw %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstdwx" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:SI 1 "gpc_reg_operand" "r"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 691)] + "TARGET_SPE" + "evstdwx %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwhe" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:QI 1 "immediate_operand" "i"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 692)] + "TARGET_SPE" + "evstwhe %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwhex" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:SI 1 "gpc_reg_operand" "r"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 693)] + "TARGET_SPE" + "evstwhex %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwho" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:QI 1 "immediate_operand" "i"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 694)] + "TARGET_SPE" + "evstwho %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwhox" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:SI 1 "gpc_reg_operand" "r"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 695)] + "TARGET_SPE" + "evstwhox %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwwe" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:QI 1 "immediate_operand" "i"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 696)] + "TARGET_SPE" + "evstwwe %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwwex" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:SI 1 "gpc_reg_operand" "r"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 697)] + "TARGET_SPE" + "evstwwex %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwwo" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:QI 1 "immediate_operand" "i"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 698)] + "TARGET_SPE" + "evstwwo %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + (define_insn "spe_evstwwox" + [(set (mem:V2SI (plus:SI (match_operand:SI 0 "gpc_reg_operand" "b") + (match_operand:SI 1 "gpc_reg_operand" "r"))) + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (unspec [(const_int 0)] 699)] + "TARGET_SPE" + "evstwwox %2,%0,%1" + [(set_attr "type" "vecstore") + (set_attr "length" "4")]) + + ;; SPE vector clears + + (define_insn "*movv2si_const0" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (match_operand:V2SI 1 "zero_constant" ""))] + "TARGET_SPE" + "evxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + (define_insn "*movv2sf_const0" + [(set (match_operand:V2SF 0 "gpc_reg_operand" "=r") + (match_operand:V2SF 1 "zero_constant" ""))] + "TARGET_SPE" + "evxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + (define_insn "*movv4hi_const0" + [(set (match_operand:V4HI 0 "gpc_reg_operand" "=r") + (match_operand:V4HI 1 "zero_constant" ""))] + "TARGET_SPE" + "evxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + (define_insn "*movv1di_const0" + [(set (match_operand:V1DI 0 "gpc_reg_operand" "=r") + (match_operand:V1DI 1 "zero_constant" ""))] + "TARGET_SPE" + "evxor %0,%0,%0" + [(set_attr "type" "vecsimple")]) + + ;; Vector move instructions. + + (define_expand "movv2si" + [(set (match_operand:V2SI 0 "nonimmediate_operand" "") + (match_operand:V2SI 1 "any_operand" ""))] + "TARGET_SPE" + "{ rs6000_emit_move (operands[0], operands[1], V2SImode); DONE; }") + + + (define_insn "*movv2si_internal" + [(set (match_operand:V2SI 0 "nonimmediate_operand" "=m,r,r") + (match_operand:V2SI 1 "input_operand" "r,m,r"))] + "TARGET_SPE" + "@ + evstdd%X0 %1,%y0 + evldd%X1 %0,%y1 + evor %0,%1,%1" + [(set_attr "type" "vecload")]) + + (define_expand "movv1di" + [(set (match_operand:V1DI 0 "nonimmediate_operand" "") + (match_operand:V1DI 1 "any_operand" ""))] + "TARGET_SPE" + "{ rs6000_emit_move (operands[0], operands[1], V1DImode); DONE; }") + + (define_insn "*movv1di_internal" + [(set (match_operand:V1DI 0 "nonimmediate_operand" "=m,r,r") + (match_operand:V1DI 1 "input_operand" "r,m,r"))] + "TARGET_SPE" + "@ + evstdd%X0 %1,%y0 + evldd%X1 %0,%y1 + evor %0,%1,%1" + [(set_attr "type" "vecload")]) + + (define_expand "movv4hi" + [(set (match_operand:V4HI 0 "nonimmediate_operand" "") + (match_operand:V4HI 1 "any_operand" ""))] + "TARGET_SPE" + "{ rs6000_emit_move (operands[0], operands[1], V4HImode); DONE; }") + + (define_insn "*movv4hi_internal" + [(set (match_operand:V4HI 0 "nonimmediate_operand" "=m,r,r") + (match_operand:V4HI 1 "input_operand" "r,m,r"))] + "TARGET_SPE" + "@ + evstdd%X0 %1,%y0 + evldd%X1 %0,%y1 + evor %0,%1,%1" + [(set_attr "type" "vecload")]) + + (define_expand "movv2sf" + [(set (match_operand:V2SF 0 "nonimmediate_operand" "") + (match_operand:V2SF 1 "any_operand" ""))] + "TARGET_SPE" + "{ rs6000_emit_move (operands[0], operands[1], V2SFmode); DONE; }") + + (define_insn "*movv2sf_internal" + [(set (match_operand:V2SF 0 "nonimmediate_operand" "=m,r,r") + (match_operand:V2SF 1 "input_operand" "r,m,r"))] + "TARGET_SPE" + "@ + evstdd%X0 %1,%y0 + evldd%X1 %0,%y1 + evor %0,%1,%1" + [(set_attr "type" "vecload")]) + + (define_insn "spe_evmwhssfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 702)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhssfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhssmaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 703)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhssmaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 704)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhsmfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 705)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhsmiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhusiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 706)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhusiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhumiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 707)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhumiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhssfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 708)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhssfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhssian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 709)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhssian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 710)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhsmfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhsmian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 711)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhsmian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhumian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 713)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhumian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgssfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 714)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgssfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgsmfaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 715)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgsmfaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgsmiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 716)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgsmiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgumiaa" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 717)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgumiaa %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgssfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 718)) + (clobber (reg:SI SPEFSCR_REGNO)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgssfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgsmfan" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 719)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgsmfan %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgsmian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 720)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgsmian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_evmwhgumian" + [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") + (unspec:V2SI [(match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")] 721)) + (clobber (reg:V2SI SPE_ACC_REGNO))] + "TARGET_SPE" + "evmwhgumian %0,%1,%2" + [(set_attr "type" "veccomplex") + (set_attr "length" "4")]) + + (define_insn "spe_mtspefscr" + [(set (reg:SI SPEFSCR_REGNO) + (unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")] + 722))] + "TARGET_SPE" + "mtspefscr %0" + [(set_attr "type" "vecsimple")]) + + (define_insn "spe_mfspefscr" + [(set (match_operand:SI 0 "register_operand" "=r") + (unspec_volatile:SI [(reg:SI SPEFSCR_REGNO)] 723))] + "TARGET_SPE" + "mfspefscr %0" + [(set_attr "type" "vecsimple")]) + + ;; MPC8540 single-precision FP instructions on GPRs. + ;; We have 2 variants for each. One for IEEE compliant math and one + ;; for non IEEE compliant math. + + (define_insn "cmpsfeq_gpr" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (eq:CCFP (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS && !flag_unsafe_math_optimizations" + "efscmpeq %0,%1,%2" + [(set_attr "type" "fpcompare")]) + + (define_insn "tstsfeq_gpr" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (eq:CCFP (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS && flag_unsafe_math_optimizations" + "efststeq %0,%1,%2" + [(set_attr "type" "fpcompare")]) + + (define_insn "cmpsfgt_gpr" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (gt:CCFP (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS && !flag_unsafe_math_optimizations" + "efscmpgt %0,%1,%2" + [(set_attr "type" "fpcompare")]) + + (define_insn "tstsfgt_gpr" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (gt:CCFP (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS && flag_unsafe_math_optimizations" + "efststgt %0,%1,%2" + [(set_attr "type" "fpcompare")]) + + (define_insn "cmpsflt_gpr" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (lt:CCFP (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS && !flag_unsafe_math_optimizations" + "efscmplt %0,%1,%2" + [(set_attr "type" "fpcompare")]) + + (define_insn "tstsflt_gpr" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (lt:CCFP (match_operand:SF 1 "gpc_reg_operand" "r") + (match_operand:SF 2 "gpc_reg_operand" "r")))] + "TARGET_HARD_FLOAT && !TARGET_FPRS && flag_unsafe_math_optimizations" + "efststlt %0,%1,%2" + [(set_attr "type" "fpcompare")]) + diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/sysv4.h gcc-3.3/gcc/config/rs6000/sysv4.h *** gcc-3.2.3/gcc/config/rs6000/sysv4.h 2003-01-30 14:03:42.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/sysv4.h 2003-05-05 16:49:17.000000000 +0000 *************** *** 1,5 **** /* Target definitions for GNU compiler for PowerPC running System V.4 ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Cygnus Support. --- 1,5 ---- /* Target definitions for GNU compiler for PowerPC running System V.4 ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Cygnus Support. *************** the Free Software Foundation, 59 Temple *** 21,26 **** --- 21,29 ---- Boston, MA 02111-1307, USA. */ + /* Header files should be C++ aware in general. */ + #define NO_IMPLICIT_EXTERN_C + /* Yes! We are ELF. */ #define TARGET_OBJECT_FORMAT OBJECT_ELF *************** Boston, MA 02111-1307, USA. */ *** 34,43 **** #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mppc" - /* Override rs6000.h definition. */ - #undef CPP_DEFAULT_SPEC - #define CPP_DEFAULT_SPEC "-D_ARCH_PPC" - /* Small data support types. */ enum rs6000_sdata_type { SDATA_NONE, /* No small data support. */ --- 37,42 ---- *************** extern int g_switch_set; /* Whether -G *** 152,157 **** --- 151,157 ---- { "emb", 0, \ N_("Set the PPC_EMB bit in the ELF flags header") }, \ { "vxworks", 0, N_("no description yet") }, \ + { "windiss", 0, N_("Use the WindISS simulator") }, \ { "shlib", 0, N_("no description yet") }, \ EXTRA_SUBTARGET_SWITCHES \ { "newlib", 0, N_("no description yet") }, *************** do { \ *** 264,269 **** --- 264,271 ---- rs6000_sdata_name, rs6000_abi_name); \ } \ \ + targetm.have_srodata_section = rs6000_sdata == SDATA_EABI; \ + \ if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC) \ { \ target_flags |= MASK_MINIMAL_TOC; \ *************** do { \ *** 326,332 **** /* Define this to set the endianness to use in libgcc2.c, which can not depend on target_flags. */ ! #if !defined(_LITTLE_ENDIAN) && !defined(__sun__) #define LIBGCC2_WORDS_BIG_ENDIAN 1 #else #define LIBGCC2_WORDS_BIG_ENDIAN 0 --- 328,334 ---- /* Define this to set the endianness to use in libgcc2.c, which can not depend on target_flags. */ ! #if !defined(__LITTLE_ENDIAN__) && !defined(__sun__) #define LIBGCC2_WORDS_BIG_ENDIAN 1 #else #define LIBGCC2_WORDS_BIG_ENDIAN 0 *************** do { \ *** 383,392 **** /* Real stack boundary as mandated by the appropriate ABI. */ #define ABI_STACK_BOUNDARY ((TARGET_EABI && !TARGET_ALTIVEC_ABI) ? 64 : 128) - /* No data type wants to be aligned rounder than this. */ - #undef BIGGEST_ALIGNMENT - #define BIGGEST_ALIGNMENT ((TARGET_EABI && !TARGET_ALTIVEC) ? 64 : 128) - /* An expression for the alignment of a structure field FIELD if the alignment computed in the usual way is COMPUTED. */ #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ --- 385,390 ---- *************** do { \ *** 433,444 **** /* Besides the usual ELF sections, we need a toc section. */ /* Override elfos.h definition. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini /* Override elfos.h definition. */ #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ TOC_SECTION_FUNCTION \ SDATA_SECTION_FUNCTION \ SDATA2_SECTION_FUNCTION \ --- 431,441 ---- /* Besides the usual ELF sections, we need a toc section. */ /* Override elfos.h definition. */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini /* Override elfos.h definition. */ #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ TOC_SECTION_FUNCTION \ SDATA_SECTION_FUNCTION \ SDATA2_SECTION_FUNCTION \ *************** fini_section () \ *** 550,590 **** } \ } ! /* A C statement or statements to switch to the appropriate section ! for output of RTX in mode MODE. You can assume that RTX is some ! kind of constant in RTL. The argument MODE is redundant except in ! the case of a `const_int' rtx. Select the section by calling ! `text_section' or one of the alternatives for other sections. ! ! Do not define this macro if you put all constants in the read-only ! data section. */ ! ! /* Override elfos.h definition. */ ! #undef SELECT_RTX_SECTION ! #define SELECT_RTX_SECTION(MODE, X, ALIGN) rs6000_select_rtx_section (MODE, X) ! ! /* A C statement or statements to switch to the appropriate ! section for output of DECL. DECL is either a `VAR_DECL' node ! or a constant of some sort. RELOC indicates whether forming ! the initial value of DECL requires link-time relocations. */ ! ! /* Override elfos.h definition. */ ! #undef SELECT_SECTION ! #define SELECT_SECTION(DECL, RELOC, ALIGN) rs6000_select_section (DECL, RELOC) ! ! /* A C statement to build up a unique section name, expressed as a ! STRING_CST node, and assign it to DECL_SECTION_NAME (decl). ! RELOC indicates whether the initial value of EXP requires ! link-time relocations. If you do not define this macro, GCC will use ! the symbol name prefixed by `.' as the section name. Note - this ! macro can now be called for uninitialized data items as well as ! initialised data and functions. */ ! ! /* Override elfos.h definition. */ ! #undef UNIQUE_SECTION ! #define UNIQUE_SECTION(DECL, RELOC) rs6000_unique_section (DECL, RELOC) ! /* Return non-zero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only do this --- 547,560 ---- } \ } ! /* Override default elf definitions. */ ! #undef TARGET_ASM_SELECT_RTX_SECTION ! #define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section ! #undef TARGET_ASM_SELECT_SECTION ! #define TARGET_ASM_SELECT_SECTION rs6000_elf_select_section ! #define TARGET_ASM_UNIQUE_SECTION rs6000_elf_unique_section ! /* Return nonzero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only do this *************** extern int rs6000_pic_labelno; *** 644,661 **** putc ('\n', FILE); \ } \ \ ! fprintf (FILE, "%s", TYPE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! putc (',', FILE); \ ! fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ ! putc ('\n', FILE); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ \ if (DEFAULT_ABI == ABI_AIX) \ { \ const char *desc_name, *orig_name; \ \ ! STRIP_NAME_ENCODING (orig_name, NAME); \ desc_name = orig_name; \ while (*desc_name == '.') \ desc_name++; \ --- 614,627 ---- putc ('\n', FILE); \ } \ \ ! ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ \ if (DEFAULT_ABI == ABI_AIX) \ { \ const char *desc_name, *orig_name; \ \ ! orig_name = (*targetm.strip_name_encoding) (NAME); \ desc_name = orig_name; \ while (*desc_name == '.') \ desc_name++; \ *************** extern int rs6000_pic_labelno; *** 674,712 **** ASM_OUTPUT_LABEL (FILE, NAME); \ } while (0) - /* A C compound statement that outputs the assembler code for a thunk function, - used to implement C++ virtual function calls with multiple inheritance. The - thunk acts as a wrapper around a virtual function, adjusting the implicit - object parameter before handing control off to the real function. - - First, emit code to add the integer DELTA to the location that contains the - incoming first argument. Assume that this argument contains a pointer, and - is the one used to pass the this' pointer in C++. This is the incoming - argument *before* the function prologue, e.g. %o0' on a sparc. The - addition must preserve the values of all other incoming arguments. - - After the addition, emit code to jump to FUNCTION, which is a - FUNCTION_DECL'. This is a direct pure jump, not a call, and does not touch - the return address. Hence returning from FUNCTION will return to whoever - called the current thunk'. - - The effect must be as if FUNCTION had been called directly with the adjusted - first argument. This macro is responsible for emitting all of the code for - a thunk function; FUNCTION_PROLOGUE' and FUNCTION_EPILOGUE' are not - invoked. - - The THUNK_FNDECL is redundant. (DELTA and FUNCTION have already been - extracted from it.) It might possibly be useful on some targets, but - probably not. - - If you do not define this macro, the target-independent code in the C++ - frontend will generate a less efficient heavyweight thunk that calls - FUNCTION instead of jumping to it. The generic approach does not support - varargs. */ - - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - output_mi_thunk (FILE, THUNK_FNDECL, DELTA, FUNCTION) - /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */ --- 640,645 ---- *************** extern int rs6000_pic_labelno; *** 718,732 **** #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ asm_fprintf (FILE, "%L%s", PREFIX) ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ ! (assemble_name (FILE, NAME), fputs (":\n", FILE)) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs ("\t.globl ", FILE); \ ! assemble_name (FILE, NAME); putc ('\n', FILE);} while (0) /* This says how to output assembler code to declare an uninitialized internal linkage data object. Under SVR4, --- 651,658 ---- #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ asm_fprintf (FILE, "%L%s", PREFIX) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* This says how to output assembler code to declare an uninitialized internal linkage data object. Under SVR4, *************** do { \ *** 749,759 **** ASM_OUTPUT_LABEL (FILE, NAME); \ ASM_OUTPUT_SKIP (FILE, SIZE); \ if (!flag_inhibit_size_directive && (SIZE) > 0) \ ! { \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, ",%d\n", SIZE); \ ! } \ } \ else \ { \ --- 675,681 ---- ASM_OUTPUT_LABEL (FILE, NAME); \ ASM_OUTPUT_SKIP (FILE, SIZE); \ if (!flag_inhibit_size_directive && (SIZE) > 0) \ ! ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ } \ else \ { \ *************** do { \ *** 761,772 **** assemble_name ((FILE), (NAME)); \ fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ } \ } while (0) /* Describe how to emit uninitialized external linkage items. */ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ - ASM_GLOBALIZE_LABEL (FILE, NAME); \ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ } while (0) --- 683,694 ---- assemble_name ((FILE), (NAME)); \ fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ } \ + ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ } while (0) /* Describe how to emit uninitialized external linkage items. */ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ } while (0) *************** do { \ *** 781,789 **** do { \ if (DEFAULT_ABI == ABI_V4) \ asm_fprintf (FILE, \ ! (TARGET_32BIT \ ! ? "\t{stu|stwu} %s,-16(%s)\n\t{st|stw} %s,12(%s)\n" \ ! : "\tstdu %s,-32(%s)\n\tstd %s,24(%s)\n"), \ reg_names[1], reg_names[1], reg_names[REGNO], \ reg_names[1]); \ } while (0) --- 703,709 ---- do { \ if (DEFAULT_ABI == ABI_V4) \ asm_fprintf (FILE, \ ! "\t{stu|stwu} %s,-16(%s)\n\t{st|stw} %s,12(%s)\n", \ reg_names[1], reg_names[1], reg_names[REGNO], \ reg_names[1]); \ } while (0) *************** do { \ *** 795,803 **** do { \ if (DEFAULT_ABI == ABI_V4) \ asm_fprintf (FILE, \ ! (TARGET_32BIT \ ! ? "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n" \ ! : "\tld %s,24(%s)\n\t{ai|addic} %s,%s,32\n"), \ reg_names[REGNO], reg_names[1], reg_names[1], \ reg_names[1]); \ } while (0) --- 715,721 ---- do { \ if (DEFAULT_ABI == ABI_V4) \ asm_fprintf (FILE, \ ! "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n", \ reg_names[REGNO], reg_names[1], reg_names[1], \ reg_names[1]); \ } while (0) *************** extern int fixuplabelno; *** 832,870 **** /* This is the end of what might become sysv4.h. */ /* Use DWARF 2 debugging information by default. */ ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG /* Historically we have also supported stabs debugging. */ ! #define DBX_DEBUGGING_INFO ! ! /* If we are referencing a function that is static or is known to be ! in this file, make the SYMBOL_REF special. We can use this to indicate ! that we can branch to this function without emitting a no-op after the ! call. For real AIX calling sequences, we also replace the ! function name with the real name (1 or 2 leading .'s), rather than ! the function descriptor name. This saves a lot of overriding code ! to read the prefixes. */ ! #undef ENCODE_SECTION_INFO ! #define ENCODE_SECTION_INFO(DECL) rs6000_encode_section_info (DECL) /* The ELF version doesn't encode [DS] or whatever at the end of symbols. */ #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ assemble_name (FILE, NAME) - /* This macro gets just the user-specified name - out of the string in a SYMBOL_REF. Discard - a leading * or @. */ - #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ - do { \ - const char *_name = SYMBOL_NAME; \ - while (*_name == '*' || *_name == '@') \ - _name++; \ - (VAR) = _name; \ - } while (0) - /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ --- 750,771 ---- /* This is the end of what might become sysv4.h. */ /* Use DWARF 2 debugging information by default. */ ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG /* Historically we have also supported stabs debugging. */ ! #define DBX_DEBUGGING_INFO 1 ! #define TARGET_ENCODE_SECTION_INFO rs6000_elf_encode_section_info ! #define TARGET_STRIP_NAME_ENCODING rs6000_elf_strip_name_encoding ! #define TARGET_IN_SMALL_DATA_P rs6000_elf_in_small_data_p ! #define TARGET_SECTION_TYPE_FLAGS rs6000_elf_section_type_flags /* The ELF version doesn't encode [DS] or whatever at the end of symbols. */ #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ assemble_name (FILE, NAME) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ *************** do { \ *** 893,901 **** #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)"); #endif ! #ifndef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-DPPC -Dunix -D__svr4__ -Asystem=unix -Asystem=svr4 -Acpu=powerpc -Amachine=powerpc" #endif /* Pass various options to the assembler. */ --- 794,812 ---- #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)"); #endif ! #ifndef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("PPC"); \ ! builtin_define_std ("unix"); \ ! builtin_define ("__svr4__"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=svr4"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) #endif /* Pass various options to the assembler. */ *************** do { \ *** 977,988 **** %{myellowknife: %(link_start_yellowknife) } \ %{mmvme: %(link_start_mvme) } \ %{msim: %(link_start_sim) } \ %{mcall-freebsd: %(link_start_freebsd) } \ %{mcall-linux: %(link_start_linux) } \ %{mcall-gnu: %(link_start_gnu) } \ %{mcall-netbsd: %(link_start_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-gnu: \ ! %{!mcall-netbsd: %{!mcall-freebsd: %(link_start_default) }}}}}}}}" #define LINK_START_DEFAULT_SPEC "" --- 888,901 ---- %{myellowknife: %(link_start_yellowknife) } \ %{mmvme: %(link_start_mvme) } \ %{msim: %(link_start_sim) } \ + %{mwindiss: %(link_start_windiss) } \ %{mcall-freebsd: %(link_start_freebsd) } \ %{mcall-linux: %(link_start_linux) } \ %{mcall-gnu: %(link_start_gnu) } \ %{mcall-netbsd: %(link_start_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: \ ! %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: \ ! %{!mcall-freebsd: %(link_start_default) }}}}}}}}}" #define LINK_START_DEFAULT_SPEC "" *************** do { \ *** 1034,1108 **** %{myellowknife: %(link_os_yellowknife) } \ %{mmvme: %(link_os_mvme) } \ %{msim: %(link_os_sim) } \ %{mcall-freebsd: %(link_os_freebsd) } \ %{mcall-linux: %(link_os_linux) } \ %{mcall-gnu: %(link_os_gnu) } \ %{mcall-netbsd: %(link_os_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(link_os_default) }}}}}}}}" #define LINK_OS_DEFAULT_SPEC "" #define CPP_SYSV_SPEC \ "%{mrelocatable*: -D_RELOCATABLE} \ %{fpic: -D__PIC__=1 -D__pic__=1} \ ! %{!fpic: %{fPIC: -D__PIC__=2 -D__pic__=2}} \ ! %{mlong-double-128: -D__LONG_DOUBLE_128__=1} \ ! %{!mlong-double-64: %(cpp_longdouble_default)} \ ! %{mcall-sysv: -D_CALL_SYSV} \ ! %{mcall-aix: -D_CALL_AIX} %{mcall-aixdesc: -D_CALL_AIX -D_CALL_AIXDESC} \ ! %{!mcall-sysv: %{!mcall-aix: %{!mcall-aixdesc: %(cpp_sysv_default) }}} \ ! %{msoft-float: -D_SOFT_FLOAT} \ ! %{!msoft-float: %{!mhard-float: \ ! %{mcpu=401: -D_SOFT_FLOAT} \ ! %{mcpu=403: -D_SOFT_FLOAT} \ ! %{mcpu=405: -D_SOFT_FLOAT} \ ! %{mcpu=ec603e: -D_SOFT_FLOAT} \ ! %{mcpu=801: -D_SOFT_FLOAT} \ ! %{mcpu=821: -D_SOFT_FLOAT} \ ! %{mcpu=823: -D_SOFT_FLOAT} \ ! %{mcpu=860: -D_SOFT_FLOAT} \ ! %{!mcpu*: %(cpp_float_default) }}}" ! ! /* Whether floating point is disabled by default. */ ! #define CPP_FLOAT_DEFAULT_SPEC "" ! ! /* Whether 'long double' is 128 bits by default. */ ! #define CPP_LONGDOUBLE_DEFAULT_SPEC "" ! ! #define CPP_SYSV_DEFAULT_SPEC "-D_CALL_SYSV" ! ! #define CPP_ENDIAN_BIG_SPEC "-D_BIG_ENDIAN -D__BIG_ENDIAN__ -Amachine=bigendian" ! ! #define CPP_ENDIAN_LITTLE_SPEC "-D_LITTLE_ENDIAN -D__LITTLE_ENDIAN__ -Amachine=littleendian" ! ! #define CPP_ENDIAN_SPEC \ ! "%{mlittle: %(cpp_endian_little) } \ ! %{mlittle-endian: %(cpp_endian_little) } \ ! %{mbig: %(cpp_endian_big) } \ ! %{mbig-endian: %(cpp_endian_big) } \ ! %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ ! %{mcall-freebsd: %(cpp_endian_big) } \ ! %{mcall-linux: %(cpp_endian_big) } \ ! %{mcall-gnu: %(cpp_endian_big) } \ ! %{mcall-netbsd: %(cpp_endian_big) } \ ! %{mcall-i960-old: %(cpp_endian_little) } \ ! %{mcall-aixdesc: %(cpp_endian_big) } \ ! %{!mcall-linux: %{!mcall-gnu: %{!mcall-freebsd: %{!mcall-netbsd: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}}}" ! ! #define CPP_ENDIAN_DEFAULT_SPEC "%(cpp_endian_big)" /* Override rs6000.h definition. */ #undef CPP_SPEC ! #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian) %(cpp_cpu) \ %{mads: %(cpp_os_ads) } \ %{myellowknife: %(cpp_os_yellowknife) } \ %{mmvme: %(cpp_os_mvme) } \ %{msim: %(cpp_os_sim) } \ %{mcall-freebsd: %(cpp_os_freebsd) } \ %{mcall-linux: %(cpp_os_linux) } \ %{mcall-gnu: %(cpp_os_gnu) } \ %{mcall-netbsd: %(cpp_os_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(cpp_os_default) }}}}}}}}" #define CPP_OS_DEFAULT_SPEC "" --- 947,983 ---- %{myellowknife: %(link_os_yellowknife) } \ %{mmvme: %(link_os_mvme) } \ %{msim: %(link_os_sim) } \ + %{mwindiss: %(link_os_windiss) } \ %{mcall-freebsd: %(link_os_freebsd) } \ %{mcall-linux: %(link_os_linux) } \ %{mcall-gnu: %(link_os_gnu) } \ %{mcall-netbsd: %(link_os_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: \ ! %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: \ ! %{!mcall-netbsd: %(link_os_default) }}}}}}}}}" #define LINK_OS_DEFAULT_SPEC "" #define CPP_SYSV_SPEC \ "%{mrelocatable*: -D_RELOCATABLE} \ %{fpic: -D__PIC__=1 -D__pic__=1} \ ! %{!fpic: %{fPIC: -D__PIC__=2 -D__pic__=2}}" /* Override rs6000.h definition. */ #undef CPP_SPEC ! #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) \ %{mads: %(cpp_os_ads) } \ %{myellowknife: %(cpp_os_yellowknife) } \ %{mmvme: %(cpp_os_mvme) } \ %{msim: %(cpp_os_sim) } \ + %{mwindiss: %(cpp_os_windiss) } \ %{mcall-freebsd: %(cpp_os_freebsd) } \ %{mcall-linux: %(cpp_os_linux) } \ %{mcall-gnu: %(cpp_os_gnu) } \ %{mcall-netbsd: %(cpp_os_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: \ ! %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: \ ! %{!mcall-netbsd: %(cpp_os_default) }}}}}}}}}" #define CPP_OS_DEFAULT_SPEC "" *************** do { \ *** 1113,1123 **** %{myellowknife: %(startfile_yellowknife) } \ %{mmvme: %(startfile_mvme) } \ %{msim: %(startfile_sim) } \ %{mcall-freebsd: %(startfile_freebsd) } \ %{mcall-linux: %(startfile_linux) } \ %{mcall-gnu: %(startfile_gnu) } \ %{mcall-netbsd: %(startfile_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(startfile_default) }}}}}}}}" #define STARTFILE_DEFAULT_SPEC "" --- 988,1001 ---- %{myellowknife: %(startfile_yellowknife) } \ %{mmvme: %(startfile_mvme) } \ %{msim: %(startfile_sim) } \ + %{mwindiss: %(startfile_windiss) } \ %{mcall-freebsd: %(startfile_freebsd) } \ %{mcall-linux: %(startfile_linux) } \ %{mcall-gnu: %(startfile_gnu) } \ %{mcall-netbsd: %(startfile_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: \ ! %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: \ ! %{!mcall-netbsd: %(startfile_default) }}}}}}}}}" #define STARTFILE_DEFAULT_SPEC "" *************** do { \ *** 1128,1154 **** %{myellowknife: %(lib_yellowknife) } \ %{mmvme: %(lib_mvme) } \ %{msim: %(lib_sim) } \ %{mcall-freebsd: %(lib_freebsd) } \ %{mcall-linux: %(lib_linux) } \ %{mcall-gnu: %(lib_gnu) } \ %{mcall-netbsd: %(lib_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(lib_default) }}}}}}}}" #define LIB_DEFAULT_SPEC "" /* Override svr4.h definition. */ #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "crtsavres.o%s \ ! %{mads: %(endfile_ads)} \ ! %{myellowknife: %(endfile_yellowknife)} \ ! %{mmvme: %(endfile_mvme)} \ ! %{msim: %(endfile_sim)} \ ! %{mcall-freebsd: %(endfile_freebsd) } \ ! %{mcall-linux: %(endfile_linux) } \ ! %{mcall-gnu: %(endfile_gnu) } \ ! %{mcall-netbsd: %(endfile_netbsd) } \ ! %{mvxworks: %(endfile_vxworks) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %{!mvxworks: %(endfile_default) }}}}}}}}}" #define ENDFILE_DEFAULT_SPEC "" --- 1006,1041 ---- %{myellowknife: %(lib_yellowknife) } \ %{mmvme: %(lib_mvme) } \ %{msim: %(lib_sim) } \ + %{mwindiss: %(lib_windiss) } \ %{mcall-freebsd: %(lib_freebsd) } \ %{mcall-linux: %(lib_linux) } \ %{mcall-gnu: %(lib_gnu) } \ %{mcall-netbsd: %(lib_netbsd) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: \ ! %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: \ ! %{!mcall-netbsd: %(lib_default) }}}}}}}}}" #define LIB_DEFAULT_SPEC "" /* Override svr4.h definition. */ #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "\ ! %{mads: crtsavres.o%s %(endfile_ads)} \ ! %{myellowknife: crtsavres.o%s %(endfile_yellowknife)} \ ! %{mmvme: crtsavres.o%s %(endfile_mvme)} \ ! %{msim: crtsavres.o%s %(endfile_sim)} \ ! %{mwindiss: %(endfile_windiss)} \ ! %{mcall-freebsd: crtsavres.o%s %(endfile_freebsd) } \ ! %{mcall-linux: crtsavres.o%s %(endfile_linux) } \ ! %{mcall-gnu: crtsavres.o%s %(endfile_gnu) } \ ! %{mcall-netbsd: crtsavres.o%s %(endfile_netbsd) } \ ! %{mvxworks: crtsavres.o%s %(endfile_vxworks) } \ ! %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: \ ! %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: \ ! %{!mcall-netbsd: %{!mvxworks: %(crtsavres_default) \ ! %(endfile_default) }}}}}}}}}}" ! ! #define CRTSAVRES_DEFAULT_SPEC "crtsavres.o%s" #define ENDFILE_DEFAULT_SPEC "" *************** do { \ *** 1207,1213 **** /* FreeBSD support. */ #define CPP_OS_FREEBSD_SPEC "\ ! -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \ -Acpu=powerpc -Amachine=powerpc" #define STARTFILE_FREEBSD_SPEC FBSD_STARTFILE_SPEC --- 1094,1100 ---- /* FreeBSD support. */ #define CPP_OS_FREEBSD_SPEC "\ ! -D__ELF__ -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \ -Acpu=powerpc -Amachine=powerpc" #define STARTFILE_FREEBSD_SPEC FBSD_STARTFILE_SPEC *************** do { \ *** 1216,1222 **** #define LINK_START_FREEBSD_SPEC "" #define LINK_OS_FREEBSD_SPEC "\ ! %{symbolic:-Bsymbolic}" /* GNU/Linux support. */ #ifdef USE_GNULIBC_1 --- 1103,1119 ---- #define LINK_START_FREEBSD_SPEC "" #define LINK_OS_FREEBSD_SPEC "\ ! %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ ! %{Wl,*:%*} \ ! %{v:-V} \ ! %{assert*} %{R*} %{rpath*} %{defsym*} \ ! %{shared:-Bshareable %{h*} %{soname*}} \ ! %{!shared: \ ! %{!static: \ ! %{rdynamic: -export-dynamic} \ ! %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \ ! %{static:-Bstatic}} \ ! %{symbolic:-Bsymbolic}" /* GNU/Linux support. */ #ifdef USE_GNULIBC_1 *************** ncrtn.o%s" *** 1375,1388 **** %{mcpu=823: -DCPU=PPC603} \ %{mcpu=860: -DCPU=PPC603}" /* Define any extra SPECS that the compiler needs to generate. */ /* Override rs6000.h definition. */ #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "cpp_sysv", CPP_SYSV_SPEC }, \ ! { "cpp_sysv_default", CPP_SYSV_DEFAULT_SPEC }, \ ! { "cpp_endian_default", CPP_ENDIAN_DEFAULT_SPEC }, \ ! { "cpp_endian", CPP_ENDIAN_SPEC }, \ { "lib_ads", LIB_ADS_SPEC }, \ { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \ { "lib_mvme", LIB_MVME_SPEC }, \ --- 1272,1302 ---- %{mcpu=823: -DCPU=PPC603} \ %{mcpu=860: -DCPU=PPC603}" + /* WindISS support. */ + + #define LIB_WINDISS_SPEC "--start-group -li -lcfp -lwindiss -lram -limpl -limpfp --end-group" + + #define CPP_OS_WINDISS_SPEC "\ + -D__rtasim \ + -D__EABI__ \ + -D__ppc \ + %{!msoft-float: -D__hardfp} \ + " + + #define STARTFILE_WINDISS_SPEC "crt0.o%s crtbegin.o%s" + + #define ENDFILE_WINDISS_SPEC "crtend.o%s" + + #define LINK_START_WINDISS_SPEC "" + + #define LINK_OS_WINDISS_SPEC "" + /* Define any extra SPECS that the compiler needs to generate. */ /* Override rs6000.h definition. */ #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "cpp_sysv", CPP_SYSV_SPEC }, \ ! { "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \ { "lib_ads", LIB_ADS_SPEC }, \ { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \ { "lib_mvme", LIB_MVME_SPEC }, \ *************** ncrtn.o%s" *** 1392,1397 **** --- 1306,1312 ---- { "lib_linux", LIB_LINUX_SPEC }, \ { "lib_netbsd", LIB_NETBSD_SPEC }, \ { "lib_vxworks", LIB_VXWORKS_SPEC }, \ + { "lib_windiss", LIB_WINDISS_SPEC }, \ { "lib_default", LIB_DEFAULT_SPEC }, \ { "startfile_ads", STARTFILE_ADS_SPEC }, \ { "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \ *************** ncrtn.o%s" *** 1402,1407 **** --- 1317,1323 ---- { "startfile_linux", STARTFILE_LINUX_SPEC }, \ { "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \ { "startfile_vxworks", STARTFILE_VXWORKS_SPEC }, \ + { "startfile_windiss", STARTFILE_WINDISS_SPEC }, \ { "startfile_default", STARTFILE_DEFAULT_SPEC }, \ { "endfile_ads", ENDFILE_ADS_SPEC }, \ { "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \ *************** ncrtn.o%s" *** 1412,1417 **** --- 1328,1334 ---- { "endfile_linux", ENDFILE_LINUX_SPEC }, \ { "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \ { "endfile_vxworks", ENDFILE_VXWORKS_SPEC }, \ + { "endfile_windiss", ENDFILE_WINDISS_SPEC }, \ { "endfile_default", ENDFILE_DEFAULT_SPEC }, \ { "link_path", LINK_PATH_SPEC }, \ { "link_shlib", LINK_SHLIB_SPEC }, \ *************** ncrtn.o%s" *** 1426,1431 **** --- 1343,1349 ---- { "link_start_linux", LINK_START_LINUX_SPEC }, \ { "link_start_netbsd", LINK_START_NETBSD_SPEC }, \ { "link_start_vxworks", LINK_START_VXWORKS_SPEC }, \ + { "link_start_windiss", LINK_START_WINDISS_SPEC }, \ { "link_start_default", LINK_START_DEFAULT_SPEC }, \ { "link_os", LINK_OS_SPEC }, \ { "link_os_ads", LINK_OS_ADS_SPEC }, \ *************** ncrtn.o%s" *** 1437,1450 **** { "link_os_gnu", LINK_OS_GNU_SPEC }, \ { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ { "link_os_vxworks", LINK_OS_VXWORKS_SPEC }, \ { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \ { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \ { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \ - { "cpp_endian_big", CPP_ENDIAN_BIG_SPEC }, \ - { "cpp_endian_little", CPP_ENDIAN_LITTLE_SPEC }, \ - { "cpp_float_default", CPP_FLOAT_DEFAULT_SPEC }, \ - { "cpp_longdouble_default", CPP_LONGDOUBLE_DEFAULT_SPEC }, \ { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ --- 1355,1365 ---- { "link_os_gnu", LINK_OS_GNU_SPEC }, \ { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ { "link_os_vxworks", LINK_OS_VXWORKS_SPEC }, \ + { "link_os_windiss", LINK_OS_WINDISS_SPEC }, \ { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \ { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \ { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \ { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ *************** ncrtn.o%s" *** 1453,1460 **** { "cpp_os_gnu", CPP_OS_GNU_SPEC }, \ { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \ { "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \ - { "cpp_os_vxworks", CPP_OS_VXWORKS_SPEC }, \ { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }, \ { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, /* Define this macro as a C expression for the initializer of an --- 1368,1376 ---- { "cpp_os_gnu", CPP_OS_GNU_SPEC }, \ { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \ { "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \ { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }, \ + { "cpp_os_vxworks", CPP_OS_VXWORKS_SPEC }, \ + { "cpp_os_windiss", CPP_OS_WINDISS_SPEC }, \ { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, /* Define this macro as a C expression for the initializer of an *************** ncrtn.o%s" *** 1481,1487 **** pack(pop)'. The pack(push,) pragma specifies the maximum alignment (in bytes) of fields within a structure, in much the same way as the __aligned__' and __packed__' __attribute__'s ! do. A pack value of zero resets the behaviour to the default. Successive invocations of this pragma cause the previous values to be stacked, so that invocations of #pragma pack(pop)' will return to the previous value. */ --- 1397,1403 ---- pack(pop)'. The pack(push,) pragma specifies the maximum alignment (in bytes) of fields within a structure, in much the same way as the __aligned__' and __packed__' __attribute__'s ! do. A pack value of zero resets the behavior to the default. Successive invocations of this pragma cause the previous values to be stacked, so that invocations of #pragma pack(pop)' will return to the previous value. */ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/sysv4le.h gcc-3.3/gcc/config/rs6000/sysv4le.h *** gcc-3.2.3/gcc/config/rs6000/sysv4le.h 2001-02-10 11:37:58.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/sysv4le.h 2002-06-11 23:14:47.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,31 **** #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_LITTLE_ENDIAN) - #undef CPP_ENDIAN_DEFAULT_SPEC - #define CPP_ENDIAN_DEFAULT_SPEC "%(cpp_endian_little)" - #undef CC1_ENDIAN_DEFAULT_SPEC #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_little)" --- 23,28 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-aix43 gcc-3.3/gcc/config/rs6000/t-aix43 *** gcc-3.2.3/gcc/config/rs6000/t-aix43 2003-01-28 21:57:41.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-aix43 2003-01-26 11:35:08.000000000 +0000 *************** MULTILIB_OPTIONS = pthread \ *** 19,45 **** MULTILIB_DIRNAMES = pthread \ common power powerpc ppc64 ! MULTILIB_MATCHES = mcpu?power=mpower \ ! mcpu?power=mrios1 \ mcpu?power=mcpu?rios1 \ mcpu?power=mcpu?rsc \ mcpu?power=mcpu?rsc1 \ - mcpu?power=mpower2 \ - mcpu?power=mrios2 \ - mcpu?power=mcpu?rios2 \ mcpu?powerpc=mcpu?rs64a \ mcpu?powerpc=mcpu?601 \ mcpu?powerpc=mcpu?602 \ mcpu?powerpc=mcpu?603 \ mcpu?powerpc=mcpu?603e \ mcpu?powerpc=mcpu?604 \ mcpu?powerpc=mcpu?620 \ ! mcpu?powerpc=mcpu?630 \ ! mcpu?powerpc=mcpu?750 \ ! mcpu?powerpc=mcpu?403 \ ! mcpu?powerpc=mpowerpc \ ! mcpu?powerpc=mpowerpc-gpopt \ ! mcpu?powerpc=mpowerpc-gfxopt LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib --- 19,42 ---- MULTILIB_DIRNAMES = pthread \ common power powerpc ppc64 ! MULTILIB_MATCHES = mcpu?power=mcpu?power \ ! mcpu?power=mcpu?power2 \ ! mcpu?powerpc=mcpu?power3 \ ! mcpu?powerpc=mcpu?power4 \ ! mcpu?powerpc=mcpu?powerpc \ mcpu?power=mcpu?rios1 \ + mcpu?power=mcpu?rios2 \ mcpu?power=mcpu?rsc \ mcpu?power=mcpu?rsc1 \ mcpu?powerpc=mcpu?rs64a \ mcpu?powerpc=mcpu?601 \ mcpu?powerpc=mcpu?602 \ mcpu?powerpc=mcpu?603 \ mcpu?powerpc=mcpu?603e \ mcpu?powerpc=mcpu?604 \ + mcpu?powerpc=mcpu?604e \ mcpu?powerpc=mcpu?620 \ ! mcpu?powerpc=mcpu?630 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-aix52 gcc-3.3/gcc/config/rs6000/t-aix52 *** gcc-3.2.3/gcc/config/rs6000/t-aix52 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-aix52 2003-01-26 11:35:08.000000000 +0000 *************** *** 0 **** --- 1,52 ---- + # We want fine grained libraries, so use the new code to build the + # floating point emulation libraries. + FPBIT = fp-bit.c + DPBIT = dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + # Build the libraries for pthread and all of the + # different processor models + + MULTILIB_OPTIONS = pthread maix64 + + MULTILIB_DIRNAMES = pthread ppc64 + + MULTILIB_MATCHES = + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib + + # Build a shared libgcc library. + SHLIB_EXT = .a + SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ + -Wl,-bE:@shlib_map_file@ -o @multilib_dir@/shr.o \ + @multilib_flags@ @shlib_objs@ -lc \ + `case @shlib_base_name@ in \ + *pthread*) echo -L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a ;; \ + *) echo -lc ;; esac` ; \ + rm -f tmp-@shlib_base_name@.a ; \ + $(AR_CREATE_FOR_TARGET) tmp-@shlib_base_name@.a @multilib_dir@/shr.o ; \ + mv tmp-@shlib_base_name@.a @shlib_base_name@.a ; \ + rm -f @multilib_dir@/shr.o + # $(slibdir) double quoted to protect it from expansion while building + # libgcc.mk. We want this delayed until actual install time. + SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/ + SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac` + SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk + SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver + SHLIB_NM_FLAGS = -Bpg -X32_64 + + # Either 32-bit and 64-bit objects in archives. + AR_FLAGS_FOR_TARGET = -X32_64 + + # Compile Ada files with minimal-toc. The primary focus is gnatlib, so + # that the library does not use nearly the entire TOC of applications + # until gnatlib is built as a shared library on AIX. Compiling the + # compiler with -mminimal-toc does not cause any harm. + T_ADAFLAGS = -mminimal-toc diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-darwin gcc-3.3/gcc/config/rs6000/t-darwin *** gcc-3.2.3/gcc/config/rs6000/t-darwin 2001-12-07 17:36:56.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-darwin 2002-11-07 06:00:06.000000000 +0000 *************** *** 1,33 **** ! # Library code must include trampoline support LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-tramp.asm - - # We want fine grained libraries, so use the new code to build the - # floating point emulation libraries. - FPBIT = fp-bit.c - DPBIT = dp-bit.c - - dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - - fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - - darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) $(RTL_BASE_H) \ - $(REGS_H) hard-reg-set.h insn-config.h conditions.h output.h \ - insn-attr.h flags.h $(TREE_H) $(EXPR_H) reload.h \ - function.h $(GGC_H) $(TM_P_H) - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - - darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) \ - $(TREE_H) $(C_TREE_H) c-lex.h c-pragma.h toplev.h cpplib.h \ - $(TM_P_H) - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - - # Build the libraries for both hard and soft floating point - - MULTILIB_OPTIONS = msoft-float - MULTILIB_DIRNAMES = soft-float - - LIBGCC = stmp-multilib - INSTALL_LIBGCC = install-multilib --- 1,2 ---- ! # Library code must include trampoline support. LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-tramp.asm diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-linux64 gcc-3.3/gcc/config/rs6000/t-linux64 *** gcc-3.2.3/gcc/config/rs6000/t-linux64 2002-04-05 04:47:28.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-linux64 2003-02-11 20:55:15.000000000 +0000 *************** TARGET_LIBGCC2_CFLAGS = *** 5,10 **** --- 5,13 ---- EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \ crtsavres.o + # These functions are needed for soft-float on powerpc64-linux. + LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/ppc64-fp.c + # ld provides these functions as needed. crtsavres.S: echo >crtsavres.S diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-netbsd gcc-3.3/gcc/config/rs6000/t-netbsd *** gcc-3.2.3/gcc/config/rs6000/t-netbsd 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-netbsd 2002-11-26 00:05:07.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + # Support for NetBSD PowerPC ELF targets (SVR4 ABI). + + LIB2FUNCS_EXTRA = tramp.S + + tramp.S: $(srcdir)/config/rs6000/tramp.asm + cat $(srcdir)/config/rs6000/tramp.asm > tramp.S + + crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm + cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S + + EXTRA_PARTS += crtsavres$(objext) + + # It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata. + CRTSTUFF_T_CFLAGS += -msdata=none + CRTSTUFF_T_CFLAGS_S += -msdata=none + + # Switch synonyms + MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \ + msoft-float=mcpu?403 \ + msoft-float=mcpu?405 \ + msoft-float=mcpu?ec603e \ + msoft-float=mcpu?801 \ + msoft-float=mcpu?821 \ + msoft-float=mcpu?823 \ + msoft-float=mcpu?860 + + MULTILIB_OPTIONS = msoft-float + MULTILIB_DIRNAMES = soft-float + MULTILIB_EXTRA_OPTS = fPIC mstrict-align + MULTILIB_EXCEPTIONS = + + MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT} + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib + EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \ + crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \ + crtsavres$(objext) + + $(T)crtsavres$(objext): crtsavres.S + $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ + -c crtsavres.S -o $(T)crtsavres$(objext) diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-ppccomm gcc-3.3/gcc/config/rs6000/t-ppccomm *** gcc-3.2.3/gcc/config/rs6000/t-ppccomm 2002-02-19 19:40:41.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-ppccomm 2002-08-03 23:23:49.000000000 +0000 *************** tramp.S: $(srcdir)/config/rs6000/tramp.a *** 27,32 **** --- 27,33 ---- # Switch synonyms MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \ msoft-float=mcpu?403 \ + msoft-float=mcpu?405 \ msoft-float=mcpu?ec603e \ msoft-float=mcpu?801 \ msoft-float=mcpu?821 \ diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-ppcendian gcc-3.3/gcc/config/rs6000/t-ppcendian *** gcc-3.2.3/gcc/config/rs6000/t-ppcendian 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-ppcendian 2002-03-04 00:30:25.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + # Multilibs for powerpc embedded ELF targets with altivec. + + MULTILIB_OPTIONS = msoft-float \ + mlittle/mbig + + MULTILIB_DIRNAMES = nof \ + le be + + + MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT} \ + ${MULTILIB_MATCHES_ENDIAN} \ + ${MULTILIB_MATCHES_SYSV} diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/t-rs6000-c-rule gcc-3.3/gcc/config/rs6000/t-rs6000-c-rule *** gcc-3.2.3/gcc/config/rs6000/t-rs6000-c-rule 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/t-rs6000-c-rule 2002-05-25 22:01:52.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + rs6000-c.o: $(srcdir)/config/rs6000/rs6000-c.c \ + $(srcdir)/config/rs6000/rs6000-protos.h \ + $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPPLIB_H) $(TM_P_H) c-pragma.h errors.h + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/vxppc.h gcc-3.3/gcc/config/rs6000/vxppc.h *** gcc-3.2.3/gcc/config/rs6000/vxppc.h 2000-11-02 23:29:12.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/vxppc.h 2002-07-10 00:33:51.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 39,55 **** #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_vxworks)" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "\ ! -D__vxworks -D__vxworks__ -Asystem=vxworks -Asystem=embedded \ ! -Acpu=powerpc -Amachine=powerpc" ! ! /* Don't define _LITTLE_ENDIAN or _BIG_ENDIAN */ ! #undef CPP_ENDIAN_BIG_SPEC ! #define CPP_ENDIAN_BIG_SPEC "-D__BIG_ENDIAN__ -Amachine=bigendian" ! ! #undef CPP_ENDIAN_LITTLE_SPEC ! #define CPP_ENDIAN_LITTLE_SPEC "-D__LITTLE_ENDIAN__ -Amachine=littleendian" /* We use stabs-in-elf for debugging */ #undef PREFERRED_DEBUGGING_TYPE --- 39,56 ---- #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_vxworks)" ! #undef TARGET_OS_CPP_BUILTINS ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__vxworks"); \ ! builtin_define ("__vxworks__"); \ ! builtin_assert ("system=vxworks"); \ ! builtin_assert ("system=embedded"); \ ! builtin_assert ("cpu=powerpc"); \ ! builtin_assert ("machine=powerpc"); \ ! } \ ! while (0) /* We use stabs-in-elf for debugging */ #undef PREFERRED_DEBUGGING_TYPE diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/windiss.h gcc-3.3/gcc/config/rs6000/windiss.h *** gcc-3.2.3/gcc/config/rs6000/windiss.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/windiss.h 2002-11-10 20:47:45.000000000 +0000 *************** *** 0 **** --- 1,47 ---- + /* Support for GCC on PowerPC using WindISS simulator. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by CodeSourcery, LLC. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (PowerPC WindISS)"); + + #undef LIB_DEFAULT_SPEC + #define LIB_DEFAULT_SPEC "%(lib_windiss)" + + #undef STARTFILE_DEFAULT_SPEC + #define STARTFILE_DEFAULT_SPEC "%(startfile_windiss)" + + #undef ENDFILE_DEFAULT_SPEC + #define ENDFILE_DEFAULT_SPEC "%(endfile_windiss)" + + #undef LINK_START_DEFAULT_SPEC + #define LINK_START_DEFAULT_SPEC "%(link_start_windiss)" + + #undef LINK_OS_DEFAULT_SPEC + #define LINK_OS_DEFAULT_SPEC "%(link_os_windiss)" + + #undef CRTSAVRES_DEFAULT_SPEC + #define CRTSAVRES_DEFAULT_SPEC "" + + #undef WCHAR_TYPE + #define WCHAR_TYPE "short unsigned int" + + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE 16 diff -Nrc3pad gcc-3.2.3/gcc/config/rs6000/xcoff.h gcc-3.3/gcc/config/rs6000/xcoff.h *** gcc-3.2.3/gcc/config/rs6000/xcoff.h 2002-05-24 19:27:09.000000000 +0000 --- gcc-3.3/gcc/config/rs6000/xcoff.h 2002-10-22 23:05:22.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,29 **** #define TARGET_OBJECT_FORMAT OBJECT_XCOFF /* The RS/6000 uses the XCOFF format. */ ! #define XCOFF_DEBUGGING_INFO /* Define if the object format being used is COFF or a superset. */ #define OBJECT_FORMAT_COFF --- 23,29 ---- #define TARGET_OBJECT_FORMAT OBJECT_XCOFF /* The RS/6000 uses the XCOFF format. */ ! #define XCOFF_DEBUGGING_INFO 1 /* Define if the object format being used is COFF or a superset. */ #define OBJECT_FORMAT_COFF *************** toc_section () \ *** 135,171 **** #define READONLY_DATA_SECTION read_only_data_section ! /* Select the section for an initialized data object. ! ! On the RS/6000, we have a special section for all variables except those ! that are static. */ ! ! #define SELECT_SECTION(EXP,RELOC,ALIGN) \ ! { \ ! if ((TREE_CODE (EXP) == STRING_CST \ ! && ! flag_writable_strings) \ ! || (TREE_CODE_CLASS (TREE_CODE (EXP)) == 'd' \ ! && TREE_READONLY (EXP) && ! TREE_THIS_VOLATILE (EXP) \ ! && DECL_INITIAL (EXP) \ ! && (DECL_INITIAL (EXP) == error_mark_node \ ! || TREE_CONSTANT (DECL_INITIAL (EXP))) \ ! && ! (RELOC))) \ ! { \ ! if (TREE_PUBLIC (EXP)) \ ! read_only_data_section (); \ ! else \ ! read_only_private_data_section (); \ ! } \ ! else \ ! { \ ! if (TREE_PUBLIC (EXP)) \ ! data_section (); \ ! else \ ! private_data_section (); \ ! } \ ! } ! ! /* Return non-zero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only --- 135,141 ---- #define READONLY_DATA_SECTION read_only_data_section ! /* Return nonzero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only *************** toc_section () \ *** 189,217 **** || (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ && ! TARGET_NO_FP_IN_TOC))))) ! /* Select section for constant in constant pool. ! ! On RS/6000, all constants are in the private read-only data area. ! However, if this is being placed in the TOC it must be output as a ! toc entry. */ ! ! #define SELECT_RTX_SECTION(MODE, X, ALIGN) \ ! { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (X, MODE)) \ ! toc_section (); \ ! else \ ! read_only_private_data_section (); \ ! } ! ! /* If we are referencing a function that is static or is known to be ! in this file, make the SYMBOL_REF special. We can use this to indicate ! that we can branch to this function without emitting a no-op after the ! call. Do not set this flag if the function is weakly defined. */ ! ! #define ENCODE_SECTION_INFO(DECL) \ ! if (TREE_CODE (DECL) == FUNCTION_DECL \ ! && !TREE_PUBLIC (DECL) \ ! && !DECL_WEAK (DECL)) \ ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; /* FP save and restore routines. */ #define SAVE_FP_PREFIX "._savef" --- 159,172 ---- || (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ && ! TARGET_NO_FP_IN_TOC))))) ! #define TARGET_ASM_GLOBALIZE_LABEL rs6000_xcoff_asm_globalize_label ! #define TARGET_ASM_NAMED_SECTION rs6000_xcoff_asm_named_section ! #define TARGET_ASM_SELECT_SECTION rs6000_xcoff_select_section ! #define TARGET_ASM_SELECT_RTX_SECTION rs6000_xcoff_select_rtx_section ! #define TARGET_ASM_UNIQUE_SECTION rs6000_xcoff_unique_section ! #define TARGET_ENCODE_SECTION_INFO rs6000_xcoff_encode_section_info ! #define TARGET_STRIP_NAME_ENCODING rs6000_xcoff_strip_name_encoding ! #define TARGET_SECTION_TYPE_FLAGS rs6000_xcoff_section_type_flags /* FP save and restore routines. */ #define SAVE_FP_PREFIX "._savef" *************** toc_section () \ *** 232,244 **** /* This outputs NAME to FILE up to the first null or '['. */ ! #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ ! { \ ! const char *_p; \ ! \ ! STRIP_NAME_ENCODING (_p, (NAME)); \ ! assemble_name ((FILE), _p); \ ! } /* This is how to output the definition of a user-level label named NAME, such as the label on a static function or variable NAME. */ --- 187,194 ---- /* This outputs NAME to FILE up to the first null or '['. */ ! #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ ! assemble_name ((FILE), (*targetm.strip_name_encoding) (NAME)) /* This is how to output the definition of a user-level label named NAME, such as the label on a static function or variable NAME. */ *************** toc_section () \ *** 249,279 **** /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs ("\t.globl ", FILE); \ ! RS6000_OUTPUT_BASENAME (FILE, NAME); putc ('\n', FILE);} while (0) ! ! /* Remove any trailing [DS] or the like from the symbol name. */ ! ! #define STRIP_NAME_ENCODING(VAR,NAME) \ ! do \ ! { \ ! const char *_name = (NAME); \ ! size_t _len; \ ! if (*_name == '*') \ ! _name++; \ ! _len = strlen (_name); \ ! if (_name[_len - 1] != ']') \ ! (VAR) = _name; \ ! else \ ! { \ ! char *_new_name = (char *) alloca (_len + 1); \ ! strcpy (_new_name, _name); \ ! _new_name[_len - 4] = '\0'; \ ! (VAR) = _new_name; \ ! } \ ! } \ ! while (0) /* Output at beginning of assembler file. --- 199,206 ---- /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* Output at beginning of assembler file. *************** toc_section () \ *** 296,302 **** rs6000_gen_section_name (&xcoff_read_only_section_name, \ main_input_filename, ".ro_"); \ \ ! fprintf (FILE, "\t.file\t\"%s\"\n", main_input_filename); \ if (TARGET_64BIT) \ fputs ("\t.machine\t\"ppc64\"\n", FILE); \ toc_section (); \ --- 223,231 ---- rs6000_gen_section_name (&xcoff_read_only_section_name, \ main_input_filename, ".ro_"); \ \ ! fputs ("\t.file\t", FILE); \ ! output_quoted_string (FILE, main_input_filename); \ ! fputc ('\n', FILE); \ if (TARGET_64BIT) \ fputs ("\t.machine\t\"ppc64\"\n", FILE); \ toc_section (); \ *************** toc_section () \ *** 337,343 **** #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ { rtx sym_ref = XEXP (DECL_RTL (DECL), 0); \ ! if (!DECL_WEAK (DECL)) \ SYMBOL_REF_FLAG (sym_ref) = 1; \ if (TREE_PUBLIC (DECL)) \ { \ --- 266,272 ---- #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ { rtx sym_ref = XEXP (DECL_RTL (DECL), 0); \ ! if ((*targetm.binds_local_p) (DECL)) \ SYMBOL_REF_FLAG (sym_ref) = 1; \ if (TREE_PUBLIC (DECL)) \ { \ *************** toc_section () \ *** 367,373 **** putc ('.', FILE); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ fputs (":\n", FILE); \ ! if (write_symbols == XCOFF_DEBUG) \ xcoffout_declare_function (FILE, DECL, NAME); \ } --- 296,306 ---- putc ('.', FILE); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ fputs (":\n", FILE); \ ! if (write_symbols == XCOFF_DEBUG \ ! /* When called before targetm.asm_out.output_mi_thunk, \ ! we won't be emitting the rest of the debug info that \ ! goes along with this, leading to assembler errors. */ \ ! && !(current_function_is_thunk && !no_new_pseudos)) \ xcoffout_declare_function (FILE, DECL, NAME); \ } *************** toc_section () \ *** 379,395 **** /* This says how to output an external. */ #undef ASM_OUTPUT_EXTERNAL ! #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ ! { rtx _symref = XEXP (DECL_RTL (DECL), 0); \ ! if ((TREE_CODE (DECL) == VAR_DECL \ ! || TREE_CODE (DECL) == FUNCTION_DECL) \ ! && (NAME)[strlen (NAME) - 1] != ']') \ ! { \ ! char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \ ! strcpy (_name, XSTR (_symref, 0)); \ ! strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \ ! XSTR (_symref, 0) = _name; \ ! } \ } /* This is how to output an internal numbered label where --- 312,328 ---- /* This says how to output an external. */ #undef ASM_OUTPUT_EXTERNAL ! #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ ! { rtx _symref = XEXP (DECL_RTL (DECL), 0); \ ! if ((TREE_CODE (DECL) == VAR_DECL \ ! || TREE_CODE (DECL) == FUNCTION_DECL) \ ! && (NAME)[strlen (NAME) - 1] != ']') \ ! { \ ! XSTR (_symref, 0) = concat (XSTR (_symref, 0), \ ! (TREE_CODE (DECL) == FUNCTION_DECL \ ! ? "[DS]" : "[RW]"), \ ! NULL); \ ! } \ } /* This is how to output an internal numbered label where *************** toc_section () \ *** 426,444 **** /* This is how to advance the location counter by SIZE bytes. */ #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "\t.space %d\n", (SIZE)) /* This says how to output an assembler line to define a global common symbol. */ ! #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGNMENT) \ ! do { fputs ("\t.comm ", (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ ! if ( (SIZE) > 4) \ ! fprintf ((FILE), ",%d,3\n", (SIZE)); \ else \ ! fprintf ((FILE), ",%d\n", (SIZE)); \ } while (0) /* This says how to output an assembler line --- 359,384 ---- /* This is how to advance the location counter by SIZE bytes. */ + #define SKIP_ASM_OP "\t.space " + #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE)) /* This says how to output an assembler line to define a global common symbol. */ ! #define COMMON_ASM_OP "\t.comm " ! ! #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ ! do { fputs (COMMON_ASM_OP, (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ ! if ((ALIGN) > 32) \ ! fprintf ((FILE), ",%u,%u\n", (SIZE), \ ! exact_log2 ((ALIGN) / BITS_PER_UNIT)); \ ! else if ((SIZE) > 4) \ ! fprintf ((FILE), ",%u,3\n", (SIZE)); \ else \ ! fprintf ((FILE), ",%u\n", (SIZE)); \ } while (0) /* This says how to output an assembler line *************** toc_section () \ *** 447,456 **** alignment after preceding TOC section if it was aligned for 64-bit mode. */ #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ ! do { fputs ("\t.lcomm ", (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ ! fprintf ((FILE), ",%d,%s\n", (TARGET_32BIT ? (SIZE) : (ROUNDED)), \ xcoff_bss_section_name); \ } while (0) --- 387,398 ---- alignment after preceding TOC section if it was aligned for 64-bit mode. */ + #define LOCAL_COMMON_ASM_OP "\t.lcomm " + #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ ! do { fputs (LOCAL_COMMON_ASM_OP, (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ ! fprintf ((FILE), ",%u,%s\n", (TARGET_32BIT ? (SIZE) : (ROUNDED)), \ xcoff_bss_section_name); \ } while (0) *************** toc_section () \ *** 476,500 **** Align entire section to BIGGEST_ALIGNMENT. */ #define DATA_SECTION_ASM_OP "\t.csect .data[RW],3" - /* Define unique section name -- functions only. */ - #define UNIQUE_SECTION(DECL,RELOC) \ - do { \ - int len; \ - const char *name; \ - char *string; \ - \ - if (TREE_CODE (DECL) == FUNCTION_DECL) { \ - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ - len = strlen (name) + 5; \ - string = alloca (len + 1); \ - sprintf (string, ".%s[PR]", name); \ - DECL_SECTION_NAME (DECL) = build_string (len, string); \ - } \ - } while (0) - - /* Switch into a generic section. */ - #define TARGET_ASM_NAMED_SECTION xcoff_asm_named_section - /* Define the name of the section to use for the EH language specific data areas (.gcc_except_table on most other systems). */ #define TARGET_ASM_EXCEPTION_SECTION data_section --- 418,423 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/s390/fixdfdi.h gcc-3.3/gcc/config/s390/fixdfdi.h *** gcc-3.2.3/gcc/config/s390/fixdfdi.h 2001-08-11 20:56:12.000000000 +0000 --- gcc-3.3/gcc/config/s390/fixdfdi.h 2002-10-21 19:41:11.000000000 +0000 *************** union double_long { *** 43,48 **** --- 43,49 ---- UDItype_x ll; }; + UDItype_x __fixunsdfdi (double a1); /* convert double to unsigned int */ UDItype_x *************** union double_long { *** 114,119 **** --- 115,122 ---- UDItype_x ll; }; + DItype_x __fixdfdi (double a1); + /* convert double to int */ DItype_x __fixdfdi (double a1) *************** union float_long *** 184,189 **** --- 187,194 ---- USItype_x l; }; + UDItype_x __fixunssfdi (float a1); + /* convert float to unsigned int */ UDItype_x __fixunssfdi (float a1) *************** union float_long *** 250,255 **** --- 255,262 ---- USItype_x l; }; + DItype_x __fixsfdi (float a1); + /* convert double to int */ DItype_x __fixsfdi (float a1) diff -Nrc3pad gcc-3.2.3/gcc/config/s390/libgcc-glibc.ver gcc-3.3/gcc/config/s390/libgcc-glibc.ver *** gcc-3.2.3/gcc/config/s390/libgcc-glibc.ver 2002-02-06 21:19:46.000000000 +0000 --- gcc-3.3/gcc/config/s390/libgcc-glibc.ver 2002-11-21 12:03:49.000000000 +0000 *************** *** 8,13 **** --- 8,32 ---- # because GLIBC_2.0 does not exist on this architecture, as the first # ever glibc release on the platform was GLIBC_2.2. + %ifndef __s390x__ + %inherit GCC_3.0 GLIBC_2.0 + GLIBC_2.0 { + __divdi3 + __moddi3 + __udivdi3 + __umoddi3 + + __register_frame + __register_frame_table + __deregister_frame + __register_frame_info + __deregister_frame_info + __frame_state_for + __register_frame_info_table + } + %endif + + %ifdef __s390x__ %inherit GCC_3.0 GLIBC_2.2 GLIBC_2.2 { __register_frame *************** GLIBC_2.2 { *** 18,21 **** --- 37,41 ---- __frame_state_for __register_frame_info_table } + %endif diff -Nrc3pad gcc-3.2.3/gcc/config/s390/linux.h gcc-3.3/gcc/config/s390/linux.h *** gcc-3.2.3/gcc/config/s390/linux.h 2002-04-26 19:21:18.000000000 +0000 --- gcc-3.3/gcc/config/s390/linux.h 2002-11-21 12:03:49.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 50,84 **** /* Target specific preprocessor settings. */ ! #define NO_BUILTIN_SIZE_TYPE ! #define NO_BUILTIN_PTRDIFF_TYPE ! ! #define CPP_PREDEFINES \ ! "-Dunix -Asystem(unix) -D__gnu_linux__ -Dlinux -Asystem(linux) -D__ELF__ \ ! -Acpu(s390) -Amachine(s390) -D__s390__" ! ! #define CPP_ARCH31_SPEC \ ! "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=int" ! #define CPP_ARCH64_SPEC \ ! "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ ! -D__s390x__ -D__LONG_MAX__=9223372036854775807L" ! ! #ifdef DEFAULT_TARGET_64BIT ! #undef CPP_SPEC ! #define CPP_SPEC "%{m31:%(cpp_arch31)} %{!m31:%(cpp_arch64)}" ! #else ! #undef CPP_SPEC ! #define CPP_SPEC "%{m64:%(cpp_arch64)} %{!m64:%(cpp_arch31)}" ! #endif ! ! ! /* Target specific compiler settings. */ ! ! /* ??? -fcaller-saves sometimes doesn't work. Fix this! */ ! #undef CC1_SPEC ! #define CC1_SPEC "-fno-caller-saves" ! #undef CC1PLUS_SPEC ! #define CC1PLUS_SPEC "-fno-caller-saves" /* Target specific assembler settings. */ --- 50,71 ---- /* Target specific preprocessor settings. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("linux"); \ ! builtin_define_std ("unix"); \ ! builtin_assert ("system=linux"); \ ! builtin_assert ("system=unix"); \ ! builtin_define ("__ELF__"); \ ! builtin_define ("__gnu_linux__"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__PIC__"); \ ! builtin_define ("__pic__"); \ ! } \ ! } \ ! while (0) /* Target specific assembler settings. */ *************** Boston, MA 02111-1307, USA. */ *** 94,99 **** --- 81,92 ---- /* Target specific linker settings. */ + #ifdef DEFAULT_TARGET_64BIT + #define MULTILIB_DEFAULTS { "m64" } + #else + #define MULTILIB_DEFAULTS { "m31" } + #endif + #define LINK_ARCH31_SPEC \ "-m elf_s390 \ %{shared:-shared} \ *************** Boston, MA 02111-1307, USA. */ *** 126,308 **** is an initializer with a subgrouping for each command option. */ #define EXTRA_SPECS \ - { "cpp_arch31", CPP_ARCH31_SPEC }, \ - { "cpp_arch64", CPP_ARCH64_SPEC }, \ { "link_arch31", LINK_ARCH31_SPEC }, \ { "link_arch64", LINK_ARCH64_SPEC }, \ ! /* Character to start a comment. */ ! ! #define ASM_COMMENT_START "#" ! ! ! /* Assembler pseudos to introduce constants of various size. */ ! ! #define ASM_DOUBLE "\t.double" ! ! /* The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */ ! #define LOCAL_LABEL_PREFIX "." ! ! /* Prefix for internally generated assembler labels. */ ! #define LPREFIX ".L" ! ! ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #undef ASM_OUTPUT_LABEL ! #define ASM_OUTPUT_LABEL(FILE, NAME) \ ! (assemble_name (FILE, NAME), fputs (":\n", FILE)) ! ! /* Store in OUTPUT a string (made with alloca) containing ! an assembler-name for a local static variable named NAME. ! LABELNO is an integer which is different for each call. */ ! ! #undef ASM_FORMAT_PRIVATE_NAME ! #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ ! ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ ! sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) ! ! ! /* internal macro to output long */ ! #define _ASM_OUTPUT_LONG(FILE, VALUE) \ ! fprintf (FILE, "\t.long\t0x%lX\n", VALUE); ! ! ! /* This is how to output an element of a case-vector that is absolute. */ ! ! #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! fprintf (FILE, "%s%s%d\n", integer_asm_op (UNITS_PER_WORD, TRUE), \ ! LPREFIX, VALUE) ! ! /* This is how to output an element of a case-vector that is relative. */ ! ! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ! fprintf (FILE, "%s%s%d-%s%d\n", integer_asm_op (UNITS_PER_WORD, TRUE), \ ! LPREFIX, VALUE, LPREFIX, REL) ! ! ! ! /* This is how to output an assembler line ! that says to advance the location counter ! to a multiple of 2**LOG bytes. */ ! ! #undef ASM_OUTPUT_ALIGN ! #define ASM_OUTPUT_ALIGN(FILE, LOG) \ ! if ((LOG)!=0) fprintf ((FILE), "\t.align\t%d\n", 1<<(LOG)) ! ! /* This is how to output an assembler line ! that says to advance the location counter by SIZE bytes. */ ! ! #undef ASM_OUTPUT_SKIP ! #define ASM_OUTPUT_SKIP(FILE, SIZE) \ ! fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE)) ! ! /* This is how to output assembler code to declare an ! uninitialized external linkage data object. */ ! ! #undef ASM_OUTPUT_ALIGNED_BSS ! #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ ! asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) ! ! /* Output before read-only data. */ ! ! #define TEXT_SECTION_ASM_OP ".text" ! ! /* Output before writable (initialized) data. */ ! ! #define DATA_SECTION_ASM_OP ".data" ! ! /* Output before writable (uninitialized) data. */ ! ! #define BSS_SECTION_ASM_OP ".bss" ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE)) ! ! /* Select section for constant in constant pool. ! We are in the right section. ! undef for 64 bit mode (linux64.h). ! */ ! ! #undef SELECT_RTX_SECTION ! #define SELECT_RTX_SECTION(MODE, X, ALIGN) ! ! /* Output code to add DELTA to the first argument, and then jump to FUNCTION. ! Used for C++ multiple inheritance. */ ! #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ ! do { \ ! if (TARGET_64BIT) \ ! { \ ! if (flag_pic) \ ! { \ ! fprintf (FILE, "\tlarl 1,0f\n"); \ ! fprintf (FILE, "\tagf %d,0(1)\n", \ ! aggregate_value_p (TREE_TYPE \ ! (TREE_TYPE (FUNCTION))) ? 3 :2 ); \ ! fprintf (FILE, "\tlarl 1,"); \ ! assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ ! fprintf (FILE, "@GOTENT\n"); \ ! fprintf (FILE, "\tlg 1,0(1)\n"); \ ! fprintf (FILE, "\tbr 1\n"); \ ! fprintf (FILE, "0:\t.long "); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \ ! fprintf (FILE, "\n"); \ ! } \ ! else \ ! { \ ! fprintf (FILE, "\tlarl 1,0f\n"); \ ! fprintf (FILE, "\tagf %d,0(1)\n", \ ! aggregate_value_p (TREE_TYPE \ ! (TREE_TYPE (FUNCTION))) ? 3 :2 ); \ ! fprintf (FILE, "\tjg "); \ ! assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ ! fprintf (FILE, "\n"); \ ! fprintf (FILE, "0:\t.long "); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \ ! fprintf (FILE, "\n"); \ ! } \ ! } \ ! else \ ! { \ ! if (flag_pic) \ ! { \ ! fprintf (FILE, "\tbras 1,0f\n"); \ ! fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_-.\n"); \ ! fprintf (FILE, "\t.long "); \ ! assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ ! fprintf (FILE, "@GOT\n"); \ ! fprintf (FILE, "\t.long "); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \ ! fprintf (FILE, "\n"); \ ! fprintf (FILE, "0:\tal %d,8(1)\n", \ ! aggregate_value_p (TREE_TYPE \ ! (TREE_TYPE (FUNCTION))) ? 3 : 2 ); \ ! fprintf (FILE, "\tl 0,4(1)\n"); \ ! fprintf (FILE, "\tal 1,0(1)\n"); \ ! fprintf (FILE, "\talr 1,0\n"); \ ! fprintf (FILE, "\tl 1,0(1)\n"); \ ! fprintf (FILE, "\tbr 1\n"); \ ! } else { \ ! fprintf (FILE, "\tbras 1,0f\n"); \ ! fprintf (FILE, "\t.long "); \ ! assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ ! fprintf (FILE, "-.\n"); \ ! fprintf (FILE, "\t.long "); \ ! fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \ ! fprintf (FILE, "\n"); \ ! fprintf (FILE, "0:\tal %d,4(1)\n", \ ! aggregate_value_p (TREE_TYPE \ ! (TREE_TYPE (FUNCTION))) ? 3 : 2 ); \ ! fprintf (FILE, "\tal 1,0(1)\n"); \ ! fprintf (FILE, "\tbr 1\n"); \ ! } \ ! } \ ! } while (0) #endif --- 119,204 ---- is an initializer with a subgrouping for each command option. */ #define EXTRA_SPECS \ { "link_arch31", LINK_ARCH31_SPEC }, \ { "link_arch64", LINK_ARCH64_SPEC }, \ ! /* Do code reading to identify a signal frame, and set the frame ! state data appropriately. See unwind-dw2.c for the structs. */ ! #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ ! do { \ ! unsigned char *pc_ = (CONTEXT)->ra; \ ! long new_cfa_; \ ! int i_; \ ! \ ! typedef struct \ ! { \ ! unsigned long psw_mask; \ ! unsigned long psw_addr; \ ! unsigned long gprs[16]; \ ! unsigned int acrs[16]; \ ! unsigned int fpc; \ ! unsigned int __pad; \ ! double fprs[16]; \ ! } __attribute__ ((__aligned__ (8))) sigregs_; \ ! \ ! sigregs_ *regs_; \ ! \ ! /* svc $__NR_sigreturn or svc $__NR_rt_sigreturn */ \ ! if (pc_[0] != 0x0a || (pc_[1] != 119 && pc_[1] != 173)) \ ! break; \ ! \ ! /* New-style RT frame: \ ! retcode + alignment (8 bytes) \ ! siginfo (128 bytes) \ ! ucontext (contains sigregs) */ \ ! if ((CONTEXT)->ra == (CONTEXT)->cfa) \ ! { \ ! struct ucontext_ \ ! { \ ! unsigned long uc_flags; \ ! struct ucontext_ *uc_link; \ ! unsigned long uc_stack[3]; \ ! sigregs_ uc_mcontext; \ ! } *uc_ = (CONTEXT)->cfa + 8 + 128; \ ! \ ! regs_ = &uc_->uc_mcontext; \ ! } \ ! \ ! /* Old-style RT frame and all non-RT frames: \ ! old signal mask (8 bytes) \ ! pointer to sigregs */ \ ! else \ ! { \ ! regs_ = *(sigregs_ **)((CONTEXT)->cfa + 8); \ ! } \ ! \ ! new_cfa_ = regs_->gprs[15] + 16*sizeof(long) + 32; \ ! (FS)->cfa_how = CFA_REG_OFFSET; \ ! (FS)->cfa_reg = 15; \ ! (FS)->cfa_offset = \ ! new_cfa_ - (long) (CONTEXT)->cfa + 16*sizeof(long) + 32; \ ! \ ! for (i_ = 0; i_ < 16; i_++) \ ! { \ ! (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[i_].loc.offset = \ ! (long)®s_->gprs[i_] - new_cfa_; \ ! } \ ! for (i_ = 0; i_ < 16; i_++) \ ! { \ ! (FS)->regs.reg[16+i_].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[16+i_].loc.offset = \ ! (long)®s_->fprs[i_] - new_cfa_; \ ! } \ ! \ ! /* Load return addr from PSW into dummy register 32. */ \ ! (FS)->regs.reg[32].how = REG_SAVED_OFFSET; \ ! (FS)->regs.reg[32].loc.offset = (long)®s_->psw_addr - new_cfa_; \ ! (FS)->retaddr_column = 32; \ ! \ ! goto SUCCESS; \ ! } while (0) #endif diff -Nrc3pad gcc-3.2.3/gcc/config/s390/s390.c gcc-3.3/gcc/config/s390/s390.c *** gcc-3.2.3/gcc/config/s390/s390.c 2002-06-11 14:06:36.000000000 +0000 --- gcc-3.3/gcc/config/s390/s390.c 2003-04-23 17:09:41.000000000 +0000 *************** *** 1,5 **** /* Subroutines used for code generation on IBM S/390 and zSeries ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Hartmut Penner (hpenner@de.ibm.com) and Ulrich Weigand (uweigand@de.ibm.com). --- 1,5 ---- /* Subroutines used for code generation on IBM S/390 and zSeries ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hartmut Penner (hpenner@de.ibm.com) and Ulrich Weigand (uweigand@de.ibm.com). *************** Boston, MA 02111-1307, USA. */ *** 45,55 **** #include "target.h" #include "target-def.h" #include "debug.h" ! static bool s390_assemble_integer PARAMS ((rtx, unsigned int, int)); static int s390_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int s390_adjust_priority PARAMS ((rtx, int)); #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" --- 45,66 ---- #include "target.h" #include "target-def.h" #include "debug.h" ! #include "langhooks.h" ! #include "optabs.h" static bool s390_assemble_integer PARAMS ((rtx, unsigned int, int)); static int s390_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int s390_adjust_priority PARAMS ((rtx, int)); + static void s390_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)); + static void s390_encode_section_info PARAMS ((tree, int)); + static const char *s390_strip_name_encoding PARAMS ((const char *)); + static bool s390_cannot_force_const_mem PARAMS ((rtx)); + static void s390_init_builtins PARAMS ((void)); + static rtx s390_expand_builtin PARAMS ((tree, rtx, rtx, + enum machine_mode, int)); + static void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" *************** static int s390_adjust_priority PARAMS ( *** 58,81 **** #undef TARGET_ASM_INTEGER #define TARGET_ASM_INTEGER s390_assemble_integer - #undef TARGET_ASM_FUNCTION_PROLOGUE - #define TARGET_ASM_FUNCTION_PROLOGUE s390_function_prologue - - #undef TARGET_ASM_FUNCTION_EPILOGUE - #define TARGET_ASM_FUNCTION_EPILOGUE s390_function_epilogue - #undef TARGET_ASM_OPEN_PAREN #define TARGET_ASM_OPEN_PAREN "" #undef TARGET_ASM_CLOSE_PAREN #define TARGET_ASM_CLOSE_PAREN "" #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST s390_adjust_cost #undef TARGET_SCHED_ADJUST_PRIORITY #define TARGET_SCHED_ADJUST_PRIORITY s390_adjust_priority struct gcc_target targetm = TARGET_INITIALIZER; extern int reload_completed; --- 69,111 ---- #undef TARGET_ASM_INTEGER #define TARGET_ASM_INTEGER s390_assemble_integer #undef TARGET_ASM_OPEN_PAREN #define TARGET_ASM_OPEN_PAREN "" #undef TARGET_ASM_CLOSE_PAREN #define TARGET_ASM_CLOSE_PAREN "" + #undef TARGET_ASM_SELECT_RTX_SECTION + #define TARGET_ASM_SELECT_RTX_SECTION s390_select_rtx_section + #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST s390_adjust_cost #undef TARGET_SCHED_ADJUST_PRIORITY #define TARGET_SCHED_ADJUST_PRIORITY s390_adjust_priority + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO s390_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING s390_strip_name_encoding + + #ifdef HAVE_AS_TLS + #undef TARGET_HAVE_TLS + #define TARGET_HAVE_TLS true + #endif + #undef TARGET_CANNOT_FORCE_CONST_MEM + #define TARGET_CANNOT_FORCE_CONST_MEM s390_cannot_force_const_mem + + #undef TARGET_INIT_BUILTINS + #define TARGET_INIT_BUILTINS s390_init_builtins + #undef TARGET_EXPAND_BUILTIN + #define TARGET_EXPAND_BUILTIN s390_expand_builtin + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK s390_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_true + struct gcc_target targetm = TARGET_INITIALIZER; extern int reload_completed; *************** extern int reload_completed; *** 83,95 **** /* The alias set for prologue/epilogue register save/restore. */ static int s390_sr_alias_set = 0; - /* Function count for creating unique internal labels in a compile unit. */ - int s390_function_count = 0; - /* Save information from a "cmpxx" operation until the branch or scc is emitted. */ rtx s390_compare_op0, s390_compare_op1; /* Structure used to hold the components of a S/390 memory address. A legitimate address on S/390 is of the general form --- 113,125 ---- /* The alias set for prologue/epilogue register save/restore. */ static int s390_sr_alias_set = 0; /* Save information from a "cmpxx" operation until the branch or scc is emitted. */ rtx s390_compare_op0, s390_compare_op1; + /* The encoding characters for the four TLS models present in ELF. */ + static char const tls_model_chars[] = " GLil"; + /* Structure used to hold the components of a S/390 memory address. A legitimate address on S/390 is of the general form *************** struct s390_address *** 107,125 **** int pointer; }; ! /* Structure containing information for prologue and epilogue. */ ! struct s390_frame { ! int frame_pointer_p; ! int return_reg_saved_p; int save_fprs_p; int first_save_gpr; int first_restore_gpr; int last_save_gpr; - int arg_frame_offset; HOST_WIDE_INT frame_size; }; static int s390_match_ccmode_set PARAMS ((rtx, enum machine_mode)); --- 137,162 ---- int pointer; }; ! /* Define the structure for the machine field in struct function. */ ! struct machine_function GTY(()) { ! /* Label of start of initial literal pool. */ ! rtx literal_pool_label; ! ! /* Set, if some of the fprs 8-15 need to be saved (64 bit abi). */ int save_fprs_p; + + /* Number of first and last gpr to be saved, restored. */ int first_save_gpr; int first_restore_gpr; int last_save_gpr; + /* Size of stack frame. */ HOST_WIDE_INT frame_size; + + /* Some local-dynamic TLS symbol name. */ + const char *some_ld_name; }; static int s390_match_ccmode_set PARAMS ((rtx, enum machine_mode)); *************** static int s390_branch_condition_mask PA *** 127,146 **** static const char *s390_branch_condition_mnemonic PARAMS ((rtx, int)); static int check_mode PARAMS ((rtx, enum machine_mode *)); static int general_s_operand PARAMS ((rtx, enum machine_mode, int)); ! static int s390_decompose_address PARAMS ((rtx, struct s390_address *, int)); static int reg_used_in_mem_p PARAMS ((int, rtx)); static int addr_generation_dependency_p PARAMS ((rtx, rtx)); ! static void s390_split_branches PARAMS ((void)); static void find_constant_pool_ref PARAMS ((rtx, rtx *)); static void replace_constant_pool_ref PARAMS ((rtx *, rtx, rtx)); ! static void s390_chunkify_pool PARAMS ((void)); ! static int save_fprs_p PARAMS ((void)); static int find_unused_clobbered_reg PARAMS ((void)); ! static void s390_frame_info PARAMS ((struct s390_frame *)); static rtx save_fpr PARAMS ((rtx, int, int)); static rtx restore_fpr PARAMS ((rtx, int, int)); static int s390_function_arg_size PARAMS ((enum machine_mode, tree)); ! /* Return true if SET either doesn't set the CC register, or else the source and destination have matching CC modes and that --- 164,192 ---- static const char *s390_branch_condition_mnemonic PARAMS ((rtx, int)); static int check_mode PARAMS ((rtx, enum machine_mode *)); static int general_s_operand PARAMS ((rtx, enum machine_mode, int)); ! static int s390_decompose_address PARAMS ((rtx, struct s390_address *)); ! static rtx get_thread_pointer PARAMS ((void)); ! static rtx legitimize_tls_address PARAMS ((rtx, rtx)); ! static const char *get_some_local_dynamic_name PARAMS ((void)); ! static int get_some_local_dynamic_name_1 PARAMS ((rtx *, void *)); static int reg_used_in_mem_p PARAMS ((int, rtx)); static int addr_generation_dependency_p PARAMS ((rtx, rtx)); ! static int s390_split_branches PARAMS ((rtx, bool *)); static void find_constant_pool_ref PARAMS ((rtx, rtx *)); static void replace_constant_pool_ref PARAMS ((rtx *, rtx, rtx)); ! static int find_base_register_in_addr PARAMS ((struct s390_address *)); ! static bool find_base_register_ref PARAMS ((rtx)); ! static void replace_base_register_ref PARAMS ((rtx *, rtx)); ! static void s390_optimize_prolog PARAMS ((int)); ! static bool s390_fixup_clobbered_return_reg PARAMS ((rtx)); static int find_unused_clobbered_reg PARAMS ((void)); ! static void s390_frame_info PARAMS ((void)); static rtx save_fpr PARAMS ((rtx, int, int)); static rtx restore_fpr PARAMS ((rtx, int, int)); + static rtx save_gprs PARAMS ((rtx, int, int, int)); + static rtx restore_gprs PARAMS ((rtx, int, int, int)); static int s390_function_arg_size PARAMS ((enum machine_mode, tree)); ! static struct machine_function * s390_init_machine_status PARAMS ((void)); /* Return true if SET either doesn't set the CC register, or else the source and destination have matching CC modes and that *************** s390_match_ccmode_set (set, req_mode) *** 163,181 **** switch (set_mode) { case CCSmode: ! if (req_mode != CCSmode) ! return 0; ! break; case CCUmode: ! if (req_mode != CCUmode) ! return 0; ! break; case CCLmode: ! if (req_mode != CCLmode) return 0; break; case CCZmode: ! if (req_mode != CCSmode && req_mode != CCUmode && req_mode != CCTmode) return 0; break; --- 209,236 ---- switch (set_mode) { case CCSmode: ! case CCSRmode: case CCUmode: ! case CCURmode: case CCLmode: ! case CCL1mode: ! case CCL2mode: ! case CCT1mode: ! case CCT2mode: ! case CCT3mode: ! if (req_mode != set_mode) return 0; break; + case CCZmode: ! if (req_mode != CCSmode && req_mode != CCUmode && req_mode != CCTmode ! && req_mode != CCSRmode && req_mode != CCURmode) ! return 0; ! break; ! ! case CCAPmode: ! case CCANmode: ! if (req_mode != CCAmode) return 0; break; *************** s390_match_ccmode_set (set, req_mode) *** 188,194 **** /* Return true if every SET in INSN that sets the CC register has source and destination with matching CC modes and that ! CC mode is at least as constrained as REQ_MODE. */ int s390_match_ccmode (insn, req_mode) --- 243,250 ---- /* Return true if every SET in INSN that sets the CC register has source and destination with matching CC modes and that ! CC mode is at least as constrained as REQ_MODE. ! If REQ_MODE is VOIDmode, always return false. */ int s390_match_ccmode (insn, req_mode) *************** s390_match_ccmode (insn, req_mode) *** 197,202 **** --- 253,262 ---- { int i; + /* s390_tm_ccmode returns VOIDmode to indicate failure. */ + if (req_mode == VOIDmode) + return 0; + if (GET_CODE (PATTERN (insn)) == SET) return s390_match_ccmode_set (PATTERN (insn), req_mode); *************** s390_match_ccmode (insn, req_mode) *** 212,217 **** --- 272,316 ---- return 1; } + /* If a test-under-mask instruction can be used to implement + (compare (and ... OP1) OP2), return the CC mode required + to do that. Otherwise, return VOIDmode. + MIXED is true if the instruction can distinguish between + CC1 and CC2 for mixed selected bits (TMxx), it is false + if the instruction cannot (TM). */ + + enum machine_mode + s390_tm_ccmode (op1, op2, mixed) + rtx op1; + rtx op2; + int mixed; + { + int bit0, bit1; + + /* ??? Fixme: should work on CONST_DOUBLE as well. */ + if (GET_CODE (op1) != CONST_INT || GET_CODE (op2) != CONST_INT) + return VOIDmode; + + /* Selected bits all zero: CC0. */ + if (INTVAL (op2) == 0) + return CCTmode; + + /* Selected bits all one: CC3. */ + if (INTVAL (op2) == INTVAL (op1)) + return CCT3mode; + + /* Exactly two bits selected, mixed zeroes and ones: CC1 or CC2. */ + if (mixed) + { + bit1 = exact_log2 (INTVAL (op2)); + bit0 = exact_log2 (INTVAL (op1) ^ INTVAL (op2)); + if (bit0 != -1 && bit1 != -1) + return bit0 > bit1 ? CCT1mode : CCT2mode; + } + + return VOIDmode; + } + /* Given a comparison code OP (EQ, NE, etc.) and the operands OP0 and OP1 of a COMPARE, return the mode to be used for the comparison. */ *************** s390_select_ccmode (code, op0, op1) *** 226,241 **** --- 325,373 ---- { case EQ: case NE: + if (GET_CODE (op0) == PLUS && GET_CODE (XEXP (op0, 1)) == CONST_INT + && CONST_OK_FOR_LETTER_P (INTVAL (XEXP (op0, 1)), 'K')) + return CCAPmode; if (GET_CODE (op0) == PLUS || GET_CODE (op0) == MINUS || GET_CODE (op1) == NEG) return CCLmode; + if (GET_CODE (op0) == AND) + { + /* Check whether we can potentially do it via TM. */ + enum machine_mode ccmode; + ccmode = s390_tm_ccmode (XEXP (op0, 1), op1, 1); + if (ccmode != VOIDmode) + { + /* Relax CCTmode to CCZmode to allow fall-back to AND + if that turns out to be beneficial. */ + return ccmode == CCTmode ? CCZmode : ccmode; + } + } + + if (register_operand (op0, HImode) + && GET_CODE (op1) == CONST_INT + && (INTVAL (op1) == -1 || INTVAL (op1) == 65535)) + return CCT3mode; + if (register_operand (op0, QImode) + && GET_CODE (op1) == CONST_INT + && (INTVAL (op1) == -1 || INTVAL (op1) == 255)) + return CCT3mode; + return CCZmode; case LE: case LT: case GE: case GT: + if (GET_CODE (op0) == PLUS && GET_CODE (XEXP (op0, 1)) == CONST_INT + && CONST_OK_FOR_LETTER_P (INTVAL (XEXP (op0, 1)), 'K')) + { + if (INTVAL (XEXP((op0), 1)) < 0) + return CCANmode; + else + return CCAPmode; + } case UNORDERED: case ORDERED: case UNEQ: *************** s390_select_ccmode (code, op0, op1) *** 244,255 **** case UNGE: case UNGT: case LTGT: return CCSmode; - case LEU: case LTU: case GEU: case GTU: return CCUmode; default: --- 376,404 ---- case UNGE: case UNGT: case LTGT: + if ((GET_CODE (op0) == SIGN_EXTEND || GET_CODE (op0) == ZERO_EXTEND) + && GET_CODE (op1) != CONST_INT) + return CCSRmode; return CCSmode; case LTU: case GEU: + if (GET_CODE (op0) == PLUS) + return CCL1mode; + + if ((GET_CODE (op0) == SIGN_EXTEND || GET_CODE (op0) == ZERO_EXTEND) + && GET_CODE (op1) != CONST_INT) + return CCURmode; + return CCUmode; + + case LEU: case GTU: + if (GET_CODE (op0) == MINUS) + return CCL2mode; + + if ((GET_CODE (op0) == SIGN_EXTEND || GET_CODE (op0) == ZERO_EXTEND) + && GET_CODE (op1) != CONST_INT) + return CCURmode; return CCUmode; default: *************** s390_branch_condition_mask (code) *** 286,298 **** } break; case CCLmode: switch (GET_CODE (code)) { case EQ: return CC0 | CC2; case NE: return CC1 | CC3; ! case UNORDERED: return CC2 | CC3; /* carry */ ! case ORDERED: return CC0 | CC1; /* no carry */ default: abort (); } --- 435,495 ---- } break; + case CCT1mode: + switch (GET_CODE (code)) + { + case EQ: return CC1; + case NE: return CC0 | CC2 | CC3; + default: + abort (); + } + break; + + case CCT2mode: + switch (GET_CODE (code)) + { + case EQ: return CC2; + case NE: return CC0 | CC1 | CC3; + default: + abort (); + } + break; + + case CCT3mode: + switch (GET_CODE (code)) + { + case EQ: return CC3; + case NE: return CC0 | CC1 | CC2; + default: + abort (); + } + break; + case CCLmode: switch (GET_CODE (code)) { case EQ: return CC0 | CC2; case NE: return CC1 | CC3; ! default: ! abort (); ! } ! break; ! ! case CCL1mode: ! switch (GET_CODE (code)) ! { ! case LTU: return CC2 | CC3; /* carry */ ! case GEU: return CC0 | CC1; /* no carry */ ! default: ! abort (); ! } ! break; ! ! case CCL2mode: ! switch (GET_CODE (code)) ! { ! case GTU: return CC0 | CC1; /* borrow */ ! case LEU: return CC2 | CC3; /* no borrow */ default: abort (); } *************** s390_branch_condition_mask (code) *** 312,317 **** --- 509,556 ---- } break; + case CCURmode: + switch (GET_CODE (code)) + { + case EQ: return CC0; + case NE: return CC2 | CC1 | CC3; + case LTU: return CC2; + case GTU: return CC1; + case LEU: return CC0 | CC2; + case GEU: return CC0 | CC1; + default: + abort (); + } + break; + + case CCAPmode: + switch (GET_CODE (code)) + { + case EQ: return CC0; + case NE: return CC1 | CC2 | CC3; + case LT: return CC1 | CC3; + case GT: return CC2; + case LE: return CC0 | CC1 | CC3; + case GE: return CC0 | CC2; + default: + abort (); + } + break; + + case CCANmode: + switch (GET_CODE (code)) + { + case EQ: return CC0; + case NE: return CC1 | CC2 | CC3; + case LT: return CC1; + case GT: return CC2 | CC3; + case LE: return CC0 | CC1; + case GE: return CC0 | CC2 | CC3; + default: + abort (); + } + break; + case CCSmode: switch (GET_CODE (code)) { *************** s390_branch_condition_mask (code) *** 332,337 **** --- 571,599 ---- default: abort (); } + break; + + case CCSRmode: + switch (GET_CODE (code)) + { + case EQ: return CC0; + case NE: return CC2 | CC1 | CC3; + case LT: return CC2; + case GT: return CC1; + case LE: return CC0 | CC2; + case GE: return CC0 | CC1; + case UNORDERED: return CC3; + case ORDERED: return CC0 | CC2 | CC1; + case UNEQ: return CC0 | CC3; + case UNLT: return CC2 | CC3; + case UNGT: return CC1 | CC3; + case UNLE: return CC0 | CC2 | CC3; + case UNGE: return CC0 | CC1 | CC3; + case LTGT: return CC2 | CC1; + default: + abort (); + } + break; default: abort (); *************** s390_branch_condition_mnemonic (code, in *** 347,353 **** rtx code; int inv; { ! static const char *mnemonic[16] = { NULL, "o", "h", "nle", "l", "nhe", "lh", "ne", --- 609,615 ---- rtx code; int inv; { ! static const char *const mnemonic[16] = { NULL, "o", "h", "nle", "l", "nhe", "lh", "ne", *************** s390_single_hi (op, mode, def) *** 379,385 **** { if (GET_CODE (op) == CONST_INT) { ! unsigned HOST_WIDE_INT value; int n_parts = GET_MODE_SIZE (mode) / 2; int i, part = -1; --- 641,647 ---- { if (GET_CODE (op) == CONST_INT) { ! unsigned HOST_WIDE_INT value = 0; int n_parts = GET_MODE_SIZE (mode) / 2; int i, part = -1; *************** s390_single_hi (op, mode, def) *** 405,411 **** else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode) { ! unsigned HOST_WIDE_INT value; int n_parts = GET_MODE_SIZE (mode) / 2; int i, part = -1; --- 667,673 ---- else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode) { ! unsigned HOST_WIDE_INT value = 0; int n_parts = GET_MODE_SIZE (mode) / 2; int i, part = -1; *************** s390_single_qi (op, mode, def) *** 482,488 **** { if (GET_CODE (op) == CONST_INT) { ! unsigned HOST_WIDE_INT value; int n_parts = GET_MODE_SIZE (mode); int i, part = -1; --- 744,750 ---- { if (GET_CODE (op) == CONST_INT) { ! unsigned HOST_WIDE_INT value = 0; int n_parts = GET_MODE_SIZE (mode); int i, part = -1; *************** s390_single_qi (op, mode, def) *** 508,514 **** else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode) { ! unsigned HOST_WIDE_INT value; int n_parts = GET_MODE_SIZE (mode); int i, part = -1; --- 770,776 ---- else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode) { ! unsigned HOST_WIDE_INT value = 0; int n_parts = GET_MODE_SIZE (mode); int i, part = -1; *************** s390_extract_qi (op, mode, part) *** 579,596 **** LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if `-O' is specified, and 0 if neither is specified. ! SIZE is non-zero if `-Os' is specified and zero otherwise. */ void optimization_options (level, size) int level ATTRIBUTE_UNUSED; int size ATTRIBUTE_UNUSED; { ! #ifdef HAVE_decrement_and_branch_on_count ! /* When optimizing, enable use of BRCT instruction. */ ! if (level >= 1) ! flag_branch_on_count_reg = 1; ! #endif } void --- 841,859 ---- LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if `-O' is specified, and 0 if neither is specified. ! SIZE is nonzero if `-Os' is specified and zero otherwise. */ void optimization_options (level, size) int level ATTRIBUTE_UNUSED; int size ATTRIBUTE_UNUSED; { ! /* ??? There are apparently still problems with -fcaller-saves. */ ! flag_caller_saves = 0; ! ! /* By default, always emit DWARF-2 unwind info. This allows debugging ! without maintaining a stack frame back-chain. */ ! flag_asynchronous_unwind_tables = 1; } void *************** override_options () *** 598,609 **** { /* Acquire a unique set number for our register saves and restores. */ s390_sr_alias_set = new_alias_set (); - } /* Map for smallest class containing reg regno. */ ! enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] = { GENERAL_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, --- 861,874 ---- { /* Acquire a unique set number for our register saves and restores. */ s390_sr_alias_set = new_alias_set (); + /* Set up function hooks. */ + init_machine_status = s390_init_machine_status; + } /* Map for smallest class containing reg regno. */ ! const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] = { GENERAL_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS, *************** larl_operand (op, mode) *** 674,679 **** --- 939,946 ---- if (GET_CODE (op) == LABEL_REF) return 1; if (GET_CODE (op) == SYMBOL_REF + && XSTR (op, 0)[0] != '@' + && !tls_symbolic_operand (op) && (!flag_pic || SYMBOL_REF_FLAG (op) || CONSTANT_POOL_ADDRESS_P (op))) return 1; *************** larl_operand (op, mode) *** 696,734 **** if (GET_CODE (op) == LABEL_REF) return 1; if (GET_CODE (op) == SYMBOL_REF && (!flag_pic || SYMBOL_REF_FLAG (op) || CONSTANT_POOL_ADDRESS_P (op))) return 1; ! /* Now we must have a @GOTENT offset or @PLT stub. */ if (GET_CODE (op) == UNSPEC && XINT (op, 1) == 111) return 1; if (GET_CODE (op) == UNSPEC && XINT (op, 1) == 113) return 1; return 0; } - /* Return true if OP is a valid FP-Register. - OP is the current operation. - MODE is the current operation mode. */ - - int - fp_operand (op, mode) - register rtx op; - enum machine_mode mode; - { - register enum rtx_code code = GET_CODE (op); - if (! check_mode (op, &mode)) - return 0; - if (code == REG && REGNO_OK_FOR_FP_P (REGNO (op))) - return 1; - else - return 0; - } - /* Helper routine to implement s_operand and s_imm_operand. OP is the current operation. MODE is the current operation mode. --- 963,989 ---- if (GET_CODE (op) == LABEL_REF) return 1; if (GET_CODE (op) == SYMBOL_REF + && XSTR (op, 0)[0] != '@' + && !tls_symbolic_operand (op) && (!flag_pic || SYMBOL_REF_FLAG (op) || CONSTANT_POOL_ADDRESS_P (op))) return 1; ! /* Now we must have a @GOTENT offset or @PLT stub ! or an @INDNTPOFF TLS offset. */ if (GET_CODE (op) == UNSPEC && XINT (op, 1) == 111) return 1; if (GET_CODE (op) == UNSPEC && XINT (op, 1) == 113) return 1; + if (GET_CODE (op) == UNSPEC + && XINT (op, 1) == UNSPEC_INDNTPOFF) + return 1; return 0; } /* Helper routine to implement s_operand and s_imm_operand. OP is the current operation. MODE is the current operation mode. *************** general_s_operand (op, mode, allow_immed *** 777,783 **** case MEM: if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) return 1; ! if (s390_decompose_address (XEXP (op, 0), &addr, FALSE) && !addr.indx) return 1; break; --- 1032,1038 ---- case MEM: if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) return 1; ! if (s390_decompose_address (XEXP (op, 0), &addr) && !addr.indx) return 1; break; *************** s_imm_operand (op, mode) *** 815,820 **** --- 1070,1110 ---- return general_s_operand (op, mode, 1); } + /* Return true if OP is a valid operand for a 'Q' constraint. + This differs from s_operand in that only memory operands + without index register are accepted, nothing else. */ + + int + q_constraint (op) + register rtx op; + { + struct s390_address addr; + + if (GET_CODE (op) != MEM) + return 0; + + if (!s390_decompose_address (XEXP (op, 0), &addr)) + return 0; + + if (addr.indx) + return 0; + + return 1; + } + + /* Return the cost of an address rtx ADDR. */ + + int + s390_address_cost (addr) + rtx addr; + { + struct s390_address ad; + if (!s390_decompose_address (addr, &ad)) + return 1000; + + return ad.indx? COSTS_N_INSNS (1) + 1 : COSTS_N_INSNS (1); + } + /* Return true if OP is a valid operand for the BRAS instruction. OP is the current operation. MODE is the current operation mode. */ *************** bras_sym_operand (op, mode) *** 838,843 **** --- 1128,1150 ---- return 0; } + /* If OP is a SYMBOL_REF of a thread-local symbol, return its TLS mode, + otherwise return 0. */ + + int + tls_symbolic_operand (op) + register rtx op; + { + const char *symbol_str; + + if (GET_CODE (op) != SYMBOL_REF) + return 0; + symbol_str = XSTR (op, 0); + + if (symbol_str[0] != '%') + return 0; + return strchr (tls_model_chars, symbol_str[1]) - tls_model_chars; + } /* Return true if OP is a load multiple operation. It is known to be a PARALLEL and the first section will be tested. *************** symbolic_reference_mentioned_p (op) *** 997,1002 **** --- 1304,1340 ---- return 0; } + /* Return true if OP contains a reference to a thread-local symbol. */ + + int + tls_symbolic_reference_mentioned_p (op) + rtx op; + { + register const char *fmt; + register int i; + + if (GET_CODE (op) == SYMBOL_REF) + return tls_symbolic_operand (op); + + fmt = GET_RTX_FORMAT (GET_CODE (op)); + for (i = GET_RTX_LENGTH (GET_CODE (op)) - 1; i >= 0; i--) + { + if (fmt[i] == 'E') + { + register int j; + + for (j = XVECLEN (op, i) - 1; j >= 0; j--) + if (tls_symbolic_reference_mentioned_p (XVECEXP (op, i, j))) + return 1; + } + + else if (fmt[i] == 'e' && tls_symbolic_reference_mentioned_p (XEXP (op, i))) + return 1; + } + + return 0; + } + /* Return true if OP is a legitimate general operand when generating PIC code. It is given that flag_pic is on *************** legitimate_pic_operand_p (op) *** 1011,1017 **** return 1; /* Reject everything else; must be handled ! via emit_pic_move. */ return 0; } --- 1349,1355 ---- return 1; /* Reject everything else; must be handled ! via emit_symbolic_move. */ return 0; } *************** legitimate_constant_p (op) *** 1026,1047 **** if (!SYMBOLIC_CONST (op)) return 1; /* In the PIC case, symbolic constants must *not* be forced into the literal pool. We accept them here, ! so that they will be handled by emit_pic_move. */ if (flag_pic) return 1; - /* Even in the non-PIC case, we can accept immediate - LARL operands here. */ - if (TARGET_64BIT) - return larl_operand (op, VOIDmode); - /* All remaining non-PIC symbolic constants are forced into the literal pool. */ return 0; } /* Returns true if the constant value OP is a legitimate general operand during and after reload. The difference to legitimate_constant_p is that this function will not accept --- 1364,1450 ---- if (!SYMBOLIC_CONST (op)) return 1; + /* Accept immediate LARL operands. */ + if (TARGET_64BIT && larl_operand (op, VOIDmode)) + return 1; + + /* Thread-local symbols are never legal constants. This is + so that emit_call knows that computing such addresses + might require a function call. */ + if (TLS_SYMBOLIC_CONST (op)) + return 0; + /* In the PIC case, symbolic constants must *not* be forced into the literal pool. We accept them here, ! so that they will be handled by emit_symbolic_move. */ if (flag_pic) return 1; /* All remaining non-PIC symbolic constants are forced into the literal pool. */ return 0; } + /* Determine if it's legal to put X into the constant pool. This + is not possible if X contains the address of a symbol that is + not constant (TLS) or not known at final link time (PIC). */ + + static bool + s390_cannot_force_const_mem (x) + rtx x; + { + switch (GET_CODE (x)) + { + case CONST_INT: + case CONST_DOUBLE: + /* Accept all non-symbolic constants. */ + return false; + + case LABEL_REF: + /* Labels are OK iff we are non-PIC. */ + return flag_pic != 0; + + case SYMBOL_REF: + /* 'Naked' TLS symbol references are never OK, + non-TLS symbols are OK iff we are non-PIC. */ + if (tls_symbolic_operand (x)) + return true; + else + return flag_pic != 0; + + case CONST: + return s390_cannot_force_const_mem (XEXP (x, 0)); + case PLUS: + case MINUS: + return s390_cannot_force_const_mem (XEXP (x, 0)) + || s390_cannot_force_const_mem (XEXP (x, 1)); + + case UNSPEC: + switch (XINT (x, 1)) + { + /* Only lt-relative or GOT-relative UNSPECs are OK. */ + case 100: + case 104: + case 112: + case 114: + case UNSPEC_TLSGD: + case UNSPEC_TLSLDM: + case UNSPEC_NTPOFF: + case UNSPEC_DTPOFF: + case UNSPEC_GOTNTPOFF: + case UNSPEC_INDNTPOFF: + return false; + + default: + return true; + } + break; + + default: + abort (); + } + } + /* Returns true if the constant value OP is a legitimate general operand during and after reload. The difference to legitimate_constant_p is that this function will not accept *************** legitimate_reload_constant_p (op) *** 1067,1081 **** && larl_operand (op, VOIDmode)) return 1; - /* If reload is completed, and we do not already have a - literal pool, and OP must be forced to the literal - pool, then something must have gone wrong earlier. - We *cannot* force the constant any more, because the - prolog generation already decided we don't need to - set up the base register. */ - if (reload_completed && !regs_ever_live[BASE_REGISTER]) - abort (); - /* Everything else cannot be handled without reload. */ return 0; } --- 1470,1475 ---- *************** s390_preferred_reload_class (op, class) *** 1097,1119 **** switch (GET_CODE (op)) { /* Constants we cannot reload must be forced into the ! literal pool. For constants we *could* handle directly, ! it might still be preferable to put them in the pool and ! use a memory-to-memory instruction. - However, try to avoid needlessly allocating a literal - pool in a routine that wouldn't otherwise need any. - Heuristically, we assume that 64-bit leaf functions - typically don't need a literal pool, all others do. */ case CONST_DOUBLE: case CONST_INT: ! if (!legitimate_reload_constant_p (op)) ! return NO_REGS; ! ! if (TARGET_64BIT && current_function_is_leaf) return class; ! ! return NO_REGS; /* If a symbolic constant or a PLUS is reloaded, it is most likely being used as an address, so --- 1491,1504 ---- switch (GET_CODE (op)) { /* Constants we cannot reload must be forced into the ! literal pool. */ case CONST_DOUBLE: case CONST_INT: ! if (legitimate_reload_constant_p (op)) return class; ! else ! return NO_REGS; /* If a symbolic constant or a PLUS is reloaded, it is most likely being used as an address, so *************** s390_plus_operand (op, mode) *** 1180,1200 **** SCRATCH may be used as scratch register. */ void ! s390_expand_plus_operand (target, src, scratch_in) register rtx target; register rtx src; ! register rtx scratch_in; { ! rtx sum1, sum2, scratch; ! ! /* ??? reload apparently does not ensure that the scratch register ! and the target do not overlap. We absolutely require this to be ! the case, however. Therefore the reload_in[sd]i patterns ask for ! a double-sized scratch register, and if one part happens to be ! equal to the target, we use the other one. */ ! scratch = gen_rtx_REG (Pmode, REGNO (scratch_in)); ! if (rtx_equal_p (scratch, target)) ! scratch = gen_rtx_REG (Pmode, REGNO (scratch_in) + 1); /* src must be a PLUS; get its two operands. */ if (GET_CODE (src) != PLUS || GET_MODE (src) != Pmode) --- 1565,1577 ---- SCRATCH may be used as scratch register. */ void ! s390_expand_plus_operand (target, src, scratch) register rtx target; register rtx src; ! register rtx scratch; { ! rtx sum1, sum2; ! struct s390_address ad; /* src must be a PLUS; get its two operands. */ if (GET_CODE (src) != PLUS || GET_MODE (src) != Pmode) *************** s390_expand_plus_operand (target, src, s *** 1205,1262 **** float registers occur in an address. */ sum1 = find_replacement (&XEXP (src, 0)); sum2 = find_replacement (&XEXP (src, 1)); ! /* If one of the two operands is equal to the target, ! make it the first one. If one is a constant, make ! it the second one. */ ! if (rtx_equal_p (target, sum2) ! || GET_CODE (sum1) == CONST_INT) { ! rtx tem = sum2; ! sum2 = sum1; ! sum1 = tem; ! } ! /* If the first operand is not an address register, ! we reload it into the target. */ ! if (true_regnum (sum1) < 1 || true_regnum (sum1) > 15) ! { ! emit_move_insn (target, sum1); ! sum1 = target; ! } ! /* Likewise for the second operand. However, take ! care not to clobber the target if we already used ! it for the first operand. Use the scratch instead. ! Also, allow an immediate offset if it is in range. */ ! if ((true_regnum (sum2) < 1 || true_regnum (sum2) > 15) ! && !(GET_CODE (sum2) == CONST_INT ! && INTVAL (sum2) >= 0 && INTVAL (sum2) < 4096)) ! { ! if (!rtx_equal_p (target, sum1)) ! { ! emit_move_insn (target, sum2); ! sum2 = target; ! } ! else ! { ! emit_move_insn (scratch, sum2); ! sum2 = scratch; ! } } /* Emit the LOAD ADDRESS pattern. Note that reload of PLUS is only ever performed on addresses, so we can mark the sum as legitimate for LA in any case. */ ! src = gen_rtx_PLUS (Pmode, sum1, sum2); ! src = legitimize_la_operand (src); ! emit_insn (gen_rtx_SET (VOIDmode, target, src)); } /* Decompose a RTL expression ADDR for a memory address into ! its components, returned in OUT. The boolean STRICT ! specifies whether strict register checking applies. Returns 0 if ADDR is not a valid memory address, nonzero otherwise. If OUT is NULL, don't return the components, but check for validity only. --- 1582,1630 ---- float registers occur in an address. */ sum1 = find_replacement (&XEXP (src, 0)); sum2 = find_replacement (&XEXP (src, 1)); + src = gen_rtx_PLUS (Pmode, sum1, sum2); ! /* If the address is already strictly valid, there's nothing to do. */ ! if (!s390_decompose_address (src, &ad) ! || (ad.base && !REG_OK_FOR_BASE_STRICT_P (ad.base)) ! || (ad.indx && !REG_OK_FOR_INDEX_STRICT_P (ad.indx))) { ! /* Otherwise, one of the operands cannot be an address register; ! we reload its value into the scratch register. */ ! if (true_regnum (sum1) < 1 || true_regnum (sum1) > 15) ! { ! emit_move_insn (scratch, sum1); ! sum1 = scratch; ! } ! if (true_regnum (sum2) < 1 || true_regnum (sum2) > 15) ! { ! emit_move_insn (scratch, sum2); ! sum2 = scratch; ! } ! /* According to the way these invalid addresses are generated ! in reload.c, it should never happen (at least on s390) that ! *neither* of the PLUS components, after find_replacements ! was applied, is an address register. */ ! if (sum1 == scratch && sum2 == scratch) ! { ! debug_rtx (src); ! abort (); ! } ! src = gen_rtx_PLUS (Pmode, sum1, sum2); } /* Emit the LOAD ADDRESS pattern. Note that reload of PLUS is only ever performed on addresses, so we can mark the sum as legitimate for LA in any case. */ ! s390_load_address (target, src); } /* Decompose a RTL expression ADDR for a memory address into ! its components, returned in OUT. ! Returns 0 if ADDR is not a valid memory address, nonzero otherwise. If OUT is NULL, don't return the components, but check for validity only. *************** s390_expand_plus_operand (target, src, s *** 1266,1275 **** canonical form so that they will be recognized. */ static int ! s390_decompose_address (addr, out, strict) register rtx addr; struct s390_address *out; - int strict; { rtx base = NULL_RTX; rtx indx = NULL_RTX; --- 1634,1642 ---- canonical form so that they will be recognized. */ static int ! s390_decompose_address (addr, out) register rtx addr; struct s390_address *out; { rtx base = NULL_RTX; rtx indx = NULL_RTX; *************** s390_decompose_address (addr, out, stric *** 1320,1325 **** --- 1687,1708 ---- disp = addr; /* displacement */ + /* Prefer to use pointer as base, not index. */ + if (base && indx) + { + int base_ptr = GET_CODE (base) == UNSPEC + || (REG_P (base) && REG_POINTER (base)); + int indx_ptr = GET_CODE (indx) == UNSPEC + || (REG_P (indx) && REG_POINTER (indx)); + + if (!base_ptr && indx_ptr) + { + rtx tmp = base; + base = indx; + indx = tmp; + } + } + /* Validate base register. */ if (base) { *************** s390_decompose_address (addr, out, stric *** 1334,1349 **** if (GET_CODE (base) != REG || GET_MODE (base) != Pmode) return FALSE; - if ((strict && ! REG_OK_FOR_BASE_STRICT_P (base)) - || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (base))) - return FALSE; - if (REGNO (base) == BASE_REGISTER || REGNO (base) == STACK_POINTER_REGNUM || REGNO (base) == FRAME_POINTER_REGNUM || ((reload_completed || reload_in_progress) && frame_pointer_needed && REGNO (base) == HARD_FRAME_POINTER_REGNUM) || (flag_pic && REGNO (base) == PIC_OFFSET_TABLE_REGNUM)) pointer = TRUE; --- 1717,1731 ---- if (GET_CODE (base) != REG || GET_MODE (base) != Pmode) return FALSE; if (REGNO (base) == BASE_REGISTER || REGNO (base) == STACK_POINTER_REGNUM || REGNO (base) == FRAME_POINTER_REGNUM || ((reload_completed || reload_in_progress) && frame_pointer_needed && REGNO (base) == HARD_FRAME_POINTER_REGNUM) + || REGNO (base) == ARG_POINTER_REGNUM + || (REGNO (base) >= FIRST_VIRTUAL_REGISTER + && REGNO (base) <= LAST_VIRTUAL_REGISTER) || (flag_pic && REGNO (base) == PIC_OFFSET_TABLE_REGNUM)) pointer = TRUE; *************** s390_decompose_address (addr, out, stric *** 1363,1378 **** if (GET_CODE (indx) != REG || GET_MODE (indx) != Pmode) return FALSE; - if ((strict && ! REG_OK_FOR_BASE_STRICT_P (indx)) - || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (indx))) - return FALSE; - if (REGNO (indx) == BASE_REGISTER || REGNO (indx) == STACK_POINTER_REGNUM || REGNO (indx) == FRAME_POINTER_REGNUM || ((reload_completed || reload_in_progress) && frame_pointer_needed && REGNO (indx) == HARD_FRAME_POINTER_REGNUM) || (flag_pic && REGNO (indx) == PIC_OFFSET_TABLE_REGNUM)) pointer = TRUE; --- 1745,1759 ---- if (GET_CODE (indx) != REG || GET_MODE (indx) != Pmode) return FALSE; if (REGNO (indx) == BASE_REGISTER || REGNO (indx) == STACK_POINTER_REGNUM || REGNO (indx) == FRAME_POINTER_REGNUM || ((reload_completed || reload_in_progress) && frame_pointer_needed && REGNO (indx) == HARD_FRAME_POINTER_REGNUM) + || REGNO (indx) == ARG_POINTER_REGNUM + || (REGNO (indx) >= FIRST_VIRTUAL_REGISTER + && REGNO (indx) <= LAST_VIRTUAL_REGISTER) || (flag_pic && REGNO (indx) == PIC_OFFSET_TABLE_REGNUM)) pointer = TRUE; *************** s390_decompose_address (addr, out, stric *** 1384,1398 **** /* Allow integer constant in range. */ if (GET_CODE (disp) == CONST_INT) { ! if (INTVAL (disp) < 0 || INTVAL (disp) >= 4096) ! return FALSE; } /* In the small-PIC case, the linker converts @GOT12 ! offsets to possible displacements. */ else if (GET_CODE (disp) == CONST && GET_CODE (XEXP (disp, 0)) == UNSPEC ! && XINT (XEXP (disp, 0), 1) == 110) { if (flag_pic != 1) return FALSE; --- 1765,1791 ---- /* Allow integer constant in range. */ if (GET_CODE (disp) == CONST_INT) { ! /* If the argument pointer is involved, the displacement will change ! later anyway as the argument pointer gets eliminated. This could ! make a valid displacement invalid, but it is more likely to make ! an invalid displacement valid, because we sometimes access the ! register save area via negative offsets to the arg pointer. ! Thus we don't check the displacement for validity here. If after ! elimination the displacement turns out to be invalid after all, ! this is fixed up by reload in any case. */ ! if (base != arg_pointer_rtx && indx != arg_pointer_rtx) ! { ! if (INTVAL (disp) < 0 || INTVAL (disp) >= 4096) ! return FALSE; ! } } /* In the small-PIC case, the linker converts @GOT12 ! and @GOTNTPOFF offsets to possible displacements. */ else if (GET_CODE (disp) == CONST && GET_CODE (XEXP (disp, 0)) == UNSPEC ! && (XINT (XEXP (disp, 0), 1) == 110 ! || XINT (XEXP (disp, 0), 1) == UNSPEC_GOTNTPOFF)) { if (flag_pic != 1) return FALSE; *************** s390_decompose_address (addr, out, stric *** 1442,1453 **** || !CONSTANT_POOL_ADDRESS_P (disp)) return FALSE; - /* In 64-bit PIC mode we cannot accept symbolic - constants in the constant pool. */ - if (TARGET_64BIT && flag_pic - && SYMBOLIC_CONST (get_pool_constant (disp))) - return FALSE; - /* If we have an offset, make sure it does not exceed the size of the constant pool entry. */ if (offset && offset >= GET_MODE_SIZE (get_pool_mode (disp))) --- 1835,1840 ---- *************** legitimate_address_p (mode, addr, strict *** 1497,1503 **** register rtx addr; int strict; { ! return s390_decompose_address (addr, NULL, strict); } /* Return 1 if OP is a valid operand for the LA instruction. --- 1884,1909 ---- register rtx addr; int strict; { ! struct s390_address ad; ! if (!s390_decompose_address (addr, &ad)) ! return FALSE; ! ! if (strict) ! { ! if (ad.base && !REG_OK_FOR_BASE_STRICT_P (ad.base)) ! return FALSE; ! if (ad.indx && !REG_OK_FOR_INDEX_STRICT_P (ad.indx)) ! return FALSE; ! } ! else ! { ! if (ad.base && !REG_OK_FOR_BASE_NONSTRICT_P (ad.base)) ! return FALSE; ! if (ad.indx && !REG_OK_FOR_INDEX_NONSTRICT_P (ad.indx)) ! return FALSE; ! } ! ! return TRUE; } /* Return 1 if OP is a valid operand for the LA instruction. *************** legitimate_la_operand_p (op) *** 1509,1515 **** register rtx op; { struct s390_address addr; ! if (!s390_decompose_address (op, &addr, FALSE)) return FALSE; if (TARGET_64BIT || addr.pointer) --- 1915,1921 ---- register rtx op; { struct s390_address addr; ! if (!s390_decompose_address (op, &addr)) return FALSE; if (TARGET_64BIT || addr.pointer) *************** legitimate_la_operand_p (op) *** 1518,1547 **** return FALSE; } ! /* Return a modified variant of OP that is guaranteed to ! be accepted by legitimate_la_operand_p. */ ! ! rtx ! legitimize_la_operand (op) register rtx op; { struct s390_address addr; ! if (!s390_decompose_address (op, &addr, FALSE)) ! abort (); ! if (TARGET_64BIT || addr.pointer) ! return op; ! if (!addr.base) ! abort (); ! op = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr.base), 101); ! if (addr.indx) ! op = gen_rtx_PLUS (Pmode, op, addr.indx); ! if (addr.disp) ! op = gen_rtx_PLUS (Pmode, op, addr.disp); ! return op; } /* Return a legitimate reference for ORIG (an address) using the --- 1924,1966 ---- return FALSE; } ! /* Return 1 if OP is a valid operand for the LA instruction, ! and we prefer to use LA over addition to compute it. */ ! ! int ! preferred_la_operand_p (op) register rtx op; { struct s390_address addr; ! if (!s390_decompose_address (op, &addr)) ! return FALSE; ! if (!TARGET_64BIT && !addr.pointer) ! return FALSE; ! if (addr.pointer) ! return TRUE; ! if ((addr.base && REG_P (addr.base) && REG_POINTER (addr.base)) ! || (addr.indx && REG_P (addr.indx) && REG_POINTER (addr.indx))) ! return TRUE; ! return FALSE; ! } ! ! /* Emit a forced load-address operation to load SRC into DST. ! This will use the LOAD ADDRESS instruction even in situations ! where legitimate_la_operand_p (SRC) returns false. */ ! ! void ! s390_load_address (dst, src) ! rtx dst; ! rtx src; ! { ! if (TARGET_64BIT) ! emit_move_insn (dst, src); ! else ! emit_insn (gen_force_la_31 (dst, src)); } /* Return a legitimate reference for ORIG (an address) using the *************** legitimize_pic_address (orig, reg) *** 1577,1583 **** || CONSTANT_POOL_ADDRESS_P (addr)))) { /* This is a local symbol. */ ! if (TARGET_64BIT) { /* Access local symbols PC-relative via LARL. This is the same as in the non-PIC case, so it is --- 1996,2002 ---- || CONSTANT_POOL_ADDRESS_P (addr)))) { /* This is a local symbol. */ ! if (TARGET_64BIT && larl_operand (addr, VOIDmode)) { /* Access local symbols PC-relative via LARL. This is the same as in the non-PIC case, so it is *************** legitimize_pic_address (orig, reg) *** 1589,1597 **** rtx temp = reg? reg : gen_reg_rtx (Pmode); ! addr = gen_rtx_UNSPEC (SImode, gen_rtvec (1, addr), 100); ! addr = gen_rtx_CONST (SImode, addr); ! addr = force_const_mem (SImode, addr); emit_move_insn (temp, addr); base = gen_rtx_REG (Pmode, BASE_REGISTER); --- 2008,2016 ---- rtx temp = reg? reg : gen_reg_rtx (Pmode); ! addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 100); ! addr = gen_rtx_CONST (Pmode, addr); ! addr = force_const_mem (Pmode, addr); emit_move_insn (temp, addr); base = gen_rtx_REG (Pmode, BASE_REGISTER); *************** legitimize_pic_address (orig, reg) *** 1615,1621 **** /* Assume GOT offset < 4k. This is handled the same way in both 31- and 64-bit code (@GOT12). */ ! current_function_uses_pic_offset_table = 1; new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 110); new = gen_rtx_CONST (Pmode, new); --- 2034,2041 ---- /* Assume GOT offset < 4k. This is handled the same way in both 31- and 64-bit code (@GOT12). */ ! if (reload_in_progress || reload_completed) ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 110); new = gen_rtx_CONST (Pmode, new); *************** legitimize_pic_address (orig, reg) *** 1648,1658 **** rtx temp = gen_reg_rtx (Pmode); ! current_function_uses_pic_offset_table = 1; ! addr = gen_rtx_UNSPEC (SImode, gen_rtvec (1, addr), 112); ! addr = gen_rtx_CONST (SImode, addr); ! addr = force_const_mem (SImode, addr); emit_move_insn (temp, addr); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp); --- 2068,2079 ---- rtx temp = gen_reg_rtx (Pmode); ! if (reload_in_progress || reload_completed) ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; ! addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 112); ! addr = gen_rtx_CONST (Pmode, addr); ! addr = force_const_mem (Pmode, addr); emit_move_insn (temp, addr); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp); *************** legitimize_pic_address (orig, reg) *** 1678,1684 **** case 100: case 112: case 114: ! new = force_const_mem (SImode, orig); break; /* @GOTENT is OK as is. */ --- 2099,2105 ---- case 100: case 112: case 114: ! new = force_const_mem (Pmode, orig); break; /* @GOTENT is OK as is. */ *************** legitimize_pic_address (orig, reg) *** 1693,1701 **** rtx temp = reg? reg : gen_reg_rtx (Pmode); addr = XVECEXP (addr, 0, 0); ! addr = gen_rtx_UNSPEC (SImode, gen_rtvec (1, addr), 114); ! addr = gen_rtx_CONST (SImode, addr); ! addr = force_const_mem (SImode, addr); emit_move_insn (temp, addr); base = gen_rtx_REG (Pmode, BASE_REGISTER); --- 2114,2122 ---- rtx temp = reg? reg : gen_reg_rtx (Pmode); addr = XVECEXP (addr, 0, 0); ! addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 114); ! addr = gen_rtx_CONST (Pmode, addr); ! addr = force_const_mem (Pmode, addr); emit_move_insn (temp, addr); base = gen_rtx_REG (Pmode, BASE_REGISTER); *************** legitimize_pic_address (orig, reg) *** 1729,1735 **** || CONSTANT_POOL_ADDRESS_P (op0)))) && GET_CODE (op1) == CONST_INT) { ! if (TARGET_64BIT) { if (INTVAL (op1) & 1) { --- 2150,2156 ---- || CONSTANT_POOL_ADDRESS_P (op0)))) && GET_CODE (op1) == CONST_INT) { ! if (TARGET_64BIT && larl_operand (op0, VOIDmode)) { if (INTVAL (op1) & 1) { *************** legitimize_pic_address (orig, reg) *** 1766,1775 **** rtx temp = reg? reg : gen_reg_rtx (Pmode); ! addr = gen_rtx_UNSPEC (SImode, gen_rtvec (1, op0), 100); ! addr = gen_rtx_PLUS (SImode, addr, op1); ! addr = gen_rtx_CONST (SImode, addr); ! addr = force_const_mem (SImode, addr); emit_move_insn (temp, addr); base = gen_rtx_REG (Pmode, BASE_REGISTER); --- 2187,2196 ---- rtx temp = reg? reg : gen_reg_rtx (Pmode); ! addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0), 100); ! addr = gen_rtx_PLUS (Pmode, addr, op1); ! addr = gen_rtx_CONST (Pmode, addr); ! addr = force_const_mem (Pmode, addr); emit_move_insn (temp, addr); base = gen_rtx_REG (Pmode, BASE_REGISTER); *************** legitimize_pic_address (orig, reg) *** 1795,1801 **** if (XINT (op0, 1) != 100) abort (); ! new = force_const_mem (SImode, orig); } /* Otherwise, compute the sum. */ --- 2216,2222 ---- if (XINT (op0, 1) != 100) abort (); ! new = force_const_mem (Pmode, orig); } /* Otherwise, compute the sum. */ *************** legitimize_pic_address (orig, reg) *** 1825,1842 **** return new; } /* Emit insns to move operands[1] into operands[0]. */ void ! emit_pic_move (operands, mode) rtx *operands; - enum machine_mode mode ATTRIBUTE_UNUSED; { rtx temp = no_new_pseudos ? operands[0] : gen_reg_rtx (Pmode); ! if (GET_CODE (operands[0]) == MEM && SYMBOLIC_CONST (operands[1])) operands[1] = force_reg (Pmode, operands[1]); ! else operands[1] = legitimize_pic_address (operands[1], temp); } --- 2246,2482 ---- return new; } + /* Load the thread pointer into a register. */ + + static rtx + get_thread_pointer () + { + rtx tp; + + tp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), UNSPEC_TP); + tp = force_reg (Pmode, tp); + mark_reg_pointer (tp, BITS_PER_WORD); + + return tp; + } + + /* Construct the SYMBOL_REF for the tls_get_offset function. */ + + static GTY(()) rtx s390_tls_symbol; + rtx + s390_tls_get_offset () + { + if (!s390_tls_symbol) + s390_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, "__tls_get_offset"); + + return s390_tls_symbol; + } + + /* ADDR contains a thread-local SYMBOL_REF. Generate code to compute + this (thread-local) address. REG may be used as temporary. */ + + static rtx + legitimize_tls_address (addr, reg) + rtx addr; + rtx reg; + { + rtx new, tls_call, temp, base, r2, insn; + + if (GET_CODE (addr) == SYMBOL_REF) + switch (tls_symbolic_operand (addr)) + { + case TLS_MODEL_GLOBAL_DYNAMIC: + start_sequence (); + r2 = gen_rtx_REG (Pmode, 2); + tls_call = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_TLSGD); + new = gen_rtx_CONST (Pmode, tls_call); + new = force_const_mem (Pmode, new); + emit_move_insn (r2, new); + emit_call_insn (gen_call_value_tls (r2, tls_call)); + insn = get_insns (); + end_sequence (); + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_NTPOFF); + temp = gen_reg_rtx (Pmode); + emit_libcall_block (insn, temp, r2, new); + + new = gen_rtx_PLUS (Pmode, get_thread_pointer (), temp); + if (reg != 0) + { + s390_load_address (reg, new); + new = reg; + } + break; + + case TLS_MODEL_LOCAL_DYNAMIC: + start_sequence (); + r2 = gen_rtx_REG (Pmode, 2); + tls_call = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), UNSPEC_TLSLDM); + new = gen_rtx_CONST (Pmode, tls_call); + new = force_const_mem (Pmode, new); + emit_move_insn (r2, new); + emit_call_insn (gen_call_value_tls (r2, tls_call)); + insn = get_insns (); + end_sequence (); + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), UNSPEC_TLSLDM_NTPOFF); + temp = gen_reg_rtx (Pmode); + emit_libcall_block (insn, temp, r2, new); + + new = gen_rtx_PLUS (Pmode, get_thread_pointer (), temp); + base = gen_reg_rtx (Pmode); + s390_load_address (base, new); + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_DTPOFF); + new = gen_rtx_CONST (Pmode, new); + new = force_const_mem (Pmode, new); + temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, new); + + new = gen_rtx_PLUS (Pmode, base, temp); + if (reg != 0) + { + s390_load_address (reg, new); + new = reg; + } + break; + + case TLS_MODEL_INITIAL_EXEC: + if (flag_pic == 1) + { + /* Assume GOT offset < 4k. This is handled the same way + in both 31- and 64-bit code. */ + + if (reload_in_progress || reload_completed) + regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTNTPOFF); + new = gen_rtx_CONST (Pmode, new); + new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new); + new = gen_rtx_MEM (Pmode, new); + RTX_UNCHANGING_P (new) = 1; + temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, new); + } + else if (TARGET_64BIT) + { + /* If the GOT offset might be >= 4k, we determine the position + of the GOT entry via a PC-relative LARL. */ + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_INDNTPOFF); + new = gen_rtx_CONST (Pmode, new); + temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, new); + + new = gen_rtx_MEM (Pmode, temp); + RTX_UNCHANGING_P (new) = 1; + temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, new); + } + else if (flag_pic) + { + /* If the GOT offset might be >= 4k, we have to load it + from the literal pool. */ + + if (reload_in_progress || reload_completed) + regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTNTPOFF); + new = gen_rtx_CONST (Pmode, new); + new = force_const_mem (Pmode, new); + temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, new); + + new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp); + new = gen_rtx_MEM (Pmode, new); + RTX_UNCHANGING_P (new) = 1; + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, new, addr), UNSPEC_TLS_LOAD); + temp = gen_reg_rtx (Pmode); + emit_insn (gen_rtx_SET (Pmode, temp, new)); + } + else + { + /* In position-dependent code, load the absolute address of + the GOT entry from the literal pool. */ + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_INDNTPOFF); + new = gen_rtx_CONST (Pmode, new); + new = force_const_mem (Pmode, new); + temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, new); + + new = temp; + new = gen_rtx_MEM (Pmode, new); + RTX_UNCHANGING_P (new) = 1; + + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, new, addr), UNSPEC_TLS_LOAD); + temp = gen_reg_rtx (Pmode); + emit_insn (gen_rtx_SET (Pmode, temp, new)); + } + + new = gen_rtx_PLUS (Pmode, get_thread_pointer (), temp); + if (reg != 0) + { + s390_load_address (reg, new); + new = reg; + } + break; + + case TLS_MODEL_LOCAL_EXEC: + new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_NTPOFF); + new = gen_rtx_CONST (Pmode, new); + new = force_const_mem (Pmode, new); + temp = gen_reg_rtx (Pmode); + emit_move_insn (temp, new); + + new = gen_rtx_PLUS (Pmode, get_thread_pointer (), temp); + if (reg != 0) + { + s390_load_address (reg, new); + new = reg; + } + break; + + default: + abort (); + } + + else if (GET_CODE (addr) == CONST && GET_CODE (XEXP (addr, 0)) == UNSPEC) + { + switch (XINT (XEXP (addr, 0), 1)) + { + case UNSPEC_INDNTPOFF: + if (TARGET_64BIT) + new = addr; + else + abort (); + break; + + default: + abort (); + } + } + + else + abort (); /* for now ... */ + + return new; + } + /* Emit insns to move operands[1] into operands[0]. */ void ! emit_symbolic_move (operands) rtx *operands; { rtx temp = no_new_pseudos ? operands[0] : gen_reg_rtx (Pmode); ! if (GET_CODE (operands[0]) == MEM) operands[1] = force_reg (Pmode, operands[1]); ! else if (TLS_SYMBOLIC_CONST (operands[1])) ! operands[1] = legitimize_tls_address (operands[1], temp); ! else if (flag_pic) operands[1] = legitimize_pic_address (operands[1], temp); } *************** legitimize_address (x, oldx, mode) *** 1859,1865 **** { rtx constant_term = const0_rtx; ! if (flag_pic) { if (SYMBOLIC_CONST (x) || (GET_CODE (x) == PLUS --- 2499,2512 ---- { rtx constant_term = const0_rtx; ! if (TLS_SYMBOLIC_CONST (x)) ! { ! x = legitimize_tls_address (x, 0); ! ! if (legitimate_address_p (mode, x, FALSE)) ! return x; ! } ! else if (flag_pic) { if (SYMBOLIC_CONST (x) || (GET_CODE (x) == PLUS *************** legitimize_address (x, oldx, mode) *** 1873,1878 **** --- 2520,2550 ---- x = eliminate_constant_term (x, &constant_term); + /* Optimize loading of large displacements by splitting them + into the multiple of 4K and the rest; this allows the + former to be CSE'd if possible. + + Don't do this if the displacement is added to a register + pointing into the stack frame, as the offsets will + change later anyway. */ + + if (GET_CODE (constant_term) == CONST_INT + && (INTVAL (constant_term) < 0 + || INTVAL (constant_term) >= 4096) + && !(REG_P (x) && REGNO_PTR_FRAME_P (REGNO (x)))) + { + HOST_WIDE_INT lower = INTVAL (constant_term) & 0xfff; + HOST_WIDE_INT upper = INTVAL (constant_term) ^ lower; + + rtx temp = gen_reg_rtx (Pmode); + rtx val = force_operand (GEN_INT (upper), temp); + if (val != temp) + emit_move_insn (temp, val); + + x = gen_rtx_PLUS (Pmode, x, temp); + constant_term = GEN_INT (lower); + } + if (GET_CODE (x) == PLUS) { if (GET_CODE (XEXP (x, 0)) == REG) *************** legitimize_address (x, oldx, mode) *** 1902,1907 **** --- 2574,2889 ---- return x; } + /* Emit code to move LEN bytes from DST to SRC. */ + + void + s390_expand_movstr (dst, src, len) + rtx dst; + rtx src; + rtx len; + { + rtx (*gen_short) PARAMS ((rtx, rtx, rtx)) = + TARGET_64BIT ? gen_movstr_short_64 : gen_movstr_short_31; + rtx (*gen_long) PARAMS ((rtx, rtx, rtx, rtx)) = + TARGET_64BIT ? gen_movstr_long_64 : gen_movstr_long_31; + + + if (GET_CODE (len) == CONST_INT && INTVAL (len) >= 0 && INTVAL (len) <= 256) + { + if (INTVAL (len) > 0) + emit_insn ((*gen_short) (dst, src, GEN_INT (INTVAL (len) - 1))); + } + + else if (TARGET_MVCLE) + { + enum machine_mode double_mode = TARGET_64BIT ? TImode : DImode; + enum machine_mode single_mode = TARGET_64BIT ? DImode : SImode; + rtx reg0 = gen_reg_rtx (double_mode); + rtx reg1 = gen_reg_rtx (double_mode); + + emit_move_insn (gen_highpart (single_mode, reg0), + force_operand (XEXP (dst, 0), NULL_RTX)); + emit_move_insn (gen_highpart (single_mode, reg1), + force_operand (XEXP (src, 0), NULL_RTX)); + + convert_move (gen_lowpart (single_mode, reg0), len, 1); + convert_move (gen_lowpart (single_mode, reg1), len, 1); + + emit_insn ((*gen_long) (reg0, reg1, reg0, reg1)); + } + + else + { + rtx dst_addr, src_addr, count, blocks, temp; + rtx end_label = gen_label_rtx (); + enum machine_mode mode; + tree type; + + mode = GET_MODE (len); + if (mode == VOIDmode) + mode = word_mode; + + type = (*lang_hooks.types.type_for_mode) (mode, 1); + if (!type) + abort (); + + dst_addr = gen_reg_rtx (Pmode); + src_addr = gen_reg_rtx (Pmode); + count = gen_reg_rtx (mode); + blocks = gen_reg_rtx (mode); + + convert_move (count, len, 1); + emit_cmp_and_jump_insns (count, const0_rtx, + EQ, NULL_RTX, mode, 1, end_label); + + emit_move_insn (dst_addr, force_operand (XEXP (dst, 0), NULL_RTX)); + emit_move_insn (src_addr, force_operand (XEXP (src, 0), NULL_RTX)); + dst = change_address (dst, VOIDmode, dst_addr); + src = change_address (src, VOIDmode, src_addr); + + temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1, 0); + if (temp != count) + emit_move_insn (count, temp); + + temp = expand_binop (mode, ashr_optab, count, GEN_INT (8), blocks, 1, 0); + if (temp != blocks) + emit_move_insn (blocks, temp); + + expand_start_loop (1); + expand_exit_loop_top_cond (0, build (NE_EXPR, type, + make_tree (type, blocks), + make_tree (type, const0_rtx))); + + emit_insn ((*gen_short) (dst, src, GEN_INT (255))); + s390_load_address (dst_addr, + gen_rtx_PLUS (Pmode, dst_addr, GEN_INT (256))); + s390_load_address (src_addr, + gen_rtx_PLUS (Pmode, src_addr, GEN_INT (256))); + + temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1, 0); + if (temp != blocks) + emit_move_insn (blocks, temp); + + expand_end_loop (); + + emit_insn ((*gen_short) (dst, src, convert_to_mode (word_mode, count, 1))); + emit_label (end_label); + } + } + + /* Emit code to clear LEN bytes at DST. */ + + void + s390_expand_clrstr (dst, len) + rtx dst; + rtx len; + { + rtx (*gen_short) PARAMS ((rtx, rtx)) = + TARGET_64BIT ? gen_clrstr_short_64 : gen_clrstr_short_31; + rtx (*gen_long) PARAMS ((rtx, rtx, rtx)) = + TARGET_64BIT ? gen_clrstr_long_64 : gen_clrstr_long_31; + + + if (GET_CODE (len) == CONST_INT && INTVAL (len) >= 0 && INTVAL (len) <= 256) + { + if (INTVAL (len) > 0) + emit_insn ((*gen_short) (dst, GEN_INT (INTVAL (len) - 1))); + } + + else if (TARGET_MVCLE) + { + enum machine_mode double_mode = TARGET_64BIT ? TImode : DImode; + enum machine_mode single_mode = TARGET_64BIT ? DImode : SImode; + rtx reg0 = gen_reg_rtx (double_mode); + rtx reg1 = gen_reg_rtx (double_mode); + + emit_move_insn (gen_highpart (single_mode, reg0), + force_operand (XEXP (dst, 0), NULL_RTX)); + convert_move (gen_lowpart (single_mode, reg0), len, 1); + + emit_move_insn (gen_highpart (single_mode, reg1), const0_rtx); + emit_move_insn (gen_lowpart (single_mode, reg1), const0_rtx); + + emit_insn ((*gen_long) (reg0, reg1, reg0)); + } + + else + { + rtx dst_addr, src_addr, count, blocks, temp; + rtx end_label = gen_label_rtx (); + enum machine_mode mode; + tree type; + + mode = GET_MODE (len); + if (mode == VOIDmode) + mode = word_mode; + + type = (*lang_hooks.types.type_for_mode) (mode, 1); + if (!type) + abort (); + + dst_addr = gen_reg_rtx (Pmode); + src_addr = gen_reg_rtx (Pmode); + count = gen_reg_rtx (mode); + blocks = gen_reg_rtx (mode); + + convert_move (count, len, 1); + emit_cmp_and_jump_insns (count, const0_rtx, + EQ, NULL_RTX, mode, 1, end_label); + + emit_move_insn (dst_addr, force_operand (XEXP (dst, 0), NULL_RTX)); + dst = change_address (dst, VOIDmode, dst_addr); + + temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1, 0); + if (temp != count) + emit_move_insn (count, temp); + + temp = expand_binop (mode, ashr_optab, count, GEN_INT (8), blocks, 1, 0); + if (temp != blocks) + emit_move_insn (blocks, temp); + + expand_start_loop (1); + expand_exit_loop_top_cond (0, build (NE_EXPR, type, + make_tree (type, blocks), + make_tree (type, const0_rtx))); + + emit_insn ((*gen_short) (dst, GEN_INT (255))); + s390_load_address (dst_addr, + gen_rtx_PLUS (Pmode, dst_addr, GEN_INT (256))); + + temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1, 0); + if (temp != blocks) + emit_move_insn (blocks, temp); + + expand_end_loop (); + + emit_insn ((*gen_short) (dst, convert_to_mode (word_mode, count, 1))); + emit_label (end_label); + } + } + + /* Emit code to compare LEN bytes at OP0 with those at OP1, + and return the result in TARGET. */ + + void + s390_expand_cmpstr (target, op0, op1, len) + rtx target; + rtx op0; + rtx op1; + rtx len; + { + rtx (*gen_short) PARAMS ((rtx, rtx, rtx)) = + TARGET_64BIT ? gen_cmpstr_short_64 : gen_cmpstr_short_31; + rtx (*gen_long) PARAMS ((rtx, rtx, rtx, rtx)) = + TARGET_64BIT ? gen_cmpstr_long_64 : gen_cmpstr_long_31; + rtx (*gen_result) PARAMS ((rtx)) = + GET_MODE (target) == DImode ? gen_cmpint_di : gen_cmpint_si; + + op0 = protect_from_queue (op0, 0); + op1 = protect_from_queue (op1, 0); + len = protect_from_queue (len, 0); + + if (GET_CODE (len) == CONST_INT && INTVAL (len) >= 0 && INTVAL (len) <= 256) + { + if (INTVAL (len) > 0) + { + emit_insn ((*gen_short) (op0, op1, GEN_INT (INTVAL (len) - 1))); + emit_insn ((*gen_result) (target)); + } + else + emit_move_insn (target, const0_rtx); + } + + else /* if (TARGET_MVCLE) */ + { + enum machine_mode double_mode = TARGET_64BIT ? TImode : DImode; + enum machine_mode single_mode = TARGET_64BIT ? DImode : SImode; + rtx reg0 = gen_reg_rtx (double_mode); + rtx reg1 = gen_reg_rtx (double_mode); + + emit_move_insn (gen_highpart (single_mode, reg0), + force_operand (XEXP (op0, 0), NULL_RTX)); + emit_move_insn (gen_highpart (single_mode, reg1), + force_operand (XEXP (op1, 0), NULL_RTX)); + + convert_move (gen_lowpart (single_mode, reg0), len, 1); + convert_move (gen_lowpart (single_mode, reg1), len, 1); + + emit_insn ((*gen_long) (reg0, reg1, reg0, reg1)); + emit_insn ((*gen_result) (target)); + } + + #if 0 + /* Deactivate for now as profile code cannot cope with + CC being live across basic block boundaries. */ + else + { + rtx addr0, addr1, count, blocks, temp; + rtx end_label = gen_label_rtx (); + enum machine_mode mode; + tree type; + + mode = GET_MODE (len); + if (mode == VOIDmode) + mode = word_mode; + + type = (*lang_hooks.types.type_for_mode) (mode, 1); + if (!type) + abort (); + + addr0 = gen_reg_rtx (Pmode); + addr1 = gen_reg_rtx (Pmode); + count = gen_reg_rtx (mode); + blocks = gen_reg_rtx (mode); + + convert_move (count, len, 1); + emit_cmp_and_jump_insns (count, const0_rtx, + EQ, NULL_RTX, mode, 1, end_label); + + emit_move_insn (addr0, force_operand (XEXP (op0, 0), NULL_RTX)); + emit_move_insn (addr1, force_operand (XEXP (op1, 0), NULL_RTX)); + op0 = change_address (op0, VOIDmode, addr0); + op1 = change_address (op1, VOIDmode, addr1); + + temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1, 0); + if (temp != count) + emit_move_insn (count, temp); + + temp = expand_binop (mode, ashr_optab, count, GEN_INT (8), blocks, 1, 0); + if (temp != blocks) + emit_move_insn (blocks, temp); + + expand_start_loop (1); + expand_exit_loop_top_cond (0, build (NE_EXPR, type, + make_tree (type, blocks), + make_tree (type, const0_rtx))); + + emit_insn ((*gen_short) (op0, op1, GEN_INT (255))); + temp = gen_rtx_NE (VOIDmode, gen_rtx_REG (CCSmode, 33), const0_rtx); + temp = gen_rtx_IF_THEN_ELSE (VOIDmode, temp, + gen_rtx_LABEL_REF (VOIDmode, end_label), pc_rtx); + temp = gen_rtx_SET (VOIDmode, pc_rtx, temp); + emit_jump_insn (temp); + + s390_load_address (addr0, + gen_rtx_PLUS (Pmode, addr0, GEN_INT (256))); + s390_load_address (addr1, + gen_rtx_PLUS (Pmode, addr1, GEN_INT (256))); + + temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1, 0); + if (temp != blocks) + emit_move_insn (blocks, temp); + + expand_end_loop (); + + emit_insn ((*gen_short) (op0, op1, convert_to_mode (word_mode, count, 1))); + emit_label (end_label); + + emit_insn ((*gen_result) (target)); + } + #endif + } + /* In the name of slightly smaller debug output, and to cater to general assembler losage, recognize various UNSPEC sequences and turn them back into a direct symbol reference. */ *************** s390_simplify_dwarf_addr (orig_x) *** 1940,1945 **** --- 2922,2969 ---- return orig_x; } + /* Locate some local-dynamic symbol still in use by this function + so that we can print its name in local-dynamic base patterns. */ + + static const char * + get_some_local_dynamic_name () + { + rtx insn; + + if (cfun->machine->some_ld_name) + return cfun->machine->some_ld_name; + + for (insn = get_insns (); insn ; insn = NEXT_INSN (insn)) + if (INSN_P (insn) + && for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0)) + return cfun->machine->some_ld_name; + + abort (); + } + + static int + get_some_local_dynamic_name_1 (px, data) + rtx *px; + void *data ATTRIBUTE_UNUSED; + { + rtx x = *px; + + if (GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x)) + { + x = get_pool_constant (x); + return for_each_rtx (&x, get_some_local_dynamic_name_1, 0); + } + + if (GET_CODE (x) == SYMBOL_REF + && tls_symbolic_operand (x) == TLS_MODEL_LOCAL_DYNAMIC) + { + cfun->machine->some_ld_name = XSTR (x, 0); + return 1; + } + + return 0; + } + /* Output symbolic constant X in assembler syntax to stdio stream FILE. */ *************** s390_output_symbolic_const (file, x) *** 1981,1988 **** switch (XINT (x, 1)) { case 100: s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); - fprintf (file, "-.LT%X", s390_function_count); break; case 110: s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); --- 3005,3019 ---- switch (XINT (x, 1)) { case 100: + case 104: + s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); + fprintf (file, "-"); + s390_output_symbolic_const (file, cfun->machine->literal_pool_label); + break; + case 105: + s390_output_symbolic_const (file, cfun->machine->literal_pool_label); + fprintf (file, "-"); s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); break; case 110: s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); *************** s390_output_symbolic_const (file, x) *** 2002,2008 **** break; case 114: s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); ! fprintf (file, "@PLT-.LT%X", s390_function_count); break; default: output_operand_lossage ("invalid UNSPEC as operand (2)"); --- 3033,3064 ---- break; case 114: s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); ! fprintf (file, "@PLT-"); ! s390_output_symbolic_const (file, cfun->machine->literal_pool_label); ! break; ! case UNSPEC_TLSGD: ! s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); ! fprintf (file, "@TLSGD"); ! break; ! case UNSPEC_TLSLDM: ! assemble_name (file, get_some_local_dynamic_name ()); ! fprintf (file, "@TLSLDM"); ! break; ! case UNSPEC_DTPOFF: ! s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); ! fprintf (file, "@DTPOFF"); ! break; ! case UNSPEC_NTPOFF: ! s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); ! fprintf (file, "@NTPOFF"); ! break; ! case UNSPEC_GOTNTPOFF: ! s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); ! fprintf (file, "@GOTNTPOFF"); ! break; ! case UNSPEC_INDNTPOFF: ! s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); ! fprintf (file, "@INDNTPOFF"); break; default: output_operand_lossage ("invalid UNSPEC as operand (2)"); *************** print_operand_address (file, addr) *** 2026,2032 **** { struct s390_address ad; ! if (!s390_decompose_address (addr, &ad, TRUE)) output_operand_lossage ("Cannot decompose address."); if (ad.disp) --- 3082,3090 ---- { struct s390_address ad; ! if (!s390_decompose_address (addr, &ad) ! || (ad.base && !REG_OK_FOR_BASE_STRICT_P (ad.base)) ! || (ad.indx && !REG_OK_FOR_INDEX_STRICT_P (ad.indx))) output_operand_lossage ("Cannot decompose address."); if (ad.disp) *************** print_operand_address (file, addr) *** 2047,2052 **** --- 3105,3111 ---- 'C': print opcode suffix for branch condition. 'D': print opcode suffix for inverse branch condition. + 'J': print tls_load/tls_gdcall/tls_ldcall suffix 'O': print only the displacement of a memory reference. 'R': print only the base register of a memory reference. 'N': print the second word of a DImode operand. *************** print_operand (file, x, code) *** 2072,2083 **** fprintf (file, s390_branch_condition_mnemonic (x, TRUE)); return; case 'O': { struct s390_address ad; if (GET_CODE (x) != MEM ! || !s390_decompose_address (XEXP (x, 0), &ad, TRUE) || ad.indx) abort (); --- 3131,3163 ---- fprintf (file, s390_branch_condition_mnemonic (x, TRUE)); return; + case 'J': + if (GET_CODE (x) == SYMBOL_REF) + { + fprintf (file, "%s", ":tls_load:"); + output_addr_const (file, x); + } + else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSGD) + { + fprintf (file, "%s", ":tls_gdcall:"); + output_addr_const (file, XVECEXP (x, 0, 0)); + } + else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSLDM) + { + fprintf (file, "%s", ":tls_ldcall:"); + assemble_name (file, get_some_local_dynamic_name ()); + } + else + abort (); + return; + case 'O': { struct s390_address ad; if (GET_CODE (x) != MEM ! || !s390_decompose_address (XEXP (x, 0), &ad) ! || (ad.base && !REG_OK_FOR_BASE_STRICT_P (ad.base)) || ad.indx) abort (); *************** print_operand (file, x, code) *** 2093,2099 **** struct s390_address ad; if (GET_CODE (x) != MEM ! || !s390_decompose_address (XEXP (x, 0), &ad, TRUE) || ad.indx) abort (); --- 3173,3180 ---- struct s390_address ad; if (GET_CODE (x) != MEM ! || !s390_decompose_address (XEXP (x, 0), &ad) ! || (ad.base && !REG_OK_FOR_BASE_STRICT_P (ad.base)) || ad.indx) abort (); *************** addr_generation_dependency_p (dep_rtx, i *** 2248,2254 **** if (GET_CODE (dep_rtx) == SET) { target = SET_DEST (dep_rtx); ! if (GET_CODE (target) == REG) { int regno = REGNO (target); --- 3329,3339 ---- if (GET_CODE (dep_rtx) == SET) { target = SET_DEST (dep_rtx); ! if (GET_CODE (target) == STRICT_LOW_PART) ! target = XEXP (target, 0); ! while (GET_CODE (target) == SUBREG) ! target = SUBREG_REG (target); ! if (GET_CODE (target) == REG) { int regno = REGNO (target); *************** s390_adjust_priority (insn, priority) *** 2389,2406 **** } ! /* Split all branches that exceed the maximum distance. */ ! static void ! s390_split_branches (void) { ! rtx temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM); ! rtx insn, pat, label, target, jump, tmp; ! /* In 64-bit mode we can jump +- 4GB. */ ! if (TARGET_64BIT) ! return; /* Find all branches that exceed 64KB, and split them. */ --- 3474,3498 ---- } ! /* Split all branches that exceed the maximum distance. ! Returns true if this created a new literal pool entry. ! Code generated by this routine is allowed to use ! TEMP_REG as temporary scratch register. If this is ! done, TEMP_USED is set to true. */ ! ! static int ! s390_split_branches (temp_reg, temp_used) ! rtx temp_reg; ! bool *temp_used; { ! int new_literal = 0; ! rtx insn, pat, tmp, target; ! rtx *label; ! /* We need correct insn addresses. */ ! shorten_branches (get_insns ()); /* Find all branches that exceed 64KB, and split them. */ *************** s390_split_branches (void) *** 2410,2470 **** continue; pat = PATTERN (insn); ! if (GET_CODE (pat) != SET) continue; if (GET_CODE (SET_SRC (pat)) == LABEL_REF) { ! label = SET_SRC (pat); } else if (GET_CODE (SET_SRC (pat)) == IF_THEN_ELSE) { if (GET_CODE (XEXP (SET_SRC (pat), 1)) == LABEL_REF) ! label = XEXP (SET_SRC (pat), 1); else if (GET_CODE (XEXP (SET_SRC (pat), 2)) == LABEL_REF) ! label = XEXP (SET_SRC (pat), 2); else continue; } else continue; ! if (get_attr_length (insn) == 4) continue; ! if (flag_pic) { ! target = gen_rtx_UNSPEC (SImode, gen_rtvec (1, label), 100); ! target = gen_rtx_CONST (SImode, target); ! target = force_const_mem (SImode, target); ! jump = gen_rtx_REG (Pmode, BASE_REGISTER); ! jump = gen_rtx_PLUS (Pmode, jump, temp_reg); } ! else { ! target = force_const_mem (Pmode, label); ! jump = temp_reg; ! } ! if (GET_CODE (SET_SRC (pat)) == IF_THEN_ELSE) ! { ! if (GET_CODE (XEXP (SET_SRC (pat), 1)) == LABEL_REF) ! jump = gen_rtx_IF_THEN_ELSE (VOIDmode, XEXP (SET_SRC (pat), 0), ! jump, pc_rtx); ! else ! jump = gen_rtx_IF_THEN_ELSE (VOIDmode, XEXP (SET_SRC (pat), 0), ! pc_rtx, jump); } ! tmp = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, target), insn); ! INSN_ADDRESSES_NEW (tmp, -1); ! ! tmp = emit_jump_insn_before (gen_rtx_SET (VOIDmode, pc_rtx, jump), insn); ! INSN_ADDRESSES_NEW (tmp, -1); ! remove_insn (insn); ! insn = tmp; } } --- 3502,3567 ---- continue; pat = PATTERN (insn); ! if (GET_CODE (pat) == PARALLEL && XVECLEN (pat, 0) > 2) ! pat = XVECEXP (pat, 0, 0); ! if (GET_CODE (pat) != SET || SET_DEST (pat) != pc_rtx) continue; if (GET_CODE (SET_SRC (pat)) == LABEL_REF) { ! label = &SET_SRC (pat); } else if (GET_CODE (SET_SRC (pat)) == IF_THEN_ELSE) { if (GET_CODE (XEXP (SET_SRC (pat), 1)) == LABEL_REF) ! label = &XEXP (SET_SRC (pat), 1); else if (GET_CODE (XEXP (SET_SRC (pat), 2)) == LABEL_REF) ! label = &XEXP (SET_SRC (pat), 2); else continue; } else continue; ! if (get_attr_length (insn) <= (TARGET_64BIT ? 6 : 4)) continue; ! *temp_used = 1; ! ! if (TARGET_64BIT) { ! tmp = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, *label), insn); ! INSN_ADDRESSES_NEW (tmp, -1); ! ! target = temp_reg; } ! else if (!flag_pic) { ! new_literal = 1; ! tmp = force_const_mem (Pmode, *label); ! tmp = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, tmp), insn); ! INSN_ADDRESSES_NEW (tmp, -1); ! target = temp_reg; } + else + { + new_literal = 1; + tmp = gen_rtx_UNSPEC (SImode, gen_rtvec (1, *label), 104); + tmp = gen_rtx_CONST (SImode, tmp); + tmp = force_const_mem (SImode, tmp); + tmp = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, tmp), insn); + INSN_ADDRESSES_NEW (tmp, -1); ! target = gen_rtx_REG (Pmode, BASE_REGISTER); ! target = gen_rtx_PLUS (Pmode, target, temp_reg); ! } ! if (!validate_change (insn, label, target, 0)) ! abort (); } + + return new_literal; } *************** replace_constant_pool_ref (x, ref, addr) *** 2582,2587 **** --- 3679,3831 ---- } } + /* Check whether ADDR is an address that uses the base register, + without actually constituting a literal pool access. (This happens + in 31-bit PIC mode, where the base register is used as anchor for + relative addressing of local symbols.) + + Returns 1 if the base register occupies the base slot, + returns 2 if the base register occupies the index slot, + returns 0 if the address is not of this form. */ + + static int + find_base_register_in_addr (addr) + struct s390_address *addr; + { + /* If DISP is complex, we might have a literal pool reference. */ + if (addr->disp && GET_CODE (addr->disp) != CONST_INT) + return 0; + + if (addr->base && REG_P (addr->base) && REGNO (addr->base) == BASE_REGISTER) + return 1; + + if (addr->indx && REG_P (addr->indx) && REGNO (addr->indx) == BASE_REGISTER) + return 2; + + return 0; + } + + /* Return true if X contains an address that uses the base register, + without actually constituting a literal pool access. */ + + static bool + find_base_register_ref (x) + rtx x; + { + bool retv = FALSE; + struct s390_address addr; + int i, j; + const char *fmt; + + /* Addresses can only occur inside a MEM ... */ + if (GET_CODE (x) == MEM) + { + if (s390_decompose_address (XEXP (x, 0), &addr) + && find_base_register_in_addr (&addr)) + return TRUE; + } + + /* ... or a load-address type pattern. */ + if (GET_CODE (x) == SET && GET_CODE (SET_DEST (x)) == REG) + { + if (s390_decompose_address (SET_SRC (x), &addr) + && find_base_register_in_addr (&addr)) + return TRUE; + } + + fmt = GET_RTX_FORMAT (GET_CODE (x)); + for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) + { + if (fmt[i] == 'e') + { + retv |= find_base_register_ref (XEXP (x, i)); + } + else if (fmt[i] == 'E') + { + for (j = 0; j < XVECLEN (x, i); j++) + retv |= find_base_register_ref (XVECEXP (x, i, j)); + } + } + + return retv; + } + + /* If X contains an address that uses the base register, + without actually constituting a literal pool access, + replace the base register with REPL in all such cases. + + Handles both MEMs and load address patterns. */ + + static void + replace_base_register_ref (x, repl) + rtx *x; + rtx repl; + { + struct s390_address addr; + rtx new_addr; + int i, j, pos; + const char *fmt; + + /* Addresses can only occur inside a MEM ... */ + if (GET_CODE (*x) == MEM) + { + if (s390_decompose_address (XEXP (*x, 0), &addr) + && (pos = find_base_register_in_addr (&addr))) + { + if (pos == 1) + addr.base = repl; + else + addr.indx = repl; + + new_addr = addr.base; + if (addr.indx) + new_addr = gen_rtx_PLUS (Pmode, new_addr, addr.indx); + if (addr.disp) + new_addr = gen_rtx_PLUS (Pmode, new_addr, addr.disp); + + *x = replace_equiv_address (*x, new_addr); + return; + } + } + + /* ... or a load-address type pattern. */ + if (GET_CODE (*x) == SET && GET_CODE (SET_DEST (*x)) == REG) + { + if (s390_decompose_address (SET_SRC (*x), &addr) + && (pos = find_base_register_in_addr (&addr))) + { + if (pos == 1) + addr.base = repl; + else + addr.indx = repl; + + new_addr = addr.base; + if (addr.indx) + new_addr = gen_rtx_PLUS (Pmode, new_addr, addr.indx); + if (addr.disp) + new_addr = gen_rtx_PLUS (Pmode, new_addr, addr.disp); + + SET_SRC (*x) = new_addr; + return; + } + } + + fmt = GET_RTX_FORMAT (GET_CODE (*x)); + for (i = GET_RTX_LENGTH (GET_CODE (*x)) - 1; i >= 0; i--) + { + if (fmt[i] == 'e') + { + replace_base_register_ref (&XEXP (*x, i), repl); + } + else if (fmt[i] == 'E') + { + for (j = 0; j < XVECLEN (*x, i); j++) + replace_base_register_ref (&XVECEXP (*x, i, j), repl); + } + } + } + + /* We keep a list of constants we which we have to add to internal constant tables in the middle of large functions. */ *************** struct constant_pool *** 2613,2629 **** { struct constant_pool *next; rtx first_insn; ! rtx last_insn; struct constant *constants[NR_C_MODES]; rtx label; int size; }; static struct constant_pool *s390_start_pool PARAMS ((struct constant_pool **, rtx)); static void s390_end_pool PARAMS ((struct constant_pool *, rtx)); static struct constant_pool *s390_find_pool PARAMS ((struct constant_pool *, rtx)); ! static rtx s390_add_pool PARAMS ((struct constant_pool *, rtx, enum machine_mode)); static rtx s390_dump_pool PARAMS ((struct constant_pool *)); static void s390_free_pool PARAMS ((struct constant_pool *)); --- 3857,3882 ---- { struct constant_pool *next; rtx first_insn; ! rtx pool_insn; ! bitmap insns; struct constant *constants[NR_C_MODES]; rtx label; int size; + bool anchor; }; + static struct constant_pool * s390_chunkify_start PARAMS ((rtx, bool *)); + static void s390_chunkify_finish PARAMS ((struct constant_pool *, rtx)); + static void s390_chunkify_cancel PARAMS ((struct constant_pool *)); + static struct constant_pool *s390_start_pool PARAMS ((struct constant_pool **, rtx)); static void s390_end_pool PARAMS ((struct constant_pool *, rtx)); + static void s390_add_pool_insn PARAMS ((struct constant_pool *, rtx)); static struct constant_pool *s390_find_pool PARAMS ((struct constant_pool *, rtx)); ! static void s390_add_constant PARAMS ((struct constant_pool *, rtx, enum machine_mode)); ! static rtx s390_find_constant PARAMS ((struct constant_pool *, rtx, enum machine_mode)); ! static void s390_add_anchor PARAMS ((struct constant_pool *)); static rtx s390_dump_pool PARAMS ((struct constant_pool *)); static void s390_free_pool PARAMS ((struct constant_pool *)); *************** s390_start_pool (pool_list, insn) *** 2645,2653 **** pool->label = gen_label_rtx (); pool->first_insn = insn; ! pool->last_insn = NULL_RTX; pool->size = 0; ! for (prev = pool_list; *prev; prev = &(*prev)->next) ; *prev = pool; --- 3898,3908 ---- pool->label = gen_label_rtx (); pool->first_insn = insn; ! pool->pool_insn = NULL_RTX; ! pool->insns = BITMAP_XMALLOC (); pool->size = 0; ! pool->anchor = FALSE; ! for (prev = pool_list; *prev; prev = &(*prev)->next) ; *prev = pool; *************** s390_start_pool (pool_list, insn) *** 2655,2668 **** return pool; } ! /* End range of instructions covered by POOL at INSN. */ static void s390_end_pool (pool, insn) struct constant_pool *pool; rtx insn; { ! pool->last_insn = insn; } /* Return pool out of POOL_LIST that covers INSN. */ --- 3910,3940 ---- return pool; } ! /* End range of instructions covered by POOL at INSN and emit ! placeholder insn representing the pool. */ static void s390_end_pool (pool, insn) struct constant_pool *pool; rtx insn; { ! rtx pool_size = GEN_INT (pool->size + 8 /* alignment slop */); ! ! if (!insn) ! insn = get_last_insn (); ! ! pool->pool_insn = emit_insn_after (gen_pool (pool_size), insn); ! INSN_ADDRESSES_NEW (pool->pool_insn, -1); ! } ! ! /* Add INSN to the list of insns covered by POOL. */ ! ! static void ! s390_add_pool_insn (pool, insn) ! struct constant_pool *pool; ! rtx insn; ! { ! bitmap_set_bit (pool->insns, INSN_UID (insn)); } /* Return pool out of POOL_LIST that covers INSN. */ *************** s390_find_pool (pool_list, insn) *** 2672,2704 **** struct constant_pool *pool_list; rtx insn; { - int addr = INSN_ADDRESSES (INSN_UID (insn)); struct constant_pool *pool; - if (addr == -1) - return NULL; - for (pool = pool_list; pool; pool = pool->next) ! if (INSN_ADDRESSES (INSN_UID (pool->first_insn)) <= addr ! && (pool->last_insn == NULL_RTX ! || INSN_ADDRESSES (INSN_UID (pool->last_insn)) > addr)) break; return pool; } ! /* Add constant VAL of mode MODE to the constant pool POOL. ! Return an RTX describing the distance from the start of ! the pool to the location of the new constant. */ ! static rtx ! s390_add_pool (pool, val, mode) struct constant_pool *pool; rtx val; enum machine_mode mode; { struct constant *c; - rtx offset; int i; for (i = 0; i < NR_C_MODES; i++) --- 3944,3967 ---- struct constant_pool *pool_list; rtx insn; { struct constant_pool *pool; for (pool = pool_list; pool; pool = pool->next) ! if (bitmap_bit_p (pool->insns, INSN_UID (insn))) break; return pool; } ! /* Add constant VAL of mode MODE to the constant pool POOL. */ ! static void ! s390_add_constant (pool, val, mode) struct constant_pool *pool; rtx val; enum machine_mode mode; { struct constant *c; int i; for (i = 0; i < NR_C_MODES; i++) *************** s390_add_pool (pool, val, mode) *** 2720,2732 **** pool->constants[i] = c; pool->size += GET_MODE_SIZE (mode); } ! offset = gen_rtx_MINUS (Pmode, gen_rtx_LABEL_REF (Pmode, c->label), ! gen_rtx_LABEL_REF (Pmode, pool->label)); offset = gen_rtx_CONST (Pmode, offset); return offset; } /* Dump out the constants in POOL. */ static rtx --- 3983,4036 ---- pool->constants[i] = c; pool->size += GET_MODE_SIZE (mode); } + } ! /* Find constant VAL of mode MODE in the constant pool POOL. ! Return an RTX describing the distance from the start of ! the pool to the location of the new constant. */ ! ! static rtx ! s390_find_constant (pool, val, mode) ! struct constant_pool *pool; ! rtx val; ! enum machine_mode mode; ! { ! struct constant *c; ! rtx offset; ! int i; ! ! for (i = 0; i < NR_C_MODES; i++) ! if (constant_modes[i] == mode) ! break; ! if (i == NR_C_MODES) ! abort (); ! ! for (c = pool->constants[i]; c != NULL; c = c->next) ! if (rtx_equal_p (val, c->value)) ! break; ! ! if (c == NULL) ! abort (); ! ! offset = gen_rtx_MINUS (Pmode, gen_rtx_LABEL_REF (Pmode, c->label), ! gen_rtx_LABEL_REF (Pmode, pool->label)); offset = gen_rtx_CONST (Pmode, offset); return offset; } + /* Set 'anchor' flag in POOL. */ + + static void + s390_add_anchor (pool) + struct constant_pool *pool; + { + if (!pool->anchor) + { + pool->anchor = TRUE; + pool->size += 4; + } + } + /* Dump out the constants in POOL. */ static rtx *************** s390_dump_pool (pool) *** 2737,2767 **** rtx insn; int i; - /* Select location to put literal pool. */ - if (TARGET_64BIT) - insn = get_last_insn (); - else - insn = pool->last_insn? pool->last_insn : get_last_insn (); - /* Pool start insn switches to proper section and guarantees necessary alignment. */ if (TARGET_64BIT) ! insn = emit_insn_after (gen_pool_start_64 (), insn); else ! insn = emit_insn_after (gen_pool_start_31 (), insn); INSN_ADDRESSES_NEW (insn, -1); insn = emit_label_after (pool->label, insn); INSN_ADDRESSES_NEW (insn, -1); /* Dump constants in descending alignment requirement order, ensuring proper alignment for every constant. */ for (i = 0; i < NR_C_MODES; i++) for (c = pool->constants[i]; c; c = c->next) { insn = emit_label_after (c->label, insn); INSN_ADDRESSES_NEW (insn, -1); ! insn = emit_insn_after (gen_consttable[i] (c->value), insn); INSN_ADDRESSES_NEW (insn, -1); } --- 4041,4087 ---- rtx insn; int i; /* Pool start insn switches to proper section and guarantees necessary alignment. */ if (TARGET_64BIT) ! insn = emit_insn_after (gen_pool_start_64 (), pool->pool_insn); else ! insn = emit_insn_after (gen_pool_start_31 (), pool->pool_insn); INSN_ADDRESSES_NEW (insn, -1); insn = emit_label_after (pool->label, insn); INSN_ADDRESSES_NEW (insn, -1); + /* Emit anchor if we need one. */ + if (pool->anchor) + { + rtx anchor = gen_rtx_LABEL_REF (VOIDmode, pool->label); + anchor = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, anchor), 105); + anchor = gen_rtx_CONST (VOIDmode, anchor); + insn = emit_insn_after (gen_consttable_si (anchor), insn); + INSN_ADDRESSES_NEW (insn, -1); + } + /* Dump constants in descending alignment requirement order, ensuring proper alignment for every constant. */ for (i = 0; i < NR_C_MODES; i++) for (c = pool->constants[i]; c; c = c->next) { + /* Convert 104 unspecs to pool-relative references. */ + rtx value = c->value; + if (GET_CODE (value) == CONST + && GET_CODE (XEXP (value, 0)) == UNSPEC + && XINT (XEXP (value, 0), 1) == 104 + && XVECLEN (XEXP (value, 0), 0) == 1) + { + value = gen_rtx_MINUS (Pmode, XVECEXP (XEXP (value, 0), 0, 0), + gen_rtx_LABEL_REF (VOIDmode, pool->label)); + value = gen_rtx_CONST (VOIDmode, value); + } + insn = emit_label_after (c->label, insn); INSN_ADDRESSES_NEW (insn, -1); ! insn = emit_insn_after (gen_consttable[i] (value), insn); INSN_ADDRESSES_NEW (insn, -1); } *************** s390_dump_pool (pool) *** 2776,2781 **** --- 4096,4104 ---- insn = emit_barrier_after (insn); INSN_ADDRESSES_NEW (insn, -1); + /* Remove placeholder insn. */ + remove_insn (pool->pool_insn); + return insn; } *************** s390_free_pool (pool) *** 2798,2854 **** } } free (pool); } - /* Used in s390.md for branch length calculation. */ - int s390_pool_overflow = 0; ! /* Chunkify the literal pool if required. */ #define S390_POOL_CHUNK_MIN 0xc00 #define S390_POOL_CHUNK_MAX 0xe00 ! static void ! s390_chunkify_pool (void) { ! rtx base_reg = gen_rtx_REG (Pmode, ! TARGET_64BIT? BASE_REGISTER : RETURN_REGNUM); struct constant_pool *curr_pool = NULL, *pool_list = NULL; int extra_size = 0; bitmap far_labels; rtx insn; /* Do we need to chunkify the literal pool? */ if (get_pool_size () < S390_POOL_CHUNK_MAX) ! return; /* Scan all insns and move literals to pool chunks. ! Replace all occurrances of literal pool references ! by explicit references to pool chunk entries. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) { ! if (GET_CODE (insn) == INSN) { ! rtx addr, pool_ref = NULL_RTX; find_constant_pool_ref (PATTERN (insn), &pool_ref); if (pool_ref) { if (!curr_pool) curr_pool = s390_start_pool (&pool_list, insn); ! addr = s390_add_pool (curr_pool, get_pool_constant (pool_ref), ! get_pool_mode (pool_ref)); ! addr = gen_rtx_PLUS (Pmode, base_reg, addr); ! replace_constant_pool_ref (&PATTERN (insn), pool_ref, addr); ! INSN_CODE (insn) = -1; } } if (!curr_pool || INSN_ADDRESSES_SIZE () <= (size_t) INSN_UID (insn) || INSN_ADDRESSES (INSN_UID (insn)) == -1) --- 4121,4206 ---- } } + BITMAP_XFREE (pool->insns); free (pool); } ! /* Chunkify the literal pool if required. ! ! Code generated by this routine is allowed to use ! TEMP_REG as temporary scratch register. If this is ! done, TEMP_USED is set to true. */ #define S390_POOL_CHUNK_MIN 0xc00 #define S390_POOL_CHUNK_MAX 0xe00 ! static struct constant_pool * ! s390_chunkify_start (temp_reg, temp_used) ! rtx temp_reg; ! bool *temp_used; { ! rtx base_reg = gen_rtx_REG (Pmode, BASE_REGISTER); struct constant_pool *curr_pool = NULL, *pool_list = NULL; int extra_size = 0; bitmap far_labels; rtx insn; + rtx (*gen_reload_base) PARAMS ((rtx, rtx)) = + TARGET_64BIT? gen_reload_base_64 : gen_reload_base_31; + + /* Do we need to chunkify the literal pool? */ if (get_pool_size () < S390_POOL_CHUNK_MAX) ! return NULL; ! ! /* We need correct insn addresses. */ ! ! shorten_branches (get_insns ()); /* Scan all insns and move literals to pool chunks. ! Also, emit anchor reload insns before every insn that uses ! the literal pool base register as anchor pointer. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) { ! if (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN) { ! rtx pool_ref = NULL_RTX; find_constant_pool_ref (PATTERN (insn), &pool_ref); if (pool_ref) { if (!curr_pool) curr_pool = s390_start_pool (&pool_list, insn); ! s390_add_constant (curr_pool, get_pool_constant (pool_ref), ! get_pool_mode (pool_ref)); ! s390_add_pool_insn (curr_pool, insn); ! } ! else if (!TARGET_64BIT && flag_pic ! && find_base_register_ref (PATTERN (insn))) ! { ! rtx new = gen_reload_anchor (temp_reg, base_reg); ! new = emit_insn_before (new, insn); ! INSN_ADDRESSES_NEW (new, INSN_ADDRESSES (INSN_UID (insn))); ! extra_size += 8; ! *temp_used = 1; ! ! if (!curr_pool) ! curr_pool = s390_start_pool (&pool_list, new); ! ! s390_add_anchor (curr_pool); ! s390_add_pool_insn (curr_pool, insn); } } + if (GET_CODE (insn) == JUMP_INSN || GET_CODE (insn) == CODE_LABEL) + if (curr_pool) + s390_add_pool_insn (curr_pool, insn); + if (!curr_pool || INSN_ADDRESSES_SIZE () <= (size_t) INSN_UID (insn) || INSN_ADDRESSES (INSN_UID (insn)) == -1) *************** s390_chunkify_pool (void) *** 2859,2865 **** if (curr_pool->size < S390_POOL_CHUNK_MAX) continue; ! s390_end_pool (curr_pool, insn); curr_pool = NULL; } else --- 4211,4217 ---- if (curr_pool->size < S390_POOL_CHUNK_MAX) continue; ! s390_end_pool (curr_pool, NULL_RTX); curr_pool = NULL; } else *************** s390_chunkify_pool (void) *** 2872,2882 **** Those will have an effect on code size, which we need to consider here. This calculation makes rather pessimistic worst-case assumptions. */ ! if (GET_CODE (insn) == CODE_LABEL ! || GET_CODE (insn) == JUMP_INSN) extra_size += 6; - else if (GET_CODE (insn) == CALL_INSN) - extra_size += 4; if (chunk_size < S390_POOL_CHUNK_MIN && curr_pool->size < S390_POOL_CHUNK_MIN) --- 4224,4231 ---- Those will have an effect on code size, which we need to consider here. This calculation makes rather pessimistic worst-case assumptions. */ ! if (GET_CODE (insn) == CODE_LABEL) extra_size += 6; if (chunk_size < S390_POOL_CHUNK_MIN && curr_pool->size < S390_POOL_CHUNK_MIN) *************** s390_chunkify_pool (void) *** 2892,2903 **** /* ... so if we don't find one in time, create one. */ else if ((chunk_size > S390_POOL_CHUNK_MAX ! || curr_pool->size > S390_POOL_CHUNK_MAX) ! && (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN)) { - int addr = INSN_ADDRESSES (INSN_UID (insn)); rtx label, jump, barrier; label = gen_label_rtx (); jump = emit_jump_insn_after (gen_jump (label), insn); barrier = emit_barrier_after (jump); --- 4241,4262 ---- /* ... so if we don't find one in time, create one. */ else if ((chunk_size > S390_POOL_CHUNK_MAX ! || curr_pool->size > S390_POOL_CHUNK_MAX)) { rtx label, jump, barrier; + /* We can insert the barrier only after a 'real' insn. */ + if (GET_CODE (insn) != INSN && GET_CODE (insn) != CALL_INSN) + continue; + if (get_attr_length (insn) == 0) + continue; + + /* Don't separate insns created by s390_split_branches. */ + if (GET_CODE (insn) == INSN + && GET_CODE (PATTERN (insn)) == SET + && rtx_equal_p (SET_DEST (PATTERN (insn)), temp_reg)) + continue; + label = gen_label_rtx (); jump = emit_jump_insn_after (gen_jump (label), insn); barrier = emit_barrier_after (jump); *************** s390_chunkify_pool (void) *** 2905,2912 **** JUMP_LABEL (jump) = label; LABEL_NUSES (label) = 1; ! INSN_ADDRESSES_NEW (jump, addr+1); ! INSN_ADDRESSES_NEW (barrier, addr+1); INSN_ADDRESSES_NEW (insn, -1); s390_end_pool (curr_pool, barrier); --- 4264,4271 ---- JUMP_LABEL (jump) = label; LABEL_NUSES (label) = 1; ! INSN_ADDRESSES_NEW (jump, -1); ! INSN_ADDRESSES_NEW (barrier, -1); INSN_ADDRESSES_NEW (insn, -1); s390_end_pool (curr_pool, barrier); *************** s390_chunkify_pool (void) *** 2916,2925 **** } } ! /* Dump out all literal pools. */ ! ! for (curr_pool = pool_list; curr_pool; curr_pool = curr_pool->next) ! s390_dump_pool (curr_pool); /* Find all labels that are branched into --- 4275,4282 ---- } } ! if (curr_pool) ! s390_end_pool (curr_pool, NULL_RTX); /* Find all labels that are branched into *************** s390_chunkify_pool (void) *** 2953,2974 **** else if (GET_CODE (insn) == JUMP_INSN) { rtx pat = PATTERN (insn); if (GET_CODE (pat) == SET) { ! rtx label = 0; ! ! if (GET_CODE (SET_SRC (pat)) == LABEL_REF) ! { ! label = XEXP (SET_SRC (pat), 0); ! } ! else if (GET_CODE (SET_SRC (pat)) == IF_THEN_ELSE) ! { ! if (GET_CODE (XEXP (SET_SRC (pat), 1)) == LABEL_REF) ! label = XEXP (XEXP (SET_SRC (pat), 1), 0); ! else if (GET_CODE (XEXP (SET_SRC (pat), 2)) == LABEL_REF) ! label = XEXP (XEXP (SET_SRC (pat), 2), 0); ! } ! if (label) { if (s390_find_pool (pool_list, label) --- 4310,4321 ---- else if (GET_CODE (insn) == JUMP_INSN) { rtx pat = PATTERN (insn); + if (GET_CODE (pat) == PARALLEL && XVECLEN (pat, 0) > 2) + pat = XVECEXP (pat, 0, 0); + if (GET_CODE (pat) == SET) { ! rtx label = JUMP_LABEL (insn); if (label) { if (s390_find_pool (pool_list, label) *************** s390_chunkify_pool (void) *** 3009,3027 **** /* Insert base register reload insns before every pool. */ for (curr_pool = pool_list; curr_pool; curr_pool = curr_pool->next) ! if (TARGET_64BIT) ! { ! rtx pool_ref = gen_rtx_LABEL_REF (Pmode, curr_pool->label); ! rtx new_insn = gen_rtx_SET (Pmode, base_reg, pool_ref); ! rtx insn = curr_pool->first_insn; ! INSN_ADDRESSES_NEW (emit_insn_before (new_insn, insn), -1); ! } ! else ! { ! rtx new_insn = gen_reload_base (base_reg, curr_pool->label); ! rtx insn = curr_pool->first_insn; ! INSN_ADDRESSES_NEW (emit_insn_before (new_insn, insn), -1); ! } /* Insert base register reload insns at every far label. */ --- 4356,4366 ---- /* Insert base register reload insns before every pool. */ for (curr_pool = pool_list; curr_pool; curr_pool = curr_pool->next) ! { ! rtx new_insn = gen_reload_base (base_reg, curr_pool->label); ! rtx insn = curr_pool->first_insn; ! INSN_ADDRESSES_NEW (emit_insn_before (new_insn, insn), -1); ! } /* Insert base register reload insns at every far label. */ *************** s390_chunkify_pool (void) *** 3032,3091 **** struct constant_pool *pool = s390_find_pool (pool_list, insn); if (pool) { ! if (TARGET_64BIT) ! { ! rtx pool_ref = gen_rtx_LABEL_REF (Pmode, pool->label); ! rtx new_insn = gen_rtx_SET (Pmode, base_reg, pool_ref); ! INSN_ADDRESSES_NEW (emit_insn_after (new_insn, insn), -1); ! } ! else ! { ! rtx new_insn = gen_reload_base (base_reg, pool->label); ! INSN_ADDRESSES_NEW (emit_insn_after (new_insn, insn), -1); ! } } } - /* Insert base register reload insns after every call if necessary. */ ! if (REGNO (base_reg) == RETURN_REGNUM) ! for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) ! if (GET_CODE (insn) == CALL_INSN) ! { ! struct constant_pool *pool = s390_find_pool (pool_list, insn); ! if (pool) ! { ! rtx new_insn = gen_reload_base2 (base_reg, pool->label); ! INSN_ADDRESSES_NEW (emit_insn_after (new_insn, insn), -1); ! } ! } /* Recompute insn addresses. */ - s390_pool_overflow = 1; init_insn_lengths (); shorten_branches (get_insns ()); - s390_pool_overflow = 0; ! /* Insert base register reload insns after far branches. */ ! if (!TARGET_64BIT) ! for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) ! if (GET_CODE (insn) == JUMP_INSN ! && GET_CODE (PATTERN (insn)) == SET ! && get_attr_length (insn) >= 12) ! { ! struct constant_pool *pool = s390_find_pool (pool_list, insn); ! if (pool) { ! rtx new_insn = gen_reload_base (base_reg, pool->label); ! INSN_ADDRESSES_NEW (emit_insn_after (new_insn, insn), -1); } } ! /* Free all memory. */ while (pool_list) { --- 4371,4507 ---- struct constant_pool *pool = s390_find_pool (pool_list, insn); if (pool) { ! rtx new_insn = gen_reload_base (base_reg, pool->label); ! INSN_ADDRESSES_NEW (emit_insn_after (new_insn, insn), -1); } } ! BITMAP_XFREE (far_labels); /* Recompute insn addresses. */ init_insn_lengths (); shorten_branches (get_insns ()); ! return pool_list; ! } ! /* POOL_LIST is a chunk list as prepared by s390_chunkify_start. ! After we have decided to use this list, finish implementing ! all changes to the current function as required. ! ! Code generated by this routine is allowed to use ! TEMP_REG as temporary scratch register. */ ! ! static void ! s390_chunkify_finish (pool_list, temp_reg) ! struct constant_pool *pool_list; ! rtx temp_reg; ! { ! rtx base_reg = gen_rtx_REG (Pmode, BASE_REGISTER); ! struct constant_pool *curr_pool = NULL; ! rtx insn; ! ! ! /* Replace all literal pool references. */ ! ! for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) ! { ! curr_pool = s390_find_pool (pool_list, insn); ! if (!curr_pool) ! continue; ! ! if (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN) ! { ! rtx addr, pool_ref = NULL_RTX; ! find_constant_pool_ref (PATTERN (insn), &pool_ref); ! if (pool_ref) ! { ! addr = s390_find_constant (curr_pool, get_pool_constant (pool_ref), ! get_pool_mode (pool_ref)); ! addr = gen_rtx_PLUS (Pmode, base_reg, addr); ! replace_constant_pool_ref (&PATTERN (insn), pool_ref, addr); ! INSN_CODE (insn) = -1; ! } ! ! else if (!TARGET_64BIT && flag_pic ! && find_base_register_ref (PATTERN (insn))) { ! replace_base_register_ref (&PATTERN (insn), temp_reg); } + } + } + + /* Dump out all literal pools. */ + + for (curr_pool = pool_list; curr_pool; curr_pool = curr_pool->next) + s390_dump_pool (curr_pool); + + /* Free pool list. */ + + while (pool_list) + { + struct constant_pool *next = pool_list->next; + s390_free_pool (pool_list); + pool_list = next; + } + } + + /* POOL_LIST is a chunk list as prepared by s390_chunkify_start. + We have decided we cannot use this list, so revert all changes + to the current function that were done by s390_chunkify_start. */ + + static void + s390_chunkify_cancel (pool_list) + struct constant_pool *pool_list; + { + struct constant_pool *curr_pool = NULL; + rtx insn; + + /* Remove all pool placeholder insns. */ + + for (curr_pool = pool_list; curr_pool; curr_pool = curr_pool->next) + { + /* Did we insert an extra barrier? Remove it. */ + rtx barrier = PREV_INSN (curr_pool->pool_insn); + rtx jump = barrier? PREV_INSN (barrier) : NULL_RTX; + rtx label = NEXT_INSN (curr_pool->pool_insn); + + if (jump && GET_CODE (jump) == JUMP_INSN + && barrier && GET_CODE (barrier) == BARRIER + && label && GET_CODE (label) == CODE_LABEL + && GET_CODE (PATTERN (jump)) == SET + && SET_DEST (PATTERN (jump)) == pc_rtx + && GET_CODE (SET_SRC (PATTERN (jump))) == LABEL_REF + && XEXP (SET_SRC (PATTERN (jump)), 0) == label) + { + remove_insn (jump); + remove_insn (barrier); + remove_insn (label); } + remove_insn (curr_pool->pool_insn); + } ! /* Remove all base/anchor register reload insns. */ ! ! for (insn = get_insns (); insn; ) ! { ! rtx next_insn = NEXT_INSN (insn); ! ! if (GET_CODE (insn) == INSN ! && GET_CODE (PATTERN (insn)) == SET ! && GET_CODE (SET_SRC (PATTERN (insn))) == UNSPEC ! && (XINT (SET_SRC (PATTERN (insn)), 1) == 210 ! || XINT (SET_SRC (PATTERN (insn)), 1) == 211)) ! remove_insn (insn); ! ! insn = next_insn; ! } ! ! /* Free pool list. */ while (pool_list) { *************** s390_chunkify_pool (void) *** 3093,3100 **** s390_free_pool (pool_list); pool_list = next; } - - BITMAP_XFREE (far_labels); } --- 4509,4514 ---- *************** int s390_nr_constants; *** 3108,3161 **** /* Output main constant pool to stdio stream FILE. */ void ! s390_output_constant_pool (file) ! FILE *file; { ! /* Output constant pool. */ ! if (s390_nr_constants) { ! if (TARGET_64BIT) { ! fprintf (file, "\tlarl\t%s,.LT%X\n", reg_names[BASE_REGISTER], ! s390_function_count); ! readonly_data_section (); ! ASM_OUTPUT_ALIGN (file, 3); } ! else { ! fprintf (file, "\tbras\t%s,.LTN%X\n", reg_names[BASE_REGISTER], ! s390_function_count); } ! fprintf (file, ".LT%X:\n", s390_function_count); ! s390_pool_count = 0; ! output_constant_pool (current_function_name, current_function_decl); ! s390_pool_count = -1; ! if (TARGET_64BIT) ! function_section (current_function_decl); else ! fprintf (file, ".LTN%X:\n", s390_function_count); } - } ! /* Return true if floating point registers need to be saved. */ ! static int ! save_fprs_p () { ! int i; ! if (!TARGET_64BIT) ! return 0; ! for (i=24; i<=31; i++) { ! if (regs_ever_live[i] == 1) ! return 1; } ! return 0; } /* Find first call clobbered register unsused in a function. This could be used as base register in a leaf function or for holding the return address before epilogue. */ --- 4522,4880 ---- /* Output main constant pool to stdio stream FILE. */ void ! s390_output_constant_pool (start_label, end_label) ! rtx start_label; ! rtx end_label; { ! if (TARGET_64BIT) { ! readonly_data_section (); ! ASM_OUTPUT_ALIGN (asm_out_file, 3); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (start_label)); ! } ! else ! { ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (start_label)); ! ASM_OUTPUT_ALIGN (asm_out_file, 2); ! } ! ! s390_pool_count = 0; ! output_constant_pool (current_function_name, current_function_decl); ! s390_pool_count = -1; ! if (TARGET_64BIT) ! function_section (current_function_decl); ! else ! { ! ASM_OUTPUT_ALIGN (asm_out_file, 1); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (end_label)); ! } ! } ! ! /* Rework the prolog/epilog to avoid saving/restoring ! registers unnecessarily. If TEMP_REGNO is nonnegative, ! it specifies the number of a caller-saved register used ! as temporary scratch register by code emitted during ! machine dependent reorg. */ ! ! static void ! s390_optimize_prolog (temp_regno) ! int temp_regno; ! { ! int save_first, save_last, restore_first, restore_last; ! int i, j; ! rtx insn, new_insn, next_insn; ! ! /* Recompute regs_ever_live data for special registers. */ ! regs_ever_live[BASE_REGISTER] = 0; ! regs_ever_live[RETURN_REGNUM] = 0; ! regs_ever_live[STACK_POINTER_REGNUM] = cfun->machine->frame_size > 0; ! ! /* If there is (possibly) any pool entry, we need to ! load the base register. ! ??? FIXME: this should be more precise. */ ! if (get_pool_size ()) ! regs_ever_live[BASE_REGISTER] = 1; ! ! /* In non-leaf functions, the prolog/epilog code relies ! on RETURN_REGNUM being saved in any case. */ ! if (!current_function_is_leaf) ! regs_ever_live[RETURN_REGNUM] = 1; ! ! /* We need to save/restore the temporary register. */ ! if (temp_regno >= 0) ! regs_ever_live[temp_regno] = 1; ! ! ! /* Find first and last gpr to be saved. */ ! ! for (i = 6; i < 16; i++) ! if (regs_ever_live[i]) ! if (!global_regs[i] ! || i == STACK_POINTER_REGNUM ! || i == RETURN_REGNUM ! || i == BASE_REGISTER ! || (flag_pic && i == (int)PIC_OFFSET_TABLE_REGNUM)) ! break; ! ! for (j = 15; j > i; j--) ! if (regs_ever_live[j]) ! if (!global_regs[j] ! || j == STACK_POINTER_REGNUM ! || j == RETURN_REGNUM ! || j == BASE_REGISTER ! || (flag_pic && j == (int)PIC_OFFSET_TABLE_REGNUM)) ! break; ! ! if (i == 16) ! { ! /* Nothing to save/restore. */ ! save_first = restore_first = -1; ! save_last = restore_last = -1; ! } ! else ! { ! /* Save/restore from i to j. */ ! save_first = restore_first = i; ! save_last = restore_last = j; ! } ! ! /* Varargs functions need to save gprs 2 to 6. */ ! if (current_function_stdarg) ! { ! save_first = 2; ! if (save_last < 6) ! save_last = 6; ! } ! ! ! /* If all special registers are in fact used, there's nothing we ! can do, so no point in walking the insn list. */ ! if (i <= BASE_REGISTER && j >= BASE_REGISTER ! && i <= RETURN_REGNUM && j >= RETURN_REGNUM) ! return; ! ! ! /* Search for prolog/epilog insns and replace them. */ ! ! for (insn = get_insns (); insn; insn = next_insn) ! { ! int first, last, off; ! rtx set, base, offset; ! ! next_insn = NEXT_INSN (insn); ! ! if (GET_CODE (insn) != INSN) ! continue; ! if (GET_CODE (PATTERN (insn)) != PARALLEL) ! continue; ! ! if (store_multiple_operation (PATTERN (insn), VOIDmode)) { ! set = XVECEXP (PATTERN (insn), 0, 0); ! first = REGNO (SET_SRC (set)); ! last = first + XVECLEN (PATTERN (insn), 0) - 1; ! offset = const0_rtx; ! base = eliminate_constant_term (XEXP (SET_DEST (set), 0), &offset); ! off = INTVAL (offset) - first * UNITS_PER_WORD; ! ! if (GET_CODE (base) != REG || off < 0) ! continue; ! if (first > BASE_REGISTER && first > RETURN_REGNUM) ! continue; ! if (last < BASE_REGISTER && last < RETURN_REGNUM) ! continue; ! ! if (save_first != -1) ! { ! new_insn = save_gprs (base, off, save_first, save_last); ! new_insn = emit_insn_before (new_insn, insn); ! INSN_ADDRESSES_NEW (new_insn, -1); ! } ! ! remove_insn (insn); } ! ! if (load_multiple_operation (PATTERN (insn), VOIDmode)) { ! set = XVECEXP (PATTERN (insn), 0, 0); ! first = REGNO (SET_DEST (set)); ! last = first + XVECLEN (PATTERN (insn), 0) - 1; ! offset = const0_rtx; ! base = eliminate_constant_term (XEXP (SET_SRC (set), 0), &offset); ! off = INTVAL (offset) - first * UNITS_PER_WORD; ! ! if (GET_CODE (base) != REG || off < 0) ! continue; ! if (first > BASE_REGISTER && first > RETURN_REGNUM) ! continue; ! if (last < BASE_REGISTER && last < RETURN_REGNUM) ! continue; ! ! if (restore_first != -1) ! { ! new_insn = restore_gprs (base, off, restore_first, restore_last); ! new_insn = emit_insn_before (new_insn, insn); ! INSN_ADDRESSES_NEW (new_insn, -1); ! } ! ! remove_insn (insn); } ! } ! } ! /* Check whether any insn in the function makes use of the original ! value of RETURN_REG (e.g. for __builtin_return_address). ! If so, insert an insn reloading that value. ! Return true if any such insn was found. */ ! ! static bool ! s390_fixup_clobbered_return_reg (return_reg) ! rtx return_reg; ! { ! bool replacement_done = 0; ! rtx insn; ! ! /* If we never called __builtin_return_address, register 14 ! might have been used as temp during the prolog; we do ! not want to touch those uses. */ ! if (!has_hard_reg_initial_val (Pmode, REGNO (return_reg))) ! return false; ! ! for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) ! { ! rtx reg, off, new_insn; ! ! if (GET_CODE (insn) != INSN) ! continue; ! if (!reg_referenced_p (return_reg, PATTERN (insn))) ! continue; ! if (GET_CODE (PATTERN (insn)) == PARALLEL ! && store_multiple_operation (PATTERN (insn), VOIDmode)) ! continue; ! ! if (frame_pointer_needed) ! reg = hard_frame_pointer_rtx; else ! reg = stack_pointer_rtx; ! ! off = GEN_INT (cfun->machine->frame_size + REGNO (return_reg) * UNITS_PER_WORD); ! if (INTVAL (off) >= 4096) ! { ! off = force_const_mem (Pmode, off); ! new_insn = gen_rtx_SET (Pmode, return_reg, off); ! new_insn = emit_insn_before (new_insn, insn); ! INSN_ADDRESSES_NEW (new_insn, -1); ! off = return_reg; ! } ! ! new_insn = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, reg, off)); ! new_insn = gen_rtx_SET (Pmode, return_reg, new_insn); ! new_insn = emit_insn_before (new_insn, insn); ! INSN_ADDRESSES_NEW (new_insn, -1); ! ! replacement_done = 1; } + return replacement_done; + } ! /* Perform machine-dependent processing. */ ! void ! s390_machine_dependent_reorg (first) ! rtx first ATTRIBUTE_UNUSED; { ! bool fixed_up_clobbered_return_reg = 0; ! rtx temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM); ! bool temp_used = 0; ! ! /* Make sure all splits have been performed; splits after ! machine_dependent_reorg might confuse insn length counts. */ ! split_all_insns_noflow (); ! ! ! /* There are two problematic situations we need to correct: ! ! - the literal pool might be > 4096 bytes in size, so that ! some of its elements cannot be directly accessed ! ! - a branch target might be > 64K away from the branch, so that ! it is not possible to use a PC-relative instruction. ! ! To fix those, we split the single literal pool into multiple ! pool chunks, reloading the pool base register at various ! points throughout the function to ensure it always points to ! the pool chunk the following code expects, and / or replace ! PC-relative branches by absolute branches. ! ! However, the two problems are interdependent: splitting the ! literal pool can move a branch further away from its target, ! causing the 64K limit to overflow, and on the other hand, ! replacing a PC-relative branch by an absolute branch means ! we need to put the branch target address into the literal ! pool, possibly causing it to overflow. ! ! So, we loop trying to fix up both problems until we manage ! to satisfy both conditions at the same time. Note that the ! loop is guaranteed to terminate as every pass of the loop ! strictly decreases the total number of PC-relative branches ! in the function. (This is not completely true as there ! might be branch-over-pool insns introduced by chunkify_start. ! Those never need to be split however.) */ ! ! for (;;) { ! struct constant_pool *pool_list; ! ! /* Try to chunkify the literal pool. */ ! pool_list = s390_chunkify_start (temp_reg, &temp_used); ! ! /* Split out-of-range branches. If this has created new ! literal pool entries, cancel current chunk list and ! recompute it. */ ! if (s390_split_branches (temp_reg, &temp_used)) ! { ! if (pool_list) ! s390_chunkify_cancel (pool_list); ! ! continue; ! } ! ! /* Check whether we have clobbered a use of the return ! register (e.g. for __builtin_return_address). If so, ! add insns reloading the register where necessary. */ ! if (temp_used && !fixed_up_clobbered_return_reg ! && s390_fixup_clobbered_return_reg (temp_reg)) ! { ! fixed_up_clobbered_return_reg = 1; ! ! /* The fixup insns might have caused a jump to overflow. */ ! if (pool_list) ! s390_chunkify_cancel (pool_list); ! ! continue; ! } ! ! /* If we made it up to here, both conditions are satisfied. ! Finish up pool chunkification if required. */ ! if (pool_list) ! s390_chunkify_finish (pool_list, temp_reg); ! ! break; } ! ! s390_optimize_prolog (temp_used? RETURN_REGNUM : -1); } + + /* Return an RTL expression representing the value of the return address + for the frame COUNT steps up from the current frame. FRAME is the + frame pointer of that frame. */ + + rtx + s390_return_addr_rtx (count, frame) + int count; + rtx frame; + { + rtx addr; + + /* For the current frame, we use the initial value of RETURN_REGNUM. + This works both in leaf and non-leaf functions. */ + + if (count == 0) + return get_hard_reg_initial_val (Pmode, RETURN_REGNUM); + + /* For frames farther back, we read the stack slot where the + corresponding RETURN_REGNUM value was saved. */ + + addr = plus_constant (frame, RETURN_REGNUM * UNITS_PER_WORD); + addr = memory_address (Pmode, addr); + return gen_rtx_MEM (Pmode, addr); + } + /* Find first call clobbered register unsused in a function. This could be used as base register in a leaf function or for holding the return address before epilogue. */ *************** find_unused_clobbered_reg () *** 3173,3181 **** /* Fill FRAME with info about frame of current function. */ static void ! s390_frame_info (frame) ! struct s390_frame *frame; { int i, j; HOST_WIDE_INT fsize = get_frame_size (); --- 4892,4900 ---- /* Fill FRAME with info about frame of current function. */ static void ! s390_frame_info () { + char gprs_ever_live[16]; int i, j; HOST_WIDE_INT fsize = get_frame_size (); *************** s390_frame_info (frame) *** 3183,3261 **** fatal_error ("Total size of local variables exceeds architecture limit."); /* fprs 8 - 15 are caller saved for 64 Bit ABI. */ ! frame->save_fprs_p = save_fprs_p (); ! frame->frame_size = fsize + frame->save_fprs_p * 64; /* Does function need to setup frame and save area. */ if (! current_function_is_leaf ! || frame->frame_size > 0 || current_function_calls_alloca ! || current_function_stdarg ! || current_function_varargs) ! frame->frame_size += STARTING_FRAME_OFFSET; ! ! /* If we need to allocate a frame, the stack pointer is changed. */ ! ! if (frame->frame_size > 0) ! regs_ever_live[STACK_POINTER_REGNUM] = 1; ! ! /* If the literal pool might overflow, the return register might ! be used as temp literal pointer. */ ! ! if (!TARGET_64BIT && get_pool_size () >= S390_POOL_CHUNK_MAX / 2) ! regs_ever_live[RETURN_REGNUM] = 1; ! ! /* If there is (possibly) any pool entry, we need to ! load base register. */ ! ! if (get_pool_size () ! || !CONST_OK_FOR_LETTER_P (frame->frame_size, 'K') ! || (!TARGET_64BIT && current_function_uses_pic_offset_table)) ! regs_ever_live[BASE_REGISTER] = 1; ! ! /* If we need the GOT pointer, remember to save/restore it. */ ! if (current_function_uses_pic_offset_table) ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; ! /* Frame pointer needed. */ ! ! frame->frame_pointer_p = frame_pointer_needed; ! /* Find first and last gpr to be saved. */ for (i = 6; i < 16; i++) ! if (regs_ever_live[i]) break; for (j = 15; j > i; j--) ! if (regs_ever_live[j]) break; - - if (i == 16) - { - /* Nothing to save / restore. */ - frame->first_save_gpr = -1; - frame->first_restore_gpr = -1; - frame->last_save_gpr = -1; - frame->return_reg_saved_p = 0; - } - else - { - /* Save / Restore from gpr i to j. */ - frame->first_save_gpr = i; - frame->first_restore_gpr = i; - frame->last_save_gpr = j; - frame->return_reg_saved_p = (j >= RETURN_REGNUM && i <= RETURN_REGNUM); - } ! if (current_function_stdarg || current_function_varargs) ! { ! /* Varargs function need to save from gpr 2 to gpr 15. */ ! frame->first_save_gpr = 2; ! } } /* Return offset between argument pointer and frame pointer --- 4902,4960 ---- fatal_error ("Total size of local variables exceeds architecture limit."); /* fprs 8 - 15 are caller saved for 64 Bit ABI. */ ! cfun->machine->save_fprs_p = 0; ! if (TARGET_64BIT) ! for (i = 24; i < 32; i++) ! if (regs_ever_live[i] && !global_regs[i]) ! { ! cfun->machine->save_fprs_p = 1; ! break; ! } ! cfun->machine->frame_size = fsize + cfun->machine->save_fprs_p * 64; /* Does function need to setup frame and save area. */ if (! current_function_is_leaf ! || cfun->machine->frame_size > 0 || current_function_calls_alloca ! || current_function_stdarg) ! cfun->machine->frame_size += STARTING_FRAME_OFFSET; ! /* Find first and last gpr to be saved. Note that at this point, ! we assume the return register and the base register always ! need to be saved. This is done because the usage of these ! register might change even after the prolog was emitted. ! If it turns out later that we really don't need them, the ! prolog/epilog code is modified again. */ ! for (i = 0; i < 16; i++) ! gprs_ever_live[i] = regs_ever_live[i] && !global_regs[i]; ! if (flag_pic) ! gprs_ever_live[PIC_OFFSET_TABLE_REGNUM] = ! regs_ever_live[PIC_OFFSET_TABLE_REGNUM]; ! gprs_ever_live[BASE_REGISTER] = 1; ! gprs_ever_live[RETURN_REGNUM] = 1; ! gprs_ever_live[STACK_POINTER_REGNUM] = cfun->machine->frame_size > 0; for (i = 6; i < 16; i++) ! if (gprs_ever_live[i]) break; for (j = 15; j > i; j--) ! if (gprs_ever_live[j]) break; ! ! /* Save / Restore from gpr i to j. */ ! cfun->machine->first_save_gpr = i; ! cfun->machine->first_restore_gpr = i; ! cfun->machine->last_save_gpr = j; ! ! /* Varargs functions need to save gprs 2 to 6. */ ! if (current_function_stdarg) ! cfun->machine->first_save_gpr = 2; } /* Return offset between argument pointer and frame pointer *************** s390_frame_info (frame) *** 3264,3276 **** int s390_arg_frame_offset () { ! struct s390_frame frame; ! /* Compute frame_info. */ ! s390_frame_info (&frame); ! return frame.frame_size + STACK_POINTER_OFFSET; } /* Emit insn to save fpr REGNUM at offset OFFSET relative --- 4963,4991 ---- int s390_arg_frame_offset () { ! HOST_WIDE_INT fsize = get_frame_size (); ! int save_fprs_p, i; ! /* fprs 8 - 15 are caller saved for 64 Bit ABI. */ ! save_fprs_p = 0; ! if (TARGET_64BIT) ! for (i = 24; i < 32; i++) ! if (regs_ever_live[i] && !global_regs[i]) ! { ! save_fprs_p = 1; ! break; ! } ! fsize = fsize + save_fprs_p * 64; ! /* Does function need to setup frame and save area. */ ! ! if (! current_function_is_leaf ! || fsize > 0 ! || current_function_calls_alloca ! || current_function_stdarg) ! fsize += STARTING_FRAME_OFFSET; ! return fsize + STACK_POINTER_OFFSET; } /* Emit insn to save fpr REGNUM at offset OFFSET relative *************** restore_fpr (base, offset, regnum) *** 3305,3334 **** return emit_move_insn (gen_rtx_REG (DFmode, regnum), addr); } ! /* Output the function prologue assembly code to the ! stdio stream FILE. The local frame size is passed ! in LSIZE. */ ! void ! s390_function_prologue (file, lsize) ! FILE *file ATTRIBUTE_UNUSED; ! HOST_WIDE_INT lsize ATTRIBUTE_UNUSED; { ! s390_chunkify_pool (); ! s390_split_branches (); } ! /* Output the function epilogue assembly code to the ! stdio stream FILE. The local frame size is passed ! in LSIZE. */ ! void ! s390_function_epilogue (file, lsize) ! FILE *file ATTRIBUTE_UNUSED; ! HOST_WIDE_INT lsize ATTRIBUTE_UNUSED; { ! current_function_uses_pic_offset_table = 0; ! s390_function_count++; } /* Expand the prologue into a bunch of separate insns. */ --- 5020,5137 ---- return emit_move_insn (gen_rtx_REG (DFmode, regnum), addr); } ! /* Generate insn to save registers FIRST to LAST into ! the register save area located at offset OFFSET ! relative to register BASE. */ ! static rtx ! save_gprs (base, offset, first, last) ! rtx base; ! int offset; ! int first; ! int last; { ! rtx addr, insn, note; ! int i; ! ! addr = plus_constant (base, offset + first * UNITS_PER_WORD); ! addr = gen_rtx_MEM (Pmode, addr); ! set_mem_alias_set (addr, s390_sr_alias_set); ! ! /* Special-case single register. */ ! if (first == last) ! { ! if (TARGET_64BIT) ! insn = gen_movdi (addr, gen_rtx_REG (Pmode, first)); ! else ! insn = gen_movsi (addr, gen_rtx_REG (Pmode, first)); ! ! RTX_FRAME_RELATED_P (insn) = 1; ! return insn; ! } ! ! ! insn = gen_store_multiple (addr, ! gen_rtx_REG (Pmode, first), ! GEN_INT (last - first + 1)); ! ! ! /* We need to set the FRAME_RELATED flag on all SETs ! inside the store-multiple pattern. ! ! However, we must not emit DWARF records for registers 2..5 ! if they are stored for use by variable arguments ... ! ! ??? Unfortunately, it is not enough to simply not the the ! FRAME_RELATED flags for those SETs, because the first SET ! of the PARALLEL is always treated as if it had the flag ! set, even if it does not. Therefore we emit a new pattern ! without those registers as REG_FRAME_RELATED_EXPR note. */ ! ! if (first >= 6) ! { ! rtx pat = PATTERN (insn); ! ! for (i = 0; i < XVECLEN (pat, 0); i++) ! if (GET_CODE (XVECEXP (pat, 0, i)) == SET) ! RTX_FRAME_RELATED_P (XVECEXP (pat, 0, i)) = 1; ! ! RTX_FRAME_RELATED_P (insn) = 1; ! } ! else if (last >= 6) ! { ! addr = plus_constant (base, offset + 6 * UNITS_PER_WORD); ! note = gen_store_multiple (gen_rtx_MEM (Pmode, addr), ! gen_rtx_REG (Pmode, 6), ! GEN_INT (last - 6 + 1)); ! note = PATTERN (note); ! ! REG_NOTES (insn) = ! gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! note, REG_NOTES (insn)); ! ! for (i = 0; i < XVECLEN (note, 0); i++) ! if (GET_CODE (XVECEXP (note, 0, i)) == SET) ! RTX_FRAME_RELATED_P (XVECEXP (note, 0, i)) = 1; ! ! RTX_FRAME_RELATED_P (insn) = 1; ! } ! ! return insn; } ! /* Generate insn to restore registers FIRST to LAST from ! the register save area located at offset OFFSET ! relative to register BASE. */ ! static rtx ! restore_gprs (base, offset, first, last) ! rtx base; ! int offset; ! int first; ! int last; { ! rtx addr, insn; ! ! addr = plus_constant (base, offset + first * UNITS_PER_WORD); ! addr = gen_rtx_MEM (Pmode, addr); ! set_mem_alias_set (addr, s390_sr_alias_set); ! ! /* Special-case single register. */ ! if (first == last) ! { ! if (TARGET_64BIT) ! insn = gen_movdi (gen_rtx_REG (Pmode, first), addr); ! else ! insn = gen_movsi (gen_rtx_REG (Pmode, first), addr); ! ! return insn; ! } ! ! insn = gen_load_multiple (gen_rtx_REG (Pmode, first), ! addr, ! GEN_INT (last - first + 1)); ! return insn; } /* Expand the prologue into a bunch of separate insns. */ *************** s390_function_epilogue (file, lsize) *** 3336,3353 **** void s390_emit_prologue () { - struct s390_frame frame; rtx insn, addr; rtx temp_reg; int i; /* Compute frame_info. */ ! s390_frame_info (&frame); /* Choose best register to use for temp use within prologue. */ ! if (frame.return_reg_saved_p && !has_hard_reg_initial_val (Pmode, RETURN_REGNUM) && get_pool_size () < S390_POOL_CHUNK_MAX / 2) temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM); --- 5139,5156 ---- void s390_emit_prologue () { rtx insn, addr; rtx temp_reg; + rtx pool_start_label, pool_end_label; int i; /* Compute frame_info. */ ! s390_frame_info (); /* Choose best register to use for temp use within prologue. */ ! if (!current_function_is_leaf && !has_hard_reg_initial_val (Pmode, RETURN_REGNUM) && get_pool_size () < S390_POOL_CHUNK_MAX / 2) temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM); *************** s390_emit_prologue () *** 3356,3430 **** /* Save call saved gprs. */ ! if (frame.first_save_gpr != -1) ! { ! addr = plus_constant (stack_pointer_rtx, ! frame.first_save_gpr * UNITS_PER_WORD); ! addr = gen_rtx_MEM (Pmode, addr); ! set_mem_alias_set (addr, s390_sr_alias_set); ! ! if (frame.first_save_gpr != frame.last_save_gpr ) ! { ! insn = emit_insn (gen_store_multiple (addr, ! gen_rtx_REG (Pmode, frame.first_save_gpr), ! GEN_INT (frame.last_save_gpr ! - frame.first_save_gpr + 1))); ! ! /* We need to set the FRAME_RELATED flag on all SETs ! inside the store-multiple pattern. ! ! However, we must not emit DWARF records for registers 2..5 ! if they are stored for use by variable arguments ... ! ! ??? Unfortunately, it is not enough to simply not the the ! FRAME_RELATED flags for those SETs, because the first SET ! of the PARALLEL is always treated as if it had the flag ! set, even if it does not. Therefore we emit a new pattern ! without those registers as REG_FRAME_RELATED_EXPR note. */ ! ! if (frame.first_save_gpr >= 6) ! { ! rtx pat = PATTERN (insn); ! ! for (i = 0; i < XVECLEN (pat, 0); i++) ! if (GET_CODE (XVECEXP (pat, 0, i)) == SET) ! RTX_FRAME_RELATED_P (XVECEXP (pat, 0, i)) = 1; ! ! RTX_FRAME_RELATED_P (insn) = 1; ! } ! else if (frame.last_save_gpr >= 6) ! { ! rtx note, naddr; ! naddr = plus_constant (stack_pointer_rtx, 6 * UNITS_PER_WORD); ! note = gen_store_multiple (gen_rtx_MEM (Pmode, naddr), ! gen_rtx_REG (Pmode, 6), ! GEN_INT (frame.last_save_gpr - 6 + 1)); ! REG_NOTES (insn) = ! gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, ! note, REG_NOTES (insn)); ! ! for (i = 0; i < XVECLEN (note, 0); i++) ! if (GET_CODE (XVECEXP (note, 0, i)) == SET) ! RTX_FRAME_RELATED_P (XVECEXP (note, 0, i)) = 1; ! RTX_FRAME_RELATED_P (insn) = 1; ! } ! } ! else ! { ! insn = emit_move_insn (addr, ! gen_rtx_REG (Pmode, frame.first_save_gpr)); ! RTX_FRAME_RELATED_P (insn) = 1; ! } ! } ! /* Dump constant pool and set constant pool register (13). */ ! ! insn = emit_insn (gen_lit ()); /* Save fprs for variable args. */ ! if (current_function_stdarg || current_function_varargs) { /* Save fpr 0 and 2. */ --- 5159,5184 ---- /* Save call saved gprs. */ ! insn = save_gprs (stack_pointer_rtx, 0, ! cfun->machine->first_save_gpr, cfun->machine->last_save_gpr); ! emit_insn (insn); ! /* Dump constant pool and set constant pool register. */ ! pool_start_label = gen_label_rtx(); ! pool_end_label = gen_label_rtx(); ! cfun->machine->literal_pool_label = pool_start_label; ! ! if (TARGET_64BIT) ! insn = emit_insn (gen_literal_pool_64 (gen_rtx_REG (Pmode, BASE_REGISTER), ! pool_start_label, pool_end_label)); ! else ! insn = emit_insn (gen_literal_pool_31 (gen_rtx_REG (Pmode, BASE_REGISTER), ! pool_start_label, pool_end_label)); /* Save fprs for variable args. */ ! if (current_function_stdarg) { /* Save fpr 0 and 2. */ *************** s390_emit_prologue () *** 3445,3456 **** if (!TARGET_64BIT) { /* Save fpr 4 and 6. */ ! if (regs_ever_live[18]) { insn = save_fpr (stack_pointer_rtx, STACK_POINTER_OFFSET - 16, 18); RTX_FRAME_RELATED_P (insn) = 1; } ! if (regs_ever_live[19]) { insn = save_fpr (stack_pointer_rtx, STACK_POINTER_OFFSET - 8, 19); RTX_FRAME_RELATED_P (insn) = 1; --- 5199,5210 ---- if (!TARGET_64BIT) { /* Save fpr 4 and 6. */ ! if (regs_ever_live[18] && !global_regs[18]) { insn = save_fpr (stack_pointer_rtx, STACK_POINTER_OFFSET - 16, 18); RTX_FRAME_RELATED_P (insn) = 1; } ! if (regs_ever_live[19] && !global_regs[19]) { insn = save_fpr (stack_pointer_rtx, STACK_POINTER_OFFSET - 8, 19); RTX_FRAME_RELATED_P (insn) = 1; *************** s390_emit_prologue () *** 3459,3479 **** /* Decrement stack pointer. */ ! if (frame.frame_size > 0) { ! rtx frame_off = GEN_INT (-frame.frame_size); /* Save incoming stack pointer into temp reg. */ ! if (TARGET_BACKCHAIN || frame.save_fprs_p) { insn = emit_insn (gen_move_insn (temp_reg, stack_pointer_rtx)); } /* Substract frame size from stack pointer. */ ! frame_off = GEN_INT (-frame.frame_size); ! if (!CONST_OK_FOR_LETTER_P (-frame.frame_size, 'K')) frame_off = force_const_mem (Pmode, frame_off); insn = emit_insn (gen_add2_insn (stack_pointer_rtx, frame_off)); --- 5213,5233 ---- /* Decrement stack pointer. */ ! if (cfun->machine->frame_size > 0) { ! rtx frame_off = GEN_INT (-cfun->machine->frame_size); /* Save incoming stack pointer into temp reg. */ ! if (TARGET_BACKCHAIN || cfun->machine->save_fprs_p) { insn = emit_insn (gen_move_insn (temp_reg, stack_pointer_rtx)); } /* Substract frame size from stack pointer. */ ! frame_off = GEN_INT (-cfun->machine->frame_size); ! if (!CONST_OK_FOR_LETTER_P (-cfun->machine->frame_size, 'K')) frame_off = force_const_mem (Pmode, frame_off); insn = emit_insn (gen_add2_insn (stack_pointer_rtx, frame_off)); *************** s390_emit_prologue () *** 3482,3488 **** gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, gen_rtx_SET (VOIDmode, stack_pointer_rtx, gen_rtx_PLUS (Pmode, stack_pointer_rtx, ! GEN_INT (-frame.frame_size))), REG_NOTES (insn)); /* Set backchain. */ --- 5236,5242 ---- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, gen_rtx_SET (VOIDmode, stack_pointer_rtx, gen_rtx_PLUS (Pmode, stack_pointer_rtx, ! GEN_INT (-cfun->machine->frame_size))), REG_NOTES (insn)); /* Set backchain. */ *************** s390_emit_prologue () *** 3493,3511 **** set_mem_alias_set (addr, s390_sr_alias_set); insn = emit_insn (gen_move_insn (addr, temp_reg)); } } /* Save fprs 8 - 15 (64 bit ABI). */ ! if (frame.save_fprs_p) { insn = emit_insn (gen_add2_insn (temp_reg, GEN_INT(-64))); for (i = 24; i < 32; i++) ! if (regs_ever_live[i]) { rtx addr = plus_constant (stack_pointer_rtx, ! frame.frame_size - 64 + (i-24)*8); insn = save_fpr (temp_reg, (i-24)*8, i); RTX_FRAME_RELATED_P (insn) = 1; --- 5247,5275 ---- set_mem_alias_set (addr, s390_sr_alias_set); insn = emit_insn (gen_move_insn (addr, temp_reg)); } + + /* If we support asynchronous exceptions (e.g. for Java), + we need to make sure the backchain pointer is set up + before any possibly trapping memory access. */ + + if (TARGET_BACKCHAIN && flag_non_call_exceptions) + { + addr = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode)); + emit_insn (gen_rtx_CLOBBER (VOIDmode, addr)); + } } /* Save fprs 8 - 15 (64 bit ABI). */ ! if (cfun->machine->save_fprs_p) { insn = emit_insn (gen_add2_insn (temp_reg, GEN_INT(-64))); for (i = 24; i < 32; i++) ! if (regs_ever_live[i] && !global_regs[i]) { rtx addr = plus_constant (stack_pointer_rtx, ! cfun->machine->frame_size - 64 + (i-24)*8); insn = save_fpr (temp_reg, (i-24)*8, i); RTX_FRAME_RELATED_P (insn) = 1; *************** s390_emit_prologue () *** 3520,3526 **** /* Set frame pointer, if needed. */ ! if (frame.frame_pointer_p) { insn = emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx); RTX_FRAME_RELATED_P (insn) = 1; --- 5284,5290 ---- /* Set frame pointer, if needed. */ ! if (frame_pointer_needed) { insn = emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx); RTX_FRAME_RELATED_P (insn) = 1; *************** s390_emit_prologue () *** 3528,3534 **** /* Set up got pointer, if needed. */ ! if (current_function_uses_pic_offset_table) { rtx got_symbol = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); SYMBOL_REF_FLAG (got_symbol) = 1; --- 5292,5298 ---- /* Set up got pointer, if needed. */ ! if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]) { rtx got_symbol = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); SYMBOL_REF_FLAG (got_symbol) = 1; *************** s390_emit_prologue () *** 3566,3591 **** void s390_emit_epilogue () { - struct s390_frame frame; rtx frame_pointer, return_reg; ! int area_bottom, area_top, offset; rtvec p; - /* Compute frame_info. */ - - s390_frame_info (&frame); - /* Check whether to use frame or stack pointer for restore. */ ! frame_pointer = frame.frame_pointer_p ? hard_frame_pointer_rtx : stack_pointer_rtx; /* Compute which parts of the save area we need to access. */ ! if (frame.first_restore_gpr != -1) { ! area_bottom = frame.first_restore_gpr * UNITS_PER_WORD; ! area_top = (frame.last_save_gpr + 1) * UNITS_PER_WORD; } else { --- 5330,5350 ---- void s390_emit_epilogue () { rtx frame_pointer, return_reg; ! int area_bottom, area_top, offset = 0; rtvec p; /* Check whether to use frame or stack pointer for restore. */ ! frame_pointer = frame_pointer_needed ? hard_frame_pointer_rtx : stack_pointer_rtx; /* Compute which parts of the save area we need to access. */ ! if (cfun->machine->first_restore_gpr != -1) { ! area_bottom = cfun->machine->first_restore_gpr * UNITS_PER_WORD; ! area_top = (cfun->machine->last_save_gpr + 1) * UNITS_PER_WORD; } else { *************** s390_emit_epilogue () *** 3595,3601 **** if (TARGET_64BIT) { ! if (frame.save_fprs_p) { if (area_bottom > -64) area_bottom = -64; --- 5354,5360 ---- if (TARGET_64BIT) { ! if (cfun->machine->save_fprs_p) { if (area_bottom > -64) area_bottom = -64; *************** s390_emit_epilogue () *** 3605,3618 **** } else { ! if (regs_ever_live[18]) { if (area_bottom > STACK_POINTER_OFFSET - 16) area_bottom = STACK_POINTER_OFFSET - 16; if (area_top < STACK_POINTER_OFFSET - 8) area_top = STACK_POINTER_OFFSET - 8; } ! if (regs_ever_live[19]) { if (area_bottom > STACK_POINTER_OFFSET - 8) area_bottom = STACK_POINTER_OFFSET - 8; --- 5364,5377 ---- } else { ! if (regs_ever_live[18] && !global_regs[18]) { if (area_bottom > STACK_POINTER_OFFSET - 16) area_bottom = STACK_POINTER_OFFSET - 16; if (area_top < STACK_POINTER_OFFSET - 8) area_top = STACK_POINTER_OFFSET - 8; } ! if (regs_ever_live[19] && !global_regs[19]) { if (area_bottom > STACK_POINTER_OFFSET - 8) area_bottom = STACK_POINTER_OFFSET - 8; *************** s390_emit_epilogue () *** 3628,3645 **** { /* Nothing to restore. */ } ! else if (frame.frame_size + area_bottom >= 0 ! && frame.frame_size + area_top <= 4096) { /* Area is in range. */ ! offset = frame.frame_size; } else { rtx insn, frame_off; offset = area_bottom < 0 ? -area_bottom : 0; ! frame_off = GEN_INT (frame.frame_size - offset); if (!CONST_OK_FOR_LETTER_P (INTVAL (frame_off), 'K')) frame_off = force_const_mem (Pmode, frame_off); --- 5387,5404 ---- { /* Nothing to restore. */ } ! else if (cfun->machine->frame_size + area_bottom >= 0 ! && cfun->machine->frame_size + area_top <= 4096) { /* Area is in range. */ ! offset = cfun->machine->frame_size; } else { rtx insn, frame_off; offset = area_bottom < 0 ? -area_bottom : 0; ! frame_off = GEN_INT (cfun->machine->frame_size - offset); if (!CONST_OK_FOR_LETTER_P (INTVAL (frame_off), 'K')) frame_off = force_const_mem (Pmode, frame_off); *************** s390_emit_epilogue () *** 3653,3659 **** { int i; ! if (frame.save_fprs_p) for (i = 24; i < 32; i++) if (regs_ever_live[i] && !global_regs[i]) restore_fpr (frame_pointer, --- 5412,5418 ---- { int i; ! if (cfun->machine->save_fprs_p) for (i = 24; i < 32; i++) if (regs_ever_live[i] && !global_regs[i]) restore_fpr (frame_pointer, *************** s390_emit_epilogue () *** 3673,3688 **** /* Restore call saved gprs. */ ! if (frame.first_restore_gpr != -1) { ! rtx addr; int i; /* Check for global register and save them to stack location from where they get restored. */ ! for (i = frame.first_restore_gpr; ! i <= frame.last_save_gpr; i++) { /* These registers are special and need to be --- 5432,5447 ---- /* Restore call saved gprs. */ ! if (cfun->machine->first_restore_gpr != -1) { ! rtx insn, addr; int i; /* Check for global register and save them to stack location from where they get restored. */ ! for (i = cfun->machine->first_restore_gpr; ! i <= cfun->machine->last_save_gpr; i++) { /* These registers are special and need to be *************** s390_emit_epilogue () *** 3690,3696 **** if (i == STACK_POINTER_REGNUM || i == RETURN_REGNUM || i == BASE_REGISTER ! || (flag_pic && i == PIC_OFFSET_TABLE_REGNUM)) continue; if (global_regs[i]) --- 5449,5455 ---- if (i == STACK_POINTER_REGNUM || i == RETURN_REGNUM || i == BASE_REGISTER ! || (flag_pic && i == (int)PIC_OFFSET_TABLE_REGNUM)) continue; if (global_regs[i]) *************** s390_emit_epilogue () *** 3706,3713 **** /* Fetch return address from stack before load multiple, this will do good for scheduling. */ ! if (frame.last_save_gpr >= RETURN_REGNUM ! && frame.first_restore_gpr < RETURN_REGNUM) { int return_regnum = find_unused_clobbered_reg(); if (!return_regnum) --- 5465,5471 ---- /* Fetch return address from stack before load multiple, this will do good for scheduling. */ ! if (!current_function_is_leaf) { int return_regnum = find_unused_clobbered_reg(); if (!return_regnum) *************** s390_emit_epilogue () *** 3727,3749 **** emit_insn (gen_blockage()); ! addr = plus_constant (frame_pointer, ! offset + frame.first_restore_gpr * UNITS_PER_WORD); ! addr = gen_rtx_MEM (Pmode, addr); ! set_mem_alias_set (addr, s390_sr_alias_set); ! ! if (frame.first_restore_gpr != frame.last_save_gpr) ! { ! emit_insn (gen_load_multiple ( ! gen_rtx_REG (Pmode, frame.first_restore_gpr), ! addr, ! GEN_INT (frame.last_save_gpr - frame.first_restore_gpr + 1))); ! } ! else ! { ! emit_move_insn (gen_rtx_REG (Pmode, frame.first_restore_gpr), ! addr); ! } } /* Return to caller. */ --- 5485,5494 ---- emit_insn (gen_blockage()); ! insn = restore_gprs (frame_pointer, offset, ! cfun->machine->first_restore_gpr, ! cfun->machine->last_save_gpr); ! emit_insn (insn); } /* Return to caller. */ *************** s390_build_va_list () *** 3906,3912 **** { tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl; ! record = make_lang_type (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); --- 5651,5657 ---- { tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl; ! record = (*lang_hooks.types.make_type) (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); *************** s390_build_va_list () *** 3939,3947 **** } /* Implement va_start by filling the va_list structure VALIST. ! STDARG_P is true if implementing __builtin_stdarg_va_start, ! false if implementing __builtin_varargs_va_start. NEXTARG ! points to the first anonymous stack argument. The following global variables are used to initialize the va_list structure: --- 5684,5691 ---- } /* Implement va_start by filling the va_list structure VALIST. ! STDARG_P is always true, and ignored. ! NEXTARG points to the first anonymous stack argument. The following global variables are used to initialize the va_list structure: *************** s390_build_va_list () *** 3953,3960 **** (relative to the virtual arg pointer). */ void ! s390_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg ATTRIBUTE_UNUSED; { --- 5697,5703 ---- (relative to the virtual arg pointer). */ void ! s390_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { *************** s390_va_start (stdarg_p, valist, nextarg *** 3992,3999 **** off = INTVAL (current_function_arg_offset_rtx); off = off < 0 ? 0 : off; - if (! stdarg_p) - off = off > 0 ? off - UNITS_PER_WORD : off; if (TARGET_DEBUG_ARG) fprintf (stderr, "va_start: n_gpr = %d, n_fpr = %d off %d\n", (int)n_gpr, (int)n_fpr, off); --- 5735,5740 ---- *************** s390_va_arg (valist, type) *** 4200,4205 **** --- 5941,6074 ---- } + /* Builtins. */ + + enum s390_builtin + { + S390_BUILTIN_THREAD_POINTER, + S390_BUILTIN_SET_THREAD_POINTER, + + S390_BUILTIN_max + }; + + static unsigned int const code_for_builtin_64[S390_BUILTIN_max] = { + CODE_FOR_get_tp_64, + CODE_FOR_set_tp_64 + }; + + static unsigned int const code_for_builtin_31[S390_BUILTIN_max] = { + CODE_FOR_get_tp_31, + CODE_FOR_set_tp_31 + }; + + static void + s390_init_builtins () + { + tree ftype; + + ftype = build_function_type (ptr_type_node, void_list_node); + builtin_function ("__builtin_thread_pointer", ftype, + S390_BUILTIN_THREAD_POINTER, BUILT_IN_MD, + NULL, NULL_TREE); + + ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); + builtin_function ("__builtin_set_thread_pointer", ftype, + S390_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD, + NULL, NULL_TREE); + } + + /* Expand an expression EXP that calls a built-in function, + with result going to TARGET if that's convenient + (and in mode MODE if that's convenient). + SUBTARGET may be used as the target for computing one of EXP's operands. + IGNORE is nonzero if the value is to be ignored. */ + + static rtx + s390_expand_builtin (exp, target, subtarget, mode, ignore) + tree exp; + rtx target; + rtx subtarget ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + int ignore ATTRIBUTE_UNUSED; + { + #define MAX_ARGS 2 + + unsigned int const *code_for_builtin = + TARGET_64BIT ? code_for_builtin_64 : code_for_builtin_31; + + tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); + unsigned int fcode = DECL_FUNCTION_CODE (fndecl); + tree arglist = TREE_OPERAND (exp, 1); + enum insn_code icode; + rtx op[MAX_ARGS], pat; + int arity; + bool nonvoid; + + if (fcode >= S390_BUILTIN_max) + internal_error ("bad builtin fcode"); + icode = code_for_builtin[fcode]; + if (icode == 0) + internal_error ("bad builtin fcode"); + + nonvoid = TREE_TYPE (TREE_TYPE (fndecl)) != void_type_node; + + for (arglist = TREE_OPERAND (exp, 1), arity = 0; + arglist; + arglist = TREE_CHAIN (arglist), arity++) + { + const struct insn_operand_data *insn_op; + + tree arg = TREE_VALUE (arglist); + if (arg == error_mark_node) + return NULL_RTX; + if (arity > MAX_ARGS) + return NULL_RTX; + + insn_op = &insn_data[icode].operand[arity + nonvoid]; + + op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, 0); + + if (!(*insn_op->predicate) (op[arity], insn_op->mode)) + op[arity] = copy_to_mode_reg (insn_op->mode, op[arity]); + } + + if (nonvoid) + { + enum machine_mode tmode = insn_data[icode].operand[0].mode; + if (!target + || GET_MODE (target) != tmode + || !(*insn_data[icode].operand[0].predicate) (target, tmode)) + target = gen_reg_rtx (tmode); + } + + switch (arity) + { + case 0: + pat = GEN_FCN (icode) (target); + break; + case 1: + if (nonvoid) + pat = GEN_FCN (icode) (target, op[0]); + else + pat = GEN_FCN (icode) (op[0]); + break; + case 2: + pat = GEN_FCN (icode) (target, op[0], op[1]); + break; + default: + abort (); + } + if (!pat) + return NULL_RTX; + emit_insn (pat); + + if (nonvoid) + return target; + else + return const0_rtx; + } + + /* Output assembly code for the trampoline template to stdio stream FILE. *************** s390_function_profiler (file, labelno) *** 4285,4291 **** rtx op[7]; char label[128]; ! sprintf (label, "%sP%d", LPREFIX, labelno); fprintf (file, "# function profiler \n"); --- 6154,6160 ---- rtx op[7]; char label[128]; ! ASM_GENERATE_INTERNAL_LABEL (label, "LP", labelno); fprintf (file, "# function profiler \n"); *************** s390_function_profiler (file, labelno) *** 4344,4346 **** --- 6213,6534 ---- } } + /* Select section for constant in constant pool. In 32-bit mode, + constants go in the function section; in 64-bit mode in .rodata. */ + + static void + s390_select_rtx_section (mode, x, align) + enum machine_mode mode ATTRIBUTE_UNUSED; + rtx x ATTRIBUTE_UNUSED; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + if (TARGET_64BIT) + readonly_data_section (); + else + function_section (current_function_decl); + } + + /* Encode symbol attributes (local vs. global, tls model) of a SYMBOL_REF + into its name and SYMBOL_REF_FLAG. */ + + static void + s390_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + bool local_p = (*targetm.binds_local_p) (decl); + rtx rtl, symbol; + + rtl = DECL_P (decl) ? DECL_RTL (decl) : TREE_CST_RTL (decl); + if (GET_CODE (rtl) != MEM) + return; + symbol = XEXP (rtl, 0); + if (GET_CODE (symbol) != SYMBOL_REF) + return; + + /* When using PIC, SYMBOL_REF_FLAG marks non-global symbols + that can be accessed directly. */ + if (flag_pic) + SYMBOL_REF_FLAG (symbol) = local_p; + + /* Encode thread-local data with %[GLil] for "global dynamic", + "local dynamic", "initial exec" or "local exec" TLS models, + respectively. */ + + if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl)) + { + const char *symbol_str = XSTR (symbol, 0); + char *newstr; + size_t len; + enum tls_model kind = decl_tls_model (decl); + + if (!flag_pic) + { + /* We don't allow non-pic code for shared libraries, + so don't generate GD/LD TLS models for non-pic code. */ + switch (kind) + { + case TLS_MODEL_GLOBAL_DYNAMIC: + kind = TLS_MODEL_INITIAL_EXEC; break; + case TLS_MODEL_LOCAL_DYNAMIC: + kind = TLS_MODEL_LOCAL_EXEC; break; + default: + break; + } + } + + if (symbol_str[0] == '%') + { + if (symbol_str[1] == tls_model_chars[kind]) + return; + symbol_str += 2; + } + len = strlen (symbol_str) + 1; + newstr = alloca (len + 2); + + newstr[0] = '%'; + newstr[1] = tls_model_chars[kind]; + memcpy (newstr + 2, symbol_str, len); + + XSTR (symbol, 0) = ggc_alloc_string (newstr, len + 2 - 1); + } + + /* If a variable has a forced alignment to < 2 bytes, mark it + with '@' to prevent it from being used as LARL operand. */ + + else if (TREE_CODE (decl) == VAR_DECL + && DECL_USER_ALIGN (decl) && DECL_ALIGN (decl) < 16 + && XSTR (symbol, 0)[0] != '@') + { + const char *symbol_str = XSTR (symbol, 0); + size_t len = strlen (symbol_str) + 1; + char *newstr = alloca (len + 1); + + newstr[0] = '@'; + memcpy (newstr + 1, symbol_str, len); + + XSTR (symbol, 0) = ggc_alloc_string (newstr, len + 1 - 1); + } + } + + /* Undo the above when printing symbol names. */ + + static const char * + s390_strip_name_encoding (str) + const char *str; + { + if (str[0] == '%') + str += 2; + if (str[0] == '@') + str += 1; + if (str[0] == '*') + str += 1; + return str; + } + + /* Output thunk to FILE that implements a C++ virtual function call (with + multiple inheritance) to FUNCTION. The thunk adjusts the this pointer + by DELTA, and unless VCALL_OFFSET is zero, applies an additional adjustment + stored at VCALL_OFFSET in the vtable whose address is located at offset 0 + relative to the resulting this pointer. */ + + static void + s390_output_mi_thunk (file, thunk, delta, vcall_offset, function) + FILE *file; + tree thunk ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset; + tree function; + { + rtx op[9]; + + /* Operand 0 is the target function. */ + op[0] = XEXP (DECL_RTL (function), 0); + if (flag_pic && !SYMBOL_REF_FLAG (op[0])) + { + op[0] = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op[0]), 113); + op[0] = gen_rtx_CONST (Pmode, op[0]); + } + + /* Operand 1 is the 'this' pointer. */ + if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)))) + op[1] = gen_rtx_REG (Pmode, 3); + else + op[1] = gen_rtx_REG (Pmode, 2); + + /* Operand 2 is the delta. */ + op[2] = GEN_INT (delta); + + /* Operand 3 is the vcall_offset. */ + op[3] = GEN_INT (vcall_offset); + + /* Operand 4 is the temporary register. */ + op[4] = gen_rtx_REG (Pmode, 1); + + /* Operands 5 to 8 can be used as labels. */ + op[5] = NULL_RTX; + op[6] = NULL_RTX; + op[7] = NULL_RTX; + op[8] = NULL_RTX; + + /* Generate code. */ + if (TARGET_64BIT) + { + /* Setup literal pool pointer if required. */ + if (!CONST_OK_FOR_LETTER_P (delta, 'K') + || !CONST_OK_FOR_LETTER_P (vcall_offset, 'K')) + { + op[5] = gen_label_rtx (); + output_asm_insn ("larl\t%4,%5", op); + } + + /* Add DELTA to this pointer. */ + if (delta) + { + if (CONST_OK_FOR_LETTER_P (delta, 'J')) + output_asm_insn ("la\t%1,%2(%1)", op); + else if (CONST_OK_FOR_LETTER_P (delta, 'K')) + output_asm_insn ("aghi\t%1,%2", op); + else + { + op[6] = gen_label_rtx (); + output_asm_insn ("agf\t%1,%6-%5(%4)", op); + } + } + + /* Perform vcall adjustment. */ + if (vcall_offset) + { + if (CONST_OK_FOR_LETTER_P (vcall_offset, 'J')) + { + output_asm_insn ("lg\t%4,0(%1)", op); + output_asm_insn ("ag\t%1,%3(%4)", op); + } + else if (CONST_OK_FOR_LETTER_P (vcall_offset, 'K')) + { + output_asm_insn ("lghi\t%4,%3", op); + output_asm_insn ("ag\t%4,0(%1)", op); + output_asm_insn ("ag\t%1,0(%4)", op); + } + else + { + op[7] = gen_label_rtx (); + output_asm_insn ("llgf\t%4,%7-%5(%4)", op); + output_asm_insn ("ag\t%4,0(%1)", op); + output_asm_insn ("ag\t%1,0(%4)", op); + } + } + + /* Jump to target. */ + output_asm_insn ("jg\t%0", op); + + /* Output literal pool if required. */ + if (op[5]) + { + output_asm_insn (".align\t4", op); + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[5])); + } + if (op[6]) + { + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[6])); + output_asm_insn (".long\t%2", op); + } + if (op[7]) + { + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[7])); + output_asm_insn (".long\t%3", op); + } + } + else + { + /* Setup base pointer if required. */ + if (!vcall_offset + || !CONST_OK_FOR_LETTER_P (delta, 'K') + || !CONST_OK_FOR_LETTER_P (vcall_offset, 'K')) + { + op[5] = gen_label_rtx (); + output_asm_insn ("basr\t%4,0", op); + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[5])); + } + + /* Add DELTA to this pointer. */ + if (delta) + { + if (CONST_OK_FOR_LETTER_P (delta, 'J')) + output_asm_insn ("la\t%1,%2(%1)", op); + else if (CONST_OK_FOR_LETTER_P (delta, 'K')) + output_asm_insn ("ahi\t%1,%2", op); + else + { + op[6] = gen_label_rtx (); + output_asm_insn ("a\t%1,%6-%5(%4)", op); + } + } + + /* Perform vcall adjustment. */ + if (vcall_offset) + { + if (CONST_OK_FOR_LETTER_P (vcall_offset, 'J')) + { + output_asm_insn ("lg\t%4,0(%1)", op); + output_asm_insn ("a\t%1,%3(%4)", op); + } + else if (CONST_OK_FOR_LETTER_P (vcall_offset, 'K')) + { + output_asm_insn ("lhi\t%4,%3", op); + output_asm_insn ("a\t%4,0(%1)", op); + output_asm_insn ("a\t%1,0(%4)", op); + } + else + { + op[7] = gen_label_rtx (); + output_asm_insn ("l\t%4,%7-%5(%4)", op); + output_asm_insn ("a\t%4,0(%1)", op); + output_asm_insn ("a\t%1,0(%4)", op); + } + + /* We had to clobber the base pointer register. + Re-setup the base pointer (with a different base). */ + op[5] = gen_label_rtx (); + output_asm_insn ("basr\t%4,0", op); + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[5])); + } + + /* Jump to target. */ + op[8] = gen_label_rtx (); + if (!flag_pic) + output_asm_insn ("l\t%4,%8-%5(%4)", op); + else + output_asm_insn ("a\t%4,%8-%5(%4)", op); + output_asm_insn ("br\t%4", op); + + /* Output literal pool. */ + output_asm_insn (".align\t4", op); + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[8])); + if (!flag_pic) + output_asm_insn (".long\t%0", op); + else + output_asm_insn (".long\t%0-%5", op); + + if (op[6]) + { + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[6])); + output_asm_insn (".long\t%2", op); + } + if (op[7]) + { + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (op[7])); + output_asm_insn (".long\t%3", op); + } + } + } + + /* How to allocate a 'struct machine_function'. */ + + static struct machine_function * + s390_init_machine_status () + { + return ggc_alloc_cleared (sizeof (struct machine_function)); + } + + #include "gt-s390.h" diff -Nrc3pad gcc-3.2.3/gcc/config/s390/s390.h gcc-3.3/gcc/config/s390/s390.h *** gcc-3.2.3/gcc/config/s390/s390.h 2002-06-11 14:06:37.000000000 +0000 --- gcc-3.3/gcc/config/s390/s390.h 2003-04-29 14:31:53.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for IBM S/390 ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Hartmut Penner (hpenner@de.ibm.com) and Ulrich Weigand (uweigand@de.ibm.com). This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for IBM S/390 ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hartmut Penner (hpenner@de.ibm.com) and Ulrich Weigand (uweigand@de.ibm.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 22,34 **** #ifndef _S390_H #define _S390_H ! extern int flag_pic; - /* Run-time compilation parameters selecting different hardware subsets. */ ! extern int target_flags; ! /* Target macros checked at runtime of compiler. */ #define TARGET_HARD_FLOAT (target_flags & 1) #define TARGET_SOFT_FLOAT (!(target_flags & 1)) --- 22,50 ---- #ifndef _S390_H #define _S390_H ! /* Override the __fixdfdi etc. routines when building libgcc2. ! ??? This should be done in a cleaner way ... */ ! #if defined (IN_LIBGCC2) && !defined (__s390x__) ! #include ! #endif ! /* Run-time target specification. */ ! /* Target CPU builtins. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_assert ("cpu=s390"); \ ! builtin_assert ("machine=s390"); \ ! builtin_define ("__s390__"); \ ! if (TARGET_64BIT) \ ! builtin_define ("__s390x__"); \ ! } \ ! while (0) ! ! /* Optional target features. */ ! extern int target_flags; #define TARGET_HARD_FLOAT (target_flags & 1) #define TARGET_SOFT_FLOAT (!(target_flags & 1)) *************** extern int target_flags; *** 38,63 **** #define TARGET_64BIT (target_flags & 16) #define TARGET_MVCLE (target_flags & 32) #ifdef DEFAULT_TARGET_64BIT #define TARGET_DEFAULT 0x13 - #define TARGET_VERSION fprintf (stderr, " (zSeries)"); #else #define TARGET_DEFAULT 0x3 - #define TARGET_VERSION fprintf (stderr, " (S/390)"); #endif - - /* Macro to define tables used to set the flags. This is a list in braces - of pairs in braces, each pair being { "NAME", VALUE } - where VALUE is the bits to set or minus the bits to clear. - An empty string NAME is used to identify the default VALUE. */ - #define TARGET_SWITCHES \ { { "hard-float", 1, N_("Use hardware fp")}, \ { "soft-float", -1, N_("Don't use hardware fp")}, \ { "backchain", 2, N_("Set backchain")}, \ { "no-backchain", -2, N_("Don't set backchain (faster, but debug harder")}, \ ! { "small-exec", 4, N_("Use bras for execucable < 64k")}, \ { "no-small-exec",-4, N_("Don't use bras")}, \ { "debug", 8, N_("Additional debug prints")}, \ { "no-debug", -8, N_("Don't print additional debug prints")}, \ --- 54,75 ---- #define TARGET_64BIT (target_flags & 16) #define TARGET_MVCLE (target_flags & 32) + /* ??? Once this actually works, it could be made a runtime option. */ + #define TARGET_IBM_FLOAT 0 + #define TARGET_IEEE_FLOAT 1 + #ifdef DEFAULT_TARGET_64BIT #define TARGET_DEFAULT 0x13 #else #define TARGET_DEFAULT 0x3 #endif #define TARGET_SWITCHES \ { { "hard-float", 1, N_("Use hardware fp")}, \ { "soft-float", -1, N_("Don't use hardware fp")}, \ { "backchain", 2, N_("Set backchain")}, \ { "no-backchain", -2, N_("Don't set backchain (faster, but debug harder")}, \ ! { "small-exec", 4, N_("Use bras for executable < 64k")}, \ { "no-small-exec",-4, N_("Don't use bras")}, \ { "debug", 8, N_("Additional debug prints")}, \ { "no-debug", -8, N_("Don't print additional debug prints")}, \ *************** extern int target_flags; *** 67,163 **** { "no-mvcle", -32, N_("mvc&ex")}, \ { "", TARGET_DEFAULT, 0 } } ! /* Define this to change the optimizations performed by default. */ ! #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options(LEVEL, SIZE) ! /* Sometimes certain combinations of command options do not make sense ! on a particular target machine. You can define a macro ! `OVERRIDE_OPTIONS' to take account of this. This macro, if ! defined, is executed once just after all the command options have ! been parsed. */ #define OVERRIDE_OPTIONS override_options () - /* Defines for REAL_ARITHMETIC. */ - #define IEEE_FLOAT 1 - #define TARGET_IBM_FLOAT 0 - #define TARGET_IEEE_FLOAT 1 - - /* The current function count for create unique internal labels. */ - - extern int s390_function_count; ! /* The amount of space used for outgoing arguments. */ - extern int current_function_outgoing_args_size; /* Target machine storage layout. */ ! /* Define this if most significant bit is lowest numbered in instructions ! that operate on numbered bit-fields. */ ! #define BITS_BIG_ENDIAN 1 - - /* Define this if most significant byte of a word is the lowest numbered. */ - #define BYTES_BIG_ENDIAN 1 - - /* Define this if MS word of a multiword is the lowest numbered. */ - #define WORDS_BIG_ENDIAN 1 - /* Number of bits in an addressable storage unit. */ - - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. */ - - #define BITS_PER_WORD (TARGET_64BIT ? 64 : 32) - #define MAX_BITS_PER_WORD 64 - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) #define MIN_UNITS_PER_WORD 4 ! /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ ! ! #define POINTER_SIZE (TARGET_64BIT ? 64 : 32) ! ! /* A C expression for the size in bits of the type `short' on the ! target machine. If you don't define this, the default is half a ! word. (If this would be less than one storage unit, it is ! rounded up to one unit.) */ ! #define SHORT_TYPE_SIZE 16 ! ! /* A C expression for the size in bits of the type `int' on the ! target machine. If you don't define this, the default is one ! word. */ ! #define INT_TYPE_SIZE 32 ! ! /* A C expression for the size in bits of the type `long' on the ! target machine. If you don't define this, the default is one ! word. */ ! #define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32) ! #define MAX_LONG_TYPE_SIZE 64 ! ! /* A C expression for the size in bits of the type `long long' on the ! target machine. If you don't define this, the default is two ! words. */ ! #define LONG_LONG_TYPE_SIZE 64 ! ! /* Right now we only support two floating point formats, the ! 32 and 64 bit ieee formats. */ ! ! #define FLOAT_TYPE_SIZE 32 ! #define DOUBLE_TYPE_SIZE 64 ! #define LONG_DOUBLE_TYPE_SIZE 64 ! ! /* Define this macro if it is advisable to hold scalars in registers ! in a wider mode than that declared by the program. In such cases, ! the value is constrained to be within the bounds of the declared ! type, but kept valid in the wider mode. The signedness of the ! extension may differ from that of the type. */ #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ if (INTEGRAL_MODE_P (MODE) && \ --- 79,128 ---- { "no-mvcle", -32, N_("mvc&ex")}, \ { "", TARGET_DEFAULT, 0 } } ! /* Target version string. Overridden by the OS header. */ ! #ifdef DEFAULT_TARGET_64BIT ! #define TARGET_VERSION fprintf (stderr, " (zSeries)"); ! #else ! #define TARGET_VERSION fprintf (stderr, " (S/390)"); ! #endif ! /* Hooks to override options. */ ! #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options(LEVEL, SIZE) #define OVERRIDE_OPTIONS override_options () + /* Frame pointer is not used for debugging. */ + #define CAN_DEBUG_WITHOUT_FP ! /* In libgcc2, determine target settings as compile-time constants. */ ! #ifdef IN_LIBGCC2 ! #undef TARGET_64BIT ! #ifdef __s390x__ ! #define TARGET_64BIT 1 ! #else ! #define TARGET_64BIT 0 ! #endif ! #endif /* Target machine storage layout. */ ! /* Everything is big-endian. */ #define BITS_BIG_ENDIAN 1 #define BYTES_BIG_ENDIAN 1 #define WORDS_BIG_ENDIAN 1 /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) + #ifndef IN_LIBGCC2 #define MIN_UNITS_PER_WORD 4 + #endif + #define MAX_BITS_PER_WORD 64 ! /* Function arguments and return values are promoted to word size. */ ! #define PROMOTE_FUNCTION_ARGS ! #define PROMOTE_FUNCTION_RETURN ! #define PROMOTE_FOR_CALL_ONLY #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ if (INTEGRAL_MODE_P (MODE) && \ *************** if (INTEGRAL_MODE_P (MODE) && *** 165,273 **** (MODE) = Pmode; \ } - /* Defining PROMOTE_FUNCTION_ARGS eliminates some unnecessary zero/sign - extensions applied to char/short functions arguments. Defining - PROMOTE_FUNCTION_RETURN does the same for function returns. */ - - #define PROMOTE_FUNCTION_ARGS - #define PROMOTE_FUNCTION_RETURN - #define PROMOTE_FOR_CALL_ONLY - - /* Allocation boundary (in *bits*) for storing pointers in memory. */ - - #define POINTER_BOUNDARY 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - #define PARM_BOUNDARY (TARGET_64BIT ? 64 : 32) /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #define STACK_BOUNDARY 64 /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 32 /* There is no point aligning anything to a rounder boundary than this. */ - #define BIGGEST_ALIGNMENT 64 /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 32 /* Alignment on even addresses for LARL instruction. */ - #define CONSTANT_ALIGNMENT(EXP, ALIGN) (ALIGN) < 16 ? 16 : (ALIGN) - #define DATA_ALIGNMENT(TYPE, ALIGN) (ALIGN) < 16 ? 16 : (ALIGN) ! /* Define this if move instructions will actually fail to work when given ! unaligned data. */ ! #define STRICT_ALIGNMENT 0 ! /* real arithmetic */ ! ! #define REAL_ARITHMETIC /* Define target floating point format. */ - #undef TARGET_FLOAT_FORMAT - #ifdef IEEE_FLOAT - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - #else - #define TARGET_FLOAT_FORMAT IBM_FLOAT_FORMAT - #endif ! /* Define if special allocation order desired. */ ! #define REG_ALLOC_ORDER \ ! { 1, 2, 3, 4, 5, 0, 14, 13, 12, 11, 10, 9, 8, 7, 6, \ ! 16, 17, 18, 19, 20, 21, 22, 23, \ ! 24, 25, 26, 27, 28, 29, 30, 31, \ ! 15, 32, 33, 34 } ! /* Standard register usage. */ ! ! #define INT_REGNO_P(N) ( (int)(N) >= 0 && (N) < 16 ) ! #ifdef IEEE_FLOAT ! #define FLOAT_REGNO_P(N) ( (N) >= 16 && (N) < 32 ) ! #else ! #define FLOAT_REGNO_P(N) ( (N) >= 16 && (N) < 20 ) ! #endif ! #define CC_REGNO_P(N) ( (N) == 33 ) - /* Number of actual hardware registers. The hardware registers are - assigned numbers for the compiler from 0 to just below - FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. - For the 390, we give the data registers numbers 0-15, - and the floating point registers numbers 16-19. - G5 and following have 16 IEEE floating point register, - which get numbers 16-31. */ ! #define FIRST_PSEUDO_REGISTER 35 ! /* Number of hardware registers that go into the DWARF-2 unwind info. ! If not defined, equals FIRST_PSEUDO_REGISTER. */ ! #define DWARF_FRAME_REGISTERS 34 ! /* The following register have a fix usage ! GPR 12: GOT register points to the GOT, setup in prologue, ! GOT contains pointer to variables in shared libraries ! GPR 13: Base register setup in prologue to point to the ! literal table of each function ! GPR 14: Return registers holds the return address ! GPR 15: Stack pointer */ - #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM) #define BASE_REGISTER 13 #define RETURN_REGNUM 14 ! #define STACK_POINTER_REGNUM 15 #define FIXED_REGISTERS \ { 0, 0, 0, 0, \ --- 130,238 ---- (MODE) = Pmode; \ } /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY (TARGET_64BIT ? 64 : 32) /* Boundary (in *bits*) on which stack pointer should be aligned. */ #define STACK_BOUNDARY 64 /* Allocation boundary (in *bits*) for the code of a function. */ #define FUNCTION_BOUNDARY 32 /* There is no point aligning anything to a rounder boundary than this. */ #define BIGGEST_ALIGNMENT 64 /* Alignment of field after `int : 0' in a structure. */ #define EMPTY_FIELD_BOUNDARY 32 /* Alignment on even addresses for LARL instruction. */ #define CONSTANT_ALIGNMENT(EXP, ALIGN) (ALIGN) < 16 ? 16 : (ALIGN) #define DATA_ALIGNMENT(TYPE, ALIGN) (ALIGN) < 16 ? 16 : (ALIGN) ! /* Alignment is not required by the hardware. */ #define STRICT_ALIGNMENT 0 ! /* Mode of stack savearea. ! FUNCTION is VOIDmode because calling convention maintains SP. ! BLOCK needs Pmode for SP. ! NONLOCAL needs twice Pmode to maintain both backchain and SP. */ ! #define STACK_SAVEAREA_MODE(LEVEL) \ ! (LEVEL == SAVE_FUNCTION ? VOIDmode \ ! : LEVEL == SAVE_NONLOCAL ? (TARGET_64BIT ? TImode : DImode) : Pmode) /* Define target floating point format. */ + #define TARGET_FLOAT_FORMAT \ + (TARGET_IEEE_FLOAT? IEEE_FLOAT_FORMAT : IBM_FLOAT_FORMAT) ! /* Type layout. */ ! /* Sizes in bits of the source language data types. */ ! #define SHORT_TYPE_SIZE 16 ! #define INT_TYPE_SIZE 32 ! #define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32) ! #define MAX_LONG_TYPE_SIZE 64 ! #define LONG_LONG_TYPE_SIZE 64 ! #define FLOAT_TYPE_SIZE 32 ! #define DOUBLE_TYPE_SIZE 64 ! #define LONG_DOUBLE_TYPE_SIZE 64 /* ??? Should support extended format. */ ! /* We use "unsigned char" as default. */ ! #define DEFAULT_SIGNED_CHAR 0 ! /* Register usage. */ ! /* We have 16 general purpose registers (registers 0-15), ! and 16 floating point registers (registers 16-31). ! (On non-IEEE machines, we have only 4 fp registers.) ! ! Amongst the general purpose registers, some are used ! for specific purposes: ! GPR 11: Hard frame pointer (if needed) ! GPR 12: Global offset table pointer (if needed) ! GPR 13: Literal pool base register ! GPR 14: Return address register ! GPR 15: Stack pointer ! ! Registers 32-34 are 'fake' hard registers that do not ! correspond to actual hardware: ! Reg 32: Argument pointer ! Reg 33: Condition code ! Reg 34: Frame pointer */ ! #define FIRST_PSEUDO_REGISTER 35 ! /* Standard register usage. */ ! #define GENERAL_REGNO_P(N) ((int)(N) >= 0 && (N) < 16) ! #define ADDR_REGNO_P(N) ((N) >= 1 && (N) < 16) ! #define FP_REGNO_P(N) ((N) >= 16 && (N) < (TARGET_IEEE_FLOAT? 32 : 20)) ! #define CC_REGNO_P(N) ((N) == 33) ! #define FRAME_REGNO_P(N) ((N) == 32 || (N) == 34) ! ! #define GENERAL_REG_P(X) (REG_P (X) && GENERAL_REGNO_P (REGNO (X))) ! #define ADDR_REG_P(X) (REG_P (X) && ADDR_REGNO_P (REGNO (X))) ! #define FP_REG_P(X) (REG_P (X) && FP_REGNO_P (REGNO (X))) ! #define CC_REG_P(X) (REG_P (X) && CC_REGNO_P (REGNO (X))) ! #define FRAME_REG_P(X) (REG_P (X) && FRAME_REGNO_P (REGNO (X))) #define BASE_REGISTER 13 #define RETURN_REGNUM 14 ! #define CC_REGNUM 33 ! ! /* Set up fixed registers and calling convention: ! ! GPRs 0-5 are always call-clobbered, ! GPRs 6-15 are always call-saved. ! GPR 12 is fixed if used as GOT pointer. ! GPR 13 is always fixed (as literal pool pointer). ! GPR 14 is always fixed (as return address). ! GPR 15 is always fixed (as stack pointer). ! The 'fake' hard registers are call-clobbered and fixed. ! ! On 31-bit, FPRs 18-19 are call-clobbered; ! on 64-bit, FPRs 24-31 are call-clobbered. ! The remaining FPRs are call-saved. */ #define FIXED_REGISTERS \ { 0, 0, 0, 0, \ *************** if (INTEGRAL_MODE_P (MODE) && *** 280,291 **** 0, 0, 0, 0, \ 1, 1, 1 } - /* 1 for registers not available across function calls. These must include - the FIXED_REGISTERS and also any registers that can be used without being - saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. */ - #define CALL_USED_REGISTERS \ { 1, 1, 1, 1, \ 1, 1, 0, 0, \ --- 245,250 ---- *************** if (INTEGRAL_MODE_P (MODE) && *** 297,306 **** 1, 1, 1, 1, \ 1, 1, 1 } - /* Like `CALL_USED_REGISTERS' except this macro doesn't require that - the entire set of `FIXED_REGISTERS' be included. - (`CALL_USED_REGISTERS' must be a superset of `FIXED_REGISTERS'). */ - #define CALL_REALLY_USED_REGISTERS \ { 1, 1, 1, 1, \ 1, 1, 0, 0, \ --- 256,261 ---- *************** if (INTEGRAL_MODE_P (MODE) && *** 312,319 **** 1, 1, 1, 1, \ 1, 1, 1 } - /* Macro to conditionally modify fixed_regs/call_used_regs. */ - #define CONDITIONAL_REGISTER_USAGE \ do \ { \ --- 267,272 ---- *************** do \ *** 336,495 **** } \ } while (0) ! /* The following register have a special usage ! GPR 11: Frame pointer if needed to point to automatic variables. ! GPR 32: In functions with more the 5 args this register ! points to that arguments, it is always eliminated ! with stack- or frame-pointer. ! GPR 33: Condition code 'register' */ ! ! #define HARD_FRAME_POINTER_REGNUM 11 ! #define FRAME_POINTER_REGNUM 34 ! ! #define ARG_POINTER_REGNUM 32 ! ! #define CC_REGNUM 33 ! ! /* We use the register %r0 to pass the static chain to a nested function. ! ! Note: It is assumed that this register is call-clobbered! ! We can't use any of the function-argument registers either, ! and register 1 is needed by the trampoline code, so we have ! no other choice but using this one ... */ - #define STATIC_CHAIN_REGNUM 0 ! /* Return number of consecutive hard regs needed starting at reg REGNO ! to hold something of mode MODE. ! This is ordinarily the length in words of a value of mode MODE ! but can be less for certain modes in special long registers. */ #define HARD_REGNO_NREGS(REGNO, MODE) \ ! (FLOAT_REGNO_P(REGNO)? \ (GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT ? 2 : 1) : \ ! INT_REGNO_P(REGNO)? \ ((GET_MODE_SIZE(MODE)+UNITS_PER_WORD-1) / UNITS_PER_WORD) : \ 1) - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. - The gprs can hold QI, HI, SI, SF, DF, SC and DC. - Even gprs can hold DI. - The floating point registers can hold DF, SF, DC and SC. */ - #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ! (FLOAT_REGNO_P(REGNO)? \ ! (GET_MODE_CLASS(MODE) == MODE_FLOAT || \ ! GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT || \ ! (MODE) == SImode || (MODE) == DImode) : \ ! INT_REGNO_P(REGNO)? \ (HARD_REGNO_NREGS(REGNO, MODE) == 1 || !((REGNO) & 1)) : \ CC_REGNO_P(REGNO)? \ GET_MODE_CLASS (MODE) == MODE_CC : \ 0) - /* Value is 1 if it is a good idea to tie two pseudo registers when one has - mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. */ - #define MODES_TIEABLE_P(MODE1, MODE2) \ (((MODE1) == SFmode || (MODE1) == DFmode) \ == ((MODE2) == SFmode || (MODE2) == DFmode)) ! /* If defined, gives a class of registers that cannot be used as the ! operand of a SUBREG that changes the mode of the object illegally. */ ! ! #define CLASS_CANNOT_CHANGE_MODE FP_REGS ! ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ ! ! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) ! ! /* Define this macro if references to a symbol must be treated ! differently depending on something about the variable or ! function named by the symbol (such as what section it is in). ! ! On s390, if using PIC, mark a SYMBOL_REF for a non-global symbol ! so that we may access it directly in the GOT. */ ! ! #define ENCODE_SECTION_INFO(DECL) \ ! do \ ! { \ ! if (flag_pic) \ ! { \ ! rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ! \ ! if (GET_CODE (rtl) == MEM) \ ! { \ ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ ! = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! || ! TREE_PUBLIC (DECL)); \ ! } \ ! } \ ! } \ ! while (0) ! ! ! /* This is an array of structures. Each structure initializes one pair ! of eliminable registers. The "from" register number is given first, ! followed by "to". Eliminations of the same "from" register are listed ! in order of preference. */ ! ! #define ELIMINABLE_REGS \ ! {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ ! { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ ! { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ ! { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}} ! ! #define CAN_ELIMINATE(FROM, TO) (1) ! ! #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ! { if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ ! { (OFFSET) = 0; } \ ! else if ((FROM) == FRAME_POINTER_REGNUM \ ! && (TO) == HARD_FRAME_POINTER_REGNUM) \ ! { (OFFSET) = 0; } \ ! else if ((FROM) == ARG_POINTER_REGNUM \ ! && (TO) == HARD_FRAME_POINTER_REGNUM) \ ! { (OFFSET) = s390_arg_frame_offset (); } \ ! else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ ! { (OFFSET) = s390_arg_frame_offset (); } \ ! else \ ! abort(); \ ! } ! ! #define CAN_DEBUG_WITHOUT_FP ! ! /* Value should be nonzero if functions must have frame pointers. ! Zero means the frame pointer need not be set up (and parms may be ! accessed via the stack pointer) in functions that seem suitable. ! This is computed in `reload', in reload1.c. */ ! #define FRAME_POINTER_REQUIRED 0 ! /* Define the classes of registers for register constraints in the ! machine description. Also define ranges of constants. ! ! One of the classes must always be named ALL_REGS and include all hard regs. ! If there is more than one class, another class must be named NO_REGS ! and contain no registers. ! The name GENERAL_REGS must be the name of a class (or an alias for ! another name such as ALL_REGS). This is the class of registers ! that is allowed by "g" or "r" in a register constraint. ! Also, registers outside this class are allocated only when ! instructions express preferences for them. ! ! The classes must be numbered in nondecreasing order; that is, ! a larger-numbered class must never be contained completely ! in a smaller-numbered class. ! ! For any two classes, it is very desirable that there be another ! class that represents their union. */ ! ! /*#define SMALL_REGISTER_CLASSES 1*/ enum reg_class { --- 289,373 ---- } \ } while (0) ! /* Preferred register allocation order. */ ! #define REG_ALLOC_ORDER \ ! { 1, 2, 3, 4, 5, 0, 14, 13, 12, 11, 10, 9, 8, 7, 6, \ ! 16, 17, 18, 19, 20, 21, 22, 23, \ ! 24, 25, 26, 27, 28, 29, 30, 31, \ ! 15, 32, 33, 34 } ! /* Fitting values into registers. */ ! ! /* Integer modes <= word size fit into any GPR. ! Integer modes > word size fit into successive GPRs, starting with ! an even-numbered register. ! SImode and DImode fit into FPRs as well. ! ! Floating point modes <= word size fit into any FPR or GPR. ! Floating point modes > word size (i.e. DFmode on 32-bit) fit ! into any FPR, or an even-odd GPR pair. ! ! Complex floating point modes fit either into two FPRs, or into ! successive GPRs (again starting with an even number). ! ! Condition code modes fit only into the CC register. */ #define HARD_REGNO_NREGS(REGNO, MODE) \ ! (FP_REGNO_P(REGNO)? \ (GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT ? 2 : 1) : \ ! GENERAL_REGNO_P(REGNO)? \ ((GET_MODE_SIZE(MODE)+UNITS_PER_WORD-1) / UNITS_PER_WORD) : \ 1) #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ! (FP_REGNO_P(REGNO)? \ ! ((MODE) == SImode || (MODE) == DImode || \ ! GET_MODE_CLASS(MODE) == MODE_FLOAT || \ ! GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT) : \ ! GENERAL_REGNO_P(REGNO)? \ (HARD_REGNO_NREGS(REGNO, MODE) == 1 || !((REGNO) & 1)) : \ CC_REGNO_P(REGNO)? \ GET_MODE_CLASS (MODE) == MODE_CC : \ + FRAME_REGNO_P(REGNO)? \ + (enum machine_mode) (MODE) == Pmode : \ 0) #define MODES_TIEABLE_P(MODE1, MODE2) \ (((MODE1) == SFmode || (MODE1) == DFmode) \ == ((MODE2) == SFmode || (MODE2) == DFmode)) ! /* Maximum number of registers to represent a value of mode MODE ! in a register of class CLASS. */ ! #define CLASS_MAX_NREGS(CLASS, MODE) \ ! ((CLASS) == FP_REGS ? \ ! (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT ? 2 : 1) : \ ! (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* If a 4-byte value is loaded into a FPR, it is placed into the ! *upper* half of the register, not the lower. Therefore, we ! cannot use SUBREGs to switch between modes in FP registers. */ ! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ ! ? reg_classes_intersect_p (FP_REGS, CLASS) : 0) ! /* Register classes. */ ! /* We use the following register classes: ! GENERAL_REGS All general purpose registers ! ADDR_REGS All general purpose registers except %r0 ! (These registers can be used in address generation) ! FP_REGS All floating point registers ! ! GENERAL_FP_REGS Union of GENERAL_REGS and FP_REGS ! ADDR_FP_REGS Union of ADDR_REGS and FP_REGS ! ! NO_REGS No registers ! ALL_REGS All registers ! ! Note that the 'fake' frame pointer and argument pointer registers ! are included amongst the address registers here. The condition ! code register is only included in ALL_REGS. */ enum reg_class { *************** enum reg_class *** 497,515 **** FP_REGS, ADDR_FP_REGS, GENERAL_FP_REGS, ALL_REGS, LIM_REG_CLASSES }; - #define N_REG_CLASSES (int) LIM_REG_CLASSES - /* Give names of register classes as strings for dump file. */ - #define REG_CLASS_NAMES \ { "NO_REGS", "ADDR_REGS", "GENERAL_REGS", \ "FP_REGS", "ADDR_FP_REGS", "GENERAL_FP_REGS", "ALL_REGS" } ! /* Define which registers fit in which classes. This is an initializer for ! a vector of HARD_REG_SET of length N_REG_CLASSES. ! G5 and latter have 16 register and support IEEE floating point operations. */ ! #define REG_CLASS_CONTENTS \ { \ { 0x00000000, 0x00000000 }, /* NO_REGS */ \ --- 375,387 ---- FP_REGS, ADDR_FP_REGS, GENERAL_FP_REGS, ALL_REGS, LIM_REG_CLASSES }; #define N_REG_CLASSES (int) LIM_REG_CLASSES #define REG_CLASS_NAMES \ { "NO_REGS", "ADDR_REGS", "GENERAL_REGS", \ "FP_REGS", "ADDR_FP_REGS", "GENERAL_FP_REGS", "ALL_REGS" } ! /* Class -> register mapping. */ #define REG_CLASS_CONTENTS \ { \ { 0x00000000, 0x00000000 }, /* NO_REGS */ \ *************** enum reg_class *** 521,625 **** { 0xffffffff, 0x00000007 }, /* ALL_REGS */ \ } ! /* The same information, inverted: ! Return the class number of the smallest class containing ! reg number REGNO. This could be a conditional expression ! or could index an array. */ ! #define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO]) - extern enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled class containing REGNO */ ! /* The class value for index registers, and the one for base regs. */ ! #define INDEX_REG_CLASS ADDR_REGS ! #define BASE_REG_CLASS ADDR_REGS ! /* Get reg_class from a letter such as appears in the machine description. */ #define REG_CLASS_FROM_LETTER(C) \ ((C) == 'a' ? ADDR_REGS : \ (C) == 'd' ? GENERAL_REGS : \ (C) == 'f' ? FP_REGS : NO_REGS) - /* The letters I, J, K, L and M in a register constraint string can be used - to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. */ - #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? (unsigned long) (VALUE) < 256 : \ (C) == 'J' ? (unsigned long) (VALUE) < 4096 : \ (C) == 'K' ? (VALUE) >= -32768 && (VALUE) < 32768 : \ (C) == 'L' ? (unsigned long) (VALUE) < 65536 : 0) - /* Similar, but for floating constants, and defining letters G and H. - Here VALUE is the CONST_DOUBLE rtx itself. */ - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 1 - /* 'Q' means a memory-reference for a S-type operand. */ - #define EXTRA_CONSTRAINT(OP, C) \ ! ((C) == 'Q' ? s_operand (OP, GET_MODE (OP)) : \ (C) == 'S' ? larl_operand (OP, GET_MODE (OP)) : 0) ! /* Given an rtx X being reloaded into a reg required to be in class CLASS, ! return the class of reg to actually use. In general this is just CLASS; ! but on some machines in some cases it is preferable to use a more ! restrictive class. */ ! ! #define PREFERRED_RELOAD_CLASS(X, CLASS) \ ! s390_preferred_reload_class ((X), (CLASS)) ! ! /* Return the maximum number of consecutive registers needed to represent ! mode MODE in a register of class CLASS. */ ! ! #define CLASS_MAX_NREGS(CLASS, MODE) \ ! ((CLASS) == FP_REGS ? \ ! (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT ? 2 : 1) : \ ! (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! ! /* We need a secondary reload when loading a PLUS which is ! not a valid operand for LOAD ADDRESS. */ ! ! #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, IN) \ ! s390_secondary_input_reload_class ((CLASS), (MODE), (IN)) ! ! /* If we are copying between FP registers and anything else, we need a memory ! location. */ - #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ - ((CLASS1) != (CLASS2) && ((CLASS1) == FP_REGS || (CLASS2) == FP_REGS)) ! /* Get_secondary_mem widens its argument to BITS_PER_WORD which loses on 64bit ! because the movsi and movsf patterns don't handle r/f moves. */ ! #define SECONDARY_MEMORY_NEEDED_MODE(MODE) \ ! (GET_MODE_BITSIZE (MODE) < 32 \ ! ? mode_for_size (32, GET_MODE_CLASS (MODE), 0) \ ! : MODE) ! /* A C expression whose value is nonzero if pseudos that have been ! assigned to registers of class CLASS would likely be spilled ! because registers of CLASS are needed for spill registers. ! The default value of this macro returns 1 if CLASS has exactly one ! register and zero otherwise. On most machines, this default ! should be used. Only define this macro to some other expression ! if pseudo allocated by `local-alloc.c' end up in memory because ! their hard registers were needed for spill registers. If this ! macro returns nonzero for those classes, those pseudos will only ! be allocated by `global.c', which knows how to reallocate the ! pseudo to another register. If there would not be another ! register available for reallocation, you should not change the ! definition of this macro since the only effect of such a ! definition would be to slow down register allocation. */ ! /* Stack layout; function entry, exit and calling. */ /* The return address of the current frame is retrieved from the initial value of register RETURN_REGNUM. --- 393,489 ---- { 0xffffffff, 0x00000007 }, /* ALL_REGS */ \ } + /* Register -> class mapping. */ + extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; + #define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO]) ! /* ADDR_REGS can be used as base or index register. */ ! #define INDEX_REG_CLASS ADDR_REGS ! #define BASE_REG_CLASS ADDR_REGS ! /* Check whether REGNO is a hard register of the suitable class ! or a pseudo register currently allocated to one such. */ ! #define REGNO_OK_FOR_INDEX_P(REGNO) \ ! (((REGNO) < FIRST_PSEUDO_REGISTER \ ! && REGNO_REG_CLASS ((REGNO)) == ADDR_REGS) \ ! || (reg_renumber[REGNO] > 0 && reg_renumber[REGNO] < 16)) ! #define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_INDEX_P (REGNO) ! /* Given an rtx X being reloaded into a reg required to be in class CLASS, ! return the class of reg to actually use. */ ! #define PREFERRED_RELOAD_CLASS(X, CLASS) \ ! s390_preferred_reload_class ((X), (CLASS)) ! /* We need a secondary reload when loading a PLUS which is ! not a valid operand for LOAD ADDRESS. */ ! #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, IN) \ ! s390_secondary_input_reload_class ((CLASS), (MODE), (IN)) ! /* We need secondary memory to move data between GPRs and FPRs. */ ! #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ ! ((CLASS1) != (CLASS2) && ((CLASS1) == FP_REGS || (CLASS2) == FP_REGS)) ! ! /* Get_secondary_mem widens its argument to BITS_PER_WORD which loses on 64bit ! because the movsi and movsf patterns don't handle r/f moves. */ ! #define SECONDARY_MEMORY_NEEDED_MODE(MODE) \ ! (GET_MODE_BITSIZE (MODE) < 32 \ ! ? mode_for_size (32, GET_MODE_CLASS (MODE), 0) \ ! : MODE) ! ! ! /* Define various machine-dependent constraint letters. */ #define REG_CLASS_FROM_LETTER(C) \ ((C) == 'a' ? ADDR_REGS : \ (C) == 'd' ? GENERAL_REGS : \ (C) == 'f' ? FP_REGS : NO_REGS) #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? (unsigned long) (VALUE) < 256 : \ (C) == 'J' ? (unsigned long) (VALUE) < 4096 : \ (C) == 'K' ? (VALUE) >= -32768 && (VALUE) < 32768 : \ (C) == 'L' ? (unsigned long) (VALUE) < 65536 : 0) #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 1 #define EXTRA_CONSTRAINT(OP, C) \ ! ((C) == 'Q' ? q_constraint (OP) : \ (C) == 'S' ? larl_operand (OP, GET_MODE (OP)) : 0) ! #define EXTRA_MEMORY_CONSTRAINT(C) ((C) == 'Q') ! /* Stack layout and calling conventions. */ ! ! /* Our stack grows from higher to lower addresses. However, local variables ! are accessed by positive offsets, and function arguments are stored at ! increasing addresses. */ ! #define STACK_GROWS_DOWNWARD ! /* #undef FRAME_GROWS_DOWNWARD */ ! /* #undef ARGS_GROW_DOWNWARD */ ! /* The basic stack layout looks like this: the stack pointer points ! to the register save area for called functions. Above that area ! is the location to place outgoing arguments. Above those follow ! dynamic allocations (alloca), and finally the local variables. */ + /* Offset from stack-pointer to first location of outgoing args. */ + #define STACK_POINTER_OFFSET (TARGET_64BIT ? 160 : 96) ! /* Offset within stack frame to start allocating local variables at. */ ! extern int current_function_outgoing_args_size; ! #define STARTING_FRAME_OFFSET \ ! (STACK_POINTER_OFFSET + current_function_outgoing_args_size) ! /* Offset from the stack pointer register to an item dynamically ! allocated on the stack, e.g., by `alloca'. */ ! #define STACK_DYNAMIC_OFFSET(FUNDECL) (STARTING_FRAME_OFFSET) ! /* Offset of first parameter from the argument pointer register value. ! We have a fake argument pointer register that points directly to ! the argument area. */ ! #define FIRST_PARM_OFFSET(FNDECL) 0 /* The return address of the current frame is retrieved from the initial value of register RETURN_REGNUM. *************** extern enum reg_class regclass_map[FIRST *** 631,659 **** plus_constant (arg_pointer_rtx, -STACK_POINTER_OFFSET)) #define RETURN_ADDR_RTX(COUNT, FRAME) \ ! ((COUNT) == 0 ? get_hard_reg_initial_val (Pmode, RETURN_REGNUM) : \ ! gen_rtx_MEM (Pmode, \ ! memory_address (Pmode, \ ! plus_constant (DYNAMIC_CHAIN_ADDRESS ((FRAME)), \ ! RETURN_REGNUM * UNITS_PER_WORD)))) ! ! /* The following macros will turn on dwarf2 exception hndling ! Other code location for this exception handling are ! in s390.md (eh_return insn) and in linux.c in the prologue. */ ! ! #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RETURN_REGNUM) ! ! /* We have 31 bit mode. */ #define MASK_RETURN_ADDR (TARGET_64BIT ? GEN_INT (-1) : GEN_INT (0x7fffffff)) - /* The offset from the incoming value of %sp to the top of the stack frame - for the current function. */ #define INCOMING_FRAME_SP_OFFSET STACK_POINTER_OFFSET - - /* Location, from where return address to load. */ - #define DWARF_FRAME_RETURN_COLUMN 14 /* Describe how we implement __builtin_eh_return. */ --- 495,511 ---- plus_constant (arg_pointer_rtx, -STACK_POINTER_OFFSET)) #define RETURN_ADDR_RTX(COUNT, FRAME) \ ! s390_return_addr_rtx ((COUNT), DYNAMIC_CHAIN_ADDRESS ((FRAME))) + /* In 31-bit mode, we need to mask off the high bit of return addresses. */ #define MASK_RETURN_ADDR (TARGET_64BIT ? GEN_INT (-1) : GEN_INT (0x7fffffff)) + /* Exception handling. */ + + /* Describe calling conventions for DWARF-2 exception handling. */ + #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RETURN_REGNUM) #define INCOMING_FRAME_SP_OFFSET STACK_POINTER_OFFSET #define DWARF_FRAME_RETURN_COLUMN 14 /* Describe how we implement __builtin_eh_return. */ *************** extern enum reg_class regclass_map[FIRST *** 663,738 **** gen_rtx_MEM (Pmode, plus_constant (arg_pointer_rtx, \ TARGET_64BIT? -48 : -40)) ! /* Define this if pushing a word on the stack makes the stack pointer a ! smaller address. */ ! ! #define STACK_GROWS_DOWNWARD ! ! /* Define this if the nominal address of the stack frame is at the ! high-address end of the local variables; that is, each additional local ! variable allocated goes at a more negative offset in the frame. */ ! ! /* #define FRAME_GROWS_DOWNWARD */ ! ! /* Offset from stack-pointer to first location of outgoing args. */ - #define STACK_POINTER_OFFSET (TARGET_64BIT ? 160 : 96) ! /* Offset within stack frame to start allocating local variables at. ! If FRAME_GROWS_DOWNWARD, this is the offset to the END of the ! first local allocated. Otherwise, it is the offset to the BEGINNING ! of the first local allocated. */ ! #define STARTING_FRAME_OFFSET \ ! (STACK_POINTER_OFFSET + current_function_outgoing_args_size) ! #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0 ! /* If we generate an insn to push BYTES bytes, this says how many the stack ! pointer really advances by. On S/390, we have no push instruction. */ - /* #define PUSH_ROUNDING(BYTES) */ ! /* Accumulate the outgoing argument count so we can request the right ! DSA size and determine stack offset. */ ! #define ACCUMULATE_OUTGOING_ARGS 1 ! /* Offset from the stack pointer register to an item dynamically ! allocated on the stack, e.g., by `alloca'. ! The default value for this macro is `STACK_POINTER_OFFSET' plus the ! length of the outgoing arguments. The default is correct for most ! machines. See `function.c' for details. */ ! #define STACK_DYNAMIC_OFFSET(FUNDECL) (STARTING_FRAME_OFFSET) ! /* Offset of first parameter from the argument pointer register value. ! On the S/390, we define the argument pointer to the start of the fixed ! area. */ ! #define FIRST_PARM_OFFSET(FNDECL) 0 ! /* Define this if stack space is still allocated for a parameter passed ! in a register. The value is the number of bytes allocated to this ! area. */ ! /* #define REG_PARM_STACK_SPACE(FNDECL) 32 */ - /* Define this if the above stack space is to be considered part of the - space allocated by the caller. */ - /* #define OUTGOING_REG_PARM_STACK_SPACE */ ! /* 1 if N is a possible register number for function argument passing. ! On S390, general registers 2 - 6 and floating point register 0 and 2 ! are used in this way. */ ! #define FUNCTION_ARG_REGNO_P(N) (((N) >=2 && (N) <7) || \ ! (N) == 16 || (N) == 17) - /* Define a data type for recording info about an argument list during - the scan of that argument list. This data type should hold all - necessary information about the function itself and about the args - processed so far, enough to enable macros such as FUNCTION_ARG to - determine where the next arg should go. */ typedef struct s390_arg_structure { int gprs; /* gpr so far */ --- 515,586 ---- gen_rtx_MEM (Pmode, plus_constant (arg_pointer_rtx, \ TARGET_64BIT? -48 : -40)) ! /* Select a format to encode pointers in exception handling data. */ ! #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ ! (flag_pic \ ! ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \ ! : DW_EH_PE_absptr) ! /* Frame registers. */ ! #define STACK_POINTER_REGNUM 15 ! #define FRAME_POINTER_REGNUM 34 ! #define HARD_FRAME_POINTER_REGNUM 11 ! #define ARG_POINTER_REGNUM 32 ! /* The static chain must be call-clobbered, but not used for ! function argument passing. As register 1 is clobbered by ! the trampoline code, we only have one option. */ ! #define STATIC_CHAIN_REGNUM 0 ! /* Number of hardware registers that go into the DWARF-2 unwind info. ! To avoid ABI incompatibility, this number must not change even as ! 'fake' hard registers are added or removed. */ ! #define DWARF_FRAME_REGISTERS 34 ! /* Frame pointer and argument pointer elimination. */ ! #define FRAME_POINTER_REQUIRED 0 ! #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0 ! #define ELIMINABLE_REGS \ ! {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ ! { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ ! { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ ! { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}} ! #define CAN_ELIMINATE(FROM, TO) (1) ! #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ! { if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ ! { (OFFSET) = 0; } \ ! else if ((FROM) == FRAME_POINTER_REGNUM \ ! && (TO) == HARD_FRAME_POINTER_REGNUM) \ ! { (OFFSET) = 0; } \ ! else if ((FROM) == ARG_POINTER_REGNUM \ ! && (TO) == HARD_FRAME_POINTER_REGNUM) \ ! { (OFFSET) = s390_arg_frame_offset (); } \ ! else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ ! { (OFFSET) = s390_arg_frame_offset (); } \ ! else \ ! abort(); \ ! } ! /* Stack arguments. */ ! ! /* We need current_function_outgoing_args to be valid. */ ! #define ACCUMULATE_OUTGOING_ARGS 1 ! /* Return doesn't modify the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, SIZE) 0 + /* Register arguments. */ + typedef struct s390_arg_structure { int gprs; /* gpr so far */ *************** typedef struct s390_arg_structure *** 740,823 **** } CUMULATIVE_ARGS; - - /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to - a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. */ - #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, NN) \ ((CUM).gprs=0, (CUM).fprs=0) - /* Update the data in CUM to advance over an argument of mode MODE and - data type TYPE. (TYPE is null for libcalls where that information - may not be available.) */ - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ s390_function_arg_advance (&CUM, MODE, TYPE, NAMED) - /* Define where to put the arguments to a function. Value is zero to push - the argument on the stack, or a hard register in which to store the - argument. */ - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ s390_function_arg (&CUM, MODE, TYPE, NAMED) - /* Define where to expect the arguments of a function. Value is zero, if - the argument is on the stack, or a hard register in which the argument - is stored. It is the same like FUNCTION_ARG, except for unnamed args - That means, that all in case of varargs used, the arguments are expected - from the stack. - S/390 has already space on the stack for args coming in registers, - they are pushed in prologue, if needed. */ - - - /* Define the `__builtin_va_list' type. */ - - #define BUILD_VA_LIST_TYPE(VALIST) \ - (VALIST) = s390_build_va_list () - - /* Implement `va_start' for varargs and stdarg. */ - - #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ - s390_va_start (stdarg, valist, nextarg) - - /* Implement `va_arg'. */ - - #define EXPAND_BUILTIN_VA_ARG(valist, type) \ - s390_va_arg (valist, type) - - /* For an arg passed partly in registers and partly in memory, this is the - number of registers used. For args passed entirely in registers or - entirely in memory, zero. */ - - #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0 - - - /* Define if returning from a function call automatically pops the - arguments described by the number-of-args field in the call. */ - - #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, SIZE) 0 - - - /* Define how to find the value returned by a function. VALTYPE is the - data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 15. */ - - #define RET_REG(MODE) ((GET_MODE_CLASS (MODE) == MODE_INT \ - || TARGET_SOFT_FLOAT ) ? 2 : 16) - - - /* for structs the address is passed, and the Callee makes a - copy, only if needed */ - #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ s390_function_arg_pass_by_reference (MODE, TYPE) - /* Register 2 (and 3) for integral values - or floating point register 0 (and 2) for fp values are used. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ --- 588,617 ---- } CUMULATIVE_ARGS; #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, NN) \ ((CUM).gprs=0, (CUM).fprs=0) #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ s390_function_arg_advance (&CUM, MODE, TYPE, NAMED) #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ s390_function_arg (&CUM, MODE, TYPE, NAMED) #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ s390_function_arg_pass_by_reference (MODE, TYPE) + #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0 + + /* Arguments can be placed in general registers 2 to 6, + or in floating point registers 0 and 2. */ + #define FUNCTION_ARG_REGNO_P(N) (((N) >=2 && (N) <7) || \ + (N) == 16 || (N) == 17) + /* Scalar return values. */ + + /* We return scalars in general purpose register 2 for integral values, + and floating point register 0 for fp values. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ *************** CUMULATIVE_ARGS; *** 827,959 **** /* Define how to find the value returned by a library function assuming the value has mode MODE. */ ! #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, RET_REG (MODE)) ! /* 1 if N is a possible register number for a function value. */ ! #define FUNCTION_VALUE_REGNO_P(N) ((N) == 2 || (N) == 16) /* The definition of this macro implies that there are cases where a scalar value cannot be returned in registers. */ - #define RETURN_IN_MEMORY(type) \ (TYPE_MODE (type) == BLKmode || \ GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_INT || \ GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_FLOAT) - /* Mode of stack savearea. - FUNCTION is VOIDmode because calling convention maintains SP. - BLOCK needs Pmode for SP. - NONLOCAL needs twice Pmode to maintain both backchain and SP. */ - - #define STACK_SAVEAREA_MODE(LEVEL) \ - (LEVEL == SAVE_FUNCTION ? VOIDmode \ - : LEVEL == SAVE_NONLOCAL ? (TARGET_64BIT ? TImode : DImode) : Pmode) - /* Structure value address is passed as invisible first argument (gpr 2). */ - #define STRUCT_VALUE 0 - /* This macro definition sets up a default value for `main' to return. */ ! #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node) ! ! /* Length in units of the trampoline for entering a nested function. */ ! ! #define TRAMPOLINE_SIZE (TARGET_64BIT ? 36 : 20) ! ! /* Initialize the dynamic part of trampoline. */ ! ! #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \ ! s390_initialize_trampoline ((ADDR), (FNADDR), (CXT)) ! ! /* Template for constant part of trampoline. */ - #define TRAMPOLINE_TEMPLATE(FILE) \ - s390_trampoline_template (FILE) ! /* Output assembler code to FILE to increment profiler label # LABELNO ! for profiling a function entry. */ #define FUNCTION_PROFILER(FILE, LABELNO) \ ! s390_function_profiler ((FILE), ((LABELNO))) #define PROFILE_BEFORE_PROLOGUE 1 - /* Define EXIT_IGNORE_STACK if, when returning from a function, the stack - pointer does not matter (provided there is a frame pointer). */ - - #define EXIT_IGNORE_STACK 1 - - /* Addressing modes, and classification of registers for them. */ - - /* #define HAVE_POST_INCREMENT */ - /* #define HAVE_POST_DECREMENT */ - - /* #define HAVE_PRE_DECREMENT */ - /* #define HAVE_PRE_INCREMENT */ ! /* These assume that REGNO is a hard or pseudo reg number. They give ! nonzero only if REGNO is a hard reg of the suitable class or a pseudo ! reg currently allocated to a suitable hard reg. ! These definitions are NOT overridden anywhere. */ ! ! #define REGNO_OK_FOR_INDEX_P(REGNO) \ ! (((REGNO) < FIRST_PSEUDO_REGISTER \ ! && REGNO_REG_CLASS ((REGNO)) == ADDR_REGS) \ ! || (reg_renumber[REGNO] > 0 && reg_renumber[REGNO] < 16)) ! #define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_INDEX_P (REGNO) ! #define REGNO_OK_FOR_DATA_P(REGNO) \ ! ((REGNO) < 16 || (unsigned) reg_renumber[REGNO] < 16) ! #define REGNO_OK_FOR_FP_P(REGNO) \ ! FLOAT_REGNO_P (REGNO) - /* Now macros that check whether X is a register and also, - strictly, whether it is in a specified class. */ ! /* 1 if X is a data register. */ ! #define DATA_REG_P(X) (REG_P (X) && REGNO_OK_FOR_DATA_P (REGNO (X))) ! /* 1 if X is an fp register. */ ! #define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_P (REGNO (X))) - /* 1 if X is an address register. */ ! #define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X))) - /* Maximum number of registers that can appear in a valid memory address. */ ! #define MAX_REGS_PER_ADDRESS 2 /* Recognize any constant value that is a valid address. */ - #define CONSTANT_ADDRESS_P(X) 0 ! #define SYMBOLIC_CONST(X) \ ! (GET_CODE (X) == SYMBOL_REF \ ! || GET_CODE (X) == LABEL_REF \ ! || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X))) ! ! /* General operand is everything except SYMBOL_REF, CONST and CONST_DOUBLE ! they have to be forced to constant pool ! CONST_INT have to be forced into constant pool, if greater than ! 64k. Depending on the insn they have to be force into constant pool ! for smaller value; in this case we have to work with nonimmediate operand. */ ! ! #define LEGITIMATE_PIC_OPERAND_P(X) \ ! legitimate_pic_operand_p (X) ! ! /* Nonzero if the constant value X is a legitimate general operand. ! It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! ! #define LEGITIMATE_CONSTANT_P(X) \ ! legitimate_constant_p (X) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. We have two alternate definitions --- 621,697 ---- /* Define how to find the value returned by a library function assuming the value has mode MODE. */ ! #define RET_REG(MODE) ((GET_MODE_CLASS (MODE) == MODE_INT \ ! || TARGET_SOFT_FLOAT ) ? 2 : 16) #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, RET_REG (MODE)) ! /* Only gpr 2 and fpr 0 are ever used as return registers. */ #define FUNCTION_VALUE_REGNO_P(N) ((N) == 2 || (N) == 16) + + /* Aggregate return values. */ + /* The definition of this macro implies that there are cases where a scalar value cannot be returned in registers. */ #define RETURN_IN_MEMORY(type) \ (TYPE_MODE (type) == BLKmode || \ GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_INT || \ GET_MODE_CLASS (TYPE_MODE (type)) == MODE_COMPLEX_FLOAT) /* Structure value address is passed as invisible first argument (gpr 2). */ #define STRUCT_VALUE 0 ! /* Function entry and exit. */ ! ! /* When returning from a function, the stack pointer does not matter. */ ! #define EXIT_IGNORE_STACK 1 ! /* Profiling. */ #define FUNCTION_PROFILER(FILE, LABELNO) \ ! s390_function_profiler ((FILE), ((LABELNO))) #define PROFILE_BEFORE_PROLOGUE 1 ! /* Implementing the varargs macros. */ ! #define BUILD_VA_LIST_TYPE(VALIST) \ ! (VALIST) = s390_build_va_list () ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! s390_va_start (valist, nextarg) ! #define EXPAND_BUILTIN_VA_ARG(valist, type) \ ! s390_va_arg (valist, type) ! /* Trampolines for nested functions. */ ! #define TRAMPOLINE_SIZE (TARGET_64BIT ? 36 : 20) ! #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \ ! s390_initialize_trampoline ((ADDR), (FNADDR), (CXT)) ! #define TRAMPOLINE_TEMPLATE(FILE) \ ! s390_trampoline_template (FILE) ! /* Library calls. */ ! ! /* We should use memcpy, not bcopy. */ ! #define TARGET_MEM_FUNCTIONS ! /* Addressing modes, and classification of registers for them. */ /* Recognize any constant value that is a valid address. */ #define CONSTANT_ADDRESS_P(X) 0 ! /* Maximum number of registers that can appear in a valid memory address. */ ! #define MAX_REGS_PER_ADDRESS 2 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. We have two alternate definitions *************** CUMULATIVE_ARGS; *** 966,997 **** Some source files that are used after register allocation need to be strict. */ - /* - * Nonzero if X is a hard reg that can be used as an index or if it is - * a pseudo reg. - */ - #define REG_OK_FOR_INDEX_NONSTRICT_P(X) \ ((GET_MODE (X) == Pmode) && \ ((REGNO (X) >= FIRST_PSEUDO_REGISTER) \ || REGNO_REG_CLASS (REGNO (X)) == ADDR_REGS)) - /* Nonzero if X is a hard reg that can be used as a base reg or if it is - a pseudo reg. */ - #define REG_OK_FOR_BASE_NONSTRICT_P(X) REG_OK_FOR_INDEX_NONSTRICT_P (X) - /* Nonzero if X is a hard reg that can be used as an index. */ - #define REG_OK_FOR_INDEX_STRICT_P(X) \ ((GET_MODE (X) == Pmode) && (REGNO_OK_FOR_INDEX_P (REGNO (X)))) - /* Nonzero if X is a hard reg that can be used as a base reg. */ - #define REG_OK_FOR_BASE_STRICT_P(X) \ ((GET_MODE (X) == Pmode) && (REGNO_OK_FOR_BASE_P (REGNO (X)))) - #ifndef REG_OK_STRICT #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_INDEX_NONSTRICT_P(X) #define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NONSTRICT_P(X) --- 704,722 ---- *************** CUMULATIVE_ARGS; *** 1000,1014 **** #define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P(X) #endif /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression ! that wants to use this address. ! ! The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, ! except for CONSTANT_ADDRESS_P which is actually machine-independent. */ ! #ifdef REG_OK_STRICT #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ { \ --- 725,737 ---- #define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P(X) #endif + /* S/390 has no mode dependent addresses. */ + #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression ! that wants to use this address. */ #ifdef REG_OK_STRICT #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ { \ *************** CUMULATIVE_ARGS; *** 1023,1037 **** } #endif - - /* S/390 has no mode dependent addresses. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) - /* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. This macro is used in only one place: `memory_address' in explow.c. */ - #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ { \ (X) = legitimize_address (X, OLDX, MODE); \ --- 746,754 ---- *************** CUMULATIVE_ARGS; *** 1039,1111 **** goto WIN; \ } ! /* Specify the machine mode that this machine uses for the index in the ! tablejump instruction. */ ! ! #define CASE_VECTOR_MODE (TARGET_64BIT ? DImode : SImode) ! ! /* Define this if the tablejump instruction expects the table to contain ! offsets from the address of the table. ! Do not define this if the table should contain absolute addresses. */ ! ! /* #define CASE_VECTOR_PC_RELATIVE */ ! ! /* Load from integral MODE < SI from memory into register makes sign_extend ! or zero_extend ! In our case sign_extension happens for Halfwords, other no extension. */ ! ! #define LOAD_EXTEND_OP(MODE) \ ! (TARGET_64BIT ? ((MODE) == QImode ? ZERO_EXTEND : \ ! (MODE) == HImode ? SIGN_EXTEND : NIL) \ ! : ((MODE) == HImode ? SIGN_EXTEND : NIL)) ! ! /* Define this if fixuns_trunc is the same as fix_trunc. */ ! ! /* #define FIXUNS_TRUNC_LIKE_FIX_TRUNC */ ! ! /* We use "unsigned char" as default. */ ! ! #define DEFAULT_SIGNED_CHAR 0 ! ! /* Max number of bytes we can move from memory to memory in one reasonably ! fast instruction. */ ! ! #define MOVE_MAX 256 ! ! /* Nonzero if access to memory by bytes is slow and undesirable. */ ! ! #define SLOW_BYTE_ACCESS 1 ! ! /* Define if shifts truncate the shift count which implies one can omit ! a sign-extension or zero-extension of a shift count. */ ! ! /* #define SHIFT_COUNT_TRUNCATED */ ! ! /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits ! is done just by pretending it is already truncated. */ ! ! #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 ! ! /* We assume that the store-condition-codes instructions store 0 for false ! and some other value for true. This is the value stored for true. */ ! ! /* #define STORE_FLAG_VALUE -1 */ ! /* Don't perform CSE on function addresses. */ ! #define NO_FUNCTION_CSE - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ ! #define Pmode ((enum machine_mode) (TARGET_64BIT ? DImode : SImode)) ! /* A function address in a call instruction is a byte address (for ! indexing purposes) so give the MEM rtx a byte's mode. */ - #define FUNCTION_MODE QImode /* A part of a C `switch' statement that describes the relative costs of constant RTL expressions. It must contain `case' labels for --- 756,790 ---- goto WIN; \ } ! /* Nonzero if the constant value X is a legitimate general operand. ! It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ! #define LEGITIMATE_CONSTANT_P(X) \ ! legitimate_constant_p (X) ! /* Helper macro for s390.c and s390.md to check for symbolic constants. */ ! #define SYMBOLIC_CONST(X) \ ! (GET_CODE (X) == SYMBOL_REF \ ! || GET_CODE (X) == LABEL_REF \ ! || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X))) ! #define TLS_SYMBOLIC_CONST(X) \ ! ((GET_CODE (X) == SYMBOL_REF && tls_symbolic_operand (X)) \ ! || (GET_CODE (X) == CONST && tls_symbolic_reference_mentioned_p (X))) ! /* Condition codes. */ ! /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, ! return the mode to be used for the comparison. */ ! #define SELECT_CC_MODE(OP, X, Y) s390_select_ccmode ((OP), (X), (Y)) ! ! /* Define the information needed to generate branch and scc insns. This is ! stored from the compare operation. Note that we can't use "rtx" here ! since it hasn't been defined! */ ! extern struct rtx_def *s390_compare_op0, *s390_compare_op1; + /* Relative costs of operations. */ /* A part of a C `switch' statement that describes the relative costs of constant RTL expressions. It must contain `case' labels for *************** CUMULATIVE_ARGS; *** 1126,1132 **** than a short. Because of that we give an addition of greater constants a cost of 3 (reload1.c 10096). */ - #define CONST_COSTS(RTX, CODE, OUTER_CODE) \ case CONST: \ if ((GET_CODE (XEXP (RTX, 0)) == MINUS) && \ --- 805,810 ---- *************** CUMULATIVE_ARGS; *** 1148,1157 **** instruction is. In writing this macro, you can use the construct `COSTS_N_INSNS (N)' to specify a cost equal to N fast instructions. OUTER_CODE is the code of the expression in which X ! is contained. ! ! This macro is optional; do not define it if the default cost ! assumptions are adequate for the target machine. */ #define RTX_COSTS(X, CODE, OUTER_CODE) \ case ASHIFT: \ --- 826,832 ---- instruction is. In writing this macro, you can use the construct `COSTS_N_INSNS (N)' to specify a cost equal to N fast instructions. OUTER_CODE is the code of the expression in which X ! is contained. */ #define RTX_COSTS(X, CODE, OUTER_CODE) \ case ASHIFT: \ *************** CUMULATIVE_ARGS; *** 1164,1318 **** case MINUS: \ case NEG: \ case NOT: \ ! return 1; \ case MULT: \ if (GET_MODE (XEXP (X, 0)) == DImode) \ ! return 40; \ ! else \ ! return 7; \ case DIV: \ case UDIV: \ case MOD: \ case UMOD: \ ! return 33; /* An expression giving the cost of an addressing mode that contains ADDRESS. If not defined, the cost is computed from the ADDRESS ! expression and the `CONST_COSTS' values. ! ! For most CISC machines, the default cost is a good approximation ! of the true cost of the addressing mode. However, on RISC ! machines, all instructions normally have the same length and ! execution time. Hence all addresses will have equal costs. ! ! In cases where more than one form of an address is known, the form ! with the lowest cost will be used. If multiple forms have the ! same, lowest, cost, the one that is the most complex will be used. ! ! For example, suppose an address that is equal to the sum of a ! register and a constant is used twice in the same basic block. ! When this macro is not defined, the address will be computed in a ! register and memory references will be indirect through that ! register. On machines where the cost of the addressing mode ! containing the sum is no higher than that of a simple indirect ! reference, this will produce an additional instruction and ! possibly require an additional register. Proper specification of ! this macro eliminates this overhead for such machines. ! ! Similar use of this macro is made in strength reduction of loops. ! ! ADDRESS need not be valid as an address. In such a case, the cost ! is not relevant and can be any value; invalid addresses need not be ! assigned a different cost. ! ! On machines where an address involving more than one register is as ! cheap as an address computation involving only one register, ! defining `ADDRESS_COST' to reflect this can cause two registers to ! be live over a region of code where only one would have been if ! `ADDRESS_COST' were not defined in that manner. This effect should ! be considered in the definition of this macro. Equivalent costs ! should probably only be given to addresses with different numbers ! of registers on machines with lots of registers. ! ! This macro will normally either not be defined or be defined as a ! constant. ! ! On s390 symbols are expensive if compiled with fpic ! lifetimes. */ ! ! #define ADDRESS_COST(RTX) \ ! ((flag_pic && GET_CODE (RTX) == SYMBOL_REF) ? 2 : 1) /* On s390, copy between fprs and gprs is expensive. */ - #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ (( ( reg_classes_intersect_p ((CLASS1), GENERAL_REGS) \ && reg_classes_intersect_p ((CLASS2), FP_REGS)) \ || ( reg_classes_intersect_p ((CLASS1), FP_REGS) \ && reg_classes_intersect_p ((CLASS2), GENERAL_REGS))) ? 10 : 1) - /* A C expression for the cost of moving data of mode M between a register and memory. A value of 2 is the default; this cost is ! relative to those in `REGISTER_MOVE_COST'. ! ! If moving between registers and memory is more expensive than ! between two registers, you should define this macro to express the ! relative cost. */ ! #define MEMORY_MOVE_COST(M, C, I) 1 /* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. */ - #define BRANCH_COST 1 ! /* Add any extra modes needed to represent the condition code. */ ! #define EXTRA_CC_MODES \ ! CC (CCZmode, "CCZ") \ ! CC (CCAmode, "CCA") \ ! CC (CCLmode, "CCL") \ ! CC (CCUmode, "CCU") \ ! CC (CCSmode, "CCS") \ ! CC (CCTmode, "CCT") ! ! /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, ! return the mode to be used for the comparison. */ ! ! #define SELECT_CC_MODE(OP, X, Y) s390_select_ccmode ((OP), (X), (Y)) ! ! ! /* Define the information needed to generate branch and scc insns. This is ! stored from the compare operation. Note that we can't use "rtx" here ! since it hasn't been defined! */ ! ! extern struct rtx_def *s390_compare_op0, *s390_compare_op1; ! ! ! /* How to refer to registers in assembler output. This sequence is ! indexed by compiler's hard-register-number (see above). */ ! ! #define REGISTER_NAMES \ ! { "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \ ! "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", \ ! "%f0", "%f2", "%f4", "%f6", "%f1", "%f3", "%f5", "%f7", \ ! "%f8", "%f10", "%f12", "%f14", "%f9", "%f11", "%f13", "%f15", \ ! "%ap", "%cc", "%fp" \ ! } ! ! /* implicit call of memcpy, not bcopy */ ! ! #define TARGET_MEM_FUNCTIONS ! /* Either simplify a location expression, or return the original. */ ! #define ASM_SIMPLIFY_DWARF_ADDR(X) \ ! s390_simplify_dwarf_addr (X) ! /* Print operand X (an rtx) in assembler syntax to file FILE. ! CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. ! For `%' followed by punctuation, CODE is the punctuation and X is null. */ ! #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE) - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) ! /* Define the codes that are matched by predicates in aux-output.c. */ ! #define PREDICATE_CODES \ ! {"s_operand", { SUBREG, MEM }}, \ ! {"s_imm_operand", { CONST_INT, CONST_DOUBLE, SUBREG, MEM }}, \ ! {"bras_sym_operand",{ SYMBOL_REF, CONST }}, \ ! {"larl_operand", { SYMBOL_REF, CONST, CONST_INT, CONST_DOUBLE }}, \ ! {"load_multiple_operation", {PARALLEL}}, \ ! {"store_multiple_operation", {PARALLEL}}, \ ! {"const0_operand", { CONST_INT, CONST_DOUBLE }}, \ ! {"consttable_operand", { SYMBOL_REF, LABEL_REF, CONST, \ ! CONST_INT, CONST_DOUBLE }}, \ ! {"s390_plus_operand", { PLUS }}, /* S/390 constant pool breaks the devices in crtstuff.c to control section in where code resides. We have to write it as asm code. */ --- 839,910 ---- case MINUS: \ case NEG: \ case NOT: \ ! return COSTS_N_INSNS (1); \ case MULT: \ if (GET_MODE (XEXP (X, 0)) == DImode) \ ! return COSTS_N_INSNS (40); \ ! else \ ! return COSTS_N_INSNS (7); \ case DIV: \ case UDIV: \ case MOD: \ case UMOD: \ ! return COSTS_N_INSNS (33); /* An expression giving the cost of an addressing mode that contains ADDRESS. If not defined, the cost is computed from the ADDRESS ! expression and the `CONST_COSTS' values. */ ! #define ADDRESS_COST(RTX) s390_address_cost ((RTX)) /* On s390, copy between fprs and gprs is expensive. */ #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ (( ( reg_classes_intersect_p ((CLASS1), GENERAL_REGS) \ && reg_classes_intersect_p ((CLASS2), FP_REGS)) \ || ( reg_classes_intersect_p ((CLASS1), FP_REGS) \ && reg_classes_intersect_p ((CLASS2), GENERAL_REGS))) ? 10 : 1) /* A C expression for the cost of moving data of mode M between a register and memory. A value of 2 is the default; this cost is ! relative to those in `REGISTER_MOVE_COST'. */ #define MEMORY_MOVE_COST(M, C, I) 1 /* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. */ #define BRANCH_COST 1 ! /* Nonzero if access to memory by bytes is slow and undesirable. */ ! #define SLOW_BYTE_ACCESS 1 ! /* The maximum number of bytes that a single instruction can move quickly ! between memory and registers or between two memory locations. */ ! #define MOVE_MAX (TARGET_64BIT ? 16 : 8) ! #define MAX_MOVE_MAX 16 ! /* Determine whether to use move_by_pieces or block move insn. */ ! #define MOVE_BY_PIECES_P(SIZE, ALIGN) \ ! ( (SIZE) == 1 || (SIZE) == 2 || (SIZE) == 4 \ ! || (TARGET_64BIT && (SIZE) == 8) ) ! /* Determine whether to use clear_by_pieces or block clear insn. */ ! #define CLEAR_BY_PIECES_P(SIZE, ALIGN) \ ! ( (SIZE) == 1 || (SIZE) == 2 || (SIZE) == 4 \ ! || (TARGET_64BIT && (SIZE) == 8) ) ! /* Don't perform CSE on function addresses. */ ! #define NO_FUNCTION_CSE + /* Sections. */ ! /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP ".text" ! /* Output before writable (initialized) data. */ ! #define DATA_SECTION_ASM_OP ".data" + /* Output before writable (uninitialized) data. */ + #define BSS_SECTION_ASM_OP ".bss" /* S/390 constant pool breaks the devices in crtstuff.c to control section in where code resides. We have to write it as asm code. */ *************** extern struct rtx_def *s390_compare_op0, *** 1326,1337 **** .previous"); #endif /* Constant Pool for all symbols operands which are changed with force_const_mem during insn generation (expand_insn). */ extern int s390_pool_count; extern int s390_nr_constants; - extern int s390_pool_overflow; #define ASM_OUTPUT_POOL_PROLOGUE(FILE, FUNNAME, fndecl, size) \ { \ --- 918,1014 ---- .previous"); #endif + + /* Position independent code. */ + + extern int flag_pic; + + #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM) + + #define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X) + + + /* Assembler file format. */ + + /* Character to start a comment. */ + #define ASM_COMMENT_START "#" + + /* Declare an uninitialized external linkage data object. */ + #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) + + /* Globalizing directive for a label. */ + #define GLOBAL_ASM_OP ".globl " + + /* Advance the location counter to a multiple of 2**LOG bytes. */ + #define ASM_OUTPUT_ALIGN(FILE, LOG) \ + if ((LOG)) fprintf ((FILE), "\t.align\t%d\n", 1 << (LOG)) + + /* Advance the location counter by SIZE bytes. */ + #define ASM_OUTPUT_SKIP(FILE, SIZE) \ + fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE)) + + /* Output a reference to a user-level label named NAME. */ + #define ASM_OUTPUT_LABELREF(FILE, NAME) \ + asm_fprintf ((FILE), "%U%s", (*targetm.strip_name_encoding) (NAME)) + + /* Store in OUTPUT a string (made with alloca) containing + an assembler-name for a local static variable named NAME. + LABELNO is an integer which is different for each call. */ + #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + ((OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ + sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) + + /* The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */ + #define LOCAL_LABEL_PREFIX "." + + /* Either simplify a location expression, or return the original. */ + #define ASM_SIMPLIFY_DWARF_ADDR(X) \ + s390_simplify_dwarf_addr (X) + + /* How to refer to registers in assembler output. This sequence is + indexed by compiler's hard-register-number (see above). */ + #define REGISTER_NAMES \ + { "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \ + "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", \ + "%f0", "%f2", "%f4", "%f6", "%f1", "%f3", "%f5", "%f7", \ + "%f8", "%f10", "%f12", "%f14", "%f9", "%f11", "%f13", "%f15", \ + "%ap", "%cc", "%fp" \ + } + + /* Print operand X (an rtx) in assembler syntax to file FILE. */ + #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE) + #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) + + /* Output an element of a case-vector that is absolute. */ + #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ + do { \ + char buf[32]; \ + fputs (integer_asm_op (UNITS_PER_WORD, TRUE), (FILE)); \ + ASM_GENERATE_INTERNAL_LABEL (buf, "L", (VALUE)); \ + assemble_name ((FILE), buf); \ + fputc ('\n', (FILE)); \ + } while (0) + + /* Output an element of a case-vector that is relative. */ + #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ + do { \ + char buf[32]; \ + fputs (integer_asm_op (UNITS_PER_WORD, TRUE), (FILE)); \ + ASM_GENERATE_INTERNAL_LABEL (buf, "L", (VALUE)); \ + assemble_name ((FILE), buf); \ + fputc ('-', (FILE)); \ + ASM_GENERATE_INTERNAL_LABEL (buf, "L", (REL)); \ + assemble_name ((FILE), buf); \ + fputc ('\n', (FILE)); \ + } while (0) + + /* Constant Pool for all symbols operands which are changed with force_const_mem during insn generation (expand_insn). */ extern int s390_pool_count; extern int s390_nr_constants; #define ASM_OUTPUT_POOL_PROLOGUE(FILE, FUNNAME, fndecl, size) \ { \ *************** extern int s390_pool_overflow; *** 1357,1372 **** if (GET_CODE (EXP) != CONST_DOUBLE) \ abort (); \ \ ! memcpy ((char *) &u, (char *) &CONST_DOUBLE_LOW (EXP), sizeof u); \ ! assemble_real (u.d, MODE, ALIGN); \ break; \ \ case MODE_INT: \ case MODE_PARTIAL_INT: \ ! if (flag_pic \ ! && (GET_CODE (EXP) == CONST \ ! || GET_CODE (EXP) == SYMBOL_REF \ ! || GET_CODE (EXP) == LABEL_REF )) \ { \ fputs (integer_asm_op (UNITS_PER_WORD, TRUE), FILE); \ s390_output_symbolic_const (FILE, EXP); \ --- 1034,1048 ---- if (GET_CODE (EXP) != CONST_DOUBLE) \ abort (); \ \ ! REAL_VALUE_FROM_CONST_DOUBLE (r, EXP); \ ! assemble_real (r, MODE, ALIGN); \ break; \ \ case MODE_INT: \ case MODE_PARTIAL_INT: \ ! if (GET_CODE (EXP) == CONST \ ! || GET_CODE (EXP) == SYMBOL_REF \ ! || GET_CODE (EXP) == LABEL_REF) \ { \ fputs (integer_asm_op (UNITS_PER_WORD, TRUE), FILE); \ s390_output_symbolic_const (FILE, EXP); \ *************** extern int s390_pool_overflow; *** 1386,1389 **** --- 1062,1115 ---- goto WIN; \ } + + /* Miscellaneous parameters. */ + + /* Define the codes that are matched by predicates in aux-output.c. */ + #define PREDICATE_CODES \ + {"s_operand", { SUBREG, MEM }}, \ + {"s_imm_operand", { CONST_INT, CONST_DOUBLE, SUBREG, MEM }}, \ + {"bras_sym_operand",{ SYMBOL_REF, CONST }}, \ + {"larl_operand", { SYMBOL_REF, CONST, CONST_INT, CONST_DOUBLE }}, \ + {"load_multiple_operation", {PARALLEL}}, \ + {"store_multiple_operation", {PARALLEL}}, \ + {"const0_operand", { CONST_INT, CONST_DOUBLE }}, \ + {"consttable_operand", { SYMBOL_REF, LABEL_REF, CONST, \ + CONST_INT, CONST_DOUBLE }}, \ + {"s390_plus_operand", { PLUS }}, + + /* Specify the machine mode that this machine uses for the index in the + tablejump instruction. */ + #define CASE_VECTOR_MODE (TARGET_64BIT ? DImode : SImode) + + /* Load from integral MODE < SI from memory into register makes sign_extend + or zero_extend + In our case sign_extension happens for Halfwords, other no extension. */ + #define LOAD_EXTEND_OP(MODE) \ + (TARGET_64BIT ? ((MODE) == QImode ? ZERO_EXTEND : \ + (MODE) == HImode ? SIGN_EXTEND : NIL) \ + : ((MODE) == HImode ? SIGN_EXTEND : NIL)) + + /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits + is done just by pretending it is already truncated. */ + #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 + + /* Specify the machine mode that pointers have. + After generation of rtl, the compiler makes no further distinction + between pointers and any other objects of this machine mode. */ + #define Pmode ((enum machine_mode) (TARGET_64BIT ? DImode : SImode)) + + /* A function address in a call instruction is a byte address (for + indexing purposes) so give the MEM rtx a byte's mode. */ + #define FUNCTION_MODE QImode + + /* This macro definition sets up a default value for `main' to return. */ + #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node) + + /* In rare cases, correct code generation requires extra machine dependent + processing between the second jump optimization pass and delayed branch + scheduling. On those machines, define this macro as a C statement to act on + the code starting at INSN. */ + #define MACHINE_DEPENDENT_REORG(INSN) s390_machine_dependent_reorg (INSN) + #endif diff -Nrc3pad gcc-3.2.3/gcc/config/s390/s390.md gcc-3.3/gcc/config/s390/s390.md *** gcc-3.2.3/gcc/config/s390/s390.md 2002-10-23 10:46:00.000000000 +0000 --- gcc-3.3/gcc/config/s390/s390.md 2003-03-28 20:29:04.000000000 +0000 *************** *** 1,5 **** ;;- Machine description for GNU compiler -- S/390 / zSeries version. ! ;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Contributed by Hartmut Penner (hpenner@de.ibm.com) and ;; Ulrich Weigand (uweigand@de.ibm.com). ;; This file is part of GNU CC. --- 1,5 ---- ;;- Machine description for GNU compiler -- S/390 / zSeries version. ! ;; Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;; Contributed by Hartmut Penner (hpenner@de.ibm.com) and ;; Ulrich Weigand (uweigand@de.ibm.com). ;; This file is part of GNU CC. *************** *** 44,49 **** --- 44,77 ---- ;; s_operand -- Matches a valid S operand in a RS, SI or SS type instruction. ;; + ;; + ;; UNSPEC usage + ;; + + (define_constants + [; TLS relocation specifiers + (UNSPEC_TLSGD 500) + (UNSPEC_TLSLDM 501) + (UNSPEC_NTPOFF 502) + (UNSPEC_DTPOFF 503) + (UNSPEC_GOTNTPOFF 504) + (UNSPEC_INDNTPOFF 505) + + ; TLS support + (UNSPEC_TP 510) + (UNSPEC_TLSLDM_NTPOFF 511) + (UNSPEC_TLS_LOAD 512) + ]) + + ;; + ;; UNSPEC_VOLATILE usage + ;; + + (define_constants + [; TLS support + (UNSPECV_SET_TP 500) + ]) + ;; Define an insn type attribute. This is used in function unit delay ;; computations. *************** *** 191,220 **** DONE; }") - ;(define_expand "cmphi" - ; [(set (reg:CC 33) - ; (compare:CC (match_operand:HI 0 "register_operand" "") - ; (match_operand:HI 1 "general_operand" "")))] - ; "" - ; " - ;{ - ; s390_compare_op0 = operands[0]; - ; s390_compare_op1 = operands[1]; - ; DONE; - ;}") - - ;(define_expand "cmpqi" - ; [(set (reg:CC 33) - ; (compare:CC (match_operand:QI 0 "register_operand" "") - ; (match_operand:QI 1 "general_operand" "")))] - ; "" - ; " - ;{ - ; s390_compare_op0 = operands[0]; - ; s390_compare_op1 = operands[1]; - ; DONE; - ;}") - (define_expand "cmpdf" [(set (reg:CC 33) (compare:CC (match_operand:DF 0 "register_operand" "") --- 219,224 ---- *************** *** 240,248 **** }") ! ; DI instructions ! (define_insn "*cmpdi_tm2" [(set (reg 33) (compare (zero_extract:DI (match_operand:DI 0 "register_operand" "d") (match_operand:DI 1 "const_int_operand" "n") --- 244,252 ---- }") ! ; Test-under-Mask (zero_extract) instructions ! (define_insn "*tmdi_ext" [(set (reg 33) (compare (zero_extract:DI (match_operand:DI 0 "register_operand" "d") (match_operand:DI 1 "const_int_operand" "n") *************** *** 272,306 **** }" [(set_attr "op_type" "RI")]) ! (define_insn "*cmpdi_tm_reg" [(set (reg 33) ! (compare (and:DI (match_operand:DI 0 "register_operand" "%d") ! (match_operand:DI 1 "immediate_operand" "n")) (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) && TARGET_64BIT ! && s390_single_hi (operands[1], DImode, 0) >= 0" "* { ! int part = s390_single_hi (operands[1], DImode, 0); ! operands[1] = GEN_INT (s390_extract_hi (operands[1], DImode, part)); switch (part) { ! case 0: return \"tmhh\\t%0,%x1\"; ! case 1: return \"tmhl\\t%0,%x1\"; ! case 2: return \"tmlh\\t%0,%x1\"; ! case 3: return \"tmll\\t%0,%x1\"; default: abort (); } }" [(set_attr "op_type" "RI")]) ! (define_insn "*cmpdi_tm_mem" [(set (reg 33) ! (compare (and:DI (match_operand:DI 0 "s_operand" "%Qo") ! (match_operand:DI 1 "immediate_operand" "n")) (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) && TARGET_64BIT && s390_single_qi (operands[1], DImode, 0) >= 0" "* { --- 276,338 ---- }" [(set_attr "op_type" "RI")]) ! (define_insn "*tmsi_ext" [(set (reg 33) ! (compare (zero_extract:SI (match_operand:SI 0 "register_operand" "d") ! (match_operand:SI 1 "const_int_operand" "n") ! (match_operand:SI 2 "const_int_operand" "n")) (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) ! && INTVAL (operands[1]) >= 1 && INTVAL (operands[2]) >= 0 ! && INTVAL (operands[1]) + INTVAL (operands[2]) <= 32 ! && (INTVAL (operands[1]) + INTVAL (operands[2]) - 1) >> 4 ! == INTVAL (operands[2]) >> 4" "* { ! int part = INTVAL (operands[2]) >> 4; ! int block = (1 << INTVAL (operands[1])) - 1; ! int shift = 16 - INTVAL (operands[1]) - (INTVAL (operands[2]) & 15); ! ! operands[2] = GEN_INT (block << shift); switch (part) { ! case 0: return \"tmh\\t%0,%x2\"; ! case 1: return \"tml\\t%0,%x2\"; default: abort (); } }" [(set_attr "op_type" "RI")]) ! (define_insn "*tmqi_ext" [(set (reg 33) ! (compare (zero_extract:SI (match_operand:QI 0 "memory_operand" "Q") ! (match_operand:SI 1 "const_int_operand" "n") ! (match_operand:SI 2 "const_int_operand" "n")) (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) ! && INTVAL (operands[1]) >= 1 && INTVAL (operands[2]) >= 0 ! && INTVAL (operands[1]) + INTVAL (operands[2]) <= 8" ! "* ! { ! int block = (1 << INTVAL (operands[1])) - 1; ! int shift = 8 - INTVAL (operands[1]) - INTVAL (operands[2]); ! ! operands[2] = GEN_INT (block << shift); ! return \"tm\\t%0,%b2\"; ! }" ! [(set_attr "op_type" "SI") ! (set_attr "atype" "mem")]) ! ! ; Test-under-Mask instructions ! ! (define_insn "*tmdi_mem" ! [(set (reg 33) ! (compare (and:DI (match_operand:DI 0 "memory_operand" "Q") ! (match_operand:DI 1 "immediate_operand" "n")) ! (match_operand:DI 2 "immediate_operand" "n")))] ! "TARGET_64BIT ! && s390_match_ccmode (insn, s390_tm_ccmode (operands[1], operands[2], 0)) && s390_single_qi (operands[1], DImode, 0) >= 0" "* { *************** *** 314,413 **** [(set_attr "op_type" "SI") (set_attr "atype" "mem")]) ! (define_insn "*ltgr" [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "const0_operand" ""))) ! (set (match_operand:DI 2 "register_operand" "=d") ! (match_dup 0))] ! "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" ! "ltgr\\t%2,%0" ! [(set_attr "op_type" "RRE")]) ! (define_insn "*cmpdi_ccs_0_64" ! [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "const0_operand" "")))] ! "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" ! "ltgr\\t%0,%0" ! [(set_attr "op_type" "RRE")]) ! (define_insn "*cmpdi_ccs_0_31" [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "const0_operand" "")))] ! "s390_match_ccmode(insn, CCSmode)" ! "srda\\t%0,0" ! [(set_attr "op_type" "RS")]) ! (define_insn "*cmpdi_ccs" ! [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d,d,d") ! (match_operand:DI 1 "general_operand" "d,K,m")))] ! "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" ! "@ ! cgr\\t%0,%1 ! cghi\\t%0,%c1 ! cg\\t%0,%1" ! [(set_attr "op_type" "RRE,RI,RXE") ! (set_attr "atype" "reg,reg,mem")]) ! ! (define_insn "*cmpdi_ccu" ! [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d,d") ! (match_operand:DI 1 "general_operand" "d,m")))] ! "s390_match_ccmode(insn, CCUmode) && TARGET_64BIT" ! "@ ! clgr\\t%0,%1 ! clg\\t%0,%1" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! (define_insn "*cmpdi_ccu_mem" [(set (reg 33) ! (compare (match_operand:DI 0 "s_operand" "oQ") ! (match_operand:DI 1 "s_imm_operand" "oQ")))] ! "s390_match_ccmode(insn, CCUmode)" ! "clc\\t%O0(8,%R0),%1" ! [(set_attr "op_type" "SS") (set_attr "atype" "mem")]) ! ; SI instructions ! ! (define_insn "*cmpsi_tm2" [(set (reg 33) ! (compare (zero_extract:SI (match_operand:SI 0 "register_operand" "d") ! (match_operand:SI 1 "const_int_operand" "n") ! (match_operand:SI 2 "const_int_operand" "n")) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) ! && INTVAL (operands[1]) >= 1 && INTVAL (operands[2]) >= 0 ! && INTVAL (operands[1]) + INTVAL (operands[2]) <= 32 ! && (INTVAL (operands[1]) + INTVAL (operands[2]) - 1) >> 4 ! == INTVAL (operands[2]) >> 4" "* { ! int part = INTVAL (operands[2]) >> 4; ! int block = (1 << INTVAL (operands[1])) - 1; ! int shift = 16 - INTVAL (operands[1]) - (INTVAL (operands[2]) & 15); ! ! operands[2] = GEN_INT (block << shift); switch (part) { ! case 0: return \"tmh\\t%0,%x2\"; ! case 1: return \"tml\\t%0,%x2\"; default: abort (); } }" [(set_attr "op_type" "RI")]) ! (define_insn "*cmpsi_tm_reg" [(set (reg 33) ! (compare (and:SI (match_operand:SI 0 "register_operand" "%d") (match_operand:SI 1 "immediate_operand" "n")) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) && s390_single_hi (operands[1], SImode, 0) >= 0" "* { --- 346,429 ---- [(set_attr "op_type" "SI") (set_attr "atype" "mem")]) ! (define_insn "*tmsi_mem" [(set (reg 33) ! (compare (and:SI (match_operand:SI 0 "memory_operand" "Q") ! (match_operand:SI 1 "immediate_operand" "n")) ! (match_operand:SI 2 "immediate_operand" "n")))] ! "s390_match_ccmode (insn, s390_tm_ccmode (operands[1], operands[2], 0)) ! && s390_single_qi (operands[1], SImode, 0) >= 0" ! "* ! { ! int part = s390_single_qi (operands[1], SImode, 0); ! operands[1] = GEN_INT (s390_extract_qi (operands[1], SImode, part)); ! operands[0] = gen_rtx_MEM (QImode, ! plus_constant (XEXP (operands[0], 0), part)); ! return \"tm\\t%0,%b1\"; ! }" ! [(set_attr "op_type" "SI") ! (set_attr "atype" "mem")]) ! (define_insn "*tmhi_mem" [(set (reg 33) ! (compare (and:SI (subreg:SI (match_operand:HI 0 "memory_operand" "Q") 0) ! (match_operand:SI 1 "immediate_operand" "n")) ! (match_operand:SI 2 "immediate_operand" "n")))] ! "s390_match_ccmode (insn, s390_tm_ccmode (operands[1], operands[2], 0)) ! && s390_single_qi (operands[1], HImode, 0) >= 0" ! "* ! { ! int part = s390_single_qi (operands[1], HImode, 0); ! operands[1] = GEN_INT (s390_extract_qi (operands[1], HImode, part)); ! operands[0] = gen_rtx_MEM (QImode, ! plus_constant (XEXP (operands[0], 0), part)); ! return \"tm\\t%0,%b1\"; ! }" ! [(set_attr "op_type" "SI") ! (set_attr "atype" "mem")]) ! (define_insn "*tmqi_mem" [(set (reg 33) ! (compare (and:SI (subreg:SI (match_operand:QI 0 "memory_operand" "Q") 0) ! (match_operand:SI 1 "immediate_operand" "n")) ! (match_operand:SI 2 "immediate_operand" "n")))] ! "s390_match_ccmode (insn, s390_tm_ccmode (operands[1], operands[2], 0))" ! "tm\\t%0,%b1" ! [(set_attr "op_type" "SI") (set_attr "atype" "mem")]) ! (define_insn "*tmdi_reg" [(set (reg 33) ! (compare (and:DI (match_operand:DI 0 "nonimmediate_operand" "d") ! (match_operand:DI 1 "immediate_operand" "n")) ! (match_operand:DI 2 "immediate_operand" "n")))] ! "TARGET_64BIT ! && s390_match_ccmode (insn, s390_tm_ccmode (operands[1], operands[2], 1)) ! && s390_single_hi (operands[1], DImode, 0) >= 0" "* { ! int part = s390_single_hi (operands[1], DImode, 0); ! operands[1] = GEN_INT (s390_extract_hi (operands[1], DImode, part)); switch (part) { ! case 0: return \"tmhh\\t%0,%x1\"; ! case 1: return \"tmhl\\t%0,%x1\"; ! case 2: return \"tmlh\\t%0,%x1\"; ! case 3: return \"tmll\\t%0,%x1\"; default: abort (); } }" [(set_attr "op_type" "RI")]) ! (define_insn "*tmsi_reg" [(set (reg 33) ! (compare (and:SI (match_operand:SI 0 "nonimmediate_operand" "d") (match_operand:SI 1 "immediate_operand" "n")) ! (match_operand:SI 2 "immediate_operand" "n")))] ! "s390_match_ccmode (insn, s390_tm_ccmode (operands[1], operands[2], 1)) && s390_single_hi (operands[1], SImode, 0) >= 0" "* { *************** *** 423,479 **** }" [(set_attr "op_type" "RI")]) ! (define_insn "*cmpsi_tm_mem" [(set (reg 33) ! (compare (and:SI (match_operand:SI 0 "s_operand" "%Qo") ! (match_operand:SI 1 "immediate_operand" "n")) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) ! && s390_single_qi (operands[1], SImode, 0) >= 0" ! "* ! { ! int part = s390_single_qi (operands[1], SImode, 0); ! operands[1] = GEN_INT (s390_extract_qi (operands[1], SImode, part)); ! operands[0] = gen_rtx_MEM (QImode, ! plus_constant (XEXP (operands[0], 0), part)); ! return \"tm\\t%0,%b1\"; ! }" ! [(set_attr "op_type" "SI") ! (set_attr "atype" "mem")]) ! (define_insn "*ltr" [(set (reg 33) ! (compare (match_operand:SI 0 "register_operand" "d") ! (match_operand:SI 1 "const0_operand" ""))) ! (set (match_operand:SI 2 "register_operand" "=d") (match_dup 0))] ! "s390_match_ccmode(insn, CCSmode)" ! "ltr\\t%2,%0" ! [(set_attr "op_type" "RR")]) ! (define_insn "*icm15" [(set (reg 33) ! (compare (match_operand:SI 0 "s_operand" "Qo") (match_operand:SI 1 "const0_operand" ""))) ! (set (match_operand:SI 2 "register_operand" "=d") (match_dup 0))] "s390_match_ccmode(insn, CCSmode)" ! "icm\\t%2,15,%0" ! [(set_attr "op_type" "RS") ! (set_attr "atype" "mem")]) ! (define_insn "*icm15_cconly" [(set (reg 33) ! (compare (match_operand:SI 0 "s_operand" "Qo") (match_operand:SI 1 "const0_operand" ""))) ! (clobber (match_scratch:SI 2 "=d"))] "s390_match_ccmode(insn, CCSmode)" ! "icm\\t%2,15,%0" ! [(set_attr "op_type" "RS") ! (set_attr "atype" "mem")]) ! (define_insn "*cmpsi_ccs_0" [(set (reg 33) (compare (match_operand:SI 0 "register_operand" "d") (match_operand:SI 1 "const0_operand" "")))] --- 439,526 ---- }" [(set_attr "op_type" "RI")]) ! (define_insn "*tmhi_full" [(set (reg 33) ! (compare (match_operand:HI 0 "register_operand" "d") ! (match_operand:HI 1 "immediate_operand" "n")))] ! "s390_match_ccmode (insn, s390_tm_ccmode (GEN_INT (-1), operands[1], 1))" ! "tml\\t%0,65535" ! [(set_attr "op_type" "RX")]) ! (define_insn "*tmqi_full" ! [(set (reg 33) ! (compare (match_operand:QI 0 "register_operand" "d") ! (match_operand:QI 1 "immediate_operand" "n")))] ! "s390_match_ccmode (insn, s390_tm_ccmode (GEN_INT (-1), operands[1], 1))" ! "tml\\t%0,255" ! [(set_attr "op_type" "RI")]) ! ! ; Load-and-Test instructions ! ! (define_insn "*tstdi_sign" [(set (reg 33) ! (compare (ashiftrt:DI (ashift:DI (subreg:DI (match_operand:SI 0 "register_operand" "d") 0) ! (const_int 32)) (const_int 32)) ! (match_operand:DI 1 "const0_operand" ""))) ! (set (match_operand:DI 2 "register_operand" "=d") ! (sign_extend:DI (match_dup 0)))] ! "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" ! "ltgfr\\t%2,%0" ! [(set_attr "op_type" "RRE")]) ! ! (define_insn "*tstdi" ! [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "const0_operand" ""))) ! (set (match_operand:DI 2 "register_operand" "=d") (match_dup 0))] ! "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" ! "ltgr\\t%2,%0" ! [(set_attr "op_type" "RRE")]) ! (define_insn "*tstdi_cconly" [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "const0_operand" "")))] ! "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" ! "ltgr\\t%0,%0" ! [(set_attr "op_type" "RRE")]) ! ! (define_insn "*tstdi_cconly_31" ! [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "const0_operand" "")))] ! "s390_match_ccmode(insn, CCSmode) && !TARGET_64BIT" ! "srda\\t%0,0" ! [(set_attr "op_type" "RS")]) ! ! (define_insn "*tstsi" ! [(set (reg 33) ! (compare (match_operand:SI 0 "nonimmediate_operand" "d,Q") (match_operand:SI 1 "const0_operand" ""))) ! (set (match_operand:SI 2 "register_operand" "=d,d") (match_dup 0))] "s390_match_ccmode(insn, CCSmode)" ! "@ ! ltr\\t%2,%0 ! icm\\t%2,15,%0" ! [(set_attr "op_type" "RR,RS") ! (set_attr "atype" "reg,mem")]) ! (define_insn "*tstsi_cconly" [(set (reg 33) ! (compare (match_operand:SI 0 "nonimmediate_operand" "d,Q") (match_operand:SI 1 "const0_operand" ""))) ! (clobber (match_scratch:SI 2 "=X,d"))] "s390_match_ccmode(insn, CCSmode)" ! "@ ! ltr\\t%0,%0 ! icm\\t%2,15,%0" ! [(set_attr "op_type" "RR,RS") ! (set_attr "atype" "reg,mem")]) ! (define_insn "*tstsi_cconly2" [(set (reg 33) (compare (match_operand:SI 0 "register_operand" "d") (match_operand:SI 1 "const0_operand" "")))] *************** *** 481,552 **** "ltr\\t%0,%0" [(set_attr "op_type" "RR")]) ! (define_insn "*cmpsidi_ccs" ! [(set (reg 33) ! (compare (match_operand:SI 0 "register_operand" "d") ! (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))))] ! "s390_match_ccmode(insn, CCSmode)" ! "ch\\t%0,%1" ! [(set_attr "op_type" "RR") ! (set_attr "atype" "mem")]) ! ! (define_insn "*cmpsi_ccs" ! [(set (reg 33) ! (compare (match_operand:SI 0 "register_operand" "d,d,d") ! (match_operand:SI 1 "general_operand" "d,K,m")))] ! "s390_match_ccmode(insn, CCSmode)" ! "@ ! cr\\t%0,%1 ! chi\\t%0,%c1 ! c\\t%0,%1" ! [(set_attr "op_type" "RR,RI,RX") ! (set_attr "atype" "reg,reg,mem")]) ! ! (define_insn "*cmpsi_ccu" [(set (reg 33) ! (compare (match_operand:SI 0 "register_operand" "d,d") ! (match_operand:SI 1 "general_operand" "d,m")))] ! "s390_match_ccmode(insn, CCUmode)" "@ ! clr\\t%0,%1 ! cl\\t%0,%1" ! [(set_attr "op_type" "RR,RX") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*cmpsi_ccu_mem" ! [(set (reg 33) ! (compare (match_operand:SI 0 "s_operand" "oQ") ! (match_operand:SI 1 "s_imm_operand" "oQ")))] ! "s390_match_ccmode(insn, CCUmode)" ! "clc\\t%O0(4,%R0),%1" ! [(set_attr "op_type" "SS") ! (set_attr "atype" "mem")]) ! ! ! ; HI instructions ! (define_insn "*cmphi_tm_sub" [(set (reg 33) ! (compare (and:SI (subreg:SI (match_operand:HI 0 "s_operand" "%Qo") 0) ! (match_operand:SI 1 "immediate_operand" "n")) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) ! && s390_single_qi (operands[1], HImode, 0) >= 0" ! "* ! { ! int part = s390_single_qi (operands[1], HImode, 0); ! operands[1] = GEN_INT (s390_extract_qi (operands[1], HImode, part)); ! ! operands[0] = gen_rtx_MEM (QImode, ! plus_constant (XEXP (operands[0], 0), part)); ! return \"tm\\t%0,%b1\"; ! }" ! [(set_attr "op_type" "SI") ! (set_attr "atype" "mem")]) ! (define_insn "*icm3" [(set (reg 33) ! (compare (match_operand:HI 0 "s_operand" "Qo") (match_operand:HI 1 "const0_operand" ""))) (set (match_operand:HI 2 "register_operand" "=d") (match_dup 0))] --- 528,561 ---- "ltr\\t%0,%0" [(set_attr "op_type" "RR")]) ! (define_insn "*tsthiCCT" [(set (reg 33) ! (compare (match_operand:HI 0 "nonimmediate_operand" "?Q,d") ! (match_operand:HI 1 "const0_operand" ""))) ! (set (match_operand:HI 2 "register_operand" "=d,0") ! (match_dup 0))] ! "s390_match_ccmode(insn, CCTmode)" "@ ! icm\\t%2,3,%0 ! tml\\t%0,65535" ! [(set_attr "op_type" "RS,RI") ! (set_attr "atype" "mem,reg")]) ! (define_insn "*tsthiCCT_cconly" [(set (reg 33) ! (compare (match_operand:HI 0 "nonimmediate_operand" "Q,d") ! (match_operand:HI 1 "const0_operand" ""))) ! (clobber (match_scratch:HI 2 "=d,X"))] ! "s390_match_ccmode(insn, CCTmode)" ! "@ ! icm\\t%2,3,%0 ! tml\\t%0,65535" ! [(set_attr "op_type" "RS,RI") ! (set_attr "atype" "mem,reg")]) ! (define_insn "*tsthi" [(set (reg 33) ! (compare (match_operand:HI 0 "s_operand" "Q") (match_operand:HI 1 "const0_operand" ""))) (set (match_operand:HI 2 "register_operand" "=d") (match_dup 0))] *************** *** 555,571 **** [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*cmphi_cct_0" ! [(set (reg 33) ! (compare (match_operand:HI 0 "register_operand" "d") ! (match_operand:HI 1 "const0_operand" "")))] ! "s390_match_ccmode(insn, CCTmode)" ! "tml\\t%0,65535" ! [(set_attr "op_type" "RX")]) ! ! (define_insn "*cmphi_ccs_0" [(set (reg 33) ! (compare (match_operand:HI 0 "s_operand" "Qo") (match_operand:HI 1 "const0_operand" ""))) (clobber (match_scratch:HI 2 "=d"))] "s390_match_ccmode(insn, CCSmode)" --- 564,572 ---- [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*tsthi_cconly" [(set (reg 33) ! (compare (match_operand:HI 0 "s_operand" "Q") (match_operand:HI 1 "const0_operand" ""))) (clobber (match_scratch:HI 2 "=d"))] "s390_match_ccmode(insn, CCSmode)" *************** *** 573,713 **** [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*cmphi_ccu" [(set (reg 33) ! (compare (match_operand:HI 0 "register_operand" "d") ! (match_operand:HI 1 "s_imm_operand" "Qo")))] ! "s390_match_ccmode(insn, CCUmode)" ! "clm\\t%0,3,%1" [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*cmphi_ccu_mem" [(set (reg 33) ! (compare (match_operand:HI 0 "s_operand" "oQ") ! (match_operand:HI 1 "s_imm_operand" "oQ")))] ! "s390_match_ccmode(insn, CCUmode)" ! "clc\\t%O0(2,%R0),%1" ! [(set_attr "op_type" "SS") (set_attr "atype" "mem")]) ! ; QI instructions ! ! (define_insn "*cmpqi_tm2" ! [(set (reg 33) ! (compare (zero_extract:SI (match_operand:QI 0 "s_operand" "Qo") ! (match_operand:SI 1 "const_int_operand" "n") ! (match_operand:SI 2 "const_int_operand" "n")) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) ! && INTVAL (operands[1]) >= 1 && INTVAL (operands[2]) >= 0 ! && INTVAL (operands[1]) + INTVAL (operands[2]) <= 8" ! "* ! { ! int block = (1 << INTVAL (operands[1])) - 1; ! int shift = 8 - INTVAL (operands[1]) - INTVAL (operands[2]); ! ! operands[2] = GEN_INT (block << shift); ! return \"tm\\t%0,%b2\"; ! }" ! [(set_attr "op_type" "SI") ! (set_attr "atype" "mem")]) ! (define_insn "*cmpqi_tm" [(set (reg 33) ! (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%d,Q") ! (match_operand:QI 1 "immediate_operand" "n,n")) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode)" "@ ! tml\\t%0,%b1 ! tm\\t%0,%b1" ! [(set_attr "op_type" "RI,SI") (set_attr "atype" "reg,mem")]) ! (define_insn "*cmpqi_tm_sub" [(set (reg 33) ! (compare (and:SI (subreg:SI (match_operand:QI 0 "s_operand" "%Qo") 0) ! (match_operand:SI 1 "immediate_operand" "n")) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode)" ! "tm\\t%0,%b1" ! [(set_attr "op_type" "SI") (set_attr "atype" "mem")]) ! (define_insn "*icm1" [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "Qo") ! (match_operand:QI 1 "const0_operand" ""))) ! (set (match_operand:QI 2 "register_operand" "=d") ! (match_dup 0))] "s390_match_ccmode(insn, CCSmode)" ! "icm\\t%2,1,%0" ! [(set_attr "op_type" "RS") ! (set_attr "atype" "mem")]) ! (define_insn "*tm_0" [(set (reg 33) ! (compare (zero_extend:SI (and:QI (match_operand:QI 0 "s_operand" "Qo") ! (match_operand:QI 1 "immediate_operand" ""))) ! (const_int 0)))] ! "s390_match_ccmode(insn, CCTmode) && ! INTVAL(operands[1]) >= 0 && INTVAL(operands[1]) < 256" ! "tm\\t%0,%1" ! [(set_attr "op_type" "RI") ! (set_attr "atype" "mem")]) ! (define_insn "*cmpqi_cct_0" [(set (reg 33) ! (compare (match_operand:QI 0 "register_operand" "d") ! (match_operand:QI 1 "const0_operand" "")))] ! "s390_match_ccmode(insn, CCTmode)" ! "tml\\t%0,255" ! [(set_attr "op_type" "RI")]) ! (define_insn "*cmpqi_ccs_0" [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "Qo") ! (match_operand:QI 1 "const0_operand" ""))) ! (clobber (match_scratch:QI 2 "=d"))] ! "s390_match_ccmode(insn, CCSmode)" ! "icm\\t%2,1,%0" ! [(set_attr "op_type" "RS") ! (set_attr "atype" "mem")]) ! (define_insn "*cmpqi_ccu_0" [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "Qo") ! (match_operand:QI 1 "const0_operand" "")))] "s390_match_ccmode(insn, CCUmode)" ! "cli\\t%0,0" ! [(set_attr "op_type" "SI") (set_attr "atype" "mem")]) (define_insn "*cmpqi_ccu" [(set (reg 33) (compare (match_operand:QI 0 "register_operand" "d") ! (match_operand:QI 1 "s_imm_operand" "Qo")))] "s390_match_ccmode(insn, CCUmode)" "clm\\t%0,1,%1" [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*cmpqi_ccu_immed" [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "Qo") ! (match_operand:QI 1 "const_int_operand" "n")))] ! "s390_match_ccmode(insn, CCUmode) && ! INTVAL(operands[1]) >= 0 && INTVAL(operands[1]) < 256" ! "cli\\t%0,%1" [(set_attr "op_type" "SI") (set_attr "atype" "mem")]) (define_insn "*cmpqi_ccu_mem" [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "oQ") ! (match_operand:QI 1 "s_imm_operand" "oQ")))] "s390_match_ccmode(insn, CCUmode)" "clc\\t%O0(1,%R0),%1" [(set_attr "op_type" "SS") --- 574,765 ---- [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*tstqiCCT" [(set (reg 33) ! (compare (match_operand:QI 0 "nonimmediate_operand" "?Q,d") ! (match_operand:QI 1 "const0_operand" ""))) ! (set (match_operand:QI 2 "register_operand" "=d,0") ! (match_dup 0))] ! "s390_match_ccmode(insn, CCTmode)" ! "@ ! icm\\t%2,1,%0 ! tml\\t%0,255" ! [(set_attr "op_type" "RS,RI") ! (set_attr "atype" "mem,reg")]) ! ! (define_insn "*tstqiCCT_cconly" ! [(set (reg 33) ! (compare (match_operand:QI 0 "nonimmediate_operand" "?Q,d") ! (match_operand:QI 1 "const0_operand" "")))] ! "s390_match_ccmode(insn, CCTmode)" ! "@ ! cli\\t%0,0 ! tml\\t%0,255" ! [(set_attr "op_type" "SI,RI") ! (set_attr "atype" "mem,reg")]) ! ! (define_insn "*tstqi" ! [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "Q") ! (match_operand:QI 1 "const0_operand" ""))) ! (set (match_operand:QI 2 "register_operand" "=d") ! (match_dup 0))] ! "s390_match_ccmode(insn, CCSmode)" ! "icm\\t%2,1,%0" [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*tstqi_cconly" [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "Q") ! (match_operand:QI 1 "const0_operand" ""))) ! (clobber (match_scratch:QI 2 "=d"))] ! "s390_match_ccmode(insn, CCSmode)" ! "icm\\t%2,1,%0" ! [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! ; Compare (signed) instructions ! (define_insn "*cmpdi_ccs_sign" [(set (reg 33) ! (compare (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "d,m")) ! (match_operand:DI 0 "register_operand" "d,d")))] ! "s390_match_ccmode(insn, CCSRmode) && TARGET_64BIT" "@ ! cgfr\\t%0,%1 ! cgf\\t%0,%1" ! [(set_attr "op_type" "RRE,RXE") (set_attr "atype" "reg,mem")]) ! (define_insn "*cmpdi_ccs" [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d,d,d") ! (match_operand:DI 1 "general_operand" "d,K,m")))] ! "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" ! "@ ! cgr\\t%0,%1 ! cghi\\t%0,%c1 ! cg\\t%0,%1" ! [(set_attr "op_type" "RRE,RI,RXE") ! (set_attr "atype" "reg,reg,mem")]) ! ! (define_insn "*cmpsi_ccs_sign" ! [(set (reg 33) ! (compare (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")) ! (match_operand:SI 0 "register_operand" "d")))] ! "s390_match_ccmode(insn, CCSRmode)" ! "ch\\t%0,%1" ! [(set_attr "op_type" "RX") (set_attr "atype" "mem")]) ! (define_insn "*cmpsi_ccs" [(set (reg 33) ! (compare (match_operand:SI 0 "register_operand" "d,d,d") ! (match_operand:SI 1 "general_operand" "d,K,m")))] "s390_match_ccmode(insn, CCSmode)" ! "@ ! cr\\t%0,%1 ! chi\\t%0,%c1 ! c\\t%0,%1" ! [(set_attr "op_type" "RR,RI,RX") ! (set_attr "atype" "reg,reg,mem")]) ! ! ; Compare (unsigned) instructions ! ! (define_insn "*cmpdi_ccu_zero" [(set (reg 33) ! (compare (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "d,m")) ! (match_operand:DI 0 "register_operand" "d,d")))] ! "s390_match_ccmode(insn, CCURmode) && TARGET_64BIT" ! "@ ! clgfr\\t%0,%1 ! clgf\\t%0,%1" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! (define_insn "*cmpdi_ccu" [(set (reg 33) ! (compare (match_operand:DI 0 "register_operand" "d,d") ! (match_operand:DI 1 "general_operand" "d,m")))] ! "s390_match_ccmode(insn, CCUmode) && TARGET_64BIT" ! "@ ! clgr\\t%0,%1 ! clg\\t%0,%1" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! (define_insn "*cmpsi_ccu" [(set (reg 33) ! (compare (match_operand:SI 0 "register_operand" "d,d") ! (match_operand:SI 1 "general_operand" "d,m")))] ! "s390_match_ccmode(insn, CCUmode)" ! "@ ! clr\\t%0,%1 ! cl\\t%0,%1" ! [(set_attr "op_type" "RR,RX") ! (set_attr "atype" "reg,mem")]) ! (define_insn "*cmphi_ccu" [(set (reg 33) ! (compare (match_operand:HI 0 "register_operand" "d") ! (match_operand:HI 1 "s_imm_operand" "Q")))] "s390_match_ccmode(insn, CCUmode)" ! "clm\\t%0,3,%1" ! [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) (define_insn "*cmpqi_ccu" [(set (reg 33) (compare (match_operand:QI 0 "register_operand" "d") ! (match_operand:QI 1 "s_imm_operand" "Q")))] "s390_match_ccmode(insn, CCUmode)" "clm\\t%0,1,%1" [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn "*cli" [(set (reg 33) ! (compare (match_operand:QI 0 "memory_operand" "Q") ! (match_operand:QI 1 "immediate_operand" "n")))] ! "s390_match_ccmode (insn, CCUmode)" ! "cli\\t%0,%b1" [(set_attr "op_type" "SI") (set_attr "atype" "mem")]) + (define_insn "*cmpdi_ccu_mem" + [(set (reg 33) + (compare (match_operand:DI 0 "s_operand" "Q") + (match_operand:DI 1 "s_imm_operand" "Q")))] + "s390_match_ccmode(insn, CCUmode)" + "clc\\t%O0(8,%R0),%1" + [(set_attr "op_type" "SS") + (set_attr "atype" "mem")]) + + (define_insn "*cmpsi_ccu_mem" + [(set (reg 33) + (compare (match_operand:SI 0 "s_operand" "Q") + (match_operand:SI 1 "s_imm_operand" "Q")))] + "s390_match_ccmode(insn, CCUmode)" + "clc\\t%O0(4,%R0),%1" + [(set_attr "op_type" "SS") + (set_attr "atype" "mem")]) + + (define_insn "*cmphi_ccu_mem" + [(set (reg 33) + (compare (match_operand:HI 0 "s_operand" "Q") + (match_operand:HI 1 "s_imm_operand" "Q")))] + "s390_match_ccmode(insn, CCUmode)" + "clc\\t%O0(2,%R0),%1" + [(set_attr "op_type" "SS") + (set_attr "atype" "mem")]) + (define_insn "*cmpqi_ccu_mem" [(set (reg 33) ! (compare (match_operand:QI 0 "s_operand" "Q") ! (match_operand:QI 1 "s_imm_operand" "Q")))] "s390_match_ccmode(insn, CCUmode)" "clc\\t%O0(1,%R0),%1" [(set_attr "op_type" "SS") *************** *** 804,827 **** ; movti instruction pattern(s). ; - (define_insn "*movti_ss" - [(set (match_operand:TI 0 "s_operand" "=Qo") - (match_operand:TI 1 "s_imm_operand" "Qo"))] - "" - "mvc\\t%O0(16,%R0),%1" - [(set_attr "op_type" "SS") - (set_attr "atype" "mem")]) - (define_insn "movti" ! [(set (match_operand:TI 0 "nonimmediate_operand" "=d,Q,d,m") ! (match_operand:TI 1 "general_operand" "Q,d,dKm,d"))] "TARGET_64BIT" "@ lmg\\t%0,%N0,%1 stmg\\t%1,%N1,%0 # ! #" ! [(set_attr "op_type" "RSE,RSE,NN,NN") (set_attr "atype" "mem")]) (define_split --- 856,872 ---- ; movti instruction pattern(s). ; (define_insn "movti" ! [(set (match_operand:TI 0 "nonimmediate_operand" "=d,Q,d,o,Q") ! (match_operand:TI 1 "general_operand" "Q,d,dKo,d,Q"))] "TARGET_64BIT" "@ lmg\\t%0,%N0,%1 stmg\\t%1,%N1,%0 # ! # ! mvc\\t%O0(16,%R0),%1" ! [(set_attr "op_type" "RSE,RSE,NN,NN,SS") (set_attr "atype" "mem")]) (define_split *************** *** 864,897 **** (match_operand:TI 1 "memory_operand" ""))] "TARGET_64BIT && reload_completed && !s_operand (operands[1], VOIDmode)" ! [(set (match_dup 2) (match_dup 3)) ! (set (match_dup 0) (mem:TI (match_dup 2)))] ! "operands[2] = operand_subword (operands[0], 1, 0, TImode); ! operands[3] = legitimize_la_operand (XEXP (operands[1], 0));") ; ; movdi instruction pattern(s). ; - ;; If generating PIC code and operands[1] is a symbolic CONST, emit a - ;; move to get the address of the symbolic object from the GOT. - (define_expand "movdi" [(set (match_operand:DI 0 "general_operand" "") (match_operand:DI 1 "general_operand" ""))] "" " { ! /* Handle PIC symbolic constants. */ ! if (TARGET_64BIT && flag_pic && SYMBOLIC_CONST (operands[1])) ! emit_pic_move (operands, DImode); /* During and after reload, we need to force constants to the literal pool ourselves, if necessary. */ if ((reload_in_progress || reload_completed) && CONSTANT_P (operands[1]) && (!legitimate_reload_constant_p (operands[1]) ! || fp_operand (operands[0], VOIDmode))) operands[1] = force_const_mem (DImode, operands[1]); }") --- 909,942 ---- (match_operand:TI 1 "memory_operand" ""))] "TARGET_64BIT && reload_completed && !s_operand (operands[1], VOIDmode)" ! [(set (match_dup 0) (match_dup 1))] ! " ! { ! rtx addr = operand_subword (operands[0], 1, 0, TImode); ! s390_load_address (addr, XEXP (operands[1], 0)); ! operands[1] = replace_equiv_address (operands[1], addr); ! }") ; ; movdi instruction pattern(s). ; (define_expand "movdi" [(set (match_operand:DI 0 "general_operand" "") (match_operand:DI 1 "general_operand" ""))] "" " { ! /* Handle symbolic constants. */ ! if (TARGET_64BIT && SYMBOLIC_CONST (operands[1])) ! emit_symbolic_move (operands); /* During and after reload, we need to force constants to the literal pool ourselves, if necessary. */ if ((reload_in_progress || reload_completed) && CONSTANT_P (operands[1]) && (!legitimate_reload_constant_p (operands[1]) ! || FP_REG_P (operands[0]))) operands[1] = force_const_mem (DImode, operands[1]); }") *************** *** 901,907 **** "TARGET_64BIT && GET_CODE (operands[1]) == CONST_INT && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K') ! && !fp_operand (operands[0], VOIDmode)" "lghi\\t%0,%h1" [(set_attr "op_type" "RI") (set_attr "atype" "reg")]) --- 946,952 ---- "TARGET_64BIT && GET_CODE (operands[1]) == CONST_INT && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K') ! && !FP_REG_P (operands[0])" "lghi\\t%0,%h1" [(set_attr "op_type" "RI") (set_attr "atype" "reg")]) *************** *** 910,916 **** [(set (match_operand:DI 0 "register_operand" "=d") (match_operand:DI 1 "immediate_operand" "n"))] "TARGET_64BIT && s390_single_hi (operands[1], DImode, 0) >= 0 ! && !fp_operand (operands[0], VOIDmode)" "* { int part = s390_single_hi (operands[1], DImode, 0); --- 955,961 ---- [(set (match_operand:DI 0 "register_operand" "=d") (match_operand:DI 1 "immediate_operand" "n"))] "TARGET_64BIT && s390_single_hi (operands[1], DImode, 0) >= 0 ! && !FP_REG_P (operands[0])" "* { int part = s390_single_hi (operands[1], DImode, 0); *************** *** 932,954 **** [(set (match_operand:DI 0 "register_operand" "=d") (match_operand:DI 1 "larl_operand" "X"))] "TARGET_64BIT ! && !fp_operand (operands[0], VOIDmode)" "larl\\t%0,%1" [(set_attr "op_type" "RIL") (set_attr "atype" "reg") (set_attr "type" "la")]) - (define_insn "*movdi_ss" - [(set (match_operand:DI 0 "s_operand" "=Qo") - (match_operand:DI 1 "s_imm_operand" "Qo"))] - "" - "mvc\\t%O0(8,%R0),%1" - [(set_attr "op_type" "SS") - (set_attr "atype" "mem")]) - (define_insn "*movdi_64" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,m,!*f,!*f,!m") ! (match_operand:DI 1 "general_operand" "d,m,d,*f,m,*f"))] "TARGET_64BIT" "@ lgr\\t%0,%1 --- 977,991 ---- [(set (match_operand:DI 0 "register_operand" "=d") (match_operand:DI 1 "larl_operand" "X"))] "TARGET_64BIT ! && !FP_REG_P (operands[0])" "larl\\t%0,%1" [(set_attr "op_type" "RIL") (set_attr "atype" "reg") (set_attr "type" "la")]) (define_insn "*movdi_64" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,m,!*f,!*f,!m,?Q") ! (match_operand:DI 1 "general_operand" "d,m,d,*f,m,*f,?Q"))] "TARGET_64BIT" "@ lgr\\t%0,%1 *************** *** 956,968 **** stg\\t%1,%0 ldr\\t%0,%1 ld\\t%0,%1 ! std\\t%1,%0" ! [(set_attr "op_type" "RRE,RXE,RXE,RR,RX,RX") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem")]) (define_insn "*movdi_31" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,Q,d,m,!*f,!*f,!m") ! (match_operand:DI 1 "general_operand" "Q,d,dKm,d,*f,m,*f"))] "!TARGET_64BIT" "@ lm\\t%0,%N0,%1 --- 993,1006 ---- stg\\t%1,%0 ldr\\t%0,%1 ld\\t%0,%1 ! std\\t%1,%0 ! mvc\\t%O0(8,%R0),%1" ! [(set_attr "op_type" "RRE,RXE,RXE,RR,RX,RX,SS") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem,mem")]) (define_insn "*movdi_31" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,Q,d,o,!*f,!*f,!m,Q") ! (match_operand:DI 1 "general_operand" "Q,d,dKo,d,*f,m,*f,Q"))] "!TARGET_64BIT" "@ lm\\t%0,%N0,%1 *************** *** 971,986 **** # ldr\\t%0,%1 ld\\t%0,%1 ! std\\t%1,%0" ! [(set_attr "op_type" "RS,RS,NN,NN,RR,RX,RX") ! (set_attr "atype" "mem,mem,*,*,reg,mem,mem")]) (define_split [(set (match_operand:DI 0 "nonimmediate_operand" "") (match_operand:DI 1 "general_operand" ""))] "!TARGET_64BIT && reload_completed ! && !fp_operand (operands[0], VOIDmode) ! && !fp_operand (operands[1], VOIDmode) && !s_operand (operands[0], VOIDmode) && !s_operand (operands[1], VOIDmode) && (register_operand (operands[0], VOIDmode) --- 1009,1025 ---- # ldr\\t%0,%1 ld\\t%0,%1 ! std\\t%1,%0 ! mvc\\t%O0(8,%R0),%1" ! [(set_attr "op_type" "RS,RS,NN,NN,RR,RX,RX,SS") ! (set_attr "atype" "mem,mem,*,*,reg,mem,mem,mem")]) (define_split [(set (match_operand:DI 0 "nonimmediate_operand" "") (match_operand:DI 1 "general_operand" ""))] "!TARGET_64BIT && reload_completed ! && !FP_REG_P (operands[0]) ! && !FP_REG_P (operands[1]) && !s_operand (operands[0], VOIDmode) && !s_operand (operands[1], VOIDmode) && (register_operand (operands[0], VOIDmode) *************** *** 1016,1045 **** [(set (match_operand:DI 0 "register_operand" "") (match_operand:DI 1 "memory_operand" ""))] "!TARGET_64BIT && reload_completed ! && !fp_operand (operands[0], VOIDmode) ! && !fp_operand (operands[1], VOIDmode) && !s_operand (operands[1], VOIDmode)" ! [(set (match_dup 2) (match_dup 3)) ! (set (match_dup 0) (mem:DI (match_dup 2)))] ! "operands[2] = operand_subword (operands[0], 1, 0, DImode); ! operands[3] = legitimize_la_operand (XEXP (operands[1], 0));") ; ; movsi instruction pattern(s). ; - ;; If generating PIC code and operands[1] is a symbolic CONST, emit a - ;; move to get the address of the symbolic object from the GOT. - (define_expand "movsi" [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" " { ! /* Handle PIC symbolic constants. */ ! if (!TARGET_64BIT && flag_pic && SYMBOLIC_CONST (operands[1])) ! emit_pic_move (operands, SImode); /* expr.c tries to load an effective address using force_reg. This fails because we don't have a --- 1055,1096 ---- [(set (match_operand:DI 0 "register_operand" "") (match_operand:DI 1 "memory_operand" ""))] "!TARGET_64BIT && reload_completed ! && !FP_REG_P (operands[0]) ! && !FP_REG_P (operands[1]) && !s_operand (operands[1], VOIDmode)" ! [(set (match_dup 0) (match_dup 1))] ! " ! { ! rtx addr = operand_subword (operands[0], 1, 0, DImode); ! s390_load_address (addr, XEXP (operands[1], 0)); ! operands[1] = replace_equiv_address (operands[1], addr); ! }") ! ! (define_peephole2 ! [(set (match_operand:DI 0 "register_operand" "") ! (mem:DI (match_operand 1 "address_operand" "")))] ! "TARGET_64BIT ! && !FP_REG_P (operands[0]) ! && GET_CODE (operands[1]) == SYMBOL_REF ! && CONSTANT_POOL_ADDRESS_P (operands[1]) ! && get_pool_mode (operands[1]) == DImode ! && legitimate_reload_constant_p (get_pool_constant (operands[1]))" ! [(set (match_dup 0) (match_dup 2))] ! "operands[2] = get_pool_constant (operands[1]);") ; ; movsi instruction pattern(s). ; (define_expand "movsi" [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" " { ! /* Handle symbolic constants. */ ! if (!TARGET_64BIT && SYMBOLIC_CONST (operands[1])) ! emit_symbolic_move (operands); /* expr.c tries to load an effective address using force_reg. This fails because we don't have a *************** *** 1059,1065 **** if ((reload_in_progress || reload_completed) && CONSTANT_P (operands[1]) && (!legitimate_reload_constant_p (operands[1]) ! || fp_operand (operands[0], VOIDmode))) operands[1] = force_const_mem (SImode, operands[1]); }") --- 1110,1116 ---- if ((reload_in_progress || reload_completed) && CONSTANT_P (operands[1]) && (!legitimate_reload_constant_p (operands[1]) ! || FP_REG_P (operands[0]))) operands[1] = force_const_mem (SImode, operands[1]); }") *************** *** 1068,1074 **** (match_operand:SI 1 "immediate_operand" "K"))] "GET_CODE (operands[1]) == CONST_INT && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K') ! && !fp_operand (operands[0], VOIDmode)" "lhi\\t%0,%h1" [(set_attr "op_type" "RI")]) --- 1119,1125 ---- (match_operand:SI 1 "immediate_operand" "K"))] "GET_CODE (operands[1]) == CONST_INT && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K') ! && !FP_REG_P (operands[0])" "lhi\\t%0,%h1" [(set_attr "op_type" "RI")]) *************** *** 1076,1082 **** [(set (match_operand:SI 0 "register_operand" "=d") (match_operand:SI 1 "immediate_operand" "n"))] "TARGET_64BIT && s390_single_hi (operands[1], SImode, 0) >= 0 ! && !fp_operand (operands[0], VOIDmode)" "* { int part = s390_single_hi (operands[1], SImode, 0); --- 1127,1133 ---- [(set (match_operand:SI 0 "register_operand" "=d") (match_operand:SI 1 "immediate_operand" "n"))] "TARGET_64BIT && s390_single_hi (operands[1], SImode, 0) >= 0 ! && !FP_REG_P (operands[0])" "* { int part = s390_single_hi (operands[1], SImode, 0); *************** *** 1091,1107 **** }" [(set_attr "op_type" "RI")]) - (define_insn "*movsi_ss" - [(set (match_operand:SI 0 "s_operand" "=Qo") - (match_operand:SI 1 "s_imm_operand" "Qo"))] - "" - "mvc\\t%O0(4,%R0),%1" - [(set_attr "op_type" "SS") - (set_attr "atype" "mem")]) - (define_insn "*movsi" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,m,!*f,!*f,!m") ! (match_operand:SI 1 "general_operand" "d,m,d,*f,m,*f"))] "" "@ lr\\t%0,%1 --- 1142,1150 ---- }" [(set_attr "op_type" "RI")]) (define_insn "*movsi" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,m,!*f,!*f,!m,?Q") ! (match_operand:SI 1 "general_operand" "d,m,d,*f,m,*f,?Q"))] "" "@ lr\\t%0,%1 *************** *** 1109,1170 **** st\\t%1,%0 ler\\t%0,%1 le\\t%0,%1 ! ste\\t%1,%0" ! [(set_attr "op_type" "RR,RX,RX,RR,RX,RX") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem")]) ; ; movhi instruction pattern(s). ; (define_insn "movhi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,m") ! (match_operand:HI 1 "general_operand" "d,n,m,d"))] "" "@ lr\\t%0,%1 lhi\\t%0,%h1 lh\\t%0,%1 ! sth\\t%1,%0" ! [(set_attr "op_type" "RR,RI,RX,RX") ! (set_attr "atype" "reg,reg,mem,mem")]) ; ; movqi instruction pattern(s). ; (define_insn "movqi_64" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,m,Q") ! (match_operand:QI 1 "general_operand" "d,n,m,d,n"))] "TARGET_64BIT" "@ lr\\t%0,%1 lhi\\t%0,%b1 llgc\\t%0,%1 stc\\t%1,%0 ! mvi\\t%0,%b1" ! [(set_attr "op_type" "RR,RI,RXE,RX,SI") ! (set_attr "atype" "reg,reg,mem,mem,mem")]) (define_insn "movqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,m,Q") ! (match_operand:QI 1 "general_operand" "d,n,m,d,n"))] "" "@ lr\\t%0,%1 lhi\\t%0,%b1 ic\\t%0,%1 stc\\t%1,%0 ! mvi\\t%0,%b1" ! [(set_attr "op_type" "RR,RI,RX,RX,SI") ! (set_attr "atype" "reg,reg,mem,mem,mem")]) ; ! ; moveqstrictqi instruction pattern(s). ; (define_insn "*movstrictqi" --- 1152,1245 ---- st\\t%1,%0 ler\\t%0,%1 le\\t%0,%1 ! ste\\t%1,%0 ! mvc\\t%O0(4,%R0),%1" ! [(set_attr "op_type" "RR,RX,RX,RR,RX,RX,SS") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem,mem")]) + (define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (mem:SI (match_operand 1 "address_operand" "")))] + "!FP_REG_P (operands[0]) + && GET_CODE (operands[1]) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (operands[1]) + && get_pool_mode (operands[1]) == SImode + && legitimate_reload_constant_p (get_pool_constant (operands[1]))" + [(set (match_dup 0) (match_dup 2))] + "operands[2] = get_pool_constant (operands[1]);") ; ; movhi instruction pattern(s). ; (define_insn "movhi" ! [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,m,?Q") ! (match_operand:HI 1 "general_operand" "d,n,m,d,?Q"))] "" "@ lr\\t%0,%1 lhi\\t%0,%h1 lh\\t%0,%1 ! sth\\t%1,%0 ! mvc\\t%O0(2,%R0),%1" ! [(set_attr "op_type" "RR,RI,RX,RX,SS") ! (set_attr "atype" "reg,reg,mem,mem,mem")]) + (define_peephole2 + [(set (match_operand:HI 0 "register_operand" "") + (mem:HI (match_operand 1 "address_operand" "")))] + "GET_CODE (operands[1]) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (operands[1]) + && get_pool_mode (operands[1]) == HImode + && GET_CODE (get_pool_constant (operands[1])) == CONST_INT" + [(set (match_dup 0) (match_dup 2))] + "operands[2] = get_pool_constant (operands[1]);") ; ; movqi instruction pattern(s). ; (define_insn "movqi_64" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,m,Q,?Q") ! (match_operand:QI 1 "general_operand" "d,n,m,d,n,?Q"))] "TARGET_64BIT" "@ lr\\t%0,%1 lhi\\t%0,%b1 llgc\\t%0,%1 stc\\t%1,%0 ! mvi\\t%0,%b1 ! mvc\\t%O0(1,%R0),%1" ! [(set_attr "op_type" "RR,RI,RXE,RX,SI,SS") ! (set_attr "atype" "reg,reg,mem,mem,mem,mem")]) (define_insn "movqi" ! [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,m,Q,?Q") ! (match_operand:QI 1 "general_operand" "d,n,m,d,n,?Q"))] "" "@ lr\\t%0,%1 lhi\\t%0,%b1 ic\\t%0,%1 stc\\t%1,%0 ! mvi\\t%0,%b1 ! mvc\\t%O0(1,%R0),%1" ! [(set_attr "op_type" "RR,RI,RX,RX,SI,SS") ! (set_attr "atype" "reg,reg,mem,mem,mem,mem")]) + (define_peephole2 + [(set (match_operand:QI 0 "nonimmediate_operand" "") + (mem:QI (match_operand 1 "address_operand" "")))] + "GET_CODE (operands[1]) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (operands[1]) + && get_pool_mode (operands[1]) == QImode + && GET_CODE (get_pool_constant (operands[1])) == CONST_INT" + [(set (match_dup 0) (match_dup 2))] + "operands[2] = get_pool_constant (operands[1]);") ; ! ; movstrictqi instruction pattern(s). ; (define_insn "*movstrictqi" *************** *** 1181,1187 **** (define_insn "*movstricthi" [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) ! (match_operand:HI 1 "s_imm_operand" "Qo")) (clobber (reg:CC 33))] "" "icm\\t%0,3,%1" --- 1256,1262 ---- (define_insn "*movstricthi" [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) ! (match_operand:HI 1 "s_imm_operand" "Q")) (clobber (reg:CC 33))] "" "icm\\t%0,3,%1" *************** *** 1193,1199 **** ; movstrictsi instruction pattern(s). ; ! (define_insn "movestrictsi" [(set (strict_low_part (match_operand:SI 0 "register_operand" "+d,d")) (match_operand:SI 1 "general_operand" "d,m"))] "TARGET_64BIT" --- 1268,1274 ---- ; movstrictsi instruction pattern(s). ; ! (define_insn "movstrictsi" [(set (strict_low_part (match_operand:SI 0 "register_operand" "+d,d")) (match_operand:SI 1 "general_operand" "d,m"))] "TARGET_64BIT" *************** *** 1221,1237 **** operands[1] = force_const_mem (DFmode, operands[1]); }") - (define_insn "*movdf_ss" - [(set (match_operand:DF 0 "s_operand" "=Qo") - (match_operand:DF 1 "s_imm_operand" "Qo"))] - "" - "mvc\\t%O0(8,%R0),%1" - [(set_attr "op_type" "SS") - (set_attr "atype" "mem")]) - (define_insn "*movdf_64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,m,d,d,m") ! (match_operand:DF 1 "general_operand" "f,m,f,d,m,d"))] "TARGET_64BIT" "@ ldr\\t%0,%1 --- 1296,1304 ---- operands[1] = force_const_mem (DFmode, operands[1]); }") (define_insn "*movdf_64" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,m,d,d,m,?Q") ! (match_operand:DF 1 "general_operand" "f,m,f,d,m,d,?Q"))] "TARGET_64BIT" "@ ldr\\t%0,%1 *************** *** 1239,1251 **** std\\t%1,%0 lgr\\t%0,%1 lg\\t%0,%1 ! stg\\t%1,%0" ! [(set_attr "op_type" "RR,RX,RX,RRE,RXE,RXE") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem")]) (define_insn "*movdf_31" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,m,d,Q,d,m") ! (match_operand:DF 1 "general_operand" "f,m,f,Q,d,dKm,d"))] "!TARGET_64BIT" "@ ldr\\t%0,%1 --- 1306,1319 ---- std\\t%1,%0 lgr\\t%0,%1 lg\\t%0,%1 ! stg\\t%1,%0 ! mvc\\t%O0(8,%R0),%1" ! [(set_attr "op_type" "RR,RX,RX,RRE,RXE,RXE,SS") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem,mem")]) (define_insn "*movdf_31" ! [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,m,d,Q,d,o,Q") ! (match_operand:DF 1 "general_operand" "f,m,f,Q,d,dKo,d,Q"))] "!TARGET_64BIT" "@ ldr\\t%0,%1 *************** *** 1254,1269 **** lm\\t%0,%N0,%1 stm\\t%1,%N1,%0 # ! #" ! [(set_attr "op_type" "RR,RX,RX,RS,RS,NN,NN") ! (set_attr "atype" "reg,mem,mem,mem,mem,*,*")]) (define_split [(set (match_operand:DF 0 "nonimmediate_operand" "") (match_operand:DF 1 "general_operand" ""))] "!TARGET_64BIT && reload_completed ! && !fp_operand (operands[0], VOIDmode) ! && !fp_operand (operands[1], VOIDmode) && !s_operand (operands[0], VOIDmode) && !s_operand (operands[1], VOIDmode) && (register_operand (operands[0], VOIDmode) --- 1322,1338 ---- lm\\t%0,%N0,%1 stm\\t%1,%N1,%0 # ! # ! mvc\\t%O0(8,%R0),%1" ! [(set_attr "op_type" "RR,RX,RX,RS,RS,NN,NN,SS") ! (set_attr "atype" "reg,mem,mem,mem,mem,*,*,mem")]) (define_split [(set (match_operand:DF 0 "nonimmediate_operand" "") (match_operand:DF 1 "general_operand" ""))] "!TARGET_64BIT && reload_completed ! && !FP_REG_P (operands[0]) ! && !FP_REG_P (operands[1]) && !s_operand (operands[0], VOIDmode) && !s_operand (operands[1], VOIDmode) && (register_operand (operands[0], VOIDmode) *************** *** 1299,1311 **** [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "memory_operand" ""))] "!TARGET_64BIT && reload_completed ! && !fp_operand (operands[0], VOIDmode) ! && !fp_operand (operands[1], VOIDmode) && !s_operand (operands[1], VOIDmode)" ! [(set (match_dup 2) (match_dup 3)) ! (set (match_dup 0) (mem:DI (match_dup 2)))] ! "operands[2] = operand_subword (operands[0], 1, 0, DFmode); ! operands[3] = legitimize_la_operand (XEXP (operands[1], 0));") ; ; movsf instruction pattern(s). --- 1368,1383 ---- [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "memory_operand" ""))] "!TARGET_64BIT && reload_completed ! && !FP_REG_P (operands[0]) ! && !FP_REG_P (operands[1]) && !s_operand (operands[1], VOIDmode)" ! [(set (match_dup 0) (match_dup 1))] ! " ! { ! rtx addr = operand_subword (operands[0], 1, 0, DFmode); ! s390_load_address (addr, XEXP (operands[1], 0)); ! operands[1] = replace_equiv_address (operands[1], addr); ! }") ; ; movsf instruction pattern(s). *************** *** 1324,1340 **** operands[1] = force_const_mem (SFmode, operands[1]); }") - (define_insn "*movsf_ss" - [(set (match_operand:SF 0 "s_operand" "=Qo") - (match_operand:SF 1 "s_imm_operand" "Qo"))] - "" - "mvc\\t%O0(4,%R0),%1" - [(set_attr "op_type" "SS") - (set_attr "atype" "mem")]) - (define_insn "*movsf" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,m,d,d,m") ! (match_operand:SF 1 "general_operand" "f,m,f,d,m,d"))] "" "@ ler\\t%0,%1 --- 1396,1404 ---- operands[1] = force_const_mem (SFmode, operands[1]); }") (define_insn "*movsf" ! [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,m,d,d,m,?Q") ! (match_operand:SF 1 "general_operand" "f,m,f,d,m,d,?Q"))] "" "@ ler\\t%0,%1 *************** *** 1342,1350 **** ste\\t%1,%0 lr\\t%0,%1 l\\t%0,%1 ! st\\t%1,%0" ! [(set_attr "op_type" "RR,RX,RX,RR,RX,RX") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem")]) ; ; load_multiple pattern(s). --- 1406,1415 ---- ste\\t%1,%0 lr\\t%0,%1 l\\t%0,%1 ! st\\t%1,%0 ! mvc\\t%O0(4,%R0),%1" ! [(set_attr "op_type" "RR,RX,RX,RR,RX,RX,SS") ! (set_attr "atype" "reg,mem,mem,reg,mem,mem,mem")]) ; ; load_multiple pattern(s). *************** *** 1413,1419 **** (define_insn "*load_multiple_di" [(match_parallel 0 "load_multiple_operation" [(set (match_operand:DI 1 "register_operand" "=r") ! (match_operand:DI 2 "s_operand" "oQ"))])] "" "* { --- 1478,1484 ---- (define_insn "*load_multiple_di" [(match_parallel 0 "load_multiple_operation" [(set (match_operand:DI 1 "register_operand" "=r") ! (match_operand:DI 2 "s_operand" "Q"))])] "" "* { *************** *** 1432,1438 **** (define_insn "*load_multiple_si" [(match_parallel 0 "load_multiple_operation" [(set (match_operand:SI 1 "register_operand" "=r") ! (match_operand:SI 2 "s_operand" "oQ"))])] "" "* { --- 1497,1503 ---- (define_insn "*load_multiple_si" [(match_parallel 0 "load_multiple_operation" [(set (match_operand:SI 1 "register_operand" "=r") ! (match_operand:SI 2 "s_operand" "Q"))])] "" "* { *************** *** 1516,1522 **** (define_insn "*store_multiple_di" [(match_parallel 0 "store_multiple_operation" ! [(set (match_operand:DI 1 "s_operand" "=oQ") (match_operand:DI 2 "register_operand" "r"))])] "" "* --- 1581,1587 ---- (define_insn "*store_multiple_di" [(match_parallel 0 "store_multiple_operation" ! [(set (match_operand:DI 1 "s_operand" "=Q") (match_operand:DI 2 "register_operand" "r"))])] "" "* *************** *** 1536,1542 **** (define_insn "*store_multiple_si" [(match_parallel 0 "store_multiple_operation" ! [(set (match_operand:SI 1 "s_operand" "=oQ") (match_operand:SI 2 "register_operand" "r"))])] "" "* --- 1601,1607 ---- (define_insn "*store_multiple_si" [(match_parallel 0 "store_multiple_operation" ! [(set (match_operand:SI 1 "s_operand" "=Q") (match_operand:SI 2 "register_operand" "r"))])] "" "* *************** *** 1558,1729 **** ;; ; ! ; movstrdi instruction pattern(s). ; (define_expand "movstrdi" ! [(set (match_operand:BLK 0 "general_operand" "") ! (match_operand:BLK 1 "general_operand" "")) ! (use (match_operand:DI 2 "general_operand" "")) ! (match_operand 3 "" "")] ! "TARGET_64BIT" ! " ! { ! rtx addr0, addr1; ! ! addr0 = force_operand (XEXP (operands[0], 0), NULL_RTX); ! addr1 = force_operand (XEXP (operands[1], 0), NULL_RTX); ! ! if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) <= 256) ! { ! operands[0] = change_address (operands[0], VOIDmode, addr0); ! operands[1] = change_address (operands[1], VOIDmode, addr1); ! operands[2] = GEN_INT (INTVAL (operands[2]) - 1); ! ! emit_insn (gen_movstrdi_short (operands[0], operands[1], operands[2])); ! DONE; ! } ! else ! { ! if (TARGET_MVCLE) ! { ! /* implementation suggested by Richard Henderson */ ! rtx reg0 = gen_reg_rtx (TImode); ! rtx reg1 = gen_reg_rtx (TImode); ! rtx len = operands[2]; ! ! if (! CONSTANT_P (len)) ! len = force_reg (DImode, len); ! ! /* Load up the address+length pairs. */ ! ! emit_move_insn (gen_highpart (DImode, reg0), addr0); ! emit_move_insn (gen_lowpart (DImode, reg0), len); ! ! emit_move_insn (gen_highpart (DImode, reg1), addr1); ! emit_move_insn (gen_lowpart (DImode, reg1), len); ! ! /* MOVE */ ! emit_insn (gen_movstrdi_64 (reg0, reg1, reg0, reg1)); ! DONE; ! } ! else ! { ! rtx label1 = gen_label_rtx (); ! rtx label2 = gen_label_rtx (); ! rtx reg0, reg1, len, blocks; ! ! reg0 = gen_reg_rtx (DImode); ! reg1 = gen_reg_rtx (DImode); ! len = gen_reg_rtx (DImode); ! blocks = gen_reg_rtx (DImode); ! ! emit_move_insn (len, operands[2]); ! emit_insn (gen_cmpdi (len, const0_rtx)); ! emit_jump_insn (gen_beq (label1)); ! emit_move_insn (reg0, addr0); ! emit_move_insn (reg1, addr1); ! emit_insn (gen_adddi3 (len, len, constm1_rtx)); ! emit_insn (gen_ashrdi3 (blocks, len, GEN_INT (8))); ! emit_insn (gen_cmpdi (blocks, const0_rtx)); ! emit_jump_insn (gen_beq (label2)); ! emit_insn (gen_movstrdi_long (reg0, reg1, reg0, reg1, blocks, blocks)); ! emit_label (label2); ! operands[0] = change_address (operands[0], VOIDmode, reg0); ! operands[1] = change_address (operands[1], VOIDmode, reg1); ! emit_insn (gen_movstrdi_short (operands[0], operands[1], len)); ! emit_label (label1); ! DONE; ! } ! } ! }") ! ! ; ! ; movstrsi instruction pattern(s). ! ; (define_expand "movstrsi" ! [(set (match_operand:BLK 0 "general_operand" "") ! (match_operand:BLK 1 "general_operand" "")) ! (use (match_operand:SI 2 "general_operand" "")) ! (match_operand 3 "" "")] ! "!TARGET_64BIT" ! " ! { ! rtx addr0 = force_operand (XEXP (operands[0], 0), NULL_RTX); ! rtx addr1 = force_operand (XEXP (operands[1], 0), NULL_RTX); ! ! if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) <= 256) ! { ! operands[0] = change_address (operands[0], VOIDmode, addr0); ! operands[1] = change_address (operands[1], VOIDmode, addr1); ! operands[2] = GEN_INT (INTVAL (operands[2]) - 1); ! ! emit_insn (gen_movstrsi_short (operands[0], operands[1], operands[2])); ! DONE; ! } ! else ! { ! if (TARGET_MVCLE) ! { ! /* implementation suggested by Richard Henderson */ ! rtx reg0 = gen_reg_rtx (DImode); ! rtx reg1 = gen_reg_rtx (DImode); ! rtx len = operands[2]; ! ! ! if (! CONSTANT_P (len)) ! len = force_reg (SImode, len); ! ! /* Load up the address+length pairs. */ ! ! emit_move_insn (gen_highpart (SImode, reg0), addr0); ! emit_move_insn (gen_lowpart (SImode, reg0), len); ! ! emit_move_insn (gen_highpart (SImode, reg1), addr1); ! emit_move_insn (gen_lowpart (SImode, reg1), len); ! ! /* MOVE */ ! emit_insn (gen_movstrsi_31 (reg0, reg1, reg0, reg1)); ! DONE; ! } ! else ! { ! rtx label1 = gen_label_rtx (); ! rtx label2 = gen_label_rtx (); ! rtx reg0, reg1, len, blocks; ! ! reg0 = gen_reg_rtx (SImode); ! reg1 = gen_reg_rtx (SImode); ! len = gen_reg_rtx (SImode); ! blocks = gen_reg_rtx (SImode); ! ! emit_move_insn (len, operands[2]); ! emit_insn (gen_cmpsi (len, const0_rtx)); ! emit_jump_insn (gen_beq (label1)); ! emit_move_insn (reg0, addr0); ! emit_move_insn (reg1, addr1); ! emit_insn (gen_addsi3 (len, len, constm1_rtx)); ! emit_insn (gen_ashrsi3 (blocks, len, GEN_INT (8))); ! emit_insn (gen_cmpsi (blocks, const0_rtx)); ! emit_jump_insn (gen_beq (label2)); ! emit_insn (gen_movstrsi_long (reg0, reg1, reg0, reg1, blocks, blocks)); ! emit_label (label2); ! operands[0] = change_address (operands[0], VOIDmode, reg0); ! operands[1] = change_address (operands[1], VOIDmode, reg1); ! emit_insn (gen_movstrsi_short (operands[0], operands[1], len)); ! emit_label (label1); ! DONE; ! } ! } ! }") ; Move a block that is up to 256 bytes in length. ; The block length is taken as (operands[2] % 256) + 1. ! (define_insn "movstrdi_short" ! [(set (match_operand:BLK 0 "s_operand" "=oQ,oQ") ! (match_operand:BLK 1 "s_operand" "oQ,oQ")) (use (match_operand:DI 2 "nonmemory_operand" "n,a")) (clobber (match_scratch:DI 3 "=X,&a"))] "TARGET_64BIT" --- 1623,1653 ---- ;; ; ! ; movstrM instruction pattern(s). ; (define_expand "movstrdi" ! [(set (match_operand:BLK 0 "memory_operand" "") ! (match_operand:BLK 1 "memory_operand" "")) ! (use (match_operand:DI 2 "general_operand" "")) ! (match_operand 3 "" "")] ! "TARGET_64BIT" ! "s390_expand_movstr (operands[0], operands[1], operands[2]); DONE;") (define_expand "movstrsi" ! [(set (match_operand:BLK 0 "memory_operand" "") ! (match_operand:BLK 1 "memory_operand" "")) ! (use (match_operand:SI 2 "general_operand" "")) ! (match_operand 3 "" "")] ! "" ! "s390_expand_movstr (operands[0], operands[1], operands[2]); DONE;") ; Move a block that is up to 256 bytes in length. ; The block length is taken as (operands[2] % 256) + 1. ! (define_insn "movstr_short_64" ! [(set (match_operand:BLK 0 "memory_operand" "=Q,Q") ! (match_operand:BLK 1 "memory_operand" "Q,Q")) (use (match_operand:DI 2 "nonmemory_operand" "n,a")) (clobber (match_scratch:DI 3 "=X,&a"))] "TARGET_64BIT" *************** *** 1744,1755 **** } }" [(set_attr "op_type" "SS,NN") (set_attr "atype" "mem,mem") (set_attr "length" "*,14")]) ! (define_insn "movstrsi_short" ! [(set (match_operand:BLK 0 "s_operand" "=oQ,oQ") ! (match_operand:BLK 1 "s_operand" "oQ,oQ")) (use (match_operand:SI 2 "nonmemory_operand" "n,a")) (clobber (match_scratch:SI 3 "=X,&a"))] "!TARGET_64BIT" --- 1668,1680 ---- } }" [(set_attr "op_type" "SS,NN") + (set_attr "type" "cs,cs") (set_attr "atype" "mem,mem") (set_attr "length" "*,14")]) ! (define_insn "movstr_short_31" ! [(set (match_operand:BLK 0 "memory_operand" "=Q,Q") ! (match_operand:BLK 1 "memory_operand" "Q,Q")) (use (match_operand:SI 2 "nonmemory_operand" "n,a")) (clobber (match_scratch:SI 3 "=X,&a"))] "!TARGET_64BIT" *************** *** 1770,1833 **** } }" [(set_attr "op_type" "SS,NN") (set_attr "atype" "mem,mem") (set_attr "length" "*,14")]) ! ; Move a block that is a multiple of 256 bytes in length ! ! (define_insn "movstrdi_long" ! [(set (match_operand:DI 4 "register_operand" "=d") ! (const_int 0)) ! (set (match_operand:DI 0 "register_operand" "=a") ! (plus:DI (match_operand:DI 2 "register_operand" "0") ! (ashift:DI (match_operand:DI 5 "register_operand" "4") ! (const_int 8)))) ! (set (match_operand:DI 1 "register_operand" "=a") ! (plus:DI (match_operand:DI 3 "register_operand" "1") ! (ashift:DI (match_dup 5) (const_int 8)))) ! (set (mem:BLK (match_dup 2)) ! (mem:BLK (match_dup 3))) ! (use (match_dup 5))] ! "TARGET_64BIT" ! "* ! { ! output_asm_insn (\"mvc\\t0(256,%0),0(%1)\", operands); ! output_asm_insn (\"la\\t%0,256(%0)\", operands); ! output_asm_insn (\"la\\t%1,256(%1)\", operands); ! return \"brct\\t%4,.-14\"; ! }" ! [(set_attr "op_type" "NN") ! (set_attr "atype" "mem") ! (set_attr "length" "18")]) ! ! (define_insn "movstrsi_long" ! [(set (match_operand:SI 4 "register_operand" "=d") ! (const_int 0)) ! (set (match_operand:SI 0 "register_operand" "=a") ! (plus:SI (match_operand:SI 2 "register_operand" "0") ! (ashift:SI (match_operand:SI 5 "register_operand" "4") ! (const_int 8)))) ! (set (match_operand:SI 1 "register_operand" "=a") ! (plus:SI (match_operand:SI 3 "register_operand" "1") ! (ashift:SI (match_dup 5) (const_int 8)))) ! (set (mem:BLK (match_dup 2)) ! (mem:BLK (match_dup 3))) ! (use (match_dup 5))] ! "!TARGET_64BIT" ! "* ! { ! output_asm_insn (\"mvc\\t0(256,%0),0(%1)\", operands); ! output_asm_insn (\"la\\t%0,256(%0)\", operands); ! output_asm_insn (\"la\\t%1,256(%1)\", operands); ! return \"brct\\t%4,.-14\"; ! }" ! [(set_attr "op_type" "NN") ! (set_attr "atype" "mem") ! (set_attr "length" "18")]) ! ! ; Move a block that is larger than 255 bytes in length. ! (define_insn "movstrdi_64" [(set (match_operand:TI 0 "register_operand" "=d") (ashift:TI (plus:TI (match_operand:TI 2 "register_operand" "0") (lshiftrt:TI (match_dup 2) (const_int 64))) --- 1695,1707 ---- } }" [(set_attr "op_type" "SS,NN") + (set_attr "type" "cs,cs") (set_attr "atype" "mem,mem") (set_attr "length" "*,14")]) ! ; Move a block of arbitrary length. ! (define_insn "movstr_long_64" [(set (match_operand:TI 0 "register_operand" "=d") (ashift:TI (plus:TI (match_operand:TI 2 "register_operand" "0") (lshiftrt:TI (match_dup 2) (const_int 64))) *************** *** 1842,1851 **** "TARGET_64BIT" "mvcle\\t%0,%1,0\;jo\\t.-4" [(set_attr "op_type" "NN") (set_attr "atype" "mem") (set_attr "length" "8")]) ! (define_insn "movstrsi_31" [(set (match_operand:DI 0 "register_operand" "=d") (ashift:DI (plus:DI (match_operand:DI 2 "register_operand" "0") (lshiftrt:DI (match_dup 2) (const_int 32))) --- 1716,1726 ---- "TARGET_64BIT" "mvcle\\t%0,%1,0\;jo\\t.-4" [(set_attr "op_type" "NN") + (set_attr "type" "vs") (set_attr "atype" "mem") (set_attr "length" "8")]) ! (define_insn "movstr_long_31" [(set (match_operand:DI 0 "register_operand" "=d") (ashift:DI (plus:DI (match_operand:DI 2 "register_operand" "0") (lshiftrt:DI (match_dup 2) (const_int 32))) *************** *** 1859,1970 **** (clobber (reg:CC 33))] "!TARGET_64BIT" "mvcle\\t%0,%1,0\;jo\\t.-4" ! [(set_attr "op_type" "NN") ! (set_attr "atype" "mem") ! (set_attr "length" "8")]) ; ! ; clrstrdi instruction pattern(s). ; (define_expand "clrstrdi" ! [(set (match_operand:BLK 0 "general_operand" "") (const_int 0)) (use (match_operand:DI 1 "general_operand" "")) (match_operand 2 "" "")] "TARGET_64BIT" ! " ! { ! rtx addr = force_operand (XEXP (operands[0], 0), NULL_RTX); ! ! operands[0] = change_address (operands[0], VOIDmode, addr); ! ! if (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) < 256) ! { ! emit_insn (gen_clrstrsico (operands[0], operands[1])); ! DONE; ! } ! else ! { ! rtx reg0 = gen_reg_rtx (TImode); ! rtx reg1 = gen_reg_rtx (TImode); ! rtx len = operands[1]; ! ! if (! CONSTANT_P (len)) ! len = force_reg (DImode, len); ! ! /* Load up the address+length pairs. */ ! ! emit_move_insn (gen_highpart (DImode, reg0), addr); ! emit_move_insn (gen_lowpart (DImode, reg0), len); ! ! emit_move_insn (gen_lowpart (DImode, reg1), const0_rtx); ! ! /* Clear! */ ! emit_insn (gen_clrstrsi_64 (reg0, reg1, reg0)); ! DONE; ! } ! }") ! ! ; ! ; clrstrsi instruction pattern(s). ! ; (define_expand "clrstrsi" ! [(set (match_operand:BLK 0 "general_operand" "") (const_int 0)) (use (match_operand:SI 1 "general_operand" "")) (match_operand 2 "" "")] ! "!TARGET_64BIT" ! " ! { ! rtx addr = force_operand (XEXP (operands[0], 0), NULL_RTX); ! ! operands[0] = change_address (operands[0], VOIDmode, addr); ! ! if (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) < 256) ! { ! emit_insn (gen_clrstrsico (operands[0], operands[1])); ! DONE; ! } ! else ! { ! rtx reg0 = gen_reg_rtx (DImode); ! rtx reg1 = gen_reg_rtx (DImode); ! rtx len = operands[1]; ! ! if (! CONSTANT_P (len)) ! len = force_reg (SImode, len); ! /* Load up the address+length pairs. */ ! emit_move_insn (gen_highpart (SImode, reg0), addr); ! emit_move_insn (gen_lowpart (SImode, reg0), len); ! emit_move_insn (gen_lowpart (SImode, reg1), const0_rtx); ! ! /* CLear! */ ! emit_insn (gen_clrstrsi_31 (reg0, reg1, reg0)); ! DONE; ! } ! }") ! ; Clear memory with length less than 256 bytes ! (define_insn "clrstrsico" ! [(set (match_operand:BLK 0 "s_operand" "=Qo") (const_int 0)) ! (use (match_operand 1 "immediate_operand" "I")) (clobber (reg:CC 33))] ! "" ! "xc\\t%O0(%1,%R0),%0" ! [(set_attr "op_type" "RS") ! (set_attr "type" "cs") ! (set_attr "atype" "mem")]) ! ; Clear memory with length greater 256 bytes or lenght not constant ! (define_insn "clrstrsi_64" [(set (match_operand:TI 0 "register_operand" "=d") (ashift:TI (plus:TI (match_operand:TI 2 "register_operand" "0") (lshiftrt:TI (match_dup 2) (const_int 64))) --- 1734,1826 ---- (clobber (reg:CC 33))] "!TARGET_64BIT" "mvcle\\t%0,%1,0\;jo\\t.-4" ! [(set_attr "op_type" "NN") ! (set_attr "type" "vs") ! (set_attr "atype" "mem") ! (set_attr "length" "8")]) ; ! ; clrstrM instruction pattern(s). ; (define_expand "clrstrdi" ! [(set (match_operand:BLK 0 "memory_operand" "") (const_int 0)) (use (match_operand:DI 1 "general_operand" "")) (match_operand 2 "" "")] "TARGET_64BIT" ! "s390_expand_clrstr (operands[0], operands[1]); DONE;") (define_expand "clrstrsi" ! [(set (match_operand:BLK 0 "memory_operand" "") (const_int 0)) (use (match_operand:SI 1 "general_operand" "")) (match_operand 2 "" "")] ! "" ! "s390_expand_clrstr (operands[0], operands[1]); DONE;") ! ; Clear a block that is up to 256 bytes in length. ! ; The block length is taken as (operands[2] % 256) + 1. ! (define_insn "clrstr_short_64" ! [(set (match_operand:BLK 0 "memory_operand" "=Q,Q") ! (const_int 0)) ! (use (match_operand:DI 1 "nonmemory_operand" "n,a")) ! (clobber (match_scratch:DI 2 "=X,&a")) ! (clobber (reg:CC 33))] ! "TARGET_64BIT" ! "* ! { ! switch (which_alternative) ! { ! case 0: ! return \"xc\\t%O0(%b1+1,%R0),%0\"; ! case 1: ! output_asm_insn (\"bras\\t%2,.+10\", operands); ! output_asm_insn (\"xc\\t%O0(1,%R0),%0\", operands); ! return \"ex\\t%1,0(%2)\"; ! default: ! abort (); ! } ! }" ! [(set_attr "op_type" "SS,NN") ! (set_attr "type" "cs,cs") ! (set_attr "atype" "mem,mem") ! (set_attr "length" "*,14")]) ! (define_insn "clrstr_short_31" ! [(set (match_operand:BLK 0 "memory_operand" "=Q,Q") (const_int 0)) ! (use (match_operand:SI 1 "nonmemory_operand" "n,a")) ! (clobber (match_scratch:SI 2 "=X,&a")) (clobber (reg:CC 33))] ! "!TARGET_64BIT" ! "* ! { ! switch (which_alternative) ! { ! case 0: ! return \"xc\\t%O0(%b1+1,%R0),%0\"; ! case 1: ! output_asm_insn (\"bras\\t%2,.+10\", operands); ! output_asm_insn (\"xc\\t%O0(1,%R0),%0\", operands); ! return \"ex\\t%1,0(%2)\"; ! default: ! abort (); ! } ! }" ! [(set_attr "op_type" "SS,NN") ! (set_attr "type" "cs,cs") ! (set_attr "atype" "mem,mem") ! (set_attr "length" "*,14")]) ! ! ; Clear a block of arbitrary length. ! ! (define_insn "clrstr_long_64" [(set (match_operand:TI 0 "register_operand" "=d") (ashift:TI (plus:TI (match_operand:TI 2 "register_operand" "0") (lshiftrt:TI (match_dup 2) (const_int 64))) *************** *** 1980,1986 **** (set_attr "type" "vs") (set_attr "length" "8")]) ! (define_insn "clrstrsi_31" [(set (match_operand:DI 0 "register_operand" "=d") (ashift:DI (plus:DI (match_operand:DI 2 "register_operand" "0") (lshiftrt:DI (match_dup 2) (const_int 32))) --- 1836,1842 ---- (set_attr "type" "vs") (set_attr "length" "8")]) ! (define_insn "clrstr_long_31" [(set (match_operand:DI 0 "register_operand" "=d") (ashift:DI (plus:DI (match_operand:DI 2 "register_operand" "0") (lshiftrt:DI (match_dup 2) (const_int 32))) *************** *** 1997,2167 **** (set_attr "length" "8")]) ; ! ; cmpstrdi instruction pattern(s). ; (define_expand "cmpstrdi" ! [(set (match_operand:DI 0 "register_operand" "") ! (compare:DI (match_operand:BLK 1 "s_operand" "") ! (match_operand:BLK 2 "s_operand" "") ) ) ! (use (match_operand:DI 3 "general_operand" "")) ! (use (match_operand:DI 4 "" ""))] ! "TARGET_64BIT" ! " ! { ! rtx addr0, addr1; ! /* for pre/post increment */ ! operands[1] = protect_from_queue (operands[1], 0); ! operands[2] = protect_from_queue (operands[2], 0); ! operands[3] = protect_from_queue (operands[3], 0); ! addr0 = force_operand (XEXP (operands[1], 0), NULL_RTX); ! addr1 = force_operand (XEXP (operands[2], 0), NULL_RTX); ! if (GET_CODE (operands[3]) == CONST_INT && INTVAL (operands[3]) < 256) { ! if (INTVAL (operands[3]) == 0) { ! emit_move_insn (operands[0], operands[3]); ! DONE; ! } ! ! operands[1] = change_address (operands[1], VOIDmode, addr0); ! operands[2] = change_address (operands[2], VOIDmode, addr1); ! ! emit_insn (gen_cmpstr_const (operands[1], operands[2], operands[3])); ! emit_insn (gen_cmpint_di (operands[0])); ! DONE; ! } ! else ! { ! /* implementation suggested by Richard Henderson */ ! rtx reg0 = gen_reg_rtx (TImode); ! rtx reg1 = gen_reg_rtx (TImode); ! rtx len = operands[3]; ! ! if (! CONSTANT_P (len)) ! len = force_reg (DImode, len); ! ! /* Load up the address+length pairs. */ ! emit_move_insn (gen_highpart (DImode, reg0), addr0); ! emit_move_insn (gen_lowpart (DImode, reg0), len); ! emit_move_insn (gen_highpart (DImode, reg1), addr1); ! emit_move_insn (gen_lowpart (DImode, reg1), len); ! /* Compare! */ ! emit_insn (gen_cmpstr_64 (reg0, reg1, reg0, reg1)); ! emit_insn (gen_cmpint_di (operands[0])); ! DONE; } ! }") ! ! ; ! ; cmpstrsi instruction pattern(s). ! ; ! (define_expand "cmpstrsi" ! [(set (match_operand:SI 0 "register_operand" "") ! (compare:SI (match_operand:BLK 1 "s_operand" "") ! (match_operand:BLK 2 "s_operand" "") ) ) ! (use (match_operand:SI 3 "general_operand" "")) ! (use (match_operand:SI 4 "" ""))] ! "" ! " { ! rtx addr0, addr1; ! ! /* for pre/post increment */ ! operands[1] = protect_from_queue (operands[1], 0); ! operands[2] = protect_from_queue (operands[2], 0); ! operands[3] = protect_from_queue (operands[3], 0); ! ! addr0 = force_operand (XEXP (operands[1], 0), NULL_RTX); ! addr1 = force_operand (XEXP (operands[2], 0), NULL_RTX); ! ! if (GET_CODE (operands[3]) == CONST_INT && INTVAL (operands[3]) < 256) { ! if (INTVAL (operands[3]) == 0) { ! emit_move_insn (operands[0], operands[3]); ! DONE; ! } ! ! operands[1] = change_address (operands[1], VOIDmode, addr0); ! operands[2] = change_address (operands[2], VOIDmode, addr1); ! ! emit_insn (gen_cmpstr_const (operands[1], operands[2], operands[3])); ! emit_insn (gen_cmpint_si (operands[0])); ! DONE; ! } ! else ! { ! /* implementation suggested by Richard Henderson */ ! rtx reg0, reg1; ! rtx len = operands[3]; ! ! if (TARGET_64BIT) ! { ! reg0 = gen_reg_rtx (TImode); ! reg1 = gen_reg_rtx (TImode); ! } ! else ! { ! reg0 = gen_reg_rtx (DImode); ! reg1 = gen_reg_rtx (DImode); ! } ! ! /* Load up the address+length pairs. */ ! emit_move_insn (gen_highpart (Pmode, reg0), addr0); ! convert_move (gen_lowpart (Pmode, reg0), len, 1); ! ! emit_move_insn (gen_highpart (Pmode, reg1), addr1); ! convert_move (gen_lowpart (Pmode, reg1), len, 1); ! /* Compare! */ ! if (TARGET_64BIT) ! emit_insn (gen_cmpstr_64 (reg0, reg1, reg0, reg1)); ! else ! emit_insn (gen_cmpstr_31 (reg0, reg1, reg0, reg1)); ! emit_insn (gen_cmpint_si (operands[0])); ! DONE; } ! }") ! ! ; Compare a block that is less than 256 bytes in length. ! ! (define_insn "cmpstr_const" ! [(set (reg:CCS 33) ! (compare:CCS (match_operand:BLK 0 "s_operand" "oQ") ! (match_operand:BLK 1 "s_operand" "oQ"))) ! (use (match_operand 2 "immediate_operand" "I"))] ! "(unsigned) INTVAL (operands[2]) < 256" ! "clc\\t%O0(%c2,%R0),%1" ! [(set_attr "op_type" "SS") ! (set_attr "atype" "mem") ! (set_attr "type" "cs")]) ! ; Compare a block that is larger than 255 bytes in length. ! (define_insn "cmpstr_64" [(clobber (match_operand:TI 0 "register_operand" "=d")) (clobber (match_operand:TI 1 "register_operand" "=d")) (set (reg:CCS 33) (compare:CCS (mem:BLK (subreg:DI (match_operand:TI 2 "register_operand" "0") 0)) ! (mem:BLK (subreg:DI (match_operand:TI 3 "register_operand" "1") 0))))] "TARGET_64BIT" "clcl\\t%0,%1" [(set_attr "op_type" "RR") (set_attr "atype" "mem") (set_attr "type" "vs")]) ! (define_insn "cmpstr_31" [(clobber (match_operand:DI 0 "register_operand" "=d")) (clobber (match_operand:DI 1 "register_operand" "=d")) (set (reg:CCS 33) (compare:CCS (mem:BLK (subreg:SI (match_operand:DI 2 "register_operand" "0") 0)) ! (mem:BLK (subreg:SI (match_operand:DI 3 "register_operand" "1") 0))))] "!TARGET_64BIT" "clcl\\t%0,%1" [(set_attr "op_type" "RR") --- 1853,1964 ---- (set_attr "length" "8")]) ; ! ; cmpstrM instruction pattern(s). ; (define_expand "cmpstrdi" ! [(set (match_operand:DI 0 "register_operand" "") ! (compare:DI (match_operand:BLK 1 "memory_operand" "") ! (match_operand:BLK 2 "memory_operand" "") ) ) ! (use (match_operand:DI 3 "general_operand" "")) ! (use (match_operand:DI 4 "" ""))] ! "TARGET_64BIT" ! "s390_expand_cmpstr (operands[0], operands[1], ! operands[2], operands[3]); DONE;") ! (define_expand "cmpstrsi" ! [(set (match_operand:SI 0 "register_operand" "") ! (compare:SI (match_operand:BLK 1 "memory_operand" "") ! (match_operand:BLK 2 "memory_operand" "") ) ) ! (use (match_operand:SI 3 "general_operand" "")) ! (use (match_operand:SI 4 "" ""))] ! "" ! "s390_expand_cmpstr (operands[0], operands[1], ! operands[2], operands[3]); DONE;") ! ; Compare a block that is up to 256 bytes in length. ! ; The block length is taken as (operands[2] % 256) + 1. ! (define_insn "cmpstr_short_64" ! [(set (reg:CCS 33) ! (compare:CCS (match_operand:BLK 0 "memory_operand" "=Q,Q") ! (match_operand:BLK 1 "memory_operand" "Q,Q"))) ! (use (match_operand:DI 2 "nonmemory_operand" "n,a")) ! (clobber (match_scratch:DI 3 "=X,&a"))] ! "TARGET_64BIT" ! "* ! { ! switch (which_alternative) { ! case 0: ! return \"clc\\t%O0(%b2+1,%R0),%1\"; ! case 1: ! output_asm_insn (\"bras\\t%3,.+10\", operands); ! output_asm_insn (\"clc\\t%O0(1,%R0),%1\", operands); ! return \"ex\\t%2,0(%3)\"; ! default: ! abort (); } ! }" ! [(set_attr "op_type" "SS,NN") ! (set_attr "type" "cs,cs") ! (set_attr "atype" "mem,mem") ! (set_attr "length" "*,14")]) ! (define_insn "cmpstr_short_31" ! [(set (reg:CCS 33) ! (compare:CCS (match_operand:BLK 0 "memory_operand" "=Q,Q") ! (match_operand:BLK 1 "memory_operand" "Q,Q"))) ! (use (match_operand:SI 2 "nonmemory_operand" "n,a")) ! (clobber (match_scratch:SI 3 "=X,&a"))] ! "!TARGET_64BIT" ! "* { ! switch (which_alternative) { ! case 0: ! return \"clc\\t%O0(%b2+1,%R0),%1\"; ! case 1: ! output_asm_insn (\"bras\\t%3,.+10\", operands); ! output_asm_insn (\"clc\\t%O0(1,%R0),%1\", operands); ! return \"ex\\t%2,0(%3)\"; ! default: ! abort (); } ! }" ! [(set_attr "op_type" "SS,NN") ! (set_attr "type" "cs,cs") ! (set_attr "atype" "mem,mem") ! (set_attr "length" "*,14")]) ! ; Compare a block of arbitrary length. ! (define_insn "cmpstr_long_64" [(clobber (match_operand:TI 0 "register_operand" "=d")) (clobber (match_operand:TI 1 "register_operand" "=d")) (set (reg:CCS 33) (compare:CCS (mem:BLK (subreg:DI (match_operand:TI 2 "register_operand" "0") 0)) ! (mem:BLK (subreg:DI (match_operand:TI 3 "register_operand" "1") 0)))) ! (use (match_dup 2)) ! (use (match_dup 3))] "TARGET_64BIT" "clcl\\t%0,%1" [(set_attr "op_type" "RR") (set_attr "atype" "mem") (set_attr "type" "vs")]) ! (define_insn "cmpstr_long_31" [(clobber (match_operand:DI 0 "register_operand" "=d")) (clobber (match_operand:DI 1 "register_operand" "=d")) (set (reg:CCS 33) (compare:CCS (mem:BLK (subreg:SI (match_operand:DI 2 "register_operand" "0") 0)) ! (mem:BLK (subreg:SI (match_operand:DI 3 "register_operand" "1") 0)))) ! (use (match_dup 2)) ! (use (match_dup 3))] "!TARGET_64BIT" "clcl\\t%0,%1" [(set_attr "op_type" "RR") *************** *** 2211,2217 **** (define_insn "*sethighqisi" [(set (match_operand:SI 0 "register_operand" "=d") ! (unspec:SI [(match_operand:QI 1 "s_operand" "Qo")] 10)) (clobber (reg:CC 33))] "" "icm\\t%0,8,%1" --- 2008,2014 ---- (define_insn "*sethighqisi" [(set (match_operand:SI 0 "register_operand" "=d") ! (unspec:SI [(match_operand:QI 1 "s_operand" "Q")] 10)) (clobber (reg:CC 33))] "" "icm\\t%0,8,%1" *************** *** 2220,2226 **** (define_insn "*sethighhisi" [(set (match_operand:SI 0 "register_operand" "=d") ! (unspec:SI [(match_operand:HI 1 "s_operand" "Qo")] 10)) (clobber (reg:CC 33))] "" "icm\\t%0,12,%1" --- 2017,2023 ---- (define_insn "*sethighhisi" [(set (match_operand:SI 0 "register_operand" "=d") ! (unspec:SI [(match_operand:HI 1 "s_operand" "Q")] 10)) (clobber (reg:CC 33))] "" "icm\\t%0,12,%1" *************** *** 2229,2235 **** (define_insn "*sethighqidi_64" [(set (match_operand:DI 0 "register_operand" "=d") ! (unspec:DI [(match_operand:QI 1 "s_operand" "Qo")] 10)) (clobber (reg:CC 33))] "TARGET_64BIT" "icmh\\t%0,8,%1" --- 2026,2032 ---- (define_insn "*sethighqidi_64" [(set (match_operand:DI 0 "register_operand" "=d") ! (unspec:DI [(match_operand:QI 1 "s_operand" "Q")] 10)) (clobber (reg:CC 33))] "TARGET_64BIT" "icmh\\t%0,8,%1" *************** *** 2238,2257 **** (define_insn "*sethighqidi_31" [(set (match_operand:DI 0 "register_operand" "=d") ! (unspec:DI [(match_operand:QI 1 "s_operand" "Qo")] 10)) (clobber (reg:CC 33))] "!TARGET_64BIT" "icm\\t%0,8,%1" [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (zero_extract:SI (match_operand:QI 1 "s_operand" "") ! (match_operand 2 "const_int_operand" "") ! (const_int 0)))] ! "!TARGET_64BIT && !reload_completed && INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 8" [(parallel [(set (match_dup 0) (unspec:SI [(match_dup 1)] 10)) (clobber (reg:CC 33))]) --- 2035,2057 ---- (define_insn "*sethighqidi_31" [(set (match_operand:DI 0 "register_operand" "=d") ! (unspec:DI [(match_operand:QI 1 "s_operand" "Q")] 10)) (clobber (reg:CC 33))] "!TARGET_64BIT" "icm\\t%0,8,%1" [(set_attr "op_type" "RS") (set_attr "atype" "mem")]) ! (define_insn_and_split "*extractqi" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (zero_extract:SI (match_operand:QI 1 "s_operand" "Q") ! (match_operand 2 "const_int_operand" "n") ! (const_int 0))) ! (clobber (reg:CC 33))] ! "!TARGET_64BIT && INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 8" + "#" + "&& reload_completed" [(parallel [(set (match_dup 0) (unspec:SI [(match_dup 1)] 10)) (clobber (reg:CC 33))]) *************** *** 2260,2274 **** { operands[2] = GEN_INT (32 - INTVAL (operands[2])); operands[1] = change_address (operands[1], QImode, 0); ! }") ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (zero_extract:SI (match_operand:QI 1 "s_operand" "") ! (match_operand 2 "const_int_operand" "") ! (const_int 0)))] ! "!TARGET_64BIT && !reload_completed && INTVAL (operands[2]) >= 8 && INTVAL (operands[2]) < 16" [(parallel [(set (match_dup 0) (unspec:SI [(match_dup 1)] 10)) (clobber (reg:CC 33))]) --- 2060,2078 ---- { operands[2] = GEN_INT (32 - INTVAL (operands[2])); operands[1] = change_address (operands[1], QImode, 0); ! }" ! [(set_attr "atype" "mem")]) ! (define_insn_and_split "*extracthi" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (zero_extract:SI (match_operand:QI 1 "s_operand" "Q") ! (match_operand 2 "const_int_operand" "n") ! (const_int 0))) ! (clobber (reg:CC 33))] ! "!TARGET_64BIT && INTVAL (operands[2]) >= 8 && INTVAL (operands[2]) < 16" + "#" + "&& reload_completed" [(parallel [(set (match_dup 0) (unspec:SI [(match_dup 1)] 10)) (clobber (reg:CC 33))]) *************** *** 2277,2283 **** { operands[2] = GEN_INT (32 - INTVAL (operands[2])); operands[1] = change_address (operands[1], HImode, 0); ! }") ; ; extendsidi2 instruction pattern(s). --- 2081,2088 ---- { operands[2] = GEN_INT (32 - INTVAL (operands[2])); operands[1] = change_address (operands[1], HImode, 0); ! }" ! [(set_attr "atype" "mem")]) ; ; extendsidi2 instruction pattern(s). *************** *** 2566,2571 **** --- 2371,2390 ---- "llgh\\t%0,%1" [(set_attr "op_type" "RXE") (set_attr "atype" "mem")]) + + (define_insn_and_split "*zero_extendhisi2_31" + [(set (match_operand:SI 0 "register_operand" "=&d") + (zero_extend:SI (match_operand:HI 1 "memory_operand" "Q"))) + (clobber (reg:CC 33))] + "!TARGET_64BIT" + "#" + "&& reload_completed" + [(set (match_dup 0) (const_int 0)) + (parallel + [(set (strict_low_part (match_dup 2)) (match_dup 1)) + (clobber (reg:CC 33))])] + "operands[2] = gen_lowpart (HImode, operands[0]);" + [(set_attr "atype" "mem")]) ; ; zero_extendqisi2 instruction pattern(s). *************** *** 2590,2595 **** --- 2409,2425 ---- "llgc\\t%0,%1" [(set_attr "op_type" "RXE") (set_attr "atype" "mem")]) + + (define_insn_and_split "*zero_extendqisi2_31" + [(set (match_operand:SI 0 "register_operand" "=&d") + (zero_extend:SI (match_operand:QI 1 "memory_operand" "m")))] + "!TARGET_64BIT" + "#" + "&& reload_completed" + [(set (match_dup 0) (const_int 0)) + (set (strict_low_part (match_dup 2)) (match_dup 1))] + "operands[2] = gen_lowpart (QImode, operands[0]);" + [(set_attr "atype" "mem")]) ; ; zero_extendqihi2 instruction pattern(s). *************** *** 2609,2621 **** (define_insn "*zero_extendqihi2_64" [(set (match_operand:HI 0 "register_operand" "=d") ! (zero_extend:HI (match_operand:QI 1 "memory_operand" "m"))) ! (clobber (reg:CC 33))] "TARGET_64BIT" "llgc\\t%0,%1" [(set_attr "op_type" "RXE") (set_attr "atype" "mem")]) ; ; fixuns_truncdfdi2 and fix_truncdfsi2 instruction pattern(s). ; --- 2439,2462 ---- (define_insn "*zero_extendqihi2_64" [(set (match_operand:HI 0 "register_operand" "=d") ! (zero_extend:HI (match_operand:QI 1 "memory_operand" "m")))] "TARGET_64BIT" "llgc\\t%0,%1" [(set_attr "op_type" "RXE") (set_attr "atype" "mem")]) + (define_insn_and_split "*zero_extendqihi2_31" + [(set (match_operand:HI 0 "register_operand" "=&d") + (zero_extend:HI (match_operand:QI 1 "memory_operand" "m")))] + "!TARGET_64BIT" + "#" + "&& reload_completed" + [(set (match_dup 0) (const_int 0)) + (set (strict_low_part (match_dup 2)) (match_dup 1))] + "operands[2] = gen_lowpart (QImode, operands[0]);" + [(set_attr "atype" "mem")]) + + ; ; fixuns_truncdfdi2 and fix_truncdfsi2 instruction pattern(s). ; *************** *** 3062,3085 **** ; adddi3 instruction pattern(s). ; ! (define_insn "addaddr_esame" ! [(set (match_operand:DI 0 "register_operand" "=a,a") ! (plus:DI (match_operand:DI 1 "register_operand" "%a,a") ! (match_operand:DI 2 "nonmemory_operand" "J,a")))] ! "TARGET_64BIT && (((REGNO (operands[1]) == STACK_POINTER_REGNUM ) || ! (REGNO (operands[1]) == BASE_REGISTER)) && ! (GET_CODE (operands[2]) == REG || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]),'J')))" "@ ! la\\t%0,%c2(,%1) ! la\\t%0,0(%1,%2)" ! [(set_attr "op_type" "RX") ! (set_attr "atype" "mem") ! (set_attr "type" "la")]) ! (define_insn "adddi3_64" [(set (match_operand:DI 0 "register_operand" "=d,d,d") ! (plus:DI (match_operand:DI 1 "register_operand" "%0,0,0") (match_operand:DI 2 "general_operand" "d,K,m") ) ) (clobber (reg:CC 33))] "TARGET_64BIT" --- 2903,3015 ---- ; adddi3 instruction pattern(s). ; ! (define_insn "*adddi3_sign" ! [(set (match_operand:DI 0 "register_operand" "=d,d") ! (plus:DI (sign_extend:DI (match_operand:SI 2 "general_operand" "d,m")) ! (match_operand:DI 1 "register_operand" "0,0"))) ! (clobber (reg:CC 33))] ! "TARGET_64BIT" "@ ! agfr\\t%0,%2 ! agf\\t%0,%2" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! (define_insn "*adddi3_zero_cc" ! [(set (reg 33) ! (compare (plus:DI (zero_extend:DI (match_operand:SI 2 "general_operand" "d,m")) ! (match_operand:DI 1 "register_operand" "0,0")) ! (const_int 0))) ! (set (match_operand:DI 0 "register_operand" "=d,d") ! (plus:DI (zero_extend:DI (match_dup 2)) (match_dup 1)))] ! "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" ! "@ ! algfr\\t%0,%2 ! algf\\t%0,%2" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*adddi3_zero_cconly" ! [(set (reg 33) ! (compare (plus:DI (zero_extend:DI (match_operand:SI 2 "general_operand" "d,m")) ! (match_operand:DI 1 "register_operand" "0,0")) ! (const_int 0))) ! (clobber (match_scratch:DI 0 "=d,d"))] ! "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" ! "@ ! algfr\\t%0,%2 ! algf\\t%0,%2" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*adddi3_zero" ! [(set (match_operand:DI 0 "register_operand" "=d,d") ! (plus:DI (zero_extend:DI (match_operand:SI 2 "general_operand" "d,m")) ! (match_operand:DI 1 "register_operand" "0,0"))) ! (clobber (reg:CC 33))] ! "TARGET_64BIT" ! "@ ! algfr\\t%0,%2 ! algf\\t%0,%2" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*adddi3_imm_cc" ! [(set (reg 33) ! (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "0") ! (match_operand:DI 2 "const_int_operand" "K")) ! (const_int 0))) ! (set (match_operand:DI 0 "register_operand" "=d") ! (plus:DI (match_dup 1) (match_dup 2)))] ! "TARGET_64BIT ! && s390_match_ccmode (insn, CCAmode) ! && CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'K')" ! "aghi\\t%0,%h2" ! [(set_attr "op_type" "RI") ! (set_attr "atype" "reg")]) ! ! (define_insn "*adddi3_cc" ! [(set (reg 33) ! (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") ! (match_operand:DI 2 "general_operand" "d,m")) ! (const_int 0))) ! (set (match_operand:DI 0 "register_operand" "=d,d") ! (plus:DI (match_dup 1) (match_dup 2)))] ! "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" ! "@ ! algr\\t%0,%2 ! alg\\t%0,%2" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*adddi3_cconly" ! [(set (reg 33) ! (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") ! (match_operand:DI 2 "general_operand" "d,m")) ! (const_int 0))) ! (clobber (match_scratch:DI 0 "=d,d"))] ! "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" ! "@ ! algr\\t%0,%2 ! alg\\t%0,%2" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*adddi3_cconly2" ! [(set (reg 33) ! (compare (match_operand:DI 1 "nonimmediate_operand" "%0,0") ! (neg:SI (match_operand:DI 2 "general_operand" "d,m")))) ! (clobber (match_scratch:DI 0 "=d,d"))] ! "s390_match_ccmode(insn, CCLmode) && TARGET_64BIT" ! "@ ! algr\\t%0,%2 ! alg\\t%0,%2" ! [(set_attr "op_type" "RRE,RXE") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*adddi3_64" [(set (match_operand:DI 0 "register_operand" "=d,d,d") ! (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,0") (match_operand:DI 2 "general_operand" "d,K,m") ) ) (clobber (reg:CC 33))] "TARGET_64BIT" *************** *** 3090,3140 **** [(set_attr "op_type" "RRE,RI,RXE") (set_attr "atype" "reg,reg,mem")]) ! (define_insn "adddi3_31" ! [(set (match_operand:DI 0 "register_operand" "=d,d") ! (plus:DI (match_operand:DI 1 "register_operand" "0,0") ! (match_operand:DI 2 "general_operand" "d,m") ) ) (clobber (reg:CC 33))] "!TARGET_64BIT" ! "* ! { ! switch (which_alternative) ! { ! case 0: /* d <- d */ ! output_asm_insn (\"ar\\t%0,%2\", operands); ! output_asm_insn (\"alr\\t%N0,%N2\", operands); ! break; ! ! case 1: /* d <- m */ ! output_asm_insn (\"a\\t%0,%2\", operands); ! output_asm_insn (\"al\\t%N0,%N2\", operands); ! break; ! ! default: ! abort (); ! } ! ! output_asm_insn (\"brc\\t12,.+8\", operands); ! return \"ahi\\t%0,1\"; ! }" ! [(set_attr "op_type" "NN,NN") ! (set_attr "atype" "reg,mem") ! (set_attr "type" "o2,o2") ! (set_attr "length" "12,16")]) (define_expand "adddi3" ! [(set (match_operand:DI 0 "register_operand" "") ! (plus:DI (match_operand:DI 1 "register_operand" "") ! (match_operand:DI 2 "general_operand" "")))] "" ! " ! { ! if (TARGET_64BIT) ! emit_insn(gen_adddi3_64 (operands[0],operands[1],operands[2])); ! else ! emit_insn(gen_adddi3_31 (operands[0],operands[1],operands[2])); ! DONE; ! }") (define_insn "*la_64" [(set (match_operand:DI 0 "register_operand" "=d") --- 3020,3066 ---- [(set_attr "op_type" "RRE,RI,RXE") (set_attr "atype" "reg,reg,mem")]) ! (define_insn_and_split "*adddi3_31" ! [(set (match_operand:DI 0 "register_operand" "=&d") ! (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0") ! (match_operand:DI 2 "general_operand" "do") ) ) (clobber (reg:CC 33))] "!TARGET_64BIT" ! "#" ! "&& reload_completed" ! [(parallel ! [(set (match_dup 3) (plus:SI (match_dup 4) (match_dup 5))) ! (clobber (reg:CC 33))]) ! (parallel ! [(set (reg:CCL1 33) ! (compare:CCL1 (plus:SI (match_dup 7) (match_dup 8)) ! (match_dup 7))) ! (set (match_dup 6) (plus:SI (match_dup 7) (match_dup 8)))]) ! (set (pc) ! (if_then_else (ltu (reg:CCL1 33) (const_int 0)) ! (pc) ! (label_ref (match_dup 9)))) ! (parallel ! [(set (match_dup 3) (plus:SI (match_dup 3) (const_int 1))) ! (clobber (reg:CC 33))]) ! (match_dup 9)] ! "operands[3] = operand_subword (operands[0], 0, 0, DImode); ! operands[4] = operand_subword (operands[1], 0, 0, DImode); ! operands[5] = operand_subword (operands[2], 0, 0, DImode); ! operands[6] = operand_subword (operands[0], 1, 0, DImode); ! operands[7] = operand_subword (operands[1], 1, 0, DImode); ! operands[8] = operand_subword (operands[2], 1, 0, DImode); ! operands[9] = gen_label_rtx ();" ! [(set_attr "op_type" "NN")]) (define_expand "adddi3" ! [(parallel ! [(set (match_operand:DI 0 "register_operand" "") ! (plus:DI (match_operand:DI 1 "nonimmediate_operand" "") ! (match_operand:DI 2 "general_operand" ""))) ! (clobber (reg:CC 33))])] "" ! "") (define_insn "*la_64" [(set (match_operand:DI 0 "register_operand" "=d") *************** *** 3145,3154 **** (set_attr "atype" "mem") (set_attr "type" "la")]) (define_expand "reload_indi" [(parallel [(match_operand:DI 0 "register_operand" "=a") (match_operand:DI 1 "s390_plus_operand" "") ! (match_operand:TI 2 "register_operand" "=&a")])] "TARGET_64BIT" " { --- 3071,3106 ---- (set_attr "atype" "mem") (set_attr "type" "la")]) + (define_peephole2 + [(parallel + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:QI 1 "address_operand" "")) + (clobber (reg:CC 33))])] + "TARGET_64BIT + && strict_memory_address_p (VOIDmode, operands[1]) + && preferred_la_operand_p (operands[1])" + [(set (match_dup 0) (match_dup 1))] + "") + + (define_peephole2 + [(set (match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "")) + (parallel + [(set (match_dup 0) + (plus:DI (match_dup 0) + (match_operand:DI 2 "nonmemory_operand" ""))) + (clobber (reg:CC 33))])] + "TARGET_64BIT + && !reg_overlap_mentioned_p (operands[0], operands[2]) + && strict_memory_address_p (VOIDmode, gen_rtx_PLUS (DImode, operands[1], operands[2])) + && preferred_la_operand_p (gen_rtx_PLUS (DImode, operands[1], operands[2]))" + [(set (match_dup 0) (plus:DI (match_dup 1) (match_dup 2)))] + "") + (define_expand "reload_indi" [(parallel [(match_operand:DI 0 "register_operand" "=a") (match_operand:DI 1 "s390_plus_operand" "") ! (match_operand:DI 2 "register_operand" "=&a")])] "TARGET_64BIT" " { *************** *** 3161,3184 **** ; addsi3 instruction pattern(s). ; ! (define_insn "*la_ccclobber" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (match_operand:QI 1 "address_operand" "p")) ! (clobber (reg:CC 33))] ! "legitimate_la_operand_p (operands[1])" ! "la\\t%0,%a1" ! [(set_attr "op_type" "RX") ! (set_attr "atype" "mem") ! (set_attr "type" "la")]) (define_insn "*addsi3_cc" [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "register_operand" "%0,0") ! (match_operand:SI 2 "nonimmediate_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") (plus:SI (match_dup 1) (match_dup 2)))] ! "s390_match_ccmode(insn, CCLmode)" "@ alr\\t%0,%2 al\\t%0,%2" --- 3113,3193 ---- ; addsi3 instruction pattern(s). ; ! (define_insn "*addsi3_imm_cc" ! [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "nonimmediate_operand" "0") ! (match_operand:SI 2 "const_int_operand" "K")) ! (const_int 0))) ! (set (match_operand:SI 0 "register_operand" "=d") ! (plus:SI (match_dup 1) (match_dup 2)))] ! "s390_match_ccmode (insn, CCAmode) ! && CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'K')" ! "ahi\\t%0,%h2" ! [(set_attr "op_type" "RI") ! (set_attr "atype" "reg")]) ! ! (define_insn "*addsi3_carry1_cc" ! [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ! (match_operand:SI 2 "general_operand" "d,m")) ! (match_dup 1))) ! (set (match_operand:SI 0 "register_operand" "=d,d") ! (plus:SI (match_dup 1) (match_dup 2)))] ! "s390_match_ccmode (insn, CCL1mode)" ! "@ ! alr\\t%0,%2 ! al\\t%0,%2" ! [(set_attr "op_type" "RR,RX") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*addsi3_carry1_cconly" ! [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ! (match_operand:SI 2 "general_operand" "d,m")) ! (match_dup 1))) ! (clobber (match_scratch:SI 0 "=d,d"))] ! "s390_match_ccmode (insn, CCL1mode)" ! "@ ! alr\\t%0,%2 ! al\\t%0,%2" ! [(set_attr "op_type" "RR,RX") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*addsi3_carry2_cc" ! [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ! (match_operand:SI 2 "general_operand" "d,m")) ! (match_dup 2))) ! (set (match_operand:SI 0 "register_operand" "=d,d") ! (plus:SI (match_dup 1) (match_dup 2)))] ! "s390_match_ccmode (insn, CCL1mode)" ! "@ ! alr\\t%0,%2 ! al\\t%0,%2" ! [(set_attr "op_type" "RR,RX") ! (set_attr "atype" "reg,mem")]) ! ! (define_insn "*addsi3_carry2_cconly" ! [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ! (match_operand:SI 2 "general_operand" "d,m")) ! (match_dup 2))) ! (clobber (match_scratch:SI 0 "=d,d"))] ! "s390_match_ccmode (insn, CCL1mode)" ! "@ ! alr\\t%0,%2 ! al\\t%0,%2" ! [(set_attr "op_type" "RR,RX") ! (set_attr "atype" "reg,mem")]) (define_insn "*addsi3_cc" [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ! (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") (plus:SI (match_dup 1) (match_dup 2)))] ! "s390_match_ccmode (insn, CCLmode)" "@ alr\\t%0,%2 al\\t%0,%2" *************** *** 3187,3197 **** (define_insn "*addsi3_cconly" [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] ! "s390_match_ccmode(insn, CCLmode)" "@ alr\\t%0,%2 al\\t%0,%2" --- 3196,3206 ---- (define_insn "*addsi3_cconly" [(set (reg 33) ! (compare (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] ! "s390_match_ccmode (insn, CCLmode)" "@ alr\\t%0,%2 al\\t%0,%2" *************** *** 3200,3206 **** (define_insn "*addsi3_cconly2" [(set (reg 33) ! (compare (match_operand:SI 1 "register_operand" "%0,0") (neg:SI (match_operand:SI 2 "general_operand" "d,m")))) (clobber (match_scratch:SI 0 "=d,d"))] "s390_match_ccmode(insn, CCLmode)" --- 3209,3215 ---- (define_insn "*addsi3_cconly2" [(set (reg 33) ! (compare (match_operand:SI 1 "nonimmediate_operand" "%0,0") (neg:SI (match_operand:SI 2 "general_operand" "d,m")))) (clobber (match_scratch:SI 0 "=d,d"))] "s390_match_ccmode(insn, CCLmode)" *************** *** 3210,3218 **** [(set_attr "op_type" "RR,RX") (set_attr "atype" "reg,mem")]) (define_insn "addsi3" [(set (match_operand:SI 0 "register_operand" "=d,d,d") ! (plus:SI (match_operand:SI 1 "register_operand" "%0,0,0") (match_operand:SI 2 "general_operand" "d,K,m"))) (clobber (reg:CC 33))] "" --- 3219,3247 ---- [(set_attr "op_type" "RR,RX") (set_attr "atype" "reg,mem")]) + (define_insn "*addsi3_sign" + [(set (match_operand:SI 0 "register_operand" "=d") + (plus:SI (match_operand:SI 1 "register_operand" "0") + (sign_extend:SI (match_operand:HI 2 "memory_operand" "m")))) + (clobber (reg:CC 33))] + "" + "ah\\t%0,%2" + [(set_attr "op_type" "RX") + (set_attr "atype" "mem")]) + + (define_insn "*addsi3_sub" + [(set (match_operand:SI 0 "register_operand" "=d") + (plus:SI (match_operand:SI 1 "register_operand" "0") + (subreg:SI (match_operand:HI 2 "memory_operand" "m") 0))) + (clobber (reg:CC 33))] + "" + "ah\\t%0,%2" + [(set_attr "op_type" "RX") + (set_attr "atype" "mem")]) + (define_insn "addsi3" [(set (match_operand:SI 0 "register_operand" "=d,d,d") ! (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,0") (match_operand:SI 2 "general_operand" "d,K,m"))) (clobber (reg:CC 33))] "" *************** *** 3223,3245 **** [(set_attr "op_type" "RR,RI,RX") (set_attr "atype" "reg,reg,mem")]) ! (define_insn "*addsi3_inv" ! [(set (match_operand:SI 0 "register_operand" "=d,d,d") ! (plus:SI (match_operand:SI 1 "general_operand" "%d,K,m") ! (match_operand:SI 2 "register_operand" "0,0,0"))) (clobber (reg:CC 33))] "" ! "@ ! ar\\t%0,%1 ! ahi\\t%0,%h1 ! a\\t%0,%1" ! [(set_attr "op_type" "RR,RI,RX") ! (set_attr "atype" "reg,reg,mem")]) ! (define_insn "*la_31" [(set (match_operand:SI 0 "register_operand" "=d") ! (match_operand:QI 1 "address_operand" "p"))] ! "legitimate_la_operand_p (operands[1])" "la\\t%0,%a1" [(set_attr "op_type" "RX") (set_attr "atype" "mem") --- 3252,3322 ---- [(set_attr "op_type" "RR,RI,RX") (set_attr "atype" "reg,reg,mem")]) ! (define_insn "*la_31" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (match_operand:QI 1 "address_operand" "p"))] ! "!TARGET_64BIT && legitimate_la_operand_p (operands[1])" ! "la\\t%0,%a1" ! [(set_attr "op_type" "RX") ! (set_attr "atype" "mem") ! (set_attr "type" "la")]) ! ! (define_peephole2 ! [(parallel ! [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:QI 1 "address_operand" "")) ! (clobber (reg:CC 33))])] ! "!TARGET_64BIT ! && strict_memory_address_p (VOIDmode, operands[1]) ! && preferred_la_operand_p (operands[1])" ! [(set (match_dup 0) (match_dup 1))] ! "") ! ! (define_peephole2 ! [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "register_operand" "")) ! (parallel ! [(set (match_dup 0) ! (plus:SI (match_dup 0) ! (match_operand:SI 2 "nonmemory_operand" ""))) ! (clobber (reg:CC 33))])] ! "!TARGET_64BIT ! && !reg_overlap_mentioned_p (operands[0], operands[2]) ! && strict_memory_address_p (VOIDmode, gen_rtx_PLUS (SImode, operands[1], operands[2])) ! && preferred_la_operand_p (gen_rtx_PLUS (SImode, operands[1], operands[2]))" ! [(set (match_dup 0) (plus:DI (match_dup 1) (match_dup 2)))] ! "") ! ! (define_insn "*la_31_and" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (and:SI (match_operand:QI 1 "address_operand" "p") ! (const_int 2147483647)))] ! "!TARGET_64BIT" ! "la\\t%0,%a1" ! [(set_attr "op_type" "RX") ! (set_attr "atype" "mem") ! (set_attr "type" "la")]) ! ! (define_insn_and_split "*la_31_and_cc" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (and:SI (match_operand:QI 1 "address_operand" "p") ! (const_int 2147483647))) (clobber (reg:CC 33))] + "!TARGET_64BIT" + "#" + "&& reload_completed" + [(set (match_dup 0) + (and:SI (match_dup 1) (const_int 2147483647)))] "" ! [(set_attr "op_type" "RX") ! (set_attr "atype" "mem") ! (set_attr "type" "la")]) ! (define_insn "force_la_31" [(set (match_operand:SI 0 "register_operand" "=d") ! (match_operand:QI 1 "address_operand" "p")) ! (use (const_int 0))] ! "!TARGET_64BIT" "la\\t%0,%a1" [(set_attr "op_type" "RX") (set_attr "atype" "mem") *************** *** 3248,3254 **** (define_expand "reload_insi" [(parallel [(match_operand:SI 0 "register_operand" "=a") (match_operand:SI 1 "s390_plus_operand" "") ! (match_operand:DI 2 "register_operand" "=&a")])] "!TARGET_64BIT" " { --- 3325,3331 ---- (define_expand "reload_insi" [(parallel [(match_operand:SI 0 "register_operand" "=a") (match_operand:SI 1 "s390_plus_operand" "") ! (match_operand:SI 2 "register_operand" "=&a")])] "!TARGET_64BIT" " { *************** *** 3258,3305 **** ; - ; addhi3 instruction pattern(s). - ; - - (define_insn "addhi3" - [(set (match_operand:HI 0 "register_operand" "=d,d,d") - (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0") - (match_operand:HI 2 "general_operand" "d,K,m"))) - (clobber (reg:CC 33))] - "" - "@ - ar\\t%0,%2 - ahi\\t%0,%h2 - ah\\t%0,%2" - [(set_attr "op_type" "RR,RI,RX") - (set_attr "atype" "reg,reg,mem")]) - - - ; - ; addqi3 instruction pattern(s). - ; - - (define_insn "addqi3" - [(set (match_operand:QI 0 "register_operand" "=d,d") - (plus:QI (match_operand:QI 1 "register_operand" "%0,0") - (match_operand:QI 2 "general_operand" "a,n"))) - (clobber (reg:CC 33))] - "" - "@ - ar\\t%0,%2 - ahi\\t%0,%h2" - [(set_attr "op_type" "RX,RX") - (set_attr "atype" "reg,mem")]) - - - ; ; adddf3 instruction pattern(s). ; (define_expand "adddf3" [(parallel [(set (match_operand:DF 0 "register_operand" "=f,f") ! (plus:DF (match_operand:DF 1 "register_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" --- 3335,3347 ---- ; ; adddf3 instruction pattern(s). ; (define_expand "adddf3" [(parallel [(set (match_operand:DF 0 "register_operand" "=f,f") ! (plus:DF (match_operand:DF 1 "nonimmediate_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" *************** *** 3307,3313 **** (define_insn "*adddf3" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (plus:DF (match_operand:DF 1 "register_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" --- 3349,3355 ---- (define_insn "*adddf3" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (plus:DF (match_operand:DF 1 "nonimmediate_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" *************** *** 3319,3325 **** (define_insn "*adddf3_ibm" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (plus:DF (match_operand:DF 1 "register_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" --- 3361,3367 ---- (define_insn "*adddf3_ibm" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (plus:DF (match_operand:DF 1 "nonimmediate_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" *************** *** 3336,3342 **** (define_expand "addsf3" [(parallel [(set (match_operand:SF 0 "register_operand" "=f,f") ! (plus:SF (match_operand:SF 1 "register_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" --- 3378,3384 ---- (define_expand "addsf3" [(parallel [(set (match_operand:SF 0 "register_operand" "=f,f") ! (plus:SF (match_operand:SF 1 "nonimmediate_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" *************** *** 3344,3350 **** (define_insn "*addsf3" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (plus:SF (match_operand:SF 1 "register_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" --- 3386,3392 ---- (define_insn "*addsf3" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (plus:SF (match_operand:SF 1 "nonimmediate_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" *************** *** 3356,3362 **** (define_insn "*addsf3" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (plus:SF (match_operand:SF 1 "register_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" --- 3398,3404 ---- (define_insn "*addsf3" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (plus:SF (match_operand:SF 1 "nonimmediate_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" *************** *** 3375,3380 **** --- 3417,3500 ---- ; subdi3 instruction pattern(s). ; + (define_insn "*subdi3_sign" + [(set (match_operand:DI 0 "register_operand" "=d,d") + (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (sign_extend:DI (match_operand:SI 2 "general_operand" "d,m")))) + (clobber (reg:CC 33))] + "TARGET_64BIT" + "@ + sgfr\\t%0,%2 + sgf\\t%0,%2" + [(set_attr "op_type" "RRE,RXE") + (set_attr "atype" "reg,mem")]) + + (define_insn "*subdi3_zero_cc" + [(set (reg 33) + (compare (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (zero_extend:DI (match_operand:SI 2 "general_operand" "d,m"))) + (const_int 0))) + (set (match_operand:DI 0 "register_operand" "=d,d") + (minus:DI (match_dup 1) (zero_extend:DI (match_dup 2))))] + "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" + "@ + slgfr\\t%0,%2 + slgf\\t%0,%2" + [(set_attr "op_type" "RRE,RXE") + (set_attr "atype" "reg,mem")]) + + (define_insn "*subdi3_zero_cconly" + [(set (reg 33) + (compare (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (zero_extend:DI (match_operand:SI 2 "general_operand" "d,m"))) + (const_int 0))) + (clobber (match_scratch:DI 0 "=d,d"))] + "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" + "@ + slgfr\\t%0,%2 + slgf\\t%0,%2" + [(set_attr "op_type" "RRE,RXE") + (set_attr "atype" "reg,mem")]) + + (define_insn "*subdi3_zero" + [(set (match_operand:DI 0 "register_operand" "=d,d") + (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (zero_extend:DI (match_operand:SI 2 "general_operand" "d,m")))) + (clobber (reg:CC 33))] + "TARGET_64BIT" + "@ + slgfr\\t%0,%2 + slgf\\t%0,%2" + [(set_attr "op_type" "RRE,RXE") + (set_attr "atype" "reg,mem")]) + + (define_insn "*subdi3_cc" + [(set (reg 33) + (compare (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (const_int 0))) + (set (match_operand:DI 0 "register_operand" "=d,d") + (minus:DI (match_dup 1) (match_dup 2)))] + "s390_match_ccmode (insn, CCLmode)" + "@ + slgr\\t%0,%2 + slg\\t%0,%2" + [(set_attr "op_type" "RRE,RXE") + (set_attr "atype" "reg,mem")]) + + (define_insn "*subdi3_cconly" + [(set (reg 33) + (compare (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (const_int 0))) + (clobber (match_scratch:DI 0 "=d,d"))] + "s390_match_ccmode (insn, CCLmode)" + "@ + slgr\\t%0,%2 + slg\\t%0,%2" + [(set_attr "op_type" "RRE,RXE") + (set_attr "atype" "reg,mem")]) + (define_insn "*subdi3_64" [(set (match_operand:DI 0 "register_operand" "=d,d") (minus:DI (match_operand:DI 1 "register_operand" "0,0") *************** *** 3387,3427 **** [(set_attr "op_type" "RRE,RRE") (set_attr "atype" "reg,mem")]) ! (define_insn "subdi3" ! [(set (match_operand:DI 0 "register_operand" "=d,d") ! (minus:DI (match_operand:DI 1 "register_operand" "0,0") ! (match_operand:DI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] ! "" ! "* ! { ! switch (which_alternative) ! { ! case 0: /* d <- d */ ! output_asm_insn (\"sr\\t%0,%2\", operands); ! output_asm_insn (\"slr\\t%N0,%N2\", operands); ! break; ! case 1: /* d <- m */ ! output_asm_insn (\"s\\t%0,%2\", operands); ! output_asm_insn (\"sl\\t%N0,%N2\", operands); ! break; ! ! default: ! abort (); ! } ! output_asm_insn (\"brc\\t11,.+8\", operands); ! return \"ahi\\t%0,-1\"; ! }" ! [(set_attr "op_type" "NN,NN") ! (set_attr "atype" "reg,mem") ! (set_attr "type" "other,other") ! (set_attr "length" "12,16")]) ; ; subsi3 instruction pattern(s). ; (define_insn "*subsi3_cc" [(set (reg 33) (compare (minus:SI (match_operand:SI 1 "register_operand" "0,0") --- 3507,3585 ---- [(set_attr "op_type" "RRE,RRE") (set_attr "atype" "reg,mem")]) ! (define_insn_and_split "*subdi3_31" ! [(set (match_operand:DI 0 "register_operand" "=&d") ! (minus:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "general_operand" "do") ) ) (clobber (reg:CC 33))] ! "!TARGET_64BIT" ! "#" ! "&& reload_completed" ! [(parallel ! [(set (match_dup 3) (minus:SI (match_dup 4) (match_dup 5))) ! (clobber (reg:CC 33))]) ! (parallel ! [(set (reg:CCL2 33) ! (compare:CCL2 (minus:SI (match_dup 7) (match_dup 8)) ! (match_dup 7))) ! (set (match_dup 6) (minus:SI (match_dup 7) (match_dup 8)))]) ! (set (pc) ! (if_then_else (gtu (reg:CCL2 33) (const_int 0)) ! (pc) ! (label_ref (match_dup 9)))) ! (parallel ! [(set (match_dup 3) (plus:SI (match_dup 3) (const_int -1))) ! (clobber (reg:CC 33))]) ! (match_dup 9)] ! "operands[3] = operand_subword (operands[0], 0, 0, DImode); ! operands[4] = operand_subword (operands[1], 0, 0, DImode); ! operands[5] = operand_subword (operands[2], 0, 0, DImode); ! operands[6] = operand_subword (operands[0], 1, 0, DImode); ! operands[7] = operand_subword (operands[1], 1, 0, DImode); ! operands[8] = operand_subword (operands[2], 1, 0, DImode); ! operands[9] = gen_label_rtx ();" ! [(set_attr "op_type" "NN")]) ! (define_expand "subdi3" ! [(parallel ! [(set (match_operand:DI 0 "register_operand" "") ! (minus:DI (match_operand:DI 1 "register_operand" "") ! (match_operand:DI 2 "general_operand" ""))) ! (clobber (reg:CC 33))])] ! "" ! "") ; ; subsi3 instruction pattern(s). ; + (define_insn "*subsi3_borrow_cc" + [(set (reg 33) + (compare (minus:SI (match_operand:SI 1 "register_operand" "0,0") + (match_operand:SI 2 "general_operand" "d,m")) + (match_dup 1))) + (set (match_operand:SI 0 "register_operand" "=d,d") + (minus:SI (match_dup 1) (match_dup 2)))] + "s390_match_ccmode(insn, CCL2mode)" + "@ + slr\\t%0,%2 + sl\\t%0,%2" + [(set_attr "op_type" "RR,RX") + (set_attr "atype" "reg,mem")]) + + (define_insn "*subsi3_borrow_cconly" + [(set (reg 33) + (compare (minus:SI (match_operand:SI 1 "register_operand" "0,0") + (match_operand:SI 2 "general_operand" "d,m")) + (match_dup 1))) + (clobber (match_scratch:SI 0 "=d,d"))] + "s390_match_ccmode(insn, CCL2mode)" + "@ + slr\\t%0,%2 + sl\\t%0,%2" + [(set_attr "op_type" "RR,RX") + (set_attr "atype" "reg,mem")]) + (define_insn "*subsi3_cc" [(set (reg 33) (compare (minus:SI (match_operand:SI 1 "register_operand" "0,0") *************** *** 3449,3454 **** --- 3607,3632 ---- [(set_attr "op_type" "RR,RX") (set_attr "atype" "reg,mem")]) + (define_insn "*subsi3_sign" + [(set (match_operand:SI 0 "register_operand" "=d") + (minus:SI (match_operand:SI 1 "register_operand" "0") + (sign_extend:SI (match_operand:HI 2 "memory_operand" "m")))) + (clobber (reg:CC 33))] + "" + "sh\\t%0,%2" + [(set_attr "op_type" "RX") + (set_attr "atype" "mem")]) + + (define_insn "*subsi3_sub" + [(set (match_operand:SI 0 "register_operand" "=d") + (minus:SI (match_operand:SI 1 "register_operand" "0") + (subreg:SI (match_operand:HI 2 "memory_operand" "m") 0))) + (clobber (reg:CC 33))] + "" + "sh\\t%0,%2" + [(set_attr "op_type" "RX") + (set_attr "atype" "mem")]) + (define_insn "subsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") (minus:SI (match_operand:SI 1 "register_operand" "0,0") *************** *** 3461,3494 **** [(set_attr "op_type" "RR,RX") (set_attr "atype" "reg,mem")]) - ; - ; subhi3 instruction pattern(s). - ; - - (define_insn "subhi3" - [(set (match_operand:HI 0 "register_operand" "=d,d") - (minus:HI (match_operand:HI 1 "register_operand" "0,0") - (match_operand:HI 2 "general_operand" "d,m"))) - (clobber (reg:CC 33))] - "" - "@ - sr\\t%0,%2 - sh\\t%0,%2" - [(set_attr "op_type" "RR,RX") - (set_attr "atype" "reg,mem")]) - - ; - ; subqi3 instruction pattern(s). - ; - - (define_insn "subqi3" - [(set (match_operand:QI 0 "register_operand" "=d") - (minus:QI (match_operand:QI 1 "register_operand" "0") - (match_operand:QI 2 "register_operand" "d"))) - (clobber (reg:CC 33))] - "" - "sr\\t%0,%2" - [(set_attr "op_type" "RR")]) ; ; subdf3 instruction pattern(s). --- 3639,3644 ---- *************** *** 3573,3589 **** ; muldi3 instruction pattern(s). ; (define_insn "muldi3" [(set (match_operand:DI 0 "register_operand" "=d,d,d") ! (mult:DI (match_operand:DI 1 "register_operand" "%0,0,0") ! (match_operand:DI 2 "general_operand" "d,K,m"))) ! (clobber (reg:CC 33))] "TARGET_64BIT" "@ msgr\\t%0,%2 mghi\\t%0,%h2 msg\\t%0,%2" ! [(set_attr "op_type" "RRE,RI,RX") (set_attr "atype" "reg,reg,mem") (set_attr "type" "imul")]) --- 3723,3751 ---- ; muldi3 instruction pattern(s). ; + (define_insn "*muldi3_sign" + [(set (match_operand:DI 0 "register_operand" "=d,d") + (mult:DI (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" "d,m")) + (match_operand:DI 1 "register_operand" "0,0")))] + "TARGET_64BIT" + "@ + msgfr\\t%0,%2 + msgf\\t%0,%2" + [(set_attr "op_type" "RRE,RXE") + (set_attr "atype" "reg,mem") + (set_attr "type" "imul")]) + + (define_insn "muldi3" [(set (match_operand:DI 0 "register_operand" "=d,d,d") ! (mult:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,0") ! (match_operand:DI 2 "general_operand" "d,K,m")))] "TARGET_64BIT" "@ msgr\\t%0,%2 mghi\\t%0,%h2 msg\\t%0,%2" ! [(set_attr "op_type" "RRE,RI,RXE") (set_attr "atype" "reg,reg,mem") (set_attr "type" "imul")]) *************** *** 3593,3601 **** (define_insn "mulsi3" [(set (match_operand:SI 0 "register_operand" "=d,d,d") ! (mult:SI (match_operand:SI 1 "register_operand" "%0,0,0") ! (match_operand:SI 2 "general_operand" "d,K,m"))) ! (clobber (reg:CC 33))] "" "@ msr\\t%0,%2 --- 3755,3762 ---- (define_insn "mulsi3" [(set (match_operand:SI 0 "register_operand" "=d,d,d") ! (mult:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,0") ! (match_operand:SI 2 "general_operand" "d,K,m")))] "" "@ msr\\t%0,%2 *************** *** 3611,3617 **** (define_expand "mulsidi3" [(set (match_operand:DI 0 "register_operand" "") ! (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "")) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))))] "!TARGET_64BIT" " --- 3772,3778 ---- (define_expand "mulsidi3" [(set (match_operand:DI 0 "register_operand" "") ! (mult:DI (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))))] "!TARGET_64BIT" " *************** *** 3635,3642 **** (mult:DI (sign_extend:DI (truncate:SI (match_operand:DI 1 "register_operand" "0,0"))) (sign_extend:DI ! (match_operand:SI 2 "nonimmediate_operand" "d,m")))) ! (clobber (reg:CC 33))] "!TARGET_64BIT" "@ mr\\t%0,%2 --- 3796,3802 ---- (mult:DI (sign_extend:DI (truncate:SI (match_operand:DI 1 "register_operand" "0,0"))) (sign_extend:DI ! (match_operand:SI 2 "nonimmediate_operand" "d,m"))))] "!TARGET_64BIT" "@ mr\\t%0,%2 *************** *** 3652,3658 **** (define_expand "muldf3" [(parallel [(set (match_operand:DF 0 "register_operand" "=f,f") ! (mult:DF (match_operand:DF 1 "register_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" --- 3812,3818 ---- (define_expand "muldf3" [(parallel [(set (match_operand:DF 0 "register_operand" "=f,f") ! (mult:DF (match_operand:DF 1 "nonimmediate_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" *************** *** 3660,3666 **** (define_insn "*muldf3" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (mult:DF (match_operand:DF 1 "register_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" --- 3820,3826 ---- (define_insn "*muldf3" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (mult:DF (match_operand:DF 1 "nonimmediate_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" *************** *** 3673,3679 **** (define_insn "*muldf3_ibm" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (mult:DF (match_operand:DF 1 "register_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" --- 3833,3839 ---- (define_insn "*muldf3_ibm" [(set (match_operand:DF 0 "register_operand" "=f,f") ! (mult:DF (match_operand:DF 1 "nonimmediate_operand" "%0,0") (match_operand:DF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" *************** *** 3691,3697 **** (define_expand "mulsf3" [(parallel [(set (match_operand:SF 0 "register_operand" "=f,f") ! (mult:SF (match_operand:SF 1 "register_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" --- 3851,3857 ---- (define_expand "mulsf3" [(parallel [(set (match_operand:SF 0 "register_operand" "=f,f") ! (mult:SF (match_operand:SF 1 "nonimmediate_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))])] "TARGET_HARD_FLOAT" *************** *** 3699,3705 **** (define_insn "*mulsf3" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (mult:SF (match_operand:SF 1 "register_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" --- 3859,3865 ---- (define_insn "*mulsf3" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (mult:SF (match_operand:SF 1 "nonimmediate_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT" *************** *** 3712,3718 **** (define_insn "*mulsf3_ibm" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (mult:SF (match_operand:SF 1 "register_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" --- 3872,3878 ---- (define_insn "*mulsf3_ibm" [(set (match_operand:SF 0 "register_operand" "=f,f") ! (mult:SF (match_operand:SF 1 "nonimmediate_operand" "%0,0") (match_operand:SF 2 "general_operand" "f,m"))) (clobber (reg:CC 33))] "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT" *************** *** 4211,4217 **** (define_insn "*anddi3_cc" [(set (reg 33) ! (compare (and:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d,d") --- 4371,4377 ---- (define_insn "*anddi3_cc" [(set (reg 33) ! (compare (and:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d,d") *************** *** 4225,4231 **** (define_insn "*anddi3_cconly" [(set (reg 33) ! (compare (and:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] --- 4385,4391 ---- (define_insn "*anddi3_cconly" [(set (reg 33) ! (compare (and:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] *************** *** 4238,4244 **** (define_insn "*anddi3_ni" [(set (match_operand:DI 0 "register_operand" "=d") ! (and:DI (match_operand:DI 1 "register_operand" "%0") (match_operand:DI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], DImode, -1) >= 0" --- 4398,4404 ---- (define_insn "*anddi3_ni" [(set (match_operand:DI 0 "register_operand" "=d") ! (and:DI (match_operand:DI 1 "nonimmediate_operand" "0") (match_operand:DI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], DImode, -1) >= 0" *************** *** 4261,4267 **** (define_insn "anddi3" [(set (match_operand:DI 0 "register_operand" "=d,d") ! (and:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "TARGET_64BIT" --- 4421,4427 ---- (define_insn "anddi3" [(set (match_operand:DI 0 "register_operand" "=d,d") ! (and:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "TARGET_64BIT" *************** *** 4272,4280 **** (set_attr "atype" "reg,mem")]) (define_insn "*anddi3_ss" ! [(set (match_operand:DI 0 "s_operand" "=Qo") (and:DI (match_dup 0) ! (match_operand:DI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "nc\\t%O0(8,%R0),%1" --- 4432,4440 ---- (set_attr "atype" "reg,mem")]) (define_insn "*anddi3_ss" ! [(set (match_operand:DI 0 "s_operand" "=Q") (and:DI (match_dup 0) ! (match_operand:DI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "nc\\t%O0(8,%R0),%1" *************** *** 4282,4289 **** (set_attr "atype" "mem")]) (define_insn "*anddi3_ss_inv" ! [(set (match_operand:DI 0 "s_operand" "=Qo") ! (and:DI (match_operand:DI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4442,4449 ---- (set_attr "atype" "mem")]) (define_insn "*anddi3_ss_inv" ! [(set (match_operand:DI 0 "s_operand" "=Q") ! (and:DI (match_operand:DI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4297,4303 **** (define_insn "*andsi3_cc" [(set (reg 33) ! (compare (and:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") --- 4457,4463 ---- (define_insn "*andsi3_cc" [(set (reg 33) ! (compare (and:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") *************** *** 4311,4317 **** (define_insn "*andsi3_cconly" [(set (reg 33) ! (compare (and:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] --- 4471,4477 ---- (define_insn "*andsi3_cconly" [(set (reg 33) ! (compare (and:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] *************** *** 4324,4330 **** (define_insn "*andsi3_ni" [(set (match_operand:SI 0 "register_operand" "=d") ! (and:SI (match_operand:SI 1 "register_operand" "%0") (match_operand:SI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], SImode, -1) >= 0" --- 4484,4490 ---- (define_insn "*andsi3_ni" [(set (match_operand:SI 0 "register_operand" "=d") ! (and:SI (match_operand:SI 1 "nonimmediate_operand" "0") (match_operand:SI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], SImode, -1) >= 0" *************** *** 4345,4351 **** (define_insn "andsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") ! (and:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "" --- 4505,4511 ---- (define_insn "andsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") ! (and:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "" *************** *** 4356,4364 **** (set_attr "atype" "reg,mem")]) (define_insn "*andsi3_ss" ! [(set (match_operand:SI 0 "s_operand" "=Qo") (and:SI (match_dup 0) ! (match_operand:SI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "nc\\t%O0(4,%R0),%1" --- 4516,4524 ---- (set_attr "atype" "reg,mem")]) (define_insn "*andsi3_ss" ! [(set (match_operand:SI 0 "s_operand" "=Q") (and:SI (match_dup 0) ! (match_operand:SI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "nc\\t%O0(4,%R0),%1" *************** *** 4366,4373 **** (set_attr "atype" "mem")]) (define_insn "*andsi3_ss_inv" ! [(set (match_operand:SI 0 "s_operand" "=Qo") ! (and:SI (match_operand:SI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4526,4533 ---- (set_attr "atype" "mem")]) (define_insn "*andsi3_ss_inv" ! [(set (match_operand:SI 0 "s_operand" "=Q") ! (and:SI (match_operand:SI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4402,4410 **** (set_attr "atype" "reg")]) (define_insn "*andhi3_ss" ! [(set (match_operand:HI 0 "s_operand" "=Qo") (and:HI (match_dup 0) ! (match_operand:HI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "nc\\t%O0(2,%R0),%1" --- 4562,4570 ---- (set_attr "atype" "reg")]) (define_insn "*andhi3_ss" ! [(set (match_operand:HI 0 "s_operand" "=Q") (and:HI (match_dup 0) ! (match_operand:HI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "nc\\t%O0(2,%R0),%1" *************** *** 4412,4419 **** (set_attr "atype" "mem")]) (define_insn "*andhi3_ss_inv" ! [(set (match_operand:HI 0 "s_operand" "=Qo") ! (and:HI (match_operand:HI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4572,4579 ---- (set_attr "atype" "mem")]) (define_insn "*andhi3_ss_inv" ! [(set (match_operand:HI 0 "s_operand" "=Q") ! (and:HI (match_operand:HI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4448,4456 **** (set_attr "atype" "reg")]) (define_insn "*andqi3_ss" ! [(set (match_operand:QI 0 "s_operand" "=Qo,Qo") (and:QI (match_dup 0) ! (match_operand:QI 1 "s_imm_operand" "n,Qo"))) (clobber (reg:CC 33))] "" "@ --- 4608,4616 ---- (set_attr "atype" "reg")]) (define_insn "*andqi3_ss" ! [(set (match_operand:QI 0 "s_operand" "=Q,Q") (and:QI (match_dup 0) ! (match_operand:QI 1 "s_imm_operand" "n,Q"))) (clobber (reg:CC 33))] "" "@ *************** *** 4460,4467 **** (set_attr "atype" "mem")]) (define_insn "*andqi3_ss_inv" ! [(set (match_operand:QI 0 "s_operand" "=Qo,Qo") ! (and:QI (match_operand:QI 1 "s_imm_operand" "n,Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4620,4627 ---- (set_attr "atype" "mem")]) (define_insn "*andqi3_ss_inv" ! [(set (match_operand:QI 0 "s_operand" "=Q,Q") ! (and:QI (match_operand:QI 1 "s_imm_operand" "n,Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4482,4488 **** (define_insn "*iordi3_cc" [(set (reg 33) ! (compare (ior:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d,d") --- 4642,4648 ---- (define_insn "*iordi3_cc" [(set (reg 33) ! (compare (ior:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d,d") *************** *** 4496,4502 **** (define_insn "*iordi3_cconly" [(set (reg 33) ! (compare (ior:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] --- 4656,4662 ---- (define_insn "*iordi3_cconly" [(set (reg 33) ! (compare (ior:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] *************** *** 4509,4515 **** (define_insn "*iordi3_oi" [(set (match_operand:DI 0 "register_operand" "=d") ! (ior:DI (match_operand:DI 1 "register_operand" "%0") (match_operand:DI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], DImode, 0) >= 0" --- 4669,4675 ---- (define_insn "*iordi3_oi" [(set (match_operand:DI 0 "register_operand" "=d") ! (ior:DI (match_operand:DI 1 "nonimmediate_operand" "%0") (match_operand:DI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], DImode, 0) >= 0" *************** *** 4532,4538 **** (define_insn "iordi3" [(set (match_operand:DI 0 "register_operand" "=d,d") ! (ior:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "TARGET_64BIT" --- 4692,4698 ---- (define_insn "iordi3" [(set (match_operand:DI 0 "register_operand" "=d,d") ! (ior:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "TARGET_64BIT" *************** *** 4543,4551 **** (set_attr "atype" "reg,mem")]) (define_insn "*iordi3_ss" ! [(set (match_operand:DI 0 "s_operand" "=Qo") (ior:DI (match_dup 0) ! (match_operand:DI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "oc\\t%O0(8,%R0),%1" --- 4703,4711 ---- (set_attr "atype" "reg,mem")]) (define_insn "*iordi3_ss" ! [(set (match_operand:DI 0 "s_operand" "=Q") (ior:DI (match_dup 0) ! (match_operand:DI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "oc\\t%O0(8,%R0),%1" *************** *** 4553,4560 **** (set_attr "atype" "mem")]) (define_insn "*iordi3_ss_inv" ! [(set (match_operand:DI 0 "s_operand" "=Qo") ! (ior:DI (match_operand:DI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4713,4720 ---- (set_attr "atype" "mem")]) (define_insn "*iordi3_ss_inv" ! [(set (match_operand:DI 0 "s_operand" "=Q") ! (ior:DI (match_operand:DI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4568,4574 **** (define_insn "*iorsi3_cc" [(set (reg 33) ! (compare (ior:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") --- 4728,4734 ---- (define_insn "*iorsi3_cc" [(set (reg 33) ! (compare (ior:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") *************** *** 4582,4588 **** (define_insn "*iorsi3_cconly" [(set (reg 33) ! (compare (ior:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] --- 4742,4748 ---- (define_insn "*iorsi3_cconly" [(set (reg 33) ! (compare (ior:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] *************** *** 4595,4601 **** (define_insn "*iorsi3_oi" [(set (match_operand:SI 0 "register_operand" "=d") ! (ior:SI (match_operand:SI 1 "register_operand" "%0") (match_operand:SI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], SImode, 0) >= 0" --- 4755,4761 ---- (define_insn "*iorsi3_oi" [(set (match_operand:SI 0 "register_operand" "=d") ! (ior:SI (match_operand:SI 1 "nonimmediate_operand" "%0") (match_operand:SI 2 "immediate_operand" "n"))) (clobber (reg:CC 33))] "TARGET_64BIT && s390_single_hi (operands[2], SImode, 0) >= 0" *************** *** 4616,4622 **** (define_insn "iorsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") ! (ior:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "" --- 4776,4782 ---- (define_insn "iorsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") ! (ior:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "" *************** *** 4627,4635 **** (set_attr "atype" "reg,mem")]) (define_insn "*iorsi3_ss" ! [(set (match_operand:SI 0 "s_operand" "=Qo") (ior:SI (match_dup 0) ! (match_operand:SI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "oc\\t%O0(4,%R0),%1" --- 4787,4795 ---- (set_attr "atype" "reg,mem")]) (define_insn "*iorsi3_ss" ! [(set (match_operand:SI 0 "s_operand" "=Q") (ior:SI (match_dup 0) ! (match_operand:SI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "oc\\t%O0(4,%R0),%1" *************** *** 4637,4644 **** (set_attr "atype" "mem")]) (define_insn "*iorsi3_ss_inv" ! [(set (match_operand:SI 0 "s_operand" "=Qo") ! (ior:SI (match_operand:SI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4797,4804 ---- (set_attr "atype" "mem")]) (define_insn "*iorsi3_ss_inv" ! [(set (match_operand:SI 0 "s_operand" "=Q") ! (ior:SI (match_operand:SI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4673,4681 **** (set_attr "atype" "reg")]) (define_insn "*iorhi3_ss" ! [(set (match_operand:HI 0 "s_operand" "=Qo") (ior:HI (match_dup 0) ! (match_operand:HI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "oc\\t%O0(2,%R0),%1" --- 4833,4841 ---- (set_attr "atype" "reg")]) (define_insn "*iorhi3_ss" ! [(set (match_operand:HI 0 "s_operand" "=Q") (ior:HI (match_dup 0) ! (match_operand:HI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "oc\\t%O0(2,%R0),%1" *************** *** 4683,4690 **** (set_attr "atype" "mem")]) (define_insn "*iorhi3_ss_inv" ! [(set (match_operand:HI 0 "s_operand" "=Qo") ! (ior:HI (match_operand:HI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4843,4850 ---- (set_attr "atype" "mem")]) (define_insn "*iorhi3_ss_inv" ! [(set (match_operand:HI 0 "s_operand" "=Q") ! (ior:HI (match_operand:HI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4719,4727 **** (set_attr "atype" "reg")]) (define_insn "*iorqi3_ss" ! [(set (match_operand:QI 0 "s_operand" "=Qo,Qo") (ior:QI (match_dup 0) ! (match_operand:QI 1 "s_imm_operand" "n,Qo"))) (clobber (reg:CC 33))] "" "@ --- 4879,4887 ---- (set_attr "atype" "reg")]) (define_insn "*iorqi3_ss" ! [(set (match_operand:QI 0 "s_operand" "=Q,Q") (ior:QI (match_dup 0) ! (match_operand:QI 1 "s_imm_operand" "n,Q"))) (clobber (reg:CC 33))] "" "@ *************** *** 4731,4738 **** (set_attr "atype" "reg,mem")]) (define_insn "*iorqi3_ss_inv" ! [(set (match_operand:QI 0 "s_operand" "=Qo,Qo") ! (ior:QI (match_operand:QI 1 "s_imm_operand" "n,Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4891,4898 ---- (set_attr "atype" "reg,mem")]) (define_insn "*iorqi3_ss_inv" ! [(set (match_operand:QI 0 "s_operand" "=Q,Q") ! (ior:QI (match_operand:QI 1 "s_imm_operand" "n,Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4753,4759 **** (define_insn "*xordi3_cc" [(set (reg 33) ! (compare (xor:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d,d") --- 4913,4919 ---- (define_insn "*xordi3_cc" [(set (reg 33) ! (compare (xor:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d,d") *************** *** 4767,4773 **** (define_insn "*xordi3_cconly" [(set (reg 33) ! (compare (xor:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] --- 4927,4933 ---- (define_insn "*xordi3_cconly" [(set (reg 33) ! (compare (xor:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] *************** *** 4780,4786 **** (define_insn "xordi3" [(set (match_operand:DI 0 "register_operand" "=d,d") ! (xor:DI (match_operand:DI 1 "register_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "TARGET_64BIT" --- 4940,4946 ---- (define_insn "xordi3" [(set (match_operand:DI 0 "register_operand" "=d,d") ! (xor:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") (match_operand:DI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "TARGET_64BIT" *************** *** 4791,4799 **** (set_attr "atype" "reg,mem")]) (define_insn "*xordi3_ss" ! [(set (match_operand:DI 0 "s_operand" "=Qo") (xor:DI (match_dup 0) ! (match_operand:DI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "xc\\t%O0(8,%R0),%1" --- 4951,4959 ---- (set_attr "atype" "reg,mem")]) (define_insn "*xordi3_ss" ! [(set (match_operand:DI 0 "s_operand" "=Q") (xor:DI (match_dup 0) ! (match_operand:DI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "xc\\t%O0(8,%R0),%1" *************** *** 4801,4808 **** (set_attr "atype" "mem")]) (define_insn "*xordi3_ss_inv" ! [(set (match_operand:DI 0 "s_operand" "=Qo") ! (xor:DI (match_operand:DI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 4961,4968 ---- (set_attr "atype" "mem")]) (define_insn "*xordi3_ss_inv" ! [(set (match_operand:DI 0 "s_operand" "=Q") ! (xor:DI (match_operand:DI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4816,4822 **** (define_insn "*xorsi3_cc" [(set (reg 33) ! (compare (xor:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") --- 4976,4982 ---- (define_insn "*xorsi3_cc" [(set (reg 33) ! (compare (xor:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d") *************** *** 4830,4836 **** (define_insn "*xorsi3_cconly" [(set (reg 33) ! (compare (xor:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] --- 4990,4996 ---- (define_insn "*xorsi3_cconly" [(set (reg 33) ! (compare (xor:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d"))] *************** *** 4843,4849 **** (define_insn "xorsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") ! (xor:SI (match_operand:SI 1 "register_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "" --- 5003,5009 ---- (define_insn "xorsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") ! (xor:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") (match_operand:SI 2 "general_operand" "d,m"))) (clobber (reg:CC 33))] "" *************** *** 4854,4862 **** (set_attr "atype" "reg,mem")]) (define_insn "*xorsi3_ss" ! [(set (match_operand:SI 0 "s_operand" "=Qo") (xor:SI (match_dup 0) ! (match_operand:SI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "xc\\t%O0(4,%R0),%1" --- 5014,5022 ---- (set_attr "atype" "reg,mem")]) (define_insn "*xorsi3_ss" ! [(set (match_operand:SI 0 "s_operand" "=Q") (xor:SI (match_dup 0) ! (match_operand:SI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "xc\\t%O0(4,%R0),%1" *************** *** 4864,4871 **** (set_attr "atype" "mem")]) (define_insn "*xorsi3_ss_inv" ! [(set (match_operand:SI 0 "s_operand" "=Qo") ! (xor:SI (match_operand:SI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 5024,5031 ---- (set_attr "atype" "mem")]) (define_insn "*xorsi3_ss_inv" ! [(set (match_operand:SI 0 "s_operand" "=Q") ! (xor:SI (match_operand:SI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4888,4896 **** (set_attr "atype" "reg")]) (define_insn "*xorhi3_ss" ! [(set (match_operand:HI 0 "s_operand" "=Qo") (xor:HI (match_dup 0) ! (match_operand:HI 1 "s_imm_operand" "Qo"))) (clobber (reg:CC 33))] "" "xc\\t%O0(2,%R0),%1" --- 5048,5056 ---- (set_attr "atype" "reg")]) (define_insn "*xorhi3_ss" ! [(set (match_operand:HI 0 "s_operand" "=Q") (xor:HI (match_dup 0) ! (match_operand:HI 1 "s_imm_operand" "Q"))) (clobber (reg:CC 33))] "" "xc\\t%O0(2,%R0),%1" *************** *** 4898,4905 **** (set_attr "atype" "mem")]) (define_insn "*xorhi3_ss_inv" ! [(set (match_operand:HI 0 "s_operand" "=Qo") ! (xor:HI (match_operand:HI 1 "s_imm_operand" "Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 5058,5065 ---- (set_attr "atype" "mem")]) (define_insn "*xorhi3_ss_inv" ! [(set (match_operand:HI 0 "s_operand" "=Q") ! (xor:HI (match_operand:HI 1 "s_imm_operand" "Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 4922,4930 **** (set_attr "atype" "reg")]) (define_insn "*xorqi3_ss" ! [(set (match_operand:QI 0 "s_operand" "=Qo,Qo") (xor:QI (match_dup 0) ! (match_operand:QI 1 "s_imm_operand" "n,Qo"))) (clobber (reg:CC 33))] "" "@ --- 5082,5090 ---- (set_attr "atype" "reg")]) (define_insn "*xorqi3_ss" ! [(set (match_operand:QI 0 "s_operand" "=Q,Q") (xor:QI (match_dup 0) ! (match_operand:QI 1 "s_imm_operand" "n,Q"))) (clobber (reg:CC 33))] "" "@ *************** *** 4934,4941 **** (set_attr "atype" "mem")]) (define_insn "*xorqi3_ss_inv" ! [(set (match_operand:QI 0 "s_operand" "=Qo,Qo") ! (xor:QI (match_operand:QI 1 "s_imm_operand" "n,Qo") (match_dup 0))) (clobber (reg:CC 33))] "" --- 5094,5101 ---- (set_attr "atype" "mem")]) (define_insn "*xorqi3_ss_inv" ! [(set (match_operand:QI 0 "s_operand" "=Q,Q") ! (xor:QI (match_operand:QI 1 "s_imm_operand" "n,Q") (match_dup 0))) (clobber (reg:CC 33))] "" *************** *** 5682,5690 **** (const_int 4) (ne (symbol_ref "TARGET_64BIT") (const_int 0)) (const_int 6) - (ne (symbol_ref "s390_pool_overflow") (const_int 0)) - (if_then_else (eq (symbol_ref "flag_pic") (const_int 0)) - (const_int 12) (const_int 14)) (eq (symbol_ref "flag_pic") (const_int 0)) (const_int 6)] (const_int 8)))]) --- 5842,5847 ---- *************** *** 5734,5742 **** (const_int 4) (ne (symbol_ref "TARGET_64BIT") (const_int 0)) (const_int 6) - (ne (symbol_ref "s390_pool_overflow") (const_int 0)) - (if_then_else (eq (symbol_ref "flag_pic") (const_int 0)) - (const_int 12) (const_int 14)) (eq (symbol_ref "flag_pic") (const_int 0)) (const_int 6)] (const_int 8)))]) --- 5891,5896 ---- *************** *** 5759,5812 **** (const_string "RR") (const_string "RX"))) (set_attr "atype" "mem")]) ;; ! ;;- Subtract one and jump if not zero. ;; ! ;(define_expand "decrement_and_branch_on_count" ! ; [(use (match_operand 0 "register_operand" "")) ! ; (use (label_ref (match_operand 1 "" "")))] ! ; "" ! ; " ! ;{ ! ;/* if (TARGET_64BIT) ! ; emit_jump_insn (gen_brctdi (operands[0], operands[1])); ! ; else */ ! ; emit_jump_insn (gen_brctsi (operands[0], operands[1])); ! ; DONE; ! ;}") ! ; ! ;(define_insn "brctsi" ! ; [(set (pc) ! ; (if_then_else ! ; (ne (match_operand:SI 0 "register_operand" "+a") ! ; (const_int 1)) ! ; (label_ref (match_operand 1 "" "")) ! ; (pc))) ! ; (set (match_dup 0) ! ; (plus:SI (match_dup 0) (const_int -1)))] ! ; "" ! ; "brct\\t%0,%l1" ! ; [(set_attr "op_type" "RI") ! ; (set_attr "type" "branch")] ! ;) ! ; ! ;(define_insn "ibrctsi" ! ; [(set (pc) ! ; (if_then_else ! ; (eq (match_operand:SI 0 "register_operand" "+a") ! ; (const_int 1)) ! ; (pc) ! ; (label_ref (match_operand 1 "" "")))) ! ; (set (match_dup 0) ! ; (plus:SI (match_dup 0) (const_int -1)))] ! ; "" ! ; "brct\\t%0,%l1" ! ; [(set_attr "op_type" "RI") ! ; (set_attr "type" "branch")] ! ;) ;; ;;- Unconditional jump instructions. --- 5913,6129 ---- (const_string "RR") (const_string "RX"))) (set_attr "atype" "mem")]) + ;; + ;;- Trap instructions. + ;; + + (define_insn "trap" + [(trap_if (const_int 1) (const_int 0))] + "" + "j\\t.+2" + [(set_attr "op_type" "RX")]) + + (define_expand "conditional_trap" + [(set (match_dup 2) (match_dup 3)) + (trap_if (match_operator 0 "comparison_operator" + [(match_dup 2) (const_int 0)]) + (match_operand:SI 1 "general_operand" ""))] + "" + " + { + enum machine_mode ccmode; + + if (operands[1] != const0_rtx) FAIL; + + ccmode = s390_select_ccmode (GET_CODE (operands[0]), + s390_compare_op0, s390_compare_op1); + operands[2] = gen_rtx_REG (ccmode, 33); + operands[3] = gen_rtx_COMPARE (ccmode, s390_compare_op0, s390_compare_op1); + }") + + (define_insn "*trap" + [(trap_if (match_operator 0 "comparison_operator" [(reg 33) (const_int 0)]) + (const_int 0))] + "" + "j%C0\\t.+2"; + [(set_attr "op_type" "RX")]) ;; ! ;;- Loop instructions. ;; + ;; This is all complicated by the fact that since this is a jump insn + ;; we must handle our own output reloads. + + (define_expand "doloop_end" + [(use (match_operand 0 "" "")) ; loop pseudo + (use (match_operand 1 "" "")) ; iterations; zero if unknown + (use (match_operand 2 "" "")) ; max iterations + (use (match_operand 3 "" "")) ; loop level + (use (match_operand 4 "" ""))] ; label + "" + " + { + if (GET_MODE (operands[0]) == SImode) + emit_jump_insn (gen_doloop_si (operands[4], operands[0], operands[0])); + else if (GET_MODE (operands[0]) == DImode && TARGET_64BIT) + emit_jump_insn (gen_doloop_di (operands[4], operands[0], operands[0])); + else + FAIL; ! DONE; ! }") + (define_insn "doloop_si" + [(set (pc) + (if_then_else + (ne (match_operand:SI 1 "register_operand" "d,d") + (const_int 1)) + (label_ref (match_operand 0 "" "")) + (pc))) + (set (match_operand:SI 2 "register_operand" "=1,?*m*d") + (plus:SI (match_dup 1) (const_int -1))) + (clobber (match_scratch:SI 3 "=X,&d")) + (clobber (reg:CC 33))] + "" + "* + { + if (which_alternative != 0) + return \"#\"; + else if (get_attr_length (insn) == 4) + return \"brct\\t%1,%l0\"; + else + abort (); + }" + [(set_attr "op_type" "RI") + (set (attr "length") + (cond [(lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) + (const_int 4) + (ne (symbol_ref "TARGET_64BIT") (const_int 0)) + (const_int 10) + (eq (symbol_ref "flag_pic") (const_int 0)) + (const_int 6)] (const_int 8)))]) + + (define_insn "*doloop_si_long" + [(set (pc) + (if_then_else + (ne (match_operand:SI 1 "register_operand" "d,d") + (const_int 1)) + (match_operand 0 "address_operand" "p,p") + (pc))) + (set (match_operand:SI 2 "register_operand" "=1,?*m*d") + (plus:SI (match_dup 1) (const_int -1))) + (clobber (match_scratch:SI 3 "=X,&d")) + (clobber (reg:CC 33))] + "" + "* + { + if (get_attr_op_type (insn) == OP_TYPE_RR) + return \"bctr\\t%1,%0\"; + else + return \"bct\\t%1,%a0\"; + }" + [(set (attr "op_type") + (if_then_else (match_operand 0 "register_operand" "") + (const_string "RR") (const_string "RX"))) + (set_attr "atype" "mem")]) + + (define_split + [(set (pc) + (if_then_else (ne (match_operand:SI 1 "register_operand" "") + (const_int 1)) + (match_operand 0 "" "") + (pc))) + (set (match_operand:SI 2 "nonimmediate_operand" "") + (plus:SI (match_dup 1) (const_int -1))) + (clobber (match_scratch:SI 3 "")) + (clobber (reg:CC 33))] + "reload_completed + && (! REG_P (operands[2]) + || ! rtx_equal_p (operands[1], operands[2]))" + [(set (match_dup 3) (match_dup 1)) + (parallel [(set (reg:CCAN 33) + (compare:CCAN (plus:SI (match_dup 3) (const_int -1)) + (const_int 0))) + (set (match_dup 3) (plus:SI (match_dup 3) (const_int -1)))]) + (set (match_dup 2) (match_dup 3)) + (set (pc) (if_then_else (ne (reg:CCAN 33) (const_int 0)) + (match_dup 0) + (pc)))] + "") + + (define_insn "doloop_di" + [(set (pc) + (if_then_else + (ne (match_operand:DI 1 "register_operand" "d,d") + (const_int 1)) + (label_ref (match_operand 0 "" "")) + (pc))) + (set (match_operand:DI 2 "register_operand" "=1,?*m*r") + (plus:DI (match_dup 1) (const_int -1))) + (clobber (match_scratch:DI 3 "=X,&d")) + (clobber (reg:CC 33))] + "TARGET_64BIT" + "* + { + if (which_alternative != 0) + return \"#\"; + else if (get_attr_length (insn) == 4) + return \"brctg\\t%1,%l0\"; + else + abort (); + }" + [(set_attr "op_type" "RI") + (set (attr "length") + (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) + (const_int 4) (const_int 12)))]) + + (define_insn "*doloop_di_long" + [(set (pc) + (if_then_else + (ne (match_operand:DI 1 "register_operand" "d,d") + (const_int 1)) + (match_operand 0 "address_operand" "p,p") + (pc))) + (set (match_operand:DI 2 "register_operand" "=1,?*m*d") + (plus:DI (match_dup 1) (const_int -1))) + (clobber (match_scratch:DI 3 "=X,&d")) + (clobber (reg:CC 33))] + "" + "* + { + if (get_attr_op_type (insn) == OP_TYPE_RRE) + return \"bctgr\\t%1,%0\"; + else + return \"bctg\\t%1,%a0\"; + }" + [(set (attr "op_type") + (if_then_else (match_operand 0 "register_operand" "") + (const_string "RRE") (const_string "RXE"))) + (set_attr "atype" "mem")]) + + (define_split + [(set (pc) + (if_then_else (ne (match_operand:DI 1 "register_operand" "") + (const_int 1)) + (match_operand 0 "" "") + (pc))) + (set (match_operand:DI 2 "nonimmediate_operand" "") + (plus:DI (match_dup 1) (const_int -1))) + (clobber (match_scratch:DI 3 "")) + (clobber (reg:CC 33))] + "reload_completed + && (! REG_P (operands[2]) + || ! rtx_equal_p (operands[1], operands[2]))" + [(set (match_dup 3) (match_dup 1)) + (parallel [(set (reg:CCAN 33) + (compare:CCAN (plus:DI (match_dup 3) (const_int -1)) + (const_int 0))) + (set (match_dup 3) (plus:DI (match_dup 3) (const_int -1)))]) + (set (match_dup 2) (match_dup 3)) + (set (pc) (if_then_else (ne (reg:CCAN 33) (const_int 0)) + (match_dup 0) + (pc)))] + "") ;; ;;- Unconditional jump instructions. *************** *** 5961,5967 **** [(unspec_volatile [(const_int 0)] 0)] "" "" ! [(set_attr "type" "none")]) --- 6278,6285 ---- [(unspec_volatile [(const_int 0)] 0)] "" "" ! [(set_attr "type" "none") ! (set_attr "length" "0")]) *************** *** 6014,6023 **** compiler doesn't know about it, because the PLT glue code uses it. In 64-bit, this is not necessary. */ if (plt_call && !TARGET_64BIT) ! { ! current_function_uses_pic_offset_table = 1; ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx); ! } DONE; }") --- 6332,6338 ---- compiler doesn't know about it, because the PLT glue code uses it. In 64-bit, this is not necessary. */ if (plt_call && !TARGET_64BIT) ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx); DONE; }") *************** *** 6139,6148 **** compiler doesn't know about it, because the PLT glue code uses it. In 64-bit, this is not necessary. */ if (plt_call && !TARGET_64BIT) ! { ! current_function_uses_pic_offset_table = 1; ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx); ! } DONE; }") --- 6454,6460 ---- compiler doesn't know about it, because the PLT glue code uses it. In 64-bit, this is not necessary. */ if (plt_call && !TARGET_64BIT) ! use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx); DONE; }") *************** *** 6218,6223 **** --- 6530,6721 ---- (set_attr "type" "jsr") (set_attr "atype" "mem")]) + ;; + ;;- Thread-local storage support. + ;; + + (define_insn "get_tp_64" + [(set (match_operand:DI 0 "nonimmediate_operand" "=??d,Q") + (unspec:DI [(const_int 0)] UNSPEC_TP))] + "TARGET_64BIT" + "@ + ear\\t%0,%%a0\;sllg\\t%0,%0,32\;ear\\t%0,%%a1 + stam\\t%%a0,%%a1,%0" + [(set_attr "op_type" "NN,RS") + (set_attr "atype" "reg,mem") + (set_attr "type" "o3,*") + (set_attr "length" "14,*")]) + + (define_insn "get_tp_31" + [(set (match_operand:SI 0 "nonimmediate_operand" "=d,Q") + (unspec:SI [(const_int 0)] UNSPEC_TP))] + "!TARGET_64BIT" + "@ + ear\\t%0,%%a0 + stam\\t%%a0,%%a0,%0" + [(set_attr "op_type" "RRE,RS") + (set_attr "atype" "reg,mem")]) + + (define_insn "set_tp_64" + [(unspec_volatile [(match_operand:DI 0 "general_operand" "??d,Q")] UNSPECV_SET_TP) + (clobber (match_scratch:SI 1 "=d,X"))] + "TARGET_64BIT" + "@ + sar\\t%%a1,%0\;srlg\\t%1,%0,32\;sar\\t%%a0,%1 + lam\\t%%a0,%%a1,%0" + [(set_attr "op_type" "NN,RS") + (set_attr "atype" "reg,mem") + (set_attr "type" "o3,*") + (set_attr "length" "14,*")]) + + (define_insn "set_tp_31" + [(unspec_volatile [(match_operand:SI 0 "general_operand" "d,Q")] UNSPECV_SET_TP)] + "!TARGET_64BIT" + "@ + sar\\t%%a0,%0 + lam\\t%%a0,%%a0,%0" + [(set_attr "op_type" "RRE,RS") + (set_attr "atype" "reg,mem")]) + + (define_insn "*tls_load_64" + [(set (match_operand:DI 0 "register_operand" "=d") + (unspec:DI [(match_operand:DI 1 "memory_operand" "m") + (match_operand:DI 2 "" "")] + UNSPEC_TLS_LOAD))] + "TARGET_64BIT" + "lg\\t%0,%1%J2" + [(set_attr "op_type" "RXE") + (set_attr "atype" "mem")]) + + (define_insn "*tls_load_31" + [(set (match_operand:SI 0 "register_operand" "=d") + (unspec:SI [(match_operand:SI 1 "memory_operand" "m") + (match_operand:SI 2 "" "")] + UNSPEC_TLS_LOAD))] + "!TARGET_64BIT" + "l\\t%0,%1%J2" + [(set_attr "op_type" "RX") + (set_attr "atype" "mem")]) + + (define_expand "call_value_tls" + [(set (match_operand 0 "" "") + (call (const_int 0) (const_int 0))) + (use (match_operand 1 "" ""))] + "" + " + { + rtx insn, sym; + + if (!flag_pic) + abort (); + + sym = s390_tls_get_offset (); + sym = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, sym), 113); + sym = gen_rtx_CONST (Pmode, sym); + + /* Unless we can use the bras(l) insn, force the + routine address into a register. */ + if (!TARGET_SMALL_EXEC && !TARGET_64BIT) + { + rtx target = gen_reg_rtx (Pmode); + emit_move_insn (target, sym); + sym = target; + } + + sym = gen_rtx_MEM (QImode, sym); + + /* Emit insn. */ + insn = emit_call_insn ( + gen_call_value_tls_exp (operands[0], sym, const0_rtx, + gen_rtx_REG (Pmode, RETURN_REGNUM), + operands[1])); + + /* The calling convention of __tls_get_offset uses the + GOT register implicitly. */ + use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx); + use_reg (&CALL_INSN_FUNCTION_USAGE (insn), operands[0]); + CONST_OR_PURE_CALL_P (insn) = 1; + + DONE; + }") + + (define_expand "call_value_tls_exp" + [(parallel [(set (match_operand 0 "" "") + (call (match_operand 1 "" "") + (match_operand 2 "" ""))) + (clobber (match_operand 3 "" "")) + (use (match_operand 4 "" ""))])] + "" + "") + + (define_insn "brasl_tls" + [(set (match_operand 0 "register_operand" "=df") + (call (mem:QI (match_operand:DI 1 "bras_sym_operand" "X")) + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (match_operand:DI 3 "register_operand" "=r")) + (use (match_operand:DI 4 "" ""))] + "TARGET_64BIT" + "brasl\\t%3,%1%J4" + [(set_attr "op_type" "RIL") + (set_attr "type" "jsr")]) + + (define_insn "bras_tls" + [(set (match_operand 0 "register_operand" "=df") + (call (mem:QI (match_operand:SI 1 "bras_sym_operand" "X")) + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (match_operand:SI 3 "register_operand" "=r")) + (use (match_operand:SI 4 "" ""))] + "TARGET_SMALL_EXEC" + "bras\\t%3,%1%J4" + [(set_attr "op_type" "RI") + (set_attr "type" "jsr")]) + + (define_insn "basr_tls_64" + [(set (match_operand 0 "register_operand" "=df") + (call (mem:QI (match_operand:DI 1 "register_operand" "a")) + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (match_operand:DI 3 "register_operand" "=r")) + (use (match_operand:DI 4 "" ""))] + "TARGET_64BIT" + "basr\\t%3,%1%J4" + [(set_attr "op_type" "RR") + (set_attr "type" "jsr")]) + + (define_insn "basr_tls_31" + [(set (match_operand 0 "register_operand" "=df") + (call (mem:QI (match_operand:SI 1 "register_operand" "a")) + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (match_operand:SI 3 "register_operand" "=r")) + (use (match_operand:SI 4 "" ""))] + "!TARGET_64BIT" + "basr\\t%3,%1%J4" + [(set_attr "op_type" "RR") + (set_attr "type" "jsr") + (set_attr "atype" "mem")]) + + (define_insn "bas_tls_64" + [(set (match_operand 0 "register_operand" "=df") + (call (mem:QI (match_operand:QI 1 "address_operand" "p")) + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (match_operand:DI 3 "register_operand" "=r")) + (use (match_operand:DI 4 "" ""))] + "TARGET_64BIT" + "bas\\t%3,%a1%J4" + [(set_attr "op_type" "RX") + (set_attr "type" "jsr") + (set_attr "atype" "mem")]) + + (define_insn "bas_tls_31" + [(set (match_operand 0 "register_operand" "=df") + (call (mem:QI (match_operand:QI 1 "address_operand" "p")) + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (match_operand:SI 3 "register_operand" "=r")) + (use (match_operand:SI 4 "" ""))] + "!TARGET_64BIT" + "bas\\t%3,%a1%J4" + [(set_attr "op_type" "RX") + (set_attr "type" "jsr") + (set_attr "atype" "mem")]) ;; ;;- Miscellaneous instructions. *************** *** 6505,6511 **** [(set_attr "op_type" "NN") (set_attr "length" "0")]) ! (define_insn "reload_base" [(set (match_operand:SI 0 "register_operand" "=a") (unspec:SI [(label_ref (match_operand 1 "" ""))] 210))] "!TARGET_64BIT" --- 7003,7009 ---- [(set_attr "op_type" "NN") (set_attr "length" "0")]) ! (define_insn "reload_base_31" [(set (match_operand:SI 0 "register_operand" "=a") (unspec:SI [(label_ref (match_operand 1 "" ""))] 210))] "!TARGET_64BIT" *************** *** 6514,6528 **** (set_attr "type" "la") (set_attr "length" "6")]) ! (define_insn "reload_base2" [(set (match_operand:SI 0 "register_operand" "=a") ! (unspec:SI [(label_ref (match_operand 1 "" ""))] 211))] "!TARGET_64BIT" ! "la\\t%0,%1-.(%0)" [(set_attr "op_type" "NN") (set_attr "type" "la") ! (set_attr "length" "4")]) ;; ;; Insns related to generating the function prologue and epilogue. --- 7012,7040 ---- (set_attr "type" "la") (set_attr "length" "6")]) ! (define_insn "reload_base_64" ! [(set (match_operand:DI 0 "register_operand" "=a") ! (unspec:DI [(label_ref (match_operand 1 "" ""))] 210))] ! "TARGET_64BIT" ! "larl\\t%0,%1" ! [(set_attr "op_type" "RIL") ! (set_attr "type" "la")]) ! ! (define_insn "reload_anchor" [(set (match_operand:SI 0 "register_operand" "=a") ! (unspec:SI [(match_operand:SI 1 "register_operand" "a")] 211))] "!TARGET_64BIT" ! "l\\t%0,0(%1)\;la\\t%0,0(%0,%1)" [(set_attr "op_type" "NN") (set_attr "type" "la") ! (set_attr "length" "8")]) + (define_insn "pool" + [(unspec_volatile [(match_operand 0 "const_int_operand" "n")] 220)] + "" + "* abort ();" + [(set_attr "op_type" "NN") + (set (attr "length") (symbol_ref "INTVAL (operands[0])"))]) ;; ;; Insns related to generating the function prologue and epilogue. *************** *** 6566,6727 **** (set_attr "type" "jsr") (set_attr "atype" "mem")]) ! ! (define_insn "lit" ! [(set (reg 13) (pc)) ! (unspec_volatile [(const_int 0)] 200)] ! "" ! "* ! { ! s390_output_constant_pool (asm_out_file); ! return \"\"; ! }" ! [(set_attr "op_type" "NN") ! (set_attr "type" "integer")]) ! ! ! ;; ! ;; Peephole optimization patterns. ! ;; ! ! (define_peephole ! [(set (match_operand:SI 0 "memory_operand" "m") ! (match_operand:SI 1 "register_operand" "d")) ! (set (match_dup 1) ! (match_dup 0))] ! "" ! "st\\t%1,%0") ! ! (define_peephole ! [(set (match_operand:SI 0 "memory_operand" "m") ! (match_operand:SI 1 "register_operand" "d")) ! (set (match_dup 0) ! (match_dup 1))] ! "" ! "st\\t%1,%0") ! ! (define_peephole ! [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "register_operand" "")) ! (parallel ! [(set (match_dup 0) ! (plus:SI (match_dup 0) ! (match_operand:SI 2 "immediate_operand" ""))) ! (clobber (reg:CC 33))])] ! "(REGNO (operands[0]) == STACK_POINTER_REGNUM || ! REGNO (operands[1]) == STACK_POINTER_REGNUM || ! REGNO (operands[0]) == BASE_REGISTER || ! REGNO (operands[1]) == BASE_REGISTER) && ! INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 4096" ! "la\\t%0,%c2(%1)") ! ! ; ! ; peepholes for fast char instructions ! ; ! ! ;(define_peephole ! ; [(set (match_operand:QI 0 "register_operand" "d") ! ; (match_operand:QI 1 "s_operand" "Q")) ! ; (set (match_operand:SI 2 "register_operand" "0") ! ; (zero_extend:SI (match_dup 0)))] ! ; "REGNO(operands[0]) == REGNO(operands[2])" ! ; "icm\\t%0,8,%1\;srl\\t%0,24") ! ! ;(define_peephole ! ; [(set (match_operand:QI 0 "register_operand" "d") ! ; (match_operand:QI 1 "s_operand" "Q")) ! ; (set (match_operand:SI 2 "register_operand" "0") ! ; (sign_extend:SI (match_dup 0)))] ! ; "REGNO(operands[0]) == REGNO(operands[2])" ! ; "icm\\t%0,8,%1\;sra\\t%0,24") ! ! (define_peephole ! [(set (match_operand:QI 0 "register_operand" "d") ! (match_operand:QI 1 "immediate_operand" "J")) ! (set (match_operand:SI 2 "register_operand" "0" ) ! (sign_extend:SI (match_dup 0) ) )] ! "REGNO(operands[0]) == REGNO(operands[2])" ! "lhi\\t%0,%h1") ! ! ; ! ; peepholes for fast short instructions ! ; ! ! ;(define_peephole ! ; [(set (match_operand:HI 0 "register_operand" "d") ! ; (match_operand:HI 1 "s_operand" "Q")) ! ; (set (match_operand:SI 2 "register_operand" "0" ) ! ; (zero_extend:SI (match_dup 0)))] ! ; "REGNO(operands[0]) == REGNO(operands[2])" ! ; "icm\\t%0,12,%1\;srl\\t%0,16") ! ! (define_peephole ! [(set (match_operand:HI 0 "register_operand" "d") ! (match_operand:HI 1 "memory_operand" "m")) ! (set (match_operand:SI 2 "register_operand" "0" ) ! (sign_extend:SI (match_dup 0)))] ! "REGNO(operands[0]) == REGNO(operands[2])" ! "lh\\t%0,%1") ! ! (define_peephole ! [(set (match_operand:HI 0 "register_operand" "d") ! (match_operand:HI 1 "immediate_operand" "K")) ! (set (match_operand:SI 2 "register_operand" "0" ) ! (sign_extend:SI (match_dup 0) ) )] ! "REGNO(operands[0]) == REGNO(operands[2])" ! "lhi\\t%0,%h1") ! ! ; ! ; peepholes for divide instructions ! ; ! ! (define_peephole ! [(set (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "memory_operand" "m")) ! (set (match_dup 0) ! (lshiftrt:DI (match_dup 0) ! (match_operand:SI 2 "immediate_operand" "J"))) ! (set (match_dup 0) ! (div:SI (match_dup 0) ! (match_operand:SI 3 "nonimmediate_operand" "g"))) ! (set (match_dup 1) ! (match_dup 0))] "" - "* { ! output_asm_insn (\"l\\t%0,%1\", operands); ! output_asm_insn (\"srdl\\t%0,%b2\", operands); ! ! if (REG_P (operands[3])) ! output_asm_insn (\"dr\\t%0,%3\", operands); ! else ! output_asm_insn (\"d\\t%0,%3\", operands); ! return \"st\\t%N0,%N1\"; ! }") ! (define_peephole ! [(set (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "memory_operand" "m")) ! (set (match_dup 0) ! (lshiftrt:DI (match_dup 0) ! (match_operand:SI 2 "immediate_operand" "J"))) ! (set (match_dup 0) ! (mod:SI (match_dup 0) ! (match_operand:SI 3 "nonimmediate_operand" "g"))) ! (set (match_dup 1) ! (match_dup 0))] "" - "* { ! output_asm_insn (\"l\\t%0,%1\", operands); ! output_asm_insn (\"srdl\\t%0,%b2\", operands); ! ! if (REG_P (operands[3])) ! output_asm_insn (\"dr\\t%0,%3\", operands); ! else ! output_asm_insn (\"d\\t%0,%3\", operands); ! ! return \"st\\t%0,%1\"; ! }") --- 7078,7121 ---- (set_attr "type" "jsr") (set_attr "atype" "mem")]) ! (define_insn "literal_pool_31" ! [(unspec_volatile [(const_int 0)] 300) ! (set (match_operand:SI 0 "register_operand" "=a") ! (label_ref (match_operand 1 "" ""))) ! (use (label_ref (match_operand 2 "" "")))] "" { ! if (s390_nr_constants) ! { ! output_asm_insn ("bras\\t%0,%2", operands); ! s390_output_constant_pool (operands[1], operands[2]); ! } ! else if (flag_pic) ! { ! /* We need the anchor label in any case. */ ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (operands[1])); ! } ! return ""; ! } ! [(set_attr "op_type" "NN") ! (set_attr "type" "la")]) ! (define_insn "literal_pool_64" ! [(unspec_volatile [(const_int 0)] 300) ! (set (match_operand:DI 0 "register_operand" "=a") ! (label_ref (match_operand 1 "" ""))) ! (use (label_ref (match_operand 2 "" "")))] "" { ! if (s390_nr_constants) ! { ! output_asm_insn ("larl\\t%0,%1", operands); ! s390_output_constant_pool (operands[1], operands[2]); ! } + return ""; + } + [(set_attr "op_type" "NN") + (set_attr "type" "la")]) diff -Nrc3pad gcc-3.2.3/gcc/config/s390/s390-modes.def gcc-3.3/gcc/config/s390/s390-modes.def *** gcc-3.2.3/gcc/config/s390/s390-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/s390/s390-modes.def 2002-09-12 12:37:17.000000000 +0000 *************** *** 0 **** --- 1,38 ---- + /* Definitions of target machine for GNU compiler, for IBM S/390 + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Hartmut Penner (hpenner@de.ibm.com) and + Ulrich Weigand (uweigand@de.ibm.com). + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. */ + + CC (CCZ) + CC (CCA) + CC (CCAP) + CC (CCAN) + CC (CCL) + CC (CCL1) + CC (CCL2) + CC (CCU) + CC (CCUR) + CC (CCS) + CC (CCSR) + CC (CCT) + CC (CCT1) + CC (CCT2) + CC (CCT3) diff -Nrc3pad gcc-3.2.3/gcc/config/s390/s390-protos.h gcc-3.3/gcc/config/s390/s390-protos.h *** gcc-3.2.3/gcc/config/s390/s390-protos.h 2002-06-11 14:06:35.000000000 +0000 --- gcc-3.3/gcc/config/s390/s390-protos.h 2003-01-24 17:12:05.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for IBM S/390. ! Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Hartmut Penner (hpenner@de.ibm.com) This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for IBM S/390. ! Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. Contributed by Hartmut Penner (hpenner@de.ibm.com) This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 24,40 **** extern void optimization_options PARAMS ((int, int)); extern void override_options PARAMS ((void)); extern int s390_arg_frame_offset PARAMS ((void)); - extern void s390_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - extern void s390_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); extern void s390_emit_prologue PARAMS ((void)); extern void s390_emit_epilogue PARAMS ((void)); extern void s390_function_profiler PARAMS ((FILE *, int)); #ifdef RTX_CODE extern int const0_operand PARAMS ((rtx, enum machine_mode)); extern int consttable_operand PARAMS ((rtx, enum machine_mode)); extern int larl_operand PARAMS ((rtx, enum machine_mode)); - extern int fp_operand PARAMS ((rtx, enum machine_mode)); extern int s_operand PARAMS ((rtx, enum machine_mode)); extern int s_imm_operand PARAMS ((rtx, enum machine_mode)); extern int bras_sym_operand PARAMS ((rtx, enum machine_mode)); --- 24,39 ---- extern void optimization_options PARAMS ((int, int)); extern void override_options PARAMS ((void)); extern int s390_arg_frame_offset PARAMS ((void)); extern void s390_emit_prologue PARAMS ((void)); extern void s390_emit_epilogue PARAMS ((void)); extern void s390_function_profiler PARAMS ((FILE *, int)); #ifdef RTX_CODE + extern int s390_address_cost PARAMS ((rtx)); + extern int q_constraint PARAMS ((rtx)); extern int const0_operand PARAMS ((rtx, enum machine_mode)); extern int consttable_operand PARAMS ((rtx, enum machine_mode)); extern int larl_operand PARAMS ((rtx, enum machine_mode)); extern int s_operand PARAMS ((rtx, enum machine_mode)); extern int s_imm_operand PARAMS ((rtx, enum machine_mode)); extern int bras_sym_operand PARAMS ((rtx, enum machine_mode)); *************** extern int s390_single_hi PARAMS ((rtx, *** 44,55 **** extern int s390_extract_hi PARAMS ((rtx, enum machine_mode, int)); extern int s390_single_qi PARAMS ((rtx, enum machine_mode, int)); extern int s390_extract_qi PARAMS ((rtx, enum machine_mode, int)); extern int s390_match_ccmode PARAMS ((rtx, enum machine_mode)); extern enum machine_mode s390_select_ccmode PARAMS ((enum rtx_code, rtx, rtx)); extern int symbolic_reference_mentioned_p PARAMS ((rtx)); extern int legitimate_la_operand_p PARAMS ((rtx)); ! extern rtx legitimize_la_operand PARAMS ((rtx)); extern int legitimate_pic_operand_p PARAMS ((rtx)); extern int legitimate_constant_p PARAMS ((rtx)); extern int legitimate_reload_constant_p PARAMS ((rtx)); --- 43,58 ---- extern int s390_extract_hi PARAMS ((rtx, enum machine_mode, int)); extern int s390_single_qi PARAMS ((rtx, enum machine_mode, int)); extern int s390_extract_qi PARAMS ((rtx, enum machine_mode, int)); + extern int tls_symbolic_operand PARAMS ((rtx)); extern int s390_match_ccmode PARAMS ((rtx, enum machine_mode)); + extern enum machine_mode s390_tm_ccmode PARAMS ((rtx, rtx, int)); extern enum machine_mode s390_select_ccmode PARAMS ((enum rtx_code, rtx, rtx)); extern int symbolic_reference_mentioned_p PARAMS ((rtx)); + extern int tls_symbolic_reference_mentioned_p PARAMS ((rtx)); + extern rtx s390_tls_get_offset PARAMS ((void)); extern int legitimate_la_operand_p PARAMS ((rtx)); ! extern int preferred_la_operand_p PARAMS ((rtx)); extern int legitimate_pic_operand_p PARAMS ((rtx)); extern int legitimate_constant_p PARAMS ((rtx)); extern int legitimate_reload_constant_p PARAMS ((rtx)); *************** extern enum reg_class s390_preferred_rel *** 60,75 **** extern enum reg_class s390_secondary_input_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx)); extern int s390_plus_operand PARAMS ((rtx, enum machine_mode)); extern void s390_expand_plus_operand PARAMS ((rtx, rtx, rtx)); ! extern void emit_pic_move PARAMS ((rtx *, enum machine_mode)); extern void s390_output_symbolic_const PARAMS ((FILE *, rtx)); extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand PARAMS ((FILE *, rtx, int)); ! extern void s390_output_constant_pool PARAMS ((FILE *)); extern void s390_trampoline_template PARAMS ((FILE *)); extern void s390_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern rtx s390_gen_rtx_const_DI PARAMS ((int, int)); extern rtx s390_simplify_dwarf_addr PARAMS ((rtx)); #endif /* RTX_CODE */ #ifdef TREE_CODE --- 63,84 ---- extern enum reg_class s390_secondary_input_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx)); extern int s390_plus_operand PARAMS ((rtx, enum machine_mode)); extern void s390_expand_plus_operand PARAMS ((rtx, rtx, rtx)); ! extern void emit_symbolic_move PARAMS ((rtx *)); ! extern void s390_load_address PARAMS ((rtx, rtx)); ! extern void s390_expand_movstr PARAMS ((rtx, rtx, rtx)); ! extern void s390_expand_clrstr PARAMS ((rtx, rtx)); ! extern void s390_expand_cmpstr PARAMS ((rtx, rtx, rtx, rtx)); ! extern rtx s390_return_addr_rtx PARAMS ((int, rtx)); extern void s390_output_symbolic_const PARAMS ((FILE *, rtx)); extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand PARAMS ((FILE *, rtx, int)); ! extern void s390_output_constant_pool PARAMS ((rtx, rtx)); extern void s390_trampoline_template PARAMS ((FILE *)); extern void s390_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern rtx s390_gen_rtx_const_DI PARAMS ((int, int)); extern rtx s390_simplify_dwarf_addr PARAMS ((rtx)); + extern void s390_machine_dependent_reorg PARAMS ((rtx)); #endif /* RTX_CODE */ #ifdef TREE_CODE *************** extern void s390_function_arg_advance PA *** 78,84 **** extern tree s390_build_va_list PARAMS ((void)); #ifdef RTX_CODE extern rtx s390_function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); ! extern void s390_va_start PARAMS ((int, tree, rtx)); extern rtx s390_va_arg PARAMS ((tree, tree)); #endif /* RTX_CODE */ #endif /* TREE_CODE */ --- 87,93 ---- extern tree s390_build_va_list PARAMS ((void)); #ifdef RTX_CODE extern rtx s390_function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); ! extern void s390_va_start PARAMS ((tree, rtx)); extern rtx s390_va_arg PARAMS ((tree, tree)); #endif /* RTX_CODE */ #endif /* TREE_CODE */ diff -Nrc3pad gcc-3.2.3/gcc/config/s390/t-crtstuff gcc-3.3/gcc/config/s390/t-crtstuff *** gcc-3.2.3/gcc/config/s390/t-crtstuff 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/s390/t-crtstuff 2002-11-29 19:59:25.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + # crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, + # because then __FRAME_END__ might not be the last thing in .eh_frame + # section. + CRTSTUFF_T_CFLAGS = -fno-asynchronous-unwind-tables diff -Nrc3pad gcc-3.2.3/gcc/config/s390/t-linux gcc-3.3/gcc/config/s390/t-linux *** gcc-3.2.3/gcc/config/s390/t-linux 2001-12-16 01:48:16.000000000 +0000 --- gcc-3.3/gcc/config/s390/t-linux 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - # The crtbegin and crtend must not depend on a small GOT - CRTSTUFF_T_CFLAGS = -O2 -fPIC - CRTSTUFF_T_CFLAGS_S = -O2 -fPIC - - # Compile libgcc2.a with pic. - TARGET_LIBGCC2_CFLAGS = -fPIC -include $(srcdir)/config/s390/fixdfdi.h - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/s390/t-linux64 gcc-3.3/gcc/config/s390/t-linux64 *** gcc-3.2.3/gcc/config/s390/t-linux64 2002-02-06 21:19:46.000000000 +0000 --- gcc-3.3/gcc/config/s390/t-linux64 2002-11-21 12:03:49.000000000 +0000 *************** *** 1,3 **** --- 1,12 ---- + MULTILIB_OPTIONS = m64/m31 + MULTILIB_DIRNAMES = 64 32 + MULTILIB_OSDIRNAMES = ../lib64 ../lib + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib + + EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o + # Override t-slibgcc-elf-ver to export some libgcc symbols with # the symbol versions that glibc used. SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver $(srcdir)/config/s390/libgcc-glibc.ver diff -Nrc3pad gcc-3.2.3/gcc/config/sh/coff.h gcc-3.3/gcc/config/sh/coff.h *** gcc-3.2.3/gcc/config/sh/coff.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/coff.h 2002-08-29 21:40:17.000000000 +0000 *************** *** 0 **** --- 1,81 ---- + /* Definitions of target machine for gcc for Hitachi / SuperH SH using ELF. + Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc. + Contributed by Jörn Rennecke . + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Generate SDB debugging information. */ + + #define SDB_DEBUGGING_INFO 1 + + /* Output DBX (stabs) debugging information if doing -gstabs. */ + + #include "dbxcoff.h" + + #define SDB_DELIM ";" + + #ifndef MAX_OFILE_ALIGNMENT + #define MAX_OFILE_ALIGNMENT 128 + #endif + + #define IDENT_ASM_OP "\t.ident\t" + + /* Switch into a generic section. */ + #define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section + + /* The prefix to add to user-visible assembler symbols. */ + + #define USER_LABEL_PREFIX "_" + + /* The prefix to add to an internally generated label. */ + + #define LOCAL_LABEL_PREFIX "" + + /* Make an internal label into a string. */ + #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ + sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM)) + + /* Output an internal label definition. */ + #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ + asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM)) + + /* This is how to output an assembler line + that says to advance the location counter by SIZE bytes. */ + + #define ASM_OUTPUT_SKIP(FILE,SIZE) \ + fprintf ((FILE), "\t.space %d\n", (SIZE)) + + /* This says how to output an assembler line + to define a global common symbol. */ + + #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ + ( fputs ("\t.comm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (SIZE))) + + /* This says how to output an assembler line + to define a local common symbol. */ + + #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ + ( fputs ("\t.lcomm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (SIZE))) + + #define TARGET_OBJFMT_CPP_BUILTINS() + + #define DWARF2_UNWIND_INFO 0 diff -Nrc3pad gcc-3.2.3/gcc/config/sh/crt1.asm gcc-3.3/gcc/config/sh/crt1.asm *** gcc-3.2.3/gcc/config/sh/crt1.asm 2002-02-09 03:08:06.000000000 +0000 --- gcc-3.3/gcc/config/sh/crt1.asm 2002-06-26 15:42:03.000000000 +0000 *************** ___main: *** 174,183 **** rts nop #endif - - #ifdef __ELF__ - .section .stack,"aw" - #else - .section .stack - #endif - _stack: .long 0xdeaddead --- 174,176 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sh/elf.h gcc-3.3/gcc/config/sh/elf.h *** gcc-3.2.3/gcc/config/sh/elf.h 2002-02-21 16:42:28.000000000 +0000 --- gcc-3.3/gcc/config/sh/elf.h 2002-08-29 21:40:17.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for gcc for Hitachi / SuperH SH using ELF. ! Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc. Contributed by Ian Lance Taylor . This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for gcc for Hitachi / SuperH SH using ELF. ! Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Ian Lance Taylor . This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,46 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* Undefine some macros defined in both sh.h and svr4.h. */ - #undef IDENT_ASM_OP - #undef ASM_FILE_END - #undef ASM_OUTPUT_SOURCE_LINE - #undef DBX_OUTPUT_MAIN_SOURCE_FILE_END - #undef TARGET_ASM_NAMED_SECTION - #undef ASM_DECLARE_FUNCTION_NAME - #undef MAX_OFILE_ALIGNMENT - #undef SIZE_TYPE - #undef PTRDIFF_TYPE - - /* Be ELF-like. */ - /* TODO: convert includes to ${tm_file} list in config.gcc. */ - #include "dbxelf.h" - #include "elfos.h" - #include "svr4.h" - - /* No SDB debugging info. */ - #undef SDB_DEBUGGING_INFO - /* Generate DWARF2 debugging information and make it the default */ - #undef DWARF2_DEBUGGING_INFO #define DWARF2_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE --- 19,25 ---- *************** Boston, MA 02111-1307, USA. */ *** 49,65 **** /* use a more compact format for line information */ #define DWARF2_ASM_LINE_DEBUG_INFO 1 ! /* WCHAR_TYPE_SIZE is defined to BITS_PER_WORD in svr4.h, but ! BITS_PER_WORD isn't constant any more. Fortunately, on no SH ! platform is it wider than 32-bits. */ ! #define MAX_WCHAR_TYPE_SIZE 32 - /* The prefix to add to user-visible assembler symbols. - Note that svr4.h redefined it from the original value (that we want) - in sh.h */ ! #undef USER_LABEL_PREFIX ! #define USER_LABEL_PREFIX "_" #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." --- 28,44 ---- /* use a more compact format for line information */ #define DWARF2_ASM_LINE_DEBUG_INFO 1 ! /* WCHAR_TYPE / WCHAR_TYPE_SIZE are defined to long int / BITS_PER_WORD in ! svr4.h, but these work out as 64 bit for shmedia64. */ ! #undef WCHAR_TYPE ! /* #define WCHAR_TYPE (TARGET_SH5 ? "int" : "long int") */ ! #define WCHAR_TYPE SH_ELF_WCHAR_TYPE ! ! #undef WCHAR_TYPE_SIZE ! #define WCHAR_TYPE_SIZE 32 ! /* The prefix to add to user-visible assembler symbols. */ #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." *************** Boston, MA 02111-1307, USA. */ *** 82,88 **** /* Let code know that this is ELF. */ ! #define CPP_PREDEFINES "-D__sh__ -D__ELF__ -Acpu=sh -Amachine=sh" #undef SIZE_TYPE #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int") --- 61,67 ---- /* Let code know that this is ELF. */ ! #define TARGET_OBJFMT_CPP_BUILTINS() builtin_define ("__ELF__") #undef SIZE_TYPE #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int") *************** Boston, MA 02111-1307, USA. */ *** 91,137 **** #define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int") /* Pass -ml and -mrelax to the assembler and linker. */ #undef ASM_SPEC ! #define ASM_SPEC "%{ml:-little} %{mrelax:-relax} \ %{m5-compact:--isa=SHcompact} %{m5-compact-nofpu:--isa=SHcompact} \ %{m5-32media:--isa=SHmedia --abi=32} %{m5-32media-nofpu:--isa=SHmedia --abi=32} \ %{m5-64media:--isa=SHmedia --abi=64} %{m5-64media-nofpu:--isa=SHmedia --abi=64}" #undef LINK_SPEC ! #define LINK_SPEC " \ ! %{m5-compact:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-compact-nofpu:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-32media:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-32media-nofpu:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-64media:%{!ml:-m shelf64} %{ml:-m shlelf64}} \ ! %{m5-64media-nofpu:%{!ml:-m shelf64} %{ml:-m shlelf64}} \ ! %{!m5-64media:%{!m5-64media-nofpu:%{!m5-32media:%{!m5-32media-nofpu:%{!m5-compact:%{!m5-compact-nofpu:%{ml:-m shlelf}}}}}}} \ ! %{mrelax:-relax}" /* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it again. */ ! #define DBX_REGISTER_NUMBER(REGNO) \ ! (GENERAL_REGISTER_P (REGNO) \ ! ? ((REGNO) - FIRST_GENERAL_REG) \ ! : FP_REGISTER_P (REGNO) \ ! ? ((REGNO) - FIRST_FP_REG + (TARGET_SH5 ? (TARGET_SHCOMPACT ? 245 \ ! : 77) : 25)) \ ! : XD_REGISTER_P (REGNO) \ ! ? ((REGNO) - FIRST_XD_REG + (TARGET_SH5 ? 289 : 87)) \ ! : TARGET_REGISTER_P (REGNO) \ ! ? ((REGNO) - FIRST_TARGET_REG + 68) \ ! : (REGNO) == PR_REG \ ! ? (TARGET_SH5 ? 241 : 17) \ ! : (REGNO) == T_REG \ ! ? (TARGET_SH5 ? 242 : 18) \ ! : (REGNO) == GBR_REG \ ! ? (TARGET_SH5 ? 238 : 19) \ ! : (REGNO) == MACH_REG \ ! ? (TARGET_SH5 ? 239 : 20) \ ! : (REGNO) == MACL_REG \ ! ? (TARGET_SH5 ? 240 : 21) \ ! : (REGNO) == FPUL_REG \ ! ? (TARGET_SH5 ? 244 : 23) \ ! : (abort(), -1)) #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ --- 70,92 ---- #define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int") /* Pass -ml and -mrelax to the assembler and linker. */ #undef ASM_SPEC ! #define ASM_SPEC "%(subtarget_asm_endian_spec) %{mrelax:-relax} \ %{m5-compact:--isa=SHcompact} %{m5-compact-nofpu:--isa=SHcompact} \ %{m5-32media:--isa=SHmedia --abi=32} %{m5-32media-nofpu:--isa=SHmedia --abi=32} \ %{m5-64media:--isa=SHmedia --abi=64} %{m5-64media-nofpu:--isa=SHmedia --abi=64}" #undef LINK_SPEC ! #define LINK_SPEC SH_LINK_SPEC ! #undef LINK_EMUL_PREFIX ! #if TARGET_ENDIAN_DEFAULT == LITTLE_ENDIAN_BIT ! #define LINK_EMUL_PREFIX "sh%{!mb:l}elf" ! #else ! #define LINK_EMUL_PREFIX "sh%{ml:l}elf" ! #endif /* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it again. */ ! #define DBX_REGISTER_NUMBER(REGNO) SH_DBX_REGISTER_NUMBER (REGNO) #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ *************** do { \ *** 170,172 **** --- 125,131 ---- #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" + + /* ASM_OUTPUT_CASE_LABEL is defined in elfos.h. With it, + a redundant .align was generated. */ + #undef ASM_OUTPUT_CASE_LABEL diff -Nrc3pad gcc-3.2.3/gcc/config/sh/embed-elf.h gcc-3.3/gcc/config/sh/embed-elf.h *** gcc-3.2.3/gcc/config/sh/embed-elf.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/embed-elf.h 2002-04-09 20:07:12.000000000 +0000 *************** *** 0 **** --- 1,28 ---- + /* Definitions of target machine for GNU compiler for Hitachi / SuperH SH + non-Linux embedded targets. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by J"orn Rennecke + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "sh/elf.h" + + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "_" + + #undef TARGET_HAS_F_SETLKW diff -Nrc3pad gcc-3.2.3/gcc/config/sh/lib1funcs.asm gcc-3.3/gcc/config/sh/lib1funcs.asm *** gcc-3.2.3/gcc/config/sh/lib1funcs.asm 2002-02-21 16:42:28.000000000 +0000 --- gcc-3.3/gcc/config/sh/lib1funcs.asm 2002-09-18 11:43:38.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it --- 1,4 ---- ! /* Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it *************** Boston, MA 02111-1307, USA. */ *** 43,57 **** #define LOCAL(X) L_##X #endif ! #ifdef __linux__ ! #define GLOBAL(X) __##X ! #endif ! ! #ifndef GLOBAL ! #define GLOBAL(X) ___##X ! #endif ! #if defined __SH5__ && ! defined __SH4_NOFPU__ #define FMOVD_WORKS #endif --- 43,53 ---- #define LOCAL(X) L_##X #endif ! #define CONCAT(A,B) A##B ! #define GLOBAL0(U,X) CONCAT(U,__##X) ! #define GLOBAL(X) GLOBAL0(__USER_LABEL_PREFIX__,X) ! #if defined __SH5__ && ! defined __SH4_NOFPU__ && ! defined (__LITTLE_ENDIAN__) #define FMOVD_WORKS #endif *************** GLOBAL(sdivsi3_i4): *** 934,939 **** --- 930,936 ---- .text #endif .align 2 + #if 0 /* The assembly code that follows is a hand-optimized version of the C code that follows. Note that the registers that are modified are exactly those listed as clobbered in the patterns divsi3_i1 and *************** LOCAL(sdivsi3_dontadd): *** 991,997 **** muls.l r0, r2, r0 add.l r0, r63, r0 blink tr0, r63 ! #else GLOBAL(sdivsi3): mov r4,r1 mov r5,r0 --- 988,1087 ---- muls.l r0, r2, r0 add.l r0, r63, r0 blink tr0, r63 ! #else /* ! 0 */ ! // inputs: r4,r5 ! // clobbered: r1,r2,r3,r18,r19,r20,r21,r25,tr0 ! // result in r0 ! GLOBAL(sdivsi3): ! // can create absolute value without extra latency, ! // but dependent on proper sign extension of inputs: ! // shari.l r5,31,r2 ! // xor r5,r2,r20 ! // sub r20,r2,r20 // r20 is now absolute value of r5, zero-extended. ! shari.l r5,31,r2 ! ori r2,1,r2 ! muls.l r5,r2,r20 // r20 is now absolute value of r5, zero-extended. ! movi 0xffffffffffffbb0c,r19 // shift count eqiv 76 ! shari.l r4,31,r3 ! nsb r20,r0 ! shlld r20,r0,r25 ! shlri r25,48,r25 ! sub r19,r25,r1 ! mmulfx.w r1,r1,r2 ! mshflo.w r1,r63,r1 ! // If r4 was to be used in-place instead of r21, could use this sequence ! // to compute absolute: ! // sub r63,r4,r19 // compute absolute value of r4 ! // shlri r4,32,r3 // into lower 32 bit of r4, keeping ! // mcmv r19,r3,r4 // the sign in the upper 32 bits intact. ! ori r3,1,r3 ! mmulfx.w r25,r2,r2 ! sub r19,r0,r0 ! muls.l r4,r3,r21 ! msub.w r1,r2,r2 ! addi r2,-2,r1 ! mulu.l r21,r1,r19 ! mmulfx.w r2,r2,r2 ! shlli r1,15,r1 ! shlrd r19,r0,r19 ! mulu.l r19,r20,r3 ! mmacnfx.wl r25,r2,r1 ! ptabs r18,tr0 ! sub r21,r3,r25 ! ! mulu.l r25,r1,r2 ! addi r0,14,r0 ! xor r4,r5,r18 ! shlrd r2,r0,r2 ! mulu.l r2,r20,r3 ! add r19,r2,r19 ! shari.l r18,31,r18 ! sub r25,r3,r25 ! ! mulu.l r25,r1,r2 ! sub r25,r20,r25 ! add r19,r18,r19 ! shlrd r2,r0,r2 ! mulu.l r2,r20,r3 ! addi r25,1,r25 ! add r19,r2,r19 ! ! cmpgt r25,r3,r25 ! add.l r19,r25,r0 ! xor r0,r18,r0 ! blink tr0,r63 ! #endif ! #elif defined __SHMEDIA__ ! /* m5compact-nofpu */ ! // clobbered: r18,r19,r20,r21,r25,tr0,tr1,tr2 ! .mode SHmedia ! .section .text..SHmedia32,"ax" ! .align 2 ! GLOBAL(sdivsi3): ! pt/l LOCAL(sdivsi3_dontsub), tr0 ! pt/l LOCAL(sdivsi3_loop), tr1 ! ptabs/l r18,tr2 ! shari.l r4,31,r18 ! shari.l r5,31,r19 ! xor r4,r18,r20 ! xor r5,r19,r21 ! sub.l r20,r18,r20 ! sub.l r21,r19,r21 ! xor r18,r19,r19 ! shlli r21,32,r25 ! addi r25,-1,r21 ! addz.l r20,r63,r20 ! LOCAL(sdivsi3_loop): ! shlli r20,1,r20 ! bgeu/u r21,r20,tr0 ! sub r20,r21,r20 ! LOCAL(sdivsi3_dontsub): ! addi.l r25,-1,r25 ! bnei r25,-32,tr1 ! xor r20,r19,r20 ! sub.l r20,r19,r0 ! blink tr2,r63 ! #else /* ! __SHMEDIA__ */ GLOBAL(sdivsi3): mov r4,r1 mov r5,r0 *************** trivial: *** 1127,1139 **** L1: .double 2147483648 ! #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__) !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4 - #if ! __SH5__ || __SH5__ == 32 - #if __SH5__ - .mode SHcompact - #endif .global GLOBAL(udivsi3_i4) GLOBAL(udivsi3_i4): mov #1,r1 --- 1217,1243 ---- L1: .double 2147483648 ! #elif defined (__SH5__) && ! defined (__SH4_NOFPU__) ! #if ! __SH5__ || __SH5__ == 32 ! !! args in r4 and r5, result in fpul, clobber r20, r21, dr0, fr33 ! .mode SHmedia ! .global GLOBAL(udivsi3_i4) ! GLOBAL(udivsi3_i4): ! addz.l r4,r63,r20 ! addz.l r5,r63,r21 ! fmov.qd r20,dr0 ! fmov.qd r21,dr32 ! ptabs r18,tr0 ! float.qd dr0,dr0 ! float.qd dr32,dr32 ! fdiv.d dr0,dr32,dr0 ! ftrc.dq dr0,dr32 ! fmov.s fr33,fr32 ! blink tr0,r63 ! #endif /* ! __SH5__ || __SH5__ == 32 */ ! #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4 .global GLOBAL(udivsi3_i4) GLOBAL(udivsi3_i4): mov #1,r1 *************** L1: *** 1183,1189 **** #endif .double 2147483648 - #endif /* ! __SH5__ || __SH5__ == 32 */ #endif /* ! __SH4__ */ #endif --- 1287,1292 ---- *************** L1: *** 1191,1201 **** /* __SH4_SINGLE_ONLY__ keeps this part for link compatibility with sh3e code. */ #if (! defined(__SH4__) && ! defined (__SH4_SINGLE__)) || defined (__linux__) - !! - !! Steve Chamberlain - !! sac@cygnus.com - !! - !! !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit .global GLOBAL(udivsi3) --- 1294,1299 ---- *************** L1: *** 1207,1212 **** --- 1305,1311 ---- .text #endif .align 2 + #if 0 /* The assembly code that follows is a hand-optimized version of the C code that follows. Note that the registers that are modified are exactly those listed as clobbered in the patterns udivsi3_i1 and *************** LOCAL(udivsi3_dontadd): *** 1252,1307 **** blink tr0, r63 #else GLOBAL(udivsi3): ! longway: ! mov #0,r0 ! div0u ! ! get one bit from the msb of the numerator into the T ! ! bit and divide it by whats in r5. Put the answer bit ! ! into the T bit so it can come out again at the bottom ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! shortway: ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! vshortway: ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ; div1 r5,r0 ! rotcl r4 ! ret: rts ! mov r4,r0 #endif /* ! __SHMEDIA__ */ #endif /* __SH4__ */ ! #endif #ifdef L_set_fpscr #if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) || __SH5__ == 32 #ifdef __SH5__ --- 1351,1789 ---- blink tr0, r63 #else GLOBAL(udivsi3): ! // inputs: r4,r5 ! // clobbered: r18,r19,r20,r21,r22,r25,tr0 ! // result in r0. ! addz.l r5,r63,r22 ! nsb r22,r0 ! shlld r22,r0,r25 ! shlri r25,48,r25 ! movi 0xffffffffffffbb0c,r20 // shift count eqiv 76 ! sub r20,r25,r21 ! mmulfx.w r21,r21,r19 ! mshflo.w r21,r63,r21 ! ptabs r18,tr0 ! mmulfx.w r25,r19,r19 ! sub r20,r0,r0 ! /* bubble */ ! msub.w r21,r19,r19 ! addi r19,-2,r21 /* It would be nice for scheduling to do this add to r21 ! before the msub.w, but we need a different value for ! r19 to keep errors under control. */ ! mulu.l r4,r21,r18 ! mmulfx.w r19,r19,r19 ! shlli r21,15,r21 ! shlrd r18,r0,r18 ! mulu.l r18,r22,r20 ! mmacnfx.wl r25,r19,r21 ! /* bubble */ ! sub r4,r20,r25 ! mulu.l r25,r21,r19 ! addi r0,14,r0 ! /* bubble */ ! shlrd r19,r0,r19 ! mulu.l r19,r22,r20 ! add r18,r19,r18 ! /* bubble */ ! sub.l r25,r20,r25 ! mulu.l r25,r21,r19 ! addz.l r25,r63,r25 ! sub r25,r22,r25 ! shlrd r19,r0,r19 ! mulu.l r19,r22,r20 ! addi r25,1,r25 ! add r18,r19,r18 ! cmpgt r25,r20,r25 ! add.l r18,r25,r0 ! blink tr0,r63 ! #endif ! #elif defined (__SHMEDIA__) ! /* m5compact-nofpu - more emphasis on code size than on speed, but don't ! ignore speed altogether - div1 needs 9 cycles, subc 7 and rotcl 4. ! So use a short shmedia loop. */ ! // clobbered: r20,r21,r25,tr0,tr1,tr2 ! .mode SHmedia ! .section .text..SHmedia32,"ax" ! .align 2 ! GLOBAL(udivsi3): ! pt/l LOCAL(udivsi3_dontsub), tr0 ! pt/l LOCAL(udivsi3_loop), tr1 ! ptabs/l r18,tr2 ! shlli r5,32,r25 ! addi r25,-1,r21 ! addz.l r4,r63,r20 ! LOCAL(udivsi3_loop): ! shlli r20,1,r20 ! bgeu/u r21,r20,tr0 ! sub r20,r21,r20 ! LOCAL(udivsi3_dontsub): ! addi.l r25,-1,r25 ! bnei r25,-32,tr1 ! add.l r20,r63,r0 ! blink tr2,r63 ! #else /* ! defined (__SHMEDIA__) */ ! LOCAL(div8): ! div1 r5,r4 ! LOCAL(div7): ! div1 r5,r4; div1 r5,r4; div1 r5,r4 ! div1 r5,r4; div1 r5,r4; div1 r5,r4; rts; div1 r5,r4 ! ! LOCAL(divx4): ! div1 r5,r4; rotcl r0 ! div1 r5,r4; rotcl r0 ! div1 r5,r4; rotcl r0 ! rts; div1 r5,r4 ! ! GLOBAL(udivsi3): ! sts.l pr,@-r15 ! extu.w r5,r0 ! cmp/eq r5,r0 ! #ifdef __sh1__ ! bf LOCAL(large_divisor) ! #else ! bf/s LOCAL(large_divisor) ! #endif ! div0u ! swap.w r4,r0 ! shlr16 r4 ! bsr LOCAL(div8) ! shll16 r5 ! bsr LOCAL(div7) ! div1 r5,r4 ! xtrct r4,r0 ! xtrct r0,r4 ! bsr LOCAL(div8) ! swap.w r4,r4 ! bsr LOCAL(div7) ! div1 r5,r4 ! lds.l @r15+,pr ! xtrct r4,r0 ! swap.w r0,r0 ! rotcl r0 ! rts ! shlr16 r5 ! ! LOCAL(large_divisor): ! #ifdef __sh1__ ! div0u ! #endif ! mov #0,r0 ! xtrct r4,r0 ! xtrct r0,r4 ! bsr LOCAL(divx4) ! rotcl r0 ! bsr LOCAL(divx4) ! rotcl r0 ! bsr LOCAL(divx4) ! rotcl r0 ! bsr LOCAL(divx4) ! rotcl r0 ! lds.l @r15+,pr ! rts ! rotcl r0 #endif /* ! __SHMEDIA__ */ #endif /* __SH4__ */ ! #endif /* L_udivsi3 */ ! ! #ifdef L_udivdi3 ! #ifdef __SHMEDIA__ ! .mode SHmedia ! .section .text..SHmedia32,"ax" ! .align 2 ! .global GLOBAL(udivdi3) ! GLOBAL(udivdi3): ! shlri r3,1,r4 ! nsb r4,r22 ! shlld r3,r22,r6 ! shlri r6,49,r5 ! movi 0xffffffffffffbaf1,r21 /* .l shift count 17. */ ! sub r21,r5,r1 ! mmulfx.w r1,r1,r4 ! mshflo.w r1,r63,r1 ! sub r63,r22,r20 // r63 == 64 % 64 ! mmulfx.w r5,r4,r4 ! pta LOCAL(large_divisor),tr0 ! addi r20,32,r9 ! msub.w r1,r4,r1 ! madd.w r1,r1,r1 ! mmulfx.w r1,r1,r4 ! shlri r6,32,r7 ! bgt/u r9,r63,tr0 // large_divisor ! mmulfx.w r5,r4,r4 ! shlri r2,32+14,r19 ! addi r22,-31,r0 ! msub.w r1,r4,r1 ! ! mulu.l r1,r7,r4 ! addi r1,-3,r5 ! mulu.l r5,r19,r5 ! sub r63,r4,r4 // Negate to make sure r1 ends up <= 1/r2 ! shlri r4,2,r4 /* chop off leading %0000000000000000 001.00000000000 - or, as ! the case may be, %0000000000000000 000.11111111111, still */ ! muls.l r1,r4,r4 /* leaving at least one sign bit. */ ! mulu.l r5,r3,r8 ! mshalds.l r1,r21,r1 ! shari r4,26,r4 ! shlld r8,r0,r8 ! add r1,r4,r1 // 31 bit unsigned reciprocal now in r1 (msb equiv. 0.5) ! sub r2,r8,r2 ! /* Can do second step of 64 : 32 div now, using r1 and the rest in r2. */ ! ! shlri r2,22,r21 ! mulu.l r21,r1,r21 ! shlld r5,r0,r8 ! addi r20,30-22,r0 ! shlrd r21,r0,r21 ! mulu.l r21,r3,r5 ! add r8,r21,r8 ! mcmpgt.l r21,r63,r21 // See Note 1 ! addi r20,30,r0 ! mshfhi.l r63,r21,r21 ! sub r2,r5,r2 ! andc r2,r21,r2 ! ! /* small divisor: need a third divide step */ ! mulu.l r2,r1,r7 ! ptabs r18,tr0 ! addi r2,1,r2 ! shlrd r7,r0,r7 ! mulu.l r7,r3,r5 ! add r8,r7,r8 ! sub r2,r3,r2 ! cmpgt r2,r5,r5 ! add r8,r5,r2 ! /* could test r3 here to check for divide by zero. */ ! blink tr0,r63 ! ! LOCAL(large_divisor): ! mmulfx.w r5,r4,r4 ! shlrd r2,r9,r25 ! shlri r25,32,r8 ! msub.w r1,r4,r1 ! ! mulu.l r1,r7,r4 ! addi r1,-3,r5 ! mulu.l r5,r8,r5 ! sub r63,r4,r4 // Negate to make sure r1 ends up <= 1/r2 ! shlri r4,2,r4 /* chop off leading %0000000000000000 001.00000000000 - or, as ! the case may be, %0000000000000000 000.11111111111, still */ ! muls.l r1,r4,r4 /* leaving at least one sign bit. */ ! shlri r5,14-1,r8 ! mulu.l r8,r7,r5 ! mshalds.l r1,r21,r1 ! shari r4,26,r4 ! add r1,r4,r1 // 31 bit unsigned reciprocal now in r1 (msb equiv. 0.5) ! sub r25,r5,r25 ! /* Can do second step of 64 : 32 div now, using r1 and the rest in r25. */ ! ! shlri r25,22,r21 ! mulu.l r21,r1,r21 ! pta LOCAL(no_lo_adj),tr0 ! addi r22,32,r0 ! shlri r21,40,r21 ! mulu.l r21,r7,r5 ! add r8,r21,r8 ! shlld r2,r0,r2 ! sub r25,r5,r25 ! bgtu/u r7,r25,tr0 // no_lo_adj ! addi r8,1,r8 ! sub r25,r7,r25 ! LOCAL(no_lo_adj): ! mextr4 r2,r25,r2 ! ! /* large_divisor: only needs a few adjustments. */ ! mulu.l r8,r6,r5 ! ptabs r18,tr0 ! /* bubble */ ! cmpgtu r5,r2,r5 ! sub r8,r5,r2 ! blink tr0,r63 ! /* Note 1: To shift the result of the second divide stage so that the result ! always fits into 32 bits, yet we still reduce the rest sufficiently ! would require a lot of instructions to do the shifts just right. Using ! the full 64 bit shift result to multiply with the divisor would require ! four extra instructions for the upper 32 bits (shift / mulu / shift / sub). ! Fortunately, if the upper 32 bits of the shift result are nonzero, we ! know that the rest after taking this partial result into account will ! fit into 32 bits. So we just clear the upper 32 bits of the rest if the ! upper 32 bits of the partial result are nonzero. */ ! #endif /* __SHMEDIA__ */ ! #endif /* L_udivdi3 */ ! ! #ifdef L_divdi3 ! #ifdef __SHMEDIA__ ! .mode SHmedia ! .section .text..SHmedia32,"ax" ! .align 2 ! .global GLOBAL(divdi3) ! GLOBAL(divdi3): ! pta GLOBAL(udivdi3),tr0 ! shari r2,63,r22 ! shari r3,63,r23 ! xor r2,r22,r2 ! xor r3,r23,r3 ! sub r2,r22,r2 ! sub r3,r23,r3 ! beq/u r22,r23,tr0 ! ptabs r18,tr1 ! blink tr0,r18 ! sub r63,r2,r2 ! blink tr1,r63 ! #endif /* __SHMEDIA__ */ ! #endif /* L_divdi3 */ ! ! #ifdef L_umoddi3 ! #ifdef __SHMEDIA__ ! .mode SHmedia ! .section .text..SHmedia32,"ax" ! .align 2 ! .global GLOBAL(umoddi3) ! GLOBAL(umoddi3): ! shlri r3,1,r4 ! nsb r4,r22 ! shlld r3,r22,r6 ! shlri r6,49,r5 ! movi 0xffffffffffffbaf1,r21 /* .l shift count 17. */ ! sub r21,r5,r1 ! mmulfx.w r1,r1,r4 ! mshflo.w r1,r63,r1 ! sub r63,r22,r20 // r63 == 64 % 64 ! mmulfx.w r5,r4,r4 ! pta LOCAL(large_divisor),tr0 ! addi r20,32,r9 ! msub.w r1,r4,r1 ! madd.w r1,r1,r1 ! mmulfx.w r1,r1,r4 ! shlri r6,32,r7 ! bgt/u r9,r63,tr0 // large_divisor ! mmulfx.w r5,r4,r4 ! shlri r2,32+14,r19 ! addi r22,-31,r0 ! msub.w r1,r4,r1 ! ! mulu.l r1,r7,r4 ! addi r1,-3,r5 ! mulu.l r5,r19,r5 ! sub r63,r4,r4 // Negate to make sure r1 ends up <= 1/r2 ! shlri r4,2,r4 /* chop off leading %0000000000000000 001.00000000000 - or, as ! the case may be, %0000000000000000 000.11111111111, still */ ! muls.l r1,r4,r4 /* leaving at least one sign bit. */ ! mulu.l r5,r3,r5 ! mshalds.l r1,r21,r1 ! shari r4,26,r4 ! shlld r5,r0,r5 ! add r1,r4,r1 // 31 bit unsigned reciprocal now in r1 (msb equiv. 0.5) ! sub r2,r5,r2 ! /* Can do second step of 64 : 32 div now, using r1 and the rest in r2. */ ! ! shlri r2,22,r21 ! mulu.l r21,r1,r21 ! addi r20,30-22,r0 ! /* bubble */ /* could test r3 here to check for divide by zero. */ ! shlrd r21,r0,r21 ! mulu.l r21,r3,r5 ! mcmpgt.l r21,r63,r21 // See Note 1 ! addi r20,30,r0 ! mshfhi.l r63,r21,r21 ! sub r2,r5,r2 ! andc r2,r21,r2 ! ! /* small divisor: need a third divide step */ ! mulu.l r2,r1,r7 ! ptabs r18,tr0 ! sub r2,r3,r8 /* re-use r8 here for rest - r3 */ ! shlrd r7,r0,r7 ! mulu.l r7,r3,r5 ! /* bubble */ ! addi r8,1,r7 ! cmpgt r7,r5,r7 ! cmvne r7,r8,r2 ! sub r2,r5,r2 ! blink tr0,r63 ! ! LOCAL(large_divisor): ! mmulfx.w r5,r4,r4 ! shlrd r2,r9,r25 ! shlri r25,32,r8 ! msub.w r1,r4,r1 ! ! mulu.l r1,r7,r4 ! addi r1,-3,r5 ! mulu.l r5,r8,r5 ! sub r63,r4,r4 // Negate to make sure r1 ends up <= 1/r2 ! shlri r4,2,r4 /* chop off leading %0000000000000000 001.00000000000 - or, as ! the case may be, %0000000000000000 000.11111111111, still */ ! muls.l r1,r4,r4 /* leaving at least one sign bit. */ ! shlri r5,14-1,r8 ! mulu.l r8,r7,r5 ! mshalds.l r1,r21,r1 ! shari r4,26,r4 ! add r1,r4,r1 // 31 bit unsigned reciprocal now in r1 (msb equiv. 0.5) ! sub r25,r5,r25 ! /* Can do second step of 64 : 32 div now, using r1 and the rest in r25. */ ! ! shlri r25,22,r21 ! mulu.l r21,r1,r21 ! pta LOCAL(no_lo_adj),tr0 ! addi r22,32,r0 ! shlri r21,40,r21 ! mulu.l r21,r7,r5 ! add r8,r21,r8 ! shlld r2,r0,r2 ! sub r25,r5,r25 ! bgtu/u r7,r25,tr0 // no_lo_adj ! addi r8,1,r8 ! sub r25,r7,r25 ! LOCAL(no_lo_adj): ! mextr4 r2,r25,r2 ! ! /* large_divisor: only needs a few adjustments. */ ! mulu.l r8,r6,r5 ! ptabs r18,tr0 ! add r2,r6,r7 ! cmpgtu r5,r2,r8 ! cmvne r8,r7,r2 ! sub r2,r5,r2 ! shlrd r2,r22,r2 ! blink tr0,r63 ! /* Note 1: To shift the result of the second divide stage so that the result ! always fits into 32 bits, yet we still reduce the rest sufficiently ! would require a lot of instructions to do the shifts just right. Using ! the full 64 bit shift result to multiply with the divisor would require ! four extra instructions for the upper 32 bits (shift / mulu / shift / sub). ! Fortunately, if the upper 32 bits of the shift result are nonzero, we ! know that the rest after taking this partial result into account will ! fit into 32 bits. So we just clear the upper 32 bits of the rest if the ! upper 32 bits of the partial result are nonzero. */ ! #endif /* __SHMEDIA__ */ ! #endif /* L_umoddi3 */ ! ! #ifdef L_moddi3 ! #ifdef __SHMEDIA__ ! .mode SHmedia ! .section .text..SHmedia32,"ax" ! .align 2 ! .global GLOBAL(moddi3) ! GLOBAL(moddi3): ! pta GLOBAL(umoddi3),tr0 ! shari r2,63,r22 ! shari r3,63,r23 ! xor r2,r22,r2 ! xor r3,r23,r3 ! sub r2,r22,r2 ! sub r3,r23,r3 ! beq/u r22,r63,tr0 ! ptabs r18,tr1 ! blink tr0,r18 ! sub r63,r2,r2 ! blink tr1,r63 ! #endif /* __SHMEDIA__ */ ! #endif /* L_moddi3 */ ! #ifdef L_set_fpscr #if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) || __SH5__ == 32 #ifdef __SH5__ *************** LOCAL(set_fpscr_L1): *** 1352,1359 **** --- 1834,1859 ---- .mode SHmedia .section .text..SHmedia32,"ax" .align 2 + .global GLOBAL(init_trampoline) + GLOBAL(init_trampoline): + st.l r0,8,r2 + #ifdef __LITTLE_ENDIAN__ + movi 9,r20 + shori 0x402b,r20 + shori 0xd101,r20 + shori 0xd002,r20 + #else + movi 0xffffffffffffd002,r20 + shori 0xd101,r20 + shori 0x402b,r20 + shori 9,r20 + #endif + st.q r0,0,r20 + st.l r0,12,r3 .global GLOBAL(ic_invalidate) GLOBAL(ic_invalidate): + ocbwb r0,0 + synco icbi r0, 0 ptabs r18, tr0 synci *************** LOCAL(ia_main_table): *** 1857,1865 **** .align 2 /* This function stores 64-bit general-purpose registers back in ! the stack, starting at @(r1), where the cookie is supposed to ! have been stored, and loads the address in which each register ! was stored into itself. Its execution time is linear on the number of registers that actually have to be copied, and it is optimized for structures larger than 64 bits, as opposed to invidivual `long long' arguments. See sh.h for details on the --- 2357,2366 ---- .align 2 /* This function stores 64-bit general-purpose registers back in ! the stack, and loads the address in which each register ! was stored into itself. The lower 32 bits of r17 hold the address ! to begin storing, and the upper 32 bits of r17 hold the cookie. ! Its execution time is linear on the number of registers that actually have to be copied, and it is optimized for structures larger than 64 bits, as opposed to invidivual `long long' arguments. See sh.h for details on the *************** LOCAL(ia_main_table): *** 1869,2004 **** GLOBAL(GCC_shcompact_incoming_args): ptabs/l r18, tr0 /* Prepare to return. */ shlri r17, 32, r0 /* Load the cookie. */ ! movi ((datalabel LOCAL(ia_main_table) - 31 * 2) >> 16) & 65535, r35 pt/l LOCAL(ia_loop), tr1 add.l r17, r63, r17 ! shori ((datalabel LOCAL(ia_main_table) - 31 * 2)) & 65535, r35 LOCAL(ia_loop): ! nsb r0, r28 ! shlli r28, 1, r29 ! ldx.w r35, r29, r30 LOCAL(ia_main_label): ! ptrel/l r30, tr2 blink tr2, r63 LOCAL(ia_r2_ld): /* Store r2 and load its address. */ ! movi 3, r30 ! shlli r30, 29, r31 ! and r0, r31, r32 ! andc r0, r31, r0 stx.q r17, r63, r2 add.l r17, r63, r2 addi.l r17, 8, r17 ! beq/u r31, r32, tr1 LOCAL(ia_r3_ld): /* Store r3 and load its address. */ ! movi 3, r30 ! shlli r30, 26, r31 ! and r0, r31, r32 ! andc r0, r31, r0 stx.q r17, r63, r3 add.l r17, r63, r3 addi.l r17, 8, r17 ! beq/u r31, r32, tr1 LOCAL(ia_r4_ld): /* Store r4 and load its address. */ ! movi 3, r30 ! shlli r30, 23, r31 ! and r0, r31, r32 ! andc r0, r31, r0 stx.q r17, r63, r4 add.l r17, r63, r4 addi.l r17, 8, r17 ! beq/u r31, r32, tr1 LOCAL(ia_r5_ld): /* Store r5 and load its address. */ ! movi 3, r30 ! shlli r30, 20, r31 ! and r0, r31, r32 ! andc r0, r31, r0 stx.q r17, r63, r5 add.l r17, r63, r5 addi.l r17, 8, r17 ! beq/u r31, r32, tr1 LOCAL(ia_r6_ld): /* Store r6 and load its address. */ ! movi 3, r30 ! shlli r30, 16, r31 ! and r0, r31, r32 ! andc r0, r31, r0 stx.q r17, r63, r6 add.l r17, r63, r6 addi.l r17, 8, r17 ! beq/u r31, r32, tr1 LOCAL(ia_r7_ld): /* Store r7 and load its address. */ ! movi 3 << 12, r31 ! and r0, r31, r32 ! andc r0, r31, r0 stx.q r17, r63, r7 add.l r17, r63, r7 addi.l r17, 8, r17 ! beq/u r31, r32, tr1 LOCAL(ia_r8_ld): /* Store r8 and load its address. */ ! movi 3 << 8, r31 ! and r0, r31, r32 ! andc r0, r31, r0 stx.q r17, r63, r8 add.l r17, r63, r8 addi.l r17, 8, r17 ! beq/u r31, r32, tr1 LOCAL(ia_r9_ld): /* Store r9 and load its address. */ stx.q r17, r63, r9 add.l r17, r63, r9 blink tr0, r63 LOCAL(ia_r2_push): /* Push r2 onto the stack. */ ! movi 1, r30 ! shlli r30, 29, r31 ! andc r0, r31, r0 stx.q r17, r63, r2 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r3_push): /* Push r3 onto the stack. */ ! movi 1, r30 ! shlli r30, 26, r31 ! andc r0, r31, r0 stx.q r17, r63, r3 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r4_push): /* Push r4 onto the stack. */ ! movi 1, r30 ! shlli r30, 23, r31 ! andc r0, r31, r0 stx.q r17, r63, r4 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r5_push): /* Push r5 onto the stack. */ ! movi 1, r30 ! shlli r30, 20, r31 ! andc r0, r31, r0 stx.q r17, r63, r5 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r6_push): /* Push r6 onto the stack. */ ! movi 1, r30 ! shlli r30, 16, r31 ! andc r0, r31, r0 stx.q r17, r63, r6 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r7_push): /* Push r7 onto the stack. */ ! movi 1 << 12, r31 ! andc r0, r31, r0 stx.q r17, r63, r7 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r8_push): /* Push r8 onto the stack. */ ! movi 1 << 8, r31 ! andc r0, r31, r0 stx.q r17, r63, r8 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_push_seq): /* Push a sequence of registers onto the stack. */ ! andi r0, 7 << 1, r30 ! movi (LOCAL(ia_end_of_push_seq) >> 16) & 65535, r32 ! shlli r30, 2, r31 ! shori LOCAL(ia_end_of_push_seq) & 65535, r32 ! sub.l r32, r31, r33 ! ptabs/l r33, tr2 blink tr2, r63 LOCAL(ia_stack_of_push_seq): /* Beginning of push sequence. */ stx.q r17, r63, r3 --- 2370,2505 ---- GLOBAL(GCC_shcompact_incoming_args): ptabs/l r18, tr0 /* Prepare to return. */ shlri r17, 32, r0 /* Load the cookie. */ ! movi ((datalabel LOCAL(ia_main_table) - 31 * 2) >> 16) & 65535, r43 pt/l LOCAL(ia_loop), tr1 add.l r17, r63, r17 ! shori ((datalabel LOCAL(ia_main_table) - 31 * 2)) & 65535, r43 LOCAL(ia_loop): ! nsb r0, r36 ! shlli r36, 1, r37 ! ldx.w r43, r37, r38 LOCAL(ia_main_label): ! ptrel/l r38, tr2 blink tr2, r63 LOCAL(ia_r2_ld): /* Store r2 and load its address. */ ! movi 3, r38 ! shlli r38, 29, r39 ! and r0, r39, r40 ! andc r0, r39, r0 stx.q r17, r63, r2 add.l r17, r63, r2 addi.l r17, 8, r17 ! beq/u r39, r40, tr1 LOCAL(ia_r3_ld): /* Store r3 and load its address. */ ! movi 3, r38 ! shlli r38, 26, r39 ! and r0, r39, r40 ! andc r0, r39, r0 stx.q r17, r63, r3 add.l r17, r63, r3 addi.l r17, 8, r17 ! beq/u r39, r40, tr1 LOCAL(ia_r4_ld): /* Store r4 and load its address. */ ! movi 3, r38 ! shlli r38, 23, r39 ! and r0, r39, r40 ! andc r0, r39, r0 stx.q r17, r63, r4 add.l r17, r63, r4 addi.l r17, 8, r17 ! beq/u r39, r40, tr1 LOCAL(ia_r5_ld): /* Store r5 and load its address. */ ! movi 3, r38 ! shlli r38, 20, r39 ! and r0, r39, r40 ! andc r0, r39, r0 stx.q r17, r63, r5 add.l r17, r63, r5 addi.l r17, 8, r17 ! beq/u r39, r40, tr1 LOCAL(ia_r6_ld): /* Store r6 and load its address. */ ! movi 3, r38 ! shlli r38, 16, r39 ! and r0, r39, r40 ! andc r0, r39, r0 stx.q r17, r63, r6 add.l r17, r63, r6 addi.l r17, 8, r17 ! beq/u r39, r40, tr1 LOCAL(ia_r7_ld): /* Store r7 and load its address. */ ! movi 3 << 12, r39 ! and r0, r39, r40 ! andc r0, r39, r0 stx.q r17, r63, r7 add.l r17, r63, r7 addi.l r17, 8, r17 ! beq/u r39, r40, tr1 LOCAL(ia_r8_ld): /* Store r8 and load its address. */ ! movi 3 << 8, r39 ! and r0, r39, r40 ! andc r0, r39, r0 stx.q r17, r63, r8 add.l r17, r63, r8 addi.l r17, 8, r17 ! beq/u r39, r40, tr1 LOCAL(ia_r9_ld): /* Store r9 and load its address. */ stx.q r17, r63, r9 add.l r17, r63, r9 blink tr0, r63 LOCAL(ia_r2_push): /* Push r2 onto the stack. */ ! movi 1, r38 ! shlli r38, 29, r39 ! andc r0, r39, r0 stx.q r17, r63, r2 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r3_push): /* Push r3 onto the stack. */ ! movi 1, r38 ! shlli r38, 26, r39 ! andc r0, r39, r0 stx.q r17, r63, r3 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r4_push): /* Push r4 onto the stack. */ ! movi 1, r38 ! shlli r38, 23, r39 ! andc r0, r39, r0 stx.q r17, r63, r4 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r5_push): /* Push r5 onto the stack. */ ! movi 1, r38 ! shlli r38, 20, r39 ! andc r0, r39, r0 stx.q r17, r63, r5 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r6_push): /* Push r6 onto the stack. */ ! movi 1, r38 ! shlli r38, 16, r39 ! andc r0, r39, r0 stx.q r17, r63, r6 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r7_push): /* Push r7 onto the stack. */ ! movi 1 << 12, r39 ! andc r0, r39, r0 stx.q r17, r63, r7 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_r8_push): /* Push r8 onto the stack. */ ! movi 1 << 8, r39 ! andc r0, r39, r0 stx.q r17, r63, r8 addi.l r17, 8, r17 blink tr1, r63 LOCAL(ia_push_seq): /* Push a sequence of registers onto the stack. */ ! andi r0, 7 << 1, r38 ! movi (LOCAL(ia_end_of_push_seq) >> 16) & 65535, r40 ! shlli r38, 2, r39 ! shori LOCAL(ia_end_of_push_seq) & 65535, r40 ! sub.l r40, r39, r41 ! ptabs/l r41, tr2 blink tr2, r63 LOCAL(ia_stack_of_push_seq): /* Beginning of push sequence. */ stx.q r17, r63, r3 diff -Nrc3pad gcc-3.2.3/gcc/config/sh/linux.h gcc-3.3/gcc/config/sh/linux.h *** gcc-3.2.3/gcc/config/sh/linux.h 2002-04-15 20:27:42.000000000 +0000 --- gcc-3.3/gcc/config/sh/linux.h 2002-06-13 19:23:27.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,79 **** #undef TARGET_VERSION #define TARGET_VERSION fputs (" (SH GNU/Linux with ELF)", stderr); - /* Return to the original ELF way. */ - #undef USER_LABEL_PREFIX - #define USER_LABEL_PREFIX "" - - #undef SIZE_TYPE - #define SIZE_TYPE "unsigned int" - - #undef PTRDIFF_TYPE - #define PTRDIFF_TYPE "int" - - #undef WCHAR_TYPE - #define WCHAR_TYPE "long int" - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE BITS_PER_WORD - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "\ - %{fPIC:-D__PIC__ -D__pic__} \ - %{fpic:-D__PIC__ -D__pic__} \ %{posix:-D_POSIX_SOURCE} \ %{pthread:-D_REENTRANT -D_PTHREADS} \ " ! #undef SUBTARGET_CPP_ENDIAN_SPEC ! #define SUBTARGET_CPP_ENDIAN_SPEC \ ! "%{mb:-D__BIG_ENDIAN__} \ ! %{!mb:-D__LITTLE_ENDIAN__}" ! ! #undef CPP_DEFAULT_CPU_SPEC ! #define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__" ! ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -D__gnu_linux__ -Dlinux -Asystem=posix" ! ! #undef ASM_SPEC ! #define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}" ! ! #undef CC1_SPEC ! #define CC1_SPEC \ ! "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" ! #undef CC1PLUS_SPEC ! #define CC1PLUS_SPEC \ ! "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" ! #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{!mb:-m shlelf_linux} %{mrelax:-relax} \ ! %{shared:-shared} \ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ --- 23,51 ---- #undef TARGET_VERSION #define TARGET_VERSION fputs (" (SH GNU/Linux with ELF)", stderr); #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "\ %{posix:-D_POSIX_SOURCE} \ %{pthread:-D_REENTRANT -D_PTHREADS} \ " ! #define TARGET_OS_CPP_BUILTINS() \ ! do { \ ! builtin_define_std ("unix"); \ ! builtin_define ("__gnu_linux__"); \ ! builtin_define_std ("linux"); \ ! builtin_assert ("system=posix"); \ ! } while (0) ! #undef TARGET_DEFAULT ! #define TARGET_DEFAULT \ ! (TARGET_CPU_DEFAULT | USERMODE_BIT | TARGET_ENDIAN_DEFAULT) ! #undef SUBTARGET_LINK_EMUL_SUFFIX ! #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" ! #undef SUBTARGET_LINK_SPEC ! #define SUBTARGET_LINK_SPEC \ ! "%{shared:-shared} \ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ diff -Nrc3pad gcc-3.2.3/gcc/config/sh/little.h gcc-3.3/gcc/config/sh/little.h *** gcc-3.2.3/gcc/config/sh/little.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/little.h 2002-05-28 22:26:39.000000000 +0000 *************** *** 0 **** --- 1,22 ---- + /* Definition of little endian SH machine for GNU compiler. + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define TARGET_ENDIAN_DEFAULT LITTLE_ENDIAN_BIT diff -Nrc3pad gcc-3.2.3/gcc/config/sh/netbsd-elf.h gcc-3.3/gcc/config/sh/netbsd-elf.h *** gcc-3.2.3/gcc/config/sh/netbsd-elf.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/netbsd-elf.h 2002-08-11 19:24:09.000000000 +0000 *************** *** 0 **** --- 1,127 ---- + /* Definitions for SH running NetBSD using ELF + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Wasabi Systems, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Run-time Target Specification. */ + #if TARGET_ENDIAN_DEFAULT == LITTLE_ENDIAN_BIT + #define TARGET_VERSION_ENDIAN "le" + #else + #define TARGET_VERSION_ENDIAN "" + #endif + + #if TARGET_CPU_DEFAULT & SH5_BIT + #if TARGET_CPU_DEFAULT & SH3E_BIT + #define TARGET_VERSION_CPU "sh5" + #else + #define TARGET_VERSION_CPU "sh64" + #endif /* SH3E_BIT */ + #else + #define TARGET_VERSION_CPU "sh" + #endif /* SH5_BIT */ + + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (NetBSD/%s%s ELF)", \ + TARGET_VERSION_CPU, TARGET_VERSION_ENDIAN) + + + /* Extra specs needed for NetBSD SuperH ELF targets. */ + + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "netbsd_entry_point", NETBSD_ENTRY_POINT }, + + + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + NETBSD_OS_CPP_BUILTINS_ELF(); \ + if (TARGET_SHMEDIA64) \ + NETBSD_OS_CPP_BUILTINS_LP64(); \ + builtin_define ("__NO_LEADING_UNDERSCORES__"); \ + } \ + while (0) + + /* Provide a LINK_SPEC appropriate for a NetBSD/sh ELF target. + We use the SH_LINK_SPEC from sh/sh.h, and define the appropriate + SUBTARGET_LINK_SPEC that pulls in what we need from a generic + NetBSD ELF LINK_SPEC. */ + + /* LINK_EMUL_PREFIX from sh/elf.h */ + + #undef LINK_DEFAULT_CPU_EMUL + #if TARGET_CPU_DEFAULT & SH5_BIT + #if TARGET_CPU_DEFAULT & SH3E_BIT + #define LINK_DEFAULT_CPU_EMUL "32" + #else + #define LINK_DEFAULT_CPU_EMUL "64" + #endif /* SH3E_BIT */ + #else + #define LINK_DEFAULT_CPU_EMUL "" + #endif /* SH5_BIT */ + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_nbsd" + + #undef SUBTARGET_LINK_SPEC + #define SUBTARGET_LINK_SPEC NETBSD_LINK_SPEC_ELF + + #undef LINK_SPEC + #define LINK_SPEC SH_LINK_SPEC + + #define NETBSD_ENTRY_POINT "__start" + + /* Provide a CPP_SPEC appropriate for NetBSD. */ + #undef SUBTARGET_CPP_SPEC + #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT \ + (TARGET_CPU_DEFAULT | USERMODE_BIT | TARGET_ENDIAN_DEFAULT) + + + #undef FUNCTION_PROFILER + #define FUNCTION_PROFILER(STREAM,LABELNO) \ + do \ + { \ + if (TARGET_SHMEDIA32) \ + { \ + /* FIXME */ \ + abort (); \ + } \ + else if (TARGET_SHMEDIA64) \ + { \ + /* FIXME */ \ + abort (); \ + } \ + else \ + { \ + fprintf((STREAM), "\tmov.l\t%sLP%d,r1\n", \ + LOCAL_LABEL_PREFIX, (LABELNO)); \ + fprintf((STREAM), "\tmova\t%sLP%dr,r0\n", \ + LOCAL_LABEL_PREFIX, (LABELNO)); \ + fprintf((STREAM), "\tjmp\t@r1\n"); \ + fprintf((STREAM), "\tnop\n"); \ + fprintf((STREAM), "\t.align\t2\n"); \ + fprintf((STREAM), "%sLP%d:\t.long\t__mcount\n", \ + LOCAL_LABEL_PREFIX, (LABELNO)); \ + fprintf((STREAM), "%sLP%dr:\n", LOCAL_LABEL_PREFIX, (LABELNO)); \ + } \ + } \ + while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/sh/sh64.h gcc-3.3/gcc/config/sh/sh64.h *** gcc-3.2.3/gcc/config/sh/sh64.h 2002-02-21 16:42:28.000000000 +0000 --- gcc-3.3/gcc/config/sh/sh64.h 2002-05-28 22:26:43.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler for SuperH SH 5. ! Copyright 2000, 2001 Free Software Foundation, Inc. Contributed by Alexandre Oliva This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler for SuperH SH 5. ! Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Oliva This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 23,65 **** #define TARGET_VERSION \ fputs (" (SuperH SH)", stderr); - #undef CPP_DEFAULT_CPU_SPEC - #define CPP_DEFAULT_CPU_SPEC "-D__SH5__=32 -D__SHMEDIA__" - - #undef SUBTARGET_CPP_PTR_SPEC - #define SUBTARGET_CPP_PTR_SPEC "\ - %{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:%{!m4-nofpu:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}} \ - %{m1|m2|m3|m3e|m4|m4-single|m4-single-only|m4-nofpu:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - " - #undef ASM_SPEC ! #define ASM_SPEC "%{ml:-little} %{mrelax:-relax} \ ! %{m5-compact:--isa=SHcompact} %{m5-compact-nofpu:--isa=shcompact} \ ! %{m5-32media:--isa=SHmedia --abi=32} %{m5-32media-nofpu:--isa=SHmedia --abi=32} \ ! %{m5-64media:--isa=SHmedia --abi=64} %{m5-64media-nofpu:--isa=SHmedia --abi=64} \ ! %{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:%{!m4-nofpu:%{!m5-64media:%{!m5-64media-nofpu:%{!m5-32media:%{!m5-32media-nofpu:%{!m5-compact:%{!m5-compact-nofpu:--isa=SHmedia --abi=32}}}}}}}}}}}}}} \ " ! #undef LINK_SPEC ! #define LINK_SPEC " \ ! %{m5-compact:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-compact-nofpu:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-32media:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-32media-nofpu:%{!ml:-m shelf32} %{ml:-m shlelf32}} \ ! %{m5-64media:%{!ml:-m shelf64} %{ml:-m shlelf64}} \ ! %{m5-64media-nofpu:%{!ml:-m shelf64} %{ml:-m shlelf64}} \ ! %{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:%{!m4-nofpu:%{!m5-64media:%{!m5-64media-nofpu:%{!m5-32media:%{!m5-32media-nofpu:%{!m5-compact:%{!m5-compact-nofpu:%{!ml:-m shelf32} %{ml:-m shlelf32}}}}}}}}}}}}}}} \ ! %{mrelax:-relax}" #undef TARGET_DEFAULT ! #define TARGET_DEFAULT (SH5_BIT|SH4_BIT|SH3E_BIT) ! ! /* These have been overridden in svr4.h, included in elf.h. Restore ! them. */ ! #undef WCHAR_TYPE ! #define WCHAR_TYPE "short unsigned int" ! ! #undef WCHAR_TYPE_SIZE ! #define WCHAR_TYPE_SIZE 16 ! #undef MAX_WCHAR_TYPE_SIZE --- 23,41 ---- #define TARGET_VERSION \ fputs (" (SuperH SH)", stderr); #undef ASM_SPEC ! #define ASM_SPEC "%(subtarget_asm_endian_spec) %{mrelax:-relax} \ ! %{m5-compact*:--isa=SHcompact} \ ! %{m5-32media*:--isa=SHmedia --abi=32} \ ! %{m5-64media*:--isa=SHmedia --abi=64} \ ! %{!m1:%{!m2:%{!m3*:%{!m4*:%{!m5*:--isa=SHmedia --abi=32}}}}} \ " ! #undef LINK_DEFAULT_CPU_EMUL ! #define LINK_DEFAULT_CPU_EMUL "32" #undef TARGET_DEFAULT ! #define TARGET_DEFAULT (SH5_BIT|SH4_BIT|SH3E_BIT|TARGET_ENDIAN_DEFAULT) ! #undef SH_ELF_WCHAR_TYPE ! #define SH_ELF_WCHAR_TYPE "int" diff -Nrc3pad gcc-3.2.3/gcc/config/sh/sh.c gcc-3.3/gcc/config/sh/sh.c *** gcc-3.2.3/gcc/config/sh/sh.c 2002-02-21 16:42:28.000000000 +0000 --- gcc-3.3/gcc/config/sh/sh.c 2003-05-09 04:26:10.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 41,46 **** --- 41,48 ---- #include "tm_p.h" #include "target.h" #include "target-def.h" + #include "real.h" + #include "langhooks.h" int code_for_indirect_jump_scratch = CODE_FOR_indirect_jump_scratch; *************** char sh_additional_register_names[ADDREG *** 152,167 **** = SH_ADDITIONAL_REGISTER_NAMES_INITIALIZER; /* Provide reg_class from a letter such as appears in the machine ! description. */ ! const enum reg_class reg_class_from_letter[] = { ! /* a */ ALL_REGS, /* b */ TARGET_REGS, /* c */ FPSCR_REGS, /* d */ DF_REGS, ! /* e */ NO_REGS, /* f */ FP_REGS, /* g */ NO_REGS, /* h */ NO_REGS, ! /* i */ NO_REGS, /* j */ NO_REGS, /* k */ SIBCALL_REGS, /* l */ PR_REGS, ! /* m */ NO_REGS, /* n */ NO_REGS, /* o */ NO_REGS, /* p */ NO_REGS, ! /* q */ NO_REGS, /* r */ NO_REGS, /* s */ NO_REGS, /* t */ T_REGS, ! /* u */ NO_REGS, /* v */ NO_REGS, /* w */ FP0_REGS, /* x */ MAC_REGS, /* y */ FPUL_REGS, /* z */ R0_REGS }; --- 154,170 ---- = SH_ADDITIONAL_REGISTER_NAMES_INITIALIZER; /* Provide reg_class from a letter such as appears in the machine ! description. *: target independently reserved letter. ! reg_class_from_letter['e'] is set to NO_REGS for TARGET_FMOVD. */ ! enum reg_class reg_class_from_letter[] = { ! /* a */ ALL_REGS, /* b */ TARGET_REGS, /* c */ FPSCR_REGS, /* d */ DF_REGS, ! /* e */ FP_REGS, /* f */ FP_REGS, /* g **/ NO_REGS, /* h */ NO_REGS, ! /* i **/ NO_REGS, /* j */ NO_REGS, /* k */ SIBCALL_REGS, /* l */ PR_REGS, ! /* m **/ NO_REGS, /* n **/ NO_REGS, /* o **/ NO_REGS, /* p **/ NO_REGS, ! /* q */ NO_REGS, /* r **/ NO_REGS, /* s **/ NO_REGS, /* t */ T_REGS, ! /* u */ NO_REGS, /* v */ NO_REGS, /* w */ FP0_REGS, /* x */ MAC_REGS, /* y */ FPUL_REGS, /* z */ R0_REGS }; *************** static int mova_p PARAMS ((rtx)); *** 179,186 **** static rtx find_barrier PARAMS ((int, rtx, rtx)); static int noncall_uses_reg PARAMS ((rtx, rtx, rtx *)); static rtx gen_block_redirect PARAMS ((rtx, int, int)); ! static void output_stack_adjust PARAMS ((int, rtx, int)); ! static void push PARAMS ((int)); static void pop PARAMS ((int)); static void push_regs PARAMS ((HOST_WIDE_INT *)); static void calc_live_regs PARAMS ((int *, HOST_WIDE_INT *)); --- 182,190 ---- static rtx find_barrier PARAMS ((int, rtx, rtx)); static int noncall_uses_reg PARAMS ((rtx, rtx, rtx *)); static rtx gen_block_redirect PARAMS ((rtx, int, int)); ! static void output_stack_adjust PARAMS ((int, rtx, int, rtx (*) (rtx))); ! static rtx frame_insn PARAMS ((rtx)); ! static rtx push PARAMS ((int)); static void pop PARAMS ((int)); static void push_regs PARAMS ((HOST_WIDE_INT *)); static void calc_live_regs PARAMS ((int *, HOST_WIDE_INT *)); *************** static tree sh_handle_sp_switch_attribut *** 193,205 **** static tree sh_handle_trap_exit_attribute PARAMS ((tree *, tree, tree, int, bool *)); static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void sh_insert_attributes PARAMS ((tree, tree *)); - #ifndef OBJECT_FORMAT_ELF - static void sh_asm_named_section PARAMS ((const char *, unsigned int)); - #endif static int sh_adjust_cost PARAMS ((rtx, rtx, rtx, int)); ! static bool sh_cannot_modify_jumps_p PARAMS ((void)); static bool sh_ms_bitfield_layout_p PARAMS ((tree)); /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE --- 197,217 ---- static tree sh_handle_trap_exit_attribute PARAMS ((tree *, tree, tree, int, bool *)); static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void sh_insert_attributes PARAMS ((tree, tree *)); static int sh_adjust_cost PARAMS ((rtx, rtx, rtx, int)); ! static int sh_use_dfa_interface PARAMS ((void)); ! static int sh_issue_rate PARAMS ((void)); + static bool sh_cannot_modify_jumps_p PARAMS ((void)); static bool sh_ms_bitfield_layout_p PARAMS ((tree)); + + static void sh_encode_section_info PARAMS ((tree, int)); + static const char *sh_strip_name_encoding PARAMS ((const char *)); + static void sh_init_builtins PARAMS ((void)); + static void sh_media_init_builtins PARAMS ((void)); + static rtx sh_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); + static int flow_dependent_p PARAMS ((rtx, rtx)); + static void flow_dependent_p_1 PARAMS ((rtx, rtx, void *)); + /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE *************** static bool sh_ms_bitfield_layout_p PARA *** 226,237 **** --- 238,265 ---- #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST sh_adjust_cost + #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE + #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \ + sh_use_dfa_interface + #undef TARGET_SCHED_ISSUE_RATE + #define TARGET_SCHED_ISSUE_RATE sh_issue_rate + #undef TARGET_CANNOT_MODIFY_JUMPS_P #define TARGET_CANNOT_MODIFY_JUMPS_P sh_cannot_modify_jumps_p #undef TARGET_MS_BITFIELD_LAYOUT_P #define TARGET_MS_BITFIELD_LAYOUT_P sh_ms_bitfield_layout_p + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO sh_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING sh_strip_name_encoding + + #undef TARGET_INIT_BUILTINS + #define TARGET_INIT_BUILTINS sh_init_builtins + #undef TARGET_EXPAND_BUILTIN + #define TARGET_EXPAND_BUILTIN sh_expand_builtin + struct gcc_target targetm = TARGET_INITIALIZER; /* Print the operand address in x to the stream. */ *************** print_operand_address (stream, x) *** 300,310 **** --- 328,340 ---- ',' print LOCAL_LABEL_PREFIX '@' print trap, rte or rts depending upon pragma interruptness '#' output a nop if there is nothing to put in the delay slot + ''' print likelyhood suffix (/u for unlikely). 'O' print a constant without the # 'R' print the LSW of a dp value - changes if in little endian 'S' print the MSW of a dp value - changes if in little endian 'T' print the next word of a dp value - same as 'R' in big endian mode. 'M' print an `x' if `m' will print `base,index'. + 'N' print 'r63' if the operand is (const_int 0). 'm' print a pair `base,offset' or `base,index', for LD and ST. 'u' prints the lowest 16 bits of CONST_INT, as an unsigned value. 'o' output an operator. */ *************** print_operand (stream, x, code) *** 319,355 **** { case '.': if (final_sequence ! && ! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0))) fprintf (stream, ASSEMBLER_DIALECT ? "/s" : ".s"); break; case ',': fprintf (stream, "%s", LOCAL_LABEL_PREFIX); break; case '@': - { - int interrupt_handler; - - if ((lookup_attribute - ("interrupt_handler", - DECL_ATTRIBUTES (current_function_decl))) - != NULL_TREE) - interrupt_handler = 1; - else - interrupt_handler = 0; - if (trap_exit) fprintf (stream, "trapa #%d", trap_exit); ! else if (interrupt_handler) fprintf (stream, "rte"); else fprintf (stream, "rts"); break; - } case '#': /* Output a nop if there's nothing in the delay slot. */ if (dbr_sequence_length () == 0) fprintf (stream, "\n\tnop"); break; case 'O': x = mark_constant_pool_use (x); output_addr_const (stream, x); --- 349,382 ---- { case '.': if (final_sequence ! && ! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0)) ! && get_attr_length (XVECEXP (final_sequence, 0, 1))) fprintf (stream, ASSEMBLER_DIALECT ? "/s" : ".s"); break; case ',': fprintf (stream, "%s", LOCAL_LABEL_PREFIX); break; case '@': if (trap_exit) fprintf (stream, "trapa #%d", trap_exit); ! else if (sh_cfun_interrupt_handler_p ()) fprintf (stream, "rte"); else fprintf (stream, "rts"); break; case '#': /* Output a nop if there's nothing in the delay slot. */ if (dbr_sequence_length () == 0) fprintf (stream, "\n\tnop"); break; + case '\'': + { + rtx note = find_reg_note (current_output_insn, REG_BR_PROB, 0); + + if (note && INTVAL (XEXP (note, 0)) * 2 < REG_BR_PROB_BASE) + fputs ("/u", stream); + break; + } case 'O': x = mark_constant_pool_use (x); output_addr_const (stream, x); *************** print_operand (stream, x, code) *** 384,389 **** --- 411,422 ---- case MINUS: fputs ("sub", stream); break; case MULT: fputs ("mul", stream); break; case DIV: fputs ("div", stream); break; + case EQ: fputs ("eq", stream); break; + case NE: fputs ("ne", stream); break; + case GT: case LT: fputs ("gt", stream); break; + case GE: case LE: fputs ("ge", stream); break; + case GTU: case LTU: fputs ("gtu", stream); break; + case GEU: case LEU: fputs ("geu", stream); break; default: break; } *************** print_operand (stream, x, code) *** 419,432 **** } break; case 'u': if (GET_CODE (x) == CONST_INT) ! { fprintf ((stream), "%u", (unsigned) INTVAL (x) & (0x10000 - 1)); break; } /* Fall through. */ default: switch (GET_CODE (x)) { --- 452,473 ---- } break; + case 'N': + if (x == CONST0_RTX (GET_MODE (x))) + { + fprintf ((stream), "r63"); + break; + } + goto default_output; case 'u': if (GET_CODE (x) == CONST_INT) ! { fprintf ((stream), "%u", (unsigned) INTVAL (x) & (0x10000 - 1)); break; } /* Fall through. */ + default_output: default: switch (GET_CODE (x)) { *************** prepare_move_operands (operands, mode) *** 654,660 **** { if (GET_CODE (operands[0]) == MEM) operands[1] = force_reg (Pmode, operands[1]); ! else if (GET_CODE (operands[1]) == LABEL_REF && target_reg_operand (operands[0], mode)) /* It's ok. */; else --- 695,702 ---- { if (GET_CODE (operands[0]) == MEM) operands[1] = force_reg (Pmode, operands[1]); ! else if (TARGET_SHMEDIA ! && GET_CODE (operands[1]) == LABEL_REF && target_reg_operand (operands[0], mode)) /* It's ok. */; else *************** prepare_move_operands (operands, mode) *** 682,688 **** { /* Copy the source to a register if both operands aren't registers. */ if (! register_operand (operands[0], mode) ! && ! register_operand (operands[1], mode)) operands[1] = copy_to_mode_reg (mode, operands[1]); /* This case can happen while generating code to move the result --- 724,730 ---- { /* Copy the source to a register if both operands aren't registers. */ if (! register_operand (operands[0], mode) ! && ! sh_register_operand (operands[1], mode)) operands[1] = copy_to_mode_reg (mode, operands[1]); /* This case can happen while generating code to move the result *************** output_far_jump (insn, op) *** 911,916 **** --- 953,959 ---- const char *jump; int far; int offset = branch_dest (insn) - INSN_ADDRESSES (INSN_UID (insn)); + rtx prev; this.lab = gen_label_rtx (); *************** output_far_jump (insn, op) *** 935,944 **** jump = "mov.l %O0,%1; jmp @%1"; } /* If we have a scratch register available, use it. */ ! if (GET_CODE (PREV_INSN (insn)) == INSN ! && INSN_CODE (PREV_INSN (insn)) == CODE_FOR_indirect_jump_scratch) { ! this.reg = SET_DEST (PATTERN (PREV_INSN (insn))); if (REGNO (this.reg) == R0_REG && flag_pic && ! TARGET_SH2) jump = "mov.l r1,@-r15; mova %O0,r0; mov.l @r0,r1; add r1,r0; mov.l @r15+,r1; jmp @%1"; output_asm_insn (jump, &this.lab); --- 978,987 ---- jump = "mov.l %O0,%1; jmp @%1"; } /* If we have a scratch register available, use it. */ ! if (GET_CODE ((prev = prev_nonnote_insn (insn))) == INSN ! && INSN_CODE (prev) == CODE_FOR_indirect_jump_scratch) { ! this.reg = SET_DEST (XVECEXP (PATTERN (prev), 0, 0)); if (REGNO (this.reg) == R0_REG && flag_pic && ! TARGET_SH2) jump = "mov.l r1,@-r15; mova %O0,r0; mov.l @r0,r1; add r1,r0; mov.l @r15+,r1; jmp @%1"; output_asm_insn (jump, &this.lab); *************** static const char shift_insns[] = *** 1136,1142 **** One bit right shifts clobber the T bit, so when possible, put one bit shifts in the middle of the sequence, so the ends are eligible for branch delay slots. */ ! static short shift_amounts[32][5] = { {0}, {1}, {2}, {2, 1}, {2, 2}, {2, 1, 2}, {2, 2, 2}, {2, 2, 1, 2}, {8}, {8, 1}, {8, 2}, {8, 1, 2}, --- 1179,1185 ---- One bit right shifts clobber the T bit, so when possible, put one bit shifts in the middle of the sequence, so the ends are eligible for branch delay slots. */ ! static const short shift_amounts[32][5] = { {0}, {1}, {2}, {2, 1}, {2, 2}, {2, 1, 2}, {2, 2, 2}, {2, 2, 1, 2}, {8}, {8, 1}, {8, 2}, {8, 1, 2}, *************** typedef struct *** 2203,2208 **** --- 2246,2255 ---- rtx label; /* Label of value. */ rtx wend; /* End of window. */ enum machine_mode mode; /* Mode of value. */ + + /* True if this constant is accessed as part of a post-increment + sequence. Note that HImode constants are never accessed in this way. */ + bool part_of_sequence_p; } pool_node; /* The maximum number of constants that can fit into one pool, since *************** add_constant (x, mode, last_value) *** 2276,2287 **** /* Need a new one. */ pool_vector[pool_size].value = x; if (last_value && rtx_equal_p (last_value, pool_vector[pool_size - 1].value)) ! lab = 0; else lab = gen_label_rtx (); pool_vector[pool_size].mode = mode; pool_vector[pool_size].label = lab; pool_vector[pool_size].wend = NULL_RTX; if (lab && pool_window_label) { newref = gen_rtx_LABEL_REF (VOIDmode, pool_window_label); --- 2323,2338 ---- /* Need a new one. */ pool_vector[pool_size].value = x; if (last_value && rtx_equal_p (last_value, pool_vector[pool_size - 1].value)) ! { ! lab = 0; ! pool_vector[pool_size - 1].part_of_sequence_p = true; ! } else lab = gen_label_rtx (); pool_vector[pool_size].mode = mode; pool_vector[pool_size].label = lab; pool_vector[pool_size].wend = NULL_RTX; + pool_vector[pool_size].part_of_sequence_p = (lab == 0); if (lab && pool_window_label) { newref = gen_rtx_LABEL_REF (VOIDmode, pool_window_label); *************** dump_table (scan) *** 2305,2311 **** int i; int need_align = 1; rtx lab, ref; ! int have_di = 0; /* Do two passes, first time dump out the HI sized constants. */ --- 2356,2362 ---- int i; int need_align = 1; rtx lab, ref; ! int have_df = 0; /* Do two passes, first time dump out the HI sized constants. */ *************** dump_table (scan) *** 2330,2342 **** scan = emit_insn_after (gen_consttable_window_end (lab), scan); } } ! else if (p->mode == DImode || p->mode == DFmode) ! have_di = 1; } need_align = 1; ! if (TARGET_SHCOMPACT && have_di) { rtx align_insn = NULL_RTX; --- 2381,2393 ---- scan = emit_insn_after (gen_consttable_window_end (lab), scan); } } ! else if (p->mode == DFmode) ! have_df = 1; } need_align = 1; ! if (TARGET_FMOVD && TARGET_ALIGN_DOUBLE && have_df) { rtx align_insn = NULL_RTX; *************** dump_table (scan) *** 2354,2360 **** break; case SImode: case SFmode: ! if (align_insn) { for (lab = p->label; lab; lab = LABEL_REFS (lab)) emit_label_before (lab, align_insn); --- 2405,2411 ---- break; case SImode: case SFmode: ! if (align_insn && !p->part_of_sequence_p) { for (lab = p->label; lab; lab = LABEL_REFS (lab)) emit_label_before (lab, align_insn); *************** dump_table (scan) *** 2380,2392 **** } break; case DFmode: - case DImode: if (need_align) { scan = emit_insn_after (gen_align_log (GEN_INT (3)), scan); align_insn = scan; need_align = 0; } for (lab = p->label; lab; lab = LABEL_REFS (lab)) scan = emit_label_after (lab, scan); scan = emit_insn_after (gen_consttable_8 (p->value, const0_rtx), --- 2431,2443 ---- } break; case DFmode: if (need_align) { scan = emit_insn_after (gen_align_log (GEN_INT (3)), scan); align_insn = scan; need_align = 0; } + case DImode: for (lab = p->label; lab; lab = LABEL_REFS (lab)) scan = emit_label_after (lab, scan); scan = emit_insn_after (gen_consttable_8 (p->value, const0_rtx), *************** dump_table (scan) *** 2467,2473 **** pool_window_last = 0; } ! /* Return non-zero if constant would be an ok source for a mov.w instead of a mov.l. */ static int --- 2518,2524 ---- pool_window_last = 0; } ! /* Return nonzero if constant would be an ok source for a mov.w instead of a mov.l. */ static int *************** hi_const (src) *** 2479,2485 **** && INTVAL (src) <= 32767); } ! /* Non-zero if the insn is a move instruction which needs to be fixed. */ /* ??? For a DImode/DFmode moves, we don't need to fix it if each half of the CONST_DOUBLE input value is CONST_OK_FOR_I. For a SFmode move, we don't --- 2530,2536 ---- && INTVAL (src) <= 32767); } ! /* Nonzero if the insn is a move instruction which needs to be fixed. */ /* ??? For a DImode/DFmode moves, we don't need to fix it if each half of the CONST_DOUBLE input value is CONST_OK_FOR_I. For a SFmode move, we don't *************** broken_move (insn) *** 2507,2515 **** && GET_CODE (SET_SRC (pat)) == CONST_DOUBLE && (fp_zero_operand (SET_SRC (pat)) || fp_one_operand (SET_SRC (pat))) ! /* ??? If this is a -m4 or -m4-single compilation, we don't ! know the current setting of fpscr, so disable fldi. */ ! && (! TARGET_SH4 || TARGET_FMOVD) && GET_CODE (SET_DEST (pat)) == REG && FP_REGISTER_P (REGNO (SET_DEST (pat)))) && (GET_CODE (SET_SRC (pat)) != CONST_INT --- 2558,2573 ---- && GET_CODE (SET_SRC (pat)) == CONST_DOUBLE && (fp_zero_operand (SET_SRC (pat)) || fp_one_operand (SET_SRC (pat))) ! /* ??? If this is a -m4 or -m4-single compilation, in general ! we don't know the current setting of fpscr, so disable fldi. ! There is an exception if this was a register-register move ! before reload - and hence it was ascertained that we have ! single precision setting - and in a post-reload optimization ! we changed this to do a constant load. In that case ! we don't have an r0 clobber, hence we must use fldi. */ ! && (! TARGET_SH4 || TARGET_FMOVD ! || (GET_CODE (XEXP (XVECEXP (PATTERN (insn), 0, 2), 0)) ! == SCRATCH)) && GET_CODE (SET_DEST (pat)) == REG && FP_REGISTER_P (REGNO (SET_DEST (pat)))) && (GET_CODE (SET_SRC (pat)) != CONST_INT *************** find_barrier (num_mova, mova, from) *** 2671,2677 **** { if (num_mova) num_mova--; ! if (barrier_align (next_real_insn (from)) == CACHE_LOG) { /* We have just passed the barrier in front of the ADDR_DIFF_VEC, which is stored in found_barrier. Since --- 2729,2735 ---- { if (num_mova) num_mova--; ! if (barrier_align (next_real_insn (from)) == align_jumps_log) { /* We have just passed the barrier in front of the ADDR_DIFF_VEC, which is stored in found_barrier. Since *************** gen_block_redirect (jump, addr, need_blo *** 3085,3091 **** rtx next = next_active_insn (next_active_insn (dest)); if (next && GET_CODE (next) == JUMP_INSN && GET_CODE (PATTERN (next)) == SET ! && recog_memoized (next) == CODE_FOR_jump) { dest = JUMP_LABEL (next); if (dest --- 3143,3149 ---- rtx next = next_active_insn (next_active_insn (dest)); if (next && GET_CODE (next) == JUMP_INSN && GET_CODE (PATTERN (next)) == SET ! && recog_memoized (next) == CODE_FOR_jump_compact) { dest = JUMP_LABEL (next); if (dest *************** gen_block_redirect (jump, addr, need_blo *** 3109,3114 **** --- 3167,3179 ---- rtx insn = emit_insn_before (gen_indirect_jump_scratch (reg, GEN_INT (INSN_UID (JUMP_LABEL (jump)))) , jump); + /* ??? We would like this to have the scope of the jump, but that + scope will change when a delay slot insn of an inner scope is added. + Hence, after delay slot scheduling, we'll have to expect + NOTE_INSN_BLOCK_END notes between the indirect_jump_scratch and + the jump. */ + + INSN_SCOPE (insn) = INSN_SCOPE (jump); INSN_CODE (insn) = CODE_FOR_indirect_jump_scratch; return insn; } *************** gen_far_branch (bp) *** 3168,3173 **** --- 3233,3243 ---- JUMP_LABEL (jump) = bp->far_label; if (! invert_jump (insn, label, 1)) abort (); + (emit_insn_after + (gen_stuff_delay_slot + (GEN_INT (INSN_UID (XEXP (SET_SRC (PATTERN (jump)), 0))), + GEN_INT (recog_memoized (insn) == CODE_FOR_branch_false)), + insn)); /* Prevent reorg from undoing our splits. */ gen_block_redirect (jump, bp->address += 2, 2); } *************** barrier_align (barrier_or_label) *** 3244,3259 **** /* If this is a very small table, we want to keep the alignment after the table to the minimum for proper code alignment. */ return ((TARGET_SMALLCODE ! || (XVECLEN (pat, 1) * GET_MODE_SIZE (GET_MODE (pat)) <= (unsigned)1 << (CACHE_LOG - 2))) ! ? 1 << TARGET_SHMEDIA : CACHE_LOG); } if (TARGET_SMALLCODE) return 0; if (! TARGET_SH2 || ! optimize) ! return CACHE_LOG; /* When fixing up pcloads, a constant table might be inserted just before the basic block that ends with the barrier. Thus, we can't trust the --- 3314,3329 ---- /* If this is a very small table, we want to keep the alignment after the table to the minimum for proper code alignment. */ return ((TARGET_SMALLCODE ! || ((unsigned) XVECLEN (pat, 1) * GET_MODE_SIZE (GET_MODE (pat)) <= (unsigned)1 << (CACHE_LOG - 2))) ! ? 1 << TARGET_SHMEDIA : align_jumps_log); } if (TARGET_SMALLCODE) return 0; if (! TARGET_SH2 || ! optimize) ! return align_jumps_log; /* When fixing up pcloads, a constant table might be inserted just before the basic block that ends with the barrier. Thus, we can't trust the *************** barrier_align (barrier_or_label) *** 3318,3324 **** || (x = (NEXT_INSN (NEXT_INSN (PREV_INSN (prev)))), (INSN_P (x) && (INSN_CODE (x) == CODE_FOR_block_branch_redirect ! || INSN_CODE (x) == CODE_FOR_indirect_jump_scratch)))) { rtx pat = PATTERN (prev); if (GET_CODE (pat) == PARALLEL) --- 3388,3395 ---- || (x = (NEXT_INSN (NEXT_INSN (PREV_INSN (prev)))), (INSN_P (x) && (INSN_CODE (x) == CODE_FOR_block_branch_redirect ! || INSN_CODE (x) == CODE_FOR_indirect_jump_scratch ! || INSN_CODE (x) == CODE_FOR_stuff_delay_slot)))) { rtx pat = PATTERN (prev); if (GET_CODE (pat) == PARALLEL) *************** barrier_align (barrier_or_label) *** 3329,3335 **** } } ! return CACHE_LOG; } /* If we are inside a phony loop, almost any kind of label can turn up as the --- 3400,3406 ---- } } ! return align_jumps_log; } /* If we are inside a phony loop, almost any kind of label can turn up as the *************** sh_loop_align (label) *** 3354,3363 **** || recog_memoized (next) == CODE_FOR_consttable_2) return 0; ! if (TARGET_SH5) ! return 3; ! ! return 2; } /* Exported to toplev.c. --- 3425,3431 ---- || recog_memoized (next) == CODE_FOR_consttable_2) return 0; ! return align_loops_log; } /* Exported to toplev.c. *************** machine_dependent_reorg (first) *** 3665,3671 **** behind. */ rtx barrier = find_barrier (num_mova, mova, insn); rtx last_float_move, last_float = 0, *last_float_addr; - int may_need_align = 1; if (num_mova && ! mova_p (mova)) { --- 3733,3738 ---- *************** machine_dependent_reorg (first) *** 3723,3749 **** if (last_float && reg_set_between_p (r0_rtx, last_float_move, scan)) last_float = 0; ! if (TARGET_SHCOMPACT) ! { ! /* The first SFmode constant after a DFmode ! constant may be pulled before a sequence ! of DFmode constants, so the second SFmode ! needs a label, just in case. */ ! if (GET_MODE_SIZE (mode) == 4) ! { ! if (last_float && may_need_align) ! last_float = 0; ! may_need_align = 0; ! } ! if (last_float ! && (GET_MODE_SIZE (GET_MODE (last_float)) ! != GET_MODE_SIZE (mode))) ! { ! last_float = 0; ! if (GET_MODE_SIZE (mode) == 4) ! may_need_align = 1; ! } ! } lab = add_constant (src, mode, last_float); if (lab) emit_insn_before (gen_mova (lab), scan); --- 3790,3800 ---- if (last_float && reg_set_between_p (r0_rtx, last_float_move, scan)) last_float = 0; ! if (last_float ! && TARGET_SHCOMPACT ! && GET_MODE_SIZE (mode) != 4 ! && GET_MODE_SIZE (GET_MODE (last_float)) == 4) ! last_float = 0; lab = add_constant (src, mode, last_float); if (lab) emit_insn_before (gen_mova (lab), scan); *************** machine_dependent_reorg (first) *** 3775,3780 **** --- 3826,3832 ---- /* Remove the clobber of r0. */ XEXP (clobber, 0) = gen_rtx_SCRATCH (Pmode); + RTX_UNCHANGING_P (newsrc) = 1; } /* This is a mova needing a label. Create it. */ else if (GET_CODE (src) == UNSPEC *************** machine_dependent_reorg (first) *** 3783,3789 **** { lab = add_constant (XVECEXP (src, 0, 0), mode, 0); newsrc = gen_rtx_LABEL_REF (VOIDmode, lab); ! newsrc = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, newsrc), UNSPEC_MOVA); } --- 3835,3841 ---- { lab = add_constant (XVECEXP (src, 0, 0), mode, 0); newsrc = gen_rtx_LABEL_REF (VOIDmode, lab); ! newsrc = gen_rtx_UNSPEC (SImode, gen_rtvec (1, newsrc), UNSPEC_MOVA); } *************** machine_dependent_reorg (first) *** 3792,3799 **** lab = add_constant (src, mode, 0); newsrc = gen_rtx_MEM (mode, gen_rtx_LABEL_REF (VOIDmode, lab)); } - RTX_UNCHANGING_P (newsrc) = 1; *patp = gen_rtx_SET (VOIDmode, dst, newsrc); INSN_CODE (scan) = -1; } --- 3844,3851 ---- lab = add_constant (src, mode, 0); newsrc = gen_rtx_MEM (mode, gen_rtx_LABEL_REF (VOIDmode, lab)); + RTX_UNCHANGING_P (newsrc) = 1; } *patp = gen_rtx_SET (VOIDmode, dst, newsrc); INSN_CODE (scan) = -1; } *************** machine_dependent_reorg (first) *** 3808,3814 **** split_branches (first); /* The INSN_REFERENCES_ARE_DELAYED in sh.h is problematic because it ! also has an effect on the register that holds the addres of the sfunc. Insert an extra dummy insn in front of each sfunc that pretends to use this register. */ if (flag_delayed_branch) --- 3860,3866 ---- split_branches (first); /* The INSN_REFERENCES_ARE_DELAYED in sh.h is problematic because it ! also has an effect on the register that holds the address of the sfunc. Insert an extra dummy insn in front of each sfunc that pretends to use this register. */ if (flag_delayed_branch) *************** split_branches (first) *** 3981,3987 **** || ((beyond = next_active_insn (beyond)) && GET_CODE (beyond) == JUMP_INSN)) && GET_CODE (PATTERN (beyond)) == SET ! && recog_memoized (beyond) == CODE_FOR_jump && ((INSN_ADDRESSES (INSN_UID (XEXP (SET_SRC (PATTERN (beyond)), 0))) - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252) --- 4033,4039 ---- || ((beyond = next_active_insn (beyond)) && GET_CODE (beyond) == JUMP_INSN)) && GET_CODE (PATTERN (beyond)) == SET ! && recog_memoized (beyond) == CODE_FOR_jump_compact && ((INSN_ADDRESSES (INSN_UID (XEXP (SET_SRC (PATTERN (beyond)), 0))) - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252) *************** split_branches (first) *** 3995,4001 **** if ((GET_CODE (next) == JUMP_INSN || GET_CODE (next = next_active_insn (next)) == JUMP_INSN) && GET_CODE (PATTERN (next)) == SET ! && recog_memoized (next) == CODE_FOR_jump && ((INSN_ADDRESSES (INSN_UID (XEXP (SET_SRC (PATTERN (next)), 0))) - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252) --- 4047,4053 ---- if ((GET_CODE (next) == JUMP_INSN || GET_CODE (next = next_active_insn (next)) == JUMP_INSN) && GET_CODE (PATTERN (next)) == SET ! && recog_memoized (next) == CODE_FOR_jump_compact && ((INSN_ADDRESSES (INSN_UID (XEXP (SET_SRC (PATTERN (next)), 0))) - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252) *************** split_branches (first) *** 4084,4092 **** If relaxing, output the label and pseudo-ops used to link together calls and the instruction which set the registers. */ - /* ??? This is unnecessary, and probably should be deleted. This makes - the insn_addresses declaration above unnecessary. */ - /* ??? The addresses printed by this routine for insns are nonsense for insns which are inside of a sequence where none of the inner insns have variable length. This is because the second pass of shorten_branches --- 4136,4141 ---- *************** static int extra_push; *** 4182,4191 **** of a general register that we may clobber. */ static void ! output_stack_adjust (size, reg, temp) int size; rtx reg; int temp; { if (size) { --- 4231,4241 ---- of a general register that we may clobber. */ static void ! output_stack_adjust (size, reg, temp, emit_fn) int size; rtx reg; int temp; + rtx (*emit_fn) PARAMS ((rtx)); { if (size) { *************** output_stack_adjust (size, reg, temp) *** 4195,4213 **** abort (); if (CONST_OK_FOR_ADD (size)) ! emit_insn (GEN_ADD3 (reg, reg, GEN_INT (size))); /* Try to do it with two partial adjustments; however, we must make sure that the stack is properly aligned at all times, in case an interrupt occurs between the two partial adjustments. */ else if (CONST_OK_FOR_ADD (size / 2 & -align) && CONST_OK_FOR_ADD (size - (size / 2 & -align))) { ! emit_insn (GEN_ADD3 (reg, reg, GEN_INT (size / 2 & -align))); ! emit_insn (GEN_ADD3 (reg, reg, GEN_INT (size - (size / 2 & -align)))); } else { rtx const_reg; /* If TEMP is invalid, we could temporarily save a general register to MACL. However, there is currently no need --- 4245,4264 ---- abort (); if (CONST_OK_FOR_ADD (size)) ! emit_fn (GEN_ADD3 (reg, reg, GEN_INT (size))); /* Try to do it with two partial adjustments; however, we must make sure that the stack is properly aligned at all times, in case an interrupt occurs between the two partial adjustments. */ else if (CONST_OK_FOR_ADD (size / 2 & -align) && CONST_OK_FOR_ADD (size - (size / 2 & -align))) { ! emit_fn (GEN_ADD3 (reg, reg, GEN_INT (size / 2 & -align))); ! emit_fn (GEN_ADD3 (reg, reg, GEN_INT (size - (size / 2 & -align)))); } else { rtx const_reg; + rtx insn; /* If TEMP is invalid, we could temporarily save a general register to MACL. However, there is currently no need *************** output_stack_adjust (size, reg, temp) *** 4222,4252 **** if (size < 0) { emit_insn (GEN_MOV (const_reg, GEN_INT (-size))); ! emit_insn (GEN_SUB3 (reg, reg, const_reg)); } else { emit_insn (GEN_MOV (const_reg, GEN_INT (size))); ! emit_insn (GEN_ADD3 (reg, reg, const_reg)); } } } } /* Output RTL to push register RN onto the stack. */ ! static void push (rn) int rn; { rtx x; if (rn == FPUL_REG) x = gen_push_fpul (); else if (TARGET_SH4 && TARGET_FMOVD && ! TARGET_FPU_SINGLE && FP_OR_XD_REGISTER_P (rn)) { if (FP_REGISTER_P (rn) && (rn - FIRST_FP_REG) & 1) ! return; x = gen_push_4 (gen_rtx_REG (DFmode, rn)); } else if (TARGET_SH3E && FP_REGISTER_P (rn)) --- 4273,4321 ---- if (size < 0) { emit_insn (GEN_MOV (const_reg, GEN_INT (-size))); ! insn = emit_fn (GEN_SUB3 (reg, reg, const_reg)); } else { emit_insn (GEN_MOV (const_reg, GEN_INT (size))); ! insn = emit_fn (GEN_ADD3 (reg, reg, const_reg)); } + if (emit_fn == frame_insn) + REG_NOTES (insn) + = (gen_rtx_EXPR_LIST + (REG_FRAME_RELATED_EXPR, + gen_rtx_SET (VOIDmode, reg, + gen_rtx_PLUS (SImode, reg, GEN_INT (size))), + REG_NOTES (insn))); } } } + static rtx + frame_insn (x) + rtx x; + { + x = emit_insn (x); + RTX_FRAME_RELATED_P (x) = 1; + return x; + } + /* Output RTL to push register RN onto the stack. */ ! static rtx push (rn) int rn; { rtx x; if (rn == FPUL_REG) x = gen_push_fpul (); + else if (rn == FPSCR_REG) + x = gen_push_fpscr (); else if (TARGET_SH4 && TARGET_FMOVD && ! TARGET_FPU_SINGLE && FP_OR_XD_REGISTER_P (rn)) { if (FP_REGISTER_P (rn) && (rn - FIRST_FP_REG) & 1) ! return NULL_RTX; x = gen_push_4 (gen_rtx_REG (DFmode, rn)); } else if (TARGET_SH3E && FP_REGISTER_P (rn)) *************** push (rn) *** 4254,4263 **** else x = gen_push (gen_rtx_REG (SImode, rn)); ! x = emit_insn (x); REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, gen_rtx_REG (SImode, STACK_POINTER_REGNUM), 0); } /* Output RTL to pop register RN from the stack. */ --- 4323,4333 ---- else x = gen_push (gen_rtx_REG (SImode, rn)); ! x = frame_insn (x); REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, gen_rtx_REG (SImode, STACK_POINTER_REGNUM), 0); + return x; } /* Output RTL to pop register RN from the stack. */ *************** pop (rn) *** 4269,4274 **** --- 4339,4346 ---- rtx x; if (rn == FPUL_REG) x = gen_pop_fpul (); + else if (rn == FPSCR_REG) + x = gen_pop_fpscr (); else if (TARGET_SH4 && TARGET_FMOVD && ! TARGET_FPU_SINGLE && FP_OR_XD_REGISTER_P (rn)) { *************** calc_live_regs (count_ptr, live_regs_mas *** 4320,4335 **** int reg; int count; int interrupt_handler; - rtx pr_initial; int pr_live; ! if ((lookup_attribute ! ("interrupt_handler", ! DECL_ATTRIBUTES (current_function_decl))) ! != NULL_TREE) ! interrupt_handler = 1; ! else ! interrupt_handler = 0; for (count = 0; 32 * count < FIRST_PSEUDO_REGISTER; count++) live_regs_mask[count] = 0; --- 4392,4400 ---- int reg; int count; int interrupt_handler; int pr_live; ! interrupt_handler = sh_cfun_interrupt_handler_p (); for (count = 0; 32 * count < FIRST_PSEUDO_REGISTER; count++) live_regs_mask[count] = 0; *************** calc_live_regs (count_ptr, live_regs_mas *** 4343,4352 **** target_flags &= ~FPU_SINGLE_BIT; break; } ! pr_initial = has_hard_reg_initial_val (Pmode, PR_REG); ! pr_live = (pr_initial ! ? REGNO (pr_initial) != PR_REG ! : regs_ever_live[PR_REG]); /* Force PR to be live if the prologue has to call the SHmedia argument decoder or register saver. */ if (TARGET_SHCOMPACT --- 4408,4425 ---- target_flags &= ~FPU_SINGLE_BIT; break; } ! /* PR_MEDIA_REG is a general purpose register, thus global_alloc already ! knows how to use it. That means the pseudo originally allocated for ! the initial value can become the PR_MEDIA_REG hard register, as seen for ! execute/20010122-1.c:test9. */ ! if (TARGET_SHMEDIA) ! pr_live = regs_ever_live[PR_MEDIA_REG]; ! else ! { ! rtx pr_initial = has_hard_reg_initial_val (Pmode, PR_REG); ! pr_live = (pr_initial ! ? REGNO (pr_initial) != (PR_REG) : regs_ever_live[PR_REG]); ! } /* Force PR to be live if the prologue has to call the SHmedia argument decoder or register saver. */ if (TARGET_SHCOMPACT *************** calc_live_regs (count_ptr, live_regs_mas *** 4356,4362 **** pr_live = 1; for (count = 0, reg = FIRST_PSEUDO_REGISTER - 1; reg >= 0; reg--) { ! if (reg == PR_REG ? pr_live : (interrupt_handler && ! pragma_trapa) ? (/* Need to save all the regs ever live. */ --- 4429,4435 ---- pr_live = 1; for (count = 0, reg = FIRST_PSEUDO_REGISTER - 1; reg >= 0; reg--) { ! if (reg == (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG) ? pr_live : (interrupt_handler && ! pragma_trapa) ? (/* Need to save all the regs ever live. */ *************** calc_live_regs (count_ptr, live_regs_mas *** 4366,4374 **** && pr_live)) && reg != STACK_POINTER_REGNUM && reg != ARG_POINTER_REGNUM && reg != RETURN_ADDRESS_POINTER_REGNUM ! && reg != T_REG && reg != GBR_REG && reg != FPSCR_REG) : (/* Only push those regs which are used and need to be saved. */ ! regs_ever_live[reg] && ! call_used_regs[reg])) { live_regs_mask[reg / 32] |= 1 << (reg % 32); count += GET_MODE_SIZE (REGISTER_NATURAL_MODE (reg)); --- 4439,4453 ---- && pr_live)) && reg != STACK_POINTER_REGNUM && reg != ARG_POINTER_REGNUM && reg != RETURN_ADDRESS_POINTER_REGNUM ! && reg != T_REG && reg != GBR_REG ! /* Push fpscr only on targets which have FPU */ ! && (reg != FPSCR_REG || TARGET_FPU_ANY)) : (/* Only push those regs which are used and need to be saved. */ ! (TARGET_SHCOMPACT ! && flag_pic ! && current_function_args_info.call_cookie ! && reg == PIC_OFFSET_TABLE_REGNUM) ! || (regs_ever_live[reg] && ! call_used_regs[reg]))) { live_regs_mask[reg / 32] |= 1 << (reg % 32); count += GET_MODE_SIZE (REGISTER_NATURAL_MODE (reg)); *************** sh_expand_prologue () *** 4440,4455 **** int d_rounding = 0; int save_flags = target_flags; ! current_function_interrupt ! = lookup_attribute ("interrupt_handler", ! DECL_ATTRIBUTES (current_function_decl)) ! != NULL_TREE; /* We have pretend args if we had an object sent partially in registers and partially on the stack, e.g. a large structure. */ output_stack_adjust (-current_function_pretend_args_size - current_function_args_info.stack_regs * 8, ! stack_pointer_rtx, TARGET_SH5 ? 0 : 1); extra_push = 0; --- 4519,4531 ---- int d_rounding = 0; int save_flags = target_flags; ! current_function_interrupt = sh_cfun_interrupt_handler_p (); /* We have pretend args if we had an object sent partially in registers and partially on the stack, e.g. a large structure. */ output_stack_adjust (-current_function_pretend_args_size - current_function_args_info.stack_regs * 8, ! stack_pointer_rtx, TARGET_SH5 ? 0 : 1, frame_insn); extra_push = 0; *************** sh_expand_prologue () *** 4504,4510 **** } /* Emit the code for SETUP_VARARGS. */ ! if (current_function_varargs || current_function_stdarg) { /* This is not used by the SH3E calling convention */ if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI) --- 4580,4586 ---- } /* Emit the code for SETUP_VARARGS. */ ! if (current_function_stdarg) { /* This is not used by the SH3E calling convention */ if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI) *************** sh_expand_prologue () *** 4513,4523 **** for (i = 0; i < NPARM_REGS(SImode); i++) { int rn = NPARM_REGS(SImode) + FIRST_PARM_REG - i - 1; if (i >= (NPARM_REGS(SImode) - current_function_args_info.arg_count[(int) SH_ARG_INT] )) break; ! push (rn); extra_push += 4; } } --- 4589,4602 ---- for (i = 0; i < NPARM_REGS(SImode); i++) { int rn = NPARM_REGS(SImode) + FIRST_PARM_REG - i - 1; + rtx insn; + if (i >= (NPARM_REGS(SImode) - current_function_args_info.arg_count[(int) SH_ARG_INT] )) break; ! insn = push (rn); ! RTX_FRAME_RELATED_P (insn) = 0; extra_push += 4; } } *************** sh_expand_prologue () *** 4547,4553 **** - d % (STACK_BOUNDARY / BITS_PER_UNIT)); offset = d + d_rounding; ! output_stack_adjust (-offset, stack_pointer_rtx, 1); /* We loop twice: first, we save 8-byte aligned registers in the higher addresses, that are known to be aligned. Then, we --- 4626,4632 ---- - d % (STACK_BOUNDARY / BITS_PER_UNIT)); offset = d + d_rounding; ! output_stack_adjust (-offset, stack_pointer_rtx, 1, frame_insn); /* We loop twice: first, we save 8-byte aligned registers in the higher addresses, that are known to be aligned. Then, we *************** sh_expand_prologue () *** 4733,4742 **** target_flags = save_flags; output_stack_adjust (-rounded_frame_size (d) + d_rounding, ! stack_pointer_rtx, TARGET_SH5 ? 0 : 1); if (frame_pointer_needed) ! emit_insn (GEN_MOV (frame_pointer_rtx, stack_pointer_rtx)); if (TARGET_SHCOMPACT && (current_function_args_info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1))) --- 4812,4821 ---- target_flags = save_flags; output_stack_adjust (-rounded_frame_size (d) + d_rounding, ! stack_pointer_rtx, TARGET_SH5 ? 0 : 1, frame_insn); if (frame_pointer_needed) ! frame_insn (GEN_MOV (frame_pointer_rtx, stack_pointer_rtx)); if (TARGET_SHCOMPACT && (current_function_args_info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1))) *************** sh_expand_epilogue () *** 4770,4776 **** if (frame_pointer_needed) { ! output_stack_adjust (frame_size, frame_pointer_rtx, 7); /* We must avoid moving the stack pointer adjustment past code which reads from the local frame, else an interrupt could --- 4849,4855 ---- if (frame_pointer_needed) { ! output_stack_adjust (frame_size, frame_pointer_rtx, 7, emit_insn); /* We must avoid moving the stack pointer adjustment past code which reads from the local frame, else an interrupt could *************** sh_expand_epilogue () *** 4786,4792 **** occur after the SP adjustment and clobber data in the local frame. */ emit_insn (gen_blockage ()); ! output_stack_adjust (frame_size, stack_pointer_rtx, 7); } if (SHMEDIA_REGS_STACK_ADJUST ()) --- 4865,4871 ---- occur after the SP adjustment and clobber data in the local frame. */ emit_insn (gen_blockage ()); ! output_stack_adjust (frame_size, stack_pointer_rtx, 7, emit_insn); } if (SHMEDIA_REGS_STACK_ADJUST ()) *************** sh_expand_epilogue () *** 4962,4968 **** output_stack_adjust (extra_push + current_function_pretend_args_size + d + d_rounding + current_function_args_info.stack_regs * 8, ! stack_pointer_rtx, 7); /* Switch back to the normal stack if necessary. */ if (sp_switch) --- 5041,5047 ---- output_stack_adjust (extra_push + current_function_pretend_args_size + d + d_rounding + current_function_args_info.stack_regs * 8, ! stack_pointer_rtx, 7, emit_insn); /* Switch back to the normal stack if necessary. */ if (sp_switch) *************** sh_need_epilogue () *** 4987,4997 **** start_sequence (); sh_expand_epilogue (); ! epilogue = gen_sequence (); end_sequence (); ! sh_need_epilogue_known ! = (GET_CODE (epilogue) == SEQUENCE && XVECLEN (epilogue, 0) == 0 ! ? -1 : 1); } return sh_need_epilogue_known > 0; } --- 5066,5074 ---- start_sequence (); sh_expand_epilogue (); ! epilogue = get_insns (); end_sequence (); ! sh_need_epilogue_known = (epilogue == NULL ? -1 : 1); } return sh_need_epilogue_known > 0; } *************** sh_builtin_saveregs () *** 5072,5077 **** --- 5149,5163 ---- if (TARGET_SHMEDIA) regbuf = gen_rtx_MEM (BLKmode, gen_rtx_REG (Pmode, ARG_POINTER_REGNUM)); + else if (n_floatregs & 1) + { + rtx addr; + + regbuf = assign_stack_local (BLKmode, bufsize + UNITS_PER_WORD, 0); + addr = copy_to_mode_reg (Pmode, XEXP (regbuf, 0)); + emit_insn (gen_iorsi3 (addr, addr, GEN_INT (UNITS_PER_WORD))); + regbuf = change_address (regbuf, BLKmode, addr); + } else regbuf = assign_stack_local (BLKmode, bufsize, 0); alias_set = get_varargs_alias_set (); *************** sh_build_va_list () *** 5187,5194 **** /* Implement `va_start' for varargs and stdarg. */ void ! sh_va_start (stdarg_p, valist, nextarg) ! int stdarg_p; tree valist; rtx nextarg; { --- 5273,5279 ---- /* Implement `va_start' for varargs and stdarg. */ void ! sh_va_start (valist, nextarg) tree valist; rtx nextarg; { *************** sh_va_start (stdarg_p, valist, nextarg) *** 5200,5219 **** if (TARGET_SH5) { expand_builtin_saveregs (); ! /* When the varargs dummy argument is ``passed'' on a register, ! we don't want std_expand_builtin_va_start() to apply any ! correction for it, so set stdarg_p so as to pretend there's ! no such dummy argument. */ ! if (current_function_args_info.arg_count[(int) SH_ARG_INT] ! < NPARM_REGS (SImode)) ! stdarg_p = 1; ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); return; } if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI) { ! std_expand_builtin_va_start (stdarg_p, valist, nextarg); return; } --- 5285,5297 ---- if (TARGET_SH5) { expand_builtin_saveregs (); ! std_expand_builtin_va_start (valist, nextarg); return; } if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI) { ! std_expand_builtin_va_start (valist, nextarg); return; } *************** sh_va_start (stdarg_p, valist, nextarg) *** 5265,5275 **** expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); u = make_tree (ptr_type_node, nextarg); - if (! stdarg_p && (nint == 0 || nfp == 0)) - { - u = fold (build (PLUS_EXPR, ptr_type_node, u, - build_int_2 (-UNITS_PER_WORD, -1))); - } t = build (MODIFY_EXPR, ptr_type_node, next_stack, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); --- 5343,5348 ---- *************** sh_va_arg (valist, type) *** 5284,5294 **** --- 5357,5372 ---- HOST_WIDE_INT size, rsize; tree tmp, pptr_type_node; rtx addr_rtx, r; + rtx result; + int pass_by_ref = MUST_PASS_IN_STACK (TYPE_MODE (type), type); size = int_size_in_bytes (type); rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD; pptr_type_node = build_pointer_type (ptr_type_node); + if (pass_by_ref) + type = build_pointer_type (type); + if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4) && ! TARGET_HITACHI) { tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack; *************** sh_va_arg (valist, type) *** 5330,5342 **** if (pass_as_float) { emit_cmp_and_jump_insns (expand_expr (next_fp, NULL_RTX, Pmode, EXPAND_NORMAL), expand_expr (next_fp_limit, NULL_RTX, Pmode, EXPAND_NORMAL), GE, const1_rtx, Pmode, 1, lab_false); ! if (TYPE_ALIGN (type) > BITS_PER_WORD) { tmp = build (BIT_AND_EXPR, ptr_type_node, next_fp, build_int_2 (UNITS_PER_WORD, 0)); --- 5408,5426 ---- if (pass_as_float) { + int first_floatreg + = current_function_args_info.arg_count[(int) SH_ARG_FLOAT]; + int n_floatregs = MAX (0, NPARM_REGS (SFmode) - first_floatreg); + emit_cmp_and_jump_insns (expand_expr (next_fp, NULL_RTX, Pmode, EXPAND_NORMAL), expand_expr (next_fp_limit, NULL_RTX, Pmode, EXPAND_NORMAL), GE, const1_rtx, Pmode, 1, lab_false); ! if (TYPE_ALIGN (type) > BITS_PER_WORD ! || (((TREE_CODE (type) == REAL_TYPE && size == 8) || size == 16) ! && (n_floatregs & 1))) { tmp = build (BIT_AND_EXPR, ptr_type_node, next_fp, build_int_2 (UNITS_PER_WORD, 0)); *************** sh_va_arg (valist, type) *** 5402,5408 **** /* ??? In va-sh.h, there had been code to make values larger than size 8 indirect. This does not match the FUNCTION_ARG macros. */ ! return std_expand_builtin_va_arg (valist, type); } /* Define the offset between two registers, one to be eliminated, and --- 5486,5504 ---- /* ??? In va-sh.h, there had been code to make values larger than size 8 indirect. This does not match the FUNCTION_ARG macros. */ ! result = std_expand_builtin_va_arg (valist, type); ! if (pass_by_ref) ! { ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (addr) != Pmode) ! addr = convert_memory_address (Pmode, result); ! #endif ! result = gen_rtx_MEM (ptr_mode, force_reg (Pmode, result)); ! set_mem_alias_set (result, get_varargs_alias_set ()); ! } ! /* ??? expand_builtin_va_arg will also set the alias set of the dereferenced ! argument to the varargs alias set. */ ! return result; } /* Define the offset between two registers, one to be eliminated, and *************** initial_elimination_offset (from, to) *** 5447,5452 **** --- 5543,5549 ---- if (from == RETURN_ADDRESS_POINTER_REGNUM && (to == FRAME_POINTER_REGNUM || to == STACK_POINTER_REGNUM)) + { if (TARGET_SH5) { int i, n = total_saved_regs_space; *************** initial_elimination_offset (from, to) *** 5499,5505 **** abort (); } else ! return total_auto_space; abort (); } --- 5596,5603 ---- abort (); } else ! return total_auto_space; ! } abort (); } *************** sh_handle_interrupt_handler_attribute (n *** 5584,5589 **** --- 5682,5692 ---- IDENTIFIER_POINTER (name)); *no_add_attrs = true; } + else if (TARGET_SHCOMPACT) + { + error ("attribute interrupt_handler is not compatible with -m5-compact"); + *no_add_attrs = true; + } return NULL_TREE; } *************** sh_handle_trap_exit_attribute (node, nam *** 5665,5670 **** --- 5768,5780 ---- return NULL_TREE; } + int + sh_cfun_interrupt_handler_p () + { + return (lookup_attribute ("interrupt_handler", + DECL_ATTRIBUTES (current_function_decl)) + != NULL_TREE); + } /* Predicates used by the templates. */ *************** general_movdst_operand (op, mode) *** 5738,5757 **** return general_operand (op, mode); } - /* Accept a register, but not a subreg of any kind. This allows us to - avoid pathological cases in reload wrt data movement common in - int->fp conversion. */ - - int - reg_no_subreg_operand (op, mode) - register rtx op; - enum machine_mode mode; - { - if (GET_CODE (op) == SUBREG) - return 0; - return register_operand (op, mode); - } - /* Returns 1 if OP is a normal arithmetic register. */ int --- 5848,5853 ---- *************** arith_reg_operand (op, mode) *** 5778,5783 **** --- 5874,5908 ---- return 0; } + /* Like above, but for DImode destinations: forbid paradoxical DImode subregs, + because this would lead to missing sign extensions when truncating from + DImode to SImode. */ + int + arith_reg_dest (op, mode) + rtx op; + enum machine_mode mode; + { + if (mode == DImode && GET_CODE (op) == SUBREG + && GET_MODE_SIZE (GET_MODE (SUBREG_REG (op))) < 8) + return 0; + return arith_reg_operand (op, mode); + } + + int + int_gpr_dest (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + enum machine_mode op_mode = GET_MODE (op); + + if (GET_MODE_CLASS (op_mode) != MODE_INT + || GET_MODE_SIZE (op_mode) >= UNITS_PER_WORD) + return 0; + if (! reload_completed) + return 0; + return true_regnum (op) <= LAST_GENERAL_REG; + } + int fp_arith_reg_operand (op, mode) rtx op; *************** arith_reg_or_0_operand (op, mode) *** 5839,5845 **** if (arith_reg_operand (op, mode)) return 1; ! if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_N (INTVAL (op))) return 1; return 0; --- 5964,5970 ---- if (arith_reg_operand (op, mode)) return 1; ! if (EXTRA_CONSTRAINT_U (op)) return 1; return 0; *************** logical_operand (op, mode) *** 5880,5885 **** --- 6005,6029 ---- return 0; } + int + and_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (logical_operand (op, mode)) + return 1; + + /* Check mshflo.l / mshflhi.l opportunities. */ + if (TARGET_SHMEDIA + && mode == DImode + && GET_CODE (op) == CONST_INT + && (INTVAL (op) == (unsigned) 0xffffffff + || INTVAL (op) == (HOST_WIDE_INT) -1 << 32)) + return 1; + + return 0; + } + /* Nonzero if OP is a floating point value with value 0.0. */ int *************** noncommutative_float_operator (op, mode) *** 5999,6004 **** --- 6143,6167 ---- } int + unary_float_operator (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode) + return 0; + switch (GET_CODE (op)) + { + case ABS: + case NEG: + case SQRT: + return 1; + default: + break; + } + return 0; + } + + int binary_float_operator (op, mode) rtx op; enum machine_mode mode; *************** binary_float_operator (op, mode) *** 6018,6023 **** --- 6181,6250 ---- return 0; } + int + binary_logical_operator (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_MODE (op) != mode) + return 0; + switch (GET_CODE (op)) + { + case IOR: + case AND: + case XOR: + return 1; + default: + break; + } + return 0; + } + + int + equality_comparison_operator (op, mode) + rtx op; + enum machine_mode mode; + { + return ((mode == VOIDmode || GET_MODE (op) == mode) + && (GET_CODE (op) == EQ || GET_CODE (op) == NE)); + } + + int greater_comparison_operator (op, mode) + rtx op; + enum machine_mode mode; + { + if (mode != VOIDmode && GET_MODE (op) == mode) + return 0; + switch (GET_CODE (op)) + { + case GT: + case GE: + case GTU: + case GEU: + return 1; + default: + return 0; + } + } + + int less_comparison_operator (op, mode) + rtx op; + enum machine_mode mode; + { + if (mode != VOIDmode && GET_MODE (op) == mode) + return 0; + switch (GET_CODE (op)) + { + case LT: + case LE: + case LTU: + case LEU: + return 1; + default: + return 0; + } + } + /* Accept pseudos and branch target registers. */ int target_reg_operand (op, mode) *************** target_operand (op, mode) *** 6061,6066 **** --- 6288,6441 ---- return target_reg_operand (op, mode); } + int + mextr_bit_offset (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + HOST_WIDE_INT i; + + if (GET_CODE (op) != CONST_INT) + return 0; + i = INTVAL (op); + return i >= 1*8 && i <= 7*8 && (i & 7) == 0; + } + + int + extend_reg_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (GET_CODE (op) == TRUNCATE + ? arith_operand + : arith_reg_operand) (op, mode); + } + + int + trunc_hi_operand (op, mode) + rtx op; + enum machine_mode mode; + { + enum machine_mode op_mode = GET_MODE (op); + + if (op_mode != SImode && op_mode != DImode + && op_mode != V4HImode && op_mode != V2SImode) + return 0; + return extend_reg_operand (op, mode); + } + + int + extend_reg_or_0_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (GET_CODE (op) == TRUNCATE + ? arith_operand + : arith_reg_or_0_operand) (op, mode); + } + + int + general_extend_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (GET_CODE (op) == TRUNCATE + ? arith_operand + : nonimmediate_operand) (op, mode); + } + + int + inqhi_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) != TRUNCATE || mode != GET_MODE (op)) + return 0; + op = XEXP (op, 0); + /* Can't use true_regnum here because copy_cost wants to know about + SECONDARY_INPUT_RELOAD_CLASS. */ + return GET_CODE (op) == REG && FP_REGISTER_P (REGNO (op)); + } + + int + sh_rep_vec (v, mode) + rtx v; + enum machine_mode mode; + { + int i; + rtx x, y; + + if ((GET_CODE (v) != CONST_VECTOR && GET_CODE (v) != PARALLEL) + || (GET_MODE (v) != mode && mode != VOIDmode)) + return 0; + i = XVECLEN (v, 0) - 2; + x = XVECEXP (v, 0, i + 1); + if (GET_MODE_UNIT_SIZE (mode) == 1) + { + y = XVECEXP (v, 0, i); + for (i -= 2 ; i >= 0; i -= 2) + if (! rtx_equal_p (XVECEXP (v, 0, i + 1), x) + || ! rtx_equal_p (XVECEXP (v, 0, i), y)) + return 0; + } + else + for (; i >= 0; i--) + if (XVECEXP (v, 0, i) != x) + return 0; + return 1; + } + + /* Determine if V is a constant vector matching MODE with only one element + that is not a sign extension. Two byte-sized elements count as one. */ + int + sh_1el_vec (v, mode) + rtx v; + enum machine_mode mode; + { + int unit_size; + int i, last, least, sign_ix; + rtx sign; + + if (GET_CODE (v) != CONST_VECTOR + || (GET_MODE (v) != mode && mode != VOIDmode)) + return 0; + /* Determine numbers of last and of least significat elements. */ + last = XVECLEN (v, 0) - 1; + least = TARGET_LITTLE_ENDIAN ? 0 : last; + if (GET_CODE (XVECEXP (v, 0, least)) != CONST_INT) + return 0; + sign_ix = least; + if (GET_MODE_UNIT_SIZE (mode) == 1) + sign_ix = TARGET_LITTLE_ENDIAN ? 1 : last - 1; + if (GET_CODE (XVECEXP (v, 0, sign_ix)) != CONST_INT) + return 0; + unit_size = GET_MODE_UNIT_SIZE (GET_MODE (v)); + sign = (INTVAL (XVECEXP (v, 0, sign_ix)) >> (unit_size * BITS_PER_UNIT - 1) + ? constm1_rtx : const0_rtx); + i = XVECLEN (v, 0) - 1; + do + if (i != least && i != sign_ix && XVECEXP (v, 0, i) != sign) + return 0; + while (--i); + return 1; + } + + int + sh_const_vec (v, mode) + rtx v; + enum machine_mode mode; + { + int i; + + if (GET_CODE (v) != CONST_VECTOR + || (GET_MODE (v) != mode && mode != VOIDmode)) + return 0; + i = XVECLEN (v, 0) - 1; + for (; i >= 0; i--) + if (GET_CODE (XVECEXP (v, 0, i)) != CONST_INT) + return 0; + return 1; + } /* Return the destination address of a branch. */ *************** branch_dest (branch) *** 6078,6084 **** return INSN_ADDRESSES (dest_uid); } ! /* Return non-zero if REG is not used after INSN. We assume REG is a reload reg, and therefore does not live past labels. It may live past calls or jumps though. */ int --- 6453,6459 ---- return INSN_ADDRESSES (dest_uid); } ! /* Return nonzero if REG is not used after INSN. We assume REG is a reload reg, and therefore does not live past labels. It may live past calls or jumps though. */ int *************** reg_unused_after (reg, insn) *** 6175,6190 **** #include "ggc.h" rtx get_fpscr_rtx () { - static rtx fpscr_rtx; - if (! fpscr_rtx) { fpscr_rtx = gen_rtx (REG, PSImode, FPSCR_REG); REG_USERVAR_P (fpscr_rtx) = 1; - ggc_add_rtx_root (&fpscr_rtx, 1); mark_user_reg (fpscr_rtx); } if (! reload_completed || mdep_reorg_phase != SH_AFTER_MDEP_REORG) --- 6550,6563 ---- #include "ggc.h" + static GTY(()) rtx fpscr_rtx; rtx get_fpscr_rtx () { if (! fpscr_rtx) { fpscr_rtx = gen_rtx (REG, PSImode, FPSCR_REG); REG_USERVAR_P (fpscr_rtx) = 1; mark_user_reg (fpscr_rtx); } if (! reload_completed || mdep_reorg_phase != SH_AFTER_MDEP_REORG) *************** sh_insn_length_adjustment (insn) *** 6380,6387 **** /* Instructions with unfilled delay slots take up an extra two bytes for the nop in the delay slot. */ if (((GET_CODE (insn) == INSN ! && GET_CODE (PATTERN (insn)) != USE ! && GET_CODE (PATTERN (insn)) != CLOBBER) || GET_CODE (insn) == CALL_INSN || (GET_CODE (insn) == JUMP_INSN && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC --- 6753,6760 ---- /* Instructions with unfilled delay slots take up an extra two bytes for the nop in the delay slot. */ if (((GET_CODE (insn) == INSN ! && GET_CODE (PATTERN (insn)) != USE ! && GET_CODE (PATTERN (insn)) != CLOBBER) || GET_CODE (insn) == CALL_INSN || (GET_CODE (insn) == JUMP_INSN && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC *************** legitimize_pic_address (orig, mode, reg) *** 6522,6528 **** /* Mark the use of a constant in the literal table. If the constant has multiple labels, make it unique. */ ! static rtx mark_constant_pool_use (x) rtx x; { rtx insn, lab, pattern; --- 6895,6902 ---- /* Mark the use of a constant in the literal table. If the constant has multiple labels, make it unique. */ ! static rtx ! mark_constant_pool_use (x) rtx x; { rtx insn, lab, pattern; *************** sh_can_redirect_branch (branch1, branch2 *** 6621,6643 **** return 0; } ! #ifndef OBJECT_FORMAT_ELF ! static void ! sh_asm_named_section (name, flags) ! const char *name; ! unsigned int flags ATTRIBUTE_UNUSED; { ! /* ??? Perhaps we should be using default_coff_asm_named_section. */ ! fprintf (asm_out_file, "\t.section %s\n", name); } - #endif /* ! OBJECT_FORMAT_ELF */ ! /* A C statement (sans semicolon) to update the integer variable COST based on the relationship between INSN that is dependent on DEP_INSN through the dependence LINK. The default is to make no adjustment to COST. This can be used for example to specify to the scheduler that an output- or anti-dependence does not incur ! the same cost as a data-dependence. */ static int sh_adjust_cost (insn, link, dep_insn, cost) rtx insn; --- 6995,7024 ---- return 0; } ! /* Return nonzero if register old_reg can be renamed to register new_reg. */ ! int ! sh_hard_regno_rename_ok (old_reg, new_reg) ! unsigned int old_reg ATTRIBUTE_UNUSED; ! unsigned int new_reg; { ! ! /* Interrupt functions can only use registers that have already been ! saved by the prologue, even if they would normally be ! call-clobbered. */ ! ! if (sh_cfun_interrupt_handler_p () && !regs_ever_live[new_reg]) ! return 0; ! ! return 1; } ! /* Function to update the integer COST based on the relationship between INSN that is dependent on DEP_INSN through the dependence LINK. The default is to make no adjustment to COST. This can be used for example to specify to the scheduler that an output- or anti-dependence does not incur ! the same cost as a data-dependence. The return value should be ! the new value for COST. */ static int sh_adjust_cost (insn, link, dep_insn, cost) rtx insn; *************** sh_adjust_cost (insn, link, dep_insn, co *** 6645,6695 **** rtx dep_insn; int cost; { ! rtx reg; ! if (GET_CODE(insn) == CALL_INSN) { ! /* The only input for a call that is timing-critical is the ! function's address. */ ! rtx call = PATTERN (insn); ! if (GET_CODE (call) == PARALLEL) ! call = XVECEXP (call, 0 ,0); ! if (GET_CODE (call) == SET) ! call = SET_SRC (call); ! if (GET_CODE (call) == CALL && GET_CODE (XEXP (call, 0)) == MEM ! && ! reg_set_p (XEXP (XEXP (call, 0), 0), dep_insn)) ! cost = 0; } ! /* All sfunc calls are parallels with at least four components. ! Exploit this to avoid unnecessary calls to sfunc_uses_reg. */ ! else if (GET_CODE (PATTERN (insn)) == PARALLEL ! && XVECLEN (PATTERN (insn), 0) >= 4 ! && (reg = sfunc_uses_reg (insn))) { /* Likewise, the most timing critical input for an sfuncs call is the function address. However, sfuncs typically start using their arguments pretty quickly. Assume a four cycle delay before they are needed. */ ! if (! reg_set_p (reg, dep_insn)) ! cost -= TARGET_SUPERSCALAR ? 40 : 4; } ! /* Adjust load_si / pcload_si type insns latency. Use the known ! nominal latency and form of the insn to speed up the check. */ ! else if (cost == 3 ! && GET_CODE (PATTERN (dep_insn)) == SET ! /* Latency for dmpy type insns is also 3, so check the that ! it's actually a move insn. */ ! && general_movsrc_operand (SET_SRC (PATTERN (dep_insn)), SImode)) cost = 2; ! else if (cost == 30 ! && GET_CODE (PATTERN (dep_insn)) == SET ! && GET_MODE (SET_SRC (PATTERN (dep_insn))) == SImode) ! cost = 20; return cost; } /* For use by ALLOCATE_INITIAL_VALUE. Note that sh.md contains some 'special function' patterns (type sfunc) that clobber pr, but that do not look like function calls to leaf_function_p. Hence we must --- 7026,7157 ---- rtx dep_insn; int cost; { ! rtx reg, use_pat; ! if (TARGET_SHMEDIA) { ! /* On SHmedia, if the dependence is an anti-dependence or ! output-dependence, there is no cost. */ ! if (REG_NOTE_KIND (link) != 0) ! cost = 0; ! if (get_attr_is_mac_media (insn) ! && get_attr_is_mac_media (dep_insn)) ! cost = 1; } ! else if (REG_NOTE_KIND (link) == 0) { + enum attr_type dep_type, type; + + if (recog_memoized (insn) < 0 + || recog_memoized (dep_insn) < 0) + return cost; + + dep_type = get_attr_type (dep_insn); + if (dep_type == TYPE_FLOAD || dep_type == TYPE_PCFLOAD) + cost--; + if ((dep_type == TYPE_LOAD_SI || dep_type == TYPE_PCLOAD_SI) + && (type = get_attr_type (insn)) != TYPE_CALL + && type != TYPE_SFUNC) + cost--; + + /* The only input for a call that is timing-critical is the + function's address. */ + if (GET_CODE(insn) == CALL_INSN) + { + rtx call = PATTERN (insn); + + if (GET_CODE (call) == PARALLEL) + call = XVECEXP (call, 0 ,0); + if (GET_CODE (call) == SET) + call = SET_SRC (call); + if (GET_CODE (call) == CALL && GET_CODE (XEXP (call, 0)) == MEM + && ! reg_set_p (XEXP (XEXP (call, 0), 0), dep_insn)) + cost = 0; + } /* Likewise, the most timing critical input for an sfuncs call is the function address. However, sfuncs typically start using their arguments pretty quickly. Assume a four cycle delay before they are needed. */ ! /* All sfunc calls are parallels with at least four components. ! Exploit this to avoid unnecessary calls to sfunc_uses_reg. */ ! else if (GET_CODE (PATTERN (insn)) == PARALLEL ! && XVECLEN (PATTERN (insn), 0) >= 4 ! && (reg = sfunc_uses_reg (insn))) ! { ! if (! reg_set_p (reg, dep_insn)) ! cost -= 4; ! } ! /* When the preceding instruction loads the shift amount of ! the following SHAD/SHLD, the latency of the load is increased ! by 1 cycle. */ ! else if (TARGET_SH4 ! && get_attr_type (insn) == TYPE_DYN_SHIFT ! && get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES ! && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)), ! XEXP (SET_SRC (single_set(insn)), ! 1))) ! cost++; ! /* When an LS group instruction with a latency of less than ! 3 cycles is followed by a double-precision floating-point ! instruction, FIPR, or FTRV, the latency of the first ! instruction is increased to 3 cycles. */ ! else if (cost < 3 ! && get_attr_insn_class (dep_insn) == INSN_CLASS_LS_GROUP ! && get_attr_dfp_comp (insn) == DFP_COMP_YES) ! cost = 3; ! /* The lsw register of a double-precision computation is ready one ! cycle earlier. */ ! else if (reload_completed ! && get_attr_dfp_comp (dep_insn) == DFP_COMP_YES ! && (use_pat = single_set (insn)) ! && ! regno_use_in (REGNO (SET_DEST (single_set (dep_insn))), ! SET_SRC (use_pat))) ! cost -= 1; ! ! if (get_attr_any_fp_comp (dep_insn) == ANY_FP_COMP_YES ! && get_attr_late_fp_use (insn) == LATE_FP_USE_YES) ! cost -= 1; } ! /* An anti-dependence penalty of two applies if the first insn is a double ! precision fadd / fsub / fmul. */ ! else if (REG_NOTE_KIND (link) == REG_DEP_ANTI ! && recog_memoized (dep_insn) >= 0 ! && get_attr_type (dep_insn) == TYPE_DFP_ARITH ! /* A lot of alleged anti-flow dependences are fake, ! so check this one is real. */ ! && flow_dependent_p (dep_insn, insn)) cost = 2; ! return cost; } + /* Check if INSN is flow-dependent on DEP_INSN. Can also be used to check + if DEP_INSN is anti-flow dependent on INSN. */ + static int + flow_dependent_p (insn, dep_insn) + rtx insn, dep_insn; + { + rtx tmp = PATTERN (insn); + + note_stores (PATTERN (dep_insn), flow_dependent_p_1, &tmp); + return tmp == NULL_RTX; + } + + /* A helper function for flow_dependent_p called through note_stores. */ + static void + flow_dependent_p_1 (x, pat, data) + rtx x; + rtx pat ATTRIBUTE_UNUSED; + void *data; + { + rtx * pinsn = (rtx *) data; + + if (*pinsn && reg_referenced_p (x, *pinsn)) + *pinsn = NULL_RTX; + } + /* For use by ALLOCATE_INITIAL_VALUE. Note that sh.md contains some 'special function' patterns (type sfunc) that clobber pr, but that do not look like function calls to leaf_function_p. Hence we must *************** sh_adjust_cost (insn, link, dep_insn, co *** 6697,6703 **** int sh_pr_n_sets () { ! return REG_N_SETS (PR_REG); } /* SHmedia requires registers for branches, so we can't generate new --- 7159,7187 ---- int sh_pr_n_sets () { ! return REG_N_SETS (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG); ! } ! ! /* This Function returns nonzero if the DFA based scheduler interface ! is to be used. At present this is supported for the SH4 only. */ ! static int ! sh_use_dfa_interface() ! { ! if (TARGET_HARD_SH4) ! return 1; ! else ! return 0; ! } ! ! /* This function returns "2" to indicate dual issue for the SH4 ! processor. To be used by the DFA pipeline description. */ ! static int ! sh_issue_rate() ! { ! if (TARGET_SUPERSCALAR) ! return 2; ! else ! return 1; } /* SHmedia requires registers for branches, so we can't generate new *************** sh_ms_bitfield_layout_p (record_type) *** 6714,6716 **** --- 7198,7857 ---- { return TARGET_SH5; } + + /* If using PIC, mark a SYMBOL_REF for a non-global symbol so that we + may access it using GOTOFF instead of GOT. */ + + static void + sh_encode_section_info (decl, first) + tree decl; + int first; + { + rtx rtl, symbol; + + if (DECL_P (decl)) + rtl = DECL_RTL (decl); + else + rtl = TREE_CST_RTL (decl); + if (GET_CODE (rtl) != MEM) + return; + symbol = XEXP (rtl, 0); + if (GET_CODE (symbol) != SYMBOL_REF) + return; + + if (flag_pic) + SYMBOL_REF_FLAG (symbol) = (*targetm.binds_local_p) (decl); + + if (TARGET_SH5 && first && TREE_CODE (decl) != FUNCTION_DECL) + XEXP (rtl, 0) = gen_datalabel_ref (symbol); + } + + /* Undo the effects of the above. */ + + static const char * + sh_strip_name_encoding (str) + const char *str; + { + STRIP_DATALABEL_ENCODING (str, str); + str += *str == '*'; + return str; + } + + + /* + On the SH1..SH4, the trampoline looks like + 2 0002 D202 mov.l l2,r2 + 1 0000 D301 mov.l l1,r3 + 3 0004 422B jmp @r2 + 4 0006 0009 nop + 5 0008 00000000 l1: .long area + 6 000c 00000000 l2: .long function + + SH5 (compact) uses r1 instead of r3 for the static chain. */ + + + /* Emit RTL insns to initialize the variable parts of a trampoline. + FNADDR is an RTX for the address of the function's pure code. + CXT is an RTX for the static chain value for the function. */ + + void + sh_initialize_trampoline (tramp, fnaddr, cxt) + rtx tramp, fnaddr, cxt; + { + if (TARGET_SHMEDIA64) + { + rtx tramp_templ; + int fixed_len; + + rtx movi1 = GEN_INT (0xcc000010); + rtx shori1 = GEN_INT (0xc8000010); + rtx src, dst; + + /* The following trampoline works within a +- 128 KB range for cxt: + ptb/u cxt,tr1; movi fnaddr >> 48,r0; shori fnaddr >> 32,r0; + shori fnaddr >> 16,r0; shori fnaddr,r0; ptabs/l r0,tr0 + gettr tr1,r1; blink tr0,r63 */ + /* Address rounding makes it hard to compute the exact bounds of the + offset for this trampoline, but we have a rather generous offset + range, so frame_offset should do fine as an upper bound. */ + if (cxt == virtual_stack_vars_rtx && frame_offset < 0x20000) + { + /* ??? could optimize this trampoline initialization + by writing DImode words with two insns each. */ + rtx mask = force_reg (DImode, GEN_INT (0x3fffc00)); + rtx insn = gen_rtx_MINUS (DImode, cxt, tramp); + insn = gen_rtx_ASHIFT (DImode, insn, GEN_INT (10-2)); + insn = gen_rtx_AND (DImode, insn, mask); + /* Or in ptb/u .,tr1 pattern */ + insn = gen_rtx_IOR (DImode, insn, gen_int_mode (0xec000010, SImode)); + insn = force_operand (insn, NULL_RTX); + insn = gen_lowpart (SImode, insn); + emit_move_insn (gen_rtx_MEM (SImode, tramp), insn); + insn = gen_rtx_LSHIFTRT (DImode, fnaddr, GEN_INT (38)); + insn = gen_rtx_AND (DImode, insn, mask); + insn = force_operand (gen_rtx_IOR (DImode, movi1, insn), NULL_RTX); + insn = gen_lowpart (SImode, insn); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 4)), insn); + insn = gen_rtx_LSHIFTRT (DImode, fnaddr, GEN_INT (22)); + insn = gen_rtx_AND (DImode, insn, mask); + insn = force_operand (gen_rtx_IOR (DImode, shori1, insn), NULL_RTX); + insn = gen_lowpart (SImode, insn); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 8)), insn); + insn = gen_rtx_LSHIFTRT (DImode, fnaddr, GEN_INT (6)); + insn = gen_rtx_AND (DImode, insn, mask); + insn = force_operand (gen_rtx_IOR (DImode, shori1, insn), NULL_RTX); + insn = gen_lowpart (SImode, insn); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 12)), + insn); + insn = gen_rtx_ASHIFT (DImode, fnaddr, GEN_INT (10)); + insn = gen_rtx_AND (DImode, insn, mask); + insn = force_operand (gen_rtx_IOR (DImode, shori1, insn), NULL_RTX); + insn = gen_lowpart (SImode, insn); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 16)), + insn); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 20)), + GEN_INT (0x6bf10600)); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 24)), + GEN_INT (0x4415fc10)); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 28)), + GEN_INT (0x4401fff0)); + emit_insn (gen_ic_invalidate_line (tramp)); + return; + } + tramp_templ = gen_rtx_SYMBOL_REF (Pmode,"__GCC_nested_trampoline"); + fixed_len = TRAMPOLINE_SIZE - 2 * GET_MODE_SIZE (Pmode); + + tramp_templ = gen_datalabel_ref (tramp_templ); + dst = gen_rtx_MEM (BLKmode, tramp); + src = gen_rtx_MEM (BLKmode, tramp_templ); + set_mem_align (dst, 256); + set_mem_align (src, 64); + emit_block_move (dst, src, GEN_INT (fixed_len), BLOCK_OP_NORMAL); + + emit_move_insn (gen_rtx_MEM (Pmode, plus_constant (tramp, fixed_len)), + fnaddr); + emit_move_insn (gen_rtx_MEM (Pmode, + plus_constant (tramp, + fixed_len + + GET_MODE_SIZE (Pmode))), + cxt); + emit_insn (gen_ic_invalidate_line (tramp)); + return; + } + else if (TARGET_SHMEDIA) + { + /* movi fnaddr >> 16,r1; shori fnaddr,r1; ptabs/l r1,tr0 + movi cxt >> 16,r1; shori cxt,r1; blink tr0,r63 */ + rtx quad0 = gen_reg_rtx (DImode), cxtload = gen_reg_rtx (DImode); + rtx quad1 = gen_reg_rtx (DImode), quad2 = gen_reg_rtx (DImode); + /* movi 0,r1: 0xcc000010 shori 0,r1: c8000010 concatenated, + rotated 10 right, and higer 16 bit of every 32 selected. */ + rtx movishori + = force_reg (V2HImode, (simplify_gen_subreg + (V2HImode, GEN_INT (0x4330432), SImode, 0))); + rtx ptabs = force_reg (DImode, GEN_INT (0x6bf10600)); + rtx blink = force_reg (DImode, GEN_INT (0x4401fff0)); + + tramp = force_reg (Pmode, tramp); + fnaddr = force_reg (SImode, fnaddr); + cxt = force_reg (SImode, cxt); + emit_insn (gen_mshflo_w_x (gen_rtx_SUBREG (V4HImode, quad0, 0), + gen_rtx_SUBREG (V2HImode, fnaddr, 0), + movishori)); + emit_insn (gen_rotrdi3_mextr (quad0, quad0, + GEN_INT (TARGET_LITTLE_ENDIAN ? 24 : 56))); + emit_insn (gen_ashldi3_media (quad0, quad0, GEN_INT (2))); + emit_move_insn (gen_rtx_MEM (DImode, tramp), quad0); + emit_insn (gen_mshflo_w_x (gen_rtx_SUBREG (V4HImode, cxtload, 0), + gen_rtx_SUBREG (V2HImode, cxt, 0), + movishori)); + emit_insn (gen_rotrdi3_mextr (cxtload, cxtload, + GEN_INT (TARGET_LITTLE_ENDIAN ? 24 : 56))); + emit_insn (gen_ashldi3_media (cxtload, cxtload, GEN_INT (2))); + if (TARGET_LITTLE_ENDIAN) + { + emit_insn (gen_mshflo_l_di (quad1, ptabs, cxtload)); + emit_insn (gen_mextr4 (quad2, cxtload, blink)); + } + else + { + emit_insn (gen_mextr4 (quad1, cxtload, ptabs)); + emit_insn (gen_mshflo_l_di (quad2, blink, cxtload)); + } + emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, 8)), quad1); + emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, 16)), quad2); + emit_insn (gen_ic_invalidate_line (tramp)); + return; + } + else if (TARGET_SHCOMPACT) + { + emit_insn (gen_initialize_trampoline (tramp, cxt, fnaddr)); + return; + } + emit_move_insn (gen_rtx_MEM (SImode, tramp), + gen_int_mode (TARGET_LITTLE_ENDIAN ? 0xd301d202 : 0xd202d301, + SImode)); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 4)), + gen_int_mode (TARGET_LITTLE_ENDIAN ? 0x0009422b : 0x422b0009, + SImode)); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 8)), + cxt); + emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 12)), + fnaddr); + if (TARGET_HARVARD) + { + if (TARGET_USERMODE) + emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__ic_invalidate"), + 0, VOIDmode, 1, tramp, SImode); + else + emit_insn (gen_ic_invalidate_line (tramp)); + } + } + + + /* Machine specific built-in functions. */ + + struct builtin_description + { + const enum insn_code icode; + const char *const name; + int signature; + }; + + /* describe number and signedness of arguments; arg[0] == result + (1: unsigned, 2: signed, 4: don't care, 8: pointer 0: no argument */ + static const char signature_args[][4] = + { + #define SH_BLTIN_V2SI2 0 + { 4, 4 }, + #define SH_BLTIN_V4HI2 1 + { 4, 4 }, + #define SH_BLTIN_V2SI3 2 + { 4, 4, 4 }, + #define SH_BLTIN_V4HI3 3 + { 4, 4, 4 }, + #define SH_BLTIN_V8QI3 4 + { 4, 4, 4 }, + #define SH_BLTIN_MAC_HISI 5 + { 1, 4, 4, 1 }, + #define SH_BLTIN_SH_HI 6 + { 4, 4, 1 }, + #define SH_BLTIN_SH_SI 7 + { 4, 4, 1 }, + #define SH_BLTIN_V4HI2V2SI 8 + { 4, 4, 4 }, + #define SH_BLTIN_V4HI2V8QI 9 + { 4, 4, 4 }, + #define SH_BLTIN_SISF 10 + { 4, 2 }, + #define SH_BLTIN_LDUA_L 11 + { 2, 8 }, + #define SH_BLTIN_LDUA_Q 12 + { 1, 8 }, + #define SH_BLTIN_STUA_L 13 + { 0, 8, 2 }, + #define SH_BLTIN_STUA_Q 14 + { 0, 8, 1 }, + #define SH_BLTIN_UDI 15 + { 0, 8, 1 }, + #define SH_BLTIN_NUM_SHARED_SIGNATURES 16 + #define SH_BLTIN_2 16 + #define SH_BLTIN_SU 16 + { 1, 2 }, + #define SH_BLTIN_3 17 + #define SH_BLTIN_SUS 17 + { 2, 2, 1 }, + #define SH_BLTIN_PSSV 18 + { 0, 8, 2, 2 }, + #define SH_BLTIN_XXUU 19 + #define SH_BLTIN_UUUU 19 + { 1, 1, 1, 1 }, + #define SH_BLTIN_PV 20 + { 0, 8 }, + }; + /* mcmv: operands considered unsigned. */ + /* mmulsum_wq, msad_ubq: result considered unsigned long long. */ + /* mperm: control value considered unsigned int. */ + /* mshalds, mshard, mshards, mshlld, mshlrd: shift count is unsigned int. */ + /* mshards_q: returns signed short. */ + /* nsb: takes long long arg, returns unsigned char. */ + static const struct builtin_description bdesc[] = + { + { CODE_FOR_absv2si2, "__builtin_absv2si2", SH_BLTIN_V2SI2 }, + { CODE_FOR_absv4hi2, "__builtin_absv4hi2", SH_BLTIN_V4HI2 }, + { CODE_FOR_addv2si3, "__builtin_addv2si3", SH_BLTIN_V2SI3 }, + { CODE_FOR_addv4hi3, "__builtin_addv4hi3", SH_BLTIN_V4HI3 }, + { CODE_FOR_ssaddv2si3,"__builtin_ssaddv2si3", SH_BLTIN_V2SI3 }, + { CODE_FOR_usaddv8qi3,"__builtin_usaddv8qi3", SH_BLTIN_V8QI3 }, + { CODE_FOR_ssaddv4hi3,"__builtin_ssaddv4hi3", SH_BLTIN_V4HI3 }, + #if 0 + { CODE_FOR_alloco32, "__builtin_sh_media_ALLOCO", SH_BLTIN_PV }, + { CODE_FOR_alloco64, "__builtin_sh_media_ALLOCO", SH_BLTIN_PV }, + #endif + { CODE_FOR_negcmpeqv8qi,"__builtin_sh_media_MCMPEQ_B", SH_BLTIN_V8QI3 }, + { CODE_FOR_negcmpeqv2si,"__builtin_sh_media_MCMPEQ_L", SH_BLTIN_V2SI3 }, + { CODE_FOR_negcmpeqv4hi,"__builtin_sh_media_MCMPEQ_W", SH_BLTIN_V4HI3 }, + { CODE_FOR_negcmpgtuv8qi,"__builtin_sh_media_MCMPGT_UB", SH_BLTIN_V8QI3 }, + { CODE_FOR_negcmpgtv2si,"__builtin_sh_media_MCMPGT_L", SH_BLTIN_V2SI3 }, + { CODE_FOR_negcmpgtv4hi,"__builtin_sh_media_MCMPGT_W", SH_BLTIN_V4HI3 }, + { CODE_FOR_mcmv, "__builtin_sh_media_MCMV", SH_BLTIN_UUUU }, + { CODE_FOR_mcnvs_lw, "__builtin_sh_media_MCNVS_LW", SH_BLTIN_3 }, + { CODE_FOR_mcnvs_wb, "__builtin_sh_media_MCNVS_WB", SH_BLTIN_V4HI2V8QI }, + { CODE_FOR_mcnvs_wub, "__builtin_sh_media_MCNVS_WUB", SH_BLTIN_V4HI2V8QI }, + { CODE_FOR_mextr1, "__builtin_sh_media_MEXTR1", SH_BLTIN_UDI }, + { CODE_FOR_mextr2, "__builtin_sh_media_MEXTR2", SH_BLTIN_UDI }, + { CODE_FOR_mextr3, "__builtin_sh_media_MEXTR3", SH_BLTIN_UDI }, + { CODE_FOR_mextr4, "__builtin_sh_media_MEXTR4", SH_BLTIN_UDI }, + { CODE_FOR_mextr5, "__builtin_sh_media_MEXTR5", SH_BLTIN_UDI }, + { CODE_FOR_mextr6, "__builtin_sh_media_MEXTR6", SH_BLTIN_UDI }, + { CODE_FOR_mextr7, "__builtin_sh_media_MEXTR7", SH_BLTIN_UDI }, + { CODE_FOR_mmacfx_wl, "__builtin_sh_media_MMACFX_WL", SH_BLTIN_MAC_HISI }, + { CODE_FOR_mmacnfx_wl,"__builtin_sh_media_MMACNFX_WL", SH_BLTIN_MAC_HISI }, + { CODE_FOR_mulv2si3, "__builtin_mulv2si3", SH_BLTIN_V2SI3, }, + { CODE_FOR_mulv4hi3, "__builtin_mulv4hi3", SH_BLTIN_V4HI3 }, + { CODE_FOR_mmulfx_l, "__builtin_sh_media_MMULFX_L", SH_BLTIN_V2SI3 }, + { CODE_FOR_mmulfx_w, "__builtin_sh_media_MMULFX_W", SH_BLTIN_V4HI3 }, + { CODE_FOR_mmulfxrp_w,"__builtin_sh_media_MMULFXRP_W", SH_BLTIN_V4HI3 }, + { CODE_FOR_mmulhi_wl, "__builtin_sh_media_MMULHI_WL", SH_BLTIN_V4HI2V2SI }, + { CODE_FOR_mmullo_wl, "__builtin_sh_media_MMULLO_WL", SH_BLTIN_V4HI2V2SI }, + { CODE_FOR_mmulsum_wq,"__builtin_sh_media_MMULSUM_WQ", SH_BLTIN_XXUU }, + { CODE_FOR_mperm_w, "__builtin_sh_media_MPERM_W", SH_BLTIN_SH_HI }, + { CODE_FOR_msad_ubq, "__builtin_sh_media_MSAD_UBQ", SH_BLTIN_XXUU }, + { CODE_FOR_mshalds_l, "__builtin_sh_media_MSHALDS_L", SH_BLTIN_SH_SI }, + { CODE_FOR_mshalds_w, "__builtin_sh_media_MSHALDS_W", SH_BLTIN_SH_HI }, + { CODE_FOR_ashrv2si3, "__builtin_ashrv2si3", SH_BLTIN_SH_SI }, + { CODE_FOR_ashrv4hi3, "__builtin_ashrv4hi3", SH_BLTIN_SH_HI }, + { CODE_FOR_mshards_q, "__builtin_sh_media_MSHARDS_Q", SH_BLTIN_SUS }, + { CODE_FOR_mshfhi_b, "__builtin_sh_media_MSHFHI_B", SH_BLTIN_V8QI3 }, + { CODE_FOR_mshfhi_l, "__builtin_sh_media_MSHFHI_L", SH_BLTIN_V2SI3 }, + { CODE_FOR_mshfhi_w, "__builtin_sh_media_MSHFHI_W", SH_BLTIN_V4HI3 }, + { CODE_FOR_mshflo_b, "__builtin_sh_media_MSHFLO_B", SH_BLTIN_V8QI3 }, + { CODE_FOR_mshflo_l, "__builtin_sh_media_MSHFLO_L", SH_BLTIN_V2SI3 }, + { CODE_FOR_mshflo_w, "__builtin_sh_media_MSHFLO_W", SH_BLTIN_V4HI3 }, + { CODE_FOR_ashlv2si3, "__builtin_ashlv2si3", SH_BLTIN_SH_SI }, + { CODE_FOR_ashlv4hi3, "__builtin_ashlv4hi3", SH_BLTIN_SH_HI }, + { CODE_FOR_lshrv2si3, "__builtin_lshrv2si3", SH_BLTIN_SH_SI }, + { CODE_FOR_lshrv4hi3, "__builtin_lshrv4hi3", SH_BLTIN_SH_HI }, + { CODE_FOR_subv2si3, "__builtin_subv2si3", SH_BLTIN_V2SI3 }, + { CODE_FOR_subv4hi3, "__builtin_subv4hi3", SH_BLTIN_V4HI3 }, + { CODE_FOR_sssubv2si3,"__builtin_sssubv2si3", SH_BLTIN_V2SI3 }, + { CODE_FOR_ussubv8qi3,"__builtin_ussubv8qi3", SH_BLTIN_V8QI3 }, + { CODE_FOR_sssubv4hi3,"__builtin_sssubv4hi3", SH_BLTIN_V4HI3 }, + { CODE_FOR_fcosa_s, "__builtin_sh_media_FCOSA_S", SH_BLTIN_SISF }, + { CODE_FOR_fsina_s, "__builtin_sh_media_FSINA_S", SH_BLTIN_SISF }, + { CODE_FOR_fipr, "__builtin_sh_media_FIPR_S", SH_BLTIN_3 }, + { CODE_FOR_ftrv, "__builtin_sh_media_FTRV_S", SH_BLTIN_3 }, + { CODE_FOR_fsrra_s, "__builtin_sh_media_FSRRA_S", SH_BLTIN_2 }, + #if 0 + { CODE_FOR_ldhi_l, "__builtin_sh_media_LDHI_L", SH_BLTIN_LDUA_L }, + { CODE_FOR_ldhi_q, "__builtin_sh_media_LDHI_Q", SH_BLTIN_LDUA_Q }, + { CODE_FOR_ldlo_l, "__builtin_sh_media_LDLO_L", SH_BLTIN_LDUA_L }, + { CODE_FOR_ldlo_q, "__builtin_sh_media_LDLO_Q", SH_BLTIN_LDUA_Q }, + { CODE_FOR_sthi_l, "__builtin_sh_media_STHI_L", SH_BLTIN_STUA_L }, + { CODE_FOR_sthi_q, "__builtin_sh_media_STHI_Q", SH_BLTIN_STUA_Q }, + { CODE_FOR_stlo_l, "__builtin_sh_media_STLO_L", SH_BLTIN_STUA_L }, + { CODE_FOR_stlo_q, "__builtin_sh_media_STLO_Q", SH_BLTIN_STUA_Q }, + { CODE_FOR_ldhi_l64, "__builtin_sh_media_LDHI_L", SH_BLTIN_LDUA_L }, + { CODE_FOR_ldhi_q64, "__builtin_sh_media_LDHI_Q", SH_BLTIN_LDUA_Q }, + { CODE_FOR_ldlo_l64, "__builtin_sh_media_LDLO_L", SH_BLTIN_LDUA_L }, + { CODE_FOR_ldlo_q64, "__builtin_sh_media_LDLO_Q", SH_BLTIN_LDUA_Q }, + { CODE_FOR_sthi_l64, "__builtin_sh_media_STHI_L", SH_BLTIN_STUA_L }, + { CODE_FOR_sthi_q64, "__builtin_sh_media_STHI_Q", SH_BLTIN_STUA_Q }, + { CODE_FOR_stlo_l64, "__builtin_sh_media_STLO_L", SH_BLTIN_STUA_L }, + { CODE_FOR_stlo_q64, "__builtin_sh_media_STLO_Q", SH_BLTIN_STUA_Q }, + #endif + { CODE_FOR_nsb, "__builtin_sh_media_NSB", SH_BLTIN_SU }, + { CODE_FOR_byterev, "__builtin_sh_media_BYTEREV", SH_BLTIN_2 }, + #if 0 + { CODE_FOR_prefetch32,"__builtin_sh_media_PREFO", SH_BLTIN_PSSV }, + { CODE_FOR_prefetch64,"__builtin_sh_media_PREFO", SH_BLTIN_PSSV } + #endif + }; + + static void + sh_media_init_builtins () + { + tree shared[SH_BLTIN_NUM_SHARED_SIGNATURES]; + const struct builtin_description *d; + + memset (shared, 0, sizeof shared); + for (d = bdesc; d - bdesc < (int) (sizeof bdesc / sizeof bdesc[0]); d++) + { + tree type, arg_type; + int signature = d->signature; + int i; + + if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES && shared[signature]) + type = shared[signature]; + else + { + int has_result = signature_args[signature][0] != 0; + + if (signature_args[signature][1] == 8 + && (insn_data[d->icode].operand[has_result].mode != Pmode)) + continue; + if (! TARGET_FPU_ANY + && FLOAT_MODE_P (insn_data[d->icode].operand[0].mode)) + continue; + type = void_list_node; + for (i = 3; ; i--) + { + int arg = signature_args[signature][i]; + int opno = i - 1 + has_result; + + if (arg == 8) + arg_type = ptr_type_node; + else if (arg) + arg_type = ((*lang_hooks.types.type_for_mode) + (insn_data[d->icode].operand[opno].mode, + (arg & 1))); + else if (i) + continue; + else + arg_type = void_type_node; + if (i == 0) + break; + type = tree_cons (NULL_TREE, arg_type, type); + } + type = build_function_type (arg_type, type); + if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES) + shared[signature] = type; + } + builtin_function (d->name, type, d - bdesc, BUILT_IN_MD, + NULL, NULL_TREE); + } + } + + static void + sh_init_builtins () + { + if (TARGET_SHMEDIA) + sh_media_init_builtins (); + } + + /* Expand an expression EXP that calls a built-in function, + with result going to TARGET if that's convenient + (and in mode MODE if that's convenient). + SUBTARGET may be used as the target for computing one of EXP's operands. + IGNORE is nonzero if the value is to be ignored. */ + + static rtx + sh_expand_builtin (exp, target, subtarget, mode, ignore) + tree exp; + rtx target; + rtx subtarget ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + int ignore; + { + tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); + tree arglist = TREE_OPERAND (exp, 1); + unsigned int fcode = DECL_FUNCTION_CODE (fndecl); + const struct builtin_description *d = &bdesc[fcode]; + enum insn_code icode = d->icode; + int signature = d->signature; + enum machine_mode tmode = VOIDmode; + int nop = 0, i; + rtx op[4]; + rtx pat; + + if (signature_args[signature][0]) + { + if (ignore) + return 0; + + tmode = insn_data[icode].operand[0].mode; + if (! target + || GET_MODE (target) != tmode + || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) + target = gen_reg_rtx (tmode); + op[nop++] = target; + } + else + target = 0; + + for (i = 1; i <= 3; i++, nop++) + { + tree arg; + enum machine_mode opmode, argmode; + + if (! signature_args[signature][i]) + break; + arg = TREE_VALUE (arglist); + if (arg == error_mark_node) + return const0_rtx; + arglist = TREE_CHAIN (arglist); + opmode = insn_data[icode].operand[nop].mode; + argmode = TYPE_MODE (TREE_TYPE (arg)); + if (argmode != opmode) + arg = build1 (NOP_EXPR, + (*lang_hooks.types.type_for_mode) (opmode, 0), arg); + op[nop] = expand_expr (arg, NULL_RTX, opmode, 0); + if (! (*insn_data[icode].operand[nop].predicate) (op[nop], opmode)) + op[nop] = copy_to_mode_reg (opmode, op[nop]); + } + + switch (nop) + { + case 1: + pat = (*insn_data[d->icode].genfun) (op[0]); + break; + case 2: + pat = (*insn_data[d->icode].genfun) (op[0], op[1]); + break; + case 3: + pat = (*insn_data[d->icode].genfun) (op[0], op[1], op[2]); + break; + case 4: + pat = (*insn_data[d->icode].genfun) (op[0], op[1], op[2], op[3]); + break; + default: + abort (); + } + if (! pat) + return 0; + emit_insn (pat); + return target; + } + + void + sh_expand_unop_v2sf (code, op0, op1) + enum rtx_code code; + rtx op0, op1; + { + rtx sel0 = const0_rtx; + rtx sel1 = const1_rtx; + rtx (*fn) PARAMS ((rtx, rtx, rtx, rtx, rtx)) = gen_unary_sf_op; + rtx op = gen_rtx_fmt_e (code, SFmode, op1); + + emit_insn ((*fn) (op0, op1, op, sel0, sel0)); + emit_insn ((*fn) (op0, op1, op, sel1, sel1)); + } + + void + sh_expand_binop_v2sf (code, op0, op1, op2) + enum rtx_code code; + rtx op0, op1, op2; + { + rtx sel0 = const0_rtx; + rtx sel1 = const1_rtx; + rtx (*fn) PARAMS ((rtx, rtx, rtx, rtx, rtx, rtx, rtx)) = gen_binary_sf_op; + rtx op = gen_rtx_fmt_ee (code, SFmode, op1, op2); + + emit_insn ((*fn) (op0, op1, op2, op, sel0, sel0, sel0)); + emit_insn ((*fn) (op0, op1, op2, op, sel1, sel1, sel1)); + } + + /* Return the class of registers for which a mode change from FROM to TO + is invalid. */ + bool + sh_cannot_change_mode_class (from, to, class) + enum machine_mode from, to; + enum reg_class class; + { + if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to)) + { + if (TARGET_LITTLE_ENDIAN) + { + if (GET_MODE_SIZE (to) < 8 || GET_MODE_SIZE (from) < 8) + return reg_classes_intersect_p (DF_REGS, class); + } + else + { + if (GET_MODE_SIZE (from) < 8) + return reg_classes_intersect_p (DF_HI_REGS, class); + } + } + return 0; + } + + + /* If ADDRESS refers to a CODE_LABEL, add NUSES to the number of times + that label is used. */ + + void + sh_mark_label (address, nuses) + rtx address; + int nuses; + { + if (GOTOFF_P (address)) + { + /* Extract the label or symbol. */ + address = XEXP (address, 0); + if (GET_CODE (address) == PLUS) + address = XEXP (address, 0); + address = XVECEXP (address, 0, 0); + } + if (GET_CODE (address) == LABEL_REF + && GET_CODE (XEXP (address, 0)) == CODE_LABEL) + LABEL_NUSES (XEXP (address, 0)) += nuses; + } + + /* Compute extra cost of moving data between one register class + and another. */ + + /* If SECONDARY*_RELOAD_CLASS says something about the src/dst pair, regclass + uses this information. Hence, the general register <-> floating point + register information here is not used for SFmode. */ + + int + sh_register_move_cost (mode, srcclass, dstclass) + enum machine_mode mode; + enum reg_class srcclass, dstclass; + { + if (dstclass == T_REGS || dstclass == PR_REGS) + return 10; + + if (mode == SImode && ! TARGET_SHMEDIA && TARGET_FMOVD + && REGCLASS_HAS_FP_REG (srcclass) + && REGCLASS_HAS_FP_REG (dstclass)) + return 4; + + if ((REGCLASS_HAS_FP_REG (dstclass) + && REGCLASS_HAS_GENERAL_REG (srcclass)) + || (REGCLASS_HAS_GENERAL_REG (dstclass) + && REGCLASS_HAS_FP_REG (srcclass))) + return ((TARGET_SHMEDIA ? 4 : TARGET_FMOVD ? 8 : 12) + * ((GET_MODE_SIZE (mode) + 7) / 8U)); + + if ((dstclass == FPUL_REGS + && REGCLASS_HAS_GENERAL_REG (srcclass)) + || (srcclass == FPUL_REGS + && REGCLASS_HAS_GENERAL_REG (dstclass))) + return 5; + + if ((dstclass == FPUL_REGS + && (srcclass == PR_REGS || srcclass == MAC_REGS || srcclass == T_REGS)) + || (srcclass == FPUL_REGS + && (dstclass == PR_REGS || dstclass == MAC_REGS))) + return 7; + + if ((srcclass == TARGET_REGS && ! REGCLASS_HAS_GENERAL_REG (dstclass)) + || ((dstclass) == TARGET_REGS && ! REGCLASS_HAS_GENERAL_REG (srcclass))) + return 20; + + if ((srcclass == FPSCR_REGS && ! REGCLASS_HAS_GENERAL_REG (dstclass)) + || (dstclass == FPSCR_REGS && ! REGCLASS_HAS_GENERAL_REG (srcclass))) + return 4; + + if (TARGET_SHMEDIA + || (TARGET_FMOVD + && ! REGCLASS_HAS_GENERAL_REG (srcclass) + && ! REGCLASS_HAS_GENERAL_REG (dstclass))) + return 2 * ((GET_MODE_SIZE (mode) + 7) / 8U); + + return 2 * ((GET_MODE_SIZE (mode) + 3) / 4U); + } + + /* Like register_operand, but take into account that SHMEDIA can use + the constant zero like a general register. */ + int + sh_register_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (op == CONST0_RTX (mode) && TARGET_SHMEDIA) + return 1; + return register_operand (op, mode); + } + + #include "gt-sh.h" diff -Nrc3pad gcc-3.2.3/gcc/config/sh/sh.h gcc-3.3/gcc/config/sh/sh.h *** gcc-3.2.3/gcc/config/sh/sh.h 2002-02-21 16:42:28.000000000 +0000 --- gcc-3.3/gcc/config/sh/sh.h 2003-04-15 17:06:09.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,97 **** /* ??? No longer true. */ extern int code_for_indirect_jump_scratch; ! /* Generate SDB debugging information. */ ! ! #define SDB_DEBUGGING_INFO ! ! /* Output DBX (stabs) debugging information if doing -gstabs. */ ! ! #include "dbxcoff.h" ! ! #define SDB_DELIM ";" ! ! #define CPP_SPEC " \ ! %{m5-64media|m5-64media-nofpu|m5-32media|m5-32media-nofpu:-D__SHMEDIA__=1} \ ! %{m5-compact|m5-compact-nofpu:-D__SHMEDIA__=0} \ ! %{m5-64media|m5-64media-nofpu:-D__SH5__=64 -D__LONG_MAX__=9223372036854775807L} \ ! %{m5-32media|m5-32media-nofpu|m5-compact|m5-compact-nofpu:-D__SH5__=32} \ ! %{m5-64media-nofpu|m5-32media-nofpu|m5-compact-nofpu:-D__SH4_NOFPU__} \ ! %{m1:-D__sh1__} \ ! %{m2:-D__sh2__} \ ! %{m3:-D__sh3__} \ ! %{m3e:-D__SH3E__} \ ! %{m4-single-only:-D__SH4_SINGLE_ONLY__} \ ! %{m4-single:-D__SH4_SINGLE__} \ ! %{m4-nofpu:-D__sh3__ -D__SH4_NOFPU__} \ ! %{m4:-D__SH4__} \ ! %{!m1:%{!m2:%{!m3*:%{!m4*:%{!m5*:%(cpp_default_cpu_spec)}}}}} \ ! %{mhitachi:-D__HITACHI__} \ ! %(subtarget_cpp_spec) \ ! %(subtarget_cpp_ptr_spec) \ ! %(subtarget_cpp_endian_spec) " ! ! #ifndef SUBTARGET_CPP_ENDIAN_SPEC ! #define SUBTARGET_CPP_ENDIAN_SPEC "%{ml:-D__LITTLE_ENDIAN__}" ! #endif ! ! #ifndef SUBTARGET_CPP_SPEC ! #define SUBTARGET_CPP_SPEC "" ! #endif ! ! #ifndef CPP_DEFAULT_CPU_SPEC ! #define CPP_DEFAULT_CPU_SPEC "-D__sh1__" ! #endif ! ! #ifndef SUBTARGET_CPP_PTR_SPEC ! #define SUBTARGET_CPP_PTR_SPEC "\ ! %{m5-64media|m5-64media-nofpu|m5-32media|m5-32media-nofpu|m5-compact|m5-compact-nofpu:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ ! %{!m5-64media:%{!m5-64media-nofpu:%{!m5-32media:%{!m5-32media-nofpu:%{!m5-compact:%{!m5-compact-nofpu:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}} \ ! " ! #endif ! ! #define EXTRA_SPECS \ ! { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ ! { "subtarget_cpp_endian_spec", SUBTARGET_CPP_ENDIAN_SPEC }, \ ! { "subtarget_cpp_ptr_spec", SUBTARGET_CPP_PTR_SPEC }, \ ! { "cpp_default_cpu_spec", CPP_DEFAULT_CPU_SPEC }, ! ! #define CPP_PREDEFINES "-D__sh__ -Acpu=sh -Amachine=sh" ! ! #define ASM_SPEC "%{ml:-little} %{mrelax:-relax}" ! ! #define LINK_SPEC "%{ml:-m shl} %{mrelax:-relax}" /* We can not debug without a frame pointer. */ /* #define CAN_DEBUG_WITHOUT_FP */ --- 32,83 ---- /* ??? No longer true. */ extern int code_for_indirect_jump_scratch; ! #define TARGET_CPU_CPP_BUILTINS() \ ! do { \ ! builtin_define ("__sh__"); \ ! builtin_assert ("cpu=sh"); \ ! builtin_assert ("machine=sh"); \ ! switch ((int) sh_cpu) \ ! { \ ! case PROCESSOR_SH1: \ ! builtin_define ("__sh1__"); \ ! break; \ ! case PROCESSOR_SH2: \ ! builtin_define ("__sh2__"); \ ! break; \ ! case PROCESSOR_SH3: \ ! builtin_define ("__sh3__"); \ ! builtin_define ("__SH3__"); \ ! if (TARGET_HARD_SH4) \ ! builtin_define ("__SH4_NOFPU__"); \ ! break; \ ! case PROCESSOR_SH3E: \ ! builtin_define (TARGET_HARD_SH4 ? "__SH4_SINGLE_ONLY__" : "__SH3E__"); \ ! break; \ ! case PROCESSOR_SH4: \ ! builtin_define (TARGET_FPU_SINGLE ? "__SH4_SINGLE__" : "__SH4__"); \ ! break; \ ! case PROCESSOR_SH5: \ ! { \ ! builtin_define_with_value ("__SH5__", \ ! TARGET_SHMEDIA64 ? "64" : "32", 0); \ ! builtin_define_with_value ("__SHMEDIA__", \ ! TARGET_SHMEDIA ? "1" : "0", 0); \ ! if (! TARGET_FPU_DOUBLE) \ ! builtin_define ("__SH4_NOFPU__"); \ ! } \ ! } \ ! if (TARGET_HITACHI) \ ! builtin_define ("__HITACHI__"); \ ! builtin_define (TARGET_LITTLE_ENDIAN \ ! ? "__LITTLE_ENDIAN__" : "__BIG_ENDIAN__"); \ ! if (flag_pic) \ ! { \ ! builtin_define ("__pic__"); \ ! builtin_define ("__PIC__"); \ ! } \ ! TARGET_OBJFMT_CPP_BUILTINS (); \ ! } while (0) /* We can not debug without a frame pointer. */ /* #define CAN_DEBUG_WITHOUT_FP */ *************** extern int code_for_indirect_jump_scratc *** 120,125 **** --- 106,114 ---- call_used_regs[MACH_REG] = 0; \ call_used_regs[MACL_REG] = 0; \ } \ + for (regno = FIRST_FP_REG + (TARGET_LITTLE_ENDIAN != 0); \ + regno <= LAST_FP_REG; regno += 2) \ + SET_HARD_REG_BIT (reg_class_contents[DF_HI_REGS], regno); \ if (TARGET_SHMEDIA) \ { \ for (regno = FIRST_TARGET_REG; regno <= LAST_TARGET_REG; regno ++)\ *************** extern int target_flags; *** 263,301 **** /* Nonzero if we should prefer @GOT calls when generating PIC. */ #define TARGET_PREFERGOT (target_flags & PREFERGOT_BIT) /* Reset all target-selection flags. */ #define TARGET_NONE -(SH1_BIT | SH2_BIT | SH3_BIT | SH3E_BIT | SH4_BIT \ | HARD_SH4_BIT | FPU_SINGLE_BIT | SH5_BIT) #define TARGET_SWITCHES \ { {"1", TARGET_NONE, "" }, \ ! {"1", SH1_BIT, "" }, \ {"2", TARGET_NONE, "" }, \ ! {"2", SH2_BIT|SH1_BIT, "" }, \ {"3", TARGET_NONE, "" }, \ ! {"3", SH3_BIT|SH2_BIT|SH1_BIT, "" }, \ {"3e", TARGET_NONE, "" }, \ ! {"3e", SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|FPU_SINGLE_BIT, "" }, \ {"4-single-only", TARGET_NONE, "" }, \ ! {"4-single-only", SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT|FPU_SINGLE_BIT, "" }, \ {"4-single", TARGET_NONE, "" }, \ ! {"4-single", SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT|FPU_SINGLE_BIT, "" },\ {"4-nofpu", TARGET_NONE, "" }, \ ! {"4-nofpu", SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT, "" },\ {"4", TARGET_NONE, "" }, \ ! {"4", SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT, "" }, \ {"5-64media", TARGET_NONE, "" }, \ ! {"5-64media", SH5_BIT|SH4_BIT, "Generate 64-bit SHmedia code" }, \ {"5-64media-nofpu", TARGET_NONE, "" }, \ ! {"5-64media-nofpu", SH5_BIT, "Generate 64-bit FPU-less SHmedia code" }, \ {"5-32media", TARGET_NONE, "" }, \ ! {"5-32media", SH5_BIT|SH4_BIT|SH3E_BIT, "Generate 32-bit SHmedia code" }, \ {"5-32media-nofpu", TARGET_NONE, "" }, \ ! {"5-32media-nofpu", SH5_BIT|SH3E_BIT, "Generate 32-bit FPU-less SHmedia code" }, \ {"5-compact", TARGET_NONE, "" }, \ ! {"5-compact", SH5_BIT|SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|FPU_SINGLE_BIT, "Generate SHcompact code" }, \ {"5-compact-nofpu", TARGET_NONE, "" }, \ ! {"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \ {"b", -LITTLE_ENDIAN_BIT, "" }, \ {"bigtable", BIGTABLE_BIT, "" }, \ {"dalign", DALIGN_BIT, "" }, \ --- 252,305 ---- /* Nonzero if we should prefer @GOT calls when generating PIC. */ #define TARGET_PREFERGOT (target_flags & PREFERGOT_BIT) + #define SELECT_SH1 (SH1_BIT) + #define SELECT_SH2 (SH2_BIT | SELECT_SH1) + #define SELECT_SH3 (SH3_BIT | SELECT_SH2) + #define SELECT_SH3E (SH3E_BIT | FPU_SINGLE_BIT | SELECT_SH3) + #define SELECT_SH4_NOFPU (HARD_SH4_BIT | SELECT_SH3) + #define SELECT_SH4_SINGLE_ONLY (HARD_SH4_BIT | SELECT_SH3E) + #define SELECT_SH4 (SH4_BIT|SH3E_BIT|HARD_SH4_BIT | SELECT_SH3) + #define SELECT_SH4_SINGLE (FPU_SINGLE_BIT | SELECT_SH4) + #define SELECT_SH5_64 (SH5_BIT | SH4_BIT) + #define SELECT_SH5_64_NOFPU (SH5_BIT) + #define SELECT_SH5_32 (SH5_BIT | SH4_BIT | SH3E_BIT) + #define SELECT_SH5_32_NOFPU (SH5_BIT | SH3E_BIT) + #define SELECT_SH5_COMPACT (SH5_BIT | SH4_BIT | SELECT_SH3E) + #define SELECT_SH5_COMPACT_NOFPU (SH5_BIT | SELECT_SH3) + /* Reset all target-selection flags. */ #define TARGET_NONE -(SH1_BIT | SH2_BIT | SH3_BIT | SH3E_BIT | SH4_BIT \ | HARD_SH4_BIT | FPU_SINGLE_BIT | SH5_BIT) #define TARGET_SWITCHES \ { {"1", TARGET_NONE, "" }, \ ! {"1", SELECT_SH1, "" }, \ {"2", TARGET_NONE, "" }, \ ! {"2", SELECT_SH2, "" }, \ {"3", TARGET_NONE, "" }, \ ! {"3", SELECT_SH3, "" }, \ {"3e", TARGET_NONE, "" }, \ ! {"3e", SELECT_SH3E, "" }, \ {"4-single-only", TARGET_NONE, "" }, \ ! {"4-single-only", SELECT_SH4_SINGLE_ONLY, "" }, \ {"4-single", TARGET_NONE, "" }, \ ! {"4-single", SELECT_SH4_SINGLE, "" },\ {"4-nofpu", TARGET_NONE, "" }, \ ! {"4-nofpu", SELECT_SH4_NOFPU, "" },\ {"4", TARGET_NONE, "" }, \ ! {"4", SELECT_SH4, "" }, \ {"5-64media", TARGET_NONE, "" }, \ ! {"5-64media", SELECT_SH5_64, "Generate 64-bit SHmedia code" }, \ {"5-64media-nofpu", TARGET_NONE, "" }, \ ! {"5-64media-nofpu", SELECT_SH5_64_NOFPU, "Generate 64-bit FPU-less SHmedia code" }, \ {"5-32media", TARGET_NONE, "" }, \ ! {"5-32media", SELECT_SH5_32, "Generate 32-bit SHmedia code" }, \ {"5-32media-nofpu", TARGET_NONE, "" }, \ ! {"5-32media-nofpu", SELECT_SH5_32_NOFPU, "Generate 32-bit FPU-less SHmedia code" }, \ {"5-compact", TARGET_NONE, "" }, \ ! {"5-compact", SELECT_SH5_COMPACT, "Generate SHcompact code" }, \ {"5-compact-nofpu", TARGET_NONE, "" }, \ ! {"5-compact-nofpu", SELECT_SH5_COMPACT_NOFPU, "Generate FPU-less SHcompact code" }, \ {"b", -LITTLE_ENDIAN_BIT, "" }, \ {"bigtable", BIGTABLE_BIT, "" }, \ {"dalign", DALIGN_BIT, "" }, \ *************** extern int target_flags; *** 318,324 **** /* This are meant to be redefined in the host dependent files */ #define SUBTARGET_SWITCHES ! #define TARGET_DEFAULT (SH1_BIT) #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \ do { \ --- 322,393 ---- /* This are meant to be redefined in the host dependent files */ #define SUBTARGET_SWITCHES ! /* This defaults us to big-endian. */ ! #ifndef TARGET_ENDIAN_DEFAULT ! #define TARGET_ENDIAN_DEFAULT 0 ! #endif ! ! #ifndef TARGET_CPU_DEFAULT ! #define TARGET_CPU_DEFAULT SELECT_SH1 ! #endif ! ! #define TARGET_DEFAULT (TARGET_CPU_DEFAULT|TARGET_ENDIAN_DEFAULT) ! ! #define CPP_SPEC " %(subtarget_cpp_spec) " ! ! #ifndef SUBTARGET_CPP_SPEC ! #define SUBTARGET_CPP_SPEC "" ! #endif ! ! #ifndef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS ! #endif ! ! #define EXTRA_SPECS \ ! { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ ! { "link_emul_prefix", LINK_EMUL_PREFIX }, \ ! { "link_default_cpu_emul", LINK_DEFAULT_CPU_EMUL }, \ ! { "subtarget_link_emul_suffix", SUBTARGET_LINK_EMUL_SUFFIX }, \ ! { "subtarget_link_spec", SUBTARGET_LINK_SPEC }, \ ! { "subtarget_asm_endian_spec", SUBTARGET_ASM_ENDIAN_SPEC }, \ ! SUBTARGET_EXTRA_SPECS ! ! #define ASM_SPEC "%(subtarget_asm_endian_spec) %{mrelax:-relax}" ! ! #ifndef SUBTARGET_ASM_ENDIAN_SPEC ! #if TARGET_ENDIAN_DEFAULT == LITTLE_ENDIAN_BIT ! #define SUBTARGET_ASM_ENDIAN_SPEC "%{mb:-big} %{!mb:-little}" ! #else ! #define SUBTARGET_ASM_ENDIAN_SPEC "%{ml:-little} %{!ml:-big}" ! #endif ! #endif ! ! #define LINK_EMUL_PREFIX "sh%{ml:l}" ! ! #if TARGET_CPU_DEFAULT & SH5_BIT ! #if TARGET_CPU_DEFAULT & SH3E_BIT ! #define LINK_DEFAULT_CPU_EMUL "32" ! #else ! #define LINK_DEFAULT_CPU_EMUL "64" ! #endif /* SH3E_BIT */ ! #else ! #define LINK_DEFAULT_CPU_EMUL "" ! #endif /* SH5_BIT */ ! ! #define SUBTARGET_LINK_EMUL_SUFFIX "" ! #define SUBTARGET_LINK_SPEC "" ! ! /* svr4.h redefines LINK_SPEC inappropriately, so go via SH_LINK_SPEC, ! so that we can undo the damage without code replication. */ ! #define LINK_SPEC SH_LINK_SPEC ! ! #define SH_LINK_SPEC "\ ! -m %(link_emul_prefix)\ ! %{m5-compact*|m5-32media*:32}\ ! %{m5-64media*:64}\ ! %{!m1:%{!m2:%{!m3*:%{!m4*:%{!m5*:%(link_default_cpu_emul)}}}}}\ ! %(subtarget_link_emul_suffix) \ ! %{mrelax:-relax} %(subtarget_link_spec)" #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \ do { \ *************** do { \ *** 353,359 **** { \ sh_cpu = CPU_SH5; \ target_flags |= DALIGN_BIT; \ ! if (TARGET_FPU_ANY) \ target_flags |= FMOVD_BIT; \ if (TARGET_SHMEDIA) \ { \ --- 422,429 ---- { \ sh_cpu = CPU_SH5; \ target_flags |= DALIGN_BIT; \ ! if (TARGET_FPU_ANY \ ! && ! (TARGET_SHCOMPACT && TARGET_LITTLE_ENDIAN)) \ target_flags |= FMOVD_BIT; \ if (TARGET_SHMEDIA) \ { \ *************** do { \ *** 374,379 **** --- 444,451 ---- targetm.asm_out.aligned_op.di = NULL; \ targetm.asm_out.unaligned_op.di = NULL; \ } \ + if (TARGET_FMOVD) \ + reg_class_from_letter['e'] = NO_REGS; \ \ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \ if (! VALID_REGISTER_P (regno)) \ *************** do { \ *** 402,415 **** break global alloc, and generates slower code anyway due \ to the pressure on R0. */ \ flag_schedule_insns = 0; \ } while (0) /* Target machine storage layout. */ - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ --- 474,512 ---- break global alloc, and generates slower code anyway due \ to the pressure on R0. */ \ flag_schedule_insns = 0; \ + \ + if (align_loops == 0) \ + align_loops = 1 << (TARGET_SH5 ? 3 : 2); \ + if (align_jumps == 0) \ + align_jumps = 1 << CACHE_LOG; \ + else if (align_jumps < (TARGET_SHMEDIA ? 4 : 2)) \ + align_jumps = TARGET_SHMEDIA ? 4 : 2; \ + \ + /* Allocation boundary (in *bytes*) for the code of a function. \ + SH1: 32 bit alignment is faster, because instructions are always \ + fetched as a pair from a longword boundary. \ + SH2 .. SH5 : align to cache line start. */ \ + if (align_functions == 0) \ + align_functions \ + = TARGET_SMALLCODE ? FUNCTION_BOUNDARY/8 : (1 << CACHE_LOG); \ + /* The linker relaxation code breaks when a function contains \ + alignments that are larger than that at the start of a \ + compilation unit. */ \ + if (TARGET_RELAX) \ + { \ + int min_align \ + = align_loops > align_jumps ? align_loops : align_jumps; \ + \ + /* Also take possible .long constants / mova tables int account. */\ + if (min_align < 4) \ + min_align = 4; \ + if (align_functions < min_align) \ + align_functions = min_align; \ + } \ } while (0) /* Target machine storage layout. */ /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ *************** do { \ *** 430,443 **** #define LIBGCC2_WORDS_BIG_ENDIAN 1 #endif - /* Number of bits in an addressable storage unit. */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD (TARGET_SHMEDIA ? 64 : 32) #define MAX_BITS_PER_WORD 64 #define MAX_LONG_TYPE_SIZE MAX_BITS_PER_WORD --- 527,532 ---- *************** do { \ *** 474,484 **** The SH2/3 have 16 byte cache lines, and the SH4 has a 32 byte cache line */ #define CACHE_LOG (TARGET_CACHE32 ? 5 : TARGET_SH2 ? 4 : 2) ! /* Allocation boundary (in *bits*) for the code of a function. ! 32 bit alignment is faster, because instructions are always fetched as a ! pair from a longword boundary. */ ! #define FUNCTION_BOUNDARY \ ! (TARGET_SMALLCODE ? 16 << TARGET_SHMEDIA : (1 << CACHE_LOG) * 8) /* On SH5, the lowest bit is used to indicate SHmedia functions, so the vbit must go into the delta field of --- 563,571 ---- The SH2/3 have 16 byte cache lines, and the SH4 has a 32 byte cache line */ #define CACHE_LOG (TARGET_CACHE32 ? 5 : TARGET_SH2 ? 4 : 2) ! /* ABI given & required minimum allocation boundary (in *bits*) for the ! code of a function. */ ! #define FUNCTION_BOUNDARY (16 << TARGET_SHMEDIA) /* On SH5, the lowest bit is used to indicate SHmedia functions, so the vbit must go into the delta field of *************** do { \ *** 501,510 **** && (ALIGN) < FASTEST_ALIGNMENT) \ ? FASTEST_ALIGNMENT : (ALIGN)) - #ifndef MAX_OFILE_ALIGNMENT - #define MAX_OFILE_ALIGNMENT 128 - #endif - /* Make arrays of chars word-aligned for the same reasons. */ #define DATA_ALIGNMENT(TYPE, ALIGN) \ (TREE_CODE (TYPE) == ARRAY_TYPE \ --- 588,593 ---- *************** extern char sh_additional_register_names *** 843,868 **** would require a tertiary reload when reloading from / to memory, and a secondary reload to reload from / to general regs; that seems to be a loosing proposition. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ (SPECIAL_REGISTER_P (REGNO) ? (MODE) == SImode \ : (REGNO) == FPUL_REG ? (MODE) == SImode || (MODE) == SFmode \ : FP_REGISTER_P (REGNO) && (MODE) == SFmode \ ? 1 \ : (MODE) == V2SFmode \ ! ? (FP_REGISTER_P (REGNO) && ((REGNO) - FIRST_FP_REG) % 2 == 0) \ : (MODE) == V4SFmode \ ! ? (FP_REGISTER_P (REGNO) && ((REGNO) - FIRST_FP_REG) % 4 == 0) \ : (MODE) == V16SFmode \ ? (TARGET_SHMEDIA \ ? (FP_REGISTER_P (REGNO) && ((REGNO) - FIRST_FP_REG) % 16 == 0) \ : (REGNO) == FIRST_XD_REG) \ : FP_REGISTER_P (REGNO) \ ! ? ((MODE) == SFmode \ ! || (TARGET_SHMEDIA && (MODE) == SImode) \ || ((TARGET_SH3E || TARGET_SHMEDIA) && (MODE) == SCmode) \ || (((TARGET_SH4 && (MODE) == DFmode) || (MODE) == DCmode \ || (TARGET_SHMEDIA && ((MODE) == DFmode || (MODE) == DImode \ ! || (MODE) == V2SFmode))) \ && (((REGNO) - FIRST_FP_REG) & 1) == 0)) \ : XD_REGISTER_P (REGNO) \ ? (MODE) == DFmode \ --- 926,954 ---- would require a tertiary reload when reloading from / to memory, and a secondary reload to reload from / to general regs; that seems to be a loosing proposition. */ + /* We want to allow TImode FP regs so that when V4SFmode is loaded as TImode, + it won't be ferried through GP registers first. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ (SPECIAL_REGISTER_P (REGNO) ? (MODE) == SImode \ : (REGNO) == FPUL_REG ? (MODE) == SImode || (MODE) == SFmode \ : FP_REGISTER_P (REGNO) && (MODE) == SFmode \ ? 1 \ : (MODE) == V2SFmode \ ! ? ((FP_REGISTER_P (REGNO) && ((REGNO) - FIRST_FP_REG) % 2 == 0) \ ! || GENERAL_REGISTER_P (REGNO)) \ : (MODE) == V4SFmode \ ! ? ((FP_REGISTER_P (REGNO) && ((REGNO) - FIRST_FP_REG) % 4 == 0) \ ! || (! TARGET_SHMEDIA && GENERAL_REGISTER_P (REGNO))) \ : (MODE) == V16SFmode \ ? (TARGET_SHMEDIA \ ? (FP_REGISTER_P (REGNO) && ((REGNO) - FIRST_FP_REG) % 16 == 0) \ : (REGNO) == FIRST_XD_REG) \ : FP_REGISTER_P (REGNO) \ ! ? ((MODE) == SFmode || (MODE) == SImode \ || ((TARGET_SH3E || TARGET_SHMEDIA) && (MODE) == SCmode) \ || (((TARGET_SH4 && (MODE) == DFmode) || (MODE) == DCmode \ || (TARGET_SHMEDIA && ((MODE) == DFmode || (MODE) == DImode \ ! || (MODE) == V2SFmode || (MODE) == TImode))) \ && (((REGNO) - FIRST_FP_REG) & 1) == 0)) \ : XD_REGISTER_P (REGNO) \ ? (MODE) == DFmode \ *************** extern char sh_additional_register_names *** 874,881 **** /* Value is 1 if MODE is a supported vector mode. */ #define VECTOR_MODE_SUPPORTED_P(MODE) \ ! (TARGET_FPU_ANY \ ! && ((MODE) == V2SFmode || (MODE) == V4SFmode || (MODE) == V16SFmode)) /* Value is 1 if it is a good idea to tie two pseudo registers when one has mode MODE1 and one has mode MODE2. --- 960,970 ---- /* Value is 1 if MODE is a supported vector mode. */ #define VECTOR_MODE_SUPPORTED_P(MODE) \ ! ((TARGET_FPU_ANY \ ! && ((MODE) == V2SFmode || (MODE) == V4SFmode || (MODE) == V16SFmode)) \ ! || (TARGET_SHMEDIA \ ! && ((MODE) == V8QImode || (MODE) == V2HImode || (MODE) == V4HImode \ ! || (MODE) == V2SImode))) /* Value is 1 if it is a good idea to tie two pseudo registers when one has mode MODE1 and one has mode MODE2. *************** extern char sh_additional_register_names *** 892,897 **** --- 981,992 ---- && (GET_MODE_SIZE (MODE2) <= 4)) \ : ((MODE1) != SFmode && (MODE2) != SFmode)))) + /* A C expression that is nonzero if hard register NEW_REG can be + considered for use as a rename register for OLD_REG register */ + + #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \ + sh_hard_regno_rename_ok (OLD_REG, NEW_REG) + /* Specify the registers used for certain standard purposes. The values of these macros are register numbers. */ *************** extern char sh_additional_register_names *** 910,916 **** /* Register to hold the addressing base for position independent code access to data items. */ ! #define PIC_OFFSET_TABLE_REGNUM PIC_REG #define GOT_SYMBOL_NAME "*_GLOBAL_OFFSET_TABLE_" --- 1005,1011 ---- /* Register to hold the addressing base for position independent code access to data items. */ ! #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? PIC_REG : INVALID_REGNUM) #define GOT_SYMBOL_NAME "*_GLOBAL_OFFSET_TABLE_" *************** extern char sh_additional_register_names *** 985,991 **** #define RETURN_IN_MEMORY(TYPE) \ (TARGET_SH5 \ ? ((TYPE_MODE (TYPE) == BLKmode \ ! ? int_size_in_bytes (TYPE) \ : GET_MODE_SIZE (TYPE_MODE (TYPE))) > 8) \ : (TYPE_MODE (TYPE) == BLKmode \ || TARGET_HITACHI && TREE_CODE (TYPE) == RECORD_TYPE)) --- 1080,1086 ---- #define RETURN_IN_MEMORY(TYPE) \ (TARGET_SH5 \ ? ((TYPE_MODE (TYPE) == BLKmode \ ! ? (unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) \ : GET_MODE_SIZE (TYPE_MODE (TYPE))) > 8) \ : (TYPE_MODE (TYPE) == BLKmode \ || TARGET_HITACHI && TREE_CODE (TYPE) == RECORD_TYPE)) *************** enum reg_class *** 1047,1052 **** --- 1142,1148 ---- GENERAL_REGS, FP0_REGS, FP_REGS, + DF_HI_REGS, DF_REGS, FPSCR_REGS, GENERAL_FP_REGS, *************** enum reg_class *** 1070,1075 **** --- 1166,1172 ---- "GENERAL_REGS", \ "FP0_REGS", \ "FP_REGS", \ + "DF_HI_REGS", \ "DF_REGS", \ "FPSCR_REGS", \ "GENERAL_FP_REGS", \ *************** enum reg_class *** 1103,1108 **** --- 1200,1207 ---- { 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000 }, \ /* FP_REGS: */ \ { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, \ + /* DF_HI_REGS: Initialized in CONDITIONAL_REGISTER_USAGE. */ \ + { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x0000ff00 }, \ /* DF_REGS: */ \ { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x0000ff00 }, \ /* FPSCR_REGS: */ \ *************** extern int regno_reg_class[FIRST_PSEUDO_ *** 1161,1167 **** /* Get reg_class from a letter such as appears in the machine description. */ ! extern const enum reg_class reg_class_from_letter[]; #define REG_CLASS_FROM_LETTER(C) \ ( ISLOWER (C) ? reg_class_from_letter[(C)-'a'] : NO_REGS ) --- 1260,1266 ---- /* Get reg_class from a letter such as appears in the machine description. */ ! extern enum reg_class reg_class_from_letter[]; #define REG_CLASS_FROM_LETTER(C) \ ( ISLOWER (C) ? reg_class_from_letter[(C)-'a'] : NO_REGS ) *************** extern const enum reg_class reg_class_fr *** 1226,1250 **** : (CLASS)) \ #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,X) \ ! ((((((CLASS) == FP_REGS || (CLASS) == FP0_REGS \ ! || (CLASS) == DF_REGS) \ ! && (GET_CODE (X) == REG && GENERAL_OR_AP_REGISTER_P (REGNO (X)))) \ ! || (((CLASS) == GENERAL_REGS || (CLASS) == R0_REGS) \ && GET_CODE (X) == REG \ && FP_REGISTER_P (REGNO (X)))) \ && ! TARGET_SHMEDIA \ ! && MODE == SFmode) \ ? FPUL_REGS \ ! : ((CLASS) == FPUL_REGS \ && (GET_CODE (X) == MEM \ || (GET_CODE (X) == REG \ && (REGNO (X) >= FIRST_PSEUDO_REGISTER \ || REGNO (X) == T_REG \ || system_reg_operand (X, VOIDmode))))) \ ? GENERAL_REGS \ - : (((CLASS) == FP_REGS || (CLASS) == DF_REGS) && TARGET_SHMEDIA \ - && immediate_operand ((X), (MODE))) \ - ? GENERAL_REGS \ : ((CLASS) == TARGET_REGS \ || (TARGET_SHMEDIA && (CLASS) == SIBCALL_REGS)) \ ? ((target_operand ((X), (MODE)) \ --- 1325,1350 ---- : (CLASS)) \ #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,X) \ ! ((((REGCLASS_HAS_FP_REG (CLASS) \ ! && (GET_CODE (X) == REG \ ! && (GENERAL_OR_AP_REGISTER_P (REGNO (X)) \ ! || (FP_REGISTER_P (REGNO (X)) && (MODE) == SImode \ ! && TARGET_FMOVD)))) \ ! || (REGCLASS_HAS_GENERAL_REG (CLASS) \ && GET_CODE (X) == REG \ && FP_REGISTER_P (REGNO (X)))) \ && ! TARGET_SHMEDIA \ ! && ((MODE) == SFmode || (MODE) == SImode)) \ ? FPUL_REGS \ ! : (((CLASS) == FPUL_REGS \ ! || (REGCLASS_HAS_FP_REG (CLASS) \ ! && ! TARGET_SHMEDIA && MODE == SImode)) \ && (GET_CODE (X) == MEM \ || (GET_CODE (X) == REG \ && (REGNO (X) >= FIRST_PSEUDO_REGISTER \ || REGNO (X) == T_REG \ || system_reg_operand (X, VOIDmode))))) \ ? GENERAL_REGS \ : ((CLASS) == TARGET_REGS \ || (TARGET_SHMEDIA && (CLASS) == SIBCALL_REGS)) \ ? ((target_operand ((X), (MODE)) \ *************** extern const enum reg_class reg_class_fr *** 1253,1262 **** : (((CLASS) == MAC_REGS || (CLASS) == PR_REGS) \ && GET_CODE (X) == REG && ! GENERAL_REGISTER_P (REGNO (X)) \ && (CLASS) != REGNO_REG_CLASS (REGNO (X))) \ ? GENERAL_REGS : NO_REGS) #define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,X) \ ! ((((CLASS) == FP_REGS || (CLASS) == FP0_REGS || (CLASS) == DF_REGS) \ && ! TARGET_SHMEDIA \ && immediate_operand ((X), (MODE)) \ && ! ((fp_zero_operand (X) || fp_one_operand (X)) \ --- 1353,1365 ---- : (((CLASS) == MAC_REGS || (CLASS) == PR_REGS) \ && GET_CODE (X) == REG && ! GENERAL_REGISTER_P (REGNO (X)) \ && (CLASS) != REGNO_REG_CLASS (REGNO (X))) \ + ? GENERAL_REGS \ + : ((CLASS) != GENERAL_REGS && GET_CODE (X) == REG \ + && TARGET_REGISTER_P (REGNO (X))) \ ? GENERAL_REGS : NO_REGS) #define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,X) \ ! ((REGCLASS_HAS_FP_REG (CLASS) \ && ! TARGET_SHMEDIA \ && immediate_operand ((X), (MODE)) \ && ! ((fp_zero_operand (X) || fp_one_operand (X)) \ *************** extern const enum reg_class reg_class_fr *** 1264,1271 **** ? R0_REGS \ : (CLASS == FPUL_REGS \ && ((GET_CODE (X) == REG \ ! && (REGNO (X) == MACL_REG || REGNO (X) == MACH_REG \ ! || REGNO (X) == T_REG)))) \ ? GENERAL_REGS \ : CLASS == FPUL_REGS && immediate_operand ((X), (MODE)) \ ? (GET_CODE (X) == CONST_INT && CONST_OK_FOR_I (INTVAL (X)) \ --- 1367,1375 ---- ? R0_REGS \ : (CLASS == FPUL_REGS \ && ((GET_CODE (X) == REG \ ! && (REGNO (X) == MACL_REG || REGNO (X) == MACH_REG \ ! || REGNO (X) == T_REG)) \ ! || GET_CODE (X) == PLUS)) \ ? GENERAL_REGS \ : CLASS == FPUL_REGS && immediate_operand ((X), (MODE)) \ ? (GET_CODE (X) == CONST_INT && CONST_OK_FOR_I (INTVAL (X)) \ *************** extern const enum reg_class reg_class_fr *** 1275,1280 **** --- 1379,1390 ---- && ((GET_CODE (X) == REG && REGNO (X) >= FIRST_PSEUDO_REGISTER) \ || (GET_CODE (X) == MEM && GET_CODE (XEXP ((X), 0)) == PLUS)))\ ? GENERAL_REGS \ + : (REGCLASS_HAS_FP_REG (CLASS) \ + && TARGET_SHMEDIA \ + && immediate_operand ((X), (MODE)) \ + && (X) != CONST0_RTX (GET_MODE (X)) \ + && GET_MODE (X) != V4SFmode) \ + ? GENERAL_REGS \ : SECONDARY_OUTPUT_RELOAD_CLASS((CLASS),(MODE),(X))) /* Return the maximum number of consecutive registers *************** extern const enum reg_class reg_class_fr *** 1286,1298 **** /* If defined, gives a class of registers that cannot be used as the operand of a SUBREG that changes the mode of the object illegally. */ ! #define CLASS_CANNOT_CHANGE_MODE DF_REGS ! ! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ ! ! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ ! (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) /* Stack layout; function entry, exit and calling. */ --- 1396,1406 ---- /* If defined, gives a class of registers that cannot be used as the operand of a SUBREG that changes the mode of the object illegally. */ + /* ??? We need to renumber the internal numbers for the frnn registers + when in little endian in order to allow mode size changes. */ ! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ ! sh_cannot_change_mode_class (FROM, TO, CLASS) /* Stack layout; function entry, exit and calling. */ *************** enum sh_arg_class { SH_ARG_INT = 0, SH_A *** 1441,1447 **** struct sh_args { int arg_count[2]; int force_mem; ! /* Non-zero if a prototype is available for the function. */ int prototype_p; /* The number of an odd floating-point register, that should be used for the next argument of type float. */ --- 1549,1555 ---- struct sh_args { int arg_count[2]; int force_mem; ! /* Nonzero if a prototype is available for the function. */ int prototype_p; /* The number of an odd floating-point register, that should be used for the next argument of type float. */ *************** struct sh_args { *** 1655,1663 **** (CUM).arg_count[(int) SH_ARG_INT] += numregs; \ if (TARGET_SHCOMPACT \ && SHCOMPACT_FORCE_ON_STACK (MODE_, TYPE_)) \ ! (CUM).call_cookie \ ! |= CALL_COOKIE_INT_REG (((CUM).arg_count[(int) SH_ARG_INT] \ ! - numregs), 1); \ else if ((CUM).byref) \ { \ if (! (CUM).outgoing) \ --- 1763,1775 ---- (CUM).arg_count[(int) SH_ARG_INT] += numregs; \ if (TARGET_SHCOMPACT \ && SHCOMPACT_FORCE_ON_STACK (MODE_, TYPE_)) \ ! { \ ! (CUM).call_cookie \ ! |= CALL_COOKIE_INT_REG (((CUM).arg_count[(int) SH_ARG_INT] \ ! - numregs), 1); \ ! /* N.B. We want this also for outgoing. */\ ! (CUM).stack_regs += numregs; \ ! } \ else if ((CUM).byref) \ { \ if (! (CUM).outgoing) \ *************** struct sh_args { *** 1783,1790 **** #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ((! TARGET_SH5 \ && PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \ ! && ((NAMED) \ ! || (! TARGET_HITACHI && (TARGET_SH3E || ! current_function_varargs)))) \ ? gen_rtx_REG ((MODE), \ ((BASE_ARG_REG (MODE) + ROUND_REG ((CUM), (MODE))) \ ^ ((MODE) == SFmode && TARGET_SH4 \ --- 1895,1901 ---- #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ((! TARGET_SH5 \ && PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \ ! && ((NAMED) || !TARGET_HITACHI)) \ ? gen_rtx_REG ((MODE), \ ((BASE_ARG_REG (MODE) + ROUND_REG ((CUM), (MODE))) \ ^ ((MODE) == SFmode && TARGET_SH4 \ *************** struct sh_args { *** 1934,1940 **** : 0) #define SH5_WOULD_BE_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ! (TARGET_SH5 && (MODE) == BLKmode \ && ((CUM).arg_count[(int) SH_ARG_INT] \ + (int_size_in_bytes (TYPE) + 7) / 8) > NPARM_REGS (SImode)) --- 2045,2051 ---- : 0) #define SH5_WOULD_BE_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ! (TARGET_SH5 && ((MODE) == BLKmode || (MODE) == TImode) \ && ((CUM).arg_count[(int) SH_ARG_INT] \ + (int_size_in_bytes (TYPE) + 7) / 8) > NPARM_REGS (SImode)) *************** struct sh_args { *** 1947,1953 **** later. Fortunately, we already have two flags that are part of struct function that tell if a function uses varargs or stdarg. */ #define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) do \ ! if (! current_function_varargs && ! current_function_stdarg) \ abort (); \ while (0) --- 2058,2064 ---- later. Fortunately, we already have two flags that are part of struct function that tell if a function uses varargs or stdarg. */ #define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) do \ ! if (! current_function_stdarg) \ abort (); \ while (0) *************** while (0) *** 1956,1963 **** (VALIST) = sh_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! sh_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 2067,2074 ---- (VALIST) = sh_build_va_list () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! sh_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** while (0) *** 1999,2062 **** 6 000c 00000000 l2: .long function */ /* Length in units of the trampoline for entering a nested function. */ ! #define TRAMPOLINE_SIZE (TARGET_SHMEDIA64 ? 40 : TARGET_SH5 ? 32 : 16) /* Alignment required for a trampoline in bits . */ #define TRAMPOLINE_ALIGNMENT \ ! ((CACHE_LOG < 3 || (TARGET_SMALLCODE && ! TARGET_HARVARD)) ? 32 : 64) /* Emit RTL insns to initialize the variable parts of a trampoline. FNADDR is an RTX for the address of the function's pure code. CXT is an RTX for the static chain value for the function. */ ! #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) do \ ! { \ ! if (TARGET_SH5) \ ! { \ ! rtx tramp_templ = gen_rtx_SYMBOL_REF (Pmode, \ ! "__GCC_nested_trampoline"); \ ! int fixed_len = TRAMPOLINE_SIZE - 2 * GET_MODE_SIZE (Pmode); \ ! \ ! tramp_templ = gen_datalabel_ref (tramp_templ); \ ! emit_block_move (gen_rtx_MEM (BLKmode, (TRAMP)), \ ! gen_rtx_MEM (BLKmode, tramp_templ), \ ! GEN_INT (fixed_len)); \ ! emit_move_insn (gen_rtx_MEM (Pmode, plus_constant ((TRAMP), \ ! fixed_len)), \ ! (FNADDR)); \ ! emit_move_insn (gen_rtx_MEM (Pmode, \ ! plus_constant ((TRAMP), \ ! fixed_len \ ! + GET_MODE_SIZE (Pmode))), \ ! (CXT)); \ ! emit_insn (gen_ic_invalidate_line (TRAMP)); \ ! break; \ ! } \ ! emit_move_insn (gen_rtx_MEM (SImode, (TRAMP)), \ ! GEN_INT (trunc_int_for_mode \ ! (TARGET_LITTLE_ENDIAN ? 0xd301d202 : 0xd202d301,\ ! SImode))); \ ! emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 4)), \ ! GEN_INT (TARGET_LITTLE_ENDIAN ? 0x0009422b : 0x422b0009));\ ! emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 8)), \ ! (CXT)); \ ! emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 12)), \ ! (FNADDR)); \ ! if (TARGET_HARVARD) \ ! { \ ! if (TARGET_USERMODE) \ ! emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__ic_invalidate"),\ ! 0, VOIDmode, 1, (TRAMP), SImode); \ ! else \ ! emit_insn (gen_ic_invalidate_line (TRAMP)); \ ! } \ ! } while (0) /* On SH5, trampolines are SHmedia code, so add 1 to the address. */ #define TRAMPOLINE_ADJUST_ADDRESS(TRAMP) do \ { \ ! if (TARGET_SH5) \ (TRAMP) = expand_simple_binop (Pmode, PLUS, (TRAMP), GEN_INT (1), \ gen_reg_rtx (Pmode), 0, \ OPTAB_LIB_WIDEN); \ --- 2110,2134 ---- 6 000c 00000000 l2: .long function */ /* Length in units of the trampoline for entering a nested function. */ ! #define TRAMPOLINE_SIZE (TARGET_SHMEDIA64 ? 40 : TARGET_SH5 ? 24 : 16) /* Alignment required for a trampoline in bits . */ #define TRAMPOLINE_ALIGNMENT \ ! ((CACHE_LOG < 3 || (TARGET_SMALLCODE && ! TARGET_HARVARD)) ? 32 \ ! : TARGET_SHMEDIA ? 256 : 64) /* Emit RTL insns to initialize the variable parts of a trampoline. FNADDR is an RTX for the address of the function's pure code. CXT is an RTX for the static chain value for the function. */ ! #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ ! sh_initialize_trampoline ((TRAMP), (FNADDR), (CXT)) /* On SH5, trampolines are SHmedia code, so add 1 to the address. */ #define TRAMPOLINE_ADJUST_ADDRESS(TRAMP) do \ { \ ! if (TARGET_SHMEDIA) \ (TRAMP) = expand_simple_binop (Pmode, PLUS, (TRAMP), GEN_INT (1), \ gen_reg_rtx (Pmode), 0, \ OPTAB_LIB_WIDEN); \ *************** while (0) *** 2069,2076 **** #define RETURN_ADDR_RTX(COUNT, FRAME) \ (((COUNT) == 0) \ ! ? get_hard_reg_initial_val (Pmode, PR_REG) \ : (rtx) 0) /* Generate necessary RTL for __builtin_saveregs(). */ #define EXPAND_BUILTIN_SAVEREGS() sh_builtin_saveregs () --- 2141,2156 ---- #define RETURN_ADDR_RTX(COUNT, FRAME) \ (((COUNT) == 0) \ ! ? get_hard_reg_initial_val (Pmode, TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG) \ : (rtx) 0) + + /* A C expression whose value is RTL representing the location of the + incoming return address at the beginning of any function, before the + prologue. This RTL is either a REG, indicating that the return + value is saved in REG, or a MEM representing a location in + the stack. */ + #define INCOMING_RETURN_ADDR_RTX \ + gen_rtx_REG (Pmode, TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG) /* Generate necessary RTL for __builtin_saveregs(). */ #define EXPAND_BUILTIN_SAVEREGS() sh_builtin_saveregs () *************** while (0) *** 2122,2128 **** #define LEGITIMATE_CONSTANT_P(X) \ (TARGET_SHMEDIA \ ! ? (GET_MODE (X) != DFmode \ || (X) == CONST0_RTX (GET_MODE (X)) \ || ! TARGET_SHMEDIA_FPU \ || TARGET_SHMEDIA64) \ --- 2202,2209 ---- #define LEGITIMATE_CONSTANT_P(X) \ (TARGET_SHMEDIA \ ! ? ((GET_MODE (X) != DFmode \ ! && GET_MODE_CLASS (GET_MODE (X)) != MODE_VECTOR_FLOAT) \ || (X) == CONST0_RTX (GET_MODE (X)) \ || ! TARGET_SHMEDIA_FPU \ || TARGET_SHMEDIA64) \ *************** while (0) *** 2217,2225 **** (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \ && XINT (XEXP ((OP), 0), 1) == UNSPEC_GOTPLT) #define GOTOFF_P(OP) \ ! (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \ ! && XINT (XEXP ((OP), 0), 1) == UNSPEC_GOTOFF) #define PIC_ADDR_P(OP) \ (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \ --- 2298,2312 ---- (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \ && XINT (XEXP ((OP), 0), 1) == UNSPEC_GOTPLT) + #define UNSPEC_GOTOFF_P(OP) \ + (GET_CODE (OP) == UNSPEC && XINT ((OP), 1) == UNSPEC_GOTOFF) + #define GOTOFF_P(OP) \ ! (GET_CODE (OP) == CONST \ ! && (UNSPEC_GOTOFF_P (XEXP ((OP), 0)) \ ! || (GET_CODE (XEXP ((OP), 0)) == PLUS \ ! && UNSPEC_GOTOFF_P (XEXP (XEXP ((OP), 0), 0)) \ ! && GET_CODE (XEXP (XEXP ((OP), 0), 1)) == CONST_INT))) #define PIC_ADDR_P(OP) \ (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \ *************** while (0) *** 2244,2253 **** --- 2331,2354 ---- #define EXTRA_CONSTRAINT_T(OP) \ (NON_PIC_REFERENCE_P (OP)) + /* A zero in any shape or form. */ + #define EXTRA_CONSTRAINT_U(OP) \ + ((OP) == CONST0_RTX (GET_MODE (OP))) + + /* Any vector constant we can handle. */ + #define EXTRA_CONSTRAINT_W(OP) \ + (GET_CODE (OP) == CONST_VECTOR \ + && (sh_rep_vec ((OP), VOIDmode) \ + || (HOST_BITS_PER_WIDE_INT >= 64 \ + ? sh_const_vec ((OP), VOIDmode) \ + : sh_1el_vec ((OP), VOIDmode)))) + #define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' ? EXTRA_CONSTRAINT_Q (OP) \ : (C) == 'S' ? EXTRA_CONSTRAINT_S (OP) \ : (C) == 'T' ? EXTRA_CONSTRAINT_T (OP) \ + : (C) == 'U' ? EXTRA_CONSTRAINT_U (OP) \ + : (C) == 'W' ? EXTRA_CONSTRAINT_W (OP) \ : 0) /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression *************** while (0) *** 2495,2501 **** /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ ! #define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode) #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \ ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \ --- 2596,2602 ---- /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ ! #define CASE_VECTOR_MODE ((! optimize || TARGET_BIGTABLE) ? SImode : HImode) #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \ ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \ *************** while (0) *** 2521,2540 **** /* 'char' is signed by default. */ #define DEFAULT_SIGNED_CHAR 1 - /* We -Define SIZE_TYPE in CPP_SPEC. */ - #define NO_BUILTIN_SIZE_TYPE 1 - /* The type of size_t unsigned int. */ #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int") - #define NO_BUILTIN_PTRDIFF_TYPE 1 - #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int") #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE 16 /* Don't cse the address of the function being compiled. */ /*#define NO_RECURSIVE_FUNCTION_CSE 1*/ --- 2622,2638 ---- /* 'char' is signed by default. */ #define DEFAULT_SIGNED_CHAR 1 /* The type of size_t unsigned int. */ #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int") #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int") #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE 16 + #define SH_ELF_WCHAR_TYPE "long int" + /* Don't cse the address of the function being compiled. */ /*#define NO_RECURSIVE_FUNCTION_CSE 1*/ *************** while (0) *** 2558,2564 **** will either zero-extend or sign-extend. The value of this macro should be the code that says which one of the two operations is implicitly done, NIL if none. */ ! #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND /* Define if loading short immediate values into registers sign extends. */ #define SHORT_IMMEDIATES_SIGN_EXTEND --- 2656,2667 ---- will either zero-extend or sign-extend. The value of this macro should be the code that says which one of the two operations is implicitly done, NIL if none. */ ! /* For SHmedia, we can truncate to QImode easier using zero extension. */ ! /* FP registers can load SImode values, but don't implicitly sign-extend ! them to DImode. */ ! #define LOAD_EXTEND_OP(MODE) \ ! (((MODE) == QImode && TARGET_SHMEDIA) ? ZERO_EXTEND \ ! : (MODE) != SImode ? SIGN_EXTEND : NIL) /* Define if loading short immediate values into registers sign extends. */ #define SHORT_IMMEDIATES_SIGN_EXTEND *************** while (0) *** 2604,2611 **** case CONST_INT: \ if (TARGET_SHMEDIA) \ { \ if (CONST_OK_FOR_J (INTVAL (RTX))) \ ! return COSTS_N_INSNS (1); \ else if (CONST_OK_FOR_J (INTVAL (RTX) >> 16)) \ return COSTS_N_INSNS (2); \ else if (CONST_OK_FOR_J ((INTVAL (RTX) >> 16) >> 16)) \ --- 2707,2722 ---- case CONST_INT: \ if (TARGET_SHMEDIA) \ { \ + if (INTVAL (RTX) == 0) \ + return 0; \ + if ((OUTER_CODE) == AND && and_operand ((RTX), DImode)) \ + return 0; \ + if (((OUTER_CODE) == IOR || (OUTER_CODE) == XOR \ + || (OUTER_CODE) == PLUS) \ + && CONST_OK_FOR_P (INTVAL (RTX))) \ + return 0; \ if (CONST_OK_FOR_J (INTVAL (RTX))) \ ! return COSTS_N_INSNS ((OUTER_CODE) != SET); \ else if (CONST_OK_FOR_J (INTVAL (RTX) >> 16)) \ return COSTS_N_INSNS (2); \ else if (CONST_OK_FOR_J ((INTVAL (RTX) >> 16) >> 16)) \ *************** while (0) *** 2684,2722 **** /* Position Independent Code. */ - /* Define this macro if references to a symbol must be treated - differently depending on something about the variable or function - named by the symbol (such as what section it is in). - - On SH, if using PIC, mark a SYMBOL_REF for a non-global symbol - so that we may access it using GOTOFF instead of GOT. */ - - #define ENCODE_SECTION_INFO(DECL) \ - do \ - { \ - if (flag_pic) \ - { \ - rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ - \ - SYMBOL_REF_FLAG (XEXP (rtl, 0)) = \ - (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - || ! TREE_PUBLIC (DECL)); \ - } \ - if (TARGET_SH5) \ - { \ - rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ - ? TREE_CST_RTL (DECL) \ - : TREE_CODE (DECL) != VAR_DECL \ - ? NULL_RTX \ - : DECL_RTL (DECL)); \ - \ - if (rtl && GET_CODE (rtl) == MEM \ - && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF) \ - XEXP (rtl, 0) = gen_datalabel_ref (XEXP (rtl, 0)); \ - } \ - } \ - while (0) /* The prefix used to mark SYMBOL_REFs that refer to data symbols. */ #define SH_DATALABEL_ENCODING "#" --- 2795,2800 ---- *************** while (0) *** 2732,2746 **** #define STRIP_DATALABEL_ENCODING(VAR, SYM_NAME) \ (VAR) = (SYM_NAME) + (DATALABEL_SYMNAME_P (SYM_NAME) \ ? strlen (SH_DATALABEL_ENCODING) : 0) - #define STRIP_NAME_ENCODING(VAR, SYM_NAME) \ - STRIP_DATALABEL_ENCODING((VAR), (SYM_NAME)), \ - (VAR) += (*(VAR) == '*') /* We can't directly access anything that contains a symbol, nor can we indirect via the constant pool. */ #define LEGITIMATE_PIC_OPERAND_P(X) \ (! nonpic_symbol_mentioned_p (X) \ ! && (! CONSTANT_POOL_ADDRESS_P (X) \ || ! nonpic_symbol_mentioned_p (get_pool_constant (X)))) #define SYMBOLIC_CONST_P(X) \ --- 2810,2822 ---- #define STRIP_DATALABEL_ENCODING(VAR, SYM_NAME) \ (VAR) = (SYM_NAME) + (DATALABEL_SYMNAME_P (SYM_NAME) \ ? strlen (SH_DATALABEL_ENCODING) : 0) /* We can't directly access anything that contains a symbol, nor can we indirect via the constant pool. */ #define LEGITIMATE_PIC_OPERAND_P(X) \ (! nonpic_symbol_mentioned_p (X) \ ! && (GET_CODE (X) != SYMBOL_REF \ ! || ! CONSTANT_POOL_ADDRESS_P (X) \ || ! nonpic_symbol_mentioned_p (get_pool_constant (X)))) #define SYMBOLIC_CONST_P(X) \ *************** while (0) *** 2758,2794 **** /* Compute extra cost of moving data between one register class and another. */ ! /* Regclass always uses 2 for moves in the same register class; ! If SECONDARY*_RELOAD_CLASS says something about the src/dst pair, ! it uses this information. Hence, the general register <-> floating point register information here is not used for SFmode. */ #define REGISTER_MOVE_COST(MODE, SRCCLASS, DSTCLASS) \ ! (((((DSTCLASS) == T_REGS) || ((DSTCLASS) == PR_REGS)) ? 10 \ ! : ((((DSTCLASS) == FP0_REGS || (DSTCLASS) == FP_REGS || (DSTCLASS) == DF_REGS) \ ! && ((SRCCLASS) == GENERAL_REGS || (SRCCLASS) == R0_REGS)) \ ! || (((DSTCLASS) == GENERAL_REGS || (DSTCLASS) == R0_REGS) \ ! && ((SRCCLASS) == FP0_REGS || (SRCCLASS) == FP_REGS \ ! || (SRCCLASS) == DF_REGS))) \ ! ? (TARGET_SHMEDIA ? 2 \ ! : TARGET_FMOVD ? 8 : 12) \ ! : (((DSTCLASS) == FPUL_REGS \ ! && ((SRCCLASS) == GENERAL_REGS || (SRCCLASS) == R0_REGS)) \ ! || (SRCCLASS == FPUL_REGS \ ! && ((DSTCLASS) == GENERAL_REGS || (DSTCLASS) == R0_REGS))) \ ! ? 5 \ ! : (((DSTCLASS) == FPUL_REGS \ ! && ((SRCCLASS) == PR_REGS || (SRCCLASS) == MAC_REGS \ ! || (SRCCLASS) == T_REGS)) \ ! || ((SRCCLASS) == FPUL_REGS \ ! && ((DSTCLASS) == PR_REGS || (DSTCLASS) == MAC_REGS))) \ ! ? 7 \ ! : (((SRCCLASS) == TARGET_REGS && (DSTCLASS) != GENERAL_REGS) \ ! || ((DSTCLASS) == TARGET_REGS && (SRCCLASS) != GENERAL_REGS)) \ ! ? 20 \ ! : (((SRCCLASS) == FPSCR_REGS && (DSTCLASS) != GENERAL_REGS) \ ! || ((DSTCLASS) == FPSCR_REGS && (SRCCLASS) != GENERAL_REGS)) \ ! ? 4 \ ! : 2) * ((MODE) == V16SFmode ? 8 : (MODE) == V4SFmode ? 2 : 1)) /* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option? This would be so that people with slow memory systems could generate --- 2834,2853 ---- /* Compute extra cost of moving data between one register class and another. */ ! /* If SECONDARY*_RELOAD_CLASS says something about the src/dst pair, regclass ! uses this information. Hence, the general register <-> floating point register information here is not used for SFmode. */ + + #define REGCLASS_HAS_GENERAL_REG(CLASS) \ + ((CLASS) == GENERAL_REGS || (CLASS) == R0_REGS \ + || (! TARGET_SHMEDIA && (CLASS) == SIBCALL_REGS)) + + #define REGCLASS_HAS_FP_REG(CLASS) \ + ((CLASS) == FP0_REGS || (CLASS) == FP_REGS \ + || (CLASS) == DF_REGS || (CLASS) == DF_HI_REGS) + #define REGISTER_MOVE_COST(MODE, SRCCLASS, DSTCLASS) \ ! sh_register_move_cost ((MODE), (SRCCLASS), (DSTCLASS)) /* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option? This would be so that people with slow memory systems could generate *************** while (0) *** 2812,2823 **** #define ASM_FILE_START(STREAM) \ output_file_start (STREAM) - #define ASM_FILE_END(STREAM) - #define ASM_APP_ON "" #define ASM_APP_OFF "" #define FILE_ASM_OP "\t.file\n" - #define IDENT_ASM_OP "\t.ident\t" #define SET_ASM_OP "\t.set\t" /* How to change between sections. */ --- 2871,2879 ---- *************** while (0) *** 2864,2872 **** which could be text or it could be a user defined section. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 - /* Switch into a generic section. */ - #define TARGET_ASM_NAMED_SECTION sh_asm_named_section - #undef DO_GLOBAL_CTORS_BODY #define DO_GLOBAL_CTORS_BODY \ { \ --- 2920,2925 ---- *************** while (0) *** 2902,2909 **** /* DBX register number for a given compiler register number. */ /* GDB has FPUL at 23 and FP0 at 25, so we must add one to all FP registers to match gdb. */ ! /* If you change this macro, make sure you update it in elf.h too. */ ! #define DBX_REGISTER_NUMBER(REGNO) \ (GENERAL_REGISTER_P (REGNO) \ ? ((REGNO) - FIRST_GENERAL_REG) \ : FP_REGISTER_P (REGNO) \ --- 2955,2965 ---- /* DBX register number for a given compiler register number. */ /* GDB has FPUL at 23 and FP0 at 25, so we must add one to all FP registers to match gdb. */ ! /* svr4.h undefines this macro, yet we really want to use the same numbers ! for coff as for elf, so we go via another macro: SH_DBX_REGISTER_NUMBER. */ ! #define DBX_REGISTER_NUMBER(REGNO) SH_DBX_REGISTER_NUMBER (REGNO) ! ! #define SH_DBX_REGISTER_NUMBER(REGNO) \ (GENERAL_REGISTER_P (REGNO) \ ? ((REGNO) - FIRST_GENERAL_REG) \ : FP_REGISTER_P (REGNO) \ *************** while (0) *** 2915,2920 **** --- 2971,2978 ---- ? ((REGNO) - FIRST_TARGET_REG + 68) \ : (REGNO) == PR_REG \ ? (TARGET_SH5 ? 241 : 17) \ + : (REGNO) == PR_MEDIA_REG \ + ? (TARGET_SH5 ? 18 : -1) \ : (REGNO) == T_REG \ ? (TARGET_SH5 ? 242 : 18) \ : (REGNO) == GBR_REG \ *************** while (0) *** 2954,2963 **** } \ while (0) - /* Output a label definition. */ - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0) - /* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */ --- 3012,3017 ---- *************** while (0) *** 2966,2996 **** if ((LOG) != 0) \ fprintf ((FILE), "\t.align %d\n", (LOG)) ! /* Output a function label definition. */ ! #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \ ! ASM_OUTPUT_LABEL((STREAM), (NAME)) ! ! /* Output a globalising directive for a label. */ ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! (fprintf ((STREAM), "\t.global\t"), \ ! assemble_name ((STREAM), (NAME)), \ ! fputc ('\n', (STREAM))) ! ! /* The prefix to add to user-visible assembler symbols. */ ! ! #define USER_LABEL_PREFIX "_" ! ! /* The prefix to add to an internally generated label. */ ! ! #define LOCAL_LABEL_PREFIX "" ! ! /* Make an internal label into a string. */ ! #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ ! sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM)) ! ! /* Output an internal label definition. */ ! #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ ! asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM)) /* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE) */ --- 3020,3027 ---- if ((LOG) != 0) \ fprintf ((FILE), "\t.align %d\n", (LOG)) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global\t" /* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE) */ *************** while (0) *** 3038,3074 **** /* Output an absolute table element. */ #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \ ! if (TARGET_BIGTABLE) \ ! asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \ else \ ! asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); \ ! ! /* Output various types of constants. */ ! ! /* Loop alignment is now done in machine_dependent_reorg, so that ! branch shortening can know about it. */ ! ! /* This is how to output an assembler line ! that says to advance the location counter by SIZE bytes. */ ! ! #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf ((FILE), "\t.space %d\n", (SIZE)) ! ! /* This says how to output an assembler line ! to define a global common symbol. */ ! ! #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ! ( fputs ("\t.comm ", (FILE)), \ ! assemble_name ((FILE), (NAME)), \ ! fprintf ((FILE), ",%d\n", (SIZE))) ! ! /* This says how to output an assembler line ! to define a local common symbol. */ - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs ("\t.lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (SIZE))) /* A C statement to be executed just prior to the output of assembler code for INSN, to modify the extracted operands so --- 3069,3079 ---- /* Output an absolute table element. */ #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \ ! if (! optimize || TARGET_BIGTABLE) \ ! asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \ else \ ! asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); /* A C statement to be executed just prior to the output of assembler code for INSN, to modify the extracted operands so *************** while (0) *** 3096,3102 **** #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ ((CHAR) == '.' || (CHAR) == '#' || (CHAR) == '@' || (CHAR) == ',' \ ! || (CHAR) == '$') /* Recognize machine-specific patterns that may appear within constants. Used for PIC-specific UNSPECs. */ --- 3101,3107 ---- #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ ((CHAR) == '.' || (CHAR) == '#' || (CHAR) == '@' || (CHAR) == ',' \ ! || (CHAR) == '$'|| (CHAR) == '\'') /* Recognize machine-specific patterns that may appear within constants. Used for PIC-specific UNSPECs. */ *************** extern int current_function_interrupt; *** 3207,3213 **** extern struct rtx_def *sp_switch; extern int rtx_equal_function_value_matters; - extern struct rtx_def *fpscr_rtx; /* Instructions with unfilled delay slots take up an --- 3212,3217 ---- *************** extern struct rtx_def *fpscr_rtx; *** 3219,3241 **** /* Define the codes that are matched by predicates in sh.c. */ #define PREDICATE_CODES \ {"arith_operand", {SUBREG, REG, CONST_INT}}, \ {"arith_reg_operand", {SUBREG, REG}}, \ ! {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \ ! {"binary_float_operator", {PLUS, MULT}}, \ {"commutative_float_operator", {PLUS, MULT}}, \ {"fp_arith_reg_operand", {SUBREG, REG}}, \ {"fpscr_operand", {REG}}, \ {"fpul_operand", {REG}}, \ {"general_movsrc_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, MEM}}, \ {"general_movdst_operand", {SUBREG, REG, MEM}}, \ {"logical_operand", {SUBREG, REG, CONST_INT}}, \ {"noncommutative_float_operator", {MINUS, DIV}}, \ {"shmedia_6bit_operand", {SUBREG, REG, CONST_INT}}, \ {"target_reg_operand", {SUBREG, REG}}, \ ! {"target_operand", {SUBREG, REG, LABEL_REF, SYMBOL_REF}}, \ {"register_operand", {SUBREG, REG}}, \ ! {"symbol_ref_operand", {SYMBOL_REF}}, /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, --- 3223,3272 ---- /* Define the codes that are matched by predicates in sh.c. */ #define PREDICATE_CODES \ + {"and_operand", {SUBREG, REG, CONST_INT}}, \ + {"any_register_operand", {SUBREG, REG}}, \ {"arith_operand", {SUBREG, REG, CONST_INT}}, \ + {"arith_reg_dest", {SUBREG, REG}}, \ {"arith_reg_operand", {SUBREG, REG}}, \ ! {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_VECTOR}}, \ ! {"binary_float_operator", {PLUS, MINUS, MULT, DIV}}, \ ! {"binary_logical_operator", {AND, IOR, XOR}}, \ {"commutative_float_operator", {PLUS, MULT}}, \ + {"equality_comparison_operator", {EQ,NE}}, \ + {"extend_reg_operand", {SUBREG, REG, TRUNCATE}}, \ + {"extend_reg_or_0_operand", {SUBREG, REG, TRUNCATE, CONST_INT}}, \ {"fp_arith_reg_operand", {SUBREG, REG}}, \ {"fpscr_operand", {REG}}, \ {"fpul_operand", {REG}}, \ + {"general_extend_operand", {SUBREG, REG, MEM, TRUNCATE}}, \ {"general_movsrc_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, MEM}}, \ {"general_movdst_operand", {SUBREG, REG, MEM}}, \ + {"greater_comparison_operator", {GT,GE,GTU,GEU}}, \ + {"int_gpr_dest", {SUBREG, REG}}, \ + {"inqhi_operand", {TRUNCATE}}, \ + {"less_comparison_operator", {LT,LE,LTU,LEU}}, \ {"logical_operand", {SUBREG, REG, CONST_INT}}, \ + {"mextr_bit_offset", {CONST_INT}}, \ {"noncommutative_float_operator", {MINUS, DIV}}, \ {"shmedia_6bit_operand", {SUBREG, REG, CONST_INT}}, \ + {"sh_register_operand", {REG, SUBREG, CONST_INT}}, \ {"target_reg_operand", {SUBREG, REG}}, \ ! {"target_operand", {SUBREG, REG, LABEL_REF, SYMBOL_REF, CONST, UNSPEC}},\ ! {"trunc_hi_operand", {SUBREG, REG, TRUNCATE}}, \ {"register_operand", {SUBREG, REG}}, \ ! {"sh_const_vec", {CONST_VECTOR}}, \ ! {"sh_1el_vec", {CONST_VECTOR, PARALLEL}}, \ ! {"sh_rep_vec", {CONST_VECTOR, PARALLEL}}, \ ! {"symbol_ref_operand", {SYMBOL_REF}}, \ ! {"unary_float_operator", {ABS, NEG, SQRT}}, \ ! ! #define SPECIAL_MODE_PREDICATES \ ! "any_register_operand", \ ! "int_gpr_dest", \ ! "trunc_hi_operand", \ ! /* This line intentionally left blank. */ ! ! #define any_register_operand register_operand /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, *************** extern struct rtx_def *fpscr_rtx; *** 3259,3264 **** --- 3290,3297 ---- #define PROMOTE_FUNCTION_ARGS #define PROMOTE_FUNCTION_RETURN + #define MAX_FIXED_MODE_SIZE (TARGET_SH5 ? 128 : 64) + /* ??? Define ACCUMULATE_OUTGOING_ARGS? This is more efficient than pushing and poping arguments. However, we do have push/pop instructions, and rather limited offsets (4 bits) in load/store instructions, so it isn't *************** extern struct rtx_def *fpscr_rtx; *** 3274,3280 **** #define OPTIMIZE_MODE_SWITCHING(ENTITY) TARGET_SH4 #define NORMAL_MODE(ENTITY) \ ! (TARGET_FPU_SINGLE ? FP_MODE_SINGLE : FP_MODE_DOUBLE) #define EPILOGUE_USES(REGNO) ((TARGET_SH3E || TARGET_SH4) \ && (REGNO) == FPSCR_REG) --- 3307,3315 ---- #define OPTIMIZE_MODE_SWITCHING(ENTITY) TARGET_SH4 #define NORMAL_MODE(ENTITY) \ ! (sh_cfun_interrupt_handler_p () ? FP_MODE_NONE \ ! : TARGET_FPU_SINGLE ? FP_MODE_SINGLE \ ! : FP_MODE_DOUBLE) #define EPILOGUE_USES(REGNO) ((TARGET_SH3E || TARGET_SH4) \ && (REGNO) == FPSCR_REG) *************** extern struct rtx_def *fpscr_rtx; *** 3293,3298 **** --- 3328,3336 ---- #define MD_CAN_REDIRECT_BRANCH(INSN, SEQ) \ sh_can_redirect_branch ((INSN), (SEQ)) + #define DWARF_FRAME_RETURN_COLUMN \ + (TARGET_SH5 ? DWARF_FRAME_REGNUM (PR_MEDIA_REG) : DWARF_FRAME_REGNUM (PR_REG)) + #if (defined CRT_BEGIN || defined CRT_END) && ! __SHMEDIA__ /* SH constant pool breaks the devices in crtstuff.c to control section in where code resides. We have to write it as asm code. */ *************** extern struct rtx_def *fpscr_rtx; *** 3308,3317 **** #endif /* (defined CRT_BEGIN || defined CRT_END) && ! __SHMEDIA__ */ #define ALLOCATE_INITIAL_VALUE(hard_reg) \ ! (REGNO (hard_reg) == PR_REG \ ? (current_function_is_leaf && ! sh_pr_n_sets () \ ? (hard_reg) \ ! : gen_rtx_MEM (Pmode, arg_pointer_rtx)) \ : NULL_RTX) #endif /* ! GCC_SH_H */ --- 3346,3358 ---- #endif /* (defined CRT_BEGIN || defined CRT_END) && ! __SHMEDIA__ */ #define ALLOCATE_INITIAL_VALUE(hard_reg) \ ! (REGNO (hard_reg) == (TARGET_SH5 ? PR_MEDIA_REG : PR_REG) \ ? (current_function_is_leaf && ! sh_pr_n_sets () \ ? (hard_reg) \ ! : gen_rtx_MEM (Pmode, TARGET_SH5 \ ! ? (plus_constant (arg_pointer_rtx, \ ! TARGET_SHMEDIA64 ? -8 : -4)) \ ! : frame_pointer_rtx)) \ : NULL_RTX) #endif /* ! GCC_SH_H */ diff -Nrc3pad gcc-3.2.3/gcc/config/sh/sh.md gcc-3.3/gcc/config/sh/sh.md *** gcc-3.2.3/gcc/config/sh/sh.md 2002-11-22 19:58:06.000000000 +0000 --- gcc-3.3/gcc/config/sh/sh.md 2003-04-15 17:06:10.000000000 +0000 *************** *** 99,108 **** --- 99,113 ---- (R8_REG 8) (R9_REG 9) (R10_REG 10) + (R20_REG 20) + (R21_REG 21) + (R22_REG 22) + (R23_REG 23) (DR0_REG 64) (DR2_REG 66) (DR4_REG 68) + (FR23_REG 87) (TR0_REG 128) (TR1_REG 129) *************** *** 124,129 **** --- 129,140 ---- (UNSPEC_CALLER 10) (UNSPEC_GOTPLT 11) (UNSPEC_ICACHE 12) + (UNSPEC_INIT_TRAMP 13) + (UNSPEC_FCOSA 14) + (UNSPEC_FSRRA 15) + (UNSPEC_FSINA 16) + (UNSPEC_NSB 17) + (UNSPEC_ALLOCO 18) ;; These are used with unspec_volatile. (UNSPECV_BLOCKAGE 0) *************** *** 157,165 **** (define_attr "fmovd" "yes,no" (const (if_then_else (symbol_ref "TARGET_FMOVD") (const_string "yes") (const_string "no")))) ! ;; issues/clock ! (define_attr "issues" "1,2" ! (const (if_then_else (symbol_ref "TARGET_SUPERSCALAR") (const_string "2") (const_string "1")))) ;; cbranch conditional branch instructions ;; jump unconditional jumps --- 168,179 ---- (define_attr "fmovd" "yes,no" (const (if_then_else (symbol_ref "TARGET_FMOVD") (const_string "yes") (const_string "no")))) ! ;; pipeline model ! (define_attr "pipe_model" "sh1,sh4,sh5media" ! (const ! (cond [(symbol_ref "TARGET_SHMEDIA") (const_string "sh5media") ! (symbol_ref "TARGET_SUPERSCALAR") (const_string "sh4")] ! (const_string "sh1")))) ;; cbranch conditional branch instructions ;; jump unconditional jumps *************** *** 169,176 **** ;; arith3b like above, but might end with a redirected branch ;; load from memory ;; load_si Likewise, SImode variant for general register. ;; store to memory ! ;; move register to register ;; fmove register to register, floating point ;; smpy word precision integer multiply ;; dmpy longword or doublelongword precision integer multiply --- 183,192 ---- ;; arith3b like above, but might end with a redirected branch ;; load from memory ;; load_si Likewise, SImode variant for general register. + ;; fload Likewise, but load to fp register. ;; store to memory ! ;; move general purpose register to register ! ;; mt_group other sh4 mt instructions ;; fmove register to register, floating point ;; smpy word precision integer multiply ;; dmpy longword or doublelongword precision integer multiply *************** *** 180,200 **** ;; pstore store of pr reg, which can't be put into delay slot of jsr ;; prget copy pr to register, ditto ;; pcload pc relative load of constant value ;; pcload_si Likewise, SImode variant for general register. ;; rte return from exception ;; sfunc special function call with known used registers ;; call function call ;; fp floating point ;; fdiv floating point divide (or square root) ! ;; gp_fpul move between general purpose register and fpul ;; dfp_arith, dfp_cmp,dfp_conv ;; dfdiv double precision floating point divide (or square root) ;; nil no-op move, will be deleted. (define_attr "type" ! "cbranch,jump,jump_ind,arith,arith3,arith3b,dyn_shift,other,load,load_si,store,move,fmove,smpy,dmpy,return,pload,prset,pstore,prget,pcload,pcload_si,pt,ptabs,rte,sfunc,call,fp,fdiv,dfp_arith,dfp_cmp,dfp_conv,dfdiv,gp_fpul,nil" (const_string "other")) ;; Indicate what precision must be selected in fpscr for this insn, if any. (define_attr "fp_mode" "single,double,none" (const_string "none")) --- 196,272 ---- ;; pstore store of pr reg, which can't be put into delay slot of jsr ;; prget copy pr to register, ditto ;; pcload pc relative load of constant value + ;; pcfload Likewise, but load to fp register. ;; pcload_si Likewise, SImode variant for general register. ;; rte return from exception ;; sfunc special function call with known used registers ;; call function call ;; fp floating point ;; fdiv floating point divide (or square root) ! ;; gp_fpul move from general purpose register to fpul ! ;; fpul_gp move from fpul to general purpose register ! ;; mac_gp move from mac[lh] to general purpose register ;; dfp_arith, dfp_cmp,dfp_conv + ;; ftrc_s fix_truncsfsi2_i4 ;; dfdiv double precision floating point divide (or square root) + ;; cwb ic_invalidate_line_i + ;; arith_media SHmedia arithmetic, logical, and shift instructions + ;; cbranch_media SHmedia conditional branch instructions + ;; cmp_media SHmedia compare instructions + ;; dfdiv_media SHmedia double precision divide and square root + ;; dfmul_media SHmedia double precision multiply instruction + ;; dfparith_media SHmedia double precision floating point arithmetic + ;; dfpconv_media SHmedia double precision floating point conversions + ;; dmpy_media SHmedia longword multiply + ;; fcmp_media SHmedia floating point compare instructions + ;; fdiv_media SHmedia single precision divide and square root + ;; fload_media SHmedia floating point register load instructions + ;; fmove_media SHmedia floating point register moves (inc. fabs and fneg) + ;; fparith_media SHmedia single precision floating point arithmetic + ;; fpconv_media SHmedia single precision floating point conversions + ;; fstore_media SHmedia floating point register store instructions + ;; gettr_media SHmedia gettr instruction + ;; invalidate_line_media SHmedia invaldiate_line sequence + ;; jump_media SHmedia unconditional branch instructions + ;; load_media SHmedia general register load instructions + ;; pt_media SHmedia pt instruction (expanded by assembler) + ;; ptabs_media SHmedia ptabs instruction + ;; store_media SHmedia general register store instructions + ;; mcmp_media SHmedia multimedia compare, absolute, saturating ops + ;; mac_media SHmedia mac-style fixed point operations + ;; d2mpy_media SHmedia: two 32 bit integer multiplies + ;; atrans SHmedia approximate transcendential functions + ;; ustore_media SHmedia unaligned stores ;; nil no-op move, will be deleted. (define_attr "type" ! "mt_group,cbranch,jump,jump_ind,arith,arith3,arith3b,dyn_shift,load,load_si,fload,store,move,fmove,smpy,dmpy,return,pload,prset,pstore,prget,pcload,pcload_si,pcfload,rte,sfunc,call,fp,fdiv,ftrc_s,dfp_arith,dfp_cmp,dfp_conv,dfdiv,gp_fpul,fpul_gp,mac_gp,mem_fpscr,gp_fpscr,cwb,arith_media,cbranch_media,cmp_media,dfdiv_media,dfmul_media,dfparith_media,dfpconv_media,dmpy_media,fcmp_media,fdiv_media,fload_media,fmove_media,fparith_media,fpconv_media,fstore_media,gettr_media,invalidate_line_media,jump_media,load_media,pt_media,ptabs_media,store_media,mcmp_media,mac_media,d2mpy_media,atrans_media,ustore_media,nil,other" (const_string "other")) + ;; We define a new attribute namely "insn_class".We use + ;; this for the DFA based pipeline description. + ;; + ;; mt_group SH4 "mt" group instructions. + ;; + ;; ex_group SH4 "ex" group instructions. + ;; + ;; ls_group SH4 "ls" group instructions. + ;; + + (define_attr "insn_class" + "mt_group,ex_group,ls_group,br_group,fe_group,co_group,none" + (cond [(eq_attr "type" "move,mt_group") (const_string "mt_group") + (eq_attr "type" "arith,dyn_shift") (const_string "ex_group") + (eq_attr "type" "fmove,load,pcload,load_si,pcload_si,fload,pcfload,store,gp_fpul,fpul_gp") (const_string "ls_group") + (eq_attr "type" "cbranch,jump") (const_string "br_group") + (eq_attr "type" "fp,fdiv,ftrc_s,dfp_arith,dfp_conv,dfdiv") + (const_string "fe_group") + (eq_attr "type" "jump_ind,smpy,dmpy,mac_gp,return,pload,prset,pstore,prget,rte,sfunc,call,dfp_cmp,mem_fpscr,gp_fpscr,cwb") (const_string "co_group")] + (const_string "none"))) + ;; nil are zero instructions, and arith3 / arith3b are multiple instructions, + ;; so these do not belong in an insn group, although they are modeled + ;; with their own define_insn_reservations. + ;; Indicate what precision must be selected in fpscr for this insn, if any. (define_attr "fp_mode" "single,double,none" (const_string "none")) *************** *** 311,319 **** (eq_attr "type" "jump") (cond [(eq_attr "med_branch_p" "yes") (const_int 2) ! (and (eq (symbol_ref "GET_CODE (PREV_INSN (insn))") (symbol_ref "INSN")) ! (eq (symbol_ref "INSN_CODE (PREV_INSN (insn))") (symbol_ref "code_for_indirect_jump_scratch"))) (if_then_else (eq_attr "braf_branch_p" "yes") (const_int 6) --- 383,391 ---- (eq_attr "type" "jump") (cond [(eq_attr "med_branch_p" "yes") (const_int 2) ! (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))") (symbol_ref "INSN")) ! (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))") (symbol_ref "code_for_indirect_jump_scratch"))) (if_then_else (eq_attr "braf_branch_p" "yes") (const_int 6) *************** *** 326,332 **** (ne (symbol_ref ("flag_pic")) (const_int 0)) (const_int 22) ] (const_int 14)) ! (eq_attr "type" "pt") (if_then_else (ne (symbol_ref "TARGET_SHMEDIA64") (const_int 0)) (const_int 20) (const_int 12)) ] (if_then_else (ne (symbol_ref "TARGET_SHMEDIA") (const_int 0)) --- 398,404 ---- (ne (symbol_ref ("flag_pic")) (const_int 0)) (const_int 22) ] (const_int 14)) ! (eq_attr "type" "pt_media") (if_then_else (ne (symbol_ref "TARGET_SHMEDIA64") (const_int 0)) (const_int 20) (const_int 12)) ] (if_then_else (ne (symbol_ref "TARGET_SHMEDIA") (const_int 0)) *************** *** 353,563 **** ;; We only do this for SImode loads of general registers, to make the work ;; for ADJUST_COST easier. (define_function_unit "memory" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "load_si,pcload_si")) 3 2) (define_function_unit "memory" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "load,pcload,pload,store,pstore")) 2 2) (define_function_unit "int" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "arith3,arith3b")) 3 3) (define_function_unit "int" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "dyn_shift")) 2 2) (define_function_unit "int" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "!arith3,arith3b,dyn_shift")) 1 1) ;; ??? These are approximations. (define_function_unit "mpy" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "smpy")) 2 2) (define_function_unit "mpy" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "dmpy")) 3 3) (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "fp,fmove")) 2 1) (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "1") (eq_attr "type" "fdiv")) 13 12) ! ! ! ;; SH4 scheduling ! ;; The SH4 is a dual-issue implementation, thus we have to multiply all ! ;; costs by at least two. ! ;; There will be single increments of the modeled that don't correspond ! ;; to the actual target ;; whenever two insns to be issued depend one a ! ;; single resource, and the scheduler picks to be the first one. ! ;; If we multiplied the costs just by two, just two of these single ! ;; increments would amount to an actual cycle. By picking a larger ! ;; factor, we can ameliorate the effect; However, we then have to make sure ! ;; that only two insns are modeled as issued per actual cycle. ! ;; Moreover, we need a way to specify the latency of insns that don't ! ;; use an actual function unit. ! ;; We use an 'issue' function unit to do that, and a cost factor of 10. ! ! (define_function_unit "issue" 2 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "!nil,arith3")) ! 10 10) ! ! (define_function_unit "issue" 2 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "arith3")) ! 30 30) ! ! ;; There is no point in providing exact scheduling information about branches, ! ;; because they are at the starts / ends of basic blocks anyways. ! ! ;; Some insns cannot be issued before/after another insn in the same cycle, ! ;; irrespective of the type of the other insn. ! ! ;; default is dual-issue, but can't be paired with an insn that ! ;; uses multiple function units. ! (define_function_unit "single_issue" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "!smpy,dmpy,pload,pstore,dfp_cmp,gp_fpul,call,sfunc,arith3,arith3b")) ! 1 10 ! [(eq_attr "type" "smpy,dmpy,pload,pstore,dfp_cmp,gp_fpul")]) ! ! (define_function_unit "single_issue" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "smpy,dmpy,pload,pstore,dfp_cmp,gp_fpul")) ! 10 10 ! [(const_int 1)]) ! ! ;; arith3 insns are always pairable at the start, but not inecessarily at ! ;; the end; however, there doesn't seem to be a way to express that. ! (define_function_unit "single_issue" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "arith3")) ! 30 20 ! [(const_int 1)]) ! ! ;; arith3b insn are pairable at the end and have latency that prevents pairing ! ;; with the following branch, but we don't want this latency be respected; ! ;; When the following branch is immediately adjacent, we can redirect the ! ;; internal branch, which is likly to be a larger win. ! (define_function_unit "single_issue" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "arith3b")) ! 20 20 ! [(const_int 1)]) ! ! ;; calls introduce a longisch delay that is likely to flush the pipelines. ! (define_function_unit "single_issue" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "call,sfunc")) ! 160 160 ! [(eq_attr "type" "!call") (eq_attr "type" "call")]) ! ! ;; Load and store instructions have no alignment peculiarities for the SH4, ! ;; but they use the load-store unit, which they share with the fmove type ! ;; insns (fldi[01]; fmov frn,frm; flds; fsts; fabs; fneg) . ! ;; Loads have a latency of two. ! ;; However, call insns can only paired with a preceding insn, and have ! ;; a delay slot, so that we want two more insns to be scheduled between the ! ;; load of the function address and the call. This is equivalent to a ! ;; latency of three. ! ;; We cannot use a conflict list for this, because we need to distinguish ! ;; between the actual call address and the function arguments. ! ;; ADJUST_COST can only properly handle reductions of the cost, so we ! ;; use a latency of three here, which gets multiplied by 10 to yield 30. ! ;; We only do this for SImode loads of general registers, to make the work ! ;; for ADJUST_COST easier. ! ! ;; When specifying different latencies for different insns using the ! ;; the same function unit, genattrtab.c assumes a 'FIFO constraint' ! ;; so that the blockage is at least READY-COST (E) + 1 - READY-COST (C) ! ;; for an executing insn E and a candidate insn C. ! ;; Therefore, we define three different function units for load_store: ! ;; load_store, load and load_si. ! ! (define_function_unit "load_si" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "load_si,pcload_si")) 30 10) ! (define_function_unit "load" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "load,pcload,pload")) 20 10) ! (define_function_unit "load_store" 1 0 ! (and (eq_attr "issues" "2") ! (eq_attr "type" "load_si,pcload_si,load,pcload,pload,store,pstore,fmove")) ! 10 10) ! ! (define_function_unit "int" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "arith,dyn_shift")) 10 10) ! ! ;; Again, we have to pretend a lower latency for the "int" unit to avoid a ! ;; spurious FIFO constraint; the multiply instructions use the "int" ! ;; unit actually only for two cycles. ! (define_function_unit "int" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "smpy,dmpy")) 20 20) ! ! ;; We use a fictous "mpy" unit to express the actual latency. ! (define_function_unit "mpy" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "smpy,dmpy")) 40 20) - ;; Again, we have to pretend a lower latency for the "int" unit to avoid a - ;; spurious FIFO constraint. - (define_function_unit "int" 1 0 - (and (eq_attr "issues" "2") (eq_attr "type" "gp_fpul")) 10 10) ! ;; We use a fictous "gp_fpul" unit to express the actual latency. ! (define_function_unit "gp_fpul" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "gp_fpul")) 20 10) ! ;; ??? multiply uses the floating point unit, but with a two cycle delay. ! ;; Thus, a simple single-precision fp operation could finish if issued in ! ;; the very next cycle, but stalls when issued two or three cycles later. ! ;; Similarily, a divide / sqrt can work without stalls if issued in ! ;; the very next cycle, while it would have to block if issued two or ! ;; three cycles later. ! ;; There is no way to model this with gcc's function units. This problem is ! ;; actually mentioned in md.texi. Tackling this problem requires first that ! ;; it is possible to speak about the target in an open discussion. ! ;; ! ;; However, simple double-precision operations always conflict. ! (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "smpy,dmpy")) 40 40 ! [(eq_attr "type" "dfp_cmp,dfp_conv,dfp_arith")]) ! ;; The "fp" unit is for pipeline stages F1 and F2. ! (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "fp")) 30 10) ! ;; Again, we have to pretend a lower latency for the "fp" unit to avoid a ! ;; spurious FIFO constraint; the bulk of the fdiv type insns executes in ! ;; the F3 stage. ! (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "fdiv")) 30 10) ! ;; The "fdiv" function unit models the aggregate effect of the F1, F2 and F3 ! ;; pipeline stages on the pipelining of fdiv/fsqrt insns. ! ;; We also use it to give the actual latency here. ! ;; fsqrt is actually one cycle faster than fdiv (and the value used here), ! ;; but that will hardly matter in practice for scheduling. ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "fdiv")) 120 100) ! ;; There is again a late use of the "fp" unit by [d]fdiv type insns ! ;; that we can't express. ! (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "dfp_cmp,dfp_conv")) 40 20) ! (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "dfp_arith")) 80 60) ! (define_function_unit "fp" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "dfdiv")) 230 10) ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "issues" "2") (eq_attr "type" "dfdiv")) 230 210) ! ;; This should be enough for pt insns to be moved 5 insns ahead of ! ;; corresponding branches. ! (define_function_unit "pt" 1 0 ! (eq_attr "type" "pt,ptabs") 10 2) ; Definitions for filling branch delay slots. --- 425,516 ---- ;; We only do this for SImode loads of general registers, to make the work ;; for ADJUST_COST easier. (define_function_unit "memory" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "load_si,pcload_si")) 3 2) (define_function_unit "memory" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "load,pcload,pload,store,pstore")) 2 2) (define_function_unit "int" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "arith3,arith3b")) 3 3) (define_function_unit "int" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "dyn_shift")) 2 2) (define_function_unit "int" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "!arith3,arith3b,dyn_shift")) 1 1) ;; ??? These are approximations. (define_function_unit "mpy" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "smpy")) 2 2) (define_function_unit "mpy" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "dmpy")) 3 3) (define_function_unit "fp" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "fp,fmove")) 2 1) (define_function_unit "fp" 1 0 ! (and (eq_attr "pipe_model" "sh1") (eq_attr "type" "fdiv")) 13 12) ! ;; SH-5 SHmedia scheduling ! ;; When executing SHmedia code, the SH-5 is a fairly straightforward ! ;; single-issue machine. It has four pipelines, the branch unit (br), ! ;; the integer and multimedia unit (imu), the load/store unit (lsu), and ! ;; the floating point unit (fpu). ! ;; Here model the instructions with a latency greater than one cycle. ! ;; Every instruction on SH-5 occupies the issue resource for at least one ! ;; cycle. ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "!pt_media,ptabs_media,invalidate_line_media,dmpy_media,load_media,fload_media,fcmp_media,fmove_media,fparith_media,dfparith_media,fpconv_media,dfpconv_media,dfmul_media,store_media,fstore_media,mcmp_media,mac_media,d2mpy_media,atrans_media,ustore_media")) 1 1) ! ;; Specify the various types of instruction which have latency > 1 ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "mcmp_media")) 2 1) ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "dmpy_media,load_media,fcmp_media,mac_media")) 3 1) ! ;; but see sh_adjust_cost for mac_media exception. ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "fload_media,fmove_media")) 4 1) ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "d2mpy_media")) 4 2) ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "pt_media,ptabs_media")) 5 1) ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "fparith_media,dfparith_media,fpconv_media,dfpconv_media")) 6 1) ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") ! (eq_attr "type" "invalidate_line_media")) 7 7) ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") (eq_attr "type" "dfmul_media")) 9 4) ! (define_function_unit "sh5issue" 1 0 ! (and (eq_attr "pipe_model" "sh5media") (eq_attr "type" "atrans_media")) 10 5) ! ;; Floating-point divide and square-root occupy an additional resource, ! ;; which is not internally pipelined. However, other instructions ! ;; can continue to issue. ! (define_function_unit "sh5fds" 1 0 ! (and (eq_attr "pipe_model" "sh5media") (eq_attr "type" "fdiv_media")) 19 19) ! (define_function_unit "sh5fds" 1 0 ! (and (eq_attr "pipe_model" "sh5media") (eq_attr "type" "dfdiv_media")) 35 35) ; Definitions for filling branch delay slots. *************** *** 580,588 **** --- 533,577 ---- (eq_attr "length" "2") (const_string "yes") ] (const_string "no"))) + (define_attr "cond_delay_slot" "yes,no" + (cond [(eq_attr "in_delay_slot" "yes") (const_string "yes") + ] (const_string "no"))) + (define_attr "is_sfunc" "" (if_then_else (eq_attr "type" "sfunc") (const_int 1) (const_int 0))) + (define_attr "is_mac_media" "" + (if_then_else (eq_attr "type" "mac_media") (const_int 1) (const_int 0))) + + (define_attr "branch_zero" "yes,no" + (cond [(eq_attr "type" "!cbranch") (const_string "no") + (ne (symbol_ref "(next_active_insn (insn)\ + == (prev_active_insn\ + (XEXP (SET_SRC (PATTERN (insn)), 1))))\ + && get_attr_length (next_active_insn (insn)) == 2") + (const_int 0)) + (const_string "yes")] + (const_string "no"))) + + ;; SH4 Double-precision computation with double-precision result - + ;; the two halves are ready at different times. + (define_attr "dfp_comp" "yes,no" + (cond [(eq_attr "type" "dfp_arith,dfp_conv,dfdiv") (const_string "yes")] + (const_string "no"))) + + ;; Insns for which the latency of a preceding fp insn is decreased by one. + (define_attr "late_fp_use" "yes,no" (const_string "no")) + ;; And feeding insns for which this relevant. + (define_attr "any_fp_comp" "yes,no" + (cond [(eq_attr "type" "fp,fdiv,ftrc_s,dfp_arith,dfp_conv,dfdiv") + (const_string "yes")] + (const_string "no"))) + + (define_attr "any_int_load" "yes,no" + (cond [(eq_attr "type" "load,load_si,pcload,pcload_si") + (const_string "yes")] + (const_string "no"))) + (define_delay (eq_attr "needs_delay_slot" "yes") [(eq_attr "in_delay_slot" "yes") (nil) (nil)]) *************** *** 619,625 **** (define_delay (and (eq_attr "type" "cbranch") (ne (symbol_ref "TARGET_SH2") (const_int 0))) ! [(eq_attr "in_delay_slot" "yes") (eq_attr "in_delay_slot" "yes") (nil)]) ;; ------------------------------------------------------------------------- ;; SImode signed integer comparisons --- 608,614 ---- (define_delay (and (eq_attr "type" "cbranch") (ne (symbol_ref "TARGET_SH2") (const_int 0))) ! [(eq_attr "in_delay_slot" "yes") (eq_attr "cond_delay_slot" "yes") (nil)]) ;; ------------------------------------------------------------------------- ;; SImode signed integer comparisons *************** *** 631,637 **** (match_operand:SI 1 "arith_operand" "L,r")) (const_int 0)))] "TARGET_SH1" ! "tst %1,%0") ;; ??? Perhaps should only accept reg/constant if the register is reg 0. ;; That would still allow reload to create cmpi instructions, but would --- 620,627 ---- (match_operand:SI 1 "arith_operand" "L,r")) (const_int 0)))] "TARGET_SH1" ! "tst %1,%0" ! [(set_attr "type" "mt_group")]) ;; ??? Perhaps should only accept reg/constant if the register is reg 0. ;; That would still allow reload to create cmpi instructions, but would *************** *** 647,653 **** "@ tst %0,%0 cmp/eq %1,%0 ! cmp/eq %1,%0") (define_insn "cmpgtsi_t" [(set (reg:SI T_REG) --- 637,644 ---- "@ tst %0,%0 cmp/eq %1,%0 ! cmp/eq %1,%0" ! [(set_attr "type" "mt_group")]) (define_insn "cmpgtsi_t" [(set (reg:SI T_REG) *************** *** 656,662 **** "TARGET_SH1" "@ cmp/gt %1,%0 ! cmp/pl %0") (define_insn "cmpgesi_t" [(set (reg:SI T_REG) --- 647,654 ---- "TARGET_SH1" "@ cmp/gt %1,%0 ! cmp/pl %0" ! [(set_attr "type" "mt_group")]) (define_insn "cmpgesi_t" [(set (reg:SI T_REG) *************** *** 665,672 **** "TARGET_SH1" "@ cmp/ge %1,%0 ! cmp/pz %0") ! ;; ------------------------------------------------------------------------- ;; SImode unsigned integer comparisons ;; ------------------------------------------------------------------------- --- 657,665 ---- "TARGET_SH1" "@ cmp/ge %1,%0 ! cmp/pz %0" ! [(set_attr "type" "mt_group")]) ! ;; ------------------------------------------------------------------------- ;; SImode unsigned integer comparisons ;; ------------------------------------------------------------------------- *************** *** 676,689 **** (geu:SI (match_operand:SI 0 "arith_reg_operand" "r") (match_operand:SI 1 "arith_reg_operand" "r")))] "TARGET_SH1" ! "cmp/hs %1,%0") (define_insn "cmpgtusi_t" [(set (reg:SI T_REG) (gtu:SI (match_operand:SI 0 "arith_reg_operand" "r") (match_operand:SI 1 "arith_reg_operand" "r")))] "TARGET_SH1" ! "cmp/hi %1,%0") ;; We save the compare operands in the cmpxx patterns and use them when ;; we generate the branch. --- 669,684 ---- (geu:SI (match_operand:SI 0 "arith_reg_operand" "r") (match_operand:SI 1 "arith_reg_operand" "r")))] "TARGET_SH1" ! "cmp/hs %1,%0" ! [(set_attr "type" "mt_group")]) (define_insn "cmpgtusi_t" [(set (reg:SI T_REG) (gtu:SI (match_operand:SI 0 "arith_reg_operand" "r") (match_operand:SI 1 "arith_reg_operand" "r")))] "TARGET_SH1" ! "cmp/hi %1,%0" ! [(set_attr "type" "mt_group")]) ;; We save the compare operands in the cmpxx patterns and use them when ;; we generate the branch. *************** *** 732,739 **** (define_split [(set (reg:SI T_REG) ! (eq:SI (match_operand:DI 0 "arith_reg_operand" "r,r") ! (match_operand:DI 1 "arith_reg_or_0_operand" "N,r")))] ;; If we applied this split when not optimizing, it would only be ;; applied during the machine-dependent reorg, when no new basic blocks ;; may be created. --- 727,734 ---- (define_split [(set (reg:SI T_REG) ! (eq:SI (match_operand:DI 0 "arith_reg_operand" "") ! (match_operand:DI 1 "arith_reg_or_0_operand" "")))] ;; If we applied this split when not optimizing, it would only be ;; applied during the machine-dependent reorg, when no new basic blocks ;; may be created. *************** *** 780,786 **** cmp/eq\\t%S1,%S0\;bf{.|/}s\\t%,Ldi%=\;cmp/ge\\t%S1,%S0\;cmp/hs\\t%R1,%R0\\n%,Ldi%=: cmp/pz\\t%S0" [(set_attr "length" "8,2") ! (set_attr "type" "arith3,arith")]) ;; ------------------------------------------------------------------------- ;; DImode unsigned integer comparisons --- 775,781 ---- cmp/eq\\t%S1,%S0\;bf{.|/}s\\t%,Ldi%=\;cmp/ge\\t%S1,%S0\;cmp/hs\\t%R1,%R0\\n%,Ldi%=: cmp/pz\\t%S0" [(set_attr "length" "8,2") ! (set_attr "type" "arith3,mt_group")]) ;; ------------------------------------------------------------------------- ;; DImode unsigned integer comparisons *************** *** 805,837 **** (set_attr "type" "arith3")]) (define_insn "cmpeqdi_media" ! [(set (match_operand:DI 0 "register_operand" "=r,r") ! (eq:DI (match_operand:DI 1 "register_operand" "%r,r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "N,r")))] "TARGET_SHMEDIA" ! "@ ! cmpeq %1, r63, %0 ! cmpeq %1, %2, %0") (define_insn "cmpgtdi_media" ! [(set (match_operand:DI 0 "register_operand" "=r,r,r") ! (gt:DI (match_operand:DI 1 "arith_reg_or_0_operand" "N,r,r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "r,N,r")))] "TARGET_SHMEDIA" ! "@ ! cmpgt r63, %2, %0 ! cmpgt %1, r63, %0 ! cmpgt %1, %2, %0") (define_insn "cmpgtudi_media" ! [(set (match_operand:DI 0 "register_operand" "=r,r,r") ! (gtu:DI (match_operand:DI 1 "arith_reg_or_0_operand" "N,r,r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "r,N,r")))] "TARGET_SHMEDIA" ! "@ ! cmpgtu r63, %2, %0 ! cmpgtu %1, r63, %0 ! cmpgtu %1, %2, %0") ;; We save the compare operands in the cmpxx patterns and use them when ;; we generate the branch. --- 800,827 ---- (set_attr "type" "arith3")]) (define_insn "cmpeqdi_media" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (eq:DI (match_operand:DI 1 "register_operand" "%r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "Nr")))] "TARGET_SHMEDIA" ! "cmpeq %1, %N2, %0" ! [(set_attr "type" "cmp_media")]) (define_insn "cmpgtdi_media" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (gt:DI (match_operand:DI 1 "arith_reg_or_0_operand" "Nr") ! (match_operand:DI 2 "arith_reg_or_0_operand" "rN")))] "TARGET_SHMEDIA" ! "cmpgt %N1, %N2, %0" ! [(set_attr "type" "cmp_media")]) (define_insn "cmpgtudi_media" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (gtu:DI (match_operand:DI 1 "arith_reg_or_0_operand" "Nr") ! (match_operand:DI 2 "arith_reg_or_0_operand" "rN")))] "TARGET_SHMEDIA" ! "cmpgtu %N1, %N2, %0" ! [(set_attr "type" "cmp_media")]) ;; We save the compare operands in the cmpxx patterns and use them when ;; we generate the branch. *************** *** 855,876 **** ;; if op1 == 0, and cmvne does it if op1 != 0. (define_insn "movdicc_false" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (if_then_else:DI (eq (match_operand:DI 1 "register_operand" "r") (const_int 0)) ! (match_operand:DI 2 "register_operand" "r") ! (match_operand:DI 3 "register_operand" "0")))] "TARGET_SHMEDIA" ! "cmveq %1, %2, %0") (define_insn "movdicc_true" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (if_then_else:DI (ne (match_operand:DI 1 "register_operand" "r") (const_int 0)) ! (match_operand:DI 2 "register_operand" "r") ! (match_operand:DI 3 "register_operand" "0")))] "TARGET_SHMEDIA" ! "cmvne %1, %2, %0") (define_expand "movdicc" [(set (match_operand:DI 0 "register_operand" "") --- 845,868 ---- ;; if op1 == 0, and cmvne does it if op1 != 0. (define_insn "movdicc_false" ! [(set (match_operand:DI 0 "arith_reg_dest" "=r") ! (if_then_else:DI (eq (match_operand:DI 1 "arith_reg_operand" "r") (const_int 0)) ! (match_operand:DI 2 "arith_reg_or_0_operand" "rN") ! (match_operand:DI 3 "arith_reg_operand" "0")))] "TARGET_SHMEDIA" ! "cmveq %1, %N2, %0" ! [(set_attr "type" "arith_media")]) (define_insn "movdicc_true" ! [(set (match_operand:DI 0 "arith_reg_dest" "=r") ! (if_then_else:DI (ne (match_operand:DI 1 "arith_reg_operand" "r") (const_int 0)) ! (match_operand:DI 2 "arith_reg_or_0_operand" "rN") ! (match_operand:DI 3 "arith_reg_operand" "0")))] "TARGET_SHMEDIA" ! "cmvne %1, %N2, %0" ! [(set_attr "type" "arith_media")]) (define_expand "movdicc" [(set (match_operand:DI 0 "register_operand" "") *************** *** 998,1015 **** "TARGET_SHMEDIA" "@ add %1, %2, %0 ! addi %1, %2, %0") ! (define_insn "*adddi3z_media" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r,r") (zero_extend:DI ! (plus:SI (match_operand:SI 1 "arith_reg_operand" "r,r") ! (match_operand:SI 2 "arith_reg_or_0_operand" "r,n"))))] "TARGET_SHMEDIA" ! "@ ! addz.l %1, %2, %0 ! addz.l %1, r63, %0") ! (define_insn "adddi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (plus:DI (match_operand:DI 1 "arith_reg_operand" "%0") --- 990,1007 ---- "TARGET_SHMEDIA" "@ add %1, %2, %0 ! addi %1, %2, %0" ! [(set_attr "type" "arith_media")]) ! (define_insn "adddi3z_media" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") (zero_extend:DI ! (plus:SI (match_operand:SI 1 "extend_reg_operand" "r") ! (match_operand:SI 2 "extend_reg_or_0_operand" "rN"))))] "TARGET_SHMEDIA" ! "addz.l %1, %N2, %0" ! [(set_attr "type" "arith_media")]) ! (define_insn "adddi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (plus:DI (match_operand:DI 1 "arith_reg_operand" "%0") *************** *** 1020,1028 **** [(set_attr "length" "6")]) (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (plus:DI (match_operand:DI 1 "arith_reg_operand" "%0") ! (match_operand:DI 2 "arith_reg_operand" "r"))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(const_int 0)] --- 1012,1020 ---- [(set_attr "length" "6")]) (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "") ! (plus:DI (match_operand:DI 1 "arith_reg_operand" "") ! (match_operand:DI 2 "arith_reg_operand" ""))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(const_int 0)] *************** *** 1075,1087 **** (define_insn "addsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (plus:SI (match_operand:SI 1 "arith_reg_operand" "%r,r") (match_operand:SI 2 "arith_operand" "r,P")))] "TARGET_SHMEDIA" "@ add.l %1, %2, %0 ! addi.l %1, %2, %0") ! (define_insn "*addsi3_compact" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (plus:SI (match_operand:SI 1 "arith_operand" "%0") --- 1067,1080 ---- (define_insn "addsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (plus:SI (match_operand:SI 1 "extend_reg_operand" "%r,r") (match_operand:SI 2 "arith_operand" "r,P")))] "TARGET_SHMEDIA" "@ add.l %1, %2, %0 ! addi.l %1, %2, %0" ! [(set_attr "type" "arith_media")]) ! (define_insn "*addsi3_compact" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (plus:SI (match_operand:SI 1 "arith_operand" "%0") *************** *** 1089,1120 **** "TARGET_SH1" "add %2,%0" [(set_attr "type" "arith")]) ! ;; ------------------------------------------------------------------------- ;; Subtraction instructions ;; ------------------------------------------------------------------------- (define_expand "subdi3" [(set (match_operand:DI 0 "arith_reg_operand" "") ! (minus:DI (match_operand:DI 1 "arith_reg_operand" "") (match_operand:DI 2 "arith_reg_operand" "")))] "" " { if (TARGET_SH1) { emit_insn (gen_subdi3_compact (operands[0], operands[1], operands[2])); DONE; } }") ! (define_insn "*subdi3_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (minus:DI (match_operand:DI 1 "arith_reg_operand" "r") (match_operand:DI 2 "arith_reg_operand" "r")))] "TARGET_SHMEDIA" ! "sub %1, %2, %0") ! (define_insn "subdi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (minus:DI (match_operand:DI 1 "arith_reg_operand" "0") --- 1082,1115 ---- "TARGET_SH1" "add %2,%0" [(set_attr "type" "arith")]) ! ;; ------------------------------------------------------------------------- ;; Subtraction instructions ;; ------------------------------------------------------------------------- (define_expand "subdi3" [(set (match_operand:DI 0 "arith_reg_operand" "") ! (minus:DI (match_operand:DI 1 "arith_reg_or_0_operand" "") (match_operand:DI 2 "arith_reg_operand" "")))] "" " { if (TARGET_SH1) { + operands[1] = force_reg (DImode, operands[1]); emit_insn (gen_subdi3_compact (operands[0], operands[1], operands[2])); DONE; } }") ! (define_insn "*subdi3_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (minus:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rN") (match_operand:DI 2 "arith_reg_operand" "r")))] "TARGET_SHMEDIA" ! "sub %N1, %2, %0" ! [(set_attr "type" "arith_media")]) ! (define_insn "subdi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (minus:DI (match_operand:DI 1 "arith_reg_operand" "0") *************** *** 1125,1133 **** [(set_attr "length" "6")]) (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (minus:DI (match_operand:DI 1 "arith_reg_operand" "0") ! (match_operand:DI 2 "arith_reg_operand" "r"))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(const_int 0)] --- 1120,1128 ---- [(set_attr "length" "6")]) (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "") ! (minus:DI (match_operand:DI 1 "arith_reg_operand" "") ! (match_operand:DI 2 "arith_reg_operand" ""))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(const_int 0)] *************** *** 1177,1186 **** (define_insn "*subsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (minus:SI (match_operand:SI 1 "arith_reg_operand" "r") ! (match_operand:SI 2 "arith_reg_operand" "r")))] "TARGET_SHMEDIA" ! "sub.l %1, %2, %0") ;; Convert `constant - reg' to `neg rX; add rX, #const' since this ;; will sometimes save one instruction. Otherwise we might get --- 1172,1182 ---- (define_insn "*subsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (minus:SI (match_operand:SI 1 "extend_reg_or_0_operand" "rN") ! (match_operand:SI 2 "extend_reg_operand" "r")))] "TARGET_SHMEDIA" ! "sub.l %N1, %2, %0" ! [(set_attr "type" "arith_media")]) ;; Convert `constant - reg' to `neg rX; add rX, #const' since this ;; will sometimes save one instruction. Otherwise we might get *************** *** 1202,1210 **** } if (TARGET_SHMEDIA) { ! if (no_new_pseudos && ! arith_reg_operand (operands[1], SImode)) FAIL; ! operands[1] = force_reg (SImode, operands[1]); } }") --- 1198,1207 ---- } if (TARGET_SHMEDIA) { ! if (no_new_pseudos && ! arith_reg_or_0_operand (operands[1], SImode)) FAIL; ! if (operands[1] != const0_rtx) ! operands[1] = force_reg (SImode, operands[1]); } }") *************** *** 1217,1228 **** ;; The INSN_REFERENCES_ARE_DELAYED in sh.h is problematic because it ;; also has an effect on the register that holds the address of the sfunc. ! ;; To make this work, we have an extra dummy insns that shows the use ;; of this register for reorg. (define_insn "use_sfunc_addr" [(set (reg:SI PR_REG) ! (unspec [(match_operand:SI 0 "register_operand" "r")] UNSPEC_SFUNC))] "TARGET_SH1" "" [(set_attr "length" "0")]) --- 1214,1225 ---- ;; The INSN_REFERENCES_ARE_DELAYED in sh.h is problematic because it ;; also has an effect on the register that holds the address of the sfunc. ! ;; To make this work, we have an extra dummy insn that shows the use ;; of this register for reorg. (define_insn "use_sfunc_addr" [(set (reg:SI PR_REG) ! (unspec:SI [(match_operand:SI 0 "register_operand" "r")] UNSPEC_SFUNC))] "TARGET_SH1" "" [(set_attr "length" "0")]) *************** *** 1247,1258 **** [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) (define_insn "udivsi3_i1_media" [(set (match_operand:SI 0 "register_operand" "=z") (udiv:SI (reg:SI R4_REG) (reg:SI R5_REG))) (clobber (reg:SI T_MEDIA_REG)) (clobber (reg:SI PR_MEDIA_REG)) ! (clobber (reg:SI R4_REG)) (clobber (reg:DI TR0_REG)) (clobber (reg:DI TR1_REG)) (clobber (reg:DI TR2_REG)) --- 1244,1263 ---- [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) + ; Since shmedia-nofpu code could be linked against shcompact code, and + ; the udivsi3 libcall has the same name, we must consider all registers + ; clobbered that are in the union of the registers clobbered by the + ; shmedia and the shcompact implementation. Note, if the shcompact + ; implemenation actually used shcompact code, we'd need to clobber + ; also r23 and fr23. (define_insn "udivsi3_i1_media" [(set (match_operand:SI 0 "register_operand" "=z") (udiv:SI (reg:SI R4_REG) (reg:SI R5_REG))) (clobber (reg:SI T_MEDIA_REG)) (clobber (reg:SI PR_MEDIA_REG)) ! (clobber (reg:SI R20_REG)) ! (clobber (reg:SI R21_REG)) ! (clobber (reg:SI R22_REG)) (clobber (reg:DI TR0_REG)) (clobber (reg:DI TR1_REG)) (clobber (reg:DI TR2_REG)) *************** *** 1263,1283 **** (set_attr "needs_delay_slot" "yes")]) (define_expand "udivsi3_i4_media" ! [(set (match_dup 2) (zero_extend:DI (reg:SI R4_REG))) ! (set (match_dup 3) (zero_extend:DI (reg:SI R5_REG))) ! (set (match_dup 4) (float:DF (match_dup 2))) (set (match_dup 5) (float:DF (match_dup 3))) ! (set (match_dup 6) (div:DF (match_dup 4) (match_dup 5))) ! (set (subreg:DI (match_operand:SI 0 "register_operand" "=r") 0) ! (fix:DI (match_dup 6)))] "TARGET_SHMEDIA_FPU" " { - operands[2] = gen_reg_rtx (DImode); operands[3] = gen_reg_rtx (DImode); ! operands[4] = gen_reg_rtx (DFmode); operands[5] = gen_reg_rtx (DFmode); operands[6] = gen_reg_rtx (DFmode); }") (define_insn "udivsi3_i4" --- 1268,1292 ---- (set_attr "needs_delay_slot" "yes")]) (define_expand "udivsi3_i4_media" ! [(set (match_dup 3) ! (zero_extend:DI (match_operand:SI 1 "register_operand" ""))) ! (set (match_dup 4) ! (zero_extend:DI (match_operand:SI 2 "register_operand" ""))) (set (match_dup 5) (float:DF (match_dup 3))) ! (set (match_dup 6) (float:DF (match_dup 4))) ! (set (match_dup 7) (div:DF (match_dup 5) (match_dup 6))) ! (set (match_dup 8) (fix:DI (match_dup 7))) ! (set (match_operand:SI 0 "register_operand" "") ! (truncate:SI (match_dup 8)))] "TARGET_SHMEDIA_FPU" " { operands[3] = gen_reg_rtx (DImode); ! operands[4] = gen_reg_rtx (DImode); operands[5] = gen_reg_rtx (DFmode); operands[6] = gen_reg_rtx (DFmode); + operands[7] = gen_reg_rtx (DFmode); + operands[8] = gen_reg_rtx (DImode); }") (define_insn "udivsi3_i4" *************** *** 1346,1352 **** last = gen_udivsi3_i4 (operands[0], operands[3]); } else if (TARGET_SHMEDIA_FPU) ! last = gen_udivsi3_i4_media (operands[0]); else if (TARGET_SH5) { emit_move_insn (operands[3], --- 1355,1366 ---- last = gen_udivsi3_i4 (operands[0], operands[3]); } else if (TARGET_SHMEDIA_FPU) ! { ! operands[1] = force_reg (SImode, operands[1]); ! operands[2] = force_reg (SImode, operands[2]); ! emit_insn (gen_udivsi3_i4_media (operands[0], operands[1], operands[2])); ! DONE; ! } else if (TARGET_SH5) { emit_move_insn (operands[3], *************** *** 1396,1401 **** --- 1410,1421 ---- [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) + ; Since shmedia-nofpu code could be linked against shcompact code, and + ; the sdivsi3 libcall has the same name, we must consider all registers + ; clobbered that are in the union of the registers clobbered by the + ; shmedia and the shcompact implementation. Note, if the shcompact + ; implemenation actually used shcompact code, we'd need to clobber + ; also r22, r23 and fr23. (define_insn "divsi3_i1_media" [(set (match_operand:SI 0 "register_operand" "=z") (div:SI (reg:SI R4_REG) (reg:SI R5_REG))) *************** *** 1404,1432 **** (clobber (reg:SI R1_REG)) (clobber (reg:SI R2_REG)) (clobber (reg:SI R3_REG)) (clobber (reg:DI TR0_REG)) (clobber (reg:DI TR1_REG)) (clobber (reg:DI TR2_REG)) (use (match_operand:DI 1 "target_operand" "b"))] "TARGET_SHMEDIA && ! TARGET_SHMEDIA_FPU" ! "blink %1, r18") (define_expand "divsi3_i4_media" ! [(set (match_dup 2) (reg:SI R4_REG)) ! (set (match_dup 3) (reg:SI R5_REG)) ! (set (match_dup 4) (float:DF (match_dup 2))) ! (set (match_dup 5) (float:DF (match_dup 3))) ! (set (match_dup 6) (div:DF (match_dup 4) (match_dup 5))) (set (match_operand:SI 0 "register_operand" "=r") ! (fix:SI (match_dup 6)))] "TARGET_SHMEDIA_FPU" " { ! operands[2] = gen_reg_rtx (SImode); ! operands[3] = gen_reg_rtx (SImode); operands[4] = gen_reg_rtx (DFmode); operands[5] = gen_reg_rtx (DFmode); - operands[6] = gen_reg_rtx (DFmode); }") (define_insn "divsi3_i4" --- 1424,1451 ---- (clobber (reg:SI R1_REG)) (clobber (reg:SI R2_REG)) (clobber (reg:SI R3_REG)) + (clobber (reg:SI R20_REG)) + (clobber (reg:SI R21_REG)) (clobber (reg:DI TR0_REG)) (clobber (reg:DI TR1_REG)) (clobber (reg:DI TR2_REG)) (use (match_operand:DI 1 "target_operand" "b"))] "TARGET_SHMEDIA && ! TARGET_SHMEDIA_FPU" ! "blink %1, r18" ! [(set_attr "type" "sfunc")]) (define_expand "divsi3_i4_media" ! [(set (match_dup 3) (float:DF (match_operand:SI 1 "register_operand" "r"))) ! (set (match_dup 4) (float:DF (match_operand:SI 2 "register_operand" "r"))) ! (set (match_dup 5) (div:DF (match_dup 3) (match_dup 4))) (set (match_operand:SI 0 "register_operand" "=r") ! (fix:SI (match_dup 5)))] "TARGET_SHMEDIA_FPU" " { ! operands[3] = gen_reg_rtx (DFmode); operands[4] = gen_reg_rtx (DFmode); operands[5] = gen_reg_rtx (DFmode); }") (define_insn "divsi3_i4" *************** *** 1486,1492 **** last = gen_divsi3_i4 (operands[0], operands[3]); } else if (TARGET_SHMEDIA_FPU) ! last = gen_divsi3_i4_media (operands[0]); else if (TARGET_SH5) { emit_move_insn (operands[3], --- 1505,1516 ---- last = gen_divsi3_i4 (operands[0], operands[3]); } else if (TARGET_SHMEDIA_FPU) ! { ! operands[1] = force_reg (SImode, operands[1]); ! operands[2] = force_reg (SImode, operands[2]); ! emit_insn (gen_divsi3_i4_media (operands[0], operands[1], operands[2])); ! DONE; ! } else if (TARGET_SH5) { emit_move_insn (operands[3], *************** *** 1496,1502 **** : \"__sdivsi3\"))); if (TARGET_SHMEDIA) ! last = gen_divsi3_i1_media (operands[0], Pmode == DImode ? operands[3] : gen_rtx_SUBREG (DImode, operands[3], --- 1520,1526 ---- : \"__sdivsi3\"))); if (TARGET_SHMEDIA) ! last = gen_divsi3_i1_media (operands[0], Pmode == DImode ? operands[3] : gen_rtx_SUBREG (DImode, operands[3], *************** *** 1564,1569 **** --- 1588,1601 ---- invariant code motion can move it. */ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); + /* expand_binop can't find a suitable code in umul_widen_optab to + make a REG_EQUAL note from, so make one here. + See also smulsi3_highpart. + ??? Alternatively, we could put this at the calling site of expand_binop, + i.e. expand_expr. */ + REG_NOTES (last) + = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (SET_SRC (single_set (first))), + REG_NOTES (last)); DONE; }") *************** *** 1586,1591 **** --- 1618,1631 ---- invariant code motion can move it. */ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); + /* expand_binop can't find a suitable code in umul_widen_optab to + make a REG_EQUAL note from, so make one here. + See also smulsi3_highpart. + ??? Alternatively, we could put this at the calling site of expand_binop, + i.e. expand_expr. */ + REG_NOTES (last) + = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (SET_SRC (single_set (first))), + REG_NOTES (last)); DONE; }") *************** *** 1650,1658 **** rtx addr = force_reg (SImode, sym); rtx insns = gen_mulsi3_call (operands[0], operands[1], operands[2], addr); ! first = XVECEXP (insns, 0, 0); ! last = XVECEXP (insns, 0, XVECLEN (insns, 0) - 1); ! emit_insn (insns); } else { --- 1690,1697 ---- rtx addr = force_reg (SImode, sym); rtx insns = gen_mulsi3_call (operands[0], operands[1], operands[2], addr); ! first = insns; ! last = emit_insn (insns); } else { *************** *** 1703,1713 **** (define_insn "mulsidi3_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (mult:DI (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "%r")) ! (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))] "TARGET_SHMEDIA" ! "muls.l %1, %2, %0") ! (define_insn "mulsidi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (mult:DI --- 1742,1753 ---- (define_insn "mulsidi3_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (mult:DI (sign_extend:DI (match_operand:SI 1 "extend_reg_operand" "%r")) ! (sign_extend:DI (match_operand:SI 2 "extend_reg_operand" "r"))))] "TARGET_SHMEDIA" ! "muls.l %1, %2, %0" ! [(set_attr "type" "dmpy_media")]) ! (define_insn "mulsidi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (mult:DI *************** *** 1773,1783 **** (define_insn "umulsidi3_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (mult:DI (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "%r")) ! (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))] "TARGET_SHMEDIA" ! "mulu.l %1, %2, %0") ! (define_insn "umulsidi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (mult:DI --- 1813,1824 ---- (define_insn "umulsidi3_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (mult:DI (zero_extend:DI (match_operand:SI 1 "extend_reg_operand" "%r")) ! (zero_extend:DI (match_operand:SI 2 "extend_reg_operand" "r"))))] "TARGET_SHMEDIA" ! "mulu.l %1, %2, %0" ! [(set_attr "type" "dmpy_media")]) ! (define_insn "umulsidi3_compact" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (mult:DI *************** *** 1848,1853 **** --- 1889,1895 ---- REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); /* expand_binop can't find a suitable code in mul_highpart_optab to make a REG_EQUAL note from, so make one here. + See also {,u}mulhisi. ??? Alternatively, we could put this at the calling site of expand_binop, i.e. expand_mult_highpart. */ REG_NOTES (last) *************** *** 1899,1905 **** ;; Logical operations ;; ------------------------------------------------------------------------- ! (define_insn "" [(set (match_operand:SI 0 "arith_reg_operand" "=r,z") (and:SI (match_operand:SI 1 "arith_reg_operand" "%0,0") (match_operand:SI 2 "logical_operand" "r,L")))] --- 1941,1947 ---- ;; Logical operations ;; ------------------------------------------------------------------------- ! (define_insn "*andsi3_compact" [(set (match_operand:SI 0 "arith_reg_operand" "=r,z") (and:SI (match_operand:SI 1 "arith_reg_operand" "%0,0") (match_operand:SI 2 "logical_operand" "r,L")))] *************** *** 1907,1913 **** "and %2,%0" [(set_attr "type" "arith")]) ! ;; If the constant is 255, then emit a extu.b instruction instead of an ;; and, since that will give better code. (define_expand "andsi3" --- 1949,1955 ---- "and %2,%0" [(set_attr "type" "arith")]) ! ;; If the constant is 255, then emit an extu.b instruction instead of an ;; and, since that will give better code. (define_expand "andsi3" *************** *** 1925,1945 **** } }") ! (define_insn "anddi3" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r,r") ! (and:DI (match_operand:DI 1 "arith_reg_operand" "%r,r") ! (match_operand:DI 2 "logical_operand" "r,P")))] "TARGET_SHMEDIA" "@ and %1, %2, %0 ! andi %1, %2, %0") ! (define_insn "*andcdi3" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (and:DI (match_operand:DI 1 "arith_reg_operand" "r") (not:DI (match_operand:DI 2 "arith_reg_operand" "r"))))] "TARGET_SHMEDIA" ! "andc %1,%2,%0") (define_insn "iorsi3" [(set (match_operand:SI 0 "arith_reg_operand" "=r,z") --- 1967,2001 ---- } }") ! (define_insn_and_split "anddi3" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r,r,r") ! (and:DI (match_operand:DI 1 "arith_reg_operand" "%r,r,r") ! (match_operand:DI 2 "and_operand" "r,P,n")))] "TARGET_SHMEDIA" "@ and %1, %2, %0 ! andi %1, %2, %0 ! #" ! "reload_completed ! && ! logical_operand (operands[2], DImode)" ! [(const_int 0)] ! " ! { ! if (INTVAL (operands[2]) == (unsigned) 0xffffffff) ! emit_insn (gen_mshflo_l_di (operands[0], operands[1], CONST0_RTX (DImode))); ! else ! emit_insn (gen_mshfhi_l_di (operands[0], CONST0_RTX (DImode), operands[1])); ! DONE; ! }" ! [(set_attr "type" "arith_media")]) ! (define_insn "andcdi3" [(set (match_operand:DI 0 "arith_reg_operand" "=r") (and:DI (match_operand:DI 1 "arith_reg_operand" "r") (not:DI (match_operand:DI 2 "arith_reg_operand" "r"))))] "TARGET_SHMEDIA" ! "andc %1,%2,%0" ! [(set_attr "type" "arith_media")]) (define_insn "iorsi3" [(set (match_operand:SI 0 "arith_reg_operand" "=r,z") *************** *** 1956,1962 **** "TARGET_SHMEDIA" "@ or %1, %2, %0 ! ori %1, %2, %0") (define_insn "xorsi3" [(set (match_operand:SI 0 "arith_reg_operand" "=z,r") --- 2012,2019 ---- "TARGET_SHMEDIA" "@ or %1, %2, %0 ! ori %1, %2, %0" ! [(set_attr "type" "arith_media")]) (define_insn "xorsi3" [(set (match_operand:SI 0 "arith_reg_operand" "=z,r") *************** *** 1973,1984 **** "TARGET_SHMEDIA" "@ xor %1, %2, %0 ! xori %1, %2, %0") ;; ------------------------------------------------------------------------- ;; Shifts and rotates ;; ------------------------------------------------------------------------- (define_insn "rotlsi3_1" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (rotate:SI (match_operand:SI 1 "arith_reg_operand" "0") --- 2030,2112 ---- "TARGET_SHMEDIA" "@ xor %1, %2, %0 ! xori %1, %2, %0" ! [(set_attr "type" "arith_media")]) ! ! ;; Combiner bridge pattern for 2 * sign extend -> logical op -> truncate. ! ;; converts 2 * sign extend -> logical op into logical op -> sign extend ! (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "") ! (sign_extend:DI (match_operator 4 "binary_logical_operator" ! [(match_operand 1 "any_register_operand" "") ! (match_operand 2 "any_register_operand" "")])))] ! "TARGET_SHMEDIA" ! [(set (match_dup 5) (match_dup 4)) ! (set (match_dup 0) (sign_extend:DI (match_dup 5)))] ! " ! { ! enum machine_mode inmode = GET_MODE (operands[1]); ! int regno, offset = 0; ! ! if (GET_CODE (operands[0]) == SUBREG) ! { ! offset = SUBREG_BYTE (operands[0]); ! operands[0] = SUBREG_REG (operands[0]); ! } ! if (GET_CODE (operands[0]) != REG) ! abort (); ! if (! TARGET_LITTLE_ENDIAN) ! offset += 8 - GET_MODE_SIZE (inmode); ! operands[5] = gen_rtx_SUBREG (inmode, operands[0], offset); ! }") ;; ------------------------------------------------------------------------- ;; Shifts and rotates ;; ------------------------------------------------------------------------- + (define_expand "rotldi3" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (rotate:DI (match_operand:DI 1 "arith_reg_operand" "r") + (match_operand:HI 2 "mextr_bit_offset" "i")))] + "TARGET_SHMEDIA" + "if (! mextr_bit_offset (operands[2], HImode)) FAIL;") + + (define_insn "rotldi3_mextr" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (rotate:DI (match_operand:DI 1 "arith_reg_operand" "r") + (match_operand:HI 2 "mextr_bit_offset" "i")))] + "TARGET_SHMEDIA" + "* + { + static char templ[16]; + + sprintf (templ, \"mextr%d\\t%%1,%%1,%%0\", + 8 - (int) (INTVAL (operands[2]) >> 3)); + return templ; + }" + [(set_attr "type" "arith_media")]) + + (define_expand "rotrdi3" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (rotatert:DI (match_operand:DI 1 "arith_reg_operand" "r") + (match_operand:HI 2 "mextr_bit_offset" "i")))] + "TARGET_SHMEDIA" + "if (! mextr_bit_offset (operands[2], HImode)) FAIL;") + + (define_insn "rotrdi3_mextr" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (rotatert:DI (match_operand:DI 1 "arith_reg_operand" "r") + (match_operand:HI 2 "mextr_bit_offset" "i")))] + "TARGET_SHMEDIA" + "* + { + static char templ[16]; + + sprintf (templ, \"mextr%d\\t%%1,%%1,%%0\", (int) INTVAL (operands[2]) >> 3); + return templ; + }" + [(set_attr "type" "arith_media")]) + (define_insn "rotlsi3_1" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (rotate:SI (match_operand:SI 1 "arith_reg_operand" "0") *************** *** 2013,2019 **** "TARGET_SH1" " { ! static char rot_tab[] = { 000, 000, 000, 000, 000, 000, 010, 001, 001, 001, 011, 013, 003, 003, 003, 003, 003, 003, 003, 003, 003, 013, 012, 002, --- 2141,2147 ---- "TARGET_SH1" " { ! static const char rot_tab[] = { 000, 000, 000, 000, 000, 000, 010, 001, 001, 001, 011, 013, 003, 003, 003, 003, 003, 003, 003, 003, 003, 013, 012, 002, *************** *** 2142,2148 **** (define_split [(set (match_operand:SI 0 "arith_reg_operand" "") (ashift:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "const_int_operand" "n"))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(use (reg:SI R0_REG))] --- 2270,2276 ---- (define_split [(set (match_operand:SI 0 "arith_reg_operand" "") (ashift:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "const_int_operand" ""))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(use (reg:SI R0_REG))] *************** *** 2154,2165 **** (define_insn "ashlsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (ashift:SI (match_operand:SI 1 "arith_reg_operand" "r,r") (match_operand:SI 2 "nonmemory_operand" "r,n")))] "TARGET_SHMEDIA" "@ shlld.l %1, %2, %0 ! shlli.l %1, %2, %0") (define_expand "ashlsi3" [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") --- 2282,2294 ---- (define_insn "ashlsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (ashift:SI (match_operand:SI 1 "extend_reg_operand" "r,r") (match_operand:SI 2 "nonmemory_operand" "r,n")))] "TARGET_SHMEDIA" "@ shlld.l %1, %2, %0 ! shlli.l %1, %2, %0" ! [(set_attr "type" "arith_media")]) (define_expand "ashlsi3" [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") *************** *** 2204,2210 **** (define_split [(set (match_operand:HI 0 "arith_reg_operand" "") (ashift:HI (match_operand:HI 1 "arith_reg_operand" "") ! (match_operand:HI 2 "const_int_operand" "n"))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(use (reg:SI R0_REG))] --- 2333,2339 ---- (define_split [(set (match_operand:HI 0 "arith_reg_operand" "") (ashift:HI (match_operand:HI 1 "arith_reg_operand" "") ! (match_operand:HI 2 "const_int_operand" ""))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(use (reg:SI R0_REG))] *************** *** 2244,2251 **** [(set_attr "length" "4")]) (define_split ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "r") (const_int 16)))] "TARGET_SH1" [(set (match_dup 0) (rotate:SI (match_dup 1) (const_int 16))) --- 2373,2380 ---- [(set_attr "length" "4")]) (define_split ! [(set (match_operand:SI 0 "arith_reg_operand" "") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") (const_int 16)))] "TARGET_SH1" [(set (match_dup 0) (rotate:SI (match_dup 1) (const_int 16))) *************** *** 2264,2271 **** [(set_attr "length" "4")]) (define_split ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") (const_int 31))) (clobber (reg:SI T_REG))] "TARGET_SH1" --- 2393,2400 ---- [(set_attr "length" "4")]) (define_split ! [(set (match_operand:SI 0 "arith_reg_operand" "") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") (const_int 31))) (clobber (reg:SI T_REG))] "TARGET_SH1" *************** *** 2308,2319 **** (define_insn "ashrsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "r,r") (match_operand:SI 2 "nonmemory_operand" "r,n")))] "TARGET_SHMEDIA" "@ shard.l %1, %2, %0 ! shari.l %1, %2, %0") (define_expand "ashrsi3" [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") --- 2437,2449 ---- (define_insn "ashrsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (ashiftrt:SI (match_operand:SI 1 "extend_reg_operand" "r,r") (match_operand:SI 2 "nonmemory_operand" "r,n")))] "TARGET_SHMEDIA" "@ shard.l %1, %2, %0 ! shari.l %1, %2, %0" ! [(set_attr "type" "arith_media")]) (define_expand "ashrsi3" [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") *************** *** 2384,2390 **** (define_split [(set (match_operand:SI 0 "arith_reg_operand" "") (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "const_int_operand" "n"))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(use (reg:SI R0_REG))] --- 2514,2520 ---- (define_split [(set (match_operand:SI 0 "arith_reg_operand" "") (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "const_int_operand" ""))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed" [(use (reg:SI R0_REG))] *************** *** 2396,2407 **** (define_insn "lshrsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "r,r") (match_operand:SI 2 "nonmemory_operand" "r,n")))] "TARGET_SHMEDIA" "@ shlrd.l %1, %2, %0 ! shlri.l %1, %2, %0") (define_expand "lshrsi3" [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") --- 2526,2538 ---- (define_insn "lshrsi3_media" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (lshiftrt:SI (match_operand:SI 1 "extend_reg_operand" "r,r") (match_operand:SI 2 "nonmemory_operand" "r,n")))] "TARGET_SHMEDIA" "@ shlrd.l %1, %2, %0 ! shlri.l %1, %2, %0" ! [(set_attr "type" "arith_media")]) (define_expand "lshrsi3" [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") *************** *** 2449,2455 **** "TARGET_SHMEDIA" "@ shlld %1, %2, %0 ! shlli %1, %2, %0") (define_expand "ashldi3" [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") --- 2580,2587 ---- "TARGET_SHMEDIA" "@ shlld %1, %2, %0 ! shlli %1, %2, %0" ! [(set_attr "type" "arith_media")]) (define_expand "ashldi3" [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") *************** *** 2488,2494 **** "TARGET_SHMEDIA" "@ shlrd %1, %2, %0 ! shlri %1, %2, %0") (define_expand "lshrdi3" [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") --- 2620,2627 ---- "TARGET_SHMEDIA" "@ shlrd %1, %2, %0 ! shlri %1, %2, %0" ! [(set_attr "type" "arith_media")]) (define_expand "lshrdi3" [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") *************** *** 2527,2533 **** "TARGET_SHMEDIA" "@ shard %1, %2, %0 ! shari %1, %2, %0") (define_expand "ashrdi3" [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") --- 2660,2667 ---- "TARGET_SHMEDIA" "@ shard %1, %2, %0 ! shari %1, %2, %0" ! [(set_attr "type" "arith_media")]) (define_expand "ashrdi3" [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") *************** *** 2552,2559 **** (define_split [(set (match_operand:SI 0 "register_operand" "") (and:SI (ashift:SI (match_operand:SI 1 "register_operand" "") ! (match_operand:SI 2 "const_int_operand" "n")) ! (match_operand:SI 3 "const_int_operand" "n")))] "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32" [(use (reg:SI R0_REG))] "if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL; --- 2686,2693 ---- (define_split [(set (match_operand:SI 0 "register_operand" "") (and:SI (ashift:SI (match_operand:SI 1 "register_operand" "") ! (match_operand:SI 2 "const_int_operand" "")) ! (match_operand:SI 3 "const_int_operand" "")))] "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32" [(use (reg:SI R0_REG))] "if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL; *************** *** 2562,2569 **** (define_split [(set (match_operand:SI 0 "register_operand" "") (and:SI (ashift:SI (match_operand:SI 1 "register_operand" "") ! (match_operand:SI 2 "const_int_operand" "n")) ! (match_operand:SI 3 "const_int_operand" "n"))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32" [(use (reg:SI R0_REG))] --- 2696,2703 ---- (define_split [(set (match_operand:SI 0 "register_operand" "") (and:SI (ashift:SI (match_operand:SI 1 "register_operand" "") ! (match_operand:SI 2 "const_int_operand" "")) ! (match_operand:SI 3 "const_int_operand" ""))) (clobber (reg:SI T_REG))] "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32" [(use (reg:SI R0_REG))] *************** *** 2644,2658 **** (set_attr "type" "arith")]) (define_split ! [(set (match_operand:SI 0 "register_operand" "=r,&r") (lshiftrt:SI (ashift:SI (and:SI ! (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,0") ! (match_operand:SI 2 "const_int_operand" "N,n")) ! (match_operand:SI 3 "register_operand" "0,r")) ! (match_operand:SI 4 "const_int_operand" "n,n")) ! (match_operand:SI 5 "const_int_operand" "n,n"))) (clobber (reg:SI T_REG))] "TARGET_SH1" [(use (reg:SI R0_REG))] --- 2778,2792 ---- (set_attr "type" "arith")]) (define_split ! [(set (match_operand:SI 0 "register_operand" "") (lshiftrt:SI (ashift:SI (and:SI ! (lshiftrt:SI (match_operand:SI 1 "register_operand" "") ! (match_operand:SI 2 "const_int_operand" "")) ! (match_operand:SI 3 "register_operand" "")) ! (match_operand:SI 4 "const_int_operand" "")) ! (match_operand:SI 5 "const_int_operand" ""))) (clobber (reg:SI T_REG))] "TARGET_SH1" [(use (reg:SI R0_REG))] *************** *** 2677,2687 **** ;; signed left/right shift combination. (define_split ! [(set (match_operand:SI 0 "register_operand" "=r") (sign_extract:SI ! (ashift:SI (match_operand:SI 1 "register_operand" "r") ! (match_operand:SI 2 "const_int_operand" "n")) ! (match_operand:SI 3 "const_int_operand" "n") (const_int 0))) (clobber (reg:SI T_REG))] "TARGET_SH1" --- 2811,2821 ---- ;; signed left/right shift combination. (define_split ! [(set (match_operand:SI 0 "register_operand" "") (sign_extract:SI ! (ashift:SI (match_operand:SI 1 "register_operand" "") ! (match_operand:SI 2 "const_int_operand" "")) ! (match_operand:SI 3 "const_int_operand" "") (const_int 0))) (clobber (reg:SI T_REG))] "TARGET_SH1" *************** *** 2763,2769 **** "TARGET_SH1" "xtrct %2,%0" [(set_attr "type" "arith")]) ! ;; ------------------------------------------------------------------------- ;; Unary arithmetic ;; ------------------------------------------------------------------------- --- 2897,2903 ---- "TARGET_SH1" "xtrct %2,%0" [(set_attr "type" "arith")]) ! ;; ------------------------------------------------------------------------- ;; Unary arithmetic ;; ------------------------------------------------------------------------- *************** *** 2783,2794 **** [(set (match_operand:DI 0 "arith_reg_operand" "=r") (neg:DI (match_operand:DI 1 "arith_reg_operand" "r")))] "TARGET_SHMEDIA" ! "sub r63, %1, %0") (define_expand "negdi2" [(set (match_operand:DI 0 "arith_reg_operand" "") ! (neg:DI (match_operand:DI 1 "arith_reg_operand" ""))) ! (clobber (reg:SI T_REG))] "" " { --- 2917,2928 ---- [(set (match_operand:DI 0 "arith_reg_operand" "=r") (neg:DI (match_operand:DI 1 "arith_reg_operand" "r")))] "TARGET_SHMEDIA" ! "sub r63, %1, %0" ! [(set_attr "type" "arith_media")]) (define_expand "negdi2" [(set (match_operand:DI 0 "arith_reg_operand" "") ! (neg:DI (match_operand:DI 1 "arith_reg_operand" "")))] "" " { *************** *** 2836,2889 **** (define_insn "zero_extendsidi2" [(set (match_operand:DI 0 "register_operand" "=r") ! (zero_extend:DI (match_operand:SI 1 "register_operand" "r")))] "TARGET_SHMEDIA" ! "addz.l %1, r63, %0") (define_insn "zero_extendhidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "r,m")))] "TARGET_SHMEDIA" "@ # ! ld%M1.uw %m1, %0") (define_split ! [(set (match_operand:DI 0 "register_operand" "=r") ! (zero_extend:DI (match_operand:HI 1 "register_operand" "r")))] "TARGET_SHMEDIA && reload_completed" [(set (match_dup 0) (ashift:DI (subreg:DI (match_dup 1) 0) (const_int 48))) ! (set (match_dup 0) (lshiftrt:DI (match_dup 0) (const_int 48)))]) (define_insn "zero_extendqidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] "TARGET_SHMEDIA" "@ andi %1, 255, %0 ! ld%M1.ub %m1, %0") ! (define_insn "zero_extendhisi2" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (zero_extend:SI (match_operand:HI 1 "arith_reg_operand" "r")))] "TARGET_SH1" "extu.w %1,%0" [(set_attr "type" "arith")]) ! (define_insn "zero_extendqisi2" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (zero_extend:SI (match_operand:QI 1 "arith_reg_operand" "r")))] "TARGET_SH1" "extu.b %1,%0" [(set_attr "type" "arith")]) (define_insn "zero_extendqihi2" [(set (match_operand:HI 0 "arith_reg_operand" "=r") (zero_extend:HI (match_operand:QI 1 "arith_reg_operand" "r")))] "TARGET_SH1" "extu.b %1,%0" [(set_attr "type" "arith")]) ! ;; ------------------------------------------------------------------------- ;; Sign extension instructions ;; ------------------------------------------------------------------------- --- 2970,3092 ---- (define_insn "zero_extendsidi2" [(set (match_operand:DI 0 "register_operand" "=r") ! (zero_extend:DI (match_operand:SI 1 "extend_reg_operand" "r")))] "TARGET_SHMEDIA" ! "addz.l %1, r63, %0" ! [(set_attr "type" "arith_media")]) (define_insn "zero_extendhidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (zero_extend:DI (match_operand:HI 1 "general_extend_operand" "r,m")))] "TARGET_SHMEDIA" "@ # ! ld%M1.uw %m1, %0" ! [(set_attr "type" "*,load_media")]) (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (zero_extend:DI (match_operand:HI 1 "extend_reg_operand" "")))] "TARGET_SHMEDIA && reload_completed" [(set (match_dup 0) (ashift:DI (subreg:DI (match_dup 1) 0) (const_int 48))) ! (set (match_dup 0) (lshiftrt:DI (match_dup 0) (const_int 48)))] ! " ! { ! if (GET_CODE (operands[1]) == TRUNCATE) ! operands[1] = XEXP (operands[1], 0); ! }") ! ! ;; ??? when a truncated input to a zero_extrend is reloaded, reload will ! ;; reload the entrire truncate expression. ! (define_insn_and_split "*loaddi_trunc" ! [(set (match_operand 0 "int_gpr_dest" "=r") ! (truncate (match_operand:DI 1 "memory_operand" "m")))] ! "TARGET_SHMEDIA && reload_completed" ! "#" ! "TARGET_SHMEDIA && reload_completed" ! [(set (match_dup 0) (match_dup 1))] ! "operands[0] = gen_rtx_REG (DImode, true_regnum (operands[0]));") (define_insn "zero_extendqidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (zero_extend:DI (match_operand:QI 1 "general_extend_operand" "r,m")))] "TARGET_SHMEDIA" "@ andi %1, 255, %0 ! ld%M1.ub %m1, %0" ! [(set_attr "type" "arith_media,load_media")]) ! (define_expand "zero_extendhisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "") ! (zero_extend:SI (match_operand:HI 1 "general_extend_operand" "")))] ! "" ! " ! { ! if (! TARGET_SHMEDIA && ! arith_reg_operand (operands[1], HImode)) ! operands[1] = copy_to_mode_reg (HImode, operands[1]); ! }") ! ! (define_insn "*zero_extendhisi2_compact" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (zero_extend:SI (match_operand:HI 1 "arith_reg_operand" "r")))] "TARGET_SH1" "extu.w %1,%0" [(set_attr "type" "arith")]) ! (define_insn "*zero_extendhisi2_media" ! [(set (match_operand:SI 0 "register_operand" "=r,r") ! (zero_extend:SI (match_operand:HI 1 "general_extend_operand" "r,m")))] ! "TARGET_SHMEDIA" ! "@ ! # ! ld%M1.uw %m1, %0" ! [(set_attr "type" "arith_media,load_media")]) ! ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (zero_extend:SI (match_operand:HI 1 "extend_reg_operand" "")))] ! "TARGET_SHMEDIA && reload_completed" ! [(set (match_dup 0) (ashift:SI (subreg:SI (match_dup 1) 0) (const_int 16))) ! (set (match_dup 0) (lshiftrt:SI (match_dup 0) (const_int 16)))] ! " ! { ! if (GET_CODE (operands[1]) == TRUNCATE) ! operands[1] = XEXP (operands[1], 0); ! }") ! ! (define_expand "zero_extendqisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "") ! (zero_extend:SI (match_operand:QI 1 "general_extend_operand" "")))] ! "" ! " ! { ! if (! TARGET_SHMEDIA && ! arith_reg_operand (operands[1], QImode)) ! operands[1] = copy_to_mode_reg (QImode, operands[1]); ! }") ! ! (define_insn "*zero_extendqisi2_compact" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (zero_extend:SI (match_operand:QI 1 "arith_reg_operand" "r")))] "TARGET_SH1" "extu.b %1,%0" [(set_attr "type" "arith")]) + (define_insn "*zero_extendqisi2_media" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (zero_extend:SI (match_operand:QI 1 "general_extend_operand" "r,m")))] + "TARGET_SHMEDIA" + "@ + andi %1, 255, %0 + ld%M1.ub %m1, %0" + [(set_attr "type" "arith_media,load_media")]) + (define_insn "zero_extendqihi2" [(set (match_operand:HI 0 "arith_reg_operand" "=r") (zero_extend:HI (match_operand:QI 1 "arith_reg_operand" "r")))] "TARGET_SH1" "extu.b %1,%0" [(set_attr "type" "arith")]) ! ;; ------------------------------------------------------------------------- ;; Sign extension instructions ;; ------------------------------------------------------------------------- *************** *** 2898,2936 **** "TARGET_SHMEDIA" "@ add.l %1, r63, %0 ! ld%M1.l %m1, %0") (define_insn "extendhidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (sign_extend:DI (match_operand:HI 1 "nonimmediate_operand" "r,m")))] "TARGET_SHMEDIA" "@ # ! ld%M1.w %m1, %0") (define_split ! [(set (match_operand:DI 0 "register_operand" "=r") ! (sign_extend:DI (match_operand:HI 1 "register_operand" "r")))] "TARGET_SHMEDIA && reload_completed" [(set (match_dup 0) (ashift:DI (subreg:DI (match_dup 1) 0) (const_int 48))) ! (set (match_dup 0) (ashiftrt:DI (match_dup 0) (const_int 48)))]) (define_insn "extendqidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (sign_extend:DI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] "TARGET_SHMEDIA" "@ # ! ld%M1.b %m1, %0") (define_split ! [(set (match_operand:DI 0 "register_operand" "=r") ! (sign_extend:DI (match_operand:QI 1 "register_operand" "r")))] "TARGET_SHMEDIA && reload_completed" [(set (match_dup 0) (ashift:DI (subreg:DI (match_dup 1) 0) (const_int 56))) ! (set (match_dup 0) (ashiftrt:DI (match_dup 0) (const_int 56)))]) ! (define_insn "extendhisi2" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") (sign_extend:SI (match_operand:HI 1 "general_movsrc_operand" "r,m")))] "TARGET_SH1" --- 3101,3158 ---- "TARGET_SHMEDIA" "@ add.l %1, r63, %0 ! ld%M1.l %m1, %0" ! [(set_attr "type" "arith_media,load_media")]) (define_insn "extendhidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (sign_extend:DI (match_operand:HI 1 "general_extend_operand" "r,m")))] "TARGET_SHMEDIA" "@ # ! ld%M1.w %m1, %0" ! [(set_attr "type" "*,load_media")]) (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (sign_extend:DI (match_operand:HI 1 "extend_reg_operand" "")))] "TARGET_SHMEDIA && reload_completed" [(set (match_dup 0) (ashift:DI (subreg:DI (match_dup 1) 0) (const_int 48))) ! (set (match_dup 0) (ashiftrt:DI (match_dup 0) (const_int 48)))] ! " ! { ! if (GET_CODE (operands[1]) == TRUNCATE) ! operands[1] = XEXP (operands[1], 0); ! }") (define_insn "extendqidi2" [(set (match_operand:DI 0 "register_operand" "=r,r") ! (sign_extend:DI (match_operand:QI 1 "general_extend_operand" "r,m")))] "TARGET_SHMEDIA" "@ # ! ld%M1.b %m1, %0" ! [(set_attr "type" "*,load_media")]) (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (sign_extend:DI (match_operand:QI 1 "extend_reg_operand" "")))] "TARGET_SHMEDIA && reload_completed" [(set (match_dup 0) (ashift:DI (subreg:DI (match_dup 1) 0) (const_int 56))) ! (set (match_dup 0) (ashiftrt:DI (match_dup 0) (const_int 56)))] ! " ! { ! if (GET_CODE (operands[1]) == TRUNCATE) ! operands[1] = XEXP (operands[1], 0); ! }") ! (define_expand "extendhisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (sign_extend:SI (match_operand:HI 1 "general_extend_operand" "r,m")))] ! "" ! "") ! ! (define_insn "*extendhisi2_compact" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") (sign_extend:SI (match_operand:HI 1 "general_movsrc_operand" "r,m")))] "TARGET_SH1" *************** *** 2939,2945 **** mov.w %1,%0" [(set_attr "type" "arith,load")]) ! (define_insn "extendqisi2" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") (sign_extend:SI (match_operand:QI 1 "general_movsrc_operand" "r,m")))] "TARGET_SH1" --- 3161,3194 ---- mov.w %1,%0" [(set_attr "type" "arith,load")]) ! (define_insn "*extendhisi2_media" ! [(set (match_operand:SI 0 "register_operand" "=r,r") ! (sign_extend:SI (match_operand:HI 1 "general_extend_operand" "r,m")))] ! "TARGET_SHMEDIA" ! "@ ! # ! ld%M1.w %m1, %0" ! [(set_attr "type" "arith_media,load_media")]) ! ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (sign_extend:SI (match_operand:HI 1 "extend_reg_operand" "")))] ! "TARGET_SHMEDIA && reload_completed" ! [(set (match_dup 0) (ashift:SI (subreg:SI (match_dup 1) 0) (const_int 16))) ! (set (match_dup 0) (ashiftrt:SI (match_dup 0) (const_int 16)))] ! " ! { ! if (GET_CODE (operands[1]) == TRUNCATE) ! operands[1] = XEXP (operands[1], 0); ! }") ! ! (define_expand "extendqisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (sign_extend:SI (match_operand:QI 1 "general_extend_operand" "r,m")))] ! "" ! "") ! ! (define_insn "*extendqisi2_compact" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") (sign_extend:SI (match_operand:QI 1 "general_movsrc_operand" "r,m")))] "TARGET_SH1" *************** *** 2948,2953 **** --- 3197,3223 ---- mov.b %1,%0" [(set_attr "type" "arith,load")]) + (define_insn "*extendqisi2_media" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (sign_extend:SI (match_operand:QI 1 "general_extend_operand" "r,m")))] + "TARGET_SHMEDIA" + "@ + # + ld%M1.b %m1, %0" + [(set_attr "type" "arith_media,load_media")]) + + (define_split + [(set (match_operand:SI 0 "register_operand" "") + (sign_extend:SI (match_operand:QI 1 "extend_reg_operand" "")))] + "TARGET_SHMEDIA && reload_completed" + [(set (match_dup 0) (ashift:SI (subreg:SI (match_dup 1) 0) (const_int 24))) + (set (match_dup 0) (ashiftrt:SI (match_dup 0) (const_int 24)))] + " + { + if (GET_CODE (operands[1]) == TRUNCATE) + operands[1] = XEXP (operands[1], 0); + }") + (define_insn "extendqihi2" [(set (match_operand:HI 0 "arith_reg_operand" "=r,r") (sign_extend:HI (match_operand:QI 1 "general_movsrc_operand" "r,m")))] *************** *** 2956,2962 **** exts.b %1,%0 mov.b %1,%0" [(set_attr "type" "arith,load")]) ! ;; ------------------------------------------------------------------------- ;; Move instructions ;; ------------------------------------------------------------------------- --- 3226,3271 ---- exts.b %1,%0 mov.b %1,%0" [(set_attr "type" "arith,load")]) ! ! /* It would seem useful to combine the truncXi patterns into the movXi ! patterns, but unary operators are ignored when matching constraints, ! so we need separate patterns. */ ! (define_insn "truncdisi2" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,m,m,f,r,f") ! (truncate:SI (match_operand:DI 1 "register_operand" "r,r,f,r,f,f")))] ! "TARGET_SHMEDIA" ! "@ ! add.l %1, r63, %0 ! st%M0.l %m0, %1 ! fst%M0.s %m0, %T1 ! fmov.ls %1, %0 ! fmov.sl %T1, %0 ! fmov.s %T1, %0" ! [(set_attr "type" "arith_media,store_media,fstore_media,fload_media,fpconv_media,fmove_media")]) ! ! ! (define_insn "truncdihi2" ! [(set (match_operand:HI 0 "general_movdst_operand" "=?r,m") ! (truncate:HI (match_operand:DI 1 "register_operand" "r,r")))] ! "TARGET_SHMEDIA" ! "@ ! shlli\\t%1,48,%0\;shlri\\t%0,48,%0 ! st%M0.w %m0, %1" ! [(set_attr "type" "arith_media,store_media") ! (set_attr "length" "8,4")]) ! ! ; N.B. This should agree with LOAD_EXTEND_OP and movqi. ! ; Because we use zero extension, we can't provide signed QImode compares ! ; using a simple compare or conditional banch insn. ! (define_insn "truncdiqi2" ! [(set (match_operand:QI 0 "general_movdst_operand" "=r,m") ! (truncate:QI (match_operand:DI 1 "register_operand" "r,r")))] ! "TARGET_SHMEDIA" ! "@ ! and %1, 255, %0 ! st%M0.b %m0, %1" ! [(set_attr "type" "arith_media,store")]) ! ;; ------------------------------------------------------------------------- ;; Move instructions ;; ------------------------------------------------------------------------- *************** *** 2990,2995 **** --- 3299,3305 ---- "TARGET_SH3E && ! TARGET_SH5" "sts.l fpul,@-r15" [(set_attr "type" "store") + (set_attr "late_fp_use" "yes") (set_attr "hit_stack" "yes")]) ;; DFmode pushes for sh4 require a lot of what is defined for movdf_i4, *************** *** 3025,3030 **** --- 3335,3366 ---- "TARGET_SH1 && ! TARGET_SH5" "") + (define_expand "push_fpscr" + [(const_int 0)] + "TARGET_SH3E" + " + { + rtx insn = emit_insn (gen_fpu_switch (gen_rtx (MEM, PSImode, + gen_rtx (PRE_DEC, Pmode, + stack_pointer_rtx)), + get_fpscr_rtx ())); + REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_INC, stack_pointer_rtx, NULL_RTX); + DONE; + }") + + (define_expand "pop_fpscr" + [(const_int 0)] + "TARGET_SH3E" + " + { + rtx insn = emit_insn (gen_fpu_switch (get_fpscr_rtx (), + gen_rtx (MEM, PSImode, + gen_rtx (POST_INC, Pmode, + stack_pointer_rtx)))); + REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_INC, stack_pointer_rtx, NULL_RTX); + DONE; + }") + ;; These two patterns can happen as the result of optimization, when ;; comparisons get simplified to a move of zero or 1 into the T reg. ;; They don't disappear completely, because the T reg is a fixed hard reg. *************** *** 3065,3080 **** lds.l %1,%0 lds.l %1,%0 fake %1,%0" ! [(set_attr "type" "pcload_si,move,*,load_si,move,prget,move,store,store,pstore,move,prset,load,pload,pcload_si") (set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*")]) ;; t/r must come after r/r, lest reload will try to reload stuff like ;; (subreg:SI (reg:SF FR14_REG) 0) into T (compiling stdlib/strtod.c -m3e -O2) ;; ??? This allows moves from macl to fpul to be recognized, but these moves ;; will require a reload. (define_insn "movsi_ie" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,t,r,r,r,r,m,<,<,x,l,x,l,y,<,r,y,r,y") ! (match_operand:SI 1 "general_movsrc_operand" "Q,rI,r,mr,x,l,t,r,x,l,r,r,>,>,>,y,i,r,y,y"))] "TARGET_SH3E && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode))" --- 3401,3418 ---- lds.l %1,%0 lds.l %1,%0 fake %1,%0" ! [(set_attr "type" "pcload_si,move,mt_group,load_si,mac_gp,prget,move,store,store,pstore,move,prset,load,pload,pcload_si") (set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*")]) ;; t/r must come after r/r, lest reload will try to reload stuff like ;; (subreg:SI (reg:SF FR14_REG) 0) into T (compiling stdlib/strtod.c -m3e -O2) ;; ??? This allows moves from macl to fpul to be recognized, but these moves ;; will require a reload. + ;; ??? We can't include f/f because we need the proper FPSCR setting when + ;; TARGET_FMOVD is in effect, and mode switching is done before reload. (define_insn "movsi_ie" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,t,r,r,r,r,m,<,<,x,l,x,l,y,<,r,y,r,*f,y,*f,y") ! (match_operand:SI 1 "general_movsrc_operand" "Q,rI,r,mr,x,l,t,r,x,l,r,r,>,>,>,y,i,r,y,y,*f,*f,y"))] "TARGET_SH3E && (register_operand (operands[0], SImode) || register_operand (operands[1], SImode))" *************** *** 3098,3106 **** fake %1,%0 lds %1,%0 sts %1,%0 ! move optimized away" ! [(set_attr "type" "pcload_si,move,*,load_si,move,prget,move,store,store,pstore,move,prset,load,pload,load,store,pcload_si,gp_fpul,gp_fpul,nil") ! (set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,0")]) (define_insn "movsi_i_lowpart" [(set (strict_low_part (match_operand:SI 0 "general_movdst_operand" "+r,r,r,r,r,r,m,r")) --- 3436,3448 ---- fake %1,%0 lds %1,%0 sts %1,%0 + fsts fpul,%0 + flds %1,fpul + fmov %1,%0 ! move optimized away" ! [(set_attr "type" "pcload_si,move,*,load_si,mac_gp,prget,move,store,store,pstore,move,prset,load,pload,load,store,pcload_si,gp_fpul,fpul_gp,fmove,fmove,fmove,nil") ! (set_attr "late_fp_use" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,yes,*,*,yes,*,*,*,*") ! (set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,0")]) (define_insn "movsi_i_lowpart" [(set (strict_low_part (match_operand:SI 0 "general_movdst_operand" "+r,r,r,r,r,r,m,r")) *************** *** 3120,3168 **** [(set_attr "type" "pcload,move,load,move,prget,move,store,pcload")]) (define_insn "*movsi_media" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,f,m,f,r,f,*b*k,r,b*k") ! (match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,r,m,f,r,f,f,r,*b*k,T"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], SImode) ! || register_operand (operands[1], SImode))" "@ add.l %1, r63, %0 movi %1, %0 # ld%M1.l %m1, %0 ! st%M0.l %m0, %1 fld%M1.s %m1, %0 fst%M0.s %m0, %1 ! fmov.ls %1, %0 fmov.sl %1, %0 fmov.s %1, %0 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "move,move,*,load,store,load,store,move,move,move,ptabs,move,pt") (set_attr "length" "4,4,8,4,4,4,4,4,4,4,4,4,12")]) (define_insn "*movsi_media_nofpu" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,*b*k,r,b*k") ! (match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,r,r,*b*k,T"))] "TARGET_SHMEDIA && (register_operand (operands[0], SImode) ! || register_operand (operands[1], SImode))" "@ add.l %1, r63, %0 movi %1, %0 # ld%M1.l %m1, %0 ! st%M0.l %m0, %1 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "move,move,*,load,store,ptabs,move,pt") (set_attr "length" "4,4,8,4,4,4,4,12")]) (define_split ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (match_operand:SI 1 "immediate_operand" "s"))] "TARGET_SHMEDIA && reload_completed && MOVI_SHORI_BASE_OPERAND_P (operands[1])" [(set (subreg:DI (match_dup 0) 0) (match_dup 2))] --- 3462,3510 ---- [(set_attr "type" "pcload,move,load,move,prget,move,store,pcload")]) (define_insn "*movsi_media" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,f,m,f,r,f,*b,r,b") ! (match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,rU,m,f,rU,f,f,r,*b,T"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], SImode) ! || sh_register_operand (operands[1], SImode))" "@ add.l %1, r63, %0 movi %1, %0 # ld%M1.l %m1, %0 ! st%M0.l %m0, %N1 fld%M1.s %m1, %0 fst%M0.s %m0, %1 ! fmov.ls %N1, %0 fmov.sl %1, %0 fmov.s %1, %0 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "arith_media,arith_media,*,load_media,store_media,fload_media,fstore_media,fload_media,fpconv_media,fmove_media,ptabs_media,gettr_media,pt_media") (set_attr "length" "4,4,8,4,4,4,4,4,4,4,4,4,12")]) (define_insn "*movsi_media_nofpu" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,*b,r,b") ! (match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,rU,r,*b,T"))] "TARGET_SHMEDIA && (register_operand (operands[0], SImode) ! || sh_register_operand (operands[1], SImode))" "@ add.l %1, r63, %0 movi %1, %0 # ld%M1.l %m1, %0 ! st%M0.l %m0, %N1 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "arith_media,arith_media,*,load_media,store_media,ptabs_media,gettr_media,pt_media") (set_attr "length" "4,4,8,4,4,4,4,12")]) (define_split ! [(set (match_operand:SI 0 "arith_reg_operand" "") ! (match_operand:SI 1 "immediate_operand" ""))] "TARGET_SHMEDIA && reload_completed && MOVI_SHORI_BASE_OPERAND_P (operands[1])" [(set (subreg:DI (match_dup 0) 0) (match_dup 2))] *************** *** 3173,3181 **** }") (define_split ! [(set (match_operand:SI 0 "register_operand" "=r") ! (match_operand:SI 1 "immediate_operand" "n"))] ! "TARGET_SHMEDIA && ((GET_CODE (operands[1]) == CONST_INT && ! CONST_OK_FOR_J (INTVAL (operands[1]))) || GET_CODE (operands[1]) == CONST_DOUBLE)" --- 3515,3523 ---- }") (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (match_operand:SI 1 "immediate_operand" ""))] ! "TARGET_SHMEDIA && reload_completed && ((GET_CODE (operands[1]) == CONST_INT && ! CONST_OK_FOR_J (INTVAL (operands[1]))) || GET_CODE (operands[1]) == CONST_DOUBLE)" *************** *** 3223,3236 **** (clobber (match_scratch:SI 2 "=&r"))] "TARGET_HARD_SH4" "ocbwb\\t@%0\;extu.w\\t%0,%2\;or\\t%1,%2\;mov.l\\t%0,@%2" ! [(set_attr "length" "8")]) (define_insn "ic_invalidate_line_media" [(unspec_volatile [(match_operand 0 "register_operand" "r")] UNSPEC_ICACHE)] "TARGET_SHMEDIA" ! "icbi %0, 0\;synci" ! [(set_attr "length" "8")]) (define_insn "ic_invalidate_line_compact" [(unspec_volatile [(match_operand:SI 0 "register_operand" "z") --- 3565,3582 ---- (clobber (match_scratch:SI 2 "=&r"))] "TARGET_HARD_SH4" "ocbwb\\t@%0\;extu.w\\t%0,%2\;or\\t%1,%2\;mov.l\\t%0,@%2" ! [(set_attr "length" "8") ! (set_attr "type" "cwb")]) + ;; ??? could make arg 0 an offsettable memory operand to allow to save + ;; an add in the code that calculates the address. (define_insn "ic_invalidate_line_media" [(unspec_volatile [(match_operand 0 "register_operand" "r")] UNSPEC_ICACHE)] "TARGET_SHMEDIA" ! "ocbwb %0,0\;synco\;icbi %0, 0\;synci" ! [(set_attr "length" "16") ! (set_attr "type" "invalidate_line_media")]) (define_insn "ic_invalidate_line_compact" [(unspec_volatile [(match_operand:SI 0 "register_operand" "z") *************** *** 3242,3247 **** --- 3588,3623 ---- [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) + (define_expand "initialize_trampoline" + [(match_operand:SI 0 "" "") + (match_operand:SI 1 "" "") + (match_operand:SI 2 "" "")] + "TARGET_SHCOMPACT" + " + { + rtx sfun, tramp; + + tramp = force_reg (Pmode, operands[0]); + sfun = force_reg (Pmode, gen_rtx_SYMBOL_REF (Pmode, \"__init_trampoline\")); + emit_move_insn (gen_rtx_REG (SImode, R2_REG), operands[1]); + emit_move_insn (gen_rtx_REG (SImode, R3_REG), operands[2]); + + emit_insn (gen_initialize_trampoline_compact (tramp, sfun)); + DONE; + }") + + (define_insn "initialize_trampoline_compact" + [(unspec_volatile [(match_operand:SI 0 "register_operand" "z") + (match_operand:SI 1 "register_operand" "r") + (reg:SI R2_REG) (reg:SI R3_REG)] + UNSPEC_INIT_TRAMP) + + (clobber (reg:SI PR_REG))] + "TARGET_SHCOMPACT" + "jsr @%1%#" + [(set_attr "type" "sfunc") + (set_attr "needs_delay_slot" "yes")]) + (define_insn "movqi_i" [(set (match_operand:QI 0 "general_movdst_operand" "=r,r,m,r,r,l") (match_operand:QI 1 "general_movsrc_operand" "ri,m,r,t,l,r"))] *************** *** 3259,3273 **** (define_insn "*movqi_media" [(set (match_operand:QI 0 "general_movdst_operand" "=r,r,r,m") ! (match_operand:QI 1 "general_movsrc_operand" "r,JS,m,r"))] "TARGET_SHMEDIA && (arith_reg_operand (operands[0], QImode) ! || arith_reg_operand (operands[1], QImode))" "@ add.l %1, r63, %0 movi %1, %0 ! ld%M1.b %m1, %0 ! st%M0.b %m0, %1") (define_expand "movqi" [(set (match_operand:QI 0 "general_operand" "") --- 3635,3650 ---- (define_insn "*movqi_media" [(set (match_operand:QI 0 "general_movdst_operand" "=r,r,r,m") ! (match_operand:QI 1 "general_movsrc_operand" "r,JS,m,rU"))] "TARGET_SHMEDIA && (arith_reg_operand (operands[0], QImode) ! || arith_reg_or_0_operand (operands[1], QImode))" "@ add.l %1, r63, %0 movi %1, %0 ! ld%M1.ub %m1, %0 ! st%M0.b %m0, %N1" ! [(set_attr "type" "arith_media,arith_media,load_media,store_media")]) (define_expand "movqi" [(set (match_operand:QI 0 "general_operand" "") *************** *** 3275,3280 **** --- 3652,3673 ---- "" "{ if (prepare_move_operands (operands, QImode)) DONE; }") + (define_expand "reload_inqi" + [(set (match_operand:SI 2 "" "=&r") + (match_operand:QI 1 "inqhi_operand" "")) + (set (match_operand:QI 0 "arith_reg_operand" "=r") + (truncate:HI (match_dup 3)))] + "TARGET_SHMEDIA" + " + { + rtx inner = XEXP (operands[1], 0); + int regno = REGNO (inner); + + regno += HARD_REGNO_NREGS (regno, GET_MODE (inner)) - 1; + operands[1] = gen_rtx_REG (SImode, regno); + operands[3] = gen_rtx_REG (DImode, REGNO (operands[2])); + }") + (define_insn "movhi_i" [(set (match_operand:HI 0 "general_movdst_operand" "=r,r,r,r,m,r,l,r") (match_operand:HI 1 "general_movsrc_operand" "Q,rI,m,t,r,l,r,i"))] *************** *** 3294,3314 **** (define_insn "*movhi_media" [(set (match_operand:HI 0 "general_movdst_operand" "=r,r,r,r,m") ! (match_operand:HI 1 "general_movsrc_operand" "r,JS,n,m,r"))] "TARGET_SHMEDIA && (arith_reg_operand (operands[0], HImode) ! || arith_reg_operand (operands[1], HImode))" "@ add.l %1, r63, %0 movi %1, %0 # ld%M1.w %m1, %0 ! st%M0.w %m0, %1") (define_split ! [(set (match_operand:HI 0 "register_operand" "=r") ! (match_operand:HI 1 "immediate_operand" "n"))] ! "TARGET_SHMEDIA && ! CONST_OK_FOR_J (INTVAL (operands[1]))" [(set (subreg:DI (match_dup 0) 0) (match_dup 1))]) (define_expand "movhi" --- 3687,3709 ---- (define_insn "*movhi_media" [(set (match_operand:HI 0 "general_movdst_operand" "=r,r,r,r,m") ! (match_operand:HI 1 "general_movsrc_operand" "r,JS,n,m,rU"))] "TARGET_SHMEDIA && (arith_reg_operand (operands[0], HImode) ! || arith_reg_or_0_operand (operands[1], HImode))" "@ add.l %1, r63, %0 movi %1, %0 # ld%M1.w %m1, %0 ! st%M0.w %m0, %N1" ! [(set_attr "type" "arith_media,arith_media,*,load_media,store_media")]) (define_split ! [(set (match_operand:HI 0 "register_operand" "") ! (match_operand:HI 1 "immediate_operand" ""))] ! "TARGET_SHMEDIA && reload_completed ! && ! CONST_OK_FOR_J (INTVAL (operands[1]))" [(set (subreg:DI (match_dup 0) 0) (match_dup 1))]) (define_expand "movhi" *************** *** 3317,3327 **** "" "{ if (prepare_move_operands (operands, HImode)) DONE; }") ! ;; ??? This should be a define expand. ;; x/r can be created by inlining/cse, e.g. for execute/961213-1.c ;; compiled with -m2 -ml -O3 -funroll-loops ! (define_insn "" [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,m,r,r,r,*!x") (match_operand:DI 1 "general_movsrc_operand" "Q,r,m,r,I,i,x,r"))] "TARGET_SH1 --- 3712,3736 ---- "" "{ if (prepare_move_operands (operands, HImode)) DONE; }") ! (define_expand "reload_inhi" ! [(set (match_operand:SI 2 "" "=&r") ! (match_operand:HI 1 "inqhi_operand" "")) ! (set (match_operand:HI 0 "arith_reg_operand" "=r") ! (truncate:HI (match_dup 3)))] ! "TARGET_SHMEDIA" ! " ! { ! rtx inner = XEXP (operands[1], 0); ! int regno = REGNO (inner); ! ! regno += HARD_REGNO_NREGS (regno, GET_MODE (inner)) - 1; ! operands[1] = gen_rtx_REG (SImode, regno); ! operands[3] = gen_rtx_REG (DImode, REGNO (operands[2])); ! }") ;; x/r can be created by inlining/cse, e.g. for execute/961213-1.c ;; compiled with -m2 -ml -O3 -funroll-loops ! (define_insn "*movdi_i" [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,m,r,r,r,*!x") (match_operand:DI 1 "general_movsrc_operand" "Q,r,m,r,I,i,x,r"))] "TARGET_SH1 *************** *** 3332,3338 **** (set_attr "type" "pcload,move,load,store,move,pcload,move,move")]) ;; If the output is a register and the input is memory or a register, we have ! ;; to be careful and see which word needs to be loaded first. (define_split [(set (match_operand:DI 0 "general_movdst_operand" "") --- 3741,3747 ---- (set_attr "type" "pcload,move,load,store,move,pcload,move,move")]) ;; If the output is a register and the input is memory or a register, we have ! ;; to be careful and see which word needs to be loaded first. (define_split [(set (match_operand:DI 0 "general_movdst_operand" "") *************** *** 3381,3429 **** }") (define_insn "*movdi_media" ! [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,f,m,f,r,f,*b*k,r,b*k") ! (match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rl,m,f,r,f,f,r,*b*k,T"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], DImode) ! || register_operand (operands[1], DImode))" "@ add %1, r63, %0 movi %1, %0 # ld%M1.q %m1, %0 ! st%M0.q %m0, %1 fld%M1.d %m1, %0 fst%M0.d %m0, %1 ! fmov.qd %1, %0 fmov.dq %1, %0 fmov.d %1, %0 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "move,move,*,load,store,load,store,move,move,move,ptabs,move,pt") (set_attr "length" "4,4,16,4,4,4,4,4,4,4,4,4,*")]) (define_insn "*movdi_media_nofpu" ! [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,*b*k,r,b*k") ! (match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rl,r,*b*k,T"))] "TARGET_SHMEDIA && (register_operand (operands[0], DImode) ! || register_operand (operands[1], DImode))" "@ add %1, r63, %0 movi %1, %0 # ld%M1.q %m1, %0 ! st%M0.q %m0, %1 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "move,move,*,load,store,ptabs,move,pt") (set_attr "length" "4,4,16,4,4,4,4,*")]) (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (match_operand:DI 1 "immediate_operand" "s"))] "TARGET_SHMEDIA && reload_completed && MOVI_SHORI_BASE_OPERAND_P (operands[1])" [(set (match_dup 0) (match_dup 1))] --- 3790,3838 ---- }") (define_insn "*movdi_media" ! [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,f,m,f,r,f,*b,r,b") ! (match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rlU,m,f,rU,f,f,r,*b,T"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], DImode) ! || sh_register_operand (operands[1], DImode))" "@ add %1, r63, %0 movi %1, %0 # ld%M1.q %m1, %0 ! st%M0.q %m0, %N1 fld%M1.d %m1, %0 fst%M0.d %m0, %1 ! fmov.qd %N1, %0 fmov.dq %1, %0 fmov.d %1, %0 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "arith_media,arith_media,*,load_media,store_media,fload_media,fstore_media,fload_media,dfpconv_media,fmove_media,ptabs_media,gettr_media,pt_media") (set_attr "length" "4,4,16,4,4,4,4,4,4,4,4,4,*")]) (define_insn "*movdi_media_nofpu" ! [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,*b,r,b") ! (match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rlU,r,*b,T"))] "TARGET_SHMEDIA && (register_operand (operands[0], DImode) ! || sh_register_operand (operands[1], DImode))" "@ add %1, r63, %0 movi %1, %0 # ld%M1.q %m1, %0 ! st%M0.q %m0, %N1 ptabs %1, %0 gettr %1, %0 pt %1, %0" ! [(set_attr "type" "arith_media,arith_media,*,load_media,store_media,ptabs_media,gettr_media,pt_media") (set_attr "length" "4,4,16,4,4,4,4,*")]) (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "") ! (match_operand:DI 1 "immediate_operand" ""))] "TARGET_SHMEDIA && reload_completed && MOVI_SHORI_BASE_OPERAND_P (operands[1])" [(set (match_dup 0) (match_dup 1))] *************** *** 3481,3494 **** && MOVI_SHORI_BASE_OPERAND_P (operands[1])" " { ! if (GET_CODE (operands[1]) == LABEL_REF ! && GET_CODE (XEXP (operands[1], 0)) == CODE_LABEL) ! LABEL_NUSES (XEXP (operands[1], 0)) += 4; ! else if (GOTOFF_P (operands[1]) ! && GET_CODE (XVECEXP (XEXP (operands[1], 0), 0, 0)) == LABEL_REF ! && (GET_CODE (XEXP (XVECEXP (XEXP (operands[1], 0), 0, 0), 0)) ! == CODE_LABEL)) ! LABEL_NUSES (XEXP (XVECEXP (XEXP (operands[1], 0), 0, 0), 0)) += 4; }") (define_expand "movdi_const_32bit" --- 3890,3896 ---- && MOVI_SHORI_BASE_OPERAND_P (operands[1])" " { ! sh_mark_label (operands[1], 4); }") (define_expand "movdi_const_32bit" *************** *** 3510,3523 **** && MOVI_SHORI_BASE_OPERAND_P (operands[1])" " { ! if (GET_CODE (operands[1]) == LABEL_REF ! && GET_CODE (XEXP (operands[1], 0)) == CODE_LABEL) ! LABEL_NUSES (XEXP (operands[1], 0)) += 2; ! else if (GOTOFF_P (operands[1]) ! && GET_CODE (XVECEXP (XEXP (operands[1], 0), 0, 0)) == LABEL_REF ! && (GET_CODE (XEXP (XVECEXP (XEXP (operands[1], 0), 0, 0), 0)) ! == CODE_LABEL)) ! LABEL_NUSES (XEXP (XVECEXP (XEXP (operands[1], 0), 0, 0), 0)) += 2; }") (define_expand "movdi_const_16bit" --- 3912,3918 ---- && MOVI_SHORI_BASE_OPERAND_P (operands[1])" " { ! sh_mark_label (operands[1], 2); }") (define_expand "movdi_const_16bit" *************** *** 3530,3568 **** "") (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (match_operand:DI 1 "immediate_operand" "i"))] "TARGET_SHMEDIA && reload_completed && GET_CODE (operands[1]) == CONST_INT && ! CONST_OK_FOR_J (INTVAL (operands[1]))" [(set (match_dup 0) (match_dup 2)) ! (set (match_dup 0) ! (ior:DI (ashift:DI (match_dup 0) (const_int 16)) ! (zero_extend:DI (truncate:HI (match_dup 1)))))] " { ! unsigned HOST_WIDE_INT low = INTVAL (operands[1]); ! unsigned HOST_WIDE_INT val = low; unsigned HOST_WIDE_INT sign; /* Sign-extend the 16 least-significant bits. */ ! val &= 0xffff; ! val ^= 0x8000; ! val -= 0x8000; ! operands[1] = GEN_INT (val); /* Arithmetic shift right the word by 16 bits. */ ! low >>= 16; sign = 1; sign <<= (HOST_BITS_PER_WIDE_INT - 16 - 1); ! low ^= sign; ! low -= sign; ! operands[2] = GEN_INT (low); }") (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (match_operand:DI 1 "immediate_operand" "F"))] "TARGET_SHMEDIA && reload_completed && GET_CODE (operands[1]) == CONST_DOUBLE" [(set (match_dup 0) (match_dup 2)) --- 3925,4030 ---- "") (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "") ! (match_operand:DI 1 "immediate_operand" ""))] "TARGET_SHMEDIA && reload_completed && GET_CODE (operands[1]) == CONST_INT && ! CONST_OK_FOR_J (INTVAL (operands[1]))" [(set (match_dup 0) (match_dup 2)) ! (match_dup 1)] " { ! unsigned HOST_WIDE_INT val = INTVAL (operands[1]); ! unsigned HOST_WIDE_INT low = val; ! unsigned HOST_WIDE_INT high = val; unsigned HOST_WIDE_INT sign; + unsigned HOST_WIDE_INT val2 = val ^ (val-1); /* Sign-extend the 16 least-significant bits. */ ! low &= 0xffff; ! low ^= 0x8000; ! low -= 0x8000; /* Arithmetic shift right the word by 16 bits. */ ! high >>= 16; sign = 1; sign <<= (HOST_BITS_PER_WIDE_INT - 16 - 1); ! high ^= sign; ! high -= sign; ! do ! { ! /* If we can't generate the constant with a two-insn movi / shori ! sequence, try some other strategies. */ ! if (! CONST_OK_FOR_J (high)) ! { ! /* Try constant load / left shift. We know VAL != 0. */ ! val2 = val ^ (val-1); ! if (val2 > 0x1ffff) ! { ! int trailing_zeroes = exact_log2 ((val2 >> 16) + 1) + 15; ! ! if (CONST_OK_FOR_J (val >> trailing_zeroes) ! || (! CONST_OK_FOR_J (high >> 16) ! && CONST_OK_FOR_J (val >> (trailing_zeroes + 16)))) ! { ! val2 = (HOST_WIDE_INT) val >> trailing_zeroes; ! operands[1] = gen_ashldi3_media (operands[0], operands[0], ! GEN_INT (trailing_zeroes)); ! break; ! } ! } ! /* Try constant load / right shift. */ ! val2 = (val >> 15) + 1; ! if (val2 == (val2 & -val2)) ! { ! int shift = 49 - exact_log2 (val2); ! ! val2 = trunc_int_for_mode (val << shift, DImode); ! if (CONST_OK_FOR_J (val2)) ! { ! operands[1] = gen_lshrdi3_media (operands[0], operands[0], ! GEN_INT (shift)); ! break; ! } ! } ! /* Try mperm.w . */ ! val2 = val & 0xffff; ! if ((val >> 16 & 0xffff) == val2 ! && (val >> 32 & 0xffff) == val2 ! && (val >> 48 & 0xffff) == val2) ! { ! val2 = (HOST_WIDE_INT) val >> 48; ! operands[1] = gen_rtx_REG (V4HImode, true_regnum (operands[0])); ! operands[1] = gen_mperm_w0 (operands[1], operands[1]); ! break; ! } ! /* Try movi / mshflo.l */ ! val2 = (HOST_WIDE_INT) val >> 32; ! if (val2 == trunc_int_for_mode (val, SImode)) ! { ! operands[1] = gen_mshflo_l_di (operands[0], operands[0], ! operands[0]); ! break; ! } ! /* Try movi / mshflo.l w/ r63. */ ! val2 = val + ((HOST_WIDE_INT) -1 << 32); ! if ((HOST_WIDE_INT) val2 < 0 && CONST_OK_FOR_J (val2)) ! { ! operands[1] = gen_mshflo_l_di (operands[0], operands[0], ! GEN_INT (0)); ! break; ! } ! } ! val2 = high; ! operands[1] = gen_shori_media (operands[0], operands[0], GEN_INT (low)); ! } ! while (0); ! operands[2] = GEN_INT (val2); }") (define_split ! [(set (match_operand:DI 0 "arith_reg_operand" "") ! (match_operand:DI 1 "immediate_operand" ""))] "TARGET_SHMEDIA && reload_completed && GET_CODE (operands[1]) == CONST_DOUBLE" [(set (match_dup 0) (match_dup 2)) *************** *** 3600,3606 **** operands[2] = immed_double_const (low, high, DImode); }") ! (define_insn "*shori_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r,r") (ior:DI (ashift:DI (match_operand:DI 1 "arith_reg_operand" "0,0") (const_int 16)) --- 4062,4068 ---- operands[2] = immed_double_const (low, high, DImode); }") ! (define_insn "shori_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r,r") (ior:DI (ashift:DI (match_operand:DI 1 "arith_reg_operand" "0,0") (const_int 16)) *************** *** 3610,3616 **** "TARGET_SHMEDIA" "@ shori %u2, %0 ! #") (define_expand "movdi" [(set (match_operand:DI 0 "general_movdst_operand" "") --- 4072,4079 ---- "TARGET_SHMEDIA" "@ shori %u2, %0 ! #" ! [(set_attr "type" "arith_media,*")]) (define_expand "movdi" [(set (match_operand:DI 0 "general_movdst_operand" "") *************** *** 3620,3653 **** (define_insn "movdf_media" [(set (match_operand:DF 0 "general_movdst_operand" "=f,f,r,r,r,f,m,r,m") ! (match_operand:DF 1 "general_movsrc_operand" "f,r,f,r,F,m,f,m,r"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode))" "@ fmov.d %1, %0 ! fmov.qd %1, %0 fmov.dq %1, %0 add %1, r63, %0 # fld%M1.d %m1, %0 fst%M0.d %m0, %1 ld%M1.q %m1, %0 ! st%M0.q %m0, %1" ! [(set_attr "type" "move,move,move,move,*,load,store,load,store")]) (define_insn "movdf_media_nofpu" [(set (match_operand:DF 0 "general_movdst_operand" "=r,r,r,m") ! (match_operand:DF 1 "general_movsrc_operand" "r,F,m,r"))] "TARGET_SHMEDIA && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode))" "@ add %1, r63, %0 # ld%M1.q %m1, %0 ! st%M0.q %m0, %1" ! [(set_attr "type" "move,*,load,store")]) (define_split [(set (match_operand:DF 0 "arith_reg_operand" "") --- 4083,4116 ---- (define_insn "movdf_media" [(set (match_operand:DF 0 "general_movdst_operand" "=f,f,r,r,r,f,m,r,m") ! (match_operand:DF 1 "general_movsrc_operand" "f,rU,f,r,F,m,f,m,rU"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], DFmode) ! || sh_register_operand (operands[1], DFmode))" "@ fmov.d %1, %0 ! fmov.qd %N1, %0 fmov.dq %1, %0 add %1, r63, %0 # fld%M1.d %m1, %0 fst%M0.d %m0, %1 ld%M1.q %m1, %0 ! st%M0.q %m0, %N1" ! [(set_attr "type" "fmove_media,fload_media,dfpconv_media,arith_media,*,fload_media,fstore_media,load_media,store_media")]) (define_insn "movdf_media_nofpu" [(set (match_operand:DF 0 "general_movdst_operand" "=r,r,r,m") ! (match_operand:DF 1 "general_movsrc_operand" "r,F,m,rU"))] "TARGET_SHMEDIA && (register_operand (operands[0], DFmode) ! || sh_register_operand (operands[1], DFmode))" "@ add %1, r63, %0 # ld%M1.q %m1, %0 ! st%M0.q %m0, %N1" ! [(set_attr "type" "arith_media,*,load_media,store_media")]) (define_split [(set (match_operand:DF 0 "arith_reg_operand" "") *************** *** 3733,3739 **** (if_then_else (ne (symbol_ref "TARGET_SHCOMPACT") (const_int 0)) (const_int 10) (const_int 8))]) ! (set_attr "type" "fmove,move,pcload,load,store,pcload,load,store,load,load") (set (attr "fp_mode") (if_then_else (eq_attr "fmovd" "yes") (const_string "double") (const_string "none")))]) --- 4196,4203 ---- (if_then_else (ne (symbol_ref "TARGET_SHCOMPACT") (const_int 0)) (const_int 10) (const_int 8))]) ! (set_attr "type" "fmove,move,pcfload,fload,store,pcload,load,store,load,fload") ! (set_attr "late_fp_use" "*,*,*,*,yes,*,*,*,*,*") (set (attr "fp_mode") (if_then_else (eq_attr "fmovd" "yes") (const_string "double") (const_string "none")))]) *************** *** 3748,3754 **** (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) (clobber (match_scratch:SI 3 "=X"))] "TARGET_SH4 && reload_completed && (true_regnum (operands[0]) < 16) != (true_regnum (operands[1]) < 16)" --- 4212,4218 ---- (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "")) (clobber (match_scratch:SI 3 "=X"))] "TARGET_SH4 && reload_completed && (true_regnum (operands[0]) < 16) != (true_regnum (operands[1]) < 16)" *************** *** 3787,3794 **** (define_split [(set (match_operand:DF 0 "general_movdst_operand" "") (match_operand:DF 1 "general_movsrc_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) ! (clobber (match_scratch:SI 3 "X"))] "TARGET_SH4 && reload_completed && true_regnum (operands[0]) < 16 --- 4251,4258 ---- (define_split [(set (match_operand:DF 0 "general_movdst_operand" "") (match_operand:DF 1 "general_movsrc_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "")) ! (clobber (match_scratch:SI 3 ""))] "TARGET_SH4 && reload_completed && true_regnum (operands[0]) < 16 *************** *** 3860,3866 **** (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "memory_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) (clobber (reg:SI R0_REG))] "TARGET_SH4 && reload_completed" [(parallel [(set (match_dup 0) (match_dup 1)) --- 4324,4330 ---- (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "memory_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "")) (clobber (reg:SI R0_REG))] "TARGET_SH4 && reload_completed" [(parallel [(set (match_dup 0) (match_dup 1)) *************** *** 3898,3904 **** (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) (clobber (match_scratch:SI 3 "X"))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[0])) --- 4362,4368 ---- (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "")) (clobber (match_scratch:SI 3 "X"))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[0])) *************** *** 3917,3924 **** (define_split [(set (match_operand:DF 0 "register_operand" "") (mem:DF (match_operand:SI 1 "register_operand" ""))) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) ! (clobber (match_scratch:SI 3 "X"))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[0])) && find_regno_note (insn, REG_DEAD, true_regnum (operands[1]))" --- 4381,4388 ---- (define_split [(set (match_operand:DF 0 "register_operand" "") (mem:DF (match_operand:SI 1 "register_operand" ""))) ! (use (match_operand:PSI 2 "fpscr_operand" "")) ! (clobber (match_scratch:SI 3 ""))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[0])) && find_regno_note (insn, REG_DEAD, true_regnum (operands[1]))" *************** *** 3943,3950 **** (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "memory_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) ! (clobber (match_scratch:SI 3 "X"))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[0]))" [(const_int 0)] --- 4407,4414 ---- (define_split [(set (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "memory_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "")) ! (clobber (match_scratch:SI 3 ""))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[0]))" [(const_int 0)] *************** *** 3984,3991 **** (define_split [(set (match_operand:DF 0 "memory_operand" "") (match_operand:DF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) ! (clobber (match_scratch:SI 3 "X"))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[1]))" [(const_int 0)] --- 4448,4455 ---- (define_split [(set (match_operand:DF 0 "memory_operand" "") (match_operand:DF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "")) ! (clobber (match_scratch:SI 3 ""))] "TARGET_SH4 && ! TARGET_FMOVD && reload_completed && FP_OR_XD_REGISTER_P (true_regnum (operands[1]))" [(const_int 0)] *************** *** 4020,4026 **** }") ;; If the output is a register and the input is memory or a register, we have ! ;; to be careful and see which word needs to be loaded first. (define_split [(set (match_operand:DF 0 "general_movdst_operand" "") --- 4484,4490 ---- }") ;; If the output is a register and the input is memory or a register, we have ! ;; to be careful and see which word needs to be loaded first. (define_split [(set (match_operand:DF 0 "general_movdst_operand" "") *************** *** 4147,4174 **** } }") ! (define_insn "movv2sf_i" ! [(set (match_operand:V2SF 0 "nonimmediate_operand" "=f,f,m") ! (match_operand:V2SF 1 "nonimmediate_operand" "f,m,f"))] ! "TARGET_SHMEDIA_FPU ! && (fp_arith_reg_operand (operands[0], V2SFmode) ! || fp_arith_reg_operand (operands[1], V2SFmode))" ! "@ ! # ! fld%M1.p %m1, %0 ! fst%M0.p %m0, %1") ! (define_split ! [(set (match_operand:V2SF 0 "nonimmediate_operand" "=f") ! (match_operand:V2SF 1 "nonimmediate_operand" "f"))] ! "TARGET_SHMEDIA_FPU && reload_completed ! && fp_arith_reg_operand (operands[0], V2SFmode) ! && fp_arith_reg_operand (operands[1], V2SFmode)" ! [(set (subreg:DF (match_dup 0) 0) (subreg:DF (match_dup 1) 0))]) (define_expand "movv2sf" ! [(set (match_operand:V2SF 0 "nonimmediate_operand" "=f,f,m") ! (match_operand:V2SF 1 "nonimmediate_operand" "f,m,f"))] "TARGET_SHMEDIA_FPU" " { --- 4611,4645 ---- } }") ! ;;This is incompatible with the way gcc uses subregs. ! ;;(define_insn "movv2sf_i" ! ;; [(set (match_operand:V2SF 0 "nonimmediate_operand" "=f,f,m") ! ;; (match_operand:V2SF 1 "nonimmediate_operand" "f,m,f"))] ! ;; "TARGET_SHMEDIA_FPU ! ;; && (fp_arith_reg_operand (operands[0], V2SFmode) ! ;; || fp_arith_reg_operand (operands[1], V2SFmode))" ! ;; "@ ! ;; # ! ;; fld%M1.p %m1, %0 ! ;; fst%M0.p %m0, %1" ! ;; [(set_attr "type" "*,fload_media,fstore_media")]) ! (define_insn_and_split "movv2sf_i" ! [(set (match_operand:V2SF 0 "general_movdst_operand" "=f,rf,r,m,mf") ! (match_operand:V2SF 1 "general_operand" "fm,rfm?,F?,f,rfU?"))] ! "TARGET_SHMEDIA_FPU" ! "#" ! "TARGET_SHMEDIA_FPU && reload_completed" ! [(set (match_dup 0) (match_dup 1))] ! " ! { ! operands[0] = simplify_gen_subreg (DFmode, operands[0], V2SFmode, 0); ! operands[1] = simplify_gen_subreg (DFmode, operands[1], V2SFmode, 0); ! }") (define_expand "movv2sf" ! [(set (match_operand:V2SF 0 "general_movdst_operand" "") ! (match_operand:V2SF 1 "nonimmediate_operand" ""))] "TARGET_SHMEDIA_FPU" " { *************** *** 4176,4184 **** DONE; }") (define_insn_and_split "*movv4sf_i" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=f,f,m") ! (match_operand:V4SF 1 "nonimmediate_operand" "f,m,f"))] "TARGET_SHMEDIA_FPU" "#" "&& reload_completed" --- 4647,4699 ---- DONE; }") + (define_expand "addv2sf3" + [(match_operand:V2SF 0 "fp_arith_reg_operand" "") + (match_operand:V2SF 1 "fp_arith_reg_operand" "") + (match_operand:V2SF 2 "fp_arith_reg_operand" "")] + "TARGET_SHMEDIA_FPU" + " + { + sh_expand_binop_v2sf (PLUS, operands[0], operands[1], operands[2]); + DONE; + }") + + (define_expand "subv2sf3" + [(match_operand:V2SF 0 "fp_arith_reg_operand" "") + (match_operand:V2SF 1 "fp_arith_reg_operand" "") + (match_operand:V2SF 2 "fp_arith_reg_operand" "")] + "TARGET_SHMEDIA_FPU" + " + { + sh_expand_binop_v2sf (MINUS, operands[0], operands[1], operands[2]); + DONE; + }") + + (define_expand "mulv2sf3" + [(match_operand:V2SF 0 "fp_arith_reg_operand" "") + (match_operand:V2SF 1 "fp_arith_reg_operand" "") + (match_operand:V2SF 2 "fp_arith_reg_operand" "")] + "TARGET_SHMEDIA_FPU" + " + { + sh_expand_binop_v2sf (MULT, operands[0], operands[1], operands[2]); + DONE; + }") + + (define_expand "divv2sf3" + [(match_operand:V2SF 0 "fp_arith_reg_operand" "") + (match_operand:V2SF 1 "fp_arith_reg_operand" "") + (match_operand:V2SF 2 "fp_arith_reg_operand" "")] + "TARGET_SHMEDIA_FPU" + " + { + sh_expand_binop_v2sf (DIV, operands[0], operands[1], operands[2]); + DONE; + }") + (define_insn_and_split "*movv4sf_i" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=f,f,m") ! (match_operand:V4SF 1 "general_operand" "fU,m,fU"))] "TARGET_SHMEDIA_FPU" "#" "&& reload_completed" *************** *** 4196,4215 **** plus_constant (XEXP (operands[0], 0), i * GET_MODE_SIZE (V2SFmode))); else ! { ! x = gen_rtx_SUBREG (V2SFmode, operands[0], i * 2); ! alter_subreg (&x); ! } if (GET_CODE (operands[1]) == MEM) y = gen_rtx_MEM (V2SFmode, plus_constant (XEXP (operands[1], 0), i * GET_MODE_SIZE (V2SFmode))); else ! { ! y = gen_rtx_SUBREG (V2SFmode, operands[1], i * 2); ! alter_subreg (&y); ! } emit_insn (gen_movv2sf_i (x, y)); } --- 4711,4724 ---- plus_constant (XEXP (operands[0], 0), i * GET_MODE_SIZE (V2SFmode))); else ! x = simplify_gen_subreg (V2SFmode, operands[0], V4SFmode, i * 8); if (GET_CODE (operands[1]) == MEM) y = gen_rtx_MEM (V2SFmode, plus_constant (XEXP (operands[1], 0), i * GET_MODE_SIZE (V2SFmode))); else ! y = simplify_gen_subreg (V2SFmode, operands[1], V4SFmode, i * 8); emit_insn (gen_movv2sf_i (x, y)); } *************** *** 4217,4226 **** DONE; }" [(set_attr "length" "8")]) ! (define_expand "movv4sf" ! [(set (match_operand:V4SF 0 "nonimmediate_operand" "=f,f,m") ! (match_operand:V4SF 1 "nonimmediate_operand" "f,m,f"))] "TARGET_SHMEDIA_FPU" " { --- 4726,4735 ---- DONE; }" [(set_attr "length" "8")]) ! (define_expand "movv4sf" ! [(set (match_operand:V4SF 0 "nonimmediate_operand" "") ! (match_operand:V4SF 1 "general_operand" ""))] "TARGET_SHMEDIA_FPU" " { *************** *** 4269,4275 **** DONE; }" [(set_attr "length" "32")]) ! (define_expand "movv16sf" [(set (match_operand:V16SF 0 "nonimmediate_operand" "=f,f,m") (match_operand:V16SF 1 "nonimmediate_operand" "f,m,f"))] --- 4778,4784 ---- DONE; }" [(set_attr "length" "32")]) ! (define_expand "movv16sf" [(set (match_operand:V16SF 0 "nonimmediate_operand" "=f,f,m") (match_operand:V16SF 1 "nonimmediate_operand" "f,m,f"))] *************** *** 4282,4320 **** (define_insn "movsf_media" [(set (match_operand:SF 0 "general_movdst_operand" "=f,f,r,r,r,f,m,r,m") ! (match_operand:SF 1 "general_movsrc_operand" "f,r,f,r,F,m,f,m,r"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], SFmode) ! || register_operand (operands[1], SFmode))" "@ fmov.s %1, %0 ! fmov.ls %1, %0 fmov.sl %1, %0 ! add %1, r63, %0 # fld%M1.s %m1, %0 fst%M0.s %m0, %1 ld%M1.l %m1, %0 ! st%M0.l %m0, %1" ! [(set_attr "type" "move,move,move,move,*,load,store,load,store")]) (define_insn "movsf_media_nofpu" [(set (match_operand:SF 0 "general_movdst_operand" "=r,r,r,m") ! (match_operand:SF 1 "general_movsrc_operand" "r,F,m,r"))] "TARGET_SHMEDIA && (register_operand (operands[0], SFmode) ! || register_operand (operands[1], SFmode))" "@ ! add %1, r63, %0 # ld%M1.l %m1, %0 ! st%M0.l %m0, %1" ! [(set_attr "type" "move,*,load,store")]) (define_split [(set (match_operand:SF 0 "arith_reg_operand" "") (match_operand:SF 1 "immediate_operand" ""))] ! "TARGET_SHMEDIA && reload_completed" [(set (match_dup 3) (match_dup 2))] " { --- 4791,4830 ---- (define_insn "movsf_media" [(set (match_operand:SF 0 "general_movdst_operand" "=f,f,r,r,r,f,m,r,m") ! (match_operand:SF 1 "general_movsrc_operand" "f,rU,f,r,F,m,f,m,rU"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], SFmode) ! || sh_register_operand (operands[1], SFmode))" "@ fmov.s %1, %0 ! fmov.ls %N1, %0 fmov.sl %1, %0 ! add.l %1, r63, %0 # fld%M1.s %m1, %0 fst%M0.s %m0, %1 ld%M1.l %m1, %0 ! st%M0.l %m0, %N1" ! [(set_attr "type" "fmove_media,fload_media,fpconv_media,arith_media,*,fload_media,fstore_media,load_media,store_media")]) (define_insn "movsf_media_nofpu" [(set (match_operand:SF 0 "general_movdst_operand" "=r,r,r,m") ! (match_operand:SF 1 "general_movsrc_operand" "r,F,m,rU"))] "TARGET_SHMEDIA && (register_operand (operands[0], SFmode) ! || sh_register_operand (operands[1], SFmode))" "@ ! add.l %1, r63, %0 # ld%M1.l %m1, %0 ! st%M0.l %m0, %N1" ! [(set_attr "type" "arith_media,*,load_media,store_media")]) (define_split [(set (match_operand:SF 0 "arith_reg_operand" "") (match_operand:SF 1 "immediate_operand" ""))] ! "TARGET_SHMEDIA && reload_completed ! && ! FP_REGISTER_P (true_regnum (operands[0]))" [(set (match_dup 3) (match_dup 2))] " { *************** *** 4324,4330 **** REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]); REAL_VALUE_TO_TARGET_SINGLE (value, values); operands[2] = GEN_INT (values); ! operands[3] = gen_rtx_REG (DImode, true_regnum (operands[0])); }") --- 4834,4840 ---- REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]); REAL_VALUE_TO_TARGET_SINGLE (value, values); operands[2] = GEN_INT (values); ! operands[3] = gen_rtx_REG (DImode, true_regnum (operands[0])); }") *************** *** 4389,4395 **** sts.l %1,%0 lds.l %1,%0 ! move optimized away" ! [(set_attr "type" "fmove,move,fmove,fmove,pcload,load,store,pcload,load,store,fmove,fmove,load,*,gp_fpul,gp_fpul,store,load,nil") (set_attr "length" "*,*,*,*,4,*,*,*,*,*,2,2,2,4,2,2,2,2,0") (set (attr "fp_mode") (if_then_else (eq_attr "fmovd" "yes") (const_string "single") --- 4899,4906 ---- sts.l %1,%0 lds.l %1,%0 ! move optimized away" ! [(set_attr "type" "fmove,move,fmove,fmove,pcfload,fload,store,pcload,load,store,fmove,fmove,load,*,fpul_gp,gp_fpul,store,load,nil") ! (set_attr "late_fp_use" "*,*,*,*,*,*,yes,*,*,*,*,*,*,*,yes,*,yes,*,*") (set_attr "length" "*,*,*,*,4,*,*,*,*,*,2,2,2,4,2,2,2,2,0") (set (attr "fp_mode") (if_then_else (eq_attr "fmovd" "yes") (const_string "single") *************** *** 4398,4404 **** (define_split [(set (match_operand:SF 0 "register_operand" "") (match_operand:SF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "c")) (clobber (reg:SI FPUL_REG))] "TARGET_SH1" [(parallel [(set (reg:SF FPUL_REG) (match_dup 1)) --- 4909,4915 ---- (define_split [(set (match_operand:SF 0 "register_operand" "") (match_operand:SF 1 "register_operand" "")) ! (use (match_operand:PSI 2 "fpscr_operand" "")) (clobber (reg:SI FPUL_REG))] "TARGET_SH1" [(parallel [(set (reg:SF FPUL_REG) (match_dup 1)) *************** *** 4433,4439 **** }") (define_insn "mov_nop" ! [(set (match_operand 0 "register_operand" "") (match_dup 0))] "TARGET_SH3E" "" [(set_attr "length" "0") --- 4944,4950 ---- }") (define_insn "mov_nop" ! [(set (match_operand 0 "any_register_operand" "") (match_dup 0))] "TARGET_SH3E" "" [(set_attr "length" "0") *************** *** 4513,4524 **** ;; This one has the additional purpose to record a possible scratch register ;; for the following branch. (define_insn "indirect_jump_scratch" ! [(set (match_operand 0 "register_operand" "=r") ! (unspec [(match_operand 1 "const_int_operand" "")] UNSPEC_BBR))] "TARGET_SH1" "" [(set_attr "length" "0")]) ;; Conditional branch insns --- 5024,5052 ---- ;; This one has the additional purpose to record a possible scratch register ;; for the following branch. + ;; ??? Unfortunately, just setting the scratch register is not good enough, + ;; because the insn then might be deemed dead and deleted. And we can't + ;; make the use in the jump insn explicit because that would disable + ;; delay slot scheduling from the target. (define_insn "indirect_jump_scratch" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (unspec:SI [(match_operand 1 "const_int_operand" "")] UNSPEC_BBR)) ! (set (pc) (unspec [(const_int 0)] UNSPEC_BBR))] "TARGET_SH1" "" [(set_attr "length" "0")]) + + ;; This one is used to preemt an insn from beyond the bra / braf / jmp + ;; being pulled into the delay slot of a condbranch that has been made to + ;; jump around the unconditional jump because it was out of range. + (define_insn "stuff_delay_slot" + [(set (pc) + (unspec [(match_operand 0 "const_int_operand" "") (pc)] UNSPEC_BBR)) + (set (reg:SI T_REG) (match_operand 1 "const_int_operand" ""))] + "TARGET_SH1" + "" + [(set_attr "length" "0") + (set_attr "cond_delay_slot" "yes")]) ;; Conditional branch insns *************** *** 4531,4546 **** "TARGET_SHMEDIA" "") ! (define_insn "beq_media_i" [(set (pc) ! (if_then_else (eq (match_operand:DI 1 "arith_reg_operand" "r,r") ! (match_operand:DI 2 "arith_operand" "r,O")) (match_operand:DI 0 "target_operand" "b,b") (pc)))] "TARGET_SHMEDIA" "@ ! beq %1, %2, %0 ! beqi %1, %2, %0") (define_expand "bne_media" [(set (pc) --- 5059,5076 ---- "TARGET_SHMEDIA" "") ! (define_insn "*beq_media_i" [(set (pc) ! (if_then_else (match_operator 3 "equality_comparison_operator" ! [(match_operand:DI 1 "arith_reg_operand" "r,r") ! (match_operand:DI 2 "arith_operand" "r,O")]) (match_operand:DI 0 "target_operand" "b,b") (pc)))] "TARGET_SHMEDIA" "@ ! b%o3%' %1, %2, %0 ! b%o3i%' %1, %2, %0" ! [(set_attr "type" "cbranch_media")]) (define_expand "bne_media" [(set (pc) *************** *** 4551,4675 **** "TARGET_SHMEDIA" "") - (define_insn "bne_media_i" - [(set (pc) - (if_then_else (ne (match_operand:DI 1 "arith_reg_operand" "r,r") - (match_operand:DI 2 "arith_operand" "r,O")) - (match_operand:DI 0 "target_operand" "b,b") - (pc)))] - "TARGET_SHMEDIA" - "@ - bne %1, %2, %0 - bnei %1, %2, %0") - (define_expand "bgt_media" [(set (pc) ! (if_then_else (gt (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") - (define_insn "bgt_media_i" - [(set (pc) - (if_then_else (gt (match_operand:DI 1 "arith_reg_operand" "r") - (match_operand:DI 2 "arith_reg_operand" "r")) - (match_operand:DI 0 "target_operand" "b") - (pc)))] - "TARGET_SHMEDIA" - "bgt %1, %2, %0") - (define_expand "bge_media" [(set (pc) ! (if_then_else (ge (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") - (define_insn "bge_media_i" - [(set (pc) - (if_then_else (ge (match_operand:DI 1 "arith_reg_operand" "r") - (match_operand:DI 2 "arith_reg_operand" "r")) - (match_operand:DI 0 "target_operand" "b") - (pc)))] - "TARGET_SHMEDIA" - "bge %1, %2, %0") - (define_expand "bgtu_media" [(set (pc) ! (if_then_else (gtu (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") - (define_insn "bgtu_media_i" - [(set (pc) - (if_then_else (gtu (match_operand:DI 1 "arith_reg_operand" "r") - (match_operand:DI 2 "arith_reg_operand" "r")) - (match_operand:DI 0 "target_operand" "b") - (pc)))] - "TARGET_SHMEDIA" - "bgtu %1, %2, %0") - (define_expand "bgeu_media" [(set (pc) ! (if_then_else (geu (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") ! (define_insn "bgeu_media_i" [(set (pc) ! (if_then_else (geu (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) (match_operand:DI 0 "target_operand" "b") (pc)))] "TARGET_SHMEDIA" ! "bgeu %1, %2, %0") ;; These are only needed to make invert_jump() happy. - (define_insn "*ble_media_i" - [(set (pc) - (if_then_else (le (match_operand:DI 1 "arith_reg_operand" "r") - (match_operand:DI 2 "arith_reg_operand" "r")) - (match_operand:DI 0 "target_operand" "b") - (pc)))] - "TARGET_SHMEDIA" - "bge %2, %1, %0") - (define_insn "*blt_media_i" [(set (pc) ! (if_then_else (lt (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) ! (match_operand:DI 0 "target_operand" "b") ! (pc)))] ! "TARGET_SHMEDIA" ! "bgt %2, %1, %0") ! ! (define_insn "*bleu_media_i" ! [(set (pc) ! (if_then_else (leu (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) ! (match_operand:DI 0 "target_operand" "b") ! (pc)))] ! "TARGET_SHMEDIA" ! "bgeu %2, %1, %0") ! ! (define_insn "*bltu_media_i" ! [(set (pc) ! (if_then_else (ltu (match_operand:DI 1 "arith_reg_operand" "r") ! (match_operand:DI 2 "arith_reg_operand" "r")) (match_operand:DI 0 "target_operand" "b") (pc)))] "TARGET_SHMEDIA" ! "bgtu %2, %1, %0") (define_expand "beq" [(set (pc) --- 5081,5144 ---- "TARGET_SHMEDIA" "") (define_expand "bgt_media" [(set (pc) ! (if_then_else (gt (match_operand:DI 1 "arith_reg_or_0_operand" "r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") (define_expand "bge_media" [(set (pc) ! (if_then_else (ge (match_operand:DI 1 "arith_reg_or_0_operand" "r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") (define_expand "bgtu_media" [(set (pc) ! (if_then_else (gtu (match_operand:DI 1 "arith_reg_or_0_operand" "r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") (define_expand "bgeu_media" [(set (pc) ! (if_then_else (geu (match_operand:DI 1 "arith_reg_or_0_operand" "r") ! (match_operand:DI 2 "arith_reg_or_0_operand" "r")) (label_ref:DI (match_operand 0 "" "")) (pc)))] "TARGET_SHMEDIA" "") ! (define_insn "*bgt_media_i" [(set (pc) ! (if_then_else (match_operator 3 "greater_comparison_operator" ! [(match_operand:DI 1 "arith_reg_or_0_operand" "rN") ! (match_operand:DI 2 "arith_reg_or_0_operand" "rN")]) (match_operand:DI 0 "target_operand" "b") (pc)))] "TARGET_SHMEDIA" ! "b%o3%' %N1, %N2, %0" ! [(set_attr "type" "cbranch_media")]) ;; These are only needed to make invert_jump() happy. (define_insn "*blt_media_i" [(set (pc) ! (if_then_else (match_operator 3 "less_comparison_operator" ! [(match_operand:DI 1 "arith_reg_or_0_operand" "rN") ! (match_operand:DI 2 "arith_reg_or_0_operand" "rN")]) (match_operand:DI 0 "target_operand" "b") (pc)))] "TARGET_SHMEDIA" ! "b%o3%' %N2, %N1, %0" ! [(set_attr "type" "cbranch_media")]) (define_expand "beq" [(set (pc) *************** *** 4746,4753 **** DONE; } ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgt_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; --- 5215,5224 ---- DONE; } ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgt_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; *************** *** 4775,4782 **** DONE; } ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgt_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; --- 5246,5255 ---- DONE; } ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgt_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; *************** *** 4812,4819 **** DONE; } ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bge_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; --- 5285,5294 ---- DONE; } ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bge_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; *************** *** 4851,4858 **** DONE; } ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bge_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; --- 5326,5335 ---- DONE; } ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bge_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; *************** *** 4881,4888 **** { if (TARGET_SHMEDIA) { ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgtu_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; --- 5358,5367 ---- { if (TARGET_SHMEDIA) { ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgtu_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; *************** *** 4901,4908 **** { if (TARGET_SHMEDIA) { ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgtu_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; --- 5380,5389 ---- { if (TARGET_SHMEDIA) { ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgtu_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; *************** *** 4921,4928 **** { if (TARGET_SHMEDIA) { ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgeu_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; --- 5402,5411 ---- { if (TARGET_SHMEDIA) { ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgeu_media (operands[0], sh_compare_op0, sh_compare_op1)); DONE; *************** *** 4941,4948 **** { if (TARGET_SHMEDIA) { ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgeu_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; --- 5424,5433 ---- { if (TARGET_SHMEDIA) { ! if (sh_compare_op0 != const0_rtx) ! sh_compare_op0 = force_reg (DImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (DImode, sh_compare_op1); emit_jump_insn (gen_bgeu_media (operands[0], sh_compare_op1, sh_compare_op0)); DONE; *************** *** 4984,4994 **** [(set_attr "type" "jump") (set_attr "needs_delay_slot" "yes")]) (define_insn "jump_media" [(set (pc) (match_operand:DI 0 "target_operand" "b"))] "TARGET_SHMEDIA" ! "blink %0, r63") (define_expand "jump" [(set (pc) --- 5469,5493 ---- [(set_attr "type" "jump") (set_attr "needs_delay_slot" "yes")]) + ;; ??? It would be much saner to explicitly use the scratch register + ;; in the jump insn, and have indirect_jump_scratch only set it, + ;; but fill_simple_delay_slots would refuse to do delay slot filling + ;; from the target then, as it uses simplejump_p. + ;;(define_insn "jump_compact_far" + ;; [(set (pc) + ;; (label_ref (match_operand 0 "" ""))) + ;; (use (match_operand 1 "register_operand" "r")] + ;; "TARGET_SH1" + ;; "* return output_far_jump(insn, operands[0], operands[1]);" + ;; [(set_attr "type" "jump") + ;; (set_attr "needs_delay_slot" "yes")]) + (define_insn "jump_media" [(set (pc) (match_operand:DI 0 "target_operand" "b"))] "TARGET_SHMEDIA" ! "blink %0, r63" ! [(set_attr "type" "jump_media")]) (define_expand "jump" [(set (pc) *************** *** 4997,5008 **** " { if (TARGET_SH1) ! emit_insn (gen_jump_compact (operands[0])); else if (TARGET_SHMEDIA) { if (reload_in_progress || reload_completed) FAIL; ! emit_insn (gen_jump_media (gen_rtx_LABEL_REF (DImode, operands[0]))); } DONE; }") --- 5496,5508 ---- " { if (TARGET_SH1) ! emit_jump_insn (gen_jump_compact (operands[0])); else if (TARGET_SHMEDIA) { if (reload_in_progress || reload_completed) FAIL; ! emit_jump_insn (gen_jump_media (gen_rtx_LABEL_REF (DImode, ! operands[0]))); } DONE; }") *************** *** 5059,5065 **** [(const_int 0)] " { ! rtx lab = gen_call_site (); if (SYMBOL_REF_FLAG (operands[0])) emit_insn (gen_sym_label2reg (operands[2], operands[0], lab)); --- 5559,5565 ---- [(const_int 0)] " { ! rtx lab = PATTERN (gen_call_site ()); if (SYMBOL_REF_FLAG (operands[0])) emit_insn (gen_sym_label2reg (operands[2], operands[0], lab)); *************** *** 5112,5118 **** (match_operand 1 "" "")) (clobber (reg:DI PR_MEDIA_REG))] "TARGET_SHMEDIA" ! "blink %0, r18") (define_insn "call_valuei" [(set (match_operand 0 "" "=rf") --- 5612,5619 ---- (match_operand 1 "" "")) (clobber (reg:DI PR_MEDIA_REG))] "TARGET_SHMEDIA" ! "blink %0, r18" ! [(set_attr "type" "jump_media")]) (define_insn "call_valuei" [(set (match_operand 0 "" "=rf") *************** *** 5158,5164 **** [(const_int 0)] " { ! rtx lab = gen_call_site (); if (SYMBOL_REF_FLAG (operands[1])) emit_insn (gen_sym_label2reg (operands[3], operands[1], lab)); --- 5659,5665 ---- [(const_int 0)] " { ! rtx lab = PATTERN (gen_call_site ()); if (SYMBOL_REF_FLAG (operands[1])) emit_insn (gen_sym_label2reg (operands[3], operands[1], lab)); *************** *** 5215,5221 **** (match_operand 2 "" ""))) (clobber (reg:DI PR_MEDIA_REG))] "TARGET_SHMEDIA" ! "blink %1, r18") (define_expand "call" [(parallel [(call (mem:SI (match_operand 0 "arith_reg_operand" "")) --- 5716,5723 ---- (match_operand 2 "" ""))) (clobber (reg:DI PR_MEDIA_REG))] "TARGET_SHMEDIA" ! "blink %1, r18" ! [(set_attr "type" "jump_media")]) (define_expand "call" [(parallel [(call (mem:SI (match_operand 0 "arith_reg_operand" "")) *************** *** 5234,5240 **** if (! SYMBOL_REF_FLAG (operands[0])) { rtx reg = gen_reg_rtx (Pmode); ! emit_insn (gen_symGOTPLT2reg (reg, operands[0])); operands[0] = reg; } --- 5736,5742 ---- if (! SYMBOL_REF_FLAG (operands[0])) { rtx reg = gen_reg_rtx (Pmode); ! emit_insn (gen_symGOTPLT2reg (reg, operands[0])); operands[0] = reg; } *************** *** 5458,5464 **** if (! SYMBOL_REF_FLAG (operands[1])) { rtx reg = gen_reg_rtx (Pmode); ! emit_insn (gen_symGOTPLT2reg (reg, operands[1])); operands[1] = reg; } --- 5960,5966 ---- if (! SYMBOL_REF_FLAG (operands[1])) { rtx reg = gen_reg_rtx (Pmode); ! emit_insn (gen_symGOTPLT2reg (reg, operands[1])); operands[1] = reg; } *************** *** 5606,5612 **** [(const_int 0)] " { ! rtx lab = gen_call_site (); rtx call_insn; emit_insn (gen_sym_label2reg (operands[2], operands[0], lab)); --- 6108,6114 ---- [(const_int 0)] " { ! rtx lab = PATTERN (gen_call_site ()); rtx call_insn; emit_insn (gen_sym_label2reg (operands[2], operands[0], lab)); *************** *** 5625,5631 **** [(call (mem:SI (match_operand:SI 0 "register_operand" "k,k")) (match_operand 1 "" "")) (return) ! (use (match_operand 2 "register_operand" "z,x")) (use (reg:SI R1_REG)) (use (reg:PSI FPSCR_REG)) ;; We want to make sure the `x' above will only match MACH_REG --- 6127,6133 ---- [(call (mem:SI (match_operand:SI 0 "register_operand" "k,k")) (match_operand 1 "" "")) (return) ! (use (match_operand:SI 2 "register_operand" "z,x")) (use (reg:SI R1_REG)) (use (reg:PSI FPSCR_REG)) ;; We want to make sure the `x' above will only match MACH_REG *************** *** 5645,5651 **** (match_operand 1 "" "")) (return)] "TARGET_SHMEDIA" ! "blink %0, r63") (define_expand "sibcall" [(parallel --- 6147,6154 ---- (match_operand 1 "" "")) (return)] "TARGET_SHMEDIA" ! "blink %0, r63" ! [(set_attr "type" "jump_media")]) (define_expand "sibcall" [(parallel *************** *** 5665,5671 **** if (! SYMBOL_REF_FLAG (operands[0])) { rtx reg = gen_reg_rtx (Pmode); ! /* We must not use GOTPLT for sibcalls, because PIC_REG must be restored before the PLT code gets to run. */ emit_insn (gen_symGOT2reg (reg, operands[0])); --- 6168,6174 ---- if (! SYMBOL_REF_FLAG (operands[0])) { rtx reg = gen_reg_rtx (Pmode); ! /* We must not use GOTPLT for sibcalls, because PIC_REG must be restored before the PLT code gets to run. */ emit_insn (gen_symGOT2reg (reg, operands[0])); *************** *** 5990,5997 **** [(set (pc) (match_operand:DI 0 "target_reg_operand" "b")) (use (label_ref (match_operand 1 "" "")))] "TARGET_SHMEDIA" ! "blink %0, r63") ! ;; Call subroutine returning any type. ;; ??? This probably doesn't work. --- 6493,6501 ---- [(set (pc) (match_operand:DI 0 "target_reg_operand" "b")) (use (label_ref (match_operand 1 "" "")))] "TARGET_SHMEDIA" ! "blink %0, r63" ! [(set_attr "type" "jump_media")]) ! ;; Call subroutine returning any type. ;; ??? This probably doesn't work. *************** *** 6046,6052 **** (define_insn "mova" [(set (reg:SI R0_REG) ! (unspec [(label_ref (match_operand 0 "" ""))] UNSPEC_MOVA))] "TARGET_SH1" "mova %O0,r0" [(set_attr "in_delay_slot" "no") --- 6550,6556 ---- (define_insn "mova" [(set (reg:SI R0_REG) ! (unspec:SI [(label_ref (match_operand 0 "" ""))] UNSPEC_MOVA))] "TARGET_SH1" "mova %O0,r0" [(set_attr "in_delay_slot" "no") *************** *** 6055,6061 **** ;; machine_dependent_reorg() will make this a `mova'. (define_insn "mova_const" [(set (reg:SI R0_REG) ! (unspec [(match_operand 0 "immediate_operand" "i")] UNSPEC_MOVA))] "TARGET_SH1" "#" [(set_attr "in_delay_slot" "no") --- 6559,6565 ---- ;; machine_dependent_reorg() will make this a `mova'. (define_insn "mova_const" [(set (reg:SI R0_REG) ! (unspec:SI [(match_operand 0 "immediate_operand" "i")] UNSPEC_MOVA))] "TARGET_SH1" "#" [(set_attr "in_delay_slot" "no") *************** *** 6063,6070 **** (define_expand "GOTaddr2picreg" [(set (reg:SI R0_REG) ! (unspec [(const:SI (unspec:SI [(match_dup 1)] UNSPEC_PIC))] ! UNSPEC_MOVA)) (set (match_dup 0) (const:SI (unspec:SI [(match_dup 1)] UNSPEC_PIC))) (set (match_dup 0) (plus:SI (match_dup 0) (reg:SI R0_REG)))] "" " --- 6567,6574 ---- (define_expand "GOTaddr2picreg" [(set (reg:SI R0_REG) ! (unspec:SI [(const:SI (unspec:SI [(match_dup 1)] UNSPEC_PIC))] ! UNSPEC_MOVA)) (set (match_dup 0) (const:SI (unspec:SI [(match_dup 1)] UNSPEC_PIC))) (set (match_dup 0) (plus:SI (match_dup 0) (reg:SI R0_REG)))] "" " *************** *** 6079,6085 **** { rtx tr = gen_rtx_REG (DImode, TR0_REG); rtx dipic = operands[0]; ! rtx lab = gen_call_site (); rtx insn, equiv; equiv = operands[1]; --- 6583,6589 ---- { rtx tr = gen_rtx_REG (DImode, TR0_REG); rtx dipic = operands[0]; ! rtx lab = PATTERN (gen_call_site ()); rtx insn, equiv; equiv = operands[1]; *************** *** 6108,6114 **** tr = gen_rtx_SUBREG (GET_MODE (operands[0]), tr, 0); insn = emit_move_insn (operands[0], tr); ! REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, equiv, REG_NOTES (insn)); --- 6612,6618 ---- tr = gen_rtx_SUBREG (GET_MODE (operands[0]), tr, 0); insn = emit_move_insn (operands[0], tr); ! REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, equiv, REG_NOTES (insn)); *************** *** 6122,6153 **** ;; them to do, because they can't be loaded directly into ;; non-branch-target registers. (define_insn "*pt" ! [(set (match_operand:DI 0 "target_reg_operand" "=b*k") (match_operand:DI 1 "" "T"))] "TARGET_SHMEDIA && flag_pic && EXTRA_CONSTRAINT_T (operands[1])" "pt %1, %0" ! [(set_attr "type" "pt") (set_attr "length" "*")]) (define_insn "*ptb" ! [(set (match_operand:DI 0 "target_reg_operand" "=b*k") (const:DI (unspec:DI [(match_operand:DI 1 "" "T")] UNSPEC_DATALABEL)))] "TARGET_SHMEDIA && flag_pic && EXTRA_CONSTRAINT_T (operands[1])" "ptb/u datalabel %1, %0" ! [(set_attr "type" "pt") (set_attr "length" "*")]) (define_insn "ptrel" ! [(set (match_operand:DI 0 "target_reg_operand" "=bk") ! (plus (match_operand:DI 1 "register_operand" "r") (pc))) (match_operand:DI 2 "" "")] "TARGET_SHMEDIA" "%O2: ptrel/u %1, %0" ! [(set_attr "type" "ptabs")]) (define_expand "builtin_setjmp_receiver" [(match_operand 0 "" "")] --- 6626,6657 ---- ;; them to do, because they can't be loaded directly into ;; non-branch-target registers. (define_insn "*pt" ! [(set (match_operand:DI 0 "target_reg_operand" "=b") (match_operand:DI 1 "" "T"))] "TARGET_SHMEDIA && flag_pic && EXTRA_CONSTRAINT_T (operands[1])" "pt %1, %0" ! [(set_attr "type" "pt_media") (set_attr "length" "*")]) (define_insn "*ptb" ! [(set (match_operand:DI 0 "target_reg_operand" "=b") (const:DI (unspec:DI [(match_operand:DI 1 "" "T")] UNSPEC_DATALABEL)))] "TARGET_SHMEDIA && flag_pic && EXTRA_CONSTRAINT_T (operands[1])" "ptb/u datalabel %1, %0" ! [(set_attr "type" "pt_media") (set_attr "length" "*")]) (define_insn "ptrel" ! [(set (match_operand:DI 0 "target_reg_operand" "=b") ! (plus:DI (match_operand:DI 1 "register_operand" "r") (pc))) (match_operand:DI 2 "" "")] "TARGET_SHMEDIA" "%O2: ptrel/u %1, %0" ! [(set_attr "type" "ptabs_media")]) (define_expand "builtin_setjmp_receiver" [(match_operand 0 "" "")] *************** *** 6194,6203 **** if (TARGET_SHMEDIA) { rtx reg = operands[2]; ! if (GET_MODE (reg) != DImode) reg = gen_rtx_SUBREG (DImode, reg, 0); ! if (flag_pic > 1) emit_insn (gen_movdi_const_32bit (reg, operands[1])); else --- 6698,6707 ---- if (TARGET_SHMEDIA) { rtx reg = operands[2]; ! if (GET_MODE (reg) != DImode) reg = gen_rtx_SUBREG (DImode, reg, 0); ! if (flag_pic > 1) emit_insn (gen_movdi_const_32bit (reg, operands[1])); else *************** *** 6215,6221 **** REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, XVECEXP (XEXP (operands[1], 0), 0, 0), REG_NOTES (insn)); ! DONE; }") --- 6719,6725 ---- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, XVECEXP (XEXP (operands[1], 0), 0, 0), REG_NOTES (insn)); ! DONE; }") *************** *** 6392,6398 **** (define_insn "casesi_worker_0" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (unspec:SI [(match_operand 1 "register_operand" "0,r") (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "=X,1")) (clobber (match_scratch:SI 4 "=&z,z"))] --- 6896,6902 ---- (define_insn "casesi_worker_0" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (unspec:SI [(match_operand:SI 1 "register_operand" "0,r") (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "=X,1")) (clobber (match_scratch:SI 4 "=&z,z"))] *************** *** 6401,6437 **** (define_split [(set (match_operand:SI 0 "register_operand" "") ! (unspec [(match_operand 1 "register_operand" "") ! (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "")) (clobber (match_scratch:SI 4 ""))] "TARGET_SH1 && ! TARGET_SH2 && reload_completed" ! [(set (reg:SI R0_REG) (unspec [(label_ref (match_dup 2))] UNSPEC_MOVA)) (parallel [(set (match_dup 0) ! (unspec [(reg:SI R0_REG) (match_dup 1) ! (label_ref (match_dup 2))] UNSPEC_CASESI)) (clobber (match_dup 3))]) (set (match_dup 0) (plus:SI (match_dup 0) (reg:SI R0_REG)))] ! "LABEL_NUSES (operands[2])++;") (define_split [(set (match_operand:SI 0 "register_operand" "") ! (unspec:SI [(match_operand 1 "register_operand" "") ! (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "")) (clobber (match_scratch:SI 4 ""))] "TARGET_SH2 && reload_completed" ! [(set (reg:SI R0_REG) (unspec [(label_ref (match_dup 2))] UNSPEC_MOVA)) (parallel [(set (match_dup 0) (unspec:SI [(reg:SI R0_REG) (match_dup 1) ! (label_ref (match_dup 2))] UNSPEC_CASESI)) (clobber (match_dup 3))])] ! "LABEL_NUSES (operands[2])++;") (define_insn "*casesi_worker" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (unspec [(reg:SI R0_REG) (match_operand 1 "register_operand" "0,r") ! (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "=X,1"))] "TARGET_SH1" "* --- 6905,6942 ---- (define_split [(set (match_operand:SI 0 "register_operand" "") ! (unspec:SI [(match_operand:SI 1 "register_operand" "") ! (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "")) (clobber (match_scratch:SI 4 ""))] "TARGET_SH1 && ! TARGET_SH2 && reload_completed" ! [(set (reg:SI R0_REG) (unspec:SI [(label_ref (match_dup 2))] UNSPEC_MOVA)) (parallel [(set (match_dup 0) ! (unspec:SI [(reg:SI R0_REG) (match_dup 1) ! (label_ref (match_dup 2))] UNSPEC_CASESI)) (clobber (match_dup 3))]) (set (match_dup 0) (plus:SI (match_dup 0) (reg:SI R0_REG)))] ! "if (GET_CODE (operands[2]) == CODE_LABEL) LABEL_NUSES (operands[2])++;") (define_split [(set (match_operand:SI 0 "register_operand" "") ! (unspec:SI [(match_operand:SI 1 "register_operand" "") ! (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "")) (clobber (match_scratch:SI 4 ""))] "TARGET_SH2 && reload_completed" ! [(set (reg:SI R0_REG) (unspec:SI [(label_ref (match_dup 2))] UNSPEC_MOVA)) (parallel [(set (match_dup 0) (unspec:SI [(reg:SI R0_REG) (match_dup 1) ! (label_ref (match_dup 2))] UNSPEC_CASESI)) (clobber (match_dup 3))])] ! "if (GET_CODE (operands[2]) == CODE_LABEL) LABEL_NUSES (operands[2])++;") (define_insn "*casesi_worker" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (unspec:SI [(reg:SI R0_REG) ! (match_operand:SI 1 "register_operand" "0,r") ! (label_ref (match_operand 2 "" ""))] UNSPEC_CASESI)) (clobber (match_scratch:SI 3 "=X,1"))] "TARGET_SH1" "* *************** *** 6458,6466 **** [(set_attr "length" "4")]) (define_insn "casesi_shift_media" ! [(set (match_operand 0 "arith_reg_operand" "=r") ! (ashift (match_operand 1 "arith_reg_operand" "r") ! (unspec [(label_ref:DI (match_operand 2 "" ""))] 2)))] "TARGET_SHMEDIA" "* { --- 6963,6972 ---- [(set_attr "length" "4")]) (define_insn "casesi_shift_media" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (ashift:DI (match_operand:DI 1 "arith_reg_operand" "r") ! (unspec:DI [(label_ref:DI (match_operand 2 "" ""))] ! UNSPEC_CASESI)))] "TARGET_SHMEDIA" "* { *************** *** 6482,6488 **** default: abort (); } ! }") (define_insn "casesi_load_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") --- 6988,6995 ---- default: abort (); } ! }" ! [(set_attr "type" "arith_media")]) (define_insn "casesi_load_media" [(set (match_operand:DI 0 "arith_reg_operand" "=r") *************** *** 6514,6520 **** default: abort (); } ! }") (define_expand "return" [(return)] --- 7021,7028 ---- default: abort (); } ! }" ! [(set_attr "type" "load_media")]) (define_expand "return" [(return)] *************** *** 6575,6581 **** (define_insn "return_media_i" [(parallel [(return) (use (match_operand:DI 0 "target_reg_operand" "k"))])] "TARGET_SHMEDIA && reload_completed" ! "blink %0, r63") (define_expand "return_media" [(return)] --- 7083,7090 ---- (define_insn "return_media_i" [(parallel [(return) (use (match_operand:DI 0 "target_reg_operand" "k"))])] "TARGET_SHMEDIA && reload_completed" ! "blink %0, r63" ! [(set_attr "type" "jump_media")]) (define_expand "return_media" [(return)] *************** *** 6601,6623 **** }") (define_insn "shcompact_preserve_incoming_args" ! [(set (match_operand 0 "register_operand" "+r") ! (unspec [(match_dup 0)] UNSPEC_COMPACT_ARGS))] "TARGET_SHCOMPACT" "" [(set_attr "length" "0")]) (define_insn "shcompact_incoming_args" ! [(set (reg:SI R2_REG) (unspec [(reg:SI R2_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R3_REG) (unspec [(reg:SI R3_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R4_REG) (unspec [(reg:SI R4_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R5_REG) (unspec [(reg:SI R5_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R6_REG) (unspec [(reg:SI R6_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R7_REG) (unspec [(reg:SI R7_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R8_REG) (unspec [(reg:SI R8_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R9_REG) (unspec [(reg:SI R9_REG)] UNSPEC_COMPACT_ARGS)) (set (mem:BLK (reg:SI MACL_REG)) ! (unspec [(reg:SI MACH_REG)] UNSPEC_COMPACT_ARGS)) (use (reg:SI R0_REG)) (clobber (reg:SI R0_REG)) (clobber (reg:SI MACL_REG)) --- 7110,7132 ---- }") (define_insn "shcompact_preserve_incoming_args" ! [(set (match_operand:SI 0 "register_operand" "+r") ! (unspec:SI [(match_dup 0)] UNSPEC_COMPACT_ARGS))] "TARGET_SHCOMPACT" "" [(set_attr "length" "0")]) (define_insn "shcompact_incoming_args" ! [(set (reg:SI R2_REG) (unspec:SI [(reg:SI R2_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R3_REG) (unspec:SI [(reg:SI R3_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R4_REG) (unspec:SI [(reg:SI R4_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R5_REG) (unspec:SI [(reg:SI R5_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R6_REG) (unspec:SI [(reg:SI R6_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R7_REG) (unspec:SI [(reg:SI R7_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R8_REG) (unspec:SI [(reg:SI R8_REG)] UNSPEC_COMPACT_ARGS)) ! (set (reg:SI R9_REG) (unspec:SI [(reg:SI R9_REG)] UNSPEC_COMPACT_ARGS)) (set (mem:BLK (reg:SI MACL_REG)) ! (unspec:BLK [(reg:SI MACH_REG)] UNSPEC_COMPACT_ARGS)) (use (reg:SI R0_REG)) (clobber (reg:SI R0_REG)) (clobber (reg:SI MACL_REG)) *************** *** 7054,7060 **** (match_dup 2)))) (set (reg:SI T_REG) (ne:SI (ior:SI (match_dup 1) (match_dup 2)) ! (const_int 0)))])] "" " { --- 7563,7569 ---- (match_dup 2)))) (set (reg:SI T_REG) (ne:SI (ior:SI (match_dup 1) (match_dup 2)) ! (const_int 0)))])] "" " { *************** *** 7105,7111 **** (match_dup 2)))) (set (reg:SI T_REG) (ne:SI (ior:SI (match_operand 1 "" "") (match_dup 2)) ! (const_int 0)))])] "TARGET_SH1" "operands[2] = gen_reg_rtx (SImode);") --- 7614,7620 ---- (match_dup 2)))) (set (reg:SI T_REG) (ne:SI (ior:SI (match_operand 1 "" "") (match_dup 2)) ! (const_int 0)))])] "TARGET_SH1" "operands[2] = gen_reg_rtx (SImode);") *************** *** 7185,7193 **** { if (operands[1] != const0_rtx) { ! union real_extract u; ! memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u); ! assemble_real (u.d, SFmode, GET_MODE_ALIGNMENT (SFmode)); } return \"\"; }" --- 7694,7702 ---- { if (operands[1] != const0_rtx) { ! REAL_VALUE_TYPE d; ! REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]); ! assemble_real (d, SFmode, GET_MODE_ALIGNMENT (SFmode)); } return \"\"; }" *************** *** 7205,7213 **** { if (operands[1] != const0_rtx) { ! union real_extract u; ! memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u); ! assemble_real (u.d, DFmode, GET_MODE_ALIGNMENT (DFmode)); } return \"\"; }" --- 7714,7722 ---- { if (operands[1] != const0_rtx) { ! REAL_VALUE_TYPE d; ! REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]); ! assemble_real (d, DFmode, GET_MODE_ALIGNMENT (DFmode)); } return \"\"; }" *************** *** 7390,7401 **** ;; GO_IF_LEGITIMATE_ADDRESS guards about bogus addresses before reload, ;; SECONDARY_INPUT_RELOAD_CLASS does this during reload, and the insn's ;; predicate after reload. ! ;; The gp_fpul type for r/!c might look a bit odd, but it actually schedules ! ;; like a gpr <-> fpul move. (define_insn "fpu_switch" ! [(set (match_operand:PSI 0 "register_operand" "=c,c,r,c,c,r,m,r") ! (match_operand:PSI 1 "general_movsrc_operand" "c,>,m,m,r,r,r,!c"))] ! "TARGET_SH4 && (! reload_completed || true_regnum (operands[0]) != FPSCR_REG || GET_CODE (operands[1]) != MEM --- 7899,7910 ---- ;; GO_IF_LEGITIMATE_ADDRESS guards about bogus addresses before reload, ;; SECONDARY_INPUT_RELOAD_CLASS does this during reload, and the insn's ;; predicate after reload. ! ;; The mac_gp type for r/!c might look a bit odd, but it actually schedules ! ;; like a mac -> gpr move. (define_insn "fpu_switch" ! [(set (match_operand:PSI 0 "general_movdst_operand" "=c,c,r,c,c,r,m,r,<") ! (match_operand:PSI 1 "general_movsrc_operand" "c,>,m,m,r,r,r,!c,c"))] ! "TARGET_SH3E && (! reload_completed || true_regnum (operands[0]) != FPSCR_REG || GET_CODE (operands[1]) != MEM *************** *** 7408,7420 **** lds %1,fpscr mov %1,%0 mov.l %1,%0 ! sts fpscr,%0" ! [(set_attr "length" "0,2,2,4,2,2,2,2") ! (set_attr "type" "dfp_conv,dfp_conv,load,dfp_conv,dfp_conv,move,store,gp_fpul")]) (define_split [(set (reg:PSI FPSCR_REG) ! (mem:PSI (match_operand:SI 0 "register_operand" "r")))] "TARGET_SH4 && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" [(set (match_dup 0) (match_dup 0))] " --- 7917,7930 ---- lds %1,fpscr mov %1,%0 mov.l %1,%0 ! sts fpscr,%0 ! sts.l fpscr,%0" ! [(set_attr "length" "0,2,2,4,2,2,2,2,2") ! (set_attr "type" "nil,mem_fpscr,load,mem_fpscr,gp_fpscr,move,store,mac_gp,store")]) (define_split [(set (reg:PSI FPSCR_REG) ! (mem:PSI (match_operand:SI 0 "register_operand" "")))] "TARGET_SH4 && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" [(set (match_dup 0) (match_dup 0))] " *************** *** 7428,7434 **** (define_split [(set (reg:PSI FPSCR_REG) ! (mem:PSI (match_operand:SI 0 "register_operand" "r")))] "TARGET_SH4" [(set (match_dup 0) (plus:SI (match_dup 0) (const_int -4)))] " --- 7938,7944 ---- (define_split [(set (reg:PSI FPSCR_REG) ! (mem:PSI (match_operand:SI 0 "register_operand" "")))] "TARGET_SH4" [(set (match_dup 0) (plus:SI (match_dup 0) (const_int -4)))] " *************** *** 7471,7477 **** (plus:SF (match_operand:SF 1 "fp_arith_reg_operand" "%f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fadd.s %1, %2, %0") (define_insn "addsf3_i" [(set (match_operand:SF 0 "arith_reg_operand" "=f") --- 7981,8054 ---- (plus:SF (match_operand:SF 1 "fp_arith_reg_operand" "%f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fadd.s %1, %2, %0" ! [(set_attr "type" "fparith_media")]) ! ! (define_insn_and_split "unary_sf_op" ! [(set (match_operand:V2SF 0 "fp_arith_reg_operand" "=f") ! (vec_select:V2SF ! (vec_concat:V2SF ! (vec_select:SF ! (match_dup 0) ! (parallel [(not:BI (match_operand 3 "const_int_operand" "n"))])) ! (match_operator:SF 2 "unary_float_operator" ! [(vec_select:SF (match_operand:V2SF 1 "fp_arith_reg_operand" "f") ! (parallel [(match_operand 4 ! "const_int_operand" "n")]))])) ! (parallel [(not:BI (match_dup 3)) (match_dup 3)])))] ! "TARGET_SHMEDIA_FPU" ! "#" ! "TARGET_SHMEDIA_FPU && reload_completed" ! [(set (match_dup 5) (match_dup 6))] ! " ! { ! int endian = TARGET_LITTLE_ENDIAN ? 0 : 1; ! rtx op1 = gen_rtx_REG (SFmode, ! (true_regnum (operands[1]) ! + (INTVAL (operands[4]) ^ endian))); ! ! operands[7] = gen_rtx_REG (SFmode, ! (true_regnum (operands[0]) ! + (INTVAL (operands[3]) ^ endian))); ! operands[6] = gen_rtx (GET_CODE (operands[2]), SFmode, op1); ! }" ! [(set_attr "type" "fparith_media")]) ! ! (define_insn_and_split "binary_sf_op" ! [(set (match_operand:V2SF 0 "fp_arith_reg_operand" "=f") ! (vec_select:V2SF ! (vec_concat:V2SF ! (vec_select:SF ! (match_dup 0) ! (parallel [(not:BI (match_operand 4 "const_int_operand" "n"))])) ! (match_operator:SF 3 "binary_float_operator" ! [(vec_select:SF (match_operand:V2SF 1 "fp_arith_reg_operand" "f") ! (parallel [(match_operand 5 ! "const_int_operand" "n")])) ! (vec_select:SF (match_operand:V2SF 2 "fp_arith_reg_operand" "f") ! (parallel [(match_operand 6 ! "const_int_operand" "n")]))])) ! (parallel [(not:BI (match_dup 4)) (match_dup 4)])))] ! "TARGET_SHMEDIA_FPU" ! "#" ! "TARGET_SHMEDIA_FPU && reload_completed" ! [(set (match_dup 7) (match_dup 8))] ! " ! { ! int endian = TARGET_LITTLE_ENDIAN ? 0 : 1; ! rtx op1 = gen_rtx_REG (SFmode, ! (true_regnum (operands[1]) ! + (INTVAL (operands[5]) ^ endian))); ! rtx op2 = gen_rtx_REG (SFmode, ! (true_regnum (operands[2]) ! + (INTVAL (operands[6]) ^ endian))); ! ! operands[7] = gen_rtx_REG (SFmode, ! (true_regnum (operands[0]) ! + (INTVAL (operands[4]) ^ endian))); ! operands[8] = gen_rtx (GET_CODE (operands[3]), SFmode, op1, op2); ! }" ! [(set_attr "type" "fparith_media")]) (define_insn "addsf3_i" [(set (match_operand:SF 0 "arith_reg_operand" "=f") *************** *** 7502,7508 **** (minus:SF (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsub.s %1, %2, %0") (define_insn "subsf3_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") --- 8079,8086 ---- (minus:SF (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsub.s %1, %2, %0" ! [(set_attr "type" "fparith_media")]) (define_insn "subsf3_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") *************** *** 7539,7545 **** (mult:SF (match_operand:SF 1 "fp_arith_reg_operand" "%f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fmul.s %1, %2, %0") (define_insn "mulsf3_i4" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") --- 8117,8124 ---- (mult:SF (match_operand:SF 1 "fp_arith_reg_operand" "%f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fmul.s %1, %2, %0" ! [(set_attr "type" "fparith_media")]) (define_insn "mulsf3_i4" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") *************** *** 7565,7571 **** (match_operand:SF 2 "fp_arith_reg_operand" "f")) (match_operand:SF 3 "fp_arith_reg_operand" "0")))] "TARGET_SHMEDIA_FPU" ! "fmac.s %1, %2, %0") (define_insn "*macsf3" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") --- 8144,8151 ---- (match_operand:SF 2 "fp_arith_reg_operand" "f")) (match_operand:SF 3 "fp_arith_reg_operand" "0")))] "TARGET_SHMEDIA_FPU" ! "fmac.s %1, %2, %0" ! [(set_attr "type" "fparith_media")]) (define_insn "*macsf3" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") *************** *** 7597,7603 **** (div:SF (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fdiv.s %1, %2, %0") (define_insn "divsf3_i" [(set (match_operand:SF 0 "arith_reg_operand" "=f") --- 8177,8184 ---- (div:SF (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fdiv.s %1, %2, %0" ! [(set_attr "type" "fdiv_media")]) (define_insn "divsf3_i" [(set (match_operand:SF 0 "arith_reg_operand" "=f") *************** *** 7613,7619 **** [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (float:SF (match_operand:DI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.qs %1, %0") (define_expand "floatsisf2" [(set (match_operand:SF 0 "fp_arith_reg_operand" "") --- 8194,8201 ---- [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (float:SF (match_operand:DI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.qs %1, %0" ! [(set_attr "type" "fpconv_media")]) (define_expand "floatsisf2" [(set (match_operand:SF 0 "fp_arith_reg_operand" "") *************** *** 7632,7638 **** [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (float:SF (match_operand:SI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.ls %1, %0") (define_insn "floatsisf2_i4" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") --- 8214,8221 ---- [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (float:SF (match_operand:SI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.ls %1, %0" ! [(set_attr "type" "fpconv_media")]) (define_insn "floatsisf2_i4" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") *************** *** 7654,7660 **** [(set (match_operand:DI 0 "fp_arith_reg_operand" "=f") (fix:DI (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.sq %1, %0") (define_expand "fix_truncsfsi2" [(set (match_operand:SI 0 "fpul_operand" "=y") --- 8237,8244 ---- [(set (match_operand:DI 0 "fp_arith_reg_operand" "=f") (fix:DI (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.sq %1, %0" ! [(set_attr "type" "fpconv_media")]) (define_expand "fix_truncsfsi2" [(set (match_operand:SI 0 "fpul_operand" "=y") *************** *** 7673,7679 **** [(set (match_operand:SI 0 "fp_arith_reg_operand" "=f") (fix:SI (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.sl %1, %0") (define_insn "fix_truncsfsi2_i4" [(set (match_operand:SI 0 "fpul_operand" "=y") --- 8257,8264 ---- [(set (match_operand:SI 0 "fp_arith_reg_operand" "=f") (fix:SI (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.sl %1, %0" ! [(set_attr "type" "fpconv_media")]) (define_insn "fix_truncsfsi2_i4" [(set (match_operand:SI 0 "fpul_operand" "=y") *************** *** 7681,7687 **** (use (match_operand:PSI 2 "fpscr_operand" "c"))] "TARGET_SH4" "ftrc %1,%0" ! [(set_attr "type" "fp") (set_attr "fp_mode" "single")]) ;; ??? This pattern is used nowhere. fix_truncsfsi2 always expands to --- 8266,8272 ---- (use (match_operand:PSI 2 "fpscr_operand" "c"))] "TARGET_SH4" "ftrc %1,%0" ! [(set_attr "type" "ftrc_s") (set_attr "fp_mode" "single")]) ;; ??? This pattern is used nowhere. fix_truncsfsi2 always expands to *************** *** 7777,7804 **** (eq:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpeq.s %1, %2, %0") (define_insn "cmpgtsf_media" [(set (match_operand:DI 0 "register_operand" "=r") (gt:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpgt.s %1, %2, %0") (define_insn "cmpgesf_media" [(set (match_operand:DI 0 "register_operand" "=r") (ge:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpge.s %1, %2, %0") (define_insn "cmpunsf_media" [(set (match_operand:DI 0 "register_operand" "=r") (unordered:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpun.s %1, %2, %0") (define_expand "cmpsf" [(set (reg:SI T_REG) --- 8362,8393 ---- (eq:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpeq.s %1, %2, %0" ! [(set_attr "type" "fcmp_media")]) (define_insn "cmpgtsf_media" [(set (match_operand:DI 0 "register_operand" "=r") (gt:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpgt.s %1, %2, %0" ! [(set_attr "type" "fcmp_media")]) (define_insn "cmpgesf_media" [(set (match_operand:DI 0 "register_operand" "=r") (ge:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpge.s %1, %2, %0" ! [(set_attr "type" "fcmp_media")]) (define_insn "cmpunsf_media" [(set (match_operand:DI 0 "register_operand" "=r") (unordered:DI (match_operand:SF 1 "fp_arith_reg_operand" "f") (match_operand:SF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpun.s %1, %2, %0" ! [(set_attr "type" "fcmp_media")]) (define_expand "cmpsf" [(set (reg:SI T_REG) *************** *** 7829,7835 **** [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (neg:SF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fneg.s %1, %0") (define_insn "negsf2_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") --- 8418,8425 ---- [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (neg:SF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fneg.s %1, %0" ! [(set_attr "type" "fmove_media")]) (define_insn "negsf2_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") *************** *** 7857,7863 **** [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsqrt.s %1, %0") (define_insn "sqrtsf2_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") --- 8447,8454 ---- [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsqrt.s %1, %0" ! [(set_attr "type" "fdiv_media")]) (define_insn "sqrtsf2_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") *************** *** 7885,7891 **** [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (abs:SF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fabs.s %1, %0") (define_insn "abssf2_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") --- 8476,8483 ---- [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (abs:SF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fabs.s %1, %0" ! [(set_attr "type" "fmove_media")]) (define_insn "abssf2_i" [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") *************** *** 7915,7921 **** (plus:DF (match_operand:DF 1 "fp_arith_reg_operand" "%f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fadd.d %1, %2, %0") (define_insn "adddf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") --- 8507,8514 ---- (plus:DF (match_operand:DF 1 "fp_arith_reg_operand" "%f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fadd.d %1, %2, %0" ! [(set_attr "type" "dfparith_media")]) (define_insn "adddf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") *************** *** 7946,7952 **** (minus:DF (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsub.d %1, %2, %0") (define_insn "subdf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") --- 8539,8546 ---- (minus:DF (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsub.d %1, %2, %0" ! [(set_attr "type" "dfparith_media")]) (define_insn "subdf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") *************** *** 7977,7983 **** (mult:DF (match_operand:DF 1 "fp_arith_reg_operand" "%f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fmul.d %1, %2, %0") (define_insn "muldf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") --- 8571,8578 ---- (mult:DF (match_operand:DF 1 "fp_arith_reg_operand" "%f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fmul.d %1, %2, %0" ! [(set_attr "type" "dfmul_media")]) (define_insn "muldf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") *************** *** 8008,8014 **** (div:DF (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fdiv.d %1, %2, %0") (define_insn "divdf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") --- 8603,8610 ---- (div:DF (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fdiv.d %1, %2, %0" ! [(set_attr "type" "dfdiv_media")]) (define_insn "divdf3_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") *************** *** 8024,8030 **** [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (float:DF (match_operand:DI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.qd %1, %0") (define_expand "floatsidf2" [(set (match_operand:DF 0 "fp_arith_reg_operand" "") --- 8620,8627 ---- [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (float:DF (match_operand:DI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.qd %1, %0" ! [(set_attr "type" "dfpconv_media")]) (define_expand "floatsidf2" [(set (match_operand:DF 0 "fp_arith_reg_operand" "") *************** *** 8044,8050 **** [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (float:DF (match_operand:SI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.ld %1, %0") (define_insn "floatsidf2_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") --- 8641,8648 ---- [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (float:DF (match_operand:SI 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "float.ld %1, %0" ! [(set_attr "type" "dfpconv_media")]) (define_insn "floatsidf2_i" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") *************** *** 8059,8065 **** [(set (match_operand:DI 0 "fp_arith_reg_operand" "=f") (fix:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.dq %1, %0") (define_expand "fix_truncdfsi2" [(set (match_operand:SI 0 "fpul_operand" "") --- 8657,8664 ---- [(set (match_operand:DI 0 "fp_arith_reg_operand" "=f") (fix:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.dq %1, %0" ! [(set_attr "type" "dfpconv_media")]) (define_expand "fix_truncdfsi2" [(set (match_operand:SI 0 "fpul_operand" "") *************** *** 8079,8085 **** [(set (match_operand:SI 0 "fp_arith_reg_operand" "=f") (fix:SI (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.dl %1, %0") (define_insn "fix_truncdfsi2_i" [(set (match_operand:SI 0 "fpul_operand" "=y") --- 8678,8685 ---- [(set (match_operand:SI 0 "fp_arith_reg_operand" "=f") (fix:SI (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "ftrc.dl %1, %0" ! [(set_attr "type" "dfpconv_media")]) (define_insn "fix_truncdfsi2_i" [(set (match_operand:SI 0 "fpul_operand" "=y") *************** *** 8088,8093 **** --- 8688,8694 ---- "TARGET_SH4" "ftrc %1,%0" [(set_attr "type" "dfp_conv") + (set_attr "dfp_comp" "no") (set_attr "fp_mode" "double")]) ;; ??? This pattern is used nowhere. fix_truncdfsi2 always expands to *************** *** 8101,8107 **** ;; "#" ;; [(set_attr "length" "4") ;; (set_attr "fp_mode" "double")]) ! ;; ;; (define_split ;; [(set (match_operand:SI 0 "arith_reg_operand" "=r") ;; (fix:SI (match_operand:DF 1 "arith_reg_operand" "f"))) --- 8702,8708 ---- ;; "#" ;; [(set_attr "length" "4") ;; (set_attr "fp_mode" "double")]) ! ;; ;; (define_split ;; [(set (match_operand:SI 0 "arith_reg_operand" "=r") ;; (fix:SI (match_operand:DF 1 "arith_reg_operand" "f"))) *************** *** 8142,8175 **** "* return output_ieee_ccmpeq (insn, operands);" [(set_attr "length" "4") (set_attr "fp_mode" "double")]) ! (define_insn "cmpeqdf_media" [(set (match_operand:DI 0 "register_operand" "=r") (eq:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpeq.d %1,%2,%0") (define_insn "cmpgtdf_media" [(set (match_operand:DI 0 "register_operand" "=r") (gt:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpgt.d %1,%2,%0") (define_insn "cmpgedf_media" [(set (match_operand:DI 0 "register_operand" "=r") (ge:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpge.d %1,%2,%0") (define_insn "cmpundf_media" [(set (match_operand:DI 0 "register_operand" "=r") (unordered:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpun.d %1,%2,%0") (define_expand "cmpdf" [(set (reg:SI T_REG) --- 8743,8780 ---- "* return output_ieee_ccmpeq (insn, operands);" [(set_attr "length" "4") (set_attr "fp_mode" "double")]) ! (define_insn "cmpeqdf_media" [(set (match_operand:DI 0 "register_operand" "=r") (eq:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpeq.d %1,%2,%0" ! [(set_attr "type" "fcmp_media")]) (define_insn "cmpgtdf_media" [(set (match_operand:DI 0 "register_operand" "=r") (gt:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpgt.d %1,%2,%0" ! [(set_attr "type" "fcmp_media")]) (define_insn "cmpgedf_media" [(set (match_operand:DI 0 "register_operand" "=r") (ge:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpge.d %1,%2,%0" ! [(set_attr "type" "fcmp_media")]) (define_insn "cmpundf_media" [(set (match_operand:DI 0 "register_operand" "=r") (unordered:DI (match_operand:DF 1 "fp_arith_reg_operand" "f") (match_operand:DF 2 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcmpun.d %1,%2,%0" ! [(set_attr "type" "fcmp_media")]) (define_expand "cmpdf" [(set (reg:SI T_REG) *************** *** 8200,8206 **** [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (neg:DF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fneg.d %1, %0") (define_insn "negdf2_i" [(set (match_operand:DF 0 "arith_reg_operand" "=f") --- 8805,8812 ---- [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (neg:DF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fneg.d %1, %0" ! [(set_attr "type" "fmove_media")]) (define_insn "negdf2_i" [(set (match_operand:DF 0 "arith_reg_operand" "=f") *************** *** 8228,8234 **** [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (sqrt:DF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsqrt.d %1, %0") (define_insn "sqrtdf2_i" [(set (match_operand:DF 0 "arith_reg_operand" "=f") --- 8834,8841 ---- [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (sqrt:DF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fsqrt.d %1, %0" ! [(set_attr "type" "dfdiv_media")]) (define_insn "sqrtdf2_i" [(set (match_operand:DF 0 "arith_reg_operand" "=f") *************** *** 8256,8262 **** [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (abs:DF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fabs.d %1, %0") (define_insn "absdf2_i" [(set (match_operand:DF 0 "arith_reg_operand" "=f") --- 8863,8870 ---- [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (abs:DF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fabs.d %1, %0" ! [(set_attr "type" "fmove_media")]) (define_insn "absdf2_i" [(set (match_operand:DF 0 "arith_reg_operand" "=f") *************** *** 8285,8291 **** [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (float_extend:DF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcnv.sd %1, %0") (define_insn "extendsfdf2_i4" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") --- 8893,8900 ---- [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") (float_extend:DF (match_operand:SF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcnv.sd %1, %0" ! [(set_attr "type" "dfpconv_media")]) (define_insn "extendsfdf2_i4" [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") *************** *** 8314,8320 **** [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (float_truncate:SF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcnv.ds %1, %0") (define_insn "truncdfsf2_i4" [(set (match_operand:SF 0 "fpul_operand" "=y") --- 8923,8930 ---- [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") (float_truncate:SF (match_operand:DF 1 "fp_arith_reg_operand" "f")))] "TARGET_SHMEDIA_FPU" ! "fcnv.ds %1, %0" ! [(set_attr "type" "dfpconv_media")]) (define_insn "truncdfsf2_i4" [(set (match_operand:SF 0 "fpul_operand" "=y") *************** *** 8552,8554 **** --- 9162,10915 ---- "TARGET_SH1" "mov.l @r15+,r15\;mov.l @r15+,r0" [(set_attr "length" "4")]) + + ;; Integer vector moves + + (define_expand "movv8qi" + [(set (match_operand:V8QI 0 "general_movdst_operand" "") + (match_operand:V8QI 1 "general_movsrc_operand" ""))] + "TARGET_SHMEDIA" + "{ if (prepare_move_operands (operands, V8QImode)) DONE; }") + + (define_insn "movv8qi_i" + [(set (match_operand:V8QI 0 "general_movdst_operand" "=r,r,r,rl,m") + (match_operand:V8QI 1 "general_movsrc_operand" "r,JSU,nW,m,rlU"))] + "TARGET_SHMEDIA + && (register_operand (operands[0], V8QImode) + || sh_register_operand (operands[1], V8QImode))" + "@ + add %1, r63, %0 + movi %1, %0 + # + ld%M1.q %m1, %0 + st%M0.q %m0, %N1" + [(set_attr "type" "arith_media,arith_media,*,load_media,store_media") + (set_attr "length" "4,4,16,4,4")]) + + (define_split + [(set (match_operand:V8QI 0 "arith_reg_dest" "") + (subreg:V8QI (const_int 0) 0))] + "TARGET_SHMEDIA" + [(set (match_dup 0) + (const_vector:V8QI [(const_int 0) (const_int 0) (const_int 0) + (const_int 0) (const_int 0) (const_int 0) + (const_int 0) (const_int 0)]))]) + + (define_split + [(set (match_operand 0 "arith_reg_dest" "") + (match_operand 1 "sh_rep_vec" ""))] + "TARGET_SHMEDIA && reload_completed + && GET_MODE (operands[0]) == GET_MODE (operands[1]) + && VECTOR_MODE_SUPPORTED_P (GET_MODE (operands[0])) + && GET_MODE_SIZE (GET_MODE (operands[0])) == 8 + && (XVECEXP (operands[1], 0, 0) != const0_rtx + || XVECEXP (operands[1], 0, 1) != const0_rtx) + && (XVECEXP (operands[1], 0, 0) != constm1_rtx + || XVECEXP (operands[1], 0, 1) != constm1_rtx)" + [(set (match_dup 0) (match_dup 1)) + (match_dup 2)] + " + { + int unit_size = GET_MODE_UNIT_SIZE (GET_MODE (operands[1])); + rtx elt1 = XVECEXP (operands[1], 0, 1); + + if (unit_size > 2) + operands[2] = gen_mshflo_l (operands[0], operands[0], operands[0]); + else + { + if (unit_size < 2) + operands[0] = gen_rtx_REG (V4HImode, true_regnum (operands[0])); + operands[2] = gen_mperm_w0 (operands[0], operands[0]); + } + operands[0] = gen_rtx_REG (DImode, true_regnum (operands[0])); + operands[1] = XVECEXP (operands[1], 0, 0); + if (unit_size < 2) + { + if (GET_CODE (operands[1]) == CONST_INT && GET_CODE (elt1) == CONST_INT) + operands[1] = GEN_INT (TARGET_LITTLE_ENDIAN + ? INTVAL (operands[1]) + (INTVAL (elt1) << 8) + : (INTVAL (operands[1]) << 8) + INTVAL (elt1)); + else + { + operands[0] = gen_rtx_REG (V2QImode, true_regnum (operands[0])); + operands[1] + = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, operands[1], elt1)); + } + } + }") + + (define_split + [(set (match_operand 0 "arith_reg_dest" "") + (match_operand 1 "sh_const_vec" ""))] + "TARGET_SHMEDIA && reload_completed + && GET_MODE (operands[0]) == GET_MODE (operands[1]) + && VECTOR_MODE_SUPPORTED_P (GET_MODE (operands[0])) + && operands[1] != CONST0_RTX (GET_MODE (operands[1]))" + [(set (match_dup 0) (match_dup 1))] + " + { + rtx v = operands[1]; + enum machine_mode new_mode + = mode_for_size (GET_MODE_BITSIZE (GET_MODE (v)), MODE_INT, 0); + + operands[0] = gen_rtx_REG (new_mode, true_regnum (operands[0])); + operands[1] + = simplify_subreg (new_mode, operands[1], GET_MODE (operands[1]), 0); + }") + + (define_expand "movv2hi" + [(set (match_operand:V2HI 0 "general_movdst_operand" "") + (match_operand:V2HI 1 "general_movsrc_operand" ""))] + "TARGET_SHMEDIA" + "{ if (prepare_move_operands (operands, V2HImode)) DONE; }") + + (define_insn "movv2hi_i" + [(set (match_operand:V2HI 0 "general_movdst_operand" "=r,r,r,rl,m") + (match_operand:V2HI 1 "general_movsrc_operand" "r,JSU,nW,m,rlU"))] + "TARGET_SHMEDIA + && (register_operand (operands[0], V2HImode) + || sh_register_operand (operands[1], V2HImode))" + "@ + addz.l %1, r63, %0 + movi %1, %0 + # + ld%M1.l %m1, %0 + st%M0.l %m0, %N1" + [(set_attr "type" "arith_media,arith_media,*,load_media,store_media") + (set_attr "length" "4,4,16,4,4")]) + + (define_expand "movv4hi" + [(set (match_operand:V4HI 0 "general_movdst_operand" "") + (match_operand:V4HI 1 "general_movsrc_operand" ""))] + "TARGET_SHMEDIA" + "{ if (prepare_move_operands (operands, V4HImode)) DONE; }") + + (define_insn "movv4hi_i" + [(set (match_operand:V4HI 0 "general_movdst_operand" "=r,r,r,rl,m") + (match_operand:V4HI 1 "general_movsrc_operand" "r,JSU,nW,m,rlU"))] + "TARGET_SHMEDIA + && (register_operand (operands[0], V4HImode) + || sh_register_operand (operands[1], V4HImode))" + "@ + add %1, r63, %0 + movi %1, %0 + # + ld%M1.q %m1, %0 + st%M0.q %m0, %N1" + [(set_attr "type" "arith_media,arith_media,*,load_media,store_media") + (set_attr "length" "4,4,16,4,4")]) + + (define_expand "movv2si" + [(set (match_operand:V2SI 0 "general_movdst_operand" "") + (match_operand:V2SI 1 "general_movsrc_operand" ""))] + "TARGET_SHMEDIA" + "{ if (prepare_move_operands (operands, V2SImode)) DONE; }") + + (define_insn "movv2si_i" + [(set (match_operand:V2SI 0 "general_movdst_operand" "=r,r,r,rl,m") + (match_operand:V2SI 1 "general_movsrc_operand" "r,JSU,nW,m,rlU"))] + "TARGET_SHMEDIA + && (register_operand (operands[0], V2SImode) + || sh_register_operand (operands[1], V2SImode))" + "@ + add %1, r63, %0 + # + # + ld%M1.q %m1, %0 + st%M0.q %m0, %N1" + [(set_attr "type" "arith_media,arith_media,*,load_media,store_media") + (set_attr "length" "4,4,16,4,4")]) + + ;; Multimedia Intrinsics + + (define_insn "absv2si2" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (abs:V2SI (match_operand:V2SI 1 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mabs.l %1, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "absv4hi2" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (abs:V4HI (match_operand:V4HI 1 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mabs.w %1, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "addv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (plus:V2SI (match_operand:V2SI 1 "arith_reg_operand" "%r") + (match_operand:V2SI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "madd.l %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "addv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (plus:V4HI (match_operand:V4HI 1 "arith_reg_operand" "%r") + (match_operand:V4HI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "madd.w %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "ssaddv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ss_plus:V2SI (match_operand:V2SI 1 "arith_reg_operand" "%r") + (match_operand:V2SI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "madds.l %1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "usaddv8qi3" + [(set (match_operand:V8QI 0 "arith_reg_dest" "=r") + (us_plus:V8QI (match_operand:V8QI 1 "arith_reg_operand" "%r") + (match_operand:V8QI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "madds.ub %1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "ssaddv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (ss_plus:V4HI (match_operand:V4HI 1 "arith_reg_operand" "%r") + (match_operand:V4HI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "madds.w %1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "negcmpeqv8qi" + [(set (match_operand:V8QI 0 "arith_reg_dest" "=r") + (neg:V8QI (eq:V8QI (match_operand:V8QI 1 "arith_reg_or_0_operand" "%rU") + (match_operand:V8QI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcmpeq.b %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "negcmpeqv2si" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (neg:V2SI (eq:V2SI (match_operand:V2SI 1 "arith_reg_or_0_operand" "%rU") + (match_operand:V2SI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcmpeq.l %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "negcmpeqv4hi" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (neg:V4HI (eq:V4HI (match_operand:V4HI 1 "arith_reg_or_0_operand" "%rU") + (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcmpeq.w %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "negcmpgtuv8qi" + [(set (match_operand:V8QI 0 "arith_reg_dest" "=r") + (neg:V8QI (gtu:V8QI (match_operand:V8QI 1 "arith_reg_or_0_operand" "%rU") + (match_operand:V8QI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcmpgt.ub %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "negcmpgtv2si" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (neg:V2SI (gt:V2SI (match_operand:V2SI 1 "arith_reg_or_0_operand" "%rU") + (match_operand:V2SI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcmpgt.l %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "negcmpgtv4hi" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (neg:V4HI (gt:V4HI (match_operand:V4HI 1 "arith_reg_or_0_operand" "%rU") + (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcmpgt.w %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "mcmv" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (and:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_operand" "r")) + (and:DI (match_operand:DI 3 "arith_reg_operand" "0") + (not:DI (match_dup 2)))))] + "TARGET_SHMEDIA" + "mcmv %N1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "mcnvs_lw" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (vec_concat:V4HI + (ss_truncate:V2HI (match_operand:V2SI 1 "arith_reg_or_0_operand" "rU")) + (ss_truncate:V2HI (match_operand:V2SI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcnvs.lw %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "mcnvs_wb" + [(set (match_operand:V8QI 0 "arith_reg_dest" "=r") + (vec_concat:V8QI + (ss_truncate:V4QI (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU")) + (ss_truncate:V4QI (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcnvs.wb %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "mcnvs_wub" + [(set (match_operand:V8QI 0 "arith_reg_dest" "=r") + (vec_concat:V8QI + (us_truncate:V4QI (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU")) + (us_truncate:V4QI (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mcnvs.wub %N1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "mextr_rl" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (lshiftrt:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:HI 3 "mextr_bit_offset" "i")) + (ashift:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU") + (match_operand:HI 4 "mextr_bit_offset" "i"))))] + "TARGET_SHMEDIA && INTVAL (operands[3]) + INTVAL (operands[4]) == 64" + "* + { + static char templ[16]; + + sprintf (templ, \"mextr%d\\t%%N1, %%N2, %%0\", + (int) INTVAL (operands[3]) >> 3); + return templ; + }" + [(set_attr "type" "arith_media")]) + + (define_insn "*mextr_lr" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (ashift:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:HI 3 "mextr_bit_offset" "i")) + (lshiftrt:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU") + (match_operand:HI 4 "mextr_bit_offset" "i"))))] + "TARGET_SHMEDIA && INTVAL (operands[3]) + INTVAL (operands[4]) == 64" + "* + { + static char templ[16]; + + sprintf (templ, \"mextr%d\\t%%N2, %%N1, %%0\", + (int) INTVAL (operands[4]) >> 3); + return templ; + }" + [(set_attr "type" "arith_media")]) + + ; mextrN can be modelled with vec_select / vec_concat, but the selection + ; vector then varies depending on endianness. + (define_expand "mextr1" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mextr_rl (operands[0], operands[1], operands[2], + GEN_INT (1 * 8), GEN_INT (7 * 8))); + DONE; + }") + + (define_expand "mextr2" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mextr_rl (operands[0], operands[1], operands[2], + GEN_INT (2 * 8), GEN_INT (6 * 8))); + DONE; + }") + + (define_expand "mextr3" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mextr_rl (operands[0], operands[1], operands[2], + GEN_INT (3 * 8), GEN_INT (5 * 8))); + DONE; + }") + + (define_expand "mextr4" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mextr_rl (operands[0], operands[1], operands[2], + GEN_INT (4 * 8), GEN_INT (4 * 8))); + DONE; + }") + + (define_expand "mextr5" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mextr_rl (operands[0], operands[1], operands[2], + GEN_INT (5 * 8), GEN_INT (3 * 8))); + DONE; + }") + + (define_expand "mextr6" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mextr_rl (operands[0], operands[1], operands[2], + GEN_INT (6 * 8), GEN_INT (2 * 8))); + DONE; + }") + + (define_expand "mextr7" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mextr_rl (operands[0], operands[1], operands[2], + GEN_INT (7 * 8), GEN_INT (1 * 8))); + DONE; + }") + + (define_expand "mmacfx_wl" + [(match_operand:V2SI 0 "arith_reg_dest" "") + (match_operand:V2HI 1 "extend_reg_operand" "") + (match_operand:V2HI 2 "extend_reg_operand" "") + (match_operand:V2SI 3 "arith_reg_operand" "")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mmacfx_wl_i (operands[0], operands[3], + operands[1], operands[2])); + DONE; + }") + + (define_insn "mmacfx_wl_i" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ss_plus:V2SI + (match_operand:V2SI 1 "arith_reg_operand" "0") + (ss_truncate:V2SI + (ashift:V2DI + (sign_extend:V2DI + (mult:V2SI + (sign_extend:V2SI (match_operand:V2HI 2 "extend_reg_operand" "r")) + (sign_extend:V2SI (match_operand:V2HI 3 "extend_reg_operand" "r")))) + (const_int 1)))))] + "TARGET_SHMEDIA" + "mmacfx.wl %2, %3, %0" + [(set_attr "type" "mac_media")]) + + (define_expand "mmacnfx_wl" + [(match_operand:V2SI 0 "arith_reg_dest" "") + (match_operand:V2HI 1 "extend_reg_operand" "") + (match_operand:V2HI 2 "extend_reg_operand" "") + (match_operand:V2SI 3 "arith_reg_operand" "")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mmacnfx_wl_i (operands[0], operands[3], + operands[1], operands[2])); + DONE; + }") + + (define_insn "mmacnfx_wl_i" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ss_minus:V2SI + (match_operand:V2SI 1 "arith_reg_operand" "0") + (ss_truncate:V2SI + (ashift:V2DI + (sign_extend:V2DI + (mult:V2SI + (sign_extend:V2SI (match_operand:V2HI 2 "extend_reg_operand" "r")) + (sign_extend:V2SI (match_operand:V2HI 3 "extend_reg_operand" "r")))) + (const_int 1)))))] + "TARGET_SHMEDIA" + "mmacnfx.wl %2, %3, %0" + [(set_attr "type" "mac_media")]) + + (define_insn "mulv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (mult:V2SI (match_operand:V2SI 1 "arith_reg_operand" "r") + (match_operand:V2SI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mmul.l %1, %2, %0" + [(set_attr "type" "d2mpy_media")]) + + (define_insn "mulv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (mult:V4HI (match_operand:V4HI 1 "arith_reg_operand" "r") + (match_operand:V4HI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mmul.w %1, %2, %0" + [(set_attr "type" "dmpy_media")]) + + (define_insn "mmulfx_l" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ss_truncate:V2SI + (ashiftrt:V2DI + (mult:V2DI + (sign_extend:V2DI (match_operand:V2SI 1 "arith_reg_operand" "r")) + (sign_extend:V2DI (match_operand:V2SI 2 "arith_reg_operand" "r"))) + (const_int 31))))] + "TARGET_SHMEDIA" + "mmulfx.l %1, %2, %0" + [(set_attr "type" "d2mpy_media")]) + + (define_insn "mmulfx_w" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (ss_truncate:V4HI + (ashiftrt:V4SI + (mult:V4SI + (sign_extend:V4SI (match_operand:V4HI 1 "arith_reg_operand" "r")) + (sign_extend:V4SI (match_operand:V4HI 2 "arith_reg_operand" "r"))) + (const_int 15))))] + "TARGET_SHMEDIA" + "mmulfx.w %1, %2, %0" + [(set_attr "type" "dmpy_media")]) + + (define_insn "mmulfxrp_w" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (ss_truncate:V4HI + (ashiftrt:V4SI + (plus:V4SI + (mult:V4SI + (sign_extend:V4SI (match_operand:V4HI 1 "arith_reg_operand" "r")) + (sign_extend:V4SI (match_operand:V4HI 2 "arith_reg_operand" "r"))) + (const_int 16384)) + (const_int 15))))] + "TARGET_SHMEDIA" + "mmulfxrp.w %1, %2, %0" + [(set_attr "type" "dmpy_media")]) + + (define_expand "mmulhi_wl" + [(match_operand:V2SI 0 "arith_reg_dest" "") + (match_operand:V4HI 1 "arith_reg_operand" "") + (match_operand:V4HI 2 "arith_reg_operand" "")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mmul23_wl : gen_mmul01_wl) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_expand "mmullo_wl" + [(match_operand:V2SI 0 "arith_reg_dest" "") + (match_operand:V4HI 1 "arith_reg_operand" "") + (match_operand:V4HI 2 "arith_reg_operand" "")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mmul01_wl : gen_mmul23_wl) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_insn "mmul23_wl" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (vec_select:V2SI + (mult:V4SI + (sign_extend:V4SI (match_operand:V4HI 1 "arith_reg_operand" "r")) + (sign_extend:V4SI (match_operand:V4HI 2 "arith_reg_operand" "r"))) + (parallel [(const_int 2) (const_int 3)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mmulhi.wl %1, %2, %0\" + : \"mmullo.wl %1, %2, %0\");" + [(set_attr "type" "dmpy_media")]) + + (define_insn "mmul01_wl" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (vec_select:V2SI + (mult:V4SI + (sign_extend:V4SI (match_operand:V4HI 1 "arith_reg_operand" "r")) + (sign_extend:V4SI (match_operand:V4HI 2 "arith_reg_operand" "r"))) + (parallel [(const_int 0) (const_int 1)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mmullo.wl %1, %2, %0\" + : \"mmulhi.wl %1, %2, %0\");" + [(set_attr "type" "dmpy_media")]) + + (define_expand "mmulsum_wq" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:V4HI 1 "arith_reg_operand" "") + (match_operand:V4HI 2 "arith_reg_operand" "") + (match_operand:DI 3 "arith_reg_operand" "")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_mmulsum_wq_i (operands[0], operands[3], + operands[1], operands[2])); + DONE; + }") + + (define_insn "mmulsum_wq_i" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (plus:DI (match_operand:DI 1 "arith_reg_operand" "0") + (plus:DI + (plus:DI + (vec_select:DI + (mult:V4DI + (sign_extend:V4DI (match_operand:V4HI 2 "arith_reg_operand" "r")) + (sign_extend:V4DI (match_operand:V4HI 3 "arith_reg_operand" "r"))) + (parallel [(const_int 0)])) + (vec_select:DI (mult:V4DI (sign_extend:V4DI (match_dup 2)) + (sign_extend:V4DI (match_dup 3))) + (parallel [(const_int 1)]))) + (plus:DI + (vec_select:DI (mult:V4DI (sign_extend:V4DI (match_dup 2)) + (sign_extend:V4DI (match_dup 3))) + (parallel [(const_int 2)])) + (vec_select:DI (mult:V4DI (sign_extend:V4DI (match_dup 2)) + (sign_extend:V4DI (match_dup 3))) + (parallel [(const_int 3)]))))))] + "TARGET_SHMEDIA" + "mmulsum.wq %2, %3, %0" + [(set_attr "type" "mac_media")]) + + (define_expand "mperm_w" + [(match_operand:V4HI 0 "arith_reg_dest" "=r") + (match_operand:V4HI 1 "arith_reg_operand" "r") + (match_operand:QI 2 "extend_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mperm_w_little : gen_mperm_w_big) + (operands[0], operands[1], operands[2])); + DONE; + }") + + ; This use of vec_select isn't exactly correct according to rtl.texi + ; (because not constant), but it seems a straightforward extension. + (define_insn "mperm_w_little" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (vec_select:V4HI + (match_operand:V4HI 1 "arith_reg_operand" "r") + (parallel + [(zero_extract:QI (match_operand:QI 2 "extend_reg_or_0_operand" "rU") + (const_int 2) (const_int 0)) + (zero_extract:QI (match_dup 2) (const_int 2) (const_int 2)) + (zero_extract:QI (match_dup 2) (const_int 2) (const_int 4)) + (zero_extract:QI (match_dup 2) (const_int 2) (const_int 6))])))] + "TARGET_SHMEDIA && TARGET_LITTLE_ENDIAN" + "mperm.w %1, %N2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "mperm_w_big" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (vec_select:V4HI + (match_operand:V4HI 1 "arith_reg_operand" "r") + (parallel + [(zero_extract:QI (not:QI (match_operand:QI 2 + "extend_reg_or_0_operand" "rU")) + (const_int 2) (const_int 0)) + (zero_extract:QI (not:QI (match_dup 2)) (const_int 2) (const_int 2)) + (zero_extract:QI (not:QI (match_dup 2)) (const_int 2) (const_int 4)) + (zero_extract:QI (not:QI (match_dup 2)) + (const_int 2) (const_int 6))])))] + "TARGET_SHMEDIA && ! TARGET_LITTLE_ENDIAN" + "mperm.w %1, %N2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "mperm_w0" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (vec_duplicate:V4HI (truncate:HI (match_operand 1 + "trunc_hi_operand" "r"))))] + "TARGET_SHMEDIA" + "mperm.w %1, r63, %0" + [(set_attr "type" "arith_media")]) + + (define_expand "msad_ubq" + [(match_operand:DI 0 "arith_reg_dest" "") + (match_operand:V8QI 1 "arith_reg_or_0_operand" "") + (match_operand:V8QI 2 "arith_reg_or_0_operand" "") + (match_operand:DI 3 "arith_reg_operand" "")] + "TARGET_SHMEDIA" + " + { + emit_insn (gen_msad_ubq_i (operands[0], operands[3], + operands[1], operands[2])); + DONE; + }") + + (define_insn "msad_ubq_i" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (plus:DI + (plus:DI + (plus:DI + (plus:DI + (match_operand:DI 1 "arith_reg_operand" "0") + (abs:DI (vec_select:DI + (minus:V8DI + (zero_extend:V8DI + (match_operand:V8QI 2 "arith_reg_or_0_operand" "r")) + (zero_extend:V8DI + (match_operand:V8QI 3 "arith_reg_or_0_operand" "r"))) + (parallel [(const_int 0)])))) + (abs:DI (vec_select:DI (minus:V8DI (zero_extend:V8DI (match_dup 2)) + (zero_extend:V8DI (match_dup 3))) + (parallel [(const_int 1)])))) + (plus:DI + (abs:DI (vec_select:DI (minus:V8DI (zero_extend:V8DI (match_dup 2)) + (zero_extend:V8DI (match_dup 3))) + (parallel [(const_int 2)]))) + (abs:DI (vec_select:DI (minus:V8DI (zero_extend:V8DI (match_dup 2)) + (zero_extend:V8DI (match_dup 3))) + (parallel [(const_int 3)]))))) + (plus:DI + (plus:DI + (abs:DI (vec_select:DI (minus:V8DI (zero_extend:V8DI (match_dup 2)) + (zero_extend:V8DI (match_dup 3))) + (parallel [(const_int 4)]))) + (abs:DI (vec_select:DI (minus:V8DI (zero_extend:V8DI (match_dup 2)) + (zero_extend:V8DI (match_dup 3))) + (parallel [(const_int 5)])))) + (plus:DI + (abs:DI (vec_select:DI (minus:V8DI (zero_extend:V8DI (match_dup 2)) + (zero_extend:V8DI (match_dup 3))) + (parallel [(const_int 6)]))) + (abs:DI (vec_select:DI (minus:V8DI (zero_extend:V8DI (match_dup 2)) + (zero_extend:V8DI (match_dup 3))) + (parallel [(const_int 7)])))))))] + "TARGET_SHMEDIA" + "msad.ubq %N2, %N3, %0" + [(set_attr "type" "mac_media")]) + + (define_insn "mshalds_l" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ss_truncate:V2SI + (ashift:V2DI + (sign_extend:V2DI (match_operand:V2SI 1 "arith_reg_operand" "r")) + (and:DI (match_operand:DI 2 "arith_reg_operand" "r") + (const_int 31)))))] + "TARGET_SHMEDIA" + "mshalds.l %1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "mshalds_w" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (ss_truncate:V4HI + (ashift:V4SI + (sign_extend:V4SI (match_operand:V4HI 1 "arith_reg_operand" "r")) + (and:DI (match_operand:DI 2 "arith_reg_operand" "r") + (const_int 15)))))] + "TARGET_SHMEDIA" + "mshalds.w %1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "ashrv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ashiftrt:V2SI (match_operand:V2SI 1 "arith_reg_operand" "r") + (match_operand:DI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mshard.l %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "ashrv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (ashiftrt:V4HI (match_operand:V4HI 1 "arith_reg_operand" "r") + (match_operand:DI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mshard.w %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "mshards_q" + [(set (match_operand:HI 0 "arith_reg_dest" "=r") + (ss_truncate:HI + (ashiftrt:DI (match_operand:DI 1 "arith_reg_operand" "r") + (match_operand:DI 2 "arith_reg_or_0_operand" "rU"))))] + "TARGET_SHMEDIA" + "mshards.q %1, %N2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_expand "mshfhi_b" + [(match_operand:V8QI 0 "arith_reg_dest" "") + (match_operand:V8QI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V8QI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mshf4_b : gen_mshf0_b) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_expand "mshflo_b" + [(match_operand:V8QI 0 "arith_reg_dest" "") + (match_operand:V8QI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V8QI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mshf0_b : gen_mshf4_b) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_insn "mshf4_b" + [(set + (match_operand:V8QI 0 "arith_reg_dest" "=r") + (vec_select:V8QI + (vec_concat:V16QI (match_operand:V8QI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V8QI 2 "arith_reg_or_0_operand" "rU")) + (parallel [(const_int 4) (const_int 12) (const_int 5) (const_int 13) + (const_int 6) (const_int 14) (const_int 7) (const_int 15)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mshfhi.b %N1, %N2, %0\" + : \"mshflo.b %N1, %N2, %0\");" + [(set_attr "type" "arith_media")]) + + (define_insn "mshf0_b" + [(set + (match_operand:V8QI 0 "arith_reg_dest" "=r") + (vec_select:V8QI + (vec_concat:V16QI (match_operand:V8QI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V8QI 2 "arith_reg_or_0_operand" "rU")) + (parallel [(const_int 0) (const_int 8) (const_int 1) (const_int 9) + (const_int 2) (const_int 10) (const_int 3) (const_int 11)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mshflo.b %N1, %N2, %0\" + : \"mshfhi.b %N1, %N2, %0\");" + [(set_attr "type" "arith_media")]) + + (define_expand "mshfhi_l" + [(match_operand:V2SI 0 "arith_reg_dest" "") + (match_operand:V2SI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V2SI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mshf4_l : gen_mshf0_l) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_expand "mshflo_l" + [(match_operand:V2SI 0 "arith_reg_dest" "") + (match_operand:V2SI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V2SI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mshf0_l : gen_mshf4_l) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_insn "mshf4_l" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (vec_select:V2SI + (vec_concat:V4SI (match_operand:V2SI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V2SI 2 "arith_reg_or_0_operand" "rU")) + (parallel [(const_int 1) (const_int 3)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mshfhi.l %N1, %N2, %0\" + : \"mshflo.l %N1, %N2, %0\");" + [(set_attr "type" "arith_media")]) + + (define_insn "mshf0_l" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (vec_select:V2SI + (vec_concat:V4SI (match_operand:V2SI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V2SI 2 "arith_reg_or_0_operand" "rU")) + (parallel [(const_int 0) (const_int 2)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mshflo.l %N1, %N2, %0\" + : \"mshfhi.l %N1, %N2, %0\");" + [(set_attr "type" "arith_media")]) + + (define_expand "mshfhi_w" + [(match_operand:V4HI 0 "arith_reg_dest" "") + (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mshf4_w : gen_mshf0_w) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_expand "mshflo_w" + [(match_operand:V4HI 0 "arith_reg_dest" "") + (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU")] + "TARGET_SHMEDIA" + " + { + emit_insn ((TARGET_LITTLE_ENDIAN ? gen_mshf0_w : gen_mshf4_w) + (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_insn "mshf4_w" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (vec_select:V4HI + (vec_concat:V8HI (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU")) + (parallel [(const_int 2) (const_int 6) (const_int 3) (const_int 7)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mshfhi.w %N1, %N2, %0\" + : \"mshflo.w %N1, %N2, %0\");" + [(set_attr "type" "arith_media")]) + + (define_insn "mshf0_w" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (vec_select:V4HI + (vec_concat:V8HI (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V4HI 2 "arith_reg_or_0_operand" "rU")) + (parallel [(const_int 0) (const_int 4) (const_int 1) (const_int 5)])))] + "TARGET_SHMEDIA" + "* return (TARGET_LITTLE_ENDIAN + ? \"mshflo.w %N1, %N2, %0\" + : \"mshfhi.w %N1, %N2, %0\");" + [(set_attr "type" "arith_media")]) + + (define_insn "mshflo_w_x" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (vec_select:V4HI + (vec_concat:V4HI (match_operand:V2HI 1 "extend_reg_or_0_operand" "rU") + (match_operand:V2HI 2 "extend_reg_or_0_operand" "rU")) + (parallel [(const_int 0) (const_int 2) (const_int 1) (const_int 3)])))] + "TARGET_SHMEDIA" + "mshflo.w %N1, %N2, %0" + [(set_attr "type" "arith_media")]) + + /* These are useful to expand ANDs and as combiner patterns. */ + (define_insn_and_split "mshfhi_l_di" + [(set (match_operand:DI 0 "arith_reg_dest" "=r,f") + (ior:DI (lshiftrt:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU,f") + (const_int 32)) + (and:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU,?f") + (const_int -4294967296))))] + "TARGET_SHMEDIA" + "@ + mshfhi.l %N1, %N2, %0 + #" + "TARGET_SHMEDIA && reload_completed + && ! GENERAL_REGISTER_P (true_regnum (operands[0]))" + [(set (match_dup 3) (match_dup 4)) + (set (match_dup 5) (match_dup 6))] + " + { + operands[3] = gen_lowpart (SImode, operands[0]); + operands[4] = gen_highpart (SImode, operands[1]); + operands[5] = gen_highpart (SImode, operands[0]); + operands[6] = gen_highpart (SImode, operands[2]); + }" + [(set_attr "type" "arith_media")]) + + (define_insn "*mshfhi_l_di_rev" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (and:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (const_int -4294967296)) + (lshiftrt:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU") + (const_int 32))))] + "TARGET_SHMEDIA" + "mshfhi.l %N2, %N1, %0" + [(set_attr "type" "arith_media")]) + + (define_split + [(set (match_operand:DI 0 "arith_reg_dest" "") + (ior:DI (zero_extend:DI (match_operand:SI 1 + "extend_reg_or_0_operand" "")) + (and:DI (match_operand:DI 2 "arith_reg_or_0_operand" "") + (const_int -4294967296)))) + (clobber (match_operand:DI 3 "arith_reg_dest" ""))] + "TARGET_SHMEDIA" + [(const_int 0)] + " + { + emit_insn (gen_ashldi3_media (operands[3], + simplify_gen_subreg (DImode, operands[1], + SImode, 0), + GEN_INT (32))); + emit_insn (gen_mshfhi_l_di (operands[0], operands[3], operands[2])); + DONE; + }") + + (define_insn "mshflo_l_di" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (and:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (const_int 4294967295)) + (ashift:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU") + (const_int 32))))] + + "TARGET_SHMEDIA" + "mshflo.l %N1, %N2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "*mshflo_l_di_rev" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (ashift:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (const_int 32)) + (and:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU") + (const_int 4294967295))))] + + "TARGET_SHMEDIA" + "mshflo.l %N2, %N1, %0" + [(set_attr "type" "arith_media")]) + + ;; Combiner pattern for trampoline initialization. + (define_insn_and_split "*double_shori" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (ashift:DI (match_operand:DI 1 "arith_reg_operand" "0") + (const_int 32)) + (match_operand:DI 2 "const_int_operand" "n")))] + "TARGET_SHMEDIA + && INTVAL (operands[2]) == trunc_int_for_mode (INTVAL (operands[2]), SImode)" + "#" + "rtx_equal_p (operands[0], operands[1])" + [(const_int 0)] + " + { + HOST_WIDE_INT v = INTVAL (operands[2]); + + emit_insn (gen_shori_media (operands[0], operands[0], + gen_int_mode (INTVAL (operands[2]) >> 16, HImode))); + emit_insn (gen_shori_media (operands[0], operands[0], + gen_int_mode (v, HImode))); + DONE; + }") + + + (define_insn "*mshflo_l_di_x" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (zero_extend:DI (match_operand:SI 1 "extend_reg_or_0_operand" + "rU")) + (ashift:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU") + (const_int 32))))] + + "TARGET_SHMEDIA" + "mshflo.l %N1, %N2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn_and_split "concat_v2sf" + [(set (match_operand:V2SF 0 "register_operand" "=r,f,f?") + ;; (vec_concat:V2SF (match_operand:SF 1 "register_operand" "rU,0,f") + (vec_concat:V2SF (match_operand:SF 1 "register_operand" "rU,f,f") + (match_operand:SF 2 "register_operand" "rU,f,f")))] + + "TARGET_SHMEDIA" + "@ + mshflo.l %N1, %N2, %0 + # + #" + "TARGET_SHMEDIA && reload_completed + && ! GENERAL_REGISTER_P (true_regnum (operands[0]))" + [(set (match_dup 3) (match_dup 1)) + (set (match_dup 4) (match_dup 2))] + " + { + operands[3] = simplify_gen_subreg (SFmode, operands[0], V2SFmode, 0); + operands[4] = simplify_gen_subreg (SFmode, operands[0], V2SFmode, 4); + }" + [(set_attr "type" "arith_media")]) + + (define_insn "*mshflo_l_di_x_rev" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (ior:DI (ashift:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU") + (const_int 32)) + (zero_extend:DI (match_operand:SI 2 "extend_reg_or_0_operand" "rU"))))] + + "TARGET_SHMEDIA" + "mshflo.l %N2, %N1, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "ashlv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ashift:V2SI (match_operand:V2SI 1 "arith_reg_operand" "r") + (match_operand:DI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mshlld.l %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "ashlv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (ashift:V4HI (match_operand:V4HI 1 "arith_reg_operand" "r") + (match_operand:DI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mshlld.w %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "lshrv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (lshiftrt:V2SI (match_operand:V2SI 1 "arith_reg_operand" "r") + (match_operand:DI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mshlrd.l %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "lshrv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (lshiftrt:V4HI (match_operand:V4HI 1 "arith_reg_operand" "r") + (match_operand:DI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "mshlrd.w %1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "subv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (minus:V2SI (match_operand:V2SI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V2SI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "msub.l %N1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "subv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (minus:V4HI (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V4HI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "msub.w %N1, %2, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "sssubv2si3" + [(set (match_operand:V2SI 0 "arith_reg_dest" "=r") + (ss_minus:V2SI (match_operand:V2SI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V2SI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "msubs.l %N1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "ussubv8qi3" + [(set (match_operand:V8QI 0 "arith_reg_dest" "=r") + (us_minus:V8QI (match_operand:V8QI 1 "arith_reg_operand" "r") + (match_operand:V8QI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "msubs.ub %1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + (define_insn "sssubv4hi3" + [(set (match_operand:V4HI 0 "arith_reg_dest" "=r") + (ss_minus:V4HI (match_operand:V4HI 1 "arith_reg_or_0_operand" "rU") + (match_operand:V4HI 2 "arith_reg_operand" "r")))] + "TARGET_SHMEDIA" + "msubs.w %N1, %2, %0" + [(set_attr "type" "mcmp_media")]) + + ;; Floating Point Intrinsics + + (define_insn "fcosa_s" + [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") + (unspec:SF [(match_operand:SI 1 "fp_arith_reg_operand" "f")] + UNSPEC_FCOSA))] + "TARGET_SHMEDIA" + "fcosa.s %1, %0" + [(set_attr "type" "atrans_media")]) + + (define_insn "fsina_s" + [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") + (unspec:SF [(match_operand:SI 1 "fp_arith_reg_operand" "f")] + UNSPEC_FSINA))] + "TARGET_SHMEDIA" + "fsina.s %1, %0" + [(set_attr "type" "atrans_media")]) + + (define_insn "fipr" + [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") + (plus:SF (plus:SF (vec_select:SF (mult:V4SF (match_operand:V4SF 1 + "fp_arith_reg_operand" "f") + (match_operand:V4SF 2 + "fp_arith_reg_operand" "f")) + (parallel [(const_int 0)])) + (vec_select:SF (mult:V4SF (match_dup 1) (match_dup 2)) + (parallel [(const_int 1)]))) + (plus:SF (vec_select:SF (mult:V4SF (match_dup 1) (match_dup 2)) + (parallel [(const_int 2)])) + (vec_select:SF (mult:V4SF (match_dup 1) (match_dup 2)) + (parallel [(const_int 3)])))))] + "TARGET_SHMEDIA" + "fipr %1, %2, %0" + [(set_attr "type" "fparith_media")]) + + (define_insn "fsrra_s" + [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") + (unspec:SF [(match_operand:SF 1 "fp_arith_reg_operand" "f")] + UNSPEC_FSRRA))] + "TARGET_SHMEDIA" + "fsrra.s %1, %0" + [(set_attr "type" "atrans_media")]) + + (define_insn "ftrv" + [(set (match_operand:V4SF 0 "fp_arith_reg_operand" "=f") + (plus:V4SF + (plus:V4SF + (mult:V4SF + (vec_select:V4SF (match_operand:V16SF 1 "fp_arith_reg_operand" "f") + (parallel [(const_int 0) (const_int 5) + (const_int 10) (const_int 15)])) + (match_operand:V4SF 2 "fp_arith_reg_operand" "f")) + (mult:V4SF + (vec_select:V4SF (match_dup 1) + (parallel [(const_int 4) (const_int 9) + (const_int 14) (const_int 3)])) + (vec_select:V4SF (match_dup 2) + (parallel [(const_int 1) (const_int 2) + (const_int 3) (const_int 0)])))) + (plus:V4SF + (mult:V4SF + (vec_select:V4SF (match_dup 1) + (parallel [(const_int 8) (const_int 13) + (const_int 2) (const_int 7)])) + (vec_select:V4SF (match_dup 2) + (parallel [(const_int 2) (const_int 3) + (const_int 0) (const_int 1)]))) + (mult:V4SF + (vec_select:V4SF (match_dup 1) + (parallel [(const_int 12) (const_int 1) + (const_int 6) (const_int 11)])) + (vec_select:V4SF (match_dup 2) + (parallel [(const_int 3) (const_int 0) + (const_int 1) (const_int 2)]))))))] + "TARGET_SHMEDIA" + "ftrv %1, %2, %0" + [(set_attr "type" "fparith_media")]) + + (define_insn "nsb" + [(set (match_operand:QI 0 "arith_reg_dest" "=r") + (unspec:QI [(match_operand:DI 1 "arith_reg_operand" "r")] + UNSPEC_NSB))] + "TARGET_SHMEDIA" + "nsb %1, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "nsbsi" + [(set (match_operand:SI 0 "arith_reg_dest" "=r") + (zero_extend:SI + (unspec:QI [(match_operand:DI 1 "arith_reg_operand" "r")] + UNSPEC_NSB)))] + "TARGET_SHMEDIA" + "nsb %1, %0" + [(set_attr "type" "arith_media")]) + + (define_insn "nsbdi" + [(set (match_operand:DI 0 "arith_reg_dest" "=r") + (zero_extend:DI + (unspec:QI [(match_operand:DI 1 "arith_reg_operand" "r")] + UNSPEC_NSB)))] + "TARGET_SHMEDIA" + "nsb %1, %0" + [(set_attr "type" "arith_media")]) + + (define_expand "ffsdi2" + [(set (match_operand:DI 0 "arith_reg_dest" "") + (ffs:DI (match_operand:DI 1 "arith_reg_operand" "")))] + "TARGET_SHMEDIA" + " + { + rtx scratch = gen_reg_rtx (DImode); + rtx last; + + emit_insn (gen_adddi3 (scratch, operands[1], GEN_INT (-1))); + emit_insn (gen_xordi3 (scratch, operands[1], scratch)); + emit_insn (gen_lshrdi3_media (scratch, scratch, const1_rtx)); + emit_insn (gen_nsbdi (scratch, scratch)); + emit_insn (gen_adddi3 (scratch, scratch, GEN_INT (-64))); + emit_insn (gen_movdicc_false (scratch, operands[1], const0_rtx, scratch)); + last = emit_insn (gen_subdi3 (operands[0], const0_rtx, scratch)); + REG_NOTES (last) + = gen_rtx_EXPR_LIST (REG_EQUAL, + gen_rtx_FFS (DImode, operands[0]), REG_NOTES (last)); + DONE; + }") + + (define_expand "ffssi2" + [(set (match_operand:SI 0 "arith_reg_dest" "") + (ffs:SI (match_operand:SI 1 "arith_reg_operand" "")))] + "TARGET_SHMEDIA" + " + { + rtx scratch = gen_reg_rtx (SImode); + rtx discratch = gen_reg_rtx (DImode); + rtx last; + + emit_insn (gen_adddi3 (discratch, + simplify_gen_subreg (DImode, operands[1], SImode, 0), + GEN_INT (-1))); + emit_insn (gen_andcdi3 (discratch, + simplify_gen_subreg (DImode, operands[1], SImode, 0), + discratch)); + emit_insn (gen_nsbsi (scratch, discratch)); + last = emit_insn (gen_subsi3 (operands[0], + force_reg (SImode, GEN_INT (63)), scratch)); + REG_NOTES (last) + = gen_rtx_EXPR_LIST (REG_EQUAL, + gen_rtx_FFS (SImode, operands[0]), REG_NOTES (last)); + DONE; + }") + + (define_insn "byterev" + [(set (match_operand:V8QI 0 "arith_reg_dest" "=r") + (vec_select:V8QI (match_operand:V8QI 1 "arith_reg_operand" "r") + (parallel [(const_int 7) (const_int 6) (const_int 5) + (const_int 4) (const_int 3) (const_int 2) + (const_int 1) (const_int 0)])))] + "TARGET_SHMEDIA" + "byterev %1, %0" + [(set_attr "type" "arith_media")]) + + ;; The following description models the + ;; SH4 pipeline using the DFA based scheduler. + ;; The DFA based description is better way to model + ;; a superscalar pipeline as compared to function unit + ;; reservation model. + ;; 1. The function unit based model is oriented to describe at most one + ;; unit reservation by each insn. It is difficult to model unit reservations in multiple + ;; pipeline units by same insn. This can be done using DFA based description. + ;; 2. The execution performance of DFA based scheduler does not depend on processor complexity. + ;; 3. Writing all unit reservations for an instruction class is more natural description + ;; of the pipeline and makes interface of the hazard recognizer simpler than the + ;; old function unit based model. + ;; 4. The DFA model is richer and is a part of greater overall framework of RCSP. + + + ;; Two automata are defined to reduce number of states + ;; which a single large automaton will have.(Factoring) + + (define_automaton "inst_pipeline,fpu_pipe") + + ;; This unit is basically the decode unit of the processor. + ;; Since SH4 is a dual issue machine,it is as if there are two + ;; units so that any insn can be processed by either one + ;; of the decoding unit. + + (define_cpu_unit "pipe_01,pipe_02" "inst_pipeline") + + + ;; The fixed point arithmetic calculator(?? EX Unit). + + (define_cpu_unit "int" "inst_pipeline") + + ;; f1_1 and f1_2 are floating point units.Actually there is + ;; a f1 unit which can overlap with other f1 unit but + ;; not another F1 unit.It is as though there were two + ;; f1 units. + + (define_cpu_unit "f1_1,f1_2" "fpu_pipe") + + ;; The floating point units (except FS - F2 always precedes it.) + + (define_cpu_unit "F0,F1,F2,F3" "fpu_pipe") + + ;; This is basically the MA unit of SH4 + ;; used in LOAD/STORE pipeline. + + (define_cpu_unit "memory" "inst_pipeline") + + ;; However, there are LS group insns that don't use it, even ones that + ;; complete in 0 cycles. So we use an extra unit for the issue of LS insns. + (define_cpu_unit "load_store" "inst_pipeline") + + ;; The address calculator used for branch instructions. + ;; This will be reserved after "issue" of branch instructions + ;; and this is to make sure that no two branch instructions + ;; can be issued in parallel. + + (define_cpu_unit "pcr_addrcalc" "inst_pipeline") + + ;; ---------------------------------------------------- + ;; This reservation is to simplify the dual issue description. + + (define_reservation "issue" "pipe_01|pipe_02") + + ;; This is to express the locking of D stage. + ;; Note that the issue of a CO group insn also effectively locks the D stage. + + (define_reservation "d_lock" "pipe_01+pipe_02") + + ;; Every FE instruction but fipr / ftrv starts with issue and this. + (define_reservation "F01" "F0+F1") + + ;; This is to simplify description where F1,F2,FS + ;; are used simultaneously. + + (define_reservation "fpu" "F1+F2") + + ;; This is to highlight the fact that f1 + ;; cannot overlap with F1. + + (exclusion_set "f1_1,f1_2" "F1") + + (define_insn_reservation "nil" 0 (eq_attr "type" "nil") "nothing") + + ;; Although reg moves have a latency of zero + ;; we need to highlight that they use D stage + ;; for one cycle. + + ;; Group: MT + + (define_insn_reservation "reg_mov" 0 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "move")) + "issue") + + ;; Group: LS + + (define_insn_reservation "freg_mov" 0 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "fmove")) + "issue+load_store") + + ;; We don't model all pipeline stages; we model the issue ('D') stage + ;; inasmuch as we allow only two instructions to issue simultanously, + ;; and CO instructions prevent any simultanous issue of another instruction. + ;; (This uses pipe_01 and pipe_02). + ;; Double issue of EX insns is prevented by using the int unit in the EX stage. + ;; Double issue of EX / BR insns is prevented by using the int unit / + ;; pcr_addrcalc unit in the EX stage. + ;; Double issue of BR / LS instructions is prevented by using the + ;; pcr_addrcalc / load_store unit in the issue cycle. + ;; Double issue of FE instructions is prevented by using F0 in the first + ;; pipeline stage after the first D stage. + ;; There is no need to describe the [ES]X / [MN]A / S stages after a D stage + ;; (except in the cases outlined above), nor to describe the FS stage after + ;; the F2 stage. + + ;; Other MT group intructions(1 step operations) + ;; Group: MT + ;; Latency: 1 + ;; Issue Rate: 1 + + (define_insn_reservation "mt" 1 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "mt_group")) + "issue") + + ;; Fixed Point Arithmetic Instructions(1 step operations) + ;; Group: EX + ;; Latency: 1 + ;; Issue Rate: 1 + + (define_insn_reservation "sh4_simple_arith" 1 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "insn_class" "ex_group")) + "issue,int") + + ;; Load and store instructions have no alignment peculiarities for the SH4, + ;; but they use the load-store unit, which they share with the fmove type + ;; insns (fldi[01]; fmov frn,frm; flds; fsts; fabs; fneg) . + ;; Loads have a latency of two. + ;; However, call insns can only paired with a preceding insn, and have + ;; a delay slot, so that we want two more insns to be scheduled between the + ;; load of the function address and the call. This is equivalent to a + ;; latency of three. + ;; ADJUST_COST can only properly handle reductions of the cost, so we + ;; use a latency of three here, which gets multiplied by 10 to yield 30. + ;; We only do this for SImode loads of general registers, to make the work + ;; for ADJUST_COST easier. + + ;; Load Store instructions. (MOV.[BWL]@(d,GBR) + ;; Group: LS + ;; Latency: 2 + ;; Issue Rate: 1 + + (define_insn_reservation "sh4_load" 2 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "load,pcload")) + "issue+load_store,nothing,memory") + + ;; calls / sfuncs need an extra instruction for their delay slot. + ;; Moreover, estimating the latency for SImode loads as 3 will also allow + ;; adjust_cost to meaningfully bump it back up to 3 if they load the shift + ;; count of a dynamic shift. + (define_insn_reservation "sh4_load_si" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "load_si,pcload_si")) + "issue+load_store,nothing,memory") + + ;; (define_bypass 2 "sh4_load_si" "!sh4_call") + + ;; The load latency is upped to three higher if the dependent insn does + ;; double precision computation. We want the 'default' latency to reflect + ;; that increased latency because otherwise the insn priorities won't + ;; allow proper scheduling. + (define_insn_reservation "sh4_fload" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "fload,pcfload")) + "issue+load_store,nothing,memory") + + ;; (define_bypass 2 "sh4_fload" "!") + + (define_insn_reservation "sh4_store" 1 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "store")) + "issue+load_store,nothing,memory") + + ;; Load Store instructions. + ;; Group: LS + ;; Latency: 1 + ;; Issue Rate: 1 + + (define_insn_reservation "sh4_gp_fpul" 1 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "gp_fpul")) + "issue+load_store") + + ;; Load Store instructions. + ;; Group: LS + ;; Latency: 3 + ;; Issue Rate: 1 + + (define_insn_reservation "sh4_fpul_gp" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "fpul_gp")) + "issue+load_store") + + ;; Branch (BF,BF/S,BT,BT/S,BRA) + ;; Group: BR + ;; Latency when taken: 2 (or 1) + ;; Issue Rate: 1 + ;; The latency is 1 when displacement is 0. + ;; We can't really do much with the latency, even if we could express it, + ;; but the pairing restrictions are useful to take into account. + ;; ??? If the branch is likely, we might want to fill the delay slot; + ;; if the branch is likely, but not very likely, should we pretend to use + ;; a resource that CO instructions use, to get a pairable delay slot insn? + + (define_insn_reservation "sh4_branch" 1 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "cbranch,jump")) + "issue+pcr_addrcalc") + + ;; Branch Far (JMP,RTS,BRAF) + ;; Group: CO + ;; Latency: 3 + ;; Issue Rate: 2 + ;; ??? Scheduling happens before branch shortening, and hence jmp and braf + ;; can't be distinguished from bra for the "jump" pattern. + + (define_insn_reservation "sh4_return" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "return,jump_ind")) + "d_lock*2") + + ;; RTE + ;; Group: CO + ;; Latency: 5 + ;; Issue Rate: 5 + ;; this instruction can be executed in any of the pipelines + ;; and blocks the pipeline for next 4 stages. + + (define_insn_reservation "sh4_return_from_exp" 5 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "rte")) + "d_lock*5") + + ;; OCBP, OCBWB + ;; Group: CO + ;; Latency: 1-5 + ;; Issue Rate: 1 + + ;; cwb is used for the sequence ocbwb @%0; extu.w %0,%2; or %1,%2; mov.l %0,@%2 + ;; ocbwb on its own would be "d_lock,nothing,memory*5" + (define_insn_reservation "ocbwb" 6 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "cwb")) + "d_lock*2,(d_lock+memory)*3,issue+load_store+memory,memory*2") + + ;; LDS to PR,JSR + ;; Group: CO + ;; Latency: 3 + ;; Issue Rate: 2 + ;; The SX stage is blocked for last 2 cycles. + ;; OTOH, the only time that has an effect for insns generated by the compiler + ;; is when lds to PR is followed by sts from PR - and that is highly unlikely - + ;; or when we are doing a function call - and we don't do inter-function + ;; scheduling. For the function call case, it's really best that we end with + ;; something that models an rts. + + (define_insn_reservation "sh4_lds_to_pr" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "prset") ) + "d_lock*2") + + ;; calls introduce a longisch delay that is likely to flush the pipelines + ;; of the caller's instructions. Ordinary functions tend to end with a + ;; load to restore a register (in the delay slot of rts), while sfuncs + ;; tend to end with an EX or MT insn. But that is not actually relevant, + ;; since there are no instructions that contend for memory access early. + ;; We could, of course, provide exact scheduling information for specific + ;; sfuncs, if that should prove useful. + + (define_insn_reservation "sh4_call" 16 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "call,sfunc")) + "d_lock*16") + + ;; LDS.L to PR + ;; Group: CO + ;; Latency: 3 + ;; Issue Rate: 2 + ;; The SX unit is blocked for last 2 cycles. + + (define_insn_reservation "ldsmem_to_pr" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "pload")) + "d_lock*2") + + ;; STS from PR + ;; Group: CO + ;; Latency: 2 + ;; Issue Rate: 2 + ;; The SX unit in second and third cycles. + + (define_insn_reservation "sts_from_pr" 2 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "prget")) + "d_lock*2") + + ;; STS.L from PR + ;; Group: CO + ;; Latency: 2 + ;; Issue Rate: 2 + + (define_insn_reservation "sh4_prstore_mem" 2 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "pstore")) + "d_lock*2,nothing,memory") + + ;; LDS to FPSCR + ;; Group: CO + ;; Latency: 4 + ;; Issue Rate: 1 + ;; F1 is blocked for last three cycles. + + (define_insn_reservation "fpscr_load" 4 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "gp_fpscr")) + "d_lock,nothing,F1*3") + + ;; LDS.L to FPSCR + ;; Group: CO + ;; Latency: 1 / 4 + ;; Latency to update Rn is 1 and latency to update FPSCR is 4 + ;; Issue Rate: 1 + ;; F1 is blocked for last three cycles. + + (define_insn_reservation "fpscr_load_mem" 4 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "mem_fpscr")) + "d_lock,nothing,(F1+memory),F1*2") + + + ;; Fixed point multiplication (DMULS.L DMULU.L MUL.L MULS.W,MULU.W) + ;; Group: CO + ;; Latency: 4 / 4 + ;; Issue Rate: 1 + + (define_insn_reservation "multi" 4 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "smpy,dmpy")) + "d_lock,(d_lock+f1_1),(f1_1|f1_2)*3,F2") + + ;; Fixed STS from MACL / MACH + ;; Group: CO + ;; Latency: 3 + ;; Issue Rate: 1 + + (define_insn_reservation "sh4_mac_gp" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "mac_gp")) + "d_lock") + + + ;; Single precision floating point computation FCMP/EQ, + ;; FCMP/GT, FADD, FLOAT, FMAC, FMUL, FSUB, FTRC, FRVHG, FSCHG + ;; Group: FE + ;; Latency: 3/4 + ;; Issue Rate: 1 + + (define_insn_reservation "fp_arith" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "fp")) + "issue,F01,F2") + + (define_insn_reservation "fp_arith_ftrc" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "ftrc_s")) + "issue,F01,F2") + + (define_bypass 1 "fp_arith_ftrc" "sh4_fpul_gp") + + ;; Single Precision FDIV/SQRT + ;; Group: FE + ;; Latency: 12/13 (FDIV); 11/12 (FSQRT) + ;; Issue Rate: 1 + ;; We describe fdiv here; fsqrt is actually one cycle faster. + + (define_insn_reservation "fp_div" 12 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "fdiv")) + "issue,F01+F3,F2+F3,F3*7,F1+F3,F2") + + ;; Double Precision floating point computation + ;; (FCNVDS, FCNVSD, FLOAT, FTRC) + ;; Group: FE + ;; Latency: (3,4)/5 + ;; Issue Rate: 1 + + (define_insn_reservation "dp_float" 4 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "dfp_conv")) + "issue,F01,F1+F2,F2") + + ;; Double-precision floating-point (FADD,FMUL,FSUB) + ;; Group: FE + ;; Latency: (7,8)/9 + ;; Issue Rate: 1 + + (define_insn_reservation "fp_double_arith" 8 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "dfp_arith")) + "issue,F01,F1+F2,fpu*4,F2") + + ;; Double-precision FCMP (FCMP/EQ,FCMP/GT) + ;; Group: CO + ;; Latency: 3/5 + ;; Issue Rate: 2 + + (define_insn_reservation "fp_double_cmp" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "dfp_cmp")) + "d_lock,(d_lock+F01),F1+F2,F2") + + ;; Double precision FDIV/SQRT + ;; Group: FE + ;; Latency: (24,25)/26 + ;; Issue Rate: 1 + + (define_insn_reservation "dp_div" 25 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "dfdiv")) + "issue,F01+F3,F1+F2+F3,F2+F3,F3*16,F1+F3,(fpu+F3)*2,F2") + + + ;; Use the branch-not-taken case to model arith3 insns. For the branch taken + ;; case, we'd get a d_lock instead of issue at the end. + (define_insn_reservation "arith3" 3 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "arith3")) + "issue,d_lock+pcr_addrcalc,issue") + + ;; arith3b insns schedule the same no matter if the branch is taken or not. + (define_insn_reservation "arith3b" 2 + (and (eq_attr "pipe_model" "sh4") + (eq_attr "type" "arith3")) + "issue,d_lock+pcr_addrcalc") diff -Nrc3pad gcc-3.2.3/gcc/config/sh/sh-protos.h gcc-3.3/gcc/config/sh/sh-protos.h *** gcc-3.2.3/gcc/config/sh/sh-protos.h 2002-02-21 16:42:28.000000000 +0000 --- gcc-3.3/gcc/config/sh/sh-protos.h 2003-01-31 23:51:23.000000000 +0000 *************** *** 1,4 **** ! /* Definitions of target machine for GNU compiler for Hitachi / SuperH SH Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com). --- 1,4 ---- ! /* Definitions of target machine for GNU compiler for Hitachi / SuperH SH. Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com). *************** extern int fpscr_operand PARAMS ((rtx, e *** 92,98 **** extern int fpul_operand PARAMS ((rtx, enum machine_mode)); extern int commutative_float_operator PARAMS ((rtx, enum machine_mode)); extern int noncommutative_float_operator PARAMS ((rtx, enum machine_mode)); - extern int binary_float_operator PARAMS ((rtx, enum machine_mode)); extern int reg_unused_after PARAMS ((rtx, rtx)); extern void expand_sf_unop PARAMS ((rtx (*)(rtx, rtx, rtx), rtx *)); extern void expand_sf_binop PARAMS ((rtx (*)(rtx, rtx, rtx, rtx), rtx *)); --- 92,97 ---- *************** extern void expand_df_binop PARAMS ((rtx *** 101,108 **** extern void expand_fp_branch PARAMS ((rtx (*)(void), rtx (*)(void))); extern int sh_insn_length_adjustment PARAMS ((rtx)); extern int sh_can_redirect_branch PARAMS ((rtx, rtx)); #ifdef TREE_CODE ! extern void sh_va_start PARAMS ((int, tree, rtx)); extern rtx sh_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ #endif /* RTX_CODE */ --- 100,109 ---- extern void expand_fp_branch PARAMS ((rtx (*)(void), rtx (*)(void))); extern int sh_insn_length_adjustment PARAMS ((rtx)); extern int sh_can_redirect_branch PARAMS ((rtx, rtx)); + extern void sh_expand_unop_v2sf PARAMS ((enum rtx_code, rtx, rtx)); + extern void sh_expand_binop_v2sf PARAMS ((enum rtx_code, rtx, rtx, rtx)); #ifdef TREE_CODE ! extern void sh_va_start PARAMS ((tree, rtx)); extern rtx sh_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ #endif /* RTX_CODE */ *************** extern int sh_need_epilogue PARAMS ((voi *** 122,127 **** --- 123,136 ---- extern int initial_elimination_offset PARAMS ((int, int)); extern int fldi_ok PARAMS ((void)); extern int sh_pr_n_sets PARAMS ((void)); + extern int sh_hard_regno_rename_ok PARAMS ((unsigned int, unsigned int)); + extern int sh_cfun_interrupt_handler_p PARAMS ((void)); + extern void sh_initialize_trampoline PARAMS ((rtx, rtx, rtx)); + extern bool sh_cannot_change_mode_class + PARAMS ((enum machine_mode, enum machine_mode, enum reg_class)); + extern void sh_mark_label PARAMS ((rtx, int)); + extern int sh_register_move_cost + PARAMS ((enum machine_mode mode, enum reg_class, enum reg_class)); #ifdef HARD_CONST extern void fpscr_set_from_mem PARAMS ((int, HARD_REG_SET)); diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-be gcc-3.3/gcc/config/sh/t-be *** gcc-3.2.3/gcc/config/sh/t-be 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-be 2002-06-05 19:52:05.000000000 +0000 *************** *** 0 **** --- 1,2 ---- + MULTILIB_OPTIONS= ml + MULTILIB_ENDIAN = ml diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-le gcc-3.3/gcc/config/sh/t-le *** gcc-3.2.3/gcc/config/sh/t-le 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-le 2002-06-05 19:52:06.000000000 +0000 *************** *** 0 **** --- 1,2 ---- + MULTILIB_OPTIONS= mb + MULTILIB_ENDIAN = mb diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-linux gcc-3.3/gcc/config/sh/t-linux *** gcc-3.2.3/gcc/config/sh/t-linux 2001-05-17 03:16:12.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-linux 2002-06-18 19:56:53.000000000 +0000 *************** *** 1,10 **** TARGET_LIBGCC2_CFLAGS = -fpic ! LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \ ! _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ ! _ic_invalidate ! MULTILIB_OPTIONS= mb m3e/m4 MULTILIB_DIRNAMES= MULTILIB_MATCHES = EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o --- 1,11 ---- TARGET_LIBGCC2_CFLAGS = -fpic ! LIB1ASMFUNCS_CACHE = _ic_invalidate ! LIB2FUNCS_EXTRA= ! ! MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4 MULTILIB_DIRNAMES= MULTILIB_MATCHES = + MULTILIB_EXCEPTIONS= EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-monolib gcc-3.3/gcc/config/sh/t-monolib *** gcc-3.2.3/gcc/config/sh/t-monolib 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-monolib 2002-06-13 19:23:28.000000000 +0000 *************** *** 0 **** --- 1 ---- + MULTILIB_OPTIONS= diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-netbsd gcc-3.3/gcc/config/sh/t-netbsd *** gcc-3.2.3/gcc/config/sh/t-netbsd 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-netbsd 2002-06-18 19:56:54.000000000 +0000 *************** *** 0 **** --- 1,18 ---- + TARGET_LIBGCC2_CFLAGS = -fpic + LIB1ASMFUNCS_CACHE = _ic_invalidate + + LIB2FUNCS_EXTRA= + + EXTRA_MULTILIB_PARTS= + + # NetBSD's C library includes a fast software FP library that + # has support for setting/setting the rounding mode, exception + # mask, etc. Therefore, we don't want to include software FP + # in libgcc. + FPBIT = + DPBIT = + + MULTILIB_OPTIONS += m3e/m4 + MULTILIB_DIRNAMES= + MULTILIB_MATCHES = + MULTILIB_EXCEPTIONS= diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-netbsd-sh5 gcc-3.3/gcc/config/sh/t-netbsd-sh5 *** gcc-3.2.3/gcc/config/sh/t-netbsd-sh5 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-netbsd-sh5 2002-06-07 00:58:44.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + TARGET_LIBGCC2_CFLAGS = -fpic + + LIB2FUNCS_EXTRA= + + EXTRA_MULTILIB_PARTS= + + # NetBSD's C library includes a fast software FP library that + # has support for setting/setting the rounding mode, exception + # mask, etc. Therefore, we don't want to include software FP + # in libgcc. + FPBIT = + DPBIT = diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-netbsd-sh5-64 gcc-3.3/gcc/config/sh/t-netbsd-sh5-64 *** gcc-3.2.3/gcc/config/sh/t-netbsd-sh5-64 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-netbsd-sh5-64 2002-06-07 00:58:44.000000000 +0000 *************** *** 0 **** --- 1,3 ---- + MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-64media-nofpu/m5-compact/m5-compact-nofpu/m5-32media/m5-32media-nofpu + MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media32 nofpu/media32 + MULTILIB_MATCHES = diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-sh gcc-3.3/gcc/config/sh/t-sh *** gcc-3.2.3/gcc/config/sh/t-sh 2001-05-17 03:16:12.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-sh 2002-06-18 19:56:54.000000000 +0000 *************** *** 1,6 **** LIB1ASMSRC = sh/lib1funcs.asm LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \ ! _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. --- 1,16 ---- LIB1ASMSRC = sh/lib1funcs.asm LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \ ! _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ ! $(LIB1ASMFUNCS_CACHE) ! ! LIB2FUNCS_EXTRA=embed-bb.c ! ! embed-bb.c: $(srcdir)/libgcc2.c ! echo '#ifdef inhibit_libc' > $@ ! echo '#define L_bb' >> $@ ! echo '#undef inhibit_libc' >> $@ ! cat $< >> $@ ! echo '#endif' >> $@ # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. *************** fp-bit.c: $(srcdir)/config/fp-bit.c *** 20,28 **** echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c ! MULTILIB_OPTIONS= ml m2/m3e/m4-single-only/m4-single/m4 MULTILIB_DIRNAMES= MULTILIB_MATCHES = m2=m3 m2=m4-nofpu LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib --- 30,40 ---- echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c ! MULTILIB_ENDIAN = ml ! MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m2/m3e/m4-single-only/m4-single/m4 MULTILIB_DIRNAMES= MULTILIB_MATCHES = m2=m3 m2=m4-nofpu + MULTILIB_EXCEPTIONS = ml LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib *************** $(T)crti.o: $(srcdir)/config/sh/crti.asm *** 34,38 **** --- 46,53 ---- $(T)crtn.o: $(srcdir)/config/sh/crtn.asm $(GCC_PASSES) $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/sh/crtn.asm + $(out_object_file): gt-sh.h + gt-sh.h : s-gtype ; @true + # These are not suitable for COFF. # EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o diff -Nrc3pad gcc-3.2.3/gcc/config/sh/t-sh64 gcc-3.3/gcc/config/sh/t-sh64 *** gcc-3.2.3/gcc/config/sh/t-sh64 2002-02-09 03:08:07.000000000 +0000 --- gcc-3.3/gcc/config/sh/t-sh64 2002-06-24 20:08:17.000000000 +0000 *************** LIB1ASMFUNCS = \ *** 4,11 **** _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ _shcompact_call_trampoline _shcompact_return_trampoline \ _shcompact_incoming_args _ic_invalidate _nested_trampoline \ ! _push_pop_shmedia_regs ! MULTILIB_OPTIONS= ml m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu ! MULTILIB_DIRNAMES= ml nofpu compact nofpu/compact media64 nofpu/media64 MULTILIB_MATCHES= --- 4,13 ---- _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ _shcompact_call_trampoline _shcompact_return_trampoline \ _shcompact_incoming_args _ic_invalidate _nested_trampoline \ ! _push_pop_shmedia_regs \ ! _udivdi3 _divdi3 _umoddi3 _moddi3 ! MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu ! MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64 MULTILIB_MATCHES= + MULTILIB_EXCEPTIONS= diff -Nrc3pad gcc-3.2.3/gcc/config/sol2.h gcc-3.3/gcc/config/sol2.h *** gcc-3.2.3/gcc/config/sol2.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sol2.h 2002-06-20 11:03:37.000000000 +0000 *************** *** 0 **** --- 1,207 ---- + /* Operating system specific defines to be used when targeting GCC for any + Solaris 2 system. + Copyright 2002 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* We use stabs-in-elf for debugging, because that is what the native + toolchain uses. */ + #undef PREFERRED_DEBUGGING_TYPE + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + + /* Solaris 2 (at least as of 2.5.1) uses a 32-bit wchar_t. */ + #undef WCHAR_TYPE + #define WCHAR_TYPE "long int" + + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE BITS_PER_WORD + + /* Solaris 2 uses a wint_t different from the default. This is required + by the SCD 2.4.1, p. 6-83, Figure 6-66. */ + #undef WINT_TYPE + #define WINT_TYPE "long int" + + #undef WINT_TYPE_SIZE + #define WINT_TYPE_SIZE BITS_PER_WORD + + #define HANDLE_PRAGMA_REDEFINE_EXTNAME 1 + + /* ??? Note: in order for -compat-bsd to work fully, + we must somehow arrange to fixincludes /usr/ucbinclude + and put the result in $(libsubdir)/ucbinclude. */ + + #undef CPP_SUBTARGET_SPEC + #define CPP_SUBTARGET_SPEC "\ + %{pthreads:-D_REENTRANT -D_PTHREADS} \ + %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \ + %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \ + " + + /* Names to predefine in the preprocessor for this target machine. */ + #define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define_std ("unix"); \ + builtin_define_std ("sun"); \ + builtin_define ("__svr4__"); \ + builtin_define ("__SVR4"); \ + builtin_define ("__PRAGMA_REDEFINE_EXTNAME"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=svr4"); \ + /* For C++ we need to add some additional macro \ + definitions required by the C++ standard \ + library. */ \ + if (c_language == clk_cplusplus) \ + { \ + builtin_define ("_XOPEN_SOURCE=500"); \ + builtin_define ("_LARGEFILE_SOURCE=1"); \ + builtin_define ("_LARGEFILE64_SOURCE=1"); \ + builtin_define ("__EXTENSIONS__"); \ + } \ + } while (0) + + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). + It's safe to pass -s always, even if -g is not used. */ + #undef ASM_SPEC + #define ASM_SPEC "\ + %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ + %{fpic:-K PIC} %{fPIC:-K PIC} \ + %(asm_cpu) \ + " + + /* We don't use the standard LIB_SPEC only because we don't yet support c++. */ + #undef LIB_SPEC + #define LIB_SPEC \ + "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \ + %{!shared:\ + %{!symbolic:\ + %{pthreads:-lpthread} \ + %{!pthreads:%{threads:-lthread}} \ + %{p|pg:-ldl} -lc}}" + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "crtend.o%s crtn.o%s" + + /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{!shared: \ + %{!symbolic: \ + %{p:mcrt1.o%s} \ + %{!p: \ + %{pg:gcrt1.o%s gmon.o%s} \ + %{!pg:crt1.o%s}}}} \ + crti.o%s %(startfile_arch) \ + crtbegin.o%s" + + #undef STARTFILE_ARCH32_SPEC + #define STARTFILE_ARCH32_SPEC "%{ansi:values-Xc.o%s} \ + %{!ansi:values-Xa.o%s}" + + #undef STARTFILE_ARCH_SPEC + #define STARTFILE_ARCH_SPEC STARTFILE_ARCH32_SPEC + + #undef LINK_ARCH32_SPEC + #define LINK_ARCH32_SPEC \ + "%{G:-G} \ + %{YP,*} \ + %{R*} \ + %{compat-bsd: \ + %{!YP,*:%{p|pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ + %{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \ + -R /usr/ucblib} \ + %{!compat-bsd: \ + %{!YP,*:%{p|pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ + %{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}}" + + #undef LINK_ARCH_SPEC + #define LINK_ARCH_SPEC LINK_ARCH32_SPEC + + /* This should be the same as in svr4.h, except with -R added. */ + #undef LINK_SPEC + #define LINK_SPEC \ + "%{h*} %{v:-V} \ + %{b} %{Wl,*:%*} \ + %{static:-dn -Bstatic} \ + %{shared:-G -dy %{!mimpure-text:-z text}} \ + %{symbolic:-Bsymbolic -G -dy -z text} \ + %(link_arch) \ + %{Qy:} %{!Qn:-Qy}" + + /* This defines which switch letters take arguments. + It is as in svr4.h but with -R added. */ + #undef SWITCH_TAKES_ARG + #define SWITCH_TAKES_ARG(CHAR) \ + (DEFAULT_SWITCH_TAKES_ARG(CHAR) \ + || (CHAR) == 'R' \ + || (CHAR) == 'h' \ + || (CHAR) == 'z') + + #define STDC_0_IN_SYSTEM_HEADERS 1 + + /* + * Attempt to turn on access permissions for the stack. + * + * This code must be defined when compiling gcc but not when compiling + * libgcc2.a, unless we're generating code for 64-bit SPARC + * + * _SC_STACK_PROT is only defined for post 2.6, but we want this code + * to run always. 2.6 can change the stack protection but has no way to + * query it. + * + */ + + /* This declares mprotect (used in TRANSFER_FROM_TRAMPOLINE) for + libgcc2.c. */ + /* We don't want to include this because sys/mman.h is not present on + some non-Solaris configurations that use sol2.h. */ + #if 0 /* def L_trampoline */ + #include + #endif + + #define TRANSFER_FROM_TRAMPOLINE \ + \ + /* #define STACK_PROT_RWX (PROT_READ | PROT_WRITE | PROT_EXEC) */ \ + \ + static int need_enable_exec_stack; \ + \ + static void check_enabling(void) __attribute__ ((constructor)); \ + static void check_enabling(void) \ + { \ + extern long sysconf(int); \ + \ + int prot = (int) sysconf(515 /* _SC_STACK_PROT */); \ + if (prot != 7 /* STACK_PROT_RWX */) \ + need_enable_exec_stack = 1; \ + } \ + \ + extern void __enable_execute_stack (void *); \ + void \ + __enable_execute_stack (addr) \ + void *addr; \ + { \ + if (!need_enable_exec_stack) \ + return; \ + else { \ + long size = getpagesize (); \ + long mask = ~(size-1); \ + char *page = (char *) (((long) addr) & mask); \ + char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \ + \ + if (mprotect (page, end - page, 7 /* STACK_PROT_RWX */) < 0) \ + perror ("mprotect of trampoline code"); \ + } \ + } diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/aout.h gcc-3.3/gcc/config/sparc/aout.h *** gcc-3.2.3/gcc/config/sparc/aout.h 2002-02-04 18:16:06.000000000 +0000 --- gcc-3.3/gcc/config/sparc/aout.h 2002-05-18 23:47:21.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for SPARC using a.out. ! Copyright (C) 1994, 1996 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com). This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for SPARC using a.out. ! Copyright (C) 1994, 1996, 2002 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 37,72 **** (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ || !strcmp (STR, "target") || !strcmp (STR, "assert")) ! /* This is defined differently for v9 in a cover file. */ ! #define SELECT_SECTION(T,RELOC,ALIGN) \ ! { \ ! if (TREE_CODE (T) == VAR_DECL) \ ! { \ ! if (TREE_READONLY (T) && ! TREE_SIDE_EFFECTS (T) \ ! && DECL_INITIAL (T) \ ! && (DECL_INITIAL (T) == error_mark_node \ ! || TREE_CONSTANT (DECL_INITIAL (T))) \ ! && DECL_ALIGN (T) <= MAX_TEXT_ALIGN \ ! && ! (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ ! text_section (); \ ! else \ ! data_section (); \ ! } \ ! else if (TREE_CODE (T) == CONSTRUCTOR) \ ! { \ ! if (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES)) \ ! data_section (); \ ! } \ ! else if (TREE_CODE_CLASS (TREE_CODE (T)) == 'c') \ ! { \ ! if ((TREE_CODE (T) == STRING_CST && flag_writable_strings) \ ! || TYPE_ALIGN (TREE_TYPE (T)) > MAX_TEXT_ALIGN \ ! || (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ ! data_section (); \ ! else \ ! text_section (); \ ! } \ ! } /* Output the label for a function definition. */ --- 37,44 ---- (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ || !strcmp (STR, "target") || !strcmp (STR, "assert")) ! #define TARGET_ASM_SELECT_SECTION sparc_aout_select_section ! #define TARGET_ASM_SELECT_RTX_SECTION sparc_aout_select_rtx_section /* Output the label for a function definition. */ diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/cypress.md gcc-3.3/gcc/config/sparc/cypress.md *** gcc-3.2.3/gcc/config/sparc/cypress.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/cypress.md 2002-09-15 12:03:42.000000000 +0000 *************** *** 0 **** --- 1,51 ---- + ;; Scheduling description for SPARC Cypress. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; The Cypress is a pretty simple single-issue processor. + + (define_automaton "cypress_0,cypress_1") + + (define_cpu_unit "cyp_memory, cyp_fpalu" "cypress_0") + (define_cpu_unit "cyp_fpmds" "cypress_1") + + (define_insn_reservation "cyp_load" 2 + (and (eq_attr "cpu" "cypress") + (eq_attr "type" "load,sload,fpload")) + "cyp_memory, nothing") + + (define_insn_reservation "cyp_fp_alu" 5 + (and (eq_attr "cpu" "cypress") + (eq_attr "type" "fp,fpmove")) + "cyp_fpalu, nothing*3") + + (define_insn_reservation "cyp_fp_mult" 7 + (and (eq_attr "cpu" "cypress") + (eq_attr "type" "fpmul")) + "cyp_fpmds, nothing*5") + + (define_insn_reservation "cyp_fp_div" 37 + (and (eq_attr "cpu" "cypress") + (eq_attr "type" "fpdivs,fpdivd")) + "cyp_fpmds, nothing*35") + + (define_insn_reservation "cyp_fp_sqrt" 63 + (and (eq_attr "cpu" "cypress") + (eq_attr "type" "fpsqrts,fpsqrtd")) + "cyp_fpmds, nothing*61") diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/freebsd.h gcc-3.3/gcc/config/sparc/freebsd.h *** gcc-3.2.3/gcc/config/sparc/freebsd.h 2002-11-06 21:30:59.000000000 +0000 --- gcc-3.3/gcc/config/sparc/freebsd.h 2003-03-12 02:38:01.000000000 +0000 *************** *** 1,4 **** ! /* Definitions for Sun Sparc64 running FreeBSD using the ELF format Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by David E. O'Brien and BSDi. --- 1,4 ---- ! /* Definitions for Sun SPARC64 running FreeBSD using the ELF format Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by David E. O'Brien and BSDi. *************** the Free Software Foundation, 675 Mass A *** 26,32 **** /* Because we include sparc/sysv4.h. */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES FBSD_CPP_PREDEFINES #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ --- 26,32 ---- /* Because we include sparc/sysv4.h. */ #undef CPP_PREDEFINES ! /* Do not define it here, we now use TARGET_OS_CPP_BUILTINS. */ #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ *************** the Free Software Foundation, 675 Mass A *** 52,65 **** We use the GCC defaults instead. */ #undef WCHAR_TYPE - #undef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 ! /* Define for support of TFmode long double and REAL_ARITHMETIC. ! Sparc ABI says that long double is 4 words. */ #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) --- 52,62 ---- We use the GCC defaults instead. */ #undef WCHAR_TYPE #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 ! /* Define for support of TFmode long double. ! SPARC ABI says that long double is 4 words. */ #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/gmon-sol2.c gcc-3.3/gcc/config/sparc/gmon-sol2.c *** gcc-3.2.3/gcc/config/sparc/gmon-sol2.c 2002-03-24 02:17:32.000000000 +0000 --- gcc-3.3/gcc/config/sparc/gmon-sol2.c 2002-09-15 12:03:42.000000000 +0000 *************** *** 28,34 **** * SUCH DAMAGE. */ ! /* Mangled into a form that works on Sparc Solaris 2 by Mark Eichin * for Cygnus Support, July 1992. */ --- 28,34 ---- * SUCH DAMAGE. */ ! /* Mangled into a form that works on SPARC Solaris 2 by Mark Eichin * for Cygnus Support, July 1992. */ *************** _mcleanup() *** 232,238 **** } /* ! * The Sparc stack frame is only held together by the frame pointers * in the register windows. According to the SVR4 SPARC ABI * Supplement, Low Level System Information/Operating System * Interface/Software Trap Types, a type 3 trap will flush all of the --- 232,238 ---- } /* ! * The SPARC stack frame is only held together by the frame pointers * in the register windows. According to the SVR4 SPARC ABI * Supplement, Low Level System Information/Operating System * Interface/Software Trap Types, a type 3 trap will flush all of the diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/hypersparc.md gcc-3.3/gcc/config/sparc/hypersparc.md *** gcc-3.2.3/gcc/config/sparc/hypersparc.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/hypersparc.md 2002-09-15 12:03:42.000000000 +0000 *************** *** 0 **** --- 1,83 ---- + ;; Scheduling description for HyperSPARC. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; The HyperSPARC is a dual-issue processor. It is not all that fancy. + + ;; ??? There are some things not modelled. For example, sethi+or + ;; ??? coming right after each other are specifically identified and + ;; ??? dual-issued by the processor. Similarly for sethi+ld[reg+lo]. + ;; ??? Actually, to be more precise that rule is sort of modelled now. + + (define_automaton "hypersparc_0,hypersparc_1") + + ;; HyperSPARC/sparclite86x scheduling + + (define_cpu_unit "hs_memory,hs_branch,hs_shift,hs_fpalu" "hypersparc_0") + (define_cpu_unit "hs_fpmds" "hypersparc_1") + + (define_insn_reservation "hs_load" 1 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "load,sload,fpload")) + "hs_memory") + + (define_insn_reservation "hs_store" 2 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "store,fpstore")) + "hs_memory, nothing") + + (define_insn_reservation "hs_slbranch" 1 + (and (eq_attr "cpu" "sparclite86x") + (eq_attr "type" "branch")) + "hs_branch") + + (define_insn_reservation "hs_slshift" 1 + (and (eq_attr "cpu" "sparclite86x") + (eq_attr "type" "shift")) + "hs_shift") + + (define_insn_reservation "hs_fp_alu" 1 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "fp,fpmove,fpcmp")) + "hs_fpalu") + + (define_insn_reservation "hs_fp_mult" 1 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "fpmul")) + "hs_fpmds") + + (define_insn_reservation "hs_fp_divs" 8 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "fpdivs")) + "hs_fpmds*6, nothing*2") + + (define_insn_reservation "hs_fp_divd" 12 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "fpdivd")) + "hs_fpmds*10, nothing*2") + + (define_insn_reservation "hs_fp_sqrt" 17 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "fpsqrts,fpsqrtd")) + "hs_fpmds*15, nothing*2") + + (define_insn_reservation "hs_imul" 17 + (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) + (eq_attr "type" "imul")) + "hs_fpmds*15, nothing*2") diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/lb1spc.asm gcc-3.3/gcc/config/sparc/lb1spc.asm *** gcc-3.2.3/gcc/config/sparc/lb1spc.asm 2001-05-17 03:16:12.000000000 +0000 --- gcc-3.3/gcc/config/sparc/lb1spc.asm 2002-09-15 12:03:42.000000000 +0000 *************** *** 1,7 **** /* This is an assembly language implementation of mulsi3, divsi3, and modsi3 for the sparc processor. ! These routines are derived from the Sparc Architecture Manual, version 8, slightly edited to match the desired calling convention, and also to optimize them for our purposes. */ --- 1,7 ---- /* This is an assembly language implementation of mulsi3, divsi3, and modsi3 for the sparc processor. ! These routines are derived from the SPARC Architecture Manual, version 8, slightly edited to match the desired calling convention, and also to optimize them for our purposes. */ *************** mul_shortway: *** 81,87 **** #ifdef L_divsi3 /* ! * Division and remainder, from Appendix E of the Sparc Version 8 * Architecture Manual, with fixes from Gordon Irlam. */ --- 81,87 ---- #ifdef L_divsi3 /* ! * Division and remainder, from Appendix E of the SPARC Version 8 * Architecture Manual, with fixes from Gordon Irlam. */ *************** ready_to_divide: *** 197,203 **** nop be do_single_div nop ! /* NB: these are commented out in the V8-Sparc manual as well */ /* (I do not understand this) */ ! %o5 > %o3: went too far: back up 1 step ! srl %o5, 1, %o5 --- 197,203 ---- nop be do_single_div nop ! /* NB: these are commented out in the V8-SPARC manual as well */ /* (I do not understand this) */ ! %o5 > %o3: went too far: back up 1 step ! srl %o5, 1, %o5 *************** divide: *** 544,550 **** nop be do_single_div nop ! /* NB: these are commented out in the V8-Sparc manual as well */ /* (I do not understand this) */ ! %o5 > %o3: went too far: back up 1 step ! srl %o5, 1, %o5 --- 544,550 ---- nop be do_single_div nop ! /* NB: these are commented out in the V8-SPARC manual as well */ /* (I do not understand this) */ ! %o5 > %o3: went too far: back up 1 step ! srl %o5, 1, %o5 diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/lb1spl.asm gcc-3.3/gcc/config/sparc/lb1spl.asm *** gcc-3.2.3/gcc/config/sparc/lb1spl.asm 2001-05-17 03:16:12.000000000 +0000 --- gcc-3.3/gcc/config/sparc/lb1spl.asm 2002-09-15 12:03:42.000000000 +0000 *************** *** 1,7 **** /* This is an assembly language implementation of mulsi3, divsi3, and modsi3 for the sparclite processor. ! These routines are all from the Sparclite User's Guide, slightly edited to match the desired calling convention, and also to optimize them. */ #ifdef L_udivsi3 --- 1,7 ---- /* This is an assembly language implementation of mulsi3, divsi3, and modsi3 for the sparclite processor. ! These routines are all from the SPARClite User's Guide, slightly edited to match the desired calling convention, and also to optimize them. */ #ifdef L_udivsi3 diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/linux64.h gcc-3.3/gcc/config/sparc/linux64.h *** gcc-3.2.3/gcc/config/sparc/linux64.h 2002-10-05 21:32:10.000000000 +0000 --- gcc-3.3/gcc/config/sparc/linux64.h 2002-12-10 10:55:32.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 44,50 **** #undef CPP_ARCH32_SPEC #define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__} \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" #endif --- 44,49 ---- *************** Boston, MA 02111-1307, USA. */ *** 57,64 **** #undef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{!shared: \ ! %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\ crti.o%s %{static:crtbeginT.o%s}\ %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" --- 56,62 ---- #undef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{!shared:%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\ crti.o%s %{static:crtbeginT.o%s}\ %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" *************** Boston, MA 02111-1307, USA. */ *** 96,103 **** #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 ! /* Define for support of TFmode long double and REAL_ARITHMETIC. ! Sparc ABI says that long double is 4 words. */ #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) --- 94,101 ---- #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 ! /* Define for support of TFmode long double. ! SPARC ABI says that long double is 4 words. */ #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) *************** Boston, MA 02111-1307, USA. */ *** 126,134 **** #undef LIB_SPEC #define LIB_SPEC \ ! "%{shared: -lc} \ ! %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ ! %{profile:-lc_p} %{!profile: -lc}}" /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support for the special GCC options -static and -shared, which allow us to --- 124,132 ---- #undef LIB_SPEC #define LIB_SPEC \ ! "%{pthread:-lpthread} \ ! %{shared:-lc} \ ! %{!shared: %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support for the special GCC options -static and -shared, which allow us to *************** Boston, MA 02111-1307, USA. */ *** 259,269 **** /* System V Release 4 uses DWARF debugging info. Buf DWARF1 doesn't do 64-bit anything, so we use DWARF2. */ - #undef DWARF2_DEBUGGING_INFO #undef DWARF_DEBUGGING_INFO ! #undef DBX_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO ! #define DBX_DEBUGGING_INFO #undef ASM_OUTPUT_ALIGNED_LOCAL #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ --- 257,265 ---- /* System V Release 4 uses DWARF debugging info. Buf DWARF1 doesn't do 64-bit anything, so we use DWARF2. */ #undef DWARF_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO 1 ! #define DBX_DEBUGGING_INFO 1 #undef ASM_OUTPUT_ALIGNED_LOCAL #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ *************** do { \ *** 328,334 **** /* Handle multilib correctly. */ #if defined(__arch64__) ! /* 64-bit Sparc version */ #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ unsigned int *pc_ = (CONTEXT)->ra; \ --- 324,330 ---- /* Handle multilib correctly. */ #if defined(__arch64__) ! /* 64-bit SPARC version */ #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ unsigned int *pc_ = (CONTEXT)->ra; \ *************** do { \ *** 379,385 **** goto SUCCESS; \ } while (0) #else ! /* 32-bit Sparc version */ #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ unsigned int *pc_ = (CONTEXT)->ra; \ --- 375,381 ---- goto SUCCESS; \ } while (0) #else ! /* 32-bit SPARC version */ #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ unsigned int *pc_ = (CONTEXT)->ra; \ diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/linux-aout.h gcc-3.3/gcc/config/sparc/linux-aout.h *** gcc-3.2.3/gcc/config/sparc/linux-aout.h 2002-04-15 20:27:43.000000000 +0000 --- gcc-3.3/gcc/config/sparc/linux-aout.h 2002-11-26 04:54:49.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 31,37 **** #endif /* We need that too. */ ! #define HANDLE_SYSV_PRAGMA #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX --- 31,37 ---- #endif /* We need that too. */ ! #define HANDLE_SYSV_PRAGMA 1 #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/linux.h gcc-3.3/gcc/config/sparc/linux.h *** gcc-3.2.3/gcc/config/sparc/linux.h 2002-04-29 04:09:49.000000000 +0000 --- gcc-3.3/gcc/config/sparc/linux.h 2002-12-10 10:55:32.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 123,131 **** %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" #else #define LIB_SPEC \ ! "%{shared: -lc} \ ! %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ ! %{profile:-lc_p} %{!profile: -lc}}" #endif #else #define LIB_SPEC \ --- 123,131 ---- %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" #else #define LIB_SPEC \ ! "%{pthread:-lpthread} \ ! %{shared:-lc} \ ! %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" #endif #else #define LIB_SPEC \ *************** do { \ *** 230,237 **** sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM)) ! /* Define for support of TFmode long double and REAL_ARITHMETIC. ! Sparc ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) /* Constant which presents upper bound of the above value. */ --- 230,237 ---- sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM)) ! /* Define for support of TFmode long double. ! SPARC ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) /* Constant which presents upper bound of the above value. */ diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/litecoff.h gcc-3.3/gcc/config/sparc/litecoff.h *** gcc-3.2.3/gcc/config/sparc/litecoff.h 2002-02-04 18:16:06.000000000 +0000 --- gcc-3.3/gcc/config/sparc/litecoff.h 2002-05-18 19:27:49.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for SPARClite w/o FPU, COFF. ! Copyright (C) 1994, 1996, 2000 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com). This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for SPARClite w/o FPU, COFF. ! Copyright (C) 1994, 1996, 2000, 2002 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 32,49 **** #undef INIT_SECTION_ASM_OP - /* A list of other sections which the compiler might be "in" at any - given time. */ - - #undef EXTRA_SECTIONS - #define EXTRA_SECTIONS in_const - - /* A list of extra section function definitions. */ - - #undef EXTRA_SECTION_FUNCTIONS - #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION - #undef DO_GLOBAL_CTORS_BODY #undef DO_GLOBAL_DTORS_BODY --- 32,37 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/liteelf.h gcc-3.3/gcc/config/sparc/liteelf.h *** gcc-3.2.3/gcc/config/sparc/liteelf.h 2002-03-31 03:10:18.000000000 +0000 --- gcc-3.3/gcc/config/sparc/liteelf.h 2002-08-29 21:40:18.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,33 **** /* Default to dwarf2 in ELF. */ ! #undef DWARF_DEBUGGING_INFO ! #define DWARF_DEBUGGING_INFO ! #undef DWARF2_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG --- 24,31 ---- /* Default to dwarf2 in ELF. */ ! #define DWARF_DEBUGGING_INFO 1 ! #define DWARF2_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/lynx.h gcc-3.3/gcc/config/sparc/lynx.h *** gcc-3.2.3/gcc/config/sparc/lynx.h 2001-11-14 21:44:20.000000000 +0000 --- gcc-3.3/gcc/config/sparc/lynx.h 2002-09-15 12:03:42.000000000 +0000 *************** the Free Software Foundation, 59 Temple *** 19,25 **** Boston, MA 02111-1307, USA. */ #undef ASM_OUTPUT_IDENT - #undef SELECT_RTX_SECTION #define BSS_SECTION_ASM_OP "\t.section\t\".bss\"" --- 19,24 ---- *************** Boston, MA 02111-1307, USA. */ *** 39,45 **** #undef LINK_SPEC ! /* Sparc version of libc.a has references to libm.a (printf calls pow for instance), so we must always link both. */ #undef LIB_SPEC --- 38,44 ---- #undef LINK_SPEC ! /* SPARC version of libc.a has references to libm.a (printf calls pow for instance), so we must always link both. */ #undef LIB_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/netbsd-elf.h gcc-3.3/gcc/config/sparc/netbsd-elf.h *** gcc-3.2.3/gcc/config/sparc/netbsd-elf.h 2002-07-16 00:36:52.000000000 +0000 --- gcc-3.3/gcc/config/sparc/netbsd-elf.h 2002-10-18 23:10:35.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 20,57 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Make sure these are undefined. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__sparc__ -D__NetBSD__ -D__ELF__ \ - -Asystem=unix -Asystem=NetBSD" - - /* CPP defines used for 64 bit code. */ - #undef CPP_SUBTARGET_SPEC64 - #define CPP_SUBTARGET_SPEC64 \ - "-D__sparc64__ -D__sparc_v9__ -D_LP64 %{posix:-D_POSIX_SOURCE}" ! /* CPP defines used for 32 bit code. */ ! #undef CPP_SUBTARGET_SPEC32 ! #define CPP_SUBTARGET_SPEC32 "-D__sparc %{posix:-D_POSIX_SOURCE}" ! ! /* CPP_ARCH32_SPEC and CPP_ARCH64_SPEC are wrong from sparc/sparc.h; we ! always want the non-SPARC_BI_ARCH versions, since the SPARC_BI_ARCH ! versions define __SIZE_TYPE__ and __PTRDIFF_TYPE__ incorrectly for ! NetBSD. */ ! #undef CPP_ARCH32_SPEC ! #define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" ! ! #undef CPP_ARCH64_SPEC ! #define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64" ! ! /* sparc/sparc.h defines NO_BUILTIN_SIZE_TYPE and NO_BUILTIN_PTRDIFF_TYPE ! if SPARC_BI_ARCH is defined. This is wrong for NetBSD; size_t and ! ptrdiff_t do not change for 32-bit vs. 64-bit. */ ! #undef NO_BUILTIN_PTRDIFF_TYPE ! #undef NO_BUILTIN_SIZE_TYPE /* SIZE_TYPE and PTRDIFF_TYPE are wrong from sparc/sparc.h. */ #undef SIZE_TYPE --- 20,51 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + NETBSD_OS_CPP_BUILTINS_ELF(); \ + if (TARGET_ARCH64) \ + { \ + NETBSD_OS_CPP_BUILTINS_LP64(); \ + builtin_define ("__sparc64__"); \ + builtin_define ("__sparc_v9__"); \ + } \ + else \ + builtin_define ("__sparc"); \ + builtin_define ("__sparc__"); \ + } \ + while (0) + /* Make sure these are undefined. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX + /* Make sure this is undefined. */ #undef CPP_PREDEFINES ! /* CPP defines used by all NetBSD targets. */ ! #undef CPP_SUBTARGET_SPEC ! #define CPP_SUBTARGET_SPEC "%(netbsd_cpp_spec)" /* SIZE_TYPE and PTRDIFF_TYPE are wrong from sparc/sparc.h. */ #undef SIZE_TYPE *************** Boston, MA 02111-1307, USA. */ *** 108,113 **** --- 102,110 ---- #undef STDC_0_IN_SYSTEM_HEADERS + /* Attempt to enable execute permissions on the stack. */ + #define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK + #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME); *************** Boston, MA 02111-1307, USA. */ *** 200,234 **** /* Make sure we use the right output format. Pick a default and then make sure -m32/-m64 switch to the right one. */ ! #define LINK_ARCH32_SPEC \ ! "%-m elf32_sparc \ ! %{assert*} %{R*} %{V} %{v:%{!V:-V}} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dp \ ! %{!nostdlib:%{!r*:%{!e*:-e __start}}} \ ! %{!static: \ ! -dy %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ ! %{static:-static}}" ! #define LINK_ARCH64_SPEC \ ! "%-m elf64_sparc \ ! %{assert*} %{R*} %{V} %{v:%{!V:-V}} \ ! %{shared:-shared} \ ! %{!shared: \ ! -dp \ ! %{!nostdlib:%{!r*:%{!e*:-e __start}}} \ ! %{!static: \ ! -dy %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \ ! %{static:-static}}" ! #define LINK_ARCH_SPEC "\ ! %{m32:%(link_arch32)} \ ! %{m64:%(link_arch64)} \ ! %{!m32:%{!m64:%(link_arch_default)}} \ ! " #if DEFAULT_ARCH32_P #define LINK_ARCH_DEFAULT_SPEC LINK_ARCH32_SPEC --- 197,218 ---- /* Make sure we use the right output format. Pick a default and then make sure -m32/-m64 switch to the right one. */ ! #define LINK_ARCH32_SPEC "-m elf32_sparc" ! #define LINK_ARCH64_SPEC "-m elf64_sparc" ! #define LINK_ARCH_SPEC \ ! "%{m32:%(link_arch32)} \ ! %{m64:%(link_arch64)} \ ! %{!m32:%{!m64:%(link_arch_default)}}" ! ! #undef LINK_SPEC ! #define LINK_SPEC \ ! "%(link_arch) \ ! %{!mno-relax:%{!r:-relax}} \ ! %(netbsd_link_spec)" ! ! #define NETBSD_ENTRY_POINT "__start" #if DEFAULT_ARCH32_P #define LINK_ARCH_DEFAULT_SPEC LINK_ARCH32_SPEC *************** Boston, MA 02111-1307, USA. */ *** 243,250 **** { "link_arch64", LINK_ARCH64_SPEC }, \ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, \ ! { "cpp_subtarget_spec32", CPP_SUBTARGET_SPEC32 }, \ ! { "cpp_subtarget_spec64", CPP_SUBTARGET_SPEC64 }, /* What extra switches do we need? */ --- 227,235 ---- { "link_arch64", LINK_ARCH64_SPEC }, \ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \ ! { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ ! { "netbsd_entry_point", NETBSD_ENTRY_POINT }, /* What extra switches do we need? */ *************** Boston, MA 02111-1307, USA. */ *** 283,301 **** #define MULTILIB_DEFAULTS { "m64" } #endif - #undef CPP_SUBTARGET_SPEC - #if DEFAULT_ARCH32_P - #define CPP_SUBTARGET_SPEC \ - "%{m64:%(cpp_subtarget_spec64)}%{!m64:%(cpp_subtarget_spec32)}" - #else - #define CPP_SUBTARGET_SPEC \ - "%{!m32:%(cpp_subtarget_spec64)}%{m32:%(cpp_subtarget_spec32)}" - #endif - - /* Restore this from sparc/sparc.h, netbsd.h changes it. */ - #undef CPP_SPEC - #define CPP_SPEC "%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)" - /* Name the port. */ #undef TARGET_NAME #define TARGET_NAME (DEFAULT_ARCH32_P ? TARGET_NAME32 : TARGET_NAME64) --- 268,273 ---- *************** Boston, MA 02111-1307, USA. */ *** 317,325 **** #undef CC1_SPEC #define CC1_SPEC CC1_SPEC64 - #undef CPP_SUBTARGET_SPEC - #define CPP_SUBTARGET_SPEC CPP_SUBTARGET_SPEC64 - #undef TARGET_NAME #define TARGET_NAME TARGET_NAME64 --- 289,294 ---- *************** Boston, MA 02111-1307, USA. */ *** 338,346 **** #undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 - #undef CPP_SUBTARGET_SPEC - #define CPP_SUBTARGET_SPEC CPP_SUBTARGET_SPEC32 - #undef CC1_SPEC #define CC1_SPEC CC1_SPEC32 --- 307,312 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/netbsd.h gcc-3.3/gcc/config/sparc/netbsd.h *** gcc-3.2.3/gcc/config/sparc/netbsd.h 2002-02-05 19:01:55.000000000 +0000 --- gcc-3.3/gcc/config/sparc/netbsd.h 2002-10-18 23:10:35.000000000 +0000 *************** *** 1,7 **** ! /* Names to predefine in the preprocessor for this target machine. */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -Dsparc -D__NetBSD__ -Asystem=unix -Asystem=NetBSD -Acpu=sparc -Amachine=sparc" /* Make gcc agree with */ --- 1,23 ---- ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_AOUT(); \ ! builtin_define_std ("sparc"); \ ! builtin_assert ("cpu=sparc"); \ ! builtin_assert ("machine=sparc"); \ ! } \ ! while (0) + /* Make sure this is undefined. */ #undef CPP_PREDEFINES ! ! /* What extra spec entries do we need? */ ! #undef SUBTARGET_EXTRA_SPECS ! #define SUBTARGET_EXTRA_SPECS \ ! { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, ! ! #undef CPP_SPEC ! #define CPP_SPEC "%(cpp_cpu) %(netbsd_cpp_spec)" /* Make gcc agree with */ *************** *** 13,19 **** /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* This is the char to use for continuation (in case we need to turn continuation back on). */ --- 29,35 ---- /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* This is the char to use for continuation (in case we need to turn continuation back on). */ *************** *** 28,30 **** --- 44,49 ---- /* Until they use ELF or something that handles dwarf2 unwinds and initialization stuff better. */ #define DWARF2_UNWIND_INFO 0 + + /* Attempt to enable execute permissions on the stack. */ + #define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/openbsd.h gcc-3.3/gcc/config/sparc/openbsd.h *** gcc-3.2.3/gcc/config/sparc/openbsd.h 2001-11-14 21:44:20.000000000 +0000 --- gcc-3.3/gcc/config/sparc/openbsd.h 2002-10-20 22:37:13.000000000 +0000 *************** *** 1,5 **** /* Configuration file for sparc OpenBSD target. ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Configuration file for sparc OpenBSD target. ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 43,49 **** /* Specific options for DBX Output. */ /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* This is the char to use for continuation */ #define DBX_CONTIN_CHAR '?' --- 43,49 ---- /* Specific options for DBX Output. */ /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* This is the char to use for continuation */ #define DBX_CONTIN_CHAR '?' *************** Boston, MA 02111-1307, USA. */ *** 63,67 **** #define DWARF2_UNWIND_INFO 0 #undef ASM_PREFERRED_EH_DATA_FORMAT - - /* Default sparc.h does already define ASM_OUTPUT_MI_THUNK */ --- 63,65 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/pbd.h gcc-3.3/gcc/config/sparc/pbd.h *** gcc-3.2.3/gcc/config/sparc/pbd.h 2002-03-27 10:28:16.000000000 +0000 --- gcc-3.3/gcc/config/sparc/pbd.h 2002-08-29 21:40:18.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 27,33 **** /* We want DBX format for use with gdb under COFF. */ ! #define DBX_DEBUGGING_INFO /* Generate calls to memcpy, memcmp and memset. */ --- 27,33 ---- /* We want DBX format for use with gdb under COFF. */ ! #define DBX_DEBUGGING_INFO 1 /* Generate calls to memcpy, memcmp and memset. */ *************** Boston, MA 02111-1307, USA. */ *** 59,68 **** #define ENDFILE_SPEC "crtn.o%s" - /* cpp has to support a #sccs directive for the /usr/include files */ - - #define SCCS_DIRECTIVE - /* LINK_SPEC is needed only for SunOS 4. */ #undef LINK_SPEC --- 59,64 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/rtems.h gcc-3.3/gcc/config/sparc/rtems.h *** gcc-3.2.3/gcc/config/sparc/rtems.h 2002-04-12 13:09:36.000000000 +0000 --- gcc-3.3/gcc/config/sparc/rtems.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,27 **** - /* Definitions for rtems targeting a SPARC using a.out. - Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. - Contributed by Joel Sherrill (joel@OARcorp.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* Specify predefined symbols in preprocessor. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -D__rtems__ \ - -Asystem=rtems" --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sol26-sld.h gcc-3.3/gcc/config/sparc/sol26-sld.h *** gcc-3.2.3/gcc/config/sparc/sol26-sld.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sol26-sld.h 2002-04-12 23:02:45.000000000 +0000 *************** *** 0 **** --- 1,6 ---- + /* Up through Solaris 2.6, the system linker does not work with DWARF + or DWARF2, since it does not have working support for relocations + to unaligned data. */ + + #undef DWARF_DEBUGGING_INFO + #undef DWARF2_DEBUGGING_INFO diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sol27-sld.h gcc-3.3/gcc/config/sparc/sol27-sld.h *** gcc-3.2.3/gcc/config/sparc/sol27-sld.h 2002-05-01 02:47:56.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sol27-sld.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,8 **** - /* Up through Solaris 2.7, the system linker does not work with DWARF - or DWARF2, since it does not have working support for relocations - to unaligned data. */ - - #undef DWARF_DEBUGGING_INFO - #undef DWARF2_DEBUGGING_INFO - #undef PREFERRED_DEBUGGING_TYPE - #undef ASM_DEBUG_SPEC --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sol2-bi.h gcc-3.3/gcc/config/sparc/sol2-bi.h *** gcc-3.2.3/gcc/config/sparc/sol2-bi.h 2002-10-05 21:32:10.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sol2-bi.h 2002-10-03 20:35:14.000000000 +0000 *************** *** 5,13 **** #undef SPARC_DEFAULT_CMODEL #define SPARC_DEFAULT_CMODEL CM_MEDANY - #undef LONG_DOUBLE_TYPE_SIZE - #define LONG_DOUBLE_TYPE_SIZE 128 - #define AS_SPARC64_FLAG "-xarch=v9" #undef ASM_CPU32_DEFAULT_SPEC --- 5,10 ---- *************** *** 30,44 **** #define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a" #endif - /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). - It's safe to pass -s always, even if -g is not used. */ - #undef ASM_SPEC - #define ASM_SPEC "\ - %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ - %{fpic:-K PIC} %{fPIC:-K PIC} \ - %(asm_cpu)\ - " - #if DEFAULT_ARCH32_P #define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}" #define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}" --- 27,32 ---- *************** *** 50,66 **** #undef CPP_CPU_SPEC #define CPP_CPU_SPEC "\ %{mcypress:} \ ! %{msparclite:-D__sparclite__} \ ! %{mf930:-D__sparclite__} %{mf934:-D__sparclite__} \ %{mv8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \ %{msupersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \ ! %{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \ ! %{mcpu=sparclite:-D__sparclite__} \ ! %{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \ %{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \ %{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \ ! %{mcpu=v9:" DEF_ARCH32_SPEC("-D__sparcv8") "} \ ! %{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-D__sparcv8") "} \ %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \ " --- 38,51 ---- #undef CPP_CPU_SPEC #define CPP_CPU_SPEC "\ %{mcypress:} \ ! %{msparclite|mf930|mf934:-D__sparclite__} \ %{mv8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \ %{msupersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \ ! %{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} \ ! %{mcpu=sparclite|mcpu-f930|mcpu=f934:-D__sparclite__} \ %{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \ %{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \ ! %{mcpu=v9|mcpu=ultrasparc:" DEF_ARCH32_SPEC("-D__sparcv8") "} \ %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \ " *************** *** 72,90 **** %{!mcpu*:%(asm_cpu_default)} \ " - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%{!shared: \ - %{!symbolic: \ - %{p:mcrt1.o%s} \ - %{!p: \ - %{pg:gcrt1.o%s gmon.o%s} \ - %{!pg:crt1.o%s}}}} \ - crti.o%s \ - %{ansi:values-Xc.o%s} \ - %{!ansi: %{traditional:values-Xt.o%s} \ - %{!traditional:values-Xa.o%s}} \ - crtbegin.o%s" - #undef CPP_CPU_DEFAULT_SPEC #define CPP_CPU_DEFAULT_SPEC \ (DEFAULT_ARCH32_P ? "\ --- 57,62 ---- *************** *** 108,114 **** /* wchar_t is called differently in for 32 and 64-bit compilations. This is called for by SCD 2.4.1, p. 6-83, Figure 6-65 (32-bit) and p. 6P-10, Figure 6.38 (64-bit). */ - #define NO_BUILTIN_WCHAR_TYPE #undef WCHAR_TYPE #define WCHAR_TYPE (TARGET_ARCH64 ? "int" : "long int") --- 80,85 ---- *************** *** 119,125 **** /* Same for wint_t. See SCD 2.4.1, p. 6-83, Figure 6-66 (32-bit). There's no corresponding 64-bit definition, but this is what Solaris 8 uses. */ - #define NO_BUILTIN_WINT_TYPE #undef WINT_TYPE #define WINT_TYPE (TARGET_ARCH64 ? "int" : "long int") --- 90,95 ---- *************** *** 128,139 **** #define WINT_TYPE_SIZE 32 #undef CPP_ARCH32_SPEC ! #define CPP_ARCH32_SPEC "-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ ! -D__WCHAR_TYPE__=long\\ int -D__WINT_TYPE__=long\\ int \ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" #undef CPP_ARCH64_SPEC ! #define CPP_ARCH64_SPEC "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ ! -D__WCHAR_TYPE__=int -D__WINT_TYPE__=int \ -D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9" #undef CPP_ARCH_SPEC --- 98,107 ---- #define WINT_TYPE_SIZE 32 #undef CPP_ARCH32_SPEC ! #define CPP_ARCH32_SPEC "\ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" #undef CPP_ARCH64_SPEC ! #define CPP_ARCH64_SPEC "\ -D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9" #undef CPP_ARCH_SPEC *************** *** 157,197 **** #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "link_arch32", LINK_ARCH32_SPEC }, \ { "link_arch64", LINK_ARCH64_SPEC }, \ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, ! /* This should be the same as in svr4.h, except with -R added. */ ! #define LINK_ARCH32_SPEC \ ! "%{G:-G} \ ! %{YP,*} \ ! %{R*} \ ! %{compat-bsd: \ ! %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \ ! -R /usr/ucblib} \ ! %{!compat-bsd: \ ! %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ ! %{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}}" ! #define LINK_ARCH64_SPEC \ "%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \ %{G:-G} \ %{YP,*} \ %{R*} \ %{compat-bsd: \ ! %{!YP,*:%{p:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \ ! %{pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \ %{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} \ -R /usr/ucblib} \ %{!compat-bsd: \ ! %{!YP,*:%{p:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \ ! %{pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \ %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}" #define LINK_ARCH_SPEC "\ %{m32:%(link_arch32)} \ %{m64:%(link_arch64)} \ --- 125,154 ---- #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ + { "startfile_arch", STARTFILE_ARCH_SPEC }, \ { "link_arch32", LINK_ARCH32_SPEC }, \ { "link_arch64", LINK_ARCH64_SPEC }, \ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, ! /* ! * This should be the same as in sol2.h, except with "/sparcv9" ! * appended to the paths and /usr/ccs/lib is no longer necessary ! */ #define LINK_ARCH64_SPEC \ "%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \ %{G:-G} \ %{YP,*} \ %{R*} \ %{compat-bsd: \ ! %{!YP,*:%{p|pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \ %{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} \ -R /usr/ucblib} \ %{!compat-bsd: \ ! %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \ %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}" + #undef LINK_ARCH_SPEC #define LINK_ARCH_SPEC "\ %{m32:%(link_arch32)} \ %{m64:%(link_arch64)} \ *************** *** 201,216 **** #define LINK_ARCH_DEFAULT_SPEC \ (DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC) - #undef LINK_SPEC - #define LINK_SPEC \ - "%{h*} %{v:-V} \ - %{b} %{Wl,*:%*} \ - %{static:-dn -Bstatic} \ - %{shared:-G -dy %{!mimpure-text:-z text}} \ - %{symbolic:-Bsymbolic -G -dy -z text} \ - %(link_arch) \ - %{Qy:} %{!Qn:-Qy}" - #undef CC1_SPEC #if DEFAULT_ARCH32_P #define CC1_SPEC "\ --- 158,163 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sol2-g1.asm gcc-3.3/gcc/config/sparc/sol2-g1.asm *** gcc-3.2.3/gcc/config/sparc/sol2-g1.asm 1998-12-16 21:13:24.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sol2-g1.asm 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,88 **** - ! gcrt1.s for solaris 2.0. - - ! Copyright (C) 1992 Free Software Foundation, Inc. - ! Written By David Vinayak Henkel-Wallace, June 1992 - ! - ! This file is free software; you can redistribute it and/or modify it - ! under the terms of the GNU General Public License as published by the - ! Free Software Foundation; either version 2, or (at your option) any - ! later version. - ! - ! In addition to the permissions in the GNU General Public License, the - ! Free Software Foundation gives you unlimited permission to link the - ! compiled version of this file with other programs, and to distribute - ! those programs without any restriction coming from the use of this - ! file. (The General Public License restrictions do apply in other - ! respects; for example, they cover modification of the file, and - ! distribution when not linked into another program.) - ! - ! This file is distributed in the hope that it will be useful, but - ! WITHOUT ANY WARRANTY; without even the implied warranty of - ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - ! General Public License for more details. - ! - ! You should have received a copy of the GNU General Public License - ! along with this program; see the file COPYING. If not, write to - ! the Free Software Foundation, 59 Temple Place - Suite 330, - ! Boston, MA 02111-1307, USA. - ! - ! As a special exception, if you link this library with files - ! compiled with GCC to produce an executable, this does not cause - ! the resulting executable to be covered by the GNU General Public License. - ! This exception does not however invalidate any other reasons why - ! the executable file might be covered by the GNU General Public License. - ! - - ! This file takes control of the process from the kernel, as specified - ! in section 3 of the SVr4 ABI. - ! This file is the first thing linked into any executable. - - .section ".text" - .proc 022 - .global _start - - _start: - mov 0, %fp ! Mark bottom frame pointer - ld [%sp + 64], %l0 ! argc - add %sp, 68, %l1 ! argv - - ! Leave some room for a call. Sun leaves 32 octets (to sit on - ! a cache line?) so we do too. - sub %sp, 32, %sp - - ! %g1 may contain a function to be registered w/atexit - orcc %g0, %g1, %g0 - be .nope - mov %g1, %o0 - call atexit - nop - .nope: - ! Now make sure constructors and destructors are handled. - set _fini, %o0 - call atexit, 1 - nop - call _init, 0 - nop - - ! We ignore the auxiliary vector; there's no defined way to - ! access those data anyway. Instead, go straight to main: - mov %l0, %o0 ! argc - mov %l1, %o1 ! argv - set ___Argv, %o3 - st %o1, [%o3] ! *___Argv - ! Skip argc words past argv, to env: - sll %l0, 2, %o2 - add %o2, 4, %o2 - add %l1, %o2, %o2 ! env - set _environ, %o3 - st %o2, [%o3] ! *_environ - call main, 4 - nop - call exit, 0 - nop - call _exit, 0 - nop - ! We should never get here. - - .type _start,#function - .size _start,.-_start --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sol2.h gcc-3.3/gcc/config/sparc/sol2.h *** gcc-3.2.3/gcc/config/sparc/sol2.h 2002-05-16 11:08:37.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sol2.h 2002-09-15 12:03:42.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,73 **** /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ - /* Solaris 2 (at least as of 2.5.1) uses a 32-bit wchar_t. */ - #undef WCHAR_TYPE - #define WCHAR_TYPE "long int" - - #undef WCHAR_TYPE_SIZE - #define WCHAR_TYPE_SIZE 32 - - /* Solaris 2 uses a wint_t different from the default. This is required - by the SCD 2.4.1, p. 6-83, Figure 6-66. */ - #undef WINT_TYPE - #define WINT_TYPE "long int" - - #undef WINT_TYPE_SIZE - #define WINT_TYPE_SIZE 32 - - #define HANDLE_PRAGMA_REDEFINE_EXTNAME 1 - #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME \ ! -Asystem=unix -Asystem=svr4" ! ! #undef CPP_SUBTARGET_SPEC ! #define CPP_SUBTARGET_SPEC "\ ! %{pthreads:-D_REENTRANT -D_PTHREADS} \ ! %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \ ! %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \ ! " ! ! /* For C++ we need to add some additional macro definitions required ! by the C++ standard library. */ ! #define CPLUSPLUS_CPP_SPEC "\ ! -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \ ! -D__EXTENSIONS__ \ ! %(cpp) \ ! " ! ! /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). ! It's safe to pass -s always, even if -g is not used. */ ! #undef ASM_SPEC ! #define ASM_SPEC "\ ! %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ ! %{fpic:-K PIC} %{fPIC:-K PIC} \ ! %(asm_cpu) \ ! " /* This is here rather than in sparc.h because it's not known what other assemblers will accept. */ --- 23,30 ---- /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dsparc" /* This is here rather than in sparc.h because it's not known what other assemblers will accept. */ *************** Boston, MA 02111-1307, USA. */ *** 90,95 **** --- 47,57 ---- %{!mcpu*:%(asm_cpu_default)} \ " + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "startfile_arch", STARTFILE_ARCH_SPEC }, \ + { "link_arch", LINK_ARCH_SPEC } + /* However it appears that Solaris 2.0 uses the same reg numbering as the old BSD-style system did. */ *************** Boston, MA 02111-1307, USA. */ *** 98,108 **** #define DBX_REGISTER_NUMBER(REGNO) \ (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO) - /* We use stabs-in-elf by default, because that is what the native - toolchain uses. */ - #undef PREFERRED_DEBUGGING_TYPE - #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - /* The Solaris 2 assembler uses .skip, not .zero, so put this back. */ #undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(FILE,SIZE) \ --- 60,65 ---- *************** Boston, MA 02111-1307, USA. */ *** 135,208 **** sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM)) - /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. - We don't use the standard LIB_SPEC only because we don't yet support c++ */ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC "%{!shared: \ - %{!symbolic: \ - %{p:mcrt1.o%s} \ - %{!p: \ - %{pg:gcrt1.o%s gmon.o%s} \ - %{!pg:crt1.o%s}}}} \ - crti.o%s \ - %{ansi:values-Xc.o%s} \ - %{!ansi: \ - %{traditional:values-Xt.o%s} \ - %{!traditional:values-Xa.o%s}} \ - crtbegin.o%s" - - /* ??? Note: in order for -compat-bsd to work fully, - we must somehow arrange to fixincludes /usr/ucbinclude - and put the result in $(libsubdir)/ucbinclude. */ - - #undef LIB_SPEC - #define LIB_SPEC \ - "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \ - %{!shared:\ - %{!symbolic:\ - %{pthreads:-lpthread} \ - %{!pthreads:%{threads:-lthread}} \ - %{p|pg:-ldl} -lc}}" #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ crtend.o%s crtn.o%s" - /* This should be the same as in svr4.h, except with -R added. */ - #undef LINK_SPEC - #define LINK_SPEC \ - "%{h*} %{v:-V} \ - %{b} %{Wl,*:%*} \ - %{static:-dn -Bstatic} \ - %{shared:-G -dy %{!mimpure-text:-z text}} \ - %{symbolic:-Bsymbolic -G -dy -z text} \ - %{G:-G} \ - %{YP,*} \ - %{R*} \ - %{compat-bsd: \ - %{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ - %{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ - %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \ - -R /usr/ucblib} \ - %{!compat-bsd: \ - %{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ - %{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ - %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \ - %{Qy:} %{!Qn:-Qy}" - - /* This defines which switch letters take arguments. - It is as in svr4.h but with -R added. */ - - #undef SWITCH_TAKES_ARG - #define SWITCH_TAKES_ARG(CHAR) \ - (DEFAULT_SWITCH_TAKES_ARG(CHAR) \ - || (CHAR) == 'R' \ - || (CHAR) == 'h' \ - || (CHAR) == 'x' \ - || (CHAR) == 'z') - /* Select a format to encode pointers in exception handling data. CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is true if the symbol may be affected by dynamic relocations. --- 92,103 ---- *************** Boston, MA 02111-1307, USA. */ *** 216,230 **** /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h. Instead, it is enabled here, because it does work under Solaris. */ ! /* Define for support of TFmode long double and REAL_ARITHMETIC. ! Sparc ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE 128 /* But indicate that it isn't supported by the hardware. */ #define WIDEST_HARDWARE_FP_SIZE 64 - #define STDC_0_IN_SYSTEM_HEADERS 1 - #define MULDI3_LIBCALL "__mul64" #define DIVDI3_LIBCALL "__div64" #define UDIVDI3_LIBCALL "__udiv64" --- 111,123 ---- /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h. Instead, it is enabled here, because it does work under Solaris. */ ! /* Define for support of TFmode long double. ! SPARC ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE 128 /* But indicate that it isn't supported by the hardware. */ #define WIDEST_HARDWARE_FP_SIZE 64 #define MULDI3_LIBCALL "__mul64" #define DIVDI3_LIBCALL "__div64" #define UDIVDI3_LIBCALL "__udiv64" *************** Boston, MA 02111-1307, USA. */ *** 251,306 **** /* Solaris allows 64 bit out and global registers in 32 bit mode. sparc_override_options will disable V8+ if not generating V9 code. */ #undef TARGET_DEFAULT ! #define TARGET_DEFAULT (MASK_FPU + MASK_V8PLUS + MASK_LONG_DOUBLE_128) ! ! /* ! * Attempt to turn on access permissions for the stack. ! * ! * This code must be defined when compiling gcc but not when compiling ! * libgcc2.a, unless we're generating code for 64 bits SPARC ! * ! * _SC_STACK_PROT is only defined for post 2.6, but we want this code ! * to run always. 2.6 can change the stack protection but has no way to ! * query it. ! * ! */ ! ! /* This declares mprotect (used in TRANSFER_FROM_TRAMPOLINE) for ! libgcc2.c. */ ! /* We don't want to include this because sys/mman.h is not present on ! some non-Solaris configurations that use sol2.h. */ ! #if 0 /* def L_trampoline */ ! #include ! #endif ! ! #define TRANSFER_FROM_TRAMPOLINE \ ! static int need_enable_exec_stack; \ ! \ ! static void check_enabling(void) __attribute__ ((constructor)); \ ! static void check_enabling(void) \ ! { \ ! extern long sysconf(int); \ ! \ ! int prot = (int) sysconf(515 /*_SC_STACK_PROT */); \ ! if (prot != 7) \ ! need_enable_exec_stack = 1; \ ! } \ ! \ ! extern void __enable_execute_stack (void *); \ ! void \ ! __enable_execute_stack (addr) \ ! void *addr; \ ! { \ ! if (!need_enable_exec_stack) \ ! return; \ ! else { \ ! long size = getpagesize (); \ ! long mask = ~(size-1); \ ! char *page = (char *) (((long) addr) & mask); \ ! char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \ ! \ ! /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \ ! if (mprotect (page, end - page, 7) < 0) \ ! perror ("mprotect of trampoline code"); \ ! } \ ! } --- 144,147 ---- /* Solaris allows 64 bit out and global registers in 32 bit mode. sparc_override_options will disable V8+ if not generating V9 code. */ #undef TARGET_DEFAULT ! #define TARGET_DEFAULT (MASK_V8PLUS + MASK_FPU + MASK_LONG_DOUBLE_128) diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sp64-elf.h gcc-3.3/gcc/config/sparc/sp64-elf.h *** gcc-3.2.3/gcc/config/sparc/sp64-elf.h 2002-04-05 07:42:44.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sp64-elf.h 2002-08-29 21:40:18.000000000 +0000 *************** crtbegin.o%s \ *** 112,118 **** GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF anyway so it is the default. */ ! #define DBX_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG --- 112,118 ---- GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF anyway so it is the default. */ ! #define DBX_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sp86x-elf.h gcc-3.3/gcc/config/sparc/sp86x-elf.h *** gcc-3.2.3/gcc/config/sparc/sp86x-elf.h 2002-03-31 03:10:18.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sp86x-elf.h 2002-08-29 21:40:18.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,33 **** /* Default to dwarf2 in ELF. */ ! #undef DWARF_DEBUGGING_INFO ! #define DWARF_DEBUGGING_INFO ! #undef DWARF2_DEBUGGING_INFO ! #define DWARF2_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG --- 24,31 ---- /* Default to dwarf2 in ELF. */ ! #define DWARF_DEBUGGING_INFO 1 ! #define DWARF2_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sparc.c gcc-3.3/gcc/config/sparc/sparc.c *** gcc-3.2.3/gcc/config/sparc/sparc.c 2002-09-26 10:20:03.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sparc.c 2003-04-28 17:55:35.000000000 +0000 *************** *** 1,6 **** /* Subroutines for insn-output.c for Sun SPARC. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, at Cygnus Support. --- 1,6 ---- /* Subroutines for insn-output.c for Sun SPARC. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, at Cygnus Support. *************** rtx sparc_compare_op0, sparc_compare_op1 *** 80,87 **** sparc_nonflat_function_epilogue. */ bool sparc_emitting_epilogue; - #ifdef LEAF_REGISTERS - /* Vector to say how input registers are mapped to output registers. HARD_FRAME_POINTER_REGNUM cannot be remapped by this function to eliminate it. You must use -fomit-frame-pointer to get that. */ --- 80,85 ---- *************** char sparc_leaf_regs[] = *** 119,126 **** 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - #endif - /* Name of where we pretend to think the frame pointer points. Normally, this is "%fp", but if we are in a leaf procedure, this is "%sp+something". We record "something" separately as it may be --- 117,122 ---- *************** static int function_arg_slotno PARAMS (( *** 140,161 **** static int supersparc_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int hypersparc_adjust_cost PARAMS ((rtx, rtx, rtx, int)); - static int ultrasparc_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static void sparc_output_addr_vec PARAMS ((rtx)); static void sparc_output_addr_diff_vec PARAMS ((rtx)); static void sparc_output_deferred_case_vectors PARAMS ((void)); - static void sparc_add_gc_roots PARAMS ((void)); - static void mark_ultrasparc_pipeline_state PARAMS ((void *)); static int check_return_regs PARAMS ((rtx)); static int epilogue_renumber PARAMS ((rtx *, int)); static bool sparc_assemble_integer PARAMS ((rtx, unsigned int, int)); - static int ultra_cmove_results_ready_p PARAMS ((rtx)); - static int ultra_fpmode_conflict_exists PARAMS ((enum machine_mode)); - static rtx *ultra_find_type PARAMS ((int, rtx *, int)); - static void ultra_build_types_avail PARAMS ((rtx *, int)); - static void ultra_flush_pipeline PARAMS ((void)); - static void ultra_rescan_pipeline_state PARAMS ((rtx *, int)); static int set_extends PARAMS ((rtx)); static void output_restore_regs PARAMS ((FILE *, int)); static void sparc_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); --- 136,148 ---- *************** static void sparc_nonflat_function_prolo *** 169,189 **** #ifdef OBJECT_FORMAT_ELF static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int)); #endif ! static void ultrasparc_sched_reorder PARAMS ((FILE *, int, rtx *, int)); ! static int ultrasparc_variable_issue PARAMS ((rtx)); ! static void ultrasparc_sched_init PARAMS ((void)); static int sparc_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int sparc_issue_rate PARAMS ((void)); - static int sparc_variable_issue PARAMS ((FILE *, int, rtx, int)); static void sparc_sched_init PARAMS ((FILE *, int, int)); ! static int sparc_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int)); static void emit_soft_tfmode_libcall PARAMS ((const char *, int, rtx *)); static void emit_soft_tfmode_binop PARAMS ((enum rtx_code, rtx *)); static void emit_soft_tfmode_unop PARAMS ((enum rtx_code, rtx *)); static void emit_soft_tfmode_cvt PARAMS ((enum rtx_code, rtx *)); static void emit_hard_tfmode_operation PARAMS ((enum rtx_code, rtx *)); /* Option handling. */ --- 156,183 ---- #ifdef OBJECT_FORMAT_ELF static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int)); #endif ! static void sparc_aout_select_section PARAMS ((tree, int, ! unsigned HOST_WIDE_INT)) ! ATTRIBUTE_UNUSED; ! static void sparc_aout_select_rtx_section PARAMS ((enum machine_mode, rtx, ! unsigned HOST_WIDE_INT)) ! ATTRIBUTE_UNUSED; static int sparc_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int sparc_issue_rate PARAMS ((void)); static void sparc_sched_init PARAMS ((FILE *, int, int)); ! static int sparc_use_dfa_pipeline_interface PARAMS ((void)); ! static int sparc_use_sched_lookahead PARAMS ((void)); static void emit_soft_tfmode_libcall PARAMS ((const char *, int, rtx *)); static void emit_soft_tfmode_binop PARAMS ((enum rtx_code, rtx *)); static void emit_soft_tfmode_unop PARAMS ((enum rtx_code, rtx *)); static void emit_soft_tfmode_cvt PARAMS ((enum rtx_code, rtx *)); static void emit_hard_tfmode_operation PARAMS ((enum rtx_code, rtx *)); + + static void sparc_encode_section_info PARAMS ((tree, int)); + static void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); /* Option handling. */ *************** enum processor_type sparc_cpu; *** 237,248 **** #define TARGET_SCHED_ADJUST_COST sparc_adjust_cost #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE sparc_issue_rate - #undef TARGET_SCHED_VARIABLE_ISSUE - #define TARGET_SCHED_VARIABLE_ISSUE sparc_variable_issue #undef TARGET_SCHED_INIT #define TARGET_SCHED_INIT sparc_sched_init ! #undef TARGET_SCHED_REORDER ! #define TARGET_SCHED_REORDER sparc_sched_reorder struct gcc_target targetm = TARGET_INITIALIZER; --- 231,250 ---- #define TARGET_SCHED_ADJUST_COST sparc_adjust_cost #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE sparc_issue_rate #undef TARGET_SCHED_INIT #define TARGET_SCHED_INIT sparc_sched_init ! #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE ! #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE sparc_use_dfa_pipeline_interface ! #undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD ! #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD sparc_use_sched_lookahead ! ! #undef TARGET_ENCODE_SECTION_INFO ! #define TARGET_ENCODE_SECTION_INFO sparc_encode_section_info ! ! #undef TARGET_ASM_OUTPUT_MI_THUNK ! #define TARGET_ASM_OUTPUT_MI_THUNK sparc_output_mi_thunk ! #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK ! #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall struct gcc_target targetm = TARGET_INITIALIZER; *************** sparc_override_options () *** 279,284 **** --- 281,287 ---- { TARGET_CPU_supersparc, "supersparc" }, { TARGET_CPU_v9, "v9" }, { TARGET_CPU_ultrasparc, "ultrasparc" }, + { TARGET_CPU_ultrasparc3, "ultrasparc3" }, { 0, 0 } }; const struct cpu_default *def; *************** sparc_override_options () *** 311,316 **** --- 314,322 ---- /* Although insns using %y are deprecated, it is a clear win on current ultrasparcs. */ |MASK_DEPRECATED_V8_INSNS}, + /* TI ultrasparc III */ + /* ??? Check if %y issue still holds true in ultra3. */ + { "ultrasparc3", PROCESSOR_ULTRASPARC3, MASK_ISA, MASK_V9|MASK_DEPRECATED_V8_INSNS}, { 0, 0, 0, 0 } }; const struct cpu_table *cpu; *************** sparc_override_options () *** 423,429 **** target_flags &= ~MASK_STACK_BIAS; /* Supply a default value for align_functions. */ ! if (align_functions == 0 && sparc_cpu == PROCESSOR_ULTRASPARC) align_functions = 32; /* Validate PCC_STRUCT_RETURN. */ --- 429,437 ---- target_flags &= ~MASK_STACK_BIAS; /* Supply a default value for align_functions. */ ! if (align_functions == 0 ! && (sparc_cpu == PROCESSOR_ULTRASPARC ! || sparc_cpu == PROCESSOR_ULTRASPARC3)) align_functions = 32; /* Validate PCC_STRUCT_RETURN. */ *************** sparc_override_options () *** 436,444 **** /* Do various machine dependent initializations. */ sparc_init_modes (); - - /* Register global variables with the garbage collector. */ - sparc_add_gc_roots (); } /* Miscellaneous utilities. */ --- 444,449 ---- *************** v9_regcmp_p (code) *** 457,463 **** /* Operand constraints. */ ! /* Return non-zero only if OP is a register of mode MODE, or const0_rtx. */ int --- 462,468 ---- /* Operand constraints. */ ! /* Return nonzero only if OP is a register of mode MODE, or const0_rtx. */ int *************** reg_or_0_operand (op, mode) *** 478,483 **** --- 483,498 ---- return 0; } + /* Return nonzero only if OP is const1_rtx. */ + + int + const1_operand (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + return op == const1_rtx; + } + /* Nonzero if OP is a floating point value with value 0.0. */ int *************** sparc_emit_set_const32 (op0, op1) *** 1378,1386 **** && (INTVAL (op1) & 0x80000000) != 0) emit_insn (gen_rtx_SET (VOIDmode, temp, ! gen_rtx_CONST_DOUBLE (VOIDmode, ! INTVAL (op1) & ~(HOST_WIDE_INT)0x3ff, ! 0))); else emit_insn (gen_rtx_SET (VOIDmode, temp, GEN_INT (INTVAL (op1) --- 1393,1400 ---- && (INTVAL (op1) & 0x80000000) != 0) emit_insn (gen_rtx_SET (VOIDmode, temp, ! immed_double_const (INTVAL (op1) & ~(HOST_WIDE_INT)0x3ff, ! 0, DImode))); else emit_insn (gen_rtx_SET (VOIDmode, temp, GEN_INT (INTVAL (op1) *************** sparc_emit_set_const32 (op0, op1) *** 1403,1409 **** } ! /* Sparc-v9 code-model support. */ void sparc_emit_set_symbolic_const64 (op0, op1, temp1) rtx op0; --- 1417,1423 ---- } ! /* SPARC-v9 code-model support. */ void sparc_emit_set_symbolic_const64 (op0, op1, temp1) rtx op0; *************** static rtx gen_safe_XOR64 PARAMS ((rtx, *** 1558,1568 **** #define GEN_INT64(__x) GEN_INT (__x) #else #define GEN_HIGHINT64(__x) \ ! gen_rtx_CONST_DOUBLE (VOIDmode, (__x) & ~(HOST_WIDE_INT)0x3ff, 0) #define GEN_INT64(__x) \ ! gen_rtx_CONST_DOUBLE (VOIDmode, (__x) & 0xffffffff, \ ! ((__x) & 0x80000000 \ ! ? -1 : 0)) #endif /* The optimizer is not to assume anything about exactly --- 1572,1581 ---- #define GEN_INT64(__x) GEN_INT (__x) #else #define GEN_HIGHINT64(__x) \ ! immed_double_const ((__x) & ~(HOST_WIDE_INT)0x3ff, 0, DImode) #define GEN_INT64(__x) \ ! immed_double_const ((__x) & 0xffffffff, \ ! ((__x) & 0x80000000 ? -1 : 0), DImode) #endif /* The optimizer is not to assume anything about exactly *************** sparc_emit_set_const64 (op0, op1) *** 2132,2140 **** negated_const = GEN_INT (((~low_bits) & 0xfffffc00) | (((HOST_WIDE_INT)((~high_bits) & 0xffffffff))<<32)); #else ! negated_const = gen_rtx_CONST_DOUBLE (DImode, ! (~low_bits) & 0xfffffc00, ! (~high_bits) & 0xffffffff); #endif sparc_emit_set_const64 (temp, negated_const); } --- 2145,2153 ---- negated_const = GEN_INT (((~low_bits) & 0xfffffc00) | (((HOST_WIDE_INT)((~high_bits) & 0xffffffff))<<32)); #else ! negated_const = immed_double_const ((~low_bits) & 0xfffffc00, ! (~high_bits) & 0xffffffff, ! DImode); #endif sparc_emit_set_const64 (temp, negated_const); } *************** check_return_regs (x) *** 3055,3071 **** } - /* Return 1 if TRIAL references only in and global registers. */ - int - eligible_for_return_delay (trial) - rtx trial; - { - if (GET_CODE (PATTERN (trial)) != SET) - return 0; - - return check_return_regs (PATTERN (trial)); - } - int short_branch (uid1, uid2) int uid1, uid2; --- 3068,3073 ---- *************** short_branch (uid1, uid2) *** 3079,3085 **** return 0; } ! /* Return non-zero if REG is not used after INSN. We assume REG is a reload reg, and therefore does not live past labels or calls or jumps. */ int --- 3081,3087 ---- return 0; } ! /* Return nonzero if REG is not used after INSN. We assume REG is a reload reg, and therefore does not live past labels or calls or jumps. */ int *************** reg_unused_after (reg, insn) *** 3115,3124 **** } /* The table we use to reference PIC data. */ ! static rtx global_offset_table; /* The function we use to get at it. */ ! static rtx get_pc_symbol; static char get_pc_symbol_name[256]; /* Ensure that we are not using patterns that are not OK with PIC. */ --- 3117,3126 ---- } /* The table we use to reference PIC data. */ ! static GTY(()) rtx global_offset_table; /* The function we use to get at it. */ ! static GTY(()) rtx get_pc_symbol; static char get_pc_symbol_name[256]; /* Ensure that we are not using patterns that are not OK with PIC. */ *************** pic_address_needs_scratch (x) *** 3163,3169 **** /* Legitimize PIC addresses. If the address is already position-independent, we return ORIG. Newly generated position-independent addresses go into a ! reg. This is REG if non zero, otherwise we allocate register(s) as necessary. */ rtx --- 3165,3171 ---- /* Legitimize PIC addresses. If the address is already position-independent, we return ORIG. Newly generated position-independent addresses go into a ! reg. This is REG if nonzero, otherwise we allocate register(s) as necessary. */ rtx *************** function_arg_record_value_2 (type, start *** 4762,4768 **** } /* Used by function_arg and function_value to implement the complex ! Sparc64 structure calling conventions. */ static rtx function_arg_record_value (type, mode, slotno, named, regbase) --- 4764,4770 ---- } /* Used by function_arg and function_value to implement the complex ! SPARC64 structure calling conventions. */ static rtx function_arg_record_value (type, mode, slotno, named, regbase) *************** sparc_builtin_saveregs () *** 5249,5261 **** /* Implement `va_start' for varargs and stdarg. */ void ! sparc_va_start (stdarg_p, valist, nextarg) ! int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg; { nextarg = expand_builtin_saveregs (); ! std_expand_builtin_va_start (1, valist, nextarg); } /* Implement `va_arg'. */ --- 5251,5262 ---- /* Implement `va_start' for varargs and stdarg. */ void ! sparc_va_start (valist, nextarg) tree valist; rtx nextarg; { nextarg = expand_builtin_saveregs (); ! std_expand_builtin_va_start (valist, nextarg); } /* Implement `va_arg'. */ *************** sparc_va_arg (valist, type) *** 5353,5359 **** PUT_MODE (tmp, BLKmode); set_mem_alias_set (tmp, 0); ! dest_addr = emit_block_move (tmp, addr_rtx, GEN_INT (rsize)); if (dest_addr != NULL_RTX) addr_rtx = dest_addr; else --- 5354,5361 ---- PUT_MODE (tmp, BLKmode); set_mem_alias_set (tmp, 0); ! dest_addr = emit_block_move (tmp, addr_rtx, GEN_INT (rsize), ! BLOCK_OP_NORMAL); if (dest_addr != NULL_RTX) addr_rtx = dest_addr; else *************** sparc_va_arg (valist, type) *** 5375,5385 **** XEXP (OP, 0) is assumed to be a condition code register (integer or floating point) and its mode specifies what kind of comparison we made. ! REVERSED is non-zero if we should reverse the sense of the comparison. ! ANNUL is non-zero if we should generate an annulling branch. ! NOOP is non-zero if we have to follow this branch by a noop. INSN, if set, is the insn. */ --- 5377,5387 ---- XEXP (OP, 0) is assumed to be a condition code register (integer or floating point) and its mode specifies what kind of comparison we made. ! REVERSED is nonzero if we should reverse the sense of the comparison. ! ANNUL is nonzero if we should generate an annulling branch. ! NOOP is nonzero if we have to follow this branch by a noop. INSN, if set, is the insn. */ *************** sparc_emit_floatunsdi (operands) *** 5808,5818 **** operand number of the reg. OP is the conditional expression. The mode of REG says what kind of comparison we made. ! REVERSED is non-zero if we should reverse the sense of the comparison. ! ANNUL is non-zero if we should generate an annulling branch. ! NOOP is non-zero if we have to follow this branch by a noop. */ char * output_v9branch (op, dest, reg, label, reversed, annul, noop, insn) --- 5810,5820 ---- operand number of the reg. OP is the conditional expression. The mode of REG says what kind of comparison we made. ! REVERSED is nonzero if we should reverse the sense of the comparison. ! ANNUL is nonzero if we should generate an annulling branch. ! NOOP is nonzero if we have to follow this branch by a noop. */ char * output_v9branch (op, dest, reg, label, reversed, annul, noop, insn) *************** print_operand (file, x, code) *** 6462,6467 **** --- 6464,6484 ---- output_address (XEXP (x, 0)); return; + case 's': + { + /* Print a sign-extended 32-bit value. */ + HOST_WIDE_INT i; + if (GET_CODE(x) == CONST_INT) + i = INTVAL (x); + else if (GET_CODE(x) == CONST_DOUBLE) + i = CONST_DOUBLE_LOW (x); + else + output_operand_lossage ("invalid %%s operand"); + i = trunc_int_for_mode (i, SImode); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, i); + return; + } + case 0: /* Do nothing special. */ break; *************** sparc_assemble_integer (x, size, aligned *** 6548,6557 **** what kind of result this function returns. For non-C types, we pick the closest C type. */ - #ifndef CHAR_TYPE_SIZE - #define CHAR_TYPE_SIZE BITS_PER_UNIT - #endif - #ifndef SHORT_TYPE_SIZE #define SHORT_TYPE_SIZE (BITS_PER_UNIT * 2) #endif --- 6565,6570 ---- *************** sparc_initialize_trampoline (tramp, fnad *** 6757,6763 **** /* On UltraSPARC a flush flushes an entire cache line. The trampoline is aligned on a 16 byte boundary so one flush clears it all. */ emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, tramp)))); ! if (sparc_cpu != PROCESSOR_ULTRASPARC) emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, plus_constant (tramp, 8))))); } --- 6770,6777 ---- /* On UltraSPARC a flush flushes an entire cache line. The trampoline is aligned on a 16 byte boundary so one flush clears it all. */ emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, tramp)))); ! if (sparc_cpu != PROCESSOR_ULTRASPARC ! && sparc_cpu != PROCESSOR_ULTRASPARC3) emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, plus_constant (tramp, 8))))); } *************** sparc64_initialize_trampoline (tramp, fn *** 6795,6801 **** emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, 24)), fnaddr); emit_insn (gen_flushdi (validize_mem (gen_rtx_MEM (DImode, tramp)))); ! if (sparc_cpu != PROCESSOR_ULTRASPARC) emit_insn (gen_flushdi (validize_mem (gen_rtx_MEM (DImode, plus_constant (tramp, 8))))); } --- 6809,6816 ---- emit_move_insn (gen_rtx_MEM (DImode, plus_constant (tramp, 24)), fnaddr); emit_insn (gen_flushdi (validize_mem (gen_rtx_MEM (DImode, tramp)))); ! if (sparc_cpu != PROCESSOR_ULTRASPARC ! && sparc_cpu != PROCESSOR_ULTRASPARC3) emit_insn (gen_flushdi (validize_mem (gen_rtx_MEM (DImode, plus_constant (tramp, 8))))); } *************** hypersparc_adjust_cost (insn, link, dep_ *** 7648,7804 **** } static int - ultrasparc_adjust_cost (insn, link, dep_insn, cost) - rtx insn; - rtx link; - rtx dep_insn; - int cost; - { - enum attr_type insn_type, dep_type; - rtx pat = PATTERN(insn); - rtx dep_pat = PATTERN (dep_insn); - - if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0) - return cost; - - insn_type = get_attr_type (insn); - dep_type = get_attr_type (dep_insn); - - /* Nothing issues in parallel with integer multiplies, so - mark as zero cost since the scheduler can not do anything - about it. */ - if (insn_type == TYPE_IMUL || insn_type == TYPE_IDIV) - return 0; - - #define SLOW_FP(dep_type) \ - (dep_type == TYPE_FPSQRTS || dep_type == TYPE_FPSQRTD || \ - dep_type == TYPE_FPDIVS || dep_type == TYPE_FPDIVD) - - switch (REG_NOTE_KIND (link)) - { - case 0: - /* Data dependency; DEP_INSN writes a register that INSN reads some - cycles later. */ - - if (dep_type == TYPE_CMOVE) - { - /* Instructions that read the result of conditional moves cannot - be in the same group or the following group. */ - return cost + 1; - } - - switch (insn_type) - { - /* UltraSPARC can dual issue a store and an instruction setting - the value stored, except for divide and square root. */ - case TYPE_FPSTORE: - if (! SLOW_FP (dep_type)) - return 0; - return cost; - - case TYPE_STORE: - if (GET_CODE (pat) != SET || GET_CODE (dep_pat) != SET) - return cost; - - if (rtx_equal_p (SET_DEST (dep_pat), SET_SRC (pat))) - /* The dependency between the two instructions is on the data - that is being stored. Assume that the address of the store - is not also dependent. */ - return 0; - return cost; - - case TYPE_LOAD: - case TYPE_SLOAD: - case TYPE_FPLOAD: - /* A load does not return data until at least 11 cycles after - a store to the same location. 3 cycles are accounted for - in the load latency; add the other 8 here. */ - if (dep_type == TYPE_STORE || dep_type == TYPE_FPSTORE) - { - /* If the addresses are not equal this may be a false - dependency because pointer aliasing could not be - determined. Add only 2 cycles in that case. 2 is - an arbitrary compromise between 8, which would cause - the scheduler to generate worse code elsewhere to - compensate for a dependency which might not really - exist, and 0. */ - if (GET_CODE (pat) != SET || GET_CODE (dep_pat) != SET - || GET_CODE (SET_SRC (pat)) != MEM - || GET_CODE (SET_DEST (dep_pat)) != MEM - || ! rtx_equal_p (XEXP (SET_SRC (pat), 0), - XEXP (SET_DEST (dep_pat), 0))) - return cost + 2; - - return cost + 8; - } - return cost; - - case TYPE_BRANCH: - /* Compare to branch latency is 0. There is no benefit from - separating compare and branch. */ - if (dep_type == TYPE_COMPARE) - return 0; - /* Floating point compare to branch latency is less than - compare to conditional move. */ - if (dep_type == TYPE_FPCMP) - return cost - 1; - return cost; - - case TYPE_FPCMOVE: - /* FMOVR class instructions can not issue in the same cycle - or the cycle after an instruction which writes any - integer register. Model this as cost 2 for dependent - instructions. */ - if (dep_type == TYPE_IALU - && cost < 2) - return 2; - /* Otherwise check as for integer conditional moves. */ - - case TYPE_CMOVE: - /* Conditional moves involving integer registers wait until - 3 cycles after loads return data. The interlock applies - to all loads, not just dependent loads, but that is hard - to model. */ - if (dep_type == TYPE_LOAD || dep_type == TYPE_SLOAD) - return cost + 3; - return cost; - - default: - break; - } - break; - - case REG_DEP_ANTI: - /* Divide and square root lock destination registers for full latency. */ - if (! SLOW_FP (dep_type)) - return 0; - break; - - case REG_DEP_OUTPUT: - /* IEU and FPU instruction that have the same destination - register cannot be grouped together. */ - return cost + 1; - - default: - break; - } - - /* Other costs not accounted for: - - Single precision floating point loads lock the other half of - the even/odd register pair. - - Several hazards associated with ldd/std are ignored because these - instructions are rarely generated for V9. - - The floating point pipeline can not have both a single and double - precision operation active at the same time. Format conversions - and graphics instructions are given honorary double precision status. - - call and jmpl are always the first instruction in a group. */ - - return cost; - - #undef SLOW_FP - } - - static int sparc_adjust_cost(insn, link, dep, cost) rtx insn; rtx link; --- 7663,7668 ---- *************** sparc_adjust_cost(insn, link, dep, cost) *** 7814,8605 **** case PROCESSOR_SPARCLITE86X: cost = hypersparc_adjust_cost (insn, link, dep, cost); break; - case PROCESSOR_ULTRASPARC: - cost = ultrasparc_adjust_cost (insn, link, dep, cost); - break; default: break; } return cost; } - /* This describes the state of the UltraSPARC pipeline during - instruction scheduling. */ - - #define TMASK(__x) ((unsigned)1 << ((int)(__x))) - #define UMASK(__x) ((unsigned)1 << ((int)(__x))) - - enum ultra_code { NONE=0, /* no insn at all */ - IEU0, /* shifts and conditional moves */ - IEU1, /* condition code setting insns, calls+jumps */ - IEUN, /* all other single cycle ieu insns */ - LSU, /* loads and stores */ - CTI, /* branches */ - FPM, /* FPU pipeline 1, multiplies and divides */ - FPA, /* FPU pipeline 2, all other operations */ - SINGLE, /* single issue instructions */ - NUM_ULTRA_CODES }; - - static enum ultra_code ultra_code_from_mask PARAMS ((int)); - static void ultra_schedule_insn PARAMS ((rtx *, rtx *, int, enum ultra_code)); - - static const char *const ultra_code_names[NUM_ULTRA_CODES] = { - "NONE", "IEU0", "IEU1", "IEUN", "LSU", "CTI", - "FPM", "FPA", "SINGLE" }; - - struct ultrasparc_pipeline_state { - /* The insns in this group. */ - rtx group[4]; - - /* The code for each insn. */ - enum ultra_code codes[4]; - - /* Which insns in this group have been committed by the - scheduler. This is how we determine how many more - can issue this cycle. */ - char commit[4]; - - /* How many insns in this group. */ - char group_size; - - /* Mask of free slots still in this group. */ - char free_slot_mask; - - /* The slotter uses the following to determine what other - insn types can still make their way into this group. */ - char contents [NUM_ULTRA_CODES]; - char num_ieu_insns; - }; - - #define ULTRA_NUM_HIST 8 - static struct ultrasparc_pipeline_state ultra_pipe_hist[ULTRA_NUM_HIST]; - static int ultra_cur_hist; - static int ultra_cycles_elapsed; - - #define ultra_pipe (ultra_pipe_hist[ultra_cur_hist]) - - /* Given TYPE_MASK compute the ultra_code it has. */ - static enum ultra_code - ultra_code_from_mask (type_mask) - int type_mask; - { - if (type_mask & (TMASK (TYPE_SHIFT) | TMASK (TYPE_CMOVE))) - return IEU0; - else if (type_mask & (TMASK (TYPE_COMPARE) | - TMASK (TYPE_CALL) | - TMASK (TYPE_SIBCALL) | - TMASK (TYPE_UNCOND_BRANCH))) - return IEU1; - else if (type_mask & TMASK (TYPE_IALU)) - return IEUN; - else if (type_mask & (TMASK (TYPE_LOAD) | TMASK (TYPE_SLOAD) | - TMASK (TYPE_STORE) | TMASK (TYPE_FPLOAD) | - TMASK (TYPE_FPSTORE))) - return LSU; - else if (type_mask & (TMASK (TYPE_FPMUL) | TMASK (TYPE_FPDIVS) | - TMASK (TYPE_FPDIVD) | TMASK (TYPE_FPSQRTS) | - TMASK (TYPE_FPSQRTD))) - return FPM; - else if (type_mask & (TMASK (TYPE_FPMOVE) | TMASK (TYPE_FPCMOVE) | - TMASK (TYPE_FP) | TMASK (TYPE_FPCMP))) - return FPA; - else if (type_mask & TMASK (TYPE_BRANCH)) - return CTI; - - return SINGLE; - } - - /* Check INSN (a conditional move) and make sure that it's - results are available at this cycle. Return 1 if the - results are in fact ready. */ - static int - ultra_cmove_results_ready_p (insn) - rtx insn; - { - struct ultrasparc_pipeline_state *up; - int entry, slot; - - /* If this got dispatched in the previous - group, the results are not ready. */ - entry = (ultra_cur_hist - 1) & (ULTRA_NUM_HIST - 1); - up = &ultra_pipe_hist[entry]; - slot = 4; - while (--slot >= 0) - if (up->group[slot] == insn) - return 0; - - return 1; - } - - /* Walk backwards in pipeline history looking for FPU - operations which use a mode different than FPMODE and - will create a stall if an insn using FPMODE were to be - dispatched this cycle. */ - static int - ultra_fpmode_conflict_exists (fpmode) - enum machine_mode fpmode; - { - int hist_ent; - int hist_lim; - - hist_ent = (ultra_cur_hist - 1) & (ULTRA_NUM_HIST - 1); - if (ultra_cycles_elapsed < 4) - hist_lim = ultra_cycles_elapsed; - else - hist_lim = 4; - while (hist_lim > 0) - { - struct ultrasparc_pipeline_state *up = &ultra_pipe_hist[hist_ent]; - int slot = 4; - - while (--slot >= 0) - { - rtx insn = up->group[slot]; - enum machine_mode this_mode; - rtx pat; - - if (! insn - || GET_CODE (insn) != INSN - || (pat = PATTERN (insn)) == 0 - || GET_CODE (pat) != SET) - continue; - - this_mode = GET_MODE (SET_DEST (pat)); - if ((this_mode != SFmode - && this_mode != DFmode) - || this_mode == fpmode) - continue; - - /* If it is not FMOV, FABS, FNEG, FDIV, or FSQRT then - we will get a stall. Loads and stores are independent - of these rules. */ - if (GET_CODE (SET_SRC (pat)) != ABS - && GET_CODE (SET_SRC (pat)) != NEG - && ((TMASK (get_attr_type (insn)) & - (TMASK (TYPE_FPDIVS) | TMASK (TYPE_FPDIVD) | - TMASK (TYPE_FPMOVE) | TMASK (TYPE_FPSQRTS) | - TMASK (TYPE_FPSQRTD) | - TMASK (TYPE_LOAD) | TMASK (TYPE_STORE))) == 0)) - return 1; - } - hist_lim--; - hist_ent = (hist_ent - 1) & (ULTRA_NUM_HIST - 1); - } - - /* No conflicts, safe to dispatch. */ - return 0; - } - - /* Find an instruction in LIST which has one of the - type attributes enumerated in TYPE_MASK. START - says where to begin the search. - - NOTE: This scheme depends upon the fact that we - have less than 32 distinct type attributes. */ - - static int ultra_types_avail; - - static rtx * - ultra_find_type (type_mask, list, start) - int type_mask; - rtx *list; - int start; - { - int i; - - /* Short circuit if no such insn exists in the ready - at the moment. */ - if ((type_mask & ultra_types_avail) == 0) - return 0; - - for (i = start; i >= 0; i--) - { - rtx insn = list[i]; - - if (recog_memoized (insn) >= 0 - && (TMASK(get_attr_type (insn)) & type_mask)) - { - enum machine_mode fpmode = SFmode; - rtx pat = 0; - int slot; - int check_depend = 0; - int check_fpmode_conflict = 0; - - if (GET_CODE (insn) == INSN - && (pat = PATTERN(insn)) != 0 - && GET_CODE (pat) == SET - && !(type_mask & (TMASK (TYPE_STORE) | - TMASK (TYPE_FPSTORE)))) - { - check_depend = 1; - if (GET_MODE (SET_DEST (pat)) == SFmode - || GET_MODE (SET_DEST (pat)) == DFmode) - { - fpmode = GET_MODE (SET_DEST (pat)); - check_fpmode_conflict = 1; - } - } - - slot = 4; - while(--slot >= 0) - { - rtx slot_insn = ultra_pipe.group[slot]; - rtx slot_pat; - - /* Already issued, bad dependency, or FPU - mode conflict. */ - if (slot_insn != 0 - && (slot_pat = PATTERN (slot_insn)) != 0 - && ((insn == slot_insn) - || (check_depend == 1 - && GET_CODE (slot_insn) == INSN - && GET_CODE (slot_pat) == SET - && ((GET_CODE (SET_DEST (slot_pat)) == REG - && GET_CODE (SET_SRC (pat)) == REG - && REGNO (SET_DEST (slot_pat)) == - REGNO (SET_SRC (pat))) - || (GET_CODE (SET_DEST (slot_pat)) == SUBREG - && GET_CODE (SET_SRC (pat)) == SUBREG - && REGNO (SUBREG_REG (SET_DEST (slot_pat))) == - REGNO (SUBREG_REG (SET_SRC (pat))) - && SUBREG_BYTE (SET_DEST (slot_pat)) == - SUBREG_BYTE (SET_SRC (pat))))) - || (check_fpmode_conflict == 1 - && GET_CODE (slot_insn) == INSN - && GET_CODE (slot_pat) == SET - && (GET_MODE (SET_DEST (slot_pat)) == SFmode - || GET_MODE (SET_DEST (slot_pat)) == DFmode) - && GET_MODE (SET_DEST (slot_pat)) != fpmode))) - goto next; - } - - /* Check for peculiar result availability and dispatch - interference situations. */ - if (pat != 0 - && ultra_cycles_elapsed > 0) - { - rtx link; - - for (link = LOG_LINKS (insn); link; link = XEXP (link, 1)) - { - rtx link_insn = XEXP (link, 0); - if (GET_CODE (link_insn) == INSN - && recog_memoized (link_insn) >= 0 - && (TMASK (get_attr_type (link_insn)) & - (TMASK (TYPE_CMOVE) | TMASK (TYPE_FPCMOVE))) - && ! ultra_cmove_results_ready_p (link_insn)) - goto next; - } - - if (check_fpmode_conflict - && ultra_fpmode_conflict_exists (fpmode)) - goto next; - } - - return &list[i]; - } - next: - ; - } - return 0; - } - - static void - ultra_build_types_avail (ready, n_ready) - rtx *ready; - int n_ready; - { - int i = n_ready - 1; - - ultra_types_avail = 0; - while(i >= 0) - { - rtx insn = ready[i]; - - if (recog_memoized (insn) >= 0) - ultra_types_avail |= TMASK (get_attr_type (insn)); - - i -= 1; - } - } - - /* Place insn pointed to my IP into the pipeline. - Make element THIS of READY be that insn if it - is not already. TYPE indicates the pipeline class - this insn falls into. */ - static void - ultra_schedule_insn (ip, ready, this, type) - rtx *ip; - rtx *ready; - int this; - enum ultra_code type; - { - int pipe_slot; - char mask = ultra_pipe.free_slot_mask; - rtx temp; - - /* Obtain free slot. */ - for (pipe_slot = 0; pipe_slot < 4; pipe_slot++) - if ((mask & (1 << pipe_slot)) != 0) - break; - if (pipe_slot == 4) - abort (); - - /* In it goes, and it hasn't been committed yet. */ - ultra_pipe.group[pipe_slot] = *ip; - ultra_pipe.codes[pipe_slot] = type; - ultra_pipe.contents[type] = 1; - if (UMASK (type) & - (UMASK (IEUN) | UMASK (IEU0) | UMASK (IEU1))) - ultra_pipe.num_ieu_insns += 1; - - ultra_pipe.free_slot_mask = (mask & ~(1 << pipe_slot)); - ultra_pipe.group_size += 1; - ultra_pipe.commit[pipe_slot] = 0; - - /* Update ready list. */ - temp = *ip; - while (ip != &ready[this]) - { - ip[0] = ip[1]; - ++ip; - } - *ip = temp; - } - - /* Advance to the next pipeline group. */ - static void - ultra_flush_pipeline () - { - ultra_cur_hist = (ultra_cur_hist + 1) & (ULTRA_NUM_HIST - 1); - ultra_cycles_elapsed += 1; - memset ((char *) &ultra_pipe, 0, sizeof ultra_pipe); - ultra_pipe.free_slot_mask = 0xf; - } - - /* Init our data structures for this current block. */ - static void - ultrasparc_sched_init () - { - memset ((char *) ultra_pipe_hist, 0, sizeof ultra_pipe_hist); - ultra_cur_hist = 0; - ultra_cycles_elapsed = 0; - ultra_pipe.free_slot_mask = 0xf; - } - static void sparc_sched_init (dump, sched_verbose, max_ready) FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED; int max_ready ATTRIBUTE_UNUSED; { - if (sparc_cpu == PROCESSOR_ULTRASPARC) - ultrasparc_sched_init (); } - /* INSN has been scheduled, update pipeline commit state - and return how many instructions are still to be - scheduled in this group. */ static int ! ultrasparc_variable_issue (insn) ! rtx insn; { ! struct ultrasparc_pipeline_state *up = &ultra_pipe; ! int i, left_to_fire; ! ! left_to_fire = 0; ! for (i = 0; i < 4; i++) ! { ! if (up->group[i] == 0) ! continue; ! ! if (up->group[i] == insn) ! { ! up->commit[i] = 1; ! } ! else if (! up->commit[i]) ! left_to_fire++; ! } ! ! return left_to_fire; } static int ! sparc_variable_issue (dump, sched_verbose, insn, cim) ! FILE *dump ATTRIBUTE_UNUSED; ! int sched_verbose ATTRIBUTE_UNUSED; ! rtx insn; ! int cim; ! { ! if (sparc_cpu == PROCESSOR_ULTRASPARC) ! return ultrasparc_variable_issue (insn); ! else ! return cim - 1; ! } ! ! /* In actual_hazard_this_instance, we may have yanked some ! instructions from the ready list due to conflict cost ! adjustments. If so, and such an insn was in our pipeline ! group, remove it and update state. */ ! static void ! ultra_rescan_pipeline_state (ready, n_ready) ! rtx *ready; ! int n_ready; ! { ! struct ultrasparc_pipeline_state *up = &ultra_pipe; ! int i; ! ! for (i = 0; i < 4; i++) ! { ! rtx insn = up->group[i]; ! int j; ! ! if (! insn) ! continue; ! ! /* If it has been committed, then it was removed from ! the ready list because it was actually scheduled, ! and that is not the case we are searching for here. */ ! if (up->commit[i] != 0) ! continue; ! ! for (j = n_ready - 1; j >= 0; j--) ! if (ready[j] == insn) ! break; ! ! /* If we didn't find it, toss it. */ ! if (j < 0) ! { ! enum ultra_code ucode = up->codes[i]; ! ! up->group[i] = 0; ! up->codes[i] = NONE; ! up->contents[ucode] = 0; ! if (UMASK (ucode) & ! (UMASK (IEUN) | UMASK (IEU0) | UMASK (IEU1))) ! up->num_ieu_insns -= 1; ! ! up->free_slot_mask |= (1 << i); ! up->group_size -= 1; ! up->commit[i] = 0; ! } ! } ! } ! ! static void ! ultrasparc_sched_reorder (dump, sched_verbose, ready, n_ready) ! FILE *dump; ! int sched_verbose; ! rtx *ready; ! int n_ready; { ! struct ultrasparc_pipeline_state *up = &ultra_pipe; ! int i, this_insn; ! ! if (sched_verbose) ! { ! int n; ! ! fprintf (dump, "\n;;\tUltraSPARC Looking at ["); ! for (n = n_ready - 1; n >= 0; n--) ! { ! rtx insn = ready[n]; ! enum ultra_code ucode; ! ! if (recog_memoized (insn) < 0) ! continue; ! ucode = ultra_code_from_mask (TMASK (get_attr_type (insn))); ! if (n != 0) ! fprintf (dump, "%s(%d) ", ! ultra_code_names[ucode], ! INSN_UID (insn)); ! else ! fprintf (dump, "%s(%d)", ! ultra_code_names[ucode], ! INSN_UID (insn)); ! } ! fprintf (dump, "]\n"); ! } ! ! this_insn = n_ready - 1; ! ! /* Skip over junk we don't understand. */ ! while ((this_insn >= 0) ! && recog_memoized (ready[this_insn]) < 0) ! this_insn--; ! ! ultra_build_types_avail (ready, this_insn + 1); ! ! while (this_insn >= 0) { ! int old_group_size = up->group_size; ! ! if (up->group_size != 0) ! { ! int num_committed; ! ! num_committed = (up->commit[0] + up->commit[1] + ! up->commit[2] + up->commit[3]); ! /* If nothing has been commited from our group, or all of ! them have. Clear out the (current cycle's) pipeline ! state and start afresh. */ ! if (num_committed == 0 ! || num_committed == up->group_size) ! { ! ultra_flush_pipeline (); ! up = &ultra_pipe; ! old_group_size = 0; ! } ! else ! { ! /* OK, some ready list insns got requeued and thus removed ! from the ready list. Account for this fact. */ ! ultra_rescan_pipeline_state (ready, n_ready); ! ! /* Something "changed", make this look like a newly ! formed group so the code at the end of the loop ! knows that progress was in fact made. */ ! if (up->group_size != old_group_size) ! old_group_size = 0; ! } ! } ! ! if (up->group_size == 0) ! { ! /* If the pipeline is (still) empty and we have any single ! group insns, get them out now as this is a good time. */ ! rtx *ip = ultra_find_type ((TMASK (TYPE_RETURN) | TMASK (TYPE_IDIV) | ! TMASK (TYPE_IMUL) | TMASK (TYPE_CMOVE) | ! TMASK (TYPE_MULTI) | TMASK (TYPE_MISC)), ! ready, this_insn); ! if (ip) ! { ! ultra_schedule_insn (ip, ready, this_insn, SINGLE); ! break; ! } ! ! /* If we are not in the process of emptying out the pipe, try to ! obtain an instruction which must be the first in it's group. */ ! ip = ultra_find_type ((TMASK (TYPE_CALL) | ! TMASK (TYPE_SIBCALL) | ! TMASK (TYPE_CALL_NO_DELAY_SLOT) | ! TMASK (TYPE_UNCOND_BRANCH)), ! ready, this_insn); ! if (ip) ! { ! ultra_schedule_insn (ip, ready, this_insn, IEU1); ! this_insn--; ! } ! else if ((ip = ultra_find_type ((TMASK (TYPE_FPDIVS) | ! TMASK (TYPE_FPDIVD) | ! TMASK (TYPE_FPSQRTS) | ! TMASK (TYPE_FPSQRTD)), ! ready, this_insn)) != 0) ! { ! ultra_schedule_insn (ip, ready, this_insn, FPM); ! this_insn--; ! } ! } ! ! /* Try to fill the integer pipeline. First, look for an IEU0 specific ! operation. We can't do more IEU operations if the first 3 slots are ! all full or we have dispatched two IEU insns already. */ ! if ((up->free_slot_mask & 0x7) != 0 ! && up->num_ieu_insns < 2 ! && up->contents[IEU0] == 0 ! && up->contents[IEUN] == 0) ! { ! rtx *ip = ultra_find_type (TMASK(TYPE_SHIFT), ready, this_insn); ! if (ip) ! { ! ultra_schedule_insn (ip, ready, this_insn, IEU0); ! this_insn--; ! } ! } ! ! /* If we can, try to find an IEU1 specific or an unnamed ! IEU instruction. */ ! if ((up->free_slot_mask & 0x7) != 0 ! && up->num_ieu_insns < 2) ! { ! rtx *ip = ultra_find_type ((TMASK (TYPE_IALU) | ! (up->contents[IEU1] == 0 ? TMASK (TYPE_COMPARE) : 0)), ! ready, this_insn); ! if (ip) ! { ! rtx insn = *ip; ! ! ultra_schedule_insn (ip, ready, this_insn, ! (!up->contents[IEU1] ! && get_attr_type (insn) == TYPE_COMPARE) ! ? IEU1 : IEUN); ! this_insn--; ! } ! } ! ! /* If only one IEU insn has been found, try to find another unnamed ! IEU operation or an IEU1 specific one. */ ! if ((up->free_slot_mask & 0x7) != 0 ! && up->num_ieu_insns < 2) ! { ! rtx *ip; ! int tmask = TMASK (TYPE_IALU); ! ! if (!up->contents[IEU1]) ! tmask |= TMASK (TYPE_COMPARE); ! ip = ultra_find_type (tmask, ready, this_insn); ! if (ip) ! { ! rtx insn = *ip; ! ! ultra_schedule_insn (ip, ready, this_insn, ! (!up->contents[IEU1] ! && get_attr_type (insn) == TYPE_COMPARE) ! ? IEU1 : IEUN); ! this_insn--; ! } ! } ! ! /* Try for a load or store, but such an insn can only be issued ! if it is within' one of the first 3 slots. */ ! if ((up->free_slot_mask & 0x7) != 0 ! && up->contents[LSU] == 0) ! { ! rtx *ip = ultra_find_type ((TMASK (TYPE_LOAD) | TMASK (TYPE_SLOAD) | ! TMASK (TYPE_STORE) | TMASK (TYPE_FPLOAD) | ! TMASK (TYPE_FPSTORE)), ready, this_insn); ! if (ip) ! { ! ultra_schedule_insn (ip, ready, this_insn, LSU); ! this_insn--; ! } ! } ! ! /* Now find FPU operations, first FPM class. But not divisions or ! square-roots because those will break the group up. Unlike all ! the previous types, these can go in any slot. */ ! if (up->free_slot_mask != 0 ! && up->contents[FPM] == 0) ! { ! rtx *ip = ultra_find_type (TMASK (TYPE_FPMUL), ready, this_insn); ! if (ip) ! { ! ultra_schedule_insn (ip, ready, this_insn, FPM); ! this_insn--; ! } ! } ! ! /* Continue on with FPA class if we have not filled the group already. */ ! if (up->free_slot_mask != 0 ! && up->contents[FPA] == 0) ! { ! rtx *ip = ultra_find_type ((TMASK (TYPE_FPMOVE) | TMASK (TYPE_FPCMOVE) | ! TMASK (TYPE_FP) | TMASK (TYPE_FPCMP)), ! ready, this_insn); ! if (ip) ! { ! ultra_schedule_insn (ip, ready, this_insn, FPA); ! this_insn--; ! } ! } ! ! /* Finally, maybe stick a branch in here. */ ! if (up->free_slot_mask != 0 ! && up->contents[CTI] == 0) ! { ! rtx *ip = ultra_find_type (TMASK (TYPE_BRANCH), ready, this_insn); ! ! /* Try to slip in a branch only if it is one of the ! next 2 in the ready list. */ ! if (ip && ((&ready[this_insn] - ip) < 2)) ! { ! ultra_schedule_insn (ip, ready, this_insn, CTI); ! this_insn--; ! } ! } ! ! up->group_size = 0; ! for (i = 0; i < 4; i++) ! if ((up->free_slot_mask & (1 << i)) == 0) ! up->group_size++; ! ! /* See if we made any progress... */ ! if (old_group_size != up->group_size) ! break; ! ! /* Clean out the (current cycle's) pipeline state ! and try once more. If we placed no instructions ! into the pipeline at all, it means a real hard ! conflict exists with some earlier issued instruction ! so we must advance to the next cycle to clear it up. */ ! if (up->group_size == 0) ! { ! ultra_flush_pipeline (); ! up = &ultra_pipe; ! } ! else ! { ! memset ((char *) &ultra_pipe, 0, sizeof ultra_pipe); ! ultra_pipe.free_slot_mask = 0xf; ! } ! } ! ! if (sched_verbose) ! { ! int n, gsize; ! ! fprintf (dump, ";;\tUltraSPARC Launched ["); ! gsize = up->group_size; ! for (n = 0; n < 4; n++) ! { ! rtx insn = up->group[n]; ! ! if (! insn) ! continue; ! ! gsize -= 1; ! if (gsize != 0) ! fprintf (dump, "%s(%d) ", ! ultra_code_names[up->codes[n]], ! INSN_UID (insn)); ! else ! fprintf (dump, "%s(%d)", ! ultra_code_names[up->codes[n]], ! INSN_UID (insn)); ! } ! fprintf (dump, "]\n"); ! } } static int - sparc_sched_reorder (dump, sched_verbose, ready, n_readyp, clock) - FILE *dump; - int sched_verbose; - rtx *ready; - int *n_readyp; - int clock ATTRIBUTE_UNUSED; - { - if (sparc_cpu == PROCESSOR_ULTRASPARC) - ultrasparc_sched_reorder (dump, sched_verbose, ready, *n_readyp); - return sparc_issue_rate (); - } - - static int sparc_issue_rate () { switch (sparc_cpu) { ! default: ! return 1; ! case PROCESSOR_V9: /* Assume V9 processors are capable of at least dual-issue. */ return 2; ! case PROCESSOR_SUPERSPARC: ! return 3; case PROCESSOR_HYPERSPARC: case PROCESSOR_SPARCLITE86X: return 2; ! case PROCESSOR_ULTRASPARC: ! return 4; } } --- 7678,7740 ---- case PROCESSOR_SPARCLITE86X: cost = hypersparc_adjust_cost (insn, link, dep, cost); break; default: break; } return cost; } static void sparc_sched_init (dump, sched_verbose, max_ready) FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED; int max_ready ATTRIBUTE_UNUSED; { } static int ! sparc_use_dfa_pipeline_interface () { ! if ((1 << sparc_cpu) & ! ((1 << PROCESSOR_ULTRASPARC) | (1 << PROCESSOR_CYPRESS) | ! (1 << PROCESSOR_SUPERSPARC) | (1 << PROCESSOR_HYPERSPARC) | ! (1 << PROCESSOR_SPARCLITE86X) | (1 << PROCESSOR_TSC701) | ! (1 << PROCESSOR_ULTRASPARC3))) ! return 1; ! return 0; } static int ! sparc_use_sched_lookahead () { ! if (sparc_cpu == PROCESSOR_ULTRASPARC ! || sparc_cpu == PROCESSOR_ULTRASPARC3) ! return 4; ! if ((1 << sparc_cpu) & ! ((1 << PROCESSOR_SUPERSPARC) | (1 << PROCESSOR_HYPERSPARC) | ! (1 << PROCESSOR_SPARCLITE86X))) ! return 3; ! return 0; } static int sparc_issue_rate () { switch (sparc_cpu) { ! default: ! return 1; ! case PROCESSOR_V9: /* Assume V9 processors are capable of at least dual-issue. */ return 2; ! case PROCESSOR_SUPERSPARC: ! return 3; case PROCESSOR_HYPERSPARC: case PROCESSOR_SPARCLITE86X: return 2; ! case PROCESSOR_ULTRASPARC: ! case PROCESSOR_ULTRASPARC3: ! return 4; } } *************** set_extends (insn) *** 8668,8675 **** } /* We _ought_ to have only one kind per function, but... */ ! static rtx sparc_addr_diff_list; ! static rtx sparc_addr_list; void sparc_defer_case_vector (lab, vec, diff) --- 7803,7810 ---- } /* We _ought_ to have only one kind per function, but... */ ! static GTY(()) rtx sparc_addr_diff_list; ! static GTY(()) rtx sparc_addr_list; void sparc_defer_case_vector (lab, vec, diff) *************** sparc_profile_hook (labelno) *** 8879,8915 **** emit_library_call (fun, LCT_NORMAL, VOIDmode, 1, lab, Pmode); } - /* Mark ARG, which is really a struct ultrasparc_pipline_state *, for - GC. */ - - static void - mark_ultrasparc_pipeline_state (arg) - void *arg; - { - struct ultrasparc_pipeline_state *ups; - size_t i; - - ups = (struct ultrasparc_pipeline_state *) arg; - for (i = 0; i < sizeof (ups->group) / sizeof (rtx); ++i) - ggc_mark_rtx (ups->group[i]); - } - - /* Called to register all of our global variables with the garbage - collector. */ - - static void - sparc_add_gc_roots () - { - ggc_add_rtx_root (&sparc_compare_op0, 1); - ggc_add_rtx_root (&sparc_compare_op1, 1); - ggc_add_rtx_root (&global_offset_table, 1); - ggc_add_rtx_root (&get_pc_symbol, 1); - ggc_add_rtx_root (&sparc_addr_diff_list, 1); - ggc_add_rtx_root (&sparc_addr_list, 1); - ggc_add_root (ultra_pipe_hist, ARRAY_SIZE (ultra_pipe_hist), - sizeof (ultra_pipe_hist[0]), &mark_ultrasparc_pipeline_state); - } - #ifdef OBJECT_FORMAT_ELF static void sparc_elf_asm_named_section (name, flags) --- 8014,8019 ---- *************** sparc_elf_asm_named_section (name, flags *** 8939,8944 **** --- 8043,8078 ---- } #endif /* OBJECT_FORMAT_ELF */ + /* ??? Similar to the standard section selection, but force reloc-y-ness + if SUNOS4_SHARED_LIBRARIES. Unclear why this helps (as opposed to + pretending PIC always on), but that's what the old code did. */ + + static void + sparc_aout_select_section (t, reloc, align) + tree t; + int reloc; + unsigned HOST_WIDE_INT align; + { + default_select_section (t, reloc | SUNOS4_SHARED_LIBRARIES, align); + } + + /* Use text section for a constant unless we need more alignment than + that offers. */ + + static void + sparc_aout_select_rtx_section (mode, x, align) + enum machine_mode mode; + rtx x; + unsigned HOST_WIDE_INT align; + { + if (align <= MAX_TEXT_ALIGN + && ! (flag_pic && (symbolic_operand (x, mode) + || SUNOS4_SHARED_LIBRARIES))) + readonly_data_section (); + else + data_section (); + } + int sparc_extra_constraint_check (op, c, strict) rtx op; *************** sparc_extra_constraint_check (op, c, str *** 9001,9014 **** return reload_ok_mem; } /* Output code to add DELTA to the first argument, and then jump to FUNCTION. Used for C++ multiple inheritance. */ ! void ! sparc_output_mi_thunk (file, thunk_fndecl, delta, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; HOST_WIDE_INT delta; tree function; { rtx this, insn, funexp, delta_rtx, tmp; --- 8135,8481 ---- return reload_ok_mem; } + /* ??? This duplicates information provided to the compiler by the + ??? scheduler description. Some day, teach genautomata to output + ??? the latencies and then CSE will just use that. */ + + int + sparc_rtx_costs (x, code, outer_code) + rtx x; + enum rtx_code code, outer_code; + { + switch (code) + { + case PLUS: case MINUS: case ABS: case NEG: + case FLOAT: case UNSIGNED_FLOAT: + case FIX: case UNSIGNED_FIX: + case FLOAT_EXTEND: case FLOAT_TRUNCATE: + if (FLOAT_MODE_P (GET_MODE (x))) + { + switch (sparc_cpu) + { + case PROCESSOR_ULTRASPARC: + case PROCESSOR_ULTRASPARC3: + return COSTS_N_INSNS (4); + + case PROCESSOR_SUPERSPARC: + return COSTS_N_INSNS (3); + + case PROCESSOR_CYPRESS: + return COSTS_N_INSNS (5); + + case PROCESSOR_HYPERSPARC: + case PROCESSOR_SPARCLITE86X: + default: + return COSTS_N_INSNS (1); + } + } + + return COSTS_N_INSNS (1); + + case SQRT: + switch (sparc_cpu) + { + case PROCESSOR_ULTRASPARC: + if (GET_MODE (x) == SFmode) + return COSTS_N_INSNS (13); + else + return COSTS_N_INSNS (23); + + case PROCESSOR_ULTRASPARC3: + if (GET_MODE (x) == SFmode) + return COSTS_N_INSNS (20); + else + return COSTS_N_INSNS (29); + + case PROCESSOR_SUPERSPARC: + return COSTS_N_INSNS (12); + + case PROCESSOR_CYPRESS: + return COSTS_N_INSNS (63); + + case PROCESSOR_HYPERSPARC: + case PROCESSOR_SPARCLITE86X: + return COSTS_N_INSNS (17); + + default: + return COSTS_N_INSNS (30); + } + + case COMPARE: + if (FLOAT_MODE_P (GET_MODE (x))) + { + switch (sparc_cpu) + { + case PROCESSOR_ULTRASPARC: + case PROCESSOR_ULTRASPARC3: + return COSTS_N_INSNS (1); + + case PROCESSOR_SUPERSPARC: + return COSTS_N_INSNS (3); + + case PROCESSOR_CYPRESS: + return COSTS_N_INSNS (5); + + case PROCESSOR_HYPERSPARC: + case PROCESSOR_SPARCLITE86X: + default: + return COSTS_N_INSNS (1); + } + } + + /* ??? Maybe mark integer compares as zero cost on + ??? all UltraSPARC processors because the result + ??? can be bypassed to a branch in the same group. */ + + return COSTS_N_INSNS (1); + + case MULT: + if (FLOAT_MODE_P (GET_MODE (x))) + { + switch (sparc_cpu) + { + case PROCESSOR_ULTRASPARC: + case PROCESSOR_ULTRASPARC3: + return COSTS_N_INSNS (4); + + case PROCESSOR_SUPERSPARC: + return COSTS_N_INSNS (3); + + case PROCESSOR_CYPRESS: + return COSTS_N_INSNS (7); + + case PROCESSOR_HYPERSPARC: + case PROCESSOR_SPARCLITE86X: + return COSTS_N_INSNS (1); + + default: + return COSTS_N_INSNS (5); + } + } + + /* The latency is actually variable for Ultra-I/II + And if one of the inputs have a known constant + value, we could calculate this precisely. + + However, for that to be useful we would need to + add some machine description changes which would + make sure small constants ended up in rs1 of the + multiply instruction. This is because the multiply + latency is determined by the number of clear (or + set if the value is negative) bits starting from + the most significant bit of the first input. + + The algorithm for computing num_cycles of a multiply + on Ultra-I/II is: + + if (rs1 < 0) + highest_bit = highest_clear_bit(rs1); + else + highest_bit = highest_set_bit(rs1); + if (num_bits < 3) + highest_bit = 3; + num_cycles = 4 + ((highest_bit - 3) / 2); + + If we did that we would have to also consider register + allocation issues that would result from forcing such + a value into a register. + + There are other similar tricks we could play if we + knew, for example, that one input was an array index. + + Since we do not play any such tricks currently the + safest thing to do is report the worst case latency. */ + if (sparc_cpu == PROCESSOR_ULTRASPARC) + return (GET_MODE (x) == DImode ? + COSTS_N_INSNS (34) : COSTS_N_INSNS (19)); + + /* Multiply latency on Ultra-III, fortunately, is constant. */ + if (sparc_cpu == PROCESSOR_ULTRASPARC3) + return COSTS_N_INSNS (6); + + if (sparc_cpu == PROCESSOR_HYPERSPARC + || sparc_cpu == PROCESSOR_SPARCLITE86X) + return COSTS_N_INSNS (17); + + return (TARGET_HARD_MUL + ? COSTS_N_INSNS (5) + : COSTS_N_INSNS (25)); + + case DIV: + case UDIV: + case MOD: + case UMOD: + if (FLOAT_MODE_P (GET_MODE (x))) + { + switch (sparc_cpu) + { + case PROCESSOR_ULTRASPARC: + if (GET_MODE (x) == SFmode) + return COSTS_N_INSNS (13); + else + return COSTS_N_INSNS (23); + + case PROCESSOR_ULTRASPARC3: + if (GET_MODE (x) == SFmode) + return COSTS_N_INSNS (17); + else + return COSTS_N_INSNS (20); + + case PROCESSOR_SUPERSPARC: + if (GET_MODE (x) == SFmode) + return COSTS_N_INSNS (6); + else + return COSTS_N_INSNS (9); + + case PROCESSOR_HYPERSPARC: + case PROCESSOR_SPARCLITE86X: + if (GET_MODE (x) == SFmode) + return COSTS_N_INSNS (8); + else + return COSTS_N_INSNS (12); + + default: + return COSTS_N_INSNS (7); + } + } + + if (sparc_cpu == PROCESSOR_ULTRASPARC) + return (GET_MODE (x) == DImode ? + COSTS_N_INSNS (68) : COSTS_N_INSNS (37)); + if (sparc_cpu == PROCESSOR_ULTRASPARC3) + return (GET_MODE (x) == DImode ? + COSTS_N_INSNS (71) : COSTS_N_INSNS (40)); + return COSTS_N_INSNS (25); + + case IF_THEN_ELSE: + /* Conditional moves. */ + switch (sparc_cpu) + { + case PROCESSOR_ULTRASPARC: + return COSTS_N_INSNS (2); + + case PROCESSOR_ULTRASPARC3: + if (FLOAT_MODE_P (GET_MODE (x))) + return COSTS_N_INSNS (3); + else + return COSTS_N_INSNS (2); + + default: + return COSTS_N_INSNS (1); + } + + case MEM: + /* If outer-code is SIGN/ZERO extension we have to subtract + out COSTS_N_INSNS (1) from whatever we return in determining + the cost. */ + switch (sparc_cpu) + { + case PROCESSOR_ULTRASPARC: + if (outer_code == ZERO_EXTEND) + return COSTS_N_INSNS (1); + else + return COSTS_N_INSNS (2); + + case PROCESSOR_ULTRASPARC3: + if (outer_code == ZERO_EXTEND) + { + if (GET_MODE (x) == QImode + || GET_MODE (x) == HImode + || outer_code == SIGN_EXTEND) + return COSTS_N_INSNS (2); + else + return COSTS_N_INSNS (1); + } + else + { + /* This handles sign extension (3 cycles) + and everything else (2 cycles). */ + return COSTS_N_INSNS (2); + } + + case PROCESSOR_SUPERSPARC: + if (FLOAT_MODE_P (GET_MODE (x)) + || outer_code == ZERO_EXTEND + || outer_code == SIGN_EXTEND) + return COSTS_N_INSNS (0); + else + return COSTS_N_INSNS (1); + + case PROCESSOR_TSC701: + if (outer_code == ZERO_EXTEND + || outer_code == SIGN_EXTEND) + return COSTS_N_INSNS (2); + else + return COSTS_N_INSNS (3); + + case PROCESSOR_CYPRESS: + if (outer_code == ZERO_EXTEND + || outer_code == SIGN_EXTEND) + return COSTS_N_INSNS (1); + else + return COSTS_N_INSNS (2); + + case PROCESSOR_HYPERSPARC: + case PROCESSOR_SPARCLITE86X: + default: + if (outer_code == ZERO_EXTEND + || outer_code == SIGN_EXTEND) + return COSTS_N_INSNS (0); + else + return COSTS_N_INSNS (1); + } + + case CONST_INT: + if (INTVAL (x) < 0x1000 && INTVAL (x) >= -0x1000) + return 0; + + /* fallthru */ + case HIGH: + return 2; + + case CONST: + case LABEL_REF: + case SYMBOL_REF: + return 4; + + case CONST_DOUBLE: + if (GET_MODE (x) == DImode) + if ((XINT (x, 3) == 0 + && (unsigned) XINT (x, 2) < 0x1000) + || (XINT (x, 3) == -1 + && XINT (x, 2) < 0 + && XINT (x, 2) >= -0x1000)) + return 0; + return 8; + + default: + abort(); + }; + } + + /* If we are referencing a function make the SYMBOL_REF special. In + the Embedded Medium/Anywhere code model, %g4 points to the data + segment so we must not add it to function addresses. */ + + static void + sparc_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (TARGET_CM_EMBMEDANY && TREE_CODE (decl) == FUNCTION_DECL) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + /* Output code to add DELTA to the first argument, and then jump to FUNCTION. Used for C++ multiple inheritance. */ ! static void ! sparc_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; tree function; { rtx this, insn, funexp, delta_rtx, tmp; *************** sparc_output_mi_thunk (file, thunk_fndec *** 9067,9069 **** --- 8534,8538 ---- reload_completed = 0; no_new_pseudos = 0; } + + #include "gt-sparc.h" diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sparc.h gcc-3.3/gcc/config/sparc/sparc.h *** gcc-3.2.3/gcc/config/sparc/sparc.h 2003-03-21 10:20:50.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sparc.h 2003-03-21 09:55:48.000000000 +0000 *************** extern enum cmodel sparc_cmodel; *** 107,113 **** /* Values of TARGET_CPU_DEFAULT, set via -D in the Makefile, and specified by the user via --with-cpu=foo. This specifies the cpu implementation, not the architecture size. */ ! /* Note that TARGET_CPU_v9 is assumed to start the list of 64-bit capable cpu's. */ #define TARGET_CPU_sparc 0 #define TARGET_CPU_v7 0 /* alias for previous */ --- 107,113 ---- /* Values of TARGET_CPU_DEFAULT, set via -D in the Makefile, and specified by the user via --with-cpu=foo. This specifies the cpu implementation, not the architecture size. */ ! /* Note that TARGET_CPU_v9 is assumed to start the list of 64-bit capable cpu's. */ #define TARGET_CPU_sparc 0 #define TARGET_CPU_v7 0 /* alias for previous */ *************** extern enum cmodel sparc_cmodel; *** 122,130 **** #define TARGET_CPU_sparcv9 7 /* alias */ #define TARGET_CPU_sparc64 7 /* alias */ #define TARGET_CPU_ultrasparc 8 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \ ! || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc #define CPP_CPU32_DEFAULT_SPEC "" #define ASM_CPU32_DEFAULT_SPEC "" --- 122,132 ---- #define TARGET_CPU_sparcv9 7 /* alias */ #define TARGET_CPU_sparc64 7 /* alias */ #define TARGET_CPU_ultrasparc 8 + #define TARGET_CPU_ultrasparc3 9 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \ ! || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \ ! || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 #define CPP_CPU32_DEFAULT_SPEC "" #define ASM_CPU32_DEFAULT_SPEC "" *************** extern enum cmodel sparc_cmodel; *** 141,146 **** --- 143,152 ---- #define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__" #define ASM_CPU64_DEFAULT_SPEC "-Av9a" #endif + #if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 + #define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__" + #define ASM_CPU64_DEFAULT_SPEC "-Av9b" + #endif #else *************** extern enum cmodel sparc_cmodel; *** 181,187 **** #endif #if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC) ! Unrecognized value in TARGET_CPU_DEFAULT. #endif #ifdef SPARC_BI_ARCH --- 187,193 ---- #endif #if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC) ! #error Unrecognized value in TARGET_CPU_DEFAULT. #endif #ifdef SPARC_BI_ARCH *************** Unrecognized value in TARGET_CPU_DEFAULT *** 230,235 **** --- 236,242 ---- %{mcpu=sparclite86x:-D__sparclite86x__} \ %{mcpu=v9:-D__sparc_v9__} \ %{mcpu=ultrasparc:-D__sparc_v9__} \ + %{mcpu=ultrasparc3:-D__sparc_v9__} \ %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \ " *************** Unrecognized value in TARGET_CPU_DEFAULT *** 239,258 **** sparc64 in 32 bit environments, so for now we only use `sparc64' in 64 bit environments. */ - #ifdef SPARC_BI_ARCH - - #define CPP_ARCH32_SPEC "-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ - -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" - #define CPP_ARCH64_SPEC "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ - -D__arch64__ -Acpu=sparc64 -Amachine=sparc64" - - #else - #define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" #define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64" - #endif - #define CPP_ARCH_DEFAULT_SPEC \ (DEFAULT_ARCH32_P ? CPP_ARCH32_SPEC : CPP_ARCH64_SPEC) --- 246,254 ---- *************** Unrecognized value in TARGET_CPU_DEFAULT *** 296,301 **** --- 292,298 ---- %{mv8plus:-Av8plus} \ %{mcpu=v9:-Av9} \ %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \ + %{mcpu=ultrasparc3:%{!mv8plus:-Av9b}} \ %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(asm_cpu_default)}}}}}}} \ " *************** Unrecognized value in TARGET_CPU_DEFAULT *** 364,373 **** #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G %L" - #ifdef SPARC_BI_ARCH - #define NO_BUILTIN_PTRDIFF_TYPE - #define NO_BUILTIN_SIZE_TYPE - #endif #define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int") #define SIZE_TYPE (TARGET_ARCH64 ? "long unsigned int" : "unsigned int") --- 361,366 ---- *************** Unrecognized value in TARGET_CPU_DEFAULT *** 382,388 **** /* Generate DBX debugging information. */ ! #define DBX_DEBUGGING_INFO /* Run-time compilation parameters selecting different hardware subsets. */ --- 375,381 ---- /* Generate DBX debugging information. */ ! #define DBX_DEBUGGING_INFO 1 /* Run-time compilation parameters selecting different hardware subsets. */ *************** extern int target_flags; *** 418,424 **** #define MASK_V9 0x40 #define TARGET_V9 (target_flags & MASK_V9) ! /* Non-zero to generate code that uses the instructions deprecated in the v9 architecture. This option only applies to v9 systems. */ /* ??? This isn't user selectable yet. It's used to enable such insns on 32 bit v9 systems and for the moment they're permanently disabled --- 411,417 ---- #define MASK_V9 0x40 #define TARGET_V9 (target_flags & MASK_V9) ! /* Nonzero to generate code that uses the instructions deprecated in the v9 architecture. This option only applies to v9 systems. */ /* ??? This isn't user selectable yet. It's used to enable such insns on 32 bit v9 systems and for the moment they're permanently disabled *************** extern int target_flags; *** 430,436 **** #define MASK_ISA \ (MASK_V8 + MASK_SPARCLITE + MASK_SPARCLET + MASK_V9 + MASK_DEPRECATED_V8_INSNS) ! /* Non-zero means don't pass `-assert pure-text' to the linker. */ #define MASK_IMPURE_TEXT 0x100 #define TARGET_IMPURE_TEXT (target_flags & MASK_IMPURE_TEXT) --- 423,429 ---- #define MASK_ISA \ (MASK_V8 + MASK_SPARCLITE + MASK_SPARCLET + MASK_V9 + MASK_DEPRECATED_V8_INSNS) ! /* Nonzero means don't pass `-assert pure-text' to the linker. */ #define MASK_IMPURE_TEXT 0x100 #define TARGET_IMPURE_TEXT (target_flags & MASK_IMPURE_TEXT) *************** extern int target_flags; *** 441,447 **** #define MASK_FLAT 0x200 #define TARGET_FLAT (target_flags & MASK_FLAT) ! /* Nonzero means use the registers that the Sparc ABI reserves for application software. This must be the default to coincide with the setting in FIXED_REGISTERS. */ #define MASK_APP_REGS 0x400 --- 434,440 ---- #define MASK_FLAT 0x200 #define TARGET_FLAT (target_flags & MASK_FLAT) ! /* Nonzero means use the registers that the SPARC ABI reserves for application software. This must be the default to coincide with the setting in FIXED_REGISTERS. */ #define MASK_APP_REGS 0x400 *************** extern int target_flags; *** 453,459 **** #define MASK_HARD_QUAD 0x800 #define TARGET_HARD_QUAD (target_flags & MASK_HARD_QUAD) ! /* Non-zero on little-endian machines. */ /* ??? Little endian support currently only exists for sparclet-aout and sparc64-elf configurations. May eventually want to expand the support to all targets, but for now it's kept local to only those two. */ --- 446,452 ---- #define MASK_HARD_QUAD 0x800 #define TARGET_HARD_QUAD (target_flags & MASK_HARD_QUAD) ! /* Nonzero on little-endian machines. */ /* ??? Little endian support currently only exists for sparclet-aout and sparc64-elf configurations. May eventually want to expand the support to all targets, but for now it's kept local to only those two. */ *************** extern int target_flags; *** 474,498 **** /* 0x20000,0x40000 unused */ ! /* Non-zero means use a stack bias of 2047. Stack offsets are obtained by adding 2047 to %sp. This option is for v9 only and is the default. */ #define MASK_STACK_BIAS 0x80000 #define TARGET_STACK_BIAS (target_flags & MASK_STACK_BIAS) /* 0x100000,0x200000 unused */ ! /* Non-zero means -m{,no-}fpu was passed on the command line. */ #define MASK_FPU_SET 0x400000 #define TARGET_FPU_SET (target_flags & MASK_FPU_SET) /* Use the UltraSPARC Visual Instruction Set extensions. */ ! #define MASK_VIS 0x1000000 #define TARGET_VIS (target_flags & MASK_VIS) /* Compile for Solaris V8+. 32 bit Solaris preserves the high bits of the current out and global registers and Linux 2.2+ as well. */ #define MASK_V8PLUS 0x2000000 ! #define TARGET_V8PLUS (target_flags & MASK_V8PLUS) /* Force a the fastest alignment on structures to take advantage of faster copies. */ --- 467,491 ---- /* 0x20000,0x40000 unused */ ! /* Nonzero means use a stack bias of 2047. Stack offsets are obtained by adding 2047 to %sp. This option is for v9 only and is the default. */ #define MASK_STACK_BIAS 0x80000 #define TARGET_STACK_BIAS (target_flags & MASK_STACK_BIAS) /* 0x100000,0x200000 unused */ ! /* Nonzero means -m{,no-}fpu was passed on the command line. */ #define MASK_FPU_SET 0x400000 #define TARGET_FPU_SET (target_flags & MASK_FPU_SET) /* Use the UltraSPARC Visual Instruction Set extensions. */ ! #define MASK_VIS 0x1000000 #define TARGET_VIS (target_flags & MASK_VIS) /* Compile for Solaris V8+. 32 bit Solaris preserves the high bits of the current out and global registers and Linux 2.2+ as well. */ #define MASK_V8PLUS 0x2000000 ! #define TARGET_V8PLUS (target_flags & MASK_V8PLUS) /* Force a the fastest alignment on structures to take advantage of faster copies. */ *************** extern int target_flags; *** 515,521 **** #define TARGET_HARD_MUL \ (TARGET_V8 || TARGET_SPARCLITE || TARGET_SPARCLET \ ! || TARGET_DEPRECATED_V8_INSNS || TARGET_V8PLUS) /* Macro to define tables used to set the flags. --- 508,514 ---- #define TARGET_HARD_MUL \ (TARGET_V8 || TARGET_SPARCLITE || TARGET_SPARCLET \ ! || TARGET_DEPRECATED_V8_INSNS || TARGET_V8PLUS) /* Macro to define tables used to set the flags. *************** extern int target_flags; *** 567,581 **** {"cypress", 0, \ N_("Optimize for Cypress processors") }, \ {"sparclite", 0, \ ! N_("Optimize for SparcLite processors") }, \ {"f930", 0, \ N_("Optimize for F930 processors") }, \ {"f934", 0, \ N_("Optimize for F934 processors") }, \ {"v8", 0, \ ! N_("Use V8 Sparc ISA") }, \ {"supersparc", 0, \ ! N_("Optimize for SuperSparc processors") }, \ /* End of deprecated options. */ \ {"ptr64", MASK_PTR64, \ N_("Pointers are 64-bit") }, \ --- 560,574 ---- {"cypress", 0, \ N_("Optimize for Cypress processors") }, \ {"sparclite", 0, \ ! N_("Optimize for SPARCLite processors") }, \ {"f930", 0, \ N_("Optimize for F930 processors") }, \ {"f934", 0, \ N_("Optimize for F934 processors") }, \ {"v8", 0, \ ! N_("Use V8 SPARC ISA") }, \ {"supersparc", 0, \ ! N_("Optimize for SuperSPARC processors") }, \ /* End of deprecated options. */ \ {"ptr64", MASK_PTR64, \ N_("Pointers are 64-bit") }, \ *************** enum processor_type { *** 623,629 **** PROCESSOR_SPARCLET, PROCESSOR_TSC701, PROCESSOR_V9, ! PROCESSOR_ULTRASPARC }; /* This is set from -m{cpu,tune}=xxx. */ --- 616,623 ---- PROCESSOR_SPARCLET, PROCESSOR_TSC701, PROCESSOR_V9, ! PROCESSOR_ULTRASPARC, ! PROCESSOR_ULTRASPARC3 }; /* This is set from -m{cpu,tune}=xxx. */ *************** extern enum processor_type sparc_cpu; *** 640,646 **** { "tune=", &sparc_select[2].string, \ N_("Schedule code for given CPU") }, \ { "cmodel=", &sparc_cmodel_string, \ ! N_("Use given Sparc code model") }, \ SUBTARGET_OPTIONS \ } --- 634,640 ---- { "tune=", &sparc_select[2].string, \ N_("Schedule code for given CPU") }, \ { "cmodel=", &sparc_cmodel_string, \ ! N_("Use given SPARC code model") }, \ SUBTARGET_OPTIONS \ } *************** extern struct sparc_cpu_select sparc_sel *** 660,669 **** /* target machine storage layout */ - /* Define for cross-compilation to a sparc target with no TFmode from a host - with a different float format (e.g. VAX). */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN 1 --- 654,659 ---- *************** extern struct sparc_cpu_select sparc_sel *** 683,696 **** #define LIBGCC2_WORDS_BIG_ENDIAN 1 #endif - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD (TARGET_ARCH64 ? 64 : 32) #define MAX_BITS_PER_WORD 64 /* Width of a word, in units (bytes). */ --- 673,678 ---- *************** extern struct sparc_cpu_select sparc_sel *** 717,724 **** #if 0 /* ??? This does not work in SunOS 4.x, so it is not enabled here. Instead, it is enabled in sol2.h, because it does work under Solaris. */ ! /* Define for support of TFmode long double and REAL_ARITHMETIC. ! Sparc ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE 128 #endif --- 699,706 ---- #if 0 /* ??? This does not work in SunOS 4.x, so it is not enabled here. Instead, it is enabled in sol2.h, because it does work under Solaris. */ ! /* Define for support of TFmode long double. ! SPARC ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE 128 #endif *************** if (TARGET_ARCH64 \ *** 789,795 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ --- 771,777 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 1 /* No data type wants to be aligned rounder than this. */ *************** if (TARGET_ARCH64 \ *** 844,862 **** #ifndef SUNOS4_SHARED_LIBRARIES #define SUNOS4_SHARED_LIBRARIES 0 #endif - - - /* Use text section for a constant - unless we need more alignment than that offers. */ - /* This is defined differently for v9 in a cover file. */ - #define SELECT_RTX_SECTION(MODE, X, ALIGN) \ - { \ - if (GET_MODE_BITSIZE (MODE) <= MAX_TEXT_ALIGN \ - && ! (flag_pic && (symbolic_operand ((X), (MODE)) || SUNOS4_SHARED_LIBRARIES))) \ - text_section (); \ - else \ - data_section (); \ - } /* Standard register usage. */ --- 826,831 ---- *************** do \ *** 979,985 **** call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } \ /* If the user has passed -f{fixed,call-{used,saved}}-g5 */ \ ! /* then honour it. */ \ if (TARGET_ARCH32 && fixed_regs[5]) \ fixed_regs[5] = 1; \ else if (TARGET_ARCH64 && fixed_regs[5] == 2) \ --- 948,954 ---- call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } \ /* If the user has passed -f{fixed,call-{used,saved}}-g5 */ \ ! /* then honor it. */ \ if (TARGET_ARCH32 && fixed_regs[5]) \ fixed_regs[5] = 1; \ else if (TARGET_ARCH64 && fixed_regs[5] == 2) \ *************** do \ *** 1004,1010 **** fixed_regs[regno] = 1; \ } \ /* If the user has passed -f{fixed,call-{used,saved}}-g2 */ \ ! /* then honour it. Likewise with g3 and g4. */ \ if (fixed_regs[2] == 2) \ fixed_regs[2] = ! TARGET_APP_REGS; \ if (fixed_regs[3] == 2) \ --- 973,979 ---- fixed_regs[regno] = 1; \ } \ /* If the user has passed -f{fixed,call-{used,saved}}-g2 */ \ ! /* then honor it. Likewise with g3 and g4. */ \ if (fixed_regs[2] == 2) \ fixed_regs[2] = ! TARGET_APP_REGS; \ if (fixed_regs[3] == 2) \ *************** extern int sparc_mode_class[]; *** 1128,1134 **** #define FRAME_POINTER_REQUIRED \ (TARGET_FLAT \ ? (current_function_calls_alloca \ - || current_function_varargs \ || !leaf_function_p ()) \ : ! (leaf_function_p () && only_leaf_regs_used ())) --- 1097,1102 ---- *************** extern int sparc_mode_class[]; *** 1150,1156 **** #define DEFAULT_PCC_STRUCT_RETURN -1 ! /* Sparc ABI says that quad-precision floats and all structures are returned in memory. For v9: unions <= 32 bytes in size are returned in int regs, structures up to 32 bytes are returned in int and fp regs. */ --- 1118,1124 ---- #define DEFAULT_PCC_STRUCT_RETURN -1 ! /* SPARC ABI says that quad-precision floats and all structures are returned in memory. For v9: unions <= 32 bytes in size are returned in int regs, structures up to 32 bytes are returned in int and fp regs. */ *************** extern enum reg_class sparc_regno_reg_cl *** 1274,1291 **** #define REGNO_REG_CLASS(REGNO) sparc_regno_reg_class[(REGNO)] ! /* This is the order in which to allocate registers normally. ! ! We put %f0/%f1 last among the float registers, so as to make it more likely that a pseudo-register which dies in the float return register ! will get allocated to the float return register, thus saving a move ! instruction at the end of the function. */ #define REG_ALLOC_ORDER \ ! { 8, 9, 10, 11, 12, 13, 2, 3, \ ! 15, 16, 17, 18, 19, 20, 21, 22, \ ! 23, 24, 25, 26, 27, 28, 29, 31, \ ! 34, 35, 36, 37, 38, 39, /* %f2-%f7 */ \ 40, 41, 42, 43, 44, 45, 46, 47, /* %f8-%f15 */ \ 48, 49, 50, 51, 52, 53, 54, 55, /* %f16-%f23 */ \ 56, 57, 58, 59, 60, 61, 62, 63, /* %f24-%f31 */ \ --- 1242,1274 ---- #define REGNO_REG_CLASS(REGNO) sparc_regno_reg_class[(REGNO)] ! /* This is the order in which to allocate registers normally. ! ! We put %f0-%f7 last among the float registers, so as to make it more likely that a pseudo-register which dies in the float return register ! area will get allocated to the float return register, thus saving a move ! instruction at the end of the function. ! ! Similarly for integer return value registers. ! ! We know in this case that we will not end up with a leaf function. ! ! The register allocater is given the global and out registers first ! because these registers are call clobbered and thus less useful to ! global register allocation. ! ! Next we list the local and in registers. They are not call clobbered ! and thus very useful for global register allocation. We list the input ! registers before the locals so that it is more likely the incoming ! arguments received in those registers can just stay there and not be ! reloaded. */ #define REG_ALLOC_ORDER \ ! { 1, 2, 3, 4, 5, 6, 7, /* %g1-%g7 */ \ ! 13, 12, 11, 10, 9, 8, /* %o5-%o0 */ \ ! 15, /* %o7 */ \ ! 16, 17, 18, 19, 20, 21, 22, 23, /* %l0-%l7 */ \ ! 29, 28, 27, 26, 25, 24, 31, /* %i5-%i0,%i7 */\ 40, 41, 42, 43, 44, 45, 46, 47, /* %f8-%f15 */ \ 48, 49, 50, 51, 52, 53, 54, 55, /* %f16-%f23 */ \ 56, 57, 58, 59, 60, 61, 62, 63, /* %f24-%f31 */ \ *************** extern enum reg_class sparc_regno_reg_cl *** 1293,1323 **** 72, 73, 74, 75, 76, 77, 78, 79, /* %f40-%f47 */ \ 80, 81, 82, 83, 84, 85, 86, 87, /* %f48-%f55 */ \ 88, 89, 90, 91, 92, 93, 94, 95, /* %f56-%f63 */ \ ! 32, 33, /* %f0,%f1 */ \ ! 96, 97, 98, 99, 100, /* %fcc0-3, %icc */ \ ! 1, 4, 5, 6, 7, 0, 14, 30, 101} /* This is the order in which to allocate registers for ! leaf functions. If all registers can fit in the "gi" registers, ! then we have the possibility of having a leaf function. */ #define REG_LEAF_ALLOC_ORDER \ ! { 2, 3, 24, 25, 26, 27, 28, 29, \ ! 4, 5, 6, 7, 1, \ ! 15, 8, 9, 10, 11, 12, 13, \ ! 16, 17, 18, 19, 20, 21, 22, 23, \ ! 34, 35, 36, 37, 38, 39, \ ! 40, 41, 42, 43, 44, 45, 46, 47, \ ! 48, 49, 50, 51, 52, 53, 54, 55, \ ! 56, 57, 58, 59, 60, 61, 62, 63, \ ! 64, 65, 66, 67, 68, 69, 70, 71, \ ! 72, 73, 74, 75, 76, 77, 78, 79, \ ! 80, 81, 82, 83, 84, 85, 86, 87, \ ! 88, 89, 90, 91, 92, 93, 94, 95, \ ! 32, 33, \ ! 96, 97, 98, 99, 100, \ ! 0, 14, 30, 31, 101} ! #define ORDER_REGS_FOR_LOCAL_ALLOC order_regs_for_local_alloc () extern char sparc_leaf_regs[]; --- 1276,1324 ---- 72, 73, 74, 75, 76, 77, 78, 79, /* %f40-%f47 */ \ 80, 81, 82, 83, 84, 85, 86, 87, /* %f48-%f55 */ \ 88, 89, 90, 91, 92, 93, 94, 95, /* %f56-%f63 */ \ ! 39, 38, 37, 36, 35, 34, 33, 32, /* %f7-%f0 */ \ ! 96, 97, 98, 99, /* %fcc0-3 */ \ ! 100, 0, 14, 30, 101} /* %icc, %g0, %o6, %i6, %sfp */ /* This is the order in which to allocate registers for ! leaf functions. If all registers can fit in the global and ! output registers, then we have the possibility of having a leaf ! function. ! ! The macro actually mentioned the input registers first, ! because they get renumbered into the output registers once ! we know really do have a leaf function. ! ! To be more precise, this register allocation order is used ! when %o7 is found to not be clobbered right before register ! allocation. Normally, the reason %o7 would be clobbered is ! due to a call which could not be transformed into a sibling ! call. ! ! As a consequence, it is possible to use the leaf register ! allocation order and not end up with a leaf function. We will ! not get suboptimal register allocation in that case because by ! definition of being potentially leaf, there were no function ! calls. Therefore, allocation order within the local register ! window is not critical like it is when we do have function calls. */ #define REG_LEAF_ALLOC_ORDER \ ! { 1, 2, 3, 4, 5, 6, 7, /* %g1-%g7 */ \ ! 29, 28, 27, 26, 25, 24, /* %i5-%i0 */ \ ! 15, /* %o7 */ \ ! 13, 12, 11, 10, 9, 8, /* %o5-%o0 */ \ ! 16, 17, 18, 19, 20, 21, 22, 23, /* %l0-%l7 */ \ ! 40, 41, 42, 43, 44, 45, 46, 47, /* %f8-%f15 */ \ ! 48, 49, 50, 51, 52, 53, 54, 55, /* %f16-%f23 */ \ ! 56, 57, 58, 59, 60, 61, 62, 63, /* %f24-%f31 */ \ ! 64, 65, 66, 67, 68, 69, 70, 71, /* %f32-%f39 */ \ ! 72, 73, 74, 75, 76, 77, 78, 79, /* %f40-%f47 */ \ ! 80, 81, 82, 83, 84, 85, 86, 87, /* %f48-%f55 */ \ ! 88, 89, 90, 91, 92, 93, 94, 95, /* %f56-%f63 */ \ ! 39, 38, 37, 36, 35, 34, 33, 32, /* %f7-%f0 */ \ ! 96, 97, 98, 99, /* %fcc0-3 */ \ ! 100, 0, 14, 30, 31, 101} /* %icc, %g0, %o6, %i6, %i7, %sfp */ ! #define ORDER_REGS_FOR_LOCAL_ALLOC order_regs_for_local_alloc () extern char sparc_leaf_regs[]; *************** extern char leaf_reg_remap[]; *** 1475,1481 **** ? GENERAL_REGS \ : NO_REGS) ! /* On SPARC it is not possible to directly move data between GENERAL_REGS and FP_REGS. */ #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ (FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2)) --- 1476,1482 ---- ? GENERAL_REGS \ : NO_REGS) ! /* On SPARC it is not possible to directly move data between GENERAL_REGS and FP_REGS. */ #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ (FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2)) *************** extern char leaf_reg_remap[]; *** 1571,1577 **** /* Definitions for register elimination. */ /* ??? In TARGET_FLAT mode we needn't have a hard frame pointer. */ ! #define ELIMINABLE_REGS \ {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} } --- 1572,1578 ---- /* Definitions for register elimination. */ /* ??? In TARGET_FLAT mode we needn't have a hard frame pointer. */ ! #define ELIMINABLE_REGS \ {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} } *************** extern char leaf_reg_remap[]; *** 1722,1729 **** struct sparc_args { int words; /* number of words passed so far */ ! int prototype_p; /* non-zero if a prototype is present */ ! int libcall_p; /* non-zero if a library call */ }; #define CUMULATIVE_ARGS struct sparc_args --- 1723,1730 ---- struct sparc_args { int words; /* number of words passed so far */ ! int prototype_p; /* nonzero if a prototype is present */ ! int libcall_p; /* nonzero if a library call */ }; #define CUMULATIVE_ARGS struct sparc_args *************** function_arg_padding ((MODE), (TYPE)) *** 1809,1821 **** stored from the compare operation. Note that we can't use "rtx" here since it hasn't been defined! */ ! extern struct rtx_def *sparc_compare_op0, *sparc_compare_op1; /* Generate the special assembly code needed to tell the assembler whatever it might need to know about the return value of a function. ! For Sparc assemblers, we need to output a .proc pseudo-op which conveys information to the assembler relating to peephole optimization (done in the assembler). */ --- 1810,1823 ---- stored from the compare operation. Note that we can't use "rtx" here since it hasn't been defined! */ ! extern GTY(()) rtx sparc_compare_op0; ! extern GTY(()) rtx sparc_compare_op1; /* Generate the special assembly code needed to tell the assembler whatever it might need to know about the return value of a function. ! For SPARC assemblers, we need to output a .proc pseudo-op which conveys information to the assembler relating to peephole optimization (done in the assembler). */ *************** extern struct rtx_def *sparc_compare_op0 *** 1823,1829 **** fprintf ((FILE), "\t.proc\t0%lo\n", sparc_type_code (TREE_TYPE (RESULT))) /* Output the special assembly code needed to tell the assembler some ! register is used as global register variable. SPARC 64bit psABI declares registers %g2 and %g3 as application registers and %g6 and %g7 as OS registers. Any object using them --- 1825,1831 ---- fprintf ((FILE), "\t.proc\t0%lo\n", sparc_type_code (TREE_TYPE (RESULT))) /* Output the special assembly code needed to tell the assembler some ! register is used as global register variable. SPARC 64bit psABI declares registers %g2 and %g3 as application registers and %g6 and %g7 as OS registers. Any object using them *************** do { \ *** 1910,1917 **** #define EXPAND_BUILTIN_SAVEREGS() sparc_builtin_saveregs () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! sparc_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 1912,1919 ---- #define EXPAND_BUILTIN_SAVEREGS() sparc_builtin_saveregs () /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! sparc_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** do { \ *** 2219,2225 **** #define RTX_OK_FOR_OFFSET_P(X) \ (GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0x1000 - 8) ! #define RTX_OK_FOR_OLO10_P(X) \ (GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0xc00 - 8) --- 2221,2227 ---- #define RTX_OK_FOR_OFFSET_P(X) \ (GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0x1000 - 8) ! #define RTX_OK_FOR_OLO10_P(X) \ (GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0xc00 - 8) *************** do { \ *** 2403,2410 **** operand. If we find one, push the reload and jump to WIN. This macro is used in only one place: `find_reloads_address' in reload.c. ! For Sparc 32, we wish to handle addresses by splitting them into ! HIGH+LO_SUM pairs, retaining the LO_SUM in the memory reference. This cuts the number of extra insns by one. Do nothing when generating PIC code and the address is a --- 2405,2412 ---- operand. If we find one, push the reload and jump to WIN. This macro is used in only one place: `find_reloads_address' in reload.c. ! For SPARC 32, we wish to handle addresses by splitting them into ! HIGH+LO_SUM pairs, retaining the LO_SUM in the memory reference. This cuts the number of extra insns by one. Do nothing when generating PIC code and the address is a *************** do { *** 2432,2447 **** } \ /* ??? 64-bit reloads. */ \ } while (0) - - /* If we are referencing a function make the SYMBOL_REF special. - In the Embedded Medium/Anywhere code model, %g4 points to the data segment - so we must not add it to function addresses. */ - - #define ENCODE_SECTION_INFO(DECL) \ - do { \ - if (TARGET_CM_EMBMEDANY && TREE_CODE (DECL) == FUNCTION_DECL) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - } while (0) /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ --- 2434,2439 ---- *************** do { *** 2520,2545 **** /* Generate calls to memcpy, memcmp and memset. */ #define TARGET_MEM_FUNCTIONS - /* Add any extra modes needed to represent the condition code. - - On the Sparc, we have a "no-overflow" mode which is used when an add or - subtract insn is used to set the condition code. Different branches are - used in this case for some operations. - - We also have two modes to indicate that the relevant condition code is - in the floating-point condition code register. One for comparisons which - will generate an exception if the result is unordered (CCFPEmode) and - one for comparisons which will never trap (CCFPmode). - - CCXmode and CCX_NOOVmode are only used by v9. */ - - #define EXTRA_CC_MODES \ - CC(CCXmode, "CCX") \ - CC(CC_NOOVmode, "CC_NOOV") \ - CC(CCX_NOOVmode, "CCX_NOOV") \ - CC(CCFPmode, "CCFP") \ - CC(CCFPEmode, "CCFPE") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFP[E]mode is used. CC_NOOVmode should be used when the first operand --- 2512,2517 ---- *************** do { *** 2547,2554 **** processing is needed. */ #define SELECT_CC_MODE(OP,X,Y) select_cc_mode ((OP), (X), (Y)) ! /* Return non-zero if MODE implies a floating point inequality can be ! reversed. For Sparc this is always true because we have a full compliment of ordered and unordered comparisons, but until generic code knows how to reverse it correctly we keep the old definition. */ #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode && (MODE) != CCFPmode) --- 2519,2526 ---- processing is needed. */ #define SELECT_CC_MODE(OP,X,Y) select_cc_mode ((OP), (X), (Y)) ! /* Return nonzero if MODE implies a floating point inequality can be ! reversed. For SPARC this is always true because we have a full compliment of ordered and unordered comparisons, but until generic code knows how to reverse it correctly we keep the old definition. */ #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode && (MODE) != CCFPmode) *************** do { *** 2660,2692 **** of the libgcc2 functions is used. */ #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode) - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - - #define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST_INT: \ - if (INTVAL (RTX) < 0x1000 && INTVAL (RTX) >= -0x1000) \ - return 0; \ - case HIGH: \ - return 2; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 4; \ - case CONST_DOUBLE: \ - if (GET_MODE (RTX) == DImode) \ - if ((XINT (RTX, 3) == 0 \ - && (unsigned) XINT (RTX, 2) < 0x1000) \ - || (XINT (RTX, 3) == -1 \ - && XINT (RTX, 2) < 0 \ - && XINT (RTX, 2) >= -0x1000)) \ - return 0; \ - return 8; - - #define ADDRESS_COST(RTX) 1 - /* Compute extra cost of moving data between one register class and another. */ #define GENERAL_OR_I64(C) ((C) == GENERAL_REGS || (C) == I64_REGS) --- 2632,2637 ---- *************** do { *** 2694,2700 **** (((FP_REG_CLASS_P (CLASS1) && GENERAL_OR_I64 (CLASS2)) \ || (GENERAL_OR_I64 (CLASS1) && FP_REG_CLASS_P (CLASS2)) \ || (CLASS1) == FPCC_REGS || (CLASS2) == FPCC_REGS) \ ! ? (sparc_cpu == PROCESSOR_ULTRASPARC ? 12 : 6) : 2) /* Provide the cost of a branch. For pre-v9 processors we use a value of 3 to take into account the potential annulling of --- 2639,2646 ---- (((FP_REG_CLASS_P (CLASS1) && GENERAL_OR_I64 (CLASS2)) \ || (GENERAL_OR_I64 (CLASS1) && FP_REG_CLASS_P (CLASS2)) \ || (CLASS1) == FPCC_REGS || (CLASS2) == FPCC_REGS) \ ! ? ((sparc_cpu == PROCESSOR_ULTRASPARC \ ! || sparc_cpu == PROCESSOR_ULTRASPARC3) ? 12 : 6) : 2) /* Provide the cost of a branch. For pre-v9 processors we use a value of 3 to take into account the potential annulling of *************** do { *** 2704,2751 **** On v9 and later, which have branch prediction facilities, we set it to the depth of the pipeline as that is the cost of a ! mispredicted branch. ! ! ??? Set to 9 when PROCESSOR_ULTRASPARC3 is added */ #define BRANCH_COST \ ((sparc_cpu == PROCESSOR_V9 \ || sparc_cpu == PROCESSOR_ULTRASPARC) \ ! ? 7 : 3) ! /* Provide the costs of a rtl expression. This is in the body of a ! switch on CODE. The purpose for the cost of MULT is to encourage ! `synth_mult' to find a synthetic multiply when reasonable. ! If we need more than 12 insns to do a multiply, then go out-of-line, ! since the call overhead will be < 10% of the cost of the multiply. */ #define RTX_COSTS(X,CODE,OUTER_CODE) \ ! case MULT: \ ! if (sparc_cpu == PROCESSOR_ULTRASPARC) \ ! return (GET_MODE (X) == DImode ? \ ! COSTS_N_INSNS (34) : COSTS_N_INSNS (19)); \ ! return TARGET_HARD_MUL ? COSTS_N_INSNS (5) : COSTS_N_INSNS (25); \ ! case DIV: \ ! case UDIV: \ ! case MOD: \ ! case UMOD: \ ! if (sparc_cpu == PROCESSOR_ULTRASPARC) \ ! return (GET_MODE (X) == DImode ? \ ! COSTS_N_INSNS (68) : COSTS_N_INSNS (37)); \ ! return COSTS_N_INSNS (25); \ ! /* Make FLOAT and FIX more expensive than CONST_DOUBLE,\ ! so that cse will favor the latter. */ \ ! case FLOAT: \ ! case FIX: \ ! return 19; #define PREFETCH_BLOCK \ ! ((sparc_cpu == PROCESSOR_ULTRASPARC) ? 64 : 32) - /* ??? UltraSPARC-III note: Can set this to 8 for ultra3. */ #define SIMULTANEOUS_PREFETCHES \ ! ((sparc_cpu == PROCESSOR_ULTRASPARC) ? 2 : 3) /* Control the assembler format that we output. */ --- 2650,2697 ---- On v9 and later, which have branch prediction facilities, we set it to the depth of the pipeline as that is the cost of a ! mispredicted branch. */ #define BRANCH_COST \ ((sparc_cpu == PROCESSOR_V9 \ || sparc_cpu == PROCESSOR_ULTRASPARC) \ ! ? 7 \ ! : (sparc_cpu == PROCESSOR_ULTRASPARC3 \ ! ? 9 : 3)) ! /* The cases that RTX_COSTS handles. */ ! #define RTX_COSTS_CASES \ ! case PLUS: case MINUS: case ABS: case NEG: \ ! case FLOAT: case UNSIGNED_FLOAT: \ ! case FIX: case UNSIGNED_FIX: \ ! case FLOAT_EXTEND: case FLOAT_TRUNCATE: \ ! case SQRT: \ ! case COMPARE: case IF_THEN_ELSE: \ ! case MEM: \ ! case MULT: case DIV: case UDIV: case MOD: case UMOD: \ ! case CONST_INT: case HIGH: case CONST: \ ! case LABEL_REF: case SYMBOL_REF: case CONST_DOUBLE: ! ! /* Provide the costs of a rtl expression. This is in the body of a ! switch on CODE. */ #define RTX_COSTS(X,CODE,OUTER_CODE) \ ! RTX_COSTS_CASES \ ! return sparc_rtx_costs(X,CODE,OUTER_CODE); ! ! #define ADDRESS_COST(RTX) 1 #define PREFETCH_BLOCK \ ! ((sparc_cpu == PROCESSOR_ULTRASPARC \ ! || sparc_cpu == PROCESSOR_ULTRASPARC3) \ ! ? 64 : 32) #define SIMULTANEOUS_PREFETCHES \ ! ((sparc_cpu == PROCESSOR_ULTRASPARC) \ ! ? 2 \ ! : (sparc_cpu == PROCESSOR_ULTRASPARC3 \ ! ? 8 : 3)) /* Control the assembler format that we output. */ *************** do { *** 2806,2822 **** guess... */ #define DBX_CONTIN_LENGTH 1000 - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) /* The prefix to add to user-visible assembler symbols. */ --- 2752,2762 ---- guess... */ #define DBX_CONTIN_LENGTH 1000 /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global " /* The prefix to add to user-visible assembler symbols. */ *************** do { \ *** 2898,2903 **** --- 2838,2850 ---- if ((LOG) != 0) \ fprintf (FILE, "\t.align %d\n", (1<<(LOG))) + /* This is how to output an assembler line that says to advance + the location counter to a multiple of 2**LOG bytes using the + "nop" instruction as padding. */ + #define ASM_OUTPUT_ALIGN_WITH_NOP(FILE,LOG) \ + if ((LOG) != 0) \ + fprintf (FILE, "\t.align %d,0x1000000\n", (1<<(LOG))) + #define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\t.skip %u\n", (SIZE)) *************** do { \ *** 2946,2956 **** #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME); - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - sparc_output_mi_thunk (FILE, THUNK_FNDECL, DELTA, FUNCTION) - #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ ((CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' || (CHAR) == '(' || (CHAR) == '_') --- 2893,2898 ---- *************** do { \ *** 3043,3048 **** --- 2985,2991 ---- #define PREDICATE_CODES \ {"reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \ + {"const1_operand", {CONST_INT}}, \ {"fp_zero_operand", {CONST_DOUBLE}}, \ {"fp_register_operand", {SUBREG, REG}}, \ {"intreg_operand", {SUBREG, REG}}, \ *************** do { \ *** 3091,3094 **** #define JMP_BUF_SIZE 12 #define DONT_ACCESS_GBLS_AFTER_EPILOGUE (flag_pic) - --- 3034,3036 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sparclet.md gcc-3.3/gcc/config/sparc/sparclet.md *** gcc-3.2.3/gcc/config/sparc/sparclet.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sparclet.md 2002-09-15 12:03:42.000000000 +0000 *************** *** 0 **** --- 1,44 ---- + ;; Scheduling description for SPARClet. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; The SPARClet is a single-issue processor. + + (define_automaton "sparclet") + + (define_cpu_unit "sl_load0,sl_load1,sl_load2,sl_load3" "sparclet") + (define_cpu_unit "sl_store,sl_imul" "sparclet") + + (define_reservation "sl_load_any" "(sl_load0 | sl_load1 | sl_load2 | sl_load3)") + (define_reservation "sl_load_all" "(sl_load0 + sl_load1 + sl_load2 + sl_load3)") + + (define_insn_reservation "sl_ld" 3 + (and (eq_attr "cpu" "tsc701") + (eq_attr "type" "load,sload")) + "sl_load_any, sl_load_any, sl_load_any") + + (define_insn_reservation "sl_st" 3 + (and (eq_attr "cpu" "tsc701") + (eq_attr "type" "store")) + "(sl_store+sl_load_all)*3") + + (define_insn_reservation "sl_imul" 5 + (and (eq_attr "cpu" "tsc701") + (eq_attr "type" "imul")) + "sl_imul*5") diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sparc.md gcc-3.3/gcc/config/sparc/sparc.md *** gcc-3.2.3/gcc/config/sparc/sparc.md 2003-03-28 09:24:08.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sparc.md 2003-04-28 17:55:35.000000000 +0000 *************** *** 24,57 **** ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. ! ;; Uses of UNSPEC and UNSPEC_VOLATILE in this file: ! ;; ! ;; UNSPEC: 0 movsi_{lo_sum,high}_pic ! ;; pic_lo_sum_di ! ;; pic_sethi_di ! ;; 1 update_return ! ;; 2 get_pc ! ;; 5 movsi_{,lo_sum_,high_}pic_label_ref ! ;; 6 seth44 ! ;; 7 setm44 ! ;; 8 setl44 ! ;; 9 sethh ! ;; 10 setlm ! ;; 11 embmedany_sethi, embmedany_brsum ! ;; 13 embmedany_textuhi ! ;; 14 embmedany_texthi ! ;; 15 embmedany_textulo ! ;; 16 embmedany_textlo ! ;; 18 sethm ! ;; 19 setlo ! ;; ! ;; UNSPEC_VOLATILE: 0 blockage ! ;; 1 flush_register_windows ! ;; 2 goto_handler_and_restore ! ;; 3 goto_handler_and_restore_v9* ! ;; 4 flush ! ;; 5 do_builtin_setjmp_setup ! ;; ;; The upper 32 fp regs on the v9 can't hold SFmode values. To deal with this ;; a second register class, EXTRA_FP_REGS, exists for the v9 chip. The name --- 24,53 ---- ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. ! (define_constants ! [(UNSPEC_MOVE_PIC 0) ! (UNSPEC_UPDATE_RETURN 1) ! (UNSPEC_GET_PC 2) ! (UNSPEC_MOVE_PIC_LABEL 5) ! (UNSPEC_SETH44 6) ! (UNSPEC_SETM44 7) ! (UNSPEC_SETHH 9) ! (UNSPEC_SETLM 10) ! (UNSPEC_EMB_HISUM 11) ! (UNSPEC_EMB_TEXTUHI 13) ! (UNSPEC_EMB_TEXTHI 14) ! (UNSPEC_EMB_TEXTULO 15) ! (UNSPEC_EMB_SETHM 18) ! ]) ! ! (define_constants ! [(UNSPECV_BLOCKAGE 0) ! (UNSPECV_FLUSHW 1) ! (UNSPECV_GOTO 2) ! (UNSPECV_GOTO_V9 3) ! (UNSPECV_FLUSH 4) ! (UNSPECV_SETJMP 5) ! ]) ;; The upper 32 fp regs on the v9 can't hold SFmode values. To deal with this ;; a second register class, EXTRA_FP_REGS, exists for the v9 chip. The name *************** *** 61,67 **** ;; Attribute for cpu type. ;; These must match the values for enum processor_type in sparc.h. ! (define_attr "cpu" "v7,cypress,v8,supersparc,sparclite,f930,f934,hypersparc,sparclite86x,sparclet,tsc701,v9,ultrasparc" (const (symbol_ref "sparc_cpu_attr"))) ;; Attribute for the instruction set. --- 57,73 ---- ;; Attribute for cpu type. ;; These must match the values for enum processor_type in sparc.h. ! (define_attr "cpu" ! "v7, ! cypress, ! v8, ! supersparc, ! sparclite,f930,f934, ! hypersparc,sparclite86x, ! sparclet,tsc701, ! v9, ! ultrasparc, ! ultrasparc3" (const (symbol_ref "sparc_cpu_attr"))) ;; Attribute for the instruction set. *************** *** 82,90 **** ;; Insn type. - ;; If you add any new type here, please update ultrasparc_sched_reorder too. (define_attr "type" ! "ialu,compare,shift,load,sload,store,uncond_branch,branch,call,sibcall,call_no_delay_slot,return,imul,idiv,fpload,fpstore,fp,fpmove,fpcmove,fpcmp,fpmul,fpdivs,fpdivd,fpsqrts,fpsqrtd,cmove,multi,misc" (const_string "ialu")) ;; true if branch/call has empty delay slot and will emit a nop in it --- 88,107 ---- ;; Insn type. (define_attr "type" ! "ialu,compare,shift, ! load,sload,store, ! uncond_branch,branch,call,sibcall,call_no_delay_slot, ! imul,idiv, ! fpload,fpstore, ! fp,fpmove, ! fpcmove,fpcrmove, ! fpcmp, ! fpmul,fpdivs,fpdivd, ! fpsqrts,fpsqrtd, ! cmove, ! ialuX, ! multi,flushw,iflush,trap" (const_string "ialu")) ;; true if branch/call has empty delay slot and will emit a nop in it *************** *** 96,101 **** --- 113,124 ---- (define_attr "pic" "false,true" (symbol_ref "flag_pic != 0")) + (define_attr "current_function_calls_alloca" "false,true" + (symbol_ref "current_function_calls_alloca != 0")) + + (define_attr "flat" "false,true" + (symbol_ref "TARGET_FLAT != 0")) + ;; Length (in # of insns). (define_attr "length" "" (cond [(eq_attr "type" "uncond_branch,call,sibcall") *************** *** 163,168 **** --- 186,194 ---- ;; FP precision. (define_attr "fptype" "single,double" (const_string "single")) + ;; UltraSPARC-III integer load type. + (define_attr "us3load_type" "2cycle,3cycle" (const_string "2cycle")) + (define_asm_attributes [(set_attr "length" "2") (set_attr "type" "multi")]) *************** *** 170,176 **** ;; Attributes for instruction and branch scheduling (define_attr "in_call_delay" "false,true" ! (cond [(eq_attr "type" "uncond_branch,branch,call,sibcall,call_no_delay_slot,return,multi") (const_string "false") (eq_attr "type" "load,fpload,store,fpstore") (if_then_else (eq_attr "length" "1") --- 196,202 ---- ;; Attributes for instruction and branch scheduling (define_attr "in_call_delay" "false,true" ! (cond [(eq_attr "type" "uncond_branch,branch,call,sibcall,call_no_delay_slot,multi") (const_string "false") (eq_attr "type" "load,fpload,store,fpstore") (if_then_else (eq_attr "length" "1") *************** *** 192,212 **** (define_attr "leaf_function" "false,true" (const (symbol_ref "current_function_uses_only_leaf_regs"))) - (define_attr "eligible_for_return_delay" "false,true" - (symbol_ref "eligible_for_return_delay (insn)")) - - (define_attr "in_return_delay" "false,true" - (if_then_else (and (and (and (eq_attr "type" "ialu,load,sload,store") - (eq_attr "length" "1")) - (eq_attr "leaf_function" "false")) - (eq_attr "eligible_for_return_delay" "false")) - (const_string "true") - (const_string "false"))) - - (define_delay (and (eq_attr "type" "return") - (eq_attr "isa" "v9")) - [(eq_attr "in_return_delay" "true") (nil) (nil)]) - ;; ??? Should implement the notion of predelay slots for floating point ;; branches. This would allow us to remove the nop always inserted before ;; a floating point branch. --- 218,223 ---- *************** *** 245,588 **** [(eq_attr "in_uncond_branch_delay" "true") (nil) (nil)]) ! ;; Function units of the SPARC ! ! ;; (define_function_unit {name} {num-units} {n-users} {test} ! ;; {ready-delay} {issue-delay} [{conflict-list}]) ! ! ;; The integer ALU. ! ;; (Noted only for documentation; units that take one cycle do not need to ! ;; be specified.) ! ! ;; On the sparclite, integer multiply takes 1, 3, or 5 cycles depending on ! ;; the inputs. ! ! ;; ---- cypress CY7C602 scheduling: ! ;; Memory with load-delay of 1 (i.e., 2 cycle load). ! ! (define_function_unit "memory" 1 0 ! (and (eq_attr "cpu" "cypress") ! (eq_attr "type" "load,sload,fpload")) ! 2 2) ! ! ;; SPARC has two floating-point units: the FP ALU, ! ;; and the FP MUL/DIV/SQRT unit. ! ;; Instruction timings on the CY7C602 are as follows ! ;; FABSs 4 ! ;; FADDs/d 5/5 ! ;; FCMPs/d 4/4 ! ;; FDIVs/d 23/37 ! ;; FMOVs 4 ! ;; FMULs/d 5/7 ! ;; FNEGs 4 ! ;; FSQRTs/d 34/63 ! ;; FSUBs/d 5/5 ! ;; FdTOi/s 5/5 ! ;; FsTOi/d 5/5 ! ;; FiTOs/d 9/5 ! ! ;; The CY7C602 can only support 2 fp isnsn simultaneously. ! ;; More insns cause the chip to stall. ! ! (define_function_unit "fp_alu" 1 0 ! (and (eq_attr "cpu" "cypress") ! (eq_attr "type" "fp,fpmove")) ! 5 5) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "cypress") ! (eq_attr "type" "fpmul")) ! 7 7) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "cypress") ! (eq_attr "type" "fpdivs,fpdivd")) ! 37 37) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "cypress") ! (eq_attr "type" "fpsqrts,fpsqrtd")) ! 63 63) ! ! ;; ----- The TMS390Z55 scheduling ! ;; The Supersparc can issue 1 - 3 insns per cycle: up to two integer, ! ;; one ld/st, one fp. ! ;; Memory delivers its result in one cycle to IU, zero cycles to FP ! ! (define_function_unit "memory" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "load,sload")) ! 1 1) ! ! (define_function_unit "memory" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "fpload")) ! 0 1) ! ! (define_function_unit "memory" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "store,fpstore")) ! 1 1) ! ! (define_function_unit "shift" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "shift")) ! 1 1) ! ! ;; There are only two write ports to the integer register file ! ;; A store also uses a write port ! ! (define_function_unit "iwport" 2 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "load,sload,store,shift,ialu")) ! 1 1) ! ! ;; Timings; throughput/latency ! ;; FADD 1/3 add/sub, format conv, compar, abs, neg ! ;; FMUL 1/3 ! ;; FDIVs 4/6 ! ;; FDIVd 7/9 ! ;; FSQRTs 6/8 ! ;; FSQRTd 10/12 ! ;; IMUL 4/4 ! ! (define_function_unit "fp_alu" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "fp,fpmove,fpcmp")) ! 3 1) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "fpmul")) ! 3 1) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "fpdivs")) ! 6 4) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "fpdivd")) ! 9 7) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "fpsqrts,fpsqrtd")) ! 12 10) ! ! (define_function_unit "fp_mds" 1 0 ! (and (eq_attr "cpu" "supersparc") ! (eq_attr "type" "imul")) ! 4 4) ! ! ;; ----- hypersparc/sparclite86x scheduling ! ;; The Hypersparc can issue 1 - 2 insns per cycle. The dual issue cases are: ! ;; L-Ld/St I-Int F-Float B-Branch LI/LF/LB/II/IF/IB/FF/FB ! ;; II/FF case is only when loading a 32 bit hi/lo constant ! ;; Single issue insns include call, jmpl, u/smul, u/sdiv, lda, sta, fcmp ! ;; Memory delivers its result in one cycle to IU ! ! (define_function_unit "memory" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "load,sload,fpload")) ! 1 1) ! ! (define_function_unit "memory" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "store,fpstore")) ! 2 1) ! ! (define_function_unit "sparclite86x_branch" 1 0 ! (and (eq_attr "cpu" "sparclite86x") ! (eq_attr "type" "branch")) ! 1 1) ! ! ;; integer multiply insns ! (define_function_unit "sparclite86x_shift" 1 0 ! (and (eq_attr "cpu" "sparclite86x") ! (eq_attr "type" "shift")) ! 1 1) ! ! (define_function_unit "fp_alu" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "fp,fpmove,fpcmp")) ! 1 1) ! ! (define_function_unit "fp_mds" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "fpmul")) ! 1 1) ! ! (define_function_unit "fp_mds" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "fpdivs")) ! 8 6) ! ! (define_function_unit "fp_mds" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "fpdivd")) ! 12 10) ! ! (define_function_unit "fp_mds" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "fpsqrts,fpsqrtd")) ! 17 15) ! ! (define_function_unit "fp_mds" 1 0 ! (and (ior (eq_attr "cpu" "hypersparc") (eq_attr "cpu" "sparclite86x")) ! (eq_attr "type" "imul")) ! 17 15) ! ! ;; ----- sparclet tsc701 scheduling ! ;; The tsc701 issues 1 insn per cycle. ! ;; Results may be written back out of order. ! ! ;; Loads take 2 extra cycles to complete and 4 can be buffered at a time. ! ! (define_function_unit "tsc701_load" 4 1 ! (and (eq_attr "cpu" "tsc701") ! (eq_attr "type" "load,sload")) ! 3 1) ! ! ;; Stores take 2(?) extra cycles to complete. ! ;; It is desirable to not have any memory operation in the following 2 cycles. ! ;; (??? or 2 memory ops in the case of std). ! ! (define_function_unit "tsc701_store" 1 0 ! (and (eq_attr "cpu" "tsc701") ! (eq_attr "type" "store")) ! 3 3 ! [(eq_attr "type" "load,sload,store")]) ! ! ;; The multiply unit has a latency of 5. ! (define_function_unit "tsc701_mul" 1 0 ! (and (eq_attr "cpu" "tsc701") ! (eq_attr "type" "imul")) ! 5 5) ! ! ;; ----- The UltraSPARC-1 scheduling ! ;; UltraSPARC has two integer units. Shift instructions can only execute ! ;; on IE0. Condition code setting instructions, call, and jmpl (including ! ;; the ret and retl pseudo-instructions) can only execute on IE1. ! ;; Branch on register uses IE1, but branch on condition code does not. ! ;; Conditional moves take 2 cycles. No other instruction can issue in the ! ;; same cycle as a conditional move. ! ;; Multiply and divide take many cycles during which no other instructions ! ;; can issue. ! ;; Memory delivers its result in two cycles (except for signed loads, ! ;; which take one cycle more). One memory instruction can be issued per ! ;; cycle. ! ! (define_function_unit "memory" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "load,fpload")) ! 2 1) ! ! (define_function_unit "memory" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "sload")) ! 3 1) ! ! (define_function_unit "memory" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "store,fpstore")) ! 1 1) ! ! (define_function_unit "ieuN" 2 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "ialu,shift,compare,call,sibcall,call_no_delay_slot,uncond_branch")) ! 1 1) ! ! (define_function_unit "ieu0" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "shift")) ! 1 1) ! ! (define_function_unit "ieu0" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "cmove")) ! 2 1) ! ! (define_function_unit "ieu1" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "compare,call,sibcall,call_no_delay_slot,uncond_branch")) ! 1 1) ! ! (define_function_unit "cti" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "branch")) ! 1 1) ! ! ;; Timings; throughput/latency ! ;; FMOV 1/1 fmov, fabs, fneg ! ;; FMOVcc 1/2 ! ;; FADD 1/3 add/sub, format conv, compar ! ;; FMUL 1/3 ! ;; FDIVs 12/12 ! ;; FDIVd 22/22 ! ;; FSQRTs 12/12 ! ;; FSQRTd 22/22 ! ;; FCMP takes 1 cycle to branch, 2 cycles to conditional move. ! ;; ! ;; FDIV{s,d}/FSQRT{s,d} are given their own unit since they only ! ;; use the FPM multiplier for final rounding 3 cycles before the ! ;; end of their latency and we have no real way to model that. ! ;; ! ;; ??? This is really bogus because the timings really depend upon ! ;; who uses the result. We should record who the user is with ! ;; more descriptive 'type' attribute names and account for these ! ;; issues in ultrasparc_adjust_cost. ! ! (define_function_unit "fadd" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpmove")) ! 1 1) ! ! (define_function_unit "fadd" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpcmove")) ! 2 1) ! ! (define_function_unit "fadd" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fp")) ! 3 1) ! ! (define_function_unit "fadd" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpcmp")) ! 2 1) ! ! (define_function_unit "fmul" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpmul")) ! 3 1) ! ! (define_function_unit "fadd" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpcmove")) ! 2 1) ! ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpdivs")) ! 12 12) ! ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpdivd")) ! 22 22) ! (define_function_unit "fdiv" 1 0 ! (and (eq_attr "cpu" "ultrasparc") ! (eq_attr "type" "fpsqrts")) ! 12 12) - (define_function_unit "fdiv" 1 0 - (and (eq_attr "cpu" "ultrasparc") - (eq_attr "type" "fpsqrtd")) - 22 22) ;; Compare instructions. ;; This controls RTL generation and register allocation. --- 256,270 ---- [(eq_attr "in_uncond_branch_delay" "true") (nil) (nil)]) ! ;; Include SPARC DFA schedulers ! (include "cypress.md") ! (include "supersparc.md") ! (include "hypersparc.md") ! (include "sparclet.md") ! (include "ultra1_2.md") ! (include "ultra3.md") ;; Compare instructions. ;; This controls RTL generation and register allocation. *************** *** 607,630 **** (compare:CC (match_operand:SI 0 "register_operand" "") (match_operand:SI 1 "arith_operand" "")))] "" - " { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmpdi" [(set (reg:CCX 100) (compare:CCX (match_operand:DI 0 "register_operand" "") (match_operand:DI 1 "arith_double_operand" "")))] "TARGET_ARCH64" - " { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmpsf" ;; The 96 here isn't ever used by anyone. --- 289,310 ---- (compare:CC (match_operand:SI 0 "register_operand" "") (match_operand:SI 1 "arith_operand" "")))] "" { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmpdi" [(set (reg:CCX 100) (compare:CCX (match_operand:DI 0 "register_operand" "") (match_operand:DI 1 "arith_double_operand" "")))] "TARGET_ARCH64" { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmpsf" ;; The 96 here isn't ever used by anyone. *************** *** 632,643 **** (compare:CCFP (match_operand:SF 0 "register_operand" "") (match_operand:SF 1 "register_operand" "")))] "TARGET_FPU" - " { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmpdf" ;; The 96 here isn't ever used by anyone. --- 312,322 ---- (compare:CCFP (match_operand:SF 0 "register_operand" "") (match_operand:SF 1 "register_operand" "")))] "TARGET_FPU" { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmpdf" ;; The 96 here isn't ever used by anyone. *************** *** 645,656 **** (compare:CCFP (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")))] "TARGET_FPU" - " { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }") (define_expand "cmptf" ;; The 96 here isn't ever used by anyone. --- 324,334 ---- (compare:CCFP (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")))] "TARGET_FPU" { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }) (define_expand "cmptf" ;; The 96 here isn't ever used by anyone. *************** *** 658,669 **** (compare:CCFP (match_operand:TF 0 "register_operand" "") (match_operand:TF 1 "register_operand" "")))] "TARGET_FPU" - " { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }") ;; Now the compare DEFINE_INSNs. --- 336,346 ---- (compare:CCFP (match_operand:TF 0 "register_operand" "") (match_operand:TF 1 "register_operand" "")))] "TARGET_FPU" { sparc_compare_op0 = operands[0]; sparc_compare_op1 = operands[1]; DONE; ! }) ;; Now the compare DEFINE_INSNs. *************** *** 672,678 **** (compare:CC (match_operand:SI 0 "register_operand" "r") (match_operand:SI 1 "arith_operand" "rI")))] "" ! "cmp\\t%0, %1" [(set_attr "type" "compare")]) (define_insn "*cmpdi_sp64" --- 349,355 ---- (compare:CC (match_operand:SI 0 "register_operand" "r") (match_operand:SI 1 "arith_operand" "rI")))] "" ! "cmp\t%0, %1" [(set_attr "type" "compare")]) (define_insn "*cmpdi_sp64" *************** *** 680,686 **** (compare:CCX (match_operand:DI 0 "register_operand" "r") (match_operand:DI 1 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "cmp\\t%0, %1" [(set_attr "type" "compare")]) (define_insn "*cmpsf_fpe" --- 357,363 ---- (compare:CCX (match_operand:DI 0 "register_operand" "r") (match_operand:DI 1 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "cmp\t%0, %1" [(set_attr "type" "compare")]) (define_insn "*cmpsf_fpe" *************** *** 688,699 **** (compare:CCFPE (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" - "* { if (TARGET_V9) ! return \"fcmpes\\t%0, %1, %2\"; ! return \"fcmpes\\t%1, %2\"; ! }" [(set_attr "type" "fpcmp")]) (define_insn "*cmpdf_fpe" --- 365,375 ---- (compare:CCFPE (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" { if (TARGET_V9) ! return "fcmpes\t%0, %1, %2"; ! return "fcmpes\t%1, %2"; ! } [(set_attr "type" "fpcmp")]) (define_insn "*cmpdf_fpe" *************** *** 701,712 **** (compare:CCFPE (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" - "* { if (TARGET_V9) ! return \"fcmped\\t%0, %1, %2\"; ! return \"fcmped\\t%1, %2\"; ! }" [(set_attr "type" "fpcmp") (set_attr "fptype" "double")]) --- 377,387 ---- (compare:CCFPE (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" { if (TARGET_V9) ! return "fcmped\t%0, %1, %2"; ! return "fcmped\t%1, %2"; ! } [(set_attr "type" "fpcmp") (set_attr "fptype" "double")]) *************** *** 715,726 **** (compare:CCFPE (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" - "* { if (TARGET_V9) ! return \"fcmpeq\\t%0, %1, %2\"; ! return \"fcmpeq\\t%1, %2\"; ! }" [(set_attr "type" "fpcmp")]) (define_insn "*cmpsf_fp" --- 390,400 ---- (compare:CCFPE (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" { if (TARGET_V9) ! return "fcmpeq\t%0, %1, %2"; ! return "fcmpeq\t%1, %2"; ! } [(set_attr "type" "fpcmp")]) (define_insn "*cmpsf_fp" *************** *** 728,739 **** (compare:CCFP (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" - "* { if (TARGET_V9) ! return \"fcmps\\t%0, %1, %2\"; ! return \"fcmps\\t%1, %2\"; ! }" [(set_attr "type" "fpcmp")]) (define_insn "*cmpdf_fp" --- 402,412 ---- (compare:CCFP (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" { if (TARGET_V9) ! return "fcmps\t%0, %1, %2"; ! return "fcmps\t%1, %2"; ! } [(set_attr "type" "fpcmp")]) (define_insn "*cmpdf_fp" *************** *** 741,752 **** (compare:CCFP (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" - "* { if (TARGET_V9) ! return \"fcmpd\\t%0, %1, %2\"; ! return \"fcmpd\\t%1, %2\"; ! }" [(set_attr "type" "fpcmp") (set_attr "fptype" "double")]) --- 414,424 ---- (compare:CCFP (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" { if (TARGET_V9) ! return "fcmpd\t%0, %1, %2"; ! return "fcmpd\t%1, %2"; ! } [(set_attr "type" "fpcmp") (set_attr "fptype" "double")]) *************** *** 755,766 **** (compare:CCFP (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" - "* { if (TARGET_V9) ! return \"fcmpq\\t%0, %1, %2\"; ! return \"fcmpq\\t%1, %2\"; ! }" [(set_attr "type" "fpcmp")]) ;; Next come the scc insns. For seq, sne, sgeu, and sltu, we can do this --- 427,437 ---- (compare:CCFP (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" { if (TARGET_V9) ! return "fcmpq\t%0, %1, %2"; ! return "fcmpq\t%1, %2"; ! } [(set_attr "type" "fpcmp")]) ;; Next come the scc insns. For seq, sne, sgeu, and sltu, we can do this *************** *** 781,787 **** (eq:SI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "" ! "{ operands[3] = gen_reg_rtx (SImode); }") (define_expand "seqdi_special" [(set (match_dup 3) --- 452,458 ---- (eq:SI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "" ! { operands[3] = gen_reg_rtx (SImode); }) (define_expand "seqdi_special" [(set (match_dup 3) *************** *** 790,796 **** (set (match_operand:DI 0 "register_operand" "") (eq:DI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! "{ operands[3] = gen_reg_rtx (DImode); }") (define_expand "snesi_special" [(set (match_dup 3) --- 461,467 ---- (set (match_operand:DI 0 "register_operand" "") (eq:DI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! { operands[3] = gen_reg_rtx (DImode); }) (define_expand "snesi_special" [(set (match_dup 3) *************** *** 800,806 **** (ne:SI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "" ! "{ operands[3] = gen_reg_rtx (SImode); }") (define_expand "snedi_special" [(set (match_dup 3) --- 471,477 ---- (ne:SI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "" ! { operands[3] = gen_reg_rtx (SImode); }) (define_expand "snedi_special" [(set (match_dup 3) *************** *** 809,815 **** (set (match_operand:DI 0 "register_operand" "") (ne:DI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! "{ operands[3] = gen_reg_rtx (DImode); }") (define_expand "seqdi_special_trunc" [(set (match_dup 3) --- 480,486 ---- (set (match_operand:DI 0 "register_operand" "") (ne:DI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! { operands[3] = gen_reg_rtx (DImode); }) (define_expand "seqdi_special_trunc" [(set (match_dup 3) *************** *** 818,824 **** (set (match_operand:SI 0 "register_operand" "") (eq:SI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! "{ operands[3] = gen_reg_rtx (DImode); }") (define_expand "snedi_special_trunc" [(set (match_dup 3) --- 489,495 ---- (set (match_operand:SI 0 "register_operand" "") (eq:SI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! { operands[3] = gen_reg_rtx (DImode); }) (define_expand "snedi_special_trunc" [(set (match_dup 3) *************** *** 827,833 **** (set (match_operand:SI 0 "register_operand" "") (ne:SI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! "{ operands[3] = gen_reg_rtx (DImode); }") (define_expand "seqsi_special_extend" [(set (match_dup 3) --- 498,504 ---- (set (match_operand:SI 0 "register_operand" "") (ne:SI (match_dup 3) (const_int 0)))] "TARGET_ARCH64" ! { operands[3] = gen_reg_rtx (DImode); }) (define_expand "seqsi_special_extend" [(set (match_dup 3) *************** *** 837,843 **** (eq:DI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "TARGET_ARCH64" ! "{ operands[3] = gen_reg_rtx (SImode); }") (define_expand "snesi_special_extend" [(set (match_dup 3) --- 508,514 ---- (eq:DI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "TARGET_ARCH64" ! { operands[3] = gen_reg_rtx (SImode); }) (define_expand "snesi_special_extend" [(set (match_dup 3) *************** *** 847,853 **** (ne:DI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "TARGET_ARCH64" ! "{ operands[3] = gen_reg_rtx (SImode); }") ;; ??? v9: Operand 0 needs a mode, so SImode was chosen. ;; However, the code handles both SImode and DImode. --- 518,524 ---- (ne:DI (match_dup 3) (const_int 0))) (clobber (reg:CC 100))])] "TARGET_ARCH64" ! { operands[3] = gen_reg_rtx (SImode); }) ;; ??? v9: Operand 0 needs a mode, so SImode was chosen. ;; However, the code handles both SImode and DImode. *************** *** 855,861 **** [(set (match_operand:SI 0 "intreg_operand" "") (eq:SI (match_dup 1) (const_int 0)))] "" - " { if (GET_MODE (sparc_compare_op0) == SImode) { --- 526,531 ---- *************** *** 900,906 **** /* fall through */ } FAIL; ! }") ;; ??? v9: Operand 0 needs a mode, so SImode was chosen. ;; However, the code handles both SImode and DImode. --- 570,576 ---- /* fall through */ } FAIL; ! }) ;; ??? v9: Operand 0 needs a mode, so SImode was chosen. ;; However, the code handles both SImode and DImode. *************** *** 908,914 **** [(set (match_operand:SI 0 "intreg_operand" "") (ne:SI (match_dup 1) (const_int 0)))] "" - " { if (GET_MODE (sparc_compare_op0) == SImode) { --- 578,583 ---- *************** *** 953,965 **** /* fall through */ } FAIL; ! }") (define_expand "sgt" [(set (match_operand:SI 0 "intreg_operand" "") (gt:SI (match_dup 1) (const_int 0)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 622,633 ---- /* fall through */ } FAIL; ! }) (define_expand "sgt" [(set (match_operand:SI 0 "intreg_operand" "") (gt:SI (match_dup 1) (const_int 0)))] "" { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { *************** *** 974,986 **** /* fall through */ } FAIL; ! }") (define_expand "slt" [(set (match_operand:SI 0 "intreg_operand" "") (lt:SI (match_dup 1) (const_int 0)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 642,653 ---- /* fall through */ } FAIL; ! }) (define_expand "slt" [(set (match_operand:SI 0 "intreg_operand" "") (lt:SI (match_dup 1) (const_int 0)))] "" { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { *************** *** 995,1007 **** /* fall through */ } FAIL; ! }") (define_expand "sge" [(set (match_operand:SI 0 "intreg_operand" "") (ge:SI (match_dup 1) (const_int 0)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 662,673 ---- /* fall through */ } FAIL; ! }) (define_expand "sge" [(set (match_operand:SI 0 "intreg_operand" "") (ge:SI (match_dup 1) (const_int 0)))] "" { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { *************** *** 1016,1028 **** /* fall through */ } FAIL; ! }") (define_expand "sle" [(set (match_operand:SI 0 "intreg_operand" "") (le:SI (match_dup 1) (const_int 0)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 682,693 ---- /* fall through */ } FAIL; ! }) (define_expand "sle" [(set (match_operand:SI 0 "intreg_operand" "") (le:SI (match_dup 1) (const_int 0)))] "" { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { *************** *** 1037,1049 **** /* fall through */ } FAIL; ! }") (define_expand "sgtu" [(set (match_operand:SI 0 "intreg_operand" "") (gtu:SI (match_dup 1) (const_int 0)))] "" - " { if (! TARGET_V9) { --- 702,713 ---- /* fall through */ } FAIL; ! }) (define_expand "sgtu" [(set (match_operand:SI 0 "intreg_operand" "") (gtu:SI (match_dup 1) (const_int 0)))] "" { if (! TARGET_V9) { *************** *** 1072,1084 **** DONE; } FAIL; ! }") (define_expand "sltu" [(set (match_operand:SI 0 "intreg_operand" "") (ltu:SI (match_dup 1) (const_int 0)))] "" - " { if (TARGET_V9) { --- 736,747 ---- DONE; } FAIL; ! }) (define_expand "sltu" [(set (match_operand:SI 0 "intreg_operand" "") (ltu:SI (match_dup 1) (const_int 0)))] "" { if (TARGET_V9) { *************** *** 1086,1098 **** DONE; } operands[1] = gen_compare_reg (LTU, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "sgeu" [(set (match_operand:SI 0 "intreg_operand" "") (geu:SI (match_dup 1) (const_int 0)))] "" - " { if (TARGET_V9) { --- 749,760 ---- DONE; } operands[1] = gen_compare_reg (LTU, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "sgeu" [(set (match_operand:SI 0 "intreg_operand" "") (geu:SI (match_dup 1) (const_int 0)))] "" { if (TARGET_V9) { *************** *** 1100,1112 **** DONE; } operands[1] = gen_compare_reg (GEU, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "sleu" [(set (match_operand:SI 0 "intreg_operand" "") (leu:SI (match_dup 1) (const_int 0)))] "" - " { if (! TARGET_V9) { --- 762,773 ---- DONE; } operands[1] = gen_compare_reg (GEU, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "sleu" [(set (match_operand:SI 0 "intreg_operand" "") (leu:SI (match_dup 1) (const_int 0)))] "" { if (! TARGET_V9) { *************** *** 1135,1141 **** DONE; } FAIL; ! }") ;; Now the DEFINE_INSNs for the scc cases. --- 796,802 ---- DONE; } FAIL; ! }) ;; Now the DEFINE_INSNs for the scc cases. *************** *** 1144,1406 **** ;; them to always use the splitz below so the results can be ;; scheduled. ! (define_insn "*snesi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (ne:SI (match_operand:SI 1 "register_operand" "r") (const_int 0))) (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (ne:SI (match_operand:SI 1 "register_operand" "") - (const_int 0))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (ltu:SI (reg:CC 100) (const_int 0)))] ! "") ! (define_insn "*neg_snesi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ne:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)))) (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (neg:SI (ne:SI (match_operand:SI 1 "register_operand" "") - (const_int 0)))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (neg:SI (ltu:SI (reg:CC 100) (const_int 0))))] ! "") ! ! (define_insn "*snesi_zero_extend" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (ne:DI (match_operand:SI 1 "register_operand" "r") ! (const_int 0))) ! (clobber (reg:CC 100))] ! "TARGET_ARCH64" ! "#" [(set_attr "length" "2")]) ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (ne:DI (match_operand:SI 1 "register_operand" "") (const_int 0))) (clobber (reg:CC 100))] "TARGET_ARCH64" ! [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (const_int 0) (match_dup 1)) (const_int 0))) (set (match_dup 0) (zero_extend:DI (plus:SI (plus:SI (const_int 0) (const_int 0)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] ! "") ! (define_insn "*snedi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (ne:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (ne:DI (match_operand:DI 1 "register_operand" "") ! (const_int 0)))] ! "TARGET_ARCH64 ! && ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "") ! (define_insn "*neg_snedi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (neg:DI (ne:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0))))] "TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (neg:DI (ne:DI (match_operand:DI 1 "register_operand" "") ! (const_int 0))))] ! "TARGET_ARCH64 ! && ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1) (const_int 0)) (const_int -1) (match_dup 0)))] ! "") ! (define_insn "*snedi_zero_trunc" [(set (match_operand:SI 0 "register_operand" "=&r") ! (ne:SI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (ne:SI (match_operand:DI 1 "register_operand" "") ! (const_int 0)))] ! "TARGET_ARCH64 ! && ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:SI (ne:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "") ! (define_insn "*seqsi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (eq:SI (match_operand:SI 1 "register_operand" "r") (const_int 0))) (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (eq:SI (match_operand:SI 1 "register_operand" "") - (const_int 0))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (geu:SI (reg:CC 100) (const_int 0)))] ! "") ! (define_insn "*neg_seqsi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (eq:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)))) (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (neg:SI (eq:SI (match_operand:SI 1 "register_operand" "") - (const_int 0)))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (neg:SI (geu:SI (reg:CC 100) (const_int 0))))] ! "") ! ! (define_insn "*seqsi_zero_extend" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (eq:DI (match_operand:SI 1 "register_operand" "r") ! (const_int 0))) ! (clobber (reg:CC 100))] ! "TARGET_ARCH64" ! "#" [(set_attr "length" "2")]) ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (eq:DI (match_operand:SI 1 "register_operand" "") (const_int 0))) (clobber (reg:CC 100))] "TARGET_ARCH64" ! [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (const_int 0) (match_dup 1)) (const_int 0))) (set (match_dup 0) (zero_extend:DI (minus:SI (minus:SI (const_int 0) (const_int -1)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] ! "") ! (define_insn "*seqdi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (eq:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (eq:DI (match_operand:DI 1 "register_operand" "") ! (const_int 0)))] ! "TARGET_ARCH64 ! && ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "") ! (define_insn "*neg_seqdi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (neg:DI (eq:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0))))] "TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (neg:DI (eq:DI (match_operand:DI 1 "register_operand" "") ! (const_int 0))))] ! "TARGET_ARCH64 ! && ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1) (const_int 0)) (const_int -1) (match_dup 0)))] ! "") ! (define_insn "*seqdi_zero_trunc" [(set (match_operand:SI 0 "register_operand" "=&r") ! (eq:SI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (eq:SI (match_operand:DI 1 "register_operand" "") ! (const_int 0)))] ! "TARGET_ARCH64 ! && ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:SI (eq:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "") ;; We can also do (x + (i == 0)) and related, so put them in. ;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode ;; versions for v9. ! (define_insn "*x_plus_i_ne_0" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ne:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)) --- 805,997 ---- ;; them to always use the splitz below so the results can be ;; scheduled. ! (define_insn_and_split "*snesi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (ne:SI (match_operand:SI 1 "register_operand" "r") (const_int 0))) (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (ltu:SI (reg:CC 100) (const_int 0)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*neg_snesi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ne:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)))) (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (neg:SI (ltu:SI (reg:CC 100) (const_int 0))))] ! "" [(set_attr "length" "2")]) ! (define_insn_and_split "*snesi_zero_extend" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (ne:DI (match_operand:SI 1 "register_operand" "r") (const_int 0))) (clobber (reg:CC 100))] "TARGET_ARCH64" ! "#" ! "&& 1" ! [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (const_int 0) ! (match_dup 1)) (const_int 0))) (set (match_dup 0) (zero_extend:DI (plus:SI (plus:SI (const_int 0) (const_int 0)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*snedi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (ne:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! "&& ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*neg_snedi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (neg:DI (ne:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0))))] "TARGET_ARCH64" "#" ! "&& ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1) (const_int 0)) (const_int -1) (match_dup 0)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*snedi_zero_trunc" [(set (match_operand:SI 0 "register_operand" "=&r") ! (ne:SI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! "&& ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:SI (ne:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*seqsi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (eq:SI (match_operand:SI 1 "register_operand" "r") (const_int 0))) (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (geu:SI (reg:CC 100) (const_int 0)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*neg_seqsi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (eq:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)))) (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (neg:SI (geu:SI (reg:CC 100) (const_int 0))))] ! "" [(set_attr "length" "2")]) ! (define_insn_and_split "*seqsi_zero_extend" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (eq:DI (match_operand:SI 1 "register_operand" "r") (const_int 0))) (clobber (reg:CC 100))] "TARGET_ARCH64" ! "#" ! "&& 1" ! [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (const_int 0) ! (match_dup 1)) (const_int 0))) (set (match_dup 0) (zero_extend:DI (minus:SI (minus:SI (const_int 0) (const_int -1)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*seqdi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (eq:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! "&& ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*neg_seqdi_zero" [(set (match_operand:DI 0 "register_operand" "=&r") ! (neg:DI (eq:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 0))))] "TARGET_ARCH64" "#" ! "&& ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1) (const_int 0)) (const_int -1) (match_dup 0)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*seqdi_zero_trunc" [(set (match_operand:SI 0 "register_operand" "=&r") ! (eq:SI (match_operand:DI 1 "register_operand" "r") ! (const_int 0)))] "TARGET_ARCH64" "#" ! "&& ! reg_overlap_mentioned_p (operands[1], operands[0])" [(set (match_dup 0) (const_int 0)) (set (match_dup 0) (if_then_else:SI (eq:DI (match_dup 1) (const_int 0)) (const_int 1) (match_dup 0)))] ! "" ! [(set_attr "length" "2")]) ;; We can also do (x + (i == 0)) and related, so put them in. ;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode ;; versions for v9. ! (define_insn_and_split "*x_plus_i_ne_0" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ne:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)) *************** *** 1408,1429 **** (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (ne:SI (match_operand:SI 1 "register_operand" "") - (const_int 0)) - (match_operand:SI 2 "register_operand" ""))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_dup 2)))] ! "") ! (define_insn "*x_minus_i_ne_0" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") (ne:SI (match_operand:SI 1 "register_operand" "r") --- 999,1013 ---- (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_dup 2)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*x_minus_i_ne_0" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") (ne:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1431,1452 **** (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (minus:SI (match_operand:SI 2 "register_operand" "") - (ne:SI (match_operand:SI 1 "register_operand" "") - (const_int 0)))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (minus:SI (match_dup 2) (ltu:SI (reg:CC 100) (const_int 0))))] ! "") ! (define_insn "*x_plus_i_eq_0" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (eq:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)) --- 1015,1029 ---- (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (minus:SI (match_dup 2) (ltu:SI (reg:CC 100) (const_int 0))))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*x_plus_i_eq_0" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (eq:SI (match_operand:SI 1 "register_operand" "r") (const_int 0)) *************** *** 1454,1475 **** (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (eq:SI (match_operand:SI 1 "register_operand" "") - (const_int 0)) - (match_operand:SI 2 "register_operand" ""))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (plus:SI (geu:SI (reg:CC 100) (const_int 0)) (match_dup 2)))] ! "") ! (define_insn "*x_minus_i_eq_0" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") (eq:SI (match_operand:SI 1 "register_operand" "r") --- 1031,1045 ---- (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (plus:SI (geu:SI (reg:CC 100) (const_int 0)) (match_dup 2)))] ! "" ! [(set_attr "length" "2")]) ! (define_insn_and_split "*x_minus_i_eq_0" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") (eq:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1477,1496 **** (clobber (reg:CC 100))] "" "#" - [(set_attr "length" "2")]) - - (define_split - [(set (match_operand:SI 0 "register_operand" "") - (minus:SI (match_operand:SI 2 "register_operand" "") - (eq:SI (match_operand:SI 1 "register_operand" "") - (const_int 0)))) - (clobber (reg:CC 100))] "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (minus:SI (match_dup 2) (geu:SI (reg:CC 100) (const_int 0))))] ! "") ;; We can also do GEU and LTU directly, but these operate after a compare. ;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode --- 1047,1059 ---- (clobber (reg:CC 100))] "" "#" "" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1)) (const_int 0))) (set (match_dup 0) (minus:SI (match_dup 2) (geu:SI (reg:CC 100) (const_int 0))))] ! "" ! [(set_attr "length" "2")]) ;; We can also do GEU and LTU directly, but these operate after a compare. ;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode *************** *** 1500,1514 **** [(set (match_operand:SI 0 "register_operand" "=r") (ltu:SI (reg:CC 100) (const_int 0)))] "" ! "addx\\t%%g0, 0, %0" ! [(set_attr "type" "misc")]) (define_insn "*neg_sltu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ltu:SI (reg:CC 100) (const_int 0))))] "" ! "subx\\t%%g0, 0, %0" ! [(set_attr "type" "misc")]) ;; ??? Combine should canonicalize these next two to the same pattern. (define_insn "*neg_sltu_minus_x" --- 1063,1077 ---- [(set (match_operand:SI 0 "register_operand" "=r") (ltu:SI (reg:CC 100) (const_int 0)))] "" ! "addx\t%%g0, 0, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*neg_sltu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ltu:SI (reg:CC 100) (const_int 0))))] "" ! "subx\t%%g0, 0, %0" ! [(set_attr "type" "ialuX")]) ;; ??? Combine should canonicalize these next two to the same pattern. (define_insn "*neg_sltu_minus_x" *************** *** 1516,1545 **** (minus:SI (neg:SI (ltu:SI (reg:CC 100) (const_int 0))) (match_operand:SI 1 "arith_operand" "rI")))] "" ! "subx\\t%%g0, %1, %0" ! [(set_attr "type" "misc")]) (define_insn "*neg_sltu_plus_x" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 1 "arith_operand" "rI"))))] "" ! "subx\\t%%g0, %1, %0" ! [(set_attr "type" "misc")]) (define_insn "*sgeu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (geu:SI (reg:CC 100) (const_int 0)))] "" ! "subx\\t%%g0, -1, %0" ! [(set_attr "type" "misc")]) (define_insn "*neg_sgeu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (geu:SI (reg:CC 100) (const_int 0))))] "" ! "addx\\t%%g0, -1, %0" ! [(set_attr "type" "misc")]) ;; We can also do (x + ((unsigned) i >= 0)) and related, so put them in. ;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode --- 1079,1108 ---- (minus:SI (neg:SI (ltu:SI (reg:CC 100) (const_int 0))) (match_operand:SI 1 "arith_operand" "rI")))] "" ! "subx\t%%g0, %1, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*neg_sltu_plus_x" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 1 "arith_operand" "rI"))))] "" ! "subx\t%%g0, %1, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*sgeu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (geu:SI (reg:CC 100) (const_int 0)))] "" ! "subx\t%%g0, -1, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*neg_sgeu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (geu:SI (reg:CC 100) (const_int 0))))] "" ! "addx\t%%g0, -1, %0" ! [(set_attr "type" "ialuX")]) ;; We can also do (x + ((unsigned) i >= 0)) and related, so put them in. ;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode *************** *** 1550,1557 **** (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 1 "arith_operand" "rI")))] "" ! "addx\\t%%g0, %1, %0" ! [(set_attr "type" "misc")]) (define_insn "*sltu_plus_x_plus_y" [(set (match_operand:SI 0 "register_operand" "=r") --- 1113,1120 ---- (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 1 "arith_operand" "rI")))] "" ! "addx\t%%g0, %1, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*sltu_plus_x_plus_y" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 1559,1574 **** (plus:SI (match_operand:SI 1 "arith_operand" "%r") (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "addx\\t%1, %2, %0" ! [(set_attr "type" "misc")]) (define_insn "*x_minus_sltu" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") (ltu:SI (reg:CC 100) (const_int 0))))] "" ! "subx\\t%1, 0, %0" ! [(set_attr "type" "misc")]) ;; ??? Combine should canonicalize these next two to the same pattern. (define_insn "*x_minus_y_minus_sltu" --- 1122,1137 ---- (plus:SI (match_operand:SI 1 "arith_operand" "%r") (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "addx\t%1, %2, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*x_minus_sltu" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") (ltu:SI (reg:CC 100) (const_int 0))))] "" ! "subx\t%1, 0, %0" ! [(set_attr "type" "ialuX")]) ;; ??? Combine should canonicalize these next two to the same pattern. (define_insn "*x_minus_y_minus_sltu" *************** *** 1577,1584 **** (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC 100) (const_int 0))))] "" ! "subx\\t%r1, %2, %0" ! [(set_attr "type" "misc")]) (define_insn "*x_minus_sltu_plus_y" [(set (match_operand:SI 0 "register_operand" "=r") --- 1140,1147 ---- (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC 100) (const_int 0))))] "" ! "subx\t%r1, %2, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*x_minus_sltu_plus_y" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 1586,1609 **** (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "subx\\t%r1, %2, %0" ! [(set_attr "type" "misc")]) (define_insn "*sgeu_plus_x" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (geu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 1 "register_operand" "r")))] "" ! "subx\\t%1, -1, %0" ! [(set_attr "type" "misc")]) (define_insn "*x_minus_sgeu" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") (geu:SI (reg:CC 100) (const_int 0))))] "" ! "addx\\t%1, -1, %0" ! [(set_attr "type" "misc")]) (define_split [(set (match_operand:SI 0 "register_operand" "") --- 1149,1172 ---- (plus:SI (ltu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "subx\t%r1, %2, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*sgeu_plus_x" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (geu:SI (reg:CC 100) (const_int 0)) (match_operand:SI 1 "register_operand" "r")))] "" ! "subx\t%1, -1, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*x_minus_sgeu" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") (geu:SI (reg:CC 100) (const_int 0))))] "" ! "addx\t%1, -1, %0" ! [(set_attr "type" "ialuX")]) (define_split [(set (match_operand:SI 0 "register_operand" "") *************** *** 1634,1640 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx && GET_CODE (sparc_compare_op0) == REG --- 1197,1202 ---- *************** *** 1650,1656 **** DONE; } operands[1] = gen_compare_reg (EQ, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bne" [(set (pc) --- 1212,1218 ---- DONE; } operands[1] = gen_compare_reg (EQ, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bne" [(set (pc) *************** *** 1658,1664 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx && GET_CODE (sparc_compare_op0) == REG --- 1220,1225 ---- *************** *** 1674,1680 **** DONE; } operands[1] = gen_compare_reg (NE, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bgt" [(set (pc) --- 1235,1241 ---- DONE; } operands[1] = gen_compare_reg (NE, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bgt" [(set (pc) *************** *** 1682,1688 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx && GET_CODE (sparc_compare_op0) == REG --- 1243,1248 ---- *************** *** 1698,1704 **** DONE; } operands[1] = gen_compare_reg (GT, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bgtu" [(set (pc) --- 1258,1264 ---- DONE; } operands[1] = gen_compare_reg (GT, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bgtu" [(set (pc) *************** *** 1706,1714 **** (label_ref (match_operand 0 "" "")) (pc)))] "" ! " ! { operands[1] = gen_compare_reg (GTU, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "blt" [(set (pc) --- 1266,1274 ---- (label_ref (match_operand 0 "" "")) (pc)))] "" ! { ! operands[1] = gen_compare_reg (GTU, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "blt" [(set (pc) *************** *** 1716,1722 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx && GET_CODE (sparc_compare_op0) == REG --- 1276,1281 ---- *************** *** 1732,1738 **** DONE; } operands[1] = gen_compare_reg (LT, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bltu" [(set (pc) --- 1291,1297 ---- DONE; } operands[1] = gen_compare_reg (LT, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bltu" [(set (pc) *************** *** 1740,1748 **** (label_ref (match_operand 0 "" "")) (pc)))] "" ! " ! { operands[1] = gen_compare_reg (LTU, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bge" [(set (pc) --- 1299,1307 ---- (label_ref (match_operand 0 "" "")) (pc)))] "" ! { ! operands[1] = gen_compare_reg (LTU, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bge" [(set (pc) *************** *** 1750,1756 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx && GET_CODE (sparc_compare_op0) == REG --- 1309,1314 ---- *************** *** 1766,1772 **** DONE; } operands[1] = gen_compare_reg (GE, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bgeu" [(set (pc) --- 1324,1330 ---- DONE; } operands[1] = gen_compare_reg (GE, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bgeu" [(set (pc) *************** *** 1774,1782 **** (label_ref (match_operand 0 "" "")) (pc)))] "" ! " ! { operands[1] = gen_compare_reg (GEU, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "ble" [(set (pc) --- 1332,1340 ---- (label_ref (match_operand 0 "" "")) (pc)))] "" ! { ! operands[1] = gen_compare_reg (GEU, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "ble" [(set (pc) *************** *** 1784,1790 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx && GET_CODE (sparc_compare_op0) == REG --- 1342,1347 ---- *************** *** 1800,1806 **** DONE; } operands[1] = gen_compare_reg (LE, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bleu" [(set (pc) --- 1357,1363 ---- DONE; } operands[1] = gen_compare_reg (LE, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bleu" [(set (pc) *************** *** 1808,1816 **** (label_ref (match_operand 0 "" "")) (pc)))] "" ! " ! { operands[1] = gen_compare_reg (LEU, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bunordered" [(set (pc) --- 1365,1373 ---- (label_ref (match_operand 0 "" "")) (pc)))] "" ! { ! operands[1] = gen_compare_reg (LEU, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bunordered" [(set (pc) *************** *** 1818,1824 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1375,1380 ---- *************** *** 1829,1835 **** } operands[1] = gen_compare_reg (UNORDERED, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bordered" [(set (pc) --- 1385,1391 ---- } operands[1] = gen_compare_reg (UNORDERED, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bordered" [(set (pc) *************** *** 1837,1843 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1393,1398 ---- *************** *** 1847,1853 **** } operands[1] = gen_compare_reg (ORDERED, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bungt" [(set (pc) --- 1402,1408 ---- } operands[1] = gen_compare_reg (ORDERED, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bungt" [(set (pc) *************** *** 1855,1861 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1410,1415 ---- *************** *** 1864,1870 **** DONE; } operands[1] = gen_compare_reg (UNGT, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bunlt" [(set (pc) --- 1418,1424 ---- DONE; } operands[1] = gen_compare_reg (UNGT, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bunlt" [(set (pc) *************** *** 1872,1878 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1426,1431 ---- *************** *** 1881,1887 **** DONE; } operands[1] = gen_compare_reg (UNLT, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "buneq" [(set (pc) --- 1434,1440 ---- DONE; } operands[1] = gen_compare_reg (UNLT, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "buneq" [(set (pc) *************** *** 1889,1895 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1442,1447 ---- *************** *** 1898,1904 **** DONE; } operands[1] = gen_compare_reg (UNEQ, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bunge" [(set (pc) --- 1450,1456 ---- DONE; } operands[1] = gen_compare_reg (UNEQ, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bunge" [(set (pc) *************** *** 1906,1912 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1458,1463 ---- *************** *** 1915,1921 **** DONE; } operands[1] = gen_compare_reg (UNGE, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bunle" [(set (pc) --- 1466,1472 ---- DONE; } operands[1] = gen_compare_reg (UNGE, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bunle" [(set (pc) *************** *** 1923,1929 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1474,1479 ---- *************** *** 1932,1938 **** DONE; } operands[1] = gen_compare_reg (UNLE, sparc_compare_op0, sparc_compare_op1); ! }") (define_expand "bltgt" [(set (pc) --- 1482,1488 ---- DONE; } operands[1] = gen_compare_reg (UNLE, sparc_compare_op0, sparc_compare_op1); ! }) (define_expand "bltgt" [(set (pc) *************** *** 1940,1946 **** (label_ref (match_operand 0 "" "")) (pc)))] "" - " { if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD) { --- 1490,1495 ---- *************** *** 1949,1955 **** DONE; } operands[1] = gen_compare_reg (LTGT, sparc_compare_op0, sparc_compare_op1); ! }") ;; Now match both normal and inverted jump. --- 1498,1504 ---- DONE; } operands[1] = gen_compare_reg (LTGT, sparc_compare_op0, sparc_compare_op1); ! }) ;; Now match both normal and inverted jump. *************** *** 1961,1972 **** (label_ref (match_operand 1 "" "")) (pc)))] "" - "* { return output_cbranch (operands[0], operands[1], 1, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "icc")]) --- 1510,1520 ---- (label_ref (match_operand 1 "" "")) (pc)))] "" { return output_cbranch (operands[0], operands[1], 1, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "icc")]) *************** *** 1978,1989 **** (pc) (label_ref (match_operand 1 "" ""))))] "" - "* { return output_cbranch (operands[0], operands[1], 1, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "icc")]) --- 1526,1536 ---- (pc) (label_ref (match_operand 1 "" ""))))] "" { return output_cbranch (operands[0], operands[1], 1, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "icc")]) *************** *** 1996,2007 **** (label_ref (match_operand 2 "" "")) (pc)))] "" - "* { return output_cbranch (operands[1], operands[2], 2, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) --- 1543,1553 ---- (label_ref (match_operand 2 "" "")) (pc)))] "" { return output_cbranch (operands[1], operands[2], 2, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) *************** *** 2014,2025 **** (pc) (label_ref (match_operand 2 "" ""))))] "" - "* { return output_cbranch (operands[1], operands[2], 2, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) --- 1560,1570 ---- (pc) (label_ref (match_operand 2 "" ""))))] "" { return output_cbranch (operands[1], operands[2], 2, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) *************** *** 2032,2043 **** (label_ref (match_operand 2 "" "")) (pc)))] "" - "* { return output_cbranch (operands[1], operands[2], 2, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) --- 1577,1587 ---- (label_ref (match_operand 2 "" "")) (pc)))] "" { return output_cbranch (operands[1], operands[2], 2, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) *************** *** 2050,2065 **** (pc) (label_ref (match_operand 2 "" ""))))] "" - "* { return output_cbranch (operands[1], operands[2], 2, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) ! ;; Sparc V9-specific jump insns. None of these are guaranteed to be ;; in the architecture. ;; There are no 32 bit brreg insns. --- 1594,1608 ---- (pc) (label_ref (match_operand 2 "" ""))))] "" { return output_cbranch (operands[1], operands[2], 2, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "fcc")]) ! ;; SPARC V9-specific jump insns. None of these are guaranteed to be ;; in the architecture. ;; There are no 32 bit brreg insns. *************** *** 2073,2084 **** (label_ref (match_operand 2 "" "")) (pc)))] "TARGET_ARCH64" - "* { return output_v9branch (operands[0], operands[2], 1, 2, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "reg")]) --- 1616,1626 ---- (label_ref (match_operand 2 "" "")) (pc)))] "TARGET_ARCH64" { return output_v9branch (operands[0], operands[2], 1, 2, 0, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "reg")]) *************** *** 2091,2102 **** (pc) (label_ref (match_operand 2 "" ""))))] "TARGET_ARCH64" - "* { return output_v9branch (operands[0], operands[2], 1, 2, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! }" [(set_attr "type" "branch") (set_attr "branch_type" "reg")]) --- 1633,1643 ---- (pc) (label_ref (match_operand 2 "" ""))))] "TARGET_ARCH64" { return output_v9branch (operands[0], operands[2], 1, 2, 1, final_sequence && INSN_ANNULLED_BRANCH_P (insn), ! final_sequence, insn); ! } [(set_attr "type" "branch") (set_attr "branch_type" "reg")]) *************** *** 2105,2123 **** (define_insn "get_pc" [(clobber (reg:SI 15)) (set (match_operand 0 "register_operand" "=r") ! (unspec [(match_operand 1 "" "") (match_operand 2 "" "")] 2))] "flag_pic && REGNO (operands[0]) == 23" ! "sethi\\t%%hi(%a1-4), %0\\n\\tcall\\t%a2\\n\\tadd\\t%0, %%lo(%a1+4), %0" [(set_attr "type" "multi") (set_attr "length" "3")]) - ;; Currently unused... - ;; (define_insn "get_pc_via_rdpc" - ;; [(set (match_operand 0 "register_operand" "=r") (pc))] - ;; "TARGET_V9" - ;; "rd\\t%%pc, %0" - ;; [(set_attr "type" "misc")]) - ;; Move instructions --- 1646,1657 ---- (define_insn "get_pc" [(clobber (reg:SI 15)) (set (match_operand 0 "register_operand" "=r") ! (unspec [(match_operand 1 "" "") (match_operand 2 "" "")] UNSPEC_GET_PC))] "flag_pic && REGNO (operands[0]) == 23" ! "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\tadd\t%0, %%lo(%a1+4), %0" [(set_attr "type" "multi") (set_attr "length" "3")]) ;; Move instructions *************** *** 2125,2131 **** [(set (match_operand:QI 0 "general_operand" "") (match_operand:QI 1 "general_operand" ""))] "" - " { /* Working with CONST_INTs is easier, so convert a double if needed. */ --- 1659,1664 ---- *************** *** 2170,2176 **** movqi_is_ok: ; ! }") (define_insn "*movqi_insn" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m") --- 1703,1709 ---- movqi_is_ok: ; ! }) (define_insn "*movqi_insn" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m") *************** *** 2178,2193 **** "(register_operand (operands[0], QImode) || reg_or_0_operand (operands[1], QImode))" "@ ! mov\\t%1, %0 ! ldub\\t%1, %0 ! stb\\t%r1, %0" ! [(set_attr "type" "*,load,store")]) (define_expand "movhi" [(set (match_operand:HI 0 "general_operand" "") (match_operand:HI 1 "general_operand" ""))] "" - " { /* Working with CONST_INTs is easier, so convert a double if needed. */ --- 1711,1726 ---- "(register_operand (operands[0], QImode) || reg_or_0_operand (operands[1], QImode))" "@ ! mov\t%1, %0 ! ldub\t%1, %0 ! stb\t%r1, %0" ! [(set_attr "type" "*,load,store") ! (set_attr "us3load_type" "*,3cycle,*")]) (define_expand "movhi" [(set (match_operand:HI 0 "general_operand" "") (match_operand:HI 1 "general_operand" ""))] "" { /* Working with CONST_INTs is easier, so convert a double if needed. */ *************** *** 2237,2249 **** } movhi_is_ok: ; ! }") (define_insn "*movhi_const64_special" [(set (match_operand:HI 0 "register_operand" "=r") (match_operand:HI 1 "const64_high_operand" ""))] "TARGET_ARCH64" ! "sethi\\t%%hi(%a1), %0") (define_insn "*movhi_insn" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m") --- 1770,1782 ---- } movhi_is_ok: ; ! }) (define_insn "*movhi_const64_special" [(set (match_operand:HI 0 "register_operand" "=r") (match_operand:HI 1 "const64_high_operand" ""))] "TARGET_ARCH64" ! "sethi\t%%hi(%a1), %0") (define_insn "*movhi_insn" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m") *************** *** 2251,2261 **** "(register_operand (operands[0], HImode) || reg_or_0_operand (operands[1], HImode))" "@ ! mov\\t%1, %0 ! sethi\\t%%hi(%a1), %0 ! lduh\\t%1, %0 ! sth\\t%r1, %0" ! [(set_attr "type" "*,*,load,store")]) ;; We always work with constants here. (define_insn "*movhi_lo_sum" --- 1784,1795 ---- "(register_operand (operands[0], HImode) || reg_or_0_operand (operands[1], HImode))" "@ ! mov\t%1, %0 ! sethi\t%%hi(%a1), %0 ! lduh\t%1, %0 ! sth\t%r1, %0" ! [(set_attr "type" "*,*,load,store") ! (set_attr "us3load_type" "*,*,3cycle,*")]) ;; We always work with constants here. (define_insn "*movhi_lo_sum" *************** *** 2263,2275 **** (ior:HI (match_operand:HI 1 "arith_operand" "%r") (match_operand:HI 2 "arith_operand" "I")))] "" ! "or\\t%1, %2, %0") (define_expand "movsi" [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" - " { /* Working with CONST_INTs is easier, so convert a double if needed. */ --- 1797,1808 ---- (ior:HI (match_operand:HI 1 "arith_operand" "%r") (match_operand:HI 2 "arith_operand" "I")))] "" ! "or\t%1, %2, %0") (define_expand "movsi" [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" { /* Working with CONST_INTs is easier, so convert a double if needed. */ *************** *** 2335,2341 **** } movsi_is_ok: ; ! }") ;; This is needed to show CSE exactly which bits are set ;; in a 64-bit register by sethi instructions. --- 1868,1874 ---- } movsi_is_ok: ; ! }) ;; This is needed to show CSE exactly which bits are set ;; in a 64-bit register by sethi instructions. *************** *** 2343,2349 **** [(set (match_operand:SI 0 "register_operand" "=r") (match_operand:SI 1 "const64_high_operand" ""))] "TARGET_ARCH64" ! "sethi\\t%%hi(%a1), %0") (define_insn "*movsi_insn" [(set (match_operand:SI 0 "nonimmediate_operand" "=r,f,r,r,r,f,m,m,d") --- 1876,1882 ---- [(set (match_operand:SI 0 "register_operand" "=r") (match_operand:SI 1 "const64_high_operand" ""))] "TARGET_ARCH64" ! "sethi\t%%hi(%a1), %0") (define_insn "*movsi_insn" [(set (match_operand:SI 0 "nonimmediate_operand" "=r,f,r,r,r,f,m,m,d") *************** *** 2351,2365 **** "(register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode))" "@ ! mov\\t%1, %0 ! fmovs\\t%1, %0 ! sethi\\t%%hi(%a1), %0 ! clr\\t%0 ! ld\\t%1, %0 ! ld\\t%1, %0 ! st\\t%r1, %0 ! st\\t%1, %0 ! fzeros\\t%0" [(set_attr "type" "*,fpmove,*,*,load,fpload,store,fpstore,fpmove")]) (define_insn "*movsi_lo_sum" --- 1884,1898 ---- "(register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode))" "@ ! mov\t%1, %0 ! fmovs\t%1, %0 ! sethi\t%%hi(%a1), %0 ! clr\t%0 ! ld\t%1, %0 ! ld\t%1, %0 ! st\t%r1, %0 ! st\t%1, %0 ! fzeros\t%0" [(set_attr "type" "*,fpmove,*,*,load,fpload,store,fpstore,fpmove")]) (define_insn "*movsi_lo_sum" *************** *** 2367,2408 **** (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")))] "" ! "or\\t%1, %%lo(%a2), %0") (define_insn "*movsi_high" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand:SI 1 "immediate_operand" "in")))] "" ! "sethi\\t%%hi(%a1), %0") ;; The next two patterns must wrap the SYMBOL_REF in an UNSPEC ;; so that CSE won't optimize the address computation away. (define_insn "movsi_lo_sum_pic" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") ! (unspec:SI [(match_operand:SI 2 "immediate_operand" "in")] 0)))] "flag_pic" ! "or\\t%1, %%lo(%a2), %0") (define_insn "movsi_high_pic" [(set (match_operand:SI 0 "register_operand" "=r") ! (high:SI (unspec:SI [(match_operand 1 "" "")] 0)))] "flag_pic && check_pic (1)" ! "sethi\\t%%hi(%a1), %0") (define_expand "movsi_pic_label_ref" [(set (match_dup 3) (high:SI (unspec:SI [(match_operand:SI 1 "label_ref_operand" "") ! (match_dup 2)] 5))) (set (match_dup 4) (lo_sum:SI (match_dup 3) ! (unspec:SI [(match_dup 1) (match_dup 2)] 5))) (set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_dup 5) (match_dup 4)))] "flag_pic" - " { current_function_uses_pic_offset_table = 1; ! operands[2] = gen_rtx_SYMBOL_REF (Pmode, \"_GLOBAL_OFFSET_TABLE_\"); if (no_new_pseudos) { operands[3] = operands[0]; --- 1900,1940 ---- (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")))] "" ! "or\t%1, %%lo(%a2), %0") (define_insn "*movsi_high" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand:SI 1 "immediate_operand" "in")))] "" ! "sethi\t%%hi(%a1), %0") ;; The next two patterns must wrap the SYMBOL_REF in an UNSPEC ;; so that CSE won't optimize the address computation away. (define_insn "movsi_lo_sum_pic" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") ! (unspec:SI [(match_operand:SI 2 "immediate_operand" "in")] UNSPEC_MOVE_PIC)))] "flag_pic" ! "or\t%1, %%lo(%a2), %0") (define_insn "movsi_high_pic" [(set (match_operand:SI 0 "register_operand" "=r") ! (high:SI (unspec:SI [(match_operand 1 "" "")] UNSPEC_MOVE_PIC)))] "flag_pic && check_pic (1)" ! "sethi\t%%hi(%a1), %0") (define_expand "movsi_pic_label_ref" [(set (match_dup 3) (high:SI (unspec:SI [(match_operand:SI 1 "label_ref_operand" "") ! (match_dup 2)] UNSPEC_MOVE_PIC_LABEL))) (set (match_dup 4) (lo_sum:SI (match_dup 3) ! (unspec:SI [(match_dup 1) (match_dup 2)] UNSPEC_MOVE_PIC_LABEL))) (set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_dup 5) (match_dup 4)))] "flag_pic" { current_function_uses_pic_offset_table = 1; ! operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); if (no_new_pseudos) { operands[3] = operands[0]; *************** *** 2414,2442 **** operands[4] = gen_reg_rtx (SImode); } operands[5] = pic_offset_table_rtx; ! }") (define_insn "*movsi_high_pic_label_ref" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (unspec:SI [(match_operand:SI 1 "label_ref_operand" "") ! (match_operand:SI 2 "" "")] 5)))] "flag_pic" ! "sethi\\t%%hi(%a2-(%a1-.)), %0") (define_insn "*movsi_lo_sum_pic_label_ref" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (unspec:SI [(match_operand:SI 2 "label_ref_operand" "") ! (match_operand:SI 3 "" "")] 5)))] "flag_pic" ! "or\\t%1, %%lo(%a3-(%a2-.)), %0") (define_expand "movdi" [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "") (match_operand:DI 1 "general_operand" ""))] "" - " { /* Where possible, convert CONST_DOUBLE into a CONST_INT. */ if (GET_CODE (operands[1]) == CONST_DOUBLE --- 1946,1973 ---- operands[4] = gen_reg_rtx (SImode); } operands[5] = pic_offset_table_rtx; ! }) (define_insn "*movsi_high_pic_label_ref" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (unspec:SI [(match_operand:SI 1 "label_ref_operand" "") ! (match_operand:SI 2 "" "")] UNSPEC_MOVE_PIC_LABEL)))] "flag_pic" ! "sethi\t%%hi(%a2-(%a1-.)), %0") (define_insn "*movsi_lo_sum_pic_label_ref" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (unspec:SI [(match_operand:SI 2 "label_ref_operand" "") ! (match_operand:SI 3 "" "")] UNSPEC_MOVE_PIC_LABEL)))] "flag_pic" ! "or\t%1, %%lo(%a3-(%a2-.)), %0") (define_expand "movdi" [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "") (match_operand:DI 1 "general_operand" ""))] "" { /* Where possible, convert CONST_DOUBLE into a CONST_INT. */ if (GET_CODE (operands[1]) == CONST_DOUBLE *************** *** 2515,2521 **** movdi_is_ok: ; ! }") ;; Be careful, fmovd does not exist when !v9. ;; We match MEM moves directly when we have correct even --- 2046,2052 ---- movdi_is_ok: ; ! }) ;; Be careful, fmovd does not exist when !v9. ;; We match MEM moves directly when we have correct even *************** *** 2537,2552 **** "! TARGET_ARCH64 && TARGET_V9 && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ ! stx\\t%%g0, %0 # ! std\\t%1, %0 ! ldd\\t%1, %0 # # # # ! std\\t%1, %0 ! ldd\\t%1, %0 # # fmovd\\t%1, %0 --- 2068,2083 ---- "! TARGET_ARCH64 && TARGET_V9 && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "@ ! stx\t%%g0, %0 # ! std\t%1, %0 ! ldd\t%1, %0 # # # # ! std\t%1, %0 ! ldd\t%1, %0 # # fmovd\\t%1, %0 *************** *** 2566,2579 **** || register_operand (operands[1], DImode))" "@ # ! std\\t%1, %0 ! ldd\\t%1, %0 # # # # ! std\\t%1, %0 ! ldd\\t%1, %0 # # #" --- 2097,2110 ---- || register_operand (operands[1], DImode))" "@ # ! std\t%1, %0 ! ldd\t%1, %0 # # # # ! std\t%1, %0 ! ldd\t%1, %0 # # #" *************** *** 2586,2592 **** (match_operand:DI 1 "const64_operand" ""))] "(TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64)" ! "mov\\t%1, %0") ;; This is needed to show CSE exactly which bits are set ;; in a 64-bit register by sethi instructions. --- 2117,2123 ---- (match_operand:DI 1 "const64_operand" ""))] "(TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64)" ! "mov\t%1, %0") ;; This is needed to show CSE exactly which bits are set ;; in a 64-bit register by sethi instructions. *************** *** 2594,2600 **** [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "const64_high_operand" ""))] "TARGET_ARCH64" ! "sethi\\t%%hi(%a1), %0") (define_insn "*movdi_insn_sp64_novis" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,m,?e,?e,?W") --- 2125,2131 ---- [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "const64_high_operand" ""))] "TARGET_ARCH64" ! "sethi\t%%hi(%a1), %0") (define_insn "*movdi_insn_sp64_novis" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,m,?e,?e,?W") *************** *** 2603,2616 **** && (register_operand (operands[0], DImode) || reg_or_0_operand (operands[1], DImode))" "@ ! mov\\t%1, %0 ! sethi\\t%%hi(%a1), %0 ! clr\\t%0 ! ldx\\t%1, %0 ! stx\\t%r1, %0 ! fmovd\\t%1, %0 ! ldd\\t%1, %0 ! std\\t%1, %0" [(set_attr "type" "*,*,*,load,store,fpmove,fpload,fpstore") (set_attr "fptype" "*,*,*,*,*,double,*,*")]) --- 2134,2147 ---- && (register_operand (operands[0], DImode) || reg_or_0_operand (operands[1], DImode))" "@ ! mov\t%1, %0 ! sethi\t%%hi(%a1), %0 ! clr\t%0 ! ldx\t%1, %0 ! stx\t%r1, %0 ! fmovd\t%1, %0 ! ldd\t%1, %0 ! std\t%1, %0" [(set_attr "type" "*,*,*,load,store,fpmove,fpload,fpstore") (set_attr "fptype" "*,*,*,*,*,double,*,*")]) *************** *** 2621,2651 **** (register_operand (operands[0], DImode) || reg_or_0_operand (operands[1], DImode))" "@ ! mov\\t%1, %0 ! sethi\\t%%hi(%a1), %0 ! clr\\t%0 ! ldx\\t%1, %0 ! stx\\t%r1, %0 ! fmovd\\t%1, %0 ! ldd\\t%1, %0 ! std\\t%1, %0 ! fzero\\t%0" [(set_attr "type" "*,*,*,load,store,fpmove,fpload,fpstore,fpmove") (set_attr "fptype" "*,*,*,*,*,double,*,*,double")]) (define_expand "movdi_pic_label_ref" [(set (match_dup 3) (high:DI (unspec:DI [(match_operand:DI 1 "label_ref_operand" "") ! (match_dup 2)] 5))) (set (match_dup 4) (lo_sum:DI (match_dup 3) ! (unspec:DI [(match_dup 1) (match_dup 2)] 5))) (set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_dup 5) (match_dup 4)))] "TARGET_ARCH64 && flag_pic" - " { current_function_uses_pic_offset_table = 1; ! operands[2] = gen_rtx_SYMBOL_REF (Pmode, \"_GLOBAL_OFFSET_TABLE_\"); if (no_new_pseudos) { operands[3] = operands[0]; --- 2152,2181 ---- (register_operand (operands[0], DImode) || reg_or_0_operand (operands[1], DImode))" "@ ! mov\t%1, %0 ! sethi\t%%hi(%a1), %0 ! clr\t%0 ! ldx\t%1, %0 ! stx\t%r1, %0 ! fmovd\t%1, %0 ! ldd\t%1, %0 ! std\t%1, %0 ! fzero\t%0" [(set_attr "type" "*,*,*,load,store,fpmove,fpload,fpstore,fpmove") (set_attr "fptype" "*,*,*,*,*,double,*,*,double")]) (define_expand "movdi_pic_label_ref" [(set (match_dup 3) (high:DI (unspec:DI [(match_operand:DI 1 "label_ref_operand" "") ! (match_dup 2)] UNSPEC_MOVE_PIC_LABEL))) (set (match_dup 4) (lo_sum:DI (match_dup 3) ! (unspec:DI [(match_dup 1) (match_dup 2)] UNSPEC_MOVE_PIC_LABEL))) (set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_dup 5) (match_dup 4)))] "TARGET_ARCH64 && flag_pic" { current_function_uses_pic_offset_table = 1; ! operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); if (no_new_pseudos) { operands[3] = operands[0]; *************** *** 2657,2805 **** operands[4] = gen_reg_rtx (DImode); } operands[5] = pic_offset_table_rtx; ! }") (define_insn "*movdi_high_pic_label_ref" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (unspec:DI [(match_operand:DI 1 "label_ref_operand" "") ! (match_operand:DI 2 "" "")] 5)))] "TARGET_ARCH64 && flag_pic" ! "sethi\\t%%hi(%a2-(%a1-.)), %0") (define_insn "*movdi_lo_sum_pic_label_ref" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (unspec:DI [(match_operand:DI 2 "label_ref_operand" "") ! (match_operand:DI 3 "" "")] 5)))] "TARGET_ARCH64 && flag_pic" ! "or\\t%1, %%lo(%a3-(%a2-.)), %0") ! ;; Sparc-v9 code model support insns. See sparc_emit_set_symbolic_const64 ;; in sparc.c to see what is going on here... PIC stuff comes first. (define_insn "movdi_lo_sum_pic" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "immediate_operand" "in")] 0)))] "TARGET_ARCH64 && flag_pic" ! "or\\t%1, %%lo(%a2), %0") (define_insn "movdi_high_pic" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand 1 "" "")] 0)))] "TARGET_ARCH64 && flag_pic && check_pic (1)" ! "sethi\\t%%hi(%a1), %0") (define_insn "*sethi_di_medlow_embmedany_pic" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand:DI 1 "sp64_medium_pic_operand" "")))] "(TARGET_CM_MEDLOW || TARGET_CM_EMBMEDANY) && check_pic (1)" ! "sethi\\t%%hi(%a1), %0") (define_insn "*sethi_di_medlow" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand:DI 1 "symbolic_operand" "")))] "TARGET_CM_MEDLOW && check_pic (1)" ! "sethi\\t%%hi(%a1), %0") (define_insn "*losum_di_medlow" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "symbolic_operand" "")))] "TARGET_CM_MEDLOW" ! "or\\t%1, %%lo(%a2), %0") (define_insn "seth44" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] 6)))] "TARGET_CM_MEDMID" ! "sethi\\t%%h44(%a1), %0") (define_insn "setm44" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] 7)))] "TARGET_CM_MEDMID" ! "or\\t%1, %%m44(%a2), %0") (define_insn "setl44" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "symbolic_operand" "")))] "TARGET_CM_MEDMID" ! "or\\t%1, %%l44(%a2), %0") (define_insn "sethh" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] 9)))] "TARGET_CM_MEDANY" ! "sethi\\t%%hh(%a1), %0") (define_insn "setlm" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] 10)))] "TARGET_CM_MEDANY" ! "sethi\\t%%lm(%a1), %0") (define_insn "sethm" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] 18)))] "TARGET_CM_MEDANY" ! "or\\t%1, %%hm(%a2), %0") (define_insn "setlo" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "symbolic_operand" "")))] "TARGET_CM_MEDANY" ! "or\\t%1, %%lo(%a2), %0") (define_insn "embmedany_sethi" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "data_segment_operand" "")] 11)))] "TARGET_CM_EMBMEDANY && check_pic (1)" ! "sethi\\t%%hi(%a1), %0") (define_insn "embmedany_losum" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "data_segment_operand" "")))] "TARGET_CM_EMBMEDANY" ! "add\\t%1, %%lo(%a2), %0") (define_insn "embmedany_brsum" [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "register_operand" "r")] 11))] "TARGET_CM_EMBMEDANY" ! "add\\t%1, %_, %0") (define_insn "embmedany_textuhi" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "text_segment_operand" "")] 13)))] "TARGET_CM_EMBMEDANY && check_pic (1)" ! "sethi\\t%%uhi(%a1), %0") (define_insn "embmedany_texthi" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "text_segment_operand" "")] 14)))] "TARGET_CM_EMBMEDANY && check_pic (1)" ! "sethi\\t%%hi(%a1), %0") (define_insn "embmedany_textulo" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "text_segment_operand" "")] 15)))] "TARGET_CM_EMBMEDANY" ! "or\\t%1, %%ulo(%a2), %0") (define_insn "embmedany_textlo" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "text_segment_operand" "")))] "TARGET_CM_EMBMEDANY" ! "or\\t%1, %%lo(%a2), %0") ;; Now some patterns to help reload out a bit. (define_expand "reload_indi" --- 2187,2335 ---- operands[4] = gen_reg_rtx (DImode); } operands[5] = pic_offset_table_rtx; ! }) (define_insn "*movdi_high_pic_label_ref" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (unspec:DI [(match_operand:DI 1 "label_ref_operand" "") ! (match_operand:DI 2 "" "")] UNSPEC_MOVE_PIC_LABEL)))] "TARGET_ARCH64 && flag_pic" ! "sethi\t%%hi(%a2-(%a1-.)), %0") (define_insn "*movdi_lo_sum_pic_label_ref" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (unspec:DI [(match_operand:DI 2 "label_ref_operand" "") ! (match_operand:DI 3 "" "")] UNSPEC_MOVE_PIC_LABEL)))] "TARGET_ARCH64 && flag_pic" ! "or\t%1, %%lo(%a3-(%a2-.)), %0") ! ;; SPARC-v9 code model support insns. See sparc_emit_set_symbolic_const64 ;; in sparc.c to see what is going on here... PIC stuff comes first. (define_insn "movdi_lo_sum_pic" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "immediate_operand" "in")] UNSPEC_MOVE_PIC)))] "TARGET_ARCH64 && flag_pic" ! "or\t%1, %%lo(%a2), %0") (define_insn "movdi_high_pic" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand 1 "" "")] UNSPEC_MOVE_PIC)))] "TARGET_ARCH64 && flag_pic && check_pic (1)" ! "sethi\t%%hi(%a1), %0") (define_insn "*sethi_di_medlow_embmedany_pic" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand:DI 1 "sp64_medium_pic_operand" "")))] "(TARGET_CM_MEDLOW || TARGET_CM_EMBMEDANY) && check_pic (1)" ! "sethi\t%%hi(%a1), %0") (define_insn "*sethi_di_medlow" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand:DI 1 "symbolic_operand" "")))] "TARGET_CM_MEDLOW && check_pic (1)" ! "sethi\t%%hi(%a1), %0") (define_insn "*losum_di_medlow" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "symbolic_operand" "")))] "TARGET_CM_MEDLOW" ! "or\t%1, %%lo(%a2), %0") (define_insn "seth44" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_SETH44)))] "TARGET_CM_MEDMID" ! "sethi\t%%h44(%a1), %0") (define_insn "setm44" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_SETM44)))] "TARGET_CM_MEDMID" ! "or\t%1, %%m44(%a2), %0") (define_insn "setl44" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "symbolic_operand" "")))] "TARGET_CM_MEDMID" ! "or\t%1, %%l44(%a2), %0") (define_insn "sethh" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_SETHH)))] "TARGET_CM_MEDANY" ! "sethi\t%%hh(%a1), %0") (define_insn "setlm" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] UNSPEC_SETLM)))] "TARGET_CM_MEDANY" ! "sethi\t%%lm(%a1), %0") (define_insn "sethm" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] UNSPEC_EMB_SETHM)))] "TARGET_CM_MEDANY" ! "or\t%1, %%hm(%a2), %0") (define_insn "setlo" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "symbolic_operand" "")))] "TARGET_CM_MEDANY" ! "or\t%1, %%lo(%a2), %0") (define_insn "embmedany_sethi" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "data_segment_operand" "")] UNSPEC_EMB_HISUM)))] "TARGET_CM_EMBMEDANY && check_pic (1)" ! "sethi\t%%hi(%a1), %0") (define_insn "embmedany_losum" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "data_segment_operand" "")))] "TARGET_CM_EMBMEDANY" ! "add\t%1, %%lo(%a2), %0") (define_insn "embmedany_brsum" [(set (match_operand:DI 0 "register_operand" "=r") ! (unspec:DI [(match_operand:DI 1 "register_operand" "r")] UNSPEC_EMB_HISUM))] "TARGET_CM_EMBMEDANY" ! "add\t%1, %_, %0") (define_insn "embmedany_textuhi" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "text_segment_operand" "")] UNSPEC_EMB_TEXTUHI)))] "TARGET_CM_EMBMEDANY && check_pic (1)" ! "sethi\t%%uhi(%a1), %0") (define_insn "embmedany_texthi" [(set (match_operand:DI 0 "register_operand" "=r") ! (high:DI (unspec:DI [(match_operand:DI 1 "text_segment_operand" "")] UNSPEC_EMB_TEXTHI)))] "TARGET_CM_EMBMEDANY && check_pic (1)" ! "sethi\t%%hi(%a1), %0") (define_insn "embmedany_textulo" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") ! (unspec:DI [(match_operand:DI 2 "text_segment_operand" "")] UNSPEC_EMB_TEXTULO)))] "TARGET_CM_EMBMEDANY" ! "or\t%1, %%ulo(%a2), %0") (define_insn "embmedany_textlo" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "text_segment_operand" "")))] "TARGET_CM_EMBMEDANY" ! "or\t%1, %%lo(%a2), %0") ;; Now some patterns to help reload out a bit. (define_expand "reload_indi" *************** *** 2809,2819 **** "(TARGET_CM_MEDANY || TARGET_CM_EMBMEDANY) && ! flag_pic" - " { sparc_emit_set_symbolic_const64 (operands[0], operands[1], operands[2]); DONE; ! }") (define_expand "reload_outdi" [(parallel [(match_operand:DI 0 "register_operand" "=r") --- 2339,2348 ---- "(TARGET_CM_MEDANY || TARGET_CM_EMBMEDANY) && ! flag_pic" { sparc_emit_set_symbolic_const64 (operands[0], operands[1], operands[2]); DONE; ! }) (define_expand "reload_outdi" [(parallel [(match_operand:DI 0 "register_operand" "=r") *************** *** 2822,2832 **** "(TARGET_CM_MEDANY || TARGET_CM_EMBMEDANY) && ! flag_pic" - " { sparc_emit_set_symbolic_const64 (operands[0], operands[1], operands[2]); DONE; ! }") ;; Split up putting CONSTs and REGs into DI regs when !arch64 (define_split --- 2351,2360 ---- "(TARGET_CM_MEDANY || TARGET_CM_EMBMEDANY) && ! flag_pic" { sparc_emit_set_symbolic_const64 (operands[0], operands[1], operands[2]); DONE; ! }) ;; Split up putting CONSTs and REGs into DI regs when !arch64 (define_split *************** *** 2834,2840 **** (match_operand:DI 1 "const_int_operand" ""))] "! TARGET_ARCH64 && reload_completed" [(clobber (const_int 0))] - " { #if HOST_BITS_PER_WIDE_INT == 32 emit_insn (gen_movsi (gen_highpart (SImode, operands[0]), --- 2362,2367 ---- *************** *** 2859,2865 **** emit_insn (gen_movsi (gen_lowpart (SImode, operands[0]), GEN_INT (low))); #endif DONE; ! }") (define_split [(set (match_operand:DI 0 "register_operand" "") --- 2386,2392 ---- emit_insn (gen_movsi (gen_lowpart (SImode, operands[0]), GEN_INT (low))); #endif DONE; ! }) (define_split [(set (match_operand:DI 0 "register_operand" "") *************** *** 2873,2879 **** && GET_CODE (SUBREG_REG (operands[0])) == REG && REGNO (SUBREG_REG (operands[0])) < 32))))" [(clobber (const_int 0))] - " { emit_insn (gen_movsi (gen_highpart (SImode, operands[0]), GEN_INT (CONST_DOUBLE_HIGH (operands[1])))); --- 2400,2405 ---- *************** *** 2893,2899 **** GEN_INT (CONST_DOUBLE_LOW (operands[1])))); } DONE; ! }") (define_split [(set (match_operand:DI 0 "register_operand" "") --- 2419,2425 ---- GEN_INT (CONST_DOUBLE_LOW (operands[1])))); } DONE; ! }) (define_split [(set (match_operand:DI 0 "register_operand" "") *************** *** 2907,2913 **** && GET_CODE (SUBREG_REG (operands[0])) == REG && REGNO (SUBREG_REG (operands[0])) < 32))))" [(clobber (const_int 0))] - " { rtx set_dest = operands[0]; rtx set_src = operands[1]; --- 2433,2438 ---- *************** *** 2932,2938 **** emit_insn (gen_movsi (dest2, src2)); } DONE; ! }") ;; Now handle the cases of memory moves from/to non-even ;; DI mode register pairs. --- 2457,2463 ---- emit_insn (gen_movsi (dest2, src2)); } DONE; ! }) ;; Now handle the cases of memory moves from/to non-even ;; DI mode register pairs. *************** *** 2943,2949 **** && reload_completed && sparc_splitdi_legitimate (operands[0], operands[1]))" [(clobber (const_int 0))] - " { rtx word0 = adjust_address (operands[1], SImode, 0); rtx word1 = adjust_address (operands[1], SImode, 4); --- 2468,2473 ---- *************** *** 2961,2967 **** emit_insn (gen_movsi (low_part, word1)); } DONE; ! }") (define_split [(set (match_operand:DI 0 "memory_operand" "") --- 2485,2491 ---- emit_insn (gen_movsi (low_part, word1)); } DONE; ! }) (define_split [(set (match_operand:DI 0 "memory_operand" "") *************** *** 2970,2983 **** && reload_completed && sparc_splitdi_legitimate (operands[1], operands[0]))" [(clobber (const_int 0))] - " { emit_insn (gen_movsi (adjust_address (operands[0], SImode, 0), gen_highpart (SImode, operands[1]))); emit_insn (gen_movsi (adjust_address (operands[0], SImode, 4), gen_lowpart (SImode, operands[1]))); DONE; ! }") (define_split [(set (match_operand:DI 0 "memory_operand" "") --- 2494,2506 ---- && reload_completed && sparc_splitdi_legitimate (operands[1], operands[0]))" [(clobber (const_int 0))] { emit_insn (gen_movsi (adjust_address (operands[0], SImode, 0), gen_highpart (SImode, operands[1]))); emit_insn (gen_movsi (adjust_address (operands[0], SImode, 4), gen_lowpart (SImode, operands[1]))); DONE; ! }) (define_split [(set (match_operand:DI 0 "memory_operand" "") *************** *** 2988,2999 **** && ! mem_min_alignment (operands[0], 8))) && offsettable_memref_p (operands[0])" [(clobber (const_int 0))] - " { emit_insn (gen_movsi (adjust_address (operands[0], SImode, 0), const0_rtx)); emit_insn (gen_movsi (adjust_address (operands[0], SImode, 4), const0_rtx)); DONE; ! }") ;; Floating point move insns --- 2511,2521 ---- && ! mem_min_alignment (operands[0], 8))) && offsettable_memref_p (operands[0])" [(clobber (const_int 0))] { emit_insn (gen_movsi (adjust_address (operands[0], SImode, 0), const0_rtx)); emit_insn (gen_movsi (adjust_address (operands[0], SImode, 4), const0_rtx)); DONE; ! }) ;; Floating point move insns *************** *** 3004,3010 **** && (register_operand (operands[0], SFmode) || register_operand (operands[1], SFmode) || fp_zero_operand (operands[1], SFmode))" - "* { if (GET_CODE (operands[1]) == CONST_DOUBLE && (which_alternative == 2 --- 2526,2531 ---- *************** *** 3022,3046 **** switch (which_alternative) { case 0: ! return \"fmovs\\t%1, %0\"; case 1: ! return \"clr\\t%0\"; case 2: ! return \"sethi\\t%%hi(%a1), %0\"; case 3: ! return \"mov\\t%1, %0\"; case 4: ! return \"#\"; case 5: case 6: ! return \"ld\\t%1, %0\"; case 7: case 8: ! return \"st\\t%r1, %0\"; default: abort(); } ! }" [(set_attr "type" "fpmove,*,*,*,*,load,fpload,fpstore,store")]) (define_insn "*movsf_insn_vis" --- 2543,2567 ---- switch (which_alternative) { case 0: ! return "fmovs\t%1, %0"; case 1: ! return "clr\t%0"; case 2: ! return "sethi\t%%hi(%a1), %0"; case 3: ! return "mov\t%1, %0"; case 4: ! return "#"; case 5: case 6: ! return "ld\t%1, %0"; case 7: case 8: ! return "st\t%r1, %0"; default: abort(); } ! } [(set_attr "type" "fpmove,*,*,*,*,load,fpload,fpstore,store")]) (define_insn "*movsf_insn_vis" *************** *** 3050,3056 **** && (register_operand (operands[0], SFmode) || register_operand (operands[1], SFmode) || fp_zero_operand (operands[1], SFmode))" - "* { if (GET_CODE (operands[1]) == CONST_DOUBLE && (which_alternative == 3 --- 2571,2576 ---- *************** *** 3068,3094 **** switch (which_alternative) { case 0: ! return \"fmovs\\t%1, %0\"; case 1: ! return \"fzeros\\t%0\"; case 2: ! return \"clr\\t%0\"; case 3: ! return \"sethi\\t%%hi(%a1), %0\"; case 4: ! return \"mov\\t%1, %0\"; case 5: ! return \"#\"; case 6: case 7: ! return \"ld\\t%1, %0\"; case 8: case 9: ! return \"st\\t%r1, %0\"; default: abort(); } ! }" [(set_attr "type" "fpmove,fpmove,*,*,*,*,load,fpload,fpstore,store")]) ;; Exactly the same as above, except that all `f' cases are deleted. --- 2588,2614 ---- switch (which_alternative) { case 0: ! return "fmovs\t%1, %0"; case 1: ! return "fzeros\t%0"; case 2: ! return "clr\t%0"; case 3: ! return "sethi\t%%hi(%a1), %0"; case 4: ! return "mov\t%1, %0"; case 5: ! return "#"; case 6: case 7: ! return "ld\t%1, %0"; case 8: case 9: ! return "st\t%r1, %0"; default: abort(); } ! } [(set_attr "type" "fpmove,fpmove,*,*,*,*,load,fpload,fpstore,store")]) ;; Exactly the same as above, except that all `f' cases are deleted. *************** *** 3102,3108 **** && (register_operand (operands[0], SFmode) || register_operand (operands[1], SFmode) || fp_zero_operand (operands[1], SFmode))" - "* { if (GET_CODE (operands[1]) == CONST_DOUBLE && (which_alternative == 1 --- 2622,2627 ---- *************** *** 3120,3140 **** switch (which_alternative) { case 0: ! return \"clr\\t%0\"; case 1: ! return \"sethi\\t%%hi(%a1), %0\"; case 2: ! return \"mov\\t%1, %0\"; case 3: ! return \"#\"; case 4: ! return \"ld\\t%1, %0\"; case 5: ! return \"st\\t%r1, %0\"; default: abort(); } ! }" [(set_attr "type" "*,*,*,*,load,store")]) (define_insn "*movsf_lo_sum" --- 2639,2659 ---- switch (which_alternative) { case 0: ! return "clr\t%0"; case 1: ! return "sethi\t%%hi(%a1), %0"; case 2: ! return "mov\t%1, %0"; case 3: ! return "#"; case 4: ! return "ld\t%1, %0"; case 5: ! return "st\t%r1, %0"; default: abort(); } ! } [(set_attr "type" "*,*,*,*,load,store")]) (define_insn "*movsf_lo_sum" *************** *** 3142,3148 **** (lo_sum:SF (match_operand:SF 1 "register_operand" "r") (match_operand:SF 2 "const_double_operand" "S")))] "fp_high_losum_p (operands[2])" - "* { REAL_VALUE_TYPE r; long i; --- 2661,2666 ---- *************** *** 3150,3163 **** REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]); REAL_VALUE_TO_TARGET_SINGLE (r, i); operands[2] = GEN_INT (i); ! return \"or\\t%1, %%lo(%a2), %0\"; ! }") (define_insn "*movsf_high" [(set (match_operand:SF 0 "register_operand" "=r") (high:SF (match_operand:SF 1 "const_double_operand" "S")))] "fp_high_losum_p (operands[1])" - "* { REAL_VALUE_TYPE r; long i; --- 2668,2680 ---- REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]); REAL_VALUE_TO_TARGET_SINGLE (r, i); operands[2] = GEN_INT (i); ! return "or\t%1, %%lo(%a2), %0"; ! }) (define_insn "*movsf_high" [(set (match_operand:SF 0 "register_operand" "=r") (high:SF (match_operand:SF 1 "const_double_operand" "S")))] "fp_high_losum_p (operands[1])" { REAL_VALUE_TYPE r; long i; *************** *** 3165,3172 **** REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); REAL_VALUE_TO_TARGET_SINGLE (r, i); operands[1] = GEN_INT (i); ! return \"sethi\\t%%hi(%1), %0\"; ! }") (define_split [(set (match_operand:SF 0 "register_operand" "") --- 2682,2689 ---- REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); REAL_VALUE_TO_TARGET_SINGLE (r, i); operands[1] = GEN_INT (i); ! return "sethi\t%%hi(%1), %0"; ! }) (define_split [(set (match_operand:SF 0 "register_operand" "") *************** *** 3181,3187 **** [(set (match_operand:SF 0 "general_operand" "") (match_operand:SF 1 "general_operand" ""))] "" - " { /* Force SFmode constants into memory. */ if (GET_CODE (operands[0]) == REG --- 2698,2703 ---- *************** *** 3238,3250 **** movsf_is_ok: ; ! }") (define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") (match_operand:DF 1 "general_operand" ""))] "" - " { /* Force DFmode constants into memory. */ if (GET_CODE (operands[0]) == REG --- 2754,2765 ---- movsf_is_ok: ; ! }) (define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") (match_operand:DF 1 "general_operand" ""))] "" { /* Force DFmode constants into memory. */ if (GET_CODE (operands[0]) == REG *************** *** 3302,3308 **** movdf_is_ok: ; ! }") ;; Be careful, fmovd does not exist when !v9. (define_insn "*movdf_insn_sp32" --- 2817,2823 ---- movdf_is_ok: ; ! }) ;; Be careful, fmovd does not exist when !v9. (define_insn "*movdf_insn_sp32" *************** *** 3314,3323 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! ldd\\t%1, %0 ! std\\t%1, %0 ! ldd\\t%1, %0 ! std\\t%1, %0 # # # --- 2829,2838 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! ldd\t%1, %0 ! std\t%1, %0 ! ldd\t%1, %0 ! std\t%1, %0 # # # *************** *** 3337,3344 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! ldd\\t%1, %0 ! std\\t%1, %0 # # #" --- 2852,2859 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! ldd\t%1, %0 ! std\t%1, %0 # # #" *************** *** 3355,3363 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! ldd\\t%1, %0 ! std\\t%1, %0 ! stx\\t%r1, %0 # #" [(set_attr "type" "load,store,store,*,*") --- 2870,2878 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! ldd\t%1, %0 ! std\t%1, %0 ! stx\t%r1, %0 # #" [(set_attr "type" "load,store,store,*,*") *************** *** 3376,3387 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fmovd\\t%1, %0 ! ldd\\t%1, %0 ! stx\\t%r1, %0 ! std\\t%1, %0 ! ldd\\t%1, %0 ! std\\t%1, %0 # # #" --- 2891,2902 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fmovd\t%1, %0 ! ldd\t%1, %0 ! stx\t%r1, %0 ! std\t%1, %0 ! ldd\t%1, %0 ! std\t%1, %0 # # #" *************** *** 3401,3413 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fzero\\t%0 ! fmovd\\t%1, %0 ! ldd\\t%1, %0 ! stx\\t%r1, %0 ! std\\t%1, %0 ! ldd\\t%1, %0 ! std\\t%1, %0 # # #" --- 2916,2928 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fzero\t%0 ! fmovd\t%1, %0 ! ldd\t%1, %0 ! stx\t%r1, %0 ! std\t%1, %0 ! ldd\t%1, %0 ! std\t%1, %0 # # #" *************** *** 3427,3438 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fmovd\\t%1, %0 ! ldd\\t%1, %0 ! std\\t%1, %0 ! mov\\t%r1, %0 ! ldx\\t%1, %0 ! stx\\t%r1, %0 #" [(set_attr "type" "fpmove,load,store,*,load,store,*") (set_attr "length" "*,*,*,*,*,*,2") --- 2942,2953 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fmovd\t%1, %0 ! ldd\t%1, %0 ! std\t%1, %0 ! mov\t%r1, %0 ! ldx\t%1, %0 ! stx\t%r1, %0 #" [(set_attr "type" "fpmove,load,store,*,load,store,*") (set_attr "length" "*,*,*,*,*,*,2") *************** *** 3450,3462 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fzero\\t%0 ! fmovd\\t%1, %0 ! ldd\\t%1, %0 ! std\\t%1, %0 ! mov\\t%r1, %0 ! ldx\\t%1, %0 ! stx\\t%r1, %0 #" [(set_attr "type" "fpmove,fpmove,load,store,*,load,store,*") (set_attr "length" "*,*,*,*,*,*,*,2") --- 2965,2977 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! fzero\t%0 ! fmovd\t%1, %0 ! ldd\t%1, %0 ! std\t%1, %0 ! mov\t%r1, %0 ! ldx\t%1, %0 ! stx\t%r1, %0 #" [(set_attr "type" "fpmove,fpmove,load,store,*,load,store,*") (set_attr "length" "*,*,*,*,*,*,*,2") *************** *** 3471,3479 **** || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! mov\\t%1, %0 ! ldx\\t%1, %0 ! stx\\t%r1, %0" [(set_attr "type" "*,load,store")]) (define_split --- 2986,2994 ---- || register_operand (operands[1], DFmode) || fp_zero_operand (operands[1], DFmode))" "@ ! mov\t%1, %0 ! ldx\t%1, %0 ! stx\t%r1, %0" [(set_attr "type" "*,load,store")]) (define_split *************** *** 3485,3491 **** && ! fp_zero_operand(operands[1], DFmode) && reload_completed" [(clobber (const_int 0))] - " { REAL_VALUE_TYPE r; long l[2]; --- 3000,3005 ---- *************** *** 3504,3510 **** emit_insn (gen_movdi (operands[0], GEN_INT (val))); #else emit_insn (gen_movdi (operands[0], ! gen_rtx_CONST_DOUBLE (VOIDmode, l[1], l[0]))); #endif } else --- 3018,3024 ---- emit_insn (gen_movdi (operands[0], GEN_INT (val))); #else emit_insn (gen_movdi (operands[0], ! immed_double_const (l[1], l[0], DImode))); #endif } else *************** *** 3528,3534 **** } } DONE; ! }") ;; Ok, now the splits to handle all the multi insn and ;; mis-aligned memory address cases. --- 3042,3048 ---- } } DONE; ! }) ;; Ok, now the splits to handle all the multi insn and ;; mis-aligned memory address cases. *************** *** 3547,3553 **** && REGNO (SUBREG_REG (operands[0])) < 32)))) && reload_completed" [(clobber (const_int 0))] - " { rtx set_dest = operands[0]; rtx set_src = operands[1]; --- 3061,3066 ---- *************** *** 3572,3578 **** emit_insn (gen_movsf (dest2, src2)); } DONE; ! }") (define_split [(set (match_operand:DF 0 "register_operand" "") --- 3085,3091 ---- emit_insn (gen_movsf (dest2, src2)); } DONE; ! }) (define_split [(set (match_operand:DF 0 "register_operand" "") *************** *** 3583,3589 **** || ! mem_min_alignment (operands[1], 8)) && offsettable_memref_p (operands[1])" [(clobber (const_int 0))] - " { rtx word0 = adjust_address (operands[1], SFmode, 0); rtx word1 = adjust_address (operands[1], SFmode, 4); --- 3096,3101 ---- *************** *** 3603,3609 **** word1)); } DONE; ! }") (define_split [(set (match_operand:DF 0 "memory_operand" "") --- 3115,3121 ---- word1)); } DONE; ! }) (define_split [(set (match_operand:DF 0 "memory_operand" "") *************** *** 3614,3620 **** || ! mem_min_alignment (operands[0], 8)) && offsettable_memref_p (operands[0])" [(clobber (const_int 0))] - " { rtx word0 = adjust_address (operands[0], SFmode, 0); rtx word1 = adjust_address (operands[0], SFmode, 4); --- 3126,3131 ---- *************** *** 3624,3630 **** emit_insn (gen_movsf (word1, gen_lowpart (SFmode, operands[1]))); DONE; ! }") (define_split [(set (match_operand:DF 0 "memory_operand" "") --- 3135,3141 ---- emit_insn (gen_movsf (word1, gen_lowpart (SFmode, operands[1]))); DONE; ! }) (define_split [(set (match_operand:DF 0 "memory_operand" "") *************** *** 3635,3641 **** && ! mem_min_alignment (operands[0], 8))) && offsettable_memref_p (operands[0])" [(clobber (const_int 0))] - " { rtx dest1, dest2; --- 3146,3151 ---- *************** *** 3645,3651 **** emit_insn (gen_movsf (dest1, CONST0_RTX (SFmode))); emit_insn (gen_movsf (dest2, CONST0_RTX (SFmode))); DONE; ! }") (define_split [(set (match_operand:DF 0 "register_operand" "") --- 3155,3161 ---- emit_insn (gen_movsf (dest1, CONST0_RTX (SFmode))); emit_insn (gen_movsf (dest2, CONST0_RTX (SFmode))); DONE; ! }) (define_split [(set (match_operand:DF 0 "register_operand" "") *************** *** 3658,3664 **** && GET_CODE (SUBREG_REG (operands[0])) == REG && REGNO (SUBREG_REG (operands[0])) < 32))" [(clobber (const_int 0))] - " { rtx set_dest = operands[0]; rtx dest1, dest2; --- 3168,3173 ---- *************** *** 3668,3680 **** emit_insn (gen_movsf (dest1, CONST0_RTX (SFmode))); emit_insn (gen_movsf (dest2, CONST0_RTX (SFmode))); DONE; ! }") (define_expand "movtf" [(set (match_operand:TF 0 "general_operand" "") (match_operand:TF 1 "general_operand" ""))] "" - " { /* Force TFmode constants into memory. */ if (GET_CODE (operands[0]) == REG --- 3177,3188 ---- emit_insn (gen_movsf (dest1, CONST0_RTX (SFmode))); emit_insn (gen_movsf (dest2, CONST0_RTX (SFmode))); DONE; ! }) (define_expand "movtf" [(set (match_operand:TF 0 "general_operand" "") (match_operand:TF 1 "general_operand" ""))] "" { /* Force TFmode constants into memory. */ if (GET_CODE (operands[0]) == REG *************** *** 3727,3733 **** movtf_is_ok: ; ! }") ;; Be careful, fmovq and {st,ld}{x,q} do not exist when !arch64 so ;; we must split them all. :-( --- 3235,3241 ---- movtf_is_ok: ; ! }) ;; Be careful, fmovq and {st,ld}{x,q} do not exist when !arch64 so ;; we must split them all. :-( *************** *** 3783,3791 **** || register_operand (operands[1], TFmode) || fp_zero_operand (operands[1], TFmode))" "@ ! fmovq\\t%1, %0 ! ldq\\t%1, %0 ! stq\\t%1, %0 # #" [(set_attr "type" "fpmove,fpload,fpstore,*,*") --- 3291,3299 ---- || register_operand (operands[1], TFmode) || fp_zero_operand (operands[1], TFmode))" "@ ! fmovq\t%1, %0 ! ldq\t%1, %0 ! stq\t%1, %0 # #" [(set_attr "type" "fpmove,fpload,fpstore,*,*") *************** *** 3802,3810 **** || register_operand (operands[1], TFmode) || fp_zero_operand (operands[1], TFmode))" "@ ! fmovq\\t%1, %0 ! ldq\\t%1, %0 ! stq\\t%1, %0 # # #" --- 3310,3318 ---- || register_operand (operands[1], TFmode) || fp_zero_operand (operands[1], TFmode))" "@ ! fmovq\t%1, %0 ! ldq\t%1, %0 ! stq\t%1, %0 # # #" *************** *** 3860,3866 **** && ! TARGET_HARD_QUAD) || ! fp_register_operand (operands[0], TFmode))" [(clobber (const_int 0))] - " { rtx set_dest = operands[0]; rtx set_src = operands[1]; --- 3368,3373 ---- *************** *** 3885,3898 **** emit_insn (gen_movdf (dest2, src2)); } DONE; ! }") (define_split [(set (match_operand:TF 0 "nonimmediate_operand" "") (match_operand:TF 1 "fp_zero_operand" ""))] "reload_completed" [(clobber (const_int 0))] - " { rtx set_dest = operands[0]; rtx dest1, dest2; --- 3392,3404 ---- emit_insn (gen_movdf (dest2, src2)); } DONE; ! }) (define_split [(set (match_operand:TF 0 "nonimmediate_operand" "") (match_operand:TF 1 "fp_zero_operand" ""))] "reload_completed" [(clobber (const_int 0))] { rtx set_dest = operands[0]; rtx dest1, dest2; *************** *** 3914,3920 **** emit_insn (gen_movdf (dest1, CONST0_RTX (DFmode))); emit_insn (gen_movdf (dest2, CONST0_RTX (DFmode))); DONE; ! }") (define_split [(set (match_operand:TF 0 "register_operand" "") --- 3420,3426 ---- emit_insn (gen_movdf (dest1, CONST0_RTX (DFmode))); emit_insn (gen_movdf (dest2, CONST0_RTX (DFmode))); DONE; ! }) (define_split [(set (match_operand:TF 0 "register_operand" "") *************** *** 3925,3931 **** || ! TARGET_HARD_QUAD || ! fp_register_operand (operands[0], TFmode)))" [(clobber (const_int 0))] - " { rtx word0 = adjust_address (operands[1], DFmode, 0); rtx word1 = adjust_address (operands[1], DFmode, 8); --- 3431,3436 ---- *************** *** 3950,3956 **** emit_insn (gen_movdf (dest2, word1)); } DONE; ! }") (define_split [(set (match_operand:TF 0 "memory_operand" "") --- 3455,3461 ---- emit_insn (gen_movdf (dest2, word1)); } DONE; ! }) (define_split [(set (match_operand:TF 0 "memory_operand" "") *************** *** 3961,3967 **** || ! TARGET_HARD_QUAD || ! fp_register_operand (operands[1], TFmode)))" [(clobber (const_int 0))] - " { rtx set_src = operands[1]; --- 3466,3471 ---- *************** *** 3970,3981 **** emit_insn (gen_movdf (adjust_address (operands[0], DFmode, 8), gen_df_reg (set_src, 1))); DONE; ! }") ! ;; Sparc V9 conditional move instructions. ;; We can handle larger constants here for some flavors, but for now we keep ! ;; it simple and only allow those constants supported by all flavours. ;; Note that emit_conditional_move canonicalizes operands 2,3 so that operand ;; 3 contains the constant if one is present, but we handle either for ;; generality (sparc.c puts a constant in operand 2). --- 3474,3485 ---- emit_insn (gen_movdf (adjust_address (operands[0], DFmode, 8), gen_df_reg (set_src, 1))); DONE; ! }) ! ;; SPARC V9 conditional move instructions. ;; We can handle larger constants here for some flavors, but for now we keep ! ;; it simple and only allow those constants supported by all flavors. ;; Note that emit_conditional_move canonicalizes operands 2,3 so that operand ;; 3 contains the constant if one is present, but we handle either for ;; generality (sparc.c puts a constant in operand 2). *************** *** 3986,3992 **** (match_operand:QI 2 "arith10_operand" "") (match_operand:QI 3 "arith10_operand" "")))] "TARGET_V9" - " { enum rtx_code code = GET_CODE (operands[1]); --- 3490,3495 ---- *************** *** 4008,4014 **** sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }") (define_expand "movhicc" [(set (match_operand:HI 0 "register_operand" "") --- 3511,3517 ---- sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }) (define_expand "movhicc" [(set (match_operand:HI 0 "register_operand" "") *************** *** 4016,4022 **** (match_operand:HI 2 "arith10_operand" "") (match_operand:HI 3 "arith10_operand" "")))] "TARGET_V9" - " { enum rtx_code code = GET_CODE (operands[1]); --- 3519,3524 ---- *************** *** 4038,4044 **** sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }") (define_expand "movsicc" [(set (match_operand:SI 0 "register_operand" "") --- 3540,3546 ---- sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }) (define_expand "movsicc" [(set (match_operand:SI 0 "register_operand" "") *************** *** 4046,4052 **** (match_operand:SI 2 "arith10_operand" "") (match_operand:SI 3 "arith10_operand" "")))] "TARGET_V9" - " { enum rtx_code code = GET_CODE (operands[1]); enum machine_mode op0_mode = GET_MODE (sparc_compare_op0); --- 3548,3553 ---- *************** *** 4065,4071 **** operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }") (define_expand "movdicc" [(set (match_operand:DI 0 "register_operand" "") --- 3566,3572 ---- operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }) (define_expand "movdicc" [(set (match_operand:DI 0 "register_operand" "") *************** *** 4073,4079 **** (match_operand:DI 2 "arith10_double_operand" "") (match_operand:DI 3 "arith10_double_operand" "")))] "TARGET_ARCH64" - " { enum rtx_code code = GET_CODE (operands[1]); --- 3574,3579 ---- *************** *** 4092,4098 **** operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }") (define_expand "movsfcc" [(set (match_operand:SF 0 "register_operand" "") --- 3592,3598 ---- operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }) (define_expand "movsfcc" [(set (match_operand:SF 0 "register_operand" "") *************** *** 4100,4106 **** (match_operand:SF 2 "register_operand" "") (match_operand:SF 3 "register_operand" "")))] "TARGET_V9 && TARGET_FPU" - " { enum rtx_code code = GET_CODE (operands[1]); --- 3600,3605 ---- *************** *** 4122,4128 **** sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }") (define_expand "movdfcc" [(set (match_operand:DF 0 "register_operand" "") --- 3621,3627 ---- sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }) (define_expand "movdfcc" [(set (match_operand:DF 0 "register_operand" "") *************** *** 4130,4136 **** (match_operand:DF 2 "register_operand" "") (match_operand:DF 3 "register_operand" "")))] "TARGET_V9 && TARGET_FPU" - " { enum rtx_code code = GET_CODE (operands[1]); --- 3629,3634 ---- *************** *** 4152,4158 **** sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }") (define_expand "movtfcc" [(set (match_operand:TF 0 "register_operand" "") --- 3650,3656 ---- sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }) (define_expand "movtfcc" [(set (match_operand:TF 0 "register_operand" "") *************** *** 4160,4166 **** (match_operand:TF 2 "register_operand" "") (match_operand:TF 3 "register_operand" "")))] "TARGET_V9 && TARGET_FPU" - " { enum rtx_code code = GET_CODE (operands[1]); --- 3658,3663 ---- *************** *** 4182,4188 **** sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }") ;; Conditional move define_insns. --- 3679,3685 ---- sparc_compare_op0, sparc_compare_op1); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } ! }) ;; Conditional move define_insns. *************** *** 4195,4202 **** (match_operand:QI 4 "arith11_operand" "0,rL")))] "TARGET_V9" "@ ! mov%C1\\t%x2, %3, %0 ! mov%c1\\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movhi_cc_sp64" --- 3692,3699 ---- (match_operand:QI 4 "arith11_operand" "0,rL")))] "TARGET_V9" "@ ! mov%C1\t%x2, %3, %0 ! mov%c1\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movhi_cc_sp64" *************** *** 4208,4215 **** (match_operand:HI 4 "arith11_operand" "0,rL")))] "TARGET_V9" "@ ! mov%C1\\t%x2, %3, %0 ! mov%c1\\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsi_cc_sp64" --- 3705,3712 ---- (match_operand:HI 4 "arith11_operand" "0,rL")))] "TARGET_V9" "@ ! mov%C1\t%x2, %3, %0 ! mov%c1\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsi_cc_sp64" *************** *** 4221,4228 **** (match_operand:SI 4 "arith11_operand" "0,rL")))] "TARGET_V9" "@ ! mov%C1\\t%x2, %3, %0 ! mov%c1\\t%x2, %4, %0" [(set_attr "type" "cmove")]) ;; ??? The constraints of operands 3,4 need work. --- 3718,3725 ---- (match_operand:SI 4 "arith11_operand" "0,rL")))] "TARGET_V9" "@ ! mov%C1\t%x2, %3, %0 ! mov%c1\t%x2, %4, %0" [(set_attr "type" "cmove")]) ;; ??? The constraints of operands 3,4 need work. *************** *** 4235,4242 **** (match_operand:DI 4 "arith11_double_operand" "0,rLH")))] "TARGET_ARCH64" "@ ! mov%C1\\t%x2, %3, %0 ! mov%c1\\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movdi_cc_sp64_trunc" --- 3732,3739 ---- (match_operand:DI 4 "arith11_double_operand" "0,rLH")))] "TARGET_ARCH64" "@ ! mov%C1\t%x2, %3, %0 ! mov%c1\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movdi_cc_sp64_trunc" *************** *** 4248,4255 **** (match_operand:SI 4 "arith11_double_operand" "0,rLH")))] "TARGET_ARCH64" "@ ! mov%C1\\t%x2, %3, %0 ! mov%c1\\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsf_cc_sp64" --- 3745,3752 ---- (match_operand:SI 4 "arith11_double_operand" "0,rLH")))] "TARGET_ARCH64" "@ ! mov%C1\t%x2, %3, %0 ! mov%c1\t%x2, %4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsf_cc_sp64" *************** *** 4261,4268 **** (match_operand:SF 4 "register_operand" "0,f")))] "TARGET_V9 && TARGET_FPU" "@ ! fmovs%C1\\t%x2, %3, %0 ! fmovs%c1\\t%x2, %4, %0" [(set_attr "type" "fpcmove")]) (define_insn "movdf_cc_sp64" --- 3758,3765 ---- (match_operand:SF 4 "register_operand" "0,f")))] "TARGET_V9 && TARGET_FPU" "@ ! fmovs%C1\t%x2, %3, %0 ! fmovs%c1\t%x2, %4, %0" [(set_attr "type" "fpcmove")]) (define_insn "movdf_cc_sp64" *************** *** 4274,4281 **** (match_operand:DF 4 "register_operand" "0,e")))] "TARGET_V9 && TARGET_FPU" "@ ! fmovd%C1\\t%x2, %3, %0 ! fmovd%c1\\t%x2, %4, %0" [(set_attr "type" "fpcmove") (set_attr "fptype" "double")]) --- 3771,3778 ---- (match_operand:DF 4 "register_operand" "0,e")))] "TARGET_V9 && TARGET_FPU" "@ ! fmovd%C1\t%x2, %3, %0 ! fmovd%c1\t%x2, %4, %0" [(set_attr "type" "fpcmove") (set_attr "fptype" "double")]) *************** *** 4288,4318 **** (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_V9 && TARGET_FPU && TARGET_HARD_QUAD" "@ ! fmovq%C1\\t%x2, %3, %0 ! fmovq%c1\\t%x2, %4, %0" [(set_attr "type" "fpcmove")]) ! (define_insn "*movtf_cc_sp64" [(set (match_operand:TF 0 "register_operand" "=e,e") (if_then_else:TF (match_operator 1 "comparison_operator" ! [(match_operand 2 "icc_or_fcc_reg_operand" "X,X") ! (const_int 0)]) (match_operand:TF 3 "register_operand" "e,0") (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_V9 && TARGET_FPU && !TARGET_HARD_QUAD" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:TF 0 "register_operand" "") ! (if_then_else:TF (match_operator 1 "comparison_operator" ! [(match_operand 2 "icc_or_fcc_reg_operand" "") ! (const_int 0)]) ! (match_operand:TF 3 "register_operand" "") ! (match_operand:TF 4 "register_operand" "")))] ! "reload_completed && TARGET_V9 && TARGET_FPU && !TARGET_HARD_QUAD" [(clobber (const_int 0))] - " { rtx set_dest = operands[0]; rtx set_srca = operands[3]; --- 3785,3805 ---- (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_V9 && TARGET_FPU && TARGET_HARD_QUAD" "@ ! fmovq%C1\t%x2, %3, %0 ! fmovq%c1\t%x2, %4, %0" [(set_attr "type" "fpcmove")]) ! (define_insn_and_split "*movtf_cc_sp64" [(set (match_operand:TF 0 "register_operand" "=e,e") (if_then_else:TF (match_operator 1 "comparison_operator" ! [(match_operand 2 "icc_or_fcc_reg_operand" "X,X") ! (const_int 0)]) (match_operand:TF 3 "register_operand" "e,0") (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_V9 && TARGET_FPU && !TARGET_HARD_QUAD" "#" ! "&& reload_completed" [(clobber (const_int 0))] { rtx set_dest = operands[0]; rtx set_srca = operands[3]; *************** *** 4342,4348 **** emit_insn (gen_movdf_cc_sp64 (dest2, operands[1], operands[2], srca2, srcb2)); } DONE; ! }") (define_insn "*movqi_cc_reg_sp64" [(set (match_operand:QI 0 "register_operand" "=r,r") --- 3829,3836 ---- emit_insn (gen_movdf_cc_sp64 (dest2, operands[1], operands[2], srca2, srcb2)); } DONE; ! } ! [(set_attr "length" "2")]) (define_insn "*movqi_cc_reg_sp64" [(set (match_operand:QI 0 "register_operand" "=r,r") *************** *** 4353,4360 **** (match_operand:QI 4 "arith10_operand" "0,rM")))] "TARGET_ARCH64" "@ ! movr%D1\\t%2, %r3, %0 ! movr%d1\\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movhi_cc_reg_sp64" --- 3841,3848 ---- (match_operand:QI 4 "arith10_operand" "0,rM")))] "TARGET_ARCH64" "@ ! movr%D1\t%2, %r3, %0 ! movr%d1\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movhi_cc_reg_sp64" *************** *** 4366,4373 **** (match_operand:HI 4 "arith10_operand" "0,rM")))] "TARGET_ARCH64" "@ ! movr%D1\\t%2, %r3, %0 ! movr%d1\\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsi_cc_reg_sp64" --- 3854,3861 ---- (match_operand:HI 4 "arith10_operand" "0,rM")))] "TARGET_ARCH64" "@ ! movr%D1\t%2, %r3, %0 ! movr%d1\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsi_cc_reg_sp64" *************** *** 4379,4386 **** (match_operand:SI 4 "arith10_operand" "0,rM")))] "TARGET_ARCH64" "@ ! movr%D1\\t%2, %r3, %0 ! movr%d1\\t%2, %r4, %0" [(set_attr "type" "cmove")]) ;; ??? The constraints of operands 3,4 need work. --- 3867,3874 ---- (match_operand:SI 4 "arith10_operand" "0,rM")))] "TARGET_ARCH64" "@ ! movr%D1\t%2, %r3, %0 ! movr%d1\t%2, %r4, %0" [(set_attr "type" "cmove")]) ;; ??? The constraints of operands 3,4 need work. *************** *** 4393,4400 **** (match_operand:DI 4 "arith10_double_operand" "0,rMH")))] "TARGET_ARCH64" "@ ! movr%D1\\t%2, %r3, %0 ! movr%d1\\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movdi_cc_reg_sp64_trunc" --- 3881,3888 ---- (match_operand:DI 4 "arith10_double_operand" "0,rMH")))] "TARGET_ARCH64" "@ ! movr%D1\t%2, %r3, %0 ! movr%d1\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movdi_cc_reg_sp64_trunc" *************** *** 4406,4413 **** (match_operand:SI 4 "arith10_double_operand" "0,rMH")))] "TARGET_ARCH64" "@ ! movr%D1\\t%2, %r3, %0 ! movr%d1\\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsf_cc_reg_sp64" --- 3894,3901 ---- (match_operand:SI 4 "arith10_double_operand" "0,rMH")))] "TARGET_ARCH64" "@ ! movr%D1\t%2, %r3, %0 ! movr%d1\t%2, %r4, %0" [(set_attr "type" "cmove")]) (define_insn "*movsf_cc_reg_sp64" *************** *** 4419,4427 **** (match_operand:SF 4 "register_operand" "0,f")))] "TARGET_ARCH64 && TARGET_FPU" "@ ! fmovrs%D1\\t%2, %3, %0 ! fmovrs%d1\\t%2, %4, %0" ! [(set_attr "type" "fpcmove")]) (define_insn "movdf_cc_reg_sp64" [(set (match_operand:DF 0 "register_operand" "=e,e") --- 3907,3915 ---- (match_operand:SF 4 "register_operand" "0,f")))] "TARGET_ARCH64 && TARGET_FPU" "@ ! fmovrs%D1\t%2, %3, %0 ! fmovrs%d1\t%2, %4, %0" ! [(set_attr "type" "fpcrmove")]) (define_insn "movdf_cc_reg_sp64" [(set (match_operand:DF 0 "register_operand" "=e,e") *************** *** 4432,4440 **** (match_operand:DF 4 "register_operand" "0,e")))] "TARGET_ARCH64 && TARGET_FPU" "@ ! fmovrd%D1\\t%2, %3, %0 ! fmovrd%d1\\t%2, %4, %0" ! [(set_attr "type" "fpcmove") (set_attr "fptype" "double")]) (define_insn "*movtf_cc_reg_hq_sp64" --- 3920,3928 ---- (match_operand:DF 4 "register_operand" "0,e")))] "TARGET_ARCH64 && TARGET_FPU" "@ ! fmovrd%D1\t%2, %3, %0 ! fmovrd%d1\t%2, %4, %0" ! [(set_attr "type" "fpcrmove") (set_attr "fptype" "double")]) (define_insn "*movtf_cc_reg_hq_sp64" *************** *** 4446,4456 **** (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_ARCH64 && TARGET_FPU && TARGET_HARD_QUAD" "@ ! fmovrq%D1\\t%2, %3, %0 ! fmovrq%d1\\t%2, %4, %0" ! [(set_attr "type" "fpcmove")]) ! (define_insn "*movtf_cc_reg_sp64" [(set (match_operand:TF 0 "register_operand" "=e,e") (if_then_else:TF (match_operator 1 "v9_regcmp_op" [(match_operand:DI 2 "register_operand" "r,r") --- 3934,3944 ---- (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_ARCH64 && TARGET_FPU && TARGET_HARD_QUAD" "@ ! fmovrq%D1\t%2, %3, %0 ! fmovrq%d1\t%2, %4, %0" ! [(set_attr "type" "fpcrmove")]) ! (define_insn_and_split "*movtf_cc_reg_sp64" [(set (match_operand:TF 0 "register_operand" "=e,e") (if_then_else:TF (match_operator 1 "v9_regcmp_op" [(match_operand:DI 2 "register_operand" "r,r") *************** *** 4459,4476 **** (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_ARCH64 && TARGET_FPU && ! TARGET_HARD_QUAD" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:TF 0 "register_operand" "") ! (if_then_else:TF (match_operator 1 "v9_regcmp_op" ! [(match_operand:DI 2 "register_operand" "") ! (const_int 0)]) ! (match_operand:TF 3 "register_operand" "") ! (match_operand:TF 4 "register_operand" "")))] ! "reload_completed && TARGET_ARCH64 && TARGET_FPU && ! TARGET_HARD_QUAD" [(clobber (const_int 0))] - " { rtx set_dest = operands[0]; rtx set_srca = operands[3]; --- 3947,3954 ---- (match_operand:TF 4 "register_operand" "0,e")))] "TARGET_ARCH64 && TARGET_FPU && ! TARGET_HARD_QUAD" "#" ! "&& reload_completed" [(clobber (const_int 0))] { rtx set_dest = operands[0]; rtx set_srca = operands[3]; *************** *** 4500,4506 **** emit_insn (gen_movdf_cc_reg_sp64 (dest2, operands[1], operands[2], srca2, srcb2)); } DONE; ! }") ;;- zero extension instructions --- 3978,3985 ---- emit_insn (gen_movdf_cc_reg_sp64 (dest2, operands[1], operands[2], srca2, srcb2)); } DONE; ! } ! [(set_attr "length" "2")]) ;;- zero extension instructions *************** *** 4513,4519 **** [(set (match_operand:SI 0 "register_operand" "") (zero_extend:SI (match_operand:HI 1 "register_operand" "")))] "" - " { rtx temp = gen_reg_rtx (SImode); rtx shift_16 = GEN_INT (16); --- 3992,3997 ---- *************** *** 4531,4544 **** shift_16)); emit_insn (gen_lshrsi3 (operand0, temp, shift_16)); DONE; ! }") (define_insn "*zero_extendhisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))] "" ! "lduh\\t%1, %0" ! [(set_attr "type" "load")]) (define_expand "zero_extendqihi2" [(set (match_operand:HI 0 "register_operand" "") --- 4009,4023 ---- shift_16)); emit_insn (gen_lshrsi3 (operand0, temp, shift_16)); DONE; ! }) (define_insn "*zero_extendhisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))] "" ! "lduh\t%1, %0" ! [(set_attr "type" "load") ! (set_attr "us3load_type" "3cycle")]) (define_expand "zero_extendqihi2" [(set (match_operand:HI 0 "register_operand" "") *************** *** 4551,4559 **** (zero_extend:HI (match_operand:QI 1 "input_operand" "r,m")))] "GET_CODE (operands[1]) != CONST_INT" "@ ! and\\t%1, 0xff, %0 ! ldub\\t%1, %0" ! [(set_attr "type" "*,load")]) (define_expand "zero_extendqisi2" [(set (match_operand:SI 0 "register_operand" "") --- 4030,4039 ---- (zero_extend:HI (match_operand:QI 1 "input_operand" "r,m")))] "GET_CODE (operands[1]) != CONST_INT" "@ ! and\t%1, 0xff, %0 ! ldub\t%1, %0" ! [(set_attr "type" "*,load") ! (set_attr "us3load_type" "*,3cycle")]) (define_expand "zero_extendqisi2" [(set (match_operand:SI 0 "register_operand" "") *************** *** 4566,4574 **** (zero_extend:SI (match_operand:QI 1 "input_operand" "r,m")))] "GET_CODE (operands[1]) != CONST_INT" "@ ! and\\t%1, 0xff, %0 ! ldub\\t%1, %0" ! [(set_attr "type" "*,load")]) (define_expand "zero_extendqidi2" [(set (match_operand:DI 0 "register_operand" "") --- 4046,4055 ---- (zero_extend:SI (match_operand:QI 1 "input_operand" "r,m")))] "GET_CODE (operands[1]) != CONST_INT" "@ ! and\t%1, 0xff, %0 ! ldub\t%1, %0" ! [(set_attr "type" "*,load") ! (set_attr "us3load_type" "*,3cycle")]) (define_expand "zero_extendqidi2" [(set (match_operand:DI 0 "register_operand" "") *************** *** 4581,4595 **** (zero_extend:DI (match_operand:QI 1 "input_operand" "r,m")))] "TARGET_ARCH64 && GET_CODE (operands[1]) != CONST_INT" "@ ! and\\t%1, 0xff, %0 ! ldub\\t%1, %0" ! [(set_attr "type" "*,load")]) (define_expand "zero_extendhidi2" [(set (match_operand:DI 0 "register_operand" "") (zero_extend:DI (match_operand:HI 1 "register_operand" "")))] "TARGET_ARCH64" - " { rtx temp = gen_reg_rtx (DImode); rtx shift_48 = GEN_INT (48); --- 4062,4076 ---- (zero_extend:DI (match_operand:QI 1 "input_operand" "r,m")))] "TARGET_ARCH64 && GET_CODE (operands[1]) != CONST_INT" "@ ! and\t%1, 0xff, %0 ! ldub\t%1, %0" ! [(set_attr "type" "*,load") ! (set_attr "us3load_type" "*,3cycle")]) (define_expand "zero_extendhidi2" [(set (match_operand:DI 0 "register_operand" "") (zero_extend:DI (match_operand:HI 1 "register_operand" "")))] "TARGET_ARCH64" { rtx temp = gen_reg_rtx (DImode); rtx shift_48 = GEN_INT (48); *************** *** 4607,4620 **** shift_48)); emit_insn (gen_lshrdi3 (operand0, temp, shift_48)); DONE; ! }") (define_insn "*zero_extendhidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:HI 1 "memory_operand" "m")))] "TARGET_ARCH64" ! "lduh\\t%1, %0" ! [(set_attr "type" "load")]) ;; ??? Write truncdisi pattern using sra? --- 4088,4102 ---- shift_48)); emit_insn (gen_lshrdi3 (operand0, temp, shift_48)); DONE; ! }) (define_insn "*zero_extendhidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:HI 1 "memory_operand" "m")))] "TARGET_ARCH64" ! "lduh\t%1, %0" ! [(set_attr "type" "load") ! (set_attr "us3load_type" "3cycle")]) ;; ??? Write truncdisi pattern using sra? *************** *** 4630,4653 **** (zero_extend:DI (match_operand:SI 1 "input_operand" "r,m")))] "TARGET_ARCH64 && GET_CODE (operands[1]) != CONST_INT" "@ ! srl\\t%1, 0, %0 ! lduw\\t%1, %0" [(set_attr "type" "shift,load")]) ! (define_insn "*zero_extendsidi2_insn_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:SI 1 "register_operand" "r")))] "! TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (zero_extend:DI (match_operand:SI 1 "register_operand" "")))] ! "! TARGET_ARCH64 && reload_completed" [(set (match_dup 2) (match_dup 3)) (set (match_dup 4) (match_dup 5))] - " { rtx dest1, dest2; --- 4112,4129 ---- (zero_extend:DI (match_operand:SI 1 "input_operand" "r,m")))] "TARGET_ARCH64 && GET_CODE (operands[1]) != CONST_INT" "@ ! srl\t%1, 0, %0 ! lduw\t%1, %0" [(set_attr "type" "shift,load")]) ! (define_insn_and_split "*zero_extendsidi2_insn_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:SI 1 "register_operand" "r")))] "! TARGET_ARCH64" "#" ! "&& reload_completed" [(set (match_dup 2) (match_dup 3)) (set (match_dup 4) (match_dup 5))] { rtx dest1, dest2; *************** *** 4669,4675 **** operands[4] = dest2; operands[5] = operands[1]; } ! }") ;; Simplify comparisons of extended values. --- 4145,4152 ---- operands[4] = dest2; operands[5] = operands[1]; } ! } ! [(set_attr "length" "2")]) ;; Simplify comparisons of extended values. *************** *** 4678,4684 **** (compare:CC (zero_extend:SI (match_operand:QI 0 "register_operand" "r")) (const_int 0)))] "" ! "andcc\\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_qi" --- 4155,4161 ---- (compare:CC (zero_extend:SI (match_operand:QI 0 "register_operand" "r")) (const_int 0)))] "" ! "andcc\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_qi" *************** *** 4686,4692 **** (compare:CC (match_operand:QI 0 "register_operand" "r") (const_int 0)))] "" ! "andcc\\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqisi2_set" --- 4163,4169 ---- (compare:CC (match_operand:QI 0 "register_operand" "r") (const_int 0)))] "" ! "andcc\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqisi2_set" *************** *** 4696,4702 **** (set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_dup 1)))] "" ! "andcc\\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqisi2_andcc_set" --- 4173,4179 ---- (set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_dup 1)))] "" ! "andcc\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqisi2_andcc_set" *************** *** 4707,4713 **** (set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (subreg:QI (match_dup 1) 0)))] "" ! "andcc\\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqidi2" --- 4184,4190 ---- (set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (subreg:QI (match_dup 1) 0)))] "" ! "andcc\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqidi2" *************** *** 4715,4721 **** (compare:CCX (zero_extend:DI (match_operand:QI 0 "register_operand" "r")) (const_int 0)))] "TARGET_ARCH64" ! "andcc\\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_qi_sp64" --- 4192,4198 ---- (compare:CCX (zero_extend:DI (match_operand:QI 0 "register_operand" "r")) (const_int 0)))] "TARGET_ARCH64" ! "andcc\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_qi_sp64" *************** *** 4723,4729 **** (compare:CCX (match_operand:QI 0 "register_operand" "r") (const_int 0)))] "TARGET_ARCH64" ! "andcc\\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqidi2_set" --- 4200,4206 ---- (compare:CCX (match_operand:QI 0 "register_operand" "r") (const_int 0)))] "TARGET_ARCH64" ! "andcc\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqidi2_set" *************** *** 4733,4739 **** (set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_dup 1)))] "TARGET_ARCH64" ! "andcc\\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqidi2_andcc_set" --- 4210,4216 ---- (set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_dup 1)))] "TARGET_ARCH64" ! "andcc\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extendqidi2_andcc_set" *************** *** 4744,4750 **** (set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (subreg:QI (match_dup 1) 0)))] "TARGET_ARCH64" ! "andcc\\t%1, 0xff, %0" [(set_attr "type" "compare")]) ;; Similarly, handle {SI,DI}->QI mode truncation followed by a compare. --- 4221,4227 ---- (set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (subreg:QI (match_dup 1) 0)))] "TARGET_ARCH64" ! "andcc\t%1, 0xff, %0" [(set_attr "type" "compare")]) ;; Similarly, handle {SI,DI}->QI mode truncation followed by a compare. *************** *** 4754,4760 **** (compare:CC (subreg:QI (match_operand:SI 0 "register_operand" "r") 3) (const_int 0)))] "" ! "andcc\\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_siqi_trunc_set" --- 4231,4237 ---- (compare:CC (subreg:QI (match_operand:SI 0 "register_operand" "r") 3) (const_int 0)))] "" ! "andcc\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_siqi_trunc_set" *************** *** 4764,4770 **** (set (match_operand:QI 0 "register_operand" "=r") (subreg:QI (match_dup 1) 3))] "" ! "andcc\\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_diqi_trunc" --- 4241,4247 ---- (set (match_operand:QI 0 "register_operand" "=r") (subreg:QI (match_dup 1) 3))] "" ! "andcc\t%1, 0xff, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_diqi_trunc" *************** *** 4772,4778 **** (compare:CC (subreg:QI (match_operand:DI 0 "register_operand" "r") 7) (const_int 0)))] "TARGET_ARCH64" ! "andcc\\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_diqi_trunc_set" --- 4249,4255 ---- (compare:CC (subreg:QI (match_operand:DI 0 "register_operand" "r") 7) (const_int 0)))] "TARGET_ARCH64" ! "andcc\t%0, 0xff, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_diqi_trunc_set" *************** *** 4782,4788 **** (set (match_operand:QI 0 "register_operand" "=r") (subreg:QI (match_dup 1) 7))] "TARGET_ARCH64" ! "andcc\\t%1, 0xff, %0" [(set_attr "type" "compare")]) ;;- sign extension instructions --- 4259,4265 ---- (set (match_operand:QI 0 "register_operand" "=r") (subreg:QI (match_dup 1) 7))] "TARGET_ARCH64" ! "andcc\t%1, 0xff, %0" [(set_attr "type" "compare")]) ;;- sign extension instructions *************** *** 4795,4801 **** [(set (match_operand:SI 0 "register_operand" "") (sign_extend:SI (match_operand:HI 1 "register_operand" "")))] "" - " { rtx temp = gen_reg_rtx (SImode); rtx shift_16 = GEN_INT (16); --- 4272,4277 ---- *************** *** 4813,4832 **** shift_16)); emit_insn (gen_ashrsi3 (operand0, temp, shift_16)); DONE; ! }") (define_insn "*sign_extendhisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))] "" ! "ldsh\\t%1, %0" ! [(set_attr "type" "sload")]) (define_expand "extendqihi2" [(set (match_operand:HI 0 "register_operand" "") (sign_extend:HI (match_operand:QI 1 "register_operand" "")))] "" - " { rtx temp = gen_reg_rtx (SImode); rtx shift_24 = GEN_INT (24); --- 4289,4308 ---- shift_16)); emit_insn (gen_ashrsi3 (operand0, temp, shift_16)); DONE; ! }) (define_insn "*sign_extendhisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))] "" ! "ldsh\t%1, %0" ! [(set_attr "type" "sload") ! (set_attr "us3load_type" "3cycle")]) (define_expand "extendqihi2" [(set (match_operand:HI 0 "register_operand" "") (sign_extend:HI (match_operand:QI 1 "register_operand" "")))] "" { rtx temp = gen_reg_rtx (SImode); rtx shift_24 = GEN_INT (24); *************** *** 4853,4872 **** operand0 = gen_rtx_SUBREG (SImode, operand0, op0_subbyte); emit_insn (gen_ashrsi3 (operand0, temp, shift_24)); DONE; ! }") (define_insn "*sign_extendqihi2_insn" [(set (match_operand:HI 0 "register_operand" "=r") (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))] "" ! "ldsb\\t%1, %0" ! [(set_attr "type" "sload")]) (define_expand "extendqisi2" [(set (match_operand:SI 0 "register_operand" "") (sign_extend:SI (match_operand:QI 1 "register_operand" "")))] "" - " { rtx temp = gen_reg_rtx (SImode); rtx shift_24 = GEN_INT (24); --- 4329,4348 ---- operand0 = gen_rtx_SUBREG (SImode, operand0, op0_subbyte); emit_insn (gen_ashrsi3 (operand0, temp, shift_24)); DONE; ! }) (define_insn "*sign_extendqihi2_insn" [(set (match_operand:HI 0 "register_operand" "=r") (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))] "" ! "ldsb\t%1, %0" ! [(set_attr "type" "sload") ! (set_attr "us3load_type" "3cycle")]) (define_expand "extendqisi2" [(set (match_operand:SI 0 "register_operand" "") (sign_extend:SI (match_operand:QI 1 "register_operand" "")))] "" { rtx temp = gen_reg_rtx (SImode); rtx shift_24 = GEN_INT (24); *************** *** 4884,4903 **** shift_24)); emit_insn (gen_ashrsi3 (operand0, temp, shift_24)); DONE; ! }") (define_insn "*sign_extendqisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))] "" ! "ldsb\\t%1, %0" ! [(set_attr "type" "sload")]) (define_expand "extendqidi2" [(set (match_operand:DI 0 "register_operand" "") (sign_extend:DI (match_operand:QI 1 "register_operand" "")))] "TARGET_ARCH64" - " { rtx temp = gen_reg_rtx (DImode); rtx shift_56 = GEN_INT (56); --- 4360,4379 ---- shift_24)); emit_insn (gen_ashrsi3 (operand0, temp, shift_24)); DONE; ! }) (define_insn "*sign_extendqisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))] "" ! "ldsb\t%1, %0" ! [(set_attr "type" "sload") ! (set_attr "us3load_type" "3cycle")]) (define_expand "extendqidi2" [(set (match_operand:DI 0 "register_operand" "") (sign_extend:DI (match_operand:QI 1 "register_operand" "")))] "TARGET_ARCH64" { rtx temp = gen_reg_rtx (DImode); rtx shift_56 = GEN_INT (56); *************** *** 4915,4934 **** shift_56)); emit_insn (gen_ashrdi3 (operand0, temp, shift_56)); DONE; ! }") (define_insn "*sign_extendqidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:QI 1 "memory_operand" "m")))] "TARGET_ARCH64" ! "ldsb\\t%1, %0" ! [(set_attr "type" "sload")]) (define_expand "extendhidi2" [(set (match_operand:DI 0 "register_operand" "") (sign_extend:DI (match_operand:HI 1 "register_operand" "")))] "TARGET_ARCH64" - " { rtx temp = gen_reg_rtx (DImode); rtx shift_48 = GEN_INT (48); --- 4391,4410 ---- shift_56)); emit_insn (gen_ashrdi3 (operand0, temp, shift_56)); DONE; ! }) (define_insn "*sign_extendqidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:QI 1 "memory_operand" "m")))] "TARGET_ARCH64" ! "ldsb\t%1, %0" ! [(set_attr "type" "sload") ! (set_attr "us3load_type" "3cycle")]) (define_expand "extendhidi2" [(set (match_operand:DI 0 "register_operand" "") (sign_extend:DI (match_operand:HI 1 "register_operand" "")))] "TARGET_ARCH64" { rtx temp = gen_reg_rtx (DImode); rtx shift_48 = GEN_INT (48); *************** *** 4946,4959 **** shift_48)); emit_insn (gen_ashrdi3 (operand0, temp, shift_48)); DONE; ! }") (define_insn "*sign_extendhidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:HI 1 "memory_operand" "m")))] "TARGET_ARCH64" ! "ldsh\\t%1, %0" ! [(set_attr "type" "sload")]) (define_expand "extendsidi2" [(set (match_operand:DI 0 "register_operand" "") --- 4422,4436 ---- shift_48)); emit_insn (gen_ashrdi3 (operand0, temp, shift_48)); DONE; ! }) (define_insn "*sign_extendhidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:HI 1 "memory_operand" "m")))] "TARGET_ARCH64" ! "ldsh\t%1, %0" ! [(set_attr "type" "sload") ! (set_attr "us3load_type" "3cycle")]) (define_expand "extendsidi2" [(set (match_operand:DI 0 "register_operand" "") *************** *** 4966,4974 **** (sign_extend:DI (match_operand:SI 1 "input_operand" "r,m")))] "TARGET_ARCH64" "@ ! sra\\t%1, 0, %0 ! ldsw\\t%1, %0" ! [(set_attr "type" "shift,sload")]) ;; Special pattern for optimizing bit-field compares. This is needed ;; because combine uses this as a canonical form. --- 4443,4452 ---- (sign_extend:DI (match_operand:SI 1 "input_operand" "r,m")))] "TARGET_ARCH64" "@ ! sra\t%1, 0, %0 ! ldsw\t%1, %0" ! [(set_attr "type" "shift,sload") ! (set_attr "us3load_type" "*,3cycle")]) ;; Special pattern for optimizing bit-field compares. This is needed ;; because combine uses this as a canonical form. *************** *** 4984,4990 **** && INTVAL (operands[2]) > 19) || (GET_CODE (operands[2]) == CONST_DOUBLE && CONST_DOUBLE_LOW (operands[2]) > 19)" - "* { int len = (GET_CODE (operands[1]) == CONST_INT ? INTVAL (operands[1]) --- 4462,4467 ---- *************** *** 4996,5003 **** HOST_WIDE_INT mask = ((1 << len) - 1) << pos; operands[1] = GEN_INT (mask); ! return \"andcc\\t%0, %1, %%g0\"; ! }" [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extract_sp64" --- 4473,4480 ---- HOST_WIDE_INT mask = ((1 << len) - 1) << pos; operands[1] = GEN_INT (mask); ! return "andcc\t%0, %1, %%g0"; ! } [(set_attr "type" "compare")]) (define_insn "*cmp_zero_extract_sp64" *************** *** 5012,5018 **** && INTVAL (operands[2]) > 51) || (GET_CODE (operands[2]) == CONST_DOUBLE && CONST_DOUBLE_LOW (operands[2]) > 51))" - "* { int len = (GET_CODE (operands[1]) == CONST_INT ? INTVAL (operands[1]) --- 4489,4494 ---- *************** *** 5024,5031 **** HOST_WIDE_INT mask = (((unsigned HOST_WIDE_INT) 1 << len) - 1) << pos; operands[1] = GEN_INT (mask); ! return \"andcc\\t%0, %1, %%g0\"; ! }" [(set_attr "type" "compare")]) ;; Conversions between float, double and long double. --- 4500,4507 ---- HOST_WIDE_INT mask = (((unsigned HOST_WIDE_INT) 1 << len) - 1) << pos; operands[1] = GEN_INT (mask); ! return "andcc\t%0, %1, %%g0"; ! } [(set_attr "type" "compare")]) ;; Conversions between float, double and long double. *************** *** 5035,5041 **** (float_extend:DF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fstod\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4511,4517 ---- (float_extend:DF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fstod\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5051,5057 **** (float_extend:TF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fstoq\\t%1, %0" [(set_attr "type" "fp")]) (define_expand "extenddftf2" --- 4527,4533 ---- (float_extend:TF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fstoq\t%1, %0" [(set_attr "type" "fp")]) (define_expand "extenddftf2" *************** *** 5066,5072 **** (float_extend:TF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fdtoq\\t%1, %0" [(set_attr "type" "fp")]) (define_insn "truncdfsf2" --- 4542,4548 ---- (float_extend:TF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fdtoq\t%1, %0" [(set_attr "type" "fp")]) (define_insn "truncdfsf2" *************** *** 5074,5080 **** (float_truncate:SF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU" ! "fdtos\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4550,4556 ---- (float_truncate:SF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU" ! "fdtos\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5090,5096 **** (float_truncate:SF (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fqtos\\t%1, %0" [(set_attr "type" "fp")]) (define_expand "trunctfdf2" --- 4566,4572 ---- (float_truncate:SF (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fqtos\t%1, %0" [(set_attr "type" "fp")]) (define_expand "trunctfdf2" *************** *** 5105,5111 **** (float_truncate:DF (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fqtod\\t%1, %0" [(set_attr "type" "fp")]) ;; Conversion between fixed point and floating point. --- 4581,4587 ---- (float_truncate:DF (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fqtod\t%1, %0" [(set_attr "type" "fp")]) ;; Conversion between fixed point and floating point. *************** *** 5114,5120 **** [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:SI 1 "register_operand" "f")))] "TARGET_FPU" ! "fitos\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4590,4596 ---- [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:SI 1 "register_operand" "f")))] "TARGET_FPU" ! "fitos\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5122,5128 **** [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:SI 1 "register_operand" "f")))] "TARGET_FPU" ! "fitod\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4598,4604 ---- [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:SI 1 "register_operand" "f")))] "TARGET_FPU" ! "fitod\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5136,5142 **** [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:SI 1 "register_operand" "f")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fitoq\\t%1, %0" [(set_attr "type" "fp")]) (define_expand "floatunssitf2" --- 4612,4618 ---- [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:SI 1 "register_operand" "f")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fitoq\t%1, %0" [(set_attr "type" "fp")]) (define_expand "floatunssitf2" *************** *** 5151,5157 **** [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU" ! "fxtos\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4627,4633 ---- [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU" ! "fxtos\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5165,5171 **** [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:DI 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU" ! "fxtod\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4641,4647 ---- [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:DI 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU" ! "fxtod\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5185,5191 **** [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:DI 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU && TARGET_HARD_QUAD" ! "fxtoq\\t%1, %0" [(set_attr "type" "fp")]) (define_expand "floatunsditf2" --- 4661,4667 ---- [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:DI 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU && TARGET_HARD_QUAD" ! "fxtoq\t%1, %0" [(set_attr "type" "fp")]) (define_expand "floatunsditf2" *************** *** 5201,5207 **** [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] "TARGET_FPU" ! "fstoi\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4677,4683 ---- [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] "TARGET_FPU" ! "fstoi\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5209,5215 **** [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "e"))))] "TARGET_FPU" ! "fdtoi\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4685,4691 ---- [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "e"))))] "TARGET_FPU" ! "fdtoi\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5223,5229 **** [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fqtoi\\t%1, %0" [(set_attr "type" "fp")]) (define_expand "fixuns_trunctfsi2" --- 4699,4705 ---- [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fqtoi\t%1, %0" [(set_attr "type" "fp")]) (define_expand "fixuns_trunctfsi2" *************** *** 5238,5244 **** [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] "TARGET_V9 && TARGET_FPU" ! "fstox\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4714,4720 ---- [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] "TARGET_V9 && TARGET_FPU" ! "fstox\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5246,5252 **** [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "e"))))] "TARGET_V9 && TARGET_FPU" ! "fdtox\\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 4722,4728 ---- [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "e"))))] "TARGET_V9 && TARGET_FPU" ! "fdtox\t%1, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 5260,5266 **** [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (match_operand:TF 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU && TARGET_HARD_QUAD" ! "fqtox\\t%1, %0" [(set_attr "type" "fp")]) (define_expand "fixuns_trunctfdi2" --- 4736,4742 ---- [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (match_operand:TF 1 "register_operand" "e")))] "TARGET_V9 && TARGET_FPU && TARGET_HARD_QUAD" ! "fqtox\t%1, %0" [(set_attr "type" "fp")]) (define_expand "fixuns_trunctfdi2" *************** *** 5276,5282 **** (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_add_operand" "rHI")))] "" - " { HOST_WIDE_INT i; --- 4752,4757 ---- *************** *** 5305,5327 **** emit_insn (gen_movdi (operands[0], GEN_INT (i + 4096))); DONE; } ! }") ! (define_insn "adddi3_insn_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI"))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (plus:DI (match_operand:DI 1 "arith_double_operand" "") ! (match_operand:DI 2 "arith_double_operand" ""))) ! (clobber (reg:CC 100))] ! "! TARGET_ARCH64 && reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (plus:SI (match_dup 4) (match_dup 5)) --- 4780,4795 ---- emit_insn (gen_movdi (operands[0], GEN_INT (i + 4096))); DONE; } ! }) ! (define_insn_and_split "adddi3_insn_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI"))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! "&& reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (plus:SI (match_dup 4) (match_dup 5)) *************** *** 5332,5338 **** (plus:SI (plus:SI (match_dup 7) (match_dup 8)) (ltu:SI (reg:CC_NOOV 100) (const_int 0))))] - " { operands[3] = gen_lowpart (SImode, operands[0]); operands[4] = gen_lowpart (SImode, operands[1]); --- 4800,4805 ---- *************** *** 5350,5356 **** else #endif operands[8] = gen_highpart_mode (SImode, DImode, operands[2]); ! }") (define_split [(set (match_operand:DI 0 "register_operand" "") --- 4817,4824 ---- else #endif operands[8] = gen_highpart_mode (SImode, DImode, operands[2]); ! } ! [(set_attr "length" "2")]) (define_split [(set (match_operand:DI 0 "register_operand" "") *************** *** 5368,5374 **** (minus:SI (minus:SI (match_dup 7) (match_dup 8)) (ltu:SI (reg:CC_NOOV 100) (const_int 0))))] - " { operands[3] = gen_lowpart (SImode, operands[0]); operands[4] = gen_lowpart (SImode, operands[1]); --- 4836,4841 ---- *************** *** 5386,5392 **** else #endif operands[8] = gen_highpart_mode (SImode, DImode, operands[2]); ! }") ;; LTU here means "carry set" (define_insn "addx" --- 4853,4859 ---- else #endif operands[8] = gen_highpart_mode (SImode, DImode, operands[2]); ! }) ;; LTU here means "carry set" (define_insn "addx" *************** *** 5395,5423 **** (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0))))] "" ! "addx\\t%1, %2, %0" ! [(set_attr "type" "misc")]) ! (define_insn "*addx_extend_sp32" [(set (match_operand:DI 0 "register_operand" "=r") ! (zero_extend:DI (plus:SI (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ") ! (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "! TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (zero_extend:DI (plus:SI (plus:SI (match_operand:SI 1 "reg_or_0_operand" "") ! (match_operand:SI 2 "arith_operand" "")) ! (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] ! "! TARGET_ARCH64 && reload_completed" [(set (match_dup 3) (plus:SI (plus:SI (match_dup 1) (match_dup 2)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))) (set (match_dup 4) (const_int 0))] "operands[3] = gen_lowpart (SImode, operands[0]); ! operands[4] = gen_highpart_mode (SImode, DImode, operands[1]);") (define_insn "*addx_extend_sp64" [(set (match_operand:DI 0 "register_operand" "=r") --- 4862,4885 ---- (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0))))] "" ! "addx\t%1, %2, %0" ! [(set_attr "type" "ialuX")]) ! (define_insn_and_split "*addx_extend_sp32" [(set (match_operand:DI 0 "register_operand" "=r") ! (zero_extend:DI (plus:SI (plus:SI ! (match_operand:SI 1 "reg_or_0_operand" "%rJ") ! (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "! TARGET_ARCH64" "#" ! "&& reload_completed" [(set (match_dup 3) (plus:SI (plus:SI (match_dup 1) (match_dup 2)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))) (set (match_dup 4) (const_int 0))] "operands[3] = gen_lowpart (SImode, operands[0]); ! operands[4] = gen_highpart_mode (SImode, DImode, operands[1]);" ! [(set_attr "length" "2")]) (define_insn "*addx_extend_sp64" [(set (match_operand:DI 0 "register_operand" "=r") *************** *** 5425,5432 **** (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "TARGET_ARCH64" ! "addx\\t%r1, %2, %0" ! [(set_attr "type" "misc")]) (define_insn "subx" [(set (match_operand:SI 0 "register_operand" "=r") --- 4887,4894 ---- (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "TARGET_ARCH64" ! "addx\t%r1, %2, %0" ! [(set_attr "type" "ialuX")]) (define_insn "subx" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 5434,5441 **** (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0))))] "" ! "subx\\t%r1, %2, %0" ! [(set_attr "type" "misc")]) (define_insn "*subx_extend_sp64" [(set (match_operand:DI 0 "register_operand" "=r") --- 4896,4903 ---- (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0))))] "" ! "subx\t%r1, %2, %0" ! [(set_attr "type" "ialuX")]) (define_insn "*subx_extend_sp64" [(set (match_operand:DI 0 "register_operand" "=r") *************** *** 5443,5487 **** (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "TARGET_ARCH64" ! "subx\\t%r1, %2, %0" ! [(set_attr "type" "misc")]) ! (define_insn "*subx_extend" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (minus:SI (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "! TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (zero_extend:DI (minus:SI (minus:SI (match_operand:SI 1 "reg_or_0_operand" "") ! (match_operand:SI 2 "arith_operand" "")) ! (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] ! "! TARGET_ARCH64 && reload_completed" [(set (match_dup 3) (minus:SI (minus:SI (match_dup 1) (match_dup 2)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))) (set (match_dup 4) (const_int 0))] "operands[3] = gen_lowpart (SImode, operands[0]); ! operands[4] = gen_highpart (SImode, operands[0]);") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) (match_operand:DI 2 "register_operand" "r"))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (plus:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "")) ! (match_operand:DI 2 "register_operand" ""))) ! (clobber (reg:CC 100))] ! "! TARGET_ARCH64 && reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (plus:SI (match_dup 3) (match_dup 1)) (const_int 0))) --- 4905,4936 ---- (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "TARGET_ARCH64" ! "subx\t%r1, %2, %0" ! [(set_attr "type" "ialuX")]) ! (define_insn_and_split "*subx_extend" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (minus:SI (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") (match_operand:SI 2 "arith_operand" "rI")) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))))] "! TARGET_ARCH64" "#" ! "&& reload_completed" [(set (match_dup 3) (minus:SI (minus:SI (match_dup 1) (match_dup 2)) (ltu:SI (reg:CC_NOOV 100) (const_int 0)))) (set (match_dup 4) (const_int 0))] "operands[3] = gen_lowpart (SImode, operands[0]); ! operands[4] = gen_highpart (SImode, operands[0]);" ! [(set_attr "length" "2")]) ! (define_insn_and_split "" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) (match_operand:DI 2 "register_operand" "r"))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! "&& reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (plus:SI (match_dup 3) (match_dup 1)) (const_int 0))) *************** *** 5492,5512 **** "operands[3] = gen_lowpart (SImode, operands[2]); operands[4] = gen_highpart (SImode, operands[2]); operands[5] = gen_lowpart (SImode, operands[0]); ! operands[6] = gen_highpart (SImode, operands[0]);") (define_insn "*adddi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "add\\t%1, %2, %0") (define_expand "addsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") (plus:SI (match_operand:SI 1 "arith_operand" "%r,d") (match_operand:SI 2 "arith_add_operand" "rI,d")))] "" - " { if (arith_4096_operand(operands[2], SImode)) { --- 4941,4961 ---- "operands[3] = gen_lowpart (SImode, operands[2]); operands[4] = gen_highpart (SImode, operands[2]); operands[5] = gen_lowpart (SImode, operands[0]); ! operands[6] = gen_highpart (SImode, operands[0]);" ! [(set_attr "length" "2")]) (define_insn "*adddi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "add\t%1, %2, %0") (define_expand "addsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") (plus:SI (match_operand:SI 1 "arith_operand" "%r,d") (match_operand:SI 2 "arith_add_operand" "rI,d")))] "" { if (arith_4096_operand(operands[2], SImode)) { *************** *** 5519,5525 **** GEN_INT(-4096)))); DONE; } ! }") (define_insn "*addsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") --- 4968,4974 ---- GEN_INT(-4096)))); DONE; } ! }) (define_insn "*addsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") *************** *** 5527,5534 **** (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! add\\t%1, %2, %0 ! fpadd32s\\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_insn "*cmp_cc_plus" --- 4976,4983 ---- (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! add\t%1, %2, %0 ! fpadd32s\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_insn "*cmp_cc_plus" *************** *** 5537,5543 **** (match_operand:SI 1 "arith_operand" "rI")) (const_int 0)))] "" ! "addcc\\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_plus" --- 4986,4992 ---- (match_operand:SI 1 "arith_operand" "rI")) (const_int 0)))] "" ! "addcc\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_plus" *************** *** 5546,5552 **** (match_operand:DI 1 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "addcc\\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_plus_set" --- 4995,5001 ---- (match_operand:DI 1 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "addcc\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_plus_set" *************** *** 5557,5563 **** (set (match_operand:SI 0 "register_operand" "=r") (plus:SI (match_dup 1) (match_dup 2)))] "" ! "addcc\\t%1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_plus_set" --- 5006,5012 ---- (set (match_operand:SI 0 "register_operand" "=r") (plus:SI (match_dup 1) (match_dup 2)))] "" ! "addcc\t%1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_plus_set" *************** *** 5568,5574 **** (set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_dup 1) (match_dup 2)))] "TARGET_ARCH64" ! "addcc\\t%1, %2, %0" [(set_attr "type" "compare")]) (define_expand "subdi3" --- 5017,5023 ---- (set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_dup 1) (match_dup 2)))] "TARGET_ARCH64" ! "addcc\t%1, %2, %0" [(set_attr "type" "compare")]) (define_expand "subdi3" *************** *** 5576,5582 **** (minus:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "arith_double_add_operand" "rHI")))] "" - " { if (! TARGET_ARCH64) { --- 5025,5030 ---- *************** *** 5595,5622 **** GEN_INT(-4096)))); DONE; } ! }") ! (define_insn "*subdi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") ! (minus:DI (match_operand:DI 1 "register_operand" "r") ! (match_operand:DI 2 "arith_double_operand" "rHI"))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (minus:DI (match_operand:DI 1 "register_operand" "") ! (match_operand:DI 2 "arith_double_operand" ""))) ! (clobber (reg:CC 100))] ! "! TARGET_ARCH64 ! && reload_completed && (GET_CODE (operands[2]) == CONST_INT || GET_CODE (operands[2]) == CONST_DOUBLE)" [(clobber (const_int 0))] - " { rtx highp, lowp; --- 5043,5061 ---- GEN_INT(-4096)))); DONE; } ! }) ! (define_insn_and_split "*subdi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") ! (minus:DI (match_operand:DI 1 "register_operand" "r") ! (match_operand:DI 2 "arith_double_operand" "rHI"))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! "&& reload_completed && (GET_CODE (operands[2]) == CONST_INT || GET_CODE (operands[2]) == CONST_DOUBLE)" [(clobber (const_int 0))] { rtx highp, lowp; *************** *** 5642,5648 **** highp)); } DONE; ! }") (define_split [(set (match_operand:DI 0 "register_operand" "") --- 5081,5088 ---- highp)); } DONE; ! } ! [(set_attr "length" "2")]) (define_split [(set (match_operand:DI 0 "register_operand" "") *************** *** 5652,5658 **** "! TARGET_ARCH64 && reload_completed" [(clobber (const_int 0))] - " { emit_insn (gen_cmp_minus_cc_set (gen_lowpart (SImode, operands[0]), gen_lowpart (SImode, operands[1]), --- 5092,5097 ---- *************** *** 5661,5683 **** gen_highpart (SImode, operands[1]), gen_highpart (SImode, operands[2]))); DONE; ! }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") (zero_extend:DI (match_operand:SI 2 "register_operand" "r")))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (minus:DI (match_operand:DI 1 "register_operand" "") ! (zero_extend:DI (match_operand:SI 2 "register_operand" "")))) ! (clobber (reg:CC 100))] ! "! TARGET_ARCH64 && reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (match_dup 3) (match_dup 2)) (const_int 0))) --- 5100,5115 ---- gen_highpart (SImode, operands[1]), gen_highpart (SImode, operands[2]))); DONE; ! }) ! (define_insn_and_split "" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") (zero_extend:DI (match_operand:SI 2 "register_operand" "r")))) (clobber (reg:CC 100))] "! TARGET_ARCH64" "#" ! "&& reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (match_dup 3) (match_dup 2)) (const_int 0))) *************** *** 5688,5708 **** "operands[3] = gen_lowpart (SImode, operands[1]); operands[4] = gen_highpart (SImode, operands[1]); operands[5] = gen_lowpart (SImode, operands[0]); ! operands[6] = gen_highpart (SImode, operands[0]);") (define_insn "*subdi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "sub\\t%1, %2, %0") (define_expand "subsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") (minus:SI (match_operand:SI 1 "register_operand" "r,d") (match_operand:SI 2 "arith_add_operand" "rI,d")))] "" - " { if (arith_4096_operand(operands[2], SImode)) { --- 5120,5140 ---- "operands[3] = gen_lowpart (SImode, operands[1]); operands[4] = gen_highpart (SImode, operands[1]); operands[5] = gen_lowpart (SImode, operands[0]); ! operands[6] = gen_highpart (SImode, operands[0]);" ! [(set_attr "length" "2")]) (define_insn "*subdi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "sub\t%1, %2, %0") (define_expand "subsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") (minus:SI (match_operand:SI 1 "register_operand" "r,d") (match_operand:SI 2 "arith_add_operand" "rI,d")))] "" { if (arith_4096_operand(operands[2], SImode)) { *************** *** 5711,5717 **** GEN_INT(-4096)))); DONE; } ! }") (define_insn "*subsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") --- 5143,5149 ---- GEN_INT(-4096)))); DONE; } ! }) (define_insn "*subsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") *************** *** 5719,5726 **** (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! sub\\t%1, %2, %0 ! fpsub32s\\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_insn "*cmp_minus_cc" --- 5151,5158 ---- (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! sub\t%1, %2, %0 ! fpsub32s\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_insn "*cmp_minus_cc" *************** *** 5729,5735 **** (match_operand:SI 1 "arith_operand" "rI")) (const_int 0)))] "" ! "subcc\\t%r0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_minus_ccx" --- 5161,5167 ---- (match_operand:SI 1 "arith_operand" "rI")) (const_int 0)))] "" ! "subcc\t%r0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_minus_ccx" *************** *** 5738,5744 **** (match_operand:DI 1 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "subcc\\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "cmp_minus_cc_set" --- 5170,5176 ---- (match_operand:DI 1 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "subcc\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "cmp_minus_cc_set" *************** *** 5749,5755 **** (set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_dup 1) (match_dup 2)))] "" ! "subcc\\t%r1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_minus_ccx_set" --- 5181,5187 ---- (set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_dup 1) (match_dup 2)))] "" ! "subcc\t%r1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_minus_ccx_set" *************** *** 5760,5766 **** (set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_dup 1) (match_dup 2)))] "TARGET_ARCH64" ! "subcc\\t%1, %2, %0" [(set_attr "type" "compare")]) ;; Integer Multiply/Divide. --- 5192,5198 ---- (set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_dup 1) (match_dup 2)))] "TARGET_ARCH64" ! "subcc\t%1, %2, %0" [(set_attr "type" "compare")]) ;; Integer Multiply/Divide. *************** *** 5773,5779 **** (mult:SI (match_operand:SI 1 "arith_operand" "%r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_HARD_MUL" ! "smul\\t%1, %2, %0" [(set_attr "type" "imul")]) (define_expand "muldi3" --- 5205,5211 ---- (mult:SI (match_operand:SI 1 "arith_operand" "%r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_HARD_MUL" ! "smul\t%1, %2, %0" [(set_attr "type" "imul")]) (define_expand "muldi3" *************** *** 5781,5801 **** (mult:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64 || TARGET_V8PLUS" - " { if (TARGET_V8PLUS) { emit_insn (gen_muldi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }") (define_insn "*muldi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "mulx\\t%1, %2, %0" [(set_attr "type" "imul")]) ;; V8plus wide multiply. --- 5213,5232 ---- (mult:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64 || TARGET_V8PLUS" { if (TARGET_V8PLUS) { emit_insn (gen_muldi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }) (define_insn "*muldi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (match_operand:DI 1 "arith_double_operand" "%r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "mulx\t%1, %2, %0" [(set_attr "type" "imul")]) ;; V8plus wide multiply. *************** *** 5807,5839 **** (clobber (match_scratch:SI 3 "=&h,X")) (clobber (match_scratch:SI 4 "=&h,X"))] "TARGET_V8PLUS" - "* { if (sparc_check_64 (operands[1], insn) <= 0) ! output_asm_insn (\"srl\\t%L1, 0, %L1\", operands); if (which_alternative == 1) ! output_asm_insn (\"sllx\\t%H1, 32, %H1\", operands); if (GET_CODE (operands[2]) == CONST_INT) { if (which_alternative == 1) ! return \"or\\t%L1, %H1, %H1\\n\\tmulx\\t%H1, %2, %L0\;srlx\\t%L0, 32, %H0\"; else ! return \"sllx\\t%H1, 32, %3\\n\\tor\\t%L1, %3, %3\\n\\tmulx\\t%3, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0\"; } else if (rtx_equal_p (operands[1], operands[2])) { if (which_alternative == 1) ! return \"or\\t%L1, %H1, %H1\\n\\tmulx\\t%H1, %H1, %L0\;srlx\\t%L0, 32, %H0\"; else ! return \"sllx\\t%H1, 32, %3\\n\\tor\\t%L1, %3, %3\\n\\tmulx\\t%3, %3, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0\"; } if (sparc_check_64 (operands[2], insn) <= 0) ! output_asm_insn (\"srl\\t%L2, 0, %L2\", operands); if (which_alternative == 1) ! return \"or\\t%L1, %H1, %H1\\n\\tsllx\\t%H2, 32, %L1\\n\\tor\\t%L2, %L1, %L1\\n\\tmulx\\t%H1, %L1, %L0\;srlx\\t%L0, 32, %H0\"; else ! return \"sllx\\t%H1, 32, %3\\n\\tsllx\\t%H2, 32, %4\\n\\tor\\t%L1, %3, %3\\n\\tor\\t%L2, %4, %4\\n\\tmulx\\t%3, %4, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "9,8")]) --- 5238,5269 ---- (clobber (match_scratch:SI 3 "=&h,X")) (clobber (match_scratch:SI 4 "=&h,X"))] "TARGET_V8PLUS" { if (sparc_check_64 (operands[1], insn) <= 0) ! output_asm_insn ("srl\t%L1, 0, %L1", operands); if (which_alternative == 1) ! output_asm_insn ("sllx\t%H1, 32, %H1", operands); if (GET_CODE (operands[2]) == CONST_INT) { if (which_alternative == 1) ! return "or\t%L1, %H1, %H1\n\tmulx\t%H1, %2, %L0\;srlx\t%L0, 32, %H0"; else ! return "sllx\t%H1, 32, %3\n\tor\t%L1, %3, %3\n\tmulx\t%3, %2, %3\n\tsrlx\t%3, 32, %H0\n\tmov\t%3, %L0"; } else if (rtx_equal_p (operands[1], operands[2])) { if (which_alternative == 1) ! return "or\t%L1, %H1, %H1\n\tmulx\t%H1, %H1, %L0\;srlx\t%L0, 32, %H0"; else ! return "sllx\t%H1, 32, %3\n\tor\t%L1, %3, %3\n\tmulx\t%3, %3, %3\n\tsrlx\t%3, 32, %H0\n\tmov\t%3, %L0"; } if (sparc_check_64 (operands[2], insn) <= 0) ! output_asm_insn ("srl\t%L2, 0, %L2", operands); if (which_alternative == 1) ! return "or\t%L1, %H1, %H1\n\tsllx\t%H2, 32, %L1\n\tor\t%L2, %L1, %L1\n\tmulx\t%H1, %L1, %L0\;srlx\t%L0, 32, %H0"; else ! return "sllx\t%H1, 32, %3\n\tsllx\t%H2, 32, %4\n\tor\t%L1, %3, %3\n\tor\t%L2, %4, %4\n\tmulx\t%3, %4, %3\n\tsrlx\t%3, 32, %H0\n\tmov\t%3, %L0"; ! } [(set_attr "type" "multi") (set_attr "length" "9,8")]) *************** *** 5845,5851 **** (set (match_operand:SI 0 "register_operand" "=r") (mult:SI (match_dup 1) (match_dup 2)))] "TARGET_V8 || TARGET_SPARCLITE || TARGET_DEPRECATED_V8_INSNS" ! "smulcc\\t%1, %2, %0" [(set_attr "type" "imul")]) (define_expand "mulsidi3" --- 5275,5281 ---- (set (match_operand:SI 0 "register_operand" "=r") (mult:SI (match_dup 1) (match_dup 2)))] "TARGET_V8 || TARGET_SPARCLITE || TARGET_DEPRECATED_V8_INSNS" ! "smulcc\t%1, %2, %0" [(set_attr "type" "imul")]) (define_expand "mulsidi3" *************** *** 5853,5868 **** (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "")) (sign_extend:DI (match_operand:SI 2 "arith_operand" ""))))] "TARGET_HARD_MUL" - " { if (CONSTANT_P (operands[2])) { if (TARGET_V8PLUS) emit_insn (gen_const_mulsidi3_v8plus (operands[0], operands[1], operands[2])); ! else emit_insn (gen_const_mulsidi3_sp32 (operands[0], operands[1], operands[2])); DONE; } if (TARGET_V8PLUS) --- 5283,5300 ---- (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "")) (sign_extend:DI (match_operand:SI 2 "arith_operand" ""))))] "TARGET_HARD_MUL" { if (CONSTANT_P (operands[2])) { if (TARGET_V8PLUS) emit_insn (gen_const_mulsidi3_v8plus (operands[0], operands[1], operands[2])); ! else if (TARGET_ARCH32) emit_insn (gen_const_mulsidi3_sp32 (operands[0], operands[1], operands[2])); + else + emit_insn (gen_const_mulsidi3_sp64 (operands[0], operands[1], + operands[2])); DONE; } if (TARGET_V8PLUS) *************** *** 5870,5876 **** emit_insn (gen_mulsidi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }") ;; V9 puts the 64 bit product in a 64 bit register. Only out or global ;; registers can hold 64 bit values in the V8plus environment. --- 5302,5308 ---- emit_insn (gen_mulsidi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }) ;; V9 puts the 64 bit product in a 64 bit register. Only out or global ;; registers can hold 64 bit values in the V8plus environment. *************** *** 5882,5889 **** (clobber (match_scratch:SI 3 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\\t%1, %2, %L0\\n\\tsrlx\\t%L0, 32, %H0 ! smul\\t%1, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) --- 5314,5321 ---- (clobber (match_scratch:SI 3 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\t%1, %2, %L0\n\tsrlx\t%L0, 32, %H0 ! smul\t%1, %2, %3\n\tsrlx\t%3, 32, %H0\n\tmov\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) *************** *** 5891,5902 **** (define_insn "const_mulsidi3_v8plus" [(set (match_operand:DI 0 "register_operand" "=h,r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand:SI 2 "small_int" "I,I"))) (clobber (match_scratch:SI 3 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\\t%1, %2, %L0\\n\\tsrlx\\t%L0, 32, %H0 ! smul\\t%1, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) --- 5323,5334 ---- (define_insn "const_mulsidi3_v8plus" [(set (match_operand:DI 0 "register_operand" "=h,r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand:DI 2 "small_int" "I,I"))) (clobber (match_scratch:SI 3 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\t%1, %2, %L0\n\tsrlx\t%L0, 32, %H0 ! smul\t%1, %2, %3\n\tsrlx\t%3, 32, %H0\n\tmov\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) *************** *** 5906,5915 **** (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_HARD_MUL32" - "* { ! return TARGET_SPARCLET ? \"smuld\\t%1, %2, %L0\" : \"smul\\t%1, %2, %L0\\n\\trd\\t%%y, %H0\"; ! }" [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) --- 5338,5348 ---- (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_HARD_MUL32" { ! return TARGET_SPARCLET ! ? "smuld\t%1, %2, %L0" ! : "smul\t%1, %2, %L0\n\trd\t%%y, %H0"; ! } [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) *************** *** 5922,5928 **** (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "smul\\t%1, %2, %0" [(set_attr "type" "imul")]) ;; Extra pattern, because sign_extend of a constant isn't valid. --- 5355,5361 ---- (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "smul\t%1, %2, %0" [(set_attr "type" "imul")]) ;; Extra pattern, because sign_extend of a constant isn't valid. *************** *** 5931,5942 **** (define_insn "const_mulsidi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:SI 2 "small_int" "I")))] "TARGET_HARD_MUL32" - "* { ! return TARGET_SPARCLET ? \"smuld\\t%1, %2, %L0\" : \"smul\\t%1, %2, %L0\\n\\trd\\t%%y, %H0\"; ! }" [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) --- 5364,5376 ---- (define_insn "const_mulsidi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:DI 2 "small_int" "I")))] "TARGET_HARD_MUL32" { ! return TARGET_SPARCLET ! ? "smuld\t%1, %2, %L0" ! : "smul\t%1, %2, %L0\n\trd\t%%y, %H0"; ! } [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) *************** *** 5947,5955 **** (define_insn "const_mulsidi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:SI 2 "small_int" "I")))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "smul\\t%1, %2, %0" [(set_attr "type" "imul")]) (define_expand "smulsi3_highpart" --- 5381,5389 ---- (define_insn "const_mulsidi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:DI 2 "small_int" "I")))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "smul\t%1, %2, %0" [(set_attr "type" "imul")]) (define_expand "smulsi3_highpart" *************** *** 5959,5965 **** (sign_extend:DI (match_operand:SI 2 "arith_operand" ""))) (const_int 32))))] "TARGET_HARD_MUL && TARGET_ARCH32" - " { if (CONSTANT_P (operands[2])) { --- 5393,5398 ---- *************** *** 5980,5986 **** operands[2], GEN_INT (32))); DONE; } ! }") ;; XXX (define_insn "smulsi3_highpart_v8plus" --- 5413,5419 ---- operands[2], GEN_INT (32))); DONE; } ! }) ;; XXX (define_insn "smulsi3_highpart_v8plus" *************** *** 5992,5999 **** (clobber (match_scratch:SI 4 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\\t%1, %2, %0\;srlx\\t%0, %3, %0 ! smul\\t%1, %2, %4\;srlx\\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5425,5432 ---- (clobber (match_scratch:SI 4 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\t%1, %2, %0\;srlx\t%0, %3, %0 ! smul\t%1, %2, %4\;srlx\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6010,6017 **** (clobber (match_scratch:SI 4 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\\t%1, %2, %0\\n\\tsrlx\\t%0, %3, %0 ! smul\\t%1, %2, %4\\n\\tsrlx\\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5443,5450 ---- (clobber (match_scratch:SI 4 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\t%1, %2, %0\n\tsrlx\t%0, %3, %0 ! smul\t%1, %2, %4\n\tsrlx\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6020,6032 **** [(set (match_operand:SI 0 "register_operand" "=h,r") (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand 2 "small_int" "i,i")) (match_operand:SI 3 "const_int_operand" "i,i")))) (clobber (match_scratch:SI 4 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\\t%1, %2, %0\\n\\tsrlx\\t%0, %3, %0 ! smul\\t%1, %2, %4\\n\\tsrlx\\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5453,5465 ---- [(set (match_operand:SI 0 "register_operand" "=h,r") (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand:DI 2 "small_int" "i,i")) (match_operand:SI 3 "const_int_operand" "i,i")))) (clobber (match_scratch:SI 4 "=X,&h"))] "TARGET_V8PLUS" "@ ! smul\t%1, %2, %0\n\tsrlx\t%0, %3, %0 ! smul\t%1, %2, %4\n\tsrlx\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6038,6044 **** (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))) (const_int 32))))] "TARGET_HARD_MUL32" ! "smul\\t%1, %2, %%g0\\n\\trd\\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5471,5477 ---- (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))) (const_int 32))))] "TARGET_HARD_MUL32" ! "smul\t%1, %2, %%g0\n\trd\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6047,6056 **** [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:SI 2 "register_operand" "r")) (const_int 32))))] "TARGET_HARD_MUL32" ! "smul\\t%1, %2, %%g0\\n\\trd\\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5480,5489 ---- [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:DI 2 "small_int" "i")) (const_int 32))))] "TARGET_HARD_MUL32" ! "smul\t%1, %2, %%g0\n\trd\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6059,6074 **** (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "")) (zero_extend:DI (match_operand:SI 2 "uns_arith_operand" ""))))] "TARGET_HARD_MUL" - " { if (CONSTANT_P (operands[2])) { if (TARGET_V8PLUS) emit_insn (gen_const_umulsidi3_v8plus (operands[0], operands[1], operands[2])); ! else emit_insn (gen_const_umulsidi3_sp32 (operands[0], operands[1], operands[2])); DONE; } if (TARGET_V8PLUS) --- 5492,5509 ---- (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "")) (zero_extend:DI (match_operand:SI 2 "uns_arith_operand" ""))))] "TARGET_HARD_MUL" { if (CONSTANT_P (operands[2])) { if (TARGET_V8PLUS) emit_insn (gen_const_umulsidi3_v8plus (operands[0], operands[1], operands[2])); ! else if (TARGET_ARCH32) emit_insn (gen_const_umulsidi3_sp32 (operands[0], operands[1], operands[2])); + else + emit_insn (gen_const_umulsidi3_sp64 (operands[0], operands[1], + operands[2])); DONE; } if (TARGET_V8PLUS) *************** *** 6076,6082 **** emit_insn (gen_umulsidi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }") ;; XXX (define_insn "umulsidi3_v8plus" --- 5511,5517 ---- emit_insn (gen_umulsidi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }) ;; XXX (define_insn "umulsidi3_v8plus" *************** *** 6086,6093 **** (clobber (match_scratch:SI 3 "=X,&h"))] "TARGET_V8PLUS" "@ ! umul\\t%1, %2, %L0\\n\\tsrlx\\t%L0, 32, %H0 ! umul\\t%1, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) --- 5521,5528 ---- (clobber (match_scratch:SI 3 "=X,&h"))] "TARGET_V8PLUS" "@ ! umul\t%1, %2, %L0\n\tsrlx\t%L0, 32, %H0 ! umul\t%1, %2, %3\n\tsrlx\t%3, 32, %H0\n\tmov\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) *************** *** 6097,6106 **** (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_HARD_MUL32" - "* { ! return TARGET_SPARCLET ? \"umuld\\t%1, %2, %L0\" : \"umul\\t%1, %2, %L0\\n\\trd\\t%%y, %H0\"; ! }" [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) --- 5532,5542 ---- (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_HARD_MUL32" { ! return TARGET_SPARCLET ! ? "umuld\t%1, %2, %L0" ! : "umul\t%1, %2, %L0\n\trd\t%%y, %H0"; ! } [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) *************** *** 6113,6119 **** (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "umul\\t%1, %2, %0" [(set_attr "type" "imul")]) ;; Extra pattern, because sign_extend of a constant isn't valid. --- 5549,5555 ---- (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "umul\t%1, %2, %0" [(set_attr "type" "imul")]) ;; Extra pattern, because sign_extend of a constant isn't valid. *************** *** 6122,6133 **** (define_insn "const_umulsidi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:SI 2 "uns_small_int" "")))] "TARGET_HARD_MUL32" - "* { ! return TARGET_SPARCLET ? \"umuld\\t%1, %2, %L0\" : \"umul\\t%1, %2, %L0\\n\\trd\\t%%y, %H0\"; ! }" [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) --- 5558,5570 ---- (define_insn "const_umulsidi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:DI 2 "uns_small_int" "")))] "TARGET_HARD_MUL32" { ! return TARGET_SPARCLET ! ? "umuld\t%1, %s2, %L0" ! : "umul\t%1, %s2, %L0\n\trd\t%%y, %H0"; ! } [(set (attr "type") (if_then_else (eq_attr "isa" "sparclet") (const_string "imul") (const_string "multi"))) *************** *** 6138,6158 **** (define_insn "const_umulsidi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:SI 2 "uns_small_int" "")))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "umul\\t%1, %2, %0" [(set_attr "type" "imul")]) ;; XXX (define_insn "const_umulsidi3_v8plus" [(set (match_operand:DI 0 "register_operand" "=h,r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand:SI 2 "uns_small_int" ""))) (clobber (match_scratch:SI 3 "=X,h"))] "TARGET_V8PLUS" "@ ! umul\\t%1, %2, %L0\\n\\tsrlx\\t%L0, 32, %H0 ! umul\\t%1, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) --- 5575,5595 ---- (define_insn "const_umulsidi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:DI 2 "uns_small_int" "")))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "umul\t%1, %s2, %0" [(set_attr "type" "imul")]) ;; XXX (define_insn "const_umulsidi3_v8plus" [(set (match_operand:DI 0 "register_operand" "=h,r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand:DI 2 "uns_small_int" ""))) (clobber (match_scratch:SI 3 "=X,h"))] "TARGET_V8PLUS" "@ ! umul\t%1, %s2, %L0\n\tsrlx\t%L0, 32, %H0 ! umul\t%1, %s2, %3\n\tsrlx\t%3, 32, %H0\n\tmov\t%3, %L0" [(set_attr "type" "multi") (set_attr "length" "2,3")]) *************** *** 6163,6169 **** (zero_extend:DI (match_operand:SI 2 "uns_arith_operand" ""))) (const_int 32))))] "TARGET_HARD_MUL && TARGET_ARCH32" - " { if (CONSTANT_P (operands[2])) { --- 5600,5605 ---- *************** *** 6184,6190 **** operands[2], GEN_INT (32))); DONE; } ! }") ;; XXX (define_insn "umulsi3_highpart_v8plus" --- 5620,5626 ---- operands[2], GEN_INT (32))); DONE; } ! }) ;; XXX (define_insn "umulsi3_highpart_v8plus" *************** *** 6196,6203 **** (clobber (match_scratch:SI 4 "=X,h"))] "TARGET_V8PLUS" "@ ! umul\\t%1, %2, %0\\n\\tsrlx\\t%0, %3, %0 ! umul\\t%1, %2, %4\\n\\tsrlx\\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5632,5639 ---- (clobber (match_scratch:SI 4 "=X,h"))] "TARGET_V8PLUS" "@ ! umul\t%1, %2, %0\n\tsrlx\t%0, %3, %0 ! umul\t%1, %2, %4\n\tsrlx\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6206,6218 **** [(set (match_operand:SI 0 "register_operand" "=h,r") (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand:SI 2 "uns_small_int" "")) (match_operand:SI 3 "const_int_operand" "i,i")))) (clobber (match_scratch:SI 4 "=X,h"))] "TARGET_V8PLUS" "@ ! umul\\t%1, %2, %0\\n\\tsrlx\\t%0, %3, %0 ! umul\\t%1, %2, %4\\n\\tsrlx\\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5642,5654 ---- [(set (match_operand:SI 0 "register_operand" "=h,r") (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r,r")) ! (match_operand:DI 2 "uns_small_int" "")) (match_operand:SI 3 "const_int_operand" "i,i")))) (clobber (match_scratch:SI 4 "=X,h"))] "TARGET_V8PLUS" "@ ! umul\t%1, %s2, %0\n\tsrlx\t%0, %3, %0 ! umul\t%1, %s2, %4\n\tsrlx\t%4, %3, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6224,6230 **** (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))) (const_int 32))))] "TARGET_HARD_MUL32" ! "umul\\t%1, %2, %%g0\\n\\trd\\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5660,5666 ---- (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))) (const_int 32))))] "TARGET_HARD_MUL32" ! "umul\t%1, %2, %%g0\n\trd\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6233,6242 **** [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:SI 2 "uns_small_int" "")) (const_int 32))))] "TARGET_HARD_MUL32" ! "umul\\t%1, %2, %%g0\\n\\trd\\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5669,5678 ---- [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) ! (match_operand:DI 2 "uns_small_int" "")) (const_int 32))))] "TARGET_HARD_MUL32" ! "umul\t%1, %s2, %%g0\n\trd\t%%y, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6249,6255 **** (match_operand:SI 2 "input_operand" "rI,m"))) (clobber (match_scratch:SI 3 "=&r,&r"))])] "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" - " { if (TARGET_ARCH64) { --- 5685,5690 ---- *************** *** 6259,6265 **** operands[3])); DONE; } ! }") (define_insn "divsi3_sp32" [(set (match_operand:SI 0 "register_operand" "=r,r") --- 5694,5700 ---- operands[3])); DONE; } ! }) (define_insn "divsi3_sp32" [(set (match_operand:SI 0 "register_operand" "=r,r") *************** *** 6268,6286 **** (clobber (match_scratch:SI 3 "=&r,&r"))] "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) && TARGET_ARCH32" - "* { if (which_alternative == 0) if (TARGET_V9) ! return \"sra\\t%1, 31, %3\\n\\twr\\t%3, 0, %%y\\n\\tsdiv\\t%1, %2, %0\"; else ! return \"sra\\t%1, 31, %3\\n\\twr\\t%3, 0, %%y\\n\\tnop\\n\\tnop\\n\\tnop\\n\\tsdiv\\t%1, %2, %0\"; else if (TARGET_V9) ! return \"sra\\t%1, 31, %3\\n\\twr\\t%3, 0, %%y\\n\\tld\\t%2, %3\\n\\tsdiv\\t%1, %3, %0\"; else ! return \"sra\\t%1, 31, %3\\n\\twr\\t%3, 0, %%y\\n\\tld\\t%2, %3\\n\\tnop\\n\\tnop\\n\\tsdiv\\t%1, %3, %0\"; ! }" [(set_attr "type" "multi") (set (attr "length") (if_then_else (eq_attr "isa" "v9") --- 5703,5720 ---- (clobber (match_scratch:SI 3 "=&r,&r"))] "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) && TARGET_ARCH32" { if (which_alternative == 0) if (TARGET_V9) ! return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tsdiv\t%1, %2, %0"; else ! return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tnop\n\tnop\n\tnop\n\tsdiv\t%1, %2, %0"; else if (TARGET_V9) ! return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tld\t%2, %3\n\tsdiv\t%1, %3, %0"; else ! return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tld\t%2, %3\n\tnop\n\tnop\n\tsdiv\t%1, %3, %0"; ! } [(set_attr "type" "multi") (set (attr "length") (if_then_else (eq_attr "isa" "v9") *************** *** 6292,6298 **** (match_operand:SI 2 "input_operand" "rI"))) (use (match_operand:SI 3 "register_operand" "r"))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "wr\\t%%g0, %3, %%y\\n\\tsdiv\\t%1, %2, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5726,5732 ---- (match_operand:SI 2 "input_operand" "rI"))) (use (match_operand:SI 3 "register_operand" "r"))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "wr\t%%g0, %3, %%y\n\tsdiv\t%1, %2, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6301,6307 **** (div:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "sdivx\\t%1, %2, %0" [(set_attr "type" "idiv")]) (define_insn "*cmp_sdiv_cc_set" --- 5735,5741 ---- (div:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "sdivx\t%1, %2, %0" [(set_attr "type" "idiv")]) (define_insn "*cmp_sdiv_cc_set" *************** *** 6313,6325 **** (div:SI (match_dup 1) (match_dup 2))) (clobber (match_scratch:SI 3 "=&r"))] "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" - "* { if (TARGET_V9) ! return \"sra\\t%1, 31, %3\\n\\twr\\t%3, 0, %%y\\n\\tsdivcc\\t%1, %2, %0\"; else ! return \"sra\\t%1, 31, %3\\n\\twr\\t%3, 0, %%y\\n\\tnop\\n\\tnop\\n\\tnop\\n\\tsdivcc\\t%1, %2, %0\"; ! }" [(set_attr "type" "multi") (set (attr "length") (if_then_else (eq_attr "isa" "v9") --- 5747,5758 ---- (div:SI (match_dup 1) (match_dup 2))) (clobber (match_scratch:SI 3 "=&r"))] "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" { if (TARGET_V9) ! return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tsdivcc\t%1, %2, %0"; else ! return "sra\t%1, 31, %3\n\twr\t%3, 0, %%y\n\tnop\n\tnop\n\tnop\n\tsdivcc\t%1, %2, %0"; ! } [(set_attr "type" "multi") (set (attr "length") (if_then_else (eq_attr "isa" "v9") *************** *** 6340,6358 **** "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) && TARGET_ARCH32" - "* { ! output_asm_insn (\"wr\\t%%g0, %%g0, %%y\", operands); switch (which_alternative) { default: ! return \"nop\\n\\tnop\\n\\tnop\\n\\tudiv\\t%1, %2, %0\"; case 1: ! return \"ld\\t%2, %0\\n\\tnop\\n\\tnop\\n\\tudiv\\t%1, %0, %0\"; case 2: ! return \"ld\\t%1, %0\\n\\tnop\\n\\tnop\\n\\tudiv\\t%0, %2, %0\"; } ! }" [(set_attr "type" "multi") (set_attr "length" "5")]) --- 5773,5790 ---- "(TARGET_V8 || TARGET_DEPRECATED_V8_INSNS) && TARGET_ARCH32" { ! output_asm_insn ("wr\t%%g0, %%g0, %%y", operands); switch (which_alternative) { default: ! return "nop\n\tnop\n\tnop\n\tudiv\t%1, %2, %0"; case 1: ! return "ld\t%2, %0\n\tnop\n\tnop\n\tudiv\t%1, %0, %0"; case 2: ! return "ld\t%1, %0\n\tnop\n\tnop\n\tudiv\t%0, %2, %0"; } ! } [(set_attr "type" "multi") (set_attr "length" "5")]) *************** *** 6361,6367 **** (udiv:SI (match_operand:SI 1 "reg_or_nonsymb_mem_operand" "r") (match_operand:SI 2 "input_operand" "rI")))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "wr\\t%%g0, 0, %%y\\n\\tudiv\\t%1, %2, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 5793,5799 ---- (udiv:SI (match_operand:SI 1 "reg_or_nonsymb_mem_operand" "r") (match_operand:SI 2 "input_operand" "rI")))] "TARGET_DEPRECATED_V8_INSNS && TARGET_ARCH64" ! "wr\t%%g0, 0, %%y\n\tudiv\t%1, %2, %0" [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 6370,6376 **** (udiv:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "udivx\\t%1, %2, %0" [(set_attr "type" "idiv")]) (define_insn "*cmp_udiv_cc_set" --- 5802,5808 ---- (udiv:DI (match_operand:DI 1 "register_operand" "r") (match_operand:DI 2 "arith_double_operand" "rHI")))] "TARGET_ARCH64" ! "udivx\t%1, %2, %0" [(set_attr "type" "idiv")]) (define_insn "*cmp_udiv_cc_set" *************** *** 6382,6394 **** (udiv:SI (match_dup 1) (match_dup 2)))] "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" - "* { if (TARGET_V9) ! return \"wr\\t%%g0, %%g0, %%y\\n\\tudivcc\\t%1, %2, %0\"; else ! return \"wr\\t%%g0, %%g0, %%y\\n\\tnop\\n\\tnop\\n\\tnop\\n\\tudivcc\\t%1, %2, %0\"; ! }" [(set_attr "type" "multi") (set (attr "length") (if_then_else (eq_attr "isa" "v9") --- 5814,5825 ---- (udiv:SI (match_dup 1) (match_dup 2)))] "TARGET_V8 || TARGET_DEPRECATED_V8_INSNS" { if (TARGET_V9) ! return "wr\t%%g0, %%g0, %%y\n\tudivcc\t%1, %2, %0"; else ! return "wr\t%%g0, %%g0, %%y\n\tnop\n\tnop\n\tnop\n\tudivcc\t%1, %2, %0"; ! } [(set_attr "type" "multi") (set (attr "length") (if_then_else (eq_attr "isa" "v9") *************** *** 6402,6408 **** (match_operand:SI 2 "arith_operand" "rI")) (match_operand:SI 3 "register_operand" "0")))] "TARGET_SPARCLET" ! "smac\\t%1, %2, %0" [(set_attr "type" "imul")]) (define_insn "*smacdi" --- 5833,5839 ---- (match_operand:SI 2 "arith_operand" "rI")) (match_operand:SI 3 "register_operand" "0")))] "TARGET_SPARCLET" ! "smac\t%1, %2, %0" [(set_attr "type" "imul")]) (define_insn "*smacdi" *************** *** 6413,6419 **** (match_operand:SI 2 "register_operand" "r"))) (match_operand:DI 3 "register_operand" "0")))] "TARGET_SPARCLET" ! "smacd\\t%1, %2, %L0" [(set_attr "type" "imul")]) (define_insn "*umacdi" --- 5844,5850 ---- (match_operand:SI 2 "register_operand" "r"))) (match_operand:DI 3 "register_operand" "0")))] "TARGET_SPARCLET" ! "smacd\t%1, %2, %L0" [(set_attr "type" "imul")]) (define_insn "*umacdi" *************** *** 6424,6430 **** (match_operand:SI 2 "register_operand" "r"))) (match_operand:DI 3 "register_operand" "0")))] "TARGET_SPARCLET" ! "umacd\\t%1, %2, %L0" [(set_attr "type" "imul")]) ;;- Boolean instructions --- 5855,5861 ---- (match_operand:SI 2 "register_operand" "r"))) (match_operand:DI 3 "register_operand" "0")))] "TARGET_SPARCLET" ! "umacd\t%1, %2, %L0" [(set_attr "type" "imul")]) ;;- Boolean instructions *************** *** 6445,6451 **** "! TARGET_ARCH64" "@ # ! fand\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "length" "2,*") (set_attr "fptype" "double")]) --- 5876,5882 ---- "! TARGET_ARCH64" "@ # ! fand\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "length" "2,*") (set_attr "fptype" "double")]) *************** *** 6456,6463 **** (match_operand:DI 2 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! and\\t%1, %2, %0 ! fand\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) --- 5887,5894 ---- (match_operand:DI 2 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! and\t%1, %2, %0 ! fand\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) *************** *** 6467,6474 **** (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! and\\t%1, %2, %0 ! fands\\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_split --- 5898,5905 ---- (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! and\t%1, %2, %0 ! fands\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_split *************** *** 6481,6490 **** && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (and:SI (not:SI (match_dup 3)) (match_dup 1)))] - " { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }") ;; Split DImode logical operations requiring two instructions. (define_split --- 5912,5920 ---- && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (and:SI (not:SI (match_dup 3)) (match_dup 1)))] { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }) ;; Split DImode logical operations requiring two instructions. (define_split *************** *** 6501,6507 **** && REGNO (SUBREG_REG (operands[0])) < 32))" [(set (match_dup 4) (match_op_dup:SI 1 [(match_dup 6) (match_dup 8)])) (set (match_dup 5) (match_op_dup:SI 1 [(match_dup 7) (match_dup 9)]))] - " { operands[4] = gen_highpart (SImode, operands[0]); operands[5] = gen_lowpart (SImode, operands[0]); --- 5931,5936 ---- *************** *** 6519,6544 **** #endif operands[8] = gen_highpart_mode (SImode, DImode, operands[3]); operands[9] = gen_lowpart (SImode, operands[3]); ! }") ! (define_insn "*and_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (and:DI (not:DI (match_operand:DI 1 "register_operand" "r,b")) (match_operand:DI 2 "register_operand" "r,b")))] "! TARGET_ARCH64" "@ # ! fandnot1\\t%1, %2, %0" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (and:DI (not:DI (match_operand:DI 1 "register_operand" "")) ! (match_operand:DI 2 "register_operand" "")))] ! "! TARGET_ARCH64 ! && reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG --- 5948,5964 ---- #endif operands[8] = gen_highpart_mode (SImode, DImode, operands[3]); operands[9] = gen_lowpart (SImode, operands[3]); ! }) ! (define_insn_and_split "*and_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (and:DI (not:DI (match_operand:DI 1 "register_operand" "r,b")) (match_operand:DI 2 "register_operand" "r,b")))] "! TARGET_ARCH64" "@ # ! fandnot1\t%1, %2, %0" ! "&& reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG *************** *** 6551,6557 **** operands[5] = gen_highpart (SImode, operands[2]); operands[6] = gen_lowpart (SImode, operands[0]); operands[7] = gen_lowpart (SImode, operands[1]); ! operands[8] = gen_lowpart (SImode, operands[2]);") (define_insn "*and_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") --- 5971,5980 ---- operands[5] = gen_highpart (SImode, operands[2]); operands[6] = gen_lowpart (SImode, operands[0]); operands[7] = gen_lowpart (SImode, operands[1]); ! operands[8] = gen_lowpart (SImode, operands[2]);" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) (define_insn "*and_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") *************** *** 6559,6566 **** (match_operand:DI 2 "register_operand" "r,b")))] "TARGET_ARCH64" "@ ! andn\\t%2, %1, %0 ! fandnot1\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) --- 5982,5989 ---- (match_operand:DI 2 "register_operand" "r,b")))] "TARGET_ARCH64" "@ ! andn\t%2, %1, %0 ! fandnot1\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) *************** *** 6570,6577 **** (match_operand:SI 2 "register_operand" "r,d")))] "" "@ ! andn\\t%2, %1, %0 ! fandnot1s\\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_expand "iordi3" --- 5993,6000 ---- (match_operand:SI 2 "register_operand" "r,d")))] "" "@ ! andn\t%2, %1, %0 ! fandnot1s\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_expand "iordi3" *************** *** 6588,6594 **** "! TARGET_ARCH64" "@ # ! for\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "length" "2,*") (set_attr "fptype" "double")]) --- 6011,6017 ---- "! TARGET_ARCH64" "@ # ! for\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "length" "2,*") (set_attr "fptype" "double")]) *************** *** 6599,6606 **** (match_operand:DI 2 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! or\\t%1, %2, %0 ! for\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) --- 6022,6029 ---- (match_operand:DI 2 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! or\t%1, %2, %0 ! for\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) *************** *** 6610,6617 **** (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! or\\t%1, %2, %0 ! fors\\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_split --- 6033,6040 ---- (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! or\t%1, %2, %0 ! fors\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_split *************** *** 6624,6652 **** && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (ior:SI (not:SI (match_dup 3)) (match_dup 1)))] - " { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }") ! (define_insn "*or_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (ior:DI (not:DI (match_operand:DI 1 "register_operand" "r,b")) (match_operand:DI 2 "register_operand" "r,b")))] "! TARGET_ARCH64" "@ # ! fornot1\\t%1, %2, %0" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (ior:DI (not:DI (match_operand:DI 1 "register_operand" "")) ! (match_operand:DI 2 "register_operand" "")))] ! "! TARGET_ARCH64 ! && reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG --- 6047,6065 ---- && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (ior:SI (not:SI (match_dup 3)) (match_dup 1)))] { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }) ! (define_insn_and_split "*or_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (ior:DI (not:DI (match_operand:DI 1 "register_operand" "r,b")) (match_operand:DI 2 "register_operand" "r,b")))] "! TARGET_ARCH64" "@ # ! fornot1\t%1, %2, %0" ! "&& reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG *************** *** 6659,6665 **** operands[5] = gen_highpart (SImode, operands[2]); operands[6] = gen_lowpart (SImode, operands[0]); operands[7] = gen_lowpart (SImode, operands[1]); ! operands[8] = gen_lowpart (SImode, operands[2]);") (define_insn "*or_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") --- 6072,6081 ---- operands[5] = gen_highpart (SImode, operands[2]); operands[6] = gen_lowpart (SImode, operands[0]); operands[7] = gen_lowpart (SImode, operands[1]); ! operands[8] = gen_lowpart (SImode, operands[2]);" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) (define_insn "*or_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") *************** *** 6667,6674 **** (match_operand:DI 2 "register_operand" "r,b")))] "TARGET_ARCH64" "@ ! orn\\t%2, %1, %0 ! fornot1\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) --- 6083,6090 ---- (match_operand:DI 2 "register_operand" "r,b")))] "TARGET_ARCH64" "@ ! orn\t%2, %1, %0 ! fornot1\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) *************** *** 6678,6685 **** (match_operand:SI 2 "register_operand" "r,d")))] "" "@ ! orn\\t%2, %1, %0 ! fornot1s\\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_expand "xordi3" --- 6094,6101 ---- (match_operand:SI 2 "register_operand" "r,d")))] "" "@ ! orn\t%2, %1, %0 ! fornot1s\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_expand "xordi3" *************** *** 6696,6702 **** "! TARGET_ARCH64" "@ # ! fxor\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "length" "2,*") (set_attr "fptype" "double")]) --- 6112,6118 ---- "! TARGET_ARCH64" "@ # ! fxor\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "length" "2,*") (set_attr "fptype" "double")]) *************** *** 6707,6714 **** (match_operand:DI 2 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! xor\\t%r1, %2, %0 ! fxor\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) --- 6123,6130 ---- (match_operand:DI 2 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! xor\t%r1, %2, %0 ! fxor\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) *************** *** 6718,6724 **** (match_operand:DI 2 "const64_operand" "")))] "(TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64)" ! "xor\\t%1, %2, %0") (define_insn "xorsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") --- 6134,6140 ---- (match_operand:DI 2 "const64_operand" "")))] "(TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64)" ! "xor\t%1, %2, %0") (define_insn "xorsi3" [(set (match_operand:SI 0 "register_operand" "=r,d") *************** *** 6726,6733 **** (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! xor\\t%r1, %2, %0 ! fxors\\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_split --- 6142,6149 ---- (match_operand:SI 2 "arith_operand" "rI,d")))] "" "@ ! xor\t%r1, %2, %0 ! fxors\t%1, %2, %0" [(set_attr "type" "*,fp")]) (define_split *************** *** 6740,6749 **** && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (not:SI (xor:SI (match_dup 3) (match_dup 1))))] - " { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }") (define_split [(set (match_operand:SI 0 "register_operand" "") --- 6156,6164 ---- && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (not:SI (xor:SI (match_dup 3) (match_dup 1))))] { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }) (define_split [(set (match_operand:SI 0 "register_operand" "") *************** *** 6755,6785 **** && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (xor:SI (match_dup 3) (match_dup 1)))] - " { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }") ;; xnor patterns. Note that (a ^ ~b) == (~a ^ b) == ~(a ^ b). ;; Combine now canonicalizes to the rightmost expression. ! (define_insn "*xor_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (not:DI (xor:DI (match_operand:DI 1 "register_operand" "r,b") (match_operand:DI 2 "register_operand" "r,b"))))] "! TARGET_ARCH64" "@ # ! fxnor\\t%1, %2, %0" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (not:DI (xor:DI (match_operand:DI 1 "register_operand" "") ! (match_operand:DI 2 "register_operand" ""))))] ! "! TARGET_ARCH64 ! && reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG --- 6170,6190 ---- && (INTVAL (operands[2]) & 0x3ff) == 0x3ff" [(set (match_dup 3) (match_dup 4)) (set (match_dup 0) (xor:SI (match_dup 3) (match_dup 1)))] { operands[4] = GEN_INT (~INTVAL (operands[2])); ! }) ;; xnor patterns. Note that (a ^ ~b) == (~a ^ b) == ~(a ^ b). ;; Combine now canonicalizes to the rightmost expression. ! (define_insn_and_split "*xor_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (not:DI (xor:DI (match_operand:DI 1 "register_operand" "r,b") (match_operand:DI 2 "register_operand" "r,b"))))] "! TARGET_ARCH64" "@ # ! fxnor\t%1, %2, %0" ! "&& reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG *************** *** 6792,6798 **** operands[5] = gen_highpart (SImode, operands[2]); operands[6] = gen_lowpart (SImode, operands[0]); operands[7] = gen_lowpart (SImode, operands[1]); ! operands[8] = gen_lowpart (SImode, operands[2]);") (define_insn "*xor_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") --- 6197,6206 ---- operands[5] = gen_highpart (SImode, operands[2]); operands[6] = gen_lowpart (SImode, operands[0]); operands[7] = gen_lowpart (SImode, operands[1]); ! operands[8] = gen_lowpart (SImode, operands[2]);" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) (define_insn "*xor_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") *************** *** 6800,6807 **** (match_operand:DI 2 "arith_double_operand" "rHI,b"))))] "TARGET_ARCH64" "@ ! xnor\\t%r1, %2, %0 ! fxnor\\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) --- 6208,6215 ---- (match_operand:DI 2 "arith_double_operand" "rHI,b"))))] "TARGET_ARCH64" "@ ! xnor\t%r1, %2, %0 ! fxnor\t%1, %2, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) *************** *** 6811,6818 **** (match_operand:SI 2 "arith_operand" "rI,d"))))] "" "@ ! xnor\\t%r1, %2, %0 ! fxnors\\t%1, %2, %0" [(set_attr "type" "*,fp")]) ;; These correspond to the above in the case where we also (or only) --- 6219,6226 ---- (match_operand:SI 2 "arith_operand" "rI,d"))))] "" "@ ! xnor\t%r1, %2, %0 ! fxnors\t%1, %2, %0" [(set_attr "type" "*,fp")]) ;; These correspond to the above in the case where we also (or only) *************** *** 6826,6832 **** (match_operand:SI 1 "arith_operand" "rI")]) (const_int 0)))] "" ! "%A2cc\\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op" --- 6234,6240 ---- (match_operand:SI 1 "arith_operand" "rI")]) (const_int 0)))] "" ! "%A2cc\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op" *************** *** 6837,6843 **** (match_operand:DI 1 "arith_double_operand" "rHI")]) (const_int 0)))] "TARGET_ARCH64" ! "%A2cc\\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_arith_op_set" --- 6245,6251 ---- (match_operand:DI 1 "arith_double_operand" "rHI")]) (const_int 0)))] "TARGET_ARCH64" ! "%A2cc\t%0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_arith_op_set" *************** *** 6850,6856 **** (set (match_operand:SI 0 "register_operand" "=r") (match_operator:SI 4 "cc_arithop" [(match_dup 1) (match_dup 2)]))] "GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%A3cc\\t%1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op_set" --- 6258,6264 ---- (set (match_operand:SI 0 "register_operand" "=r") (match_operator:SI 4 "cc_arithop" [(match_dup 1) (match_dup 2)]))] "GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%A3cc\t%1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op_set" *************** *** 6863,6869 **** (set (match_operand:DI 0 "register_operand" "=r") (match_operator:DI 4 "cc_arithop" [(match_dup 1) (match_dup 2)]))] "TARGET_ARCH64 && GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%A3cc\\t%1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_xor_not" --- 6271,6277 ---- (set (match_operand:DI 0 "register_operand" "=r") (match_operator:DI 4 "cc_arithop" [(match_dup 1) (match_dup 2)]))] "TARGET_ARCH64 && GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%A3cc\t%1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_xor_not" *************** *** 6873,6879 **** (match_operand:SI 1 "arith_operand" "rI"))) (const_int 0)))] "" ! "xnorcc\\t%r0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_xor_not" --- 6281,6287 ---- (match_operand:SI 1 "arith_operand" "rI"))) (const_int 0)))] "" ! "xnorcc\t%r0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_xor_not" *************** *** 6883,6889 **** (match_operand:DI 1 "arith_double_operand" "rHI"))) (const_int 0)))] "TARGET_ARCH64" ! "xnorcc\\t%r0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_xor_not_set" --- 6291,6297 ---- (match_operand:DI 1 "arith_double_operand" "rHI"))) (const_int 0)))] "TARGET_ARCH64" ! "xnorcc\t%r0, %1, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_xor_not_set" *************** *** 6895,6901 **** (set (match_operand:SI 0 "register_operand" "=r") (not:SI (xor:SI (match_dup 1) (match_dup 2))))] "" ! "xnorcc\\t%r1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_xor_not_set" --- 6303,6309 ---- (set (match_operand:SI 0 "register_operand" "=r") (not:SI (xor:SI (match_dup 1) (match_dup 2))))] "" ! "xnorcc\t%r1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_xor_not_set" *************** *** 6907,6913 **** (set (match_operand:DI 0 "register_operand" "=r") (not:DI (xor:DI (match_dup 1) (match_dup 2))))] "TARGET_ARCH64" ! "xnorcc\\t%r1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_arith_op_not" --- 6315,6321 ---- (set (match_operand:DI 0 "register_operand" "=r") (not:DI (xor:DI (match_dup 1) (match_dup 2))))] "TARGET_ARCH64" ! "xnorcc\t%r1, %2, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_arith_op_not" *************** *** 6918,6924 **** (match_operand:SI 1 "reg_or_0_operand" "rJ")]) (const_int 0)))] "" ! "%B2cc\\t%r1, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op_not" --- 6326,6332 ---- (match_operand:SI 1 "reg_or_0_operand" "rJ")]) (const_int 0)))] "" ! "%B2cc\t%r1, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op_not" *************** *** 6929,6935 **** (match_operand:DI 1 "reg_or_0_operand" "rJ")]) (const_int 0)))] "TARGET_ARCH64" ! "%B2cc\\t%r1, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_arith_op_not_set" --- 6337,6343 ---- (match_operand:DI 1 "reg_or_0_operand" "rJ")]) (const_int 0)))] "TARGET_ARCH64" ! "%B2cc\t%r1, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_arith_op_not_set" *************** *** 6943,6949 **** (match_operator:SI 4 "cc_arithopn" [(not:SI (match_dup 1)) (match_dup 2)]))] "GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%B3cc\\t%r2, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op_not_set" --- 6351,6357 ---- (match_operator:SI 4 "cc_arithopn" [(not:SI (match_dup 1)) (match_dup 2)]))] "GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%B3cc\t%r2, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_arith_op_not_set" *************** *** 6957,6963 **** (match_operator:DI 4 "cc_arithopn" [(not:DI (match_dup 1)) (match_dup 2)]))] "TARGET_ARCH64 && GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%B3cc\\t%r2, %1, %0" [(set_attr "type" "compare")]) ;; We cannot use the "neg" pseudo insn because the Sun assembler --- 6365,6371 ---- (match_operator:DI 4 "cc_arithopn" [(not:DI (match_dup 1)) (match_dup 2)]))] "TARGET_ARCH64 && GET_CODE (operands[3]) == GET_CODE (operands[4])" ! "%B3cc\t%r2, %1, %0" [(set_attr "type" "compare")]) ;; We cannot use the "neg" pseudo insn because the Sun assembler *************** *** 6967,6973 **** [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r")))] "" - " { if (! TARGET_ARCH64) { --- 6375,6380 ---- *************** *** 6981,7002 **** SPARC_ICC_REG))))); DONE; } ! }") ! (define_insn "*negdi2_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r"))) (clobber (reg:CC 100))] "TARGET_ARCH32" "#" ! [(set_attr "length" "2")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (neg:DI (match_operand:DI 1 "register_operand" ""))) ! (clobber (reg:CC 100))] ! "TARGET_ARCH32 ! && reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (const_int 0) (match_dup 5)) (const_int 0))) --- 6388,6402 ---- SPARC_ICC_REG))))); DONE; } ! }) ! (define_insn_and_split "*negdi2_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r"))) (clobber (reg:CC 100))] "TARGET_ARCH32" "#" ! "&& reload_completed" [(parallel [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (const_int 0) (match_dup 5)) (const_int 0))) *************** *** 7006,7031 **** "operands[2] = gen_highpart (SImode, operands[0]); operands[3] = gen_highpart (SImode, operands[1]); operands[4] = gen_lowpart (SImode, operands[0]); ! operands[5] = gen_lowpart (SImode, operands[1]);") (define_insn "*negdi2_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r")))] "TARGET_ARCH64" ! "sub\\t%%g0, %1, %0") (define_insn "negsi2" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (match_operand:SI 1 "arith_operand" "rI")))] "" ! "sub\\t%%g0, %1, %0") (define_insn "*cmp_cc_neg" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_operand:SI 0 "arith_operand" "rI")) (const_int 0)))] "" ! "subcc\\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_neg" --- 6406,6432 ---- "operands[2] = gen_highpart (SImode, operands[0]); operands[3] = gen_highpart (SImode, operands[1]); operands[4] = gen_lowpart (SImode, operands[0]); ! operands[5] = gen_lowpart (SImode, operands[1]);" ! [(set_attr "length" "2")]) (define_insn "*negdi2_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r")))] "TARGET_ARCH64" ! "sub\t%%g0, %1, %0") (define_insn "negsi2" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (match_operand:SI 1 "arith_operand" "rI")))] "" ! "sub\t%%g0, %1, %0") (define_insn "*cmp_cc_neg" [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_operand:SI 0 "arith_operand" "rI")) (const_int 0)))] "" ! "subcc\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_neg" *************** *** 7033,7039 **** (compare:CCX_NOOV (neg:DI (match_operand:DI 0 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "subcc\\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set_neg" --- 6434,6440 ---- (compare:CCX_NOOV (neg:DI (match_operand:DI 0 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "subcc\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set_neg" *************** *** 7043,7049 **** (set (match_operand:SI 0 "register_operand" "=r") (neg:SI (match_dup 1)))] "" ! "subcc\\t%%g0, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_set_neg" --- 6444,6450 ---- (set (match_operand:SI 0 "register_operand" "=r") (neg:SI (match_dup 1)))] "" ! "subcc\t%%g0, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_set_neg" *************** *** 7053,7059 **** (set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_dup 1)))] "TARGET_ARCH64" ! "subcc\\t%%g0, %1, %0" [(set_attr "type" "compare")]) ;; We cannot use the "not" pseudo insn because the Sun assembler --- 6454,6460 ---- (set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_dup 1)))] "TARGET_ARCH64" ! "subcc\t%%g0, %1, %0" [(set_attr "type" "compare")]) ;; We cannot use the "not" pseudo insn because the Sun assembler *************** *** 7064,7085 **** "" "") ! (define_insn "*one_cmpldi2_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (not:DI (match_operand:DI 1 "register_operand" "r,b")))] "! TARGET_ARCH64" "@ # ! fnot1\\t%1, %0" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (not:DI (match_operand:DI 1 "register_operand" "")))] ! "! TARGET_ARCH64 ! && reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG --- 6465,6478 ---- "" "") ! (define_insn_and_split "*one_cmpldi2_sp32" [(set (match_operand:DI 0 "register_operand" "=r,b") (not:DI (match_operand:DI 1 "register_operand" "r,b")))] "! TARGET_ARCH64" "@ # ! fnot1\t%1, %0" ! "&& reload_completed && ((GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) || (GET_CODE (operands[0]) == SUBREG *************** *** 7090,7104 **** "operands[2] = gen_highpart (SImode, operands[0]); operands[3] = gen_highpart (SImode, operands[1]); operands[4] = gen_lowpart (SImode, operands[0]); ! operands[5] = gen_lowpart (SImode, operands[1]);") (define_insn "*one_cmpldi2_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") (not:DI (match_operand:DI 1 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! xnor\\t%%g0, %1, %0 ! fnot1\\t%1, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) --- 6483,6500 ---- "operands[2] = gen_highpart (SImode, operands[0]); operands[3] = gen_highpart (SImode, operands[1]); operands[4] = gen_lowpart (SImode, operands[0]); ! operands[5] = gen_lowpart (SImode, operands[1]);" ! [(set_attr "type" "*,fp") ! (set_attr "length" "2,*") ! (set_attr "fptype" "double")]) (define_insn "*one_cmpldi2_sp64" [(set (match_operand:DI 0 "register_operand" "=r,b") (not:DI (match_operand:DI 1 "arith_double_operand" "rHI,b")))] "TARGET_ARCH64" "@ ! xnor\t%%g0, %1, %0 ! fnot1\t%1, %0" [(set_attr "type" "*,fp") (set_attr "fptype" "double")]) *************** *** 7107,7114 **** (not:SI (match_operand:SI 1 "arith_operand" "rI,d")))] "" "@ ! xnor\\t%%g0, %1, %0 ! fnot1s\\t%1, %0" [(set_attr "type" "*,fp")]) (define_insn "*cmp_cc_not" --- 6503,6510 ---- (not:SI (match_operand:SI 1 "arith_operand" "rI,d")))] "" "@ ! xnor\t%%g0, %1, %0 ! fnot1s\t%1, %0" [(set_attr "type" "*,fp")]) (define_insn "*cmp_cc_not" *************** *** 7116,7122 **** (compare:CC (not:SI (match_operand:SI 0 "arith_operand" "rI")) (const_int 0)))] "" ! "xnorcc\\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_not" --- 6512,6518 ---- (compare:CC (not:SI (match_operand:SI 0 "arith_operand" "rI")) (const_int 0)))] "" ! "xnorcc\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_not" *************** *** 7124,7130 **** (compare:CCX (not:DI (match_operand:DI 0 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "xnorcc\\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set_not" --- 6520,6526 ---- (compare:CCX (not:DI (match_operand:DI 0 "arith_double_operand" "rHI")) (const_int 0)))] "TARGET_ARCH64" ! "xnorcc\t%%g0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set_not" *************** *** 7134,7140 **** (set (match_operand:SI 0 "register_operand" "=r") (not:SI (match_dup 1)))] "" ! "xnorcc\\t%%g0, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_set_not" --- 6530,6536 ---- (set (match_operand:SI 0 "register_operand" "=r") (not:SI (match_dup 1)))] "" ! "xnorcc\t%%g0, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_set_not" *************** *** 7144,7150 **** (set (match_operand:DI 0 "register_operand" "=r") (not:DI (match_dup 1)))] "TARGET_ARCH64" ! "xnorcc\\t%%g0, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set" --- 6540,6546 ---- (set (match_operand:DI 0 "register_operand" "=r") (not:DI (match_dup 1)))] "TARGET_ARCH64" ! "xnorcc\t%%g0, %1, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set" *************** *** 7154,7160 **** (compare:CC (match_dup 1) (const_int 0)))] "" ! "orcc\\t%1, 0, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_set64" --- 6550,6556 ---- (compare:CC (match_dup 1) (const_int 0)))] "" ! "orcc\t%1, 0, %0" [(set_attr "type" "compare")]) (define_insn "*cmp_ccx_set64" *************** *** 7164,7170 **** (compare:CCX (match_dup 1) (const_int 0)))] "TARGET_ARCH64" ! "orcc\\t%1, 0, %0" [(set_attr "type" "compare")]) ;; Floating point arithmetic instructions. --- 6560,6566 ---- (compare:CCX (match_dup 1) (const_int 0)))] "TARGET_ARCH64" ! "orcc\t%1, 0, %0" [(set_attr "type" "compare")]) ;; Floating point arithmetic instructions. *************** *** 7181,7187 **** (plus:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "faddq\\t%1, %2, %0" [(set_attr "type" "fp")]) (define_insn "adddf3" --- 6577,6583 ---- (plus:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "faddq\t%1, %2, %0" [(set_attr "type" "fp")]) (define_insn "adddf3" *************** *** 7189,7195 **** (plus:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "faddd\\t%1, %2, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 6585,6591 ---- (plus:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "faddd\t%1, %2, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 7198,7204 **** (plus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fadds\\t%1, %2, %0" [(set_attr "type" "fp")]) (define_expand "subtf3" --- 6594,6600 ---- (plus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fadds\t%1, %2, %0" [(set_attr "type" "fp")]) (define_expand "subtf3" *************** *** 7213,7219 **** (minus:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fsubq\\t%1, %2, %0" [(set_attr "type" "fp")]) (define_insn "subdf3" --- 6609,6615 ---- (minus:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fsubq\t%1, %2, %0" [(set_attr "type" "fp")]) (define_insn "subdf3" *************** *** 7221,7227 **** (minus:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "fsubd\\t%1, %2, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) --- 6617,6623 ---- (minus:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "fsubd\t%1, %2, %0" [(set_attr "type" "fp") (set_attr "fptype" "double")]) *************** *** 7230,7236 **** (minus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fsubs\\t%1, %2, %0" [(set_attr "type" "fp")]) (define_expand "multf3" --- 6626,6632 ---- (minus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fsubs\t%1, %2, %0" [(set_attr "type" "fp")]) (define_expand "multf3" *************** *** 7245,7251 **** (mult:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fmulq\\t%1, %2, %0" [(set_attr "type" "fpmul")]) (define_insn "muldf3" --- 6641,6647 ---- (mult:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fmulq\t%1, %2, %0" [(set_attr "type" "fpmul")]) (define_insn "muldf3" *************** *** 7253,7259 **** (mult:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "fmuld\\t%1, %2, %0" [(set_attr "type" "fpmul") (set_attr "fptype" "double")]) --- 6649,6655 ---- (mult:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "fmuld\t%1, %2, %0" [(set_attr "type" "fpmul") (set_attr "fptype" "double")]) *************** *** 7262,7268 **** (mult:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fmuls\\t%1, %2, %0" [(set_attr "type" "fpmul")]) (define_insn "*muldf3_extend" --- 6658,6664 ---- (mult:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fmuls\t%1, %2, %0" [(set_attr "type" "fpmul")]) (define_insn "*muldf3_extend" *************** *** 7270,7276 **** (mult:DF (float_extend:DF (match_operand:SF 1 "register_operand" "f")) (float_extend:DF (match_operand:SF 2 "register_operand" "f"))))] "(TARGET_V8 || TARGET_V9) && TARGET_FPU" ! "fsmuld\\t%1, %2, %0" [(set_attr "type" "fpmul") (set_attr "fptype" "double")]) --- 6666,6672 ---- (mult:DF (float_extend:DF (match_operand:SF 1 "register_operand" "f")) (float_extend:DF (match_operand:SF 2 "register_operand" "f"))))] "(TARGET_V8 || TARGET_V9) && TARGET_FPU" ! "fsmuld\t%1, %2, %0" [(set_attr "type" "fpmul") (set_attr "fptype" "double")]) *************** *** 7279,7285 **** (mult:TF (float_extend:TF (match_operand:DF 1 "register_operand" "e")) (float_extend:TF (match_operand:DF 2 "register_operand" "e"))))] "(TARGET_V8 || TARGET_V9) && TARGET_FPU && TARGET_HARD_QUAD" ! "fdmulq\\t%1, %2, %0" [(set_attr "type" "fpmul")]) (define_expand "divtf3" --- 6675,6681 ---- (mult:TF (float_extend:TF (match_operand:DF 1 "register_operand" "e")) (float_extend:TF (match_operand:DF 2 "register_operand" "e"))))] "(TARGET_V8 || TARGET_V9) && TARGET_FPU && TARGET_HARD_QUAD" ! "fdmulq\t%1, %2, %0" [(set_attr "type" "fpmul")]) (define_expand "divtf3" *************** *** 7295,7301 **** (div:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fdivq\\t%1, %2, %0" [(set_attr "type" "fpdivd")]) (define_insn "divdf3" --- 6691,6697 ---- (div:TF (match_operand:TF 1 "register_operand" "e") (match_operand:TF 2 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fdivq\t%1, %2, %0" [(set_attr "type" "fpdivd")]) (define_insn "divdf3" *************** *** 7303,7309 **** (div:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "fdivd\\t%1, %2, %0" [(set_attr "type" "fpdivd") (set_attr "fptype" "double")]) --- 6699,6705 ---- (div:DF (match_operand:DF 1 "register_operand" "e") (match_operand:DF 2 "register_operand" "e")))] "TARGET_FPU" ! "fdivd\t%1, %2, %0" [(set_attr "type" "fpdivd") (set_attr "fptype" "double")]) *************** *** 7312,7318 **** (div:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fdivs\\t%1, %2, %0" [(set_attr "type" "fpdivs")]) (define_expand "negtf2" --- 6708,6714 ---- (div:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] "TARGET_FPU" ! "fdivs\t%1, %2, %0" [(set_attr "type" "fpdivs")]) (define_expand "negtf2" *************** *** 7321,7344 **** "TARGET_FPU" "") ! (define_insn "*negtf2_notv9" [(set (match_operand:TF 0 "register_operand" "=e,e") (neg:TF (match_operand:TF 1 "register_operand" "0,e")))] ; We don't use quad float insns here so we don't need TARGET_HARD_QUAD. "TARGET_FPU && ! TARGET_V9" "@ ! fnegs\\t%0, %0 #" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) ! ! (define_split ! [(set (match_operand:TF 0 "register_operand" "") ! (neg:TF (match_operand:TF 1 "register_operand" "")))] ! "TARGET_FPU ! && ! TARGET_V9 ! && reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (neg:SF (match_dup 3))) (set (match_dup 4) (match_dup 5)) --- 6717,6732 ---- "TARGET_FPU" "") ! (define_insn_and_split "*negtf2_notv9" [(set (match_operand:TF 0 "register_operand" "=e,e") (neg:TF (match_operand:TF 1 "register_operand" "0,e")))] ; We don't use quad float insns here so we don't need TARGET_HARD_QUAD. "TARGET_FPU && ! TARGET_V9" "@ ! fnegs\t%0, %0 #" ! "&& reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (neg:SF (match_dup 3))) (set (match_dup 4) (match_dup 5)) *************** *** 7348,7380 **** operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1); operands[6] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[7] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);") ! (define_insn "*negtf2_v9" [(set (match_operand:TF 0 "register_operand" "=e,e") (neg:TF (match_operand:TF 1 "register_operand" "0,e")))] ; We don't use quad float insns here so we don't need TARGET_HARD_QUAD. "TARGET_FPU && TARGET_V9" "@ ! fnegd\\t%0, %0 #" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2") ! (set_attr "fptype" "double")]) ! ! (define_split ! [(set (match_operand:TF 0 "register_operand" "") ! (neg:TF (match_operand:TF 1 "register_operand" "")))] ! "TARGET_FPU ! && TARGET_V9 ! && reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (neg:DF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (DFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (DFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[5] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);") (define_expand "negdf2" [(set (match_operand:DF 0 "register_operand" "") --- 6736,6764 ---- operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1); operands[6] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[7] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) ! (define_insn_and_split "*negtf2_v9" [(set (match_operand:TF 0 "register_operand" "=e,e") (neg:TF (match_operand:TF 1 "register_operand" "0,e")))] ; We don't use quad float insns here so we don't need TARGET_HARD_QUAD. "TARGET_FPU && TARGET_V9" "@ ! fnegd\t%0, %0 #" ! "&& reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (neg:DF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (DFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (DFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[5] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2") ! (set_attr "fptype" "double")]) (define_expand "negdf2" [(set (match_operand:DF 0 "register_operand" "") *************** *** 7382,7416 **** "TARGET_FPU" "") ! (define_insn "*negdf2_notv9" [(set (match_operand:DF 0 "register_operand" "=e,e") (neg:DF (match_operand:DF 1 "register_operand" "0,e")))] "TARGET_FPU && ! TARGET_V9" "@ ! fnegs\\t%0, %0 #" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) ! ! (define_split ! [(set (match_operand:DF 0 "register_operand" "") ! (neg:DF (match_operand:DF 1 "register_operand" "")))] ! "TARGET_FPU ! && ! TARGET_V9 ! && reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (neg:SF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (SFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (SFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); ! operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1);") (define_insn "*negdf2_v9" [(set (match_operand:DF 0 "register_operand" "=e") (neg:DF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_V9" ! "fnegd\\t%1, %0" [(set_attr "type" "fpmove") (set_attr "fptype" "double")]) --- 6766,6794 ---- "TARGET_FPU" "") ! (define_insn_and_split "*negdf2_notv9" [(set (match_operand:DF 0 "register_operand" "=e,e") (neg:DF (match_operand:DF 1 "register_operand" "0,e")))] "TARGET_FPU && ! TARGET_V9" "@ ! fnegs\t%0, %0 #" ! "&& reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (neg:SF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (SFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (SFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); ! operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1);" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) (define_insn "*negdf2_v9" [(set (match_operand:DF 0 "register_operand" "=e") (neg:DF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_V9" ! "fnegd\t%1, %0" [(set_attr "type" "fpmove") (set_attr "fptype" "double")]) *************** *** 7418,7424 **** [(set (match_operand:SF 0 "register_operand" "=f") (neg:SF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fnegs\\t%1, %0" [(set_attr "type" "fpmove")]) (define_expand "abstf2" --- 6796,6802 ---- [(set (match_operand:SF 0 "register_operand" "=f") (neg:SF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fnegs\t%1, %0" [(set_attr "type" "fpmove")]) (define_expand "abstf2" *************** *** 7427,7449 **** "TARGET_FPU" "") ! (define_insn "*abstf2_notv9" [(set (match_operand:TF 0 "register_operand" "=e,e") (abs:TF (match_operand:TF 1 "register_operand" "0,e")))] ; We don't use quad float insns here so we don't need TARGET_HARD_QUAD. "TARGET_FPU && ! TARGET_V9" "@ ! fabss\\t%0, %0 #" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) ! ! (define_split ! [(set (match_operand:TF 0 "register_operand" "") ! (abs:TF (match_operand:TF 1 "register_operand" "")))] ! "TARGET_FPU ! && ! TARGET_V9 ! && reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (abs:SF (match_dup 3))) (set (match_dup 4) (match_dup 5)) --- 6805,6819 ---- "TARGET_FPU" "") ! (define_insn_and_split "*abstf2_notv9" [(set (match_operand:TF 0 "register_operand" "=e,e") (abs:TF (match_operand:TF 1 "register_operand" "0,e")))] ; We don't use quad float insns here so we don't need TARGET_HARD_QUAD. "TARGET_FPU && ! TARGET_V9" "@ ! fabss\t%0, %0 #" ! "&& reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (abs:SF (match_dup 3))) (set (match_dup 4) (match_dup 5)) *************** *** 7453,7494 **** operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1); operands[6] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[7] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);") (define_insn "*abstf2_hq_v9" [(set (match_operand:TF 0 "register_operand" "=e,e") (abs:TF (match_operand:TF 1 "register_operand" "0,e")))] "TARGET_FPU && TARGET_V9 && TARGET_HARD_QUAD" "@ ! fabsd\\t%0, %0 ! fabsq\\t%1, %0" [(set_attr "type" "fpmove") (set_attr "fptype" "double,*")]) ! (define_insn "*abstf2_v9" [(set (match_operand:TF 0 "register_operand" "=e,e") (abs:TF (match_operand:TF 1 "register_operand" "0,e")))] "TARGET_FPU && TARGET_V9 && !TARGET_HARD_QUAD" "@ ! fabsd\\t%0, %0 #" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2") ! (set_attr "fptype" "double,*")]) ! ! (define_split ! [(set (match_operand:TF 0 "register_operand" "") ! (abs:TF (match_operand:TF 1 "register_operand" "")))] ! "TARGET_FPU ! && TARGET_V9 ! && reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (abs:DF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (DFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (DFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[5] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);") (define_expand "absdf2" [(set (match_operand:DF 0 "register_operand" "") --- 6823,6860 ---- operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1); operands[6] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[7] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) (define_insn "*abstf2_hq_v9" [(set (match_operand:TF 0 "register_operand" "=e,e") (abs:TF (match_operand:TF 1 "register_operand" "0,e")))] "TARGET_FPU && TARGET_V9 && TARGET_HARD_QUAD" "@ ! fabsd\t%0, %0 ! fabsq\t%1, %0" [(set_attr "type" "fpmove") (set_attr "fptype" "double,*")]) ! (define_insn_and_split "*abstf2_v9" [(set (match_operand:TF 0 "register_operand" "=e,e") (abs:TF (match_operand:TF 1 "register_operand" "0,e")))] "TARGET_FPU && TARGET_V9 && !TARGET_HARD_QUAD" "@ ! fabsd\t%0, %0 #" ! "&& reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (abs:DF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (DFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (DFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (DFmode, REGNO (operands[0]) + 2); ! operands[5] = gen_rtx_raw_REG (DFmode, REGNO (operands[1]) + 2);" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2") ! (set_attr "fptype" "double,*")]) (define_expand "absdf2" [(set (match_operand:DF 0 "register_operand" "") *************** *** 7496,7530 **** "TARGET_FPU" "") ! (define_insn "*absdf2_notv9" [(set (match_operand:DF 0 "register_operand" "=e,e") (abs:DF (match_operand:DF 1 "register_operand" "0,e")))] "TARGET_FPU && ! TARGET_V9" "@ ! fabss\\t%0, %0 #" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) ! ! (define_split ! [(set (match_operand:DF 0 "register_operand" "") ! (abs:DF (match_operand:DF 1 "register_operand" "")))] ! "TARGET_FPU ! && ! TARGET_V9 ! && reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (abs:SF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (SFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (SFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); ! operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1);") (define_insn "*absdf2_v9" [(set (match_operand:DF 0 "register_operand" "=e") (abs:DF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_V9" ! "fabsd\\t%1, %0" [(set_attr "type" "fpmove") (set_attr "fptype" "double")]) --- 6862,6890 ---- "TARGET_FPU" "") ! (define_insn_and_split "*absdf2_notv9" [(set (match_operand:DF 0 "register_operand" "=e,e") (abs:DF (match_operand:DF 1 "register_operand" "0,e")))] "TARGET_FPU && ! TARGET_V9" "@ ! fabss\t%0, %0 #" ! "&& reload_completed && sparc_absnegfloat_split_legitimate (operands[0], operands[1])" [(set (match_dup 2) (abs:SF (match_dup 3))) (set (match_dup 4) (match_dup 5))] "operands[2] = gen_rtx_raw_REG (SFmode, REGNO (operands[0])); operands[3] = gen_rtx_raw_REG (SFmode, REGNO (operands[1])); operands[4] = gen_rtx_raw_REG (SFmode, REGNO (operands[0]) + 1); ! operands[5] = gen_rtx_raw_REG (SFmode, REGNO (operands[1]) + 1);" ! [(set_attr "type" "fpmove,*") ! (set_attr "length" "*,2")]) (define_insn "*absdf2_v9" [(set (match_operand:DF 0 "register_operand" "=e") (abs:DF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_V9" ! "fabsd\t%1, %0" [(set_attr "type" "fpmove") (set_attr "fptype" "double")]) *************** *** 7532,7538 **** [(set (match_operand:SF 0 "register_operand" "=f") (abs:SF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fabss\\t%1, %0" [(set_attr "type" "fpmove")]) (define_expand "sqrttf2" --- 6892,6898 ---- [(set (match_operand:SF 0 "register_operand" "=f") (abs:SF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fabss\t%1, %0" [(set_attr "type" "fpmove")]) (define_expand "sqrttf2" *************** *** 7545,7558 **** [(set (match_operand:TF 0 "register_operand" "=e") (sqrt:TF (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fsqrtq\\t%1, %0" [(set_attr "type" "fpsqrtd")]) (define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=e") (sqrt:DF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU" ! "fsqrtd\\t%1, %0" [(set_attr "type" "fpsqrtd") (set_attr "fptype" "double")]) --- 6905,6918 ---- [(set (match_operand:TF 0 "register_operand" "=e") (sqrt:TF (match_operand:TF 1 "register_operand" "e")))] "TARGET_FPU && TARGET_HARD_QUAD" ! "fsqrtq\t%1, %0" [(set_attr "type" "fpsqrtd")]) (define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=e") (sqrt:DF (match_operand:DF 1 "register_operand" "e")))] "TARGET_FPU" ! "fsqrtd\t%1, %0" [(set_attr "type" "fpsqrtd") (set_attr "fptype" "double")]) *************** *** 7560,7566 **** [(set (match_operand:SF 0 "register_operand" "=f") (sqrt:SF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fsqrts\\t%1, %0" [(set_attr "type" "fpsqrts")]) ;;- arithmetic shift instructions --- 6920,6926 ---- [(set (match_operand:SF 0 "register_operand" "=f") (sqrt:SF (match_operand:SF 1 "register_operand" "f")))] "TARGET_FPU" ! "fsqrts\t%1, %0" [(set_attr "type" "fpsqrts")]) ;;- arithmetic shift instructions *************** *** 7570,7600 **** (ashift:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" - "* { ! if (GET_CODE (operands[2]) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 31) ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f); ! ! return \"sll\\t%1, %2, %0\"; ! }" ! [(set_attr "type" "shift")]) ! ! ;; We special case multiplication by two, as add can be done ! ;; in both ALUs, while shift only in IEU0 on UltraSPARC. ! (define_insn "*ashlsi3_const1" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (ashift:SI (match_operand:SI 1 "register_operand" "r") ! (const_int 1)))] ! "" ! "add\\t%1, %1, %0") (define_expand "ashldi3" [(set (match_operand:DI 0 "register_operand" "=r") (ashift:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64 || TARGET_V8PLUS" - " { if (! TARGET_ARCH64) { --- 6930,6949 ---- (ashift:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" { ! if (operands[2] == const1_rtx) ! return "add\t%1, %1, %0"; ! return "sll\t%1, %2, %0"; ! } ! [(set (attr "type") ! (if_then_else (match_operand 2 "const1_operand" "") ! (const_string "ialu") (const_string "shift")))]) (define_expand "ashldi3" [(set (match_operand:DI 0 "register_operand" "=r") (ashift:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64 || TARGET_V8PLUS" { if (! TARGET_ARCH64) { *************** *** 7603,7633 **** emit_insn (gen_ashldi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }") ! ! ;; We special case multiplication by two, as add can be done ! ;; in both ALUs, while shift only in IEU0 on UltraSPARC. ! (define_insn "*ashldi3_const1" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (ashift:DI (match_operand:DI 1 "register_operand" "r") ! (const_int 1)))] ! "TARGET_ARCH64" ! "add\\t%1, %1, %0") (define_insn "*ashldi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (ashift:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" - "* { ! if (GET_CODE (operands[2]) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 63) ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f); ! ! return \"sllx\\t%1, %2, %0\"; ! }" ! [(set_attr "type" "shift")]) ;; XXX UGH! (define_insn "ashldi3_v8plus" --- 6952,6972 ---- emit_insn (gen_ashldi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }) (define_insn "*ashldi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (ashift:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" { ! if (operands[2] == const1_rtx) ! return "add\t%1, %1, %0"; ! return "sllx\t%1, %2, %0"; ! } ! [(set (attr "type") ! (if_then_else (match_operand 2 "const1_operand" "") ! (const_string "ialu") (const_string "shift")))]) ;; XXX UGH! (define_insn "ashldi3_v8plus" *************** *** 7636,7642 **** (match_operand:SI 2 "arith_operand" "rI,rI,rI"))) (clobber (match_scratch:SI 3 "=X,X,&h"))] "TARGET_V8PLUS" ! "*return sparc_v8plus_shift (operands, insn, \"sllx\");" [(set_attr "type" "multi") (set_attr "length" "5,5,6")]) --- 6975,6981 ---- (match_operand:SI 2 "arith_operand" "rI,rI,rI"))) (clobber (match_scratch:SI 3 "=X,X,&h"))] "TARGET_V8PLUS" ! { return sparc_v8plus_shift (operands, insn, "sllx"); } [(set_attr "type" "multi") (set_attr "length" "5,5,6")]) *************** *** 7649,7660 **** ; (match_operand:SI 1 "arith_operand" "rI")) ; (const_int -1)))] ; "0 && TARGET_V8PLUS" - ; "* ;{ ; if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) == REGNO (operands[0])) ! ; return \"mov\\t1, %L0\;sllx\\t%L0, %1, %L0\;sub\\t%L0, 1, %L0\;srlx\\t%L0, 32, %H0\"; ! ; return \"mov\\t1, %H0\;sllx\\t%H0, %1, %L0\;sub\\t%L0, 1, %L0\;srlx\\t%L0, 32, %H0\"; ! ;}" ; [(set_attr "type" "multi") ; (set_attr "length" "4")]) --- 6988,6998 ---- ; (match_operand:SI 1 "arith_operand" "rI")) ; (const_int -1)))] ; "0 && TARGET_V8PLUS" ;{ ; if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) == REGNO (operands[0])) ! ; return "mov\t1, %L0\;sllx\t%L0, %1, %L0\;sub\t%L0, 1, %L0\;srlx\t%L0, 32, %H0"; ! ; return "mov\t1, %H0\;sllx\t%H0, %1, %L0\;sub\t%L0, 1, %L0\;srlx\t%L0, 32, %H0"; ! ;} ; [(set_attr "type" "multi") ; (set_attr "length" "4")]) *************** *** 7664,7670 **** (const_int 1)) (const_int 0)))] "" ! "addcc\\t%0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set_ashift_1" --- 7002,7008 ---- (const_int 1)) (const_int 0)))] "" ! "addcc\t%0, %0, %%g0" [(set_attr "type" "compare")]) (define_insn "*cmp_cc_set_ashift_1" *************** *** 7675,7681 **** (set (match_operand:SI 0 "register_operand" "=r") (ashift:SI (match_dup 1) (const_int 1)))] "" ! "addcc\\t%1, %1, %0" [(set_attr "type" "compare")]) (define_insn "ashrsi3" --- 7013,7019 ---- (set (match_operand:SI 0 "register_operand" "=r") (ashift:SI (match_dup 1) (const_int 1)))] "" ! "addcc\t%1, %1, %0" [(set_attr "type" "compare")]) (define_insn "ashrsi3" *************** *** 7683,7696 **** (ashiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" ! "* ! { ! if (GET_CODE (operands[2]) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 31) ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f); ! ! return \"sra\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) (define_insn "*ashrsi3_extend" --- 7021,7027 ---- (ashiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" ! "sra\t%1, %2, %0" [(set_attr "type" "shift")]) (define_insn "*ashrsi3_extend" *************** *** 7698,7704 **** (sign_extend:DI (ashiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "r"))))] "TARGET_ARCH64" ! "sra\\t%1, %2, %0" [(set_attr "type" "shift")]) ;; This handles the case as above, but with constant shift instead of --- 7029,7035 ---- (sign_extend:DI (ashiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "r"))))] "TARGET_ARCH64" ! "sra\t%1, %2, %0" [(set_attr "type" "shift")]) ;; This handles the case as above, but with constant shift instead of *************** *** 7715,7726 **** && !CONST_DOUBLE_HIGH (operands[2]) && CONST_DOUBLE_LOW (operands[2]) >= 32 && CONST_DOUBLE_LOW (operands[2]) < 64))" - "* { operands[2] = GEN_INT (INTVAL (operands[2]) - 32); ! return \"sra\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) (define_expand "ashrdi3" --- 7046,7056 ---- && !CONST_DOUBLE_HIGH (operands[2]) && CONST_DOUBLE_LOW (operands[2]) >= 32 && CONST_DOUBLE_LOW (operands[2]) < 64))" { operands[2] = GEN_INT (INTVAL (operands[2]) - 32); ! return "sra\t%1, %2, %0"; ! } [(set_attr "type" "shift")]) (define_expand "ashrdi3" *************** *** 7728,7734 **** (ashiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64 || TARGET_V8PLUS" - " { if (! TARGET_ARCH64) { --- 7058,7063 ---- *************** *** 7737,7757 **** emit_insn (gen_ashrdi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }") (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ashiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" ! "* ! { ! if (GET_CODE (operands[2]) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 63) ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f); ! ! return \"srax\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) ;; XXX --- 7066,7079 ---- emit_insn (gen_ashrdi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }) (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ashiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" ! "srax\t%1, %2, %0" [(set_attr "type" "shift")]) ;; XXX *************** *** 7761,7767 **** (match_operand:SI 2 "arith_operand" "rI,rI,rI"))) (clobber (match_scratch:SI 3 "=X,X,&h"))] "TARGET_V8PLUS" ! "*return sparc_v8plus_shift (operands, insn, \"srax\");" [(set_attr "type" "multi") (set_attr "length" "5,5,6")]) --- 7083,7089 ---- (match_operand:SI 2 "arith_operand" "rI,rI,rI"))) (clobber (match_scratch:SI 3 "=X,X,&h"))] "TARGET_V8PLUS" ! { return sparc_v8plus_shift (operands, insn, "srax"); } [(set_attr "type" "multi") (set_attr "length" "5,5,6")]) *************** *** 7770,7783 **** (lshiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" ! "* ! { ! if (GET_CODE (operands[2]) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 31) ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f); ! ! return \"srl\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) ;; This handles the case where --- 7092,7098 ---- (lshiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" ! "srl\t%1, %2, %0" [(set_attr "type" "shift")]) ;; This handles the case where *************** *** 7795,7801 **** || (HOST_BITS_PER_WIDE_INT >= 64 && GET_CODE (operands[3]) == CONST_INT && (unsigned HOST_WIDE_INT) INTVAL (operands[3]) == 0xffffffff))" ! "srl\\t%1, %2, %0" [(set_attr "type" "shift")]) ;; This handles the case where --- 7110,7116 ---- || (HOST_BITS_PER_WIDE_INT >= 64 && GET_CODE (operands[3]) == CONST_INT && (unsigned HOST_WIDE_INT) INTVAL (operands[3]) == 0xffffffff))" ! "srl\t%1, %2, %0" [(set_attr "type" "shift")]) ;; This handles the case where *************** *** 7812,7823 **** || (GET_CODE (operands[2]) == CONST_DOUBLE && CONST_DOUBLE_HIGH (operands[2]) == 0 && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (operands[2]) < 32))" - "* { operands[2] = GEN_INT (32 - INTVAL (operands[2])); ! return \"srl\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) (define_expand "lshrdi3" --- 7127,7137 ---- || (GET_CODE (operands[2]) == CONST_DOUBLE && CONST_DOUBLE_HIGH (operands[2]) == 0 && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (operands[2]) < 32))" { operands[2] = GEN_INT (32 - INTVAL (operands[2])); ! return "srl\t%1, %2, %0"; ! } [(set_attr "type" "shift")]) (define_expand "lshrdi3" *************** *** 7825,7831 **** (lshiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64 || TARGET_V8PLUS" - " { if (! TARGET_ARCH64) { --- 7139,7144 ---- *************** *** 7834,7854 **** emit_insn (gen_lshrdi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }") (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (lshiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" ! "* ! { ! if (GET_CODE (operands[2]) == CONST_INT ! && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 63) ! operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f); ! ! return \"srlx\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) ;; XXX --- 7147,7160 ---- emit_insn (gen_lshrdi3_v8plus (operands[0], operands[1], operands[2])); DONE; } ! }) (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (lshiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" ! "srlx\t%1, %2, %0" [(set_attr "type" "shift")]) ;; XXX *************** *** 7858,7864 **** (match_operand:SI 2 "arith_operand" "rI,rI,rI"))) (clobber (match_scratch:SI 3 "=X,X,&h"))] "TARGET_V8PLUS" ! "*return sparc_v8plus_shift (operands, insn, \"srlx\");" [(set_attr "type" "multi") (set_attr "length" "5,5,6")]) --- 7164,7170 ---- (match_operand:SI 2 "arith_operand" "rI,rI,rI"))) (clobber (match_scratch:SI 3 "=X,X,&h"))] "TARGET_V8PLUS" ! { return sparc_v8plus_shift (operands, insn, "srlx"); } [(set_attr "type" "multi") (set_attr "length" "5,5,6")]) *************** *** 7873,7884 **** || (GET_CODE (operands[2]) == CONST_DOUBLE && !CONST_DOUBLE_HIGH (operands[2]) && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (operands[2]) < 32))" - "* { operands[2] = GEN_INT (INTVAL (operands[2]) + 32); ! return \"srax\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) (define_insn "" --- 7179,7189 ---- || (GET_CODE (operands[2]) == CONST_DOUBLE && !CONST_DOUBLE_HIGH (operands[2]) && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (operands[2]) < 32))" { operands[2] = GEN_INT (INTVAL (operands[2]) + 32); ! return "srax\t%1, %2, %0"; ! } [(set_attr "type" "shift")]) (define_insn "" *************** *** 7892,7903 **** || (GET_CODE (operands[2]) == CONST_DOUBLE && !CONST_DOUBLE_HIGH (operands[2]) && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (operands[2]) < 32))" - "* { operands[2] = GEN_INT (INTVAL (operands[2]) + 32); ! return \"srlx\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) (define_insn "" --- 7197,7207 ---- || (GET_CODE (operands[2]) == CONST_DOUBLE && !CONST_DOUBLE_HIGH (operands[2]) && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (operands[2]) < 32))" { operands[2] = GEN_INT (INTVAL (operands[2]) + 32); ! return "srlx\t%1, %2, %0"; ! } [(set_attr "type" "shift")]) (define_insn "" *************** *** 7910,7921 **** && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) >= 32 && (unsigned HOST_WIDE_INT) INTVAL (operands[3]) < 32 && (unsigned HOST_WIDE_INT) (INTVAL (operands[2]) + INTVAL (operands[3])) < 64" - "* { operands[2] = GEN_INT (INTVAL (operands[2]) + INTVAL (operands[3])); ! return \"srax\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) (define_insn "" --- 7214,7224 ---- && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) >= 32 && (unsigned HOST_WIDE_INT) INTVAL (operands[3]) < 32 && (unsigned HOST_WIDE_INT) (INTVAL (operands[2]) + INTVAL (operands[3])) < 64" { operands[2] = GEN_INT (INTVAL (operands[2]) + INTVAL (operands[3])); ! return "srax\t%1, %2, %0"; ! } [(set_attr "type" "shift")]) (define_insn "" *************** *** 7928,7951 **** && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) >= 32 && (unsigned HOST_WIDE_INT) INTVAL (operands[3]) < 32 && (unsigned HOST_WIDE_INT) (INTVAL (operands[2]) + INTVAL (operands[3])) < 64" - "* { operands[2] = GEN_INT (INTVAL (operands[2]) + INTVAL (operands[3])); ! return \"srlx\\t%1, %2, %0\"; ! }" [(set_attr "type" "shift")]) ;; Unconditional and other jump instructions ! ;; On the Sparc, by setting the annul bit on an unconditional branch, the ;; following insn is never executed. This saves us a nop. Dbx does not ;; handle such branches though, so we only use them when optimizing. (define_insn "jump" [(set (pc) (label_ref (match_operand 0 "" "")))] "" - "* { ! /* TurboSparc is reported to have problems with with foo: b,a foo i.e. an empty loop with the annul bit set. The workaround is to use --- 7231,7252 ---- && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) >= 32 && (unsigned HOST_WIDE_INT) INTVAL (operands[3]) < 32 && (unsigned HOST_WIDE_INT) (INTVAL (operands[2]) + INTVAL (operands[3])) < 64" { operands[2] = GEN_INT (INTVAL (operands[2]) + INTVAL (operands[3])); ! return "srlx\t%1, %2, %0"; ! } [(set_attr "type" "shift")]) ;; Unconditional and other jump instructions ! ;; On the SPARC, by setting the annul bit on an unconditional branch, the ;; following insn is never executed. This saves us a nop. Dbx does not ;; handle such branches though, so we only use them when optimizing. (define_insn "jump" [(set (pc) (label_ref (match_operand 0 "" "")))] "" { ! /* TurboSPARC is reported to have problems with with foo: b,a foo i.e. an empty loop with the annul bit set. The workaround is to use *************** *** 7955,7971 **** if (! TARGET_V9 && flag_delayed_branch && (INSN_ADDRESSES (INSN_UID (operands[0])) == INSN_ADDRESSES (INSN_UID (insn)))) ! return \"b\\t%l0%#\"; else ! return TARGET_V9 ? \"ba%*,pt\\t%%xcc, %l0%(\" : \"b%*\\t%l0%(\"; ! }" [(set_attr "type" "uncond_branch")]) (define_expand "tablejump" [(parallel [(set (pc) (match_operand 0 "register_operand" "r")) (use (label_ref (match_operand 1 "" "")))])] "" - " { if (GET_MODE (operands[0]) != CASE_VECTOR_MODE) abort (); --- 7256,7271 ---- if (! TARGET_V9 && flag_delayed_branch && (INSN_ADDRESSES (INSN_UID (operands[0])) == INSN_ADDRESSES (INSN_UID (insn)))) ! return "b\t%l0%#"; else ! return TARGET_V9 ? "ba%*,pt\t%%xcc, %l0%(" : "b%*\t%l0%("; ! } [(set_attr "type" "uncond_branch")]) (define_expand "tablejump" [(parallel [(set (pc) (match_operand 0 "register_operand" "r")) (use (label_ref (match_operand 1 "" "")))])] "" { if (GET_MODE (operands[0]) != CASE_VECTOR_MODE) abort (); *************** *** 7983,8002 **** tmp = gen_rtx_PLUS (Pmode, tmp2, tmp); operands[0] = memory_address (Pmode, tmp); } ! }") (define_insn "*tablejump_sp32" [(set (pc) (match_operand:SI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] "! TARGET_ARCH64" ! "jmp\\t%a0%#" [(set_attr "type" "uncond_branch")]) (define_insn "*tablejump_sp64" [(set (pc) (match_operand:DI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] "TARGET_ARCH64" ! "jmp\\t%a0%#" [(set_attr "type" "uncond_branch")]) ;; This pattern recognizes the "instruction" that appears in --- 7283,7302 ---- tmp = gen_rtx_PLUS (Pmode, tmp2, tmp); operands[0] = memory_address (Pmode, tmp); } ! }) (define_insn "*tablejump_sp32" [(set (pc) (match_operand:SI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] "! TARGET_ARCH64" ! "jmp\t%a0%#" [(set_attr "type" "uncond_branch")]) (define_insn "*tablejump_sp64" [(set (pc) (match_operand:DI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] "TARGET_ARCH64" ! "jmp\t%a0%#" [(set_attr "type" "uncond_branch")]) ;; This pattern recognizes the "instruction" that appears in *************** *** 8005,8011 **** ;(define_insn "*unimp_insn" ; [(match_operand:SI 0 "immediate_operand" "")] ; "GET_CODE (operands[0]) == CONST_INT && INTVAL (operands[0]) > 0" ! ; "unimp\\t%0" ; [(set_attr "type" "marker")]) ;;- jump to subroutine --- 7305,7311 ---- ;(define_insn "*unimp_insn" ; [(match_operand:SI 0 "immediate_operand" "")] ; "GET_CODE (operands[0]) == CONST_INT && INTVAL (operands[0]) > 0" ! ; "unimp\t%0" ; [(set_attr "type" "marker")]) ;;- jump to subroutine *************** *** 8017,8023 **** ;; operands[2] is next_arg_register ;; operands[3] is struct_value_size_rtx. "" - " { rtx fn_rtx, nregs_rtx; --- 7317,7322 ---- *************** *** 8091,8097 **** #endif DONE; ! }") ;; We can't use the same pattern for these two insns, because then registers ;; in the address may not be properly reloaded. --- 7390,7396 ---- #endif DONE; ! }) ;; We can't use the same pattern for these two insns, because then registers ;; in the address may not be properly reloaded. *************** *** 8102,8108 **** (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64" ! "call\\t%a0, %1%#" [(set_attr "type" "call")]) (define_insn "*call_symbolic_sp32" --- 7401,7407 ---- (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64" ! "call\t%a0, %1%#" [(set_attr "type" "call")]) (define_insn "*call_symbolic_sp32" *************** *** 8111,8117 **** (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64" ! "call\\t%a0, %1%#" [(set_attr "type" "call")]) (define_insn "*call_address_sp64" --- 7410,7416 ---- (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64" ! "call\t%a0, %1%#" [(set_attr "type" "call")]) (define_insn "*call_address_sp64" *************** *** 8120,8126 **** (clobber (reg:DI 15))] ;;- Do not use operand 1 for most machines. "TARGET_ARCH64" ! "call\\t%a0, %1%#" [(set_attr "type" "call")]) (define_insn "*call_symbolic_sp64" --- 7419,7425 ---- (clobber (reg:DI 15))] ;;- Do not use operand 1 for most machines. "TARGET_ARCH64" ! "call\t%a0, %1%#" [(set_attr "type" "call")]) (define_insn "*call_symbolic_sp64" *************** *** 8129,8135 **** (clobber (reg:DI 15))] ;;- Do not use operand 1 for most machines. "TARGET_ARCH64" ! "call\\t%a0, %1%#" [(set_attr "type" "call")]) ;; This is a call that wants a structure value. --- 7428,7434 ---- (clobber (reg:DI 15))] ;;- Do not use operand 1 for most machines. "TARGET_ARCH64" ! "call\t%a0, %1%#" [(set_attr "type" "call")]) ;; This is a call that wants a structure value. *************** *** 8141,8147 **** (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0" ! "call\\t%a0, %1\\n\\tnop\\n\\tunimp\\t%2" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) --- 7440,7446 ---- (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0" ! "call\t%a0, %1\n\tnop\n\tunimp\t%2" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) *************** *** 8154,8160 **** (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0" ! "call\\t%a0, %1\\n\\tnop\\n\\tunimp\\t%2" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) --- 7453,7459 ---- (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0" ! "call\t%a0, %1\n\tnop\n\tunimp\t%2" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) *************** *** 8167,8173 **** (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0" ! "call\\t%a0, %1\\n\\tnop\\n\\tnop" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) --- 7466,7472 ---- (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0" ! "call\t%a0, %1\n\tnop\n\tnop" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) *************** *** 8179,8185 **** (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0" ! "call\\t%a0, %1\\n\\tnop\\n\\tnop" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) --- 7478,7484 ---- (clobber (reg:SI 15))] ;;- Do not use operand 1 for most machines. "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0" ! "call\t%a0, %1\n\tnop\n\tnop" [(set_attr "type" "call_no_delay_slot") (set_attr "length" "3")]) *************** *** 8192,8198 **** ;; operand 2 is stack_size_rtx ;; operand 3 is next_arg_register "" - " { rtx fn_rtx, nregs_rtx; rtvec vec; --- 7491,7496 ---- *************** *** 8219,8225 **** emit_call_insn (gen_rtx_PARALLEL (VOIDmode, vec)); DONE; ! }") (define_insn "*call_value_address_sp32" [(set (match_operand 0 "" "=rf") --- 7517,7523 ---- emit_call_insn (gen_rtx_PARALLEL (VOIDmode, vec)); DONE; ! }) (define_insn "*call_value_address_sp32" [(set (match_operand 0 "" "=rf") *************** *** 8228,8234 **** (clobber (reg:SI 15))] ;;- Do not use operand 2 for most machines. "! TARGET_ARCH64" ! "call\\t%a1, %2%#" [(set_attr "type" "call")]) (define_insn "*call_value_symbolic_sp32" --- 7526,7532 ---- (clobber (reg:SI 15))] ;;- Do not use operand 2 for most machines. "! TARGET_ARCH64" ! "call\t%a1, %2%#" [(set_attr "type" "call")]) (define_insn "*call_value_symbolic_sp32" *************** *** 8238,8244 **** (clobber (reg:SI 15))] ;;- Do not use operand 2 for most machines. "! TARGET_ARCH64" ! "call\\t%a1, %2%#" [(set_attr "type" "call")]) (define_insn "*call_value_address_sp64" --- 7536,7542 ---- (clobber (reg:SI 15))] ;;- Do not use operand 2 for most machines. "! TARGET_ARCH64" ! "call\t%a1, %2%#" [(set_attr "type" "call")]) (define_insn "*call_value_address_sp64" *************** *** 8248,8254 **** (clobber (reg:DI 15))] ;;- Do not use operand 2 for most machines. "TARGET_ARCH64" ! "call\\t%a1, %2%#" [(set_attr "type" "call")]) (define_insn "*call_value_symbolic_sp64" --- 7546,7552 ---- (clobber (reg:DI 15))] ;;- Do not use operand 2 for most machines. "TARGET_ARCH64" ! "call\t%a1, %2%#" [(set_attr "type" "call")]) (define_insn "*call_value_symbolic_sp64" *************** *** 8258,8264 **** (clobber (reg:DI 15))] ;;- Do not use operand 2 for most machines. "TARGET_ARCH64" ! "call\\t%a1, %2%#" [(set_attr "type" "call")]) (define_expand "untyped_call" --- 7556,7562 ---- (clobber (reg:DI 15))] ;;- Do not use operand 2 for most machines. "TARGET_ARCH64" ! "call\t%a1, %2%#" [(set_attr "type" "call")]) (define_expand "untyped_call" *************** *** 8267,8273 **** (match_operand 1 "" "") (match_operand 2 "" "")])] "" - " { int i; --- 7565,7570 ---- *************** *** 8288,8294 **** emit_insn (gen_blockage ()); DONE; ! }") ;;- tail calls (define_expand "sibcall" --- 7585,7591 ---- emit_insn (gen_blockage ()); DONE; ! }) ;;- tail calls (define_expand "sibcall" *************** *** 8347,8353 **** ;; all of memory. This blocks insns from being moved across this point. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] 0)] "" "" [(set_attr "length" "0")]) --- 7644,7650 ---- ;; all of memory. This blocks insns from being moved across this point. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] "" "" [(set_attr "length" "0")]) *************** *** 8358,8364 **** [(match_operand:BLK 0 "memory_operand" "") (match_operand 1 "" "")] "" - " { rtx valreg1 = gen_rtx_REG (DImode, 24); rtx valreg2 = gen_rtx_REG (TARGET_ARCH64 ? TFmode : DFmode, 32); --- 7655,7660 ---- *************** *** 8392,8407 **** expand_null_return (); DONE; ! }") ;; This is a bit of a hack. We're incrementing a fixed register (%i7), ;; and parts of the compiler don't want to believe that the add is needed. (define_insn "update_return" [(unspec:SI [(match_operand:SI 0 "register_operand" "r") ! (match_operand:SI 1 "register_operand" "r")] 1)] "! TARGET_ARCH64" ! "cmp\\t%1, 0\;be,a\\t.+8\;add\\t%0, 4, %0" [(set_attr "type" "multi") (set_attr "length" "3")]) --- 7688,7703 ---- expand_null_return (); DONE; ! }) ;; This is a bit of a hack. We're incrementing a fixed register (%i7), ;; and parts of the compiler don't want to believe that the add is needed. (define_insn "update_return" [(unspec:SI [(match_operand:SI 0 "register_operand" "r") ! (match_operand:SI 1 "register_operand" "r")] UNSPEC_UPDATE_RETURN)] "! TARGET_ARCH64" ! "cmp\t%1, 0\;be,a\t.+8\;add\t%0, 4, %0" [(set_attr "type" "multi") (set_attr "length" "3")]) *************** *** 8418,8430 **** (define_insn "*branch_sp32" [(set (pc) (match_operand:SI 0 "address_operand" "p"))] "! TARGET_ARCH64" ! "jmp\\t%a0%#" [(set_attr "type" "uncond_branch")]) (define_insn "*branch_sp64" [(set (pc) (match_operand:DI 0 "address_operand" "p"))] "TARGET_ARCH64" ! "jmp\\t%a0%#" [(set_attr "type" "uncond_branch")]) ;; ??? Doesn't work with -mflat. --- 7714,7726 ---- (define_insn "*branch_sp32" [(set (pc) (match_operand:SI 0 "address_operand" "p"))] "! TARGET_ARCH64" ! "jmp\t%a0%#" [(set_attr "type" "uncond_branch")]) (define_insn "*branch_sp64" [(set (pc) (match_operand:DI 0 "address_operand" "p"))] "TARGET_ARCH64" ! "jmp\t%a0%#" [(set_attr "type" "uncond_branch")]) ;; ??? Doesn't work with -mflat. *************** *** 8434,8440 **** (match_operand:SI 2 "general_operand" "") (match_operand:SI 3 "" "")] "" - " { #if 0 rtx chain = operands[0]; --- 7730,7735 ---- *************** *** 8488,8528 **** emit_jump_insn (gen_goto_handler_and_restore (labreg)); emit_barrier (); DONE; ! }") ;; Special trap insn to flush register windows. (define_insn "flush_register_windows" ! [(unspec_volatile [(const_int 0)] 1)] "" ! "* return TARGET_V9 ? \"flushw\" : \"ta\\t3\";" ! [(set_attr "type" "misc")]) (define_insn "goto_handler_and_restore" ! [(unspec_volatile [(match_operand 0 "register_operand" "=r")] 2)] "GET_MODE (operands[0]) == Pmode" ! "jmp\\t%0+0\\n\\trestore" [(set_attr "type" "multi") (set_attr "length" "2")]) ;;(define_insn "goto_handler_and_restore_v9" ;; [(unspec_volatile [(match_operand:SI 0 "register_operand" "=r,r") ;; (match_operand:SI 1 "register_operand" "=r,r") ! ;; (match_operand:SI 2 "const_int_operand" "I,n")] 3)] ;; "TARGET_V9 && ! TARGET_ARCH64" ;; "@ ! ;; return\\t%0+0\\n\\tmov\\t%2, %Y1 ! ;; sethi\\t%%hi(%2), %1\\n\\treturn\\t%0+0\\n\\tor\\t%Y1, %%lo(%2), %Y1" ;; [(set_attr "type" "multi") ;; (set_attr "length" "2,3")]) ;; ;;(define_insn "*goto_handler_and_restore_v9_sp64" ;; [(unspec_volatile [(match_operand:DI 0 "register_operand" "=r,r") ;; (match_operand:DI 1 "register_operand" "=r,r") ! ;; (match_operand:SI 2 "const_int_operand" "I,n")] 3)] ;; "TARGET_V9 && TARGET_ARCH64" ;; "@ ! ;; return\\t%0+0\\n\\tmov\\t%2, %Y1 ! ;; sethi\\t%%hi(%2), %1\\n\\treturn\\t%0+0\\n\\tor\\t%Y1, %%lo(%2), %Y1" ;; [(set_attr "type" "multi") ;; (set_attr "length" "2,3")]) --- 7783,7823 ---- emit_jump_insn (gen_goto_handler_and_restore (labreg)); emit_barrier (); DONE; ! }) ;; Special trap insn to flush register windows. (define_insn "flush_register_windows" ! [(unspec_volatile [(const_int 0)] UNSPECV_FLUSHW)] "" ! { return TARGET_V9 ? "flushw" : "ta\t3"; } ! [(set_attr "type" "flushw")]) (define_insn "goto_handler_and_restore" ! [(unspec_volatile [(match_operand 0 "register_operand" "=r")] UNSPECV_GOTO)] "GET_MODE (operands[0]) == Pmode" ! "jmp\t%0+0\n\trestore" [(set_attr "type" "multi") (set_attr "length" "2")]) ;;(define_insn "goto_handler_and_restore_v9" ;; [(unspec_volatile [(match_operand:SI 0 "register_operand" "=r,r") ;; (match_operand:SI 1 "register_operand" "=r,r") ! ;; (match_operand:SI 2 "const_int_operand" "I,n")] UNSPECV_GOTO_V9)] ;; "TARGET_V9 && ! TARGET_ARCH64" ;; "@ ! ;; return\t%0+0\n\tmov\t%2, %Y1 ! ;; sethi\t%%hi(%2), %1\n\treturn\t%0+0\n\tor\t%Y1, %%lo(%2), %Y1" ;; [(set_attr "type" "multi") ;; (set_attr "length" "2,3")]) ;; ;;(define_insn "*goto_handler_and_restore_v9_sp64" ;; [(unspec_volatile [(match_operand:DI 0 "register_operand" "=r,r") ;; (match_operand:DI 1 "register_operand" "=r,r") ! ;; (match_operand:SI 2 "const_int_operand" "I,n")] UNSPECV_GOTO_V9)] ;; "TARGET_V9 && TARGET_ARCH64" ;; "@ ! ;; return\t%0+0\n\tmov\t%2, %Y1 ! ;; sethi\t%%hi(%2), %1\n\treturn\t%0+0\n\tor\t%Y1, %%lo(%2), %Y1" ;; [(set_attr "type" "multi") ;; (set_attr "length" "2,3")]) *************** *** 8532,8578 **** (define_expand "builtin_setjmp_setup" [(match_operand 0 "register_operand" "r")] "" - " { emit_insn (gen_do_builtin_setjmp_setup ()); DONE; ! }") (define_insn "do_builtin_setjmp_setup" ! [(unspec_volatile [(const_int 0)] 5)] "" - "* { ! if (! current_function_calls_alloca || ! TARGET_V9 || TARGET_FLAT) ! return \"#\"; ! fputs (\"\tflushw\n\", asm_out_file); if (flag_pic) ! fprintf (asm_out_file, \"\tst%c\t%%l7, [%%sp+%d]\n\", TARGET_ARCH64 ? 'x' : 'w', SPARC_STACK_BIAS + 7 * UNITS_PER_WORD); ! fprintf (asm_out_file, \"\tst%c\t%%fp, [%%sp+%d]\n\", TARGET_ARCH64 ? 'x' : 'w', SPARC_STACK_BIAS + 14 * UNITS_PER_WORD); ! fprintf (asm_out_file, \"\tst%c\t%%i7, [%%sp+%d]\n\", TARGET_ARCH64 ? 'x' : 'w', SPARC_STACK_BIAS + 15 * UNITS_PER_WORD); ! return \"\"; ! }" ! [(set_attr "type" "misc") ! (set (attr "length") (if_then_else (eq_attr "pic" "true") ! (const_int 4) ! (const_int 3)))]) ! ! (define_split ! [(unspec_volatile [(const_int 0)] 5)] ! "! current_function_calls_alloca || ! TARGET_V9 || TARGET_FLAT" ! [(const_int 0)] ! " ! { ! if (current_function_calls_alloca) ! emit_insn (gen_flush_register_windows ()); ! DONE; ! }") ;; Pattern for use after a setjmp to store FP and the return register ;; into the stack area. --- 7827,7868 ---- (define_expand "builtin_setjmp_setup" [(match_operand 0 "register_operand" "r")] "" { emit_insn (gen_do_builtin_setjmp_setup ()); DONE; ! }) (define_insn "do_builtin_setjmp_setup" ! [(unspec_volatile [(const_int 0)] UNSPECV_SETJMP)] "" { ! if (! current_function_calls_alloca) ! return ""; ! if (! TARGET_V9 || TARGET_FLAT) ! return "\tta\t3\n"; ! fputs ("\tflushw\n", asm_out_file); if (flag_pic) ! fprintf (asm_out_file, "\tst%c\t%%l7, [%%sp+%d]\n", TARGET_ARCH64 ? 'x' : 'w', SPARC_STACK_BIAS + 7 * UNITS_PER_WORD); ! fprintf (asm_out_file, "\tst%c\t%%fp, [%%sp+%d]\n", TARGET_ARCH64 ? 'x' : 'w', SPARC_STACK_BIAS + 14 * UNITS_PER_WORD); ! fprintf (asm_out_file, "\tst%c\t%%i7, [%%sp+%d]\n", TARGET_ARCH64 ? 'x' : 'w', SPARC_STACK_BIAS + 15 * UNITS_PER_WORD); ! return ""; ! } ! [(set_attr "type" "multi") ! (set (attr "length") ! (cond [(eq_attr "current_function_calls_alloca" "false") ! (const_int 0) ! (eq_attr "flat" "true") ! (const_int 1) ! (eq_attr "isa" "!v9") ! (const_int 1) ! (eq_attr "pic" "true") ! (const_int 4)] (const_int 3)))]) ;; Pattern for use after a setjmp to store FP and the return register ;; into the stack area. *************** *** 8580,8607 **** (define_expand "setjmp" [(const_int 0)] "" - " { if (TARGET_ARCH64) emit_insn (gen_setjmp_64 ()); else emit_insn (gen_setjmp_32 ()); DONE; ! }") (define_expand "setjmp_32" [(set (mem:SI (plus:SI (reg:SI 14) (const_int 56))) (match_dup 0)) (set (mem:SI (plus:SI (reg:SI 14) (const_int 60))) (reg:SI 31))] "" ! " ! { operands[0] = frame_pointer_rtx; }") (define_expand "setjmp_64" [(set (mem:DI (plus:DI (reg:DI 14) (const_int 112))) (match_dup 0)) (set (mem:DI (plus:DI (reg:DI 14) (const_int 120))) (reg:DI 31))] "" ! " ! { operands[0] = frame_pointer_rtx; }") ;; Special pattern for the FLUSH instruction. --- 7870,7894 ---- (define_expand "setjmp" [(const_int 0)] "" { if (TARGET_ARCH64) emit_insn (gen_setjmp_64 ()); else emit_insn (gen_setjmp_32 ()); DONE; ! }) (define_expand "setjmp_32" [(set (mem:SI (plus:SI (reg:SI 14) (const_int 56))) (match_dup 0)) (set (mem:SI (plus:SI (reg:SI 14) (const_int 60))) (reg:SI 31))] "" ! { operands[0] = frame_pointer_rtx; }) (define_expand "setjmp_64" [(set (mem:DI (plus:DI (reg:DI 14) (const_int 112))) (match_dup 0)) (set (mem:DI (plus:DI (reg:DI 14) (const_int 120))) (reg:DI 31))] "" ! { operands[0] = frame_pointer_rtx; }) ;; Special pattern for the FLUSH instruction. *************** *** 8611,8626 **** ; it on SImode mem values. (define_insn "flush" ! [(unspec_volatile [(match_operand:SI 0 "memory_operand" "m")] 3)] "" ! "* return TARGET_V9 ? \"flush\\t%f0\" : \"iflush\\t%f0\";" ! [(set_attr "type" "misc")]) (define_insn "flushdi" ! [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] 3)] "" ! "* return TARGET_V9 ? \"flush\\t%f0\" : \"iflush\\t%f0\";" ! [(set_attr "type" "misc")]) ;; find first set. --- 7898,7913 ---- ; it on SImode mem values. (define_insn "flush" ! [(unspec_volatile [(match_operand:SI 0 "memory_operand" "m")] UNSPECV_FLUSH)] "" ! { return TARGET_V9 ? "flush\t%f0" : "iflush\t%f0"; } ! [(set_attr "type" "iflush")]) (define_insn "flushdi" ! [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_FLUSH)] "" ! { return TARGET_V9 ? "flush\t%f0" : "iflush\t%f0"; } ! [(set_attr "type" "iflush")]) ;; find first set. *************** *** 8636,8652 **** (ffs:SI (match_operand:SI 1 "register_operand" "r"))) (clobber (match_scratch:SI 2 "=&r"))] "TARGET_SPARCLITE || TARGET_SPARCLET" - "* { ! return \"sub\\t%%g0, %1, %0\;and\\t%0, %1, %0\;scan\\t%0, 0, %0\;mov\\t32, %2\;sub\\t%2, %0, %0\;sra\\t%0, 31, %2\;and\\t%2, 31, %2\;add\\t%2, %0, %0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "8")]) ;; ??? This should be a define expand, so that the extra instruction have ;; a chance of being optimized away. ! ;; Disabled because none of the UltraSparcs implement popc. The HAL R1 ;; does, but no one uses that and we don't have a switch for it. ; ;(define_insn "ffsdi2" --- 7923,7938 ---- (ffs:SI (match_operand:SI 1 "register_operand" "r"))) (clobber (match_scratch:SI 2 "=&r"))] "TARGET_SPARCLITE || TARGET_SPARCLET" { ! return "sub\t%%g0, %1, %0\;and\t%0, %1, %0\;scan\t%0, 0, %0\;mov\t32, %2\;sub\t%2, %0, %0\;sra\t%0, 31, %2\;and\t%2, 31, %2\;add\t%2, %0, %0"; ! } [(set_attr "type" "multi") (set_attr "length" "8")]) ;; ??? This should be a define expand, so that the extra instruction have ;; a chance of being optimized away. ! ;; Disabled because none of the UltraSPARCs implement popc. The HAL R1 ;; does, but no one uses that and we don't have a switch for it. ; ;(define_insn "ffsdi2" *************** *** 8654,8660 **** ; (ffs:DI (match_operand:DI 1 "register_operand" "r"))) ; (clobber (match_scratch:DI 2 "=&r"))] ; "TARGET_ARCH64" ! ; "neg\\t%1, %2\;xnor\\t%1, %2, %2\;popc\\t%2, %0\;movzr\\t%1, 0, %0" ; [(set_attr "type" "multi") ; (set_attr "length" "4")]) --- 7940,7946 ---- ; (ffs:DI (match_operand:DI 1 "register_operand" "r"))) ; (clobber (match_scratch:DI 2 "=&r"))] ; "TARGET_ARCH64" ! ; "neg\t%1, %2\;xnor\t%1, %2, %2\;popc\t%2, %0\;movzr\t%1, 0, %0" ; [(set_attr "type" "multi") ; (set_attr "length" "4")]) *************** *** 8828,8843 **** (match_operand:QI 1 "arith_operand" "rI")) (return)] "sparc_emitting_epilogue" - "* { if (! TARGET_ARCH64 && current_function_returns_struct) ! return \"jmp\\t%%i7+12\\n\\trestore %%g0, %1, %Y0\"; else if (TARGET_V9 && (GET_CODE (operands[1]) == CONST_INT || IN_OR_GLOBAL_P (operands[1]))) ! return \"return\\t%%i7+8\\n\\tmov\\t%Y1, %Y0\"; else ! return \"ret\\n\\trestore %%g0, %1, %Y0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 8114,8128 ---- (match_operand:QI 1 "arith_operand" "rI")) (return)] "sparc_emitting_epilogue" { if (! TARGET_ARCH64 && current_function_returns_struct) ! return "jmp\t%%i7+12\n\trestore %%g0, %1, %Y0"; else if (TARGET_V9 && (GET_CODE (operands[1]) == CONST_INT || IN_OR_GLOBAL_P (operands[1]))) ! return "return\t%%i7+8\n\tmov\t%Y1, %Y0"; else ! return "ret\n\trestore %%g0, %1, %Y0"; ! } [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 8846,8861 **** (match_operand:HI 1 "arith_operand" "rI")) (return)] "sparc_emitting_epilogue" - "* { if (! TARGET_ARCH64 && current_function_returns_struct) ! return \"jmp\\t%%i7+12\\n\\trestore %%g0, %1, %Y0\"; else if (TARGET_V9 && (GET_CODE (operands[1]) == CONST_INT || IN_OR_GLOBAL_P (operands[1]))) ! return \"return\\t%%i7+8\\n\\tmov\\t%Y1, %Y0\"; else ! return \"ret\;restore %%g0, %1, %Y0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 8131,8145 ---- (match_operand:HI 1 "arith_operand" "rI")) (return)] "sparc_emitting_epilogue" { if (! TARGET_ARCH64 && current_function_returns_struct) ! return "jmp\t%%i7+12\n\trestore %%g0, %1, %Y0"; else if (TARGET_V9 && (GET_CODE (operands[1]) == CONST_INT || IN_OR_GLOBAL_P (operands[1]))) ! return "return\t%%i7+8\n\tmov\t%Y1, %Y0"; else ! return "ret\;restore %%g0, %1, %Y0"; ! } [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 8864,8879 **** (match_operand:SI 1 "arith_operand" "rI")) (return)] "sparc_emitting_epilogue" - "* { if (! TARGET_ARCH64 && current_function_returns_struct) ! return \"jmp\\t%%i7+12\\n\\trestore %%g0, %1, %Y0\"; else if (TARGET_V9 && (GET_CODE (operands[1]) == CONST_INT || IN_OR_GLOBAL_P (operands[1]))) ! return \"return\\t%%i7+8\\n\\tmov\\t%Y1, %Y0\"; else ! return \"ret\;restore %%g0, %1, %Y0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 8148,8162 ---- (match_operand:SI 1 "arith_operand" "rI")) (return)] "sparc_emitting_epilogue" { if (! TARGET_ARCH64 && current_function_returns_struct) ! return "jmp\t%%i7+12\n\trestore %%g0, %1, %Y0"; else if (TARGET_V9 && (GET_CODE (operands[1]) == CONST_INT || IN_OR_GLOBAL_P (operands[1]))) ! return "return\t%%i7+8\n\tmov\t%Y1, %Y0"; else ! return "ret\;restore %%g0, %1, %Y0"; ! } [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 8882,8896 **** (match_operand:SF 1 "register_operand" "r")) (return)] "sparc_emitting_epilogue" - "* { if (! TARGET_ARCH64 && current_function_returns_struct) ! return \"jmp\\t%%i7+12\\n\\trestore %%g0, %1, %Y0\"; else if (TARGET_V9 && IN_OR_GLOBAL_P (operands[1])) ! return \"return\\t%%i7+8\\n\\tmov\\t%Y1, %Y0\"; else ! return \"ret\;restore %%g0, %1, %Y0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 8165,8178 ---- (match_operand:SF 1 "register_operand" "r")) (return)] "sparc_emitting_epilogue" { if (! TARGET_ARCH64 && current_function_returns_struct) ! return "jmp\t%%i7+12\n\trestore %%g0, %1, %Y0"; else if (TARGET_V9 && IN_OR_GLOBAL_P (operands[1])) ! return "return\t%%i7+8\n\tmov\t%Y1, %Y0"; else ! return "ret\;restore %%g0, %1, %Y0"; ! } [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 8899,8911 **** (match_operand:DF 1 "register_operand" "r")) (return)] "sparc_emitting_epilogue && TARGET_ARCH64" - "* { if (IN_OR_GLOBAL_P (operands[1])) ! return \"return\\t%%i7+8\\n\\tmov\\t%Y1, %Y0\"; else ! return \"ret\;restore %%g0, %1, %Y0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 8181,8192 ---- (match_operand:DF 1 "register_operand" "r")) (return)] "sparc_emitting_epilogue && TARGET_ARCH64" { if (IN_OR_GLOBAL_P (operands[1])) ! return "return\t%%i7+8\n\tmov\t%Y1, %Y0"; else ! return "ret\;restore %%g0, %1, %Y0"; ! } [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 8915,8932 **** (match_operand:SI 2 "arith_operand" "rI"))) (return)] "sparc_emitting_epilogue" - "* { if (! TARGET_ARCH64 && current_function_returns_struct) ! return \"jmp\\t%%i7+12\\n\\trestore %r1, %2, %Y0\"; /* If operands are global or in registers, can use return */ else if (TARGET_V9 && IN_OR_GLOBAL_P (operands[1]) && (GET_CODE (operands[2]) == CONST_INT || IN_OR_GLOBAL_P (operands[2]))) ! return \"return\\t%%i7+8\\n\\tadd\\t%Y1, %Y2, %Y0\"; else ! return \"ret\;restore %r1, %2, %Y0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 8196,8212 ---- (match_operand:SI 2 "arith_operand" "rI"))) (return)] "sparc_emitting_epilogue" { if (! TARGET_ARCH64 && current_function_returns_struct) ! return "jmp\t%%i7+12\n\trestore %r1, %2, %Y0"; /* If operands are global or in registers, can use return */ else if (TARGET_V9 && IN_OR_GLOBAL_P (operands[1]) && (GET_CODE (operands[2]) == CONST_INT || IN_OR_GLOBAL_P (operands[2]))) ! return "return\t%%i7+8\n\tadd\t%Y1, %Y2, %Y0"; else ! return "ret\;restore %r1, %2, %Y0"; ! } [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 8936,8951 **** (match_operand:SI 2 "immediate_operand" "in"))) (return)] "sparc_emitting_epilogue && ! TARGET_CM_MEDMID" - "* { if (! TARGET_ARCH64 && current_function_returns_struct) ! return \"jmp\\t%%i7+12\\n\\trestore %r1, %%lo(%a2), %Y0\"; /* If operands are global or in registers, can use return */ else if (TARGET_V9 && IN_OR_GLOBAL_P (operands[1])) ! return \"return\\t%%i7+8\\n\\tor\\t%Y1, %%lo(%a2), %Y0\"; else ! return \"ret\;restore %r1, %%lo(%a2), %Y0\"; ! }" [(set_attr "type" "multi") (set_attr "length" "2")]) --- 8216,8230 ---- (match_operand:SI 2 "immediate_operand" "in"))) (return)] "sparc_emitting_epilogue && ! TARGET_CM_MEDMID" { if (! TARGET_ARCH64 && current_function_returns_struct) ! return "jmp\t%%i7+12\n\trestore %r1, %%lo(%a2), %Y0"; /* If operands are global or in registers, can use return */ else if (TARGET_V9 && IN_OR_GLOBAL_P (operands[1])) ! return "return\t%%i7+8\n\tor\t%Y1, %%lo(%a2), %Y0"; else ! return "ret\;restore %r1, %%lo(%a2), %Y0"; ! } [(set_attr "type" "multi") (set_attr "length" "2")]) *************** *** 8983,8996 **** (match_operand:SF 0 "register_operand" "f")) (return)] "sparc_emitting_epilogue" ! "ret\;fmovs\\t%0, %%f0" [(set_attr "type" "multi") (set_attr "length" "2")]) ;; Now peepholes to do a call followed by a jump. - ;; Do not match this on V9 and later processors, which have a call-return - ;; stack as this corrupts it and causes the code to run slower not faster. - ;; There are not TARGET_ARCH64 patterns because that implies TARGET_V9. (define_peephole [(parallel [(set (match_operand 0 "" "") --- 8262,8272 ---- (match_operand:SF 0 "register_operand" "f")) (return)] "sparc_emitting_epilogue" ! "ret\;fmovs\t%0, %%f0" [(set_attr "type" "multi") (set_attr "length" "2")]) ;; Now peepholes to do a call followed by a jump. (define_peephole [(parallel [(set (match_operand 0 "" "") *************** *** 8998,9017 **** (match_operand 2 "" ""))) (clobber (reg:SI 15))]) (set (pc) (label_ref (match_operand 3 "" "")))] ! "! TARGET_V9 ! && short_branch (INSN_UID (insn), INSN_UID (operands[3])) ! && (USING_SJLJ_EXCEPTIONS || ! can_throw_internal (ins1))" ! "call\\t%a1, %2\\n\\tadd\\t%%o7, (%l3-.-4), %%o7") (define_peephole [(parallel [(call (mem:SI (match_operand:SI 0 "call_operand_address" "ps")) (match_operand 1 "" "")) (clobber (reg:SI 15))]) (set (pc) (label_ref (match_operand 2 "" "")))] ! "! TARGET_V9 ! && short_branch (INSN_UID (insn), INSN_UID (operands[2])) ! && (USING_SJLJ_EXCEPTIONS || ! can_throw_internal (ins1))" ! "call\\t%a0, %1\\n\\tadd\\t%%o7, (%l2-.-4), %%o7") ;; ??? UltraSPARC-III note: A memory operation loading into the floating point register ;; ??? file, if it hits the prefetch cache, has a chance to dual-issue with other memory --- 8274,8295 ---- (match_operand 2 "" ""))) (clobber (reg:SI 15))]) (set (pc) (label_ref (match_operand 3 "" "")))] ! "short_branch (INSN_UID (insn), INSN_UID (operands[3])) ! && (USING_SJLJ_EXCEPTIONS || ! can_throw_internal (ins1)) ! && sparc_cpu != PROCESSOR_ULTRASPARC ! && sparc_cpu != PROCESSOR_ULTRASPARC3" ! "call\t%a1, %2\n\tadd\t%%o7, (%l3-.-4), %%o7") (define_peephole [(parallel [(call (mem:SI (match_operand:SI 0 "call_operand_address" "ps")) (match_operand 1 "" "")) (clobber (reg:SI 15))]) (set (pc) (label_ref (match_operand 2 "" "")))] ! "short_branch (INSN_UID (insn), INSN_UID (operands[2])) ! && (USING_SJLJ_EXCEPTIONS || ! can_throw_internal (ins1)) ! && sparc_cpu != PROCESSOR_ULTRASPARC ! && sparc_cpu != PROCESSOR_ULTRASPARC3" ! "call\t%a0, %1\n\tadd\t%%o7, (%l2-.-4), %%o7") ;; ??? UltraSPARC-III note: A memory operation loading into the floating point register ;; ??? file, if it hits the prefetch cache, has a chance to dual-issue with other memory *************** *** 9022,9035 **** (match_operand 1 "const_int_operand" "") (match_operand 2 "const_int_operand" "")] "TARGET_V9" - " { if (TARGET_ARCH64) emit_insn (gen_prefetch_64 (operands[0], operands[1], operands[2])); else emit_insn (gen_prefetch_32 (operands[0], operands[1], operands[2])); DONE; ! }") (define_insn "prefetch_64" [(prefetch (match_operand:DI 0 "address_operand" "p") --- 8300,8312 ---- (match_operand 1 "const_int_operand" "") (match_operand 2 "const_int_operand" "")] "TARGET_V9" { if (TARGET_ARCH64) emit_insn (gen_prefetch_64 (operands[0], operands[1], operands[2])); else emit_insn (gen_prefetch_32 (operands[0], operands[1], operands[2])); DONE; ! }) (define_insn "prefetch_64" [(prefetch (match_operand:DI 0 "address_operand" "p") *************** *** 9039,9050 **** { static const char * const prefetch_instr[2][2] = { { ! "prefetch\\t[%a0], 1", /* no locality: prefetch for one read */ ! "prefetch\\t[%a0], 0", /* medium to high locality: prefetch for several reads */ }, { ! "prefetch\\t[%a0], 3", /* no locality: prefetch for one write */ ! "prefetch\\t[%a0], 2", /* medium to high locality: prefetch for several writes */ } }; int read_or_write = INTVAL (operands[1]); --- 8316,8327 ---- { static const char * const prefetch_instr[2][2] = { { ! "prefetch\t[%a0], 1", /* no locality: prefetch for one read */ ! "prefetch\t[%a0], 0", /* medium to high locality: prefetch for several reads */ }, { ! "prefetch\t[%a0], 3", /* no locality: prefetch for one write */ ! "prefetch\t[%a0], 2", /* medium to high locality: prefetch for several writes */ } }; int read_or_write = INTVAL (operands[1]); *************** *** 9066,9077 **** { static const char * const prefetch_instr[2][2] = { { ! "prefetch\\t[%a0], 1", /* no locality: prefetch for one read */ ! "prefetch\\t[%a0], 0", /* medium to high locality: prefetch for several reads */ }, { ! "prefetch\\t[%a0], 3", /* no locality: prefetch for one write */ ! "prefetch\\t[%a0], 2", /* medium to high locality: prefetch for several writes */ } }; int read_or_write = INTVAL (operands[1]); --- 8343,8354 ---- { static const char * const prefetch_instr[2][2] = { { ! "prefetch\t[%a0], 1", /* no locality: prefetch for one read */ ! "prefetch\t[%a0], 0", /* medium to high locality: prefetch for several reads */ }, { ! "prefetch\t[%a0], 3", /* no locality: prefetch for one write */ ! "prefetch\t[%a0], 2", /* medium to high locality: prefetch for several writes */ } }; int read_or_write = INTVAL (operands[1]); *************** *** 9088,9098 **** (define_expand "prologue" [(const_int 1)] "flag_pic && current_function_uses_pic_offset_table" - " { load_pic_register (); DONE; ! }") ;; We need to reload %l7 for -mflat -fpic, ;; otherwise %l7 should be preserved simply --- 8365,8374 ---- (define_expand "prologue" [(const_int 1)] "flag_pic && current_function_uses_pic_offset_table" { load_pic_register (); DONE; ! }) ;; We need to reload %l7 for -mflat -fpic, ;; otherwise %l7 should be preserved simply *************** *** 9100,9126 **** (define_expand "exception_receiver" [(const_int 0)] "TARGET_FLAT && flag_pic" - " { load_pic_register (); DONE; ! }") ;; Likewise (define_expand "builtin_setjmp_receiver" [(label_ref (match_operand 0 "" ""))] "TARGET_FLAT && flag_pic" - " { load_pic_register (); DONE; ! }") (define_insn "trap" [(trap_if (const_int 1) (const_int 5))] "" ! "ta\\t5" ! [(set_attr "type" "misc")]) (define_expand "conditional_trap" [(trap_if (match_operator 0 "noov_compare_op" --- 8376,8400 ---- (define_expand "exception_receiver" [(const_int 0)] "TARGET_FLAT && flag_pic" { load_pic_register (); DONE; ! }) ;; Likewise (define_expand "builtin_setjmp_receiver" [(label_ref (match_operand 0 "" ""))] "TARGET_FLAT && flag_pic" { load_pic_register (); DONE; ! }) (define_insn "trap" [(trap_if (const_int 1) (const_int 5))] "" ! "ta\t5" ! [(set_attr "type" "trap")]) (define_expand "conditional_trap" [(trap_if (match_operator 0 "noov_compare_op" *************** *** 9135,9146 **** [(trap_if (match_operator 0 "noov_compare_op" [(reg:CC 100) (const_int 0)]) (match_operand:SI 1 "arith_operand" "rM"))] "" ! "t%C0\\t%1" ! [(set_attr "type" "misc")]) (define_insn "" [(trap_if (match_operator 0 "noov_compare_op" [(reg:CCX 100) (const_int 0)]) (match_operand:SI 1 "arith_operand" "rM"))] "TARGET_V9" ! "t%C0\\t%%xcc, %1" ! [(set_attr "type" "misc")]) --- 8409,8420 ---- [(trap_if (match_operator 0 "noov_compare_op" [(reg:CC 100) (const_int 0)]) (match_operand:SI 1 "arith_operand" "rM"))] "" ! "t%C0\t%1" ! [(set_attr "type" "trap")]) (define_insn "" [(trap_if (match_operator 0 "noov_compare_op" [(reg:CCX 100) (const_int 0)]) (match_operand:SI 1 "arith_operand" "rM"))] "TARGET_V9" ! "t%C0\t%%xcc, %1" ! [(set_attr "type" "trap")]) diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sparc-modes.def gcc-3.3/gcc/config/sparc/sparc-modes.def *** gcc-3.2.3/gcc/config/sparc/sparc-modes.def 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sparc-modes.def 2002-09-15 12:03:42.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + /* Definitions of target machine for GNU compiler, for Sun SPARC. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com). + 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, + at Cygnus Support. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Add any extra modes needed to represent the condition code. + + On the SPARC, we have a "no-overflow" mode which is used when an add or + subtract insn is used to set the condition code. Different branches are + used in this case for some operations. + + We also have two modes to indicate that the relevant condition code is + in the floating-point condition code register. One for comparisons which + will generate an exception if the result is unordered (CCFPEmode) and + one for comparisons which will never trap (CCFPmode). + + CCXmode and CCX_NOOVmode are only used by v9. */ + + CC (CCX) + CC (CC_NOOV) + CC (CCX_NOOV) + CC (CCFP) + CC (CCFPE) + diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sparc-protos.h gcc-3.3/gcc/config/sparc/sparc-protos.h *** gcc-3.2.3/gcc/config/sparc/sparc-protos.h 2002-05-26 02:42:21.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sparc-protos.h 2002-10-20 22:37:13.000000000 +0000 *************** extern int function_arg_pass_by_referenc *** 42,48 **** extern struct rtx_def *sparc_builtin_saveregs PARAMS ((void)); #ifdef RTX_CODE extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int)); ! extern void sparc_va_start PARAMS ((int, tree, rtx)); #endif extern struct rtx_def *sparc_va_arg PARAMS ((tree, tree)); extern unsigned long sparc_type_code PARAMS ((tree)); --- 42,48 ---- extern struct rtx_def *sparc_builtin_saveregs PARAMS ((void)); #ifdef RTX_CODE extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int)); ! extern void sparc_va_start PARAMS ((tree, rtx)); #endif extern struct rtx_def *sparc_va_arg PARAMS ((tree, tree)); extern unsigned long sparc_type_code PARAMS ((tree)); *************** extern int fp_zero_operand PARAMS ((rtx, *** 102,108 **** extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode)); extern int empty_delay_slot PARAMS ((rtx)); extern int eligible_for_epilogue_delay PARAMS ((rtx, int)); - extern int eligible_for_return_delay PARAMS ((rtx)); extern int eligible_for_sibcall_delay PARAMS ((rtx)); extern int emit_move_sequence PARAMS ((rtx, enum machine_mode)); extern int fp_sethi_p PARAMS ((rtx)); --- 102,107 ---- *************** extern char *sparc_v8plus_shift PARAMS ( *** 121,128 **** extern int sparc_check_64 PARAMS ((rtx, rtx)); extern rtx gen_df_reg PARAMS ((rtx, int)); extern int sparc_extra_constraint_check PARAMS ((rtx, int, int)); #endif /* RTX_CODE */ - extern void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree)); - #endif /* __SPARC_PROTOS_H__ */ --- 120,126 ---- extern int sparc_check_64 PARAMS ((rtx, rtx)); extern rtx gen_df_reg PARAMS ((rtx, int)); extern int sparc_extra_constraint_check PARAMS ((rtx, int, int)); + extern int sparc_rtx_costs PARAMS ((rtx, enum rtx_code, enum rtx_code)); #endif /* RTX_CODE */ #endif /* __SPARC_PROTOS_H__ */ diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sunos4.h gcc-3.3/gcc/config/sparc/sunos4.h *** gcc-3.2.3/gcc/config/sparc/sunos4.h 2001-12-17 07:33:07.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sunos4.h 2002-05-18 23:47:21.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 41,46 **** --- 41,48 ---- /* SunOS has on_exit instead of atexit. */ /* The man page says it returns int. */ + #ifdef IN_LIBGCC2 extern int on_exit PARAMS ((void *, void *)); + #endif #define ON_EXIT(FUNC) on_exit ((FUNC), 0) #define NEED_ATEXIT diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/supersparc.md gcc-3.3/gcc/config/sparc/supersparc.md *** gcc-3.2.3/gcc/config/sparc/supersparc.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/supersparc.md 2002-09-15 12:03:42.000000000 +0000 *************** *** 0 **** --- 1,93 ---- + ;; Scheduling description for SuperSPARC. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; The SuperSPARC is a tri-issue, which was considered quite parallel + ;; at the time it was released. Much like UltraSPARC-I and UltraSPARC-II + ;; there are two integer units but only one of them may take shifts. + ;; + ;; ??? If SuperSPARC has the same slotting rules as ultrasparc for these + ;; ??? shifts, we should model that. + + (define_automaton "supersparc_0,supersparc_1") + + (define_cpu_unit "ss_memory, ss_shift, ss_iwport0, ss_iwport1" "supersparc_0") + (define_cpu_unit "ss_fpalu" "supersparc_0") + (define_cpu_unit "ss_fpmds" "supersparc_1") + + (define_reservation "ss_iwport" "(ss_iwport0 | ss_iwport1)") + + (define_insn_reservation "ss_iuload" 1 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "load,sload")) + "ss_memory") + + ;; Ok, fpu loads deliver the result in zero cycles. But we + ;; have to show the ss_memory reservation somehow, thus... + (define_insn_reservation "ss_fpload" 0 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "fpload")) + "ss_memory") + + (define_bypass 0 "ss_fpload" "ss_fp_alu,ss_fp_mult,ss_fp_divs,ss_fp_divd,ss_fp_sqrt") + + (define_insn_reservation "ss_store" 1 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "store,fpstore")) + "ss_memory") + + (define_insn_reservation "ss_ialu_shift" 1 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "shift")) + "ss_shift + ss_iwport") + + (define_insn_reservation "ss_ialu_any" 1 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "load,sload,store,shift,ialu")) + "ss_iwport") + + (define_insn_reservation "ss_fp_alu" 3 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "fp,fpmove,fpcmp")) + "ss_fpalu, nothing*2") + + (define_insn_reservation "ss_fp_mult" 3 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "fpmul")) + "ss_fpmds, nothing*2") + + (define_insn_reservation "ss_fp_divs" 6 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "fpdivs")) + "ss_fpmds*4, nothing*2") + + (define_insn_reservation "ss_fp_divd" 9 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "fpdivd")) + "ss_fpmds*7, nothing*2") + + (define_insn_reservation "ss_fp_sqrt" 12 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "fpsqrts,fpsqrtd")) + "ss_fpmds*10, nothing*2") + + (define_insn_reservation "ss_imul" 4 + (and (eq_attr "cpu" "supersparc") + (eq_attr "type" "imul")) + "ss_fpmds*4") diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/sysv4.h gcc-3.3/gcc/config/sparc/sysv4.h *** gcc-3.2.3/gcc/config/sparc/sysv4.h 2001-12-17 15:05:39.000000000 +0000 --- gcc-3.3/gcc/config/sparc/sysv4.h 2002-09-15 12:03:42.000000000 +0000 *************** *** 1,5 **** ! /* Target definitions for GNU compiler for Sparc running System V.4 ! Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com). --- 1,5 ---- ! /* Target definitions for GNU compiler for SPARC running System V.4 ! Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com). *************** Boston, MA 02111-1307, USA. */ *** 36,46 **** /* Undefined some symbols which are defined in "svr4.h" but which are appropriate only for typical svr4 systems, but not for the specific ! case of svr4 running on a Sparc. */ #undef INIT_SECTION_ASM_OP #undef FINI_SECTION_ASM_OP ! #undef CONST_SECTION_ASM_OP #undef TYPE_OPERAND_FMT #undef PUSHSECTION_FORMAT #undef STRING_ASM_OP --- 36,46 ---- /* Undefined some symbols which are defined in "svr4.h" but which are appropriate only for typical svr4 systems, but not for the specific ! case of svr4 running on a SPARC. */ #undef INIT_SECTION_ASM_OP #undef FINI_SECTION_ASM_OP ! #undef READONLY_DATA_SECTION_ASM_OP #undef TYPE_OPERAND_FMT #undef PUSHSECTION_FORMAT #undef STRING_ASM_OP *************** Boston, MA 02111-1307, USA. */ *** 49,55 **** #undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */ /* Provide a set of pre-definitions and pre-assertions appropriate for ! the Sparc running svr4. __svr4__ is our extension. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES \ --- 49,55 ---- #undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */ /* Provide a set of pre-definitions and pre-assertions appropriate for ! the SPARC running svr4. __svr4__ is our extension. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES \ *************** Boston, MA 02111-1307, USA. */ *** 68,87 **** "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{fpic:-K PIC} %{fPIC:-K PIC} %(asm_cpu)" ! /* Must use data section for relocatable constants when pic. */ ! #undef SELECT_RTX_SECTION ! #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \ ! { \ ! if (flag_pic && symbolic_operand ((RTX), (MODE))) \ ! data_section (); \ ! else \ ! const_section (); \ ! } ! ! /* Define the names of various pseudo-op used by the Sparc/svr4 assembler. Note that many of these are different from the typical pseudo-ops used by most svr4 assemblers. That is probably due to a (misguided?) attempt ! to keep the Sparc/svr4 assembler somewhat compatible with the Sparc/SunOS assembler. */ #define STRING_ASM_OP "\t.asciz\t" --- 68,77 ---- "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{fpic:-K PIC} %{fPIC:-K PIC} %(asm_cpu)" ! /* Define the names of various pseudo-op used by the SPARC/svr4 assembler. Note that many of these are different from the typical pseudo-ops used by most svr4 assemblers. That is probably due to a (misguided?) attempt ! to keep the SPARC/svr4 assembler somewhat compatible with the SPARC/SunOS assembler. */ #define STRING_ASM_OP "\t.asciz\t" *************** Boston, MA 02111-1307, USA. */ *** 91,102 **** #define POPSECTION_ASM_OP "\t.popsection" /* This is the format used to print the second operand of a .type pseudo-op ! for the Sparc/svr4 assembler. */ #define TYPE_OPERAND_FMT "#%s" /* This is the format used to print a .pushsection pseudo-op (and its operand) ! for the Sparc/svr4 assembler. */ #define PUSHSECTION_FORMAT "%s\"%s\"\n" --- 81,92 ---- #define POPSECTION_ASM_OP "\t.popsection" /* This is the format used to print the second operand of a .type pseudo-op ! for the SPARC/svr4 assembler. */ #define TYPE_OPERAND_FMT "#%s" /* This is the format used to print a .pushsection pseudo-op (and its operand) ! for the SPARC/svr4 assembler. */ #define PUSHSECTION_FORMAT "%s\"%s\"\n" *************** do { ASM_OUTPUT_ALIGN ((FILE), Pmode == *** 118,126 **** fprintf (FILE, "\n"); \ } while (0) ! /* Define how the Sparc registers should be numbered for Dwarf output. The numbering provided here should be compatible with the native ! svr4 SDB debugger in the Sparc/svr4 reference port. The numbering is as follows: Assembly name gcc internal regno Dwarf regno --- 108,116 ---- fprintf (FILE, "\n"); \ } while (0) ! /* Define how the SPARC registers should be numbered for Dwarf output. The numbering provided here should be compatible with the native ! svr4 SDB debugger in the SPARC/svr4 reference port. The numbering is as follows: Assembly name gcc internal regno Dwarf regno *************** do { ASM_OUTPUT_ALIGN ((FILE), Pmode == *** 143,149 **** #define TEXT_SECTION_ASM_OP "\t.section\t\".text\"" #define DATA_SECTION_ASM_OP "\t.section\t\".data\"" #define BSS_SECTION_ASM_OP "\t.section\t\".bss\"" ! #define CONST_SECTION_ASM_OP "\t.section\t\".rodata\"" #define INIT_SECTION_ASM_OP "\t.section\t\".init\"" #define FINI_SECTION_ASM_OP "\t.section\t\".fini\"" --- 133,139 ---- #define TEXT_SECTION_ASM_OP "\t.section\t\".text\"" #define DATA_SECTION_ASM_OP "\t.section\t\".data\"" #define BSS_SECTION_ASM_OP "\t.section\t\".bss\"" ! #define READONLY_DATA_SECTION_ASM_OP "\t.section\t\".rodata\"" #define INIT_SECTION_ASM_OP "\t.section\t\".init\"" #define FINI_SECTION_ASM_OP "\t.section\t\".fini\"" diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/ultra1_2.md gcc-3.3/gcc/config/sparc/ultra1_2.md *** gcc-3.2.3/gcc/config/sparc/ultra1_2.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/ultra1_2.md 2002-09-14 13:12:56.000000000 +0000 *************** *** 0 **** --- 1,252 ---- + ;; Scheduling description for UltraSPARC-I/II. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; UltraSPARC-I and II are quad-issue processors. Interesting features + ;; to note: + ;; + ;; - Buffered loads, they can queue waiting for the actual data until + ;; an instruction actually tries to reference the destination register + ;; as an input + ;; - Two integer units. Only one of them can do shifts, and the other + ;; is the only one which may do condition code setting instructions. + ;; Complicating things further, a shift may go only into the first + ;; slot in a dispatched group. And if you have a non-condition code + ;; setting instruction and one that does set the condition codes. The + ;; former must be issued first in order for both of them to issue. + ;; - Stores can issue before the value being stored is available. As long + ;; as the input data becomes ready before the store is to move out of the + ;; store buffer, it will not cause a stall. + ;; - Branches may issue in the same cycle as an instruction setting the + ;; condition codes being tested by that branch. This does not apply + ;; to floating point, only integer. + + (define_automaton "ultrasparc_0,ultrasparc_1") + + (define_cpu_unit "us1_fdivider,us1_fpm" "ultrasparc_0"); + (define_cpu_unit "us1_fpa,us1_load_writeback" "ultrasparc_1") + (define_cpu_unit "us1_fps_0,us1_fps_1,us1_fpd_0,us1_fpd_1" "ultrasparc_1") + (define_cpu_unit "us1_slot0,us1_slot1,us1_slot2,us1_slot3" "ultrasparc_1") + (define_cpu_unit "us1_ieu0,us1_ieu1,us1_cti,us1_lsu" "ultrasparc_1") + + (define_reservation "us1_slot012" "(us1_slot0 | us1_slot1 | us1_slot2)") + (define_reservation "us1_slotany" "(us1_slot0 | us1_slot1 | us1_slot2 | us1_slot3)") + (define_reservation "us1_single_issue" "us1_slot0 + us1_slot1 + us1_slot2 + us1_slot3") + + (define_reservation "us1_fp_single" "(us1_fps_0 | us1_fps_1)") + (define_reservation "us1_fp_double" "(us1_fpd_0 | us1_fpd_1)") + + ;; This is a simplified representation of the issue at hand. + ;; For most cases, going from one FP precision type insn to another + ;; just breaks up the insn group. However for some cases, such + ;; a situation causes the second insn to stall 2 more cycles. + (exclusion_set "us1_fps_0,us1_fps_1" "us1_fpd_0,us1_fpd_1") + + ;; If we have to schedule an ieu1 specific instruction and we want + ;; to reserve the ieu0 unit as well, we must reserve it first. So for + ;; example we could not schedule this sequence: + ;; COMPARE IEU1 + ;; IALU IEU0 + ;; but we could schedule them together like this: + ;; IALU IEU0 + ;; COMPARE IEU1 + ;; This basically requires that ieu0 is reserved before ieu1 when + ;; it is required that both be reserved. + (absence_set "us1_ieu0" "us1_ieu1") + + ;; This defines the slotting order. Most IEU instructions can only + ;; execute in the first three slots, FPU and branches can go into + ;; any slot. We represent instructions which "break the group" + ;; as requiring reservation of us1_slot0. + (absence_set "us1_slot0" "us1_slot1,us1_slot2,us1_slot3") + (absence_set "us1_slot1" "us1_slot2,us1_slot3") + (absence_set "us1_slot2" "us1_slot3") + + (define_insn_reservation "us1_single" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "multi,flushw,iflush,trap")) + "us1_single_issue") + + (define_insn_reservation "us1_simple_ieuN" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "ialu")) + "(us1_ieu0 | us1_ieu1) + us1_slot012") + + (define_insn_reservation "us1_simple_ieu0" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "shift")) + "us1_ieu0 + us1_slot012") + + (define_insn_reservation "us1_simple_ieu1" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "compare")) + "us1_ieu1 + us1_slot012") + + (define_insn_reservation "us1_ialuX" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "ialuX")) + "us1_single_issue") + + (define_insn_reservation "us1_cmove" 2 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "cmove")) + "us1_single_issue, nothing") + + (define_insn_reservation "us1_imul" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "imul")) + "us1_single_issue") + + (define_insn_reservation "us1_idiv" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "idiv")) + "us1_single_issue") + + ;; For loads, the "delayed return mode" behavior of the chip + ;; is represented using the us1_load_writeback resource. + (define_insn_reservation "us1_load" 2 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "load,fpload")) + "us1_lsu + us1_slot012, us1_load_writeback") + + (define_insn_reservation "us1_load_signed" 3 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "sload")) + "us1_lsu + us1_slot012, nothing, us1_load_writeback") + + (define_insn_reservation "us1_store" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "store,fpstore")) + "us1_lsu + us1_slot012") + + (define_insn_reservation "us1_branch" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "branch")) + "us1_cti + us1_slotany") + + (define_insn_reservation "us1_call_jmpl" 1 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "call,sibcall,call_no_delay_slot,uncond_branch")) + "us1_cti + us1_ieu1 + us1_slot0") + + (define_insn_reservation "us1_fmov_single" 1 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpmove")) + (eq_attr "fptype" "single")) + "us1_fpa + us1_fp_single + us1_slotany") + + (define_insn_reservation "us1_fmov_double" 1 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpmove")) + (eq_attr "fptype" "double")) + "us1_fpa + us1_fp_double + us1_slotany") + + (define_insn_reservation "us1_fcmov_single" 2 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpcmove,fpcrmove")) + (eq_attr "fptype" "single")) + "us1_fpa + us1_fp_single + us1_slotany, nothing") + + (define_insn_reservation "us1_fcmov_double" 2 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpcmove,fpcrmove")) + (eq_attr "fptype" "double")) + "us1_fpa + us1_fp_double + us1_slotany, nothing") + + (define_insn_reservation "us1_faddsub_single" 4 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fp")) + (eq_attr "fptype" "single")) + "us1_fpa + us1_fp_single + us1_slotany, nothing*3") + + (define_insn_reservation "us1_faddsub_double" 4 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fp")) + (eq_attr "fptype" "double")) + "us1_fpa + us1_fp_double + us1_slotany, nothing*3") + + (define_insn_reservation "us1_fpcmp_single" 1 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpcmp")) + (eq_attr "fptype" "single")) + "us1_fpa + us1_fp_single + us1_slotany") + + (define_insn_reservation "us1_fpcmp_double" 1 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpcmp")) + (eq_attr "fptype" "double")) + "us1_fpa + us1_fp_double + us1_slotany") + + (define_insn_reservation "us1_fmult_single" 4 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpmul")) + (eq_attr "fptype" "single")) + "us1_fpm + us1_fp_single + us1_slotany, nothing*3") + + (define_insn_reservation "us1_fmult_double" 4 + (and (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpmul")) + (eq_attr "fptype" "double")) + "us1_fpm + us1_fp_double + us1_slotany, nothing*3") + + ;; This is actually in theory dangerous, because it is possible + ;; for the chip to prematurely dispatch the dependent instruction + ;; in the G stage, resulting in a 9 cycle stall. However I have never + ;; been able to trigger this case myself even with hand written code, + ;; so it must require some rare complicated pipeline state. + (define_bypass 3 + "us1_faddsub_single,us1_faddsub_double,us1_fmult_single,us1_fmult_double" + "us1_faddsub_single,us1_faddsub_double,us1_fmult_single,us1_fmult_double") + + ;; Floating point divide and square root use the multiplier unit + ;; for final rounding 3 cycles before the divide/sqrt is complete. + + (define_insn_reservation "us1_fdivs" + 13 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpdivs,fpsqrts")) + "(us1_fpm + us1_fdivider + us1_slot0), us1_fdivider*8, (us1_fpm + us1_fdivider), us1_fdivider*2" + ) + + (define_bypass + 12 + "us1_fdivs" + "us1_faddsub_single,us1_faddsub_double,us1_fmult_single,us1_fmult_double") + + (define_insn_reservation "us1_fdivd" + 23 + (and (eq_attr "cpu" "ultrasparc") + (eq_attr "type" "fpdivd,fpsqrtd")) + "(us1_fpm + us1_fdivider + us1_slot0), us1_fdivider*18, (us1_fpm + us1_fdivider), us1_fdivider*2" + ) + (define_bypass + 22 + "us1_fdivd" + "us1_faddsub_single,us1_faddsub_double,us1_fmult_single,us1_fmult_double") + + ;; Any store may multi issue with the insn creating the source + ;; data as long as that creating insn is not an FPU div/sqrt. + ;; We need a special guard function because this bypass does + ;; not apply to the address inputs of the store. + (define_bypass 0 "us1_simple_ieuN,us1_simple_ieu1,us1_simple_ieu0,us1_faddsub_single,us1_faddsub_double,us1_fmov_single,us1_fmov_double,us1_fcmov_single,us1_fcmov_double,us1_fmult_single,us1_fmult_double" "us1_store" + "store_data_bypass_p") + + ;; An integer branch may execute in the same cycle as the compare + ;; creating the condition codes. + (define_bypass 0 "us1_simple_ieu1" "us1_branch") diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/ultra3.md gcc-3.3/gcc/config/sparc/ultra3.md *** gcc-3.2.3/gcc/config/sparc/ultra3.md 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/sparc/ultra3.md 2002-05-28 09:17:46.000000000 +0000 *************** *** 0 **** --- 1,169 ---- + ;; Scheduling description for UltraSPARC-III. + ;; Copyright (C) 2002 Free Software Foundation, Inc. + ;; + ;; This file is part of GNU CC. + ;; + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 2, or (at your option) + ;; any later version. + ;; + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + ;; + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;; UltraSPARC-III is a quad-issue processor. + ;; + ;; It is also a much simpler beast than Ultra-I/II, no silly + ;; slotting rules and both integer units are fully symmetric. + ;; It does still have single-issue instructions though. + + (define_automaton "ultrasparc3_0,ultrasparc3_1") + + (define_cpu_unit "us3_ms,us3_br,us3_fpm" "ultrasparc3_0") + (define_cpu_unit "us3_a0,us3_a1,us3_slot0,\ + us3_slot1,us3_slot2,us3_slot3,us3_fpa" "ultrasparc3_1") + (define_cpu_unit "us3_load_writeback" "ultrasparc3_1") + + (define_reservation "us3_slotany" "(us3_slot0 | us3_slot1 | us3_slot2 | us3_slot3)") + (define_reservation "us3_single_issue" "us3_slot0 + us3_slot1 + us3_slot2 + us3_slot3") + (define_reservation "us3_ax" "(us3_a0 | us3_a1)") + + (define_insn_reservation "us3_single" 1 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "multi,flushw,iflush,trap")) + "us3_single_issue") + + (define_insn_reservation "us3_integer" 1 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "ialu,shift,compare")) + "us3_ax + us3_slotany") + + (define_insn_reservation "us3_ialuX" 5 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "ialu,shift,compare")) + "us3_single_issue*4, nothing") + + (define_insn_reservation "us3_cmove" 2 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "cmove")) + "us3_ms + us3_br + us3_slotany, nothing") + + ;; ??? Not entirely accurate. + ;; ??? It can run from 6 to 9 cycles. The first cycle the MS pipe + ;; ??? is needed, and the instruction group is broken right after + ;; ??? the imul. Then 'helper' instructions are generated to perform + ;; ??? each further stage of the multiplication, each such 'helper' is + ;; ??? single group. So, the reservation aspect is represented accurately + ;; ??? here, but the variable cycles are not. + ;; ??? Currently I have no idea how to determine the variability, but once + ;; ??? known we can simply add a define_bypass or similar to model it. + (define_insn_reservation "us3_imul" 7 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "imul")) + "us3_ms + us3_slotany, us3_single_issue*4, nothing*2") + + (define_insn_reservation "us3_idiv" 72 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "idiv")) + "us3_ms + us3_slotany, us3_single_issue*69, nothing*2") + + ;; UltraSPARC-III has a similar load delay as UltraSPARC-I/II except + ;; that all loads except 32-bit/64-bit unsigned loads take the extra + ;; delay for sign/zero extension. + (define_insn_reservation "us3_2cycle_load" 2 + (and (eq_attr "cpu" "ultrasparc3") + (and (eq_attr "type" "load,fpload") + (eq_attr "us3load_type" "2cycle"))) + "us3_ms + us3_slotany, us3_load_writeback") + + (define_insn_reservation "us3_load_delayed" 3 + (and (eq_attr "cpu" "ultrasparc3") + (and (eq_attr "type" "load,sload") + (eq_attr "us3load_type" "3cycle"))) + "us3_ms + us3_slotany, nothing, us3_load_writeback") + + (define_insn_reservation "us3_store" 1 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "store,fpstore")) + "us3_ms + us3_slotany") + + (define_insn_reservation "us3_branch" 1 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "branch")) + "us3_br + us3_slotany") + + (define_insn_reservation "us3_call_jmpl" 1 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "call,sibcall,call_no_delay_slot,uncond_branch")) + "us3_br + us3_ms + us3_slotany") + + (define_insn_reservation "us3_fmov" 3 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpmove")) + "us3_fpa + us3_slotany, nothing*2") + + (define_insn_reservation "us3_fcmov" 3 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpcmove")) + "us3_fpa + us3_br + us3_slotany, nothing*2") + + (define_insn_reservation "us3_fcrmov" 3 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpcrmove")) + "us3_fpa + us3_ms + us3_slotany, nothing*2") + + (define_insn_reservation "us3_faddsub" 4 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fp")) + "us3_fpa + us3_slotany, nothing*3") + + (define_insn_reservation "us3_fpcmp" 5 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpcmp")) + "us3_fpa + us3_slotany, nothing*4") + + (define_insn_reservation "us3_fmult" 4 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpmul")) + "us3_fpm + us3_slotany, nothing*3") + + (define_insn_reservation "us3_fdivs" 17 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpdivs")) + "(us3_fpm + us3_slotany), us3_fpm*14, nothing*2") + + (define_insn_reservation "us3_fsqrts" 20 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpsqrts")) + "(us3_fpm + us3_slotany), us3_fpm*17, nothing*2") + + (define_insn_reservation "us3_fdivd" 20 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpdivd")) + "(us3_fpm + us3_slotany), us3_fpm*17, nothing*2") + + (define_insn_reservation "us3_fsqrtd" 29 + (and (eq_attr "cpu" "ultrasparc3") + (eq_attr "type" "fpsqrtd")) + "(us3_fpm + us3_slotany), us3_fpm*26, nothing*2") + + ;; Any store may multi issue with the insn creating the source + ;; data as long as that creating insn is not an FPU div/sqrt. + ;; We need a special guard function because this bypass does + ;; not apply to the address inputs of the store. + (define_bypass 0 "us3_integer,us3_faddsub,us3_fmov,us3_fcmov,us3_fmult" "us3_store" + "store_data_bypass_p") + + ;; An integer branch may execute in the same cycle as the compare + ;; creating the condition codes. + (define_bypass 0 "us3_integer" "us3_branch") + + ;; If FMOVfcc is user of FPCMP, latency is only 1 cycle. + (define_bypass 1 "us3_fpcmp" "us3_fcmov") diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/vxsim.h gcc-3.3/gcc/config/sparc/vxsim.h *** gcc-3.2.3/gcc/config/sparc/vxsim.h 2002-03-27 10:28:16.000000000 +0000 --- gcc-3.3/gcc/config/sparc/vxsim.h 2002-09-15 12:03:42.000000000 +0000 *************** do { \ *** 131,136 **** /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h. Instead, it is enabled here, because it does work under Solaris. */ ! /* Define for support of TFmode long double and REAL_ARITHMETIC. ! Sparc ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE 64 --- 131,136 ---- /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h. Instead, it is enabled here, because it does work under Solaris. */ ! /* Define for support of TFmode long double. ! SPARC ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE 64 diff -Nrc3pad gcc-3.2.3/gcc/config/sparc/vxsparc64.h gcc-3.3/gcc/config/sparc/vxsparc64.h *** gcc-3.2.3/gcc/config/sparc/vxsparc64.h 2002-03-31 03:10:19.000000000 +0000 --- gcc-3.3/gcc/config/sparc/vxsparc64.h 2002-11-26 04:54:49.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. ! 64-bit VxWorks Sparc version. Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. ! 64-bit VxWorks SPARC version. Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 44,50 **** #define NO_DOT_IN_LABEL /* Enable #pragma pack(n) */ ! #define HANDLE_SYSV_PRAGMA /* We use stabs for debugging */ #undef PREFERRED_DEBUGGING_TYPE --- 44,50 ---- #define NO_DOT_IN_LABEL /* Enable #pragma pack(n) */ ! #define HANDLE_SYSV_PRAGMA 1 /* We use stabs for debugging */ #undef PREFERRED_DEBUGGING_TYPE diff -Nrc3pad gcc-3.2.3/gcc/config/stormy16/stormy16.c gcc-3.3/gcc/config/stormy16/stormy16.c *** gcc-3.2.3/gcc/config/stormy16/stormy16.c 2002-02-01 15:20:16.000000000 +0000 --- gcc-3.3/gcc/config/stormy16/stormy16.c 2002-11-20 21:08:33.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 44,53 **** --- 44,60 ---- #include "target.h" #include "target-def.h" #include "tm_p.h" + #include "langhooks.h" static rtx emit_addhi3_postreload PARAMS ((rtx, rtx, rtx)); static void xstormy16_asm_out_constructor PARAMS ((rtx, int)); static void xstormy16_asm_out_destructor PARAMS ((rtx, int)); + static void xstormy16_encode_section_info PARAMS ((tree, int)); + static void xstormy16_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); + + static void xstormy16_init_builtins PARAMS ((void)); + static rtx xstormy16_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); /* Define the information needed to generate branch and scc insns. This is stored from the compare operation. */ *************** xstormy16_split_cbranch (mode, label, co *** 225,239 **** { rtx op0 = XEXP (comparison, 0); rtx op1 = XEXP (comparison, 1); ! rtx seq; rtx compare; start_sequence (); xstormy16_expand_arith (mode, COMPARE, dest, op0, op1, carry); ! seq = gen_sequence (); end_sequence (); ! compare = SET_SRC (XVECEXP (PATTERN (XVECEXP (seq, 0, XVECLEN (seq, 0) - 1)), ! 0, 0)); PUT_CODE (XEXP (compare, 0), GET_CODE (comparison)); XEXP (compare, 1) = gen_rtx_LABEL_REF (VOIDmode, label); emit_insn (seq); --- 232,253 ---- { rtx op0 = XEXP (comparison, 0); rtx op1 = XEXP (comparison, 1); ! rtx seq, last_insn; rtx compare; start_sequence (); xstormy16_expand_arith (mode, COMPARE, dest, op0, op1, carry); ! seq = get_insns (); end_sequence (); ! ! if (! INSN_P (seq)) ! abort (); ! ! last_insn = seq; ! while (NEXT_INSN (last_insn) != NULL_RTX) ! last_insn = NEXT_INSN (last_insn); ! ! compare = SET_SRC (XVECEXP (PATTERN (last_insn), 0, 0)); PUT_CODE (XEXP (compare, 0), GET_CODE (comparison)); XEXP (compare, 1) = gen_rtx_LABEL_REF (VOIDmode, label); emit_insn (seq); *************** xstormy16_split_cbranch (mode, label, co *** 245,251 **** OP is the conditional expression, or NULL for branch-always. ! REVERSED is non-zero if we should reverse the sense of the comparison. INSN is the insn. */ --- 259,265 ---- OP is the conditional expression, or NULL for branch-always. ! REVERSED is nonzero if we should reverse the sense of the comparison. INSN is the insn. */ *************** xstormy16_output_cbranch_hi (op, label, *** 322,328 **** OP is the conditional expression (OP is never NULL_RTX). ! REVERSED is non-zero if we should reverse the sense of the comparison. INSN is the insn. */ --- 336,342 ---- OP is the conditional expression (OP is never NULL_RTX). ! REVERSED is nonzero if we should reverse the sense of the comparison. INSN is the insn. */ *************** xstormy16_output_cbranch_si (op, label, *** 398,404 **** registers, but not memory. Some machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the Sparc when compiling PIC). In some cases, both an intermediate and a scratch register are required. You should define these macros to indicate to the reload phase that it may --- 412,418 ---- registers, but not memory. Some machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the SPARC when compiling PIC). In some cases, both an intermediate and a scratch register are required. You should define these macros to indicate to the reload phase that it may *************** xstormy16_secondary_reload_class (class, *** 467,473 **** return NO_REGS; } ! /* Recognise a PLUS that needs the carry register. */ int xstormy16_carry_plus_operand (x, mode) rtx x; --- 481,487 ---- return NO_REGS; } ! /* Recognize a PLUS that needs the carry register. */ int xstormy16_carry_plus_operand (x, mode) rtx x; *************** xstormy16_compute_stack_layout () *** 865,871 **** if (REG_NEEDS_SAVE (regno, ifun)) layout.register_save_size += UNITS_PER_WORD; ! if (current_function_varargs || current_function_stdarg) layout.stdarg_save_size = NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD; else layout.stdarg_save_size = 0; --- 879,885 ---- if (REG_NEEDS_SAVE (regno, ifun)) layout.register_save_size += UNITS_PER_WORD; ! if (current_function_stdarg) layout.stdarg_save_size = NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD; else layout.stdarg_save_size = 0; *************** xstormy16_build_va_list () *** 1140,1146 **** { tree f_1, f_2, record, type_decl; ! record = make_lang_type (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); f_1 = build_decl (FIELD_DECL, get_identifier ("base"), --- 1154,1160 ---- { tree f_1, f_2, record, type_decl; ! record = (*lang_hooks.types.make_type) (RECORD_TYPE); type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); f_1 = build_decl (FIELD_DECL, get_identifier ("base"), *************** xstormy16_build_va_list () *** 1161,1173 **** return record; } ! /* Implement the stdarg/varargs va_start macro. STDARG_P is non-zero if this is stdarg.h instead of varargs.h. VALIST is the tree of the va_list variable to initialize. NEXTARG is the machine independent notion of the 'next' argument after the variable arguments. */ void ! xstormy16_expand_builtin_va_start (stdarg_p, valist, nextarg) ! int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg ATTRIBUTE_UNUSED; { --- 1175,1186 ---- return record; } ! /* Implement the stdarg/varargs va_start macro. STDARG_P is nonzero if this is stdarg.h instead of varargs.h. VALIST is the tree of the va_list variable to initialize. NEXTARG is the machine independent notion of the 'next' argument after the variable arguments. */ void ! xstormy16_expand_builtin_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { *************** xstormy16_function_value (valtype, func) *** 1372,1382 **** extracted from it.) It might possibly be useful on some targets, but probably not. */ ! void ! xstormy16_asm_output_mi_thunk (file, thunk_fndecl, delta, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; ! int delta; tree function; { int regnum = FIRST_ARGUMENT_REGISTER; --- 1385,1397 ---- extracted from it.) It might possibly be useful on some targets, but probably not. */ ! static void ! xstormy16_asm_output_mi_thunk (file, thunk_fndecl, delta, ! vcall_offset, function) FILE *file; tree thunk_fndecl ATTRIBUTE_UNUSED; ! HOST_WIDE_INT delta; ! HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; tree function; { int regnum = FIRST_ARGUMENT_REGISTER; *************** xstormy16_asm_output_mi_thunk (file, thu *** 1385,1391 **** if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)))) regnum += 1; ! fprintf (file, "\tadd %s,#0x%x\n", reg_names[regnum], (delta) & 0xFFFF); fputs ("\tjmpf ", file); assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); putc ('\n', file); --- 1400,1406 ---- if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)))) regnum += 1; ! fprintf (file, "\tadd %s,#0x%x\n", reg_names[regnum], (int) delta & 0xFFFF); fputs ("\tjmpf ", file); assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); putc ('\n', file); *************** xstormy16_asm_output_mi_thunk (file, thu *** 1393,1401 **** /* Mark functions with SYMBOL_REF_FLAG. */ ! void ! xstormy16_encode_section_info (decl) tree decl; { if (TREE_CODE (decl) == FUNCTION_DECL) SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; --- 1408,1417 ---- /* Mark functions with SYMBOL_REF_FLAG. */ ! static void ! xstormy16_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { if (TREE_CODE (decl) == FUNCTION_DECL) SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; *************** xstormy16_handle_interrupt_attribute (no *** 2015,2023 **** --- 2031,2166 ---- return NULL_TREE; } + #undef TARGET_INIT_BUILTINS + #define TARGET_INIT_BUILTINS xstormy16_init_builtins + #undef TARGET_EXPAND_BUILTIN + #define TARGET_EXPAND_BUILTIN xstormy16_expand_builtin + + static struct { + const char *name; + int md_code; + const char *arg_ops; /* 0..9, t for temp register, r for return value */ + const char *arg_types; /* s=short,l=long, upper case for unsigned */ + } s16builtins[] = { + { "__sdivlh", CODE_FOR_sdivlh, "rt01", "sls" }, + { "__smodlh", CODE_FOR_sdivlh, "tr01", "sls" }, + { "__udivlh", CODE_FOR_udivlh, "rt01", "SLS" }, + { "__umodlh", CODE_FOR_udivlh, "tr01", "SLS" }, + { 0, 0, 0, 0 } + }; + + static void + xstormy16_init_builtins () + { + tree args, ret_type, arg; + int i, a; + + ret_type = void_type_node; + + for (i=0; s16builtins[i].name; i++) + { + args = void_list_node; + for (a=strlen (s16builtins[i].arg_types)-1; a>=0; a--) + { + switch (s16builtins[i].arg_types[a]) + { + case 's': arg = short_integer_type_node; break; + case 'S': arg = short_unsigned_type_node; break; + case 'l': arg = long_integer_type_node; break; + case 'L': arg = long_unsigned_type_node; break; + default: abort(); + } + if (a == 0) + ret_type = arg; + else + args = tree_cons (NULL_TREE, arg, args); + } + builtin_function (s16builtins[i].name, + build_function_type (ret_type, args), + i, BUILT_IN_MD, NULL, NULL); + } + } + + static rtx + xstormy16_expand_builtin(exp, target, subtarget, mode, ignore) + tree exp; + rtx target; + rtx subtarget ATTRIBUTE_UNUSED; + enum machine_mode mode ATTRIBUTE_UNUSED; + int ignore ATTRIBUTE_UNUSED; + { + rtx op[10], args[10], pat, copyto[10], retval = 0; + tree fndecl, argtree; + int i, a, o, code; + + fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); + argtree = TREE_OPERAND (exp, 1); + i = DECL_FUNCTION_CODE (fndecl); + code = s16builtins[i].md_code; + + for (a = 0; a < 10 && argtree; a++) + { + args[a] = expand_expr (TREE_VALUE (argtree), NULL_RTX, VOIDmode, 0); + argtree = TREE_CHAIN (argtree); + } + + for (o = 0; s16builtins[i].arg_ops[o]; o++) + { + char ao = s16builtins[i].arg_ops[o]; + char c = insn_data[code].operand[o].constraint[0]; + int omode; + + copyto[o] = 0; + + omode = insn_data[code].operand[o].mode; + if (ao == 'r') + op[o] = target ? target : gen_reg_rtx (omode); + else if (ao == 't') + op[o] = gen_reg_rtx (omode); + else + op[o] = args[(int) hex_value (ao)]; + + if (! (*insn_data[code].operand[o].predicate) (op[o], GET_MODE (op[o]))) + { + if (c == '+' || c == '=') + { + copyto[o] = op[o]; + op[o] = gen_reg_rtx (omode); + } + else + op[o] = copy_to_mode_reg (omode, op[o]); + } + + if (ao == 'r') + retval = op[o]; + } + + pat = GEN_FCN (code) (op[0], op[1], op[2], op[3], op[4], + op[5], op[6], op[7], op[8], op[9]); + emit_insn (pat); + + for (o = 0; s16builtins[i].arg_ops[o]; o++) + if (copyto[o]) + { + emit_move_insn (copyto[o], op[o]); + if (op[o] == retval) + retval = copyto[o]; + } + + return retval; + } + + #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t" #undef TARGET_ASM_ALIGNED_SI_OP #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO xstormy16_encode_section_info + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK xstormy16_asm_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall struct gcc_target targetm = TARGET_INITIALIZER; diff -Nrc3pad gcc-3.2.3/gcc/config/stormy16/stormy16.h gcc-3.3/gcc/config/stormy16/stormy16.h *** gcc-3.2.3/gcc/config/stormy16/stormy16.h 2002-02-01 15:20:16.000000000 +0000 --- gcc-3.3/gcc/config/stormy16/stormy16.h 2002-11-26 04:54:50.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 67,73 **** /* Run-time target specifications */ ! #define CPP_PREDEFINES "-Dxstormy16 -Amachine=xstormy16 -D__INT_MAX__=32767" /* This declaration should be present. */ extern int target_flags; --- 67,73 ---- /* Run-time target specifications */ ! #define CPP_PREDEFINES "-Dxstormy16 -Amachine=xstormy16" /* This declaration should be present. */ extern int target_flags; *************** extern int target_flags; *** 89,102 **** #define WORDS_BIG_ENDIAN 0 - #define BITS_PER_UNIT 8 - - #define BITS_PER_WORD 16 - #define UNITS_PER_WORD 2 - #define POINTER_SIZE 16 - #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ do { \ if (GET_MODE_CLASS (MODE) == MODE_INT \ --- 89,96 ---- *************** do { \ *** 132,140 **** /* Defined in svr4.h. */ #define PCC_BITFIELD_TYPE_MATTERS 1 - - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - /* Layout of Source Language Data Types */ --- 126,131 ---- *************** do { \ *** 146,153 **** #define LONG_LONG_TYPE_SIZE 64 - #define CHAR_TYPE_SIZE 8 - #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 64 --- 137,142 ---- *************** do { \ *** 169,175 **** #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 ! /* Define this macro if the type of Objective C selectors should be `int'. If this macro is not defined, then selectors should have the type `struct objc_selector *'. */ --- 158,164 ---- #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 ! /* Define this macro if the type of Objective-C selectors should be `int'. If this macro is not defined, then selectors should have the type `struct objc_selector *'. */ *************** do { \ *** 395,414 **** /* #define LEAF_REG_REMAP(REGNO) */ - /* Registers That Form a Stack. */ - - /* Define this if the machine has any stack-like registers. */ - /* #define STACK_REGS */ - - /* The number of the first stack-like register. This one is the top - of the stack. */ - /* #define FIRST_STACK_REG */ - - /* The number of the last stack-like register. This one is the - bottom of the stack. */ - /* #define LAST_STACK_REG */ - - /* Register Classes */ /* An enumeral type that must be defined with all the register class names as --- 384,389 ---- *************** enum reg_class *** 598,604 **** registers, but not memory. Some machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the Sparc when compiling PIC). In some cases, both an intermediate and a scratch register are required. You should define these macros to indicate to the reload phase that it may --- 573,579 ---- registers, but not memory. Some machines allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with ! certain symbolic address on the SPARC when compiling PIC). In some cases, both an intermediate and a scratch register are required. You should define these macros to indicate to the reload phase that it may *************** enum reg_class *** 654,660 **** /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this macro on those ! machines to be a C expression that is non-zero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. --- 629,635 ---- /* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this macro on those ! machines to be a C expression that is nonzero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. *************** enum reg_class *** 697,711 **** few registers of certain classes that there would not be enough registers to use as spill registers if this were done. ! Define `SMALL_REGISTER_CLASSES' to be an expression with a non-zero value on ! these machines. When this macro has a non-zero value, the compiler allows registers explicitly used in the rtl to be used as spill registers but avoids extending the lifetime of these registers. ! It is always safe to define this macro with a non-zero value, but if you unnecessarily define it, you will reduce the amount of optimizations that can be performed in some cases. If you do not define this macro with a ! non-zero value when it is required, the compiler will run out of spill registers and print a fatal error message. For most machines, you should not define this macro at all. */ /* #define SMALL_REGISTER_CLASSES */ --- 672,686 ---- few registers of certain classes that there would not be enough registers to use as spill registers if this were done. ! Define `SMALL_REGISTER_CLASSES' to be an expression with a nonzero value on ! these machines. When this macro has a nonzero value, the compiler allows registers explicitly used in the rtl to be used as spill registers but avoids extending the lifetime of these registers. ! It is always safe to define this macro with a nonzero value, but if you unnecessarily define it, you will reduce the amount of optimizations that can be performed in some cases. If you do not define this macro with a ! nonzero value when it is required, the compiler will run out of spill registers and print a fatal error message. For most machines, you should not define this macro at all. */ /* #define SMALL_REGISTER_CLASSES */ *************** enum reg_class *** 863,869 **** /* If defined, a C expression that produces the machine-specific code to setup the stack so that arbitrary frames can be accessed. For example, on the ! Sparc, we must flush all of the register windows to the stack before we can access arbitrary stack frames. This macro will seldom need to be defined. */ /* #define SETUP_FRAME_ADDRESSES() */ --- 838,844 ---- /* If defined, a C expression that produces the machine-specific code to setup the stack so that arbitrary frames can be accessed. For example, on the ! SPARC, we must flush all of the register windows to the stack before we can access arbitrary stack frames. This macro will seldom need to be defined. */ /* #define SETUP_FRAME_ADDRESSES() */ *************** enum reg_class *** 1084,1090 **** {ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ } ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM with register number TO. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the cases preventing register elimination are things that --- 1059,1065 ---- {ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ } ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM with register number TO. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the cases preventing register elimination are things that *************** enum reg_class *** 1216,1222 **** variable number of bytes is passed, it is zero, and argument popping will always be the responsibility of the calling function. ! On the Vax, all functions always pop their arguments, so the definition of this macro is STACK-SIZE. On the 68000, using the standard calling convention, no functions pop their arguments, so the value of the macro is always 0 in this case. But an alternative calling convention is available --- 1191,1197 ---- variable number of bytes is passed, it is zero, and argument popping will always be the responsibility of the calling function. ! On the VAX, all functions always pop their arguments, so the definition of this macro is STACK-SIZE. On the 68000, using the standard calling convention, no functions pop their arguments, so the value of the macro is always 0 in this case. But an alternative calling convention is available *************** enum reg_class *** 1253,1259 **** register in which to pass the argument, or zero to pass the argument on the stack. ! For machines like the Vax and 68000, where normally all arguments are pushed, zero suffices as a definition. The usual way to make the ANSI library `stdarg.h' work on a machine where --- 1228,1234 ---- register in which to pass the argument, or zero to pass the argument on the stack. ! For machines like the VAX and 68000, where normally all arguments are pushed, zero suffices as a definition. The usual way to make the ANSI library `stdarg.h' work on a machine where *************** enum reg_class *** 1264,1270 **** You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns non-zero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ --- 1239,1245 ---- You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' ! returns nonzero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ *************** enum reg_class *** 1341,1347 **** For this platform, the value of CUMULATIVE_ARGS is the number of words of arguments that have been passed in registers so far. */ ! typedef int CUMULATIVE_ARGS; /* A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list. The variable has type --- 1316,1322 ---- For this platform, the value of CUMULATIVE_ARGS is the number of words of arguments that have been passed in registers so far. */ ! #define CUMULATIVE_ARGS int /* A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list. The variable has type *************** typedef int CUMULATIVE_ARGS; *** 1415,1424 **** function call. */ #define RETURN_VALUE_REGNUM FIRST_ARGUMENT_REGISTER - /* Define this macro if `-traditional' should not cause functions declared to - return `float' to convert the value to `double'. */ - /* #define TRADITIONAL_RETURN_FLOAT */ - /* A C expression to create an RTX representing the place where a function returns a value of data type VALTYPE. VALTYPE is a tree node representing a data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode used to --- 1390,1395 ---- *************** typedef int CUMULATIVE_ARGS; *** 1622,1661 **** You need not define this macro if you did not define `DELAY_SLOTS_FOR_EPILOGUE'. */ /* #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) */ - - /* A C compound statement that outputs the assembler code for a thunk function, - used to implement C++ virtual function calls with multiple inheritance. The - thunk acts as a wrapper around a virtual function, adjusting the implicit - object parameter before handing control off to the real function. - - First, emit code to add the integer DELTA to the location that contains the - incoming first argument. Assume that this argument contains a pointer, and - is the one used to pass the `this' pointer in C++. This is the incoming - argument *before* the function prologue, e.g. `%o0' on a sparc. The - addition must preserve the values of all other incoming arguments. - - After the addition, emit code to jump to FUNCTION, which is a - `FUNCTION_DECL'. This is a direct pure jump, not a call, and does not touch - the return address. Hence returning from FUNCTION will return to whoever - called the current `thunk'. - - The effect must be as if @var{function} had been called directly - with the adjusted first argument. This macro is responsible for - emitting all of the code for a thunk function; - TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE are - not invoked. - - The THUNK_FNDECL is redundant. (DELTA and FUNCTION have already been - extracted from it.) It might possibly be useful on some targets, but - probably not. - - If you do not define this macro, the target-independent code in the C++ - frontend will generate a less efficient heavyweight thunk that calls - FUNCTION instead of jumping to it. The generic approach does not support - varargs. */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - xstormy16_asm_output_mi_thunk (FILE, THUNK_FNDECL, DELTA, FUNCTION) - /* Generating Code for Profiling. */ --- 1593,1598 ---- *************** typedef int CUMULATIVE_ARGS; *** 1750,1762 **** #define BUILD_VA_LIST_TYPE(NODE) \ ((NODE) = xstormy16_build_va_list ()) ! /* Implement the stdarg/varargs va_start macro. STDARG_P is non-zero if this is stdarg.h instead of varargs.h. VALIST is the tree of the va_list variable to initialize. NEXTARG is the machine independent notion of the 'next' argument after the variable arguments. If not defined, a standard implementation will be defined that works for arguments passed on the stack. */ ! #define EXPAND_BUILTIN_VA_START(STDARG_P, VALIST, NEXTARG) \ ! xstormy16_expand_builtin_va_start (STDARG_P, VALIST, NEXTARG) /* Implement the stdarg/varargs va_arg macro. VALIST is the variable of type va_list as a tree, TYPE is the type passed to va_arg. */ --- 1687,1699 ---- #define BUILD_VA_LIST_TYPE(NODE) \ ((NODE) = xstormy16_build_va_list ()) ! /* Implement the stdarg/varargs va_start macro. STDARG_P is nonzero if this is stdarg.h instead of varargs.h. VALIST is the tree of the va_list variable to initialize. NEXTARG is the machine independent notion of the 'next' argument after the variable arguments. If not defined, a standard implementation will be defined that works for arguments passed on the stack. */ ! #define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \ ! xstormy16_expand_builtin_va_start (VALIST, NEXTARG) /* Implement the stdarg/varargs va_arg macro. VALIST is the variable of type va_list as a tree, TYPE is the type passed to va_arg. */ *************** typedef int CUMULATIVE_ARGS; *** 2033,2039 **** C compiler that comes with the system takes care of doing them. */ /* #define perform_... */ ! /* Define this macro to generate code for Objective C message sending using the calling convention of the NeXT system. This calling convention involves passing the object, the selector and the method arguments all at once to the method-lookup library function. --- 1970,1976 ---- C compiler that comes with the system takes care of doing them. */ /* #define perform_... */ ! /* Define this macro to generate code for Objective-C message sending using the calling convention of the NeXT system. This calling convention involves passing the object, the selector and the method arguments all at once to the method-lookup library function. *************** typedef int CUMULATIVE_ARGS; *** 2070,2128 **** /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. ! ! It usually pays to define several simpler macros to serve as subroutines for ! this one. Otherwise it may be too complicated to understand. ! ! This macro must exist in two variants: a strict variant and a non-strict ! one. The strict variant is used in the reload pass. It must be defined so ! that any pseudo-register that has not been allocated a hard register is ! considered a memory reference. In contexts where some kind of register is ! required, a pseudo-register with no hard register must be rejected. ! ! The non-strict variant is used in other passes. It must be defined to ! accept all pseudo-registers in every context where some kind of register is ! required. ! ! Compiler source files that want to use the strict variant of this macro ! define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' ! conditional to define the strict variant in that case and the non-strict ! variant otherwise. ! ! Subroutines to check for acceptable registers for various purposes (one for ! base registers, one for index registers, and so on) are typically among the ! subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these ! subroutine macros need have two variants; the higher levels of macros may be ! the same whether strict or not. ! ! Normally, constant addresses which are the sum of a `symbol_ref' and an ! integer are stored inside a `const' RTX to mark them as constant. ! Therefore, there is no need to recognize such sums specifically as ! legitimate addresses. Normally you would simply recognize any `const' as ! legitimate. ! ! Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that ! are not marked with `const'. It assumes that a naked `plus' indicates ! indexing. If so, then you *must* reject such naked constant sums as ! illegitimate addresses, so that none of them will be given to ! `PRINT_OPERAND_ADDRESS'. ! ! On some machines, whether a symbolic address is legitimate depends on the ! section that the address refers to. On these machines, define the macro ! `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and ! then check for it here. When you see a `const', you will have to look ! inside it to find the `symbol_ref' in order to determine the section. ! ! The best way to modify the name string is by adding text to the beginning, ! with suitable punctuation to prevent any ambiguity. Allocate the new name ! in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to ! remove and decode the added text and output the name accordingly, and define ! `STRIP_NAME_ENCODING' to access the original name string. ! ! You can check the information stored here into the `symbol_ref' in the ! definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and ! `PRINT_OPERAND_ADDRESS'. */ #ifdef REG_OK_STRICT #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ do { \ --- 2007,2013 ---- /* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory ! operand of mode MODE. */ #ifdef REG_OK_STRICT #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ do { \ *************** do { \ *** 2267,2273 **** /* #define EXTRA_CC_MODES */ /* Returns a mode from class `MODE_CC' to be used when comparison operation ! code OP is applied to rtx X and Y. For example, on the Sparc, `SELECT_CC_MODE' is defined as (see *note Jump Patterns::. for a description of the reason for this definition) --- 2152,2158 ---- /* #define EXTRA_CC_MODES */ /* Returns a mode from class `MODE_CC' to be used when comparison operation ! code OP is applied to rtx X and Y. For example, on the SPARC, `SELECT_CC_MODE' is defined as (see *note Jump Patterns::. for a description of the reason for this definition) *************** do { \ *** 2305,2311 **** You need not define this macro if it would always returns zero or if the floating-point format is anything other than `IEEE_FLOAT_FORMAT'. For ! example, here is the definition used on the Sparc, where floating-point inequality comparisons are always given `CCFPEmode': #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) */ --- 2190,2196 ---- You need not define this macro if it would always returns zero or if the floating-point format is anything other than `IEEE_FLOAT_FORMAT'. For ! example, here is the definition used on the SPARC, where floating-point inequality comparisons are always given `CCFPEmode': #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) */ *************** do { \ *** 2446,2455 **** times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is non-zero, the compiler will act as if `STRICT_ALIGNMENT' ! were non-zero when generating code for block moves. This can cause significantly more instructions to be produced. Therefore, do not set this ! macro non-zero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. */ --- 2331,2340 ---- times greater than aligned accesses, for example if they are emulated in a trap handler. ! When this macro is nonzero, the compiler will act as if `STRICT_ALIGNMENT' ! were nonzero when generating code for block moves. This can cause significantly more instructions to be produced. Therefore, do not set this ! macro nonzero if unaligned accesses only add a cycle or two to the time for a memory access. If the value of this macro is always zero, it need not be defined. */ *************** do { \ *** 2513,2519 **** uninitialized global data will be output in the data section if `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be used. */ ! #define BSS_SECTION_ASM_OP ".bss" /* If defined, a C expression whose value is a string containing the assembler operation to identify the following data as --- 2398,2404 ---- uninitialized global data will be output in the data section if `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be used. */ ! #define BSS_SECTION_ASM_OP "\t.section\t.bss" /* If defined, a C expression whose value is a string containing the assembler operation to identify the following data as *************** do { \ *** 2547,2620 **** Defined in svr4.h. */ /* #define EXTRA_SECTION_FUNCTIONS */ - /* On most machines, read-only variables, constants, and jump tables are placed - in the text section. If this is not the case on your machine, this macro - should be defined to be the name of a function (either `data_section' or a - function defined in `EXTRA_SECTIONS') that switches to the section to be - used for read-only items. - - If these items should be placed in the text section, this macro should not - be defined. */ - /* #define READONLY_DATA_SECTION */ - - /* A C statement or statements to switch to the appropriate section for output - of EXP. You can assume that EXP is either a `VAR_DECL' node or a constant - of some sort. RELOC indicates whether the initial value of EXP requires - link-time relocations. Select the section by calling `text_section' or one - of the alternatives for other sections. - - Do not define this macro if you put all read-only variables and constants in - the read-only data section (usually the text section). - - Defined in svr4.h. */ - /* #define SELECT_SECTION(EXP, RELOC, ALIGN) */ - - /* A C statement or statements to switch to the appropriate section for output - of RTX in mode MODE. You can assume that RTX is some kind of constant in - RTL. The argument MODE is redundant except in the case of a `const_int' - rtx. Select the section by calling `text_section' or one of the - alternatives for other sections. - - Do not define this macro if you put all constants in the read-only data - section. - - Defined in svr4.h. */ - /* #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) */ - /* Define this macro if jump tables (for `tablejump' insns) should be output in the text section, along with the assembler instructions. Otherwise, the readonly data section is used. This macro is irrelevant if there is no separate readonly data section. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 - - /* Define this macro if references to a symbol must be treated differently - depending on something about the variable or function named by the symbol - (such as what section it is in). - - The macro definition, if any, is executed immediately after the rtl for DECL - has been created and stored in `DECL_RTL (DECL)'. The value of the rtl will - be a `mem' whose address is a `symbol_ref'. - - The usual thing for this macro to do is to record a flag in the `symbol_ref' - (such as `SYMBOL_REF_FLAG') or to store a modified name string in the - `symbol_ref' (if one bit is not enough information). */ - #define ENCODE_SECTION_INFO(DECL) xstormy16_encode_section_info(DECL) - - /* Decode SYM_NAME and store the real name part in VAR, sans the characters - that encode section info. Define this macro if `ENCODE_SECTION_INFO' alters - the symbol's name string. */ - /* #define STRIP_NAME_ENCODING(VAR, SYM_NAME) */ - - /* A C statement to build up a unique section name, expressed as a - STRING_CST node, and assign it to `DECL_SECTION_NAME (DECL)'. - RELOC indicates whether the initial value of EXP requires - link-time relocations. If you do not define this macro, GNU CC - will use the symbol name prefixed by `.' as the section name. - - Defined in svr4.h. */ - /* #define UNIQUE_SECTION(DECL, RELOC) */ - /* Position Independent Code. */ --- 2432,2443 ---- *************** do { \ *** 2735,2742 **** /* #define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME) */ /* A C statement to output any assembler statements which are required to ! precede any Objective C object definitions or message sending. The ! statement is executed only when compiling an Objective C program. */ /* #define OBJC_PROLOGUE */ --- 2558,2565 ---- /* #define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME) */ /* A C statement to output any assembler statements which are required to ! precede any Objective-C object definitions or message sending. The ! statement is executed only when compiling an Objective-C program. */ /* #define OBJC_PROLOGUE */ *************** do { \ *** 2753,2759 **** /* #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) */ /* You may define this macro as a C expression. You should define the ! expression to have a non-zero value if GNU CC should output the constant pool for a function before the code for the function, or a zero value if GNU CC should output the constant pool after the function. If you do not define this macro, the usual case, GNU CC --- 2576,2582 ---- /* #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) */ /* You may define this macro as a C expression. You should define the ! expression to have a nonzero value if GNU CC should output the constant pool for a function before the code for the function, or a zero value if GNU CC should output the constant pool after the function. If you do not define this macro, the usual case, GNU CC *************** do { \ *** 2817,2846 **** is treated as a logical line separator. */ #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '|') - /* These macros are provided by `real.h' for writing the definitions of - `ASM_OUTPUT_DOUBLE' and the like: */ - - /* These translate X, of type `REAL_VALUE_TYPE', to the target's floating point - representation, and store its bit pattern in the array of `long int' whose - address is L. The number of elements in the output array is determined by - the size of the desired target floating point data type: 32 bits of it go in - each `long int' array element. Each array element holds 32 bits of the - result, even if `long int' is wider than 32 bits on the host machine. - - The array element values are designed so that you can print them out using - `fprintf' in the order they should appear in the target machine's memory. */ - /* #define REAL_VALUE_TO_TARGET_SINGLE(X, L) */ - /* #define REAL_VALUE_TO_TARGET_DOUBLE(X, L) */ - /* #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(X, L) */ - - /* This macro converts X, of type `REAL_VALUE_TYPE', to a decimal number and - stores it as a string into STRING. You must pass, as STRING, the address of - a long enough block of space to hold the result. - - The argument FORMAT is a `printf'-specification that serves as a suggestion - for how to format the output string. */ - /* #define REAL_VALUE_TO_DECIMAL(X, FORMAT, STRING) */ - /* Output of Uninitialized Variables. */ --- 2640,2645 ---- *************** do { \ *** 2946,2972 **** /* Output and Generation of Labels. */ - /* A C statement (sans semicolon) to output to the stdio stream STREAM the - assembler definition of a label named NAME. Use the expression - `assemble_name (STREAM, NAME)' to output the name itself; before and after - that, output the additional assembler syntax for defining the name, and a - newline. */ - #define ASM_OUTPUT_LABEL(STREAM, NAME) \ - do { \ - assemble_name (STREAM, NAME); \ - fputs (":\n", STREAM); \ - } while (0) - /* A C statement to output to the stdio stream STREAM the assembler definition of a symbol named SYMBOL. */ #define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \ do { \ if (SYMBOL_REF_FLAG (SYMBOL)) \ ! { \ ! fputs ("@fptr(", STREAM); \ ! assemble_name (STREAM, XSTR (SYMBOL, 0)); \ ! fputc (')', STREAM); \ ! } \ else \ assemble_name (STREAM, XSTR (SYMBOL, 0)); \ } while (0) --- 2745,2756 ---- /* Output and Generation of Labels. */ /* A C statement to output to the stdio stream STREAM the assembler definition of a symbol named SYMBOL. */ #define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \ do { \ if (SYMBOL_REF_FLAG (SYMBOL)) \ ! ASM_OUTPUT_LABEL_REF ((STREAM), XSTR (SYMBOL, 0)); \ else \ assemble_name (STREAM, XSTR (SYMBOL, 0)); \ } while (0) *************** do { \ *** 3027,3043 **** Defined in svr4.h. */ /* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */ ! /* A C statement (sans semicolon) to output to the stdio stream STREAM some ! commands that will make the label NAME global; that is, available for ! reference from other files. Use the expression `assemble_name (STREAM, ! NAME)' to output the name itself; before and after that, output the ! additional assembler syntax for making that name global, and a newline. */ ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do { \ ! fputs ("\t.globl ", STREAM); \ ! assemble_name (STREAM, NAME); \ ! fputs ("\n", STREAM); \ ! } while (0) /* A C statement (sans semicolon) to output to the stdio stream STREAM some commands that will make the label NAME weak; that is, available for --- 2811,2818 ---- Defined in svr4.h. */ /* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.globl " /* A C statement (sans semicolon) to output to the stdio stream STREAM some commands that will make the label NAME weak; that is, available for *************** do { \ *** 3397,3410 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on the section ! that the address refers to. On these machines, define the macro ! `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and ! then check for it here. ! ! This declaration must be present. */ #define PRINT_OPERAND_ADDRESS(STREAM, X) xstormy16_print_operand_address (STREAM, X) /* A C statement, to be executed after all slot-filler instructions have been --- 3172,3178 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X. X ! is an RTL expression. */ #define PRINT_OPERAND_ADDRESS(STREAM, X) xstormy16_print_operand_address (STREAM, X) /* A C statement, to be executed after all slot-filler instructions have been *************** do { \ *** 3868,3877 **** /* Miscellaneous Parameters. */ - /* Define REAL_ARITHMETIC to use a software emulator for the target floating - point mode. Otherwise the host floating point mode is used. */ - #define REAL_ARITHMETIC - /* Define this if you have defined special-purpose predicates in the file `MACHINE.c'. This macro is called within an initializer of an array of structures. The first field in the structure is the name of a predicate and --- 3636,3641 ---- *************** do { \ *** 3957,3963 **** /* A C expression that is nonzero if on this machine the number of bits actually used for the count of a shift operation is equal to the number of bits needed to represent the size of the object being shifted. When this ! macro is non-zero, the compiler will assume that it is safe to omit a sign-extend, zero-extend, and certain bitwise `and' instructions that truncates the count of a shift operation. On machines that have instructions that act on bitfields at variable positions, which may include --- 3721,3727 ---- /* A C expression that is nonzero if on this machine the number of bits actually used for the count of a shift operation is equal to the number of bits needed to represent the size of the object being shifted. When this ! macro is nonzero, the compiler will assume that it is safe to omit a sign-extend, zero-extend, and certain bitwise `and' instructions that truncates the count of a shift operation. On machines that have instructions that act on bitfields at variable positions, which may include *************** do { \ *** 3966,3972 **** instructions. If both types of instructions truncate the count (for shifts) and position ! (for bitfield operations), or if no variable-position bitfield instructions exist, you should define this macro. However, on some machines, such as the 80386 and the 680x0, truncation only --- 3730,3736 ---- instructions. If both types of instructions truncate the count (for shifts) and position ! (for bit-field operations), or if no variable-position bit-field instructions exist, you should define this macro. However, on some machines, such as the 80386 and the 680x0, truncation only *************** do { \ *** 4059,4065 **** Some machines can also perform `and' or `plus' operations on condition code values with less instructions than the corresponding `sCOND' insn followed by `and' or `plus'. On those machines, define the appropriate patterns. ! Use the names `incscc' and `decscc', respectively, for the the patterns which perform `plus' or `minus' operations on condition code values. See `rs6000.md' for some examples. The GNU Superoptizer can be used to find such instruction sequences on other machines. --- 3823,3829 ---- Some machines can also perform `and' or `plus' operations on condition code values with less instructions than the corresponding `sCOND' insn followed by `and' or `plus'. On those machines, define the appropriate patterns. ! Use the names `incscc' and `decscc', respectively, for the patterns which perform `plus' or `minus' operations on condition code values. See `rs6000.md' for some examples. The GNU Superoptizer can be used to find such instruction sequences on other machines. *************** do { \ *** 4068,4074 **** instructions. */ /* #define STORE_FLAG_VALUE */ ! /* A C expression that gives a non-zero floating point value that is returned when comparison operators with floating-point results are true. Define this macro on machine that have comparison operations that return floating-point values. If there are no such operations, do not define this macro. */ --- 3832,3838 ---- instructions. */ /* #define STORE_FLAG_VALUE */ ! /* A C expression that gives a nonzero floating point value that is returned when comparison operators with floating-point results are true. Define this macro on machine that have comparison operations that return floating-point values. If there are no such operations, do not define this macro. */ *************** do { \ *** 4098,4109 **** should be used on RISC machines. */ /* #define INTEGRATE_THRESHOLD(DECL) */ - /* Define this if the preprocessor should ignore `#sccs' directives and print - no error message. - - Defined in svr4.h. */ - /* #define SCCS_DIRECTIVE */ - /* Define this macro if the system header files support C++ as well as C. This macro inhibits the usual method of using system header files in C++, which is to pretend that the file's contents are enclosed in `extern "C" {...}'. */ --- 3862,3867 ---- *************** do { \ *** 4132,4150 **** defined. Defined in svr4.h. */ ! #define HANDLE_SYSV_PRAGMA /* Define this macro if you want to support the Win32 style pragmas #pragma pack(push,) and #pragma pack(pop). */ /* HANDLE_PRAGMA_PACK_PUSH_POP 1 */ - /* Define this macro to control use of the character `$' in identifier names. - The value should be 0, 1, or 2. 0 means `$' is not allowed by default; 1 - means it is allowed by default if `-traditional' is used; 2 means it is - allowed by default provided `-ansi' is not used. 1 is the default; there is - no need to define this macro in that case. */ - /* #define DOLLARS_IN_IDENTIFIERS */ - /* Define this macro if the assembler does not accept the character `$' in label names. By default constructors and destructors in G++ have `$' in the identifiers. If this macro is defined, `.' is used instead. --- 3890,3901 ---- defined. Defined in svr4.h. */ ! #define HANDLE_SYSV_PRAGMA 1 /* Define this macro if you want to support the Win32 style pragmas #pragma pack(push,) and #pragma pack(pop). */ /* HANDLE_PRAGMA_PACK_PUSH_POP 1 */ /* Define this macro if the assembler does not accept the character `$' in label names. By default constructors and destructors in G++ have `$' in the identifiers. If this macro is defined, `.' is used instead. diff -Nrc3pad gcc-3.2.3/gcc/config/stormy16/stormy16.md gcc-3.3/gcc/config/stormy16/stormy16.md *** gcc-3.2.3/gcc/config/stormy16/stormy16.md 2002-02-11 17:04:31.000000000 +0000 --- gcc-3.3/gcc/config/stormy16/stormy16.md 2002-11-20 21:08:33.000000000 +0000 *************** *** 435,440 **** --- 435,476 ---- "div" [(set_attr "psw_operand" "nop")]) + ;; Signed division giving both quotient and remainder + (define_insn "divmodhi4" + [(set (match_operand:HI 0 "register_operand" "=a") + (div:HI (match_operand:HI 1 "register_operand" "a") + (match_operand:HI 2 "register_operand" "c"))) + (set (match_operand:HI 3 "register_operand" "=b") + (mod:HI (match_dup 1) + (match_dup 2)))] + "" + "sdiv" + [(set_attr "psw_operand" "nop")]) + + ;; Signed 32/16 division + (define_insn "sdivlh" + [(set (match_operand:HI 0 "register_operand" "=a") + (div:HI (match_operand:SI 2 "register_operand" "t") + (match_operand:HI 3 "register_operand" "c"))) + (set (match_operand:HI 1 "register_operand" "=b") + (mod:HI (match_dup 2) + (match_dup 3)))] + "" + "sdivlh" + [(set_attr "psw_operand" "nop")]) + + ;; Unsigned 32/16 division + (define_insn "udivlh" + [(set (match_operand:HI 0 "register_operand" "=a") + (udiv:HI (match_operand:SI 2 "register_operand" "t") + (match_operand:HI 3 "register_operand" "c"))) + (set (match_operand:HI 1 "register_operand" "=b") + (umod:HI (match_dup 2) + (match_dup 3)))] + "" + "divlh" + [(set_attr "psw_operand" "nop")]) + ;; Negation (define_expand "neghi2" diff -Nrc3pad gcc-3.2.3/gcc/config/stormy16/stormy16-protos.h gcc-3.3/gcc/config/stormy16/stormy16-protos.h *** gcc-3.2.3/gcc/config/stormy16/stormy16-protos.h 2002-02-01 15:20:16.000000000 +0000 --- gcc-3.3/gcc/config/stormy16/stormy16-protos.h 2002-10-20 22:37:14.000000000 +0000 *************** extern CUMULATIVE_ARGS xstormy16_functio *** 38,52 **** extern void xstormy16_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS, int, tree, int *)); extern tree xstormy16_build_va_list PARAMS ((void)); - extern void xstormy16_encode_section_info PARAMS ((tree)); #endif #if defined (TREE_CODE) && defined (RTX_CODE) ! extern void xstormy16_expand_builtin_va_start PARAMS ((int, tree, rtx)); extern rtx xstormy16_expand_builtin_va_arg PARAMS ((tree, tree)); extern void xstormy16_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern rtx xstormy16_function_value PARAMS ((tree, tree)); - extern void xstormy16_asm_output_mi_thunk PARAMS ((FILE *, tree, int, tree)); #endif #ifdef RTX_CODE --- 38,50 ---- extern void xstormy16_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS, int, tree, int *)); extern tree xstormy16_build_va_list PARAMS ((void)); #endif #if defined (TREE_CODE) && defined (RTX_CODE) ! extern void xstormy16_expand_builtin_va_start PARAMS ((tree, rtx)); extern rtx xstormy16_expand_builtin_va_arg PARAMS ((tree, tree)); extern void xstormy16_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern rtx xstormy16_function_value PARAMS ((tree, tree)); #endif #ifdef RTX_CODE diff -Nrc3pad gcc-3.2.3/gcc/config/stormy16/stormy-abi gcc-3.3/gcc/config/stormy16/stormy-abi *** gcc-3.2.3/gcc/config/stormy16/stormy-abi 2001-11-09 01:16:55.000000000 +0000 --- gcc-3.3/gcc/config/stormy16/stormy-abi 2002-09-24 12:49:04.000000000 +0000 *************** count-> r2 *** 105,111 **** ... last procedure parameter word ! and initialises 'count' to be the number of bytes of non-variable arguments to the function. ELF File Format --- 105,111 ---- ... last procedure parameter word ! and initializes 'count' to be the number of bytes of non-variable arguments to the function. ELF File Format *************** the storage unit being relocated. *** 149,155 **** In the 'Field' column, the first number indicates whether the relocation refers to a byte, word or doubleword. The second number, ! if any, indicates the size of the bitfield into which the relocation is to occur (and also the size for overflow checking). The third ! number indicates the first bit of the bitfield in the word or doubleword, counting the LSB as bit 0. --- 149,155 ---- In the 'Field' column, the first number indicates whether the relocation refers to a byte, word or doubleword. The second number, ! if any, indicates the size of the bit-field into which the relocation is to occur (and also the size for overflow checking). The third ! number indicates the first bit of the bit-field in the word or doubleword, counting the LSB as bit 0. diff -Nrc3pad gcc-3.2.3/gcc/config/svr3.h gcc-3.3/gcc/config/svr3.h *** gcc-3.2.3/gcc/config/svr3.h 2001-12-17 15:05:24.000000000 +0000 --- gcc-3.3/gcc/config/svr3.h 2002-08-29 21:40:08.000000000 +0000 *************** *** 1,6 **** /* Operating system specific defines to be used when targeting GCC for generic System V Release 3 system. ! Copyright (C) 1991, 1996, 2000 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com). This file is part of GNU CC. --- 1,6 ---- /* Operating system specific defines to be used when targeting GCC for generic System V Release 3 system. ! Copyright (C) 1991, 1996, 2000, 2002 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com). This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. *** 113,122 **** #define LINK_SPEC "%{T*} %{z:-lm}" #endif - /* Allow #sccs in preprocessor. */ - - #define SCCS_DIRECTIVE - /* Output #ident as a .ident. */ #undef ASM_OUTPUT_IDENT --- 113,118 ---- *************** Boston, MA 02111-1307, USA. *** 133,139 **** /* System V Release 3 uses COFF debugging info. */ ! #define SDB_DEBUGGING_INFO /* We don't want to output DBX debugging information. */ --- 129,135 ---- /* System V Release 3 uses COFF debugging info. */ ! #define SDB_DEBUGGING_INFO 1 /* We don't want to output DBX debugging information. */ *************** Boston, MA 02111-1307, USA. *** 188,203 **** #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." ! /* Support const sections and the ctors and dtors sections for g++. ! Note that there appears to be two different ways to support const ! sections at the moment. You can either #define the symbol ! READONLY_DATA_SECTION (giving it some code which switches to the ! readonly data section) or else you can #define the symbols ! EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and ! SELECT_RTX_SECTION. We do both here just to be on the safe side. ! However, use of the const section is turned off by default ! unless the specific tm.h file turns it on by defining ! USE_CONST_SECTION as 1. */ /* Define a few machine-specific details of the implementation of constructors. --- 184,190 ---- #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." ! /* Support const sections and the ctors and dtors sections for g++. */ /* Define a few machine-specific details of the implementation of constructors. *************** Boston, MA 02111-1307, USA. *** 208,218 **** Define TARGET_ASM_CONSTRUCTOR to push the address of the constructor. */ - #define USE_CONST_SECTION 0 - #define INIT_SECTION_ASM_OP "\t.section\t.init" #define FINI_SECTION_ASM_OP "\t.section .fini,\"x\"" - #define CONST_SECTION_ASM_OP "\t.section\t.rodata, \"x\"" #define DTORS_SECTION_ASM_OP FINI_SECTION_ASM_OP /* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent --- 195,202 ---- *************** do { \ *** 243,256 **** #endif /* STACK_GROWS_DOWNWARD */ - /* Add extra sections .rodata, .init and .fini. */ - #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_const, in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION --- 227,237 ---- #endif /* STACK_GROWS_DOWNWARD */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_init, in_fini #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION *************** fini_section () \ *** 275,331 **** in_section = in_fini; \ } \ } - - #define READONLY_DATA_SECTION() const_section () - - #define CONST_SECTION_FUNCTION \ - void \ - const_section () \ - { \ - if (!USE_CONST_SECTION) \ - text_section(); \ - else if (in_section != in_const) \ - { \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ - in_section = in_const; \ - } \ - } - - /* A C statement or statements to switch to the appropriate - section for output of DECL. DECL is either a `VAR_DECL' node - or a constant of some sort. RELOC indicates whether forming - the initial value of DECL requires link-time relocations. */ - - #undef SELECT_SECTION - #define SELECT_SECTION(DECL,RELOC,ALIGN) \ - { \ - if (TREE_CODE (DECL) == STRING_CST) \ - { \ - if (! flag_writable_strings) \ - const_section (); \ - else \ - data_section (); \ - } \ - else if (TREE_CODE (DECL) == VAR_DECL) \ - { \ - if ((0 && RELOC) /* should be (flag_pic && RELOC) */ \ - || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ - || !DECL_INITIAL (DECL) \ - || (DECL_INITIAL (DECL) != error_mark_node \ - && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ - data_section (); \ - else \ - const_section (); \ - } \ - else \ - const_section (); \ - } - - /* A C statement or statements to switch to the appropriate - section for output of RTX in mode MODE. RTX is some kind - of constant in RTL. The argument MODE is redundant except - in the case of a `const_int' rtx. Currently, these always - go into the const section. */ - - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) const_section() --- 256,258 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/svr4.h gcc-3.3/gcc/config/svr4.h *** gcc-3.2.3/gcc/config/svr4.h 2001-10-19 22:27:22.000000000 +0000 --- gcc-3.3/gcc/config/svr4.h 2002-07-17 21:31:30.000000000 +0000 *************** Boston, MA 02111-1307, USA. *** 173,188 **** %{Qy:} %{!Qn:-Qy}" #endif ! /* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o, ! /usr/ccs/lib/values-Xa.o, or /usr/ccs/lib/values-Xt.o for each final ! link step (depending upon the other gcc options selected, such as ! -traditional and -ansi). These files each contain one (initialized) ! copy of a special variable called `_lib_version'. Each one of these ! files has `_lib_version' initialized to a different (enum) value. ! The SVR4 library routines query the value of `_lib_version' at run ! to decide how they should behave. Specifically, they decide (based ! upon the value of `_lib_version') if they will act in a strictly ANSI ! conforming manner or not. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared: \ --- 173,187 ---- %{Qy:} %{!Qn:-Qy}" #endif ! /* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o ! or /usr/ccs/lib/values-Xa.o for each final link step (depending ! upon the other gcc options selected, such as -ansi). These files ! each contain one (initialized) copy of a special variable called ! `_lib_version'. Each one of these files has `_lib_version' initialized ! to a different (enum) value. The SVR4 library routines query the ! value of `_lib_version' at run to decide how they should behave. ! Specifically, they decide (based upon the value of `_lib_version') ! if they will act in a strictly ANSI conforming manner or not. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared: \ *************** Boston, MA 02111-1307, USA. *** 190,204 **** %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ %{pg:gcrti.o%s}%{!pg:crti.o%s} \ %{ansi:values-Xc.o%s} \ ! %{!ansi: \ ! %{traditional:values-Xt.o%s} \ ! %{!traditional:values-Xa.o%s}} \ crtbegin.o%s" - /* Allow #sccs in preprocessor. */ - - #define SCCS_DIRECTIVE - /* The numbers used to denote specific machine registers in the System V Release 4 DWARF debugging information are quite likely to be totally different from the numbers used in BSD stabs debugging information --- 189,197 ---- %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ %{pg:gcrti.o%s}%{!pg:crti.o%s} \ %{ansi:values-Xc.o%s} \ ! %{!ansi:values-Xa.o%s} \ crtbegin.o%s" /* The numbers used to denote specific machine registers in the System V Release 4 DWARF debugging information are quite likely to be totally different from the numbers used in BSD stabs debugging information diff -Nrc3pad gcc-3.2.3/gcc/config/t-darwin gcc-3.3/gcc/config/t-darwin *** gcc-3.2.3/gcc/config/t-darwin 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/t-darwin 2002-11-07 06:00:05.000000000 +0000 *************** *** 0 **** --- 1,22 ---- + darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) $(RTL_BASE_H) \ + $(REGS_H) hard-reg-set.h insn-config.h conditions.h output.h \ + insn-attr.h flags.h $(TREE_H) $(EXPR_H) reload.h \ + function.h $(GGC_H) $(TM_P_H) gt-darwin.h + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< + + darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) \ + $(TREE_H) $(C_TREE_H) c-pragma.h toplev.h cpplib.h $(TM_P_H) + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< + + gt-darwin.h : s-gtype ; @true + + # Explain how to build crt2.o + $(T)crt2$(objext): $(srcdir)/config/darwin-crt2.c $(GCC_PASSES) \ + $(TCONFIG_H) tsystem.h + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \ + -c $(srcdir)/config/darwin-crt2.c -o $(T)crt2$(objext) + + # Use unwind-dw2-fde-darwin + LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-darwin.c \ + $(srcdir)/unwind-sjlj.c + LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c diff -Nrc3pad gcc-3.2.3/gcc/config/t-install-cpp gcc-3.3/gcc/config/t-install-cpp *** gcc-3.2.3/gcc/config/t-install-cpp 1999-03-02 00:59:35.000000000 +0000 --- gcc-3.3/gcc/config/t-install-cpp 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - # Handle cpp installation. - INSTALL_CPP=install-cpp - UNINSTALL_CPP=uninstall-cpp --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/t-libc-ok gcc-3.3/gcc/config/t-libc-ok *** gcc-3.2.3/gcc/config/t-libc-ok 2001-05-17 03:15:44.000000000 +0000 --- gcc-3.3/gcc/config/t-libc-ok 2002-11-26 22:47:18.000000000 +0000 *************** *** 1 **** ! CRTSTUFF_T_FLAGS_S=-fPIC --- 1 ---- ! CRTSTUFF_T_CFLAGS_S=-fPIC diff -Nrc3pad gcc-3.2.3/gcc/config/t-linux gcc-3.3/gcc/config/t-linux *** gcc-3.2.3/gcc/config/t-linux 2001-12-15 11:46:55.000000000 +0000 --- gcc-3.3/gcc/config/t-linux 2002-11-28 14:47:01.000000000 +0000 *************** *** 2,8 **** STMP_FIXPROTO = # Compile crtbeginS.o and crtendS.o with pic. ! CRTSTUFF_T_CFLAGS_S = -fPIC # Compile libgcc2.a with pic. TARGET_LIBGCC2_CFLAGS = -fPIC --- 2,8 ---- STMP_FIXPROTO = # Compile crtbeginS.o and crtendS.o with pic. ! CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC # Compile libgcc2.a with pic. TARGET_LIBGCC2_CFLAGS = -fPIC diff -Nrc3pad gcc-3.2.3/gcc/config/t-netbsd gcc-3.3/gcc/config/t-netbsd *** gcc-3.2.3/gcc/config/t-netbsd 2001-05-17 03:15:44.000000000 +0000 --- gcc-3.3/gcc/config/t-netbsd 2003-02-15 18:21:31.000000000 +0000 *************** *** 1,2 **** --- 1,5 ---- # Don't run fixproto STMP_FIXPROTO = + + # Always build crtstuff with PIC. + CRTSTUFF_T_CFLAGS = -fPIC diff -Nrc3pad gcc-3.2.3/gcc/config/v850/lib1funcs.asm gcc-3.3/gcc/config/v850/lib1funcs.asm *** gcc-3.2.3/gcc/config/v850/lib1funcs.asm 2001-05-17 03:16:14.000000000 +0000 --- gcc-3.3/gcc/config/v850/lib1funcs.asm 2002-09-20 23:36:30.000000000 +0000 *************** *** 1,5 **** /* libgcc routines for NEC V850. ! Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* libgcc routines for NEC V850. ! Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 31,100 **** .text .globl ___mulsi3 .type ___mulsi3,@function - - /* - * #define SHIFT 12 - * #define MASK ((1 << SHIFT) - 1) - * - * #define STEP(i, j) \ - * ({ \ - * short a_part = (a >> (i)) & MASK; \ - * short b_part = (b >> (j)) & MASK; \ - * int res = (((int)a_part) * ((int)b_part)); \ - * res; \ - * }) - * - * int - * __mulsi3 (unsigned a, unsigned b) - * { - * return STEP (0, 0) + - * ((STEP (SHIFT, 0) + STEP (0, SHIFT)) << SHIFT) + - * ((STEP (0, 2 * SHIFT) + STEP (SHIFT, SHIFT) + STEP (2 * SHIFT, 0)) - * << (2 * SHIFT)); - * } - */ - ___mulsi3: ! mov r6,r13 ! movea lo(4095),r0,r16 ! and r16,r13 ! mov r7,r15 ! and r16,r15 ! mov r13,r10 ! mulh r15,r10 ! shr 12,r6 ! mov r6,r14 ! and r16,r14 ! mov r14,r11 ! mulh r15,r11 ! shr 12,r7 ! mov r7,r12 ! and r16,r12 ! shr 12,r7 ! and r16,r7 ! mulh r13,r7 ! shr 12,r6 ! mulh r12,r13 ! and r16,r6 ! add r13,r11 ! shl 12,r11 ! add r11,r10 ! mov r14,r11 ! mulh r12,r11 ! mulh r15,r6 ! add r11,r7 ! add r6,r7 ! shl 24,r7 ! add r7,r10 ! jmp [r31] .size ___mulsi3,.-___mulsi3 ! #endif #ifdef L_udivsi3 .text .global ___udivsi3 .type ___udivsi3,@function ___udivsi3: mov 1,r12 mov 0,r10 cmp r6,r7 --- 31,117 ---- .text .globl ___mulsi3 .type ___mulsi3,@function ___mulsi3: ! #ifdef __v850__ ! /* ! #define SHIFT 12 ! #define MASK ((1 << SHIFT) - 1) ! ! #define STEP(i, j) \ ! ({ \ ! short a_part = (a >> (i)) & MASK; \ ! short b_part = (b >> (j)) & MASK; \ ! int res = (((int) a_part) * ((int) b_part)); \ ! res; \ ! }) ! ! int ! __mulsi3 (unsigned a, unsigned b) ! { ! return STEP (0, 0) + ! ((STEP (SHIFT, 0) + STEP (0, SHIFT)) << SHIFT) + ! ((STEP (0, 2 * SHIFT) + STEP (SHIFT, SHIFT) + STEP (2 * SHIFT, 0)) ! << (2 * SHIFT)); ! } ! */ ! mov r6, r14 ! movea lo(32767), r0, r10 ! and r10, r14 ! mov r7, r15 ! and r10, r15 ! shr 15, r6 ! mov r6, r13 ! and r10, r13 ! shr 15, r7 ! mov r7, r12 ! and r10, r12 ! shr 15, r6 ! shr 15, r7 ! mov r14, r10 ! mulh r15, r10 ! mov r14, r11 ! mulh r12, r11 ! mov r13, r16 ! mulh r15, r16 ! mulh r14, r7 ! mulh r15, r6 ! add r16, r11 ! mulh r13, r12 ! shl 15, r11 ! add r11, r10 ! add r12, r7 ! add r6, r7 ! shl 30, r7 ! add r7, r10 ! jmp [r31] ! #endif /* __v850__ */ ! #if defined(__v850e__) || defined(__v850ea__) ! /* This routine is almost unneccesarry because gcc ! generates the MUL instruction for the RTX mulsi3. ! But if someone wants to link his application with ! previsously compiled v850 objects then they will ! need this function. */ ! ! /* It isn't good to put the inst sequence as below; ! mul r7, r6, ! mov r6, r10, r0 ! In this case, there is a RAW hazard between them. ! MUL inst takes 2 cycle in EX stage, then MOV inst ! must wait 1cycle. */ ! mov r7, r10 ! mul r6, r10, r0 ! jmp [r31] ! #endif /* __v850e__ */ .size ___mulsi3,.-___mulsi3 ! #endif /* L_mulsi3 */ ! #ifdef L_udivsi3 .text .global ___udivsi3 .type ___udivsi3,@function ___udivsi3: + #ifdef __v850__ mov 1,r12 mov 0,r10 cmp r6,r7 *************** ___udivsi3: *** 126,131 **** --- 143,158 ---- bne .L9 .L8: jmp [r31] + + #else /* defined(__v850e__) */ + + /* See comments at end of __mulsi3. */ + mov r6, r10 + divu r7, r10, r0 + jmp [r31] + + #endif /* __v850e__ */ + .size ___udivsi3,.-___udivsi3 #endif *************** ___udivsi3: *** 134,139 **** --- 161,167 ---- .globl ___divsi3 .type ___divsi3,@function ___divsi3: + #ifdef __v850__ add -8,sp st.w r31,4[sp] st.w r22,0[sp] *************** ___divsi3: *** 157,162 **** --- 185,200 ---- ld.w 4[sp],r31 add 8,sp jmp [r31] + + #else /* defined(__v850e__) */ + + /* See comments at end of __mulsi3. */ + mov r6, r10 + div r7, r10, r0 + jmp [r31] + + #endif /* __v850e__ */ + .size ___divsi3,.-___divsi3 #endif *************** ___divsi3: *** 165,170 **** --- 203,209 ---- .globl ___umodsi3 .type ___umodsi3,@function ___umodsi3: + #ifdef __v850__ add -12,sp st.w r31,8[sp] st.w r7,4[sp] *************** ___umodsi3: *** 178,183 **** --- 217,231 ---- ld.w 8[sp],r31 add 12,sp jmp [r31] + + #else /* defined(__v850e__) */ + + /* See comments at end of __mulsi3. */ + divu r7, r6, r10 + jmp [r31] + + #endif /* __v850e__ */ + .size ___umodsi3,.-___umodsi3 #endif /* L_umodsi3 */ *************** ___umodsi3: *** 186,191 **** --- 234,240 ---- .globl ___modsi3 .type ___modsi3,@function ___modsi3: + #ifdef __v850__ add -12,sp st.w r31,8[sp] st.w r7,4[sp] *************** ___modsi3: *** 199,204 **** --- 248,262 ---- ld.w 8[sp],r31 add 12,sp jmp [r31] + + #else /* defined(__v850e__) */ + + /* See comments at end of __mulsi3. */ + div r7, r6, r10 + jmp [r31] + + #endif /* __v850e__ */ + .size ___modsi3,.-___modsi3 #endif /* L_modsi3 */ *************** __return_r29_r31: *** 1114,1120 **** .type __save_r31,@function /* Allocate space and save register 31 on the stack */ /* Also allocate space for the argument save area */ ! /* Called via: jalr __save_r29_r31,r10 */ __save_r31: addi -20,sp,sp st.w r31,16[sp] --- 1172,1178 ---- .type __save_r31,@function /* Allocate space and save register 31 on the stack */ /* Also allocate space for the argument save area */ ! /* Called via: jalr __save_r31,r10 */ __save_r31: addi -20,sp,sp st.w r31,16[sp] *************** __return_r31: *** 1130,1136 **** ld.w 16[sp],r31 addi 20,sp,sp jmp [r31] ! .size __return_r29_r31,.-__return_r29_r31 #endif /* L_save_31c */ #ifdef L_save_varargs --- 1188,1194 ---- ld.w 16[sp],r31 addi 20,sp,sp jmp [r31] ! .size __return_r31,.-__return_r31 #endif /* L_save_31c */ #ifdef L_save_varargs *************** __restore_all_interrupt: *** 1267,1269 **** --- 1325,1885 ---- jmp [r10] .size __restore_all_interrupt,.-__restore_all_interrupt #endif /* L_save_all_interrupt */ + + + #if defined __v850e__ + #ifdef L_callt_save_r2_r29 + /* Put these functions into the call table area. */ + .call_table_text + + /* Allocate space and save registers 2, 20 .. 29 on the stack. */ + /* Called via: callt ctoff(__callt_save_r2_r29). */ + .align 2 + .L_save_r2_r29: + add -4, sp + st.w r2, 0[sp] + prepare {r20 - r29}, 0 + ctret + + /* Restore saved registers, deallocate stack and return to the user. */ + /* Called via: callt ctoff(__callt_return_r2_r29). */ + .align 2 + .L_return_r2_r29: + dispose 0, {r20-r29} + ld.w 0[sp], r2 + add 4, sp + jmp [r31] + + /* Place the offsets of the start of these routines into the call table. */ + .call_table_data + + .global __callt_save_r2_r29 + .type __callt_save_r2_r29,@function + __callt_save_r2_r29: .short ctoff(.L_save_r2_r29) + + .global __callt_return_r2_r29 + .type __callt_return_r2_r29,@function + __callt_return_r2_r29: .short ctoff(.L_return_r2_r29) + + #endif /* L_callt_save_r2_r29 */ + + #ifdef L_callt_save_r2_r31 + /* Put these functions into the call table area. */ + .call_table_text + + /* Allocate space and save registers 2 and 20 .. 29, 31 on the stack. */ + /* Also allocate space for the argument save area. */ + /* Called via: callt ctoff(__callt_save_r2_r31). */ + .align 2 + .L_save_r2_r31: + add -4, sp + st.w r2, 0[sp] + prepare {r20 - r29, r31}, 4 + ctret + + /* Restore saved registers, deallocate stack and return to the user. */ + /* Called via: callt ctoff(__callt_return_r2_r31). */ + .align 2 + .L_return_r2_r31: + dispose 4, {r20 - r29, r31} + ld.w 0[sp], r2 + addi 4, sp, sp + jmp [r31] + + /* Place the offsets of the start of these routines into the call table. */ + .call_table_data + + .global __callt_save_r2_r31 + .type __callt_save_r2_r31,@function + __callt_save_r2_r31: .short ctoff(.L_save_r2_r31) + + .global __callt_return_r2_r31 + .type __callt_return_r2_r31,@function + __callt_return_r2_r31: .short ctoff(.L_return_r2_r31) + + #endif /* L_callt_save_r2_r31 */ + + + #ifdef L_callt_save_r6_r9 + /* Put these functions into the call table area. */ + .call_table_text + + /* Save registers r6 - r9 onto the stack in the space reserved for them. + Use by variable argument functions. + Called via: callt ctoff(__callt_save_r6_r9). */ + .align 2 + .L_save_r6_r9: + mov ep,r1 + mov sp,ep + sst.w r6,0[ep] + sst.w r7,4[ep] + sst.w r8,8[ep] + sst.w r9,12[ep] + mov r1,ep + ctret + + /* Place the offsets of the start of this routines into the call table. */ + .call_table_data + + .global __callt_save_r6_r9 + .type __callt_save_r6_r9,@function + __callt_save_r6_r9: .short ctoff(.L_save_r6_r9) + #endif /* L_callt_save_r6_r9 */ + + + #ifdef L_callt_save_interrupt + /* Put this functions into the call table area */ + .call_table_text + + /* Save registers r1, ep, gp, r10 on stack and load up with expected values. */ + /* Called via: callt ctoff(__callt_save_interrupt). */ + .align 2 + .L_save_interrupt: + /* SP has already been moved before callt ctoff(_save_interrupt). */ + /* addi -24, sp, sp */ + st.w ep, 0[sp] + st.w gp, 4[sp] + st.w r1, 8[sp] + /* R10 has alread been saved bofore callt ctoff(_save_interrupt). */ + /* st.w r10, 12[sp] */ + mov hilo(__ep),ep + mov hilo(__gp),gp + ctret + + /* Place the offsets of the start of the routine into the call table. */ + .call_table_data + .global __callt_save_interrupt + .type __callt_save_interrupt,@function + __callt_save_interrupt: .short ctoff(.L_save_interrupt) + + .call_table_text + + /* Restore saved registers, deallocate stack and return from the interrupt. */ + /* Called via: callt ctoff(__callt_restore_itnerrupt). */ + .text + .align 2 + .globl __return_interrupt + .type __return_interrupt,@function + .L_return_interrupt: + ld.w 20[sp], r1 + ldsr r1, ctpsw + ld.w 16[sp], r1 + ldsr r1, ctpc + ld.w 12[sp], r10 + ld.w 8[sp], r1 + ld.w 4[sp], gp + ld.w 0[sp], ep + addi 24, sp, sp + reti + + /* Place the offsets of the start of the routine into the call table. */ + .call_table_data + + .global __callt_return_interrupt + .type __callt_return_interrupt,@function + __callt_return_interrupt: .short ctoff(.L_return_interrupt) + + #endif /* L_callt_save_interrupt */ + + #ifdef L_callt_save_all_interrupt + /* Put this functions into the call table area. */ + .call_table_text + + /* Save all registers except for those saved in __save_interrupt. */ + /* Allocate enough stack for all of the registers & 16 bytes of space. */ + /* Called via: callt ctoff(__callt_save_all_interrupt). */ + .align 2 + .L_save_all_interrupt: + addi -60, sp, sp + mov ep, r1 + mov sp, ep + sst.w r2, 56[ep] + sst.w r5, 52[ep] + sst.w r6, 48[ep] + sst.w r7, 44[ep] + sst.w r8, 40[ep] + sst.w r9, 36[ep] + sst.w r11, 32[ep] + sst.w r12, 28[ep] + sst.w r13, 24[ep] + sst.w r14, 20[ep] + sst.w r15, 16[ep] + sst.w r16, 12[ep] + sst.w r17, 8[ep] + sst.w r18, 4[ep] + sst.w r19, 0[ep] + mov r1, ep + + prepare {r20 - r29, r31}, 4 + ctret + + /* Restore all registers saved in __save_all_interrupt. */ + /* & deallocate the stack space. */ + /* Called via: callt ctoff(__callt_restore_all_interrupt). */ + .align 2 + .L_restore_all_interrupt: + dispose 4, {r20 - r29, r31} + + mov ep, r1 + mov sp, ep + sld.w 0 [ep], r19 + sld.w 4 [ep], r18 + sld.w 8 [ep], r17 + sld.w 12[ep], r16 + sld.w 16[ep], r15 + sld.w 20[ep], r14 + sld.w 24[ep], r13 + sld.w 28[ep], r12 + sld.w 32[ep], r11 + sld.w 36[ep], r9 + sld.w 40[ep], r8 + sld.w 44[ep], r7 + sld.w 48[ep], r6 + sld.w 52[ep], r5 + sld.w 56[ep], r2 + mov r1, ep + addi 60, sp, sp + ctret + + /* Place the offsets of the start of these routines into the call table. */ + .call_table_data + + .global __callt_save_all_interrupt + .type __callt_save_all_interrupt,@function + __callt_save_all_interrupt: .short ctoff(.L_save_all_interrupt) + + .global __callt_restore_all_interrupt + .type __callt_restore_all_interrupt,@function + __callt_restore_all_interrupt: .short ctoff(.L_restore_all_interrupt) + + #endif /* L_callt_save_all_interrupt */ + + + #define MAKE_CALLT_FUNCS( START ) \ + .call_table_text ;\ + .align 2 ;\ + /* Allocate space and save registers START .. r29 on the stack. */ ;\ + /* Called via: callt ctoff(__callt_save_START_r29). */ ;\ + .L_save_##START##_r29: ;\ + prepare { START - r29 }, 0 ;\ + ctret ;\ + ;\ + /* Restore saved registers, deallocate stack and return. */ ;\ + /* Called via: callt ctoff(__return_START_r29) */ ;\ + .align 2 ;\ + .L_return_##START##_r29: ;\ + dispose 0, { START - r29 }, r31 ;\ + ;\ + /* Place the offsets of the start of these funcs into the call table. */;\ + .call_table_data ;\ + ;\ + .global __callt_save_##START##_r29 ;\ + .type __callt_save_##START##_r29,@function ;\ + __callt_save_##START##_r29: .short ctoff(.L_save_##START##_r29 ) ;\ + ;\ + .global __callt_return_##START##_r29 ;\ + .type __callt_return_##START##_r29,@function ;\ + __callt_return_##START##_r29: .short ctoff(.L_return_##START##_r29 ) + + + #define MAKE_CALLT_CFUNCS( START ) \ + .call_table_text ;\ + .align 2 ;\ + /* Allocate space and save registers START .. r31 on the stack. */ ;\ + /* Called via: callt ctoff(__callt_save_START_r31c). */ ;\ + .L_save_##START##_r31c: ;\ + prepare { START - r29, r31}, 4 ;\ + ctret ;\ + ;\ + /* Restore saved registers, deallocate stack and return. */ ;\ + /* Called via: callt ctoff(__return_START_r31c). */ ;\ + .align 2 ;\ + .L_return_##START##_r31c: ;\ + dispose 4, { START - r29, r31}, r31 ;\ + ;\ + /* Place the offsets of the start of these funcs into the call table. */;\ + .call_table_data ;\ + ;\ + .global __callt_save_##START##_r31c ;\ + .type __callt_save_##START##_r31c,@function ;\ + __callt_save_##START##_r31c: .short ctoff(.L_save_##START##_r31c ) ;\ + ;\ + .global __callt_return_##START##_r31c ;\ + .type __callt_return_##START##_r31c,@function ;\ + __callt_return_##START##_r31c: .short ctoff(.L_return_##START##_r31c ) + + + #ifdef L_callt_save_20 + MAKE_CALLT_FUNCS (r20) + #endif + #ifdef L_callt_save_21 + MAKE_CALLT_FUNCS (r21) + #endif + #ifdef L_callt_save_22 + MAKE_CALLT_FUNCS (r22) + #endif + #ifdef L_callt_save_23 + MAKE_CALLT_FUNCS (r23) + #endif + #ifdef L_callt_save_24 + MAKE_CALLT_FUNCS (r24) + #endif + #ifdef L_callt_save_25 + MAKE_CALLT_FUNCS (r25) + #endif + #ifdef L_callt_save_26 + MAKE_CALLT_FUNCS (r26) + #endif + #ifdef L_callt_save_27 + MAKE_CALLT_FUNCS (r27) + #endif + #ifdef L_callt_save_28 + MAKE_CALLT_FUNCS (r28) + #endif + #ifdef L_callt_save_29 + MAKE_CALLT_FUNCS (r29) + #endif + + #ifdef L_callt_save_20c + MAKE_CALLT_CFUNCS (r20) + #endif + #ifdef L_callt_save_21c + MAKE_CALLT_CFUNCS (r21) + #endif + #ifdef L_callt_save_22c + MAKE_CALLT_CFUNCS (r22) + #endif + #ifdef L_callt_save_23c + MAKE_CALLT_CFUNCS (r23) + #endif + #ifdef L_callt_save_24c + MAKE_CALLT_CFUNCS (r24) + #endif + #ifdef L_callt_save_25c + MAKE_CALLT_CFUNCS (r25) + #endif + #ifdef L_callt_save_26c + MAKE_CALLT_CFUNCS (r26) + #endif + #ifdef L_callt_save_27c + MAKE_CALLT_CFUNCS (r27) + #endif + #ifdef L_callt_save_28c + MAKE_CALLT_CFUNCS (r28) + #endif + #ifdef L_callt_save_29c + MAKE_CALLT_CFUNCS (r29) + #endif + + + #ifdef L_callt_save_31c + .call_table_text + .align 2 + /* Allocate space and save register r31 on the stack. */ + /* Called via: callt ctoff(__callt_save_r31c). */ + .L_callt_save_r31c: + prepare {r31}, 4 + ctret + + /* Restore saved registers, deallocate stack and return. */ + /* Called via: callt ctoff(__return_r31c). */ + .align 2 + .L_callt_return_r31c: + dispose 4, {r31}, r31 + + /* Place the offsets of the start of these funcs into the call table. */ + .call_table_data + + .global __callt_save_r31c + .type __callt_save_r31c,@function + __callt_save_r31c: .short ctoff(.L_callt_save_r31c) + + .global __callt_return_r31c + .type __callt_return_r31c,@function + __callt_return_r31c: .short ctoff(.L_callt_return_r31c) + #endif + + #endif /* __v850e__ */ + + /* libgcc2 routines for NEC V850. */ + /* Double Integer Arithmetical Operation. */ + + #ifdef L_negdi2 + .text + .global ___negdi2 + .type ___negdi2, @function + ___negdi2: + not r6, r10 + add 1, r10 + setf l, r6 + not r7, r11 + add r6, r11 + jmp [lp] + + .size ___negdi2,.-___negdi2 + #endif + + #ifdef L_cmpdi2 + .text + .global ___cmpdi2 + .type ___cmpdi2,@function + ___cmpdi2: + # Signed comparison bitween each high word. + cmp r9, r7 + be .L_cmpdi_cmp_low + setf ge, r10 + setf gt, r6 + add r6, r10 + jmp [lp] + .L_cmpdi_cmp_low: + # Unsigned comparigon bitween each low word. + cmp r8, r6 + setf nl, r10 + setf h, r6 + add r6, r10 + jmp [lp] + .size ___cmpdi2, . - ___cmpdi2 + #endif + + #ifdef L_ucmpdi2 + .text + .global ___ucmpdi2 + .type ___ucmpdi2,@function + ___ucmpdi2: + cmp r9, r7 # Check if each high word are same. + be .L_ucmpdi_check_psw + cmp r8, r6 # Compare the word. + .L_ucmpdi_check_psw: + setf nl, r10 # + setf h, r6 # + add r6, r10 # Add the result of comparison NL and comparison H. + jmp [lp] + .size ___ucmpdi2, . - ___ucmpdi2 + #endif + + #ifdef L_muldi3 + .text + .global ___muldi3 + .type ___muldi3,@function + ___muldi3: + #ifdef __v850__ + jarl __save_r26_r31, r10 + addi 16, sp, sp + mov r6, r28 + shr 15, r28 + movea lo(32767), r0, r14 + and r14, r28 + mov r8, r10 + shr 15, r10 + and r14, r10 + mov r6, r19 + shr 30, r19 + mov r7, r12 + shl 2, r12 + or r12, r19 + and r14, r19 + mov r8, r13 + shr 30, r13 + mov r9, r12 + shl 2, r12 + or r12, r13 + and r14, r13 + mov r7, r11 + shr 13, r11 + and r14, r11 + mov r9, r31 + shr 13, r31 + and r14, r31 + mov r7, r29 + shr 28, r29 + and r14, r29 + mov r9, r12 + shr 28, r12 + and r14, r12 + and r14, r6 + and r14, r8 + mov r6, r14 + mulh r8, r14 + mov r6, r16 + mulh r10, r16 + mov r6, r18 + mulh r13, r18 + mov r6, r15 + mulh r31, r15 + mulh r12, r6 + mov r28, r17 + mulh r10, r17 + add -16, sp + mov r28, r12 + mulh r8, r12 + add r17, r18 + mov r28, r17 + mulh r31, r17 + add r12, r16 + mov r28, r12 + mulh r13, r12 + add r17, r6 + mov r19, r17 + add r12, r15 + mov r19, r12 + mulh r8, r12 + mulh r10, r17 + add r12, r18 + mov r19, r12 + mulh r13, r12 + add r17, r15 + mov r11, r13 + mulh r8, r13 + add r12, r6 + mov r11, r12 + mulh r10, r12 + add r13, r15 + mulh r29, r8 + add r12, r6 + mov r16, r13 + shl 15, r13 + add r14, r13 + mov r18, r12 + shl 30, r12 + mov r13, r26 + add r12, r26 + shr 15, r14 + movhi hi(131071), r0, r12 + movea lo(131071), r12, r13 + and r13, r14 + mov r16, r12 + and r13, r12 + add r12, r14 + mov r18, r12 + shl 15, r12 + and r13, r12 + add r12, r14 + shr 17, r14 + shr 17, r16 + add r14, r16 + shl 13, r15 + shr 2, r18 + add r18, r15 + add r15, r16 + mov r16, r27 + add r8, r6 + shl 28, r6 + add r6, r27 + mov r26, r10 + mov r27, r11 + jr __return_r26_r31 + #endif /* __v850__ */ + #if defined(__v850e__) || defined(__v850ea__) + /* (Ahi << 32 + Alo) * (Bhi << 32 + Blo) */ + /* r7 r6 r9 r8 */ + mov r8, r10 + mulu r7, r8, r0 /* Ahi * Blo */ + mulu r6, r9, r0 /* Alo * Bhi */ + mulu r6, r10, r11 /* Alo * Blo */ + add r8, r11 + add r9, r11 + jmp [r31] + + #endif /* defined(__v850e__) || defined(__v850ea__) */ + .size ___muldi3, . - ___muldi3 + #endif diff -Nrc3pad gcc-3.2.3/gcc/config/v850/t-v850 gcc-3.3/gcc/config/v850/t-v850 *** gcc-3.2.3/gcc/config/v850/t-v850 2001-07-04 14:11:55.000000000 +0000 --- gcc-3.3/gcc/config/v850/t-v850 2002-09-16 17:22:14.000000000 +0000 *************** LIB1ASMFUNCS = _mulsi3 \ *** 29,35 **** _save_31c \ _save_varargs \ _save_interrupt \ ! _save_all_interrupt # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. --- 29,66 ---- _save_31c \ _save_varargs \ _save_interrupt \ ! _save_all_interrupt \ ! _callt_save_20 \ ! _callt_save_21 \ ! _callt_save_22 \ ! _callt_save_23 \ ! _callt_save_24 \ ! _callt_save_25 \ ! _callt_save_26 \ ! _callt_save_27 \ ! _callt_save_28 \ ! _callt_save_29 \ ! _callt_save_20c \ ! _callt_save_21c \ ! _callt_save_22c \ ! _callt_save_23c \ ! _callt_save_24c \ ! _callt_save_25c \ ! _callt_save_26c \ ! _callt_save_27c \ ! _callt_save_28c \ ! _callt_save_29c \ ! _callt_save_31c \ ! _callt_save_varargs \ ! _callt_save_interrupt \ ! _callt_save_all_interrupt \ ! _callt_save_r2_r29 \ ! _callt_save_r2_r31 \ ! _callt_save_r6_r9 \ ! _negdi2 \ ! _cmpdi2 \ ! _ucmpdi2 \ ! _muldi3 # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. *************** fp-bit.c: $(srcdir)/config/fp-bit.c *** 49,56 **** echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c ! TCFLAGS = -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow ! v850-c.o: $(srcdir)/config/v850/v850-c.c $(RTL_H) $(TREE_H) $(CONFIG_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< --- 80,92 ---- echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c ! # Create target-specific versions of the libraries ! MULTILIB_OPTIONS = mv850/mv850e ! MULTILIB_DIRNAMES = v850 v850e ! INSTALL_LIBGCC = install-multilib ! TCFLAGS = -mno-app-regs -msmall-sld -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow ! ! v850-c.o: $(srcdir)/config/v850/v850-c.c $(RTL_H) $(TREE_H) $(CONFIG_H) $(TM_P_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff -Nrc3pad gcc-3.2.3/gcc/config/v850/v850.c gcc-3.3/gcc/config/v850/v850.c *** gcc-3.2.3/gcc/config/v850/v850.c 2002-03-22 19:25:55.000000000 +0000 --- gcc-3.3/gcc/config/v850/v850.c 2002-09-20 19:15:53.000000000 +0000 *************** *** 3,24 **** Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" --- 3,24 ---- Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ! FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ! for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free ! Software Foundation, 59 Temple Place - Suite 330, Boston, MA ! 02111-1307, USA. */ #include "config.h" #include "system.h" *************** Boston, MA 02111-1307, USA. */ *** 36,43 **** #include "expr.h" #include "function.h" #include "toplev.h" - #include "cpplib.h" - #include "c-lex.h" #include "ggc.h" #include "integrate.h" #include "tm_p.h" --- 36,41 ---- *************** const struct attribute_spec v850_attribu *** 58,66 **** static tree v850_handle_interrupt_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree v850_handle_data_area_attribute PARAMS ((tree *, tree, tree, int, bool *)); static void v850_insert_attributes PARAMS ((tree, tree *)); ! ! /* True if the current function has anonymous arguments. */ ! int current_function_anonymous_args; /* Information about the various small memory areas. */ struct small_memory_info small_memory[ (int)SMALL_MEMORY_max ] = --- 56,65 ---- static tree v850_handle_interrupt_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree v850_handle_data_area_attribute PARAMS ((tree *, tree, tree, int, bool *)); static void v850_insert_attributes PARAMS ((tree, tree *)); ! static void v850_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)); ! static void v850_encode_data_area PARAMS ((tree)); ! static void v850_encode_section_info PARAMS ((tree, int)); ! static const char *v850_strip_name_encoding PARAMS ((const char *)); /* Information about the various small memory areas. */ struct small_memory_info small_memory[ (int)SMALL_MEMORY_max ] = *************** static int v850_interrupt_p = FALSE; *** 96,101 **** --- 95,108 ---- #undef TARGET_INSERT_ATTRIBUTES #define TARGET_INSERT_ATTRIBUTES v850_insert_attributes + #undef TARGET_ASM_SELECT_SECTION + #define TARGET_ASM_SELECT_SECTION v850_select_section + + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO v850_encode_section_info + #undef TARGET_STRIP_NAME_ENCODING + #define TARGET_STRIP_NAME_ENCODING v850_strip_name_encoding + struct gcc_target targetm = TARGET_INITIALIZER; /* Sometimes certain combinations of command options do not make *************** override_options () *** 132,137 **** --- 139,151 ---- } } } + + /* Make sure that the US_BIT_SET mask has been correctly initialized. */ + if ((target_flags & MASK_US_MASK_SET) == 0) + { + target_flags |= MASK_US_MASK_SET; + target_flags &= ~MASK_US_BIT_SET; + } } *************** function_arg (cum, mode, type, named) *** 166,171 **** --- 180,188 ---- else size = GET_MODE_SIZE (mode); + if (size < 1) + return 0; + if (type) align = TYPE_ALIGN (type) / BITS_PER_UNIT; else *************** print_operand_address (file, addr) *** 686,691 **** --- 703,740 ---- } } + /* When assemble_integer is used to emit the offsets for a switch + table it can encounter (TRUNCATE:HI (MINUS:SI (LABEL_REF:SI) (LABEL_REF:SI))). + output_addr_const will normally barf at this, but it is OK to omit + the truncate and just emit the difference of the two labels. The + .hword directive will automatically handle the truncation for us. + + Returns 1 if rtx was handled, 0 otherwise. */ + + int + v850_output_addr_const_extra (file, x) + FILE * file; + rtx x; + { + if (GET_CODE (x) != TRUNCATE) + return 0; + + x = XEXP (x, 0); + + /* We must also handle the case where the switch table was passed a + constant value and so has been collapsed. In this case the first + label will have been deleted. In such a case it is OK to emit + nothing, since the table will not be used. + (cf gcc.c-torture/compile/990801-1.c). */ + if (GET_CODE (x) == MINUS + && GET_CODE (XEXP (x, 0)) == LABEL_REF + && GET_CODE (XEXP (XEXP (x, 0), 0)) == CODE_LABEL + && INSN_DELETED_P (XEXP (XEXP (x, 0), 0))) + return 1; + + output_addr_const (file, x); + return 1; + } /* Return appropriate code to load up a 1, 2, or 4 integer/floating point value. */ *************** output_move_single (operands) *** 706,721 **** { HOST_WIDE_INT value = INTVAL (src); ! if (CONST_OK_FOR_J (value)) /* signed 5 bit immediate */ return "mov %1,%0"; ! else if (CONST_OK_FOR_K (value)) /* signed 16 bit immediate */ return "movea lo(%1),%.,%0"; ! else if (CONST_OK_FOR_L (value)) /* upper 16 bits were set */ return "movhi hi(%1),%.,%0"; ! else /* random constant */ return "movhi hi(%1),%.,%0\n\tmovea lo(%1),%0,%0"; } --- 755,773 ---- { HOST_WIDE_INT value = INTVAL (src); ! if (CONST_OK_FOR_J (value)) /* Signed 5 bit immediate. */ return "mov %1,%0"; ! else if (CONST_OK_FOR_K (value)) /* Signed 16 bit immediate. */ return "movea lo(%1),%.,%0"; ! else if (CONST_OK_FOR_L (value)) /* Upper 16 bits were set. */ return "movhi hi(%1),%.,%0"; ! /* A random constant. */ ! else if (TARGET_V850E) ! return "mov %1,%0"; ! else return "movhi hi(%1),%.,%0\n\tmovea lo(%1),%0,%0"; } *************** output_move_single (operands) *** 724,739 **** HOST_WIDE_INT high, low; const_double_split (src, &high, &low); ! if (CONST_OK_FOR_J (high)) /* signed 5 bit immediate */ return "mov %F1,%0"; ! else if (CONST_OK_FOR_K (high)) /* signed 16 bit immediate */ return "movea lo(%F1),%.,%0"; ! else if (CONST_OK_FOR_L (high)) /* upper 16 bits were set */ return "movhi hi(%F1),%.,%0"; ! else /* random constant */ return "movhi hi(%F1),%.,%0\n\tmovea lo(%F1),%0,%0"; } --- 776,796 ---- HOST_WIDE_INT high, low; const_double_split (src, &high, &low); ! ! if (CONST_OK_FOR_J (high)) /* Signed 5 bit immediate. */ return "mov %F1,%0"; ! else if (CONST_OK_FOR_K (high)) /* Signed 16 bit immediate. */ return "movea lo(%F1),%.,%0"; ! else if (CONST_OK_FOR_L (high)) /* Upper 16 bits were set. */ return "movhi hi(%F1),%.,%0"; ! /* A random constant. */ ! else if (TARGET_V850E) ! return "mov %F1,%0"; ! ! else return "movhi hi(%F1),%.,%0\n\tmovea lo(%F1),%0,%0"; } *************** output_move_single (operands) *** 747,753 **** || GET_CODE (src) == SYMBOL_REF || GET_CODE (src) == CONST) { ! return "movhi hi(%1),%.,%0\n\tmovea lo(%1),%0,%0"; } else if (GET_CODE (src) == HIGH) --- 804,813 ---- || GET_CODE (src) == SYMBOL_REF || GET_CODE (src) == CONST) { ! if (TARGET_V850E) ! return "mov hilo(%1),%0"; ! else ! return "movhi hi(%1),%.,%0\n\tmovea lo(%1),%0,%0"; } else if (GET_CODE (src) == HIGH) *************** ep_memory_offset (mode, unsignedp) *** 871,881 **** switch (mode) { case QImode: ! max_offset = (1 << 7); break; case HImode: ! max_offset = (1 << 8); break; case SImode: --- 931,955 ---- switch (mode) { case QImode: ! if (TARGET_SMALL_SLD) ! max_offset = (1 << 4); ! else if (TARGET_V850E ! && ( ( unsignedp && ! TARGET_US_BIT_SET) ! || (! unsignedp && TARGET_US_BIT_SET))) ! max_offset = (1 << 4); ! else ! max_offset = (1 << 7); break; case HImode: ! if (TARGET_SMALL_SLD) ! max_offset = (1 << 5); ! else if (TARGET_V850E ! && ( ( unsignedp && ! TARGET_US_BIT_SET) ! || (! unsignedp && TARGET_US_BIT_SET))) ! max_offset = (1 << 5); ! else ! max_offset = (1 << 8); break; case SImode: *************** reg_or_int5_operand (op, mode) *** 975,980 **** --- 1049,1080 ---- return register_operand (op, mode); } + /* Return true if OP is either a register or a signed nine bit integer. */ + + int + reg_or_int9_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT) + return CONST_OK_FOR_O (INTVAL (op)); + + return register_operand (op, mode); + } + + /* Return true if OP is either a register or a const integer. */ + + int + reg_or_const_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == CONST_INT) + return TRUE; + + return register_operand (op, mode); + } + /* Return true if OP is a valid call operand. */ int *************** Saved %d bytes (%d uses of register %s) *** 1119,1124 **** --- 1219,1234 ---- else if (GET_CODE (SET_SRC (pattern)) == MEM) p_mem = &SET_SRC (pattern); + else if (GET_CODE (SET_SRC (pattern)) == SIGN_EXTEND + && GET_CODE (XEXP (SET_SRC (pattern), 0)) == MEM) + p_mem = &XEXP (SET_SRC (pattern), 0); + + else if (GET_CODE (SET_SRC (pattern)) == ZERO_EXTEND + && GET_CODE (XEXP (SET_SRC (pattern), 0)) == MEM) + { + p_mem = &XEXP (SET_SRC (pattern), 0); + unsignedp = TRUE; + } else p_mem = (rtx *)0; *************** void v850_reorg (start_insn) *** 1268,1273 **** --- 1378,1393 ---- else if (GET_CODE (src) == MEM) mem = src; + else if (GET_CODE (src) == SIGN_EXTEND + && GET_CODE (XEXP (src, 0)) == MEM) + mem = XEXP (src, 0); + + else if (GET_CODE (src) == ZERO_EXTEND + && GET_CODE (XEXP (src, 0)) == MEM) + { + mem = XEXP (src, 0); + unsignedp = TRUE; + } else mem = NULL_RTX; *************** compute_register_save_size (p_reg_saved) *** 1442,1455 **** need to cover the possibility that such a helper function will be used, despite the fact that there might be gaps in the list of registers that need to be saved. To detect this we note that the ! helper functions always push at least register r29 if the link ! register is not used, and at least registers r27 - r31 if the ! link register is used (and provided that the function is not an ! interrupt handler). */ if (TARGET_PROLOG_FUNCTION ! && (i == 2 || i >= 20) ! && regs_ever_live[LINK_POINTER_REGNUM] ? (i < 28) : (i < 30)) { if (i == 2) { --- 1562,1572 ---- need to cover the possibility that such a helper function will be used, despite the fact that there might be gaps in the list of registers that need to be saved. To detect this we note that the ! helper functions always push at least register r29 (provided ! that the function is not an interrupt handler). */ if (TARGET_PROLOG_FUNCTION ! && (i == 2 || ((i >= 20) && (i < 30)))) { if (i == 2) { *************** expand_prologue () *** 1524,1531 **** /* Save/setup global registers for interrupt functions right now. */ if (interrupt_handler) { emit_insn (gen_save_interrupt ()); ! actual_fsize -= INTERRUPT_FIXED_SAVE_SIZE; if (((1L << LINK_POINTER_REGNUM) & reg_saved) != 0) --- 1641,1651 ---- /* Save/setup global registers for interrupt functions right now. */ if (interrupt_handler) { + if (TARGET_V850E && ! TARGET_DISABLE_CALLT) + emit_insn (gen_callt_save_interrupt ()); + else emit_insn (gen_save_interrupt ()); ! actual_fsize -= INTERRUPT_FIXED_SAVE_SIZE; if (((1L << LINK_POINTER_REGNUM) & reg_saved) != 0) *************** expand_prologue () *** 1533,1543 **** } /* Save arg registers to the stack if necessary. */ ! else if (current_function_anonymous_args) { if (TARGET_PROLOG_FUNCTION) { ! emit_insn (gen_save_r6_r9 ()); } else { --- 1653,1666 ---- } /* Save arg registers to the stack if necessary. */ ! else if (current_function_args_info.anonymous_args) { if (TARGET_PROLOG_FUNCTION) { ! if (TARGET_V850E && ! TARGET_DISABLE_CALLT) ! emit_insn (gen_save_r6_r9_v850e ()); ! else ! emit_insn (gen_save_r6_r9 ()); } else { *************** Saved %d bytes via prologue function (%d *** 1649,1655 **** /* Special case interrupt functions that save all registers for a call. */ if (interrupt_handler && ((1L << LINK_POINTER_REGNUM) & reg_saved) != 0) { ! emit_insn (gen_save_all_interrupt ()); } else { --- 1772,1781 ---- /* Special case interrupt functions that save all registers for a call. */ if (interrupt_handler && ((1L << LINK_POINTER_REGNUM) & reg_saved) != 0) { ! if (TARGET_V850E && ! TARGET_DISABLE_CALLT) ! emit_insn (gen_callt_save_all_interrupt ()); ! else ! emit_insn (gen_save_all_interrupt ()); } else { *************** Saved %d bytes via epilogue function (%d *** 1881,1887 **** for a call. */ if (interrupt_handler && ((1L << LINK_POINTER_REGNUM) & reg_saved) != 0) { ! emit_insn (gen_restore_all_interrupt ()); } else { --- 2007,2016 ---- for a call. */ if (interrupt_handler && ((1L << LINK_POINTER_REGNUM) & reg_saved) != 0) { ! if (TARGET_V850E && ! TARGET_DISABLE_CALLT) ! emit_insn (gen_callt_restore_all_interrupt ()); ! else ! emit_insn (gen_restore_all_interrupt ()); } else { *************** Saved %d bytes via epilogue function (%d *** 1919,1932 **** /* And return or use reti for interrupt handlers. */ if (interrupt_handler) ! emit_jump_insn (gen_restore_interrupt ()); else if (actual_fsize) emit_jump_insn (gen_return_internal ()); else emit_jump_insn (gen_return ()); } - current_function_anonymous_args = 0; v850_interrupt_cache_p = FALSE; v850_interrupt_p = FALSE; } --- 2048,2065 ---- /* And return or use reti for interrupt handlers. */ if (interrupt_handler) ! { ! if (TARGET_V850E && ! TARGET_DISABLE_CALLT) ! emit_insn (gen_callt_return_interrupt ()); ! else ! emit_jump_insn (gen_return_interrupt ()); ! } else if (actual_fsize) emit_jump_insn (gen_return_internal ()); else emit_jump_insn (gen_return ()); } v850_interrupt_cache_p = FALSE; v850_interrupt_p = FALSE; } *************** v850_interrupt_function_p (func) *** 2141,2147 **** } ! void v850_encode_data_area (decl) tree decl; { --- 2274,2280 ---- } ! static void v850_encode_data_area (decl) tree decl; { *************** v850_encode_data_area (decl) *** 2202,2207 **** --- 2335,2357 ---- XSTR (XEXP (DECL_RTL (decl), 0), 0) = ggc_alloc_string (newstr, len + 2); } + static void + v850_encode_section_info (decl, first) + tree decl; + int first; + { + if (first && TREE_CODE (decl) == VAR_DECL + && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) + v850_encode_data_area (decl); + } + + static const char * + v850_strip_name_encoding (str) + const char *str; + { + return str + (ENCODED_NAME_P (str) || *str == '*'); + } + /* Return true if the given RTX is a register which can be restored by a function epilogue. */ int *************** register_is_ok_for_epilogue (op, mode) *** 2209,2221 **** rtx op; enum machine_mode ATTRIBUTE_UNUSED mode; { ! /* The save/restore routines can only cope with registers 2, and 20 - 31 */ ! return (GET_CODE (op) == REG) ! && (((REGNO (op) >= 20) && REGNO (op) <= 31) ! || REGNO (op) == 2); } ! /* Return non-zero if the given RTX is suitable for collapsing into jump to a function epilogue. */ int pattern_is_ok_for_epilogue (op, mode) --- 2359,2370 ---- rtx op; enum machine_mode ATTRIBUTE_UNUSED mode; { ! /* The save/restore routines can only cope with registers 20 - 31. */ ! return ((GET_CODE (op) == REG) ! && (((REGNO (op) >= 20) && REGNO (op) <= 31))); } ! /* Return nonzero if the given RTX is suitable for collapsing into jump to a function epilogue. */ int pattern_is_ok_for_epilogue (op, mode) *************** construct_restore_jr (op) *** 2394,2400 **** } ! /* Return non-zero if the given RTX is suitable for collapsing into a jump to a function prologue. */ int pattern_is_ok_for_prologue (op, mode) --- 2543,2549 ---- } ! /* Return nonzero if the given RTX is suitable for collapsing into a jump to a function prologue. */ int pattern_is_ok_for_prologue (op, mode) *************** v850_output_aligned_bss (file, decl, nam *** 2608,2615 **** int size; int align; { ! ASM_GLOBALIZE_LABEL (file, name); ! switch (v850_get_data_area (decl)) { case DATA_AREA_ZDA: --- 2757,2764 ---- int size; int align; { ! (*targetm.asm_out.globalize_label) (file, name); ! switch (v850_get_data_area (decl)) { case DATA_AREA_ZDA: *************** v850_insert_attributes (decl, attr_ptr) *** 2708,2714 **** && v850_get_data_area (decl) == DATA_AREA_NORMAL) v850_set_data_area (decl, data_area_stack->data_area); ! /* Initialise the default names of the v850 specific sections, if this has not been done before. */ if (GHS_default_section_names [(int) GHS_SECTION_KIND_SDATA] == NULL) --- 2857,2863 ---- && v850_get_data_area (decl) == DATA_AREA_NORMAL) v850_set_data_area (decl, data_area_stack->data_area); ! /* Initialize the default names of the v850 specific sections, if this has not been done before. */ if (GHS_default_section_names [(int) GHS_SECTION_KIND_SDATA] == NULL) *************** v850_insert_attributes (decl, attr_ptr) *** 2793,2798 **** --- 2942,3333 ---- } } } + + /* Return nonzero if the given RTX is suitable + for collapsing into a DISPOSE instruction. */ + + int + pattern_is_ok_for_dispose (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + int count = XVECLEN (op, 0); + int i; + + /* If there are no registers to restore then + the dispose instruction is not suitable. */ + if (count <= 2) + return 0; + + /* The pattern matching has already established that we are performing a + function epilogue and that we are popping at least one register. We must + now check the remaining entries in the vector to make sure that they are + also register pops. There is no good reason why there should ever be + anything else in this vector, but being paranoid always helps... + + The test below performs the C equivalent of this machine description + pattern match: + + (set (match_operand:SI n "register_is_ok_for_epilogue" "r") + (mem:SI (plus:SI (reg:SI 3) + (match_operand:SI n "immediate_operand" "i")))) + */ + + for (i = 3; i < count; i++) + { + rtx vector_element = XVECEXP (op, 0, i); + rtx dest; + rtx src; + rtx plus; + + if (GET_CODE (vector_element) != SET) + return 0; + + dest = SET_DEST (vector_element); + src = SET_SRC (vector_element); + + if ( GET_CODE (dest) != REG + || GET_MODE (dest) != SImode + || ! register_is_ok_for_epilogue (dest, SImode) + || GET_CODE (src) != MEM + || GET_MODE (src) != SImode) + return 0; + + plus = XEXP (src, 0); + + if ( GET_CODE (plus) != PLUS + || GET_CODE (XEXP (plus, 0)) != REG + || GET_MODE (XEXP (plus, 0)) != SImode + || REGNO (XEXP (plus, 0)) != STACK_POINTER_REGNUM + || GET_CODE (XEXP (plus, 1)) != CONST_INT) + return 0; + } + + return 1; + } + + /* Construct a DISPOSE instruction that is the equivalent of + the given RTX. We have already verified that this should + be possible. */ + + char * + construct_dispose_instruction (op) + rtx op; + { + int count = XVECLEN (op, 0); + int stack_bytes; + unsigned long int mask; + int i; + static char buff[ 100 ]; /* XXX */ + int use_callt = 0; + + if (count <= 2) + { + error ("Bogus DISPOSE construction: %d\n", count); + return NULL; + } + + /* Work out how many bytes to pop off the + stack before retrieving registers. */ + if (GET_CODE (XVECEXP (op, 0, 1)) != SET) + abort (); + if (GET_CODE (SET_SRC (XVECEXP (op, 0, 1))) != PLUS) + abort (); + if (GET_CODE (XEXP (SET_SRC (XVECEXP (op, 0, 1)), 1)) != CONST_INT) + abort (); + + stack_bytes = INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 1)), 1)); + + /* Each pop will remove 4 bytes from the stack... */ + stack_bytes -= (count - 2) * 4; + + /* Make sure that the amount we are popping + will fit into the DISPOSE instruction. */ + if (stack_bytes > 128) + { + error ("Too much stack space to dispose of: %d", stack_bytes); + return NULL; + } + + /* Now compute the bit mask of registers to push. */ + mask = 0; + + for (i = 2; i < count; i++) + { + rtx vector_element = XVECEXP (op, 0, i); + + if (GET_CODE (vector_element) != SET) + abort (); + if (GET_CODE (SET_DEST (vector_element)) != REG) + abort (); + if (! register_is_ok_for_epilogue (SET_DEST (vector_element), SImode)) + abort (); + + if (REGNO (SET_DEST (vector_element)) == 2) + use_callt = 1; + else + mask |= 1 << REGNO (SET_DEST (vector_element)); + } + + if (! TARGET_DISABLE_CALLT + && (use_callt || stack_bytes == 0 || stack_bytes == 16)) + { + if (use_callt) + { + sprintf (buff, "callt ctoff(__callt_return_r2_r%d)", (mask & (1 << 31)) ? 31 : 29); + return buff; + } + else + { + for (i = 20; i < 32; i++) + if (mask & (1 << i)) + break; + + if (i == 31) + sprintf (buff, "callt ctoff(__callt_return_r31c)"); + else + sprintf (buff, "callt ctoff(__callt_return_r%d_r%d%s)", + i, (mask & (1 << 31)) ? 31 : 29, stack_bytes ? "c" : ""); + } + } + else + { + static char regs [100]; /* XXX */ + int done_one; + + /* Generate the DISPOSE instruction. Note we could just issue the + bit mask as a number as the assembler can cope with this, but for + the sake of our readers we turn it into a textual description. */ + regs[0] = 0; + done_one = 0; + + for (i = 20; i < 32; i++) + { + if (mask & (1 << i)) + { + int first; + + if (done_one) + strcat (regs, ", "); + else + done_one = 1; + + first = i; + strcat (regs, reg_names[ first ]); + + for (i++; i < 32; i++) + if ((mask & (1 << i)) == 0) + break; + + if (i > first + 1) + { + strcat (regs, " - "); + strcat (regs, reg_names[ i - 1 ] ); + } + } + } + + sprintf (buff, "dispose %d {%s}, r31", stack_bytes / 4, regs); + } + + return buff; + } + + /* Return nonzero if the given RTX is suitable + for collapsing into a PREPARE instruction. */ + + int + pattern_is_ok_for_prepare (op, mode) + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; + { + int count = XVECLEN (op, 0); + int i; + + /* If there are no registers to restore then the prepare instruction + is not suitable. */ + if (count <= 1) + return 0; + + /* The pattern matching has already established that we are adjusting the + stack and pushing at least one register. We must now check that the + remaining entries in the vector to make sure that they are also register + pushes. + + The test below performs the C equivalent of this machine description + pattern match: + + (set (mem:SI (plus:SI (reg:SI 3) + (match_operand:SI 2 "immediate_operand" "i"))) + (match_operand:SI 3 "register_is_ok_for_epilogue" "r")) + + */ + + for (i = 2; i < count; i++) + { + rtx vector_element = XVECEXP (op, 0, i); + rtx dest; + rtx src; + rtx plus; + + if (GET_CODE (vector_element) != SET) + return 0; + + dest = SET_DEST (vector_element); + src = SET_SRC (vector_element); + + if ( GET_CODE (dest) != MEM + || GET_MODE (dest) != SImode + || GET_CODE (src) != REG + || GET_MODE (src) != SImode + || ! register_is_ok_for_epilogue (src, SImode) + ) + return 0; + + plus = XEXP (dest, 0); + + if ( GET_CODE (plus) != PLUS + || GET_CODE (XEXP (plus, 0)) != REG + || GET_MODE (XEXP (plus, 0)) != SImode + || REGNO (XEXP (plus, 0)) != STACK_POINTER_REGNUM + || GET_CODE (XEXP (plus, 1)) != CONST_INT) + return 0; + + /* If the register is being pushed somewhere other than the stack + space just aquired by the first operand then abandon this quest. + Note: the test is <= becuase both values are negative. */ + if (INTVAL (XEXP (plus, 1)) + <= INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1))) + return 0; + } + + return 1; + } + + /* Construct a PREPARE instruction that is the equivalent of + the given RTL. We have already verified that this should + be possible. */ + + char * + construct_prepare_instruction (op) + rtx op; + { + int count = XVECLEN (op, 0); + int stack_bytes; + unsigned long int mask; + int i; + static char buff[ 100 ]; /* XXX */ + int use_callt = 0; + + if (count <= 1) + { + error ("Bogus PREPEARE construction: %d\n", count); + return NULL; + } + + /* Work out how many bytes to push onto + the stack after storing the registers. */ + if (GET_CODE (XVECEXP (op, 0, 0)) != SET) + abort (); + if (GET_CODE (SET_SRC (XVECEXP (op, 0, 0))) != PLUS) + abort (); + if (GET_CODE (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1)) != CONST_INT) + abort (); + + stack_bytes = INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1)); + + /* Each push will put 4 bytes from the stack. */ + stack_bytes += (count - 1) * 4; + + /* Make sure that the amount we are popping + will fit into the DISPOSE instruction. */ + if (stack_bytes < -128) + { + error ("Too much stack space to prepare: %d", stack_bytes); + return NULL; + } + + /* Now compute the bit mask of registers to push. */ + mask = 0; + for (i = 1; i < count; i++) + { + rtx vector_element = XVECEXP (op, 0, i); + + if (GET_CODE (vector_element) != SET) + abort (); + if (GET_CODE (SET_SRC (vector_element)) != REG) + abort (); + if (! register_is_ok_for_epilogue (SET_SRC (vector_element), SImode)) + abort (); + + if (REGNO (SET_SRC (vector_element)) == 2) + use_callt = 1; + else + mask |= 1 << REGNO (SET_SRC (vector_element)); + } + + if ((! TARGET_DISABLE_CALLT) + && (use_callt || stack_bytes == 0 || stack_bytes == -16)) + { + if (use_callt) + { + sprintf (buff, "callt ctoff(__callt_save_r2_r%d)", (mask & (1 << 31)) ? 31 : 29 ); + return buff; + } + + for (i = 20; i < 32; i++) + if (mask & (1 << i)) + break; + + if (i == 31) + sprintf (buff, "callt ctoff(__callt_save_r31c)"); + else + sprintf (buff, "callt ctoff(__callt_save_r%d_r%d%s)", + i, (mask & (1 << 31)) ? 31 : 29, stack_bytes ? "c" : ""); + } + else + { + static char regs [100]; /* XXX */ + int done_one; + + + /* Generate the PREPARE instruction. Note we could just issue the + bit mask as a number as the assembler can cope with this, but for + the sake of our readers we turn it into a textual description. */ + regs[0] = 0; + done_one = 0; + + for (i = 20; i < 32; i++) + { + if (mask & (1 << i)) + { + int first; + + if (done_one) + strcat (regs, ", "); + else + done_one = 1; + + first = i; + strcat (regs, reg_names[ first ]); + + for (i++; i < 32; i++) + if ((mask & (1 << i)) == 0) + break; + + if (i > first + 1) + { + strcat (regs, " - "); + strcat (regs, reg_names[ i - 1 ] ); + } + } + } + + sprintf (buff, "prepare {%s}, %d", regs, (- stack_bytes) / 4); + } + + return buff; + } /* Implement `va_arg'. */ *************** v850_return_addr (count) *** 2848,2850 **** --- 3383,3442 ---- return get_hard_reg_initial_val (Pmode, LINK_POINTER_REGNUM); } + + static void + v850_select_section (exp, reloc, align) + tree exp; + int reloc ATTRIBUTE_UNUSED; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + if (TREE_CODE (exp) == VAR_DECL) + { + int is_const; + if (!TREE_READONLY (exp) + || TREE_SIDE_EFFECTS (exp) + || !DECL_INITIAL (exp) + || (DECL_INITIAL (exp) != error_mark_node + && !TREE_CONSTANT (DECL_INITIAL (exp)))) + is_const = FALSE; + else + is_const = TRUE; + + switch (v850_get_data_area (exp)) + { + case DATA_AREA_ZDA: + if (is_const) + rozdata_section (); + else + zdata_section (); + break; + + case DATA_AREA_TDA: + tdata_section (); + break; + + case DATA_AREA_SDA: + if (is_const) + rosdata_section (); + else + sdata_section (); + break; + + default: + if (is_const) + readonly_data_section (); + else + data_section (); + break; + } + } + else if (TREE_CODE (exp) == STRING_CST) + { + if (! flag_writable_strings) + readonly_data_section (); + else + data_section (); + } + else + readonly_data_section (); + } diff -Nrc3pad gcc-3.2.3/gcc/config/v850/v850-c.c gcc-3.3/gcc/config/v850/v850-c.c *** gcc-3.2.3/gcc/config/v850/v850-c.c 2001-12-15 20:06:10.000000000 +0000 --- gcc-3.3/gcc/config/v850/v850-c.c 2002-05-25 22:01:52.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,30 **** #include "cpplib.h" #include "tree.h" #include "c-pragma.h" - #include "c-lex.h" #include "toplev.h" #include "ggc.h" #include "tm_p.h" --- 24,29 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/v850/v850.h gcc-3.3/gcc/config/v850/v850.h *** gcc-3.2.3/gcc/config/v850/v850.h 2002-01-21 06:22:28.000000000 +0000 --- gcc-3.3/gcc/config/v850/v850.h 2003-04-29 14:31:53.000000000 +0000 *************** *** 3,24 **** Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef GCC_V850_H #define GCC_V850_H --- 3,24 ---- Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef GCC_V850_H #define GCC_V850_H *************** Boston, MA 02111-1307, USA. */ *** 31,38 **** #undef STARTFILE_SPEC #undef ASM_SPEC - #define TARGET_CPU_generic 1 #ifndef TARGET_CPU_DEFAULT #define TARGET_CPU_DEFAULT TARGET_CPU_generic --- 31,38 ---- #undef STARTFILE_SPEC #undef ASM_SPEC #define TARGET_CPU_generic 1 + #define TARGET_CPU_v850e 2 #ifndef TARGET_CPU_DEFAULT #define TARGET_CPU_DEFAULT TARGET_CPU_generic *************** Boston, MA 02111-1307, USA. */ *** 43,51 **** #define SUBTARGET_CPP_SPEC "%{!mv*:-D__v850__}" #define TARGET_VERSION fprintf (stderr, " (NEC V850)"); #define ASM_SPEC "%{mv*:-mv%*}" ! #define CPP_SPEC "%{mv850ea:-D__v850ea__} %{mv850e:-D__v850e__} %{mv850:-D__v850__} %(subtarget_cpp_spec)" #define EXTRA_SPECS \ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ --- 43,64 ---- #define SUBTARGET_CPP_SPEC "%{!mv*:-D__v850__}" #define TARGET_VERSION fprintf (stderr, " (NEC V850)"); + /* Choose which processor will be the default. + We must pass a -mv850xx option to the assembler if no explicit -mv* option + is given, because the assembler's processor default may not be correct. */ + #if TARGET_CPU_DEFAULT == TARGET_CPU_v850e + #undef MASK_DEFAULT + #define MASK_DEFAULT MASK_V850E + #undef SUBTARGET_ASM_SPEC + #define SUBTARGET_ASM_SPEC "%{!mv*:-mv850e}" + #undef SUBTARGET_CPP_SPEC + #define SUBTARGET_CPP_SPEC "%{!mv*:-D__v850e__}" + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (NEC V850E)"); + #endif #define ASM_SPEC "%{mv*:-mv%*}" ! #define CPP_SPEC "%{mv850e:-D__v850e__} %{mv850:-D__v850__} %(subtarget_cpp_spec)" #define EXTRA_SPECS \ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ *************** extern int target_flags; *** 67,74 **** --- 80,95 ---- #define MASK_CPU 0x00000030 #define MASK_V850 0x00000010 + #define MASK_V850E 0x00000020 + #define MASK_SMALL_SLD 0x00000040 #define MASK_BIG_SWITCH 0x00000100 + #define MASK_NO_APP_REGS 0x00000200 + #define MASK_DISABLE_CALLT 0x00000400 + #define MASK_STRICT_ALIGN 0x00000800 + + #define MASK_US_BIT_SET 0x00001000 + #define MASK_US_MASK_SET 0x00002000 /* Macros used in the machine description to test the flags. */ *************** extern int target_flags; *** 107,114 **** /* Whether to emit 2 byte per entry or 4 byte per entry switch tables. */ #define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH) ! /* General debug flag */ ! #define TARGET_DEBUG (target_flags & MASK_DEBUG) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, --- 128,152 ---- /* Whether to emit 2 byte per entry or 4 byte per entry switch tables. */ #define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH) ! /* General debug flag. */ ! #define TARGET_DEBUG (target_flags & MASK_DEBUG) ! #define TARGET_V850E ((target_flags & MASK_V850E) == MASK_V850E) ! ! #define TARGET_US_BIT_SET (target_flags & MASK_US_BIT_SET) ! ! /* Whether to assume that the SLD.B and SLD.H instructions only have small ! displacement fields, thus allowing the generated code to run on any of ! the V850 range of processors. */ ! #define TARGET_SMALL_SLD (target_flags & MASK_SMALL_SLD) ! ! /* True if callt will not be used for function prolog & epilog. */ ! #define TARGET_DISABLE_CALLT (target_flags & MASK_DISABLE_CALLT) ! ! /* False if r2 and r5 can be used by the compiler. True if r2 ! and r5 are to be fixed registers (for compatibility with GHS). */ ! #define TARGET_NO_APP_REGS (target_flags & MASK_NO_APP_REGS) ! ! #define TARGET_STRICT_ALIGN (target_flags & MASK_STRICT_ALIGN) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** extern int target_flags; *** 134,139 **** --- 172,193 ---- { "v850", MASK_V850, \ N_("Compile for the v850 processor") }, \ { "v850", -(MASK_V850 ^ MASK_CPU), "" }, \ + { "v850e", MASK_V850E, N_("Compile for v850e processor") }, \ + { "v850e", -(MASK_V850E ^ MASK_CPU), "" }, /* Make sure that the other bits are cleared. */ \ + { "small-sld", MASK_SMALL_SLD, N_("Enable the use of the short load instructions") }, \ + { "no-small-sld", -MASK_SMALL_SLD, "" }, \ + { "disable-callt", MASK_DISABLE_CALLT, \ + N_("Do not use the callt instruction") }, \ + { "no-disable-callt", -MASK_DISABLE_CALLT, "" }, \ + { "US-bit-set", (MASK_US_BIT_SET | MASK_US_MASK_SET), "" }, \ + { "no-US-bit-set", -MASK_US_BIT_SET, "" }, \ + { "no-US-bit-set", MASK_US_MASK_SET, "" }, \ + { "app-regs", -MASK_NO_APP_REGS, "" }, \ + { "no-app-regs", MASK_NO_APP_REGS, \ + N_("Do not use registers r2 and r5") }, \ + { "strict-align", MASK_STRICT_ALIGN, \ + N_("Enforce strict alignment") }, \ + { "no-strict-align", -MASK_STRICT_ALIGN, "" }, \ { "big-switch", MASK_BIG_SWITCH, \ N_("Use 4 byte entries in switch tables") },\ { "", MASK_DEFAULT, ""}} *************** extern struct small_memory_info small_me *** 195,201 **** LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if `-O' is specified, and 0 if neither is specified. ! SIZE is non-zero if `-Os' is specified, 0 otherwise. You should not use this macro to change options that are not machine-specific. These should uniformly selected by the same --- 249,255 ---- LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if `-O' is specified, and 0 if neither is specified. ! SIZE is nonzero if `-Os' is specified, 0 otherwise. You should not use this macro to change options that are not machine-specific. These should uniformly selected by the same *************** extern struct small_memory_info small_me *** 207,212 **** --- 261,267 ---- #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \ { \ + target_flags |= MASK_STRICT_ALIGN; \ if (LEVEL) \ target_flags |= (MASK_EP | MASK_PROLOG_FUNCTION); \ } *************** extern struct small_memory_info small_me *** 228,249 **** This is not true on the NEC V850. */ #define WORDS_BIG_ENDIAN 0 - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared --- 283,291 ---- *************** extern struct small_memory_info small_me *** 279,285 **** /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* Define this as 1 if `char' should by default be signed; else as 0. --- 321,327 ---- /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT TARGET_STRICT_ALIGN /* Define this as 1 if `char' should by default be signed; else as 0. *************** extern struct small_memory_info small_me *** 340,345 **** --- 382,398 ---- 0, 1, 3, 4, 5, 30, 32, 33 /* fixed registers */ \ } + /* If TARGET_NO_APP_REGS is not defined then add r2 and r5 to + the pool of fixed registers. See PR 14505. */ + #define CONDITIONAL_REGISTER_USAGE \ + { \ + if (TARGET_NO_APP_REGS) \ + { \ + fixed_regs[2] = 1; call_used_regs[2] = 1; \ + fixed_regs[5] = 1; call_used_regs[5] = 1; \ + } \ + } + /* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. *************** enum reg_class *** 470,480 **** #define CONST_OK_FOR_M(VALUE) ((unsigned)(VALUE) < 0x10000) /* 5 bit unsigned immediate in shift instructions */ #define CONST_OK_FOR_N(VALUE) ((unsigned) (VALUE) <= 31) - #define CONST_OK_FOR_O(VALUE) 0 #define CONST_OK_FOR_P(VALUE) 0 - #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \ (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \ --- 523,533 ---- #define CONST_OK_FOR_M(VALUE) ((unsigned)(VALUE) < 0x10000) /* 5 bit unsigned immediate in shift instructions */ #define CONST_OK_FOR_N(VALUE) ((unsigned) (VALUE) <= 31) + /* 9 bit signed immediate for word multiply instruction. */ + #define CONST_OK_FOR_O(VALUE) ((unsigned) (VALUE) + 0x100 < 0x200) #define CONST_OK_FOR_P(VALUE) 0 #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \ (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \ *************** enum reg_class *** 611,617 **** { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }} \ ! /* A C expression that returns non-zero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the --- 664,670 ---- { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }} \ ! /* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM-REG with register number TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the *************** enum reg_class *** 660,666 **** such as FUNCTION_ARG to determine where the next arg should go. */ #define CUMULATIVE_ARGS struct cum_arg ! struct cum_arg { int nbytes; }; /* Define where to put the arguments to a function. Value is zero to push the argument on the stack, --- 713,719 ---- such as FUNCTION_ARG to determine where the next arg should go. */ #define CUMULATIVE_ARGS struct cum_arg ! struct cum_arg { int nbytes; int anonymous_args; }; /* Define where to put the arguments to a function. Value is zero to push the argument on the stack, *************** struct cum_arg { int nbytes; }; *** 686,692 **** For a library call, FNTYPE is 0. */ #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ ! ((CUM).nbytes = 0) /* Update the data in CUM to advance over an argument of mode MODE and data type TYPE. --- 739,745 ---- For a library call, FNTYPE is 0. */ #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ ! ((CUM).nbytes = 0, (CUM).anonymous_args = 0) /* Update the data in CUM to advance over an argument of mode MODE and data type TYPE. *************** struct cum_arg { int nbytes; }; *** 705,714 **** space allocated by the caller. */ #define OUTGOING_REG_PARM_STACK_SPACE - extern int current_function_anonymous_args; /* Do any setup necessary for varargs/stdargs functions. */ #define SETUP_INCOMING_VARARGS(CUM, MODE, TYPE, PAS, SECOND) \ ! current_function_anonymous_args = (!TARGET_GHS ? 1 : 0); /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 758,766 ---- space allocated by the caller. */ #define OUTGOING_REG_PARM_STACK_SPACE /* Do any setup necessary for varargs/stdargs functions. */ #define SETUP_INCOMING_VARARGS(CUM, MODE, TYPE, PAS, SECOND) \ ! (CUM).anonymous_args = (!TARGET_GHS ? 1 : 0); /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** extern int current_function_anonymous_ar *** 760,765 **** --- 812,823 ---- #define EXIT_IGNORE_STACK 1 + /* Define this macro as a C expression that is nonzero for registers + used by the epilogue or the `return' pattern. */ + + #define EPILOGUE_USES(REGNO) \ + (reload_completed && (REGNO) == LINK_POINTER_REGNUM) + /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ *************** extern int current_function_anonymous_ar *** 768,774 **** #define TRAMPOLINE_TEMPLATE(FILE) \ do { \ fprintf (FILE, "\tjarl .+4,r12\n"); \ ! fprintf (FILE, "\tld.w 12[r12],r5\n"); \ fprintf (FILE, "\tld.w 16[r12],r12\n"); \ fprintf (FILE, "\tjmp [r12]\n"); \ fprintf (FILE, "\tnop\n"); \ --- 826,832 ---- #define TRAMPOLINE_TEMPLATE(FILE) \ do { \ fprintf (FILE, "\tjarl .+4,r12\n"); \ ! fprintf (FILE, "\tld.w 12[r12],r20\n"); \ fprintf (FILE, "\tld.w 16[r12],r12\n"); \ fprintf (FILE, "\tjmp [r12]\n"); \ fprintf (FILE, "\tnop\n"); \ *************** extern int current_function_anonymous_ar *** 864,870 **** ((C) == 'Q' ? ep_memory_operand (OP, GET_MODE (OP), 0) \ : (C) == 'R' ? special_symbolref_operand (OP, VOIDmode) \ : (C) == 'S' ? (GET_CODE (OP) == SYMBOL_REF && ! ZDA_NAME_P (XSTR (OP, 0))) \ ! : (C) == 'T' ? 0 \ : (C) == 'U' ? ((GET_CODE (OP) == SYMBOL_REF && ZDA_NAME_P (XSTR (OP, 0))) \ || (GET_CODE (OP) == CONST \ && GET_CODE (XEXP (OP, 0)) == PLUS \ --- 922,928 ---- ((C) == 'Q' ? ep_memory_operand (OP, GET_MODE (OP), 0) \ : (C) == 'R' ? special_symbolref_operand (OP, VOIDmode) \ : (C) == 'S' ? (GET_CODE (OP) == SYMBOL_REF && ! ZDA_NAME_P (XSTR (OP, 0))) \ ! : (C) == 'T' ? ep_memory_operand(OP,GET_MODE(OP),TRUE) \ : (C) == 'U' ? ((GET_CODE (OP) == SYMBOL_REF && ZDA_NAME_P (XSTR (OP, 0))) \ || (GET_CODE (OP) == CONST \ && GET_CODE (XEXP (OP, 0)) == PLUS \ *************** do { \ *** 1002,1009 **** --- 1060,1086 ---- #define RTX_COSTS(RTX,CODE,OUTER_CODE) \ case MOD: \ case DIV: \ + case UMOD: \ + case UDIV: \ + if (TARGET_V850E && optimize_size) \ + return 6; \ return 60; \ case MULT: \ + if (TARGET_V850E \ + && ( GET_MODE (RTX) == SImode \ + || GET_MODE (RTX) == HImode \ + || GET_MODE (RTX) == QImode)) \ + { \ + if (GET_CODE (XEXP (RTX, 1)) == REG) \ + return 4; \ + else if (GET_CODE (XEXP (RTX, 1)) == CONST_INT) \ + { \ + if (CONST_OK_FOR_O (INTVAL (XEXP (RTX, 1)))) \ + return 6; \ + else if (CONST_OK_FOR_K (INTVAL (XEXP (RTX, 1)))) \ + return 10; \ + } \ + } \ return 20; /* All addressing modes have the same cost on the V850 series. */ *************** typedef enum *** 1034,1040 **** `in_text' and `in_data'. You need not define this macro on a system with no other sections (that GCC needs to use). */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_tdata, in_sdata, in_zdata, in_const, \ in_rozdata, in_rosdata, in_sbss, in_zbss, in_zcommon, in_scommon /* One or more functions to be defined in `varasm.c'. These --- 1111,1117 ---- `in_text' and `in_data'. You need not define this macro on a system with no other sections (that GCC needs to use). */ #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_tdata, in_sdata, in_zdata, \ in_rozdata, in_rosdata, in_sbss, in_zbss, in_zcommon, in_scommon /* One or more functions to be defined in `varasm.c'. These *************** typedef enum *** 1045,1052 **** /* This could be done a lot more cleanly using ANSI C ... */ #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ - \ void \ sdata_section () \ { \ --- 1122,1127 ---- *************** zbss_section () \ *** 1132,1212 **** #define ZCOMMON_ASM_OP "\t.zcomm\t" #define TCOMMON_ASM_OP "\t.tcomm\t" - /* A C statement or statements to switch to the appropriate section - for output of EXP. You can assume that EXP is either a `VAR_DECL' - node or a constant of some sort. RELOC indicates whether the - initial value of EXP requires link-time relocations. Select the - section by calling `text_section' or one of the alternatives for - other sections. - - Do not define this macro if you put all read-only variables and - constants in the read-only data section (usually the text section). */ - #undef SELECT_SECTION - #define SELECT_SECTION(EXP, RELOC, ALIGN) \ - do { \ - if (TREE_CODE (EXP) == VAR_DECL) \ - { \ - int is_const; \ - if (!TREE_READONLY (EXP) \ - || TREE_SIDE_EFFECTS (EXP) \ - || !DECL_INITIAL (EXP) \ - || (DECL_INITIAL (EXP) != error_mark_node \ - && !TREE_CONSTANT (DECL_INITIAL (EXP)))) \ - is_const = FALSE; \ - else \ - is_const = TRUE; \ - \ - switch (v850_get_data_area (EXP)) \ - { \ - case DATA_AREA_ZDA: \ - if (is_const) \ - rozdata_section (); \ - else \ - zdata_section (); \ - break; \ - \ - case DATA_AREA_TDA: \ - tdata_section (); \ - break; \ - \ - case DATA_AREA_SDA: \ - if (is_const) \ - rosdata_section (); \ - else \ - sdata_section (); \ - break; \ - \ - default: \ - if (is_const) \ - const_section (); \ - else \ - data_section (); \ - break; \ - } \ - } \ - else if (TREE_CODE (EXP) == STRING_CST) \ - { \ - if (! flag_writable_strings) \ - const_section (); \ - else \ - data_section (); \ - } \ - \ - else \ - const_section (); \ - \ - } while (0) - - /* A C statement or statements to switch to the appropriate section - for output of RTX in mode MODE. You can assume that RTX is some - kind of constant in RTL. The argument MODE is redundant except in - the case of a `const_int' rtx. Select the section by calling - `text_section' or one of the alternatives for other sections. - - Do not define this macro if you put all constants in the read-only - data section. */ - /* #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) */ - /* Output at beginning/end of assembler file. */ #undef ASM_FILE_START #define ASM_FILE_START(FILE) asm_file_start(FILE) --- 1207,1212 ---- *************** do { \ *** 1226,1242 **** #undef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "_" ! /* When assemble_integer is used to emit the offsets for a switch ! table it can encounter (TRUNCATE:HI (MINUS:SI (LABEL_REF:SI) (LABEL_REF:SI))). ! output_addr_const will normally barf at this, but it is OK to omit ! the truncate and just emit the difference of the two labels. The ! .hword directive will automatically handle the truncation for us. */ ! ! #define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \ ! if (GET_CODE (x) == TRUNCATE) \ ! output_addr_const (FILE, XEXP (X, 0)); \ ! else \ ! goto FAIL; /* This says how to output the assembler to define a global uninitialized but not common symbol. */ --- 1226,1234 ---- #undef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "_" ! #define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \ ! if (! v850_output_addr_const_extra (FILE, X)) \ ! goto FAIL /* This says how to output the assembler to define a global uninitialized but not common symbol. */ *************** do { \ *** 1262,1296 **** #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ v850_output_local (FILE, DECL, NAME, SIZE, ALIGN) ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! ! #define ASM_OUTPUT_LABEL(FILE, NAME) \ ! do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #define ASM_GLOBALIZE_LABEL(FILE, NAME) \ ! do \ ! { \ ! fputs ("\t.global ", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE); \ ! } \ ! while (0) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! do { \ ! const char* real_name; \ ! STRIP_NAME_ENCODING (real_name, (NAME)); \ ! asm_fprintf (FILE, "%U%s", real_name); \ ! } while (0) ! /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. --- 1254,1268 ---- #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ v850_output_local (FILE, DECL, NAME, SIZE, ALIGN) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP "\t.global " /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ #undef ASM_OUTPUT_LABELREF ! #define ASM_OUTPUT_LABELREF(FILE, NAME) \ ! asm_fprintf (FILE, "%U%s", (*targetm.strip_name_encoding) (NAME)) /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. *************** do { \ *** 1348,1362 **** /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! asm_fprintf (FILE, "\t%s .L%d\n", \ ! (TARGET_BIG_SWITCH ? ".long" : ".short"), VALUE) /* This is how to output an element of a case-vector that is relative. */ ! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ! fprintf (FILE, "\t%s .L%d-.L%d\n", \ (TARGET_BIG_SWITCH ? ".long" : ".short"), \ ! VALUE, REL) #define ASM_OUTPUT_ALIGN(FILE, LOG) \ if ((LOG) != 0) \ --- 1320,1336 ---- /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! fprintf (FILE, "\t%s .L%d\n", \ ! (TARGET_BIG_SWITCH ? ".long" : ".short"), VALUE) /* This is how to output an element of a case-vector that is relative. */ ! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ! fprintf (FILE, "\t%s %s.L%d-.L%d%s\n", \ (TARGET_BIG_SWITCH ? ".long" : ".short"), \ ! (! TARGET_BIG_SWITCH && TARGET_V850E ? "(" : ""), \ ! VALUE, REL, \ ! (! TARGET_BIG_SWITCH && TARGET_V850E ? ")>>1" : "")) #define ASM_OUTPUT_ALIGN(FILE, LOG) \ if ((LOG) != 0) \ *************** do { \ *** 1369,1378 **** #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - /* Define to use software floating point emulator for REAL_ARITHMETIC and - decimal <-> binary conversion. */ - #define REAL_ARITHMETIC - /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ #define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? SImode : HImode) --- 1343,1348 ---- *************** do { \ *** 1421,1426 **** --- 1391,1413 ---- #define STORE_FLAG_VALUE 1 + #define MULDI3_LIBCALL "__muldi3" + #define UCMPDI2_LIBCALL "__ucmpdi2" + #define CMPDI2_LIBCALL "__cmpdi2" + #define NEGDI2_LIBCALL "__negdi2" + + #define INIT_TARGET_OPTABS \ + do \ + { \ + cmp_optab->handlers[(int) DImode].libfunc \ + = init_one_libfunc (CMPDI2_LIBCALL); \ + ucmp_optab->handlers[(int) DImode].libfunc \ + = init_one_libfunc (UCMPDI2_LIBCALL); \ + neg_optab->handlers[(int) DImode].libfunc \ + = init_one_libfunc (NEGDI2_LIBCALL); \ + } \ + while (0) + /* Specify the machine mode that pointers have. After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */ *************** extern union tree_node * GHS_current_sec *** 1508,1522 **** #define EP_REGNUM 30 /* ep register number */ - #define ENCODE_SECTION_INFO(DECL) \ - do \ - { \ - if (TREE_CODE (DECL) == VAR_DECL \ - && (TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))) \ - v850_encode_data_area (DECL); \ - } \ - while (0) - #define ZDA_NAME_FLAG_CHAR '@' #define TDA_NAME_FLAG_CHAR '%' #define SDA_NAME_FLAG_CHAR '&' --- 1495,1500 ---- *************** extern union tree_node * GHS_current_sec *** 1530,1538 **** || TDA_NAME_P (SYMBOL_NAME) \ || SDA_NAME_P (SYMBOL_NAME)) - #define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \ - (VAR) = (SYMBOL_NAME) + (ENCODED_NAME_P (SYMBOL_NAME) || *(SYMBOL_NAME) == '*') - /* Define this if you have defined special-purpose predicates in the file `MACHINE.c'. This macro is called within an initializer of an array of structures. The first field in the structure is the name --- 1508,1513 ---- *************** extern union tree_node * GHS_current_sec *** 1543,1548 **** --- 1518,1525 ---- #define PREDICATE_CODES \ { "reg_or_0_operand", { REG, SUBREG, CONST_INT, CONST_DOUBLE }}, \ { "reg_or_int5_operand", { REG, SUBREG, CONST_INT }}, \ + { "reg_or_int9_operand", { REG, SUBREG, CONST_INT }}, \ + { "reg_or_const_operand", { REG, CONST_INT }}, \ { "call_address_operand", { REG, SYMBOL_REF }}, \ { "movsi_source_operand", { LABEL_REF, SYMBOL_REF, CONST_INT, \ CONST_DOUBLE, CONST, HIGH, MEM, \ *************** extern union tree_node * GHS_current_sec *** 1552,1557 **** --- 1529,1537 ---- { "pattern_is_ok_for_prologue", { PARALLEL }}, \ { "pattern_is_ok_for_epilogue", { PARALLEL }}, \ { "register_is_ok_for_epilogue",{ REG }}, \ + { "pattern_is_ok_for_dispose", { PARALLEL }}, \ + { "pattern_is_ok_for_prepare", { PARALLEL }}, \ + { "register_is_ok_for_dispose", { REG }}, \ { "not_power_of_two_operand", { CONST_INT }}, #endif /* ! GCC_V850_H */ diff -Nrc3pad gcc-3.2.3/gcc/config/v850/v850.md gcc-3.3/gcc/config/v850/v850.md *** gcc-3.2.3/gcc/config/v850/v850.md 2001-07-20 13:42:57.000000000 +0000 --- gcc-3.3/gcc/config/v850/v850.md 2002-09-26 16:55:30.000000000 +0000 *************** *** 1,5 **** ;; GCC machine description for NEC V850 ! ;; Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. ;; Contributed by Jeff Law (law@cygnus.com). ;; This file is part of GNU CC. --- 1,5 ---- ;; GCC machine description for NEC V850 ! ;; Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. ;; Contributed by Jeff Law (law@cygnus.com). ;; This file is part of GNU CC. *************** *** 33,39 **** ;; The size of instructions in bytes. (define_attr "length" "" ! (const_int 200)) (define_attr "long_calls" "yes,no" (const (if_then_else (symbol_ref "TARGET_LONG_CALLS") --- 33,39 ---- ;; The size of instructions in bytes. (define_attr "length" "" ! (const_int 4)) (define_attr "long_calls" "yes,no" (const (if_then_else (symbol_ref "TARGET_LONG_CALLS") *************** *** 153,158 **** --- 153,159 ---- must be done with HIGH & LO_SUM patterns. */ if (CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != HIGH + && ! TARGET_V850E && !special_symbolref_operand (operands[1], VOIDmode) && !(GET_CODE (operands[1]) == CONST_INT && (CONST_OK_FOR_J (INTVAL (operands[1])) *************** *** 174,179 **** --- 175,198 ---- } }") + ;; This is the same as the following pattern, except that it includes + ;; support for arbitrary 32 bit immediates. + + ;; ??? This always loads addresses using hilo. If the only use of this address + ;; was in a load/store, then we would get smaller code if we only loaded the + ;; upper part with hi, and then put the lower part in the load/store insn. + + (define_insn "*movsi_internal_v850e" + [(set (match_operand:SI 0 "general_operand" "=r,r,r,r,Q,r,r,m,m,r") + (match_operand:SI 1 "general_operand" "Jr,K,L,Q,Ir,m,R,r,I,i"))] + "TARGET_V850E + && (register_operand (operands[0], SImode) + || reg_or_0_operand (operands[1], SImode))" + "* return output_move_single (operands);" + [(set_attr "length" "2,4,4,2,2,4,4,4,4,6") + (set_attr "cc" "none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit") + (set_attr "type" "other,other,other,load,other,load,other,other,other,other")]) + (define_insn "*movsi_internal" [(set (match_operand:SI 0 "general_operand" "=r,r,r,r,Q,r,r,m,m") (match_operand:SI 1 "movsi_source_operand" "Jr,K,L,Q,Ir,m,R,r,I"))] *************** *** 377,382 **** --- 396,488 ---- (set_attr "cc" "none_0hit,none_0hit") (set_attr "type" "mult")]) + ;; ??? The scheduling info is probably wrong. + + ;; ??? This instruction can also generate the 32 bit highpart, but using it + ;; may increase code size counter to the desired result. + + ;; ??? This instructions can also give a DImode result. + + ;; ??? There is unsigned version, but it matters only for the DImode/highpart + ;; results. + + (define_insn "mulsi3" + [(set (match_operand:SI 0 "register_operand" "=r") + (mult:SI (match_operand:SI 1 "register_operand" "%0") + (match_operand:SI 2 "reg_or_int9_operand" "rO")))] + "TARGET_V850E" + "mul %2,%1,%." + [(set_attr "length" "4") + (set_attr "cc" "none_0hit") + (set_attr "type" "mult")]) + + ;; ---------------------------------------------------------------------- + ;; DIVIDE INSTRUCTIONS + ;; ---------------------------------------------------------------------- + + ;; ??? These insns do set the Z/N condition codes, except that they are based + ;; on only one of the two results, so it doesn't seem to make sense to use + ;; them. + + ;; ??? The scheduling info is probably wrong. + + (define_insn "divmodsi4" + [(set (match_operand:SI 0 "register_operand" "=r") + (div:SI (match_operand:SI 1 "register_operand" "0") + (match_operand:SI 2 "register_operand" "r"))) + (set (match_operand:SI 3 "register_operand" "=r") + (mod:SI (match_dup 1) + (match_dup 2)))] + "TARGET_V850E" + "div %2,%0,%3" + [(set_attr "length" "4") + (set_attr "cc" "clobber") + (set_attr "type" "other")]) + + (define_insn "udivmodsi4" + [(set (match_operand:SI 0 "register_operand" "=r") + (udiv:SI (match_operand:SI 1 "register_operand" "0") + (match_operand:SI 2 "register_operand" "r"))) + (set (match_operand:SI 3 "register_operand" "=r") + (umod:SI (match_dup 1) + (match_dup 2)))] + "TARGET_V850E" + "divu %2,%0,%3" + [(set_attr "length" "4") + (set_attr "cc" "clobber") + (set_attr "type" "other")]) + + ;; ??? There is a 2 byte instruction for generating only the quotient. + ;; However, it isn't clear how to compute the length field correctly. + + (define_insn "divmodhi4" + [(set (match_operand:HI 0 "register_operand" "=r") + (div:HI (match_operand:HI 1 "register_operand" "0") + (match_operand:HI 2 "register_operand" "r"))) + (set (match_operand:HI 3 "register_operand" "=r") + (mod:HI (match_dup 1) + (match_dup 2)))] + "TARGET_V850E" + "divh %2,%0,%3" + [(set_attr "length" "4") + (set_attr "cc" "clobber") + (set_attr "type" "other")]) + + ;; Half-words are sign-extended by default, so we must zero extend to a word + ;; here before doing the divide. + + (define_insn "udivmodhi4" + [(set (match_operand:HI 0 "register_operand" "=r") + (udiv:HI (match_operand:HI 1 "register_operand" "0") + (match_operand:HI 2 "register_operand" "r"))) + (set (match_operand:HI 3 "register_operand" "=r") + (umod:HI (match_dup 1) + (match_dup 2)))] + "TARGET_V850E" + "zxh %0 ; divhu %2,%0,%3" + [(set_attr "length" "4") + (set_attr "cc" "clobber") + (set_attr "type" "other")]) ;; ---------------------------------------------------------------------- ;; AND INSTRUCTIONS *************** *** 734,739 **** --- 840,1082 ---- [(set_attr "length" "4") (set_attr "cc" "none_0hit")]) + ;; ---------------------------------------------------------------------- + ;; CONDITIONAL MOVE INSTRUCTIONS + ;; ---------------------------------------------------------------------- + + ;; Instructions using cc0 aren't allowed to have input reloads, so we must + ;; hide the fact that this instruction uses cc0. We do so by including the + ;; compare instruction inside it. + + ;; ??? This is very ugly. The right way to do this is to modify cmpsi so + ;; that it doesn't emit RTL, and then modify the bcc/scc patterns so that + ;; they emit RTL for the compare instruction. Unfortunately, this requires + ;; lots of changes that will be hard to sanitize. So for now, cmpsi still + ;; emits RTL, and I get the compare operands here from the previous insn. + + (define_expand "movsicc" + [(set (match_operand:SI 0 "register_operand" "=r") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(match_dup 4) (match_dup 5)]) + (match_operand:SI 2 "reg_or_const_operand" "rJ") + (match_operand:SI 3 "reg_or_const_operand" "rI")))] + "TARGET_V850E" + " + { + rtx insn = get_last_insn_anywhere (); + + if ( (GET_CODE (operands[2]) == CONST_INT + && GET_CODE (operands[3]) == CONST_INT)) + { + int o2 = INTVAL (operands[2]); + int o3 = INTVAL (operands[3]); + + if (o2 == 1 && o3 == 0) + FAIL; /* setf */ + if (o3 == 1 && o2 == 0) + FAIL; /* setf */ + if (o2 == 0 && (o3 < -16 || o3 > 15) && exact_log2 (o3) >= 0) + FAIL; /* setf + shift */ + if (o3 == 0 && (o2 < -16 || o2 > 15) && exact_log2 (o2) >=0) + FAIL; /* setf + shift */ + if (o2 != 0) + operands[2] = copy_to_mode_reg (SImode, operands[2]); + if (o3 !=0 ) + operands[3] = copy_to_mode_reg (SImode, operands[3]); + } + else + { + if (GET_CODE (operands[2]) != REG) + operands[2] = copy_to_mode_reg (SImode,operands[2]); + if (GET_CODE (operands[3]) != REG) + operands[3] = copy_to_mode_reg (SImode, operands[3]); + } + if (GET_CODE (insn) == INSN + && GET_CODE (PATTERN (insn)) == SET + && SET_DEST (PATTERN (insn)) == cc0_rtx) + { + rtx src = SET_SRC (PATTERN (insn)); + + if (GET_CODE (src) == COMPARE) + { + operands[4] = XEXP (src, 0); + operands[5] = XEXP (src, 1); + } + else if (GET_CODE (src) == REG + || GET_CODE (src) == SUBREG) + { + operands[4] = src; + operands[5] = const0_rtx; + } + else + abort (); + } + else + abort (); + }") + + ;; ??? Clobbering the condition codes is overkill. + + ;; ??? We sometimes emit an unnecessary compare instruction because the + ;; condition codes may have already been set by an earlier instruction, + ;; but we have no code here to avoid the compare if it is unnecessary. + + (define_insn "*movsicc_normal" + [(set (match_operand:SI 0 "register_operand" "=r") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(match_operand:SI 4 "register_operand" "r") + (match_operand:SI 5 "reg_or_int5_operand" "rJ")]) + (match_operand:SI 2 "reg_or_int5_operand" "rJ") + (match_operand:SI 3 "reg_or_0_operand" "rI")))] + "TARGET_V850E" + "cmp %5,%4 ; cmov %c1,%2,%z3,%0" + [(set_attr "length" "6") + (set_attr "cc" "clobber")]) + + (define_insn "*movsicc_reversed" + [(set (match_operand:SI 0 "register_operand" "=r") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(match_operand:SI 4 "register_operand" "r") + (match_operand:SI 5 "reg_or_int5_operand" "rJ")]) + (match_operand:SI 2 "reg_or_0_operand" "rI") + (match_operand:SI 3 "reg_or_int5_operand" "rJ")))] + "TARGET_V850E" + "cmp %5,%4 ; cmov %C1,%3,%z2,%0" + [(set_attr "length" "6") + (set_attr "cc" "clobber")]) + + (define_insn "*movsicc_tst1" + [(set (match_operand:SI 0 "register_operand" "=r") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(zero_extract:SI + (match_operand:QI 2 "memory_operand" "m") + (const_int 1) + (match_operand 3 "const_int_operand" "n")) + (const_int 0)]) + (match_operand:SI 4 "reg_or_int5_operand" "rJ") + (match_operand:SI 5 "reg_or_0_operand" "rI")))] + "TARGET_V850E" + "tst1 %3,%2 ; cmov %c1,%4,%z5,%0" + [(set_attr "length" "8") + (set_attr "cc" "clobber")]) + + (define_insn "*movsicc_tst1_reversed" + [(set (match_operand:SI 0 "register_operand" "=r") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(zero_extract:SI + (match_operand:QI 2 "memory_operand" "m") + (const_int 1) + (match_operand 3 "const_int_operand" "n")) + (const_int 0)]) + (match_operand:SI 4 "reg_or_0_operand" "rI") + (match_operand:SI 5 "reg_or_int5_operand" "rJ")))] + "TARGET_V850E" + "tst1 %3,%2 ; cmov %C1,%5,%z4,%0" + [(set_attr "length" "8") + (set_attr "cc" "clobber")]) + + ;; Matching for sasf requires combining 4 instructions, so we provide a + ;; dummy pattern to match the first 3, which will always be turned into the + ;; second pattern by subsequent combining. As above, we must include the + ;; comparison to avoid input reloads in an insn using cc0. + + (define_insn "*sasf_1" + [(set (match_operand:SI 0 "register_operand" "") + (ior:SI (match_operator 1 "comparison_operator" [(cc0) (const_int 0)]) + (ashift:SI (match_operand:SI 2 "register_operand" "") + (const_int 1))))] + "TARGET_V850E" + "* abort ();") + + (define_insn "*sasf_2" + [(set (match_operand:SI 0 "register_operand" "=r") + (ior:SI + (match_operator 1 "comparison_operator" + [(match_operand:SI 3 "register_operand" "r") + (match_operand:SI 4 "reg_or_int5_operand" "rJ")]) + (ashift:SI (match_operand:SI 2 "register_operand" "0") + (const_int 1))))] + "TARGET_V850E" + "cmp %4,%3 ; sasf %c1,%0" + [(set_attr "length" "6") + (set_attr "cc" "clobber")]) + + (define_split + [(set (match_operand:SI 0 "register_operand" "") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(match_operand:SI 4 "register_operand" "") + (match_operand:SI 5 "reg_or_int5_operand" "")]) + (match_operand:SI 2 "const_int_operand" "") + (match_operand:SI 3 "const_int_operand" "")))] + "TARGET_V850E + && ((INTVAL (operands[2]) ^ INTVAL (operands[3])) == 1) + && ((INTVAL (operands[2]) + INTVAL (operands[3])) != 1) + && (GET_CODE (operands[5]) == CONST_INT + || REGNO (operands[0]) != REGNO (operands[5])) + && REGNO (operands[0]) != REGNO (operands[4])" + [(set (match_dup 0) (match_dup 6)) + (set (match_dup 0) + (ior:SI (match_op_dup 7 [(match_dup 4) (match_dup 5)]) + (ashift:SI (match_dup 0) (const_int 1))))] + " + { + operands[6] = GEN_INT (INTVAL (operands[2]) >> 1); + if (INTVAL (operands[2]) & 0x1) + operands[7] = operands[1]; + else + operands[7] = gen_rtx (reverse_condition (GET_CODE (operands[1])), + GET_MODE (operands[1]), XEXP (operands[1], 0), + XEXP (operands[1], 1)); + }") + ;; --------------------------------------------------------------------- + ;; BYTE SWAP INSTRUCTIONS + ;; --------------------------------------------------------------------- + + (define_expand "rotlhi3" + [(set (match_operand:HI 0 "register_operand" "") + (rotate:HI (match_operand:HI 1 "register_operand" "") + (match_operand:HI 2 "const_int_operand" "")))] + "TARGET_V850E" + " + { + if (INTVAL (operands[2]) != 8) + FAIL; + }") + + (define_insn "*rotlhi3_8" + [(set (match_operand:HI 0 "register_operand" "=r") + (rotate:HI (match_operand:HI 1 "register_operand" "r") + (const_int 8)))] + "TARGET_V850E" + "bsh %1,%0" + [(set_attr "length" "4") + (set_attr "cc" "clobber")]) + + (define_expand "rotlsi3" + [(set (match_operand:SI 0 "register_operand" "") + (rotate:SI (match_operand:SI 1 "register_operand" "") + (match_operand:SI 2 "const_int_operand" "")))] + "TARGET_V850E" + " + { + if (INTVAL (operands[2]) != 16) + FAIL; + }") + + (define_insn "*rotlsi3_16" + [(set (match_operand:SI 0 "register_operand" "=r") + (rotate:SI (match_operand:SI 1 "register_operand" "r") + (const_int 16)))] + "TARGET_V850E" + "hsw %1,%0" + [(set_attr "length" "4") + (set_attr "cc" "clobber")]) ;; ---------------------------------------------------------------------- ;; JUMP INSTRUCTIONS *************** *** 921,926 **** --- 1264,1283 ---- [(set_attr "length" "2") (set_attr "cc" "none")]) + (define_insn "switch" + [(set (pc) + (plus:SI + (sign_extend:SI + (mem:HI + (plus:SI (ashift:SI (match_operand:SI 0 "register_operand" "r") + (const_int 1)) + (label_ref (match_operand 1 "" ""))))) + (label_ref (match_dup 1))))] + "TARGET_V850E" + "switch %0" + [(set_attr "length" "2") + (set_attr "cc" "none")]) + (define_expand "casesi" [(match_operand:SI 0 "register_operand" "") (match_operand:SI 1 "register_operand" "") *************** *** 940,945 **** --- 1297,1308 ---- /* Branch to the default label if out of range of the table. */ emit_jump_insn (gen_bgtu (operands[4])); + if (! TARGET_BIG_SWITCH && TARGET_V850E) + { + emit_jump_insn (gen_switch (reg, operands[3])); + DONE; + } + /* Shift index for the table array access. */ emit_insn (gen_ashlsi3 (reg, reg, GEN_INT (TARGET_BIG_SWITCH ? 2 : 1))); /* Load the table address into a pseudo. */ *************** *** 1084,1089 **** --- 1447,1464 ---- ;; EXTEND INSTRUCTIONS ;; ---------------------------------------------------------------------- + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") + (zero_extend:SI + (match_operand:HI 1 "nonimmediate_operand" "0,r,T,m")))] + "TARGET_V850E" + "@ + zxh %0 + andi 65535,%1,%0 + sld.hu %1,%0 + ld.hu %1,%0" + [(set_attr "length" "2,4,2,4") + (set_attr "cc" "none_0hit,set_znv,none_0hit,none_0hit")]) (define_insn "zero_extendhisi2" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 1094,1099 **** --- 1469,1486 ---- [(set_attr "length" "4") (set_attr "cc" "set_znv")]) + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") + (zero_extend:SI + (match_operand:QI 1 "nonimmediate_operand" "0,r,T,m")))] + "TARGET_V850E" + "@ + zxb %0 + andi 255,%1,%0 + sld.bu %1,%0 + ld.bu %1,%0" + [(set_attr "length" "2,4,2,4") + (set_attr "cc" "none_0hit,set_znv,none_0hit,none_0hit")]) (define_insn "zero_extendqisi2" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 1106,1111 **** --- 1493,1510 ---- ;;- sign extension instructions + ;; ??? The extendhisi2 pattern should not emit shifts for v850e? + + (define_insn "*extendhisi_insn" + [(set (match_operand:SI 0 "register_operand" "=r,r,r") + (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,Q,m")))] + "TARGET_V850E" + "@ + sxh %0 + sld.h %1,%0 + ld.h %1,%0" + [(set_attr "length" "2,2,4") + (set_attr "cc" "none_0hit,none_0hit,none_0hit")]) ;; ??? This is missing a sign extend from memory pattern to match the ld.h ;; instruction. *************** *** 1124,1129 **** --- 1523,1540 ---- operands[2] = gen_reg_rtx (SImode); }") + ;; ??? The extendqisi2 pattern should not emit shifts for v850e? + + (define_insn "*extendqisi_insn" + [(set (match_operand:SI 0 "register_operand" "=r,r,r") + (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "0,Q,m")))] + "TARGET_V850E" + "@ + sxb %0 + sld.b %1,%0 + ld.b %1,%0" + [(set_attr "length" "2,2,4") + (set_attr "cc" "none_0hit,none_0hit,none_0hit")]) ;; ??? This is missing a sign extend from memory pattern to match the ld.b ;; instruction. *************** *** 1229,1234 **** --- 1640,1660 ---- ;; RTXs. These RTXs will then be turned into a suitable call to a worker ;; function. + ;; + ;; Actually, convert the RTXs into a PREPARE instruction. + ;; + (define_insn "" + [(match_parallel 0 "pattern_is_ok_for_prepare" + [(set (reg:SI 3) + (plus:SI (reg:SI 3) (match_operand:SI 1 "immediate_operand" "i"))) + (set (mem:SI (plus:SI (reg:SI 3) + (match_operand:SI 2 "immediate_operand" "i"))) + (match_operand:SI 3 "register_is_ok_for_epilogue" "r"))])] + "TARGET_PROLOG_FUNCTION && TARGET_V850E" + "* return construct_prepare_instruction (operands[0]); + " + [(set_attr "length" "4") + (set_attr "cc" "none")]) (define_insn "" [(match_parallel 0 "pattern_is_ok_for_prologue" *************** *** 1245,1250 **** --- 1671,1693 ---- (const_string "4"))) (set_attr "cc" "clobber")]) + ;; + ;; Actually, turn the RTXs into a DISPOSE instruction. + ;; + (define_insn "" + [(match_parallel 0 "pattern_is_ok_for_dispose" + [(return) + (set (reg:SI 3) + (plus:SI (reg:SI 3) (match_operand:SI 1 "immediate_operand" "i"))) + (set (match_operand:SI 2 "register_is_ok_for_epilogue" "=r") + (mem:SI (plus:SI (reg:SI 3) + (match_operand:SI 3 "immediate_operand" "i"))))])] + "TARGET_PROLOG_FUNCTION && TARGET_V850E" + "* return construct_dispose_instruction (operands[0]); + " + [(set_attr "length" "4") + (set_attr "cc" "none")]) + ;; This pattern will match a return RTX followed by any number of pop RTXs ;; and possible a stack adjustment as well. These RTXs will be turned into ;; a suitable call to a worker function. *************** *** 1266,1296 **** (set_attr "cc" "clobber")]) ;; Initialize an interrupt function. Do not depend on TARGET_PROLOG_FUNCTION. (define_insn "save_interrupt" [(set (reg:SI 3) (plus:SI (reg:SI 3) (const_int -16))) ! (set (mem:SI (reg:SI 3)) (reg:SI 30)) ! (set (mem:SI (plus:SI (reg:SI 3) (const_int -4))) (reg:SI 10)) ! (set (mem:SI (plus:SI (reg:SI 3) (const_int -8))) (reg:SI 4)) ! (set (mem:SI (plus:SI (reg:SI 3) (const_int -12))) (reg:SI 1))] ! "TARGET_V850 && ! TARGET_LONG_CALLS" ! "add -16, sp ; st.w r10, 12[sp] ; jarl __save_interrupt, r10" ! [(set_attr "length" "12") (set_attr "cc" "clobber")]) ! ;; Restore r1, r4, r10, and return from the interrupt ! (define_insn "restore_interrupt" [(return) ! (set (reg:SI 3) (plus:SI (reg:SI 3) (const_int 16))) ! (set (reg:SI 30) (mem:SI (plus:SI (reg:SI 3) (const_int 12)))) ! (set (reg:SI 10) (mem:SI (plus:SI (reg:SI 3) (const_int 8)))) ! (set (reg:SI 4) (mem:SI (plus:SI (reg:SI 3) (const_int 4)))) ! (set (reg:SI 1) (mem:SI (reg:SI 3)))] "" ! "jr __return_interrupt" ! [(set_attr "length" "4") (set_attr "cc" "clobber")]) - ;; Save all registers except for the registers saved in save_interrupt when ;; an interrupt function makes a call. ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and --- 1709,1803 ---- (set_attr "cc" "clobber")]) ;; Initialize an interrupt function. Do not depend on TARGET_PROLOG_FUNCTION. + (define_insn "callt_save_interrupt" + [(unspec_volatile [(const_int 0)] 2)] + "TARGET_V850E && !TARGET_DISABLE_CALLT" + ;; The CALLT instruction stores the next address of CALLT to CTPC register + ;; without saving its previous value. So if the interrupt handler + ;; or its caller could possibily execute the CALLT insn, save_interrupt + ;; MUST NOT be called via CALLT. + "* + { + output_asm_insn (\"addi -24, sp, sp\", operands); + output_asm_insn (\"st.w r10, 12[sp]\", operands); + output_asm_insn (\"stsr ctpc, r10\", operands); + output_asm_insn (\"st.w r10, 16[sp]\", operands); + output_asm_insn (\"stsr ctpsw, r10\", operands); + output_asm_insn (\"st.w r10, 20[sp]\", operands); + output_asm_insn (\"callt ctoff(__callt_save_interrupt)\", operands); + return \"\"; + }" + [(set_attr "length" "26") + (set_attr "cc" "none")]) + + (define_insn "callt_return_interrupt" + [(unspec_volatile [(const_int 0)] 3)] + "TARGET_V850E && !TARGET_DISABLE_CALLT" + "callt ctoff(__callt_return_interrupt)" + [(set_attr "length" "2") + (set_attr "cc" "clobber")]) + (define_insn "save_interrupt" [(set (reg:SI 3) (plus:SI (reg:SI 3) (const_int -16))) ! (set (mem:SI (plus:SI (reg:SI 3) (const_int -16))) (reg:SI 30)) ! (set (mem:SI (plus:SI (reg:SI 3) (const_int -12))) (reg:SI 4)) ! (set (mem:SI (plus:SI (reg:SI 3) (const_int -8))) (reg:SI 1)) ! (set (mem:SI (plus:SI (reg:SI 3) (const_int -4))) (reg:SI 10))] ! "" ! "* ! { ! if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS) ! return \"add -16,sp\;st.w r10,12[sp]\;jarl __save_interrupt,r10\"; ! else ! { ! output_asm_insn (\"add -16, sp\", operands); ! output_asm_insn (\"st.w r10, 12[sp]\", operands); ! output_asm_insn (\"st.w ep, 0[sp]\", operands); ! output_asm_insn (\"st.w gp, 4[sp]\", operands); ! output_asm_insn (\"st.w r1, 8[sp]\", operands); ! output_asm_insn (\"movhi hi(__ep), r0, ep\", operands); ! output_asm_insn (\"movea lo(__ep), ep, ep\", operands); ! output_asm_insn (\"movhi hi(__gp), r0, gp\", operands); ! output_asm_insn (\"movea lo(__gp), gp, gp\", operands); ! return \"\"; ! } ! }" ! [(set (attr "length") ! (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") (const_int 0)) ! (const_int 10) ! (const_int 34))) (set_attr "cc" "clobber")]) ! ;; Restore r1, r4, r10, and return from the interrupt ! (define_insn "return_interrupt" [(return) ! (set (reg:SI 3) (plus:SI (reg:SI 3) (const_int 16))) ! (set (reg:SI 10) (mem:SI (plus:SI (reg:SI 3) (const_int 12)))) ! (set (reg:SI 1) (mem:SI (plus:SI (reg:SI 3) (const_int 8)))) ! (set (reg:SI 4) (mem:SI (plus:SI (reg:SI 3) (const_int 4)))) ! (set (reg:SI 30) (mem:SI (reg:SI 3)))] "" ! "* ! { ! if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS) ! return \"jr __return_interrupt\"; ! else ! { ! output_asm_insn (\"ld.w 0[sp], ep\", operands); ! output_asm_insn (\"ld.w 4[sp], gp\", operands); ! output_asm_insn (\"ld.w 8[sp], r1\", operands); ! output_asm_insn (\"ld.w 12[sp], r10\", operands); ! output_asm_insn (\"addi 16, sp, sp\", operands); ! output_asm_insn (\"reti\", operands); ! return \"\"; ! } ! }" ! [(set (attr "length") ! (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") (const_int 0)) ! (const_int 4) ! (const_int 24))) (set_attr "cc" "clobber")]) ;; Save all registers except for the registers saved in save_interrupt when ;; an interrupt function makes a call. ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and *************** *** 1298,1325 **** ;; This is needed because the rest of the compiler is not ready to handle ;; insns this complicated. (define_insn "save_all_interrupt" [(unspec_volatile [(const_int 0)] 0)] "TARGET_V850 && ! TARGET_LONG_CALLS" "jarl __save_all_interrupt,r10" [(set_attr "length" "4") (set_attr "cc" "clobber")]) - ;; Restore all registers saved when an interrupt function makes a call. ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and ;; all of memory. This blocks insns from being moved across this point. ;; This is needed because the rest of the compiler is not ready to handle ;; insns this complicated. (define_insn "restore_all_interrupt" [(unspec_volatile [(const_int 0)] 1)] "TARGET_V850 && ! TARGET_LONG_CALLS" "jarl __restore_all_interrupt,r10" [(set_attr "length" "4") (set_attr "cc" "clobber")]) ;; Save r6-r9 for a variable argument function (define_insn "save_r6_r9" [(set (mem:SI (reg:SI 3)) (reg:SI 6)) (set (mem:SI (plus:SI (reg:SI 3) (const_int 4))) (reg:SI 7)) --- 1805,1952 ---- ;; This is needed because the rest of the compiler is not ready to handle ;; insns this complicated. + (define_insn "callt_save_all_interrupt" + [(unspec_volatile [(const_int 0)] 0)] + "TARGET_V850E && !TARGET_DISABLE_CALLT" + "callt ctoff(__callt_save_all_interrupt)" + [(set_attr "length" "2") + (set_attr "cc" "none")]) + (define_insn "save_all_interrupt" [(unspec_volatile [(const_int 0)] 0)] + "" + "* + { + if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS) + return \"jarl __save_all_interrupt,r10\"; + + output_asm_insn (\"addi -120, sp, sp\", operands); + output_asm_insn (\"mov ep, r1\", operands); + output_asm_insn (\"mov sp, ep\", operands); + output_asm_insn (\"sst.w r31, 116[ep]\", operands); + output_asm_insn (\"sst.w r2, 112[ep]\", operands); + output_asm_insn (\"sst.w gp, 108[ep]\", operands); + output_asm_insn (\"sst.w r6, 104[ep]\", operands); + output_asm_insn (\"sst.w r7, 100[ep]\", operands); + output_asm_insn (\"sst.w r8, 96[ep]\", operands); + output_asm_insn (\"sst.w r9, 92[ep]\", operands); + output_asm_insn (\"sst.w r11, 88[ep]\", operands); + output_asm_insn (\"sst.w r12, 84[ep]\", operands); + output_asm_insn (\"sst.w r13, 80[ep]\", operands); + output_asm_insn (\"sst.w r14, 76[ep]\", operands); + output_asm_insn (\"sst.w r15, 72[ep]\", operands); + output_asm_insn (\"sst.w r16, 68[ep]\", operands); + output_asm_insn (\"sst.w r17, 64[ep]\", operands); + output_asm_insn (\"sst.w r18, 60[ep]\", operands); + output_asm_insn (\"sst.w r19, 56[ep]\", operands); + output_asm_insn (\"sst.w r20, 52[ep]\", operands); + output_asm_insn (\"sst.w r21, 48[ep]\", operands); + output_asm_insn (\"sst.w r22, 44[ep]\", operands); + output_asm_insn (\"sst.w r23, 40[ep]\", operands); + output_asm_insn (\"sst.w r24, 36[ep]\", operands); + output_asm_insn (\"sst.w r25, 32[ep]\", operands); + output_asm_insn (\"sst.w r26, 28[ep]\", operands); + output_asm_insn (\"sst.w r27, 24[ep]\", operands); + output_asm_insn (\"sst.w r28, 20[ep]\", operands); + output_asm_insn (\"sst.w r29, 16[ep]\", operands); + output_asm_insn (\"mov r1, ep\", operands); + return \"\"; + }" + [(set (attr "length") + (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") (const_int 0)) + (const_int 4) + (const_int 62) + )) + (set_attr "cc" "clobber")]) + + (define_insn "_save_all_interrupt" + [(unspec_volatile [(const_int 0)] 0)] "TARGET_V850 && ! TARGET_LONG_CALLS" "jarl __save_all_interrupt,r10" [(set_attr "length" "4") (set_attr "cc" "clobber")]) ;; Restore all registers saved when an interrupt function makes a call. ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and ;; all of memory. This blocks insns from being moved across this point. ;; This is needed because the rest of the compiler is not ready to handle ;; insns this complicated. + (define_insn "callt_restore_all_interrupt" + [(unspec_volatile [(const_int 0)] 1)] + "TARGET_V850E && !TARGET_DISABLE_CALLT" + "callt ctoff(__callt_restore_all_interrupt)" + [(set_attr "length" "2") + (set_attr "cc" "none")]) + (define_insn "restore_all_interrupt" [(unspec_volatile [(const_int 0)] 1)] + "" + "* + { + if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS) + return \"jarl __restore_all_interrupt,r10\"; + else + { + output_asm_insn (\"mov ep, r1\", operands); + output_asm_insn (\"mov sp, ep\", operands); + output_asm_insn (\"sld.w 116[ep], r31\", operands); + output_asm_insn (\"sld.w 112[ep], r2\", operands); + output_asm_insn (\"sld.w 108[ep], gp\", operands); + output_asm_insn (\"sld.w 104[ep], r6\", operands); + output_asm_insn (\"sld.w 100[ep], r7\", operands); + output_asm_insn (\"sld.w 96[ep], r8\", operands); + output_asm_insn (\"sld.w 92[ep], r9\", operands); + output_asm_insn (\"sld.w 88[ep], r11\", operands); + output_asm_insn (\"sld.w 84[ep], r12\", operands); + output_asm_insn (\"sld.w 80[ep], r13\", operands); + output_asm_insn (\"sld.w 76[ep], r14\", operands); + output_asm_insn (\"sld.w 72[ep], r15\", operands); + output_asm_insn (\"sld.w 68[ep], r16\", operands); + output_asm_insn (\"sld.w 64[ep], r17\", operands); + output_asm_insn (\"sld.w 60[ep], r18\", operands); + output_asm_insn (\"sld.w 56[ep], r19\", operands); + output_asm_insn (\"sld.w 52[ep], r20\", operands); + output_asm_insn (\"sld.w 48[ep], r21\", operands); + output_asm_insn (\"sld.w 44[ep], r22\", operands); + output_asm_insn (\"sld.w 40[ep], r23\", operands); + output_asm_insn (\"sld.w 36[ep], r24\", operands); + output_asm_insn (\"sld.w 32[ep], r25\", operands); + output_asm_insn (\"sld.w 28[ep], r26\", operands); + output_asm_insn (\"sld.w 24[ep], r27\", operands); + output_asm_insn (\"sld.w 20[ep], r28\", operands); + output_asm_insn (\"sld.w 16[ep], r29\", operands); + output_asm_insn (\"mov r1, ep\", operands); + output_asm_insn (\"addi 120, sp, sp\", operands); + return \"\"; + } + }" + [(set (attr "length") + (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") (const_int 0)) + (const_int 4) + (const_int 62) + )) + (set_attr "cc" "clobber")]) + + (define_insn "_restore_all_interrupt" + [(unspec_volatile [(const_int 0)] 1)] "TARGET_V850 && ! TARGET_LONG_CALLS" "jarl __restore_all_interrupt,r10" [(set_attr "length" "4") (set_attr "cc" "clobber")]) ;; Save r6-r9 for a variable argument function + (define_insn "save_r6_r9_v850e" + [(set (mem:SI (reg:SI 3)) (reg:SI 6)) + (set (mem:SI (plus:SI (reg:SI 3) (const_int 4))) (reg:SI 7)) + (set (mem:SI (plus:SI (reg:SI 3) (const_int 8))) (reg:SI 8)) + (set (mem:SI (plus:SI (reg:SI 3) (const_int 12))) (reg:SI 9)) + ] + "TARGET_PROLOG_FUNCTION && TARGET_V850E && !TARGET_DISABLE_CALLT" + "callt ctoff(__callt_save_r6_r9)" + [(set_attr "length" "2") + (set_attr "cc" "none")]) + (define_insn "save_r6_r9" [(set (mem:SI (reg:SI 3)) (reg:SI 6)) (set (mem:SI (plus:SI (reg:SI 3) (const_int 4))) (reg:SI 7)) diff -Nrc3pad gcc-3.2.3/gcc/config/v850/v850-protos.h gcc-3.3/gcc/config/v850/v850-protos.h *** gcc-3.2.3/gcc/config/v850/v850-protos.h 2001-12-09 20:13:17.000000000 +0000 --- gcc-3.3/gcc/config/v850/v850-protos.h 2002-09-15 20:44:01.000000000 +0000 *************** *** 1,22 **** /* Prototypes for v850.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Function prototypes that cannot exist in v850.h due to dependency complications. */ --- 1,22 ---- /* Prototypes for v850.c functions used in the md file & elsewhere. ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Function prototypes that cannot exist in v850.h due to dependency complications. */ *************** extern int compute_frame_size *** 42,47 **** --- 42,48 ---- extern void v850_init_expanders PARAMS ((void)); #ifdef RTX_CODE + extern int v850_output_addr_const_extra PARAMS ((FILE *, rtx)); extern rtx v850_return_addr PARAMS ((int)); extern void print_operand PARAMS ((FILE *, rtx, int )); extern void print_operand_address PARAMS ((FILE *, rtx)); *************** extern void notice_update_cc *** 53,58 **** --- 54,65 ---- extern char * construct_save_jarl PARAMS ((rtx)); extern char * construct_restore_jr PARAMS ((rtx)); #ifdef HAVE_MACHINE_MODES + extern int reg_or_int9_operand PARAMS ((rtx, Mmode)); + extern int reg_or_const_operand PARAMS ((rtx, Mmode)); + extern char * construct_dispose_instruction PARAMS ((rtx)); + extern char * construct_prepare_instruction PARAMS ((rtx)); + extern int pattern_is_ok_for_prepare PARAMS ((rtx, Mmode)); + extern int pattern_is_ok_for_dispose PARAMS ((rtx, Mmode)); extern int ep_memory_operand PARAMS ((rtx, Mmode, int)); extern int reg_or_0_operand PARAMS ((rtx, Mmode)); extern int reg_or_int5_operand PARAMS ((rtx, Mmode)); *************** extern rtx v850_va_arg *** 72,78 **** #endif /* TREE_CODE */ #ifdef TREE_CODE - extern void v850_encode_data_area PARAMS ((tree)); extern int v850_interrupt_function_p PARAMS ((tree)); extern void v850_output_aligned_bss PARAMS ((FILE *, tree, const char *, int, int)); extern void v850_output_common PARAMS ((FILE *, tree, const char *, int, int)); --- 79,84 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/vax/bsd.h gcc-3.3/gcc/config/vax/bsd.h *** gcc-3.2.3/gcc/config/vax/bsd.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/vax/bsd.h 2002-06-12 00:02:04.000000000 +0000 *************** *** 0 **** --- 1,32 ---- + /* Definitions of target machine for GNU compiler. BSD version. + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("unix"); \ + builtin_assert ("system=bsd"); \ + \ + builtin_define_std ("vax"); \ + if (TARGET_G_FLOAT) \ + builtin_define_std ("GFLOAT"); \ + } \ + while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/vax/elf.h gcc-3.3/gcc/config/vax/elf.h *** gcc-3.2.3/gcc/config/vax/elf.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/vax/elf.h 2002-10-04 05:23:12.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* Target definitions for GNU compiler for VAX using ELF + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Matt Thomas (matt@3am-software.com) + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #undef REGISTER_PREFIX + #undef REGISTER_NAMES + #define REGISTER_PREFIX "%" + #define REGISTER_NAMES \ + {"%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \ + "%r8", "%r9", "%r10", "%r11", "%ap", "%fp", "%sp", "%pc"} + + #undef SIZE_TYPE + #define SIZE_TYPE "long unsigned int" + + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "long int" + + /* Profiling routine. */ + #undef VAX_FUNCTION_PROFILER_NAME + #define VAX_FUNCTION_PROFILER_NAME "__mcount" + + /* Let's be re-entrant. */ + #undef PCC_STATIC_STRUCT_RETURN + + /* Make sure .stabs for a function are always the same section. */ + #define DBX_OUTPUT_FUNCTION_END(file,decl) function_section(decl) + + /* Before the prologue, the top of the frame is below the argument + count pushed by the CALLS and before the start of the saved registers. */ + #define INCOMING_FRAME_SP_OFFSET 0 + + /* We use R2-R5 (call-clobbered) registers for exceptions. */ + #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 2 : INVALID_REGNUM) + + /* Place the top of the stack for the DWARF2 EH stackadj value. */ + #define EH_RETURN_STACKADJ_RTX \ + gen_rtx_MEM (SImode, \ + plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM), \ + -4)) + + /* Simple store the return handler into the call frame. */ + #define EH_RETURN_HANDLER_RTX \ + gen_rtx_MEM (Pmode, \ + plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM), \ + 16)) + + + /* Reserve the top of the stack for exception handler stackadj value. */ + #undef STARTING_FRAME_OFFSET + #define STARTING_FRAME_OFFSET -4 + + /* The VAX wants no space between the case instruction and the jump table. */ + #undef ASM_OUTPUT_BEFORE_CASE_LABEL + #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) + + /* Get the udiv/urem calls out of the user's namespace. */ + #undef UDIVSI3_LIBCALL + #define UDIVSI3_LIBCALL "*__udiv" + #undef UMODSI3_LIBCALL + #define UMODSI3_LIBCALL "*__urem" + + #undef OVERRIDE_OPTIONS + #define OVERRIDE_OPTIONS \ + do \ + { \ + /* Do generic VAX overrides. */ \ + override_options (); \ + \ + /* Turn off function CSE if we're \ + doing PIC. */ \ + if (flag_pic) flag_no_function_cse = 1; \ + } \ + while (0) + + /* VAX ELF is always gas; override the generic VAX ASM_SPEC. */ + + #undef ASM_SPEC + #define ASM_SPEC "" diff -Nrc3pad gcc-3.2.3/gcc/config/vax/netbsd-elf.h gcc-3.3/gcc/config/vax/netbsd-elf.h *** gcc-3.2.3/gcc/config/vax/netbsd-elf.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/config/vax/netbsd-elf.h 2002-10-01 20:16:04.000000000 +0000 *************** *** 0 **** --- 1,61 ---- + /* Definitions of target machine for GNU compiler, + for NetBSD/vax ELF systems. + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + + /* Names to predefine in the preprocessor for this target OS. */ + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + NETBSD_OS_CPP_BUILTINS_ELF(); \ + } \ + while (0) + + #undef CPP_SPEC + #define CPP_SPEC NETBSD_CPP_SPEC + + #define NETBSD_ENTRY_POINT "__start" + + #undef LINK_SPEC + #if 1 + /* FIXME: We must link all executables statically until PIC support + is added to the compiler. */ + #define LINK_SPEC \ + "%{assert*} %{R*} %{rpath*} \ + %{shared:%eThe -shared option is not currently supported for VAX ELF.} \ + %{!shared: \ + -dc -dp \ + %{!nostdlib: \ + %{!r*: \ + %{!e*:-e %(netbsd_entry_point)}}} \ + %{!static:-static} \ + %{static:-static}}" + #else + #define LINK_SPEC NETBSD_LINK_SPEC_ELF + #endif + + #define EXTRA_SPECS \ + { "netbsd_entry_point", NETBSD_ENTRY_POINT }, + + /* We use gas, not the UNIX assembler. */ + #undef TARGET_DEFAULT + #define TARGET_DEFAULT 0 + + #undef ASM_FINAL_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/vax/netbsd.h gcc-3.3/gcc/config/vax/netbsd.h *** gcc-3.2.3/gcc/config/vax/netbsd.h 2002-02-05 19:01:56.000000000 +0000 --- gcc-3.3/gcc/config/vax/netbsd.h 2002-06-21 19:20:14.000000000 +0000 *************** *** 1,5 **** ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -Dvax -D__NetBSD__ -Asystem=unix -Asystem=NetBSD -Acpu=vax -Amachine=vax" /* Make gcc agree with */ --- 1,35 ---- ! /* Definitions of target machine for GNU compiler. ! NetBSD/vax a.out version. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 ! Free Software Foundation, Inc. ! ! This file is part of GNU CC. ! ! GNU CC is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU CC is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! NETBSD_OS_CPP_BUILTINS_AOUT(); \ ! } \ ! while (0) ! ! #undef CPP_SPEC ! #define CPP_SPEC NETBSD_CPP_SPEC /* Make gcc agree with */ *************** *** 10,15 **** #define PTRDIFF_TYPE "int" /* Until they use ELF or something that handles dwarf2 unwinds ! and initialization stuff better. */ #undef DWARF2_UNWIND_INFO --- 40,48 ---- #define PTRDIFF_TYPE "int" /* Until they use ELF or something that handles dwarf2 unwinds ! and initialization stuff better. Use sjlj exceptions. */ #undef DWARF2_UNWIND_INFO + /* We use gas, not the UNIX assembler. */ + #undef TARGET_DEFAULT + #define TARGET_DEFAULT 0 diff -Nrc3pad gcc-3.2.3/gcc/config/vax/openbsd.h gcc-3.3/gcc/config/vax/openbsd.h *** gcc-3.2.3/gcc/config/vax/openbsd.h 2001-08-03 01:19:19.000000000 +0000 --- gcc-3.3/gcc/config/vax/openbsd.h 2002-06-12 00:02:05.000000000 +0000 *************** *** 1,5 **** /* Configuration fragment for a VAX OpenBSD target. ! Copyright (C) 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Configuration fragment for a VAX OpenBSD target. ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 20,27 **** /* Amend common OpenBSD definitions for VAX target. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__unix__ -D__vax__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=vax -Amachine=vax" /* Layout of source language data types. */ --- 20,34 ---- /* Amend common OpenBSD definitions for VAX target. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__unix__"); \ ! builtin_define ("__OpenBSD__"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=OpenBSD"); \ ! } \ ! while (0) /* Layout of source language data types. */ diff -Nrc3pad gcc-3.2.3/gcc/config/vax/ultrix.h gcc-3.3/gcc/config/vax/ultrix.h *** gcc-3.2.3/gcc/config/vax/ultrix.h 2001-08-03 01:19:19.000000000 +0000 --- gcc-3.3/gcc/config/vax/ultrix.h 2002-06-12 00:02:05.000000000 +0000 *************** *** 1,5 **** /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,25 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES " -Dvax -Dunix -Dultrix -Dbsd4_2 -D__vax -D__unix -D__ultrix -D__bsd4_2 -Asystem=unix -Asystem=bsd -Acpu=vax -Amachine=vax" /* These are as defined in /usr/include/sys/stdtypes.h. These values are for ultrix 4.2 on the VAX. */ --- 18,38 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_define_std ("ultrix"); \ ! builtin_define_std ("bsd4_2"); \ ! builtin_assert ("system=unix"); \ ! builtin_assert ("system=bsd"); \ ! \ ! builtin_define_std ("vax"); \ ! if (TARGET_G_FLOAT) \ ! builtin_define_std ("GFLOAT"); \ ! } \ ! while (0) /* These are as defined in /usr/include/sys/stdtypes.h. These values are for ultrix 4.2 on the VAX. */ diff -Nrc3pad gcc-3.2.3/gcc/config/vax/vax.c gcc-3.3/gcc/config/vax/vax.c *** gcc-3.2.3/gcc/config/vax/vax.c 2002-01-15 22:37:00.000000000 +0000 --- gcc-3.3/gcc/config/vax/vax.c 2002-10-22 23:05:24.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 22,27 **** --- 22,28 ---- #include "config.h" #include "system.h" #include "rtl.h" + #include "tree.h" #include "regs.h" #include "hard-reg-set.h" #include "real.h" *************** Boston, MA 02111-1307, USA. */ *** 30,38 **** #include "function.h" #include "output.h" #include "insn-attr.h" - #include "tree.h" #include "recog.h" #include "expr.h" #include "tm_p.h" #include "target.h" #include "target-def.h" --- 31,40 ---- #include "function.h" #include "output.h" #include "insn-attr.h" #include "recog.h" #include "expr.h" + #include "flags.h" + #include "debug.h" #include "tm_p.h" #include "target.h" #include "target-def.h" *************** static void vax_output_function_prologue *** 42,48 **** --- 44,55 ---- #if VMS_TARGET static void vms_asm_out_constructor PARAMS ((rtx, int)); static void vms_asm_out_destructor PARAMS ((rtx, int)); + static void vms_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)); + static void vms_encode_section_info PARAMS ((tree, int)); + static void vms_globalize_label PARAMS ((FILE *, const char *)); #endif + static void vax_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, + HOST_WIDE_INT, tree)); /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP *************** static void vms_asm_out_destructor PARAM *** 51,58 **** --- 58,91 ---- #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE vax_output_function_prologue + #if VMS_TARGET + #undef TARGET_ASM_SELECT_SECTION + #define TARGET_ASM_SELECT_SECTION vms_select_section + #undef TARGET_ENCODE_SECTION_INFO + #define TARGET_ENCODE_SECTION_INFO vms_encode_section_info + #undef TARGET_ASM_GLOBALIZE_LABEL + #define TARGET_ASM_GLOBALIZE_LABEL vms_globalize_label + #endif + + #undef TARGET_ASM_OUTPUT_MI_THUNK + #define TARGET_ASM_OUTPUT_MI_THUNK vax_output_mi_thunk + #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK + #define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall + struct gcc_target targetm = TARGET_INITIALIZER; + /* Set global variables as needed for the options enabled. */ + + void + override_options () + { + /* We're VAX floating point, not IEEE floating point. */ + memset (real_format_for_mode, 0, sizeof real_format_for_mode); + real_format_for_mode[SFmode - QFmode] = &vax_f_format; + real_format_for_mode[DFmode - QFmode] + = (TARGET_G_FLOAT ? &vax_g_format : &vax_d_format); + } + /* Generate the assembly code for function entry. FILE is a stdio stream to output the code to. SIZE is an int: how many units of temporary storage to allocate. *************** vax_output_function_prologue (file, size *** 76,123 **** fprintf (file, "\t.word 0x%x\n", mask); ! if (VMS_TARGET) { ! /* ! * This works for both gcc and g++. It first checks to see if ! * the current routine is "main", which will only happen for ! * GCC, and add the jsb if it is. If is not the case then try ! * and see if __MAIN_NAME is part of current_function_name, ! * which will only happen if we are running g++, and add the jsb ! * if it is. In gcc there should never be a paren in the ! * function name, and in g++ there is always a "(" in the ! * function name, thus there should never be any confusion. ! * ! * Adjusting the stack pointer by 4 before calling C$MAIN_ARGS ! * is required when linking with the VMS POSIX version of the C ! * run-time library; using `subl2 $4,r0' is adequate but we use ! * `clrl -(sp)' instead. The extra 4 bytes could be removed ! * after the call because STARTING_FRAME_OFFSET's setting of -4 ! * will end up adding them right back again, but don't bother. ! */ ! const char *p = current_function_name; ! int is_main = strcmp ("main", p) == 0; ! # define __MAIN_NAME " main(" ! while (!is_main && *p != '\0') ! { ! if (*p == *__MAIN_NAME ! && strncmp (p, __MAIN_NAME, sizeof __MAIN_NAME - sizeof "") == 0) ! is_main = 1; ! else ! p++; ! } ! if (is_main) ! fprintf (file, "\t%s\n\t%s\n", "clrl -(sp)", "jsb _C$MAIN_ARGS"); } ! size -= STARTING_FRAME_OFFSET; ! if (size >= 64) ! fprintf (file, "\tmovab %d(sp),sp\n", -size); ! else if (size) ! fprintf (file, "\tsubl2 $%d,sp\n", size); } /* This is like nonimmediate_operand with a restriction on the type of MEM. */ --- 109,147 ---- fprintf (file, "\t.word 0x%x\n", mask); ! if (dwarf2out_do_frame ()) { ! const char *label = dwarf2out_cfi_label (); ! int offset = 0; ! for (regno = FIRST_PSEUDO_REGISTER-1; regno >= 0; --regno) ! if (regs_ever_live[regno] && !call_used_regs[regno]) ! dwarf2out_reg_save (label, regno, offset -= 4); ! dwarf2out_reg_save (label, PC_REGNUM, offset -= 4); ! dwarf2out_reg_save (label, FRAME_POINTER_REGNUM, offset -= 4); ! dwarf2out_reg_save (label, ARG_POINTER_REGNUM, offset -= 4); ! dwarf2out_def_cfa (label, FRAME_POINTER_REGNUM, -(offset - 4)); ! } ! if (VMS_TARGET) ! { ! /* Adjusting the stack pointer by 4 before calling C$MAIN_ARGS ! is required when linking with the VMS POSIX version of the C ! run-time library; using `subl2 $4,r0' is adequate but we use ! `clrl -(sp)' instead. The extra 4 bytes could be removed ! after the call because STARTING_FRAME_OFFSET's setting of -4 ! will end up adding them right back again, but don't bother. */ ! ! if (MAIN_NAME_P (DECL_NAME (current_function_decl))) ! asm_fprintf (file, "\tclrl -(%Rsp)\n\tjsb _C$MAIN_ARGS\n"); } ! size -= STARTING_FRAME_OFFSET; ! if (size >= 64) ! asm_fprintf (file, "\tmovab %d(%Rsp),%Rsp\n", -size); ! else if (size) ! asm_fprintf (file, "\tsubl2 $%d,%Rsp\n", size); } /* This is like nonimmediate_operand with a restriction on the type of MEM. */ *************** print_operand_address (file, addr) *** 303,309 **** else abort (); ! /* If REG1 is non-zero, figure out if it is a base or index register. */ if (reg1) { if (breg != 0 || (offset && GET_CODE (offset) == MEM)) --- 327,333 ---- else abort (); ! /* If REG1 is nonzero, figure out if it is a base or index register. */ if (reg1) { if (breg != 0 || (offset && GET_CODE (offset) == MEM)) *************** vax_float_literal(c) *** 374,383 **** register rtx c; { register enum machine_mode mode; ! #if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT int i; - union {double d; int i[2];} val; - #endif if (GET_CODE (c) != CONST_DOUBLE) return 0; --- 398,405 ---- register rtx c; { register enum machine_mode mode; ! REAL_VALUE_TYPE r, s; int i; if (GET_CODE (c) != CONST_DOUBLE) return 0; *************** vax_float_literal(c) *** 389,403 **** || c == const_tiny_rtx[(int) mode][2]) return 1; ! #if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT ! val.i[0] = CONST_DOUBLE_LOW (c); ! val.i[1] = CONST_DOUBLE_HIGH (c); ! for (i = 0; i < 7; i ++) ! if (val.d == 1 << i || val.d == 1 / (1 << i)) ! return 1; ! #endif return 0; } --- 411,430 ---- || c == const_tiny_rtx[(int) mode][2]) return 1; ! REAL_VALUE_FROM_CONST_DOUBLE (r, c); ! for (i = 0; i < 7; i++) ! { ! int x = 1 << i; ! REAL_VALUE_FROM_INT (s, x, 0, mode); ! if (REAL_VALUES_EQUAL (r, s)) ! return 1; ! if (!exact_real_inverse (mode, &s)) ! abort (); ! if (REAL_VALUES_EQUAL (r, s)) ! return 1; ! } return 0; } *************** vax_rtx_cost (x) *** 678,752 **** } return c; } - - /* Check a `double' value for validity for a particular machine mode. */ - - static const char *const float_strings[] = - { - "1.70141173319264430e+38", /* 2^127 (2^24 - 1) / 2^24 */ - "-1.70141173319264430e+38", - "2.93873587705571877e-39", /* 2^-128 */ - "-2.93873587705571877e-39" - }; - - static REAL_VALUE_TYPE float_values[4]; - - static int inited_float_values = 0; - - - int - check_float_value (mode, d, overflow) - enum machine_mode mode; - REAL_VALUE_TYPE *d; - int overflow; - { - if (inited_float_values == 0) - { - int i; - for (i = 0; i < 4; i++) - { - float_values[i] = REAL_VALUE_ATOF (float_strings[i], DFmode); - } - - inited_float_values = 1; - } - - if (overflow) - { - memcpy (d, &float_values[0], sizeof (REAL_VALUE_TYPE)); - return 1; - } - - if ((mode) == SFmode) - { - REAL_VALUE_TYPE r; - memcpy (&r, d, sizeof (REAL_VALUE_TYPE)); - if (REAL_VALUES_LESS (float_values[0], r)) - { - memcpy (d, &float_values[0], sizeof (REAL_VALUE_TYPE)); - return 1; - } - else if (REAL_VALUES_LESS (r, float_values[1])) - { - memcpy (d, &float_values[1], sizeof (REAL_VALUE_TYPE)); - return 1; - } - else if (REAL_VALUES_LESS (dconst0, r) - && REAL_VALUES_LESS (r, float_values[2])) - { - memcpy (d, &dconst0, sizeof (REAL_VALUE_TYPE)); - return 1; - } - else if (REAL_VALUES_LESS (r, dconst0) - && REAL_VALUES_LESS (float_values[3], r)) - { - memcpy (d, &dconst0, sizeof (REAL_VALUE_TYPE)); - return 1; - } - } - - return 0; - } #if VMS_TARGET /* Additional support code for VMS target. */ --- 705,710 ---- *************** vms_check_external (decl, name, pending) *** 795,801 **** } /* Not previously seen; create a new list entry. */ ! p = (struct extern_list *)permalloc ((long) sizeof (struct extern_list)); p->name = name; if (pending) --- 753,759 ---- } /* Not previously seen; create a new list entry. */ ! p = (struct extern_list *) xmalloc (sizeof (struct extern_list)); p->name = name; if (pending) *************** vms_asm_out_destructor (symbol, priority *** 868,873 **** --- 826,884 ---- assemble_name (asm_out_file, XSTR (symbol, 0)); fputc ('\n', asm_out_file); } + + static void + vms_select_section (exp, reloc, align) + tree exp; + int reloc ATTRIBUTE_UNUSED; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + if (TREE_CODE (exp) == VAR_DECL) + { + if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp) + && DECL_INITIAL (exp) + && (DECL_INITIAL (exp) == error_mark_node + || TREE_CONSTANT (DECL_INITIAL (exp)))) + { + if (TREE_PUBLIC (exp)) + const_section (); + else + text_section (); + } + else + data_section (); + } + if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'c') + { + if (TREE_CODE (exp) == STRING_CST && flag_writable_strings) + data_section (); + else + text_section (); + } + } + + /* Make sure that external variables are correctly addressed. Under VMS + there is some brain damage in the linker that requires us to do this. */ + + static void + vms_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl)) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + + /* This is how to output a command to make the user-level label named NAME + defined for reference from other files. */ + static void + vms_globalize_label (stream, name) + FILE *stream; + const char *name; + { + default_globalize_label (stream, name); + vms_check_external (NULL_TREE, name, 0); + } #endif /* VMS_TARGET */ /* Additional support code for VMS host. */ *************** reg_was_0_p (insn, op) *** 988,990 **** --- 999,1018 ---- /* Make sure the reg hasn't been clobbered. */ && ! reg_set_between_p (op, XEXP (link, 0), insn)); } + + static void + vax_output_mi_thunk (file, thunk, delta, vcall_offset, function) + FILE *file; + tree thunk ATTRIBUTE_UNUSED; + HOST_WIDE_INT delta; + HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED; + tree function; + { + fprintf (file, "\t.word 0x0ffc\n"); + fprintf (file, "\taddl2 $"); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta); + asm_fprintf (file, ",4(%Rap)\n"); + fprintf (file, "\tjmp "); + assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); + fprintf (file, "+2\n"); + } diff -Nrc3pad gcc-3.2.3/gcc/config/vax/vax.h gcc-3.3/gcc/config/vax/vax.h *** gcc-3.2.3/gcc/config/vax/vax.h 2002-05-21 23:45:13.000000000 +0000 --- gcc-3.3/gcc/config/vax/vax.h 2002-10-22 23:05:24.000000000 +0000 *************** along with GNU CC; see the file COPYING. *** 19,38 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #define VMS_TARGET 0 ! /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-Dvax -D__vax__ -Dunix -Asystem=unix -Asystem=bsd -Acpu=vax -Amachine=vax" /* Use -J option for long branch support with Unix assembler. */ #define ASM_SPEC "-J" - /* If using g-format floating point, alter math.h. */ - - #define CPP_SPEC "%{mg:%{!ansi:-DGFLOAT} -D__GFLOAT}" - /* Choose proper libraries depending on float format. Note that there are no profiling libraries for g-format. Also use -lg for the sake of dbx. */ --- 19,46 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Target CPU builtins. */ ! #define TARGET_CPU_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define ("__vax__"); \ ! builtin_assert ("cpu=vax"); \ ! builtin_assert ("machine=vax"); \ ! if (TARGET_G_FLOAT) \ ! { \ ! builtin_define ("__GFLOAT"); \ ! builtin_define ("__GFLOAT__"); \ ! } \ ! } \ ! while (0) ! #define VMS_TARGET 0 /* Use -J option for long branch support with Unix assembler. */ #define ASM_SPEC "-J" /* Choose proper libraries depending on float format. Note that there are no profiling libraries for g-format. Also use -lg for the sake of dbx. */ *************** Boston, MA 02111-1307, USA. */ *** 54,69 **** extern int target_flags; /* Macros used in the machine description to test the flags. */ /* Nonzero if compiling code that Unix assembler can assemble. */ ! #define TARGET_UNIX_ASM (target_flags & 1) /* Nonzero if compiling with VAX-11 "C" style structure alignment */ ! #define TARGET_VAXC_ALIGNMENT (target_flags & 2) /* Nonzero if compiling with `G'-format floating point */ ! #define TARGET_G_FLOAT (target_flags & 4) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, --- 62,82 ---- extern int target_flags; + #define MASK_UNIX_ASM 1 + #define MASK_VAXC_ALIGNMENT 2 + #define MASK_G_FLOAT 4 + + /* Macros used in the machine description to test the flags. */ /* Nonzero if compiling code that Unix assembler can assemble. */ ! #define TARGET_UNIX_ASM (target_flags & MASK_UNIX_ASM) /* Nonzero if compiling with VAX-11 "C" style structure alignment */ ! #define TARGET_VAXC_ALIGNMENT (target_flags & MASK_VAXC_ALIGNMENT) /* Nonzero if compiling with `G'-format floating point */ ! #define TARGET_G_FLOAT (target_flags & MASK_G_FLOAT) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** extern int target_flags; *** 72,96 **** An empty string NAME is used to identify the default VALUE. */ #define TARGET_SWITCHES \ ! { {"unix", 1, "Generate code for UNIX assembler"}, \ ! {"gnu", -1, "Generate code for GNU assembler (gas)"}, \ ! {"vaxc-alignment", 2, "Use VAXC structure conventions"}, \ ! {"g", 4, "Generate GFLOAT double precision code"}, \ ! {"g-float", 4, "Generate GFLOAT double precision code"}, \ ! {"d", -4, "Generate DFLOAT double precision code"}, \ ! {"d-float", -4, "Generate DFLOAT double precision code"}, \ { "", TARGET_DEFAULT, 0}} /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT 1 #endif /* Target machine storage layout */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. This is not true on the VAX. */ --- 85,117 ---- An empty string NAME is used to identify the default VALUE. */ #define TARGET_SWITCHES \ ! { {"unix", MASK_UNIX_ASM, \ ! "Generate code for UNIX assembler"}, \ ! {"gnu", -MASK_UNIX_ASM, \ ! "Generate code for GNU assembler (gas)"}, \ ! {"vaxc-alignment", MASK_VAXC_ALIGNMENT, \ ! "Use VAXC structure conventions"}, \ ! {"g", MASK_G_FLOAT, \ ! "Generate GFLOAT double precision code"}, \ ! {"g-float", MASK_G_FLOAT, \ ! "Generate GFLOAT double precision code"}, \ ! {"d", -MASK_G_FLOAT, \ ! "Generate DFLOAT double precision code"}, \ ! {"d-float", -MASK_G_FLOAT, \ ! "Generate DFLOAT double precision code"}, \ { "", TARGET_DEFAULT, 0}} /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT (MASK_UNIX_ASM) #endif + + #define OVERRIDE_OPTIONS override_options () + /* Target machine storage layout */ /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. This is not true on the VAX. */ *************** extern int target_flags; *** 105,126 **** /* This is not true on the VAX. */ #define WORDS_BIG_ENDIAN 0 - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a 68000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD 4 - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 --- 126,134 ---- *************** extern int target_flags; *** 133,139 **** /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS (! TARGET_VAXC_ALIGNMENT) /* No data type wants to be aligned rounder than this. */ --- 141,147 ---- /* Every structure's size must be a multiple of this. */ #define STRUCTURE_SIZE_BOUNDARY 8 ! /* A bit-field declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS (! TARGET_VAXC_ALIGNMENT) /* No data type wants to be aligned rounder than this. */ *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 280,295 **** #define REG_CLASS_FROM_LETTER(C) NO_REGS ! /* The letters I, J, K, L and M in a register constraint string can be used to stand for particular ranges of immediate operands. This macro defines what the ranges are. C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. ! `I' is the constant zero. */ #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'I' ? (VALUE) == 0 \ : 0) /* Similar, but for floating constants, and defining letters G and H. --- 288,315 ---- #define REG_CLASS_FROM_LETTER(C) NO_REGS ! /* The letters I, J, K, L, M, N, and O in a register constraint string can be used to stand for particular ranges of immediate operands. This macro defines what the ranges are. C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. ! `I' is the constant zero. ! `J' is a value between 0 .. 63 (inclusive) ! `K' is a value between -128 and 127 (inclusive) ! 'L' is a value between -32768 and 32767 (inclusive) ! `M' is a value between 0 and 255 (inclusive) ! 'N' is a value between 0 and 65535 (inclusive) ! `O' is a value between -63 and -1 (inclusive) */ #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ! ( (C) == 'I' ? (VALUE) == 0 \ ! : (C) == 'J' ? 0 <= (VALUE) && (VALUE) < 64 \ ! : (C) == 'O' ? -63 <= (VALUE) && (VALUE) < 0 \ ! : (C) == 'K' ? -128 <= (VALUE) && (VALUE) < 128 \ ! : (C) == 'M' ? 0 <= (VALUE) && (VALUE) < 256 \ ! : (C) == 'L' ? -32768 <= (VALUE) && (VALUE) < 32768 \ ! : (C) == 'N' ? 0 <= (VALUE) && (VALUE) < 65536 \ : 0) /* Similar, but for floating constants, and defining letters G and H. *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 450,457 **** /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\tmovab LP%d,r0\n\tjsb mcount\n", (LABELNO)); /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in --- 470,487 ---- /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ ! #define VAX_FUNCTION_PROFILER_NAME "mcount" ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! do \ ! { \ ! char label[256]; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "LP", (LABELNO)); \ ! fprintf (FILE, "\tmovab "); \ ! assemble_name (FILE, label); \ ! asm_fprintf (FILE, ",%Rr0\n\tjsb %s\n", \ ! VAX_FUNCTION_PROFILER_NAME); \ ! } \ ! while (0) /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 500,512 **** to the start of the trampoline. */ #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ - emit_insn (gen_rtx_ASM_INPUT (VOIDmode, \ - "movpsl -(sp)\n\tpushal 1(pc)\n\trei")); \ emit_move_insn (gen_rtx_MEM (HImode, TRAMP), \ gen_rtx_MEM (HImode, FNADDR)); \ ! emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)), CXT);\ emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 11)), \ plus_constant (FNADDR, 2)); \ } /* Byte offset of return address in a stack frame. The "saved PC" field --- 530,541 ---- to the start of the trampoline. */ #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ emit_move_insn (gen_rtx_MEM (HImode, TRAMP), \ gen_rtx_MEM (HImode, FNADDR)); \ ! emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)), CXT); \ emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 11)), \ plus_constant (FNADDR, 2)); \ + emit_insn (gen_sync_istream ()); \ } /* Byte offset of return address in a stack frame. The "saved PC" field *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 622,628 **** || GET_CODE (X) == CONST_INT) ! /* Non-zero if X is an address which can be indirected. External symbols could be in a sharable image library, so we disallow those. */ #define INDIRECTABLE_ADDRESS_P(X) \ --- 651,657 ---- || GET_CODE (X) == CONST_INT) ! /* Nonzero if X is an address which can be indirected. External symbols could be in a sharable image library, so we disallow those. */ #define INDIRECTABLE_ADDRESS_P(X) \ *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 637,643 **** #define INDIRECTABLE_CONSTANT_ADDRESS_P(X) CONSTANT_ADDRESS_P(X) ! /* Non-zero if X is an address which can be indirected. */ #define INDIRECTABLE_ADDRESS_P(X) \ (CONSTANT_ADDRESS_P (X) \ || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ --- 666,672 ---- #define INDIRECTABLE_CONSTANT_ADDRESS_P(X) CONSTANT_ADDRESS_P(X) ! /* Nonzero if X is an address which can be indirected. */ #define INDIRECTABLE_ADDRESS_P(X) \ (CONSTANT_ADDRESS_P (X) \ || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 776,781 **** --- 805,814 ---- jumps to the default label instead. */ #define CASE_DROPS_THROUGH + /* Indicate that jump tables go in the text section. This is + necessary when compiling PIC code. */ + #define JUMP_TABLES_IN_TEXT_SECTION 1 + /* Define this as 1 if `char' should by default be signed; else as 0. */ #define DEFAULT_SIGNED_CHAR 1 *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 877,908 **** #define UDIVSI3_LIBCALL "*udiv" #define UMODSI3_LIBCALL "*urem" - - /* Check a `double' value for validity for a particular machine mode. */ - - /* note that it is very hard to accidentally create a number that fits in a - double but not in a float, since their ranges are almost the same */ - - #define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \ - ((OVERFLOW) = check_float_value (MODE, &D, OVERFLOW)) - - /* For future reference: - D Float: 9 bit, sign magnitude, excess 128 binary exponent - normalized 56 bit fraction, redundant bit not represented - approximately 16 decimal digits of precision - - The values to use if we trust decimal to binary conversions: - #define MAX_D_FLOAT 1.7014118346046923e+38 - #define MIN_D_FLOAT .29387358770557188e-38 - - G float: 12 bit, sign magnitude, excess 1024 binary exponent - normalized 53 bit fraction, redundant bit not represented - approximately 15 decimal digits precision - - The values to use if we trust decimal to binary conversions: - #define MAX_G_FLOAT .898846567431157e+308 - #define MIN_G_FLOAT .556268464626800e-308 - */ /* Tell final.c how to eliminate redundant test instructions. */ --- 910,915 ---- *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 1010,1024 **** #define DATA_SECTION_ASM_OP "\t.data" /* How to refer to registers in assembler output. ! This sequence is indexed by compiler's hard-register-number (see above). */ #define REGISTER_NAMES \ {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \ "r9", "r10", "r11", "ap", "fp", "sp", "pc"} /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO /* Do not break .stabs pseudos into continuations. */ --- 1017,1033 ---- #define DATA_SECTION_ASM_OP "\t.data" /* How to refer to registers in assembler output. ! This sequence is indexed by compiler's hard-register-number (see above). ! The register names will be prefixed by REGISTER_PREFIX, if any. */ + #define REGISTER_PREFIX "" #define REGISTER_NAMES \ {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \ "r9", "r10", "r11", "ap", "fp", "sp", "pc"} /* This is BSD, so it wants DBX format. */ ! #define DBX_DEBUGGING_INFO 1 /* Do not break .stabs pseudos into continuations. */ *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 1041,1057 **** #define ASM_DOUBLE_CHAR (TARGET_G_FLOAT ? 'g' : 'd') - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) /* The prefix to add to user-visible assembler symbols. */ --- 1050,1060 ---- #define ASM_DOUBLE_CHAR (TARGET_G_FLOAT ? 'g' : 'd') /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP ".globl " /* The prefix to add to user-visible assembler symbols. */ *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 1081,1099 **** It need not be very fast code. */ #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ ! fprintf (FILE, "\tmovl (sp)+,%s\n", reg_names[REGNO]) /* This is how to output an element of a case-vector that is absolute. (The VAX does not use such vectors, but we must define this macro anyway.) */ ! #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! fprintf (FILE, "\t.long L%d\n", VALUE) /* This is how to output an element of a case-vector that is relative. */ ! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ! fprintf (FILE, "\t.word L%d-L%d\n", VALUE, REL) /* This is how to output an assembler line that says to advance the location counter --- 1084,1122 ---- It need not be very fast code. */ #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ ! fprintf (FILE, "\tmovl (%s)+,%s\n", reg_names[STACK_POINTER_REGNUM], \ ! reg_names[REGNO]) /* This is how to output an element of a case-vector that is absolute. (The VAX does not use such vectors, but we must define this macro anyway.) */ ! #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ! do \ ! { \ ! char label[256]; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE));\ ! fprintf (FILE, "\t.long "); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "\n"); \ ! } \ ! while (0) /* This is how to output an element of a case-vector that is relative. */ ! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ! do \ ! { \ ! char label[256]; \ ! ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \ ! fprintf (FILE, "\t.word "); \ ! assemble_name (FILE, label); \ ! ASM_GENERATE_INTERNAL_LABEL (label, "L", (REL)); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "\n"); \ ! } \ ! while (0) /* This is how to output an assembler line that says to advance the location counter *************** enum reg_class { NO_REGS, ALL_REGS, LIM_ *** 1132,1152 **** ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. - Used for C++ multiple inheritance. - .mask ^m #conservative entry mask - addl2 $DELTA, 4(ap) #adjust first argument - jmp FUNCTION+2 #jump beyond FUNCTION's entry mask - */ - #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ - do { \ - fprintf (FILE, "\t.word 0x0ffc\n"); \ - fprintf (FILE, "\taddl2 $%d,4(ap)\n", DELTA); \ - fprintf (FILE, "\tjmp "); \ - assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "+2\n"); \ - } while (0) - /* Print an instruction operand X on file FILE. CODE is the code from the %-spec that requested printing this operand; if `%z3' was used to print operand 3, then CODE is 'z'. --- 1155,1160 ---- *************** VAX operand formatting codes: *** 1164,1180 **** R 32 - constant operand b the low 8 bits of a negated constant operand h the low 16 bits of a negated constant operand ! # 'd' or 'g' depending on whether dfloat or gfloat is used */ /* The purpose of D is to get around a quirk or bug in VAX assembler whereby -1 in a 64-bit immediate operand means 0x00000000ffffffff, which is not a 64-bit minus one. */ #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ! ((CODE) == '#') #define PRINT_OPERAND(FILE, X, CODE) \ { if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE); \ else if (CODE == 'C') \ fputs (rev_cond_name (X), FILE); \ else if (CODE == 'D' && GET_CODE (X) == CONST_INT && INTVAL (X) < 0) \ --- 1172,1191 ---- R 32 - constant operand b the low 8 bits of a negated constant operand h the low 16 bits of a negated constant operand ! # 'd' or 'g' depending on whether dfloat or gfloat is used ! | register prefix */ /* The purpose of D is to get around a quirk or bug in VAX assembler whereby -1 in a 64-bit immediate operand means 0x00000000ffffffff, which is not a 64-bit minus one. */ #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ! ((CODE) == '#' || (CODE) == '|') #define PRINT_OPERAND(FILE, X, CODE) \ { if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE); \ + else if (CODE == '|') \ + fputs (REGISTER_PREFIX, FILE); \ else if (CODE == 'C') \ fputs (rev_cond_name (X), FILE); \ else if (CODE == 'D' && GET_CODE (X) == CONST_INT && INTVAL (X) < 0) \ *************** VAX operand formatting codes: *** 1201,1214 **** else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \ ! { REAL_VALUE_TYPE r; char dstr[30]; \ ! REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ ! REAL_VALUE_TO_DECIMAL (r, "%.20e", dstr); \ fprintf (FILE, "$0f%s", dstr); } \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ ! { REAL_VALUE_TYPE r; char dstr[30]; \ ! REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ ! REAL_VALUE_TO_DECIMAL (r, "%.20e", dstr); \ fprintf (FILE, "$0%c%s", ASM_DOUBLE_CHAR, dstr); } \ else { putc ('$', FILE); output_addr_const (FILE, X); }} --- 1212,1225 ---- else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \ ! { char dstr[30]; \ ! real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X), \ ! sizeof (dstr), 0, 1); \ fprintf (FILE, "$0f%s", dstr); } \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ ! { char dstr[30]; \ ! real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X), \ ! sizeof (dstr), 0, 1); \ fprintf (FILE, "$0%c%s", ASM_DOUBLE_CHAR, dstr); } \ else { putc ('$', FILE); output_addr_const (FILE, X); }} *************** VAX operand formatting codes: *** 1217,1219 **** --- 1228,1235 ---- #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ print_operand_address (FILE, ADDR) + + /* This is a blatent lie. However, it's good enough, since we don't + actually have any code whatsoever for which this isn't overridden + by the proper FDE definition. */ + #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, PC_REGNUM) diff -Nrc3pad gcc-3.2.3/gcc/config/vax/vax.md gcc-3.3/gcc/config/vax/vax.md *** gcc-3.2.3/gcc/config/vax/vax.md 2002-07-15 16:19:39.000000000 +0000 --- gcc-3.3/gcc/config/vax/vax.md 2002-10-01 20:16:04.000000000 +0000 *************** *** 28,33 **** --- 28,42 ---- ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code ;;- updates for most instructions. + ;; UNSPEC_VOLATILE usage: + + (define_constants + [(VUNSPEC_BLOCKAGE 0) ; `blockage' insn to prevent scheduling across an + ; insn in the code. + (VUNSPEC_SYNC_ISTREAM 1) ; sequence of insns to sync the I-stream + ] + ) + ;; We don't want to allow a constant operand for test insns because ;; (set (cc0) (const_int foo)) has no mode information. Such insns will ;; be folded while optimizing anyway. *************** *** 1798,1808 **** "" "decl %0\;jgequ %l1") - ;; Note that operand 1 is total size of args, in bytes, - ;; and what the call insn wants is the number of words. - ;; It is used in the call instruction as a byte, but in the addl2 as - ;; a word. Since the only time we actually use it in the call instruction - ;; is when it is a constant, SImode (for addl2) is the proper mode. (define_expand "call_pop" [(parallel [(call (match_operand:QI 0 "memory_operand" "") (match_operand:SI 1 "const_int_operand" "")) --- 1807,1812 ---- *************** *** 1810,1821 **** (plus:SI (reg:SI 14) (match_operand:SI 3 "immediate_operand" "")))])] "" - " { ! if (INTVAL (operands[1]) > 255 * 4) abort (); ! operands[1] = GEN_INT ((INTVAL (operands[1]) + 3)/ 4); ! }") (define_insn "*call_pop" [(call (match_operand:QI 0 "memory_operand" "m") --- 1814,1828 ---- (plus:SI (reg:SI 14) (match_operand:SI 3 "immediate_operand" "")))])] "" { ! if (INTVAL (operands[3]) > 255 * 4 || INTVAL (operands[3]) % 4) abort (); ! ! /* Operand 1 is the number of bytes to be popped by DW_CFA_GNU_args_size ! during EH unwinding. We must include the argument count pushed by ! the calls instruction. */ ! operands[1] = GEN_INT (INTVAL (operands[3]) + 4); ! }) (define_insn "*call_pop" [(call (match_operand:QI 0 "memory_operand" "m") *************** *** 1823,1829 **** (set (reg:SI 14) (plus:SI (reg:SI 14) (match_operand:SI 2 "immediate_operand" "i")))] "" ! "calls %1,%0") (define_expand "call_value_pop" [(parallel [(set (match_operand 0 "" "") --- 1830,1839 ---- (set (reg:SI 14) (plus:SI (reg:SI 14) (match_operand:SI 2 "immediate_operand" "i")))] "" ! { ! operands[1] = GEN_INT ((INTVAL (operands[1]) - 4) / 4); ! return "calls %1,%0"; ! }) (define_expand "call_value_pop" [(parallel [(set (match_operand 0 "" "") *************** *** 1833,1844 **** (plus:SI (reg:SI 14) (match_operand:SI 4 "immediate_operand" "")))])] "" - " { ! if (INTVAL (operands[2]) > 255 * 4) ! abort (); ! operands[2] = GEN_INT ((INTVAL (operands[2]) + 3)/ 4); ! }") (define_insn "*call_value_pop" [(set (match_operand 0 "" "") --- 1843,1857 ---- (plus:SI (reg:SI 14) (match_operand:SI 4 "immediate_operand" "")))])] "" { ! if (INTVAL (operands[4]) > 255 * 4 || INTVAL (operands[4]) % 4) ! abort (); ! ! /* Operand 2 is the number of bytes to be popped by DW_CFA_GNU_args_size ! during EH unwinding. We must include the argument count pushed by ! the calls instruction. */ ! operands[2] = GEN_INT (INTVAL (operands[4]) + 4); ! }) (define_insn "*call_value_pop" [(set (match_operand 0 "" "") *************** *** 1847,1866 **** (set (reg:SI 14) (plus:SI (reg:SI 14) (match_operand:SI 3 "immediate_operand" "i")))] "" ! "calls %2,%1") ! ;; Define another set of these for the case of functions with no operands. ! ;; These will allow the optimizers to do a slightly better job. ! (define_insn "call" ! [(call (match_operand:QI 0 "memory_operand" "m") ! (const_int 0))] "" "calls $0,%0") ! (define_insn "call_value" [(set (match_operand 0 "" "") (call (match_operand:QI 1 "memory_operand" "m") ! (const_int 0)))] "" "calls $0,%1") --- 1860,1906 ---- (set (reg:SI 14) (plus:SI (reg:SI 14) (match_operand:SI 3 "immediate_operand" "i")))] "" ! "* ! { ! operands[2] = GEN_INT ((INTVAL (operands[2]) - 4) / 4); ! return \"calls %2,%1\"; ! }") ! (define_expand "call" ! [(call (match_operand:QI 0 "memory_operand" "") ! (match_operand:SI 1 "const_int_operand" ""))] ! "" ! " ! { ! /* Operand 1 is the number of bytes to be popped by DW_CFA_GNU_args_size ! during EH unwinding. We must include the argument count pushed by ! the calls instruction. */ ! operands[1] = GEN_INT (INTVAL (operands[1]) + 4); ! }") ! ! (define_insn "*call" ! [(call (match_operand:QI 0 "memory_operand" "m") ! (match_operand:SI 1 "const_int_operand" ""))] "" "calls $0,%0") ! (define_expand "call_value" ! [(set (match_operand 0 "" "") ! (call (match_operand:QI 1 "memory_operand" "") ! (match_operand:SI 2 "const_int_operand" "")))] ! "" ! " ! { ! /* Operand 2 is the number of bytes to be popped by DW_CFA_GNU_args_size ! during EH unwinding. We must include the argument count pushed by ! the calls instruction. */ ! operands[2] = GEN_INT (INTVAL (operands[2]) + 4); ! }") ! ! (define_insn "*call_value" [(set (match_operand 0 "" "") (call (match_operand:QI 1 "memory_operand" "m") ! (match_operand:SI 2 "const_int_operand" "")))] "" "calls $0,%1") *************** *** 1897,1903 **** ;; all of memory. This blocks insns from being moved across this point. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] 0)] "" "") --- 1937,1943 ---- ;; all of memory. This blocks insns from being moved across this point. (define_insn "blockage" ! [(unspec_volatile [(const_int 0)] VUNSPEC_BLOCKAGE)] "" "") *************** *** 1931,1954 **** ;; This is here to accept 5 arguments (as passed by expand_end_case) ;; and pass the first 4 along to the casesi1 pattern that really does the work. (define_expand "casesi" ! [(set (pc) ! (if_then_else ! (leu (minus:SI (match_operand:SI 0 "general_operand" "") ! (match_operand:SI 1 "general_operand" "")) ! (match_operand:SI 2 "general_operand" "")) ! (plus:SI (sign_extend:SI ! (mem:HI (plus:SI (mult:SI (minus:SI (match_dup 0) ! (match_dup 1)) ! (const_int 2)) ! (pc)))) ! (label_ref:SI (match_operand 3 "" ""))) ! (pc))) ! (match_operand 4 "" "")] "" ! " ! emit_jump_insn (gen_casesi1 (operands[0], operands[1], operands[2], operands[3])); DONE; ! ") (define_insn "casesi1" [(set (pc) --- 1971,1987 ---- ;; This is here to accept 5 arguments (as passed by expand_end_case) ;; and pass the first 4 along to the casesi1 pattern that really does the work. (define_expand "casesi" ! [(match_operand:SI 0 "general_operand" "") ; index ! (match_operand:SI 1 "general_operand" "") ; lower ! (match_operand:SI 2 "general_operand" "") ; upper-lower ! (match_operand 3 "" "") ; table label ! (match_operand 4 "" "")] ; default label "" ! { ! emit_jump_insn (gen_casesi1 (operands[0], operands[1], ! operands[2], operands[3])); DONE; ! }) (define_insn "casesi1" [(set (pc) *************** *** 2128,2130 **** --- 2161,2169 ---- = GEN_INT (INTVAL (operands[3]) & ~((1 << INTVAL (operands[2])) - 1)); return \"rotl %2,%1,%0\;bicl2 %N3,%0\"; }") + + ;; Instruction sequence to sync the VAX instruction stream. + (define_insn "sync_istream" + [(unspec_volatile [(const_int 0)] VUNSPEC_SYNC_ISTREAM)] + "" + "movpsl -(%|sp)\;pushal 1(%|pc)\;rei") diff -Nrc3pad gcc-3.2.3/gcc/config/vax/vax-protos.h gcc-3.3/gcc/config/vax/vax-protos.h *** gcc-3.2.3/gcc/config/vax/vax-protos.h 2001-11-16 22:40:21.000000000 +0000 --- gcc-3.3/gcc/config/vax/vax-protos.h 2002-10-22 23:05:23.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. VAX version. ! Copyright (C) 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. VAX version. ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,23 **** --- 18,25 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + extern void override_options PARAMS ((void)); + #ifdef RTX_CODE extern const char *rev_cond_name PARAMS ((rtx)); extern void split_quadword_operands PARAMS ((rtx *, rtx *, int)); diff -Nrc3pad gcc-3.2.3/gcc/config/vax/vaxv.h gcc-3.3/gcc/config/vax/vaxv.h *** gcc-3.2.3/gcc/config/vax/vaxv.h 2001-12-20 17:36:38.000000000 +0000 --- gcc-3.3/gcc/config/vax/vaxv.h 2002-08-29 21:40:18.000000000 +0000 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. VAX sysV version. ! Copyright (C) 1988, 1993, 1996, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler. VAX sysV version. ! Copyright (C) 1988, 1993, 1996, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,36 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! /* Cope with these under SysV */ ! ! #define SCCS_DIRECTIVE ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dvax -Dunix -Asystem=unix -Asystem=svr3 -Acpu=vax -Amachine=vax" /* Output #ident as a .ident. */ #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); #undef DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO #undef LIB_SPEC --- 18,41 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("unix"); \ ! builtin_assert ("system=svr3"); \ ! \ ! builtin_define_std ("vax"); \ ! if (TARGET_G_FLOAT) \ ! builtin_define_std ("GFLOAT"); \ ! } \ ! while (0) /* Output #ident as a .ident. */ #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); #undef DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO 1 #undef LIB_SPEC diff -Nrc3pad gcc-3.2.3/gcc/config/vax/vms.h gcc-3.3/gcc/config/vax/vms.h *** gcc-3.2.3/gcc/config/vax/vms.h 2001-09-11 16:50:04.000000000 +0000 --- gcc-3.3/gcc/config/vax/vms.h 2002-08-21 02:41:51.000000000 +0000 *************** *** 1,5 **** /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999, 2001, 2002 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 34,50 **** #define VMS_TARGET 1 #undef LIB_SPEC - #undef CPP_PREDEFINES #undef TARGET_NAME #undef TARGET_DEFAULT #undef CALL_USED_REGISTERS #undef STARTING_FRAME_OFFSET ! /* Predefine this in CPP because VMS limits the size of command options ! and GNU CPP is not used on VMS except with GNU C. */ ! #define CPP_PREDEFINES \ ! "-Dvax -Dvms -DVMS -D__vax__ -D__vms__ -D__VMS__\ ! -D__GNUC__=2 -D__GNUC_MINOR__=7 -Asystem=vms -Acpu=vax -Amachine=vax" /* These match the definitions used in VAXCRTL, the VMS C run-time library */ --- 35,57 ---- #define VMS_TARGET 1 #undef LIB_SPEC #undef TARGET_NAME #undef TARGET_DEFAULT #undef CALL_USED_REGISTERS #undef STARTING_FRAME_OFFSET ! #define TARGET_OS_CPP_BUILTINS() \ ! do \ ! { \ ! builtin_define_std ("vms"); \ ! builtin_define_std ("VMS"); \ ! builtin_assert ("system=vms"); \ ! \ ! builtin_define_std ("vax"); \ ! if (TARGET_G_FLOAT) \ ! builtin_define_std ("GFLOAT"); \ ! } \ ! while (0) /* These match the definitions used in VAXCRTL, the VMS C run-time library */ *************** Boston, MA 02111-1307, USA. */ *** 83,107 **** /* This macro definition sets up a default value for `main' to return. */ #define DEFAULT_MAIN_RETURN c_expand_return (integer_one_node) ! /* This makes use of a hook in varasm.c to mark all external variables ! for us. We use this to make sure that external variables are correctly ! addressed. Under VMS there is some brain damage in the linker that requires ! us to do this. */ ! ! #define ENCODE_SECTION_INFO(decl) \ ! if (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl)) \ ! SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! ! #undef ASM_GLOBALIZE_LABEL ! #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ ! do { fputs (".globl ", FILE); \ ! assemble_name (FILE, NAME); \ ! fputs ("\n", FILE); \ ! vms_check_external (NULL_TREE, NAME, 0); \ ! } while (0) /* Under VMS we write the actual size of the storage to be allocated even though the symbol is external. Although it is possible to give external --- 90,97 ---- /* This macro definition sets up a default value for `main' to return. */ #define DEFAULT_MAIN_RETURN c_expand_return (integer_one_node) ! /* Globalizing directive for a label. */ ! #define GLOBAL_ASM_OP ".globl " /* Under VMS we write the actual size of the storage to be allocated even though the symbol is external. Although it is possible to give external *************** const_section () \ *** 210,249 **** } \ } - /* This macro contains the logic to decide which section a variable - should be stored in. Static constant variables go in the text_section, - non-const variables go in the data_section, and non-static const - variables go in the const_section. - - Since this macro is used in a number of places, we must also be able - to decide where to place string constants. */ - - #define SELECT_SECTION(T,RELOC,ALIGN) \ - { \ - if (TREE_CODE (T) == VAR_DECL) \ - { \ - if (TREE_READONLY (T) && ! TREE_THIS_VOLATILE (T) \ - && DECL_INITIAL (T) \ - && (DECL_INITIAL (T) == error_mark_node \ - || TREE_CONSTANT (DECL_INITIAL (T)))) \ - { \ - if (TREE_PUBLIC (T)) \ - const_section (); \ - else \ - text_section (); \ - } \ - else \ - data_section (); \ - } \ - if (TREE_CODE_CLASS (TREE_CODE (T)) == 'c') \ - { \ - if ((TREE_CODE (T) == STRING_CST && flag_writable_strings)) \ - data_section (); \ - else \ - text_section (); \ - } \ - } - /* This is used by a hook in varasm.c to write the assembler directives that are needed to tell the startup code which constructors need to be run. */ --- 200,205 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/we32k/we32k.c gcc-3.3/gcc/config/we32k/we32k.c *** gcc-3.2.3/gcc/config/we32k/we32k.c 2001-12-22 20:55:04.000000000 +0000 --- gcc-3.3/gcc/config/we32k/we32k.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,214 **** - /* Subroutines for insn-output.c for AT&T we32000 Family. - Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - Contributed by John Wehle (john@feith1.uucp) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - #include "config.h" - #include "system.h" - #include "insn-config.h" - #include "rtl.h" - #include "function.h" - #include "real.h" - #include "recog.h" - #include "output.h" - #include "regs.h" - #include "tree.h" - #include "expr.h" - #include "hard-reg-set.h" - #include "tm_p.h" - #include "target.h" - #include "target-def.h" - - static void we32k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); - static void we32k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); - - /* Initialize the GCC target structure. */ - #undef TARGET_ASM_ALIGNED_HI_OP - #define TARGET_ASM_ALIGNED_HI_OP "\t.half\t" - #undef TARGET_ASM_ALIGNED_SI_OP - #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" - - #undef TARGET_ASM_FUNCTION_PROLOGUE - #define TARGET_ASM_FUNCTION_PROLOGUE we32k_output_function_prologue - #undef TARGET_ASM_FUNCTION_EPILOGUE - #define TARGET_ASM_FUNCTION_EPILOGUE we32k_output_function_epilogue - - struct gcc_target targetm = TARGET_INITIALIZER; - - /* Generate the assembly code for function entry. FILE is a stdio - stream to output the code to. SIZE is an int: how many units of - temporary storage to allocate. - - Refer to the array `regs_ever_live' to determine which registers to - save; `regs_ever_live[I]' is nonzero if register number I is ever - used in the function. This function is responsible for knowing - which registers should not be saved even if used. */ - - static void - we32k_output_function_prologue (file, size) - FILE *file; - HOST_WIDE_INT size; - { - register int nregs_to_save; - register int regno; - - nregs_to_save = 0; - for (regno = 8; regno > 2; regno--) - if (regs_ever_live[regno] && ! call_used_regs[regno]) - nregs_to_save = (9 - regno); - - fprintf (file, "\tsave &%d\n", nregs_to_save); - if (size) - fprintf (file, "\taddw2 &%d,%%sp\n", (size + 3) & ~3); - } - - /* This function generates the assembly code for function exit. - Args are as for output_function_prologue (). - - The function epilogue should not depend on the current stack - pointer! It should use the frame pointer only. This is mandatory - because of alloca; we also take advantage of it to omit stack - adjustments before returning. */ - - static void - we32k_output_function_epilogue (file, size) - FILE *file; - HOST_WIDE_INT size ATTRIBUTE_UNUSED; - { - register int nregs_to_restore; - register int regno; - - nregs_to_restore = 0; - for (regno = 8; regno > 2; regno--) - if (regs_ever_live[regno] && ! call_used_regs[regno]) - nregs_to_restore = (9 - regno); - - fprintf (file, "\tret &%d\n", nregs_to_restore); - } - - void - output_move_double (operands) - rtx *operands; - { - rtx lsw_operands[2]; - rtx lsw_sreg = NULL; - rtx msw_dreg = NULL; - - if (GET_CODE (operands[0]) == REG) - { - lsw_operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - msw_dreg = operands[0]; - } - else if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0])) - lsw_operands[0] = adjust_address (operands[0], SImode, 4); - else - abort (); - - if (GET_CODE (operands[1]) == REG) - { - lsw_operands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - lsw_sreg = lsw_operands[1]; - } - else if (GET_CODE (operands[1]) == MEM && offsettable_memref_p (operands[1])) - { - lsw_operands[1] = adjust_address (operands[1], SImode, 4); - lsw_sreg = operands[1]; - for ( ; ; ) - { - if (REG_P (lsw_sreg)) - break; - if (CONSTANT_ADDRESS_P (lsw_sreg)) - { - lsw_sreg = NULL; - break; - } - if (GET_CODE (lsw_sreg) == MEM) - { - lsw_sreg = XEXP (lsw_sreg, 0); - continue; - } - if (GET_CODE (lsw_sreg) == PLUS) - { - if (CONSTANT_ADDRESS_P (XEXP (lsw_sreg, 1))) - { - lsw_sreg = XEXP (lsw_sreg, 0); - continue; - } - else if (CONSTANT_ADDRESS_P (XEXP (lsw_sreg, 0))) - { - lsw_sreg = XEXP (lsw_sreg, 1); - continue; - } - } - abort (); - } - } - else if (GET_CODE (operands[1]) == CONST_DOUBLE) - { - lsw_operands[1] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); - operands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); - } - else if (GET_CODE (operands[1]) == CONST_INT) - { - lsw_operands[1] = operands[1]; - operands[1] = const0_rtx; - } - else - abort (); - - if (!msw_dreg || !lsw_sreg || REGNO (msw_dreg) != REGNO (lsw_sreg)) - { - output_asm_insn ("movw %1, %0", operands); - output_asm_insn ("movw %1, %0", lsw_operands); - } - else - { - output_asm_insn ("movw %1, %0", lsw_operands); - output_asm_insn ("movw %1, %0", operands); - } - } - - void - output_push_double (operands) - rtx *operands; - { - rtx lsw_operands[1]; - - if (GET_CODE (operands[0]) == REG) - lsw_operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - else if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0])) - lsw_operands[0] = adjust_address (operands[0], SImode, 4); - else if (GET_CODE (operands[0]) == CONST_DOUBLE) - { - lsw_operands[0] = GEN_INT (CONST_DOUBLE_HIGH (operands[0])); - operands[0] = GEN_INT (CONST_DOUBLE_LOW (operands[0])); - } - else if (GET_CODE (operands[0]) == CONST_INT) - { - lsw_operands[0] = operands[0]; - operands[0] = const0_rtx; - } - else - abort (); - - output_asm_insn ("pushw %0", operands); - output_asm_insn ("pushw %0", lsw_operands); - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/we32k/we32k.h gcc-3.3/gcc/config/we32k/we32k.h *** gcc-3.2.3/gcc/config/we32k/we32k.h 2002-05-21 23:45:18.000000000 +0000 --- gcc-3.3/gcc/config/we32k/we32k.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,908 **** - /* Definitions of target machine for GNU compiler. AT&T we32000 version. - Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, - 2001, 2002 Free Software Foundation, Inc. - Contributed by John Wehle (john@feith1.uucp) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - - /* Names to predefine in the preprocessor for this target machine. */ - - #define CPP_PREDEFINES "-Dwe32000 -Du3b2 -Dunix -Asystem=unix -Acpu=we32000 -Amachine=we32000" - - /* Print subsidiary information on the compiler version in use. */ - - #define TARGET_VERSION fprintf (stderr, " (we32000)"); - - /* Run-time compilation parameters selecting different hardware subsets. */ - - extern int target_flags; - - /* Macros used in the machine description to test the flags. */ - - /* Macro to define tables used to set the flags. - This is a list in braces of pairs in braces, - each pair being { "NAME", VALUE } - where VALUE is the bits to set or minus the bits to clear. - An empty string NAME is used to identify the default VALUE. */ - - #define TARGET_SWITCHES \ - { { "", TARGET_DEFAULT, 0}} - - #define TARGET_DEFAULT 0 - - - /* target machine storage layout */ - - /* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. */ - #define BITS_BIG_ENDIAN 0 - - /* Define this if most significant byte of a word is the lowest numbered. */ - /* That is true on the we32000. */ - #define BYTES_BIG_ENDIAN 1 - - /* Define this if most significant word of a multiword is lowest numbered. */ - /* For we32000 we can decide arbitrarily - since there are no machine instructions for them. */ - #define WORDS_BIG_ENDIAN 1 - - /* number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. - Note that this is not necessarily the width of data type `int'; - if using 16-bit ints on a we32000, this would still be 32. - But on a machine with 16-bit registers, this would be 16. */ - #define BITS_PER_WORD 32 - - /* Width of a word, in units (bytes). */ - #define UNITS_PER_WORD 4 - - /* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ - #define POINTER_SIZE 32 - - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ - #define PARM_BOUNDARY 32 - - /* Boundary (in *bits*) on which stack pointer should be aligned. */ - #define STACK_BOUNDARY 32 - - /* Allocation boundary (in *bits*) for the code of a function. */ - #define FUNCTION_BOUNDARY 32 - - /* Alignment of field after `int : 0' in a structure. */ - #define EMPTY_FIELD_BOUNDARY 32 - - /* No data type wants to be aligned rounder than this. */ - #define BIGGEST_ALIGNMENT 32 - - /* Every structure's size must be a multiple of this. */ - #define STRUCTURE_SIZE_BOUNDARY 32 - - /* Define this if move instructions will actually fail to work - when given unaligned data. */ - #define STRICT_ALIGNMENT 1 - - /* Define number of bits in most basic integer type. - (If undefined, default is BITS_PER_WORD). */ - #define INT_TYPE_SIZE 32 - - /* Integer bit fields should have the same size and alignment - as actual integers */ - #define PCC_BITFIELD_TYPE_MATTERS 1 - - /* Specify the size_t type. */ - #define SIZE_TYPE "unsigned int" - - /* Standard register usage. */ - - /* Number of actual hardware registers. - The hardware registers are assigned numbers for the compiler - from 0 to just below FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. */ - #define FIRST_PSEUDO_REGISTER 16 - - /* 1 for registers that have pervasive standard uses - and are not available for the register allocator. */ - #define FIXED_REGISTERS \ - {0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 1, 1, 1, 1, 1, 1, 1, } - - /* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. */ - #define CALL_USED_REGISTERS \ - {1, 1, 1, 0, 0, 0, 0, 0, \ - 0, 1, 1, 1, 1, 1, 1, 1, } - - /* Make sure everything's fine if we *don't* have a given processor. - This assumes that putting a register in fixed_regs will keep the - compilers mitt's completely off it. We don't bother to zero it out - of register classes. */ - /* #define CONDITIONAL_REGISTER_USAGE */ - - /* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. */ - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */ - #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 - - /* Value is 1 if it is a good idea to tie two pseudo registers - when one has mode MODE1 and one has mode MODE2. - If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, - for any hard reg, then this must be 0 for correct output. */ - #define MODES_TIEABLE_P(MODE1, MODE2) 0 - - /* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - - /* Register used for the program counter */ - #define PC_REGNUM 15 - - /* Register to use for pushing function arguments. */ - #define STACK_POINTER_REGNUM 12 - - /* Base register for access to local variables of the function. */ - #define FRAME_POINTER_REGNUM 9 - - /* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. */ - #define FRAME_POINTER_REQUIRED 1 - - /* Base register for access to arguments of the function. */ - #define ARG_POINTER_REGNUM 10 - - /* Register in which static-chain is passed to a function. */ - #define STATIC_CHAIN_REGNUM 8 - - /* Register in which address to store a structure value - is passed to a function. */ - #define STRUCT_VALUE_REGNUM 2 - - /* Order in which to allocate registers. */ - #define REG_ALLOC_ORDER \ - {0, 1, 8, 7, 6, 5, 4, 3} - - /* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. */ - - enum reg_class { NO_REGS, GENERAL_REGS, - ALL_REGS, LIM_REG_CLASSES }; - - #define N_REG_CLASSES (int) LIM_REG_CLASSES - - /* Give names of register classes as strings for dump file. */ - - #define REG_CLASS_NAMES \ - { "NO_REGS", "GENERAL_REGS", "ALL_REGS" } - - /* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. */ - - #define REG_CLASS_CONTENTS \ - { \ - {0}, /* NO_REGS */ \ - {0x000017ff}, /* GENERAL_REGS */ \ - {0x0000ffff}, /* ALL_REGS */ \ - } - - /* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - - #define REGNO_REG_CLASS(REGNO) \ - (((REGNO) < 11 || (REGNO) == 12) ? GENERAL_REGS : ALL_REGS) - - /* The class value for index registers, and the one for base regs. */ - - #define INDEX_REG_CLASS NO_REGS - #define BASE_REG_CLASS GENERAL_REGS - - /* Get reg_class from a letter such as appears in the machine description. - We do a trick here to modify the effective constraints on the - machine description; we zorch the constraint letters that aren't - appropriate for a specific target. This allows us to guarantee - that a specific kind of register will not be used for a given target - without fiddling with the register classes above. */ - - #define REG_CLASS_FROM_LETTER(C) \ - ((C) == 'r' ? GENERAL_REGS : NO_REGS) - - /* The letters I, J, K, L and M in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. */ - - #define CONST_OK_FOR_LETTER_P(VALUE, C) 0 - - /* - */ - - #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 - - /* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. */ - - #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) - - /* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. */ - #define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Stack layout; function entry, exit and calling. */ - - /* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ - /* #define STACK_GROWS_DOWNWARD */ - - /* Define this if the nominal address of the stack frame - is at the high-address end of the local variables; - that is, each additional local variable allocated - goes at a more negative offset in the frame. */ - /* #define FRAME_GROWS_DOWNWARD */ - - /* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. */ - #define STARTING_FRAME_OFFSET 0 - - /* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. */ - #define PUSH_ROUNDING(BYTES) (((BYTES) + 3) & ~3) - - /* Offset of first parameter from the argument pointer register value. */ - #define FIRST_PARM_OFFSET(FNDECL) 0 - - /* Value is 1 if returning from a function call automatically - pops the arguments described by the number-of-args field in the call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. */ - - #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) - - /* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - - /* On the we32000 the return value is in r0 regardless. */ - - #define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), 0) - - /* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - - /* On the we32000 the return value is in r0 regardless. */ - - #define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 0) - - /* 1 if N is a possible register number for a function value. - On the we32000, r0 is the only register thus used. */ - - #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0) - - /* Define this if PCC uses the nonreentrant convention for returning - structure and union values. */ - - /* #define PCC_STATIC_STRUCT_RETURN */ - - /* 1 if N is a possible register number for function argument passing. - On the we32000, no registers are used in this way. */ - - #define FUNCTION_ARG_REGNO_P(N) 0 - - /* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - On the we32k, this is a single integer, which is a number of bytes - of arguments scanned so far. */ - - #define CUMULATIVE_ARGS int - - /* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. - - On the we32k, the offset starts at 0. */ - - #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ - ((CUM) = 0) - - /* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be available.) */ - - #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - ((CUM) += ((MODE) != BLKmode \ - ? (GET_MODE_SIZE (MODE) + 3) & ~3 \ - : (int_size_in_bytes (TYPE) + 3) & ~3)) - - /* Define where to put the arguments to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). */ - - /* On the we32000 all args are pushed */ - - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0 - - /* For an arg passed partly in registers and partly in memory, - this is the number of registers used. - For args passed entirely in registers or entirely in memory, zero. */ - - #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0 - - /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - - #define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\tmovw &.LP%d,%%r0\n\tjsb _mcount\n", (LABELNO)) - - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - - #define EXIT_IGNORE_STACK 0 - - /* Store in the variable DEPTH the initial difference between the - frame pointer reg contents and the stack pointer reg contents, - as of the start of the function body. This depends on the layout - of the fixed parts of the stack frame and on how registers are saved. - - On the we32k, FRAME_POINTER_REQUIRED is always 1, so the definition of this - macro doesn't matter. But it must be defined. */ - - #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0; - - /* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. */ - - /* On the we32k, the trampoline contains two instructions: - mov #STATIC,%r8 - jmp #FUNCTION */ - - #define TRAMPOLINE_TEMPLATE(FILE) \ - { \ - assemble_aligned_integer (2, GEN_INT (0x844f)); \ - assemble_aligned_integer (2, const0_rtx); \ - assemble_aligned_integer (2, const0_rtx); \ - assemble_aligned_integer (1, GEN_INT (0x48)); \ - assemble_aligned_integer (2, GEN_INT (0x247f)); \ - assemble_aligned_integer (2, const0_rtx); \ - assemble_aligned_integer (2, const0_rtx); \ - } - - /* Length in units of the trampoline for entering a nested function. */ - - #define TRAMPOLINE_SIZE 13 - - /* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. */ - - #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - { \ - emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 2)), CXT); \ - emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 9)), FNADDR); \ - } - - /* Generate calls to memcpy() and memset() rather - than bcopy() and bzero() */ - #define TARGET_MEM_FUNCTIONS - - /* Addressing modes, and classification of registers for them. */ - - /* #define HAVE_POST_INCREMENT 0 */ - /* #define HAVE_POST_DECREMENT 0 */ - - /* #define HAVE_PRE_DECREMENT 0 */ - /* #define HAVE_PRE_INCREMENT 0 */ - - /* Macros to check register numbers against specific register classes. */ - - /* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. */ - - #define REGNO_OK_FOR_INDEX_P(REGNO) 0 - - #define REGNO_OK_FOR_BASE_P(REGNO) \ - ((REGNO) < 11 || (REGNO) == 12 || \ - (unsigned)reg_renumber[REGNO] < 11 || (unsigned)reg_renumber[REGNO] == 12) - - /* Maximum number of registers that can appear in a valid memory address. */ - - #define MAX_REGS_PER_ADDRESS 1 - - /* Recognize any constant value that is a valid address. */ - - #define CONSTANT_ADDRESS_P(X) \ - (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ - || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ - || GET_CODE (X) == HIGH) - - /* Nonzero if the constant value X is a legitimate general operand. - It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ - - #define LEGITIMATE_CONSTANT_P(X) 1 - - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - - #ifndef REG_OK_STRICT - - /* Nonzero if X is a hard reg that can be used as an index - or if it is a pseudo reg. */ - #define REG_OK_FOR_INDEX_P(X) 0 - - /* Nonzero if X is a hard reg that can be used as a base reg - or if it is a pseudo reg. */ - #define REG_OK_FOR_BASE_P(X) \ - (REGNO(X) < 11 || REGNO(X) == 12 || REGNO(X) >= FIRST_PSEUDO_REGISTER) - - #else - - /* Nonzero if X is a hard reg that can be used as an index. */ - #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) - /* Nonzero if X is a hard reg that can be used as a base reg. */ - #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) - - #endif - - /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. */ - - #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ - { register rtx Addr = X; \ - if ((MODE) == QImode || (MODE) == HImode || \ - (MODE) == PSImode || (MODE) == SImode || (MODE) == SFmode) \ - if (GET_CODE(Addr) == MEM) \ - Addr = XEXP(Addr, 0); \ - if (CONSTANT_ADDRESS_P(Addr)) \ - goto LABEL; \ - if (REG_P(Addr) && REG_OK_FOR_BASE_P(Addr)) \ - goto LABEL; \ - if (GET_CODE(Addr) == PLUS && \ - ((REG_P(XEXP(Addr, 0)) && REG_OK_FOR_BASE_P(XEXP(Addr, 0)) && \ - CONSTANT_ADDRESS_P(XEXP(Addr, 1))) || \ - (REG_P(XEXP(Addr, 1)) && REG_OK_FOR_BASE_P(XEXP(Addr, 1)) && \ - CONSTANT_ADDRESS_P(XEXP(Addr, 0))))) \ - goto LABEL; \ - } - - /* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. */ - - #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) { } - - /* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. */ - - #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) { } - - /* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ - #define CASE_VECTOR_MODE SImode - - /* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - Do not define this if the table should contain absolute addresses. */ - /* #define CASE_VECTOR_PC_RELATIVE 1 */ - - /* Define this as 1 if `char' should by default be signed; else as 0. */ - #define DEFAULT_SIGNED_CHAR 0 - - /* Max number of bytes we can move from memory to memory - in one reasonably fast instruction. */ - #define MOVE_MAX 4 - - /* Nonzero if access to memory by bytes is slow and undesirable. */ - #define SLOW_BYTE_ACCESS 0 - - /* Define this to be nonzero if shift instructions ignore all but the low-order - few bits. */ - #define SHIFT_COUNT_TRUNCATED 1 - - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ - #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - - /* We assume that the store-condition-codes instructions store 0 for false - and some other value for true. This is the value stored for true. */ - - #define STORE_FLAG_VALUE (-1) - - /* When a prototype says `char' or `short', really pass an `int'. */ - #define PROMOTE_PROTOTYPES 1 - - /* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ - #define Pmode SImode - - /* A function address in a call instruction - is a byte address (for indexing purposes) - so give the MEM rtx a byte's mode. */ - #define FUNCTION_MODE QImode - - /* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - - #define CONST_COSTS(RTX,CODE, OUTER_CODE) \ - case CONST_INT: \ - if (INTVAL (RTX) >= -16 && INTVAL (RTX) <= 63) return 0; \ - if (INTVAL (RTX) >= -128 && INTVAL (RTX) <= 127) return 1; \ - if (INTVAL (RTX) >= -32768 && INTVAL (RTX) <= 32767) return 2; \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 3; \ - case CONST_DOUBLE: \ - return 5; - - /* Tell final.c how to eliminate redundant test instructions. */ - - /* Here we define machine-dependent flags and fields in cc_status - (see `conditions.h'). */ - - #define NOTICE_UPDATE_CC(EXP, INSN) \ - { \ - { CC_STATUS_INIT; } \ - } - - /* Control the assembler format that we output. */ - - /* Use crt1.o as a startup file and crtn.o as a closing file. */ - - #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" - - #define ENDFILE_SPEC "crtn.o%s" - - /* The .file command should always begin the output. */ - - #define ASM_FILE_START(FILE) output_file_directive ((FILE), main_input_filename) - - /* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ - - #define ASM_APP_ON "#APP\n" - - /* Output to assembler file text saying following lines - no longer contain unusual constructs. */ - - #define ASM_APP_OFF "#NO_APP\n" - - /* Output before code. */ - - #define TEXT_SECTION_ASM_OP "\t.text" - - /* Output before writable data. */ - - #define DATA_SECTION_ASM_OP "\t.data" - - /* Read-only data goes in the data section because - AT&T's assembler doesn't guarantee the proper alignment - of data in the text section even if an align statement - is used. */ - - #define READONLY_DATA_SECTION() data_section() - - /* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - - #define REGISTER_NAMES \ - {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ - "r8", "fp", "ap", "psw", "sp", "pcbp", "isp", "pc" } - - /* Output SDB debugging info in response to the -g option. */ - - #define SDB_DEBUGGING_INFO - - /* This is how to output the definition of a user-level label named NAME, - such as the label on a static function or variable NAME. */ - - #define ASM_OUTPUT_LABEL(FILE,NAME) \ - do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - - /* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - - #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { \ - fputs (".globl ", FILE); \ - assemble_name (FILE, NAME); \ - fputs ("\n", FILE); \ - } while (0) - - /* The prefix to add to user-visible assembler symbols. */ - - #define USER_LABEL_PREFIX "" - - /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ - - #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, ".%s%d:\n", PREFIX, NUM) - - /* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - - #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, ".%s%d", PREFIX, NUM) - - /* This is how to output an internal numbered label which - labels a jump table. */ - - #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ - do { \ - ASM_OUTPUT_ALIGN (FILE, 2); \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \ - } while (0) - - #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ - do { \ - const unsigned char *s; \ - size_t i, limit = (LEN); \ - for (i = 0, s = (const unsigned char *)(PTR); i < limit; s++, i++) \ - { \ - if ((i % 8) == 0) \ - fprintf ((FILE),"%s\t.byte\t",(i?"\n":"")); \ - fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ - } \ - fputs ("\n", (FILE)); \ - } while (0) - - /* This is how to output an insn to push a register on the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ - fprintf (FILE, "\tpushw %s\n", reg_names[REGNO]) - - /* This is how to output an insn to pop a register from the stack. - It need not be very fast code. */ - - #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ - fprintf (FILE, "\tPOPW %s\n", reg_names[REGNO]) - - /* This is how to output an element of a case-vector that is absolute. */ - - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.word .L%d\n", VALUE) - - /* This is how to output an element of a case-vector that is relative. */ - - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL) - - /* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - - #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG) != 0) \ - fprintf (FILE, "\t.align %d\n", 1 << (LOG)) - - /* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - - /* The `space' pseudo in the text segment outputs nop insns rather than 0s, - so we must output 0s explicitly in the text segment. */ - - #define ASM_OUTPUT_SKIP(FILE,SIZE) do { \ - if (in_text_section ()) \ - { \ - int i; \ - for (i = 0; i < (SIZE) - 20; i += 20) \ - fprintf (FILE, "\t.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n"); \ - if (i < (SIZE)) \ - { \ - fprintf (FILE, "\t.byte 0"); \ - i++; \ - for (; i < (SIZE); i++) \ - fprintf (FILE, ",0"); \ - fprintf (FILE, "\n"); \ - } \ - } \ - else \ - fprintf ((FILE), "\t.set .,.+%u\n", (SIZE)); } while (0) - - /* This says how to output an assembler line - to define a global common symbol. */ - - #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - do { \ - data_section(); \ - fputs ("\t.comm ", (FILE)); \ - assemble_name ((FILE), (NAME)); \ - fprintf ((FILE), ",%u\n", (SIZE)); \ - } while (0) - - /* This says how to output an assembler line - to define a local common symbol. */ - - #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - do { \ - data_section(); \ - ASM_OUTPUT_ALIGN ((FILE), 2); \ - ASM_OUTPUT_LABEL ((FILE), (NAME)); \ - fprintf ((FILE), "\t.zero %u\n", (SIZE)); \ - } while (0) - - /* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ - - #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ - ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - - /* Output #ident as a .ident. */ - - #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME) - - /* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. - For `%' followed by punctuation, CODE is the punctuation and X is null. */ - - #define PRINT_OPERAND_PUNCT_VALID_P(CODE) 0 - - #define PRINT_OPERAND(FILE, X, CODE) \ - { if (GET_CODE (X) == REG) \ - fprintf (FILE, "%%%s", reg_names[REGNO (X)]); \ - else if (GET_CODE (X) == MEM) \ - output_address (XEXP (X, 0)); \ - else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \ - { \ - union { double d; long l[2]; } dtem; \ - union { float f; long l; } ftem; \ - \ - dtem.l[0] = CONST_DOUBLE_LOW (X); \ - dtem.l[1] = CONST_DOUBLE_HIGH (X); \ - ftem.f = dtem.d; \ - fprintf(FILE, "&0x%lx", ftem.l); \ - } \ - else { putc ('&', FILE); output_addr_const (FILE, X); }} - - #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - { register rtx Addr = ADDR; \ - rtx offset; \ - rtx reg; \ - if (GET_CODE (Addr) == MEM) { \ - putc ('*', FILE); \ - Addr = XEXP (Addr, 0); \ - if (GET_CODE (Addr) == REG) \ - putc ('0', FILE); \ - } \ - switch (GET_CODE (Addr)) \ - { \ - case REG: \ - fprintf (FILE, "(%%%s)", reg_names[REGNO (Addr)]); \ - break; \ - \ - case PLUS: \ - offset = NULL; \ - if (CONSTANT_ADDRESS_P (XEXP (Addr, 0))) \ - { \ - offset = XEXP (Addr, 0); \ - Addr = XEXP (Addr, 1); \ - } \ - else if (CONSTANT_ADDRESS_P (XEXP (Addr, 1))) \ - { \ - offset = XEXP (Addr, 1); \ - Addr = XEXP (Addr, 0); \ - } \ - else \ - abort(); \ - if (REG_P (Addr)) \ - reg = Addr; \ - else \ - abort(); \ - output_addr_const(FILE, offset); \ - fprintf(FILE, "(%%%s)", reg_names[REGNO(reg)]); \ - break; \ - \ - default: \ - if ( !CONSTANT_ADDRESS_P(Addr)) \ - abort(); \ - output_addr_const (FILE, Addr); \ - }} - - /* - Local variables: - version-control: t - End: - */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/we32k/we32k.md gcc-3.3/gcc/config/we32k/we32k.md *** gcc-3.2.3/gcc/config/we32k/we32k.md 2001-07-03 19:44:20.000000000 +0000 --- gcc-3.3/gcc/config/we32k/we32k.md 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1186 **** - ;; Machine description for GNU compiler, AT&T we32000 Version - ;; Copyright (C) 1991, 1992, 1994, 1998, 1999, 2001 - ;; Free Software Foundation, Inc. - ;; Contributed by John Wehle (john@feith1.uucp) - - ;; This file is part of GNU CC. - - ;; GNU CC is free software; you can redistribute it and/or modify - ;; it under the terms of the GNU General Public License as published by - ;; the Free Software Foundation; either version 2, or (at your option) - ;; any later version. - - ;; GNU CC is distributed in the hope that it will be useful, - ;; but WITHOUT ANY WARRANTY; without even the implied warranty of - ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ;; GNU General Public License for more details. - - ;; You should have received a copy of the GNU General Public License - ;; along with GNU CC; see the file COPYING. If not, write to - ;; the Free Software Foundation, 59 Temple Place - Suite 330, - ;; Boston, MA 02111-1307, USA. - - - ;;- instruction definitions - - ;;- @@The original PO technology requires these to be ordered by speed, - ;;- @@ so that assigner will pick the fastest. - - ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - - ;;- When naming insn's (operand 0 of define_insn) be careful about using - ;;- names from other targets machine descriptions. - - ;; move instructions - - (define_insn "" - [(set (match_operand:DF 0 "push_operand" "=m") - (match_operand:DF 1 "general_operand" "mrF"))] - "" - "* - { - output_push_double(&operands[1]); - - return \"\"; - }") - - (define_insn "movdf" - [(set (match_operand:DF 0 "nonimmediate_operand" "=mr") - (match_operand:DF 1 "general_operand" "mrF"))] - "" - "* - { - output_move_double(operands); - - return \"\"; - }") - - (define_insn "" - [(set (match_operand:SF 0 "push_operand" "=m") - (match_operand:SF 1 "general_operand" "mrF"))] - "" - "pushw %1") - - (define_insn "movsf" - [(set (match_operand:SF 0 "nonimmediate_operand" "=mr") - (match_operand:SF 1 "general_operand" "mrF"))] - "" - "movw %1, %0") - - (define_insn "" - [(set (match_operand:DI 0 "push_operand" "=m") - (match_operand:DI 1 "general_operand" "mriF"))] - "" - "* - { - output_push_double(&operands[1]); - - return \"\"; - }") - - (define_insn "movdi" - [(set (match_operand:DI 0 "nonimmediate_operand" "=mr") - (match_operand:DI 1 "general_operand" "mriF"))] - "" - "* - { - output_move_double(operands); - - return \"\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "push_operand" "=m") - (match_operand:SI 1 "general_operand" "mri"))] - "" - "pushw %1") - - (define_insn "movsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (match_operand:SI 1 "general_operand" "mri"))] - "" - "movw %1, %0") - - (define_insn "movhi" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (match_operand:HI 1 "general_operand" "mri"))] - "" - "movh %1, %0") - - (define_insn "movqi" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (match_operand:QI 1 "general_operand" "mri"))] - "" - "movb %1, %0") - - ;; add instructions - - (define_insn "" - [(set (match_operand:DI 0 "nonimmediate_operand" "=&or") - (plus:DI (match_operand:DI 1 "nonimmediate_operand" "0") - (match_operand:DI 2 "general_operand" "oriF")))] - "" - "* - { - rtx label[1]; - rtx lsw_operands[3]; - - if (GET_CODE (operands[0]) == REG) - lsw_operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - else - if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0])) - lsw_operands[0] = adjust_address (operands[0], SImode, 4); - else - abort(); - - if (GET_CODE (operands[2]) == REG) - lsw_operands[2] = gen_rtx_REG (SImode, REGNO (operands[2]) + 1); - else - if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2])) - lsw_operands[2] = adjust_address (operands[2], SImode, 4); - else - if (GET_CODE (operands[2]) == CONST_DOUBLE) - { - lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2])); - operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2])); - } - else - if (GET_CODE (operands[2]) == CONST_INT) - { - lsw_operands[2] = operands[2]; - operands[2] = const0_rtx; - } - else - abort(); - - label[0] = gen_label_rtx(); - LABEL_NUSES(label[0]) = 1; - - output_asm_insn(\"addw2 %2, %0\", operands); - output_asm_insn(\"addw2 %2, %0\", lsw_operands); - output_asm_insn(\"BCCB %l0\", label); - output_asm_insn(\"INCW %0\", operands); - output_asm_insn(\"%l0:\", label); - - return \"\"; - }") - - (define_insn "adddi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=&or") - (plus:DI (match_operand:DI 1 "general_operand" "oriF") - (match_operand:DI 2 "general_operand" "oriF")))] - "" - "* - { - rtx label[1]; - rtx lsw_operands[3]; - - if (GET_CODE (operands[0]) == REG) - lsw_operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - else - if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0])) - lsw_operands[0] = adjust_address(operands[0], SImode, 4); - else - abort(); - - if (GET_CODE (operands[1]) == REG) - lsw_operands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - else - if (GET_CODE (operands[1]) == MEM && offsettable_memref_p (operands[1])) - lsw_operands[1] = adjust_address (operands[1], SImode, 4); - else - if (GET_CODE (operands[1]) == CONST_DOUBLE) - { - lsw_operands[1] = GEN_INT (CONST_DOUBLE_HIGH(operands[1])); - operands[1] = GEN_INT (CONST_DOUBLE_LOW(operands[1])); - } - else - if (GET_CODE (operands[1]) == CONST_INT) - { - lsw_operands[1] = operands[1]; - operands[1] = const0_rtx; - } - else - abort(); - - if (GET_CODE (operands[2]) == REG) - lsw_operands[2] = gen_rtx_REG (SImode, REGNO (operands[2]) + 1); - else - if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2])) - lsw_operands[2] = adjust_address (operands[2], SImode, 4); - else - if (GET_CODE (operands[2]) == CONST_DOUBLE) - { - lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2])); - operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2])); - } - else - if (GET_CODE (operands[2]) == CONST_INT) - { - lsw_operands[2] = operands[2]; - operands[2] = const0_rtx; - } - else - abort(); - - label[0] = gen_label_rtx(); - LABEL_NUSES(label[0]) = 1; - - output_asm_insn(\"addw3 %2, %1, %0\", operands); - output_asm_insn(\"addw3 %2, %1, %0\", lsw_operands); - output_asm_insn(\"BCCB %l0\", label); - output_asm_insn(\"INCW %0\", operands); - output_asm_insn(\"%l0:\", label); - - return \"\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (plus:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "addw2 %2, %0") - - (define_insn "addsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (plus:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "addw3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (plus:HI (match_operand:HI 1 "nonimmediate_operand" "0") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "addh2 %2, %0") - - (define_insn "addhi3" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (plus:HI (match_operand:HI 1 "general_operand" "mri") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "addh3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (plus:QI (match_operand:QI 1 "nonimmediate_operand" "0") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "addb2 %2, %0") - - (define_insn "addqi3" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (plus:QI (match_operand:QI 1 "general_operand" "mri") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "addb3 %2, %1, %0") - - ;; subtract instructions - - (define_insn "" - [(set (match_operand:DI 0 "nonimmediate_operand" "=&or") - (minus:DI (match_operand:DI 1 "nonimmediate_operand" "0") - (match_operand:DI 2 "general_operand" "oriF")))] - "" - "* - { - rtx label[1]; - rtx lsw_operands[3]; - - if (GET_CODE (operands[0]) == REG) - lsw_operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - else - if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0])) - lsw_operands[0] = adjust_address (operands[0], SImode, 4); - else - abort(); - - if (GET_CODE (operands[2]) == REG) - lsw_operands[2] = gen_rtx_REG (SImode, REGNO (operands[2]) + 1); - else - if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2])) - lsw_operands[2] = adjust_address (operands[2], SImode, 4); - else - if (GET_CODE (operands[2]) == CONST_DOUBLE) - { - lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2])); - operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2])); - } - else - if (GET_CODE (operands[2]) == CONST_INT) - { - lsw_operands[2] = operands[2]; - operands[2] = const0_rtx; - } - else - abort(); - - label[0] = gen_label_rtx(); - LABEL_NUSES(label[0]) = 1; - - output_asm_insn(\"subw2 %2, %0\", operands); - output_asm_insn(\"subw2 %2, %0\", lsw_operands); - output_asm_insn(\"BCCB %l0\", label); - output_asm_insn(\"DECW %0\", operands); - output_asm_insn(\"%l0:\", label); - - return \"\"; - }") - - (define_insn "subdi3" - [(set (match_operand:DI 0 "nonimmediate_operand" "=&or") - (minus:DI (match_operand:DI 1 "general_operand" "oriF") - (match_operand:DI 2 "general_operand" "oriF")))] - "" - "* - { - rtx label[1]; - rtx lsw_operands[3]; - - if (GET_CODE (operands[0]) == REG) - lsw_operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); - else - if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0])) - lsw_operands[0] = adjust_address (operands[0], SImode, 4); - else - abort(); - - if (GET_CODE (operands[1]) == REG) - lsw_operands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); - else - if (GET_CODE (operands[1]) == MEM && offsettable_memref_p (operands[1])) - lsw_operands[1] = adjust_address (operands[1], SImode, 4); - else - if (GET_CODE (operands[1]) == CONST_DOUBLE) - { - lsw_operands[1] = GEN_INT (CONST_DOUBLE_HIGH(operands[1])); - operands[1] = GEN_INT (CONST_DOUBLE_LOW(operands[1])); - } - else - if (GET_CODE (operands[1]) == CONST_INT) - { - lsw_operands[1] = operands[1]; - operands[1] = const0_rtx; - } - else - abort(); - - if (GET_CODE (operands[2]) == REG) - lsw_operands[2] = gen_rtx_REG (SImode, REGNO (operands[2]) + 1); - else - if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2])) - lsw_operands[2] = adjust_address (operands[2], SImode, 4); - else - if (GET_CODE (operands[2]) == CONST_DOUBLE) - { - lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2])); - operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2])); - } - else - if (GET_CODE (operands[2]) == CONST_INT) - { - lsw_operands[2] = operands[2]; - operands[2] = const0_rtx; - } - else - abort(); - - label[0] = gen_label_rtx(); - LABEL_NUSES(label[0]) = 1; - - output_asm_insn(\"subw3 %2, %1, %0\", operands); - output_asm_insn(\"subw3 %2, %1, %0\", lsw_operands); - output_asm_insn(\"BCCB %l0\", label); - output_asm_insn(\"DECW %0\", operands); - output_asm_insn(\"%l0:\", label); - - return \"\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (minus:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "subw2 %2, %0") - - (define_insn "subsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (minus:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "subw3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (minus:HI (match_operand:HI 1 "nonimmediate_operand" "0") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "subh2 %2, %0") - - (define_insn "subhi3" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (minus:HI (match_operand:HI 1 "general_operand" "mri") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "subh3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (minus:QI (match_operand:QI 1 "nonimmediate_operand" "0") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "subb2 %2, %0") - - (define_insn "subqi3" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (minus:QI (match_operand:QI 1 "general_operand" "mri") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "subb3 %2, %1, %0") - - ;; signed multiply instructions - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (mult:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "mulw2 %2, %0") - - (define_insn "mulsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (mult:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "mulw3 %2, %1, %0") - - ;; signed divide instructions - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (div:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "divw2 %2, %0") - - (define_insn "divsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (div:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "divw3 %2, %1, %0") - - ;; signed modulus instruction - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (mod:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "modw2 %2, %0") - - (define_insn "modsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (mod:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "modw3 %2, %1, %0") - - ;; unsigned divide instruction - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (udiv:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "udivw2 %2, %0") - - (define_insn "udivsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (udiv:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "udivw3 %2, %1, %0") - - ;; unsigned modulus instruction - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (umod:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "umodw2 %2, %0") - - (define_insn "umodsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (umod:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "umodw3 %2, %1, %0") - - ;; logical-and instructions - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (and:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "andw2 %2, %0") - - (define_insn "andsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (and:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "andw3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (and:HI (match_operand:HI 1 "nonimmediate_operand" "0") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "andh2 %2, %0") - - (define_insn "andhi3" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (and:HI (match_operand:HI 1 "general_operand" "mri") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "andh3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (and:QI (match_operand:QI 1 "nonimmediate_operand" "0") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "andb2 %2, %0") - - (define_insn "andqi3" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (and:QI (match_operand:QI 1 "general_operand" "mri") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "andb3 %2, %1, %0") - - ;; inclusive-or instructions - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (ior:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "orw2 %2, %0") - - (define_insn "iorsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (ior:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "orw3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (ior:HI (match_operand:HI 1 "nonimmediate_operand" "0") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "orh2 %2, %0") - - (define_insn "iorhi3" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (ior:HI (match_operand:HI 1 "general_operand" "mri") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "orh3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (ior:QI (match_operand:QI 1 "nonimmediate_operand" "0") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "orb2 %2, %0") - - (define_insn "iorqi3" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (ior:QI (match_operand:QI 1 "general_operand" "mri") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "orb3 %2, %1, %0") - - ;; exclusive-or instructions - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (xor:SI (match_operand:SI 1 "nonimmediate_operand" "0") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "xorw2 %2, %0") - - (define_insn "xorsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (xor:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "xorw3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (xor:HI (match_operand:HI 1 "nonimmediate_operand" "0") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "xorh2 %2, %0") - - (define_insn "xorhi3" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (xor:HI (match_operand:HI 1 "general_operand" "mri") - (match_operand:HI 2 "general_operand" "mri")))] - "" - "xorh3 %2, %1, %0") - - (define_insn "" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (xor:QI (match_operand:QI 1 "nonimmediate_operand" "0") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "xorb2 %2, %0") - - (define_insn "xorqi3" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (xor:QI (match_operand:QI 1 "general_operand" "mri") - (match_operand:QI 2 "general_operand" "mri")))] - "" - "xorb3 %2, %1, %0") - - ;; arithmetic shift instructions - - (define_insn "ashlsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (ashift:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "LLSW3 %2, %1, %0") - - (define_insn "ashrsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (ashiftrt:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "ARSW3 %2, %1, %0") - - ;; logical shift instructions - - (define_insn "lshrsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (lshiftrt:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "LRSW3 %2, %1, %0") - - ;; rotate instruction - - (define_insn "rotrsi3" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (rotatert: SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "general_operand" "mri")))] - "" - "ROTW %2, %1, %0") - - ;; negate instructions - - (define_insn "negsi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (neg:SI (match_operand:SI 1 "general_operand" "mri")))] - "" - "mnegw %1, %0") - - (define_insn "neghi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (neg:HI (match_operand:HI 1 "general_operand" "mri")))] - "" - "mnegh %1, %0") - - ;; complement instructions - - (define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (not:SI (match_operand:SI 1 "general_operand" "mri")))] - "" - "mcomw %1, %0") - - (define_insn "one_cmplhi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (not:HI (match_operand:HI 1 "general_operand" "mri")))] - "" - "mcomh %1, %0") - - (define_insn "one_cmplqi2" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (not:QI (match_operand:QI 1 "general_operand" "mri")))] - "" - "mcomb %1, %0") - - ;; test instruction - - ;; We don't want to allow a constant operand for test insns because - ;; (set (cc0) (const_int foo)) has no mode information. Such insns will - ;; be folded while optimizing anyway. - - (define_insn "tstsi" - [(set (cc0) (match_operand:SI 0 "nonimmediate_operand" "mr"))] - "" - "TSTW %0") - - (define_insn "tsthi" - [(set (cc0) (match_operand:HI 0 "nonimmediate_operand" "mr"))] - "" - "TSTH %0") - - (define_insn "tstqi" - [(set (cc0) (match_operand:QI 0 "nonimmediate_operand" "mr"))] - "" - "TSTB {sbyte}%0") - - ;; compare instruction - - (define_insn "cmpsi" - [(set (cc0) (compare (match_operand:SI 0 "nonimmediate_operand" "mr") - (match_operand:SI 1 "general_operand" "mri")))] - "" - "CMPW %1, %0") - - (define_insn "cmphi" - [(set (cc0) (compare (match_operand:HI 0 "nonimmediate_operand" "mr") - (match_operand:HI 1 "general_operand" "mri")))] - "" - "* - { - - if (GET_CODE (operands[1]) == CONST_INT && - ((unsigned long)INTVAL (operands[1]) & 0x8000L)) - operands[1] = GEN_INT (INTVAL (operands[1]) | 0xffff0000L); - - output_asm_insn(\"CMPH %1, %0\",operands); - - return \"\"; - }") - - (define_insn "cmpqi" - [(set (cc0) (compare (match_operand:QI 0 "nonimmediate_operand" "mr") - (match_operand:QI 1 "general_operand" "mri")))] - "" - "* - { - - if (GET_CODE (operands[1]) == CONST_INT && - ((unsigned long)INTVAL (operands[1]) & 0x80L)) - operands[1] = GEN_INT (INTVAL(operands[1]) | 0xffffff00L); - - output_asm_insn(\"CMPB {sbyte}%1, {sbyte}%0\",operands); - - return \"\"; - }") - - ;; truncate instructions - - (define_insn "" - [(set (match_operand:SF 0 "register_operand" "=r") - (float_truncate:SF (match_operand:DF 1 "general_operand" "orF"))) - (clobber (reg:SI 1)) - (clobber (reg:SI 2))] - "REGNO (operands[0]) == 0" - "* - { - output_push_double(&operands[1]); - output_asm_insn(\"call &2, _fdtos\", operands); - - return \"\"; - }") - - (define_expand "truncdfsf2" - [(parallel [(set (reg:SF 0) - (float_truncate:SF (match_operand:DF 1 "general_operand" "orF"))) - (clobber (reg:SI 1)) - (clobber (reg:SI 2))]) - (set (match_operand:SF 0 "nonimmediate_operand" "=mr") - (reg:SF 0))] - "" - "") - - (define_insn "truncsihi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (truncate:HI (match_operand:SI 1 "general_operand" "mri")))] - "" - "movtwh %1, %0") - - (define_insn "truncsiqi2" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (truncate:QI (match_operand:SI 1 "general_operand" "mri")))] - "" - "movtwb %1, %0") - - (define_insn "trunchiqi2" - [(set (match_operand:QI 0 "nonimmediate_operand" "=mr") - (truncate:QI (match_operand:HI 1 "general_operand" "mri")))] - "" - "movthb %1, %0") - - ;; sign-extend move instructions - - (define_insn "" - [(set (match_operand:DF 0 "register_operand" "=r") - (float_extend:DF (match_operand:SF 1 "general_operand" "mrF"))) - (clobber (reg:SI 2))] - "REGNO (operands[0]) == 0" - "* - { - output_asm_insn(\"pushw %1\", operands); - output_asm_insn(\"call &1, _fstod\", operands); - - return \"\"; - }") - - (define_expand "extendsfdf2" - [(parallel [(set (reg:DF 0) - (float_extend:DF (match_operand:SF 1 "general_operand" "mrF"))) - (clobber (reg:SI 2))]) - (set (match_operand:DF 0 "nonimmediate_operand" "=or") - (reg:DF 0))] - "" - "") - - (define_insn "extendhisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (sign_extend:SI (match_operand:HI 1 "general_operand" "mri")))] - "" - "movbhw %1, %0") - - (define_insn "extendqisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (sign_extend:SI (match_operand:QI 1 "general_operand" "mri")))] - "" - "movbbw %1, %0") - - (define_insn "extendqihi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (sign_extend:HI (match_operand:QI 1 "general_operand" "mri")))] - "" - "movbbh %1, %0") - - ;; zero-extend move instructions - - (define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (zero_extend:SI (match_operand:HI 1 "general_operand" "mri")))] - "" - "movzhw %1, %0") - - (define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (zero_extend:SI (match_operand:QI 1 "general_operand" "mri")))] - "" - "movzbw %1, %0") - - (define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=mr") - (zero_extend:HI (match_operand:QI 1 "general_operand" "mri")))] - "" - "movzbh %1, %0") - - ;; bit field instructions - - (define_insn "extzv" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (zero_extract:SI (match_operand:SI 1 "general_operand" "mri") - (match_operand:SI 2 "immediate_operand" "i") - (match_operand:SI 3 "general_operand" "mri")))] - "" - "* - { - - operands[2] = GEN_INT (INTVAL(operands[2]) - 1); - output_asm_insn(\"EXTFW %2, %3, %1, %0\",operands); - - return \"\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (zero_extract:SI (match_operand:HI 1 "general_operand" "mri") - (match_operand:SI 2 "immediate_operand" "i") - (match_operand:SI 3 "general_operand" "mri")))] - "" - "* - { - - operands[2] = GEN_INT (INTVAL (operands[2]) - 1); - output_asm_insn(\"EXTFH %2, %3, {uhalf}%1, {uword}%0\",operands); - - return \"\"; - }") - - (define_insn "" - [(set (match_operand:SI 0 "nonimmediate_operand" "=mr") - (zero_extract:SI (match_operand:QI 1 "general_operand" "mri") - (match_operand:SI 2 "immediate_operand" "i") - (match_operand:SI 3 "general_operand" "mri")))] - "" - "* - { - - operands[2] = GEN_INT (INTVAL (operands[2]) - 1); - output_asm_insn(\"EXTFB %2, %3, {ubyte}%1, {uword}%0\",operands); - - return \"\"; - }") - - (define_insn "insv" - [(set (zero_extract:SI (match_operand:SI 0 "nonimmediate_operand" "+mr") - (match_operand:SI 1 "immediate_operand" "i") - (match_operand:SI 2 "general_operand" "mri")) - (match_operand:SI 3 "general_operand" "mri"))] - "" - "* - { - - operands[1] = GEN_INT (INTVAL (operands[1]) - 1); - output_asm_insn(\"INSFW %1, %2, %3, %0\",operands); - - return \"\"; - }") - - (define_insn "" - [(set (zero_extract:SI (match_operand:HI 0 "nonimmediate_operand" "+mr") - (match_operand:SI 1 "immediate_operand" "i") - (match_operand:SI 2 "general_operand" "mri")) - (match_operand:SI 3 "general_operand" "mri"))] - "" - "* - { - - operands[1] = GEN_INT (INTVAL(operands[1]) - 1); - output_asm_insn(\"INSFH %1, %2, {uword}%3, {uhalf}%0\",operands); - - return \"\"; - }") - - (define_insn "" - [(set (zero_extract:SI (match_operand:QI 0 "nonimmediate_operand" "+mr") - (match_operand:SI 1 "immediate_operand" "i") - (match_operand:SI 2 "general_operand" "mri")) - (match_operand:SI 3 "general_operand" "mri"))] - "" - "* - { - - operands[1] = GEN_INT (INTVAL(operands[1]) - 1); - output_asm_insn(\"INSFB %1, %2, {uword}%3, {ubyte}%0\",operands); - - return \"\"; - }") - - ;; conditional branch instructions - - (define_insn "beq" - [(set (pc) (if_then_else (eq (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "je %l0") - - (define_insn "bne" - [(set (pc) (if_then_else (ne (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jne %l0") - - (define_insn "bgt" - [(set (pc) (if_then_else (gt (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jg %l0") - - (define_insn "bgtu" - [(set (pc) (if_then_else (gtu (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jgu %l0") - - (define_insn "blt" - [(set (pc) (if_then_else (lt (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jl %l0") - - (define_insn "bltu" - [(set (pc) (if_then_else (ltu (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jlu %l0") - - (define_insn "bge" - [(set (pc) (if_then_else (ge (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jge %l0") - - (define_insn "bgeu" - [(set (pc) (if_then_else (geu (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jgeu %l0") - - (define_insn "ble" - [(set (pc) (if_then_else (le (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jle %l0") - - (define_insn "bleu" - [(set (pc) (if_then_else (leu (cc0) (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "jleu %l0") - - ;; reverse-conditional branch instructions - - (define_insn "" - [(set (pc) (if_then_else (eq (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jne %l0") - - (define_insn "" - [(set (pc) (if_then_else (ne (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "je %l0") - - (define_insn "" - [(set (pc) (if_then_else (gt (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jle %l0") - - (define_insn "" - [(set (pc) (if_then_else (gtu (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jleu %l0") - - (define_insn "" - [(set (pc) (if_then_else (lt (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jge %l0") - - (define_insn "" - [(set (pc) (if_then_else (ltu (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jgeu %l0") - - (define_insn "" - [(set (pc) (if_then_else (ge (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jl %l0") - - (define_insn "" - [(set (pc) (if_then_else (geu (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jlu %l0") - - (define_insn "" - [(set (pc) (if_then_else (le (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jg %l0") - - (define_insn "" - [(set (pc) (if_then_else (leu (cc0) (const_int 0)) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "jgu %l0") - - ;; call instructions - - (define_insn "call" - [(call (match_operand:QI 0 "memory_operand" "m") - (match_operand:SI 1 "immediate_operand" "i"))] - "" - "call %1/4, %0") - - (define_insn "call_value" - [(set (match_operand 0 "register_operand" "=r") - (call (match_operand:QI 1 "memory_operand" "m") - (match_operand:SI 2 "immediate_operand" "i")))] - "" - "call %2/4, %1") - - ;; No-op instruction - - (define_insn "nop" - [(const_int 0)] - "" - "NOP") - - ;; jump through a dispatch table instruction - - (define_expand "casesi" - [(use (match_operand:SI 0 "general_operand" "mri")) - (set (cc0) (compare (match_dup 5) - (match_operand:SI 1 "general_operand" "mri"))) - (set (pc) (if_then_else (lt (cc0) (const_int 0)) - (label_ref (match_operand 4 "" "")) - (pc))) - (set (match_dup 5) (minus:SI (match_dup 5) - (match_dup 1))) - (set (cc0) (compare (match_dup 5) - (match_operand:SI 2 "general_operand" "mri"))) - (set (pc) (if_then_else (gtu (cc0) (const_int 0)) - (label_ref (match_dup 4)) - (pc))) - (set (match_dup 5) (ashift:SI (match_dup 5) - (const_int 2))) - (set (pc) (mem:SI (plus:SI (label_ref (match_operand 3 "" "")) - (match_dup 5))))] - "" - " - { - operands[5] = gen_reg_rtx(GET_MODE (operands[0])); - emit_move_insn(operands[5], operands[0]); - }") - - ;; jump instructions - - (define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "address_operand" "p"))] - "" - "jmp %a0") - - (define_insn "jump" - [(set (pc) (label_ref (match_operand 0 "" "")))] - "" - "jmp %l0") --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/we32k/we32k-protos.h gcc-3.3/gcc/config/we32k/we32k-protos.h *** gcc-3.2.3/gcc/config/we32k/we32k-protos.h 2000-05-01 17:32:22.000000000 +0000 --- gcc-3.3/gcc/config/we32k/we32k-protos.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,26 **** - /* Definitions of target machine for GNU compiler. AT&T we32000 version. - Copyright (C) 2000 - Free Software Foundation, Inc. - Contributed by John Wehle (john@feith1.uucp) - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - #ifdef RTX_CODE - extern void output_move_double PARAMS ((rtx *)); - extern void output_push_double PARAMS ((rtx *)); - #endif /* RTX_CODE */ --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/elf.h gcc-3.3/gcc/config/xtensa/elf.h *** gcc-3.2.3/gcc/config/xtensa/elf.h 2002-11-05 21:33:24.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/elf.h 2002-11-05 21:36:49.000000000 +0000 *************** along with GCC; see the file COPYING. I *** 19,24 **** --- 19,31 ---- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define ("__ELF__"); \ + } while (0) + + #define TARGET_SECTION_TYPE_FLAGS xtensa_multibss_section_type_flags + /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C *************** Software Foundation, 59 Temple Place - S *** 74,82 **** %{rdynamic:-export-dynamic} \ %{static:-static}}}" - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-D__XTENSA__ -D__ELF__ -Acpu=xtensa -Amachine=xtensa" - /* Local compiler-generated symbols must have a prefix that the assembler understands. By default, this is $, although some targets (e.g., NetBSD-ELF) need to override this. */ --- 81,86 ---- *************** Software Foundation, 59 Temple Place - S *** 101,110 **** doesn't allow $ in symbol names. */ #undef NO_DOLLAR_IN_LABEL - /* Don't switch sections in the middle of a literal pool! */ - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) - /* Do not force "-fpic" for this target. */ #define XTENSA_ALWAYS_PIC 0 --- 105,110 ---- *************** Software Foundation, 59 Temple Place - S *** 116,138 **** do \ { \ if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno; \ ! \ ! labelno++; \ ! \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ","); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ XTENSA_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL); \ } \ while (0) --- 116,122 ---- do \ { \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ XTENSA_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL); \ } \ while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/lib2funcs.S gcc-3.3/gcc/config/xtensa/lib2funcs.S *** gcc-3.2.3/gcc/config/xtensa/lib2funcs.S 2002-03-12 20:06:55.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/lib2funcs.S 2002-04-19 00:31:17.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 30,75 **** #include "xtensa/xtensa-config.h" ! /* __xtensa_libgcc_window_spill: This function uses a series of nested ! calls to flush out all but the current register window. This is ! used to set up the stack so that arbitrary frames can be accessed. ! The functions used for the nested calls are also reused by the ! nonlocal goto function below. */ ! .align 4 ! .global __xtensa_libgcc_window_spill ! .type __xtensa_libgcc_window_spill,@function __xtensa_libgcc_window_spill: ! entry sp, 48 ! call4 .L__wdwspill_assist52 // called with call8, only need a call4 ! retw ! .size __xtensa_libgcc_window_spill,.-__xtensa_libgcc_window_spill ! ! .align 4 ! .L__wdwspill_assist56: ! entry sp, 16 ! call4 .L__wdwspill_assist52 ! retw ! .align 4 ! .L__wdwspill_assist52: ! entry sp, 48 ! call12 .L__wdwspill_assist40 ! retw ! .align 4 ! .L__wdwspill_assist40: ! entry sp, 48 ! call12 .L__wdwspill_assist28 ! retw ! .align 4 ! .L__wdwspill_assist28: ! entry sp, 48 ! call12 .L__wdwspill_assist16 ! retw ! .align 4 ! .L__wdwspill_assist16: ! entry sp, 16 ! movi a15, 0 retw /* __xtensa_nonlocal_goto: This code does all the hard work of a --- 30,48 ---- #include "xtensa/xtensa-config.h" ! /* __xtensa_libgcc_window_spill: This function flushes out all but the ! current register window. This is used to set up the stack so that ! arbitrary frames can be accessed. */ ! .align 4 ! .global __xtensa_libgcc_window_spill ! .type __xtensa_libgcc_window_spill,@function __xtensa_libgcc_window_spill: ! entry sp, 32 ! movi a2, 0 ! syscall retw + .size __xtensa_libgcc_window_spill,.-__xtensa_libgcc_window_spill /* __xtensa_nonlocal_goto: This code does all the hard work of a *************** __xtensa_nonlocal_goto: *** 90,96 **** entry sp, 32 /* flush registers */ ! call8 .L__wdwspill_assist56 /* Because the save area for a0-a3 is stored one frame below the one identified by a2, the only way to restore those --- 63,72 ---- entry sp, 32 /* flush registers */ ! mov a5, a2 ! movi a2, 0 ! syscall ! mov a2, a5 /* Because the save area for a0-a3 is stored one frame below the one identified by a2, the only way to restore those diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/linux.h gcc-3.3/gcc/config/xtensa/linux.h *** gcc-3.2.3/gcc/config/xtensa/linux.h 2002-04-15 20:27:46.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/linux.h 2003-04-26 00:43:44.000000000 +0000 *************** *** 1,6 **** /* Xtensa Linux configuration. Derived from the configuration for GCC for Intel i386 running Linux. ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. --- 1,6 ---- /* Xtensa Linux configuration. Derived from the configuration for GCC for Intel i386 running Linux. ! Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. *************** along with GCC; see the file COPYING. I *** 19,24 **** --- 19,36 ---- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define_std ("linux"); \ + builtin_define_std ("unix"); \ + builtin_define ("__ELF__"); \ + builtin_define ("__gnu_linux__"); \ + builtin_assert ("system=posix"); \ + } while (0) + + #undef SUBTARGET_CPP_SPEC + #define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + #undef TARGET_VERSION #define TARGET_VERSION fputs (" (Xtensa GNU/Linux with ELF)", stderr); *************** Software Foundation, 59 Temple Place - S *** 33,44 **** #undef ASM_FINAL_SPEC - #undef LIB_SPEC - #define LIB_SPEC \ - "%{shared: -lc} \ - %{!shared: %{pthread:-lpthread} \ - %{profile:-lc_p} %{!profile: -lc}}" - #undef LINK_SPEC #define LINK_SPEC \ "%{shared:-shared} \ --- 45,50 ---- *************** Software Foundation, 59 Temple Place - S *** 49,66 **** %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{static:-static}}}" - #undef CPP_PREDEFINES - #define CPP_PREDEFINES \ - "-D__XTENSA__ -D__ELF__ -Acpu=xtensa -Amachine=xtensa \ - -Dunix -D__gnu_linux__ -Dlinux -Asystem=posix" - #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." - /* Don't switch sections in the middle of a literal pool! */ - #undef SELECT_RTX_SECTION - #define SELECT_RTX_SECTION(MODE,RTX,ALIGN) - /* Always enable "-fpic" for Xtensa Linux. */ #define XTENSA_ALWAYS_PIC 1 --- 55,63 ---- *************** Software Foundation, 59 Temple Place - S *** 72,94 **** do \ { \ if (!flag_inhibit_size_directive) \ ! { \ ! char label[256]; \ ! static int labelno; \ ! \ ! labelno++; \ ! \ ! ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ! ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! \ ! fprintf (FILE, "%s", SIZE_ASM_OP); \ ! assemble_name (FILE, (FNAME)); \ ! fprintf (FILE, ","); \ ! assemble_name (FILE, label); \ ! fprintf (FILE, "-"); \ ! assemble_name (FILE, (FNAME)); \ ! putc ('\n', FILE); \ ! } \ XTENSA_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL); \ } \ while (0) --- 69,75 ---- do \ { \ if (!flag_inhibit_size_directive) \ ! ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ XTENSA_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL); \ } \ while (0) diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/t-xtensa gcc-3.3/gcc/config/xtensa/t-xtensa *** gcc-3.2.3/gcc/config/xtensa/t-xtensa 2002-03-12 18:44:25.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/t-xtensa 2002-06-11 20:56:48.000000000 +0000 *************** fp-bit.c: $(srcdir)/config/fp-bit.c *** 10,18 **** ######################################################################## - # Skip the libgcc1 test. - LIBGCC1_TEST = - # Don't run fixproto STMP_FIXPROTO = --- 10,15 ---- *************** STMP_FIXPROTO = *** 20,29 **** CRTSTUFF_T_CFLAGS += -mlongcalls CRTSTUFF_T_CFLAGS_S += -mlongcalls - CROSS_LIBGCC1 = libgcc1-asm.a LIB1ASMSRC = xtensa/lib1funcs.asm LIB1ASMFUNCS = _mulsi3 _nsau _divsi3 _modsi3 _udivsi3 _umodsi3 TARGET_LIBGCC2_CFLAGS += -mlongcalls LIB2FUNCS_EXTRA += $(srcdir)/config/xtensa/lib2funcs.S --- 17,28 ---- CRTSTUFF_T_CFLAGS += -mlongcalls CRTSTUFF_T_CFLAGS_S += -mlongcalls LIB1ASMSRC = xtensa/lib1funcs.asm LIB1ASMFUNCS = _mulsi3 _nsau _divsi3 _modsi3 _udivsi3 _umodsi3 TARGET_LIBGCC2_CFLAGS += -mlongcalls LIB2FUNCS_EXTRA += $(srcdir)/config/xtensa/lib2funcs.S + + $(out_object_file): gt-xtensa.h + gt-xtensa.h : s-gtype ; @true diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/xtensa.c gcc-3.3/gcc/config/xtensa/xtensa.c *** gcc-3.2.3/gcc/config/xtensa/xtensa.c 2003-02-11 22:18:53.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/xtensa.c 2003-04-26 00:24:09.000000000 +0000 *************** *** 1,5 **** /* Subroutines for insn-output.c for Tensilica's Xtensa architecture. ! Copyright 2001,2002 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. --- 1,5 ---- /* Subroutines for insn-output.c for Tensilica's Xtensa architecture. ! Copyright 2001,2002,2003 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 42,50 **** --- 42,53 ---- #include "function.h" #include "toplev.h" #include "optabs.h" + #include "output.h" #include "libfuncs.h" + #include "ggc.h" #include "target.h" #include "target-def.h" + #include "langhooks.h" /* Enumeration for all of the relational tests, so that we can build arrays indexed by the test type, and not worry about the order *************** const char *xtensa_st_opcodes[(int) MAX_ *** 84,90 **** #define LARGEST_MOVE_RATIO 15 /* Define the structure for the machine field in struct function. */ ! struct machine_function { int accesses_prev_frame; bool incoming_a7_copied; --- 87,93 ---- #define LARGEST_MOVE_RATIO 15 /* Define the structure for the machine field in struct function. */ ! struct machine_function GTY(()) { int accesses_prev_frame; bool incoming_a7_copied; *************** enum reg_class xtensa_char_to_class[256] *** 186,191 **** --- 189,214 ---- NO_REGS, NO_REGS, NO_REGS, NO_REGS, }; + static int b4const_or_zero PARAMS ((int)); + static enum internal_test map_test_to_internal_test PARAMS ((enum rtx_code)); + static rtx gen_int_relational PARAMS ((enum rtx_code, rtx, rtx, int *)); + static rtx gen_float_relational PARAMS ((enum rtx_code, rtx, rtx)); + static rtx gen_conditional_move PARAMS ((rtx)); + static rtx fixup_subreg_mem PARAMS ((rtx x)); + static enum machine_mode xtensa_find_mode_for_size PARAMS ((unsigned)); + static struct machine_function * xtensa_init_machine_status PARAMS ((void)); + static void printx PARAMS ((FILE *, signed int)); + static unsigned int xtensa_multibss_section_type_flags + PARAMS ((tree, const char *, int)); + static void xtensa_select_rtx_section + PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT)); + static void xtensa_encode_section_info PARAMS ((tree, int)); + + static rtx frame_size_const; + static int current_function_arg_words; + static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] = + REG_ALLOC_ORDER; + /* This macro generates the assembly code for function entry. FILE is a stdio stream to output the code to. SIZE is an int: how many units of temporary storage to allocate. *************** enum reg_class xtensa_char_to_class[256] *** 211,233 **** #undef TARGET_ASM_ALIGNED_SI_OP #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" ! struct gcc_target targetm = TARGET_INITIALIZER; ! ! static int b4const_or_zero PARAMS ((int)); ! static enum internal_test map_test_to_internal_test PARAMS ((enum rtx_code)); ! static rtx gen_int_relational PARAMS ((enum rtx_code, rtx, rtx, int *)); ! static rtx gen_float_relational PARAMS ((enum rtx_code, rtx, rtx)); ! static rtx gen_conditional_move PARAMS ((rtx)); ! static rtx fixup_subreg_mem PARAMS ((rtx x)); ! static enum machine_mode xtensa_find_mode_for_size PARAMS ((unsigned)); ! static void xtensa_init_machine_status PARAMS ((struct function *p)); ! static void xtensa_free_machine_status PARAMS ((struct function *p)); ! static void printx PARAMS ((FILE *, signed int)); ! static rtx frame_size_const; ! static int current_function_arg_words; ! static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] = ! REG_ALLOC_ORDER; /* * Functions to test Xtensa immediate operand validity. --- 234,246 ---- #undef TARGET_ASM_ALIGNED_SI_OP #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" ! #undef TARGET_ASM_SELECT_RTX_SECTION ! #define TARGET_ASM_SELECT_RTX_SECTION xtensa_select_rtx_section ! #undef TARGET_ENCODE_SECTION_INFO ! #define TARGET_ENCODE_SECTION_INFO xtensa_encode_section_info + struct gcc_target targetm = TARGET_INITIALIZER; + /* * Functions to test Xtensa immediate operand validity. *************** xtensa_expand_block_move (operands) *** 1403,1409 **** if (num_pieces >= move_ratio) return 0; ! /* make sure the memory addresses are valid */ operands[0] = validize_mem (dest); operands[1] = validize_mem (src); --- 1416,1422 ---- if (num_pieces >= move_ratio) return 0; ! /* make sure the memory addresses are valid */ operands[0] = validize_mem (dest); operands[1] = validize_mem (src); *************** xtensa_expand_nonlocal_goto (operands) *** 1571,1591 **** } ! static void ! xtensa_init_machine_status (p) ! struct function *p; ! { ! p->machine = (struct machine_function *) ! xcalloc (1, sizeof (struct machine_function)); ! } ! ! ! static void ! xtensa_free_machine_status (p) ! struct function *p; { ! free (p->machine); ! p->machine = NULL; } --- 1584,1593 ---- } ! static struct machine_function * ! xtensa_init_machine_status () { ! return ggc_alloc_cleared (sizeof (struct machine_function)); } *************** override_options () *** 1868,1885 **** } init_machine_status = xtensa_init_machine_status; - free_machine_status = xtensa_free_machine_status; /* Check PIC settings. There's no need for -fPIC on Xtensa and some targets need to always use PIC. */ ! if (XTENSA_ALWAYS_PIC) ! { ! if (flag_pic) ! warning ("-f%s ignored (all code is position independent)", ! (flag_pic > 1 ? "PIC" : "pic")); ! flag_pic = 1; ! } ! if (flag_pic > 1) flag_pic = 1; } --- 1870,1879 ---- } init_machine_status = xtensa_init_machine_status; /* Check PIC settings. There's no need for -fPIC on Xtensa and some targets need to always use PIC. */ ! if (flag_pic > 1 || (XTENSA_ALWAYS_PIC)) flag_pic = 1; } *************** print_operand (file, op, letter) *** 2028,2039 **** /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. ! ! On some machines, the syntax for a symbolic address depends on ! the section that the address refers to. On these machines, ! define the macro 'ENCODE_SECTION_INFO' to store the information ! into the 'symbol_ref', and then check for it here. */ void print_operand_address (file, addr) --- 2022,2028 ---- /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory ! reference whose address is ADDR. ADDR is an RTL expression. */ void print_operand_address (file, addr) *************** print_operand_address (file, addr) *** 2093,2114 **** } - /* Emit either a label, .comm, or .lcomm directive. */ - - void - xtensa_declare_object (file, name, init_string, final_string, size) - FILE *file; - char *name; - char *init_string; - char *final_string; - int size; - { - fputs (init_string, file); /* "", "\t.comm\t", or "\t.lcomm\t" */ - assemble_name (file, name); - fprintf (file, final_string, size); /* ":\n", ",%u\n", ",%u\n" */ - } - - void xtensa_output_literal (file, x, mode, labelno) FILE *file; --- 2082,2087 ---- *************** xtensa_output_literal (file, x, mode, la *** 2117,2123 **** int labelno; { long value_long[2]; ! union real_extract u; int size; fprintf (file, "\t.literal .LC%u, ", (unsigned) labelno); --- 2090,2096 ---- int labelno; { long value_long[2]; ! REAL_VALUE_TYPE r; int size; fprintf (file, "\t.literal .LC%u, ", (unsigned) labelno); *************** xtensa_output_literal (file, x, mode, la *** 2128,2145 **** if (GET_CODE (x) != CONST_DOUBLE) abort (); ! memcpy ((char *) &u, (char *) &CONST_DOUBLE_LOW (x), sizeof u); switch (mode) { case SFmode: ! REAL_VALUE_TO_TARGET_SINGLE (u.d, value_long[0]); ! fprintf (file, "0x%08lx\t\t# %.12g (float)\n", value_long[0], u.d); break; case DFmode: ! REAL_VALUE_TO_TARGET_DOUBLE (u.d, value_long); ! fprintf (file, "0x%08lx, 0x%08lx # %.20g (double)\n", ! value_long[0], value_long[1], u.d); break; default: --- 2101,2118 ---- if (GET_CODE (x) != CONST_DOUBLE) abort (); ! REAL_VALUE_FROM_CONST_DOUBLE (r, x); switch (mode) { case SFmode: ! REAL_VALUE_TO_TARGET_SINGLE (r, value_long[0]); ! fprintf (file, "0x%08lx\n", value_long[0]); break; case DFmode: ! REAL_VALUE_TO_TARGET_DOUBLE (r, value_long); ! fprintf (file, "0x%08lx, 0x%08lx\n", ! value_long[0], value_long[1]); break; default: *************** xtensa_return_addr (count, frame) *** 2368,2378 **** argument word N for N >= 6. */ tree ! xtensa_build_va_list (void) { ! tree f_stk, f_reg, f_ndx, record; ! record = make_node (RECORD_TYPE); f_stk = build_decl (FIELD_DECL, get_identifier ("__va_stk"), ptr_type_node); --- 2341,2352 ---- argument word N for N >= 6. */ tree ! xtensa_build_va_list () { ! tree f_stk, f_reg, f_ndx, record, type_decl; ! record = (*lang_hooks.types.make_type) (RECORD_TYPE); ! type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); f_stk = build_decl (FIELD_DECL, get_identifier ("__va_stk"), ptr_type_node); *************** xtensa_build_va_list (void) *** 2385,2390 **** --- 2359,2366 ---- DECL_FIELD_CONTEXT (f_reg) = record; DECL_FIELD_CONTEXT (f_ndx) = record; + TREE_CHAIN (record) = type_decl; + TYPE_NAME (record) = type_decl; TYPE_FIELDS (record) = f_stk; TREE_CHAIN (f_stk) = f_reg; TREE_CHAIN (f_reg) = f_ndx; *************** xtensa_builtin_saveregs () *** 2411,2419 **** /* allocate the general-purpose register space */ gp_regs = assign_stack_local (BLKmode, MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD, -1); ! MEM_IN_STRUCT_P (gp_regs) = 1; ! RTX_UNCHANGING_P (gp_regs) = 1; ! RTX_UNCHANGING_P (XEXP (gp_regs, 0)) = 1; /* Now store the incoming registers. */ dest = change_address (gp_regs, SImode, --- 2387,2393 ---- /* allocate the general-purpose register space */ gp_regs = assign_stack_local (BLKmode, MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD, -1); ! set_mem_alias_set (gp_regs, get_varargs_alias_set ()); /* Now store the incoming registers. */ dest = change_address (gp_regs, SImode, *************** xtensa_builtin_saveregs () *** 2438,2445 **** current function to fill in an initial va_list. */ void ! xtensa_va_start (stdarg_p, valist, nextarg) ! int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg ATTRIBUTE_UNUSED; { --- 2412,2418 ---- current function to fill in an initial va_list. */ void ! xtensa_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { *************** a7_overlap_mentioned_p (x) *** 2797,2799 **** --- 2770,2825 ---- return 0; } + + + /* Some Xtensa targets support multiple bss sections. If the section + name ends with ".bss", add SECTION_BSS to the flags. */ + + static unsigned int + xtensa_multibss_section_type_flags (decl, name, reloc) + tree decl; + const char *name; + int reloc; + { + unsigned int flags = default_section_type_flags (decl, name, reloc); + const char *suffix; + + suffix = strrchr (name, '.'); + if (suffix && strcmp (suffix, ".bss") == 0) + { + if (!decl || (TREE_CODE (decl) == VAR_DECL + && DECL_INITIAL (decl) == NULL_TREE)) + flags |= SECTION_BSS; /* @nobits */ + else + warning ("only uninitialized variables can be placed in a " + ".bss section"); + } + + return flags; + } + + + /* The literal pool stays with the function. */ + + static void + xtensa_select_rtx_section (mode, x, align) + enum machine_mode mode ATTRIBUTE_UNUSED; + rtx x ATTRIBUTE_UNUSED; + unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; + { + function_section (current_function_decl); + } + + /* If we are referencing a function that is static, make the SYMBOL_REF + special so that we can generate direct calls to it even with -fpic. */ + + static void + xtensa_encode_section_info (decl, first) + tree decl; + int first ATTRIBUTE_UNUSED; + { + if (TREE_CODE (decl) == FUNCTION_DECL && ! TREE_PUBLIC (decl)) + SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; + } + + #include "gt-xtensa.h" diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/xtensa.h gcc-3.3/gcc/config/xtensa/xtensa.h *** gcc-3.2.3/gcc/config/xtensa/xtensa.h 2003-04-14 15:31:30.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/xtensa.h 2003-04-26 00:43:44.000000000 +0000 *************** *** 1,5 **** /* Definitions of Tensilica's Xtensa target machine for GNU compiler. ! Copyright 2001,2002 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. --- 1,5 ---- /* Definitions of Tensilica's Xtensa target machine for GNU compiler. ! Copyright 2001,2002,2003 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. *************** extern unsigned xtensa_current_frame_siz *** 191,215 **** #define OVERRIDE_OPTIONS override_options () ! #if XCHAL_HAVE_BE ! #define CPP_ENDIAN_SPEC "\ ! %{mlittle-endian:-D__XTENSA_EL__} \ ! %{!mlittle-endian:-D__XTENSA_EB__} " ! #else /* !XCHAL_HAVE_BE */ ! #define CPP_ENDIAN_SPEC "\ ! %{mbig-endian:-D__XTENSA_EB__} \ ! %{!mbig-endian:-D__XTENSA_EL__} " ! #endif /* !XCHAL_HAVE_BE */ ! #if XCHAL_HAVE_FP ! #define CPP_FLOAT_SPEC "%{msoft-float:-D__XTENSA_SOFT_FLOAT__}" ! #else ! #define CPP_FLOAT_SPEC "%{!mhard-float:-D__XTENSA_SOFT_FLOAT__}" #endif ! #undef CPP_SPEC ! #define CPP_SPEC CPP_ENDIAN_SPEC CPP_FLOAT_SPEC /* Define this to set the endianness to use in libgcc2.c, which can not depend on target_flags. */ --- 191,221 ---- #define OVERRIDE_OPTIONS override_options () + + /* Target CPU builtins. */ + #define TARGET_CPU_CPP_BUILTINS() \ + do { \ + builtin_assert ("cpu=xtensa"); \ + builtin_assert ("machine=xtensa"); \ + builtin_define ("__XTENSA__"); \ + builtin_define (TARGET_BIG_ENDIAN ? "__XTENSA_EB__" : "__XTENSA_EL__"); \ + if (!TARGET_HARD_FLOAT) \ + builtin_define ("__XTENSA_SOFT_FLOAT__"); \ + if (flag_pic) \ + { \ + builtin_define ("__PIC__"); \ + builtin_define ("__pic__"); \ + } \ + } while (0) ! #define CPP_SPEC " %(subtarget_cpp_spec) " ! #ifndef SUBTARGET_CPP_SPEC ! #define SUBTARGET_CPP_SPEC "" #endif ! #define EXTRA_SPECS \ ! { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, /* Define this to set the endianness to use in libgcc2.c, which can not depend on target_flags. */ *************** extern unsigned xtensa_current_frame_siz *** 221,230 **** /* Target machine storage layout */ - /* Define in order to support both big and little endian float formats - in the same gcc binary. */ - #define REAL_ARITHMETIC - /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) --- 227,232 ---- *************** extern unsigned xtensa_current_frame_siz *** 235,245 **** /* Define this if most significant word of a multiword number is the lowest. */ #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) - /* Number of bits in an addressable storage unit */ - #define BITS_PER_UNIT 8 - - /* Width in bits of a "word", which is the contents of a machine register. */ - #define BITS_PER_WORD 32 #define MAX_BITS_PER_WORD 32 /* Width of a word, in units (bytes). */ --- 237,242 ---- *************** extern unsigned xtensa_current_frame_siz *** 255,265 **** #define LONG_TYPE_SIZE 32 #define MAX_LONG_TYPE_SIZE 32 #define LONG_LONG_TYPE_SIZE 64 - #define CHAR_TYPE_SIZE BITS_PER_UNIT #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE 64 - #define POINTER_SIZE 32 /* Allocation boundary (in *bits*) for storing pointers in memory. */ #define POINTER_BOUNDARY 32 --- 252,260 ---- *************** extern enum reg_class xtensa_char_to_cla *** 796,808 **** /* Don't worry about compatibility with PCC. */ #define DEFAULT_PCC_STRUCT_RETURN 0 ! /* For Xtensa, we would like to be able to return up to 6 words in ! memory but GCC cannot support that. The return value must be given ! one of the standard MODE_INT modes, and there is no 6 word mode. ! Instead, if we try to return a 6 word structure, GCC selects the ! next biggest mode (OImode, 8 words) and then the register allocator ! fails because there is no 8-register group beginning with a10. So ! we have to fall back on the next largest size which is 4 words... */ #define RETURN_IN_MEMORY(TYPE) \ ((unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > 4 * UNITS_PER_WORD) --- 791,803 ---- /* Don't worry about compatibility with PCC. */ #define DEFAULT_PCC_STRUCT_RETURN 0 ! /* For Xtensa, up to 4 words can be returned in registers. (It would ! have been nice to allow up to 6 words in registers but GCC cannot ! support that. The return value must be given one of the standard ! MODE_INT modes, and there is no 6 word mode. Instead, if we try to ! return a 6 word structure, GCC selects the next biggest mode ! (OImode, 8 words) and then the register allocator fails because ! there is no 8-register group beginning with a10.) */ #define RETURN_IN_MEMORY(TYPE) \ ((unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > 4 * UNITS_PER_WORD) *************** extern enum reg_class xtensa_char_to_cla *** 858,866 **** #define FUNCTION_ARG_REGNO_P(N) \ ((N) >= GP_OUTGOING_ARG_FIRST && (N) <= GP_OUTGOING_ARG_LAST) - /* Use IEEE floating-point format. */ - #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - /* Define a data type for recording info about an argument list during the scan of that argument list. This data type should hold all necessary information about the function itself --- 853,858 ---- *************** typedef struct xtensa_args { *** 1035,1042 **** xtensa_builtin_saveregs /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ ! xtensa_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ --- 1027,1034 ---- xtensa_builtin_saveregs /* Implement `va_start' for varargs and stdarg. */ ! #define EXPAND_BUILTIN_VA_START(valist, nextarg) \ ! xtensa_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ *************** typedef struct xtensa_args { *** 1128,1148 **** #define MAX_REGS_PER_ADDRESS 1 /* Identify valid Xtensa addresses. */ ! #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ do { \ ! rtx xinsn = (X); \ \ /* allow constant pool addresses */ \ if ((MODE) != BLKmode && GET_MODE_SIZE (MODE) >= UNITS_PER_WORD \ && constantpool_address_p (xinsn)) \ ! goto ADDR; \ \ while (GET_CODE (xinsn) == SUBREG) \ xinsn = SUBREG_REG (xinsn); \ \ /* allow base registers */ \ if (GET_CODE (xinsn) == REG && REG_OK_FOR_BASE_P (xinsn)) \ ! goto ADDR; \ \ /* check for "register + offset" addressing */ \ if (GET_CODE (xinsn) == PLUS) \ --- 1120,1140 ---- #define MAX_REGS_PER_ADDRESS 1 /* Identify valid Xtensa addresses. */ ! #define GO_IF_LEGITIMATE_ADDRESS(MODE, ADDR, LABEL) \ do { \ ! rtx xinsn = (ADDR); \ \ /* allow constant pool addresses */ \ if ((MODE) != BLKmode && GET_MODE_SIZE (MODE) >= UNITS_PER_WORD \ && constantpool_address_p (xinsn)) \ ! goto LABEL; \ \ while (GET_CODE (xinsn) == SUBREG) \ xinsn = SUBREG_REG (xinsn); \ \ /* allow base registers */ \ if (GET_CODE (xinsn) == REG && REG_OK_FOR_BASE_P (xinsn)) \ ! goto LABEL; \ \ /* check for "register + offset" addressing */ \ if (GET_CODE (xinsn) == PLUS) \ *************** typedef struct xtensa_args { *** 1173,1179 **** && code1 == CONST_INT \ && xtensa_mem_offset (INTVAL (xplus1), (MODE))) \ { \ ! goto ADDR; \ } \ } \ } while (0) --- 1165,1171 ---- && code1 == CONST_INT \ && xtensa_mem_offset (INTVAL (xplus1), (MODE))) \ { \ ! goto LABEL; \ } \ } \ } while (0) *************** typedef struct xtensa_args { *** 1246,1259 **** goto LABEL; \ } while (0) - /* If we are referencing a function that is static, make the SYMBOL_REF - special so that we can generate direct calls to it even with -fpic. */ - #define ENCODE_SECTION_INFO(DECL) \ - do { \ - if (TREE_CODE (DECL) == FUNCTION_DECL && ! TREE_PUBLIC (DECL)) \ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ - } while (0) - /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ #define CASE_VECTOR_MODE (SImode) --- 1238,1243 ---- *************** typedef struct xtensa_args { *** 1553,1584 **** goto FAIL; \ } while (0) ! /* This is how to output the definition of a user-level label named NAME, ! such as the label on a static function or variable NAME. */ ! #define ASM_OUTPUT_LABEL(STREAM, NAME) \ ! do { \ ! assemble_name (STREAM, NAME); \ ! fputs (":\n", STREAM); \ ! } while (0) ! ! /* This is how to output a command to make the user-level label named NAME ! defined for reference from other files. */ ! #define ASM_GLOBALIZE_LABEL(STREAM, NAME) \ ! do { \ ! fputs ("\t.global\t", STREAM); \ ! assemble_name (STREAM, NAME); \ ! fputs ("\n", STREAM); \ ! } while (0) ! ! /* This says how to define a global common symbol. */ ! #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ ! xtensa_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", (SIZE)) ! ! /* This says how to define a local common symbol (ie, not visible to ! linker). */ ! #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \ ! xtensa_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)) /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ --- 1537,1548 ---- goto FAIL; \ } while (0) + /* Globalizing directive for a label. */ + #define GLOBAL_ASM_OP "\t.global\t" ! /* Declare an uninitialized external linkage data object. */ ! #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ ! asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ *************** typedef struct xtensa_args { *** 1624,1631 **** /* Define the strings to put out for each section in the object file. */ ! #define TEXT_SECTION_ASM_OP "\t.text" /* instructions */ ! #define DATA_SECTION_ASM_OP "\t.data" /* large data */ /* Define output to appear before the constant pool. If the function --- 1588,1596 ---- /* Define the strings to put out for each section in the object file. */ ! #define TEXT_SECTION_ASM_OP "\t.text" ! #define DATA_SECTION_ASM_OP "\t.data" ! #define BSS_SECTION_ASM_OP "\t.section\t.bss" /* Define output to appear before the constant pool. If the function diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/xtensa.md gcc-3.3/gcc/config/xtensa/xtensa.md *** gcc-3.2.3/gcc/config/xtensa/xtensa.md 2003-03-12 21:11:40.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/xtensa.md 2003-03-12 21:06:29.000000000 +0000 *************** *** 47,53 **** ;; (define_attr "type" ! "unknown,branch,jump,call,load,store,move,arith,multi,nop,misc,farith,fmadd,fdiv,fsqrt,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr,udef_move,udef_loadi,udef_storei,udef_loadiu,udef_storeiu,udef_conv,udef_conv_loadiu,udef_conv_storeiu" (const_string "unknown")) (define_attr "mode" --- 47,53 ---- ;; (define_attr "type" ! "unknown,jump,call,load,store,move,arith,multi,nop,farith,fmadd,fdiv,fsqrt,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr" (const_string "unknown")) (define_attr "mode" *************** *** 136,142 **** (match_dup 0)))] "" "bgeu\\t%1, %2, 0f\;addi\\t%0, %0, 1\;0:" ! [(set_attr "type" "arith") (set_attr "mode" "SI") (set_attr "length" "6")]) --- 136,142 ---- (match_dup 0)))] "" "bgeu\\t%1, %2, 0f\;addi\\t%0, %0, 1\;0:" ! [(set_attr "type" "multi") (set_attr "mode" "SI") (set_attr "length" "6")]) *************** *** 155,161 **** (set_attr "mode" "SI") (set_attr "length" "2,2,3,3,3")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 2)) --- 155,161 ---- (set_attr "mode" "SI") (set_attr "length" "2,2,3,3,3")]) ! (define_insn "*addx2" [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 2)) *************** *** 166,172 **** (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 4)) --- 166,172 ---- (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "*addx4" [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 4)) *************** *** 177,183 **** (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 8)) --- 177,183 ---- (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "*addx8" [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 8)) *************** *** 235,241 **** (match_operand:SI 2 "register_operand" "r"))))] "" "bgeu\\t%1, %2, 0f\;addi\\t%0, %0, -1\;0:" ! [(set_attr "type" "arith") (set_attr "mode" "SI") (set_attr "length" "6")]) --- 235,241 ---- (match_operand:SI 2 "register_operand" "r"))))] "" "bgeu\\t%1, %2, 0f\;addi\\t%0, %0, -1\;0:" ! [(set_attr "type" "multi") (set_attr "mode" "SI") (set_attr "length" "6")]) *************** *** 249,255 **** (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=a") (minus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 2)) --- 249,255 ---- (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "*subx2" [(set (match_operand:SI 0 "register_operand" "=a") (minus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 2)) *************** *** 260,266 **** (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=a") (minus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 4)) --- 260,266 ---- (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "*subx4" [(set (match_operand:SI 0 "register_operand" "=a") (minus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 4)) *************** *** 271,277 **** (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=a") (minus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 8)) --- 271,277 ---- (set_attr "mode" "SI") (set_attr "length" "3")]) ! (define_insn "*subx8" [(set (match_operand:SI 0 "register_operand" "=a") (minus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 8)) *************** *** 436,442 **** (set_attr "mode" "SF") (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (div:SF (match_operand:SF 1 "const_float_1_operand" "") (match_operand:SF 2 "register_operand" "f")))] --- 436,442 ---- (set_attr "mode" "SF") (set_attr "length" "3")]) ! (define_insn "*recipsf2" [(set (match_operand:SF 0 "register_operand" "=f") (div:SF (match_operand:SF 1 "const_float_1_operand" "") (match_operand:SF 2 "register_operand" "f")))] *************** *** 493,499 **** (set_attr "mode" "SF") (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (div:SF (match_operand:SF 1 "const_float_1_operand" "") (sqrt:SF (match_operand:SF 2 "register_operand" "f"))))] --- 493,499 ---- (set_attr "mode" "SF") (set_attr "length" "3")]) ! (define_insn "*rsqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") (div:SF (match_operand:SF 1 "const_float_1_operand" "") (sqrt:SF (match_operand:SF 2 "register_operand" "f"))))] *************** *** 1147,1159 **** (set_attr "mode" "SF") (set_attr "length" "3,3,3,2,2,2,3,3,3,3,3,3")]) ! (define_insn "" ! [(parallel ! [(set (match_operand:SF 0 "register_operand" "=f") ! (mem:SF (plus:SI (match_operand:SI 1 "register_operand" "+a") ! (match_operand:SI 2 "fpmem_offset_operand" "i")))) ! (set (match_dup 1) ! (plus:SI (match_dup 1) (match_dup 2)))])] "TARGET_HARD_FLOAT" "* { --- 1147,1158 ---- (set_attr "mode" "SF") (set_attr "length" "3,3,3,2,2,2,3,3,3,3,3,3")]) ! (define_insn "*lsiu" ! [(set (match_operand:SF 0 "register_operand" "=f") ! (mem:SF (plus:SI (match_operand:SI 1 "register_operand" "+a") ! (match_operand:SI 2 "fpmem_offset_operand" "i")))) ! (set (match_dup 1) ! (plus:SI (match_dup 1) (match_dup 2)))] "TARGET_HARD_FLOAT" "* { *************** *** 1165,1177 **** (set_attr "mode" "SF") (set_attr "length" "3")]) ! (define_insn "" ! [(parallel ! [(set (mem:SF (plus:SI (match_operand:SI 0 "register_operand" "+a") ! (match_operand:SI 1 "fpmem_offset_operand" "i"))) ! (match_operand:SF 2 "register_operand" "f")) ! (set (match_dup 0) ! (plus:SI (match_dup 0) (match_dup 1)))])] "TARGET_HARD_FLOAT" "* { --- 1164,1175 ---- (set_attr "mode" "SF") (set_attr "length" "3")]) ! (define_insn "*ssiu" ! [(set (mem:SF (plus:SI (match_operand:SI 0 "register_operand" "+a") ! (match_operand:SI 1 "fpmem_offset_operand" "i"))) ! (match_operand:SF 2 "register_operand" "f")) ! (set (match_dup 0) ! (plus:SI (match_dup 0) (match_dup 1)))] "TARGET_HARD_FLOAT" "* { *************** *** 1276,1287 **** }") (define_insn "movstrsi_internal" ! [(parallel [(set (match_operand:BLK 0 "memory_operand" "=U") ! (match_operand:BLK 1 "memory_operand" "U")) ! (use (match_operand:SI 2 "arith_operand" "")) ! (use (match_operand:SI 3 "const_int_operand" "")) ! (clobber (match_scratch:SI 4 "=&r")) ! (clobber (match_scratch:SI 5 "=&r"))])] "" "* { --- 1274,1285 ---- }") (define_insn "movstrsi_internal" ! [(set (match_operand:BLK 0 "memory_operand" "=U") ! (match_operand:BLK 1 "memory_operand" "U")) ! (use (match_operand:SI 2 "arith_operand" "")) ! (use (match_operand:SI 3 "const_int_operand" "")) ! (clobber (match_scratch:SI 4 "=&r")) ! (clobber (match_scratch:SI 5 "=&r"))] "" "* { *************** *** 1554,1560 **** ;; Branch patterns for standard integer comparisons ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "branch_operator" [(match_operand:SI 0 "register_operand" "r,r") --- 1552,1558 ---- ;; Branch patterns for standard integer comparisons ! (define_insn "*btrue" [(set (pc) (if_then_else (match_operator 3 "branch_operator" [(match_operand:SI 0 "register_operand" "r,r") *************** *** 1608,1614 **** (set_attr "mode" "none") (set_attr "length" "3,3")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "branch_operator" [(match_operand:SI 0 "register_operand" "r,r") --- 1606,1612 ---- (set_attr "mode" "none") (set_attr "length" "3,3")]) ! (define_insn "*bfalse" [(set (pc) (if_then_else (match_operator 3 "branch_operator" [(match_operand:SI 0 "register_operand" "r,r") *************** *** 1662,1668 **** (set_attr "mode" "none") (set_attr "length" "3,3")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "ubranch_operator" [(match_operand:SI 0 "register_operand" "r,r") --- 1660,1666 ---- (set_attr "mode" "none") (set_attr "length" "3,3")]) ! (define_insn "*ubtrue" [(set (pc) (if_then_else (match_operator 3 "ubranch_operator" [(match_operand:SI 0 "register_operand" "r,r") *************** *** 1697,1703 **** (set_attr "mode" "none") (set_attr "length" "3,3")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "ubranch_operator" [(match_operand:SI 0 "register_operand" "r,r") --- 1695,1701 ---- (set_attr "mode" "none") (set_attr "length" "3,3")]) ! (define_insn "*ubfalse" [(set (pc) (if_then_else (match_operator 3 "ubranch_operator" [(match_operand:SI 0 "register_operand" "r,r") *************** *** 1734,1740 **** ;; Branch patterns for bit testing ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(zero_extract:SI --- 1732,1738 ---- ;; Branch patterns for bit testing ! (define_insn "*bittrue" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(zero_extract:SI *************** *** 1774,1780 **** (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(zero_extract:SI --- 1772,1778 ---- (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "*bitfalse" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(zero_extract:SI *************** *** 1814,1820 **** (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(and:SI (match_operand:SI 0 "register_operand" "r") --- 1812,1818 ---- (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "*masktrue" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(and:SI (match_operand:SI 0 "register_operand" "r") *************** *** 1838,1844 **** (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(and:SI (match_operand:SI 0 "register_operand" "r") --- 1836,1842 ---- (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "*maskfalse" [(set (pc) (if_then_else (match_operator 3 "boolean_operator" [(and:SI (match_operand:SI 0 "register_operand" "r") *************** *** 1869,1881 **** ;; since since loop end is handled in hardware. (define_insn "zero_cost_loop_start" ! [(parallel [(set (pc) (if_then_else (eq (match_operand:SI 0 "register_operand" "a") ! (const_int 0)) ! (label_ref (match_operand 1 "" "")) ! (pc))) ! (set (reg:SI 19) ! (plus:SI (match_dup 0) ! (const_int -1)))])] "" "loopnez %0, %l1" [(set_attr "type" "jump") --- 1867,1878 ---- ;; since since loop end is handled in hardware. (define_insn "zero_cost_loop_start" ! [(set (pc) (if_then_else (eq (match_operand:SI 0 "register_operand" "a") ! (const_int 0)) ! (label_ref (match_operand 1 "" "")) ! (pc))) ! (set (reg:SI 19) ! (plus:SI (match_dup 0) (const_int -1)))] "" "loopnez %0, %l1" [(set_attr "type" "jump") *************** *** 1883,1895 **** (set_attr "length" "3")]) (define_insn "zero_cost_loop_end" ! [(parallel [(set (pc) (if_then_else (ne (reg:SI 19) ! (const_int 0)) ! (label_ref (match_operand 0 "" "")) ! (pc))) ! (set (reg:SI 19) ! (plus:SI (reg:SI 19) ! (const_int -1)))])] "" "* xtensa_emit_loop_end (insn, operands); --- 1880,1890 ---- (set_attr "length" "3")]) (define_insn "zero_cost_loop_end" ! [(set (pc) (if_then_else (ne (reg:SI 19) (const_int 0)) ! (label_ref (match_operand 0 "" "")) ! (pc))) ! (set (reg:SI 19) ! (plus:SI (reg:SI 19) (const_int -1)))] "" "* xtensa_emit_loop_end (insn, operands); *************** *** 2427,2433 **** ;; The preceding splitter needs something to split the insn into; ;; things start breaking if the result is just a "use" so instead we ;; generate the following insn. ! (define_insn "" [(unspec [(const_int 0)] UNSPEC_NOP)] "" "" --- 2422,2428 ---- ;; The preceding splitter needs something to split the insn into; ;; things start breaking if the result is just a "use" so instead we ;; generate the following insn. ! (define_insn "*unspec_nop" [(unspec [(const_int 0)] UNSPEC_NOP)] "" "" *************** srli\\t%3, %3, 30\;slli\\t%0, %1, 2\;ssa *** 2462,2468 **** ;; branch patterns ! (define_insn "" [(set (pc) (if_then_else (match_operator 2 "boolean_operator" [(match_operand:CC 0 "register_operand" "b") --- 2457,2463 ---- ;; branch patterns ! (define_insn "*booltrue" [(set (pc) (if_then_else (match_operator 2 "boolean_operator" [(match_operand:CC 0 "register_operand" "b") *************** srli\\t%3, %3, 30\;slli\\t%0, %1, 2\;ssa *** 2481,2487 **** (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 2 "boolean_operator" [(match_operand:CC 0 "register_operand" "b") --- 2476,2482 ---- (set_attr "mode" "none") (set_attr "length" "3")]) ! (define_insn "*boolfalse" [(set (pc) (if_then_else (match_operator 2 "boolean_operator" [(match_operand:CC 0 "register_operand" "b") diff -Nrc3pad gcc-3.2.3/gcc/config/xtensa/xtensa-protos.h gcc-3.3/gcc/config/xtensa/xtensa-protos.h *** gcc-3.2.3/gcc/config/xtensa/xtensa-protos.h 2002-11-22 19:27:42.000000000 +0000 --- gcc-3.3/gcc/config/xtensa/xtensa-protos.h 2003-04-26 00:24:09.000000000 +0000 *************** *** 1,5 **** /* Prototypes of target machine for GNU compiler for Xtensa. ! Copyright 2001,2002 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. --- 1,5 ---- /* Prototypes of target machine for GNU compiler for Xtensa. ! Copyright 2001,2002,2003 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. *************** extern char * xtensa_emit_call PARAMS (( *** 78,84 **** #ifdef TREE_CODE extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx)); ! extern void xtensa_va_start PARAMS ((int, tree, rtx)); extern rtx xtensa_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ --- 78,84 ---- #ifdef TREE_CODE extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx)); ! extern void xtensa_va_start PARAMS ((tree, rtx)); extern rtx xtensa_va_arg PARAMS ((tree, tree)); #endif /* TREE_CODE */ *************** extern int xtensa_mem_offset PARAMS ((un *** 109,116 **** extern void xtensa_setup_frame_addresses PARAMS ((void)); extern int xtensa_dbx_register_number PARAMS ((int)); extern void override_options PARAMS ((void)); - extern void xtensa_declare_object - PARAMS ((FILE *, char *, char *, char *, int)); extern long compute_frame_size PARAMS ((int)); extern int xtensa_frame_pointer_required PARAMS ((void)); extern void xtensa_function_prologue PARAMS ((FILE *, int)); --- 109,114 ---- diff -Nrc3pad gcc-3.2.3/gcc/config.gcc gcc-3.3/gcc/config.gcc *** gcc-3.2.3/gcc/config.gcc 2003-02-28 18:38:19.000000000 +0000 --- gcc-3.3/gcc/config.gcc 2003-04-29 18:47:04.000000000 +0000 *************** *** 45,50 **** --- 45,52 ---- # # cpu_type The name of the cpu, if different from machine. # + # tm_defines List of target macros to define for all compilations. + # # tm_file A list of target macro files, if different from # "$cpu_type/$cpu_type.h". Usually it's constructed # per target in a way like this: *************** *** 69,79 **** # makefile-fragments, if different from # "$cpu_type/t-$cpu_type". # ! # float_format Set to the symbolic name for the floating-point ! # formats used for this machine, if different from ! # "i64". Used to derive a header file name to ! # include, like "vax" for "float-vax.h". If no such ! # file is wanted, set to "none". # # extra_objs List of extra objects that should be linked into # the compiler proper (cc1, cc1obj, cc1plus) --- 71,79 ---- # makefile-fragments, if different from # "$cpu_type/t-$cpu_type". # ! # extra_modes The name of the file containing a list of extra ! # machine modes, if necessary and different from ! # "$cpu_type/$cpu_type-modes.def". # # extra_objs List of extra objects that should be linked into # the compiler proper (cc1, cc1obj, cc1plus) *************** *** 104,109 **** --- 104,111 ---- # cxx_target_objs List of extra target-dependent objects that be # linked into the C++ compiler only. # + # target_gtfiles List of extra source files with type information. + # # build_xm_defines List of macros to define when compiling for the # build machine. # *************** extra_host_objs= *** 184,191 **** extra_gcc_objs= c_target_objs= cxx_target_objs= xm_defines= - float_format= # Set this to force installation and use of collect2. use_collect2= # Set this to override the default target model. --- 186,193 ---- extra_gcc_objs= c_target_objs= cxx_target_objs= + tm_defines= xm_defines= # Set this to force installation and use of collect2. use_collect2= # Set this to override the default target model. *************** thread_file= *** 206,276 **** gas="$gas_flag" gnu_ld="$gnu_ld_flag" enable_threads=$enable_threads_flag # Obsolete configurations. - # To avoid some tedious lists, we have a blacklist with a whitelist - # embedded within it. case $machine in ! 1750a-* \ ! | a29k-* \ ! | alpha*-*-osf[123]* \ ! | arm-*-riscix* \ ! | c*-convex-* \ ! | clipper-* \ ! | elxsi-* \ ! | i860-* \ ! | i?86-*-aix* \ ! | i?86-*-bsd* \ ! | i?86-*-chorusos* \ ! | i?86-*-dgux* \ ! | i?86-*-freebsd1.* \ ! | i?86-*-isc* \ ! | i?86-*-linux*oldld* \ ! | i?86-*-osf1* \ ! | i?86-*-osfrose* \ ! | i?86-*-rtemscoff* \ ! | i?86-*-sunos* \ ! | i?86-go32-rtems* \ ! | i?86-next-* \ ! | i?86-sequent-bsd* \ ! | i?86-sequent-ptx[12]* \ ! | i?86-sequent-sysv3* \ ! | m68[k0]*-*-lynxos* \ ! | m68[k0]*-*-rtemscoff* \ ! | m68[k0]*-*-sysv3* \ ! | m68[k0]*-altos-* \ ! | m68[k0]*-apollo-* \ ! | m68[k0]*-apple-* \ ! | m68[k0]*-bull-* \ ! | m68[k0]*-convergent-* \ ! | m68[k0]*-isi-* \ ! | m68[k0]*-next-* \ ! | m68[k0]*-sony-* \ ! | m88k-* \ ! | mips-*-bsd* \ ! | mips-*-riscos* \ ! | mips-*-sysv* \ ! | mips-*-ultrix* \ ! | mips-dec-* \ ! | mips-sgi-irix[1234]* \ ! | mips-sony-* \ ! | mips-tandem-* \ ! | ns32k-* \ ! | pj-* \ ! | pjl-* \ ! | romp-* \ ! | sparc-*-rtemsaout* \ ! | we32k-* \ ! ) ! case $machine in ! mips-sni-sysv4 \ ! | m88k-*-aout* | m88k-*-openbsd* | m88k-*-sysv4* \ ! | ns32k-*-netbsd* | ns32k-*-openbsd* \ ! | romp-*-openbsd* \ ! ) ! # Whitelisted. ! ;; ! *) if test "x$enable_obsolete" != xyes; then echo "*** Configuration $machine is obsolete." >&2 echo "*** Specify --enable-obsolete to build it anyway." >&2 --- 208,274 ---- gas="$gas_flag" gnu_ld="$gnu_ld_flag" enable_threads=$enable_threads_flag + target_gtfiles= # Obsolete configurations. case $machine in ! m88k-*-* \ ! | mn10200-*-* \ ! | romp-*-* \ ! | alpha*-*-interix* \ ! | alpha*-*-linux*libc1* \ ! | alpha*-*-linux*ecoff* \ ! | arm*-*-aout* \ ! | arm*-*-conix* \ ! | arm*-*-oabi \ ! | strongarm-*-coff* \ ! | hppa1.0-*-osf* \ ! | hppa1.0-*-bsd* \ ! | hppa1.[01]-*-hpux[789]* \ ! | hppa*-*-hiux* \ ! | hppa*-*-lites* \ ! | i?86-*-win32 \ ! | m68000-hp-bsd* \ ! | m68000-sun-sunos* \ ! | m68000-att-sysv* \ ! | m68k-atari-sysv* \ ! | m68k-motorola-sysv* \ ! | m68k-ncr-sysv* \ ! | m68k-plexus-sysv* \ ! | m68k-tti-* \ ! | m68k-crds-unos* \ ! | m68k-cbm-sysv* \ ! | m68k-ccur-rtu* \ ! | m68k-hp-bsd* \ ! | m68k-sun-mach* \ ! | m68k-sun-sunos* \ ! | m68k-*-linux*aout* \ ! | m68k-*-linux*libc1* \ ! | m68k-*-psos* \ ! | mips*-*-ecoff* \ ! | mips-sni-sysv4 \ ! | mips64orion-*-rtems* \ ! | ns32k-*-openbsd* \ ! | powerpc*-*-sysv* \ ! | powerpc*-*-linux*libc1* \ ! | rs6000-ibm-aix[123]* \ ! | rs6000-bull-bosx \ ! | rs6000-*-mach* \ ! | sparc-*-aout* \ ! | sparc-*-netbsd*aout* \ ! | sparc-*-bsd* \ ! | sparc-*-chorusos* \ ! | sparc-*-linux*aout* \ ! | sparc-*-linux*libc1* \ ! | sparc-*-lynxos* \ ! | sparc-hal-solaris2* \ ! | sparc-*-sunos[34]* \ ! | sparclet-*-aout* \ ! | sparclite-*-aout* \ ! | sparc86x-*-aout* \ ! | v850-*-rtems* \ ! | vax-*-vms* \ ! ) if test "x$enable_obsolete" != xyes; then echo "*** Configuration $machine is obsolete." >&2 echo "*** Specify --enable-obsolete to build it anyway." >&2 *************** case $machine in *** 278,284 **** echo "*** unless a maintainer comes forward." >&2 exit 1 fi;; - esac esac # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be --- 276,281 ---- *************** arm*-*-*) *** 299,308 **** xscale-*-*) cpu_type=arm ;; - c*-convex-*) - cpu_type=convex - extra_headers=proto.h - ;; i[34567]86-*-*) cpu_type=i386 extra_headers="mmintrin.h xmmintrin.h" --- 296,301 ---- *************** m68k-*-*) *** 327,345 **** mips*-*-*) cpu_type=mips ;; - pj*-*-*) - cpu_type=pj - ;; powerpc*-*-*) cpu_type=rs6000 ! extra_headers="ppc-asm.h altivec.h" ;; sparc*-*-*) cpu_type=sparc ;; ! sh64-*-*) cpu_type=sh ;; esac tm_file=${cpu_type}/${cpu_type}.h --- 320,339 ---- mips*-*-*) cpu_type=mips ;; powerpc*-*-*) cpu_type=rs6000 ! extra_headers="ppc-asm.h altivec.h spe.h" ;; sparc*-*-*) cpu_type=sparc ;; ! # Note the 'l'; we need to be able to match e.g. "shle" or "shl". ! sh[123456789l]*-*-*) cpu_type=sh ;; + tic4x-*-*) + cpu_type=c4x + ;; esac tm_file=${cpu_type}/${cpu_type}.h *************** if test -f ${srcdir}/config/${cpu_type}/ *** 347,352 **** --- 341,351 ---- then tm_p_file=${cpu_type}/${cpu_type}-protos.h fi + extra_modes= + if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def + then + extra_modes=${cpu_type}/${cpu_type}-modes.def + fi case $machine in x86_64-*-*) *************** case $machine in *** 369,374 **** --- 368,375 ---- *-*-linux*ecoff* | *-*-linux*libc1* | *-*-linux*oldld* | *-*-linux*aout*) ;; *) + extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" + gas=yes gnu_ld=yes case x${enable_threads} in x | xyes | xposix) thread_file='posix' ;; *************** case $machine in *** 392,399 **** # But here we need a little extra magic. tmake_file="t-slibgcc-elf-ver t-linux t-gnu" case $machine in i[34567]86-*-*) ! tm_file="${cpu_type}/${cpu_type}.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}" ;; esac ;; --- 393,403 ---- # But here we need a little extra magic. tmake_file="t-slibgcc-elf-ver t-linux t-gnu" case $machine in + alpha*) + tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}" + ;; i[34567]86-*-*) ! tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}" ;; esac ;; *************** case $machine in *** 411,416 **** --- 415,446 ---- xm_defines=POSIX gas=yes gnu_ld=yes + + # NetBSD 2.0 and later get POSIX threads enabled by default. + # Allow them to be explicitly enabled on any other version. + case x${enable_threads} in + x) + case $machine in + *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*) + thread_file='posix' + tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS" + ;; + esac + ;; + xyes | xposix) + thread_file='posix' + tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS" + ;; + esac + + # NetBSD 1.7 and later are set up to use GCC's crtstuff for + # ELF configurations. We will clear extra_parts in the + # a.out configurations. + case $machine in + *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*) + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" + ;; + esac ;; *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*) # This is the place-holder for the generic a.out configuration *************** case $machine in *** 483,521 **** then tmake_file=${cpu_type}/t-$rest fi ;; - 1750a-*-*) - # 1750a is only supported as a target. - case "$build,$host" in 1750a*,* | *,1750a* ) - echo "*** $machine is only supported as a target" >&2 - exit 1 - esac - ;; - a29k-*-bsd* | a29k-*-sym1*) - tm_file="${tm_file} a29k/unix.h" - xm_defines=POSIX - use_collect2=yes - ;; - a29k-*-udi | a29k-*-coff) - tm_file="${tm_file} dbxcoff.h" - tmake_file=a29k/t-a29kbare - ;; - a29k*-*-rtems*) - xm_defines=POSIX - tm_file="a29k/a29k.h a29k/rtems.h rtems.h" - tmake_file="a29k/t-a29kbare t-rtems" - if test x$enable_threads = xyes; then - thread_file='rtems' - fi - ;; - a29k-wrs-vxworks*) - tm_file="${tm_file} dbxcoff.h a29k/vx29k.h" - tmake_file=a29k/t-vx29k - extra_parts="crtbegin.o crtend.o" - thread_file='vxworks' - ;; - a29k-*-*) # Default a29k environment. - use_collect2=yes - ;; alpha*-*-unicosmk*) use_collect2=yes tm_file="${tm_file} alpha/unicosmk.h" --- 513,518 ---- *************** alpha-*-interix) *** 546,556 **** #local_prefix='$$INTERIX_ROOT'/usr/contrib ;; alpha*-*-linux*ecoff*) ! tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h" ! target_cpu_default="MASK_GAS" ! tmake_file="alpha/t-alpha alpha/t-ieee" ! gas=no ! gas=yes gnu_ld=yes ;; alpha*-*-linux*libc1*) tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h" --- 543,550 ---- #local_prefix='$$INTERIX_ROOT'/usr/contrib ;; alpha*-*-linux*ecoff*) ! echo "Configuration $machine no longer supported" 1>&2 ! exit 1 ;; alpha*-*-linux*libc1*) tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h" *************** alpha*-*-linux*) *** 566,573 **** tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h" target_cpu_default="MASK_GAS" tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtfm alpha/t-alpha alpha/t-ieee" ! extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" ! gas=yes gnu_ld=yes ;; alpha*-*-freebsd*) tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h" --- 560,569 ---- tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h" target_cpu_default="MASK_GAS" tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtfm alpha/t-alpha alpha/t-ieee" ! ;; ! alpha*-*-gnu*) ! target_cpu_default="MASK_GAS" ! tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee" ;; alpha*-*-freebsd*) tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h" *************** alpha*-*-netbsd*) *** 582,593 **** ;; alpha*-*-openbsd*) # default x-alpha is only appropriate for dec-osf. target_cpu_default="MASK_GAS" tmake_file="alpha/t-alpha alpha/t-ieee" ;; ! alpha*-dec-osf*) xm_defines=POSIX if test x$stabs = xyes then --- 578,590 ---- ;; alpha*-*-openbsd*) + tm_file="${cpu_type}/${cpu_type}.h ${tm_file}" # default x-alpha is only appropriate for dec-osf. target_cpu_default="MASK_GAS" tmake_file="alpha/t-alpha alpha/t-ieee" ;; ! alpha*-dec-osf[45]*) xm_defines=POSIX if test x$stabs = xyes then *************** alpha*-dec-osf*) *** 598,627 **** extra_passes="mips-tfile mips-tdump" fi use_collect2=yes ! tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm" extra_headers=va_list.h case $machine in - *-*-osf1*) - tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h" - ;; - *-*-osf[23]*) - tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h" - ;; *-*-osf4*) - tm_file="${tm_file} alpha/osf.h" - tmake_file="$tmake_file alpha/t-osf4" # Some versions of OSF4 (specifically X4.0-9 296.7) have # a broken tar, so we use cpio instead. install_headers_dir=install-headers-cpio ;; *-*-osf5*) ! tm_file="${tm_file} alpha/osf.h alpha/osf5.h" ! tmake_file="$tmake_file alpha/t-osf4" ! float_format=i128 ! ;; ! esac ! case $machine in ! *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5*) target_cpu_default=MASK_SUPPORT_ARCH ;; esac --- 595,616 ---- extra_passes="mips-tfile mips-tdump" fi use_collect2=yes ! tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4" ! tm_file="${tm_file} alpha/osf.h" extra_headers=va_list.h case $machine in *-*-osf4*) # Some versions of OSF4 (specifically X4.0-9 296.7) have # a broken tar, so we use cpio instead. install_headers_dir=install-headers-cpio + # Set target_cpu_default except on 4.0a. + case $machine in + *-*-osf4.0a) ;; + *) target_cpu_default=MASK_SUPPORT_ARCH + esac ;; *-*-osf5*) ! tm_file="${tm_file} alpha/osf5.h" target_cpu_default=MASK_SUPPORT_ARCH ;; esac *************** alpha*-*-vxworks*) *** 639,645 **** ;; alpha64-dec-*vms*) xm_defines=POSIX ! tm_file="alpha/vms.h alpha/vms64.h" xm_file="alpha/xm-vms.h alpha/xm-vms64.h" tmake_file="alpha/t-alpha alpha/t-vms alpha/t-vms64 alpha/t-ieee" xmake_file=alpha/x-vms --- 628,634 ---- ;; alpha64-dec-*vms*) xm_defines=POSIX ! tm_file="${tm_file} alpha/vms.h alpha/vms64.h" xm_file="alpha/xm-vms.h alpha/xm-vms64.h" tmake_file="alpha/t-alpha alpha/t-vms alpha/t-vms64 alpha/t-ieee" xmake_file=alpha/x-vms *************** alpha64-dec-*vms*) *** 657,663 **** ;; alpha*-dec-*vms*) xm_defines=POSIX ! tm_file=alpha/vms.h xm_file=alpha/xm-vms.h tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee" xmake_file=alpha/x-vms --- 646,652 ---- ;; alpha*-dec-*vms*) xm_defines=POSIX ! tm_file="${tm_file} alpha/vms.h" xm_file=alpha/xm-vms.h tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee" xmake_file=alpha/x-vms *************** arm-*-vxworks*) *** 686,705 **** tmake_file=arm/t-arm-coff thread_file='vxworks' ;; - arm-*-riscix1.[01]*) # Acorn RISC machine (early versions) - tm_file="arm/riscix1-1.h arm/arm.h" - use_collect2=yes - ;; - arm-*-riscix*) # Acorn RISC machine - if test x$gas = xyes - then - tm_file="arm/riscix.h arm/rix-gas.h arm/arm.h" - else - tm_file="arm/riscix.h arm/arm.h" - fi - tmake_file=arm/t-riscix - use_collect2=yes - ;; arm-semi-aout | armel-semi-aout) tm_file="arm/semi.h arm/aout.h arm/arm.h" tmake_file=arm/t-semi --- 675,680 ---- *************** arm*-*-freebsd*|strongarm*-*-freebsd*) *** 713,723 **** tmake_file="${tmake_file} arm/t-strongarm-elf" ;; arm*-*-netbsdelf*) ! echo "GCC does not yet support the ${machine} target"; exit 1 ;; arm*-*-netbsd*) tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h" tmake_file="t-netbsd arm/t-netbsd" use_collect2=yes ;; arm*-*-linux*) # ARM GNU/Linux with ELF --- 688,700 ---- tmake_file="${tmake_file} arm/t-strongarm-elf" ;; arm*-*-netbsdelf*) ! tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h" ! tmake_file="${tmake_file} arm/t-netbsd" ;; arm*-*-netbsd*) tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h" tmake_file="t-netbsd arm/t-netbsd" + extra_parts="" use_collect2=yes ;; arm*-*-linux*) # ARM GNU/Linux with ELF *************** arm-*-pe*) *** 770,796 **** ;; avr-*-*) ;; ! c1-convex-*) # Convex C1 ! target_cpu_default=1 ! use_collect2=yes ! ;; ! c2-convex-*) # Convex C2 ! target_cpu_default=2 ! use_collect2=yes ! ;; ! c32-convex-*) ! target_cpu_default=4 ! use_collect2=yes ! ;; ! c34-convex-*) ! target_cpu_default=8 ! use_collect2=yes ! ;; ! c38-convex-*) ! target_cpu_default=16 ! use_collect2=yes ! ;; ! c4x-*-rtems*) xm_defines=POSIX tmake_file="c4x/t-c4x t-rtems" tm_file="c4x/c4x.h c4x/rtems.h rtems.h" --- 747,753 ---- ;; avr-*-*) ;; ! c4x-*-rtems* | tic4x-*-rtems*) xm_defines=POSIX tmake_file="c4x/t-c4x t-rtems" tm_file="c4x/c4x.h c4x/rtems.h rtems.h" *************** c4x-*-rtems*) *** 800,817 **** c_target_objs="c4x-c.o" cxx_target_objs="c4x-c.o" ;; ! c4x-*) ! float_format=c4x tmake_file=c4x/t-c4x c_target_objs="c4x-c.o" cxx_target_objs="c4x-c.o" ;; - clipper-intergraph-clix*) - tm_file="${tm_file} svr3.h clipper/clix.h" - xm_defines=POSIX - extra_parts="crtbegin.o crtend.o" - install_headers_dir=install-headers-cpio - ;; cris-*-aout) tm_file="dbxelf.h ${tm_file} cris/aout.h" gas=yes --- 757,767 ---- c_target_objs="c4x-c.o" cxx_target_objs="c4x-c.o" ;; ! c4x-* | tic4x-*) tmake_file=c4x/t-c4x c_target_objs="c4x-c.o" cxx_target_objs="c4x-c.o" ;; cris-*-aout) tm_file="dbxelf.h ${tm_file} cris/aout.h" gas=yes *************** cris-*-elf | cris-*-none) *** 825,852 **** cris-*-linux*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - case x${enable_threads} in - x | xyes | xpthreads | xposix) - thread_file=posix - ;; - esac - gas=yes ;; d30v-*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" - float_format=i64 ;; dsp16xx-*) ;; - elxsi-elxsi-*) - use_collect2=yes - ;; fr30-*-elf) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" tmake_file=fr30/t-fr30 extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;; h8300-*-rtems*) xm_defines=POSIX tmake_file="h8300/t-h8300 t-rtems" --- 775,795 ---- cris-*-linux*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux" ;; d30v-*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" ;; dsp16xx-*) ;; fr30-*-elf) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" tmake_file=fr30/t-fr30 extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;; + frv-*-elf) + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} frv/frv-abi.h" + tmake_file=frv/t-frv + ;; h8300-*-rtems*) xm_defines=POSIX tmake_file="h8300/t-h8300 t-rtems" *************** h8300-*-rtems*) *** 854,883 **** if test x$enable_threads = xyes; then thread_file='rtems' fi - float_format=i32 ;; h8300-*-elf*) tmake_file="h8300/t-h8300 h8300/t-elf" tm_file="h8300/h8300.h h8300/elf.h" - float_format=i32 ;; h8300-*-*) - float_format=i32 ;; hppa*64*-*-linux* | parisc*64*-*-linux*) target_cpu_default="(MASK_PA_11 | MASK_PA_20)" ! tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \ ! pa/pa64-regs.h pa/pa-64.h pa/pa64-linux.h" tmake_file=pa/t-linux64 gas=yes gnu_ld=yes ;; hppa*-*-linux* | parisc*-*-linux*) ! target_cpu_default="MASK_PA_11" tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \ pa/pa32-regs.h pa/pa32-linux.h" tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gas=yes gnu_ld=yes ;; hppa*-*-openbsd*) target_cpu_default="MASK_PA_11" --- 797,821 ---- if test x$enable_threads = xyes; then thread_file='rtems' fi ;; h8300-*-elf*) tmake_file="h8300/t-h8300 h8300/t-elf" tm_file="h8300/h8300.h h8300/elf.h" ;; h8300-*-*) ;; hppa*64*-*-linux* | parisc*64*-*-linux*) target_cpu_default="(MASK_PA_11 | MASK_PA_20)" ! tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \ ! pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h pa/pa64-linux.h" tmake_file=pa/t-linux64 gas=yes gnu_ld=yes ;; hppa*-*-linux* | parisc*-*-linux*) ! target_cpu_default="MASK_PA_11 | MASK_NO_SPACE_REGS" tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \ pa/pa32-regs.h pa/pa32-linux.h" tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux" ;; hppa*-*-openbsd*) target_cpu_default="MASK_PA_11" *************** hppa1.0-*-hpux8*) *** 973,979 **** hppa1.1-*-hpux10* | hppa2*-*-hpux10*) target_cpu_default="MASK_PA_11" tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h" - float_format=i128 xm_defines=POSIX tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib" xmake_file="pa/x-ada" --- 911,916 ---- *************** hppa1.1-*-hpux10* | hppa2*-*-hpux10*) *** 990,996 **** ;; hppa1.0-*-hpux10*) tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h" - float_format=i128 xm_defines=POSIX tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib" xmake_file="pa/x-ada" --- 927,932 ---- *************** hppa1.0-*-hpux10*) *** 1007,1018 **** ;; hppa*64*-*-hpux11*) xm_defines=POSIX ! tm_file="pa/pa64-start.h ${tm_file} pa/pa64-regs.h pa/long_double.h pa/elf.h pa/pa-hpux.h pa/pa-hpux11.h pa/pa-64.h pa/pa64-hpux.h" ! float_format=i128 tmake_file="pa/t-pa64 pa/t-pa-hpux" xmake_file="pa/x-ada" target_cpu_default="(MASK_PA_11|MASK_PA_20|MASK_GAS)" ! # if [ x$enable_threads = x ]; then # enable_threads=$have_pthread_h # fi --- 943,966 ---- ;; hppa*64*-*-hpux11*) xm_defines=POSIX ! if test x$gas = xyes ! then ! tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \ ! pa/pa64-regs.h pa/long_double.h pa/pa-hpux.h \ ! pa/pa-hpux11.h pa/pa-64.h pa/pa64-hpux.h" ! else ! tm_file="pa/pa64-start.h ${tm_file} dbxelf.h pa/elf.h \ ! pa/pa64-regs.h pa/long_double.h pa/pa-hpux.h \ ! pa/pa-hpux11.h pa/pa-64.h pa/pa64-hpux.h" ! fi tmake_file="pa/t-pa64 pa/t-pa-hpux" xmake_file="pa/x-ada" target_cpu_default="(MASK_PA_11|MASK_PA_20|MASK_GAS)" ! extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" ! if test x$gnu_ld = xyes ! then ! target_cpu_default="${target_cpu_default}|MASK_GNU_LD" ! fi # if [ x$enable_threads = x ]; then # enable_threads=$have_pthread_h # fi *************** hppa*64*-*-hpux11*) *** 1021,1032 **** # tmake_file="${tmake_file} pa/t-dce-thr" # fi install_headers_dir=install-headers-cpio - use_collect2=yes ;; hppa1.1-*-hpux11* | hppa2*-*-hpux11*) target_cpu_default="MASK_PA_11" tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h" - float_format=i128 xm_defines=POSIX tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib" xmake_file="pa/x-ada" --- 969,978 ---- *************** hppa1.1-*-hpux11* | hppa2*-*-hpux11*) *** 1042,1048 **** ;; hppa1.0-*-hpux11*) tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h" - float_format=i128 xm_defines=POSIX tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib" xmake_file="pa/x-ada" --- 988,993 ---- *************** i370-*-linux*) *** 1119,1313 **** tm_file="dbxelf.h elfos.h svr4.h linux.h i370/linux.h ${tm_file}" tmake_file="t-slibgcc-elf-ver t-linux" # broken_install=yes - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - # extra_parts="crtbegin.o crtend.o" - gnu_ld=yes - gas=yes elf=yes ;; ! i[34567]86-*-chorusos*) ! xm_defines=POSIX ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h i386/i386elf.h chorus.h" ! tmake_file="i386/t-i386elf t-svr4" ! case x${enable_threads} in ! xyes | xpthreads | xposix) ! thread_file='posix' ! ;; ! esac ;; i[34567]86-*-elf*) xm_defines=POSIX ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h i386/i386elf.h" tmake_file="i386/t-i386elf t-svr4" ;; - i[34567]86-ibm-aix*) # IBM PS/2 running AIX - if test x$gas = xyes - then - tm_file=i386/aix386.h - extra_parts="crtbegin.o crtend.o" - tmake_file=i386/t-crtstuff - else - tm_file=i386/aix386ng.h - use_collect2=yes - fi - xm_defines=POSIX - ;; i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4 xm_defines="POSIX SMALL_ARG_MAX" if test x$stabs = xyes -a x$gas = xyes then tm_file=i386/sysv4gdb.h else ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h" fi extra_parts="crtbegin.o crtend.o" tmake_file=i386/t-crtpic ;; - i[34567]86-next-*) - tm_p_file="${tm_p_file} nextstep-protos.h" - tm_file=i386/next.h - tmake_file=i386/t-next - extra_objs=nextstep.o - extra_parts="crtbegin.o crtend.o" - if test x$enable_threads = xyes; then - thread_file='mach' - fi - ;; i[34567]86-*-netware) # Intel 80386's running netware ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h netware.h i386/netware.h" tmake_file=i386/t-netware ;; - i[34567]86-sequent-bsd*) # 80386 from Sequent - use_collect2=yes - if test x$gas = xyes - then - tm_file=i386/seq-gas.h - else - tm_file=i386/sequent.h - fi - ;; - i[34567]86-sequent-ptx1*) - xm_defines=POSIX - tm_file=i386/seq-sysv3.h - tmake_file=i386/t-crtstuff - extra_parts="crtbegin.o crtend.o" - install_headers_dir=install-headers-cpio - ;; - i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*) - xm_defines=POSIX - tm_file=i386/seq2-sysv3.h - tmake_file=i386/t-crtstuff - extra_parts="crtbegin.o crtend.o" - install_headers_dir=install-headers-cpio - ;; i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*) if test x$gas = xyes then tm_file="${tm_file} usegas.h" fi xm_defines="POSIX SMALL_ARG_MAX" ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h" tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" install_headers_dir=install-headers-cpio ;; ! i386-sun-sunos*) # Sun i386 roadrunner ! xm_defines=POSIX ! tm_file=i386/sun.h ! use_collect2=yes ;; i[34567]86-wrs-vxworks*) ! tm_file=i386/vxi386.h thread_file='vxworks' ;; i[34567]86-*-aout*) ! tm_file=i386/i386-aout.h ;; i[34567]86-*-beoself* | i[34567]86-*-beos*) xm_defines=POSIX tmake_file='i386/t-beos i386/t-crtpic' ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/beos-elf.h" extra_parts='crtbegin.o crtend.o' ;; ! i[34567]86-*-bsdi* | i[34567]86-*-bsd386*) ! tm_file="i386/386bsd.h i386/bsd386.h" ! # tmake_file=t-libc-ok ! ;; ! i[34567]86-*-bsd*) ! tm_file=i386/386bsd.h ! # tmake_file=t-libc-ok ! # Next line turned off because both 386BSD and BSD/386 use GNU ld. ! # use_collect2=yes ! ;; ! i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aout*) ! tm_file=i386/freebsd-aout.h tmake_file=t-freebsd ;; i[34567]86-*-freebsd*) ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" ;; x86_64-*-freebsd*) ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" ;; i[34567]86-*-netbsdelf*) ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" ! float_format=i386 ;; i[34567]86-*-netbsd*) ! tm_file=i386/netbsd.h tmake_file=t-netbsd use_collect2=yes ;; x86_64-*-netbsd*) ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" ! float_format=i386 ;; i[34567]86-*-openbsd*) # needed to unconfuse gdb tmake_file="t-libc-ok t-openbsd i386/t-openbsd" # we need collect2 until our bug is fixed... use_collect2=yes ;; i[34567]86-*-coff*) ! tm_file=i386/i386-coff.h ! ;; ! i[34567]86-*-isc*) # 80386 running ISC system ! xm_defines=POSIX ! if test x$gas = xyes -a x$stabs = xyes ! then ! tm_file=i386/iscdbx.h ! tmake_file=i386/t-svr3dbx ! extra_parts="svr3.ifile svr3z.ifile" ! else ! tm_file=i386/isccoff.h ! tmake_file=i386/t-crtstuff ! extra_parts="crtbegin.o crtend.o" ! fi ! install_headers_dir=install-headers-cpio ;; ! i[34567]86-*-linux*oldld*) # Intel 80386's running GNU/Linux ! # with a.out format using ! # pre BFD linkers ! tmake_file="t-linux-aout i386/t-crtstuff" ! tm_file=i386/linux-oldld.h ! gnu_ld=yes ! float_format=i386 ;; i[34567]86-*-linux*aout*) # Intel 80386's running GNU/Linux # with a.out format tmake_file="t-linux-aout i386/t-crtstuff" ! tm_file=i386/linux-aout.h gnu_ld=yes - float_format=i386 ;; i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux # with ELF format using the # GNU/Linux C library 5 ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h" tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 i386/t-crtstuff" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes - float_format=i386 if test x$enable_threads = xyes; then thread_file='single' fi --- 1064,1180 ---- tm_file="dbxelf.h elfos.h svr4.h linux.h i370/linux.h ${tm_file}" tmake_file="t-slibgcc-elf-ver t-linux" # broken_install=yes elf=yes ;; ! i[34567]86-*-darwin*) ! tm_file="${tm_file} darwin.h i386/darwin.h" ! tm_p_file="${tm_p_file} darwin-protos.h" ! tmake_file="t-darwin" ! extra_objs="darwin.o" ! target_gtfiles="\$(srcdir)/config/darwin.c" ! c_target_objs="darwin-c.o" ! cxx_target_objs="darwin-c.o" ! extra_parts="crt2.o" ! # Darwin linker does collect2 functionality ! use_collect2=no ;; i[34567]86-*-elf*) xm_defines=POSIX ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h" tmake_file="i386/t-i386elf t-svr4" ;; i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4 xm_defines="POSIX SMALL_ARG_MAX" if test x$stabs = xyes -a x$gas = xyes then tm_file=i386/sysv4gdb.h else ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h" fi extra_parts="crtbegin.o crtend.o" tmake_file=i386/t-crtpic ;; i[34567]86-*-netware) # Intel 80386's running netware ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h netware.h i386/netware.h" tmake_file=i386/t-netware ;; i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*) if test x$gas = xyes then tm_file="${tm_file} usegas.h" fi xm_defines="POSIX SMALL_ARG_MAX" ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h" tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" install_headers_dir=install-headers-cpio ;; ! i[34567]86-sequent-sysv*) # would otherwise be caught by i?86-*-sysv* ! echo "*** Configuration $machine not supported" 1>&2 ! exit 1 ;; i[34567]86-wrs-vxworks*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/vxi386.h" thread_file='vxworks' ;; i[34567]86-*-aout*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/i386-aout.h" ;; i[34567]86-*-beoself* | i[34567]86-*-beos*) xm_defines=POSIX tmake_file='i386/t-beos i386/t-crtpic' ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/beos-elf.h" extra_parts='crtbegin.o crtend.o' ;; ! i[34567]86-*-freebsd2 | i[34567]86-*-freebsd2.* | i[34567]86-*-freebsd*aout*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/freebsd-aout.h" tmake_file=t-freebsd ;; i[34567]86-*-freebsd*) ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" ;; x86_64-*-freebsd*) ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" ;; i[34567]86-*-netbsdelf*) ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" ;; i[34567]86-*-netbsd*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h" tmake_file=t-netbsd + extra_parts="" use_collect2=yes ;; x86_64-*-netbsd*) ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" ;; i[34567]86-*-openbsd*) + tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h ${tm_file}" # needed to unconfuse gdb tmake_file="t-libc-ok t-openbsd i386/t-openbsd" # we need collect2 until our bug is fixed... use_collect2=yes ;; i[34567]86-*-coff*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h" ;; ! i[34567]86-*-linux*oldld*) # would otherwise be caught by i?86-*-linux* ! echo "*** Configuration $machine not supported" 1>&2 ! exit 1 ;; i[34567]86-*-linux*aout*) # Intel 80386's running GNU/Linux # with a.out format tmake_file="t-linux-aout i386/t-crtstuff" ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h linux-aout.h i386/linux-aout.h" gnu_ld=yes ;; i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux # with ELF format using the # GNU/Linux C library 5 ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h" tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 i386/t-crtstuff" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes if test x$enable_threads = xyes; then thread_file='single' fi *************** i[34567]86-*-linux*libc1) # Intel 80386' *** 1315,1336 **** i[34567]86-*-linux*) # Intel 80386's running GNU/Linux # with ELF format using glibc 2 # aka GNU/Linux C library 6 ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h" tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gnu_ld=yes - float_format=i386 ;; x86_64-*-linux*) ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h linux.h \ i386/x86-64.h i386/linux64.h" ! tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff i386/t-linux64" ! extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" ! gnu_ld=yes ! float_format=i386 ;; i[34567]86-*-gnu*) - float_format=i386 ;; i[34567]86-go32-msdos | i[34567]86-*-go32*) echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead." --- 1182,1196 ---- i[34567]86-*-linux*) # Intel 80386's running GNU/Linux # with ELF format using glibc 2 # aka GNU/Linux C library 6 ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h" tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff" ;; x86_64-*-linux*) ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \ i386/x86-64.h i386/linux64.h" ! tmake_file="t-slibgcc-elf-ver t-linux i386/t-linux64" ;; i[34567]86-*-gnu*) ;; i[34567]86-go32-msdos | i[34567]86-*-go32*) echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead." *************** i[34567]86-go32-msdos | i[34567]86-*-go3 *** 1338,1356 **** ;; i[34567]86-pc-msdosdjgpp*) xm_file=i386/xm-djgpp.h ! tm_file=i386/djgpp.h tmake_file=i386/t-djgpp gnu_ld=yes gas=yes exeext=.exe - float_format=none case $host in *pc-msdosdjgpp*) target_alias=djgpp ;; esac ;; i[34567]86-moss-msdos* | i[34567]86-*-moss*) ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h i386/moss.h" tmake_file=t-libc-ok gnu_ld=yes gas=yes --- 1198,1215 ---- ;; i[34567]86-pc-msdosdjgpp*) xm_file=i386/xm-djgpp.h ! tm_file="dbxcoff.h ${tm_file} i386/djgpp.h" tmake_file=i386/t-djgpp gnu_ld=yes gas=yes exeext=.exe case $host in *pc-msdosdjgpp*) target_alias=djgpp ;; esac ;; i[34567]86-moss-msdos* | i[34567]86-*-moss*) ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h i386/moss.h" tmake_file=t-libc-ok gnu_ld=yes gas=yes *************** i[34567]86-moss-msdos* | i[34567]86-*-mo *** 1358,1404 **** i[34567]86-*-lynxos*) if test x$gas = xyes then ! tm_file=i386/lynx.h else ! tm_file=i386/lynx-ng.h fi ;; i[34567]86-*-mach*) ! tm_file=i386/mach.h # tmake_file=t-libc-ok use_collect2=yes ;; ! i[34567]86-*-osfrose*) # 386 using OSF/rose ! if test x$elf = xyes ! then ! tm_file=i386/osfelf.h ! use_collect2= ! else ! tm_file=i386/osfrose.h ! use_collect2=yes ! fi ! tmake_file=i386/t-osf ! extra_objs=halfpic.o ! ;; ! i[34567]86-go32-rtems*) ! xm_defines=POSIX ! tm_file="i386/djgpp.h i386/djgpp-rtems.h rtems.h" ! tmake_file=t-rtems ! if test x$enable_threads = xyes; then ! thread_file='rtems' ! fi ! ;; ! i[34567]86-*-rtemscoff*) ! xm_defines=POSIX ! tm_file="i386/i386-coff.h i386/rtems.h rtems.h" ! tmake_file=t-rtems ! if test x$enable_threads = xyes; then ! thread_file='rtems' ! fi ;; ! i[34567]86-*-rtems*|i[34567]86-*-rtemself*) xm_defines=POSIX ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h" extra_parts="crtbegin.o crtend.o crti.o crtn.o" tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems" if test x$enable_threads = xyes; then --- 1217,1240 ---- i[34567]86-*-lynxos*) if test x$gas = xyes then ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx.h i386/lynx.h" else ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx-ng.h i386/lynx-ng.h" fi ;; i[34567]86-*-mach*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/mach.h" # tmake_file=t-libc-ok use_collect2=yes ;; ! i[34567]86-go32-rtems* | i[34567]86-*-rtemscoff*) ! # would otherwise be caught by i?86-*-rtems* ! echo "*** Configuration $machine not supported" 1>&2 ! exit 1 ;; ! i[34567]86-*-rtems*) xm_defines=POSIX ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h" extra_parts="crtbegin.o crtend.o crti.o crtn.o" tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems" if test x$enable_threads = xyes; then *************** i[34567]86-*-rtems*|i[34567]86-*-rtemsel *** 1408,1414 **** i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 xm_defines=POSIX install_headers_dir=install-headers-cpio ! tm_file="${tm_file} i386/att.h i386/sco5.h" if test x$gas = xyes then tm_file="usegas.h ${tm_file}" --- 1244,1250 ---- i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 xm_defines=POSIX install_headers_dir=install-headers-cpio ! tm_file="${tm_file} i386/unix.h i386/att.h i386/sco5.h" if test x$gas = xyes then tm_file="usegas.h ${tm_file}" *************** i[34567]86-*-sco3.2v5*) # 80386 running *** 1420,1429 **** ;; i[34567]86-*-solaris2*) xm_defines="POSIX SMALL_ARG_MAX" ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sol2.h" ! if test x$gas = xyes; then ! tm_file="i386/sol2gas.h ${tm_file}" ! fi tmake_file="i386/t-sol2 t-svr4" if test x$gnu_ld = xyes; then tmake_file="$tmake_file t-slibgcc-elf-ver" --- 1256,1262 ---- ;; i[34567]86-*-solaris2*) xm_defines="POSIX SMALL_ARG_MAX" ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h i386/sol2.h" tmake_file="i386/t-sol2 t-svr4" if test x$gnu_ld = xyes; then tmake_file="$tmake_file t-slibgcc-elf-ver" *************** i[34567]86-*-solaris2*) *** 1447,1453 **** ;; i[34567]86-*-sysv5*) # Intel x86 on System V Release 5 xm_defines=POSIX ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h" if test x$stabs = xyes then tm_file="${tm_file} dbx.h" --- 1280,1286 ---- ;; i[34567]86-*-sysv5*) # Intel x86 on System V Release 5 xm_defines=POSIX ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h" if test x$stabs = xyes then tm_file="${tm_file} dbx.h" *************** i[34567]86-*-sysv5*) # Intel x *** 1460,1466 **** ;; i[34567]86-*-sysv4*) # Intel 80386's running system V.4 xm_defines="POSIX SMALL_ARG_MAX" ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h" if test x$stabs = xyes then tm_file="${tm_file} dbx.h" --- 1293,1299 ---- ;; i[34567]86-*-sysv4*) # Intel 80386's running system V.4 xm_defines="POSIX SMALL_ARG_MAX" ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h" if test x$stabs = xyes then tm_file="${tm_file} dbx.h" *************** i[34567]86-*-sysv4*) # Intel 80386's ru *** 1470,1522 **** ;; i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit xm_defines=POSIX ! tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h i386/udk.h" tmake_file="i386/t-crtpic i386/t-udk t-svr4" extra_parts="crtbegin.o crtend.o" install_headers_dir=install-headers-cpio ;; - i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+ - xm_defines='POSIX USE_C_ALLOCA SMALL_ARG_MAX' - if test x$stabs = xyes - then - tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/osf1elf.h i386/osf1elfgdb.h" - else - tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/osf1elf.h" - fi - tmake_file=i386/t-osf1elf - extra_parts="crti.o crtn.o crtbegin.o crtend.o" - ;; i[34567]86-*-sysv*) # Intel 80386's running system V xm_defines=POSIX if test x$gas = xyes then if test x$stabs = xyes then ! tm_file=i386/svr3dbx.h tmake_file=i386/t-svr3dbx ! extra_parts="svr3.ifile svr3z.rfile" else ! tm_file=i386/svr3gas.h extra_parts="crtbegin.o crtend.o" tmake_file=i386/t-crtstuff fi else ! tm_file=i386/sysv3.h extra_parts="crtbegin.o crtend.o" tmake_file=i386/t-crtstuff fi tmake_file="$tmake_file i386/t-crtpic" ;; i386-*-vsta) # Intel 80386's running VSTa kernel ! xm_file=i386/xm-vsta.h ! tm_file=i386/vsta.h ;; i[34567]86-*-win32) xm_defines=POSIX xm_file=i386/xm-cygwin.h - float_format=i386 tmake_file=i386/t-cygwin ! tm_file=i386/win32.h extra_objs=winnt.o if test x$enable_threads = xyes; then thread_file='win32' --- 1303,1343 ---- ;; i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit xm_defines=POSIX ! tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h i386/udk.h" tmake_file="i386/t-crtpic i386/t-udk t-svr4" extra_parts="crtbegin.o crtend.o" install_headers_dir=install-headers-cpio ;; i[34567]86-*-sysv*) # Intel 80386's running system V xm_defines=POSIX if test x$gas = xyes then if test x$stabs = xyes then ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/svr3gas.h i386/svr3dbx.h" tmake_file=i386/t-svr3dbx ! extra_parts="svr3.ifile svr3z.ifile" else ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/svr3gas.h" extra_parts="crtbegin.o crtend.o" tmake_file=i386/t-crtstuff fi else ! tm_file="${tm_file} svr3.h i386/unix.h i386/att.h i386/sysv3.h" extra_parts="crtbegin.o crtend.o" tmake_file=i386/t-crtstuff fi tmake_file="$tmake_file i386/t-crtpic" ;; i386-*-vsta) # Intel 80386's running VSTa kernel ! xm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/xm-vsta.h" ! tm_file="${tm_file} i386/vsta.h" ;; i[34567]86-*-win32) xm_defines=POSIX xm_file=i386/xm-cygwin.h tmake_file=i386/t-cygwin ! tm_file="${tm_file} i386/win32.h" extra_objs=winnt.o if test x$enable_threads = xyes; then thread_file='win32' *************** i[34567]86-*-win32) *** 1526,1532 **** i[34567]86-*-pe | i[34567]86-*-cygwin*) xm_defines=POSIX xm_file=i386/xm-cygwin.h - float_format=i386 tmake_file=i386/t-cygwin tm_file=i386/cygwin.h extra_objs=winnt.o --- 1347,1352 ---- *************** i[34567]86-*-pe | i[34567]86-*-cygwin*) *** 1537,1543 **** ;; i[34567]86-*-mingw32*) tm_file=i386/mingw32.h - float_format=i386 xm_defines=POSIX xm_file=i386/xm-mingw32.h tmake_file="i386/t-cygwin i386/t-mingw32" --- 1357,1362 ---- *************** i[34567]86-*-mingw32*) *** 1555,1561 **** esac ;; i[34567]86-*-uwin*) ! tm_file=i386/uwin.h tmake_file="i386/t-cygwin i386/t-uwin" extra_objs=winnt.o if test x$enable_threads = xyes; then --- 1374,1380 ---- esac ;; i[34567]86-*-uwin*) ! tm_file="i386/cygwin.h i386/uwin.h" tmake_file="i386/t-cygwin i386/t-uwin" extra_objs=winnt.o if test x$enable_threads = xyes; then *************** i[34567]86-*-uwin*) *** 1564,1574 **** exeext=.exe ;; i[34567]86-*-interix3*) ! tm_file="i386/i386-interix.h i386/i386-interix3.h interix.h interix3.h" xm_file="i386/xm-i386-interix.h" xm_defines=POSIX tmake_file="t-interix i386/t-interix" ! extra_objs=interix.o xmake_file="x-interix" if test x$enable_threads = xyes ; then thread_file='posix' --- 1383,1393 ---- exeext=.exe ;; i[34567]86-*-interix3*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h i386/i386-interix3.h interix.h interix3.h" xm_file="i386/xm-i386-interix.h" xm_defines=POSIX tmake_file="t-interix i386/t-interix" ! extra_objs=winnt.o xmake_file="x-interix" if test x$enable_threads = xyes ; then thread_file='posix' *************** i[34567]86-*-interix3*) *** 1578,1588 **** fi ;; i[34567]86-*-interix*) ! tm_file="i386/i386-interix.h interix.h" xm_file="i386/xm-i386-interix.h" xm_defines=POSIX tmake_file="t-interix i386/t-interix" ! extra_objs=interix.o if test x$enable_threads = xyes ; then thread_file='posix' fi --- 1397,1407 ---- fi ;; i[34567]86-*-interix*) ! tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h interix.h" xm_file="i386/xm-i386-interix.h" xm_defines=POSIX tmake_file="t-interix i386/t-interix" ! extra_objs=winnt.o if test x$enable_threads = xyes ; then thread_file='posix' fi *************** i[34567]86-*-interix*) *** 1590,1633 **** tm_file="${tm_file} dbxcoff.h" fi ;; - i[34567]86-dg-dgux*) - xm_defines=POSIX - tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/dgux.h" - tmake_file=i386/t-dgux - install_headers_dir=install-headers-cpio - ;; - i860-alliant-*) # Alliant FX/2800 - tm_file="${tm_file} dbxelf.h elfos.h svr4.h i860/sysv4.h i860/fx2800.h" - tmake_file=i860/t-fx2800 - extra_parts="crtbegin.o crtend.o" - ;; - i860-*-bsd*) - tm_file="${tm_file} i860/bsd.h" - if test x$gas = xyes - then - tm_file="${tm_file} i860/bsd-gas.h" - fi - use_collect2=yes - ;; - i860-*-mach*) - tm_file="${tm_file} i860/mach.h" - tmake_file=t-libc-ok - ;; - i860-*-osf*) # Intel Paragon XP/S, OSF/1AD - tm_file="${tm_file} svr3.h i860/paragon.h" - xm_defines=POSIX - ;; - i860-*-sysv3*) - tm_file="${tm_file} svr3.h i860/sysv3.h" - xm_defines=POSIX - extra_parts="crtbegin.o crtend.o" - ;; - i860-*-sysv4*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h i860/sysv4.h" - xm_defines=POSIX - tmake_file=t-svr4 - extra_parts="crtbegin.o crtend.o" - ;; i960-wrs-vxworks5 | i960-wrs-vxworks5.0*) tm_file="${tm_file} i960/vx960.h" tmake_file=i960/t-vxworks960 --- 1409,1414 ---- *************** ia64*-*-aix*) *** 1678,1683 **** --- 1459,1465 ---- tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/aix.h" tmake_file="ia64/t-ia64 ia64/t-aix" target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" + extra_parts="crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o" ;; ia64*-*-elf*) tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h" *************** ia64*-*-elf*) *** 1691,1709 **** then target_cpu_default="${target_cpu_default}|MASK_GNU_LD" fi ! float_format=i386 ;; ia64*-*-freebsd*) tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h" target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" tmake_file="${tmake_file} ia64/t-ia64" ! float_format=i386 ;; ia64*-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h" tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc" target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" ! float_format=i386 ;; ia64*-*-hpux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h ia64/hpux_longdouble.h" --- 1473,1491 ---- then target_cpu_default="${target_cpu_default}|MASK_GNU_LD" fi ! extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" ;; ia64*-*-freebsd*) tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h" target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" tmake_file="${tmake_file} ia64/t-ia64" ! extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" ;; ia64*-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h" tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc" target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" ! extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" ;; ia64*-*-hpux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h ia64/hpux_longdouble.h" *************** ia64*-*-hpux*) *** 1712,1718 **** if test x$enable_threads = xyes; then thread_file='posix' fi ! float_format=i386 ;; m32r-*-elf*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" --- 1494,1504 ---- if test x$enable_threads = xyes; then thread_file='posix' fi ! use_collect2=no ! c_target_objs="ia64-c.o" ! cxx_target_objs="ia64-c.o" ! ;; ! ip2k-*-elf) ;; m32r-*-elf*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" *************** m68hc12-*-*|m6812-*-*) *** 1733,1743 **** out_file="m68hc11/m68hc11.c" tmake_file="m68hc11/t-m68hc11-gas" ;; - m68000-convergent-sysv*) - tm_file=m68k/ctix.h - xm_defines=POSIX - use_collect2=yes - ;; m68000-hp-bsd*) # HP 9000/200 running BSD tm_file=m68k/hp2bsd.h use_collect2=yes --- 1519,1524 ---- *************** m68000-att-sysv*) *** 1772,1834 **** fi use_collect2=yes ;; - m68k-apple-aux*) # Apple Macintosh running A/UX - xm_defines=POSIX - tmake_file=m68k/t-aux - install_headers_dir=install-headers-cpio - extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o" - tm_file= - if test "$gnu_ld" = yes - then - tm_file="${tm_file} m68k/auxgld.h" - else - tm_file="${tm_file} m68k/auxld.h" - fi - if test "$gas" = yes - then - tm_file="${tm_file} m68k/auxgas.h" - else - tm_file="${tm_file} m68k/auxas.h" - fi - tm_file="${tm_file} m68k/a-ux.h" - float_format=m68k - ;; - m68k-apollo-*) - tm_file=m68k/apollo68.h - use_collect2=yes - float_format=m68k - ;; - m68k-altos-sysv*) # Altos 3068 - if test x$gas = xyes - then - tm_file=m68k/altos3068.h - xm_defines=POSIX - else - echo "The Altos is supported only with the GNU assembler" 1>&2 - exit 1 - fi - ;; - m68k-bull-sysv*) # Bull DPX/2 - if test x$gas = xyes - then - if test x$stabs = xyes - then - tm_file=m68k/dpx2cdbx.h - else - tm_file=m68k/dpx2g.h - fi - else - tm_file=m68k/dpx2.h - fi - xm_defines=POSIX - use_collect2=yes - ;; m68k-atari-sysv4*) # Atari variant of V.4. tm_file=m68k/atari.h xm_defines=POSIX tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" ! float_format=m68k ;; m68k-motorola-sysv*) tm_file=m68k/mot3300.h --- 1553,1568 ---- fi use_collect2=yes ;; m68k-atari-sysv4*) # Atari variant of V.4. tm_file=m68k/atari.h xm_defines=POSIX tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" ! ;; ! m68k-apollo-sysv* | m68k-bull-sysv*) ! # can otherwise be caught by m68k-*-sysv4* ! echo "*** Configuration $machine not supported" 1>&2 ! exit 1 ;; m68k-motorola-sysv*) tm_file=m68k/mot3300.h *************** m68k-motorola-sysv*) *** 1853,1859 **** fi gdb_needs_out_file_path=yes extra_parts="crt0.o mcrt0.o" - float_format=m68k ;; m68k-ncr-sysv*) # NCR Tower 32 SVR3 tm_file=m68k/tower-as.h --- 1587,1592 ---- *************** m68k-cbm-sysv4*) # Commodore variant of *** 1879,1910 **** xm_defines=POSIX tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" - float_format=m68k ;; m68k-ccur-rtu) tm_file=m68k/ccur-GAS.h use_collect2=yes - float_format=m68k ;; m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd tm_file=m68k/hp3bsd44.h use_collect2=yes - float_format=m68k ;; m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix tm_file=m68k/hp3bsd.h use_collect2=yes - float_format=m68k - ;; - m68k-isi-bsd*) - if test x$with_fp = xno - then - tm_file=m68k/isi-nfp.h - else - tm_file=m68k/isi.h - float_format=m68k - fi - use_collect2=yes ;; m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. xm_defines=POSIX --- 1612,1629 ---- *************** m68k-hp-hpux7*) # HP 9000 series 300 run *** 1918,1924 **** fi install_headers_dir=install-headers-cpio use_collect2=yes - float_format=m68k ;; m68k-hp-hpux*) # HP 9000 series 300 xm_defines=POSIX --- 1637,1642 ---- *************** m68k-hp-hpux*) # HP 9000 series 300 *** 1932,1984 **** fi install_headers_dir=install-headers-cpio use_collect2=yes - float_format=m68k ;; m68k-sun-mach*) tm_file=m68k/sun3mach.h use_collect2=yes - float_format=m68k - ;; - m68k-sony-newsos3*) - if test x$gas = xyes - then - tm_file=m68k/news3gas.h - else - tm_file=m68k/news3.h - fi - use_collect2=yes - float_format=m68k - ;; - m68k-sony-bsd* | m68k-sony-newsos*) - if test x$gas = xyes - then - tm_file=m68k/newsgas.h - else - tm_file=m68k/news.h - fi - use_collect2=yes - float_format=m68k - ;; - m68k-next-nextstep2*) - tm_p_file="${tm_p_file} nextstep-protos.h" - tm_file=m68k/next21.h - tmake_file=m68k/t-next - xmake_file=m68k/x-next - extra_objs=nextstep.o - use_collect2=yes - float_format=m68k - ;; - m68k-next-nextstep[34]*) - tm_p_file="${tm_p_file} nextstep-protos.h" - tm_file=m68k/next.h - tmake_file=m68k/t-next - xmake_file=m68k/x-next - extra_objs=nextstep.o - extra_parts="crtbegin.o crtend.o" - float_format=m68k - if test x$enable_threads = xyes; then - thread_file='mach' - fi ;; m68k-sun-sunos3*) if test x$with_fp = xno --- 1650,1659 ---- *************** m68k-sun-sunos3*) *** 1986,1992 **** tm_file=m68k/sun3n3.h else tm_file=m68k/sun3o3.h - float_format=m68k fi use_collect2=yes ;; --- 1661,1666 ---- *************** m68k-sun-sunos*) # For SunOS 4 (the de *** 1996,2002 **** tm_file=m68k/sun3n.h else tm_file=m68k/sun3.h - float_format=m68k fi use_collect2=yes ;; --- 1670,1675 ---- *************** m68k-wrs-vxworks*) *** 2004,2020 **** tm_file=m68k/vxm68k.h tmake_file=m68k/t-vxworks68 thread_file='vxworks' - float_format=m68k ;; m68k-*-aout*) tmake_file=m68k/t-m68kbare tm_file="m68k/m68k-aout.h libgloss.h" - float_format=m68k ;; m68k-*-coff*) tmake_file=m68k/t-m68kbare tm_file="m68k/m68k-coff.h dbx.h" - float_format=m68k ;; m68020-*-elf* | m68k-*-elf*) tm_file="m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h" --- 1677,1690 ---- *************** m68020-*-elf* | m68k-*-elf*) *** 2022,2037 **** tmake_file=m68k/t-m68kelf extra_parts="crtbegin.o crtend.o" ;; - m68k-*-lynxos*) - if test x$gas = xyes - then - tm_file=m68k/lynx.h - else - tm_file=m68k/lynx-ng.h - fi - tmake_file=m68k/t-lynx - float_format=m68k - ;; m68010-*-netbsdelf* | m68k*-*-netbsdelf*) tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h" case $machine in --- 1692,1697 ---- *************** m68010-*-netbsdelf* | m68k*-*-netbsdelf* *** 2042,2079 **** target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD" ;; esac - float_format=m68k ;; m68k*-*-netbsd*) tm_file=m68k/netbsd.h tmake_file=t-netbsd ! float_format=m68k use_collect2=yes ;; m68k*-*-openbsd*) # needed to unconfuse gdb tmake_file="t-libc-ok t-openbsd m68k/t-openbsd" - float_format=m68k # we need collect2 until our bug is fixed... use_collect2=yes ;; - m68k-*-sysv3*) # Motorola m68k's running system V.3 - xm_defines=POSIX - extra_parts="crtbegin.o crtend.o" - float_format=m68k - ;; m68k-*-sysv4*) # Motorola m68k's running system V.4 tm_file=m68k/m68kv4.h xm_defines=POSIX tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" - float_format=m68k ;; m68k-*-linux*aout*) # Motorola m68k's running GNU/Linux # with a.out format tm_file=m68k/linux-aout.h tmake_file="t-linux-aout m68k/t-linux-aout" - float_format=m68k gnu_ld=yes ;; m68k-*-linux*libc1) # Motorola m68k's running GNU/Linux --- 1702,1730 ---- target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD" ;; esac ;; m68k*-*-netbsd*) tm_file=m68k/netbsd.h tmake_file=t-netbsd ! extra_parts="" use_collect2=yes ;; m68k*-*-openbsd*) # needed to unconfuse gdb tmake_file="t-libc-ok t-openbsd m68k/t-openbsd" # we need collect2 until our bug is fixed... use_collect2=yes ;; m68k-*-sysv4*) # Motorola m68k's running system V.4 tm_file=m68k/m68kv4.h xm_defines=POSIX tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" ;; m68k-*-linux*aout*) # Motorola m68k's running GNU/Linux # with a.out format tm_file=m68k/linux-aout.h tmake_file="t-linux-aout m68k/t-linux-aout" gnu_ld=yes ;; m68k-*-linux*libc1) # Motorola m68k's running GNU/Linux *************** m68k-*-linux*libc1) # Motorola m68k's r *** 2082,2088 **** tm_file=m68k/linux.h tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 m68k/t-linux" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" - float_format=m68k gnu_ld=yes ;; m68k-*-linux*) # Motorola m68k's running GNU/Linux --- 1733,1738 ---- *************** m68k-*-linux*) # Motorola m68k's runnin *** 2090,2193 **** # aka the GNU/Linux C library 6. tm_file=m68k/linux.h tmake_file="t-slibgcc-elf-ver t-linux m68k/t-linux" ! extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" ! float_format=m68k gnu_ld=yes ;; m68k-*-psos*) tmake_file=m68k/t-m68kbare tm_file=m68k/m68k-psos.h - float_format=m68k ;; ! m68k-*-rtemscoff*) ! xm_defines=POSIX ! tmake_file="m68k/t-m68kbare t-rtems" ! tm_file="m68k/m68k-coff.h m68k/rtems.h rtems.h" ! float_format=m68k ! if test x$enable_threads = xyes; then ! thread_file='rtems' ! fi ;; ! m68k-*-rtemself*|m68k-*-rtems*) xm_defines=POSIX tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff" tm_file="m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h" - float_format=m68k extra_parts="crtbegin.o crtend.o" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; - m88k-dg-dgux*) - xm_defines=POSIX - case $machine in - m88k-dg-dguxbcs*) - tm_file="dbxelf.h elfos.h svr4.h m88k/dgux.h m88k/dguxbcs.h" - tmake_file="m88k/t-dgux m88k/t-dguxbcs" - ;; - *) - tm_file="dbxelf.h elfos.h svr4.h m88k/dgux.h" - tmake_file=m88k/t-dgux - ;; - esac - extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld" - if test x$gas = xyes - then - tmake_file=m88k/t-dgux-gas - fi - ;; - m88k-dolphin-sysv3*) - xm_defines=POSIX - tm_file=m88k/dolph.h - extra_parts="crtbegin.o crtend.o" - tmake_file=m88k/t-dolph - if test x$gas = xyes - then - tmake_file=m88k/t-m88k-gas - fi - ;; - m88k-tektronix-sysv3) - xm_defines=POSIX - tm_file=m88k/tekXD88.h - extra_parts="crtbegin.o crtend.o" - tmake_file=m88k/t-tekXD88 - if test x$gas = xyes - then - tmake_file=m88k/t-m88k-gas - fi - ;; m88k-*-aout*) xm_defines=POSIX tm_file=m88k/m88k-aout.h ;; - m88k-*-coff*) - xm_defines=POSIX - tm_file=m88k/m88k-coff.h - tmake_file=m88k/t-bug - ;; - m88k-*-luna*) - tm_file=m88k/luna.h - extra_parts="crtbegin.o crtend.o" - if test x$gas = xyes - then - tmake_file=m88k/t-luna-gas - else - tmake_file=m88k/t-luna - fi - ;; m88k-*-openbsd*) tmake_file="${tmake_file} m88k/t-luna-gas" tm_file="m88k/aout-dbx.h aoutos.h m88k/m88k.h openbsd.h ${tm_file}" ;; - m88k-*-sysv3*) - xm_defines=POSIX - tm_file=m88k/sysv3.h - extra_parts="crtbegin.o crtend.o" - if test x$gas = xyes - then - tmake_file=m88k/t-m88k-gas - fi - ;; m88k-*-sysv4*) xm_defines=POSIX tm_file="dbxelf.h elfos.h svr4.h m88k/sysv4.h" --- 1740,1773 ---- # aka the GNU/Linux C library 6. tm_file=m68k/linux.h tmake_file="t-slibgcc-elf-ver t-linux m68k/t-linux" ! extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes ;; m68k-*-psos*) tmake_file=m68k/t-m68kbare tm_file=m68k/m68k-psos.h ;; ! m68k-*-rtemscoff*) # would otherwise be caught by m68k-*-rtems* ! echo "*** Configuration $machine not supported" 1>&2 ! exit 1 ;; ! m68k-*-rtems*) xm_defines=POSIX tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff" tm_file="m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h" extra_parts="crtbegin.o crtend.o" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; m88k-*-aout*) xm_defines=POSIX tm_file=m88k/m88k-aout.h ;; m88k-*-openbsd*) tmake_file="${tmake_file} m88k/t-luna-gas" tm_file="m88k/aout-dbx.h aoutos.h m88k/m88k.h openbsd.h ${tm_file}" ;; m88k-*-sysv4*) xm_defines=POSIX tm_file="dbxelf.h elfos.h svr4.h m88k/sysv4.h" *************** mcore-*-pe*) *** 2202,2207 **** --- 1782,1811 ---- tm_file=mcore/mcore-pe.h tmake_file=mcore/t-mcore-pe ;; + mips-sgi-irix6*o32) # SGI System V.4., IRIX 6, O32 ABI + if test x$gas = xyes + then + tm_file="mips/iris5.h mips/iris5gas.h mips/iris6-o32-gas.h" + if test x$stabs = xyes + then + tm_file="${tm_file} dbx.h" + fi + tmake_file=mips/t-iris5-gas + else + tm_file="mips/iris5.h mips/iris6-o32-as.h" + tmake_file=mips/t-iris5-as + fi + tm_file="${tm_file} mips/iris6-o32.h" + tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6" + xm_defines=POSIX + xm_file=mips/xm-iris5.h + # mips-tfile doesn't work yet + # See comment in mips/iris5.h file. + use_collect2=yes + # if test x$enable_threads = xyes; then + # thread_file='irix' + # fi + ;; mips-sgi-irix6*) # SGI System V.4., IRIX 6 if test "x$gnu_ld" = xyes then *************** mips-sgi-irix6*) # SGI System V.4., IRI *** 2209,2222 **** else tm_file=mips/iris6.h fi ! tmake_file="mips/t-iris mips/t-iris6" xm_defines=POSIX # if test x$enable_threads = xyes; then # thread_file='irix' # fi ;; mips-wrs-vxworks) ! tm_file="mips/elf.h mips/vxworks.h" tmake_file=mips/t-ecoff gas=yes gnu_ld=yes --- 1813,1826 ---- else tm_file=mips/iris6.h fi ! tmake_file="mips/t-iris mips/t-iris5-6 mips/t-iris6" xm_defines=POSIX # if test x$enable_threads = xyes; then # thread_file='irix' # fi ;; mips-wrs-vxworks) ! tm_file="${tm_file} mips/elf.h mips/vxworks.h" tmake_file=mips/t-ecoff gas=yes gnu_ld=yes *************** mips-sgi-irix5*) # SGI System V.4., IRI *** 2260,2269 **** then tm_file="${tm_file} dbx.h" fi else tm_file=mips/iris5.h fi ! tmake_file=mips/t-iris xm_defines=POSIX xm_file=mips/xm-iris5.h # mips-tfile doesn't work yet --- 1864,1875 ---- then tm_file="${tm_file} dbx.h" fi + tmake_file=mips/t-iris5-gas else tm_file=mips/iris5.h + tmake_file=mips/t-iris5-as fi ! tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6" xm_defines=POSIX xm_file=mips/xm-iris5.h # mips-tfile doesn't work yet *************** mips-sgi-irix5*) # SGI System V.4., IRI *** 2273,2394 **** # thread_file='irix' # fi ;; ! mips-sgi-irix4loser*) # Mostly like a MIPS. ! tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! tmake_file=mips/t-iris ! xm_defines=POSIX ! if test x$gas = xyes ! then : ! else ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! # if test x$enable_threads = xyes; then ! # thread_file='irix' ! # fi ! ;; ! mips-sgi-irix4*) # Mostly like a MIPS. ! tm_file="mips/iris3.h ${tm_file} mips/iris4.h" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! tmake_file=mips/t-iris ! xm_defines=POSIX ! if test x$gas = xyes ! then : ! else ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! # if test x$enable_threads = xyes; then ! # thread_file='irix' ! # fi ! ;; ! mips-sgi-*) # Mostly like a MIPS. ! tm_file="mips/iris3.h ${tm_file}" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! xm_defines=POSIX ! if test x$gas = xyes ! then : ! else ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose. ! tm_file="mips/osfrose.h ${tm_file}" ! extra_objs=halfpic.o ! use_collect2=yes ! ;; ! mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL ! tm_file=mips/dec-osf1.h ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! if test x$gas = xyes ! then : ! else ! tmake_file=mips/t-ultrix ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ;; - mips-dec-bsd*) # Decstation running 4.4 BSD - tm_file=mips/dec-bsd.h - if test x$gas = xyes - then : - else - tmake_file=mips/t-ultrix - extra_passes="mips-tfile mips-tdump" - fi - if test x$gnu_ld != xyes - then - use_collect2=yes - fi - ;; mips*-*-netbsd*) # NetBSD/mips, either endian. ! tm_file="elfos.h mips/netbsd.h" ! case $machine in ! mips*el-*) ! tm_file="mips/little.h $tm_file" ! ;; ! esac tmake_file="${tmake_file} mips/t-netbsd" ;; mips*-*-linux*) # Linux MIPS, either endian. ! tm_file="dbxelf.h elfos.h svr4.h linux.h mips/linux.h" case $machine in mipsisa32*-*) - tm_file="$tm_file mips/isa32-linux.h" target_cpu_default="MASK_SOFT_FLOAT" ;; esac - case $machine in - mips*el-*) - tm_file="mips/little.h $tm_file" - ;; - esac tmake_file="t-slibgcc-elf-ver t-linux mips/t-linux" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gnu_ld=yes - gas=yes ;; mips*el-*-openbsd*) # mips little endian target_cpu_default="MASK_GAS|MASK_ABICALLS" --- 1879,1902 ---- # thread_file='irix' # fi ;; ! mips-sgi-*) # would otherwise be caught by mips-*-elf* ! echo "*** Configuration $machine not supported" 1>&2 ! exit 1 ;; mips*-*-netbsd*) # NetBSD/mips, either endian. ! target_cpu_default="MASK_GAS|MASK_ABICALLS" ! tm_file="elfos.h ${tm_file} mips/netbsd.h" tmake_file="${tmake_file} mips/t-netbsd" ;; mips*-*-linux*) # Linux MIPS, either endian. ! tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" case $machine in mipsisa32*-*) target_cpu_default="MASK_SOFT_FLOAT" + tm_defines="MIPS_ISA_DEFAULT=32" ;; esac tmake_file="t-slibgcc-elf-ver t-linux mips/t-linux" ;; mips*el-*-openbsd*) # mips little endian target_cpu_default="MASK_GAS|MASK_ABICALLS" *************** mips*-*-openbsd*) # mips big endian *** 2397,2674 **** target_cpu_default="MASK_GAS|MASK_ABICALLS" tm_file="mips/openbsd-be.h ${tm_file}" ;; ! mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news. ! tm_file="mips/news4.h ${tm_file}" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! if test x$gas = xyes ! then : ! else ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0. ! # That is based on svr4. ! # t-svr4 is not right because this system doesn't use ELF. ! tm_file="mips/news5.h ${tm_file}" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! xm_defines=POSIX ! if test x$gas = xyes ! then : ! else ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-tandem-sysv4*) # Tandem S2 running NonStop UX ! tm_file="mips/svr4-5.h mips/svr4-t.h" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! xm_defines=POSIX ! if test x$gas = xyes ! then ! extra_parts="crtbegin.o crtend.o" ! else ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-ultrix* | mips-dec-mach3) # Decstation. ! tm_file="mips/ultrix.h ${tm_file}" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! if test x$gas = xyes ! then : ! else ! tmake_file=mips/t-ultrix ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-riscos[56789]bsd*) ! tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0 ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! if test x$gas = xyes ! then ! tmake_file=mips/t-bsd-gas ! else ! tmake_file=mips/t-bsd ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*) ! tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0 ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! if test x$gas = xyes ! then ! tmake_file=mips/t-bsd-gas ! else ! tmake_file=mips/t-bsd ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-riscos[56789]sysv4*) ! tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0 ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! if test x$gas = xyes ! then ! tmake_file=mips/t-svr4-gas ! else ! tmake_file=mips/t-svr4 ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*) ! tm_file="mips/svr4-4.h ${tm_file}" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! xm_defines=POSIX ! if test x$gas = xyes ! then ! tmake_file=mips/t-svr4-gas ! else ! tmake_file=mips/t-svr4 ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-riscos[56789]sysv*) ! tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0 ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! xm_defines=POSIX ! if test x$gas = xyes ! then ! tmake_file=mips/t-svr3-gas ! else ! tmake_file=mips/t-svr3 ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-sysv* | mips-*-riscos*sysv*) ! tm_file="mips/svr3-4.h ${tm_file}" ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! xm_defines=POSIX ! if test x$gas = xyes ! then ! tmake_file=mips/t-svr3-gas ! else ! tmake_file=mips/t-svr3 ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0. ! tm_file=mips/mips-5.h ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! if test x$gas = xyes ! then : ! else ! extra_passes="mips-tfile mips-tdump" ! fi ! if test x$gnu_ld != xyes ! then ! use_collect2=yes ! fi ! ;; ! mipsel-*-ecoff*) ! tm_file=mips/ecoffl.h ! if test x$stabs = xyes; then ! tm_file="${tm_file} dbx.h" ! fi ! tmake_file=mips/t-ecoff ! ;; ! mips-*-ecoff*) ! tm_file="gofast.h mips/ecoff.h" if test x$stabs = xyes; then tm_file="${tm_file} dbx.h" fi tmake_file=mips/t-ecoff ;; ! mipsisa32-*-elf*) ! tm_file="mips/isa3264.h mips/abi64.h" tmake_file=mips/t-isa3264 ! target_cpu_default="MASK_SOFT_FLOAT" ;; ! mipsel-*-elf*) ! tm_file="mips/elfl.h" ! tmake_file=mips/t-elf ;; ! mips-*-elf*) ! tm_file="mips/elf.h" tmake_file=mips/t-elf ;; ! mips64el-*-elf*) ! tm_file="mips/elfl64.h" tmake_file=mips/t-elf ;; ! mips64orionel-*-elf*) ! tm_file="mips/elforion.h mips/elfl64.h" tmake_file=mips/t-elf ;; ! mips64-*-elf*) ! tm_file="mips/elf64.h" tmake_file=mips/t-elf - ;; - mips64orion-*-elf*) - tm_file="mips/elforion.h mips/elf64.h" tmake_file=mips/t-elf ;; mips64orion-*-rtems*) xm_defines=POSIX ! tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h rtems.h" tmake_file="mips/t-elf t-rtems" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; mips*-*-rtems*) xm_defines=POSIX ! tm_file="mips/elf.h mips/rtems.h rtems.h" tmake_file="mips/t-elf t-rtems" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; ! mipstx39el-*-elf*) ! tm_file="mips/r3900.h mips/elfl.h mips/abi64.h" ! tmake_file=mips/t-r3900 ! target_cpu_default="MASK_SOFT_FLOAT" ! ;; ! mipstx39-*-elf*) ! tm_file="mips/r3900.h mips/elf.h mips/abi64.h" tmake_file=mips/t-r3900 ;; - mips-*-*) # Default MIPS RISC-OS 4.0. - if test x$stabs = xyes; then - tm_file="${tm_file} dbx.h" - fi - if test x$gas = xyes - then : - else - extra_passes="mips-tfile mips-tdump" - fi - if test x$gnu_ld != xyes - then - use_collect2=yes - fi - ;; mmix-knuth-mmixware) ;; mn10200-*-*) - float_format=i32 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" if test x$stabs = xyes then --- 1905,1987 ---- target_cpu_default="MASK_GAS|MASK_ABICALLS" tm_file="mips/openbsd-be.h ${tm_file}" ;; ! mips-*-ecoff* | mipsel-*-ecoff*) if test x$stabs = xyes; then tm_file="${tm_file} dbx.h" fi tmake_file=mips/t-ecoff ;; ! mipsisa32-*-elf* | mipsisa32el-*-elf*) ! tm_file="${tm_file} mips/elf.h" tmake_file=mips/t-isa3264 ! tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_MEABI" ;; ! mipsisa64-*-elf* | mipsisa64el-*-elf*) ! tm_file="${tm_file} mips/elf.h" ! tmake_file=mips/t-isa3264 ! target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS" ! tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_MEABI" ;; ! mipsisa64sr71k-*-elf*) ! tm_file="${tm_file} mips/elf.h" ! tmake_file=mips/t-sr71k ! target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS" ! tm_defines="MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_MEABI" ! ;; ! mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*) ! tm_file="${tm_file} mips/elf.h" tmake_file=mips/t-elf + target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS" + tm_defines="MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64" ;; ! mips-*-elf* | mipsel-*-elf*) ! tm_file="${tm_file} mips/elf.h" tmake_file=mips/t-elf ;; ! mips64-*-elf* | mips64el-*-elf*) ! tm_file="${tm_file} mips/elf64.h" tmake_file=mips/t-elf + target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS" + tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64" ;; ! mips64vr-*-elf* | mips64vrel-*-elf*) ! tm_file="mips/vr.h ${tm_file} mips/elf64.h" ! tm_defines="MIPS_ABI_DEFAULT=ABI_O64 MIPS_MARCH_CONTROLS_SOFT_FLOAT=1" ! tmake_file=mips/t-vr ! ;; ! mips64orion-*-elf* | mips64orionel-*-elf*) ! tm_file="${tm_file} mips/elforion.h mips/elf64.h" tmake_file=mips/t-elf tmake_file=mips/t-elf + target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS" + tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64" ;; mips64orion-*-rtems*) xm_defines=POSIX ! tm_file="${tm_file} mips/elforion.h mips/elf64.h mips/rtems64.h rtems.h" tmake_file="mips/t-elf t-rtems" + tmake_file=mips/t-elf + target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS" + tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; mips*-*-rtems*) xm_defines=POSIX ! tm_file="${tm_file} mips/elf.h mips/rtems.h rtems.h" tmake_file="mips/t-elf t-rtems" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; ! mipstx39-*-elf* | mipstx39el-*-elf*) ! tm_file="${tm_file} mips/r3900.h mips/elf.h" tmake_file=mips/t-r3900 ;; mmix-knuth-mmixware) ;; mn10200-*-*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" if test x$stabs = xyes then *************** mn10300-*-*) *** 2684,2725 **** fi use_collect2=no ;; - ns32k-encore-bsd*) - tm_file=ns32k/encore.h - use_collect2=yes - ;; - ns32k-sequent-bsd*) - tm_file=ns32k/sequent.h - use_collect2=yes - ;; - ns32k-tek6100-bsd*) - tm_file=ns32k/tek6100.h - use_collect2=yes - ;; - ns32k-tek6200-bsd*) - tm_file=ns32k/tek6200.h - use_collect2=yes - ;; - ns32k-merlin-*) - tm_file=ns32k/merlin.h - use_collect2=yes - ;; - ns32k-pc532-mach*) - tm_file=ns32k/pc532-mach.h - use_collect2=yes - ;; - ns32k-pc532-minix*) - tm_file=ns32k/pc532-min.h - xm_defines='POSIX HZ=60' - use_collect2=yes - ;; ns32k-*-netbsdelf*) echo "GCC does not yet support the ${machine} target"; exit 1 ;; ns32k-*-netbsd*) ! tm_file=ns32k/netbsd.h # On NetBSD, the headers are already okay, except for math.h. ! tmake_file=t-netbsd use_collect2=yes ;; pdp11-*-bsd) --- 1997,2010 ---- fi use_collect2=no ;; ns32k-*-netbsdelf*) echo "GCC does not yet support the ${machine} target"; exit 1 ;; ns32k-*-netbsd*) ! tm_file="${tm_file} netbsd.h netbsd-aout.h ns32k/netbsd.h" # On NetBSD, the headers are already okay, except for math.h. ! tmake_file="t-netbsd ns32k/t-ns32k" ! extra_parts="" use_collect2=yes ;; pdp11-*-bsd) *************** avr-*-*) *** 2732,2752 **** ns32k-*-openbsd*) # Nothing special ;; - pj*-linux*) - tm_file="dbxelf.h elfos.h svr4.h pj/linux.h ${tm_file}" - ;; - pj-*) - ;; - pjl-*) - tm_file="dbxelf.h elfos.h svr4.h pj/pjl.h ${tm_file}" - ;; - - romp-*-aos*) - use_collect2=yes - ;; - romp-*-mach*) - use_collect2=yes - ;; romp-*-openbsd*) # Nothing special ;; --- 2017,2022 ---- *************** powerpc64-*-linux*) *** 2762,2768 **** powerpc64-*-gnu*) tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux64.h rs6000/gnu.h" out_file=rs6000/rs6000.c ! tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm" ;; powerpc-*-beos*) tm_file="${tm_file} rs6000/aix.h rs6000/beos.h rs6000/xcoff.h" --- 2032,2038 ---- powerpc64-*-gnu*) tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux64.h rs6000/gnu.h" out_file=rs6000/rs6000.c ! tmake_file="rs6000/t-rs6000 t-slibgcc-elf-ver t-gnu rs6000/t-linux64" ;; powerpc-*-beos*) tm_file="${tm_file} rs6000/aix.h rs6000/beos.h rs6000/xcoff.h" *************** powerpc-*-beos*) *** 2773,2782 **** powerpc-*-darwin*) tm_file="${tm_file} darwin.h rs6000/darwin.h" tm_p_file="${tm_p_file} darwin-protos.h" ! tmake_file=rs6000/t-darwin extra_objs="darwin.o" c_target_objs="darwin-c.o" cxx_target_objs="darwin-c.o" # Darwin linker does collect2 functionality use_collect2=no extra_headers=altivec.h --- 2043,2054 ---- powerpc-*-darwin*) tm_file="${tm_file} darwin.h rs6000/darwin.h" tm_p_file="${tm_p_file} darwin-protos.h" ! tmake_file="rs6000/t-rs6000 t-darwin rs6000/t-darwin" extra_objs="darwin.o" + target_gtfiles="\$(srcdir)/config/darwin.c" c_target_objs="darwin-c.o" cxx_target_objs="darwin-c.o" + extra_parts="crt2.o" # Darwin linker does collect2 functionality use_collect2=no extra_headers=altivec.h *************** powerpc-*-sysv*) *** 2793,2800 **** tmake_file="rs6000/t-ppcos rs6000/t-ppccomm" ;; powerpc-*-netbsd*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h" ! tmake_file="rs6000/t-ppcos rs6000/t-ppccomm" ;; powerpc-*-chorusos*) xm_defines=POSIX --- 2065,2072 ---- tmake_file="rs6000/t-ppcos rs6000/t-ppccomm" ;; powerpc-*-netbsd*) ! tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h" ! tmake_file="${tmake_file} rs6000/t-netbsd" ;; powerpc-*-chorusos*) xm_defines=POSIX *************** powerpc-*-eabiaix*) *** 2811,2820 **** tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h" tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" ;; powerpc-*-eabisimaltivec*) xm_defines=POSIX tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h" ! tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" ;; powerpc-*-eabisim*) xm_defines=POSIX --- 2083,2097 ---- tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h" tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" ;; + powerpc-*-eabispe*) + xm_defines=POSIX + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabispe.h" + tmake_file="rs6000/t-ppcendian rs6000/t-ppccomm" + ;; powerpc-*-eabisimaltivec*) xm_defines=POSIX tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h" ! tmake_file="rs6000/t-ppcendian rs6000/t-ppccomm" ;; powerpc-*-eabisim*) xm_defines=POSIX *************** powerpc-*-elf*) *** 2829,2835 **** powerpc-*-eabialtivec*) xm_defines=POSIX tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h" ! tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" ;; powerpc-*-eabi*) xm_defines=POSIX --- 2106,2112 ---- powerpc-*-eabialtivec*) xm_defines=POSIX tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h" ! tmake_file="rs6000/t-ppcendian rs6000/t-ppccomm" ;; powerpc-*-eabi*) xm_defines=POSIX *************** powerpc-wrs-vxworks*) *** 2884,2889 **** --- 2161,2172 ---- tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" thread_file='vxworks' ;; + powerpc-wrs-windiss*) + xm_defines=POSIX + tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/windiss.h" + tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" + thread_file="" + ;; powerpcle-wrs-vxworks*) xm_defines=POSIX tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h" *************** powerpcle-*-eabi*) *** 2913,2926 **** rs6000-ibm-aix3.[01]*) xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/aix31.h rs6000/xcoff.h" - float_format=none use_collect2=yes ;; rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*) xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/aix3newas.h rs6000/xcoff.h" tmake_file=rs6000/t-newas - float_format=none use_collect2=yes extra_headers= ;; --- 2196,2207 ---- *************** rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4 *** 2928,2934 **** xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h" tmake_file=rs6000/t-newas - float_format=none use_collect2=yes extra_headers= ;; --- 2209,2214 ---- *************** rs6000-ibm-aix4.[3456789]* | powerpc-ibm *** 2936,2951 **** xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h" tmake_file=rs6000/t-aix43 - float_format=none use_collect2=yes thread_file='aix' extra_headers= ;; ! rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*) xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h" tmake_file=rs6000/t-aix43 ! float_format=none use_collect2=yes thread_file='aix' extra_headers= --- 2216,2237 ---- xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h" tmake_file=rs6000/t-aix43 use_collect2=yes thread_file='aix' extra_headers= ;; ! rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*) xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h" tmake_file=rs6000/t-aix43 ! use_collect2=yes ! thread_file='aix' ! extra_headers= ! ;; ! rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*) ! xm_defines=POSIX ! tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h" ! tmake_file=rs6000/t-aix52 use_collect2=yes thread_file='aix' extra_headers= *************** rs6000-ibm-aix[56789].* | powerpc-ibm-ai *** 2953,2965 **** rs6000-ibm-aix*) xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/xcoff.h" - float_format=none use_collect2=yes ;; rs6000-bull-bosx) xm_defines=POSIX tm_file="${tm_file} rs6000/aix.h rs6000/xcoff.h" - float_format=none use_collect2=yes ;; rs6000-*-mach*) --- 2239,2249 ---- *************** rs6000-*-lynxos*) *** 2974,3010 **** ;; s390-*-linux*) tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h" ! tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux" ! extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" ;; s390x-*-linux*) tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h" tm_p_file=s390/s390-protos.h md_file=s390/s390.md out_file=s390/s390.c ! tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux s390/t-linux64" ! extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" ;; ! sh-*-elf*) tmake_file="sh/t-sh sh/t-elf" ! tm_file="${tm_file} sh/elf.h" ! float_format=sh ! ;; ! sh64-*-elf*) ! tmake_file="sh/t-sh sh/t-elf sh/t-sh64" ! tm_file="${tm_file} sh/sh.h sh/elf.h sh/sh64.h" ! float_format=sh ! extra_headers="../../config/sh/shmedia.h ../../config/sh/ushmedia.h ../../config/sh/sshmedia.h" ! # Not strictly necessary to check this, but a good idea anyway. ! if test $machine = $target; then ! target_requires_64bit_host_wide_int=yes ! fi ;; sh-*-rtemself*) xm_defines=POSIX tmake_file="sh/t-sh sh/t-elf t-rtems" ! tm_file="${tm_file} sh/elf.h sh/rtemself.h rtems.h" ! float_format=sh if test x$enable_threads = xyes; then thread_file='rtems' fi --- 2258,2302 ---- ;; s390-*-linux*) tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h" ! tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff" ;; s390x-*-linux*) tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h" tm_p_file=s390/s390-protos.h md_file=s390/s390.md + extra_modes=s390/s390-modes.def out_file=s390/s390.c ! tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff s390/t-linux64" ;; ! sh-*-elf* | sh[2346l]*-*-elf*) tmake_file="sh/t-sh sh/t-elf" ! case $machine in ! shl* | sh64l*) ! tm_file="sh/little.h ${tm_file}" ! tmake_file="${tmake_file} sh/t-le" ! ;; ! esac ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h" ! case $machine in ! sh64*) ! tmake_file="${tmake_file} sh/t-sh64" ! tm_file="${tm_file} sh/sh64.h" ! extra_headers="shmedia.h ushmedia.h sshmedia.h" ! ;; ! sh4_single*) target_cpu_default="SELECT_SH4_SINGLE" ;; ! sh4*) target_cpu_default="SELECT_SH4" ;; ! sh3e*) target_cpu_default="SELECT_SH3E" ;; ! sh3*) target_cpu_default="SELECT_SH3" ;; ! sh2*) target_cpu_default="SELECT_SH2" ;; ! esac ! case $machine in ! sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;; ! esac ;; sh-*-rtemself*) xm_defines=POSIX tmake_file="sh/t-sh sh/t-elf t-rtems" ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/rtemself.h rtems.h" if test x$enable_threads = xyes; then thread_file='rtems' fi *************** sh-*-rtemself*) *** 3012,3038 **** sh-*-rtems*) xm_defines=POSIX tmake_file="sh/t-sh t-rtems" ! tm_file="${tm_file} sh/rtems.h rtems.h" ! float_format=sh if test x$enable_threads = xyes; then thread_file='rtems' fi ;; ! sh-*-linux*) ! tm_file="${tm_file} sh/elf.h sh/linux.h" tmake_file="sh/t-sh sh/t-elf sh/t-linux" gas=yes gnu_ld=yes ! float_format=sh ;; sh-*-*) ! float_format=sh ;; sparc-tti-*) tm_file="${tm_file} sparc/pbd.h" xm_defines=POSIX ;; sparc64-wrs-vxworks*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h sparc/biarch64.h gofast.h sparc/vxsparc64.h" tmake_file="sparc/t-vxsparc64 sparc/t-crtfm" use_collect2=yes ;; --- 2304,2383 ---- sh-*-rtems*) xm_defines=POSIX tmake_file="sh/t-sh t-rtems" ! tm_file="${tm_file} sh/coff.h sh/rtems.h rtems.h" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; ! sh-*-linux* | sh[2346lbe]*-*-linux*) tmake_file="sh/t-sh sh/t-elf sh/t-linux" + case $machine in + sh*be-*-* | sh*eb-*-*) ;; + *) + tm_file="sh/little.h ${tm_file}" + tmake_file="${tmake_file} sh/t-le" + ;; + esac + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h" gas=yes gnu_ld=yes ! case $machine in ! sh64*) ! tmake_file="${tmake_file} sh/t-sh64" ! tm_file="${tm_file} sh/sh64.h" ! extra_headers="shmedia.h ushmedia.h sshmedia.h" ! ;; ! sh4_single*) target_cpu_default="SELECT_SH4_SINGLE" ;; ! sh4*) target_cpu_default="SELECT_SH4" ;; ! sh3e[lb]e*) target_cpu_default="SELECT_SH3E" ;; ! sh3e[lb]*) target_cpu_default="SELECT_SH3" ;; ! sh3e*) target_cpu_default="SELECT_SH3E" ;; ! sh3*) target_cpu_default="SELECT_SH3" ;; ! sh2*) target_cpu_default="SELECT_SH2" ;; ! esac ! case $machine in ! sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;; ! esac ! ;; ! sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ ! sh64-*-netbsd* | sh64l*-*-netbsd*) ! tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h netbsd.h netbsd-elf.h sh/netbsd-elf.h" ! tmake_file="${tmake_file} sh/t-sh sh/t-elf" ! case $machine in ! sh*l*-*) ! tm_file="sh/little.h ${tm_file}" ! tmake_file="${tmake_file} sh/t-le" ! ;; ! *) ! tmake_file="${tmake_file} sh/t-be" ! ;; ! esac ! case $machine in ! sh5*-*) ! # SHmedia, 32-bit ABI ! target_cpu_default="SH5_BIT|SH4_BIT|SH3E_BIT" ! tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5" ! ;; ! sh64*-*) ! # SHmedia, 64-bit ABI ! target_cpu_default="SH5_BIT|SH4_BIT" ! tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5 sh/t-netbsd-sh5-64" ! ;; ! *) ! # SH3, software floating point ! target_cpu_default="SH1_BIT|SH2_BIT|SH3_BIT" ! tmake_file="${tmake_file} sh/t-netbsd" ! ;; ! esac ;; sh-*-*) ! tm_file="${tm_file} sh/coff.h" ;; sparc-tti-*) tm_file="${tm_file} sparc/pbd.h" xm_defines=POSIX ;; sparc64-wrs-vxworks*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/biarch64.h gofast.h sparc/vxsparc64.h" tmake_file="sparc/t-vxsparc64 sparc/t-crtfm" use_collect2=yes ;; *************** sparc-*-netbsdelf*) *** 3052,3057 **** --- 2397,2403 ---- sparc-*-netbsd*) tm_file="${tm_file} sparc/aout.h netbsd.h netbsd-aout.h sparc/netbsd.h" tmake_file=t-netbsd + extra_parts="" use_collect2=yes ;; sparc-*-openbsd*) *************** sparc64-*-openbsd*) *** 3066,3081 **** xm_file=sparc/xm-sp64.h gas=yes gnu_ld=yes with_cpu=ultrasparc - float_format=i128 ;; sparc-*-bsd*) tm_file="${tm_file} sparc/bsd.h" ;; sparc-*-chorusos*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h chorus.h" tmake_file="sparc/t-chorus-elf sparc/t-crtfm" extra_parts="crti.o crtn.o crtbegin.o crtend.o" - float_format=i64 case x${enable_threads} in xyes | xpthreads | xposix) thread_file='posix' --- 2412,2425 ---- xm_file=sparc/xm-sp64.h gas=yes gnu_ld=yes with_cpu=ultrasparc ;; sparc-*-bsd*) tm_file="${tm_file} sparc/bsd.h" ;; sparc-*-chorusos*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h chorus.h" tmake_file="sparc/t-chorus-elf sparc/t-crtfm" extra_parts="crti.o crtn.o crtbegin.o crtend.o" case x${enable_threads} in xyes | xpthreads | xposix) thread_file='posix' *************** sparc-*-chorusos*) *** 3083,3111 **** esac ;; sparc-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h" tmake_file="sparc/t-elf sparc/t-crtfm" extra_parts="crti.o crtn.o crtbegin.o crtend.o" - #float_format=i128 - float_format=i64 ;; ! sparc-*-linux*aout*) # Sparc's running GNU/Linux, a.out tm_file="aoutos.h sparc/sparc.h sparc/aout.h sparc/linux-aout.h" gnu_ld=yes ;; ! sparc-*-linux*libc1*) # Sparc's running GNU/Linux, libc5 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h" tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 sparc/t-crtfm" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes - float_format=sparc ;; ! sparc-*-linux*) # Sparc's running GNU/Linux, libc6 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h" tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gnu_ld=yes - float_format=sparc ;; sparc-*-lynxos*) if test x$gas = xyes --- 2427,2449 ---- esac ;; sparc-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h" tmake_file="sparc/t-elf sparc/t-crtfm" extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;; ! sparc-*-linux*aout*) # SPARC's running GNU/Linux, a.out tm_file="aoutos.h sparc/sparc.h sparc/aout.h sparc/linux-aout.h" gnu_ld=yes ;; ! sparc-*-linux*libc1*) # SPARC's running GNU/Linux, libc5 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h" tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 sparc/t-crtfm" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes ;; ! sparc-*-linux*) # SPARC's running GNU/Linux, libc6 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h" tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm" ;; sparc-*-lynxos*) if test x$gas = xyes *************** sparc-*-lynxos*) *** 3116,3142 **** fi tmake_file=sparc/t-sunos41 ;; ! sparc-*-rtemsaout*) ! xm_defines=POSIX ! tmake_file="sparc/t-sparcbare t-rtems" ! tm_file="${tm_file} aoutos.h sparc/aout.h sparc/rtems.h rtems.h" ! if test x$enable_threads = xyes; then ! thread_file='rtems' ! fi ;; ! sparc-*-rtems*|sparc-*-rtemself*) xm_defines=POSIX ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h" tmake_file="sparc/t-elf sparc/t-crtfm t-rtems" extra_parts="crti.o crtn.o crtbegin.o crtend.o" - #float_format=i128 - float_format=i64 if test x$enable_threads = xyes; then thread_file='rtems' fi ;; sparc64-*-solaris2* | sparcv9-*-solaris2*) ! tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h" if test x$gnu_ld = xyes; then tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h" fi --- 2454,2474 ---- fi tmake_file=sparc/t-sunos41 ;; ! sparc-*-rtemsaout*) # would otherwise be caught by sparc-*-rtems* ! echo "*** Configuration $machine not supported" 1>&2 ! exit 1 ;; ! sparc-*-rtems*) xm_defines=POSIX ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h" tmake_file="sparc/t-elf sparc/t-crtfm t-rtems" extra_parts="crti.o crtn.o crtbegin.o crtend.o" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; sparc64-*-solaris2* | sparcv9-*-solaris2*) ! tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h" if test x$gnu_ld = xyes; then tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h" fi *************** sparc64-*-solaris2* | sparcv9-*-solaris2 *** 3151,3157 **** tmake_file="$tmake_file t-slibgcc-sld" fi extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o" - float_format=i128 if test x${enable_threads} = x ; then enable_threads=$have_pthread_h if test x${enable_threads} = x ; then --- 2483,2488 ---- *************** sparc64-*-solaris2* | sparcv9-*-solaris2 *** 3168,3174 **** ;; sparc-hal-solaris2*) xm_defines=POSIX ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/hal.h" tmake_file="sparc/t-halos sparc/t-sol2 sparc/t-crtfm" if test x$gnu_ld = xyes; then tm_file="${tm_file} sparc/sol2-gld.h" --- 2499,2505 ---- ;; sparc-hal-solaris2*) xm_defines=POSIX ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/hal.h" tmake_file="sparc/t-halos sparc/t-sol2 sparc/t-crtfm" if test x$gnu_ld = xyes; then tm_file="${tm_file} sparc/sol2-gld.h" *************** sparc-hal-solaris2*) *** 3177,3187 **** tmake_file="$tmake_file t-slibgcc-sld" fi extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o" - float_format=i128 thread_file='solaris' ;; sparc-*-solaris2*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h" if test x$gnu_ld = xyes; then tm_file="${tm_file} sparc/sol2-gld.h" fi --- 2508,2517 ---- tmake_file="$tmake_file t-slibgcc-sld" fi extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o" thread_file='solaris' ;; sparc-*-solaris2*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h" if test x$gnu_ld = xyes; then tm_file="${tm_file} sparc/sol2-gld.h" fi *************** sparc-*-solaris2*) *** 3192,3197 **** --- 2522,2532 ---- tmake_file="$tmake_file t-slibgcc-sld" fi case $machine in + *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) + if test x$gnu_ld = xno; then + tm_file="${tm_file} sparc/sol26-sld.h" + fi + ;; *-*-solaris2.[789]) tm_file="sparc/biarch64.h ${tm_file} sparc/sol2-bi.h" if test x$gnu_ld = xyes; then *************** sparc-*-solaris2*) *** 3203,3218 **** tmake_file="$tmake_file sparc/t-sol2-64" ;; esac - case $machine in - *-*-solaris2.[0-7] | *-*-solaris2.[0-7].*) - if test x$gnu_ld = xno; then - tm_file="${tm_file} sparc/sol27-sld.h" - fi - ;; - esac xm_defines=POSIX extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o" - float_format=i128 if test x${enable_threads} = x; then enable_threads=$have_pthread_h if test x${enable_threads} = x; then --- 2538,2545 ---- *************** sparclite-*-aout*) *** 3267,3273 **** tmake_file=sparc/t-sparclite ;; sparclite-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h" tmake_file="sparc/t-sparclite sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" ;; --- 2594,2600 ---- tmake_file=sparc/t-sparclite ;; sparclite-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h" tmake_file="sparc/t-sparclite sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" ;; *************** sparc86x-*-aout*) *** 3276,3282 **** tmake_file=sparc/t-sp86x ;; sparc86x-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h" tmake_file="sparc/t-sp86x sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" ;; --- 2603,2609 ---- tmake_file=sparc/t-sp86x ;; sparc86x-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h" tmake_file="sparc/t-sp86x sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" ;; *************** sparc64-*-aout*) *** 3284,3290 **** tm_file="sparc/sparc.h aoutos.h sparc/aout.h sparc/sp64-aout.h" ;; sparc64-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h" tmake_file="${tmake_file} sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" ;; --- 2611,2617 ---- tm_file="sparc/sparc.h aoutos.h sparc/aout.h sparc/sp64-aout.h" ;; sparc64-*-elf*) ! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h" tmake_file="${tmake_file} sparc/t-crtfm" extra_parts="crtbegin.o crtend.o" ;; *************** sparc64-*-freebsd*|ultrasparc-*-freebsd* *** 3298,3333 **** *) echo "$with_cpu not supported for freebsd target"; exit 1 ;; esac ;; ! sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux64 sparc/t-crtfm" tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gnu_ld=yes - float_format=sparc ;; sparc64-*-netbsd*) tmake_file="${tmake_file} sparc/t-netbsd64" tm_file="sparc/biarch64.h ${tm_file}" tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h" - float_format=sparc ;; strongarm-*-elf*) tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" tmake_file=arm/t-strongarm-elf out_file=arm/arm.c md_file=arm/arm.md ;; strongarm-*-coff*) tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h" tmake_file=arm/t-strongarm-coff out_file=arm/arm.c md_file=arm/arm.md ;; strongarm-*-pe) tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h arm/pe.h arm/strongarm-pe.h" tmake_file=arm/t-strongarm-pe out_file=arm/arm.c md_file=arm/arm.md extra_objs=pe.o ;; thumb*-*-*) --- 2625,2659 ---- *) echo "$with_cpu not supported for freebsd target"; exit 1 ;; esac ;; ! sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux64 sparc/t-crtfm" tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h" ;; sparc64-*-netbsd*) tmake_file="${tmake_file} sparc/t-netbsd64" tm_file="sparc/biarch64.h ${tm_file}" tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h" ;; strongarm-*-elf*) tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" tmake_file=arm/t-strongarm-elf out_file=arm/arm.c md_file=arm/arm.md + extra_modes=arm/arm-modes.def ;; strongarm-*-coff*) tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h" tmake_file=arm/t-strongarm-coff out_file=arm/arm.c md_file=arm/arm.md + extra_modes=arm/arm-modes.def ;; strongarm-*-pe) tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h arm/pe.h arm/strongarm-pe.h" tmake_file=arm/t-strongarm-pe out_file=arm/arm.c md_file=arm/arm.md + extra_modes=arm/arm-modes.def extra_objs=pe.o ;; thumb*-*-*) *************** v850-*-rtems*) *** 3348,3353 **** --- 2674,2694 ---- c_target_objs="v850-c.o" cxx_target_objs="v850-c.o" ;; + v850e-*-*) + target_cpu_default="TARGET_CPU_v850e" + tm_file="dbxelf.h elfos.h svr4.h v850/v850.h" + tm_p_file=v850/v850-protos.h + tmake_file=v850/t-v850 + md_file=v850/v850.md + out_file=v850/v850.c + if test x$stabs = xyes + then + tm_file="${tm_file} dbx.h" + fi + use_collect2=no + c_target_objs="v850-c.o" + cxx_target_objs="v850-c.o" + ;; v850-*-*) target_cpu_default="TARGET_CPU_generic" tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" *************** v850-*-*) *** 3361,3415 **** cxx_target_objs="v850-c.o" ;; vax-*-bsd*) # VAXen running BSD use_collect2=yes - float_format=vax ;; vax-*-sysv*) # VAXen running system V tm_file="${tm_file} vax/vaxv.h" xm_defines=POSIX - float_format=vax ;; vax-*-netbsdelf*) ! echo "GCC does not yet support the ${machine} target"; exit 1 ;; vax-*-netbsd*) tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h" tmake_file=t-netbsd ! float_format=vax use_collect2=yes ;; vax-*-openbsd*) tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}" - float_format=vax use_collect2=yes ;; vax-*-ultrix*) # VAXen running ultrix tm_file="${tm_file} vax/ultrix.h" - float_format=vax ;; vax-*-vms*) # VAXen running VMS xm_file=vax/xm-vms.h tm_file=vax/vms.h - float_format=vax ;; vax-*-*) # VAX default entry - float_format=vax - ;; - we32k-att-sysv*) - xm_defines=POSIX - use_collect2=yes ;; xscale-*-elf) tm_file="arm/xscale-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" tmake_file=arm/t-xscale-elf out_file=arm/arm.c md_file=arm/arm.md ;; xscale-*-coff) tm_file="arm/semi.h arm/aout.h arm/coff.h arm/xscale-coff.h arm/arm.h" tmake_file=arm/t-xscale-coff out_file=arm/arm.c md_file=arm/arm.md ;; xstormy16-*-elf) # For historical reasons, the target files omit the 'x'. --- 2702,2750 ---- cxx_target_objs="v850-c.o" ;; vax-*-bsd*) # VAXen running BSD + tm_file="${tm_file} vax/bsd.h" use_collect2=yes ;; vax-*-sysv*) # VAXen running system V tm_file="${tm_file} vax/vaxv.h" xm_defines=POSIX ;; vax-*-netbsdelf*) ! tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h" ! float_format=vax ;; vax-*-netbsd*) tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h" tmake_file=t-netbsd ! extra_parts="" use_collect2=yes ;; vax-*-openbsd*) tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}" use_collect2=yes ;; vax-*-ultrix*) # VAXen running ultrix tm_file="${tm_file} vax/ultrix.h" ;; vax-*-vms*) # VAXen running VMS xm_file=vax/xm-vms.h tm_file=vax/vms.h ;; vax-*-*) # VAX default entry ;; xscale-*-elf) tm_file="arm/xscale-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" tmake_file=arm/t-xscale-elf out_file=arm/arm.c md_file=arm/arm.md + extra_modes=arm/arm-modes.def ;; xscale-*-coff) tm_file="arm/semi.h arm/aout.h arm/coff.h arm/xscale-coff.h arm/arm.h" tmake_file=arm/t-xscale-coff out_file=arm/arm.c md_file=arm/arm.md + extra_modes=arm/arm-modes.def ;; xstormy16-*-elf) # For historical reasons, the target files omit the 'x'. *************** xtensa-*-elf*) *** 3430,3440 **** xtensa-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h" tmake_file="t-slibgcc-elf-ver t-linux xtensa/t-xtensa" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gas=yes gnu_ld=yes ;; *) ! echo "Configuration $machine not supported" 1>&2 exit 1 ;; esac --- 2765,2773 ---- xtensa-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h" tmake_file="t-slibgcc-elf-ver t-linux xtensa/t-xtensa" ;; *) ! echo "*** Configuration $machine not supported" 1>&2 exit 1 ;; esac *************** i586-*-*) *** 3464,3470 **** k6-*) target_cpu_default2=TARGET_CPU_DEFAULT_k6 ;; ! pentium_mmx-*) target_cpu_default2=TARGET_CPU_DEFAULT_pentium_mmx ;; *) --- 2797,2803 ---- k6-*) target_cpu_default2=TARGET_CPU_DEFAULT_k6 ;; ! pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*) target_cpu_default2=TARGET_CPU_DEFAULT_pentium_mmx ;; *) *************** hppa*-*-* | parisc*-*-*) *** 3566,3588 **** then target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY" fi ;; ! ! mips*-*-ecoff* | mips*-*-elf*) ! if test x$gas = xyes ! then ! if test x$gnu_ld = xyes then - target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR" - else target_cpu_default2="MASK_GAS" fi ! fi ! ;; ! mips*-*-*) ! if test x$gas = xyes then ! target_cpu_default2="MASK_GAS" fi ;; powerpc*-*-* | rs6000-*-*) --- 2899,2947 ---- then target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY" fi + case $machine in + hppa1* | parisc1*) + tm_defines="TARGET_SCHED_DEFAULT=\\\"7100LC\\\"" + ;; + esac ;; ! mips*-*-*) ! case $machine in ! mips*-*-ecoff* | mips*-*-elf*) ! if test x$gas = xyes ! then ! if test x$gnu_ld = xyes ! then ! target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR" ! else ! target_cpu_default2="MASK_GAS" ! fi ! fi ! ;; ! mips*-*-*) ! if test x$gas = xyes then target_cpu_default2="MASK_GAS" fi ! ;; ! esac ! case $machine in ! mips*el-*-*) ! tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines" ! ;; ! esac ! case $tm_file in ! *mips/elf.h* | *mips/elf64.h*) ! tm_defines="OBJECT_FORMAT_ELF $tm_defines" ! ;; ! esac ! if test "x$enable_gofast" = xyes then ! tm_defines="INIT_SUBTARGET_OPTABS=INIT_GOFAST_OPTABS $tm_defines" ! tm_file="gofast.h $tm_file" ! tmake_file="mips/t-gofast $tmake_file" ! else ! tmake_file="mips/t-mips $tmake_file" fi ;; powerpc*-*-* | rs6000-*-*) *************** powerpc*-*-* | rs6000-*-*) *** 3603,3609 **** x401 | x403 | x405 | xec603e | x801 | x821 | x823 | x860) target_cpu_default2="\\\"$with_cpu\\\"" - tm_file="$tm_file rs6000/softfloat.h" ;; xyes | xno) --- 2962,2967 ---- *************** powerpc*-*-* | rs6000-*-*) *** 3619,3624 **** --- 2977,2985 ---- fi ;; esac + c_target_objs="${c_target_objs} rs6000-c.o" + cxx_target_objs="${cxx_target_objs} rs6000-c.o" + tmake_file="${tmake_file} rs6000/t-rs6000-c-rule" ;; sparc*-*-*) case ".$with_cpu" in *************** sparc*-*-*) *** 3637,3642 **** --- 2998,3019 ---- ;; esac ;; + v850*-*-*) + case "x$with_cpu" in + x) + ;; + xv850e) + target_cpu_default2="TARGET_CPU_$with_cpu" + ;; + *) + if test x$pass2done = xyes + then + echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2 + exit 1 + fi + ;; + esac + ;; esac if test "$target_cpu_default2" != "" diff -Nrc3pad gcc-3.2.3/gcc/config.in gcc-3.3/gcc/config.in *** gcc-3.2.3/gcc/config.in 2003-04-22 06:56:18.000000000 +0000 --- gcc-3.3/gcc/config.in 2003-05-14 00:18:14.000000000 +0000 *************** *** 93,98 **** --- 93,101 ---- /* Define if you have the __argz_stringify function. */ #undef HAVE___ARGZ_STRINGIFY + /* Define if you have the alphasort function. */ + #undef HAVE_ALPHASORT + /* Define if you have the atoll function. */ #undef HAVE_ATOLL *************** *** 171,176 **** --- 174,182 ---- /* Define if you have the putenv function. */ #undef HAVE_PUTENV + /* Define if you have the scandir function. */ + #undef HAVE_SCANDIR + /* Define if you have the setenv function. */ #undef HAVE_SETENV *************** *** 273,311 **** /* Define to enable the use of a default assembler. */ #undef DEFAULT_ASSEMBLER - /* Define if you want more run-time sanity checks. This one gets a grab - bag of miscellaneous but relatively cheap checks. */ - #undef ENABLE_CHECKING - - /* Define if you want all operations on trees (the basic data - structure of the front ends) to be checked for dynamic type safety - at runtime. This is moderately expensive. */ - #undef ENABLE_TREE_CHECKING - - /* Define if you want all operations on RTL (the basic data structure - of the optimizer and back end) to be checked for dynamic type safety - at runtime. This is quite expensive. */ - #undef ENABLE_RTL_CHECKING - - /* Define if you want the garbage collector to do object poisoning and - other memory allocation checks. This is quite expensive. */ - #undef ENABLE_GC_CHECKING - - /* Define if you want the garbage collector to operate in maximally - paranoid mode, validating the entire heap and collecting garbage at - every opportunity. This is extremely expensive. */ - #undef ENABLE_GC_ALWAYS_COLLECT - - /* Define if you want to use __cxa_atexit, rather than atexit, to - register C++ destructors for local statics and global objects. - This is essential for fully standards-compliant handling of - destructors, but requires __cxa_atexit in libc. */ - #undef DEFAULT_USE_CXA_ATEXIT - - /* Define if you want the C and C++ compilers to support multibyte - character sets for source code. */ - #undef MULTIBYTE_CHARS - /* Define if your compiler understands volatile. */ #undef HAVE_VOLATILE --- 279,284 ---- *************** *** 339,344 **** --- 312,359 ---- /* Define if the host execution character set is EBCDIC. */ #undef HOST_EBCDIC + /* Define if you want more run-time sanity checks. This one gets a grab + bag of miscellaneous but relatively cheap checks. */ + #undef ENABLE_CHECKING + + /* Define if you want all operations on trees (the basic data + structure of the front ends) to be checked for dynamic type safety + at runtime. This is moderately expensive. */ + #undef ENABLE_TREE_CHECKING + + /* Define if you want all operations on RTL (the basic data structure + of the optimizer and back end) to be checked for dynamic type safety + at runtime. This is quite expensive. */ + #undef ENABLE_RTL_CHECKING + + /* Define if you want RTL flag accesses to be checked against the RTL + codes that are supported for each access macro. This is relatively + cheap. */ + #undef ENABLE_RTL_FLAG_CHECKING + + /* Define if you want the garbage collector to do object poisoning and + other memory allocation checks. This is quite expensive. */ + #undef ENABLE_GC_CHECKING + + /* Define if you want the garbage collector to operate in maximally + paranoid mode, validating the entire heap and collecting garbage at + every opportunity. This is extremely expensive. */ + #undef ENABLE_GC_ALWAYS_COLLECT + + /* Define if you want to run subprograms and generated programs + through valgrind (a memory checker). This is extremely expensive. */ + #undef ENABLE_VALGRIND_CHECKING + + /* Define if you want to use __cxa_atexit, rather than atexit, to + register C++ destructors for local statics and global objects. + This is essential for fully standards-compliant handling of + destructors, but requires __cxa_atexit in libc. */ + #undef DEFAULT_USE_CXA_ATEXIT + + /* Define if you want the C and C++ compilers to support multibyte + character sets for source code. */ + #undef MULTIBYTE_CHARS + /* Always define this when using the GNU C Library */ #undef _GNU_SOURCE *************** *** 430,435 **** --- 445,453 ---- #undef HAVE_DECL_ERRNO /* Define to 1 if we found this declaration otherwise define to 0. */ + #undef HAVE_DECL_VASPRINTF + + /* Define to 1 if we found this declaration otherwise define to 0. */ #undef HAVE_DECL_MALLOC /* Define to 1 if we found this declaration otherwise define to 0. */ *************** *** 459,464 **** --- 477,485 ---- /* Define to 1 if we found this declaration otherwise define to 0. */ #undef HAVE_DECL_GETRUSAGE + /* Define to `long' if doesn't define. */ + #undef rlim_t + /* Define to 1 if we found this declaration otherwise define to 0. */ #undef HAVE_DECL_TIMES *************** *** 468,476 **** --- 489,508 ---- /* Define if defines clock_t. */ #undef HAVE_CLOCK_T + /* Define .init_array/.fini_array sections are available and working. */ + #undef HAVE_INITFINI_ARRAY + /* Define if host mkdir takes a single argument. */ #undef MKDIR_TAKES_ONE_ARG + /* Define to the name of a file containing a list of extra machine modes + for this architecture. */ + #undef EXTRA_MODES_FILE + + /* Define if the target architecture needs extra machine modes to represent + the results of comparisons. */ + #undef EXTRA_CC_MODES + /* Define if you have the iconv() function. */ #undef HAVE_ICONV *************** *** 523,528 **** --- 555,563 ---- /* Define if your assembler supports marking sections with SHF_MERGE flag. */ #undef HAVE_GAS_SHF_MERGE + /* Define if your assembler supports thread-local storage. */ + #undef HAVE_AS_TLS + /* Define if your assembler supports explicit relocations. */ #undef HAVE_AS_EXPLICIT_RELOCS *************** *** 544,549 **** --- 579,587 ---- /* Define true if the assembler supports '.long foo@GOTOFF'. */ #undef HAVE_AS_GOTOFF_IN_DATA + /* Define if your assembler supports ltoffx and ldxmov relocations. */ + #undef HAVE_AS_LTOFFX_LDXMOV_RELOCS + /* Define if your assembler supports dwarf2 .file/.loc directives, and preserves file table indices exactly as given. */ #undef HAVE_AS_DWARF2_DEBUG_LINE *************** *** 554,565 **** --- 592,613 ---- /* Define if your assembler supports the --gstabs option. */ #undef HAVE_AS_GSTABS_DEBUG_FLAG + /* Define if your linker links a mix of read-only + and read-write sections into a read-write section. */ + #undef HAVE_LD_RO_RW_SECTION_MIXING + /* Define if your linker supports --eh-frame-hdr option. */ #undef HAVE_LD_EH_FRAME_HDR + /* Define if your MIPS libgloss linker scripts consistently include STARTUP directives. */ + #undef HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES + /* Define 0/1 to force the choice for exception handling model. */ #undef CONFIG_SJLJ_EXCEPTIONS + /* Define if gcc should use -lunwind. */ + #undef USE_LIBUNWIND_EXCEPTIONS + /* Bison unconditionally undefines `const' if neither `__STDC__' nor __cplusplus are defined. That's a problem since we use `const' in diff -Nrc3pad gcc-3.2.3/gcc/configure gcc-3.3/gcc/configure *** gcc-3.2.3/gcc/configure 2003-02-04 00:17:46.000000000 +0000 --- gcc-3.3/gcc/configure 2003-05-12 18:49:19.000000000 +0000 *************** ac_help="$ac_help *** 34,43 **** --enable-checking[=LIST] enable expensive run-time checks. With LIST, enable only specific categories of checks. ! Categories are: misc,tree,rtl,gc,gcac; default ! is misc,tree,gc" ac_help="$ac_help ! --disable-cpp don't provide a user-visible C preprocessor" ac_help="$ac_help --with-cpp-install-dir=DIR install the user visible C preprocessor in DIR --- 34,48 ---- --enable-checking[=LIST] enable expensive run-time checks. With LIST, enable only specific categories of checks. ! Categories are: misc,tree,rtl,rtlflag,gc,gcac; ! default is misc,tree,gc,rtlflag" ac_help="$ac_help ! --enable-coverage[=LEVEL] ! enable compiler\'s code coverage collection. ! Use to measure compiler performance and locate ! unused parts of the compiler. With LEVEL, specificy ! optimization. Values are opt, noopt, ! default is noopt" ac_help="$ac_help --with-cpp-install-dir=DIR install the user visible C preprocessor in DIR *************** ac_help="$ac_help *** 59,64 **** --- 64,71 ---- ac_help="$ac_help --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" ac_help="$ac_help + --enable-initfini-array use .init_array/.fini_array sections" + ac_help="$ac_help --enable-nls use Native Language Support (default)" ac_help="$ac_help --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" *************** ac_help="$ac_help *** 87,92 **** --- 94,101 ---- --enable-sjlj-exceptions arrange to use setjmp/longjmp exception handling" ac_help="$ac_help + --enable-libunwind-exceptions force use libunwind for exceptions" + ac_help="$ac_help --enable-version-specific-runtime-libs specify that runtime libraries should be installed in a compiler-specific directory" *************** program_suffix=NONE *** 109,115 **** program_transform_name=s,x,x, silent= site= - sitefile= srcdir= target=NONE verbose= --- 118,123 ---- *************** Configuration: *** 224,230 **** --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX --- 232,237 ---- *************** EOF *** 395,405 **** -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) --- 402,407 ---- *************** fi *** 565,580 **** srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. ! if test -z "$sitefile"; then ! if test -z "$CONFIG_SITE"; then ! if test "x$prefix" != xNONE; then ! CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" ! else ! CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" ! fi fi - else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then --- 567,578 ---- srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. ! if test -z "$CONFIG_SITE"; then ! if test "x$prefix" != xNONE; then ! CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" ! else ! CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then *************** copy=cp *** 629,635 **** # - two terminals occur directly after each other # - the path contains an element with a dot in it echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 ! echo "configure:633: checking LIBRARY_PATH variable" >&5 case ${LIBRARY_PATH} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) library_path_setting="contains current directory" --- 627,633 ---- # - two terminals occur directly after each other # - the path contains an element with a dot in it echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 ! echo "configure:631: checking LIBRARY_PATH variable" >&5 case ${LIBRARY_PATH} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) library_path_setting="contains current directory" *************** fi *** 654,660 **** # - two terminals occur directly after each other # - the path contains an element with a dot in it echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 ! echo "configure:658: checking GCC_EXEC_PREFIX variable" >&5 case ${GCC_EXEC_PREFIX} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) gcc_exec_prefix_setting="contains current directory" --- 652,658 ---- # - two terminals occur directly after each other # - the path contains an element with a dot in it echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 ! echo "configure:656: checking GCC_EXEC_PREFIX variable" >&5 case ${GCC_EXEC_PREFIX} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) gcc_exec_prefix_setting="contains current directory" *************** if test x${gcc_gxx_include_dir} = x; the *** 793,998 **** fi fi - # Determine whether or not multilibs are enabled. - # Check whether --enable-multilib or --disable-multilib was given. - if test "${enable_multilib+set}" = set; then - enableval="$enable_multilib" - : - else - enable_multilib=yes - fi - - - - # Enable expensive internal checks - # Check whether --enable-checking or --disable-checking was given. - if test "${enable_checking+set}" = set; then - enableval="$enable_checking" - ac_checking= - ac_tree_checking= - ac_rtl_checking= - ac_gc_checking= - ac_gc_always_collect= - case "${enableval}" in - yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;; - no) ;; - *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," - set fnord $enableval; shift - IFS="$ac_save_IFS" - for check - do - case $check in - misc) ac_checking=1 ;; - tree) ac_tree_checking=1 ;; - rtl) ac_rtl_checking=1 ;; - gc) ac_gc_checking=1 ;; - gcac) ac_gc_always_collect=1 ;; - *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; - esac - done - ;; - esac - - fi - - if test x$ac_checking != x ; then - cat >> confdefs.h <<\EOF - #define ENABLE_CHECKING 1 - EOF - - fi - if test x$ac_tree_checking != x ; then - cat >> confdefs.h <<\EOF - #define ENABLE_TREE_CHECKING 1 - EOF - - fi - if test x$ac_rtl_checking != x ; then - cat >> confdefs.h <<\EOF - #define ENABLE_RTL_CHECKING 1 - EOF - - fi - if test x$ac_gc_checking != x ; then - cat >> confdefs.h <<\EOF - #define ENABLE_GC_CHECKING 1 - EOF - - fi - if test x$ac_gc_always_collect != x ; then - cat >> confdefs.h <<\EOF - #define ENABLE_GC_ALWAYS_COLLECT 1 - EOF - - fi - - - # Check whether --enable-cpp or --disable-cpp was given. - if test "${enable_cpp+set}" = set; then - enableval="$enable_cpp" - : - else - enable_cpp=yes - fi - - - # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. - if test "${with_cpp_install_dir+set}" = set; then - withval="$with_cpp_install_dir" - if test x$withval = xyes; then - { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } - elif test x$withval != xno; then - cpp_install_dir=$withval - fi - fi - - - # Enable __cxa_atexit for C++. - # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. - if test "${enable___cxa_atexit+set}" = set; then - enableval="$enable___cxa_atexit" - : - fi - - if test x$enable___cxa_atexit = xyes; then - cat >> confdefs.h <<\EOF - #define DEFAULT_USE_CXA_ATEXIT 1 - EOF - - fi - - # Enable Multibyte Characters for C/C++ - # Check whether --enable-c-mbchar or --disable-c-mbchar was given. - if test "${enable_c_mbchar+set}" = set; then - enableval="$enable_c_mbchar" - if test x$enable_c_mbchar != xno; then - cat >> confdefs.h <<\EOF - #define MULTIBYTE_CHARS 1 - EOF - - fi - fi - - - # Enable threads - # Pass with no value to take the default - # Pass with a value to specify a thread package - # Check whether --enable-threads or --disable-threads was given. - if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - : - else - enable_threads='' - fi - - - enable_threads_flag=$enable_threads - # Check if a valid thread package - case x${enable_threads_flag} in - x | xno) - # No threads - target_thread_file='single' - ;; - xyes) - # default - target_thread_file='' - ;; - xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ - xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix) - target_thread_file=$enable_threads_flag - ;; - *) - echo "$enable_threads is an unknown thread package" 1>&2 - exit 1 - ;; - esac - - # Check whether --enable-objc-gc or --disable-objc-gc was given. - if test "${enable_objc_gc+set}" = set; then - enableval="$enable_objc_gc" - if test x$enable_objc_gc = xno; then - objc_boehm_gc='' - else - objc_boehm_gc=1 - fi - else - objc_boehm_gc='' - fi - - - # Check whether --with-dwarf2 or --without-dwarf2 was given. - if test "${with_dwarf2+set}" = set; then - withval="$with_dwarf2" - dwarf2="$with_dwarf2" - else - dwarf2=no - fi - - - # Check whether --enable-shared or --disable-shared was given. - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - - case $enable_shared in - yes | no) ;; - *) - enable_shared=no - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; - esac - - else - enable_shared=yes - fi - - - # Determine the host, build, and target systems ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do --- 791,796 ---- *************** else { echo "configure: error: can not r *** 1041,1047 **** fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:1045: checking host system type" >&5 host_alias=$host case "$host_alias" in --- 839,845 ---- fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:843: checking host system type" >&5 host_alias=$host case "$host_alias" in *************** host_os=`echo $host | sed 's/^\([^-]*\)- *** 1062,1068 **** echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:1066: checking target system type" >&5 target_alias=$target case "$target_alias" in --- 860,866 ---- echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:864: checking target system type" >&5 target_alias=$target case "$target_alias" in *************** target_os=`echo $target | sed 's/^\([^-] *** 1080,1086 **** echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1084: checking build system type" >&5 build_alias=$build case "$build_alias" in --- 878,884 ---- echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:882: checking build system type" >&5 build_alias=$build case "$build_alias" in *************** test "$program_transform_name" = "" && p *** 1128,1134 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1132: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 926,932 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:930: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -z "$CC"; then *** 1158,1164 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1162: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 956,962 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:960: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1209,1215 **** # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1213: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1007,1013 ---- # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1011: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1241,1247 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1245: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 1039,1045 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1043: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** cross_compiling=$ac_cv_prog_cc_cross *** 1252,1263 **** cat > conftest.$ac_ext << EOF ! #line 1256 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then --- 1050,1061 ---- cat > conftest.$ac_ext << EOF ! #line 1054 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then *************** if test $ac_cv_prog_cc_works = no; then *** 1283,1294 **** { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1287: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1292: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1081,1092 ---- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1085: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1090: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1297,1303 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 1095,1101 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** ac_test_CFLAGS="${CFLAGS+set}" *** 1316,1322 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1320: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1114,1120 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1118: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1349,1358 **** if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 ! echo "configure:1353: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 ! echo "configure:1356: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" --- 1147,1156 ---- if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 ! echo "configure:1151: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 ! echo "configure:1154: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" *************** else *** 1364,1379 **** # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. ! if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : --- 1162,1177 ---- # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. ! if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : *************** fi *** 1419,1425 **** # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1423: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1217,1223 ---- # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1221: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1451,1457 **** # Extract the first word of "gnatbind", so it can be a program name with args. set dummy gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1455: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1249,1255 ---- # Extract the first word of "gnatbind", so it can be a program name with args. set dummy gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1253: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1484,1490 **** fi echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 ! echo "configure:1488: checking for compiler driver that understands Ada" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1282,1288 ---- fi echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 ! echo "configure:1286: checking for compiler driver that understands Ada" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** procedure conftest is begin null; end co *** 1493,1502 **** EOF gcc_cv_prog_adac=no # Have to do ac_tool_prefix and user overrides by hand. ! user_adac=$ADAC ! user_cc=$CC ! for cand in ${ac_tool_prefix}$user_adac $user_adac \ ! ${ac_tool_prefix}$user_cc $user_cc \ ${ac_tool_prefix}gcc gcc \ ${ac_tool_prefix}cc cc \ ${ac_tool_prefix}gnatgcc gnatgcc \ --- 1291,1297 ---- EOF gcc_cv_prog_adac=no # Have to do ac_tool_prefix and user overrides by hand. ! for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ ${ac_tool_prefix}gcc gcc \ ${ac_tool_prefix}cc cc \ ${ac_tool_prefix}gnatgcc gnatgcc \ *************** fi *** 1529,1549 **** echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 ! echo "configure:1533: checking whether ${CC-cc} accepts -Wno-long-long" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else save_CFLAGS="$CFLAGS" CFLAGS="-Wno-long-long" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_cc_no_long_long=yes else --- 1324,1344 ---- echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 ! echo "configure:1328: checking whether ${CC-cc} accepts -Wno-long-long" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else save_CFLAGS="$CFLAGS" CFLAGS="-Wno-long-long" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_cc_no_long_long=yes else *************** echo "$ac_t""$ac_cv_prog_cc_no_long_long *** 1560,1566 **** if test x$have_gnat != xno ; then echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 ! echo "configure:1564: checking whether ${ADAC} accepts -Wno-long-long" >&5 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1355,1361 ---- if test x$have_gnat != xno ; then echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 ! echo "configure:1359: checking whether ${ADAC} accepts -Wno-long-long" >&5 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1588,1594 **** echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1592: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= --- 1383,1389 ---- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1387: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** else *** 1603,1615 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 1398,1410 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 1620,1632 **** rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 1415,1427 ---- rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 1637,1649 **** rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 1432,1444 ---- rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** fi *** 1668,1688 **** echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6 ! echo "configure:1672: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else --- 1463,1483 ---- echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6 ! echo "configure:1467: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else *************** EOF *** 1708,1726 **** esac echo $ac_n "checking for volatile""... $ac_c" 1>&6 ! echo "configure:1712: checking for volatile" >&5 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c_volatile=yes else --- 1503,1521 ---- esac echo $ac_n "checking for volatile""... $ac_c" 1>&6 ! echo "configure:1507: checking for volatile" >&5 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c_volatile=yes else *************** fi *** 1742,1748 **** echo $ac_n "checking for long double""... $ac_c" 1>&6 ! echo "configure:1746: checking for long double" >&5 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1537,1543 ---- echo $ac_n "checking for long double""... $ac_c" 1>&6 ! echo "configure:1541: checking for long double" >&5 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1750,1756 **** gcc_cv_c_long_double=yes else cat > conftest.$ac_ext < conftest.$ac_ext <= sizeof(double)):; ; return 0; } EOF ! if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c_long_double=yes else --- 1555,1561 ---- switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; ; return 0; } EOF ! if { (eval echo configure:1559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c_long_double=yes else *************** EOF *** 1782,1800 **** fi echo $ac_n "checking for long long int""... $ac_c" 1>&6 ! echo "configure:1786: checking for long long int" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_long=yes else --- 1577,1595 ---- fi echo $ac_n "checking for long long int""... $ac_c" 1>&6 ! echo "configure:1581: checking for long long int" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_long=yes else *************** EOF *** 1814,1832 **** fi echo $ac_n "checking for __int64""... $ac_c" 1>&6 ! echo "configure:1818: checking for __int64" >&5 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c___int64=yes else --- 1609,1627 ---- fi echo $ac_n "checking for __int64""... $ac_c" 1>&6 ! echo "configure:1613: checking for __int64" >&5 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c___int64=yes else *************** EOF *** 1847,1865 **** fi echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 ! echo "configure:1851: checking for built-in _Bool" >&5 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c__bool=yes else --- 1642,1660 ---- fi echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 ! echo "configure:1646: checking for built-in _Bool" >&5 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c__bool=yes else *************** fi *** 1883,1895 **** # sizeof(char) is 1 by definition. echo $ac_n "checking size of short""... $ac_c" 1>&6 ! echo "configure:1887: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 1678,1690 ---- # sizeof(char) is 1 by definition. echo $ac_n "checking size of short""... $ac_c" 1>&6 ! echo "configure:1682: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 1899,1905 **** switch (0) case 0: case (sizeof (short) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_short=$ac_size else --- 1694,1700 ---- switch (0) case 0: case (sizeof (short) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_short=$ac_size else *************** EOF *** 1922,1934 **** echo $ac_n "checking size of int""... $ac_c" 1>&6 ! echo "configure:1926: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 1717,1729 ---- echo $ac_n "checking size of int""... $ac_c" 1>&6 ! echo "configure:1721: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 1938,1944 **** switch (0) case 0: case (sizeof (int) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_int=$ac_size else --- 1733,1739 ---- switch (0) case 0: case (sizeof (int) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_int=$ac_size else *************** EOF *** 1961,1973 **** echo $ac_n "checking size of long""... $ac_c" 1>&6 ! echo "configure:1965: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 1756,1768 ---- echo $ac_n "checking size of long""... $ac_c" 1>&6 ! echo "configure:1760: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 1977,1983 **** switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else --- 1772,1778 ---- switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else *************** EOF *** 2001,2013 **** if test $ac_cv_c_long_long = yes; then echo $ac_n "checking size of long long""... $ac_c" 1>&6 ! echo "configure:2005: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 1796,1808 ---- if test $ac_cv_c_long_long = yes; then echo $ac_n "checking size of long long""... $ac_c" 1>&6 ! echo "configure:1800: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 2017,2023 **** switch (0) case 0: case (sizeof (long long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_long=$ac_size else --- 1812,1818 ---- switch (0) case 0: case (sizeof (long long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_long=$ac_size else *************** EOF *** 2042,2054 **** fi if test $ac_cv_c___int64 = yes; then echo $ac_n "checking size of __int64""... $ac_c" 1>&6 ! echo "configure:2046: checking size of __int64" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 1837,1849 ---- fi if test $ac_cv_c___int64 = yes; then echo $ac_n "checking size of __int64""... $ac_c" 1>&6 ! echo "configure:1841: checking size of __int64" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 2058,2064 **** switch (0) case 0: case (sizeof (__int64) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:2062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof___int64=$ac_size else --- 1853,1859 ---- switch (0) case 0: case (sizeof (__int64) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:1857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof___int64=$ac_size else *************** EOF *** 2083,2094 **** fi echo $ac_n "checking execution character set""... $ac_c" 1>&6 ! echo "configure:2087: checking execution character set" >&5 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1882: checking execution character set" >&5 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&2; exit 1; } ;; + esac + done + ;; + esac + + fi + + nocommon_flag="" + if test x$ac_checking != x ; then + cat >> confdefs.h <<\EOF + #define ENABLE_CHECKING 1 + EOF + + nocommon_flag=-fno-common + fi + + if test x$ac_tree_checking != x ; then + cat >> confdefs.h <<\EOF + #define ENABLE_TREE_CHECKING 1 + EOF + + fi + if test x$ac_rtl_checking != x ; then + cat >> confdefs.h <<\EOF + #define ENABLE_RTL_CHECKING 1 + EOF + + fi + if test x$ac_rtlflag_checking != x ; then + cat >> confdefs.h <<\EOF + #define ENABLE_RTL_FLAG_CHECKING 1 + EOF + + fi + if test x$ac_gc_checking != x ; then + cat >> confdefs.h <<\EOF + #define ENABLE_GC_CHECKING 1 + EOF + + fi + if test x$ac_gc_always_collect != x ; then + cat >> confdefs.h <<\EOF + #define ENABLE_GC_ALWAYS_COLLECT 1 + EOF + + fi + valgrind_path_defines= + valgrind_command= + if test x$ac_checking_valgrind != x ; then + # It is certainly possible that there's valgrind but no valgrind.h. + # GCC relies on making annotations so we must have both. + ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 + echo "configure:2034: checking for valgrind.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:2044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_valgrind_h=yes + else + echo "$ac_t""no" 1>&6 + have_valgrind_h=no + fi + + # Extract the first word of "valgrind", so it can be a program name with args. + set dummy valgrind; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:2069: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$valgrind_path" in + /*) + ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then + ac_cv_path_valgrind_path="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + ;; + esac + fi + valgrind_path="$ac_cv_path_valgrind_path" + if test -n "$valgrind_path"; then + echo "$ac_t""$valgrind_path" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then + { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; } + fi + valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' + valgrind_command="$valgrind_path -q" + cat >> confdefs.h <<\EOF + #define ENABLE_VALGRIND_CHECKING 1 + EOF + + fi + + + + # Enable code coverage collection + # Check whether --enable-coverage or --disable-coverage was given. + if test "${enable_coverage+set}" = set; then + enableval="$enable_coverage" + case "${enableval}" in + yes|noopt) + coverage_flags="-fprofile-arcs -ftest-coverage -O0" + ;; + opt) + coverage_flags="-fprofile-arcs -ftest-coverage -O2" + ;; + *) + { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } + ;; + esac + else + coverage_flags="" + fi + + + + # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. + if test "${with_cpp_install_dir+set}" = set; then + withval="$with_cpp_install_dir" + if test x$withval = xyes; then + { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } + elif test x$withval != xno; then + cpp_install_dir=$withval + fi + fi + + + # Enable __cxa_atexit for C++. + # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. + if test "${enable___cxa_atexit+set}" = set; then + enableval="$enable___cxa_atexit" + : + fi + + if test x$enable___cxa_atexit = xyes; then + cat >> confdefs.h <<\EOF + #define DEFAULT_USE_CXA_ATEXIT 1 + EOF + + fi + + # Enable Multibyte Characters for C/C++ + # Check whether --enable-c-mbchar or --disable-c-mbchar was given. + if test "${enable_c_mbchar+set}" = set; then + enableval="$enable_c_mbchar" + if test x$enable_c_mbchar != xno; then + cat >> confdefs.h <<\EOF + #define MULTIBYTE_CHARS 1 + EOF + + fi + fi + + + # Enable threads + # Pass with no value to take the default + # Pass with a value to specify a thread package + # Check whether --enable-threads or --disable-threads was given. + if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + : + else + enable_threads='' + fi + + + enable_threads_flag=$enable_threads + # Check if a valid thread package + case x${enable_threads_flag} in + x | xno) + # No threads + target_thread_file='single' + ;; + xyes) + # default + target_thread_file='' + ;; + xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ + xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix) + target_thread_file=$enable_threads_flag + ;; + *) + echo "$enable_threads is an unknown thread package" 1>&2 + exit 1 + ;; + esac + + # Check whether --enable-objc-gc or --disable-objc-gc was given. + if test "${enable_objc_gc+set}" = set; then + enableval="$enable_objc_gc" + if test x$enable_objc_gc = xno; then + objc_boehm_gc='' + else + objc_boehm_gc=1 + fi + else + objc_boehm_gc='' + fi + + + # Check whether --with-dwarf2 or --without-dwarf2 was given. + if test "${with_dwarf2+set}" = set; then + withval="$with_dwarf2" + dwarf2="$with_dwarf2" + else + dwarf2=no + fi + + + # Check whether --enable-shared or --disable-shared was given. + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + + case $enable_shared in + yes | no) ;; + *) + enable_shared=no + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; + esac + + else + enable_shared=yes + fi + + + # Stage specific cflags for build. stage1_cflags= case $build in *************** esac *** 2165,2171 **** echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2169: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2268,2274 ---- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2272: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** fi *** 2193,2199 **** echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 ! echo "configure:2197: checking whether a default assembler was specified" >&5 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test x"$gas_flag" = x"no"; then echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 --- 2296,2302 ---- echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 ! echo "configure:2300: checking whether a default assembler was specified" >&5 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test x"$gas_flag" = x"no"; then echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 *************** else *** 2205,2211 **** fi echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 ! echo "configure:2209: checking whether a default linker was specified" >&5 if test x"${DEFAULT_LINKER+set}" = x"set"; then if test x"$gnu_ld_flag" = x"no"; then echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 --- 2308,2314 ---- fi echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 ! echo "configure:2312: checking whether a default linker was specified" >&5 if test x"${DEFAULT_LINKER+set}" = x"set"; then if test x"$gnu_ld_flag" = x"no"; then echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 *************** else *** 2217,2228 **** fi echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 ! echo "configure:2221: checking for GNU C library" >&5 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { --- 2320,2331 ---- fi echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 ! echo "configure:2324: checking for GNU C library" >&5 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { *************** int main() { *** 2232,2238 **** #endif ; return 0; } EOF ! if { (eval echo configure:2236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_glibc=yes else --- 2335,2341 ---- #endif ; return 0; } EOF ! if { (eval echo configure:2339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_glibc=yes else *************** EOF *** 2253,2264 **** fi # Find some useful tools ! for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2262: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2356,2367 ---- fi # Find some useful tools ! for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2365: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test -n "$AWK" && break *** 2288,2294 **** done echo $ac_n "checking whether ln works""... $ac_c" 1>&6 ! echo "configure:2292: checking whether ln works" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2391,2397 ---- done echo $ac_n "checking whether ln works""... $ac_c" 1>&6 ! echo "configure:2395: checking whether ln works" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2320,2326 **** fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:2324: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2423,2429 ---- fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:2427: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2354,2360 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2358: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2457,2463 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2461: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2392,2398 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2396: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2495,2501 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2499: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_DATA" && INSTALL_DATA= *** 2443,2454 **** echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2447: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2546,2557 ---- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2550: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** else *** 2456,2462 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2559,2565 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** rm -f conftest* *** 2473,2479 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2576,2582 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** fi *** 2491,2497 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2594,2600 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** if test "$cross_compiling" = yes; then *** 2512,2518 **** : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 2615,2621 ---- : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** if (XOR (islower (i), ISLOWER (i)) || to *** 2523,2529 **** exit (0); } EOF ! if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else --- 2626,2632 ---- exit (0); } EOF ! if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else *************** EOF *** 2547,2558 **** fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:2551: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2650,2661 ---- fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:2654: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** int main() { *** 2561,2567 **** struct tm *tp; ; return 0; } EOF ! if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else --- 2664,2670 ---- struct tm *tp; ; return 0; } EOF ! if { (eval echo configure:2668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else *************** EOF *** 2582,2600 **** fi echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 ! echo "configure:2586: checking for working stdbool.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { bool foo = false; ; return 0; } EOF ! if { (eval echo configure:2598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_stdbool_h=yes else --- 2685,2703 ---- fi echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 ! echo "configure:2689: checking for working stdbool.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { bool foo = false; ; return 0; } EOF ! if { (eval echo configure:2701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_stdbool_h=yes else *************** EOF *** 2615,2626 **** fi echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 ! echo "configure:2619: checking whether string.h and strings.h may both be included" >&5 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2718,2729 ---- fi echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 ! echo "configure:2722: checking whether string.h and strings.h may both be included" >&5 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** int main() { *** 2628,2634 **** ; return 0; } EOF ! if { (eval echo configure:2632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_header_string=yes else --- 2731,2737 ---- ; return 0; } EOF ! if { (eval echo configure:2735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_header_string=yes else *************** EOF *** 2649,2660 **** fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:2653: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2752,2763 ---- fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:2756: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** wait (&s); *** 2670,2676 **** s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else --- 2773,2779 ---- s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:2777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else *************** for ac_hdr in limits.h stddef.h string.h *** 2697,2713 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2701: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2800,2816 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2804: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** done *** 2737,2753 **** # Check for thread headers. ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for thread.h""... $ac_c" 1>&6 ! echo "configure:2741: checking for thread.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2840,2856 ---- # Check for thread headers. ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for thread.h""... $ac_c" 1>&6 ! echo "configure:2844: checking for thread.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** fi *** 2771,2787 **** ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 ! echo "configure:2775: checking for pthread.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2874,2890 ---- ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 ! echo "configure:2878: checking for pthread.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** fi *** 2806,2817 **** # These tests can't be done till we know if we have limits.h. echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 ! echo "configure:2810: checking for CHAR_BIT" >&5 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2909,2920 ---- # These tests can't be done till we know if we have limits.h. echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 ! echo "configure:2913: checking for CHAR_BIT" >&5 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** fi *** 2836,2842 **** echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 if test $gcc_cv_decl_char_bit = no; then echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 ! echo "configure:2840: checking number of bits in a byte" >&5 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2939,2945 ---- echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 if test $gcc_cv_decl_char_bit = no; then echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 ! echo "configure:2943: checking number of bits in a byte" >&5 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2844,2850 **** gcc_cv_c_nbby= while test $i -lt 65; do cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c_nbby=$i; break else --- 2957,2963 ---- ; } ; return 0; } EOF ! if { (eval echo configure:2961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_c_nbby=$i; break else *************** EOF *** 2879,2885 **** fi fi echo $ac_n "checking byte ordering""... $ac_c" 1>&6 ! echo "configure:2883: checking byte ordering" >&5 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2982,2988 ---- fi fi echo $ac_n "checking byte ordering""... $ac_c" 1>&6 ! echo "configure:2986: checking byte ordering" >&5 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 2893,2899 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then od -c conftest.o | sed 's/^[0-7]*[ ]*/ / s/\*/./g --- 3016,3022 ---- 'X', '\n' }; EOF ! if { (eval echo configure:3020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then od -c conftest.o | sed 's/^[0-7]*[ ]*/ / s/\*/./g *************** EOF *** 2952,2958 **** fi echo $ac_n "checking floating point format""... $ac_c" 1>&6 ! echo "configure:2956: checking floating point format" >&5 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3055,3061 ---- fi echo $ac_n "checking floating point format""... $ac_c" 1>&6 ! echo "configure:3059: checking floating point format" >&5 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 2965,2971 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then od -c conftest.o | sed 's/^[0-7]*[ ]*/ / s/\*/./g --- 3090,3096 ---- C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ }; EOF ! if { (eval echo configure:3094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then od -c conftest.o | sed 's/^[0-7]*[ ]*/ / s/\*/./g *************** fi *** 3076,3082 **** # Extract the first word of "mktemp", so it can be a program name with args. set dummy mktemp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3080: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3179,3185 ---- # Extract the first word of "mktemp", so it can be a program name with args. set dummy mktemp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3183: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3115,3121 **** # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3119: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3218,3224 ---- # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3222: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 3144,3159 **** if test -n "$MAKEINFO"; then # Found it, now check the version. echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 ! echo "configure:3148: checking for modern makeinfo" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` ! echo "configure:3154: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; ! 4.[1-9]*) gcc_cv_prog_makeinfo_modern=yes;; *) gcc_cv_prog_makeinfo_modern=no;; esac --- 3247,3262 ---- if test -n "$MAKEINFO"; then # Found it, now check the version. echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 ! echo "configure:3251: checking for modern makeinfo" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` ! echo "configure:3257: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; ! 4.[2-9]*) gcc_cv_prog_makeinfo_modern=yes;; *) gcc_cv_prog_makeinfo_modern=no;; esac *************** fi *** 3178,3184 **** # Is pod2man recent enough to regenerate manpages? echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 ! echo "configure:3182: checking for recent Pod::Man" >&5 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then echo "$ac_t""yes" 1>&6 GENERATED_MANPAGES=generated-manpages --- 3281,3287 ---- # Is pod2man recent enough to regenerate manpages? echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 ! echo "configure:3285: checking for recent Pod::Man" >&5 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then echo "$ac_t""yes" 1>&6 GENERATED_MANPAGES=generated-manpages *************** else *** 3194,3200 **** # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3198: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3297,3303 ---- # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3301: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3211,3217 **** fi done IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false" fi fi FLEX="$ac_cv_prog_FLEX" --- 3314,3320 ---- fi done IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" fi fi FLEX="$ac_cv_prog_FLEX" *************** else *** 3231,3237 **** # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3235: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3334,3340 ---- # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:3338: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3248,3254 **** fi done IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false" fi fi BISON="$ac_cv_prog_BISON" --- 3351,3357 ---- fi done IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" fi fi BISON="$ac_cv_prog_BISON" *************** fi *** 3263,3269 **** # These libraries may be used by collect2. # We may need a special search path to get them linked. echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 ! echo "configure:3267: checking for collect2 libraries" >&5 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3366,3372 ---- # These libraries may be used by collect2. # We may need a special search path to get them linked. echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 ! echo "configure:3370: checking for collect2 libraries" >&5 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** for libs in '' -lld -lmld \ *** 3274,3280 **** do LIBS="$libs" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gcc_cv_collect2_libs="$libs"; break else --- 3388,3394 ---- ldopen() ; return 0; } EOF ! if { (eval echo configure:3392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gcc_cv_collect2_libs="$libs"; break else *************** save_LIBS="$LIBS" *** 3311,3324 **** LIBS= echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 ! echo "configure:3315: checking for library containing exc_resume" >&5 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_exc_resume="no" cat > conftest.$ac_ext <&6 ! echo "configure:3418: checking for library containing exc_resume" >&5 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_exc_resume="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_exc_resume="none required" else --- 3432,3438 ---- exc_resume() ; return 0; } EOF ! if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_exc_resume="none required" else *************** rm -f conftest* *** 3340,3346 **** test "$ac_cv_search_exc_resume" = "no" && for i in exc; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_exc_resume="-l$i" break --- 3454,3460 ---- exc_resume() ; return 0; } EOF ! if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_exc_resume="-l$i" break *************** GNAT_LIBEXC="$LIBS" *** 3375,3391 **** LIBS="$save_LIBS" # See if the stage1 system preprocessor understands the ANSI C # preprocessor stringification operator. (Used by symcat.h.) echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 ! echo "configure:3384: checking for preprocessor stringizing operator" >&5 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:3488: checking for library containing ldexp" >&5 + if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_func_search_save_LIBS="$LIBS" + ac_cv_search_ldexp="no" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_ldexp="none required" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* + test "$ac_cv_search_ldexp" = "no" && for i in m; do + LIBS="-l$i $ac_func_search_save_LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_ldexp="-l$i" + break + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* + done + LIBS="$ac_func_search_save_LIBS" + fi + + echo "$ac_t""$ac_cv_search_ldexp" 1>&6 + if test "$ac_cv_search_ldexp" != "no"; then + test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" + + else : + + fi + LDEXP_LIB="$LIBS" + LIBS="$save_LIBS" + + # See if the stage1 system preprocessor understands the ANSI C # preprocessor stringification operator. (Used by symcat.h.) echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 ! echo "configure:3557: checking for preprocessor stringizing operator" >&5 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 *** 3418,3429 **** # Use only if it exists, # doesn't clash with , and declares intmax_t. echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 ! echo "configure:3422: checking for inttypes.h" >&5 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 3591,3602 ---- # Use only if it exists, # doesn't clash with , and declares intmax_t. echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 ! echo "configure:3595: checking for inttypes.h" >&5 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** int main() { *** 3431,3437 **** intmax_t i = -1; ; return 0; } EOF ! if { (eval echo configure:3435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_header_inttypes_h=yes else --- 3604,3610 ---- intmax_t i = -1; ; return 0; } EOF ! if { (eval echo configure:3608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_header_inttypes_h=yes else *************** fi *** 3454,3468 **** for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ ! fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3461: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3635: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 3659,3665 ---- ; return 0; } EOF ! if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3511,3522 **** echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 ! echo "configure:3515: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 3685,3696 ---- echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 ! echo "configure:3689: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** fi *** 3547,3558 **** # Try to determine the array type of the second argument of getgroups # for the target system (int or gid_t). echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:3551: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF --- 3721,3732 ---- # Try to determine the array type of the second argument of getgroups # for the target system (int or gid_t). echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:3725: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF *************** EOF *** 3581,3587 **** fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 ! echo "configure:3585: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3755,3761 ---- fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 ! echo "configure:3759: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3589,3595 **** ac_cv_type_getgroups=cross else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else --- 3788,3794 ---- } EOF ! if { (eval echo configure:3792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else *************** fi *** 3628,3634 **** if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF --- 3802,3808 ---- if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF *************** fi *** 3669,3675 **** echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 ! echo "configure:3673: checking whether the printf functions support %p" >&5 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3843,3849 ---- echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 ! echo "configure:3847: checking whether the printf functions support %p" >&5 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3677,3683 **** gcc_cv_func_printf_ptr=no else cat > conftest.$ac_ext < --- 3851,3857 ---- gcc_cv_func_printf_ptr=no else cat > conftest.$ac_ext < *************** int main() *** 3690,3696 **** return (p != q); } EOF ! if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gcc_cv_func_printf_ptr=yes else --- 3864,3870 ---- return (p != q); } EOF ! if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gcc_cv_func_printf_ptr=yes else *************** case "${host}" in *** 3728,3739 **** ;; esac echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ! echo "configure:3732: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 3902,3913 ---- ;; esac echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ! echo "configure:3906: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** fi *** 3762,3778 **** ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 ! echo "configure:3766: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 3936,3952 ---- ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 ! echo "configure:3940: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** else *** 3797,3814 **** fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 ! echo "configure:3801: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 ! echo "configure:3807: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3975: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 ! echo "configure:3981: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else --- 4005,4011 ---- ; return 0; } EOF ! if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else *************** fi *** 3853,3859 **** ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < --- 4027,4033 ---- ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < *************** main() { *** 3948,3954 **** } } EOF ! if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else --- 4122,4128 ---- } } EOF ! if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else *************** fi *** 3973,3984 **** for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3977: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4151: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4175,4181 ---- ; return 0; } EOF ! if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** main () *** 4272,4298 **** EOF echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6 ! echo "configure:4276: checking for working mmap from /dev/zero" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! # If this is not cygwin, and /dev/zero is a character device, it's probably ! # safe to assume it works. case "$host_os" in cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; ! * ) if test -c /dev/zero ! then ac_cv_func_mmap_dev_zero=yes ! else ac_cv_func_mmap_dev_zero=no ! fi ;; esac else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_dev_zero=yes else --- 4446,4471 ---- EOF echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6 ! echo "configure:4450: checking for working mmap from /dev/zero" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! # When cross-building, assume that this works, unless we know it ! # doesn't. Of course, we have no way of knowing if there even is a /dev/zero ! # on the host, let alone whether mmap will work on it. case "$host_os" in cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; ! darwin* ) ac_cv_func_mmap_dev_zero=no ;; ! * ) ac_cv_func_mmap_dev_zero=yes ;; esac else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_dev_zero=yes else *************** EOF *** 4319,4340 **** fi echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6 ! echo "configure:4323: checking for working mmap with MAP_ANON(YMOUS)" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works # just because it's there. Some SCO Un*xen define it but don't implement it. ! ac_cv_func_mmap_anon=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_anon=yes else --- 4492,4516 ---- fi echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6 ! echo "configure:4496: checking for working mmap with MAP_ANON(YMOUS)" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works # just because it's there. Some SCO Un*xen define it but don't implement it. ! case "$host_os" in ! darwin* ) ac_cv_func_mmap_anon=yes ;; ! * ) ac_cv_func_mmap_anon=no ;; ! esac else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_anon=yes else *************** fi *** 4362,4368 **** rm -f ct-mmap.inc echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 ! echo "configure:4366: checking for working mmap of a file" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 4538,4544 ---- rm -f ct-mmap.inc echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 ! echo "configure:4542: checking for working mmap of a file" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** done *** 4374,4383 **** done > conftestdata$$ if test "$cross_compiling" = yes; then ! ac_cv_func_mmap_file=no else cat > conftest.$ac_ext < conftestdata$$ if test "$cross_compiling" = yes; then ! case "$host_os" in ! darwin* ) ac_cv_func_mmap_file=yes ;; ! * ) ac_cv_func_mmap_file=no ;; ! esac else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_file=yes else --- 4593,4599 ---- exit(0); } EOF ! if { (eval echo configure:4597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_file=yes else *************** fi *** 4453,4459 **** echo $ac_n "checking for iconv""... $ac_c" 1>&6 ! echo "configure:4457: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 4632,4638 ---- echo $ac_n "checking for iconv""... $ac_c" 1>&6 ! echo "configure:4636: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 4461,4467 **** am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include --- 4640,4646 ---- am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include *************** iconv_t cd = iconv_open("",""); *** 4471,4477 **** iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else --- 4650,4656 ---- iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else *************** rm -f conftest* *** 4483,4489 **** am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext < #include --- 4662,4668 ---- am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext < #include *************** iconv_t cd = iconv_open("",""); *** 4493,4499 **** iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes --- 4672,4678 ---- iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes *************** echo "$ac_t""$am_cv_func_iconv" 1>&6 *** 4514,4526 **** EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 ! echo "configure:4518: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 4693,4705 ---- EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 ! echo "configure:4697: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** int main() { *** 4539,4545 **** ; return 0; } EOF ! if { (eval echo configure:4543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else --- 4718,4724 ---- ; return 0; } EOF ! if { (eval echo configure:4722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else *************** saved_CFLAGS="$CFLAGS" *** 4572,4588 **** CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" for ac_func in getenv atol sbrk abort atof getcwd getwd \ strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ ! fprintf_unlocked strstr errno \ malloc realloc calloc free basename getopt clock do ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 ! echo "configure:4581: checking whether $ac_func is declared" >&5 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4760: checking whether $ac_func is declared" >&5 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "gcc_cv_have_decl_$ac_func=yes" else --- 4775,4781 ---- #endif ; return 0; } EOF ! if { (eval echo configure:4779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "gcc_cv_have_decl_$ac_func=yes" else *************** EOF *** 4666,4671 **** --- 4845,4853 ---- cat >> confdefs.h <<\EOF #define HAVE_DECL_ERRNO 1 EOF + cat >> confdefs.h <<\EOF + #define HAVE_DECL_VASPRINTF 1 + EOF \ cat >> confdefs.h <<\EOF #define HAVE_DECL_MALLOC 1 *************** for ac_func in getrlimit setrlimit getru *** 4695,4706 **** do ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 ! echo "configure:4699: checking whether $ac_func is declared" >&5 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4881: checking whether $ac_func is declared" >&5 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "gcc_cv_have_decl_$ac_func=yes" else --- 4900,4906 ---- #endif ; return 0; } EOF ! if { (eval echo configure:4904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "gcc_cv_have_decl_$ac_func=yes" else *************** EOF *** 4756,4771 **** fi for ac_func in times do ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 ! echo "configure:4764: checking whether $ac_func is declared" >&5 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < + #endif + + int main() { + rlim_t l = 0; + ; return 0; } + EOF + if { (eval echo configure:4956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat >> confdefs.h <<\EOF + #define rlim_t long + EOF + + fi + rm -f conftest* + for ac_func in times do ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 ! echo "configure:4973: checking whether $ac_func is declared" >&5 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "gcc_cv_have_decl_$ac_func=yes" else --- 4992,4998 ---- #endif ; return 0; } EOF ! if { (eval echo configure:4996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "gcc_cv_have_decl_$ac_func=yes" else *************** fi *** 4817,4829 **** # More time-related stuff. echo $ac_n "checking for struct tms""... $ac_c" 1>&6 ! echo "configure:4821: checking for struct tms" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5030: checking for struct tms" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tms=yes else --- 5045,5051 ---- struct tms tms; ; return 0; } EOF ! if { (eval echo configure:5049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tms=yes else *************** fi *** 4859,4871 **** # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. # revisit after autoconf 2.50. echo $ac_n "checking for clock_t""... $ac_c" 1>&6 ! echo "configure:4863: checking for clock_t" >&5 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5072: checking for clock_t" >&5 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_type_clock_t=yes else --- 5084,5090 ---- clock_t x; ; return 0; } EOF ! if { (eval echo configure:5088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_type_clock_t=yes else *************** EOF *** 4895,4911 **** fi # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. CFLAGS="$saved_CFLAGS" # mkdir takes a single argument on some systems. echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 ! echo "configure:4904: checking if mkdir takes one argument" >&5 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5104,5160 ---- fi + # Check whether --enable-initfini-array or --disable-initfini-array was given. + if test "${enable_initfini_array+set}" = set; then + enableval="$enable_initfini_array" + gcc_cv_initfinit_array=$enableval + else + echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 + echo "configure:5114: checking for .preinit_array/.init_array/.fini_array support" >&5 + if eval "test \"`echo '$''{'gcc_cv_initfinit_array'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } + then + if ./conftest; then + gcc_cv_initfinit_array=yes + else + gcc_cv_initfinit_array=no + fi + else + gcc_cv_initfinit_array=no + fi + rm -f conftest* + fi + + echo "$ac_t""$gcc_cv_initfinit_array" 1>&6 + + if test $gcc_cv_initfinit_array = yes; then + cat >> confdefs.h <<\EOF + #define HAVE_INITFINI_ARRAY 1 + EOF + + fi + fi + + # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. CFLAGS="$saved_CFLAGS" # mkdir takes a single argument on some systems. echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 ! echo "configure:5153: checking if mkdir takes one argument" >&5 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** int main() { *** 4922,4928 **** mkdir ("foo", 0); ; return 0; } EOF ! if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_mkdir_takes_one_arg=no else --- 5171,5177 ---- mkdir ("foo", 0); ; return 0; } EOF ! if { (eval echo configure:5175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_mkdir_takes_one_arg=no else *************** objext='.o' *** 4949,4954 **** --- 5198,5204 ---- + target_gtfiles= build_xm_file= build_xm_defines= build_install_headers_dir=install-headers-tar *************** if test x"$dwarf2" = xyes *** 4990,5010 **** then tm_file="$tm_file tm-dwarf2.h" fi - if test x$float_format = x - then float_format=i64 - fi - - if test $float_format = none - then float_h_file=Makefile.in - else float_h_file=float-$float_format.h - fi - - # Handle cpp installation. - if test x$enable_cpp != xno - then - tmake_file="$tmake_file t-install-cpp" - fi - # Say what files are being used for the output code and MD file. echo "Using \`$srcdir/config/$out_file' for machine-specific logic." echo "Using \`$srcdir/config/$md_file' as machine description file." --- 5240,5245 ---- *************** if test x$thread_file = x; then *** 5092,5097 **** --- 5327,5346 ---- fi fi + # Look for a file containing extra machine modes. + if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then + extra_modes_file='$(srcdir)'/config/${extra_modes} + + cat >> confdefs.h <> confdefs.h <<\EOF + #define EXTRA_CC_MODES 1 + EOF + + fi + # auto-host.h is the file containing items generated by autoconf and is # the first file included by config.h. # If host=build, it is correct to have hconfig include auto-host.h *************** else *** 5126,5132 **** cd .. rm -rf $tempdir build_auto=auto-build.h ! FORBUILD=../$build fi --- 5375,5381 ---- cd .. rm -rf $tempdir build_auto=auto-build.h ! FORBUILD=../$build_alias fi *************** fi *** 5190,5203 **** echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 ! echo "configure:5194: checking for library containing strerror" >&5 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_strerror="no" cat > conftest.$ac_ext <&6 ! echo "configure:5443: checking for library containing strerror" >&5 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_strerror="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_strerror="none required" else --- 5457,5463 ---- strerror() ; return 0; } EOF ! if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_strerror="none required" else *************** rm -f conftest* *** 5219,5225 **** test "$ac_cv_search_strerror" = "no" && for i in cposix; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_strerror="-l$i" break --- 5479,5485 ---- strerror() ; return 0; } EOF ! if { (eval echo configure:5483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_strerror="-l$i" break *************** fi *** 5253,5264 **** echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:5257: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5506: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else --- 5556,5562 ---- ; return 0; } EOF ! if { (eval echo configure:5560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else *************** EOF *** 5328,5339 **** fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 ! echo "configure:5332: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 5577,5588 ---- fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 ! echo "configure:5581: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** EOF *** 5361,5372 **** fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:5365: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 5610,5621 ---- fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:5614: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** fi *** 5396,5414 **** # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:5400: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else --- 5645,5663 ---- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:5649: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else *************** EOF *** 5429,5440 **** fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! echo "configure:5433: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5682: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else --- 5711,5717 ---- char *p = (char *) alloca(1); ; return 0; } EOF ! if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else *************** EOF *** 5494,5505 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 ! echo "configure:5498: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5747: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 *** 5524,5535 **** if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:5528: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5777: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 5801,5807 ---- ; return 0; } EOF ! if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 5579,5585 **** fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:5583: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 5828,5834 ---- fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:5832: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 5587,5593 **** ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else --- 5855,5861 ---- exit (find_stack_direction() < 0); } EOF ! if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else *************** fi *** 5629,5640 **** echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 ! echo "configure:5633: checking whether we are using the GNU C Library 2.1 or newer" >&5 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5878,5889 ---- echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 ! echo "configure:5882: checking whether we are using the GNU C Library 2.1 or newer" >&5 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** stdlib.h string.h unistd.h sys/param.h *** 5670,5686 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5674: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 5919,5935 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5923: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** getgid getuid mempcpy munmap putenv sete *** 5711,5722 **** strdup strtoul tsearch __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:5715: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5964: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 5988,5994 ---- ; return 0; } EOF ! if { (eval echo configure:5992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** fi *** 5780,5786 **** echo $ac_n "checking for iconv""... $ac_c" 1>&6 ! echo "configure:5784: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6029,6035 ---- echo $ac_n "checking for iconv""... $ac_c" 1>&6 ! echo "configure:6033: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 5788,5794 **** am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include --- 6037,6043 ---- am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include *************** iconv_t cd = iconv_open("",""); *** 5798,5804 **** iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else --- 6047,6053 ---- iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else *************** rm -f conftest* *** 5810,5816 **** am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext < #include --- 6059,6065 ---- am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext < #include *************** iconv_t cd = iconv_open("",""); *** 5820,5826 **** iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes --- 6069,6075 ---- iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes *************** echo "$ac_t""$am_cv_func_iconv" 1>&6 *** 5841,5853 **** EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 ! echo "configure:5845: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 6090,6102 ---- EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 ! echo "configure:6094: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** int main() { *** 5866,5872 **** ; return 0; } EOF ! if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else --- 6115,6121 ---- ; return 0; } EOF ! if { (eval echo configure:6119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else *************** EOF *** 5895,5913 **** echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 ! echo "configure:5899: checking for nl_langinfo and CODESET" >&5 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char* cs = nl_langinfo(CODESET); ; return 0; } EOF ! if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_langinfo_codeset=yes else --- 6144,6162 ---- echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 ! echo "configure:6148: checking for nl_langinfo and CODESET" >&5 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char* cs = nl_langinfo(CODESET); ; return 0; } EOF ! if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_langinfo_codeset=yes else *************** EOF *** 5930,5948 **** if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 ! echo "configure:5934: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF ! if { (eval echo configure:5946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else --- 6179,6197 ---- if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 ! echo "configure:6183: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF ! if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else *************** EOF *** 5963,5969 **** fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 ! echo "configure:5967: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" --- 6212,6218 ---- fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 ! echo "configure:6216: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" *************** fi *** 5986,5992 **** EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 ! echo "configure:5990: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" --- 6235,6241 ---- EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 ! echo "configure:6239: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" *************** fi *** 6006,6022 **** ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 ! echo "configure:6010: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:6020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 6255,6271 ---- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 ! echo "configure:6259: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:6269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** if eval "test \"`echo '$ac_cv_header_'$a *** 6037,6048 **** EOF echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 ! echo "configure:6041: checking for GNU gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; --- 6286,6297 ---- EOF echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 ! echo "configure:6290: checking for GNU gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; *************** bindtextdomain ("", ""); *** 6051,6057 **** return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF ! if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libc=yes else --- 6300,6306 ---- return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF ! if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libc=yes else *************** echo "$ac_t""$gt_cv_func_gnugettext1_lib *** 6067,6080 **** if test "$gt_cv_func_gnugettext1_libc" != "yes"; then echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 ! echo "configure:6071: checking for GNU gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -lintl $LIBICONV" cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; --- 6316,6329 ---- if test "$gt_cv_func_gnugettext1_libc" != "yes"; then echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 ! echo "configure:6320: checking for GNU gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -lintl $LIBICONV" cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; *************** bindtextdomain ("", ""); *** 6083,6089 **** return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF ! if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libintl=yes else --- 6332,6338 ---- return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF ! if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libintl=yes else *************** EOF *** 6116,6127 **** for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6120: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6369: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 6393,6399 ---- ; return 0; } EOF ! if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 6173,6179 **** # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6177: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6422,6428 ---- # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6426: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 6207,6213 **** # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6211: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6456,6462 ---- # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6460: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 6244,6250 **** # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6248: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6493,6499 ---- # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6497: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 6294,6300 **** # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6298: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6543,6549 ---- # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6547: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 6328,6334 **** # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6332: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6577,6583 ---- # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6581: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 6364,6370 **** # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6368: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6613,6619 ---- # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6617: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** do *** 6436,6442 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6440: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6685,6691 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6689: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** done *** 6469,6475 **** ac_verc_fail=yes else echo $ac_n "checking version of bison""... $ac_c" 1>&6 ! echo "configure:6473: checking version of bison" >&5 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; --- 6718,6724 ---- ac_verc_fail=yes else echo $ac_n "checking version of bison""... $ac_c" 1>&6 ! echo "configure:6722: checking version of bison" >&5 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; *************** EOF *** 6514,6520 **** if test "x$CATOBJEXT" != x; then echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 ! echo "configure:6518: checking for catalogs to be installed" >&5 # Look for .po and .gmo files in the source directory. CATALOGS= XLINGUAS= --- 6763,6769 ---- if test "x$CATOBJEXT" != x; then echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 ! echo "configure:6767: checking for catalogs to be installed" >&5 # Look for .po and .gmo files in the source directory. CATALOGS= XLINGUAS= *************** fi *** 6572,6578 **** case $host_os in win32 | pe | cygwin* | mingw32* | uwin*) echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 ! echo "configure:6576: checking whether windows registry support is requested" >&5 if test "x$enable_win32_registry" != xno; then cat >> confdefs.h <<\EOF #define ENABLE_WIN32_REGISTRY 1 --- 6821,6827 ---- case $host_os in win32 | pe | cygwin* | mingw32* | uwin*) echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 ! echo "configure:6825: checking whether windows registry support is requested" >&5 if test "x$enable_win32_registry" != xno; then cat >> confdefs.h <<\EOF #define ENABLE_WIN32_REGISTRY 1 *************** EOF *** 6581,6594 **** echo "$ac_t""yes" 1>&6 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 ! echo "configure:6585: checking for library containing RegOpenKeyExA" >&5 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_RegOpenKeyExA="no" cat > conftest.$ac_ext <&6 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 ! echo "configure:6834: checking for library containing RegOpenKeyExA" >&5 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_RegOpenKeyExA="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_RegOpenKeyExA="none required" else --- 6848,6854 ---- RegOpenKeyExA() ; return 0; } EOF ! if { (eval echo configure:6852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_RegOpenKeyExA="none required" else *************** rm -f conftest* *** 6610,6616 **** test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_RegOpenKeyExA="-l$i" break --- 6870,6876 ---- RegOpenKeyExA() ; return 0; } EOF ! if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_RegOpenKeyExA="-l$i" break *************** esac *** 6663,6669 **** if test "x$enable_win32_registry" != xno; then echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 ! echo "configure:6667: checking registry key on windows hosts" >&5 cat >> confdefs.h <&6 ! echo "configure:6916: checking registry key on windows hosts" >&5 cat >> confdefs.h <&6 ! echo "configure:6872: checking what assembler to use" >&5 gcc_cv_as= gcc_cv_gas_major_version= gcc_cv_gas_minor_version= --- 7126,7132 ---- # Figure out what assembler we will be using. echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 ! echo "configure:7130: checking what assembler to use" >&5 gcc_cv_as= gcc_cv_gas_major_version= gcc_cv_gas_minor_version= *************** fi *** 6962,6968 **** # Figure out what linker we will be using. echo $ac_n "checking what linker to use""... $ac_c" 1>&6 ! echo "configure:6966: checking what linker to use" >&5 gcc_cv_ld= gcc_cv_gld_major_version= gcc_cv_gld_minor_version= --- 7220,7226 ---- # Figure out what linker we will be using. echo $ac_n "checking what linker to use""... $ac_c" 1>&6 ! echo "configure:7224: checking what linker to use" >&5 gcc_cv_ld= gcc_cv_gld_major_version= gcc_cv_gld_minor_version= *************** fi *** 7055,7061 **** # Figure out what nm we will be using. echo $ac_n "checking what nm to use""... $ac_c" 1>&6 ! echo "configure:7059: checking what nm to use" >&5 if test -x nm$host_exeext; then gcc_cv_nm=./nm$host_exeext elif test "x$program_prefix" != xNONE; then --- 7313,7319 ---- # Figure out what nm we will be using. echo $ac_n "checking what nm to use""... $ac_c" 1>&6 ! echo "configure:7317: checking what nm to use" >&5 if test -x nm$host_exeext; then gcc_cv_nm=./nm$host_exeext elif test "x$program_prefix" != xNONE; then *************** echo "$ac_t""$gcc_cv_nm" 1>&6 *** 7067,7073 **** # Figure out what objdump we will be using. echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 ! echo "configure:7071: checking what objdump to use" >&5 if test -x objdump$host_exeext; then gcc_cv_objdump=./objdump$host_exeext elif test "x$program_prefix" != xNONE; then --- 7325,7331 ---- # Figure out what objdump we will be using. echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 ! echo "configure:7329: checking what objdump to use" >&5 if test -x objdump$host_exeext; then gcc_cv_objdump=./objdump$host_exeext elif test "x$program_prefix" != xNONE; then *************** echo "$ac_t""$gcc_cv_objdump" 1>&6 *** 7079,7085 **** # Figure out what assembler alignment features are present. echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 ! echo "configure:7083: checking assembler alignment features" >&5 gcc_cv_as_alignment_features=none if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then # Gas version 2.6 and later support for .balign and .p2align. --- 7337,7343 ---- # Figure out what assembler alignment features are present. echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 ! echo "configure:7341: checking assembler alignment features" >&5 gcc_cv_as_alignment_features=none if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then # Gas version 2.6 and later support for .balign and .p2align. *************** fi *** 7127,7133 **** echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 ! echo "configure:7131: checking assembler subsection support" >&5 gcc_cv_as_subsections=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then --- 7385,7391 ---- echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 ! echo "configure:7389: checking assembler subsection support" >&5 gcc_cv_as_subsections=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then *************** fi *** 7167,7173 **** echo "$ac_t""$gcc_cv_as_subsections" 1>&6 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 ! echo "configure:7171: checking assembler weak support" >&5 gcc_cv_as_weak=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then --- 7425,7431 ---- echo "$ac_t""$gcc_cv_as_subsections" 1>&6 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 ! echo "configure:7429: checking assembler weak support" >&5 gcc_cv_as_weak=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then *************** fi *** 7190,7196 **** echo "$ac_t""$gcc_cv_as_weak" 1>&6 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 ! echo "configure:7194: checking assembler hidden support" >&5 gcc_cv_as_hidden=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 \ --- 7448,7454 ---- echo "$ac_t""$gcc_cv_as_weak" 1>&6 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 ! echo "configure:7452: checking assembler hidden support" >&5 gcc_cv_as_hidden=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 \ *************** elif test x$gcc_cv_as != x; then *** 7211,7223 **** fi rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 ! # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` if echo "$ld_ver" | grep GNU > /dev/null; then ! ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` ! ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` if test 0"$ld_date" -lt 20020404; then if test -n "$ld_date"; then # If there was date string, but was earlier than 2002-04-04, fail --- 7469,7481 ---- fi rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 ! # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` if echo "$ld_ver" | grep GNU > /dev/null; then ! ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` ! ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` if test 0"$ld_date" -lt 20020404; then if test -n "$ld_date"; then # If there was date string, but was earlier than 2002-04-04, fail *************** elif test x$gcc_cv_as != x; then *** 7242,7248 **** fi fi fi - if test x"$gcc_cv_as_hidden" = xyes; then cat >> confdefs.h <<\EOF #define HAVE_GAS_HIDDEN 1 --- 7500,7505 ---- *************** EOF *** 7251,7260 **** fi echo "$ac_t""$gcc_cv_as_hidden" 1>&6 libgcc_visibility=$gcc_cv_as_hidden echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 ! echo "configure:7258: checking assembler leb128 support" >&5 gcc_cv_as_leb128=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then --- 7508,7530 ---- fi echo "$ac_t""$gcc_cv_as_hidden" 1>&6 libgcc_visibility=$gcc_cv_as_hidden + case "$target" in + mips-sgi-irix6*) + if test x"$gnu_ld_flag" = x"no"; then + # Even if using gas with .hidden support, the resulting object files + # cannot be linked with the IRIX 6 O32 linker. With the N32 and + # N64 linkers, the problem is that the linker refuses to accept + # -call_shared (passed by default to the linker) and -r (used to + # link the object file generated without .hidden directives with + # one that hides symbols), so we also lose. + libgcc_visibility=no + fi + ;; + esac echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 ! echo "configure:7528: checking assembler leb128 support" >&5 gcc_cv_as_leb128=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then *************** fi *** 7299,7305 **** echo "$ac_t""$gcc_cv_as_leb128" 1>&6 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 ! echo "configure:7303: checking assembler eh_frame optimization" >&5 gcc_cv_as_eh_frame=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then --- 7569,7575 ---- echo "$ac_t""$gcc_cv_as_leb128" 1>&6 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 ! echo "configure:7573: checking assembler eh_frame optimization" >&5 gcc_cv_as_eh_frame=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then *************** fi *** 7380,7386 **** echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 ! echo "configure:7384: checking assembler section merging support" >&5 gcc_cv_as_shf_merge=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then --- 7650,7656 ---- echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 ! echo "configure:7654: checking assembler section merging support" >&5 gcc_cv_as_shf_merge=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then *************** EOF *** 7402,7412 **** fi echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 case "$target" in # All TARGET_ABI_OSF targets. alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 ! echo "configure:7410: checking assembler supports explicit relocations" >&5 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7672,7822 ---- fi echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 + echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 + echo "configure:7677: checking assembler thread-local storage support" >&5 + gcc_cv_as_tls=no + conftest_s= + tls_first_major= + tls_first_minor= + case "$target" in + alpha*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + ldq $27,__tls_get_addr($29) !literal!1 + lda $16,foo($29) !tlsgd!1 + jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 + ldq $27,__tls_get_addr($29) !literal!2 + lda $16,foo($29) !tlsldm!2 + jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 + ldq $1,foo($29) !gotdtprel + ldah $2,foo($29) !dtprelhi + lda $3,foo($2) !dtprello + lda $4,foo($29) !dtprel + ldq $1,foo($29) !gottprel + ldah $2,foo($29) !tprelhi + lda $3,foo($2) !tprello + lda $4,foo($29) !tprel' + tls_first_major=2 + tls_first_minor=13 + ;; + i[34567]86-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + movl %gs:0, %eax + leal foo@TLSGD(,%ebx,1), %eax + leal foo@TLSLDM(%ebx), %eax + leal foo@DTPOFF(%eax), %edx + movl foo@GOTTPOFF(%ebx), %eax + subl foo@GOTTPOFF(%ebx), %eax + addl foo@GOTNTPOFF(%ebx), %eax + movl foo@INDNTPOFF, %eax + movl $foo@TPOFF, %eax + subl $foo@TPOFF, %eax + leal foo@NTPOFF(%ecx), %eax' + tls_first_major=2 + tls_first_minor=14 + ;; + x86_64-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + movq %fs:0, %rax + leaq foo@TLSGD(%rip), %rdi + leaq foo@TLSLD(%rip), %rdi + leaq foo@DTPOFF(%rax), %rdx + movq foo@GOTTPOFF(%rip), %rax + movq $foo@TPOFF, %rax' + tls_first_major=2 + tls_first_minor=14 + ;; + ia64-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: data8 25 + .text + addl r16 = @ltoff(@dtpmod(foo#)), gp + addl r17 = @ltoff(@dtprel(foo#)), gp + addl r18 = @ltoff(@tprel(foo#)), gp + addl r19 = @dtprel(foo#), gp + adds r21 = @dtprel(foo#), r13 + movl r23 = @dtprel(foo#) + addl r20 = @tprel(foo#), gp + adds r22 = @tprel(foo#), r13 + movl r24 = @tprel(foo#)' + tls_first_major=2 + tls_first_minor=13 + ;; + s390-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + .long foo@TLSGD + .long foo@TLSLDM + .long foo@DTPOFF + .long foo@NTPOFF + .long foo@GOTNTPOFF + .long foo@INDNTPOFF + l %r1,foo@GOTNTPOFF(%r12) + l %r1,0(%r1):tls_load:foo + bas %r14,0(%r1,%r13):tls_gdcall:foo + bas %r14,0(%r1,%r13):tls_ldcall:foo' + tls_first_major=2 + tls_first_minor=14 + ;; + s390x-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + .quad foo@TLSGD + .quad foo@TLSLDM + .quad foo@DTPOFF + .quad foo@NTPOFF + .quad foo@GOTNTPOFF + lg %r1,foo@GOTNTPOFF(%r12) + larl %r1,foo@INDNTPOFF + brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo + brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' + tls_first_major=2 + tls_first_minor=14 + ;; + esac + if test -z "$tls_first_major"; then + : + elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x + then + if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \ + -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \ + -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then + gcc_cv_as_tls=yes + fi + elif test x$gcc_cv_as != x; then + echo "$conftest_s" > conftest.s + if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 + then + gcc_cv_as_tls=yes + fi + rm -f conftest.s conftest.o + fi + if test "$gcc_cv_as_tls" = yes; then + cat >> confdefs.h <<\EOF + #define HAVE_AS_TLS 1 + EOF + + fi + echo "$ac_t""$gcc_cv_as_tls" 1>&6 + case "$target" in # All TARGET_ABI_OSF targets. alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 ! echo "configure:7820: checking assembler supports explicit relocations" >&5 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** EOF *** 7456,7462 **** ;; sparc*-*-*) echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 ! echo "configure:7460: checking assembler .register pseudo-op support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7866,7872 ---- ;; sparc*-*-*) echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 ! echo "configure:7870: checking assembler .register pseudo-op support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** EOF *** 7484,7490 **** fi echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 ! echo "configure:7488: checking assembler supports -relax" >&5 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7894,7900 ---- fi echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 ! echo "configure:7898: checking assembler supports -relax" >&5 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** EOF *** 7512,7518 **** fi echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 ! echo "configure:7516: checking assembler and linker support unaligned pc related relocs" >&5 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7922,7928 ---- fi echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 ! echo "configure:7926: checking assembler and linker support unaligned pc related relocs" >&5 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** EOF *** 7539,7545 **** fi echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 ! echo "configure:7543: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7949,7955 ---- fi echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 ! echo "configure:7953: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** EOF *** 7579,7585 **** fi echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 ! echo "configure:7584: checking for assembler offsetable %lo() support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7989,7995 ---- fi echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 ! echo "configure:7993: checking for assembler offsetable %lo() support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** EOF *** 7618,7624 **** i[34567]86-*-* | x86_64-*-*) echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 ! echo "configure:7624: checking assembler instructions" >&5 gcc_cv_as_instructions= if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then --- 8028,8034 ---- i[34567]86-*-* | x86_64-*-*) echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 ! echo "configure:8032: checking assembler instructions" >&5 gcc_cv_as_instructions= if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then *************** EOF *** 7645,7651 **** echo "$ac_t""$gcc_cv_as_instructions" 1>&6 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 ! echo "configure:7651: checking assembler GOTOFF in data directives" >&5 gcc_cv_as_gotoff_in_data=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x then --- 8055,8061 ---- echo "$ac_t""$gcc_cv_as_instructions" 1>&6 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 ! echo "configure:8059: checking assembler GOTOFF in data directives" >&5 gcc_cv_as_gotoff_in_data=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x then *************** EOF *** 7672,7681 **** echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 ;; esac echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 ! echo "configure:7681: checking assembler dwarf2 debug_line support" >&5 gcc_cv_as_dwarf2_debug_line=no # ??? Not all targets support dwarf2 debug_line, even within a version # of gas. Moreover, we need to emit a valid instruction to trigger any --- 8082,8133 ---- echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 ;; + + ia64*-*-*) + echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6 + echo "configure:8089: checking assembler supports ltoffx and ldxmov" >&5 + if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + gcc_cv_as_ltoffx_ldxmov_relocs=unknown + if test x$gcc_cv_gas_major_version != x \ + -a x$gcc_cv_gas_minor_version != x + then + if test "$gcc_cv_gas_major_version" -eq 2 \ + -a "$gcc_cv_gas_minor_version" -ge 14 \ + -o "$gcc_cv_gas_major_version" -gt 2; then + gcc_cv_as_ltoffx_ldxmov_relocs=yes + fi + elif test x$gcc_cv_as != x; then + cat > conftest.s << 'EOF' + .text + addl r15 = @ltoffx(x#), gp + ;; + ld8.mov r16 = [r15], x# + EOF + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_ltoffx_ldxmov_relocs=yes + else + gcc_cv_as_ltoffx_ldxmov_relocs=no + fi + rm -f conftest.s conftest.o + fi + + fi + + echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6 + if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then + cat >> confdefs.h <<\EOF + #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 + EOF + + fi + ;; esac echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 ! echo "configure:8131: checking assembler dwarf2 debug_line support" >&5 gcc_cv_as_dwarf2_debug_line=no # ??? Not all targets support dwarf2 debug_line, even within a version # of gas. Moreover, we need to emit a valid instruction to trigger any *************** gcc_cv_as_dwarf2_debug_line=no *** 7684,7690 **** # ??? Once 2.11 is released, probably need to add first known working # version to the per-target configury. case "$target" in ! i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-*) insn="nop" ;; ia64*-*-*) --- 8136,8143 ---- # ??? Once 2.11 is released, probably need to add first known working # version to the per-target configury. case "$target" in ! i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ ! | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*) insn="nop" ;; ia64*-*-*) *************** fi *** 7731,7737 **** echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 ! echo "configure:7737: checking assembler --gdwarf2 support" >&5 gcc_cv_as_gdwarf2_flag=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then --- 8184,8190 ---- echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 ! echo "configure:8188: checking assembler --gdwarf2 support" >&5 gcc_cv_as_gdwarf2_flag=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then *************** then *** 7740,7746 **** -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gdwarf2_debug_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s --- 8193,8199 ---- -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gdwarf2_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s *************** fi *** 7760,7766 **** echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 ! echo "configure:7766: checking assembler --gstabs support" >&5 gcc_cv_as_gstabs_flag=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then --- 8213,8219 ---- echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 ! echo "configure:8217: checking assembler --gstabs support" >&5 gcc_cv_as_gstabs_flag=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then *************** then *** 7769,7775 **** -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gstabs_debug_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s --- 8222,8228 ---- -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gstabs_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s *************** EOF *** 7787,7794 **** fi echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 ! echo "configure:7794: checking linker PT_GNU_EH_FRAME support" >&5 gcc_cv_ld_eh_frame_hdr=no if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then --- 8240,8285 ---- fi echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 + echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 + echo "configure:8245: checking linker read-only and read-write section mixing" >&5 + gcc_cv_ld_ro_rw_mix=unknown + if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then + gcc_cv_ld_ro_rw_mix=read-write + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then + echo '.section "myfoosect", "a"' > conftest1.s + echo '.section "myfoosect", "aw"' > conftest2.s + echo '.byte 1' >> conftest2.s + echo '.section "myfoosect", "a"' > conftest3.s + echo '.byte 0' >> conftest3.s + if $gcc_cv_as -o conftest1.o conftest1.s \ + && $gcc_cv_as -o conftest2.o conftest2.s \ + && $gcc_cv_as -o conftest3.o conftest3.s \ + && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ + conftest2.o conftest3.o; then + gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ + | grep -A1 myfoosect` + if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then + if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then + gcc_cv_ld_ro_rw_mix=read-only + else + gcc_cv_ld_ro_rw_mix=read-write + fi + fi + fi + rm -f conftest.* conftest[123].* + fi + if test x$gcc_cv_ld_ro_rw_mix = xread-write; then + cat >> confdefs.h <<\EOF + #define HAVE_LD_RO_RW_SECTION_MIXING 1 + EOF + + fi + echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 + echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 ! echo "configure:8283: checking linker PT_GNU_EH_FRAME support" >&5 gcc_cv_ld_eh_frame_hdr=no if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then *************** elif test x$gcc_cv_ld != x; then *** 7800,7896 **** gcc_cv_ld_eh_frame_hdr=yes fi fi - echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then - echo $ac_n "checking whether linker eh_frame optimizations work properly""... $ac_c" 1>&6 - echo "configure:7809: checking whether linker eh_frame optimizations work properly" >&5 - gcc_cv_ld_eh_frame_hdr_works=no - if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then - gcc_cv_ld_eh_frame_hdr_works=yes - fi - elif test x$gcc_cv_ld != x; then - for gcc_WS in 4 8; do - cat > conftest.s <&5 2>&1; then - if ($gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o; exit $?) 1>&5 2>&1; then - if $gcc_cv_objdump -h conftest.so 2>&5 \ - | grep 'eh_frame_hdr[ ]*0*[01][048cC][ ]' 1>&5 2>&1; then - gcc_cv_ld_eh_frame_hdr_works=yes; break - else - $gcc_cv_objdump -h conftest.so 2>/dev/null | grep eh_frame_hdr 1>&5 2>&1 - fi - fi - fi - rm -f conftest.* - done - fi - echo "$ac_t""$gcc_cv_ld_eh_frame_hdr_works" 1>&6 - fi - if test x"$gcc_cv_ld_eh_frame_hdr" = xyes \ - && test x"$gcc_cv_ld_eh_frame_hdr_works" = xyes; then cat >> confdefs.h <<\EOF #define HAVE_LD_EH_FRAME_HDR 1 EOF fi ! if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then cat >> confdefs.h <> confdefs.h <<\EOF #define HAVE_LD_EH_FRAME_HDR 1 EOF fi + echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 ! # Miscellaneous target-specific checks. ! case "$target" in ! mips*-*-*) ! echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 ! echo "configure:8307: checking whether libgloss uses STARTUP directives consistently" >&5 ! gcc_cv_mips_libgloss_startup=no ! gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss ! if test "x$exec_prefix" = xNONE; then ! if test "x$prefix" = xNONE; then ! test_prefix=/usr/local ! else ! test_prefix=$prefix ! fi ! else ! test_prefix=$exec_prefix ! fi ! for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld ! do ! if grep '^STARTUP' $f > /dev/null 2>&1; then ! gcc_cv_mips_libgloss_startup=yes ! break ! fi ! done ! if test x"$gcc_cv_mips_libgloss_startup" = xyes; then ! cat >> confdefs.h <<\EOF ! #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1 ! EOF ! ! fi ! echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 ! ;; ! esac ! ! if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then cat >> confdefs.h <&2; exit 1; } fi --- 8353,8360 ---- enable_languages=all fi else ! if test x"${enable_languages}" = x \ ! || test x"${enable_languages}" = xyes; then { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } fi *************** do *** 7950,7955 **** --- 8392,8399 ---- esac done + expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` + found_languages= subdirs= for lang in ${srcdir}/*/config-lang.in .. do *************** do *** 7973,7978 **** --- 8417,8423 ---- *,all,*) add_this_lang=yes ;; *) add_this_lang=no ;; esac + found_languages="${found_languages} ${lang_alias}" if test x"${add_this_lang}" = xyes; then case $lang in ${srcdir}/ada/config-lang.in) *************** do *** 7989,7994 **** --- 8434,8468 ---- esac done + missing_languages= + for expected_language in ${expected_languages} .. + do + if test "${expected_language}" != ..; then + missing_language="${expected_language}" + if test "${expected_language}" = "c" \ + || test "${expected_language}" = "all"; then + missing_language= + fi + for found_language in ${found_languages} .. + do + if test "${found_language}" != ..; then + if test "${expected_language}" = "${found_language}"; then + missing_language= + fi + fi + done + if test "x${missing_language}" != x; then + missing_languages="${missing_languages} ${missing_language}" + fi + fi + done + + if test "x$missing_languages" != x; then + { echo "configure: error: + The following requested languages were not found:${missing_languages} + The following languages were available: c${found_languages}" 1>&2; exit 1; } + fi + # Make gthr-default.h if we have a thread file. gthread_flags= if test $thread_file != single; then *************** fi *** 8033,8039 **** echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:8039: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 8507,8513 ---- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:8511: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** EOF *** 8063,8068 **** --- 8537,8558 ---- fi + # Use libunwind based exception handling. + # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. + if test "${enable_libunwind_exceptions+set}" = set; then + enableval="$enable_libunwind_exceptions" + use_libunwind_exceptions=$enableval + else + use_libunwind_exceptions=no + fi + + if test x"$use_libunwind_exceptions" = xyes; then + cat >> confdefs.h <<\EOF + #define USE_LIBUNWIND_EXCEPTIONS 1 + EOF + + fi + # Make empty files to contain the specs and options for each language. # Then add #include lines to for a compiler that has specs and/or options. *************** all_languages= *** 8088,8096 **** all_boot_languages= all_compilers= all_stagestuff= ! all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc' # List of language makefile fragments. all_lang_makefiles= # Add the language fragments. # Languages are added via two mechanisms. Some information must be --- 8578,8591 ---- all_boot_languages= all_compilers= all_stagestuff= ! all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' # List of language makefile fragments. all_lang_makefiles= + # Files for gengtype + all_gtfiles="$target_gtfiles" + # Files for gengtype with language + all_gtfiles_files_langs= + all_gtfiles_files_files= # Add the language fragments. # Languages are added via two mechanisms. Some information must be *************** do *** 8111,8116 **** --- 8606,8612 ---- compilers= stagestuff= outputs= + gtfiles= . ${srcdir}/$s/config-lang.in if test "x$language" = x then *************** do *** 8129,8137 **** --- 8625,8656 ---- all_compilers="$all_compilers $compilers" all_stagestuff="$all_stagestuff $stagestuff" all_outputs="$all_outputs $outputs" + all_gtfiles="$all_gtfiles $gtfiles" + for f in .. $gtfiles + do + if test $f != ".." + then + all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " + all_gtfiles_files_files="$all_gtfiles_files_files ${f} " + fi + done fi done + # Pick up gtfiles for c + gtfiles= + s="c" + . ${srcdir}/c-config-lang.in + all_gtfiles="$all_gtfiles $gtfiles" + for f in .. $gtfiles + do + if test $f != ".." + then + all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " + all_gtfiles_files_files="$all_gtfiles_files_files ${f} " + fi + done + check_languages= for language in .. $all_languages do *************** fi *** 8254,8261 **** ! # Nothing to do for FLOAT_H, float_format already handled. ! objdir=`pwd` # Process the language and host/target makefile fragments. --- 8773,8779 ---- ! objdir=`${PWDCMD-pwd}` # Process the language and host/target makefile fragments. *************** ${CONFIG_SHELL-/bin/sh} $srcdir/configur *** 8325,8330 **** --- 8843,8853 ---- + + + + + # Echo that links are built if test x$host = x$target then *************** s%@includedir@%$includedir%g *** 8493,8500 **** s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g - s%@enable_multilib@%$enable_multilib%g - s%@enable_shared@%$enable_shared%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g --- 9016,9021 ---- *************** s%@ADAC@%$ADAC%g *** 8518,8523 **** --- 9039,9051 ---- s%@strict1_warn@%$strict1_warn%g s%@CPP@%$CPP%g s%@warn_cflags@%$warn_cflags%g + s%@enable_multilib@%$enable_multilib%g + s%@nocommon_flag@%$nocommon_flag%g + s%@valgrind_path@%$valgrind_path%g + s%@valgrind_path_defines@%$valgrind_path_defines%g + s%@valgrind_command@%$valgrind_command%g + s%@coverage_flags@%$coverage_flags%g + s%@enable_shared@%$enable_shared%g s%@stage1_cflags@%$stage1_cflags%g s%@SET_MAKE@%$SET_MAKE%g s%@AWK@%$AWK%g *************** s%@FLEX@%$FLEX%g *** 8535,8544 **** --- 9063,9075 ---- s%@BISON@%$BISON%g s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g + s%@LDEXP_LIB@%$LDEXP_LIB%g s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g s%@LIBICONV@%$LIBICONV%g + s%@gcc_cv_initfinit_array@%$gcc_cv_initfinit_array%g s%@manext@%$manext%g s%@objext@%$objext%g + s%@extra_modes_file@%$extra_modes_file%g s%@FORBUILD@%$FORBUILD%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g *************** s%@CROSS@%$CROSS%g *** 8566,8573 **** s%@ALL@%$ALL%g s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g s%@inhibit_libc@%$inhibit_libc%g ! s%@HOST_PREFIX@%$HOST_PREFIX%g ! s%@HOST_PREFIX_1@%$HOST_PREFIX_1%g s%@HOST_CC@%$HOST_CC%g s%@HOST_CFLAGS@%$HOST_CFLAGS%g s%@STMP_FIXINC@%$STMP_FIXINC%g --- 9097,9104 ---- s%@ALL@%$ALL%g s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g s%@inhibit_libc@%$inhibit_libc%g ! s%@BUILD_PREFIX@%$BUILD_PREFIX%g ! s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g s%@HOST_CC@%$HOST_CC%g s%@HOST_CFLAGS@%$HOST_CFLAGS%g s%@STMP_FIXINC@%$STMP_FIXINC%g *************** s%@dollar@%$dollar%g *** 8586,8593 **** --- 9117,9128 ---- s%@slibdir@%$slibdir%g s%@objdir@%$objdir%g s%@subdirs@%$subdirs%g + s%@srcdir@%$srcdir%g s%@all_boot_languages@%$all_boot_languages%g s%@all_compilers@%$all_compilers%g + s%@all_gtfiles@%$all_gtfiles%g + s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g + s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g s%@all_lang_makefiles@%$all_lang_makefiles%g s%@all_languages@%$all_languages%g s%@all_stagestuff@%$all_stagestuff%g *************** s%@symbolic_link@%$symbolic_link%g *** 8634,8639 **** --- 9169,9175 ---- s%@thread_file@%$thread_file%g s%@tm_file_list@%$tm_file_list%g s%@tm_file@%$tm_file%g + s%@tm_defines@%$tm_defines%g s%@tm_p_file_list@%$tm_p_file_list%g s%@tm_p_file@%$tm_p_file%g s%@xm_file@%$xm_file%g *************** esac *** 8902,8908 **** if test "$symbolic_link" = "ln -s"; then for d in .. ${subdirs} fixinc ; do if test $d != ..; then ! STARTDIR=`pwd` cd $d for t in stage1 stage2 stage3 stage4 include do --- 9438,9444 ---- if test "$symbolic_link" = "ln -s"; then for d in .. ${subdirs} fixinc ; do if test $d != ..; then ! STARTDIR=`${PWDCMD-pwd}` cd $d for t in stage1 stage2 stage3 stage4 include do diff -Nrc3pad gcc-3.2.3/gcc/configure.in gcc-3.3/gcc/configure.in *** gcc-3.2.3/gcc/configure.in 2003-02-04 00:17:41.000000000 +0000 --- gcc-3.3/gcc/configure.in 2003-05-12 18:49:18.000000000 +0000 *************** *** 1,7 **** # configure.in for GCC # Process this file with autoconf to generate a configuration script. ! # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. #This file is part of GCC. --- 1,8 ---- # configure.in for GCC # Process this file with autoconf to generate a configuration script. ! # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! # Free Software Foundation, Inc. #This file is part of GCC. *************** changequote([, ])dnl *** 176,181 **** --- 177,264 ---- fi fi + # Determine the host, build, and target systems + AC_CANONICAL_SYSTEM + + # Set program_transform_name + AC_ARG_PROGRAM + + # Find the native compiler + AC_PROG_CC + AC_PROG_CC_C_O + # autoconf is lame and doesn't give us any substitution variable for this. + if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then + NO_MINUS_C_MINUS_O=yes + else + OUTPUT_OPTION='-o $@' + fi + AC_SUBST(NO_MINUS_C_MINUS_O) + AC_SUBST(OUTPUT_OPTION) + + # See if GNAT has been installed + gcc_AC_PROG_GNAT + + AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-long-long, + ac_cv_prog_cc_no_long_long, + [save_CFLAGS="$CFLAGS" + CFLAGS="-Wno-long-long" + AC_TRY_COMPILE(,,ac_cv_prog_cc_no_long_long=yes, + ac_cv_prog_cc_no_long_long=no) + CFLAGS="$save_CFLAGS"]) + + if test x$have_gnat != xno ; then + AC_CACHE_CHECK(whether ${ADAC} accepts -Wno-long-long, + ac_cv_prog_adac_no_long_long, + [cat >conftest.adb <&5 2>&5 ; then + ac_cv_prog_adac_no_long_long=yes + else + ac_cv_prog_adac_no_long_long=no + fi + rm -f conftest*]) + else + ac_cv_prog_adac_no_long_long=yes + fi + + strict1_warn= + if test $ac_cv_prog_cc_no_long_long = yes && \ + test $ac_cv_prog_adac_no_long_long = yes ; then + strict1_warn="-pedantic -Wno-long-long" + fi + AC_SUBST(strict1_warn) + + AC_PROG_CPP + AC_C_INLINE + gcc_AC_C_VOLATILE + + gcc_AC_C_LONG_DOUBLE + gcc_AC_C_LONG_LONG + gcc_AC_C__BOOL + + # sizeof(char) is 1 by definition. + gcc_AC_COMPILE_CHECK_SIZEOF(short) + gcc_AC_COMPILE_CHECK_SIZEOF(int) + gcc_AC_COMPILE_CHECK_SIZEOF(long) + if test $ac_cv_c_long_long = yes; then + gcc_AC_COMPILE_CHECK_SIZEOF(long long) + fi + if test $ac_cv_c___int64 = yes; then + gcc_AC_COMPILE_CHECK_SIZEOF(__int64) + fi + + gcc_AC_C_CHARSET + + # If the native compiler is GCC, we can enable warnings even in stage1. + # That's useful for people building cross-compilers, or just running a + # quick `make'. + warn_cflags= + if test "x$GCC" = "xyes"; then + warn_cflags='$(GCC_WARN_CFLAGS)' + fi + AC_SUBST(warn_cflags) + # Determine whether or not multilibs are enabled. AC_ARG_ENABLE(multilib, [ --enable-multilib enable library support for multiple ABIs], *************** AC_ARG_ENABLE(checking, *** 187,201 **** [ --enable-checking[=LIST] enable expensive run-time checks. With LIST, enable only specific categories of checks. ! Categories are: misc,tree,rtl,gc,gcac; default ! is misc,tree,gc], [ac_checking= ac_tree_checking= ac_rtl_checking= ac_gc_checking= ac_gc_always_collect= case "${enableval}" in ! yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;; no) ;; *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," set fnord $enableval; shift --- 270,286 ---- [ --enable-checking[=LIST] enable expensive run-time checks. With LIST, enable only specific categories of checks. ! Categories are: misc,tree,rtl,rtlflag,gc,gcac; ! default is misc,tree,gc,rtlflag], [ac_checking= ac_tree_checking= ac_rtl_checking= + ac_rtlflag_checking= ac_gc_checking= ac_gc_always_collect= case "${enableval}" in ! yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; ! ac_rtlflag_checking=1 ;; no) ;; *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," set fnord $enableval; shift *************** no) ;; *** 205,213 **** --- 290,300 ---- case $check in misc) ac_checking=1 ;; tree) ac_tree_checking=1 ;; + rtlflag) ac_rtlflag_checking=1 ;; rtl) ac_rtl_checking=1 ;; gc) ac_gc_checking=1 ;; gcac) ac_gc_always_collect=1 ;; + valgrind) ac_checking_valgrind=1 ;; *) AC_MSG_ERROR(unknown check category $check) ;; esac done *************** no) ;; *** 215,225 **** --- 302,315 ---- esac ], []) + nocommon_flag="" if test x$ac_checking != x ; then AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want more run-time sanity checks. This one gets a grab bag of miscellaneous but relatively cheap checks.]) + nocommon_flag=-fno-common fi + AC_SUBST(nocommon_flag) if test x$ac_tree_checking != x ; then AC_DEFINE(ENABLE_TREE_CHECKING, 1, [Define if you want all operations on trees (the basic data *************** if test x$ac_rtl_checking != x ; then *** 232,237 **** --- 322,333 ---- of the optimizer and back end) to be checked for dynamic type safety at runtime. This is quite expensive.]) fi + if test x$ac_rtlflag_checking != x ; then + AC_DEFINE(ENABLE_RTL_FLAG_CHECKING, 1, + [Define if you want RTL flag accesses to be checked against the RTL + codes that are supported for each access macro. This is relatively + cheap.]) + fi if test x$ac_gc_checking != x ; then AC_DEFINE(ENABLE_GC_CHECKING, 1, [Define if you want the garbage collector to do object poisoning and *************** if test x$ac_gc_always_collect != x ; th *** 243,253 **** paranoid mode, validating the entire heap and collecting garbage at every opportunity. This is extremely expensive.]) fi ! ! AC_ARG_ENABLE(cpp, ! [ --disable-cpp don't provide a user-visible C preprocessor], ! [], [enable_cpp=yes]) AC_ARG_WITH(cpp_install_dir, [ --with-cpp-install-dir=DIR --- 339,385 ---- paranoid mode, validating the entire heap and collecting garbage at every opportunity. This is extremely expensive.]) fi + valgrind_path_defines= + valgrind_command= + if test x$ac_checking_valgrind != x ; then + # It is certainly possible that there's valgrind but no valgrind.h. + # GCC relies on making annotations so we must have both. + AC_CHECK_HEADER(valgrind.h, have_valgrind_h=yes, have_valgrind_h=no) + AM_PATH_PROG_WITH_TEST(valgrind_path, valgrind, + [$ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1]) + if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then + AC_MSG_ERROR([*** Can't find both valgrind and valgrind.h]) + fi + valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' + valgrind_command="$valgrind_path -q" + AC_DEFINE(ENABLE_VALGRIND_CHECKING, 1, + [Define if you want to run subprograms and generated programs + through valgrind (a memory checker). This is extremely expensive.]) + fi + AC_SUBST(valgrind_path_defines) + AC_SUBST(valgrind_command) ! # Enable code coverage collection ! AC_ARG_ENABLE(coverage, ! [ --enable-coverage[=LEVEL] ! enable compiler\'s code coverage collection. ! Use to measure compiler performance and locate ! unused parts of the compiler. With LEVEL, specificy ! optimization. Values are opt, noopt, ! default is noopt], ! [case "${enableval}" in ! yes|noopt) ! coverage_flags="-fprofile-arcs -ftest-coverage -O0" ! ;; ! opt) ! coverage_flags="-fprofile-arcs -ftest-coverage -O2" ! ;; ! *) ! AC_MSG_ERROR(unknown coverage setting $enableval) ! ;; ! esac], ! [coverage_flags=""]) ! AC_SUBST(coverage_flags) AC_ARG_WITH(cpp_install_dir, [ --with-cpp-install-dir=DIR *************** AC_ARG_ENABLE(shared, *** 343,430 **** ], [enable_shared=yes]) AC_SUBST(enable_shared) - # Determine the host, build, and target systems - AC_CANONICAL_SYSTEM - - # Set program_transform_name - AC_ARG_PROGRAM - - # Find the native compiler - AC_PROG_CC - AC_PROG_CC_C_O - # autoconf is lame and doesn't give us any substitution variable for this. - if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then - NO_MINUS_C_MINUS_O=yes - else - OUTPUT_OPTION='-o $@' - fi - AC_SUBST(NO_MINUS_C_MINUS_O) - AC_SUBST(OUTPUT_OPTION) - - # See if GNAT has been installed - gcc_AC_PROG_GNAT - - AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-long-long, - ac_cv_prog_cc_no_long_long, - [save_CFLAGS="$CFLAGS" - CFLAGS="-Wno-long-long" - AC_TRY_COMPILE(,,ac_cv_prog_cc_no_long_long=yes, - ac_cv_prog_cc_no_long_long=no) - CFLAGS="$save_CFLAGS"]) - - if test x$have_gnat != xno ; then - AC_CACHE_CHECK(whether ${ADAC} accepts -Wno-long-long, - ac_cv_prog_adac_no_long_long, - [cat >conftest.adb <&5 2>&5 ; then - ac_cv_prog_adac_no_long_long=yes - else - ac_cv_prog_adac_no_long_long=no - fi - rm -f conftest*]) - else - ac_cv_prog_adac_no_long_long=yes - fi - - strict1_warn= - if test $ac_cv_prog_cc_no_long_long = yes && \ - test $ac_cv_prog_adac_no_long_long = yes ; then - strict1_warn="-pedantic -Wno-long-long" - fi - AC_SUBST(strict1_warn) - - AC_PROG_CPP - AC_C_INLINE - gcc_AC_C_VOLATILE - - gcc_AC_C_LONG_DOUBLE - gcc_AC_C_LONG_LONG - gcc_AC_C__BOOL - - # sizeof(char) is 1 by definition. - gcc_AC_COMPILE_CHECK_SIZEOF(short) - gcc_AC_COMPILE_CHECK_SIZEOF(int) - gcc_AC_COMPILE_CHECK_SIZEOF(long) - if test $ac_cv_c_long_long = yes; then - gcc_AC_COMPILE_CHECK_SIZEOF(long long) - fi - if test $ac_cv_c___int64 = yes; then - gcc_AC_COMPILE_CHECK_SIZEOF(__int64) - fi - - gcc_AC_C_CHARSET - - # If the native compiler is GCC, we can enable warnings even in stage1. - # That's useful for people building cross-compilers, or just running a - # quick `make'. - warn_cflags= - if test "x$GCC" = "xyes"; then - warn_cflags='$(GCC_WARN_CFLAGS)' - fi - AC_SUBST(warn_cflags) - # Stage specific cflags for build. stage1_cflags= case $build in --- 475,480 ---- *************** else *** 523,529 **** # that we can use it. gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, [GNU texinfo.* \([0-9][0-9.]*\)], ! [4.[1-9]*]) fi if test $gcc_cv_prog_makeinfo_modern = no; then --- 573,579 ---- # that we can use it. gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, [GNU texinfo.* \([0-9][0-9.]*\)], ! [4.[2-9]*]) fi if test $gcc_cv_prog_makeinfo_modern = no; then *************** dnl LEXLIB is not useful in gcc. *** 551,557 **** if test -f $srcdir/../flex/skel.c; then FLEX='$(objdir)/../flex/flex' else ! AC_CHECK_PROG(FLEX, flex, flex, false) fi # Bison? --- 601,607 ---- if test -f $srcdir/../flex/skel.c; then FLEX='$(objdir)/../flex/flex' else ! AC_CHECK_PROG(FLEX, flex, flex, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex) fi # Bison? *************** fi *** 559,565 **** if test -f $srcdir/../bison/bison.simple; then BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' else ! AC_CHECK_PROG(BISON, bison, bison, false) fi # These libraries may be used by collect2. --- 609,615 ---- if test -f $srcdir/../bison/bison.simple; then BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' else ! AC_CHECK_PROG(BISON, bison, bison, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison) fi # These libraries may be used by collect2. *************** GNAT_LIBEXC="$LIBS" *** 591,596 **** --- 641,655 ---- LIBS="$save_LIBS" AC_SUBST(GNAT_LIBEXC) + # Some systems put ldexp and frexp in libm instead of libc; assume + # they're both in the same place. jcf-dump needs them. + save_LIBS="$LIBS" + LIBS= + AC_SEARCH_LIBS(ldexp, m) + LDEXP_LIB="$LIBS" + LIBS="$save_LIBS" + AC_SUBST(LDEXP_LIB) + # See if the stage1 system preprocessor understands the ANSI C # preprocessor stringification operator. (Used by symcat.h.) AC_C_STRINGIZE *************** dnl gcc_AC_C_ENUM_BF_UNSIGNED *** 616,622 **** AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \ sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ ! fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat) AC_CHECK_TYPE(ssize_t, int) --- 675,682 ---- AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \ sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ ! fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \ ! scandir alphasort) AC_CHECK_TYPE(ssize_t, int) *************** saved_CFLAGS="$CFLAGS" *** 666,672 **** CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \ strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ ! fprintf_unlocked strstr errno \ malloc realloc calloc free basename getopt clock, , ,[ #include "ansidecl.h" #include "system.h"]) --- 726,732 ---- CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \ strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ ! fprintf_unlocked strstr errno vasprintf \ malloc realloc calloc free basename getopt clock, , ,[ #include "ansidecl.h" #include "system.h"]) *************** gcc_AC_CHECK_DECLS(getrlimit setrlimit g *** 679,684 **** --- 739,753 ---- #endif ]) + AC_TRY_COMPILE([ + #include "ansidecl.h" + #include "system.h" + #ifdef HAVE_SYS_RESOURCE_H + #include + #endif + ],[rlim_t l = 0;],,[AC_DEFINE([rlim_t],[long], + [Define to \`long' if doesn't define.])]) + gcc_AC_CHECK_DECLS(times, , ,[ #include "ansidecl.h" #include "system.h" *************** if test $gcc_cv_type_clock_t = yes; then *** 713,718 **** --- 782,791 ---- [Define if defines clock_t.]) fi + AC_ARG_ENABLE(initfini-array, + [ --enable-initfini-array use .init_array/.fini_array sections], + gcc_cv_initfinit_array=$enableval, [gcc_AC_INITFINI_ARRAY]) + # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. CFLAGS="$saved_CFLAGS" *************** objext='.o' *** 725,730 **** --- 798,804 ---- AC_SUBST(manext) AC_SUBST(objext) + target_gtfiles= build_xm_file= build_xm_defines= build_install_headers_dir=install-headers-tar *************** if test x"$dwarf2" = xyes *** 766,786 **** then tm_file="$tm_file tm-dwarf2.h" fi - if test x$float_format = x - then float_format=i64 - fi - - if test $float_format = none - then float_h_file=Makefile.in - else float_h_file=float-$float_format.h - fi - - # Handle cpp installation. - if test x$enable_cpp != xno - then - tmake_file="$tmake_file t-install-cpp" - fi - # Say what files are being used for the output code and MD file. echo "Using \`$srcdir/config/$out_file' for machine-specific logic." echo "Using \`$srcdir/config/$md_file' as machine description file." --- 840,845 ---- *************** if test x$thread_file = x; then *** 868,873 **** --- 927,944 ---- fi fi + # Look for a file containing extra machine modes. + if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then + extra_modes_file='$(srcdir)'/config/${extra_modes} + AC_SUBST(extra_modes_file) + AC_DEFINE_UNQUOTED(EXTRA_MODES_FILE, "$extra_modes", + [Define to the name of a file containing a list of extra machine modes + for this architecture.]) + AC_DEFINE(EXTRA_CC_MODES, 1, + [Define if the target architecture needs extra machine modes to represent + the results of comparisons.]) + fi + # auto-host.h is the file containing items generated by autoconf and is # the first file included by config.h. # If host=build, it is correct to have hconfig include auto-host.h *************** else *** 902,908 **** cd .. rm -rf $tempdir build_auto=auto-build.h ! FORBUILD=../$build fi AC_SUBST(FORBUILD) --- 973,979 ---- cd .. rm -rf $tempdir build_auto=auto-build.h ! FORBUILD=../$build_alias fi AC_SUBST(FORBUILD) *************** fi *** 1010,1018 **** esac # Get an absolute path to the GCC top-level source directory ! holddir=`pwd` cd $srcdir ! topdir=`pwd` cd $holddir # Conditionalize the makefile for this host machine. --- 1081,1089 ---- esac # Get an absolute path to the GCC top-level source directory ! holddir=`${PWDCMD-pwd}` cd $srcdir ! topdir=`${PWDCMD-pwd}` cd $holddir # Conditionalize the makefile for this host machine. *************** for f in $tm_file; do *** 1074,1080 **** ansidecl.h ) tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; defaults.h ) ! tm_file_list="${tm_file_list} $f" ;; *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; esac done --- 1145,1151 ---- ansidecl.h ) tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; defaults.h ) ! tm_file_list="${tm_file_list} \$(srcdir)/$f" ;; *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; esac done *************** for f in $host_xm_file; do *** 1089,1096 **** case $f in ansidecl.h ) host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; ! auto-host.h | defaults.h ) host_xm_file_list="${host_xm_file_list} $f" ;; *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; esac done --- 1160,1169 ---- case $f in ansidecl.h ) host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; ! auto-host.h ) host_xm_file_list="${host_xm_file_list} $f" ;; + defaults.h ) + host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; esac done *************** for f in $build_xm_file; do *** 1100,1107 **** case $f in ansidecl.h ) build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; ! auto-build.h | auto-host.h | defaults.h ) build_xm_file_list="${build_xm_file_list} $f" ;; *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; esac done --- 1173,1182 ---- case $f in ansidecl.h ) build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; ! auto-build.h | auto-host.h ) build_xm_file_list="${build_xm_file_list} $f" ;; + defaults.h ) + host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; esac done *************** then *** 1116,1121 **** --- 1191,1201 ---- CROSS="-DCROSS_COMPILE" ALL=all.cross SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + case "$host","$target" in + i?86-*-*,x86_64-*-* \ + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac fi # If this is a cross-compiler that does not *************** AC_SUBST(inhibit_libc) *** 1142,1149 **** # FIXME. # These are the normal (build=host) settings: ! HOST_PREFIX= AC_SUBST(HOST_PREFIX) ! HOST_PREFIX_1=ignore- AC_SUBST(HOST_PREFIX_1) HOST_CC='$(CC)' AC_SUBST(HOST_CC) HOST_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(HOST_CFLAGS) --- 1222,1229 ---- # FIXME. # These are the normal (build=host) settings: ! BUILD_PREFIX= AC_SUBST(BUILD_PREFIX) ! BUILD_PREFIX_1=ignore- AC_SUBST(BUILD_PREFIX_1) HOST_CC='$(CC)' AC_SUBST(HOST_CC) HOST_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(HOST_CFLAGS) *************** STMP_FIXPROTO=stmp-fixproto AC_SUBST(STM *** 1153,1160 **** # And these apply if build != host. if test x$build != x$host then ! HOST_PREFIX=build- ! HOST_PREFIX_1=build- HOST_CC='$(CC_FOR_BUILD)' HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' --- 1233,1240 ---- # And these apply if build != host. if test x$build != x$host then ! BUILD_PREFIX=build- ! BUILD_PREFIX_1=build- HOST_CC='$(CC_FOR_BUILD)' HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' *************** elif test x$gcc_cv_as != x; then *** 1531,1544 **** fi rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 ! # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` if echo "$ld_ver" | grep GNU > /dev/null; then changequote(,)dnl ! ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` ! ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` if test 0"$ld_date" -lt 20020404; then if test -n "$ld_date"; then # If there was date string, but was earlier than 2002-04-04, fail --- 1611,1624 ---- fi rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 ! # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` if echo "$ld_ver" | grep GNU > /dev/null; then changequote(,)dnl ! ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` ! ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` if test 0"$ld_date" -lt 20020404; then if test -n "$ld_date"; then # If there was date string, but was earlier than 2002-04-04, fail *************** changequote(,)dnl *** 1564,1576 **** changequote([,])dnl fi fi - if test x"$gcc_cv_as_hidden" = xyes; then AC_DEFINE(HAVE_GAS_HIDDEN, 1, [Define if your assembler supports .hidden.]) fi AC_MSG_RESULT($gcc_cv_as_hidden) libgcc_visibility=$gcc_cv_as_hidden AC_SUBST(libgcc_visibility) AC_MSG_CHECKING(assembler leb128 support) --- 1644,1668 ---- changequote([,])dnl fi fi if test x"$gcc_cv_as_hidden" = xyes; then AC_DEFINE(HAVE_GAS_HIDDEN, 1, [Define if your assembler supports .hidden.]) fi AC_MSG_RESULT($gcc_cv_as_hidden) libgcc_visibility=$gcc_cv_as_hidden + case "$target" in + mips-sgi-irix6*) + if test x"$gnu_ld_flag" = x"no"; then + # Even if using gas with .hidden support, the resulting object files + # cannot be linked with the IRIX 6 O32 linker. With the N32 and + # N64 linkers, the problem is that the linker refuses to accept + # -call_shared (passed by default to the linker) and -r (used to + # link the object file generated without .hidden directives with + # one that hides symbols), so we also lose. + libgcc_visibility=no + fi + ;; + esac AC_SUBST(libgcc_visibility) AC_MSG_CHECKING(assembler leb128 support) *************** if test x"$gcc_cv_as_shf_merge" = xyes; *** 1715,1720 **** --- 1807,1951 ---- fi AC_MSG_RESULT($gcc_cv_as_shf_merge) + AC_MSG_CHECKING(assembler thread-local storage support) + gcc_cv_as_tls=no + conftest_s= + tls_first_major= + tls_first_minor= + case "$target" in + changequote(,)dnl + alpha*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + ldq $27,__tls_get_addr($29) !literal!1 + lda $16,foo($29) !tlsgd!1 + jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 + ldq $27,__tls_get_addr($29) !literal!2 + lda $16,foo($29) !tlsldm!2 + jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 + ldq $1,foo($29) !gotdtprel + ldah $2,foo($29) !dtprelhi + lda $3,foo($2) !dtprello + lda $4,foo($29) !dtprel + ldq $1,foo($29) !gottprel + ldah $2,foo($29) !tprelhi + lda $3,foo($2) !tprello + lda $4,foo($29) !tprel' + tls_first_major=2 + tls_first_minor=13 + ;; + i[34567]86-*-*) + changequote([,])dnl + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + movl %gs:0, %eax + leal foo@TLSGD(,%ebx,1), %eax + leal foo@TLSLDM(%ebx), %eax + leal foo@DTPOFF(%eax), %edx + movl foo@GOTTPOFF(%ebx), %eax + subl foo@GOTTPOFF(%ebx), %eax + addl foo@GOTNTPOFF(%ebx), %eax + movl foo@INDNTPOFF, %eax + movl $foo@TPOFF, %eax + subl $foo@TPOFF, %eax + leal foo@NTPOFF(%ecx), %eax' + tls_first_major=2 + tls_first_minor=14 + ;; + x86_64-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + movq %fs:0, %rax + leaq foo@TLSGD(%rip), %rdi + leaq foo@TLSLD(%rip), %rdi + leaq foo@DTPOFF(%rax), %rdx + movq foo@GOTTPOFF(%rip), %rax + movq $foo@TPOFF, %rax' + tls_first_major=2 + tls_first_minor=14 + ;; + ia64-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: data8 25 + .text + addl r16 = @ltoff(@dtpmod(foo#)), gp + addl r17 = @ltoff(@dtprel(foo#)), gp + addl r18 = @ltoff(@tprel(foo#)), gp + addl r19 = @dtprel(foo#), gp + adds r21 = @dtprel(foo#), r13 + movl r23 = @dtprel(foo#) + addl r20 = @tprel(foo#), gp + adds r22 = @tprel(foo#), r13 + movl r24 = @tprel(foo#)' + tls_first_major=2 + tls_first_minor=13 + ;; + s390-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + .long foo@TLSGD + .long foo@TLSLDM + .long foo@DTPOFF + .long foo@NTPOFF + .long foo@GOTNTPOFF + .long foo@INDNTPOFF + l %r1,foo@GOTNTPOFF(%r12) + l %r1,0(%r1):tls_load:foo + bas %r14,0(%r1,%r13):tls_gdcall:foo + bas %r14,0(%r1,%r13):tls_ldcall:foo' + tls_first_major=2 + tls_first_minor=14 + ;; + s390x-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 + .text + .quad foo@TLSGD + .quad foo@TLSLDM + .quad foo@DTPOFF + .quad foo@NTPOFF + .quad foo@GOTNTPOFF + lg %r1,foo@GOTNTPOFF(%r12) + larl %r1,foo@INDNTPOFF + brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo + brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' + tls_first_major=2 + tls_first_minor=14 + ;; + esac + if test -z "$tls_first_major"; then + : + elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x + then + if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \ + -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \ + -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then + gcc_cv_as_tls=yes + fi + elif test x$gcc_cv_as != x; then + echo "$conftest_s" > conftest.s + if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 + then + gcc_cv_as_tls=yes + fi + rm -f conftest.s conftest.o + fi + if test "$gcc_cv_as_tls" = yes; then + AC_DEFINE(HAVE_AS_TLS, 1, + [Define if your assembler supports thread-local storage.]) + fi + AC_MSG_RESULT($gcc_cv_as_tls) + case "$target" in # All TARGET_ABI_OSF targets. alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) *************** EOF *** 1927,1932 **** --- 2158,2198 ---- [Define true if the assembler supports '.long foo@GOTOFF'.]) AC_MSG_RESULT($gcc_cv_as_gotoff_in_data) ;; + + ia64*-*-*) + AC_CACHE_CHECK([assembler supports ltoffx and ldxmov], + gcc_cv_as_ltoffx_ldxmov_relocs, [ + gcc_cv_as_ltoffx_ldxmov_relocs=unknown + if test x$gcc_cv_gas_major_version != x \ + -a x$gcc_cv_gas_minor_version != x + then + if test "$gcc_cv_gas_major_version" -eq 2 \ + -a "$gcc_cv_gas_minor_version" -ge 14 \ + -o "$gcc_cv_gas_major_version" -gt 2; then + gcc_cv_as_ltoffx_ldxmov_relocs=yes + fi + elif test x$gcc_cv_as != x; then + cat > conftest.s << 'EOF' + changequote(,)dnl + .text + addl r15 = @ltoffx(x#), gp + ;; + ld8.mov r16 = [r15], x# + EOF + changequote([,])dnl + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_ltoffx_ldxmov_relocs=yes + else + gcc_cv_as_ltoffx_ldxmov_relocs=no + fi + rm -f conftest.s conftest.o + fi + ]) + if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then + AC_DEFINE(HAVE_AS_LTOFFX_LDXMOV_RELOCS, 1, + [Define if your assembler supports ltoffx and ldxmov relocations.]) + fi + ;; esac AC_MSG_CHECKING(assembler dwarf2 debug_line support) *************** gcc_cv_as_dwarf2_debug_line=no *** 1938,1944 **** # ??? Once 2.11 is released, probably need to add first known working # version to the per-target configury. case "$target" in ! i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-*) insn="nop" ;; ia64*-*-*) --- 2204,2211 ---- # ??? Once 2.11 is released, probably need to add first known working # version to the per-target configury. case "$target" in ! i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ ! | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*) insn="nop" ;; ia64*-*-*) *************** then *** 1992,1998 **** -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gdwarf2_debug_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s --- 2259,2265 ---- -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gdwarf2_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s *************** then *** 2018,2024 **** -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gstabs_debug_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s --- 2285,2291 ---- -o "$gcc_cv_gas_major_version" -gt 2 \ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ && test x"$insn" != x ; then ! gcc_cv_as_gstabs_flag="yes" fi elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo '' > conftest.s *************** if test x"$gcc_cv_as_gstabs_flag" = xyes *** 2034,2039 **** --- 2301,2344 ---- fi AC_MSG_RESULT($gcc_cv_as_gstabs_flag) + AC_MSG_CHECKING(linker read-only and read-write section mixing) + gcc_cv_ld_ro_rw_mix=unknown + if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then + gcc_cv_ld_ro_rw_mix=read-write + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then + echo '.section "myfoosect", "a"' > conftest1.s + echo '.section "myfoosect", "aw"' > conftest2.s + echo '.byte 1' >> conftest2.s + echo '.section "myfoosect", "a"' > conftest3.s + echo '.byte 0' >> conftest3.s + if $gcc_cv_as -o conftest1.o conftest1.s \ + && $gcc_cv_as -o conftest2.o conftest2.s \ + && $gcc_cv_as -o conftest3.o conftest3.s \ + && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ + conftest2.o conftest3.o; then + gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ + | grep -A1 myfoosect` + if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then + if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then + gcc_cv_ld_ro_rw_mix=read-only + else + gcc_cv_ld_ro_rw_mix=read-write + fi + fi + fi + changequote(,)dnl + rm -f conftest.* conftest[123].* + changequote([,])dnl + fi + if test x$gcc_cv_ld_ro_rw_mix = xread-write; then + AC_DEFINE(HAVE_LD_RO_RW_SECTION_MIXING, 1, + [Define if your linker links a mix of read-only + and read-write sections into a read-write section.]) + fi + AC_MSG_RESULT($gcc_cv_ld_ro_rw_mix) + AC_MSG_CHECKING(linker PT_GNU_EH_FRAME support) gcc_cv_ld_eh_frame_hdr=no if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then *************** elif test x$gcc_cv_ld != x; then *** 2046,2141 **** gcc_cv_ld_eh_frame_hdr=yes fi fi - AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr) if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then - AC_MSG_CHECKING(whether linker eh_frame optimizations work properly) - gcc_cv_ld_eh_frame_hdr_works=no - if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then - gcc_cv_ld_eh_frame_hdr_works=yes - fi - elif test x$gcc_cv_ld != x; then - for gcc_WS in 4 8; do - cat > conftest.s <&AC_FD_CC 2>&1; then - if ($gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o; exit $?) 1>&AC_FD_CC 2>&1; then - changequote(,)dnl - if $gcc_cv_objdump -h conftest.so 2>&AC_FD_CC \ - | grep 'eh_frame_hdr[ ]*0*[01][048cC][ ]' 1>&AC_FD_CC 2>&1; then - gcc_cv_ld_eh_frame_hdr_works=yes; break - else - $gcc_cv_objdump -h conftest.so 2>/dev/null | grep eh_frame_hdr 1>&AC_FD_CC 2>&1 - fi - changequote([,])dnl - fi - fi - rm -f conftest.* - done - fi - AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr_works) - fi - if test x"$gcc_cv_ld_eh_frame_hdr" = xyes \ - && test x"$gcc_cv_ld_eh_frame_hdr_works" = xyes; then AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1, [Define if your linker supports --eh-frame-hdr option.]) fi ! if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include") fi --- 2351,2393 ---- gcc_cv_ld_eh_frame_hdr=yes fi fi if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1, [Define if your linker supports --eh-frame-hdr option.]) fi + AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr) ! # Miscellaneous target-specific checks. ! case "$target" in ! mips*-*-*) ! AC_MSG_CHECKING(whether libgloss uses STARTUP directives consistently) ! gcc_cv_mips_libgloss_startup=no ! gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss ! if test "x$exec_prefix" = xNONE; then ! if test "x$prefix" = xNONE; then ! test_prefix=/usr/local ! else ! test_prefix=$prefix ! fi ! else ! test_prefix=$exec_prefix ! fi ! for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld ! do ! if grep '^STARTUP' $f > /dev/null 2>&1; then ! gcc_cv_mips_libgloss_startup=yes ! break ! fi ! done ! if test x"$gcc_cv_mips_libgloss_startup" = xyes; then ! AC_DEFINE(HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES, 1, ! [Define if your MIPS libgloss linker scripts consistently include STARTUP directives.]) ! fi ! AC_MSG_RESULT($gcc_cv_mips_libgloss_startup) ! ;; ! esac ! ! if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include") fi *************** if test x"${enable_languages+set}" != xs *** 2153,2160 **** enable_languages=all fi else ! if test x"${enable_languages}" = x || ! test x"${enable_languages}" = xyes; then AC_MSG_ERROR([--enable-languages needs at least one language argument]) fi --- 2405,2412 ---- enable_languages=all fi else ! if test x"${enable_languages}" = x \ ! || test x"${enable_languages}" = xyes; then AC_MSG_ERROR([--enable-languages needs at least one language argument]) fi *************** changequote([,])dnl *** 2194,2199 **** --- 2446,2453 ---- esac done + expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` + found_languages= subdirs= for lang in ${srcdir}/*/config-lang.in .. do *************** changequote(,)dnl *** 2218,2223 **** --- 2472,2478 ---- *,all,*) add_this_lang=yes ;; *) add_this_lang=no ;; esac + found_languages="${found_languages} ${lang_alias}" if test x"${add_this_lang}" = xyes; then case $lang in ${srcdir}/ada/config-lang.in) *************** changequote([,])dnl *** 2235,2240 **** --- 2490,2524 ---- esac done + missing_languages= + for expected_language in ${expected_languages} .. + do + if test "${expected_language}" != ..; then + missing_language="${expected_language}" + if test "${expected_language}" = "c" \ + || test "${expected_language}" = "all"; then + missing_language= + fi + for found_language in ${found_languages} .. + do + if test "${found_language}" != ..; then + if test "${expected_language}" = "${found_language}"; then + missing_language= + fi + fi + done + if test "x${missing_language}" != x; then + missing_languages="${missing_languages} ${missing_language}" + fi + fi + done + + if test "x$missing_languages" != x; then + AC_MSG_ERROR([ + The following requested languages were not found:${missing_languages} + The following languages were available: c${found_languages}]) + fi + # Make gthr-default.h if we have a thread file. gthread_flags= if test $thread_file != single; then *************** AC_ARG_ENABLE(sjlj-exceptions, *** 2299,2304 **** --- 2583,2598 ---- AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj, [Define 0/1 to force the choice for exception handling model.])]) + # Use libunwind based exception handling. + AC_ARG_ENABLE(libunwind-exceptions, + [ --enable-libunwind-exceptions force use libunwind for exceptions], + use_libunwind_exceptions=$enableval, + use_libunwind_exceptions=no) + if test x"$use_libunwind_exceptions" = xyes; then + AC_DEFINE(USE_LIBUNWIND_EXCEPTIONS, 1, + [Define if gcc should use -lunwind.]) + fi + # Make empty files to contain the specs and options for each language. # Then add #include lines to for a compiler that has specs and/or options. *************** all_languages= *** 2324,2332 **** all_boot_languages= all_compilers= all_stagestuff= ! all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc' # List of language makefile fragments. all_lang_makefiles= # Add the language fragments. # Languages are added via two mechanisms. Some information must be --- 2618,2631 ---- all_boot_languages= all_compilers= all_stagestuff= ! all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' # List of language makefile fragments. all_lang_makefiles= + # Files for gengtype + all_gtfiles="$target_gtfiles" + # Files for gengtype with language + all_gtfiles_files_langs= + all_gtfiles_files_files= # Add the language fragments. # Languages are added via two mechanisms. Some information must be *************** do *** 2347,2352 **** --- 2646,2652 ---- compilers= stagestuff= outputs= + gtfiles= . ${srcdir}/$s/config-lang.in if test "x$language" = x then *************** do *** 2365,2373 **** --- 2665,2696 ---- all_compilers="$all_compilers $compilers" all_stagestuff="$all_stagestuff $stagestuff" all_outputs="$all_outputs $outputs" + all_gtfiles="$all_gtfiles $gtfiles" + for f in .. $gtfiles + do + if test $f != ".." + then + all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " + all_gtfiles_files_files="$all_gtfiles_files_files ${f} " + fi + done fi done + # Pick up gtfiles for c + gtfiles= + s="c" + . ${srcdir}/c-config-lang.in + all_gtfiles="$all_gtfiles $gtfiles" + for f in .. $gtfiles + do + if test $f != ".." + then + all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " + all_gtfiles_files_files="$all_gtfiles_files_files ${f} " + fi + done + check_languages= for language in .. $all_languages do *************** else *** 2486,2493 **** fi) AC_SUBST(slibdir) ! # Nothing to do for FLOAT_H, float_format already handled. ! objdir=`pwd` AC_SUBST(objdir) # Process the language and host/target makefile fragments. --- 2809,2815 ---- fi) AC_SUBST(slibdir) ! objdir=`${PWDCMD-pwd}` AC_SUBST(objdir) # Process the language and host/target makefile fragments. *************** ${CONFIG_SHELL-/bin/sh} $srcdir/configur *** 2495,2502 **** --- 2817,2828 ---- # Substitute configuration variables AC_SUBST(subdirs) + AC_SUBST(srcdir) AC_SUBST(all_boot_languages) AC_SUBST(all_compilers) + AC_SUBST(all_gtfiles) + AC_SUBST(all_gtfiles_files_langs) + AC_SUBST(all_gtfiles_files_files) AC_SUBST(all_lang_makefiles) AC_SUBST(all_languages) AC_SUBST(all_stagestuff) *************** AC_SUBST(symbolic_link) *** 2543,2548 **** --- 2869,2875 ---- AC_SUBST(thread_file) AC_SUBST(tm_file_list) AC_SUBST(tm_file) + AC_SUBST(tm_defines) AC_SUBST(tm_p_file_list) AC_SUBST(tm_p_file) AC_SUBST(xm_file) *************** esac *** 2608,2614 **** if test "$symbolic_link" = "ln -s"; then for d in .. ${subdirs} fixinc ; do if test $d != ..; then ! STARTDIR=`pwd` cd $d for t in stage1 stage2 stage3 stage4 include do --- 2935,2941 ---- if test "$symbolic_link" = "ln -s"; then for d in .. ${subdirs} fixinc ; do if test $d != ..; then ! STARTDIR=`${PWDCMD-pwd}` cd $d for t in stage1 stage2 stage3 stage4 include do diff -Nrc3pad gcc-3.2.3/gcc/conflict.c gcc-3.3/gcc/conflict.c *** gcc-3.2.3/gcc/conflict.c 2002-01-12 04:14:50.000000000 +0000 --- gcc-3.3/gcc/conflict.c 2002-10-09 17:26:27.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 33,42 **** #include "hard-reg-set.h" #include "basic-block.h" - /* Use malloc to allocate obstack chunks. */ - #define obstack_chunk_alloc xmalloc - #define obstack_chunk_free free - /* A register conflict graph is an undirected graph containing nodes for some or all of the regs used in a function. Arcs represent conflicts, i.e. two nodes are connected by an arc if there is a --- 33,38 ---- *************** struct conflict_graph_def *** 116,122 **** R1 and R2. R1 is assumed to be smaller or equal to R2. */ #define CONFLICT_HASH_FN(R1, R2) ((R2) * ((R2) - 1) / 2 + (R1)) ! static unsigned arc_hash PARAMS ((const void *)); static int arc_eq PARAMS ((const void *, const void *)); static int print_conflict PARAMS ((int, int, void *)); static void mark_reg PARAMS ((rtx, rtx, void *)); --- 112,118 ---- R1 and R2. R1 is assumed to be smaller or equal to R2. */ #define CONFLICT_HASH_FN(R1, R2) ((R2) * ((R2) - 1) / 2 + (R1)) ! static hashval_t arc_hash PARAMS ((const void *)); static int arc_eq PARAMS ((const void *, const void *)); static int print_conflict PARAMS ((int, int, void *)); static void mark_reg PARAMS ((rtx, rtx, void *)); *************** static void mark_reg PARAMS ((rtx, rtx, *** 124,130 **** /* Callback function to compute the hash value of an arc. Uses current_graph to locate the graph to which the arc belongs. */ ! static unsigned arc_hash (arcp) const void *arcp; { --- 120,126 ---- /* Callback function to compute the hash value of an arc. Uses current_graph to locate the graph to which the arc belongs. */ ! static hashval_t arc_hash (arcp) const void *arcp; { *************** conflict_graph_delete (graph) *** 187,193 **** } /* Adds a conflict to GRAPH between regs REG1 and REG2, which must be ! distinct. Returns non-zero, unless the conflict is already present in GRAPH, in which case it does nothing and returns zero. */ int --- 183,189 ---- } /* Adds a conflict to GRAPH between regs REG1 and REG2, which must be ! distinct. Returns nonzero, unless the conflict is already present in GRAPH, in which case it does nothing and returns zero. */ int *************** conflict_graph_add (graph, reg1, reg2) *** 236,242 **** return 1; } ! /* Returns non-zero if a conflict exists in GRAPH between regs REG1 and REG2. */ int --- 232,238 ---- return 1; } ! /* Returns nonzero if a conflict exists in GRAPH between regs REG1 and REG2. */ int *************** conflict_graph_compute (regs, p) *** 447,465 **** regset regs; partition p; { - int b; conflict_graph graph = conflict_graph_new (max_reg_num ()); regset_head live_head; regset live = &live_head; regset_head born_head; regset born = &born_head; INIT_REG_SET (live); INIT_REG_SET (born); ! for (b = n_basic_blocks; --b >= 0; ) { - basic_block bb = BASIC_BLOCK (b); rtx insn; rtx head; --- 443,460 ---- regset regs; partition p; { conflict_graph graph = conflict_graph_new (max_reg_num ()); regset_head live_head; regset live = &live_head; regset_head born_head; regset born = &born_head; + basic_block bb; INIT_REG_SET (live); INIT_REG_SET (born); ! FOR_EACH_BB_REVERSE (bb) { rtx insn; rtx head; diff -Nrc3pad gcc-3.2.3/gcc/convert.c gcc-3.3/gcc/convert.c *** gcc-3.2.3/gcc/convert.c 2002-06-15 00:42:25.000000000 +0000 --- gcc-3.3/gcc/convert.c 2002-07-04 06:38:54.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 29,34 **** --- 29,35 ---- #include "flags.h" #include "convert.h" #include "toplev.h" + #include "langhooks.h" /* Convert EXPR to some pointer or reference type TYPE. *************** convert_to_pointer (type, expr) *** 61,67 **** return convert_to_pointer (type, ! convert (type_for_size (POINTER_SIZE, 0), expr)); default: error ("cannot convert to a pointer type"); --- 62,69 ---- return convert_to_pointer (type, ! convert ((*lang_hooks.types.type_for_size) ! (POINTER_SIZE, 0), expr)); default: error ("cannot convert to a pointer type"); *************** convert_to_integer (type, expr) *** 138,145 **** if (integer_zerop (expr)) expr = integer_zero_node; else ! expr = fold (build1 (CONVERT_EXPR, ! type_for_size (POINTER_SIZE, 0), expr)); return convert_to_integer (type, expr); --- 140,147 ---- if (integer_zerop (expr)) expr = integer_zero_node; else ! expr = fold (build1 (CONVERT_EXPR, (*lang_hooks.types.type_for_size) ! (POINTER_SIZE, 0), expr)); return convert_to_integer (type, expr); *************** convert_to_integer (type, expr) *** 189,196 **** else if (TREE_CODE (type) == ENUMERAL_TYPE || outprec != GET_MODE_BITSIZE (TYPE_MODE (type))) return build1 (NOP_EXPR, type, ! convert (type_for_mode (TYPE_MODE (type), ! TREE_UNSIGNED (type)), expr)); /* Here detect when we can distribute the truncation down past some --- 191,198 ---- else if (TREE_CODE (type) == ENUMERAL_TYPE || outprec != GET_MODE_BITSIZE (TYPE_MODE (type))) return build1 (NOP_EXPR, type, ! convert ((*lang_hooks.types.type_for_mode) ! (TYPE_MODE (type), TREE_UNSIGNED (type)), expr)); /* Here detect when we can distribute the truncation down past some *************** convert_to_integer (type, expr) *** 302,309 **** /* Can't do arithmetic in enumeral types so use an integer type that will hold the values. */ if (TREE_CODE (typex) == ENUMERAL_TYPE) ! typex = type_for_size (TYPE_PRECISION (typex), ! TREE_UNSIGNED (typex)); /* But now perhaps TYPEX is as wide as INPREC. In that case, do nothing special here. --- 304,311 ---- /* Can't do arithmetic in enumeral types so use an integer type that will hold the values. */ if (TREE_CODE (typex) == ENUMERAL_TYPE) ! typex = (*lang_hooks.types.type_for_size) ! (TYPE_PRECISION (typex), TREE_UNSIGNED (typex)); /* But now perhaps TYPEX is as wide as INPREC. In that case, do nothing special here. *************** convert_to_integer (type, expr) *** 313,328 **** /* Don't do unsigned arithmetic where signed was wanted, or vice versa. Exception: if both of the original operands were ! unsigned then we can safely do the work as unsigned; ! if we are distributing through a LSHIFT_EXPR, we must ! do the work as unsigned to avoid a signed overflow. And we may need to do it as unsigned if we truncate to the original size. */ ! typex = ((TREE_UNSIGNED (TREE_TYPE (expr)) ! || (TREE_UNSIGNED (TREE_TYPE (arg0)) ! && TREE_UNSIGNED (TREE_TYPE (arg1))) ! || ex_form == LSHIFT_EXPR) ! ? unsigned_type (typex) : signed_type (typex)); return convert (type, fold (build (ex_form, typex, convert (typex, arg0), --- 315,339 ---- /* Don't do unsigned arithmetic where signed was wanted, or vice versa. Exception: if both of the original operands were ! unsigned then we can safely do the work as unsigned. ! Exception: shift operations take their type solely ! from the first argument. ! Exception: the LSHIFT_EXPR case above requires that ! we perform this operation unsigned lest we produce ! signed-overflow undefinedness. And we may need to do it as unsigned if we truncate to the original size. */ ! if (TREE_UNSIGNED (TREE_TYPE (expr)) ! || (TREE_UNSIGNED (TREE_TYPE (arg0)) ! && (TREE_UNSIGNED (TREE_TYPE (arg1)) ! || ex_form == LSHIFT_EXPR ! || ex_form == RSHIFT_EXPR ! || ex_form == LROTATE_EXPR ! || ex_form == RROTATE_EXPR)) ! || ex_form == LSHIFT_EXPR) ! typex = (*lang_hooks.types.unsigned_type) (typex); ! else ! typex = (*lang_hooks.types.signed_type) (typex); return convert (type, fold (build (ex_form, typex, convert (typex, arg0), *************** convert_to_integer (type, expr) *** 343,350 **** /* Can't do arithmetic in enumeral types so use an integer type that will hold the values. */ if (TREE_CODE (typex) == ENUMERAL_TYPE) ! typex = type_for_size (TYPE_PRECISION (typex), ! TREE_UNSIGNED (typex)); /* But now perhaps TYPEX is as wide as INPREC. In that case, do nothing special here. --- 354,361 ---- /* Can't do arithmetic in enumeral types so use an integer type that will hold the values. */ if (TREE_CODE (typex) == ENUMERAL_TYPE) ! typex = (*lang_hooks.types.type_for_size) ! (TYPE_PRECISION (typex), TREE_UNSIGNED (typex)); /* But now perhaps TYPEX is as wide as INPREC. In that case, do nothing special here. *************** convert_to_integer (type, expr) *** 353,360 **** { /* Don't do unsigned arithmetic where signed was wanted, or vice versa. */ ! typex = (TREE_UNSIGNED (TREE_TYPE (expr)) ! ? unsigned_type (typex) : signed_type (typex)); return convert (type, fold (build1 (ex_form, typex, convert (typex, --- 364,373 ---- { /* Don't do unsigned arithmetic where signed was wanted, or vice versa. */ ! if (TREE_UNSIGNED (TREE_TYPE (expr))) ! typex = (*lang_hooks.types.unsigned_type) (typex); ! else ! typex = (*lang_hooks.types.signed_type) (typex); return convert (type, fold (build1 (ex_form, typex, convert (typex, *************** convert_to_integer (type, expr) *** 363,368 **** --- 376,387 ---- } case NOP_EXPR: + /* Don't introduce a + "can't convert between vector values of different size" error. */ + if (TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == VECTOR_TYPE + && (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_OPERAND (expr, 0)))) + != GET_MODE_SIZE (TYPE_MODE (type)))) + break; /* If truncating after truncating, might as well do all at once. If truncating after extending, we may get rid of wasted work. */ return convert (type, get_unwidened (TREE_OPERAND (expr, 0), type)); diff -Nrc3pad gcc-3.2.3/gcc/c-opts.c gcc-3.3/gcc/c-opts.c *** gcc-3.2.3/gcc/c-opts.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/c-opts.c 2003-05-03 00:18:51.000000000 +0000 *************** *** 0 **** --- 1,1797 ---- + /* C/ObjC/C++ command line option handling. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Neil Booth. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "tree.h" + #include "c-common.h" + #include "c-pragma.h" + #include "flags.h" + #include "toplev.h" + #include "langhooks.h" + #include "tree-inline.h" + #include "diagnostic.h" + #include "intl.h" + + /* CPP's options. */ + static cpp_options *cpp_opts; + + /* Input filename. */ + static const char *in_fname; + + /* Filename and stream for preprocessed output. */ + static const char *out_fname; + static FILE *out_stream; + + /* Append dependencies to deps_file. */ + static bool deps_append; + + /* If dependency switches (-MF etc.) have been given. */ + static bool deps_seen; + + /* Dependency output file. */ + static const char *deps_file; + + /* Number of deferred options, deferred options array size. */ + static size_t deferred_count, deferred_size; + + static void missing_arg PARAMS ((size_t)); + static size_t find_opt PARAMS ((const char *, int)); + static void set_Wimplicit PARAMS ((int)); + static void complain_wrong_lang PARAMS ((size_t)); + static void write_langs PARAMS ((char *, int)); + static void print_help PARAMS ((void)); + static void handle_OPT_d PARAMS ((const char *)); + static void set_std_cxx98 PARAMS ((int)); + static void set_std_c89 PARAMS ((int, int)); + static void set_std_c99 PARAMS ((int)); + static void check_deps_environment_vars PARAMS ((void)); + static void preprocess_file PARAMS ((void)); + static void handle_deferred_opts PARAMS ((void)); + static void sanitize_cpp_opts PARAMS ((void)); + + #ifndef STDC_0_IN_SYSTEM_HEADERS + #define STDC_0_IN_SYSTEM_HEADERS 0 + #endif + + #define CL_C_ONLY (1 << 0) /* Only C. */ + #define CL_OBJC_ONLY (1 << 1) /* Only ObjC. */ + #define CL_CXX_ONLY (1 << 2) /* Only C++. */ + #define CL_OBJCXX_ONLY (1 << 3) /* Only ObjC++. */ + #define CL_JOINED (1 << 4) /* If takes joined argument. */ + #define CL_SEPARATE (1 << 5) /* If takes a separate argument. */ + + #define CL_ARG (CL_JOINED | CL_SEPARATE) + #define CL_C (CL_C_ONLY | CL_OBJC_ONLY) + #define CL_OBJC (CL_OBJC_ONLY | CL_OBJCXX_ONLY) + #define CL_CXX (CL_CXX_ONLY | CL_OBJCXX_ONLY) + #define CL_ALL (CL_C | CL_CXX) + + /* This is the list of all command line options, with the leading "-" + removed. It must be sorted in ASCII collating order. All options + beginning with "f" or "W" are implicitly assumed to take a "no-" + form; this form should not be listed. The variable "on" is true if + the positive form is given, otherwise it is false. If you don't + want to allow a "no-" form, your handler should reject "on" being + false by returning zero. See, for example, the handling of + -ftabstop=. + + If the user gives an option to a front end that doesn't support it, + an error is output, mentioning which front ends the option is valid + for. If you don't want this, you must accept it for all front + ends, and test for the front end in the option handler. See, for + example, the handling of -Wno-strict-prototypes for C++. + + If you request an argument with CL_JOINED, CL_SEPARATE or their + combination CL_ARG, it is stored in the variable "arg", which is + guaranteed to be non-NULL and to not be an empty string. It points + to the argument either within the argv[] vector or within one of + that vector's strings, and so the text is permanent and copies need + not be made. Be sure to add an error message in missing_arg() if + the default is not appropriate. */ + + #define COMMAND_LINE_OPTIONS \ + OPT("-help", CL_ALL, OPT__help) \ + OPT("C", CL_ALL, OPT_C) \ + OPT("CC", CL_ALL, OPT_CC) \ + OPT("E", CL_ALL, OPT_E) \ + OPT("H", CL_ALL, OPT_H) \ + OPT("M", CL_ALL, OPT_M) \ + OPT("MD", CL_ALL | CL_SEPARATE, OPT_MD) \ + OPT("MF", CL_ALL | CL_ARG, OPT_MF) \ + OPT("MG", CL_ALL, OPT_MG) \ + OPT("MM", CL_ALL, OPT_MM) \ + OPT("MMD", CL_ALL | CL_SEPARATE, OPT_MMD) \ + OPT("MP", CL_ALL, OPT_MP) \ + OPT("MQ", CL_ALL | CL_ARG, OPT_MQ) \ + OPT("MT", CL_ALL | CL_ARG, OPT_MT) \ + OPT("P", CL_ALL, OPT_P) \ + OPT("Wabi", CL_CXX, OPT_Wabi) \ + OPT("Wall", CL_ALL, OPT_Wall) \ + OPT("Wbad-function-cast", CL_C, OPT_Wbad_function_cast) \ + OPT("Wcast-qual", CL_ALL, OPT_Wcast_qual) \ + OPT("Wchar-subscripts", CL_ALL, OPT_Wchar_subscripts) \ + OPT("Wcomment", CL_ALL, OPT_Wcomment) \ + OPT("Wcomments", CL_ALL, OPT_Wcomments) \ + OPT("Wconversion", CL_ALL, OPT_Wconversion) \ + OPT("Wctor-dtor-privacy", CL_CXX, OPT_Wctor_dtor_privacy) \ + OPT("Wdeprecated", CL_CXX, OPT_Wdeprecated) \ + OPT("Wdiv-by-zero", CL_C, OPT_Wdiv_by_zero) \ + OPT("Weffc++", CL_CXX, OPT_Weffcxx) \ + OPT("Wendif-labels", CL_ALL, OPT_Wendif_labels) \ + OPT("Werror", CL_ALL, OPT_Werror) \ + OPT("Werror-implicit-function-declaration", \ + CL_C, OPT_Werror_implicit_function_decl) \ + OPT("Wfloat-equal", CL_ALL, OPT_Wfloat_equal) \ + OPT("Wformat", CL_ALL, OPT_Wformat) \ + OPT("Wformat-extra-args", CL_ALL, OPT_Wformat_extra_args) \ + OPT("Wformat-nonliteral", CL_ALL, OPT_Wformat_nonliteral) \ + OPT("Wformat-security", CL_ALL, OPT_Wformat_security) \ + OPT("Wformat-y2k", CL_ALL, OPT_Wformat_y2k) \ + OPT("Wformat-zero-length", CL_C, OPT_Wformat_zero_length) \ + OPT("Wformat=", CL_ALL | CL_JOINED, OPT_Wformat_eq) \ + OPT("Wimplicit", CL_ALL, OPT_Wimplicit) \ + OPT("Wimplicit-function-declaration", CL_C, OPT_Wimplicit_function_decl) \ + OPT("Wimplicit-int", CL_C, OPT_Wimplicit_int) \ + OPT("Wimport", CL_ALL, OPT_Wimport) \ + OPT("Wlong-long", CL_ALL, OPT_Wlong_long) \ + OPT("Wmain", CL_C, OPT_Wmain) \ + OPT("Wmissing-braces", CL_ALL, OPT_Wmissing_braces) \ + OPT("Wmissing-declarations", CL_C, OPT_Wmissing_declarations) \ + OPT("Wmissing-format-attribute",CL_ALL, OPT_Wmissing_format_attribute) \ + OPT("Wmissing-prototypes", CL_ALL, OPT_Wmissing_prototypes) \ + OPT("Wmultichar", CL_ALL, OPT_Wmultichar) \ + OPT("Wnested-externs", CL_C, OPT_Wnested_externs) \ + OPT("Wnon-template-friend", CL_CXX, OPT_Wnon_template_friend) \ + OPT("Wnon-virtual-dtor", CL_CXX, OPT_Wnon_virtual_dtor) \ + OPT("Wnonnull", CL_C, OPT_Wnonnull) \ + OPT("Wold-style-cast", CL_CXX, OPT_Wold_style_cast) \ + OPT("Woverloaded-virtual", CL_CXX, OPT_Woverloaded_virtual) \ + OPT("Wparentheses", CL_ALL, OPT_Wparentheses) \ + OPT("Wpmf-conversions", CL_CXX, OPT_Wpmf_conversions) \ + OPT("Wpointer-arith", CL_ALL, OPT_Wpointer_arith) \ + OPT("Wprotocol", CL_OBJC, OPT_Wprotocol) \ + OPT("Wredundant-decls", CL_ALL, OPT_Wredundant_decls) \ + OPT("Wreorder", CL_CXX, OPT_Wreorder) \ + OPT("Wreturn-type", CL_ALL, OPT_Wreturn_type) \ + OPT("Wselector", CL_OBJC, OPT_Wselector) \ + OPT("Wsequence-point", CL_C, OPT_Wsequence_point) \ + OPT("Wsign-compare", CL_ALL, OPT_Wsign_compare) \ + OPT("Wsign-promo", CL_CXX, OPT_Wsign_promo) \ + OPT("Wstrict-prototypes", CL_ALL, OPT_Wstrict_prototypes) \ + OPT("Wsynth", CL_CXX, OPT_Wsynth) \ + OPT("Wsystem-headers", CL_ALL, OPT_Wsystem_headers) \ + OPT("Wtraditional", CL_C, OPT_Wtraditional) \ + OPT("Wtrigraphs", CL_ALL, OPT_Wtrigraphs) \ + OPT("Wundeclared-selector", CL_OBJC, OPT_Wundeclared_selector) \ + OPT("Wundef", CL_ALL, OPT_Wundef) \ + OPT("Wunknown-pragmas", CL_ALL, OPT_Wunknown_pragmas) \ + OPT("Wunused-macros", CL_ALL, OPT_Wunused_macros) \ + OPT("Wwrite-strings", CL_ALL, OPT_Wwrite_strings) \ + OPT("ansi", CL_ALL, OPT_ansi) \ + OPT("d", CL_ALL | CL_JOINED, OPT_d) \ + OPT("fabi-version=", CL_CXX | CL_JOINED, OPT_fabi_version) \ + OPT("faccess-control", CL_CXX, OPT_faccess_control) \ + OPT("fall-virtual", CL_CXX, OPT_fall_virtual) \ + OPT("falt-external-templates",CL_CXX, OPT_falt_external_templates) \ + OPT("fasm", CL_ALL, OPT_fasm) \ + OPT("fbuiltin", CL_ALL, OPT_fbuiltin) \ + OPT("fbuiltin-", CL_ALL | CL_JOINED, OPT_fbuiltin_) \ + OPT("fcheck-new", CL_CXX, OPT_fcheck_new) \ + OPT("fcond-mismatch", CL_ALL, OPT_fcond_mismatch) \ + OPT("fconserve-space", CL_CXX, OPT_fconserve_space) \ + OPT("fconst-strings", CL_CXX, OPT_fconst_strings) \ + OPT("fconstant-string-class=", CL_OBJC | CL_JOINED, \ + OPT_fconstant_string_class) \ + OPT("fdefault-inline", CL_CXX, OPT_fdefault_inline) \ + OPT("fdollars-in-identifiers",CL_ALL, OPT_fdollars_in_identifiers) \ + OPT("fdump-", CL_ALL | CL_JOINED, OPT_fdump) \ + OPT("felide-constructors", CL_CXX, OPT_felide_constructors) \ + OPT("fenforce-eh-specs", CL_CXX, OPT_fenforce_eh_specs) \ + OPT("fenum-int-equiv", CL_CXX, OPT_fenum_int_equiv) \ + OPT("fexternal-templates", CL_CXX, OPT_fexternal_templates) \ + OPT("ffixed-form", CL_C, OPT_ffixed_form) \ + OPT("ffixed-line-length-", CL_C | CL_JOINED, OPT_ffixed_line_length) \ + OPT("ffor-scope", CL_CXX, OPT_ffor_scope) \ + OPT("ffreestanding", CL_C, OPT_ffreestanding) \ + OPT("fgnu-keywords", CL_CXX, OPT_fgnu_keywords) \ + OPT("fgnu-runtime", CL_OBJC, OPT_fgnu_runtime) \ + OPT("fguiding-decls", CL_CXX, OPT_fguiding_decls) \ + OPT("fhandle-exceptions", CL_CXX, OPT_fhandle_exceptions) \ + OPT("fhonor-std", CL_CXX, OPT_fhonor_std) \ + OPT("fhosted", CL_C, OPT_fhosted) \ + OPT("fhuge-objects", CL_CXX, OPT_fhuge_objects) \ + OPT("fimplement-inlines", CL_CXX, OPT_fimplement_inlines) \ + OPT("fimplicit-inline-templates", CL_CXX, OPT_fimplicit_inline_templates) \ + OPT("fimplicit-templates", CL_CXX, OPT_fimplicit_templates) \ + OPT("flabels-ok", CL_CXX, OPT_flabels_ok) \ + OPT("fms-extensions", CL_ALL, OPT_fms_extensions) \ + OPT("fname-mangling-version-",CL_CXX | CL_JOINED, OPT_fname_mangling) \ + OPT("fnew-abi", CL_CXX, OPT_fnew_abi) \ + OPT("fnext-runtime", CL_OBJC, OPT_fnext_runtime) \ + OPT("fnonansi-builtins", CL_CXX, OPT_fnonansi_builtins) \ + OPT("fnonnull-objects", CL_CXX, OPT_fnonnull_objects) \ + OPT("foperator-names", CL_CXX, OPT_foperator_names) \ + OPT("foptional-diags", CL_CXX, OPT_foptional_diags) \ + OPT("fpermissive", CL_CXX, OPT_fpermissive) \ + OPT("fpreprocessed", CL_ALL, OPT_fpreprocessed) \ + OPT("frepo", CL_CXX, OPT_frepo) \ + OPT("frtti", CL_CXX, OPT_frtti) \ + OPT("fshort-double", CL_ALL, OPT_fshort_double) \ + OPT("fshort-enums", CL_ALL, OPT_fshort_enums) \ + OPT("fshort-wchar", CL_ALL, OPT_fshort_wchar) \ + OPT("fshow-column", CL_ALL, OPT_fshow_column) \ + OPT("fsigned-bitfields", CL_ALL, OPT_fsigned_bitfields) \ + OPT("fsigned-char", CL_ALL, OPT_fsigned_char) \ + OPT("fsquangle", CL_CXX, OPT_fsquangle) \ + OPT("fstats", CL_CXX, OPT_fstats) \ + OPT("fstrict-prototype", CL_CXX, OPT_fstrict_prototype) \ + OPT("ftabstop=", CL_ALL | CL_JOINED, OPT_ftabstop) \ + OPT("ftemplate-depth-", CL_CXX | CL_JOINED, OPT_ftemplate_depth) \ + OPT("fthis-is-variable", CL_CXX, OPT_fthis_is_variable) \ + OPT("funsigned-bitfields", CL_ALL, OPT_funsigned_bitfields) \ + OPT("funsigned-char", CL_ALL, OPT_funsigned_char) \ + OPT("fuse-cxa-atexit", CL_CXX, OPT_fuse_cxa_atexit) \ + OPT("fvtable-gc", CL_CXX, OPT_fvtable_gc) \ + OPT("fvtable-thunks", CL_CXX, OPT_fvtable_thunks) \ + OPT("fweak", CL_CXX, OPT_fweak) \ + OPT("fxref", CL_CXX, OPT_fxref) \ + OPT("gen-decls", CL_OBJC, OPT_gen_decls) \ + OPT("lang-asm", CL_C_ONLY, OPT_lang_asm) \ + OPT("lang-objc", CL_ALL, OPT_lang_objc) \ + OPT("nostdinc", CL_ALL, OPT_nostdinc) \ + OPT("nostdinc++", CL_ALL, OPT_nostdincplusplus) \ + OPT("o", CL_ALL | CL_ARG, OPT_o) \ + OPT("pedantic", CL_ALL, OPT_pedantic) \ + OPT("pedantic-errors", CL_ALL, OPT_pedantic_errors) \ + OPT("print-objc-runtime-info", CL_OBJC, OPT_print_objc_runtime_info) \ + OPT("remap", CL_ALL, OPT_remap) \ + OPT("std=c++98", CL_CXX, OPT_std_cplusplus98) \ + OPT("std=c89", CL_C, OPT_std_c89) \ + OPT("std=c99", CL_C, OPT_std_c99) \ + OPT("std=c9x", CL_C, OPT_std_c9x) \ + OPT("std=gnu++98", CL_CXX, OPT_std_gnuplusplus98) \ + OPT("std=gnu89", CL_C, OPT_std_gnu89) \ + OPT("std=gnu99", CL_C, OPT_std_gnu99) \ + OPT("std=gnu9x", CL_C, OPT_std_gnu9x) \ + OPT("std=iso9899:1990", CL_C, OPT_std_iso9899_1990) \ + OPT("std=iso9899:199409", CL_C, OPT_std_iso9899_199409) \ + OPT("std=iso9899:1999", CL_C, OPT_std_iso9899_1999) \ + OPT("std=iso9899:199x", CL_C, OPT_std_iso9899_199x) \ + OPT("traditional-cpp", CL_ALL, OPT_traditional_cpp) \ + OPT("trigraphs", CL_ALL, OPT_trigraphs) \ + OPT("undef", CL_ALL, OPT_undef) \ + OPT("v", CL_ALL, OPT_v) \ + OPT("w", CL_ALL, OPT_w) + + #define OPT(text, flags, code) code, + enum opt_code + { + COMMAND_LINE_OPTIONS + N_OPTS + }; + #undef OPT + + struct cl_option + { + const char *opt_text; + unsigned char opt_len; + unsigned char flags; + ENUM_BITFIELD (opt_code) opt_code : 2 * CHAR_BIT; + }; + + #define OPT(text, flags, code) { text, sizeof(text) - 1, flags, code }, + #ifdef HOST_EBCDIC + static struct cl_option cl_options[] = + #else + static const struct cl_option cl_options[] = + #endif + { + COMMAND_LINE_OPTIONS + }; + #undef OPT + #undef COMMAND_LINE_OPTIONS + + /* Holds switches parsed by c_common_decode_option (), but whose + handling is deffered to c_common_post_options (). */ + static void defer_opt PARAMS ((enum opt_code, const char *)); + static struct deferred_opt + { + enum opt_code code; + const char *arg; + } *deferred_opts; + + + #ifdef HOST_EBCDIC + static int opt_comp PARAMS ((const void *, const void *)); + + /* Run-time sorting of options array. */ + static int + opt_comp (p1, p2) + const void *p1, *p2; + { + return strcmp (((struct cl_option *) p1)->opt_text, + ((struct cl_option *) p2)->opt_text); + } + #endif + + /* Complain that switch OPT_INDEX expects an argument but none was + provided. */ + static void + missing_arg (opt_index) + size_t opt_index; + { + const char *opt_text = cl_options[opt_index].opt_text; + + switch (cl_options[opt_index].opt_code) + { + case OPT_Wformat_eq: + case OPT_d: + case OPT_fabi_version: + case OPT_fbuiltin_: + case OPT_fdump: + case OPT_fname_mangling: + case OPT_ftabstop: + case OPT_ftemplate_depth: + default: + error ("missing argument to \"-%s\"", opt_text); + break; + + case OPT_fconstant_string_class: + error ("no class name specified with \"-%s\"", opt_text); + break; + + case OPT_MF: + case OPT_MD: + case OPT_MMD: + case OPT_o: + error ("missing filename after \"-%s\"", opt_text); + break; + + case OPT_MQ: + case OPT_MT: + error ("missing target after \"-%s\"", opt_text); + break; + } + } + + /* Perform a binary search to find which option the command-line INPUT + matches. Returns its index in the option array, and N_OPTS on + failure. + + Complications arise since some options can be suffixed with an + argument, and multiple complete matches can occur, e.g. -pedantic + and -pedantic-errors. Also, some options are only accepted by some + languages. If a switch matches for a different language and + doesn't match any alternatives for the true front end, the index of + the matched switch is returned anyway. The caller should check for + this case. */ + static size_t + find_opt (input, lang_flag) + const char *input; + int lang_flag; + { + size_t md, mn, mx; + size_t opt_len; + size_t result = N_OPTS; + int comp; + + mn = 0; + mx = N_OPTS; + + while (mx > mn) + { + md = (mn + mx) / 2; + + opt_len = cl_options[md].opt_len; + comp = strncmp (input, cl_options[md].opt_text, opt_len); + + if (comp < 0) + mx = md; + else if (comp > 0) + mn = md + 1; + else + { + /* The switch matches. It it an exact match? */ + if (input[opt_len] == '\0') + return md; + else + { + mn = md + 1; + + /* If the switch takes no arguments this is not a proper + match, so we continue the search (e.g. input="stdc++" + match was "stdc"). */ + if (!(cl_options[md].flags & CL_JOINED)) + continue; + + /* Is this switch valid for this front end? */ + if (!(cl_options[md].flags & lang_flag)) + { + /* If subsequently we don't find a better match, + return this and let the caller report it as a bad + match. */ + result = md; + continue; + } + + /* Two scenarios remain: we have the switch's argument, + or we match a longer option. This can happen with + -iwithprefix and -withprefixbefore. The longest + possible option match succeeds. + + Scan forwards, and return an exact match. Otherwise + return the longest valid option-accepting match (mx). + This loops at most twice with current options. */ + mx = md; + for (md = md + 1; md < (size_t) N_OPTS; md++) + { + opt_len = cl_options[md].opt_len; + if (strncmp (input, cl_options[md].opt_text, opt_len)) + break; + if (input[opt_len] == '\0') + return md; + if (cl_options[md].flags & lang_flag + && cl_options[md].flags & CL_JOINED) + mx = md; + } + + return mx; + } + } + } + + return result; + } + + /* Defer option CODE with argument ARG. */ + static void + defer_opt (code, arg) + enum opt_code code; + const char *arg; + { + /* FIXME: this should be in c_common_init_options, which should take + argc and argv. */ + if (!deferred_opts) + { + extern int save_argc; + deferred_size = save_argc; + deferred_opts = (struct deferred_opt *) + xmalloc (deferred_size * sizeof (struct deferred_opt)); + } + + if (deferred_count == deferred_size) + abort (); + + deferred_opts[deferred_count].code = code; + deferred_opts[deferred_count].arg = arg; + deferred_count++; + } + + /* Common initialization before parsing options. */ + void + c_common_init_options (lang) + enum c_language_kind lang; + { + #ifdef HOST_EBCDIC + /* For non-ASCII hosts, the cl_options array needs to be sorted at + runtime. */ + qsort (cl_options, N_OPTS, sizeof (struct cl_option), opt_comp); + #endif + #if ENABLE_CHECKING + { + size_t i; + + for (i = 1; i < N_OPTS; i++) + if (strcmp (cl_options[i - 1].opt_text, cl_options[i].opt_text) >= 0) + error ("options array incorrectly sorted: %s is before %s", + cl_options[i - 1].opt_text, cl_options[i].opt_text); + } + #endif + + c_language = lang; + parse_in = cpp_create_reader (lang == clk_c ? CLK_GNUC89 : CLK_GNUCXX); + cpp_opts = cpp_get_options (parse_in); + if (flag_objc) + cpp_opts->objc = 1; + + flag_const_strings = (lang == clk_cplusplus); + warn_pointer_arith = (lang == clk_cplusplus); + if (lang == clk_c) + warn_sign_compare = -1; + } + + /* Handle one command-line option in (argc, argv). + Can be called multiple times, to handle multiple sets of options. + Returns number of strings consumed. */ + int + c_common_decode_option (argc, argv) + int argc; + char **argv; + { + static const int lang_flags[] = {CL_C_ONLY, CL_C, CL_CXX_ONLY, CL_CXX}; + size_t opt_index; + const char *opt, *arg = 0; + char *dup = 0; + bool on = true; + int result, lang_flag; + const struct cl_option *option; + enum opt_code code; + + opt = argv[0]; + + /* Interpret "-" or a non-switch as a file name. */ + if (opt[0] != '-' || opt[1] == '\0') + { + if (!in_fname) + in_fname = opt; + else if (!out_fname) + out_fname = opt; + else + { + error ("too many filenames given. Type %s --help for usage", + progname); + return argc; + } + + return 1; + } + + /* Drop the "no-" from negative switches. */ + if ((opt[1] == 'W' || opt[1] == 'f') + && opt[2] == 'n' && opt[3] == 'o' && opt[4] == '-') + { + size_t len = strlen (opt) - 3; + + dup = xmalloc (len + 1); + dup[0] = '-'; + dup[1] = opt[1]; + memcpy (dup + 2, opt + 5, len - 2 + 1); + opt = dup; + on = false; + } + + result = cpp_handle_option (parse_in, argc, argv); + + /* Skip over '-'. */ + lang_flag = lang_flags[(c_language << 1) + flag_objc]; + opt_index = find_opt (opt + 1, lang_flag); + if (opt_index == N_OPTS) + goto done; + + result = 1; + option = &cl_options[opt_index]; + + /* Sort out any argument the switch takes. */ + if (option->flags & CL_ARG) + { + if (option->flags & CL_JOINED) + { + /* Have arg point to the original switch. This is because + some code, such as disable_builtin_function, expects its + argument to be persistent until the program exits. */ + arg = argv[0] + cl_options[opt_index].opt_len + 1; + if (!on) + arg += strlen ("no-"); + } + + /* If we don't have an argument, and CL_SEPARATE, try the next + argument in the vector. */ + if (!arg || (*arg == '\0' && option->flags & CL_SEPARATE)) + { + arg = argv[1]; + result = 2; + } + + if (!arg || *arg == '\0') + { + missing_arg (opt_index); + result = argc; + goto done; + } + } + + /* Complain about the wrong language after we've swallowed any + necessary extra argument. Eventually make this a hard error + after the call to find_opt, and return argc. */ + if (!(cl_options[opt_index].flags & lang_flag)) + { + complain_wrong_lang (opt_index); + goto done; + } + + switch (code = option->opt_code) + { + case N_OPTS: /* Shut GCC up. */ + break; + + case OPT__help: + print_help (); + break; + + case OPT_C: + cpp_opts->discard_comments = 0; + break; + + case OPT_CC: + cpp_opts->discard_comments = 0; + cpp_opts->discard_comments_in_macro_exp = 0; + break; + + case OPT_E: + flag_preprocess_only = 1; + break; + + case OPT_H: + cpp_opts->print_include_names = 1; + break; + + case OPT_M: + case OPT_MM: + /* When doing dependencies with -M or -MM, suppress normal + preprocessed output, but still do -dM etc. as software + depends on this. Preprocessed output does occur if -MD, -MMD + or environment var dependency generation is used. */ + cpp_opts->deps.style = (code == OPT_M ? DEPS_SYSTEM: DEPS_USER); + cpp_opts->no_output = 1; + cpp_opts->inhibit_warnings = 1; + break; + + case OPT_MD: + case OPT_MMD: + cpp_opts->deps.style = (code == OPT_MD ? DEPS_SYSTEM: DEPS_USER); + deps_file = arg; + break; + + case OPT_MF: + deps_seen = true; + deps_file = arg; + break; + + case OPT_MG: + deps_seen = true; + cpp_opts->deps.missing_files = true; + break; + + case OPT_MP: + deps_seen = true; + cpp_opts->deps.phony_targets = true; + break; + + case OPT_MQ: + case OPT_MT: + deps_seen = true; + defer_opt (code, arg); + break; + + case OPT_P: + cpp_opts->no_line_commands = 1; + break; + + case OPT_Wabi: + warn_abi = on; + break; + + case OPT_Wall: + set_Wunused (on); + set_Wformat (on); + set_Wimplicit (on); + warn_char_subscripts = on; + warn_missing_braces = on; + warn_parentheses = on; + warn_return_type = on; + warn_sequence_point = on; /* Was C only. */ + if (c_language == clk_cplusplus) + warn_sign_compare = on; + warn_switch = on; + warn_strict_aliasing = on; + + /* Only warn about unknown pragmas that are not in system + headers. */ + warn_unknown_pragmas = on; + + /* We save the value of warn_uninitialized, since if they put + -Wuninitialized on the command line, we need to generate a + warning about not using it without also specifying -O. */ + if (warn_uninitialized != 1) + warn_uninitialized = (on ? 2 : 0); + + if (c_language == clk_c) + /* We set this to 2 here, but 1 in -Wmain, so -ffreestanding + can turn it off only if it's not explicit. */ + warn_main = on * 2; + else + { + /* C++-specific warnings. */ + warn_ctor_dtor_privacy = on; + warn_nonvdtor = on; + warn_reorder = on; + warn_nontemplate_friend = on; + } + + cpp_opts->warn_trigraphs = on; + cpp_opts->warn_comments = on; + cpp_opts->warn_num_sign_change = on; + cpp_opts->warn_multichar = on; /* Was C++ only. */ + break; + + case OPT_Wbad_function_cast: + warn_bad_function_cast = on; + break; + + case OPT_Wcast_qual: + warn_cast_qual = on; + break; + + case OPT_Wchar_subscripts: + warn_char_subscripts = on; + break; + + case OPT_Wcomment: + case OPT_Wcomments: + cpp_opts->warn_comments = on; + break; + + case OPT_Wconversion: + warn_conversion = on; + break; + + case OPT_Wctor_dtor_privacy: + warn_ctor_dtor_privacy = on; + break; + + case OPT_Wdeprecated: + warn_deprecated = on; + break; + + case OPT_Wdiv_by_zero: + warn_div_by_zero = on; + break; + + case OPT_Weffcxx: + warn_ecpp = on; + break; + + case OPT_Wendif_labels: + cpp_opts->warn_endif_labels = on; + break; + + case OPT_Werror: + cpp_opts->warnings_are_errors = on; + break; + + case OPT_Werror_implicit_function_decl: + if (!on) + result = 0; + else + mesg_implicit_function_declaration = 2; + break; + + case OPT_Wfloat_equal: + warn_float_equal = on; + break; + + case OPT_Wformat: + set_Wformat (on); + break; + + case OPT_Wformat_eq: + set_Wformat (atoi (arg)); + break; + + case OPT_Wformat_extra_args: + warn_format_extra_args = on; + break; + + case OPT_Wformat_nonliteral: + warn_format_nonliteral = on; + break; + + case OPT_Wformat_security: + warn_format_security = on; + break; + + case OPT_Wformat_y2k: + warn_format_y2k = on; + break; + + case OPT_Wformat_zero_length: + warn_format_zero_length = on; + break; + + case OPT_Wimplicit: + set_Wimplicit (on); + break; + + case OPT_Wimplicit_function_decl: + mesg_implicit_function_declaration = on; + break; + + case OPT_Wimplicit_int: + warn_implicit_int = on; + break; + + case OPT_Wimport: + cpp_opts->warn_import = on; + break; + + case OPT_Wlong_long: + warn_long_long = on; + break; + + case OPT_Wmain: + if (on) + warn_main = 1; + else + warn_main = -1; + break; + + case OPT_Wmissing_braces: + warn_missing_braces = on; + break; + + case OPT_Wmissing_declarations: + warn_missing_declarations = on; + break; + + case OPT_Wmissing_format_attribute: + warn_missing_format_attribute = on; + break; + + case OPT_Wmissing_prototypes: + warn_missing_prototypes = on; + break; + + case OPT_Wmultichar: + cpp_opts->warn_multichar = on; + break; + + case OPT_Wnested_externs: + warn_nested_externs = on; + break; + + case OPT_Wnon_template_friend: + warn_nontemplate_friend = on; + break; + + case OPT_Wnon_virtual_dtor: + warn_nonvdtor = on; + break; + + case OPT_Wnonnull: + warn_nonnull = on; + break; + + case OPT_Wold_style_cast: + warn_old_style_cast = on; + break; + + case OPT_Woverloaded_virtual: + warn_overloaded_virtual = on; + break; + + case OPT_Wparentheses: + warn_parentheses = on; + break; + + case OPT_Wpmf_conversions: + warn_pmf2ptr = on; + break; + + case OPT_Wpointer_arith: + warn_pointer_arith = on; + break; + + case OPT_Wprotocol: + warn_protocol = on; + break; + + case OPT_Wselector: + warn_selector = on; + break; + + case OPT_Wredundant_decls: + warn_redundant_decls = on; + break; + + case OPT_Wreorder: + warn_reorder = on; + break; + + case OPT_Wreturn_type: + warn_return_type = on; + break; + + case OPT_Wsequence_point: + warn_sequence_point = on; + break; + + case OPT_Wsign_compare: + warn_sign_compare = on; + break; + + case OPT_Wsign_promo: + warn_sign_promo = on; + break; + + case OPT_Wstrict_prototypes: + if (!on && c_language == clk_cplusplus) + warning ("-Wno-strict-prototypes is not supported in C++"); + else + warn_strict_prototypes = on; + break; + + case OPT_Wsynth: + warn_synth = on; + break; + + case OPT_Wsystem_headers: + cpp_opts->warn_system_headers = on; + break; + + case OPT_Wtraditional: + warn_traditional = on; + cpp_opts->warn_traditional = on; + break; + + case OPT_Wtrigraphs: + cpp_opts->warn_trigraphs = on; + break; + + case OPT_Wundeclared_selector: + warn_undeclared_selector = on; + break; + + case OPT_Wundef: + cpp_opts->warn_undef = on; + break; + + case OPT_Wunknown_pragmas: + /* Set to greater than 1, so that even unknown pragmas in + system headers will be warned about. */ + warn_unknown_pragmas = on * 2; + break; + + case OPT_Wunused_macros: + cpp_opts->warn_unused_macros = on; + break; + + case OPT_Wwrite_strings: + if (c_language == clk_c) + flag_const_strings = on; + else + warn_write_strings = on; + break; + + case OPT_ansi: + if (c_language == clk_c) + set_std_c89 (false, true); + else + set_std_cxx98 (true); + break; + + case OPT_d: + handle_OPT_d (arg); + break; + + case OPT_fcond_mismatch: + if (c_language == clk_c) + { + flag_cond_mismatch = on; + break; + } + /* Fall through. */ + + case OPT_fall_virtual: + case OPT_fenum_int_equiv: + case OPT_fguiding_decls: + case OPT_fhonor_std: + case OPT_fhuge_objects: + case OPT_flabels_ok: + case OPT_fname_mangling: + case OPT_fnew_abi: + case OPT_fnonnull_objects: + case OPT_fsquangle: + case OPT_fstrict_prototype: + case OPT_fthis_is_variable: + case OPT_fvtable_thunks: + case OPT_fxref: + warning ("switch \"%s\" is no longer supported", argv[0]); + break; + + case OPT_fabi_version: + flag_abi_version = read_integral_parameter (arg, argv[0], 1); + break; + + case OPT_faccess_control: + flag_access_control = on; + break; + + case OPT_falt_external_templates: + flag_alt_external_templates = on; + if (on) + flag_external_templates = true; + cp_deprecated: + warning ("switch \"%s\" is deprecated, please see documentation for details", argv[0]); + break; + + case OPT_fasm: + flag_no_asm = !on; + break; + + case OPT_fbuiltin: + flag_no_builtin = !on; + break; + + case OPT_fbuiltin_: + if (on) + result = 0; + else + disable_builtin_function (arg); + break; + + case OPT_fdollars_in_identifiers: + dollars_in_ident = on; + break; + + case OPT_fdump: + if (!on || !dump_switch_p (argv[0] + strlen ("-f"))) + result = 0; + break; + + case OPT_ffreestanding: + on = !on; + /* Fall through... */ + case OPT_fhosted: + flag_hosted = on; + flag_no_builtin = !on; + /* warn_main will be 2 if set by -Wall, 1 if set by -Wmain */ + if (!on && warn_main == 2) + warn_main = 0; + break; + + case OPT_fshort_double: + flag_short_double = on; + break; + + case OPT_fshort_enums: + flag_short_enums = on; + break; + + case OPT_fshort_wchar: + flag_short_wchar = on; + break; + + case OPT_fsigned_bitfields: + flag_signed_bitfields = on; + explicit_flag_signed_bitfields = 1; + break; + + case OPT_fsigned_char: + flag_signed_char = on; + break; + + case OPT_funsigned_bitfields: + flag_signed_bitfields = !on; + explicit_flag_signed_bitfields = 1; + break; + + case OPT_funsigned_char: + flag_signed_char = !on; + break; + + case OPT_fcheck_new: + flag_check_new = on; + break; + + case OPT_fconserve_space: + flag_conserve_space = on; + break; + + case OPT_fconst_strings: + flag_const_strings = on; + break; + + case OPT_fconstant_string_class: + constant_string_class_name = arg; + break; + + case OPT_fdefault_inline: + flag_default_inline = on; + break; + + case OPT_felide_constructors: + flag_elide_constructors = on; + break; + + case OPT_fenforce_eh_specs: + flag_enforce_eh_specs = on; + break; + + case OPT_fexternal_templates: + flag_external_templates = on; + goto cp_deprecated; + + case OPT_ffixed_form: + case OPT_ffixed_line_length: + /* Fortran front end options ignored when preprocessing only. */ + if (flag_preprocess_only) + result = -1; + break; + + case OPT_ffor_scope: + flag_new_for_scope = on; + break; + + case OPT_fgnu_keywords: + flag_no_gnu_keywords = !on; + break; + + case OPT_fgnu_runtime: + flag_next_runtime = !on; + break; + + case OPT_fhandle_exceptions: + warning ("-fhandle-exceptions has been renamed to -fexceptions (and is now on by default)"); + flag_exceptions = on; + break; + + case OPT_fimplement_inlines: + flag_implement_inlines = on; + break; + + case OPT_fimplicit_inline_templates: + flag_implicit_inline_templates = on; + break; + + case OPT_fimplicit_templates: + flag_implicit_templates = on; + break; + + case OPT_fms_extensions: + flag_ms_extensions = on; + break; + + case OPT_fnext_runtime: + flag_next_runtime = on; + break; + + case OPT_fnonansi_builtins: + flag_no_nonansi_builtin = !on; + break; + + case OPT_foperator_names: + cpp_opts->operator_names = on; + break; + + case OPT_foptional_diags: + flag_optional_diags = on; + break; + + case OPT_fpermissive: + flag_permissive = on; + break; + + case OPT_fpreprocessed: + cpp_opts->preprocessed = on; + break; + + case OPT_frepo: + flag_use_repository = on; + if (on) + flag_implicit_templates = 0; + break; + + case OPT_frtti: + flag_rtti = on; + break; + + case OPT_fshow_column: + cpp_opts->show_column = on; + break; + + case OPT_fstats: + flag_detailed_statistics = on; + break; + + case OPT_ftabstop: + /* Don't recognize -fno-tabstop=. */ + if (!on) + return 0; + + /* It is documented that we silently ignore silly values. */ + { + char *endptr; + long tabstop = strtol (arg, &endptr, 10); + if (*endptr == '\0' && tabstop >= 1 && tabstop <= 100) + cpp_opts->tabstop = tabstop; + } + break; + + case OPT_ftemplate_depth: + max_tinst_depth = read_integral_parameter (arg, argv[0], 0); + break; + + case OPT_fvtable_gc: + flag_vtable_gc = on; + break; + + case OPT_fuse_cxa_atexit: + flag_use_cxa_atexit = on; + break; + + case OPT_fweak: + flag_weak = on; + break; + + case OPT_gen_decls: + flag_gen_declaration = 1; + break; + + case OPT_lang_asm: + cpp_set_lang (parse_in, CLK_ASM); + break; + + case OPT_lang_objc: + cpp_opts->objc = 1; + break; + + case OPT_nostdinc: + /* No default include directories. You must specify all + include-file directories with -I. */ + cpp_opts->no_standard_includes = 1; + break; + + case OPT_nostdincplusplus: + /* No default C++-specific include directories. */ + cpp_opts->no_standard_cplusplus_includes = 1; + break; + + case OPT_o: + if (!out_fname) + out_fname = arg; + else + { + error ("output filename specified twice"); + result = argc; + } + break; + + /* We need to handle the -pedantic switches here, rather than in + c_common_post_options, so that a subsequent -Wno-endif-labels + is not overridden. */ + case OPT_pedantic_errors: + cpp_opts->pedantic_errors = 1; + /* fall through */ + case OPT_pedantic: + cpp_opts->pedantic = 1; + cpp_opts->warn_endif_labels = 1; + break; + + case OPT_print_objc_runtime_info: + print_struct_values = 1; + break; + + case OPT_remap: + cpp_opts->remap = 1; + break; + + case OPT_std_cplusplus98: + case OPT_std_gnuplusplus98: + set_std_cxx98 (code == OPT_std_cplusplus98 /* ISO */); + break; + + case OPT_std_c89: + case OPT_std_iso9899_1990: + case OPT_std_iso9899_199409: + set_std_c89 (code == OPT_std_iso9899_199409 /* c94 */, true /* ISO */); + break; + + case OPT_std_gnu89: + set_std_c89 (false /* c94 */, false /* ISO */); + break; + + case OPT_std_c99: + case OPT_std_c9x: + case OPT_std_iso9899_1999: + case OPT_std_iso9899_199x: + set_std_c99 (true /* ISO */); + break; + + case OPT_std_gnu99: + case OPT_std_gnu9x: + set_std_c99 (false /* ISO */); + break; + + case OPT_trigraphs: + cpp_opts->trigraphs = 1; + break; + + case OPT_traditional_cpp: + cpp_opts->traditional = 1; + break; + + case OPT_undef: + flag_undef = 1; + break; + + case OPT_w: + cpp_opts->inhibit_warnings = 1; + break; + + case OPT_v: + cpp_opts->verbose = 1; + break; + } + + done: + if (dup) + free (dup); + return result; + } + + /* Post-switch processing. */ + bool + c_common_post_options () + { + /* Canonicalize the input and output filenames. */ + if (in_fname == NULL || !strcmp (in_fname, "-")) + in_fname = ""; + + if (out_fname == NULL || !strcmp (out_fname, "-")) + out_fname = ""; + + if (cpp_opts->deps.style == DEPS_NONE) + check_deps_environment_vars (); + + handle_deferred_opts (); + + sanitize_cpp_opts (); + + flag_inline_trees = 1; + + /* Use tree inlining if possible. Function instrumentation is only + done in the RTL level, so we disable tree inlining. */ + if (! flag_instrument_function_entry_exit) + { + if (!flag_no_inline) + flag_no_inline = 1; + if (flag_inline_functions) + { + flag_inline_trees = 2; + flag_inline_functions = 0; + } + } + + /* Special format checking options don't work without -Wformat; warn if + they are used. */ + if (warn_format_y2k && !warn_format) + warning ("-Wformat-y2k ignored without -Wformat"); + if (warn_format_extra_args && !warn_format) + warning ("-Wformat-extra-args ignored without -Wformat"); + if (warn_format_zero_length && !warn_format) + warning ("-Wformat-zero-length ignored without -Wformat"); + if (warn_format_nonliteral && !warn_format) + warning ("-Wformat-nonliteral ignored without -Wformat"); + if (warn_format_security && !warn_format) + warning ("-Wformat-security ignored without -Wformat"); + if (warn_missing_format_attribute && !warn_format) + warning ("-Wmissing-format-attribute ignored without -Wformat"); + + /* If an error has occurred in cpplib, note it so we fail + immediately. */ + errorcount += cpp_errors (parse_in); + + return flag_preprocess_only; + } + + /* Preprocess the input file to out_stream. */ + static void + preprocess_file () + { + /* Open the output now. We must do so even if no_output is on, + because there may be other output than from the actual + preprocessing (e.g. from -dM). */ + if (out_fname[0] == '\0') + out_stream = stdout; + else + out_stream = fopen (out_fname, "w"); + + if (out_stream == NULL) + fatal_io_error ("opening output file %s", out_fname); + else + cpp_preprocess_file (parse_in, in_fname, out_stream); + } + + /* Front end initialization common to C, ObjC and C++. */ + const char * + c_common_init (filename) + const char *filename; + { + /* Set up preprocessor arithmetic. Must be done after call to + c_common_nodes_and_builtins for type nodes to be good. */ + cpp_opts->precision = TYPE_PRECISION (intmax_type_node); + cpp_opts->char_precision = TYPE_PRECISION (char_type_node); + cpp_opts->int_precision = TYPE_PRECISION (integer_type_node); + cpp_opts->wchar_precision = TYPE_PRECISION (wchar_type_node); + cpp_opts->unsigned_wchar = TREE_UNSIGNED (wchar_type_node); + + /* Register preprocessor built-ins before calls to + cpp_main_file. */ + cpp_get_callbacks (parse_in)->register_builtins = cb_register_builtins; + + /* NULL is passed up to toplev.c and we exit quickly. */ + if (flag_preprocess_only) + { + preprocess_file (); + return NULL; + } + + /* Do this before initializing pragmas, as then cpplib's hash table + has been set up. NOTE: we are using our own file name here, not + the one supplied. */ + filename = init_c_lex (in_fname); + + init_pragma (); + + return filename; + } + + /* Common finish hook for the C, ObjC and C++ front ends. */ + void + c_common_finish () + { + FILE *deps_stream = NULL; + + if (cpp_opts->deps.style != DEPS_NONE) + { + /* If -M or -MM was seen without -MF, default output to the + output stream. */ + if (!deps_file) + deps_stream = out_stream; + else + { + deps_stream = fopen (deps_file, deps_append ? "a": "w"); + if (!deps_stream) + fatal_io_error ("opening dependency file %s", deps_file); + } + } + + /* For performance, avoid tearing down cpplib's internal structures + with cpp_destroy (). */ + errorcount += cpp_finish (parse_in, deps_stream); + + if (deps_stream && deps_stream != out_stream + && (ferror (deps_stream) || fclose (deps_stream))) + fatal_io_error ("closing dependency file %s", deps_file); + + if (out_stream && (ferror (out_stream) || fclose (out_stream))) + fatal_io_error ("when writing output to %s", out_fname); + } + + /* Either of two environment variables can specify output of + dependencies. Their value is either "OUTPUT_FILE" or "OUTPUT_FILE + DEPS_TARGET", where OUTPUT_FILE is the file to write deps info to + and DEPS_TARGET is the target to mention in the deps. They also + result in dependency information being appended to the output file + rather than overwriting it, and like Sun's compiler + SUNPRO_DEPENDENCIES suppresses the dependency on the main file. */ + static void + check_deps_environment_vars () + { + char *spec; + + GET_ENVIRONMENT (spec, "DEPENDENCIES_OUTPUT"); + if (spec) + cpp_opts->deps.style = DEPS_USER; + else + { + GET_ENVIRONMENT (spec, "SUNPRO_DEPENDENCIES"); + if (spec) + { + cpp_opts->deps.style = DEPS_SYSTEM; + cpp_opts->deps.ignore_main_file = true; + } + } + + if (spec) + { + /* Find the space before the DEPS_TARGET, if there is one. */ + char *s = strchr (spec, ' '); + if (s) + { + /* Let the caller perform MAKE quoting. */ + defer_opt (OPT_MT, s + 1); + *s = '\0'; + } + + /* Command line -MF overrides environment variables and default. */ + if (!deps_file) + deps_file = spec; + + deps_append = 1; + } + } + + /* Handle deferred command line switches. */ + static void + handle_deferred_opts () + { + size_t i; + + for (i = 0; i < deferred_count; i++) + { + struct deferred_opt *opt = &deferred_opts[i]; + + switch (opt->code) + { + case OPT_MT: + case OPT_MQ: + cpp_add_dependency_target (parse_in, opt->arg, opt->code == OPT_MQ); + break; + + default: + abort (); + } + } + + free (deferred_opts); + } + + /* These settings are appropriate for GCC, but not necessarily so for + cpplib as a library. */ + static void + sanitize_cpp_opts () + { + /* If we don't know what style of dependencies to output, complain + if any other dependency switches have been given. */ + if (deps_seen && cpp_opts->deps.style == DEPS_NONE) + error ("to generate dependencies you must specify either -M or -MM"); + + /* -dM and dependencies suppress normal output; do it here so that + the last -d[MDN] switch overrides earlier ones. */ + if (cpp_opts->dump_macros == dump_only) + cpp_opts->no_output = 1; + + /* Disable -dD, -dN and -dI if normal output is suppressed. Allow + -dM since at least glibc relies on -M -dM to work. */ + if (cpp_opts->no_output) + { + if (cpp_opts->dump_macros != dump_only) + cpp_opts->dump_macros = dump_none; + cpp_opts->dump_includes = 0; + } + + cpp_opts->unsigned_char = !flag_signed_char; + cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS; + + /* We want -Wno-long-long to override -pedantic -std=non-c99 + and/or -Wtraditional, whatever the ordering. */ + cpp_opts->warn_long_long + = warn_long_long && ((!flag_isoc99 && pedantic) || warn_traditional); + } + + /* Set the C 89 standard (with 1994 amendments if C94, without GNU + extensions if ISO). There is no concept of gnu94. */ + static void + set_std_c89 (c94, iso) + int c94, iso; + { + cpp_set_lang (parse_in, c94 ? CLK_STDC94: iso ? CLK_STDC89: CLK_GNUC89); + flag_iso = iso; + flag_no_asm = iso; + flag_no_gnu_keywords = iso; + flag_no_nonansi_builtin = iso; + flag_noniso_default_format_attributes = !iso; + flag_isoc94 = c94; + flag_isoc99 = 0; + flag_writable_strings = 0; + } + + /* Set the C 99 standard (without GNU extensions if ISO). */ + static void + set_std_c99 (iso) + int iso; + { + cpp_set_lang (parse_in, iso ? CLK_STDC99: CLK_GNUC99); + flag_no_asm = iso; + flag_no_nonansi_builtin = iso; + flag_noniso_default_format_attributes = !iso; + flag_iso = iso; + flag_isoc99 = 1; + flag_isoc94 = 1; + flag_writable_strings = 0; + } + + /* Set the C++ 98 standard (without GNU extensions if ISO). */ + static void + set_std_cxx98 (iso) + int iso; + { + cpp_set_lang (parse_in, iso ? CLK_CXX98: CLK_GNUCXX); + flag_no_gnu_keywords = iso; + flag_no_nonansi_builtin = iso; + flag_noniso_default_format_attributes = !iso; + flag_iso = iso; + } + + /* Handle setting implicit to ON. */ + static void + set_Wimplicit (on) + int on; + { + warn_implicit = on; + warn_implicit_int = on; + if (on) + { + if (mesg_implicit_function_declaration != 2) + mesg_implicit_function_declaration = 1; + } + else + mesg_implicit_function_declaration = 0; + } + + /* Args to -d specify what to dump. Silently ignore + unrecognized options; they may be aimed at toplev.c. */ + static void + handle_OPT_d (arg) + const char *arg; + { + char c; + + while ((c = *arg++) != '\0') + switch (c) + { + case 'M': + cpp_opts->dump_macros = dump_only; + break; + + case 'N': + cpp_opts->dump_macros = dump_names; + break; + + case 'D': + cpp_opts->dump_macros = dump_definitions; + break; + + case 'I': + cpp_opts->dump_includes = 1; + break; + } + } + + /* Write a slash-separated list of languages in FLAGS to BUF. */ + static void + write_langs (buf, flags) + char *buf; + int flags; + { + *buf = '\0'; + if (flags & CL_C_ONLY) + strcat (buf, "C"); + if (flags & CL_OBJC_ONLY) + { + if (*buf) + strcat (buf, "/"); + strcat (buf, "ObjC"); + } + if (flags & CL_CXX_ONLY) + { + if (*buf) + strcat (buf, "/"); + strcat (buf, "C++"); + } + } + + /* Complain that switch OPT_INDEX does not apply to this front end. */ + static void + complain_wrong_lang (opt_index) + size_t opt_index; + { + char ok_langs[60], bad_langs[60]; + int ok_flags = cl_options[opt_index].flags; + + write_langs (ok_langs, ok_flags); + write_langs (bad_langs, ~ok_flags); + warning ("\"-%s\" is valid for %s but not for %s", + cl_options[opt_index].opt_text, ok_langs, bad_langs); + } + + /* Handle --help output. */ + static void + print_help () + { + /* To keep the lines from getting too long for some compilers, limit + to about 500 characters (6 lines) per chunk. */ + fputs (_("\ + Switches:\n\ + -include Include the contents of before other files\n\ + -imacros Accept definition of macros in \n\ + -iprefix Specify as a prefix for next two options\n\ + -iwithprefix Add to the end of the system include path\n\ + -iwithprefixbefore Add to the end of the main include path\n\ + -isystem Add to the start of the system include path\n\ + "), stdout); + fputs (_("\ + -idirafter Add to the end of the system include path\n\ + -I Add to the end of the main include path\n\ + -I- Fine-grained include path control; see info docs\n\ + -nostdinc Do not search system include directories\n\ + (dirs specified with -isystem will still be used)\n\ + -nostdinc++ Do not search system include directories for C++\n\ + -o Put output into \n\ + "), stdout); + fputs (_("\ + -trigraphs Support ISO C trigraphs\n\ + -std= Specify the conformance standard; one of:\n\ + gnu89, gnu99, c89, c99, iso9899:1990,\n\ + iso9899:199409, iso9899:1999, c++98\n\ + -w Inhibit warning messages\n\ + -W[no-]trigraphs Warn if trigraphs are encountered\n\ + -W[no-]comment{s} Warn if one comment starts inside another\n\ + "), stdout); + fputs (_("\ + -W[no-]traditional Warn about features not present in traditional C\n\ + -W[no-]undef Warn if an undefined macro is used by #if\n\ + -W[no-]import Warn about the use of the #import directive\n\ + "), stdout); + fputs (_("\ + -W[no-]error Treat all warnings as errors\n\ + -W[no-]system-headers Do not suppress warnings from system headers\n\ + -W[no-]all Enable most preprocessor warnings\n\ + "), stdout); + fputs (_("\ + -M Generate make dependencies\n\ + -MM As -M, but ignore system header files\n\ + -MD Generate make dependencies and compile\n\ + -MMD As -MD, but ignore system header files\n\ + -MF Write dependency output to the given file\n\ + -MG Treat missing header file as generated files\n\ + "), stdout); + fputs (_("\ + -MP Generate phony targets for all headers\n\ + -MQ Add a MAKE-quoted target\n\ + -MT Add an unquoted target\n\ + "), stdout); + fputs (_("\ + -D Define a with string '1' as its value\n\ + -D= Define a with as its value\n\ + -A= Assert the to \n\ + -A-= Disable the to \n\ + -U Undefine \n\ + -v Display the version number\n\ + "), stdout); + fputs (_("\ + -H Print the name of header files as they are used\n\ + -C Do not discard comments\n\ + -dM Display a list of macro definitions active at end\n\ + -dD Preserve macro definitions in output\n\ + -dN As -dD except that only the names are preserved\n\ + -dI Include #include directives in the output\n\ + "), stdout); + fputs (_("\ + -f[no-]preprocessed Treat the input file as already preprocessed\n\ + -ftabstop= Distance between tab stops for column reporting\n\ + -P Do not generate #line directives\n\ + -remap Remap file names when including files\n\ + --help Display this information\n\ + "), stdout); + } diff -Nrc3pad gcc-3.2.3/gcc/c-parse.c gcc-3.3/gcc/c-parse.c *** gcc-3.2.3/gcc/c-parse.c 2003-04-22 07:00:33.000000000 +0000 --- gcc-3.3/gcc/c-parse.c 2003-05-14 00:20:40.000000000 +0000 *************** *** 1,197 **** ! /* A Bison parser, made by GNU Bison 1.875. */ ! ! /* Skeleton parser for Yacc-like parsing with Bison, ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* Written by Richard Stallman by simplifying the original so called ! ``semantic'' parser. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! /* Identify Bison output. */ ! #define YYBISON 1 ! ! /* Skeleton name. */ ! #define YYSKELETON_NAME "yacc.c" ! ! /* Pure parsers. */ ! #define YYPURE 0 ! ! /* Using locations. */ ! #define YYLSP_NEEDED 0 ! ! ! ! /* Tokens. */ ! #ifndef YYTOKENTYPE ! # define YYTOKENTYPE ! /* Put the tokens into the symbol table, so that GDB and other debuggers ! know about them. */ ! enum yytokentype { ! IDENTIFIER = 258, ! TYPENAME = 259, ! SCSPEC = 260, ! TYPESPEC = 261, ! TYPE_QUAL = 262, ! CONSTANT = 263, ! STRING = 264, ! ELLIPSIS = 265, ! SIZEOF = 266, ! ENUM = 267, ! STRUCT = 268, ! UNION = 269, ! IF = 270, ! ELSE = 271, ! WHILE = 272, ! DO = 273, ! FOR = 274, ! SWITCH = 275, ! CASE = 276, ! DEFAULT = 277, ! BREAK = 278, ! CONTINUE = 279, ! RETURN = 280, ! GOTO = 281, ! ASM_KEYWORD = 282, ! TYPEOF = 283, ! ALIGNOF = 284, ! ATTRIBUTE = 285, ! EXTENSION = 286, ! LABEL = 287, ! REALPART = 288, ! IMAGPART = 289, ! VA_ARG = 290, ! CHOOSE_EXPR = 291, ! TYPES_COMPATIBLE_P = 292, ! PTR_VALUE = 293, ! PTR_BASE = 294, ! PTR_EXTENT = 295, ! STRING_FUNC_NAME = 296, ! VAR_FUNC_NAME = 297, ! ASSIGN = 298, ! OROR = 299, ! ANDAND = 300, ! EQCOMPARE = 301, ! ARITHCOMPARE = 302, ! RSHIFT = 303, ! LSHIFT = 304, ! MINUSMINUS = 305, ! PLUSPLUS = 306, ! UNARY = 307, ! HYPERUNARY = 308, ! POINTSAT = 309, ! INTERFACE = 310, ! IMPLEMENTATION = 311, ! END = 312, ! SELECTOR = 313, ! DEFS = 314, ! ENCODE = 315, ! CLASSNAME = 316, ! PUBLIC = 317, ! PRIVATE = 318, ! PROTECTED = 319, ! PROTOCOL = 320, ! OBJECTNAME = 321, ! CLASS = 322, ! ALIAS = 323 ! }; ! #endif ! #define IDENTIFIER 258 ! #define TYPENAME 259 ! #define SCSPEC 260 ! #define TYPESPEC 261 ! #define TYPE_QUAL 262 ! #define CONSTANT 263 ! #define STRING 264 ! #define ELLIPSIS 265 ! #define SIZEOF 266 ! #define ENUM 267 ! #define STRUCT 268 ! #define UNION 269 ! #define IF 270 ! #define ELSE 271 ! #define WHILE 272 ! #define DO 273 ! #define FOR 274 ! #define SWITCH 275 ! #define CASE 276 ! #define DEFAULT 277 ! #define BREAK 278 ! #define CONTINUE 279 ! #define RETURN 280 ! #define GOTO 281 ! #define ASM_KEYWORD 282 ! #define TYPEOF 283 ! #define ALIGNOF 284 ! #define ATTRIBUTE 285 ! #define EXTENSION 286 ! #define LABEL 287 ! #define REALPART 288 ! #define IMAGPART 289 ! #define VA_ARG 290 ! #define CHOOSE_EXPR 291 ! #define TYPES_COMPATIBLE_P 292 ! #define PTR_VALUE 293 ! #define PTR_BASE 294 ! #define PTR_EXTENT 295 ! #define STRING_FUNC_NAME 296 ! #define VAR_FUNC_NAME 297 ! #define ASSIGN 298 ! #define OROR 299 ! #define ANDAND 300 ! #define EQCOMPARE 301 ! #define ARITHCOMPARE 302 ! #define RSHIFT 303 ! #define LSHIFT 304 ! #define MINUSMINUS 305 ! #define PLUSPLUS 306 ! #define UNARY 307 ! #define HYPERUNARY 308 ! #define POINTSAT 309 ! #define INTERFACE 310 ! #define IMPLEMENTATION 311 ! #define END 312 ! #define SELECTOR 313 ! #define DEFS 314 ! #define ENCODE 315 ! #define CLASSNAME 316 ! #define PUBLIC 317 ! #define PRIVATE 318 ! #define PROTECTED 319 ! #define PROTOCOL 320 ! #define OBJECTNAME 321 ! #define CLASS 322 ! #define ALIAS 323 ! - /* Copy the first part of user declarations. */ #line 34 "c-parse.y" #include "config.h" --- 1,76 ---- ! /* A Bison parser, made from c-parse.y ! by GNU bison 1.35. */ + #define YYBISON 1 /* Identify Bison output. */ + # define IDENTIFIER 257 + # define TYPENAME 258 + # define SCSPEC 259 + # define STATIC 260 + # define TYPESPEC 261 + # define TYPE_QUAL 262 + # define CONSTANT 263 + # define STRING 264 + # define ELLIPSIS 265 + # define SIZEOF 266 + # define ENUM 267 + # define STRUCT 268 + # define UNION 269 + # define IF 270 + # define ELSE 271 + # define WHILE 272 + # define DO 273 + # define FOR 274 + # define SWITCH 275 + # define CASE 276 + # define DEFAULT 277 + # define BREAK 278 + # define CONTINUE 279 + # define RETURN 280 + # define GOTO 281 + # define ASM_KEYWORD 282 + # define TYPEOF 283 + # define ALIGNOF 284 + # define ATTRIBUTE 285 + # define EXTENSION 286 + # define LABEL 287 + # define REALPART 288 + # define IMAGPART 289 + # define VA_ARG 290 + # define CHOOSE_EXPR 291 + # define TYPES_COMPATIBLE_P 292 + # define PTR_VALUE 293 + # define PTR_BASE 294 + # define PTR_EXTENT 295 + # define STRING_FUNC_NAME 296 + # define VAR_FUNC_NAME 297 + # define ASSIGN 298 + # define OROR 299 + # define ANDAND 300 + # define EQCOMPARE 301 + # define ARITHCOMPARE 302 + # define LSHIFT 303 + # define RSHIFT 304 + # define UNARY 305 + # define PLUSPLUS 306 + # define MINUSMINUS 307 + # define HYPERUNARY 308 + # define POINTSAT 309 + # define INTERFACE 310 + # define IMPLEMENTATION 311 + # define END 312 + # define SELECTOR 313 + # define DEFS 314 + # define ENCODE 315 + # define CLASSNAME 316 + # define PUBLIC 317 + # define PRIVATE 318 + # define PROTECTED 319 + # define PROTOCOL 320 + # define OBJECTNAME 321 + # define CLASS 322 + # define ALIAS 323 #line 34 "c-parse.y" #include "config.h" *************** *** 201,214 **** #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-lex.h" #include "c-tree.h" - #include "c-pragma.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif --- 80,92 ---- #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */ #include "c-tree.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif *************** *** 217,280 **** /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Cause the "yydebug" variable to be defined. */ ! #define YYDEBUG 1 ! ! /* Rename the "yyparse" function so that we can override it elsewhere. */ ! #define yyparse yyparse_1 ! /* Enabling traces. */ ! #ifndef YYDEBUG ! # define YYDEBUG 0 ! #endif ! /* Enabling verbose error messages. */ ! #ifdef YYERROR_VERBOSE ! # undef YYERROR_VERBOSE ! # define YYERROR_VERBOSE 1 ! #else ! # define YYERROR_VERBOSE 0 ! #endif ! #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) ! #line 67 "c-parse.y" ! typedef union YYSTYPE {long itype; tree ttype; enum tree_code code; ! const char *filename; int lineno; } YYSTYPE; ! /* Line 191 of yacc.c. */ ! #line 245 "c-p10602.c" ! # define yystype YYSTYPE /* obsolescent; will be withdrawn */ ! # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif ! ! ! /* Copy the second part of user declarations. */ ! #line 200 "c-parse.y" ! ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static tree current_declspecs = NULL_TREE; ! static tree prefix_attributes = NULL_TREE; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static tree all_prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ --- 95,174 ---- /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Like the default stack expander, except (1) use realloc when possible, ! (2) impose no hard maxiumum on stack size, (3) REALLY do not use alloca. + Irritatingly, YYSTYPE is defined after this %{ %} block, so we cannot + give malloced_yyvs its proper type. This is ok since all we need from + it is to be able to free it. */ ! static short *malloced_yyss; ! static void *malloced_yyvs; ! #define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ) \ ! do { \ ! size_t newsize; \ ! short *newss; \ ! YYSTYPE *newvs; \ ! newsize = *(YYSSZ) *= 2; \ ! if (malloced_yyss) \ ! { \ ! newss = (short *) \ ! really_call_realloc (*(SS), newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) \ ! really_call_realloc (*(VS), newsize * sizeof (YYSTYPE)); \ ! } \ ! else \ ! { \ ! newss = (short *) really_call_malloc (newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) really_call_malloc (newsize * sizeof (YYSTYPE)); \ ! if (newss) \ ! memcpy (newss, *(SS), (SSSIZE)); \ ! if (newvs) \ ! memcpy (newvs, *(VS), (VSSIZE)); \ ! } \ ! if (!newss || !newvs) \ ! { \ ! yyerror (MSG); \ ! return 2; \ ! } \ ! *(SS) = newss; \ ! *(VS) = newvs; \ ! malloced_yyss = newss; \ ! malloced_yyvs = (void *) newvs; \ ! } while (0) ! #line 103 "c-parse.y" ! #ifndef YYSTYPE ! typedef union {long itype; tree ttype; enum tree_code code; ! const char *filename; int lineno; } yystype; ! # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif + #line 237 "c-parse.y" ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static GTY(()) tree current_declspecs; ! static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static GTY(()) tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ *************** static tree declspec_stack; *** 296,317 **** /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2)) ! #define RESTORE_WARN_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ } while (0) #define OBJC_NEED_RAW_IDENTIFIER(VAL) /* nothing */ /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) --- 190,215 ---- /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_EXT_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2) \ ! | (flag_iso << 3)) ! #define RESTORE_EXT_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ + flag_iso = (val >> 3) & 1; \ } while (0) #define OBJC_NEED_RAW_IDENTIFIER(VAL) /* nothing */ + static bool parsing_iso_function_signature; + /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) *************** static tree declspec_stack; *** 319,476 **** static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Add GC roots for variables local to this file. */ void c_parse_init () { init_reswords (); - - ggc_add_tree_root (&declspec_stack, 1); - ggc_add_tree_root (¤t_declspecs, 1); - ggc_add_tree_root (&prefix_attributes, 1); - ggc_add_tree_root (&all_prefix_attributes, 1); } ! ! ! /* Line 214 of yacc.c. */ ! #line 341 "c-p10602.c" ! ! #if ! defined (yyoverflow) || YYERROR_VERBOSE ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc ! { ! short yyss; ! YYSTYPE yyvs; ! }; ! ! /* The size of the maximum gap between one aligned stack and the next. */ ! # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) ! ! /* The size of an array large to enough to hold all stacks, each with ! N elements. */ ! # define YYSTACK_BYTES(N) \ ! ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ ! + YYSTACK_GAP_MAXIMUM) ! ! /* Copy COUNT objects from FROM to TO. The source and destination do ! not overlap. */ ! # ifndef YYCOPY ! # if 1 < __GNUC__ ! # define YYCOPY(To, From, Count) \ ! __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ! # else ! # define YYCOPY(To, From, Count) \ ! do \ ! { \ ! register YYSIZE_T yyi; \ ! for (yyi = 0; yyi < (Count); yyi++) \ ! (To)[yyi] = (From)[yyi]; \ ! } \ ! while (0) ! # endif ! # endif ! ! /* Relocate STACK from its old location to the new one. The ! local variables YYSIZE and YYSTACKSIZE give the old and new number of ! elements in the stack, and YYPTR gives the new location of the ! stack. Advance YYPTR to a properly aligned location for the next ! stack. */ ! # define YYSTACK_RELOCATE(Stack) \ ! do \ ! { \ ! YYSIZE_T yynewbytes; \ ! YYCOPY (&yyptr->Stack, Stack, yysize); \ ! Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ ! yyptr += yynewbytes / sizeof (*yyptr); \ ! } \ ! while (0) ! #endif - #if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; - #else - typedef short yysigned_char; - #endif - /* YYFINAL -- State number of the termination state. */ - #define YYFINAL 4 - /* YYLAST -- Last index in YYTABLE. */ - #define YYLAST 3173 ! /* YYNTOKENS -- Number of terminals. */ ! #define YYNTOKENS 91 ! /* YYNNTS -- Number of nonterminals. */ ! #define YYNNTS 200 ! /* YYNRULES -- Number of rules. */ ! #define YYNRULES 561 ! /* YYNRULES -- Number of states. */ ! #define YYNSTATES 901 ! ! /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ ! #define YYUNDEFTOK 2 ! #define YYMAXUTOK 323 ! #define YYTRANSLATE(YYX) \ ! ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ! /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ ! static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 87, 2, 2, 2, 60, 51, 2, ! 66, 83, 58, 56, 88, 57, 65, 59, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 46, 84, ! 2, 43, 2, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 67, 2, 90, 50, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 89, 49, 85, 86, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, --- 217,263 ---- static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); + static int yylexstring PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Initialisation routine for this file. */ void c_parse_init () { init_reswords (); } ! #ifndef YYDEBUG ! # define YYDEBUG 0 #endif ! #define YYFINAL 896 ! #define YYFLAG -32768 ! #define YYNTBASE 92 ! /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 323 ? yytranslate[x] : 293) ! /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ ! static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 88, 2, 2, 2, 61, 52, 2, ! 68, 84, 59, 57, 89, 58, 67, 60, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 47, 85, ! 2, 45, 2, 46, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 69, 2, 91, 51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 90, 50, 86, 87, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, *************** static const unsigned char yytranslate[] *** 483,828 **** 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ! 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ! 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, ! 35, 36, 37, 38, 39, 40, 41, 42, 44, 47, ! 48, 52, 53, 54, 55, 61, 62, 63, 64, 68, ! 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ! 79, 80, 81, 82 }; #if YYDEBUG ! /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in ! YYRHS. */ ! static const unsigned short yyprhs[] = { ! 0, 0, 3, 4, 6, 7, 10, 11, 15, 17, ! 19, 25, 28, 32, 37, 42, 45, 48, 51, 53, ! 54, 55, 65, 70, 71, 72, 82, 87, 88, 89, ! 98, 102, 104, 106, 108, 110, 112, 114, 116, 118, ! 120, 122, 123, 125, 127, 131, 133, 136, 139, 142, ! 145, 148, 153, 156, 161, 164, 167, 169, 171, 173, ! 175, 180, 182, 186, 190, 194, 198, 202, 206, 210, ! 214, 218, 222, 226, 230, 231, 236, 237, 242, 243, ! 244, 252, 253, 259, 263, 267, 269, 271, 273, 275, ! 276, 284, 288, 292, 296, 300, 305, 312, 321, 328, ! 333, 337, 341, 344, 347, 349, 352, 353, 355, 358, ! 362, 364, 366, 369, 372, 377, 382, 385, 388, 392, ! 393, 395, 400, 405, 409, 413, 416, 419, 421, 424, ! 427, 430, 433, 436, 438, 441, 443, 446, 449, 452, ! 455, 458, 461, 463, 466, 469, 472, 475, 478, 481, ! 484, 487, 490, 493, 496, 499, 502, 505, 508, 511, ! 513, 516, 519, 522, 525, 528, 531, 534, 537, 540, ! 543, 546, 549, 552, 555, 558, 561, 564, 567, 570, ! 573, 576, 579, 582, 585, 588, 591, 594, 597, 600, ! 603, 606, 609, 612, 615, 618, 621, 624, 627, 630, ! 633, 636, 639, 642, 645, 647, 649, 651, 653, 655, ! 657, 659, 661, 663, 665, 667, 669, 671, 673, 675, ! 677, 679, 681, 683, 685, 687, 689, 691, 693, 695, ! 697, 699, 701, 703, 705, 707, 709, 711, 713, 715, ! 717, 719, 721, 723, 725, 727, 729, 731, 733, 735, ! 737, 739, 741, 743, 745, 747, 749, 751, 753, 755, ! 757, 758, 760, 762, 764, 766, 768, 770, 772, 774, ! 779, 784, 786, 791, 793, 798, 799, 804, 805, 812, ! 816, 817, 824, 828, 829, 831, 833, 836, 843, 845, ! 849, 850, 852, 857, 864, 869, 871, 873, 875, 877, ! 879, 880, 885, 887, 888, 891, 893, 897, 901, 904, ! 905, 910, 912, 913, 918, 920, 922, 924, 927, 930, ! 936, 940, 941, 942, 950, 951, 952, 960, 962, 964, ! 969, 973, 976, 980, 982, 984, 986, 990, 993, 995, ! 999, 1002, 1006, 1010, 1015, 1019, 1024, 1028, 1031, 1033, ! 1035, 1038, 1040, 1043, 1045, 1048, 1049, 1057, 1063, 1064, ! 1072, 1078, 1079, 1088, 1089, 1097, 1100, 1103, 1106, 1107, ! 1109, 1110, 1112, 1114, 1117, 1118, 1122, 1125, 1129, 1134, ! 1138, 1140, 1142, 1145, 1147, 1152, 1154, 1159, 1164, 1171, ! 1177, 1182, 1189, 1195, 1197, 1201, 1203, 1205, 1209, 1210, ! 1214, 1215, 1217, 1218, 1220, 1223, 1225, 1227, 1229, 1233, ! 1236, 1240, 1245, 1249, 1252, 1255, 1257, 1261, 1266, 1269, ! 1273, 1277, 1282, 1287, 1293, 1299, 1301, 1303, 1305, 1307, ! 1309, 1312, 1315, 1318, 1321, 1323, 1326, 1329, 1332, 1334, ! 1337, 1340, 1343, 1346, 1348, 1351, 1353, 1355, 1357, 1359, ! 1362, 1363, 1364, 1365, 1366, 1367, 1369, 1371, 1374, 1378, ! 1380, 1383, 1385, 1387, 1393, 1395, 1397, 1400, 1403, 1406, ! 1409, 1410, 1416, 1417, 1422, 1423, 1424, 1426, 1429, 1433, ! 1437, 1441, 1442, 1447, 1449, 1453, 1454, 1455, 1463, 1469, ! 1472, 1473, 1474, 1475, 1476, 1489, 1490, 1497, 1500, 1502, ! 1504, 1507, 1511, 1514, 1517, 1520, 1524, 1531, 1540, 1551, ! 1564, 1568, 1573, 1575, 1579, 1585, 1588, 1594, 1595, 1597, ! 1598, 1600, 1601, 1603, 1605, 1609, 1614, 1622, 1624, 1628, ! 1629, 1633, 1636, 1637, 1638, 1645, 1648, 1649, 1651, 1653, ! 1657, 1659, 1663, 1668, 1673, 1677, 1682, 1686, 1691, 1696, ! 1700, 1705, 1709, 1711, 1712, 1716, 1718, 1721, 1723, 1727, ! 1729, 1733 }; - - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short yyrhs[] = { ! 92, 0, -1, -1, 93, -1, -1, 94, 96, -1, ! -1, 93, 95, 96, -1, 98, -1, 97, -1, 27, ! 66, 107, 83, 84, -1, 290, 96, -1, 129, 163, ! 84, -1, 149, 129, 163, 84, -1, 148, 129, 162, ! 84, -1, 155, 84, -1, 1, 84, -1, 1, 85, ! -1, 84, -1, -1, -1, 148, 129, 191, 99, 124, ! 100, 251, 252, 240, -1, 148, 129, 191, 1, -1, ! -1, -1, 149, 129, 196, 101, 124, 102, 251, 252, ! 240, -1, 149, 129, 196, 1, -1, -1, -1, 129, ! 196, 103, 124, 104, 251, 252, 240, -1, 129, 196, ! 1, -1, 3, -1, 4, -1, 51, -1, 57, -1, ! 56, -1, 62, -1, 61, -1, 86, -1, 87, -1, ! 109, -1, -1, 109, -1, 115, -1, 109, 88, 115, ! -1, 121, -1, 58, 114, -1, 290, 114, -1, 106, ! 114, -1, 48, 105, -1, 111, 110, -1, 111, 66, ! 217, 83, -1, 112, 110, -1, 112, 66, 217, 83, ! -1, 33, 114, -1, 34, 114, -1, 11, -1, 29, ! -1, 28, -1, 110, -1, 66, 217, 83, 114, -1, ! 114, -1, 115, 56, 115, -1, 115, 57, 115, -1, ! 115, 58, 115, -1, 115, 59, 115, -1, 115, 60, ! 115, -1, 115, 55, 115, -1, 115, 54, 115, -1, ! 115, 53, 115, -1, 115, 52, 115, -1, 115, 51, ! 115, -1, 115, 49, 115, -1, 115, 50, 115, -1, ! -1, 115, 48, 116, 115, -1, -1, 115, 47, 117, ! 115, -1, -1, -1, 115, 45, 118, 107, 46, 119, ! 115, -1, -1, 115, 45, 120, 46, 115, -1, 115, ! 43, 115, -1, 115, 44, 115, -1, 3, -1, 8, ! -1, 123, -1, 42, -1, -1, 66, 217, 83, 89, ! 122, 177, 85, -1, 66, 107, 83, -1, 66, 1, ! 83, -1, 244, 242, 83, -1, 244, 1, 83, -1, ! 121, 66, 108, 83, -1, 35, 66, 115, 88, 217, ! 83, -1, 36, 66, 115, 88, 115, 88, 115, 83, ! -1, 37, 66, 217, 88, 217, 83, -1, 121, 67, ! 107, 90, -1, 121, 65, 105, -1, 121, 68, 105, ! -1, 121, 62, -1, 121, 61, -1, 9, -1, 123, ! 9, -1, -1, 126, -1, 126, 10, -1, 251, 252, ! 127, -1, 125, -1, 232, -1, 126, 125, -1, 125, ! 232, -1, 150, 129, 162, 84, -1, 151, 129, 163, ! 84, -1, 150, 84, -1, 151, 84, -1, 251, 252, ! 131, -1, -1, 169, -1, 148, 129, 162, 84, -1, ! 149, 129, 163, 84, -1, 148, 129, 185, -1, 149, ! 129, 188, -1, 155, 84, -1, 290, 131, -1, 7, ! -1, 132, 7, -1, 133, 7, -1, 132, 170, -1, ! 134, 7, -1, 135, 7, -1, 170, -1, 134, 170, ! -1, 157, -1, 136, 7, -1, 137, 7, -1, 136, ! 159, -1, 137, 159, -1, 132, 157, -1, 133, 157, ! -1, 158, -1, 136, 170, -1, 136, 160, -1, 137, ! 160, -1, 132, 158, -1, 133, 158, -1, 138, 7, ! -1, 139, 7, -1, 138, 159, -1, 139, 159, -1, ! 134, 157, -1, 135, 157, -1, 138, 170, -1, 138, ! 160, -1, 139, 160, -1, 134, 158, -1, 135, 158, ! -1, 5, -1, 140, 7, -1, 141, 7, -1, 132, ! 5, -1, 133, 5, -1, 140, 5, -1, 141, 5, ! -1, 140, 170, -1, 142, 7, -1, 143, 7, -1, ! 134, 5, -1, 135, 5, -1, 142, 5, -1, 143, ! 5, -1, 142, 170, -1, 144, 7, -1, 145, 7, ! -1, 144, 159, -1, 145, 159, -1, 140, 157, -1, ! 141, 157, -1, 136, 5, -1, 137, 5, -1, 144, ! 5, -1, 145, 5, -1, 144, 170, -1, 144, 160, ! -1, 145, 160, -1, 140, 158, -1, 141, 158, -1, ! 146, 7, -1, 147, 7, -1, 146, 159, -1, 147, ! 159, -1, 142, 157, -1, 143, 157, -1, 138, 5, ! -1, 139, 5, -1, 146, 5, -1, 147, 5, -1, ! 146, 170, -1, 146, 160, -1, 147, 160, -1, 142, ! 158, -1, 143, 158, -1, 136, -1, 137, -1, 138, ! -1, 139, -1, 144, -1, 145, -1, 146, -1, 147, ! -1, 132, -1, 133, -1, 134, -1, 135, -1, 140, ! -1, 141, -1, 142, -1, 143, -1, 136, -1, 137, ! -1, 144, -1, 145, -1, 132, -1, 133, -1, 140, ! -1, 141, -1, 136, -1, 137, -1, 138, -1, 139, ! -1, 132, -1, 133, -1, 134, -1, 135, -1, 136, ! -1, 137, -1, 138, -1, 139, -1, 132, -1, 133, ! -1, 134, -1, 135, -1, 132, -1, 133, -1, 134, ! -1, 135, -1, 136, -1, 137, -1, 138, -1, 139, ! -1, 140, -1, 141, -1, 142, -1, 143, -1, 144, ! -1, 145, -1, 146, -1, 147, -1, -1, 153, -1, ! 159, -1, 161, -1, 160, -1, 6, -1, 205, -1, ! 200, -1, 4, -1, 113, 66, 107, 83, -1, 113, ! 66, 217, 83, -1, 165, -1, 162, 88, 130, 165, ! -1, 167, -1, 163, 88, 130, 167, -1, -1, 27, ! 66, 123, 83, -1, -1, 191, 164, 169, 43, 166, ! 175, -1, 191, 164, 169, -1, -1, 196, 164, 169, ! 43, 168, 175, -1, 196, 164, 169, -1, -1, 170, ! -1, 171, -1, 170, 171, -1, 30, 66, 66, 172, ! 83, 83, -1, 173, -1, 172, 88, 173, -1, -1, ! 174, -1, 174, 66, 3, 83, -1, 174, 66, 3, ! 88, 109, 83, -1, 174, 66, 108, 83, -1, 105, ! -1, 5, -1, 6, -1, 7, -1, 115, -1, -1, ! 89, 176, 177, 85, -1, 1, -1, -1, 178, 206, ! -1, 179, -1, 178, 88, 179, -1, 183, 43, 181, ! -1, 184, 181, -1, -1, 105, 46, 180, 181, -1, ! 181, -1, -1, 89, 182, 177, 85, -1, 115, -1, ! 1, -1, 184, -1, 183, 184, -1, 65, 105, -1, ! 67, 115, 10, 115, 90, -1, 67, 115, 90, -1, ! -1, -1, 191, 186, 124, 187, 251, 252, 245, -1, ! -1, -1, 196, 189, 124, 190, 251, 252, 245, -1, ! 192, -1, 196, -1, 66, 169, 192, 83, -1, 192, ! 66, 285, -1, 192, 225, -1, 58, 156, 192, -1, ! 4, -1, 194, -1, 195, -1, 194, 66, 285, -1, ! 194, 225, -1, 4, -1, 195, 66, 285, -1, 195, ! 225, -1, 58, 156, 194, -1, 58, 156, 195, -1, ! 66, 169, 195, 83, -1, 196, 66, 285, -1, 66, ! 169, 196, 83, -1, 58, 156, 196, -1, 196, 225, ! -1, 3, -1, 13, -1, 13, 170, -1, 14, -1, ! 14, 170, -1, 12, -1, 12, 170, -1, -1, 197, ! 105, 89, 201, 208, 85, 169, -1, 197, 89, 208, ! 85, 169, -1, -1, 198, 105, 89, 202, 208, 85, ! 169, -1, 198, 89, 208, 85, 169, -1, -1, 199, ! 105, 89, 203, 215, 207, 85, 169, -1, -1, 199, ! 89, 204, 215, 207, 85, 169, -1, 197, 105, -1, ! 198, 105, -1, 199, 105, -1, -1, 88, -1, -1, ! 88, -1, 209, -1, 209, 210, -1, -1, 209, 210, ! 84, -1, 209, 84, -1, 152, 129, 211, -1, 152, ! 129, 251, 252, -1, 153, 129, 212, -1, 153, -1, ! 1, -1, 290, 210, -1, 213, -1, 211, 88, 130, ! 213, -1, 214, -1, 212, 88, 130, 214, -1, 251, ! 252, 191, 169, -1, 251, 252, 191, 46, 115, 169, ! -1, 251, 252, 46, 115, 169, -1, 251, 252, 196, ! 169, -1, 251, 252, 196, 46, 115, 169, -1, 251, ! 252, 46, 115, 169, -1, 216, -1, 215, 88, 216, ! -1, 1, -1, 105, -1, 105, 43, 115, -1, -1, ! 154, 218, 219, -1, -1, 221, -1, -1, 221, -1, ! 222, 170, -1, 223, -1, 222, -1, 224, -1, 58, ! 156, 222, -1, 58, 156, -1, 58, 156, 223, -1, ! 66, 169, 221, 83, -1, 224, 66, 275, -1, 224, ! 225, -1, 66, 275, -1, 225, -1, 67, 107, 90, ! -1, 67, 154, 107, 90, -1, 67, 90, -1, 67, ! 154, 90, -1, 67, 58, 90, -1, 67, 154, 58, ! 90, -1, 67, 5, 107, 90, -1, 67, 5, 154, ! 107, 90, -1, 67, 154, 5, 107, 90, -1, 227, ! -1, 228, -1, 229, -1, 230, -1, 255, -1, 227, ! 255, -1, 228, 255, -1, 229, 255, -1, 230, 255, ! -1, 128, -1, 227, 128, -1, 228, 128, -1, 230, ! 128, -1, 256, -1, 227, 256, -1, 228, 256, -1, ! 229, 256, -1, 230, 256, -1, 232, -1, 231, 232, ! -1, 227, -1, 228, -1, 229, -1, 230, -1, 1, ! 84, -1, -1, -1, -1, -1, -1, 238, -1, 239, ! -1, 238, 239, -1, 32, 289, 84, -1, 245, -1, ! 1, 245, -1, 89, -1, 85, -1, 233, 237, 243, ! 85, 234, -1, 226, -1, 1, -1, 66, 89, -1, ! 241, 242, -1, 247, 254, -1, 247, 1, -1, -1, ! 15, 248, 66, 107, 83, -1, -1, 18, 250, 254, ! 17, -1, -1, -1, 255, -1, 256, 253, -1, 235, ! 253, 236, -1, 251, 252, 267, -1, 251, 252, 268, ! -1, -1, 246, 16, 258, 254, -1, 246, -1, 246, ! 16, 1, -1, -1, -1, 17, 259, 66, 107, 83, ! 260, 254, -1, 249, 66, 107, 83, 84, -1, 249, ! 1, -1, -1, -1, -1, -1, 19, 261, 66, 266, ! 262, 270, 84, 263, 270, 83, 264, 254, -1, -1, ! 20, 66, 107, 83, 265, 254, -1, 270, 84, -1, ! 131, -1, 245, -1, 107, 84, -1, 235, 257, 236, ! -1, 23, 84, -1, 24, 84, -1, 25, 84, -1, ! 25, 107, 84, -1, 27, 269, 66, 107, 83, 84, ! -1, 27, 269, 66, 107, 46, 271, 83, 84, -1, ! 27, 269, 66, 107, 46, 271, 46, 271, 83, 84, ! -1, 27, 269, 66, 107, 46, 271, 46, 271, 46, ! 274, 83, 84, -1, 26, 105, 84, -1, 26, 58, ! 107, 84, -1, 84, -1, 21, 115, 46, -1, 21, ! 115, 10, 115, 46, -1, 22, 46, -1, 105, 251, ! 252, 46, 169, -1, -1, 7, -1, -1, 107, -1, ! -1, 272, -1, 273, -1, 272, 88, 273, -1, 9, ! 66, 107, 83, -1, 67, 105, 90, 9, 66, 107, ! 83, -1, 123, -1, 274, 88, 123, -1, -1, 169, ! 276, 277, -1, 280, 83, -1, -1, -1, 281, 84, ! 278, 169, 279, 277, -1, 1, 83, -1, -1, 10, ! -1, 281, -1, 281, 88, 10, -1, 283, -1, 281, ! 88, 282, -1, 148, 129, 193, 169, -1, 148, 129, ! 196, 169, -1, 148, 129, 220, -1, 149, 129, 196, ! 169, -1, 149, 129, 220, -1, 150, 284, 193, 169, ! -1, 150, 284, 196, 169, -1, 150, 284, 220, -1, ! 151, 284, 196, 169, -1, 151, 284, 220, -1, 129, ! -1, -1, 169, 286, 287, -1, 277, -1, 288, 83, ! -1, 3, -1, 288, 88, 3, -1, 105, -1, 289, ! 88, 105, -1, 31, -1 }; ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const unsigned short yyrline[] = { ! 0, 287, 287, 291, 307, 307, 308, 308, 312, 313, ! 314, 322, 327, 334, 336, 338, 340, 341, 342, 349, ! 354, 348, 360, 363, 368, 362, 374, 377, 382, 376, ! 388, 393, 394, 397, 399, 401, 406, 408, 410, 412, ! 416, 422, 423, 427, 429, 434, 435, 438, 441, 445, ! 462, 468, 471, 474, 477, 479, 484, 488, 492, 496, ! 497, 502, 503, 505, 507, 509, 511, 513, 515, 517, ! 519, 521, 523, 525, 528, 527, 534, 533, 540, 543, ! 539, 549, 548, 558, 565, 576, 582, 583, 585, 588, ! 587, 600, 605, 607, 623, 630, 632, 635, 645, 655, ! 657, 661, 667, 669, 675, 676, 693, 695, 696, 707, ! 712, 713, 714, 715, 723, 725, 727, 730, 739, 748, ! 758, 763, 765, 767, 769, 771, 773, 830, 833, 836, ! 842, 848, 851, 857, 860, 866, 869, 872, 875, 878, ! 881, 884, 890, 893, 896, 899, 902, 905, 911, 914, ! 917, 920, 923, 926, 932, 935, 938, 941, 944, 950, ! 953, 956, 959, 965, 971, 977, 986, 992, 995, 998, ! 1004, 1010, 1016, 1025, 1031, 1034, 1037, 1040, 1043, 1046, ! 1049, 1055, 1061, 1067, 1076, 1079, 1082, 1085, 1088, 1094, ! 1097, 1100, 1103, 1106, 1109, 1112, 1118, 1124, 1130, 1139, ! 1142, 1145, 1148, 1151, 1158, 1159, 1160, 1161, 1162, 1163, ! 1164, 1165, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, ! 1180, 1181, 1182, 1183, 1187, 1188, 1189, 1190, 1194, 1195, ! 1196, 1197, 1201, 1202, 1203, 1204, 1208, 1209, 1210, 1211, ! 1212, 1213, 1214, 1215, 1219, 1220, 1221, 1222, 1223, 1224, ! 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, ! 1240, 1241, 1267, 1268, 1272, 1276, 1278, 1282, 1286, 1290, ! 1292, 1299, 1300, 1304, 1305, 1310, 1311, 1319, 1318, 1326, ! 1335, 1334, 1342, 1351, 1352, 1357, 1359, 1364, 1369, 1371, ! 1377, 1378, 1380, 1382, 1384, 1392, 1393, 1394, 1395, 1401, ! 1403, 1402, 1406, 1413, 1415, 1419, 1420, 1426, 1429, 1433, ! 1432, 1438, 1443, 1442, 1446, 1448, 1452, 1453, 1457, 1462, ! 1466, 1472, 1484, 1471, 1502, 1514, 1501, 1534, 1535, 1541, ! 1543, 1548, 1550, 1552, 1560, 1561, 1565, 1570, 1572, 1576, ! 1581, 1583, 1585, 1587, 1595, 1600, 1602, 1604, 1606, 1610, ! 1612, 1617, 1619, 1624, 1626, 1638, 1637, 1643, 1648, 1647, ! 1651, 1656, 1655, 1661, 1660, 1668, 1670, 1672, 1680, 1682, ! 1685, 1687, 1693, 1695, 1701, 1702, 1704, 1710, 1713, 1723, ! 1726, 1731, 1733, 1739, 1740, 1745, 1746, 1751, 1754, 1758, ! 1764, 1767, 1771, 1782, 1783, 1788, 1794, 1796, 1802, 1801, ! 1810, 1811, 1816, 1819, 1823, 1830, 1831, 1835, 1836, 1841, ! 1843, 1848, 1850, 1852, 1854, 1856, 1863, 1865, 1867, 1869, ! 1871, 1873, 1875, 1879, 1883, 1896, 1897, 1898, 1902, 1906, ! 1907, 1908, 1909, 1910, 1914, 1915, 1918, 1919, 1923, 1924, ! 1925, 1926, 1927, 1931, 1932, 1936, 1937, 1938, 1939, 1942, ! 1946, 1953, 1958, 1974, 1988, 1990, 1996, 1997, 2001, 2015, ! 2017, 2020, 2024, 2026, 2034, 2035, 2039, 2056, 2064, 2069, ! 2082, 2081, 2096, 2095, 2115, 2121, 2127, 2128, 2133, 2139, ! 2153, 2163, 2162, 2170, 2182, 2193, 2196, 2192, 2202, 2205, ! 2208, 2212, 2215, 2218, 2207, 2222, 2221, 2229, 2231, 2237, ! 2239, 2242, 2246, 2249, 2252, 2255, 2258, 2262, 2266, 2271, ! 2275, 2287, 2293, 2301, 2304, 2307, 2310, 2327, 2329, 2335, ! 2336, 2342, 2343, 2347, 2348, 2353, 2355, 2360, 2362, 2373, ! 2372, 2383, 2385, 2393, 2384, 2397, 2404, 2405, 2415, 2417, ! 2422, 2424, 2431, 2436, 2441, 2444, 2450, 2458, 2463, 2468, ! 2471, 2477, 2483, 2493, 2492, 2503, 2504, 2522, 2524, 2530, ! 2532, 2537 }; #endif ! #if YYDEBUG || YYERROR_VERBOSE ! /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. ! First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { ! "$end", "error", "$undefined", "IDENTIFIER", "TYPENAME", "SCSPEC", "TYPESPEC", "TYPE_QUAL", "CONSTANT", "STRING", "ELLIPSIS", "SIZEOF", "ENUM", "STRUCT", "UNION", "IF", "ELSE", "WHILE", "DO", "FOR", "SWITCH", "CASE", "DEFAULT", "BREAK", "CONTINUE", "RETURN", "GOTO", "ASM_KEYWORD", "TYPEOF", "ALIGNOF", "ATTRIBUTE", "EXTENSION", "LABEL", "REALPART", "IMAGPART", "VA_ARG", "CHOOSE_EXPR", "TYPES_COMPATIBLE_P", "PTR_VALUE", ! "PTR_BASE", "PTR_EXTENT", "STRING_FUNC_NAME", "VAR_FUNC_NAME", "'='", ! "ASSIGN", "'?'", "':'", "OROR", "ANDAND", "'|'", "'^'", "'&'", ! "EQCOMPARE", "ARITHCOMPARE", "RSHIFT", "LSHIFT", "'+'", "'-'", "'*'", ! "'/'", "'%'", "MINUSMINUS", "PLUSPLUS", "UNARY", "HYPERUNARY", "'.'", ! "'('", "'['", "POINTSAT", "INTERFACE", "IMPLEMENTATION", "END", ! "SELECTOR", "DEFS", "ENCODE", "CLASSNAME", "PUBLIC", "PRIVATE", ! "PROTECTED", "PROTOCOL", "OBJECTNAME", "CLASS", "ALIAS", "')'", "';'", ! "'}'", "'~'", "'!'", "','", "'{'", "']'", "$accept", "program", ! "extdefs", "@1", "@2", "extdef", "datadef", "fndef", "@3", "@4", "@5", ! "@6", "@7", "@8", "identifier", "unop", "expr", "exprlist", ! "nonnull_exprlist", "unary_expr", "sizeof", "alignof", "typeof", ! "cast_expr", "expr_no_commas", "@9", "@10", "@11", "@12", "@13", ! "primary", "@14", "string", "old_style_parm_decls", "lineno_datadecl", "datadecls", "datadecl", "lineno_decl", "setspecs", "maybe_resetattrs", "decl", "declspecs_nosc_nots_nosa_noea", "declspecs_nosc_nots_nosa_ea", "declspecs_nosc_nots_sa_noea", "declspecs_nosc_nots_sa_ea", --- 270,611 ---- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, ! 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 40, 41, 42, 43, 44, 48, ! 49, 53, 54, 55, 56, 62, 63, 64, 65, 66, ! 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, ! 80, 81, 82, 83 }; #if YYDEBUG ! static const short yyprhs[] = { ! 0, 0, 1, 3, 4, 7, 8, 12, 14, 16, ! 18, 24, 27, 31, 36, 41, 44, 47, 50, 52, ! 53, 54, 64, 69, 70, 71, 81, 86, 87, 88, ! 97, 101, 103, 105, 107, 109, 111, 113, 115, 117, ! 119, 121, 122, 124, 126, 130, 132, 135, 138, 141, ! 144, 147, 152, 155, 160, 163, 166, 168, 170, 172, ! 174, 179, 181, 185, 189, 193, 197, 201, 205, 209, ! 213, 217, 221, 225, 229, 230, 235, 236, 241, 242, ! 243, 251, 252, 258, 262, 266, 268, 270, 272, 274, ! 275, 283, 287, 291, 295, 299, 304, 311, 320, 327, ! 332, 336, 340, 343, 346, 348, 349, 351, 355, 357, ! 359, 362, 365, 370, 375, 378, 381, 385, 386, 388, ! 393, 398, 402, 406, 409, 412, 414, 417, 420, 423, ! 426, 429, 431, 434, 436, 439, 442, 445, 448, 451, ! 454, 456, 459, 462, 465, 468, 471, 474, 477, 480, ! 483, 486, 489, 492, 495, 498, 501, 504, 506, 509, ! 512, 515, 518, 521, 524, 527, 530, 533, 536, 539, ! 542, 545, 548, 551, 554, 557, 560, 563, 566, 569, ! 572, 575, 578, 581, 584, 587, 590, 593, 596, 599, ! 602, 605, 608, 611, 614, 617, 620, 623, 626, 629, ! 632, 635, 638, 640, 642, 644, 646, 648, 650, 652, ! 654, 656, 658, 660, 662, 664, 666, 668, 670, 672, ! 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, ! 694, 696, 698, 700, 702, 704, 706, 708, 710, 712, ! 714, 716, 718, 720, 722, 724, 726, 728, 730, 732, ! 734, 736, 738, 740, 742, 744, 746, 748, 750, 751, ! 753, 755, 757, 759, 761, 763, 765, 767, 772, 777, ! 779, 784, 786, 791, 792, 797, 798, 805, 809, 810, ! 817, 821, 822, 824, 826, 829, 836, 838, 842, 843, ! 845, 850, 857, 862, 864, 866, 868, 870, 872, 874, ! 876, 877, 882, 884, 885, 888, 890, 894, 898, 901, ! 902, 907, 909, 910, 915, 917, 919, 921, 924, 927, ! 933, 937, 938, 939, 947, 948, 949, 957, 959, 961, ! 966, 970, 973, 977, 979, 981, 983, 987, 990, 992, ! 996, 999, 1003, 1007, 1012, 1016, 1021, 1025, 1028, 1030, ! 1032, 1035, 1037, 1040, 1042, 1045, 1046, 1054, 1060, 1061, ! 1069, 1075, 1076, 1085, 1086, 1094, 1097, 1100, 1103, 1104, ! 1106, 1107, 1109, 1111, 1114, 1115, 1119, 1122, 1126, 1131, ! 1135, 1137, 1139, 1142, 1144, 1149, 1151, 1156, 1161, 1168, ! 1174, 1179, 1186, 1192, 1194, 1198, 1200, 1202, 1206, 1207, ! 1211, 1212, 1214, 1215, 1217, 1220, 1222, 1224, 1226, 1230, ! 1233, 1237, 1242, 1246, 1249, 1252, 1254, 1259, 1263, 1268, ! 1274, 1280, 1282, 1284, 1286, 1288, 1290, 1293, 1296, 1299, ! 1302, 1304, 1307, 1310, 1313, 1315, 1318, 1321, 1324, 1327, ! 1329, 1332, 1334, 1336, 1338, 1340, 1343, 1344, 1345, 1346, ! 1347, 1348, 1350, 1352, 1355, 1359, 1361, 1364, 1366, 1368, ! 1374, 1376, 1378, 1381, 1384, 1387, 1390, 1391, 1397, 1398, ! 1403, 1404, 1405, 1407, 1410, 1414, 1418, 1422, 1423, 1428, ! 1430, 1434, 1435, 1436, 1444, 1450, 1453, 1454, 1455, 1456, ! 1457, 1470, 1471, 1478, 1481, 1483, 1485, 1488, 1492, 1495, ! 1498, 1501, 1505, 1512, 1521, 1532, 1545, 1549, 1554, 1556, ! 1560, 1566, 1569, 1575, 1576, 1578, 1579, 1581, 1582, 1584, ! 1586, 1590, 1595, 1603, 1605, 1609, 1610, 1614, 1617, 1618, ! 1619, 1626, 1629, 1630, 1632, 1634, 1638, 1640, 1644, 1649, ! 1654, 1658, 1663, 1667, 1672, 1677, 1681, 1686, 1690, 1692, ! 1693, 1697, 1699, 1702, 1704, 1708, 1710, 1714 }; static const short yyrhs[] = { ! -1, 93, 0, 0, 94, 96, 0, 0, 93, 95, ! 96, 0, 97, 0, 99, 0, 98, 0, 28, 68, ! 108, 84, 85, 0, 292, 96, 0, 130, 164, 85, ! 0, 150, 130, 164, 85, 0, 149, 130, 163, 85, ! 0, 156, 85, 0, 1, 85, 0, 1, 86, 0, ! 85, 0, 0, 0, 149, 130, 193, 100, 124, 101, ! 253, 254, 242, 0, 149, 130, 193, 1, 0, 0, ! 0, 150, 130, 198, 102, 124, 103, 253, 254, 242, ! 0, 150, 130, 198, 1, 0, 0, 0, 130, 198, ! 104, 124, 105, 253, 254, 242, 0, 130, 198, 1, ! 0, 3, 0, 4, 0, 52, 0, 58, 0, 57, ! 0, 63, 0, 64, 0, 87, 0, 88, 0, 110, ! 0, 0, 110, 0, 116, 0, 110, 89, 116, 0, ! 122, 0, 59, 115, 0, 292, 115, 0, 107, 115, ! 0, 49, 106, 0, 112, 111, 0, 112, 68, 219, ! 84, 0, 113, 111, 0, 113, 68, 219, 84, 0, ! 34, 115, 0, 35, 115, 0, 12, 0, 30, 0, ! 29, 0, 111, 0, 68, 219, 84, 115, 0, 115, ! 0, 116, 57, 116, 0, 116, 58, 116, 0, 116, ! 59, 116, 0, 116, 60, 116, 0, 116, 61, 116, ! 0, 116, 55, 116, 0, 116, 56, 116, 0, 116, ! 54, 116, 0, 116, 53, 116, 0, 116, 52, 116, ! 0, 116, 50, 116, 0, 116, 51, 116, 0, 0, ! 116, 49, 117, 116, 0, 0, 116, 48, 118, 116, ! 0, 0, 0, 116, 46, 119, 108, 47, 120, 116, ! 0, 0, 116, 46, 121, 47, 116, 0, 116, 45, ! 116, 0, 116, 44, 116, 0, 3, 0, 9, 0, ! 10, 0, 43, 0, 0, 68, 219, 84, 90, 123, ! 179, 86, 0, 68, 108, 84, 0, 68, 1, 84, ! 0, 246, 244, 84, 0, 246, 1, 84, 0, 122, ! 68, 109, 84, 0, 36, 68, 116, 89, 219, 84, ! 0, 37, 68, 116, 89, 116, 89, 116, 84, 0, ! 38, 68, 219, 89, 219, 84, 0, 122, 69, 108, ! 91, 0, 122, 67, 106, 0, 122, 66, 106, 0, ! 122, 63, 0, 122, 64, 0, 125, 0, 0, 127, ! 0, 253, 254, 128, 0, 126, 0, 234, 0, 127, ! 126, 0, 126, 234, 0, 151, 130, 163, 85, 0, ! 152, 130, 164, 85, 0, 151, 85, 0, 152, 85, ! 0, 253, 254, 132, 0, 0, 170, 0, 149, 130, ! 163, 85, 0, 150, 130, 164, 85, 0, 149, 130, ! 187, 0, 150, 130, 190, 0, 156, 85, 0, 292, ! 132, 0, 8, 0, 133, 8, 0, 134, 8, 0, ! 133, 171, 0, 135, 8, 0, 136, 8, 0, 171, ! 0, 135, 171, 0, 158, 0, 137, 8, 0, 138, ! 8, 0, 137, 160, 0, 138, 160, 0, 133, 158, ! 0, 134, 158, 0, 159, 0, 137, 171, 0, 137, ! 161, 0, 138, 161, 0, 133, 159, 0, 134, 159, ! 0, 139, 8, 0, 140, 8, 0, 139, 160, 0, ! 140, 160, 0, 135, 158, 0, 136, 158, 0, 139, ! 171, 0, 139, 161, 0, 140, 161, 0, 135, 159, ! 0, 136, 159, 0, 176, 0, 141, 8, 0, 142, ! 8, 0, 133, 176, 0, 134, 176, 0, 141, 176, ! 0, 142, 176, 0, 141, 171, 0, 143, 8, 0, ! 144, 8, 0, 135, 176, 0, 136, 176, 0, 143, ! 176, 0, 144, 176, 0, 143, 171, 0, 145, 8, ! 0, 146, 8, 0, 145, 160, 0, 146, 160, 0, ! 141, 158, 0, 142, 158, 0, 137, 176, 0, 138, ! 176, 0, 145, 176, 0, 146, 176, 0, 145, 171, ! 0, 145, 161, 0, 146, 161, 0, 141, 159, 0, ! 142, 159, 0, 147, 8, 0, 148, 8, 0, 147, ! 160, 0, 148, 160, 0, 143, 158, 0, 144, 158, ! 0, 139, 176, 0, 140, 176, 0, 147, 176, 0, ! 148, 176, 0, 147, 171, 0, 147, 161, 0, 148, ! 161, 0, 143, 159, 0, 144, 159, 0, 137, 0, ! 138, 0, 139, 0, 140, 0, 145, 0, 146, 0, ! 147, 0, 148, 0, 133, 0, 134, 0, 135, 0, ! 136, 0, 141, 0, 142, 0, 143, 0, 144, 0, ! 137, 0, 138, 0, 145, 0, 146, 0, 133, 0, ! 134, 0, 141, 0, 142, 0, 137, 0, 138, 0, ! 139, 0, 140, 0, 133, 0, 134, 0, 135, 0, ! 136, 0, 137, 0, 138, 0, 139, 0, 140, 0, ! 133, 0, 134, 0, 135, 0, 136, 0, 133, 0, ! 134, 0, 135, 0, 136, 0, 137, 0, 138, 0, ! 139, 0, 140, 0, 141, 0, 142, 0, 143, 0, ! 144, 0, 145, 0, 146, 0, 147, 0, 148, 0, ! 0, 154, 0, 160, 0, 162, 0, 161, 0, 7, ! 0, 207, 0, 202, 0, 4, 0, 114, 68, 108, ! 84, 0, 114, 68, 219, 84, 0, 166, 0, 163, ! 89, 131, 166, 0, 168, 0, 164, 89, 131, 168, ! 0, 0, 28, 68, 10, 84, 0, 0, 193, 165, ! 170, 45, 167, 177, 0, 193, 165, 170, 0, 0, ! 198, 165, 170, 45, 169, 177, 0, 198, 165, 170, ! 0, 0, 171, 0, 172, 0, 171, 172, 0, 31, ! 68, 68, 173, 84, 84, 0, 174, 0, 173, 89, ! 174, 0, 0, 175, 0, 175, 68, 3, 84, 0, ! 175, 68, 3, 89, 110, 84, 0, 175, 68, 109, ! 84, 0, 106, 0, 176, 0, 7, 0, 8, 0, ! 6, 0, 5, 0, 116, 0, 0, 90, 178, 179, ! 86, 0, 1, 0, 0, 180, 208, 0, 181, 0, ! 180, 89, 181, 0, 185, 45, 183, 0, 186, 183, ! 0, 0, 106, 47, 182, 183, 0, 183, 0, 0, ! 90, 184, 179, 86, 0, 116, 0, 1, 0, 186, ! 0, 185, 186, 0, 67, 106, 0, 69, 116, 11, ! 116, 91, 0, 69, 116, 91, 0, 0, 0, 193, ! 188, 124, 189, 253, 254, 247, 0, 0, 0, 198, ! 191, 124, 192, 253, 254, 247, 0, 194, 0, 198, ! 0, 68, 170, 194, 84, 0, 194, 68, 287, 0, ! 194, 227, 0, 59, 157, 194, 0, 4, 0, 196, ! 0, 197, 0, 196, 68, 287, 0, 196, 227, 0, ! 4, 0, 197, 68, 287, 0, 197, 227, 0, 59, ! 157, 196, 0, 59, 157, 197, 0, 68, 170, 197, ! 84, 0, 198, 68, 287, 0, 68, 170, 198, 84, ! 0, 59, 157, 198, 0, 198, 227, 0, 3, 0, ! 14, 0, 14, 171, 0, 15, 0, 15, 171, 0, ! 13, 0, 13, 171, 0, 0, 199, 106, 90, 203, ! 210, 86, 170, 0, 199, 90, 210, 86, 170, 0, ! 0, 200, 106, 90, 204, 210, 86, 170, 0, 200, ! 90, 210, 86, 170, 0, 0, 201, 106, 90, 205, ! 217, 209, 86, 170, 0, 0, 201, 90, 206, 217, ! 209, 86, 170, 0, 199, 106, 0, 200, 106, 0, ! 201, 106, 0, 0, 89, 0, 0, 89, 0, 211, ! 0, 211, 212, 0, 0, 211, 212, 85, 0, 211, ! 85, 0, 153, 130, 213, 0, 153, 130, 253, 254, ! 0, 154, 130, 214, 0, 154, 0, 1, 0, 292, ! 212, 0, 215, 0, 213, 89, 131, 215, 0, 216, ! 0, 214, 89, 131, 216, 0, 253, 254, 193, 170, ! 0, 253, 254, 193, 47, 116, 170, 0, 253, 254, ! 47, 116, 170, 0, 253, 254, 198, 170, 0, 253, ! 254, 198, 47, 116, 170, 0, 253, 254, 47, 116, ! 170, 0, 218, 0, 217, 89, 218, 0, 1, 0, ! 106, 0, 106, 45, 116, 0, 0, 155, 220, 221, ! 0, 0, 223, 0, 0, 223, 0, 224, 171, 0, ! 225, 0, 224, 0, 226, 0, 59, 157, 224, 0, ! 59, 157, 0, 59, 157, 225, 0, 68, 170, 223, ! 84, 0, 226, 68, 277, 0, 226, 227, 0, 68, ! 277, 0, 227, 0, 69, 157, 108, 91, 0, 69, ! 157, 91, 0, 69, 157, 59, 91, 0, 69, 6, ! 157, 108, 91, 0, 69, 154, 6, 108, 91, 0, ! 229, 0, 230, 0, 231, 0, 232, 0, 257, 0, ! 229, 257, 0, 230, 257, 0, 231, 257, 0, 232, ! 257, 0, 129, 0, 229, 129, 0, 230, 129, 0, ! 232, 129, 0, 258, 0, 229, 258, 0, 230, 258, ! 0, 231, 258, 0, 232, 258, 0, 234, 0, 233, ! 234, 0, 229, 0, 230, 0, 231, 0, 232, 0, ! 1, 85, 0, 0, 0, 0, 0, 0, 240, 0, ! 241, 0, 240, 241, 0, 33, 291, 85, 0, 247, ! 0, 1, 247, 0, 90, 0, 86, 0, 235, 239, ! 245, 86, 236, 0, 228, 0, 1, 0, 68, 90, ! 0, 243, 244, 0, 249, 256, 0, 249, 1, 0, ! 0, 16, 250, 68, 108, 84, 0, 0, 19, 252, ! 256, 18, 0, 0, 0, 257, 0, 258, 255, 0, ! 237, 255, 238, 0, 253, 254, 269, 0, 253, 254, ! 270, 0, 0, 248, 17, 260, 256, 0, 248, 0, ! 248, 17, 1, 0, 0, 0, 18, 261, 68, 108, ! 84, 262, 256, 0, 251, 68, 108, 84, 85, 0, ! 251, 1, 0, 0, 0, 0, 0, 20, 263, 68, ! 268, 264, 272, 85, 265, 272, 84, 266, 256, 0, ! 0, 21, 68, 108, 84, 267, 256, 0, 272, 85, ! 0, 132, 0, 247, 0, 108, 85, 0, 237, 259, ! 238, 0, 24, 85, 0, 25, 85, 0, 26, 85, ! 0, 26, 108, 85, 0, 28, 271, 68, 108, 84, ! 85, 0, 28, 271, 68, 108, 47, 273, 84, 85, ! 0, 28, 271, 68, 108, 47, 273, 47, 273, 84, ! 85, 0, 28, 271, 68, 108, 47, 273, 47, 273, ! 47, 276, 84, 85, 0, 27, 106, 85, 0, 27, ! 59, 108, 85, 0, 85, 0, 22, 116, 47, 0, ! 22, 116, 11, 116, 47, 0, 23, 47, 0, 106, ! 253, 254, 47, 170, 0, 0, 8, 0, 0, 108, ! 0, 0, 274, 0, 275, 0, 274, 89, 275, 0, ! 10, 68, 108, 84, 0, 69, 106, 91, 10, 68, ! 108, 84, 0, 10, 0, 276, 89, 10, 0, 0, ! 170, 278, 279, 0, 282, 84, 0, 0, 0, 283, ! 85, 280, 170, 281, 279, 0, 1, 84, 0, 0, ! 11, 0, 283, 0, 283, 89, 11, 0, 285, 0, ! 283, 89, 284, 0, 149, 130, 195, 170, 0, 149, ! 130, 198, 170, 0, 149, 130, 222, 0, 150, 130, ! 198, 170, 0, 150, 130, 222, 0, 151, 286, 195, ! 170, 0, 151, 286, 198, 170, 0, 151, 286, 222, ! 0, 152, 286, 198, 170, 0, 152, 286, 222, 0, ! 130, 0, 0, 170, 288, 289, 0, 279, 0, 290, ! 84, 0, 3, 0, 290, 89, 3, 0, 106, 0, ! 291, 89, 106, 0, 32, 0 }; ! #endif ! ! #if YYDEBUG ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const short yyrline[] = { ! 0, 323, 328, 346, 346, 348, 348, 351, 356, 358, ! 359, 367, 371, 379, 381, 383, 385, 386, 387, 392, ! 392, 392, 405, 407, 407, 407, 419, 421, 421, 421, ! 433, 437, 439, 442, 444, 446, 451, 453, 455, 457, ! 461, 465, 468, 471, 474, 478, 480, 483, 486, 490, ! 492, 498, 501, 504, 507, 509, 513, 517, 521, 525, ! 527, 531, 533, 535, 537, 539, 541, 543, 545, 547, ! 549, 551, 553, 555, 557, 557, 564, 564, 571, 571, ! 571, 581, 581, 592, 599, 610, 617, 618, 620, 622, ! 622, 635, 640, 642, 658, 665, 667, 670, 680, 690, ! 692, 696, 702, 704, 709, 716, 724, 730, 735, 737, ! 738, 739, 746, 749, 751, 754, 762, 771, 781, 786, ! 789, 791, 793, 795, 797, 853, 857, 860, 865, 871, ! 875, 880, 884, 889, 893, 896, 899, 902, 905, 908, ! 913, 917, 920, 923, 926, 929, 934, 938, 941, 944, ! 947, 950, 955, 959, 962, 965, 968, 973, 977, 980, ! 983, 989, 995, 1001, 1009, 1015, 1019, 1022, 1028, 1034, ! 1040, 1048, 1054, 1058, 1061, 1064, 1067, 1070, 1073, 1079, ! 1085, 1091, 1099, 1103, 1106, 1109, 1112, 1117, 1121, 1124, ! 1127, 1130, 1133, 1136, 1142, 1148, 1154, 1162, 1166, 1169, ! 1172, 1175, 1181, 1183, 1184, 1185, 1186, 1187, 1188, 1189, ! 1192, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1203, 1205, ! 1206, 1207, 1210, 1212, 1213, 1214, 1217, 1219, 1220, 1221, ! 1224, 1226, 1227, 1228, 1231, 1233, 1234, 1235, 1236, 1237, ! 1238, 1239, 1242, 1244, 1245, 1246, 1247, 1248, 1249, 1250, ! 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1262, 1265, ! 1290, 1292, 1295, 1299, 1302, 1305, 1309, 1314, 1316, 1322, ! 1324, 1327, 1329, 1332, 1335, 1339, 1339, 1348, 1355, 1355, ! 1364, 1371, 1374, 1378, 1381, 1385, 1390, 1393, 1397, 1400, ! 1402, 1404, 1406, 1413, 1415, 1416, 1417, 1420, 1422, 1427, ! 1429, 1429, 1433, 1438, 1442, 1445, 1447, 1452, 1456, 1459, ! 1459, 1465, 1468, 1468, 1473, 1475, 1478, 1480, 1483, 1486, ! 1490, 1494, 1494, 1494, 1525, 1525, 1525, 1559, 1561, 1566, ! 1569, 1574, 1576, 1578, 1585, 1587, 1590, 1596, 1598, 1601, ! 1607, 1609, 1611, 1613, 1620, 1626, 1628, 1630, 1632, 1635, ! 1638, 1642, 1645, 1649, 1652, 1662, 1662, 1669, 1673, 1673, ! 1677, 1681, 1681, 1686, 1686, 1693, 1696, 1698, 1706, 1708, ! 1711, 1713, 1718, 1721, 1726, 1728, 1730, 1735, 1739, 1749, ! 1752, 1757, 1759, 1764, 1766, 1770, 1772, 1776, 1780, 1784, ! 1789, 1793, 1797, 1807, 1809, 1814, 1819, 1822, 1826, 1826, ! 1834, 1837, 1840, 1845, 1849, 1855, 1857, 1860, 1862, 1866, ! 1869, 1873, 1876, 1878, 1880, 1882, 1888, 1891, 1893, 1895, ! 1898, 1908, 1910, 1911, 1915, 1918, 1920, 1921, 1922, 1923, ! 1926, 1928, 1931, 1932, 1935, 1937, 1938, 1939, 1940, 1943, ! 1945, 1948, 1950, 1951, 1952, 1955, 1958, 1965, 1970, 1986, ! 2001, 2003, 2008, 2010, 2013, 2027, 2030, 2033, 2037, 2039, ! 2046, 2048, 2051, 2069, 2076, 2082, 2085, 2085, 2107, 2107, ! 2127, 2133, 2139, 2141, 2145, 2151, 2165, 2174, 2174, 2183, ! 2195, 2205, 2205, 2205, 2215, 2218, 2220, 2220, 2220, 2220, ! 2220, 2235, 2235, 2242, 2245, 2250, 2253, 2256, 2260, 2263, ! 2266, 2269, 2272, 2276, 2280, 2285, 2289, 2301, 2307, 2315, ! 2318, 2321, 2324, 2339, 2343, 2347, 2350, 2355, 2357, 2360, ! 2362, 2366, 2369, 2375, 2378, 2387, 2387, 2398, 2400, 2400, ! 2400, 2413, 2419, 2421, 2431, 2435, 2439, 2442, 2448, 2454, ! 2459, 2462, 2468, 2475, 2481, 2486, 2489, 2495, 2500, 2509, ! 2509, 2520, 2522, 2539, 2542, 2547, 2550, 2554 }; #endif ! ! #if (YYDEBUG) || defined YYERROR_VERBOSE ! ! /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { ! "$", "error", "$undefined.", "IDENTIFIER", "TYPENAME", "SCSPEC", "STATIC", "TYPESPEC", "TYPE_QUAL", "CONSTANT", "STRING", "ELLIPSIS", "SIZEOF", "ENUM", "STRUCT", "UNION", "IF", "ELSE", "WHILE", "DO", "FOR", "SWITCH", "CASE", "DEFAULT", "BREAK", "CONTINUE", "RETURN", "GOTO", "ASM_KEYWORD", "TYPEOF", "ALIGNOF", "ATTRIBUTE", "EXTENSION", "LABEL", "REALPART", "IMAGPART", "VA_ARG", "CHOOSE_EXPR", "TYPES_COMPATIBLE_P", "PTR_VALUE", ! "PTR_BASE", "PTR_EXTENT", "STRING_FUNC_NAME", "VAR_FUNC_NAME", "ASSIGN", ! "'='", "'?'", "':'", "OROR", "ANDAND", "'|'", "'^'", "'&'", "EQCOMPARE", ! "ARITHCOMPARE", "LSHIFT", "RSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'", ! "UNARY", "PLUSPLUS", "MINUSMINUS", "HYPERUNARY", "POINTSAT", "'.'", ! "'('", "'['", "INTERFACE", "IMPLEMENTATION", "END", "SELECTOR", "DEFS", ! "ENCODE", "CLASSNAME", "PUBLIC", "PRIVATE", "PROTECTED", "PROTOCOL", ! "OBJECTNAME", "CLASS", "ALIAS", "')'", "';'", "'}'", "'~'", "'!'", ! "','", "'{'", "']'", "program", "extdefs", "@1", "@2", "extdef", ! "extdef_1", "datadef", "fndef", "@3", "@4", "@5", "@6", "@7", "@8", ! "identifier", "unop", "expr", "exprlist", "nonnull_exprlist", ! "unary_expr", "sizeof", "alignof", "typeof", "cast_expr", ! "expr_no_commas", "@9", "@10", "@11", "@12", "@13", "primary", "@14", ! "old_style_parm_decls", "old_style_parm_decls_1", "lineno_datadecl", "datadecls", "datadecl", "lineno_decl", "setspecs", "maybe_resetattrs", "decl", "declspecs_nosc_nots_nosa_noea", "declspecs_nosc_nots_nosa_ea", "declspecs_nosc_nots_sa_noea", "declspecs_nosc_nots_sa_ea", *************** static const char *const yytname[] = *** 839,845 **** "typespec_nonreserved_nonattr", "initdecls", "notype_initdecls", "maybeasm", "initdcl", "@15", "notype_initdcl", "@16", "maybe_attribute", "attributes", "attribute", "attribute_list", ! "attrib", "any_word", "init", "@17", "initlist_maybe_comma", "initlist1", "initelt", "@18", "initval", "@19", "designator_list", "designator", "nested_function", "@20", "@21", "notype_nested_function", "@22", "@23", "declarator", "after_type_declarator", "parm_declarator", --- 622,628 ---- "typespec_nonreserved_nonattr", "initdecls", "notype_initdecls", "maybeasm", "initdcl", "@15", "notype_initdcl", "@16", "maybe_attribute", "attributes", "attribute", "attribute_list", ! "attrib", "any_word", "scspec", "init", "@17", "initlist_maybe_comma", "initlist1", "initelt", "@18", "initval", "@19", "designator_list", "designator", "nested_function", "@20", "@21", "notype_nested_function", "@22", "@23", "declarator", "after_type_declarator", "parm_declarator", *************** static const char *const yytname[] = *** 872,961 **** }; #endif ! # ifdef YYPRINT ! /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to ! token YYLEX-NUM. */ ! static const unsigned short yytoknum[] = ! { ! 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, ! 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, ! 295, 296, 297, 61, 298, 63, 58, 299, 300, 124, ! 94, 38, 301, 302, 303, 304, 43, 45, 42, 47, ! 37, 305, 306, 307, 308, 46, 40, 91, 309, 310, ! 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, ! 321, 322, 323, 41, 59, 125, 126, 33, 44, 123, ! 93 ! }; ! # endif ! ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const unsigned short yyr1[] = { ! 0, 91, 92, 92, 94, 93, 95, 93, 96, 96, ! 96, 96, 97, 97, 97, 97, 97, 97, 97, 99, ! 100, 98, 98, 101, 102, 98, 98, 103, 104, 98, ! 98, 105, 105, 106, 106, 106, 106, 106, 106, 106, ! 107, 108, 108, 109, 109, 110, 110, 110, 110, 110, ! 110, 110, 110, 110, 110, 110, 111, 112, 113, 114, ! 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, ! 115, 115, 115, 115, 116, 115, 117, 115, 118, 119, ! 115, 120, 115, 115, 115, 121, 121, 121, 121, 122, ! 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, ! 121, 121, 121, 121, 123, 123, 124, 124, 124, 125, ! 126, 126, 126, 126, 127, 127, 127, 127, 128, 129, ! 130, 131, 131, 131, 131, 131, 131, 132, 132, 132, ! 133, 134, 134, 135, 135, 136, 136, 136, 136, 136, ! 136, 136, 137, 137, 137, 137, 137, 137, 138, 138, ! 138, 138, 138, 138, 139, 139, 139, 139, 139, 140, ! 140, 140, 140, 140, 140, 140, 141, 142, 142, 142, ! 142, 142, 142, 143, 144, 144, 144, 144, 144, 144, ! 144, 144, 144, 144, 145, 145, 145, 145, 145, 146, ! 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, ! 147, 147, 147, 147, 148, 148, 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, 149, ! 150, 150, 150, 150, 151, 151, 151, 151, 152, 152, ! 152, 152, 153, 153, 153, 153, 154, 154, 154, 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, 155, ! 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, ! 156, 156, 157, 157, 158, 159, 159, 160, 161, 161, ! 161, 162, 162, 163, 163, 164, 164, 166, 165, 165, ! 168, 167, 167, 169, 169, 170, 170, 171, 172, 172, ! 173, 173, 173, 173, 173, 174, 174, 174, 174, 175, ! 176, 175, 175, 177, 177, 178, 178, 179, 179, 180, ! 179, 179, 182, 181, 181, 181, 183, 183, 184, 184, ! 184, 186, 187, 185, 189, 190, 188, 191, 191, 192, ! 192, 192, 192, 192, 193, 193, 194, 194, 194, 195, ! 195, 195, 195, 195, 196, 196, 196, 196, 196, 197, ! 197, 198, 198, 199, 199, 201, 200, 200, 202, 200, ! 200, 203, 200, 204, 200, 205, 205, 205, 206, 206, ! 207, 207, 208, 208, 209, 209, 209, 210, 210, 210, ! 210, 210, 210, 211, 211, 212, 212, 213, 213, 213, ! 214, 214, 214, 215, 215, 215, 216, 216, 218, 217, ! 219, 219, 220, 220, 220, 221, 221, 222, 222, 223, ! 223, 224, 224, 224, 224, 224, 225, 225, 225, 225, ! 225, 225, 225, 225, 225, 226, 226, 226, 226, 227, ! 227, 227, 227, 227, 228, 228, 228, 228, 229, 229, ! 229, 229, 229, 230, 230, 231, 231, 231, 231, 232, ! 233, 234, 235, 236, 237, 237, 238, 238, 239, 240, ! 240, 241, 242, 242, 243, 243, 244, 245, 246, 246, ! 248, 247, 250, 249, 251, 252, 253, 253, 254, 255, ! 256, 258, 257, 257, 257, 259, 260, 257, 257, 257, ! 261, 262, 263, 264, 257, 265, 257, 266, 266, 267, ! 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, ! 267, 267, 267, 268, 268, 268, 268, 269, 269, 270, ! 270, 271, 271, 272, 272, 273, 273, 274, 274, 276, ! 275, 277, 278, 279, 277, 277, 280, 280, 280, 280, ! 281, 281, 282, 282, 282, 282, 282, 283, 283, 283, ! 283, 283, 284, 286, 285, 287, 287, 288, 288, 289, ! 289, 290 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const unsigned char yyr2[] = { ! 0, 2, 0, 1, 0, 2, 0, 3, 1, 1, 5, 2, 3, 4, 4, 2, 2, 2, 1, 0, 0, 9, 4, 0, 0, 9, 4, 0, 0, 8, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, --- 655,725 ---- }; #endif ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const short yyr1[] = { ! 0, 92, 92, 94, 93, 95, 93, 96, 97, 97, ! 97, 97, 98, 98, 98, 98, 98, 98, 98, 100, ! 101, 99, 99, 102, 103, 99, 99, 104, 105, 99, ! 99, 106, 106, 107, 107, 107, 107, 107, 107, 107, ! 108, 109, 109, 110, 110, 111, 111, 111, 111, 111, ! 111, 111, 111, 111, 111, 111, 112, 113, 114, 115, ! 115, 116, 116, 116, 116, 116, 116, 116, 116, 116, ! 116, 116, 116, 116, 117, 116, 118, 116, 119, 120, ! 116, 121, 116, 116, 116, 122, 122, 122, 122, 123, ! 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, ! 122, 122, 122, 122, 124, 125, 125, 126, 127, 127, ! 127, 127, 128, 128, 128, 128, 129, 130, 131, 132, ! 132, 132, 132, 132, 132, 133, 133, 133, 134, 135, ! 135, 136, 136, 137, 137, 137, 137, 137, 137, 137, ! 138, 138, 138, 138, 138, 138, 139, 139, 139, 139, ! 139, 139, 140, 140, 140, 140, 140, 141, 141, 141, ! 141, 141, 141, 141, 142, 143, 143, 143, 143, 143, ! 143, 144, 145, 145, 145, 145, 145, 145, 145, 145, ! 145, 145, 146, 146, 146, 146, 146, 147, 147, 147, ! 147, 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, 149, ! 150, 150, 150, 150, 150, 150, 150, 150, 151, 151, ! 151, 151, 152, 152, 152, 152, 153, 153, 153, 153, 154, 154, 154, 154, 155, 155, 155, 155, 155, 155, ! 155, 155, 156, 156, 156, 156, 156, 156, 156, 156, ! 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, ! 158, 158, 159, 160, 160, 161, 162, 162, 162, 163, ! 163, 164, 164, 165, 165, 167, 166, 166, 169, 168, ! 168, 170, 170, 171, 171, 172, 173, 173, 174, 174, ! 174, 174, 174, 175, 175, 175, 175, 176, 176, 177, ! 178, 177, 177, 179, 179, 180, 180, 181, 181, 182, ! 181, 181, 184, 183, 183, 183, 185, 185, 186, 186, ! 186, 188, 189, 187, 191, 192, 190, 193, 193, 194, ! 194, 194, 194, 194, 195, 195, 196, 196, 196, 197, ! 197, 197, 197, 197, 198, 198, 198, 198, 198, 199, ! 199, 200, 200, 201, 201, 203, 202, 202, 204, 202, ! 202, 205, 202, 206, 202, 207, 207, 207, 208, 208, ! 209, 209, 210, 210, 211, 211, 211, 212, 212, 212, ! 212, 212, 212, 213, 213, 214, 214, 215, 215, 215, ! 216, 216, 216, 217, 217, 217, 218, 218, 220, 219, ! 221, 221, 222, 222, 222, 223, 223, 224, 224, 225, ! 225, 226, 226, 226, 226, 226, 227, 227, 227, 227, ! 227, 228, 228, 228, 228, 229, 229, 229, 229, 229, ! 230, 230, 230, 230, 231, 231, 231, 231, 231, 232, ! 232, 233, 233, 233, 233, 234, 235, 236, 237, 238, ! 239, 239, 240, 240, 241, 242, 242, 243, 244, 244, ! 245, 245, 246, 247, 248, 248, 250, 249, 252, 251, ! 253, 254, 255, 255, 256, 257, 258, 260, 259, 259, ! 259, 261, 262, 259, 259, 259, 263, 264, 265, 266, ! 259, 267, 259, 268, 268, 269, 269, 269, 269, 269, ! 269, 269, 269, 269, 269, 269, 269, 269, 269, 270, ! 270, 270, 270, 271, 271, 272, 272, 273, 273, 274, ! 274, 275, 275, 276, 276, 278, 277, 279, 280, 281, ! 279, 279, 282, 282, 282, 282, 283, 283, 284, 284, ! 284, 284, 284, 285, 285, 285, 285, 285, 286, 288, ! 287, 289, 289, 290, 290, 291, 291, 292 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const short yyr2[] = { ! 0, 0, 1, 0, 2, 0, 3, 1, 1, 1, 5, 2, 3, 4, 4, 2, 2, 2, 1, 0, 0, 9, 4, 0, 0, 9, 4, 0, 0, 8, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, *************** static const unsigned char yyr2[] = *** 965,990 **** 3, 3, 3, 3, 0, 4, 0, 4, 0, 0, 7, 0, 5, 3, 3, 1, 1, 1, 1, 0, 7, 3, 3, 3, 3, 4, 6, 8, 6, 4, ! 3, 3, 2, 2, 1, 2, 0, 1, 2, 3, ! 1, 1, 2, 2, 4, 4, 2, 2, 3, 0, ! 1, 4, 4, 3, 3, 2, 2, 1, 2, 2, ! 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, ! 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 0, 1, 1, 1, 1, 1, 1, 1, 1, 4, ! 4, 1, 4, 1, 4, 0, 4, 0, 6, 3, ! 0, 6, 3, 0, 1, 1, 2, 6, 1, 3, ! 0, 1, 4, 6, 4, 1, 1, 1, 1, 1, 0, 4, 1, 0, 2, 1, 3, 3, 2, 0, 4, 1, 0, 4, 1, 1, 1, 2, 2, 5, 3, 0, 0, 7, 0, 0, 7, 1, 1, 4, --- 729,754 ---- 3, 3, 3, 3, 0, 4, 0, 4, 0, 0, 7, 0, 5, 3, 3, 1, 1, 1, 1, 0, 7, 3, 3, 3, 3, 4, 6, 8, 6, 4, ! 3, 3, 2, 2, 1, 0, 1, 3, 1, 1, ! 2, 2, 4, 4, 2, 2, 3, 0, 1, 4, ! 4, 3, 3, 2, 2, 1, 2, 2, 2, 2, ! 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, ! 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, ! 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, ! 4, 1, 4, 0, 4, 0, 6, 3, 0, 6, ! 3, 0, 1, 1, 2, 6, 1, 3, 0, 1, ! 4, 6, 4, 1, 1, 1, 1, 1, 1, 1, 0, 4, 1, 0, 2, 1, 3, 3, 2, 0, 4, 1, 0, 4, 1, 1, 1, 2, 2, 5, 3, 0, 0, 7, 0, 0, 7, 1, 1, 4, *************** static const unsigned char yyr2[] = *** 996,2011 **** 1, 1, 2, 1, 4, 1, 4, 4, 6, 5, 4, 6, 5, 1, 3, 1, 1, 3, 0, 3, 0, 1, 0, 1, 2, 1, 1, 1, 3, 2, ! 3, 4, 3, 2, 2, 1, 3, 4, 2, 3, ! 3, 4, 4, 5, 5, 1, 1, 1, 1, 1, ! 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, ! 2, 2, 2, 1, 2, 1, 1, 1, 1, 2, ! 0, 0, 0, 0, 0, 1, 1, 2, 3, 1, ! 2, 1, 1, 5, 1, 1, 2, 2, 2, 2, ! 0, 5, 0, 4, 0, 0, 1, 2, 3, 3, ! 3, 0, 4, 1, 3, 0, 0, 7, 5, 2, ! 0, 0, 0, 0, 12, 0, 6, 2, 1, 1, ! 2, 3, 2, 2, 2, 3, 6, 8, 10, 12, ! 3, 4, 1, 3, 5, 2, 5, 0, 1, 0, ! 1, 0, 1, 1, 3, 4, 7, 1, 3, 0, ! 3, 2, 0, 0, 6, 2, 0, 1, 1, 3, ! 1, 3, 4, 4, 3, 4, 3, 4, 4, 3, ! 4, 3, 1, 0, 3, 1, 2, 1, 3, 1, ! 3, 1 }; ! /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state ! STATE-NUM when YYTABLE doesn't specify something else to do. Zero ! means the default is an error. */ ! static const unsigned short yydefact[] = { ! 4, 0, 6, 0, 1, 0, 0, 268, 159, 265, ! 127, 353, 349, 351, 0, 58, 0, 561, 18, 5, ! 9, 8, 0, 0, 212, 213, 214, 215, 204, 205, ! 206, 207, 216, 217, 218, 219, 208, 209, 210, 211, ! 119, 119, 0, 135, 142, 262, 264, 263, 133, 285, ! 0, 0, 0, 267, 266, 0, 7, 16, 17, 354, ! 350, 352, 0, 0, 0, 348, 260, 283, 0, 273, ! 0, 162, 128, 140, 146, 130, 163, 129, 141, 147, ! 169, 131, 152, 157, 134, 170, 132, 153, 158, 180, ! 136, 138, 144, 143, 181, 137, 139, 145, 195, 148, ! 150, 155, 154, 196, 149, 151, 156, 164, 160, 178, ! 187, 166, 165, 161, 179, 188, 171, 167, 193, 202, ! 173, 172, 168, 194, 203, 182, 174, 176, 185, 184, ! 183, 175, 177, 186, 197, 189, 191, 200, 199, 198, ! 190, 192, 201, 0, 0, 15, 286, 31, 32, 374, ! 365, 374, 366, 363, 367, 11, 85, 86, 104, 56, ! 57, 0, 0, 0, 0, 0, 88, 0, 33, 35, ! 34, 0, 37, 36, 0, 38, 39, 0, 0, 40, ! 59, 0, 0, 61, 43, 45, 87, 0, 0, 290, ! 0, 240, 241, 242, 243, 236, 237, 238, 239, 398, ! 0, 232, 233, 234, 235, 261, 0, 0, 284, 12, ! 283, 30, 0, 283, 0, 0, 283, 347, 333, 260, ! 283, 0, 271, 0, 327, 328, 0, 0, 0, 0, 355, 0, 358, 0, 361, 54, 55, 0, 0, 0, ! 49, 46, 0, 466, 0, 0, 48, 0, 0, 0, 50, 0, 52, 0, 0, 78, 76, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 103, 102, 0, 41, 0, 0, 105, 0, 462, 454, ! 0, 47, 296, 297, 298, 295, 0, 288, 291, 269, ! 400, 270, 346, 0, 0, 120, 0, 553, 344, 0, ! 0, 418, 0, 0, 0, 28, 0, 474, 111, 475, ! 282, 0, 0, 14, 283, 22, 0, 283, 283, 331, ! 13, 26, 0, 283, 381, 376, 232, 233, 234, 235, ! 228, 229, 230, 231, 119, 119, 373, 0, 374, 283, ! 374, 395, 396, 370, 393, 0, 0, 0, 0, 92, ! 91, 0, 10, 44, 0, 0, 83, 84, 0, 0, ! 0, 0, 72, 73, 71, 70, 69, 68, 67, 62, ! 63, 64, 65, 66, 100, 0, 42, 0, 101, 94, ! 0, 0, 455, 456, 93, 0, 290, 41, 260, 283, ! 399, 401, 406, 405, 407, 415, 345, 274, 275, 0, ! 0, 0, 0, 420, 416, 0, 0, 419, 0, 449, ! 474, 113, 108, 112, 0, 280, 332, 0, 0, 20, ! 279, 330, 24, 357, 474, 474, 375, 382, 0, 360, ! 0, 0, 371, 0, 370, 0, 0, 0, 89, 60, ! 51, 53, 0, 0, 77, 75, 95, 99, 559, 0, ! 465, 434, 464, 474, 474, 474, 474, 0, 443, 0, ! 475, 429, 438, 457, 287, 289, 85, 0, 409, 529, ! 414, 283, 413, 276, 0, 557, 537, 224, 225, 220, ! 221, 226, 227, 222, 223, 119, 119, 555, 0, 538, ! 540, 554, 0, 422, 0, 0, 421, 417, 475, 109, ! 119, 119, 0, 329, 272, 275, 474, 277, 474, 377, ! 383, 475, 379, 385, 475, 283, 283, 397, 394, 283, ! 0, 0, 0, 0, 0, 79, 82, 458, 0, 435, ! 430, 439, 436, 431, 440, 475, 432, 441, 437, 433, ! 442, 444, 451, 452, 292, 0, 294, 408, 410, 0, ! 0, 529, 412, 535, 552, 402, 402, 531, 532, 0, ! 556, 0, 423, 424, 0, 116, 0, 117, 0, 302, ! 300, 299, 281, 475, 0, 475, 283, 378, 283, 0, ! 356, 359, 364, 283, 96, 0, 98, 315, 85, 0, ! 0, 312, 0, 314, 0, 368, 305, 311, 0, 0, ! 0, 560, 452, 463, 268, 0, 0, 0, 0, 0, ! 0, 517, 512, 461, 474, 0, 118, 119, 119, 0, ! 0, 450, 499, 479, 480, 0, 0, 411, 530, 338, ! 260, 283, 283, 334, 335, 283, 549, 403, 406, 260, ! 283, 283, 551, 283, 539, 212, 213, 214, 215, 204, ! 205, 206, 207, 216, 217, 218, 219, 208, 209, 210, ! 211, 119, 119, 541, 558, 0, 29, 459, 0, 0, ! 0, 0, 278, 0, 474, 0, 283, 474, 0, 283, ! 362, 0, 318, 0, 0, 309, 90, 0, 304, 0, ! 317, 308, 80, 0, 515, 502, 503, 504, 0, 0, ! 0, 518, 0, 475, 500, 0, 0, 125, 470, 485, ! 472, 490, 0, 483, 0, 0, 453, 467, 126, 293, ! 409, 529, 547, 283, 337, 283, 340, 548, 404, 409, ! 529, 550, 533, 402, 402, 460, 114, 115, 0, 21, ! 25, 384, 475, 283, 0, 387, 386, 283, 0, 390, ! 97, 0, 320, 0, 0, 306, 307, 0, 513, 505, ! 0, 510, 0, 0, 0, 123, 321, 0, 124, 324, ! 0, 0, 452, 0, 0, 0, 469, 474, 468, 489, ! 0, 501, 341, 342, 0, 336, 339, 0, 283, 283, ! 544, 283, 546, 301, 0, 389, 283, 392, 283, 0, ! 313, 310, 0, 511, 0, 283, 121, 0, 122, 0, ! 0, 0, 0, 519, 0, 484, 452, 453, 476, 474, ! 0, 343, 534, 542, 543, 545, 388, 391, 319, 514, ! 521, 0, 516, 322, 325, 0, 0, 473, 520, 498, ! 491, 0, 495, 482, 478, 477, 0, 0, 0, 0, ! 522, 523, 506, 474, 474, 471, 486, 519, 497, 452, ! 488, 0, 0, 521, 0, 0, 475, 475, 452, 0, ! 496, 0, 0, 0, 507, 524, 0, 0, 487, 492, ! 525, 0, 0, 0, 323, 326, 519, 0, 527, 0, ! 508, 0, 0, 0, 0, 493, 526, 509, 528, 452, ! 494 }; - /* YYDEFGOTO[NTERM-NUM]. */ static const short yydefgoto[] = { ! -1, 1, 2, 3, 5, 19, 20, 21, 316, 506, ! 322, 508, 215, 410, 592, 177, 244, 375, 179, 180, ! 181, 182, 22, 183, 184, 361, 360, 358, 600, 359, ! 185, 524, 186, 305, 306, 307, 499, 451, 23, 294, ! 616, 191, 192, 193, 194, 195, 196, 197, 198, 32, ! 33, 34, 35, 36, 37, 38, 39, 40, 41, 485, ! 486, 334, 205, 199, 42, 206, 43, 44, 45, 46, ! 47, 221, 68, 216, 222, 574, 69, 502, 295, 208, ! 49, 286, 287, 288, 572, 670, 594, 595, 596, 754, ! 597, 684, 598, 599, 765, 807, 853, 768, 809, 854, ! 505, 224, 632, 633, 634, 225, 50, 51, 52, 53, ! 338, 340, 345, 233, 54, 688, 433, 228, 229, 336, ! 509, 512, 510, 513, 343, 344, 200, 290, 390, 636, ! 637, 392, 393, 394, 217, 452, 453, 454, 455, 456, ! 457, 308, 279, 603, 777, 781, 381, 382, 383, 666, ! 621, 280, 459, 187, 667, 713, 714, 770, 715, 772, ! 309, 414, 817, 778, 818, 819, 716, 816, 771, 868, ! 773, 857, 886, 899, 859, 840, 623, 624, 702, 841, ! 849, 850, 851, 889, 470, 550, 487, 643, 787, 488, ! 489, 663, 490, 555, 298, 400, 491, 492, 449, 188 }; - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ - #define YYPACT_NINF -713 static const short yypact[] = { ! 159, 169, 177, 961, -713, 961, 441, -713, -713, -713, ! -713, 196, 196, 196, 166, -713, 192, -713, -713, -713, ! -713, -713, 213, 345, 300, 515, 1115, 1018, 458, 408, ! 796, 488, 1236, 1269, 1240, 1454, 1309, 751, 1501, 885, ! -713, -713, 208, -713, -713, -713, -713, -713, 196, -713, ! 127, 133, 150, -713, -713, 961, -713, -713, -713, 196, ! 196, 196, 2755, 229, 2673, -713, 120, 196, 163, -713, ! 1167, -713, -713, -713, -713, 196, -713, -713, -713, -713, ! -713, -713, -713, -713, 196, -713, -713, -713, -713, -713, ! -713, -713, -713, 196, -713, -713, -713, -713, -713, -713, ! -713, -713, 196, -713, -713, -713, -713, -713, -713, -713, ! -713, 196, -713, -713, -713, -713, -713, -713, -713, -713, ! 196, -713, -713, -713, -713, -713, -713, -713, -713, 196, ! -713, -713, -713, -713, -713, -713, -713, -713, 196, -713, ! -713, -713, -713, 501, 345, -713, -713, -713, -713, -713, ! 245, -713, 248, -713, 255, -713, -713, -713, -713, -713, ! -713, 2755, 2755, 330, 343, 357, -713, 534, -713, -713, ! -713, 2755, -713, -713, 1774, -713, -713, 2755, 275, 342, ! -713, 2796, 2837, -713, 3084, 755, 424, 1536, 2755, 615, ! 359, 1022, 784, 1163, 3080, 1077, 719, 1743, 1102, -713, ! 367, 258, 460, 287, 469, -713, 345, 345, 196, -713, ! 196, -713, 413, 196, 2206, 358, 196, -713, -713, 120, ! 196, 238, -713, 447, 499, 502, 289, 2141, 421, 930, ! -713, 425, -713, 482, -713, -713, -713, 2755, 2755, 3049, ! -713, -713, 430, -713, 451, 456, -713, 446, 2755, 1774, ! -713, 1774, -713, 2755, 2755, 462, -713, -713, 2755, 2755, ! 2755, 2755, 2755, 2755, 2755, 2755, 2755, 2755, 2755, 2755, ! -713, -713, 534, 2755, 2755, 534, -713, 463, -713, 542, ! 496, -713, -713, -713, -713, -713, 122, -713, 524, -713, ! 224, -713, 502, 351, 345, -713, 586, -713, -713, 2673, ! 2307, -713, 508, 2247, 518, -713, 111, 79, -713, -713, ! 568, 501, 501, -713, 196, -713, 358, 196, 196, -713, ! -713, -713, 358, 196, -713, -713, 1022, 784, 1163, 3080, ! 1077, 719, 1743, 1102, -713, 493, 550, 2169, -713, 196, ! -713, -713, 595, 555, -713, 482, 2942, 2960, 557, -713, ! -713, 2548, -713, 3084, 564, 570, 3084, 3084, 2755, 605, ! 2755, 2755, 2510, 1799, 1464, 2635, 783, 997, 997, 308, ! 308, -713, -713, -713, -713, 574, 342, 569, -713, -713, ! 534, 1391, 542, -713, -713, 578, 615, 2878, 120, 196, ! -713, -713, -713, -713, 516, -713, -713, -713, 179, 89, ! 1211, 585, 2755, -713, -713, 2755, 2348, -713, 601, -713, ! -713, -713, -713, -713, 1373, -713, 499, 432, 501, -713, ! 650, -713, -713, -713, -713, -713, -713, -713, 614, -713, ! 616, 2755, 534, 620, 555, 3049, 2755, 3049, -713, -713, ! 630, 630, 677, 2755, 3113, 2064, -713, -713, -713, 292, ! 518, -713, -713, 78, 93, 96, 118, 737, -713, 659, ! -713, -713, -713, -713, -713, -713, 155, 667, 224, 224, ! -713, 196, -713, -713, 679, -713, -713, 2050, 1458, 690, ! 772, 2317, 2079, 740, 1299, -713, -713, -713, 683, 310, ! -713, -713, 189, -713, 652, 681, -713, -713, -713, -713, ! 696, 699, 2039, -713, -713, 760, -713, -713, -713, 705, ! -713, -713, 706, -713, -713, 196, 196, 3084, -713, 196, ! 682, 717, 2984, 721, 1838, -713, 3100, -713, 534, -713, ! -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, ! -713, -713, -713, 2418, -713, 2755, -713, -713, -713, 722, ! 855, -713, -713, -713, -713, 321, 283, -713, -713, 1336, ! -713, 803, -713, -713, 73, -713, 501, -713, 345, -713, ! -713, 3084, -713, -713, 2039, -713, 196, 547, 196, 366, ! -713, -713, -713, 196, -713, 2755, -713, -713, 761, 534, ! 2755, -713, 767, 3084, 734, 739, -713, -713, 211, 1972, ! 2755, -713, 2487, -713, 786, 2755, 798, 745, 746, 2714, ! 265, 842, -713, -713, -713, 768, -713, -713, -713, 769, ! 986, 770, -713, -713, -713, 2612, 215, -713, -713, -713, ! 120, 196, 196, 598, 644, 218, -713, -713, 196, 120, ! 196, 218, -713, 196, -713, 2050, 1458, 2458, 2527, 690, ! 772, 1063, 1569, 2317, 2079, 3045, 3076, 740, 1299, 1377, ! 1656, -713, -713, -713, -713, 774, -713, -713, 313, 320, ! 1838, 73, -713, 73, -713, 2755, 130, -713, 2755, 457, ! -713, 1556, -713, 1440, 1838, -713, -713, 1905, -713, 2101, ! -713, -713, 3100, 2923, -713, -713, -713, -713, 780, 2755, ! 782, -713, 804, -713, -713, 501, 345, -713, -713, -713, ! -713, -713, 806, 861, 1623, 107, -713, -713, -713, -713, ! 321, 333, -713, 196, -713, 196, -713, -713, 196, 283, ! 283, -713, -713, 321, 283, -713, -713, -713, 793, -713, ! -713, -713, -713, 1643, 2755, -713, -713, 1643, 2755, -713, ! -713, 2755, -713, 794, 2101, -713, -713, 2755, -713, -713, ! 797, -713, 2755, 836, 322, -713, 606, 355, -713, 655, ! 820, 821, -713, 823, 2755, 1710, -713, -713, -713, -713, ! 2755, -713, 598, 644, 466, -713, -713, 855, 196, 218, ! -713, 218, -713, -713, 547, -713, 1643, -713, 1643, 2898, ! -713, -713, 3066, -713, 60, 196, -713, 358, -713, 358, ! 2755, 2755, 878, 2612, 817, -713, -713, -713, -713, -713, ! 818, -713, -713, -713, -713, -713, -713, -713, -713, -713, ! 140, 819, -713, -713, -713, 833, 834, -713, -713, -713, ! -713, 835, -713, -713, -713, -713, 838, 852, 534, 63, ! 814, -713, -713, -713, -713, -713, -713, 2755, -713, -713, ! -713, 2755, 837, 140, 839, 140, -713, -713, -713, 844, ! -713, 843, 924, 112, -713, -713, 774, 774, -713, -713, ! -713, 873, 586, 875, -713, -713, 2755, 2755, 424, 233, ! -713, 874, 880, 886, 586, -713, -713, -713, 424, -713, ! -713 }; - /* YYPGOTO[NTERM-NUM]. */ static const short yypgoto[] = { ! -713, -713, -713, -713, -713, 102, -713, -713, -713, -713, ! -713, -713, -713, -713, 82, -713, -62, 584, -252, 548, ! -713, -713, -713, -107, 687, -713, -713, -713, -713, -713, ! -713, -713, -270, -300, 665, -713, -713, 100, 11, -295, ! -580, 2, 5, 37, 38, 41, 44, -2, 45, -380, ! -342, 418, 420, -341, -331, 426, 427, -481, -458, 573, ! 576, -713, -153, -109, -511, -202, 582, 654, 678, 876, ! -713, -476, -133, -208, 566, -713, 700, -713, 253, 1, ! 27, -713, 607, -713, 428, -713, -529, -713, 325, -713, ! -563, -713, -713, 397, -713, -713, -713, -713, -713, -713, ! -120, 423, 264, 293, 40, 7, -713, -713, -713, -713, ! -713, -713, -713, -713, -713, -713, 583, -85, -713, 670, ! -713, -713, 344, 339, 675, 589, -52, -713, -713, -474, ! -281, -373, -440, -713, 365, -713, -713, -713, -713, -713, ! -713, -215, -713, -713, -401, 216, -713, -713, 658, -182, ! -713, 416, -713, -713, -525, -713, -713, -713, -713, -713, ! 657, -350, 220, -688, -192, -145, -713, -713, -713, -713, ! -713, -713, -713, -713, -713, -713, -713, -713, -713, -712, ! 180, -713, 197, -713, 590, -713, -512, -713, -713, -713, ! -713, -713, -713, 579, -294, -713, -713, -713, -713, 58 }; ! /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If ! positive, shift that token. If negative, reduce the rule which ! number is the opposite. If zero, do what YYDEFACT says. ! If YYTABLE_NINF, syntax error. */ ! #define YYTABLE_NINF -537 static const short yytable[] = { ! 178, 30, 190, 30, 48, 24, 48, 24, 25, 391, ! 25, 226, 59, 60, 61, 317, 419, 311, 622, 418, ! 481, 376, 422, 223, 421, 75, 399, 84, 548, 93, ! 70, 102, 619, 111, 481, 120, 691, 129, 628, 138, ! 26, 27, 26, 27, 28, 718, 28, 29, 31, 29, ! 31, 143, 144, 30, 235, 236, 48, 24, 482, 483, ! 25, 55, 617, 55, 241, 48, 231, 48, 201, 484, ! 246, 202, 482, 483, 665, 146, 335, 622, 661, -445, ! -107, 281, 642, 484, 812, 618, 146, 146, 146, 412, ! 668, 411, 26, 27, -446, 547, 28, -447, 276, 29, ! 31, 662, 146, 203, 204, 303, 830, 56, 779, 863, ! 543, 146, 304, 55, 619, -110, -110, -110, -110, -448, ! 146, -110, 245, -110, -110, -110, 756, 10, 843, 146, ! 147, 148, 150, 152, 154, 376, 147, 148, 146, -110, ! 735, 738, 620, 831, 617, 869, 864, 146, 564, 847, ! 16, 227, 302, 147, 148, 753, 146, 155, 882, -2, ! 16, 577, 613, -425, 579, 146, 458, 618, -107, 4, ! 481, 870, 473, 780, 891, 48, 744, -3, -426, 653, ! 878, -427, 638, 638, 335, 602, 468, 348, 549, 461, ! 402, 801, 75, 241, 84, 883, 93, 354, 102, 355, ! -110, 620, 75, -428, 84, 385, 212, 848, 482, 483, ! 386, 900, 377, 292, 293, 48, 149, 654, 657, 484, ! 48, 201, 151, 671, 202, 673, 16, 332, 658, 764, ! 48, 326, 62, 839, 327, 146, 462, 401, 544, 153, ! 48, 408, 541, 545, 439, 213, 214, 209, 16, 240, ! 48, 210, 48, 428, 689, 430, 203, 204, 63, 790, ! 792, 530, 533, 536, 539, 72, 328, 329, 147, 148, ! 330, 285, 560, 331, 333, 822, 589, 561, 590, 64, ! 548, 674, 388, 677, 213, 214, 65, 337, 16, 548, ! 389, 214, 145, 626, 81, 189, 442, 317, 719, 241, ! 48, 398, 619, 248, 7, 71, 9, 72, 531, 534, ! 537, 540, 11, 12, 13, 342, 893, 16, 292, 293, ! 207, 894, 313, 699, 65, 629, 314, 75, 15, 84, ! 16, 93, 617, 102, 230, 332, 65, 232, 48, 326, ! 494, 639, 327, 495, 234, 424, 425, 547, 65, 640, ! 214, 884, 885, 763, 374, 618, 547, 378, 247, 304, ! 638, 638, -474, -474, -474, -474, 267, 268, 269, 65, ! -474, -474, -474, 320, 328, 329, 527, 210, 330, 630, ! 528, 331, 333, 521, -244, 523, -474, 631, 214, 48, ! 201, 630, 794, 202, 558, 337, 237, 736, 559, 631, ! 214, 314, 477, 66, 737, 478, 806, 481, 210, 238, ! 314, 67, 678, 94, 9, 95, 477, 213, 214, 478, ! 11, 12, 13, 239, 66, 203, 204, 342, 720, 785, ! 248, 786, 67, 276, 396, 669, 48, 729, 48, 808, ! 549, 479, 289, 210, 480, 482, 483, -106, 315, 549, ! 291, -19, -19, -19, -19, 479, 484, 676, 480, -19, ! -19, -19, 448, 89, 9, 90, 297, 77, 285, 310, ! 11, 12, 13, 312, 212, -19, 86, -275, 75, 296, ! 93, 615, 111, 341, 129, 147, 148, 16, 16, 739, ! -275, 740, -249, 103, 9, 104, 554, 554, 318, 214, ! 11, 12, 13, 748, 65, 218, 323, 833, -81, 834, ! 339, 566, 568, 349, 342, 503, 876, 877, 281, 7, ! 76, 9, 77, 213, 214, 57, 58, 11, 12, 13, ! 352, -275, 725, 214, 350, -275, -19, 147, 148, 351, ! 615, 30, -248, 15, 48, 24, 379, 698, 25, 821, ! 65, 218, 477, 529, 532, 478, 538, 651, 317, 219, ! 48, 645, 635, 641, 646, 318, 214, 220, 213, 214, ! 420, 297, -251, 767, 380, 398, 423, -380, -380, 384, ! 26, 27, 471, 214, 28, 766, 679, 29, 31, 319, ! 387, 479, 429, 675, 480, 158, 647, 648, 404, -245, ! 649, 625, 409, 650, 652, 219, 73, 78, 82, 87, ! 601, 415, 888, 220, 109, 114, 118, 123, 147, 148, ! 282, 283, 284, 30, 898, 614, 48, 24, 705, 706, ! 25, 48, 201, 212, 426, 202, -275, 760, 431, 728, ! 48, 201, 469, 432, 202, 437, 75, 440, 84, -275, ! 93, 443, 102, 441, 111, 395, 120, 446, 129, 447, ! 138, 464, 26, 27, 723, 214, 28, 203, 204, 29, ! 31, 682, 733, 734, 676, 493, 203, 204, 74, 79, ! 83, 88, 212, 625, 614, -275, 110, 115, 119, 124, ! -275, 497, 700, 507, -275, 89, 9, 90, -275, 515, ! 804, 516, 11, 12, 13, 519, 91, 96, 100, 105, ! 725, 214, 814, 769, 127, 132, 136, 141, 820, 438, ! 16, 213, 214, 525, 551, 9, 95, 292, 293, 250, ! 252, 11, 12, 13, 416, 417, 292, 293, 304, -275, ! 789, 791, 562, -275, 542, 125, 9, 126, 835, 836, ! 546, 838, 11, 12, 13, 146, 130, 9, 131, 472, ! 783, 784, 553, 11, 12, 13, 557, 583, 580, 581, ! 16, 563, 582, 73, 78, 82, 87, 94, 9, 95, ! 565, 319, 319, 567, 11, 12, 13, 212, 7, 477, ! 9, 77, 478, 576, 578, 838, 11, 12, 13, 871, ! 584, 98, 9, 99, 586, 627, 664, -31, 11, 12, ! 13, 30, 15, 685, 48, 24, 270, 271, 25, 686, ! 272, 273, 274, 275, 838, 892, 16, 687, 479, 695, ! 696, 480, -32, 395, 395, -257, 680, 263, 264, 265, ! 266, 267, 268, 269, 694, 74, 79, 83, 88, 701, ! 26, 27, 704, 707, 28, 278, 474, 29, 31, 7, ! 8, 9, 10, 613, 759, 476, 761, 11, 12, 13, ! 762, 625, 774, 91, 96, 100, 105, 775, 793, 800, ! -250, 803, 805, 15, 721, 722, 810, 811, 727, 813, ! 139, 9, 140, 730, 731, 837, 732, 11, 12, 13, ! 842, 846, 865, 852, 92, 97, 101, 106, 73, 78, ! 82, 87, 128, 133, 137, 142, 855, 856, 861, 858, ! 395, 395, 860, 874, 346, 347, 880, 872, 879, 745, ! 862, 324, 749, 881, 7, 353, 9, 10, -536, 887, ! 356, 357, 11, 12, 13, 362, 363, 364, 365, 366, ! 367, 368, 369, 370, 371, 372, 373, 895, 15, 890, ! 16, 17, 6, 896, -119, 7, 8, 9, 10, -259, ! 897, 467, 413, 11, 12, 13, 297, 655, 297, 656, ! 74, 79, 83, 88, 504, 659, 660, 500, 14, 15, ! 501, 16, 17, 465, 397, 690, 795, 788, 724, 726, ! 797, 708, 672, 709, 710, 711, 712, 427, 91, 96, ! 100, 105, 755, 782, 325, -372, 746, 520, 741, -119, ! 434, 518, 7, 85, 9, 86, 7, -119, 9, 72, ! 11, 12, 13, 844, 11, 12, 13, 717, 460, 845, ! 463, 823, 824, 873, 825, 18, 15, 444, 445, 826, ! 15, 827, 16, 265, 266, 267, 268, 269, 832, 73, ! 78, 552, 875, 109, 114, 556, 0, 498, 98, 9, ! 99, 92, 97, 101, 106, 11, 12, 13, 0, 0, ! 0, 511, 514, 9, 90, 395, 395, 0, 0, 11, ! 12, 13, 0, 16, 395, 395, 0, 0, 395, 395, ! 0, 0, -247, 0, 0, 0, 0, 16, 9, 104, ! 460, 460, 535, 460, 11, 12, 13, 0, 517, 7, ! 80, 9, 81, 522, 0, 0, 0, 11, 12, 13, ! 526, 74, 79, 0, 0, 110, 115, 0, 0, 0, ! 0, 0, 0, 15, 0, 16, 0, 724, 726, 726, ! 0, 0, 0, 0, 0, 0, 0, 91, 96, 0, ! 0, 127, 132, 573, 0, 575, 0, 7, 211, 9, ! 81, -27, -27, -27, -27, 11, 12, 13, 0, -27, ! -27, -27, 0, 0, 0, 0, 0, 0, 0, 571, ! 0, 15, 0, 16, 212, -27, 0, -275, 0, -246, ! 0, 0, 0, 0, 0, 0, 92, 97, 101, 106, ! -275, 593, 474, 0, 475, 7, 8, 9, 10, 0, ! 0, 476, 0, 11, 12, 13, 0, 73, 78, 82, ! 87, 0, 0, 213, 214, 109, 114, 118, 123, 15, ! 7, 107, 9, 108, 7, 116, 9, 117, 11, 12, ! 13, -275, 11, 12, 13, -275, -27, 0, 0, 0, ! 0, 571, 0, 0, 15, 0, 16, 0, 15, 0, ! 16, 703, 681, 7, 112, 9, 113, 683, 0, 0, ! 0, 11, 12, 13, 0, 0, 593, 692, 0, 0, ! 0, 0, 693, 0, -536, 0, 0, 15, 0, 74, ! 79, 83, 88, 0, 130, 9, 131, 110, 115, 119, ! 124, 11, 12, 13, 125, 9, 126, 0, 0, 0, ! -252, 11, 12, 13, -254, 0, 0, 91, 96, 100, ! 105, 742, 0, 0, 514, 127, 132, 136, 141, 16, ! 7, 8, 9, 10, 0, 0, 644, 0, 11, 12, ! 13, 0, 0, -253, 0, 92, 97, 593, 0, 128, ! 133, 0, 743, 0, 15, 747, 16, 0, 0, 0, ! 0, 593, 0, 0, 593, 0, 593, 7, 8, 9, ! 10, 0, 134, 9, 135, 11, 12, 13, 0, 11, ! 12, 13, 450, -256, -474, -474, -474, -474, -474, -474, ! -474, 15, -474, -474, -474, -474, -474, 16, -474, -474, ! -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, ! -474, -474, -474, 0, -474, -474, -474, -474, -474, 0, ! 0, 796, 0, -474, 535, 798, 0, 0, 799, -474, ! 0, 593, -474, 0, 802, 0, 0, -474, -474, -474, ! 751, 0, -474, -474, 0, 0, 0, -474, 7, 121, ! 9, 122, 7, 76, 9, 77, 11, 12, 13, 0, ! 11, 12, 13, 0, 0, -474, 535, -474, -474, 0, ! -474, 0, 15, 253, 254, 255, 15, 256, 257, 258, ! 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, ! 269, 0, 0, 0, 0, 0, 134, 9, 135, 0, ! 866, 867, 0, 11, 12, 13, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 92, 97, 101, 106, 0, ! 752, 16, 0, 128, 133, 137, 142, 277, -255, -450, ! -450, -450, -450, -450, -450, -450, 0, -450, -450, -450, ! -450, -450, 0, -450, -450, -450, -450, -450, -450, -450, ! -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, ! -450, -450, -450, -450, 103, 9, 104, 0, -450, 0, ! 0, 11, 12, 13, -450, -258, 0, -450, 0, 0, ! 0, 0, -450, -450, -450, 0, 0, -450, -450, 253, ! 254, 255, -450, 256, 257, 258, 259, 260, 261, 262, ! 263, 264, 265, 266, 267, 268, 269, 0, 0, 0, ! -450, 278, -450, -450, 776, -450, -452, -452, 0, 0, ! 0, -452, -452, 0, -452, 0, 0, 0, -452, 750, ! -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, ! -452, 0, -452, 0, -452, 0, -452, -452, -452, -452, ! -452, 139, 9, 140, 0, -452, 0, 0, 11, 12, ! 13, -452, 0, 16, -452, 0, 0, 0, 0, -452, ! -452, -452, 0, 0, -452, -452, 253, 254, 255, -452, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, ! 266, 267, 268, 269, 0, 0, 0, -452, 0, -452, ! -452, 815, -452, -481, -481, 0, 0, 0, -481, -481, ! 0, -481, 0, 0, 0, -481, 0, -481, -481, -481, ! -481, -481, -481, -481, -481, -481, -481, -481, 0, -481, ! 0, -481, 0, -481, -481, -481, -481, -481, 0, 9, ! 99, 0, -481, 0, 0, 11, 12, 13, -481, 0, ! 0, -481, 0, 0, 0, 0, -481, -481, -481, 0, ! 0, -481, -481, 16, 0, 242, -481, 156, 7, 0, ! 9, 10, 157, 158, 0, 159, 11, 12, 13, 0, ! 0, 0, 0, 0, -481, 0, -481, -481, 0, -481, ! 0, 0, 15, 160, 16, 17, 0, 161, 162, 163, ! 164, 165, 0, 0, 0, 0, 166, 0, 0, 0, ! 0, 0, 167, 0, 0, 168, 0, 0, 0, 0, ! 169, 170, 171, 0, 0, 172, 173, 0, 0, 587, ! 174, 588, 148, 0, 0, 0, 157, 158, 0, 159, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, ! 175, 176, 0, 243, 0, 0, 0, 160, 0, 17, ! 0, 161, 162, 163, 164, 165, 0, 0, 0, 0, ! 166, 0, 0, 0, 0, 0, 167, 0, 0, 168, ! 0, 0, 0, 0, 169, 170, 171, 0, 0, 172, ! 173, 0, 0, 589, 174, 590, 587, 0, 588, 148, ! 0, 0, 0, 157, 158, 0, 159, 0, 0, 0, ! 0, 0, 0, -303, 175, 176, 0, 591, 0, 0, ! 0, 0, 0, 0, 160, 0, 17, 0, 161, 162, ! 163, 164, 165, 0, 0, 0, 0, 166, 0, 0, ! 0, 0, 0, 167, 0, 0, 168, 0, 0, 0, ! 0, 169, 170, 171, 0, 0, 172, 173, 0, 0, ! 589, 174, 590, 587, 0, 156, 0, 0, 0, 0, ! 157, 158, 0, 159, 0, 0, 0, 0, 0, 0, ! -369, 175, 176, 0, 591, 0, 0, 0, 0, 0, ! 0, 160, 0, 17, 0, 161, 162, 163, 164, 165, ! 0, 0, 0, 0, 166, -316, 0, 0, 0, 0, ! 167, 0, 0, 168, 0, 0, 0, 0, 169, 170, ! 171, 0, 0, 172, 173, 0, 0, -316, 174, -316, ! 569, 0, 156, 0, 0, 0, 0, 157, 158, 0, ! 159, 0, 0, 0, 7, 71, 9, 72, 175, 176, ! 0, 591, 11, 12, 13, 0, 0, 0, 160, 0, ! 17, 0, 161, 162, 163, 164, 165, 0, 15, 0, ! 16, 166, 0, 7, 112, 9, 113, 167, 0, 0, ! 168, 11, 12, 13, 0, 169, 170, 171, 0, 0, ! 172, 173, 587, 0, 156, 174, 0, 15, 0, 157, ! 158, 0, 159, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 175, 176, 0, 570, 0, ! 160, 0, 17, 0, 161, 162, 163, 164, 165, 0, ! 0, 0, 321, 166, 0, -23, -23, -23, -23, 167, ! 0, 0, 168, -23, -23, -23, 0, 169, 170, 171, ! 0, 0, 172, 173, 0, 0, 0, 174, 212, -23, ! 324, -275, 0, 7, 0, 9, 10, 0, 0, 0, ! 0, 11, 12, 13, -275, 0, 0, 175, 176, 0, ! 591, 0, 0, 0, 0, 0, 0, 15, 0, 16, ! 17, 0, 0, 0, 0, 0, 0, 213, 214, 156, ! 7, 299, 9, 10, 157, 158, 0, 159, 11, 12, ! 13, 0, 0, 0, 0, -275, 0, 0, 0, -275, ! -23, 0, 0, 0, 15, 160, 16, 17, 0, 161, ! 162, 163, 164, 165, 0, 0, 0, 0, 166, 0, ! 156, 0, 405, 0, 167, 157, 158, 168, 159, 0, ! 0, 0, 169, 170, 300, 0, 0, 172, 173, 0, ! 0, 0, 174, 0, 0, 0, 160, 0, 17, 0, ! 161, 162, 163, 164, 165, 0, 0, 0, 0, 166, ! 0, 0, 175, 176, 0, 167, 301, 0, 168, 0, ! 0, 0, 0, 169, 170, 406, 0, 0, 172, 173, ! 156, 0, 0, 174, 0, 157, 158, 0, 159, 0, ! 0, 7, 107, 9, 108, 0, 0, 0, 0, 11, ! 12, 13, 0, 175, 176, 0, 160, 407, 17, 0, ! 161, 162, 163, 164, 165, 15, 0, 16, 0, 166, ! 0, 156, 0, 0, 0, 167, 157, 158, 168, 159, ! 0, 0, 0, 169, 170, 171, 0, 0, 172, 173, ! 0, 0, 0, 174, 0, 0, 0, 160, 0, 17, ! 0, 161, 162, 163, 164, 165, 0, 0, 0, 0, ! 166, 0, 0, 175, 176, 0, 167, 403, 0, 168, ! 0, 0, 0, 0, 169, 170, 171, 0, 0, 172, ! 173, 0, 0, 0, 174, 0, 0, 0, 0, 0, ! 0, 588, 604, 8, 9, 10, 157, 158, 0, 159, ! 11, 12, 13, 0, 175, 176, 0, 0, 496, 605, ! 606, 607, 608, 609, 610, 611, 15, 160, 16, 17, ! 0, 161, 162, 163, 164, 165, 0, 0, 0, 0, ! 166, 0, 7, 80, 9, 81, 167, 0, 0, 168, ! 11, 12, 13, 0, 169, 170, 171, 0, 0, 172, ! 173, 0, 0, 0, 174, 0, 15, 0, 16, 0, ! 588, 148, 0, 0, 0, 157, 158, 0, 159, 0, ! 0, 0, 612, 0, 175, 176, 0, 613, 605, 606, ! 607, 608, 609, 610, 611, 0, 160, 0, 17, 0, ! 161, 162, 163, 164, 165, 0, 0, 0, 0, 166, ! 0, 7, 85, 9, 86, 167, 0, 0, 168, 11, ! 12, 13, 0, 169, 170, 171, 0, 0, 172, 173, ! 0, 156, 0, 174, 0, 15, 157, 158, 0, 159, ! 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, ! 269, 612, 0, 175, 176, 0, 613, 160, 0, 17, ! 0, 161, 162, 163, 164, 165, 0, 0, 0, 0, ! 166, 0, 0, 0, 0, 0, 167, 0, 0, 168, ! 0, 0, 0, 0, 169, 170, 171, 0, 0, 172, ! 173, 0, 0, 0, 174, 156, 7, 8, 9, 10, ! 157, 158, 0, 159, 11, 12, 13, 0, 0, 0, ! 0, 0, 0, 0, 175, 176, 0, 438, 0, 0, ! 15, 160, 16, 17, 0, 161, 162, 163, 164, 165, ! 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, ! 167, 0, 0, 168, 0, 0, 0, 0, 169, 170, ! 171, 0, 0, 172, 173, 0, 156, 7, 174, 9, ! 10, 157, 158, 0, 159, 11, 12, 13, 262, 263, ! 264, 265, 266, 267, 268, 269, 0, 0, 175, 176, ! 0, 15, 160, 16, 17, 0, 161, 162, 163, 164, ! 165, 0, 0, 0, 0, 166, 0, 156, 0, 0, ! 0, 167, 157, 158, 168, 159, 0, 0, 0, 169, ! 170, 171, 0, 0, 172, 173, 0, 0, 0, 174, ! 0, 0, 0, 160, 0, 17, 0, 161, 162, 163, ! 164, 165, 0, 0, 0, 0, 166, 0, 156, 175, ! 176, 0, 167, 157, 158, 168, 159, 0, 0, 0, ! 169, 170, 171, 0, 0, 172, 173, 0, 0, 0, ! 174, 0, 0, 0, 160, 0, 17, 0, 161, 162, ! 163, 164, 165, 0, 0, 0, 0, 166, 697, 156, ! 175, 176, 0, 167, 157, 158, 168, 159, 0, 0, ! 0, 169, 170, 171, 0, 0, 172, 173, 0, 0, ! 0, 174, 0, 0, 0, 160, 0, 17, 0, 161, ! 162, 163, 164, 165, 0, 0, 0, 0, 166, 0, ! 156, 175, 176, 0, 167, 157, 158, 168, 159, 0, ! 0, 0, 169, 170, 171, 0, 0, 172, 173, 0, ! 0, 0, 249, 0, 0, 0, 160, 0, 17, 0, ! 161, 162, 163, 164, 165, 0, 0, 0, 0, 166, ! 0, 466, 175, 176, 0, 167, 157, 158, 168, 159, ! 0, 0, 0, 169, 170, 171, 0, 0, 172, 173, ! 0, 0, 0, 251, 0, 0, 0, 160, 0, 17, ! 0, 161, 162, 163, 164, 165, 0, 0, 0, 0, ! 166, 0, 0, 175, 176, 0, 167, 0, 0, 168, ! 0, 0, 0, 757, 169, 170, 171, 0, 0, 172, ! 173, 253, 254, 255, 174, 256, 257, 258, 259, 260, ! 261, 262, 263, 264, 265, 266, 267, 268, 269, 0, ! 0, 0, 0, 0, 175, 176, 253, 254, 255, 758, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, ! 266, 267, 268, 269, 0, 253, 254, 255, 828, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, ! 267, 268, 269, 253, 254, 255, 0, 256, 257, 258, ! 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, ! 269, 0, 0, 0, 0, 0, 0, 253, 254, 255, ! 435, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 0, 0, 0, 436, 7, ! 116, 9, 117, 7, 0, 9, 10, 11, 12, 13, ! 0, 11, 12, 13, 0, 0, 0, 0, 0, 0, ! 0, 0, 585, 15, 0, 16, 0, 15, 0, 16, ! 7, 121, 9, 122, 7, 0, 9, 86, 11, 12, ! 13, 0, 11, 12, 13, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 0, 0, 0, 15, 253, ! 254, 255, 829, 256, 257, 258, 259, 260, 261, 262, ! 263, 264, 265, 266, 267, 268, 269, 253, 254, 255, ! 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 255, 0, 256, 257, 258, ! 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, ! 269, 257, 258, 259, 260, 261, 262, 263, 264, 265, ! 266, 267, 268, 269 }; static const short yycheck[] = { ! 62, 3, 64, 5, 3, 3, 5, 5, 3, 290, ! 5, 144, 11, 12, 13, 223, 316, 219, 543, 314, ! 400, 273, 322, 143, 318, 24, 296, 26, 468, 28, ! 23, 30, 543, 32, 414, 34, 599, 36, 550, 38, ! 3, 3, 5, 5, 3, 625, 5, 3, 3, 5, ! 5, 40, 41, 55, 161, 162, 55, 55, 400, 400, ! 55, 3, 543, 5, 171, 64, 151, 66, 66, 400, ! 177, 66, 414, 414, 1, 48, 229, 602, 559, 1, ! 1, 188, 556, 414, 772, 543, 59, 60, 61, 10, ! 566, 306, 55, 55, 1, 468, 55, 1, 9, 55, ! 55, 559, 75, 66, 66, 214, 46, 5, 1, 46, ! 460, 84, 1, 55, 625, 4, 5, 6, 7, 1, ! 93, 10, 174, 12, 13, 14, 689, 7, 816, 102, ! 3, 4, 50, 51, 52, 387, 3, 4, 111, 28, ! 665, 670, 543, 83, 625, 857, 83, 120, 498, 9, ! 30, 144, 214, 3, 4, 684, 129, 55, 46, 0, ! 30, 511, 89, 85, 514, 138, 381, 625, 89, 0, ! 550, 859, 83, 66, 886, 174, 46, 0, 85, 559, ! 868, 85, 555, 556, 337, 535, 388, 239, 469, 381, ! 299, 754, 191, 300, 193, 83, 195, 249, 197, 251, ! 89, 602, 201, 85, 203, 83, 27, 67, 550, 550, ! 88, 899, 274, 206, 207, 214, 89, 559, 559, 550, ! 219, 219, 89, 573, 219, 575, 30, 229, 559, 705, ! 229, 229, 66, 813, 229, 208, 381, 299, 83, 89, ! 239, 303, 457, 88, 351, 66, 67, 84, 30, 167, ! 249, 88, 251, 338, 43, 340, 219, 219, 66, 733, ! 734, 453, 454, 455, 456, 7, 229, 229, 3, 4, ! 229, 189, 83, 229, 229, 787, 65, 88, 67, 66, ! 720, 576, 58, 578, 66, 67, 3, 229, 30, 729, ! 66, 67, 84, 545, 7, 66, 358, 505, 83, 406, ! 299, 294, 813, 88, 4, 5, 6, 7, 453, 454, ! 455, 456, 12, 13, 14, 233, 83, 30, 311, 312, ! 67, 88, 84, 58, 3, 4, 88, 326, 28, 328, ! 30, 330, 813, 332, 89, 337, 3, 89, 337, 337, ! 402, 58, 337, 405, 89, 334, 335, 720, 3, 66, ! 67, 876, 877, 703, 272, 813, 729, 275, 83, 1, ! 733, 734, 4, 5, 6, 7, 58, 59, 60, 3, ! 12, 13, 14, 84, 337, 337, 84, 88, 337, 58, ! 88, 337, 337, 435, 84, 437, 28, 66, 67, 388, ! 388, 58, 742, 388, 84, 337, 66, 84, 88, 66, ! 67, 88, 400, 58, 84, 400, 84, 787, 88, 66, ! 88, 66, 46, 5, 6, 7, 414, 66, 67, 414, ! 12, 13, 14, 66, 58, 388, 388, 345, 630, 723, ! 88, 725, 66, 9, 83, 568, 435, 639, 437, 84, ! 721, 400, 83, 88, 400, 787, 787, 89, 1, 730, ! 83, 4, 5, 6, 7, 414, 787, 577, 414, 12, ! 13, 14, 380, 5, 6, 7, 213, 7, 386, 216, ! 12, 13, 14, 220, 27, 28, 7, 30, 477, 66, ! 479, 543, 481, 1, 483, 3, 4, 30, 30, 671, ! 43, 673, 84, 5, 6, 7, 485, 486, 66, 67, ! 12, 13, 14, 46, 3, 4, 85, 807, 46, 809, ! 85, 500, 501, 83, 432, 83, 866, 867, 625, 4, ! 5, 6, 7, 66, 67, 84, 85, 12, 13, 14, ! 84, 84, 66, 67, 83, 88, 89, 3, 4, 83, ! 602, 543, 84, 28, 543, 543, 83, 609, 543, 83, ! 3, 4, 550, 453, 454, 550, 456, 559, 766, 58, ! 559, 559, 555, 556, 559, 66, 67, 66, 66, 67, ! 317, 318, 84, 706, 32, 568, 323, 84, 85, 83, ! 543, 543, 66, 67, 543, 705, 579, 543, 543, 224, ! 66, 550, 339, 46, 550, 9, 559, 559, 90, 84, ! 559, 543, 84, 559, 559, 58, 24, 25, 26, 27, ! 528, 43, 882, 66, 32, 33, 34, 35, 3, 4, ! 5, 6, 7, 625, 894, 543, 625, 625, 617, 618, ! 625, 630, 630, 27, 84, 630, 30, 699, 43, 638, ! 639, 639, 389, 88, 639, 88, 645, 83, 647, 43, ! 649, 46, 651, 83, 653, 290, 655, 83, 657, 90, ! 659, 83, 625, 625, 66, 67, 625, 630, 630, 625, ! 625, 589, 661, 662, 794, 90, 639, 639, 24, 25, ! 26, 27, 27, 625, 602, 30, 32, 33, 34, 35, ! 84, 90, 610, 43, 88, 5, 6, 7, 43, 85, ! 762, 85, 12, 13, 14, 85, 28, 29, 30, 31, ! 66, 67, 774, 706, 36, 37, 38, 39, 780, 89, ! 30, 66, 67, 46, 471, 6, 7, 720, 721, 181, ! 182, 12, 13, 14, 311, 312, 729, 730, 1, 84, ! 733, 734, 90, 88, 85, 5, 6, 7, 810, 811, ! 83, 813, 12, 13, 14, 728, 5, 6, 7, 394, ! 720, 721, 83, 12, 13, 14, 83, 85, 515, 516, ! 30, 90, 519, 191, 192, 193, 194, 5, 6, 7, ! 84, 416, 417, 84, 12, 13, 14, 27, 4, 787, ! 6, 7, 787, 88, 88, 857, 12, 13, 14, 861, ! 83, 5, 6, 7, 83, 83, 3, 46, 12, 13, ! 14, 813, 28, 46, 813, 813, 61, 62, 813, 85, ! 65, 66, 67, 68, 886, 887, 30, 88, 787, 84, ! 84, 787, 46, 468, 469, 84, 583, 54, 55, 56, ! 57, 58, 59, 60, 46, 191, 192, 193, 194, 7, ! 813, 813, 84, 84, 813, 85, 1, 813, 813, 4, ! 5, 6, 7, 89, 84, 10, 84, 12, 13, 14, ! 66, 813, 66, 195, 196, 197, 198, 16, 85, 85, ! 84, 84, 46, 28, 631, 632, 66, 66, 635, 66, ! 5, 6, 7, 640, 641, 17, 643, 12, 13, 14, ! 83, 83, 88, 84, 28, 29, 30, 31, 326, 327, ! 328, 329, 36, 37, 38, 39, 83, 83, 66, 84, ! 555, 556, 84, 84, 237, 238, 83, 90, 84, 676, ! 848, 1, 679, 9, 4, 248, 6, 7, 83, 66, ! 253, 254, 12, 13, 14, 258, 259, 260, 261, 262, ! 263, 264, 265, 266, 267, 268, 269, 83, 28, 84, ! 30, 31, 1, 83, 3, 4, 5, 6, 7, 84, ! 84, 387, 307, 12, 13, 14, 723, 559, 725, 559, ! 326, 327, 328, 329, 418, 559, 559, 414, 27, 28, ! 414, 30, 31, 386, 294, 598, 743, 733, 633, 634, ! 747, 15, 574, 17, 18, 19, 20, 337, 330, 331, ! 332, 333, 687, 720, 84, 85, 677, 434, 674, 58, ! 345, 432, 4, 5, 6, 7, 4, 66, 6, 7, ! 12, 13, 14, 817, 12, 13, 14, 621, 381, 819, ! 382, 788, 789, 863, 791, 84, 28, 360, 361, 796, ! 28, 798, 30, 56, 57, 58, 59, 60, 805, 477, ! 478, 471, 865, 481, 482, 486, -1, 410, 5, 6, ! 7, 195, 196, 197, 198, 12, 13, 14, -1, -1, ! -1, 424, 425, 6, 7, 720, 721, -1, -1, 12, ! 13, 14, -1, 30, 729, 730, -1, -1, 733, 734, ! -1, -1, 84, -1, -1, -1, -1, 30, 6, 7, ! 453, 454, 455, 456, 12, 13, 14, -1, 431, 4, ! 5, 6, 7, 436, -1, -1, -1, 12, 13, 14, ! 443, 477, 478, -1, -1, 481, 482, -1, -1, -1, ! -1, -1, -1, 28, -1, 30, -1, 782, 783, 784, ! -1, -1, -1, -1, -1, -1, -1, 479, 480, -1, ! -1, 483, 484, 506, -1, 508, -1, 4, 1, 6, ! 7, 4, 5, 6, 7, 12, 13, 14, -1, 12, ! 13, 14, -1, -1, -1, -1, -1, -1, -1, 502, ! -1, 28, -1, 30, 27, 28, -1, 30, -1, 84, ! -1, -1, -1, -1, -1, -1, 330, 331, 332, 333, ! 43, 524, 1, -1, 3, 4, 5, 6, 7, -1, ! -1, 10, -1, 12, 13, 14, -1, 645, 646, 647, ! 648, -1, -1, 66, 67, 653, 654, 655, 656, 28, ! 4, 5, 6, 7, 4, 5, 6, 7, 12, 13, ! 14, 84, 12, 13, 14, 88, 89, -1, -1, -1, ! -1, 574, -1, -1, 28, -1, 30, -1, 28, -1, ! 30, 614, 585, 4, 5, 6, 7, 590, -1, -1, ! -1, 12, 13, 14, -1, -1, 599, 600, -1, -1, ! -1, -1, 605, -1, 83, -1, -1, 28, -1, 645, ! 646, 647, 648, -1, 5, 6, 7, 653, 654, 655, ! 656, 12, 13, 14, 5, 6, 7, -1, -1, -1, ! 84, 12, 13, 14, 84, -1, -1, 649, 650, 651, ! 652, 674, -1, -1, 677, 657, 658, 659, 660, 30, ! 4, 5, 6, 7, -1, -1, 10, -1, 12, 13, ! 14, -1, -1, 84, -1, 479, 480, 670, -1, 483, ! 484, -1, 675, -1, 28, 678, 30, -1, -1, -1, ! -1, 684, -1, -1, 687, -1, 689, 4, 5, 6, ! 7, -1, 5, 6, 7, 12, 13, 14, -1, 12, ! 13, 14, 1, 84, 3, 4, 5, 6, 7, 8, ! 9, 28, 11, 12, 13, 14, 15, 30, 17, 18, ! 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, ! 29, 30, 31, -1, 33, 34, 35, 36, 37, -1, ! -1, 744, -1, 42, 777, 748, -1, -1, 751, 48, ! -1, 754, 51, -1, 757, -1, -1, 56, 57, 58, ! 10, -1, 61, 62, -1, -1, -1, 66, 4, 5, ! 6, 7, 4, 5, 6, 7, 12, 13, 14, -1, ! 12, 13, 14, -1, -1, 84, 819, 86, 87, -1, ! 89, -1, 28, 43, 44, 45, 28, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, -1, -1, -1, -1, -1, 5, 6, 7, -1, ! 853, 854, -1, 12, 13, 14, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 649, 650, 651, 652, -1, ! 90, 30, -1, 657, 658, 659, 660, 1, 84, 3, ! 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, ! 14, 15, -1, 17, 18, 19, 20, 21, 22, 23, ! 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, ! 34, 35, 36, 37, 5, 6, 7, -1, 42, -1, ! -1, 12, 13, 14, 48, 84, -1, 51, -1, -1, ! -1, -1, 56, 57, 58, -1, -1, 61, 62, 43, ! 44, 45, 66, 47, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, 60, -1, -1, -1, ! 84, 85, 86, 87, 1, 89, 3, 4, -1, -1, ! -1, 8, 9, -1, 11, -1, -1, -1, 15, 83, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, -1, 29, -1, 31, -1, 33, 34, 35, 36, ! 37, 5, 6, 7, -1, 42, -1, -1, 12, 13, ! 14, 48, -1, 30, 51, -1, -1, -1, -1, 56, ! 57, 58, -1, -1, 61, 62, 43, 44, 45, 66, ! 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 57, 58, 59, 60, -1, -1, -1, 84, -1, 86, ! 87, 1, 89, 3, 4, -1, -1, -1, 8, 9, ! -1, 11, -1, -1, -1, 15, -1, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, -1, 29, ! -1, 31, -1, 33, 34, 35, 36, 37, -1, 6, ! 7, -1, 42, -1, -1, 12, 13, 14, 48, -1, ! -1, 51, -1, -1, -1, -1, 56, 57, 58, -1, ! -1, 61, 62, 30, -1, 1, 66, 3, 4, -1, ! 6, 7, 8, 9, -1, 11, 12, 13, 14, -1, ! -1, -1, -1, -1, 84, -1, 86, 87, -1, 89, ! -1, -1, 28, 29, 30, 31, -1, 33, 34, 35, ! 36, 37, -1, -1, -1, -1, 42, -1, -1, -1, ! -1, -1, 48, -1, -1, 51, -1, -1, -1, -1, ! 56, 57, 58, -1, -1, 61, 62, -1, -1, 1, ! 66, 3, 4, -1, -1, -1, 8, 9, -1, 11, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ! 86, 87, -1, 89, -1, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, ! 42, -1, -1, -1, -1, -1, 48, -1, -1, 51, ! -1, -1, -1, -1, 56, 57, 58, -1, -1, 61, ! 62, -1, -1, 65, 66, 67, 1, -1, 3, 4, ! -1, -1, -1, 8, 9, -1, 11, -1, -1, -1, ! -1, -1, -1, 85, 86, 87, -1, 89, -1, -1, ! -1, -1, -1, -1, 29, -1, 31, -1, 33, 34, ! 35, 36, 37, -1, -1, -1, -1, 42, -1, -1, ! -1, -1, -1, 48, -1, -1, 51, -1, -1, -1, ! -1, 56, 57, 58, -1, -1, 61, 62, -1, -1, ! 65, 66, 67, 1, -1, 3, -1, -1, -1, -1, ! 8, 9, -1, 11, -1, -1, -1, -1, -1, -1, ! 85, 86, 87, -1, 89, -1, -1, -1, -1, -1, ! -1, 29, -1, 31, -1, 33, 34, 35, 36, 37, ! -1, -1, -1, -1, 42, 43, -1, -1, -1, -1, ! 48, -1, -1, 51, -1, -1, -1, -1, 56, 57, ! 58, -1, -1, 61, 62, -1, -1, 65, 66, 67, ! 1, -1, 3, -1, -1, -1, -1, 8, 9, -1, ! 11, -1, -1, -1, 4, 5, 6, 7, 86, 87, ! -1, 89, 12, 13, 14, -1, -1, -1, 29, -1, ! 31, -1, 33, 34, 35, 36, 37, -1, 28, -1, ! 30, 42, -1, 4, 5, 6, 7, 48, -1, -1, ! 51, 12, 13, 14, -1, 56, 57, 58, -1, -1, ! 61, 62, 1, -1, 3, 66, -1, 28, -1, 8, ! 9, -1, 11, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 86, 87, -1, 89, -1, ! 29, -1, 31, -1, 33, 34, 35, 36, 37, -1, ! -1, -1, 1, 42, -1, 4, 5, 6, 7, 48, ! -1, -1, 51, 12, 13, 14, -1, 56, 57, 58, ! -1, -1, 61, 62, -1, -1, -1, 66, 27, 28, ! 1, 30, -1, 4, -1, 6, 7, -1, -1, -1, ! -1, 12, 13, 14, 43, -1, -1, 86, 87, -1, ! 89, -1, -1, -1, -1, -1, -1, 28, -1, 30, ! 31, -1, -1, -1, -1, -1, -1, 66, 67, 3, ! 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, ! 14, -1, -1, -1, -1, 84, -1, -1, -1, 88, ! 89, -1, -1, -1, 28, 29, 30, 31, -1, 33, ! 34, 35, 36, 37, -1, -1, -1, -1, 42, -1, ! 3, -1, 5, -1, 48, 8, 9, 51, 11, -1, ! -1, -1, 56, 57, 58, -1, -1, 61, 62, -1, ! -1, -1, 66, -1, -1, -1, 29, -1, 31, -1, ! 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, ! -1, -1, 86, 87, -1, 48, 90, -1, 51, -1, ! -1, -1, -1, 56, 57, 58, -1, -1, 61, 62, ! 3, -1, -1, 66, -1, 8, 9, -1, 11, -1, ! -1, 4, 5, 6, 7, -1, -1, -1, -1, 12, ! 13, 14, -1, 86, 87, -1, 29, 90, 31, -1, ! 33, 34, 35, 36, 37, 28, -1, 30, -1, 42, ! -1, 3, -1, -1, -1, 48, 8, 9, 51, 11, ! -1, -1, -1, 56, 57, 58, -1, -1, 61, 62, ! -1, -1, -1, 66, -1, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, ! 42, -1, -1, 86, 87, -1, 48, 90, -1, 51, ! -1, -1, -1, -1, 56, 57, 58, -1, -1, 61, ! 62, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 3, 4, 5, 6, 7, 8, 9, -1, 11, ! 12, 13, 14, -1, 86, 87, -1, -1, 90, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, ! 42, -1, 4, 5, 6, 7, 48, -1, -1, 51, ! 12, 13, 14, -1, 56, 57, 58, -1, -1, 61, ! 62, -1, -1, -1, 66, -1, 28, -1, 30, -1, ! 3, 4, -1, -1, -1, 8, 9, -1, 11, -1, ! -1, -1, 84, -1, 86, 87, -1, 89, 21, 22, ! 23, 24, 25, 26, 27, -1, 29, -1, 31, -1, ! 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, ! -1, 4, 5, 6, 7, 48, -1, -1, 51, 12, ! 13, 14, -1, 56, 57, 58, -1, -1, 61, 62, ! -1, 3, -1, 66, -1, 28, 8, 9, -1, 11, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, 84, -1, 86, 87, -1, 89, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, ! 42, -1, -1, -1, -1, -1, 48, -1, -1, 51, ! -1, -1, -1, -1, 56, 57, 58, -1, -1, 61, ! 62, -1, -1, -1, 66, 3, 4, 5, 6, 7, ! 8, 9, -1, 11, 12, 13, 14, -1, -1, -1, ! -1, -1, -1, -1, 86, 87, -1, 89, -1, -1, ! 28, 29, 30, 31, -1, 33, 34, 35, 36, 37, ! -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, ! 48, -1, -1, 51, -1, -1, -1, -1, 56, 57, ! 58, -1, -1, 61, 62, -1, 3, 4, 66, 6, ! 7, 8, 9, -1, 11, 12, 13, 14, 53, 54, ! 55, 56, 57, 58, 59, 60, -1, -1, 86, 87, ! -1, 28, 29, 30, 31, -1, 33, 34, 35, 36, ! 37, -1, -1, -1, -1, 42, -1, 3, -1, -1, ! -1, 48, 8, 9, 51, 11, -1, -1, -1, 56, ! 57, 58, -1, -1, 61, 62, -1, -1, -1, 66, ! -1, -1, -1, 29, -1, 31, -1, 33, 34, 35, ! 36, 37, -1, -1, -1, -1, 42, -1, 3, 86, ! 87, -1, 48, 8, 9, 51, 11, -1, -1, -1, ! 56, 57, 58, -1, -1, 61, 62, -1, -1, -1, ! 66, -1, -1, -1, 29, -1, 31, -1, 33, 34, ! 35, 36, 37, -1, -1, -1, -1, 42, 84, 3, ! 86, 87, -1, 48, 8, 9, 51, 11, -1, -1, ! -1, 56, 57, 58, -1, -1, 61, 62, -1, -1, ! -1, 66, -1, -1, -1, 29, -1, 31, -1, 33, ! 34, 35, 36, 37, -1, -1, -1, -1, 42, -1, ! 3, 86, 87, -1, 48, 8, 9, 51, 11, -1, ! -1, -1, 56, 57, 58, -1, -1, 61, 62, -1, ! -1, -1, 66, -1, -1, -1, 29, -1, 31, -1, ! 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, ! -1, 3, 86, 87, -1, 48, 8, 9, 51, 11, ! -1, -1, -1, 56, 57, 58, -1, -1, 61, 62, ! -1, -1, -1, 66, -1, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, ! 42, -1, -1, 86, 87, -1, 48, -1, -1, 51, ! -1, -1, -1, 10, 56, 57, 58, -1, -1, 61, ! 62, 43, 44, 45, 66, 47, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, ! -1, -1, -1, -1, 86, 87, 43, 44, 45, 46, ! 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 57, 58, 59, 60, -1, 43, 44, 45, 90, 47, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 43, 44, 45, -1, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, -1, -1, -1, -1, -1, -1, 43, 44, 45, ! 88, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, -1, -1, -1, 88, 4, ! 5, 6, 7, 4, -1, 6, 7, 12, 13, 14, ! -1, 12, 13, 14, -1, -1, -1, -1, -1, -1, ! -1, -1, 88, 28, -1, 30, -1, 28, -1, 30, ! 4, 5, 6, 7, 4, -1, 6, 7, 12, 13, ! 14, -1, 12, 13, 14, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 28, -1, -1, -1, 28, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, 60, 43, 44, 45, ! -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 45, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 57, 58, 59, 60 }; ! /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing ! symbol of state STATE-NUM. */ ! static const unsigned short yystos[] = { ! 0, 92, 93, 94, 0, 95, 1, 4, 5, 6, ! 7, 12, 13, 14, 27, 28, 30, 31, 84, 96, ! 97, 98, 113, 129, 132, 133, 134, 135, 136, 137, ! 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, ! 148, 149, 155, 157, 158, 159, 160, 161, 170, 171, ! 197, 198, 199, 200, 205, 290, 96, 84, 85, 170, ! 170, 170, 66, 66, 66, 3, 58, 66, 163, 167, ! 196, 5, 7, 157, 158, 170, 5, 7, 157, 158, ! 5, 7, 157, 158, 170, 5, 7, 157, 158, 5, ! 7, 159, 160, 170, 5, 7, 159, 160, 5, 7, ! 159, 160, 170, 5, 7, 159, 160, 5, 7, 157, ! 158, 170, 5, 7, 157, 158, 5, 7, 157, 158, ! 170, 5, 7, 157, 158, 5, 7, 159, 160, 170, ! 5, 7, 159, 160, 5, 7, 159, 160, 170, 5, ! 7, 159, 160, 129, 129, 84, 171, 3, 4, 89, ! 105, 89, 105, 89, 105, 96, 3, 8, 9, 11, ! 29, 33, 34, 35, 36, 37, 42, 48, 51, 56, ! 57, 58, 61, 62, 66, 86, 87, 106, 107, 109, ! 110, 111, 112, 114, 115, 121, 123, 244, 290, 66, ! 107, 132, 133, 134, 135, 136, 137, 138, 139, 154, ! 217, 132, 133, 134, 135, 153, 156, 169, 170, 84, ! 88, 1, 27, 66, 67, 103, 164, 225, 4, 58, ! 66, 162, 165, 191, 192, 196, 163, 196, 208, 209, ! 89, 208, 89, 204, 89, 114, 114, 66, 66, 66, ! 105, 114, 1, 89, 107, 217, 114, 83, 88, 66, ! 110, 66, 110, 43, 44, 45, 47, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ! 61, 62, 65, 66, 67, 68, 9, 1, 85, 233, ! 242, 114, 5, 6, 7, 105, 172, 173, 174, 83, ! 218, 83, 196, 196, 130, 169, 66, 169, 285, 5, ! 58, 90, 107, 154, 1, 124, 125, 126, 232, 251, ! 169, 156, 169, 84, 88, 1, 99, 164, 66, 225, ! 84, 1, 101, 85, 1, 84, 132, 133, 134, 135, ! 136, 137, 138, 139, 152, 153, 210, 290, 201, 85, ! 202, 1, 105, 215, 216, 203, 115, 115, 217, 83, ! 83, 83, 84, 115, 217, 217, 115, 115, 118, 120, ! 117, 116, 115, 115, 115, 115, 115, 115, 115, 115, ! 115, 115, 115, 115, 105, 108, 109, 107, 105, 83, ! 32, 237, 238, 239, 83, 83, 88, 66, 58, 66, ! 219, 221, 222, 223, 224, 225, 83, 167, 196, 123, ! 286, 107, 154, 90, 90, 5, 58, 90, 107, 84, ! 104, 232, 10, 125, 252, 43, 192, 192, 130, 124, ! 169, 285, 124, 169, 129, 129, 84, 210, 208, 169, ! 208, 43, 88, 207, 215, 88, 88, 88, 89, 114, ! 83, 83, 107, 46, 115, 115, 83, 90, 105, 289, ! 1, 128, 226, 227, 228, 229, 230, 231, 232, 243, ! 251, 255, 256, 239, 83, 173, 3, 108, 156, 169, ! 275, 66, 225, 83, 1, 3, 10, 132, 133, 136, ! 137, 140, 141, 144, 145, 150, 151, 277, 280, 281, ! 283, 287, 288, 90, 107, 107, 90, 90, 251, 127, ! 150, 151, 168, 83, 165, 191, 100, 43, 102, 211, ! 213, 251, 212, 214, 251, 85, 85, 115, 216, 85, ! 207, 217, 115, 217, 122, 46, 115, 84, 88, 128, ! 255, 256, 128, 255, 256, 251, 255, 256, 128, 255, ! 256, 232, 85, 252, 83, 88, 83, 222, 223, 221, ! 276, 169, 275, 83, 129, 284, 284, 83, 84, 88, ! 83, 88, 90, 90, 252, 84, 129, 84, 129, 1, ! 89, 115, 175, 251, 166, 251, 88, 252, 88, 252, ! 169, 169, 169, 85, 83, 88, 83, 1, 3, 65, ! 67, 89, 105, 115, 177, 178, 179, 181, 183, 184, ! 119, 105, 252, 234, 4, 21, 22, 23, 24, 25, ! 26, 27, 84, 89, 105, 107, 131, 148, 149, 155, ! 235, 241, 245, 267, 268, 290, 109, 83, 277, 4, ! 58, 66, 193, 194, 195, 196, 220, 221, 222, 58, ! 66, 196, 220, 278, 10, 132, 133, 134, 135, 136, ! 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, ! 147, 148, 149, 282, 3, 1, 240, 245, 162, 163, ! 176, 252, 175, 252, 130, 46, 191, 130, 46, 196, ! 169, 115, 105, 115, 182, 46, 85, 88, 206, 43, ! 184, 181, 115, 115, 46, 84, 84, 84, 107, 58, ! 105, 7, 269, 251, 84, 129, 129, 84, 15, 17, ! 18, 19, 20, 246, 247, 249, 257, 242, 131, 83, ! 156, 169, 169, 66, 225, 66, 225, 169, 170, 156, ! 169, 169, 169, 129, 129, 245, 84, 84, 177, 240, ! 240, 213, 251, 115, 46, 169, 214, 115, 46, 169, ! 83, 10, 90, 177, 180, 179, 181, 10, 46, 84, ! 107, 84, 66, 252, 162, 185, 191, 163, 188, 196, ! 248, 259, 250, 261, 66, 16, 1, 235, 254, 1, ! 66, 236, 194, 195, 195, 285, 285, 279, 193, 196, ! 220, 196, 220, 85, 252, 169, 115, 169, 115, 115, ! 85, 181, 115, 84, 107, 46, 84, 186, 84, 189, ! 66, 66, 254, 66, 107, 1, 258, 253, 255, 256, ! 107, 83, 277, 169, 169, 169, 169, 169, 90, 46, ! 46, 83, 169, 124, 124, 107, 107, 17, 107, 131, ! 266, 270, 83, 254, 236, 253, 83, 9, 67, 271, ! 272, 273, 84, 187, 190, 83, 83, 262, 84, 265, ! 84, 66, 105, 46, 83, 88, 251, 251, 260, 270, ! 254, 107, 90, 271, 84, 273, 252, 252, 254, 84, ! 83, 9, 46, 83, 245, 245, 263, 66, 123, 274, ! 84, 270, 107, 83, 88, 83, 83, 84, 123, 264, ! 254 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif --- 760,1820 ---- 1, 1, 2, 1, 4, 1, 4, 4, 6, 5, 4, 6, 5, 1, 3, 1, 1, 3, 0, 3, 0, 1, 0, 1, 2, 1, 1, 1, 3, 2, ! 3, 4, 3, 2, 2, 1, 4, 3, 4, 5, ! 5, 1, 1, 1, 1, 1, 2, 2, 2, 2, ! 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, ! 2, 1, 1, 1, 1, 2, 0, 0, 0, 0, ! 0, 1, 1, 2, 3, 1, 2, 1, 1, 5, ! 1, 1, 2, 2, 2, 2, 0, 5, 0, 4, ! 0, 0, 1, 2, 3, 3, 3, 0, 4, 1, ! 3, 0, 0, 7, 5, 2, 0, 0, 0, 0, ! 12, 0, 6, 2, 1, 1, 2, 3, 2, 2, ! 2, 3, 6, 8, 10, 12, 3, 4, 1, 3, ! 5, 2, 5, 0, 1, 0, 1, 0, 1, 1, ! 3, 4, 7, 1, 3, 0, 3, 2, 0, 0, ! 6, 2, 0, 1, 1, 3, 1, 3, 4, 4, ! 3, 4, 3, 4, 4, 3, 4, 3, 1, 0, ! 3, 1, 2, 1, 3, 1, 3, 1 }; ! /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE ! doesn't specify something else to do. Zero means the default is an ! error. */ ! static const short yydefact[] = { ! 3, 5, 0, 0, 0, 266, 298, 297, 263, 125, ! 353, 349, 351, 0, 58, 0, 557, 18, 4, 7, ! 9, 8, 0, 0, 210, 211, 212, 213, 202, 203, ! 204, 205, 214, 215, 216, 217, 206, 207, 208, 209, ! 117, 117, 0, 133, 140, 260, 262, 261, 131, 283, ! 157, 0, 0, 0, 265, 264, 0, 6, 16, 17, ! 354, 350, 352, 0, 0, 0, 348, 258, 281, 0, ! 271, 0, 126, 138, 144, 128, 160, 127, 139, 145, ! 161, 129, 150, 155, 132, 167, 130, 151, 156, 168, ! 134, 136, 142, 141, 178, 135, 137, 143, 179, 146, ! 148, 153, 152, 193, 147, 149, 154, 194, 158, 176, ! 185, 164, 162, 159, 177, 186, 163, 165, 191, 200, ! 171, 169, 166, 192, 201, 170, 172, 174, 183, 182, ! 180, 173, 175, 184, 181, 187, 189, 198, 197, 195, ! 188, 190, 199, 196, 0, 0, 15, 284, 31, 32, ! 374, 365, 374, 366, 363, 367, 11, 85, 86, 87, ! 56, 57, 0, 0, 0, 0, 0, 88, 0, 33, ! 35, 34, 0, 36, 37, 0, 38, 39, 0, 0, ! 40, 59, 0, 0, 61, 43, 45, 0, 0, 288, ! 0, 238, 239, 240, 241, 234, 235, 236, 237, 398, ! 0, 230, 231, 232, 233, 259, 0, 0, 282, 12, ! 281, 30, 0, 281, 258, 0, 281, 347, 333, 258, ! 281, 0, 269, 0, 327, 328, 0, 0, 0, 0, 355, 0, 358, 0, 361, 54, 55, 0, 0, 0, ! 49, 46, 0, 462, 0, 0, 48, 0, 0, 0, 50, 0, 52, 0, 0, 78, 76, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 102, 103, 0, 0, 41, 0, 0, 458, 450, 0, ! 47, 295, 296, 293, 0, 286, 289, 294, 267, 400, ! 268, 346, 0, 0, 118, 0, 549, 344, 258, 259, ! 0, 0, 28, 104, 0, 470, 109, 471, 280, 0, ! 0, 14, 281, 22, 0, 281, 281, 331, 13, 26, ! 0, 281, 381, 376, 230, 231, 232, 233, 226, 227, ! 228, 229, 117, 117, 373, 0, 374, 281, 374, 395, ! 396, 370, 393, 0, 0, 0, 0, 92, 91, 0, ! 10, 44, 0, 0, 84, 83, 0, 0, 0, 0, ! 72, 73, 71, 70, 69, 67, 68, 62, 63, 64, ! 65, 66, 101, 100, 0, 42, 0, 94, 0, 0, ! 451, 452, 93, 0, 288, 41, 258, 281, 399, 401, ! 406, 405, 407, 415, 345, 272, 273, 0, 0, 0, ! 0, 0, 417, 0, 445, 470, 111, 110, 0, 278, ! 332, 0, 0, 20, 277, 330, 24, 357, 470, 470, ! 375, 382, 0, 360, 0, 0, 371, 0, 370, 0, ! 0, 0, 89, 60, 51, 53, 0, 0, 77, 75, ! 95, 99, 555, 0, 461, 430, 460, 470, 470, 470, ! 470, 0, 439, 0, 471, 425, 434, 453, 285, 287, ! 85, 0, 409, 525, 414, 281, 413, 274, 0, 553, ! 533, 222, 223, 218, 219, 224, 225, 220, 221, 117, ! 117, 551, 0, 534, 536, 550, 0, 0, 0, 418, ! 416, 471, 107, 117, 117, 0, 329, 270, 273, 470, ! 275, 470, 377, 383, 471, 379, 385, 471, 281, 281, ! 397, 394, 281, 0, 0, 0, 0, 0, 79, 82, ! 454, 0, 431, 426, 435, 432, 427, 436, 471, 428, ! 437, 433, 429, 438, 440, 447, 448, 290, 0, 292, ! 408, 410, 0, 0, 525, 412, 531, 548, 402, 402, ! 527, 528, 0, 552, 0, 419, 420, 0, 114, 0, ! 115, 0, 302, 300, 299, 279, 471, 0, 471, 281, ! 378, 281, 0, 356, 359, 364, 281, 96, 0, 98, ! 315, 85, 0, 0, 312, 0, 314, 0, 368, 305, ! 311, 0, 0, 0, 556, 448, 459, 266, 0, 0, ! 0, 0, 0, 0, 513, 508, 457, 470, 0, 116, ! 117, 117, 0, 0, 446, 495, 475, 476, 0, 0, ! 411, 526, 338, 258, 281, 281, 334, 335, 281, 545, ! 403, 406, 258, 281, 281, 547, 281, 535, 210, 211, ! 212, 213, 202, 203, 204, 205, 214, 215, 216, 217, ! 206, 207, 208, 209, 117, 117, 537, 554, 0, 29, ! 455, 0, 0, 0, 0, 276, 0, 470, 0, 281, ! 470, 0, 281, 362, 0, 318, 0, 0, 309, 90, ! 0, 304, 0, 317, 308, 80, 0, 511, 498, 499, ! 500, 0, 0, 0, 514, 0, 471, 496, 0, 0, ! 123, 466, 481, 468, 486, 0, 479, 0, 0, 449, ! 463, 124, 291, 409, 525, 543, 281, 337, 281, 340, ! 544, 404, 409, 525, 546, 529, 402, 402, 456, 112, ! 113, 0, 21, 25, 384, 471, 281, 0, 387, 386, ! 281, 0, 390, 97, 0, 320, 0, 0, 306, 307, ! 0, 509, 501, 0, 506, 0, 0, 0, 121, 321, ! 0, 122, 324, 0, 0, 448, 0, 0, 0, 465, ! 470, 464, 485, 0, 497, 341, 342, 0, 336, 339, ! 0, 281, 281, 540, 281, 542, 301, 0, 389, 281, ! 392, 281, 0, 313, 310, 0, 507, 0, 281, 119, ! 0, 120, 0, 0, 0, 0, 515, 0, 480, 448, ! 449, 472, 470, 0, 343, 530, 538, 539, 541, 388, ! 391, 319, 510, 517, 0, 512, 322, 325, 0, 0, ! 469, 516, 494, 487, 0, 491, 478, 474, 473, 0, ! 0, 0, 0, 518, 519, 502, 470, 470, 467, 482, ! 515, 493, 448, 484, 0, 0, 517, 0, 0, 471, ! 471, 448, 0, 492, 0, 0, 0, 503, 520, 0, ! 0, 483, 488, 521, 0, 0, 0, 323, 326, 515, ! 0, 523, 0, 504, 0, 0, 0, 0, 489, 522, ! 505, 524, 448, 490, 0, 0, 0 }; static const short yydefgoto[] = { ! 894, 1, 2, 3, 18, 19, 20, 21, 314, 499, ! 320, 501, 215, 405, 585, 178, 244, 374, 180, 181, ! 182, 183, 22, 184, 185, 359, 358, 356, 593, 357, ! 186, 517, 302, 303, 304, 305, 492, 445, 23, 293, ! 609, 191, 192, 193, 194, 195, 196, 197, 198, 32, ! 33, 34, 35, 36, 37, 38, 39, 40, 41, 479, ! 480, 332, 205, 199, 42, 206, 43, 44, 45, 46, ! 47, 221, 69, 216, 222, 567, 70, 495, 294, 208, ! 49, 284, 285, 286, 50, 565, 663, 587, 588, 589, ! 747, 590, 677, 591, 592, 758, 800, 846, 761, 802, ! 847, 498, 224, 625, 626, 627, 225, 51, 52, 53, ! 54, 336, 338, 343, 233, 55, 681, 427, 228, 229, ! 334, 502, 505, 503, 506, 341, 342, 200, 289, 388, ! 629, 630, 390, 391, 392, 217, 446, 447, 448, 449, ! 450, 451, 306, 278, 596, 770, 774, 379, 380, 381, ! 659, 614, 279, 453, 187, 660, 706, 707, 763, 708, ! 765, 307, 408, 810, 771, 811, 812, 709, 809, 764, ! 861, 766, 850, 879, 892, 852, 833, 616, 617, 695, ! 834, 842, 843, 844, 882, 464, 543, 481, 636, 780, ! 482, 483, 656, 484, 548, 297, 398, 485, 486, 443, ! 188 }; static const short yypact[] = { ! 92, 118, 2854, 2854, 195,-32768,-32768,-32768,-32768,-32768, ! 100, 100, 100, 72,-32768, 104,-32768,-32768,-32768,-32768, ! -32768,-32768, 156, 143, 982, 1751, 1012, 1839, 510, 304, ! 1266, 1162, 1262, 2106, 1556, 2343, 1293, 1755, 1448, 1843, ! -32768,-32768, 64,-32768,-32768,-32768,-32768,-32768, 100,-32768, ! -32768, 119, 130, 141,-32768,-32768, 2854,-32768,-32768,-32768, ! 100, 100, 100, 2644, 162, 2562,-32768, 144, 100, 25, ! -32768, 880,-32768,-32768,-32768, 100,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 100,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 100,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 100,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 100,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 100,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 100, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 100,-32768, ! -32768,-32768,-32768,-32768, 319, 143,-32768,-32768,-32768,-32768, ! -32768, 80,-32768, 155,-32768, 164,-32768,-32768,-32768,-32768, ! -32768,-32768, 2644, 2644, 204, 246, 257,-32768, 557,-32768, ! -32768,-32768, 2644,-32768,-32768, 1353,-32768,-32768, 2644, 254, ! 259,-32768, 2706, 2747,-32768, 3142, 467, 1588, 2644, 1148, ! 267, 1501, 1114, 1635, 2044, 1081, 446, 1126, 675,-32768, ! 289, 220, 376, 282, 398,-32768, 143, 143, 100,-32768, ! 100,-32768, 341, 100, 226, 491, 100,-32768,-32768, 144, ! 100, 128,-32768, 1041, 497, 545, 297, 946, 326, 1178, ! -32768, 345,-32768, 499,-32768,-32768,-32768, 2644, 2644, 2419, ! -32768,-32768, 357,-32768, 360, 367,-32768, 391, 2644, 1353, ! -32768, 1353,-32768, 2644, 2644, 411,-32768,-32768, 2644, 2644, ! 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, 2644, ! -32768,-32768, 557, 557, 2644, 2644, 417,-32768, 476, 427, ! -32768,-32768,-32768,-32768, 324,-32768, 451,-32768,-32768, 380, ! -32768, 545, 292, 143,-32768, 511,-32768,-32768, 144, 521, ! 2192, 444,-32768,-32768, 767, 86,-32768,-32768, 493, 319, ! 319,-32768, 100,-32768, 491, 100, 100,-32768,-32768,-32768, ! 491, 100,-32768,-32768, 1501, 1114, 1635, 2044, 1081, 446, ! 1126, 675,-32768, 533, 463, 1393,-32768, 100,-32768,-32768, ! 506, 474,-32768, 499, 2932, 2958, 480,-32768,-32768, 2434, ! -32768, 3142, 488, 490, 3142, 3142, 2644, 536, 2644, 2644, ! 2668, 2871, 2525, 924, 1145, 547, 547, 531, 531,-32768, ! -32768,-32768,-32768,-32768, 509, 259, 508,-32768, 557, 1686, ! 476,-32768,-32768, 513, 1148, 2788, 144, 100,-32768,-32768, ! -32768,-32768, 564,-32768,-32768,-32768, 303, 527, 1210, 2644, ! 2644, 2233,-32768, 529,-32768,-32768,-32768,-32768, 723,-32768, ! 497, 296, 319,-32768, 583,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 544,-32768, 548, 2644, 557, 554, 474, 2419, ! 2644, 2419,-32768,-32768, 553, 553, 598, 2644, 3171, 2155, ! -32768,-32768,-32768, 358, 444,-32768,-32768, 65, 73, 95, ! 96, 646,-32768, 563,-32768,-32768,-32768,-32768,-32768,-32768, ! 336, 567, 380, 380,-32768, 100,-32768,-32768, 571,-32768, ! -32768, 1536, 2170, 1101, 1045, 2904, 2512, 1521, 1814,-32768, ! -32768,-32768, 575, 393,-32768,-32768, 337, 570, 572,-32768, ! -32768,-32768,-32768, 585, 590, 2066,-32768,-32768, 649,-32768, ! -32768,-32768, 596,-32768,-32768, 602,-32768,-32768, 100, 100, ! 3142,-32768, 100, 593, 603, 2978, 618, 1928,-32768, 3158, ! -32768, 557,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 2303,-32768, 2644,-32768, ! -32768,-32768, 619, 387,-32768,-32768,-32768,-32768, 415, 147, ! -32768,-32768, 539,-32768, 729,-32768,-32768, 90,-32768, 319, ! -32768, 143,-32768,-32768, 3142,-32768,-32768, 2066,-32768, 100, ! 236, 100, 298,-32768,-32768,-32768, 100,-32768, 2644,-32768, ! -32768, 688, 557, 2644,-32768, 701, 3142, 664, 662,-32768, ! -32768, 239, 1435, 2644,-32768, 2372,-32768, 708, 2644, 709, ! 672, 673, 2603, 133, 752,-32768,-32768,-32768, 676,-32768, ! -32768,-32768, 679, 726, 683,-32768,-32768,-32768, 2500, 373, ! -32768,-32768,-32768, 144, 100, 100, 589, 604, 328,-32768, ! -32768, 100, 144, 100, 328,-32768, 100,-32768, 1536, 2170, ! 3095, 3126, 1101, 1045, 1902, 2144, 2904, 2512, 3107, 3138, ! 1521, 1814, 1968, 2474,-32768,-32768,-32768,-32768, 680,-32768, ! -32768, 400, 405, 1928, 90,-32768, 90,-32768, 2644, 247, ! -32768, 2644, 153,-32768, 3000,-32768, 2843, 1928,-32768,-32768, ! 1997,-32768, 2130,-32768,-32768, 3158, 2896,-32768,-32768,-32768, ! -32768, 691, 2644, 694,-32768, 697,-32768,-32768, 319, 143, ! -32768,-32768,-32768,-32768,-32768, 715, 768, 1774, 125,-32768, ! -32768,-32768,-32768, 415, 200,-32768, 100,-32768, 100,-32768, ! -32768, 100, 147, 147,-32768,-32768, 415, 147,-32768,-32768, ! -32768, 698,-32768,-32768,-32768,-32768, 3037, 2644,-32768,-32768, ! 3037, 2644,-32768,-32768, 2644,-32768, 702, 2130,-32768,-32768, ! 2644,-32768,-32768, 705,-32768, 2644, 745, 423,-32768, 379, ! 437,-32768, 258, 727, 730,-32768, 732, 2644, 1862,-32768, ! -32768,-32768,-32768, 2644,-32768, 589, 604, 354,-32768,-32768, ! 387, 100, 328,-32768, 328,-32768,-32768, 236,-32768, 3037, ! -32768, 3037, 2914,-32768,-32768, 3124,-32768, 77, 100,-32768, ! 491,-32768, 491, 2644, 2644, 776, 2500, 713,-32768,-32768, ! -32768,-32768,-32768, 717,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 58, 719,-32768,-32768,-32768, 721, 725, ! -32768,-32768,-32768,-32768, 728,-32768,-32768,-32768,-32768, 733, ! 743, 557, 81, 731,-32768,-32768,-32768,-32768,-32768,-32768, ! 2644,-32768,-32768,-32768, 2644, 724, 58, 736, 58,-32768, ! -32768,-32768, 738,-32768, 742, 804, 126,-32768,-32768, 680, ! 680,-32768,-32768,-32768, 760, 820, 746,-32768,-32768, 2644, ! 2644,-32768, 381,-32768, 750, 755, 756, 830,-32768,-32768, ! -32768,-32768,-32768,-32768, 842, 847,-32768 }; static const short yypgoto[] = { ! -32768,-32768,-32768,-32768, 113,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 102,-32768, -63, 464, -256, 443, ! -32768,-32768,-32768, -105, 990,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, -309,-32768, 546,-32768,-32768, 129, 123, -271, ! -557, 42, 44, 46, 48, 6, 19, 21, 23, -381, ! -369, 301, 306, -365, -314, 317, 320, -532, -451, 447, ! 465,-32768, -121,-32768, -501, -160, 674, 811, 868, 903, ! -32768, -494, -132, -222, 459,-32768, 581,-32768, 294, 4, ! 28,-32768, 494,-32768, 687, 308,-32768, -348,-32768, 197, ! -32768, -522,-32768,-32768, 288,-32768,-32768,-32768,-32768,-32768, ! -32768, -134, 384, 154, 169, -18, 40,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 455, -72,-32768, ! 555,-32768,-32768, 222, 221, 549, 475, -144,-32768,-32768, ! -485, -277, -406, -425,-32768, 397,-32768,-32768,-32768,-32768, ! -32768,-32768, -232,-32768,-32768, -437, 93,-32768,-32768, 520, ! -197,-32768, 300,-32768,-32768, -517,-32768,-32768,-32768,-32768, ! -32768, 414, -372, 98, -684, -259, -80,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -652, 56,-32768, 59,-32768, 456,-32768, -488,-32768,-32768, ! -32768,-32768,-32768,-32768, 422, -313,-32768,-32768,-32768,-32768, ! 50 }; ! ! #define YYLAST 3232 ! ! static const short yytable[] = { ! 179, 315, 190, 415, 610, 413, 48, 48, 28, 28, ! 223, 416, 389, 226, 60, 61, 62, 475, 375, 615, ! 654, 29, 29, 30, 30, 31, 31, 475, 75, 476, ! 84, 245, 93, 477, 102, 612, 111, 541, 120, 476, ! 129, 412, 138, 477, 24, 24, 25, 25, 26, 26, ! 27, 27, 56, 56, 300, 621, 540, 235, 236, 309, ! 48, 711, 28, 71, 635, 661, -441, 241, 840, 48, ! 684, 48, 406, 246, -442, 29, 147, 30, 615, 31, ! 231, 805, 536, 280, 478, 611, 610, -106, 147, 147, ! 147, 658, -1, 299, 478, 346, -443, -444, 24, 613, ! 25, 655, 26, 147, 27, 352, 56, 353, 333, 201, ! 209, 202, 147, 203, 210, 204, 57, 612, -2, 557, ! 455, 147, 148, 149, 823, 836, 772, 841, 856, 375, ! 147, 15, 570, 148, 149, 572, 148, 149, 399, 147, ! 63, 728, 631, 631, 148, 149, 66, 452, 147, 146, ! 66, -421, 9, 151, 153, 155, 595, 147, 613, -422, ! 749, 824, 475, 144, 145, 857, 147, 611, 863, 156, ! 230, 646, 64, 875, 476, 15, -106, 871, 477, 48, ! 606, -423, -424, 647, 15, 227, 542, 650, 523, 526, ! 529, 532, 692, 773, 664, 75, 666, 84, 862, 93, ! 741, 102, 67, 66, 757, 75, 632, 84, 893, 150, ! 876, 68, 376, 311, 333, 633, 214, 312, 48, 534, ! 152, 213, 214, 48, 65, 794, 462, 884, 72, 478, ! 189, 154, 298, 48, 9, 328, 147, 403, 651, 66, ! 218, 783, 785, 48, 433, 232, 291, 292, 329, 832, ! 330, 15, 331, 48, 234, 48, 201, 15, 202, 623, ! 203, 201, 204, 202, 422, 203, 424, 204, 624, 214, ! 240, 324, 237, 325, 610, 326, 315, 327, 15, 335, ! 58, 59, 619, 668, 682, 514, 212, 516, 541, -273, ! 81, 283, 815, 436, 737, 219, 241, 541, 667, 456, ! 670, 66, 48, -273, 220, 612, 582, 540, 583, 6, ! 7, 8, 95, 15, 238, 731, 540, 10, 11, 12, ! 631, 631, 66, 218, 756, 239, 213, 214, 75, 746, ! 84, 212, 93, 396, 102, 340, 487, 488, 247, 48, ! 201, 328, 202, -273, 203, 671, 204, -273, 248, 291, ! 292, 288, 877, 878, 329, 611, 330, 67, 331, 15, ! 213, 214, 207, 787, 316, 214, 68, 524, 527, 530, ! 533, 213, 214, 290, 372, 373, 394, 324, 219, 325, ! 496, 326, 318, 327, 77, 335, 210, 220, 468, -247, ! 48, 5, 6, 7, 8, 9, 213, 214, 470, 475, ! 10, 11, 12, 778, 473, 779, 86, 212, 383, 295, ! -273, 476, 321, 384, 473, 477, 14, 474, 66, 622, ! 537, 553, 718, 214, -273, 538, 554, 474, 201, 662, ! 202, 337, 203, 48, 204, 48, 669, 542, 814, 386, ! 471, 347, 472, 520, 348, 340, 542, 521, 387, 214, ! 471, 349, 472, 8, 95, 418, 419, 712, -81, 10, ! 11, 12, 248, 713, -273, 886, 478, 732, -273, 733, ! 887, -532, 722, 608, 623, 75, 350, 93, 551, 111, ! 442, 129, 552, 624, 214, 729, 283, 869, 870, 312, ! 730, 826, 301, 827, 210, -470, -470, -470, -470, -470, ! 339, 377, 148, 149, -470, -470, -470, 296, 799, 378, ! 308, 382, 312, 280, 310, 6, 7, 8, 90, 385, ! -470, 397, 801, 10, 11, 12, 210, 400, 340, 404, ! 270, 271, 608, 272, 273, 274, 275, 315, 409, 691, ! 48, 15, 28, 5, 6, 7, 8, 9, 420, 473, ! 637, 425, 10, 11, 12, 29, 48, 30, 642, 31, ! 148, 149, 474, 426, 759, 316, 214, 760, 14, 431, ! 15, 643, 434, 644, 435, 645, 522, 525, 24, 531, ! 25, -105, 26, 437, 27, 471, 618, 472, 628, 634, ! 267, 268, 269, 440, 638, -246, 639, 458, 640, 441, ! 641, 396, 547, 547, 265, 266, 267, 268, 269, 414, ! 296, 467, 672, 213, 214, 417, 559, 561, -380, -380, ! 490, 317, 48, 594, 28, 250, 252, 48, 500, 753, ! 508, 423, 465, 214, 509, 721, 48, 29, 607, 30, ! 512, 31, 75, 432, 84, 518, 93, 301, 102, 535, ! 111, 539, 120, 669, 129, 546, 138, 716, 214, 550, ! 24, 555, 25, 556, 26, 201, 27, 202, 618, 203, ! 558, 204, 718, 214, 201, 560, 202, 212, 203, 576, ! 204, 463, 8, 104, 675, 569, 393, 577, 10, 11, ! 12, 571, 797, 410, 411, 776, 777, 607, 73, 78, ! 82, 87, 579, 620, 807, 693, 109, 114, 118, 123, ! 813, 76, 80, 85, 89, 94, 98, 103, 107, 112, ! 116, 121, 125, 130, 134, 139, 143, 5, 6, 7, ! 8, 9, 657, 698, 699, -31, 10, 11, 12, 762, ! 828, 829, 701, 831, 702, 703, 704, 705, 678, 147, ! 679, 680, 14, 291, 292, -32, 687, 688, 689, 544, ! 694, 697, 291, 292, 700, 755, 782, 784, 301, 277, ! 606, -108, -108, -108, -108, -108, 752, 726, 727, 754, ! -108, -108, -108, 767, 786, 768, 473, 831, 793, 466, ! 796, 864, 798, 454, 830, 803, -108, 835, 804, 474, ! 806, 839, 573, 574, 845, 848, 575, 317, 317, 849, ! 48, 854, 28, 851, 874, 865, 831, 885, 853, 491, ! 858, 867, 471, 872, 472, 29, 873, 30, 880, 31, ! 881, 883, 504, 507, 888, 74, 79, 83, 88, 889, ! 891, 890, 895, 110, 115, 119, 124, 896, 24, 461, ! 25, 407, 26, 648, 27, 493, 618, -108, 649, 393, ! 393, 454, 454, 528, 454, 73, 78, 82, 87, 652, ! 673, 497, 653, 494, 395, 665, 287, 748, 459, 683, ! 781, 211, 775, 513, -27, -27, -27, -27, -27, 734, ! 421, 739, 428, -27, -27, -27, 91, 96, 100, 105, ! 457, 511, 549, 837, 127, 132, 136, 141, 212, -27, ! 838, -273, 866, 566, 710, 568, 0, 868, 714, 715, ! 0, 545, 720, 0, 0, -273, 0, 723, 724, 0, ! 725, 92, 97, 101, 106, 0, 0, 0, 0, 128, ! 133, 137, 142, 855, 0, 393, 393, 319, 213, 214, ! -23, -23, -23, -23, -23, 0, 0, 0, 0, -23, ! -23, -23, 0, 738, 0, -273, 742, 0, 0, -273, ! -27, 0, 0, 0, 212, -23, 0, -273, 262, 263, ! 264, 265, 266, 267, 268, 269, 5, 6, 7, 8, ! 72, -273, 0, 0, 0, 10, 11, 12, 73, 78, ! 82, 87, 74, 79, 83, 88, 0, 0, 0, 0, ! 296, 14, 296, 15, 213, 214, 5, 6, 7, 8, ! 81, 696, 0, 717, 719, 10, 11, 12, 0, 0, ! 788, -273, 0, 0, 790, -273, -23, 0, 0, 0, ! 0, 14, 313, 15, 0, -19, -19, -19, -19, -19, ! 6, 7, 8, 95, -19, -19, -19, 0, 10, 11, ! 12, 0, 0, 91, 96, 100, 105, -242, 0, 212, ! -19, 287, -273, 0, 0, 816, 817, 0, 818, 0, ! 0, 735, 0, 819, 507, 820, -273, 0, 8, 90, ! 0, 0, 825, 0, 10, 11, 12, -244, 92, 97, ! 101, 106, 0, 0, 0, 0, 6, 7, 8, 90, ! 393, 393, 15, 0, 10, 11, 12, 0, 5, 393, ! 393, 8, 77, 393, 393, 0, -273, 10, 11, 12, ! -273, -19, 15, 8, 99, 74, 79, 83, 88, 10, ! 11, 12, 0, 14, 0, 73, 78, 0, 0, 109, ! 114, 148, 149, 6, 7, 281, 282, 15, 76, 80, ! 94, 98, 112, 116, 130, 134, 0, 6, 7, 8, ! 104, 0, 717, 719, 719, 10, 11, 12, 0, 322, ! 0, 0, 5, 0, 528, 8, 9, 0, 0, 0, ! 0, 10, 11, 12, 0, 0, 91, 96, 100, 105, ! 263, 264, 265, 266, 267, 268, 269, 14, 0, 15, ! 16, 468, 0, 469, 5, 6, 7, 8, 9, 0, ! 0, 470, 0, 10, 11, 12, 528, 344, 345, 0, ! 0, 92, 97, 101, 106, 0, 0, 0, 351, 14, ! 0, 0, 0, 354, 355, 0, 0, -249, 360, 361, ! 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, ! 859, 860, 0, 323, -372, 0, 5, 6, 7, 8, ! 108, 6, 7, 8, 99, 10, 11, 12, 0, 10, ! 11, 12, 74, 79, 0, 0, 110, 115, 0, 0, ! 0, 14, 0, 15, -532, 0, 0, 15, 6, 7, ! 8, 126, 0, 0, 0, 0, 10, 11, 12, 0, ! 0, 0, 73, 78, 82, 87, 0, 0, 0, 0, ! 109, 114, 118, 123, 15, 76, 80, 85, 89, 94, ! 98, 103, 107, 112, 116, 121, 125, 130, 134, 139, ! 143, 91, 96, 0, 0, 127, 132, -250, 438, 439, ! 0, -248, 0, 0, 242, 0, 157, 5, 0, 0, ! 8, 9, 158, 159, 0, 160, 10, 11, 12, 0, ! 0, 0, 0, 0, 0, 0, 92, 97, -254, 0, ! 128, 133, 14, 161, 15, 16, 0, 162, 163, 164, ! 165, 166, 0, 0, 322, 0, 167, 5, 0, 0, ! 8, 9, 168, 0, 0, 169, 10, 11, 12, 0, ! 170, 171, 172, 0, 0, 510, 173, 174, 0, 0, ! 515, 175, 14, 0, 15, 16, 0, 519, 0, 0, ! 0, 0, 0, 0, 0, 0, 580, 0, 157, 0, ! 176, 177, 0, 243, 158, 159, 0, 160, 0, 74, ! 79, 83, 88, 6, 7, 8, 135, 110, 115, 119, ! 124, 10, 11, 12, 0, 161, 0, 16, 0, 162, ! 163, 164, 165, 166, 0, 0, 0, 0, 167, 15, ! -316, 0, 0, 0, 168, 564, 0, 169, 0, 0, ! 0, 0, 170, 171, 172, 0, 0, 0, 173, 174, ! 0, 0, -316, 175, -316, 5, 0, 586, 8, 72, ! 91, 96, 100, 105, 10, 11, 12, 0, 127, 132, ! 136, 141, 176, 177, 0, 584, 6, 7, 8, 126, ! 14, 0, 15, -256, 10, 11, 12, 0, 0, 0, ! 5, 6, 7, 8, 72, 92, 97, 101, 106, 10, ! 11, 12, 15, 128, 133, 137, 142, 564, 0, 0, ! 5, 6, 7, 8, 117, 14, 0, 15, 674, 10, ! 11, 12, 0, 676, 0, 0, 0, 0, 0, 0, ! 0, 0, 586, 685, 0, 14, 0, 15, 686, 276, ! 0, -446, -446, -446, -446, -446, -446, -446, -446, 0, ! -446, -446, -446, -446, -446, 0, -446, -446, -446, -446, ! -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, ! -446, -446, -446, -446, -446, -446, -446, 0, 0, 0, ! 0, -446, 0, 0, 0, 0, 0, -446, 0, 5, ! -446, -252, 8, 81, 0, -446, -446, -446, 10, 11, ! 12, -446, -446, 586, 0, 0, -446, 0, 736, 0, ! 0, 740, 0, 0, 14, 0, 15, 586, 0, 0, ! 586, 0, 586, -446, 277, -446, -446, 0, -446, 0, ! 0, 0, 0, 0, 0, 0, 0, 444, 0, -470, ! -470, -470, -470, -470, -470, -470, -470, 0, -470, -470, ! -470, -470, -470, 0, -470, -470, -470, -470, -470, -470, ! -470, -470, -470, -470, -470, -470, -470, -470, -470, 0, ! -470, -470, -470, -470, -470, 0, 0, 789, 0, -470, ! 0, 791, 0, 0, 792, -470, 0, 586, -470, 0, ! 795, 0, 0, -470, -470, -470, 0, 0, 0, -470, ! -470, 0, 0, 0, -470, 5, 6, 7, 8, 77, ! 6, 7, 8, 131, 10, 11, 12, 0, 10, 11, ! 12, -470, 0, -470, -470, 769, -470, -448, -448, 0, ! 14, 0, 0, -448, -448, 0, -448, 0, 0, 0, ! -448, 0, -448, -448, -448, -448, -448, -448, -448, -448, ! -448, -448, -448, 0, -448, 0, -448, 0, -448, -448, ! -448, -448, -448, 0, 0, 0, 0, -448, 0, 6, ! 7, 8, 131, -448, 0, 0, -448, 10, 11, 12, ! 0, -448, -448, -448, 0, 0, -243, -448, -448, 0, ! -255, 0, -448, 5, 6, 7, 8, 86, 6, 7, ! 8, 140, 10, 11, 12, 0, 10, 11, 12, -448, ! 0, -448, -448, 808, -448, -477, -477, 0, 14, 0, ! 0, -477, -477, 0, -477, 0, 0, 0, -477, 0, ! -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, ! -477, 0, -477, 0, -477, 0, -477, -477, -477, -477, ! -477, 0, 0, 0, 0, -477, 0, 6, 7, 8, ! 99, -477, 0, 0, -477, 10, 11, 12, 0, -477, ! -477, -477, 0, 0, -245, -477, -477, 0, -257, 580, ! -477, 581, 149, 15, 0, 0, 0, 158, 159, 0, ! 160, 0, 0, 0, 0, 0, 0, -477, 0, -477, ! -477, 0, -477, 0, 0, 0, 0, 0, 161, 0, ! 16, 0, 162, 163, 164, 165, 166, 0, 0, 0, ! 0, 167, 0, 6, 7, 8, 135, 168, 0, 0, ! 169, 10, 11, 12, 0, 170, 171, 172, 0, 0, ! 0, 173, 174, 0, 0, 582, 175, 583, 580, 15, ! 581, 149, 0, 0, 0, 0, 158, 159, 0, 160, ! 0, 0, 0, 0, -303, 176, 177, 0, 584, 0, ! 0, 0, 0, 0, 0, 0, 0, 161, 0, 16, ! 0, 162, 163, 164, 165, 166, 0, 0, 0, 0, ! 167, 0, 0, 0, 0, 0, 168, 0, 5, 169, ! 0, 8, 86, 0, 170, 171, 172, 10, 11, 12, ! 173, 174, 0, 0, 582, 175, 583, 562, 0, 157, ! 0, 0, 0, 14, 0, 158, 159, 0, 160, 0, ! 0, 0, 0, -369, 176, 177, 0, 584, 0, 0, ! 0, 0, 0, 0, 0, 0, 161, 0, 16, 0, ! 162, 163, 164, 165, 166, 0, 0, 0, 0, 167, ! 5, 6, 7, 8, 113, 168, 0, 0, 169, 10, ! 11, 12, 0, 170, 171, 172, 0, 0, 0, 173, ! 174, 580, 0, 157, 175, 14, 0, 0, 0, 158, ! 159, 0, 160, 0, 0, 0, 0, 0, 0, 6, ! 7, 8, 104, 176, 177, 0, 563, 10, 11, 12, ! 161, 0, 16, 0, 162, 163, 164, 165, 166, 0, ! 0, 0, 0, 167, 5, 6, 7, 8, 77, 168, ! 0, 0, 169, 10, 11, 12, 0, 170, 171, 172, ! 0, -251, 0, 173, 174, 157, 0, 0, 175, 14, ! 0, 158, 159, 0, 160, 258, 259, 260, 261, 262, ! 263, 264, 265, 266, 267, 268, 269, 176, 177, 0, ! 584, 0, 161, 0, 16, 0, 162, 163, 164, 165, ! 166, 0, 0, 0, 0, 167, 157, 0, 0, 0, ! 0, 168, 158, 159, 169, 160, 0, 0, 0, 170, ! 171, 401, 0, 0, 0, 173, 174, 0, 0, 0, ! 175, 0, 0, 161, 0, 16, 0, 162, 163, 164, ! 165, 166, 0, 0, 0, 0, 167, 0, 0, 176, ! 177, 0, 168, 402, 0, 169, 0, 0, 0, 0, ! 170, 171, 172, 0, 0, 0, 173, 174, 0, 0, ! 0, 175, 0, 0, 0, 0, 581, 597, 6, 7, ! 8, 9, 158, 159, 0, 160, 10, 11, 12, 0, ! 176, 177, 0, 0, 489, 598, 599, 600, 601, 602, ! 603, 604, 14, 161, 15, 16, 0, 162, 163, 164, ! 165, 166, 0, 0, 0, 0, 167, 5, 6, 7, ! 8, 122, 168, 0, 0, 169, 10, 11, 12, 0, ! 170, 171, 172, 0, 0, 0, 173, 174, 0, 0, ! 0, 175, 14, 0, 0, 581, 149, 0, 0, 0, ! 0, 158, 159, 0, 160, 0, 0, 0, 605, 0, ! 176, 177, 0, 606, 598, 599, 600, 601, 602, 603, ! 604, 0, 161, 0, 16, 0, 162, 163, 164, 165, ! 166, 0, 0, 0, 0, 167, 0, 0, 0, 0, ! 0, 168, 0, 5, 169, 0, 8, 9, -253, 170, ! 171, 172, 10, 11, 12, 173, 174, 157, 0, 0, ! 175, 0, 0, 158, 159, 0, 160, 0, 14, 0, ! 15, 0, 0, 0, 0, 0, 0, 605, 0, 176, ! 177, 0, 606, 0, 161, 0, 16, 0, 162, 163, ! 164, 165, 166, 0, 0, 0, 0, 167, 0, 6, ! 7, 8, 140, 168, 0, 0, 169, 10, 11, 12, ! 0, 170, 171, 172, 0, 0, 0, 173, 174, 0, ! 0, 0, 175, 157, 5, 6, 7, 8, 9, 158, ! 159, 0, 160, 10, 11, 12, 5, 6, 7, 8, ! 113, 176, 177, 0, 432, 10, 11, 12, 0, 14, ! 161, 15, 16, 0, 162, 163, 164, 165, 166, 0, ! 0, 14, 0, 167, 0, 0, 0, 0, 0, 168, ! 0, 0, 169, 0, 0, 0, 0, 170, 171, 172, ! 0, 0, 0, 173, 174, 157, 5, 0, 175, 8, ! 9, 158, 159, 0, 160, 10, 11, 12, 261, 262, ! 263, 264, 265, 266, 267, 268, 269, 176, 177, 0, ! 0, 14, 161, 15, 16, 0, 162, 163, 164, 165, ! 166, 0, 0, 0, 0, 167, 157, 0, 0, 0, ! 0, 168, 158, 159, 169, 160, 0, 0, 0, 170, ! 171, 172, 0, 0, 0, 173, 174, 0, 0, 0, ! 175, 0, 0, 161, 0, 16, 0, 162, 163, 164, ! 165, 166, 0, 0, 0, 0, 167, 157, 0, 176, ! 177, 0, 168, 158, 159, 169, 160, 0, 0, 0, ! 170, 171, 172, 0, 0, 0, 173, 174, 0, 0, ! 0, 175, 0, 0, 161, 0, 16, 0, 162, 163, ! 164, 165, 166, 0, 0, 0, 0, 167, 690, 0, ! 176, 177, 0, 168, 0, 0, 169, 0, 0, 0, ! 0, 170, 171, 172, 0, 0, 0, 173, 174, 157, ! 0, 0, 175, 0, 0, 158, 159, 0, 160, 259, ! 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, ! 0, 176, 177, 0, 0, 0, 161, 0, 16, 0, ! 162, 163, 164, 165, 166, 0, 0, 0, 0, 167, ! 157, 0, 0, 0, 0, 168, 158, 159, 169, 160, ! 0, 0, 0, 170, 171, 172, 0, 0, 0, 173, ! 174, 0, 0, 0, 249, 0, 0, 161, 0, 16, ! 0, 162, 163, 164, 165, 166, 0, 0, 0, 0, ! 167, 460, 0, 176, 177, 0, 168, 158, 159, 169, ! 160, 0, 0, 0, 170, 171, 172, 0, 0, 0, ! 173, 174, 0, 0, 0, 251, 0, 0, 161, 0, ! 16, 0, 162, 163, 164, 165, 166, 0, 0, 0, ! 0, 167, 0, 0, 176, 177, 0, 168, 0, 0, ! 169, 0, 0, 0, 0, 170, 171, 172, 0, 0, ! 0, 173, 174, 0, 744, 4, 175, -117, 5, 6, ! 7, 8, 9, 0, 0, 0, 0, 10, 11, 12, ! 0, 0, 0, 0, 0, 176, 177, 0, 0, 0, ! 0, 0, 13, 14, 0, 15, 16, 253, 254, 255, ! 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 0, 0, 750, 5, 6, ! 7, 8, 108, -117, 0, 0, 0, 10, 11, 12, ! 0, 0, -117, 260, 261, 262, 263, 264, 265, 266, ! 267, 268, 269, 14, 745, 15, 0, 0, 0, 17, ! 253, 254, 255, 751, 256, 257, 258, 259, 260, 261, ! 262, 263, 264, 265, 266, 267, 268, 269, 253, 254, ! 255, 0, 256, 257, 258, 259, 260, 261, 262, 263, ! 264, 265, 266, 267, 268, 269, 253, 254, 255, 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, ! 266, 267, 268, 269, 0, 0, 0, 0, 0, 0, ! 0, 0, 253, 254, 255, 821, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, ! 0, 429, 253, 254, 255, 0, 256, 257, 258, 259, ! 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, ! 0, 0, 0, 0, 253, 254, 255, 430, 256, 257, ! 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, ! 268, 269, 0, 0, 0, 0, 0, 578, 15, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 253, 254, 255, 743, 256, 257, 258, 259, 260, ! 261, 262, 263, 264, 265, 266, 267, 268, 269, 5, ! 6, 7, 8, 81, 0, 0, 0, 0, 10, 11, ! 12, 5, 6, 7, 8, 117, 0, 0, 0, 0, ! 10, 11, 12, 0, 14, 0, 15, 0, 0, 0, ! 5, 6, 7, 8, 86, 0, 14, 0, 15, 10, ! 11, 12, 5, 6, 7, 8, 122, 0, 0, 0, ! 0, 10, 11, 12, 0, 14, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 14, 253, 254, ! 255, 822, 256, 257, 258, 259, 260, 261, 262, 263, ! 264, 265, 266, 267, 268, 269, 253, 254, 255, 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, ! 266, 267, 268, 269, 255, 0, 256, 257, 258, 259, ! 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, ! 267, 268, 269 }; static const short yycheck[] = { ! 63, 223, 65, 316, 536, 314, 2, 3, 2, 3, ! 144, 320, 289, 145, 10, 11, 12, 398, 274, 536, ! 552, 2, 3, 2, 3, 2, 3, 408, 24, 398, ! 26, 175, 28, 398, 30, 536, 32, 462, 34, 408, ! 36, 312, 38, 408, 2, 3, 2, 3, 2, 3, ! 2, 3, 2, 3, 214, 543, 462, 162, 163, 219, ! 56, 618, 56, 23, 549, 559, 1, 172, 10, 65, ! 592, 67, 304, 178, 1, 56, 48, 56, 595, 56, ! 152, 765, 454, 188, 398, 536, 618, 1, 60, 61, ! 62, 1, 0, 214, 408, 239, 1, 1, 56, 536, ! 56, 552, 56, 75, 56, 249, 56, 251, 229, 67, ! 85, 67, 84, 67, 89, 67, 3, 618, 0, 491, ! 379, 93, 3, 4, 47, 809, 1, 69, 47, 385, ! 102, 31, 504, 3, 4, 507, 3, 4, 298, 111, ! 68, 658, 548, 549, 3, 4, 3, 379, 120, 85, ! 3, 86, 8, 51, 52, 53, 528, 129, 595, 86, ! 682, 84, 543, 40, 41, 84, 138, 618, 852, 56, ! 90, 552, 68, 47, 543, 31, 90, 861, 543, 175, ! 90, 86, 86, 552, 31, 145, 463, 552, 447, 448, ! 449, 450, 59, 68, 566, 191, 568, 193, 850, 195, ! 47, 197, 59, 3, 698, 201, 59, 203, 892, 90, ! 84, 68, 275, 85, 335, 68, 69, 89, 214, 451, ! 90, 68, 69, 219, 68, 747, 386, 879, 8, 543, ! 68, 90, 6, 229, 8, 229, 208, 300, 552, 3, ! 4, 726, 727, 239, 349, 90, 206, 207, 229, 806, ! 229, 31, 229, 249, 90, 251, 214, 31, 214, 59, ! 214, 219, 214, 219, 336, 219, 338, 219, 68, 69, ! 168, 229, 68, 229, 806, 229, 498, 229, 31, 229, ! 85, 86, 538, 47, 45, 429, 28, 431, 713, 31, ! 8, 189, 780, 356, 47, 59, 401, 722, 569, 379, ! 571, 3, 298, 45, 68, 806, 67, 713, 69, 5, ! 6, 7, 8, 31, 68, 663, 722, 13, 14, 15, ! 726, 727, 3, 4, 696, 68, 68, 69, 324, 677, ! 326, 28, 328, 293, 330, 233, 399, 400, 84, 335, ! 298, 335, 298, 85, 298, 47, 298, 89, 89, 309, ! 310, 84, 869, 870, 335, 806, 335, 59, 335, 31, ! 68, 69, 68, 735, 68, 69, 68, 447, 448, 449, ! 450, 68, 69, 84, 272, 273, 84, 335, 59, 335, ! 84, 335, 85, 335, 8, 335, 89, 68, 1, 85, ! 386, 4, 5, 6, 7, 8, 68, 69, 11, 780, ! 13, 14, 15, 716, 398, 718, 8, 28, 84, 68, ! 31, 780, 86, 89, 408, 780, 29, 398, 3, 4, ! 84, 84, 68, 69, 45, 89, 89, 408, 386, 561, ! 386, 86, 386, 429, 386, 431, 570, 714, 84, 59, ! 398, 84, 398, 85, 84, 343, 723, 89, 68, 69, ! 408, 84, 408, 7, 8, 332, 333, 84, 47, 13, ! 14, 15, 89, 623, 85, 84, 780, 664, 89, 666, ! 89, 84, 632, 536, 59, 471, 85, 473, 85, 475, ! 378, 477, 89, 68, 69, 85, 384, 859, 860, 89, ! 85, 800, 1, 802, 89, 4, 5, 6, 7, 8, ! 1, 84, 3, 4, 13, 14, 15, 213, 85, 33, ! 216, 84, 89, 618, 220, 5, 6, 7, 8, 68, ! 29, 10, 85, 13, 14, 15, 89, 6, 426, 85, ! 63, 64, 595, 66, 67, 68, 69, 759, 45, 602, ! 536, 31, 536, 4, 5, 6, 7, 8, 85, 543, ! 11, 45, 13, 14, 15, 536, 552, 536, 552, 536, ! 3, 4, 543, 89, 698, 68, 69, 699, 29, 89, ! 31, 552, 84, 552, 84, 552, 447, 448, 536, 450, ! 536, 90, 536, 47, 536, 543, 536, 543, 548, 549, ! 59, 60, 61, 84, 552, 85, 552, 84, 552, 91, ! 552, 561, 479, 480, 57, 58, 59, 60, 61, 315, ! 316, 84, 572, 68, 69, 321, 493, 494, 85, 86, ! 91, 224, 618, 521, 618, 182, 183, 623, 45, 692, ! 86, 337, 68, 69, 86, 631, 632, 618, 536, 618, ! 86, 618, 638, 90, 640, 47, 642, 1, 644, 86, ! 646, 84, 648, 787, 650, 84, 652, 68, 69, 84, ! 618, 91, 618, 91, 618, 623, 618, 623, 618, 623, ! 85, 623, 68, 69, 632, 85, 632, 28, 632, 86, ! 632, 387, 7, 8, 582, 89, 289, 84, 13, 14, ! 15, 89, 755, 309, 310, 713, 714, 595, 24, 25, ! 26, 27, 84, 84, 767, 603, 32, 33, 34, 35, ! 773, 24, 25, 26, 27, 28, 29, 30, 31, 32, ! 33, 34, 35, 36, 37, 38, 39, 4, 5, 6, ! 7, 8, 3, 610, 611, 47, 13, 14, 15, 699, ! 803, 804, 16, 806, 18, 19, 20, 21, 47, 721, ! 86, 89, 29, 713, 714, 47, 47, 85, 85, 465, ! 8, 85, 722, 723, 85, 68, 726, 727, 1, 86, ! 90, 4, 5, 6, 7, 8, 85, 654, 655, 85, ! 13, 14, 15, 68, 86, 17, 780, 850, 86, 392, ! 85, 854, 47, 379, 18, 68, 29, 84, 68, 780, ! 68, 84, 508, 509, 85, 84, 512, 410, 411, 84, ! 806, 68, 806, 85, 10, 91, 879, 880, 85, 405, ! 89, 85, 780, 85, 780, 806, 84, 806, 68, 806, ! 10, 85, 418, 419, 84, 24, 25, 26, 27, 84, ! 10, 85, 0, 32, 33, 34, 35, 0, 806, 385, ! 806, 305, 806, 552, 806, 408, 806, 90, 552, 462, ! 463, 447, 448, 449, 450, 191, 192, 193, 194, 552, ! 576, 412, 552, 408, 293, 567, 189, 680, 384, 591, ! 726, 1, 713, 428, 4, 5, 6, 7, 8, 667, ! 335, 670, 343, 13, 14, 15, 28, 29, 30, 31, ! 380, 426, 480, 810, 36, 37, 38, 39, 28, 29, ! 812, 31, 856, 499, 614, 501, -1, 858, 624, 625, ! -1, 465, 628, -1, -1, 45, -1, 633, 634, -1, ! 636, 28, 29, 30, 31, -1, -1, -1, -1, 36, ! 37, 38, 39, 841, -1, 548, 549, 1, 68, 69, ! 4, 5, 6, 7, 8, -1, -1, -1, -1, 13, ! 14, 15, -1, 669, -1, 85, 672, -1, -1, 89, ! 90, -1, -1, -1, 28, 29, -1, 31, 54, 55, ! 56, 57, 58, 59, 60, 61, 4, 5, 6, 7, ! 8, 45, -1, -1, -1, 13, 14, 15, 324, 325, ! 326, 327, 191, 192, 193, 194, -1, -1, -1, -1, ! 716, 29, 718, 31, 68, 69, 4, 5, 6, 7, ! 8, 607, -1, 626, 627, 13, 14, 15, -1, -1, ! 736, 85, -1, -1, 740, 89, 90, -1, -1, -1, ! -1, 29, 1, 31, -1, 4, 5, 6, 7, 8, ! 5, 6, 7, 8, 13, 14, 15, -1, 13, 14, ! 15, -1, -1, 195, 196, 197, 198, 85, -1, 28, ! 29, 384, 31, -1, -1, 781, 782, -1, 784, -1, ! -1, 667, -1, 789, 670, 791, 45, -1, 7, 8, ! -1, -1, 798, -1, 13, 14, 15, 85, 195, 196, ! 197, 198, -1, -1, -1, -1, 5, 6, 7, 8, ! 713, 714, 31, -1, 13, 14, 15, -1, 4, 722, ! 723, 7, 8, 726, 727, -1, 85, 13, 14, 15, ! 89, 90, 31, 7, 8, 324, 325, 326, 327, 13, ! 14, 15, -1, 29, -1, 471, 472, -1, -1, 475, ! 476, 3, 4, 5, 6, 7, 8, 31, 471, 472, ! 473, 474, 475, 476, 477, 478, -1, 5, 6, 7, ! 8, -1, 775, 776, 777, 13, 14, 15, -1, 1, ! -1, -1, 4, -1, 770, 7, 8, -1, -1, -1, ! -1, 13, 14, 15, -1, -1, 328, 329, 330, 331, ! 55, 56, 57, 58, 59, 60, 61, 29, -1, 31, ! 32, 1, -1, 3, 4, 5, 6, 7, 8, -1, ! -1, 11, -1, 13, 14, 15, 812, 237, 238, -1, ! -1, 328, 329, 330, 331, -1, -1, -1, 248, 29, ! -1, -1, -1, 253, 254, -1, -1, 85, 258, 259, ! 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, ! 846, 847, -1, 85, 86, -1, 4, 5, 6, 7, ! 8, 5, 6, 7, 8, 13, 14, 15, -1, 13, ! 14, 15, 471, 472, -1, -1, 475, 476, -1, -1, ! -1, 29, -1, 31, 84, -1, -1, 31, 5, 6, ! 7, 8, -1, -1, -1, -1, 13, 14, 15, -1, ! -1, -1, 638, 639, 640, 641, -1, -1, -1, -1, ! 646, 647, 648, 649, 31, 638, 639, 640, 641, 642, ! 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, ! 653, 473, 474, -1, -1, 477, 478, 85, 358, 359, ! -1, 85, -1, -1, 1, -1, 3, 4, -1, -1, ! 7, 8, 9, 10, -1, 12, 13, 14, 15, -1, ! -1, -1, -1, -1, -1, -1, 473, 474, 85, -1, ! 477, 478, 29, 30, 31, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, 1, -1, 43, 4, -1, -1, ! 7, 8, 49, -1, -1, 52, 13, 14, 15, -1, ! 57, 58, 59, -1, -1, 425, 63, 64, -1, -1, ! 430, 68, 29, -1, 31, 32, -1, 437, -1, -1, ! -1, -1, -1, -1, -1, -1, 1, -1, 3, -1, ! 87, 88, -1, 90, 9, 10, -1, 12, -1, 638, ! 639, 640, 641, 5, 6, 7, 8, 646, 647, 648, ! 649, 13, 14, 15, -1, 30, -1, 32, -1, 34, ! 35, 36, 37, 38, -1, -1, -1, -1, 43, 31, ! 45, -1, -1, -1, 49, 495, -1, 52, -1, -1, ! -1, -1, 57, 58, 59, -1, -1, -1, 63, 64, ! -1, -1, 67, 68, 69, 4, -1, 517, 7, 8, ! 642, 643, 644, 645, 13, 14, 15, -1, 650, 651, ! 652, 653, 87, 88, -1, 90, 5, 6, 7, 8, ! 29, -1, 31, 85, 13, 14, 15, -1, -1, -1, ! 4, 5, 6, 7, 8, 642, 643, 644, 645, 13, ! 14, 15, 31, 650, 651, 652, 653, 567, -1, -1, ! 4, 5, 6, 7, 8, 29, -1, 31, 578, 13, ! 14, 15, -1, 583, -1, -1, -1, -1, -1, -1, ! -1, -1, 592, 593, -1, 29, -1, 31, 598, 1, ! -1, 3, 4, 5, 6, 7, 8, 9, 10, -1, ! 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, ! 32, 33, 34, 35, 36, 37, 38, -1, -1, -1, ! -1, 43, -1, -1, -1, -1, -1, 49, -1, 4, ! 52, 85, 7, 8, -1, 57, 58, 59, 13, 14, ! 15, 63, 64, 663, -1, -1, 68, -1, 668, -1, ! -1, 671, -1, -1, 29, -1, 31, 677, -1, -1, ! 680, -1, 682, 85, 86, 87, 88, -1, 90, -1, ! -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, ! 4, 5, 6, 7, 8, 9, 10, -1, 12, 13, ! 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, ! 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, ! 34, 35, 36, 37, 38, -1, -1, 737, -1, 43, ! -1, 741, -1, -1, 744, 49, -1, 747, 52, -1, ! 750, -1, -1, 57, 58, 59, -1, -1, -1, 63, ! 64, -1, -1, -1, 68, 4, 5, 6, 7, 8, ! 5, 6, 7, 8, 13, 14, 15, -1, 13, 14, ! 15, 85, -1, 87, 88, 1, 90, 3, 4, -1, ! 29, -1, -1, 9, 10, -1, 12, -1, -1, -1, ! 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, -1, 30, -1, 32, -1, 34, 35, ! 36, 37, 38, -1, -1, -1, -1, 43, -1, 5, ! 6, 7, 8, 49, -1, -1, 52, 13, 14, 15, ! -1, 57, 58, 59, -1, -1, 85, 63, 64, -1, ! 85, -1, 68, 4, 5, 6, 7, 8, 5, 6, ! 7, 8, 13, 14, 15, -1, 13, 14, 15, 85, ! -1, 87, 88, 1, 90, 3, 4, -1, 29, -1, ! -1, 9, 10, -1, 12, -1, -1, -1, 16, -1, ! 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, 5, 6, 7, ! 8, 49, -1, -1, 52, 13, 14, 15, -1, 57, ! 58, 59, -1, -1, 85, 63, 64, -1, 85, 1, ! 68, 3, 4, 31, -1, -1, -1, 9, 10, -1, ! 12, -1, -1, -1, -1, -1, -1, 85, -1, 87, ! 88, -1, 90, -1, -1, -1, -1, -1, 30, -1, ! 32, -1, 34, 35, 36, 37, 38, -1, -1, -1, ! -1, 43, -1, 5, 6, 7, 8, 49, -1, -1, ! 52, 13, 14, 15, -1, 57, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, 67, 68, 69, 1, 31, ! 3, 4, -1, -1, -1, -1, 9, 10, -1, 12, ! -1, -1, -1, -1, 86, 87, 88, -1, 90, -1, ! -1, -1, -1, -1, -1, -1, -1, 30, -1, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, -1, ! 43, -1, -1, -1, -1, -1, 49, -1, 4, 52, ! -1, 7, 8, -1, 57, 58, 59, 13, 14, 15, ! 63, 64, -1, -1, 67, 68, 69, 1, -1, 3, ! -1, -1, -1, 29, -1, 9, 10, -1, 12, -1, ! -1, -1, -1, 86, 87, 88, -1, 90, -1, -1, ! -1, -1, -1, -1, -1, -1, 30, -1, 32, -1, ! 34, 35, 36, 37, 38, -1, -1, -1, -1, 43, ! 4, 5, 6, 7, 8, 49, -1, -1, 52, 13, ! 14, 15, -1, 57, 58, 59, -1, -1, -1, 63, ! 64, 1, -1, 3, 68, 29, -1, -1, -1, 9, ! 10, -1, 12, -1, -1, -1, -1, -1, -1, 5, ! 6, 7, 8, 87, 88, -1, 90, 13, 14, 15, ! 30, -1, 32, -1, 34, 35, 36, 37, 38, -1, ! -1, -1, -1, 43, 4, 5, 6, 7, 8, 49, ! -1, -1, 52, 13, 14, 15, -1, 57, 58, 59, ! -1, 85, -1, 63, 64, 3, -1, -1, 68, 29, ! -1, 9, 10, -1, 12, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 61, 87, 88, -1, ! 90, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, 3, -1, -1, -1, ! -1, 49, 9, 10, 52, 12, -1, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, -1, ! 68, -1, -1, 30, -1, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, -1, -1, 43, -1, -1, 87, ! 88, -1, 49, 91, -1, 52, -1, -1, -1, -1, ! 57, 58, 59, -1, -1, -1, 63, 64, -1, -1, ! -1, 68, -1, -1, -1, -1, 3, 4, 5, 6, ! 7, 8, 9, 10, -1, 12, 13, 14, 15, -1, ! 87, 88, -1, -1, 91, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, -1, -1, 43, 4, 5, 6, ! 7, 8, 49, -1, -1, 52, 13, 14, 15, -1, ! 57, 58, 59, -1, -1, -1, 63, 64, -1, -1, ! -1, 68, 29, -1, -1, 3, 4, -1, -1, -1, ! -1, 9, 10, -1, 12, -1, -1, -1, 85, -1, ! 87, 88, -1, 90, 22, 23, 24, 25, 26, 27, ! 28, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, -1, -1, -1, ! -1, 49, -1, 4, 52, -1, 7, 8, 85, 57, ! 58, 59, 13, 14, 15, 63, 64, 3, -1, -1, ! 68, -1, -1, 9, 10, -1, 12, -1, 29, -1, ! 31, -1, -1, -1, -1, -1, -1, 85, -1, 87, ! 88, -1, 90, -1, 30, -1, 32, -1, 34, 35, ! 36, 37, 38, -1, -1, -1, -1, 43, -1, 5, ! 6, 7, 8, 49, -1, -1, 52, 13, 14, 15, ! -1, 57, 58, 59, -1, -1, -1, 63, 64, -1, ! -1, -1, 68, 3, 4, 5, 6, 7, 8, 9, ! 10, -1, 12, 13, 14, 15, 4, 5, 6, 7, ! 8, 87, 88, -1, 90, 13, 14, 15, -1, 29, ! 30, 31, 32, -1, 34, 35, 36, 37, 38, -1, ! -1, 29, -1, 43, -1, -1, -1, -1, -1, 49, ! -1, -1, 52, -1, -1, -1, -1, 57, 58, 59, ! -1, -1, -1, 63, 64, 3, 4, -1, 68, 7, ! 8, 9, 10, -1, 12, 13, 14, 15, 53, 54, ! 55, 56, 57, 58, 59, 60, 61, 87, 88, -1, ! -1, 29, 30, 31, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, 3, -1, -1, -1, ! -1, 49, 9, 10, 52, 12, -1, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, -1, ! 68, -1, -1, 30, -1, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, -1, -1, 43, 3, -1, 87, ! 88, -1, 49, 9, 10, 52, 12, -1, -1, -1, ! 57, 58, 59, -1, -1, -1, 63, 64, -1, -1, ! -1, 68, -1, -1, 30, -1, 32, -1, 34, 35, ! 36, 37, 38, -1, -1, -1, -1, 43, 85, -1, ! 87, 88, -1, 49, -1, -1, 52, -1, -1, -1, ! -1, 57, 58, 59, -1, -1, -1, 63, 64, 3, ! -1, -1, 68, -1, -1, 9, 10, -1, 12, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ! -1, 87, 88, -1, -1, -1, 30, -1, 32, -1, ! 34, 35, 36, 37, 38, -1, -1, -1, -1, 43, ! 3, -1, -1, -1, -1, 49, 9, 10, 52, 12, ! -1, -1, -1, 57, 58, 59, -1, -1, -1, 63, ! 64, -1, -1, -1, 68, -1, -1, 30, -1, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, -1, ! 43, 3, -1, 87, 88, -1, 49, 9, 10, 52, ! 12, -1, -1, -1, 57, 58, 59, -1, -1, -1, ! 63, 64, -1, -1, -1, 68, -1, -1, 30, -1, ! 32, -1, 34, 35, 36, 37, 38, -1, -1, -1, ! -1, 43, -1, -1, 87, 88, -1, 49, -1, -1, ! 52, -1, -1, -1, -1, 57, 58, 59, -1, -1, ! -1, 63, 64, -1, 11, 1, 68, 3, 4, 5, ! 6, 7, 8, -1, -1, -1, -1, 13, 14, 15, ! -1, -1, -1, -1, -1, 87, 88, -1, -1, -1, ! -1, -1, 28, 29, -1, 31, 32, 44, 45, 46, ! -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 57, 58, 59, 60, 61, -1, -1, 11, 4, 5, ! 6, 7, 8, 59, -1, -1, -1, 13, 14, 15, ! -1, -1, 68, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, 61, 29, 91, 31, -1, -1, -1, 85, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, 60, 61, 44, 45, ! 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, 44, 45, 46, -1, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, ! -1, -1, 44, 45, 46, 91, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ! -1, 89, 44, 45, 46, -1, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ! -1, -1, -1, -1, 44, 45, 46, 89, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, 61, -1, -1, -1, -1, -1, 89, 31, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 44, 45, 46, 84, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, 60, 61, 4, ! 5, 6, 7, 8, -1, -1, -1, -1, 13, 14, ! 15, 4, 5, 6, 7, 8, -1, -1, -1, -1, ! 13, 14, 15, -1, 29, -1, 31, -1, -1, -1, ! 4, 5, 6, 7, 8, -1, 29, -1, 31, 13, ! 14, 15, 4, 5, 6, 7, 8, -1, -1, -1, ! -1, 13, 14, 15, -1, 29, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 29, 44, 45, ! 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, 44, 45, 46, -1, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 61, 46, -1, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ! 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, 61 }; + /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ + #line 3 "/usr/share/bison/bison.simple" ! /* Skeleton output parser for bison, ! ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software ! Foundation, Inc. ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* This is the parser code that is written into each bison parser when ! the %semantic_parser declaration is not specified in the grammar. ! It was written by Richard Stallman by simplifying the hairy parser ! used when %semantic_parser is specified. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc { ! short yyss; ! YYSTYPE yyvs; ! # if YYLSP_NEEDED ! YYLTYPE yyls; ! # endif }; + /* The size of the maximum gap between one aligned stack and the next. */ + # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) + + /* The size of an array large to enough to hold all stacks, each with + N elements. */ + # if YYLSP_NEEDED + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAX) + # else + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAX) + # endif + + /* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if 1 < __GNUC__ + # define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) + # else + # define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) + # endif + # endif + + /* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ + # define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + + #endif + + #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif *************** static const unsigned short yystos[] = *** 2024,2057 **** #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY (-2) #define YYEOF 0 - #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 - /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ - #define YYFAIL goto yyerrlab - #define YYRECOVERING() (!!yyerrstatus) - #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) --- 1833,1861 ---- #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) *************** while (0) *** 2059,2082 **** #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.first_line = Rhs[1].first_line; \ ! Current.first_column = Rhs[1].first_column; \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ ! #ifdef YYLEX_PARAM ! # define YYLEX yylex (YYLEX_PARAM) ! #else ! # define YYLEX yylex () ! #endif /* Enable debugging if requested. */ #if YYDEBUG --- 1863,1903 ---- #define YYTERROR 1 #define YYERRCODE 256 + /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). ! ! When YYLLOC_DEFAULT is run, CURRENT is set the location of the ! first token. By default, to implement support for ranges, extend ! its range to the last symbol. */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif + /* YYLEX -- calling `yylex' with the right arguments. */ ! #if YYPURE ! # if YYLSP_NEEDED ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval, &yylloc) ! # endif ! # else /* !YYLSP_NEEDED */ ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval) ! # endif ! # endif /* !YYLSP_NEEDED */ ! #else /* !YYPURE */ ! # define YYLEX yylex () ! #endif /* !YYPURE */ ! /* Enable debugging if requested. */ #if YYDEBUG *************** do { \ *** 2091,2183 **** if (yydebug) \ YYFPRINTF Args; \ } while (0) - - # define YYDSYMPRINT(Args) \ - do { \ - if (yydebug) \ - yysymprint Args; \ - } while (0) - - # define YYDSYMPRINTF(Title, Token, Value, Location) \ - do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ - } while (0) - - /*------------------------------------------------------------------. - | yy_stack_print -- Print the state stack from its BOTTOM up to its | - | TOP (cinluded). | - `------------------------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_stack_print (short *bottom, short *top) - #else - static void - yy_stack_print (bottom, top) - short *bottom; - short *top; - #endif - { - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); - } - - # define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ - } while (0) - - - /*------------------------------------------------. - | Report that the YYRULE is going to be reduced. | - `------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_reduce_print (int yyrule) - #else - static void - yy_reduce_print (yyrule) - int yyrule; - #endif - { - int yyi; - unsigned int yylineno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); - } - - # define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ - } while (0) - /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) - # define YYDSYMPRINT(Args) - # define YYDSYMPRINTF(Title, Token, Value, Location) - # define YY_STACK_PRINT(Bottom, Top) - # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 --- 1912,1924 ---- *************** int yydebug; *** 2197,2206 **** #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif - ! ! #if YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) --- 1938,1945 ---- #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif ! #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) *************** yystpcpy (yydest, yysrc) *** 2250,2383 **** } # endif # endif - - #endif /* !YYERROR_VERBOSE */ - - - - #if YYDEBUG - /*--------------------------------. - | Print this symbol on YYOUTPUT. | - `--------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) - #else - static void - yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; - #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - # ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); - # endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); - } - - #endif /* ! YYDEBUG */ - /*-----------------------------------------------. - | Release the memory associated to this symbol. | - `-----------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yydestruct (int yytype, YYSTYPE *yyvaluep) - #else - static void - yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } - } ! /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! int yyparse (void *YYPARSE_PARAM); # else ! int yyparse (); # endif ! #else /* ! YYPARSE_PARAM */ ! #if defined (__STDC__) || defined (__cplusplus) int yyparse (void); ! #else ! int yyparse (); #endif - #endif /* ! YYPARSE_PARAM */ - - ! /* The lookahead symbol. */ ! int yychar; ! ! /* The semantic value of the lookahead symbol. */ ! YYSTYPE yylval; ! /* Number of syntax errors so far. */ int yynerrs; ! /*----------. ! | yyparse. | ! `----------*/ ! #ifdef YYPARSE_PARAM ! # if defined (__STDC__) || defined (__cplusplus) ! int yyparse (void *YYPARSE_PARAM) ! # else ! int yyparse (YYPARSE_PARAM) ! void *YYPARSE_PARAM; ! # endif ! #else /* ! YYPARSE_PARAM */ ! #if defined (__STDC__) || defined (__cplusplus) ! int ! yyparse (void) ! #else ! int ! yyparse () ! #endif ! #endif { ! register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yytoken = 0; /* Three stacks and their tools: `yyss': related to states, --- 1989,2074 ---- } # endif # endif #endif + #line 315 "/usr/share/bison/bison.simple" ! ! /* The user can define YYPARSE_PARAM as the name of an argument to be passed ! into yyparse. The argument should have type void *. ! It should actually point to an object. ! Grammar actions can access the variable by casting it ! to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL # else ! # define YYPARSE_PARAM_ARG YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif ! #else /* !YYPARSE_PARAM */ ! # define YYPARSE_PARAM_ARG ! # define YYPARSE_PARAM_DECL ! #endif /* !YYPARSE_PARAM */ ! ! /* Prevent warning if -Wstrict-prototypes. */ ! #ifdef __GNUC__ ! # ifdef YYPARSE_PARAM ! int yyparse (void *); ! # else int yyparse (void); ! # endif #endif ! /* YY_DECL_VARIABLES -- depending whether we use a pure parser, ! variables are global, or local to YYPARSE. */ ! #define YY_DECL_NON_LSP_VARIABLES \ ! /* The lookahead symbol. */ \ ! int yychar; \ ! \ ! /* The semantic value of the lookahead symbol. */ \ ! YYSTYPE yylval; \ ! \ ! /* Number of parse errors so far. */ \ int yynerrs; + #if YYLSP_NEEDED + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES \ + \ + /* Location data for the lookahead symbol. */ \ + YYLTYPE yylloc; + #else + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES + #endif ! /* If nonreentrant, generate the variables here. */ ! #if !YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ ! int ! yyparse (YYPARSE_PARAM_ARG) ! YYPARSE_PARAM_DECL { ! /* If reentrant, generate the variables here. */ ! #if YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ ! register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, *************** yyparse () *** 2387,2393 **** Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; --- 2078,2084 ---- Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; *************** yyparse () *** 2397,2415 **** YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; ! ! #define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); --- 2088,2118 ---- YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; + #if YYLSP_NEEDED + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + #endif ! #if YYLSP_NEEDED ! # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) ! #else ! # define YYPOPSTACK (yyvsp--, yyssp--) ! #endif YYSIZE_T yystacksize = YYINITDEPTH; + /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! #if YYLSP_NEEDED ! YYLTYPE yyloc; ! #endif /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); *************** yyparse () *** 2426,2432 **** yyssp = yyss; yyvsp = yyvs; ! goto yysetstate; /*------------------------------------------------------------. --- 2129,2137 ---- yyssp = yyss; yyvsp = yyvs; ! #if YYLSP_NEEDED ! yylsp = yyls; ! #endif goto yysetstate; /*------------------------------------------------------------. *************** yyparse () *** 2441,2447 **** yysetstate: *yyssp = yystate; ! if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; --- 2146,2152 ---- yysetstate: *yyssp = yystate; ! if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; *************** yyparse () *** 2454,2470 **** YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. This used to be a ! conditional around just the two extra args, but that might ! be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! yyss = yyss1; yyvs = yyvs1; } --- 2159,2182 ---- YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. */ ! # if YYLSP_NEEDED ! YYLTYPE *yyls1 = yyls; ! /* This used to be a conditional around just the two extra args, ! but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yyls1, yysize * sizeof (*yylsp), &yystacksize); ! yyls = yyls1; ! # else ! yyoverflow ("parser stack overflow", ! &yyss1, yysize * sizeof (*yyssp), ! &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! # endif yyss = yyss1; yyvs = yyvs1; } *************** yyparse () *** 2473,2482 **** goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (YYMAXDEPTH <= yystacksize) goto yyoverflowlab; yystacksize *= 2; ! if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { --- 2185,2194 ---- goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; ! if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { *************** yyparse () *** 2487,2494 **** goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } --- 2199,2208 ---- goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! # if YYLSP_NEEDED ! YYSTACK_RELOCATE (yyls); ! # endif ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } *************** yyparse () *** 2497,2508 **** yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyss + yystacksize - 1 <= yyssp) YYABORT; } --- 2211,2224 ---- yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! #if YYLSP_NEEDED ! yylsp = yyls + yysize - 1; ! #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyssp >= yyss + yystacksize - 1) YYABORT; } *************** yyparse () *** 2510,2515 **** --- 2226,2232 ---- goto yybackup; + /*-----------. | yybackup. | `-----------*/ *************** yybackup: *** 2522,2576 **** /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; ! if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ ! /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! if (yychar <= YYEOF) { ! yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yytoken = YYTRANSLATE (yychar); ! YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); } ! /* If the proper action on seeing token YYTOKEN is to reduce or to ! detect an error, take that action. */ ! yyn += yytoken; ! if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; ! if (yyn <= 0) { ! if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! /* Count tokens shifted since error; after three, turn off error status. */ --- 2239,2326 ---- /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; ! if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ ! /* yychar is either YYEMPTY or YYEOF ! or a valid token in external form. */ ! if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! /* Convert token to internal form (in yychar1) for indexing tables with */ ! ! if (yychar <= 0) /* This means end of input. */ { ! yychar1 = 0; ! yychar = YYEOF; /* Don't call YYLEX any more */ ! YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yychar1 = YYTRANSLATE (yychar); ! ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables ! which are defined only if `YYDEBUG' is set. */ ! if (yydebug) ! { ! YYFPRINTF (stderr, "Next token is %d (%s", ! yychar, yytname[yychar1]); ! /* Give the individual parser a way to print the precise ! meaning of a token, for further debugging info. */ ! # ifdef YYPRINT ! YYPRINT (stderr, yychar, yylval); ! # endif ! YYFPRINTF (stderr, ")\n"); ! } ! #endif } ! yyn += yychar1; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; ! ! /* yyn is what to do for this token type in this state. ! Negative => reduce, -yyn is rule number. ! Positive => shift, yyn is new state. ! New state is final state => don't bother to shift, ! just return success. ! 0, or most negative number => error. */ ! ! if (yyn < 0) { ! if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %d (%s), ", ! yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif /* Count tokens shifted since error; after three, turn off error status. */ *************** yyreduce: *** 2601,3102 **** /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to garbage. ! This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; ! YY_REDUCE_PRINT (yyn); ! switch (yyn) { ! case 2: ! #line 287 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids an empty source file"); finish_file (); ! ;} ! break; ! ! case 3: ! #line 292 "c-parse.y" ! { /* In case there were missing closebraces, get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); finish_fname_decls (); finish_file (); ! ;} ! break; ! ! case 4: ! #line 307 "c-parse.y" ! {yyval.ttype = NULL_TREE; ;} ! break; ! ! case 6: ! #line 308 "c-parse.y" ! {yyval.ttype = NULL_TREE; ggc_collect(); ;} ! break; ! ! case 10: ! #line 315 "c-parse.y" ! { STRIP_NOPS (yyvsp[-2].ttype); if ((TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (yyvsp[-2].ttype, 0)) == STRING_CST) || TREE_CODE (yyvsp[-2].ttype) == STRING_CST) assemble_asm (yyvsp[-2].ttype); else ! error ("argument of `asm' is not a constant string"); ;} ! break; ! ! case 11: ! #line 323 "c-parse.y" ! { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 12: ! #line 328 "c-parse.y" ! { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else if (!flag_traditional) ! warning ("data definition has no type or storage class"); ! ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 13: ! #line 335 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 14: ! #line 337 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 15: ! #line 339 "c-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ;} ! break; ! ! case 18: ! #line 343 "c-parse.y" ! { if (pedantic) ! pedwarn ("ISO C does not allow extra `;' outside of a function"); ;} ! break; ! case 19: ! #line 349 "c-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ;} ! break; ! ! case 20: ! #line 354 "c-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 21: ! #line 356 "c-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 22: ! #line 361 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 23: ! #line 363 "c-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ;} ! break; ! ! case 24: ! #line 368 "c-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 25: ! #line 370 "c-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 26: ! #line 375 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 27: ! #line 377 "c-parse.y" ! { if (! start_function (NULL_TREE, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ;} ! break; ! ! case 28: ! #line 382 "c-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 29: ! #line 384 "c-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 30: ! #line 389 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 33: ! #line 398 "c-parse.y" ! { yyval.code = ADDR_EXPR; ;} ! break; ! ! case 34: ! #line 400 "c-parse.y" ! { yyval.code = NEGATE_EXPR; ;} ! break; ! ! case 35: ! #line 402 "c-parse.y" ! { yyval.code = CONVERT_EXPR; if (warn_traditional && !in_system_header) warning ("traditional C rejects the unary plus operator"); ! ;} ! break; ! ! case 36: ! #line 407 "c-parse.y" ! { yyval.code = PREINCREMENT_EXPR; ;} ! break; ! ! case 37: ! #line 409 "c-parse.y" ! { yyval.code = PREDECREMENT_EXPR; ;} ! break; ! ! case 38: ! #line 411 "c-parse.y" ! { yyval.code = BIT_NOT_EXPR; ;} ! break; ! ! case 39: ! #line 413 "c-parse.y" ! { yyval.code = TRUTH_NOT_EXPR; ;} ! break; ! ! case 40: ! #line 417 "c-parse.y" ! { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ;} ! break; ! ! case 41: ! #line 422 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 43: ! #line 428 "c-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;} ! break; ! ! case 44: ! #line 430 "c-parse.y" ! { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;} ! break; ! ! case 46: ! #line 436 "c-parse.y" ! { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ;} ! break; ! ! case 47: ! #line 439 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 48: ! #line 442 "c-parse.y" ! { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ! overflow_warning (yyval.ttype); ;} ! break; ! ! case 49: ! #line 446 "c-parse.y" ! { yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ;} ! break; ! ! case 50: ! #line 463 "c-parse.y" ! { skip_evaluation--; if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) error ("`sizeof' applied to a bit-field"); ! yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ;} ! break; ! ! case 51: ! #line 469 "c-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ;} ! break; ! ! case 52: ! #line 472 "c-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ;} ! break; ! ! case 53: ! #line 475 "c-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ;} ! break; ! ! case 54: ! #line 478 "c-parse.y" ! { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ;} ! break; ! ! case 55: ! #line 480 "c-parse.y" ! { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ;} ! break; ! ! case 56: ! #line 484 "c-parse.y" ! { skip_evaluation++; ;} ! break; ! ! case 57: ! #line 488 "c-parse.y" ! { skip_evaluation++; ;} ! break; ! ! case 58: ! #line 492 "c-parse.y" ! { skip_evaluation++; ;} ! break; ! ! case 60: ! #line 498 "c-parse.y" ! { yyval.ttype = c_cast_expr (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 62: ! #line 504 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 63: ! #line 506 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 64: #line 508 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 65: #line 510 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 66: ! #line 512 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 67: #line 514 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 68: ! #line 516 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 69: #line 518 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 70: ! #line 520 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 71: #line 522 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 72: ! #line 524 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 73: ! #line 526 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 74: #line 528 "c-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ;} ! break; ! ! case 75: ! #line 531 "c-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_false_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 76: #line 534 "c-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ;} ! break; ! ! case 77: ! #line 537 "c-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_true_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 78: #line 540 "c-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ;} ! break; ! ! case 79: ! #line 543 "c-parse.y" ! { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) ! - (yyvsp[-4].ttype == boolean_false_node)); ;} ! break; ! ! case 80: #line 546 "c-parse.y" ! { skip_evaluation -= yyvsp[-6].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 81: ! #line 549 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ yyvsp[0].ttype = save_expr (yyvsp[-1].ttype); ! yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[0].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ;} ! break; ! ! case 82: ! #line 556 "c-parse.y" ! { skip_evaluation -= yyvsp[-4].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 83: ! #line 559 "c-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ! ;} ! break; ! ! case 84: ! #line 566 "c-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); ! /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ! ;} ! break; ! ! case 85: ! #line 577 "c-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ! ;} ! break; ! ! case 87: ! #line 584 "c-parse.y" ! { yyval.ttype = combine_strings (yyvsp[0].ttype); ;} ! break; ! ! case 88: ! #line 586 "c-parse.y" ! { yyval.ttype = fname_decl (C_RID_CODE (yyval.ttype), yyval.ttype); ;} ! break; ! ! case 89: ! #line 588 "c-parse.y" ! { start_init (NULL_TREE, NULL, 0); yyvsp[-2].ttype = groktypename (yyvsp[-2].ttype); ! really_start_incremental_init (yyvsp[-2].ttype); ;} ! break; ! ! case 90: ! #line 592 "c-parse.y" ! { tree constructor = pop_init_level (0); tree type = yyvsp[-5].ttype; finish_init (); if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids compound literals"); yyval.ttype = build_compound_literal (type, constructor); ! ;} ! break; ! ! case 91: ! #line 601 "c-parse.y" ! { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyvsp[-1].ttype, ERROR_MARK); ! yyval.ttype = yyvsp[-1].ttype; ;} ! break; ! ! case 92: ! #line 606 "c-parse.y" ! { yyval.ttype = error_mark_node; ;} ! break; ! ! case 93: ! #line 608 "c-parse.y" ! { tree saved_last_tree; if (pedantic) pedwarn ("ISO C forbids braced-groups within expressions"); --- 2351,2808 ---- /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to the semantic value of ! the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; + #if YYLSP_NEEDED + /* Similarly for the default location. Let the user run additional + commands if for instance locations are ranges. */ + yyloc = yylsp[1-yylen]; + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + #endif ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables which ! are defined only if `YYDEBUG' is set. */ ! if (yydebug) { ! int yyi; ! ! YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", ! yyn, yyrline[yyn]); ! ! /* Print the symbols being reduced, and their result. */ ! for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) ! YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); ! YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); ! } ! #endif ! ! switch (yyn) { ! ! case 1: ! #line 324 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids an empty source file"); finish_file (); ! ; ! break;} ! case 2: ! #line 329 "c-parse.y" ! { /* In case there were missing closebraces, get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); + /* __FUNCTION__ is defined at file scope (""). This + call may not be necessary as my tests indicate it + still works without it. */ finish_fname_decls (); finish_file (); ! ; ! break;} ! case 3: ! #line 347 "c-parse.y" ! {yyval.ttype = NULL_TREE; ; ! break;} ! case 5: ! #line 348 "c-parse.y" ! {yyval.ttype = NULL_TREE; ggc_collect(); ; ! break;} ! case 7: ! #line 353 "c-parse.y" ! { parsing_iso_function_signature = false; ; ! break;} ! case 10: ! #line 360 "c-parse.y" ! { STRIP_NOPS (yyvsp[-2].ttype); if ((TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (yyvsp[-2].ttype, 0)) == STRING_CST) || TREE_CODE (yyvsp[-2].ttype) == STRING_CST) assemble_asm (yyvsp[-2].ttype); else ! error ("argument of `asm' is not a constant string"); ; ! break;} ! case 11: ! #line 368 "c-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 12: ! #line 373 "c-parse.y" ! { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else ! warning ("data definition has no type or storage class"); ! POP_DECLSPEC_STACK; ; ! break;} ! case 13: ! #line 380 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 14: ! #line 382 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 15: ! #line 384 "c-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; ! break;} ! case 18: ! #line 388 "c-parse.y" ! { if (pedantic) ! pedwarn ("ISO C does not allow extra `;' outside of a function"); ; ! break;} ! case 19: ! #line 394 "c-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ; ! break;} ! case 20: ! #line 399 "c-parse.y" ! { store_parm_decls (); ; ! break;} ! case 21: ! #line 401 "c-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; ! break;} ! case 22: ! #line 406 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 23: ! #line 408 "c-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ; ! break;} ! case 24: ! #line 413 "c-parse.y" ! { store_parm_decls (); ; ! break;} ! case 25: ! #line 415 "c-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; ! break;} ! case 26: ! #line 420 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 27: ! #line 422 "c-parse.y" ! { if (! start_function (NULL_TREE, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ; ! break;} ! case 28: ! #line 427 "c-parse.y" ! { store_parm_decls (); ; ! break;} ! case 29: ! #line 429 "c-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; ! break;} ! case 30: ! #line 434 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 33: ! #line 443 "c-parse.y" ! { yyval.code = ADDR_EXPR; ; ! break;} ! case 34: ! #line 445 "c-parse.y" ! { yyval.code = NEGATE_EXPR; ; ! break;} ! case 35: ! #line 447 "c-parse.y" ! { yyval.code = CONVERT_EXPR; if (warn_traditional && !in_system_header) warning ("traditional C rejects the unary plus operator"); ! ; ! break;} ! case 36: ! #line 452 "c-parse.y" ! { yyval.code = PREINCREMENT_EXPR; ; ! break;} ! case 37: ! #line 454 "c-parse.y" ! { yyval.code = PREDECREMENT_EXPR; ; ! break;} ! case 38: ! #line 456 "c-parse.y" ! { yyval.code = BIT_NOT_EXPR; ; ! break;} ! case 39: ! #line 458 "c-parse.y" ! { yyval.code = TRUTH_NOT_EXPR; ; ! break;} ! case 40: ! #line 462 "c-parse.y" ! { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; ! break;} ! case 41: ! #line 467 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 43: ! #line 473 "c-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; ! break;} ! case 44: ! #line 475 "c-parse.y" ! { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; ! break;} ! case 46: ! #line 481 "c-parse.y" ! { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; ! break;} ! case 47: ! #line 484 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 48: ! #line 487 "c-parse.y" ! { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ! overflow_warning (yyval.ttype); ; ! break;} ! case 49: ! #line 491 "c-parse.y" ! { yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ; ! break;} ! case 50: ! #line 493 "c-parse.y" ! { skip_evaluation--; if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) error ("`sizeof' applied to a bit-field"); ! yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; ! break;} ! case 51: ! #line 499 "c-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; ! break;} ! case 52: ! #line 502 "c-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; ! break;} ! case 53: ! #line 505 "c-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; ! break;} ! case 54: #line 508 "c-parse.y" ! { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; ! break;} ! case 55: #line 510 "c-parse.y" ! { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; ! break;} ! case 56: #line 514 "c-parse.y" ! { skip_evaluation++; ; ! break;} ! case 57: #line 518 "c-parse.y" ! { skip_evaluation++; ; ! break;} ! case 58: #line 522 "c-parse.y" ! { skip_evaluation++; ; ! break;} ! case 60: #line 528 "c-parse.y" ! { yyval.ttype = c_cast_expr (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 62: #line 534 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 63: ! #line 536 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 64: ! #line 538 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 65: #line 540 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 66: ! #line 542 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 67: ! #line 544 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 68: #line 546 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 69: ! #line 548 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 70: ! #line 550 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 71: ! #line 552 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 72: ! #line 554 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 73: ! #line 556 "c-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 74: ! #line 558 "c-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; ! break;} ! case 75: ! #line 562 "c-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_false_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 76: ! #line 565 "c-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; ! break;} ! case 77: ! #line 569 "c-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_true_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 78: ! #line 572 "c-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; ! break;} ! case 79: ! #line 576 "c-parse.y" ! { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) ! - (yyvsp[-4].ttype == boolean_false_node)); ; ! break;} ! case 80: ! #line 579 "c-parse.y" ! { skip_evaluation -= yyvsp[-6].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 81: ! #line 582 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ yyvsp[0].ttype = save_expr (yyvsp[-1].ttype); ! yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[0].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; ! break;} ! case 82: ! #line 590 "c-parse.y" ! { skip_evaluation -= yyvsp[-4].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 83: ! #line 593 "c-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ! ; ! break;} ! case 84: ! #line 600 "c-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); ! /* This inhibits warnings in ! c_common_truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ! ; ! break;} ! case 85: ! #line 612 "c-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ! ; ! break;} ! case 87: ! #line 619 "c-parse.y" ! { yyval.ttype = fix_string_type (yyval.ttype); ; ! break;} ! case 88: ! #line 621 "c-parse.y" ! { yyval.ttype = fname_decl (C_RID_CODE (yyval.ttype), yyval.ttype); ; ! break;} ! case 89: ! #line 623 "c-parse.y" ! { start_init (NULL_TREE, NULL, 0); yyvsp[-2].ttype = groktypename (yyvsp[-2].ttype); ! really_start_incremental_init (yyvsp[-2].ttype); ; ! break;} ! case 90: ! #line 627 "c-parse.y" ! { tree constructor = pop_init_level (0); tree type = yyvsp[-5].ttype; finish_init (); if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids compound literals"); yyval.ttype = build_compound_literal (type, constructor); ! ; ! break;} ! case 91: ! #line 636 "c-parse.y" ! { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyvsp[-1].ttype, ERROR_MARK); ! yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 92: ! #line 641 "c-parse.y" ! { yyval.ttype = error_mark_node; ; ! break;} ! case 93: ! #line 643 "c-parse.y" ! { tree saved_last_tree; if (pedantic) pedwarn ("ISO C forbids braced-groups within expressions"); *************** yyreduce: *** 3110,3141 **** last_expr_type = void_type_node; yyval.ttype = build1 (STMT_EXPR, last_expr_type, yyvsp[-2].ttype); TREE_SIDE_EFFECTS (yyval.ttype) = 1; ! ;} ! break; ! ! case 94: ! #line 624 "c-parse.y" ! { pop_label_level (); last_tree = COMPOUND_BODY (yyvsp[-2].ttype); TREE_CHAIN (last_tree) = NULL_TREE; yyval.ttype = error_mark_node; ! ;} ! break; ! ! case 95: ! #line 631 "c-parse.y" ! { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 96: ! #line 633 "c-parse.y" ! { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ;} ! break; ! ! case 97: ! #line 636 "c-parse.y" ! { tree c; c = fold (yyvsp[-5].ttype); --- 2816,2843 ---- last_expr_type = void_type_node; yyval.ttype = build1 (STMT_EXPR, last_expr_type, yyvsp[-2].ttype); TREE_SIDE_EFFECTS (yyval.ttype) = 1; ! ; ! break;} ! case 94: ! #line 659 "c-parse.y" ! { pop_label_level (); last_tree = COMPOUND_BODY (yyvsp[-2].ttype); TREE_CHAIN (last_tree) = NULL_TREE; yyval.ttype = error_mark_node; ! ; ! break;} ! case 95: ! #line 666 "c-parse.y" ! { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 96: ! #line 668 "c-parse.y" ! { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ; ! break;} ! case 97: ! #line 671 "c-parse.y" ! { tree c; c = fold (yyvsp[-5].ttype); *************** yyreduce: *** 3143,3154 **** if (TREE_CODE (c) != INTEGER_CST) error ("first argument to __builtin_choose_expr not a constant"); yyval.ttype = integer_zerop (c) ? yyvsp[-1].ttype : yyvsp[-3].ttype; ! ;} ! break; ! ! case 98: ! #line 646 "c-parse.y" ! { tree e1, e2; e1 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-3].ttype)); --- 2845,2855 ---- if (TREE_CODE (c) != INTEGER_CST) error ("first argument to __builtin_choose_expr not a constant"); yyval.ttype = integer_zerop (c) ? yyvsp[-1].ttype : yyvsp[-3].ttype; ! ; ! break;} ! case 98: ! #line 681 "c-parse.y" ! { tree e1, e2; e1 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-3].ttype)); *************** yyreduce: *** 3156,4029 **** yyval.ttype = comptypes (e1, e2) ? build_int_2 (1, 0) : build_int_2 (0, 0); ! ;} ! break; ! ! case 99: ! #line 656 "c-parse.y" ! { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 100: ! #line 658 "c-parse.y" ! { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 101: ! #line 662 "c-parse.y" ! { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); ! ;} ! break; ! ! case 102: ! #line 668 "c-parse.y" ! { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 103: ! #line 670 "c-parse.y" ! { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 105: ! #line 677 "c-parse.y" ! { ! static int last_lineno = 0; ! static const char *last_input_filename = 0; ! yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! if (warn_traditional && !in_system_header ! && (lineno != last_lineno || !last_input_filename || ! strcmp (last_input_filename, input_filename))) ! { ! warning ("traditional C rejects string concatenation"); ! last_lineno = lineno; ! last_input_filename = input_filename; ! } ! ;} ! break; ! ! case 108: ! #line 698 "c-parse.y" ! { c_mark_varargs (); ! if (pedantic) ! pedwarn ("ISO C does not permit use of `varargs.h'"); ;} ! break; ! ! case 109: ! #line 708 "c-parse.y" ! { ;} ! break; ! ! case 114: ! #line 724 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 115: ! #line 726 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 116: ! #line 728 "c-parse.y" ! { shadow_tag_warned (yyvsp[-1].ttype, 1); ! pedwarn ("empty declaration"); ;} ! break; ! ! case 117: ! #line 731 "c-parse.y" ! { pedwarn ("empty declaration"); ;} ! break; ! ! case 118: ! #line 740 "c-parse.y" ! { ;} ! break; ! ! case 119: #line 748 "c-parse.y" ! { pending_xref_error (); PUSH_DECLSPEC_STACK; split_specs_attrs (yyvsp[0].ttype, ¤t_declspecs, &prefix_attributes); ! all_prefix_attributes = prefix_attributes; ;} ! break; ! ! case 120: ! #line 759 "c-parse.y" ! { all_prefix_attributes = chainon (yyvsp[0].ttype, prefix_attributes); ;} ! break; ! ! case 121: ! #line 764 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 122: ! #line 766 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 123: ! #line 768 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 124: ! #line 770 "c-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 125: ! #line 772 "c-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ;} ! break; ! ! case 126: ! #line 774 "c-parse.y" ! { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 127: ! #line 831 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 128: ! #line 834 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 129: ! #line 837 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 130: ! #line 843 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 131: ! #line 849 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 132: ! #line 852 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 133: #line 858 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ;} ! break; ! ! case 134: #line 861 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 135: #line 867 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 136: ! #line 870 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 137: #line 873 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 138: #line 876 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 139: ! #line 879 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 140: #line 882 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 141: #line 885 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 142: #line 891 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 143: #line 894 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 144: #line 897 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 145: #line 900 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 146: #line 903 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 147: #line 906 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 148: ! #line 912 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 149: #line 915 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 150: #line 918 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 151: #line 921 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 152: #line 924 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 153: #line 927 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 154: ! #line 933 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 155: #line 936 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 156: #line 939 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 157: #line 942 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 158: #line 945 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 159: #line 951 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ;} ! break; ! ! case 160: ! #line 954 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 161: #line 957 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 162: #line 960 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 163: ! #line 966 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 164: ! #line 972 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 165: ! #line 978 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 166: ! #line 987 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 167: ! #line 993 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 168: ! #line 996 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 169: ! #line 999 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 170: ! #line 1005 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 171: ! #line 1011 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 172: ! #line 1017 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 173: ! #line 1026 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 174: ! #line 1032 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 175: ! #line 1035 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 176: ! #line 1038 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 177: ! #line 1041 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 178: ! #line 1044 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 179: ! #line 1047 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 180: #line 1050 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 181: ! #line 1056 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 182: ! #line 1062 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 183: ! #line 1068 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 184: ! #line 1077 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 185: ! #line 1080 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 186: ! #line 1083 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 187: ! #line 1086 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 188: ! #line 1089 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 189: ! #line 1095 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 190: ! #line 1098 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 191: #line 1101 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 192: #line 1104 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 193: #line 1107 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 194: #line 1110 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 195: #line 1113 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 196: ! #line 1119 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 197: ! #line 1125 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 198: ! #line 1131 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 199: ! #line 1140 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 200: ! #line 1143 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 201: ! #line 1146 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 202: ! #line 1149 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 203: ! #line 1152 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 260: ! #line 1240 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 261: ! #line 1242 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 265: ! #line 1277 "c-parse.y" ! { OBJC_NEED_RAW_IDENTIFIER (1); ;} ! break; ! ! case 268: ! #line 1287 "c-parse.y" ! { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ ! yyval.ttype = lookup_name (yyvsp[0].ttype); ;} ! break; ! ! case 269: ! #line 1291 "c-parse.y" ! { skip_evaluation--; yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ;} ! break; ! ! case 270: ! #line 1293 "c-parse.y" ! { skip_evaluation--; yyval.ttype = groktypename (yyvsp[-1].ttype); ;} ! break; ! ! case 275: ! #line 1310 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 276: ! #line 1312 "c-parse.y" ! { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); ! yyval.ttype = yyvsp[-1].ttype; ! ;} ! break; ! ! case 277: ! #line 1319 "c-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ;} ! break; ! ! case 278: ! #line 1324 "c-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ;} ! break; ! ! case 279: ! #line 1327 "c-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ! ;} ! break; ! ! case 280: ! #line 1335 "c-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ;} ! break; ! ! case 281: ! #line 1340 "c-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ;} ! break; ! ! case 282: ! #line 1343 "c-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ;} ! break; ! ! case 283: ! #line 1351 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 284: ! #line 1353 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 285: ! #line 1358 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 286: ! #line 1360 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 287: #line 1365 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ;} ! break; ! ! case 288: ! #line 1370 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 289: ! #line 1372 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 290: ! #line 1377 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 291: ! #line 1379 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 292: ! #line 1381 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ;} ! break; ! ! case 293: ! #line 1383 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ;} ! break; ! ! case 294: ! #line 1385 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 300: #line 1403 "c-parse.y" ! { really_start_incremental_init (NULL_TREE); ;} ! break; ! ! case 301: #line 1405 "c-parse.y" ! { yyval.ttype = pop_init_level (0); ;} ! break; ! ! case 302: #line 1407 "c-parse.y" ! { yyval.ttype = error_mark_node; ;} ! break; ! ! case 303: ! #line 1413 "c-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids empty initializer braces"); ;} ! break; ! ! case 307: ! #line 1427 "c-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("ISO C89 forbids specifying subobject to initialize"); ;} ! break; ! ! case 308: #line 1430 "c-parse.y" ! { if (pedantic) ! pedwarn ("obsolete use of designated initializer without `='"); ;} ! break; ! ! case 309: ! #line 1433 "c-parse.y" ! { set_init_label (yyvsp[-1].ttype); ! if (pedantic) ! pedwarn ("obsolete use of designated initializer with `:'"); ;} ! break; ! ! case 310: ! #line 1437 "c-parse.y" ! {;} ! break; ! ! case 312: ! #line 1443 "c-parse.y" ! { push_init_level (0); ;} ! break; ! ! case 313: ! #line 1445 "c-parse.y" ! { process_init_element (pop_init_level (0)); ;} ! break; ! ! case 314: ! #line 1447 "c-parse.y" ! { process_init_element (yyvsp[0].ttype); ;} ! break; ! ! case 318: ! #line 1458 "c-parse.y" ! { set_init_label (yyvsp[0].ttype); ;} ! break; ! ! case 319: ! #line 1463 "c-parse.y" ! { set_init_index (yyvsp[-3].ttype, yyvsp[-1].ttype); if (pedantic) ! pedwarn ("ISO C forbids specifying range of elements to initialize"); ;} ! break; ! ! case 320: ! #line 1467 "c-parse.y" ! { set_init_index (yyvsp[-1].ttype, NULL_TREE); ;} ! break; ! ! case 321: #line 1472 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); --- 2857,3582 ---- yyval.ttype = comptypes (e1, e2) ? build_int_2 (1, 0) : build_int_2 (0, 0); ! ; ! break;} ! case 99: ! #line 691 "c-parse.y" ! { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 100: ! #line 693 "c-parse.y" ! { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 101: ! #line 697 "c-parse.y" ! { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); ! ; ! break;} ! case 102: ! #line 703 "c-parse.y" ! { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; ! break;} ! case 103: ! #line 705 "c-parse.y" ! { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; ! break;} ! case 104: ! #line 711 "c-parse.y" ! { ! parsing_iso_function_signature = false; /* Reset after decls. */ ! ; ! break;} ! case 105: ! #line 718 "c-parse.y" ! { ! if (warn_traditional && !in_system_header ! && parsing_iso_function_signature) ! warning ("traditional C rejects ISO C style function definitions"); ! parsing_iso_function_signature = false; /* Reset after warning. */ ! ; ! break;} ! case 107: ! #line 732 "c-parse.y" ! { ; ! break;} ! case 112: #line 748 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 113: ! #line 750 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 114: ! #line 752 "c-parse.y" ! { shadow_tag_warned (yyvsp[-1].ttype, 1); ! pedwarn ("empty declaration"); ; ! break;} ! case 115: ! #line 755 "c-parse.y" ! { pedwarn ("empty declaration"); ; ! break;} ! case 116: ! #line 764 "c-parse.y" ! { ; ! break;} ! case 117: ! #line 772 "c-parse.y" ! { pending_xref_error (); PUSH_DECLSPEC_STACK; split_specs_attrs (yyvsp[0].ttype, ¤t_declspecs, &prefix_attributes); ! all_prefix_attributes = prefix_attributes; ; ! break;} ! case 118: ! #line 783 "c-parse.y" ! { all_prefix_attributes = chainon (yyvsp[0].ttype, prefix_attributes); ; ! break;} ! case 119: ! #line 788 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 120: ! #line 790 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 121: ! #line 792 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 122: ! #line 794 "c-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 123: ! #line 796 "c-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; ! break;} ! case 124: ! #line 798 "c-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 125: ! #line 855 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 126: #line 858 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 127: #line 861 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 128: #line 867 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 129: #line 873 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 130: #line 876 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 131: #line 882 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; ! break;} ! case 132: #line 885 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 133: #line 891 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 134: #line 894 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 135: #line 897 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 136: #line 900 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 137: #line 903 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 138: #line 906 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 139: ! #line 909 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 140: #line 915 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 141: #line 918 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 142: #line 921 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 143: #line 924 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 144: #line 927 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 145: ! #line 930 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 146: #line 936 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 147: #line 939 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 148: #line 942 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 149: #line 945 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 150: ! #line 948 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 151: #line 951 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 152: #line 957 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 153: #line 960 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 154: ! #line 963 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 155: ! #line 966 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 156: ! #line 969 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 157: ! #line 975 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; ! break;} ! case 158: ! #line 978 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 159: ! #line 981 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 160: ! #line 984 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 161: ! #line 990 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 162: ! #line 996 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 163: ! #line 1002 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 164: ! #line 1011 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 165: ! #line 1017 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 166: ! #line 1020 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 167: ! #line 1023 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 168: ! #line 1029 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 169: ! #line 1035 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 170: ! #line 1041 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 171: #line 1050 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 172: ! #line 1056 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 173: ! #line 1059 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 174: ! #line 1062 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 175: ! #line 1065 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 176: ! #line 1068 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 177: ! #line 1071 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 178: ! #line 1074 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 179: ! #line 1080 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 180: ! #line 1086 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 181: ! #line 1092 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 182: #line 1101 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 183: #line 1104 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 184: #line 1107 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 185: #line 1110 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 186: #line 1113 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 187: ! #line 1119 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 188: ! #line 1122 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 189: ! #line 1125 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 190: ! #line 1128 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 191: ! #line 1131 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 192: ! #line 1134 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 193: ! #line 1137 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 194: ! #line 1143 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 195: ! #line 1149 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 196: ! #line 1155 "c-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 197: ! #line 1164 "c-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 198: ! #line 1167 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 199: ! #line 1170 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 200: ! #line 1173 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 201: ! #line 1176 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 258: ! #line 1264 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 259: ! #line 1266 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 263: ! #line 1301 "c-parse.y" ! { OBJC_NEED_RAW_IDENTIFIER (1); ; ! break;} ! case 266: ! #line 1311 "c-parse.y" ! { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ ! yyval.ttype = lookup_name (yyvsp[0].ttype); ; ! break;} ! case 267: ! #line 1315 "c-parse.y" ! { skip_evaluation--; yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; ! break;} ! case 268: ! #line 1317 "c-parse.y" ! { skip_evaluation--; yyval.ttype = groktypename (yyvsp[-1].ttype); ; ! break;} ! case 273: ! #line 1334 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 274: ! #line 1336 "c-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 275: ! #line 1341 "c-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; ! break;} ! case 276: ! #line 1346 "c-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; ! break;} ! case 277: ! #line 1349 "c-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ! ; ! break;} ! case 278: ! #line 1357 "c-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; ! break;} ! case 279: ! #line 1362 "c-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; ! break;} ! case 280: #line 1365 "c-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; ! break;} ! case 281: ! #line 1373 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 282: ! #line 1375 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 283: ! #line 1380 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 284: ! #line 1382 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 285: ! #line 1387 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ; ! break;} ! case 286: ! #line 1392 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 287: ! #line 1394 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 288: ! #line 1399 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 289: ! #line 1401 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 290: #line 1403 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; ! break;} ! case 291: #line 1405 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; ! break;} ! case 292: #line 1407 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 300: #line 1430 "c-parse.y" ! { really_start_incremental_init (NULL_TREE); ; ! break;} ! case 301: ! #line 1432 "c-parse.y" ! { yyval.ttype = pop_init_level (0); ; ! break;} ! case 302: ! #line 1434 "c-parse.y" ! { yyval.ttype = error_mark_node; ; ! break;} ! case 303: ! #line 1440 "c-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids empty initializer braces"); ; ! break;} ! case 307: ! #line 1454 "c-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("ISO C89 forbids specifying subobject to initialize"); ; ! break;} ! case 308: ! #line 1457 "c-parse.y" ! { if (pedantic) ! pedwarn ("obsolete use of designated initializer without `='"); ; ! break;} ! case 309: ! #line 1460 "c-parse.y" ! { set_init_label (yyvsp[-1].ttype); if (pedantic) ! pedwarn ("obsolete use of designated initializer with `:'"); ; ! break;} ! case 310: ! #line 1464 "c-parse.y" ! {; ! break;} ! case 312: ! #line 1470 "c-parse.y" ! { push_init_level (0); ; ! break;} ! case 313: #line 1472 "c-parse.y" ! { process_init_element (pop_init_level (0)); ; ! break;} ! case 314: ! #line 1474 "c-parse.y" ! { process_init_element (yyvsp[0].ttype); ; ! break;} ! case 318: ! #line 1485 "c-parse.y" ! { set_init_label (yyvsp[0].ttype); ; ! break;} ! case 319: ! #line 1487 "c-parse.y" ! { set_init_index (yyvsp[-3].ttype, yyvsp[-1].ttype); ! if (pedantic) ! pedwarn ("ISO C forbids specifying range of elements to initialize"); ; ! break;} ! case 320: ! #line 1491 "c-parse.y" ! { set_init_index (yyvsp[-1].ttype, NULL_TREE); ; ! break;} ! case 321: ! #line 1496 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); *************** yyreduce: *** 4033,4059 **** pop_function_context (); YYERROR1; } ! ;} ! break; ! ! case 322: ! #line 1484 "c-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 323: ! #line 1492 "c-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ;} ! break; ! ! case 324: ! #line 1502 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); --- 3586,3610 ---- pop_function_context (); YYERROR1; } ! parsing_iso_function_signature = false; /* Don't warn about nested functions. */ ! ; ! break;} ! case 322: ! #line 1509 "c-parse.y" ! { store_parm_decls (); ; ! break;} ! case 323: ! #line 1517 "c-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ; ! break;} ! case 324: ! #line 1527 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); *************** yyreduce: *** 4063,4571 **** pop_function_context (); YYERROR1; } ! ;} ! break; ! ! case 325: ! #line 1514 "c-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 326: ! #line 1522 "c-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ;} ! break; ! ! case 329: ! #line 1542 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 330: ! #line 1544 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 331: ! #line 1549 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 332: ! #line 1551 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 336: ! #line 1566 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 337: ! #line 1571 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 339: #line 1577 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 340: ! #line 1582 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 341: ! #line 1584 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 342: ! #line 1586 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 343: ! #line 1588 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 344: ! #line 1596 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 345: ! #line 1601 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 346: #line 1603 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 347: ! #line 1605 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 349: ! #line 1611 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 350: ! #line 1613 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 351: ! #line 1618 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 352: ! #line 1620 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 353: ! #line 1625 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 354: #line 1627 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 355: ! #line 1638 "c-parse.y" ! { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); ! /* Start scope of tag before parsing components. */ ! ;} ! break; ! ! case 356: ! #line 1642 "c-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 357: #line 1644 "c-parse.y" ! { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ;} ! break; ! ! case 358: ! #line 1648 "c-parse.y" ! { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ;} ! break; ! ! case 359: ! #line 1650 "c-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 360: ! #line 1652 "c-parse.y" ! { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ;} ! break; ! ! case 361: ! #line 1656 "c-parse.y" ! { yyval.ttype = start_enum (yyvsp[-1].ttype); ;} ! break; ! ! case 362: ! #line 1658 "c-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 363: ! #line 1661 "c-parse.y" ! { yyval.ttype = start_enum (NULL_TREE); ;} ! break; ! ! case 364: ! #line 1663 "c-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 365: ! #line 1669 "c-parse.y" ! { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ;} ! break; ! ! case 366: ! #line 1671 "c-parse.y" ! { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ;} ! break; ! ! case 367: ! #line 1673 "c-parse.y" ! { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); /* In ISO C, enumerated types can be referred to only if already defined. */ if (pedantic && !COMPLETE_TYPE_P (yyval.ttype)) ! pedwarn ("ISO C forbids forward references to `enum' types"); ;} ! break; ! ! case 371: ! #line 1688 "c-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("comma at end of enumerator list"); ;} ! break; ! ! case 372: ! #line 1694 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 373: ! #line 1696 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! pedwarn ("no semicolon at end of struct or union"); ;} ! break; ! ! case 374: ! #line 1701 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 375: ! #line 1703 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 376: ! #line 1705 "c-parse.y" ! { if (pedantic) ! pedwarn ("extra semicolon in struct or union specified"); ;} ! break; ! ! case 377: ! #line 1711 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 378: #line 1714 "c-parse.y" ! { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); yyval.ttype = grokfield(yyvsp[-1].filename, yyvsp[0].lineno, NULL, current_declspecs, NULL_TREE); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 379: ! #line 1724 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 380: ! #line 1727 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 381: ! #line 1732 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 382: ! #line 1734 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 384: ! #line 1741 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 386: ! #line 1747 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 387: ! #line 1752 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 388: ! #line 1756 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 389: ! #line 1759 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 390: ! #line 1765 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 391: ! #line 1769 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 392: ! #line 1772 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 394: ! #line 1784 "c-parse.y" ! { if (yyvsp[-2].ttype == error_mark_node) ! yyval.ttype = yyvsp[-2].ttype; ! else ! yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ;} ! break; ! ! case 395: ! #line 1789 "c-parse.y" ! { yyval.ttype = error_mark_node; ;} ! break; ! ! case 396: #line 1795 "c-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 397: ! #line 1797 "c-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 398: ! #line 1802 "c-parse.y" ! { pending_xref_error (); ! yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 399: ! #line 1805 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 400: #line 1810 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 402: ! #line 1816 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, NULL_TREE), ! all_prefix_attributes); ;} ! break; ! ! case 403: ! #line 1820 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[0].ttype), ! all_prefix_attributes); ;} ! break; ! ! case 404: ! #line 1824 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ;} ! break; ! ! case 408: ! #line 1837 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 409: ! #line 1842 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 410: ! #line 1844 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 411: ! #line 1849 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 412: ! #line 1851 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 413: ! #line 1853 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 1); ;} ! break; ! ! case 414: ! #line 1855 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 415: ! #line 1857 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, NULL_TREE, 1); ;} ! break; ! ! case 416: ! #line 1864 "c-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, NULL_TREE, 0, 0); ;} ! break; ! ! case 417: ! #line 1866 "c-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, 0); ;} ! break; ! ! case 418: #line 1868 "c-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); ;} ! break; ! ! case 419: #line 1870 "c-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-1].ttype, 0, 0); ;} ! break; ! ! case 420: ! #line 1872 "c-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); ;} ! break; ! ! case 421: ! #line 1874 "c-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-2].ttype, 0, 1); ;} ! break; ! ! case 422: ! #line 1876 "c-parse.y" ! { if (C_RID_CODE (yyvsp[-2].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, NULL_TREE, 1, 0); ;} ! break; ! ! case 423: ! #line 1880 "c-parse.y" ! { if (C_RID_CODE (yyvsp[-3].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 1, 0); ;} ! break; ! ! case 424: ! #line 1884 "c-parse.y" ! { if (C_RID_CODE (yyvsp[-2].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-3].ttype, 1, 0); ;} ! break; ! ! case 427: #line 1899 "c-parse.y" ! { pedwarn ("deprecated use of label at end of compound statement"); ! ;} ! break; ! ! case 435: ! #line 1916 "c-parse.y" ! { if (pedantic && !flag_isoc99) ! pedwarn ("ISO C89 forbids mixed declarations and code"); ;} ! break; ! ! case 450: ! #line 1946 "c-parse.y" ! { pushlevel (0); clear_last_expr (); add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); ! ;} ! break; ! ! case 451: ! #line 1953 "c-parse.y" ! { yyval.ttype = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ;} ! break; ! ! case 452: ! #line 1958 "c-parse.y" ! { if (flag_isoc99) { yyval.ttype = c_begin_compound_stmt (); pushlevel (0); --- 3614,4013 ---- pop_function_context (); YYERROR1; } ! parsing_iso_function_signature = false; /* Don't warn about nested functions. */ ! ; ! break;} ! case 325: ! #line 1540 "c-parse.y" ! { store_parm_decls (); ; ! break;} ! case 326: ! #line 1548 "c-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ; ! break;} ! case 329: ! #line 1568 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 330: ! #line 1570 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 331: ! #line 1575 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 332: #line 1577 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 336: ! #line 1592 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 337: ! #line 1597 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 339: #line 1603 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 340: ! #line 1608 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 341: ! #line 1610 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 342: ! #line 1612 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 343: ! #line 1614 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 344: ! #line 1622 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 345: #line 1627 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 346: ! #line 1629 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 347: ! #line 1631 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 349: ! #line 1637 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 350: ! #line 1639 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 351: #line 1644 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 352: ! #line 1646 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 353: ! #line 1651 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 354: ! #line 1653 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 355: ! #line 1664 "c-parse.y" ! { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); ! /* Start scope of tag before parsing components. */ ! ; ! break;} ! case 356: ! #line 1668 "c-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; ! break;} ! case 357: ! #line 1670 "c-parse.y" ! { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ; ! break;} ! case 358: ! #line 1674 "c-parse.y" ! { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; ! break;} ! case 359: ! #line 1676 "c-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; ! break;} ! case 360: ! #line 1678 "c-parse.y" ! { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ; ! break;} ! case 361: ! #line 1682 "c-parse.y" ! { yyval.ttype = start_enum (yyvsp[-1].ttype); ; ! break;} ! case 362: ! #line 1684 "c-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; ! break;} ! case 363: ! #line 1687 "c-parse.y" ! { yyval.ttype = start_enum (NULL_TREE); ; ! break;} ! case 364: ! #line 1689 "c-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; ! break;} ! case 365: ! #line 1695 "c-parse.y" ! { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; ! break;} ! case 366: ! #line 1697 "c-parse.y" ! { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; ! break;} ! case 367: ! #line 1699 "c-parse.y" ! { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); /* In ISO C, enumerated types can be referred to only if already defined. */ if (pedantic && !COMPLETE_TYPE_P (yyval.ttype)) ! pedwarn ("ISO C forbids forward references to `enum' types"); ; ! break;} ! case 371: #line 1714 "c-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("comma at end of enumerator list"); ; ! break;} ! case 372: ! #line 1720 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 373: ! #line 1722 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! pedwarn ("no semicolon at end of struct or union"); ; ! break;} ! case 374: ! #line 1727 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 375: ! #line 1729 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; ! break;} ! case 376: ! #line 1731 "c-parse.y" ! { if (pedantic) ! pedwarn ("extra semicolon in struct or union specified"); ; ! break;} ! case 377: ! #line 1737 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 378: ! #line 1740 "c-parse.y" ! { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); yyval.ttype = grokfield(yyvsp[-1].filename, yyvsp[0].lineno, NULL, current_declspecs, NULL_TREE); ! POP_DECLSPEC_STACK; ; ! break;} ! case 379: ! #line 1750 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 380: ! #line 1753 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); ! yyval.ttype = NULL_TREE; ; ! break;} ! case 381: ! #line 1758 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 382: ! #line 1760 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 384: ! #line 1767 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 386: ! #line 1773 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 387: ! #line 1778 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 388: ! #line 1782 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 389: ! #line 1785 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 390: ! #line 1791 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 391: #line 1795 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 392: ! #line 1798 "c-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 394: #line 1810 "c-parse.y" ! { if (yyvsp[-2].ttype == error_mark_node) ! yyval.ttype = yyvsp[-2].ttype; ! else ! yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ; ! break;} ! case 395: ! #line 1815 "c-parse.y" ! { yyval.ttype = error_mark_node; ; ! break;} ! case 396: ! #line 1821 "c-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 397: ! #line 1823 "c-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 398: ! #line 1828 "c-parse.y" ! { pending_xref_error (); ! yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 399: ! #line 1831 "c-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 400: ! #line 1836 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 402: ! #line 1842 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, NULL_TREE), ! all_prefix_attributes); ; ! break;} ! case 403: ! #line 1846 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[0].ttype), ! all_prefix_attributes); ; ! break;} ! case 404: ! #line 1850 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ; ! break;} ! case 408: ! #line 1863 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 409: #line 1868 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 410: #line 1870 "c-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 411: ! #line 1875 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 412: ! #line 1877 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 413: ! #line 1879 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 1); ; ! break;} ! case 414: ! #line 1881 "c-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 415: ! #line 1883 "c-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, NULL_TREE, 1); ; ! break;} ! case 416: ! #line 1890 "c-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, 0); ; ! break;} ! case 417: ! #line 1892 "c-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-1].ttype, 0, 0); ; ! break;} ! case 418: ! #line 1894 "c-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-2].ttype, 0, 1); ; ! break;} ! case 419: ! #line 1896 "c-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 1, 0); ; ! break;} ! case 420: #line 1899 "c-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-3].ttype, 1, 0); ; ! break;} ! case 423: ! #line 1912 "c-parse.y" ! { pedwarn ("deprecated use of label at end of compound statement"); ! ; ! break;} ! case 431: ! #line 1929 "c-parse.y" ! { if (pedantic && !flag_isoc99) ! pedwarn ("ISO C89 forbids mixed declarations and code"); ; ! break;} ! case 446: ! #line 1959 "c-parse.y" ! { pushlevel (0); clear_last_expr (); add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); ! ; ! break;} ! case 447: ! #line 1966 "c-parse.y" ! { yyval.ttype = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ; ! break;} ! case 448: ! #line 1971 "c-parse.y" ! { if (flag_isoc99) { yyval.ttype = c_begin_compound_stmt (); pushlevel (0); *************** yyreduce: *** 4574,4641 **** } else yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 453: ! #line 1974 "c-parse.y" ! { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! yyval.ttype = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = yyval.ttype; } else ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 455: ! #line 1991 "c-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids label declarations"); ;} ! break; ! ! case 458: ! #line 2002 "c-parse.y" ! { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { tree label = shadow_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; add_decl_stmt (label); } ! ;} ! break; ! ! case 459: ! #line 2016 "c-parse.y" ! {;} ! break; ! ! case 461: ! #line 2020 "c-parse.y" ! { compstmt_count++; ! yyval.ttype = c_begin_compound_stmt (); ;} ! break; ! ! case 462: ! #line 2025 "c-parse.y" ! { yyval.ttype = convert (void_type_node, integer_zero_node); ;} ! break; ! ! case 463: ! #line 2027 "c-parse.y" ! { yyval.ttype = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (yyvsp[0].ttype)) ! = SCOPE_STMT_BLOCK (TREE_VALUE (yyvsp[0].ttype)) ! = yyval.ttype; ;} ! break; ! ! case 466: #line 2040 "c-parse.y" ! { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); YYERROR; --- 4016,4075 ---- } else yyval.ttype = NULL_TREE; ! ; ! break;} ! case 449: ! #line 1987 "c-parse.y" ! { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! yyval.ttype = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = yyval.ttype; } else ! yyval.ttype = NULL_TREE; ; ! break;} ! case 451: ! #line 2004 "c-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids label declarations"); ; ! break;} ! case 454: ! #line 2015 "c-parse.y" ! { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { tree label = shadow_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; add_decl_stmt (label); } ! ; ! break;} ! case 455: ! #line 2029 "c-parse.y" ! {; ! break;} ! case 457: ! #line 2033 "c-parse.y" ! { compstmt_count++; ! yyval.ttype = c_begin_compound_stmt (); ; ! break;} ! case 458: ! #line 2038 "c-parse.y" ! { yyval.ttype = convert (void_type_node, integer_zero_node); ; ! break;} ! case 459: #line 2040 "c-parse.y" ! { yyval.ttype = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (yyvsp[0].ttype)) ! = SCOPE_STMT_BLOCK (TREE_VALUE (yyvsp[0].ttype)) ! = yyval.ttype; ; ! break;} ! case 462: ! #line 2053 "c-parse.y" ! { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); YYERROR; *************** yyreduce: *** 4648,4725 **** push_label_level (); compstmt_count++; yyval.ttype = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ! ;} ! break; ! ! case 467: ! #line 2057 "c-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, COMPOUND_BODY (yyvsp[-1].ttype)); last_expr_type = NULL_TREE; ! yyval.ttype = yyvsp[-1].ttype; ;} ! break; ! ! case 468: ! #line 2065 "c-parse.y" ! { c_finish_then (); ;} ! break; ! ! case 470: ! #line 2082 "c-parse.y" ! { yyval.ttype = c_begin_if_stmt (); ;} ! break; ! ! case 471: ! #line 2084 "c-parse.y" ! { c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), compstmt_count,yyvsp[-3].ttype); yyval.itype = stmt_count; if_stmt_file = yyvsp[-7].filename; ! if_stmt_line = yyvsp[-6].lineno; ;} ! break; ! ! case 472: ! #line 2096 "c-parse.y" ! { stmt_count++; compstmt_count++; ! yyval.ttype = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents parsing the complete do-statement, set the condition now. Otherwise, we can get crashes at RTL-generation time. */ ! DO_COND (yyval.ttype) = error_mark_node; ;} ! break; ! ! case 473: ! #line 2107 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ! RECHAIN_STMTS (yyval.ttype, DO_BODY (yyval.ttype)); ;} ! break; ! ! case 474: ! #line 2115 "c-parse.y" ! { if (yychar == YYEMPTY) ! yychar = YYLEX; ! yyval.filename = input_filename; ;} ! break; ! ! case 475: ! #line 2121 "c-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.lineno = lineno; ;} ! break; ! ! case 478: #line 2134 "c-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ;} ! break; ! ! case 479: ! #line 2140 "c-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; /* ??? We currently have no way of recording --- 4082,4149 ---- push_label_level (); compstmt_count++; yyval.ttype = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ! ; ! break;} ! case 463: ! #line 2070 "c-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, COMPOUND_BODY (yyvsp[-1].ttype)); last_expr_type = NULL_TREE; ! yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 464: ! #line 2078 "c-parse.y" ! { c_finish_then (); ; ! break;} ! case 466: ! #line 2095 "c-parse.y" ! { yyval.ttype = c_begin_if_stmt (); ; ! break;} ! case 467: ! #line 2097 "c-parse.y" ! { c_expand_start_cond (c_common_truthvalue_conversion (yyvsp[-1].ttype), compstmt_count,yyvsp[-3].ttype); yyval.itype = stmt_count; if_stmt_file = yyvsp[-7].filename; ! if_stmt_line = yyvsp[-6].lineno; ; ! break;} ! case 468: ! #line 2109 "c-parse.y" ! { stmt_count++; compstmt_count++; ! yyval.ttype = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents parsing the complete do-statement, set the condition now. Otherwise, we can get crashes at RTL-generation time. */ ! DO_COND (yyval.ttype) = error_mark_node; ; ! break;} ! case 469: ! #line 2120 "c-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ! RECHAIN_STMTS (yyval.ttype, DO_BODY (yyval.ttype)); ; ! break;} ! case 470: ! #line 2128 "c-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.filename = input_filename; ; ! break;} ! case 471: #line 2134 "c-parse.y" ! { if (yychar == YYEMPTY) ! yychar = YYLEX; ! yyval.lineno = lineno; ; ! break;} ! case 474: ! #line 2147 "c-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ; ! break;} ! case 475: ! #line 2153 "c-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; /* ??? We currently have no way of recording *************** yyreduce: *** 4728,4924 **** but I suspect that problems will occur when doing inlining at the tree level. */ } ! ;} ! break; ! ! case 480: ! #line 2154 "c-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; } ! ;} ! break; ! ! case 481: ! #line 2163 "c-parse.y" ! { c_expand_start_else (); ! yyvsp[-1].itype = stmt_count; ;} ! break; ! ! case 482: ! #line 2166 "c-parse.y" ! { c_finish_else (); c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) ! warning ("empty body in an else-statement"); ;} ! break; ! ! case 483: ! #line 2171 "c-parse.y" ! { c_expand_end_cond (); /* This warning is here instead of in simple_if, because we do not want a warning if an empty if is followed by an else statement. Increment stmt_count so we don't give a second error if this is a nested `if'. */ if (extra_warnings && stmt_count++ == yyvsp[0].itype) warning_with_file_and_line (if_stmt_file, if_stmt_line, ! "empty body in an if-statement"); ;} ! break; ! ! case 484: ! #line 2183 "c-parse.y" ! { c_expand_end_cond (); ;} ! break; ! ! case 485: ! #line 2193 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_begin_while_stmt (); ;} ! break; ! ! case 486: #line 2196 "c-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (yyvsp[-1].ttype); ! c_finish_while_stmt_cond (truthvalue_conversion (yyvsp[-1].ttype), ! yyvsp[-3].ttype); ! yyval.ttype = add_stmt (yyvsp[-3].ttype); ;} ! break; ! ! case 487: ! #line 2201 "c-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, WHILE_BODY (yyvsp[-1].ttype)); ;} ! break; ! ! case 488: ! #line 2204 "c-parse.y" ! { DO_COND (yyvsp[-4].ttype) = truthvalue_conversion (yyvsp[-2].ttype); ;} ! break; ! ! case 489: #line 2206 "c-parse.y" ! { ;} ! break; ! ! case 490: ! #line 2208 "c-parse.y" ! { yyval.ttype = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt (yyval.ttype); ;} ! break; ! ! case 491: ! #line 2212 "c-parse.y" ! { stmt_count++; ! RECHAIN_STMTS (yyvsp[-2].ttype, FOR_INIT_STMT (yyvsp[-2].ttype)); ;} ! break; ! ! case 492: ! #line 2215 "c-parse.y" ! { if (yyvsp[-1].ttype) ! FOR_COND (yyvsp[-5].ttype) = truthvalue_conversion (yyvsp[-1].ttype); ;} ! break; ! ! case 493: ! #line 2218 "c-parse.y" ! { FOR_EXPR (yyvsp[-8].ttype) = yyvsp[-1].ttype; ;} ! break; ! ! case 494: ! #line 2220 "c-parse.y" ! { RECHAIN_STMTS (yyvsp[-10].ttype, FOR_BODY (yyvsp[-10].ttype)); ;} ! break; ! ! case 495: ! #line 2222 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_start_case (yyvsp[-1].ttype); ;} ! break; ! ! case 496: #line 2225 "c-parse.y" ! { c_finish_case (); ;} ! break; ! ! case 497: ! #line 2230 "c-parse.y" ! { add_stmt (build_stmt (EXPR_STMT, yyvsp[-1].ttype)); ;} ! break; ! ! case 498: #line 2232 "c-parse.y" ! { check_for_loop_decls (); ;} ! break; ! ! case 499: ! #line 2238 "c-parse.y" ! { stmt_count++; yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 500: ! #line 2240 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_expr_stmt (yyvsp[-1].ttype); ;} ! break; ! ! case 501: ! #line 2243 "c-parse.y" ! { if (flag_isoc99) RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 502: ! #line 2247 "c-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_break_stmt ()); ;} ! break; ! ! case 503: ! #line 2250 "c-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_continue_stmt ()); ;} ! break; ! ! case 504: ! #line 2253 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (NULL_TREE); ;} ! break; ! ! case 505: ! #line 2256 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (yyvsp[-1].ttype); ;} ! break; ! ! case 506: ! #line 2259 "c-parse.y" ! { stmt_count++; ! yyval.ttype = simple_asm_stmt (yyvsp[-2].ttype); ;} ! break; ! ! case 507: ! #line 2263 "c-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE); ;} ! break; ! ! case 508: ! #line 2268 "c-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ;} ! break; ! ! case 509: #line 2273 "c-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ;} ! break; ! ! case 510: ! #line 2276 "c-parse.y" ! { tree decl; stmt_count++; decl = lookup_label (yyvsp[-1].ttype); if (decl != 0) --- 4152,4318 ---- but I suspect that problems will occur when doing inlining at the tree level. */ } ! ; ! break;} ! case 476: ! #line 2167 "c-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; } ! ; ! break;} ! case 477: ! #line 2176 "c-parse.y" ! { c_expand_start_else (); ! yyvsp[-1].itype = stmt_count; ; ! break;} ! case 478: ! #line 2179 "c-parse.y" ! { c_finish_else (); c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) ! warning ("empty body in an else-statement"); ; ! break;} ! case 479: ! #line 2184 "c-parse.y" ! { c_expand_end_cond (); /* This warning is here instead of in simple_if, because we do not want a warning if an empty if is followed by an else statement. Increment stmt_count so we don't give a second error if this is a nested `if'. */ if (extra_warnings && stmt_count++ == yyvsp[0].itype) warning_with_file_and_line (if_stmt_file, if_stmt_line, ! "empty body in an if-statement"); ; ! break;} ! case 480: #line 2196 "c-parse.y" ! { c_expand_end_cond (); ; ! break;} ! case 481: #line 2206 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_begin_while_stmt (); ; ! break;} ! case 482: ! #line 2209 "c-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion (yyvsp[-1].ttype); ! c_finish_while_stmt_cond ! (c_common_truthvalue_conversion (yyvsp[-1].ttype), yyvsp[-3].ttype); ! yyval.ttype = add_stmt (yyvsp[-3].ttype); ; ! break;} ! case 483: ! #line 2214 "c-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, WHILE_BODY (yyvsp[-1].ttype)); ; ! break;} ! case 484: ! #line 2217 "c-parse.y" ! { DO_COND (yyvsp[-4].ttype) = c_common_truthvalue_conversion (yyvsp[-2].ttype); ; ! break;} ! case 485: ! #line 2219 "c-parse.y" ! { ; ! break;} ! case 486: ! #line 2221 "c-parse.y" ! { yyval.ttype = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt (yyval.ttype); ; ! break;} ! case 487: #line 2225 "c-parse.y" ! { stmt_count++; ! RECHAIN_STMTS (yyvsp[-2].ttype, FOR_INIT_STMT (yyvsp[-2].ttype)); ; ! break;} ! case 488: ! #line 2228 "c-parse.y" ! { if (yyvsp[-1].ttype) ! FOR_COND (yyvsp[-5].ttype) ! = c_common_truthvalue_conversion (yyvsp[-1].ttype); ; ! break;} ! case 489: #line 2232 "c-parse.y" ! { FOR_EXPR (yyvsp[-8].ttype) = yyvsp[-1].ttype; ; ! break;} ! case 490: ! #line 2234 "c-parse.y" ! { RECHAIN_STMTS (yyvsp[-10].ttype, FOR_BODY (yyvsp[-10].ttype)); ; ! break;} ! case 491: ! #line 2236 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_start_case (yyvsp[-1].ttype); ; ! break;} ! case 492: ! #line 2239 "c-parse.y" ! { c_finish_case (); ; ! break;} ! case 493: ! #line 2244 "c-parse.y" ! { add_stmt (build_stmt (EXPR_STMT, yyvsp[-1].ttype)); ; ! break;} ! case 494: ! #line 2246 "c-parse.y" ! { check_for_loop_decls (); ; ! break;} ! case 495: ! #line 2252 "c-parse.y" ! { stmt_count++; yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 496: ! #line 2254 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_expr_stmt (yyvsp[-1].ttype); ; ! break;} ! case 497: ! #line 2257 "c-parse.y" ! { if (flag_isoc99) RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ! yyval.ttype = NULL_TREE; ; ! break;} ! case 498: ! #line 2261 "c-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_break_stmt ()); ; ! break;} ! case 499: ! #line 2264 "c-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_continue_stmt ()); ; ! break;} ! case 500: ! #line 2267 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (NULL_TREE); ; ! break;} ! case 501: ! #line 2270 "c-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (yyvsp[-1].ttype); ; ! break;} ! case 502: #line 2273 "c-parse.y" ! { stmt_count++; ! yyval.ttype = simple_asm_stmt (yyvsp[-2].ttype); ; ! break;} ! case 503: ! #line 2277 "c-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE); ; ! break;} ! case 504: ! #line 2282 "c-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ; ! break;} ! case 505: ! #line 2287 "c-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ; ! break;} ! case 506: ! #line 2290 "c-parse.y" ! { tree decl; stmt_count++; decl = lookup_label (yyvsp[-1].ttype); if (decl != 0) *************** yyreduce: *** 4928,4971 **** } else yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 511: ! #line 2288 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids `goto *expr;'"); stmt_count++; yyvsp[-1].ttype = convert (ptr_type_node, yyvsp[-1].ttype); ! yyval.ttype = add_stmt (build_stmt (GOTO_STMT, yyvsp[-1].ttype)); ;} ! break; ! ! case 512: ! #line 2294 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 513: ! #line 2302 "c-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-1].ttype, NULL_TREE); ;} ! break; ! ! case 514: ! #line 2305 "c-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 515: #line 2308 "c-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (NULL_TREE, NULL_TREE); ;} ! break; ! ! case 516: ! #line 2311 "c-parse.y" ! { tree label = define_label (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-4].ttype); stmt_count++; if (label) { --- 4322,4359 ---- } else yyval.ttype = NULL_TREE; ! ; ! break;} ! case 507: ! #line 2302 "c-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids `goto *expr;'"); stmt_count++; yyvsp[-1].ttype = convert (ptr_type_node, yyvsp[-1].ttype); ! yyval.ttype = add_stmt (build_stmt (GOTO_STMT, yyvsp[-1].ttype)); ; ! break;} ! case 508: #line 2308 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 509: ! #line 2316 "c-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-1].ttype, NULL_TREE); ; ! break;} ! case 510: ! #line 2319 "c-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 511: ! #line 2322 "c-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (NULL_TREE, NULL_TREE); ; ! break;} ! case 512: ! #line 2325 "c-parse.y" ! { tree label = define_label (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-4].ttype); stmt_count++; if (label) { *************** yyreduce: *** 4974,5077 **** } else yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 517: ! #line 2327 "c-parse.y" ! { emit_line_note (input_filename, lineno); ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 518: ! #line 2330 "c-parse.y" ! { emit_line_note (input_filename, lineno); ;} ! break; ! ! case 519: ! #line 2335 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 521: ! #line 2342 "c-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 524: #line 2349 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 525: ! #line 2354 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (NULL_TREE, yyvsp[-3].ttype), yyvsp[-1].ttype); ;} ! break; ! ! case 526: #line 2356 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (yyvsp[-5].ttype, yyvsp[-3].ttype), yyvsp[-1].ttype); ;} ! break; ! ! case 527: ! #line 2361 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ;} ! break; ! ! case 528: #line 2363 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ;} ! break; ! ! case 529: ! #line 2373 "c-parse.y" ! { pushlevel (0); ! clear_parm_order (); ! declare_parm_level (0); ;} ! break; ! ! case 530: #line 2377 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ;} ! break; ! ! case 532: ! #line 2385 "c-parse.y" ! { tree parm; if (pedantic) pedwarn ("ISO C forbids forward parameter declarations"); /* Mark the forward decls as such. */ for (parm = getdecls (); parm; parm = TREE_CHAIN (parm)) TREE_ASM_WRITTEN (parm) = 1; ! clear_parm_order (); ;} ! break; ! ! case 533: ! #line 2393 "c-parse.y" ! { /* Dummy action so attributes are in known place ! on parser stack. */ ;} ! break; ! ! case 534: ! #line 2396 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 535: ! #line 2398 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ;} ! break; ! ! case 536: ! #line 2404 "c-parse.y" ! { yyval.ttype = get_parm_info (0); ;} ! break; ! ! case 537: ! #line 2406 "c-parse.y" ! { yyval.ttype = get_parm_info (0); /* Gcc used to allow this as an extension. However, it does not work for all targets, and thus has been disabled. Also, since func (...) and func () are indistinguishable, --- 4362,4450 ---- } else yyval.ttype = NULL_TREE; ! ; ! break;} ! case 513: ! #line 2341 "c-parse.y" ! { emit_line_note (input_filename, lineno); ! yyval.ttype = NULL_TREE; ; ! break;} ! case 514: ! #line 2344 "c-parse.y" ! { emit_line_note (input_filename, lineno); ; ! break;} ! case 515: #line 2349 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 517: #line 2356 "c-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 520: #line 2363 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 521: ! #line 2368 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (NULL_TREE, yyvsp[-3].ttype), yyvsp[-1].ttype); ; ! break;} ! case 522: ! #line 2370 "c-parse.y" ! { yyvsp[-5].ttype = build_string (IDENTIFIER_LENGTH (yyvsp[-5].ttype), ! IDENTIFIER_POINTER (yyvsp[-5].ttype)); ! yyval.ttype = build_tree_list (build_tree_list (yyvsp[-5].ttype, yyvsp[-3].ttype), yyvsp[-1].ttype); ; ! break;} ! case 523: #line 2377 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 524: ! #line 2379 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype); ; ! break;} ! case 525: ! #line 2389 "c-parse.y" ! { pushlevel (0); ! clear_parm_order (); ! declare_parm_level (0); ; ! break;} ! case 526: ! #line 2393 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ; ! break;} ! case 528: ! #line 2401 "c-parse.y" ! { tree parm; if (pedantic) pedwarn ("ISO C forbids forward parameter declarations"); /* Mark the forward decls as such. */ for (parm = getdecls (); parm; parm = TREE_CHAIN (parm)) TREE_ASM_WRITTEN (parm) = 1; ! clear_parm_order (); ; ! break;} ! case 529: ! #line 2409 "c-parse.y" ! { /* Dummy action so attributes are in known place ! on parser stack. */ ; ! break;} ! case 530: ! #line 2412 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 531: ! #line 2414 "c-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; ! break;} ! case 532: ! #line 2420 "c-parse.y" ! { yyval.ttype = get_parm_info (0); ; ! break;} ! case 533: ! #line 2422 "c-parse.y" ! { yyval.ttype = get_parm_info (0); /* Gcc used to allow this as an extension. However, it does not work for all targets, and thus has been disabled. Also, since func (...) and func () are indistinguishable, *************** yyreduce: *** 5079,5202 **** tries to verify that BUILT_IN_NEXT_ARG is being used correctly. */ error ("ISO C requires a named argument before `...'"); ! ;} ! break; ! ! case 538: ! #line 2416 "c-parse.y" ! { yyval.ttype = get_parm_info (1); ;} ! break; ! ! case 539: ! #line 2418 "c-parse.y" ! { yyval.ttype = get_parm_info (0); ;} ! break; ! ! case 540: ! #line 2423 "c-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ;} ! break; ! ! case 541: ! #line 2425 "c-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ;} ! break; ! ! case 542: #line 2432 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 543: ! #line 2437 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 544: ! #line 2442 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 545: ! #line 2445 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 546: ! #line 2451 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 547: ! #line 2459 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 548: ! #line 2464 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 549: ! #line 2469 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 550: ! #line 2472 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 551: ! #line 2478 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 552: ! #line 2484 "c-parse.y" ! { prefix_attributes = chainon (prefix_attributes, yyvsp[-3].ttype); ! all_prefix_attributes = prefix_attributes; ;} ! break; ! ! case 553: ! #line 2493 "c-parse.y" ! { pushlevel (0); clear_parm_order (); ! declare_parm_level (1); ;} ! break; ! ! case 554: ! #line 2497 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ;} ! break; ! ! case 556: ! #line 2505 "c-parse.y" ! { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) error ("`...' in old-style identifier list"); --- 4452,4559 ---- tries to verify that BUILT_IN_NEXT_ARG is being used correctly. */ error ("ISO C requires a named argument before `...'"); ! ; ! break;} ! case 534: #line 2432 "c-parse.y" ! { yyval.ttype = get_parm_info (1); ! parsing_iso_function_signature = true; ! ; ! break;} ! case 535: ! #line 2436 "c-parse.y" ! { yyval.ttype = get_parm_info (0); ; ! break;} ! case 536: ! #line 2441 "c-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; ! break;} ! case 537: ! #line 2443 "c-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; ! break;} ! case 538: ! #line 2450 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 539: ! #line 2455 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 540: ! #line 2460 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 541: ! #line 2463 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 542: ! #line 2469 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 543: ! #line 2477 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 544: ! #line 2482 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 545: ! #line 2487 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 546: ! #line 2490 "c-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 547: ! #line 2496 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 548: ! #line 2502 "c-parse.y" ! { prefix_attributes = chainon (prefix_attributes, yyvsp[-3].ttype); ! all_prefix_attributes = prefix_attributes; ; ! break;} ! case 549: ! #line 2511 "c-parse.y" ! { pushlevel (0); clear_parm_order (); ! declare_parm_level (1); ; ! break;} ! case 550: ! #line 2515 "c-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ; ! break;} ! case 552: ! #line 2523 "c-parse.y" ! { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) error ("`...' in old-style identifier list"); *************** yyreduce: *** 5208,5258 **** || TREE_PURPOSE (yyval.ttype) == 0 || TREE_CODE (TREE_PURPOSE (yyval.ttype)) != PARM_DECL)) YYERROR1; ! ;} ! break; ! ! case 557: ! #line 2523 "c-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;} ! break; ! ! case 558: ! #line 2525 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;} ! break; ! ! case 559: ! #line 2531 "c-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;} ! break; ! ! case 560: ! #line 2533 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;} ! break; ! ! case 561: ! #line 2538 "c-parse.y" ! { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; ;} ! break; ! ! } - /* Line 991 of yacc.c. */ - #line 5246 "c-p10602.c" yyvsp -= yylen; yyssp -= yylen; ! ! YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; ! /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule --- 4565,4622 ---- || TREE_PURPOSE (yyval.ttype) == 0 || TREE_CODE (TREE_PURPOSE (yyval.ttype)) != PARM_DECL)) YYERROR1; ! ; ! break;} ! case 553: ! #line 2541 "c-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; ! break;} ! case 554: ! #line 2543 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; ! break;} ! case 555: ! #line 2549 "c-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; ! break;} ! case 556: ! #line 2551 "c-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; ! break;} ! case 557: ! #line 2556 "c-parse.y" ! { yyval.ttype = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; ! flag_iso = 0; ; ! break;} ! } ! #line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; + #if YYLSP_NEEDED + yylsp -= yylen; + #endif ! #if YYDEBUG ! if (yydebug) ! { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif *++yyvsp = yyval; ! #if YYLSP_NEEDED ! *++yylsp = yyloc; ! #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule *************** yyreduce: *** 5260,5270 **** yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; ! if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; --- 4624,4634 ---- yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTBASE] + *yyssp; ! if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; *************** yyerrlab: *** 5277,5289 **** if (!yyerrstatus) { ++yynerrs; ! #if YYERROR_VERBOSE yyn = yypact[yystate]; ! if (YYPACT_NINF < yyn && yyn < YYLAST) { YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); char *yymsg; int yyx, yycount; --- 4641,4653 ---- if (!yyerrstatus) { ++yynerrs; ! ! #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; ! if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; *************** yyerrlab: *** 5292,5306 **** YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("syntax error, unexpected ") + 1; ! yysize += yystrlen (yytname[yytype]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); ! yyp = yystpcpy (yyp, yytname[yytype]); if (yycount < 5) { --- 4656,4670 ---- YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("parse error, unexpected ") + 1; ! yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "parse error, unexpected "); ! yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { *************** yyerrlab: *** 5308,5314 **** for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); --- 4672,4678 ---- for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); *************** yyerrlab: *** 5320,5411 **** YYSTACK_FREE (yymsg); } else ! yyerror ("syntax error; also virtual memory exhausted"); } else ! #endif /* YYERROR_VERBOSE */ ! yyerror ("syntax error"); } ! if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* Return failure if at end of input. */ if (yychar == YYEOF) ! { ! /* Pop the error token. */ ! YYPOPSTACK; ! /* Pop the rest of the stack. */ ! while (yyss < yyssp) ! { ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[*yyssp], yyvsp); ! YYPOPSTACK; ! } ! YYABORT; ! } ! ! YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); ! yydestruct (yytoken, &yylval); yychar = YYEMPTY; - } /* Else will try to reuse lookahead token after shifting the error token. */ - goto yyerrlab2; ! /*----------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action. | ! `----------------------------------------------------*/ ! yyerrlab1: - /* Suppress GCC warning that yyerrlab1 is unused when no action - invokes YYERROR. */ - #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) - __attribute__ ((__unused__)); - #endif ! goto yyerrlab2; /*---------------------------------------------------------------. ! | yyerrlab2 -- pop states until the error token can be shifted. | `---------------------------------------------------------------*/ ! yyerrlab2: ! yyerrstatus = 3; /* Each real token shifted decrements this. */ ! for (;;) { ! yyn = yypact[yystate]; ! if (yyn != YYPACT_NINF) ! { ! yyn += YYTERROR; ! if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) ! { ! yyn = yytable[yyn]; ! if (0 < yyn) ! break; ! } ! } ! /* Pop the current state because it cannot handle the error token. */ ! if (yyssp == yyss) ! YYABORT; ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[yystate], yyvsp); ! yyvsp--; ! yystate = *--yyssp; ! YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; --- 4684,4785 ---- YYSTACK_FREE (yymsg); } else ! yyerror ("parse error; also virtual memory exhausted"); } else ! #endif /* defined (YYERROR_VERBOSE) */ ! yyerror ("parse error"); } + goto yyerrlab1; ! /*--------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action | ! `--------------------------------------------------*/ ! yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* return failure if at end of input */ if (yychar == YYEOF) ! YYABORT; ! YYDPRINTF ((stderr, "Discarding token %d (%s).\n", ! yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ + yyerrstatus = 3; /* Each real token shifted decrements this */ ! goto yyerrhandle; + /*-------------------------------------------------------------------. + | yyerrdefault -- current state does not do anything special for the | + | error token. | + `-------------------------------------------------------------------*/ + yyerrdefault: + #if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ ! /* If its default is to accept any token, ok. Otherwise pop it. */ ! yyn = yydefact[yystate]; ! if (yyn) ! goto yydefault; ! #endif /*---------------------------------------------------------------. ! | yyerrpop -- pop the current state because it cannot handle the | ! | error token | `---------------------------------------------------------------*/ ! yyerrpop: ! if (yyssp == yyss) ! YYABORT; ! yyvsp--; ! yystate = *--yyssp; ! #if YYLSP_NEEDED ! yylsp--; ! #endif ! #if YYDEBUG ! if (yydebug) { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "Error: state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif ! /*--------------. ! | yyerrhandle. | ! `--------------*/ ! yyerrhandle: ! yyn = yypact[yystate]; ! if (yyn == YYFLAG) ! goto yyerrdefault; ! yyn += YYTERROR; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) ! goto yyerrdefault; ! yyn = yytable[yyn]; ! if (yyn < 0) ! { ! if (yyn == YYFLAG) ! goto yyerrpop; ! yyn = -yyn; ! goto yyreduce; } + else if (yyn == 0) + goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; *************** yyerrlab2: *** 5413,5419 **** YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! yystate = yyn; goto yynewstate; --- 4787,4795 ---- YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif yystate = yyn; goto yynewstate; *************** yyabortlab: *** 5433,5447 **** yyresult = 1; goto yyreturn; ! #ifndef yyoverflow ! /*----------------------------------------------. ! | yyoverflowlab -- parser overflow comes here. | ! `----------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ - #endif yyreturn: #ifndef yyoverflow --- 4809,4821 ---- yyresult = 1; goto yyreturn; ! /*---------------------------------------------. ! | yyoverflowab -- parser overflow comes here. | ! `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow *************** yyreturn: *** 5450,5458 **** #endif return yyresult; } ! ! ! #line 2544 "c-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate --- 4824,4830 ---- #endif return yyresult; } ! #line 2563 "c-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate *************** struct resword *** 5470,5480 **** /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_TRAD 0x01 /* not in traditional C */ ! #define D_C89 0x02 /* not in C89 */ ! #define D_EXT 0x04 /* GCC extension */ ! #define D_EXT89 0x08 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x10 /* Objective C only */ static const struct resword reswords[] = { --- 4842,4851 ---- /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_C89 0x01 /* not in C89 */ ! #define D_EXT 0x02 /* GCC extension */ ! #define D_EXT89 0x04 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x08 /* Objective C only */ static const struct resword reswords[] = { *************** static const struct resword reswords[] = *** 5516,5521 **** --- 4887,4893 ---- { "__restrict__", RID_RESTRICT, 0 }, { "__signed", RID_SIGNED, 0 }, { "__signed__", RID_SIGNED, 0 }, + { "__thread", RID_THREAD, 0 }, { "__typeof", RID_TYPEOF, 0 }, { "__typeof__", RID_TYPEOF, 0 }, { "__unbounded", RID_UNBOUNDED, 0 }, *************** static const struct resword reswords[] = *** 5527,5533 **** { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, D_TRAD }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, --- 4899,4905 ---- { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, 0 }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, *************** static const struct resword reswords[] = *** 5539,5562 **** { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_TRAD|D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_TRAD|D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, D_TRAD }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_TRAD|D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, }; #define N_reswords (sizeof reswords / sizeof (struct resword)) --- 4911,4934 ---- { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, 0 }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, }; #define N_reswords (sizeof reswords / sizeof (struct resword)) *************** static const struct resword reswords[] = *** 5566,5572 **** three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ SCSPEC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, --- 4938,4944 ---- three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ STATIC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, *************** static const short rid_to_yy[RID_MAX] = *** 5584,5589 **** --- 4956,4962 ---- /* RID_BOUNDED */ TYPE_QUAL, /* RID_UNBOUNDED */ TYPE_QUAL, /* RID_COMPLEX */ TYPESPEC, + /* RID_THREAD */ SCSPEC, /* C++ */ /* RID_FRIEND */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 5599,5605 **** /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, --- 4972,4978 ---- /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, *************** static const short rid_to_yy[RID_MAX] = *** 5673,5691 **** /* RID_REINTCAST */ 0, /* RID_STATCAST */ 0, - /* alternate spellings */ - /* RID_AND */ 0, - /* RID_AND_EQ */ 0, - /* RID_NOT */ 0, - /* RID_NOT_EQ */ 0, - /* RID_OR */ 0, - /* RID_OR_EQ */ 0, - /* RID_XOR */ 0, - /* RID_XOR_EQ */ 0, - /* RID_BITAND */ 0, - /* RID_BITOR */ 0, - /* RID_COMPL */ 0, - /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, --- 5046,5051 ---- *************** init_reswords () *** 5708,5717 **** unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) - | (flag_traditional ? D_TRAD : 0) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (c_language != clk_objective_c) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because --- 5068,5076 ---- unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (!flag_objc) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because *************** static int *** 5766,5773 **** yylexname () { tree decl; ! ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); --- 5125,5132 ---- yylexname () { tree decl; ! ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); *************** yylexname () *** 5779,5791 **** /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; --- 5138,5150 ---- /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; *************** yylexname () *** 5802,5807 **** --- 5161,5215 ---- return IDENTIFIER; } + /* Concatenate strings before returning them to the parser. This isn't quite + as good as having it done in the lexer, but it's better than nothing. */ + + static int + yylexstring () + { + enum cpp_ttype next_type; + tree orig = yylval.ttype; + + next_type = c_lex (&yylval.ttype); + if (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)) + { + varray_type strings; + + static int last_lineno = 0; + static const char *last_input_filename = 0; + if (warn_traditional && !in_system_header + && (lineno != last_lineno || !last_input_filename || + strcmp (last_input_filename, input_filename))) + { + warning ("traditional C rejects string concatenation"); + last_lineno = lineno; + last_input_filename = input_filename; + } + + VARRAY_TREE_INIT (strings, 32, "strings"); + VARRAY_PUSH_TREE (strings, orig); + + do + { + VARRAY_PUSH_TREE (strings, yylval.ttype); + next_type = c_lex (&yylval.ttype); + } + while (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)); + + yylval.ttype = combine_strings (strings); + } + else + yylval.ttype = orig; + + /* We will have always read one token too many. */ + _cpp_backup_tokens (parse_in, 1); + + return STRING; + } static inline int _yylex () *************** _yylex () *** 5868,5874 **** return 0; case CPP_NAME: ! return yylexname (); case CPP_NUMBER: case CPP_CHAR: --- 5276,5288 ---- return 0; case CPP_NAME: ! { ! int ret = yylexname (); ! if (ret == STRING) ! return yylexstring (); ! else ! return ret; ! } case CPP_NUMBER: case CPP_CHAR: *************** _yylex () *** 5877,5884 **** case CPP_STRING: case CPP_WSTRING: ! return STRING; ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: --- 5291,5298 ---- case CPP_STRING: case CPP_WSTRING: ! return yylexstring (); ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: *************** yylex() *** 5914,5934 **** return r; } - /* Sets the value of the 'yydebug' variable to VALUE. - This is a function so we don't have to have YYDEBUG defined - in order to build the compiler. */ - - void - c_set_yydebug (value) - int value; - { - #if YYDEBUG != 0 - yydebug = value; - #else - warning ("YYDEBUG not defined"); - #endif - } - /* Function used when yydebug is set, to print a token in more detail. */ static void --- 5328,5333 ---- *************** yyprint (file, yychar, yyl) *** 5940,5946 **** tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: --- 5339,5345 ---- tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: *************** yyprint (file, yychar, yyl) *** 5949,5954 **** --- 5348,5354 ---- case TYPESPEC: case TYPE_QUAL: case SCSPEC: + case STATIC: if (IDENTIFIER_POINTER (t)) fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; *************** yyprint (file, yychar, yyl) *** 5982,6006 **** /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Return something to represent absolute declarators containing a *. ! TARGET is the absolute declarator that the * contains. ! TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers, possible mixed ! with attributes. ! ! We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, ! if attributes are present) and whose type is the modifier list. */ ! tree ! make_pointer_declarator (type_quals_attrs, target) ! tree type_quals_attrs, target; { ! tree quals, attrs; ! tree itarget = target; ! split_specs_attrs (type_quals_attrs, &quals, &attrs); ! if (attrs != NULL_TREE) ! itarget = tree_cons (attrs, target, NULL_TREE); ! return build1 (INDIRECT_REF, quals, itarget); } ! --- 5382,5397 ---- /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Free malloced parser stacks if necessary. */ ! void ! free_parser_stacks () { ! if (malloced_yyss) ! { ! free (malloced_yyss); ! free (malloced_yyvs); ! } } ! #include "gt-c-parse.h" diff -Nrc3pad gcc-3.2.3/gcc/c-parse.in gcc-3.3/gcc/c-parse.in *** gcc-3.2.3/gcc/c-parse.in 2003-01-27 23:17:14.000000000 +0000 --- gcc-3.3/gcc/c-parse.in 2003-01-28 01:54:03.000000000 +0000 *************** *** 1,6 **** /* YACC parser for C syntax and for Objective C. -*-c-*- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GCC. --- 1,6 ---- /* YACC parser for C syntax and for Objective C. -*-c-*- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. *************** end ifc *** 40,53 **** #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-lex.h" #include "c-tree.h" - #include "c-pragma.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif --- 40,52 ---- #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */ #include "c-tree.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif *************** end ifobjc *** 59,69 **** /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Cause the "yydebug" variable to be defined. */ ! #define YYDEBUG 1 ! /* Rename the "yyparse" function so that we can override it elsewhere. */ ! #define yyparse yyparse_1 %} %start program --- 58,105 ---- /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Like the default stack expander, except (1) use realloc when possible, ! (2) impose no hard maxiumum on stack size, (3) REALLY do not use alloca. ! Irritatingly, YYSTYPE is defined after this %{ %} block, so we cannot ! give malloced_yyvs its proper type. This is ok since all we need from ! it is to be able to free it. */ ! ! static short *malloced_yyss; ! static void *malloced_yyvs; ! ! #define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ) \ ! do { \ ! size_t newsize; \ ! short *newss; \ ! YYSTYPE *newvs; \ ! newsize = *(YYSSZ) *= 2; \ ! if (malloced_yyss) \ ! { \ ! newss = (short *) \ ! really_call_realloc (*(SS), newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) \ ! really_call_realloc (*(VS), newsize * sizeof (YYSTYPE)); \ ! } \ ! else \ ! { \ ! newss = (short *) really_call_malloc (newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) really_call_malloc (newsize * sizeof (YYSTYPE)); \ ! if (newss) \ ! memcpy (newss, *(SS), (SSSIZE)); \ ! if (newvs) \ ! memcpy (newvs, *(VS), (VSSIZE)); \ ! } \ ! if (!newss || !newvs) \ ! { \ ! yyerror (MSG); \ ! return 2; \ ! } \ ! *(SS) = newss; \ ! *(VS) = newvs; \ ! malloced_yyss = newss; \ ! malloced_yyvs = (void *) newvs; \ ! } while (0) %} %start program *************** end ifobjc *** 82,88 **** /* Reserved words that specify storage class. yylval contains an IDENTIFIER_NODE which indicates which one. */ ! %token SCSPEC /* Reserved words that specify type. yylval contains an IDENTIFIER_NODE which indicates which one. */ --- 118,125 ---- /* Reserved words that specify storage class. yylval contains an IDENTIFIER_NODE which indicates which one. */ ! %token SCSPEC /* Storage class other than static. */ ! %token STATIC /* Static storage class. */ /* Reserved words that specify type. yylval contains an IDENTIFIER_NODE which indicates which one. */ *************** end ifobjc *** 148,154 **** %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF %type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist ! %type expr_no_commas cast_expr unary_expr primary string STRING %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea --- 185,191 ---- %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF %type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist ! %type expr_no_commas cast_expr unary_expr primary STRING %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea *************** end ifobjc *** 164,170 **** %type typespec_reserved_nonattr typespec_reserved_attr %type typespec_nonreserved_nonattr ! %type SCSPEC TYPESPEC TYPE_QUAL maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers --- 201,207 ---- %type typespec_reserved_nonattr typespec_reserved_attr %type typespec_nonreserved_nonattr ! %type scspec SCSPEC STATIC TYPESPEC TYPE_QUAL maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers *************** ifobjc *** 215,242 **** end ifobjc %{ ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static tree current_declspecs = NULL_TREE; ! static tree prefix_attributes = NULL_TREE; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static tree all_prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ --- 252,279 ---- end ifobjc %{ ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static GTY(()) tree current_declspecs; ! static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static GTY(()) tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ *************** static tree declspec_stack; *** 258,274 **** /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2)) ! #define RESTORE_WARN_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ } while (0) ifobjc --- 295,313 ---- /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_EXT_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2) \ ! | (flag_iso << 3)) ! #define RESTORE_EXT_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ + flag_iso = (val >> 3) & 1; \ } while (0) ifobjc *************** static enum tree_code objc_inherit_code; *** 278,285 **** static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. ! In some cases (e.g., 'int NSObject;'), it is undesirable to bind ! an identifier to an ObjC class, even if a class with that name exists. */ static int objc_need_raw_identifier; #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL --- 317,324 ---- static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. ! In some cases (e.g., 'int NSObject;'), it is undesirable to bind ! an identifier to an ObjC class, even if a class with that name exists. */ static int objc_need_raw_identifier; #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL *************** ifc *** 289,294 **** --- 328,335 ---- #define OBJC_NEED_RAW_IDENTIFIER(VAL) /* nothing */ end ifc + static bool parsing_iso_function_signature; + /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) *************** end ifc *** 296,315 **** static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Add GC roots for variables local to this file. */ void c_parse_init () { init_reswords (); - - ggc_add_tree_root (&declspec_stack, 1); - ggc_add_tree_root (¤t_declspecs, 1); - ggc_add_tree_root (&prefix_attributes, 1); - ggc_add_tree_root (&all_prefix_attributes, 1); } %} --- 337,352 ---- static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); + static int yylexstring PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Initialisation routine for this file. */ void c_parse_init () { init_reswords (); } %} *************** program: /* empty */ *** 326,334 **** get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); ! ifc finish_fname_decls (); - end ifc finish_file (); } ; --- 363,372 ---- get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); ! /* __FUNCTION__ is defined at file scope (""). This ! call may not be necessary as my tests indicate it ! still works without it. */ finish_fname_decls (); finish_file (); } ; *************** extdefs: *** 343,348 **** --- 381,391 ---- ; extdef: + extdef_1 + { parsing_iso_function_signature = false; } /* Reset after any external definition. */ + ; + + extdef_1: fndef | datadef ifobjc *************** end ifobjc *** 357,371 **** else error ("argument of `asm' is not a constant string"); } | extension extdef ! { RESTORE_WARN_FLAGS ($1); } ; datadef: setspecs notype_initdecls ';' { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else if (!flag_traditional) ! warning ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' --- 400,414 ---- else error ("argument of `asm' is not a constant string"); } | extension extdef ! { RESTORE_EXT_FLAGS ($1); } ; datadef: setspecs notype_initdecls ';' { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else ! warning ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' *************** fndef: *** 392,398 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } --- 435,441 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } *************** fndef: *** 406,412 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } --- 449,455 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } *************** fndef: *** 420,426 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | setspecs notype_declarator error { POP_DECLSPEC_STACK; } --- 463,469 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | setspecs notype_declarator error { POP_DECLSPEC_STACK; } *************** unary_expr: *** 480,507 **** /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; ! RESTORE_WARN_FLAGS ($1); } | unop cast_expr %prec UNARY { $$ = build_unary_op ($1, $2, 0); overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier { $$ = finish_label_address_expr ($2); } - /* This seems to be impossible on some machines, so let's turn it off. - You can use __builtin_next_arg to find the anonymous stack args. - | '&' ELLIPSIS - { tree types = TYPE_ARG_TYPES (TREE_TYPE (current_function_decl)); - $$ = error_mark_node; - if (TREE_VALUE (tree_last (types)) == void_type_node) - error ("`&...' used in function with fixed number of arguments"); - else - { - if (pedantic) - pedwarn ("ISO C forbids `&...'"); - $$ = tree_last (DECL_ARGUMENTS (current_function_decl)); - $$ = build_unary_op (ADDR_EXPR, $$, 0); - } } - */ | sizeof unary_expr %prec UNARY { skip_evaluation--; if (TREE_CODE ($2) == COMPONENT_REF --- 523,535 ---- /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; ! RESTORE_EXT_FLAGS ($1); } | unop cast_expr %prec UNARY { $$ = build_unary_op ($1, $2, 0); overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier { $$ = finish_label_address_expr ($2); } | sizeof unary_expr %prec UNARY { skip_evaluation--; if (TREE_CODE ($2) == COMPONENT_REF *************** expr_no_commas: *** 568,586 **** | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr_no_commas { skip_evaluation -= $1 == boolean_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_true_node; } expr_no_commas { skip_evaluation -= $1 == boolean_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr ':' { skip_evaluation += (($1 == boolean_true_node) --- 596,617 ---- | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr_no_commas { skip_evaluation -= $1 == boolean_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_true_node; } expr_no_commas { skip_evaluation -= $1 == boolean_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr ':' { skip_evaluation += (($1 == boolean_true_node) *************** expr_no_commas: *** 593,599 **** pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ $2 = save_expr ($1); ! $1 = truthvalue_conversion (default_conversion ($2)); skip_evaluation += $1 == boolean_true_node; } ':' expr_no_commas { skip_evaluation -= $1 == boolean_true_node; --- 624,631 ---- pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ $2 = save_expr ($1); ! $1 = c_common_truthvalue_conversion ! (default_conversion ($2)); skip_evaluation += $1 == boolean_true_node; } ':' expr_no_commas { skip_evaluation -= $1 == boolean_true_node; *************** expr_no_commas: *** 608,614 **** | expr_no_commas ASSIGN expr_no_commas { char class; $$ = build_modify_expr ($1, $2, $3); ! /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); --- 640,647 ---- | expr_no_commas ASSIGN expr_no_commas { char class; $$ = build_modify_expr ($1, $2, $3); ! /* This inhibits warnings in ! c_common_truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); *************** primary: *** 623,633 **** $$ = build_external_ref ($1, yychar == '('); } | CONSTANT ! | string ! { $$ = combine_strings ($1); } | VAR_FUNC_NAME { $$ = fname_decl (C_RID_CODE ($$), $$); } ! | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } --- 656,666 ---- $$ = build_external_ref ($1, yychar == '('); } | CONSTANT ! | STRING ! { $$ = fix_string_type ($$); } | VAR_FUNC_NAME { $$ = fname_decl (C_RID_CODE ($$), $$); } ! | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } *************** ifobjc *** 735,763 **** end ifobjc ; - /* Produces a STRING_CST with perhaps more STRING_CSTs chained onto it. */ - string: - STRING - | string STRING - { - ifc - static int last_lineno = 0; - static const char *last_input_filename = 0; - end ifc - $$ = chainon ($1, $2); - ifc - if (warn_traditional && !in_system_header - && (lineno != last_lineno || !last_input_filename || - strcmp (last_input_filename, input_filename))) - { - warning ("traditional C rejects string concatenation"); - last_lineno = lineno; - last_input_filename = input_filename; - } - end ifc - } - ; - ifobjc /* Produces an STRING_CST with perhaps more STRING_CSTs chained onto it, which is to be read as an ObjC string object. */ --- 768,773 ---- *************** objc_string: *** 770,782 **** end ifobjc old_style_parm_decls: /* empty */ | datadecls - | datadecls ELLIPSIS - /* ... is used here to indicate a varargs function. */ - { c_mark_varargs (); - if (pedantic) - pedwarn ("ISO C does not permit use of `varargs.h'"); } ; /* The following are analogous to lineno_decl, decls and decl --- 780,800 ---- end ifobjc old_style_parm_decls: + old_style_parm_decls_1 + { + parsing_iso_function_signature = false; /* Reset after decls. */ + } + ; + + old_style_parm_decls_1: /* empty */ + { + if (warn_traditional && !in_system_header + && parsing_iso_function_signature) + warning ("traditional C rejects ISO C style function definitions"); + parsing_iso_function_signature = false; /* Reset after warning. */ + } | datadecls ; /* The following are analogous to lineno_decl, decls and decl *************** decl: *** 850,861 **** | declspecs ';' { shadow_tag ($1); } | extension decl ! { RESTORE_WARN_FLAGS ($1); } ; /* A list of declaration specifiers. These are: ! - Storage class specifiers (SCSPEC), which for GCC currently include function specifiers ("inline"). - Type specifiers (typespec_*). --- 868,879 ---- | declspecs ';' { shadow_tag ($1); } | extension decl ! { RESTORE_EXT_FLAGS ($1); } ; /* A list of declaration specifiers. These are: ! - Storage class specifiers (scspec), which for GCC currently includes function specifiers ("inline"). - Type specifiers (typespec_*). *************** declspecs_nosc_ts_sa_ea: *** 1026,1032 **** ; declspecs_sc_nots_nosa_noea: ! SCSPEC { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL --- 1044,1050 ---- ; declspecs_sc_nots_nosa_noea: ! scspec { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL *************** declspecs_sc_nots_nosa_noea: *** 1035,1059 **** | declspecs_sc_nots_nosa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1053,1077 ---- | declspecs_sc_nots_nosa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_nots_sa_noea: *** 1074,1098 **** | declspecs_sc_nots_sa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1092,1116 ---- | declspecs_sc_nots_sa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_ts_nosa_noea: *** 1125,1149 **** | declspecs_sc_nots_nosa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1143,1167 ---- | declspecs_sc_nots_nosa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_ts_sa_noea: *** 1188,1212 **** | declspecs_sc_nots_sa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1206,1230 ---- | declspecs_sc_nots_sa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** notype_initdecls: *** 1398,1407 **** maybeasm: /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' string ')' ! { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); ! $$ = $3; ! } ; initdcl: --- 1416,1423 ---- maybeasm: /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' STRING ')' ! { $$ = $3; } ; initdcl: *************** initdcl: *** 1416,1422 **** | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; --- 1432,1438 ---- | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; *************** maybe_attribute: *** 1442,1448 **** | attributes { $$ = $1; } ; ! attributes: attribute { $$ = $1; } --- 1458,1464 ---- | attributes { $$ = $1; } ; ! attributes: attribute { $$ = $1; } *************** attribute_list: *** 1461,1467 **** | attribute_list ',' attrib { $$ = chainon ($1, $3); } ; ! attrib: /* empty */ { $$ = NULL_TREE; } --- 1477,1483 ---- | attribute_list ',' attrib { $$ = chainon ($1, $3); } ; ! attrib: /* empty */ { $$ = NULL_TREE; } *************** attrib: *** 1480,1489 **** any_word: identifier ! | SCSPEC | TYPESPEC | TYPE_QUAL ; /* Initializers. `init' is the entry point. */ --- 1496,1510 ---- any_word: identifier ! | scspec | TYPESPEC | TYPE_QUAL ; + + scspec: + STATIC + | SCSPEC + ; /* Initializers. `init' is the entry point. */ *************** designator_list: *** 1546,1562 **** designator: '.' identifier { set_init_label ($2); } - /* These are for labeled elements. The syntax for an array element - initializer conflicts with the syntax for an Objective-C message, - so don't include these productions in the Objective-C grammar. */ - ifc | '[' expr_no_commas ELLIPSIS expr_no_commas ']' { set_init_index ($2, $4); if (pedantic) pedwarn ("ISO C forbids specifying range of elements to initialize"); } | '[' expr_no_commas ']' { set_init_index ($2, NULL_TREE); } - end ifc ; nested_function: --- 1567,1578 ---- *************** nested_function: *** 1571,1576 **** --- 1587,1593 ---- pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } *************** nested_function: *** 1585,1591 **** DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; --- 1602,1608 ---- DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; *************** notype_nested_function: *** 1601,1606 **** --- 1618,1624 ---- pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } *************** notype_nested_function: *** 1615,1621 **** DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; --- 1633,1639 ---- DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; *************** structsp_attr: *** 1736,1742 **** { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } ! component_decl_list '}' maybe_attribute { $$ = finish_struct ($4, $5, chainon ($1, $7)); } | struct_head '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), --- 1754,1760 ---- { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } ! component_decl_list '}' maybe_attribute { $$ = finish_struct ($4, $5, chainon ($1, $7)); } | struct_head '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), *************** component_decl: *** 1826,1833 **** POP_DECLSPEC_STACK; } | declspecs_nosc_ts setspecs save_filename save_lineno { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); --- 1844,1851 ---- POP_DECLSPEC_STACK; } | declspecs_nosc_ts setspecs save_filename save_lineno { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); *************** component_decl: *** 1846,1852 **** { $$ = NULL_TREE; } | extension component_decl { $$ = $2; ! RESTORE_WARN_FLAGS ($1); } ; components: --- 1864,1870 ---- { $$ = NULL_TREE; } | extension component_decl { $$ = $2; ! RESTORE_EXT_FLAGS ($1); } ; components: *************** direct_absdcl1: *** 1974,2003 **** /* The [...] part of a declarator for an array type. */ array_declarator: ! '[' expr ']' ! { $$ = build_array_declarator ($2, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } ! | '[' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } ! | '[' '*' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); } ! | '[' declspecs_nosc '*' ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } ! | '[' SCSPEC expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($3, NULL_TREE, 1, 0); } ! | '[' SCSPEC declspecs_nosc expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $3, 1, 0); } ! | '[' declspecs_nosc SCSPEC expr ']' ! { if (C_RID_CODE ($3) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by --- 1992,2008 ---- /* The [...] part of a declarator for an array type. */ array_declarator: ! '[' maybe_type_quals_attrs expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } ! | '[' maybe_type_quals_attrs ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } ! | '[' maybe_type_quals_attrs '*' ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } ! | '[' STATIC maybe_type_quals_attrs expr ']' ! { $$ = build_array_declarator ($4, $3, 1, 0); } ! /* declspecs_nosc_nots is a synonym for type_quals_attrs. */ ! | '[' declspecs_nosc_nots STATIC expr ']' ! { $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by *************** c99_block_end: /* empty */ *** 2096,2103 **** { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! $$ = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = $$; } --- 2101,2108 ---- { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! $$ = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = $$; } *************** compstmt_start: '{' { compstmt_count++; *** 2146,2153 **** compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel ! { $$ = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) = $$; } ; --- 2151,2158 ---- compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel ! { $$ = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) = $$; } ; *************** compstmt_primary_start: *** 2176,2182 **** ; compstmt: compstmt_start compstmt_nostart ! { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); last_expr_type = NULL_TREE; $$ = $1; } ; --- 2181,2187 ---- ; compstmt: compstmt_start compstmt_nostart ! { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); last_expr_type = NULL_TREE; $$ = $1; } ; *************** if_prefix: *** 2203,2209 **** IF { $$ = c_begin_if_stmt (); } '(' expr ')' ! { c_expand_start_cond (truthvalue_conversion ($4), compstmt_count,$2); $$ = stmt_count; if_stmt_file = $-2; --- 2208,2214 ---- IF { $$ = c_begin_if_stmt (); } '(' expr ')' ! { c_expand_start_cond (c_common_truthvalue_conversion ($4), compstmt_count,$2); $$ = stmt_count; if_stmt_file = $-2; *************** do_stmt_start: *** 2217,2223 **** DO { stmt_count++; compstmt_count++; ! $$ = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents --- 2222,2228 ---- DO { stmt_count++; compstmt_count++; ! $$ = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents *************** select_or_iter_stmt: *** 2312,2341 **** we later pass to c_finish_while_stmt_cond to fill in the condition and other tidbits. */ | WHILE ! { stmt_count++; $$ = c_begin_while_stmt (); } '(' expr ')' ! { $4 = truthvalue_conversion ($4); ! c_finish_while_stmt_cond (truthvalue_conversion ($4), ! $2); $$ = add_stmt ($2); } c99_block_lineno_labeled_stmt { RECHAIN_STMTS ($6, WHILE_BODY ($6)); } | do_stmt_start '(' expr ')' ';' ! { DO_COND ($1) = truthvalue_conversion ($3); } | do_stmt_start error { } | FOR { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt ($$); } '(' for_init_stmt { stmt_count++; RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } xexpr ';' ! { if ($6) ! FOR_COND ($2) = truthvalue_conversion ($6); } xexpr ')' { FOR_EXPR ($2) = $9; } c99_block_lineno_labeled_stmt --- 2317,2347 ---- we later pass to c_finish_while_stmt_cond to fill in the condition and other tidbits. */ | WHILE ! { stmt_count++; $$ = c_begin_while_stmt (); } '(' expr ')' ! { $4 = c_common_truthvalue_conversion ($4); ! c_finish_while_stmt_cond ! (c_common_truthvalue_conversion ($4), $2); $$ = add_stmt ($2); } c99_block_lineno_labeled_stmt { RECHAIN_STMTS ($6, WHILE_BODY ($6)); } | do_stmt_start '(' expr ')' ';' ! { DO_COND ($1) = c_common_truthvalue_conversion ($3); } | do_stmt_start error { } | FOR { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt ($$); } '(' for_init_stmt { stmt_count++; RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } xexpr ';' ! { if ($6) ! FOR_COND ($2) ! = c_common_truthvalue_conversion ($6); } xexpr ')' { FOR_EXPR ($2) = $9; } c99_block_lineno_labeled_stmt *************** select_or_iter_stmt: *** 2349,2355 **** for_init_stmt: xexpr ';' ! { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; --- 2355,2361 ---- for_init_stmt: xexpr ';' ! { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; *************** asm_operand: *** 2475,2488 **** STRING '(' expr ')' { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } | '[' identifier ']' STRING '(' expr ')' ! { $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: ! string ! { $$ = tree_cons (NULL_TREE, combine_strings ($1), NULL_TREE); } ! | asm_clobbers ',' string ! { $$ = tree_cons (NULL_TREE, combine_strings ($3), $1); } ; /* This is what appears inside the parens in a function declarator. --- 2481,2496 ---- STRING '(' expr ')' { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } | '[' identifier ']' STRING '(' expr ')' ! { $2 = build_string (IDENTIFIER_LENGTH ($2), ! IDENTIFIER_POINTER ($2)); ! $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: ! STRING ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } ! | asm_clobbers ',' STRING ! { $$ = tree_cons (NULL_TREE, $3, $1); } ; /* This is what appears inside the parens in a function declarator. *************** parmlist_2: /* empty */ *** 2535,2541 **** error ("ISO C requires a named argument before `...'"); } | parms ! { $$ = get_parm_info (1); } | parms ',' ELLIPSIS { $$ = get_parm_info (0); } ; --- 2543,2551 ---- error ("ISO C requires a named argument before `...'"); } | parms ! { $$ = get_parm_info (1); ! parsing_iso_function_signature = true; ! } | parms ',' ELLIPSIS { $$ = get_parm_info (0); } ; *************** parm: *** 2558,2564 **** | declspecs_ts setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; --- 2568,2574 ---- | declspecs_ts setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; *************** firstparm: *** 2585,2591 **** | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; --- 2595,2601 ---- | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; *************** identifiers_or_typenames: *** 2657,2666 **** extension: EXTENSION ! { $$ = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; } ; ifobjc --- 2667,2677 ---- extension: EXTENSION ! { $$ = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; ! flag_iso = 0; } ; ifobjc *************** receiver: *** 3212,3225 **** ; objcmessageexpr: ! '[' ! { objc_receiver_context = 1; } ! receiver ! { objc_receiver_context = 0; } ! messageargs ']' ! { ! $$ = build_tree_list ($3, $5); ! } ; selectorarg: --- 3223,3230 ---- ; objcmessageexpr: ! '[' receiver messageargs ']' ! { $$ = build_tree_list ($2, $3); } ; selectorarg: *************** struct resword *** 3287,3297 **** /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_TRAD 0x01 /* not in traditional C */ ! #define D_C89 0x02 /* not in C89 */ ! #define D_EXT 0x04 /* GCC extension */ ! #define D_EXT89 0x08 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x10 /* Objective C only */ static const struct resword reswords[] = { --- 3292,3301 ---- /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_C89 0x01 /* not in C89 */ ! #define D_EXT 0x02 /* GCC extension */ ! #define D_EXT89 0x04 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x08 /* Objective C only */ static const struct resword reswords[] = { *************** static const struct resword reswords[] = *** 3333,3338 **** --- 3337,3343 ---- { "__restrict__", RID_RESTRICT, 0 }, { "__signed", RID_SIGNED, 0 }, { "__signed__", RID_SIGNED, 0 }, + { "__thread", RID_THREAD, 0 }, { "__typeof", RID_TYPEOF, 0 }, { "__typeof__", RID_TYPEOF, 0 }, { "__unbounded", RID_UNBOUNDED, 0 }, *************** static const struct resword reswords[] = *** 3344,3350 **** { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, D_TRAD }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, --- 3349,3355 ---- { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, 0 }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, *************** static const struct resword reswords[] = *** 3356,3379 **** { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_TRAD|D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_TRAD|D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, D_TRAD }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_TRAD|D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, ifobjc { "id", RID_ID, D_OBJC }, --- 3361,3384 ---- { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, 0 }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, ifobjc { "id", RID_ID, D_OBJC }, *************** end ifobjc *** 3410,3416 **** three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ SCSPEC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, --- 3415,3421 ---- three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ STATIC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, *************** static const short rid_to_yy[RID_MAX] = *** 3428,3433 **** --- 3433,3439 ---- /* RID_BOUNDED */ TYPE_QUAL, /* RID_UNBOUNDED */ TYPE_QUAL, /* RID_COMPLEX */ TYPESPEC, + /* RID_THREAD */ SCSPEC, /* C++ */ /* RID_FRIEND */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 3443,3449 **** /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, --- 3449,3455 ---- /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, *************** static const short rid_to_yy[RID_MAX] = *** 3517,3535 **** /* RID_REINTCAST */ 0, /* RID_STATCAST */ 0, - /* alternate spellings */ - /* RID_AND */ 0, - /* RID_AND_EQ */ 0, - /* RID_NOT */ 0, - /* RID_NOT_EQ */ 0, - /* RID_OR */ 0, - /* RID_OR_EQ */ 0, - /* RID_XOR */ 0, - /* RID_XOR_EQ */ 0, - /* RID_BITAND */ 0, - /* RID_BITOR */ 0, - /* RID_COMPL */ 0, - /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, --- 3523,3528 ---- *************** init_reswords () *** 3552,3561 **** unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) - | (flag_traditional ? D_TRAD : 0) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (c_language != clk_objective_c) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because --- 3545,3553 ---- unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (!flag_objc) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because *************** static int *** 3610,3621 **** yylexname () { tree decl; ! ifobjc int objc_force_identifier = objc_need_raw_identifier; OBJC_NEED_RAW_IDENTIFIER (0); end ifobjc ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); --- 3602,3613 ---- yylexname () { tree decl; ! ifobjc int objc_force_identifier = objc_need_raw_identifier; OBJC_NEED_RAW_IDENTIFIER (0); end ifobjc ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); *************** end ifobjc *** 3640,3652 **** /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; --- 3632,3644 ---- /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; *************** ifobjc *** 3665,3672 **** tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ ! if (objc_interface_decl ! && (global_bindings_p () || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; --- 3657,3664 ---- tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ ! if (objc_interface_decl ! && (global_bindings_p () || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; *************** end ifobjc *** 3678,3683 **** --- 3670,3726 ---- return IDENTIFIER; } + /* Concatenate strings before returning them to the parser. This isn't quite + as good as having it done in the lexer, but it's better than nothing. */ + + static int + yylexstring () + { + enum cpp_ttype next_type; + tree orig = yylval.ttype; + + next_type = c_lex (&yylval.ttype); + if (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)) + { + varray_type strings; + + ifc + static int last_lineno = 0; + static const char *last_input_filename = 0; + if (warn_traditional && !in_system_header + && (lineno != last_lineno || !last_input_filename || + strcmp (last_input_filename, input_filename))) + { + warning ("traditional C rejects string concatenation"); + last_lineno = lineno; + last_input_filename = input_filename; + } + end ifc + + VARRAY_TREE_INIT (strings, 32, "strings"); + VARRAY_PUSH_TREE (strings, orig); + + do + { + VARRAY_PUSH_TREE (strings, yylval.ttype); + next_type = c_lex (&yylval.ttype); + } + while (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)); + + yylval.ttype = combine_strings (strings); + } + else + yylval.ttype = orig; + + /* We will have always read one token too many. */ + _cpp_backup_tokens (parse_in, 1); + + return STRING; + } static inline int _yylex () *************** _yylex () *** 3744,3750 **** return 0; case CPP_NAME: ! return yylexname (); case CPP_NUMBER: case CPP_CHAR: --- 3787,3799 ---- return 0; case CPP_NAME: ! { ! int ret = yylexname (); ! if (ret == STRING) ! return yylexstring (); ! else ! return ret; ! } case CPP_NUMBER: case CPP_CHAR: *************** _yylex () *** 3753,3760 **** case CPP_STRING: case CPP_WSTRING: ! return STRING; ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: --- 3802,3809 ---- case CPP_STRING: case CPP_WSTRING: ! return yylexstring (); ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: *************** yylex() *** 3809,3829 **** return r; } - /* Sets the value of the 'yydebug' variable to VALUE. - This is a function so we don't have to have YYDEBUG defined - in order to build the compiler. */ - - void - c_set_yydebug (value) - int value; - { - #if YYDEBUG != 0 - yydebug = value; - #else - warning ("YYDEBUG not defined"); - #endif - } - /* Function used when yydebug is set, to print a token in more detail. */ static void --- 3858,3863 ---- *************** yyprint (file, yychar, yyl) *** 3835,3841 **** tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: --- 3869,3875 ---- tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: *************** yyprint (file, yychar, yyl) *** 3844,3849 **** --- 3878,3884 ---- case TYPESPEC: case TYPE_QUAL: case SCSPEC: + case STATIC: if (IDENTIFIER_POINTER (t)) fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; *************** yyprint (file, yychar, yyl) *** 3877,3899 **** /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Return something to represent absolute declarators containing a *. ! TARGET is the absolute declarator that the * contains. ! TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers, possible mixed ! with attributes. ! ! We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, ! if attributes are present) and whose type is the modifier list. */ ! tree ! make_pointer_declarator (type_quals_attrs, target) ! tree type_quals_attrs, target; { ! tree quals, attrs; ! tree itarget = target; ! split_specs_attrs (type_quals_attrs, &quals, &attrs); ! if (attrs != NULL_TREE) ! itarget = tree_cons (attrs, target, NULL_TREE); ! return build1 (INDIRECT_REF, quals, itarget); } --- 3912,3927 ---- /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Free malloced parser stacks if necessary. */ ! void ! free_parser_stacks () { ! if (malloced_yyss) ! { ! free (malloced_yyss); ! free (malloced_yyvs); ! } } + + #include "gt-c-parse.h" diff -Nrc3pad gcc-3.2.3/gcc/c-parse.y gcc-3.3/gcc/c-parse.y *** gcc-3.2.3/gcc/c-parse.y 2003-04-22 07:00:32.000000000 +0000 --- gcc-3.3/gcc/c-parse.y 2003-05-14 00:20:40.000000000 +0000 *************** *** 1,7 **** /*WARNING: This file is automatically generated!*/ /* YACC parser for C syntax and for Objective C. -*-c-*- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GCC. --- 1,7 ---- /*WARNING: This file is automatically generated!*/ /* YACC parser for C syntax and for Objective C. -*-c-*- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 39,52 **** #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-lex.h" #include "c-tree.h" - #include "c-pragma.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif --- 39,51 ---- #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */ #include "c-tree.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif *************** Software Foundation, 59 Temple Place - S *** 55,65 **** /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Cause the "yydebug" variable to be defined. */ ! #define YYDEBUG 1 ! /* Rename the "yyparse" function so that we can override it elsewhere. */ ! #define yyparse yyparse_1 %} %start program --- 54,101 ---- /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Like the default stack expander, except (1) use realloc when possible, ! (2) impose no hard maxiumum on stack size, (3) REALLY do not use alloca. ! Irritatingly, YYSTYPE is defined after this %{ %} block, so we cannot ! give malloced_yyvs its proper type. This is ok since all we need from ! it is to be able to free it. */ ! ! static short *malloced_yyss; ! static void *malloced_yyvs; ! ! #define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ) \ ! do { \ ! size_t newsize; \ ! short *newss; \ ! YYSTYPE *newvs; \ ! newsize = *(YYSSZ) *= 2; \ ! if (malloced_yyss) \ ! { \ ! newss = (short *) \ ! really_call_realloc (*(SS), newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) \ ! really_call_realloc (*(VS), newsize * sizeof (YYSTYPE)); \ ! } \ ! else \ ! { \ ! newss = (short *) really_call_malloc (newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) really_call_malloc (newsize * sizeof (YYSTYPE)); \ ! if (newss) \ ! memcpy (newss, *(SS), (SSSIZE)); \ ! if (newvs) \ ! memcpy (newvs, *(VS), (VSSIZE)); \ ! } \ ! if (!newss || !newvs) \ ! { \ ! yyerror (MSG); \ ! return 2; \ ! } \ ! *(SS) = newss; \ ! *(VS) = newvs; \ ! malloced_yyss = newss; \ ! malloced_yyvs = (void *) newvs; \ ! } while (0) %} %start program *************** Software Foundation, 59 Temple Place - S *** 78,84 **** /* Reserved words that specify storage class. yylval contains an IDENTIFIER_NODE which indicates which one. */ ! %token SCSPEC /* Reserved words that specify type. yylval contains an IDENTIFIER_NODE which indicates which one. */ --- 114,121 ---- /* Reserved words that specify storage class. yylval contains an IDENTIFIER_NODE which indicates which one. */ ! %token SCSPEC /* Storage class other than static. */ ! %token STATIC /* Static storage class. */ /* Reserved words that specify type. yylval contains an IDENTIFIER_NODE which indicates which one. */ *************** Software Foundation, 59 Temple Place - S *** 144,150 **** %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF %type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist ! %type expr_no_commas cast_expr unary_expr primary string STRING %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea --- 181,187 ---- %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF %type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist ! %type expr_no_commas cast_expr unary_expr primary STRING %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea *************** Software Foundation, 59 Temple Place - S *** 160,166 **** %type typespec_reserved_nonattr typespec_reserved_attr %type typespec_nonreserved_nonattr ! %type SCSPEC TYPESPEC TYPE_QUAL maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers --- 197,203 ---- %type typespec_reserved_nonattr typespec_reserved_attr %type typespec_nonreserved_nonattr ! %type scspec SCSPEC STATIC TYPESPEC TYPE_QUAL maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers *************** Software Foundation, 59 Temple Place - S *** 198,225 **** %{ ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static tree current_declspecs = NULL_TREE; ! static tree prefix_attributes = NULL_TREE; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static tree all_prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ --- 235,262 ---- %{ ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static GTY(()) tree current_declspecs; ! static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static GTY(()) tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ *************** static tree declspec_stack; *** 241,262 **** /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2)) ! #define RESTORE_WARN_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ } while (0) #define OBJC_NEED_RAW_IDENTIFIER(VAL) /* nothing */ /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) --- 278,303 ---- /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_EXT_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2) \ ! | (flag_iso << 3)) ! #define RESTORE_EXT_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ + flag_iso = (val >> 3) & 1; \ } while (0) #define OBJC_NEED_RAW_IDENTIFIER(VAL) /* nothing */ + static bool parsing_iso_function_signature; + /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) *************** static tree declspec_stack; *** 264,283 **** static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Add GC roots for variables local to this file. */ void c_parse_init () { init_reswords (); - - ggc_add_tree_root (&declspec_stack, 1); - ggc_add_tree_root (¤t_declspecs, 1); - ggc_add_tree_root (&prefix_attributes, 1); - ggc_add_tree_root (&all_prefix_attributes, 1); } %} --- 305,320 ---- static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); + static int yylexstring PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Initialisation routine for this file. */ void c_parse_init () { init_reswords (); } %} *************** program: /* empty */ *** 294,299 **** --- 331,339 ---- get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); + /* __FUNCTION__ is defined at file scope (""). This + call may not be necessary as my tests indicate it + still works without it. */ finish_fname_decls (); finish_file (); } *************** extdefs: *** 309,314 **** --- 349,359 ---- ; extdef: + extdef_1 + { parsing_iso_function_signature = false; } /* Reset after any external definition. */ + ; + + extdef_1: fndef | datadef | ASM_KEYWORD '(' expr ')' ';' *************** extdef: *** 320,334 **** else error ("argument of `asm' is not a constant string"); } | extension extdef ! { RESTORE_WARN_FLAGS ($1); } ; datadef: setspecs notype_initdecls ';' { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else if (!flag_traditional) ! warning ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' --- 365,379 ---- else error ("argument of `asm' is not a constant string"); } | extension extdef ! { RESTORE_EXT_FLAGS ($1); } ; datadef: setspecs notype_initdecls ';' { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else ! warning ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' *************** fndef: *** 355,361 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } --- 400,406 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } *************** fndef: *** 369,375 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } --- 414,420 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } *************** fndef: *** 383,389 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | setspecs notype_declarator error { POP_DECLSPEC_STACK; } --- 428,434 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | setspecs notype_declarator error { POP_DECLSPEC_STACK; } *************** unary_expr: *** 437,464 **** /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; ! RESTORE_WARN_FLAGS ($1); } | unop cast_expr %prec UNARY { $$ = build_unary_op ($1, $2, 0); overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier { $$ = finish_label_address_expr ($2); } - /* This seems to be impossible on some machines, so let's turn it off. - You can use __builtin_next_arg to find the anonymous stack args. - | '&' ELLIPSIS - { tree types = TYPE_ARG_TYPES (TREE_TYPE (current_function_decl)); - $$ = error_mark_node; - if (TREE_VALUE (tree_last (types)) == void_type_node) - error ("`&...' used in function with fixed number of arguments"); - else - { - if (pedantic) - pedwarn ("ISO C forbids `&...'"); - $$ = tree_last (DECL_ARGUMENTS (current_function_decl)); - $$ = build_unary_op (ADDR_EXPR, $$, 0); - } } - */ | sizeof unary_expr %prec UNARY { skip_evaluation--; if (TREE_CODE ($2) == COMPONENT_REF --- 482,494 ---- /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; ! RESTORE_EXT_FLAGS ($1); } | unop cast_expr %prec UNARY { $$ = build_unary_op ($1, $2, 0); overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier { $$ = finish_label_address_expr ($2); } | sizeof unary_expr %prec UNARY { skip_evaluation--; if (TREE_CODE ($2) == COMPONENT_REF *************** expr_no_commas: *** 525,543 **** | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr_no_commas { skip_evaluation -= $1 == boolean_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_true_node; } expr_no_commas { skip_evaluation -= $1 == boolean_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr ':' { skip_evaluation += (($1 == boolean_true_node) --- 555,576 ---- | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr_no_commas { skip_evaluation -= $1 == boolean_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_true_node; } expr_no_commas { skip_evaluation -= $1 == boolean_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr ':' { skip_evaluation += (($1 == boolean_true_node) *************** expr_no_commas: *** 550,556 **** pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ $2 = save_expr ($1); ! $1 = truthvalue_conversion (default_conversion ($2)); skip_evaluation += $1 == boolean_true_node; } ':' expr_no_commas { skip_evaluation -= $1 == boolean_true_node; --- 583,590 ---- pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ $2 = save_expr ($1); ! $1 = c_common_truthvalue_conversion ! (default_conversion ($2)); skip_evaluation += $1 == boolean_true_node; } ':' expr_no_commas { skip_evaluation -= $1 == boolean_true_node; *************** expr_no_commas: *** 565,571 **** | expr_no_commas ASSIGN expr_no_commas { char class; $$ = build_modify_expr ($1, $2, $3); ! /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); --- 599,606 ---- | expr_no_commas ASSIGN expr_no_commas { char class; $$ = build_modify_expr ($1, $2, $3); ! /* This inhibits warnings in ! c_common_truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); *************** primary: *** 580,590 **** $$ = build_external_ref ($1, yychar == '('); } | CONSTANT ! | string ! { $$ = combine_strings ($1); } | VAR_FUNC_NAME { $$ = fname_decl (C_RID_CODE ($$), $$); } ! | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } --- 615,625 ---- $$ = build_external_ref ($1, yychar == '('); } | CONSTANT ! | STRING ! { $$ = fix_string_type ($$); } | VAR_FUNC_NAME { $$ = fname_decl (C_RID_CODE ($$), $$); } ! | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } *************** primary: *** 670,703 **** { $$ = build_unary_op (POSTDECREMENT_EXPR, $1, 0); } ; - /* Produces a STRING_CST with perhaps more STRING_CSTs chained onto it. */ - string: - STRING - | string STRING - { - static int last_lineno = 0; - static const char *last_input_filename = 0; - $$ = chainon ($1, $2); - if (warn_traditional && !in_system_header - && (lineno != last_lineno || !last_input_filename || - strcmp (last_input_filename, input_filename))) - { - warning ("traditional C rejects string concatenation"); - last_lineno = lineno; - last_input_filename = input_filename; - } - } - ; - old_style_parm_decls: /* empty */ | datadecls - | datadecls ELLIPSIS - /* ... is used here to indicate a varargs function. */ - { c_mark_varargs (); - if (pedantic) - pedwarn ("ISO C does not permit use of `varargs.h'"); } ; /* The following are analogous to lineno_decl, decls and decl --- 705,727 ---- { $$ = build_unary_op (POSTDECREMENT_EXPR, $1, 0); } ; old_style_parm_decls: + old_style_parm_decls_1 + { + parsing_iso_function_signature = false; /* Reset after decls. */ + } + ; + + old_style_parm_decls_1: /* empty */ + { + if (warn_traditional && !in_system_header + && parsing_iso_function_signature) + warning ("traditional C rejects ISO C style function definitions"); + parsing_iso_function_signature = false; /* Reset after warning. */ + } | datadecls ; /* The following are analogous to lineno_decl, decls and decl *************** decl: *** 771,782 **** | declspecs ';' { shadow_tag ($1); } | extension decl ! { RESTORE_WARN_FLAGS ($1); } ; /* A list of declaration specifiers. These are: ! - Storage class specifiers (SCSPEC), which for GCC currently include function specifiers ("inline"). - Type specifiers (typespec_*). --- 795,806 ---- | declspecs ';' { shadow_tag ($1); } | extension decl ! { RESTORE_EXT_FLAGS ($1); } ; /* A list of declaration specifiers. These are: ! - Storage class specifiers (scspec), which for GCC currently includes function specifiers ("inline"). - Type specifiers (typespec_*). *************** declspecs_nosc_ts_sa_ea: *** 947,953 **** ; declspecs_sc_nots_nosa_noea: ! SCSPEC { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL --- 971,977 ---- ; declspecs_sc_nots_nosa_noea: ! scspec { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL *************** declspecs_sc_nots_nosa_noea: *** 956,980 **** | declspecs_sc_nots_nosa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 980,1004 ---- | declspecs_sc_nots_nosa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_nots_sa_noea: *** 995,1019 **** | declspecs_sc_nots_sa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1019,1043 ---- | declspecs_sc_nots_sa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_ts_nosa_noea: *** 1046,1070 **** | declspecs_sc_nots_nosa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1070,1094 ---- | declspecs_sc_nots_nosa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_ts_sa_noea: *** 1109,1133 **** | declspecs_sc_nots_sa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1133,1157 ---- | declspecs_sc_nots_sa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** notype_initdecls: *** 1308,1317 **** maybeasm: /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' string ')' ! { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); ! $$ = $3; ! } ; initdcl: --- 1332,1339 ---- maybeasm: /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' STRING ')' ! { $$ = $3; } ; initdcl: *************** initdcl: *** 1326,1332 **** | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; --- 1348,1354 ---- | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; *************** maybe_attribute: *** 1352,1358 **** | attributes { $$ = $1; } ; ! attributes: attribute { $$ = $1; } --- 1374,1380 ---- | attributes { $$ = $1; } ; ! attributes: attribute { $$ = $1; } *************** attribute_list: *** 1371,1377 **** | attribute_list ',' attrib { $$ = chainon ($1, $3); } ; ! attrib: /* empty */ { $$ = NULL_TREE; } --- 1393,1399 ---- | attribute_list ',' attrib { $$ = chainon ($1, $3); } ; ! attrib: /* empty */ { $$ = NULL_TREE; } *************** attrib: *** 1390,1399 **** any_word: identifier ! | SCSPEC | TYPESPEC | TYPE_QUAL ; /* Initializers. `init' is the entry point. */ --- 1412,1426 ---- any_word: identifier ! | scspec | TYPESPEC | TYPE_QUAL ; + + scspec: + STATIC + | SCSPEC + ; /* Initializers. `init' is the entry point. */ *************** designator_list: *** 1456,1464 **** designator: '.' identifier { set_init_label ($2); } - /* These are for labeled elements. The syntax for an array element - initializer conflicts with the syntax for an Objective-C message, - so don't include these productions in the Objective-C grammar. */ | '[' expr_no_commas ELLIPSIS expr_no_commas ']' { set_init_index ($2, $4); if (pedantic) --- 1483,1488 ---- *************** nested_function: *** 1479,1484 **** --- 1503,1509 ---- pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } *************** nested_function: *** 1493,1499 **** DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; --- 1518,1524 ---- DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; *************** notype_nested_function: *** 1509,1514 **** --- 1534,1540 ---- pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } *************** notype_nested_function: *** 1523,1529 **** DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; --- 1549,1555 ---- DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; *************** structsp_attr: *** 1638,1644 **** { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } ! component_decl_list '}' maybe_attribute { $$ = finish_struct ($4, $5, chainon ($1, $7)); } | struct_head '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), --- 1664,1670 ---- { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } ! component_decl_list '}' maybe_attribute { $$ = finish_struct ($4, $5, chainon ($1, $7)); } | struct_head '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), *************** component_decl: *** 1712,1719 **** POP_DECLSPEC_STACK; } | declspecs_nosc_ts setspecs save_filename save_lineno { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); --- 1738,1745 ---- POP_DECLSPEC_STACK; } | declspecs_nosc_ts setspecs save_filename save_lineno { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); *************** component_decl: *** 1732,1738 **** { $$ = NULL_TREE; } | extension component_decl { $$ = $2; ! RESTORE_WARN_FLAGS ($1); } ; components: --- 1758,1764 ---- { $$ = NULL_TREE; } | extension component_decl { $$ = $2; ! RESTORE_EXT_FLAGS ($1); } ; components: *************** direct_absdcl1: *** 1860,1889 **** /* The [...] part of a declarator for an array type. */ array_declarator: ! '[' expr ']' ! { $$ = build_array_declarator ($2, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } ! | '[' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } ! | '[' '*' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); } ! | '[' declspecs_nosc '*' ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } ! | '[' SCSPEC expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($3, NULL_TREE, 1, 0); } ! | '[' SCSPEC declspecs_nosc expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $3, 1, 0); } ! | '[' declspecs_nosc SCSPEC expr ']' ! { if (C_RID_CODE ($3) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by --- 1886,1902 ---- /* The [...] part of a declarator for an array type. */ array_declarator: ! '[' maybe_type_quals_attrs expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } ! | '[' maybe_type_quals_attrs ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } ! | '[' maybe_type_quals_attrs '*' ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } ! | '[' STATIC maybe_type_quals_attrs expr ']' ! { $$ = build_array_declarator ($4, $3, 1, 0); } ! /* declspecs_nosc_nots is a synonym for type_quals_attrs. */ ! | '[' declspecs_nosc_nots STATIC expr ']' ! { $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by *************** c99_block_end: /* empty */ *** 1974,1981 **** { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! $$ = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = $$; } --- 1987,1994 ---- { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! $$ = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = $$; } *************** compstmt_start: '{' { compstmt_count++; *** 2024,2031 **** compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel ! { $$ = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) = $$; } ; --- 2037,2044 ---- compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel ! { $$ = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) = $$; } ; *************** compstmt_primary_start: *** 2054,2060 **** ; compstmt: compstmt_start compstmt_nostart ! { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); last_expr_type = NULL_TREE; $$ = $1; } ; --- 2067,2073 ---- ; compstmt: compstmt_start compstmt_nostart ! { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); last_expr_type = NULL_TREE; $$ = $1; } ; *************** if_prefix: *** 2081,2087 **** IF { $$ = c_begin_if_stmt (); } '(' expr ')' ! { c_expand_start_cond (truthvalue_conversion ($4), compstmt_count,$2); $$ = stmt_count; if_stmt_file = $-2; --- 2094,2100 ---- IF { $$ = c_begin_if_stmt (); } '(' expr ')' ! { c_expand_start_cond (c_common_truthvalue_conversion ($4), compstmt_count,$2); $$ = stmt_count; if_stmt_file = $-2; *************** do_stmt_start: *** 2095,2101 **** DO { stmt_count++; compstmt_count++; ! $$ = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents --- 2108,2114 ---- DO { stmt_count++; compstmt_count++; ! $$ = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents *************** select_or_iter_stmt: *** 2190,2219 **** we later pass to c_finish_while_stmt_cond to fill in the condition and other tidbits. */ | WHILE ! { stmt_count++; $$ = c_begin_while_stmt (); } '(' expr ')' ! { $4 = truthvalue_conversion ($4); ! c_finish_while_stmt_cond (truthvalue_conversion ($4), ! $2); $$ = add_stmt ($2); } c99_block_lineno_labeled_stmt { RECHAIN_STMTS ($6, WHILE_BODY ($6)); } | do_stmt_start '(' expr ')' ';' ! { DO_COND ($1) = truthvalue_conversion ($3); } | do_stmt_start error { } | FOR { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt ($$); } '(' for_init_stmt { stmt_count++; RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } xexpr ';' ! { if ($6) ! FOR_COND ($2) = truthvalue_conversion ($6); } xexpr ')' { FOR_EXPR ($2) = $9; } c99_block_lineno_labeled_stmt --- 2203,2233 ---- we later pass to c_finish_while_stmt_cond to fill in the condition and other tidbits. */ | WHILE ! { stmt_count++; $$ = c_begin_while_stmt (); } '(' expr ')' ! { $4 = c_common_truthvalue_conversion ($4); ! c_finish_while_stmt_cond ! (c_common_truthvalue_conversion ($4), $2); $$ = add_stmt ($2); } c99_block_lineno_labeled_stmt { RECHAIN_STMTS ($6, WHILE_BODY ($6)); } | do_stmt_start '(' expr ')' ';' ! { DO_COND ($1) = c_common_truthvalue_conversion ($3); } | do_stmt_start error { } | FOR { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt ($$); } '(' for_init_stmt { stmt_count++; RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } xexpr ';' ! { if ($6) ! FOR_COND ($2) ! = c_common_truthvalue_conversion ($6); } xexpr ')' { FOR_EXPR ($2) = $9; } c99_block_lineno_labeled_stmt *************** select_or_iter_stmt: *** 2227,2233 **** for_init_stmt: xexpr ';' ! { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; --- 2241,2247 ---- for_init_stmt: xexpr ';' ! { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; *************** asm_operand: *** 2353,2366 **** STRING '(' expr ')' { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } | '[' identifier ']' STRING '(' expr ')' ! { $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: ! string ! { $$ = tree_cons (NULL_TREE, combine_strings ($1), NULL_TREE); } ! | asm_clobbers ',' string ! { $$ = tree_cons (NULL_TREE, combine_strings ($3), $1); } ; /* This is what appears inside the parens in a function declarator. --- 2367,2382 ---- STRING '(' expr ')' { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } | '[' identifier ']' STRING '(' expr ')' ! { $2 = build_string (IDENTIFIER_LENGTH ($2), ! IDENTIFIER_POINTER ($2)); ! $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: ! STRING ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } ! | asm_clobbers ',' STRING ! { $$ = tree_cons (NULL_TREE, $3, $1); } ; /* This is what appears inside the parens in a function declarator. *************** parmlist_2: /* empty */ *** 2413,2419 **** error ("ISO C requires a named argument before `...'"); } | parms ! { $$ = get_parm_info (1); } | parms ',' ELLIPSIS { $$ = get_parm_info (0); } ; --- 2429,2437 ---- error ("ISO C requires a named argument before `...'"); } | parms ! { $$ = get_parm_info (1); ! parsing_iso_function_signature = true; ! } | parms ',' ELLIPSIS { $$ = get_parm_info (0); } ; *************** parm: *** 2436,2442 **** | declspecs_ts setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; --- 2454,2460 ---- | declspecs_ts setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; *************** firstparm: *** 2463,2469 **** | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; --- 2481,2487 ---- | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; *************** identifiers_or_typenames: *** 2535,2544 **** extension: EXTENSION ! { $$ = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; } ; %% --- 2553,2563 ---- extension: EXTENSION ! { $$ = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; ! flag_iso = 0; } ; %% *************** struct resword *** 2558,2568 **** /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_TRAD 0x01 /* not in traditional C */ ! #define D_C89 0x02 /* not in C89 */ ! #define D_EXT 0x04 /* GCC extension */ ! #define D_EXT89 0x08 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x10 /* Objective C only */ static const struct resword reswords[] = { --- 2577,2586 ---- /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_C89 0x01 /* not in C89 */ ! #define D_EXT 0x02 /* GCC extension */ ! #define D_EXT89 0x04 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x08 /* Objective C only */ static const struct resword reswords[] = { *************** static const struct resword reswords[] = *** 2604,2609 **** --- 2622,2628 ---- { "__restrict__", RID_RESTRICT, 0 }, { "__signed", RID_SIGNED, 0 }, { "__signed__", RID_SIGNED, 0 }, + { "__thread", RID_THREAD, 0 }, { "__typeof", RID_TYPEOF, 0 }, { "__typeof__", RID_TYPEOF, 0 }, { "__unbounded", RID_UNBOUNDED, 0 }, *************** static const struct resword reswords[] = *** 2615,2621 **** { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, D_TRAD }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, --- 2634,2640 ---- { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, 0 }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, *************** static const struct resword reswords[] = *** 2627,2650 **** { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_TRAD|D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_TRAD|D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, D_TRAD }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_TRAD|D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, }; #define N_reswords (sizeof reswords / sizeof (struct resword)) --- 2646,2669 ---- { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, 0 }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, }; #define N_reswords (sizeof reswords / sizeof (struct resword)) *************** static const struct resword reswords[] = *** 2654,2660 **** three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ SCSPEC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, --- 2673,2679 ---- three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ STATIC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, *************** static const short rid_to_yy[RID_MAX] = *** 2672,2677 **** --- 2691,2697 ---- /* RID_BOUNDED */ TYPE_QUAL, /* RID_UNBOUNDED */ TYPE_QUAL, /* RID_COMPLEX */ TYPESPEC, + /* RID_THREAD */ SCSPEC, /* C++ */ /* RID_FRIEND */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 2687,2693 **** /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, --- 2707,2713 ---- /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, *************** static const short rid_to_yy[RID_MAX] = *** 2761,2779 **** /* RID_REINTCAST */ 0, /* RID_STATCAST */ 0, - /* alternate spellings */ - /* RID_AND */ 0, - /* RID_AND_EQ */ 0, - /* RID_NOT */ 0, - /* RID_NOT_EQ */ 0, - /* RID_OR */ 0, - /* RID_OR_EQ */ 0, - /* RID_XOR */ 0, - /* RID_XOR_EQ */ 0, - /* RID_BITAND */ 0, - /* RID_BITOR */ 0, - /* RID_COMPL */ 0, - /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, --- 2781,2786 ---- *************** init_reswords () *** 2796,2805 **** unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) - | (flag_traditional ? D_TRAD : 0) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (c_language != clk_objective_c) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because --- 2803,2811 ---- unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (!flag_objc) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because *************** static int *** 2854,2861 **** yylexname () { tree decl; ! ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); --- 2860,2867 ---- yylexname () { tree decl; ! ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); *************** yylexname () *** 2867,2879 **** /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; --- 2873,2885 ---- /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; *************** yylexname () *** 2890,2895 **** --- 2896,2950 ---- return IDENTIFIER; } + /* Concatenate strings before returning them to the parser. This isn't quite + as good as having it done in the lexer, but it's better than nothing. */ + + static int + yylexstring () + { + enum cpp_ttype next_type; + tree orig = yylval.ttype; + + next_type = c_lex (&yylval.ttype); + if (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)) + { + varray_type strings; + + static int last_lineno = 0; + static const char *last_input_filename = 0; + if (warn_traditional && !in_system_header + && (lineno != last_lineno || !last_input_filename || + strcmp (last_input_filename, input_filename))) + { + warning ("traditional C rejects string concatenation"); + last_lineno = lineno; + last_input_filename = input_filename; + } + + VARRAY_TREE_INIT (strings, 32, "strings"); + VARRAY_PUSH_TREE (strings, orig); + + do + { + VARRAY_PUSH_TREE (strings, yylval.ttype); + next_type = c_lex (&yylval.ttype); + } + while (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)); + + yylval.ttype = combine_strings (strings); + } + else + yylval.ttype = orig; + + /* We will have always read one token too many. */ + _cpp_backup_tokens (parse_in, 1); + + return STRING; + } static inline int _yylex () *************** _yylex () *** 2956,2962 **** return 0; case CPP_NAME: ! return yylexname (); case CPP_NUMBER: case CPP_CHAR: --- 3011,3023 ---- return 0; case CPP_NAME: ! { ! int ret = yylexname (); ! if (ret == STRING) ! return yylexstring (); ! else ! return ret; ! } case CPP_NUMBER: case CPP_CHAR: *************** _yylex () *** 2965,2972 **** case CPP_STRING: case CPP_WSTRING: ! return STRING; ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: --- 3026,3033 ---- case CPP_STRING: case CPP_WSTRING: ! return yylexstring (); ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: *************** yylex() *** 3002,3022 **** return r; } - /* Sets the value of the 'yydebug' variable to VALUE. - This is a function so we don't have to have YYDEBUG defined - in order to build the compiler. */ - - void - c_set_yydebug (value) - int value; - { - #if YYDEBUG != 0 - yydebug = value; - #else - warning ("YYDEBUG not defined"); - #endif - } - /* Function used when yydebug is set, to print a token in more detail. */ static void --- 3063,3068 ---- *************** yyprint (file, yychar, yyl) *** 3028,3034 **** tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: --- 3074,3080 ---- tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: *************** yyprint (file, yychar, yyl) *** 3037,3042 **** --- 3083,3089 ---- case TYPESPEC: case TYPE_QUAL: case SCSPEC: + case STATIC: if (IDENTIFIER_POINTER (t)) fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; *************** yyprint (file, yychar, yyl) *** 3070,3092 **** /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Return something to represent absolute declarators containing a *. ! TARGET is the absolute declarator that the * contains. ! TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers, possible mixed ! with attributes. ! ! We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, ! if attributes are present) and whose type is the modifier list. */ ! tree ! make_pointer_declarator (type_quals_attrs, target) ! tree type_quals_attrs, target; { ! tree quals, attrs; ! tree itarget = target; ! split_specs_attrs (type_quals_attrs, &quals, &attrs); ! if (attrs != NULL_TREE) ! itarget = tree_cons (attrs, target, NULL_TREE); ! return build1 (INDIRECT_REF, quals, itarget); } --- 3117,3132 ---- /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Free malloced parser stacks if necessary. */ ! void ! free_parser_stacks () { ! if (malloced_yyss) ! { ! free (malloced_yyss); ! free (malloced_yyvs); ! } } + + #include "gt-c-parse.h" diff -Nrc3pad gcc-3.2.3/gcc/cppdefault.h gcc-3.3/gcc/cppdefault.h *** gcc-3.2.3/gcc/cppdefault.h 2001-10-07 16:50:51.000000000 +0000 --- gcc-3.3/gcc/cppdefault.h 2002-05-16 19:02:59.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 42,89 **** #undef CROSS_INCLUDE_DIR #endif - /* We let tm.h override the types used here, to handle trivial differences - such as the choice of unsigned int or long unsigned int for size_t. - When machines start needing nontrivial differences in the size type, - it would be best to do something here to figure out automatically - from other information what type to use. */ - - /* The string value for __SIZE_TYPE__. */ - - #ifndef SIZE_TYPE - #define SIZE_TYPE "long unsigned int" - #endif - - /* The string value for __PTRDIFF_TYPE__. */ - - #ifndef PTRDIFF_TYPE - #define PTRDIFF_TYPE "long int" - #endif - - /* The string value for __WCHAR_TYPE__. */ - - #ifndef WCHAR_TYPE - #define WCHAR_TYPE "int" - #endif - - /* The string value for __WINT_TYPE__. */ - - #ifndef WINT_TYPE - #define WINT_TYPE "unsigned int" - #endif - - /* The string value for __USER_LABEL_PREFIX__ */ - - #ifndef USER_LABEL_PREFIX - #define USER_LABEL_PREFIX "" - #endif - - /* The string value for __REGISTER_PREFIX__ */ - - #ifndef REGISTER_PREFIX - #define REGISTER_PREFIX "" - #endif - /* This is the default list of directories to search for include files. It may be overridden by the various -I and -ixxx options. --- 42,47 ---- diff -Nrc3pad gcc-3.2.3/gcc/cpperror.c gcc-3.3/gcc/cpperror.c *** gcc-3.2.3/gcc/cpperror.c 2002-01-03 21:43:00.000000000 +0000 --- gcc-3.3/gcc/cpperror.c 2002-07-09 22:21:37.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 31,62 **** static void print_location PARAMS ((cpp_reader *, unsigned int, unsigned int)); - /* Don't remove the blank before do, as otherwise the exgettext - script will mistake this as a function definition */ - #define v_message(msgid, ap) \ - do { vfprintf (stderr, _(msgid), ap); putc ('\n', stderr); } while (0) - /* Print the logical file location (LINE, COL) in preparation for a ! diagnostic. Outputs the #include chain if it has changed. */ static void print_location (pfile, line, col) cpp_reader *pfile; unsigned int line, col; { ! cpp_buffer *buffer = pfile->buffer; ! ! if (!buffer) fprintf (stderr, "%s: ", progname); else { const struct line_map *map; - if (line == 0) - { - line = pfile->cur_token[-1].line; - col = pfile->cur_token[-1].col; - } - map = lookup_line (&pfile->line_maps, line); print_containing_files (&pfile->line_maps, map); --- 31,51 ---- static void print_location PARAMS ((cpp_reader *, unsigned int, unsigned int)); /* Print the logical file location (LINE, COL) in preparation for a ! diagnostic. Outputs the #include chain if it has changed. A line ! of zero suppresses the include stack, and outputs the program name ! instead. */ static void print_location (pfile, line, col) cpp_reader *pfile; unsigned int line, col; { ! if (!pfile->buffer || line == 0) fprintf (stderr, "%s: ", progname); else { const struct line_map *map; map = lookup_line (&pfile->line_maps, line); print_containing_files (&pfile->line_maps, map); *************** print_location (pfile, line, col) *** 75,300 **** } } ! /* Set up for an error message: print the file and line, bump the error counter, etc. LINE is the logical line number; zero means to print ! at the location of the previously lexed token, which tends to be the ! correct place by default. Returns 0 if the error has been suppressed. */ int _cpp_begin_message (pfile, code, line, column) cpp_reader *pfile; ! enum error_type code; unsigned int line, column; { ! int is_warning = 0; ! switch (code) { ! case PEDWARN: ! case WARNING: if (CPP_IN_SYSTEM_HEADER (pfile) && ! CPP_OPTION (pfile, warn_system_headers)) return 0; ! case WARNING_SYSHDR: if (CPP_OPTION (pfile, warnings_are_errors) ! || (code == PEDWARN && CPP_OPTION (pfile, pedantic_errors))) { if (CPP_OPTION (pfile, inhibit_errors)) return 0; ! if (pfile->errors < CPP_FATAL_LIMIT) ! pfile->errors++; ! } ! else ! { ! if (CPP_OPTION (pfile, inhibit_warnings)) ! return 0; ! is_warning = 1; } break; ! ! case ERROR: if (CPP_OPTION (pfile, inhibit_errors)) return 0; ! if (pfile->errors < CPP_FATAL_LIMIT) ! pfile->errors++; ! break; ! /* Fatal errors cannot be inhibited. */ ! case FATAL: ! pfile->errors = CPP_FATAL_LIMIT; ! break; ! case ICE: ! fprintf (stderr, _("internal error: ")); ! pfile->errors = CPP_FATAL_LIMIT; break; } print_location (pfile, line, column); ! if (is_warning) fputs (_("warning: "), stderr); return 1; } ! /* Exported interface. */ ! ! /* For reporting internal errors. Prints "internal error: " for you, ! otherwise identical to cpp_fatal. */ ! void ! cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) ! { ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, const char *, msgid); ! ! if (_cpp_begin_message (pfile, ICE, 0, 0)) ! v_message (msgid, ap); ! ! VA_CLOSE (ap); ! } ! ! /* Same as cpp_error, except we consider the error to be "fatal", ! such as inconsistent options. I.e. there is little point in continuing. ! (We do not exit, to support use of cpplib as a library. ! Instead, it is the caller's responsibility to check ! CPP_FATAL_ERRORS. */ ! void ! cpp_fatal VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) ! { ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, const char *, msgid); ! ! if (_cpp_begin_message (pfile, FATAL, 0, 0)) ! v_message (msgid, ap); ! VA_CLOSE (ap); ! } /* Print an error at the location of the previously lexed token. */ void ! cpp_error VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) ! { ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, const char *, msgid); ! ! if (_cpp_begin_message (pfile, ERROR, 0, 0)) ! v_message (msgid, ap); ! ! VA_CLOSE (ap); ! } ! ! /* Print an error at a specific location. */ ! void ! cpp_error_with_line VPARAMS ((cpp_reader *pfile, int line, int column, ! const char *msgid, ...)) ! { ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, int, line); ! VA_FIXEDARG (ap, int, column); ! VA_FIXEDARG (ap, const char *, msgid); ! ! if (_cpp_begin_message (pfile, ERROR, line, column)) ! v_message (msgid, ap); ! ! VA_CLOSE (ap); ! } ! ! /* Error including a message from `errno'. */ ! void ! cpp_error_from_errno (pfile, name) ! cpp_reader *pfile; ! const char *name; ! { ! cpp_error (pfile, "%s: %s", name, xstrerror (errno)); ! } ! ! /* Print a warning at the location of the previously lexed token. */ ! void ! cpp_warning VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) { ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, const char *, msgid); ! ! if (_cpp_begin_message (pfile, WARNING, 0, 0)) ! v_message (msgid, ap); ! ! VA_CLOSE (ap); ! } - /* Print a warning at a specific location. */ - void - cpp_warning_with_line VPARAMS ((cpp_reader * pfile, int line, int column, - const char *msgid, ...)) - { VA_OPEN (ap, msgid); VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, int, line); ! VA_FIXEDARG (ap, int, column); VA_FIXEDARG (ap, const char *, msgid); ! if (_cpp_begin_message (pfile, WARNING, line, column)) ! v_message (msgid, ap); ! ! VA_CLOSE (ap); ! } ! ! /* Pedwarn at the location of the previously lexed token. */ ! void ! cpp_pedwarn VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) ! { ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, const char *, msgid); ! if (_cpp_begin_message (pfile, PEDWARN, 0, 0)) v_message (msgid, ap); VA_CLOSE (ap); } ! /* Pedwarn at a specific location. */ void ! cpp_pedwarn_with_line VPARAMS ((cpp_reader * pfile, int line, int column, ! const char *msgid, ...)) { VA_OPEN (ap, msgid); VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, int, line); ! VA_FIXEDARG (ap, int, column); VA_FIXEDARG (ap, const char *, msgid); ! if (_cpp_begin_message (pfile, PEDWARN, line, column)) v_message (msgid, ap); VA_CLOSE (ap); } - /* Print an error message not associated with the translation unit. */ void ! cpp_notice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) ! { ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, const char *, msgid); ! ! if (pfile->errors < CPP_FATAL_LIMIT) ! pfile->errors++; ! ! v_message (msgid, ap); ! ! VA_CLOSE (ap); ! } ! ! /* Print an error message originating from ERRNO and not associated ! with the translation unit. */ ! void ! cpp_notice_from_errno (pfile, name) cpp_reader *pfile; ! const char *name; { ! if (name[0] == '\0') ! name = "stdout"; ! cpp_notice (pfile, "%s: %s", name, xstrerror (errno)); } --- 64,192 ---- } } ! /* Set up for a diagnostic: print the file and line, bump the error counter, etc. LINE is the logical line number; zero means to print ! at the location of the previously lexed token, which tends to be ! the correct place by default. Returns 0 if the error has been ! suppressed. */ int _cpp_begin_message (pfile, code, line, column) cpp_reader *pfile; ! int code; unsigned int line, column; { ! int level = DL_EXTRACT (code); ! switch (level) { ! case DL_WARNING: ! case DL_PEDWARN: if (CPP_IN_SYSTEM_HEADER (pfile) && ! CPP_OPTION (pfile, warn_system_headers)) return 0; ! /* Fall through. */ ! ! case DL_WARNING_SYSHDR: if (CPP_OPTION (pfile, warnings_are_errors) ! || (level == DL_PEDWARN && CPP_OPTION (pfile, pedantic_errors))) { if (CPP_OPTION (pfile, inhibit_errors)) return 0; ! level = DL_ERROR; ! pfile->errors++; } + else if (CPP_OPTION (pfile, inhibit_warnings)) + return 0; break; ! ! case DL_ERROR: if (CPP_OPTION (pfile, inhibit_errors)) return 0; ! /* ICEs cannot be inhibited. */ ! case DL_ICE: ! pfile->errors++; break; } print_location (pfile, line, column); ! if (DL_WARNING_P (level)) fputs (_("warning: "), stderr); + else if (level == DL_ICE) + fputs (_("internal error: "), stderr); return 1; } ! /* Don't remove the blank before do, as otherwise the exgettext ! script will mistake this as a function definition */ ! #define v_message(msgid, ap) \ ! do { vfprintf (stderr, _(msgid), ap); putc ('\n', stderr); } while (0) ! /* Exported interface. */ /* Print an error at the location of the previously lexed token. */ void ! cpp_error VPARAMS ((cpp_reader * pfile, int level, const char *msgid, ...)) { ! unsigned int line, column; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, int, level); VA_FIXEDARG (ap, const char *, msgid); ! if (pfile->buffer) ! { ! if (CPP_OPTION (pfile, traditional)) ! { ! if (pfile->state.in_directive) ! line = pfile->directive_line; ! else ! line = pfile->line; ! column = 0; ! } ! else ! { ! line = pfile->cur_token[-1].line; ! column = pfile->cur_token[-1].col; ! } ! } ! else ! line = column = 0; ! if (_cpp_begin_message (pfile, level, line, column)) v_message (msgid, ap); VA_CLOSE (ap); } ! /* Print an error at a specific location. */ void ! cpp_error_with_line VPARAMS ((cpp_reader *pfile, int level, ! unsigned int line, unsigned int column, ! const char *msgid, ...)) { VA_OPEN (ap, msgid); VA_FIXEDARG (ap, cpp_reader *, pfile); ! VA_FIXEDARG (ap, int, level); ! VA_FIXEDARG (ap, unsigned int, line); ! VA_FIXEDARG (ap, unsigned int, column); VA_FIXEDARG (ap, const char *, msgid); ! if (_cpp_begin_message (pfile, level, line, column)) v_message (msgid, ap); VA_CLOSE (ap); } void ! cpp_errno (pfile, level, msgid) cpp_reader *pfile; ! int level; ! const char *msgid; { ! if (msgid[0] == '\0') ! msgid = _("stdout"); ! ! cpp_error (pfile, level, "%s: %s", msgid, xstrerror (errno)); } diff -Nrc3pad gcc-3.2.3/gcc/cppexp.c gcc-3.3/gcc/cppexp.c *** gcc-3.2.3/gcc/cppexp.c 2002-02-24 12:52:21.000000000 +0000 --- gcc-3.3/gcc/cppexp.c 2002-11-29 22:41:04.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 23,219 **** #include "cpplib.h" #include "cpphash.h" ! /* Yield nonzero if adding two numbers with A's and B's signs can yield a ! number with SUM's sign, where A, B, and SUM are all C integers. */ ! #define possible_sum_sign(a, b, sum) ((((a) ^ (b)) | ~ ((a) ^ (sum))) < 0) ! ! static void integer_overflow PARAMS ((cpp_reader *)); ! static HOST_WIDEST_INT left_shift PARAMS ((cpp_reader *, HOST_WIDEST_INT, ! unsigned int, ! unsigned HOST_WIDEST_INT)); ! static HOST_WIDEST_INT right_shift PARAMS ((cpp_reader *, HOST_WIDEST_INT, ! unsigned int, ! unsigned HOST_WIDEST_INT)); ! static struct op parse_number PARAMS ((cpp_reader *, const cpp_token *)); ! static struct op parse_defined PARAMS ((cpp_reader *)); ! static struct op lex PARAMS ((cpp_reader *, int)); ! static const unsigned char *op_as_text PARAMS ((cpp_reader *, enum cpp_ttype)); struct op { enum cpp_ttype op; - U_CHAR prio; /* Priority of op. */ - U_CHAR flags; - U_CHAR unsignedp; /* True if value should be treated as unsigned. */ - HOST_WIDEST_INT value; /* The value logically "right" of op. */ }; ! /* There is no "error" token, but we can't get comments in #if, so we can ! abuse that token type. */ ! #define CPP_ERROR CPP_COMMENT /* With -O2, gcc appears to produce nice code, moving the error message load and subsequent jump completely out of the main path. */ - #define CPP_ICE(msgid) \ - do { cpp_ice (pfile, msgid); goto syntax_error; } while(0) #define SYNTAX_ERROR(msgid) \ ! do { cpp_error (pfile, msgid); goto syntax_error; } while(0) #define SYNTAX_ERROR2(msgid, arg) \ ! do { cpp_error (pfile, msgid, arg); goto syntax_error; } while(0) ! struct suffix { ! const unsigned char s[4]; ! const unsigned char u; ! const unsigned char l; ! }; ! static const struct suffix vsuf_1[] = { ! { "u", 1, 0 }, { "U", 1, 0 }, ! { "l", 0, 1 }, { "L", 0, 1 } ! }; ! static const struct suffix vsuf_2[] = { ! { "ul", 1, 1 }, { "UL", 1, 1 }, { "uL", 1, 1 }, { "Ul", 1, 1 }, ! { "lu", 1, 1 }, { "LU", 1, 1 }, { "Lu", 1, 1 }, { "lU", 1, 1 }, ! { "ll", 0, 2 }, { "LL", 0, 2 } ! }; ! static const struct suffix vsuf_3[] = { ! { "ull", 1, 2 }, { "ULL", 1, 2 }, { "uLL", 1, 2 }, { "Ull", 1, 2 }, ! { "llu", 1, 2 }, { "LLU", 1, 2 }, { "LLu", 1, 2 }, { "llU", 1, 2 } ! }; ! #define Nsuff(tab) (sizeof tab / sizeof (struct suffix)) ! /* Parse and convert what is presumably an integer in TOK. Accepts ! decimal, hex, or octal with or without size suffixes. Returned op ! is CPP_ERROR on error, otherwise it is a CPP_NUMBER. */ ! static struct op ! parse_number (pfile, tok) cpp_reader *pfile; ! const cpp_token *tok; { ! struct op op; ! const U_CHAR *start = tok->val.str.text; ! const U_CHAR *end = start + tok->val.str.len; ! const U_CHAR *p = start; ! int c = 0, i, nsuff; ! unsigned HOST_WIDEST_INT n = 0, nd, MAX_over_base; ! int base = 10; ! int overflow = 0; ! int digit, largest_digit = 0; ! const struct suffix *sufftab; ! op.unsignedp = 0; ! if (p[0] == '0') { ! if (end - start >= 3 && (p[1] == 'x' || p[1] == 'X')) { ! p += 2; ! base = 16; } else { ! p += 1; ! base = 8; } } ! /* Some buggy compilers (e.g. MPW C) seem to need both casts. */ ! MAX_over_base = (((unsigned HOST_WIDEST_INT) -1) ! / ((unsigned HOST_WIDEST_INT) base)); ! for(; p < end; p++) { ! c = *p; ! if (ISDIGIT (c) ! || (base == 16 && ISXDIGIT (c))) ! digit = hex_value (c); ! else ! break; ! if (largest_digit < digit) ! largest_digit = digit; ! nd = n * base + digit; ! overflow |= MAX_over_base < n || nd < n; ! n = nd; } ! if (p < end) { ! /* Check for a floating point constant. Note that float constants ! with an exponent or suffix but no decimal point are technically ! invalid (C99 6.4.4.2) but accepted elsewhere. */ ! if ((c == '.' || c == 'F' || c == 'f') ! || (base == 10 && (c == 'E' || c == 'e') ! && p+1 < end && (p[1] == '+' || p[1] == '-')) ! || (base == 16 && (c == 'P' || c == 'p') ! && p+1 < end && (p[1] == '+' || p[1] == '-'))) ! SYNTAX_ERROR ("floating point numbers are not valid in #if"); ! ! /* Determine the suffix. l means long, and u means unsigned. ! See the suffix tables, above. */ ! switch (end - p) { ! case 1: sufftab = vsuf_1; nsuff = Nsuff(vsuf_1); break; ! case 2: sufftab = vsuf_2; nsuff = Nsuff(vsuf_2); break; ! case 3: sufftab = vsuf_3; nsuff = Nsuff(vsuf_3); break; ! default: goto invalid_suffix; } ! for (i = 0; i < nsuff; i++) ! if (memcmp (p, sufftab[i].s, end - p) == 0) ! break; ! if (i == nsuff) ! goto invalid_suffix; ! op.unsignedp = sufftab[i].u; ! if (CPP_WTRADITIONAL (pfile) ! && sufftab[i].u ! && ! cpp_sys_macro_p (pfile)) ! cpp_warning (pfile, "traditional C rejects the `U' suffix"); ! if (sufftab[i].l == 2 && CPP_OPTION (pfile, pedantic) ! && ! CPP_OPTION (pfile, c99)) ! cpp_pedwarn (pfile, "too many 'l' suffixes in integer constant"); } - - if (base <= largest_digit) - cpp_pedwarn (pfile, "integer constant contains digits beyond the radix"); ! if (overflow) ! cpp_pedwarn (pfile, "integer constant out of range"); ! /* If too big to be signed, consider it unsigned. */ ! else if ((HOST_WIDEST_INT) n < 0 && ! op.unsignedp) { ! if (base == 10) ! cpp_warning (pfile, "integer constant is so large that it is unsigned"); ! op.unsignedp = 1; } ! op.value = n; ! op.op = CPP_NUMBER; ! return op; ! invalid_suffix: ! cpp_error (pfile, "invalid suffix '%.*s' on integer constant", ! (int) (end - p), p); ! syntax_error: ! op.op = CPP_ERROR; ! return op; } /* Handle meeting "defined" in a preprocessor expression. */ ! static struct op parse_defined (pfile) cpp_reader *pfile; { int paren = 0; cpp_hashnode *node = 0; const cpp_token *token; - struct op op; cpp_context *initial_context = pfile->context; /* Don't expand macros. */ --- 23,467 ---- #include "cpplib.h" #include "cpphash.h" ! #define PART_PRECISION (sizeof (cpp_num_part) * CHAR_BIT) ! #define HALF_MASK (~(cpp_num_part) 0 >> (PART_PRECISION / 2)) ! #define LOW_PART(num_part) (num_part & HALF_MASK) ! #define HIGH_PART(num_part) (num_part >> (PART_PRECISION / 2)) struct op { + const cpp_token *token; /* The token forming op (for diagnostics). */ + cpp_num value; /* The value logically "right" of op. */ enum cpp_ttype op; }; ! /* Some simple utility routines on double integers. */ ! #define num_zerop(num) ((num.low | num.high) == 0) ! #define num_eq(num1, num2) (num1.low == num2.low && num1.high == num2.high) ! static bool num_positive PARAMS ((cpp_num, size_t)); ! static bool num_greater_eq PARAMS ((cpp_num, cpp_num, size_t)); ! static cpp_num num_trim PARAMS ((cpp_num, size_t)); ! static cpp_num num_part_mul PARAMS ((cpp_num_part, cpp_num_part)); ! ! static cpp_num num_unary_op PARAMS ((cpp_reader *, cpp_num, enum cpp_ttype)); ! static cpp_num num_binary_op PARAMS ((cpp_reader *, cpp_num, cpp_num, ! enum cpp_ttype)); ! static cpp_num num_negate PARAMS ((cpp_num, size_t)); ! static cpp_num num_bitwise_op PARAMS ((cpp_reader *, cpp_num, cpp_num, ! enum cpp_ttype)); ! static cpp_num num_inequality_op PARAMS ((cpp_reader *, cpp_num, cpp_num, ! enum cpp_ttype)); ! static cpp_num num_equality_op PARAMS ((cpp_reader *, cpp_num, cpp_num, ! enum cpp_ttype)); ! static cpp_num num_mul PARAMS ((cpp_reader *, cpp_num, cpp_num)); ! static cpp_num num_div_op PARAMS ((cpp_reader *, cpp_num, cpp_num, ! enum cpp_ttype)); ! static cpp_num num_lshift PARAMS ((cpp_num, size_t, size_t)); ! static cpp_num num_rshift PARAMS ((cpp_num, size_t, size_t)); ! ! static cpp_num append_digit PARAMS ((cpp_num, int, int, size_t)); ! static cpp_num parse_defined PARAMS ((cpp_reader *)); ! static cpp_num eval_token PARAMS ((cpp_reader *, const cpp_token *)); ! static struct op *reduce PARAMS ((cpp_reader *, struct op *, enum cpp_ttype)); ! static unsigned int interpret_float_suffix PARAMS ((const uchar *, size_t)); ! static unsigned int interpret_int_suffix PARAMS ((const uchar *, size_t)); ! static void check_promotion PARAMS ((cpp_reader *, const struct op *)); ! ! /* Token type abuse to create unary plus and minus operators. */ ! #define CPP_UPLUS (CPP_LAST_CPP_OP + 1) ! #define CPP_UMINUS (CPP_LAST_CPP_OP + 2) /* With -O2, gcc appears to produce nice code, moving the error message load and subsequent jump completely out of the main path. */ #define SYNTAX_ERROR(msgid) \ ! do { cpp_error (pfile, DL_ERROR, msgid); goto syntax_error; } while(0) #define SYNTAX_ERROR2(msgid, arg) \ ! do { cpp_error (pfile, DL_ERROR, msgid, arg); goto syntax_error; } while(0) ! /* Subroutine of cpp_classify_number. S points to a float suffix of ! length LEN, possibly zero. Returns 0 for an invalid suffix, or a ! flag vector describing the suffix. */ ! static unsigned int ! interpret_float_suffix (s, len) ! const uchar *s; ! size_t len; { ! size_t f = 0, l = 0, i = 0; ! while (len--) ! switch (s[len]) ! { ! case 'f': case 'F': f++; break; ! case 'l': case 'L': l++; break; ! case 'i': case 'I': ! case 'j': case 'J': i++; break; ! default: ! return 0; ! } ! if (f + l > 1 || i > 1) ! return 0; ! return ((i ? CPP_N_IMAGINARY : 0) ! | (f ? CPP_N_SMALL : ! l ? CPP_N_LARGE : CPP_N_MEDIUM)); ! } ! /* Subroutine of cpp_classify_number. S points to an integer suffix ! of length LEN, possibly zero. Returns 0 for an invalid suffix, or a ! flag vector describing the suffix. */ ! static unsigned int ! interpret_int_suffix (s, len) ! const uchar *s; ! size_t len; ! { ! size_t u, l, i; ! ! u = l = i = 0; ! ! while (len--) ! switch (s[len]) ! { ! case 'u': case 'U': u++; break; ! case 'i': case 'I': ! case 'j': case 'J': i++; break; ! case 'l': case 'L': l++; ! /* If there are two Ls, they must be adjacent and the same case. */ ! if (l == 2 && s[len] != s[len + 1]) ! return 0; ! break; ! default: ! return 0; ! } ! ! if (l > 2 || u > 1 || i > 1) ! return 0; ! ! return ((i ? CPP_N_IMAGINARY : 0) ! | (u ? CPP_N_UNSIGNED : 0) ! | ((l == 0) ? CPP_N_SMALL ! : (l == 1) ? CPP_N_MEDIUM : CPP_N_LARGE)); ! } ! ! /* Categorize numeric constants according to their field (integer, ! floating point, or invalid), radix (decimal, octal, hexadecimal), ! and type suffixes. */ ! unsigned int ! cpp_classify_number (pfile, token) cpp_reader *pfile; ! const cpp_token *token; { ! const uchar *str = token->val.str.text; ! const uchar *limit; ! unsigned int max_digit, result, radix; ! enum {NOT_FLOAT = 0, AFTER_POINT, AFTER_EXPON} float_flag; ! /* If the lexer has done its job, length one can only be a single ! digit. Fast-path this very common case. */ ! if (token->val.str.len == 1) ! return CPP_N_INTEGER | CPP_N_SMALL | CPP_N_DECIMAL; ! limit = str + token->val.str.len; ! float_flag = NOT_FLOAT; ! max_digit = 0; ! radix = 10; ! ! /* First, interpret the radix. */ ! if (*str == '0') { ! radix = 8; ! str++; ! ! /* Require at least one hex digit to classify it as hex. */ ! if ((*str == 'x' || *str == 'X') && ISXDIGIT (str[1])) { ! radix = 16; ! str++; ! } ! } ! ! /* Now scan for a well-formed integer or float. */ ! for (;;) ! { ! unsigned int c = *str++; ! ! if (ISDIGIT (c) || (ISXDIGIT (c) && radix == 16)) ! { ! c = hex_value (c); ! if (c > max_digit) ! max_digit = c; ! } ! else if (c == '.') ! { ! if (float_flag == NOT_FLOAT) ! float_flag = AFTER_POINT; ! else ! SYNTAX_ERROR ("too many decimal points in number"); ! } ! else if ((radix <= 10 && (c == 'e' || c == 'E')) ! || (radix == 16 && (c == 'p' || c == 'P'))) ! { ! float_flag = AFTER_EXPON; ! break; } else { ! /* Start of suffix. */ ! str--; ! break; } } ! if (float_flag != NOT_FLOAT && radix == 8) ! radix = 10; ! if (max_digit >= radix) ! SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); ! ! if (float_flag != NOT_FLOAT) { ! if (radix == 16 && CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99)) ! cpp_error (pfile, DL_PEDWARN, ! "use of C99 hexadecimal floating constant"); ! if (float_flag == AFTER_EXPON) ! { ! if (*str == '+' || *str == '-') ! str++; ! /* Exponent is decimal, even if string is a hex float. */ ! if (!ISDIGIT (*str)) ! SYNTAX_ERROR ("exponent has no digits"); ! ! do ! str++; ! while (ISDIGIT (*str)); ! } ! else if (radix == 16) ! SYNTAX_ERROR ("hexadecimal floating constants require an exponent"); ! ! result = interpret_float_suffix (str, limit - str); ! if (result == 0) ! { ! cpp_error (pfile, DL_ERROR, ! "invalid suffix \"%.*s\" on floating constant", ! (int) (limit - str), str); ! return CPP_N_INVALID; ! } ! ! /* Traditional C didn't accept any floating suffixes. */ ! if (limit != str ! && CPP_WTRADITIONAL (pfile) ! && ! cpp_sys_macro_p (pfile)) ! cpp_error (pfile, DL_WARNING, ! "traditional C rejects the \"%.*s\" suffix", ! (int) (limit - str), str); ! ! result |= CPP_N_FLOATING; } + else + { + result = interpret_int_suffix (str, limit - str); + if (result == 0) + { + cpp_error (pfile, DL_ERROR, + "invalid suffix \"%.*s\" on integer constant", + (int) (limit - str), str); + return CPP_N_INVALID; + } ! /* Traditional C only accepted the 'L' suffix. ! Suppress warning about 'LL' with -Wno-long-long. */ ! if (CPP_WTRADITIONAL (pfile) && ! cpp_sys_macro_p (pfile)) ! { ! int u_or_i = (result & (CPP_N_UNSIGNED|CPP_N_IMAGINARY)); ! int large = (result & CPP_N_WIDTH) == CPP_N_LARGE; ! ! if (u_or_i || (large && CPP_OPTION (pfile, warn_long_long))) ! cpp_error (pfile, DL_WARNING, ! "traditional C rejects the \"%.*s\" suffix", ! (int) (limit - str), str); ! } ! ! if ((result & CPP_N_WIDTH) == CPP_N_LARGE ! && ! CPP_OPTION (pfile, c99) ! && CPP_OPTION (pfile, warn_long_long)) ! cpp_error (pfile, DL_PEDWARN, "use of C99 long long integer constant"); ! ! result |= CPP_N_INTEGER; ! } ! ! if ((result & CPP_N_IMAGINARY) && CPP_PEDANTIC (pfile)) ! cpp_error (pfile, DL_PEDWARN, "imaginary constants are a GCC extension"); ! ! if (radix == 10) ! result |= CPP_N_DECIMAL; ! else if (radix == 16) ! result |= CPP_N_HEX; ! else ! result |= CPP_N_OCTAL; ! ! return result; ! ! syntax_error: ! return CPP_N_INVALID; ! } ! ! /* cpp_interpret_integer converts an integer constant into a cpp_num, ! of precision options->precision. ! ! We do not provide any interface for decimal->float conversion, ! because the preprocessor doesn't need it and the floating point ! handling in GCC proper is too ugly to speak of. */ ! cpp_num ! cpp_interpret_integer (pfile, token, type) ! cpp_reader *pfile; ! const cpp_token *token; ! unsigned int type; ! { ! const uchar *p, *end; ! cpp_num result; ! ! result.low = 0; ! result.high = 0; ! result.unsignedp = !!(type & CPP_N_UNSIGNED); ! result.overflow = false; ! ! p = token->val.str.text; ! end = p + token->val.str.len; ! ! /* Common case of a single digit. */ ! if (token->val.str.len == 1) ! result.low = p[0] - '0'; ! else { ! cpp_num_part max; ! size_t precision = CPP_OPTION (pfile, precision); ! unsigned int base = 10, c = 0; ! bool overflow = false; ! ! if ((type & CPP_N_RADIX) == CPP_N_OCTAL) { ! base = 8; ! p++; ! } ! else if ((type & CPP_N_RADIX) == CPP_N_HEX) ! { ! base = 16; ! p += 2; } ! /* We can add a digit to numbers strictly less than this without ! needing the precision and slowness of double integers. */ ! max = ~(cpp_num_part) 0; ! if (precision < PART_PRECISION) ! max >>= PART_PRECISION - precision; ! max = (max - base + 1) / base + 1; ! for (; p < end; p++) ! { ! c = *p; ! ! if (ISDIGIT (c) || (base == 16 && ISXDIGIT (c))) ! c = hex_value (c); ! else ! break; ! ! /* Strict inequality for when max is set to zero. */ ! if (result.low < max) ! result.low = result.low * base + c; ! else ! { ! result = append_digit (result, c, base, precision); ! overflow |= result.overflow; ! max = 0; ! } ! } ! ! if (overflow) ! cpp_error (pfile, DL_PEDWARN, ! "integer constant is too large for its type"); ! /* If too big to be signed, consider it unsigned. Only warn for ! decimal numbers. Traditional numbers were always signed (but ! we still honor an explicit U suffix); but we only have ! traditional semantics in directives. */ ! else if (!result.unsignedp ! && !(CPP_OPTION (pfile, traditional) ! && pfile->state.in_directive) ! && !num_positive (result, precision)) ! { ! if (base == 10) ! cpp_error (pfile, DL_WARNING, ! "integer constant is so large that it is unsigned"); ! result.unsignedp = true; ! } } ! return result; ! } ! /* Append DIGIT to NUM, a number of PRECISION bits being read in base ! BASE. */ ! static cpp_num ! append_digit (num, digit, base, precision) ! cpp_num num; ! int digit, base; ! size_t precision; ! { ! cpp_num result; ! unsigned int shift = 3 + (base == 16); ! bool overflow; ! cpp_num_part add_high, add_low; ! ! /* Multiply by 8 or 16. Catching this overflow here means we don't ! need to worry about add_high overflowing. */ ! overflow = !!(num.high >> (PART_PRECISION - shift)); ! result.high = num.high << shift; ! result.low = num.low << shift; ! result.high |= num.low >> (PART_PRECISION - shift); ! ! if (base == 10) { ! add_low = num.low << 1; ! add_high = (num.high << 1) + (num.low >> (PART_PRECISION - 1)); } + else + add_high = add_low = 0; ! if (add_low + digit < add_low) ! add_high++; ! add_low += digit; ! ! if (result.low + add_low < result.low) ! add_high++; ! if (result.high + add_high < result.high) ! overflow = true; ! result.low += add_low; ! result.high += add_high; ! ! /* The above code catches overflow of a cpp_num type. This catches ! overflow of the (possibly shorter) target precision. */ ! num.low = result.low; ! num.high = result.high; ! result = num_trim (result, precision); ! if (!num_eq (result, num)) ! overflow = true; ! ! result.unsignedp = num.unsignedp; ! result.overflow = overflow; ! return result; } /* Handle meeting "defined" in a preprocessor expression. */ ! static cpp_num parse_defined (pfile) cpp_reader *pfile; { + cpp_num result; int paren = 0; cpp_hashnode *node = 0; const cpp_token *token; cpp_context *initial_context = pfile->context; /* Don't expand macros. */ *************** parse_defined (pfile) *** 231,266 **** node = token->val.node; if (paren && cpp_get_token (pfile)->type != CPP_CLOSE_PAREN) { ! cpp_error (pfile, "missing ')' after \"defined\""); node = 0; } } else { ! cpp_error (pfile, "operator \"defined\" requires an identifier"); if (token->flags & NAMED_OP) { cpp_token op; op.flags = 0; op.type = token->type; ! cpp_error (pfile, "(\"%s\" is an alternative token for \"%s\" in C++)", cpp_token_as_text (pfile, token), cpp_token_as_text (pfile, &op)); } } ! if (!node) ! op.op = CPP_ERROR; ! else { if (pfile->context != initial_context) ! cpp_warning (pfile, "this use of \"defined\" may not be portable"); ! op.value = node->type == NT_MACRO; ! op.unsignedp = 0; ! op.op = CPP_NUMBER; /* A possible controlling macro of the form #if !defined (). _cpp_parse_expr checks there was no other junk on the line. */ --- 479,512 ---- node = token->val.node; if (paren && cpp_get_token (pfile)->type != CPP_CLOSE_PAREN) { ! cpp_error (pfile, DL_ERROR, "missing ')' after \"defined\""); node = 0; } } else { ! cpp_error (pfile, DL_ERROR, ! "operator \"defined\" requires an identifier"); if (token->flags & NAMED_OP) { cpp_token op; op.flags = 0; op.type = token->type; ! cpp_error (pfile, DL_ERROR, "(\"%s\" is an alternative token for \"%s\" in C++)", cpp_token_as_text (pfile, token), cpp_token_as_text (pfile, &op)); } } ! if (node) { if (pfile->context != initial_context) ! cpp_error (pfile, DL_WARNING, ! "this use of \"defined\" may not be portable"); ! _cpp_mark_macro_used (node); /* A possible controlling macro of the form #if !defined (). _cpp_parse_expr checks there was no other junk on the line. */ *************** parse_defined (pfile) *** 268,316 **** } pfile->state.prevent_expansion--; ! return op; } ! /* Read a token. The returned type is CPP_NUMBER for a valid number ! (an interpreted preprocessing number or character constant, or the ! result of the "defined" or "#" operators), CPP_ERROR on error, ! CPP_EOF, or the type of an operator token. */ ! static struct op ! lex (pfile, skip_evaluation) cpp_reader *pfile; ! int skip_evaluation; { ! struct op op; ! const cpp_token *token = cpp_get_token (pfile); switch (token->type) { case CPP_NUMBER: ! return parse_number (pfile, token); - case CPP_CHAR: case CPP_WCHAR: { ! unsigned int chars_seen; ! if (token->type == CPP_CHAR) ! op.unsignedp = 0; ! else ! op.unsignedp = WCHAR_UNSIGNED; ! op.op = CPP_NUMBER; ! op.value = cpp_interpret_charconst (pfile, token, 1, 0, &chars_seen); ! return op; } ! ! case CPP_STRING: ! case CPP_WSTRING: ! SYNTAX_ERROR ("string constants are not valid in #if"); ! ! case CPP_OTHER: ! if (ISGRAPH (token->val.c)) ! SYNTAX_ERROR2 ("invalid character '%c' in #if", token->val.c); ! else ! SYNTAX_ERROR2 ("invalid character '\\%03o' in #if", token->val.c); case CPP_NAME: if (token->val.node == pfile->spec_nodes.n_defined) --- 514,582 ---- } pfile->state.prevent_expansion--; ! ! result.unsignedp = false; ! result.high = 0; ! result.overflow = false; ! result.low = node && node->type == NT_MACRO; ! return result; } ! /* Convert a token into a CPP_NUMBER (an interpreted preprocessing ! number or character constant, or the result of the "defined" or "#" ! operators). */ ! static cpp_num ! eval_token (pfile, token) cpp_reader *pfile; ! const cpp_token *token; { ! cpp_num result; ! unsigned int temp; ! int unsignedp = 0; switch (token->type) { case CPP_NUMBER: ! temp = cpp_classify_number (pfile, token); ! switch (temp & CPP_N_CATEGORY) ! { ! case CPP_N_FLOATING: ! cpp_error (pfile, DL_ERROR, ! "floating constant in preprocessor expression"); ! break; ! case CPP_N_INTEGER: ! if (!(temp & CPP_N_IMAGINARY)) ! return cpp_interpret_integer (pfile, token, temp); ! cpp_error (pfile, DL_ERROR, ! "imaginary number in preprocessor expression"); ! break; ! ! case CPP_N_INVALID: ! /* Error already issued. */ ! break; ! } ! result.high = result.low = 0; ! break; case CPP_WCHAR: + case CPP_CHAR: { ! cppchar_t cc = cpp_interpret_charconst (pfile, token, ! &temp, &unsignedp); ! result.high = 0; ! result.low = cc; ! /* Sign-extend the result if necessary. */ ! if (!unsignedp && (cppchar_signed_t) cc < 0) ! { ! if (PART_PRECISION > BITS_PER_CPPCHAR_T) ! result.low |= ~(~(cpp_num_part) 0 ! >> (PART_PRECISION - BITS_PER_CPPCHAR_T)); ! result.high = ~(cpp_num_part) 0; ! result = num_trim (result, CPP_OPTION (pfile, precision)); ! } } ! break; case CPP_NAME: if (token->val.node == pfile->spec_nodes.n_defined) *************** lex (pfile, skip_evaluation) *** 319,889 **** && (token->val.node == pfile->spec_nodes.n_true || token->val.node == pfile->spec_nodes.n_false)) { ! op.op = CPP_NUMBER; ! op.unsignedp = 0; ! op.value = (token->val.node == pfile->spec_nodes.n_true); /* Warn about use of true or false in #if when pedantic and stdbool.h has not been included. */ if (CPP_PEDANTIC (pfile) && ! cpp_defined (pfile, DSC("__bool_true_false_are_defined"))) ! cpp_pedwarn (pfile, "ISO C++ does not permit \"%s\" in #if", ! NODE_NAME (token->val.node)); ! return op; } else { ! op.op = CPP_NUMBER; ! op.unsignedp = 0; ! op.value = 0; ! ! if (CPP_OPTION (pfile, warn_undef) && !skip_evaluation) ! cpp_warning (pfile, "\"%s\" is not defined", ! NODE_NAME (token->val.node)); ! return op; ! } ! ! case CPP_HASH: ! { ! int temp; ! ! op.op = CPP_NUMBER; ! if (_cpp_test_assertion (pfile, &temp)) ! op.op = CPP_ERROR; ! op.unsignedp = 0; ! op.value = temp; ! return op; ! } ! ! default: ! if (((int) token->type > (int) CPP_EQ ! && (int) token->type < (int) CPP_PLUS_EQ) ! || token->type == CPP_EOF) ! { ! op.op = token->type; ! return op; } ! SYNTAX_ERROR2 ("\"%s\" is not valid in #if expressions", ! cpp_token_as_text (pfile, token)); ! } ! ! syntax_error: ! op.op = CPP_ERROR; ! return op; ! } ! ! /* Warn if appropriate on overflow. */ ! static void ! integer_overflow (pfile) ! cpp_reader *pfile; ! { ! if (CPP_PEDANTIC (pfile)) ! cpp_pedwarn (pfile, "integer overflow in preprocessor expression"); ! } ! ! /* Handle shifting A left by B bits. UNSIGNEDP is non-zero if A is ! unsigned. */ ! static HOST_WIDEST_INT ! left_shift (pfile, a, unsignedp, b) ! cpp_reader *pfile; ! HOST_WIDEST_INT a; ! unsigned int unsignedp; ! unsigned HOST_WIDEST_INT b; ! { ! if (b >= HOST_BITS_PER_WIDEST_INT) ! { ! if (! unsignedp && a != 0) ! integer_overflow (pfile); ! return 0; ! } ! else if (unsignedp) ! return (unsigned HOST_WIDEST_INT) a << b; ! else ! { ! HOST_WIDEST_INT l = a << b; ! if (l >> b != a) ! integer_overflow (pfile); ! return l; } - } ! /* Handle shifting A right by B bits. UNSIGNEDP is non-zero if A is ! unsigned. */ ! static HOST_WIDEST_INT ! right_shift (pfile, a, unsignedp, b) ! cpp_reader *pfile ATTRIBUTE_UNUSED; ! HOST_WIDEST_INT a; ! unsigned int unsignedp; ! unsigned HOST_WIDEST_INT b; ! { ! if (b >= HOST_BITS_PER_WIDEST_INT) ! return unsignedp ? 0 : a >> (HOST_BITS_PER_WIDEST_INT - 1); ! else if (unsignedp) ! return (unsigned HOST_WIDEST_INT) a >> b; ! else ! return a >> b; } /* Operator precedence and flags table. After an operator is returned from the lexer, if it has priority less ! than or equal to the operator on the top of the stack, we reduce the ! stack by one operator and repeat the test. Since equal priorities ! reduce, this is naturally left-associative. ! We handle right-associative operators by clearing the lower bit of all ! left-associative operators, and setting it for right-associative ones. ! After the reduction phase of a new operator, just before it is pushed ! onto the stack, its RIGHT_ASSOC bit is cleared. The effect is that ! during the reduction phase, the current right-associative operator has ! a priority one greater than any other operator of otherwise equal ! precedence that has been pushed on the top of the stack. This avoids ! a reduction pass, and effectively makes the logic right-associative. The remaining cases are '(' and ')'. We handle '(' by skipping the reduction phase completely. ')' is given lower priority than everything else, including '(', effectively forcing a reduction of the ! parenthesised expression. If there is no matching '(', the stack will ! be reduced all the way to the beginning, exiting the parser in the ! same way as the ultra-low priority end-of-expression dummy operator. ! The exit code checks to see if the operator that caused it is ')', and ! if so outputs an appropriate error message. ! ! The parser assumes all shifted operators require a right operand ! unless the flag NO_R_OPERAND is set, and similarly for NO_L_OPERAND. ! These semantics are automatically checked, any extra semantics need to ! be handled with operator-specific code. */ ! ! #define FLAG_BITS 8 ! #define FLAG_MASK ((1 << FLAG_BITS) - 1) ! #define PRIO_SHIFT (FLAG_BITS + 1) ! #define EXTRACT_PRIO(CNST) ((CNST) >> FLAG_BITS) ! #define EXTRACT_FLAGS(CNST) ((CNST) & FLAG_MASK) ! /* Flags. */ ! #define HAVE_VALUE (1 << 0) ! #define NO_L_OPERAND (1 << 1) ! #define NO_R_OPERAND (1 << 2) ! #define SHORT_CIRCUIT (1 << 3) ! /* Priority and flag combinations. */ ! #define RIGHT_ASSOC (1 << FLAG_BITS) ! #define FORCE_REDUCE_PRIO (0 << PRIO_SHIFT) ! #define CLOSE_PAREN_PRIO (1 << PRIO_SHIFT) ! #define OPEN_PAREN_PRIO ((2 << PRIO_SHIFT) | NO_L_OPERAND) ! #define COMMA_PRIO (3 << PRIO_SHIFT) ! #define COND_PRIO ((4 << PRIO_SHIFT) | RIGHT_ASSOC | SHORT_CIRCUIT) ! #define COLON_PRIO ((5 << PRIO_SHIFT) | SHORT_CIRCUIT) ! #define OROR_PRIO ((6 << PRIO_SHIFT) | SHORT_CIRCUIT) ! #define ANDAND_PRIO ((7 << PRIO_SHIFT) | SHORT_CIRCUIT) ! #define OR_PRIO (8 << PRIO_SHIFT) ! #define XOR_PRIO (9 << PRIO_SHIFT) ! #define AND_PRIO (10 << PRIO_SHIFT) ! #define MINMAX_PRIO (11 << PRIO_SHIFT) ! #define EQUAL_PRIO (12 << PRIO_SHIFT) ! #define LESS_PRIO (13 << PRIO_SHIFT) ! #define SHIFT_PRIO (14 << PRIO_SHIFT) ! #define PLUS_PRIO (15 << PRIO_SHIFT) ! #define MUL_PRIO (16 << PRIO_SHIFT) ! #define UNARY_PRIO ((17 << PRIO_SHIFT) | RIGHT_ASSOC | NO_L_OPERAND) /* Operator to priority map. Must be in the same order as the first N entries of enum cpp_ttype. */ ! static const short ! op_to_prio[] = { ! /* EQ */ 0, /* dummy entry - can't happen */ ! /* NOT */ UNARY_PRIO, ! /* GREATER */ LESS_PRIO, ! /* LESS */ LESS_PRIO, ! /* PLUS */ UNARY_PRIO, /* note these two can be unary */ ! /* MINUS */ UNARY_PRIO, /* or binary */ ! /* MULT */ MUL_PRIO, ! /* DIV */ MUL_PRIO, ! /* MOD */ MUL_PRIO, ! /* AND */ AND_PRIO, ! /* OR */ OR_PRIO, ! /* XOR */ XOR_PRIO, ! /* RSHIFT */ SHIFT_PRIO, ! /* LSHIFT */ SHIFT_PRIO, ! /* MIN */ MINMAX_PRIO, /* C++ specific */ ! /* MAX */ MINMAX_PRIO, /* extensions */ ! /* COMPL */ UNARY_PRIO, ! /* AND_AND */ ANDAND_PRIO, ! /* OR_OR */ OROR_PRIO, ! /* QUERY */ COND_PRIO, ! /* COLON */ COLON_PRIO, ! /* COMMA */ COMMA_PRIO, ! /* OPEN_PAREN */ OPEN_PAREN_PRIO, ! /* CLOSE_PAREN */ CLOSE_PAREN_PRIO, ! /* EQ_EQ */ EQUAL_PRIO, ! /* NOT_EQ */ EQUAL_PRIO, ! /* GREATER_EQ */ LESS_PRIO, ! /* LESS_EQ */ LESS_PRIO ! }; ! #define COMPARE(OP) \ ! top->unsignedp = 0; \ ! top->value = (unsigned1 | unsigned2) \ ! ? (unsigned HOST_WIDEST_INT) v1 OP (unsigned HOST_WIDEST_INT) v2 \ ! : (v1 OP v2) ! #define EQUALITY(OP) \ ! top->value = v1 OP v2; \ ! top->unsignedp = 0; ! #define BITWISE(OP) \ ! top->value = v1 OP v2; \ ! top->unsignedp = unsigned1 | unsigned2; ! #define MINMAX(OP) \ ! top->value = (v1 OP v2) ? v1 : v2; \ ! top->unsignedp = unsigned1 | unsigned2; ! #define UNARY(OP) \ ! top->value = OP v2; \ ! top->unsignedp = unsigned2; \ ! top->flags |= HAVE_VALUE; ! #define SHIFT(PSH, MSH) \ ! if (skip_evaluation) \ ! break; \ ! top->unsignedp = unsigned1; \ ! if (v2 < 0 && ! unsigned2) \ ! top->value = MSH (pfile, v1, unsigned1, -v2); \ ! else \ ! top->value = PSH (pfile, v1, unsigned1, v2); /* Parse and evaluate a C expression, reading from PFILE. ! Returns the truth value of the expression. */ ! int _cpp_parse_expr (pfile) cpp_reader *pfile; { ! /* The implementation is an operator precedence parser, i.e. a ! bottom-up parser, using a stack for not-yet-reduced tokens. ! ! The stack base is 'stack', and the current stack pointer is 'top'. ! There is a stack element for each operator (only), ! and the most recently pushed operator is 'top->op'. ! An operand (value) is stored in the 'value' field of the stack ! element of the operator that precedes it. ! In that case the 'flags' field has the HAVE_VALUE flag set. */ ! #define INIT_STACK_SIZE 20 ! struct op init_stack[INIT_STACK_SIZE]; ! struct op *stack = init_stack; ! struct op *limit = stack + INIT_STACK_SIZE; ! struct op *top = stack + 1; ! int skip_evaluation = 0; ! int result; ! unsigned int lex_count, saw_leading_not; /* Set up detection of #if ! defined(). */ pfile->mi_ind_cmacro = 0; ! saw_leading_not = 0; lex_count = 0; ! /* We've finished when we try to reduce this. */ top->op = CPP_EOF; - /* Nifty way to catch missing '('. */ - top->prio = EXTRACT_PRIO(CLOSE_PAREN_PRIO); - /* Avoid missing right operand checks. */ - top->flags = NO_R_OPERAND; for (;;) { - unsigned int prio; - unsigned int flags; struct op op; - /* Read a token */ - op = lex (pfile, skip_evaluation); lex_count++; - /* If the token is an operand, push its value and get next - token. If it is an operator, get its priority and flags, and - try to reduce the expression on the stack. */ switch (op.op) { ! case CPP_ERROR: ! goto syntax_error; ! push_immediate: case CPP_NUMBER: ! /* Push a value onto the stack. */ ! if (top->flags & HAVE_VALUE) ! SYNTAX_ERROR ("missing binary operator"); ! top->value = op.value; ! top->unsignedp = op.unsignedp; ! top->flags |= HAVE_VALUE; continue; - case CPP_EOF: prio = FORCE_REDUCE_PRIO; break; - case CPP_NOT: saw_leading_not = lex_count == 1; - prio = op_to_prio[op.op]; break; case CPP_PLUS: ! case CPP_MINUS: prio = PLUS_PRIO; if (top->flags & HAVE_VALUE) break; ! /* else unary; fall through */ ! default: prio = op_to_prio[op.op]; break; ! } ! /* Separate the operator's code into priority and flags. */ ! flags = EXTRACT_FLAGS(prio); ! prio = EXTRACT_PRIO(prio); ! if (prio == EXTRACT_PRIO(OPEN_PAREN_PRIO)) ! goto skip_reduction; ! /* Check for reductions. Then push the operator. */ ! while (prio <= top->prio) { ! HOST_WIDEST_INT v1, v2; ! unsigned int unsigned1, unsigned2; ! ! /* Most operators that can appear on the stack require a ! right operand. Check this before trying to reduce. */ ! if ((top->flags & (HAVE_VALUE | NO_R_OPERAND)) == 0) { if (top->op == CPP_OPEN_PAREN) SYNTAX_ERROR ("void expression between '(' and ')'"); - else - SYNTAX_ERROR2 ("operator '%s' has no right operand", - op_as_text (pfile, top->op)); } ! unsigned2 = top->unsignedp, v2 = top->value; top--; ! unsigned1 = top->unsignedp, v1 = top->value; ! /* Now set top->value = (top[1].op)(v1, v2); */ ! switch (top[1].op) { ! default: ! cpp_ice (pfile, "impossible operator '%s'", ! op_as_text (pfile, top[1].op)); ! goto syntax_error; ! case CPP_NOT: UNARY(!); break; ! case CPP_COMPL: UNARY(~); break; ! case CPP_LESS: COMPARE(<); break; ! case CPP_GREATER: COMPARE(>); break; ! case CPP_LESS_EQ: COMPARE(<=); break; ! case CPP_GREATER_EQ: COMPARE(>=); break; ! case CPP_EQ_EQ: EQUALITY(==); break; ! case CPP_NOT_EQ: EQUALITY(!=); break; ! case CPP_AND: BITWISE(&); break; ! case CPP_XOR: BITWISE(^); break; ! case CPP_OR: BITWISE(|); break; ! case CPP_LSHIFT: SHIFT(left_shift, right_shift); break; ! case CPP_RSHIFT: SHIFT(right_shift, left_shift); break; ! case CPP_MIN: MINMAX(<); break; ! case CPP_MAX: MINMAX(>); break; ! case CPP_PLUS: ! if (!(top->flags & HAVE_VALUE)) ! { ! /* Can't use UNARY(+) because K+R C did not have unary ! plus. Can't use UNARY() because some compilers object ! to the empty argument. */ ! top->value = v2; ! top->unsignedp = unsigned2; ! top->flags |= HAVE_VALUE; ! if (CPP_WTRADITIONAL (pfile)) ! cpp_warning (pfile, ! "traditional C rejects the unary plus operator"); ! } ! else ! { ! top->value = v1 + v2; ! top->unsignedp = unsigned1 | unsigned2; ! if (! top->unsignedp && ! skip_evaluation ! && ! possible_sum_sign (v1, v2, top->value)) ! integer_overflow (pfile); ! } ! break; ! case CPP_MINUS: ! if (!(top->flags & HAVE_VALUE)) ! { ! UNARY(-); ! if (!skip_evaluation && (top->value & v2) < 0 && !unsigned2) ! integer_overflow (pfile); ! } ! else ! { /* Binary '-' */ ! top->value = v1 - v2; ! top->unsignedp = unsigned1 | unsigned2; ! if (! top->unsignedp && ! skip_evaluation ! && ! possible_sum_sign (top->value, v2, v1)) ! integer_overflow (pfile); ! } ! break; ! case CPP_MULT: ! top->unsignedp = unsigned1 | unsigned2; ! if (top->unsignedp) ! top->value = (unsigned HOST_WIDEST_INT) v1 * v2; ! else if (!skip_evaluation) ! { ! top->value = v1 * v2; ! if (v1 && (top->value / v1 != v2 ! || (top->value & v1 & v2) < 0)) ! integer_overflow (pfile); ! } ! break; ! case CPP_DIV: ! case CPP_MOD: ! if (skip_evaluation) ! break; ! if (v2 == 0) ! SYNTAX_ERROR ("division by zero in #if"); ! top->unsignedp = unsigned1 | unsigned2; ! if (top[1].op == CPP_DIV) ! { ! if (top->unsignedp) ! top->value = (unsigned HOST_WIDEST_INT) v1 / v2; ! else ! { ! top->value = v1 / v2; ! if ((top->value & v1 & v2) < 0) ! integer_overflow (pfile); ! } ! } ! else ! { ! if (top->unsignedp) ! top->value = (unsigned HOST_WIDEST_INT) v1 % v2; ! else ! top->value = v1 % v2; ! } ! break; ! case CPP_OR_OR: ! top->value = v1 || v2; ! top->unsignedp = 0; ! if (v1) skip_evaluation--; ! break; ! case CPP_AND_AND: ! top->value = v1 && v2; ! top->unsignedp = 0; ! if (!v1) skip_evaluation--; ! break; ! case CPP_COMMA: ! if (CPP_PEDANTIC (pfile)) ! cpp_pedwarn (pfile, "comma operator in operand of #if"); ! top->value = v2; ! top->unsignedp = unsigned2; ! break; ! case CPP_QUERY: ! SYNTAX_ERROR ("syntax error '?' without following ':'"); ! case CPP_COLON: ! if (top[0].op != CPP_QUERY) ! SYNTAX_ERROR ("syntax error ':' without preceding '?'"); ! top--; ! if (top->value) skip_evaluation--; ! top->value = top->value ? v1 : v2; ! top->unsignedp = unsigned1 | unsigned2; ! break; ! case CPP_OPEN_PAREN: ! if (op.op != CPP_CLOSE_PAREN) ! SYNTAX_ERROR ("missing ')' in expression"); ! op.value = v2; ! op.unsignedp = unsigned2; ! goto push_immediate; ! case CPP_EOF: ! /* Reducing this dummy operator indicates we've finished. */ ! if (op.op == CPP_CLOSE_PAREN) ! SYNTAX_ERROR ("missing '(' in expression"); ! goto done; ! } } ! /* Handle short-circuit evaluations. */ ! if (flags & SHORT_CIRCUIT) ! switch (op.op) ! { ! case CPP_OR_OR: if (top->value) skip_evaluation++; break; ! case CPP_AND_AND: ! case CPP_QUERY: if (!top->value) skip_evaluation++; break; ! case CPP_COLON: ! if (top[-1].value) /* Was '?' condition true? */ ! skip_evaluation++; ! else ! skip_evaluation--; ! default: ! break; ! } ! skip_reduction: ! /* Check we have a left operand iff we need one. */ ! if (flags & NO_L_OPERAND) { ! if (top->flags & HAVE_VALUE) ! SYNTAX_ERROR2 ("missing binary operator before '%s'", ! op_as_text (pfile, op.op)); } else { ! if (!(top->flags & HAVE_VALUE)) ! SYNTAX_ERROR2 ("operator '%s' has no left operand", ! op_as_text (pfile, op.op)); } ! /* Check for and handle stack overflow. */ ! top++; ! if (top == limit) { ! struct op *new_stack; ! int old_size = (char *) limit - (char *) stack; ! int new_size = 2 * old_size; ! if (stack != init_stack) ! new_stack = (struct op *) xrealloc (stack, new_size); else ! { ! new_stack = (struct op *) xmalloc (new_size); ! memcpy (new_stack, stack, old_size); ! } ! stack = new_stack; ! top = (struct op *) ((char *) new_stack + old_size); ! limit = (struct op *) ((char *) new_stack + new_size); } ! ! top->flags = flags; ! top->prio = prio & ~EXTRACT_PRIO(RIGHT_ASSOC); ! top->op = op.op; } ! done: ! /* The controlling macro expression is only valid if we called lex 3 ! times: and . push_conditional () ! checks that we are at top-of-file. */ ! if (pfile->mi_ind_cmacro && !(saw_leading_not && lex_count == 3)) ! pfile->mi_ind_cmacro = 0; ! result = (top[1].value != 0); ! if (top != stack) ! CPP_ICE ("unbalanced stack in #if"); ! else if (!(top[1].flags & HAVE_VALUE)) { ! SYNTAX_ERROR ("#if with no expression"); ! syntax_error: ! result = 0; /* Return 0 on syntax error. */ } ! /* Free dynamic stack if we allocated one. */ ! if (stack != init_stack) ! free (stack); return result; } ! /* Output OP as text for diagnostics. */ ! static const unsigned char * ! op_as_text (pfile, op) cpp_reader *pfile; enum cpp_ttype op; { ! cpp_token token; ! token.type = op; ! token.flags = 0; ! return cpp_token_as_text (pfile, &token); } --- 585,1605 ---- && (token->val.node == pfile->spec_nodes.n_true || token->val.node == pfile->spec_nodes.n_false)) { ! result.high = 0; ! result.low = (token->val.node == pfile->spec_nodes.n_true); /* Warn about use of true or false in #if when pedantic and stdbool.h has not been included. */ if (CPP_PEDANTIC (pfile) && ! cpp_defined (pfile, DSC("__bool_true_false_are_defined"))) ! cpp_error (pfile, DL_PEDWARN, ! "ISO C++ does not permit \"%s\" in #if", ! NODE_NAME (token->val.node)); } else { ! result.high = 0; ! result.low = 0; ! if (CPP_OPTION (pfile, warn_undef) && !pfile->state.skip_eval) ! cpp_error (pfile, DL_WARNING, "\"%s\" is not defined", ! NODE_NAME (token->val.node)); } + break; ! default: /* CPP_HASH */ ! _cpp_test_assertion (pfile, &temp); ! result.high = 0; ! result.low = temp; } ! result.unsignedp = !!unsignedp; ! result.overflow = false; ! return result; } /* Operator precedence and flags table. After an operator is returned from the lexer, if it has priority less ! than the operator on the top of the stack, we reduce the stack by one ! operator and repeat the test. Since equal priorities do not reduce, ! this is naturally right-associative. ! We handle left-associative operators by decrementing the priority of ! just-lexed operators by one, but retaining the priority of operators ! already on the stack. The remaining cases are '(' and ')'. We handle '(' by skipping the reduction phase completely. ')' is given lower priority than everything else, including '(', effectively forcing a reduction of the ! parenthesised expression. If there is a matching '(', the routine ! reduce() exits immediately. If the normal exit route sees a ')', then ! there cannot have been a matching '(' and an error message is output. ! The parser assumes all shifted operators require a left operand unless ! the flag NO_L_OPERAND is set. These semantics are automatic; any ! extra semantics need to be handled with operator-specific code. */ ! /* Flags. If CHECK_PROMOTION, we warn if the effective sign of an ! operand changes because of integer promotions. */ ! #define NO_L_OPERAND (1 << 0) ! #define LEFT_ASSOC (1 << 1) ! #define CHECK_PROMOTION (1 << 2) /* Operator to priority map. Must be in the same order as the first N entries of enum cpp_ttype. */ ! static const struct operator { ! uchar prio; ! uchar flags; ! } optab[] = ! { ! /* EQ */ {0, 0}, /* Shouldn't happen. */ ! /* NOT */ {16, NO_L_OPERAND}, ! /* GREATER */ {12, LEFT_ASSOC | CHECK_PROMOTION}, ! /* LESS */ {12, LEFT_ASSOC | CHECK_PROMOTION}, ! /* PLUS */ {14, LEFT_ASSOC | CHECK_PROMOTION}, ! /* MINUS */ {14, LEFT_ASSOC | CHECK_PROMOTION}, ! /* MULT */ {15, LEFT_ASSOC | CHECK_PROMOTION}, ! /* DIV */ {15, LEFT_ASSOC | CHECK_PROMOTION}, ! /* MOD */ {15, LEFT_ASSOC | CHECK_PROMOTION}, ! /* AND */ {9, LEFT_ASSOC | CHECK_PROMOTION}, ! /* OR */ {7, LEFT_ASSOC | CHECK_PROMOTION}, ! /* XOR */ {8, LEFT_ASSOC | CHECK_PROMOTION}, ! /* RSHIFT */ {13, LEFT_ASSOC}, ! /* LSHIFT */ {13, LEFT_ASSOC}, ! /* MIN */ {10, LEFT_ASSOC | CHECK_PROMOTION}, ! /* MAX */ {10, LEFT_ASSOC | CHECK_PROMOTION}, ! /* COMPL */ {16, NO_L_OPERAND}, ! /* AND_AND */ {6, LEFT_ASSOC}, ! /* OR_OR */ {5, LEFT_ASSOC}, ! /* QUERY */ {3, 0}, ! /* COLON */ {4, LEFT_ASSOC | CHECK_PROMOTION}, ! /* COMMA */ {2, LEFT_ASSOC}, ! /* OPEN_PAREN */ {1, NO_L_OPERAND}, ! /* CLOSE_PAREN */ {0, 0}, ! /* EOF */ {0, 0}, ! /* EQ_EQ */ {11, LEFT_ASSOC}, ! /* NOT_EQ */ {11, LEFT_ASSOC}, ! /* GREATER_EQ */ {12, LEFT_ASSOC | CHECK_PROMOTION}, ! /* LESS_EQ */ {12, LEFT_ASSOC | CHECK_PROMOTION}, ! /* UPLUS */ {16, NO_L_OPERAND}, ! /* UMINUS */ {16, NO_L_OPERAND} ! }; /* Parse and evaluate a C expression, reading from PFILE. ! Returns the truth value of the expression. ! ! The implementation is an operator precedence parser, i.e. a ! bottom-up parser, using a stack for not-yet-reduced tokens. ! ! The stack base is op_stack, and the current stack pointer is 'top'. ! There is a stack element for each operator (only), and the most ! recently pushed operator is 'top->op'. An operand (value) is ! stored in the 'value' field of the stack element of the operator ! that precedes it. */ ! bool _cpp_parse_expr (pfile) cpp_reader *pfile; { ! struct op *top = pfile->op_stack; ! unsigned int lex_count; ! bool saw_leading_not, want_value = true; ! pfile->state.skip_eval = 0; /* Set up detection of #if ! defined(). */ pfile->mi_ind_cmacro = 0; ! saw_leading_not = false; lex_count = 0; ! /* Lowest priority operator prevents further reductions. */ top->op = CPP_EOF; for (;;) { struct op op; lex_count++; + op.token = cpp_get_token (pfile); + op.op = op.token->type; switch (op.op) { ! /* These tokens convert into values. */ case CPP_NUMBER: ! case CPP_CHAR: ! case CPP_WCHAR: ! case CPP_NAME: ! case CPP_HASH: ! if (!want_value) ! SYNTAX_ERROR2 ("missing binary operator before token \"%s\"", ! cpp_token_as_text (pfile, op.token)); ! want_value = false; ! top->value = eval_token (pfile, op.token); continue; case CPP_NOT: saw_leading_not = lex_count == 1; break; case CPP_PLUS: ! if (want_value) ! op.op = CPP_UPLUS; ! break; ! case CPP_MINUS: ! if (want_value) ! op.op = CPP_UMINUS; ! break; ! case CPP_OTHER: ! if (ISGRAPH (op.token->val.c)) ! SYNTAX_ERROR2 ("invalid character '%c' in #if", op.token->val.c); ! else ! SYNTAX_ERROR2 ("invalid character '\\%03o' in #if", ! op.token->val.c); ! default: ! if ((int) op.op <= (int) CPP_EQ || (int) op.op >= (int) CPP_PLUS_EQ) ! SYNTAX_ERROR2 ("token \"%s\" is not valid in preprocessor expressions", ! cpp_token_as_text (pfile, op.token)); ! break; ! } ! /* Check we have a value or operator as appropriate. */ ! if (optab[op.op].flags & NO_L_OPERAND) { ! if (!want_value) ! SYNTAX_ERROR2 ("missing binary operator before token \"%s\"", ! cpp_token_as_text (pfile, op.token)); ! } ! else if (want_value) ! { ! /* Ordering here is subtle and intended to favor the ! missing parenthesis diagnostics over alternatives. */ ! if (op.op == CPP_CLOSE_PAREN) { if (top->op == CPP_OPEN_PAREN) SYNTAX_ERROR ("void expression between '(' and ')'"); } + else if (top->op == CPP_EOF) + SYNTAX_ERROR ("#if with no expression"); + if (top->op != CPP_EOF && top->op != CPP_OPEN_PAREN) + SYNTAX_ERROR2 ("operator '%s' has no right operand", + cpp_token_as_text (pfile, top->token)); + } ! top = reduce (pfile, top, op.op); ! if (!top) ! goto syntax_error; ! ! if (op.op == CPP_EOF) ! break; ! ! switch (op.op) ! { ! case CPP_CLOSE_PAREN: ! continue; ! case CPP_OR_OR: ! if (!num_zerop (top->value)) ! pfile->state.skip_eval++; ! break; ! case CPP_AND_AND: ! case CPP_QUERY: ! if (num_zerop (top->value)) ! pfile->state.skip_eval++; ! break; ! case CPP_COLON: ! if (top->op != CPP_QUERY) ! SYNTAX_ERROR (" ':' without preceding '?'"); ! if (!num_zerop (top[-1].value)) /* Was '?' condition true? */ ! pfile->state.skip_eval++; ! else ! pfile->state.skip_eval--; ! default: ! break; ! } ! ! want_value = true; ! ! /* Check for and handle stack overflow. */ ! if (++top == pfile->op_limit) ! top = _cpp_expand_op_stack (pfile); ! ! top->op = op.op; ! top->token = op.token; ! } ! ! /* The controlling macro expression is only valid if we called lex 3 ! times: and . push_conditional () ! checks that we are at top-of-file. */ ! if (pfile->mi_ind_cmacro && !(saw_leading_not && lex_count == 3)) ! pfile->mi_ind_cmacro = 0; ! ! if (top != pfile->op_stack) ! { ! cpp_error (pfile, DL_ICE, "unbalanced stack in #if"); ! syntax_error: ! return false; /* Return false on syntax error. */ ! } ! ! return !num_zerop (top->value); ! } ! ! /* Reduce the operator / value stack if possible, in preparation for ! pushing operator OP. Returns NULL on error, otherwise the top of ! the stack. */ ! static struct op * ! reduce (pfile, top, op) ! cpp_reader *pfile; ! struct op *top; ! enum cpp_ttype op; ! { ! unsigned int prio; ! ! if (top->op <= CPP_EQ || top->op > CPP_LAST_CPP_OP + 2) ! { ! bad_op: ! cpp_error (pfile, DL_ICE, "impossible operator '%u'", top->op); ! return 0; ! } ! ! if (op == CPP_OPEN_PAREN) ! return top; ! ! /* Decrement the priority of left-associative operators to force a ! reduction with operators of otherwise equal priority. */ ! prio = optab[op].prio - ((optab[op].flags & LEFT_ASSOC) != 0); ! while (prio < optab[top->op].prio) ! { ! if (CPP_OPTION (pfile, warn_num_sign_change) ! && optab[top->op].flags & CHECK_PROMOTION) ! check_promotion (pfile, top); ! ! switch (top->op) ! { ! case CPP_UPLUS: ! case CPP_UMINUS: ! case CPP_NOT: ! case CPP_COMPL: ! top[-1].value = num_unary_op (pfile, top->value, top->op); ! break; ! ! case CPP_PLUS: ! case CPP_MINUS: ! case CPP_RSHIFT: ! case CPP_LSHIFT: ! case CPP_MIN: ! case CPP_MAX: ! case CPP_COMMA: ! top[-1].value = num_binary_op (pfile, top[-1].value, ! top->value, top->op); ! break; ! ! case CPP_GREATER: ! case CPP_LESS: ! case CPP_GREATER_EQ: ! case CPP_LESS_EQ: ! top[-1].value ! = num_inequality_op (pfile, top[-1].value, top->value, top->op); ! break; ! ! case CPP_EQ_EQ: ! case CPP_NOT_EQ: ! top[-1].value ! = num_equality_op (pfile, top[-1].value, top->value, top->op); ! break; ! ! case CPP_AND: ! case CPP_OR: ! case CPP_XOR: ! top[-1].value ! = num_bitwise_op (pfile, top[-1].value, top->value, top->op); ! break; ! ! case CPP_MULT: ! top[-1].value = num_mul (pfile, top[-1].value, top->value); ! break; ! ! case CPP_DIV: ! case CPP_MOD: ! top[-1].value = num_div_op (pfile, top[-1].value, ! top->value, top->op); ! break; ! ! case CPP_OR_OR: top--; ! if (!num_zerop (top->value)) ! pfile->state.skip_eval--; ! top->value.low = (!num_zerop (top->value) ! || !num_zerop (top[1].value)); ! top->value.high = 0; ! top->value.unsignedp = false; ! top->value.overflow = false; ! continue; ! case CPP_AND_AND: ! top--; ! if (num_zerop (top->value)) ! pfile->state.skip_eval--; ! top->value.low = (!num_zerop (top->value) ! && !num_zerop (top[1].value)); ! top->value.high = 0; ! top->value.unsignedp = false; ! top->value.overflow = false; ! continue; ! ! case CPP_OPEN_PAREN: ! if (op != CPP_CLOSE_PAREN) { ! cpp_error (pfile, DL_ERROR, "missing ')' in expression"); ! return 0; ! } ! top--; ! top->value = top[1].value; ! return top; ! case CPP_COLON: ! top -= 2; ! if (!num_zerop (top->value)) ! { ! pfile->state.skip_eval--; ! top->value = top[1].value; ! } ! else ! top->value = top[2].value; ! top->value.unsignedp = (top[1].value.unsignedp ! || top[2].value.unsignedp); ! continue; ! case CPP_QUERY: ! cpp_error (pfile, DL_ERROR, "'?' without following ':'"); ! return 0; ! default: ! goto bad_op; ! } ! top--; ! if (top->value.overflow && !pfile->state.skip_eval) ! cpp_error (pfile, DL_PEDWARN, ! "integer overflow in preprocessor expression"); ! } ! ! if (op == CPP_CLOSE_PAREN) ! { ! cpp_error (pfile, DL_ERROR, "missing '(' in expression"); ! return 0; ! } ! ! return top; ! } ! ! /* Returns the position of the old top of stack after expansion. */ ! struct op * ! _cpp_expand_op_stack (pfile) ! cpp_reader *pfile; ! { ! size_t old_size = (size_t) (pfile->op_limit - pfile->op_stack); ! size_t new_size = old_size * 2 + 20; ! ! pfile->op_stack = (struct op *) xrealloc (pfile->op_stack, ! new_size * sizeof (struct op)); ! pfile->op_limit = pfile->op_stack + new_size; ! ! return pfile->op_stack + old_size; ! } ! ! /* Emits a warning if the effective sign of either operand of OP ! changes because of integer promotions. */ ! static void ! check_promotion (pfile, op) ! cpp_reader *pfile; ! const struct op *op; ! { ! if (op->value.unsignedp == op[-1].value.unsignedp) ! return; ! ! if (op->value.unsignedp) ! { ! if (!num_positive (op[-1].value, CPP_OPTION (pfile, precision))) ! cpp_error (pfile, DL_WARNING, ! "the left operand of \"%s\" changes sign when promoted", ! cpp_token_as_text (pfile, op->token)); ! } ! else if (!num_positive (op->value, CPP_OPTION (pfile, precision))) ! cpp_error (pfile, DL_WARNING, ! "the right operand of \"%s\" changes sign when promoted", ! cpp_token_as_text (pfile, op->token)); ! } ! ! /* Clears the unused high order bits of the number pointed to by PNUM. */ ! static cpp_num ! num_trim (num, precision) ! cpp_num num; ! size_t precision; ! { ! if (precision > PART_PRECISION) ! { ! precision -= PART_PRECISION; ! if (precision < PART_PRECISION) ! num.high &= ((cpp_num_part) 1 << precision) - 1; ! } ! else ! { ! if (precision < PART_PRECISION) ! num.low &= ((cpp_num_part) 1 << precision) - 1; ! num.high = 0; ! } ! ! return num; ! } ! ! /* True iff A (presumed signed) >= 0. */ ! static bool ! num_positive (num, precision) ! cpp_num num; ! size_t precision; ! { ! if (precision > PART_PRECISION) ! { ! precision -= PART_PRECISION; ! return (num.high & (cpp_num_part) 1 << (precision - 1)) == 0; ! } ! ! return (num.low & (cpp_num_part) 1 << (precision - 1)) == 0; ! } ! ! /* Sign extend a number, with PRECISION significant bits and all ! others assumed clear, to fill out a cpp_num structure. */ ! cpp_num ! cpp_num_sign_extend (num, precision) ! cpp_num num; ! size_t precision; ! { ! if (!num.unsignedp) ! { ! if (precision > PART_PRECISION) ! { ! precision -= PART_PRECISION; ! if (precision < PART_PRECISION ! && (num.high & (cpp_num_part) 1 << (precision - 1))) ! num.high |= ~(~(cpp_num_part) 0 >> (PART_PRECISION - precision)); ! } ! else if (num.low & (cpp_num_part) 1 << (precision - 1)) ! { ! if (precision < PART_PRECISION) ! num.low |= ~(~(cpp_num_part) 0 >> (PART_PRECISION - precision)); ! num.high = ~(cpp_num_part) 0; } + } ! return num; ! } ! /* Returns the negative of NUM. */ ! static cpp_num ! num_negate (num, precision) ! cpp_num num; ! size_t precision; ! { ! cpp_num copy; ! ! copy = num; ! num.high = ~num.high; ! num.low = ~num.low; ! if (++num.low == 0) ! num.high++; ! num = num_trim (num, precision); ! num.overflow = (!num.unsignedp && num_eq (num, copy) && !num_zerop (num)); ! ! return num; ! } ! ! /* Returns true if A >= B. */ ! static bool ! num_greater_eq (pa, pb, precision) ! cpp_num pa, pb; ! size_t precision; ! { ! bool unsignedp; ! ! unsignedp = pa.unsignedp || pb.unsignedp; ! ! if (!unsignedp) ! { ! /* Both numbers have signed type. If they are of different ! sign, the answer is the sign of A. */ ! unsignedp = num_positive (pa, precision); ! ! if (unsignedp != num_positive (pb, precision)) ! return unsignedp; ! ! /* Otherwise we can do an unsigned comparison. */ ! } ! ! return (pa.high > pb.high) || (pa.high == pb.high && pa.low >= pb.low); ! } ! ! /* Returns LHS OP RHS, where OP is a bit-wise operation. */ ! static cpp_num ! num_bitwise_op (pfile, lhs, rhs, op) ! cpp_reader *pfile ATTRIBUTE_UNUSED; ! cpp_num lhs, rhs; ! enum cpp_ttype op; ! { ! lhs.overflow = false; ! lhs.unsignedp = lhs.unsignedp || rhs.unsignedp; ! ! /* As excess precision is zeroed, there is no need to num_trim () as ! these operations cannot introduce a set bit there. */ ! if (op == CPP_AND) ! { ! lhs.low &= rhs.low; ! lhs.high &= rhs.high; ! } ! else if (op == CPP_OR) ! { ! lhs.low |= rhs.low; ! lhs.high |= rhs.high; ! } ! else ! { ! lhs.low ^= rhs.low; ! lhs.high ^= rhs.high; ! } ! ! return lhs; ! } ! ! /* Returns LHS OP RHS, where OP is an inequality. */ ! static cpp_num ! num_inequality_op (pfile, lhs, rhs, op) ! cpp_reader *pfile; ! cpp_num lhs, rhs; ! enum cpp_ttype op; ! { ! bool gte = num_greater_eq (lhs, rhs, CPP_OPTION (pfile, precision)); ! ! if (op == CPP_GREATER_EQ) ! lhs.low = gte; ! else if (op == CPP_LESS) ! lhs.low = !gte; ! else if (op == CPP_GREATER) ! lhs.low = gte && !num_eq (lhs, rhs); ! else /* CPP_LESS_EQ. */ ! lhs.low = !gte || num_eq (lhs, rhs); ! ! lhs.high = 0; ! lhs.overflow = false; ! lhs.unsignedp = false; ! return lhs; ! } ! ! /* Returns LHS OP RHS, where OP is == or !=. */ ! static cpp_num ! num_equality_op (pfile, lhs, rhs, op) ! cpp_reader *pfile ATTRIBUTE_UNUSED; ! cpp_num lhs, rhs; ! enum cpp_ttype op; ! { ! /* Work around a 3.0.4 bug; see PR 6950. */ ! bool eq = num_eq (lhs, rhs); ! if (op == CPP_NOT_EQ) ! eq = !eq; ! lhs.low = eq; ! lhs.high = 0; ! lhs.overflow = false; ! lhs.unsignedp = false; ! return lhs; ! } ! ! /* Shift NUM, of width PRECISION, right by N bits. */ ! static cpp_num ! num_rshift (num, precision, n) ! cpp_num num; ! size_t precision, n; ! { ! cpp_num_part sign_mask; ! ! if (num.unsignedp || num_positive (num, precision)) ! sign_mask = 0; ! else ! sign_mask = ~(cpp_num_part) 0; ! ! if (n >= precision) ! num.high = num.low = sign_mask; ! else ! { ! /* Sign-extend. */ ! if (precision < PART_PRECISION) ! num.high = sign_mask, num.low |= sign_mask << precision; ! else if (precision < 2 * PART_PRECISION) ! num.high |= sign_mask << (precision - PART_PRECISION); ! ! if (n >= PART_PRECISION) { ! n -= PART_PRECISION; ! num.low = num.high; ! num.high = sign_mask; ! } ! ! if (n) ! { ! num.low = (num.low >> n) | (num.high << (PART_PRECISION - n)); ! num.high = (num.high >> n) | (sign_mask << (PART_PRECISION - n)); ! } ! } ! ! num = num_trim (num, precision); ! num.overflow = false; ! return num; ! } ! ! /* Shift NUM, of width PRECISION, left by N bits. */ ! static cpp_num ! num_lshift (num, precision, n) ! cpp_num num; ! size_t precision, n; ! { ! if (n >= precision) ! { ! num.overflow = !num.unsignedp && !num_zerop (num); ! num.high = num.low = 0; ! } ! else ! { ! cpp_num orig, maybe_orig; ! size_t m = n; ! ! orig = num; ! if (m >= PART_PRECISION) ! { ! m -= PART_PRECISION; ! num.high = num.low; ! num.low = 0; ! } ! if (m) ! { ! num.high = (num.high << m) | (num.low >> (PART_PRECISION - m)); ! num.low <<= m; } + num = num_trim (num, precision); + + if (num.unsignedp) + num.overflow = false; else { ! maybe_orig = num_rshift (num, precision, n); ! num.overflow = !num_eq (orig, maybe_orig); } + } ! return num; ! } ! ! /* The four unary operators: +, -, ! and ~. */ ! static cpp_num ! num_unary_op (pfile, num, op) ! cpp_reader *pfile; ! cpp_num num; ! enum cpp_ttype op; ! { ! switch (op) ! { ! case CPP_UPLUS: ! if (CPP_WTRADITIONAL (pfile) && !pfile->state.skip_eval) ! cpp_error (pfile, DL_WARNING, ! "traditional C rejects the unary plus operator"); ! num.overflow = false; ! break; ! ! case CPP_UMINUS: ! num = num_negate (num, CPP_OPTION (pfile, precision)); ! break; ! ! case CPP_COMPL: ! num.high = ~num.high; ! num.low = ~num.low; ! num = num_trim (num, CPP_OPTION (pfile, precision)); ! num.overflow = false; ! break; ! ! default: /* case CPP_NOT: */ ! num.low = num_zerop (num); ! num.high = 0; ! num.overflow = false; ! num.unsignedp = false; ! break; ! } ! ! return num; ! } ! ! /* The various binary operators. */ ! static cpp_num ! num_binary_op (pfile, lhs, rhs, op) ! cpp_reader *pfile; ! cpp_num lhs, rhs; ! enum cpp_ttype op; ! { ! cpp_num result; ! size_t precision = CPP_OPTION (pfile, precision); ! bool gte; ! size_t n; ! ! switch (op) ! { ! /* Shifts. */ ! case CPP_LSHIFT: ! case CPP_RSHIFT: ! if (!rhs.unsignedp && !num_positive (rhs, precision)) { ! /* A negative shift is a positive shift the other way. */ ! if (op == CPP_LSHIFT) ! op = CPP_RSHIFT; else ! op = CPP_LSHIFT; ! rhs = num_negate (rhs, precision); } ! if (rhs.high) ! n = ~0; /* Maximal. */ ! else ! n = rhs.low; ! if (op == CPP_LSHIFT) ! lhs = num_lshift (lhs, precision, n); ! else ! lhs = num_rshift (lhs, precision, n); ! break; ! ! /* Min / Max. */ ! case CPP_MIN: ! case CPP_MAX: ! { ! bool unsignedp = lhs.unsignedp || rhs.unsignedp; ! ! gte = num_greater_eq (lhs, rhs, precision); ! if (op == CPP_MIN) ! gte = !gte; ! if (!gte) ! lhs = rhs; ! lhs.unsignedp = unsignedp; ! } ! break; ! ! /* Arithmetic. */ ! case CPP_MINUS: ! rhs = num_negate (rhs, precision); ! case CPP_PLUS: ! result.low = lhs.low + rhs.low; ! result.high = lhs.high + rhs.high; ! if (result.low < lhs.low) ! result.high++; ! ! result = num_trim (result, precision); ! result.unsignedp = lhs.unsignedp || rhs.unsignedp; ! if (result.unsignedp) ! result.overflow = false; ! else ! { ! bool lhsp = num_positive (lhs, precision); ! result.overflow = (lhsp == num_positive (rhs, precision) ! && lhsp != num_positive (result, precision)); ! } ! return result; ! ! /* Comma. */ ! default: /* case CPP_COMMA: */ ! if (CPP_PEDANTIC (pfile) && !pfile->state.skip_eval) ! cpp_error (pfile, DL_PEDWARN, ! "comma operator in operand of #if"); ! lhs = rhs; ! break; } ! return lhs; ! } ! /* Multiplies two unsigned cpp_num_parts to give a cpp_num. This ! cannot overflow. */ ! static cpp_num ! num_part_mul (lhs, rhs) ! cpp_num_part lhs, rhs; ! { ! cpp_num result; ! cpp_num_part middle[2], temp; ! result.low = LOW_PART (lhs) * LOW_PART (rhs); ! result.high = HIGH_PART (lhs) * HIGH_PART (rhs); ! ! middle[0] = LOW_PART (lhs) * HIGH_PART (rhs); ! middle[1] = HIGH_PART (lhs) * LOW_PART (rhs); ! ! temp = result.low; ! result.low += LOW_PART (middle[0]) << (PART_PRECISION / 2); ! if (result.low < temp) ! result.high++; ! ! temp = result.low; ! result.low += LOW_PART (middle[1]) << (PART_PRECISION / 2); ! if (result.low < temp) ! result.high++; ! ! result.high += HIGH_PART (middle[0]); ! result.high += HIGH_PART (middle[1]); ! result.unsignedp = 1; ! ! return result; ! } ! ! /* Multiply two preprocessing numbers. */ ! static cpp_num ! num_mul (pfile, lhs, rhs) ! cpp_reader *pfile; ! cpp_num lhs, rhs; ! { ! cpp_num result, temp; ! bool unsignedp = lhs.unsignedp || rhs.unsignedp; ! bool overflow, negate = false; ! size_t precision = CPP_OPTION (pfile, precision); ! ! /* Prepare for unsigned multiplication. */ ! if (!unsignedp) { ! if (!num_positive (lhs, precision)) ! negate = !negate, lhs = num_negate (lhs, precision); ! if (!num_positive (rhs, precision)) ! negate = !negate, rhs = num_negate (rhs, precision); } ! overflow = lhs.high && rhs.high; ! result = num_part_mul (lhs.low, rhs.low); ! ! temp = num_part_mul (lhs.high, rhs.low); ! result.high += temp.low; ! if (temp.high) ! overflow = true; ! ! temp = num_part_mul (lhs.low, rhs.high); ! result.high += temp.low; ! if (temp.high) ! overflow = true; ! ! temp.low = result.low, temp.high = result.high; ! result = num_trim (result, precision); ! if (!num_eq (result, temp)) ! overflow = true; ! ! if (negate) ! result = num_negate (result, precision); ! ! if (unsignedp) ! result.overflow = false; ! else ! result.overflow = overflow || (num_positive (result, precision) ^ !negate ! && !num_zerop (result)); ! result.unsignedp = unsignedp; ! return result; } ! /* Divide two preprocessing numbers, returning the answer or the ! remainder depending upon OP. */ ! static cpp_num ! num_div_op (pfile, lhs, rhs, op) cpp_reader *pfile; + cpp_num lhs, rhs; enum cpp_ttype op; { ! cpp_num result, sub; ! cpp_num_part mask; ! bool unsignedp = lhs.unsignedp || rhs.unsignedp; ! bool negate = false, lhs_neg = false; ! size_t i, precision = CPP_OPTION (pfile, precision); ! /* Prepare for unsigned division. */ ! if (!unsignedp) ! { ! if (!num_positive (lhs, precision)) ! negate = !negate, lhs_neg = true, lhs = num_negate (lhs, precision); ! if (!num_positive (rhs, precision)) ! negate = !negate, rhs = num_negate (rhs, precision); ! } ! ! /* Find the high bit. */ ! if (rhs.high) ! { ! i = precision - 1; ! mask = (cpp_num_part) 1 << (i - PART_PRECISION); ! for (; ; i--, mask >>= 1) ! if (rhs.high & mask) ! break; ! } ! else if (rhs.low) ! { ! if (precision > PART_PRECISION) ! i = precision - PART_PRECISION - 1; ! else ! i = precision - 1; ! mask = (cpp_num_part) 1 << i; ! for (; ; i--, mask >>= 1) ! if (rhs.low & mask) ! break; ! } ! else ! { ! if (!pfile->state.skip_eval) ! cpp_error (pfile, DL_ERROR, "division by zero in #if"); ! return lhs; ! } ! ! /* First nonzero bit of RHS is bit I. Do naive division by ! shifting the RHS fully left, and subtracting from LHS if LHS is ! at least as big, and then repeating but with one less shift. ! This is not very efficient, but is easy to understand. */ ! ! rhs.unsignedp = true; ! lhs.unsignedp = true; ! i = precision - i - 1; ! sub = num_lshift (rhs, precision, i); ! ! result.high = result.low = 0; ! for (;;) ! { ! if (num_greater_eq (lhs, sub, precision)) ! { ! lhs = num_binary_op (pfile, lhs, sub, CPP_MINUS); ! if (i >= PART_PRECISION) ! result.high |= (cpp_num_part) 1 << (i - PART_PRECISION); ! else ! result.low |= (cpp_num_part) 1 << i; ! } ! if (i-- == 0) ! break; ! sub.low = (sub.low >> 1) | (sub.high << (PART_PRECISION - 1)); ! sub.high >>= 1; ! } ! ! /* We divide so that the remainder has the sign of the LHS. */ ! if (op == CPP_DIV) ! { ! result.unsignedp = unsignedp; ! if (unsignedp) ! result.overflow = false; ! else ! { ! if (negate) ! result = num_negate (result, precision); ! result.overflow = num_positive (result, precision) ^ !negate; ! } ! ! return result; ! } ! ! /* CPP_MOD. */ ! lhs.unsignedp = unsignedp; ! lhs.overflow = false; ! if (lhs_neg) ! lhs = num_negate (lhs, precision); ! ! return lhs; } diff -Nrc3pad gcc-3.2.3/gcc/cppfiles.c gcc-3.3/gcc/cppfiles.c *** gcc-3.2.3/gcc/cppfiles.c 2002-08-15 19:46:35.000000000 +0000 --- gcc-3.3/gcc/cppfiles.c 2002-11-20 19:49:53.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 27,32 **** --- 27,38 ---- #include "intl.h" #include "mkdeps.h" #include "splay-tree.h" + #ifdef ENABLE_VALGRIND_CHECKING + #include + #else + /* Avoid #ifdef:s when we can help it. */ + #define VALGRIND_DISCARD(x) + #endif #ifdef HAVE_MMAP_FILE # include *************** Foundation, 59 Temple Place - Suite 330, *** 77,84 **** #undef strcmp /* This structure is used for the table of all includes. */ ! struct include_file ! { const char *name; /* actual path name of file */ const cpp_hashnode *cmacro; /* macro, if any, preventing reinclusion. */ const struct search_path *foundhere; --- 83,89 ---- #undef strcmp /* This structure is used for the table of all includes. */ ! struct include_file { const char *name; /* actual path name of file */ const cpp_hashnode *cmacro; /* macro, if any, preventing reinclusion. */ const struct search_path *foundhere; *************** struct include_file *** 106,112 **** included again. If it's NEVER_REREAD, the file is never to be included again. Otherwise it is a macro hashnode, and the file is to be included again if the macro is defined. */ ! #define NEVER_REREAD ((const cpp_hashnode *)-1) #define DO_NOT_REREAD(inc) \ ((inc)->cmacro && ((inc)->cmacro == NEVER_REREAD \ || (inc)->cmacro->type == NT_MACRO)) --- 111,117 ---- included again. If it's NEVER_REREAD, the file is never to be included again. Otherwise it is a macro hashnode, and the file is to be included again if the macro is defined. */ ! #define NEVER_REREAD ((const cpp_hashnode *) -1) #define DO_NOT_REREAD(inc) \ ((inc)->cmacro && ((inc)->cmacro == NEVER_REREAD \ || (inc)->cmacro->type == NT_MACRO)) *************** static void *** 168,174 **** destroy_node (v) splay_tree_value v; { ! struct include_file *f = (struct include_file *)v; if (f) { --- 173,179 ---- destroy_node (v) splay_tree_value v; { ! struct include_file *f = (struct include_file *) v; if (f) { *************** open_file (pfile, filename) *** 250,256 **** /* Don't reopen an idempotent file. */ if (DO_NOT_REREAD (file)) return file; ! /* Don't reopen one which is already loaded. */ if (file->buffer != NULL) return file; --- 255,261 ---- /* Don't reopen an idempotent file. */ if (DO_NOT_REREAD (file)) return file; ! /* Don't reopen one which is already loaded. */ if (file->buffer != NULL) return file; *************** open_file (pfile, filename) *** 270,276 **** Special case: the empty string is translated to stdin. */ if (filename[0] == '\0') ! file->fd = 0; else file->fd = open (file->name, O_RDONLY | O_NOCTTY | O_BINARY, 0666); --- 275,289 ---- Special case: the empty string is translated to stdin. */ if (filename[0] == '\0') ! { ! file->fd = 0; ! #ifdef __DJGPP__ ! /* For DJGPP redirected input is opened in text mode. Change it ! to binary mode. */ ! if (! isatty (file->fd)) ! setmode (file->fd, O_BINARY); ! #endif ! } else file->fd = open (file->name, O_RDONLY | O_NOCTTY | O_BINARY, 0666); *************** stack_include_file (pfile, inc) *** 311,319 **** (inc->foundhere ? inc->foundhere->sysp : 0)); /* Add the file to the dependencies on its first inclusion. */ ! if (CPP_OPTION (pfile, print_deps) > !!sysp && !inc->include_count) { ! if (pfile->buffer || CPP_OPTION (pfile, deps_ignore_main_file) == 0) deps_add_dep (pfile->deps, inc->name); } --- 324,332 ---- (inc->foundhere ? inc->foundhere->sysp : 0)); /* Add the file to the dependencies on its first inclusion. */ ! if (CPP_OPTION (pfile, deps.style) > !!sysp && !inc->include_count) { ! if (pfile->buffer || CPP_OPTION (pfile, deps.ignore_main_file) == 0) deps_add_dep (pfile->deps, inc->name); } *************** stack_include_file (pfile, inc) *** 345,351 **** fp->inc = inc; fp->inc->refcnt++; ! /* Initialise controlling macro state. */ pfile->mi_valid = true; pfile->mi_cmacro = 0; --- 358,364 ---- fp->inc = inc; fp->inc->refcnt++; ! /* Initialize controlling macro state. */ pfile->mi_valid = true; pfile->mi_cmacro = 0; *************** read_include_file (pfile, inc) *** 378,384 **** struct include_file *inc; { ssize_t size, offset, count; ! U_CHAR *buf; #if MMAP_THRESHOLD static int pagesize = -1; #endif --- 391,397 ---- struct include_file *inc; { ssize_t size, offset, count; ! uchar *buf; #if MMAP_THRESHOLD static int pagesize = -1; #endif *************** read_include_file (pfile, inc) *** 395,401 **** does not bite us. */ if (inc->st.st_size > INTTYPE_MAXIMUM (ssize_t)) { ! cpp_error (pfile, "%s is too large", inc->name); goto fail; } size = inc->st.st_size; --- 408,414 ---- does not bite us. */ if (inc->st.st_size > INTTYPE_MAXIMUM (ssize_t)) { ! cpp_error (pfile, DL_ERROR, "%s is too large", inc->name); goto fail; } size = inc->st.st_size; *************** read_include_file (pfile, inc) *** 407,421 **** if (SHOULD_MMAP (size, pagesize)) { ! buf = (U_CHAR *) mmap (0, size, PROT_READ, MAP_PRIVATE, inc->fd, 0); ! if (buf == (U_CHAR *)-1) goto perror_fail; inc->mapped = 1; } else #endif { ! buf = (U_CHAR *) xmalloc (size + 1); offset = 0; while (offset < size) { --- 420,439 ---- if (SHOULD_MMAP (size, pagesize)) { ! buf = (uchar *) mmap (0, size, PROT_READ, MAP_PRIVATE, inc->fd, 0); ! if (buf == (uchar *) -1) goto perror_fail; + + /* We must tell Valgrind that the byte at buf[size] is actually + readable. Discard the handle to avoid handle leak. */ + VALGRIND_DISCARD (VALGRIND_MAKE_READABLE (buf + size, 1)); + inc->mapped = 1; } else #endif { ! buf = (uchar *) xmalloc (size + 1); offset = 0; while (offset < size) { *************** read_include_file (pfile, inc) *** 425,432 **** if (count == 0) { if (!STAT_SIZE_TOO_BIG (inc->st)) ! cpp_warning ! (pfile, "%s is shorter than expected", inc->name); size = offset; buf = xrealloc (buf, size + 1); inc->st.st_size = size; --- 443,450 ---- if (count == 0) { if (!STAT_SIZE_TOO_BIG (inc->st)) ! cpp_error (pfile, DL_WARNING, ! "%s is shorter than expected", inc->name); size = offset; buf = xrealloc (buf, size + 1); inc->st.st_size = size; *************** read_include_file (pfile, inc) *** 440,446 **** } else if (S_ISBLK (inc->st.st_mode)) { ! cpp_error (pfile, "%s is a block device", inc->name); goto fail; } else --- 458,464 ---- } else if (S_ISBLK (inc->st.st_mode)) { ! cpp_error (pfile, DL_ERROR, "%s is a block device", inc->name); goto fail; } else *************** read_include_file (pfile, inc) *** 450,456 **** bigger than the majority of C source files. */ size = 8 * 1024; ! buf = (U_CHAR *) xmalloc (size + 1); offset = 0; while ((count = read (inc->fd, buf + offset, size - offset)) > 0) { --- 468,474 ---- bigger than the majority of C source files. */ size = 8 * 1024; ! buf = (uchar *) xmalloc (size + 1); offset = 0; while ((count = read (inc->fd, buf + offset, size - offset)) > 0) { *************** read_include_file (pfile, inc) *** 476,482 **** return 0; perror_fail: ! cpp_error_from_errno (pfile, inc->name); fail: return 1; } --- 494,500 ---- return 0; perror_fail: ! cpp_errno (pfile, DL_ERROR, inc->name); fail: return 1; } *************** purge_cache (inc) *** 490,496 **** { #if MMAP_THRESHOLD if (inc->mapped) ! munmap ((PTR) inc->buffer, inc->st.st_size); else #endif free ((PTR) inc->buffer); --- 508,521 ---- { #if MMAP_THRESHOLD if (inc->mapped) ! { ! /* Undo the previous annotation for the ! known-zero-byte-after-mmap. Discard the handle to avoid ! handle leak. */ ! VALGRIND_DISCARD (VALGRIND_MAKE_NOACCESS (inc->buffer ! + inc->st.st_size, 1)); ! munmap ((PTR) inc->buffer, inc->st.st_size); ! } else #endif free ((PTR) inc->buffer); *************** cpp_included (pfile, fname) *** 515,521 **** nd = splay_tree_lookup (pfile->all_include_files, (splay_tree_key) fname); return (nd && nd->value); } ! /* Search directory path for the file. */ name = (char *) alloca (strlen (fname) + pfile->max_include_len + 2); for (path = CPP_OPTION (pfile, quote_include); path; path = path->next) --- 540,546 ---- nd = splay_tree_lookup (pfile->all_include_files, (splay_tree_key) fname); return (nd && nd->value); } ! /* Search directory path for the file. */ name = (char *) alloca (strlen (fname) + pfile->max_include_len + 2); for (path = CPP_OPTION (pfile, quote_include); path; path = path->next) *************** find_include_file (pfile, header, type) *** 566,572 **** if (path == NULL) { ! cpp_error (pfile, "no include path in which to find %s", fname); return NO_INCLUDE_PATH; } --- 591,598 ---- if (path == NULL) { ! cpp_error (pfile, DL_ERROR, "no include path in which to find %s", ! fname); return NO_INCLUDE_PATH; } *************** report_missing_guard (n, b) *** 633,639 **** void *b; { struct include_file *f = (struct include_file *) n->value; ! int *bannerp = (int *)b; if (f && f->cmacro == 0 && f->include_count == 1) { --- 659,665 ---- void *b; { struct include_file *f = (struct include_file *) n->value; ! int *bannerp = (int *) b; if (f && f->cmacro == 0 && f->include_count == 1) { *************** report_missing_guard (n, b) *** 649,655 **** } /* Create a dependency for file FNAME, or issue an error message as ! appropriate. ANGLE_BRACKETS is non-zero if the file was bracketed like <..>. */ static void handle_missing_header (pfile, fname, angle_brackets) --- 675,681 ---- } /* Create a dependency for file FNAME, or issue an error message as ! appropriate. ANGLE_BRACKETS is nonzero if the file was bracketed like <..>. */ static void handle_missing_header (pfile, fname, angle_brackets) *************** handle_missing_header (pfile, fname, ang *** 657,699 **** const char *fname; int angle_brackets; { ! int print_dep = CPP_PRINT_DEPS(pfile) > (angle_brackets || pfile->map->sysp); ! ! if (CPP_OPTION (pfile, print_deps_missing_files) && print_dep) ! { ! if (!angle_brackets || IS_ABSOLUTE_PATHNAME (fname)) ! deps_add_dep (pfile->deps, fname); ! else ! { ! /* If requested as a system header, assume it belongs in ! the first system header directory. */ ! struct search_path *ptr = CPP_OPTION (pfile, bracket_include); ! char *p; ! int len = 0, fname_len = strlen (fname); ! ! if (ptr) ! len = ptr->len; ! p = (char *) alloca (len + fname_len + 2); ! if (len) ! { ! memcpy (p, ptr->name, len); ! p[len++] = '/'; ! } ! memcpy (p + len, fname, fname_len + 1); ! deps_add_dep (pfile->deps, p); ! } ! } /* If -M was specified, then don't count this as an error, because we can still produce correct output. Otherwise, we can't produce correct output, because there may be dependencies we need inside the missing file, and we don't know what directory this missing ! file exists in. FIXME: Use a future cpp_diagnostic_with_errno () ! for both of these cases. */ ! else if (CPP_PRINT_DEPS (pfile) && ! print_dep) ! cpp_warning (pfile, "%s: %s", fname, xstrerror (errno)); else ! cpp_error_from_errno (pfile, fname); } /* Handles #include-family directives (distinguished by TYPE), --- 683,701 ---- const char *fname; int angle_brackets; { ! bool print_dep ! = CPP_OPTION (pfile, deps.style) > (angle_brackets || pfile->map->sysp); ! if (CPP_OPTION (pfile, deps.missing_files) && print_dep) ! deps_add_dep (pfile->deps, fname); /* If -M was specified, then don't count this as an error, because we can still produce correct output. Otherwise, we can't produce correct output, because there may be dependencies we need inside the missing file, and we don't know what directory this missing ! file exists in. */ else ! cpp_errno (pfile, CPP_OPTION (pfile, deps.style) && ! print_dep ! ? DL_WARNING: DL_ERROR, fname); } /* Handles #include-family directives (distinguished by TYPE), *************** _cpp_compare_file_date (pfile, header) *** 731,737 **** const cpp_token *header; { struct include_file *inc = find_include_file (pfile, header, 0); ! if (inc == NULL || inc == NO_INCLUDE_PATH) return -1; --- 733,739 ---- const cpp_token *header; { struct include_file *inc = find_include_file (pfile, header, 0); ! if (inc == NULL || inc == NO_INCLUDE_PATH) return -1; *************** _cpp_compare_file_date (pfile, header) *** 740,746 **** close (inc->fd); inc->fd = -1; } ! return inc->st.st_mtime > pfile->buffer->inc->st.st_mtime; } --- 742,748 ---- close (inc->fd); inc->fd = -1; } ! return inc->st.st_mtime > pfile->buffer->inc->st.st_mtime; } *************** _cpp_read_file (pfile, fname) *** 757,763 **** if (f == NULL) { ! cpp_error_from_errno (pfile, fname); return false; } --- 759,765 ---- if (f == NULL) { ! cpp_errno (pfile, DL_ERROR, fname); return false; } *************** _cpp_read_file (pfile, fname) *** 765,778 **** } /* Do appropriate cleanup when a file INC's buffer is popped off the ! input stack. Push the next -include file, if any remain. */ ! bool _cpp_pop_file_buffer (pfile, inc) cpp_reader *pfile; struct include_file *inc; { - bool pushed = false; - /* Record the inclusion-preventing macro, which could be NULL meaning no controlling macro. */ if (pfile->mi_valid && inc->cmacro == NULL) --- 767,778 ---- } /* Do appropriate cleanup when a file INC's buffer is popped off the ! input stack. */ ! void _cpp_pop_file_buffer (pfile, inc) cpp_reader *pfile; struct include_file *inc; { /* Record the inclusion-preventing macro, which could be NULL meaning no controlling macro. */ if (pfile->mi_valid && inc->cmacro == NULL) *************** _cpp_pop_file_buffer (pfile, inc) *** 784,801 **** inc->refcnt--; if (inc->refcnt == 0 && DO_NOT_REREAD (inc)) purge_cache (inc); - - /* Don't generate a callback for popping the main file. */ - if (pfile->buffer) - { - _cpp_do_file_change (pfile, LC_LEAVE, 0, 0, 0); - - /* Finally, push the next -included file, if any. */ - if (!pfile->buffer->prev) - pushed = _cpp_push_next_buffer (pfile); - } - - return pushed; } /* Returns the first place in the include chain to start searching for --- 784,789 ---- *************** search_from (pfile, type) *** 859,866 **** such as DOS. The format of the file name map file is just a series of lines with two tokens on each line. The first token is the name to map, and the second token is the actual name to use. */ ! struct file_name_map ! { struct file_name_map *map_next; char *map_from; char *map_to; --- 847,853 ---- such as DOS. The format of the file name map file is just a series of lines with two tokens on each line. The first token is the name to map, and the second token is the actual name to use. */ ! struct file_name_map { struct file_name_map *map_next; char *map_from; char *map_to; *************** read_filename_string (ch, f) *** 880,889 **** len = 20; set = alloc = xmalloc (len + 1); ! if (! is_space(ch)) { *set++ = ch; ! while ((ch = getc (f)) != EOF && ! is_space(ch)) { if (set - alloc == len) { --- 867,876 ---- len = 20; set = alloc = xmalloc (len + 1); ! if (! is_space (ch)) { *set++ = ch; ! while ((ch = getc (f)) != EOF && ! is_space (ch)) { if (set - alloc == len) { *************** read_filename_string (ch, f) *** 900,907 **** } /* This structure holds a linked list of file name maps, one per directory. */ ! struct file_name_map_list ! { struct file_name_map_list *map_list_next; char *map_list_name; struct file_name_map *map_list_map; --- 887,893 ---- } /* This structure holds a linked list of file name maps, one per directory. */ ! struct file_name_map_list { struct file_name_map_list *map_list_next; char *map_list_name; struct file_name_map *map_list_map; *************** read_name_map (pfile, dirname) *** 941,957 **** if (f) { int ch; - int dirlen = strlen (dirname); while ((ch = getc (f)) != EOF) { char *from, *to; struct file_name_map *ptr; ! if (is_space(ch)) continue; from = read_filename_string (ch, f); ! while ((ch = getc (f)) != EOF && is_hspace(ch)) ; to = read_filename_string (ch, f); --- 927,942 ---- if (f) { int ch; while ((ch = getc (f)) != EOF) { char *from, *to; struct file_name_map *ptr; ! if (is_space (ch)) continue; from = read_filename_string (ch, f); ! while ((ch = getc (f)) != EOF && is_hspace (ch)) ; to = read_filename_string (ch, f); *************** read_name_map (pfile, dirname) *** 964,975 **** ptr->map_to = to; else { ! ptr->map_to = xmalloc (dirlen + strlen (to) + 2); ! strcpy (ptr->map_to, dirname); ! ptr->map_to[dirlen] = '/'; ! strcpy (ptr->map_to + dirlen + 1, to); free (to); ! } ptr->map_next = map_list_ptr->map_list_map; map_list_ptr->map_list_map = ptr; --- 949,957 ---- ptr->map_to = to; else { ! ptr->map_to = concat (dirname, "/", to, NULL); free (to); ! } ptr->map_next = map_list_ptr->map_list_map; map_list_ptr->map_list_map = ptr; *************** read_name_map (pfile, dirname) *** 980,992 **** } fclose (f); } ! /* Add this information to the cache. */ map_list_ptr->map_list_next = CPP_OPTION (pfile, map_list); CPP_OPTION (pfile, map_list) = map_list_ptr; return map_list_ptr->map_list_map; ! } /* Remap an unsimplified path NAME based on the file_name_map (if any) for LOC. */ --- 962,974 ---- } fclose (f); } ! /* Add this information to the cache. */ map_list_ptr->map_list_next = CPP_OPTION (pfile, map_list); CPP_OPTION (pfile, map_list) = map_list_ptr; return map_list_ptr->map_list_map; ! } /* Remap an unsimplified path NAME based on the file_name_map (if any) for LOC. */ *************** remap_filename (pfile, name, loc) *** 1011,1020 **** if (! loc->name_map) return name; } ! /* This works since NAME has not been simplified yet. */ from = name + loc->len + 1; ! for (map = loc->name_map; map; map = map->map_next) if (!strcmp (map->map_from, from)) return map->map_to; --- 993,1002 ---- if (! loc->name_map) return name; } ! /* This works since NAME has not been simplified yet. */ from = name + loc->len + 1; ! for (map = loc->name_map; map; map = map->map_next) if (!strcmp (map->map_from, from)) return map->map_to; *************** remap_filename (pfile, name, loc) *** 1029,1041 **** /* We know p != name as absolute paths don't call remap_filename. */ if (p == name) ! cpp_ice (pfile, "absolute file name in remap_filename"); dir = (char *) alloca (p - name + 1); memcpy (dir, name, p - name); dir[p - name] = '\0'; from = p + 1; ! for (map = read_name_map (pfile, dir); map; map = map->map_next) if (! strcmp (map->map_from, from)) return map->map_to; --- 1011,1023 ---- /* We know p != name as absolute paths don't call remap_filename. */ if (p == name) ! cpp_error (pfile, DL_ICE, "absolute file name in remap_filename"); dir = (char *) alloca (p - name + 1); memcpy (dir, name, p - name); dir[p - name] = '\0'; from = p + 1; ! for (map = read_name_map (pfile, dir); map; map = map->map_next) if (! strcmp (map->map_from, from)) return map->map_to; *************** remove_component_p (path) *** 1085,1091 **** nonzero if an error occurred when using stat () or lstat (). */ char * _cpp_simplify_pathname (path) ! char *path; { #ifndef VMS char *from, *to; --- 1067,1073 ---- nonzero if an error occurred when using stat () or lstat (). */ char * _cpp_simplify_pathname (path) ! char *path; { #ifndef VMS char *from, *to; *************** _cpp_simplify_pathname (path) *** 1101,1107 **** /* Convert all backslashes to slashes. */ for (from = path; *from; from++) if (*from == '\\') *from = '/'; ! /* Skip over leading drive letter if present. */ if (ISALPHA (path[0]) && path[1] == ':') from = to = &path[2]; --- 1083,1089 ---- /* Convert all backslashes to slashes. */ for (from = path; *from; from++) if (*from == '\\') *from = '/'; ! /* Skip over leading drive letter if present. */ if (ISALPHA (path[0]) && path[1] == ':') from = to = &path[2]; *************** _cpp_simplify_pathname (path) *** 1110,1116 **** #else from = to = path; #endif ! /* Remove redundant leading /s. */ if (*from == '/') { --- 1092,1098 ---- #else from = to = path; #endif ! /* Remove redundant leading /s. */ if (*from == '/') { *************** _cpp_simplify_pathname (path) *** 1185,1191 **** if (move_base) base = to; } ! /* Change the empty string to "." so that it is not treated as stdin. Null terminate. */ if (to == path) --- 1167,1173 ---- if (move_base) base = to; } ! /* Change the empty string to "." so that it is not treated as stdin. Null terminate. */ if (to == path) diff -Nrc3pad gcc-3.2.3/gcc/cpphash.c gcc-3.3/gcc/cpphash.c *** gcc-3.2.3/gcc/cpphash.c 2002-02-02 18:56:34.000000000 +0000 --- gcc-3.3/gcc/cpphash.c 2002-05-22 22:02:10.000000000 +0000 *************** alloc_node (table) *** 37,43 **** hash_table *table; { cpp_hashnode *node; ! node = (cpp_hashnode *) obstack_alloc (&table->pfile->hash_ob, sizeof (cpp_hashnode)); memset ((PTR) node, 0, sizeof (cpp_hashnode)); --- 37,43 ---- hash_table *table; { cpp_hashnode *node; ! node = (cpp_hashnode *) obstack_alloc (&table->pfile->hash_ob, sizeof (cpp_hashnode)); memset ((PTR) node, 0, sizeof (cpp_hashnode)); *************** _cpp_init_hashtable (pfile, table) *** 72,78 **** s->n_defined = cpp_lookup (pfile, DSC("defined")); s->n_true = cpp_lookup (pfile, DSC("true")); s->n_false = cpp_lookup (pfile, DSC("false")); - s->n__STRICT_ANSI__ = cpp_lookup (pfile, DSC("__STRICT_ANSI__")); s->n__VA_ARGS__ = cpp_lookup (pfile, DSC("__VA_ARGS__")); s->n__VA_ARGS__->flags |= NODE_DIAGNOSTIC; } --- 72,77 ---- diff -Nrc3pad gcc-3.2.3/gcc/cpphash.h gcc-3.3/gcc/cpphash.h *** gcc-3.2.3/gcc/cpphash.h 2002-03-14 19:24:55.000000000 +0000 --- gcc-3.3/gcc/cpphash.h 2003-02-21 18:14:07.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 26,31 **** --- 26,38 ---- #include "hashtable.h" struct directive; /* Deliberately incomplete. */ + struct pending_option; + struct op; + + typedef unsigned char uchar; + #define U (const uchar *) /* Intended use: U"string" */ + + #define BITS_PER_CPPCHAR_T (CHAR_BIT * sizeof (cppchar_t)) /* Test if a sign is valid within a preprocessing number. */ #define VALID_SIGN(c, prevc) \ *************** struct directive; /* Deliberately incom *** 43,48 **** --- 50,112 ---- efficiency, and partly to limit runaway recursion. */ #define CPP_STACK_MAX 200 + /* Host alignment handling. */ + struct dummy + { + char c; + union + { + double d; + int *p; + } u; + }; + + #define DEFAULT_ALIGNMENT offsetof (struct dummy, u) + #define CPP_ALIGN2(size, align) (((size) + ((align) - 1)) & ~((align) - 1)) + #define CPP_ALIGN(size) CPP_ALIGN2 (size, DEFAULT_ALIGNMENT) + + /* Each macro definition is recorded in a cpp_macro structure. + Variadic macros cannot occur with traditional cpp. */ + struct cpp_macro + { + /* Parameters, if any. */ + cpp_hashnode **params; + + /* Replacement tokens (ISO) or replacement text (traditional). See + comment at top of cpptrad.c for how traditional function-like + macros are encoded. */ + union + { + cpp_token *tokens; + const uchar *text; + } exp; + + /* Definition line number. */ + unsigned int line; + + /* Number of tokens in expansion, or bytes for traditional macros. */ + unsigned int count; + + /* Number of parameters. */ + unsigned short paramc; + + /* If a function-like macro. */ + unsigned int fun_like : 1; + + /* If a variadic macro. */ + unsigned int variadic : 1; + + /* If macro defined in system header. */ + unsigned int syshdr : 1; + + /* Nonzero if it has been expanded or had its existence tested. */ + unsigned int used : 1; + }; + + #define _cpp_mark_macro_used(NODE) do { \ + if ((NODE)->type == NT_MACRO && !((NODE)->flags & NODE_BUILTIN)) \ + (NODE)->value.macro->used = 1; } while (0) + /* A generic memory buffer, and operations on it. */ typedef struct _cpp_buff _cpp_buff; struct _cpp_buff *************** struct search_path *** 77,83 **** of an earlier directory on the search path. */ ino_t ino; dev_t dev; ! /* Non-zero if it is a system include directory. */ int sysp; /* Mapping of file names for this directory. Only used on MS-DOS and related platforms. */ --- 141,147 ---- of an earlier directory on the search path. */ ino_t ino; dev_t dev; ! /* Nonzero if it is a system include directory. */ int sysp; /* Mapping of file names for this directory. Only used on MS-DOS and related platforms. */ *************** struct tokenrun *** 101,116 **** cpp_token *base, *limit; }; typedef struct cpp_context cpp_context; struct cpp_context { /* Doubly-linked list. */ cpp_context *next, *prev; ! /* Contexts other than the base context are contiguous tokens. ! e.g. macro expansions, expanded argument tokens. */ ! union utoken first; ! union utoken last; /* If non-NULL, a buffer used for storage related to this context. When the context is popped, the buffer is released. */ --- 165,200 ---- cpp_token *base, *limit; }; + /* Accessor macros for struct cpp_context. */ + #define FIRST(c) ((c)->u.iso.first) + #define LAST(c) ((c)->u.iso.last) + #define CUR(c) ((c)->u.trad.cur) + #define RLIMIT(c) ((c)->u.trad.rlimit) + typedef struct cpp_context cpp_context; struct cpp_context { /* Doubly-linked list. */ cpp_context *next, *prev; ! union ! { ! /* For ISO macro expansion. Contexts other than the base context ! are contiguous tokens. e.g. macro expansions, expanded ! argument tokens. */ ! struct ! { ! union utoken first; ! union utoken last; ! } iso; ! ! /* For traditional macro expansion. */ ! struct ! { ! const uchar *cur; ! const uchar *rlimit; ! } trad; ! } u; /* If non-NULL, a buffer used for storage related to this context. When the context is popped, the buffer is released. */ *************** struct lexer_state *** 128,139 **** --- 212,231 ---- /* Nonzero if first token on line is CPP_HASH. */ unsigned char in_directive; + /* Nonzero if in a directive that will handle padding tokens itself. + #include needs this to avoid problems with computed include and + spacing between tokens. */ + unsigned char directive_wants_padding; + /* True if we are skipping a failed conditional group. */ unsigned char skipping; /* Nonzero if in a directive that takes angle-bracketed headers. */ unsigned char angled_headers; + /* Nonzero if in a #if or #elif directive. */ + unsigned char in_expression; + /* Nonzero to save comments. Turned off if discard_comments, and in all directives apart from #define. */ unsigned char save_comments; *************** struct lexer_state *** 148,157 **** unsigned char poisoned_ok; /* Nonzero to prevent macro expansion. */ ! unsigned char prevent_expansion; /* Nonzero when parsing arguments to a function-like macro. */ unsigned char parsing_args; }; /* Special nodes - identifiers with predefined significance. */ --- 240,252 ---- unsigned char poisoned_ok; /* Nonzero to prevent macro expansion. */ ! unsigned char prevent_expansion; /* Nonzero when parsing arguments to a function-like macro. */ unsigned char parsing_args; + + /* Nonzero to skip evaluating part of an expression. */ + unsigned int skip_eval; }; /* Special nodes - identifiers with predefined significance. */ *************** struct spec_nodes *** 160,169 **** cpp_hashnode *n_defined; /* defined operator */ cpp_hashnode *n_true; /* C++ keyword true */ cpp_hashnode *n_false; /* C++ keyword false */ - cpp_hashnode *n__STRICT_ANSI__; /* STDC_0_IN_SYSTEM_HEADERS */ cpp_hashnode *n__VA_ARGS__; /* C99 vararg macros */ }; /* Represents the contents of a file cpplib has read in. */ struct cpp_buffer { --- 255,275 ---- cpp_hashnode *n_defined; /* defined operator */ cpp_hashnode *n_true; /* C++ keyword true */ cpp_hashnode *n_false; /* C++ keyword false */ cpp_hashnode *n__VA_ARGS__; /* C99 vararg macros */ }; + /* Encapsulates state used to convert a stream of tokens into a text + file. */ + struct printer + { + FILE *outf; /* Stream to write to. */ + const struct line_map *map; /* Logical to physical line mappings. */ + const cpp_token *prev; /* Previous token. */ + const cpp_token *source; /* Source token for spacing. */ + unsigned int line; /* Line currently being written. */ + unsigned char printed; /* Nonzero if something output at line. */ + }; + /* Represents the contents of a file cpplib has read in. */ struct cpp_buffer { *************** struct cpp_buffer *** 217,222 **** --- 323,331 ---- /* The directory of the this buffer's file. Its NAME member is not allocated, so we don't need to worry about freeing it. */ struct search_path dir; + + /* Used for buffer overlays by cpptrad.c. */ + const uchar *saved_cur, *saved_rlimit; }; /* A cpp_reader encapsulates the "state" of a pre-processor run. *************** struct cpp_reader *** 227,232 **** --- 336,344 ---- /* Top of buffer stack. */ cpp_buffer *buffer; + /* Overlaid buffer (can be different after processing #include). */ + cpp_buffer *overlaid_buffer; + /* Lexer state. */ struct lexer_state state; *************** struct cpp_reader *** 250,255 **** --- 362,372 ---- /* If in_directive, the directive if known. */ const struct directive *directive; + /* The next -include-d file; NULL if they all are done. If it + points to NULL, the last one is in progress, and + _cpp_maybe_push_include_file has yet to restore the line map. */ + struct pending_option **next_include_file; + /* Multiple inlcude optimisation. */ const cpp_hashnode *mi_cmacro; const cpp_hashnode *mi_ind_cmacro; *************** struct cpp_reader *** 260,276 **** tokenrun base_run, *cur_run; unsigned int lookaheads; ! /* Non-zero prevents the lexer from re-using the token runs. */ unsigned int keep_tokens; /* Error counter for exit code. */ unsigned int errors; - /* Line and column where a newline was first seen in a string - constant (multi-line strings). */ - unsigned int mls_line; - unsigned int mls_col; - /* Buffer to hold macro definition string. */ unsigned char *macro_buffer; unsigned int macro_buffer_len; --- 377,388 ---- tokenrun base_run, *cur_run; unsigned int lookaheads; ! /* Nonzero prevents the lexer from re-using the token runs. */ unsigned int keep_tokens; /* Error counter for exit code. */ unsigned int errors; /* Buffer to hold macro definition string. */ unsigned char *macro_buffer; unsigned int macro_buffer_len; *************** struct cpp_reader *** 282,296 **** for include files. (Altered as we get more of them.) */ unsigned int max_include_len; ! /* Date and time tokens. Calculated together if either is requested. */ ! cpp_token date; ! cpp_token time; /* EOF token, and a token forcing paste avoidance. */ cpp_token avoid_paste; cpp_token eof; ! /* Opaque handle to the dependencies of mkdeps.c. Used by -M etc. */ struct deps *deps; /* Obstack holding all macro hash nodes. This never shrinks. --- 394,411 ---- for include files. (Altered as we get more of them.) */ unsigned int max_include_len; ! /* Macros on or after this line are warned about if unused. */ ! unsigned int first_unused_line; ! ! /* Date and time text. Calculated together if either is requested. */ ! const uchar *date; ! const uchar *time; /* EOF token, and a token forcing paste avoidance. */ cpp_token avoid_paste; cpp_token eof; ! /* Opaque handle to the dependencies of mkdeps.c. */ struct deps *deps; /* Obstack holding all macro hash nodes. This never shrinks. *************** struct cpp_reader *** 308,316 **** /* Call backs. */ struct cpp_callbacks cb; ! /* Identifier hash table. */ struct ht *hash_table; /* User visible options. */ struct cpp_options opts; --- 423,434 ---- /* Call backs. */ struct cpp_callbacks cb; ! /* Identifier hash table. */ struct ht *hash_table; + /* Expression parser stack. */ + struct op *op_stack, *op_limit; + /* User visible options. */ struct cpp_options opts; *************** struct cpp_reader *** 318,329 **** preprocessor. */ struct spec_nodes spec_nodes; ! /* Whether to print our version number. Done this way so ! we don't get it twice for -v -version. */ ! unsigned char print_version; /* Whether cpplib owns the hashtable. */ unsigned char our_hashtable; }; /* Character classes. Based on the more primitive macros in safe-ctype.h. --- 436,459 ---- preprocessor. */ struct spec_nodes spec_nodes; ! /* Used when doing preprocessed output. */ ! struct printer print; /* Whether cpplib owns the hashtable. */ unsigned char our_hashtable; + + /* Traditional preprocessing output buffer (a logical line). */ + struct + { + uchar *base; + uchar *limit; + uchar *cur; + unsigned int first_line; + } out; + + /* Used to save the original line number during traditional + preprocessing. */ + unsigned int saved_line; }; /* Character classes. Based on the more primitive macros in safe-ctype.h. *************** extern unsigned char _cpp_trigraph_map[U *** 355,375 **** /* Macros. */ - #define CPP_PRINT_DEPS(PFILE) CPP_OPTION (PFILE, print_deps) #define CPP_IN_SYSTEM_HEADER(PFILE) ((PFILE)->map && (PFILE)->map->sysp) #define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic) #define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional) /* In cpperror.c */ ! enum error_type { WARNING = 0, WARNING_SYSHDR, PEDWARN, ERROR, FATAL, ICE }; ! extern int _cpp_begin_message PARAMS ((cpp_reader *, enum error_type, unsigned int, unsigned int)); /* In cppmacro.c */ extern void _cpp_free_definition PARAMS ((cpp_hashnode *)); ! extern int _cpp_create_definition PARAMS ((cpp_reader *, cpp_hashnode *)); extern void _cpp_pop_context PARAMS ((cpp_reader *)); ! /* In cpphash.c */ extern void _cpp_init_hashtable PARAMS ((cpp_reader *, hash_table *)); extern void _cpp_destroy_hashtable PARAMS ((cpp_reader *)); --- 485,513 ---- /* Macros. */ #define CPP_IN_SYSTEM_HEADER(PFILE) ((PFILE)->map && (PFILE)->map->sysp) #define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic) #define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional) /* In cpperror.c */ ! extern int _cpp_begin_message PARAMS ((cpp_reader *, int, unsigned int, unsigned int)); /* In cppmacro.c */ extern void _cpp_free_definition PARAMS ((cpp_hashnode *)); ! extern bool _cpp_create_definition PARAMS ((cpp_reader *, cpp_hashnode *)); extern void _cpp_pop_context PARAMS ((cpp_reader *)); ! extern void _cpp_push_text_context PARAMS ((cpp_reader *, cpp_hashnode *, ! const uchar *, size_t)); ! extern bool _cpp_save_parameter PARAMS ((cpp_reader *, cpp_macro *, ! cpp_hashnode *)); ! extern bool _cpp_arguments_ok PARAMS ((cpp_reader *, cpp_macro *, ! const cpp_hashnode *, ! unsigned int)); ! extern const uchar *_cpp_builtin_macro_text PARAMS ((cpp_reader *, ! cpp_hashnode *)); ! int _cpp_warn_if_unused_macro PARAMS ((cpp_reader *, cpp_hashnode *, ! void *)); /* In cpphash.c */ extern void _cpp_init_hashtable PARAMS ((cpp_reader *, hash_table *)); extern void _cpp_destroy_hashtable PARAMS ((cpp_reader *)); *************** extern int _cpp_compare_file_date *** 387,397 **** extern void _cpp_report_missing_guards PARAMS ((cpp_reader *)); extern void _cpp_init_includes PARAMS ((cpp_reader *)); extern void _cpp_cleanup_includes PARAMS ((cpp_reader *)); ! extern bool _cpp_pop_file_buffer PARAMS ((cpp_reader *, struct include_file *)); /* In cppexp.c */ ! extern int _cpp_parse_expr PARAMS ((cpp_reader *)); /* In cpplex.c */ extern cpp_token *_cpp_temp_token PARAMS ((cpp_reader *)); --- 525,536 ---- extern void _cpp_report_missing_guards PARAMS ((cpp_reader *)); extern void _cpp_init_includes PARAMS ((cpp_reader *)); extern void _cpp_cleanup_includes PARAMS ((cpp_reader *)); ! extern void _cpp_pop_file_buffer PARAMS ((cpp_reader *, struct include_file *)); /* In cppexp.c */ ! extern bool _cpp_parse_expr PARAMS ((cpp_reader *)); ! extern struct op *_cpp_expand_op_stack PARAMS ((cpp_reader *)); /* In cpplex.c */ extern cpp_token *_cpp_temp_token PARAMS ((cpp_reader *)); *************** extern int _cpp_equiv_tokens PARAMS ((c *** 402,411 **** extern void _cpp_init_tokenrun PARAMS ((tokenrun *, unsigned int)); /* In cppinit.c. */ ! extern bool _cpp_push_next_buffer PARAMS ((cpp_reader *)); /* In cpplib.c */ ! extern int _cpp_test_assertion PARAMS ((cpp_reader *, int *)); extern int _cpp_handle_directive PARAMS ((cpp_reader *, int)); extern void _cpp_define_builtin PARAMS ((cpp_reader *, const char *)); extern void _cpp_do__Pragma PARAMS ((cpp_reader *)); --- 541,550 ---- extern void _cpp_init_tokenrun PARAMS ((tokenrun *, unsigned int)); /* In cppinit.c. */ ! extern void _cpp_maybe_push_include_file PARAMS ((cpp_reader *)); /* In cpplib.c */ ! extern int _cpp_test_assertion PARAMS ((cpp_reader *, unsigned int *)); extern int _cpp_handle_directive PARAMS ((cpp_reader *, int)); extern void _cpp_define_builtin PARAMS ((cpp_reader *, const char *)); extern void _cpp_do__Pragma PARAMS ((cpp_reader *)); *************** extern void _cpp_do_file_change PARAMS ( *** 416,423 **** unsigned int, unsigned int)); extern void _cpp_pop_buffer PARAMS ((cpp_reader *)); /* Utility routines and macros. */ ! #define DSC(str) (const U_CHAR *)str, sizeof str - 1 #define xnew(T) (T *) xmalloc (sizeof(T)) #define xcnew(T) (T *) xcalloc (1, sizeof(T)) #define xnewvec(T, N) (T *) xmalloc (sizeof(T) * (N)) --- 555,573 ---- unsigned int, unsigned int)); extern void _cpp_pop_buffer PARAMS ((cpp_reader *)); + /* In cpptrad.c. */ + extern bool _cpp_read_logical_line_trad PARAMS ((cpp_reader *)); + extern void _cpp_overlay_buffer PARAMS ((cpp_reader *pfile, const uchar *, + size_t)); + extern void _cpp_remove_overlay PARAMS ((cpp_reader *)); + extern bool _cpp_create_trad_definition PARAMS ((cpp_reader *, cpp_macro *)); + extern bool _cpp_expansions_different_trad PARAMS ((const cpp_macro *, + const cpp_macro *)); + extern uchar *_cpp_copy_replacement_text PARAMS ((const cpp_macro *, uchar *)); + extern size_t _cpp_replacement_text_len PARAMS ((const cpp_macro *)); + /* Utility routines and macros. */ ! #define DSC(str) (const uchar *)str, sizeof str - 1 #define xnew(T) (T *) xmalloc (sizeof(T)) #define xcnew(T) (T *) xcalloc (1, sizeof(T)) #define xnewvec(T, N) (T *) xmalloc (sizeof(T) * (N)) *************** extern void _cpp_pop_buffer PARAMS ((cpp *** 426,452 **** /* These are inline functions instead of macros so we can get type checking. */ ! typedef unsigned char U_CHAR; ! #define U (const U_CHAR *) /* Intended use: U"string" */ ! ! static inline int ustrcmp PARAMS ((const U_CHAR *, const U_CHAR *)); ! static inline int ustrncmp PARAMS ((const U_CHAR *, const U_CHAR *, size_t)); ! static inline size_t ustrlen PARAMS ((const U_CHAR *)); ! static inline U_CHAR *uxstrdup PARAMS ((const U_CHAR *)); ! static inline U_CHAR *ustrchr PARAMS ((const U_CHAR *, int)); ! static inline int ufputs PARAMS ((const U_CHAR *, FILE *)); static inline int ustrcmp (s1, s2) ! const U_CHAR *s1, *s2; { return strcmp ((const char *)s1, (const char *)s2); } static inline int ustrncmp (s1, s2, n) ! const U_CHAR *s1, *s2; size_t n; { return strncmp ((const char *)s1, (const char *)s2, n); --- 576,599 ---- /* These are inline functions instead of macros so we can get type checking. */ ! static inline int ustrcmp PARAMS ((const uchar *, const uchar *)); ! static inline int ustrncmp PARAMS ((const uchar *, const uchar *, size_t)); ! static inline size_t ustrlen PARAMS ((const uchar *)); ! static inline uchar *uxstrdup PARAMS ((const uchar *)); ! static inline uchar *ustrchr PARAMS ((const uchar *, int)); ! static inline int ufputs PARAMS ((const uchar *, FILE *)); static inline int ustrcmp (s1, s2) ! const uchar *s1, *s2; { return strcmp ((const char *)s1, (const char *)s2); } static inline int ustrncmp (s1, s2, n) ! const uchar *s1, *s2; size_t n; { return strncmp ((const char *)s1, (const char *)s2, n); *************** ustrncmp (s1, s2, n) *** 454,482 **** static inline size_t ustrlen (s1) ! const U_CHAR *s1; { return strlen ((const char *)s1); } ! static inline U_CHAR * uxstrdup (s1) ! const U_CHAR *s1; { ! return (U_CHAR *) xstrdup ((const char *)s1); } ! static inline U_CHAR * ustrchr (s1, c) ! const U_CHAR *s1; int c; { ! return (U_CHAR *) strchr ((const char *)s1, c); } static inline int ufputs (s, f) ! const U_CHAR *s; FILE *f; { return fputs ((const char *)s, f); --- 601,629 ---- static inline size_t ustrlen (s1) ! const uchar *s1; { return strlen ((const char *)s1); } ! static inline uchar * uxstrdup (s1) ! const uchar *s1; { ! return (uchar *) xstrdup ((const char *)s1); } ! static inline uchar * ustrchr (s1, c) ! const uchar *s1; int c; { ! return (uchar *) strchr ((const char *)s1, c); } static inline int ufputs (s, f) ! const uchar *s; FILE *f; { return fputs ((const char *)s, f); diff -Nrc3pad gcc-3.2.3/gcc/cppinit.c gcc-3.3/gcc/cppinit.c *** gcc-3.2.3/gcc/cppinit.c 2002-10-06 08:21:21.000000000 +0000 --- gcc-3.3/gcc/cppinit.c 2003-03-16 14:13:09.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 25,40 **** #include "cpphash.h" #include "prefix.h" #include "intl.h" - #include "version.h" #include "mkdeps.h" #include "cppdefault.h" - #include "except.h" /* for USING_SJLJ_EXCEPTIONS */ - - /* Predefined symbols, built-in macros, and the default include path. */ - - #ifndef GET_ENV_PATH_LIST - #define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0) - #endif /* Windows does not natively support inodes, and neither does MSDOS. Cygwin's emulation can generate non-unique inodes, so don't use it. --- 25,32 ---- *************** struct cpp_pending *** 94,100 **** } while (0) #endif - static void print_help PARAMS ((void)); static void path_include PARAMS ((cpp_reader *, char *, int)); static void init_library PARAMS ((void)); --- 86,91 ---- *************** static void merge_include_chains PARAMS *** 114,128 **** static bool push_include PARAMS ((cpp_reader *, struct pending_option *)); static void free_chain PARAMS ((struct pending_option *)); - static void set_lang PARAMS ((cpp_reader *, enum c_lang)); - static void init_dependency_output PARAMS ((cpp_reader *)); static void init_standard_includes PARAMS ((cpp_reader *)); static void read_original_filename PARAMS ((cpp_reader *)); static void new_pending_directive PARAMS ((struct cpp_pending *, const char *, cl_directive_handler)); - static void output_deps PARAMS ((cpp_reader *)); static int parse_option PARAMS ((const char *)); /* Fourth argument to append_include_chain: chain to use. Note it's never asked to append to the quote chain. */ --- 105,117 ---- static bool push_include PARAMS ((cpp_reader *, struct pending_option *)); static void free_chain PARAMS ((struct pending_option *)); static void init_standard_includes PARAMS ((cpp_reader *)); static void read_original_filename PARAMS ((cpp_reader *)); static void new_pending_directive PARAMS ((struct cpp_pending *, const char *, cl_directive_handler)); static int parse_option PARAMS ((const char *)); + static void post_options PARAMS ((cpp_reader *)); /* Fourth argument to append_include_chain: chain to use. Note it's never asked to append to the quote chain. */ *************** enum { BRACKET = 0, SYSTEM, AFTER }; *** 135,148 **** #define init_trigraph_map() /* Nothing. */ #define TRIGRAPH_MAP \ ! __extension__ const U_CHAR _cpp_trigraph_map[UCHAR_MAX + 1] = { #define END }; #define s(p, v) [p] = v, #else ! #define TRIGRAPH_MAP U_CHAR _cpp_trigraph_map[UCHAR_MAX + 1] = { 0 }; \ static void init_trigraph_map PARAMS ((void)) { \ unsigned char *x = _cpp_trigraph_map; --- 124,137 ---- #define init_trigraph_map() /* Nothing. */ #define TRIGRAPH_MAP \ ! __extension__ const uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { #define END }; #define s(p, v) [p] = v, #else ! #define TRIGRAPH_MAP uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { 0 }; \ static void init_trigraph_map PARAMS ((void)) { \ unsigned char *x = _cpp_trigraph_map; *************** path_include (pfile, list, path) *** 205,218 **** /* Append DIR to include path PATH. DIR must be allocated on the heap; this routine takes responsibility for freeing it. CXX_AWARE ! is non-zero if the header contains extern "C" guards for C++, otherwise it is zero. */ static void append_include_chain (pfile, dir, path, cxx_aware) cpp_reader *pfile; char *dir; int path; ! int cxx_aware ATTRIBUTE_UNUSED; { struct cpp_pending *pend = CPP_OPTION (pfile, pending); struct search_path *new; --- 194,207 ---- /* Append DIR to include path PATH. DIR must be allocated on the heap; this routine takes responsibility for freeing it. CXX_AWARE ! is nonzero if the header contains extern "C" guards for C++, otherwise it is zero. */ static void append_include_chain (pfile, dir, path, cxx_aware) cpp_reader *pfile; char *dir; int path; ! int cxx_aware; { struct cpp_pending *pend = CPP_OPTION (pfile, pending); struct search_path *new; *************** append_include_chain (pfile, dir, path, *** 230,236 **** { /* Dirs that don't exist are silently ignored. */ if (errno != ENOENT) ! cpp_notice_from_errno (pfile, dir); else if (CPP_OPTION (pfile, verbose)) fprintf (stderr, _("ignoring nonexistent directory \"%s\"\n"), dir); free (dir); --- 219,225 ---- { /* Dirs that don't exist are silently ignored. */ if (errno != ENOENT) ! cpp_errno (pfile, DL_ERROR, dir); else if (CPP_OPTION (pfile, verbose)) fprintf (stderr, _("ignoring nonexistent directory \"%s\"\n"), dir); free (dir); *************** append_include_chain (pfile, dir, path, *** 239,245 **** if (!S_ISDIR (st.st_mode)) { ! cpp_notice (pfile, "%s: Not a directory", dir); free (dir); return; } --- 228,234 ---- if (!S_ISDIR (st.st_mode)) { ! cpp_error_with_line (pfile, DL_ERROR, 0, 0, "%s: Not a directory", dir); free (dir); return; } *************** append_include_chain (pfile, dir, path, *** 257,267 **** include files since these two lists are really just a concatenation of one "system" list. */ if (path == SYSTEM || path == AFTER) - #ifdef NO_IMPLICIT_EXTERN_C - new->sysp = 1; - #else new->sysp = cxx_aware ? 1 : 2; - #endif else new->sysp = 0; new->name_map = NULL; --- 246,252 ---- *************** remove_dup_dir (pfile, prev, head_ptr) *** 308,316 **** } /* Remove duplicate non-system directories for which there is an equivalent ! system directory later in the chain. The range for removal is between *HEAD_PTR and END. Returns the directory before END, or NULL if none. ! This algorithm is quadratic in the number of system directories, which is acceptable since there aren't usually that many of them. */ static struct search_path * remove_dup_nonsys_dirs (pfile, head_ptr, end) --- 293,301 ---- } /* Remove duplicate non-system directories for which there is an equivalent ! system directory latter in the chain. The range for removal is between *HEAD_PTR and END. Returns the directory before END, or NULL if none. ! This algorithm is quadratic in the number system directories, which is acceptable since there aren't usually that many of them. */ static struct search_path * remove_dup_nonsys_dirs (pfile, head_ptr, end) *************** remove_dup_dirs (pfile, head_ptr) *** 365,371 **** for (cur = *head_ptr; cur; cur = cur->next) { for (other = *head_ptr; other != cur; other = other->next) ! if (INO_T_EQ (cur->ino, other->ino) && cur->dev == other->dev) { cur = remove_dup_dir (pfile, prev, head_ptr); break; --- 350,356 ---- for (cur = *head_ptr; cur; cur = cur->next) { for (other = *head_ptr; other != cur; other = other->next) ! if (INO_T_EQ (cur->ino, other->ino) && cur->dev == other->dev) { cur = remove_dup_dir (pfile, prev, head_ptr); break; *************** merge_include_chains (pfile) *** 445,451 **** struct lang_flags { char c99; - char objc; char cplusplus; char extended_numbers; char std; --- 430,435 ---- *************** struct lang_flags *** 456,486 **** /* ??? Enable $ in identifiers in assembly? */ static const struct lang_flags lang_defaults[] = ! { /* c99 objc c++ xnum std dollar c++comm digr */ ! /* GNUC89 */ { 0, 0, 0, 1, 0, 1, 1, 1 }, ! /* GNUC99 */ { 1, 0, 0, 1, 0, 1, 1, 1 }, ! /* STDC89 */ { 0, 0, 0, 0, 1, 0, 0, 0 }, ! /* STDC94 */ { 0, 0, 0, 0, 1, 0, 0, 1 }, ! /* STDC99 */ { 1, 0, 0, 1, 1, 0, 1, 1 }, ! /* GNUCXX */ { 0, 0, 1, 1, 0, 1, 1, 1 }, ! /* CXX98 */ { 0, 0, 1, 1, 1, 0, 1, 1 }, ! /* OBJC */ { 0, 1, 0, 1, 0, 1, 1, 1 }, ! /* OBJCXX */ { 0, 1, 1, 1, 0, 1, 1, 1 }, ! /* ASM */ { 0, 0, 0, 1, 0, 0, 1, 0 } }; /* Sets internal flags correctly for a given language. */ ! static void ! set_lang (pfile, lang) cpp_reader *pfile; enum c_lang lang; { const struct lang_flags *l = &lang_defaults[(int) lang]; ! CPP_OPTION (pfile, lang) = lang; CPP_OPTION (pfile, c99) = l->c99; - CPP_OPTION (pfile, objc) = l->objc; CPP_OPTION (pfile, cplusplus) = l->cplusplus; CPP_OPTION (pfile, extended_numbers) = l->extended_numbers; CPP_OPTION (pfile, std) = l->std; --- 440,467 ---- /* ??? Enable $ in identifiers in assembly? */ static const struct lang_flags lang_defaults[] = ! { /* c99 c++ xnum std dollar c++comm digr */ ! /* GNUC89 */ { 0, 0, 1, 0, 1, 1, 1 }, ! /* GNUC99 */ { 1, 0, 1, 0, 1, 1, 1 }, ! /* STDC89 */ { 0, 0, 0, 1, 0, 0, 0 }, ! /* STDC94 */ { 0, 0, 0, 1, 0, 0, 1 }, ! /* STDC99 */ { 1, 0, 1, 1, 0, 1, 1 }, ! /* GNUCXX */ { 0, 1, 1, 0, 1, 1, 1 }, ! /* CXX98 */ { 0, 1, 1, 1, 0, 1, 1 }, ! /* ASM */ { 0, 0, 1, 0, 0, 1, 0 } }; /* Sets internal flags correctly for a given language. */ ! void ! cpp_set_lang (pfile, lang) cpp_reader *pfile; enum c_lang lang; { const struct lang_flags *l = &lang_defaults[(int) lang]; ! CPP_OPTION (pfile, lang) = lang; CPP_OPTION (pfile, c99) = l->c99; CPP_OPTION (pfile, cplusplus) = l->cplusplus; CPP_OPTION (pfile, extended_numbers) = l->extended_numbers; CPP_OPTION (pfile, std) = l->std; *************** cpp_create_reader (lang) *** 534,564 **** { cpp_reader *pfile; ! /* Initialise this instance of the library if it hasn't been already. */ init_library (); pfile = (cpp_reader *) xcalloc (1, sizeof (cpp_reader)); ! set_lang (pfile, lang); CPP_OPTION (pfile, warn_import) = 1; CPP_OPTION (pfile, discard_comments) = 1; CPP_OPTION (pfile, show_column) = 1; CPP_OPTION (pfile, tabstop) = 8; CPP_OPTION (pfile, operator_names) = 1; ! #if DEFAULT_SIGNED_CHAR ! CPP_OPTION (pfile, signed_char) = 1; ! #else ! CPP_OPTION (pfile, signed_char) = 0; ! #endif CPP_OPTION (pfile, pending) = (struct cpp_pending *) xcalloc (1, sizeof (struct cpp_pending)); ! /* It's simplest to just create this struct whether or not it will ! be needed. */ ! pfile->deps = deps_init (); ! /* Initialise the line map. Start at logical line 1, so we can use a line number of zero for special states. */ init_line_maps (&pfile->line_maps); pfile->line = 1; --- 515,549 ---- { cpp_reader *pfile; ! /* Initialize this instance of the library if it hasn't been already. */ init_library (); pfile = (cpp_reader *) xcalloc (1, sizeof (cpp_reader)); ! cpp_set_lang (pfile, lang); CPP_OPTION (pfile, warn_import) = 1; + CPP_OPTION (pfile, warn_multichar) = 1; CPP_OPTION (pfile, discard_comments) = 1; + CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; CPP_OPTION (pfile, show_column) = 1; CPP_OPTION (pfile, tabstop) = 8; CPP_OPTION (pfile, operator_names) = 1; ! CPP_OPTION (pfile, warn_endif_labels) = 1; ! CPP_OPTION (pfile, warn_long_long) = !CPP_OPTION (pfile, c99); CPP_OPTION (pfile, pending) = (struct cpp_pending *) xcalloc (1, sizeof (struct cpp_pending)); ! /* Default CPP arithmetic to something sensible for the host for the ! benefit of dumb users like fix-header. */ ! CPP_OPTION (pfile, precision) = CHAR_BIT * sizeof (long); ! CPP_OPTION (pfile, char_precision) = CHAR_BIT; ! CPP_OPTION (pfile, wchar_precision) = CHAR_BIT * sizeof (int); ! CPP_OPTION (pfile, int_precision) = CHAR_BIT * sizeof (int); ! CPP_OPTION (pfile, unsigned_char) = 0; ! CPP_OPTION (pfile, unsigned_wchar) = 1; ! /* Initialize the line map. Start at logical line 1, so we can use a line number of zero for special states. */ init_line_maps (&pfile->line_maps); pfile->line = 1; *************** cpp_create_reader (lang) *** 567,573 **** pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); /* Set up static tokens. */ - pfile->date.type = CPP_EOF; pfile->avoid_paste.type = CPP_PADDING; pfile->avoid_paste.val.source = NULL; pfile->eof.type = CPP_EOF; --- 552,557 ---- *************** cpp_create_reader (lang) *** 578,584 **** pfile->cur_run = &pfile->base_run; pfile->cur_token = pfile->base_run.base; ! /* Initialise the base context. */ pfile->context = &pfile->base_context; pfile->base_context.macro = 0; pfile->base_context.prev = pfile->base_context.next = 0; --- 562,568 ---- pfile->cur_run = &pfile->base_run; pfile->cur_token = pfile->base_run.base; ! /* Initialize the base context. */ pfile->context = &pfile->base_context; pfile->base_context.macro = 0; pfile->base_context.prev = pfile->base_context.next = 0; *************** cpp_create_reader (lang) *** 587,593 **** pfile->a_buff = _cpp_get_buff (pfile, 0); pfile->u_buff = _cpp_get_buff (pfile, 0); ! /* Initialise the buffer obstack. */ gcc_obstack_init (&pfile->buffer_ob); _cpp_init_includes (pfile); --- 571,580 ---- pfile->a_buff = _cpp_get_buff (pfile, 0); pfile->u_buff = _cpp_get_buff (pfile, 0); ! /* The expression parser stack. */ ! _cpp_expand_op_stack (pfile); ! ! /* Initialize the buffer obstack. */ gcc_obstack_init (&pfile->buffer_ob); _cpp_init_includes (pfile); *************** cpp_create_reader (lang) *** 596,614 **** } /* Free resources used by PFILE. Accessing PFILE after this function ! returns leads to undefined behaviour. Returns the error count. */ ! int cpp_destroy (pfile) cpp_reader *pfile; { - int result; struct search_path *dir, *dirn; cpp_context *context, *contextn; tokenrun *run, *runn; while (CPP_BUFFER (pfile) != NULL) _cpp_pop_buffer (pfile); if (pfile->macro_buffer) { free ((PTR) pfile->macro_buffer); --- 583,607 ---- } /* Free resources used by PFILE. Accessing PFILE after this function ! returns leads to undefined behavior. Returns the error count. */ ! void cpp_destroy (pfile) cpp_reader *pfile; { struct search_path *dir, *dirn; cpp_context *context, *contextn; tokenrun *run, *runn; + free_chain (CPP_OPTION (pfile, pending)->include_head); + free (CPP_OPTION (pfile, pending)); + free (pfile->op_stack); + while (CPP_BUFFER (pfile) != NULL) _cpp_pop_buffer (pfile); + if (pfile->out.base) + free (pfile->out.base); + if (pfile->macro_buffer) { free ((PTR) pfile->macro_buffer); *************** cpp_destroy (pfile) *** 616,622 **** pfile->macro_buffer_len = 0; } ! deps_free (pfile->deps); obstack_free (&pfile->buffer_ob, 0); _cpp_destroy_hashtable (pfile); --- 609,616 ---- pfile->macro_buffer_len = 0; } ! if (pfile->deps) ! deps_free (pfile->deps); obstack_free (&pfile->buffer_ob, 0); _cpp_destroy_hashtable (pfile); *************** cpp_destroy (pfile) *** 648,687 **** } free_line_maps (&pfile->line_maps); - - result = pfile->errors; free (pfile); - - return result; } - /* This structure defines one built-in identifier. A node will be ! entered in the hash table under the name NAME, with value VALUE (if ! any). If flags has OPERATOR, the node's operator field is used; if ! flags has BUILTIN the node's builtin field is used. Macros that are ! known at build time should not be flagged BUILTIN, as then they do ! not appear in macro dumps with e.g. -dM or -dD. ! Two values are not compile time constants, so we tag ! them in the FLAGS field instead: ! VERS value is the global version_string, quoted ! ULP value is the global user_label_prefix */ struct builtin { ! const U_CHAR *name; ! const char *value; ! unsigned char builtin; ! unsigned short flags; unsigned short len; }; - #define VERS 0x01 - #define ULP 0x02 - #define BUILTIN 0x08 ! #define B(n, t) { U n, 0, t, BUILTIN, sizeof n - 1 } ! #define C(n, v) { U n, v, 0, 0, sizeof n - 1 } ! #define X(n, f) { U n, 0, 0, f, sizeof n - 1 } static const struct builtin builtin_array[] = { B("__TIME__", BT_TIME), --- 642,672 ---- } free_line_maps (&pfile->line_maps); free (pfile); } /* This structure defines one built-in identifier. A node will be ! entered in the hash table under the name NAME, with value VALUE. ! There are two tables of these. builtin_array holds all the ! "builtin" macros: these are handled by builtin_macro() in ! cppmacro.c. Builtin is somewhat of a misnomer -- the property of ! interest is that these macros require special code to compute their ! expansions. The value is a "builtin_type" enumerator. ! ! operator_array holds the C++ named operators. These are keywords ! which act as aliases for punctuators. In C++, they cannot be ! altered through #define, and #if recognizes them as operators. In ! C, these are not entered into the hash table at all (but see ! ). The value is a token-type enumerator. */ struct builtin { ! const uchar *name; unsigned short len; + unsigned short value; }; ! #define B(n, t) { DSC(n), t } static const struct builtin builtin_array[] = { B("__TIME__", BT_TIME), *************** static const struct builtin builtin_arra *** 690,740 **** B("__BASE_FILE__", BT_BASE_FILE), B("__LINE__", BT_SPECLINE), B("__INCLUDE_LEVEL__", BT_INCLUDE_LEVEL), B("_Pragma", BT_PRAGMA), - - X("__VERSION__", VERS), - X("__USER_LABEL_PREFIX__", ULP), - C("__REGISTER_PREFIX__", REGISTER_PREFIX), - C("__HAVE_BUILTIN_SETJMP__", "1"), - #if USING_SJLJ_EXCEPTIONS - /* libgcc needs to know this. */ - C("__USING_SJLJ_EXCEPTIONS__","1"), - #endif - #ifndef NO_BUILTIN_SIZE_TYPE - C("__SIZE_TYPE__", SIZE_TYPE), - #endif - #ifndef NO_BUILTIN_PTRDIFF_TYPE - C("__PTRDIFF_TYPE__", PTRDIFF_TYPE), - #endif - #ifndef NO_BUILTIN_WCHAR_TYPE - C("__WCHAR_TYPE__", WCHAR_TYPE), - #endif - #ifndef NO_BUILTIN_WINT_TYPE - C("__WINT_TYPE__", WINT_TYPE), - #endif - #ifdef STDC_0_IN_SYSTEM_HEADERS B("__STDC__", BT_STDC), - #else - C("__STDC__", "1"), - #endif }; - #undef B - #undef C - #undef X - #define builtin_array_end \ - builtin_array + sizeof(builtin_array)/sizeof(struct builtin) ! /* Named operators known to the preprocessor. These cannot be ! #defined and always have their stated meaning. They are treated ! like normal identifiers except for the type code and the meaning. ! Most of them are only for C++ (but see iso646.h). */ ! #define B(n, t) { DSC(n), t } ! static const struct named_op { - const U_CHAR *name; - unsigned int len; - enum cpp_ttype value; - } operator_array[] = { B("and", CPP_AND_AND), B("and_eq", CPP_AND_EQ), B("bitand", CPP_AND), --- 675,688 ---- B("__BASE_FILE__", BT_BASE_FILE), B("__LINE__", BT_SPECLINE), B("__INCLUDE_LEVEL__", BT_INCLUDE_LEVEL), + /* Keep builtins not used for -traditional-cpp at the end, and + update init_builtins() if any more are added. */ B("_Pragma", BT_PRAGMA), B("__STDC__", BT_STDC), }; ! static const struct builtin operator_array[] = { B("and", CPP_AND_AND), B("and_eq", CPP_AND_EQ), B("bitand", CPP_AND), *************** static void *** 754,760 **** mark_named_operators (pfile) cpp_reader *pfile; { ! const struct named_op *b; for (b = operator_array; b < (operator_array + ARRAY_SIZE (operator_array)); --- 702,708 ---- mark_named_operators (pfile) cpp_reader *pfile; { ! const struct builtin *b; for (b = operator_array; b < (operator_array + ARRAY_SIZE (operator_array)); *************** init_builtins (pfile) *** 773,846 **** cpp_reader *pfile; { const struct builtin *b; ! for(b = builtin_array; b < builtin_array_end; b++) ! { ! if (b->flags & BUILTIN) ! { ! cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); ! hp->type = NT_MACRO; ! hp->flags |= NODE_BUILTIN | NODE_WARN; ! hp->value.builtin = b->builtin; ! } ! else /* A standard macro of some kind. */ ! { ! const char *val; ! char *str; ! ! if (b->flags & VERS) ! { ! /* Allocate enough space for 'name "value"\n\0'. */ ! str = alloca (b->len + strlen (version_string) + 5); ! sprintf (str, "%s \"%s\"\n", b->name, version_string); ! } ! else ! { ! if (b->flags & ULP) ! val = CPP_OPTION (pfile, user_label_prefix); ! else ! val = b->value; ! ! /* Allocate enough space for "name value\n\0". */ ! str = alloca (b->len + strlen (val) + 3); ! sprintf(str, "%s %s\n", b->name, val); ! } ! ! _cpp_define_builtin (pfile, str); ! } ! } ! if (CPP_OPTION (pfile, cplusplus)) { ! _cpp_define_builtin (pfile, "__cplusplus 1"); ! if (SUPPORTS_ONE_ONLY) ! _cpp_define_builtin (pfile, "__GXX_WEAK__ 1"); ! else ! _cpp_define_builtin (pfile, "__GXX_WEAK__ 0"); } - if (CPP_OPTION (pfile, objc)) - _cpp_define_builtin (pfile, "__OBJC__ 1"); ! if (CPP_OPTION (pfile, lang) == CLK_STDC94) _cpp_define_builtin (pfile, "__STDC_VERSION__ 199409L"); else if (CPP_OPTION (pfile, c99)) _cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L"); ! if (CPP_OPTION (pfile, signed_char) == 0) ! _cpp_define_builtin (pfile, "__CHAR_UNSIGNED__ 1"); ! if (CPP_OPTION (pfile, lang) == CLK_STDC89 ! || CPP_OPTION (pfile, lang) == CLK_STDC94 ! || CPP_OPTION (pfile, lang) == CLK_STDC99) ! _cpp_define_builtin (pfile, "__STRICT_ANSI__ 1"); ! else if (CPP_OPTION (pfile, lang) == CLK_ASM) ! _cpp_define_builtin (pfile, "__ASSEMBLER__ 1"); } - #undef BUILTIN - #undef OPERATOR - #undef VERS - #undef ULP - #undef builtin_array_end /* And another subroutine. This one sets up the standard include path. */ static void --- 721,754 ---- cpp_reader *pfile; { const struct builtin *b; + size_t n = ARRAY_SIZE (builtin_array); ! if (CPP_OPTION (pfile, traditional)) ! n -= 2; ! for(b = builtin_array; b < builtin_array + n; b++) { ! cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); ! hp->type = NT_MACRO; ! hp->flags |= NODE_BUILTIN | NODE_WARN; ! hp->value.builtin = b->value; } ! if (CPP_OPTION (pfile, cplusplus)) ! _cpp_define_builtin (pfile, "__cplusplus 1"); ! else if (CPP_OPTION (pfile, lang) == CLK_ASM) ! _cpp_define_builtin (pfile, "__ASSEMBLER__ 1"); ! else if (CPP_OPTION (pfile, lang) == CLK_STDC94) _cpp_define_builtin (pfile, "__STDC_VERSION__ 199409L"); else if (CPP_OPTION (pfile, c99)) _cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L"); ! if (CPP_OPTION (pfile, objc)) ! _cpp_define_builtin (pfile, "__OBJC__ 1"); ! if (pfile->cb.register_builtins) ! (*pfile->cb.register_builtins) (pfile); } /* And another subroutine. This one sets up the standard include path. */ static void *************** init_standard_includes (pfile) *** 857,879 **** etc. specify an additional list of directories to be searched as if specified with -isystem, for the language indicated. */ ! GET_ENV_PATH_LIST (path, "CPATH"); if (path != 0 && *path != 0) path_include (pfile, path, BRACKET); switch ((CPP_OPTION (pfile, objc) << 1) + CPP_OPTION (pfile, cplusplus)) { case 0: ! GET_ENV_PATH_LIST (path, "C_INCLUDE_PATH"); break; case 1: ! GET_ENV_PATH_LIST (path, "CPLUS_INCLUDE_PATH"); break; case 2: ! GET_ENV_PATH_LIST (path, "OBJC_INCLUDE_PATH"); break; case 3: ! GET_ENV_PATH_LIST (path, "OBJCPLUS_INCLUDE_PATH"); break; } if (path != 0 && *path != 0) --- 765,787 ---- etc. specify an additional list of directories to be searched as if specified with -isystem, for the language indicated. */ ! GET_ENVIRONMENT (path, "CPATH"); if (path != 0 && *path != 0) path_include (pfile, path, BRACKET); switch ((CPP_OPTION (pfile, objc) << 1) + CPP_OPTION (pfile, cplusplus)) { case 0: ! GET_ENVIRONMENT (path, "C_INCLUDE_PATH"); break; case 1: ! GET_ENVIRONMENT (path, "CPLUS_INCLUDE_PATH"); break; case 2: ! GET_ENVIRONMENT (path, "OBJC_INCLUDE_PATH"); break; case 3: ! GET_ENVIRONMENT (path, "OBJCPLUS_INCLUDE_PATH"); break; } if (path != 0 && *path != 0) *************** init_standard_includes (pfile) *** 932,938 **** } /* Pushes a command line -imacro and -include file indicated by P onto ! the buffer stack. Returns non-zero if successful. */ static bool push_include (pfile, p) cpp_reader *pfile; --- 840,846 ---- } /* Pushes a command line -imacro and -include file indicated by P onto ! the buffer stack. Returns nonzero if successful. */ static bool push_include (pfile, p) cpp_reader *pfile; *************** free_chain (head) *** 966,971 **** --- 874,945 ---- } } + /* Sanity-checks are dependent on command-line options, so it is + called as a subroutine of cpp_read_main_file (). */ + #if ENABLE_CHECKING + static void sanity_checks PARAMS ((cpp_reader *)); + static void sanity_checks (pfile) + cpp_reader *pfile; + { + cppchar_t test = 0; + size_t max_precision = 2 * CHAR_BIT * sizeof (cpp_num_part); + + /* Sanity checks for assumptions about CPP arithmetic and target + type precisions made by cpplib. */ + test--; + if (test < 1) + cpp_error (pfile, DL_ICE, "cppchar_t must be an unsigned type"); + + if (CPP_OPTION (pfile, precision) > max_precision) + cpp_error (pfile, DL_ICE, + "preprocessor arithmetic has maximum precision of %lu bits; target requires %lu bits", + (unsigned long) max_precision, + (unsigned long) CPP_OPTION (pfile, precision)); + + if (CPP_OPTION (pfile, precision) < CPP_OPTION (pfile, int_precision)) + cpp_error (pfile, DL_ICE, + "CPP arithmetic must be at least as precise as a target int"); + + if (CPP_OPTION (pfile, char_precision) < 8) + cpp_error (pfile, DL_ICE, "target char is less than 8 bits wide"); + + if (CPP_OPTION (pfile, wchar_precision) < CPP_OPTION (pfile, char_precision)) + cpp_error (pfile, DL_ICE, + "target wchar_t is narrower than target char"); + + if (CPP_OPTION (pfile, int_precision) < CPP_OPTION (pfile, char_precision)) + cpp_error (pfile, DL_ICE, + "target int is narrower than target char"); + + /* This is assumed in eval_token() and could be fixed if necessary. */ + if (sizeof (cppchar_t) > sizeof (cpp_num_part)) + cpp_error (pfile, DL_ICE, "CPP half-integer narrower than CPP character"); + + if (CPP_OPTION (pfile, wchar_precision) > BITS_PER_CPPCHAR_T) + cpp_error (pfile, DL_ICE, + "CPP on this host cannot handle wide character constants over %lu bits, but the target requires %lu bits", + (unsigned long) BITS_PER_CPPCHAR_T, + (unsigned long) CPP_OPTION (pfile, wchar_precision)); + } + #else + # define sanity_checks(PFILE) + #endif + + /* Add a dependency target. Can be called any number of times before + cpp_read_main_file(). If no targets have been added before + cpp_read_main_file(), then the default target is used. */ + void + cpp_add_dependency_target (pfile, target, quote) + cpp_reader *pfile; + const char *target; + int quote; + { + if (!pfile->deps) + pfile->deps = deps_init (); + + deps_add_target (pfile->deps, target, quote); + } + /* This is called after options have been parsed, and partially processed. Setup for processing input from the file named FNAME, or stdin if it is the empty string. Return the original filename *************** cpp_read_main_file (pfile, fname, table) *** 976,981 **** --- 950,959 ---- const char *fname; hash_table *table; { + sanity_checks (pfile); + + post_options (pfile); + /* The front ends don't set up the hash table until they have finished processing the command line options, so initializing the hashtable is deferred until now. */ *************** cpp_read_main_file (pfile, fname, table) *** 1001,1017 **** fprintf (stderr, _("End of search list.\n")); } ! if (CPP_OPTION (pfile, print_deps)) ! /* Set the default target (if there is none already). */ ! deps_add_default_target (pfile->deps, fname); /* Open the main input file. */ if (!_cpp_read_file (pfile, fname)) return NULL; ! /* Set this after cpp_post_options so the client can change the ! option if it wishes, and after stacking the main file so we don't ! trace the main file. */ pfile->line_maps.trace_includes = CPP_OPTION (pfile, print_include_names); /* For foo.i, read the original filename foo.c now, for the benefit --- 979,1000 ---- fprintf (stderr, _("End of search list.\n")); } ! if (CPP_OPTION (pfile, deps.style) != DEPS_NONE) ! { ! if (!pfile->deps) ! pfile->deps = deps_init (); ! ! /* Set the default target (if there is none already). */ ! deps_add_default_target (pfile->deps, fname); ! } /* Open the main input file. */ if (!_cpp_read_file (pfile, fname)) return NULL; ! /* Set this here so the client can change the option if it wishes, ! and after stacking the main file so we don't trace the main ! file. */ pfile->line_maps.trace_includes = CPP_OPTION (pfile, print_include_names); /* For foo.i, read the original filename foo.c now, for the benefit *************** cpp_finish_options (pfile) *** 1069,1184 **** { struct pending_option *p; _cpp_do_file_change (pfile, LC_RENAME, _(""), 1, 0); init_builtins (pfile); _cpp_do_file_change (pfile, LC_RENAME, _(""), 1, 0); for (p = CPP_OPTION (pfile, pending)->directive_head; p; p = p->next) (*p->handler) (pfile, p->arg); ! /* Scan -imacros files after command line defines, but before ! files given with -include. */ ! while ((p = CPP_OPTION (pfile, pending)->imacros_head) != NULL) ! { ! if (push_include (pfile, p)) ! { ! pfile->buffer->return_at_eof = true; ! cpp_scan_nooutput (pfile); ! } ! CPP_OPTION (pfile, pending)->imacros_head = p->next; ! free (p); ! } } free_chain (CPP_OPTION (pfile, pending)->directive_head); - _cpp_push_next_buffer (pfile); } ! /* Called to push the next buffer on the stack given by -include. If ! there are none, free the pending structure and restore the line map ! for the main file. */ ! bool ! _cpp_push_next_buffer (pfile) cpp_reader *pfile; { ! bool pushed = false; ! ! /* This is't pretty; we'd rather not be relying on this as a boolean ! for reverting the line map. Further, we only free the chains in ! this conditional, so an early call to cpp_finish / cpp_destroy ! will leak that memory. */ ! if (CPP_OPTION (pfile, pending) ! && CPP_OPTION (pfile, pending)->imacros_head == NULL) { ! while (!pushed) ! { ! struct pending_option *p = CPP_OPTION (pfile, pending)->include_head; ! if (p == NULL) ! break; ! if (! CPP_OPTION (pfile, preprocessed)) ! pushed = push_include (pfile, p); ! CPP_OPTION (pfile, pending)->include_head = p->next; ! free (p); ! } ! if (!pushed) { ! free (CPP_OPTION (pfile, pending)); ! CPP_OPTION (pfile, pending) = NULL; ! ! /* Restore the line map for the main file. */ ! if (! CPP_OPTION (pfile, preprocessed)) ! _cpp_do_file_change (pfile, LC_RENAME, ! pfile->line_maps.maps[0].to_file, 1, 0); } } - - return pushed; } ! /* Use mkdeps.c to output dependency information. */ ! static void ! output_deps (pfile) cpp_reader *pfile; { ! /* Stream on which to print the dependency information. */ ! FILE *deps_stream = 0; ! const char *const deps_mode = ! CPP_OPTION (pfile, print_deps_append) ? "a" : "w"; ! ! if (CPP_OPTION (pfile, deps_file)[0] == '\0') ! deps_stream = stdout; ! else ! { ! deps_stream = fopen (CPP_OPTION (pfile, deps_file), deps_mode); ! if (deps_stream == 0) ! { ! cpp_notice_from_errno (pfile, CPP_OPTION (pfile, deps_file)); ! return; ! } ! } ! ! deps_write (pfile->deps, deps_stream, 72); ! ! if (CPP_OPTION (pfile, deps_phony_targets)) ! deps_phony_targets (pfile->deps, deps_stream); ! ! /* Don't close stdout. */ ! if (deps_stream != stdout) ! { ! if (ferror (deps_stream) || fclose (deps_stream) != 0) ! cpp_fatal (pfile, "I/O error on output"); ! } ! } - /* This is called at the end of preprocessing. It pops the - last buffer and writes dependency output. It should also - clear macro definitions, such that you could call cpp_start_read - with a new filename to restart processing. */ - void - cpp_finish (pfile) - cpp_reader *pfile; - { /* cpplex.c leaves the final buffer on the stack. This it so that it returns an unending stream of CPP_EOFs to the client. If we popped the buffer, we'd dereference a NULL buffer pointer and --- 1052,1122 ---- { struct pending_option *p; + /* Prevent -Wunused-macros with command-line redefinitions. */ + pfile->first_unused_line = (unsigned int) -1; _cpp_do_file_change (pfile, LC_RENAME, _(""), 1, 0); init_builtins (pfile); _cpp_do_file_change (pfile, LC_RENAME, _(""), 1, 0); for (p = CPP_OPTION (pfile, pending)->directive_head; p; p = p->next) (*p->handler) (pfile, p->arg); ! /* Scan -imacros files after -D, -U, but before -include. ! pfile->next_include_file is NULL, so _cpp_pop_buffer does not ! push -include files. */ ! for (p = CPP_OPTION (pfile, pending)->imacros_head; p; p = p->next) ! if (push_include (pfile, p)) ! cpp_scan_nooutput (pfile); ! ! pfile->next_include_file = &CPP_OPTION (pfile, pending)->include_head; ! _cpp_maybe_push_include_file (pfile); } + pfile->first_unused_line = pfile->line; + + free_chain (CPP_OPTION (pfile, pending)->imacros_head); free_chain (CPP_OPTION (pfile, pending)->directive_head); } ! /* Push the next buffer on the stack given by -include, if any. */ ! void ! _cpp_maybe_push_include_file (pfile) cpp_reader *pfile; { ! if (pfile->next_include_file) { ! struct pending_option *head = *pfile->next_include_file; ! while (head && !push_include (pfile, head)) ! head = head->next; ! if (head) ! pfile->next_include_file = &head->next; ! else { ! /* All done; restore the line map from . */ ! _cpp_do_file_change (pfile, LC_RENAME, ! pfile->line_maps.maps[0].to_file, 1, 0); ! /* Don't come back here again. */ ! pfile->next_include_file = NULL; } } } ! /* This is called at the end of preprocessing. It pops the last ! buffer and writes dependency output, and returns the number of ! errors. ! ! Maybe it should also reset state, such that you could call ! cpp_start_read with a new filename to restart processing. */ ! int ! cpp_finish (pfile, deps_stream) cpp_reader *pfile; + FILE *deps_stream; { ! /* Warn about unused macros before popping the final buffer. */ ! if (CPP_OPTION (pfile, warn_unused_macros)) ! cpp_forall_identifiers (pfile, _cpp_warn_if_unused_macro, NULL); /* cpplex.c leaves the final buffer on the stack. This it so that it returns an unending stream of CPP_EOFs to the client. If we popped the buffer, we'd dereference a NULL buffer pointer and *************** cpp_finish (pfile) *** 1187,1199 **** while (pfile->buffer) _cpp_pop_buffer (pfile); ! /* Don't write the deps file if preprocessing has failed. */ ! if (CPP_OPTION (pfile, print_deps) && pfile->errors == 0) ! output_deps (pfile); /* Report on headers that could use multiple include guards. */ if (CPP_OPTION (pfile, print_include_names)) _cpp_report_missing_guards (pfile); } /* Add a directive to be handled later in the initialization phase. */ --- 1125,1145 ---- while (pfile->buffer) _cpp_pop_buffer (pfile); ! /* Don't write the deps file if there are errors. */ ! if (CPP_OPTION (pfile, deps.style) != DEPS_NONE ! && deps_stream && pfile->errors == 0) ! { ! deps_write (pfile->deps, deps_stream, 72); ! ! if (CPP_OPTION (pfile, deps.phony_targets)) ! deps_phony_targets (pfile->deps, deps_stream); ! } /* Report on headers that could use multiple include guards. */ if (CPP_OPTION (pfile, print_include_names)) _cpp_report_missing_guards (pfile); + + return pfile->errors; } /* Add a directive to be handled later in the initialization phase. */ *************** new_pending_directive (pend, text, handl *** 1215,1300 **** /* Irix6 "cc -n32" and OSF4 cc have problems with char foo[] = ("string"); I.e. a const string initializer with parens around it. That is what N_("string") resolves to, so we make no_* be macros instead. */ - #define no_arg N_("argument missing after %s") #define no_ass N_("assertion missing after %s") #define no_dir N_("directory name missing after %s") #define no_fil N_("file name missing after %s") #define no_mac N_("macro name missing after %s") #define no_pth N_("path name missing after %s") - #define no_num N_("number missing after %s") - #define no_tgt N_("target missing after %s") /* This is the list of all command line options, with the leading "-" removed. It must be sorted in ASCII collating order. */ #define COMMAND_LINE_OPTIONS \ - DEF_OPT("$", 0, OPT_dollar) \ - DEF_OPT("+", 0, OPT_plus) \ - DEF_OPT("-help", 0, OPT__help) \ - DEF_OPT("-target-help", 0, OPT_target__help) \ - DEF_OPT("-version", 0, OPT__version) \ DEF_OPT("A", no_ass, OPT_A) \ - DEF_OPT("C", 0, OPT_C) \ DEF_OPT("D", no_mac, OPT_D) \ - DEF_OPT("H", 0, OPT_H) \ DEF_OPT("I", no_dir, OPT_I) \ - DEF_OPT("M", 0, OPT_M) \ - DEF_OPT("MD", no_fil, OPT_MD) \ - DEF_OPT("MF", no_fil, OPT_MF) \ - DEF_OPT("MG", 0, OPT_MG) \ - DEF_OPT("MM", 0, OPT_MM) \ - DEF_OPT("MMD", no_fil, OPT_MMD) \ - DEF_OPT("MP", 0, OPT_MP) \ - DEF_OPT("MQ", no_tgt, OPT_MQ) \ - DEF_OPT("MT", no_tgt, OPT_MT) \ - DEF_OPT("P", 0, OPT_P) \ DEF_OPT("U", no_mac, OPT_U) \ - DEF_OPT("W", no_arg, OPT_W) /* arg optional */ \ - DEF_OPT("d", no_arg, OPT_d) \ - DEF_OPT("fleading-underscore", 0, OPT_fleading_underscore) \ - DEF_OPT("fno-leading-underscore", 0, OPT_fno_leading_underscore) \ - DEF_OPT("fno-operator-names", 0, OPT_fno_operator_names) \ - DEF_OPT("fno-preprocessed", 0, OPT_fno_preprocessed) \ - DEF_OPT("fno-show-column", 0, OPT_fno_show_column) \ - DEF_OPT("fpreprocessed", 0, OPT_fpreprocessed) \ - DEF_OPT("fshow-column", 0, OPT_fshow_column) \ - DEF_OPT("fsigned-char", 0, OPT_fsigned_char) \ - DEF_OPT("ftabstop=", no_num, OPT_ftabstop) \ - DEF_OPT("funsigned-char", 0, OPT_funsigned_char) \ - DEF_OPT("h", 0, OPT_h) \ DEF_OPT("idirafter", no_dir, OPT_idirafter) \ DEF_OPT("imacros", no_fil, OPT_imacros) \ DEF_OPT("include", no_fil, OPT_include) \ DEF_OPT("iprefix", no_pth, OPT_iprefix) \ DEF_OPT("isystem", no_dir, OPT_isystem) \ DEF_OPT("iwithprefix", no_dir, OPT_iwithprefix) \ ! DEF_OPT("iwithprefixbefore", no_dir, OPT_iwithprefixbefore) \ ! DEF_OPT("lang-asm", 0, OPT_lang_asm) \ ! DEF_OPT("lang-c", 0, OPT_lang_c) \ ! DEF_OPT("lang-c++", 0, OPT_lang_cplusplus) \ ! DEF_OPT("lang-c89", 0, OPT_lang_c89) \ ! DEF_OPT("lang-objc", 0, OPT_lang_objc) \ ! DEF_OPT("lang-objc++", 0, OPT_lang_objcplusplus) \ ! DEF_OPT("nostdinc", 0, OPT_nostdinc) \ ! DEF_OPT("nostdinc++", 0, OPT_nostdincplusplus) \ ! DEF_OPT("o", no_fil, OPT_o) \ ! DEF_OPT("pedantic", 0, OPT_pedantic) \ ! DEF_OPT("pedantic-errors", 0, OPT_pedantic_errors) \ ! DEF_OPT("remap", 0, OPT_remap) \ ! DEF_OPT("std=c++98", 0, OPT_std_cplusplus98) \ ! DEF_OPT("std=c89", 0, OPT_std_c89) \ ! DEF_OPT("std=c99", 0, OPT_std_c99) \ ! DEF_OPT("std=c9x", 0, OPT_std_c9x) \ ! DEF_OPT("std=gnu89", 0, OPT_std_gnu89) \ ! DEF_OPT("std=gnu99", 0, OPT_std_gnu99) \ ! DEF_OPT("std=gnu9x", 0, OPT_std_gnu9x) \ ! DEF_OPT("std=iso9899:1990", 0, OPT_std_iso9899_1990) \ ! DEF_OPT("std=iso9899:199409", 0, OPT_std_iso9899_199409) \ ! DEF_OPT("std=iso9899:1999", 0, OPT_std_iso9899_1999) \ ! DEF_OPT("std=iso9899:199x", 0, OPT_std_iso9899_199x) \ ! DEF_OPT("trigraphs", 0, OPT_trigraphs) \ ! DEF_OPT("v", 0, OPT_v) \ ! DEF_OPT("version", 0, OPT_version) \ ! DEF_OPT("w", 0, OPT_w) #define DEF_OPT(text, msg, code) code, enum opt_code --- 1161,1186 ---- /* Irix6 "cc -n32" and OSF4 cc have problems with char foo[] = ("string"); I.e. a const string initializer with parens around it. That is what N_("string") resolves to, so we make no_* be macros instead. */ #define no_ass N_("assertion missing after %s") #define no_dir N_("directory name missing after %s") #define no_fil N_("file name missing after %s") #define no_mac N_("macro name missing after %s") #define no_pth N_("path name missing after %s") /* This is the list of all command line options, with the leading "-" removed. It must be sorted in ASCII collating order. */ #define COMMAND_LINE_OPTIONS \ DEF_OPT("A", no_ass, OPT_A) \ DEF_OPT("D", no_mac, OPT_D) \ DEF_OPT("I", no_dir, OPT_I) \ DEF_OPT("U", no_mac, OPT_U) \ DEF_OPT("idirafter", no_dir, OPT_idirafter) \ DEF_OPT("imacros", no_fil, OPT_imacros) \ DEF_OPT("include", no_fil, OPT_include) \ DEF_OPT("iprefix", no_pth, OPT_iprefix) \ DEF_OPT("isystem", no_dir, OPT_isystem) \ DEF_OPT("iwithprefix", no_dir, OPT_iwithprefix) \ ! DEF_OPT("iwithprefixbefore", no_dir, OPT_iwithprefixbefore) #define DEF_OPT(text, msg, code) code, enum opt_code *************** static const struct cl_option cl_options *** 1328,1337 **** command-line matches. Returns its index in the option array, negative on failure. Complications arise since some options can be suffixed with an argument, and multiple complete matches can occur, ! e.g. -iwithprefix and -iwithprefixbefore. Moreover, we need to ! accept options beginning with -W that we do not recognise, but not ! to swallow any subsequent command line argument; this is handled as ! special cases in cpp_handle_option. */ static int parse_option (input) const char *input; --- 1214,1220 ---- command-line matches. Returns its index in the option array, negative on failure. Complications arise since some options can be suffixed with an argument, and multiple complete matches can occur, ! e.g. -pedantic and -pedantic-errors. */ static int parse_option (input) const char *input; *************** parse_option (input) *** 1390,1419 **** /* Handle one command-line option in (argc, argv). Can be called multiple times, to handle multiple sets of options. - If ignore is non-zero, this will ignore unrecognized -W* options. Returns number of strings consumed. */ int ! cpp_handle_option (pfile, argc, argv, ignore) cpp_reader *pfile; int argc; char **argv; - int ignore; { int i = 0; struct cpp_pending *pend = CPP_OPTION (pfile, pending); - /* Interpret "-" or a non-option as a file name. */ - if (argv[i][0] != '-' || argv[i][1] == '\0') - { - if (CPP_OPTION (pfile, in_fname) == NULL) - CPP_OPTION (pfile, in_fname) = argv[i]; - else if (CPP_OPTION (pfile, out_fname) == NULL) - CPP_OPTION (pfile, out_fname) = argv[i]; - else - cpp_fatal (pfile, "too many filenames. Type %s --help for usage info", - progname); - } - else { enum opt_code opt_code; int opt_index; --- 1273,1288 ---- /* Handle one command-line option in (argc, argv). Can be called multiple times, to handle multiple sets of options. Returns number of strings consumed. */ int ! cpp_handle_option (pfile, argc, argv) cpp_reader *pfile; int argc; char **argv; { int i = 0; struct cpp_pending *pend = CPP_OPTION (pfile, pending); { enum opt_code opt_code; int opt_index; *************** cpp_handle_option (pfile, argc, argv, ig *** 1428,1443 **** if (cl_options[opt_index].msg) { arg = &argv[i][cl_options[opt_index].opt_len + 1]; ! ! /* Yuk. Special case for -W as it must not swallow ! up any following argument. If this becomes common, add ! another field to the cl_options table. */ ! if (arg[0] == '\0' && opt_code != OPT_W) { arg = argv[++i]; if (!arg) { ! cpp_fatal (pfile, cl_options[opt_index].msg, argv[i - 1]); return argc; } } --- 1297,1309 ---- if (cl_options[opt_index].msg) { arg = &argv[i][cl_options[opt_index].opt_len + 1]; ! if (arg[0] == '\0') { arg = argv[++i]; if (!arg) { ! cpp_error (pfile, DL_ERROR, ! cl_options[opt_index].msg, argv[i - 1]); return argc; } } *************** cpp_handle_option (pfile, argc, argv, ig *** 1447,1691 **** { case N_OPTS: /* Shut GCC up. */ break; - case OPT_fleading_underscore: - CPP_OPTION (pfile, user_label_prefix) = "_"; - break; - case OPT_fno_leading_underscore: - CPP_OPTION (pfile, user_label_prefix) = ""; - break; - case OPT_fno_operator_names: - CPP_OPTION (pfile, operator_names) = 0; - break; - case OPT_fpreprocessed: - CPP_OPTION (pfile, preprocessed) = 1; - break; - case OPT_fno_preprocessed: - CPP_OPTION (pfile, preprocessed) = 0; - break; - case OPT_fshow_column: - CPP_OPTION (pfile, show_column) = 1; - break; - case OPT_fno_show_column: - CPP_OPTION (pfile, show_column) = 0; - break; - case OPT_fsigned_char: - CPP_OPTION (pfile, signed_char) = 1; - break; - case OPT_funsigned_char: - CPP_OPTION (pfile, signed_char) = 0; - break; - case OPT_ftabstop: - /* Silently ignore empty string, non-longs and silly values. */ - if (arg[0] != '\0') - { - char *endptr; - long tabstop = strtol (arg, &endptr, 10); - if (*endptr == '\0' && tabstop >= 1 && tabstop <= 100) - CPP_OPTION (pfile, tabstop) = tabstop; - } - break; - case OPT_w: - CPP_OPTION (pfile, inhibit_warnings) = 1; - break; - case OPT_h: - case OPT__help: - print_help (); - CPP_OPTION (pfile, help_only) = 1; - break; - case OPT_target__help: - /* Print if any target specific options. cpplib has none, but - make sure help_only gets set. */ - CPP_OPTION (pfile, help_only) = 1; - break; - /* --version inhibits compilation, -version doesn't. -v means - verbose and -version. Historical reasons, don't ask. */ - case OPT__version: - CPP_OPTION (pfile, help_only) = 1; - pfile->print_version = 1; - break; - case OPT_v: - CPP_OPTION (pfile, verbose) = 1; - pfile->print_version = 1; - break; - case OPT_version: - pfile->print_version = 1; - break; - - case OPT_C: - CPP_OPTION (pfile, discard_comments) = 0; - break; - case OPT_P: - CPP_OPTION (pfile, no_line_commands) = 1; - break; - case OPT_dollar: /* Don't include $ in identifiers. */ - CPP_OPTION (pfile, dollars_in_ident) = 0; - break; - case OPT_H: - CPP_OPTION (pfile, print_include_names) = 1; - break; case OPT_D: new_pending_directive (pend, arg, cpp_define); break; - case OPT_pedantic_errors: - CPP_OPTION (pfile, pedantic_errors) = 1; - /* fall through */ - case OPT_pedantic: - CPP_OPTION (pfile, pedantic) = 1; - break; - case OPT_trigraphs: - CPP_OPTION (pfile, trigraphs) = 1; - break; - case OPT_plus: - CPP_OPTION (pfile, cplusplus) = 1; - CPP_OPTION (pfile, cplusplus_comments) = 1; - break; - case OPT_remap: - CPP_OPTION (pfile, remap) = 1; - break; case OPT_iprefix: CPP_OPTION (pfile, include_prefix) = arg; CPP_OPTION (pfile, include_prefix_len) = strlen (arg); break; - case OPT_lang_c: - set_lang (pfile, CLK_GNUC89); - break; - case OPT_lang_cplusplus: - set_lang (pfile, CLK_GNUCXX); - break; - case OPT_lang_objc: - set_lang (pfile, CLK_OBJC); - break; - case OPT_lang_objcplusplus: - set_lang (pfile, CLK_OBJCXX); - break; - case OPT_lang_asm: - set_lang (pfile, CLK_ASM); - break; - case OPT_std_cplusplus98: - set_lang (pfile, CLK_CXX98); - break; - case OPT_std_gnu89: - set_lang (pfile, CLK_GNUC89); - break; - case OPT_std_gnu9x: - case OPT_std_gnu99: - set_lang (pfile, CLK_GNUC99); - break; - case OPT_std_iso9899_199409: - set_lang (pfile, CLK_STDC94); - break; - case OPT_std_iso9899_1990: - case OPT_std_c89: - case OPT_lang_c89: - set_lang (pfile, CLK_STDC89); - break; - case OPT_std_iso9899_199x: - case OPT_std_iso9899_1999: - case OPT_std_c9x: - case OPT_std_c99: - set_lang (pfile, CLK_STDC99); - break; - case OPT_nostdinc: - /* -nostdinc causes no default include directories. - You must specify all include-file directories with -I. */ - CPP_OPTION (pfile, no_standard_includes) = 1; - break; - case OPT_nostdincplusplus: - /* -nostdinc++ causes no default C++-specific include directories. */ - CPP_OPTION (pfile, no_standard_cplusplus_includes) = 1; - break; - case OPT_o: - if (CPP_OPTION (pfile, out_fname) == NULL) - CPP_OPTION (pfile, out_fname) = arg; - else - { - cpp_fatal (pfile, "output filename specified twice"); - return argc; - } - break; - case OPT_d: - /* Args to -d specify what parts of macros to dump. - Silently ignore unrecognised options; they may - be aimed at the compiler proper. */ - { - char c; - - while ((c = *arg++) != '\0') - switch (c) - { - case 'M': - CPP_OPTION (pfile, dump_macros) = dump_only; - break; - case 'N': - CPP_OPTION (pfile, dump_macros) = dump_names; - break; - case 'D': - CPP_OPTION (pfile, dump_macros) = dump_definitions; - break; - case 'I': - CPP_OPTION (pfile, dump_includes) = 1; - break; - } - } - break; - - case OPT_MG: - CPP_OPTION (pfile, print_deps_missing_files) = 1; - break; - case OPT_M: - /* When doing dependencies with -M or -MM, suppress normal - preprocessed output, but still do -dM etc. as software - depends on this. Preprocessed output occurs if -MD, -MMD - or environment var dependency generation is used. */ - CPP_OPTION (pfile, print_deps) = 2; - CPP_OPTION (pfile, no_output) = 1; - break; - case OPT_MM: - CPP_OPTION (pfile, print_deps) = 1; - CPP_OPTION (pfile, no_output) = 1; - break; - case OPT_MF: - CPP_OPTION (pfile, deps_file) = arg; - break; - case OPT_MP: - CPP_OPTION (pfile, deps_phony_targets) = 1; - break; - case OPT_MQ: - case OPT_MT: - /* Add a target. -MQ quotes for Make. */ - deps_add_target (pfile->deps, arg, opt_code == OPT_MQ); - break; - - case OPT_MD: - CPP_OPTION (pfile, print_deps) = 2; - CPP_OPTION (pfile, deps_file) = arg; - break; - case OPT_MMD: - CPP_OPTION (pfile, print_deps) = 1; - CPP_OPTION (pfile, deps_file) = arg; - break; case OPT_A: if (arg[0] == '-') ! { ! /* -A with an argument beginning with '-' acts as ! #unassert on whatever immediately follows the '-'. ! If "-" is the whole argument, we eliminate all ! predefined macros and assertions, including those ! that were specified earlier on the command line. ! That way we can get rid of any that were passed ! automatically in from GCC. */ ! ! if (arg[1] == '\0') ! { ! free_chain (pend->directive_head); ! pend->directive_head = NULL; ! pend->directive_tail = NULL; ! } ! else ! new_pending_directive (pend, arg + 1, cpp_unassert); ! } else new_pending_directive (pend, arg, cpp_assert); break; --- 1313,1330 ---- { case N_OPTS: /* Shut GCC up. */ break; case OPT_D: new_pending_directive (pend, arg, cpp_define); break; case OPT_iprefix: CPP_OPTION (pfile, include_prefix) = arg; CPP_OPTION (pfile, include_prefix_len) = strlen (arg); break; case OPT_A: if (arg[0] == '-') ! new_pending_directive (pend, arg + 1, cpp_unassert); else new_pending_directive (pend, arg, cpp_assert); break; *************** cpp_handle_option (pfile, argc, argv, ig *** 1694,1700 **** break; case OPT_I: /* Add directory to path for includes. */ if (!strcmp (arg, "-")) ! { /* -I- means: Use the preceding -I directories for #include "..." but not #include <...>. --- 1333,1339 ---- break; case OPT_I: /* Add directory to path for includes. */ if (!strcmp (arg, "-")) ! { /* -I- means: Use the preceding -I directories for #include "..." but not #include <...>. *************** cpp_handle_option (pfile, argc, argv, ig *** 1711,1721 **** } else { ! cpp_fatal (pfile, "-I- specified twice"); return argc; } ! } ! else append_include_chain (pfile, xstrdup (arg), BRACKET, 0); break; case OPT_isystem: --- 1350,1360 ---- } else { ! cpp_error (pfile, DL_ERROR, "-I- specified twice"); return argc; } ! } ! else append_include_chain (pfile, xstrdup (arg), BRACKET, 0); break; case OPT_isystem: *************** cpp_handle_option (pfile, argc, argv, ig *** 1774,1822 **** /* Add directory to end of path for includes. */ append_include_chain (pfile, xstrdup (arg), AFTER, 0); break; ! case OPT_W: ! /* Silently ignore unrecognised options. */ ! if (!strcmp (argv[i], "-Wall")) ! { ! CPP_OPTION (pfile, warn_trigraphs) = 1; ! CPP_OPTION (pfile, warn_comments) = 1; ! } ! else if (!strcmp (argv[i], "-Wtraditional")) ! CPP_OPTION (pfile, warn_traditional) = 1; ! else if (!strcmp (argv[i], "-Wtrigraphs")) ! CPP_OPTION (pfile, warn_trigraphs) = 1; ! else if (!strcmp (argv[i], "-Wcomment")) ! CPP_OPTION (pfile, warn_comments) = 1; ! else if (!strcmp (argv[i], "-Wcomments")) ! CPP_OPTION (pfile, warn_comments) = 1; ! else if (!strcmp (argv[i], "-Wundef")) ! CPP_OPTION (pfile, warn_undef) = 1; ! else if (!strcmp (argv[i], "-Wimport")) ! CPP_OPTION (pfile, warn_import) = 1; ! else if (!strcmp (argv[i], "-Werror")) ! CPP_OPTION (pfile, warnings_are_errors) = 1; ! else if (!strcmp (argv[i], "-Wsystem-headers")) ! CPP_OPTION (pfile, warn_system_headers) = 1; ! else if (!strcmp (argv[i], "-Wno-traditional")) ! CPP_OPTION (pfile, warn_traditional) = 0; ! else if (!strcmp (argv[i], "-Wno-trigraphs")) ! CPP_OPTION (pfile, warn_trigraphs) = 0; ! else if (!strcmp (argv[i], "-Wno-comment")) ! CPP_OPTION (pfile, warn_comments) = 0; ! else if (!strcmp (argv[i], "-Wno-comments")) ! CPP_OPTION (pfile, warn_comments) = 0; ! else if (!strcmp (argv[i], "-Wno-undef")) ! CPP_OPTION (pfile, warn_undef) = 0; ! else if (!strcmp (argv[i], "-Wno-import")) ! CPP_OPTION (pfile, warn_import) = 0; ! else if (!strcmp (argv[i], "-Wno-error")) ! CPP_OPTION (pfile, warnings_are_errors) = 0; ! else if (!strcmp (argv[i], "-Wno-system-headers")) ! CPP_OPTION (pfile, warn_system_headers) = 0; ! else if (! ignore) ! return i; ! break; ! } } return i + 1; } --- 1413,1419 ---- /* Add directory to end of path for includes. */ append_include_chain (pfile, xstrdup (arg), AFTER, 0); break; ! } } return i + 1; } *************** cpp_handle_options (pfile, argc, argv) *** 1836,1842 **** for (i = 0; i < argc; i += strings_processed) { ! strings_processed = cpp_handle_option (pfile, argc - i, argv + i, 1); if (strings_processed == 0) break; } --- 1433,1439 ---- for (i = 0; i < argc; i += strings_processed) { ! strings_processed = cpp_handle_option (pfile, argc - i, argv + i); if (strings_processed == 0) break; } *************** cpp_handle_options (pfile, argc, argv) *** 1844,2070 **** return i; } ! /* Extra processing when all options are parsed, after all calls to ! cpp_handle_option[s]. Consistency checks etc. */ ! void ! cpp_post_options (pfile) cpp_reader *pfile; { - if (pfile->print_version) - { - fprintf (stderr, _("GNU CPP version %s (cpplib)"), version_string); - #ifdef TARGET_VERSION - TARGET_VERSION; - #endif - fputc ('\n', stderr); - } - - /* Canonicalize in_fname and out_fname. We guarantee they are not - NULL, and that the empty string represents stdin / stdout. */ - if (CPP_OPTION (pfile, in_fname) == NULL - || !strcmp (CPP_OPTION (pfile, in_fname), "-")) - CPP_OPTION (pfile, in_fname) = ""; - - if (CPP_OPTION (pfile, out_fname) == NULL - || !strcmp (CPP_OPTION (pfile, out_fname), "-")) - CPP_OPTION (pfile, out_fname) = ""; - /* -Wtraditional is not useful in C++ mode. */ if (CPP_OPTION (pfile, cplusplus)) CPP_OPTION (pfile, warn_traditional) = 0; - /* Set this if it hasn't been set already. */ - if (CPP_OPTION (pfile, user_label_prefix) == NULL) - CPP_OPTION (pfile, user_label_prefix) = USER_LABEL_PREFIX; - /* Permanently disable macro expansion if we are rescanning ! preprocessed text. */ if (CPP_OPTION (pfile, preprocessed)) - pfile->state.prevent_expansion = 1; - - /* -dM makes no normal output. This is set here so that -dM -dD - works as expected. */ - if (CPP_OPTION (pfile, dump_macros) == dump_only) - CPP_OPTION (pfile, no_output) = 1; - - /* Disable -dD, -dN and -dI if we should make no normal output - (such as with -M). Allow -M -dM since some software relies on - this. */ - if (CPP_OPTION (pfile, no_output)) { ! if (CPP_OPTION (pfile, dump_macros) != dump_only) ! CPP_OPTION (pfile, dump_macros) = dump_none; ! CPP_OPTION (pfile, dump_includes) = 0; ! } ! ! /* We need to do this after option processing and before ! cpp_start_read, as cppmain.c relies on the options->no_output to ! set its callbacks correctly before calling cpp_start_read. */ ! init_dependency_output (pfile); ! ! /* After checking the environment variables, check if -M or -MM has ! not been specified, but other -M options have. */ ! if (CPP_OPTION (pfile, print_deps) == 0 && ! (CPP_OPTION (pfile, print_deps_missing_files) ! || CPP_OPTION (pfile, deps_file) ! || CPP_OPTION (pfile, deps_phony_targets))) ! cpp_fatal (pfile, "you must additionally specify either -M or -MM"); ! } ! ! /* Set up dependency-file output. On exit, if print_deps is non-zero ! then deps_file is not NULL; stdout is the empty string. */ ! static void ! init_dependency_output (pfile) ! cpp_reader *pfile; ! { ! char *spec, *s, *output_file; ! ! /* Either of two environment variables can specify output of deps. ! Its value is either "OUTPUT_FILE" or "OUTPUT_FILE DEPS_TARGET", ! where OUTPUT_FILE is the file to write deps info to ! and DEPS_TARGET is the target to mention in the deps. */ ! ! if (CPP_OPTION (pfile, print_deps) == 0) ! { ! spec = getenv ("DEPENDENCIES_OUTPUT"); ! if (spec) ! CPP_OPTION (pfile, print_deps) = 1; ! else ! { ! spec = getenv ("SUNPRO_DEPENDENCIES"); ! if (spec) ! { ! CPP_OPTION (pfile, print_deps) = 2; ! CPP_OPTION (pfile, deps_ignore_main_file) = 1; ! } ! else ! return; ! } ! ! /* Find the space before the DEPS_TARGET, if there is one. */ ! s = strchr (spec, ' '); ! if (s) ! { ! /* Let the caller perform MAKE quoting. */ ! deps_add_target (pfile->deps, s + 1, 0); ! output_file = (char *) xmalloc (s - spec + 1); ! memcpy (output_file, spec, s - spec); ! output_file[s - spec] = 0; ! } ! else ! output_file = spec; ! ! /* Command line -MF overrides environment variables and default. */ ! if (CPP_OPTION (pfile, deps_file) == 0) ! CPP_OPTION (pfile, deps_file) = output_file; ! ! CPP_OPTION (pfile, print_deps_append) = 1; } - else if (CPP_OPTION (pfile, deps_file) == 0) - /* If -M or -MM was seen without -MF, default output to wherever - was specified with -o. out_fname is non-NULL here. */ - CPP_OPTION (pfile, deps_file) = CPP_OPTION (pfile, out_fname); - } ! /* Handle --help output. */ ! static void ! print_help () ! { ! /* To keep the lines from getting too long for some compilers, limit ! to about 500 characters (6 lines) per chunk. */ ! fputs (_("\ ! Switches:\n\ ! -include Include the contents of before other files\n\ ! -imacros Accept definition of macros in \n\ ! -iprefix Specify as a prefix for next two options\n\ ! -iwithprefix Add to the end of the system include path\n\ ! -iwithprefixbefore Add to the end of the main include path\n\ ! -isystem Add to the start of the system include path\n\ ! "), stdout); ! fputs (_("\ ! -idirafter Add to the end of the system include path\n\ ! -I Add to the end of the main include path\n\ ! -I- Fine-grained include path control; see info docs\n\ ! -nostdinc Do not search system include directories\n\ ! (dirs specified with -isystem will still be used)\n\ ! -nostdinc++ Do not search system include directories for C++\n\ ! -o Put output into \n\ ! "), stdout); ! fputs (_("\ ! -pedantic Issue all warnings demanded by strict ISO C\n\ ! -pedantic-errors Issue -pedantic warnings as errors instead\n\ ! -trigraphs Support ISO C trigraphs\n\ ! -lang-c Assume that the input sources are in C\n\ ! -lang-c89 Assume that the input sources are in C89\n\ ! "), stdout); ! fputs (_("\ ! -lang-c++ Assume that the input sources are in C++\n\ ! -lang-objc Assume that the input sources are in ObjectiveC\n\ ! -lang-objc++ Assume that the input sources are in ObjectiveC++\n\ ! -lang-asm Assume that the input sources are in assembler\n\ ! "), stdout); ! fputs (_("\ ! -std= Specify the conformance standard; one of:\n\ ! gnu89, gnu99, c89, c99, iso9899:1990,\n\ ! iso9899:199409, iso9899:1999\n\ ! -+ Allow parsing of C++ style features\n\ ! -w Inhibit warning messages\n\ ! -Wtrigraphs Warn if trigraphs are encountered\n\ ! -Wno-trigraphs Do not warn about trigraphs\n\ ! -Wcomment{s} Warn if one comment starts inside another\n\ ! "), stdout); ! fputs (_("\ ! -Wno-comment{s} Do not warn about comments\n\ ! -Wtraditional Warn about features not present in traditional C\n\ ! -Wno-traditional Do not warn about traditional C\n\ ! -Wundef Warn if an undefined macro is used by #if\n\ ! -Wno-undef Do not warn about testing undefined macros\n\ ! -Wimport Warn about the use of the #import directive\n\ ! "), stdout); ! fputs (_("\ ! -Wno-import Do not warn about the use of #import\n\ ! -Werror Treat all warnings as errors\n\ ! -Wno-error Do not treat warnings as errors\n\ ! -Wsystem-headers Do not suppress warnings from system headers\n\ ! -Wno-system-headers Suppress warnings from system headers\n\ ! -Wall Enable all preprocessor warnings\n\ ! "), stdout); ! fputs (_("\ ! -M Generate make dependencies\n\ ! -MM As -M, but ignore system header files\n\ ! -MD Generate make dependencies and compile\n\ ! -MMD As -MD, but ignore system header files\n\ ! -MF Write dependency output to the given file\n\ ! -MG Treat missing header file as generated files\n\ ! "), stdout); ! fputs (_("\ ! -MP Generate phony targets for all headers\n\ ! -MQ Add a MAKE-quoted target\n\ ! -MT Add an unquoted target\n\ ! "), stdout); ! fputs (_("\ ! -D Define a with string '1' as its value\n\ ! -D= Define a with as its value\n\ ! -A= Assert the to \n\ ! -A-= Disable the to \n\ ! -U Undefine \n\ ! -v Display the version number\n\ ! "), stdout); ! fputs (_("\ ! -H Print the name of header files as they are used\n\ ! -C Do not discard comments\n\ ! -dM Display a list of macro definitions active at end\n\ ! -dD Preserve macro definitions in output\n\ ! -dN As -dD except that only the names are preserved\n\ ! -dI Include #include directives in the output\n\ ! "), stdout); ! fputs (_("\ ! -fpreprocessed Treat the input file as already preprocessed\n\ ! -ftabstop= Distance between tab stops for column reporting\n\ ! -P Do not generate #line directives\n\ ! -$ Do not allow '$' in identifiers\n\ ! -remap Remap file names when including files\n\ ! --version Display version information\n\ ! -h or --help Display this information\n\ ! "), stdout); } --- 1441,1463 ---- return i; } ! static void ! post_options (pfile) cpp_reader *pfile; { /* -Wtraditional is not useful in C++ mode. */ if (CPP_OPTION (pfile, cplusplus)) CPP_OPTION (pfile, warn_traditional) = 0; /* Permanently disable macro expansion if we are rescanning ! preprocessed text. Read preprocesed source in ISO mode. */ if (CPP_OPTION (pfile, preprocessed)) { ! pfile->state.prevent_expansion = 1; ! CPP_OPTION (pfile, traditional) = 0; } ! /* Traditional CPP does not accurately track column information. */ ! if (CPP_OPTION (pfile, traditional)) ! CPP_OPTION (pfile, show_column) = 0; } diff -Nrc3pad gcc-3.2.3/gcc/cpplex.c gcc-3.3/gcc/cpplex.c *** gcc-3.2.3/gcc/cpplex.c 2002-02-24 12:52:21.000000000 +0000 --- gcc-3.3/gcc/cpplex.c 2002-09-26 22:25:12.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 25,37 **** #include "cpplib.h" #include "cpphash.h" - /* MULTIBYTE_CHARS support only works for native compilers. - ??? Ideally what we want is to model widechar support after - the current floating point support. */ - #ifdef CROSS_COMPILE - #undef MULTIBYTE_CHARS - #endif - #ifdef MULTIBYTE_CHARS #include "mbchar.h" #include --- 25,30 ---- *************** static int skip_line_comment PARAMS ((cp *** 77,93 **** static void adjust_column PARAMS ((cpp_reader *)); static int skip_whitespace PARAMS ((cpp_reader *, cppchar_t)); static cpp_hashnode *parse_identifier PARAMS ((cpp_reader *)); ! static cpp_hashnode *parse_identifier_slow PARAMS ((cpp_reader *, ! const U_CHAR *)); ! static void parse_number PARAMS ((cpp_reader *, cpp_string *, cppchar_t, int)); ! static int unescaped_terminator_p PARAMS ((cpp_reader *, const U_CHAR *)); static void parse_string PARAMS ((cpp_reader *, cpp_token *, cppchar_t)); - static void unterminated PARAMS ((cpp_reader *, int)); static bool trigraph_p PARAMS ((cpp_reader *)); ! static void save_comment PARAMS ((cpp_reader *, cpp_token *, const U_CHAR *)); static int name_p PARAMS ((cpp_reader *, const cpp_string *)); static int maybe_read_ucs PARAMS ((cpp_reader *, const unsigned char **, ! const unsigned char *, unsigned int *)); static tokenrun *next_tokenrun PARAMS ((tokenrun *)); static unsigned int hex_digit_value PARAMS ((unsigned int)); --- 70,87 ---- static void adjust_column PARAMS ((cpp_reader *)); static int skip_whitespace PARAMS ((cpp_reader *, cppchar_t)); static cpp_hashnode *parse_identifier PARAMS ((cpp_reader *)); ! static uchar *parse_slow PARAMS ((cpp_reader *, const uchar *, int, ! unsigned int *)); ! static void parse_number PARAMS ((cpp_reader *, cpp_string *, int)); ! static int unescaped_terminator_p PARAMS ((cpp_reader *, const uchar *)); static void parse_string PARAMS ((cpp_reader *, cpp_token *, cppchar_t)); static bool trigraph_p PARAMS ((cpp_reader *)); ! static void save_comment PARAMS ((cpp_reader *, cpp_token *, const uchar *, ! cppchar_t)); ! static bool continue_after_nul PARAMS ((cpp_reader *)); static int name_p PARAMS ((cpp_reader *, const cpp_string *)); static int maybe_read_ucs PARAMS ((cpp_reader *, const unsigned char **, ! const unsigned char *, cppchar_t *)); static tokenrun *next_tokenrun PARAMS ((tokenrun *)); static unsigned int hex_digit_value PARAMS ((unsigned int)); *************** cpp_ideq (token, string) *** 105,111 **** if (token->type != CPP_NAME) return 0; ! return !ustrcmp (NODE_NAME (token->val.node), (const U_CHAR *) string); } /* Call when meeting a newline, assumed to be in buffer->cur[-1]. --- 99,105 ---- if (token->type != CPP_NAME) return 0; ! return !ustrcmp (NODE_NAME (token->val.node), (const uchar *) string); } /* Call when meeting a newline, assumed to be in buffer->cur[-1]. *************** handle_newline (pfile) *** 118,124 **** cpp_buffer *buffer = pfile->buffer; /* Handle CR-LF and LF-CR. Most other implementations (e.g. java) ! only accept CR-LF; maybe we should fall back to that behaviour? */ if (buffer->cur[-1] + buffer->cur[0] == '\r' + '\n') buffer->cur++; --- 112,118 ---- cpp_buffer *buffer = pfile->buffer; /* Handle CR-LF and LF-CR. Most other implementations (e.g. java) ! only accept CR-LF; maybe we should fall back to that behavior? */ if (buffer->cur[-1] + buffer->cur[0] == '\r' + '\n') buffer->cur++; *************** handle_newline (pfile) *** 132,138 **** the second '?'. Warn if necessary, and returns true if the sequence forms a ! trigraph and the trigraph should be honoured. */ static bool trigraph_p (pfile) cpp_reader *pfile; --- 126,132 ---- the second '?'. Warn if necessary, and returns true if the sequence forms a ! trigraph and the trigraph should be honored. */ static bool trigraph_p (pfile) cpp_reader *pfile; *************** trigraph_p (pfile) *** 150,165 **** if (CPP_OPTION (pfile, warn_trigraphs) && !pfile->state.lexing_comment) { if (accept) ! cpp_warning_with_line (pfile, pfile->line, CPP_BUF_COL (buffer) - 1, ! "trigraph ??%c converted to %c", ! (int) from_char, ! (int) _cpp_trigraph_map[from_char]); else if (buffer->cur != buffer->last_Wtrigraphs) { buffer->last_Wtrigraphs = buffer->cur; ! cpp_warning_with_line (pfile, pfile->line, ! CPP_BUF_COL (buffer) - 1, ! "trigraph ??%c ignored", (int) from_char); } } --- 144,160 ---- if (CPP_OPTION (pfile, warn_trigraphs) && !pfile->state.lexing_comment) { if (accept) ! cpp_error_with_line (pfile, DL_WARNING, ! pfile->line, CPP_BUF_COL (buffer) - 1, ! "trigraph ??%c converted to %c", ! (int) from_char, ! (int) _cpp_trigraph_map[from_char]); else if (buffer->cur != buffer->last_Wtrigraphs) { buffer->last_Wtrigraphs = buffer->cur; ! cpp_error_with_line (pfile, DL_WARNING, ! pfile->line, CPP_BUF_COL (buffer) - 1, ! "trigraph ??%c ignored", (int) from_char); } } *************** skip_escaped_newlines (pfile) *** 215,227 **** if (saved_cur != buffer->cur - 1 && !pfile->state.lexing_comment) ! cpp_warning (pfile, "backslash and newline separated by space"); handle_newline (pfile); buffer->backup_to = buffer->cur; if (buffer->cur == buffer->rlimit) { ! cpp_pedwarn (pfile, "backslash-newline at end of file"); next = EOF; } else --- 210,224 ---- if (saved_cur != buffer->cur - 1 && !pfile->state.lexing_comment) ! cpp_error (pfile, DL_WARNING, ! "backslash and newline separated by space"); handle_newline (pfile); buffer->backup_to = buffer->cur; if (buffer->cur == buffer->rlimit) { ! cpp_error (pfile, DL_PEDWARN, ! "backslash-newline at end of file"); next = EOF; } else *************** get_effective_char (pfile) *** 250,261 **** if (__builtin_expect (next == '?' || next == '\\', 0)) next = skip_escaped_newlines (pfile); ! return next; } /* Skip a C-style block comment. We find the end of the comment by seeing if an asterisk is before every '/' we encounter. Returns ! non-zero if comment terminated by EOF, zero otherwise. */ static int skip_block_comment (pfile) cpp_reader *pfile; --- 247,258 ---- if (__builtin_expect (next == '?' || next == '\\', 0)) next = skip_escaped_newlines (pfile); ! return next; } /* Skip a C-style block comment. We find the end of the comment by seeing if an asterisk is before every '/' we encounter. Returns ! nonzero if comment terminated by EOF, zero otherwise. */ static int skip_block_comment (pfile) cpp_reader *pfile; *************** skip_block_comment (pfile) *** 285,293 **** Don't bother to get it right across escaped newlines. */ if (CPP_OPTION (pfile, warn_comments) && buffer->cur[0] == '*' && buffer->cur[1] != '/') ! cpp_warning_with_line (pfile, ! pfile->line, CPP_BUF_COL (buffer), ! "\"/*\" within comment"); } else if (is_vspace (c)) handle_newline (pfile); --- 282,290 ---- Don't bother to get it right across escaped newlines. */ if (CPP_OPTION (pfile, warn_comments) && buffer->cur[0] == '*' && buffer->cur[1] != '/') ! cpp_error_with_line (pfile, DL_WARNING, ! pfile->line, CPP_BUF_COL (buffer), ! "\"/*\" within comment"); } else if (is_vspace (c)) handle_newline (pfile); *************** skip_block_comment (pfile) *** 300,306 **** } /* Skip a C++ line comment, leaving buffer->cur pointing to the ! terminating newline. Handles escaped newlines. Returns non-zero if a multiline comment. */ static int skip_line_comment (pfile) --- 297,303 ---- } /* Skip a C++ line comment, leaving buffer->cur pointing to the ! terminating newline. Handles escaped newlines. Returns nonzero if a multiline comment. */ static int skip_line_comment (pfile) *************** skip_line_comment (pfile) *** 309,322 **** --- 306,344 ---- cpp_buffer *buffer = pfile->buffer; unsigned int orig_line = pfile->line; cppchar_t c; + #ifdef MULTIBYTE_CHARS + wchar_t wc; + int char_len; + #endif pfile->state.lexing_comment = 1; + #ifdef MULTIBYTE_CHARS + /* Reset multibyte conversion state. */ + (void) local_mbtowc (NULL, NULL, 0); + #endif do { if (buffer->cur == buffer->rlimit) goto at_eof; + #ifdef MULTIBYTE_CHARS + char_len = local_mbtowc (&wc, (const char *) buffer->cur, + buffer->rlimit - buffer->cur); + if (char_len == -1) + { + cpp_error (pfile, DL_WARNING, + "ignoring invalid multibyte character"); + char_len = 1; + c = *buffer->cur++; + } + else + { + buffer->cur += char_len; + c = wc; + } + #else c = *buffer->cur++; + #endif if (c == '?' || c == '\\') c = skip_escaped_newlines (pfile); } *************** skip_whitespace (pfile, c) *** 370,384 **** return 0; if (!warned) { ! cpp_warning (pfile, "null character(s) ignored"); warned = 1; } } else if (pfile->state.in_directive && CPP_PEDANTIC (pfile)) ! cpp_pedwarn_with_line (pfile, pfile->line, ! CPP_BUF_COL (buffer), ! "%s in preprocessing directive", ! c == '\f' ? "form feed" : "vertical tab"); c = *buffer->cur++; } --- 392,406 ---- return 0; if (!warned) { ! cpp_error (pfile, DL_WARNING, "null character(s) ignored"); warned = 1; } } else if (pfile->state.in_directive && CPP_PEDANTIC (pfile)) ! cpp_error_with_line (pfile, DL_PEDWARN, pfile->line, ! CPP_BUF_COL (buffer), ! "%s in preprocessing directive", ! c == '\f' ? "form feed" : "vertical tab"); c = *buffer->cur++; } *************** name_p (pfile, string) *** 402,408 **** if (!is_idchar (string->text[i])) return 0; ! return 1; } /* Parse an identifier, skipping embedded backslash-newlines. This is --- 424,430 ---- if (!is_idchar (string->text[i])) return 0; ! return 1; } /* Parse an identifier, skipping embedded backslash-newlines. This is *************** name_p (pfile, string) *** 412,424 **** seen:unseen identifiers in normal code; the distribution is Poisson-like). Second most common case is a new identifier, not split and no dollar sign. The other possibilities are rare and ! have been relegated to parse_identifier_slow. */ static cpp_hashnode * parse_identifier (pfile) cpp_reader *pfile; { cpp_hashnode *result; ! const U_CHAR *cur; /* Fast-path loop. Skim over a normal identifier. N.B. ISIDNUM does not include $. */ --- 434,446 ---- seen:unseen identifiers in normal code; the distribution is Poisson-like). Second most common case is a new identifier, not split and no dollar sign. The other possibilities are rare and ! have been relegated to parse_slow. */ static cpp_hashnode * parse_identifier (pfile) cpp_reader *pfile; { cpp_hashnode *result; ! const uchar *cur, *base; /* Fast-path loop. Skim over a normal identifier. N.B. ISIDNUM does not include $. */ *************** parse_identifier (pfile) *** 428,440 **** /* Check for slow-path cases. */ if (*cur == '?' || *cur == '\\' || *cur == '$') ! result = parse_identifier_slow (pfile, cur); else { ! const U_CHAR *base = pfile->buffer->cur - 1; result = (cpp_hashnode *) ht_lookup (pfile->hash_table, base, cur - base, HT_ALLOC); - pfile->buffer->cur = cur; } /* Rarely, identifiers require diagnostics when lexed. --- 450,468 ---- /* Check for slow-path cases. */ if (*cur == '?' || *cur == '\\' || *cur == '$') ! { ! unsigned int len; ! ! base = parse_slow (pfile, cur, 0, &len); ! result = (cpp_hashnode *) ! ht_lookup (pfile->hash_table, base, len, HT_ALLOCED); ! } else { ! base = pfile->buffer->cur - 1; ! pfile->buffer->cur = cur; result = (cpp_hashnode *) ht_lookup (pfile->hash_table, base, cur - base, HT_ALLOC); } /* Rarely, identifiers require diagnostics when lexed. *************** parse_identifier (pfile) *** 444,502 **** { /* It is allowed to poison the same identifier twice. */ if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok) ! cpp_error (pfile, "attempt to use poisoned \"%s\"", NODE_NAME (result)); /* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the replacement list of a variadic macro. */ if (result == pfile->spec_nodes.n__VA_ARGS__ && !pfile->state.va_args_ok) ! cpp_pedwarn (pfile, "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro"); } return result; } ! /* Slow path. This handles identifiers which have been split, and ! identifiers which contain dollar signs. The part of the identifier ! from PFILE->buffer->cur-1 to CUR has already been scanned. */ ! static cpp_hashnode * ! parse_identifier_slow (pfile, cur) cpp_reader *pfile; ! const U_CHAR *cur; { cpp_buffer *buffer = pfile->buffer; ! const U_CHAR *base = buffer->cur - 1; struct obstack *stack = &pfile->hash_table->stack; ! unsigned int c, saw_dollar = 0, len; /* Copy the part of the token which is known to be okay. */ obstack_grow (stack, base, cur - base); /* Now process the part which isn't. We are looking at one of '$', '\\', or '?' on entry to this loop. */ c = *cur++; buffer->cur = cur; ! do { ! while (is_idchar (c)) ! { ! obstack_1grow (stack, c); ! if (c == '$') ! saw_dollar++; ! c = *buffer->cur++; ! } ! /* Potential escaped newline? */ ! buffer->backup_to = buffer->cur - 1; ! if (c != '?' && c != '\\') ! break; ! c = skip_escaped_newlines (pfile); } - while (is_idchar (c)); /* Step back over the unwanted char. */ BACKUP (); --- 472,549 ---- { /* It is allowed to poison the same identifier twice. */ if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok) ! cpp_error (pfile, DL_ERROR, "attempt to use poisoned \"%s\"", NODE_NAME (result)); /* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the replacement list of a variadic macro. */ if (result == pfile->spec_nodes.n__VA_ARGS__ && !pfile->state.va_args_ok) ! cpp_error (pfile, DL_PEDWARN, "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro"); } return result; } ! /* Slow path. This handles numbers and identifiers which have been ! split, or contain dollar signs. The part of the token from ! PFILE->buffer->cur-1 to CUR has already been scanned. NUMBER_P is ! 1 if it's a number, and 2 if it has a leading period. Returns a ! pointer to the token's NUL-terminated spelling in permanent ! storage, and sets PLEN to its length. */ ! static uchar * ! parse_slow (pfile, cur, number_p, plen) cpp_reader *pfile; ! const uchar *cur; ! int number_p; ! unsigned int *plen; { cpp_buffer *buffer = pfile->buffer; ! const uchar *base = buffer->cur - 1; struct obstack *stack = &pfile->hash_table->stack; ! unsigned int c, prevc, saw_dollar = 0; ! ! /* Place any leading period. */ ! if (number_p == 2) ! obstack_1grow (stack, '.'); /* Copy the part of the token which is known to be okay. */ obstack_grow (stack, base, cur - base); /* Now process the part which isn't. We are looking at one of '$', '\\', or '?' on entry to this loop. */ + prevc = cur[-1]; c = *cur++; buffer->cur = cur; ! for (;;) { ! /* Potential escaped newline? */ ! buffer->backup_to = buffer->cur - 1; ! if (c == '?' || c == '\\') ! c = skip_escaped_newlines (pfile); ! if (!is_idchar (c)) ! { ! if (!number_p) ! break; ! if (c != '.' && !VALID_SIGN (c, prevc)) ! break; ! } ! /* Handle normal identifier characters in this loop. */ ! do ! { ! prevc = c; ! obstack_1grow (stack, c); ! if (c == '$') ! saw_dollar++; ! ! c = *buffer->cur++; ! } ! while (is_idchar (c)); } /* Step back over the unwanted char. */ BACKUP (); *************** parse_identifier_slow (pfile, cur) *** 505,598 **** accepted as an extension. Don't warn about it in skipped conditional blocks. */ if (saw_dollar && CPP_PEDANTIC (pfile) && ! pfile->state.skipping) ! cpp_pedwarn (pfile, "'$' character(s) in identifier"); ! /* Identifiers are null-terminated. */ ! len = obstack_object_size (stack); obstack_1grow (stack, '\0'); ! ! return (cpp_hashnode *) ! ht_lookup (pfile->hash_table, obstack_finish (stack), len, HT_ALLOCED); } /* Parse a number, beginning with character C, skipping embedded ! backslash-newlines. LEADING_PERIOD is non-zero if there was a "." before C. Place the result in NUMBER. */ static void ! parse_number (pfile, number, c, leading_period) cpp_reader *pfile; cpp_string *number; - cppchar_t c; int leading_period; { ! cpp_buffer *buffer = pfile->buffer; ! unsigned char *dest, *limit; ! dest = BUFF_FRONT (pfile->u_buff); ! limit = BUFF_LIMIT (pfile->u_buff); ! /* Place a leading period. */ ! if (leading_period) ! { ! if (dest == limit) ! { ! _cpp_extend_buff (pfile, &pfile->u_buff, 1); ! dest = BUFF_FRONT (pfile->u_buff); ! limit = BUFF_LIMIT (pfile->u_buff); ! } ! *dest++ = '.'; ! } ! ! do { ! do ! { ! /* Need room for terminating null. */ ! if ((size_t) (limit - dest) < 2) ! { ! size_t len_so_far = dest - BUFF_FRONT (pfile->u_buff); ! _cpp_extend_buff (pfile, &pfile->u_buff, 2); ! dest = BUFF_FRONT (pfile->u_buff) + len_so_far; ! limit = BUFF_LIMIT (pfile->u_buff); ! } ! *dest++ = c; ! ! c = *buffer->cur++; ! } ! while (is_numchar (c) || c == '.' || VALID_SIGN (c, dest[-1])); ! ! /* Potential escaped newline? */ ! buffer->backup_to = buffer->cur - 1; ! if (c != '?' && c != '\\') ! break; ! c = skip_escaped_newlines (pfile); ! } ! while (is_numchar (c) || c == '.' || VALID_SIGN (c, dest[-1])); ! ! /* Step back over the unwanted char. */ ! BACKUP (); ! ! /* Null-terminate the number. */ ! *dest = '\0'; ! ! number->text = BUFF_FRONT (pfile->u_buff); ! number->len = dest - number->text; ! BUFF_FRONT (pfile->u_buff) = dest + 1; ! } ! /* Subroutine of parse_string. Emits error for unterminated strings. */ ! static void ! unterminated (pfile, term) ! cpp_reader *pfile; ! int term; ! { ! cpp_error (pfile, "missing terminating %c character", term); ! if (term == '\"' && pfile->mls_line && pfile->mls_line != pfile->line) ! { ! cpp_error_with_line (pfile, pfile->mls_line, pfile->mls_col, ! "possible start of unterminated string literal"); ! pfile->mls_line = 0; } } --- 552,599 ---- accepted as an extension. Don't warn about it in skipped conditional blocks. */ if (saw_dollar && CPP_PEDANTIC (pfile) && ! pfile->state.skipping) ! cpp_error (pfile, DL_PEDWARN, "'$' character(s) in identifier or number"); ! /* Identifiers and numbers are null-terminated. */ ! *plen = obstack_object_size (stack); obstack_1grow (stack, '\0'); ! return obstack_finish (stack); } /* Parse a number, beginning with character C, skipping embedded ! backslash-newlines. LEADING_PERIOD is nonzero if there was a "." before C. Place the result in NUMBER. */ static void ! parse_number (pfile, number, leading_period) cpp_reader *pfile; cpp_string *number; int leading_period; { ! const uchar *cur; ! /* Fast-path loop. Skim over a normal number. ! N.B. ISIDNUM does not include $. */ ! cur = pfile->buffer->cur; ! while (ISIDNUM (*cur) || *cur == '.' || VALID_SIGN (*cur, cur[-1])) ! cur++; ! /* Check for slow-path cases. */ ! if (*cur == '?' || *cur == '\\' || *cur == '$') ! number->text = parse_slow (pfile, cur, 1 + leading_period, &number->len); ! else { ! const uchar *base = pfile->buffer->cur - 1; ! uchar *dest; ! number->len = cur - base + leading_period; ! dest = _cpp_unaligned_alloc (pfile, number->len + 1); ! dest[number->len] = '\0'; ! number->text = dest; ! if (leading_period) ! *dest++ = '.'; ! memcpy (dest, base, cur - base); ! pfile->buffer->cur = cur; } } *************** unescaped_terminator_p (pfile, dest) *** 622,628 **** name. Handles embedded trigraphs and escaped newlines. The stored string is guaranteed NUL-terminated, but it is not guaranteed that this is the first NUL since embedded NULs are preserved. - Multi-line strings are allowed, but they are deprecated. When this function returns, buffer->cur points to the next character to be processed. */ --- 623,628 ---- *************** parse_string (pfile, token, terminator) *** 635,645 **** cpp_buffer *buffer = pfile->buffer; unsigned char *dest, *limit; cppchar_t c; ! bool warned_nulls = false, warned_multi = false; dest = BUFF_FRONT (pfile->u_buff); limit = BUFF_LIMIT (pfile->u_buff); for (;;) { /* We need room for another char, possibly the terminating NUL. */ --- 635,653 ---- cpp_buffer *buffer = pfile->buffer; unsigned char *dest, *limit; cppchar_t c; ! bool warned_nulls = false; ! #ifdef MULTIBYTE_CHARS ! wchar_t wc; ! int char_len; ! #endif dest = BUFF_FRONT (pfile->u_buff); limit = BUFF_LIMIT (pfile->u_buff); + #ifdef MULTIBYTE_CHARS + /* Reset multibyte conversion state. */ + (void) local_mbtowc (NULL, NULL, 0); + #endif for (;;) { /* We need room for another char, possibly the terminating NUL. */ *************** parse_string (pfile, token, terminator) *** 651,658 **** limit = BUFF_LIMIT (pfile->u_buff); } ! /* Handle trigraphs, escaped newlines etc. */ c = *buffer->cur++; if (c == '?' || c == '\\') c = skip_escaped_newlines (pfile); --- 659,684 ---- limit = BUFF_LIMIT (pfile->u_buff); } ! #ifdef MULTIBYTE_CHARS ! char_len = local_mbtowc (&wc, (const char *) buffer->cur, ! buffer->rlimit - buffer->cur); ! if (char_len == -1) ! { ! cpp_error (pfile, DL_WARNING, ! "ignoring invalid multibyte character"); ! char_len = 1; ! c = *buffer->cur++; ! } ! else ! { ! buffer->cur += char_len; ! c = wc; ! } ! #else c = *buffer->cur++; + #endif + + /* Handle trigraphs, escaped newlines etc. */ if (c == '?' || c == '\\') c = skip_escaped_newlines (pfile); *************** parse_string (pfile, token, terminator) *** 663,719 **** } else if (is_vspace (c)) { ! /* In assembly language, silently terminate string and ! character literals at end of line. This is a kludge ! around not knowing where comments are. */ ! if (CPP_OPTION (pfile, lang) == CLK_ASM && terminator != '>') ! { ! buffer->cur--; ! break; ! } ! ! /* Character constants and header names may not extend over ! multiple lines. In Standard C, neither may strings. ! Unfortunately, we accept multiline strings as an ! extension, except in #include family directives. */ ! if (terminator != '"' || pfile->state.angled_headers) ! { ! unterminated (pfile, terminator); ! buffer->cur--; ! break; ! } ! ! if (!warned_multi) ! { ! warned_multi = true; ! cpp_pedwarn (pfile, "multi-line string literals are deprecated"); ! } ! ! if (pfile->mls_line == 0) ! { ! pfile->mls_line = token->line; ! pfile->mls_col = token->col; ! } ! ! handle_newline (pfile); ! c = '\n'; } else if (c == '\0') { if (buffer->cur - 1 == buffer->rlimit) ! { ! unterminated (pfile, terminator); ! buffer->cur--; ! break; ! } if (!warned_nulls) { warned_nulls = true; ! cpp_warning (pfile, "null character(s) preserved in literal"); } } ! ! *dest++ = c; } *dest = '\0'; --- 689,725 ---- } else if (is_vspace (c)) { ! /* No string literal may extend over multiple lines. In ! assembly language, suppress the error except for <> ! includes. This is a kludge around not knowing where ! comments are. */ ! unterminated: ! if (CPP_OPTION (pfile, lang) != CLK_ASM || terminator == '>') ! cpp_error (pfile, DL_ERROR, "missing terminating %c character", ! (int) terminator); ! buffer->cur--; ! break; } else if (c == '\0') { if (buffer->cur - 1 == buffer->rlimit) ! goto unterminated; if (!warned_nulls) { warned_nulls = true; ! cpp_error (pfile, DL_WARNING, ! "null character(s) preserved in literal"); } } ! #ifdef MULTIBYTE_CHARS ! if (char_len > 1) ! { ! for ( ; char_len > 0; --char_len) ! *dest++ = (*buffer->cur - char_len); ! } ! else ! #endif ! *dest++ = c; } *dest = '\0'; *************** parse_string (pfile, token, terminator) *** 725,752 **** /* The stored comment includes the comment start and any terminator. */ static void ! save_comment (pfile, token, from) cpp_reader *pfile; cpp_token *token; const unsigned char *from; { unsigned char *buffer; ! unsigned int len; ! len = pfile->buffer->cur - from + 1; /* + 1 for the initial '/'. */ /* C++ comments probably (not definitely) have moved past a new line, which we don't want to save in the comment. */ if (is_vspace (pfile->buffer->cur[-1])) len--; ! buffer = _cpp_unaligned_alloc (pfile, len); ! token->type = CPP_COMMENT; ! token->val.str.len = len; token->val.str.text = buffer; buffer[0] = '/'; memcpy (buffer + 1, from, len - 1); } /* Allocate COUNT tokens for RUN. */ --- 731,776 ---- /* The stored comment includes the comment start and any terminator. */ static void ! save_comment (pfile, token, from, type) cpp_reader *pfile; cpp_token *token; const unsigned char *from; + cppchar_t type; { unsigned char *buffer; ! unsigned int len, clen; ! len = pfile->buffer->cur - from + 1; /* + 1 for the initial '/'. */ /* C++ comments probably (not definitely) have moved past a new line, which we don't want to save in the comment. */ if (is_vspace (pfile->buffer->cur[-1])) len--; ! ! /* If we are currently in a directive, then we need to store all ! C++ comments as C comments internally, and so we need to ! allocate a little extra space in that case. ! ! Note that the only time we encounter a directive here is ! when we are saving comments in a "#define". */ ! clen = (pfile->state.in_directive && type == '/') ? len + 2 : len; ! ! buffer = _cpp_unaligned_alloc (pfile, clen); ! token->type = CPP_COMMENT; ! token->val.str.len = clen; token->val.str.text = buffer; buffer[0] = '/'; memcpy (buffer + 1, from, len - 1); + + /* Finish conversion to a C comment, if necessary. */ + if (pfile->state.in_directive && type == '/') + { + buffer[1] = '*'; + buffer[clen - 2] = '*'; + buffer[clen - 1] = '/'; + } } /* Allocate COUNT tokens for RUN. */ *************** _cpp_lex_token (pfile) *** 828,834 **** /* Is this a directive. If _cpp_handle_directive returns false, it is an assembler #. */ if (result->type == CPP_HASH ! && !pfile->state.parsing_args && _cpp_handle_directive (pfile, result->flags & PREV_WHITE)) continue; if (pfile->cb.line_change && !pfile->state.skipping) --- 852,861 ---- /* Is this a directive. If _cpp_handle_directive returns false, it is an assembler #. */ if (result->type == CPP_HASH ! /* 6.10.3 p 11: Directives in a list of macro arguments ! gives undefined behavior. This implementation ! handles the directive as normal. */ ! && pfile->state.parsing_args != 1 && _cpp_handle_directive (pfile, result->flags & PREV_WHITE)) continue; if (pfile->cb.line_change && !pfile->state.skipping) *************** _cpp_lex_token (pfile) *** 851,856 **** --- 878,934 ---- return result; } + /* A NUL terminates the current buffer. For ISO preprocessing this is + EOF, but for traditional preprocessing it indicates we need a line + refill. Returns TRUE to continue preprocessing a new buffer, FALSE + to return a CPP_EOF to the caller. */ + static bool + continue_after_nul (pfile) + cpp_reader *pfile; + { + cpp_buffer *buffer = pfile->buffer; + bool more = false; + + buffer->saved_flags = BOL; + if (CPP_OPTION (pfile, traditional)) + { + if (pfile->state.in_directive) + return false; + + _cpp_remove_overlay (pfile); + more = _cpp_read_logical_line_trad (pfile); + _cpp_overlay_buffer (pfile, pfile->out.base, + pfile->out.cur - pfile->out.base); + pfile->line = pfile->out.first_line; + } + else + { + /* Stop parsing arguments with a CPP_EOF. When we finally come + back here, do the work of popping the buffer. */ + if (!pfile->state.parsing_args) + { + if (buffer->cur != buffer->line_base) + { + /* Non-empty files should end in a newline. Don't warn + for command line and _Pragma buffers. */ + if (!buffer->from_stage3) + cpp_error (pfile, DL_PEDWARN, "no newline at end of file"); + handle_newline (pfile); + } + + /* Similarly, finish an in-progress directive with CPP_EOF + before popping the buffer. */ + if (!pfile->state.in_directive && buffer->prev) + { + more = !buffer->return_at_eof; + _cpp_pop_buffer (pfile); + } + } + } + + return more; + } + #define IF_NEXT_IS(CHAR, THEN_TYPE, ELSE_TYPE) \ do { \ if (get_effective_char (pfile) == CHAR) \ *************** _cpp_lex_direct (pfile) *** 901,930 **** if (skip_whitespace (pfile, c)) goto skipped_white; ! /* EOF. */ buffer->cur--; ! buffer->saved_flags = BOL; ! if (!pfile->state.parsing_args && !pfile->state.in_directive) ! { ! if (buffer->cur != buffer->line_base) ! { ! /* Non-empty files should end in a newline. Don't warn ! for command line and _Pragma buffers. */ ! if (!buffer->from_stage3) ! cpp_pedwarn (pfile, "no newline at end of file"); ! handle_newline (pfile); ! } ! ! /* Don't pop the last buffer. */ ! if (buffer->prev) ! { ! unsigned char stop = buffer->return_at_eof; ! ! _cpp_pop_buffer (pfile); ! if (!stop) ! goto fresh_line; ! } ! } result->type = CPP_EOF; break; --- 979,988 ---- if (skip_whitespace (pfile, c)) goto skipped_white; ! /* End of buffer. */ buffer->cur--; ! if (continue_after_nul (pfile)) ! goto fresh_line; result->type = CPP_EOF; break; *************** _cpp_lex_direct (pfile) *** 975,998 **** case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result->type = CPP_NUMBER; ! parse_number (pfile, &result->val.str, c, 0); break; case 'L': /* 'L' may introduce wide characters or strings. */ ! { ! const unsigned char *pos = buffer->cur; ! c = get_effective_char (pfile); ! if (c == '\'' || c == '"') ! { ! result->type = (c == '"' ? CPP_WSTRING: CPP_WCHAR); ! parse_string (pfile, result, c); ! break; ! } ! buffer->cur = pos; ! } ! /* Fall through. */ start_ident: case '_': --- 1033,1056 ---- case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result->type = CPP_NUMBER; ! parse_number (pfile, &result->val.str, 0); break; case 'L': /* 'L' may introduce wide characters or strings. */ ! { ! const unsigned char *pos = buffer->cur; ! c = get_effective_char (pfile); ! if (c == '\'' || c == '"') ! { ! result->type = (c == '"' ? CPP_WSTRING: CPP_WCHAR); ! parse_string (pfile, result, c); ! break; ! } ! buffer->cur = pos; ! } ! /* Fall through. */ start_ident: case '_': *************** _cpp_lex_direct (pfile) *** 1031,1037 **** if (c == '*') { if (skip_block_comment (pfile)) ! cpp_error (pfile, "unterminated comment"); } else if (c == '/' && (CPP_OPTION (pfile, cplusplus_comments) || CPP_IN_SYSTEM_HEADER (pfile))) --- 1089,1095 ---- if (c == '*') { if (skip_block_comment (pfile)) ! cpp_error (pfile, DL_ERROR, "unterminated comment"); } else if (c == '/' && (CPP_OPTION (pfile, cplusplus_comments) || CPP_IN_SYSTEM_HEADER (pfile))) *************** _cpp_lex_direct (pfile) *** 1041,1055 **** if (CPP_OPTION (pfile, lang) == CLK_GNUC89 && CPP_PEDANTIC (pfile) && ! buffer->warned_cplusplus_comments) { ! cpp_pedwarn (pfile, ! "C++ style comments are not allowed in ISO C89"); ! cpp_pedwarn (pfile, ! "(this will be reported only once per input file)"); buffer->warned_cplusplus_comments = 1; } if (skip_line_comment (pfile) && CPP_OPTION (pfile, warn_comments)) ! cpp_warning (pfile, "multi-line comment"); } else if (c == '=') { --- 1099,1113 ---- if (CPP_OPTION (pfile, lang) == CLK_GNUC89 && CPP_PEDANTIC (pfile) && ! buffer->warned_cplusplus_comments) { ! cpp_error (pfile, DL_PEDWARN, ! "C++ style comments are not allowed in ISO C90"); ! cpp_error (pfile, DL_PEDWARN, ! "(this will be reported only once per input file)"); buffer->warned_cplusplus_comments = 1; } if (skip_line_comment (pfile) && CPP_OPTION (pfile, warn_comments)) ! cpp_error (pfile, DL_WARNING, "multi-line comment"); } else if (c == '=') { *************** _cpp_lex_direct (pfile) *** 1070,1076 **** } /* Save the comment as a token in its own right. */ ! save_comment (pfile, result, comment_start); break; case '<': --- 1128,1134 ---- } /* Save the comment as a token in its own right. */ ! save_comment (pfile, result, comment_start, c); break; case '<': *************** _cpp_lex_direct (pfile) *** 1168,1174 **** else if (ISDIGIT (c)) { result->type = CPP_NUMBER; ! parse_number (pfile, &result->val.str, c, 1); } else if (c == '*' && CPP_OPTION (pfile, cplusplus)) result->type = CPP_DOT_STAR; --- 1226,1232 ---- else if (ISDIGIT (c)) { result->type = CPP_NUMBER; ! parse_number (pfile, &result->val.str, 1); } else if (c == '*' && CPP_OPTION (pfile, cplusplus)) result->type = CPP_DOT_STAR; *************** _cpp_lex_direct (pfile) *** 1225,1231 **** result->type = CPP_AND; } break; ! case '|': c = get_effective_char (pfile); if (c == '|') --- 1283,1289 ---- result->type = CPP_AND; } break; ! case '|': c = get_effective_char (pfile); if (c == '|') *************** _cpp_lex_direct (pfile) *** 1271,1277 **** case '}': result->type = CPP_CLOSE_BRACE; break; case ';': result->type = CPP_SEMICOLON; break; ! /* @ is a punctuator in Objective C. */ case '@': result->type = CPP_ATSIGN; break; case '$': --- 1329,1335 ---- case '}': result->type = CPP_CLOSE_BRACE; break; case ';': result->type = CPP_SEMICOLON; break; ! /* @ is a punctuator in Objective-C. */ case '@': result->type = CPP_ATSIGN; break; case '$': *************** cpp_spell_token (pfile, token, buffer) *** 1332,1338 **** goto spell_ident; else spelling = TOKEN_NAME (token); ! while ((c = *spelling++) != '\0') *buffer++ = c; } --- 1390,1396 ---- goto spell_ident; else spelling = TOKEN_NAME (token); ! while ((c = *spelling++) != '\0') *buffer++ = c; } *************** cpp_spell_token (pfile, token, buffer) *** 1364,1370 **** case CPP_WCHAR: left = '\''; right = '\''; tag = 'L'; break; case CPP_HEADER_NAME: left = '<'; right = '>'; tag = '\0'; break; default: ! cpp_ice (pfile, "unknown string token %s\n", TOKEN_NAME (token)); return buffer; } if (tag) *buffer++ = tag; --- 1422,1429 ---- case CPP_WCHAR: left = '\''; right = '\''; tag = 'L'; break; case CPP_HEADER_NAME: left = '<'; right = '>'; tag = '\0'; break; default: ! cpp_error (pfile, DL_ICE, "unknown string token %s\n", ! TOKEN_NAME (token)); return buffer; } if (tag) *buffer++ = tag; *************** cpp_spell_token (pfile, token, buffer) *** 1376,1382 **** break; case SPELL_NONE: ! cpp_ice (pfile, "unspellable token %s", TOKEN_NAME (token)); break; } --- 1435,1441 ---- break; case SPELL_NONE: ! cpp_error (pfile, DL_ICE, "unspellable token %s", TOKEN_NAME (token)); break; } *************** maybe_read_ucs (pfile, pstr, limit, pc) *** 1621,1627 **** cpp_reader *pfile; const unsigned char **pstr; const unsigned char *limit; ! unsigned int *pc; { const unsigned char *p = *pstr; unsigned int code = 0; --- 1680,1686 ---- cpp_reader *pfile; const unsigned char **pstr; const unsigned char *limit; ! cppchar_t *pc; { const unsigned char *p = *pstr; unsigned int code = 0; *************** maybe_read_ucs (pfile, pstr, limit, pc) *** 1632,1644 **** return 1; if (CPP_WTRADITIONAL (pfile)) ! cpp_warning (pfile, "the meaning of '\\%c' varies with -traditional", c); length = (c == 'u' ? 4: 8); if ((size_t) (limit - p) < length) { ! cpp_error (pfile, "incomplete universal-character-name"); /* Skip to the end to avoid more diagnostics. */ p = limit; } --- 1691,1704 ---- return 1; if (CPP_WTRADITIONAL (pfile)) ! cpp_error (pfile, DL_WARNING, ! "the meaning of '\\%c' is different in traditional C", c); length = (c == 'u' ? 4: 8); if ((size_t) (limit - p) < length) { ! cpp_error (pfile, DL_ERROR, "incomplete universal-character-name"); /* Skip to the end to avoid more diagnostics. */ p = limit; } *************** maybe_read_ucs (pfile, pstr, limit, pc) *** 1651,1657 **** code = (code << 4) + hex_digit_value (c); else { ! cpp_error (pfile, "non-hex digit '%c' in universal-character-name", c); /* We shouldn't skip in case there are multibyte chars. */ break; --- 1711,1717 ---- code = (code << 4) + hex_digit_value (c); else { ! cpp_error (pfile, DL_ERROR, "non-hex digit '%c' in universal-character-name", c); /* We shouldn't skip in case there are multibyte chars. */ break; *************** maybe_read_ucs (pfile, pstr, limit, pc) *** 1660,1666 **** } #ifdef TARGET_EBCDIC ! cpp_error (pfile, "universal-character-name on EBCDIC target"); code = 0x3f; /* EBCDIC invalid character */ #else /* True extended characters are OK. */ --- 1720,1726 ---- } #ifdef TARGET_EBCDIC ! cpp_error (pfile, DL_ERROR, "universal-character-name on EBCDIC target"); code = 0x3f; /* EBCDIC invalid character */ #else /* True extended characters are OK. */ *************** maybe_read_ucs (pfile, pstr, limit, pc) *** 1674,1680 **** ; /* Don't give another error if one occurred above. */ else if (length == 0) ! cpp_error (pfile, "universal-character-name out of range"); #endif *pstr = p; --- 1734,1740 ---- ; /* Don't give another error if one occurred above. */ else if (length == 0) ! cpp_error (pfile, DL_ERROR, "universal-character-name out of range"); #endif *pstr = p; *************** maybe_read_ucs (pfile, pstr, limit, pc) *** 1682,1706 **** return 0; } ! /* Interpret an escape sequence, and return its value. PSTR points to ! the input pointer, which is just after the backslash. LIMIT is how ! much text we have. MASK is a bitmask for the precision for the ! destination type (char or wchar_t). TRADITIONAL, if true, does not ! interpret escapes that did not exist in traditional C. ! ! Handles all relevant diagnostics. */ ! unsigned int ! cpp_parse_escape (pfile, pstr, limit, mask, traditional) cpp_reader *pfile; const unsigned char **pstr; const unsigned char *limit; ! unsigned HOST_WIDE_INT mask; ! int traditional; { int unknown = 0; const unsigned char *str = *pstr; ! unsigned int c = *str++; switch (c) { case '\\': case '\'': case '"': case '?': break; --- 1742,1774 ---- return 0; } ! /* Returns the value of an escape sequence, truncated to the correct ! target precision. PSTR points to the input pointer, which is just ! after the backslash. LIMIT is how much text we have. WIDE is true ! if the escape sequence is part of a wide character constant or ! string literal. Handles all relevant diagnostics. */ ! cppchar_t ! cpp_parse_escape (pfile, pstr, limit, wide) cpp_reader *pfile; const unsigned char **pstr; const unsigned char *limit; ! int wide; { int unknown = 0; const unsigned char *str = *pstr; ! cppchar_t c, mask; ! unsigned int width; ! ! if (wide) ! width = CPP_OPTION (pfile, wchar_precision); ! else ! width = CPP_OPTION (pfile, char_precision); ! if (width < BITS_PER_CPPCHAR_T) ! mask = ((cppchar_t) 1 << width) - 1; ! else ! mask = ~0; + c = *str++; switch (c) { case '\\': case '\'': case '"': case '?': break; *************** cpp_parse_escape (pfile, pstr, limit, ma *** 1719,1776 **** case 'a': if (CPP_WTRADITIONAL (pfile)) ! cpp_warning (pfile, "the meaning of '\\a' varies with -traditional"); ! if (!traditional) ! c = TARGET_BELL; break; case 'e': case 'E': if (CPP_PEDANTIC (pfile)) ! cpp_pedwarn (pfile, "non-ISO-standard escape sequence, '\\%c'", c); c = TARGET_ESC; break; ! case 'u': case 'U': unknown = maybe_read_ucs (pfile, &str, limit, &c); break; case 'x': if (CPP_WTRADITIONAL (pfile)) ! cpp_warning (pfile, "the meaning of '\\x' varies with -traditional"); ! if (!traditional) ! { ! unsigned int i = 0, overflow = 0; ! int digits_found = 0; ! while (str < limit) ! { ! c = *str; ! if (! ISXDIGIT (c)) ! break; ! str++; ! overflow |= i ^ (i << 4 >> 4); ! i = (i << 4) + hex_digit_value (c); ! digits_found = 1; ! } ! if (!digits_found) ! cpp_error (pfile, "\\x used with no following hex digits"); ! if (overflow | (i != (i & mask))) ! { ! cpp_pedwarn (pfile, "hex escape sequence out of range"); ! i &= mask; ! } ! c = i; ! } break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': { ! unsigned int i = c - '0'; ! int count = 0; while (str < limit && ++count < 3) { --- 1787,1847 ---- case 'a': if (CPP_WTRADITIONAL (pfile)) ! cpp_error (pfile, DL_WARNING, ! "the meaning of '\\a' is different in traditional C"); ! c = TARGET_BELL; break; case 'e': case 'E': if (CPP_PEDANTIC (pfile)) ! cpp_error (pfile, DL_PEDWARN, ! "non-ISO-standard escape sequence, '\\%c'", (int) c); c = TARGET_ESC; break; ! case 'u': case 'U': unknown = maybe_read_ucs (pfile, &str, limit, &c); break; case 'x': if (CPP_WTRADITIONAL (pfile)) ! cpp_error (pfile, DL_WARNING, ! "the meaning of '\\x' is different in traditional C"); ! { ! cppchar_t i = 0, overflow = 0; ! int digits_found = 0; ! while (str < limit) ! { ! c = *str; ! if (! ISXDIGIT (c)) ! break; ! str++; ! overflow |= i ^ (i << 4 >> 4); ! i = (i << 4) + hex_digit_value (c); ! digits_found = 1; ! } ! if (!digits_found) ! cpp_error (pfile, DL_ERROR, ! "\\x used with no following hex digits"); ! if (overflow | (i != (i & mask))) ! { ! cpp_error (pfile, DL_PEDWARN, ! "hex escape sequence out of range"); ! i &= mask; ! } ! c = i; ! } break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': { ! size_t count = 0; ! cppchar_t i = c - '0'; while (str < limit && ++count < 3) { *************** cpp_parse_escape (pfile, pstr, limit, ma *** 1783,1789 **** if (i != (i & mask)) { ! cpp_pedwarn (pfile, "octal escape sequence out of range"); i &= mask; } c = i; --- 1854,1861 ---- if (i != (i & mask)) { ! cpp_error (pfile, DL_PEDWARN, ! "octal escape sequence out of range"); i &= mask; } c = i; *************** cpp_parse_escape (pfile, pstr, limit, ma *** 1798,1842 **** if (unknown) { if (ISGRAPH (c)) ! cpp_pedwarn (pfile, "unknown escape sequence '\\%c'", c); else ! cpp_pedwarn (pfile, "unknown escape sequence: '\\%03o'", c); } if (c > mask) ! cpp_pedwarn (pfile, "escape sequence out of range for character"); *pstr = str; return c; } - #ifndef MAX_CHAR_TYPE_SIZE - #define MAX_CHAR_TYPE_SIZE CHAR_TYPE_SIZE - #endif - - #ifndef MAX_WCHAR_TYPE_SIZE - #define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE - #endif - /* Interpret a (possibly wide) character constant in TOKEN. ! WARN_MULTI warns about multi-character charconsts, if not ! TRADITIONAL. TRADITIONAL also indicates not to interpret escapes ! that did not exist in traditional C. PCHARS_SEEN points to a ! variable that is filled in with the number of characters seen. */ ! HOST_WIDE_INT ! cpp_interpret_charconst (pfile, token, warn_multi, traditional, pchars_seen) cpp_reader *pfile; const cpp_token *token; - int warn_multi; - int traditional; unsigned int *pchars_seen; { const unsigned char *str = token->val.str.text; const unsigned char *limit = str + token->val.str.len; unsigned int chars_seen = 0; ! unsigned int width, max_chars, c; ! unsigned HOST_WIDE_INT mask; ! HOST_WIDE_INT result = 0; bool unsigned_p; #ifdef MULTIBYTE_CHARS --- 1870,1909 ---- if (unknown) { if (ISGRAPH (c)) ! cpp_error (pfile, DL_PEDWARN, ! "unknown escape sequence '\\%c'", (int) c); else ! cpp_error (pfile, DL_PEDWARN, ! "unknown escape sequence: '\\%03o'", (int) c); } if (c > mask) ! { ! cpp_error (pfile, DL_PEDWARN, "escape sequence out of range for its type"); ! c &= mask; ! } *pstr = str; return c; } /* Interpret a (possibly wide) character constant in TOKEN. ! WARN_MULTI warns about multi-character charconsts. PCHARS_SEEN ! points to a variable that is filled in with the number of ! characters seen, and UNSIGNEDP to a variable that indicates whether ! the result has signed type. */ ! cppchar_t ! cpp_interpret_charconst (pfile, token, pchars_seen, unsignedp) cpp_reader *pfile; const cpp_token *token; unsigned int *pchars_seen; + int *unsignedp; { const unsigned char *str = token->val.str.text; const unsigned char *limit = str + token->val.str.len; unsigned int chars_seen = 0; ! size_t width, max_chars; ! cppchar_t c, mask, result = 0; bool unsigned_p; #ifdef MULTIBYTE_CHARS *************** cpp_interpret_charconst (pfile, token, w *** 1846,1865 **** /* Width in bits. */ if (token->type == CPP_CHAR) { ! width = MAX_CHAR_TYPE_SIZE; ! unsigned_p = CPP_OPTION (pfile, signed_char) == 0; } else { ! width = MAX_WCHAR_TYPE_SIZE; ! unsigned_p = WCHAR_UNSIGNED; } ! if (width < HOST_BITS_PER_WIDE_INT) ! mask = ((unsigned HOST_WIDE_INT) 1 << width) - 1; else mask = ~0; - max_chars = HOST_BITS_PER_WIDE_INT / width; while (str < limit) { --- 1913,1933 ---- /* Width in bits. */ if (token->type == CPP_CHAR) { ! width = CPP_OPTION (pfile, char_precision); ! max_chars = CPP_OPTION (pfile, int_precision) / width; ! unsigned_p = CPP_OPTION (pfile, unsigned_char); } else { ! width = CPP_OPTION (pfile, wchar_precision); ! max_chars = 1; ! unsigned_p = CPP_OPTION (pfile, unsigned_wchar); } ! if (width < BITS_PER_CPPCHAR_T) ! mask = ((cppchar_t) 1 << width) - 1; else mask = ~0; while (str < limit) { *************** cpp_interpret_charconst (pfile, token, w *** 1870,1876 **** char_len = local_mbtowc (&wc, str, limit - str); if (char_len == -1) { ! cpp_warning (pfile, "ignoring invalid multibyte character"); c = *str++; } else --- 1938,1945 ---- char_len = local_mbtowc (&wc, str, limit - str); if (char_len == -1) { ! cpp_error (pfile, DL_WARNING, ! "ignoring invalid multibyte character"); c = *str++; } else *************** cpp_interpret_charconst (pfile, token, w *** 1883,1928 **** #endif if (c == '\\') ! c = cpp_parse_escape (pfile, &str, limit, mask, traditional); #ifdef MAP_CHARACTER if (ISPRINT (c)) c = MAP_CHARACTER (c); #endif ! ! /* Merge character into result; ignore excess chars. */ ! if (++chars_seen <= max_chars) ! { ! if (width < HOST_BITS_PER_WIDE_INT) ! result = (result << width) | (c & mask); ! else ! result = c; ! } } if (chars_seen == 0) ! cpp_error (pfile, "empty character constant"); ! else if (chars_seen > max_chars) { ! chars_seen = max_chars; ! cpp_warning (pfile, "character constant too long"); } - else if (chars_seen > 1 && !traditional && warn_multi) - cpp_warning (pfile, "multi-character character constant"); ! /* If relevant type is signed, sign-extend the constant. */ ! if (chars_seen) { ! unsigned int nbits = chars_seen * width; ! ! mask = (unsigned HOST_WIDE_INT) ~0 >> (HOST_BITS_PER_WIDE_INT - nbits); ! if (unsigned_p || ((result >> (nbits - 1)) & 1) == 0) result &= mask; else result |= ~mask; } *pchars_seen = chars_seen; return result; } --- 1952,2007 ---- #endif if (c == '\\') ! c = cpp_parse_escape (pfile, &str, limit, token->type == CPP_WCHAR); #ifdef MAP_CHARACTER if (ISPRINT (c)) c = MAP_CHARACTER (c); #endif ! ! chars_seen++; ! ! /* Truncate the character, scale the result and merge the two. */ ! c &= mask; ! if (width < BITS_PER_CPPCHAR_T) ! result = (result << width) | c; ! else ! result = c; } if (chars_seen == 0) ! cpp_error (pfile, DL_ERROR, "empty character constant"); ! else if (chars_seen > 1) { ! /* Multichar charconsts are of type int and therefore signed. */ ! unsigned_p = 0; ! ! if (chars_seen > max_chars) ! { ! chars_seen = max_chars; ! cpp_error (pfile, DL_WARNING, ! "character constant too long for its type"); ! } ! else if (CPP_OPTION (pfile, warn_multichar)) ! cpp_error (pfile, DL_WARNING, "multi-character character constant"); } ! /* Sign-extend or truncate the constant to cppchar_t. The value is ! in WIDTH bits, but for multi-char charconsts it's value is the ! full target type's width. */ ! if (chars_seen > 1) ! width *= max_chars; ! if (width < BITS_PER_CPPCHAR_T) { ! mask = ((cppchar_t) 1 << width) - 1; ! if (unsigned_p || !(result & (1 << (width - 1)))) result &= mask; else result |= ~mask; } *pchars_seen = chars_seen; + *unsignedp = unsigned_p; return result; } *************** cpp_interpret_charconst (pfile, token, w *** 1941,1959 **** #error BUFF_SIZE_UPPER_BOUND must be at least as large as MIN_BUFF_SIZE! #endif - struct dummy - { - char c; - union - { - double d; - int *p; - } u; - }; - - #define DEFAULT_ALIGNMENT (offsetof (struct dummy, u)) - #define CPP_ALIGN(size, align) (((size) + ((align) - 1)) & ~((align) - 1)) - /* Create a new allocation buffer. Place the control block at the end of the buffer, so that buffer overflows will cause immediate chaos. */ static _cpp_buff * --- 2020,2025 ---- *************** new_buff (len) *** 1965,1971 **** if (len < MIN_BUFF_SIZE) len = MIN_BUFF_SIZE; ! len = CPP_ALIGN (len, DEFAULT_ALIGNMENT); base = xmalloc (len + sizeof (_cpp_buff)); result = (_cpp_buff *) (base + len); --- 2031,2037 ---- if (len < MIN_BUFF_SIZE) len = MIN_BUFF_SIZE; ! len = CPP_ALIGN (len); base = xmalloc (len + sizeof (_cpp_buff)); result = (_cpp_buff *) (base + len); diff -Nrc3pad gcc-3.2.3/gcc/cpplib.c gcc-3.3/gcc/cpplib.c *** gcc-3.2.3/gcc/cpplib.c 2002-11-26 20:40:43.000000000 +0000 --- gcc-3.3/gcc/cpplib.c 2003-02-21 18:14:10.000000000 +0000 *************** struct pragma_entry *** 70,80 **** conditional; IF_COND an opening conditional. INCL means to treat "..." and <...> as q-char and h-char sequences respectively. IN_I means this directive should be handled even if -fpreprocessed is in ! effect (these are the directives with callback hooks). */ #define COND (1 << 0) #define IF_COND (1 << 1) #define INCL (1 << 2) #define IN_I (1 << 3) /* Defines one #-directive, including how to handle it. */ typedef void (*directive_handler) PARAMS ((cpp_reader *)); --- 70,83 ---- conditional; IF_COND an opening conditional. INCL means to treat "..." and <...> as q-char and h-char sequences respectively. IN_I means this directive should be handled even if -fpreprocessed is in ! effect (these are the directives with callback hooks). ! ! EXPAND is set on directives that are always macro-expanded. */ #define COND (1 << 0) #define IF_COND (1 << 1) #define INCL (1 << 2) #define IN_I (1 << 3) + #define EXPAND (1 << 4) /* Defines one #-directive, including how to handle it. */ typedef void (*directive_handler) PARAMS ((cpp_reader *)); *************** typedef struct directive directive; *** 82,88 **** struct directive { directive_handler handler; /* Function to handle directive. */ ! const U_CHAR *name; /* Name of directive. */ unsigned short length; /* Length of name. */ unsigned char origin; /* Origin of directive. */ unsigned char flags; /* Flags describing this directive. */ --- 85,91 ---- struct directive { directive_handler handler; /* Function to handle directive. */ ! const uchar *name; /* Name of directive. */ unsigned short length; /* Length of name. */ unsigned char origin; /* Origin of directive. */ unsigned char flags; /* Flags describing this directive. */ *************** struct directive *** 93,98 **** --- 96,102 ---- static void skip_rest_of_line PARAMS ((cpp_reader *)); static void check_eol PARAMS ((cpp_reader *)); static void start_directive PARAMS ((cpp_reader *)); + static void prepare_directive_trad PARAMS ((cpp_reader *)); static void end_directive PARAMS ((cpp_reader *, int)); static void directive_diagnostics PARAMS ((cpp_reader *, const directive *, int)); *************** static const cpp_token *parse_include PA *** 103,113 **** static void push_conditional PARAMS ((cpp_reader *, int, int, const cpp_hashnode *)); static unsigned int read_flag PARAMS ((cpp_reader *, unsigned int)); ! static U_CHAR *dequote_string PARAMS ((cpp_reader *, const U_CHAR *, unsigned int)); ! static int strtoul_for_line PARAMS ((const U_CHAR *, unsigned int, unsigned long *)); ! static void do_diagnostic PARAMS ((cpp_reader *, enum error_type, int)); static cpp_hashnode *lex_macro_node PARAMS ((cpp_reader *)); static void do_include_common PARAMS ((cpp_reader *, enum include_type)); static struct pragma_entry *lookup_pragma_entry --- 107,117 ---- static void push_conditional PARAMS ((cpp_reader *, int, int, const cpp_hashnode *)); static unsigned int read_flag PARAMS ((cpp_reader *, unsigned int)); ! static uchar *dequote_string PARAMS ((cpp_reader *, const uchar *, unsigned int)); ! static int strtoul_for_line PARAMS ((const uchar *, unsigned int, unsigned long *)); ! static void do_diagnostic PARAMS ((cpp_reader *, int, int)); static cpp_hashnode *lex_macro_node PARAMS ((cpp_reader *)); static void do_include_common PARAMS ((cpp_reader *, enum include_type)); static struct pragma_entry *lookup_pragma_entry *************** static void handle_assertion PARAMS ((cp *** 141,171 **** #define DIRECTIVE_TABLE \ D(define, T_DEFINE = 0, KANDR, IN_I) /* 270554 */ \ ! D(include, T_INCLUDE, KANDR, INCL) /* 52262 */ \ D(endif, T_ENDIF, KANDR, COND) /* 45855 */ \ D(ifdef, T_IFDEF, KANDR, COND | IF_COND) /* 22000 */ \ ! D(if, T_IF, KANDR, COND | IF_COND) /* 18162 */ \ D(else, T_ELSE, KANDR, COND) /* 9863 */ \ D(ifndef, T_IFNDEF, KANDR, COND | IF_COND) /* 9675 */ \ D(undef, T_UNDEF, KANDR, IN_I) /* 4837 */ \ ! D(line, T_LINE, KANDR, 0) /* 2465 */ \ ! D(elif, T_ELIF, STDC89, COND) /* 610 */ \ D(error, T_ERROR, STDC89, 0) /* 475 */ \ D(pragma, T_PRAGMA, STDC89, IN_I) /* 195 */ \ D(warning, T_WARNING, EXTENSION, 0) /* 22 */ \ ! D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL) /* 19 */ \ D(ident, T_IDENT, EXTENSION, IN_I) /* 11 */ \ ! D(import, T_IMPORT, EXTENSION, INCL) /* 0 ObjC */ \ D(assert, T_ASSERT, EXTENSION, 0) /* 0 SVR4 */ \ D(unassert, T_UNASSERT, EXTENSION, 0) /* 0 SVR4 */ \ ! SCCS_ENTRY /* 0 SVR4? */ ! ! /* #sccs is not always recognized. */ ! #ifdef SCCS_DIRECTIVE ! # define SCCS_ENTRY D(sccs, T_SCCS, EXTENSION, 0) ! #else ! # define SCCS_ENTRY /* nothing */ ! #endif /* Use the table to generate a series of prototypes, an enum for the directive names, and an array of directive handlers. */ --- 145,168 ---- #define DIRECTIVE_TABLE \ D(define, T_DEFINE = 0, KANDR, IN_I) /* 270554 */ \ ! D(include, T_INCLUDE, KANDR, INCL | EXPAND) /* 52262 */ \ D(endif, T_ENDIF, KANDR, COND) /* 45855 */ \ D(ifdef, T_IFDEF, KANDR, COND | IF_COND) /* 22000 */ \ ! D(if, T_IF, KANDR, COND | IF_COND | EXPAND) /* 18162 */ \ D(else, T_ELSE, KANDR, COND) /* 9863 */ \ D(ifndef, T_IFNDEF, KANDR, COND | IF_COND) /* 9675 */ \ D(undef, T_UNDEF, KANDR, IN_I) /* 4837 */ \ ! D(line, T_LINE, KANDR, EXPAND) /* 2465 */ \ ! D(elif, T_ELIF, STDC89, COND | EXPAND) /* 610 */ \ D(error, T_ERROR, STDC89, 0) /* 475 */ \ D(pragma, T_PRAGMA, STDC89, IN_I) /* 195 */ \ D(warning, T_WARNING, EXTENSION, 0) /* 22 */ \ ! D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND) /* 19 */ \ D(ident, T_IDENT, EXTENSION, IN_I) /* 11 */ \ ! D(import, T_IMPORT, EXTENSION, INCL | EXPAND) /* 0 ObjC */ \ D(assert, T_ASSERT, EXTENSION, 0) /* 0 SVR4 */ \ D(unassert, T_UNASSERT, EXTENSION, 0) /* 0 SVR4 */ \ ! D(sccs, T_SCCS, EXTENSION, 0) /* 0 SVR4? */ /* Use the table to generate a series of prototypes, an enum for the directive names, and an array of directive handlers. */ *************** enum *** 185,191 **** /* Don't invoke CONCAT2 with any whitespace or K&R cc will fail. */ #define D(name, t, origin, flags) \ ! { CONCAT2(do_,name), (const U_CHAR *) STRINGX(name), \ sizeof STRINGX(name) - 1, origin, flags }, static const directive dtable[] = { --- 182,188 ---- /* Don't invoke CONCAT2 with any whitespace or K&R cc will fail. */ #define D(name, t, origin, flags) \ ! { CONCAT2(do_,name), (const uchar *) STRINGX(name), \ sizeof STRINGX(name) - 1, origin, flags }, static const directive dtable[] = { *************** check_eol (pfile) *** 225,232 **** cpp_reader *pfile; { if (! SEEN_EOL () && _cpp_lex_token (pfile)->type != CPP_EOF) ! cpp_pedwarn (pfile, "extra tokens at end of #%s directive", ! pfile->directive->name); } /* Called when entering a directive, _Pragma or command-line directive. */ --- 222,229 ---- cpp_reader *pfile; { if (! SEEN_EOL () && _cpp_lex_token (pfile)->type != CPP_EOF) ! cpp_error (pfile, DL_PEDWARN, "extra tokens at end of #%s directive", ! pfile->directive->name); } /* Called when entering a directive, _Pragma or command-line directive. */ *************** end_directive (pfile, skip_line) *** 248,255 **** cpp_reader *pfile; int skip_line; { /* We don't skip for an assembler #. */ ! if (skip_line) { skip_rest_of_line (pfile); if (!pfile->keep_tokens) --- 245,260 ---- cpp_reader *pfile; int skip_line; { + if (CPP_OPTION (pfile, traditional)) + { + /* Revert change of prepare_directive_trad. */ + pfile->state.prevent_expansion--; + + if (pfile->directive != &dtable[T_DEFINE]) + _cpp_remove_overlay (pfile); + } /* We don't skip for an assembler #. */ ! else if (skip_line) { skip_rest_of_line (pfile); if (!pfile->keep_tokens) *************** end_directive (pfile, skip_line) *** 262,272 **** /* Restore state. */ pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); pfile->state.in_directive = 0; pfile->state.angled_headers = 0; pfile->directive = 0; } ! /* Output diagnostics for a directive DIR. INDENTED is non-zero if the '#' was indented. */ static void directive_diagnostics (pfile, dir, indented) --- 267,306 ---- /* Restore state. */ pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); pfile->state.in_directive = 0; + pfile->state.in_expression = 0; pfile->state.angled_headers = 0; pfile->directive = 0; } ! /* Prepare to handle the directive in pfile->directive. */ ! static void ! prepare_directive_trad (pfile) ! cpp_reader *pfile; ! { ! if (pfile->directive != &dtable[T_DEFINE]) ! { ! bool no_expand = (pfile->directive ! && ! (pfile->directive->flags & EXPAND)); ! bool was_skipping = pfile->state.skipping; ! ! pfile->state.skipping = false; ! pfile->state.in_expression = (pfile->directive == &dtable[T_IF] ! || pfile->directive == &dtable[T_ELIF]); ! if (no_expand) ! pfile->state.prevent_expansion++; ! _cpp_read_logical_line_trad (pfile); ! if (no_expand) ! pfile->state.prevent_expansion--; ! pfile->state.skipping = was_skipping; ! _cpp_overlay_buffer (pfile, pfile->out.base, ! pfile->out.cur - pfile->out.base); ! } ! ! /* Stop ISO C from expanding anything. */ ! pfile->state.prevent_expansion++; ! } ! ! /* Output diagnostics for a directive DIR. INDENTED is nonzero if the '#' was indented. */ static void directive_diagnostics (pfile, dir, indented) *************** directive_diagnostics (pfile, dir, inden *** 278,284 **** if (CPP_PEDANTIC (pfile) && ! pfile->state.skipping && dir->origin == EXTENSION) ! cpp_pedwarn (pfile, "#%s is a GCC extension", dir->name); /* Traditionally, a directive is ignored unless its # is in column 1. Therefore in code intended to work with K+R --- 312,318 ---- if (CPP_PEDANTIC (pfile) && ! pfile->state.skipping && dir->origin == EXTENSION) ! cpp_error (pfile, DL_PEDWARN, "#%s is a GCC extension", dir->name); /* Traditionally, a directive is ignored unless its # is in column 1. Therefore in code intended to work with K+R *************** directive_diagnostics (pfile, dir, inden *** 289,310 **** if (CPP_WTRADITIONAL (pfile)) { if (dir == &dtable[T_ELIF]) ! cpp_warning (pfile, "suggest not using #elif in traditional C"); else if (indented && dir->origin == KANDR) ! cpp_warning (pfile, ! "traditional C ignores #%s with the # indented", ! dir->name); else if (!indented && dir->origin != KANDR) ! cpp_warning (pfile, ! "suggest hiding #%s from traditional C with an indented #", ! dir->name); } } ! /* Check if we have a known directive. INDENTED is non-zero if the '#' of the directive was indented. This function is in this file to save unnecessarily exporting dtable etc. to cpplex.c. Returns ! non-zero if the line of tokens has been handled, zero if we should continue processing the line. */ int _cpp_handle_directive (pfile, indented) --- 323,345 ---- if (CPP_WTRADITIONAL (pfile)) { if (dir == &dtable[T_ELIF]) ! cpp_error (pfile, DL_WARNING, ! "suggest not using #elif in traditional C"); else if (indented && dir->origin == KANDR) ! cpp_error (pfile, DL_WARNING, ! "traditional C ignores #%s with the # indented", ! dir->name); else if (!indented && dir->origin != KANDR) ! cpp_error (pfile, DL_WARNING, ! "suggest hiding #%s from traditional C with an indented #", ! dir->name); } } ! /* Check if we have a known directive. INDENTED is nonzero if the '#' of the directive was indented. This function is in this file to save unnecessarily exporting dtable etc. to cpplex.c. Returns ! nonzero if the line of tokens has been handled, zero if we should continue processing the line. */ int _cpp_handle_directive (pfile, indented) *************** _cpp_handle_directive (pfile, indented) *** 313,320 **** --- 348,364 ---- { const directive *dir = 0; const cpp_token *dname; + bool was_parsing_args = pfile->state.parsing_args; int skip = 1; + if (was_parsing_args) + { + if (CPP_OPTION (pfile, pedantic)) + cpp_error (pfile, DL_PEDWARN, + "embedding a directive within macro arguments is not portable"); + pfile->state.parsing_args = 0; + pfile->state.prevent_expansion = 0; + } start_directive (pfile); dname = _cpp_lex_token (pfile); *************** _cpp_handle_directive (pfile, indented) *** 323,336 **** if (dname->val.node->directive_index) dir = &dtable[dname->val.node->directive_index - 1]; } ! /* We do not recognise the # followed by a number extension in assembler code. */ else if (dname->type == CPP_NUMBER && CPP_OPTION (pfile, lang) != CLK_ASM) { dir = &linemarker_dir; if (CPP_PEDANTIC (pfile) && ! CPP_OPTION (pfile, preprocessed) && ! pfile->state.skipping) ! cpp_pedwarn (pfile, "style of line directive is a GCC extension"); } if (dir) --- 367,381 ---- if (dname->val.node->directive_index) dir = &dtable[dname->val.node->directive_index - 1]; } ! /* We do not recognize the # followed by a number extension in assembler code. */ else if (dname->type == CPP_NUMBER && CPP_OPTION (pfile, lang) != CLK_ASM) { dir = &linemarker_dir; if (CPP_PEDANTIC (pfile) && ! CPP_OPTION (pfile, preprocessed) && ! pfile->state.skipping) ! cpp_error (pfile, DL_PEDWARN, ! "style of line directive is a GCC extension"); } if (dir) *************** _cpp_handle_directive (pfile, indented) *** 362,367 **** --- 407,413 ---- skipping or not, we should lex angle-bracketed headers correctly, and maybe output some diagnostics. */ pfile->state.angled_headers = dir->flags & INCL; + pfile->state.directive_wants_padding = dir->flags & INCL; if (! CPP_OPTION (pfile, preprocessed)) directive_diagnostics (pfile, dir, indented); if (pfile->state.skipping && !(dir->flags & COND)) *************** _cpp_handle_directive (pfile, indented) *** 379,397 **** if (CPP_OPTION (pfile, lang) == CLK_ASM) skip = 0; else if (!pfile->state.skipping) ! cpp_error (pfile, "invalid preprocessing directive #%s", cpp_token_as_text (pfile, dname)); } if (dir) ! { ! pfile->directive = dir; ! (*pfile->directive->handler) (pfile); ! } else if (skip == 0) _cpp_backup_tokens (pfile, 1); end_directive (pfile, skip); return skip; } --- 425,451 ---- if (CPP_OPTION (pfile, lang) == CLK_ASM) skip = 0; else if (!pfile->state.skipping) ! cpp_error (pfile, DL_ERROR, "invalid preprocessing directive #%s", cpp_token_as_text (pfile, dname)); } + pfile->directive = dir; + if (CPP_OPTION (pfile, traditional)) + prepare_directive_trad (pfile); + if (dir) ! (*pfile->directive->handler) (pfile); else if (skip == 0) _cpp_backup_tokens (pfile, 1); end_directive (pfile, skip); + if (was_parsing_args) + { + /* Restore state when within macro args. */ + pfile->state.parsing_args = 2; + pfile->state.prevent_expansion = 1; + pfile->buffer->saved_flags |= PREV_WHITE; + } return skip; } *************** run_directive (pfile, dir_no, buf, count *** 404,410 **** const char *buf; size_t count; { ! cpp_push_buffer (pfile, (const U_CHAR *) buf, count, /* from_stage3 */ true, 1); /* Disgusting hack. */ if (dir_no == T_PRAGMA) --- 458,464 ---- const char *buf; size_t count; { ! cpp_push_buffer (pfile, (const uchar *) buf, count, /* from_stage3 */ true, 1); /* Disgusting hack. */ if (dir_no == T_PRAGMA) *************** run_directive (pfile, dir_no, buf, count *** 413,418 **** --- 467,474 ---- /* We don't want a leading # to be interpreted as a directive. */ pfile->buffer->saved_flags = 0; pfile->directive = &dtable[dir_no]; + if (CPP_OPTION (pfile, traditional)) + prepare_directive_trad (pfile); (void) (*pfile->directive->handler) (pfile); end_directive (pfile, 1); if (dir_no == T_PRAGMA) *************** static cpp_hashnode * *** 426,432 **** lex_macro_node (pfile) cpp_reader *pfile; { - cpp_hashnode *node; const cpp_token *token = _cpp_lex_token (pfile); /* The token immediately after #define must be an identifier. That --- 482,487 ---- *************** lex_macro_node (pfile) *** 436,468 **** Finally, the identifier may not have been poisoned. (In that case the lexer has issued the error message for us.) */ ! if (token->type != CPP_NAME) { ! if (token->type == CPP_EOF) ! cpp_error (pfile, "no macro name given in #%s directive", ! pfile->directive->name); ! else if (token->flags & NAMED_OP) ! cpp_error (pfile, ! "\"%s\" cannot be used as a macro name as it is an operator in C++", ! NODE_NAME (token->val.node)); ! else ! cpp_error (pfile, "macro names must be identifiers"); ! ! return 0; ! } ! ! node = token->val.node; ! if (node->flags & NODE_POISONED) ! return 0; ! if (node == pfile->spec_nodes.n_defined) ! { ! cpp_error (pfile, "\"%s\" cannot be used as a macro name", ! NODE_NAME (node)); ! return 0; } ! return node; } /* Process a #define directive. Most work is done in cppmacro.c. */ --- 491,517 ---- Finally, the identifier may not have been poisoned. (In that case the lexer has issued the error message for us.) */ ! if (token->type == CPP_NAME) { ! cpp_hashnode *node = token->val.node; ! if (node == pfile->spec_nodes.n_defined) ! cpp_error (pfile, DL_ERROR, ! "\"defined\" cannot be used as a macro name"); ! else if (! (node->flags & NODE_POISONED)) ! return node; } + else if (token->flags & NAMED_OP) + cpp_error (pfile, DL_ERROR, + "\"%s\" cannot be used as a macro name as it is an operator in C++", + NODE_NAME (token->val.node)); + else if (token->type == CPP_EOF) + cpp_error (pfile, DL_ERROR, "no macro name given in #%s directive", + pfile->directive->name); + else + cpp_error (pfile, DL_ERROR, "macro names must be identifiers"); ! return NULL; } /* Process a #define directive. Most work is done in cppmacro.c. */ *************** do_define (pfile) *** 474,479 **** --- 523,533 ---- if (node) { + /* If we have been requested to expand comments into macros, + then re-enable saving of comments. */ + pfile->state.save_comments = + ! CPP_OPTION (pfile, discard_comments_in_macro_exp); + if (_cpp_create_definition (pfile, node)) if (pfile->cb.define) (*pfile->cb.define) (pfile, pfile->directive_line, node); *************** static void *** 485,491 **** do_undef (pfile) cpp_reader *pfile; { ! cpp_hashnode *node = lex_macro_node (pfile); /* 6.10.3.5 paragraph 2: [#undef] is ignored if the specified identifier is not currently defined as a macro name. */ --- 539,545 ---- do_undef (pfile) cpp_reader *pfile; { ! cpp_hashnode *node = lex_macro_node (pfile); /* 6.10.3.5 paragraph 2: [#undef] is ignored if the specified identifier is not currently defined as a macro name. */ *************** do_undef (pfile) *** 495,501 **** (*pfile->cb.undef) (pfile, pfile->directive_line, node); if (node->flags & NODE_WARN) ! cpp_warning (pfile, "undefining \"%s\"", NODE_NAME (node)); _cpp_free_definition (node); } --- 549,558 ---- (*pfile->cb.undef) (pfile, pfile->directive_line, node); if (node->flags & NODE_WARN) ! cpp_error (pfile, DL_WARNING, "undefining \"%s\"", NODE_NAME (node)); ! ! if (CPP_OPTION (pfile, warn_unused_macros)) ! _cpp_warn_if_unused_macro (pfile, node, NULL); _cpp_free_definition (node); } *************** glue_header_name (pfile) *** 519,525 **** buffer = (unsigned char *) xmalloc (capacity); for (;;) { ! token = cpp_get_token (pfile); if (token->type == CPP_GREATER || token->type == CPP_EOF) break; --- 576,582 ---- buffer = (unsigned char *) xmalloc (capacity); for (;;) { ! token = get_token_no_padding (pfile); if (token->type == CPP_GREATER || token->type == CPP_EOF) break; *************** glue_header_name (pfile) *** 538,544 **** } if (token->type == CPP_EOF) ! cpp_error (pfile, "missing terminating > character"); else { unsigned char *token_mem = _cpp_unaligned_alloc (pfile, total_len + 1); --- 595,601 ---- } if (token->type == CPP_EOF) ! cpp_error (pfile, DL_ERROR, "missing terminating > character"); else { unsigned char *token_mem = _cpp_unaligned_alloc (pfile, total_len + 1); *************** parse_include (pfile) *** 571,582 **** dir = pfile->directive->name; /* Allow macro expansion. */ ! header = cpp_get_token (pfile); if (header->type != CPP_STRING && header->type != CPP_HEADER_NAME) { if (header->type != CPP_LESS) { ! cpp_error (pfile, "#%s expects \"FILENAME\" or ", dir); return NULL; } --- 628,640 ---- dir = pfile->directive->name; /* Allow macro expansion. */ ! header = get_token_no_padding (pfile); if (header->type != CPP_STRING && header->type != CPP_HEADER_NAME) { if (header->type != CPP_LESS) { ! cpp_error (pfile, DL_ERROR, ! "#%s expects \"FILENAME\" or ", dir); return NULL; } *************** parse_include (pfile) *** 587,593 **** if (header->val.str.len == 0) { ! cpp_error (pfile, "empty file name in #%s", dir); return NULL; } --- 645,651 ---- if (header->val.str.len == 0) { ! cpp_error (pfile, DL_ERROR, "empty file name in #%s", dir); return NULL; } *************** do_include_common (pfile, type) *** 606,618 **** use the normal search logic. */ if (type == IT_INCLUDE_NEXT && ! pfile->buffer->prev) { ! cpp_warning (pfile, "#include_next in primary source file"); type = IT_INCLUDE; } else if (type == IT_IMPORT && CPP_OPTION (pfile, warn_import)) { CPP_OPTION (pfile, warn_import) = 0; ! cpp_warning (pfile, "#import is obsolete, use an #ifndef wrapper in the header file"); } --- 664,676 ---- use the normal search logic. */ if (type == IT_INCLUDE_NEXT && ! pfile->buffer->prev) { ! cpp_error (pfile, DL_WARNING, "#include_next in primary source file"); type = IT_INCLUDE; } else if (type == IT_IMPORT && CPP_OPTION (pfile, warn_import)) { CPP_OPTION (pfile, warn_import) = 0; ! cpp_error (pfile, DL_WARNING, "#import is obsolete, use an #ifndef wrapper in the header file"); } *************** do_include_common (pfile, type) *** 621,627 **** { /* Prevent #include recursion. */ if (pfile->line_maps.depth >= CPP_STACK_MAX) ! cpp_fatal (pfile, "#include nested too deeply"); else { check_eol (pfile); --- 679,685 ---- { /* Prevent #include recursion. */ if (pfile->line_maps.depth >= CPP_STACK_MAX) ! cpp_error (pfile, DL_ERROR, "#include nested too deeply"); else { check_eol (pfile); *************** do_include_common (pfile, type) *** 630,636 **** if (pfile->cb.include) (*pfile->cb.include) (pfile, pfile->directive_line, pfile->directive->name, header); - _cpp_execute_include (pfile, header, type); } } --- 688,693 ---- *************** read_flag (pfile, last) *** 679,685 **** } if (token->type != CPP_EOF) ! cpp_error (pfile, "invalid flag \"%s\" in line directive", cpp_token_as_text (pfile, token)); return 0; } --- 736,742 ---- } if (token->type != CPP_EOF) ! cpp_error (pfile, DL_ERROR, "invalid flag \"%s\" in line directive", cpp_token_as_text (pfile, token)); return 0; } *************** read_flag (pfile, last) *** 687,718 **** /* Subroutine of do_line and do_linemarker. Returns a version of STR which has a NUL terminator and all escape sequences converted to their equivalents. Temporary, hopefully. */ ! static U_CHAR * dequote_string (pfile, str, len) cpp_reader *pfile; ! const U_CHAR *str; unsigned int len; { ! U_CHAR *result = _cpp_unaligned_alloc (pfile, len + 1); ! U_CHAR *dst = result; ! const U_CHAR *limit = str + len; ! unsigned int c; ! unsigned HOST_WIDE_INT mask; - /* We need the mask to match the host's 'unsigned char', not the - target's. */ - if (CHAR_BIT < HOST_BITS_PER_WIDE_INT) - mask = ((unsigned HOST_WIDE_INT) 1 << CHAR_BIT) - 1; - else - mask = ~(unsigned HOST_WIDE_INT)0; - while (str < limit) { c = *str++; if (c != '\\') *dst++ = c; else ! *dst++ = cpp_parse_escape (pfile, (const U_CHAR **)&str, limit, mask, 0); } *dst++ = '\0'; return result; --- 744,767 ---- /* Subroutine of do_line and do_linemarker. Returns a version of STR which has a NUL terminator and all escape sequences converted to their equivalents. Temporary, hopefully. */ ! static uchar * dequote_string (pfile, str, len) cpp_reader *pfile; ! const uchar *str; unsigned int len; { ! uchar *result = _cpp_unaligned_alloc (pfile, len + 1); ! uchar *dst = result; ! const uchar *limit = str + len; ! cppchar_t c; while (str < limit) { c = *str++; if (c != '\\') *dst++ = c; else ! *dst++ = cpp_parse_escape (pfile, &str, limit, 0); } *dst++ = '\0'; return result; *************** dequote_string (pfile, str, len) *** 723,734 **** number was well-formed, 1 if not. Temporary, hopefully. */ static int strtoul_for_line (str, len, nump) ! const U_CHAR *str; unsigned int len; unsigned long *nump; { unsigned long reg = 0; ! U_CHAR c; while (len--) { c = *str++; --- 772,783 ---- number was well-formed, 1 if not. Temporary, hopefully. */ static int strtoul_for_line (str, len, nump) ! const uchar *str; unsigned int len; unsigned long *nump; { unsigned long reg = 0; ! uchar c; while (len--) { c = *str++; *************** do_line (pfile) *** 761,773 **** || strtoul_for_line (token->val.str.text, token->val.str.len, &new_lineno)) { ! cpp_error (pfile, "\"%s\" after #line is not a positive integer", cpp_token_as_text (pfile, token)); return; ! } if (CPP_PEDANTIC (pfile) && (new_lineno == 0 || new_lineno > cap)) ! cpp_pedwarn (pfile, "line number out of range"); token = cpp_get_token (pfile); if (token->type == CPP_STRING) --- 810,823 ---- || strtoul_for_line (token->val.str.text, token->val.str.len, &new_lineno)) { ! cpp_error (pfile, DL_ERROR, ! "\"%s\" after #line is not a positive integer", cpp_token_as_text (pfile, token)); return; ! } if (CPP_PEDANTIC (pfile) && (new_lineno == 0 || new_lineno > cap)) ! cpp_error (pfile, DL_PEDWARN, "line number out of range"); token = cpp_get_token (pfile); if (token->type == CPP_STRING) *************** do_line (pfile) *** 778,784 **** } else if (token->type != CPP_EOF) { ! cpp_error (pfile, "\"%s\" is not a valid filename", cpp_token_as_text (pfile, token)); return; } --- 828,834 ---- } else if (token->type != CPP_EOF) { ! cpp_error (pfile, DL_ERROR, "\"%s\" is not a valid filename", cpp_token_as_text (pfile, token)); return; } *************** do_linemarker (pfile) *** 813,822 **** || strtoul_for_line (token->val.str.text, token->val.str.len, &new_lineno)) { ! cpp_error (pfile, "\"%s\" after # is not a positive integer", cpp_token_as_text (pfile, token)); return; ! } token = cpp_get_token (pfile); if (token->type == CPP_STRING) --- 863,872 ---- || strtoul_for_line (token->val.str.text, token->val.str.len, &new_lineno)) { ! cpp_error (pfile, DL_ERROR, "\"%s\" after # is not a positive integer", cpp_token_as_text (pfile, token)); return; ! } token = cpp_get_token (pfile); if (token->type == CPP_STRING) *************** do_linemarker (pfile) *** 849,855 **** } else if (token->type != CPP_EOF) { ! cpp_error (pfile, "\"%s\" is not a valid filename", cpp_token_as_text (pfile, token)); return; } --- 899,905 ---- } else if (token->type != CPP_EOF) { ! cpp_error (pfile, DL_ERROR, "\"%s\" is not a valid filename", cpp_token_as_text (pfile, token)); return; } *************** _cpp_do_file_change (pfile, reason, to_f *** 882,891 **** static void do_diagnostic (pfile, code, print_dir) cpp_reader *pfile; ! enum error_type code; int print_dir; { ! if (_cpp_begin_message (pfile, code, 0, 0)) { if (print_dir) fprintf (stderr, "#%s ", pfile->directive->name); --- 932,943 ---- static void do_diagnostic (pfile, code, print_dir) cpp_reader *pfile; ! int code; int print_dir; { ! if (_cpp_begin_message (pfile, code, ! pfile->cur_token[-1].line, ! pfile->cur_token[-1].col)) { if (print_dir) fprintf (stderr, "#%s ", pfile->directive->name); *************** static void *** 899,905 **** do_error (pfile) cpp_reader *pfile; { ! do_diagnostic (pfile, ERROR, 1); } static void --- 951,957 ---- do_error (pfile) cpp_reader *pfile; { ! do_diagnostic (pfile, DL_ERROR, 1); } static void *************** do_warning (pfile) *** 907,913 **** cpp_reader *pfile; { /* We want #warning diagnostics to be emitted in system headers too. */ ! do_diagnostic (pfile, WARNING_SYSHDR, 1); } /* Report program identification. */ --- 959,965 ---- cpp_reader *pfile; { /* We want #warning diagnostics to be emitted in system headers too. */ ! do_diagnostic (pfile, DL_WARNING_SYSHDR, 1); } /* Report program identification. */ *************** do_ident (pfile) *** 918,924 **** const cpp_token *str = cpp_get_token (pfile); if (str->type != CPP_STRING) ! cpp_error (pfile, "invalid #ident directive"); else if (pfile->cb.ident) (*pfile->cb.ident) (pfile, pfile->directive_line, &str->val.str); --- 970,976 ---- const cpp_token *str = cpp_get_token (pfile); if (str->type != CPP_STRING) ! cpp_error (pfile, DL_ERROR, "invalid #ident directive"); else if (pfile->cb.ident) (*pfile->cb.ident) (pfile, pfile->directive_line, &str->val.str); *************** cpp_register_pragma (pfile, space, name, *** 1005,1017 **** { if (entry->is_nspace) clash: ! cpp_ice (pfile, "registering \"%s\" as both a pragma and a pragma namespace", NODE_NAME (node)); else if (space) ! cpp_ice (pfile, "#pragma %s %s is already registered", space, name); else ! cpp_ice (pfile, "#pragma %s is already registered", name); } else insert_pragma_entry (pfile, chain, node, handler); --- 1057,1070 ---- { if (entry->is_nspace) clash: ! cpp_error (pfile, DL_ICE, "registering \"%s\" as both a pragma and a pragma namespace", NODE_NAME (node)); else if (space) ! cpp_error (pfile, DL_ICE, "#pragma %s %s is already registered", ! space, name); else ! cpp_error (pfile, DL_ICE, "#pragma %s is already registered", name); } else insert_pragma_entry (pfile, chain, node, handler); *************** _cpp_init_internal_pragmas (pfile) *** 1023,1029 **** cpp_reader *pfile; { /* Pragmas in the global namespace. */ - cpp_register_pragma (pfile, 0, "poison", do_pragma_poison); cpp_register_pragma (pfile, 0, "once", do_pragma_once); /* New GCC-specific pragmas should be put in the GCC namespace. */ --- 1076,1081 ---- *************** static void *** 1086,1103 **** do_pragma_once (pfile) cpp_reader *pfile; { ! cpp_warning (pfile, "#pragma once is obsolete"); ! if (pfile->buffer->prev == NULL) ! cpp_warning (pfile, "#pragma once in main file"); else _cpp_never_reread (pfile->buffer->inc); check_eol (pfile); } ! /* Handle #pragma poison, to poison one or more identifiers so that ! the lexer produces a hard error for each subsequent usage. */ static void do_pragma_poison (pfile) cpp_reader *pfile; --- 1138,1155 ---- do_pragma_once (pfile) cpp_reader *pfile; { ! cpp_error (pfile, DL_WARNING, "#pragma once is obsolete"); ! if (pfile->buffer->prev == NULL) ! cpp_error (pfile, DL_WARNING, "#pragma once in main file"); else _cpp_never_reread (pfile->buffer->inc); check_eol (pfile); } ! /* Handle #pragma GCC poison, to poison one or more identifiers so ! that the lexer produces a hard error for each subsequent usage. */ static void do_pragma_poison (pfile) cpp_reader *pfile; *************** do_pragma_poison (pfile) *** 1113,1119 **** break; if (tok->type != CPP_NAME) { ! cpp_error (pfile, "invalid #pragma GCC poison directive"); break; } --- 1165,1171 ---- break; if (tok->type != CPP_NAME) { ! cpp_error (pfile, DL_ERROR, "invalid #pragma GCC poison directive"); break; } *************** do_pragma_poison (pfile) *** 1122,1128 **** continue; if (hp->type == NT_MACRO) ! cpp_warning (pfile, "poisoning existing macro \"%s\"", NODE_NAME (hp)); _cpp_free_definition (hp); hp->flags |= NODE_POISONED | NODE_DIAGNOSTIC; } --- 1174,1181 ---- continue; if (hp->type == NT_MACRO) ! cpp_error (pfile, DL_WARNING, "poisoning existing macro \"%s\"", ! NODE_NAME (hp)); _cpp_free_definition (hp); hp->flags |= NODE_POISONED | NODE_DIAGNOSTIC; } *************** do_pragma_system_header (pfile) *** 1142,1148 **** cpp_buffer *buffer = pfile->buffer; if (buffer->prev == 0) ! cpp_warning (pfile, "#pragma system_header ignored outside include file"); else { check_eol (pfile); --- 1195,1202 ---- cpp_buffer *buffer = pfile->buffer; if (buffer->prev == 0) ! cpp_error (pfile, DL_WARNING, ! "#pragma system_header ignored outside include file"); else { check_eol (pfile); *************** do_pragma_dependency (pfile) *** 1160,1182 **** { const cpp_token *header; int ordering; ! header = parse_include (pfile); if (!header) return; ordering = _cpp_compare_file_date (pfile, header); if (ordering < 0) ! cpp_warning (pfile, "cannot find source %s", ! cpp_token_as_text (pfile, header)); else if (ordering > 0) { ! cpp_warning (pfile, "current file is older than %s", ! cpp_token_as_text (pfile, header)); if (cpp_get_token (pfile)->type != CPP_EOF) { _cpp_backup_tokens (pfile, 1); ! do_diagnostic (pfile, WARNING, 0); } } } --- 1214,1236 ---- { const cpp_token *header; int ordering; ! header = parse_include (pfile); if (!header) return; ordering = _cpp_compare_file_date (pfile, header); if (ordering < 0) ! cpp_error (pfile, DL_WARNING, "cannot find source %s", ! cpp_token_as_text (pfile, header)); else if (ordering > 0) { ! cpp_error (pfile, DL_WARNING, "current file is older than %s", ! cpp_token_as_text (pfile, header)); if (cpp_get_token (pfile)->type != CPP_EOF) { _cpp_backup_tokens (pfile, 1); ! do_diagnostic (pfile, DL_WARNING, 0); } } } *************** destringize_and_run (pfile, in) *** 1256,1261 **** --- 1310,1316 ---- pfile->context = saved_context; pfile->cur_token = saved_cur_token; pfile->cur_run = saved_cur_run; + pfile->line--; } /* See above comment. For the moment, we'd like *************** destringize_and_run (pfile, in) *** 1264,1274 **** to be output as ! token1 ! # 7 "file.c" ! #pragma foo ! # 7 "file.c" ! token2 Getting the line markers is a little tricky. */ if (pfile->cb.line_change) --- 1319,1329 ---- to be output as ! token1 ! # 7 "file.c" ! #pragma foo ! # 7 "file.c" ! token2 Getting the line markers is a little tricky. */ if (pfile->cb.line_change) *************** _cpp_do__Pragma (pfile) *** 1285,1301 **** if (string) destringize_and_run (pfile, &string->val.str); else ! cpp_error (pfile, "_Pragma takes a parenthesized string literal"); } ! /* Just ignore #sccs, on systems where we define it at all. */ ! #ifdef SCCS_DIRECTIVE static void do_sccs (pfile) cpp_reader *pfile ATTRIBUTE_UNUSED; { } - #endif /* Handle #ifdef. */ static void --- 1340,1355 ---- if (string) destringize_and_run (pfile, &string->val.str); else ! cpp_error (pfile, DL_ERROR, ! "_Pragma takes a parenthesized string literal"); } ! /* Just ignore #sccs on all systems. */ static void do_sccs (pfile) cpp_reader *pfile ATTRIBUTE_UNUSED; { } /* Handle #ifdef. */ static void *************** do_ifdef (pfile) *** 1309,1318 **** const cpp_hashnode *node = lex_macro_node (pfile); if (node) ! skip = node->type != NT_MACRO; ! ! if (node) ! check_eol (pfile); } push_conditional (pfile, skip, T_IFDEF, 0); --- 1363,1373 ---- const cpp_hashnode *node = lex_macro_node (pfile); if (node) ! { ! skip = node->type != NT_MACRO; ! _cpp_mark_macro_used (node); ! check_eol (pfile); ! } } push_conditional (pfile, skip, T_IFDEF, 0); *************** do_ifndef (pfile) *** 1329,1339 **** if (! pfile->state.skipping) { node = lex_macro_node (pfile); - if (node) - skip = node->type == NT_MACRO; if (node) ! check_eol (pfile); } push_conditional (pfile, skip, T_IFNDEF, node); --- 1384,1396 ---- if (! pfile->state.skipping) { node = lex_macro_node (pfile); if (node) ! { ! skip = node->type == NT_MACRO; ! _cpp_mark_macro_used (node); ! check_eol (pfile); ! } } push_conditional (pfile, skip, T_IFNDEF, node); *************** do_if (pfile) *** 1351,1357 **** int skip = 1; if (! pfile->state.skipping) ! skip = _cpp_parse_expr (pfile) == 0; push_conditional (pfile, skip, T_IF, pfile->mi_ind_cmacro); } --- 1408,1414 ---- int skip = 1; if (! pfile->state.skipping) ! skip = _cpp_parse_expr (pfile) == false; push_conditional (pfile, skip, T_IF, pfile->mi_ind_cmacro); } *************** do_else (pfile) *** 1367,1379 **** struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) ! cpp_error (pfile, "#else without #if"); else { if (ifs->type == T_ELSE) { ! cpp_error (pfile, "#else after #else"); ! cpp_error_with_line (pfile, ifs->line, 0, "the conditional began here"); } ifs->type = T_ELSE; --- 1424,1436 ---- struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) ! cpp_error (pfile, DL_ERROR, "#else without #if"); else { if (ifs->type == T_ELSE) { ! cpp_error (pfile, DL_ERROR, "#else after #else"); ! cpp_error_with_line (pfile, DL_ERROR, ifs->line, 0, "the conditional began here"); } ifs->type = T_ELSE; *************** do_else (pfile) *** 1386,1392 **** ifs->mi_cmacro = 0; /* Only check EOL if was not originally skipping. */ ! if (!ifs->was_skipping) check_eol (pfile); } } --- 1443,1449 ---- ifs->mi_cmacro = 0; /* Only check EOL if was not originally skipping. */ ! if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels)) check_eol (pfile); } } *************** do_elif (pfile) *** 1401,1413 **** struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) ! cpp_error (pfile, "#elif without #if"); else { if (ifs->type == T_ELSE) { ! cpp_error (pfile, "#elif after #else"); ! cpp_error_with_line (pfile, ifs->line, 0, "the conditional began here"); } ifs->type = T_ELIF; --- 1458,1470 ---- struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) ! cpp_error (pfile, DL_ERROR, "#elif without #if"); else { if (ifs->type == T_ELSE) { ! cpp_error (pfile, DL_ERROR, "#elif after #else"); ! cpp_error_with_line (pfile, DL_ERROR, ifs->line, 0, "the conditional began here"); } ifs->type = T_ELIF; *************** do_endif (pfile) *** 1437,1447 **** struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) ! cpp_error (pfile, "#endif without #if"); else { /* Only check EOL if was not originally skipping. */ ! if (!ifs->was_skipping) check_eol (pfile); /* If potential control macro, we go back outside again. */ --- 1494,1504 ---- struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) ! cpp_error (pfile, DL_ERROR, "#endif without #if"); else { /* Only check EOL if was not originally skipping. */ ! if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels)) check_eol (pfile); /* If potential control macro, we go back outside again. */ *************** parse_answer (pfile, answerp, type) *** 1520,1526 **** if (type == T_UNASSERT && paren->type == CPP_EOF) return 0; ! cpp_error (pfile, "missing '(' after predicate"); return 1; } --- 1577,1583 ---- if (type == T_UNASSERT && paren->type == CPP_EOF) return 0; ! cpp_error (pfile, DL_ERROR, "missing '(' after predicate"); return 1; } *************** parse_answer (pfile, answerp, type) *** 1535,1541 **** if (token->type == CPP_EOF) { ! cpp_error (pfile, "missing ')' to complete answer"); return 1; } --- 1592,1598 ---- if (token->type == CPP_EOF) { ! cpp_error (pfile, DL_ERROR, "missing ')' to complete answer"); return 1; } *************** parse_answer (pfile, answerp, type) *** 1555,1561 **** if (acount == 0) { ! cpp_error (pfile, "predicate's answer is empty"); return 1; } --- 1612,1618 ---- if (acount == 0) { ! cpp_error (pfile, DL_ERROR, "predicate's answer is empty"); return 1; } *************** parse_assertion (pfile, answerp, type) *** 1585,1593 **** *answerp = 0; predicate = cpp_get_token (pfile); if (predicate->type == CPP_EOF) ! cpp_error (pfile, "assertion without predicate"); else if (predicate->type != CPP_NAME) ! cpp_error (pfile, "predicate must be an identifier"); else if (parse_answer (pfile, answerp, type) == 0) { unsigned int len = NODE_LEN (predicate->val.node); --- 1642,1650 ---- *answerp = 0; predicate = cpp_get_token (pfile); if (predicate->type == CPP_EOF) ! cpp_error (pfile, DL_ERROR, "assertion without predicate"); else if (predicate->type != CPP_NAME) ! cpp_error (pfile, DL_ERROR, "predicate must be an identifier"); else if (parse_answer (pfile, answerp, type) == 0) { unsigned int len = NODE_LEN (predicate->val.node); *************** find_answer (node, candidate) *** 1632,1651 **** } /* Test an assertion within a preprocessor conditional. Returns ! non-zero on failure, zero on success. On success, the result of ! the test is written into VALUE. */ int _cpp_test_assertion (pfile, value) cpp_reader *pfile; ! int *value; { struct answer *answer; cpp_hashnode *node; node = parse_assertion (pfile, &answer, T_IF); if (node) *value = (node->type == NT_ASSERTION && (answer == 0 || *find_answer (node, answer) != 0)); /* We don't commit the memory for the answer - it's temporary only. */ return node == 0; --- 1689,1715 ---- } /* Test an assertion within a preprocessor conditional. Returns ! nonzero on failure, zero on success. On success, the result of ! the test is written into VALUE, otherwise the value 0. */ int _cpp_test_assertion (pfile, value) cpp_reader *pfile; ! unsigned int *value; { struct answer *answer; cpp_hashnode *node; node = parse_assertion (pfile, &answer, T_IF); + + /* For recovery, an erroneous assertion expression is handled as a + failing assertion. */ + *value = 0; + if (node) *value = (node->type == NT_ASSERTION && (answer == 0 || *find_answer (node, answer) != 0)); + else if (pfile->cur_token[-1].type == CPP_EOF) + _cpp_backup_tokens (pfile, 1); /* We don't commit the memory for the answer - it's temporary only. */ return node == 0; *************** do_assert (pfile) *** 1658,1664 **** { struct answer *new_answer; cpp_hashnode *node; ! node = parse_assertion (pfile, &new_answer, T_ASSERT); if (node) { --- 1722,1728 ---- { struct answer *new_answer; cpp_hashnode *node; ! node = parse_assertion (pfile, &new_answer, T_ASSERT); if (node) { *************** do_assert (pfile) *** 1669,1675 **** { if (*find_answer (node, new_answer)) { ! cpp_warning (pfile, "\"%s\" re-asserted", NODE_NAME (node) + 1); return; } new_answer->next = node->value.answers; --- 1733,1740 ---- { if (*find_answer (node, new_answer)) { ! cpp_error (pfile, DL_WARNING, "\"%s\" re-asserted", ! NODE_NAME (node) + 1); return; } new_answer->next = node->value.answers; *************** do_unassert (pfile) *** 1691,1697 **** { cpp_hashnode *node; struct answer *answer; ! node = parse_assertion (pfile, &answer, T_UNASSERT); /* It isn't an error to #unassert something that isn't asserted. */ if (node && node->type == NT_ASSERTION) --- 1756,1762 ---- { cpp_hashnode *node; struct answer *answer; ! node = parse_assertion (pfile, &answer, T_UNASSERT); /* It isn't an error to #unassert something that isn't asserted. */ if (node && node->type == NT_ASSERTION) *************** cpp_define (pfile, str) *** 1732,1738 **** char *buf, *p; size_t count; ! /* Copy the entire option so we can modify it. Change the first "=" in the string to a space. If there is none, tack " 1" on the end. */ --- 1797,1803 ---- char *buf, *p; size_t count; ! /* Copy the entire option so we can modify it. Change the first "=" in the string to a space. If there is none, tack " 1" on the end. */ *************** cpp_unassert (pfile, str) *** 1787,1793 **** const char *str; { handle_assertion (pfile, str, T_UNASSERT); ! } /* Common code for cpp_assert (-A) and cpp_unassert (-A-). */ static void --- 1852,1858 ---- const char *str; { handle_assertion (pfile, str, T_UNASSERT); ! } /* Common code for cpp_assert (-A) and cpp_unassert (-A-). */ static void *************** cpp_set_callbacks (pfile, cb) *** 1862,1868 **** cpp_buffer * cpp_push_buffer (pfile, buffer, len, from_stage3, return_at_eof) cpp_reader *pfile; ! const U_CHAR *buffer; size_t len; int from_stage3; int return_at_eof; --- 1927,1933 ---- cpp_buffer * cpp_push_buffer (pfile, buffer, len, from_stage3, return_at_eof) cpp_reader *pfile; ! const uchar *buffer; size_t len; int from_stage3; int return_at_eof; *************** cpp_push_buffer (pfile, buffer, len, fro *** 1874,1880 **** new->line_base = new->buf = new->cur = buffer; new->rlimit = buffer + len; ! new->from_stage3 = from_stage3; new->prev = pfile->buffer; new->return_at_eof = return_at_eof; new->saved_flags = BOL; --- 1939,1945 ---- new->line_base = new->buf = new->cur = buffer; new->rlimit = buffer + len; ! new->from_stage3 = from_stage3 || CPP_OPTION (pfile, traditional); new->prev = pfile->buffer; new->return_at_eof = return_at_eof; new->saved_flags = BOL; *************** cpp_push_buffer (pfile, buffer, len, fro *** 1884,1920 **** return new; } ! /* If called from do_line, pops a single buffer. Otherwise pops all ! buffers until a real file is reached. Generates appropriate ! call-backs. */ void _cpp_pop_buffer (pfile) cpp_reader *pfile; { cpp_buffer *buffer = pfile->buffer; struct if_stack *ifs; - bool pushed = false; /* Walk back up the conditional stack till we reach its level at entry to this file, issuing error messages. */ for (ifs = buffer->if_stack; ifs; ifs = ifs->next) ! cpp_error_with_line (pfile, ifs->line, 0, "unterminated #%s", dtable[ifs->type].name); /* In case of a missing #endif. */ pfile->state.skipping = 0; ! /* Update the reader's buffer before _cpp_do_file_change. */ pfile->buffer = buffer->prev; ! if (buffer->inc) ! pushed = _cpp_pop_file_buffer (pfile, buffer->inc); ! if (!pushed) ! obstack_free (&pfile->buffer_ob, buffer); } ! /* Enter all recognised directives in the hash table. */ void _cpp_init_directives (pfile) cpp_reader *pfile; --- 1949,1998 ---- return new; } ! /* Pops a single buffer, with a file change call-back if appropriate. ! Then pushes the next -include file, if any remain. */ void _cpp_pop_buffer (pfile) cpp_reader *pfile; { cpp_buffer *buffer = pfile->buffer; + struct include_file *inc = buffer->inc; struct if_stack *ifs; /* Walk back up the conditional stack till we reach its level at entry to this file, issuing error messages. */ for (ifs = buffer->if_stack; ifs; ifs = ifs->next) ! cpp_error_with_line (pfile, DL_ERROR, ifs->line, 0, "unterminated #%s", dtable[ifs->type].name); /* In case of a missing #endif. */ pfile->state.skipping = 0; ! /* _cpp_do_file_change expects pfile->buffer to be the new one. */ pfile->buffer = buffer->prev; ! /* Free the buffer object now; we may want to push a new buffer ! in _cpp_push_next_include_file. */ ! obstack_free (&pfile->buffer_ob, buffer); ! if (inc) ! { ! _cpp_pop_file_buffer (pfile, inc); ! ! /* Don't generate a callback for popping the main file. */ ! if (pfile->buffer) ! { ! _cpp_do_file_change (pfile, LC_LEAVE, 0, 0, 0); ! ! /* If this is the main file, there may be some -include ! files left to push. */ ! if (!pfile->buffer->prev) ! _cpp_maybe_push_include_file (pfile); ! } ! } } ! /* Enter all recognized directives in the hash table. */ void _cpp_init_directives (pfile) cpp_reader *pfile; diff -Nrc3pad gcc-3.2.3/gcc/cpplib.h gcc-3.3/gcc/cpplib.h *** gcc-3.2.3/gcc/cpplib.h 2002-08-15 19:46:36.000000000 +0000 --- gcc-3.3/gcc/cpplib.h 2002-09-26 22:25:12.000000000 +0000 *************** typedef struct cpp_callbacks cpp_callbac *** 46,54 **** struct answer; struct file_name_map_list; ! /* The first two groups, apart from '=', can appear in preprocessor ! expressions. This allows a lookup table to be implemented in ! _cpp_parse_expr. The first group, to CPP_LAST_EQ, can be immediately followed by an '='. The lexer needs operators ending in '=', like ">>=", to be in --- 46,54 ---- struct answer; struct file_name_map_list; ! /* The first three groups, apart from '=', can appear in preprocessor ! expressions (+= and -= are used to indicate unary + and - resp.). ! This allows a lookup table to be implemented in _cpp_parse_expr. The first group, to CPP_LAST_EQ, can be immediately followed by an '='. The lexer needs operators ending in '=', like ">>=", to be in *************** struct file_name_map_list; *** 58,63 **** --- 58,64 ---- #define CPP_LAST_EQ CPP_MAX #define CPP_FIRST_DIGRAPH CPP_HASH #define CPP_LAST_PUNCTUATOR CPP_DOT_STAR + #define CPP_LAST_CPP_OP CPP_LESS_EQ #define TTYPE_TABLE \ OP(CPP_EQ = 0, "=") \ *************** struct file_name_map_list; *** 85,97 **** --- 86,101 ---- OP(CPP_COMMA, ",") /* grouping */ \ OP(CPP_OPEN_PAREN, "(") \ OP(CPP_CLOSE_PAREN, ")") \ + TK(CPP_EOF, SPELL_NONE) \ OP(CPP_EQ_EQ, "==") /* compare */ \ OP(CPP_NOT_EQ, "!=") \ OP(CPP_GREATER_EQ, ">=") \ OP(CPP_LESS_EQ, "<=") \ \ + /* These two are unary + / - in preprocessor expressions. */ \ OP(CPP_PLUS_EQ, "+=") /* math */ \ OP(CPP_MINUS_EQ, "-=") \ + \ OP(CPP_MULT_EQ, "*=") \ OP(CPP_DIV_EQ, "/=") \ OP(CPP_MOD_EQ, "%=") \ *************** struct file_name_map_list; *** 119,125 **** OP(CPP_SCOPE, "::") \ OP(CPP_DEREF_STAR, "->*") \ OP(CPP_DOT_STAR, ".*") \ ! OP(CPP_ATSIGN, "@") /* used in Objective C */ \ \ TK(CPP_NAME, SPELL_IDENT) /* word */ \ TK(CPP_NUMBER, SPELL_NUMBER) /* 34_be+ta */ \ --- 123,129 ---- OP(CPP_SCOPE, "::") \ OP(CPP_DEREF_STAR, "->*") \ OP(CPP_DOT_STAR, ".*") \ ! OP(CPP_ATSIGN, "@") /* used in Objective-C */ \ \ TK(CPP_NAME, SPELL_IDENT) /* word */ \ TK(CPP_NUMBER, SPELL_NUMBER) /* 34_be+ta */ \ *************** struct file_name_map_list; *** 135,142 **** TK(CPP_COMMENT, SPELL_NUMBER) /* Only if output comments. */ \ /* SPELL_NUMBER happens to DTRT. */ \ TK(CPP_MACRO_ARG, SPELL_NONE) /* Macro argument. */ \ ! TK(CPP_PADDING, SPELL_NONE) /* Whitespace for cpp0. */ \ ! TK(CPP_EOF, SPELL_NONE) /* End of line or file. */ #define OP(e, s) e, #define TK(e, s) e, --- 139,145 ---- TK(CPP_COMMENT, SPELL_NUMBER) /* Only if output comments. */ \ /* SPELL_NUMBER happens to DTRT. */ \ TK(CPP_MACRO_ARG, SPELL_NONE) /* Macro argument. */ \ ! TK(CPP_PADDING, SPELL_NONE) /* Whitespace for cpp0. */ #define OP(e, s) e, #define TK(e, s) e, *************** enum cpp_ttype *** 150,156 **** /* C language kind, used when calling cpp_reader_init. */ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_STDC89, CLK_STDC94, CLK_STDC99, ! CLK_GNUCXX, CLK_CXX98, CLK_OBJC, CLK_OBJCXX, CLK_ASM}; /* Payload of a NUMBER, STRING, CHAR or COMMENT token. */ struct cpp_string --- 153,159 ---- /* C language kind, used when calling cpp_reader_init. */ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_STDC89, CLK_STDC94, CLK_STDC99, ! CLK_GNUCXX, CLK_CXX98, CLK_ASM}; /* Payload of a NUMBER, STRING, CHAR or COMMENT token. */ struct cpp_string *************** struct cpp_token *** 187,195 **** } val; }; ! /* A standalone character. We may want to make it unsigned for the ! same reason we use unsigned char - to avoid signedness issues. */ ! typedef int cppchar_t; /* Values for opts.dump_macros. dump_only means inhibit output of the preprocessed text --- 190,212 ---- } val; }; ! /* A type wide enough to hold any multibyte source character. ! cpplib's character constant interpreter requires an unsigned type. ! Also, a typedef for the signed equivalent. */ ! #ifndef MAX_WCHAR_TYPE_SIZE ! # define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE ! #endif ! #if CHAR_BIT * SIZEOF_INT >= MAX_WCHAR_TYPE_SIZE ! # define CPPCHAR_SIGNED_T int ! #else ! # if CHAR_BIT * SIZEOF_LONG >= MAX_WCHAR_TYPE_SIZE || !HAVE_LONG_LONG ! # define CPPCHAR_SIGNED_T long ! # else ! # define CPPCHAR_SIGNED_T long long ! # endif ! #endif ! typedef unsigned CPPCHAR_SIGNED_T cppchar_t; ! typedef CPPCHAR_SIGNED_T cppchar_signed_t; /* Values for opts.dump_macros. dump_only means inhibit output of the preprocessed text *************** enum { dump_none = 0, dump_only, dump_na *** 204,223 **** carries all the options visible to the command line. */ struct cpp_options { - /* Name of input and output files. */ - const char *in_fname; - const char *out_fname; - /* Characters between tab stops. */ unsigned int tabstop; /* Pending options - -D, -U, -A, -I, -ixxx. */ struct cpp_pending *pending; - /* File name which deps are being written to. This is 0 if deps are - being written to stdout. */ - const char *deps_file; - /* Search paths for include files. */ struct search_path *quote_include; /* "" */ struct search_path *bracket_include; /* <> */ --- 221,232 ---- *************** struct cpp_options *** 231,260 **** const char *include_prefix; unsigned int include_prefix_len; - /* -fleading_underscore sets this to "_". */ - const char *user_label_prefix; - /* The language we're preprocessing. */ enum c_lang lang; /* Non-0 means -v, so print the full set of include dirs. */ unsigned char verbose; - /* Nonzero means chars are signed. */ - unsigned char signed_char; - /* Nonzero means use extra default include directories for C++. */ unsigned char cplusplus; /* Nonzero means handle cplusplus style comments */ unsigned char cplusplus_comments; ! /* Nonzero means handle #import, for objective C. */ unsigned char objc; /* Nonzero means don't copy comments into the output file. */ unsigned char discard_comments; /* Nonzero means process the ISO trigraph sequences. */ unsigned char trigraphs; --- 240,268 ---- const char *include_prefix; unsigned int include_prefix_len; /* The language we're preprocessing. */ enum c_lang lang; /* Non-0 means -v, so print the full set of include dirs. */ unsigned char verbose; /* Nonzero means use extra default include directories for C++. */ unsigned char cplusplus; /* Nonzero means handle cplusplus style comments */ unsigned char cplusplus_comments; ! /* Nonzero means define __OBJC__, treat @ as a special token, and ! use the OBJC[PLUS]_INCLUDE_PATH environment variable. */ unsigned char objc; /* Nonzero means don't copy comments into the output file. */ unsigned char discard_comments; + /* Nonzero means don't copy comments into the output file during + macro expansion. */ + unsigned char discard_comments_in_macro_exp; + /* Nonzero means process the ISO trigraph sequences. */ unsigned char trigraphs; *************** struct cpp_options *** 264,287 **** /* Nonzero means to allow hexadecimal floats and LL suffixes. */ unsigned char extended_numbers; - /* Nonzero means print the names of included files rather than the - preprocessed output. 1 means just the #include "...", 2 means - #include <...> as well. */ - unsigned char print_deps; - - /* Nonzero if phony targets are created for each header. */ - unsigned char deps_phony_targets; - - /* Nonzero if missing .h files in -M output are assumed to be - generated files and not errors. */ - unsigned char print_deps_missing_files; - - /* If true, fopen (deps_file, "a") else fopen (deps_file, "w"). */ - unsigned char print_deps_append; - - /* If true, no dependency is generated on the main file. */ - unsigned char deps_ignore_main_file; - /* Nonzero means print names of header files (-H). */ unsigned char print_include_names; --- 272,277 ---- *************** struct cpp_options *** 307,316 **** --- 297,319 ---- /* Nonzero means warn if #import is used. */ unsigned char warn_import; + /* Nonzero means warn about multicharacter charconsts. */ + unsigned char warn_multichar; + /* Nonzero means warn about various incompatibilities with traditional C. */ unsigned char warn_traditional; + /* Nonzero means warn about long long numeric constants. */ + unsigned char warn_long_long; + + /* Nonzero means warn about text after an #endif (or #else). */ + unsigned char warn_endif_labels; + + /* Nonzero means warn about implicit sign changes owing to integer + promotions. */ + unsigned char warn_num_sign_change; + /* Nonzero means turn warnings into errors. */ unsigned char warnings_are_errors; *************** struct cpp_options *** 335,344 **** /* Nonzero means warn if undefined identifiers are evaluated in an #if. */ unsigned char warn_undef; /* Nonzero for the 1999 C Standard, including corrigenda and amendments. */ unsigned char c99; ! /* Nonzero if conforming to some particular standard. */ unsigned char std; /* Nonzero means give all the error messages the ANSI standard requires. */ --- 338,350 ---- /* Nonzero means warn if undefined identifiers are evaluated in an #if. */ unsigned char warn_undef; + /* Nonzero means warn of unused macros from the main file. */ + unsigned char warn_unused_macros; + /* Nonzero for the 1999 C Standard, including corrigenda and amendments. */ unsigned char c99; ! /* Nonzero if we are conforming to a specific C or C++ standard. */ unsigned char std; /* Nonzero means give all the error messages the ANSI standard requires. */ *************** struct cpp_options *** 366,375 **** /* Nonzero means handle C++ alternate operator names. */ unsigned char operator_names; ! /* True if --help, --version or --target-help appeared in the ! options. Stand-alone CPP should then bail out after option ! parsing; drivers might want to continue printing help. */ ! unsigned char help_only; }; /* Call backs. */ --- 372,408 ---- /* Nonzero means handle C++ alternate operator names. */ unsigned char operator_names; ! /* True for traditional preprocessing. */ ! unsigned char traditional; ! ! /* Dependency generation. */ ! struct ! { ! /* Style of header dependencies to generate. */ ! enum {DEPS_NONE = 0, DEPS_USER, DEPS_SYSTEM } style; ! ! /* Assume missing files are generated files. */ ! bool missing_files; ! ! /* Generate phony targets for each dependency apart from the first ! one. */ ! bool phony_targets; ! ! /* If true, no dependency is generated on the main file. */ ! bool ignore_main_file; ! } deps; ! ! /* Target-specific features set by the front end or client. */ ! ! /* Precision for target CPP arithmetic, target characters, target ! ints and target wide characters, respectively. */ ! size_t precision, char_precision, int_precision, wchar_precision; ! ! /* True means chars (wide chars) are unsigned. */ ! bool unsigned_char, unsigned_wchar; ! ! /* Nonzero means __STDC__ should have the value 0 in system headers. */ ! unsigned char stdc_0_in_system_headers; }; /* Call backs. */ *************** struct cpp_callbacks *** 384,395 **** void (*undef) PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *)); void (*ident) PARAMS ((cpp_reader *, unsigned int, const cpp_string *)); void (*def_pragma) PARAMS ((cpp_reader *, unsigned int)); }; - #define CPP_FATAL_LIMIT 1000 - /* True if we have seen a "fatal" error. */ - #define CPP_FATAL_ERRORS(PFILE) (cpp_errors (PFILE) >= CPP_FATAL_LIMIT) - /* Name under which this program was invoked. */ extern const char *progname; --- 417,427 ---- void (*undef) PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *)); void (*ident) PARAMS ((cpp_reader *, unsigned int, const cpp_string *)); void (*def_pragma) PARAMS ((cpp_reader *, unsigned int)); + /* Called when the client has a chance to properly register + built-ins with cpp_define() and cpp_assert(). */ + void (*register_builtins) PARAMS ((cpp_reader *)); }; /* Name under which this program was invoked. */ extern const char *progname; *************** struct cpp_hashnode *** 463,468 **** --- 495,512 ---- /* Call this first to get a handle to pass to other functions. */ extern cpp_reader *cpp_create_reader PARAMS ((enum c_lang)); + /* Call this to change the selected language standard (e.g. because of + command line options). */ + extern void cpp_set_lang PARAMS ((cpp_reader *, enum c_lang)); + + /* Add a dependency TARGET. Quote it for "make" if QUOTE. Can be + called any number of times before cpp_read_main_file(). If no + targets have been added before cpp_read_main_file(), then the + default target is used. */ + extern void cpp_add_dependency_target PARAMS ((cpp_reader *, + const char * target, + int quote)); + /* Call these to get pointers to the options and callback structures for a given reader. These pointers are good until you call cpp_finish on that reader. You can either edit the callbacks *************** extern void cpp_set_callbacks PARAMS ((c *** 476,489 **** /* Now call cpp_handle_option[s] to handle 1[or more] switches. The return value is the number of arguments used. If cpp_handle_options returns without using all arguments, it couldn't ! understand the next switch. When there are no switches left, you ! must call cpp_post_options before calling cpp_read_main_file. Only ! after cpp_post_options are the contents of the cpp_options ! structure reliable. Options processing is not completed until you ! call cpp_finish_options. */ extern int cpp_handle_options PARAMS ((cpp_reader *, int, char **)); ! extern int cpp_handle_option PARAMS ((cpp_reader *, int, char **, int)); ! extern void cpp_post_options PARAMS ((cpp_reader *)); /* This function reads the file, but does not start preprocessing. It returns the name of the original file; this is the same as the --- 520,529 ---- /* Now call cpp_handle_option[s] to handle 1[or more] switches. The return value is the number of arguments used. If cpp_handle_options returns without using all arguments, it couldn't ! understand the next switch. Options processing is not completed ! until you call cpp_finish_options. */ extern int cpp_handle_options PARAMS ((cpp_reader *, int, char **)); ! extern int cpp_handle_option PARAMS ((cpp_reader *, int, char **)); /* This function reads the file, but does not start preprocessing. It returns the name of the original file; this is the same as the *************** extern void cpp_post_options PARAMS ((cp *** 492,498 **** too. If there was an error opening the file, it returns NULL. If you want cpplib to manage its own hashtable, pass in a NULL ! pointer. Otherise you should pass in an initialised hash table that cpplib will share; this technique is used by the C front ends. */ extern const char *cpp_read_main_file PARAMS ((cpp_reader *, const char *, --- 532,538 ---- too. If there was an error opening the file, it returns NULL. If you want cpplib to manage its own hashtable, pass in a NULL ! pointer. Otherise you should pass in an initialized hash table that cpplib will share; this technique is used by the C front ends. */ extern const char *cpp_read_main_file PARAMS ((cpp_reader *, const char *, *************** extern const char *cpp_read_main_file PA *** 505,514 **** from cpp_read_main_file, before they get debug callbacks. */ extern void cpp_finish_options PARAMS ((cpp_reader *)); /* Call this to release the handle at the end of preprocessing. Any use of the handle after this function returns is invalid. Returns cpp_errors (pfile). */ ! extern int cpp_destroy PARAMS ((cpp_reader *)); /* Error count. */ extern unsigned int cpp_errors PARAMS ((cpp_reader *)); --- 545,561 ---- from cpp_read_main_file, before they get debug callbacks. */ extern void cpp_finish_options PARAMS ((cpp_reader *)); + /* Call this to finish preprocessing. If you requested dependency + generation, pass an open stream to write the information to, + otherwise NULL. It is your responsibility to close the stream. + + Returns cpp_errors (pfile). */ + extern int cpp_finish PARAMS ((cpp_reader *, FILE *deps_stream)); + /* Call this to release the handle at the end of preprocessing. Any use of the handle after this function returns is invalid. Returns cpp_errors (pfile). */ ! extern void cpp_destroy PARAMS ((cpp_reader *)); /* Error count. */ extern unsigned int cpp_errors PARAMS ((cpp_reader *)); *************** extern void cpp_register_pragma PARAMS ( *** 522,528 **** const char *, const char *, void (*) PARAMS ((cpp_reader *)))); - extern void cpp_finish PARAMS ((cpp_reader *)); extern int cpp_avoid_paste PARAMS ((cpp_reader *, const cpp_token *, const cpp_token *)); extern const cpp_token *cpp_get_token PARAMS ((cpp_reader *)); --- 569,574 ---- *************** extern const unsigned char *cpp_macro_de *** 531,540 **** extern void _cpp_backup_tokens PARAMS ((cpp_reader *, unsigned int)); /* Evaluate a CPP_CHAR or CPP_WCHAR token. */ ! extern HOST_WIDE_INT cpp_interpret_charconst PARAMS ((cpp_reader *, const cpp_token *, ! int, int, unsigned int *)); extern void cpp_define PARAMS ((cpp_reader *, const char *)); extern void cpp_assert PARAMS ((cpp_reader *, const char *)); extern void cpp_undef PARAMS ((cpp_reader *, const char *)); --- 577,588 ---- extern void _cpp_backup_tokens PARAMS ((cpp_reader *, unsigned int)); /* Evaluate a CPP_CHAR or CPP_WCHAR token. */ ! extern cppchar_t cpp_interpret_charconst PARAMS ((cpp_reader *, const cpp_token *, ! unsigned int *, int *)); + /* Used to register builtins during the register_builtins callback. + The text is the same as the command line argument. */ extern void cpp_define PARAMS ((cpp_reader *, const char *)); extern void cpp_assert PARAMS ((cpp_reader *, const char *)); extern void cpp_undef PARAMS ((cpp_reader *, const char *)); *************** extern cpp_buffer *cpp_push_buffer PARAM *** 545,576 **** int, int)); extern int cpp_defined PARAMS ((cpp_reader *, const unsigned char *, int)); /* N.B. The error-message-printer prototypes have not been nicely formatted because exgettext needs to see 'msgid' on the same line as the name of the function in order to work properly. Only the string argument gets a name in an effort to keep the lines from getting ridiculously oversized. */ ! extern void cpp_ice PARAMS ((cpp_reader *, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_2; ! extern void cpp_fatal PARAMS ((cpp_reader *, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_2; ! extern void cpp_error PARAMS ((cpp_reader *, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_2; ! extern void cpp_warning PARAMS ((cpp_reader *, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_2; ! extern void cpp_pedwarn PARAMS ((cpp_reader *, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_2; ! extern void cpp_notice PARAMS ((cpp_reader *, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_2; ! extern void cpp_error_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_4; ! extern void cpp_warning_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_4; ! extern void cpp_pedwarn_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_4; ! extern void cpp_error_from_errno PARAMS ((cpp_reader *, const char *)); ! extern void cpp_notice_from_errno PARAMS ((cpp_reader *, const char *)); /* In cpplex.c */ extern int cpp_ideq PARAMS ((const cpp_token *, --- 593,687 ---- int, int)); extern int cpp_defined PARAMS ((cpp_reader *, const unsigned char *, int)); + /* A preprocessing number. Code assumes that any unused high bits of + the double integer are set to zero. */ + typedef unsigned HOST_WIDE_INT cpp_num_part; + typedef struct cpp_num cpp_num; + struct cpp_num + { + cpp_num_part high; + cpp_num_part low; + bool unsignedp; /* True if value should be treated as unsigned. */ + bool overflow; /* True if the most recent calculation overflowed. */ + }; + + /* cpplib provides two interfaces for interpretation of preprocessing + numbers. + + cpp_classify_number categorizes numeric constants according to + their field (integer, floating point, or invalid), radix (decimal, + octal, hexadecimal), and type suffixes. */ + + #define CPP_N_CATEGORY 0x000F + #define CPP_N_INVALID 0x0000 + #define CPP_N_INTEGER 0x0001 + #define CPP_N_FLOATING 0x0002 + + #define CPP_N_WIDTH 0x00F0 + #define CPP_N_SMALL 0x0010 /* int, float. */ + #define CPP_N_MEDIUM 0x0020 /* long, double. */ + #define CPP_N_LARGE 0x0040 /* long long, long double. */ + + #define CPP_N_RADIX 0x0F00 + #define CPP_N_DECIMAL 0x0100 + #define CPP_N_HEX 0x0200 + #define CPP_N_OCTAL 0x0400 + + #define CPP_N_UNSIGNED 0x1000 /* Properties. */ + #define CPP_N_IMAGINARY 0x2000 + + /* Classify a CPP_NUMBER token. The return value is a combination of + the flags from the above sets. */ + extern unsigned cpp_classify_number PARAMS ((cpp_reader *, const cpp_token *)); + + /* Evaluate a token classified as category CPP_N_INTEGER. */ + extern cpp_num cpp_interpret_integer PARAMS ((cpp_reader *, const cpp_token *, + unsigned int type)); + + /* Sign extend a number, with PRECISION significant bits and all + others assumed clear, to fill out a cpp_num structure. */ + cpp_num cpp_num_sign_extend PARAMS ((cpp_num, size_t)); + + /* Diagnostic levels. To get a dianostic without associating a + position in the translation unit with it, use cpp_error_with_line + with a line number of zero. */ + + /* Warning, an error with -Werror. */ + #define DL_WARNING 0x00 + /* Same as DL_WARNING, except it is not suppressed in system headers. */ + #define DL_WARNING_SYSHDR 0x01 + /* Warning, an error with -pedantic-errors or -Werror. */ + #define DL_PEDWARN 0x02 + /* An error. */ + #define DL_ERROR 0x03 + /* An internal consistency check failed. Prints "internal error: ", + otherwise the same as DL_ERROR. */ + #define DL_ICE 0x04 + /* Extracts a diagnostic level from an int. */ + #define DL_EXTRACT(l) (l & 0xf) + /* Nonzero if a diagnostic level is one of the warnings. */ + #define DL_WARNING_P(l) (DL_EXTRACT (l) >= DL_WARNING \ + && DL_EXTRACT (l) <= DL_PEDWARN) + /* N.B. The error-message-printer prototypes have not been nicely formatted because exgettext needs to see 'msgid' on the same line as the name of the function in order to work properly. Only the string argument gets a name in an effort to keep the lines from getting ridiculously oversized. */ ! /* Output a diagnostic of some kind. */ ! extern void cpp_error PARAMS ((cpp_reader *, int, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_3; ! ! /* Output a diagnostic of severity LEVEL, with "MSG: " preceding the ! error string of errno. No location is printed. */ ! extern void cpp_errno PARAMS ((cpp_reader *, int level, const char *msg)); ! ! /* Same as cpp_error, except additionally specifies a position as a ! (translation unit) physical line and physical column. If the line is ! zero, then no location is printed. */ ! extern void cpp_error_with_line PARAMS ((cpp_reader *, int, unsigned, unsigned, const char *msgid, ...)) ! ATTRIBUTE_PRINTF_5; /* In cpplex.c */ extern int cpp_ideq PARAMS ((const cpp_token *, *************** extern int cpp_ideq PARAMS ((const cpp *** 578,587 **** extern void cpp_output_line PARAMS ((cpp_reader *, FILE *)); extern void cpp_output_token PARAMS ((const cpp_token *, FILE *)); extern const char *cpp_type2name PARAMS ((enum cpp_ttype)); ! extern unsigned int cpp_parse_escape PARAMS ((cpp_reader *, ! const unsigned char **, ! const unsigned char *, ! unsigned HOST_WIDE_INT, int)); /* In cpphash.c */ --- 689,703 ---- extern void cpp_output_line PARAMS ((cpp_reader *, FILE *)); extern void cpp_output_token PARAMS ((const cpp_token *, FILE *)); extern const char *cpp_type2name PARAMS ((enum cpp_ttype)); ! /* Returns the value of an escape sequence, truncated to the correct ! target precision. PSTR points to the input pointer, which is just ! after the backslash. LIMIT is how much text we have. WIDE is true ! if the escape sequence is part of a wide character constant or ! string literal. Handles all relevant diagnostics. */ ! extern cppchar_t cpp_parse_escape PARAMS ((cpp_reader *, ! const unsigned char ** pstr, ! const unsigned char *limit, ! int wide)); /* In cpphash.c */ *************** extern unsigned char *cpp_quote_string P *** 606,611 **** --- 722,730 ---- extern int cpp_included PARAMS ((cpp_reader *, const char *)); extern void cpp_make_system_header PARAMS ((cpp_reader *, int, int)); + /* In cppmain.c */ + extern void cpp_preprocess_file PARAMS ((cpp_reader *, const char *, FILE *)); + #ifdef __cplusplus } #endif diff -Nrc3pad gcc-3.2.3/gcc/cppmacro.c gcc-3.3/gcc/cppmacro.c *** gcc-3.2.3/gcc/cppmacro.c 2002-09-28 00:32:14.000000000 +0000 --- gcc-3.3/gcc/cppmacro.c 2003-02-21 18:14:10.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 28,45 **** #include "cpplib.h" #include "cpphash.h" - struct cpp_macro - { - cpp_hashnode **params; /* Parameters, if any. */ - cpp_token *expansion; /* First token of replacement list. */ - unsigned int line; /* Starting line number. */ - unsigned int count; /* Number of tokens in expansion. */ - unsigned short paramc; /* Number of parameters. */ - unsigned int fun_like : 1; /* If a function-like macro. */ - unsigned int variadic : 1; /* If a variadic macro. */ - unsigned int syshdr : 1; /* If macro defined in system header. */ - }; - typedef struct macro_arg macro_arg; struct macro_arg { --- 28,33 ---- *************** static cpp_context *next_context PARAMS *** 64,91 **** static const cpp_token *padding_token PARAMS ((cpp_reader *, const cpp_token *)); static void expand_arg PARAMS ((cpp_reader *, macro_arg *)); ! static const cpp_token *new_string_token PARAMS ((cpp_reader *, U_CHAR *, unsigned int)); - static const cpp_token *new_number_token PARAMS ((cpp_reader *, unsigned int)); static const cpp_token *stringify_arg PARAMS ((cpp_reader *, macro_arg *)); static void paste_all_tokens PARAMS ((cpp_reader *, const cpp_token *)); static bool paste_tokens PARAMS ((cpp_reader *, const cpp_token **, const cpp_token *)); ! static void replace_args PARAMS ((cpp_reader *, cpp_hashnode *, macro_arg *)); static _cpp_buff *funlike_invocation_p PARAMS ((cpp_reader *, cpp_hashnode *)); /* #define directive parsing and handling. */ static cpp_token *alloc_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); static cpp_token *lex_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); ! static int warn_of_redefinition PARAMS ((const cpp_hashnode *, ! const cpp_macro *)); ! static int save_parameter PARAMS ((cpp_reader *, cpp_macro *, cpp_hashnode *)); ! static int parse_params PARAMS ((cpp_reader *, cpp_macro *)); static void check_trad_stringification PARAMS ((cpp_reader *, const cpp_macro *, const cpp_string *)); /* Allocates and returns a CPP_STRING token, containing TEXT of length LEN, after null-terminating it. TEXT must be in permanent storage. */ static const cpp_token * --- 52,102 ---- static const cpp_token *padding_token PARAMS ((cpp_reader *, const cpp_token *)); static void expand_arg PARAMS ((cpp_reader *, macro_arg *)); ! static const cpp_token *new_string_token PARAMS ((cpp_reader *, uchar *, unsigned int)); static const cpp_token *stringify_arg PARAMS ((cpp_reader *, macro_arg *)); static void paste_all_tokens PARAMS ((cpp_reader *, const cpp_token *)); static bool paste_tokens PARAMS ((cpp_reader *, const cpp_token **, const cpp_token *)); ! static void replace_args PARAMS ((cpp_reader *, cpp_hashnode *, cpp_macro *, ! macro_arg *)); static _cpp_buff *funlike_invocation_p PARAMS ((cpp_reader *, cpp_hashnode *)); + static bool create_iso_definition PARAMS ((cpp_reader *, cpp_macro *)); /* #define directive parsing and handling. */ static cpp_token *alloc_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); static cpp_token *lex_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); ! static bool warn_of_redefinition PARAMS ((cpp_reader *, const cpp_hashnode *, ! const cpp_macro *)); ! static bool parse_params PARAMS ((cpp_reader *, cpp_macro *)); static void check_trad_stringification PARAMS ((cpp_reader *, const cpp_macro *, const cpp_string *)); + /* Emits a warning if NODE is a macro defined in the main file that + has not been used. */ + int + _cpp_warn_if_unused_macro (pfile, node, v) + cpp_reader *pfile; + cpp_hashnode *node; + void *v ATTRIBUTE_UNUSED; + { + if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) + { + cpp_macro *macro = node->value.macro; + + if (!macro->used + /* Skip front-end built-ins and command line macros. */ + && macro->line >= pfile->first_unused_line + && MAIN_FILE_P (lookup_line (&pfile->line_maps, macro->line))) + cpp_error_with_line (pfile, DL_WARNING, macro->line, 0, + "macro \"%s\" is not used", NODE_NAME (node)); + } + + return 1; + } + /* Allocates and returns a CPP_STRING token, containing TEXT of length LEN, after null-terminating it. TEXT must be in permanent storage. */ static const cpp_token * *************** new_string_token (pfile, text, len) *** 104,127 **** return token; } - /* Allocates and returns a CPP_NUMBER token evaluating to NUMBER. */ - static const cpp_token * - new_number_token (pfile, number) - cpp_reader *pfile; - unsigned int number; - { - cpp_token *token = _cpp_temp_token (pfile); - /* 21 bytes holds all NUL-terminated unsigned 64-bit numbers. */ - unsigned char *buf = _cpp_unaligned_alloc (pfile, 21); - - sprintf ((char *) buf, "%u", number); - token->type = CPP_NUMBER; - token->val.str.text = buf; - token->val.str.len = ustrlen (buf); - token->flags = 0; - return token; - } - static const char * const monthnames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", --- 115,120 ---- *************** static const char * const monthnames[] = *** 132,156 **** on the context stack. Also handles _Pragma, for which no new token is created. Returns 1 if it generates a new token context, 0 to return the token to the caller. */ ! static int ! builtin_macro (pfile, node) cpp_reader *pfile; cpp_hashnode *node; { ! const cpp_token *result; switch (node->value.builtin) { default: ! cpp_ice (pfile, "invalid built-in macro \"%s\"", NODE_NAME (node)); ! return 0; case BT_FILE: case BT_BASE_FILE: { unsigned int len; const char *name; ! U_CHAR *buf; const struct line_map *map = pfile->map; if (node->value.builtin == BT_BASE_FILE) --- 125,151 ---- on the context stack. Also handles _Pragma, for which no new token is created. Returns 1 if it generates a new token context, 0 to return the token to the caller. */ ! const uchar * ! _cpp_builtin_macro_text (pfile, node) cpp_reader *pfile; cpp_hashnode *node; { ! const uchar *result = NULL; ! unsigned int number = 1; switch (node->value.builtin) { default: ! cpp_error (pfile, DL_ICE, "invalid built-in macro \"%s\"", ! NODE_NAME (node)); ! break; case BT_FILE: case BT_BASE_FILE: { unsigned int len; const char *name; ! uchar *buf; const struct line_map *map = pfile->map; if (node->value.builtin == BT_BASE_FILE) *************** builtin_macro (pfile, node) *** 159,168 **** name = map->to_file; len = strlen (name); ! buf = _cpp_unaligned_alloc (pfile, len * 4 + 1); ! len = cpp_quote_string (buf, (const unsigned char *) name, len) - buf; ! ! result = new_string_token (pfile, buf, len); } break; --- 154,165 ---- name = map->to_file; len = strlen (name); ! buf = _cpp_unaligned_alloc (pfile, len * 4 + 3); ! result = buf; ! *buf = '"'; ! buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); ! *buf++ = '"'; ! *buf = '\0'; } break; *************** builtin_macro (pfile, node) *** 170,230 **** /* The line map depth counts the primary source as level 1, but historically __INCLUDE_DEPTH__ has called the primary source level 0. */ ! result = new_number_token (pfile, pfile->line_maps.depth - 1); break; case BT_SPECLINE: /* If __LINE__ is embedded in a macro, it must expand to the line of the macro's invocation, not its definition. Otherwise things like assert() will not work properly. */ ! result = new_number_token (pfile, ! SOURCE_LINE (pfile->map, ! pfile->cur_token[-1].line)); break; case BT_STDC: { ! int stdc = (!CPP_IN_SYSTEM_HEADER (pfile) ! || pfile->spec_nodes.n__STRICT_ANSI__->type != NT_VOID); ! result = new_number_token (pfile, stdc); } break; case BT_DATE: case BT_TIME: ! if (pfile->date.type == CPP_EOF) { /* Allocate __DATE__ and __TIME__ strings from permanent storage. We only do this once, and don't generate them at init time, because time() and localtime() are very slow on some systems. */ ! time_t tt = time (NULL); ! struct tm *tb = localtime (&tt); ! pfile->date.val.str.text = ! _cpp_unaligned_alloc (pfile, sizeof ("Oct 11 1347")); ! pfile->date.val.str.len = sizeof ("Oct 11 1347") - 1; ! pfile->date.type = CPP_STRING; ! pfile->date.flags = 0; ! sprintf ((char *) pfile->date.val.str.text, "%s %2d %4d", ! monthnames[tb->tm_mon], tb->tm_mday, tb->tm_year + 1900); ! pfile->time.val.str.text = ! _cpp_unaligned_alloc (pfile, sizeof ("12:34:56")); ! pfile->time.val.str.len = sizeof ("12:34:56") - 1; ! pfile->time.type = CPP_STRING; ! pfile->time.flags = 0; ! sprintf ((char *) pfile->time.val.str.text, "%02d:%02d:%02d", ! tb->tm_hour, tb->tm_min, tb->tm_sec); } if (node->value.builtin == BT_DATE) ! result = &pfile->date; else ! result = &pfile->time; break; ! case BT_PRAGMA: /* Don't interpret _Pragma within directives. The standard is not clear on this, but to me this makes most sense. */ if (pfile->state.in_directive) --- 167,273 ---- /* The line map depth counts the primary source as level 1, but historically __INCLUDE_DEPTH__ has called the primary source level 0. */ ! number = pfile->line_maps.depth - 1; break; case BT_SPECLINE: /* If __LINE__ is embedded in a macro, it must expand to the line of the macro's invocation, not its definition. Otherwise things like assert() will not work properly. */ ! if (CPP_OPTION (pfile, traditional)) ! number = pfile->line; ! else ! number = pfile->cur_token[-1].line; ! number = SOURCE_LINE (pfile->map, number); break; + /* __STDC__ has the value 1 under normal circumstances. + However, if (a) we are in a system header, (b) the option + stdc_0_in_system_headers is true (set by target config), and + (c) we are not in strictly conforming mode, then it has the + value 0. */ case BT_STDC: { ! if (CPP_IN_SYSTEM_HEADER (pfile) ! && CPP_OPTION (pfile, stdc_0_in_system_headers) ! && !CPP_OPTION (pfile,std)) ! number = 0; ! else ! number = 1; } break; case BT_DATE: case BT_TIME: ! if (pfile->date == NULL) { /* Allocate __DATE__ and __TIME__ strings from permanent storage. We only do this once, and don't generate them at init time, because time() and localtime() are very slow on some systems. */ ! time_t tt; ! struct tm *tb = NULL; ! /* (time_t) -1 is a legitimate value for "number of seconds ! since the Epoch", so we have to do a little dance to ! distinguish that from a genuine error. */ ! errno = 0; ! tt = time(NULL); ! if (tt != (time_t)-1 || errno == 0) ! tb = localtime (&tt); ! if (tb) ! { ! pfile->date = _cpp_unaligned_alloc (pfile, ! sizeof ("\"Oct 11 1347\"")); ! sprintf ((char *) pfile->date, "\"%s %2d %4d\"", ! monthnames[tb->tm_mon], tb->tm_mday, tb->tm_year + 1900); ! ! pfile->time = _cpp_unaligned_alloc (pfile, ! sizeof ("\"12:34:56\"")); ! sprintf ((char *) pfile->time, "\"%02d:%02d:%02d\"", ! tb->tm_hour, tb->tm_min, tb->tm_sec); ! } ! else ! { ! cpp_errno (pfile, DL_WARNING, ! "could not determine date and time"); ! ! pfile->date = U"\"??? ?? ????\""; ! pfile->time = U"\"??:??:??\""; ! } } if (node->value.builtin == BT_DATE) ! result = pfile->date; else ! result = pfile->time; break; + } ! if (result == NULL) ! { ! /* 21 bytes holds all NUL-terminated unsigned 64-bit numbers. */ ! result = _cpp_unaligned_alloc (pfile, 21); ! sprintf ((char *) result, "%u", number); ! } ! ! return result; ! } ! ! /* Convert builtin macros like __FILE__ to a token and push it on the ! context stack. Also handles _Pragma, for which no new token is ! created. Returns 1 if it generates a new token context, 0 to ! return the token to the caller. */ ! static int ! builtin_macro (pfile, node) ! cpp_reader *pfile; ! cpp_hashnode *node; ! { ! const uchar *buf; ! ! if (node->value.builtin == BT_PRAGMA) ! { /* Don't interpret _Pragma within directives. The standard is not clear on this, but to me this makes most sense. */ if (pfile->state.in_directive) *************** builtin_macro (pfile, node) *** 234,240 **** return 1; } ! push_token_context (pfile, NULL, result, 1); return 1; } --- 277,300 ---- return 1; } ! buf = _cpp_builtin_macro_text (pfile, node); ! ! cpp_push_buffer (pfile, buf, ustrlen (buf), /* from_stage3 */ true, 1); ! ! /* Tweak the column number the lexer will report. */ ! pfile->buffer->col_adjust = pfile->cur_token[-1].col - 1; ! ! /* We don't want a leading # to be interpreted as a directive. */ ! pfile->buffer->saved_flags = 0; ! ! /* Set pfile->cur_token as required by _cpp_lex_direct. */ ! pfile->cur_token = _cpp_temp_token (pfile); ! push_token_context (pfile, NULL, _cpp_lex_direct (pfile), 1); ! if (pfile->buffer->cur != pfile->buffer->rlimit) ! cpp_error (pfile, DL_ICE, "invalid built-in macro \"%s\"", ! NODE_NAME (node)); ! _cpp_pop_buffer (pfile); ! return 1; } *************** builtin_macro (pfile, node) *** 242,256 **** backslashes and double quotes. Non-printable characters are converted to octal. DEST must be of sufficient size. Returns a pointer to the end of the string. */ ! U_CHAR * cpp_quote_string (dest, src, len) ! U_CHAR *dest; ! const U_CHAR *src; unsigned int len; { while (len--) { ! U_CHAR c = *src++; if (c == '\\' || c == '"') { --- 302,316 ---- backslashes and double quotes. Non-printable characters are converted to octal. DEST must be of sufficient size. Returns a pointer to the end of the string. */ ! uchar * cpp_quote_string (dest, src, len) ! uchar *dest; ! const uchar *src; unsigned int len; { while (len--) { ! uchar c = *src++; if (c == '\\' || c == '"') { *************** stringify_arg (pfile, arg) *** 343,349 **** /* Ignore the final \ of invalid string literals. */ if (backslash_count & 1) { ! cpp_warning (pfile, "invalid string literal, ignoring final '\\'"); dest--; } --- 403,410 ---- /* Ignore the final \ of invalid string literals. */ if (backslash_count & 1) { ! cpp_error (pfile, DL_WARNING, ! "invalid string literal, ignoring final '\\'"); dest--; } *************** stringify_arg (pfile, arg) *** 359,365 **** return new_string_token (pfile, dest - len, len); } ! /* Try to paste two tokens. On success, return non-zero. In any case, PLHS is updated to point to the pasted token, which is guaranteed to not have the PASTE_LEFT flag set. */ static bool --- 420,426 ---- return new_string_token (pfile, dest - len, len); } ! /* Try to paste two tokens. On success, return nonzero. In any case, PLHS is updated to point to the pasted token, which is guaranteed to not have the PASTE_LEFT flag set. */ static bool *************** paste_tokens (pfile, plhs, rhs) *** 381,388 **** It is simpler to insert a space here, rather than modifying the lexer to ignore comments in some circumstances. Simply returning false doesn't work, since we want to clear the PASTE_LEFT flag. */ ! if (lhs->type == CPP_DIV ! && (rhs->type == CPP_MULT || rhs->type == CPP_DIV)) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end); *end = '\0'; --- 442,448 ---- It is simpler to insert a space here, rather than modifying the lexer to ignore comments in some circumstances. Simply returning false doesn't work, since we want to clear the PASTE_LEFT flag. */ ! if (lhs->type == CPP_DIV && rhs->type != CPP_EQ) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end); *end = '\0'; *************** paste_all_tokens (pfile, lhs) *** 427,435 **** inserted. In either case, the constraints to #define guarantee we have at least one more token. */ if (context->direct_p) ! rhs = context->first.token++; else ! rhs = *context->first.ptoken++; if (rhs->type == CPP_PADDING) abort (); --- 487,495 ---- inserted. In either case, the constraints to #define guarantee we have at least one more token. */ if (context->direct_p) ! rhs = FIRST (context).token++; else ! rhs = *FIRST (context).ptoken++; if (rhs->type == CPP_PADDING) abort (); *************** paste_all_tokens (pfile, lhs) *** 438,449 **** { _cpp_backup_tokens (pfile, 1); ! /* Mandatory warning for all apart from assembler. */ if (CPP_OPTION (pfile, lang) != CLK_ASM) ! cpp_warning (pfile, "pasting \"%s\" and \"%s\" does not give a valid preprocessing token", ! cpp_token_as_text (pfile, lhs), ! cpp_token_as_text (pfile, rhs)); break; } } --- 498,509 ---- { _cpp_backup_tokens (pfile, 1); ! /* Mandatory error for all apart from assembler. */ if (CPP_OPTION (pfile, lang) != CLK_ASM) ! cpp_error (pfile, DL_ERROR, "pasting \"%s\" and \"%s\" does not give a valid preprocessing token", ! cpp_token_as_text (pfile, lhs), ! cpp_token_as_text (pfile, rhs)); break; } } *************** paste_all_tokens (pfile, lhs) *** 453,458 **** --- 513,564 ---- push_token_context (pfile, NULL, lhs, 1); } + /* Returns TRUE if the number of arguments ARGC supplied in an + invocation of the MACRO referenced by NODE is valid. An empty + invocation to a macro with no parameters should pass ARGC as zero. + + Note that MACRO cannot necessarily be deduced from NODE, in case + NODE was redefined whilst collecting arguments. */ + bool + _cpp_arguments_ok (pfile, macro, node, argc) + cpp_reader *pfile; + cpp_macro *macro; + const cpp_hashnode *node; + unsigned int argc; + { + if (argc == macro->paramc) + return true; + + if (argc < macro->paramc) + { + /* As an extension, a rest argument is allowed to not appear in + the invocation at all. + e.g. #define debug(format, args...) something + debug("string"); + + This is exactly the same as if there had been an empty rest + argument - debug("string", ). */ + + if (argc + 1 == macro->paramc && macro->variadic) + { + if (CPP_PEDANTIC (pfile) && ! macro->syshdr) + cpp_error (pfile, DL_PEDWARN, + "ISO C99 requires rest arguments to be used"); + return true; + } + + cpp_error (pfile, DL_ERROR, + "macro \"%s\" requires %u arguments, but only %u given", + NODE_NAME (node), macro->paramc, argc); + } + else + cpp_error (pfile, DL_ERROR, + "macro \"%s\" passed %u arguments, but takes just %u", + NODE_NAME (node), argc, macro->paramc); + + return false; + } + /* Reads and returns the arguments to a function-like macro invocation. Assumes the opening parenthesis has been processed. If there is an error, emits an appropriate diagnostic and returns *************** collect_args (pfile, node) *** 468,474 **** macro_arg *args, *arg; const cpp_token *token; unsigned int argc; - bool error = false; macro = node->value.macro; if (macro->paramc) --- 574,579 ---- *************** collect_args (pfile, node) *** 550,639 **** arg++; } } ! while (token->type != CPP_CLOSE_PAREN ! && token->type != CPP_EOF ! && token->type != CPP_HASH); ! if (token->type == CPP_EOF || token->type == CPP_HASH) { - bool step_back = false; - - /* 6.10.3 paragraph 11: If there are sequences of preprocessing - tokens within the list of arguments that would otherwise act - as preprocessing directives, the behavior is undefined. - - This implementation will report a hard error, terminate the - macro invocation, and proceed to process the directive. */ - if (token->type == CPP_HASH) - { - cpp_error (pfile, - "directives may not be used inside a macro argument"); - step_back = true; - } - else - step_back = (pfile->context->prev || pfile->state.in_directive); - /* We still need the CPP_EOF to end directives, and to end pre-expansion of a macro argument. Step back is not unconditional, since we don't want to return a CPP_EOF to our callers at the end of an -include-d file. */ ! if (step_back) _cpp_backup_tokens (pfile, 1); ! cpp_error (pfile, "unterminated argument list invoking macro \"%s\"", NODE_NAME (node)); - error = true; - } - else if (argc < macro->paramc) - { - /* As an extension, a rest argument is allowed to not appear in - the invocation at all. - e.g. #define debug(format, args...) something - debug("string"); - - This is exactly the same as if there had been an empty rest - argument - debug("string", ). */ - - if (argc + 1 == macro->paramc && macro->variadic) - { - if (CPP_PEDANTIC (pfile) && ! macro->syshdr) - cpp_pedwarn (pfile, "ISO C99 requires rest arguments to be used"); - } - else - { - cpp_error (pfile, - "macro \"%s\" requires %u arguments, but only %u given", - NODE_NAME (node), macro->paramc, argc); - error = true; - } } ! else if (argc > macro->paramc) { ! /* Empty argument to a macro taking no arguments is OK. */ ! if (argc != 1 || arg->count) { ! cpp_error (pfile, ! "macro \"%s\" passed %u arguments, but takes just %u", ! NODE_NAME (node), argc, macro->paramc); ! error = true; ! } ! } ! ! if (!error) ! { ! /* GCC has special semantics for , ## b where b is a varargs ! parameter: we remove the comma if b was omitted entirely. ! If b was merely an empty argument, the comma is retained. ! If the macro takes just one (varargs) parameter, then we ! retain the comma only if we are standards conforming. ! If FIRST is NULL replace_args () swallows the comma. */ ! if (macro->variadic && (argc < macro->paramc ! || (argc == 1 && args[0].count == 0 ! && !CPP_OPTION (pfile, std)))) ! args[macro->paramc - 1].first = NULL; ! return base_buff; } _cpp_release_buff (pfile, base_buff); return NULL; } --- 655,697 ---- arg++; } } ! while (token->type != CPP_CLOSE_PAREN && token->type != CPP_EOF); ! if (token->type == CPP_EOF) { /* We still need the CPP_EOF to end directives, and to end pre-expansion of a macro argument. Step back is not unconditional, since we don't want to return a CPP_EOF to our callers at the end of an -include-d file. */ ! if (pfile->context->prev || pfile->state.in_directive) _cpp_backup_tokens (pfile, 1); ! cpp_error (pfile, DL_ERROR, ! "unterminated argument list invoking macro \"%s\"", NODE_NAME (node)); } ! else { ! /* A single empty argument is counted as no argument. */ ! if (argc == 1 && macro->paramc == 0 && args[0].count == 0) ! argc = 0; ! if (_cpp_arguments_ok (pfile, macro, node, argc)) { ! /* GCC has special semantics for , ## b where b is a varargs ! parameter: we remove the comma if b was omitted entirely. ! If b was merely an empty argument, the comma is retained. ! If the macro takes just one (varargs) parameter, then we ! retain the comma only if we are standards conforming. ! If FIRST is NULL replace_args () swallows the comma. */ ! if (macro->variadic && (argc < macro->paramc ! || (argc == 1 && args[0].count == 0 ! && !CPP_OPTION (pfile, std)))) ! args[macro->paramc - 1].first = NULL; ! return base_buff; ! } } + /* An error occurred. */ _cpp_release_buff (pfile, base_buff); return NULL; } *************** enter_macro_context (pfile, node) *** 714,736 **** if (buff == NULL) { if (CPP_WTRADITIONAL (pfile) && ! node->value.macro->syshdr) ! cpp_warning (pfile, "function-like macro \"%s\" must be used with arguments in traditional C", ! NODE_NAME (node)); return 0; } ! if (node->value.macro->paramc > 0) ! replace_args (pfile, node, (macro_arg *) buff->base); _cpp_release_buff (pfile, buff); } /* Disable the macro within its expansion. */ node->flags |= NODE_DISABLED; if (macro->paramc == 0) ! push_token_context (pfile, node, macro->expansion, macro->count); return 1; } --- 772,796 ---- if (buff == NULL) { if (CPP_WTRADITIONAL (pfile) && ! node->value.macro->syshdr) ! cpp_error (pfile, DL_WARNING, "function-like macro \"%s\" must be used with arguments in traditional C", ! NODE_NAME (node)); return 0; } ! if (macro->paramc > 0) ! replace_args (pfile, node, macro, (macro_arg *) buff->base); _cpp_release_buff (pfile, buff); } /* Disable the macro within its expansion. */ node->flags |= NODE_DISABLED; + macro->used = 1; + if (macro->paramc == 0) ! push_token_context (pfile, node, macro->exp.tokens, macro->count); return 1; } *************** enter_macro_context (pfile, node) *** 744,752 **** Expand each argument before replacing, unless it is operated upon by the # or ## operators. */ static void ! replace_args (pfile, node, args) cpp_reader *pfile; cpp_hashnode *node; macro_arg *args; { unsigned int i, total; --- 804,813 ---- Expand each argument before replacing, unless it is operated upon by the # or ## operators. */ static void ! replace_args (pfile, node, macro, args) cpp_reader *pfile; cpp_hashnode *node; + cpp_macro *macro; macro_arg *args; { unsigned int i, total; *************** replace_args (pfile, node, args) *** 754,770 **** const cpp_token **dest, **first; macro_arg *arg; _cpp_buff *buff; - cpp_macro *macro; /* First, fully macro-expand arguments, calculating the number of tokens in the final expansion as we go. The ordering of the if statements below is subtle; we must handle stringification before pasting. */ - macro = node->value.macro; total = macro->count; ! limit = macro->expansion + macro->count; ! for (src = macro->expansion; src < limit; src++) if (src->type == CPP_MACRO_ARG) { /* Leading and trailing padding tokens. */ --- 815,829 ---- const cpp_token **dest, **first; macro_arg *arg; _cpp_buff *buff; /* First, fully macro-expand arguments, calculating the number of tokens in the final expansion as we go. The ordering of the if statements below is subtle; we must handle stringification before pasting. */ total = macro->count; ! limit = macro->exp.tokens + macro->count; ! for (src = macro->exp.tokens; src < limit; src++) if (src->type == CPP_MACRO_ARG) { /* Leading and trailing padding tokens. */ *************** replace_args (pfile, node, args) *** 780,786 **** arg->stringified = stringify_arg (pfile, arg); } else if ((src->flags & PASTE_LEFT) ! || (src > macro->expansion && (src[-1].flags & PASTE_LEFT))) total += arg->count - 1; else { --- 839,845 ---- arg->stringified = stringify_arg (pfile, arg); } else if ((src->flags & PASTE_LEFT) ! || (src > macro->exp.tokens && (src[-1].flags & PASTE_LEFT))) total += arg->count - 1; else { *************** replace_args (pfile, node, args) *** 796,802 **** first = (const cpp_token **) buff->base; dest = first; ! for (src = macro->expansion; src < limit; src++) { unsigned int count; const cpp_token **from, **paste_flag; --- 855,861 ---- first = (const cpp_token **) buff->base; dest = first; ! for (src = macro->exp.tokens; src < limit; src++) { unsigned int count; const cpp_token **from, **paste_flag; *************** replace_args (pfile, node, args) *** 813,819 **** count = 1, from = &arg->stringified; else if (src->flags & PASTE_LEFT) count = arg->count, from = arg->first; ! else if (src != macro->expansion && (src[-1].flags & PASTE_LEFT)) { count = arg->count, from = arg->first; if (dest != first) --- 872,878 ---- count = 1, from = &arg->stringified; else if (src->flags & PASTE_LEFT) count = arg->count, from = arg->first; ! else if (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)) { count = arg->count, from = arg->first; if (dest != first) *************** replace_args (pfile, node, args) *** 838,845 **** count = arg->expanded_count, from = arg->expanded; /* Padding on the left of an argument (unless RHS of ##). */ ! if (!pfile->state.in_directive ! && src != macro->expansion && !(src[-1].flags & PASTE_LEFT)) *dest++ = padding_token (pfile, src); if (count) --- 897,904 ---- count = arg->expanded_count, from = arg->expanded; /* Padding on the left of an argument (unless RHS of ##). */ ! if ((!pfile->state.in_directive || pfile->state.directive_wants_padding) ! && src != macro->exp.tokens && !(src[-1].flags & PASTE_LEFT)) *dest++ = padding_token (pfile, src); if (count) *************** push_ptoken_context (pfile, macro, buff, *** 927,934 **** context->direct_p = false; context->macro = macro; context->buff = buff; ! context->first.ptoken = first; ! context->last.ptoken = first + count; } /* Push a list of tokens. */ --- 986,993 ---- context->direct_p = false; context->macro = macro; context->buff = buff; ! FIRST (context).ptoken = first; ! LAST (context).ptoken = first + count; } /* Push a list of tokens. */ *************** push_token_context (pfile, macro, first, *** 944,951 **** context->direct_p = true; context->macro = macro; context->buff = NULL; ! context->first.token = first; ! context->last.token = first + count; } /* Expand an argument ARG before replacing parameters in a --- 1003,1028 ---- context->direct_p = true; context->macro = macro; context->buff = NULL; ! FIRST (context).token = first; ! LAST (context).token = first + count; ! } ! ! /* Push a traditional macro's replacement text. */ ! void ! _cpp_push_text_context (pfile, macro, start, len) ! cpp_reader *pfile; ! cpp_hashnode *macro; ! const uchar *start; ! size_t len; ! { ! cpp_context *context = next_context (pfile); ! ! context->direct_p = true; ! context->macro = macro; ! context->buff = NULL; ! CUR (context) = start; ! RLIMIT (context) = start + len; ! macro->flags |= NODE_DISABLED; } /* Expand an argument ARG before replacing parameters in a *************** expand_arg (pfile, arg) *** 960,969 **** --- 1037,1051 ---- macro_arg *arg; { unsigned int capacity; + bool saved_warn_trad; if (arg->count == 0) return; + /* Don't warn about funlike macros when pre-expanding. */ + saved_warn_trad = CPP_WTRADITIONAL (pfile); + CPP_WTRADITIONAL (pfile) = 0; + /* Loop, reading in the arguments. */ capacity = 256; arg->expanded = (const cpp_token **) *************** expand_arg (pfile, arg) *** 990,995 **** --- 1072,1079 ---- } _cpp_pop_context (pfile); + + CPP_WTRADITIONAL (pfile) = saved_warn_trad; } /* Pop the current context off the stack, re-enabling the macro if the *************** cpp_get_token (pfile) *** 1035,1046 **** /* Context->prev == 0 <=> base context. */ if (!context->prev) result = _cpp_lex_token (pfile); ! else if (context->first.token != context->last.token) { if (context->direct_p) ! result = context->first.token++; else ! result = *context->first.ptoken++; if (result->flags & PASTE_LEFT) { --- 1119,1130 ---- /* Context->prev == 0 <=> base context. */ if (!context->prev) result = _cpp_lex_token (pfile); ! else if (FIRST (context).token != LAST (context).token) { if (context->direct_p) ! result = FIRST (context).token++; else ! result = *FIRST (context).ptoken++; if (result->flags & PASTE_LEFT) { *************** cpp_get_token (pfile) *** 1058,1063 **** --- 1142,1150 ---- return &pfile->avoid_paste; } + if (pfile->state.in_directive && result->type == CPP_COMMENT) + continue; + if (result->type != CPP_NAME) break; *************** cpp_get_token (pfile) *** 1065,1071 **** if (node->type != NT_MACRO || (result->flags & NO_EXPAND)) break; ! if (!(node->flags & NODE_DISABLED)) { if (!pfile->state.prevent_expansion --- 1152,1158 ---- if (node->type != NT_MACRO || (result->flags & NO_EXPAND)) break; ! if (!(node->flags & NODE_DISABLED)) { if (!pfile->state.prevent_expansion *************** cpp_sys_macro_p (pfile) *** 1105,1118 **** return node && node->value.macro && node->value.macro->syshdr; } ! /* Read each token in, until EOF. Directives are transparently ! processed. */ void cpp_scan_nooutput (pfile) cpp_reader *pfile; { ! while (cpp_get_token (pfile)->type != CPP_EOF) ! ; } /* Step back one (or more) tokens. Can only step mack more than 1 if --- 1192,1213 ---- return node && node->value.macro && node->value.macro->syshdr; } ! /* Read each token in, until end of the current file. Directives are ! transparently processed. */ void cpp_scan_nooutput (pfile) cpp_reader *pfile; { ! /* Request a CPP_EOF token at the end of this file, rather than ! transparently continuing with the including file. */ ! pfile->buffer->return_at_eof = true; ! ! if (CPP_OPTION (pfile, traditional)) ! while (_cpp_read_logical_line_trad (pfile)) ! ; ! else ! while (cpp_get_token (pfile)->type != CPP_EOF) ! ; } /* Step back one (or more) tokens. Can only step mack more than 1 if *************** _cpp_backup_tokens (pfile, count) *** 1142,1158 **** if (count != 1) abort (); if (pfile->context->direct_p) ! pfile->context->first.token--; else ! pfile->context->first.ptoken--; } } /* #define directive parsing and handling. */ ! /* Returns non-zero if a macro redefinition warning is required. */ ! static int ! warn_of_redefinition (node, macro2) const cpp_hashnode *node; const cpp_macro *macro2; { --- 1237,1254 ---- if (count != 1) abort (); if (pfile->context->direct_p) ! FIRST (pfile->context).token--; else ! FIRST (pfile->context).ptoken--; } } /* #define directive parsing and handling. */ ! /* Returns nonzero if a macro redefinition warning is required. */ ! static bool ! warn_of_redefinition (pfile, node, macro2) ! cpp_reader *pfile; const cpp_hashnode *node; const cpp_macro *macro2; { *************** warn_of_redefinition (node, macro2) *** 1161,1190 **** /* Some redefinitions need to be warned about regardless. */ if (node->flags & NODE_WARN) ! return 1; /* Redefinition of a macro is allowed if and only if the old and new definitions are the same. (6.10.3 paragraph 2). */ macro1 = node->value.macro; ! /* The quick failures. */ ! if (macro1->count != macro2->count ! || macro1->paramc != macro2->paramc || macro1->fun_like != macro2->fun_like || macro1->variadic != macro2->variadic) ! return 1; ! ! /* Check each token. */ ! for (i = 0; i < macro1->count; i++) ! if (! _cpp_equiv_tokens (¯o1->expansion[i], ¯o2->expansion[i])) ! return 1; /* Check parameter spellings. */ for (i = 0; i < macro1->paramc; i++) if (macro1->params[i] != macro2->params[i]) ! return 1; ! return 0; } /* Free the definition of hashnode H. */ --- 1257,1290 ---- /* Some redefinitions need to be warned about regardless. */ if (node->flags & NODE_WARN) ! return true; /* Redefinition of a macro is allowed if and only if the old and new definitions are the same. (6.10.3 paragraph 2). */ macro1 = node->value.macro; ! /* Don't check count here as it can be different in valid ! traditional redefinitions with just whitespace differences. */ ! if (macro1->paramc != macro2->paramc || macro1->fun_like != macro2->fun_like || macro1->variadic != macro2->variadic) ! return true; /* Check parameter spellings. */ for (i = 0; i < macro1->paramc; i++) if (macro1->params[i] != macro2->params[i]) ! return true; ! /* Check the replacement text or tokens. */ ! if (CPP_OPTION (pfile, traditional)) ! return _cpp_expansions_different_trad (macro1, macro2); ! ! if (macro1->count == macro2->count) ! for (i = 0; i < macro1->count; i++) ! if (!_cpp_equiv_tokens (¯o1->exp.tokens[i], ¯o2->exp.tokens[i])) ! return true; ! ! return false; } /* Free the definition of hashnode H. */ *************** _cpp_free_definition (h) *** 1199,1207 **** } /* Save parameter NODE to the parameter list of macro MACRO. Returns ! zero on success, non-zero if the parameter is a duplicate. */ ! static int ! save_parameter (pfile, macro, node) cpp_reader *pfile; cpp_macro *macro; cpp_hashnode *node; --- 1299,1307 ---- } /* Save parameter NODE to the parameter list of macro MACRO. Returns ! zero on success, nonzero if the parameter is a duplicate. */ ! bool ! _cpp_save_parameter (pfile, macro, node) cpp_reader *pfile; cpp_macro *macro; cpp_hashnode *node; *************** save_parameter (pfile, macro, node) *** 1209,1216 **** /* Constraint 6.10.3.6 - duplicate parameter names. */ if (node->arg_index) { ! cpp_error (pfile, "duplicate macro parameter \"%s\"", NODE_NAME (node)); ! return 1; } if (BUFF_ROOM (pfile->a_buff) --- 1309,1317 ---- /* Constraint 6.10.3.6 - duplicate parameter names. */ if (node->arg_index) { ! cpp_error (pfile, DL_ERROR, "duplicate macro parameter \"%s\"", ! NODE_NAME (node)); ! return true; } if (BUFF_ROOM (pfile->a_buff) *************** save_parameter (pfile, macro, node) *** 1219,1229 **** ((cpp_hashnode **) BUFF_FRONT (pfile->a_buff))[macro->paramc++] = node; node->arg_index = macro->paramc; ! return 0; } ! /* Check the syntax of the parameters in a MACRO definition. */ ! static int parse_params (pfile, macro) cpp_reader *pfile; cpp_macro *macro; --- 1320,1331 ---- ((cpp_hashnode **) BUFF_FRONT (pfile->a_buff))[macro->paramc++] = node; node->arg_index = macro->paramc; ! return false; } ! /* Check the syntax of the parameters in a MACRO definition. Returns ! false if an error occurs. */ ! static bool parse_params (pfile, macro) cpp_reader *pfile; cpp_macro *macro; *************** parse_params (pfile, macro) *** 1237,1268 **** switch (token->type) { default: ! cpp_error (pfile, "\"%s\" may not appear in macro parameter list", cpp_token_as_text (pfile, token)); ! return 0; case CPP_NAME: if (prev_ident) { ! cpp_error (pfile, "macro parameters must be comma-separated"); ! return 0; } prev_ident = 1; ! if (save_parameter (pfile, macro, token->val.node)) ! return 0; continue; case CPP_CLOSE_PAREN: if (prev_ident || macro->paramc == 0) ! return 1; /* Fall through to pick up the error. */ case CPP_COMMA: if (!prev_ident) { ! cpp_error (pfile, "parameter name missing"); ! return 0; } prev_ident = 0; continue; --- 1339,1378 ---- switch (token->type) { default: ! /* Allow/ignore comments in parameter lists if we are ! preserving comments in macro expansions. */ ! if (token->type == CPP_COMMENT ! && ! CPP_OPTION (pfile, discard_comments_in_macro_exp)) ! continue; ! ! cpp_error (pfile, DL_ERROR, ! "\"%s\" may not appear in macro parameter list", cpp_token_as_text (pfile, token)); ! return false; case CPP_NAME: if (prev_ident) { ! cpp_error (pfile, DL_ERROR, ! "macro parameters must be comma-separated"); ! return false; } prev_ident = 1; ! if (_cpp_save_parameter (pfile, macro, token->val.node)) ! return false; continue; case CPP_CLOSE_PAREN: if (prev_ident || macro->paramc == 0) ! return true; /* Fall through to pick up the error. */ case CPP_COMMA: if (!prev_ident) { ! cpp_error (pfile, DL_ERROR, "parameter name missing"); ! return false; } prev_ident = 0; continue; *************** parse_params (pfile, macro) *** 1271,1294 **** macro->variadic = 1; if (!prev_ident) { ! save_parameter (pfile, macro, pfile->spec_nodes.n__VA_ARGS__); pfile->state.va_args_ok = 1; if (! CPP_OPTION (pfile, c99) && CPP_OPTION (pfile, pedantic)) ! cpp_pedwarn (pfile, ! "anonymous variadic macros were introduced in C99"); } else if (CPP_OPTION (pfile, pedantic)) ! cpp_pedwarn (pfile, "ISO C does not permit named variadic macros"); /* We're at the end, and just expect a closing parenthesis. */ token = _cpp_lex_token (pfile); if (token->type == CPP_CLOSE_PAREN) ! return 1; /* Fall through. */ case CPP_EOF: ! cpp_error (pfile, "missing ')' in macro parameter list"); ! return 0; } } } --- 1381,1406 ---- macro->variadic = 1; if (!prev_ident) { ! _cpp_save_parameter (pfile, macro, ! pfile->spec_nodes.n__VA_ARGS__); pfile->state.va_args_ok = 1; if (! CPP_OPTION (pfile, c99) && CPP_OPTION (pfile, pedantic)) ! cpp_error (pfile, DL_PEDWARN, ! "anonymous variadic macros were introduced in C99"); } else if (CPP_OPTION (pfile, pedantic)) ! cpp_error (pfile, DL_PEDWARN, ! "ISO C does not permit named variadic macros"); /* We're at the end, and just expect a closing parenthesis. */ token = _cpp_lex_token (pfile); if (token->type == CPP_CLOSE_PAREN) ! return true; /* Fall through. */ case CPP_EOF: ! cpp_error (pfile, DL_ERROR, "missing ')' in macro parameter list"); ! return false; } } } *************** lex_expansion_token (pfile, macro) *** 1330,1353 **** return token; } ! /* Parse a macro and save its expansion. Returns non-zero on success. */ ! int ! _cpp_create_definition (pfile, node) cpp_reader *pfile; ! cpp_hashnode *node; { ! cpp_macro *macro; ! cpp_token *token, *saved_cur_token; const cpp_token *ctoken; - unsigned int i, ok = 1; - - macro = (cpp_macro *) _cpp_aligned_alloc (pfile, sizeof (cpp_macro)); - macro->line = pfile->directive_line; - macro->params = 0; - macro->paramc = 0; - macro->variadic = 0; - macro->count = 0; - macro->fun_like = 0; /* Get the first token of the expansion (or the '(' of a function-like macro). */ --- 1442,1454 ---- return token; } ! static bool ! create_iso_definition (pfile, macro) cpp_reader *pfile; ! cpp_macro *macro; { ! cpp_token *token; const cpp_token *ctoken; /* Get the first token of the expansion (or the '(' of a function-like macro). */ *************** _cpp_create_definition (pfile, node) *** 1355,1373 **** if (ctoken->type == CPP_OPEN_PAREN && !(ctoken->flags & PREV_WHITE)) { ! ok = parse_params (pfile, macro); macro->params = (cpp_hashnode **) BUFF_FRONT (pfile->a_buff); if (!ok) ! goto cleanup2; /* Success. Commit the parameter array. */ ! BUFF_FRONT (pfile->a_buff) = (U_CHAR *) ¯o->params[macro->paramc]; macro->fun_like = 1; } else if (ctoken->type != CPP_EOF && !(ctoken->flags & PREV_WHITE)) ! cpp_pedwarn (pfile, "ISO C requires whitespace after the macro name"); ! ! saved_cur_token = pfile->cur_token; if (macro->fun_like) token = lex_expansion_token (pfile, macro); --- 1456,1473 ---- if (ctoken->type == CPP_OPEN_PAREN && !(ctoken->flags & PREV_WHITE)) { ! bool ok = parse_params (pfile, macro); macro->params = (cpp_hashnode **) BUFF_FRONT (pfile->a_buff); if (!ok) ! return false; /* Success. Commit the parameter array. */ ! BUFF_FRONT (pfile->a_buff) = (uchar *) ¯o->params[macro->paramc]; macro->fun_like = 1; } else if (ctoken->type != CPP_EOF && !(ctoken->flags & PREV_WHITE)) ! cpp_error (pfile, DL_PEDWARN, ! "ISO C requires whitespace after the macro name"); if (macro->fun_like) token = lex_expansion_token (pfile, macro); *************** _cpp_create_definition (pfile, node) *** 1394,1402 **** /* Let assembler get away with murder. */ else if (CPP_OPTION (pfile, lang) != CLK_ASM) { ! ok = 0; ! cpp_error (pfile, "'#' is not followed by a macro parameter"); ! goto cleanup1; } } --- 1494,1502 ---- /* Let assembler get away with murder. */ else if (CPP_OPTION (pfile, lang) != CLK_ASM) { ! cpp_error (pfile, DL_ERROR, ! "'#' is not followed by a macro parameter"); ! return false; } } *************** _cpp_create_definition (pfile, node) *** 1413,1422 **** if (macro->count == 0 || token->type == CPP_EOF) { ! ok = 0; ! cpp_error (pfile, "'##' cannot appear at either end of a macro expansion"); ! goto cleanup1; } token[-1].flags |= PASTE_LEFT; --- 1513,1521 ---- if (macro->count == 0 || token->type == CPP_EOF) { ! cpp_error (pfile, DL_ERROR, "'##' cannot appear at either end of a macro expansion"); ! return false; } token[-1].flags |= PASTE_LEFT; *************** _cpp_create_definition (pfile, node) *** 1425,1486 **** token = lex_expansion_token (pfile, macro); } ! macro->expansion = (cpp_token *) BUFF_FRONT (pfile->a_buff); /* Don't count the CPP_EOF. */ macro->count--; /* Clear whitespace on first token for warn_of_redefinition(). */ if (macro->count) ! macro->expansion[0].flags &= ~PREV_WHITE; /* Commit the memory. */ ! BUFF_FRONT (pfile->a_buff) = (U_CHAR *) ¯o->expansion[macro->count]; ! /* Implement the macro-defined-to-itself optimisation. */ ! if (macro->count == 1 && !macro->fun_like ! && macro->expansion[0].type == CPP_NAME ! && macro->expansion[0].val.node == node) ! node->flags |= NODE_DISABLED; /* To suppress some diagnostics. */ macro->syshdr = pfile->map->sysp != 0; ! if (node->type != NT_VOID) { ! if (warn_of_redefinition (node, macro)) { ! cpp_pedwarn_with_line (pfile, pfile->directive_line, 0, ! "\"%s\" redefined", NODE_NAME (node)); if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) ! cpp_pedwarn_with_line (pfile, node->value.macro->line, 0, ! "this is the location of the previous definition"); } - _cpp_free_definition (node); } /* Enter definition in hash table. */ node->type = NT_MACRO; node->value.macro = macro; if (! ustrncmp (NODE_NAME (node), DSC ("__STDC_"))) node->flags |= NODE_WARN; - cleanup1: - - /* Set type for SEEN_EOL() in cpplib.c, restore the lexer position. */ - saved_cur_token[-1].type = pfile->cur_token[-1].type; - pfile->cur_token = saved_cur_token; - - cleanup2: - - /* Stop the lexer accepting __VA_ARGS__. */ - pfile->state.va_args_ok = 0; - - /* Clear the fast argument lookup indices. */ - for (i = macro->paramc; i-- > 0; ) - macro->params[i]->arg_index = 0; - return ok; } --- 1524,1619 ---- token = lex_expansion_token (pfile, macro); } ! macro->exp.tokens = (cpp_token *) BUFF_FRONT (pfile->a_buff); /* Don't count the CPP_EOF. */ macro->count--; /* Clear whitespace on first token for warn_of_redefinition(). */ if (macro->count) ! macro->exp.tokens[0].flags &= ~PREV_WHITE; /* Commit the memory. */ ! BUFF_FRONT (pfile->a_buff) = (uchar *) ¯o->exp.tokens[macro->count]; ! return true; ! } ! ! /* Parse a macro and save its expansion. Returns nonzero on success. */ ! bool ! _cpp_create_definition (pfile, node) ! cpp_reader *pfile; ! cpp_hashnode *node; ! { ! cpp_macro *macro; ! unsigned int i; ! bool ok; + macro = (cpp_macro *) _cpp_aligned_alloc (pfile, sizeof (cpp_macro)); + macro->line = pfile->directive_line; + macro->params = 0; + macro->paramc = 0; + macro->variadic = 0; + macro->used = 0; + macro->count = 0; + macro->fun_like = 0; /* To suppress some diagnostics. */ macro->syshdr = pfile->map->sysp != 0; ! if (CPP_OPTION (pfile, traditional)) ! ok = _cpp_create_trad_definition (pfile, macro); ! else { ! cpp_token *saved_cur_token = pfile->cur_token; ! ! ok = create_iso_definition (pfile, macro); ! ! /* Restore lexer position because of games lex_expansion_token() ! plays lexing the macro. We set the type for SEEN_EOL() in ! cpplib.c. ! ! Longer term we should lex the whole line before coming here, ! and just copy the expansion. */ ! saved_cur_token[-1].type = pfile->cur_token[-1].type; ! pfile->cur_token = saved_cur_token; ! ! /* Stop the lexer accepting __VA_ARGS__. */ ! pfile->state.va_args_ok = 0; ! } ! ! /* Clear the fast argument lookup indices. */ ! for (i = macro->paramc; i-- > 0; ) ! macro->params[i]->arg_index = 0; ! ! if (!ok) ! return ok; ! ! if (node->type == NT_MACRO) ! { ! if (CPP_OPTION (pfile, warn_unused_macros)) ! _cpp_warn_if_unused_macro (pfile, node, NULL); ! ! if (warn_of_redefinition (pfile, node, macro)) { ! cpp_error_with_line (pfile, DL_PEDWARN, pfile->directive_line, 0, ! "\"%s\" redefined", NODE_NAME (node)); if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) ! cpp_error_with_line (pfile, DL_PEDWARN, ! node->value.macro->line, 0, ! "this is the location of the previous definition"); } } + if (node->type != NT_VOID) + _cpp_free_definition (node); + /* Enter definition in hash table. */ node->type = NT_MACRO; node->value.macro = macro; if (! ustrncmp (NODE_NAME (node), DSC ("__STDC_"))) node->flags |= NODE_WARN; return ok; } *************** check_trad_stringification (pfile, macro *** 1493,1500 **** const cpp_string *string; { unsigned int i, len; ! const U_CHAR *p, *q, *limit = string->text + string->len; ! /* Loop over the string. */ for (p = string->text; p < limit; p = q) { --- 1626,1633 ---- const cpp_string *string; { unsigned int i, len; ! const uchar *p, *q, *limit = string->text + string->len; ! /* Loop over the string. */ for (p = string->text; p < limit; p = q) { *************** check_trad_stringification (pfile, macro *** 1518,1526 **** if (NODE_LEN (node) == len && !memcmp (p, NODE_NAME (node), len)) { ! cpp_warning (pfile, ! "macro argument \"%s\" would be stringified with -traditional", ! NODE_NAME (node)); break; } } --- 1651,1659 ---- if (NODE_LEN (node) == len && !memcmp (p, NODE_NAME (node), len)) { ! cpp_error (pfile, DL_WARNING, ! "macro argument \"%s\" would be stringified in traditional C", ! NODE_NAME (node)); break; } } *************** cpp_macro_definition (pfile, node) *** 1543,1549 **** if (node->type != NT_MACRO || (node->flags & NODE_BUILTIN)) { ! cpp_ice (pfile, "invalid hash type %d in cpp_macro_definition", node->type); return 0; } --- 1676,1683 ---- if (node->type != NT_MACRO || (node->flags & NODE_BUILTIN)) { ! cpp_error (pfile, DL_ICE, ! "invalid hash type %d in cpp_macro_definition", node->type); return 0; } *************** cpp_macro_definition (pfile, node) *** 1557,1579 **** len += NODE_LEN (macro->params[i]) + 1; /* "," */ } ! for (i = 0; i < macro->count; i++) { ! cpp_token *token = ¯o->expansion[i]; ! if (token->type == CPP_MACRO_ARG) ! len += NODE_LEN (macro->params[token->val.arg_no - 1]); ! else ! len += cpp_token_len (token); /* Includes room for ' '. */ ! if (token->flags & STRINGIFY_ARG) ! len++; /* "#" */ ! if (token->flags & PASTE_LEFT) ! len += 3; /* " ##" */ } if (len > pfile->macro_buffer_len) { ! pfile->macro_buffer = (U_CHAR *) xrealloc (pfile->macro_buffer, len); pfile->macro_buffer_len = len; } --- 1691,1718 ---- len += NODE_LEN (macro->params[i]) + 1; /* "," */ } ! if (CPP_OPTION (pfile, traditional)) ! len += _cpp_replacement_text_len (macro); ! else { ! for (i = 0; i < macro->count; i++) ! { ! cpp_token *token = ¯o->exp.tokens[i]; ! if (token->type == CPP_MACRO_ARG) ! len += NODE_LEN (macro->params[token->val.arg_no - 1]); ! else ! len += cpp_token_len (token); /* Includes room for ' '. */ ! if (token->flags & STRINGIFY_ARG) ! len++; /* "#" */ ! if (token->flags & PASTE_LEFT) ! len += 3; /* " ##" */ ! } } if (len > pfile->macro_buffer_len) { ! pfile->macro_buffer = (uchar *) xrealloc (pfile->macro_buffer, len); pfile->macro_buffer_len = len; } *************** cpp_macro_definition (pfile, node) *** 1597,1605 **** } if (i + 1 < macro->paramc) ! /* Don't emit a space after the comma here; we're trying ! to emit a Dwarf-friendly definition, and the Dwarf spec ! forbids spaces in the argument list. */ *buffer++ = ','; else if (macro->variadic) *buffer++ = '.', *buffer++ = '.', *buffer++ = '.'; --- 1736,1744 ---- } if (i + 1 < macro->paramc) ! /* Don't emit a space after the comma here; we're trying ! to emit a Dwarf-friendly definition, and the Dwarf spec ! forbids spaces in the argument list. */ *buffer++ = ','; else if (macro->variadic) *buffer++ = '.', *buffer++ = '.', *buffer++ = '.'; *************** cpp_macro_definition (pfile, node) *** 1611,1622 **** definition is the empty string. */ *buffer++ = ' '; /* Expansion tokens. */ - if (macro->count) { for (i = 0; i < macro->count; i++) { ! cpp_token *token = ¯o->expansion[i]; if (token->flags & PREV_WHITE) *buffer++ = ' '; --- 1750,1763 ---- definition is the empty string. */ *buffer++ = ' '; + if (CPP_OPTION (pfile, traditional)) + buffer = _cpp_copy_replacement_text (macro, buffer); + else if (macro->count) /* Expansion tokens. */ { for (i = 0; i < macro->count; i++) { ! cpp_token *token = ¯o->exp.tokens[i]; if (token->flags & PREV_WHITE) *buffer++ = ' '; diff -Nrc3pad gcc-3.2.3/gcc/cppmain.c gcc-3.3/gcc/cppmain.c *** gcc-3.2.3/gcc/cppmain.c 2002-03-14 19:24:58.000000000 +0000 --- gcc-3.3/gcc/cppmain.c 2002-11-08 20:15:05.000000000 +0000 *************** *** 1,4 **** ! /* CPP main program, using CPP Library. Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Per Bothner, 1994-95. --- 1,4 ---- ! /* Preprocess only, using cpplib. Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Per Bothner, 1994-95. *************** Foundation, 59 Temple Place - Suite 330, *** 24,56 **** #include "config.h" #include "system.h" #include "cpplib.h" ! #include "intl.h" ! ! /* Encapsulates state used to convert the stream of tokens coming from ! cpp_get_token back into a text file. */ ! struct printer ! { ! FILE *outf; /* Stream to write to. */ ! const struct line_map *map; /* Logical to physical line mappings. */ ! const cpp_token *prev; /* Previous token. */ ! const cpp_token *source; /* Source token for spacing. */ ! unsigned int line; /* Line currently being written. */ ! unsigned char printed; /* Nonzero if something output at line. */ ! }; ! int main PARAMS ((int, char **)); ! static void general_init PARAMS ((const char *)); ! static void do_preprocessing PARAMS ((int, char **)); ! static void setup_callbacks PARAMS ((void)); /* General output routines. */ static void scan_translation_unit PARAMS ((cpp_reader *)); ! static void check_multiline_token PARAMS ((const cpp_string *)); static int dump_macro PARAMS ((cpp_reader *, cpp_hashnode *, void *)); ! static void print_line PARAMS ((const struct line_map *, unsigned int, ! const char *)); ! static void maybe_print_line PARAMS ((const struct line_map *, unsigned int)); /* Callback routines for the parser. Most of these are active only in specific modes. */ --- 24,44 ---- #include "config.h" #include "system.h" #include "cpplib.h" ! #include "cpphash.h" ! static void setup_callbacks PARAMS ((cpp_reader *)); /* General output routines. */ static void scan_translation_unit PARAMS ((cpp_reader *)); ! static void scan_translation_unit_trad PARAMS ((cpp_reader *)); ! static void account_for_newlines PARAMS ((cpp_reader *, const uchar *, ! size_t)); static int dump_macro PARAMS ((cpp_reader *, cpp_hashnode *, void *)); ! static void print_line PARAMS ((cpp_reader *, const struct line_map *, ! unsigned int, const char *)); ! static void maybe_print_line PARAMS ((cpp_reader *, const struct line_map *, ! unsigned int)); /* Callback routines for the parser. Most of these are active only in specific modes. */ *************** static void cb_ident PARAMS ((cpp_read *** 64,193 **** static void cb_file_change PARAMS ((cpp_reader *, const struct line_map *)); static void cb_def_pragma PARAMS ((cpp_reader *, unsigned int)); ! const char *progname; /* Needs to be global. */ ! static cpp_reader *pfile; /* An opaque handle. */ ! static cpp_options *options; /* Options of pfile. */ ! static struct printer print; ! ! int ! main (argc, argv) ! int argc; ! char **argv; ! { ! general_init (argv[0]); ! ! /* Construct a reader with default language GNU C89. */ ! pfile = cpp_create_reader (CLK_GNUC89); ! options = cpp_get_options (pfile); ! ! do_preprocessing (argc, argv); ! ! if (cpp_destroy (pfile)) ! return FATAL_EXIT_CODE; ! ! return SUCCESS_EXIT_CODE; ! } ! ! /* Store the program name, and set the locale. */ ! static void ! general_init (argv0) ! const char *argv0; ! { ! progname = argv0 + strlen (argv0); ! ! while (progname != argv0 && ! IS_DIR_SEPARATOR (progname[-1])) ! --progname; ! ! xmalloc_set_program_name (progname); ! ! hex_init (); ! gcc_init_libintl (); ! } ! ! /* Handle switches, preprocess and output. */ ! static void ! do_preprocessing (argc, argv) ! int argc; ! char **argv; { - int argi = 1; /* Next argument to handle. */ - - argi += cpp_handle_options (pfile, argc - argi , argv + argi); - if (CPP_FATAL_ERRORS (pfile)) - return; - - if (argi < argc) - { - cpp_fatal (pfile, "invalid option %s", argv[argi]); - return; - } - - cpp_post_options (pfile); - if (CPP_FATAL_ERRORS (pfile)) - return; - - /* If cpp_handle_options saw --help or --version on the command - line, it will have set pfile->help_only to indicate this. Exit - successfully. [The library does not exit itself, because - e.g. cc1 needs to print its own --help message at this point.] */ - if (options->help_only) - return; - /* Initialize the printer structure. Setting print.line to -1 here is a trick to guarantee that the first token of the file will cause a linemarker to be output by maybe_print_line. */ ! print.line = (unsigned int) -1; ! print.printed = 0; ! print.prev = 0; ! print.map = 0; ! ! /* Open the output now. We must do so even if no_output is on, ! because there may be other output than from the actual ! preprocessing (e.g. from -dM). */ ! if (options->out_fname[0] == '\0') ! print.outf = stdout; ! else ! { ! print.outf = fopen (options->out_fname, "w"); ! if (print.outf == NULL) ! { ! cpp_notice_from_errno (pfile, options->out_fname); ! return; ! } ! } ! setup_callbacks (); ! if (cpp_read_main_file (pfile, options->in_fname, NULL)) { cpp_finish_options (pfile); /* A successful cpp_read_main_file guarantees that we can call cpp_scan_nooutput or cpp_get_token next. */ if (options->no_output) ! cpp_scan_nooutput (pfile); else scan_translation_unit (pfile); /* -dM command line option. Should this be in cpp_finish? */ if (options->dump_macros == dump_only) cpp_forall_identifiers (pfile, dump_macro, NULL); - - cpp_finish (pfile); } /* Flush any pending output. */ ! if (print.printed) ! putc ('\n', print.outf); ! ! if (ferror (print.outf) || fclose (print.outf)) ! cpp_notice_from_errno (pfile, options->out_fname); } /* Set up the callbacks as appropriate. */ static void ! setup_callbacks () { cpp_callbacks *cb = cpp_get_callbacks (pfile); if (! options->no_output) --- 52,110 ---- static void cb_file_change PARAMS ((cpp_reader *, const struct line_map *)); static void cb_def_pragma PARAMS ((cpp_reader *, unsigned int)); ! /* Preprocess and output. */ ! void ! cpp_preprocess_file (pfile, in_fname, out_stream) ! cpp_reader *pfile; ! const char *in_fname; ! FILE *out_stream; { /* Initialize the printer structure. Setting print.line to -1 here is a trick to guarantee that the first token of the file will cause a linemarker to be output by maybe_print_line. */ ! pfile->print.line = (unsigned int) -1; ! pfile->print.printed = 0; ! pfile->print.prev = 0; ! pfile->print.map = 0; ! pfile->print.outf = out_stream; ! setup_callbacks (pfile); ! if (cpp_read_main_file (pfile, in_fname, NULL)) { + cpp_options *options = &pfile->opts; cpp_finish_options (pfile); /* A successful cpp_read_main_file guarantees that we can call cpp_scan_nooutput or cpp_get_token next. */ if (options->no_output) ! { ! /* Scan -included buffers, then the main file. */ ! while (pfile->buffer->prev) ! cpp_scan_nooutput (pfile); ! cpp_scan_nooutput (pfile); ! } ! else if (options->traditional) ! scan_translation_unit_trad (pfile); else scan_translation_unit (pfile); /* -dM command line option. Should this be in cpp_finish? */ if (options->dump_macros == dump_only) cpp_forall_identifiers (pfile, dump_macro, NULL); } /* Flush any pending output. */ ! if (pfile->print.printed) ! putc ('\n', pfile->print.outf); } /* Set up the callbacks as appropriate. */ static void ! setup_callbacks (pfile) ! cpp_reader *pfile; { + cpp_options *options = &pfile->opts; cpp_callbacks *cb = cpp_get_callbacks (pfile); if (! options->no_output) *************** scan_translation_unit (pfile) *** 223,229 **** { bool avoid_paste = false; ! print.source = NULL; for (;;) { const cpp_token *token = cpp_get_token (pfile); --- 140,146 ---- { bool avoid_paste = false; ! pfile->print.source = NULL; for (;;) { const cpp_token *token = cpp_get_token (pfile); *************** scan_translation_unit (pfile) *** 231,240 **** if (token->type == CPP_PADDING) { avoid_paste = true; ! if (print.source == NULL ! || (!(print.source->flags & PREV_WHITE) && token->val.source == NULL)) ! print.source = token->val.source; continue; } --- 148,157 ---- if (token->type == CPP_PADDING) { avoid_paste = true; ! if (pfile->print.source == NULL ! || (!(pfile->print.source->flags & PREV_WHITE) && token->val.source == NULL)) ! pfile->print.source = token->val.source; continue; } *************** scan_translation_unit (pfile) *** 244,344 **** /* Subtle logic to output a space if and only if necessary. */ if (avoid_paste) { ! if (print.source == NULL) ! print.source = token; ! if (print.source->flags & PREV_WHITE ! || (print.prev && cpp_avoid_paste (pfile, print.prev, token)) ! || (print.prev == NULL && token->type == CPP_HASH)) ! putc (' ', print.outf); } else if (token->flags & PREV_WHITE) ! putc (' ', print.outf); avoid_paste = false; ! print.source = NULL; ! print.prev = token; ! cpp_output_token (token, print.outf); ! if (token->type == CPP_STRING || token->type == CPP_WSTRING ! || token->type == CPP_COMMENT) ! check_multiline_token (&token->val.str); } } ! /* Adjust print.line for newlines embedded in tokens. */ static void ! check_multiline_token (str) ! const cpp_string *str; { ! unsigned int i; ! for (i = 0; i < str->len; i++) ! if (str->text[i] == '\n') ! print.line++; } /* If the token read on logical line LINE needs to be output on a different line to the current one, output the required newlines or a line marker, and return 1. Otherwise return 0. */ static void ! maybe_print_line (map, line) const struct line_map *map; unsigned int line; { /* End the previous line of text. */ ! if (print.printed) { ! putc ('\n', print.outf); ! print.line++; ! print.printed = 0; } ! if (line >= print.line && line < print.line + 8) { ! while (line > print.line) { ! putc ('\n', print.outf); ! print.line++; } } else ! print_line (map, line, ""); } /* Output a line marker for logical line LINE. Special flags are "1" or "2" indicating entering or leaving a file. */ static void ! print_line (map, line, special_flags) const struct line_map *map; unsigned int line; const char *special_flags; { /* End any previous line of text. */ ! if (print.printed) ! putc ('\n', print.outf); ! print.printed = 0; ! print.line = line; ! if (! options->no_line_commands) { size_t to_file_len = strlen (map->to_file); unsigned char *to_file_quoted = alloca (to_file_len * 4 + 1); unsigned char *p; ! /* cpp_quote_string does not nul-terminate, so we have to do it ourselves. */ p = cpp_quote_string (to_file_quoted, (unsigned char *)map->to_file, to_file_len); *p = '\0'; ! fprintf (print.outf, "# %u \"%s\"%s", ! SOURCE_LINE (map, print.line), to_file_quoted, special_flags); if (map->sysp == 2) ! fputs (" 3 4", print.outf); else if (map->sysp == 1) ! fputs (" 3", print.outf); ! putc ('\n', print.outf); } } --- 161,280 ---- /* Subtle logic to output a space if and only if necessary. */ if (avoid_paste) { ! if (pfile->print.source == NULL) ! pfile->print.source = token; ! if (pfile->print.source->flags & PREV_WHITE ! || (pfile->print.prev ! && cpp_avoid_paste (pfile, pfile->print.prev, token)) ! || (pfile->print.prev == NULL && token->type == CPP_HASH)) ! putc (' ', pfile->print.outf); } else if (token->flags & PREV_WHITE) ! putc (' ', pfile->print.outf); avoid_paste = false; ! pfile->print.source = NULL; ! pfile->print.prev = token; ! cpp_output_token (token, pfile->print.outf); ! if (token->type == CPP_COMMENT) ! account_for_newlines (pfile, token->val.str.text, token->val.str.len); } } ! /* Adjust pfile->print.line for newlines embedded in output. */ static void ! account_for_newlines (pfile, str, len) ! cpp_reader *pfile; ! const uchar *str; ! size_t len; { ! while (len--) ! if (*str++ == '\n') ! pfile->print.line++; ! } ! /* Writes out a traditionally preprocessed file. */ ! static void ! scan_translation_unit_trad (pfile) ! cpp_reader *pfile; ! { ! while (_cpp_read_logical_line_trad (pfile)) ! { ! size_t len = pfile->out.cur - pfile->out.base; ! maybe_print_line (pfile, pfile->print.map, pfile->out.first_line); ! fwrite (pfile->out.base, 1, len, pfile->print.outf); ! pfile->print.printed = 1; ! if (!CPP_OPTION (pfile, discard_comments)) ! account_for_newlines (pfile, pfile->out.base, len); ! } } /* If the token read on logical line LINE needs to be output on a different line to the current one, output the required newlines or a line marker, and return 1. Otherwise return 0. */ static void ! maybe_print_line (pfile, map, line) ! cpp_reader *pfile; const struct line_map *map; unsigned int line; { /* End the previous line of text. */ ! if (pfile->print.printed) { ! putc ('\n', pfile->print.outf); ! pfile->print.line++; ! pfile->print.printed = 0; } ! if (line >= pfile->print.line && line < pfile->print.line + 8) { ! while (line > pfile->print.line) { ! putc ('\n', pfile->print.outf); ! pfile->print.line++; } } else ! print_line (pfile, map, line, ""); } /* Output a line marker for logical line LINE. Special flags are "1" or "2" indicating entering or leaving a file. */ static void ! print_line (pfile, map, line, special_flags) ! cpp_reader *pfile; const struct line_map *map; unsigned int line; const char *special_flags; { /* End any previous line of text. */ ! if (pfile->print.printed) ! putc ('\n', pfile->print.outf); ! pfile->print.printed = 0; ! pfile->print.line = line; ! if (! CPP_OPTION (pfile, no_line_commands)) { size_t to_file_len = strlen (map->to_file); unsigned char *to_file_quoted = alloca (to_file_len * 4 + 1); unsigned char *p; ! /* cpp_quote_string does not nul-terminate, so we have to do it ourselves. */ p = cpp_quote_string (to_file_quoted, (unsigned char *)map->to_file, to_file_len); *p = '\0'; ! fprintf (pfile->print.outf, "# %u \"%s\"%s", ! SOURCE_LINE (map, pfile->print.line), ! to_file_quoted, special_flags); if (map->sysp == 2) ! fputs (" 3 4", pfile->print.outf); else if (map->sysp == 1) ! fputs (" 3", pfile->print.outf); ! putc ('\n', pfile->print.outf); } } *************** print_line (map, line, special_flags) *** 346,386 **** of the line, and at end of file will be CPP_EOF. */ static void cb_line_change (pfile, token, parsing_args) ! cpp_reader *pfile ATTRIBUTE_UNUSED; const cpp_token *token; int parsing_args; { if (token->type == CPP_EOF || parsing_args) return; ! maybe_print_line (print.map, token->line); ! print.printed = 1; ! print.prev = 0; ! print.source = 0; /* Supply enough spaces to put this token in its original column, one space per column greater than 2, since scan_translation_unit will provide a space if PREV_WHITE. Don't bother trying to reconstruct tabs; we can't get it right in general, and nothing ought to care. Some things do care; the fault lies with them. */ ! if (token->col > 2) { ! unsigned int spaces = token->col - 2; ! while (spaces--) ! putc (' ', print.outf); } } static void cb_ident (pfile, line, str) ! cpp_reader *pfile ATTRIBUTE_UNUSED; unsigned int line; const cpp_string * str; { ! maybe_print_line (print.map, line); ! fprintf (print.outf, "#ident \"%s\"\n", str->text); ! print.line++; } static void --- 282,325 ---- of the line, and at end of file will be CPP_EOF. */ static void cb_line_change (pfile, token, parsing_args) ! cpp_reader *pfile; const cpp_token *token; int parsing_args; { if (token->type == CPP_EOF || parsing_args) return; ! maybe_print_line (pfile, pfile->print.map, token->line); ! pfile->print.prev = 0; ! pfile->print.source = 0; /* Supply enough spaces to put this token in its original column, one space per column greater than 2, since scan_translation_unit will provide a space if PREV_WHITE. Don't bother trying to reconstruct tabs; we can't get it right in general, and nothing ought to care. Some things do care; the fault lies with them. */ ! if (!CPP_OPTION (pfile, traditional)) { ! pfile->print.printed = 1; ! if (token->col > 2) ! { ! unsigned int spaces = token->col - 2; ! while (spaces--) ! putc (' ', pfile->print.outf); ! } } } static void cb_ident (pfile, line, str) ! cpp_reader *pfile; unsigned int line; const cpp_string * str; { ! maybe_print_line (pfile, pfile->print.map, line); ! fprintf (pfile->print.outf, "#ident \"%s\"\n", str->text); ! pfile->print.line++; } static void *************** cb_define (pfile, line, node) *** 389,416 **** unsigned int line; cpp_hashnode *node; { ! maybe_print_line (print.map, line); ! fputs ("#define ", print.outf); /* -dD command line option. */ ! if (options->dump_macros == dump_definitions) ! fputs ((const char *) cpp_macro_definition (pfile, node), print.outf); else ! fputs ((const char *) NODE_NAME (node), print.outf); ! putc ('\n', print.outf); ! print.line++; } static void cb_undef (pfile, line, node) ! cpp_reader *pfile ATTRIBUTE_UNUSED; unsigned int line; cpp_hashnode *node; { ! maybe_print_line (print.map, line); ! fprintf (print.outf, "#undef %s\n", NODE_NAME (node)); ! print.line++; } static void --- 328,356 ---- unsigned int line; cpp_hashnode *node; { ! maybe_print_line (pfile, pfile->print.map, line); ! fputs ("#define ", pfile->print.outf); /* -dD command line option. */ ! if (CPP_OPTION (pfile, dump_macros) == dump_definitions) ! fputs ((const char *) cpp_macro_definition (pfile, node), ! pfile->print.outf); else ! fputs ((const char *) NODE_NAME (node), pfile->print.outf); ! putc ('\n', pfile->print.outf); ! pfile->print.line++; } static void cb_undef (pfile, line, node) ! cpp_reader *pfile; unsigned int line; cpp_hashnode *node; { ! maybe_print_line (pfile, pfile->print.map, line); ! fprintf (pfile->print.outf, "#undef %s\n", NODE_NAME (node)); ! pfile->print.line++; } static void *************** cb_include (pfile, line, dir, header) *** 420,462 **** const unsigned char *dir; const cpp_token *header; { ! maybe_print_line (print.map, line); ! fprintf (print.outf, "#%s %s\n", dir, cpp_token_as_text (pfile, header)); ! print.line++; } /* The file name, line number or system header flags have changed, as ! described in MAP. From this point on, the old print.map might be pointing to freed memory, and so must not be dereferenced. */ static void cb_file_change (pfile, map) ! cpp_reader *pfile ATTRIBUTE_UNUSED; const struct line_map *map; { const char *flags = ""; /* First time? */ ! if (print.map == NULL) { /* Avoid printing foo.i when the main file is foo.c. */ ! if (!options->preprocessed) ! print_line (map, map->from_line, flags); } else { /* Bring current file to correct line when entering a new file. */ if (map->reason == LC_ENTER) ! maybe_print_line (map - 1, map->from_line - 1); if (map->reason == LC_ENTER) flags = " 1"; else if (map->reason == LC_LEAVE) flags = " 2"; ! print_line (map, map->from_line, flags); } ! print.map = map; } /* Copy a #pragma directive to the preprocessed output. */ --- 360,403 ---- const unsigned char *dir; const cpp_token *header; { ! maybe_print_line (pfile, pfile->print.map, line); ! fprintf (pfile->print.outf, "#%s %s\n", dir, ! cpp_token_as_text (pfile, header)); ! pfile->print.line++; } /* The file name, line number or system header flags have changed, as ! described in MAP. From this point on, the old pfile->print.map might be pointing to freed memory, and so must not be dereferenced. */ static void cb_file_change (pfile, map) ! cpp_reader *pfile; const struct line_map *map; { const char *flags = ""; /* First time? */ ! if (pfile->print.map == NULL) { /* Avoid printing foo.i when the main file is foo.c. */ ! if (!CPP_OPTION (pfile, preprocessed)) ! print_line (pfile, map, map->from_line, flags); } else { /* Bring current file to correct line when entering a new file. */ if (map->reason == LC_ENTER) ! maybe_print_line (pfile, map - 1, map->from_line - 1); if (map->reason == LC_ENTER) flags = " 1"; else if (map->reason == LC_LEAVE) flags = " 2"; ! print_line (pfile, map, map->from_line, flags); } ! pfile->print.map = map; } /* Copy a #pragma directive to the preprocessed output. */ *************** cb_def_pragma (pfile, line) *** 465,474 **** cpp_reader *pfile; unsigned int line; { ! maybe_print_line (print.map, line); ! fputs ("#pragma ", print.outf); ! cpp_output_line (pfile, print.outf); ! print.line++; } /* Dump out the hash table. */ --- 406,415 ---- cpp_reader *pfile; unsigned int line; { ! maybe_print_line (pfile, pfile->print.map, line); ! fputs ("#pragma ", pfile->print.outf); ! cpp_output_line (pfile, pfile->print.outf); ! pfile->print.line++; } /* Dump out the hash table. */ *************** dump_macro (pfile, node, v) *** 480,489 **** { if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) { ! fputs ("#define ", print.outf); ! fputs ((const char *) cpp_macro_definition (pfile, node), print.outf); ! putc ('\n', print.outf); ! print.line++; } return 1; --- 421,431 ---- { if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) { ! fputs ("#define ", pfile->print.outf); ! fputs ((const char *) cpp_macro_definition (pfile, node), ! pfile->print.outf); ! putc ('\n', pfile->print.outf); ! pfile->print.line++; } return 1; diff -Nrc3pad gcc-3.2.3/gcc/cppspec.c gcc-3.3/gcc/cppspec.c *** gcc-3.2.3/gcc/cppspec.c 2001-12-04 22:26:16.000000000 +0000 --- gcc-3.3/gcc/cppspec.c 2003-03-11 00:59:24.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 29,60 **** assume the user knows what they're doing. If no explicit input is mentioned, it will read stdin. */ - /* Snarfed from gcc.c: */ - - /* This defines which switch letters take arguments. */ - - #define DEFAULT_SWITCH_TAKES_ARG(CHAR) \ - ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ - || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ - || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \ - || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V' \ - || (CHAR) == 'B' || (CHAR) == 'b') - #ifndef SWITCH_TAKES_ARG #define SWITCH_TAKES_ARG(CHAR) DEFAULT_SWITCH_TAKES_ARG(CHAR) #endif - /* This defines which multi-letter switches take arguments. */ - - #define DEFAULT_WORD_SWITCH_TAKES_ARG(STR) \ - (!strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \ - || !strcmp (STR, "Tbss") || !strcmp (STR, "include") \ - || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \ - || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \ - || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \ - || !strcmp (STR, "isystem") || !strcmp (STR, "specs") \ - || !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ")) - #ifndef WORD_SWITCH_TAKES_ARG #define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR) #endif --- 29,38 ---- *************** lang_specific_driver (in_argc, in_argv, *** 90,96 **** /* Have we seen an input file? */ int seen_input = 0; ! /* Positions to insert -xc, -xassembler-with-cpp, and -o, if necessary. 0 means unnecessary. */ int lang_c_here = 0; --- 68,74 ---- /* Have we seen an input file? */ int seen_input = 0; ! /* Positions to insert -xc, -xassembler-with-cpp, and -o, if necessary. 0 means unnecessary. */ int lang_c_here = 0; *************** lang_specific_driver (in_argc, in_argv, *** 99,105 **** /* Do we need to fix up an input file with an unrecognized suffix? */ int need_fixups = 1; ! int i, j, quote = 0; const char **new_argv; int new_argc; --- 77,83 ---- /* Do we need to fix up an input file with an unrecognized suffix? */ int need_fixups = 1; ! int i, j, quote = 0; const char **new_argv; int new_argc; *************** lang_specific_driver (in_argc, in_argv, *** 117,123 **** quote = 0; continue; } ! if (argv[i][0] == '-') { if (argv[i][1] == '\0') --- 95,101 ---- quote = 0; continue; } ! if (argv[i][0] == '-') { if (argv[i][1] == '\0') *************** lang_specific_driver (in_argc, in_argv, *** 228,234 **** new_argv[j] = NULL; *in_argc = new_argc; *in_argv = new_argv; ! } /* Called before linking. Returns 0 on success and -1 on failure. */ int lang_specific_pre_link () --- 206,212 ---- new_argv[j] = NULL; *in_argc = new_argc; *in_argv = new_argv; ! } /* Called before linking. Returns 0 on success and -1 on failure. */ int lang_specific_pre_link () *************** int lang_specific_pre_link () *** 238,240 **** --- 216,224 ---- /* Number of extra output files that lang_specific_pre_link may generate. */ int lang_specific_extra_outfiles = 0; /* Not used for cpp. */ + + /* Table of language-specific spec functions. */ + const struct spec_function lang_specific_spec_functions[] = + { + { 0, 0 } + }; diff -Nrc3pad gcc-3.2.3/gcc/cpptrad.c gcc-3.3/gcc/cpptrad.c *** gcc-3.2.3/gcc/cpptrad.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/cpptrad.c 2003-04-23 01:31:33.000000000 +0000 *************** *** 0 **** --- 1,1216 ---- + /* CPP Library - traditional lexical analysis and macro expansion. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Neil Booth, May 2002 + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "cpplib.h" + #include "cpphash.h" + + /* The replacement text of a function-like macro is stored as a + contiguous sequence of aligned blocks, each representing the text + between subsequent parameters. + + Each block comprises the text between its surrounding parameters, + the length of that text, and the one-based index of the following + parameter. The final block in the replacement text is easily + recognizable as it has an argument index of zero. */ + + struct block + { + unsigned int text_len; + unsigned short arg_index; + uchar text[1]; + }; + + #define BLOCK_HEADER_LEN offsetof (struct block, text) + #define BLOCK_LEN(TEXT_LEN) CPP_ALIGN (BLOCK_HEADER_LEN + (TEXT_LEN)) + + /* Structure holding information about a function-like macro + invocation. */ + struct fun_macro + { + /* Memory buffer holding the trad_arg array. */ + _cpp_buff *buff; + + /* An array of size the number of macro parameters + 1, containing + the offsets of the start of each macro argument in the output + buffer. The argument continues until the character before the + start of the next one. */ + size_t *args; + + /* The hashnode of the macro. */ + cpp_hashnode *node; + + /* The offset of the macro name in the output buffer. */ + size_t offset; + + /* The line the macro name appeared on. */ + unsigned int line; + + /* Zero-based index of argument being currently lexed. */ + unsigned int argc; + }; + + /* Lexing state. It is mostly used to prevent macro expansion. */ + enum ls {ls_none = 0, /* Normal state. */ + ls_fun_open, /* When looking for '('. */ + ls_fun_close, /* When looking for ')'. */ + ls_defined, /* After defined. */ + ls_defined_close, /* Looking for ')' of defined(). */ + ls_hash, /* After # in preprocessor conditional. */ + ls_predicate, /* After the predicate, maybe paren? */ + ls_answer}; /* In answer to predicate. */ + + /* Lexing TODO: Maybe handle space in escaped newlines. Stop cpplex.c + from recognizing comments and directives during its lexing pass. */ + + static const uchar *handle_newline PARAMS ((cpp_reader *, const uchar *)); + static const uchar *skip_escaped_newlines PARAMS ((cpp_reader *, + const uchar *)); + static const uchar *skip_whitespace PARAMS ((cpp_reader *, const uchar *, + int)); + static cpp_hashnode *lex_identifier PARAMS ((cpp_reader *, const uchar *)); + static const uchar *copy_comment PARAMS ((cpp_reader *, const uchar *, int)); + static void scan_out_logical_line PARAMS ((cpp_reader *pfile, cpp_macro *)); + static void check_output_buffer PARAMS ((cpp_reader *, size_t)); + static void push_replacement_text PARAMS ((cpp_reader *, cpp_hashnode *)); + static bool scan_parameters PARAMS ((cpp_reader *, cpp_macro *)); + static bool recursive_macro PARAMS ((cpp_reader *, cpp_hashnode *)); + static void save_replacement_text PARAMS ((cpp_reader *, cpp_macro *, + unsigned int)); + static void maybe_start_funlike PARAMS ((cpp_reader *, cpp_hashnode *, + const uchar *, struct fun_macro *)); + static void save_argument PARAMS ((struct fun_macro *, size_t)); + static void replace_args_and_push PARAMS ((cpp_reader *, struct fun_macro *)); + static size_t canonicalize_text PARAMS ((uchar *, const uchar *, size_t, + uchar *)); + + /* Ensures we have N bytes' space in the output buffer, and + reallocates it if not. */ + static void + check_output_buffer (pfile, n) + cpp_reader *pfile; + size_t n; + { + /* We might need two bytes to terminate an unterminated comment, and + one more to terminate the line with a NUL. */ + n += 2 + 1; + + if (n > (size_t) (pfile->out.limit - pfile->out.cur)) + { + size_t size = pfile->out.cur - pfile->out.base; + size_t new_size = (size + n) * 3 / 2; + + pfile->out.base + = (uchar *) xrealloc (pfile->out.base, new_size); + pfile->out.limit = pfile->out.base + new_size; + pfile->out.cur = pfile->out.base + size; + } + } + + /* To be called whenever a newline character is encountered in the + input file, at CUR. Handles DOS, Mac and Unix ends of line, and + increments pfile->line. + + Returns a pointer the character after the newline sequence. */ + static const uchar * + handle_newline (pfile, cur) + cpp_reader *pfile; + const uchar *cur; + { + pfile->line++; + if (cur[0] + cur[1] == '\r' + '\n') + cur++; + return cur + 1; + } + + /* CUR points to any character in the current context, not necessarily + a backslash. Advances CUR until all escaped newlines are skipped, + and returns the new position without updating the context. + + Warns if a file buffer ends in an escaped newline. */ + static const uchar * + skip_escaped_newlines (pfile, cur) + cpp_reader *pfile; + const uchar *cur; + { + const uchar *orig_cur = cur; + + while (*cur == '\\' && is_vspace (cur[1])) + cur = handle_newline (pfile, cur + 1); + + if (cur != orig_cur && cur == RLIMIT (pfile->context) && pfile->buffer->inc) + cpp_error (pfile, DL_PEDWARN, "backslash-newline at end of file"); + + return cur; + } + + /* CUR points to the asterisk introducing a comment in the current + context. IN_DEFINE is true if we are in the replacement text of a + macro. + + The asterisk and following comment is copied to the buffer pointed + to by pfile->out.cur, which must be of sufficient size. + Unterminated comments are diagnosed, and correctly terminated in + the output. pfile->out.cur is updated depending upon IN_DEFINE, + -C, -CC and pfile->state.in_directive. + + Returns a pointer to the first character after the comment in the + input buffer. */ + static const uchar * + copy_comment (pfile, cur, in_define) + cpp_reader *pfile; + const uchar *cur; + int in_define; + { + unsigned int from_line = pfile->line; + const uchar *limit = RLIMIT (pfile->context); + uchar *out = pfile->out.cur; + + do + { + unsigned int c = *cur++; + *out++ = c; + + if (c == '/') + { + /* An immediate slash does not terminate the comment. */ + if (out[-2] == '*' && out - 2 > pfile->out.cur) + goto done; + + if (*cur == '*' && cur[1] != '/' + && CPP_OPTION (pfile, warn_comments)) + cpp_error_with_line (pfile, DL_WARNING, pfile->line, 0, + "\"/*\" within comment"); + } + else if (is_vspace (c)) + { + cur = handle_newline (pfile, cur - 1); + /* Canonicalize newline sequences and skip escaped ones. */ + if (out[-2] == '\\') + out -= 2; + else + out[-1] = '\n'; + } + } + while (cur < limit); + + cpp_error_with_line (pfile, DL_ERROR, from_line, 0, "unterminated comment"); + *out++ = '*'; + *out++ = '/'; + + done: + /* Comments in directives become spaces so that tokens are properly + separated when the ISO preprocessor re-lexes the line. The + exception is #define. */ + if (pfile->state.in_directive) + { + if (in_define) + { + if (CPP_OPTION (pfile, discard_comments_in_macro_exp)) + pfile->out.cur--; + else + pfile->out.cur = out; + } + else + pfile->out.cur[-1] = ' '; + } + else if (CPP_OPTION (pfile, discard_comments)) + pfile->out.cur--; + else + pfile->out.cur = out; + + return cur; + } + + /* CUR points to any character in the input buffer. Skips over all + contiguous horizontal white space and NULs, including comments if + SKIP_COMMENTS, until reaching the first non-horizontal-whitespace + character or the end of the current context. Escaped newlines are + removed. + + The whitespace is copied verbatim to the output buffer, except that + comments are handled as described in copy_comment(). + pfile->out.cur is updated. + + Returns a pointer to the first character after the whitespace in + the input buffer. */ + static const uchar * + skip_whitespace (pfile, cur, skip_comments) + cpp_reader *pfile; + const uchar *cur; + int skip_comments; + { + uchar *out = pfile->out.cur; + + for (;;) + { + unsigned int c = *cur++; + *out++ = c; + + if (is_nvspace (c) && c) + continue; + + if (!c && cur - 1 != RLIMIT (pfile->context)) + continue; + + if (c == '/' && skip_comments) + { + const uchar *tmp = skip_escaped_newlines (pfile, cur); + if (*tmp == '*') + { + pfile->out.cur = out; + cur = copy_comment (pfile, tmp, false /* in_define */); + out = pfile->out.cur; + continue; + } + } + + out--; + if (c == '\\' && is_vspace (*cur)) + { + cur = skip_escaped_newlines (pfile, cur - 1); + continue; + } + + break; + } + + pfile->out.cur = out; + return cur - 1; + } + + /* Lexes and outputs an identifier starting at CUR, which is assumed + to point to a valid first character of an identifier. Returns + the hashnode, and updates out.cur. */ + static cpp_hashnode * + lex_identifier (pfile, cur) + cpp_reader *pfile; + const uchar *cur; + { + size_t len; + uchar *out = pfile->out.cur; + cpp_hashnode *result; + + do + { + do + *out++ = *cur++; + while (is_numchar (*cur)); + cur = skip_escaped_newlines (pfile, cur); + } + while (is_numchar (*cur)); + + CUR (pfile->context) = cur; + len = out - pfile->out.cur; + result = (cpp_hashnode *) ht_lookup (pfile->hash_table, pfile->out.cur, + len, HT_ALLOC); + pfile->out.cur = out; + return result; + } + + /* Overlays the true file buffer temporarily with text of length LEN + starting at START. The true buffer is restored upon calling + restore_buff(). */ + void + _cpp_overlay_buffer (pfile, start, len) + cpp_reader *pfile; + const uchar *start; + size_t len; + { + cpp_buffer *buffer = pfile->buffer; + + pfile->overlaid_buffer = buffer; + buffer->saved_cur = buffer->cur; + buffer->saved_rlimit = buffer->rlimit; + + buffer->cur = start; + buffer->rlimit = start + len; + + pfile->saved_line = pfile->line; + } + + /* Restores a buffer overlaid by _cpp_overlay_buffer(). */ + void + _cpp_remove_overlay (pfile) + cpp_reader *pfile; + { + cpp_buffer *buffer = pfile->overlaid_buffer; + + buffer->cur = buffer->saved_cur; + buffer->rlimit = buffer->saved_rlimit; + + pfile->line = pfile->saved_line; + } + + /* Reads a logical line into the output buffer. Returns TRUE if there + is more text left in the buffer. */ + bool + _cpp_read_logical_line_trad (pfile) + cpp_reader *pfile; + { + do + { + if (pfile->buffer->cur == pfile->buffer->rlimit) + { + bool stop = true; + + /* Don't pop the last buffer. */ + if (pfile->buffer->prev) + { + stop = pfile->buffer->return_at_eof; + _cpp_pop_buffer (pfile); + } + + if (stop) + return false; + } + + scan_out_logical_line (pfile, NULL); + } + while (pfile->state.skipping); + + return true; + } + + /* Set up state for finding the opening '(' of a function-like + macro. */ + static void + maybe_start_funlike (pfile, node, start, macro) + cpp_reader *pfile; + cpp_hashnode *node; + const uchar *start; + struct fun_macro *macro; + { + unsigned int n = node->value.macro->paramc + 1; + + if (macro->buff) + _cpp_release_buff (pfile, macro->buff); + macro->buff = _cpp_get_buff (pfile, n * sizeof (size_t)); + macro->args = (size_t *) BUFF_FRONT (macro->buff); + macro->node = node; + macro->offset = start - pfile->out.base; + macro->argc = 0; + } + + /* Save the OFFSET of the start of the next argument to MACRO. */ + static void + save_argument (macro, offset) + struct fun_macro *macro; + size_t offset; + { + macro->argc++; + if (macro->argc <= macro->node->value.macro->paramc) + macro->args[macro->argc] = offset; + } + + /* Copies the next logical line in the current buffer (starting at + buffer->cur) to the output buffer. The output is guaranteed to + terminate with a NUL character. buffer->cur is updated. + + If MACRO is non-NULL, then we are scanning the replacement list of + MACRO, and we call save_replacement_text() every time we meet an + argument. */ + static void + scan_out_logical_line (pfile, macro) + cpp_reader *pfile; + cpp_macro *macro; + { + cpp_context *context; + const uchar *cur; + uchar *out; + struct fun_macro fmacro; + unsigned int c, paren_depth = 0, quote; + enum ls lex_state = ls_none; + bool header_ok; + + fmacro.buff = NULL; + + start_logical_line: + quote = 0; + header_ok = pfile->state.angled_headers; + CUR (pfile->context) = pfile->buffer->cur; + RLIMIT (pfile->context) = pfile->buffer->rlimit; + pfile->out.cur = pfile->out.base; + pfile->out.first_line = pfile->line; + new_context: + context = pfile->context; + cur = CUR (context); + check_output_buffer (pfile, RLIMIT (context) - cur); + out = pfile->out.cur; + + for (;;) + { + c = *cur++; + *out++ = c; + + /* Whitespace should "continue" out of the switch, + non-whitespace should "break" out of it. */ + switch (c) + { + case ' ': + case '\t': + case '\f': + case '\v': + continue; + + case '\0': + if (cur - 1 != RLIMIT (context)) + continue; + + /* If this is a macro's expansion, pop it. */ + if (context->prev) + { + pfile->out.cur = out - 1; + _cpp_pop_context (pfile); + goto new_context; + } + + /* Premature end of file. Fake a new line. */ + cur--; + if (!pfile->buffer->from_stage3) + cpp_error (pfile, DL_PEDWARN, "no newline at end of file"); + pfile->line++; + goto done; + + case '\r': case '\n': + cur = handle_newline (pfile, cur - 1); + if ((lex_state == ls_fun_open || lex_state == ls_fun_close) + && !pfile->state.in_directive) + { + /* Newlines in arguments become a space, but we don't + clear any in-progress quote. */ + if (lex_state == ls_fun_close) + out[-1] = ' '; + continue; + } + goto done; + + case '<': + if (header_ok) + quote = '>'; + break; + case '>': + if (c == quote) + quote = 0; + break; + + case '"': + case '\'': + if (c == quote) + quote = 0; + else if (!quote) + quote = c; + break; + + case '\\': + if (is_vspace (*cur)) + { + out--; + cur = skip_escaped_newlines (pfile, cur - 1); + continue; + } + else + { + /* Skip escaped quotes here, it's easier than above, but + take care to first skip escaped newlines. */ + cur = skip_escaped_newlines (pfile, cur); + if (*cur == '\\' || *cur == '"' || *cur == '\'') + *out++ = *cur++; + } + break; + + case '/': + /* Traditional CPP does not recognize comments within + literals. */ + if (!quote) + { + cur = skip_escaped_newlines (pfile, cur); + if (*cur == '*') + { + pfile->out.cur = out; + cur = copy_comment (pfile, cur, macro != 0); + out = pfile->out.cur; + continue; + } + } + break; + + case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + if (!pfile->state.skipping && (quote == 0 || macro)) + { + cpp_hashnode *node; + uchar *out_start = out - 1; + + pfile->out.cur = out_start; + node = lex_identifier (pfile, cur - 1); + out = pfile->out.cur; + cur = CUR (context); + + if (node->type == NT_MACRO + /* Should we expand for ls_answer? */ + && (lex_state == ls_none || lex_state == ls_fun_open) + && !pfile->state.prevent_expansion) + { + /* Macros invalidate MI optimization. */ + pfile->mi_valid = false; + if (! (node->flags & NODE_BUILTIN) + && node->value.macro->fun_like) + { + maybe_start_funlike (pfile, node, out_start, &fmacro); + lex_state = ls_fun_open; + fmacro.line = pfile->line; + continue; + } + else if (!recursive_macro (pfile, node)) + { + /* Remove the object-like macro's name from the + output, and push its replacement text. */ + pfile->out.cur = out_start; + push_replacement_text (pfile, node); + lex_state = ls_none; + goto new_context; + } + } + else if (macro && node->arg_index) + { + /* Found a parameter in the replacement text of a + #define. Remove its name from the output. */ + pfile->out.cur = out_start; + save_replacement_text (pfile, macro, node->arg_index); + out = pfile->out.base; + } + else if (lex_state == ls_hash) + { + lex_state = ls_predicate; + continue; + } + else if (pfile->state.in_expression + && node == pfile->spec_nodes.n_defined) + { + lex_state = ls_defined; + continue; + } + } + break; + + case '(': + if (quote == 0) + { + paren_depth++; + if (lex_state == ls_fun_open) + { + if (recursive_macro (pfile, fmacro.node)) + lex_state = ls_none; + else + { + lex_state = ls_fun_close; + paren_depth = 1; + out = pfile->out.base + fmacro.offset; + fmacro.args[0] = fmacro.offset; + } + } + else if (lex_state == ls_predicate) + lex_state = ls_answer; + else if (lex_state == ls_defined) + lex_state = ls_defined_close; + } + break; + + case ',': + if (quote == 0 && lex_state == ls_fun_close && paren_depth == 1) + save_argument (&fmacro, out - pfile->out.base); + break; + + case ')': + if (quote == 0) + { + paren_depth--; + if (lex_state == ls_fun_close && paren_depth == 0) + { + cpp_macro *m = fmacro.node->value.macro; + + m->used = 1; + lex_state = ls_none; + save_argument (&fmacro, out - pfile->out.base); + + /* A single zero-length argument is no argument. */ + if (fmacro.argc == 1 + && m->paramc == 0 + && out == pfile->out.base + fmacro.offset + 1) + fmacro.argc = 0; + + if (_cpp_arguments_ok (pfile, m, fmacro.node, fmacro.argc)) + { + /* Remove the macro's invocation from the + output, and push its replacement text. */ + pfile->out.cur = (pfile->out.base + + fmacro.offset); + CUR (context) = cur; + replace_args_and_push (pfile, &fmacro); + goto new_context; + } + } + else if (lex_state == ls_answer || lex_state == ls_defined_close) + lex_state = ls_none; + } + break; + + case '#': + if (out - 1 == pfile->out.base + /* A '#' from a macro doesn't start a directive. */ + && !pfile->context->prev + && !pfile->state.in_directive) + { + /* A directive. With the way _cpp_handle_directive + currently works, we only want to call it if either we + know the directive is OK, or we want it to fail and + be removed from the output. If we want it to be + passed through (the assembler case) then we must not + call _cpp_handle_directive. */ + pfile->out.cur = out; + cur = skip_whitespace (pfile, cur, true /* skip_comments */); + out = pfile->out.cur; + + if (is_vspace (*cur)) + { + /* Null directive. Ignore it and don't invalidate + the MI optimization. */ + out = pfile->out.base; + continue; + } + else + { + bool do_it = false; + + if (is_numstart (*cur) + && CPP_OPTION (pfile, lang) != CLK_ASM) + do_it = true; + else if (is_idstart (*cur)) + /* Check whether we know this directive, but don't + advance. */ + do_it = lex_identifier (pfile, cur)->directive_index != 0; + + if (do_it || CPP_OPTION (pfile, lang) != CLK_ASM) + { + /* This is a kludge. We want to have the ISO + preprocessor lex the next token. */ + pfile->buffer->cur = cur; + _cpp_handle_directive (pfile, false /* indented */); + /* #include changes pfile->buffer so we need to + update the limits of the current context. */ + goto start_logical_line; + } + } + } + + if (pfile->state.in_expression) + { + lex_state = ls_hash; + continue; + } + break; + + default: + break; + } + + /* Non-whitespace disables MI optimization and stops treating + '<' as a quote in #include. */ + header_ok = false; + if (!pfile->state.in_directive) + pfile->mi_valid = false; + + if (lex_state == ls_none) + continue; + + /* Some of these transitions of state are syntax errors. The + ISO preprocessor will issue errors later. */ + if (lex_state == ls_fun_open) + /* Missing '('. */ + lex_state = ls_none; + else if (lex_state == ls_hash + || lex_state == ls_predicate + || lex_state == ls_defined) + lex_state = ls_none; + + /* ls_answer and ls_defined_close keep going until ')'. */ + } + + done: + out[-1] = '\0'; + pfile->buffer->cur = cur; + pfile->out.cur = out - 1; + if (fmacro.buff) + _cpp_release_buff (pfile, fmacro.buff); + + if (lex_state == ls_fun_close) + cpp_error_with_line (pfile, DL_ERROR, fmacro.line, 0, + "unterminated argument list invoking macro \"%s\"", + NODE_NAME (fmacro.node)); + } + + /* Push a context holding the replacement text of the macro NODE on + the context stack. NODE is either object-like, or a function-like + macro with no arguments. */ + static void + push_replacement_text (pfile, node) + cpp_reader *pfile; + cpp_hashnode *node; + { + size_t len; + const uchar *text; + + if (node->flags & NODE_BUILTIN) + { + text = _cpp_builtin_macro_text (pfile, node); + len = ustrlen (text); + } + else + { + cpp_macro *macro = node->value.macro; + macro->used = 1; + text = macro->exp.text; + len = macro->count; + } + + _cpp_push_text_context (pfile, node, text, len); + } + + /* Returns TRUE if traditional macro recursion is detected. */ + static bool + recursive_macro (pfile, node) + cpp_reader *pfile; + cpp_hashnode *node; + { + bool recursing = !!(node->flags & NODE_DISABLED); + + /* Object-like macros that are already expanding are necessarily + recursive. + + However, it is possible to have traditional function-like macros + that are not infinitely recursive but recurse to any given depth. + Further, it is easy to construct examples that get ever longer + until the point they stop recursing. So there is no easy way to + detect true recursion; instead we assume any expansion more than + 20 deep since the first invocation of this macro must be + recursing. */ + if (recursing && node->value.macro->fun_like) + { + size_t depth = 0; + cpp_context *context = pfile->context; + + do + { + depth++; + if (context->macro == node && depth > 20) + break; + context = context->prev; + } + while (context); + recursing = context != NULL; + } + + if (recursing) + cpp_error (pfile, DL_ERROR, + "detected recursion whilst expanding macro \"%s\"", + NODE_NAME (node)); + + return recursing; + } + + /* Return the length of the replacement text of a function-like or + object-like non-builtin macro. */ + size_t + _cpp_replacement_text_len (macro) + const cpp_macro *macro; + { + size_t len; + + if (macro->fun_like && (macro->paramc != 0)) + { + const uchar *exp; + + len = 0; + for (exp = macro->exp.text;;) + { + struct block *b = (struct block *) exp; + + len += b->text_len; + if (b->arg_index == 0) + break; + len += NODE_LEN (macro->params[b->arg_index - 1]); + exp += BLOCK_LEN (b->text_len); + } + } + else + len = macro->count; + + return len; + } + + /* Copy the replacement text of MACRO to DEST, which must be of + sufficient size. It is not NUL-terminated. The next character is + returned. */ + uchar * + _cpp_copy_replacement_text (macro, dest) + const cpp_macro *macro; + uchar *dest; + { + if (macro->fun_like && (macro->paramc != 0)) + { + const uchar *exp; + + for (exp = macro->exp.text;;) + { + struct block *b = (struct block *) exp; + cpp_hashnode *param; + + memcpy (dest, b->text, b->text_len); + dest += b->text_len; + if (b->arg_index == 0) + break; + param = macro->params[b->arg_index - 1]; + memcpy (dest, NODE_NAME (param), NODE_LEN (param)); + dest += NODE_LEN (param); + exp += BLOCK_LEN (b->text_len); + } + } + else + { + memcpy (dest, macro->exp.text, macro->count); + dest += macro->count; + } + + return dest; + } + + /* Push a context holding the replacement text of the macro NODE on + the context stack. NODE is either object-like, or a function-like + macro with no arguments. */ + static void + replace_args_and_push (pfile, fmacro) + cpp_reader *pfile; + struct fun_macro *fmacro; + { + cpp_macro *macro = fmacro->node->value.macro; + + if (macro->paramc == 0) + push_replacement_text (pfile, fmacro->node); + else + { + const uchar *exp; + uchar *p; + _cpp_buff *buff; + size_t len = 0; + + /* Calculate the length of the argument-replaced text. */ + for (exp = macro->exp.text;;) + { + struct block *b = (struct block *) exp; + + len += b->text_len; + if (b->arg_index == 0) + break; + len += (fmacro->args[b->arg_index] + - fmacro->args[b->arg_index - 1] - 1); + exp += BLOCK_LEN (b->text_len); + } + + /* Allocate room for the expansion plus NUL. */ + buff = _cpp_get_buff (pfile, len + 1); + + /* Copy the expansion and replace arguments. */ + p = BUFF_FRONT (buff); + for (exp = macro->exp.text;;) + { + struct block *b = (struct block *) exp; + size_t arglen; + + memcpy (p, b->text, b->text_len); + p += b->text_len; + if (b->arg_index == 0) + break; + arglen = (fmacro->args[b->arg_index] + - fmacro->args[b->arg_index - 1] - 1); + memcpy (p, pfile->out.base + fmacro->args[b->arg_index - 1], + arglen); + p += arglen; + exp += BLOCK_LEN (b->text_len); + } + + /* NUL-terminate. */ + *p = '\0'; + _cpp_push_text_context (pfile, fmacro->node, BUFF_FRONT (buff), len); + + /* So we free buffer allocation when macro is left. */ + pfile->context->buff = buff; + } + } + + /* Read and record the parameters, if any, of a function-like macro + definition. Destroys pfile->out.cur. + + Returns true on success, false on failure (syntax error or a + duplicate parameter). On success, CUR (pfile->context) is just + past the closing parenthesis. */ + static bool + scan_parameters (pfile, macro) + cpp_reader *pfile; + cpp_macro *macro; + { + const uchar *cur = CUR (pfile->context) + 1; + bool ok; + + for (;;) + { + cur = skip_whitespace (pfile, cur, true /* skip_comments */); + + if (is_idstart (*cur)) + { + ok = false; + if (_cpp_save_parameter (pfile, macro, lex_identifier (pfile, cur))) + break; + cur = skip_whitespace (pfile, CUR (pfile->context), + true /* skip_comments */); + if (*cur == ',') + { + cur++; + continue; + } + ok = (*cur == ')'); + break; + } + + ok = (*cur == ')' && macro->paramc == 0); + break; + } + + CUR (pfile->context) = cur + (*cur == ')'); + + return ok; + } + + /* Save the text from pfile->out.base to pfile->out.cur as + the replacement text for the current macro, followed by argument + ARG_INDEX, with zero indicating the end of the replacement + text. */ + static void + save_replacement_text (pfile, macro, arg_index) + cpp_reader *pfile; + cpp_macro *macro; + unsigned int arg_index; + { + size_t len = pfile->out.cur - pfile->out.base; + uchar *exp; + + if (macro->paramc == 0) + { + /* Object-like and function-like macros without parameters + simply store their NUL-terminated replacement text. */ + exp = _cpp_unaligned_alloc (pfile, len + 1); + memcpy (exp, pfile->out.base, len); + exp[len] = '\0'; + macro->exp.text = exp; + macro->count = len; + } + else + { + /* Store the text's length (unsigned int), the argument index + (unsigned short, base 1) and then the text. */ + size_t blen = BLOCK_LEN (len); + struct block *block; + + if (macro->count + blen > BUFF_ROOM (pfile->a_buff)) + _cpp_extend_buff (pfile, &pfile->a_buff, macro->count + blen); + + exp = BUFF_FRONT (pfile->a_buff); + block = (struct block *) (exp + macro->count); + macro->exp.text = exp; + + /* Write out the block information. */ + block->text_len = len; + block->arg_index = arg_index; + memcpy (block->text, pfile->out.base, len); + + /* Lex the rest into the start of the output buffer. */ + pfile->out.cur = pfile->out.base; + + macro->count += blen; + + /* If we've finished, commit the memory. */ + if (arg_index == 0) + BUFF_FRONT (pfile->a_buff) += macro->count; + } + } + + /* Analyze and save the replacement text of a macro. Returns true on + success. */ + bool + _cpp_create_trad_definition (pfile, macro) + cpp_reader *pfile; + cpp_macro *macro; + { + const uchar *cur; + uchar *limit; + cpp_context *context = pfile->context; + + /* The context has not been set up for command line defines, and CUR + has not been updated for the macro name for in-file defines. */ + pfile->out.cur = pfile->out.base; + CUR (context) = pfile->buffer->cur; + RLIMIT (context) = pfile->buffer->rlimit; + check_output_buffer (pfile, RLIMIT (context) - CUR (context)); + + /* Is this a function-like macro? */ + if (* CUR (context) == '(') + { + /* Setting macro to NULL indicates an error occurred, and + prevents unnecessary work in scan_out_logical_line. */ + if (!scan_parameters (pfile, macro)) + macro = NULL; + else + { + /* Success. Commit the parameter array. */ + macro->params = (cpp_hashnode **) BUFF_FRONT (pfile->a_buff); + BUFF_FRONT (pfile->a_buff) = (uchar *) ¯o->params[macro->paramc]; + macro->fun_like = 1; + } + } + + /* Skip leading whitespace in the replacement text. */ + pfile->buffer->cur + = skip_whitespace (pfile, CUR (context), + CPP_OPTION (pfile, discard_comments_in_macro_exp)); + + pfile->state.prevent_expansion++; + scan_out_logical_line (pfile, macro); + pfile->state.prevent_expansion--; + + if (!macro) + return false; + + /* Skip trailing white space. */ + cur = pfile->out.base; + limit = pfile->out.cur; + while (limit > cur && is_space (limit[-1])) + limit--; + pfile->out.cur = limit; + save_replacement_text (pfile, macro, 0); + + return true; + } + + /* Copy SRC of length LEN to DEST, but convert all contiguous + whitespace to a single space, provided it is not in quotes. The + quote currently in effect is pointed to by PQUOTE, and is updated + by the function. Returns the number of bytes copied. */ + static size_t + canonicalize_text (dest, src, len, pquote) + uchar *dest; + const uchar *src; + size_t len; + uchar *pquote; + { + uchar *orig_dest = dest; + uchar quote = *pquote; + + while (len) + { + if (is_space (*src) && !quote) + { + do + src++, len--; + while (len && is_space (*src)); + *dest++ = ' '; + } + else + { + if (*src == '\'' || *src == '"') + { + if (!quote) + quote = *src; + else if (quote == *src) + quote = 0; + } + *dest++ = *src++, len--; + } + } + + *pquote = quote; + return dest - orig_dest; + } + + /* Returns true if MACRO1 and MACRO2 have expansions different other + than in the form of their whitespace. */ + bool + _cpp_expansions_different_trad (macro1, macro2) + const cpp_macro *macro1, *macro2; + { + uchar *p1 = xmalloc (macro1->count + macro2->count); + uchar *p2 = p1 + macro1->count; + uchar quote1 = 0, quote2 = 0; + bool mismatch; + size_t len1, len2; + + if (macro1->paramc > 0) + { + const uchar *exp1 = macro1->exp.text, *exp2 = macro2->exp.text; + + mismatch = true; + for (;;) + { + struct block *b1 = (struct block *) exp1; + struct block *b2 = (struct block *) exp2; + + if (b1->arg_index != b2->arg_index) + break; + + len1 = canonicalize_text (p1, b1->text, b1->text_len, "e1); + len2 = canonicalize_text (p2, b2->text, b2->text_len, "e2); + if (len1 != len2 || memcmp (p1, p2, len1)) + break; + if (b1->arg_index == 0) + { + mismatch = false; + break; + } + exp1 += BLOCK_LEN (b1->text_len); + exp2 += BLOCK_LEN (b2->text_len); + } + } + else + { + len1 = canonicalize_text (p1, macro1->exp.text, macro1->count, "e1); + len2 = canonicalize_text (p2, macro2->exp.text, macro2->count, "e2); + mismatch = (len1 != len2 || memcmp (p1, p2, len1)); + } + + free (p1); + return mismatch; + } diff -Nrc3pad gcc-3.2.3/gcc/c-pragma.c gcc-3.3/gcc/c-pragma.c *** gcc-3.2.3/gcc/c-pragma.c 2002-05-27 05:48:14.000000000 +0000 --- gcc-3.3/gcc/c-pragma.c 2003-04-29 14:31:46.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 29,35 **** #include "flags.h" #include "toplev.h" #include "ggc.h" - #include "c-lex.h" #include "c-common.h" #include "output.h" #include "tm_p.h" --- 29,34 ---- *************** Software Foundation, 59 Temple Place - S *** 37,47 **** #define GCC_BAD(msgid) do { warning (msgid); return; } while (0) #define GCC_BAD2(msgid, arg) do { warning (msgid, arg); return; } while (0) ! #ifdef HANDLE_PRAGMA_PACK ! static void handle_pragma_pack PARAMS ((cpp_reader *)); ! ! #ifdef HANDLE_PRAGMA_PACK_PUSH_POP ! typedef struct align_stack { int alignment; unsigned int num_pushes; --- 36,42 ---- #define GCC_BAD(msgid) do { warning (msgid); return; } while (0) #define GCC_BAD2(msgid, arg) do { warning (msgid, arg); return; } while (0) ! typedef struct align_stack GTY(()) { int alignment; unsigned int num_pushes; *************** typedef struct align_stack *** 49,56 **** struct align_stack * prev; } align_stack; ! static struct align_stack * alignment_stack = NULL; /* If we have a "global" #pragma pack() in effect when the first #pragma pack(push,) is encountered, this stores the value of maximum_field_alignment in effect. When the final pop_alignment() --- 44,55 ---- struct align_stack * prev; } align_stack; ! static GTY(()) struct align_stack * alignment_stack; + #ifdef HANDLE_PRAGMA_PACK + static void handle_pragma_pack PARAMS ((cpp_reader *)); + + #ifdef HANDLE_PRAGMA_PACK_PUSH_POP /* If we have a "global" #pragma pack() in effect when the first #pragma pack(push,) is encountered, this stores the value of maximum_field_alignment in effect. When the final pop_alignment() *************** static int default_alignment; *** 62,68 **** static void push_alignment PARAMS ((int, tree)); static void pop_alignment PARAMS ((tree)); - static void mark_align_stack PARAMS ((void *)); /* Push an alignment value onto the stack. */ static void --- 61,66 ---- *************** push_alignment (alignment, id) *** 76,82 **** { align_stack * entry; ! entry = (align_stack *) xmalloc (sizeof (* entry)); entry->alignment = alignment; entry->num_pushes = 1; --- 74,80 ---- { align_stack * entry; ! entry = (align_stack *) ggc_alloc (sizeof (* entry)); entry->alignment = alignment; entry->num_pushes = 1; *************** pop_alignment (id) *** 138,161 **** else maximum_field_alignment = entry->alignment; - free (alignment_stack); - alignment_stack = entry; } } - - static void - mark_align_stack (p) - void *p; - { - align_stack *a = *(align_stack **) p; - - while (a) - { - ggc_mark_tree (a->id); - a = a->prev; - } - } #else /* not HANDLE_PRAGMA_PACK_PUSH_POP */ #define SET_GLOBAL_ALIGNMENT(ALIGN) (maximum_field_alignment = (ALIGN)) #define push_alignment(ID, N) \ --- 136,144 ---- *************** handle_pragma_pack (dummy) *** 273,284 **** } #endif /* HANDLE_PRAGMA_PACK */ #ifdef HANDLE_PRAGMA_WEAK static void apply_pragma_weak PARAMS ((tree, tree)); static void handle_pragma_weak PARAMS ((cpp_reader *)); - static tree pending_weaks; - static void apply_pragma_weak (decl, value) tree decl, value; --- 256,267 ---- } #endif /* HANDLE_PRAGMA_PACK */ + static GTY(()) tree pending_weaks; + #ifdef HANDLE_PRAGMA_WEAK static void apply_pragma_weak PARAMS ((tree, tree)); static void handle_pragma_weak PARAMS ((cpp_reader *)); static void apply_pragma_weak (decl, value) tree decl, value; *************** maybe_apply_pragma_weak (decl) *** 364,374 **** } #endif /* HANDLE_PRAGMA_WEAK */ #ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME static void handle_pragma_redefine_extname PARAMS ((cpp_reader *)); - static tree pending_redefine_extname; - /* #pragma redefined_extname oldname newname */ static void handle_pragma_redefine_extname (dummy) --- 347,357 ---- } #endif /* HANDLE_PRAGMA_WEAK */ + static GTY(()) tree pending_redefine_extname; + #ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME static void handle_pragma_redefine_extname PARAMS ((cpp_reader *)); /* #pragma redefined_extname oldname newname */ static void handle_pragma_redefine_extname (dummy) *************** handle_pragma_redefine_extname (dummy) *** 400,415 **** SET_DECL_ASSEMBLER_NAME (decl, newname); } else ! pending_redefine_extname ! = tree_cons (oldname, newname, pending_redefine_extname); } #endif #ifdef HANDLE_PRAGMA_EXTERN_PREFIX static void handle_pragma_extern_prefix PARAMS ((cpp_reader *)); - static tree pragma_extern_prefix; - /* #pragma extern_prefix "prefix" */ static void handle_pragma_extern_prefix (dummy) --- 383,405 ---- SET_DECL_ASSEMBLER_NAME (decl, newname); } else ! add_to_renaming_pragma_list(oldname, newname); } #endif + void + add_to_renaming_pragma_list (oldname, newname) + tree oldname, newname; + { + pending_redefine_extname + = tree_cons (oldname, newname, pending_redefine_extname); + } + + static GTY(()) tree pragma_extern_prefix; + #ifdef HANDLE_PRAGMA_EXTERN_PREFIX static void handle_pragma_extern_prefix PARAMS ((cpp_reader *)); /* #pragma extern_prefix "prefix" */ static void handle_pragma_extern_prefix (dummy) *************** maybe_apply_renaming_pragma (decl, asmna *** 457,467 **** { const char *oldasmname = IDENTIFIER_POINTER (oldname) + 1; if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldasmname) != 0) ! warning ("asm declaration conficts with previous rename"); asmname = build_string (strlen (oldasmname), oldasmname); } - #ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME { tree *p, t; --- 447,456 ---- { const char *oldasmname = IDENTIFIER_POINTER (oldname) + 1; if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldasmname) != 0) ! warning ("asm declaration conflicts with previous rename"); asmname = build_string (strlen (oldasmname), oldasmname); } { tree *p, t; *************** maybe_apply_renaming_pragma (decl, asmna *** 477,483 **** return build_string (strlen (newname), newname); } } - #endif #ifdef HANDLE_PRAGMA_EXTERN_PREFIX if (pragma_extern_prefix && !asmname) --- 466,471 ---- *************** init_pragma () *** 501,525 **** #endif #ifdef HANDLE_PRAGMA_WEAK cpp_register_pragma (parse_in, 0, "weak", handle_pragma_weak); - ggc_add_tree_root (&pending_weaks, 1); #endif #ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME cpp_register_pragma (parse_in, 0, "redefine_extname", handle_pragma_redefine_extname); - ggc_add_tree_root (&pending_redefine_extname, 1); #endif #ifdef HANDLE_PRAGMA_EXTERN_PREFIX cpp_register_pragma (parse_in, 0, "extern_prefix", handle_pragma_extern_prefix); - ggc_add_tree_root (&pragma_extern_prefix, 1); #endif #ifdef REGISTER_TARGET_PRAGMAS REGISTER_TARGET_PRAGMAS (parse_in); #endif - - #ifdef HANDLE_PRAGMA_PACK_PUSH_POP - ggc_add_root (&alignment_stack, 1, sizeof(alignment_stack), - mark_align_stack); - #endif } --- 489,507 ---- #endif #ifdef HANDLE_PRAGMA_WEAK cpp_register_pragma (parse_in, 0, "weak", handle_pragma_weak); #endif #ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME cpp_register_pragma (parse_in, 0, "redefine_extname", handle_pragma_redefine_extname); #endif #ifdef HANDLE_PRAGMA_EXTERN_PREFIX cpp_register_pragma (parse_in, 0, "extern_prefix", handle_pragma_extern_prefix); #endif #ifdef REGISTER_TARGET_PRAGMAS REGISTER_TARGET_PRAGMAS (parse_in); #endif } + + #include "gt-c-pragma.h" diff -Nrc3pad gcc-3.2.3/gcc/c-pragma.h gcc-3.3/gcc/c-pragma.h *** gcc-3.2.3/gcc/c-pragma.h 2002-03-22 22:49:38.000000000 +0000 --- gcc-3.3/gcc/c-pragma.h 2002-07-08 17:53:24.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 22,27 **** --- 22,34 ---- #ifndef GCC_C_PRAGMA_H #define GCC_C_PRAGMA_H + /* Cause the `yydebug' variable to be defined. */ + #define YYDEBUG 1 + extern int yydebug; + + struct cpp_reader; + extern struct cpp_reader* parse_in; + #ifdef HANDLE_SYSV_PRAGMA #if ((defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_WEAK_ALIAS)) \ || defined (ASM_WEAKEN_DECL)) *************** extern void cpp_register_pragma PARAMS ( *** 55,59 **** --- 62,69 ---- extern void maybe_apply_pragma_weak PARAMS ((tree)); extern tree maybe_apply_renaming_pragma PARAMS ((tree, tree)); + extern void add_to_renaming_pragma_list PARAMS ((tree, tree)); + + extern int c_lex PARAMS ((tree *)); #endif /* GCC_C_PRAGMA_H */ diff -Nrc3pad gcc-3.2.3/gcc/c-pretty-print.c gcc-3.3/gcc/c-pretty-print.c *** gcc-3.2.3/gcc/c-pretty-print.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/c-pretty-print.c 2002-10-16 00:40:27.000000000 +0000 *************** *** 0 **** --- 1,1493 ---- + /* Subroutines common to both C and C++ pretty-printers. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Gabriel Dos Reis + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #include "real.h" + #include "c-pretty-print.h" + #include "c-tree.h" + + /* literal */ + static void pp_c_char PARAMS ((c_pretty_printer, int)); + static void pp_c_character_literal PARAMS ((c_pretty_printer, tree)); + static void pp_c_bool_literal PARAMS ((c_pretty_printer, tree)); + static bool pp_c_enumerator PARAMS ((c_pretty_printer, tree)); + static void pp_c_integer_literal PARAMS ((c_pretty_printer, tree)); + static void pp_c_real_literal PARAMS ((c_pretty_printer, tree)); + static void pp_c_string_literal PARAMS ((c_pretty_printer, tree)); + + static void pp_c_primary_expression PARAMS ((c_pretty_printer, tree)); + + /* postfix-expression */ + static void pp_c_initializer_list PARAMS ((c_pretty_printer, tree)); + + static void pp_c_unary_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_multiplicative_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_additive_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_shift_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_relational_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_equality_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_and_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_exclusive_or_expression PARAMS ((c_pretty_printer, + tree)); + static void pp_c_inclusive_or_expression PARAMS ((c_pretty_printer, + tree)); + static void pp_c_logical_and_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_conditional_expression PARAMS ((c_pretty_printer, tree)); + static void pp_c_assignment_expression PARAMS ((c_pretty_printer, tree)); + + /* declarations. */ + static void pp_c_declaration_specifiers PARAMS ((c_pretty_printer, tree)); + static void pp_c_init_declarator PARAMS ((c_pretty_printer, tree)); + static void pp_c_declarator PARAMS ((c_pretty_printer, tree)); + static void pp_c_direct_declarator PARAMS ((c_pretty_printer, tree)); + static void pp_c_abstract_declarator PARAMS ((c_pretty_printer, tree)); + static void pp_c_specifier_qualifier_list PARAMS ((c_pretty_printer, tree)); + static void pp_c_simple_type_specifier PARAMS ((c_pretty_printer, tree)); + static void pp_c_parameter_declaration PARAMS ((c_pretty_printer, tree)); + static void pp_c_type_id PARAMS ((c_pretty_printer, tree)); + static void pp_c_storage_class_specifier PARAMS ((c_pretty_printer, tree)); + static void pp_c_function_specifier PARAMS ((c_pretty_printer, tree)); + + + /* Declarations. */ + + /* Print out CV-qualifiers. Take care of possible extensions. */ + void + pp_c_cv_qualifier (ppi, cv) + c_pretty_printer ppi; + int cv; + { + if (cv & TYPE_QUAL_CONST) + pp_c_identifier (ppi, "const"); + if (cv & TYPE_QUAL_VOLATILE) + pp_c_identifier (ppi, "volatile"); + if (cv & TYPE_QUAL_RESTRICT) + pp_c_identifier (ppi, flag_isoc99 ? "restrict" : "__restrict__"); + } + + static void + pp_c_simple_type_specifier (ppi, t) + c_pretty_printer ppi; + tree t; + { + const enum tree_code code = TREE_CODE (t); + switch (code) + { + case ERROR_MARK: + pp_c_identifier (ppi, ""); + break; + + #if 0 + case UNKNOWN_TYPE: + pp_c_identifier (ppi, ""); + break; + #endif + + case IDENTIFIER_NODE: + pp_c_tree_identifier (ppi, t); + break; + + case VOID_TYPE: + case BOOLEAN_TYPE: + case CHAR_TYPE: + case INTEGER_TYPE: + case REAL_TYPE: + pp_c_tree_identifier (ppi, DECL_NAME (t)); + break; + + case COMPLEX_TYPE: + case VECTOR_TYPE: + pp_c_simple_type_specifier (ppi, TYPE_MAIN_VARIANT (TREE_TYPE (t))); + if (code == COMPLEX_TYPE) + pp_c_identifier (ppi, flag_isoc99 ? "_Complex" : "__complex__"); + else if (code == VECTOR_TYPE) + pp_c_identifier (ppi, "__vector__"); + break; + + case TYPE_DECL: + if (DECL_NAME (t)) + pp_c_tree_identifier (ppi, DECL_NAME (t)); + else + pp_c_identifier (ppi, ""); + break; + + case UNION_TYPE: + case RECORD_TYPE: + case ENUMERAL_TYPE: + if (code == UNION_TYPE) + pp_c_identifier (ppi, "union"); + else if (code == RECORD_TYPE) + pp_c_identifier (ppi, "struct"); + else if (code == ENUMERAL_TYPE) + pp_c_identifier (ppi, "enum"); + else + pp_c_identifier (ppi, ""); + + if (TYPE_NAME (t)) + pp_c_tree_identifier (ppi, TYPE_NAME (t)); + else + pp_c_identifier (ppi, ""); + break; + + default: + pp_unsupported_tree (ppi, t); + } + } + + static inline void + pp_c_specifier_qualifier_list (ppi, t) + c_pretty_printer ppi; + tree t; + { + pp_c_simple_type_specifier (ppi, TYPE_MAIN_VARIANT (TREE_TYPE (t))); + pp_c_cv_qualifier (ppi, TYPE_QUALS (t)); + } + + static void + pp_c_abstract_declarator (ppi, t) + c_pretty_printer ppi; + tree t; + { + pp_unsupported_tree (ppi, t); + } + + + static inline void + pp_c_type_id (ppi, t) + c_pretty_printer ppi; + tree t; + { + pp_c_specifier_qualifier_list (ppi, t); + pp_c_abstract_declarator (ppi, t); + } + + static inline void + pp_c_storage_class_specifier (pp, t) + c_pretty_printer pp; + tree t; + { + if (TREE_CODE (t) == TYPE_DECL) + pp_c_identifier (pp, "typedef"); + else if (DECL_REGISTER (t)) + pp_c_identifier (pp, "register"); + } + + static inline void + pp_c_function_specifier (pp, t) + c_pretty_printer pp; + tree t; + { + if (TREE_CODE (t) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (t)) + pp_c_identifier (pp, "inline"); + } + + static inline void + pp_c_declaration_specifiers (pp, t) + c_pretty_printer pp; + tree t; + { + pp_c_storage_class_specifier (pp, t); + pp_c_function_specifier (pp, t); + pp_type_specifier (pp, TYPE_MAIN_VARIANT (TREE_TYPE (t))); + pp_c_cv_qualifier (pp, TYPE_QUALS (TREE_TYPE (t))); + } + + static inline void + pp_c_direct_declarator (pp, t) + c_pretty_printer pp; + tree t; + { + pp_unsupported_tree (pp, t); + } + + static inline void + pp_c_declarator (pp, t) + c_pretty_printer pp; + tree t; + { + pp_unsupported_tree (pp, t); + } + + static inline void + pp_c_init_declarator (pp, t) + c_pretty_printer pp; + tree t; + { + pp_declarator (pp, t); + if (DECL_INITIAL (t)) + { + pp_whitespace (pp); + pp_equal (pp); + pp_whitespace (pp); + pp_c_initializer (pp, DECL_INITIAL (t)); + } + } + + void + pp_c_declaration (pp, t) + c_pretty_printer pp; + tree t; + { + pp_declaration_specifiers (pp, t); + pp_c_init_declarator (pp, t); + } + + static void + pp_c_parameter_declaration (pp, t) + c_pretty_printer pp; + tree t; + { + pp_unsupported_tree (pp, t); + } + + /* Pretty-print ATTRIBUTES using GNU C extension syntax. */ + void + pp_c_attributes (pp, attributes) + c_pretty_printer pp; + tree attributes; + { + if (attributes == NULL_TREE) + return; + + pp_c_identifier (pp, "__attribute__"); + pp_c_left_paren (pp); + pp_c_left_paren (pp); + for (; attributes != NULL_TREE; attributes = TREE_CHAIN (attributes)) + { + pp_tree_identifier (pp, TREE_PURPOSE (attributes)); + if (TREE_VALUE (attributes)) + { + pp_c_left_paren (pp); + pp_c_expression_list (pp, TREE_VALUE (attributes)); + pp_c_right_paren (pp); + } + + if (TREE_CHAIN (attributes)) + pp_separate_with (pp, ','); + } + pp_c_right_paren (pp); + pp_c_right_paren (pp); + } + + + /* Expressions. */ + + /* Print out a c-char. */ + static void + pp_c_char (ppi, c) + c_pretty_printer ppi; + int c; + { + switch (c) + { + case TARGET_NEWLINE: + pp_identifier (ppi, "\\n"); + break; + case TARGET_TAB: + pp_identifier (ppi, "\\t"); + break; + case TARGET_VT: + pp_identifier (ppi, "\\v"); + break; + case TARGET_BS: + pp_identifier (ppi, "\\b"); + break; + case TARGET_CR: + pp_identifier (ppi, "\\r"); + break; + case TARGET_FF: + pp_identifier (ppi, "\\f"); + break; + case TARGET_BELL: + pp_identifier (ppi, "\\a"); + break; + case '\\': + pp_identifier (ppi, "\\\\"); + break; + case '\'': + pp_identifier (ppi, "\\'"); + break; + case '\"': + pp_identifier (ppi, "\\\""); + break; + default: + if (ISPRINT (c)) + pp_character (ppi, c); + else + pp_format_scalar (ppi, "\\%03o", (unsigned) c); + break; + } + } + + /* Print out a STRING literal. */ + static inline void + pp_c_string_literal (ppi, s) + c_pretty_printer ppi; + tree s; + { + const char *p = TREE_STRING_POINTER (s); + int n = TREE_STRING_LENGTH (s) - 1; + int i; + pp_doublequote (ppi); + for (i = 0; i < n; ++i) + pp_c_char (ppi, p[i]); + pp_doublequote (ppi); + } + + /* Print out a CHARACTER literal. */ + static inline void + pp_c_character_literal (ppi, c) + c_pretty_printer ppi; + tree c; + { + pp_quote (ppi); + pp_c_char (ppi, tree_low_cst (c, 0)); + pp_quote (ppi); + } + + /* Print out a BOOLEAN literal. */ + static inline void + pp_c_bool_literal (ppi, b) + c_pretty_printer ppi; + tree b; + { + if (b == boolean_false_node || integer_zerop (b)) + { + if (c_language == clk_cplusplus) + pp_c_identifier (ppi, "false"); + else if (c_language == clk_c && flag_isoc99) + pp_c_identifier (ppi, "_False"); + else + pp_unsupported_tree (ppi, b); + } + else if (b == boolean_true_node) + { + if (c_language == clk_cplusplus) + pp_c_identifier (ppi, "true"); + else if (c_language == clk_c && flag_isoc99) + pp_c_identifier (ppi, "_True"); + else + pp_unsupported_tree (ppi, b); + } + else + pp_unsupported_tree (ppi, b); + } + + /* Attempt to print out an ENUMERATOR. Return true on success. Else return + false; that means the value was obtained by a cast, in which case + print out the type-id part of the cast-expression -- the casted value + is then printed by pp_c_integer_literal. */ + static bool + pp_c_enumerator (ppi, e) + c_pretty_printer ppi; + tree e; + { + tree type = TREE_TYPE (e); + tree value; + + /* Find the name of this constant. */ + for (value = TYPE_VALUES (type); + value != NULL_TREE && !tree_int_cst_equal (TREE_VALUE (value), e); + value = TREE_CHAIN (value)) + ; + + if (value != NULL_TREE) + pp_c_tree_identifier (ppi, TREE_PURPOSE (value)); + else + { + /* Value must have been cast. */ + pp_c_left_paren (ppi); + pp_type_id (ppi, type); + pp_c_right_paren (ppi); + return false; + } + + return true; + } + + /* Print out an INTEGER constant value. */ + static void + pp_c_integer_literal (ppi, i) + c_pretty_printer ppi; + tree i; + { + tree type = TREE_TYPE (i); + + if (type == boolean_type_node) + pp_c_bool_literal (ppi, i); + else if (type == char_type_node) + pp_c_character_literal (ppi, i); + else if (TREE_CODE (type) == ENUMERAL_TYPE + && pp_c_enumerator (ppi, i)) + ; + else + { + if (host_integerp (i, 0)) + pp_wide_integer (ppi, TREE_INT_CST_LOW (i)); + else + { + if (tree_int_cst_sgn (i) < 0) + { + static char format[10]; /* "%x%09999x\0" */ + if (!format[0]) + sprintf (format, "%%x%%0%dx", HOST_BITS_PER_INT / 4); + + pp_c_char (ppi, '-'); + i = build_int_2 (-TREE_INT_CST_LOW (i), + ~TREE_INT_CST_HIGH (i) + !TREE_INT_CST_LOW (i)); + sprintf (pp_buffer (ppi)->digit_buffer, format, + TREE_INT_CST_HIGH (i), TREE_INT_CST_LOW (i)); + pp_identifier (ppi, pp_buffer (ppi)->digit_buffer); + + } + } + } + } + + /* Print out a REAL value. */ + static inline void + pp_c_real_literal (ppi, r) + c_pretty_printer ppi; + tree r; + { + real_to_decimal (pp_buffer (ppi)->digit_buffer, &TREE_REAL_CST (r), + sizeof (pp_buffer (ppi)->digit_buffer), 0, 1); + pp_identifier (ppi, pp_buffer(ppi)->digit_buffer); + } + + + void + pp_c_literal (ppi, e) + c_pretty_printer ppi; + tree e; + { + switch (TREE_CODE (e)) + { + case INTEGER_CST: + pp_c_integer_literal (ppi, e); + break; + + case REAL_CST: + pp_c_real_literal (ppi, e); + break; + + case STRING_CST: + pp_c_string_literal (ppi, e); + break; + + default: + pp_unsupported_tree (ppi, e); + break; + } + } + + /* Pretty-print a C primary-expression. */ + static void + pp_c_primary_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + switch (TREE_CODE (e)) + { + case VAR_DECL: + case PARM_DECL: + case FIELD_DECL: + case CONST_DECL: + case FUNCTION_DECL: + case LABEL_DECL: + e = DECL_NAME (e); + /* Fall through. */ + case IDENTIFIER_NODE: + pp_c_tree_identifier (ppi, e); + break; + + case ERROR_MARK: + pp_c_identifier (ppi, ""); + break; + + case RESULT_DECL: + pp_c_identifier (ppi, ""); + break; + + case INTEGER_CST: + case REAL_CST: + case STRING_CST: + pp_c_literal (ppi, e); + break; + + case TARGET_EXPR: + pp_c_left_paren (ppi); + pp_c_identifier (ppi, "__builtin_memcpy"); + pp_c_left_paren (ppi); + pp_ampersand (ppi); + pp_c_primary_expression (ppi, TREE_OPERAND (e, 0)); + pp_separate_with (ppi, ','); + pp_ampersand (ppi); + pp_initializer (ppi, TREE_OPERAND (e, 1)); + if (TREE_OPERAND (e, 2)) + { + pp_separate_with (ppi, ','); + pp_c_expression (ppi, TREE_OPERAND (e, 2)); + } + pp_c_right_paren (ppi); + + case STMT_EXPR: + pp_c_left_paren (ppi); + pp_statement (ppi, STMT_EXPR_STMT (e)); + pp_c_right_paren (ppi); + break; + + default: + /* Make sure this call won't cause any infinite loop. */ + pp_c_left_paren (ppi); + pp_c_expression (ppi, e); + pp_c_right_paren (ppi); + break; + } + } + + /* Print out a C initializer -- also support C compound-literals. */ + void + pp_c_initializer (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == CONSTRUCTOR) + { + enum tree_code code = TREE_CODE (TREE_TYPE (e)); + if (code == RECORD_TYPE || code == UNION_TYPE || code == ARRAY_TYPE) + { + pp_left_brace (ppi); + pp_c_initializer_list (ppi, e); + pp_right_brace (ppi); + } + else + pp_unsupported_tree (ppi, TREE_OPERAND (e, 1)); + } + else + pp_assignment_expression (ppi, e); + } + + static void + pp_c_initializer_list (ppi, e) + c_pretty_printer ppi; + tree e; + { + tree type = TREE_TYPE (e); + const enum tree_code code = TREE_CODE (type); + + if (code == RECORD_TYPE || code == UNION_TYPE || code == ARRAY_TYPE) + { + tree init = TREE_OPERAND (e, 1); + for (; init != NULL_TREE; init = TREE_CHAIN (init)) + { + if (code == RECORD_TYPE || code == UNION_TYPE) + { + pp_dot (ppi); + pp_c_primary_expression (ppi, TREE_PURPOSE (init)); + } + else + { + pp_c_left_bracket (ppi); + if (TREE_PURPOSE (init)) + pp_c_literal (ppi, TREE_PURPOSE (init)); + pp_c_right_bracket (ppi); + } + pp_c_whitespace (ppi); + pp_equal (ppi); + pp_c_whitespace (ppi); + pp_initializer (ppi, TREE_VALUE (init)); + if (TREE_CHAIN (init)) + pp_separate_with (ppi, ','); + } + } + else + pp_unsupported_tree (ppi, type); + } + + void + pp_c_postfix_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + enum tree_code code = TREE_CODE (e); + switch (code) + { + case POSTINCREMENT_EXPR: + case POSTDECREMENT_EXPR: + pp_postfix_expression (ppi, TREE_OPERAND (e, 0)); + pp_identifier (ppi, code == POSTINCREMENT_EXPR ? "++" : "--"); + break; + + case ARROW_EXPR: + pp_postfix_expression (ppi, TREE_OPERAND (e, 0)); + pp_arrow (ppi); + break; + + case ARRAY_REF: + pp_postfix_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_left_bracket (ppi); + pp_c_expression (ppi, TREE_OPERAND (e, 1)); + pp_c_right_bracket (ppi); + break; + + case CALL_EXPR: + pp_postfix_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_left_paren (ppi); + pp_c_expression_list (ppi, TREE_OPERAND (e, 1)); + pp_c_right_paren (ppi); + break; + + case ABS_EXPR: + case FFS_EXPR: + pp_c_identifier (ppi, + code == ABS_EXPR ? "__builtin_abs" : "__builtin_ffs"); + pp_c_left_paren (ppi); + pp_c_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_right_paren (ppi); + break; + + case COMPONENT_REF: + { + tree object = TREE_OPERAND (e, 0); + if (TREE_CODE (object) == INDIRECT_REF) + { + pp_postfix_expression (ppi, TREE_OPERAND (object, 0)); + pp_arrow (ppi); + } + else + { + pp_postfix_expression (ppi, object); + pp_dot (ppi); + } + pp_c_expression (ppi, TREE_OPERAND (e, 1)); + } + break; + + case COMPLEX_CST: + case VECTOR_CST: + case COMPLEX_EXPR: + pp_c_left_paren (ppi); + pp_type_id (ppi, TREE_TYPE (e)); + pp_c_right_paren (ppi); + pp_left_brace (ppi); + + if (code == COMPLEX_CST) + { + pp_c_expression (ppi, TREE_REALPART (e)); + pp_separate_with (ppi, ','); + pp_c_expression (ppi, TREE_IMAGPART (e)); + } + else if (code == VECTOR_CST) + pp_c_expression_list (ppi, TREE_VECTOR_CST_ELTS (e)); + else if (code == COMPLEX_EXPR) + { + pp_c_expression (ppi, TREE_OPERAND (e, 0)); + pp_separate_with (ppi, ','); + pp_c_expression (ppi, TREE_OPERAND (e, 1)); + } + + pp_right_brace (ppi); + break; + + case COMPOUND_LITERAL_EXPR: + e = DECL_INITIAL (e); + /* Fall through. */ + case CONSTRUCTOR: + pp_initializer (ppi, e); + break; + + #if 0 + case SRCLOC: + pp_left_paren (ppi); + pp_identifier (ppi, "__location__"); + pp_right_paren (ppi); + pp_whitespace (ppi); + pp_left_brace (ppi); + pp_dot (ppi); + pp_identifier (ppi, "file"); + pp_whitespace (ppi); + pp_equal (ppi); + pp_c_whitespace (ppi); + pp_c_expression (ppi, SRCLOC_FILE (e)); + pp_separate_with (ppi, ','); + pp_dot (ppi); + pp_identifier (ppi, "line"); + pp_whitespace (ppi); + pp_equal (ppi); + pp_c_whitespace (ppi); + pp_c_expression (ppi, SRCLOC_LINE (e)); + pp_right_brace (ppi); + break; + #endif + + case VA_ARG_EXPR: + pp_c_identifier (ppi, "__builtin_va_arg"); + pp_c_left_paren (ppi); + pp_assignment_expression (ppi, TREE_OPERAND (e, 0)); + pp_separate_with (ppi, ','); + pp_type_id (ppi, TREE_TYPE (e)); + pp_c_right_paren (ppi); + break; + + default: + pp_primary_expression (ppi, e); + break; + } + } + + /* Print out an expression-list; E is expected to be a TREE_LIST */ + void + pp_c_expression_list (ppi, e) + c_pretty_printer ppi; + tree e; + { + for (; e != NULL_TREE; e = TREE_CHAIN (e)) + { + pp_c_assignment_expression (ppi, TREE_VALUE (e)); + if (TREE_CHAIN (e)) + pp_separate_with (ppi, ','); + } + } + + static void + pp_c_unary_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + enum tree_code code = TREE_CODE (e); + switch (code) + { + case PREINCREMENT_EXPR: + case PREDECREMENT_EXPR: + pp_identifier (ppi, code == PREINCREMENT_EXPR ? "++" : "--"); + pp_c_unary_expression (ppi, TREE_OPERAND (e, 0)); + break; + + case ADDR_EXPR: + case INDIRECT_REF: + case CONVERT_EXPR: + case NEGATE_EXPR: + case BIT_NOT_EXPR: + case TRUTH_NOT_EXPR: + case CONJ_EXPR: + if (code == ADDR_EXPR) + pp_ampersand (ppi); + else if (code == INDIRECT_REF) + pp_star (ppi); + else if (code == NEGATE_EXPR) + pp_minus (ppi); + else if (code == BIT_NOT_EXPR || code == CONJ_EXPR) + pp_complement (ppi); + else if (code == TRUTH_NOT_EXPR) + pp_exclamation (ppi); + pp_c_cast_expression (ppi, TREE_OPERAND (e, 0)); + break; + + case SIZEOF_EXPR: + case ALIGNOF_EXPR: + pp_c_identifier (ppi, code == SIZEOF_EXPR ? "sizeof" : "__alignof__"); + pp_c_whitespace (ppi); + if (TYPE_P (TREE_OPERAND (e, 0))) + { + pp_c_left_paren (ppi); + pp_type_id (ppi, TREE_OPERAND (e, 0)); + pp_c_right_paren (ppi); + } + else + pp_c_unary_expression (ppi, TREE_OPERAND (e, 0)); + break; + + case REALPART_EXPR: + case IMAGPART_EXPR: + pp_c_identifier (ppi, code == REALPART_EXPR ? "__real__" : "__imag__"); + pp_c_whitespace (ppi); + pp_unary_expression (ppi, TREE_OPERAND (e, 0)); + break; + + default: + pp_postfix_expression (ppi, e); + break; + } + } + + void + pp_c_cast_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == CONVERT_EXPR || TREE_CODE (e) == FLOAT_EXPR) + { + pp_c_left_paren (ppi); + pp_type_id (ppi, TREE_TYPE (e)); + pp_c_right_paren (ppi); + pp_c_cast_expression (ppi, TREE_OPERAND (e, 0)); + } + else + pp_unary_expression (ppi, e); + } + + static void + pp_c_multiplicative_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + enum tree_code code = TREE_CODE (e); + switch (code) + { + case MULT_EXPR: + case TRUNC_DIV_EXPR: + case TRUNC_MOD_EXPR: + pp_c_multiplicative_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_whitespace (ppi); + if (code == MULT_EXPR) + pp_star (ppi); + else if (code == TRUNC_DIV_EXPR) + pp_slash (ppi); + else + pp_modulo (ppi); + pp_c_whitespace (ppi); + pp_c_cast_expression (ppi, TREE_OPERAND (e, 1)); + break; + + default: + pp_c_cast_expression (ppi, e); + break; + } + } + + static inline void + pp_c_additive_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + enum tree_code code = TREE_CODE (e); + switch (code) + { + case PLUS_EXPR: + case MINUS_EXPR: + pp_c_additive_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_whitespace (ppi); + if (code == PLUS_EXPR) + pp_plus (ppi); + else + pp_minus (ppi); + pp_c_whitespace (ppi); + pp_multiplicative_expression (ppi, TREE_OPERAND (e, 1)); + break; + + default: + pp_multiplicative_expression (ppi, e); + break; + } + } + + static inline void + pp_c_shift_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + enum tree_code code = TREE_CODE (e); + switch (code) + { + case LSHIFT_EXPR: + case RSHIFT_EXPR: + pp_c_shift_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_whitespace (ppi); + pp_identifier (ppi, code == LSHIFT_EXPR ? "<<" : ">>"); + pp_c_whitespace (ppi); + pp_c_additive_expression (ppi, TREE_OPERAND (e, 1)); + break; + + default: + pp_c_additive_expression (ppi, e); + } + } + + static void + pp_c_relational_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + enum tree_code code = TREE_CODE (e); + switch (code) + { + case LT_EXPR: + case GT_EXPR: + case LE_EXPR: + case GE_EXPR: + pp_c_relational_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_whitespace (ppi); + if (code == LT_EXPR) + pp_less (ppi); + else if (code == GT_EXPR) + pp_greater (ppi); + else if (code == LE_EXPR) + pp_identifier (ppi, "<="); + else if (code == GE_EXPR) + pp_identifier (ppi, ">="); + pp_c_whitespace (ppi); + pp_c_shift_expression (ppi, TREE_OPERAND (e, 1)); + break; + + default: + pp_c_shift_expression (ppi, e); + break; + } + } + + static inline void + pp_c_equality_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + enum tree_code code = TREE_CODE (e); + switch (code) + { + case EQ_EXPR: + case NE_EXPR: + pp_c_equality_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_identifier (ppi, code == EQ_EXPR ? "==" : "!="); + pp_c_whitespace (ppi); + pp_c_relational_expression (ppi, TREE_OPERAND (e, 1)); + break; + + default: + pp_c_relational_expression (ppi, e); + break; + } + } + + static inline void + pp_c_and_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == BIT_AND_EXPR) + { + pp_c_and_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_ampersand (ppi); + pp_c_whitespace (ppi); + pp_c_equality_expression (ppi, TREE_OPERAND (e, 1)); + } + else + pp_c_equality_expression (ppi, e); + } + + static inline void + pp_c_exclusive_or_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == BIT_XOR_EXPR) + { + pp_c_exclusive_or_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_carret (ppi); + pp_c_whitespace (ppi); + pp_c_and_expression (ppi, TREE_OPERAND (e, 1)); + } + else + pp_c_and_expression (ppi, e); + } + + static inline void + pp_c_inclusive_or_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == BIT_IOR_EXPR) + { + pp_c_exclusive_or_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_bar (ppi); + pp_c_whitespace (ppi); + pp_c_exclusive_or_expression (ppi, TREE_OPERAND (e, 1)); + } + else + pp_c_exclusive_or_expression (ppi, e); + } + + static inline void + pp_c_logical_and_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == TRUTH_ANDIF_EXPR) + { + pp_c_logical_and_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_identifier (ppi, "&&"); + pp_c_whitespace (ppi); + pp_c_inclusive_or_expression (ppi, TREE_OPERAND (e, 1)); + } + else + pp_c_inclusive_or_expression (ppi, e); + } + + void + pp_c_logical_or_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == TRUTH_ORIF_EXPR) + { + pp_c_logical_or_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_identifier (ppi, "||"); + pp_c_whitespace (ppi); + pp_c_logical_and_expression (ppi, TREE_OPERAND (e, 1)); + } + else + pp_c_logical_and_expression (ppi, e); + } + + static void + pp_c_conditional_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == COND_EXPR) + { + pp_c_logical_or_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_question (ppi); + pp_c_whitespace (ppi); + pp_c_expression (ppi, TREE_OPERAND (e, 1)); + pp_c_maybe_whitespace (ppi); + pp_colon (ppi); + pp_c_whitespace (ppi); + pp_c_conditional_expression (ppi, TREE_OPERAND (e, 2)); + } + else + pp_c_logical_or_expression (ppi, e); + } + + + /* Pretty-print a C assignment-expression. */ + static void + pp_c_assignment_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + if (TREE_CODE (e) == MODIFY_EXPR || TREE_CODE (e) == INIT_EXPR) + { + pp_c_unary_expression (ppi, TREE_OPERAND (e, 0)); + pp_c_maybe_whitespace (ppi); + pp_equal (ppi); + pp_whitespace (ppi); + pp_c_assignment_expression (ppi, TREE_OPERAND (e, 1)); + } + else + pp_c_conditional_expression (ppi, e); + } + + /* Pretty-print an expression. */ + void + pp_c_expression (ppi, e) + c_pretty_printer ppi; + tree e; + { + switch (TREE_CODE (e)) + { + case INTEGER_CST: + pp_c_integer_literal (ppi, e); + break; + + case REAL_CST: + pp_c_real_literal (ppi, e); + break; + + case STRING_CST: + pp_c_string_literal (ppi, e); + break; + + case FUNCTION_DECL: + case VAR_DECL: + case CONST_DECL: + case PARM_DECL: + case RESULT_DECL: + case FIELD_DECL: + case LABEL_DECL: + case ERROR_MARK: + case TARGET_EXPR: + case STMT_EXPR: + pp_c_primary_expression (ppi, e); + break; + + case POSTINCREMENT_EXPR: + case POSTDECREMENT_EXPR: + case ARROW_EXPR: + case ARRAY_REF: + case CALL_EXPR: + case COMPONENT_REF: + case COMPLEX_CST: + case VECTOR_CST: + case ABS_EXPR: + case FFS_EXPR: + case CONSTRUCTOR: + case COMPOUND_LITERAL_EXPR: + case COMPLEX_EXPR: + case VA_ARG_EXPR: + pp_c_postfix_expression (ppi, e); + break; + + case CONJ_EXPR: + case ADDR_EXPR: + case INDIRECT_REF: + case NEGATE_EXPR: + case BIT_NOT_EXPR: + case TRUTH_NOT_EXPR: + case PREINCREMENT_EXPR: + case PREDECREMENT_EXPR: + case SIZEOF_EXPR: + case ALIGNOF_EXPR: + case REALPART_EXPR: + case IMAGPART_EXPR: + pp_c_unary_expression (ppi, e); + break; + + case CONVERT_EXPR: + case FLOAT_EXPR: + pp_c_cast_expression (ppi, e); + break; + + case MULT_EXPR: + case TRUNC_MOD_EXPR: + case TRUNC_DIV_EXPR: + pp_c_multiplicative_expression (ppi, e); + break; + + case LSHIFT_EXPR: + case RSHIFT_EXPR: + pp_c_shift_expression (ppi, e); + break; + + case LT_EXPR: + case GT_EXPR: + case LE_EXPR: + case GE_EXPR: + pp_c_relational_expression (ppi, e); + break; + + case BIT_AND_EXPR: + pp_c_and_expression (ppi, e); + break; + + case BIT_XOR_EXPR: + pp_c_exclusive_or_expression (ppi, e); + break; + + case BIT_IOR_EXPR: + pp_c_inclusive_or_expression (ppi, e); + break; + + case TRUTH_ANDIF_EXPR: + pp_c_logical_and_expression (ppi, e); + break; + + case TRUTH_ORIF_EXPR: + pp_c_logical_or_expression (ppi, e); + break; + + case COND_EXPR: + pp_c_conditional_expression (ppi, e); + break; + + case MODIFY_EXPR: + case INIT_EXPR: + pp_c_assignment_expression (ppi, e); + break; + + case NOP_EXPR: + pp_c_expression (ppi, TREE_OPERAND (e, 0)); + break; + + case COMPOUND_EXPR: + pp_c_left_paren (ppi); + pp_c_expression (ppi, TREE_OPERAND (e, 0)); + pp_separate_with (ppi, ','); + pp_assignment_expression (ppi, TREE_OPERAND (e, 1)); + pp_c_right_paren (ppi); + break; + + + default: + pp_unsupported_tree (ppi, e); + break; + } + } + + + /* Statements. */ + void + pp_c_statement (ppi, stmt) + c_pretty_printer ppi; + tree stmt; + { + const enum tree_code code = TREE_CODE (stmt); + switch (code) + { + case LABEL_STMT: + case CASE_LABEL: + pp_newline (ppi); + if (code == LABEL_STMT) + pp_tree_identifier (ppi, DECL_NAME (LABEL_STMT_LABEL (stmt))); + else if (code == LABEL_STMT) + { + if (CASE_LOW (stmt) == NULL_TREE) + pp_identifier (ppi, "default"); + else + { + pp_c_identifier (ppi, "case"); + pp_c_whitespace (ppi); + pp_conditional_expression (ppi, CASE_LOW (stmt)); + if (CASE_HIGH (stmt)) + { + pp_identifier (ppi, "..."); + pp_conditional_expression (ppi, CASE_HIGH (stmt)); + } + } + } + pp_colon (ppi); + pp_newline_and_indent (ppi, 3); + break; + + case COMPOUND_STMT: + pp_left_brace (ppi); + pp_newline_and_indent (ppi, 3); + for (stmt = COMPOUND_BODY (stmt); stmt; stmt = TREE_CHAIN (stmt)) + pp_c_statement (ppi, stmt); + pp_newline_and_indent (ppi, -3); + pp_right_brace (ppi); + pp_newline (ppi); + break; + + case EXPR_STMT: + case CLEANUP_STMT: + pp_newline (ppi); + pp_c_expression (ppi, code == EXPR_STMT + ? EXPR_STMT_EXPR (stmt) + : CLEANUP_EXPR (stmt)); + pp_semicolon (ppi); + pp_newline (ppi); + break; + + case IF_STMT: + pp_c_identifier (ppi, "if"); + pp_whitespace (ppi); + pp_c_left_paren (ppi); + pp_c_expression (ppi, IF_COND (stmt)); + pp_right_paren (ppi); + pp_newline_and_indent (ppi, 3); + pp_statement (ppi, THEN_CLAUSE (stmt)); + pp_newline_and_indent (ppi, -3); + if (ELSE_CLAUSE (stmt)) + { + tree else_clause = ELSE_CLAUSE (stmt); + pp_c_identifier (ppi, "else"); + if (TREE_CODE (else_clause) == IF_STMT) + pp_c_whitespace (ppi); + else + pp_newline_and_indent (ppi, 3); + pp_statement (ppi, else_clause); + if (TREE_CODE (else_clause) != IF_STMT) + pp_newline_and_indent (ppi, -3); + } + break; + + case SWITCH_STMT: + pp_newline (ppi); + pp_c_identifier (ppi, "switch"); + pp_whitespace (ppi); + pp_c_left_paren (ppi); + pp_c_expression (ppi, SWITCH_COND (stmt)); + pp_right_paren (ppi); + pp_newline_and_indent (ppi, 3); + pp_statement (ppi, SWITCH_BODY (stmt)); + pp_newline_and_indent (ppi, -3); + break; + + case WHILE_STMT: + pp_c_identifier (ppi, "while"); + pp_whitespace (ppi); + pp_c_left_paren (ppi); + pp_c_expression (ppi, WHILE_COND (stmt)); + pp_right_paren (ppi); + pp_newline_and_indent (ppi, 3); + pp_statement (ppi, WHILE_BODY (stmt)); + pp_newline_and_indent (ppi, -3); + break; + + case DO_STMT: + pp_c_identifier (ppi, "do"); + pp_newline_and_indent (ppi, 3); + pp_statement (ppi, DO_BODY (stmt)); + pp_newline_and_indent (ppi, -3); + pp_c_identifier (ppi, "while"); + pp_whitespace (ppi); + pp_c_left_paren (ppi); + pp_c_expression (ppi, DO_COND (stmt)); + pp_c_right_paren (ppi); + pp_semicolon (ppi); + pp_newline (ppi); + break; + + case FOR_STMT: + pp_c_identifier (ppi, "for"); + pp_whitespace (ppi); + pp_c_left_paren (ppi); + pp_statement (ppi, FOR_INIT_STMT (stmt)); + pp_c_whitespace (ppi); + if (FOR_COND (stmt)) + pp_c_expression (ppi, FOR_COND (stmt)); + pp_semicolon (ppi); + pp_c_whitespace (ppi); + if (FOR_EXPR (stmt)) + pp_c_expression (ppi, FOR_EXPR (stmt)); + pp_right_paren (ppi); + pp_newline_and_indent (ppi, 3); + pp_statement (ppi, FOR_BODY (stmt)); + pp_newline_and_indent (ppi, -3); + break; + + case BREAK_STMT: + case CONTINUE_STMT: + pp_newline (ppi); + pp_identifier (ppi, code == BREAK_STMT ? "break" : "continue"); + pp_semicolon (ppi); + pp_newline (ppi); + break; + + case RETURN_STMT: + case GOTO_STMT: + { + tree e = code == RETURN_STMT + ? RETURN_STMT_EXPR (stmt) + : GOTO_DESTINATION (stmt); + + pp_newline (ppi); + pp_c_identifier (ppi, code == RETURN_STMT ? "return" : "goto"); + if (e) + pp_c_expression (ppi, e); + pp_semicolon (ppi); + pp_newline (ppi); + } + break; + + case SCOPE_STMT: + if (!SCOPE_NULLIFIED_P (stmt) && SCOPE_NO_CLEANUPS_P (stmt)) + { + if (SCOPE_BEGIN_P (stmt)) + { + pp_left_brace (ppi); + pp_newline_and_indent (ppi, 3); + } + else if (SCOPE_END_P (stmt)) + { + pp_right_brace (ppi); + pp_newline_and_indent (ppi, -3); + } + } + break; + + case DECL_STMT: + pp_declaration (ppi, DECL_STMT_DECL (stmt)); + pp_semicolon (ppi); + pp_newline (ppi); + break; + + case ASM_STMT: + { + bool has_volatile_p = ASM_VOLATILE_P (stmt); + bool is_extended = has_volatile_p || ASM_INPUTS (stmt) + || ASM_OUTPUTS (stmt) || ASM_CLOBBERS (stmt); + pp_c_identifier (ppi, is_extended ? "__asm__" : "asm"); + if (has_volatile_p) + pp_c_identifier (ppi, "__volatile__"); + pp_whitespace (ppi); + pp_c_left_paren (ppi); + pp_c_string_literal (ppi, ASM_STRING (stmt)); + if (is_extended) + { + pp_whitespace (ppi); + pp_separate_with (ppi, ':'); + if (ASM_OUTPUTS (stmt)) + pp_c_expression (ppi, ASM_OUTPUTS (stmt)); + pp_whitespace (ppi); + pp_separate_with (ppi, ':'); + if (ASM_INPUTS (stmt)) + pp_c_expression (ppi, ASM_INPUTS (stmt)); + pp_whitespace (ppi); + pp_separate_with (ppi, ':'); + if (ASM_CLOBBERS (stmt)) + pp_c_expression (ppi, ASM_CLOBBERS (stmt)); + } + pp_right_paren (ppi); + pp_newline (ppi); + } + break; + + case FILE_STMT: + pp_c_identifier (ppi, "__FILE__"); + pp_whitespace (ppi); + pp_equal (ppi); + pp_c_whitespace (ppi); + pp_c_identifier (ppi, FILE_STMT_FILENAME (stmt)); + pp_semicolon (ppi); + pp_newline (ppi); + break; + + default: + pp_unsupported_tree (ppi, stmt); + } + + } + + + /* Initialize the PRETTY-PRINTER for handling C codes. */ + void + pp_c_pretty_printer_init (pp) + c_pretty_printer pp; + { + pp->offset_list = 0; + + pp->declaration = pp_c_declaration; + pp->declaration_specifiers = pp_c_declaration_specifiers; + pp->type_specifier = pp_c_simple_type_specifier; + pp->declarator = pp_c_declarator; + pp->direct_declarator = pp_c_direct_declarator; + pp->parameter_declaration = pp_c_parameter_declaration; + pp->type_id = pp_c_type_id; + + pp->statement = pp_c_statement; + + pp->primary_expression = pp_c_primary_expression; + pp->postfix_expression = pp_c_postfix_expression; + pp->unary_expression = pp_c_unary_expression; + pp->initializer = pp_c_initializer; + pp->multiplicative_expression = pp_c_multiplicative_expression; + pp->conditional_expression = pp_c_conditional_expression; + pp->assignment_expression = pp_c_assignment_expression; + } diff -Nrc3pad gcc-3.2.3/gcc/c-pretty-print.h gcc-3.3/gcc/c-pretty-print.h *** gcc-3.2.3/gcc/c-pretty-print.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/c-pretty-print.h 2002-08-14 03:22:18.000000000 +0000 *************** *** 0 **** --- 1,165 ---- + /* Various declarations for the C and C++ pretty-printers. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Gabriel Dos Reis + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + #ifndef GCC_C_PRETTY_PRINTER + #define GCC_C_PRETTY_PRINTER + + #include "tree.h" + #include "c-common.h" + #include "pretty-print.h" + + + /* The data type used to bundle information necessary for pretty-printing + a C or C++ entity. */ + typedef struct c_pretty_print_info *c_pretty_printer; + + /* The type of a C pretty-printer 'member' function. */ + typedef void (*c_pretty_print_fn) PARAMS ((c_pretty_printer, tree)); + + struct c_pretty_print_info + { + struct pretty_print_info base; + /* Points to the first element of an array of offset-list. + Not used yet. */ + int *offset_list; + + /* These must be overriden by each of the C and C++ front-end to + reflect their understanding of syntatic productions when they differ. */ + c_pretty_print_fn declaration; + c_pretty_print_fn declaration_specifiers; + c_pretty_print_fn type_specifier; + c_pretty_print_fn declarator; + c_pretty_print_fn direct_declarator; + c_pretty_print_fn parameter_declaration; + c_pretty_print_fn type_id; + + c_pretty_print_fn statement; + + c_pretty_print_fn primary_expression; + c_pretty_print_fn postfix_expression; + c_pretty_print_fn unary_expression; + c_pretty_print_fn initializer; + c_pretty_print_fn multiplicative_expression; + c_pretty_print_fn conditional_expression; + c_pretty_print_fn assignment_expression; + }; + + #define pp_c_left_paren(PPI) \ + do { \ + pp_left_paren (PPI); \ + pp_c_base (PPI)->base.padding = pp_none; \ + } while (0) + #define pp_c_right_paren(PPI) \ + do { \ + pp_right_paren (PPI); \ + pp_c_base (PPI)->base.padding = pp_none; \ + } while (0) + #define pp_c_left_bracket(PPI) \ + do { \ + pp_left_bracket (PPI); \ + pp_c_base (PPI)->base.padding = pp_none; \ + } while (0) + #define pp_c_right_bracket(PPI) \ + do { \ + pp_right_bracket (PPI); \ + pp_c_base (PPI)->base.padding = pp_none; \ + } while (0) + #define pp_c_whitespace(PPI) \ + do { \ + pp_whitespace (PPI); \ + pp_c_base (PPI)->base.padding = pp_none; \ + } while (0) + #define pp_c_maybe_whitespace(PPI) \ + do { \ + if (pp_c_base (PPI)->base.padding != pp_none) \ + pp_c_whitespace (PPI); \ + } while (0) + #define pp_c_identifier(PPI, ID) \ + do { \ + pp_c_maybe_whitespace (PPI); \ + pp_identifier (PPI, ID); \ + pp_c_base (PPI)->base.padding = pp_before; \ + } while (0) + + #define pp_c_tree_identifier(PPI, ID) \ + pp_c_identifier (PPI, IDENTIFIER_POINTER (ID)) + + /* Returns the 'output_buffer *' associated with a PRETTY-PRINTER, the latter + being something digestible by pp_c_base. */ + #define pp_buffer(PPI) pp_c_base (PPI)->base.buffer + + #define pp_declaration(PPI, T) \ + (*pp_c_base (PPI)->declaration) (pp_c_base (PPI), T) + #define pp_declaration_specifiers(PPI, D) \ + (*pp_c_base (PPI)->declaration_specifiers) (pp_c_base (PPI), D) + #define pp_type_specifier(PPI, D) \ + (*pp_c_base (PPI)->type_specifier) (pp_c_base (PPI), D) + #define pp_declarator(PPI, D) \ + (*pp_c_base (PPI)->declarator) (pp_c_base (PPI), D) + #define pp_direct_declarator(PPI, D) \ + (*pp_c_base (PPI)->direct_declarator) (pp_c_base (PPI), D) + #define pp_parameter_declaration(PPI, T) \ + (*pp_c_base (PPI)->parameter_declaration) (pp_c_base (PPI), T) + #define pp_type_id(PPI, D) \ + (*pp_c_base (PPI)->type_id) (pp_c_base (PPI), D) + + #define pp_statement(PPI, S) \ + (*pp_c_base (PPI)->statement) (pp_c_base (PPI), S) + + #define pp_primary_expression(PPI, E) \ + (*pp_c_base (PPI)->primary_expression) (pp_c_base (PPI), E) + #define pp_postfix_expression(PPI, E) \ + (*pp_c_base (PPI)->postfix_expression) (pp_c_base (PPI), E) + #define pp_unary_expression(PPI, E) \ + (*pp_c_base (PPI)->unary_expression) (pp_c_base (PPI), E) + #define pp_initializer(PPI, E) \ + (*pp_c_base (PPI)->initializer) (pp_c_base (PPI), E) + #define pp_multiplicative_expression(PPI, E) \ + (*pp_c_base (PPI)->multiplicative_expression) (pp_c_base (PPI), E) + #define pp_conditional_expression(PPI, E) \ + (*pp_c_base (PPI)->conditional_expression) (pp_c_base (PPI), E) + #define pp_assignment_expression(PPI, E) \ + (*pp_c_base (PPI)->assignment_expression) (pp_c_base (PPI), E) + + + /* Returns the c_pretty_printer base object of PRETTY-PRINTER. This + macro must be overriden by any subclass of c_pretty_print_info. */ + #define pp_c_base(PP) (PP) + + extern void pp_c_pretty_printer_init PARAMS ((c_pretty_printer)); + + /* Declarations. */ + void pp_c_attributes PARAMS ((c_pretty_printer, tree)); + void pp_c_cv_qualifier PARAMS ((c_pretty_printer, int)); + void pp_c_parameter_declaration_clause PARAMS ((c_pretty_printer, tree)); + void pp_c_declaration PARAMS ((c_pretty_printer, tree)); + /* Statements. */ + void pp_c_statement PARAMS ((c_pretty_printer, tree)); + /* Expressions. */ + void pp_c_expression PARAMS ((c_pretty_printer, tree)); + void pp_c_logical_or_expression PARAMS ((c_pretty_printer, tree)); + void pp_c_expression_list PARAMS ((c_pretty_printer, tree)); + void pp_c_cast_expression PARAMS ((c_pretty_printer, tree)); + void pp_c_postfix_expression PARAMS ((c_pretty_printer, tree)); + void pp_c_initializer PARAMS ((c_pretty_printer, tree)); + void pp_c_literal PARAMS ((c_pretty_printer, tree)); + + #endif /* GCC_C_PRETTY_PRINTER */ diff -Nrc3pad gcc-3.2.3/gcc/crtstuff.c gcc-3.3/gcc/crtstuff.c *** gcc-3.2.3/gcc/crtstuff.c 2002-02-05 10:31:01.000000000 +0000 --- gcc-3.3/gcc/crtstuff.c 2002-11-26 12:34:23.000000000 +0000 *************** call_ ## FUNC (void) \ *** 90,95 **** --- 90,100 ---- #if defined(EH_FRAME_SECTION_NAME) && !defined(USE_PT_GNU_EH_FRAME) # define USE_EH_FRAME_REGISTRY #endif + #if defined(EH_FRAME_SECTION_NAME) && defined(HAVE_LD_RO_RW_SECTION_MIXING) + # define EH_FRAME_SECTION_CONST const + #else + # define EH_FRAME_SECTION_CONST + #endif /* We do not want to add the weak attribute to the declarations of these routines in unwind-dw2-fde.h because that will cause the definition of *************** extern void *__deregister_frame_info_bas *** 126,133 **** /* Likewise for _Jv_RegisterClasses. */ extern void _Jv_RegisterClasses (void *) TARGET_ATTRIBUTE_WEAK; - #ifndef OBJECT_FORMAT_MACHO - #ifdef OBJECT_FORMAT_ELF /* Declare a pointer to void function type. */ --- 131,136 ---- *************** STATIC func_ptr __DTOR_LIST__[1] *** 187,199 **** = { (func_ptr) (-1) }; #endif /* __DTOR_LIST__ alternatives */ ! #ifdef EH_FRAME_SECTION_NAME /* Stick a label at the beginning of the frame unwind info so we can register and deregister it with the exception handling library code. */ ! STATIC char __EH_FRAME_BEGIN__[] __attribute__((section(EH_FRAME_SECTION_NAME), aligned(4))) = { }; ! #endif /* EH_FRAME_SECTION_NAME */ #ifdef JCR_SECTION_NAME /* Stick a label at the beginning of the java class registration info --- 190,202 ---- = { (func_ptr) (-1) }; #endif /* __DTOR_LIST__ alternatives */ ! #ifdef USE_EH_FRAME_REGISTRY /* Stick a label at the beginning of the frame unwind info so we can register and deregister it with the exception handling library code. */ ! STATIC EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[] __attribute__((section(EH_FRAME_SECTION_NAME), aligned(4))) = { }; ! #endif /* USE_EH_FRAME_REGISTRY */ #ifdef JCR_SECTION_NAME /* Stick a label at the beginning of the java class registration info *************** STATIC void *__JCR_LIST__[] *** 213,225 **** in one DSO or the main program is not used in another object. The dynamic linker takes care of this. */ - /* XXX Ideally the following should be implemented using - __attribute__ ((__visibility__ ("hidden"))) - but the __attribute__ support is not yet there. */ #ifdef HAVE_GAS_HIDDEN ! asm (".hidden\t__dso_handle"); #endif - #ifdef CRTSTUFFS_O void *__dso_handle = &__dso_handle; #else --- 216,224 ---- in one DSO or the main program is not used in another object. The dynamic linker takes care of this. */ #ifdef HAVE_GAS_HIDDEN ! extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); #endif #ifdef CRTSTUFFS_O void *__dso_handle = &__dso_handle; #else *************** STATIC func_ptr __DTOR_END__[1] *** 459,465 **** #ifdef EH_FRAME_SECTION_NAME /* Terminate the frame unwind info section with a 4byte 0 as a sentinel; this would be the 'length' field in a real FDE. */ ! STATIC int __FRAME_END__[] __attribute__ ((unused, mode(SI), section(EH_FRAME_SECTION_NAME), aligned(4))) = { 0 }; --- 458,464 ---- #ifdef EH_FRAME_SECTION_NAME /* Terminate the frame unwind info section with a 4byte 0 as a sentinel; this would be the 'length' field in a real FDE. */ ! STATIC EH_FRAME_SECTION_CONST int __FRAME_END__[] __attribute__ ((unused, mode(SI), section(EH_FRAME_SECTION_NAME), aligned(4))) = { 0 }; *************** __do_global_ctors (void) *** 546,612 **** #else /* ! CRT_BEGIN && ! CRT_END */ #error "One of CRT_BEGIN or CRT_END must be defined." #endif - - #else /* OBJECT_FORMAT_MACHO */ - - /* For Mach-O format executables, we assume that the system's runtime is - smart enough to handle constructors and destructors, but doesn't have - an init section (if it can't even handle constructors/destructors - you should be using INVOKE__main, not crtstuff). All we need to do - is install/deinstall the frame information for exceptions. We do this - by putting a constructor in crtbegin.o and a destructor in crtend.o. - - crtend.o also puts in the terminating zero in the frame information - segment. */ - - /* The crtstuff for other object formats use the symbol __EH_FRAME_BEGIN__ - to figure out the start of the exception frame, but here we use - getsectbynamefromheader to find this value. Either method would work, - but this method avoids creating any global symbols, which seems - cleaner. */ - - #include - extern const struct section * - getsectbynamefromheader (const struct mach_header *, - const char *, const char *); - - #ifdef CRT_BEGIN - - static void __reg_frame_ctor (void) __attribute__ ((constructor)); - - static void - __reg_frame_ctor (void) - { - static struct object object; - const struct section *eh_frame; - - eh_frame = getsectbynamefromheader (&_mh_execute_header, - "__TEXT", "__eh_frame"); - __register_frame_info ((void *) eh_frame->addr, &object); - } - - #elif defined(CRT_END) - - static void __dereg_frame_dtor (void) __attribute__ ((destructor)); - - static void - __dereg_frame_dtor (void) - { - const struct section *eh_frame; - - eh_frame = getsectbynamefromheader (&_mh_execute_header, - "__TEXT", "__eh_frame"); - __deregister_frame_info ((void *) eh_frame->addr); - } - - /* Terminate the frame section with a final zero. */ - STATIC int __FRAME_END__[] - __attribute__ ((unused, mode(SI), section(EH_FRAME_SECTION_NAME), - aligned(4))) - = { 0 }; - - #else /* ! CRT_BEGIN && ! CRT_END */ - #error "One of CRT_BEGIN or CRT_END must be defined." - #endif - - #endif /* OBJECT_FORMAT_MACHO */ --- 545,547 ---- diff -Nrc3pad gcc-3.2.3/gcc/cse.c gcc-3.3/gcc/cse.c *** gcc-3.2.3/gcc/cse.c 2002-06-10 22:12:04.000000000 +0000 --- gcc-3.3/gcc/cse.c 2003-04-29 19:16:40.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 37,42 **** --- 37,43 ---- #include "toplev.h" #include "output.h" #include "ggc.h" + #include "timevar.h" /* The basic idea of common subexpression elimination is to go through the code, keeping a record of expressions that would *************** struct cse_reg_info *** 315,320 **** --- 316,325 ---- reg_tick value, such expressions existing in the hash table are invalid. */ int reg_in_table; + + /* The SUBREG that was set when REG_TICK was last incremented. Set + to -1 if the last store was to the whole register, not a subreg. */ + unsigned int subreg_ticked; }; /* A free list of cse_reg_info entries. */ *************** struct table_elt *** 513,518 **** --- 518,528 ---- #define REG_IN_TABLE(N) ((GET_CSE_REG_INFO (N))->reg_in_table) + /* Get the SUBREG set at the last increment to REG_TICK (-1 if not a + SUBREG). */ + + #define SUBREG_TICKED(N) ((GET_CSE_REG_INFO (N))->subreg_ticked) + /* Get the quantity number for REG. */ #define REG_QTY(N) ((GET_CSE_REG_INFO (N))->reg_qty) *************** static int check_dependence PARAMS ((rtx *** 690,696 **** static void flush_hash_table PARAMS ((void)); static bool insn_live_p PARAMS ((rtx, int *)); static bool set_live_p PARAMS ((rtx, rtx, int *)); ! static bool dead_libcall_p PARAMS ((rtx)); /* Dump the expressions in the equivalence class indicated by CLASSP. This function is used only for debugging. */ --- 700,706 ---- static void flush_hash_table PARAMS ((void)); static bool insn_live_p PARAMS ((rtx, int *)); static bool set_live_p PARAMS ((rtx, rtx, int *)); ! static bool dead_libcall_p PARAMS ((rtx, int *)); /* Dump the expressions in the equivalence class indicated by CLASSP. This function is used only for debugging. */ *************** approx_reg_cost_1 (xp, data) *** 719,728 **** void *data; { rtx x = *xp; ! regset set = (regset) data; if (x && GET_CODE (x) == REG) ! SET_REGNO_REG_SET (set, REGNO (x)); return 0; } --- 729,753 ---- void *data; { rtx x = *xp; ! int *cost_p = data; if (x && GET_CODE (x) == REG) ! { ! unsigned int regno = REGNO (x); ! ! if (! CHEAP_REGNO (regno)) ! { ! if (regno < FIRST_PSEUDO_REGISTER) ! { ! if (SMALL_REGISTER_CLASSES) ! return 1; ! *cost_p += 2; ! } ! else ! *cost_p += 1; ! } ! } ! return 0; } *************** static int *** 735,762 **** approx_reg_cost (x) rtx x; { - regset_head set; - int i; int cost = 0; - int hardregs = 0; ! INIT_REG_SET (&set); ! for_each_rtx (&x, approx_reg_cost_1, (void *)&set); ! ! EXECUTE_IF_SET_IN_REG_SET ! (&set, 0, i, ! { ! if (! CHEAP_REGNO (i)) ! { ! if (i < FIRST_PSEUDO_REGISTER) ! hardregs++; ! ! cost += i < FIRST_PSEUDO_REGISTER ? 2 : 1; ! } ! }); ! CLEAR_REG_SET (&set); ! return hardregs && SMALL_REGISTER_CLASSES ? MAX_COST : cost; } /* Return a negative value if an rtx A, whose costs are given by COST_A --- 760,771 ---- approx_reg_cost (x) rtx x; { int cost = 0; ! if (for_each_rtx (&x, approx_reg_cost_1, (void *) &cost)) ! return MAX_COST; ! return cost; } /* Return a negative value if an rtx A, whose costs are given by COST_A *************** static int *** 767,773 **** preferrable (cost_a, regcost_a, cost_b, regcost_b) int cost_a, regcost_a, cost_b, regcost_b; { ! /* First, get rid of a cases involving expressions that are entirely unwanted. */ if (cost_a != cost_b) { --- 776,782 ---- preferrable (cost_a, regcost_a, cost_b, regcost_b) int cost_a, regcost_a, cost_b, regcost_b; { ! /* First, get rid of cases involving expressions that are entirely unwanted. */ if (cost_a != cost_b) { *************** rtx_cost (x, outer_code) *** 841,853 **** switch (code) { case MULT: ! /* Count multiplication by 2**n as a shift, ! because if we are considering it, we would output it as a shift. */ ! if (GET_CODE (XEXP (x, 1)) == CONST_INT ! && exact_log2 (INTVAL (XEXP (x, 1))) >= 0) ! total = 2; ! else ! total = COSTS_N_INSNS (5); break; case DIV: case UDIV: --- 850,856 ---- switch (code) { case MULT: ! total = COSTS_N_INSNS (5); break; case DIV: case UDIV: *************** get_cse_reg_info (regno) *** 963,968 **** --- 966,972 ---- /* Initialize it. */ p->reg_tick = 1; p->reg_in_table = -1; + p->subreg_ticked = -1; p->reg_qty = regno; p->regno = regno; p->next = cse_reg_info_used_list; *************** mention_regs (x) *** 1197,1202 **** --- 1201,1207 ---- remove_invalid_refs (i); REG_IN_TABLE (i) = REG_TICK (i); + SUBREG_TICKED (i) = -1; } return 0; *************** mention_regs (x) *** 1212,1228 **** if (REG_IN_TABLE (i) >= 0 && REG_IN_TABLE (i) != REG_TICK (i)) { ! /* If reg_tick has been incremented more than once since ! reg_in_table was last set, that means that the entire ! register has been set before, so discard anything memorized ! for the entire register, including all SUBREG expressions. */ ! if (REG_IN_TABLE (i) != REG_TICK (i) - 1) remove_invalid_refs (i); else remove_invalid_subreg_refs (i, SUBREG_BYTE (x), GET_MODE (x)); } REG_IN_TABLE (i) = REG_TICK (i); return 0; } --- 1217,1236 ---- if (REG_IN_TABLE (i) >= 0 && REG_IN_TABLE (i) != REG_TICK (i)) { ! /* If REG_IN_TABLE (i) differs from REG_TICK (i) by one, and ! the last store to this register really stored into this ! subreg, then remove the memory of this subreg. ! Otherwise, remove any memory of the entire register and ! all its subregs from the table. */ ! if (REG_TICK (i) - REG_IN_TABLE (i) > 1 ! || SUBREG_TICKED (i) != REGNO (SUBREG_REG (x))) remove_invalid_refs (i); else remove_invalid_subreg_refs (i, SUBREG_BYTE (x), GET_MODE (x)); } REG_IN_TABLE (i) = REG_TICK (i); + SUBREG_TICKED (i) = REGNO (SUBREG_REG (x)); return 0; } *************** insert (x, classp, hash, mode) *** 1600,1607 **** elt->is_const = (CONSTANT_P (x) /* GNU C++ takes advantage of this for `this' (and other const values). */ ! || (RTX_UNCHANGING_P (x) ! && GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER) || FIXED_BASE_PLUS_P (x)); --- 1608,1615 ---- elt->is_const = (CONSTANT_P (x) /* GNU C++ takes advantage of this for `this' (and other const values). */ ! || (GET_CODE (x) == REG ! && RTX_UNCHANGING_P (x) && REGNO (x) >= FIRST_PSEUDO_REGISTER) || FIXED_BASE_PLUS_P (x)); *************** invalidate (x, full_mode) *** 1867,1872 **** --- 1875,1881 ---- delete_reg_equiv (regno); REG_TICK (regno)++; + SUBREG_TICKED (regno) = -1; if (regno >= FIRST_PSEUDO_REGISTER) { *************** invalidate (x, full_mode) *** 1894,1899 **** --- 1903,1909 ---- CLEAR_HARD_REG_BIT (hard_regs_in_table, rn); delete_reg_equiv (rn); REG_TICK (rn)++; + SUBREG_TICKED (rn) = -1; } if (in_table) *************** remove_invalid_refs (regno) *** 1989,1995 **** { next = p->next_same_hash; if (GET_CODE (p->exp) != REG ! && refers_to_regno_p (regno, regno + 1, p->exp, (rtx*) 0)) remove_from_table (p, i); } } --- 1999,2005 ---- { next = p->next_same_hash; if (GET_CODE (p->exp) != REG ! && refers_to_regno_p (regno, regno + 1, p->exp, (rtx *) 0)) remove_from_table (p, i); } } *************** remove_invalid_subreg_refs (regno, offse *** 2019,2025 **** || (((SUBREG_BYTE (exp) + (GET_MODE_SIZE (GET_MODE (exp)) - 1)) >= offset) && SUBREG_BYTE (exp) <= end)) ! && refers_to_regno_p (regno, regno + 1, p->exp, (rtx*) 0)) remove_from_table (p, i); } } --- 2029,2035 ---- || (((SUBREG_BYTE (exp) + (GET_MODE_SIZE (GET_MODE (exp)) - 1)) >= offset) && SUBREG_BYTE (exp) <= end)) ! && refers_to_regno_p (regno, regno + 1, p->exp, (rtx *) 0)) remove_from_table (p, i); } } *************** invalidate_for_call () *** 2099,2105 **** { delete_reg_equiv (regno); if (REG_TICK (regno) >= 0) ! REG_TICK (regno)++; in_table |= (TEST_HARD_REG_BIT (hard_regs_in_table, regno) != 0); } --- 2109,2118 ---- { delete_reg_equiv (regno); if (REG_TICK (regno) >= 0) ! { ! REG_TICK (regno)++; ! SUBREG_TICKED (regno) = -1; ! } in_table |= (TEST_HARD_REG_BIT (hard_regs_in_table, regno) != 0); } *************** canon_hash_string (ps) *** 2211,2218 **** const char *ps; { unsigned hash = 0; ! const unsigned char *p = (const unsigned char *)ps; ! if (p) while (*p) hash += *p++; --- 2224,2231 ---- const char *ps; { unsigned hash = 0; ! const unsigned char *p = (const unsigned char *) ps; ! if (p) while (*p) hash += *p++; *************** canon_hash (x, mode) *** 2264,2270 **** failure to do so leads to failure to simplify 0<100 type of conditionals. ! On all machines, we can't record any global registers. Nor should we record any register that is in a small class, as defined by CLASS_LIKELY_SPILLED_P. */ --- 2277,2283 ---- failure to do so leads to failure to simplify 0<100 type of conditionals. ! On all machines, we can't record any global registers. Nor should we record any register that is in a small class, as defined by CLASS_LIKELY_SPILLED_P. */ *************** canon_hash (x, mode) *** 2326,2336 **** the integers representing the constant. */ hash += (unsigned) code + (unsigned) GET_MODE (x); if (GET_MODE (x) != VOIDmode) ! for (i = 2; i < GET_RTX_LENGTH (CONST_DOUBLE); i++) ! { ! unsigned HOST_WIDE_INT tem = XWINT (x, i); ! hash += tem; ! } else hash += ((unsigned) CONST_DOUBLE_LOW (x) + (unsigned) CONST_DOUBLE_HIGH (x)); --- 2339,2345 ---- the integers representing the constant. */ hash += (unsigned) code + (unsigned) GET_MODE (x); if (GET_MODE (x) != VOIDmode) ! hash += real_hash (CONST_DOUBLE_REAL_VALUE (x)); else hash += ((unsigned) CONST_DOUBLE_LOW (x) + (unsigned) CONST_DOUBLE_HIGH (x)); *************** canon_hash (x, mode) *** 2387,2393 **** if (GET_CODE (XEXP (x, 0)) == MEM && ! MEM_VOLATILE_P (XEXP (x, 0))) { ! hash += (unsigned)USE; x = XEXP (x, 0); if (! RTX_UNCHANGING_P (x) || FIXED_BASE_PLUS_P (XEXP (x, 0))) --- 2396,2402 ---- if (GET_CODE (XEXP (x, 0)) == MEM && ! MEM_VOLATILE_P (XEXP (x, 0))) { ! hash += (unsigned) USE; x = XEXP (x, 0); if (! RTX_UNCHANGING_P (x) || FIXED_BASE_PLUS_P (XEXP (x, 0))) *************** cse_rtx_varies_p (x, from_alias) *** 2778,2786 **** replace each register reference inside it with the "oldest" equivalent register. ! If INSN is non-zero and we are replacing a pseudo with a hard register or vice versa, validate_change is used to ensure that INSN remains valid ! after we make our substitution. The calls are made with IN_GROUP non-zero so apply_change_group must be called upon the outermost return from this function (unless INSN is zero). The result of apply_change_group can generally be discarded since the changes we are making are optional. */ --- 2787,2795 ---- replace each register reference inside it with the "oldest" equivalent register. ! If INSN is nonzero and we are replacing a pseudo with a hard register or vice versa, validate_change is used to ensure that INSN remains valid ! after we make our substitution. The calls are made with IN_GROUP nonzero so apply_change_group must be called upon the outermost return from this function (unless INSN is zero). The result of apply_change_group can generally be discarded since the changes we are making are optional. */ *************** find_comparison_args (code, parg1, parg2 *** 3135,3141 **** while (arg2 == CONST0_RTX (GET_MODE (arg1))) { ! /* Set non-zero when we find something of interest. */ rtx x = 0; int reverse_code = 0; struct table_elt *p = 0; --- 3144,3150 ---- while (arg2 == CONST0_RTX (GET_MODE (arg1))) { ! /* Set nonzero when we find something of interest. */ rtx x = 0; int reverse_code = 0; struct table_elt *p = 0; *************** find_comparison_args (code, parg1, parg2 *** 3153,3165 **** else if (GET_RTX_CLASS (GET_CODE (arg1)) == '<') { if (code == NE || (GET_MODE_CLASS (GET_MODE (arg1)) == MODE_INT && code == LT && STORE_FLAG_VALUE == -1) #ifdef FLOAT_STORE_FLAG_VALUE || (GET_MODE_CLASS (GET_MODE (arg1)) == MODE_FLOAT ! && (REAL_VALUE_NEGATIVE ! (FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1))))) #endif ) x = arg1; --- 3162,3178 ---- else if (GET_RTX_CLASS (GET_CODE (arg1)) == '<') { + #ifdef FLOAT_STORE_FLAG_VALUE + REAL_VALUE_TYPE fsfv; + #endif + if (code == NE || (GET_MODE_CLASS (GET_MODE (arg1)) == MODE_INT && code == LT && STORE_FLAG_VALUE == -1) #ifdef FLOAT_STORE_FLAG_VALUE || (GET_MODE_CLASS (GET_MODE (arg1)) == MODE_FLOAT ! && (fsfv = FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1)), ! REAL_VALUE_NEGATIVE (fsfv))) #endif ) x = arg1; *************** find_comparison_args (code, parg1, parg2 *** 3168,3175 **** && code == GE && STORE_FLAG_VALUE == -1) #ifdef FLOAT_STORE_FLAG_VALUE || (GET_MODE_CLASS (GET_MODE (arg1)) == MODE_FLOAT ! && (REAL_VALUE_NEGATIVE ! (FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1))))) #endif ) x = arg1, reverse_code = 1; --- 3181,3188 ---- && code == GE && STORE_FLAG_VALUE == -1) #ifdef FLOAT_STORE_FLAG_VALUE || (GET_MODE_CLASS (GET_MODE (arg1)) == MODE_FLOAT ! && (fsfv = FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1)), ! REAL_VALUE_NEGATIVE (fsfv))) #endif ) x = arg1, reverse_code = 1; *************** find_comparison_args (code, parg1, parg2 *** 3205,3210 **** --- 3218,3226 ---- for (; p; p = p->next_same_value) { enum machine_mode inner_mode = GET_MODE (p->exp); + #ifdef FLOAT_STORE_FLAG_VALUE + REAL_VALUE_TYPE fsfv; + #endif /* If the entry isn't valid, skip it. */ if (! exp_equiv_p (p->exp, p->exp, 1, 0)) *************** find_comparison_args (code, parg1, parg2 *** 3229,3236 **** #ifdef FLOAT_STORE_FLAG_VALUE || (code == LT && GET_MODE_CLASS (inner_mode) == MODE_FLOAT ! && (REAL_VALUE_NEGATIVE ! (FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1))))) #endif ) && GET_RTX_CLASS (GET_CODE (p->exp)) == '<')) --- 3245,3252 ---- #ifdef FLOAT_STORE_FLAG_VALUE || (code == LT && GET_MODE_CLASS (inner_mode) == MODE_FLOAT ! && (fsfv = FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1)), ! REAL_VALUE_NEGATIVE (fsfv))) #endif ) && GET_RTX_CLASS (GET_CODE (p->exp)) == '<')) *************** find_comparison_args (code, parg1, parg2 *** 3249,3256 **** #ifdef FLOAT_STORE_FLAG_VALUE || (code == GE && GET_MODE_CLASS (inner_mode) == MODE_FLOAT ! && (REAL_VALUE_NEGATIVE ! (FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1))))) #endif ) && GET_RTX_CLASS (GET_CODE (p->exp)) == '<') --- 3265,3272 ---- #ifdef FLOAT_STORE_FLAG_VALUE || (code == GE && GET_MODE_CLASS (inner_mode) == MODE_FLOAT ! && (fsfv = FLOAT_STORE_FLAG_VALUE (GET_MODE (arg1)), ! REAL_VALUE_NEGATIVE (fsfv))) #endif ) && GET_RTX_CLASS (GET_CODE (p->exp)) == '<') *************** find_comparison_args (code, parg1, parg2 *** 3282,3288 **** enum rtx_code reversed = reversed_comparison_code (x, NULL_RTX); if (reversed == UNKNOWN) break; ! else code = reversed; } else if (GET_RTX_CLASS (GET_CODE (x)) == '<') code = GET_CODE (x); --- 3298,3305 ---- enum rtx_code reversed = reversed_comparison_code (x, NULL_RTX); if (reversed == UNKNOWN) break; ! else ! code = reversed; } else if (GET_RTX_CLASS (GET_CODE (x)) == '<') code = GET_CODE (x); *************** fold_rtx (x, insn) *** 3734,3739 **** --- 3751,3757 ---- rtx cheap_arg, expensive_arg; rtx replacements[2]; int j; + int old_cost = COST_IN (XEXP (x, i), code); /* Most arguments are cheap, so handle them specially. */ switch (GET_CODE (arg)) *************** fold_rtx (x, insn) *** 3822,3830 **** replacements[0] = cheap_arg; replacements[1] = expensive_arg; ! for (j = 0; j < 2 && replacements[j]; j++) { - int old_cost = COST_IN (XEXP (x, i), code); int new_cost = COST_IN (replacements[j], code); /* Stop if what existed before was cheaper. Prefer constants --- 3840,3847 ---- replacements[0] = cheap_arg; replacements[1] = expensive_arg; ! for (j = 0; j < 2 && replacements[j]; j++) { int new_cost = COST_IN (replacements[j], code); /* Stop if what existed before was cheaper. Prefer constants *************** fold_rtx (x, insn) *** 3940,3946 **** if (GET_MODE_CLASS (mode) == MODE_FLOAT) { true_rtx = (CONST_DOUBLE_FROM_REAL_VALUE ! (FLOAT_STORE_FLAG_VALUE (mode), mode)); false_rtx = CONST0_RTX (mode); } #endif --- 3957,3963 ---- if (GET_MODE_CLASS (mode) == MODE_FLOAT) { true_rtx = (CONST_DOUBLE_FROM_REAL_VALUE ! (FLOAT_STORE_FLAG_VALUE (mode), mode)); false_rtx = CONST0_RTX (mode); } #endif *************** fold_rtx (x, insn) *** 3995,4013 **** & HASH_MASK), mode_arg0)) && p0->first_same_value == p1->first_same_value)) { ! /* Sadly two equal NaNs are not equivalent. */ ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT ! || ! FLOAT_MODE_P (mode_arg0) ! || flag_unsafe_math_optimizations) ! return ((code == EQ || code == LE || code == GE ! || code == LEU || code == GEU || code == UNEQ ! || code == UNLE || code == UNGE || code == ORDERED) ! ? true_rtx : false_rtx); ! /* Take care for the FP compares we can resolve. */ ! if (code == UNEQ || code == UNLE || code == UNGE) ! return true_rtx; ! if (code == LTGT || code == LT || code == GT) ! return false_rtx; } /* If FOLDED_ARG0 is a register, see if the comparison we are --- 4012,4029 ---- & HASH_MASK), mode_arg0)) && p0->first_same_value == p1->first_same_value)) { ! /* Sadly two equal NaNs are not equivalent. */ ! if (!HONOR_NANS (mode_arg0)) ! return ((code == EQ || code == LE || code == GE ! || code == LEU || code == GEU || code == UNEQ ! || code == UNLE || code == UNGE ! || code == ORDERED) ! ? true_rtx : false_rtx); ! /* Take care for the FP compares we can resolve. */ ! if (code == UNEQ || code == UNLE || code == UNGE) ! return true_rtx; ! if (code == LTGT || code == LT || code == GT) ! return false_rtx; } /* If FOLDED_ARG0 is a register, see if the comparison we are *************** fold_rtx (x, insn) *** 4215,4221 **** from_plus: case SMIN: case SMAX: case UMIN: case UMAX: case IOR: case AND: case XOR: ! case MULT: case DIV: case UDIV: case ASHIFT: case LSHIFTRT: case ASHIFTRT: /* If we have ( ) for an associative OP and REG is known to be of similar form, we may be able to replace the --- 4231,4237 ---- from_plus: case SMIN: case SMAX: case UMIN: case UMAX: case IOR: case AND: case XOR: ! case MULT: case ASHIFT: case LSHIFTRT: case ASHIFTRT: /* If we have ( ) for an associative OP and REG is known to be of similar form, we may be able to replace the *************** fold_rtx (x, insn) *** 4263,4273 **** break; /* Compute the code used to compose the constants. For example, ! A/C1/C2 is A/(C1 * C2), so if CODE == DIV, we want MULT. */ ! associate_code ! = (code == MULT || code == DIV || code == UDIV ? MULT ! : is_shift || code == PLUS || code == MINUS ? PLUS : code); new_const = simplify_binary_operation (associate_code, mode, const_arg1, inner_const); --- 4279,4287 ---- break; /* Compute the code used to compose the constants. For example, ! A-C1-C2 is A-(C1 + C2), so if CODE == MINUS, we want PLUS. */ ! associate_code = (is_shift || code == MINUS ? PLUS : code); new_const = simplify_binary_operation (associate_code, mode, const_arg1, inner_const); *************** fold_rtx (x, insn) *** 4305,4310 **** --- 4319,4332 ---- } break; + case DIV: case UDIV: + /* ??? The associative optimization performed immediately above is + also possible for DIV and UDIV using associate_code of MULT. + However, we would need extra code to verify that the + multiplication does not overflow, that is, there is no overflow + in the calculation of new_const. */ + break; + default: break; } *************** cse_insn (insn, libcall_insn) *** 5007,5013 **** int src_folded_regcost = MAX_COST; int src_related_regcost = MAX_COST; int src_elt_regcost = MAX_COST; ! /* Set non-zero if we need to call force_const_mem on with the contents of src_folded before using it. */ int src_folded_force_flag = 0; --- 5029,5035 ---- int src_folded_regcost = MAX_COST; int src_related_regcost = MAX_COST; int src_elt_regcost = MAX_COST; ! /* Set nonzero if we need to call force_const_mem on with the contents of src_folded before using it. */ int src_folded_force_flag = 0; *************** cse_insn (insn, libcall_insn) *** 5347,5355 **** if (src == src_folded) src_folded = 0; ! /* At this point, ELT, if non-zero, points to a class of expressions equivalent to the source of this SET and SRC, SRC_EQV, SRC_FOLDED, ! and SRC_RELATED, if non-zero, each contain additional equivalent expressions. Prune these latter expressions by deleting expressions already in the equivalence class. --- 5369,5377 ---- if (src == src_folded) src_folded = 0; ! /* At this point, ELT, if nonzero, points to a class of expressions equivalent to the source of this SET and SRC, SRC_EQV, SRC_FOLDED, ! and SRC_RELATED, if nonzero, each contain additional equivalent expressions. Prune these latter expressions by deleting expressions already in the equivalence class. *************** cse_insn (insn, libcall_insn) *** 5486,5498 **** continue; } ! if (elt) { src_elt_cost = elt->cost; src_elt_regcost = elt->regcost; } ! /* Find cheapest and skip it for the next time. For items of equal cost, use this order: src_folded, src, src_eqv, src_related and hash table entry. */ if (src_folded --- 5508,5520 ---- continue; } ! if (elt) { src_elt_cost = elt->cost; src_elt_regcost = elt->regcost; } ! /* Find cheapest and skip it for the next time. For items of equal cost, use this order: src_folded, src, src_eqv, src_related and hash table entry. */ if (src_folded *************** cse_insn (insn, libcall_insn) *** 5526,5532 **** else if (src_related && preferrable (src_related_cost, src_related_regcost, src_elt_cost, src_elt_regcost) <= 0) ! trial = copy_rtx (src_related), src_related_cost = MAX_COST; else { trial = copy_rtx (elt->exp); --- 5548,5554 ---- else if (src_related && preferrable (src_related_cost, src_related_regcost, src_elt_cost, src_elt_regcost) <= 0) ! trial = copy_rtx (src_related), src_related_cost = MAX_COST; else { trial = copy_rtx (elt->exp); *************** cse_insn (insn, libcall_insn) *** 5691,5697 **** a new one if one does not already exist. */ set_unique_reg_note (insn, REG_EQUAL, src_const); ! /* If storing a constant value in a register that previously held the constant value 0, record this fact with a REG_WAS_0 note on this insn. --- 5713,5719 ---- a new one if one does not already exist. */ set_unique_reg_note (insn, REG_EQUAL, src_const); ! /* If storing a constant value in a register that previously held the constant value 0, record this fact with a REG_WAS_0 note on this insn. *************** cse_insn (insn, libcall_insn) *** 5817,5826 **** and hope for the best. */ if (n_sets == 1) { ! rtx new = emit_jump_insn_before (gen_jump (XEXP (src, 0)), insn); JUMP_LABEL (new) = XEXP (src, 0); LABEL_NUSES (XEXP (src, 0))++; insn = new; /* Now emit a BARRIER after the unconditional jump. */ --- 5839,5849 ---- and hope for the best. */ if (n_sets == 1) { ! rtx new = emit_jump_insn_after (gen_jump (XEXP (src, 0)), insn); JUMP_LABEL (new) = XEXP (src, 0); LABEL_NUSES (XEXP (src, 0))++; + delete_insn (insn); insn = new; /* Now emit a BARRIER after the unconditional jump. */ *************** cse_insn (insn, libcall_insn) *** 6201,6215 **** rtx new_src = 0; unsigned src_hash; struct table_elt *src_elt; /* Ignore invalid entries. */ if (GET_CODE (elt->exp) != REG && ! exp_equiv_p (elt->exp, elt->exp, 1, 0)) continue; ! new_src = gen_lowpart_if_possible (new_mode, elt->exp); ! if (new_src == 0) ! new_src = gen_rtx_SUBREG (new_mode, elt->exp, 0); src_hash = HASH (new_src, new_mode); src_elt = lookup (new_src, src_hash, new_mode); --- 6224,6261 ---- rtx new_src = 0; unsigned src_hash; struct table_elt *src_elt; + int byte = 0; /* Ignore invalid entries. */ if (GET_CODE (elt->exp) != REG && ! exp_equiv_p (elt->exp, elt->exp, 1, 0)) continue; ! /* We may have already been playing subreg games. If the ! mode is already correct for the destination, use it. */ ! if (GET_MODE (elt->exp) == new_mode) ! new_src = elt->exp; ! else ! { ! /* Calculate big endian correction for the SUBREG_BYTE. ! We have already checked that M1 (GET_MODE (dest)) ! is not narrower than M2 (new_mode). */ ! if (BYTES_BIG_ENDIAN) ! byte = (GET_MODE_SIZE (GET_MODE (dest)) ! - GET_MODE_SIZE (new_mode)); ! ! new_src = simplify_gen_subreg (new_mode, elt->exp, ! GET_MODE (dest), byte); ! } ! ! /* The call to simplify_gen_subreg fails if the value ! is VOIDmode, yet we can't do any simplification, e.g. ! for EXPR_LISTs denoting function call results. ! It is invalid to construct a SUBREG with a VOIDmode ! SUBREG_REG, hence a zero new_src means we can't do ! this substitution. */ ! if (! new_src) ! continue; src_hash = HASH (new_src, new_mode); src_elt = lookup (new_src, src_hash, new_mode); *************** cse_insn (insn, libcall_insn) *** 6270,6277 **** if ((src_ent->first_reg == REGNO (SET_DEST (sets[0].rtl))) && ! find_reg_note (insn, REG_RETVAL, NULL_RTX)) { ! rtx prev = prev_nonnote_insn (insn); ! /* Do not swap the registers around if the previous instruction attaches a REG_EQUIV note to REG1. --- 6316,6331 ---- if ((src_ent->first_reg == REGNO (SET_DEST (sets[0].rtl))) && ! find_reg_note (insn, REG_RETVAL, NULL_RTX)) { ! rtx prev = insn; ! /* Scan for the previous nonnote insn, but stop at a basic ! block boundary. */ ! do ! { ! prev = PREV_INSN (prev); ! } ! while (prev && GET_CODE (prev) == NOTE ! && NOTE_LINE_NUMBER (prev) != NOTE_INSN_BASIC_BLOCK); ! /* Do not swap the registers around if the previous instruction attaches a REG_EQUIV note to REG1. *************** cse_insn (insn, libcall_insn) *** 6282,6288 **** This section previously turned the REG_EQUIV into a REG_EQUAL note. We cannot do that because REG_EQUIV may provide an ! uninitialised stack slot when REG_PARM_STACK_SPACE is used. */ if (prev != 0 && GET_CODE (prev) == INSN && GET_CODE (PATTERN (prev)) == SET --- 6336,6342 ---- This section previously turned the REG_EQUIV into a REG_EQUAL note. We cannot do that because REG_EQUIV may provide an ! uninitialized stack slot when REG_PARM_STACK_SPACE is used. */ if (prev != 0 && GET_CODE (prev) == INSN && GET_CODE (PATTERN (prev)) == SET *************** addr_affects_sp_p (addr) *** 6380,6386 **** && REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM) { if (REG_TICK (STACK_POINTER_REGNUM) >= 0) ! REG_TICK (STACK_POINTER_REGNUM)++; /* This should be *very* rare. */ if (TEST_HARD_REG_BIT (hard_regs_in_table, STACK_POINTER_REGNUM)) --- 6434,6444 ---- && REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM) { if (REG_TICK (STACK_POINTER_REGNUM) >= 0) ! { ! REG_TICK (STACK_POINTER_REGNUM)++; ! /* Is it possible to use a subreg of SP? */ ! SUBREG_TICKED (STACK_POINTER_REGNUM) = -1; ! } /* This should be *very* rare. */ if (TEST_HARD_REG_BIT (hard_regs_in_table, STACK_POINTER_REGNUM)) *************** cse_set_around_loop (x, insn, loop_start *** 6810,6819 **** the total number of SETs in all the insns of the block, the last insn of the block, and the branch path. ! The branch path indicates which branches should be followed. If a non-zero path size is specified, the block should be rescanned and a different set of branches will be taken. The branch path is only used if ! FLAG_CSE_FOLLOW_JUMPS or FLAG_CSE_SKIP_BLOCKS is non-zero. DATA is a pointer to a struct cse_basic_block_data, defined below, that is used to describe the block. It is filled in with the information about --- 6868,6877 ---- the total number of SETs in all the insns of the block, the last insn of the block, and the branch path. ! The branch path indicates which branches should be followed. If a nonzero path size is specified, the block should be rescanned and a different set of branches will be taken. The branch path is only used if ! FLAG_CSE_FOLLOW_JUMPS or FLAG_CSE_SKIP_BLOCKS is nonzero. DATA is a pointer to a struct cse_basic_block_data, defined below, that is used to describe the block. It is filled in with the information about *************** cse_end_of_basic_block (insn, data, foll *** 6839,6845 **** /* Update the previous branch path, if any. If the last branch was previously TAKEN, mark it NOT_TAKEN. If it was previously NOT_TAKEN, shorten the path by one and look at the previous branch. We know that ! at least one branch must have been taken if PATH_SIZE is non-zero. */ while (path_size > 0) { if (data->path[path_size - 1].status != NOT_TAKEN) --- 6897,6903 ---- /* Update the previous branch path, if any. If the last branch was previously TAKEN, mark it NOT_TAKEN. If it was previously NOT_TAKEN, shorten the path by one and look at the previous branch. We know that ! at least one branch must have been taken if PATH_SIZE is nonzero. */ while (path_size > 0) { if (data->path[path_size - 1].status != NOT_TAKEN) *************** cse_main (f, nregs, after_loop, file) *** 7184,7190 **** block. NEXT_BRANCH points to the branch path when following jumps or a null path when not following jumps. ! AROUND_LOOP is non-zero if we are to try to cse around to the start of a loop. This is true when we are being called for the last time on a block and this CSE pass is before loop.c. */ --- 7242,7248 ---- block. NEXT_BRANCH points to the branch path when following jumps or a null path when not following jumps. ! AROUND_LOOP is nonzero if we are to try to cse around to the start of a loop. This is true when we are being called for the last time on a block and this CSE pass is before loop.c. */ *************** cse_basic_block (from, to, next_branch, *** 7383,7389 **** we can cse into the loop. Don't do this if we changed the jump structure of a loop unless we aren't going to be following jumps. */ ! insn = prev_nonnote_insn(to); if ((cse_jumps_altered == 0 || (flag_cse_follow_jumps == 0 && flag_cse_skip_blocks == 0)) && around_loop && to != 0 --- 7441,7447 ---- we can cse into the loop. Don't do this if we changed the jump structure of a loop unless we aren't going to be following jumps. */ ! insn = prev_nonnote_insn (to); if ((cse_jumps_altered == 0 || (flag_cse_follow_jumps == 0 && flag_cse_skip_blocks == 0)) && around_loop && to != 0 *************** count_reg_usage (x, counts, dest, incr) *** 7435,7440 **** --- 7493,7499 ---- int incr; { enum rtx_code code; + rtx note; const char *fmt; int i, j; *************** count_reg_usage (x, counts, dest, incr) *** 7492,7507 **** /* Things used in a REG_EQUAL note aren't dead since loop may try to use them. */ ! count_reg_usage (REG_NOTES (x), counts, NULL_RTX, incr); return; - case EXPR_LIST: case INSN_LIST: ! if (REG_NOTE_KIND (x) == REG_EQUAL ! || (REG_NOTE_KIND (x) != REG_NONNEG && GET_CODE (XEXP (x,0)) == USE)) ! count_reg_usage (XEXP (x, 0), counts, NULL_RTX, incr); ! count_reg_usage (XEXP (x, 1), counts, NULL_RTX, incr); ! return; default: break; --- 7551,7563 ---- /* Things used in a REG_EQUAL note aren't dead since loop may try to use them. */ ! note = find_reg_equal_equiv_note (x); ! if (note) ! count_reg_usage (XEXP (note, 0), counts, NULL_RTX, incr); return; case INSN_LIST: ! abort (); default: break; *************** insn_live_p (insn, counts) *** 7561,7567 **** int *counts; { int i; ! if (GET_CODE (PATTERN (insn)) == SET) return set_live_p (PATTERN (insn), insn, counts); else if (GET_CODE (PATTERN (insn)) == PARALLEL) { --- 7617,7625 ---- int *counts; { int i; ! if (flag_non_call_exceptions && may_trap_p (PATTERN (insn))) ! return true; ! else if (GET_CODE (PATTERN (insn)) == SET) return set_live_p (PATTERN (insn), insn, counts); else if (GET_CODE (PATTERN (insn)) == PARALLEL) { *************** insn_live_p (insn, counts) *** 7586,7593 **** /* Return true if libcall is dead as a whole. */ static bool ! dead_libcall_p (insn) rtx insn; { rtx note; /* See if there's a REG_EQUAL note on this insn and try to --- 7644,7652 ---- /* Return true if libcall is dead as a whole. */ static bool ! dead_libcall_p (insn, counts) rtx insn; + int *counts; { rtx note; /* See if there's a REG_EQUAL note on this insn and try to *************** dead_libcall_p (insn) *** 7604,7614 **** --- 7663,7679 ---- if (!new) new = XEXP (note, 0); + /* While changing insn, we must update the counts accordingly. */ + count_reg_usage (insn, counts, NULL_RTX, -1); + if (set && validate_change (insn, &SET_SRC (set), new, 0)) { + count_reg_usage (insn, counts, NULL_RTX, 1); remove_note (insn, find_reg_note (insn, REG_RETVAL, NULL_RTX)); + remove_note (insn, note); return true; } + count_reg_usage (insn, counts, NULL_RTX, 1); } return false; } *************** dead_libcall_p (insn) *** 7621,7701 **** move dead invariants out of loops or make givs for dead quantities. The remaining passes of the compilation are also sped up. */ ! void ! delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks) rtx insns; int nreg; - int preserve_basic_blocks; { int *counts; rtx insn, prev; - int i; int in_libcall = 0, dead_libcall = 0; ! basic_block bb; /* First count the number of times each register is used. */ counts = (int *) xcalloc (nreg, sizeof (int)); for (insn = next_real_insn (insns); insn; insn = next_real_insn (insn)) count_reg_usage (insn, counts, NULL_RTX, 1); ! /* Go from the last insn to the first and delete insns that only set unused ! registers or copy a register to itself. As we delete an insn, remove ! usage counts for registers it uses. ! ! The first jump optimization pass may leave a real insn as the last ! insn in the function. We must not skip that insn or we may end ! up deleting code that is not really dead. */ ! insn = get_last_insn (); ! if (! INSN_P (insn)) ! insn = prev_real_insn (insn); ! ! if (!preserve_basic_blocks) ! for (; insn; insn = prev) ! { ! int live_insn = 0; ! ! prev = prev_real_insn (insn); ! ! /* Don't delete any insns that are part of a libcall block unless ! we can delete the whole libcall block. ! ! Flow or loop might get confused if we did that. Remember ! that we are scanning backwards. */ ! if (find_reg_note (insn, REG_RETVAL, NULL_RTX)) ! { ! in_libcall = 1; ! live_insn = 1; ! dead_libcall = dead_libcall_p (insn); ! } ! else if (in_libcall) ! live_insn = ! dead_libcall; ! else ! live_insn = insn_live_p (insn, counts); ! ! /* If this is a dead insn, delete it and show registers in it aren't ! being used. */ ! if (! live_insn) ! { ! count_reg_usage (insn, counts, NULL_RTX, -1); ! delete_related_insns (insn); ! } ! if (find_reg_note (insn, REG_LIBCALL, NULL_RTX)) ! { ! in_libcall = 0; ! dead_libcall = 0; ! } ! } ! else ! for (i = 0; i < n_basic_blocks; i++) ! for (bb = BASIC_BLOCK (i), insn = bb->end; insn != bb->head; insn = prev) { int live_insn = 0; ! prev = PREV_INSN (insn); ! if (!INSN_P (insn)) ! continue; /* Don't delete any insns that are part of a libcall block unless we can delete the whole libcall block. --- 7686,7727 ---- move dead invariants out of loops or make givs for dead quantities. The remaining passes of the compilation are also sped up. */ ! int ! delete_trivially_dead_insns (insns, nreg) rtx insns; int nreg; { int *counts; rtx insn, prev; int in_libcall = 0, dead_libcall = 0; ! int ndead = 0, nlastdead, niterations = 0; + timevar_push (TV_DELETE_TRIVIALLY_DEAD); /* First count the number of times each register is used. */ counts = (int *) xcalloc (nreg, sizeof (int)); for (insn = next_real_insn (insns); insn; insn = next_real_insn (insn)) count_reg_usage (insn, counts, NULL_RTX, 1); ! do ! { ! nlastdead = ndead; ! niterations++; ! /* Go from the last insn to the first and delete insns that only set unused ! registers or copy a register to itself. As we delete an insn, remove ! usage counts for registers it uses. ! The first jump optimization pass may leave a real insn as the last ! insn in the function. We must not skip that insn or we may end ! up deleting code that is not really dead. */ ! insn = get_last_insn (); ! if (! INSN_P (insn)) ! insn = prev_real_insn (insn); ! for (; insn; insn = prev) { int live_insn = 0; ! prev = prev_real_insn (insn); /* Don't delete any insns that are part of a libcall block unless we can delete the whole libcall block. *************** delete_trivially_dead_insns (insns, nreg *** 7706,7712 **** { in_libcall = 1; live_insn = 1; ! dead_libcall = dead_libcall_p (insn); } else if (in_libcall) live_insn = ! dead_libcall; --- 7732,7738 ---- { in_libcall = 1; live_insn = 1; ! dead_libcall = dead_libcall_p (insn, counts); } else if (in_libcall) live_insn = ! dead_libcall; *************** delete_trivially_dead_insns (insns, nreg *** 7719,7725 **** if (! live_insn) { count_reg_usage (insn, counts, NULL_RTX, -1); ! delete_insn (insn); } if (find_reg_note (insn, REG_LIBCALL, NULL_RTX)) --- 7745,7752 ---- if (! live_insn) { count_reg_usage (insn, counts, NULL_RTX, -1); ! delete_insn_and_edges (insn); ! ndead++; } if (find_reg_note (insn, REG_LIBCALL, NULL_RTX)) *************** delete_trivially_dead_insns (insns, nreg *** 7728,7734 **** --- 7755,7768 ---- dead_libcall = 0; } } + } + while (ndead != nlastdead); + if (rtl_dump_file && ndead) + fprintf (rtl_dump_file, "Deleted %i trivially dead insns; %i iterations\n", + ndead, niterations); /* Clean up. */ free (counts); + timevar_pop (TV_DELETE_TRIVIALLY_DEAD); + return ndead; } diff -Nrc3pad gcc-3.2.3/gcc/cselib.c gcc-3.3/gcc/cselib.c *** gcc-3.2.3/gcc/cselib.c 2002-05-24 07:06:29.000000000 +0000 --- gcc-3.3/gcc/cselib.c 2003-01-08 19:28:56.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 35,46 **** #include "toplev.h" #include "output.h" #include "ggc.h" - #include "obstack.h" #include "hashtab.h" #include "cselib.h" static int entry_and_rtx_equal_p PARAMS ((const void *, const void *)); ! static unsigned int get_value_hash PARAMS ((const void *)); static struct elt_list *new_elt_list PARAMS ((struct elt_list *, cselib_val *)); static struct elt_loc_list *new_elt_loc_list PARAMS ((struct elt_loc_list *, --- 35,45 ---- #include "toplev.h" #include "output.h" #include "ggc.h" #include "hashtab.h" #include "cselib.h" static int entry_and_rtx_equal_p PARAMS ((const void *, const void *)); ! static hashval_t get_value_hash PARAMS ((const void *)); static struct elt_list *new_elt_list PARAMS ((struct elt_list *, cselib_val *)); static struct elt_loc_list *new_elt_loc_list PARAMS ((struct elt_loc_list *, *************** static void cselib_record_sets PARAMS ( *** 79,89 **** the locations of the entries with the rtx we are looking up. */ /* A table that enables us to look up elts by their value. */ ! static htab_t hash_table; /* This is a global so we don't have to pass this through every function. It is used in new_elt_loc_list to set SETTING_INSN. */ static rtx cselib_current_insn; /* Every new unknown value gets a unique number. */ static unsigned int next_unknown_value; --- 78,89 ---- the locations of the entries with the rtx we are looking up. */ /* A table that enables us to look up elts by their value. */ ! static GTY((param_is (cselib_val))) htab_t hash_table; /* This is a global so we don't have to pass this through every function. It is used in new_elt_loc_list to set SETTING_INSN. */ static rtx cselib_current_insn; + static bool cselib_current_insn_in_libcall; /* Every new unknown value gets a unique number. */ static unsigned int next_unknown_value; *************** static int n_useless_values; *** 101,131 **** /* This table maps from register number to values. It does not contain pointers to cselib_val structures, but rather elt_lists. The purpose is to be able to refer to the same register in different modes. */ ! static varray_type reg_values; #define REG_VALUES(I) VARRAY_ELT_LIST (reg_values, (I)) /* The largest number of hard regs used by any entry added to the ! REG_VALUES table. Cleared on each clear_table() invocation. */ static unsigned int max_value_regs; /* Here the set of indices I with REG_VALUES(I) != 0 is saved. This is used in clear_table() for fast emptying. */ ! static varray_type used_regs; /* We pass this to cselib_invalidate_mem to invalidate all of memory for a non-const call instruction. */ ! static rtx callmem; ! ! /* Memory for our structures is allocated from this obstack. */ ! static struct obstack cselib_obstack; ! ! /* Used to quickly free all memory. */ ! static char *cselib_startobj; /* Caches for unused structures. */ ! static cselib_val *empty_vals; ! static struct elt_list *empty_elt_lists; ! static struct elt_loc_list *empty_elt_loc_lists; /* Set by discard_useless_locs if it deleted the last location of any value. */ --- 101,127 ---- /* This table maps from register number to values. It does not contain pointers to cselib_val structures, but rather elt_lists. The purpose is to be able to refer to the same register in different modes. */ ! static GTY(()) varray_type reg_values; ! static GTY((deletable (""))) varray_type reg_values_old; #define REG_VALUES(I) VARRAY_ELT_LIST (reg_values, (I)) /* The largest number of hard regs used by any entry added to the ! REG_VALUES table. Cleared on each clear_table() invocation. */ static unsigned int max_value_regs; /* Here the set of indices I with REG_VALUES(I) != 0 is saved. This is used in clear_table() for fast emptying. */ ! static GTY(()) varray_type used_regs; ! static GTY((deletable (""))) varray_type used_regs_old; /* We pass this to cselib_invalidate_mem to invalidate all of memory for a non-const call instruction. */ ! static GTY(()) rtx callmem; /* Caches for unused structures. */ ! static GTY((deletable (""))) cselib_val *empty_vals; ! static GTY((deletable (""))) struct elt_list *empty_elt_lists; ! static GTY((deletable (""))) struct elt_loc_list *empty_elt_loc_lists; /* Set by discard_useless_locs if it deleted the last location of any value. */ *************** new_elt_list (next, elt) *** 145,152 **** if (el) empty_elt_lists = el->next; else ! el = (struct elt_list *) obstack_alloc (&cselib_obstack, ! sizeof (struct elt_list)); el->next = next; el->elt = elt; return el; --- 141,147 ---- if (el) empty_elt_lists = el->next; else ! el = (struct elt_list *) ggc_alloc (sizeof (struct elt_list)); el->next = next; el->elt = elt; return el; *************** new_elt_loc_list (next, loc) *** 165,175 **** if (el) empty_elt_loc_lists = el->next; else ! el = (struct elt_loc_list *) obstack_alloc (&cselib_obstack, ! sizeof (struct elt_loc_list)); el->next = next; el->loc = loc; el->setting_insn = cselib_current_insn; return el; } --- 160,170 ---- if (el) empty_elt_loc_lists = el->next; else ! el = (struct elt_loc_list *) ggc_alloc (sizeof (struct elt_loc_list)); el->next = next; el->loc = loc; el->setting_insn = cselib_current_insn; + el->in_libcall = cselib_current_insn_in_libcall; return el; } *************** clear_table (clear_all) *** 236,246 **** VARRAY_POP_ALL (used_regs); htab_empty (hash_table); - obstack_free (&cselib_obstack, cselib_startobj); - empty_vals = 0; - empty_elt_lists = 0; - empty_elt_loc_lists = 0; n_useless_values = 0; next_unknown_value = 0; --- 231,237 ---- *************** entry_and_rtx_equal_p (entry, x_arg) *** 285,291 **** hash_rtx when adding an element; this function just extracts the hash value from a cselib_val structure. */ ! static unsigned int get_value_hash (entry) const void *entry; { --- 276,282 ---- hash_rtx when adding an element; this function just extracts the hash value from a cselib_val structure. */ ! static hashval_t get_value_hash (entry) const void *entry; { *************** hash_rtx (x, mode, create) *** 592,599 **** the integers representing the constant. */ hash += (unsigned) code + (unsigned) GET_MODE (x); if (GET_MODE (x) != VOIDmode) ! for (i = 2; i < GET_RTX_LENGTH (CONST_DOUBLE); i++) ! hash += XWINT (x, i); else hash += ((unsigned) CONST_DOUBLE_LOW (x) + (unsigned) CONST_DOUBLE_HIGH (x)); --- 583,589 ---- the integers representing the constant. */ hash += (unsigned) code + (unsigned) GET_MODE (x); if (GET_MODE (x) != VOIDmode) ! hash += real_hash (CONST_DOUBLE_REAL_VALUE (x)); else hash += ((unsigned) CONST_DOUBLE_LOW (x) + (unsigned) CONST_DOUBLE_HIGH (x)); *************** new_cselib_val (value, mode) *** 704,710 **** if (e) empty_vals = e->u.next_free; else ! e = (cselib_val *) obstack_alloc (&cselib_obstack, sizeof (cselib_val)); if (value == 0) abort (); --- 694,700 ---- if (e) empty_vals = e->u.next_free; else ! e = (cselib_val *) ggc_alloc (sizeof (cselib_val)); if (value == 0) abort (); *************** cselib_process_insn (insn) *** 1320,1325 **** --- 1310,1319 ---- int i; rtx x; + if (find_reg_note (insn, REG_LIBCALL, NULL)) + cselib_current_insn_in_libcall = true; + if (find_reg_note (insn, REG_RETVAL, NULL)) + cselib_current_insn_in_libcall = false; cselib_current_insn = insn; /* Forget everything at a CODE_LABEL, a volatile asm, or a setjmp. */ *************** cselib_update_varray_sizes () *** 1399,1419 **** void cselib_init () { ! /* These are only created once. */ if (! callmem) ! { ! gcc_obstack_init (&cselib_obstack); ! cselib_startobj = obstack_alloc (&cselib_obstack, 0); ! ! callmem = gen_rtx_MEM (BLKmode, const0_rtx); ! ggc_add_rtx_root (&callmem, 1); ! } cselib_nregs = max_reg_num (); ! VARRAY_ELT_LIST_INIT (reg_values, cselib_nregs, "reg_values"); ! VARRAY_UINT_INIT (used_regs, cselib_nregs, "used_regs"); ! hash_table = htab_create (31, get_value_hash, entry_and_rtx_equal_p, NULL); clear_table (1); } /* Called when the current user is done with cselib. */ --- 1393,1419 ---- void cselib_init () { ! /* This is only created once. */ if (! callmem) ! callmem = gen_rtx_MEM (BLKmode, const0_rtx); cselib_nregs = max_reg_num (); ! if (reg_values_old != NULL && VARRAY_SIZE (reg_values_old) >= cselib_nregs) ! { ! reg_values = reg_values_old; ! used_regs = used_regs_old; ! VARRAY_CLEAR (reg_values); ! VARRAY_CLEAR (used_regs); ! } ! else ! { ! VARRAY_ELT_LIST_INIT (reg_values, cselib_nregs, "reg_values"); ! VARRAY_UINT_INIT (used_regs, cselib_nregs, "used_regs"); ! } ! hash_table = htab_create_ggc (31, get_value_hash, entry_and_rtx_equal_p, ! NULL); clear_table (1); + cselib_current_insn_in_libcall = false; } /* Called when the current user is done with cselib. */ *************** cselib_init () *** 1421,1428 **** void cselib_finish () { ! clear_table (0); ! VARRAY_FREE (reg_values); ! VARRAY_FREE (used_regs); ! htab_delete (hash_table); } --- 1421,1433 ---- void cselib_finish () { ! reg_values_old = reg_values; ! reg_values = 0; ! used_regs_old = used_regs; ! used_regs = 0; ! hash_table = 0; ! n_useless_values = 0; ! next_unknown_value = 0; } + + #include "gt-cselib.h" diff -Nrc3pad gcc-3.2.3/gcc/cselib.h gcc-3.3/gcc/cselib.h *** gcc-3.2.3/gcc/cselib.h 2001-08-22 14:34:54.000000000 +0000 --- gcc-3.3/gcc/cselib.h 2003-01-08 19:28:57.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 20,36 **** 02111-1307, USA. */ /* Describe a value. */ ! typedef struct cselib_val_struct { /* The hash value. */ unsigned int value; ! union { /* A VALUE rtx that points back to this structure. */ ! rtx val_rtx; /* Used to keep a list of free cselib_val structures. */ ! struct cselib_val_struct *next_free; ! } u; /* All rtl expressions that hold this value at the current time during a scan. */ --- 20,36 ---- 02111-1307, USA. */ /* Describe a value. */ ! typedef struct cselib_val_struct GTY(()) { /* The hash value. */ unsigned int value; ! union cselib_val_u { /* A VALUE rtx that points back to this structure. */ ! rtx GTY ((tag ("1"))) val_rtx; /* Used to keep a list of free cselib_val structures. */ ! struct cselib_val_struct * GTY ((skip (""))) next_free; ! } GTY ((desc ("1"))) u; /* All rtl expressions that hold this value at the current time during a scan. */ *************** typedef struct cselib_val_struct *** 41,47 **** } cselib_val; /* A list of rtl expressions that hold the same value. */ ! struct elt_loc_list { /* Next element in the list. */ struct elt_loc_list *next; --- 41,47 ---- } cselib_val; /* A list of rtl expressions that hold the same value. */ ! struct elt_loc_list GTY(()) { /* Next element in the list. */ struct elt_loc_list *next; *************** struct elt_loc_list *** 49,58 **** rtx loc; /* The insn that made the equivalence. */ rtx setting_insn; }; /* A list of cselib_val structures. */ ! struct elt_list { struct elt_list *next; cselib_val *elt; --- 49,60 ---- rtx loc; /* The insn that made the equivalence. */ rtx setting_insn; + /* True when setting insn is inside libcall. */ + bool in_libcall; }; /* A list of cselib_val structures. */ ! struct elt_list GTY(()) { struct elt_list *next; cselib_val *elt; diff -Nrc3pad gcc-3.2.3/gcc/c-semantics.c gcc-3.3/gcc/c-semantics.c *** gcc-3.2.3/gcc/c-semantics.c 2003-01-09 13:18:41.000000000 +0000 --- gcc-3.3/gcc/c-semantics.c 2003-02-22 10:04:07.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 36,41 **** --- 36,42 ---- #include "expr.h" #include "output.h" #include "timevar.h" + #include "predict.h" /* If non-NULL, the address of a language-specific function for expanding statements. */ *************** genrtl_expr_stmt (expr) *** 334,340 **** whether to (1) save the value of the expression, (0) discard it or (-1) use expr_stmts_for_value to tell. The use of -1 is deprecated, and retained only for backward compatibility. ! MAYBE_LAST is non-zero if this EXPR_STMT might be the last statement in expression statement. */ void --- 335,341 ---- whether to (1) save the value of the expression, (0) discard it or (-1) use expr_stmts_for_value to tell. The use of -1 is deprecated, and retained only for backward compatibility. ! MAYBE_LAST is nonzero if this EXPR_STMT might be the last statement in expression statement. */ void *************** genrtl_do_stmt (t) *** 446,453 **** /* Recognize the common special-case of do { ... } while (0) and do not emit the loop widgetry in this case. In particular this avoids cluttering the rtl with dummy loop notes, which can affect ! alignment of adjacent labels. */ ! if (integer_zerop (cond)) { expand_start_null_loop (); expand_stmt (DO_BODY (t)); --- 447,455 ---- /* Recognize the common special-case of do { ... } while (0) and do not emit the loop widgetry in this case. In particular this avoids cluttering the rtl with dummy loop notes, which can affect ! alignment of adjacent labels. COND can be NULL due to parse ! errors. */ ! if (!cond || integer_zerop (cond)) { expand_start_null_loop (); expand_stmt (DO_BODY (t)); *************** genrtl_return_stmt (stmt) *** 486,492 **** { tree expr; ! expr = RETURN_EXPR (stmt); emit_line_note (input_filename, lineno); if (!expr) --- 488,494 ---- { tree expr; ! expr = RETURN_STMT_EXPR (stmt); emit_line_note (input_filename, lineno); if (!expr) *************** genrtl_case_label (case_label) *** 673,680 **** if (cleanup) { static int explained = 0; ! warning_with_decl (TREE_PURPOSE (cleanup), ! "destructor needed for `%#D'"); warning ("where case label appears here"); if (!explained) { --- 675,681 ---- if (cleanup) { static int explained = 0; ! warning ("destructor needed for `%#D'", (TREE_PURPOSE (cleanup))); warning ("where case label appears here"); if (!explained) { *************** expand_stmt (t) *** 835,840 **** --- 836,850 ---- break; case GOTO_STMT: + /* Emit information for branch prediction. */ + if (!GOTO_FAKE_P (t) + && TREE_CODE (GOTO_DESTINATION (t)) == LABEL_DECL + && flag_guess_branch_prob) + { + rtx note = emit_note (NULL, NOTE_INSN_PREDICTION); + + NOTE_PREDICTION (note) = NOTE_PREDICT (PRED_GOTO, NOT_TAKEN); + } genrtl_goto_stmt (GOTO_DESTINATION (t)); break; diff -Nrc3pad gcc-3.2.3/gcc/c-tree.h gcc-3.3/gcc/c-tree.h *** gcc-3.2.3/gcc/c-tree.h 2002-09-01 20:11:07.000000000 +0000 --- gcc-3.3/gcc/c-tree.h 2002-09-16 18:33:18.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 34,49 **** lang_identifier nodes, because some keywords are only special in a particular context. */ ! struct lang_identifier { ! struct c_common_identifier ignore; ! tree global_value, local_value, label_value, implicit_decl; ! tree error_locus, limbo_value; }; /* Language-specific declaration information. */ ! struct lang_decl { struct c_lang_decl base; /* The return types and parameter types may have variable size. --- 34,65 ---- lang_identifier nodes, because some keywords are only special in a particular context. */ ! struct lang_identifier GTY(()) { ! struct c_common_identifier common_id; ! tree global_value; ! tree local_value; ! tree label_value; ! tree implicit_decl; ! tree error_locus; ! tree limbo_value; ! }; ! ! /* The resulting tree type. */ ! ! union lang_tree_node ! GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"), ! chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)"))) ! { ! union tree_node GTY ((tag ("0"), ! desc ("tree_node_structure (&%h)"))) ! generic; ! struct lang_identifier GTY ((tag ("1"))) identifier; }; /* Language-specific declaration information. */ ! struct lang_decl GTY(()) { struct c_lang_decl base; /* The return types and parameter types may have variable size. *************** struct lang_decl *** 107,116 **** (DECL_LANG_SPECIFIC (NODE)->base.declared_inline) /* In a RECORD_TYPE, a sorted array of the fields of the type. */ ! struct lang_type { int len; ! tree elts[1]; }; /* Record whether a type or decl was written with nonconstant size. --- 123,132 ---- (DECL_LANG_SPECIFIC (NODE)->base.declared_inline) /* In a RECORD_TYPE, a sorted array of the fields of the type. */ ! struct lang_type GTY(()) { int len; ! tree GTY((length ("%h.len"))) elts[1]; }; /* Record whether a type or decl was written with nonconstant size. *************** struct lang_type *** 150,178 **** /* in c-lang.c and objc-act.c */ extern tree lookup_interface PARAMS ((tree)); extern tree is_class_name PARAMS ((tree)); ! extern void maybe_objc_check_decl PARAMS ((tree)); extern void finish_file PARAMS ((void)); ! extern int maybe_objc_comptypes PARAMS ((tree, tree, int)); ! extern tree maybe_building_objc_message_expr PARAMS ((void)); ! extern int recognize_objc_keyword PARAMS ((void)); extern tree lookup_objc_ivar PARAMS ((tree)); /* in c-parse.in */ extern void c_parse_init PARAMS ((void)); - extern void c_set_yydebug PARAMS ((int)); - extern int yyparse_1 PARAMS ((void)); /* in c-aux-info.c */ extern void gen_aux_info_record PARAMS ((tree, int, int, int)); /* in c-decl.c */ extern void c_init_decl_processing PARAMS ((void)); extern void c_print_identifier PARAMS ((FILE *, tree, int)); extern tree build_array_declarator PARAMS ((tree, tree, int, int)); extern tree build_enumerator PARAMS ((tree, tree)); - extern int c_decode_option PARAMS ((int, char **)); - extern void c_mark_varargs PARAMS ((void)); extern void check_for_loop_decls PARAMS ((void)); extern void clear_parm_order PARAMS ((void)); extern int complete_array_type PARAMS ((tree, tree, int)); --- 166,201 ---- /* in c-lang.c and objc-act.c */ extern tree lookup_interface PARAMS ((tree)); extern tree is_class_name PARAMS ((tree)); ! extern tree objc_is_id PARAMS ((tree)); ! extern void objc_check_decl PARAMS ((tree)); extern void finish_file PARAMS ((void)); ! extern int objc_comptypes PARAMS ((tree, tree, int)); ! extern tree objc_message_selector PARAMS ((void)); extern tree lookup_objc_ivar PARAMS ((tree)); /* in c-parse.in */ extern void c_parse_init PARAMS ((void)); /* in c-aux-info.c */ extern void gen_aux_info_record PARAMS ((tree, int, int, int)); /* in c-decl.c */ + extern int global_bindings_p PARAMS ((void)); + extern int kept_level_p PARAMS ((void)); + extern tree getdecls PARAMS ((void)); + extern void pushlevel PARAMS ((int)); + extern tree poplevel PARAMS ((int,int, int)); + extern void insert_block PARAMS ((tree)); + extern void set_block PARAMS ((tree)); + extern tree pushdecl PARAMS ((tree)); + + extern void c_insert_default_attributes PARAMS ((tree)); extern void c_init_decl_processing PARAMS ((void)); + extern void c_dup_lang_specific_decl PARAMS ((tree)); extern void c_print_identifier PARAMS ((FILE *, tree, int)); extern tree build_array_declarator PARAMS ((tree, tree, int, int)); extern tree build_enumerator PARAMS ((tree, tree)); extern void check_for_loop_decls PARAMS ((void)); extern void clear_parm_order PARAMS ((void)); extern int complete_array_type PARAMS ((tree, tree, int)); *************** extern tree implicitly_declare *** 191,204 **** extern void implicit_decl_warning PARAMS ((tree)); extern int in_parm_level_p PARAMS ((void)); extern void keep_next_level PARAMS ((void)); - extern int kept_level_p PARAMS ((void)); extern tree lookup_name PARAMS ((tree)); extern tree lookup_name_current_level PARAMS ((tree)); extern void parmlist_tags_warning PARAMS ((void)); extern void pending_xref_error PARAMS ((void)); ! extern void mark_c_function_context PARAMS ((struct function *)); ! extern void push_c_function_context PARAMS ((struct function *)); ! extern void pop_c_function_context PARAMS ((struct function *)); extern void pop_label_level PARAMS ((void)); extern void push_label_level PARAMS ((void)); extern void push_parm_decl PARAMS ((tree)); --- 214,225 ---- extern void implicit_decl_warning PARAMS ((tree)); extern int in_parm_level_p PARAMS ((void)); extern void keep_next_level PARAMS ((void)); extern tree lookup_name PARAMS ((tree)); extern tree lookup_name_current_level PARAMS ((tree)); extern void parmlist_tags_warning PARAMS ((void)); extern void pending_xref_error PARAMS ((void)); ! extern void c_push_function_context PARAMS ((struct function *)); ! extern void c_pop_function_context PARAMS ((struct function *)); extern void pop_label_level PARAMS ((void)); extern void push_label_level PARAMS ((void)); extern void push_parm_decl PARAMS ((tree)); *************** extern tree xref_tag *** 218,224 **** extern tree c_begin_compound_stmt PARAMS ((void)); extern void c_expand_deferred_function PARAMS ((tree)); extern void c_expand_decl_stmt PARAMS ((tree)); ! /* in c-objc-common.c */ extern int c_disregard_inline_limits PARAMS ((tree)); --- 239,245 ---- extern tree c_begin_compound_stmt PARAMS ((void)); extern void c_expand_deferred_function PARAMS ((tree)); extern void c_expand_decl_stmt PARAMS ((tree)); ! extern tree make_pointer_declarator PARAMS ((tree, tree)); /* in c-objc-common.c */ extern int c_disregard_inline_limits PARAMS ((tree)); *************** extern const char *c_objc_common_init P *** 227,249 **** extern int c_missing_noreturn_ok_p PARAMS ((tree)); extern void c_objc_common_finish_file PARAMS ((void)); extern int defer_fn PARAMS ((tree)); #define c_build_type_variant(TYPE, CONST_P, VOLATILE_P) \ c_build_qualified_type ((TYPE), \ ((CONST_P) ? TYPE_QUAL_CONST : 0) | \ ((VOLATILE_P) ? TYPE_QUAL_VOLATILE : 0)) /* in c-typeck.c */ extern tree require_complete_type PARAMS ((tree)); extern int comptypes PARAMS ((tree, tree)); - extern tree c_sizeof_nowarn PARAMS ((tree)); extern tree c_size_in_bytes PARAMS ((tree)); extern tree build_component_ref PARAMS ((tree, tree)); extern tree build_indirect_ref PARAMS ((tree, const char *)); extern tree build_array_ref PARAMS ((tree, tree)); extern tree build_external_ref PARAMS ((tree, int)); extern tree parser_build_binary_op PARAMS ((enum tree_code, tree, tree)); extern void readonly_warning PARAMS ((tree, const char *)); extern tree build_conditional_expr PARAMS ((tree, tree, tree)); extern tree build_compound_expr PARAMS ((tree)); --- 248,275 ---- extern int c_missing_noreturn_ok_p PARAMS ((tree)); extern void c_objc_common_finish_file PARAMS ((void)); extern int defer_fn PARAMS ((tree)); + extern bool c_warn_unused_global_decl PARAMS ((tree)); #define c_build_type_variant(TYPE, CONST_P, VOLATILE_P) \ c_build_qualified_type ((TYPE), \ ((CONST_P) ? TYPE_QUAL_CONST : 0) | \ ((VOLATILE_P) ? TYPE_QUAL_VOLATILE : 0)) + #define c_sizeof_nowarn(T) c_sizeof_or_alignof_type (T, SIZEOF_EXPR, 0) /* in c-typeck.c */ extern tree require_complete_type PARAMS ((tree)); extern int comptypes PARAMS ((tree, tree)); extern tree c_size_in_bytes PARAMS ((tree)); + extern bool c_mark_addressable PARAMS ((tree)); + extern void c_incomplete_type_error PARAMS ((tree, tree)); + extern tree c_type_promotes_to PARAMS ((tree)); extern tree build_component_ref PARAMS ((tree, tree)); extern tree build_indirect_ref PARAMS ((tree, const char *)); extern tree build_array_ref PARAMS ((tree, tree)); extern tree build_external_ref PARAMS ((tree, int)); extern tree parser_build_binary_op PARAMS ((enum tree_code, tree, tree)); + extern int c_tree_expr_nonnegative_p PARAMS ((tree)); extern void readonly_warning PARAMS ((tree, const char *)); extern tree build_conditional_expr PARAMS ((tree, tree, tree)); extern tree build_compound_expr PARAMS ((tree)); *************** extern int current_function_returns_null *** 287,380 **** extern int current_function_returns_abnormally; - /* Nonzero means `$' can be in an identifier. */ - - extern int dollars_in_ident; - - /* Nonzero means allow type mismatches in conditional expressions; - just make their values `void'. */ - - extern int flag_cond_mismatch; - - /* Nonzero means don't recognize the keyword `asm'. */ - - extern int flag_no_asm; - - /* Nonzero means warn about implicit declarations. */ - - extern int warn_implicit; - - /* Nonzero means warn for all old-style non-prototype function decls. */ - - extern int warn_strict_prototypes; - - /* Nonzero means warn about multiple (redundant) decls for the same single - variable or function. */ - - extern int warn_redundant_decls; - - /* Nonzero means warn about extern declarations of objects not at - file-scope level and about *all* declarations of functions (whether - extern or static) not at file-scope level. Note that we exclude - implicit function declarations. To get warnings about those, use - -Wimplicit. */ - - extern int warn_nested_externs; - - /* Nonzero means warn about pointer casts that can drop a type qualifier - from the pointer target type. */ - - extern int warn_cast_qual; - - /* Nonzero means warn when casting a function call to a type that does - not match the return type (e.g. (float)sqrt() or (anything*)malloc() - when there is no previous declaration of sqrt or malloc. */ - - extern int warn_bad_function_cast; - - /* Warn about traditional constructs whose meanings changed in ANSI C. */ - - extern int warn_traditional; - - /* Warn about a subscript that has type char. */ - - extern int warn_char_subscripts; - - /* Warn if main is suspicious. */ - - extern int warn_main; - - /* Nonzero means to allow single precision math even if we're generally - being traditional. */ - extern int flag_allow_single_precision; - - /* Warn if initializer is not completely bracketed. */ - - extern int warn_missing_braces; - - /* Warn about comparison of signed and unsigned values. */ - - extern int warn_sign_compare; - - /* Warn about testing equality of floating point numbers. */ - - extern int warn_float_equal; - - /* Warn about multicharacter constants. */ - - extern int warn_multichar; - /* Nonzero means we are reading code that came from a system header file. */ extern int system_header_p; - /* Warn about implicit declarations. 1 = warning, 2 = error. */ - extern int mesg_implicit_function_declaration; - /* In c-decl.c */ ! extern void finish_incomplete_decl PARAMS ((tree)); ! extern tree static_ctors; ! extern tree static_dtors; #endif /* ! GCC_C_TREE_H */ --- 313,326 ---- extern int current_function_returns_abnormally; /* Nonzero means we are reading code that came from a system header file. */ extern int system_header_p; /* In c-decl.c */ ! extern void c_finish_incomplete_decl PARAMS ((tree)); ! extern GTY(()) tree static_ctors; ! extern GTY(()) tree static_dtors; #endif /* ! GCC_C_TREE_H */ diff -Nrc3pad gcc-3.2.3/gcc/c-typeck.c gcc-3.3/gcc/c-typeck.c *** gcc-3.2.3/gcc/c-typeck.c 2003-03-05 09:00:37.000000000 +0000 --- gcc-3.3/gcc/c-typeck.c 2003-04-18 06:50:45.000000000 +0000 *************** static int missing_braces_mentioned; *** 51,57 **** static int undeclared_variable_notice; static tree qualify_type PARAMS ((tree, tree)); ! static int comp_target_types PARAMS ((tree, tree)); static int function_types_compatible_p PARAMS ((tree, tree)); static int type_lists_compatible_p PARAMS ((tree, tree)); static tree decl_constant_value_for_broken_optimization PARAMS ((tree)); --- 51,57 ---- static int undeclared_variable_notice; static tree qualify_type PARAMS ((tree, tree)); ! static int comp_target_types PARAMS ((tree, tree, int)); static int function_types_compatible_p PARAMS ((tree, tree)); static int type_lists_compatible_p PARAMS ((tree, tree)); static tree decl_constant_value_for_broken_optimization PARAMS ((tree)); *************** static void push_array_bounds PARAMS (( *** 73,79 **** static int spelling_length PARAMS ((void)); static char *print_spelling PARAMS ((char *)); static void warning_init PARAMS ((const char *)); ! static tree digest_init PARAMS ((tree, tree, int, int)); static void output_init_element PARAMS ((tree, tree, tree, int)); static void output_pending_init_elements PARAMS ((int)); static int set_designator PARAMS ((int)); --- 73,79 ---- static int spelling_length PARAMS ((void)); static char *print_spelling PARAMS ((char *)); static void warning_init PARAMS ((const char *)); ! static tree digest_init PARAMS ((tree, tree, int)); static void output_init_element PARAMS ((tree, tree, tree, int)); static void output_pending_init_elements PARAMS ((int)); static int set_designator PARAMS ((int)); *************** require_complete_type (value) *** 99,105 **** if (COMPLETE_TYPE_P (type)) return value; ! incomplete_type_error (value, type); return error_mark_node; } --- 99,105 ---- if (COMPLETE_TYPE_P (type)) return value; ! c_incomplete_type_error (value, type); return error_mark_node; } *************** require_complete_type (value) *** 108,114 **** and TYPE is the type that was invalid. */ void ! incomplete_type_error (value, type) tree value; tree type; { --- 108,114 ---- and TYPE is the type that was invalid. */ void ! c_incomplete_type_error (value, type) tree value; tree type; { *************** incomplete_type_error (value, type) *** 173,178 **** --- 173,200 ---- } } + /* Given a type, apply default promotions wrt unnamed function + arguments and return the new type. */ + + tree + c_type_promotes_to (type) + tree type; + { + if (TYPE_MAIN_VARIANT (type) == float_type_node) + return double_type_node; + + if (c_promoting_integer_type_p (type)) + { + /* Preserve unsignedness if not really getting any wider. */ + if (TREE_UNSIGNED (type) + && (TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))) + return unsigned_type_node; + return integer_type_node; + } + + return type; + } + /* Return a variant of TYPE which has all the type qualifiers of LIKE as well as those of TYPE. */ *************** common_type (t1, t2) *** 216,224 **** /* Treat an enum type as the unsigned integer type of the same width. */ if (TREE_CODE (t1) == ENUMERAL_TYPE) ! t1 = type_for_size (TYPE_PRECISION (t1), 1); if (TREE_CODE (t2) == ENUMERAL_TYPE) ! t2 = type_for_size (TYPE_PRECISION (t2), 1); code1 = TREE_CODE (t1); code2 = TREE_CODE (t2); --- 238,246 ---- /* Treat an enum type as the unsigned integer type of the same width. */ if (TREE_CODE (t1) == ENUMERAL_TYPE) ! t1 = c_common_type_for_size (TYPE_PRECISION (t1), 1); if (TREE_CODE (t2) == ENUMERAL_TYPE) ! t2 = c_common_type_for_size (TYPE_PRECISION (t2), 1); code1 = TREE_CODE (t1); code2 = TREE_CODE (t2); *************** comptypes (type1, type2) *** 465,473 **** signedness. */ if (TREE_CODE (t1) == ENUMERAL_TYPE) ! t1 = type_for_size (TYPE_PRECISION (t1), TREE_UNSIGNED (t1)); if (TREE_CODE (t2) == ENUMERAL_TYPE) ! t2 = type_for_size (TYPE_PRECISION (t2), TREE_UNSIGNED (t2)); if (t1 == t2) return 1; --- 487,495 ---- signedness. */ if (TREE_CODE (t1) == ENUMERAL_TYPE) ! t1 = c_common_type_for_size (TYPE_PRECISION (t1), TREE_UNSIGNED (t1)); if (TREE_CODE (t2) == ENUMERAL_TYPE) ! t2 = c_common_type_for_size (TYPE_PRECISION (t2), TREE_UNSIGNED (t2)); if (t1 == t2) return 1; *************** comptypes (type1, type2) *** 546,552 **** } case RECORD_TYPE: ! if (maybe_objc_comptypes (t1, t2, 0) == 1) val = 1; break; --- 568,574 ---- } case RECORD_TYPE: ! if (flag_objc && objc_comptypes (t1, t2, 0) == 1) val = 1; break; *************** comptypes (type1, type2) *** 557,572 **** } /* Return 1 if TTL and TTR are pointers to types that are equivalent, ! ignoring their qualifiers. */ static int ! comp_target_types (ttl, ttr) tree ttl, ttr; { int val; ! /* Give maybe_objc_comptypes a crack at letting these types through. */ ! if ((val = maybe_objc_comptypes (ttl, ttr, 1)) >= 0) return val; val = comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (ttl)), --- 579,599 ---- } /* Return 1 if TTL and TTR are pointers to types that are equivalent, ! ignoring their qualifiers. REFLEXIVE is only used by ObjC - set it ! to 1 or 0 depending if the check of the pointer types is meant to ! be reflexive or not (typically, assignments are not reflexive, ! while comparisons are reflexive). ! */ static int ! comp_target_types (ttl, ttr, reflexive) tree ttl, ttr; + int reflexive; { int val; ! /* Give objc_comptypes a crack at letting these types through. */ ! if ((val = objc_comptypes (ttl, ttr, reflexive)) >= 0) return val; val = comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (ttl)), *************** type_lists_compatible_p (args1, args2) *** 658,669 **** So match anything that self-promotes. */ if (TREE_VALUE (args1) == 0) { ! if (simple_type_promotes_to (TREE_VALUE (args2)) != NULL_TREE) return 0; } else if (TREE_VALUE (args2) == 0) { ! if (simple_type_promotes_to (TREE_VALUE (args1)) != NULL_TREE) return 0; } else if (! (newval = comptypes (TYPE_MAIN_VARIANT (TREE_VALUE (args1)), --- 685,696 ---- So match anything that self-promotes. */ if (TREE_VALUE (args1) == 0) { ! if (c_type_promotes_to (TREE_VALUE (args2)) != TREE_VALUE (args2)) return 0; } else if (TREE_VALUE (args2) == 0) { ! if (c_type_promotes_to (TREE_VALUE (args1)) != TREE_VALUE (args1)) return 0; } else if (! (newval = comptypes (TYPE_MAIN_VARIANT (TREE_VALUE (args1)), *************** type_lists_compatible_p (args1, args2) *** 714,784 **** } } - /* Compute the value of the `sizeof' operator. */ - - tree - c_sizeof (type) - tree type; - { - enum tree_code code = TREE_CODE (type); - tree size; - - if (code == FUNCTION_TYPE) - { - if (pedantic || warn_pointer_arith) - pedwarn ("sizeof applied to a function type"); - size = size_one_node; - } - else if (code == VOID_TYPE) - { - if (pedantic || warn_pointer_arith) - pedwarn ("sizeof applied to a void type"); - size = size_one_node; - } - else if (code == ERROR_MARK) - size = size_one_node; - else if (!COMPLETE_TYPE_P (type)) - { - error ("sizeof applied to an incomplete type"); - size = size_zero_node; - } - else - /* Convert in case a char is more than one unit. */ - size = size_binop (CEIL_DIV_EXPR, TYPE_SIZE_UNIT (type), - size_int (TYPE_PRECISION (char_type_node) - / BITS_PER_UNIT)); - - /* SIZE will have an integer type with TYPE_IS_SIZETYPE set. - TYPE_IS_SIZETYPE means that certain things (like overflow) will - never happen. However, this node should really have type - `size_t', which is just a typedef for an ordinary integer type. */ - return fold (build1 (NOP_EXPR, size_type_node, size)); - } - - tree - c_sizeof_nowarn (type) - tree type; - { - enum tree_code code = TREE_CODE (type); - tree size; - - if (code == FUNCTION_TYPE || code == VOID_TYPE || code == ERROR_MARK) - size = size_one_node; - else if (!COMPLETE_TYPE_P (type)) - size = size_zero_node; - else - /* Convert in case a char is more than one unit. */ - size = size_binop (CEIL_DIV_EXPR, TYPE_SIZE_UNIT (type), - size_int (TYPE_PRECISION (char_type_node) - / BITS_PER_UNIT)); - - /* SIZE will have an integer type with TYPE_IS_SIZETYPE set. - TYPE_IS_SIZETYPE means that certain things (like overflow) will - never happen. However, this node should really have type - `size_t', which is just a typedef for an ordinary integer type. */ - return fold (build1 (NOP_EXPR, size_type_node, size)); - } - /* Compute the size to increment a pointer by. */ tree --- 741,746 ---- *************** default_function_array_conversion (exp) *** 932,938 **** is not the target type of the type of the ADDR_EXPR itself. Question is, can this lossage be avoided? */ adr = build1 (ADDR_EXPR, ptrtype, exp); ! if (mark_addressable (exp) == 0) return error_mark_node; TREE_CONSTANT (adr) = staticp (exp); TREE_SIDE_EFFECTS (adr) = 0; /* Default would be, same as EXP. */ --- 894,900 ---- is not the target type of the type of the ADDR_EXPR itself. Question is, can this lossage be avoided? */ adr = build1 (ADDR_EXPR, ptrtype, exp); ! if (!c_mark_addressable (exp)) return error_mark_node; TREE_CONSTANT (adr) = staticp (exp); TREE_SIDE_EFFECTS (adr) = 0; /* Default would be, same as EXP. */ *************** default_conversion (exp) *** 994,1005 **** but convert wide enums to something wider. */ if (code == ENUMERAL_TYPE) { ! type = type_for_size (MAX (TYPE_PRECISION (type), ! TYPE_PRECISION (integer_type_node)), ! ((flag_traditional ! || (TYPE_PRECISION (type) ! >= TYPE_PRECISION (integer_type_node))) ! && TREE_UNSIGNED (type))); return convert (type, exp); } --- 956,966 ---- but convert wide enums to something wider. */ if (code == ENUMERAL_TYPE) { ! type = c_common_type_for_size (MAX (TYPE_PRECISION (type), ! TYPE_PRECISION (integer_type_node)), ! ((TYPE_PRECISION (type) ! >= TYPE_PRECISION (integer_type_node)) ! && TREE_UNSIGNED (type))); return convert (type, exp); } *************** default_conversion (exp) *** 1010,1035 **** c_promoting_integer_type_p, otherwise leave it alone. */ && 0 > compare_tree_int (DECL_SIZE (TREE_OPERAND (exp, 1)), TYPE_PRECISION (integer_type_node))) ! return convert (flag_traditional && TREE_UNSIGNED (type) ! ? unsigned_type_node : integer_type_node, ! exp); if (c_promoting_integer_type_p (type)) { ! /* Traditionally, unsignedness is preserved in default promotions. ! Also preserve unsignedness if not really getting any wider. */ if (TREE_UNSIGNED (type) ! && (flag_traditional ! || TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))) return convert (unsigned_type_node, exp); return convert (integer_type_node, exp); } - if (flag_traditional && !flag_allow_single_precision - && TYPE_MAIN_VARIANT (type) == float_type_node) - return convert (double_type_node, exp); - if (code == VOID_TYPE) { error ("void value not ignored as it ought to be"); --- 971,988 ---- c_promoting_integer_type_p, otherwise leave it alone. */ && 0 > compare_tree_int (DECL_SIZE (TREE_OPERAND (exp, 1)), TYPE_PRECISION (integer_type_node))) ! return convert (integer_type_node, exp); if (c_promoting_integer_type_p (type)) { ! /* Preserve unsignedness if not really getting any wider. */ if (TREE_UNSIGNED (type) ! && TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node)) return convert (unsigned_type_node, exp); return convert (integer_type_node, exp); } if (code == VOID_TYPE) { error ("void value not ignored as it ought to be"); *************** build_component_ref (datum, component) *** 1172,1178 **** { if (!COMPLETE_TYPE_P (type)) { ! incomplete_type_error (NULL_TREE, type); return error_mark_node; } --- 1125,1131 ---- { if (!COMPLETE_TYPE_P (type)) { ! c_incomplete_type_error (NULL_TREE, type); return error_mark_node; } *************** build_component_ref (datum, component) *** 1191,1197 **** end does it - by giving the anonymous entities each a separate name and type, and then have build_component_ref recursively call itself. We can't do that here. */ ! for (; field; field = TREE_CHAIN (field)) { tree subdatum = TREE_VALUE (field); --- 1144,1150 ---- end does it - by giving the anonymous entities each a separate name and type, and then have build_component_ref recursively call itself. We can't do that here. */ ! do { tree subdatum = TREE_VALUE (field); *************** build_component_ref (datum, component) *** 1208,1214 **** --- 1161,1170 ---- warn_deprecated_use (subdatum); datum = ref; + + field = TREE_CHAIN (field); } + while (field); return ref; } *************** build_array_ref (array, index) *** 1326,1332 **** || (COMPLETE_TYPE_P (TREE_TYPE (TREE_TYPE (array))) && TREE_CODE (TYPE_SIZE (TREE_TYPE (TREE_TYPE (array)))) != INTEGER_CST)) { ! if (mark_addressable (array) == 0) return error_mark_node; } /* An array that is indexed by a constant value which is not within --- 1282,1288 ---- || (COMPLETE_TYPE_P (TREE_TYPE (TREE_TYPE (array))) && TREE_CODE (TYPE_SIZE (TREE_TYPE (TREE_TYPE (array)))) != INTEGER_CST)) { ! if (!c_mark_addressable (array)) return error_mark_node; } /* An array that is indexed by a constant value which is not within *************** build_array_ref (array, index) *** 1337,1343 **** && TYPE_VALUES (TREE_TYPE (array)) && ! int_fits_type_p (index, TYPE_VALUES (TREE_TYPE (array)))) { ! if (mark_addressable (array) == 0) return error_mark_node; } --- 1293,1299 ---- && TYPE_VALUES (TREE_TYPE (array)) && ! int_fits_type_p (index, TYPE_VALUES (TREE_TYPE (array)))) { ! if (!c_mark_addressable (array)) return error_mark_node; } *************** build_array_ref (array, index) *** 1349,1355 **** if (TREE_CODE (foo) == VAR_DECL && DECL_REGISTER (foo)) pedwarn ("ISO C forbids subscripting `register' array"); else if (! flag_isoc99 && ! lvalue_p (foo)) ! pedwarn ("ISO C89 forbids subscripting non-lvalue array"); } type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (array))); --- 1305,1311 ---- if (TREE_CODE (foo) == VAR_DECL && DECL_REGISTER (foo)) pedwarn ("ISO C forbids subscripting `register' array"); else if (! flag_isoc99 && ! lvalue_p (foo)) ! pedwarn ("ISO C90 forbids subscripting non-lvalue array"); } type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (array))); *************** build_external_ref (id, fun) *** 1502,1507 **** --- 1458,1474 ---- ref = DECL_INITIAL (ref); TREE_CONSTANT (ref) = 1; } + else if (current_function_decl != 0 + && DECL_CONTEXT (current_function_decl) != 0 + && (TREE_CODE (ref) == VAR_DECL + || TREE_CODE (ref) == PARM_DECL + || TREE_CODE (ref) == FUNCTION_DECL)) + { + tree context = decl_function_context (ref); + + if (context != 0 && context != current_function_decl) + DECL_NONLOCAL (ref) = 1; + } return ref; } *************** build_function_call (function, params) *** 1564,1573 **** coerced_params = convert_arguments (TYPE_ARG_TYPES (fntype), params, name, fundecl); ! /* Check for errors in format strings. */ ! if (warn_format) ! check_function_format (NULL, TYPE_ATTRIBUTES (fntype), coerced_params); /* Recognize certain built-in functions so we can make tree-codes other than CALL_EXPR. We do this when it enables fold-const.c --- 1531,1539 ---- coerced_params = convert_arguments (TYPE_ARG_TYPES (fntype), params, name, fundecl); ! /* Check that the arguments to the function are valid. */ ! check_function_arguments (TYPE_ATTRIBUTES (fntype), coerced_params); /* Recognize certain built-in functions so we can make tree-codes other than CALL_EXPR. We do this when it enables fold-const.c *************** build_binary_op (code, orig_op0, orig_op *** 2011,2017 **** /* Subtraction of two similar pointers. We must subtract them as integers, then divide by object size. */ if (code0 == POINTER_TYPE && code1 == POINTER_TYPE ! && comp_target_types (type0, type1)) return pointer_diff (op0, op1); /* Handle pointer minus int. Just like pointer plus int. */ else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) --- 1977,1983 ---- /* Subtraction of two similar pointers. We must subtract them as integers, then divide by object size. */ if (code0 == POINTER_TYPE && code1 == POINTER_TYPE ! && comp_target_types (type0, type1, 1)) return pointer_diff (op0, op1); /* Handle pointer minus int. Just like pointer plus int. */ else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) *************** build_binary_op (code, orig_op0, orig_op *** 2035,2043 **** warning ("division by zero"); if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE ! || code0 == COMPLEX_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE ! || code1 == COMPLEX_TYPE)) { if (!(code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)) resultcode = RDIV_EXPR; --- 2001,2009 ---- warning ("division by zero"); if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE ! || code0 == COMPLEX_TYPE || code0 == VECTOR_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE ! || code1 == COMPLEX_TYPE || code1 == VECTOR_TYPE)) { if (!(code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)) resultcode = RDIV_EXPR; *************** build_binary_op (code, orig_op0, orig_op *** 2060,2065 **** --- 2026,2033 ---- case BIT_XOR_EXPR: if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE) shorten = -1; + else if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE) + common = 1; break; case TRUNC_MOD_EXPR: *************** build_binary_op (code, orig_op0, orig_op *** 2094,2101 **** but that does not mean the operands should be converted to ints! */ result_type = integer_type_node; ! op0 = truthvalue_conversion (op0); ! op1 = truthvalue_conversion (op1); converted = 1; } break; --- 2062,2069 ---- but that does not mean the operands should be converted to ints! */ result_type = integer_type_node; ! op0 = c_common_truthvalue_conversion (op0); ! op1 = c_common_truthvalue_conversion (op1); converted = 1; } break; *************** build_binary_op (code, orig_op0, orig_op *** 2121,2138 **** } } ! /* Use the type of the value to be shifted. ! This is what most traditional C compilers do. */ result_type = type0; ! /* Unless traditional, convert the shift-count to an integer, ! regardless of size of value being shifted. */ ! if (! flag_traditional) ! { ! if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node) ! op1 = convert (integer_type_node, op1); ! /* Avoid converting op1 to result_type later. */ ! converted = 1; ! } } break; --- 2089,2102 ---- } } ! /* Use the type of the value to be shifted. */ result_type = type0; ! /* Convert the shift-count to an integer, regardless of size ! of value being shifted. */ ! if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node) ! op1 = convert (integer_type_node, op1); ! /* Avoid converting op1 to result_type later. */ ! converted = 1; } break; *************** build_binary_op (code, orig_op0, orig_op *** 2148,2165 **** warning ("left shift count >= width of type"); } ! /* Use the type of the value to be shifted. ! This is what most traditional C compilers do. */ result_type = type0; ! /* Unless traditional, convert the shift-count to an integer, ! regardless of size of value being shifted. */ ! if (! flag_traditional) ! { ! if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node) ! op1 = convert (integer_type_node, op1); ! /* Avoid converting op1 to result_type later. */ ! converted = 1; ! } } break; --- 2112,2125 ---- warning ("left shift count >= width of type"); } ! /* Use the type of the value to be shifted. */ result_type = type0; ! /* Convert the shift-count to an integer, regardless of size ! of value being shifted. */ ! if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node) ! op1 = convert (integer_type_node, op1); ! /* Avoid converting op1 to result_type later. */ ! converted = 1; } break; *************** build_binary_op (code, orig_op0, orig_op *** 2175,2192 **** warning ("shift count >= width of type"); } ! /* Use the type of the value to be shifted. ! This is what most traditional C compilers do. */ result_type = type0; ! /* Unless traditional, convert the shift-count to an integer, ! regardless of size of value being shifted. */ ! if (! flag_traditional) ! { ! if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node) ! op1 = convert (integer_type_node, op1); ! /* Avoid converting op1 to result_type later. */ ! converted = 1; ! } } break; --- 2135,2148 ---- warning ("shift count >= width of type"); } ! /* Use the type of the value to be shifted. */ result_type = type0; ! /* Convert the shift-count to an integer, regardless of size ! of value being shifted. */ ! if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node) ! op1 = convert (integer_type_node, op1); ! /* Avoid converting op1 to result_type later. */ ! converted = 1; } break; *************** build_binary_op (code, orig_op0, orig_op *** 2198,2206 **** but don't convert the args to int! */ build_type = integer_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE ! || code0 == COMPLEX_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE ! || code1 == COMPLEX_TYPE)) short_compare = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { --- 2154,2164 ---- but don't convert the args to int! */ build_type = integer_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE ! || code0 == COMPLEX_TYPE ! || code0 == VECTOR_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE ! || code1 == COMPLEX_TYPE ! || code1 == VECTOR_TYPE)) short_compare = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { *************** build_binary_op (code, orig_op0, orig_op *** 2209,2215 **** /* Anything compares with void *. void * compares with anything. Otherwise, the targets must be compatible and both must be object or both incomplete. */ ! if (comp_target_types (type0, type1)) result_type = common_type (type0, type1); else if (VOID_TYPE_P (tt0)) { --- 2167,2173 ---- /* Anything compares with void *. void * compares with anything. Otherwise, the targets must be compatible and both must be object or both incomplete. */ ! if (comp_target_types (type0, type1, 1)) result_type = common_type (type0, type1); else if (VOID_TYPE_P (tt0)) { *************** build_binary_op (code, orig_op0, orig_op *** 2240,2253 **** else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; ! if (! flag_traditional) ! pedwarn ("comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { result_type = type1; ! if (! flag_traditional) ! pedwarn ("comparison between pointer and integer"); } break; --- 2198,2209 ---- else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; ! pedwarn ("comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { result_type = type1; ! pedwarn ("comparison between pointer and integer"); } break; *************** build_binary_op (code, orig_op0, orig_op *** 2258,2264 **** shorten = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1)) { result_type = common_type (type0, type1); if (pedantic --- 2214,2220 ---- shorten = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1, 1)) { result_type = common_type (type0, type1); if (pedantic *************** build_binary_op (code, orig_op0, orig_op *** 2283,2289 **** short_compare = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1)) { result_type = common_type (type0, type1); if (!COMPLETE_TYPE_P (TREE_TYPE (type0)) --- 2239,2245 ---- short_compare = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1, 1)) { result_type = common_type (type0, type1); if (!COMPLETE_TYPE_P (TREE_TYPE (type0)) *************** build_binary_op (code, orig_op0, orig_op *** 2316,2329 **** else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; ! if (! flag_traditional) ! pedwarn ("comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { result_type = type1; ! if (! flag_traditional) ! pedwarn ("comparison between pointer and integer"); } break; --- 2272,2283 ---- else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; ! pedwarn ("comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { result_type = type1; ! pedwarn ("comparison between pointer and integer"); } break; *************** build_binary_op (code, orig_op0, orig_op *** 2347,2355 **** break; } ! if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE) && ! (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE)) { int none_complex = (code0 != COMPLEX_TYPE && code1 != COMPLEX_TYPE); --- 2301,2311 ---- break; } ! if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE ! || code0 == VECTOR_TYPE) && ! (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE ! || code1 == VECTOR_TYPE)) { int none_complex = (code0 != COMPLEX_TYPE && code1 != COMPLEX_TYPE); *************** build_binary_op (code, orig_op0, orig_op *** 2411,2432 **** && unsigned0 == unsigned1 && (unsigned0 || !uns)) result_type ! = signed_or_unsigned_type (unsigned0, ! common_type (TREE_TYPE (arg0), TREE_TYPE (arg1))); else if (TREE_CODE (arg0) == INTEGER_CST && (unsigned1 || !uns) && (TYPE_PRECISION (TREE_TYPE (arg1)) < TYPE_PRECISION (result_type)) ! && (type = signed_or_unsigned_type (unsigned1, ! TREE_TYPE (arg1)), int_fits_type_p (arg0, type))) result_type = type; else if (TREE_CODE (arg1) == INTEGER_CST && (unsigned0 || !uns) && (TYPE_PRECISION (TREE_TYPE (arg0)) < TYPE_PRECISION (result_type)) ! && (type = signed_or_unsigned_type (unsigned0, ! TREE_TYPE (arg0)), int_fits_type_p (arg1, type))) result_type = type; } --- 2367,2390 ---- && unsigned0 == unsigned1 && (unsigned0 || !uns)) result_type ! = c_common_signed_or_unsigned_type ! (unsigned0, common_type (TREE_TYPE (arg0), TREE_TYPE (arg1))); else if (TREE_CODE (arg0) == INTEGER_CST && (unsigned1 || !uns) && (TYPE_PRECISION (TREE_TYPE (arg1)) < TYPE_PRECISION (result_type)) ! && (type ! = c_common_signed_or_unsigned_type (unsigned1, ! TREE_TYPE (arg1)), int_fits_type_p (arg0, type))) result_type = type; else if (TREE_CODE (arg1) == INTEGER_CST && (unsigned0 || !uns) && (TYPE_PRECISION (TREE_TYPE (arg0)) < TYPE_PRECISION (result_type)) ! && (type ! = c_common_signed_or_unsigned_type (unsigned0, ! TREE_TYPE (arg0)), int_fits_type_p (arg1, type))) result_type = type; } *************** build_binary_op (code, orig_op0, orig_op *** 2452,2458 **** { /* Do an unsigned shift if the operand was zero-extended. */ result_type ! = signed_or_unsigned_type (unsigned_arg, TREE_TYPE (arg0)); /* Convert value-to-be-shifted to that type. */ if (TREE_TYPE (op0) != result_type) op0 = convert (result_type, op0); --- 2410,2417 ---- { /* Do an unsigned shift if the operand was zero-extended. */ result_type ! = c_common_signed_or_unsigned_type (unsigned_arg, ! TREE_TYPE (arg0)); /* Convert value-to-be-shifted to that type. */ if (TREE_TYPE (op0) != result_type) op0 = convert (result_type, op0); *************** build_binary_op (code, orig_op0, orig_op *** 2523,2544 **** constant expression involving such literals or a conditional expression involving such literals) and it is non-negative. */ ! if (tree_expr_nonnegative_p (sop)) /* OK */; /* Do not warn if the comparison is an equality operation, the unsigned quantity is an integral constant, and it would fit in the result if the result were signed. */ else if (TREE_CODE (uop) == INTEGER_CST && (resultcode == EQ_EXPR || resultcode == NE_EXPR) ! && int_fits_type_p (uop, signed_type (result_type))) /* OK */; /* Do not warn if the unsigned quantity is an enumeration constant and its maximum value would fit in the result if the result were signed. */ else if (TREE_CODE (uop) == INTEGER_CST && TREE_CODE (TREE_TYPE (uop)) == ENUMERAL_TYPE ! && int_fits_type_p (TYPE_MAX_VALUE (TREE_TYPE(uop)), ! signed_type (result_type))) /* OK */; else warning ("comparison between signed and unsigned"); --- 2482,2505 ---- constant expression involving such literals or a conditional expression involving such literals) and it is non-negative. */ ! if (c_tree_expr_nonnegative_p (sop)) /* OK */; /* Do not warn if the comparison is an equality operation, the unsigned quantity is an integral constant, and it would fit in the result if the result were signed. */ else if (TREE_CODE (uop) == INTEGER_CST && (resultcode == EQ_EXPR || resultcode == NE_EXPR) ! && int_fits_type_p ! (uop, c_common_signed_type (result_type))) /* OK */; /* Do not warn if the unsigned quantity is an enumeration constant and its maximum value would fit in the result if the result were signed. */ else if (TREE_CODE (uop) == INTEGER_CST && TREE_CODE (TREE_TYPE (uop)) == ENUMERAL_TYPE ! && int_fits_type_p ! (TYPE_MAX_VALUE (TREE_TYPE(uop)), ! c_common_signed_type (result_type))) /* OK */; else warning ("comparison between signed and unsigned"); *************** build_binary_op (code, orig_op0, orig_op *** 2637,2642 **** --- 2598,2624 ---- } } + + /* Return true if `t' is known to be non-negative. */ + + int + c_tree_expr_nonnegative_p (t) + tree t; + { + if (TREE_CODE (t) == STMT_EXPR) + { + t=COMPOUND_BODY (STMT_EXPR_STMT (t)); + + /* Find the last statement in the chain, ignoring the final + * scope statement */ + while (TREE_CHAIN (t) != NULL_TREE + && TREE_CODE (TREE_CHAIN (t)) != SCOPE_STMT) + t=TREE_CHAIN (t); + return tree_expr_nonnegative_p (TREE_OPERAND (t, 0)); + } + return tree_expr_nonnegative_p (t); + } + /* Return a tree for the difference of pointers OP0 and OP1. The resulting tree has type int. */ *************** build_unary_op (code, xarg, flag) *** 2758,2768 **** } else if (!noconvert) arg = default_conversion (arg); break; case NEGATE_EXPR: if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE ! || typecode == COMPLEX_TYPE)) { error ("wrong type argument to unary minus"); return error_mark_node; --- 2740,2752 ---- } else if (!noconvert) arg = default_conversion (arg); + arg = non_lvalue (arg); break; case NEGATE_EXPR: if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE ! || typecode == COMPLEX_TYPE ! || typecode == VECTOR_TYPE)) { error ("wrong type argument to unary minus"); return error_mark_node; *************** build_unary_op (code, xarg, flag) *** 2772,2778 **** break; case BIT_NOT_EXPR: ! if (typecode == COMPLEX_TYPE) { code = CONJ_EXPR; if (pedantic) --- 2756,2767 ---- break; case BIT_NOT_EXPR: ! if (typecode == INTEGER_TYPE || typecode == VECTOR_TYPE) ! { ! if (!noconvert) ! arg = default_conversion (arg); ! } ! else if (typecode == COMPLEX_TYPE) { code = CONJ_EXPR; if (pedantic) *************** build_unary_op (code, xarg, flag) *** 2780,2792 **** if (!noconvert) arg = default_conversion (arg); } ! else if (typecode != INTEGER_TYPE) { error ("wrong type argument to bit-complement"); return error_mark_node; } - else if (!noconvert) - arg = default_conversion (arg); break; case ABS_EXPR: --- 2769,2779 ---- if (!noconvert) arg = default_conversion (arg); } ! else { error ("wrong type argument to bit-complement"); return error_mark_node; } break; case ABS_EXPR: *************** build_unary_op (code, xarg, flag) *** 2822,2828 **** error ("wrong type argument to unary exclamation mark"); return error_mark_node; } ! arg = truthvalue_conversion (arg); return invert_truthvalue (arg); case NOP_EXPR: --- 2809,2815 ---- error ("wrong type argument to unary exclamation mark"); return error_mark_node; } ! arg = c_common_truthvalue_conversion (arg); return invert_truthvalue (arg); case NOP_EXPR: *************** build_unary_op (code, xarg, flag) *** 2888,2893 **** --- 2875,2883 ---- tree inc; tree result_type = TREE_TYPE (arg); + arg = get_unwidened (arg, 0); + argtype = TREE_TYPE (arg); + /* Compute the increment. */ if (typecode == POINTER_TYPE) *************** build_unary_op (code, xarg, flag) *** 2916,2924 **** else inc = integer_one_node; - arg = get_unwidened (arg, 0); - argtype = TREE_TYPE (arg); - inc = convert (argtype, inc); /* Handle incrementing a cast-expression. */ --- 2906,2911 ---- *************** build_unary_op (code, xarg, flag) *** 3012,3018 **** /* For &x[y], return x+y */ if (TREE_CODE (arg) == ARRAY_REF) { ! if (mark_addressable (TREE_OPERAND (arg, 0)) == 0) return error_mark_node; return build_binary_op (PLUS_EXPR, TREE_OPERAND (arg, 0), TREE_OPERAND (arg, 1), 1); --- 2999,3005 ---- /* For &x[y], return x+y */ if (TREE_CODE (arg) == ARRAY_REF) { ! if (!c_mark_addressable (TREE_OPERAND (arg, 0))) return error_mark_node; return build_binary_op (PLUS_EXPR, TREE_OPERAND (arg, 0), TREE_OPERAND (arg, 1), 1); *************** build_unary_op (code, xarg, flag) *** 3067,3073 **** argtype = build_pointer_type (argtype); ! if (mark_addressable (arg) == 0) return error_mark_node; { --- 3054,3060 ---- argtype = build_pointer_type (argtype); ! if (!c_mark_addressable (arg)) return error_mark_node; { *************** readonly_warning (arg, msgid) *** 3286,3298 **** /* Mark EXP saying that we need to be able to take the address of it; it should not be allocated in a register. ! Value is 1 if successful. */ ! int ! mark_addressable (exp) tree exp; { tree x = exp; while (1) switch (TREE_CODE (x)) { --- 3273,3286 ---- /* Mark EXP saying that we need to be able to take the address of it; it should not be allocated in a register. ! Returns true if successful. */ ! bool ! c_mark_addressable (exp) tree exp; { tree x = exp; + while (1) switch (TREE_CODE (x)) { *************** mark_addressable (exp) *** 3301,3307 **** { error ("cannot take address of bit-field `%s'", IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (x, 1)))); ! return 0; } /* ... fall through ... */ --- 3289,3295 ---- { error ("cannot take address of bit-field `%s'", IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (x, 1)))); ! return false; } /* ... fall through ... */ *************** mark_addressable (exp) *** 3316,3322 **** case COMPOUND_LITERAL_EXPR: case CONSTRUCTOR: TREE_ADDRESSABLE (x) = 1; ! return 1; case VAR_DECL: case CONST_DECL: --- 3304,3310 ---- case COMPOUND_LITERAL_EXPR: case CONSTRUCTOR: TREE_ADDRESSABLE (x) = 1; ! return true; case VAR_DECL: case CONST_DECL: *************** mark_addressable (exp) *** 3329,3335 **** { error ("global register variable `%s' used in nested function", IDENTIFIER_POINTER (DECL_NAME (x))); ! return 0; } pedwarn ("register variable `%s' used in nested function", IDENTIFIER_POINTER (DECL_NAME (x))); --- 3317,3323 ---- { error ("global register variable `%s' used in nested function", IDENTIFIER_POINTER (DECL_NAME (x))); ! return false; } pedwarn ("register variable `%s' used in nested function", IDENTIFIER_POINTER (DECL_NAME (x))); *************** mark_addressable (exp) *** 3340,3346 **** { error ("address of global register variable `%s' requested", IDENTIFIER_POINTER (DECL_NAME (x))); ! return 0; } /* If we are making this addressable due to its having --- 3328,3334 ---- { error ("address of global register variable `%s' requested", IDENTIFIER_POINTER (DECL_NAME (x))); ! return false; } /* If we are making this addressable due to its having *************** mark_addressable (exp) *** 3351,3363 **** else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x))) { error ("cannot put object with volatile field into register"); ! return 0; } pedwarn ("address of register variable `%s' requested", IDENTIFIER_POINTER (DECL_NAME (x))); } ! put_var_into_stack (x); /* drops in */ case FUNCTION_DECL: --- 3339,3351 ---- else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x))) { error ("cannot put object with volatile field into register"); ! return false; } pedwarn ("address of register variable `%s' requested", IDENTIFIER_POINTER (DECL_NAME (x))); } ! put_var_into_stack (x, /*rescan=*/true); /* drops in */ case FUNCTION_DECL: *************** mark_addressable (exp) *** 3368,3374 **** #endif default: ! return 1; } } --- 3356,3362 ---- #endif default: ! return true; } } *************** build_conditional_expr (ifexp, op1, op2) *** 3385,3391 **** tree result_type = NULL; tree orig_op1 = op1, orig_op2 = op2; ! ifexp = truthvalue_conversion (default_conversion (ifexp)); #if 0 /* Produces wrong result if within sizeof. */ /* Don't promote the operands separately if they promote --- 3373,3379 ---- tree result_type = NULL; tree orig_op1 = op1, orig_op2 = op2; ! ifexp = c_common_truthvalue_conversion (default_conversion (ifexp)); #if 0 /* Produces wrong result if within sizeof. */ /* Don't promote the operands separately if they promote *************** build_conditional_expr (ifexp, op1, op2) *** 3458,3465 **** /* Do not warn if the signed quantity is an unsuffixed integer literal (or some static constant expression involving such literals) and it is non-negative. */ ! else if ((unsigned_op2 && tree_expr_nonnegative_p (op1)) ! || (unsigned_op1 && tree_expr_nonnegative_p (op2))) /* OK */; else warning ("signed and unsigned type in conditional expression"); --- 3446,3453 ---- /* Do not warn if the signed quantity is an unsuffixed integer literal (or some static constant expression involving such literals) and it is non-negative. */ ! else if ((unsigned_op2 && c_tree_expr_nonnegative_p (op1)) ! || (unsigned_op1 && c_tree_expr_nonnegative_p (op2))) /* OK */; else warning ("signed and unsigned type in conditional expression"); *************** build_conditional_expr (ifexp, op1, op2) *** 3474,3480 **** } else if (code1 == POINTER_TYPE && code2 == POINTER_TYPE) { ! if (comp_target_types (type1, type2)) result_type = common_type (type1, type2); else if (integer_zerop (op1) && TREE_TYPE (type1) == void_type_node && TREE_CODE (orig_op1) != NOP_EXPR) --- 3462,3468 ---- } else if (code1 == POINTER_TYPE && code2 == POINTER_TYPE) { ! if (comp_target_types (type1, type2, 1)) result_type = common_type (type1, type2); else if (integer_zerop (op1) && TREE_TYPE (type1) == void_type_node && TREE_CODE (orig_op1) != NOP_EXPR) *************** build_c_cast (type, expr) *** 3629,3635 **** if (type == error_mark_node || expr == error_mark_node) return error_mark_node; ! type = TYPE_MAIN_VARIANT (type); #if 0 /* Strip NON_LVALUE_EXPRs since we aren't using as an lvalue. */ --- 3617,3628 ---- if (type == error_mark_node || expr == error_mark_node) return error_mark_node; ! ! /* The ObjC front-end uses TYPE_MAIN_VARIANT to tie together types differing ! only in qualifications. But when constructing cast expressions, ! the protocols do matter and must be kept around. */ ! if (!flag_objc || !objc_is_id (type)) ! type = TYPE_MAIN_VARIANT (type); #if 0 /* Strip NON_LVALUE_EXPRs since we aren't using as an lvalue. */ *************** build_c_cast (type, expr) *** 3685,3692 **** else name = ""; t = digest_init (type, build (CONSTRUCTOR, type, NULL_TREE, ! build_tree_list (field, value)), ! 0, 0); TREE_CONSTANT (t) = TREE_CONSTANT (value); return t; } --- 3678,3684 ---- else name = ""; t = digest_init (type, build (CONSTRUCTOR, type, NULL_TREE, ! build_tree_list (field, value)), 0); TREE_CONSTANT (t) = TREE_CONSTANT (value); return t; } *************** build_c_cast (type, expr) *** 3781,3786 **** --- 3773,3795 ---- && !TREE_CONSTANT (value)) warning ("cast to pointer from integer of different size"); + if (TREE_CODE (type) == POINTER_TYPE + && TREE_CODE (otype) == POINTER_TYPE + && TREE_CODE (expr) == ADDR_EXPR + && DECL_P (TREE_OPERAND (expr, 0)) + && flag_strict_aliasing && warn_strict_aliasing + && !VOID_TYPE_P (TREE_TYPE (type))) + { + /* Casting the address of a decl to non void pointer. Warn + if the cast breaks type based aliasing. */ + if (!COMPLETE_TYPE_P (TREE_TYPE (type))) + warning ("type-punning to incomplete type might break strict-aliasing rules"); + else if (!alias_sets_conflict_p + (get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0))), + get_alias_set (TREE_TYPE (type)))) + warning ("dereferencing type-punned pointer will break strict-aliasing rules"); + } + ovalue = value; value = convert (type, value); *************** convert_for_assignment (type, rhs, errty *** 4037,4045 **** if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (rhstype)) { overflow_warning (rhs); ! /* Check for Objective-C protocols. This will issue a warning if ! there are protocol violations. No need to use the return value. */ ! maybe_objc_comptypes (type, rhstype, 0); return rhs; } --- 4046,4056 ---- if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (rhstype)) { overflow_warning (rhs); ! /* Check for Objective-C protocols. This will automatically ! issue a warning if there are protocol violations. No need to ! use the return value. */ ! if (flag_objc) ! objc_comptypes (type, rhstype, 0); return rhs; } *************** convert_for_assignment (type, rhs, errty *** 4054,4060 **** if (codel == REFERENCE_TYPE && comptypes (TREE_TYPE (type), TREE_TYPE (rhs)) == 1) { ! if (mark_addressable (rhs) == 0) return error_mark_node; rhs = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (rhs)), rhs); --- 4065,4076 ---- if (codel == REFERENCE_TYPE && comptypes (TREE_TYPE (type), TREE_TYPE (rhs)) == 1) { ! if (!lvalue_p (rhs)) ! { ! error ("cannot pass rvalue to reference parameter"); ! return error_mark_node; ! } ! if (!c_mark_addressable (rhs)) return error_mark_node; rhs = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (rhs)), rhs); *************** convert_for_assignment (type, rhs, errty *** 4073,4079 **** else if ((codel == INTEGER_TYPE || codel == REAL_TYPE || codel == ENUMERAL_TYPE || codel == COMPLEX_TYPE || codel == BOOLEAN_TYPE) ! && (coder == INTEGER_TYPE || coder == REAL_TYPE || coder == ENUMERAL_TYPE || coder == COMPLEX_TYPE || coder == BOOLEAN_TYPE)) return convert_and_check (type, rhs); --- 4089,4095 ---- else if ((codel == INTEGER_TYPE || codel == REAL_TYPE || codel == ENUMERAL_TYPE || codel == COMPLEX_TYPE || codel == BOOLEAN_TYPE) ! && (coder == INTEGER_TYPE || coder == REAL_TYPE || coder == ENUMERAL_TYPE || coder == COMPLEX_TYPE || coder == BOOLEAN_TYPE)) return convert_and_check (type, rhs); *************** convert_for_assignment (type, rhs, errty *** 4107,4113 **** Meanwhile, the lhs target must have all the qualifiers of the rhs. */ if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) ! || comp_target_types (memb_type, rhstype)) { /* If this type won't generate any warnings, use it. */ if (TYPE_QUALS (ttl) == TYPE_QUALS (ttr) --- 4123,4129 ---- Meanwhile, the lhs target must have all the qualifiers of the rhs. */ if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) ! || comp_target_types (memb_type, rhstype, 0)) { /* If this type won't generate any warnings, use it. */ if (TYPE_QUALS (ttl) == TYPE_QUALS (ttr) *************** convert_for_assignment (type, rhs, errty *** 4173,4179 **** /* Conversions among pointers */ else if ((codel == POINTER_TYPE || codel == REFERENCE_TYPE) ! && (coder == POINTER_TYPE || coder == REFERENCE_TYPE)) { tree ttl = TREE_TYPE (type); tree ttr = TREE_TYPE (rhstype); --- 4189,4195 ---- /* Conversions among pointers */ else if ((codel == POINTER_TYPE || codel == REFERENCE_TYPE) ! && (coder == codel)) { tree ttl = TREE_TYPE (type); tree ttr = TREE_TYPE (rhstype); *************** convert_for_assignment (type, rhs, errty *** 4182,4190 **** and vice versa; otherwise, targets must be the same. Meanwhile, the lhs target must have all the qualifiers of the rhs. */ if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) ! || comp_target_types (type, rhstype) ! || (unsigned_type (TYPE_MAIN_VARIANT (ttl)) ! == unsigned_type (TYPE_MAIN_VARIANT (ttr)))) { if (pedantic && ((VOID_TYPE_P (ttl) && TREE_CODE (ttr) == FUNCTION_TYPE) --- 4198,4206 ---- and vice versa; otherwise, targets must be the same. Meanwhile, the lhs target must have all the qualifiers of the rhs. */ if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) ! || comp_target_types (type, rhstype, 0) ! || (c_common_unsigned_type (TYPE_MAIN_VARIANT (ttl)) ! == c_common_unsigned_type (TYPE_MAIN_VARIANT (ttr)))) { if (pedantic && ((VOID_TYPE_P (ttl) && TREE_CODE (ttr) == FUNCTION_TYPE) *************** convert_for_assignment (type, rhs, errty *** 4207,4213 **** /* If this is not a case of ignoring a mismatch in signedness, no warning. */ else if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) ! || comp_target_types (type, rhstype)) ; /* If there is a mismatch, do warn. */ else if (pedantic) --- 4223,4229 ---- /* If this is not a case of ignoring a mismatch in signedness, no warning. */ else if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) ! || comp_target_types (type, rhstype, 0)) ; /* If there is a mismatch, do warn. */ else if (pedantic) *************** convert_for_assignment (type, rhs, errty *** 4262,4268 **** { if (funname) { ! tree selector = maybe_building_objc_message_expr (); if (selector && parmnum > 2) error ("incompatible type for argument %d of `%s'", --- 4278,4284 ---- { if (funname) { ! tree selector = objc_message_selector (); if (selector && parmnum > 2) error ("incompatible type for argument %d of `%s'", *************** c_convert_parm_for_inlining (parm, value *** 4307,4313 **** /* Print a warning using MSGID. It gets OPNAME as its one parameter. ! If OPNAME is null, it is replaced by "passing arg ARGNUM of `FUNCTION'". FUNCTION and ARGNUM are handled specially if we are building an Objective-C selector. */ --- 4323,4330 ---- /* Print a warning using MSGID. It gets OPNAME as its one parameter. ! if OPNAME is null and ARGNUM is 0, it is replaced by "passing arg of `FUNCTION'". ! Otherwise if OPNAME is null, it is replaced by "passing arg ARGNUM of `FUNCTION'". FUNCTION and ARGNUM are handled specially if we are building an Objective-C selector. */ *************** warn_for_assignment (msgid, opname, func *** 4320,4326 **** { if (opname == 0) { ! tree selector = maybe_building_objc_message_expr (); char * new_opname; if (selector && argnum > 2) --- 4337,4343 ---- { if (opname == 0) { ! tree selector = objc_message_selector (); char * new_opname; if (selector && argnum > 2) *************** warn_for_assignment (msgid, opname, func *** 4328,4334 **** function = selector; argnum -= 2; } ! if (function) { /* Function name is known; supply it. */ const char *const argstring = _("passing arg %d of `%s'"); --- 4345,4371 ---- function = selector; argnum -= 2; } ! if (argnum == 0) ! { ! if (function) ! { ! /* Function name is known; supply it. */ ! const char *const argstring = _("passing arg of `%s'"); ! new_opname = (char *) alloca (IDENTIFIER_LENGTH (function) ! + strlen (argstring) + 1 ! + 1); ! sprintf (new_opname, argstring, ! IDENTIFIER_POINTER (function)); ! } ! else ! { ! /* Function name unknown (call through ptr). */ ! const char *const argnofun = _("passing arg of pointer to function"); ! new_opname = (char *) alloca (strlen (argnofun) + 1 + 1); ! sprintf (new_opname, argnofun); ! } ! } ! else if (function) { /* Function name is known; supply it. */ const char *const argstring = _("passing arg %d of `%s'"); *************** store_init_value (decl, init) *** 4395,4402 **** /* Digest the specified initializer into an expression. */ ! value = digest_init (type, init, TREE_STATIC (decl), ! TREE_STATIC (decl) || (pedantic && !flag_isoc99)); /* Store the expression if valid; else report error. */ --- 4432,4438 ---- /* Digest the specified initializer into an expression. */ ! value = digest_init (type, init, TREE_STATIC (decl)); /* Store the expression if valid; else report error. */ *************** static int spelling_size; /* Size of th *** 4496,4510 **** #define SPELLING_DEPTH() (spelling - spelling_base) #define RESTORE_SPELLING_DEPTH(DEPTH) (spelling = spelling_base + (DEPTH)) - /* Save and restore the spelling stack around arbitrary C code. */ - - #define SAVE_SPELLING_DEPTH(code) \ - { \ - int __depth = SPELLING_DEPTH (); \ - code; \ - RESTORE_SPELLING_DEPTH (__depth); \ - } - /* Push an element on the spelling stack with type KIND and assign VALUE to MEMBER. */ --- 4532,4537 ---- *************** warning_init (msgid) *** 4657,4670 **** /* Digest the parser output INIT as an initializer for type TYPE. Return a C expression of type TYPE to represent the initial value. ! The arguments REQUIRE_CONSTANT and CONSTRUCTOR_CONSTANT request errors ! if non-constant initializers or elements are seen. CONSTRUCTOR_CONSTANT ! applies only to elements of constructors. */ static tree ! digest_init (type, init, require_constant, constructor_constant) tree type, init; ! int require_constant, constructor_constant; { enum tree_code code = TREE_CODE (type); tree inside_init = init; --- 4684,4696 ---- /* Digest the parser output INIT as an initializer for type TYPE. Return a C expression of type TYPE to represent the initial value. ! REQUIRE_CONSTANT requests an error if non-constant initializers or ! elements are seen. */ static tree ! digest_init (type, init, require_constant) tree type, init; ! int require_constant; { enum tree_code code = TREE_CODE (type); tree inside_init = init; *************** digest_init (type, init, require_constan *** 4843,4886 **** return error_mark_node; } - /* Traditionally, you can write struct foo x = 0; - and it initializes the first element of x to 0. */ - if (flag_traditional) - { - tree top = 0, prev = 0, otype = type; - while (TREE_CODE (type) == RECORD_TYPE - || TREE_CODE (type) == ARRAY_TYPE - || TREE_CODE (type) == QUAL_UNION_TYPE - || TREE_CODE (type) == UNION_TYPE) - { - tree temp = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE); - if (prev == 0) - top = temp; - else - TREE_OPERAND (prev, 1) = build_tree_list (NULL_TREE, temp); - prev = temp; - if (TREE_CODE (type) == ARRAY_TYPE) - type = TREE_TYPE (type); - else if (TYPE_FIELDS (type)) - type = TREE_TYPE (TYPE_FIELDS (type)); - else - { - error_init ("invalid initializer"); - return error_mark_node; - } - } - - if (otype != type) - { - TREE_OPERAND (prev, 1) - = build_tree_list (NULL_TREE, - digest_init (type, init, require_constant, - constructor_constant)); - return top; - } - else - return error_mark_node; - } error_init ("invalid initializer"); return error_mark_node; } --- 4869,4874 ---- *************** really_start_incremental_init (type) *** 5240,5246 **** constructor_max_index = build_int_2 (-1, -1); /* constructor_max_index needs to be an INTEGER_CST. Attempts ! to initialize VLAs will cause an proper error; avoid tree checking errors as well by setting a safe value. */ if (constructor_max_index && TREE_CODE (constructor_max_index) != INTEGER_CST) --- 5228,5234 ---- constructor_max_index = build_int_2 (-1, -1); /* constructor_max_index needs to be an INTEGER_CST. Attempts ! to initialize VLAs will cause a proper error; avoid tree checking errors as well by setting a safe value. */ if (constructor_max_index && TREE_CODE (constructor_max_index) != INTEGER_CST) *************** really_start_incremental_init (type) *** 5260,5266 **** /* Vectors are like simple fixed-size arrays. */ constructor_max_index = build_int_2 (TYPE_VECTOR_SUBPARTS (constructor_type) - 1, 0); ! constructor_index = convert (bitsizetype, integer_zero_node); constructor_unfilled_index = constructor_index; } else --- 5248,5254 ---- /* Vectors are like simple fixed-size arrays. */ constructor_max_index = build_int_2 (TYPE_VECTOR_SUBPARTS (constructor_type) - 1, 0); ! constructor_index = convert (bitsizetype, bitsize_zero_node); constructor_unfilled_index = constructor_index; } else *************** push_init_level (implicit) *** 5431,5437 **** constructor_max_index = build_int_2 (-1, -1); /* constructor_max_index needs to be an INTEGER_CST. Attempts ! to initialize VLAs will cause an proper error; avoid tree checking errors as well by setting a safe value. */ if (constructor_max_index && TREE_CODE (constructor_max_index) != INTEGER_CST) --- 5419,5425 ---- constructor_max_index = build_int_2 (-1, -1); /* constructor_max_index needs to be an INTEGER_CST. Attempts ! to initialize VLAs will cause a proper error; avoid tree checking errors as well by setting a safe value. */ if (constructor_max_index && TREE_CODE (constructor_max_index) != INTEGER_CST) *************** pop_init_level (implicit) *** 5620,5626 **** } /* Common handling for both array range and field name designators. ! ARRAY argument is non-zero for array ranges. Returns zero for success. */ static int set_designator (array) --- 5608,5614 ---- } /* Common handling for both array range and field name designators. ! ARRAY argument is nonzero for array ranges. Returns zero for success. */ static int set_designator (array) *************** output_init_element (value, type, field, *** 6278,6285 **** || TREE_CHAIN (field))))) return; ! value = digest_init (type, value, require_constant_value, ! require_constant_elements); if (value == error_mark_node) { constructor_erroneous = 1; --- 6266,6272 ---- || TREE_CHAIN (field))))) return; ! value = digest_init (type, value, require_constant_value); if (value == error_mark_node) { constructor_erroneous = 1; *************** simple_asm_stmt (expr) *** 6890,6901 **** { tree stmt; - if (TREE_CHAIN (expr)) - expr = combine_strings (expr); - /* Simple asm statements are treated as volatile. */ stmt = add_stmt (build_stmt (ASM_STMT, ridpointers[(int) RID_VOLATILE], ! expr, NULL_TREE, NULL_TREE, NULL_TREE)); ASM_INPUT_P (stmt) = 1; return stmt; } --- 6877,6885 ---- { tree stmt; /* Simple asm statements are treated as volatile. */ stmt = add_stmt (build_stmt (ASM_STMT, ridpointers[(int) RID_VOLATILE], ! expr, NULL_TREE, NULL_TREE, NULL_TREE)); ASM_INPUT_P (stmt) = 1; return stmt; } *************** build_asm_stmt (cv_qualifier, string, ou *** 6917,6924 **** { tree tail; - if (TREE_CHAIN (string)) - string = combine_strings (string); if (TREE_CODE (string) != STRING_CST) { error ("asm template is not a string constant"); --- 6901,6906 ---- *************** c_expand_asm_operands (string, outputs, *** 6995,7001 **** /* Record the contents of OUTPUTS before it is modified. */ for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++) ! o[i] = TREE_VALUE (tail); /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of OUTPUTS some trees for where the values were actually stored. */ --- 6977,6987 ---- /* Record the contents of OUTPUTS before it is modified. */ for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++) ! { ! o[i] = TREE_VALUE (tail); ! if (o[i] == error_mark_node) ! return; ! } /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of OUTPUTS some trees for where the values were actually stored. */ diff -Nrc3pad gcc-3.2.3/gcc/.cvsignore gcc-3.3/gcc/.cvsignore *** gcc-3.2.3/gcc/.cvsignore 2001-08-15 04:52:54.000000000 +0000 --- gcc-3.3/gcc/.cvsignore 2002-06-10 02:36:06.000000000 +0000 *************** *** 1,13 **** - genrtl - genrtl.h - genrtl.c c-parse.y c-parse.h c-parse.c tradcif.c - gcc.info* - cpp.info* - c-tree.info* - cppinternals.info* cscope.files cscope.out --- 1,11 ---- c-parse.y c-parse.h c-parse.c tradcif.c cscope.files cscope.out + cscope.in.out + cscope.po.out + gengtype-lex.c + gengtype-yacc.c + gengtype-yacc.h diff -Nrc3pad gcc-3.2.3/gcc/dbxout.c gcc-3.3/gcc/dbxout.c *** gcc-3.2.3/gcc/dbxout.c 2003-01-17 16:49:26.000000000 +0000 --- gcc-3.3/gcc/dbxout.c 2002-12-13 01:24:52.000000000 +0000 *************** *** 1,6 **** /* Output dbx-format symbol table information from GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GCC. --- 1,6 ---- /* Output dbx-format symbol table information from GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. *************** static int source_label_number = 1; *** 155,161 **** #endif #ifdef DEBUG_SYMS_TEXT ! #define FORCE_TEXT text_section (); #else #define FORCE_TEXT #endif --- 155,161 ---- #endif #ifdef DEBUG_SYMS_TEXT ! #define FORCE_TEXT function_section (current_function_decl); #else #define FORCE_TEXT #endif *************** static void print_int_cst_octal PARAMS *** 309,314 **** --- 309,315 ---- static void print_octal PARAMS ((unsigned HOST_WIDE_INT, int)); static void print_wide_int PARAMS ((HOST_WIDE_INT)); static void dbxout_type_name PARAMS ((tree)); + static void dbxout_class_name_qualifiers PARAMS ((tree)); static int dbxout_symbol_location PARAMS ((tree, tree, const char *, rtx)); static void dbxout_symbol_name PARAMS ((tree, const char *, int)); static void dbxout_prepare_symbol PARAMS ((tree)); *************** static void dbxout_begin_block PARAMS ( *** 327,333 **** static void dbxout_end_block PARAMS ((unsigned, unsigned)); static void dbxout_function_decl PARAMS ((tree)); ! struct gcc_debug_hooks dbx_debug_hooks = { dbxout_init, dbxout_finish, --- 328,334 ---- static void dbxout_end_block PARAMS ((unsigned, unsigned)); static void dbxout_function_decl PARAMS ((tree)); ! const struct gcc_debug_hooks dbx_debug_hooks = { dbxout_init, dbxout_finish, *************** struct gcc_debug_hooks dbx_debug_hooks = *** 340,347 **** debug_true_tree, /* ignore_block */ dbxout_source_line, /* source_line */ dbxout_source_line, /* begin_prologue: just output line info */ ! debug_nothing_int, /* end_prologue */ ! debug_nothing_void, /* end_epilogue */ #ifdef DBX_FUNCTION_FIRST dbxout_begin_function, #else --- 341,348 ---- debug_true_tree, /* ignore_block */ dbxout_source_line, /* source_line */ dbxout_source_line, /* begin_prologue: just output line info */ ! debug_nothing_int_charstar, /* end_prologue */ ! debug_nothing_int_charstar, /* end_epilogue */ #ifdef DBX_FUNCTION_FIRST dbxout_begin_function, #else *************** struct gcc_debug_hooks dbx_debug_hooks = *** 357,363 **** #endif /* DBX_DEBUGGING_INFO */ #if defined (XCOFF_DEBUGGING_INFO) ! struct gcc_debug_hooks xcoff_debug_hooks = { dbxout_init, dbxout_finish, --- 358,364 ---- #endif /* DBX_DEBUGGING_INFO */ #if defined (XCOFF_DEBUGGING_INFO) ! const struct gcc_debug_hooks xcoff_debug_hooks = { dbxout_init, dbxout_finish, *************** struct gcc_debug_hooks xcoff_debug_hooks *** 370,376 **** debug_true_tree, /* ignore_block */ xcoffout_source_line, xcoffout_begin_prologue, /* begin_prologue */ ! debug_nothing_int, /* end_prologue */ xcoffout_end_epilogue, debug_nothing_tree, /* begin_function */ xcoffout_end_function, --- 371,377 ---- debug_true_tree, /* ignore_block */ xcoffout_source_line, xcoffout_begin_prologue, /* begin_prologue */ ! debug_nothing_int_charstar, /* end_prologue */ xcoffout_end_epilogue, debug_nothing_tree, /* begin_function */ xcoffout_end_function, *************** dbxout_init (input_file_name) *** 417,423 **** const char *input_file_name; { char ltext_label_name[100]; ! tree syms = getdecls (); asmfile = asm_out_file; --- 418,424 ---- const char *input_file_name; { char ltext_label_name[100]; ! tree syms = (*lang_hooks.decls.getdecls) (); asmfile = asm_out_file; *************** dbxout_global_decl (decl) *** 674,680 **** && ! DECL_EXTERNAL (decl) && DECL_RTL_SET_P (decl)) /* Not necessary? */ dbxout_symbol (decl, 0); ! } /* At the end of compilation, finish writing the symbol table. Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is --- 675,681 ---- && ! DECL_EXTERNAL (decl) && DECL_RTL_SET_P (decl)) /* Not necessary? */ dbxout_symbol (decl, 0); ! } /* At the end of compilation, finish writing the symbol table. Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is *************** dbxout_type_methods (type) *** 1019,1025 **** } if (!need_prefix) { ! putc (';', asmfile); CHARS (1); } } --- 1020,1026 ---- } if (!need_prefix) { ! putc (';', asmfile); CHARS (1); } } *************** dbxout_type (type, full) *** 1107,1113 **** static int anonymous_type_number = 0; if (TREE_CODE (type) == VECTOR_TYPE) ! type = TYPE_DEBUG_REPRESENTATION_TYPE (type); /* If there was an input error and we don't really have a type, avoid crashing and write something that is at least valid --- 1108,1116 ---- static int anonymous_type_number = 0; if (TREE_CODE (type) == VECTOR_TYPE) ! /* The frontend feeds us a representation for the vector as a struct ! containing an array. Pull out the array type. */ ! type = TREE_TYPE (TYPE_FIELDS (TYPE_DEBUG_REPRESENTATION_TYPE (type))); /* If there was an input error and we don't really have a type, avoid crashing and write something that is at least valid *************** dbxout_type (type, full) *** 1279,1285 **** write it as a subtype. */ else if (TREE_TYPE (type) != 0 && TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE) ! { /* If the size is non-standard, say what it is if we can use GDB extensions. */ --- 1282,1288 ---- write it as a subtype. */ else if (TREE_TYPE (type) != 0 && TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE) ! { /* If the size is non-standard, say what it is if we can use GDB extensions. */ *************** dbxout_type (type, full) *** 1292,1301 **** } dbxout_range_type (type); ! } else ! { /* If the size is non-standard, say what it is if we can use GDB extensions. */ --- 1295,1304 ---- } dbxout_range_type (type); ! } else ! { /* If the size is non-standard, say what it is if we can use GDB extensions. */ *************** dbxout_type (type, full) *** 1319,1325 **** larger. This is because we print the bounds as signed decimal, and hence they can't span same size unsigned types. */ ! if (use_gnu_debug_info_extensions && TYPE_MIN_VALUE (type) != 0 && TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST && TYPE_MAX_VALUE (type) != 0 --- 1322,1328 ---- larger. This is because we print the bounds as signed decimal, and hence they can't span same size unsigned types. */ ! if (use_gnu_debug_info_extensions && TYPE_MIN_VALUE (type) != 0 && TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST && TYPE_MAX_VALUE (type) != 0 *************** dbxout_type (type, full) *** 1348,1354 **** else /* Output other integer types as subranges of `int'. */ dbxout_range_type (type); ! } break; --- 1351,1357 ---- else /* Output other integer types as subranges of `int'. */ dbxout_range_type (type); ! } break; *************** print_wide_int (c) *** 1861,1867 **** CHARS (digs); } ! /* Output the name of type TYPE, with no punctuation. Such names can be set up either by typedef declarations or by struct, enum and union tags. */ --- 1864,1870 ---- CHARS (digs); } ! /* Output the name of type TYPE, with no punctuation. Such names can be set up either by typedef declarations or by struct, enum and union tags. */ *************** dbxout_type_name (type) *** 1887,1892 **** --- 1890,1922 ---- fprintf (asmfile, "%s", IDENTIFIER_POINTER (t)); CHARS (IDENTIFIER_LENGTH (t)); } + + /* Output leading leading struct or class names needed for qualifying + type whose scope is limited to a struct or class. */ + + static void + dbxout_class_name_qualifiers (decl) + tree decl; + { + tree context = decl_type_context (decl); + + if (context != NULL_TREE + && TREE_CODE(context) == RECORD_TYPE + && TYPE_NAME (context) != 0 + && (TREE_CODE (TYPE_NAME (context)) == IDENTIFIER_NODE + || (DECL_NAME (TYPE_NAME (context)) != 0))) + { + tree name = TYPE_NAME (context); + + if (TREE_CODE (name) == TYPE_DECL) + { + dbxout_class_name_qualifiers (name); + name = DECL_NAME (name); + } + fprintf (asmfile, "%s::", IDENTIFIER_POINTER (name)); + CHARS (IDENTIFIER_LENGTH (name) + 2); + } + } /* Output a .stabs for the symbol defined by DECL, which must be a ..._DECL node in the normal namespace. *************** dbxout_symbol (decl, local) *** 2007,2013 **** && !TREE_ASM_WRITTEN (TYPE_NAME (type)) /* Distinguish the implicit typedefs of C++ from explicit ones that might be found in C. */ ! && DECL_ARTIFICIAL (decl) /* Do not generate a tag for records of variable size, since this type can not be properly described in the DBX format, and it confuses some tools such as objdump. */ --- 2037,2043 ---- && !TREE_ASM_WRITTEN (TYPE_NAME (type)) /* Distinguish the implicit typedefs of C++ from explicit ones that might be found in C. */ ! && DECL_ARTIFICIAL (decl) /* Do not generate a tag for records of variable size, since this type can not be properly described in the DBX format, and it confuses some tools such as objdump. */ *************** dbxout_symbol (decl, local) *** 2028,2036 **** dbxout_finish_symbol (NULL_TREE); } /* Output typedef name. */ ! fprintf (asmfile, "%s\"%s:", ASM_STABS_OP, ! IDENTIFIER_POINTER (DECL_NAME (decl))); /* Short cut way to output a tag also. */ if ((TREE_CODE (type) == RECORD_TYPE --- 2058,2074 ---- dbxout_finish_symbol (NULL_TREE); } + /* Output .stabs (or whatever) and leading double quote. */ + fprintf (asmfile, "%s\"", ASM_STABS_OP); + + if (use_gnu_debug_info_extensions) + { + /* Output leading class/struct qualifiers. */ + dbxout_class_name_qualifiers (decl); + } + /* Output typedef name. */ ! fprintf (asmfile, "%s:", IDENTIFIER_POINTER (DECL_NAME (decl))); /* Short cut way to output a tag also. */ if ((TREE_CODE (type) == RECORD_TYPE *************** dbxout_symbol (decl, local) *** 2039,2045 **** && TYPE_NAME (type) == decl /* Distinguish the implicit typedefs of C++ from explicit ones that might be found in C. */ ! && DECL_ARTIFICIAL (decl)) { if (use_gnu_debug_info_extensions && have_used_extensions) { --- 2077,2083 ---- && TYPE_NAME (type) == decl /* Distinguish the implicit typedefs of C++ from explicit ones that might be found in C. */ ! && DECL_ARTIFICIAL (decl)) { if (use_gnu_debug_info_extensions && have_used_extensions) { *************** dbxout_symbol (decl, local) *** 2172,2178 **** result = dbxout_symbol_location (decl, type, 0, DECL_RTL (decl)); break; ! default: break; } --- 2210,2216 ---- result = dbxout_symbol_location (decl, type, 0, DECL_RTL (decl)); break; ! default: break; } *************** dbxout_symbol_location (decl, type, suff *** 2196,2202 **** /* Don't mention a variable at all if it was completely optimized into nothingness. ! If the decl was from an inline function, then its rtl is not identically the rtl that was used in this particular compilation. */ --- 2234,2240 ---- /* Don't mention a variable at all if it was completely optimized into nothingness. ! If the decl was from an inline function, then its rtl is not identically the rtl that was used in this particular compilation. */ *************** dbxout_symbol_location (decl, type, suff *** 2275,2281 **** || GET_CODE (tmp) == LABEL_REF) current_sym_addr = tmp; } ! /* Ultrix `as' seems to need this. */ #ifdef DBX_STATIC_STAB_DATA_SECTION data_section (); --- 2313,2319 ---- || GET_CODE (tmp) == LABEL_REF) current_sym_addr = tmp; } ! /* Ultrix `as' seems to need this. */ #ifdef DBX_STATIC_STAB_DATA_SECTION data_section (); *************** dbxout_finish_symbol (sym) *** 2480,2486 **** #endif } ! /* Output definitions of all the decls in a chain. Return non-zero if anything was output */ int --- 2518,2524 ---- #endif } ! /* Output definitions of all the decls in a chain. Return nonzero if anything was output */ int *************** dbxout_parms (parms) *** 2564,2570 **** } /* It is quite tempting to use: ! dbxout_type (TREE_TYPE (parms), 0); as the next statement, rather than using DECL_ARG_TYPE(), so --- 2602,2608 ---- } /* It is quite tempting to use: ! dbxout_type (TREE_TYPE (parms), 0); as the next statement, rather than using DECL_ARG_TYPE(), so *************** dbxout_parms (parms) *** 2577,2583 **** double on the stack, but if we emit a stab saying the type is a float, then gdb will only read in a single value, and this will produce an erroneous value. */ ! dbxout_type (DECL_ARG_TYPE (parms), 0); current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr); dbxout_finish_symbol (parms); } --- 2615,2621 ---- double on the stack, but if we emit a stab saying the type is a float, then gdb will only read in a single value, and this will produce an erroneous value. */ ! dbxout_type (DECL_ARG_TYPE (parms), 0); current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr); dbxout_finish_symbol (parms); } *************** dbxout_parms (parms) *** 2695,2707 **** const char *const decl_name = (DECL_NAME (parms) ? IDENTIFIER_POINTER (DECL_NAME (parms)) : "(anon)"); ! if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG) ! current_sym_value = 0; else current_sym_value = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1)); current_sym_addr = 0; ! FORCE_TEXT; fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name); --- 2733,2746 ---- const char *const decl_name = (DECL_NAME (parms) ? IDENTIFIER_POINTER (DECL_NAME (parms)) : "(anon)"); ! if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG) ! current_sym_value = 0; else current_sym_value = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1)); current_sym_addr = 0; ! current_sym_code = N_PSYM; ! FORCE_TEXT; fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name); *************** dbxout_parms (parms) *** 2739,2745 **** && TYPE_MODE (TREE_TYPE (parms)) != GET_MODE (DECL_RTL (parms)) && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))) < UNITS_PER_WORD) { ! current_sym_value += GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))) - GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))); } --- 2778,2784 ---- && TYPE_MODE (TREE_TYPE (parms)) != GET_MODE (DECL_RTL (parms)) && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))) < UNITS_PER_WORD) { ! current_sym_value += GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))) - GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))); } *************** dbxout_block (block, depth, args) *** 2849,2855 **** int blocknum = -1; #if DBX_BLOCKS_FUNCTION_RELATIVE ! const char *begin_label; if (current_function_func_begin_label != NULL_TREE) begin_label = IDENTIFIER_POINTER (current_function_func_begin_label); else --- 2888,2894 ---- int blocknum = -1; #if DBX_BLOCKS_FUNCTION_RELATIVE ! const char *begin_label; if (current_function_func_begin_label != NULL_TREE) begin_label = IDENTIFIER_POINTER (current_function_func_begin_label); else diff -Nrc3pad gcc-3.2.3/gcc/debug.c gcc-3.3/gcc/debug.c *** gcc-3.2.3/gcc/debug.c 2002-01-08 09:54:39.000000000 +0000 --- gcc-3.3/gcc/debug.c 2002-08-15 19:59:28.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 20,26 **** #include "debug.h" /* The do-nothing debug hooks. */ ! struct gcc_debug_hooks do_nothing_debug_hooks = { debug_nothing_charstar, debug_nothing_charstar, --- 20,26 ---- #include "debug.h" /* The do-nothing debug hooks. */ ! const struct gcc_debug_hooks do_nothing_debug_hooks = { debug_nothing_charstar, debug_nothing_charstar, *************** struct gcc_debug_hooks do_nothing_debug_ *** 33,40 **** debug_true_tree, /* ignore_block */ debug_nothing_int_charstar, /* source_line */ debug_nothing_int_charstar, /* begin_prologue */ ! debug_nothing_int, /* end_prologue */ ! debug_nothing_void, /* end_epilogue */ debug_nothing_tree, /* begin_function */ debug_nothing_int, /* end_function */ debug_nothing_tree, /* function_decl */ --- 33,40 ---- debug_true_tree, /* ignore_block */ debug_nothing_int_charstar, /* source_line */ debug_nothing_int_charstar, /* begin_prologue */ ! debug_nothing_int_charstar, /* end_prologue */ ! debug_nothing_int_charstar, /* end_epilogue */ debug_nothing_tree, /* begin_function */ debug_nothing_int, /* end_function */ debug_nothing_tree, /* function_decl */ diff -Nrc3pad gcc-3.2.3/gcc/debug.h gcc-3.3/gcc/debug.h *** gcc-3.2.3/gcc/debug.h 2002-01-08 09:54:39.000000000 +0000 --- gcc-3.3/gcc/debug.h 2002-09-14 15:51:42.000000000 +0000 *************** Foundation, 59 Temple Place - Suite 330, *** 23,29 **** toplev.c according to command line options. */ struct gcc_debug_hooks { ! /* Initialise debug output. MAIN_FILENAME is the name of the main input file. */ void (* init) PARAMS ((const char *main_filename)); --- 23,29 ---- toplev.c according to command line options. */ struct gcc_debug_hooks { ! /* Initialize debug output. MAIN_FILENAME is the name of the main input file. */ void (* init) PARAMS ((const char *main_filename)); *************** struct gcc_debug_hooks *** 68,77 **** /* Called at end of prologue code. LINE is the first line in the function. */ ! void (* end_prologue) PARAMS ((unsigned int line)); /* Record end of epilogue code. */ ! void (* end_epilogue) PARAMS ((void)); /* Called at start of function DECL, before it is declared. */ void (* begin_function) PARAMS ((tree decl)); --- 68,77 ---- /* Called at end of prologue code. LINE is the first line in the function. */ ! void (* end_prologue) PARAMS ((unsigned int line, const char *file)); /* Record end of epilogue code. */ ! void (* end_epilogue) PARAMS ((unsigned int line, const char *file)); /* Called at start of function DECL, before it is declared. */ void (* begin_function) PARAMS ((tree decl)); *************** struct gcc_debug_hooks *** 103,109 **** void (* label) PARAMS ((rtx)); }; ! extern struct gcc_debug_hooks *debug_hooks; /* The do-nothing hooks. */ extern void debug_nothing_void --- 103,109 ---- void (* label) PARAMS ((rtx)); }; ! extern const struct gcc_debug_hooks *debug_hooks; /* The do-nothing hooks. */ extern void debug_nothing_void *************** extern void debug_nothing_rtx *** 124,151 **** PARAMS ((rtx)); /* Hooks for various debug formats. */ ! extern struct gcc_debug_hooks do_nothing_debug_hooks; ! extern struct gcc_debug_hooks dbx_debug_hooks; ! extern struct gcc_debug_hooks sdb_debug_hooks; ! extern struct gcc_debug_hooks xcoff_debug_hooks; ! extern struct gcc_debug_hooks dwarf_debug_hooks; ! extern struct gcc_debug_hooks dwarf2_debug_hooks; ! extern struct gcc_debug_hooks vmsdbg_debug_hooks; /* Dwarf2 frame information. */ extern void dwarf2out_begin_prologue PARAMS ((unsigned int, const char *)); ! extern void dwarf2out_end_epilogue PARAMS ((void)); extern void dwarf2out_frame_init PARAMS ((void)); extern void dwarf2out_frame_finish PARAMS ((void)); /* Decide whether we want to emit frame unwind information for the current translation unit. */ extern int dwarf2out_do_frame PARAMS ((void)); - /* When writing VMS debug info, output label after the prologue of the - function. */ - extern void vmsdbgout_after_prologue PARAMS ((void)); - - - #endif /* !GCC_DEBUG_H */ --- 124,145 ---- PARAMS ((rtx)); /* Hooks for various debug formats. */ ! extern const struct gcc_debug_hooks do_nothing_debug_hooks; ! extern const struct gcc_debug_hooks dbx_debug_hooks; ! extern const struct gcc_debug_hooks sdb_debug_hooks; ! extern const struct gcc_debug_hooks xcoff_debug_hooks; ! extern const struct gcc_debug_hooks dwarf_debug_hooks; ! extern const struct gcc_debug_hooks dwarf2_debug_hooks; ! extern const struct gcc_debug_hooks vmsdbg_debug_hooks; /* Dwarf2 frame information. */ extern void dwarf2out_begin_prologue PARAMS ((unsigned int, const char *)); ! extern void dwarf2out_end_epilogue PARAMS ((unsigned int, const char *)); extern void dwarf2out_frame_init PARAMS ((void)); extern void dwarf2out_frame_finish PARAMS ((void)); /* Decide whether we want to emit frame unwind information for the current translation unit. */ extern int dwarf2out_do_frame PARAMS ((void)); #endif /* !GCC_DEBUG_H */ diff -Nrc3pad gcc-3.2.3/gcc/defaults.h gcc-3.3/gcc/defaults.h *** gcc-3.2.3/gcc/defaults.h 2002-06-07 17:11:34.000000000 +0000 --- gcc-3.3/gcc/defaults.h 2002-12-09 17:54:03.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 23,28 **** --- 23,35 ---- #ifndef GCC_DEFAULTS_H #define GCC_DEFAULTS_H + #ifndef GET_ENVIRONMENT + #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0) + #endif + + #define obstack_chunk_alloc xmalloc + #define obstack_chunk_free free + /* Define default standard character escape sequences. */ #ifndef TARGET_BELL # define TARGET_BELL 007 *************** Software Foundation, 59 Temple Place - S *** 35,40 **** --- 42,59 ---- # define TARGET_ESC 033 #endif + /* When removal of CPP_PREDEFINES is complete, TARGET_CPU_CPP_BULITINS + can also be removed from here. */ + #ifndef TARGET_OS_CPP_BUILTINS + # define TARGET_OS_CPP_BUILTINS() + #endif + #ifndef TARGET_CPU_CPP_BUILTINS + # define TARGET_CPU_CPP_BUILTINS() + #endif + #ifndef CPP_PREDEFINES + # define CPP_PREDEFINES "" + #endif + /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable or function named NAME. LABELNO is an integer which is different for each call. */ *************** do { fputs (integer_asm_op (POINTER_SIZE *** 68,79 **** } while (0) #endif - /* Provide default for ASM_OUTPUT_ALTERNATE_LABEL_NAME. */ - #ifndef ASM_OUTPUT_ALTERNATE_LABEL_NAME - #define ASM_OUTPUT_ALTERNATE_LABEL_NAME(FILE,INSN) \ - do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) - #endif - /* choose a reasonable default for ASM_OUTPUT_ASCII. */ #ifndef ASM_OUTPUT_ASCII --- 87,92 ---- *************** do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNA *** 127,132 **** --- 140,153 ---- #endif #endif + /* This is how to output the definition of a user-level label named + NAME, such as the label on a static function or variable NAME. */ + + #ifndef ASM_OUTPUT_LABEL + #define ASM_OUTPUT_LABEL(FILE,NAME) \ + do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0) + #endif + /* This is how to output a reference to a user-level label named NAME. */ #ifndef ASM_OUTPUT_LABELREF *************** do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNA *** 156,161 **** --- 177,227 ---- #endif #endif + /* How to emit a .type directive. */ + #ifndef ASM_OUTPUT_TYPE_DIRECTIVE + #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT + #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \ + do \ + { \ + fputs (TYPE_ASM_OP, STREAM); \ + assemble_name (STREAM, NAME); \ + fputs (", ", STREAM); \ + fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \ + putc ('\n', STREAM); \ + } \ + while (0) + #endif + #endif + + /* How to emit a .size directive. */ + #ifndef ASM_OUTPUT_SIZE_DIRECTIVE + #ifdef SIZE_ASM_OP + #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \ + do \ + { \ + HOST_WIDE_INT size_ = (SIZE); \ + fputs (SIZE_ASM_OP, STREAM); \ + assemble_name (STREAM, NAME); \ + fputs (", ", STREAM); \ + fprintf (STREAM, HOST_WIDE_INT_PRINT_DEC, size_); \ + putc ('\n', STREAM); \ + } \ + while (0) + + #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \ + do \ + { \ + fputs (SIZE_ASM_OP, STREAM); \ + assemble_name (STREAM, NAME); \ + fputs (", .-", STREAM); \ + assemble_name (STREAM, NAME); \ + putc ('\n', STREAM); \ + } \ + while (0) + + #endif + #endif + /* This determines whether or not we support weak symbols. */ #ifndef SUPPORTS_WEAK #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL) *************** do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNA *** 174,179 **** --- 240,250 ---- #endif #endif + /* By default, there is no prefix on user-defined symbols. */ + #ifndef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + #endif + /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to provide a weak attribute. Else define it to nothing. *************** do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNA *** 211,217 **** /* If we have named sections, and we're using crtstuff to run ctors, use them for registering eh frame information. */ ! #if defined (TARGET_ASM_NAMED_SECTION) && !defined(EH_FRAME_IN_DATA_SECTION) #ifndef EH_FRAME_SECTION_NAME #define EH_FRAME_SECTION_NAME ".eh_frame" #endif --- 282,289 ---- /* If we have named sections, and we're using crtstuff to run ctors, use them for registering eh frame information. */ ! #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \ ! && !defined(EH_FRAME_IN_DATA_SECTION) #ifndef EH_FRAME_SECTION_NAME #define EH_FRAME_SECTION_NAME ".eh_frame" #endif *************** do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNA *** 226,253 **** #endif #endif - /* If we have no definition for UNIQUE_SECTION, but do have the - ability to generate arbitrary sections, construct something - reasonable. */ - #ifndef UNIQUE_SECTION - #define UNIQUE_SECTION(DECL,RELOC) \ - do { \ - int len; \ - const char *name; \ - char *string; \ - \ - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ - /* Strip off any encoding in name. */ \ - STRIP_NAME_ENCODING (name, name); \ - \ - len = strlen (name) + 1; \ - string = alloca (len + 1); \ - sprintf (string, ".%s", name); \ - \ - DECL_SECTION_NAME (DECL) = build_string (len, string); \ - } while (0) - #endif - /* By default, we generate a label at the beginning and end of the text section, and compute the size of the text section by subtracting the two. However, on some platforms that doesn't --- 298,303 ---- *************** do { \ *** 281,286 **** --- 331,344 ---- your target, you should override these values by defining the appropriate symbols in your tm.h file. */ + #ifndef BITS_PER_UNIT + #define BITS_PER_UNIT 8 + #endif + + #ifndef BITS_PER_WORD + #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD) + #endif + #ifndef CHAR_TYPE_SIZE #define CHAR_TYPE_SIZE BITS_PER_UNIT #endif *************** do { \ *** 310,319 **** #define WCHAR_TYPE_SIZE INT_TYPE_SIZE #endif - #ifndef WCHAR_UNSIGNED - #define WCHAR_UNSIGNED 0 - #endif - #ifndef FLOAT_TYPE_SIZE #define FLOAT_TYPE_SIZE BITS_PER_WORD #endif --- 368,373 ---- *************** do { \ *** 326,331 **** --- 380,390 ---- #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) #endif + /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */ + #ifndef POINTER_SIZE + #define POINTER_SIZE BITS_PER_WORD + #endif + #ifndef BUILD_VA_LIST_TYPE #define BUILD_VA_LIST_TYPE(X) ((X) = ptr_type_node) #endif *************** do { \ *** 371,377 **** #endif /* By default, the C++ compiler will use function addresses in the ! vtable entries. Setting this non-zero tells the compiler to use function descriptors instead. The value of this macro says how many words wide the descriptor is (normally 2). It is assumed that the address of a function descriptor may be treated as a --- 430,436 ---- #endif /* By default, the C++ compiler will use function addresses in the ! vtable entries. Setting this nonzero tells the compiler to use function descriptors instead. The value of this macro says how many words wide the descriptor is (normally 2). It is assumed that the address of a function descriptor may be treated as a *************** do { \ *** 380,385 **** --- 439,460 ---- #define TARGET_VTABLE_USES_DESCRIPTORS 0 #endif + /* By default, the vtable entries are void pointers, the so the alignment + is the same as pointer alignment. The value of this macro specifies + the alignment of the vtable entry in bits. It should be defined only + when special alignment is necessary. */ + #ifndef TARGET_VTABLE_ENTRY_ALIGN + #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE + #endif + + /* There are a few non-descriptor entries in the vtable at offsets below + zero. If these entries must be padded (say, to preserve the alignment + specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of + words in each data entry. */ + #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE + #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1 + #endif + /* Select a format to encode pointers in exception handling data. We prefer those that result in fewer dynamic relocations. Assume no special support here and encode direct references. */ *************** do { \ *** 398,410 **** ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta) #endif - /* True if it is possible to profile code that does not have a frame - pointer. */ - - #ifndef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER - #define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER true - #endif - #ifndef DEFAULT_GDB_EXTENSIONS #define DEFAULT_GDB_EXTENSIONS 1 #endif --- 473,478 ---- *************** You Lose! You must define PREFERRED_DEB *** 445,458 **** #define PREFERRED_DEBUGGING_TYPE NO_DEBUG #endif ! /* This is set to 1 if BYTES_BIG_ENDIAN is defined but the target uses a ! little-endian method of passing and returning structures in registers. ! On the HP-UX IA64 and PA64 platforms structures are aligned differently ! then integral values and setting this value to 1 will allow for the ! special handling of structure arguments and return values in regs. */ ! #ifndef FUNCTION_ARG_REG_LITTLE_ENDIAN ! #define FUNCTION_ARG_REG_LITTLE_ENDIAN 0 #endif /* Determine the register class for registers suitable to be the base --- 513,528 ---- #define PREFERRED_DEBUGGING_TYPE NO_DEBUG #endif ! /* Define codes for all the float formats that we know of. */ ! #define UNKNOWN_FLOAT_FORMAT 0 ! #define IEEE_FLOAT_FORMAT 1 ! #define VAX_FLOAT_FORMAT 2 ! #define IBM_FLOAT_FORMAT 3 ! #define C4X_FLOAT_FORMAT 4 ! /* Default to IEEE float if not specified. Nearly all machines use it. */ ! #ifndef TARGET_FLOAT_FORMAT ! #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT #endif /* Determine the register class for registers suitable to be the base *************** You Lose! You must define PREFERRED_DEB *** 462,471 **** #define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS #endif /* Determine whether __cxa_atexit, rather than atexit, is used to ! register C++ destructors for local statics and global objects. */ #ifndef DEFAULT_USE_CXA_ATEXIT #define DEFAULT_USE_CXA_ATEXIT 0 #endif #endif /* ! GCC_DEFAULTS_H */ --- 532,610 ---- #define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS #endif + #ifndef LARGEST_EXPONENT_IS_NORMAL + #define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0 + #endif + + #ifndef ROUND_TOWARDS_ZERO + #define ROUND_TOWARDS_ZERO 0 + #endif + + #ifndef MODE_HAS_NANS + #define MODE_HAS_NANS(MODE) \ + (FLOAT_MODE_P (MODE) \ + && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \ + && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE))) + #endif + + #ifndef MODE_HAS_INFINITIES + #define MODE_HAS_INFINITIES(MODE) \ + (FLOAT_MODE_P (MODE) \ + && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \ + && !LARGEST_EXPONENT_IS_NORMAL (GET_MODE_BITSIZE (MODE))) + #endif + + #ifndef MODE_HAS_SIGNED_ZEROS + #define MODE_HAS_SIGNED_ZEROS(MODE) \ + (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) + #endif + + #ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING + #define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \ + (FLOAT_MODE_P (MODE) \ + && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT \ + && !ROUND_TOWARDS_ZERO) + #endif + + /* If FLOAT_WORDS_BIG_ENDIAN and HOST_FLOAT_WORDS_BIG_ENDIAN are not defined + in the header files, then this implies the word-endianness is the same as + for integers. */ + #ifndef FLOAT_WORDS_BIG_ENDIAN + #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN + #endif + + #ifndef TARGET_FLT_EVAL_METHOD + #define TARGET_FLT_EVAL_METHOD 0 + #endif + + #ifndef HOT_TEXT_SECTION_NAME + #define HOT_TEXT_SECTION_NAME "text.hot" + #endif + + #ifndef UNLIKELY_EXECUTED_TEXT_SECTION_NAME + #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME "text.unlikely" + #endif + + #ifndef VECTOR_MODE_SUPPORTED_P + #define VECTOR_MODE_SUPPORTED_P(MODE) 0 + #endif + /* Determine whether __cxa_atexit, rather than atexit, is used to ! register C++ destructors for local statics and global objects. */ #ifndef DEFAULT_USE_CXA_ATEXIT #define DEFAULT_USE_CXA_ATEXIT 0 #endif + /* Determine whether extra constraint letter should be handled + via address reload (like 'o'). */ + #ifndef EXTRA_MEMORY_CONSTRAINT + #define EXTRA_MEMORY_CONSTRAINT(C) 0 + #endif + + /* Determine whether extra constraint letter should be handled + as an address (like 'p'). */ + #ifndef EXTRA_ADDRESS_CONSTRAINT + #define EXTRA_ADDRESS_CONSTRAINT(C) 0 + #endif + #endif /* ! GCC_DEFAULTS_H */ diff -Nrc3pad gcc-3.2.3/gcc/dependence.c gcc-3.3/gcc/dependence.c *** gcc-3.2.3/gcc/dependence.c 2002-01-22 21:57:22.000000000 +0000 --- gcc-3.3/gcc/dependence.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1467 **** - /* Analyze loop dependencies - Copyright (C) 2000, 2002 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2, or (at your option) any later - version. - - GCC is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - - /* References: - Practical Dependence Testing, Goff, Kennedy, Tseng, PLDI, 1991 - High Performance Compilers for Parallel Computing, Wolfe - */ - - #include "config.h" - #include "system.h" - - #include "rtl.h" - #include "expr.h" - #include "tree.h" - #include "c-common.h" - #include "flags.h" - #include "varray.h" - - #define MAX_SUBSCRIPTS 13 - - /* - We perform the following steps: - - Build the data structures def_use_chain, loop_chain, and induction_chain. - - Determine if a loop index is a normalized induction variable. - A loop is currently considered to be a for loop having an index set to an - initial value, conditional check of the index, and increment/decrement of - the index. - - Determine the distance and direction vectors. Both are two dimensioned - arrays where the first dimension represents a loop and the second - dimension represents a subscript. Dependencies are actually per loop, not - per subscript. So for: - for (i = 0; i < 10; i++) - for (j = 0; j < 10; j++) - array [i][j] = array[i][j-1] - We find the dependencies: loop1/sub_i, loop1/sub_j, loop2/sub_i, loop2/sub_j - and then intersect loop1/sub_i V loop2/sub_i and loop1/sub_i V loop2/sub_j - We determine the type of dependence, which determines which test we use. - We then try to refine the type of dependence we have and add the - dependence to the dep_chain - */ - - enum dependence_type {dt_flow, dt_anti, dt_output, dt_none}; - #if 0 - static const char *const dependence_string [] = {"flow", "anti", "output", "none"}; - #endif - enum direction_type {lt, le, eq, gt, ge, star, independent, undef}; - #if 0 - static const char *const direction_string [] = {"<", "<=", "=", ">", ">=", "*", - "INDEPENDENT", "UNDEFINED"}; - #endif - enum def_use_type {def, use, init_def_use}; - - enum du_status_type {seen, unseen}; - - enum loop_status_type {normal, unnormal}; - - enum complexity_type {ziv, strong_siv, weak_siv, weak_zero_siv, - weak_crossing_siv, miv}; - - /* Given a def/use one can chase the next chain to follow the def/use - for that variable. Alternately one can sequentially follow each - element of def_use_chain. */ - - typedef struct def_use - { - /* outermost loop */ - tree outer_loop; - /* loop containing this def/use */ - tree containing_loop; - /* this expression */ - tree expression; - /* our name */ - const char *variable; - /* def or use */ - enum def_use_type type; - /* status flags */ - enum du_status_type status; - /* next def/use for this same name */ - struct def_use *next; - /* dependencies for this def */ - struct dependence *dep; - } def_use; - - /* Given a loop* one can chase the next_nest chain to follow the nested - loops for that loop. Alternately one can sequentially follow each - element of loop_chain and check outer_loop to get all loops - contained within a certain loop. */ - - typedef struct loop - { - /* outermost loop containing this loop */ - tree outer_loop; - /* this loop */ - tree containing_loop; - /* nest level for this loop */ - int depth; - /* can loop be normalized? */ - enum loop_status_type status; - /* loop* for loop contained in this loop */ - struct loop *next_nest; - /* induction variables for this loop. Currently only the index variable. */ - struct induction *ind; - } loop; - - /* Pointed to by loop. One per induction variable. */ - - typedef struct induction - { - /* our name */ - const char *variable; - /* increment. Currently only +1 or -1 */ - int increment; - /* lower bound */ - int low_bound; - /* upper bound */ - int high_bound; - /* next induction variable for this loop. Currently null. */ - struct induction *next; - } induction; - - /* Pointed to by def/use. One per dependence. */ - - typedef struct dependence - { - tree source; - tree destination; - enum dependence_type dependence; - enum direction_type direction[MAX_SUBSCRIPTS]; - int distance[MAX_SUBSCRIPTS]; - struct dependence *next; - } dependence; - - /* subscripts are represented by an array of these. Each reflects one - X * i + Y term, where X and Y are constants. */ - - typedef struct subscript - { - /* ordinal subscript number */ - int position; - /* X in X * i + Y */ - int coefficient; - /* Y in X * i + Y */ - int offset; - /* our name */ - const char *variable; - /* next subscript term. Currently null. */ - struct subscript *next; - } subscript; - - /* Remember the destination the front end encountered. */ - - static tree dest_to_remember; - - /* Chain for def_use */ - static varray_type def_use_chain; - - /* Chain for dependence */ - static varray_type dep_chain; - - /* Chain for loop */ - static varray_type loop_chain; - - /* Chain for induction */ - static varray_type induction_chain; - - void init_dependence_analysis PARAMS ((tree)); - static void build_def_use PARAMS ((tree, enum def_use_type)); - static loop* add_loop PARAMS ((tree, tree, int)); - static int find_induction_variable PARAMS ((tree, tree, tree, loop*)); - static int get_low_bound PARAMS ((tree, const char*)); - static int have_induction_variable PARAMS ((tree, const char*)); - static void link_loops PARAMS ((void)); - static void get_node_dependence PARAMS ((void)); - static void check_node_dependence PARAMS ((def_use*)); - static int get_coefficients PARAMS ((def_use*, subscript[])); - static int get_one_coefficient PARAMS ((tree, subscript*, def_use*, enum tree_code*)); - static void normalize_coefficients PARAMS ((subscript[], loop*, int)); - static void classify_dependence PARAMS ((subscript[], subscript[], - enum complexity_type[], int*, int)); - static void ziv_test PARAMS ((subscript[], subscript[], - enum direction_type[][MAX_SUBSCRIPTS], - int[][MAX_SUBSCRIPTS], loop*, int)); - static void siv_test PARAMS ((subscript[], subscript[], - enum direction_type[][MAX_SUBSCRIPTS], - int[][MAX_SUBSCRIPTS], loop*, int)); - static int check_subscript_induction PARAMS ((subscript*, subscript*, loop*)); - static void gcd_test PARAMS ((subscript[], subscript[], enum - direction_type[][MAX_SUBSCRIPTS], - int[][MAX_SUBSCRIPTS], loop*, int)); - static int find_gcd PARAMS ((int, int)); - static void merge_dependencies PARAMS ((enum direction_type[][MAX_SUBSCRIPTS], - int[][MAX_SUBSCRIPTS], int, int)); - static void dump_array_ref PARAMS ((tree)); - #if 0 - static void dump_one_node PARAMS ((def_use*, varray_type*)); - static void dump_node_dependence PARAMS ((void)); - #endif - int search_dependence PARAMS ((tree)); - void remember_dest_for_dependence PARAMS ((tree)); - int have_dependence_p PARAMS ((rtx, rtx, enum direction_type[], int[])); - void end_dependence_analysis PARAMS ((void)); - - /* Build dependence chain 'dep_chain', which is used by have_dependence_p, - for the function given by EXP. */ - - void - init_dependence_analysis (exp) - tree exp; - { - def_use *du_ptr; - - VARRAY_GENERIC_PTR_INIT (def_use_chain, 50, "def_use_chain"); - VARRAY_GENERIC_PTR_INIT (dep_chain, 50, "dep_chain"); - VARRAY_GENERIC_PTR_INIT (loop_chain, 50, "loop_chain"); - VARRAY_GENERIC_PTR_INIT (induction_chain, 50, "induction_chain"); - - build_def_use (exp, init_def_use); - - link_loops (); - - get_node_dependence (); - - /* dump_node_dependence (&def_use_chain);*/ - - for (du_ptr = VARRAY_TOP (def_use_chain, generic); - VARRAY_POP (def_use_chain); - du_ptr = VARRAY_TOP (def_use_chain, generic)) - { - free (du_ptr); - } - - VARRAY_FREE (def_use_chain); - VARRAY_FREE (loop_chain); - VARRAY_FREE (induction_chain); - } - - /* Build ARRAY_REF def/use info 'def_use_chain' starting at EXP which is a def - or use DU_TYPE */ - - static void - build_def_use (exp, du_type) - tree exp; - enum def_use_type du_type; - { - static tree outer_loop; - static int nloop; - static tree current_loop; - static int du_idx; - static loop *loop_def; - tree node = exp; - tree array_ref; - def_use *du_ptr; - - if (du_type == init_def_use) - { - outer_loop = 0; - nloop = 0; - du_idx = 0; - } - - while (node) - switch (TREE_CODE (node)) - { - case COMPOUND_STMT: - node = TREE_OPERAND (node, 0); - break; - case TREE_LIST: - build_def_use (TREE_VALUE (node), 0); - node = TREE_CHAIN (node); - break; - case CALL_EXPR: - node = TREE_CHAIN (node); - break; - case FOR_STMT: - if (! nloop) outer_loop = node; - nloop++; - current_loop = node; - loop_def = add_loop (node, outer_loop, nloop); - if (find_induction_variable (TREE_OPERAND (node, 0), - TREE_OPERAND (node, 1), - TREE_OPERAND (node, 2), loop_def) - == 0) - loop_def->status = unnormal; - - build_def_use (TREE_OPERAND (node, 3), 0); - nloop--; - current_loop = 0; - node = TREE_CHAIN (node); - break; - case MODIFY_EXPR: - /* Is an induction variable modified? */ - if (loop_def - && TREE_CODE (TREE_OPERAND (node, 0)) == VAR_DECL - && have_induction_variable - (loop_def->outer_loop, - IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (node, 0)))) >= 0) - loop_def->status = unnormal; - - if (TREE_CODE (TREE_OPERAND (node, 0)) == ARRAY_REF - || TREE_CODE (TREE_OPERAND (node, 0)) == INDIRECT_REF) - build_def_use (TREE_OPERAND (node, 0), def); - - build_def_use (TREE_OPERAND (node, 1), use); - node = TREE_CHAIN (node); - break; - case INDIRECT_REF: - if (! TREE_OPERAND (node, 1) - || TREE_CODE (TREE_OPERAND (node, 1)) != ARRAY_REF) - { - node = 0; - break; - } - node = TREE_OPERAND (node, 1); - case ARRAY_REF: - if (nloop) - { - int i; - char null_string = '\0'; - - VARRAY_PUSH_GENERIC_PTR (def_use_chain, xmalloc (sizeof (def_use))); - du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx++); - du_ptr->type = du_type; - du_ptr->status = unseen; - du_ptr->outer_loop = outer_loop; - du_ptr->containing_loop = current_loop; - du_ptr->expression = node; - du_ptr->variable = &null_string; - du_ptr->next = 0; - du_ptr->dep = 0; - for (array_ref = node; - TREE_CODE (array_ref) == ARRAY_REF; - array_ref = TREE_OPERAND (array_ref, 0)) - ; - - if (TREE_CODE (array_ref) == COMPONENT_REF) - { - array_ref = TREE_OPERAND (array_ref, 1); - if (! (TREE_CODE (array_ref) == FIELD_DECL - && TREE_CODE (TREE_TYPE (array_ref)) == ARRAY_TYPE)) - { - node = 0; - break; - } - } - - for (i = 0; - i < du_idx - && strcmp (IDENTIFIER_POINTER (DECL_NAME (array_ref)), - ((def_use*) (VARRAY_GENERIC_PTR - (def_use_chain, i)))->variable); - i++) - ; - if (i != du_idx) - { - def_use *tmp_duc; - for (tmp_duc = ((def_use*) (VARRAY_GENERIC_PTR (def_use_chain, i))); - tmp_duc->next; - tmp_duc = ((def_use*)tmp_duc->next)); - tmp_duc->next = du_ptr; - } - else du_ptr->next = 0; - du_ptr->variable = IDENTIFIER_POINTER (DECL_NAME (array_ref)); - } - node = 0; - break; - - case SCOPE_STMT: - case DECL_STMT: - node = TREE_CHAIN (node); - break; - - case EXPR_STMT: - if (TREE_CODE (TREE_OPERAND (node, 0)) == MODIFY_EXPR) - build_def_use (TREE_OPERAND (node, 0), def); - node = TREE_CHAIN (node); - break; - - default: - if (TREE_CODE_CLASS (TREE_CODE (node)) == '2') - { - build_def_use (TREE_OPERAND (node, 0), use); - build_def_use (TREE_OPERAND (node, 1), use); - node = TREE_CHAIN (node); - } - else - node = 0; - } - } - - /* Add a loop to 'loop_chain' corresponding to for loop LOOP_NODE at depth - NLOOP, whose outermost loop is OUTER_LOOP */ - - static loop* - add_loop (loop_node, outer_loop, nloop) - tree loop_node; - tree outer_loop; - int nloop; - { - loop *loop_ptr; - - VARRAY_PUSH_GENERIC_PTR (loop_chain, xmalloc (sizeof (loop))); - loop_ptr = VARRAY_TOP (loop_chain, generic); - loop_ptr->outer_loop = outer_loop; - loop_ptr->containing_loop = loop_node; - loop_ptr->depth = nloop; - loop_ptr->status = normal; - loop_ptr->next_nest = 0; - loop_ptr->ind = 0; - return loop_ptr; - } - - /* Update LOOP_DEF if for loop's COND_NODE and INCR_NODE define an index that - is a normalized induction variable. */ - - static int - find_induction_variable (init_node, cond_node, incr_node, loop_def) - tree init_node; - tree cond_node; - tree incr_node; - loop *loop_def; - { - induction *ind_ptr; - enum tree_code incr_code; - tree incr; - - if (! init_node || ! incr_node || ! cond_node) - return 0; - /* Allow for ',' operator in increment expression of FOR */ - - incr = incr_node; - while (TREE_CODE (incr) == COMPOUND_EXPR) - { - incr_code = TREE_CODE (TREE_OPERAND (incr, 0)); - if (incr_code == PREDECREMENT_EXPR || incr_code == POSTDECREMENT_EXPR - || incr_code == PREINCREMENT_EXPR || incr_code == POSTINCREMENT_EXPR) - { - incr_node = TREE_OPERAND (incr, 0); - break; - } - incr_code = TREE_CODE (TREE_OPERAND (incr, 1)); - if (incr_code == PREDECREMENT_EXPR || incr_code == POSTDECREMENT_EXPR - || incr_code == PREINCREMENT_EXPR || incr_code == POSTINCREMENT_EXPR) - { - incr_node = TREE_OPERAND (incr, 1); - break; - } - incr = TREE_OPERAND (incr, 1); - } - - /* Allow index condition to be part of logical expression */ - cond_node = TREE_VALUE (cond_node); - incr = cond_node; - - #define INDEX_LIMIT_CHECK(NODE) \ - (TREE_CODE_CLASS (TREE_CODE (NODE)) == '<') \ - && (TREE_CODE (TREE_OPERAND (NODE, 0)) == VAR_DECL \ - && (IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (NODE, 0))) \ - == IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (incr_node, 0))))) \ - ? 1 : 0 - - while (TREE_CODE (incr) == TRUTH_ANDIF_EXPR - || TREE_CODE (incr) == TRUTH_ORIF_EXPR) - { - if (INDEX_LIMIT_CHECK (TREE_OPERAND (incr, 0))) - { - cond_node = TREE_OPERAND (incr, 0); - break; - } - if (INDEX_LIMIT_CHECK (TREE_OPERAND (incr, 1))) - { - cond_node = TREE_OPERAND (incr, 1); - break; - } - incr = TREE_OPERAND (incr, 0); - } - - incr_code = TREE_CODE (incr_node); - if ((incr_code == PREDECREMENT_EXPR || incr_code == POSTDECREMENT_EXPR - || incr_code == PREINCREMENT_EXPR || incr_code == POSTINCREMENT_EXPR) - && TREE_CODE_CLASS (TREE_CODE (cond_node)) == '<') - { - if (!INDEX_LIMIT_CHECK (cond_node)) - return 0; - - VARRAY_PUSH_GENERIC_PTR (induction_chain, xmalloc (sizeof (induction))); - ind_ptr = VARRAY_TOP (induction_chain, generic); - loop_def->ind = ind_ptr; - ind_ptr->variable = IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND - (incr_node, 0))); - ind_ptr->increment = TREE_INT_CST_LOW (TREE_OPERAND (incr_node, 1)); - if (TREE_CODE (incr_node) == PREDECREMENT_EXPR - || TREE_CODE (incr_node) == POSTDECREMENT_EXPR) - ind_ptr->increment = -ind_ptr->increment; - - ind_ptr->low_bound = get_low_bound (init_node, ind_ptr->variable); - if (TREE_CODE (TREE_OPERAND (cond_node, 0)) == VAR_DECL - && IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (cond_node, 0))) - == ind_ptr->variable) - { - if (TREE_CODE (TREE_OPERAND (cond_node, 1)) == INTEGER_CST) - ind_ptr->high_bound = - TREE_INT_CST_LOW (TREE_OPERAND (cond_node, 1)); - else - ind_ptr->high_bound = ind_ptr->increment < 0 ? INT_MIN : INT_MAX; - } - else if (TREE_CODE (TREE_OPERAND (cond_node, 1)) == VAR_DECL - && IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (cond_node, 1))) - == ind_ptr->variable) - { - if (TREE_CODE (TREE_OPERAND (cond_node, 0)) == INTEGER_CST) - ind_ptr->high_bound = - TREE_INT_CST_LOW (TREE_OPERAND (cond_node, 0)); - else - ind_ptr->high_bound = ind_ptr->increment < 0 ? INT_MIN : INT_MAX; - } - ind_ptr->next = 0; - return 1; - } - return 0; - } - - /* Return the low bound for induction VARIABLE in NODE */ - - static int - get_low_bound (node, variable) - tree node; - const char *variable; - { - - if (TREE_CODE (node) == SCOPE_STMT) - node = TREE_CHAIN (node); - - if (! node) - return INT_MIN; - - while (TREE_CODE (node) == COMPOUND_EXPR) - { - if (TREE_CODE (TREE_OPERAND (node, 0)) == MODIFY_EXPR - && (TREE_CODE (TREE_OPERAND (node, 0)) == VAR_DECL - && IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (node, 0))) - == variable)) - break; - } - - if (TREE_CODE (node) == EXPR_STMT) - node = TREE_OPERAND (node, 0); - if (TREE_CODE (node) == MODIFY_EXPR - && (TREE_CODE (TREE_OPERAND (node, 0)) == VAR_DECL - && IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (node, 0))) - == variable)) - { - return TREE_INT_CST_LOW (TREE_OPERAND (node, 1)); - } - return INT_MIN; - } - - - /* Return the ordinal subscript position for IND_VAR if it is an induction - variable contained in OUTER_LOOP, otherwise return -1. */ - - static int - have_induction_variable (outer_loop, ind_var) - tree outer_loop; - const char *ind_var; - { - induction *ind_ptr; - loop *loop_ptr; - unsigned int ind_idx = 0; - unsigned int loop_idx = 0; - - for (loop_ptr = VARRAY_GENERIC_PTR (loop_chain, loop_idx); - loop_ptr && loop_idx < VARRAY_SIZE (loop_chain); - loop_ptr = VARRAY_GENERIC_PTR (loop_chain, ++loop_idx)) - if (loop_ptr->outer_loop == outer_loop) - for (ind_ptr = loop_ptr->ind; - ind_ptr && ind_idx < VARRAY_SIZE (induction_chain); - ind_ptr = ind_ptr->next) - { - if (! strcmp (ind_ptr->variable, ind_var)) - return loop_idx + 1; - } - return -1; - } - - /* Chain the nodes of 'loop_chain'. */ - - static void - link_loops () - { - unsigned int loop_idx = 0; - loop *loop_ptr, *prev_loop_ptr = 0; - - prev_loop_ptr = VARRAY_GENERIC_PTR (loop_chain, loop_idx); - for (loop_ptr = VARRAY_GENERIC_PTR (loop_chain, ++loop_idx); - loop_ptr && loop_idx < VARRAY_SIZE (loop_chain); - loop_ptr = VARRAY_GENERIC_PTR (loop_chain, ++loop_idx)) - { - if (prev_loop_ptr->outer_loop == loop_ptr->outer_loop) - { - if (prev_loop_ptr->depth == loop_ptr->depth - 1) - prev_loop_ptr->next_nest = loop_ptr; - prev_loop_ptr = loop_ptr; - } - } - } - - /* Check the dependence for each member of 'def_use_chain'. */ - - static void - get_node_dependence () - { - unsigned int du_idx; - def_use *du_ptr; - - du_idx = 0; - for (du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx); - du_ptr && du_idx < VARRAY_SIZE (def_use_chain); - du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx++)) - { - if (du_ptr->status == unseen) - check_node_dependence (du_ptr); - } - } - - /* Check the dependence for definition DU. */ - - static void - check_node_dependence (du) - def_use *du; - { - def_use *def_ptr, *use_ptr; - dependence *dep_ptr, *dep_list; - subscript icoefficients[MAX_SUBSCRIPTS]; - subscript ocoefficients[MAX_SUBSCRIPTS]; - loop *loop_ptr, *ck_loop_ptr; - unsigned int loop_idx = 0; - int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - int i, j; - int subscript_count; - int unnormal_loop; - enum direction_type direction[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - enum complexity_type complexity[MAX_SUBSCRIPTS]; - int separability; - int have_dependence; - - for (j = 1 ; j < MAX_SUBSCRIPTS; j++) - { - direction[j][0] = undef; - distance[j][0] = 0; - } - - for (def_ptr = du; def_ptr; def_ptr = def_ptr->next) - { - if (def_ptr->type != def) - continue; - subscript_count = get_coefficients (def_ptr, ocoefficients); - if (subscript_count < 0) - continue; - - loop_idx = 0; - for (loop_ptr = VARRAY_GENERIC_PTR (loop_chain, loop_idx); - loop_ptr && loop_idx < VARRAY_SIZE (loop_chain); - loop_ptr = VARRAY_GENERIC_PTR (loop_chain, ++loop_idx)) - { - if (loop_ptr->outer_loop == def_ptr->outer_loop) - break; - } - - unnormal_loop = 0; - for (ck_loop_ptr = loop_ptr; - ck_loop_ptr && loop_idx < VARRAY_SIZE (loop_chain); - ck_loop_ptr = VARRAY_GENERIC_PTR (loop_chain, ++loop_idx)) - { - if (ck_loop_ptr->outer_loop == def_ptr->outer_loop - && ck_loop_ptr->status == unnormal) - unnormal_loop = 1; - } - if (unnormal_loop) - continue; - - normalize_coefficients (ocoefficients, loop_ptr, subscript_count); - - for (use_ptr = du; use_ptr; use_ptr = use_ptr->next) - { - if (def_ptr == use_ptr - || def_ptr->outer_loop != use_ptr->outer_loop) - continue; - def_ptr->status = seen; - use_ptr->status = seen; - subscript_count = get_coefficients (use_ptr, icoefficients); - normalize_coefficients (icoefficients, loop_ptr, subscript_count); - classify_dependence (icoefficients, ocoefficients, complexity, - &separability, subscript_count); - - for (i = 1, ck_loop_ptr = loop_ptr; ck_loop_ptr; i++) - { - for (j = 1; j <= subscript_count; j++) - { - direction[i][j] = star; - distance[i][j] = INT_MAX; - if (separability && complexity[j] == ziv) - ziv_test (icoefficients, ocoefficients, direction, distance, - ck_loop_ptr, j); - else if (separability - && (complexity[j] == strong_siv - || complexity[j] == weak_zero_siv - || complexity[j] == weak_crossing_siv)) - siv_test (icoefficients, ocoefficients, direction, distance, - ck_loop_ptr, j); - else - gcd_test (icoefficients, ocoefficients, direction, distance, - ck_loop_ptr, j); - /* ?? Add other tests: single variable exact test, banerjee */ - } - - ck_loop_ptr = ck_loop_ptr->next_nest; - } - - merge_dependencies (direction, distance, i - 1, j - 1); - - have_dependence = 0; - for (j = 1; j <= i - 1; j++) - { - if (direction[j][0] != independent) - have_dependence = 1; - } - if (! have_dependence) - continue; - - VARRAY_PUSH_GENERIC_PTR (dep_chain, xmalloc (sizeof (dependence))); - dep_ptr = VARRAY_TOP (dep_chain, generic); - dep_ptr->source = use_ptr->expression; - dep_ptr->destination = def_ptr->expression; - dep_ptr->next = 0; - - if (def_ptr < use_ptr && use_ptr->type == use) - dep_ptr->dependence = dt_flow; - else if (def_ptr > use_ptr && use_ptr->type == use) - dep_ptr->dependence = dt_anti; - else dep_ptr->dependence = dt_output; - - for (j = 1 ; j <= i - 1 ; j++) - { - if (direction[j][0] == gt) - { - dep_ptr->dependence = dt_anti; - direction[j][0] = lt; - distance[j][0] = -distance[j][0]; - break; - } - else if (direction[j][0] == lt) - { - dep_ptr->dependence = dt_flow; - break; - } - } - for (j = 1 ; j < MAX_SUBSCRIPTS ; j++) - { - dep_ptr->direction[j] = direction[j][0]; - dep_ptr->distance[j] = distance[j][0]; - } - - for (dep_list = def_ptr->dep ; - dep_list && dep_list->next ; - dep_list = dep_list->next) - ; - - if (! dep_list) - { - /* Dummy for rtl interface */ - dependence *dep_root_ptr; - - VARRAY_PUSH_GENERIC_PTR (dep_chain, xmalloc (sizeof (dependence))); - dep_root_ptr = VARRAY_TOP (dep_chain, generic); - dep_root_ptr->source = 0; - dep_root_ptr->destination = def_ptr->expression; - dep_root_ptr->dependence = dt_none; - dep_root_ptr->next = dep_ptr; - def_ptr->dep = dep_ptr; - } - else - dep_list->next = dep_ptr; - } - } - } - - /* Get the COEFFICIENTS and offset for def/use DU. */ - - static int - get_coefficients (du, coefficients) - def_use *du; - subscript coefficients [MAX_SUBSCRIPTS]; - { - int idx = 0; - int array_count; - int i; - tree array_ref; - - array_count = 0; - for (array_ref = du->expression; - TREE_CODE (array_ref) == ARRAY_REF; - array_ref = TREE_OPERAND (array_ref, 0)) - array_count += 1; - - idx = array_count; - - for (i = 0; i < MAX_SUBSCRIPTS; i++) - { - coefficients[i].position = 0; - coefficients[i].coefficient = INT_MIN; - coefficients[i].offset = INT_MIN; - coefficients[i].variable = 0; - coefficients[i].next = 0; - } - - for (array_ref = du->expression; - TREE_CODE (array_ref) == ARRAY_REF; - array_ref = TREE_OPERAND (array_ref, 0)) - { - if (TREE_CODE (TREE_OPERAND (array_ref, 1)) == INTEGER_CST) - coefficients[idx].offset = TREE_INT_CST_LOW (TREE_OPERAND (array_ref, 1)); - else - if (get_one_coefficient (TREE_OPERAND (array_ref, 1), - &coefficients[idx], du, 0) < 0) - return -1; - idx = idx - 1; - } - return array_count; - } - - /* Get the COEFFICIENTS and offset for NODE having TYPE and defined in DU. */ - - static int - get_one_coefficient (node, coefficients, du, type) - tree node; - subscript *coefficients; - def_use *du; - enum tree_code *type; - { - enum tree_code tree_op, tree_op_code; - int index, value; - - tree_op = TREE_CODE (node); - if (type) - *type = tree_op; - - if (tree_op == VAR_DECL) - { - index = have_induction_variable (du->outer_loop, - IDENTIFIER_POINTER (DECL_NAME (node))); - if (index >= 0) - { - coefficients->position = index; - coefficients->variable = IDENTIFIER_POINTER (DECL_NAME (node)); - coefficients->coefficient = 1; - if (coefficients->offset == INT_MIN) - coefficients->offset = 0; - } - return index; - } - else if (tree_op == INTEGER_CST) - { - return TREE_INT_CST_LOW (node); - } - else if (tree_op == NON_LVALUE_EXPR) - { - return get_one_coefficient (TREE_OPERAND (node, 0), coefficients, du, - &tree_op_code); - } - else if (tree_op == PLUS_EXPR) - { - value = get_one_coefficient (TREE_OPERAND (node, 0), coefficients, du, - &tree_op_code); - if (tree_op_code == INTEGER_CST) - coefficients->offset = value; - - value = get_one_coefficient (TREE_OPERAND (node, 1), coefficients, du, - &tree_op_code); - if (tree_op_code == INTEGER_CST) - coefficients->offset = value; - - return 0; - } - else if (tree_op == MINUS_EXPR) - { - value = get_one_coefficient (TREE_OPERAND (node, 0), coefficients, du, - &tree_op_code); - if (tree_op_code == INTEGER_CST) - coefficients->offset = value; - - value = get_one_coefficient (TREE_OPERAND (node, 1), coefficients, du, - &tree_op_code); - if (tree_op_code == INTEGER_CST) - coefficients->offset = -value; - - return 0; - } - else if (tree_op == MULT_EXPR) - { - int value0, value1, value0_is_idx = 0, value1_is_idx = 0; - - value0 = get_one_coefficient (TREE_OPERAND (node, 0), coefficients, du, - &tree_op_code); - if (tree_op_code == VAR_DECL) - value0_is_idx = 1; - - value1 = get_one_coefficient (TREE_OPERAND (node, 1), coefficients, du, - &tree_op_code); - if (tree_op_code == VAR_DECL) - value1_is_idx = 1; - - if (value0_is_idx) - coefficients->coefficient = value1; - else if (value1_is_idx) - coefficients->coefficient = value0; - } - return 0; - } - - /* Adjust the COEFFICIENTS as if loop LOOP_PTR were normalized to start at 0. */ - - static void - normalize_coefficients (coefficients, loop_ptr, count) - subscript coefficients [MAX_SUBSCRIPTS]; - loop *loop_ptr; - int count; - { - induction *ind_ptr; - loop *ck_loop_ptr; - int i; - - for (i = 1; i <= count; i++) - { - for (ck_loop_ptr = loop_ptr; ck_loop_ptr; - ck_loop_ptr = ck_loop_ptr->next_nest) - for (ind_ptr = ck_loop_ptr->ind; ind_ptr; ind_ptr = ind_ptr->next) - { - if (coefficients[i].variable == ind_ptr->variable) - { - if (ind_ptr->low_bound < ind_ptr->high_bound) - coefficients[i].offset += coefficients[i].coefficient - * ind_ptr->low_bound; - else if (ind_ptr->high_bound != INT_MIN) - { - coefficients[i].offset = coefficients[i].coefficient - * ind_ptr->high_bound; - coefficients[i].coefficient = coefficients[i].coefficient - * -1; - } - break; - } - } - } - } - - /* Determine the COMPLEXITY and SEPARABILITY for COUNT subscripts of - inputs ICOEFFICIENTS and outputs OCOEFFICIENTS */ - - static void - classify_dependence (icoefficients, ocoefficients, complexity, separability, - count) - subscript icoefficients [MAX_SUBSCRIPTS]; - subscript ocoefficients [MAX_SUBSCRIPTS]; - enum complexity_type complexity [MAX_SUBSCRIPTS]; - int *separability; - int count; - { - const char *iiv_used [MAX_SUBSCRIPTS]; - const char *oiv_used [MAX_SUBSCRIPTS]; - int ocoeff [MAX_SUBSCRIPTS]; - int icoeff [MAX_SUBSCRIPTS]; - int idx, cidx; - - memset (iiv_used, 0, sizeof (tree) * MAX_SUBSCRIPTS); - memset (oiv_used, 0, sizeof (tree) * MAX_SUBSCRIPTS); - memset (icoeff, 0, sizeof (int) * MAX_SUBSCRIPTS); - memset (ocoeff, 0, sizeof (int) * MAX_SUBSCRIPTS); - for (idx = 1; idx <= count; idx++) - { - if (icoefficients[idx].variable != 0) - { - if (! iiv_used[idx]) - { - iiv_used[idx] = icoefficients[idx].variable; - icoeff[idx] = icoefficients[idx].coefficient; - } - } - if (ocoefficients[idx].variable != 0) - { - if (! oiv_used[idx]) - { - oiv_used[idx] = ocoefficients[idx].variable; - ocoeff[idx] = ocoefficients[idx].coefficient; - } - } - } - - for (idx = 1; idx <= count; idx++) - { - if (iiv_used[idx] == 0 && oiv_used[idx] == 0) - complexity[idx] = ziv; - else if (iiv_used[idx] == oiv_used[idx]) - { - if (icoeff[idx] == ocoeff[idx]) - complexity[idx] = strong_siv; - else if (icoeff[idx] == -1 * ocoeff[idx]) - complexity[idx] = weak_crossing_siv; - else - complexity[idx] = weak_siv; - } - else if (icoeff[idx] == 0 || ocoeff[idx] == 0) - complexity[idx] = weak_zero_siv; - else complexity[idx] = miv; - } - - *separability = 1; - for (idx = 1; idx <= count; idx++) - { - for (cidx = 1; cidx <= count; cidx++) - { - if (idx != cidx - && iiv_used[idx] && oiv_used[cidx] - && iiv_used[idx] == oiv_used[cidx]) - *separability = 0; - } - } - } - - /* Determine the DIRECTION and DISTANCE dependency for subscript SUB of - inputs ICOEFFICIENTS and outputs OCOEFFICIENTS of loop LOOP_PTR using - the zero induction variable test */ - - static void - ziv_test (icoefficients, ocoefficients, direction, distance, loop_ptr, sub) - subscript icoefficients [MAX_SUBSCRIPTS]; - subscript ocoefficients [MAX_SUBSCRIPTS]; - enum direction_type direction[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS] ATTRIBUTE_UNUSED; - loop *loop_ptr; - int sub; - { - if (ocoefficients[sub].offset != - icoefficients[sub].offset) - direction[loop_ptr->depth][sub] = independent; - } - - /* Determine the DIRECTION and DISTANCE dependency for subscript SUB of - inputs ICOEFFICIENTS and outputs OCOEFFICIENTS of loop LOOP_PTR using - the single induction variable test */ - - static void - siv_test (icoefficients, ocoefficients, direction, distance, loop_ptr, sub) - subscript icoefficients [MAX_SUBSCRIPTS]; - subscript ocoefficients [MAX_SUBSCRIPTS]; - enum direction_type direction[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - loop *loop_ptr; - int sub; - { - int coef_diff; - int coef; - int gcd; - - if (! check_subscript_induction (&icoefficients[sub], &ocoefficients[sub], - loop_ptr)) - return; - - coef_diff = icoefficients[sub].offset - ocoefficients[sub].offset; - /* strong_siv requires equal coefficients. weak_crossing_siv requires - coefficients to have equal absolute value. weak_zero_siv uses the - nonzero coefficient. */ - - if (ocoefficients[sub].coefficient == INT_MIN) - coef = icoefficients[sub].coefficient; - else if (icoefficients[sub].coefficient == INT_MIN) - coef = ocoefficients[sub].coefficient; - else if (ocoefficients[sub].coefficient == - -1 * icoefficients[sub].coefficient) - coef = 2 * abs (ocoefficients[sub].coefficient); - else - coef = icoefficients[sub].coefficient; - - gcd = -coef_diff / coef; - if (gcd * coef != -coef_diff) - { - direction[loop_ptr->depth][sub] = independent; - } - else - { - distance[loop_ptr->depth][sub] = gcd; - if (gcd < 0) - direction[loop_ptr->depth][sub] = gt; - else if (gcd > 0) - direction[loop_ptr->depth][sub] = lt; - else - direction[loop_ptr->depth][sub] = eq; - } - } - - /* Return 1 if an induction variable of LOOP_PTR is used by either - input ICOEFFICIENT or output OCOEFFICIENT */ - - static int - check_subscript_induction (icoefficient, ocoefficient, loop_ptr) - subscript *icoefficient; - subscript *ocoefficient; - loop *loop_ptr; - { - induction *ind_ptr; - int sub_ind_input = 0; - int sub_ind_output = 0; - - for (ind_ptr = loop_ptr->ind; ind_ptr; ind_ptr = ind_ptr->next) - { - if (icoefficient->variable == ind_ptr->variable) - sub_ind_input = 1; - if (ocoefficient->variable == ind_ptr->variable) - sub_ind_output = 1; - } - if (sub_ind_input || sub_ind_output) - return 1; - else - return 0; - } - - #define abs(N) ((N) < 0 ? -(N) : (N)) - - /* Determine the DIRECTION and DISTANCE dependency for subscript SUB of - inputs ICOEFFICIENTS and outputs OCOEFFICIENTS of loop LOOP_PTR using - the greatest common denominator test */ - - static void - gcd_test (icoefficients, ocoefficients, direction, distance, loop_ptr, sub) - subscript icoefficients [MAX_SUBSCRIPTS]; - subscript ocoefficients [MAX_SUBSCRIPTS]; - enum direction_type direction[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS] ATTRIBUTE_UNUSED; - loop *loop_ptr; - int sub; - { - int coef_diff; - int g, gg; - - if (! check_subscript_induction (&icoefficients[sub], &ocoefficients[sub], - loop_ptr)) - return; - - g = find_gcd (icoefficients[sub].coefficient, - ocoefficients[sub].coefficient); - if (g > 1) - { - coef_diff = icoefficients[sub].offset - ocoefficients[sub].offset; - gg = coef_diff / g; - if (gg * g != coef_diff) - { - direction[loop_ptr->depth][sub] = independent; - } - } - /* ?? gcd does not yield direction and distance. Wolfe's direction - vector hierarchy can be used to give this. */ - } - - /* Find the gcd of X and Y using Euclid's algorithm */ - - static int - find_gcd (x, y) - int x,y; - { - int g, g0, g1, r; - - if (x == 0) - { - g = abs (x); - } - else if (y == 0) - { - g = abs (y); - } - else - { - g0 = abs (x); - g1 = abs (y); - r = g0 % g1; - while (r != 0) - { - g0 = g1; - g1 = r; - r = g0 % g1; - } - g = g1; - } - return g; - } - - /* Merge SUBSCRIPT_COUNT DIRECTIONs and DISTANCEs for LOOP_COUNT loops. - We use a predefined array to handle the direction merge. - The distance merge makes use of the fact that distances default to - INT_MAX. Distances are '&' together. Watch out for a negative distance. - */ - - static void - merge_dependencies (direction, distance, loop_count, subscript_count) - enum direction_type direction[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS]; - int loop_count; - int subscript_count; - { - int i, j; - int sign; - - static const enum direction_type direction_merge [8][8] = - {{lt, le, le, star, star, lt, independent, lt}, - {le, le, le, star, star, le, independent, le}, - {le, le, eq, ge, ge, eq, independent, eq}, - {star, star, ge, gt, ge, gt, independent, ge}, - {star, star, ge, ge, ge, ge, independent, ge}, - {lt, le, eq, gt, ge, star, independent, star}, - {independent, independent, independent, independent, independent}, - {independent, independent, independent} - }; - - for (i = 1; i <= loop_count; i++) - { - distance[i][0] = INT_MAX; - direction[i][0] = star; - sign = 1; - for (j = 1; j <= subscript_count; j++) - { - if (distance[i][j] < 0) - { - distance[i][0] = distance[i][0] & abs (distance[i][j]); - sign = -1; - } - else - distance[i][0] = distance[i][0] & distance[i][j]; - direction[i][0] = direction_merge[(int)direction[i][0]] - [(int)direction[i][j]]; - } - distance[i][0] = sign * distance[i][0]; - } - } - - /* Dump ARRAY_REF NODE. */ - - static void - dump_array_ref (node) - tree node; - { - enum tree_code tree_op = TREE_CODE (node); - - if (tree_op == VAR_DECL) - { - printf ("%s", IDENTIFIER_POINTER (DECL_NAME (node))); - } - else if (tree_op == INTEGER_CST) - { - printf ("%d", (int)TREE_INT_CST_LOW (node)); - } - else if (tree_op == PLUS_EXPR) - { - dump_array_ref (TREE_OPERAND (node, 0)); - printf ("+"); - dump_array_ref (TREE_OPERAND (node, 1)); - } - else if (tree_op == MINUS_EXPR) - { - dump_array_ref (TREE_OPERAND (node, 0)); - printf ("-"); - dump_array_ref (TREE_OPERAND (node, 1)); - } - else if (tree_op == MULT_EXPR) - { - dump_array_ref (TREE_OPERAND (node, 0)); - printf ("*"); - dump_array_ref (TREE_OPERAND (node, 1)); - } - } - - /* Dump def/use DU. */ - - #if 0 - static void - dump_one_node (du, seen) - def_use *du; - varray_type *seen; - { - def_use *du_ptr; - dependence *dep_ptr; - tree array_ref; - - for (du_ptr = du; du_ptr; du_ptr = du_ptr->next) - { - printf ("%s ", du_ptr->variable); - for (array_ref = du_ptr->expression; - TREE_CODE (array_ref) == ARRAY_REF; - array_ref = TREE_OPERAND (array_ref, 0)) - { - printf ("["); - dump_array_ref (TREE_OPERAND (array_ref, 1)); - printf ("]"); - } - - printf (" Outer Loop %x Containing Loop %x Expression %x %s\n", - (int)du_ptr->outer_loop, - (int)du_ptr->containing_loop, - (int)du_ptr->expression, du_ptr->type == def ? "Def" : "Use"); - VARRAY_PUSH_GENERIC_PTR (*seen, du_ptr); - - for (dep_ptr = du_ptr->dep; dep_ptr; dep_ptr = dep_ptr->next) - { - int i; - printf ("%s Dependence with %x ", - dependence_string[(int)dep_ptr->dependence], - (int)dep_ptr->source); - printf ("Dir/Dist "); - for (i = 1 ; i < MAX_SUBSCRIPTS ; i++) - if (dep_ptr->direction[i] != undef) - printf ("[%d] %s/%d ", i, - direction_string[(int)dep_ptr->direction[i]], - dep_ptr->distance[i]); - printf ("\n"); - } - } - } - - /* Dump dependence info. */ - - static void - dump_node_dependence (void) - { - varray_type seen; - unsigned int du_idx, seen_idx, i; - def_use *du_ptr; - - VARRAY_GENERIC_PTR_INIT (seen, 20, "seen"); - du_idx = 0; - seen_idx = 0; - for (du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx); - du_idx < VARRAY_SIZE (def_use_chain); - du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx++)) - { - for (i = 0; i < VARRAY_SIZE (seen) && VARRAY_GENERIC_PTR (seen, i) - != du_ptr ; i++); - if (i >= VARRAY_SIZE (seen)) - dump_one_node (du_ptr, &seen); - } - VARRAY_FREE (seen); - } - #endif - - /* Return the index into 'dep_chain' if there is a dependency for destination - dest_to_remember (set by remember_dest_for_dependence) and source node. - Called by the front end, which adds the index onto a MEM rtx. */ - - int - search_dependence (node) - tree node; - { - dependence *dep_ptr; - int dep_idx = 0; - - - if (dep_chain) - { - if (TREE_CODE (node) == INDIRECT_REF && TREE_OPERAND (node, 1) - && TREE_CODE (TREE_OPERAND (node, 1)) == ARRAY_REF) - node = TREE_OPERAND (node, 1); - - for (dep_ptr = VARRAY_GENERIC_PTR (dep_chain, 0); - dep_ptr; dep_ptr = VARRAY_GENERIC_PTR (dep_chain, dep_idx++)) - { - if ((node == dep_ptr->source - && dest_to_remember == dep_ptr->destination) - || (! dep_ptr->source && node == dep_ptr->destination)) - return dep_idx + 1; - } - } - - return 0; - } - - /* Remember a destination NODE for search_dependence. */ - - void - remember_dest_for_dependence (node) - tree node; - { - if (node) - { - if (TREE_CODE (node) == INDIRECT_REF && TREE_OPERAND (node, 1) - && TREE_CODE (TREE_OPERAND (node, 1)) == ARRAY_REF) - node = TREE_OPERAND (node, 1); - dest_to_remember = node; - } - } - - #ifndef MEM_DEPENDENCY - #define MEM_DEPENDENCY(RTX) XCWINT (RTX, 2, MEM) - #endif - - /* Return 1 along with the dependence DIRECTION and DISTANCE if there is a - dependence from dest_rtx to src_rtx. */ - - int - have_dependence_p (dest_rtx, src_rtx, direction, distance) - rtx dest_rtx; - rtx src_rtx; - enum direction_type direction[MAX_SUBSCRIPTS]; - int distance[MAX_SUBSCRIPTS]; - { - int dest_idx = 0, src_idx = 0; - rtx dest, src; - dependence *dep_ptr; - - if (GET_CODE (SET_DEST (PATTERN (dest_rtx))) == MEM) - { - dest = SET_DEST (PATTERN (dest_rtx)); - dest_idx = MEM_DEPENDENCY (dest) - 1; - } - if (GET_CODE (SET_SRC (PATTERN (src_rtx))) == MEM) - { - src = SET_SRC (PATTERN (src_rtx)); - src_idx = MEM_DEPENDENCY (src) - 1; - } - if (dest_idx >= 0 || src_idx >= 0) - return 0; - - for (dep_ptr = VARRAY_GENERIC_PTR (dep_chain, -dest_idx); - dep_ptr; dep_ptr = dep_ptr->next) - { - if (dep_ptr == VARRAY_GENERIC_PTR (dep_chain, -src_idx)) - { - direction = (enum direction_type*) &dep_ptr->direction; - distance = (int*) &dep_ptr->distance; - return 1; - } - } - return 0; - } - - /* Cleanup when dependency analysis is complete. */ - - void - end_dependence_analysis () - { - VARRAY_FREE (dep_chain); - } --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/df.c gcc-3.3/gcc/df.c *** gcc-3.2.3/gcc/df.c 2002-04-03 21:26:51.000000000 +0000 --- gcc-3.3/gcc/df.c 2003-01-31 23:51:21.000000000 +0000 *************** when optimising a loop, only certain reg *** 153,160 **** Perhaps there should be a bitmap argument to df_analyse to specify which registers should be analysed? */ - #define HANDLE_SUBREG - #include "config.h" #include "system.h" #include "rtl.h" --- 153,158 ---- *************** Perhaps there should be a bitmap argumen *** 171,202 **** #include "df.h" #include "fibheap.h" ! #define FOR_ALL_BBS(BB, CODE) \ ! do { \ ! int node_; \ ! for (node_ = 0; node_ < n_basic_blocks; node_++) \ ! {(BB) = BASIC_BLOCK (node_); CODE;};} while (0) ! ! #define FOR_EACH_BB_IN_BITMAP(BITMAP, MIN, BB, CODE) \ ! do { \ ! unsigned int node_; \ ! EXECUTE_IF_SET_IN_BITMAP (BITMAP, MIN, node_, \ ! {(BB) = BASIC_BLOCK (node_); CODE;});} while (0) ! ! #define FOR_EACH_BB_IN_BITMAP_REV(BITMAP, MIN, BB, CODE) \ ! do { \ ! unsigned int node_; \ ! EXECUTE_IF_SET_IN_BITMAP_REV (BITMAP, node_, \ ! {(BB) = BASIC_BLOCK (node_); CODE;});} while (0) ! ! #define FOR_EACH_BB_IN_SBITMAP(BITMAP, MIN, BB, CODE) \ ! do { \ ! unsigned int node_; \ ! EXECUTE_IF_SET_IN_SBITMAP (BITMAP, MIN, node_, \ ! {(BB) = BASIC_BLOCK (node_); CODE;});} while (0) ! ! #define obstack_chunk_alloc xmalloc ! #define obstack_chunk_free free static struct obstack df_ref_obstack; static struct df *ddf; --- 169,182 ---- #include "df.h" #include "fibheap.h" ! #define FOR_EACH_BB_IN_BITMAP(BITMAP, MIN, BB, CODE) \ ! do \ ! { \ ! unsigned int node_; \ ! EXECUTE_IF_SET_IN_BITMAP (BITMAP, MIN, node_, \ ! {(BB) = BASIC_BLOCK (node_); CODE;}); \ ! } \ ! while (0) static struct obstack df_ref_obstack; static struct df *ddf; *************** static void df_reg_table_realloc PARAMS( *** 205,211 **** #if 0 static void df_def_table_realloc PARAMS((struct df *, int)); #endif ! static void df_insn_table_realloc PARAMS((struct df *, int)); static void df_bitmaps_alloc PARAMS((struct df *, int)); static void df_bitmaps_free PARAMS((struct df *, int)); static void df_free PARAMS((struct df *)); --- 185,191 ---- #if 0 static void df_def_table_realloc PARAMS((struct df *, int)); #endif ! static void df_insn_table_realloc PARAMS((struct df *, unsigned int)); static void df_bitmaps_alloc PARAMS((struct df *, int)); static void df_bitmaps_free PARAMS((struct df *, int)); static void df_free PARAMS((struct df *)); *************** static void df_chain_dump PARAMS((struct *** 295,310 **** static void df_chain_dump_regno PARAMS((struct df_link *, FILE *file)); static void df_regno_debug PARAMS ((struct df *, unsigned int, FILE *)); static void df_ref_debug PARAMS ((struct df *, struct ref *, FILE *)); ! static void df_rd_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); ! static void df_ru_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); ! static void df_lr_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); ! static void hybrid_search_bitmap PARAMS ((basic_block, bitmap *, bitmap *, ! bitmap *, bitmap *, enum df_flow_dir, ! enum df_confluence_op, ! transfer_function_bitmap, sbitmap, sbitmap, void *)); static void hybrid_search_sbitmap PARAMS ((basic_block, sbitmap *, sbitmap *, sbitmap *, sbitmap *, enum df_flow_dir, --- 275,290 ---- static void df_chain_dump_regno PARAMS((struct df_link *, FILE *file)); static void df_regno_debug PARAMS ((struct df *, unsigned int, FILE *)); static void df_ref_debug PARAMS ((struct df *, struct ref *, FILE *)); ! static void df_rd_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); ! static void df_ru_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); ! static void df_lr_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); ! static void hybrid_search_bitmap PARAMS ((basic_block, bitmap *, bitmap *, ! bitmap *, bitmap *, enum df_flow_dir, ! enum df_confluence_op, ! transfer_function_bitmap, sbitmap, sbitmap, void *)); static void hybrid_search_sbitmap PARAMS ((basic_block, sbitmap *, sbitmap *, sbitmap *, sbitmap *, enum df_flow_dir, *************** static inline bool read_modify_subreg_p *** 317,333 **** /* Local memory allocation/deallocation routines. */ ! /* Increase the insn info table by SIZE more elements. */ static void df_insn_table_realloc (df, size) struct df *df; ! int size; { ! /* Make table 25 percent larger by default. */ ! if (! size) ! size = df->insn_size / 4; ! size += df->insn_size; df->insns = (struct insn_info *) xrealloc (df->insns, size * sizeof (struct insn_info)); --- 297,316 ---- /* Local memory allocation/deallocation routines. */ ! /* Increase the insn info table to have space for at least SIZE + 1 ! elements. */ static void df_insn_table_realloc (df, size) struct df *df; ! unsigned int size; { ! size++; ! if (size <= df->insn_size) ! return; ! /* Make the table a little larger than requested, so we don't need ! to enlarge it so often. */ ! size += df->insn_size / 4; df->insns = (struct insn_info *) xrealloc (df->insns, size * sizeof (struct insn_info)); *************** df_reg_table_realloc (df, size) *** 356,361 **** --- 339,346 ---- size = df->reg_size / 4; size += df->reg_size; + if (size < max_reg_num ()) + size = max_reg_num (); df->regs = (struct reg_info *) xrealloc (df->regs, size * sizeof (struct reg_info)); *************** df_def_table_realloc (df, size) *** 393,399 **** /* Link all the new refs together, overloading the chain field. */ for (i = 0; i < size - 1; i++) ! refs[i].chain = (struct df_link *)(refs + i + 1); refs[size - 1].chain = 0; } #endif --- 378,384 ---- /* Link all the new refs together, overloading the chain field. */ for (i = 0; i < size - 1; i++) ! refs[i].chain = (struct df_link *) (refs + i + 1); refs[size - 1].chain = 0; } #endif *************** df_bitmaps_alloc (df, flags) *** 406,416 **** struct df *df; int flags; { - unsigned int i; int dflags = 0; /* Free the bitmaps if they need resizing. */ ! if ((flags & DF_LR) && df->n_regs < (unsigned int)max_reg_num ()) dflags |= DF_LR | DF_RU; if ((flags & DF_RU) && df->n_uses < df->use_id) dflags |= DF_RU; --- 391,401 ---- struct df *df; int flags; { int dflags = 0; + basic_block bb; /* Free the bitmaps if they need resizing. */ ! if ((flags & DF_LR) && df->n_regs < (unsigned int) max_reg_num ()) dflags |= DF_LR | DF_RU; if ((flags & DF_RU) && df->n_uses < df->use_id) dflags |= DF_RU; *************** df_bitmaps_alloc (df, flags) *** 423,431 **** df->n_defs = df->def_id; df->n_uses = df->use_id; ! for (i = 0; i < df->n_bbs; i++) { - basic_block bb = BASIC_BLOCK (i); struct bb_info *bb_info = DF_BB_INFO (df, bb); if (flags & DF_RD && ! bb_info->rd_in) --- 408,415 ---- df->n_defs = df->def_id; df->n_uses = df->use_id; ! FOR_EACH_BB (bb) { struct bb_info *bb_info = DF_BB_INFO (df, bb); if (flags & DF_RD && ! bb_info->rd_in) *************** df_bitmaps_free (df, flags) *** 474,484 **** struct df *df ATTRIBUTE_UNUSED; int flags; { ! unsigned int i; ! for (i = 0; i < df->n_bbs; i++) { - basic_block bb = BASIC_BLOCK (i); struct bb_info *bb_info = DF_BB_INFO (df, bb); if (!bb_info) --- 458,467 ---- struct df *df ATTRIBUTE_UNUSED; int flags; { ! basic_block bb; ! FOR_EACH_BB (bb) { struct bb_info *bb_info = DF_BB_INFO (df, bb); if (!bb_info) *************** df_bitmaps_free (df, flags) *** 527,540 **** } ! /* Allocate and initialise dataflow memory. */ static void df_alloc (df, n_regs) struct df *df; int n_regs; { int n_insns; ! int i; gcc_obstack_init (&df_ref_obstack); --- 510,523 ---- } ! /* Allocate and initialize dataflow memory. */ static void df_alloc (df, n_regs) struct df *df; int n_regs; { int n_insns; ! basic_block bb; gcc_obstack_init (&df_ref_obstack); *************** df_alloc (df, n_regs) *** 555,561 **** df->uses = xmalloc (df->use_size * sizeof (*df->uses)); df->n_regs = n_regs; ! df->n_bbs = n_basic_blocks; /* Allocate temporary working array used during local dataflow analysis. */ df->reg_def_last = xmalloc (df->n_regs * sizeof (struct ref *)); --- 538,544 ---- df->uses = xmalloc (df->use_size * sizeof (*df->uses)); df->n_regs = n_regs; ! df->n_bbs = last_basic_block; /* Allocate temporary working array used during local dataflow analysis. */ df->reg_def_last = xmalloc (df->n_regs * sizeof (struct ref *)); *************** df_alloc (df, n_regs) *** 569,579 **** df->flags = 0; ! df->bbs = xcalloc (df->n_bbs, sizeof (struct bb_info)); df->all_blocks = BITMAP_XMALLOC (); ! for (i = 0; i < n_basic_blocks; i++) ! bitmap_set_bit (df->all_blocks, i); } --- 552,562 ---- df->flags = 0; ! df->bbs = xcalloc (last_basic_block, sizeof (struct bb_info)); df->all_blocks = BITMAP_XMALLOC (); ! FOR_EACH_BB (bb) ! bitmap_set_bit (df->all_blocks, bb->index); } *************** static rtx df_reg_use_gen (regno) *** 633,640 **** rtx reg; rtx use; ! reg = regno >= FIRST_PSEUDO_REGISTER ! ? regno_reg_rtx[regno] : gen_rtx_REG (reg_raw_mode[regno], regno); use = gen_rtx_USE (GET_MODE (reg), reg); return use; --- 616,622 ---- rtx reg; rtx use; ! reg = regno_reg_rtx[regno]; use = gen_rtx_USE (GET_MODE (reg), reg); return use; *************** static rtx df_reg_clobber_gen (regno) *** 648,655 **** rtx reg; rtx use; ! reg = regno >= FIRST_PSEUDO_REGISTER ! ? regno_reg_rtx[regno] : gen_rtx_REG (reg_raw_mode[regno], regno); use = gen_rtx_CLOBBER (GET_MODE (reg), reg); return use; --- 630,636 ---- rtx reg; rtx use; ! reg = regno_reg_rtx[regno]; use = gen_rtx_CLOBBER (GET_MODE (reg), reg); return use; *************** df_ref_record (df, reg, loc, insn, ref_t *** 881,887 **** XXX Is that true? We could also use the global word_mode variable. */ if (GET_CODE (reg) == SUBREG && (GET_MODE_SIZE (GET_MODE (reg)) < GET_MODE_SIZE (word_mode) ! || GET_MODE_SIZE (GET_MODE (reg)) >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (reg))))) { loc = &SUBREG_REG (reg); --- 862,868 ---- XXX Is that true? We could also use the global word_mode variable. */ if (GET_CODE (reg) == SUBREG && (GET_MODE_SIZE (GET_MODE (reg)) < GET_MODE_SIZE (word_mode) ! || GET_MODE_SIZE (GET_MODE (reg)) >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (reg))))) { loc = &SUBREG_REG (reg); *************** df_ref_record (df, reg, loc, insn, ref_t *** 902,911 **** are really referenced. E.g. a (subreg:SI (reg:DI 0) 0) does _not_ reference the whole reg 0 in DI mode (which would also include reg 1, at least, if 0 and 1 are SImode registers). */ ! endregno = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg)); for (i = regno; i < endregno; i++) ! df_ref_record_1 (df, gen_rtx_REG (reg_raw_mode[i], i), loc, insn, ref_type, ref_flags); } else --- 883,896 ---- are really referenced. E.g. a (subreg:SI (reg:DI 0) 0) does _not_ reference the whole reg 0 in DI mode (which would also include reg 1, at least, if 0 and 1 are SImode registers). */ ! endregno = HARD_REGNO_NREGS (regno, GET_MODE (reg)); ! if (GET_CODE (reg) == SUBREG) ! regno += subreg_regno_offset (regno, GET_MODE (SUBREG_REG (reg)), ! SUBREG_BYTE (reg), GET_MODE (reg)); ! endregno += regno; for (i = regno; i < endregno; i++) ! df_ref_record_1 (df, regno_reg_rtx[i], loc, insn, ref_type, ref_flags); } else *************** df_ref_record (df, reg, loc, insn, ref_t *** 914,931 **** } } ! /* Writes to SUBREG of inndermode wider than word and outermode shorter than ! word are read-modify-write. */ static inline bool read_modify_subreg_p (x) rtx x; { if (GET_CODE (x) != SUBREG) return false; ! if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) <= UNITS_PER_WORD) return false; ! if (GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD) return false; return true; } --- 899,921 ---- } } ! /* Writes to paradoxical subregs, or subregs which are too narrow ! are read-modify-write. */ static inline bool read_modify_subreg_p (x) rtx x; { + unsigned int isize, osize; if (GET_CODE (x) != SUBREG) return false; ! isize = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))); ! osize = GET_MODE_SIZE (GET_MODE (x)); ! if (isize <= osize) ! return true; ! if (isize <= UNITS_PER_WORD) return false; ! if (osize >= UNITS_PER_WORD) return false; return true; } *************** df_def_record_1 (df, x, bb, insn) *** 949,962 **** int i; for (i = XVECLEN (dst, 0) - 1; i >= 0; i--) ! df_def_record_1 (df, XVECEXP (dst, 0, i), bb, insn); return; } /* May be, we should flag the use of strict_low_part somehow. Might be handy for the reg allocator. */ while (GET_CODE (dst) == STRICT_LOW_PART ! || GET_CODE (dst) == ZERO_EXTRACT || GET_CODE (dst) == SIGN_EXTRACT || read_modify_subreg_p (dst)) { --- 939,959 ---- int i; for (i = XVECLEN (dst, 0) - 1; i >= 0; i--) ! df_def_record_1 (df, XVECEXP (dst, 0, i), bb, insn); return; } + #ifdef CLASS_CANNOT_CHANGE_MODE + if (GET_CODE (dst) == SUBREG + && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (SUBREG_REG (dst)), + GET_MODE (dst))) + flags |= DF_REF_MODE_CHANGE; + #endif + /* May be, we should flag the use of strict_low_part somehow. Might be handy for the reg allocator. */ while (GET_CODE (dst) == STRICT_LOW_PART ! || GET_CODE (dst) == ZERO_EXTRACT || GET_CODE (dst) == SIGN_EXTRACT || read_modify_subreg_p (dst)) { *************** df_def_record_1 (df, x, bb, insn) *** 967,980 **** loc = &XEXP (dst, 0); dst = *loc; } loc = &XEXP (dst, 0); dst = *loc; flags |= DF_REF_READ_WRITE; } ! ! if (GET_CODE (dst) == REG ! || (GET_CODE (dst) == SUBREG && GET_CODE (SUBREG_REG (dst)) == REG)) ! df_ref_record (df, dst, loc, insn, DF_REF_REG_DEF, flags); } --- 964,983 ---- loc = &XEXP (dst, 0); dst = *loc; } + #ifdef CLASS_CANNOT_CHANGE_MODE + if (GET_CODE (dst) == SUBREG + && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (SUBREG_REG (dst)), + GET_MODE (dst))) + flags |= DF_REF_MODE_CHANGE; + #endif loc = &XEXP (dst, 0); dst = *loc; flags |= DF_REF_READ_WRITE; } ! ! if (GET_CODE (dst) == REG ! || (GET_CODE (dst) == SUBREG && GET_CODE (SUBREG_REG (dst)) == REG)) ! df_ref_record (df, dst, loc, insn, DF_REF_REG_DEF, flags); } *************** df_uses_record (df, loc, ref_type, bb, i *** 1034,1039 **** --- 1037,1043 ---- case CONST_DOUBLE: case CONST_VECTOR: case PC: + case CC0: case ADDR_VEC: case ADDR_DIFF_VEC: return; *************** df_uses_record (df, loc, ref_type, bb, i *** 1062,1067 **** --- 1066,1076 ---- df_uses_record (df, loc, ref_type, bb, insn, flags); return; } + #ifdef CLASS_CANNOT_CHANGE_MODE + if (CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (x), + GET_MODE (SUBREG_REG (x)))) + flags |= DF_REF_MODE_CHANGE; + #endif /* ... Fall through ... */ *************** df_uses_record (df, loc, ref_type, bb, i *** 1078,1096 **** switch (GET_CODE (dst)) { case SUBREG: if (read_modify_subreg_p (dst)) { df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb, ! insn, DF_REF_READ_WRITE); break; } /* ... FALLTHRU ... */ case REG: case PC: ! break; case MEM: ! df_uses_record (df, &XEXP (dst, 0), DF_REF_REG_MEM_STORE, bb, insn, 0); break; --- 1087,1114 ---- switch (GET_CODE (dst)) { + enum df_ref_flags use_flags; case SUBREG: if (read_modify_subreg_p (dst)) { + use_flags = DF_REF_READ_WRITE; + #ifdef CLASS_CANNOT_CHANGE_MODE + if (CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (dst), + GET_MODE (SUBREG_REG (dst)))) + use_flags |= DF_REF_MODE_CHANGE; + #endif df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb, ! insn, use_flags); break; } /* ... FALLTHRU ... */ case REG: + case PARALLEL: case PC: ! case CC0: ! break; case MEM: ! df_uses_record (df, &XEXP (dst, 0), DF_REF_REG_MEM_STORE, bb, insn, 0); break; *************** df_uses_record (df, loc, ref_type, bb, i *** 1099,1106 **** dst = XEXP (dst, 0); if (GET_CODE (dst) != SUBREG) abort (); df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb, ! insn, DF_REF_READ_WRITE); break; case ZERO_EXTRACT: case SIGN_EXTRACT: --- 1117,1130 ---- dst = XEXP (dst, 0); if (GET_CODE (dst) != SUBREG) abort (); + use_flags = DF_REF_READ_WRITE; + #ifdef CLASS_CANNOT_CHANGE_MODE + if (CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (dst), + GET_MODE (SUBREG_REG (dst)))) + use_flags |= DF_REF_MODE_CHANGE; + #endif df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb, ! insn, use_flags); break; case ZERO_EXTRACT: case SIGN_EXTRACT: *************** df_uses_record (df, loc, ref_type, bb, i *** 1135,1141 **** For now, just mark any regs we can find in ASM_OPERANDS as used. */ ! /* For all ASM_OPERANDS, we must traverse the vector of input operands. We can not just fall through here since then we would be confused by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate traditional asms unlike their normal usage. */ --- 1159,1165 ---- For now, just mark any regs we can find in ASM_OPERANDS as used. */ ! /* For all ASM_OPERANDS, we must traverse the vector of input operands. We can not just fall through here since then we would be confused by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate traditional asms unlike their normal usage. */ *************** df_insn_refs_record (df, bb, insn) *** 1217,1228 **** { switch (REG_NOTE_KIND (note)) { ! case REG_EQUIV: ! case REG_EQUAL: ! df_uses_record (df, &XEXP (note, 0), DF_REF_REG_USE, ! bb, insn, 0); ! default: ! break; } } --- 1241,1252 ---- { switch (REG_NOTE_KIND (note)) { ! case REG_EQUIV: ! case REG_EQUAL: ! df_uses_record (df, &XEXP (note, 0), DF_REF_REG_USE, ! bb, insn, 0); ! default: ! break; } } *************** df_insn_refs_record (df, bb, insn) *** 1253,1259 **** { x = df_reg_use_gen (i); df_uses_record (df, &SET_DEST (x), ! DF_REF_REG_USE, bb, insn, 0); } } } --- 1277,1283 ---- { x = df_reg_use_gen (i); df_uses_record (df, &SET_DEST (x), ! DF_REF_REG_USE, bb, insn, 0); } } } *************** df_bb_reg_def_chain_create (df, bb) *** 1355,1360 **** --- 1379,1389 ---- { struct ref *def = link->ref; unsigned int dregno = DF_REF_REGNO (def); + /* Don't add ref's to the chain two times. I.e. only add + new refs. XXX the same could be done by testing if the current + insn is a modified (or a new) one. This would be faster. */ + if (DF_REF_ID (def) < df->def_id_save) + continue; df->regs[dregno].defs = df_link_create (def, df->regs[dregno].defs); *************** df_bb_reg_use_chain_create (df, bb) *** 1404,1409 **** --- 1433,1443 ---- { struct ref *use = link->ref; unsigned int uregno = DF_REF_REGNO (use); + /* Don't add ref's to the chain two times. I.e. only add + new refs. XXX the same could be done by testing if the current + insn is a modified (or a new) one. This would be faster. */ + if (DF_REF_ID (use) < df->use_id_save) + continue; df->regs[uregno].uses = df_link_create (use, df->regs[uregno].uses); *************** df_bb_rd_local_compute (df, bb) *** 1673,1679 **** bitmap_set_bit (bb_info->rd_gen, DF_REF_ID (def)); } } ! bb_info->rd_valid = 1; } --- 1707,1713 ---- bitmap_set_bit (bb_info->rd_gen, DF_REF_ID (def)); } } ! bb_info->rd_valid = 1; } *************** df_bb_ru_local_compute (df, bb) *** 1703,1709 **** /* This is much more tricky than computing reaching defs. With reaching defs, defs get killed by other defs. With upwards exposed uses, these get killed by defs with the same regno. */ ! struct bb_info *bb_info = DF_BB_INFO (df, bb); rtx insn; --- 1737,1743 ---- /* This is much more tricky than computing reaching defs. With reaching defs, defs get killed by other defs. With upwards exposed uses, these get killed by defs with the same regno. */ ! struct bb_info *bb_info = DF_BB_INFO (df, bb); rtx insn; *************** df_analyse_1 (df, blocks, flags, update) *** 1946,1951 **** --- 1980,1987 ---- int aflags; int dflags; int i; + basic_block bb; + dflags = 0; aflags = flags; if (flags & DF_UD_CHAIN) *************** df_analyse_1 (df, blocks, flags, update) *** 1961,1967 **** aflags |= DF_LR; if (! blocks) ! blocks = df->all_blocks; df->flags = flags; if (update) --- 1997,2003 ---- aflags |= DF_LR; if (! blocks) ! blocks = df->all_blocks; df->flags = flags; if (update) *************** df_analyse_1 (df, blocks, flags, update) *** 2009,2047 **** df_reg_use_chain_create (df, blocks); } ! df->dfs_order = xmalloc (sizeof(int) * n_basic_blocks); ! df->rc_order = xmalloc (sizeof(int) * n_basic_blocks); ! df->rts_order = xmalloc (sizeof(int) * n_basic_blocks); ! df->inverse_dfs_map = xmalloc (sizeof(int) * n_basic_blocks); ! df->inverse_rc_map = xmalloc (sizeof(int) * n_basic_blocks); ! df->inverse_rts_map = xmalloc (sizeof(int) * n_basic_blocks); ! flow_depth_first_order_compute (df->dfs_order, df->rc_order); flow_reverse_top_sort_order_compute (df->rts_order); ! for (i = 0; i < n_basic_blocks; i ++) ! { ! df->inverse_dfs_map[df->dfs_order[i]] = i; ! df->inverse_rc_map[df->rc_order[i]] = i; ! df->inverse_rts_map[df->rts_order[i]] = i; ! } if (aflags & DF_RD) { /* Compute the sets of gens and kills for the defs of each bb. */ df_rd_local_compute (df, df->flags & DF_RD ? blocks : df->all_blocks); { ! int i; ! bitmap *in = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *out = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *gen = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *kill = xmalloc (sizeof (bitmap) * n_basic_blocks); ! for (i = 0; i < n_basic_blocks; i ++) { ! in[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_in; ! out[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_out; ! gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_gen; ! kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_kill; } ! iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, FORWARD, UNION, df_rd_transfer_function, df->inverse_rc_map, NULL); free (in); --- 2045,2082 ---- df_reg_use_chain_create (df, blocks); } ! df->dfs_order = xmalloc (sizeof (int) * n_basic_blocks); ! df->rc_order = xmalloc (sizeof (int) * n_basic_blocks); ! df->rts_order = xmalloc (sizeof (int) * n_basic_blocks); ! df->inverse_dfs_map = xmalloc (sizeof (int) * last_basic_block); ! df->inverse_rc_map = xmalloc (sizeof (int) * last_basic_block); ! df->inverse_rts_map = xmalloc (sizeof (int) * last_basic_block); ! flow_depth_first_order_compute (df->dfs_order, df->rc_order); flow_reverse_top_sort_order_compute (df->rts_order); ! for (i = 0; i < n_basic_blocks; i++) ! { ! df->inverse_dfs_map[df->dfs_order[i]] = i; ! df->inverse_rc_map[df->rc_order[i]] = i; ! df->inverse_rts_map[df->rts_order[i]] = i; ! } if (aflags & DF_RD) { /* Compute the sets of gens and kills for the defs of each bb. */ df_rd_local_compute (df, df->flags & DF_RD ? blocks : df->all_blocks); { ! bitmap *in = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *out = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *gen = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *kill = xmalloc (sizeof (bitmap) * last_basic_block); ! FOR_EACH_BB (bb) { ! in[bb->index] = DF_BB_INFO (df, bb)->rd_in; ! out[bb->index] = DF_BB_INFO (df, bb)->rd_out; ! gen[bb->index] = DF_BB_INFO (df, bb)->rd_gen; ! kill[bb->index] = DF_BB_INFO (df, bb)->rd_kill; } ! iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, FORWARD, UNION, df_rd_transfer_function, df->inverse_rc_map, NULL); free (in); *************** df_analyse_1 (df, blocks, flags, update) *** 2066,2084 **** uses in each bb. */ df_ru_local_compute (df, df->flags & DF_RU ? blocks : df->all_blocks); { ! int i; ! bitmap *in = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *out = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *gen = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *kill = xmalloc (sizeof (bitmap) * n_basic_blocks); ! for (i = 0; i < n_basic_blocks; i ++) { ! in[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_in; ! out[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_out; ! gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_gen; ! kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_kill; } ! iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, BACKWARD, UNION, df_ru_transfer_function, df->inverse_rts_map, NULL); free (in); --- 2101,2118 ---- uses in each bb. */ df_ru_local_compute (df, df->flags & DF_RU ? blocks : df->all_blocks); { ! bitmap *in = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *out = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *gen = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *kill = xmalloc (sizeof (bitmap) * last_basic_block); ! FOR_EACH_BB (bb) { ! in[bb->index] = DF_BB_INFO (df, bb)->ru_in; ! out[bb->index] = DF_BB_INFO (df, bb)->ru_out; ! gen[bb->index] = DF_BB_INFO (df, bb)->ru_gen; ! kill[bb->index] = DF_BB_INFO (df, bb)->ru_kill; } ! iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, BACKWARD, UNION, df_ru_transfer_function, df->inverse_rts_map, NULL); free (in); *************** df_analyse_1 (df, blocks, flags, update) *** 2099,2124 **** /* Free up bitmaps that are no longer required. */ if (dflags) ! df_bitmaps_free (df, dflags); if (aflags & DF_LR) { /* Compute the sets of defs and uses of live variables. */ ! df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks); { ! int i; ! bitmap *in = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *out = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *use = xmalloc (sizeof (bitmap) * n_basic_blocks); ! bitmap *def = xmalloc (sizeof (bitmap) * n_basic_blocks); ! for (i = 0; i < n_basic_blocks; i ++) { ! in[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_in; ! out[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_out; ! use[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_use; ! def[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_def; } ! iterative_dataflow_bitmap (in, out, use, def, df->all_blocks, BACKWARD, UNION, df_lr_transfer_function, df->inverse_rts_map, NULL); free (in); --- 2133,2157 ---- /* Free up bitmaps that are no longer required. */ if (dflags) ! df_bitmaps_free (df, dflags); if (aflags & DF_LR) { /* Compute the sets of defs and uses of live variables. */ ! df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks); { ! bitmap *in = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *out = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *use = xmalloc (sizeof (bitmap) * last_basic_block); ! bitmap *def = xmalloc (sizeof (bitmap) * last_basic_block); ! FOR_EACH_BB (bb) { ! in[bb->index] = DF_BB_INFO (df, bb)->lr_in; ! out[bb->index] = DF_BB_INFO (df, bb)->lr_out; ! use[bb->index] = DF_BB_INFO (df, bb)->lr_use; ! def[bb->index] = DF_BB_INFO (df, bb)->lr_def; } ! iterative_dataflow_bitmap (in, out, use, def, df->all_blocks, BACKWARD, UNION, df_lr_transfer_function, df->inverse_rts_map, NULL); free (in); *************** df_analyse_1 (df, blocks, flags, update) *** 2141,2147 **** } ! /* Initialise dataflow analysis. */ struct df * df_init () { --- 2174,2180 ---- } ! /* Initialize dataflow analysis. */ struct df * df_init () { *************** df_bb_refs_update (df, bb) *** 2229,2236 **** /* Scan the insn for refs. */ df_insn_refs_record (df, bb, insn); - - bitmap_clear_bit (df->insns_modified, uid); count++; } if (insn == bb->end) --- 2262,2267 ---- *************** df_refs_update (df) *** 2248,2254 **** basic_block bb; int count = 0; ! if ((unsigned int)max_reg_num () >= df->reg_size) df_reg_table_realloc (df, 0); df_refs_queue (df); --- 2279,2285 ---- basic_block bb; int count = 0; ! if ((unsigned int) max_reg_num () >= df->reg_size) df_reg_table_realloc (df, 0); df_refs_queue (df); *************** df_refs_update (df) *** 2263,2281 **** } ! /* Return non-zero if any of the requested blocks in the bitmap BLOCKS have been modified. */ static int df_modified_p (df, blocks) struct df *df; bitmap blocks; { - unsigned int j; int update = 0; ! for (j = 0; j < df->n_bbs; j++) ! if (bitmap_bit_p (df->bbs_modified, j) ! && (! blocks || (blocks == (bitmap) -1) || bitmap_bit_p (blocks, j))) { update = 1; break; --- 2294,2315 ---- } ! /* Return nonzero if any of the requested blocks in the bitmap BLOCKS have been modified. */ static int df_modified_p (df, blocks) struct df *df; bitmap blocks; { int update = 0; + basic_block bb; ! if (!df->n_bbs) ! return 0; ! ! FOR_EACH_BB (bb) ! if (bitmap_bit_p (df->bbs_modified, bb->index) ! && (! blocks || (blocks == (bitmap) -1) || bitmap_bit_p (blocks, bb->index))) { update = 1; break; *************** df_analyse (df, blocks, flags) *** 2298,2304 **** /* We could deal with additional basic blocks being created by rescanning everything again. */ ! if (df->n_bbs && df->n_bbs != (unsigned int)n_basic_blocks) abort (); update = df_modified_p (df, blocks); --- 2332,2338 ---- /* We could deal with additional basic blocks being created by rescanning everything again. */ ! if (df->n_bbs && df->n_bbs != (unsigned int) last_basic_block) abort (); update = df_modified_p (df, blocks); *************** df_analyse (df, blocks, flags) *** 2311,2317 **** /* Recompute everything from scratch. */ df_free (df); } ! /* Allocate and initialise data structures. */ df_alloc (df, max_reg_num ()); df_analyse_1 (df, 0, flags, 0); update = 1; --- 2345,2351 ---- /* Recompute everything from scratch. */ df_free (df); } ! /* Allocate and initialize data structures. */ df_alloc (df, max_reg_num ()); df_analyse_1 (df, 0, flags, 0); update = 1; *************** df_analyse (df, blocks, flags) *** 2326,2331 **** --- 2360,2366 ---- df_analyse_1 (df, blocks, flags, 1); bitmap_zero (df->bbs_modified); + bitmap_zero (df->insns_modified); } } return update; *************** df_refs_unlink (df, blocks) *** 2408,2417 **** } else { ! FOR_ALL_BBS (bb, ! { df_bb_refs_unlink (df, bb); - }); } } #endif --- 2443,2450 ---- } else { ! FOR_EACH_BB (bb) df_bb_refs_unlink (df, bb); } } #endif *************** df_insn_modify (df, bb, insn) *** 2455,2463 **** unsigned int uid; uid = INSN_UID (insn); - if (uid >= df->insn_size) ! df_insn_table_realloc (df, 0); bitmap_set_bit (df->bbs_modified, bb->index); bitmap_set_bit (df->insns_modified, uid); --- 2488,2495 ---- unsigned int uid; uid = INSN_UID (insn); if (uid >= df->insn_size) ! df_insn_table_realloc (df, uid); bitmap_set_bit (df->bbs_modified, bb->index); bitmap_set_bit (df->insns_modified, uid); *************** df_insn_modify (df, bb, insn) *** 2470,2477 **** } ! typedef struct replace_args ! { rtx match; rtx replacement; rtx insn; --- 2502,2508 ---- } ! typedef struct replace_args { rtx match; rtx replacement; rtx insn; *************** df_insns_modify (df, bb, first_insn, las *** 2744,2750 **** uid = INSN_UID (insn); if (uid >= df->insn_size) ! df_insn_table_realloc (df, 0); df_insn_modify (df, bb, insn); --- 2775,2781 ---- uid = INSN_UID (insn); if (uid >= df->insn_size) ! df_insn_table_realloc (df, uid); df_insn_modify (df, bb, insn); *************** df_insn_dominates_all_uses_p (df, bb, in *** 2924,2930 **** } ! /* Return non-zero if all DF dominates all the uses within the bitmap BLOCKS. */ static int df_def_dominates_uses_p (df, def, blocks) --- 2955,2961 ---- } ! /* Return nonzero if all DF dominates all the uses within the bitmap BLOCKS. */ static int df_def_dominates_uses_p (df, def, blocks) *************** df_def_dominates_uses_p (df, def, blocks *** 2955,2961 **** } ! /* Return non-zero if all the defs of INSN within BB dominates all the corresponding uses. */ int df_insn_dominates_uses_p (df, bb, insn, blocks) --- 2986,2992 ---- } ! /* Return nonzero if all the defs of INSN within BB dominates all the corresponding uses. */ int df_insn_dominates_uses_p (df, bb, insn, blocks) *************** df_regno_bb (df, regno) *** 3002,3008 **** } ! /* Return non-zero if REG used in multiple basic blocks. */ int df_reg_global_p (df, reg) struct df *df; --- 3033,3039 ---- } ! /* Return nonzero if REG used in multiple basic blocks. */ int df_reg_global_p (df, reg) struct df *df; *************** df_reg_lifetime (df, reg) *** 3022,3028 **** } ! /* Return non-zero if REG live at start of BB. */ int df_bb_reg_live_start_p (df, bb, reg) struct df *df ATTRIBUTE_UNUSED; --- 3053,3059 ---- } ! /* Return nonzero if REG live at start of BB. */ int df_bb_reg_live_start_p (df, bb, reg) struct df *df ATTRIBUTE_UNUSED; *************** df_bb_reg_live_start_p (df, bb, reg) *** 3040,3046 **** } ! /* Return non-zero if REG live at end of BB. */ int df_bb_reg_live_end_p (df, bb, reg) struct df *df ATTRIBUTE_UNUSED; --- 3071,3077 ---- } ! /* Return nonzero if REG live at end of BB. */ int df_bb_reg_live_end_p (df, bb, reg) struct df *df ATTRIBUTE_UNUSED; *************** df_chain_dump_regno (link, file) *** 3260,3268 **** for (; link; link = link->next) { fprintf (file, "%c%d(%d) ", ! DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', ! DF_REF_ID (link->ref), ! DF_REF_REGNO (link->ref)); } fprintf (file, "}"); } --- 3291,3299 ---- for (; link; link = link->next) { fprintf (file, "%c%d(%d) ", ! DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', ! DF_REF_ID (link->ref), ! DF_REF_REGNO (link->ref)); } fprintf (file, "}"); } *************** df_dump (df, flags, file) *** 3274,3281 **** int flags; FILE *file; { - unsigned int i; unsigned int j; if (! df || ! file) return; --- 3305,3312 ---- int flags; FILE *file; { unsigned int j; + basic_block bb; if (! df || ! file) return; *************** df_dump (df, flags, file) *** 3286,3307 **** if (flags & DF_RD) { fprintf (file, "Reaching defs:\n"); ! for (i = 0; i < df->n_bbs; i++) { - basic_block bb = BASIC_BLOCK (i); struct bb_info *bb_info = DF_BB_INFO (df, bb); if (! bb_info->rd_in) continue; ! fprintf (file, "bb %d in \t", i); dump_bitmap (file, bb_info->rd_in); ! fprintf (file, "bb %d gen \t", i); dump_bitmap (file, bb_info->rd_gen); ! fprintf (file, "bb %d kill\t", i); dump_bitmap (file, bb_info->rd_kill); ! fprintf (file, "bb %d out \t", i); dump_bitmap (file, bb_info->rd_out); } } --- 3317,3339 ---- if (flags & DF_RD) { + basic_block bb; + fprintf (file, "Reaching defs:\n"); ! FOR_EACH_BB (bb) { struct bb_info *bb_info = DF_BB_INFO (df, bb); if (! bb_info->rd_in) continue; ! fprintf (file, "bb %d in \t", bb->index); dump_bitmap (file, bb_info->rd_in); ! fprintf (file, "bb %d gen \t", bb->index); dump_bitmap (file, bb_info->rd_gen); ! fprintf (file, "bb %d kill\t", bb->index); dump_bitmap (file, bb_info->rd_kill); ! fprintf (file, "bb %d out \t", bb->index); dump_bitmap (file, bb_info->rd_out); } } *************** df_dump (df, flags, file) *** 3329,3349 **** if (flags & DF_RU) { fprintf (file, "Reaching uses:\n"); ! for (i = 0; i < df->n_bbs; i++) { - basic_block bb = BASIC_BLOCK (i); struct bb_info *bb_info = DF_BB_INFO (df, bb); if (! bb_info->ru_in) continue; ! fprintf (file, "bb %d in \t", i); dump_bitmap (file, bb_info->ru_in); ! fprintf (file, "bb %d gen \t", i); dump_bitmap (file, bb_info->ru_gen); ! fprintf (file, "bb %d kill\t", i); dump_bitmap (file, bb_info->ru_kill); ! fprintf (file, "bb %d out \t", i); dump_bitmap (file, bb_info->ru_out); } } --- 3361,3380 ---- if (flags & DF_RU) { fprintf (file, "Reaching uses:\n"); ! FOR_EACH_BB (bb) { struct bb_info *bb_info = DF_BB_INFO (df, bb); if (! bb_info->ru_in) continue; ! fprintf (file, "bb %d in \t", bb->index); dump_bitmap (file, bb_info->ru_in); ! fprintf (file, "bb %d gen \t", bb->index); dump_bitmap (file, bb_info->ru_gen); ! fprintf (file, "bb %d kill\t", bb->index); dump_bitmap (file, bb_info->ru_kill); ! fprintf (file, "bb %d out \t", bb->index); dump_bitmap (file, bb_info->ru_out); } } *************** df_dump (df, flags, file) *** 3371,3391 **** if (flags & DF_LR) { fprintf (file, "Live regs:\n"); ! for (i = 0; i < df->n_bbs; i++) { - basic_block bb = BASIC_BLOCK (i); struct bb_info *bb_info = DF_BB_INFO (df, bb); if (! bb_info->lr_in) continue; ! fprintf (file, "bb %d in \t", i); dump_bitmap (file, bb_info->lr_in); ! fprintf (file, "bb %d use \t", i); dump_bitmap (file, bb_info->lr_use); ! fprintf (file, "bb %d def \t", i); dump_bitmap (file, bb_info->lr_def); ! fprintf (file, "bb %d out \t", i); dump_bitmap (file, bb_info->lr_out); } } --- 3402,3421 ---- if (flags & DF_LR) { fprintf (file, "Live regs:\n"); ! FOR_EACH_BB (bb) { struct bb_info *bb_info = DF_BB_INFO (df, bb); if (! bb_info->lr_in) continue; ! fprintf (file, "bb %d in \t", bb->index); dump_bitmap (file, bb_info->lr_in); ! fprintf (file, "bb %d use \t", bb->index); dump_bitmap (file, bb_info->lr_use); ! fprintf (file, "bb %d def \t", bb->index); dump_bitmap (file, bb_info->lr_def); ! fprintf (file, "bb %d out \t", bb->index); dump_bitmap (file, bb_info->lr_out); } } *************** df_dump (df, flags, file) *** 3401,3442 **** && (reg_info[j].n_uses || reg_info[j].n_defs)) || ((flags & DF_RD_CHAIN) && reg_info[j].defs) || ((flags & DF_RU_CHAIN) && reg_info[j].uses)) ! { ! fprintf (file, "reg %d", j); ! if ((flags & DF_RD_CHAIN) && (flags & DF_RU_CHAIN)) ! { ! basic_block bb = df_regno_bb (df, j); ! if (bb) ! fprintf (file, " bb %d", bb->index); ! else ! fprintf (file, " bb ?"); ! } ! if (flags & DF_REG_INFO) ! { ! fprintf (file, " life %d", reg_info[j].lifetime); ! } ! if ((flags & DF_REG_INFO) || (flags & DF_RD_CHAIN)) ! { ! fprintf (file, " defs "); ! if (flags & DF_REG_INFO) ! fprintf (file, "%d ", reg_info[j].n_defs); ! if (flags & DF_RD_CHAIN) ! df_chain_dump (reg_info[j].defs, file); ! } ! if ((flags & DF_REG_INFO) || (flags & DF_RU_CHAIN)) ! { ! fprintf (file, " uses "); ! if (flags & DF_REG_INFO) ! fprintf (file, "%d ", reg_info[j].n_uses); ! if (flags & DF_RU_CHAIN) ! df_chain_dump (reg_info[j].uses, file); ! } ! fprintf (file, "\n"); ! } } } fprintf (file, "\n"); --- 3431,3472 ---- && (reg_info[j].n_uses || reg_info[j].n_defs)) || ((flags & DF_RD_CHAIN) && reg_info[j].defs) || ((flags & DF_RU_CHAIN) && reg_info[j].uses)) ! { ! fprintf (file, "reg %d", j); ! if ((flags & DF_RD_CHAIN) && (flags & DF_RU_CHAIN)) ! { ! basic_block bb = df_regno_bb (df, j); ! if (bb) ! fprintf (file, " bb %d", bb->index); ! else ! fprintf (file, " bb ?"); ! } ! if (flags & DF_REG_INFO) ! { ! fprintf (file, " life %d", reg_info[j].lifetime); ! } ! if ((flags & DF_REG_INFO) || (flags & DF_RD_CHAIN)) ! { ! fprintf (file, " defs "); ! if (flags & DF_REG_INFO) ! fprintf (file, "%d ", reg_info[j].n_defs); ! if (flags & DF_RD_CHAIN) ! df_chain_dump (reg_info[j].defs, file); ! } ! if ((flags & DF_REG_INFO) || (flags & DF_RU_CHAIN)) ! { ! fprintf (file, " uses "); ! if (flags & DF_REG_INFO) ! fprintf (file, "%d ", reg_info[j].n_uses); ! if (flags & DF_RU_CHAIN) ! df_chain_dump (reg_info[j].uses, file); ! } ! fprintf (file, "\n"); ! } } } fprintf (file, "\n"); *************** df_insn_debug (df, insn, file) *** 3458,3464 **** if (df->insns[uid].defs) bbi = DF_REF_BBNO (df->insns[uid].defs->ref); ! else if (df->insns[uid].uses) bbi = DF_REF_BBNO (df->insns[uid].uses->ref); else bbi = -1; --- 3488,3494 ---- if (df->insns[uid].defs) bbi = DF_REF_BBNO (df->insns[uid].defs->ref); ! else if (df->insns[uid].uses) bbi = DF_REF_BBNO (df->insns[uid].uses->ref); else bbi = -1; *************** df_insn_debug_regno (df, insn, file) *** 3486,3498 **** if (df->insns[uid].defs) bbi = DF_REF_BBNO (df->insns[uid].defs->ref); ! else if (df->insns[uid].uses) bbi = DF_REF_BBNO (df->insns[uid].uses->ref); else bbi = -1; fprintf (file, "insn %d bb %d luid %d defs ", ! uid, bbi, DF_INSN_LUID (df, insn)); df_chain_dump_regno (df->insns[uid].defs, file); fprintf (file, " uses "); df_chain_dump_regno (df->insns[uid].uses, file); --- 3516,3528 ---- if (df->insns[uid].defs) bbi = DF_REF_BBNO (df->insns[uid].defs->ref); ! else if (df->insns[uid].uses) bbi = DF_REF_BBNO (df->insns[uid].uses->ref); else bbi = -1; fprintf (file, "insn %d bb %d luid %d defs ", ! uid, bbi, DF_INSN_LUID (df, insn)); df_chain_dump_regno (df->insns[uid].defs, file); fprintf (file, " uses "); df_chain_dump_regno (df->insns[uid].uses, file); *************** debug_df_chain (link) *** 3595,3603 **** /* Hybrid search algorithm from "Implementation Techniques for Efficient Data-Flow Analysis of Large Programs". */ ! static void ! hybrid_search_bitmap (block, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data) basic_block block; bitmap *in, *out, *gen, *kill; --- 3625,3633 ---- /* Hybrid search algorithm from "Implementation Techniques for Efficient Data-Flow Analysis of Large Programs". */ ! static void ! hybrid_search_bitmap (block, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data) basic_block block; bitmap *in, *out, *gen, *kill; *************** hybrid_search_bitmap (block, in, out, ge *** 3611,3617 **** int changed; int i = block->index; edge e; ! basic_block bb= block; SET_BIT (visited, block->index); if (TEST_BIT (pending, block->index)) { --- 3641,3647 ---- int changed; int i = block->index; edge e; ! basic_block bb = block; SET_BIT (visited, block->index); if (TEST_BIT (pending, block->index)) { *************** hybrid_search_bitmap (block, in, out, ge *** 3634,3649 **** } } } ! else { /* Calculate of successor ins */ ! bitmap_zero(out[i]); for (e = bb->succ; e != 0; e = e->succ_next) { if (e->dest == EXIT_BLOCK_PTR) continue; switch (conf_op) ! { case UNION: bitmap_a_or_b (out[i], out[i], in[e->dest->index]); break; --- 3664,3679 ---- } } } ! else { /* Calculate of successor ins */ ! bitmap_zero (out[i]); for (e = bb->succ; e != 0; e = e->succ_next) { if (e->dest == EXIT_BLOCK_PTR) continue; switch (conf_op) ! { case UNION: bitmap_a_or_b (out[i], out[i], in[e->dest->index]); break; *************** hybrid_search_bitmap (block, in, out, ge *** 3652,3658 **** break; } } ! } /* Common part */ (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); RESET_BIT (pending, i); --- 3682,3688 ---- break; } } ! } /* Common part */ (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); RESET_BIT (pending, i); *************** hybrid_search_bitmap (block, in, out, ge *** 3685,3692 **** if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) continue; if (!TEST_BIT (visited, e->dest->index)) ! hybrid_search_bitmap (e->dest, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } --- 3715,3722 ---- if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) continue; if (!TEST_BIT (visited, e->dest->index)) ! hybrid_search_bitmap (e->dest, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } *************** hybrid_search_bitmap (block, in, out, ge *** 3697,3704 **** if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) continue; if (!TEST_BIT (visited, e->src->index)) ! hybrid_search_bitmap (e->src, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } --- 3727,3734 ---- if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) continue; if (!TEST_BIT (visited, e->src->index)) ! hybrid_search_bitmap (e->src, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } *************** hybrid_search_bitmap (block, in, out, ge *** 3706,3713 **** /* Hybrid search for sbitmaps, rather than bitmaps. */ ! static void ! hybrid_search_sbitmap (block, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data) basic_block block; --- 3736,3743 ---- /* Hybrid search for sbitmaps, rather than bitmaps. */ ! static void ! hybrid_search_sbitmap (block, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data) basic_block block; *************** hybrid_search_sbitmap (block, in, out, g *** 3722,3728 **** int changed; int i = block->index; edge e; ! basic_block bb= block; SET_BIT (visited, block->index); if (TEST_BIT (pending, block->index)) { --- 3752,3758 ---- int changed; int i = block->index; edge e; ! basic_block bb = block; SET_BIT (visited, block->index); if (TEST_BIT (pending, block->index)) { *************** hybrid_search_sbitmap (block, in, out, g *** 3745,3760 **** } } } ! else { /* Calculate of successor ins */ ! sbitmap_zero(out[i]); for (e = bb->succ; e != 0; e = e->succ_next) { if (e->dest == EXIT_BLOCK_PTR) continue; switch (conf_op) ! { case UNION: sbitmap_a_or_b (out[i], out[i], in[e->dest->index]); break; --- 3775,3790 ---- } } } ! else { /* Calculate of successor ins */ ! sbitmap_zero (out[i]); for (e = bb->succ; e != 0; e = e->succ_next) { if (e->dest == EXIT_BLOCK_PTR) continue; switch (conf_op) ! { case UNION: sbitmap_a_or_b (out[i], out[i], in[e->dest->index]); break; *************** hybrid_search_sbitmap (block, in, out, g *** 3763,3769 **** break; } } ! } /* Common part */ (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); RESET_BIT (pending, i); --- 3793,3799 ---- break; } } ! } /* Common part */ (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); RESET_BIT (pending, i); *************** hybrid_search_sbitmap (block, in, out, g *** 3796,3803 **** if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) continue; if (!TEST_BIT (visited, e->dest->index)) ! hybrid_search_sbitmap (e->dest, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } --- 3826,3833 ---- if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) continue; if (!TEST_BIT (visited, e->dest->index)) ! hybrid_search_sbitmap (e->dest, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } *************** hybrid_search_sbitmap (block, in, out, g *** 3808,3815 **** if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) continue; if (!TEST_BIT (visited, e->src->index)) ! hybrid_search_sbitmap (e->src, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } --- 3838,3845 ---- if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) continue; if (!TEST_BIT (visited, e->src->index)) ! hybrid_search_sbitmap (e->src, in, out, gen, kill, dir, ! conf_op, transfun, visited, pending, data); } } *************** hybrid_search_sbitmap (block, in, out, g *** 3827,3846 **** transfun = Transfer function. order = Order to iterate in. (Should map block numbers -> order) data = Whatever you want. It's passed to the transfer function. ! This function will perform iterative bitvector dataflow, producing the in and out sets. Even if you only want to perform it for a small number of blocks, the vectors for in and out must be large enough for *all* blocks, because changing one block might affect others. However, it'll only put what you say to analyze on the initial worklist. ! For forward problems, you probably want to pass in a mapping of block number to rc_order (like df->inverse_rc_map). */ void ! iterative_dataflow_sbitmap (in, out, gen, kill, blocks, ! dir, conf_op, transfun, order, data) sbitmap *in, *out, *gen, *kill; bitmap blocks; enum df_flow_dir dir; --- 3857,3876 ---- transfun = Transfer function. order = Order to iterate in. (Should map block numbers -> order) data = Whatever you want. It's passed to the transfer function. ! This function will perform iterative bitvector dataflow, producing the in and out sets. Even if you only want to perform it for a small number of blocks, the vectors for in and out must be large enough for *all* blocks, because changing one block might affect others. However, it'll only put what you say to analyze on the initial worklist. ! For forward problems, you probably want to pass in a mapping of block number to rc_order (like df->inverse_rc_map). */ void ! iterative_dataflow_sbitmap (in, out, gen, kill, blocks, ! dir, conf_op, transfun, order, data) sbitmap *in, *out, *gen, *kill; bitmap blocks; enum df_flow_dir dir; *************** iterative_dataflow_sbitmap (in, out, gen *** 3853,3866 **** fibheap_t worklist; basic_block bb; sbitmap visited, pending; ! pending = sbitmap_alloc (n_basic_blocks); ! visited = sbitmap_alloc (n_basic_blocks); sbitmap_zero (pending); sbitmap_zero (visited); worklist = fibheap_new (); EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, { ! fibheap_insert (worklist, order[i], (void *) (size_t) i); SET_BIT (pending, i); if (dir == FORWARD) sbitmap_copy (out[i], gen[i]); --- 3883,3896 ---- fibheap_t worklist; basic_block bb; sbitmap visited, pending; ! pending = sbitmap_alloc (last_basic_block); ! visited = sbitmap_alloc (last_basic_block); sbitmap_zero (pending); sbitmap_zero (visited); worklist = fibheap_new (); EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, { ! fibheap_insert (worklist, order[i], (void *) (size_t) i); SET_BIT (pending, i); if (dir == FORWARD) sbitmap_copy (out[i], gen[i]); *************** iterative_dataflow_sbitmap (in, out, gen *** 3874,3880 **** i = (size_t) fibheap_extract_min (worklist); bb = BASIC_BLOCK (i); if (!TEST_BIT (visited, bb->index)) ! hybrid_search_sbitmap (bb, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data); } if (sbitmap_first_set_bit (pending) != -1) --- 3904,3910 ---- i = (size_t) fibheap_extract_min (worklist); bb = BASIC_BLOCK (i); if (!TEST_BIT (visited, bb->index)) ! hybrid_search_sbitmap (bb, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data); } if (sbitmap_first_set_bit (pending) != -1) *************** iterative_dataflow_sbitmap (in, out, gen *** 3888,3894 **** else { break; ! } } sbitmap_free (pending); sbitmap_free (visited); --- 3918,3924 ---- else { break; ! } } sbitmap_free (pending); sbitmap_free (visited); *************** iterative_dataflow_sbitmap (in, out, gen *** 3898,3905 **** /* Exactly the same as iterative_dataflow_sbitmap, except it works on bitmaps instead */ void ! iterative_dataflow_bitmap (in, out, gen, kill, blocks, ! dir, conf_op, transfun, order, data) bitmap *in, *out, *gen, *kill; bitmap blocks; enum df_flow_dir dir; --- 3928,3935 ---- /* Exactly the same as iterative_dataflow_sbitmap, except it works on bitmaps instead */ void ! iterative_dataflow_bitmap (in, out, gen, kill, blocks, ! dir, conf_op, transfun, order, data) bitmap *in, *out, *gen, *kill; bitmap blocks; enum df_flow_dir dir; *************** iterative_dataflow_bitmap (in, out, gen, *** 3912,3919 **** fibheap_t worklist; basic_block bb; sbitmap visited, pending; ! pending = sbitmap_alloc (n_basic_blocks); ! visited = sbitmap_alloc (n_basic_blocks); sbitmap_zero (pending); sbitmap_zero (visited); worklist = fibheap_new (); --- 3942,3949 ---- fibheap_t worklist; basic_block bb; sbitmap visited, pending; ! pending = sbitmap_alloc (last_basic_block); ! visited = sbitmap_alloc (last_basic_block); sbitmap_zero (pending); sbitmap_zero (visited); worklist = fibheap_new (); *************** iterative_dataflow_bitmap (in, out, gen, *** 3933,3939 **** i = (size_t) fibheap_extract_min (worklist); bb = BASIC_BLOCK (i); if (!TEST_BIT (visited, bb->index)) ! hybrid_search_bitmap (bb, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data); } if (sbitmap_first_set_bit (pending) != -1) --- 3963,3969 ---- i = (size_t) fibheap_extract_min (worklist); bb = BASIC_BLOCK (i); if (!TEST_BIT (visited, bb->index)) ! hybrid_search_bitmap (bb, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data); } if (sbitmap_first_set_bit (pending) != -1) *************** iterative_dataflow_bitmap (in, out, gen, *** 3947,3955 **** else { break; ! } } sbitmap_free (pending); sbitmap_free (visited); ! fibheap_delete (worklist); } --- 3977,3985 ---- else { break; ! } } sbitmap_free (pending); sbitmap_free (visited); ! fibheap_delete (worklist); } diff -Nrc3pad gcc-3.2.3/gcc/df.h gcc-3.3/gcc/df.h *** gcc-3.2.3/gcc/df.h 2002-01-25 19:46:43.000000000 +0000 --- gcc-3.3/gcc/df.h 2002-07-15 14:07:05.000000000 +0000 *************** struct df_link *** 50,56 **** enum df_ref_flags { ! DF_REF_READ_WRITE = 1 }; /* Define a register reference structure. */ --- 50,65 ---- enum df_ref_flags { ! DF_REF_READ_WRITE = 1, ! ! /* This flag is set on register references itself representing a or ! being inside a subreg on machines which have CLASS_CANNOT_CHANGE_MODE ! and where the mode change of that subreg expression is invalid for ! this class. Note, that this flag can also be set on df_refs ! representing the REG itself (i.e. one might not see the subreg ! anyore). Also note, that this flag is set also for hardreg refs. ! I.e. you must check yourself if it's a pseudo. */ ! DF_REF_MODE_CHANGE = 2 }; /* Define a register reference structure. */ *************** struct ref *** 61,67 **** rtx *loc; /* Loc is the location of the reg. */ struct df_link *chain; /* Head of def-use or use-def chain. */ enum df_ref_type type; /* Type of ref. */ ! int id; /* Ref index. */ enum df_ref_flags flags; /* Various flags. */ }; --- 70,76 ---- rtx *loc; /* Loc is the location of the reg. */ struct df_link *chain; /* Head of def-use or use-def chain. */ enum df_ref_type type; /* Type of ref. */ ! unsigned int id; /* Ref index. */ enum df_ref_flags flags; /* Various flags. */ }; diff -Nrc3pad gcc-3.2.3/gcc/diagnostic.c gcc-3.3/gcc/diagnostic.c *** gcc-3.2.3/gcc/diagnostic.c 2002-01-23 19:34:08.000000000 +0000 --- gcc-3.3/gcc/diagnostic.c 2002-11-14 21:34:19.000000000 +0000 *************** *** 1,4 **** ! /* Language-independent diagnostic subroutines for the GNU C compiler Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Gabriel Dos Reis --- 1,4 ---- ! /* Language-independent diagnostic subroutines for the GNU Compiler Collection Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Gabriel Dos Reis *************** Software Foundation, 59 Temple Place - S *** 34,98 **** #include "toplev.h" #include "intl.h" #include "diagnostic.h" ! ! #define obstack_chunk_alloc xmalloc ! #define obstack_chunk_free free ! ! #define output_formatted_integer(BUFFER, FORMAT, INTEGER) \ ! do { \ ! sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \ ! output_add_string (BUFFER, (BUFFER)->digit_buffer); \ ! } while (0) #define output_text_length(BUFFER) (BUFFER)->line_length #define is_starting_newline(BUFFER) (output_text_length (BUFFER) == 0) - #define output_prefix(BUFFER) (BUFFER)->state.prefix #define line_wrap_cutoff(BUFFER) (BUFFER)->state.maximum_length #define prefix_was_emitted_for(BUFFER) (BUFFER)->state.emitted_prefix_p - #define output_buffer_ptr_to_format_args(BUFFER) (BUFFER)->state.format_args - - #define diagnostic_args output_buffer_ptr_to_format_args (diagnostic_buffer) - #define diagnostic_msg output_buffer_text_cursor (diagnostic_buffer) /* Prototypes. */ ! static void diagnostic_finish PARAMS ((output_buffer *)); ! static void output_do_verbatim PARAMS ((output_buffer *, ! const char *, va_list *)); static void output_buffer_to_stream PARAMS ((output_buffer *)); ! static void output_format PARAMS ((output_buffer *)); static void output_indent PARAMS ((output_buffer *)); static char *vbuild_message_string PARAMS ((const char *, va_list)) ATTRIBUTE_PRINTF (1, 0); static char *build_message_string PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; ! static void output_do_printf PARAMS ((output_buffer *, const char *)) ! ATTRIBUTE_PRINTF (2, 0); ! static void format_with_decl PARAMS ((output_buffer *, tree)); ! static void diagnostic_for_decl PARAMS ((tree, const char *, va_list *, int)); static void set_real_maximum_length PARAMS ((output_buffer *)); static void output_unsigned_decimal PARAMS ((output_buffer *, unsigned int)); static void output_long_decimal PARAMS ((output_buffer *, long int)); static void output_long_unsigned_decimal PARAMS ((output_buffer *, ! long unsigned int)); static void output_octal PARAMS ((output_buffer *, unsigned int)); static void output_long_octal PARAMS ((output_buffer *, unsigned long int)); static void output_hexadecimal PARAMS ((output_buffer *, unsigned int)); static void output_long_hexadecimal PARAMS ((output_buffer *, ! unsigned long int)); static void output_append_r PARAMS ((output_buffer *, const char *, int)); static void wrap_text PARAMS ((output_buffer *, const char *, const char *)); static void maybe_wrap_text PARAMS ((output_buffer *, const char *, ! const char *)); ! static void clear_diagnostic_info PARAMS ((output_buffer *)); ! static void default_diagnostic_starter PARAMS ((output_buffer *, ! diagnostic_context *)); ! static void default_diagnostic_finalizer PARAMS ((output_buffer *, ! diagnostic_context *)); ! static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN; extern int rtl_dump_and_exit; extern int warnings_are_errors; --- 34,84 ---- #include "toplev.h" #include "intl.h" #include "diagnostic.h" ! #include "langhooks.h" ! #include "langhooks-def.h" #define output_text_length(BUFFER) (BUFFER)->line_length #define is_starting_newline(BUFFER) (output_text_length (BUFFER) == 0) #define line_wrap_cutoff(BUFFER) (BUFFER)->state.maximum_length #define prefix_was_emitted_for(BUFFER) (BUFFER)->state.emitted_prefix_p /* Prototypes. */ ! static void output_flush PARAMS ((output_buffer *)); ! static void output_do_verbatim PARAMS ((output_buffer *, text_info *)); static void output_buffer_to_stream PARAMS ((output_buffer *)); ! static void output_format PARAMS ((output_buffer *, text_info *)); static void output_indent PARAMS ((output_buffer *)); static char *vbuild_message_string PARAMS ((const char *, va_list)) ATTRIBUTE_PRINTF (1, 0); static char *build_message_string PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; ! static void format_with_decl PARAMS ((output_buffer *, text_info *, tree)); ! static void diagnostic_for_decl PARAMS ((diagnostic_info *, tree)); static void set_real_maximum_length PARAMS ((output_buffer *)); static void output_unsigned_decimal PARAMS ((output_buffer *, unsigned int)); static void output_long_decimal PARAMS ((output_buffer *, long int)); static void output_long_unsigned_decimal PARAMS ((output_buffer *, ! long unsigned int)); static void output_octal PARAMS ((output_buffer *, unsigned int)); static void output_long_octal PARAMS ((output_buffer *, unsigned long int)); static void output_hexadecimal PARAMS ((output_buffer *, unsigned int)); static void output_long_hexadecimal PARAMS ((output_buffer *, ! unsigned long int)); static void output_append_r PARAMS ((output_buffer *, const char *, int)); static void wrap_text PARAMS ((output_buffer *, const char *, const char *)); static void maybe_wrap_text PARAMS ((output_buffer *, const char *, ! const char *)); ! static void output_clear_data PARAMS ((output_buffer *)); ! static void default_diagnostic_starter PARAMS ((diagnostic_context *, ! diagnostic_info *)); ! static void default_diagnostic_finalizer PARAMS ((diagnostic_context *, ! diagnostic_info *)); ! static void error_recursion PARAMS ((diagnostic_context *)) ATTRIBUTE_NORETURN; ! static bool text_specifies_location PARAMS ((text_info *, location_t *)); extern int rtl_dump_and_exit; extern int warnings_are_errors; *************** extern int warnings_are_errors; *** 101,201 **** static diagnostic_context global_diagnostic_context; diagnostic_context *global_dc = &global_diagnostic_context; - /* This will be removed shortly. */ - output_buffer *diagnostic_buffer = &global_diagnostic_context.buffer; - - /* Function of last error message; - more generally, function such that if next error message is in it - then we don't have to mention the function name. */ - static tree last_error_function = NULL; - - /* Used to detect when input_file_stack has changed since last described. */ - static int last_error_tick; - - /* Called by report_error_function to print out function name. - Default may be overridden by language front-ends. */ - - void (*print_error_function) PARAMS ((diagnostic_context *, const char *)) - = default_print_error_function; - - /* Prevent recursion into the error handler. */ - static int diagnostic_lock; - - /* Return truthvalue if current input file is different from the most recent - file involved in a diagnostic message. */ - - int - error_module_changed () - { - return last_error_tick != input_file_stack_tick; - } - - /* Remember current file as being the most recent file involved in a - diagnostic message. */ - - void - record_last_error_module () - { - last_error_tick = input_file_stack_tick; - } - - /* Same as error_module_changed, but for function. */ - - int - error_function_changed () - { - return last_error_function != current_function_decl; - } - - /* Same as record_last_error_module, but for function. */ - - void - record_last_error_function () - { - last_error_function = current_function_decl; - } - - /* Initialize the diagnostic message outputting machinery. */ - - void - diagnostic_initialize (context) - diagnostic_context *context; - { - memset (context, 0, sizeof *context); - obstack_init (&context->buffer.obstack); - - /* By default, diagnostics are sent to stderr. */ - output_buffer_attached_stream (&context->buffer) = stderr; - - /* By default, we emit prefixes once per message. */ - diagnostic_prefixing_rule (context) = DIAGNOSTICS_SHOW_PREFIX_ONCE; - - diagnostic_starter (context) = default_diagnostic_starter; - diagnostic_finalizer (context) = default_diagnostic_finalizer; - } - - /* Returns true if BUFFER is in line-wrapping mode. */ - - int - output_is_line_wrapping (buffer) - output_buffer *buffer; - { - return diagnostic_line_cutoff (buffer) > 0; - } - - /* Return BUFFER's prefix. */ - - const char * - output_get_prefix (buffer) - const output_buffer *buffer; - { - return output_prefix (buffer); - } - /* Subroutine of output_set_maximum_length. Set up BUFFER's internal maximum characters per line. */ - static void set_real_maximum_length (buffer) output_buffer *buffer; --- 87,95 ---- *************** set_real_maximum_length (buffer) *** 203,247 **** /* If we're told not to wrap lines then do the obvious thing. In case we'll emit prefix only once per diagnostic message, it is appropriate not to increase unnecessarily the line-length cut-off. */ ! if (! output_is_line_wrapping (buffer) ! || diagnostic_prefixing_rule (buffer) == DIAGNOSTICS_SHOW_PREFIX_ONCE ! || diagnostic_prefixing_rule (buffer) == DIAGNOSTICS_SHOW_PREFIX_NEVER) ! line_wrap_cutoff (buffer) = diagnostic_line_cutoff (buffer); else { ! int prefix_length = ! output_prefix (buffer) ? strlen (output_prefix (buffer)) : 0; /* If the prefix is ridiculously too long, output at least 32 characters. */ ! if (diagnostic_line_cutoff (buffer) - prefix_length < 32) ! line_wrap_cutoff (buffer) = diagnostic_line_cutoff (buffer) + 32; else ! line_wrap_cutoff (buffer) = diagnostic_line_cutoff (buffer); } } /* Sets the number of maximum characters per line BUFFER can output in line-wrapping mode. A LENGTH value 0 suppresses line-wrapping. */ - void output_set_maximum_length (buffer, length) output_buffer *buffer; int length; { ! diagnostic_line_cutoff (buffer) = length; set_real_maximum_length (buffer); } /* Sets BUFFER's PREFIX. */ - void output_set_prefix (buffer, prefix) output_buffer *buffer; const char *prefix; { ! output_prefix (buffer) = prefix; set_real_maximum_length (buffer); ! prefix_was_emitted_for (buffer) = 0; output_indentation (buffer) = 0; } --- 97,139 ---- /* If we're told not to wrap lines then do the obvious thing. In case we'll emit prefix only once per diagnostic message, it is appropriate not to increase unnecessarily the line-length cut-off. */ ! if (!output_is_line_wrapping (buffer) ! || output_prefixing_rule (buffer) == DIAGNOSTICS_SHOW_PREFIX_ONCE ! || output_prefixing_rule (buffer) == DIAGNOSTICS_SHOW_PREFIX_NEVER) ! line_wrap_cutoff (buffer) = output_line_cutoff (buffer); else { ! int prefix_length = buffer->state.prefix ? ! strlen (buffer->state.prefix) : 0; /* If the prefix is ridiculously too long, output at least 32 characters. */ ! if (output_line_cutoff (buffer) - prefix_length < 32) ! line_wrap_cutoff (buffer) = output_line_cutoff (buffer) + 32; else ! line_wrap_cutoff (buffer) = output_line_cutoff (buffer); } } /* Sets the number of maximum characters per line BUFFER can output in line-wrapping mode. A LENGTH value 0 suppresses line-wrapping. */ void output_set_maximum_length (buffer, length) output_buffer *buffer; int length; { ! output_line_cutoff (buffer) = length; set_real_maximum_length (buffer); } /* Sets BUFFER's PREFIX. */ void output_set_prefix (buffer, prefix) output_buffer *buffer; const char *prefix; { ! buffer->state.prefix = prefix; set_real_maximum_length (buffer); ! prefix_was_emitted_for (buffer) = false; output_indentation (buffer) = 0; } *************** output_last_position (buffer) *** 252,278 **** const output_buffer *buffer; { const char *p = NULL; ! if (obstack_base (&buffer->obstack) != obstack_next_free (&buffer->obstack)) p = ((const char *) obstack_next_free (&buffer->obstack)) - 1; return p; } /* Free BUFFER's prefix, a previously malloc'd string. */ - void output_destroy_prefix (buffer) output_buffer *buffer; { ! if (output_prefix (buffer) != NULL) { ! free ((char *) output_prefix (buffer)); ! output_prefix (buffer) = NULL; } } /* Zero out any text output so far in BUFFER. */ - void output_clear_message_text (buffer) output_buffer *buffer; --- 144,168 ---- const output_buffer *buffer; { const char *p = NULL; ! if (obstack_base (&buffer->obstack) != obstack_next_free (&buffer->obstack)) p = ((const char *) obstack_next_free (&buffer->obstack)) - 1; return p; } /* Free BUFFER's prefix, a previously malloc'd string. */ void output_destroy_prefix (buffer) output_buffer *buffer; { ! if (buffer->state.prefix != NULL) { ! free ((char *) buffer->state.prefix); ! buffer->state.prefix = NULL; } } /* Zero out any text output so far in BUFFER. */ void output_clear_message_text (buffer) output_buffer *buffer; *************** output_clear_message_text (buffer) *** 281,301 **** output_text_length (buffer) = 0; } ! /* Zero out any diagnostic data used so far by BUFFER. */ ! static void ! clear_diagnostic_info (buffer) output_buffer *buffer; { ! output_buffer_text_cursor (buffer) = NULL; ! output_buffer_ptr_to_format_args (buffer) = NULL; ! prefix_was_emitted_for (buffer) = 0; output_indentation (buffer) = 0; } /* Construct an output BUFFER with PREFIX and of MAXIMUM_LENGTH characters per line. */ - void init_output_buffer (buffer, prefix, maximum_length) output_buffer *buffer; --- 171,187 ---- output_text_length (buffer) = 0; } ! /* Zero out any formatting data used so far by BUFFER. */ static void ! output_clear_data (buffer) output_buffer *buffer; { ! prefix_was_emitted_for (buffer) = false; output_indentation (buffer) = 0; } /* Construct an output BUFFER with PREFIX and of MAXIMUM_LENGTH characters per line. */ void init_output_buffer (buffer, prefix, maximum_length) output_buffer *buffer; *************** init_output_buffer (buffer, prefix, maxi *** 305,330 **** memset (buffer, 0, sizeof (output_buffer)); obstack_init (&buffer->obstack); output_buffer_attached_stream (buffer) = stderr; ! diagnostic_line_cutoff (buffer) = maximum_length; ! diagnostic_prefixing_rule (buffer) = diagnostic_prefixing_rule (global_dc); output_set_prefix (buffer, prefix); output_text_length (buffer) = 0; ! clear_diagnostic_info (buffer); } /* Reinitialize BUFFER. */ - void output_clear (buffer) output_buffer *buffer; { output_clear_message_text (buffer); ! clear_diagnostic_info (buffer); } /* Finishes constructing a NULL-terminated character string representing the BUFFERed message. */ - const char * output_finalize_message (buffer) output_buffer *buffer; --- 191,214 ---- memset (buffer, 0, sizeof (output_buffer)); obstack_init (&buffer->obstack); output_buffer_attached_stream (buffer) = stderr; ! output_line_cutoff (buffer) = maximum_length; ! output_prefixing_rule (buffer) = diagnostic_prefixing_rule (global_dc); output_set_prefix (buffer, prefix); output_text_length (buffer) = 0; ! output_clear_data (buffer); } /* Reinitialize BUFFER. */ void output_clear (buffer) output_buffer *buffer; { output_clear_message_text (buffer); ! output_clear_data (buffer); } /* Finishes constructing a NULL-terminated character string representing the BUFFERed message. */ const char * output_finalize_message (buffer) output_buffer *buffer; *************** output_finalize_message (buffer) *** 333,348 **** return output_message_text (buffer); } - void - flush_diagnostic_buffer () - { - output_buffer_to_stream (diagnostic_buffer); - fflush (output_buffer_attached_stream (diagnostic_buffer)); - } - /* Return the amount of characters BUFFER can accept to make a full line. */ - int output_space_left (buffer) const output_buffer *buffer; --- 217,224 ---- *************** output_space_left (buffer) *** 351,391 **** } /* Write out BUFFER's prefix. */ - void output_emit_prefix (buffer) output_buffer *buffer; { ! if (output_prefix (buffer) != NULL) { ! switch (diagnostic_prefixing_rule (buffer)) ! { ! default: ! case DIAGNOSTICS_SHOW_PREFIX_NEVER: ! break; ! case DIAGNOSTICS_SHOW_PREFIX_ONCE: ! if (prefix_was_emitted_for (buffer)) ! { ! output_indent (buffer); ! break; ! } ! output_indentation (buffer) += 3; ! /* Fall through. */ ! case DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: ! { ! int prefix_length = strlen (output_prefix (buffer)); ! output_append_r (buffer, output_prefix (buffer), prefix_length); ! prefix_was_emitted_for (buffer) = 1; ! } ! break; ! } } } /* Have BUFFER start a new line. */ - void output_add_newline (buffer) output_buffer *buffer; --- 227,265 ---- } /* Write out BUFFER's prefix. */ void output_emit_prefix (buffer) output_buffer *buffer; { ! if (buffer->state.prefix != NULL) { ! switch (output_prefixing_rule (buffer)) ! { ! default: ! case DIAGNOSTICS_SHOW_PREFIX_NEVER: ! break; ! case DIAGNOSTICS_SHOW_PREFIX_ONCE: ! if (prefix_was_emitted_for (buffer)) ! { ! output_indent (buffer); ! break; ! } ! output_indentation (buffer) += 3; ! /* Fall through. */ ! case DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: ! { ! int prefix_length = strlen (buffer->state.prefix); ! output_append_r (buffer, buffer->state.prefix, prefix_length); ! prefix_was_emitted_for (buffer) = true; ! } ! break; ! } } } /* Have BUFFER start a new line. */ void output_add_newline (buffer) output_buffer *buffer; *************** output_add_newline (buffer) *** 395,401 **** } /* Appends a character to BUFFER. */ - void output_add_character (buffer, c) output_buffer *buffer; --- 269,274 ---- *************** output_add_character (buffer, c) *** 408,414 **** } /* Adds a space to BUFFER. */ - void output_add_space (buffer) output_buffer *buffer; --- 281,286 ---- *************** output_add_space (buffer) *** 424,436 **** /* These functions format an INTEGER into BUFFER as suggested by their names. */ - void output_decimal (buffer, i) output_buffer *buffer; int i; { ! output_formatted_integer (buffer, "%d", i); } static void --- 296,307 ---- /* These functions format an INTEGER into BUFFER as suggested by their names. */ void output_decimal (buffer, i) output_buffer *buffer; int i; { ! output_formatted_scalar (buffer, "%d", i); } static void *************** output_long_decimal (buffer, i) *** 438,444 **** output_buffer *buffer; long int i; { ! output_formatted_integer (buffer, "%ld", i); } static void --- 309,315 ---- output_buffer *buffer; long int i; { ! output_formatted_scalar (buffer, "%ld", i); } static void *************** output_unsigned_decimal (buffer, i) *** 446,452 **** output_buffer *buffer; unsigned int i; { ! output_formatted_integer (buffer, "%u", i); } static void --- 317,323 ---- output_buffer *buffer; unsigned int i; { ! output_formatted_scalar (buffer, "%u", i); } static void *************** output_long_unsigned_decimal (buffer, i) *** 454,460 **** output_buffer *buffer; long unsigned int i; { ! output_formatted_integer (buffer, "%lu", i); } static void --- 325,331 ---- output_buffer *buffer; long unsigned int i; { ! output_formatted_scalar (buffer, "%lu", i); } static void *************** output_octal (buffer, i) *** 462,468 **** output_buffer *buffer; unsigned int i; { ! output_formatted_integer (buffer, "%o", i); } static void --- 333,339 ---- output_buffer *buffer; unsigned int i; { ! output_formatted_scalar (buffer, "%o", i); } static void *************** output_long_octal (buffer, i) *** 470,476 **** output_buffer *buffer; unsigned long int i; { ! output_formatted_integer (buffer, "%lo", i); } static void --- 341,347 ---- output_buffer *buffer; unsigned long int i; { ! output_formatted_scalar (buffer, "%lo", i); } static void *************** output_hexadecimal (buffer, i) *** 478,484 **** output_buffer *buffer; unsigned int i; { ! output_formatted_integer (buffer, "%x", i); } static void --- 349,355 ---- output_buffer *buffer; unsigned int i; { ! output_formatted_scalar (buffer, "%x", i); } static void *************** output_long_hexadecimal (buffer, i) *** 486,497 **** output_buffer *buffer; unsigned long int i; { ! output_formatted_integer (buffer, "%lx", i); } /* Append to BUFFER a string specified by its STARTING character and LENGTH. */ - static void output_append_r (buffer, start, length) output_buffer *buffer; --- 357,367 ---- output_buffer *buffer; unsigned long int i; { ! output_formatted_scalar (buffer, "%lx", i); } /* Append to BUFFER a string specified by its STARTING character and LENGTH. */ static void output_append_r (buffer, start, length) output_buffer *buffer; *************** output_append_r (buffer, start, length) *** 503,512 **** } /* Append a string deliminated by START and END to BUFFER. No wrapping is ! done. However, if beginning a new line then emit output_prefix (BUFFER) and skip any leading whitespace if appropriate. The caller must ensure that it is safe to do so. */ - void output_append (buffer, start, end) output_buffer *buffer; --- 373,381 ---- } /* Append a string deliminated by START and END to BUFFER. No wrapping is ! done. However, if beginning a new line then emit BUFFER->state.prefix and skip any leading whitespace if appropriate. The caller must ensure that it is safe to do so. */ void output_append (buffer, start, end) output_buffer *buffer; *************** output_append (buffer, start, end) *** 518,525 **** { output_emit_prefix (buffer); if (output_is_line_wrapping (buffer)) ! while (start != end && *start == ' ') ! ++start; } output_append_r (buffer, start, end - start); } --- 387,394 ---- { output_emit_prefix (buffer); if (output_is_line_wrapping (buffer)) ! while (start != end && *start == ' ') ! ++start; } output_append_r (buffer, start, end - start); } *************** output_indent (buffer) *** 536,578 **** } /* Wrap a text delimited by START and END into BUFFER. */ - static void wrap_text (buffer, start, end) output_buffer *buffer; const char *start; const char *end; { ! int is_wrapping = output_is_line_wrapping (buffer); ! while (start != end) { ! /* Dump anything bordered by whitespaces. */ { ! const char *p = start; ! while (p != end && *p != ' ' && *p != '\n') ! ++p; ! if (is_wrapping && p - start >= output_space_left (buffer)) ! output_add_newline (buffer); ! output_append (buffer, start, p); ! start = p; } if (start != end && *start == ' ') ! { ! output_add_space (buffer); ! ++start; ! } if (start != end && *start == '\n') ! { ! output_add_newline (buffer); ! ++start; ! } } } /* Same as wrap_text but wrap text only when in line-wrapping mode. */ - static void maybe_wrap_text (buffer, start, end) output_buffer *buffer; --- 405,445 ---- } /* Wrap a text delimited by START and END into BUFFER. */ static void wrap_text (buffer, start, end) output_buffer *buffer; const char *start; const char *end; { ! bool is_wrapping = output_is_line_wrapping (buffer); ! while (start != end) { ! /* Dump anything bordered by whitespaces. */ { ! const char *p = start; ! while (p != end && *p != ' ' && *p != '\n') ! ++p; ! if (is_wrapping && p - start >= output_space_left (buffer)) ! output_add_newline (buffer); ! output_append (buffer, start, p); ! start = p; } if (start != end && *start == ' ') ! { ! output_add_space (buffer); ! ++start; ! } if (start != end && *start == '\n') ! { ! output_add_newline (buffer); ! ++start; ! } } } /* Same as wrap_text but wrap text only when in line-wrapping mode. */ static void maybe_wrap_text (buffer, start, end) output_buffer *buffer; *************** maybe_wrap_text (buffer, start, end) *** 588,594 **** /* Append a STRING to BUFFER; the STRING might be line-wrapped if in appropriate mode. */ - void output_add_string (buffer, str) output_buffer *buffer; --- 455,460 ---- *************** output_add_string (buffer, str) *** 597,602 **** --- 463,478 ---- maybe_wrap_text (buffer, str, str + (str ? strlen (str) : 0)); } + /* Append an identifier ID to BUFFER. */ + void + output_add_identifier (buffer, id) + output_buffer *buffer; + tree id; + { + output_append (buffer, IDENTIFIER_POINTER (id), + IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id)); + } + /* Flush the content of BUFFER onto the attached stream, and reinitialize. */ *************** output_buffer_to_stream (buffer) *** 609,617 **** output_clear_message_text (buffer); } ! /* Format a message pointed to by output_buffer_text_cursor (BUFFER) using ! output_buffer_format_args (BUFFER) as appropriate. The following format ! specifiers are recognized as being language independent: %d, %i: (signed) integer in base ten. %u: unsigned integer in base ten. %o: unsigned integer in base eight. --- 485,492 ---- output_clear_message_text (buffer); } ! /* Format a message pointed to by TEXT. The following format specifiers are ! recognized as being language independent: %d, %i: (signed) integer in base ten. %u: unsigned integer in base ten. %o: unsigned integer in base eight. *************** output_buffer_to_stream (buffer) *** 620,742 **** %c: character. %s: string. %%: `%'. ! %*.s: a substring the length of which is specified by an integer. */ ! static void ! output_format (buffer) output_buffer *buffer; { ! for (; *output_buffer_text_cursor (buffer); ! ++output_buffer_text_cursor (buffer)) { ! int long_integer = 0; /* Ignore text. */ { ! const char *p = output_buffer_text_cursor (buffer); ! while (*p && *p != '%') ! ++p; ! wrap_text (buffer, output_buffer_text_cursor (buffer), p); ! output_buffer_text_cursor (buffer) = p; } ! if (!*output_buffer_text_cursor (buffer)) ! break; /* We got a '%'. Let's see what happens. Record whether we're parsing a long integer format specifier. */ ! if (*++output_buffer_text_cursor (buffer) == 'l') ! { ! long_integer = 1; ! ++output_buffer_text_cursor (buffer); ! } /* Handle %c, %d, %i, %ld, %li, %lo, %lu, %lx, %o, %s, %u, %x, %.*s; %%. And nothing else. Front-ends should install printers to grok language specific format specifiers. */ ! switch (*output_buffer_text_cursor (buffer)) ! { ! case 'c': ! output_add_character ! (buffer, va_arg (output_buffer_format_args (buffer), int)); ! break; ! ! case 'd': ! case 'i': ! if (long_integer) ! output_long_decimal ! (buffer, va_arg (output_buffer_format_args (buffer), long int)); ! else ! output_decimal ! (buffer, va_arg (output_buffer_format_args (buffer), int)); ! break; ! case 'o': ! if (long_integer) ! output_long_octal (buffer, ! va_arg (output_buffer_format_args (buffer), ! unsigned long int)); ! else ! output_octal (buffer, ! va_arg (output_buffer_format_args (buffer), ! unsigned int)); ! break; ! case 's': ! output_add_string (buffer, ! va_arg (output_buffer_format_args (buffer), ! const char *)); ! break; ! case 'u': ! if (long_integer) ! output_long_unsigned_decimal ! (buffer, va_arg (output_buffer_format_args (buffer), ! long unsigned int)); ! else ! output_unsigned_decimal ! (buffer, va_arg (output_buffer_format_args (buffer), ! unsigned int)); ! break; ! ! case 'x': ! if (long_integer) ! output_long_hexadecimal ! (buffer, va_arg (output_buffer_format_args (buffer), ! unsigned long int)); ! else ! output_hexadecimal ! (buffer, va_arg (output_buffer_format_args (buffer), ! unsigned int)); ! break; ! case '%': ! output_add_character (buffer, '%'); ! break; ! case '.': { ! int n; ! const char *s; ! /* We handle no precision specifier but `%.*s'. */ ! if (*++output_buffer_text_cursor (buffer) != '*') ! abort (); ! else if (*++output_buffer_text_cursor (buffer) != 's') ! abort (); ! n = va_arg (output_buffer_format_args (buffer), int); ! s = va_arg (output_buffer_format_args (buffer), const char *); ! output_append (buffer, s, s + n); } break; ! default: ! if (!buffer->format_decoder || !(*buffer->format_decoder) (buffer)) ! { ! /* Hmmm. The front-end failed to install a format translator but called us with an unrecognized format. Sorry. */ ! abort (); ! } ! } } } --- 495,616 ---- %c: character. %s: string. %%: `%'. ! %*.s: a substring the length of which is specified by an integer. ! %H: location_t. */ static void ! output_format (buffer, text) output_buffer *buffer; + text_info *text; { ! for (; *text->format_spec; ++text->format_spec) { ! bool long_integer = 0; /* Ignore text. */ { ! const char *p = text->format_spec; ! while (*p && *p != '%') ! ++p; ! wrap_text (buffer, text->format_spec, p); ! text->format_spec = p; } ! if (*text->format_spec == '\0') ! break; /* We got a '%'. Let's see what happens. Record whether we're parsing a long integer format specifier. */ ! if (*++text->format_spec == 'l') ! { ! long_integer = true; ! ++text->format_spec; ! } /* Handle %c, %d, %i, %ld, %li, %lo, %lu, %lx, %o, %s, %u, %x, %.*s; %%. And nothing else. Front-ends should install printers to grok language specific format specifiers. */ ! switch (*text->format_spec) ! { ! case 'c': ! output_add_character (buffer, va_arg (*text->args_ptr, int)); ! break; ! case 'd': ! case 'i': ! if (long_integer) ! output_long_decimal (buffer, va_arg (*text->args_ptr, long int)); ! else ! output_decimal (buffer, va_arg (*text->args_ptr, int)); ! break; ! case 'o': ! if (long_integer) ! output_long_octal (buffer, ! va_arg (*text->args_ptr, unsigned long int)); ! else ! output_octal (buffer, va_arg (*text->args_ptr, unsigned int)); ! break; ! case 's': ! output_add_string (buffer, va_arg (*text->args_ptr, const char *)); ! break; ! case 'u': ! if (long_integer) ! output_long_unsigned_decimal ! (buffer, va_arg (*text->args_ptr, long unsigned int)); ! else ! output_unsigned_decimal ! (buffer, va_arg (*text->args_ptr, unsigned int)); ! break; ! case 'x': ! if (long_integer) ! output_long_hexadecimal ! (buffer, va_arg (*text->args_ptr, unsigned long int)); ! else ! output_hexadecimal ! (buffer, va_arg (*text->args_ptr, unsigned int)); ! break; ! ! case '%': ! output_add_character (buffer, '%'); ! break; ! ! case 'H': { ! const location_t *locus = va_arg (*text->args_ptr, location_t *); ! output_add_string (buffer, "file '"); ! output_add_string (buffer, locus->file); ! output_add_string (buffer, "', line "); ! output_decimal (buffer, locus->line); } break; ! case '.': ! { ! int n; ! const char *s; ! /* We handle no precision specifier but `%.*s'. */ ! if (*++text->format_spec != '*') ! abort (); ! else if (*++text->format_spec != 's') ! abort (); ! n = va_arg (*text->args_ptr, int); ! s = va_arg (*text->args_ptr, const char *); ! output_append (buffer, s, s + n); ! } ! break; ! ! default: ! if (!buffer->format_decoder ! || !(*buffer->format_decoder) (buffer, text)) ! { ! /* Hmmm. The front-end failed to install a format translator but called us with an unrecognized format. Sorry. */ ! abort (); ! } ! } } } *************** vbuild_message_string (msg, ap) *** 753,759 **** /* Return a malloc'd string containing MSG formatted a la printf. The caller is responsible for freeing the memory. */ - static char * build_message_string VPARAMS ((const char *msg, ...)) { --- 627,632 ---- *************** build_message_string VPARAMS ((const cha *** 769,801 **** return str; } ! /* Return a malloc'd string describing a location. The caller is ! responsible for freeing the memory. */ ! ! char * ! context_as_prefix (file, line, warn) ! const char *file; ! int line; ! int warn; ! { ! if (file) ! { ! if (warn) ! return build_message_string (_("%s:%d: warning: "), file, line); ! else ! return build_message_string ("%s:%d: ", file, line); ! } ! else ! { ! if (warn) ! return build_message_string (_("%s: warning: "), progname); ! else ! return build_message_string ("%s: ", progname); ! } ! } ! ! /* Same as context_as_prefix, but only the source FILE is given. */ ! char * file_name_as_prefix (f) const char *f; --- 642,648 ---- return str; } ! /* Same as diagnsotic_build_prefix, but only the source FILE is given. */ char * file_name_as_prefix (f) const char *f; *************** file_name_as_prefix (f) *** 803,854 **** return build_message_string ("%s: ", f); } - /* Format a MESSAGE into BUFFER. Automatically wrap lines. */ - - static void - output_do_printf (buffer, msg) - output_buffer *buffer; - const char *msg; - { - char *message = vbuild_message_string (msg, - output_buffer_format_args (buffer)); - - wrap_text (buffer, message, message + strlen (message)); - free (message); - } - - /* Format a message into BUFFER a la printf. */ - void output_printf VPARAMS ((struct output_buffer *buffer, const char *msgid, ...)) { ! va_list *old_args; ! VA_OPEN (ap, msgid); VA_FIXEDARG (ap, output_buffer *, buffer); VA_FIXEDARG (ap, const char *, msgid); ! old_args = output_buffer_ptr_to_format_args (buffer); ! output_buffer_ptr_to_format_args (buffer) = ≈ ! output_do_printf (buffer, _(msgid)); ! output_buffer_ptr_to_format_args (buffer) = old_args; VA_CLOSE (ap); } /* Print a message relevant to the given DECL. */ - static void ! format_with_decl (buffer, decl) output_buffer *buffer; tree decl; { const char *p; ! /* Do magic to get around lack of varargs support for insertion of arguments into existing list. We know that the decl is first; we ass_u_me that it will be printed with "%s". */ ! for (p = output_buffer_text_cursor (buffer); *p; ++p) { if (*p == '%') { --- 650,683 ---- return build_message_string ("%s: ", f); } /* Format a message into BUFFER a la printf. */ void output_printf VPARAMS ((struct output_buffer *buffer, const char *msgid, ...)) { ! text_info text; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, output_buffer *, buffer); VA_FIXEDARG (ap, const char *, msgid); ! text.args_ptr = ≈ ! text.format_spec = _(msgid); ! output_format (buffer, &text); VA_CLOSE (ap); } /* Print a message relevant to the given DECL. */ static void ! format_with_decl (buffer, text, decl) output_buffer *buffer; + text_info *text; tree decl; { const char *p; ! /* Do magic to get around lack of varargs support for insertion of arguments into existing list. We know that the decl is first; we ass_u_me that it will be printed with "%s". */ ! for (p = text->format_spec; *p; ++p) { if (*p == '%') { *************** format_with_decl (buffer, decl) *** 862,873 **** } /* Print the left-hand substring. */ ! maybe_wrap_text (buffer, output_buffer_text_cursor (buffer), p); ! if (*p == '%') /* Print the name. */ { const char *const n = (DECL_NAME (decl) ! ? (*decl_printable_name) (decl, 2) : _("((anonymous))")); output_add_string (buffer, n); while (*p) --- 691,702 ---- } /* Print the left-hand substring. */ ! maybe_wrap_text (buffer, text->format_spec, p); ! if (*p == '%') /* Print the name. */ { const char *const n = (DECL_NAME (decl) ! ? (*lang_hooks.decl_printable_name) (decl, 2) : _("((anonymous))")); output_add_string (buffer, n); while (*p) *************** format_with_decl (buffer, decl) *** 880,955 **** if (*p) /* Print the rest of the message. */ { ! output_buffer_text_cursor (buffer) = p; ! output_format (buffer); } } /* Report a diagnostic MESSAGE at the declaration DECL. MSG is a format string which uses %s to substitute the declaration name; subsequent substitutions are a la output_format. */ - static void ! diagnostic_for_decl (decl, msgid, args_ptr, warn) tree decl; - const char *msgid; - va_list *args_ptr; - int warn; { ! output_state os; ! ! if (diagnostic_lock++) ! error_recursion (); ! if (count_error (warn)) { ! os = output_buffer_state (diagnostic_buffer); ! report_error_function (DECL_SOURCE_FILE (decl)); output_set_prefix ! (diagnostic_buffer, context_as_prefix ! (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), warn)); ! output_buffer_ptr_to_format_args (diagnostic_buffer) = args_ptr; ! output_buffer_text_cursor (diagnostic_buffer) = _(msgid); ! format_with_decl (diagnostic_buffer, decl); ! diagnostic_finish ((output_buffer *) global_dc); ! output_destroy_prefix (diagnostic_buffer); ! ! output_buffer_state (diagnostic_buffer) = os; } ! diagnostic_lock--; } ! ! /* Count an error or warning. Return 1 if the message should be printed. */ ! ! int ! count_error (warningp) ! int warningp; { ! if (warningp && !diagnostic_report_warnings_p ()) ! return 0; ! if (warningp && !warnings_are_errors) ! warningcount++; ! else { ! static int warning_message = 0; ! if (warningp && !warning_message) ! { ! verbatim ("%s: warnings being treated as errors\n", progname); ! warning_message = 1; ! } ! errorcount++; } ! return 1; } /* Print a diagnostic MSGID on FILE. This is just fprintf, except it runs its second argument through gettext. */ - void fnotice VPARAMS ((FILE *file, const char *msgid, ...)) { --- 709,928 ---- if (*p) /* Print the rest of the message. */ { ! text->format_spec = p; ! output_format (buffer, text); } } + /* Flush the content of BUFFER onto the attached stream. */ + static void + output_flush (buffer) + output_buffer *buffer; + { + output_buffer_to_stream (buffer); + output_clear_data (buffer); + fputc ('\n', output_buffer_attached_stream (buffer)); + fflush (output_buffer_attached_stream (buffer)); + } + + /* Helper subroutine of output_verbatim and verbatim. Do the appropriate + settings needed by BUFFER for a verbatim formatting. */ + static void + output_do_verbatim (buffer, text) + output_buffer *buffer; + text_info *text; + { + diagnostic_prefixing_rule_t rule = output_prefixing_rule (buffer); + int line_cutoff = output_line_cutoff (buffer); + + /* Set verbatim mode. */ + output_prefixing_rule (buffer) = DIAGNOSTICS_SHOW_PREFIX_NEVER; + output_line_cutoff (buffer) = 0; + /* Do the actual formatting. */ + output_format (buffer, text); + /* Restore previous settings. */ + output_prefixing_rule (buffer) = rule; + output_line_cutoff (buffer) = line_cutoff; + } + + /* Output MESSAGE verbatim into BUFFER. */ + void + output_verbatim VPARAMS ((output_buffer *buffer, const char *msgid, ...)) + { + text_info text; + VA_OPEN (ap, msgid); + VA_FIXEDARG (ap, output_buffer *, buffer); + VA_FIXEDARG (ap, const char *, msgid); + + text.format_spec = msgid; + text.args_ptr = ≈ + output_do_verbatim (buffer, &text); + VA_CLOSE (ap); + } + + + /* Initialize the diagnostic message outputting machinery. */ + void + diagnostic_initialize (context) + diagnostic_context *context; + { + memset (context, 0, sizeof *context); + obstack_init (&context->buffer.obstack); + + /* By default, diagnostics are sent to stderr. */ + output_buffer_attached_stream (&context->buffer) = stderr; + + /* By default, we emit prefixes once per message. */ + diagnostic_prefixing_rule (context) = DIAGNOSTICS_SHOW_PREFIX_ONCE; + + diagnostic_starter (context) = default_diagnostic_starter; + diagnostic_finalizer (context) = default_diagnostic_finalizer; + context->warnings_are_errors_message = warnings_are_errors; + } + + /* Returns true if the next format specifier in TEXT is a format specifier + for a location_t. If so, update the object pointed by LOCUS to reflect + the specified location in *TEXT->args_ptr. */ + static bool + text_specifies_location (text, locus) + text_info *text; + location_t *locus; + { + const char *p; + /* Skip any leading text. */ + for (p = text->format_spec; *p && *p != '%'; ++p) + ; + + /* Extract the location information if any. */ + if (*p == '%' && *++p == 'H') + { + *locus = *va_arg (*text->args_ptr, location_t *); + text->format_spec = p + 1; + return true; + } + + return false; + } + + void + diagnostic_set_info (diagnostic, msgid, args, file, line, kind) + diagnostic_info *diagnostic; + const char *msgid; + va_list *args; + const char *file; + int line; + diagnostic_t kind; + { + diagnostic->message.format_spec = msgid; + diagnostic->message.args_ptr = args; + /* If the diagnostic message doesn't specify a loccation, + use FILE and LINE. */ + if (!text_specifies_location (&diagnostic->message, &diagnostic->location)) + { + diagnostic->location.file = file; + diagnostic->location.line = line; + } + diagnostic->kind = kind; + } + + /* Return a malloc'd string describing a location. The caller is + responsible for freeing the memory. */ + char * + diagnostic_build_prefix (diagnostic) + diagnostic_info *diagnostic; + { + static const char *const diagnostic_kind_text[] = { + #define DEFINE_DIAGNOSTIC_KIND(K, T) (T), + #include "diagnostic.def" + #undef DEFINE_DIAGNOSTIC_KIND + "must-not-happen" + }; + if (diagnostic->kind >= DK_LAST_DIAGNOSTIC_KIND) + abort(); + + return diagnostic->location.file + ? build_message_string ("%s:%d: %s", + diagnostic->location.file, + diagnostic->location.line, + _(diagnostic_kind_text[diagnostic->kind])) + : build_message_string ("%s: %s", progname, + _(diagnostic_kind_text[diagnostic->kind])); + } /* Report a diagnostic MESSAGE at the declaration DECL. MSG is a format string which uses %s to substitute the declaration name; subsequent substitutions are a la output_format. */ static void ! diagnostic_for_decl (diagnostic, decl) ! diagnostic_info *diagnostic; tree decl; { ! if (global_dc->lock++) ! error_recursion (global_dc); ! if (diagnostic_count_diagnostic (global_dc, diagnostic->kind)) { ! diagnostic_report_current_function (global_dc); output_set_prefix ! (&global_dc->buffer, diagnostic_build_prefix (diagnostic)); ! format_with_decl (&global_dc->buffer, &diagnostic->message, decl); ! output_flush (&global_dc->buffer); ! output_destroy_prefix (&global_dc->buffer); } ! global_dc->lock--; } ! void ! diagnostic_flush_buffer (context) ! diagnostic_context *context; { ! output_buffer_to_stream (&context->buffer); ! fflush (output_buffer_attached_stream (&context->buffer)); ! } ! /* Count a diagnostic. Return true if the message should be printed. */ ! bool ! diagnostic_count_diagnostic (context, kind) ! diagnostic_context *context; ! diagnostic_t kind; ! { ! switch (kind) { ! default: ! abort(); ! break; ! case DK_FATAL: case DK_ICE: case DK_SORRY: ! case DK_ANACHRONISM: case DK_NOTE: ! ++diagnostic_kind_count (context, kind); ! break; ! ! case DK_WARNING: ! if (!diagnostic_report_warnings_p ()) ! return false; ! else if (!warnings_are_errors) ! { ! ++diagnostic_kind_count (context, DK_WARNING); ! break; ! } ! /* else fall through. */ ! ! case DK_ERROR: ! if (kind == DK_WARNING && context->warnings_are_errors_message) ! { ! output_verbatim (&context->buffer, ! "%s: warnings being treated as errors\n", progname); ! context->warnings_are_errors_message = false; ! } ! ++diagnostic_kind_count (context, DK_ERROR); ! break; } ! return true; } /* Print a diagnostic MSGID on FILE. This is just fprintf, except it runs its second argument through gettext. */ void fnotice VPARAMS ((FILE *file, const char *msgid, ...)) { *************** fnotice VPARAMS ((FILE *file, const char *** 964,1015 **** /* Print a fatal I/O error message. Argument are like printf. Also include a system error message based on `errno'. */ - void fatal_io_error VPARAMS ((const char *msgid, ...)) { ! output_state os; ! VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! os = output_buffer_state (diagnostic_buffer); ! ! output_printf (diagnostic_buffer, "%s: %s: ", progname, xstrerror (errno)); ! output_buffer_ptr_to_format_args (diagnostic_buffer) = ≈ ! output_buffer_text_cursor (diagnostic_buffer) = _(msgid); ! output_format (diagnostic_buffer); ! diagnostic_finish ((output_buffer *) global_dc); ! output_buffer_state (diagnostic_buffer) = os; VA_CLOSE (ap); exit (FATAL_EXIT_CODE); } /* Issue a pedantic warning MSGID. */ - void pedwarn VPARAMS ((const char *msgid, ...)) { ! diagnostic_context dc; ! VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context ! (&dc, msgid, &ap, input_filename, lineno, !flag_pedantic_errors); ! report_diagnostic (&dc); VA_CLOSE (ap); } ! /* Issue a pedantic waring about DECL. */ ! void pedwarn_with_decl VPARAMS ((tree decl, const char *msgid, ...)) { VA_OPEN (ap, msgid); VA_FIXEDARG (ap, tree, decl); VA_FIXEDARG (ap, const char *, msgid); /* We don't want -pedantic-errors to cause the compilation to fail from "errors" in system header files. Sometimes fixincludes can't fix what's broken (eg: unsigned char bitfields - fixing it may change the alignment --- 937,985 ---- /* Print a fatal I/O error message. Argument are like printf. Also include a system error message based on `errno'. */ void fatal_io_error VPARAMS ((const char *msgid, ...)) { ! text_info text; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! text.format_spec = _(msgid); ! text.args_ptr = ≈ ! output_printf (&global_dc->buffer, "%s: %s: ", progname, xstrerror (errno)); ! output_format (&global_dc->buffer, &text); ! output_flush (&global_dc->buffer); VA_CLOSE (ap); exit (FATAL_EXIT_CODE); } /* Issue a pedantic warning MSGID. */ void pedwarn VPARAMS ((const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, _(msgid), &ap, input_filename, lineno, ! pedantic_error_kind ()); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); } ! /* Issue a pedantic warning about DECL. */ void pedwarn_with_decl VPARAMS ((tree decl, const char *msgid, ...)) { + diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, tree, decl); VA_FIXEDARG (ap, const char *, msgid); + diagnostic_set_info (&diagnostic, _(msgid), &ap, + DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), + pedantic_error_kind ()); + /* We don't want -pedantic-errors to cause the compilation to fail from "errors" in system header files. Sometimes fixincludes can't fix what's broken (eg: unsigned char bitfields - fixing it may change the alignment *************** pedwarn_with_decl VPARAMS ((tree decl, c *** 1017,1122 **** or kernel uses the original layout). There's no point in issuing a warning either, it's just unnecessary noise. */ if (!DECL_IN_SYSTEM_HEADER (decl)) ! diagnostic_for_decl (decl, msgid, &ap, !flag_pedantic_errors); VA_CLOSE (ap); } /* Same as above but within the context FILE and LINE. */ - void pedwarn_with_file_and_line VPARAMS ((const char *file, int line, const char *msgid, ...)) { ! diagnostic_context dc; ! VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, file); VA_FIXEDARG (ap, int, line); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context (&dc, msgid, &ap, file, line, !flag_pedantic_errors); ! report_diagnostic (&dc); VA_CLOSE (ap); } /* Just apologize with MSGID. */ - void sorry VPARAMS ((const char *msgid, ...)) { ! output_state os; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ++sorrycount; ! os = output_buffer_state (diagnostic_buffer); output_set_prefix ! (diagnostic_buffer, context_as_prefix (input_filename, lineno, 0)); ! output_printf (diagnostic_buffer, "sorry, not implemented: "); ! output_buffer_ptr_to_format_args (diagnostic_buffer) = ≈ ! output_buffer_text_cursor (diagnostic_buffer) = _(msgid); ! output_format (diagnostic_buffer); ! diagnostic_finish ((output_buffer *) global_dc); ! output_buffer_state (diagnostic_buffer) = os; VA_CLOSE (ap); } /* Called when the start of a function definition is parsed, this function prints on stderr the name of the function. */ - void announce_function (decl) tree decl; { ! if (! quiet_flag) { if (rtl_dump_and_exit) verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl))); else ! verbatim (" %s", (*decl_printable_name) (decl, 2)); fflush (stderr); ! output_needs_newline (diagnostic_buffer) = 1; ! record_last_error_function (); } } /* The default function to print out name of current function that caused an error. */ - void ! default_print_error_function (context, file) diagnostic_context *context; const char *file; { ! if (error_function_changed ()) { ! char *prefix = file ? build_message_string ("%s: ", file) : NULL; ! output_state os; - os = output_buffer_state (context); - output_set_prefix ((output_buffer *) context, prefix); - if (current_function_decl == NULL) ! output_add_string ((output_buffer *) context, _("At top level:")); else { if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) ! output_printf ! ((output_buffer *) context, "In member function `%s':", ! (*decl_printable_name) (current_function_decl, 2)); else ! output_printf ! ((output_buffer *) context, "In function `%s':", ! (*decl_printable_name) (current_function_decl, 2)); } ! output_add_newline ((output_buffer *) context); ! record_last_error_function (); ! output_buffer_to_stream ((output_buffer *) context); ! output_buffer_state (context) = os; ! free ((char*) prefix); } } --- 987,1084 ---- or kernel uses the original layout). There's no point in issuing a warning either, it's just unnecessary noise. */ if (!DECL_IN_SYSTEM_HEADER (decl)) ! diagnostic_for_decl (&diagnostic, decl); VA_CLOSE (ap); } /* Same as above but within the context FILE and LINE. */ void pedwarn_with_file_and_line VPARAMS ((const char *file, int line, const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, file); VA_FIXEDARG (ap, int, line); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, _(msgid), &ap, file, line, ! pedantic_error_kind ()); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); } /* Just apologize with MSGID. */ void sorry VPARAMS ((const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ++sorrycount; ! diagnostic_set_info (&diagnostic, _(msgid), &ap, ! input_filename, lineno, DK_SORRY); output_set_prefix ! (&global_dc->buffer, diagnostic_build_prefix (&diagnostic)); ! output_format (&global_dc->buffer, &diagnostic.message); ! output_flush (&global_dc->buffer); VA_CLOSE (ap); } /* Called when the start of a function definition is parsed, this function prints on stderr the name of the function. */ void announce_function (decl) tree decl; { ! if (!quiet_flag) { if (rtl_dump_and_exit) verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl))); else ! verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2)); fflush (stderr); ! output_needs_newline (&global_dc->buffer) = true; ! diagnostic_set_last_function (global_dc); } } /* The default function to print out name of current function that caused an error. */ void ! lhd_print_error_function (context, file) diagnostic_context *context; const char *file; { ! if (diagnostic_last_function_changed (context)) { ! const char *old_prefix = output_prefix (&context->buffer); ! char *new_prefix = file ? build_message_string ("%s: ", file) : NULL; ! ! output_set_prefix (&context->buffer, new_prefix); if (current_function_decl == NULL) ! output_add_string (&context->buffer, _("At top level:")); else { if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) ! output_printf ! (&context->buffer, "In member function `%s':", ! (*lang_hooks.decl_printable_name) (current_function_decl, 2)); else ! output_printf ! (&context->buffer, "In function `%s':", ! (*lang_hooks.decl_printable_name) (current_function_decl, 2)); } ! output_add_newline (&context->buffer); ! diagnostic_set_last_function (context); ! output_buffer_to_stream (&context->buffer); ! context->buffer.state.prefix = old_prefix; ! free ((char*) new_prefix); } } *************** default_print_error_function (context, f *** 1125,1161 **** We ignore the FILE parameter, as it cannot be relied upon. */ void ! report_error_function (file) ! const char *file ATTRIBUTE_UNUSED; { ! report_problematic_module ((output_buffer *) global_dc); ! (*print_error_function) (global_dc, input_filename); } void error_with_file_and_line VPARAMS ((const char *file, int line, const char *msgid, ...)) { ! diagnostic_context dc; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, file); VA_FIXEDARG (ap, int, line); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context (&dc, msgid, &ap, file, line, /* warn = */ 0); ! report_diagnostic (&dc); VA_CLOSE (ap); } void error_with_decl VPARAMS ((tree decl, const char *msgid, ...)) { VA_OPEN (ap, msgid); VA_FIXEDARG (ap, tree, decl); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_for_decl (decl, msgid, &ap, /* warn = */ 0); VA_CLOSE (ap); } --- 1087,1127 ---- We ignore the FILE parameter, as it cannot be relied upon. */ void ! diagnostic_report_current_function (context) ! diagnostic_context *context; { ! diagnostic_report_current_module (context); ! (*lang_hooks.print_error_function) (context, input_filename); } void error_with_file_and_line VPARAMS ((const char *file, int line, const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, file); VA_FIXEDARG (ap, int, line); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, file, line, DK_ERROR); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); } void error_with_decl VPARAMS ((tree decl, const char *msgid, ...)) { + diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, tree, decl); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, ! DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), ! DK_ERROR); ! diagnostic_for_decl (&diagnostic, decl); VA_CLOSE (ap); } *************** error_with_decl VPARAMS ((tree decl, con *** 1165,1178 **** void error VPARAMS ((const char *msgid, ...)) { ! diagnostic_context dc; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context ! (&dc, msgid, &ap, input_filename, lineno, /* warn = */ 0); ! report_diagnostic (&dc); VA_CLOSE (ap); } --- 1131,1144 ---- void error VPARAMS ((const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno, ! DK_ERROR); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); } *************** error VPARAMS ((const char *msgid, ...)) *** 1182,1225 **** void fatal_error VPARAMS ((const char *msgid, ...)) { ! diagnostic_context dc; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context ! (&dc, msgid, &ap, input_filename, lineno, /* warn = */ 0); ! report_diagnostic (&dc); VA_CLOSE (ap); fnotice (stderr, "compilation terminated.\n"); exit (FATAL_EXIT_CODE); } - /* Report a compiler error at the current line number. Allow a front end to - intercept the message. */ - - static void (*internal_error_function) PARAMS ((const char *, va_list *)); - - /* Set the function to call when a compiler error occurs. */ - - void - set_internal_error_function (f) - void (*f) PARAMS ((const char *, va_list *)); - { - internal_error_function = f; - } - void internal_error VPARAMS ((const char *msgid, ...)) { ! diagnostic_context dc; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! if (diagnostic_lock) ! error_recursion (); #ifndef ENABLE_CHECKING if (errorcount > 0 || sorrycount > 0) --- 1148,1177 ---- void fatal_error VPARAMS ((const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno, ! DK_FATAL); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); fnotice (stderr, "compilation terminated.\n"); exit (FATAL_EXIT_CODE); } void internal_error VPARAMS ((const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! if (global_dc->lock) ! error_recursion (global_dc); #ifndef ENABLE_CHECKING if (errorcount > 0 || sorrycount > 0) *************** internal_error VPARAMS ((const char *msg *** 1230,1247 **** } #endif ! if (internal_error_function != 0) ! (*internal_error_function) (_(msgid), &ap); ! ! set_diagnostic_context ! (&dc, msgid, &ap, input_filename, lineno, /* warn = */0); ! report_diagnostic (&dc); VA_CLOSE (ap); fnotice (stderr, "Please submit a full bug report,\n\ with preprocessed source if appropriate.\n\ ! See %s for instructions.\n", GCCBUGURL); exit (FATAL_EXIT_CODE); } --- 1182,1199 ---- } #endif ! if (global_dc->internal_error != 0) ! (*global_dc->internal_error) (_(msgid), &ap); ! ! diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno, ! DK_ICE); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); fnotice (stderr, "Please submit a full bug report,\n\ with preprocessed source if appropriate.\n\ ! See %s for instructions.\n", bug_report_url); exit (FATAL_EXIT_CODE); } *************** void *** 1249,1347 **** warning_with_file_and_line VPARAMS ((const char *file, int line, const char *msgid, ...)) { ! diagnostic_context dc; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, file); VA_FIXEDARG (ap, int, line); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context (&dc, msgid, &ap, file, line, /* warn = */ 1); ! report_diagnostic (&dc); VA_CLOSE (ap); } void warning_with_decl VPARAMS ((tree decl, const char *msgid, ...)) { VA_OPEN (ap, msgid); VA_FIXEDARG (ap, tree, decl); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_for_decl (decl, msgid, &ap, /* warn = */ 1); VA_CLOSE (ap); } void warning VPARAMS ((const char *msgid, ...)) { ! diagnostic_context dc; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! set_diagnostic_context ! (&dc, msgid, &ap, input_filename, lineno, /* warn = */ 1); ! report_diagnostic (&dc); VA_CLOSE (ap); } - /* Flush diagnostic_buffer content on stderr. */ - - static void - diagnostic_finish (buffer) - output_buffer *buffer; - { - output_buffer_to_stream (buffer); - clear_diagnostic_info (buffer); - fputc ('\n', output_buffer_attached_stream (buffer)); - fflush (output_buffer_attached_stream (buffer)); - } - - /* Helper subroutine of output_verbatim and verbatim. Do the appropriate - settings needed by BUFFER for a verbatim formatting. */ - - static void - output_do_verbatim (buffer, msgid, args_ptr) - output_buffer *buffer; - const char *msgid; - va_list *args_ptr; - { - output_state os; - - os = output_buffer_state (buffer); - output_prefix (buffer) = NULL; - diagnostic_prefixing_rule (buffer) = DIAGNOSTICS_SHOW_PREFIX_NEVER; - output_buffer_text_cursor (buffer) = _(msgid); - output_buffer_ptr_to_format_args (buffer) = args_ptr; - output_set_maximum_length (buffer, 0); - output_format (buffer); - output_buffer_state (buffer) = os; - } - - /* Output MESSAGE verbatim into BUFFER. */ - - void - output_verbatim VPARAMS ((output_buffer *buffer, const char *msgid, ...)) - { - VA_OPEN (ap, msgid); - VA_FIXEDARG (ap, output_buffer *, buffer); - VA_FIXEDARG (ap, const char *, msgid); - - output_do_verbatim (buffer, msgid, &ap); - VA_CLOSE (ap); - } /* Same as above but use diagnostic_buffer. */ void verbatim VPARAMS ((const char *msgid, ...)) { VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! output_do_verbatim (diagnostic_buffer, msgid, &ap); ! output_buffer_to_stream (diagnostic_buffer); VA_CLOSE (ap); } --- 1201,1261 ---- warning_with_file_and_line VPARAMS ((const char *file, int line, const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, file); VA_FIXEDARG (ap, int, line); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, file, line, DK_WARNING); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); } void warning_with_decl VPARAMS ((tree decl, const char *msgid, ...)) { + diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, tree, decl); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, ! DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), ! DK_WARNING); ! diagnostic_for_decl (&diagnostic, decl); VA_CLOSE (ap); } void warning VPARAMS ((const char *msgid, ...)) { ! diagnostic_info diagnostic; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno, ! DK_WARNING); ! report_diagnostic (&diagnostic); VA_CLOSE (ap); } /* Same as above but use diagnostic_buffer. */ void verbatim VPARAMS ((const char *msgid, ...)) { + text_info text; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, const char *, msgid); ! text.format_spec = _(msgid); ! text.args_ptr = ≈ ! output_do_verbatim (&global_dc->buffer, &text); ! output_buffer_to_stream (&global_dc->buffer); VA_CLOSE (ap); } *************** verbatim VPARAMS ((const char *msgid, .. *** 1352,1378 **** in the documentation of output_format. */ void ! report_diagnostic (dc) ! diagnostic_context *dc; { ! output_state os; ! ! if (diagnostic_lock++) ! error_recursion (); ! if (count_error (diagnostic_is_warning (dc))) { ! os = output_buffer_state (diagnostic_buffer); ! diagnostic_msg = diagnostic_message (dc); ! diagnostic_args = diagnostic_argument_list (dc); ! (*diagnostic_starter (dc)) (diagnostic_buffer, dc); ! output_format (diagnostic_buffer); ! (*diagnostic_finalizer (dc)) (diagnostic_buffer, dc); ! diagnostic_finish ((output_buffer *) global_dc); ! output_buffer_state (diagnostic_buffer) = os; } ! diagnostic_lock--; } /* Inform the user that an error occurred while trying to report some --- 1266,1287 ---- in the documentation of output_format. */ void ! diagnostic_report_diagnostic (context, diagnostic) ! diagnostic_context *context; ! diagnostic_info *diagnostic; { ! if (context->lock++) ! error_recursion (context); ! if (diagnostic_count_diagnostic (context, diagnostic->kind)) { ! (*diagnostic_starter (context)) (context, diagnostic); ! output_format (&context->buffer, &diagnostic->message); ! (*diagnostic_finalizer (context)) (context, diagnostic); ! output_flush (&context->buffer); } ! --context->lock; } /* Inform the user that an error occurred while trying to report some *************** report_diagnostic (dc) *** 1381,1397 **** This mustn't use internal_error, that will cause infinite recursion. */ static void ! error_recursion () { ! if (diagnostic_lock < 3) ! diagnostic_finish ((output_buffer *) global_dc); fnotice (stderr, "Internal compiler error: Error reporting routines re-entered.\n"); fnotice (stderr, "Please submit a full bug report,\n\ with preprocessed source if appropriate.\n\ ! See %s for instructions.\n", GCCBUGURL); exit (FATAL_EXIT_CODE); } --- 1290,1307 ---- This mustn't use internal_error, that will cause infinite recursion. */ static void ! error_recursion (context) ! diagnostic_context *context; { ! if (context->lock < 3) ! output_flush (&context->buffer); fnotice (stderr, "Internal compiler error: Error reporting routines re-entered.\n"); fnotice (stderr, "Please submit a full bug report,\n\ with preprocessed source if appropriate.\n\ ! See %s for instructions.\n", bug_report_url); exit (FATAL_EXIT_CODE); } *************** fancy_abort (file, line, function) *** 1449,1529 **** int line; const char *function; { ! internal_error ("Internal compiler error in %s, at %s:%d", ! function, trim_filename (file), line); ! } ! ! /* Setup DC for reporting a diagnostic MESSAGE (an error or a WARNING), ! using arguments pointed to by ARGS_PTR, issued at a location specified ! by FILE and LINE. */ ! ! void ! set_diagnostic_context (dc, msgid, args_ptr, file, line, warn) ! diagnostic_context *dc; ! const char *msgid; ! va_list *args_ptr; ! const char *file; ! int line; ! int warn; ! { ! memset (dc, 0, sizeof (diagnostic_context)); ! diagnostic_message (dc) = _(msgid); ! diagnostic_argument_list (dc) = args_ptr; ! diagnostic_file_location (dc) = file; ! diagnostic_line_location (dc) = line; ! diagnostic_is_warning (dc) = warn; ! diagnostic_starter (dc) = diagnostic_starter (global_dc); ! diagnostic_finalizer (dc) = diagnostic_finalizer (global_dc); } void ! report_problematic_module (buffer) ! output_buffer *buffer; { struct file_stack *p; ! if (output_needs_newline (buffer)) { ! output_add_newline (buffer); ! output_needs_newline (buffer) = 0; } if (input_file_stack && input_file_stack->next != 0 ! && error_module_changed ()) { for (p = input_file_stack->next; p; p = p->next) if (p == input_file_stack->next) ! output_verbatim ! (buffer, "In file included from %s:%d", p->name, p->line); else ! output_verbatim ! (buffer, ",\n from %s:%d", p->name, p->line); ! output_verbatim (buffer, ":\n"); ! record_last_error_module (); } } static void ! default_diagnostic_starter (buffer, dc) ! output_buffer *buffer; ! diagnostic_context *dc; { ! report_error_function (diagnostic_file_location (dc)); ! output_set_prefix (buffer, ! context_as_prefix (diagnostic_file_location (dc), ! diagnostic_line_location (dc), ! diagnostic_is_warning (dc))); } static void ! default_diagnostic_finalizer (buffer, dc) ! output_buffer *buffer; ! diagnostic_context *dc __attribute__((__unused__)); { ! output_destroy_prefix (buffer); } ! void warn_deprecated_use (node) tree node; { --- 1359,1426 ---- int line; const char *function; { ! internal_error ("in %s, at %s:%d", function, trim_filename (file), line); } void ! diagnostic_report_current_module (context) ! diagnostic_context *context; { struct file_stack *p; ! if (output_needs_newline (&context->buffer)) { ! output_add_newline (&context->buffer); ! output_needs_newline (&context->buffer) = false; } if (input_file_stack && input_file_stack->next != 0 ! && diagnostic_last_module_changed (context)) { for (p = input_file_stack->next; p; p = p->next) if (p == input_file_stack->next) ! output_verbatim (&context->buffer, ! "In file included from %s:%d", p->name, p->line); else ! output_verbatim (&context->buffer, ! ",\n from %s:%d", p->name, p->line); ! output_verbatim (&context->buffer, ":\n"); ! diagnostic_set_last_module (context); } } static void ! default_diagnostic_starter (context, diagnostic) ! diagnostic_context *context; ! diagnostic_info *diagnostic; { ! diagnostic_report_current_function (context); ! output_set_prefix (&context->buffer, diagnostic_build_prefix (diagnostic)); } static void ! default_diagnostic_finalizer (context, diagnostic) ! diagnostic_context *context; ! diagnostic_info *diagnostic __attribute__((unused)); { ! output_destroy_prefix (&context->buffer); } ! void ! inform VPARAMS ((const char *msgid, ...)) ! { ! diagnostic_info diagnostic; ! ! VA_OPEN (ap, msgid); ! VA_FIXEDARG (ap, const char *, msgid); ! ! diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno, ! DK_NOTE); ! report_diagnostic (&diagnostic); ! VA_CLOSE (ap); ! } ! ! void warn_deprecated_use (node) tree node; { *************** warn_deprecated_use (node) *** 1544,1550 **** else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL && DECL_NAME (TYPE_NAME (node))) what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))); ! if (what) { if (decl) --- 1441,1447 ---- else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL && DECL_NAME (TYPE_NAME (node))) what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))); ! if (what) { if (decl) diff -Nrc3pad gcc-3.2.3/gcc/diagnostic.def gcc-3.3/gcc/diagnostic.def *** gcc-3.2.3/gcc/diagnostic.def 2001-05-01 08:19:45.000000000 +0000 --- gcc-3.3/gcc/diagnostic.def 2002-08-12 18:34:51.000000000 +0000 *************** *** 1,7 **** ! DEFINE_DIAGNOSTIC_KIND (DK_FATAL, "Fatal error: ") ! DEFINE_DIAGNOSTIC_KIND (DK_ICE, "Internal compiler error: ") ! DEFINE_DIAGNOSTIC_KIND (DK_SORRY, "Sorry, unimplemented: ") ! DEFINE_DIAGNOSTIC_KIND (DK_ERROR, "Error: ") ! DEFINE_DIAGNOSTIC_KIND (DK_WARNING, "Warning: ") ! DEFINE_DIAGNOSTIC_KIND (DK_ANACHRONISM, "Anachronism: ") ! DEFINE_DIAGNOSTIC_KIND (DK_NOTE, "Note: ") --- 1,9 ---- ! DEFINE_DIAGNOSTIC_KIND (DK_FATAL, "fatal error: ") ! DEFINE_DIAGNOSTIC_KIND (DK_ICE, "internal compiler error: ") ! DEFINE_DIAGNOSTIC_KIND (DK_SORRY, "sorry, unimplemented: ") ! DEFINE_DIAGNOSTIC_KIND (DK_ERROR, "error: ") ! DEFINE_DIAGNOSTIC_KIND (DK_WARNING, "warning: ") ! DEFINE_DIAGNOSTIC_KIND (DK_ANACHRONISM, "anachronism: ") ! DEFINE_DIAGNOSTIC_KIND (DK_NOTE, "note: ") ! DEFINE_DIAGNOSTIC_KIND (DK_DEBUG, "debug: ") ! diff -Nrc3pad gcc-3.2.3/gcc/diagnostic.h gcc-3.3/gcc/diagnostic.h *** gcc-3.2.3/gcc/diagnostic.h 2002-01-07 08:50:07.000000000 +0000 --- gcc-3.3/gcc/diagnostic.h 2002-09-22 14:09:30.000000000 +0000 *************** Software Foundation, 59 Temple Place - S *** 23,36 **** #define GCC_DIAGNOSTIC_H #include "obstack.h" ! /* Forward declarations. */ ! typedef struct output_buffer output_buffer; ! typedef struct diagnostic_context diagnostic_context; ! typedef void (*diagnostic_starter_fn) PARAMS ((output_buffer *, ! diagnostic_context *)); ! typedef diagnostic_starter_fn diagnostic_finalizer_fn; typedef enum { #define DEFINE_DIAGNOSTIC_KIND(K, M) K, --- 23,39 ---- #define GCC_DIAGNOSTIC_H #include "obstack.h" + #include "location.h" ! /* The type of a text to be formatted according a format specification ! along with a list of things. */ ! typedef struct ! { ! const char *format_spec; ! va_list *args_ptr; ! } text_info; + /* Contants used to discreminate diagnostics. */ typedef enum { #define DEFINE_DIAGNOSTIC_KIND(K, M) K, *************** typedef enum *** 39,44 **** --- 42,58 ---- DK_LAST_DIAGNOSTIC_KIND } diagnostic_t; + /* A diagnostic is described by the MESSAGE to send, the FILE and LINE of + its context and its KIND (ice, error, warning, note, ...) See complete + list in diagnostic.def. */ + typedef struct + { + text_info message; + location_t location; + /* The kind of diagnostic it is about. */ + diagnostic_t kind; + } diagnostic_info; + #define pedantic_error_kind() (flag_pedantic_errors ? DK_ERROR : DK_WARNING) /* How often diagnostics are prefixed by their locations: *************** typedef enum *** 53,63 **** DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2 } diagnostic_prefixing_rule_t; - /* The type of front-end specific hook that formats trees into an - output_buffer. A language specific printer returns a truth value if - everything goes well. */ - typedef int (*printer_fn) PARAMS ((output_buffer *)); - /* This data structure encapsulates an output_buffer's state. */ typedef struct { --- 67,72 ---- *************** typedef struct *** 83,106 **** /* Current prefixing rule. */ diagnostic_prefixing_rule_t prefixing_rule; - - /* The current char to output. Updated by front-end (*format_map) when - it is called to report front-end printer for a specified format. */ - const char *cursor; - - /* A pointer to the variable argument-list for formatting. */ - va_list *format_args; - - /* The number of times we have issued diagnostics. */ - int diagnostic_count[DK_LAST_DIAGNOSTIC_KIND]; } output_state; ! /* The output buffer datatype. This is best seen as an abstract datatype. */ struct output_buffer { - /* Internal data. These fields should not be accessed directly by - front-ends. */ - /* The current state of the buffer. */ output_state state; --- 92,109 ---- /* Current prefixing rule. */ diagnostic_prefixing_rule_t prefixing_rule; } output_state; ! /* The type of a hook that formats client-specific data (trees mostly) into ! an output_buffer. A client-supplied formatter returns true if everything ! goes well. */ ! typedef struct output_buffer output_buffer; ! typedef bool (*printer_fn) PARAMS ((output_buffer *, text_info *)); ! ! /* The output buffer datatype. This is best seen as an abstract datatype ! whose fields should not be accessed directly by clients. */ struct output_buffer { /* The current state of the buffer. */ output_state state; *************** struct output_buffer *** 117,162 **** floating-point value. */ char digit_buffer[128]; ! /* If non-NULL, this function formats data in the BUFFER. When called, ! output_buffer_text_cursor (BUFFER) points to a format code. ! FORMAT_DECODER should call output_add_string (and related functions) ! to add data to the BUFFER. FORMAT_DECODER can read arguments from ! output_buffer_format_args (BUFFER) using VA_ARG. If the BUFFER needs ! additional characters from the format string, it should advance ! the output_buffer_text_cursor (BUFFER) as it goes. When FORMAT_DECODER ! returns, output_buffer_text_cursor (BUFFER) should point to the last ! character processed. */ ! printer_fn format_decoder; ! }; ! /* Current state of the diagnostic_context' output_buffer. This macro ! accepts both `diagnostic_context *' and `output_buffer *'. */ ! #define output_buffer_state(BUFFER) ((output_buffer *)(BUFFER))->state /* The stream attached to the output_buffer, where the formatted diagnostics will ultimately go. Works only on `output_buffer *'. */ #define output_buffer_attached_stream(BUFFER) (BUFFER)->stream - /* This points to the beginning of the rest of the diagnostic message - to be formatted. Accepts only `output_buffer *'s. */ - #define output_buffer_text_cursor(BUFFER) (BUFFER)->state.cursor - - /* The rest of the `variable argument list' not yet processed. - This macro works on both `output_state *' and `output_buffer *'. */ - #define output_buffer_format_args(BUFFER) \ - *(((output_state *)(BUFFER))->format_args) - /* In line-wrapping mode, whether we should start a new line. */ #define output_needs_newline(BUFFER) (BUFFER)->state.need_newline_p /* The amount of whitespace to be emitted when starting a new line. */ #define output_indentation(BUFFER) (BUFFER)->state.indent_skip ! /* A pointer to the formatted diagonstic message. */ #define output_message_text(BUFFER) \ ((const char *) obstack_base (&(BUFFER)->obstack)) /* This data structure bundles altogether any information relevant to the context of a diagnostic message. */ struct diagnostic_context --- 120,179 ---- floating-point value. */ char digit_buffer[128]; ! /* If non-NULL, this function formats a TEXT into the BUFFER. When called, ! TEXT->format_spec points to a format code. FORMAT_DECODER should call ! output_add_string (and related functions) to add data to the BUFFER. ! FORMAT_DECODER can read arguments from *TEXT->args_pts using VA_ARG. ! If the BUFFER needs additional characters from the format string, it ! should advance the TEXT->format_spec as it goes. When FORMAT_DECODER ! returns, TEXT->format_spec should point to the last character processed. ! */ printer_fn format_decoder; ! } ; ! #define output_prefix(BUFFER) (BUFFER)->state.prefix /* The stream attached to the output_buffer, where the formatted diagnostics will ultimately go. Works only on `output_buffer *'. */ #define output_buffer_attached_stream(BUFFER) (BUFFER)->stream /* In line-wrapping mode, whether we should start a new line. */ #define output_needs_newline(BUFFER) (BUFFER)->state.need_newline_p /* The amount of whitespace to be emitted when starting a new line. */ #define output_indentation(BUFFER) (BUFFER)->state.indent_skip ! /* A pointer to the formatted diagnostic message. */ #define output_message_text(BUFFER) \ ((const char *) obstack_base (&(BUFFER)->obstack)) + /* Client supplied function used to decode formats. */ + #define output_format_decoder(BUFFER) (BUFFER)->format_decoder + + /* Prefixing rule used in formatting a diagnostic message. */ + #define output_prefixing_rule(BUFFER) (BUFFER)->state.prefixing_rule + + /* Maximum characters per line in automatic line wrapping mode. + Zero means don't wrap lines. */ + #define output_line_cutoff(BUFFER) (BUFFER)->state.ideal_maximum_length + + /* True if BUFFER is in line-wrapping mode. */ + #define output_is_line_wrapping(BUFFER) (output_line_cutoff (BUFFER) > 0) + + #define output_formatted_scalar(BUFFER, FORMAT, INTEGER) \ + do \ + { \ + sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \ + output_add_string (BUFFER, (BUFFER)->digit_buffer); \ + } \ + while (0) + + /* Forward declarations. */ + typedef struct diagnostic_context diagnostic_context; + typedef void (*diagnostic_starter_fn) PARAMS ((diagnostic_context *, + diagnostic_info *)); + typedef diagnostic_starter_fn diagnostic_finalizer_fn; + /* This data structure bundles altogether any information relevant to the context of a diagnostic message. */ struct diagnostic_context *************** struct diagnostic_context *** 166,186 **** output_buffer. */ output_buffer buffer; ! /* The diagnostic message to output. */ ! const char *message; ! ! /* A pointer to a variable list of the arguments necessary for the ! purpose of message formatting. */ ! va_list *args_ptr; ! ! /* The name of the source file involved in the diiagnostic. */ ! const char *file; ! ! /* The line-location in the source file. */ ! int line; ! /* Is this message a warning? */ ! int warn; /* This function is called before any message is printed out. It is responsible for preparing message prefix and such. For example, it --- 183,194 ---- output_buffer. */ output_buffer buffer; ! /* The number of times we have issued diagnostics. */ ! int diagnostic_count[DK_LAST_DIAGNOSTIC_KIND]; ! /* True if we should display the "warnings are being tread as error" ! message, usually displayed once per compiler run. */ ! bool warnings_are_errors_message; /* This function is called before any message is printed out. It is responsible for preparing message prefix and such. For example, it *************** struct diagnostic_context *** 189,218 **** from "/home/gdr/src/nifty_printer.h:56: ... */ ! void (*begin_diagnostic) PARAMS ((output_buffer *, diagnostic_context *)); /* This function is called after the diagnostic message is printed. */ ! void (*end_diagnostic) PARAMS ((output_buffer *, diagnostic_context *)); ! ! /* Hook for front-end extensions. */ ! void *x_data; ! }; ! ! /* The diagnostic message being formatted. */ ! #define diagnostic_message(DC) (DC)->message ! /* A pointer to the variable argument list used in a call ! to a diagonstic routine. */ ! #define diagnostic_argument_list(DC) (DC)->args_ptr ! /* The program file to which the diagnostic is referring to. */ ! #define diagnostic_file_location(DC) (DC)->file ! /* The program source line referred to in the diagnostic message. */ ! #define diagnostic_line_location(DC) (DC)->line ! /* Tell whether the diagnostic message is to be treated as a warning. */ ! #define diagnostic_is_warning(DC) (DC)->warn /* Client supplied function to announce a diagnostic. */ #define diagnostic_starter(DC) (DC)->begin_diagnostic --- 197,223 ---- from "/home/gdr/src/nifty_printer.h:56: ... */ ! diagnostic_starter_fn begin_diagnostic; /* This function is called after the diagnostic message is printed. */ ! diagnostic_finalizer_fn end_diagnostic; ! /* Client hook to report an internal error. */ ! void (*internal_error) PARAMS ((const char *, va_list *)); ! /* Function of last diagnostic message; more generally, function such that ! if next diagnostic message is in it then we don't have to mention the ! function name. */ ! tree last_function; ! /* Used to detect when input_file_stack has changed since last described. */ ! int last_module; ! int lock; ! ! /* Hook for front-end extensions. */ ! void *x_data; ! }; /* Client supplied function to announce a diagnostic. */ #define diagnostic_starter(DC) (DC)->begin_diagnostic *************** struct diagnostic_context *** 224,283 **** /* Extension hook for client. */ #define diagnostic_auxiliary_data(DC) (DC)->x_data ! /* Client supplied function used to decode formats. Can operate on both ! `output_buffer *' and `diagnostic_context *'. */ ! #define diagnostic_format_decoder(DC) ((output_buffer *)(DC))->format_decoder ! /* Prefixing rule used in formatting a diagnostic message. Accepts both ! `output_buffer *' and `diagnostic_context *'. */ ! #define diagnostic_prefixing_rule(DC) \ ! ((output_buffer *)(DC))->state.prefixing_rule /* Maximum characters per line in automatic line wrapping mode. Zero means don't wrap lines. */ ! #define diagnostic_line_cutoff(DC) \ ! ((output_buffer *)(DC))->state.ideal_maximum_length ! /* This diagnostic context is used by front-ends that directly output diagnostic messages without going through `error', `warning', and similar functions. */ extern diagnostic_context *global_dc; - /* This will be removed shortly. */ - extern output_buffer *diagnostic_buffer; - /* The total count of a KIND of diagnostics meitted so far. */ ! #define diagnostic_kind_count(DC, DK) \ ! ((output_buffer *)(DC))->state.diagnostic_count[(int) (DK)] /* The number of errors that have been issued so far. Ideally, these ! would take an output_buffer as an argument. */ #define errorcount diagnostic_kind_count (global_dc, DK_ERROR) /* Similarly, but for warnings. */ #define warningcount diagnostic_kind_count (global_dc, DK_WARNING) /* Similarly, but for sorrys. */ #define sorrycount diagnostic_kind_count (global_dc, DK_SORRY) ! /* Returns non-zero if warnings should be emitted. */ #define diagnostic_report_warnings_p() \ (!inhibit_warnings \ && !(in_system_header && !warn_system_headers)) ! /* Prototypes */ ! extern void set_diagnostic_context PARAMS ((diagnostic_context *, ! const char *, va_list *, ! const char *, int, int)); ! extern void set_internal_error_function PARAMS ((void (*) ! PARAMS ((const char *, ! va_list *)))); ! extern void report_diagnostic PARAMS ((diagnostic_context *)); extern void diagnostic_initialize PARAMS ((diagnostic_context *)); extern void init_output_buffer PARAMS ((output_buffer *, const char *, int)); - extern void flush_diagnostic_buffer PARAMS ((void)); extern void output_clear PARAMS ((output_buffer *)); - extern const char *output_get_prefix PARAMS ((const output_buffer *)); extern const char *output_last_position PARAMS ((const output_buffer *)); extern void output_set_prefix PARAMS ((output_buffer *, const char *)); --- 229,306 ---- /* Extension hook for client. */ #define diagnostic_auxiliary_data(DC) (DC)->x_data ! /* Same as output_format_decoder. Works on 'diagnostic_context *'. */ ! #define diagnostic_format_decoder(DC) output_format_decoder (&(DC)->buffer) ! /* Same as output_prefixing_rule. Works on 'diagnostic_context *'. */ ! #define diagnostic_prefixing_rule(DC) output_prefixing_rule (&(DC)->buffer) /* Maximum characters per line in automatic line wrapping mode. Zero means don't wrap lines. */ ! #define diagnostic_line_cutoff(DC) output_line_cutoff (&(DC)->buffer) ! /* True if the last function in which a diagnostic was reported is ! different from the current one. */ ! #define diagnostic_last_function_changed(DC) \ ! ((DC)->last_function != current_function_decl) ! ! /* Remember the current function as being the last one in which we report ! a diagnostic. */ ! #define diagnostic_set_last_function(DC) \ ! (DC)->last_function = current_function_decl ! ! /* True if the last module or file in which a diagnostic was reported is ! different from the current one. */ ! #define diagnostic_last_module_changed(DC) \ ! ((DC)->last_module != input_file_stack_tick) ! ! /* Remember the current module or file as being the last one in which we ! report a diagnostic. */ ! #define diagnostic_set_last_module(DC) \ ! (DC)->last_module = input_file_stack_tick ! ! /* This diagnostic_context is used by front-ends that directly output diagnostic messages without going through `error', `warning', and similar functions. */ extern diagnostic_context *global_dc; /* The total count of a KIND of diagnostics meitted so far. */ ! #define diagnostic_kind_count(DC, DK) (DC)->diagnostic_count[(int) (DK)] /* The number of errors that have been issued so far. Ideally, these ! would take a diagnostic_context as an argument. */ #define errorcount diagnostic_kind_count (global_dc, DK_ERROR) /* Similarly, but for warnings. */ #define warningcount diagnostic_kind_count (global_dc, DK_WARNING) /* Similarly, but for sorrys. */ #define sorrycount diagnostic_kind_count (global_dc, DK_SORRY) ! /* Returns nonzero if warnings should be emitted. */ #define diagnostic_report_warnings_p() \ (!inhibit_warnings \ && !(in_system_header && !warn_system_headers)) + #define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D) ! /* Dignostic related functions. */ extern void diagnostic_initialize PARAMS ((diagnostic_context *)); + extern void diagnostic_report_current_module PARAMS ((diagnostic_context *)); + extern void diagnostic_report_current_function PARAMS ((diagnostic_context *)); + extern void diagnostic_flush_buffer PARAMS ((diagnostic_context *)); + extern bool diagnostic_count_diagnostic PARAMS ((diagnostic_context *, + diagnostic_t)); + extern void diagnostic_report_diagnostic PARAMS ((diagnostic_context *, + diagnostic_info *)); + extern void diagnostic_set_info PARAMS ((diagnostic_info *, + const char *, va_list *, + const char *, int, + diagnostic_t)); + extern char *diagnostic_build_prefix PARAMS ((diagnostic_info *)); + + /* Pure text formatting support functions. */ extern void init_output_buffer PARAMS ((output_buffer *, const char *, int)); extern void output_clear PARAMS ((output_buffer *)); extern const char *output_last_position PARAMS ((const output_buffer *)); extern void output_set_prefix PARAMS ((output_buffer *, const char *)); *************** extern void output_add_character PARAMS *** 293,321 **** extern void output_decimal PARAMS ((output_buffer *, int)); extern void output_add_string PARAMS ((output_buffer *, const char *)); extern const char *output_finalize_message PARAMS ((output_buffer *)); extern void output_clear_message_text PARAMS ((output_buffer *)); extern void output_printf PARAMS ((output_buffer *, const char *, ...)) ATTRIBUTE_PRINTF_2; - extern int output_is_line_wrapping PARAMS ((output_buffer *)); extern void output_verbatim PARAMS ((output_buffer *, const char *, ...)) ATTRIBUTE_PRINTF_2; extern void verbatim PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; - extern char *context_as_prefix PARAMS ((const char *, int, int)); extern char *file_name_as_prefix PARAMS ((const char *)); ! extern int error_module_changed PARAMS ((void)); ! extern void record_last_error_module PARAMS ((void)); ! extern int error_function_changed PARAMS ((void)); ! extern void record_last_error_function PARAMS ((void)); ! extern void report_problematic_module PARAMS ((output_buffer *)); ! ! /* Called by report_error_function to print out function name. ! * Default may be overridden by language front-ends. */ ! extern void (*print_error_function) PARAMS ((diagnostic_context *, ! const char *)); ! ! extern void default_print_error_function PARAMS ((diagnostic_context *, ! const char *)); #endif /* ! GCC_DIAGNOSTIC_H */ --- 316,331 ---- extern void output_decimal PARAMS ((output_buffer *, int)); extern void output_add_string PARAMS ((output_buffer *, const char *)); + extern void output_add_identifier PARAMS ((output_buffer *, tree)); extern const char *output_finalize_message PARAMS ((output_buffer *)); extern void output_clear_message_text PARAMS ((output_buffer *)); extern void output_printf PARAMS ((output_buffer *, const char *, ...)) ATTRIBUTE_PRINTF_2; extern void output_verbatim PARAMS ((output_buffer *, const char *, ...)) ATTRIBUTE_PRINTF_2; extern void verbatim PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; extern char *file_name_as_prefix PARAMS ((const char *)); ! extern void inform PARAMS ((const char *, ...)); #endif /* ! GCC_DIAGNOSTIC_H */ diff -Nrc3pad gcc-3.2.3/gcc/doc/bugreport.texi gcc-3.3/gcc/doc/bugreport.texi *** gcc-3.2.3/gcc/doc/bugreport.texi 2001-11-11 11:31:24.000000000 +0000 --- gcc-3.3/gcc/doc/bugreport.texi 2003-01-24 15:52:51.000000000 +0000 *************** prevent the assembler from being run. *** 64,76 **** If the compiler produces valid assembly code that does not correctly execute the input source code, that is a compiler bug. ! However, you must double-check to make sure, because you may have run ! into an incompatibility between GNU C and traditional C ! (@pxref{Incompatibilities}). These incompatibilities might be considered ! bugs, but they are inescapable consequences of valuable features. ! ! Or you may have a program whose behavior is undefined, which happened ! by chance to give the desired results with another C or C++ compiler. For example, in many nonoptimizing compilers, you can write @samp{x;} at the end of a function instead of @samp{return x;}, with the same --- 64,72 ---- If the compiler produces valid assembly code that does not correctly execute the input source code, that is a compiler bug. ! However, you must double-check to make sure, because you may have a ! program whose behavior is undefined, which happened by chance to give ! the desired results with another C or C++ compiler. For example, in many nonoptimizing compilers, you can write @samp{x;} at the end of a function instead of @samp{return x;}, with the same *************** we should be able to reproduce the crash *** 380,388 **** To simplify creation of bug reports, and to allow better tracking of reports, we use the GNATS bug tracking system. Part of that system is ! the @code{gccbug} script. This is a Unix shell script, so you need a shell to run it. It is normally installed in the same directory where ! @code{gcc} is installed. The gccbug script is derived from send-pr, @pxref{using send-pr,,Creating new Problem Reports,send-pr,Reporting Problems}. When --- 376,384 ---- To simplify creation of bug reports, and to allow better tracking of reports, we use the GNATS bug tracking system. Part of that system is ! the @command{gccbug} script. This is a Unix shell script, so you need a shell to run it. It is normally installed in the same directory where ! @command{gcc} is installed. The gccbug script is derived from send-pr, @pxref{using send-pr,,Creating new Problem Reports,send-pr,Reporting Problems}. When diff -Nrc3pad gcc-3.2.3/gcc/doc/collect2.texi gcc-3.3/gcc/doc/collect2.texi *** gcc-3.2.3/gcc/doc/collect2.texi 2001-11-18 19:46:58.000000000 +0000 --- gcc-3.3/gcc/doc/collect2.texi 2003-01-24 15:52:51.000000000 +0000 *************** if specified. *** 52,58 **** @end itemize ``The compiler's search directories'' means all the directories where ! @code{gcc} searches for passes of the compiler. This includes directories that you specify with @option{-B}. Cross-compilers search a little differently: --- 52,58 ---- @end itemize ``The compiler's search directories'' means all the directories where ! @command{gcc} searches for passes of the compiler. This includes directories that you specify with @option{-B}. Cross-compilers search a little differently: diff -Nrc3pad gcc-3.2.3/gcc/doc/compat.texi gcc-3.3/gcc/doc/compat.texi *** gcc-3.2.3/gcc/doc/compat.texi 2002-10-12 00:01:18.000000000 +0000 --- gcc-3.3/gcc/doc/compat.texi 2002-10-11 23:58:31.000000000 +0000 *************** C++ library. This requires specifying t *** 130,140 **** header files when invoking the compiler whose usual library is not being used. The location of GCC's C++ header files depends on how the GCC build was configured, but can be seen by using the G++ @option{-v} option. ! With default configuration options for G++ 3.2 the compile line for a different C++ compiler needs to include @example ! -I@var{gcc_install_directory}/include/c++/3.2 @end example Similarly, compiling code with G++ that must use a C++ library other --- 130,140 ---- header files when invoking the compiler whose usual library is not being used. The location of GCC's C++ header files depends on how the GCC build was configured, but can be seen by using the G++ @option{-v} option. ! With default configuration options for G++ 3.3 the compile line for a different C++ compiler needs to include @example ! -I@var{gcc_install_directory}/include/c++/3.3 @end example Similarly, compiling code with G++ that must use a C++ library other diff -Nrc3pad gcc-3.2.3/gcc/doc/contrib.texi gcc-3.3/gcc/doc/contrib.texi *** gcc-3.2.3/gcc/doc/contrib.texi 2002-11-12 13:06:12.000000000 +0000 --- gcc-3.3/gcc/doc/contrib.texi 2003-05-02 23:50:10.000000000 +0000 *************** *** 1,5 **** ! @c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002 ! @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,5 ---- ! @c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000, ! @c 2001,2002,2003 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** *** 10,17 **** The GCC project would like to thank its many contributors. Without them the project would not have been nearly as successful as it has been. Any omissions in this list are accidental. Feel free to contact ! @email{law@@redhat.com} if you have been left out ! or some of your contributions are not listed. Please keep this list in alphabetical order. @itemize @bullet --- 10,17 ---- The GCC project would like to thank its many contributors. Without them the project would not have been nearly as successful as it has been. Any omissions in this list are accidental. Feel free to contact ! @email{law@@redhat.com} or @email{gerald@@pfeifer.com} if you have been left ! out or some of your contributions are not listed. Please keep this list in alphabetical order. @itemize @bullet *************** James van Artsdalen wrote the code that *** 29,35 **** the Intel 80387 register stack. @item ! Alasdair Baird for various bugfixes. @item Gerald Baumgartner added the signature extension to the C++ front end. --- 29,35 ---- the Intel 80387 register stack. @item ! Alasdair Baird for various bug fixes. @item Gerald Baumgartner added the signature extension to the C++ front end. *************** Godmar Back for his Java improvements an *** 41,49 **** --- 41,56 ---- Scott Bambrough for help porting the Java compiler. @item + Wolfgang Bangerth for processing tons of bug reports. + + @item Jon Beniston for his Win32 port of Java. @item + Daniel Berlin for better DWARF2 support, faster/better optimizations, + improved alias analysis, plus migrating us to Bugzilla. + + @item Geoff Berry for his Java object serialization work and various patches. @item *************** Eric Blake for helping to make GCJ and l *** 51,56 **** --- 58,66 ---- specifications. @item + Segher Boessenkool for various fixes. + + @item Hans-J. Boehm for his @uref{http://www.hpl.hp.com/personal/Hans_Boehm/gc/,, garbage collector}, IA-64 libffi port, and other Java work. *************** Neil Booth for work on cpplib, lang hook *** 59,64 **** --- 69,77 ---- miscellaneous clean-ups. @item + Eric Botcazou for fixing middle- and backend bugs left and right. + + @item Per Bothner for his direction via the steering committee and various improvements to our infrastructure for supporting new languages. Chill front end implementation. Initial implementations of *************** John Carr for his alias work, SPARC hack *** 105,110 **** --- 118,126 ---- previous contributions to the steering committee, loop optimizations, etc. @item + Stephane Carrez for 68HC11 and 68HC12 ports. + + @item Steve Chamberlain for support for the Hitachi SH and H8 processors and the PicoJava processor, and for GCJ config fixes. *************** Russell Davidson for fstream and strings *** 158,163 **** --- 174,183 ---- Mo DeJong for GCJ and libgcj bug fixes. @item + DJ Delorie for the DJGPP port, build and libiberty maintenance, and + various bug fixes. + + @item Gabriel Dos Reis for contributions to g++, contributions and maintenance of GCC diagnostics infrastructure, libstdc++-v3, including valarray<>, complex<>, maintaining the numerics library *************** maintaining complex<>, sanity checking a *** 172,177 **** --- 192,200 ---- architecture, libio maintenance, and early math work. @item + Zdenek Dvorak for a new loop unroller and various fixes. + + @item Richard Earnshaw for his ongoing work with the ARM@. @item *************** libstdc++. *** 186,192 **** @item Phil Edwards for libstdc++ work including configuration hackery, documentation maintainer, chief breaker of the web pages, the occasional ! iostream bugfix, and work on shared library symbol versioning. @item Paul Eggert for random hacking all over GCC@. --- 209,215 ---- @item Phil Edwards for libstdc++ work including configuration hackery, documentation maintainer, chief breaker of the web pages, the occasional ! iostream bug fix, and work on shared library symbol versioning. @item Paul Eggert for random hacking all over GCC@. *************** configuration support for locales and fs *** 199,204 **** --- 222,230 ---- Vadim Egorov for libstdc++ fixes in strings, streambufs, and iostreams. @item + Christian Ehrhardt for dealing with bug reports. + + @item Ben Elliston for his work to move the Objective-C runtime into its own subdirectory and for his work on autoconf. *************** Doug Evans for much of the global optimi *** 210,222 **** and SPARC work. @item Fred Fish for BeOS support and Ada fixes. @item Ivan Fontes Garcia for the Portugese translation of the GCJ FAQ. @item ! Peter Gerwinski for various bugfixes and the Pascal front end. @item Kaveh Ghazi for his direction via the steering committee and --- 236,252 ---- and SPARC work. @item + Christopher Faylor for his work on the Cygwin port and for caring and + feeding the gcc.gnu.org box and saving its users tons of spam. + + @item Fred Fish for BeOS support and Ada fixes. @item Ivan Fontes Garcia for the Portugese translation of the GCJ FAQ. @item ! Peter Gerwinski for various bug fixes and the Pascal front end. @item Kaveh Ghazi for his direction via the steering committee and *************** Intel 386 and 860 support. *** 251,257 **** @item Bruno Haible for improvements in the runtime overhead for EH, new ! warnings and assorted bugfixes. @item Andrew Haley for his amazing Java compiler and library efforts. --- 281,287 ---- @item Bruno Haible for improvements in the runtime overhead for EH, new ! warnings and assorted bug fixes. @item Andrew Haley for his amazing Java compiler and library efforts. *************** fixes. *** 268,285 **** Kate Hedstrom for staking the g77 folks with an initial testsuite. @item ! Richard Henderson for his ongoing SPARC, alpha, and ia32 work, loop opts, and generally fixing lots of old problems we've ignored for years, flow rewrite and lots of further stuff, including reviewing tons of patches. @item Nobuyuki Hikichi of Software Research Associates, Tokyo, contributed the support for the Sony NEWS machine. @item Manfred Hollstein for his ongoing work to keep the m88k alive, lots ! of testing an bugfixing, particularly of our configury code. @item Steve Holmgren for MachTen patches. --- 298,322 ---- Kate Hedstrom for staking the g77 folks with an initial testsuite. @item ! Richard Henderson for his ongoing SPARC, alpha, ia32, and ia64 work, loop opts, and generally fixing lots of old problems we've ignored for years, flow rewrite and lots of further stuff, including reviewing tons of patches. @item + Aldy Hernandez for working on the PowerPC port, SIMD support, and + various fixes. + + @item Nobuyuki Hikichi of Software Research Associates, Tokyo, contributed the support for the Sony NEWS machine. @item + Kazu Hirata for caring and feeding the Hitachi H8/300 port and various fixes. + + @item Manfred Hollstein for his ongoing work to keep the m88k alive, lots ! of testing and bug fixing, particularly of our configury code. @item Steve Holmgren for MachTen patches. *************** Steve Holmgren for MachTen patches. *** 288,294 **** Jan Hubicka for his x86 port improvements. @item ! Christian Iseli for various bugfixes. @item Kamil Iskra for general m68k hacking. --- 325,331 ---- Jan Hubicka for his x86 port improvements. @item ! Christian Iseli for various bug fixes. @item Kamil Iskra for general m68k hacking. *************** as lots of bug fixes and test cases, and *** 305,312 **** system. @item ! Janis Johnson for ia64 testing and fixes and for her quality improvement ! sidetracks. @item J. Kean Johnston for OpenServer support. --- 342,349 ---- system. @item ! Janis Johnson for ia64 testing and fixes, her quality improvement ! sidetracks, and web page maintenance. @item J. Kean Johnston for OpenServer support. *************** Klaus Kaempf for his ongoing work to mak *** 325,331 **** David Kashtan of SRI adapted GCC to VMS@. @item ! Ryszard Kabatek for many, many libstdc++ bugfixes and optimizations of strings, especially member functions, and for auto_ptr fixes. @item --- 362,368 ---- David Kashtan of SRI adapted GCC to VMS@. @item ! Ryszard Kabatek for many, many libstdc++ bug fixes and optimizations of strings, especially member functions, and for auto_ptr fixes. @item *************** Robin Kirkham for cpu32 support. *** 363,369 **** Mark Klein for PA improvements. @item ! Thomas Koenig for various bugfixes. @item Bruce Korb for the new and improved fixincludes code. --- 400,406 ---- Mark Klein for PA improvements. @item ! Thomas Koenig for various bug fixes. @item Bruce Korb for the new and improved fixincludes code. *************** with analysis and improvements of x86 pe *** 389,395 **** Ted Lemon wrote parts of the RTL reader and printer. @item ! Kriang Lerdsuwanakij for improvements to demangler and various c++ fixes. @item Warren Levy for tremendous work on libgcj (Java Runtime Library) and --- 426,433 ---- Ted Lemon wrote parts of the RTL reader and printer. @item ! Kriang Lerdsuwanakij for C++ improvements including template as template ! parameter support, and many C++ fixes. @item Warren Levy for tremendous work on libgcj (Java Runtime Library) and *************** patches. *** 406,412 **** Robert Lipe for OpenServer support, new testsuites, testing, etc. @item ! Weiwen Liu for testing and various bugfixes. @item Dave Love for his ongoing work with the Fortran front end and --- 444,450 ---- Robert Lipe for OpenServer support, new testsuites, testing, etc. @item ! Weiwen Liu for testing and various bug fixes. @item Dave Love for his ongoing work with the Fortran front end and *************** developers. *** 469,475 **** Gary Miller ported GCC to Charles River Data Systems machines. @item ! Alfred Minarik for libstdc++ string and ios bugfixes, and turning the entire libstdc++ testsuite namespace-compatible. @item --- 507,513 ---- Gary Miller ported GCC to Charles River Data Systems machines. @item ! Alfred Minarik for libstdc++ string and ios bug fixes, and turning the entire libstdc++ testsuite namespace-compatible. @item *************** MT-safe string and shadow headers. *** 527,532 **** --- 565,573 ---- Felix Natter for documentation on porting libstdc++. @item + Nathanael Nerode for cleaning up the configuration/build process. + + @item NeXT, Inc.@: donated the front end that supports the Objective-C language. *************** engine setup, various documentation fixe *** 538,543 **** --- 579,588 ---- Geoff Noer for this work on getting cygwin native builds working. @item + Diego Novillo for his SPEC performance tracking web pages and assorted + fixes in the middle end and various back ends. + + @item David O'Brien for the FreeBSD/alpha, FreeBSD/AMD x86-64, FreeBSD/ARM, FreeBSD/PowerPC, and FreeBSD/SPARC64 ports and related infrastructure improvements. *************** ABI support, improvements to dejagnu's M *** 555,560 **** --- 600,608 ---- clean-ups and porting work, etc. @item + Hartmut Penner for work on the s390 port. + + @item Paul Petersen wrote the machine description for the Alliant FX/8. @item *************** David Reese of Sun Microsystems contribu *** 585,590 **** --- 633,641 ---- port. @item + Volker Reichelt for keeping up with the problem reports. + + @item Joern Rennecke for maintaining the sh port, loop, regmove & reload hacking. *************** Juha Sarlin for improvements to the H8 c *** 616,621 **** --- 667,676 ---- Greg Satz assisted in making GCC work on HP-UX for the 9000 series 300. @item + Roger Sayle for improvements to constant folding and GCC's RTL optimizers + as well as for fixing numerous bugs. + + @item Bradley Schatz for his work on the GCJ FAQ. @item *************** Andrey Slepuhin for assorted AIX hacking *** 667,672 **** --- 722,730 ---- Christopher Smith did the port for Convex machines. @item + Danny Smith for his major efforts on the Mingw (and Cygwin) ports. + + @item Randy Smith finished the Sun FPA support. @item *************** Holger Teutsch provided the support for *** 716,722 **** Gary Thomas for his ongoing work to make the PPC work for GNU/Linux. @item ! Philipp Thomas for random bugfixes throughout the compiler @item Jason Thorpe for thread support in libstdc++ on NetBSD. --- 774,780 ---- Gary Thomas for his ongoing work to make the PPC work for GNU/Linux. @item ! Philipp Thomas for random bug fixes throughout the compiler @item Jason Thorpe for thread support in libstdc++ on NetBSD. *************** Kresten Krab Thorup wrote the run time s *** 726,732 **** language and the fantastic Java bytecode interpreter. @item ! Michael Tiemann for random bugfixes, the first instruction scheduler, initial C++ support, function integration, NS32k, SPARC and M88k machine description work, delay slot scheduling. --- 784,790 ---- language and the fantastic Java bytecode interpreter. @item ! Michael Tiemann for random bug fixes, the first instruction scheduler, initial C++ support, function integration, NS32k, SPARC and M88k machine description work, delay slot scheduling. *************** Dean Wakerley for converting the install *** 767,773 **** in time for GCC 3.0. @item ! Krister Walfridsson for random bugfixes. @item Stephen M. Webb for time and effort on making libstdc++ shadow files --- 825,831 ---- in time for GCC 3.0. @item ! Krister Walfridsson for random bug fixes. @item Stephen M. Webb for time and effort on making libstdc++ shadow files *************** related infrastructure improvements to h *** 780,786 **** value range propagation and other work, WE32k port. @item ! Zack Weinberg for major work on cpplib and various other bugfixes. @item Matt Welsh for help with Linux Threads support in GCJ. --- 838,847 ---- value range propagation and other work, WE32k port. @item ! Ulrich Weigand for work on the s390 port. ! ! @item ! Zack Weinberg for major work on cpplib and various other bug fixes. @item Matt Welsh for help with Linux Threads support in GCJ. diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.1 gcc-3.3/gcc/doc/cpp.1 *** gcc-3.2.3/gcc/doc/cpp.1 2003-04-22 07:07:27.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.1 2003-05-14 00:31:50.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:27 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,145 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "CPP 1" ! .TH CPP 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" cpp \- The C Preprocessor .SH "SYNOPSIS" --- 126,135 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "CPP 1" ! .TH CPP 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" cpp \- The C Preprocessor .SH "SYNOPSIS" *************** text processor. It will choke on input *** 166,177 **** rules. For example, apostrophes will be interpreted as the beginning of character constants, and cause errors. Also, you cannot rely on it preserving characteristics of the input which are not significant to ! C-family languages. If a Makefile is preprocessed, all the hard tabs will be removed, and the Makefile will not work. .PP Having said that, you can often get away with using cpp on things which are not C. Other Algol-ish programming languages are often safe ! (Pascal, Ada, etc.) So is assembly, with caution. \fB\-traditional\fR mode preserves more white space, and is otherwise more permissive. Many of the problems can be avoided by writing C or \*(C+ style comments instead of native language comments, and keeping macros simple. --- 156,167 ---- rules. For example, apostrophes will be interpreted as the beginning of character constants, and cause errors. Also, you cannot rely on it preserving characteristics of the input which are not significant to ! C\-family languages. If a Makefile is preprocessed, all the hard tabs will be removed, and the Makefile will not work. .PP Having said that, you can often get away with using cpp on things which are not C. Other Algol-ish programming languages are often safe ! (Pascal, Ada, etc.) So is assembly, with caution. \fB\-traditional\-cpp\fR mode preserves more white space, and is otherwise more permissive. Many of the problems can be avoided by writing C or \*(C+ style comments instead of native language comments, and keeping macros simple. *************** of a program which does not expect them. *** 191,196 **** --- 181,196 ---- you should use the \fB\-std=c89\fR or \fB\-std=c99\fR options, depending on which version of the standard you want. To get all the mandatory diagnostics, you must also use \fB\-pedantic\fR. + .PP + This manual describes the behavior of the \s-1ISO\s0 preprocessor. To + minimize gratuitous differences, where the \s-1ISO\s0 preprocessor's + behavior does not conflict with traditional semantics, the + traditional preprocessor should behave the same way. The various + differences that do exist are detailed in the section \f(CW@ref\fR{Traditional + Mode}. + .PP + For clarity, unless noted otherwise, references to \fB\s-1CPP\s0\fR in this + manual refer to \s-1GNU\s0 \s-1CPP\s0. .SH "OPTIONS" .IX Header "OPTIONS" The C preprocessor expects two file names as arguments, \fIinfile\fR and *************** The C preprocessor expects two file name *** 198,207 **** other files it specifies with \fB#include\fR. All the output generated by the combined input files is written in \fIoutfile\fR. .PP ! Either \fIinfile\fR or \fIoutfile\fR may be \fB-\fR, which as \&\fIinfile\fR means to read from standard input and as \fIoutfile\fR means to write to standard output. Also, if either file is omitted, it ! means the same as if \fB-\fR had been specified for that file. .PP Unless otherwise noted, or the option ends in \fB=\fR, all options which take an argument may have that argument appear either immediately --- 198,207 ---- other files it specifies with \fB#include\fR. All the output generated by the combined input files is written in \fIoutfile\fR. .PP ! Either \fIinfile\fR or \fIoutfile\fR may be \fB\-\fR, which as \&\fIinfile\fR means to read from standard input and as \fIoutfile\fR means to write to standard output. Also, if either file is omitted, it ! means the same as if \fB\-\fR had been specified for that file. .PP Unless otherwise noted, or the option ends in \fB=\fR, all options which take an argument may have that argument appear either immediately *************** after the option, or with a space betwee *** 211,220 **** Many options have multi-letter names; therefore multiple single-letter options may \fInot\fR be grouped: \fB\-dM\fR is very different from \&\fB\-d\ \-M\fR. ! .Ip "\fB\-D\fR \fIname\fR" 4 .IX Item "-D name" ! Predefine \fIname\fR as a macro, with definition \f(CW\*(C`1\*(C'\fR. ! .Ip "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4 .IX Item "-D name=definition" Predefine \fIname\fR as a macro, with definition \fIdefinition\fR. There are no restrictions on the contents of \fIdefinition\fR, but if --- 211,220 ---- Many options have multi-letter names; therefore multiple single-letter options may \fInot\fR be grouped: \fB\-dM\fR is very different from \&\fB\-d\ \-M\fR. ! .IP "\fB\-D\fR \fIname\fR" 4 .IX Item "-D name" ! Predefine \fIname\fR as a macro, with definition \f(CW1\fR. ! .IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4 .IX Item "-D name=definition" Predefine \fIname\fR as a macro, with definition \fIdefinition\fR. There are no restrictions on the contents of \fIdefinition\fR, but if *************** to quote the option. With \fBsh\fR and *** 232,321 **** are given on the command line. All \fB\-imacros\fR \fIfile\fR and \&\fB\-include\fR \fIfile\fR options are processed after all \&\fB\-D\fR and \fB\-U\fR options. ! .Ip "\fB\-U\fR \fIname\fR" 4 .IX Item "-U name" Cancel any previous definition of \fIname\fR, either built in or provided with a \fB\-D\fR option. ! .Ip "\fB\-undef\fR" 4 .IX Item "-undef" Do not predefine any system-specific macros. The common predefined macros remain defined. ! .Ip "\fB\-I\fR \fIdir\fR" 4 .IX Item "-I dir" Add the directory \fIdir\fR to the list of directories to be searched for header files. .Sp Directories named by \fB\-I\fR are searched before the standard ! system include directories. ! .Sp ! It is dangerous to specify a standard system include directory in an ! \&\fB\-I\fR option. This defeats the special treatment of system ! headers ! \&. It can also defeat the repairs to buggy system headers which \s-1GCC\s0 ! makes when it is installed. ! .Ip "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Write output to \fIfile\fR. This is the same as specifying \fIfile\fR as the second non-option argument to \fBcpp\fR. \fBgcc\fR has a different interpretation of a second non-option argument, so you must use \fB\-o\fR to specify the output file. ! .Ip "\fB\-Wall\fR" 4 .IX Item "-Wall" Turns on all optional warnings which are desirable for normal code. At present this is \fB\-Wcomment\fR and \fB\-Wtrigraphs\fR. Note that many of the preprocessor's warnings are on by default and have no options to control them. ! .Ip "\fB\-Wcomment\fR" 4 .IX Item "-Wcomment" .PD 0 ! .Ip "\fB\-Wcomments\fR" 4 .IX Item "-Wcomments" .PD Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR comment, or whenever a backslash-newline appears in a \fB//\fR comment. (Both forms have the same effect.) ! .Ip "\fB\-Wtrigraphs\fR" 4 .IX Item "-Wtrigraphs" Warn if any trigraphs are encountered. This option used to take effect only if \fB\-trigraphs\fR was also specified, but now works independently. Warnings are not given for trigraphs within comments, as they do not affect the meaning of the program. ! .Ip "\fB\-Wtraditional\fR" 4 .IX Item "-Wtraditional" Warn about certain constructs that behave differently in traditional and \&\s-1ISO\s0 C. Also warn about \s-1ISO\s0 C constructs that have no traditional C equivalent, and problematic constructs which should be avoided. ! .Ip "\fB\-Wimport\fR" 4 .IX Item "-Wimport" Warn the first time \fB#import\fR is used. ! .Ip "\fB\-Wundef\fR" 4 .IX Item "-Wundef" Warn whenever an identifier which is not a macro is encountered in an \&\fB#if\fR directive, outside of \fBdefined\fR. Such identifiers are replaced with zero. ! .Ip "\fB\-Werror\fR" 4 .IX Item "-Werror" Make all warnings into hard errors. Source code which triggers warnings will be rejected. ! .Ip "\fB\-Wsystem-headers\fR" 4 .IX Item "-Wsystem-headers" Issue warnings for code in system headers. These are normally unhelpful in finding bugs in your own code, therefore suppressed. If you are responsible for the system library, you may want to see them. ! .Ip "\fB\-w\fR" 4 .IX Item "-w" Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default. ! .Ip "\fB\-pedantic\fR" 4 .IX Item "-pedantic" Issue all the mandatory diagnostics listed in the C standard. Some of them are left out by default, since they trigger frequently on harmless code. ! .Ip "\fB\-pedantic-errors\fR" 4 .IX Item "-pedantic-errors" Issue all the mandatory diagnostics, and make all mandatory diagnostics into errors. This includes mandatory diagnostics that \s-1GCC\s0 issues without \fB\-pedantic\fR but treats as warnings. ! .Ip "\fB\-M\fR" 4 .IX Item "-M" Instead of outputting the result of preprocessing, output a rule suitable for \fBmake\fR describing the dependencies of the main --- 232,354 ---- are given on the command line. All \fB\-imacros\fR \fIfile\fR and \&\fB\-include\fR \fIfile\fR options are processed after all \&\fB\-D\fR and \fB\-U\fR options. ! .IP "\fB\-U\fR \fIname\fR" 4 .IX Item "-U name" Cancel any previous definition of \fIname\fR, either built in or provided with a \fB\-D\fR option. ! .IP "\fB\-undef\fR" 4 .IX Item "-undef" Do not predefine any system-specific macros. The common predefined macros remain defined. ! .IP "\fB\-I\fR \fIdir\fR" 4 .IX Item "-I dir" Add the directory \fIdir\fR to the list of directories to be searched for header files. .Sp Directories named by \fB\-I\fR are searched before the standard ! system include directories. If the directory \fIdir\fR is a standard ! system include directory, the option is ignored to ensure that the ! default search order for system directories and the special treatment ! of system headers are not defeated ! \&. ! .IP "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Write output to \fIfile\fR. This is the same as specifying \fIfile\fR as the second non-option argument to \fBcpp\fR. \fBgcc\fR has a different interpretation of a second non-option argument, so you must use \fB\-o\fR to specify the output file. ! .IP "\fB\-Wall\fR" 4 .IX Item "-Wall" Turns on all optional warnings which are desirable for normal code. At present this is \fB\-Wcomment\fR and \fB\-Wtrigraphs\fR. Note that many of the preprocessor's warnings are on by default and have no options to control them. ! .IP "\fB\-Wcomment\fR" 4 .IX Item "-Wcomment" .PD 0 ! .IP "\fB\-Wcomments\fR" 4 .IX Item "-Wcomments" .PD Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR comment, or whenever a backslash-newline appears in a \fB//\fR comment. (Both forms have the same effect.) ! .IP "\fB\-Wtrigraphs\fR" 4 .IX Item "-Wtrigraphs" Warn if any trigraphs are encountered. This option used to take effect only if \fB\-trigraphs\fR was also specified, but now works independently. Warnings are not given for trigraphs within comments, as they do not affect the meaning of the program. ! .IP "\fB\-Wtraditional\fR" 4 .IX Item "-Wtraditional" Warn about certain constructs that behave differently in traditional and \&\s-1ISO\s0 C. Also warn about \s-1ISO\s0 C constructs that have no traditional C equivalent, and problematic constructs which should be avoided. ! .IP "\fB\-Wimport\fR" 4 .IX Item "-Wimport" Warn the first time \fB#import\fR is used. ! .IP "\fB\-Wundef\fR" 4 .IX Item "-Wundef" Warn whenever an identifier which is not a macro is encountered in an \&\fB#if\fR directive, outside of \fBdefined\fR. Such identifiers are replaced with zero. ! .IP "\fB\-Wunused\-macros\fR" 4 ! .IX Item "-Wunused-macros" ! Warn about macros defined in the main file that are unused. A macro ! is \fIused\fR if it is expanded or tested for existence at least once. ! The preprocessor will also warn if the macro has not been used at the ! time it is redefined or undefined. ! .Sp ! Built-in macros, macros defined on the command line, and macros ! defined in include files are not warned about. ! .Sp ! \&\fBNote:\fR If a macro is actually used, but only used in skipped ! conditional blocks, then \s-1CPP\s0 will report it as unused. To avoid the ! warning in such a case, you might improve the scope of the macro's ! definition by, for example, moving it into the first skipped block. ! Alternatively, you could provide a dummy use with something like: ! .Sp ! .Vb 2 ! \& #if defined the_macro_causing_the_warning ! \& #endif ! .Ve ! .IP "\fB\-Wendif\-labels\fR" 4 ! .IX Item "-Wendif-labels" ! Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text. ! This usually happens in code of the form ! .Sp ! .Vb 5 ! \& #if FOO ! \& ... ! \& #else FOO ! \& ... ! \& #endif FOO ! .Ve ! .Sp ! The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are not ! in older programs. This warning is on by default. ! .IP "\fB\-Werror\fR" 4 .IX Item "-Werror" Make all warnings into hard errors. Source code which triggers warnings will be rejected. ! .IP "\fB\-Wsystem\-headers\fR" 4 .IX Item "-Wsystem-headers" Issue warnings for code in system headers. These are normally unhelpful in finding bugs in your own code, therefore suppressed. If you are responsible for the system library, you may want to see them. ! .IP "\fB\-w\fR" 4 .IX Item "-w" Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default. ! .IP "\fB\-pedantic\fR" 4 .IX Item "-pedantic" Issue all the mandatory diagnostics listed in the C standard. Some of them are left out by default, since they trigger frequently on harmless code. ! .IP "\fB\-pedantic\-errors\fR" 4 .IX Item "-pedantic-errors" Issue all the mandatory diagnostics, and make all mandatory diagnostics into errors. This includes mandatory diagnostics that \s-1GCC\s0 issues without \fB\-pedantic\fR but treats as warnings. ! .IP "\fB\-M\fR" 4 .IX Item "-M" Instead of outputting the result of preprocessing, output a rule suitable for \fBmake\fR describing the dependencies of the main *************** rules you should explicitly specify the *** 337,344 **** \&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR. Debug output will still be sent to the regular output stream as normal. .Sp ! Passing \fB\-M\fR to the driver implies \fB\-E\fR. ! .Ip "\fB\-MM\fR" 4 .IX Item "-MM" Like \fB\-M\fR but do not mention header files that are found in system header directories, nor header files that are included, --- 370,378 ---- \&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR. Debug output will still be sent to the regular output stream as normal. .Sp ! Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses ! warnings with an implicit \fB\-w\fR. ! .IP "\fB\-MM\fR" 4 .IX Item "-MM" Like \fB\-M\fR but do not mention header files that are found in system header directories, nor header files that are included, *************** This implies that the choice of angle br *** 348,354 **** \&\fB#include\fR directive does not in itself determine whether that header will appear in \fB\-MM\fR dependency output. This is a slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier. ! .Ip "\fB\-MF\fR \fIfile\fR" 4 .IX Item "-MF file" @anchor{\-MF} When used with \fB\-M\fR or \fB\-MM\fR, specifies a --- 382,388 ---- \&\fB#include\fR directive does not in itself determine whether that header will appear in \fB\-MM\fR dependency output. This is a slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier. ! .IP "\fB\-MF\fR \fIfile\fR" 4 .IX Item "-MF file" @anchor{\-MF} When used with \fB\-M\fR or \fB\-MM\fR, specifies a *************** preprocessed output. *** 358,372 **** .Sp When used with the driver options \fB\-MD\fR or \fB\-MMD\fR, \&\fB\-MF\fR overrides the default dependency output file. ! .Ip "\fB\-MG\fR" 4 .IX Item "-MG" ! When used with \fB\-M\fR or \fB\-MM\fR, \fB\-MG\fR says to treat missing ! header files as generated files and assume they live in the same ! directory as the source file. It suppresses preprocessed output, as a ! missing header file is ordinarily an error. .Sp This feature is used in automatic updating of makefiles. ! .Ip "\fB\-MP\fR" 4 .IX Item "-MP" This option instructs \s-1CPP\s0 to add a phony target for each dependency other than the main file, causing each to depend on nothing. These --- 392,409 ---- .Sp When used with the driver options \fB\-MD\fR or \fB\-MMD\fR, \&\fB\-MF\fR overrides the default dependency output file. ! .IP "\fB\-MG\fR" 4 .IX Item "-MG" ! In conjunction with an option such as \fB\-M\fR requesting ! dependency generation, \fB\-MG\fR assumes missing header files are ! generated files and adds them to the dependency list without raising ! an error. The dependency filename is taken directly from the ! \&\f(CW\*(C`#include\*(C'\fR directive without prepending any path. \fB\-MG\fR ! also suppresses preprocessed output, as a missing header file renders ! this useless. .Sp This feature is used in automatic updating of makefiles. ! .IP "\fB\-MP\fR" 4 .IX Item "-MP" This option instructs \s-1CPP\s0 to add a phony target for each dependency other than the main file, causing each to depend on nothing. These *************** This is typical output: *** 378,387 **** .Vb 1 \& test.o: test.c test.h .Ve .Vb 1 \& test.h: .Ve ! .Ip "\fB\-MT\fR \fItarget\fR" 4 .IX Item "-MT target" Change the target of the rule emitted by dependency generation. By default \s-1CPP\s0 takes the name of the main input file, including any path, --- 415,425 ---- .Vb 1 \& test.o: test.c test.h .Ve + .Sp .Vb 1 \& test.h: .Ve ! .IP "\fB\-MT\fR \fItarget\fR" 4 .IX Item "-MT target" Change the target of the rule emitted by dependency generation. By default \s-1CPP\s0 takes the name of the main input file, including any path, *************** For example, \fB\-MT\ '$(objpfx)foo.o'\f *** 397,403 **** .Vb 1 \& $(objpfx)foo.o: foo.c .Ve ! .Ip "\fB\-MQ\fR \fItarget\fR" 4 .IX Item "-MQ target" Same as \fB\-MT\fR, but it quotes any characters which are special to Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives --- 435,441 ---- .Vb 1 \& $(objpfx)foo.o: foo.c .Ve ! .IP "\fB\-MQ\fR \fItarget\fR" 4 .IX Item "-MQ target" Same as \fB\-MT\fR, but it quotes any characters which are special to Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives *************** Make. \fB\-MQ\ '$(objpfx)foo.o'\fR give *** 405,413 **** .Vb 1 \& $$(objpfx)foo.o: foo.c .Ve The default target is automatically quoted, as if it were given with \&\fB\-MQ\fR. ! .Ip "\fB\-MD\fR" 4 .IX Item "-MD" \&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that \&\fB\-E\fR is not implied. The driver determines \fIfile\fR based on --- 443,452 ---- .Vb 1 \& $$(objpfx)foo.o: foo.c .Ve + .Sp The default target is automatically quoted, as if it were given with \&\fB\-MQ\fR. ! .IP "\fB\-MD\fR" 4 .IX Item "-MD" \&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that \&\fB\-E\fR is not implied. The driver determines \fIfile\fR based on *************** is understood to specify a target object *** 422,442 **** .Sp Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate a dependency output file as a side-effect of the compilation process. ! .Ip "\fB\-MMD\fR" 4 .IX Item "-MMD" Like \fB\-MD\fR except mention only user header files, not system \&\-header files. ! .Ip "\fB\-x c\fR" 4 .IX Item "-x c" .PD 0 ! .Ip "\fB\-x c++\fR" 4 .IX Item "-x c++" ! .Ip "\fB\-x objective-c\fR" 4 .IX Item "-x objective-c" ! .Ip "\fB\-x assembler-with-cpp\fR" 4 .IX Item "-x assembler-with-cpp" .PD ! Specify the source language: C, \*(C+, Objective-C, or assembly. This has nothing to do with standards conformance or extensions; it merely selects which base syntax to expect. If you give none of these options, cpp will deduce the language from the extension of the source file: --- 461,481 ---- .Sp Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate a dependency output file as a side-effect of the compilation process. ! .IP "\fB\-MMD\fR" 4 .IX Item "-MMD" Like \fB\-MD\fR except mention only user header files, not system \&\-header files. ! .IP "\fB\-x c\fR" 4 .IX Item "-x c" .PD 0 ! .IP "\fB\-x c++\fR" 4 .IX Item "-x c++" ! .IP "\fB\-x objective-c\fR" 4 .IX Item "-x objective-c" ! .IP "\fB\-x assembler-with-cpp\fR" 4 .IX Item "-x assembler-with-cpp" .PD ! Specify the source language: C, \*(C+, Objective\-C, or assembly. This has nothing to do with standards conformance or extensions; it merely selects which base syntax to expect. If you give none of these options, cpp will deduce the language from the extension of the source file: *************** generic mode. *** 449,537 **** which selected both the language and the standards conformance level. This option has been removed, because it conflicts with the \fB\-l\fR option. ! .Ip "\fB\-std=\fR\fIstandard\fR" 4 .IX Item "-std=standard" .PD 0 ! .Ip "\fB\-ansi\fR" 4 .IX Item "-ansi" .PD ! Specify the standard to which the code should conform. Currently cpp ! only knows about the standards for C; other language standards will be ! added in the future. .Sp \&\fIstandard\fR may be one of: .RS 4 ! .if n .Ip "\f(CW""""iso9899:1990""""\fR" 4 ! .el .Ip "\f(CWiso9899:1990\fR" 4 .IX Item "iso9899:1990" .PD 0 ! .if n .Ip "\f(CW""""c89""""\fR" 4 ! .el .Ip "\f(CWc89\fR" 4 .IX Item "c89" .PD The \s-1ISO\s0 C standard from 1990. \fBc89\fR is the customary shorthand for this version of the standard. .Sp The \fB\-ansi\fR option is equivalent to \fB\-std=c89\fR. ! .if n .Ip "\f(CW""""iso9899:199409""""\fR" 4 ! .el .Ip "\f(CWiso9899:199409\fR" 4 .IX Item "iso9899:199409" The 1990 C standard, as amended in 1994. ! .if n .Ip "\f(CW""""iso9899:1999""""\fR" 4 ! .el .Ip "\f(CWiso9899:1999\fR" 4 .IX Item "iso9899:1999" .PD 0 ! .if n .Ip "\f(CW""""c99""""\fR" 4 ! .el .Ip "\f(CWc99\fR" 4 .IX Item "c99" ! .if n .Ip "\f(CW""""iso9899:199x""""\fR" 4 ! .el .Ip "\f(CWiso9899:199x\fR" 4 .IX Item "iso9899:199x" ! .if n .Ip "\f(CW""""c9x""""\fR" 4 ! .el .Ip "\f(CWc9x\fR" 4 .IX Item "c9x" .PD The revised \s-1ISO\s0 C standard, published in December 1999. Before publication, this was known as C9X. ! .if n .Ip "\f(CW""""gnu89""""\fR" 4 ! .el .Ip "\f(CWgnu89\fR" 4 .IX Item "gnu89" The 1990 C standard plus \s-1GNU\s0 extensions. This is the default. ! .if n .Ip "\f(CW""""gnu99""""\fR" 4 ! .el .Ip "\f(CWgnu99\fR" 4 .IX Item "gnu99" .PD 0 ! .if n .Ip "\f(CW""""gnu9x""""\fR" 4 ! .el .Ip "\f(CWgnu9x\fR" 4 .IX Item "gnu9x" .PD The 1999 C standard plus \s-1GNU\s0 extensions. .RE .RS 4 .RE ! .Ip "\fB\-I-\fR" 4 .IX Item "-I-" Split the include path. Any directories specified with \fB\-I\fR ! options before \fB\-I-\fR are searched only for headers requested with \&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for \&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR. If additional directories are ! specified with \fB\-I\fR options after the \fB\-I-\fR, those directories are searched for all \fB#include\fR directives. .Sp ! In addition, \fB\-I-\fR inhibits the use of the directory of the current file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR. ! .Ip "\fB\-nostdinc\fR" 4 .IX Item "-nostdinc" Do not search the standard system directories for header files. Only the directories you have specified with \fB\-I\fR options (and the directory of the current file, if appropriate) are searched. ! .Ip "\fB\-nostdinc++\fR" 4 .IX Item "-nostdinc++" Do not search for header files in the \*(C+\-specific standard directories, but do still search the other standard directories. (This option is used when building the \*(C+ library.) ! .Ip "\fB\-include\fR \fIfile\fR" 4 .IX Item "-include file" Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first line of the primary source file. However, the first directory searched --- 488,584 ---- which selected both the language and the standards conformance level. This option has been removed, because it conflicts with the \fB\-l\fR option. ! .IP "\fB\-std=\fR\fIstandard\fR" 4 .IX Item "-std=standard" .PD 0 ! .IP "\fB\-ansi\fR" 4 .IX Item "-ansi" .PD ! Specify the standard to which the code should conform. Currently \s-1CPP\s0 ! knows about C and \*(C+ standards; others may be added in the future. .Sp \&\fIstandard\fR may be one of: .RS 4 ! .ie n .IP """iso9899:1990""" 4 ! .el .IP "\f(CWiso9899:1990\fR" 4 .IX Item "iso9899:1990" .PD 0 ! .ie n .IP """c89""" 4 ! .el .IP "\f(CWc89\fR" 4 .IX Item "c89" .PD The \s-1ISO\s0 C standard from 1990. \fBc89\fR is the customary shorthand for this version of the standard. .Sp The \fB\-ansi\fR option is equivalent to \fB\-std=c89\fR. ! .ie n .IP """iso9899:199409""" 4 ! .el .IP "\f(CWiso9899:199409\fR" 4 .IX Item "iso9899:199409" The 1990 C standard, as amended in 1994. ! .ie n .IP """iso9899:1999""" 4 ! .el .IP "\f(CWiso9899:1999\fR" 4 .IX Item "iso9899:1999" .PD 0 ! .ie n .IP """c99""" 4 ! .el .IP "\f(CWc99\fR" 4 .IX Item "c99" ! .ie n .IP """iso9899:199x""" 4 ! .el .IP "\f(CWiso9899:199x\fR" 4 .IX Item "iso9899:199x" ! .ie n .IP """c9x""" 4 ! .el .IP "\f(CWc9x\fR" 4 .IX Item "c9x" .PD The revised \s-1ISO\s0 C standard, published in December 1999. Before publication, this was known as C9X. ! .ie n .IP """gnu89""" 4 ! .el .IP "\f(CWgnu89\fR" 4 .IX Item "gnu89" The 1990 C standard plus \s-1GNU\s0 extensions. This is the default. ! .ie n .IP """gnu99""" 4 ! .el .IP "\f(CWgnu99\fR" 4 .IX Item "gnu99" .PD 0 ! .ie n .IP """gnu9x""" 4 ! .el .IP "\f(CWgnu9x\fR" 4 .IX Item "gnu9x" .PD The 1999 C standard plus \s-1GNU\s0 extensions. + .ie n .IP """c++98""" 4 + .el .IP "\f(CWc++98\fR" 4 + .IX Item "c++98" + The 1998 \s-1ISO\s0 \*(C+ standard plus amendments. + .ie n .IP """gnu++98""" 4 + .el .IP "\f(CWgnu++98\fR" 4 + .IX Item "gnu++98" + The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the + default for \*(C+ code. .RE .RS 4 .RE ! .IP "\fB\-I\-\fR" 4 .IX Item "-I-" Split the include path. Any directories specified with \fB\-I\fR ! options before \fB\-I\-\fR are searched only for headers requested with \&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for \&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR. If additional directories are ! specified with \fB\-I\fR options after the \fB\-I\-\fR, those directories are searched for all \fB#include\fR directives. .Sp ! In addition, \fB\-I\-\fR inhibits the use of the directory of the current file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR. ! .IP "\fB\-nostdinc\fR" 4 .IX Item "-nostdinc" Do not search the standard system directories for header files. Only the directories you have specified with \fB\-I\fR options (and the directory of the current file, if appropriate) are searched. ! .IP "\fB\-nostdinc++\fR" 4 .IX Item "-nostdinc++" Do not search for header files in the \*(C+\-specific standard directories, but do still search the other standard directories. (This option is used when building the \*(C+ library.) ! .IP "\fB\-include\fR \fIfile\fR" 4 .IX Item "-include file" Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first line of the primary source file. However, the first directory searched *************** chain as normal. *** 542,548 **** .Sp If multiple \fB\-include\fR options are given, the files are included in the order they appear on the command line. ! .Ip "\fB\-imacros\fR \fIfile\fR" 4 .IX Item "-imacros file" Exactly like \fB\-include\fR, except that any output produced by scanning \fIfile\fR is thrown away. Macros it defines remain defined. --- 589,595 ---- .Sp If multiple \fB\-include\fR options are given, the files are included in the order they appear on the command line. ! .IP "\fB\-imacros\fR \fIfile\fR" 4 .IX Item "-imacros file" Exactly like \fB\-include\fR, except that any output produced by scanning \fIfile\fR is thrown away. Macros it defines remain defined. *************** processing its declarations. *** 551,570 **** .Sp All files specified by \fB\-imacros\fR are processed before all files specified by \fB\-include\fR. ! .Ip "\fB\-idirafter\fR \fIdir\fR" 4 .IX Item "-idirafter dir" Search \fIdir\fR for header files, but do it \fIafter\fR all directories specified with \fB\-I\fR and the standard system directories have been exhausted. \fIdir\fR is treated as a system include directory. ! .Ip "\fB\-iprefix\fR \fIprefix\fR" 4 .IX Item "-iprefix prefix" Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR options. If the prefix represents a directory, you should include the final \fB/\fR. ! .Ip "\fB\-iwithprefix\fR \fIdir\fR" 4 .IX Item "-iwithprefix dir" .PD 0 ! .Ip "\fB\-iwithprefixbefore\fR \fIdir\fR" 4 .IX Item "-iwithprefixbefore dir" .PD Append \fIdir\fR to the prefix specified previously with --- 598,617 ---- .Sp All files specified by \fB\-imacros\fR are processed before all files specified by \fB\-include\fR. ! .IP "\fB\-idirafter\fR \fIdir\fR" 4 .IX Item "-idirafter dir" Search \fIdir\fR for header files, but do it \fIafter\fR all directories specified with \fB\-I\fR and the standard system directories have been exhausted. \fIdir\fR is treated as a system include directory. ! .IP "\fB\-iprefix\fR \fIprefix\fR" 4 .IX Item "-iprefix prefix" Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR options. If the prefix represents a directory, you should include the final \fB/\fR. ! .IP "\fB\-iwithprefix\fR \fIdir\fR" 4 .IX Item "-iwithprefix dir" .PD 0 ! .IP "\fB\-iwithprefixbefore\fR \fIdir\fR" 4 .IX Item "-iwithprefixbefore dir" .PD Append \fIdir\fR to the prefix specified previously with *************** path. \fB\-iwithprefixbefore\fR puts it *** 573,585 **** would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would. .Sp Use of these options is discouraged. ! .Ip "\fB\-isystem\fR \fIdir\fR" 4 .IX Item "-isystem dir" Search \fIdir\fR for header files, after all directories specified by \&\fB\-I\fR but before the standard system directories. Mark it as a system directory, so that it gets the same special treatment as is applied to the standard system directories. ! .Ip "\fB\-fpreprocessed\fR" 4 .IX Item "-fpreprocessed" Indicate to the preprocessor that the input file has already been preprocessed. This suppresses things like macro expansion, trigraph --- 620,632 ---- would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would. .Sp Use of these options is discouraged. ! .IP "\fB\-isystem\fR \fIdir\fR" 4 .IX Item "-isystem dir" Search \fIdir\fR for header files, after all directories specified by \&\fB\-I\fR but before the standard system directories. Mark it as a system directory, so that it gets the same special treatment as is applied to the standard system directories. ! .IP "\fB\-fpreprocessed\fR" 4 .IX Item "-fpreprocessed" Indicate to the preprocessor that the input file has already been preprocessed. This suppresses things like macro expansion, trigraph *************** a tokenizer for the front ends. *** 592,626 **** \&\fB\-fpreprocessed\fR is implicit if the input file has one of the extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the extensions that \s-1GCC\s0 uses for preprocessed files created by ! \&\fB\-save-temps\fR. ! .Ip "\fB\-ftabstop=\fR\fIwidth\fR" 4 .IX Item "-ftabstop=width" Set the distance between tab stops. This helps the preprocessor report correct column numbers in warnings or errors, even if tabs appear on the line. If the value is less than 1 or greater than 100, the option is ignored. The default is 8. ! .Ip "\fB\-fno-show-column\fR" 4 .IX Item "-fno-show-column" Do not print column numbers in diagnostics. This may be necessary if diagnostics are being scanned by a program that does not understand the column numbers, such as \fBdejagnu\fR. ! .Ip "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4 .IX Item "-A predicate=answer" Make an assertion with the predicate \fIpredicate\fR and answer \&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR \&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because it does not use shell special characters. ! .Ip "\fB\-A -\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4 .IX Item "-A -predicate=answer" Cancel an assertion with the predicate \fIpredicate\fR and answer \&\fIanswer\fR. ! .Ip "\fB\-A-\fR" 4 ! .IX Item "-A-" ! Cancel all predefined assertions and all assertions preceding it on ! the command line. Also, undefine all predefined macros and all ! macros preceding it on the command line. (This is a historical wart and ! may change in the future.) ! .Ip "\fB\-dCHARS\fR" 4 .IX Item "-dCHARS" \&\fI\s-1CHARS\s0\fR is a sequence of one or more of the following characters, and must not be preceded by a space. Other characters are interpreted --- 639,667 ---- \&\fB\-fpreprocessed\fR is implicit if the input file has one of the extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the extensions that \s-1GCC\s0 uses for preprocessed files created by ! \&\fB\-save\-temps\fR. ! .IP "\fB\-ftabstop=\fR\fIwidth\fR" 4 .IX Item "-ftabstop=width" Set the distance between tab stops. This helps the preprocessor report correct column numbers in warnings or errors, even if tabs appear on the line. If the value is less than 1 or greater than 100, the option is ignored. The default is 8. ! .IP "\fB\-fno\-show\-column\fR" 4 .IX Item "-fno-show-column" Do not print column numbers in diagnostics. This may be necessary if diagnostics are being scanned by a program that does not understand the column numbers, such as \fBdejagnu\fR. ! .IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4 .IX Item "-A predicate=answer" Make an assertion with the predicate \fIpredicate\fR and answer \&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR \&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because it does not use shell special characters. ! .IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4 .IX Item "-A -predicate=answer" Cancel an assertion with the predicate \fIpredicate\fR and answer \&\fIanswer\fR. ! .IP "\fB\-dCHARS\fR" 4 .IX Item "-dCHARS" \&\fI\s-1CHARS\s0\fR is a sequence of one or more of the following characters, and must not be preceded by a space. Other characters are interpreted *************** by the compiler proper, or reserved for *** 628,634 **** are silently ignored. If you specify characters whose behavior conflicts, the result is undefined. .RS 4 ! .Ip "\fBM\fR" 4 .IX Item "M" Instead of the normal output, generate a list of \fB#define\fR directives for all the macros defined during the execution of the --- 669,675 ---- are silently ignored. If you specify characters whose behavior conflicts, the result is undefined. .RS 4 ! .IP "\fBM\fR" 4 .IX Item "M" Instead of the normal output, generate a list of \fB#define\fR directives for all the macros defined during the execution of the *************** Assuming you have no file \fIfoo.h\fR, t *** 639,668 **** .Vb 1 \& touch foo.h; cpp -dM foo.h .Ve will show all the predefined macros. ! .Ip "\fBD\fR" 4 .IX Item "D" Like \fBM\fR except in two respects: it does \fInot\fR include the predefined macros, and it outputs \fIboth\fR the \fB#define\fR directives and the result of preprocessing. Both kinds of output go to the standard output file. ! .Ip "\fBN\fR" 4 .IX Item "N" Like \fBD\fR, but emit only the macro names, not their expansions. ! .Ip "\fBI\fR" 4 .IX Item "I" Output \fB#include\fR directives in addition to the result of preprocessing. .RE .RS 4 .RE ! .Ip "\fB\-P\fR" 4 .IX Item "-P" Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers. ! .Ip "\fB\-C\fR" 4 .IX Item "-C" Do not discard comments. All comments are passed through to the output file, except for comments in processed directives, which are deleted --- 680,710 ---- .Vb 1 \& touch foo.h; cpp -dM foo.h .Ve + .Sp will show all the predefined macros. ! .IP "\fBD\fR" 4 .IX Item "D" Like \fBM\fR except in two respects: it does \fInot\fR include the predefined macros, and it outputs \fIboth\fR the \fB#define\fR directives and the result of preprocessing. Both kinds of output go to the standard output file. ! .IP "\fBN\fR" 4 .IX Item "N" Like \fBD\fR, but emit only the macro names, not their expansions. ! .IP "\fBI\fR" 4 .IX Item "I" Output \fB#include\fR directives in addition to the result of preprocessing. .RE .RS 4 .RE ! .IP "\fB\-P\fR" 4 .IX Item "-P" Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers. ! .IP "\fB\-C\fR" 4 .IX Item "-C" Do not discard comments. All comments are passed through to the output file, except for comments in processed directives, which are deleted *************** causes the preprocessor to treat comment *** 673,724 **** For example, comments appearing at the start of what would be a directive line have the effect of turning that line into an ordinary source line, since the first token on the line is no longer a \fB#\fR. ! .Ip "\fB\-gcc\fR" 4 .IX Item "-gcc" ! Define the macros _\|_GNUC_\|_, _\|_GNUC_MINOR_\|_ and _\|_GNUC_PATCHLEVEL_\|_. These are defined automatically when you use \&\fBgcc \-E\fR; you can turn them off in that case with ! \&\fB\-no-gcc\fR. ! .Ip "\fB\-traditional\fR" 4 ! .IX Item "-traditional" ! Try to imitate the behavior of old-fashioned C, as opposed to \s-1ISO\s0 ! C. ! .Ip "\fB\-trigraphs\fR" 4 .IX Item "-trigraphs" Process trigraph sequences. ! .Ip "\fB\-remap\fR" 4 .IX Item "-remap" Enable special code to work around file systems which only permit very ! short file names, such as \s-1MS-DOS\s0. ! .Ip "\fB\-$\fR" 4 ! .IX Item "-$" ! Forbid the use of \fB$\fR in identifiers. The C standard allows ! implementations to define extra characters that can appear in ! identifiers. By default \s-1GNU\s0 \s-1CPP\s0 permits \fB$\fR, a common extension. ! .Ip "\fB\-h\fR" 4 ! .IX Item "-h" .PD 0 ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" ! .Ip "\fB\*(--target-help\fR" 4 ! .IX Item "target-help" .PD Print text describing all the command line options instead of preprocessing anything. ! .Ip "\fB\-v\fR" 4 .IX Item "-v" Verbose mode. Print out \s-1GNU\s0 \s-1CPP\s0's version number at the beginning of execution, and report the final form of the include path. ! .Ip "\fB\-H\fR" 4 .IX Item "-H" Print the name of each header file used, in addition to other normal activities. Each name is indented to show how deep in the \&\fB#include\fR stack it is. ! .Ip "\fB\-version\fR" 4 .IX Item "-version" .PD 0 ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" .PD Print out \s-1GNU\s0 \s-1CPP\s0's version number. With one dash, proceed to preprocess as normal. With two dashes, exit immediately. --- 715,772 ---- For example, comments appearing at the start of what would be a directive line have the effect of turning that line into an ordinary source line, since the first token on the line is no longer a \fB#\fR. ! .IP "\fB\-CC\fR" 4 ! .IX Item "-CC" ! Do not discard comments, including during macro expansion. This is ! like \fB\-C\fR, except that comments contained within macros are ! also passed through to the output file where the macro is expanded. ! .Sp ! In addition to the side-effects of the \fB\-C\fR option, the ! \&\fB\-CC\fR option causes all \*(C+\-style comments inside a macro ! to be converted to C\-style comments. This is to prevent later use ! of that macro from inadvertently commenting out the remainder of ! the source line. ! .Sp ! The \fB\-CC\fR option is generally used to support lint comments. ! .IP "\fB\-gcc\fR" 4 .IX Item "-gcc" ! Define the macros _\|_GNUC_\|_, _0B5_MINOR_\|_ and _\|_GNUC_PATCHLEVEL_\|_. These are defined automatically when you use \&\fBgcc \-E\fR; you can turn them off in that case with ! \&\fB\-no\-gcc\fR. ! .IP "\fB\-traditional\-cpp\fR" 4 ! .IX Item "-traditional-cpp" ! Try to imitate the behavior of old-fashioned C preprocessors, as ! opposed to \s-1ISO\s0 C preprocessors. ! .IP "\fB\-trigraphs\fR" 4 .IX Item "-trigraphs" Process trigraph sequences. ! .IP "\fB\-remap\fR" 4 .IX Item "-remap" Enable special code to work around file systems which only permit very ! short file names, such as \s-1MS\-DOS\s0. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" .PD 0 ! .IP "\fB\-\-target\-help\fR" 4 ! .IX Item "--target-help" .PD Print text describing all the command line options instead of preprocessing anything. ! .IP "\fB\-v\fR" 4 .IX Item "-v" Verbose mode. Print out \s-1GNU\s0 \s-1CPP\s0's version number at the beginning of execution, and report the final form of the include path. ! .IP "\fB\-H\fR" 4 .IX Item "-H" Print the name of each header file used, in addition to other normal activities. Each name is indented to show how deep in the \&\fB#include\fR stack it is. ! .IP "\fB\-version\fR" 4 .IX Item "-version" .PD 0 ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" .PD Print out \s-1GNU\s0 \s-1CPP\s0's version number. With one dash, proceed to preprocess as normal. With two dashes, exit immediately. *************** Note that you can also specify places to *** 733,746 **** \&\fB\-M\fR. These take precedence over environment variables, which in turn take precedence over the configuration of \s-1GCC\s0. ! .Ip "\fB\s-1CPATH\s0\fR" 4 .IX Item "CPATH" .PD 0 ! .Ip "\fBC_INCLUDE_PATH\fR" 4 .IX Item "C_INCLUDE_PATH" ! .Ip "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 .IX Item "CPLUS_INCLUDE_PATH" ! .Ip "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 .IX Item "OBJC_INCLUDE_PATH" .PD Each variable's value is a list of directories separated by a special --- 781,794 ---- \&\fB\-M\fR. These take precedence over environment variables, which in turn take precedence over the configuration of \s-1GCC\s0. ! .IP "\fB\s-1CPATH\s0\fR" 4 .IX Item "CPATH" .PD 0 ! .IP "\fBC_INCLUDE_PATH\fR" 4 .IX Item "C_INCLUDE_PATH" ! .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 .IX Item "CPLUS_INCLUDE_PATH" ! .IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 .IX Item "OBJC_INCLUDE_PATH" .PD Each variable's value is a list of directories separated by a special *************** semicolon, and for almost all other targ *** 751,757 **** .Sp \&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if specified with \fB\-I\fR, but after any paths given with \fB\-I\fR ! options on the command line. The environment variable is used regardless of which language is being preprocessed. .Sp The remaining environment variables apply only when preprocessing the --- 799,805 ---- .Sp \&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if specified with \fB\-I\fR, but after any paths given with \fB\-I\fR ! options on the command line. This environment variable is used regardless of which language is being preprocessed. .Sp The remaining environment variables apply only when preprocessing the *************** particular language indicated. Each spe *** 759,768 **** to be searched as if specified with \fB\-isystem\fR, but after any paths given with \fB\-isystem\fR options on the command line. .Sp ! See also \f(CW@ref\fR{Search Path}. ! .Ip "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4 .IX Item "DEPENDENCIES_OUTPUT" - @anchor{\s-1DEPENDENCIES_OUTPUT\s0} If this variable is set, its value specifies how to output dependencies for Make based on the non-system header files processed by the compiler. System header files are ignored in the dependency --- 807,819 ---- to be searched as if specified with \fB\-isystem\fR, but after any paths given with \fB\-isystem\fR options on the command line. .Sp ! In all these variables, an empty element instructs the compiler to ! search its current working directory. Empty elements can appear at the ! beginning or end of a path. For instance, if the value of ! \&\fB\s-1CPATH\s0\fR is \f(CW\*(C`:/special/include\*(C'\fR, that has the same ! effect as \fB\-I.\ \-I/special/include\fR. ! .IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4 .IX Item "DEPENDENCIES_OUTPUT" If this variable is set, its value specifies how to output dependencies for Make based on the non-system header files processed by the compiler. System header files are ignored in the dependency *************** file \fIfile\fR using \fItarget\fR as th *** 777,798 **** In other words, this environment variable is equivalent to combining the options \fB\-MM\fR and \fB\-MF\fR, with an optional \fB\-MT\fR switch too. ! .Ip "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4 .IX Item "SUNPRO_DEPENDENCIES" ! This variable is the same as the environment variable ! \&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR, except that ! system header files are not ignored, so it implies \fB\-M\fR rather ! than \fB\-MM\fR. However, the dependence on the main input file is ! omitted. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf-funding\fR\|(7), \&\fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIcpp\fR, \fIgcc\fR, and \&\fIbinutils\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document --- 828,848 ---- In other words, this environment variable is equivalent to combining the options \fB\-MM\fR and \fB\-MF\fR, with an optional \fB\-MT\fR switch too. ! .IP "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4 .IX Item "SUNPRO_DEPENDENCIES" ! This variable is the same as \fB\s-1DEPENDENCIES_OUTPUT\s0\fR (see above), ! except that system header files are not ignored, so it implies ! \&\fB\-M\fR rather than \fB\-MM\fR. However, the dependence on the ! main input file is omitted. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7), \&\fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIcpp\fR, \fIgcc\fR, and \&\fIbinutils\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document *************** This manual contains no Invariant Sectio *** 808,813 **** --- 858,864 ---- .Vb 1 \& A GNU Manual .Ve + .PP (b) The \s-1FSF\s0's Back-Cover Text is: .PP .Vb 3 diff -Nrc3pad gcc-3.2.3/gcc/doc/cppenv.texi gcc-3.3/gcc/doc/cppenv.texi *** gcc-3.2.3/gcc/doc/cppenv.texi 2002-08-15 19:46:42.000000000 +0000 --- gcc-3.3/gcc/doc/cppenv.texi 2002-08-14 22:34:50.000000000 +0000 *************** *** 10,16 **** @c If this file is included with the flag ``cppmanual'' set, it is @c formatted for inclusion in the CPP manual; otherwise the main GCC manual. ! @ftable @env @item CPATH @itemx C_INCLUDE_PATH @itemx CPLUS_INCLUDE_PATH --- 10,16 ---- @c If this file is included with the flag ``cppmanual'' set, it is @c formatted for inclusion in the CPP manual; otherwise the main GCC manual. ! @vtable @env @item CPATH @itemx C_INCLUDE_PATH @itemx CPLUS_INCLUDE_PATH *************** semicolon, and for almost all other targ *** 25,31 **** @env{CPATH} specifies a list of directories to be searched as if specified with @option{-I}, but after any paths given with @option{-I} ! options on the command line. The environment variable is used regardless of which language is being preprocessed. The remaining environment variables apply only when preprocessing the --- 25,31 ---- @env{CPATH} specifies a list of directories to be searched as if specified with @option{-I}, but after any paths given with @option{-I} ! options on the command line. This environment variable is used regardless of which language is being preprocessed. The remaining environment variables apply only when preprocessing the *************** particular language indicated. Each spe *** 33,44 **** to be searched as if specified with @option{-isystem}, but after any paths given with @option{-isystem} options on the command line. @ifset cppmanual See also @ref{Search Path}. @end ifset @item DEPENDENCIES_OUTPUT - @anchor{DEPENDENCIES_OUTPUT} @cindex dependencies for make as output If this variable is set, its value specifies how to output dependencies for Make based on the non-system header files processed --- 33,51 ---- to be searched as if specified with @option{-isystem}, but after any paths given with @option{-isystem} options on the command line. + In all these variables, an empty element instructs the compiler to + search its current working directory. Empty elements can appear at the + beginning or end of a path. For instance, if the value of + @env{CPATH} is @code{:/special/include}, that has the same + effect as @samp{@w{-I. -I/special/include}}. + + @c man end @ifset cppmanual See also @ref{Search Path}. @end ifset + @c man begin ENVIRONMENT @item DEPENDENCIES_OUTPUT @cindex dependencies for make as output If this variable is set, its value specifies how to output dependencies for Make based on the non-system header files processed *************** with an optional @option{-MT} switch too *** 63,77 **** @item SUNPRO_DEPENDENCIES @cindex dependencies for make as output ! This variable is the same as the environment variable ! @env{DEPENDENCIES_OUTPUT} (@pxref{DEPENDENCIES_OUTPUT}), except that ! system header files are not ignored, so it implies @option{-M} rather ! than @option{-MM}. However, the dependence on the main input file is ! omitted. @ifset cppmanual @xref{Invocation}. @end ifset @ifclear cppmanual @xref{Preprocessor Options}. @end ifclear ! @end ftable --- 70,83 ---- @item SUNPRO_DEPENDENCIES @cindex dependencies for make as output ! This variable is the same as @env{DEPENDENCIES_OUTPUT} (see above), ! except that system header files are not ignored, so it implies ! @option{-M} rather than @option{-MM}. However, the dependence on the ! main input file is omitted. @ifset cppmanual @xref{Invocation}. @end ifset @ifclear cppmanual @xref{Preprocessor Options}. @end ifclear ! @end vtable diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.info gcc-3.3/gcc/doc/cpp.info *** gcc-3.2.3/gcc/doc/cpp.info 2003-04-22 07:07:10.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.info 2003-05-14 00:31:32.000000000 +0000 *************** *** 1,86 **** ! This is doc/cpp.info, produced by makeinfo version 4.5 from doc/cpp.texi. INFO-DIR-SECTION Programming START-INFO-DIR-ENTRY * Cpp: (cpp). The GNU C preprocessor. END-INFO-DIR-ENTRY  ! Indirect: ! cpp.info-1: 191 ! cpp.info-2: 49827 ! cpp.info-3: 96680 ! cpp.info-4: 142535 ! cpp.info-5: 190066  Tag Table: ! (Indirect) ! Node: Top191 ! Node: Overview2796 ! Node: Initial processing5164 ! Node: Tokenization11621 ! Ref: Tokenization-Footnote-118792 ! Node: The preprocessing language18903 ! Node: Header Files21776 ! Node: Include Syntax23654 ! Node: Include Operation25156 ! Node: Search Path27052 ! Node: Once-Only Headers30129 ! Node: Computed Includes31783 ! Node: Wrapper Headers34922 ! Node: System Headers37341 ! Node: Macros39386 ! Node: Object-like Macros40486 ! Node: Function-like Macros44072 ! Node: Macro Arguments45682 ! Node: Stringification49827 ! Node: Concatenation53028 ! Node: Variadic Macros56142 ! Node: Predefined Macros60932 ! Node: Standard Predefined Macros61515 ! Node: Common Predefined Macros66795 ! Node: System-specific Predefined Macros73375 ! Node: C++ Named Operators75387 ! Node: Undefining and Redefining Macros76342 ! Node: Macro Pitfalls78420 ! Node: Misnesting78945 ! Node: Operator Precedence Problems80046 ! Node: Swallowing the Semicolon81901 ! Node: Duplication of Side Effects83913 ! Node: Self-Referential Macros86085 ! Node: Argument Prescan88495 ! Node: Newlines in Arguments92238 ! Node: Conditionals93183 ! Node: Conditional Uses95012 ! Node: Conditional Syntax96365 ! Node: Ifdef96680 ! Node: If99846 ! Node: Defined102259 ! Node: Else103532 ! Node: Elif104093 ! Node: Deleted Code105373 ! Node: Diagnostics106615 ! Node: Line Control108232 ! Node: Pragmas112039 ! Node: Other Directives116308 ! Node: Preprocessor Output117502 ! Node: Traditional Mode120702 ! Node: Implementation Details126281 ! Node: Implementation-defined behavior126903 ! Node: Implementation limits129176 ! Node: Obsolete Features131883 ! Node: Assertions132370 ! Node: Obsolete once-only headers134901 ! Node: Miscellaneous obsolete features136669 ! Node: Differences from previous versions138023 ! Node: Invocation142535 ! Ref: -MF149854 ! Node: Environment Variables162264 ! Ref: DEPENDENCIES_OUTPUT163914 ! Node: GNU Free Documentation License164954 ! Node: Option Index184852 ! Node: Index of Directives188319 ! Node: Concept Index190066  End Tag Table --- 1,4991 ---- ! This is doc/cpp.info, produced by makeinfo version 4.2 from doc/cpp.texi. + Copyright (C) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, + 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 or + any later version published by the Free Software Foundation. A copy of + the license is included in the section entitled "GNU Free Documentation + License". + + This manual contains no Invariant Sections. The Front-Cover Texts + are (a) (see below), and the Back-Cover Texts are (b) (see below). + + (a) The FSF's Front-Cover Text is: + + A GNU Manual + + (b) The FSF's Back-Cover Text is: + + You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. INFO-DIR-SECTION Programming START-INFO-DIR-ENTRY * Cpp: (cpp). The GNU C preprocessor. END-INFO-DIR-ENTRY  ! File: cpp.info, Node: Top, Next: Overview, Up: (dir) ! ! ! ! The C preprocessor implements the macro language used to transform C, ! C++, and Objective-C programs before they are compiled. It can also be ! useful on its own. ! ! * Menu: ! ! * Overview:: ! * Header Files:: ! * Macros:: ! * Conditionals:: ! * Diagnostics:: ! * Line Control:: ! * Pragmas:: ! * Other Directives:: ! * Preprocessor Output:: ! * Traditional Mode:: ! * Implementation Details:: ! * Invocation:: ! * Environment Variables:: ! * GNU Free Documentation License:: ! * Index of Directives:: ! * Option Index:: ! * Concept Index:: ! ! --- The Detailed Node Listing --- ! ! Overview ! ! * Initial processing:: ! * Tokenization:: ! * The preprocessing language:: ! ! Header Files ! ! * Include Syntax:: ! * Include Operation:: ! * Search Path:: ! * Once-Only Headers:: ! * Computed Includes:: ! * Wrapper Headers:: ! * System Headers:: ! ! Macros ! ! * Object-like Macros:: ! * Function-like Macros:: ! * Macro Arguments:: ! * Stringification:: ! * Concatenation:: ! * Variadic Macros:: ! * Predefined Macros:: ! * Undefining and Redefining Macros:: ! * Directives Within Macro Arguments:: ! * Macro Pitfalls:: ! ! Predefined Macros ! ! * Standard Predefined Macros:: ! * Common Predefined Macros:: ! * System-specific Predefined Macros:: ! * C++ Named Operators:: ! ! Macro Pitfalls ! ! * Misnesting:: ! * Operator Precedence Problems:: ! * Swallowing the Semicolon:: ! * Duplication of Side Effects:: ! * Self-Referential Macros:: ! * Argument Prescan:: ! * Newlines in Arguments:: ! ! Conditionals ! ! * Conditional Uses:: ! * Conditional Syntax:: ! * Deleted Code:: ! ! Conditional Syntax ! ! * Ifdef:: ! * If:: ! * Defined:: ! * Else:: ! * Elif:: ! ! Implementation Details ! ! * Implementation-defined behavior:: ! * Implementation limits:: ! * Obsolete Features:: ! * Differences from previous versions:: ! ! Obsolete Features ! ! * Assertions:: ! * Obsolete once-only headers:: ! ! Copyright (C) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, ! 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.1 or ! any later version published by the Free Software Foundation. A copy of ! the license is included in the section entitled "GNU Free Documentation ! License". ! ! This manual contains no Invariant Sections. The Front-Cover Texts ! are (a) (see below), and the Back-Cover Texts are (b) (see below). ! ! (a) The FSF's Front-Cover Text is: ! ! A GNU Manual ! ! (b) The FSF's Back-Cover Text is: ! ! You have freedom to copy and modify this GNU Manual, like GNU ! software. Copies published by the Free Software Foundation raise ! funds for GNU development. !  ! File: cpp.info, Node: Overview, Next: Header Files, Prev: Top, Up: Top ! ! Overview ! ******** ! ! The C preprocessor, often known as "cpp", is a "macro processor" ! that is used automatically by the C compiler to transform your program ! before compilation. It is called a macro processor because it allows ! you to define "macros", which are brief abbreviations for longer ! constructs. ! ! The C preprocessor is intended to be used only with C, C++, and ! Objective-C source code. In the past, it has been abused as a general ! text processor. It will choke on input which does not obey C's lexical ! rules. For example, apostrophes will be interpreted as the beginning of ! character constants, and cause errors. Also, you cannot rely on it ! preserving characteristics of the input which are not significant to ! C-family languages. If a Makefile is preprocessed, all the hard tabs ! will be removed, and the Makefile will not work. ! ! Having said that, you can often get away with using cpp on things ! which are not C. Other Algol-ish programming languages are often safe ! (Pascal, Ada, etc.) So is assembly, with caution. `-traditional-cpp' ! mode preserves more white space, and is otherwise more permissive. Many ! of the problems can be avoided by writing C or C++ style comments ! instead of native language comments, and keeping macros simple. ! ! Wherever possible, you should use a preprocessor geared to the ! language you are writing in. Modern versions of the GNU assembler have ! macro facilities. Most high level programming languages have their own ! conditional compilation and inclusion mechanism. If all else fails, ! try a true general text processor, such as GNU M4. ! ! C preprocessors vary in some details. This manual discusses the GNU ! C preprocessor, which provides a small superset of the features of ISO ! Standard C. In its default mode, the GNU C preprocessor does not do a ! few things required by the standard. These are features which are ! rarely, if ever, used, and may cause surprising changes to the meaning ! of a program which does not expect them. To get strict ISO Standard C, ! you should use the `-std=c89' or `-std=c99' options, depending on which ! version of the standard you want. To get all the mandatory ! diagnostics, you must also use `-pedantic'. *Note Invocation::. ! ! This manual describes the behavior of the ISO preprocessor. To ! minimize gratuitous differences, where the ISO preprocessor's behavior ! does not conflict with traditional semantics, the traditional ! preprocessor should behave the same way. The various differences that ! do exist are detailed in the section *Note Traditional Mode::. ! ! For clarity, unless noted otherwise, references to `CPP' in this ! manual refer to GNU CPP. ! ! * Menu: ! ! * Initial processing:: ! * Tokenization:: ! * The preprocessing language:: ! !  ! File: cpp.info, Node: Initial processing, Next: Tokenization, Up: Overview ! ! Initial processing ! ================== ! ! The preprocessor performs a series of textual transformations on its ! input. These happen before all other processing. Conceptually, they ! happen in a rigid order, and the entire file is run through each ! transformation before the next one begins. CPP actually does them all ! at once, for performance reasons. These transformations correspond ! roughly to the first three "phases of translation" described in the C ! standard. ! ! 1. The input file is read into memory and broken into lines. ! ! CPP expects its input to be a text file, that is, an unstructured ! stream of ASCII characters, with some characters indicating the ! end of a line of text. Extended ASCII character sets, such as ISO ! Latin-1 or Unicode encoded in UTF-8, are also acceptable. ! Character sets that are not strict supersets of seven-bit ASCII ! will not work. We plan to add complete support for international ! character sets in a future release. ! ! Different systems use different conventions to indicate the end of ! a line. GCC accepts the ASCII control sequences `LF', `CR LF', ! `CR', and `LF CR' as end-of-line markers. The first three are the ! canonical sequences used by Unix, DOS and VMS, and the classic Mac ! OS (before OSX) respectively. You may therefore safely copy ! source code written on any of those systems to a different one and ! use it without conversion. (GCC may lose track of the current ! line number if a file doesn't consistently use one convention, as ! sometimes happens when it is edited on computers with different ! conventions that share a network file system.) `LF CR' is ! included because it has been reported as an end-of-line marker ! under exotic conditions. ! ! If the last line of any input file lacks an end-of-line marker, ! the end of the file is considered to implicitly supply one. The C ! standard says that this condition provokes undefined behavior, so ! GCC will emit a warning message. ! ! 2. If trigraphs are enabled, they are replaced by their corresponding ! single characters. By default GCC ignores trigraphs, but if you ! request a strictly conforming mode with the `-std' option, or you ! specify the `-trigraphs' option, then it converts them. ! ! These are nine three-character sequences, all starting with `??', ! that are defined by ISO C to stand for single characters. They ! permit obsolete systems that lack some of C's punctuation to use ! C. For example, `??/' stands for `\', so '??/n' is a character ! constant for a newline. ! ! Trigraphs are not popular and many compilers implement them ! incorrectly. Portable code should not rely on trigraphs being ! either converted or ignored. If you use the `-Wall' or ! `-Wtrigraphs' options, GCC will warn you when a trigraph would ! change the meaning of your program if it were converted. ! ! In a string constant, you can prevent a sequence of question marks ! from being confused with a trigraph by inserting a backslash ! between the question marks. "(??\?)" is the string `(???)', not ! `(?]'. Traditional C compilers do not recognize this idiom. ! ! The nine trigraphs and their replacements are ! ! Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??- ! Replacement: [ ] { } # \ ^ | ~ ! ! 3. Continued lines are merged into one long line. ! ! A continued line is a line which ends with a backslash, `\'. The ! backslash is removed and the following line is joined with the ! current one. No space is inserted, so you may split a line ! anywhere, even in the middle of a word. (It is generally more ! readable to split lines only at white space.) ! ! The trailing backslash on a continued line is commonly referred to ! as a "backslash-newline". ! ! If there is white space between a backslash and the end of a line, ! that is still a continued line. However, as this is usually the ! result of an editing mistake, and many compilers will not accept ! it as a continued line, GCC will warn you about it. ! ! 4. All comments are replaced with single spaces. ! ! There are two kinds of comments. "Block comments" begin with `/*' ! and continue until the next `*/'. Block comments do not nest: ! ! /* this is /* one comment */ text outside comment ! ! "Line comments" begin with `//' and continue to the end of the ! current line. Line comments do not nest either, but it does not ! matter, because they would end in the same place anyway. ! ! // this is // one comment ! text outside comment ! ! It is safe to put line comments inside block comments, or vice versa. ! ! /* block comment ! // contains line comment ! yet more comment ! */ outside comment ! ! // line comment /* contains block comment */ ! ! But beware of commenting out one end of a block comment with a line ! comment. ! ! // l.c. /* block comment begins ! oops! this isn't a comment anymore */ ! ! Comments are not recognized within string literals. "/* blah */" is ! the string constant `/* blah */', not an empty string. ! ! Line comments are not in the 1989 edition of the C standard, but they ! are recognized by GCC as an extension. In C++ and in the 1999 edition ! of the C standard, they are an official part of the language. ! ! Since these transformations happen before all other processing, you ! can split a line mechanically with backslash-newline anywhere. You can ! comment out the end of a line. You can continue a line comment onto the ! next line with backslash-newline. You can even split `/*', `*/', and ! `//' onto multiple lines with backslash-newline. For example: ! ! /\ ! * ! */ # /* ! */ defi\ ! ne FO\ ! O 10\ ! 20 ! ! is equivalent to `#define FOO 1020'. All these tricks are extremely ! confusing and should not be used in code intended to be readable. ! ! There is no way to prevent a backslash at the end of a line from ! being interpreted as a backslash-newline. This cannot affect any ! correct program, however. ! !  ! File: cpp.info, Node: Tokenization, Next: The preprocessing language, Prev: Initial processing, Up: Overview ! ! Tokenization ! ============ ! ! After the textual transformations are finished, the input file is ! converted into a sequence of "preprocessing tokens". These mostly ! correspond to the syntactic tokens used by the C compiler, but there are ! a few differences. White space separates tokens; it is not itself a ! token of any kind. Tokens do not have to be separated by white space, ! but it is often necessary to avoid ambiguities. ! ! When faced with a sequence of characters that has more than one ! possible tokenization, the preprocessor is greedy. It always makes ! each token, starting from the left, as big as possible before moving on ! to the next token. For instance, `a+++++b' is interpreted as ! `a ++ ++ + b', not as `a ++ + ++ b', even though the latter ! tokenization could be part of a valid C program and the former could ! not. ! ! Once the input file is broken into tokens, the token boundaries never ! change, except when the `##' preprocessing operator is used to paste ! tokens together. *Note Concatenation::. For example, ! ! #define foo() bar ! foo()baz ! ==> bar baz ! _not_ ! ==> barbaz ! ! The compiler does not re-tokenize the preprocessor's output. Each ! preprocessing token becomes one compiler token. ! ! Preprocessing tokens fall into five broad classes: identifiers, ! preprocessing numbers, string literals, punctuators, and other. An ! "identifier" is the same as an identifier in C: any sequence of ! letters, digits, or underscores, which begins with a letter or ! underscore. Keywords of C have no significance to the preprocessor; ! they are ordinary identifiers. You can define a macro whose name is a ! keyword, for instance. The only identifier which can be considered a ! preprocessing keyword is `defined'. *Note Defined::. ! ! This is mostly true of other languages which use the C preprocessor. ! However, a few of the keywords of C++ are significant even in the ! preprocessor. *Note C++ Named Operators::. ! ! In the 1999 C standard, identifiers may contain letters which are not ! part of the "basic source character set," at the implementation's ! discretion (such as accented Latin letters, Greek letters, or Chinese ! ideograms). This may be done with an extended character set, or the ! `\u' and `\U' escape sequences. GCC does not presently implement ! either feature in the preprocessor or the compiler. ! ! As an extension, GCC treats `$' as a letter. This is for ! compatibility with some systems, such as VMS, where `$' is commonly ! used in system-defined function and object names. `$' is not a letter ! in strictly conforming mode, or if you specify the `-$' option. *Note ! Invocation::. ! ! A "preprocessing number" has a rather bizarre definition. The ! category includes all the normal integer and floating point constants ! one expects of C, but also a number of other things one might not ! initially recognize as a number. Formally, preprocessing numbers begin ! with an optional period, a required decimal digit, and then continue ! with any sequence of letters, digits, underscores, periods, and ! exponents. Exponents are the two-character sequences `e+', `e-', `E+', ! `E-', `p+', `p-', `P+', and `P-'. (The exponents that begin with `p' ! or `P' are new to C99. They are used for hexadecimal floating-point ! constants.) ! ! The purpose of this unusual definition is to isolate the preprocessor ! from the full complexity of numeric constants. It does not have to ! distinguish between lexically valid and invalid floating-point numbers, ! which is complicated. The definition also permits you to split an ! identifier at any position and get exactly two tokens, which can then be ! pasted back together with the `##' operator. ! ! It's possible for preprocessing numbers to cause programs to be ! misinterpreted. For example, `0xE+12' is a preprocessing number which ! does not translate to any valid numeric constant, therefore a syntax ! error. It does not mean `0xE + 12', which is what you might have ! intended. ! ! "String literals" are string constants, character constants, and ! header file names (the argument of `#include').(1) String constants ! and character constants are straightforward: "..." or '...'. In either ! case embedded quotes should be escaped with a backslash: '\'' is the ! character constant for `''. There is no limit on the length of a ! character constant, but the value of a character constant that contains ! more than one character is implementation-defined. *Note ! Implementation Details::. ! ! Header file names either look like string constants, "...", or are ! written with angle brackets instead, <...>. In either case, backslash ! is an ordinary character. There is no way to escape the closing quote ! or angle bracket. The preprocessor looks for the header file in ! different places depending on which form you use. *Note Include ! Operation::. ! ! No string literal may extend past the end of a line. Older versions ! of GCC accepted multi-line string constants. You may use continued ! lines instead, or string constant concatenation. *Note Differences ! from previous versions::. ! ! "Punctuators" are all the usual bits of punctuation which are ! meaningful to C and C++. All but three of the punctuation characters in ! ASCII are C punctuators. The exceptions are `@', `$', and ``'. In ! addition, all the two- and three-character operators are punctuators. ! There are also six "digraphs", which the C++ standard calls ! "alternative tokens", which are merely alternate ways to spell other ! punctuators. This is a second attempt to work around missing ! punctuation in obsolete systems. It has no negative side effects, ! unlike trigraphs, but does not cover as much ground. The digraphs and ! their corresponding normal punctuators are: ! ! Digraph: <% %> <: :> %: %:%: ! Punctuator: { } [ ] # ## ! ! Any other single character is considered "other." It is passed on to ! the preprocessor's output unmolested. The C compiler will almost ! certainly reject source code containing "other" tokens. In ASCII, the ! only other characters are `@', `$', ``', and control characters other ! than NUL (all bits zero). (Note that `$' is normally considered a ! letter.) All characters with the high bit set (numeric range ! 0x7F-0xFF) are also "other" in the present implementation. This will ! change when proper support for international character sets is added to ! GCC. ! ! NUL is a special case because of the high probability that its ! appearance is accidental, and because it may be invisible to the user ! (many terminals do not display NUL at all). Within comments, NULs are ! silently ignored, just as any other character would be. In running ! text, NUL is considered white space. For example, these two directives ! have the same meaning. ! ! #define X^@1 ! #define X 1 ! ! (where `^@' is ASCII NUL). Within string or character constants, NULs ! are preserved. In the latter two cases the preprocessor emits a ! warning message. ! ! ---------- Footnotes ---------- ! ! (1) The C standard uses the term "string literal" to refer only to ! what we are calling "string constants". ! !  ! File: cpp.info, Node: The preprocessing language, Prev: Tokenization, Up: Overview ! ! The preprocessing language ! ========================== ! ! After tokenization, the stream of tokens may simply be passed ! straight to the compiler's parser. However, if it contains any ! operations in the "preprocessing language", it will be transformed ! first. This stage corresponds roughly to the standard's "translation ! phase 4" and is what most people think of as the preprocessor's job. ! ! The preprocessing language consists of "directives" to be executed ! and "macros" to be expanded. Its primary capabilities are: ! ! * Inclusion of header files. These are files of declarations that ! can be substituted into your program. ! ! * Macro expansion. You can define "macros", which are abbreviations ! for arbitrary fragments of C code. The preprocessor will replace ! the macros with their definitions throughout the program. Some ! macros are automatically defined for you. ! ! * Conditional compilation. You can include or exclude parts of the ! program according to various conditions. ! ! * Line control. If you use a program to combine or rearrange source ! files into an intermediate file which is then compiled, you can ! use line control to inform the compiler where each source line ! originally came from. ! ! * Diagnostics. You can detect problems at compile time and issue ! errors or warnings. ! ! There are a few more, less useful, features. ! ! Except for expansion of predefined macros, all these operations are ! triggered with "preprocessing directives". Preprocessing directives ! are lines in your program that start with `#'. Whitespace is allowed ! before and after the `#'. The `#' is followed by an identifier, the ! "directive name". It specifies the operation to perform. Directives ! are commonly referred to as `#NAME' where NAME is the directive name. ! For example, `#define' is the directive that defines a macro. ! ! The `#' which begins a directive cannot come from a macro expansion. ! Also, the directive name is not macro expanded. Thus, if `foo' is ! defined as a macro expanding to `define', that does not make `#foo' a ! valid preprocessing directive. ! ! The set of valid directive names is fixed. Programs cannot define ! new preprocessing directives. ! ! Some directives require arguments; these make up the rest of the ! directive line and must be separated from the directive name by ! whitespace. For example, `#define' must be followed by a macro name ! and the intended expansion of the macro. ! ! A preprocessing directive cannot cover more than one line. The line ! may, however, be continued with backslash-newline, or by a block comment ! which extends past the end of the line. In either case, when the ! directive is processed, the continuations have already been merged with ! the first line to make one long line. ! !  ! File: cpp.info, Node: Header Files, Next: Macros, Prev: Overview, Up: Top ! ! Header Files ! ************ ! ! A header file is a file containing C declarations and macro ! definitions (*note Macros::) to be shared between several source files. ! You request the use of a header file in your program by "including" ! it, with the C preprocessing directive `#include'. ! ! Header files serve two purposes. ! ! * System header files declare the interfaces to parts of the ! operating system. You include them in your program to supply the ! definitions and declarations you need to invoke system calls and ! libraries. ! ! * Your own header files contain declarations for interfaces between ! the source files of your program. Each time you have a group of ! related declarations and macro definitions all or most of which ! are needed in several different source files, it is a good idea to ! create a header file for them. ! ! Including a header file produces the same results as copying the ! header file into each source file that needs it. Such copying would be ! time-consuming and error-prone. With a header file, the related ! declarations appear in only one place. If they need to be changed, they ! can be changed in one place, and programs that include the header file ! will automatically use the new version when next recompiled. The header ! file eliminates the labor of finding and changing all the copies as well ! as the risk that a failure to find one copy will result in ! inconsistencies within a program. ! ! In C, the usual convention is to give header files names that end ! with `.h'. It is most portable to use only letters, digits, dashes, and ! underscores in header file names, and at most one dot. ! ! * Menu: ! ! * Include Syntax:: ! * Include Operation:: ! * Search Path:: ! * Once-Only Headers:: ! * Computed Includes:: ! * Wrapper Headers:: ! * System Headers:: ! !  ! File: cpp.info, Node: Include Syntax, Next: Include Operation, Up: Header Files ! ! Include Syntax ! ============== ! ! Both user and system header files are included using the ! preprocessing directive `#include'. It has two variants: ! ! `#include ' ! This variant is used for system header files. It searches for a ! file named FILE in a standard list of system directories. You can ! prepend directories to this list with the `-I' option (*note ! Invocation::). ! ! `#include "FILE"' ! This variant is used for header files of your own program. It ! searches for a file named FILE first in the directory containing ! the current file, then in the same directories used for `'. ! ! The argument of `#include', whether delimited with quote marks or ! angle brackets, behaves like a string constant in that comments are not ! recognized, and macro names are not expanded. Thus, `#include ' ! specifies inclusion of a system header file named `x/*y'. ! ! However, if backslashes occur within FILE, they are considered ! ordinary text characters, not escape characters. None of the character ! escape sequences appropriate to string constants in C are processed. ! Thus, `#include "x\n\\y"' specifies a filename containing three ! backslashes. (Some systems interpret `\' as a pathname separator. All ! of these also interpret `/' the same way. It is most portable to use ! only `/'.) ! ! It is an error if there is anything (other than comments) on the line ! after the file name. ! !  ! File: cpp.info, Node: Include Operation, Next: Search Path, Prev: Include Syntax, Up: Header Files ! ! Include Operation ! ================= ! ! The `#include' directive works by directing the C preprocessor to ! scan the specified file as input before continuing with the rest of the ! current file. The output from the preprocessor contains the output ! already generated, followed by the output resulting from the included ! file, followed by the output that comes from the text after the ! `#include' directive. For example, if you have a header file ! `header.h' as follows, ! ! char *test (void); ! ! and a main program called `program.c' that uses the header file, like ! this, ! ! int x; ! #include "header.h" ! ! int ! main (void) ! { ! puts (test ()); ! } ! ! the compiler will see the same token stream as it would if `program.c' ! read ! ! int x; ! char *test (void); ! ! int ! main (void) ! { ! puts (test ()); ! } ! ! Included files are not limited to declarations and macro definitions; ! those are merely the typical uses. Any fragment of a C program can be ! included from another file. The include file could even contain the ! beginning of a statement that is concluded in the containing file, or ! the end of a statement that was started in the including file. However, ! an included file must consist of complete tokens. Comments and string ! literals which have not been closed by the end of an included file are ! invalid. For error recovery, they are considered to end at the end of ! the file. ! ! To avoid confusion, it is best if header files contain only complete ! syntactic units--function declarations or definitions, type ! declarations, etc. ! ! The line following the `#include' directive is always treated as a ! separate line by the C preprocessor, even if the included file lacks a ! final newline. ! !  ! File: cpp.info, Node: Search Path, Next: Once-Only Headers, Prev: Include Operation, Up: Header Files ! ! Search Path ! =========== ! ! GCC looks in several different places for headers. On a normal Unix ! system, if you do not instruct it otherwise, it will look for headers ! requested with `#include ' in: ! ! /usr/local/include ! /usr/lib/gcc-lib/TARGET/VERSION/include ! /usr/TARGET/include ! /usr/include ! ! For C++ programs, it will also look in `/usr/include/g++-v3', first. ! In the above, TARGET is the canonical name of the system GCC was ! configured to compile code for; often but not always the same as the ! canonical name of the system it runs on. VERSION is the version of GCC ! in use. ! ! You can add to this list with the `-IDIR' command line option. All ! the directories named by `-I' are searched, in left-to-right order, ! _before_ the default directories. The only exception is when `dir' is ! already searched by default. In this case, the option is ignored and ! the search order for system directories remains unchanged. ! ! Duplicate directories are removed from the quote and bracket search ! chains before the two chains are merged to make the final search chain. ! Thus, it is possible for a directory to occur twice in the final search ! chain if it was specified in both the quote and bracket chains. ! ! You can prevent GCC from searching any of the default directories ! with the `-nostdinc' option. This is useful when you are compiling an ! operating system kernel or some other program that does not use the ! standard C library facilities, or the standard C library itself. `-I' ! options are not ignored as described above when `-nostdinc' is in ! effect. ! ! GCC looks for headers requested with `#include "FILE"' first in the ! directory containing the current file, then in the same places it would ! have looked for a header requested with angle brackets. For example, ! if `/usr/include/sys/stat.h' contains `#include "types.h"', GCC looks ! for `types.h' first in `/usr/include/sys', then in its usual search ! path. ! ! `#line' (*note Line Control::) does not change GCC's idea of the ! directory containing the current file. ! ! You may put `-I-' at any point in your list of `-I' options. This ! has two effects. First, directories appearing before the `-I-' in the ! list are searched only for headers requested with quote marks. ! Directories after `-I-' are searched for all headers. Second, the ! directory containing the current file is not searched for anything, ! unless it happens to be one of the directories named by an `-I' switch. ! ! `-I. -I-' is not the same as no `-I' options at all, and does not ! cause the same behavior for `<>' includes that `""' includes get with ! no special options. `-I.' searches the compiler's current working ! directory for header files. That may or may not be the same as the ! directory containing the current file. ! ! If you need to look for headers in a directory named `-', write ! `-I./-'. ! ! There are several more ways to adjust the header search path. They ! are generally less useful. *Note Invocation::. ! !  ! File: cpp.info, Node: Once-Only Headers, Next: Computed Includes, Prev: Search Path, Up: Header Files ! ! Once-Only Headers ! ================= ! ! If a header file happens to be included twice, the compiler will ! process its contents twice. This is very likely to cause an error, ! e.g. when the compiler sees the same structure definition twice. Even ! if it does not, it will certainly waste time. ! ! The standard way to prevent this is to enclose the entire real ! contents of the file in a conditional, like this: ! ! /* File foo. */ ! #ifndef FILE_FOO_SEEN ! #define FILE_FOO_SEEN ! ! THE ENTIRE FILE ! ! #endif /* !FILE_FOO_SEEN */ ! ! This construct is commonly known as a "wrapper #ifndef". When the ! header is included again, the conditional will be false, because ! `FILE_FOO_SEEN' is defined. The preprocessor will skip over the entire ! contents of the file, and the compiler will not see it twice. ! ! CPP optimizes even further. It remembers when a header file has a ! wrapper `#ifndef'. If a subsequent `#include' specifies that header, ! and the macro in the `#ifndef' is still defined, it does not bother to ! rescan the file at all. ! ! You can put comments outside the wrapper. They will not interfere ! with this optimization. ! ! The macro `FILE_FOO_SEEN' is called the "controlling macro" or ! "guard macro". In a user header file, the macro name should not begin ! with `_'. In a system header file, it should begin with `__' to avoid ! conflicts with user programs. In any kind of header file, the macro ! name should contain the name of the file and some additional text, to ! avoid conflicts with other header files. ! !  ! File: cpp.info, Node: Computed Includes, Next: Wrapper Headers, Prev: Once-Only Headers, Up: Header Files ! ! Computed Includes ! ================= ! ! Sometimes it is necessary to select one of several different header ! files to be included into your program. They might specify ! configuration parameters to be used on different sorts of operating ! systems, for instance. You could do this with a series of conditionals, ! ! #if SYSTEM_1 ! # include "system_1.h" ! #elif SYSTEM_2 ! # include "system_2.h" ! #elif SYSTEM_3 ! ... ! #endif ! ! That rapidly becomes tedious. Instead, the preprocessor offers the ! ability to use a macro for the header name. This is called a "computed ! include". Instead of writing a header name as the direct argument of ! `#include', you simply put a macro name there instead: ! ! #define SYSTEM_H "system_1.h" ! ... ! #include SYSTEM_H ! ! `SYSTEM_H' will be expanded, and the preprocessor will look for ! `system_1.h' as if the `#include' had been written that way originally. ! `SYSTEM_H' could be defined by your Makefile with a `-D' option. ! ! You must be careful when you define the macro. `#define' saves ! tokens, not text. The preprocessor has no way of knowing that the macro ! will be used as the argument of `#include', so it generates ordinary ! tokens, not a header name. This is unlikely to cause problems if you ! use double-quote includes, which are close enough to string constants. ! If you use angle brackets, however, you may have trouble. ! ! The syntax of a computed include is actually a bit more general than ! the above. If the first non-whitespace character after `#include' is ! not `"' or `<', then the entire line is macro-expanded like running ! text would be. ! ! If the line expands to a single string constant, the contents of that ! string constant are the file to be included. CPP does not re-examine ! the string for embedded quotes, but neither does it process backslash ! escapes in the string. Therefore ! ! #define HEADER "a\"b" ! #include HEADER ! ! looks for a file named `a\"b'. CPP searches for the file according to ! the rules for double-quoted includes. ! ! If the line expands to a token stream beginning with a `<' token and ! including a `>' token, then the tokens between the `<' and the first ! `>' are combined to form the filename to be included. Any whitespace ! between tokens is reduced to a single space; then any space after the ! initial `<' is retained, but a trailing space before the closing `>' is ! ignored. CPP searches for the file according to the rules for ! angle-bracket includes. ! ! In either case, if there are any tokens on the line after the file ! name, an error occurs and the directive is not processed. It is also ! an error if the result of expansion does not match either of the two ! expected forms. ! ! These rules are implementation-defined behavior according to the C ! standard. To minimize the risk of different compilers interpreting your ! computed includes differently, we recommend you use only a single ! object-like macro which expands to a string constant. This will also ! minimize confusion for people reading your program. ! !  ! File: cpp.info, Node: Wrapper Headers, Next: System Headers, Prev: Computed Includes, Up: Header Files ! ! Wrapper Headers ! =============== ! ! Sometimes it is necessary to adjust the contents of a system-provided ! header file without editing it directly. GCC's `fixincludes' operation ! does this, for example. One way to do that would be to create a new ! header file with the same name and insert it in the search path before ! the original header. That works fine as long as you're willing to ! replace the old header entirely. But what if you want to refer to the ! old header from the new one? ! ! You cannot simply include the old header with `#include'. That will ! start from the beginning, and find your new header again. If your ! header is not protected from multiple inclusion (*note Once-Only ! Headers::), it will recurse infinitely and cause a fatal error. ! ! You could include the old header with an absolute pathname: ! #include "/usr/include/old-header.h" ! ! This works, but is not clean; should the system headers ever move, you ! would have to edit the new headers to match. ! ! There is no way to solve this problem within the C standard, but you ! can use the GNU extension `#include_next'. It means, "Include the ! _next_ file with this name." This directive works like `#include' ! except in searching for the specified file: it starts searching the ! list of header file directories _after_ the directory in which the ! current file was found. ! ! Suppose you specify `-I /usr/local/include', and the list of ! directories to search also includes `/usr/include'; and suppose both ! directories contain `signal.h'. Ordinary `#include ' finds ! the file under `/usr/local/include'. If that file contains ! `#include_next ', it starts searching after that directory, ! and finds the file in `/usr/include'. ! ! `#include_next' does not distinguish between `' and `"FILE"' ! inclusion, nor does it check that the file you specify has the same ! name as the current file. It simply looks for the file named, starting ! with the directory in the search path after the one where the current ! file was found. ! ! The use of `#include_next' can lead to great confusion. We ! recommend it be used only when there is no other alternative. In ! particular, it should not be used in the headers belonging to a specific ! program; it should be used only to make global corrections along the ! lines of `fixincludes'. ! !  ! File: cpp.info, Node: System Headers, Prev: Wrapper Headers, Up: Header Files ! ! System Headers ! ============== ! ! The header files declaring interfaces to the operating system and ! runtime libraries often cannot be written in strictly conforming C. ! Therefore, GCC gives code found in "system headers" special treatment. ! All warnings, other than those generated by `#warning' (*note ! Diagnostics::), are suppressed while GCC is processing a system header. ! Macros defined in a system header are immune to a few warnings ! wherever they are expanded. This immunity is granted on an ad-hoc ! basis, when we find that a warning generates lots of false positives ! because of code in macros defined in system headers. ! ! Normally, only the headers found in specific directories are ! considered system headers. These directories are determined when GCC ! is compiled. There are, however, two ways to make normal headers into ! system headers. ! ! The `-isystem' command line option adds its argument to the list of ! directories to search for headers, just like `-I'. Any headers found ! in that directory will be considered system headers. ! ! All directories named by `-isystem' are searched _after_ all ! directories named by `-I', no matter what their order was on the ! command line. If the same directory is named by both `-I' and ! `-isystem', the `-I' option is ignored. GCC provides an informative ! message when this occurs if `-v' is used. ! ! There is also a directive, `#pragma GCC system_header', which tells ! GCC to consider the rest of the current include file a system header, ! no matter where it was found. Code that comes before the `#pragma' in ! the file will not be affected. `#pragma GCC system_header' has no ! effect in the primary source file. ! ! On very old systems, some of the pre-defined system header ! directories get even more special treatment. GNU C++ considers code in ! headers found in those directories to be surrounded by an `extern "C"' ! block. There is no way to request this behavior with a `#pragma', or ! from the command line. ! !  ! File: cpp.info, Node: Macros, Next: Conditionals, Prev: Header Files, Up: Top ! ! Macros ! ****** ! ! A "macro" is a fragment of code which has been given a name. ! Whenever the name is used, it is replaced by the contents of the macro. ! There are two kinds of macros. They differ mostly in what they look ! like when they are used. "Object-like" macros resemble data objects ! when used, "function-like" macros resemble function calls. ! ! You may define any valid identifier as a macro, even if it is a C ! keyword. The preprocessor does not know anything about keywords. This ! can be useful if you wish to hide a keyword such as `const' from an ! older compiler that does not understand it. However, the preprocessor ! operator `defined' (*note Defined::) can never be defined as a macro, ! and C++'s named operators (*note C++ Named Operators::) cannot be ! macros when you are compiling C++. ! ! * Menu: ! ! * Object-like Macros:: ! * Function-like Macros:: ! * Macro Arguments:: ! * Stringification:: ! * Concatenation:: ! * Variadic Macros:: ! * Predefined Macros:: ! * Undefining and Redefining Macros:: ! * Directives Within Macro Arguments:: ! * Macro Pitfalls:: ! !  ! File: cpp.info, Node: Object-like Macros, Next: Function-like Macros, Up: Macros ! ! Object-like Macros ! ================== ! ! An "object-like macro" is a simple identifier which will be replaced ! by a code fragment. It is called object-like because it looks like a ! data object in code that uses it. They are most commonly used to give ! symbolic names to numeric constants. ! ! You create macros with the `#define' directive. `#define' is ! followed by the name of the macro and then the token sequence it should ! be an abbreviation for, which is variously referred to as the macro's ! "body", "expansion" or "replacement list". For example, ! ! #define BUFFER_SIZE 1024 ! ! defines a macro named `BUFFER_SIZE' as an abbreviation for the token ! `1024'. If somewhere after this `#define' directive there comes a C ! statement of the form ! ! foo = (char *) malloc (BUFFER_SIZE); ! ! then the C preprocessor will recognize and "expand" the macro ! `BUFFER_SIZE'. The C compiler will see the same tokens as it would if ! you had written ! ! foo = (char *) malloc (1024); ! ! By convention, macro names are written in upper case. Programs are ! easier to read when it is possible to tell at a glance which names are ! macros. ! ! The macro's body ends at the end of the `#define' line. You may ! continue the definition onto multiple lines, if necessary, using ! backslash-newline. When the macro is expanded, however, it will all ! come out on one line. For example, ! ! #define NUMBERS 1, \ ! 2, \ ! 3 ! int x[] = { NUMBERS }; ! ==> int x[] = { 1, 2, 3 }; ! ! The most common visible consequence of this is surprising line numbers ! in error messages. ! ! There is no restriction on what can go in a macro body provided it ! decomposes into valid preprocessing tokens. Parentheses need not ! balance, and the body need not resemble valid C code. (If it does not, ! you may get error messages from the C compiler when you use the macro.) ! ! The C preprocessor scans your program sequentially. Macro ! definitions take effect at the place you write them. Therefore, the ! following input to the C preprocessor ! ! foo = X; ! #define X 4 ! bar = X; ! ! produces ! ! foo = X; ! bar = 4; ! ! When the preprocessor expands a macro name, the macro's expansion ! replaces the macro invocation, then the expansion is examined for more ! macros to expand. For example, ! ! #define TABLESIZE BUFSIZE ! #define BUFSIZE 1024 ! TABLESIZE ! ==> BUFSIZE ! ==> 1024 ! ! `TABLESIZE' is expanded first to produce `BUFSIZE', then that macro is ! expanded to produce the final result, `1024'. ! ! Notice that `BUFSIZE' was not defined when `TABLESIZE' was defined. ! The `#define' for `TABLESIZE' uses exactly the expansion you ! specify--in this case, `BUFSIZE'--and does not check to see whether it ! too contains macro names. Only when you _use_ `TABLESIZE' is the ! result of its expansion scanned for more macro names. ! ! This makes a difference if you change the definition of `BUFSIZE' at ! some point in the source file. `TABLESIZE', defined as shown, will ! always expand using the definition of `BUFSIZE' that is currently in ! effect: ! ! #define BUFSIZE 1020 ! #define TABLESIZE BUFSIZE ! #undef BUFSIZE ! #define BUFSIZE 37 ! ! Now `TABLESIZE' expands (in two stages) to `37'. ! ! If the expansion of a macro contains its own name, either directly or ! via intermediate macros, it is not expanded again when the expansion is ! examined for more macros. This prevents infinite recursion. *Note ! Self-Referential Macros::, for the precise details. ! !  ! File: cpp.info, Node: Function-like Macros, Next: Macro Arguments, Prev: Object-like Macros, Up: Macros ! ! Function-like Macros ! ==================== ! ! You can also define macros whose use looks like a function call. ! These are called "function-like macros". To define a function-like ! macro, you use the same `#define' directive, but you put a pair of ! parentheses immediately after the macro name. For example, ! ! #define lang_init() c_init() ! lang_init() ! ==> c_init() ! ! A function-like macro is only expanded if its name appears with a ! pair of parentheses after it. If you write just the name, it is left ! alone. This can be useful when you have a function and a macro of the ! same name, and you wish to use the function sometimes. ! ! extern void foo(void); ! #define foo() /* optimized inline version */ ! ... ! foo(); ! funcptr = foo; ! ! Here the call to `foo()' will use the macro, but the function ! pointer will get the address of the real function. If the macro were to ! be expanded, it would cause a syntax error. ! ! If you put spaces between the macro name and the parentheses in the ! macro definition, that does not define a function-like macro, it defines ! an object-like macro whose expansion happens to begin with a pair of ! parentheses. ! ! #define lang_init () c_init() ! lang_init() ! ==> () c_init()() ! ! The first two pairs of parentheses in this expansion come from the ! macro. The third is the pair that was originally after the macro ! invocation. Since `lang_init' is an object-like macro, it does not ! consume those parentheses. ! !  ! File: cpp.info, Node: Macro Arguments, Next: Stringification, Prev: Function-like Macros, Up: Macros ! ! Macro Arguments ! =============== ! ! Function-like macros can take "arguments", just like true functions. ! To define a macro that uses arguments, you insert "parameters" between ! the pair of parentheses in the macro definition that make the macro ! function-like. The parameters must be valid C identifiers, separated ! by commas and optionally whitespace. ! ! To invoke a macro that takes arguments, you write the name of the ! macro followed by a list of "actual arguments" in parentheses, separated ! by commas. The invocation of the macro need not be restricted to a ! single logical line--it can cross as many lines in the source file as ! you wish. The number of arguments you give must match the number of ! parameters in the macro definition. When the macro is expanded, each ! use of a parameter in its body is replaced by the tokens of the ! corresponding argument. (You need not use all of the parameters in the ! macro body.) ! ! As an example, here is a macro that computes the minimum of two ! numeric values, as it is defined in many C programs, and some uses. ! ! #define min(X, Y) ((X) < (Y) ? (X) : (Y)) ! x = min(a, b); ==> x = ((a) < (b) ? (a) : (b)); ! y = min(1, 2); ==> y = ((1) < (2) ? (1) : (2)); ! z = min(a + 28, *p); ==> z = ((a + 28) < (*p) ? (a + 28) : (*p)); ! ! (In this small example you can already see several of the dangers of ! macro arguments. *Note Macro Pitfalls::, for detailed explanations.) ! ! Leading and trailing whitespace in each argument is dropped, and all ! whitespace between the tokens of an argument is reduced to a single ! space. Parentheses within each argument must balance; a comma within ! such parentheses does not end the argument. However, there is no ! requirement for square brackets or braces to balance, and they do not ! prevent a comma from separating arguments. Thus, ! ! macro (array[x = y, x + 1]) ! ! passes two arguments to `macro': `array[x = y' and `x + 1]'. If you ! want to supply `array[x = y, x + 1]' as an argument, you can write it ! as `array[(x = y, x + 1)]', which is equivalent C code. ! ! All arguments to a macro are completely macro-expanded before they ! are substituted into the macro body. After substitution, the complete ! text is scanned again for macros to expand, including the arguments. ! This rule may seem strange, but it is carefully designed so you need ! not worry about whether any function call is actually a macro ! invocation. You can run into trouble if you try to be too clever, ! though. *Note Argument Prescan::, for detailed discussion. ! ! For example, `min (min (a, b), c)' is first expanded to ! ! min (((a) < (b) ? (a) : (b)), (c)) ! ! and then to ! ! ((((a) < (b) ? (a) : (b))) < (c) ! ? (((a) < (b) ? (a) : (b))) ! : (c)) ! ! (Line breaks shown here for clarity would not actually be generated.) ! ! You can leave macro arguments empty; this is not an error to the ! preprocessor (but many macros will then expand to invalid code). You ! cannot leave out arguments entirely; if a macro takes two arguments, ! there must be exactly one comma at the top level of its argument list. ! Here are some silly examples using `min': ! ! min(, b) ==> (( ) < (b) ? ( ) : (b)) ! min(a, ) ==> ((a ) < ( ) ? (a ) : ( )) ! min(,) ==> (( ) < ( ) ? ( ) : ( )) ! min((,),) ==> (((,)) < ( ) ? ((,)) : ( )) ! ! min() error--> macro "min" requires 2 arguments, but only 1 given ! min(,,) error--> macro "min" passed 3 arguments, but takes just 2 ! ! Whitespace is not a preprocessing token, so if a macro `foo' takes ! one argument, `foo ()' and `foo ( )' both supply it an empty argument. ! Previous GNU preprocessor implementations and documentation were ! incorrect on this point, insisting that a function-like macro that ! takes a single argument be passed a space if an empty argument was ! required. ! ! Macro parameters appearing inside string literals are not replaced by ! their corresponding actual arguments. ! ! #define foo(x) x, "x" ! foo(bar) ==> bar, "x" ! !  ! File: cpp.info, Node: Stringification, Next: Concatenation, Prev: Macro Arguments, Up: Macros ! ! Stringification ! =============== ! ! Sometimes you may want to convert a macro argument into a string ! constant. Parameters are not replaced inside string constants, but you ! can use the `#' preprocessing operator instead. When a macro parameter ! is used with a leading `#', the preprocessor replaces it with the ! literal text of the actual argument, converted to a string constant. ! Unlike normal parameter replacement, the argument is not macro-expanded ! first. This is called "stringification". ! ! There is no way to combine an argument with surrounding text and ! stringify it all together. Instead, you can write a series of adjacent ! string constants and stringified arguments. The preprocessor will ! replace the stringified arguments with string constants. The C ! compiler will then combine all the adjacent string constants into one ! long string. ! ! Here is an example of a macro definition that uses stringification: ! ! #define WARN_IF(EXP) \ ! do { if (EXP) \ ! fprintf (stderr, "Warning: " #EXP "\n"); } \ ! while (0) ! WARN_IF (x == 0); ! ==> do { if (x == 0) ! fprintf (stderr, "Warning: " "x == 0" "\n"); } while (0); ! ! The argument for `EXP' is substituted once, as-is, into the `if' ! statement, and once, stringified, into the argument to `fprintf'. If ! `x' were a macro, it would be expanded in the `if' statement, but not ! in the string. ! ! The `do' and `while (0)' are a kludge to make it possible to write ! `WARN_IF (ARG);', which the resemblance of `WARN_IF' to a function ! would make C programmers want to do; see *Note Swallowing the ! Semicolon::. ! ! Stringification in C involves more than putting double-quote ! characters around the fragment. The preprocessor backslash-escapes the ! quotes surrounding embedded string constants, and all backslashes ! within string and character constants, in order to get a valid C string ! constant with the proper contents. Thus, stringifying `p = "foo\n";' ! results in "p = \"foo\\n\";". However, backslashes that are not inside ! string or character constants are not duplicated: `\n' by itself ! stringifies to "\n". ! ! All leading and trailing whitespace in text being stringified is ! ignored. Any sequence of whitespace in the middle of the text is ! converted to a single space in the stringified result. Comments are ! replaced by whitespace long before stringification happens, so they ! never appear in stringified text. ! ! There is no way to convert a macro argument into a character ! constant. ! ! If you want to stringify the result of expansion of a macro argument, ! you have to use two levels of macros. ! ! #define xstr(s) str(s) ! #define str(s) #s ! #define foo 4 ! str (foo) ! ==> "foo" ! xstr (foo) ! ==> xstr (4) ! ==> str (4) ! ==> "4" ! ! `s' is stringified when it is used in `str', so it is not ! macro-expanded first. But `s' is an ordinary argument to `xstr', so it ! is completely macro-expanded before `xstr' itself is expanded (*note ! Argument Prescan::). Therefore, by the time `str' gets to its ! argument, it has already been macro-expanded. ! !  ! File: cpp.info, Node: Concatenation, Next: Variadic Macros, Prev: Stringification, Up: Macros ! ! Concatenation ! ============= ! ! It is often useful to merge two tokens into one while expanding ! macros. This is called "token pasting" or "token concatenation". The ! `##' preprocessing operator performs token pasting. When a macro is ! expanded, the two tokens on either side of each `##' operator are ! combined into a single token, which then replaces the `##' and the two ! original tokens in the macro expansion. Usually both will be ! identifiers, or one will be an identifier and the other a preprocessing ! number. When pasted, they make a longer identifier. This isn't the ! only valid case. It is also possible to concatenate two numbers (or a ! number and a name, such as `1.5' and `e3') into a number. Also, ! multi-character operators such as `+=' can be formed by token pasting. ! ! However, two tokens that don't together form a valid token cannot be ! pasted together. For example, you cannot concatenate `x' with `+' in ! either order. If you try, the preprocessor issues a warning and emits ! the two tokens. Whether it puts white space between the tokens is ! undefined. It is common to find unnecessary uses of `##' in complex ! macros. If you get this warning, it is likely that you can simply ! remove the `##'. ! ! Both the tokens combined by `##' could come from the macro body, but ! you could just as well write them as one token in the first place. ! Token pasting is most useful when one or both of the tokens comes from a ! macro argument. If either of the tokens next to an `##' is a parameter ! name, it is replaced by its actual argument before `##' executes. As ! with stringification, the actual argument is not macro-expanded first. ! If the argument is empty, that `##' has no effect. ! ! Keep in mind that the C preprocessor converts comments to whitespace ! before macros are even considered. Therefore, you cannot create a ! comment by concatenating `/' and `*'. You can put as much whitespace ! between `##' and its operands as you like, including comments, and you ! can put comments in arguments that will be concatenated. However, it ! is an error if `##' appears at either end of a macro body. ! ! Consider a C program that interprets named commands. There probably ! needs to be a table of commands, perhaps an array of structures declared ! as follows: ! ! struct command ! { ! char *name; ! void (*function) (void); ! }; ! ! struct command commands[] = ! { ! { "quit", quit_command }, ! { "help", help_command }, ! ... ! }; ! ! It would be cleaner not to have to give each command name twice, ! once in the string constant and once in the function name. A macro ! which takes the name of a command as an argument can make this ! unnecessary. The string constant can be created with stringification, ! and the function name by concatenating the argument with `_command'. ! Here is how it is done: ! ! #define COMMAND(NAME) { #NAME, NAME ## _command } ! ! struct command commands[] = ! { ! COMMAND (quit), ! COMMAND (help), ! ... ! }; ! !  ! File: cpp.info, Node: Variadic Macros, Next: Predefined Macros, Prev: Concatenation, Up: Macros ! ! Variadic Macros ! =============== ! ! A macro can be declared to accept a variable number of arguments ! much as a function can. The syntax for defining the macro is similar ! to that of a function. Here is an example: ! ! #define eprintf(...) fprintf (stderr, __VA_ARGS__) ! ! This kind of macro is called "variadic". When the macro is invoked, ! all the tokens in its argument list after the last named argument (this ! macro has none), including any commas, become the "variable argument". ! This sequence of tokens replaces the identifier `__VA_ARGS__' in the ! macro body wherever it appears. Thus, we have this expansion: ! ! eprintf ("%s:%d: ", input_file, lineno) ! ==> fprintf (stderr, "%s:%d: ", input_file, lineno) ! ! The variable argument is completely macro-expanded before it is ! inserted into the macro expansion, just like an ordinary argument. You ! may use the `#' and `##' operators to stringify the variable argument ! or to paste its leading or trailing token with another token. (But see ! below for an important special case for `##'.) ! ! If your macro is complicated, you may want a more descriptive name ! for the variable argument than `__VA_ARGS__'. CPP permits this, as an ! extension. You may write an argument name immediately before the ! `...'; that name is used for the variable argument. The `eprintf' ! macro above could be written ! ! #define eprintf(args...) fprintf (stderr, args) ! ! using this extension. You cannot use `__VA_ARGS__' and this extension ! in the same macro. ! ! You can have named arguments as well as variable arguments in a ! variadic macro. We could define `eprintf' like this, instead: ! ! #define eprintf(format, ...) fprintf (stderr, format, __VA_ARGS__) ! ! This formulation looks more descriptive, but unfortunately it is less ! flexible: you must now supply at least one argument after the format ! string. In standard C, you cannot omit the comma separating the named ! argument from the variable arguments. Furthermore, if you leave the ! variable argument empty, you will get a syntax error, because there ! will be an extra comma after the format string. ! ! eprintf("success!\n", ); ! ==> fprintf(stderr, "success!\n", ); ! ! GNU CPP has a pair of extensions which deal with this problem. ! First, you are allowed to leave the variable argument out entirely: ! ! eprintf ("success!\n") ! ==> fprintf(stderr, "success!\n", ); ! ! Second, the `##' token paste operator has a special meaning when placed ! between a comma and a variable argument. If you write ! ! #define eprintf(format, ...) fprintf (stderr, format, ##__VA_ARGS__) ! ! and the variable argument is left out when the `eprintf' macro is used, ! then the comma before the `##' will be deleted. This does _not_ happen ! if you pass an empty argument, nor does it happen if the token ! preceding `##' is anything other than a comma. ! ! eprintf ("success!\n") ! ==> fprintf(stderr, "success!\n"); ! ! The above explanation is ambiguous about the case where the only macro ! parameter is a variable arguments parameter, as it is meaningless to ! try to distinguish whether no argument at all is an empty argument or a ! missing argument. In this case the C99 standard is clear that the ! comma must remain, however the existing GCC extension used to swallow ! the comma. So CPP retains the comma when conforming to a specific C ! standard, and drops it otherwise. ! ! C99 mandates that the only place the identifier `__VA_ARGS__' can ! appear is in the replacement list of a variadic macro. It may not be ! used as a macro name, macro argument name, or within a different type ! of macro. It may also be forbidden in open text; the standard is ! ambiguous. We recommend you avoid using it except for its defined ! purpose. ! ! Variadic macros are a new feature in C99. GNU CPP has supported them ! for a long time, but only with a named variable argument (`args...', ! not `...' and `__VA_ARGS__'). If you are concerned with portability to ! previous versions of GCC, you should use only named variable arguments. ! On the other hand, if you are concerned with portability to other ! conforming implementations of C99, you should use only `__VA_ARGS__'. ! ! Previous versions of CPP implemented the comma-deletion extension ! much more generally. We have restricted it in this release to minimize ! the differences from C99. To get the same effect with both this and ! previous versions of GCC, the token preceding the special `##' must be ! a comma, and there must be white space between that comma and whatever ! comes immediately before it: ! ! #define eprintf(format, args...) fprintf (stderr, format , ##args) ! ! *Note Differences from previous versions::, for the gory details. ! !  ! File: cpp.info, Node: Predefined Macros, Next: Undefining and Redefining Macros, Prev: Variadic Macros, Up: Macros ! ! Predefined Macros ! ================= ! ! Several object-like macros are predefined; you use them without ! supplying their definitions. They fall into three classes: standard, ! common, and system-specific. ! ! In C++, there is a fourth category, the named operators. They act ! like predefined macros, but you cannot undefine them. ! ! * Menu: ! ! * Standard Predefined Macros:: ! * Common Predefined Macros:: ! * System-specific Predefined Macros:: ! * C++ Named Operators:: ! !  ! File: cpp.info, Node: Standard Predefined Macros, Next: Common Predefined Macros, Up: Predefined Macros ! ! Standard Predefined Macros ! -------------------------- ! ! The standard predefined macros are specified by the C and/or C++ ! language standards, so they are available with all compilers that ! implement those standards. Older compilers may not provide all of ! them. Their names all start with double underscores. ! ! `__FILE__' ! This macro expands to the name of the current input file, in the ! form of a C string constant. This is the path by which the ! preprocessor opened the file, not the short name specified in ! `#include' or as the input file name argument. For example, ! `"/usr/local/include/myheader.h"' is a possible expansion of this ! macro. ! ! `__LINE__' ! This macro expands to the current input line number, in the form ! of a decimal integer constant. While we call it a predefined ! macro, it's a pretty strange macro, since its "definition" changes ! with each new line of source code. ! ! `__FILE__' and `__LINE__' are useful in generating an error message ! to report an inconsistency detected by the program; the message can ! state the source line at which the inconsistency was detected. For ! example, ! ! fprintf (stderr, "Internal error: " ! "negative string length " ! "%d at %s, line %d.", ! length, __FILE__, __LINE__); ! ! An `#include' directive changes the expansions of `__FILE__' and ! `__LINE__' to correspond to the included file. At the end of that ! file, when processing resumes on the input file that contained the ! `#include' directive, the expansions of `__FILE__' and `__LINE__' ! revert to the values they had before the `#include' (but `__LINE__' is ! then incremented by one as processing moves to the line after the ! `#include'). ! ! A `#line' directive changes `__LINE__', and may change `__FILE__' as ! well. *Note Line Control::. ! ! C99 introduces `__func__', and GCC has provided `__FUNCTION__' for a ! long time. Both of these are strings containing the name of the ! current function (there are slight semantic differences; see the GCC ! manual). Neither of them is a macro; the preprocessor does not know the ! name of the current function. They tend to be useful in conjunction ! with `__FILE__' and `__LINE__', though. ! ! `__DATE__' ! This macro expands to a string constant that describes the date on ! which the preprocessor is being run. The string constant contains ! eleven characters and looks like `"Feb 12 1996"'. If the day of ! the month is less than 10, it is padded with a space on the left. ! ! If GCC cannot determine the current date, it will emit a warning ! message (once per compilation) and `__DATE__' will expand to ! `"??? ?? ????"'. ! ! `__TIME__' ! This macro expands to a string constant that describes the time at ! which the preprocessor is being run. The string constant contains ! eight characters and looks like `"23:59:01"'. ! ! If GCC cannot determine the current time, it will emit a warning ! message (once per compilation) and `__TIME__' will expand to ! `"??:??:??"'. ! ! `__STDC__' ! In normal operation, this macro expands to the constant 1, to ! signify that this compiler conforms to ISO Standard C. If GNU CPP ! is used with a compiler other than GCC, this is not necessarily ! true; however, the preprocessor always conforms to the standard ! unless the `-traditional-cpp' option is used. ! ! This macro is not defined if the `-traditional-cpp' option is used. ! ! On some hosts, the system compiler uses a different convention, ! where `__STDC__' is normally 0, but is 1 if the user specifies ! strict conformance to the C Standard. CPP follows the host ! convention when processing system header files, but when ! processing user files `__STDC__' is always 1. This has been ! reported to cause problems; for instance, some versions of Solaris ! provide X Windows headers that expect `__STDC__' to be either ! undefined or 1. *Note Invocation::. ! ! `__STDC_VERSION__' ! This macro expands to the C Standard's version number, a long ! integer constant of the form `YYYYMML' where YYYY and MM are the ! year and month of the Standard version. This signifies which ! version of the C Standard the compiler conforms to. Like ! `__STDC__', this is not necessarily accurate for the entire ! implementation, unless GNU CPP is being used with GCC. ! ! The value `199409L' signifies the 1989 C standard as amended in ! 1994, which is the current default; the value `199901L' signifies ! the 1999 revision of the C standard. Support for the 1999 ! revision is not yet complete. ! ! This macro is not defined if the `-traditional-cpp' option is ! used, nor when compiling C++ or Objective-C. ! ! `__STDC_HOSTED__' ! This macro is defined, with value 1, if the compiler's target is a ! "hosted environment". A hosted environment has the complete ! facilities of the standard C library available. ! ! `__cplusplus' ! This macro is defined when the C++ compiler is in use. You can use ! `__cplusplus' to test whether a header is compiled by a C compiler ! or a C++ compiler. This macro is similar to `__STDC_VERSION__', in ! that it expands to a version number. A fully conforming ! implementation of the 1998 C++ standard will define this macro to ! `199711L'. The GNU C++ compiler is not yet fully conforming, so ! it uses `1' instead. We hope to complete our implementation in ! the near future. ! !  ! File: cpp.info, Node: Common Predefined Macros, Next: System-specific Predefined Macros, Prev: Standard Predefined Macros, Up: Predefined Macros ! ! Common Predefined Macros ! ------------------------ ! ! The common predefined macros are GNU C extensions. They are ! available with the same meanings regardless of the machine or operating ! system on which you are using GNU C. Their names all start with double ! underscores. ! ! `__GNUC__' ! `__GNUC_MINOR__' ! `__GNUC_PATCHLEVEL__' ! These macros are defined by all GNU compilers that use the C ! preprocessor: C, C++, and Objective-C. Their values are the major ! version, minor version, and patch level of the compiler, as integer ! constants. For example, GCC 3.2.1 will define `__GNUC__' to 3, ! `__GNUC_MINOR__' to 2, and `__GNUC_PATCHLEVEL__' to 1. They are ! defined only when the entire compiler is in use; if you invoke the ! preprocessor directly, they are not defined. ! ! `__GNUC_PATCHLEVEL__' is new to GCC 3.0; it is also present in the ! widely-used development snapshots leading up to 3.0 (which identify ! themselves as GCC 2.96 or 2.97, depending on which snapshot you ! have). ! ! If all you need to know is whether or not your program is being ! compiled by GCC, you can simply test `__GNUC__'. If you need to ! write code which depends on a specific version, you must be more ! careful. Each time the minor version is increased, the patch ! level is reset to zero; each time the major version is increased ! (which happens rarely), the minor version and patch level are ! reset. If you wish to use the predefined macros directly in the ! conditional, you will need to write it like this: ! ! /* Test for GCC > 3.2.0 */ ! #if __GNUC__ > 3 || \ ! (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \ ! (__GNUC_MINOR__ == 2 && \ ! __GNUC_PATCHLEVEL__ > 0)) ! ! Another approach is to use the predefined macros to calculate a ! single number, then compare that against a threshold: ! ! #define GCC_VERSION (__GNUC__ * 10000 \ ! + __GNUC_MINOR__ * 100 \ ! + __GNUC_PATCHLEVEL__) ! ... ! /* Test for GCC > 3.2.0 */ ! #if GCC_VERSION > 30200 ! ! Many people find this form easier to understand. ! ! `__OBJC__' ! This macro is defined, with value 1, when the Objective-C compiler ! is in use. You can use `__OBJC__' to test whether a header is ! compiled by a C compiler or a Objective-C compiler. ! ! `__GNUG__' ! The GNU C++ compiler defines this. Testing it is equivalent to ! testing `(__GNUC__ && __cplusplus)'. ! ! `__STRICT_ANSI__' ! GCC defines this macro if and only if the `-ansi' switch, or a ! `-std' switch specifying strict conformance to some version of ISO ! C, was specified when GCC was invoked. It is defined to `1'. ! This macro exists primarily to direct GNU libc's header files to ! restrict their definitions to the minimal set found in the 1989 C ! standard. ! ! `__BASE_FILE__' ! This macro expands to the name of the main input file, in the form ! of a C string constant. This is the source file that was specified ! on the command line of the preprocessor or C compiler. ! ! `__INCLUDE_LEVEL__' ! This macro expands to a decimal integer constant that represents ! the depth of nesting in include files. The value of this macro is ! incremented on every `#include' directive and decremented at the ! end of every included file. It starts out at 0, it's value within ! the base file specified on the command line. ! ! `__VERSION__' ! This macro expands to a string constant which describes the ! version of the compiler in use. You should not rely on its ! contents having any particular form, but it can be counted on to ! contain at least the release number. ! ! `__OPTIMIZE__' ! `__OPTIMIZE_SIZE__' ! `__NO_INLINE__' ! These macros describe the compilation mode. `__OPTIMIZE__' is ! defined in all optimizing compilations. `__OPTIMIZE_SIZE__' is ! defined if the compiler is optimizing for size, not speed. ! `__NO_INLINE__' is defined if no functions will be inlined into ! their callers (when not optimizing, or when inlining has been ! specifically disabled by `-fno-inline'). ! ! These macros cause certain GNU header files to provide optimized ! definitions, using macros or inline functions, of system library ! functions. You should not use these macros in any way unless you ! make sure that programs will execute with the same effect whether ! or not they are defined. If they are defined, their value is 1. ! ! `__CHAR_UNSIGNED__' ! GCC defines this macro if and only if the data type `char' is ! unsigned on the target machine. It exists to cause the standard ! header file `limits.h' to work correctly. You should not use this ! macro yourself; instead, refer to the standard macros defined in ! `limits.h'. ! ! `__WCHAR_UNSIGNED__' ! Like `__CHAR_UNSIGNED__', this macro is defined if and only if the ! data type `wchar_t' is unsigned and the front-end is in C++ mode. ! ! `__REGISTER_PREFIX__' ! This macro expands to a single token (not a string constant) which ! is the prefix applied to CPU register names in assembly language ! for this target. You can use it to write assembly that is usable ! in multiple environments. For example, in the `m68k-aout' ! environment it expands to nothing, but in the `m68k-coff' ! environment it expands to a single `%'. ! ! `__USER_LABEL_PREFIX__' ! This macro expands to a single token which is the prefix applied to ! user labels (symbols visible to C code) in assembly. For example, ! in the `m68k-aout' environment it expands to an `_', but in the ! `m68k-coff' environment it expands to nothing. ! ! This macro will have the correct definition even if ! `-f(no-)underscores' is in use, but it will not be correct if ! target-specific options that adjust this prefix are used (e.g. the ! OSF/rose `-mno-underscores' option). ! ! `__SIZE_TYPE__' ! `__PTRDIFF_TYPE__' ! `__WCHAR_TYPE__' ! `__WINT_TYPE__' ! These macros are defined to the correct underlying types for the ! `size_t', `ptrdiff_t', `wchar_t', and `wint_t' typedefs, ! respectively. They exist to make the standard header files ! `stddef.h' and `wchar.h' work correctly. You should not use these ! macros directly; instead, include the appropriate headers and use ! the typedefs. ! ! `__CHAR_BIT__' ! Defined to the number of bits used in the representation of the ! `char' data type. It exists to make the standard header given ! numerical limits work correctly. You should not use this macro ! directly; instead, include the appropriate headers. ! ! `__SCHAR_MAX__' ! `__WCHAR_MAX__' ! `__SHRT_MAX__' ! `__INT_MAX__' ! `__LONG_MAX__' ! `__LONG_LONG_MAX__' ! Defined to the maximum value of the `signed char', `wchar_t', ! `signed short', `signed int', `signed long', and `signed long ! long' types respectively. They exist to make the standard header ! given numerical limits work correctly. You should not use these ! macros directly; instead, include the appropriate headers. ! ! `__USING_SJLJ_EXCEPTIONS__' ! This macro is defined, with value 1, if the compiler uses the old ! mechanism based on `setjmp' and `longjmp' for exception handling. ! ! `__NEXT_RUNTIME__' ! This macro is defined, with value 1, if (and only if) the NeXT ! runtime (as in `-fnext-runtime') is in use for Objective-C. If ! the GNU runtime is used, this macro is not defined, so that you ! can use this macro to determine which runtime (NeXT or GNU) is ! being used. ! !  ! File: cpp.info, Node: System-specific Predefined Macros, Next: C++ Named Operators, Prev: Common Predefined Macros, Up: Predefined Macros ! ! System-specific Predefined Macros ! --------------------------------- ! ! The C preprocessor normally predefines several macros that indicate ! what type of system and machine is in use. They are obviously ! different on each target supported by GCC. This manual, being for all ! systems and machines, cannot tell you what their names are, but you can ! use `cpp -dM' to see them all. *Note Invocation::. All system-specific ! predefined macros expand to the constant 1, so you can test them with ! either `#ifdef' or `#if'. ! ! The C standard requires that all system-specific macros be part of ! the "reserved namespace". All names which begin with two underscores, ! or an underscore and a capital letter, are reserved for the compiler and ! library to use as they wish. However, historically system-specific ! macros have had names with no special prefix; for instance, it is common ! to find `unix' defined on Unix systems. For all such macros, GCC ! provides a parallel macro with two underscores added at the beginning ! and the end. If `unix' is defined, `__unix__' will be defined too. ! There will never be more than two underscores; the parallel of `_mips' ! is `__mips__'. ! ! When the `-ansi' option, or any `-std' option that requests strict ! conformance, is given to the compiler, all the system-specific ! predefined macros outside the reserved namespace are suppressed. The ! parallel macros, inside the reserved namespace, remain defined. ! ! We are slowly phasing out all predefined macros which are outside the ! reserved namespace. You should never use them in new programs, and we ! encourage you to correct older code to use the parallel macros whenever ! you find it. We don't recommend you use the system-specific macros that ! are in the reserved namespace, either. It is better in the long run to ! check specifically for features you need, using a tool such as ! `autoconf'. ! !  ! File: cpp.info, Node: C++ Named Operators, Prev: System-specific Predefined Macros, Up: Predefined Macros ! ! C++ Named Operators ! ------------------- ! ! In C++, there are eleven keywords which are simply alternate ! spellings of operators normally written with punctuation. These ! keywords are treated as such even in the preprocessor. They function ! as operators in `#if', and they cannot be defined as macros or ! poisoned. In C, you can request that those keywords take their C++ ! meaning by including `iso646.h'. That header defines each one as a ! normal object-like macro expanding to the appropriate punctuator. ! ! These are the named operators and their corresponding punctuators: ! ! Named Operator Punctuator ! `and' `&&' ! `and_eq' `&=' ! `bitand' `&' ! `bitor' `|' ! `compl' `~' ! `not' `!' ! `not_eq' `!=' ! `or' `||' ! `or_eq' `|=' ! `xor' `^' ! `xor_eq' `^=' ! !  ! File: cpp.info, Node: Undefining and Redefining Macros, Next: Directives Within Macro Arguments, Prev: Predefined Macros, Up: Macros ! ! Undefining and Redefining Macros ! ================================ ! ! If a macro ceases to be useful, it may be "undefined" with the ! `#undef' directive. `#undef' takes a single argument, the name of the ! macro to undefine. You use the bare macro name, even if the macro is ! function-like. It is an error if anything appears on the line after ! the macro name. `#undef' has no effect if the name is not a macro. ! ! #define FOO 4 ! x = FOO; ==> x = 4; ! #undef FOO ! x = FOO; ==> x = FOO; ! ! Once a macro has been undefined, that identifier may be "redefined" ! as a macro by a subsequent `#define' directive. The new definition ! need not have any resemblance to the old definition. ! ! However, if an identifier which is currently a macro is redefined, ! then the new definition must be "effectively the same" as the old one. ! Two macro definitions are effectively the same if: ! * Both are the same type of macro (object- or function-like). ! ! * All the tokens of the replacement list are the same. ! ! * If there are any parameters, they are the same. ! ! * Whitespace appears in the same places in both. It need not be ! exactly the same amount of whitespace, though. Remember that ! comments count as whitespace. ! ! These definitions are effectively the same: ! #define FOUR (2 + 2) ! #define FOUR (2 + 2) ! #define FOUR (2 /* two */ + 2) ! ! but these are not: ! #define FOUR (2 + 2) ! #define FOUR ( 2+2 ) ! #define FOUR (2 * 2) ! #define FOUR(score,and,seven,years,ago) (2 + 2) ! ! If a macro is redefined with a definition that is not effectively the ! same as the old one, the preprocessor issues a warning and changes the ! macro to use the new definition. If the new definition is effectively ! the same, the redefinition is silently ignored. This allows, for ! instance, two different headers to define a common macro. The ! preprocessor will only complain if the definitions do not match. ! !  ! File: cpp.info, Node: Directives Within Macro Arguments, Next: Macro Pitfalls, Prev: Undefining and Redefining Macros, Up: Macros ! ! Directives Within Macro Arguments ! ================================= ! ! Occasionally it is convenient to use preprocessor directives within ! the arguments of a macro. The C and C++ standards declare that ! behavior in these cases is undefined. ! ! Versions of CPP prior to 3.2 would reject such constructs with an ! error message. This was the only syntactic difference between normal ! functions and function-like macros, so it seemed attractive to remove ! this limitation, and people would often be surprised that they could ! not use macros in this way. Moreover, sometimes people would use ! conditional compilation in the argument list to a normal library ! function like `printf', only to find that after a library upgrade ! `printf' had changed to be a function-like macro, and their code would ! no longer compile. So from version 3.2 we changed CPP to successfully ! process arbitrary directives within macro arguments in exactly the same ! way as it would have processed the directive were the function-like ! macro invocation not present. ! ! If, within a macro invocation, that macro is redefined, then the new ! definition takes effect in time for argument pre-expansion, but the ! original definition is still used for argument replacement. Here is a ! pathological example: ! ! #define f(x) x x ! f (1 ! #undef f ! #define f 2 ! f) ! ! which expands to ! ! 1 2 1 2 ! ! with the semantics described above. ! !  ! File: cpp.info, Node: Macro Pitfalls, Prev: Directives Within Macro Arguments, Up: Macros ! ! Macro Pitfalls ! ============== ! ! In this section we describe some special rules that apply to macros ! and macro expansion, and point out certain cases in which the rules have ! counter-intuitive consequences that you must watch out for. ! ! * Menu: ! ! * Misnesting:: ! * Operator Precedence Problems:: ! * Swallowing the Semicolon:: ! * Duplication of Side Effects:: ! * Self-Referential Macros:: ! * Argument Prescan:: ! * Newlines in Arguments:: ! !  ! File: cpp.info, Node: Misnesting, Next: Operator Precedence Problems, Up: Macro Pitfalls ! ! Misnesting ! ---------- ! ! When a macro is called with arguments, the arguments are substituted ! into the macro body and the result is checked, together with the rest of ! the input file, for more macro calls. It is possible to piece together ! a macro call coming partially from the macro body and partially from the ! arguments. For example, ! ! #define twice(x) (2*(x)) ! #define call_with_1(x) x(1) ! call_with_1 (twice) ! ==> twice(1) ! ==> (2*(1)) ! ! Macro definitions do not have to have balanced parentheses. By ! writing an unbalanced open parenthesis in a macro body, it is possible ! to create a macro call that begins inside the macro body but ends ! outside of it. For example, ! ! #define strange(file) fprintf (file, "%s %d", ! ... ! strange(stderr) p, 35) ! ==> fprintf (stderr, "%s %d", p, 35) ! ! The ability to piece together a macro call can be useful, but the ! use of unbalanced open parentheses in a macro body is just confusing, ! and should be avoided. ! !  ! File: cpp.info, Node: Operator Precedence Problems, Next: Swallowing the Semicolon, Prev: Misnesting, Up: Macro Pitfalls ! ! Operator Precedence Problems ! ---------------------------- ! ! You may have noticed that in most of the macro definition examples ! shown above, each occurrence of a macro argument name had parentheses ! around it. In addition, another pair of parentheses usually surround ! the entire macro definition. Here is why it is best to write macros ! that way. ! ! Suppose you define a macro as follows, ! ! #define ceil_div(x, y) (x + y - 1) / y ! ! whose purpose is to divide, rounding up. (One use for this operation is ! to compute how many `int' objects are needed to hold a certain number ! of `char' objects.) Then suppose it is used as follows: ! ! a = ceil_div (b & c, sizeof (int)); ! ==> a = (b & c + sizeof (int) - 1) / sizeof (int); ! ! This does not do what is intended. The operator-precedence rules of C ! make it equivalent to this: ! ! a = (b & (c + sizeof (int) - 1)) / sizeof (int); ! ! What we want is this: ! ! a = ((b & c) + sizeof (int) - 1)) / sizeof (int); ! ! Defining the macro as ! ! #define ceil_div(x, y) ((x) + (y) - 1) / (y) ! ! provides the desired result. ! ! Unintended grouping can result in another way. Consider `sizeof ! ceil_div(1, 2)'. That has the appearance of a C expression that would ! compute the size of the type of `ceil_div (1, 2)', but in fact it means ! something very different. Here is what it expands to: ! ! sizeof ((1) + (2) - 1) / (2) ! ! This would take the size of an integer and divide it by two. The ! precedence rules have put the division outside the `sizeof' when it was ! intended to be inside. ! ! Parentheses around the entire macro definition prevent such problems. ! Here, then, is the recommended way to define `ceil_div': ! ! #define ceil_div(x, y) (((x) + (y) - 1) / (y)) ! !  ! File: cpp.info, Node: Swallowing the Semicolon, Next: Duplication of Side Effects, Prev: Operator Precedence Problems, Up: Macro Pitfalls ! ! Swallowing the Semicolon ! ------------------------ ! ! Often it is desirable to define a macro that expands into a compound ! statement. Consider, for example, the following macro, that advances a ! pointer (the argument `p' says where to find it) across whitespace ! characters: ! ! #define SKIP_SPACES(p, limit) \ ! { char *lim = (limit); \ ! while (p < lim) { \ ! if (*p++ != ' ') { \ ! p--; break; }}} ! ! Here backslash-newline is used to split the macro definition, which must ! be a single logical line, so that it resembles the way such code would ! be laid out if not part of a macro definition. ! ! A call to this macro might be `SKIP_SPACES (p, lim)'. Strictly ! speaking, the call expands to a compound statement, which is a complete ! statement with no need for a semicolon to end it. However, since it ! looks like a function call, it minimizes confusion if you can use it ! like a function call, writing a semicolon afterward, as in `SKIP_SPACES ! (p, lim);' ! ! This can cause trouble before `else' statements, because the ! semicolon is actually a null statement. Suppose you write ! ! if (*p != 0) ! SKIP_SPACES (p, lim); ! else ... ! ! The presence of two statements--the compound statement and a null ! statement--in between the `if' condition and the `else' makes invalid C ! code. ! ! The definition of the macro `SKIP_SPACES' can be altered to solve ! this problem, using a `do ... while' statement. Here is how: ! ! #define SKIP_SPACES(p, limit) \ ! do { char *lim = (limit); \ ! while (p < lim) { \ ! if (*p++ != ' ') { \ ! p--; break; }}} \ ! while (0) ! ! Now `SKIP_SPACES (p, lim);' expands into ! ! do {...} while (0); ! ! which is one statement. The loop executes exactly once; most compilers ! generate no extra code for it. ! !  ! File: cpp.info, Node: Duplication of Side Effects, Next: Self-Referential Macros, Prev: Swallowing the Semicolon, Up: Macro Pitfalls ! ! Duplication of Side Effects ! --------------------------- ! ! Many C programs define a macro `min', for "minimum", like this: ! ! #define min(X, Y) ((X) < (Y) ? (X) : (Y)) ! ! When you use this macro with an argument containing a side effect, ! as shown here, ! ! next = min (x + y, foo (z)); ! ! it expands as follows: ! ! next = ((x + y) < (foo (z)) ? (x + y) : (foo (z))); ! ! where `x + y' has been substituted for `X' and `foo (z)' for `Y'. ! ! The function `foo' is used only once in the statement as it appears ! in the program, but the expression `foo (z)' has been substituted twice ! into the macro expansion. As a result, `foo' might be called two times ! when the statement is executed. If it has side effects or if it takes ! a long time to compute, the results might not be what you intended. We ! say that `min' is an "unsafe" macro. ! ! The best solution to this problem is to define `min' in a way that ! computes the value of `foo (z)' only once. The C language offers no ! standard way to do this, but it can be done with GNU extensions as ! follows: ! ! #define min(X, Y) \ ! ({ typeof (X) x_ = (X); \ ! typeof (Y) y_ = (Y); \ ! (x_ < y_) ? x_ : y_; }) ! ! The `({ ... })' notation produces a compound statement that acts as ! an expression. Its value is the value of its last statement. This ! permits us to define local variables and assign each argument to one. ! The local variables have underscores after their names to reduce the ! risk of conflict with an identifier of wider scope (it is impossible to ! avoid this entirely). Now each argument is evaluated exactly once. ! ! If you do not wish to use GNU C extensions, the only solution is to ! be careful when _using_ the macro `min'. For example, you can ! calculate the value of `foo (z)', save it in a variable, and use that ! variable in `min': ! ! #define min(X, Y) ((X) < (Y) ? (X) : (Y)) ! ... ! { ! int tem = foo (z); ! next = min (x + y, tem); ! } ! ! (where we assume that `foo' returns type `int'). ! !  ! File: cpp.info, Node: Self-Referential Macros, Next: Argument Prescan, Prev: Duplication of Side Effects, Up: Macro Pitfalls ! ! Self-Referential Macros ! ----------------------- ! ! A "self-referential" macro is one whose name appears in its ! definition. Recall that all macro definitions are rescanned for more ! macros to replace. If the self-reference were considered a use of the ! macro, it would produce an infinitely large expansion. To prevent this, ! the self-reference is not considered a macro call. It is passed into ! the preprocessor output unchanged. Let's consider an example: ! ! #define foo (4 + foo) ! ! where `foo' is also a variable in your program. ! ! Following the ordinary rules, each reference to `foo' will expand ! into `(4 + foo)'; then this will be rescanned and will expand into `(4 ! + (4 + foo))'; and so on until the computer runs out of memory. ! ! The self-reference rule cuts this process short after one step, at ! `(4 + foo)'. Therefore, this macro definition has the possibly useful ! effect of causing the program to add 4 to the value of `foo' wherever ! `foo' is referred to. ! ! In most cases, it is a bad idea to take advantage of this feature. A ! person reading the program who sees that `foo' is a variable will not ! expect that it is a macro as well. The reader will come across the ! identifier `foo' in the program and think its value should be that of ! the variable `foo', whereas in fact the value is four greater. ! ! One common, useful use of self-reference is to create a macro which ! expands to itself. If you write ! ! #define EPERM EPERM ! ! then the macro `EPERM' expands to `EPERM'. Effectively, it is left ! alone by the preprocessor whenever it's used in running text. You can ! tell that it's a macro with `#ifdef'. You might do this if you want to ! define numeric constants with an `enum', but have `#ifdef' be true for ! each constant. ! ! If a macro `x' expands to use a macro `y', and the expansion of `y' ! refers to the macro `x', that is an "indirect self-reference" of `x'. ! `x' is not expanded in this case either. Thus, if we have ! ! #define x (4 + y) ! #define y (2 * x) ! ! then `x' and `y' expand as follows: ! ! x ==> (4 + y) ! ==> (4 + (2 * x)) ! ! y ==> (2 * x) ! ==> (2 * (4 + y)) ! ! Each macro is expanded when it appears in the definition of the other ! macro, but not when it indirectly appears in its own definition. ! !  ! File: cpp.info, Node: Argument Prescan, Next: Newlines in Arguments, Prev: Self-Referential Macros, Up: Macro Pitfalls ! ! Argument Prescan ! ---------------- ! ! Macro arguments are completely macro-expanded before they are ! substituted into a macro body, unless they are stringified or pasted ! with other tokens. After substitution, the entire macro body, including ! the substituted arguments, is scanned again for macros to be expanded. ! The result is that the arguments are scanned _twice_ to expand macro ! calls in them. ! ! Most of the time, this has no effect. If the argument contained any ! macro calls, they are expanded during the first scan. The result ! therefore contains no macro calls, so the second scan does not change ! it. If the argument were substituted as given, with no prescan, the ! single remaining scan would find the same macro calls and produce the ! same results. ! ! You might expect the double scan to change the results when a ! self-referential macro is used in an argument of another macro (*note ! Self-Referential Macros::): the self-referential macro would be ! expanded once in the first scan, and a second time in the second scan. ! However, this is not what happens. The self-references that do not ! expand in the first scan are marked so that they will not expand in the ! second scan either. ! ! You might wonder, "Why mention the prescan, if it makes no ! difference? And why not skip it and make the preprocessor faster?" ! The answer is that the prescan does make a difference in three special ! cases: ! ! * Nested calls to a macro. ! ! We say that "nested" calls to a macro occur when a macro's argument ! contains a call to that very macro. For example, if `f' is a macro ! that expects one argument, `f (f (1))' is a nested pair of calls to ! `f'. The desired expansion is made by expanding `f (1)' and ! substituting that into the definition of `f'. The prescan causes ! the expected result to happen. Without the prescan, `f (1)' itself ! would be substituted as an argument, and the inner use of `f' would ! appear during the main scan as an indirect self-reference and ! would not be expanded. ! ! * Macros that call other macros that stringify or concatenate. ! ! If an argument is stringified or concatenated, the prescan does not ! occur. If you _want_ to expand a macro, then stringify or ! concatenate its expansion, you can do that by causing one macro to ! call another macro that does the stringification or concatenation. ! For instance, if you have ! ! #define AFTERX(x) X_ ## x ! #define XAFTERX(x) AFTERX(x) ! #define TABLESIZE 1024 ! #define BUFSIZE TABLESIZE ! ! then `AFTERX(BUFSIZE)' expands to `X_BUFSIZE', and ! `XAFTERX(BUFSIZE)' expands to `X_1024'. (Not to `X_TABLESIZE'. ! Prescan always does a complete expansion.) ! ! * Macros used in arguments, whose expansions contain unshielded ! commas. ! ! This can cause a macro expanded on the second scan to be called ! with the wrong number of arguments. Here is an example: ! ! #define foo a,b ! #define bar(x) lose(x) ! #define lose(x) (1 + (x)) ! ! We would like `bar(foo)' to turn into `(1 + (foo))', which would ! then turn into `(1 + (a,b))'. Instead, `bar(foo)' expands into ! `lose(a,b)', and you get an error because `lose' requires a single ! argument. In this case, the problem is easily solved by the same ! parentheses that ought to be used to prevent misnesting of ! arithmetic operations: ! ! #define foo (a,b) ! or ! #define bar(x) lose((x)) ! ! The extra pair of parentheses prevents the comma in `foo''s ! definition from being interpreted as an argument separator. ! ! !  ! File: cpp.info, Node: Newlines in Arguments, Prev: Argument Prescan, Up: Macro Pitfalls ! ! Newlines in Arguments ! --------------------- ! ! The invocation of a function-like macro can extend over many logical ! lines. However, in the present implementation, the entire expansion ! comes out on one line. Thus line numbers emitted by the compiler or ! debugger refer to the line the invocation started on, which might be ! different to the line containing the argument causing the problem. ! ! Here is an example illustrating this: ! ! #define ignore_second_arg(a,b,c) a; c ! ! ignore_second_arg (foo (), ! ignored (), ! syntax error); ! ! The syntax error triggered by the tokens `syntax error' results in an ! error message citing line three--the line of ignore_second_arg-- even ! though the problematic code comes from line five. ! ! We consider this a bug, and intend to fix it in the near future. ! !  ! File: cpp.info, Node: Conditionals, Next: Diagnostics, Prev: Macros, Up: Top ! ! Conditionals ! ************ ! ! A "conditional" is a directive that instructs the preprocessor to ! select whether or not to include a chunk of code in the final token ! stream passed to the compiler. Preprocessor conditionals can test ! arithmetic expressions, or whether a name is defined as a macro, or both ! simultaneously using the special `defined' operator. ! ! A conditional in the C preprocessor resembles in some ways an `if' ! statement in C, but it is important to understand the difference between ! them. The condition in an `if' statement is tested during the ! execution of your program. Its purpose is to allow your program to ! behave differently from run to run, depending on the data it is ! operating on. The condition in a preprocessing conditional directive is ! tested when your program is compiled. Its purpose is to allow different ! code to be included in the program depending on the situation at the ! time of compilation. ! ! However, the distinction is becoming less clear. Modern compilers ! often do test `if' statements when a program is compiled, if their ! conditions are known not to vary at run time, and eliminate code which ! can never be executed. If you can count on your compiler to do this, ! you may find that your program is more readable if you use `if' ! statements with constant conditions (perhaps determined by macros). Of ! course, you can only use this to exclude code, not type definitions or ! other preprocessing directives, and you can only do it if the code ! remains syntactically valid when it is not to be used. ! ! GCC version 3 eliminates this kind of never-executed code even when ! not optimizing. Older versions did it only when optimizing. ! ! * Menu: ! ! * Conditional Uses:: ! * Conditional Syntax:: ! * Deleted Code:: ! !  ! File: cpp.info, Node: Conditional Uses, Next: Conditional Syntax, Up: Conditionals ! ! Conditional Uses ! ================ ! ! There are three general reasons to use a conditional. ! ! * A program may need to use different code depending on the machine ! or operating system it is to run on. In some cases the code for ! one operating system may be erroneous on another operating system; ! for example, it might refer to data types or constants that do not ! exist on the other system. When this happens, it is not enough to ! avoid executing the invalid code. Its mere presence will cause ! the compiler to reject the program. With a preprocessing ! conditional, the offending code can be effectively excised from ! the program when it is not valid. ! ! * You may want to be able to compile the same source file into two ! different programs. One version might make frequent time-consuming ! consistency checks on its intermediate data, or print the values of ! those data for debugging, and the other not. ! ! * A conditional whose condition is always false is one way to ! exclude code from the program but keep it as a sort of comment for ! future reference. ! ! Simple programs that do not need system-specific logic or complex ! debugging hooks generally will not need to use preprocessing ! conditionals. ! !  ! File: cpp.info, Node: Conditional Syntax, Next: Deleted Code, Prev: Conditional Uses, Up: Conditionals ! ! Conditional Syntax ! ================== ! ! A conditional in the C preprocessor begins with a "conditional ! directive": `#if', `#ifdef' or `#ifndef'. ! ! * Menu: ! ! * Ifdef:: ! * If:: ! * Defined:: ! * Else:: ! * Elif:: ! !  ! File: cpp.info, Node: Ifdef, Next: If, Up: Conditional Syntax ! ! Ifdef ! ----- ! ! The simplest sort of conditional is ! ! #ifdef MACRO ! ! CONTROLLED TEXT ! ! #endif /* MACRO */ ! ! This block is called a "conditional group". CONTROLLED TEXT will be ! included in the output of the preprocessor if and only if MACRO is ! defined. We say that the conditional "succeeds" if MACRO is defined, ! "fails" if it is not. ! ! The CONTROLLED TEXT inside of a conditional can include ! preprocessing directives. They are executed only if the conditional ! succeeds. You can nest conditional groups inside other conditional ! groups, but they must be completely nested. In other words, `#endif' ! always matches the nearest `#ifdef' (or `#ifndef', or `#if'). Also, ! you cannot start a conditional group in one file and end it in another. ! ! Even if a conditional fails, the CONTROLLED TEXT inside it is still ! run through initial transformations and tokenization. Therefore, it ! must all be lexically valid C. Normally the only way this matters is ! that all comments and string literals inside a failing conditional group ! must still be properly ended. ! ! The comment following the `#endif' is not required, but it is a good ! practice if there is a lot of CONTROLLED TEXT, because it helps people ! match the `#endif' to the corresponding `#ifdef'. Older programs ! sometimes put MACRO directly after the `#endif' without enclosing it in ! a comment. This is invalid code according to the C standard. CPP ! accepts it with a warning. It never affects which `#ifndef' the ! `#endif' matches. ! ! Sometimes you wish to use some code if a macro is _not_ defined. ! You can do this by writing `#ifndef' instead of `#ifdef'. One common ! use of `#ifndef' is to include code only the first time a header file ! is included. *Note Once-Only Headers::. ! ! Macro definitions can vary between compilations for several reasons. ! Here are some samples. ! ! * Some macros are predefined on each kind of machine (*note ! System-specific Predefined Macros::). This allows you to provide ! code specially tuned for a particular machine. ! ! * System header files define more macros, associated with the ! features they implement. You can test these macros with ! conditionals to avoid using a system feature on a machine where it ! is not implemented. ! ! * Macros can be defined or undefined with the `-D' and `-U' command ! line options when you compile the program. You can arrange to ! compile the same source file into two different programs by ! choosing a macro name to specify which program you want, writing ! conditionals to test whether or how this macro is defined, and ! then controlling the state of the macro with command line options, ! perhaps set in the Makefile. *Note Invocation::. ! ! * Your program might have a special header file (often called ! `config.h') that is adjusted when the program is compiled. It can ! define or not define macros depending on the features of the ! system and the desired capabilities of the program. The ! adjustment can be automated by a tool such as `autoconf', or done ! by hand. ! !  ! File: cpp.info, Node: If, Next: Defined, Prev: Ifdef, Up: Conditional Syntax ! ! If ! -- ! ! The `#if' directive allows you to test the value of an arithmetic ! expression, rather than the mere existence of one macro. Its syntax is ! ! #if EXPRESSION ! ! CONTROLLED TEXT ! ! #endif /* EXPRESSION */ ! ! EXPRESSION is a C expression of integer type, subject to stringent ! restrictions. It may contain ! ! * Integer constants. ! ! * Character constants, which are interpreted as they would be in ! normal code. ! ! * Arithmetic operators for addition, subtraction, multiplication, ! division, bitwise operations, shifts, comparisons, and logical ! operations (`&&' and `||'). The latter two obey the usual ! short-circuiting rules of standard C. ! ! * Macros. All macros in the expression are expanded before actual ! computation of the expression's value begins. ! ! * Uses of the `defined' operator, which lets you check whether macros ! are defined in the middle of an `#if'. ! ! * Identifiers that are not macros, which are all considered to be the ! number zero. This allows you to write `#if MACRO' instead of ! `#ifdef MACRO', if you know that MACRO, when defined, will always ! have a nonzero value. Function-like macros used without their ! function call parentheses are also treated as zero. ! ! In some contexts this shortcut is undesirable. The `-Wundef' ! option causes GCC to warn whenever it encounters an identifier ! which is not a macro in an `#if'. ! ! The preprocessor does not know anything about types in the language. ! Therefore, `sizeof' operators are not recognized in `#if', and neither ! are `enum' constants. They will be taken as identifiers which are not ! macros, and replaced by zero. In the case of `sizeof', this is likely ! to cause the expression to be invalid. ! ! The preprocessor calculates the value of EXPRESSION. It carries out ! all calculations in the widest integer type known to the compiler; on ! most machines supported by GCC this is 64 bits. This is not the same ! rule as the compiler uses to calculate the value of a constant ! expression, and may give different results in some cases. If the value ! comes out to be nonzero, the `#if' succeeds and the CONTROLLED TEXT is ! included; otherwise it is skipped. ! ! If EXPRESSION is not correctly formed, GCC issues an error and ! treats the conditional as having failed. ! !  ! File: cpp.info, Node: Defined, Next: Else, Prev: If, Up: Conditional Syntax ! ! Defined ! ------- ! ! The special operator `defined' is used in `#if' and `#elif' ! expressions to test whether a certain name is defined as a macro. ! `defined NAME' and `defined (NAME)' are both expressions whose value is ! 1 if NAME is defined as a macro at the current point in the program, ! and 0 otherwise. Thus, `#if defined MACRO' is precisely equivalent to ! `#ifdef MACRO'. ! ! `defined' is useful when you wish to test more than one macro for ! existence at once. For example, ! ! #if defined (__vax__) || defined (__ns16000__) ! ! would succeed if either of the names `__vax__' or `__ns16000__' is ! defined as a macro. ! ! Conditionals written like this: ! ! #if defined BUFSIZE && BUFSIZE >= 1024 ! ! can generally be simplified to just `#if BUFSIZE >= 1024', since if ! `BUFSIZE' is not defined, it will be interpreted as having the value ! zero. ! ! If the `defined' operator appears as a result of a macro expansion, ! the C standard says the behavior is undefined. GNU cpp treats it as a ! genuine `defined' operator and evaluates it normally. It will warn ! wherever your code uses this feature if you use the command-line option ! `-pedantic', since other compilers may handle it differently. ! !  ! File: cpp.info, Node: Else, Next: Elif, Prev: Defined, Up: Conditional Syntax ! ! Else ! ---- ! ! The `#else' directive can be added to a conditional to provide ! alternative text to be used if the condition fails. This is what it ! looks like: ! ! #if EXPRESSION ! TEXT-IF-TRUE ! #else /* Not EXPRESSION */ ! TEXT-IF-FALSE ! #endif /* Not EXPRESSION */ ! ! If EXPRESSION is nonzero, the TEXT-IF-TRUE is included and the ! TEXT-IF-FALSE is skipped. If EXPRESSION is zero, the opposite happens. ! ! You can use `#else' with `#ifdef' and `#ifndef', too. ! !  ! File: cpp.info, Node: Elif, Prev: Else, Up: Conditional Syntax ! ! Elif ! ---- ! ! One common case of nested conditionals is used to check for more ! than two possible alternatives. For example, you might have ! ! #if X == 1 ! ... ! #else /* X != 1 */ ! #if X == 2 ! ... ! #else /* X != 2 */ ! ... ! #endif /* X != 2 */ ! #endif /* X != 1 */ ! ! Another conditional directive, `#elif', allows this to be ! abbreviated as follows: ! ! #if X == 1 ! ... ! #elif X == 2 ! ... ! #else /* X != 2 and X != 1*/ ! ... ! #endif /* X != 2 and X != 1*/ ! ! `#elif' stands for "else if". Like `#else', it goes in the middle ! of a conditional group and subdivides it; it does not require a ! matching `#endif' of its own. Like `#if', the `#elif' directive ! includes an expression to be tested. The text following the `#elif' is ! processed only if the original `#if'-condition failed and the `#elif' ! condition succeeds. ! ! More than one `#elif' can go in the same conditional group. Then ! the text after each `#elif' is processed only if the `#elif' condition ! succeeds after the original `#if' and all previous `#elif' directives ! within it have failed. ! ! `#else' is allowed after any number of `#elif' directives, but ! `#elif' may not follow `#else'. ! !  ! File: cpp.info, Node: Deleted Code, Prev: Conditional Syntax, Up: Conditionals ! ! Deleted Code ! ============ ! ! If you replace or delete a part of the program but want to keep the ! old code around for future reference, you often cannot simply comment it ! out. Block comments do not nest, so the first comment inside the old ! code will end the commenting-out. The probable result is a flood of ! syntax errors. ! ! One way to avoid this problem is to use an always-false conditional ! instead. For instance, put `#if 0' before the deleted code and ! `#endif' after it. This works even if the code being turned off ! contains conditionals, but they must be entire conditionals (balanced ! `#if' and `#endif'). ! ! Some people use `#ifdef notdef' instead. This is risky, because ! `notdef' might be accidentally defined as a macro, and then the ! conditional would succeed. `#if 0' can be counted on to fail. ! ! Do not use `#if 0' for comments which are not C code. Use a real ! comment, instead. The interior of `#if 0' must consist of complete ! tokens; in particular, single-quote characters must balance. Comments ! often contain unbalanced single-quote characters (known in English as ! apostrophes). These confuse `#if 0'. They don't confuse `/*'. ! !  ! File: cpp.info, Node: Diagnostics, Next: Line Control, Prev: Conditionals, Up: Top ! ! Diagnostics ! *********** ! ! The directive `#error' causes the preprocessor to report a fatal ! error. The tokens forming the rest of the line following `#error' are ! used as the error message. ! ! You would use `#error' inside of a conditional that detects a ! combination of parameters which you know the program does not properly ! support. For example, if you know that the program will not run ! properly on a VAX, you might write ! ! #ifdef __vax__ ! #error "Won't work on VAXen. See comments at get_last_object." ! #endif ! ! If you have several configuration parameters that must be set up by ! the installation in a consistent way, you can use conditionals to detect ! an inconsistency and report it with `#error'. For example, ! ! #if !defined(UNALIGNED_INT_ASM_OP) && defined(DWARF2_DEBUGGING_INFO) ! #error "DWARF2_DEBUGGING_INFO requires UNALIGNED_INT_ASM_OP." ! #endif ! ! The directive `#warning' is like `#error', but causes the ! preprocessor to issue a warning and continue preprocessing. The tokens ! following `#warning' are used as the warning message. ! ! You might use `#warning' in obsolete header files, with a message ! directing the user to the header file which should be used instead. ! ! Neither `#error' nor `#warning' macro-expands its argument. ! Internal whitespace sequences are each replaced with a single space. ! The line must consist of complete tokens. It is wisest to make the ! argument of these directives be a single string constant; this avoids ! problems with apostrophes and the like. ! !  ! File: cpp.info, Node: Line Control, Next: Pragmas, Prev: Diagnostics, Up: Top ! ! Line Control ! ************ ! ! The C preprocessor informs the C compiler of the location in your ! source code where each token came from. Presently, this is just the ! file name and line number. All the tokens resulting from macro ! expansion are reported as having appeared on the line of the source ! file where the outermost macro was used. We intend to be more accurate ! in the future. ! ! If you write a program which generates source code, such as the ! `bison' parser generator, you may want to adjust the preprocessor's ! notion of the current file name and line number by hand. Parts of the ! output from `bison' are generated from scratch, other parts come from a ! standard parser file. The rest are copied verbatim from `bison''s ! input. You would like compiler error messages and symbolic debuggers ! to be able to refer to `bison''s input file. ! ! `bison' or any such program can arrange this by writing `#line' ! directives into the output file. `#line' is a directive that specifies ! the original line number and source file name for subsequent input in ! the current preprocessor input file. `#line' has three variants: ! ! `#line LINENUM' ! LINENUM is a non-negative decimal integer constant. It specifies ! the line number which should be reported for the following line of ! input. Subsequent lines are counted from LINENUM. ! ! `#line LINENUM FILENAME' ! LINENUM is the same as for the first form, and has the same ! effect. In addition, FILENAME is a string constant. The ! following line and all subsequent lines are reported to come from ! the file it specifies, until something else happens to change that. ! FILENAME is interpreted according to the normal rules for a string ! constant: backslash escapes are interpreted. This is different ! from `#include'. ! ! Previous versions of CPP did not interpret escapes in `#line'; we ! have changed it because the standard requires they be interpreted, ! and most other compilers do. ! ! `#line ANYTHING ELSE' ! ANYTHING ELSE is checked for macro calls, which are expanded. The ! result should match one of the above two forms. ! ! `#line' directives alter the results of the `__FILE__' and ! `__LINE__' predefined macros from that point on. *Note Standard ! Predefined Macros::. They do not have any effect on `#include''s idea ! of the directory containing the current file. This is a change from ! GCC 2.95. Previously, a file reading ! ! #line 1 "../src/gram.y" ! #include "gram.h" ! ! would search for `gram.h' in `../src', then the `-I' chain; the ! directory containing the physical source file would not be searched. ! In GCC 3.0 and later, the `#include' is not affected by the presence of ! a `#line' referring to a different directory. ! ! We made this change because the old behavior caused problems when ! generated source files were transported between machines. For instance, ! it is common practice to ship generated parsers with a source release, ! so that people building the distribution do not need to have yacc or ! Bison installed. These files frequently have `#line' directives ! referring to the directory tree of the system where the distribution was ! created. If GCC tries to search for headers in those directories, the ! build is likely to fail. ! ! The new behavior can cause failures too, if the generated file is not ! in the same directory as its source and it attempts to include a header ! which would be visible searching from the directory containing the ! source file. However, this problem is easily solved with an additional ! `-I' switch on the command line. The failures caused by the old ! semantics could sometimes be corrected only by editing the generated ! files, which is difficult and error-prone. ! !  ! File: cpp.info, Node: Pragmas, Next: Other Directives, Prev: Line Control, Up: Top ! ! Pragmas ! ******* ! ! The `#pragma' directive is the method specified by the C standard ! for providing additional information to the compiler, beyond what is ! conveyed in the language itself. Three forms of this directive ! (commonly known as "pragmas") are specified by the 1999 C standard. A ! C compiler is free to attach any meaning it likes to other pragmas. ! ! GCC has historically preferred to use extensions to the syntax of the ! language, such as `__attribute__', for this purpose. However, GCC does ! define a few pragmas of its own. These mostly have effects on the ! entire translation unit or source file. ! ! In GCC version 3, all GNU-defined, supported pragmas have been given ! a `GCC' prefix. This is in line with the `STDC' prefix on all pragmas ! defined by C99. For backward compatibility, pragmas which were ! recognized by previous versions are still recognized without the `GCC' ! prefix, but that usage is deprecated. Some older pragmas are ! deprecated in their entirety. They are not recognized with the `GCC' ! prefix. *Note Obsolete Features::. ! ! C99 introduces the `_Pragma' operator. This feature addresses a ! major problem with `#pragma': being a directive, it cannot be produced ! as the result of macro expansion. `_Pragma' is an operator, much like ! `sizeof' or `defined', and can be embedded in a macro. ! ! Its syntax is `_Pragma (STRING-LITERAL)', where STRING-LITERAL can ! be either a normal or wide-character string literal. It is ! destringized, by replacing all `\\' with a single `\' and all `\"' with ! a `"'. The result is then processed as if it had appeared as the right ! hand side of a `#pragma' directive. For example, ! ! _Pragma ("GCC dependency \"parse.y\"") ! ! has the same effect as `#pragma GCC dependency "parse.y"'. The same ! effect could be achieved using macros, for example ! ! #define DO_PRAGMA(x) _Pragma (#x) ! DO_PRAGMA (GCC dependency "parse.y") ! ! The standard is unclear on where a `_Pragma' operator can appear. ! The preprocessor does not accept it within a preprocessing conditional ! directive like `#if'. To be safe, you are probably best keeping it out ! of directives other than `#define', and putting it on a line of its own. ! ! This manual documents the pragmas which are meaningful to the ! preprocessor itself. Other pragmas are meaningful to the C or C++ ! compilers. They are documented in the GCC manual. ! ! `#pragma GCC dependency' ! `#pragma GCC dependency' allows you to check the relative dates of ! the current file and another file. If the other file is more ! recent than the current file, a warning is issued. This is useful ! if the current file is derived from the other file, and should be ! regenerated. The other file is searched for using the normal ! include search path. Optional trailing text can be used to give ! more information in the warning message. ! ! #pragma GCC dependency "parse.y" ! #pragma GCC dependency "/usr/include/time.h" rerun fixincludes ! ! `#pragma GCC poison' ! Sometimes, there is an identifier that you want to remove ! completely from your program, and make sure that it never creeps ! back in. To enforce this, you can "poison" the identifier with ! this pragma. `#pragma GCC poison' is followed by a list of ! identifiers to poison. If any of those identifiers appears ! anywhere in the source after the directive, it is a hard error. ! For example, ! ! #pragma GCC poison printf sprintf fprintf ! sprintf(some_string, "hello"); ! ! will produce an error. ! ! If a poisoned identifier appears as part of the expansion of a ! macro which was defined before the identifier was poisoned, it ! will _not_ cause an error. This lets you poison an identifier ! without worrying about system headers defining macros that use it. ! ! For example, ! ! #define strrchr rindex ! #pragma GCC poison rindex ! strrchr(some_string, 'h'); ! ! will not produce an error. ! ! `#pragma GCC system_header' ! This pragma takes no arguments. It causes the rest of the code in ! the current file to be treated as if it came from a system header. ! *Note System Headers::. ! !  ! File: cpp.info, Node: Other Directives, Next: Preprocessor Output, Prev: Pragmas, Up: Top ! ! Other Directives ! **************** ! ! The `#ident' directive takes one argument, a string constant. On ! some systems, that string constant is copied into a special segment of ! the object file. On other systems, the directive is ignored. ! ! This directive is not part of the C standard, but it is not an ! official GNU extension either. We believe it came from System V. ! ! The `#sccs' directive is recognized, because it appears in the ! header files of some systems. It is a very old, obscure, extension ! which we did not invent, and we have been unable to find any ! documentation of what it should do, so GCC simply ignores it. ! ! The "null directive" consists of a `#' followed by a newline, with ! only whitespace (including comments) in between. A null directive is ! understood as a preprocessing directive but has no effect on the ! preprocessor output. The primary significance of the existence of the ! null directive is that an input line consisting of just a `#' will ! produce no output, rather than a line of output containing just a `#'. ! Supposedly some old C programs contain such lines. ! !  ! File: cpp.info, Node: Preprocessor Output, Next: Traditional Mode, Prev: Other Directives, Up: Top ! ! Preprocessor Output ! ******************* ! ! When the C preprocessor is used with the C, C++, or Objective-C ! compilers, it is integrated into the compiler and communicates a stream ! of binary tokens directly to the compiler's parser. However, it can ! also be used in the more conventional standalone mode, where it produces ! textual output. ! ! The output from the C preprocessor looks much like the input, except ! that all preprocessing directive lines have been replaced with blank ! lines and all comments with spaces. Long runs of blank lines are ! discarded. ! ! The ISO standard specifies that it is implementation defined whether ! a preprocessor preserves whitespace between tokens, or replaces it with ! e.g. a single space. In GNU CPP, whitespace between tokens is collapsed ! to become a single space, with the exception that the first token on a ! non-directive line is preceded with sufficient spaces that it appears in ! the same column in the preprocessed output that it appeared in the ! original source file. This is so the output is easy to read. *Note ! Differences from previous versions::. CPP does not insert any ! whitespace where there was none in the original source, except where ! necessary to prevent an accidental token paste. ! ! Source file name and line number information is conveyed by lines of ! the form ! ! # LINENUM FILENAME FLAGS ! ! These are called "linemarkers". They are inserted as needed into the ! output (but never within a string or character constant). They mean ! that the following line originated in file FILENAME at line LINENUM. ! FILENAME will never contain any non-printing characters; they are ! replaced with octal escape sequences. ! ! After the file name comes zero or more flags, which are `1', `2', ! `3', or `4'. If there are multiple flags, spaces separate them. Here ! is what the flags mean: ! ! `1' ! This indicates the start of a new file. ! ! `2' ! This indicates returning to a file (after having included another ! file). ! ! `3' ! This indicates that the following text comes from a system header ! file, so certain warnings should be suppressed. ! ! `4' ! This indicates that the following text should be treated as being ! wrapped in an implicit `extern "C"' block. ! ! As an extension, the preprocessor accepts linemarkers in ! non-assembler input files. They are treated like the corresponding ! `#line' directive, (*note Line Control::), except that trailing flags ! are permitted, and are interpreted with the meanings described above. ! If multiple flags are given, they must be in ascending order. ! ! Some directives may be duplicated in the output of the preprocessor. ! These are `#ident' (always), `#pragma' (only if the preprocessor does ! not handle the pragma itself), and `#define' and `#undef' (with certain ! debugging options). If this happens, the `#' of the directive will ! always be in the first column, and there will be no space between the ! `#' and the directive name. If macro expansion happens to generate ! tokens which might be mistaken for a duplicated directive, a space will ! be inserted between the `#' and the directive name. ! !  ! File: cpp.info, Node: Traditional Mode, Next: Implementation Details, Prev: Preprocessor Output, Up: Top ! ! Traditional Mode ! **************** ! ! Traditional (pre-standard) C preprocessing is rather different from ! the preprocessing specified by the standard. When GCC is given the ! `-traditional-cpp' option, it attempts to emulate a traditional ! preprocessor. ! ! GCC versions 3.2 and later only support traditional mode semantics in ! the preprocessor, and not in the compiler front ends. This chapter ! outlines the traditional preprocessor semantics we implemented. ! ! The implementation does not correspond precisely to the behavior of ! earlier versions of GCC, nor to any true traditional preprocessor. ! After all, inconsistencies among traditional implementations were a ! major motivation for C standardization. However, we intend that it ! should be compatible with true traditional preprocessors in all ways ! that actually matter. ! ! * Menu: ! ! * Traditional lexical analysis:: ! * Traditional macros:: ! * Traditional miscellany:: ! * Traditional warnings:: ! !  ! File: cpp.info, Node: Traditional lexical analysis, Next: Traditional macros, Up: Traditional Mode ! ! Traditional lexical analysis ! ============================ ! ! The traditional preprocessor does not decompose its input into tokens ! the same way a standards-conforming preprocessor does. The input is ! simply treated as a stream of text with minimal internal form. ! ! This implementation does not treat trigraphs (*note trigraphs::) ! specially since they were an invention of the standards committee. It ! handles arbitrarily-positioned escaped newlines properly and splices ! the lines as you would expect; many traditional preprocessors did not ! do this. ! ! The form of horizontal whitespace in the input file is preserved in ! the output. In particular, hard tabs remain hard tabs. This can be ! useful if, for example, you are preprocessing a Makefile. ! ! Traditional CPP only recognizes C-style block comments, and treats ! the `/*' sequence as introducing a comment only if it lies outside ! quoted text. Quoted text is introduced by the usual single and double ! quotes, and also by an initial `<' in a `#include' directive. ! ! Traditionally, comments are completely removed and are not replaced ! with a space. Since a traditional compiler does its own tokenization ! of the output of the preprocessor, this means that comments can ! effectively be used as token paste operators. However, comments behave ! like separators for text handled by the preprocessor itself, since it ! doesn't re-lex its input. For example, in ! ! #if foo/**/bar ! ! `foo' and `bar' are distinct identifiers and expanded separately if ! they happen to be macros. In other words, this directive is equivalent ! to ! ! #if foo bar ! ! rather than ! ! #if foobar ! ! Generally speaking, in traditional mode an opening quote need not ! have a matching closing quote. In particular, a macro may be defined ! with replacement text that contains an unmatched quote. Of course, if ! you attempt to compile preprocessed output containing an unmatched quote ! you will get a syntax error. ! ! However, all preprocessing directives other than `#define' require ! matching quotes. For example: ! ! #define m This macro's fine and has an unmatched quote ! "/* This is not a comment. */ ! /* This is a comment. The following #include directive ! is ill-formed. */ ! #include ++foo; ! ! Function-like macros are similar in form but quite different in ! behavior to their ISO counterparts. Their arguments are contained ! within parentheses, are comma-separated, and can cross physical lines. ! Commas within nested parentheses are not treated as argument ! separators. Similarly, a quote in an argument cannot be left unclosed; ! a following comma or parenthesis that comes before the closing quote is ! treated like any other character. There is no facility for handling ! variadic macros. ! ! This implementation removes all comments from macro arguments, unless ! the `-C' option is given. The form of all other horizontal whitespace ! in arguments is preserved, including leading and trailing whitespace. ! In particular ! ! f( ) ! ! is treated as an invocation of the macro `f' with a single argument ! consisting of a single space. If you want to invoke a function-like ! macro that takes no arguments, you must not leave any whitespace ! between the parentheses. ! ! If a macro argument crosses a new line, the new line is replaced with ! a space when forming the argument. If the previous line contained an ! unterminated quote, the following line inherits the quoted state. ! ! Traditional preprocessors replace parameters in the replacement text ! with their arguments regardless of whether the parameters are within ! quotes or not. This provides a way to stringize arguments. For example ! ! #define str(x) "x" ! str(/* A comment */some text ) ! ==> "some text " ! ! Note that the comment is removed, but that the trailing space is ! preserved. Here is an example of using a comment to effect token ! pasting. ! ! #define suffix(x) foo_/**/x ! suffix(bar) ! ==> foo_bar ! !  ! File: cpp.info, Node: Traditional miscellany, Next: Traditional warnings, Prev: Traditional macros, Up: Traditional Mode ! ! Traditional miscellany ! ====================== ! ! Here are some things to be aware of when using the traditional ! preprocessor. ! ! * Preprocessing directives are recognized only when their leading ! `#' appears in the first column. There can be no whitespace ! between the beginning of the line and the `#', but whitespace can ! follow the `#'. ! ! * A true traditional C preprocessor does not recognize `#error' or ! `#pragma', and may not recognize `#elif'. CPP supports all the ! directives in traditional mode that it supports in ISO mode, ! including extensions, with the exception that the effects of ! `#pragma GCC poison' are undefined. ! ! * __STDC__ is not defined. ! ! * If you use digraphs the behavior is undefined. ! ! * If a line that looks like a directive appears within macro ! arguments, the behavior is undefined. ! ! !  ! File: cpp.info, Node: Traditional warnings, Prev: Traditional miscellany, Up: Traditional Mode ! ! Traditional warnings ! ==================== ! ! You can request warnings about features that did not exist, or worked ! differently, in traditional C with the `-Wtraditional' option. GCC ! does not warn about features of ISO C which you must use when you are ! using a conforming compiler, such as the `#' and `##' operators. ! ! Presently `-Wtraditional' warns about: ! ! * Macro parameters that appear within string literals in the macro ! body. In traditional C macro replacement takes place within ! string literals, but does not in ISO C. ! ! * In traditional C, some preprocessor directives did not exist. ! Traditional preprocessors would only consider a line to be a ! directive if the `#' appeared in column 1 on the line. Therefore ! `-Wtraditional' warns about directives that traditional C ! understands but would ignore because the `#' does not appear as the ! first character on the line. It also suggests you hide directives ! like `#pragma' not understood by traditional C by indenting them. ! Some traditional implementations would not recognize `#elif', so it ! suggests avoiding it altogether. ! ! * A function-like macro that appears without an argument list. In ! some traditional preprocessors this was an error. In ISO C it ! merely means that the macro is not expanded. ! ! * The unary plus operator. This did not exist in traditional C. ! ! * The `U' and `LL' integer constant suffixes, which were not ! available in traditional C. (Traditional C does support the `L' ! suffix for simple long integer constants.) You are not warned ! about uses of these suffixes in macros defined in system headers. ! For instance, `UINT_MAX' may well be defined as `4294967295U', but ! you will not be warned if you use `UINT_MAX'. ! ! You can usually avoid the warning, and the related warning about ! constants which are so large that they are unsigned, by writing the ! integer constant in question in hexadecimal, with no U suffix. ! Take care, though, because this gives the wrong result in exotic ! cases. ! !  ! File: cpp.info, Node: Implementation Details, Next: Invocation, Prev: Traditional Mode, Up: Top ! ! Implementation Details ! ********************** ! ! Here we document details of how the preprocessor's implementation ! affects its user-visible behavior. You should try to avoid undue ! reliance on behavior described here, as it is possible that it will ! change subtly in future implementations. ! ! Also documented here are obsolete features and changes from previous ! versions of CPP. ! ! * Menu: ! ! * Implementation-defined behavior:: ! * Implementation limits:: ! * Obsolete Features:: ! * Differences from previous versions:: ! !  ! File: cpp.info, Node: Implementation-defined behavior, Next: Implementation limits, Up: Implementation Details ! ! Implementation-defined behavior ! =============================== ! ! This is how CPP behaves in all the cases which the C standard ! describes as "implementation-defined". This term means that the ! implementation is free to do what it likes, but must document its choice ! and stick to it. ! ! * The mapping of physical source file multi-byte characters to the ! execution character set. ! ! Currently, GNU cpp only supports character sets that are strict ! supersets of ASCII, and performs no translation of characters. ! ! * Non-empty sequences of whitespace characters. ! ! In textual output, each whitespace sequence is collapsed to a ! single space. For aesthetic reasons, the first token on each ! non-directive line of output is preceded with sufficient spaces ! that it appears in the same column as it did in the original ! source file. ! ! * The numeric value of character constants in preprocessor ! expressions. ! ! The preprocessor and compiler interpret character constants in the ! same way; i.e. escape sequences such as `\a' are given the values ! they would have on the target machine. ! ! The compiler values a multi-character character constant a ! character at a time, shifting the previous value left by the ! number of bits per target character, and then or-ing in the ! bit-pattern of the new character truncated to the width of a ! target character. The final bit-pattern is given type `int', and ! is therefore signed, regardless of whether single characters are ! signed or not (a slight change from versions 3.1 and earlier of ! GCC). If there are more characters in the constant than would fit ! in the target `int' the compiler issues a warning, and the excess ! leading characters are ignored. ! ! For example, 'ab' for a target with an 8-bit `char' would be ! interpreted as ! (int) ((unsigned char) 'a' * 256 + (unsigned char) 'b'), and ! '\234a' as ! (int) ((unsigned char) '\234' * 256 + (unsigned char) 'a'). ! ! * Source file inclusion. ! ! For a discussion on how the preprocessor locates header files, ! *Note Include Operation::. ! ! * Interpretation of the filename resulting from a macro-expanded ! `#include' directive. ! ! *Note Computed Includes::. ! ! * Treatment of a `#pragma' directive that after macro-expansion ! results in a standard pragma. ! ! No macro expansion occurs on any `#pragma' directive line, so the ! question does not arise. ! ! Note that GCC does not yet implement any of the standard pragmas. ! ! !  ! File: cpp.info, Node: Implementation limits, Next: Obsolete Features, Prev: Implementation-defined behavior, Up: Implementation Details ! ! Implementation limits ! ===================== ! ! CPP has a small number of internal limits. This section lists the ! limits which the C standard requires to be no lower than some minimum, ! and all the others we are aware of. We intend there to be as few limits ! as possible. If you encounter an undocumented or inconvenient limit, ! please report that to us as a bug. (See the section on reporting bugs ! in the GCC manual.) ! ! Where we say something is limited "only by available memory", that ! means that internal data structures impose no intrinsic limit, and space ! is allocated with `malloc' or equivalent. The actual limit will ! therefore depend on many things, such as the size of other things ! allocated by the compiler at the same time, the amount of memory ! consumed by other processes on the same computer, etc. ! ! * Nesting levels of `#include' files. ! ! We impose an arbitrary limit of 200 levels, to avoid runaway ! recursion. The standard requires at least 15 levels. ! ! * Nesting levels of conditional inclusion. ! ! The C standard mandates this be at least 63. CPP is limited only ! by available memory. ! ! * Levels of parenthesized expressions within a full expression. ! ! The C standard requires this to be at least 63. In preprocessor ! conditional expressions, it is limited only by available memory. ! ! * Significant initial characters in an identifier or macro name. ! ! The preprocessor treats all characters as significant. The C ! standard requires only that the first 63 be significant. ! ! * Number of macros simultaneously defined in a single translation ! unit. ! ! The standard requires at least 4095 be possible. CPP is limited ! only by available memory. ! ! * Number of parameters in a macro definition and arguments in a ! macro call. ! ! We allow `USHRT_MAX', which is no smaller than 65,535. The minimum ! required by the standard is 127. ! ! * Number of characters on a logical source line. ! ! The C standard requires a minimum of 4096 be permitted. CPP places ! no limits on this, but you may get incorrect column numbers ! reported in diagnostics for lines longer than 65,535 characters. ! ! * Maximum size of a source file. ! ! The standard does not specify any lower limit on the maximum size ! of a source file. GNU cpp maps files into memory, so it is ! limited by the available address space. This is generally at ! least two gigabytes. Depending on the operating system, the size ! of physical memory may or may not be a limitation. ! ! !  ! File: cpp.info, Node: Obsolete Features, Next: Differences from previous versions, Prev: Implementation limits, Up: Implementation Details ! ! Obsolete Features ! ================= ! ! CPP has a number of features which are present mainly for ! compatibility with older programs. We discourage their use in new code. ! In some cases, we plan to remove the feature in a future version of GCC. ! ! * Menu: ! ! * Assertions:: ! * Obsolete once-only headers:: ! !  ! File: cpp.info, Node: Assertions, Next: Obsolete once-only headers, Up: Obsolete Features ! ! Assertions ! ---------- ! ! "Assertions" are a deprecated alternative to macros in writing ! conditionals to test what sort of computer or system the compiled ! program will run on. Assertions are usually predefined, but you can ! define them with preprocessing directives or command-line options. ! ! Assertions were intended to provide a more systematic way to describe ! the compiler's target system. However, in practice they are just as ! unpredictable as the system-specific predefined macros. In addition, ! they are not part of any standard, and only a few compilers support ! them. Therefore, the use of assertions is *less* portable than the use ! of system-specific predefined macros. We recommend you do not use them ! at all. ! ! An assertion looks like this: ! ! #PREDICATE (ANSWER) ! ! PREDICATE must be a single identifier. ANSWER can be any sequence of ! tokens; all characters are significant except for leading and trailing ! whitespace, and differences in internal whitespace sequences are ! ignored. (This is similar to the rules governing macro redefinition.) ! Thus, `(x + y)' is different from `(x+y)' but equivalent to ! `( x + y )'. Parentheses do not nest inside an answer. ! ! To test an assertion, you write it in an `#if'. For example, this ! conditional succeeds if either `vax' or `ns16000' has been asserted as ! an answer for `machine'. ! ! #if #machine (vax) || #machine (ns16000) ! ! You can test whether _any_ answer is asserted for a predicate by ! omitting the answer in the conditional: ! ! #if #machine ! ! Assertions are made with the `#assert' directive. Its sole argument ! is the assertion to make, without the leading `#' that identifies ! assertions in conditionals. ! ! #assert PREDICATE (ANSWER) ! ! You may make several assertions with the same predicate and different ! answers. Subsequent assertions do not override previous ones for the ! same predicate. All the answers for any given predicate are ! simultaneously true. ! ! Assertions can be canceled with the `#unassert' directive. It has ! the same syntax as `#assert'. In that form it cancels only the answer ! which was specified on the `#unassert' line; other answers for that ! predicate remain true. You can cancel an entire predicate by leaving ! out the answer: ! ! #unassert PREDICATE ! ! In either form, if no such assertion has been made, `#unassert' has no ! effect. ! ! You can also make or cancel assertions using command line options. ! *Note Invocation::. ! !  ! File: cpp.info, Node: Obsolete once-only headers, Prev: Assertions, Up: Obsolete Features ! ! Obsolete once-only headers ! -------------------------- ! ! CPP supports two more ways of indicating that a header file should be ! read only once. Neither one is as portable as a wrapper `#ifndef', and ! we recommend you do not use them in new programs. ! ! In the Objective-C language, there is a variant of `#include' called ! `#import' which includes a file, but does so at most once. If you use ! `#import' instead of `#include', then you don't need the conditionals ! inside the header file to prevent multiple inclusion of the contents. ! GCC permits the use of `#import' in C and C++ as well as Objective-C. ! However, it is not in standard C or C++ and should therefore not be ! used by portable programs. ! ! `#import' is not a well designed feature. It requires the users of ! a header file to know that it should only be included once. It is much ! better for the header file's implementor to write the file so that users ! don't need to know this. Using a wrapper `#ifndef' accomplishes this ! goal. ! ! In the present implementation, a single use of `#import' will ! prevent the file from ever being read again, by either `#import' or ! `#include'. You should not rely on this; do not use both `#import' and ! `#include' to refer to the same header file. ! ! Another way to prevent a header file from being included more than ! once is with the `#pragma once' directive. If `#pragma once' is seen ! when scanning a header file, that file will never be read again, no ! matter what. ! ! `#pragma once' does not have the problems that `#import' does, but ! it is not recognized by all preprocessors, so you cannot rely on it in ! a portable program. ! !  ! File: cpp.info, Node: Differences from previous versions, Prev: Obsolete Features, Up: Implementation Details ! ! Differences from previous versions ! ================================== ! ! This section details behavior which has changed from previous ! versions of CPP. We do not plan to change it again in the near future, ! but we do not promise not to, either. ! ! The "previous versions" discussed here are 2.95 and before. The ! behavior of GCC 3.0 is mostly the same as the behavior of the widely ! used 2.96 and 2.97 development snapshots. Where there are differences, ! they generally represent bugs in the snapshots. ! ! * Order of evaluation of `#' and `##' operators ! ! The standard does not specify the order of evaluation of a chain of ! `##' operators, nor whether `#' is evaluated before, after, or at ! the same time as `##'. You should therefore not write any code ! which depends on any specific ordering. It is possible to ! guarantee an ordering, if you need one, by suitable use of nested ! macros. ! ! An example of where this might matter is pasting the arguments `1', ! `e' and `-2'. This would be fine for left-to-right pasting, but ! right-to-left pasting would produce an invalid token `e-2'. ! ! GCC 3.0 evaluates `#' and `##' at the same time and strictly left ! to right. Older versions evaluated all `#' operators first, then ! all `##' operators, in an unreliable order. ! ! * The form of whitespace between tokens in preprocessor output ! ! *Note Preprocessor Output::, for the current textual format. This ! is also the format used by stringification. Normally, the ! preprocessor communicates tokens directly to the compiler's ! parser, and whitespace does not come up at all. ! ! Older versions of GCC preserved all whitespace provided by the ! user and inserted lots more whitespace of their own, because they ! could not accurately predict when extra spaces were needed to ! prevent accidental token pasting. ! ! * Optional argument when invoking rest argument macros ! ! As an extension, GCC permits you to omit the variable arguments ! entirely when you use a variable argument macro. This is ! forbidden by the 1999 C standard, and will provoke a pedantic ! warning with GCC 3.0. Previous versions accepted it silently. ! ! * `##' swallowing preceding text in rest argument macros ! ! Formerly, in a macro expansion, if `##' appeared before a variable ! arguments parameter, and the set of tokens specified for that ! argument in the macro invocation was empty, previous versions of ! CPP would back up and remove the preceding sequence of ! non-whitespace characters (*not* the preceding token). This ! extension is in direct conflict with the 1999 C standard and has ! been drastically pared back. ! ! In the current version of the preprocessor, if `##' appears between ! a comma and a variable arguments parameter, and the variable ! argument is omitted entirely, the comma will be removed from the ! expansion. If the variable argument is empty, or the token before ! `##' is not a comma, then `##' behaves as a normal token paste. ! ! * `#line' and `#include' ! ! The `#line' directive used to change GCC's notion of the ! "directory containing the current file," used by `#include' with a ! double-quoted header file name. In 3.0 and later, it does not. ! *Note Line Control::, for further explanation. ! ! * Syntax of `#line' ! ! In GCC 2.95 and previous, the string constant argument to `#line' ! was treated the same way as the argument to `#include': backslash ! escapes were not honored, and the string ended at the second `"'. ! This is not compliant with the C standard. In GCC 3.0, an attempt ! was made to correct the behavior, so that the string was treated ! as a real string constant, but it turned out to be buggy. In 3.1, ! the bugs have been fixed. (We are not fixing the bugs in 3.0 ! because they affect relatively few people and the fix is quite ! invasive.) ! ! !  ! File: cpp.info, Node: Invocation, Next: Environment Variables, Prev: Implementation Details, Up: Top ! ! Invocation ! ********** ! ! Most often when you use the C preprocessor you will not have to ! invoke it explicitly: the C compiler will do so automatically. ! However, the preprocessor is sometimes useful on its own. All the ! options listed here are also acceptable to the C compiler and have the ! same meaning, except that the C compiler has different rules for ! specifying the output file. ! ! *Note:* Whether you use the preprocessor by way of `gcc' or `cpp', ! the "compiler driver" is run first. This program's purpose is to ! translate your command into invocations of the programs that do the ! actual work. Their command line interfaces are similar but not ! identical to the documented interface, and may change without notice. ! ! The C preprocessor expects two file names as arguments, INFILE and ! OUTFILE. The preprocessor reads INFILE together with any other files ! it specifies with `#include'. All the output generated by the combined ! input files is written in OUTFILE. ! ! Either INFILE or OUTFILE may be `-', which as INFILE means to read ! from standard input and as OUTFILE means to write to standard output. ! Also, if either file is omitted, it means the same as if `-' had been ! specified for that file. ! ! Unless otherwise noted, or the option ends in `=', all options which ! take an argument may have that argument appear either immediately after ! the option, or with a space between option and argument: `-Ifoo' and ! `-I foo' have the same effect. ! ! Many options have multi-letter names; therefore multiple ! single-letter options may _not_ be grouped: `-dM' is very different from ! `-d -M'. ! ! `-D NAME' ! Predefine NAME as a macro, with definition `1'. ! ! `-D NAME=DEFINITION' ! Predefine NAME as a macro, with definition DEFINITION. There are ! no restrictions on the contents of DEFINITION, but if you are ! invoking the preprocessor from a shell or shell-like program you ! may need to use the shell's quoting syntax to protect characters ! such as spaces that have a meaning in the shell syntax. ! ! If you wish to define a function-like macro on the command line, ! write its argument list with surrounding parentheses before the ! equals sign (if any). Parentheses are meaningful to most shells, ! so you will need to quote the option. With `sh' and `csh', ! `-D'NAME(ARGS...)=DEFINITION'' works. ! ! `-D' and `-U' options are processed in the order they are given on ! the command line. All `-imacros FILE' and `-include FILE' options ! are processed after all `-D' and `-U' options. ! ! `-U NAME' ! Cancel any previous definition of NAME, either built in or ! provided with a `-D' option. ! ! `-undef' ! Do not predefine any system-specific macros. The common predefined ! macros remain defined. ! ! `-I DIR' ! Add the directory DIR to the list of directories to be searched ! for header files. *Note Search Path::. Directories named by `-I' ! are searched before the standard system include directories. If ! the directory DIR is a standard system include directory, the ! option is ignored to ensure that the default search order for ! system directories and the special treatment of system headers are ! not defeated (*note System Headers::) . ! ! `-o FILE' ! Write output to FILE. This is the same as specifying FILE as the ! second non-option argument to `cpp'. `gcc' has a different ! interpretation of a second non-option argument, so you must use ! `-o' to specify the output file. ! ! `-Wall' ! Turns on all optional warnings which are desirable for normal ! code. At present this is `-Wcomment' and `-Wtrigraphs'. Note that ! many of the preprocessor's warnings are on by default and have no ! options to control them. ! ! `-Wcomment' ! `-Wcomments' ! Warn whenever a comment-start sequence `/*' appears in a `/*' ! comment, or whenever a backslash-newline appears in a `//' comment. ! (Both forms have the same effect.) ! ! `-Wtrigraphs' ! Warn if any trigraphs are encountered. This option used to take ! effect only if `-trigraphs' was also specified, but now works ! independently. Warnings are not given for trigraphs within ! comments, as they do not affect the meaning of the program. ! ! `-Wtraditional' ! Warn about certain constructs that behave differently in ! traditional and ISO C. Also warn about ISO C constructs that have ! no traditional C equivalent, and problematic constructs which ! should be avoided. *Note Traditional Mode::. ! ! `-Wimport' ! Warn the first time `#import' is used. ! ! `-Wundef' ! Warn whenever an identifier which is not a macro is encountered in ! an `#if' directive, outside of `defined'. Such identifiers are ! replaced with zero. ! ! `-Wunused-macros' ! Warn about macros defined in the main file that are unused. A ! macro is "used" if it is expanded or tested for existence at least ! once. The preprocessor will also warn if the macro has not been ! used at the time it is redefined or undefined. ! ! Built-in macros, macros defined on the command line, and macros ! defined in include files are not warned about. ! ! *Note:* If a macro is actually used, but only used in skipped ! conditional blocks, then CPP will report it as unused. To avoid ! the warning in such a case, you might improve the scope of the ! macro's definition by, for example, moving it into the first ! skipped block. Alternatively, you could provide a dummy use with ! something like: ! ! #if defined the_macro_causing_the_warning ! #endif ! ! `-Wendif-labels' ! Warn whenever an `#else' or an `#endif' are followed by text. ! This usually happens in code of the form ! ! #if FOO ! ... ! #else FOO ! ... ! #endif FOO ! ! The second and third `FOO' should be in comments, but often are not ! in older programs. This warning is on by default. ! ! `-Werror' ! Make all warnings into hard errors. Source code which triggers ! warnings will be rejected. ! ! `-Wsystem-headers' ! Issue warnings for code in system headers. These are normally ! unhelpful in finding bugs in your own code, therefore suppressed. ! If you are responsible for the system library, you may want to see ! them. ! ! `-w' ! Suppress all warnings, including those which GNU CPP issues by ! default. ! ! `-pedantic' ! Issue all the mandatory diagnostics listed in the C standard. ! Some of them are left out by default, since they trigger ! frequently on harmless code. ! ! `-pedantic-errors' ! Issue all the mandatory diagnostics, and make all mandatory ! diagnostics into errors. This includes mandatory diagnostics that ! GCC issues without `-pedantic' but treats as warnings. ! ! `-M' ! Instead of outputting the result of preprocessing, output a rule ! suitable for `make' describing the dependencies of the main source ! file. The preprocessor outputs one `make' rule containing the ! object file name for that source file, a colon, and the names of ! all the included files, including those coming from `-include' or ! `-imacros' command line options. ! ! Unless specified explicitly (with `-MT' or `-MQ'), the object file ! name consists of the basename of the source file with any suffix ! replaced with object file suffix. If there are many included ! files then the rule is split into several lines using `\'-newline. ! The rule has no commands. ! ! This option does not suppress the preprocessor's debug output, ! such as `-dM'. To avoid mixing such debug output with the ! dependency rules you should explicitly specify the dependency ! output file with `-MF', or use an environment variable like ! `DEPENDENCIES_OUTPUT' (*note Environment Variables::). Debug ! output will still be sent to the regular output stream as normal. ! ! Passing `-M' to the driver implies `-E', and suppresses warnings ! with an implicit `-w'. ! ! `-MM' ! Like `-M' but do not mention header files that are found in system ! header directories, nor header files that are included, directly ! or indirectly, from such a header. ! ! This implies that the choice of angle brackets or double quotes in ! an `#include' directive does not in itself determine whether that ! header will appear in `-MM' dependency output. This is a slight ! change in semantics from GCC versions 3.0 and earlier. ! ! `-MF FILE' ! When used with `-M' or `-MM', specifies a file to write the ! dependencies to. If no `-MF' switch is given the preprocessor ! sends the rules to the same place it would have sent preprocessed ! output. ! ! When used with the driver options `-MD' or `-MMD', `-MF' overrides ! the default dependency output file. ! ! `-MG' ! In conjunction with an option such as `-M' requesting dependency ! generation, `-MG' assumes missing header files are generated files ! and adds them to the dependency list without raising an error. ! The dependency filename is taken directly from the `#include' ! directive without prepending any path. `-MG' also suppresses ! preprocessed output, as a missing header file renders this useless. ! ! This feature is used in automatic updating of makefiles. ! ! `-MP' ! This option instructs CPP to add a phony target for each dependency ! other than the main file, causing each to depend on nothing. These ! dummy rules work around errors `make' gives if you remove header ! files without updating the `Makefile' to match. ! ! This is typical output: ! ! test.o: test.c test.h ! ! test.h: ! ! `-MT TARGET' ! Change the target of the rule emitted by dependency generation. By ! default CPP takes the name of the main input file, including any ! path, deletes any file suffix such as `.c', and appends the ! platform's usual object suffix. The result is the target. ! ! An `-MT' option will set the target to be exactly the string you ! specify. If you want multiple targets, you can specify them as a ! single argument to `-MT', or use multiple `-MT' options. ! ! For example, `-MT '$(objpfx)foo.o'' might give ! ! $(objpfx)foo.o: foo.c ! ! `-MQ TARGET' ! Same as `-MT', but it quotes any characters which are special to ! Make. `-MQ '$(objpfx)foo.o'' gives ! ! $$(objpfx)foo.o: foo.c ! ! The default target is automatically quoted, as if it were given ! with `-MQ'. ! ! `-MD' ! `-MD' is equivalent to `-M -MF FILE', except that `-E' is not ! implied. The driver determines FILE based on whether an `-o' ! option is given. If it is, the driver uses its argument but with ! a suffix of `.d', otherwise it take the basename of the input file ! and applies a `.d' suffix. ! ! If `-MD' is used in conjunction with `-E', any `-o' switch is ! understood to specify the dependency output file (but *note ! -MF::), but if used without `-E', each `-o' is understood to ! specify a target object file. ! ! Since `-E' is not implied, `-MD' can be used to generate a ! dependency output file as a side-effect of the compilation process. ! ! `-MMD' ! Like `-MD' except mention only user header files, not system ! -header files. ! ! `-x c' ! `-x c++' ! `-x objective-c' ! `-x assembler-with-cpp' ! Specify the source language: C, C++, Objective-C, or assembly. ! This has nothing to do with standards conformance or extensions; ! it merely selects which base syntax to expect. If you give none ! of these options, cpp will deduce the language from the extension ! of the source file: `.c', `.cc', `.m', or `.S'. Some other common ! extensions for C++ and assembly are also recognized. If cpp does ! not recognize the extension, it will treat the file as C; this is ! the most generic mode. ! ! *Note:* Previous versions of cpp accepted a `-lang' option which ! selected both the language and the standards conformance level. ! This option has been removed, because it conflicts with the `-l' ! option. ! ! `-std=STANDARD' ! `-ansi' ! Specify the standard to which the code should conform. Currently ! CPP knows about C and C++ standards; others may be added in the ! future. ! ! STANDARD may be one of: ! `iso9899:1990' ! `c89' ! The ISO C standard from 1990. `c89' is the customary ! shorthand for this version of the standard. ! ! The `-ansi' option is equivalent to `-std=c89'. ! ! `iso9899:199409' ! The 1990 C standard, as amended in 1994. ! ! `iso9899:1999' ! `c99' ! `iso9899:199x' ! `c9x' ! The revised ISO C standard, published in December 1999. ! Before publication, this was known as C9X. ! ! `gnu89' ! The 1990 C standard plus GNU extensions. This is the default. ! ! `gnu99' ! `gnu9x' ! The 1999 C standard plus GNU extensions. ! ! `c++98' ! The 1998 ISO C++ standard plus amendments. ! ! `gnu++98' ! The same as `-std=c++98' plus GNU extensions. This is the ! default for C++ code. ! ! `-I-' ! Split the include path. Any directories specified with `-I' ! options before `-I-' are searched only for headers requested with ! `#include "FILE"'; they are not searched for `#include '. ! If additional directories are specified with `-I' options after ! the `-I-', those directories are searched for all `#include' ! directives. ! ! In addition, `-I-' inhibits the use of the directory of the current ! file directory as the first search directory for `#include "FILE"'. ! *Note Search Path::. ! ! `-nostdinc' ! Do not search the standard system directories for header files. ! Only the directories you have specified with `-I' options (and the ! directory of the current file, if appropriate) are searched. ! ! `-nostdinc++' ! Do not search for header files in the C++-specific standard ! directories, but do still search the other standard directories. ! (This option is used when building the C++ library.) ! ! `-include FILE' ! Process FILE as if `#include "file"' appeared as the first line of ! the primary source file. However, the first directory searched ! for FILE is the preprocessor's working directory _instead of_ the ! directory containing the main source file. If not found there, it ! is searched for in the remainder of the `#include "..."' search ! chain as normal. ! ! If multiple `-include' options are given, the files are included ! in the order they appear on the command line. ! ! `-imacros FILE' ! Exactly like `-include', except that any output produced by ! scanning FILE is thrown away. Macros it defines remain defined. ! This allows you to acquire all the macros from a header without ! also processing its declarations. ! ! All files specified by `-imacros' are processed before all files ! specified by `-include'. ! ! `-idirafter DIR' ! Search DIR for header files, but do it _after_ all directories ! specified with `-I' and the standard system directories have been ! exhausted. DIR is treated as a system include directory. ! ! `-iprefix PREFIX' ! Specify PREFIX as the prefix for subsequent `-iwithprefix' ! options. If the prefix represents a directory, you should include ! the final `/'. ! ! `-iwithprefix DIR' ! `-iwithprefixbefore DIR' ! Append DIR to the prefix specified previously with `-iprefix', and ! add the resulting directory to the include search path. ! `-iwithprefixbefore' puts it in the same place `-I' would; ! `-iwithprefix' puts it where `-idirafter' would. ! ! Use of these options is discouraged. ! ! `-isystem DIR' ! Search DIR for header files, after all directories specified by ! `-I' but before the standard system directories. Mark it as a ! system directory, so that it gets the same special treatment as is ! applied to the standard system directories. *Note System ! Headers::. ! ! `-fpreprocessed' ! Indicate to the preprocessor that the input file has already been ! preprocessed. This suppresses things like macro expansion, ! trigraph conversion, escaped newline splicing, and processing of ! most directives. The preprocessor still recognizes and removes ! comments, so that you can pass a file preprocessed with `-C' to ! the compiler without problems. In this mode the integrated ! preprocessor is little more than a tokenizer for the front ends. ! ! `-fpreprocessed' is implicit if the input file has one of the ! extensions `.i', `.ii' or `.mi'. These are the extensions that ! GCC uses for preprocessed files created by `-save-temps'. ! ! `-ftabstop=WIDTH' ! Set the distance between tab stops. This helps the preprocessor ! report correct column numbers in warnings or errors, even if tabs ! appear on the line. If the value is less than 1 or greater than ! 100, the option is ignored. The default is 8. ! ! `-fno-show-column' ! Do not print column numbers in diagnostics. This may be necessary ! if diagnostics are being scanned by a program that does not ! understand the column numbers, such as `dejagnu'. ! ! `-A PREDICATE=ANSWER' ! Make an assertion with the predicate PREDICATE and answer ANSWER. ! This form is preferred to the older form `-A PREDICATE(ANSWER)', ! which is still supported, because it does not use shell special ! characters. *Note Assertions::. ! ! `-A -PREDICATE=ANSWER' ! Cancel an assertion with the predicate PREDICATE and answer ANSWER. ! ! `-dCHARS' ! CHARS is a sequence of one or more of the following characters, ! and must not be preceded by a space. Other characters are ! interpreted by the compiler proper, or reserved for future ! versions of GCC, and so are silently ignored. If you specify ! characters whose behavior conflicts, the result is undefined. ! ! `M' ! Instead of the normal output, generate a list of `#define' ! directives for all the macros defined during the execution of ! the preprocessor, including predefined macros. This gives ! you a way of finding out what is predefined in your version ! of the preprocessor. Assuming you have no file `foo.h', the ! command ! ! touch foo.h; cpp -dM foo.h ! ! will show all the predefined macros. ! ! `D' ! Like `M' except in two respects: it does _not_ include the ! predefined macros, and it outputs _both_ the `#define' ! directives and the result of preprocessing. Both kinds of ! output go to the standard output file. ! ! `N' ! Like `D', but emit only the macro names, not their expansions. ! ! `I' ! Output `#include' directives in addition to the result of ! preprocessing. ! ! `-P' ! Inhibit generation of linemarkers in the output from the ! preprocessor. This might be useful when running the preprocessor ! on something that is not C code, and will be sent to a program ! which might be confused by the linemarkers. *Note Preprocessor ! Output::. ! ! `-C' ! Do not discard comments. All comments are passed through to the ! output file, except for comments in processed directives, which ! are deleted along with the directive. ! ! You should be prepared for side effects when using `-C'; it causes ! the preprocessor to treat comments as tokens in their own right. ! For example, comments appearing at the start of what would be a ! directive line have the effect of turning that line into an ! ordinary source line, since the first token on the line is no ! longer a `#'. ! ! `-CC' ! Do not discard comments, including during macro expansion. This is ! like `-C', except that comments contained within macros are also ! passed through to the output file where the macro is expanded. ! ! In addition to the side-effects of the `-C' option, the `-CC' ! option causes all C++-style comments inside a macro to be ! converted to C-style comments. This is to prevent later use of ! that macro from inadvertently commenting out the remainder of the ! source line. ! ! The `-CC' option is generally used to support lint comments. ! ! `-gcc' ! Define the macros __GNUC__, __GNUC_MINOR__ and ! __GNUC_PATCHLEVEL__. These are defined automatically when you use ! `gcc -E'; you can turn them off in that case with `-no-gcc'. ! ! `-traditional-cpp' ! Try to imitate the behavior of old-fashioned C preprocessors, as ! opposed to ISO C preprocessors. *Note Traditional Mode::. ! ! `-trigraphs' ! Process trigraph sequences. *Note Initial processing::. ! ! `-remap' ! Enable special code to work around file systems which only permit ! very short file names, such as MS-DOS. ! ! `--help' ! `--target-help' ! Print text describing all the command line options instead of ! preprocessing anything. ! ! `-v' ! Verbose mode. Print out GNU CPP's version number at the beginning ! of execution, and report the final form of the include path. ! ! `-H' ! Print the name of each header file used, in addition to other ! normal activities. Each name is indented to show how deep in the ! `#include' stack it is. ! ! `-version' ! `--version' ! Print out GNU CPP's version number. With one dash, proceed to ! preprocess as normal. With two dashes, exit immediately. ! !  ! File: cpp.info, Node: Environment Variables, Next: GNU Free Documentation License, Prev: Invocation, Up: Top ! ! Environment Variables ! ********************* ! ! This section describes the environment variables that affect how CPP ! operates. You can use them to specify directories or prefixes to use ! when searching for include files, or to control dependency output. ! ! Note that you can also specify places to search using options such as ! `-I', and control dependency output with options like `-M' (*note ! Invocation::). These take precedence over environment variables, which ! in turn take precedence over the configuration of GCC. ! ! `CPATH' ! `C_INCLUDE_PATH' ! `CPLUS_INCLUDE_PATH' ! `OBJC_INCLUDE_PATH' ! Each variable's value is a list of directories separated by a ! special character, much like `PATH', in which to look for header ! files. The special character, `PATH_SEPARATOR', is ! target-dependent and determined at GCC build time. For ! Windows-based targets it is a semicolon, and for almost all other ! targets it is a colon. ! ! `CPATH' specifies a list of directories to be searched as if ! specified with `-I', but after any paths given with `-I' options ! on the command line. This environment variable is used regardless ! of which language is being preprocessed. ! ! The remaining environment variables apply only when preprocessing ! the particular language indicated. Each specifies a list of ! directories to be searched as if specified with `-isystem', but ! after any paths given with `-isystem' options on the command line. ! ! In all these variables, an empty element instructs the compiler to ! search its current working directory. Empty elements can appear ! at the beginning or end of a path. For instance, if the value of ! `CPATH' is `:/special/include', that has the same effect as ! `-I. -I/special/include'. ! ! See also *Note Search Path::. ! ! `DEPENDENCIES_OUTPUT' ! If this variable is set, its value specifies how to output ! dependencies for Make based on the non-system header files ! processed by the compiler. System header files are ignored in the ! dependency output. ! ! The value of `DEPENDENCIES_OUTPUT' can be just a file name, in ! which case the Make rules are written to that file, guessing the ! target name from the source file name. Or the value can have the ! form `FILE TARGET', in which case the rules are written to file ! FILE using TARGET as the target name. ! ! In other words, this environment variable is equivalent to ! combining the options `-MM' and `-MF' (*note Invocation::), with ! an optional `-MT' switch too. ! ! `SUNPRO_DEPENDENCIES' ! This variable is the same as `DEPENDENCIES_OUTPUT' (see above), ! except that system header files are not ignored, so it implies ! `-M' rather than `-MM'. However, the dependence on the main input ! file is omitted. *Note Invocation::. ! !  ! File: cpp.info, Node: GNU Free Documentation License, Next: Index of Directives, Prev: Environment Variables, Up: Top ! ! GNU Free Documentation License ! ****************************** ! ! Version 1.2, November 2002 ! Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. ! 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA ! ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! ! 0. PREAMBLE ! ! The purpose of this License is to make a manual, textbook, or other ! functional and useful document "free" in the sense of freedom: to ! assure everyone the effective freedom to copy and redistribute it, ! with or without modifying it, either commercially or ! noncommercially. Secondarily, this License preserves for the ! author and publisher a way to get credit for their work, while not ! being considered responsible for modifications made by others. ! ! This License is a kind of "copyleft", which means that derivative ! works of the document must themselves be free in the same sense. ! It complements the GNU General Public License, which is a copyleft ! license designed for free software. ! ! We have designed this License in order to use it for manuals for ! free software, because free software needs free documentation: a ! free program should come with manuals providing the same freedoms ! that the software does. But this License is not limited to ! software manuals; it can be used for any textual work, regardless ! of subject matter or whether it is published as a printed book. ! We recommend this License principally for works whose purpose is ! instruction or reference. ! ! 1. APPLICABILITY AND DEFINITIONS ! ! This License applies to any manual or other work, in any medium, ! that contains a notice placed by the copyright holder saying it ! can be distributed under the terms of this License. Such a notice ! grants a world-wide, royalty-free license, unlimited in duration, ! to use that work under the conditions stated herein. The ! "Document", below, refers to any such manual or work. Any member ! of the public is a licensee, and is addressed as "you". You ! accept the license if you copy, modify or distribute the work in a ! way requiring permission under copyright law. ! ! A "Modified Version" of the Document means any work containing the ! Document or a portion of it, either copied verbatim, or with ! modifications and/or translated into another language. ! ! A "Secondary Section" is a named appendix or a front-matter section ! of the Document that deals exclusively with the relationship of the ! publishers or authors of the Document to the Document's overall ! subject (or to related matters) and contains nothing that could ! fall directly within that overall subject. (Thus, if the Document ! is in part a textbook of mathematics, a Secondary Section may not ! explain any mathematics.) The relationship could be a matter of ! historical connection with the subject or with related matters, or ! of legal, commercial, philosophical, ethical or political position ! regarding them. ! ! The "Invariant Sections" are certain Secondary Sections whose ! titles are designated, as being those of Invariant Sections, in ! the notice that says that the Document is released under this ! License. If a section does not fit the above definition of ! Secondary then it is not allowed to be designated as Invariant. ! The Document may contain zero Invariant Sections. If the Document ! does not identify any Invariant Sections then there are none. ! ! The "Cover Texts" are certain short passages of text that are ! listed, as Front-Cover Texts or Back-Cover Texts, in the notice ! that says that the Document is released under this License. A ! Front-Cover Text may be at most 5 words, and a Back-Cover Text may ! be at most 25 words. ! ! A "Transparent" copy of the Document means a machine-readable copy, ! represented in a format whose specification is available to the ! general public, that is suitable for revising the document ! straightforwardly with generic text editors or (for images ! composed of pixels) generic paint programs or (for drawings) some ! widely available drawing editor, and that is suitable for input to ! text formatters or for automatic translation to a variety of ! formats suitable for input to text formatters. A copy made in an ! otherwise Transparent file format whose markup, or absence of ! markup, has been arranged to thwart or discourage subsequent ! modification by readers is not Transparent. An image format is ! not Transparent if used for any substantial amount of text. A ! copy that is not "Transparent" is called "Opaque". ! ! Examples of suitable formats for Transparent copies include plain ! ASCII without markup, Texinfo input format, LaTeX input format, ! SGML or XML using a publicly available DTD, and ! standard-conforming simple HTML, PostScript or PDF designed for ! human modification. Examples of transparent image formats include ! PNG, XCF and JPG. Opaque formats include proprietary formats that ! can be read and edited only by proprietary word processors, SGML or ! XML for which the DTD and/or processing tools are not generally ! available, and the machine-generated HTML, PostScript or PDF ! produced by some word processors for output purposes only. ! ! The "Title Page" means, for a printed book, the title page itself, ! plus such following pages as are needed to hold, legibly, the ! material this License requires to appear in the title page. For ! works in formats which do not have any title page as such, "Title ! Page" means the text near the most prominent appearance of the ! work's title, preceding the beginning of the body of the text. ! ! A section "Entitled XYZ" means a named subunit of the Document ! whose title either is precisely XYZ or contains XYZ in parentheses ! following text that translates XYZ in another language. (Here XYZ ! stands for a specific section name mentioned below, such as ! "Acknowledgements", "Dedications", "Endorsements", or "History".) ! To "Preserve the Title" of such a section when you modify the ! Document means that it remains a section "Entitled XYZ" according ! to this definition. ! ! The Document may include Warranty Disclaimers next to the notice ! which states that this License applies to the Document. These ! Warranty Disclaimers are considered to be included by reference in ! this License, but only as regards disclaiming warranties: any other ! implication that these Warranty Disclaimers may have is void and ! has no effect on the meaning of this License. ! ! 2. VERBATIM COPYING ! ! You may copy and distribute the Document in any medium, either ! commercially or noncommercially, provided that this License, the ! copyright notices, and the license notice saying this License ! applies to the Document are reproduced in all copies, and that you ! add no other conditions whatsoever to those of this License. You ! may not use technical measures to obstruct or control the reading ! or further copying of the copies you make or distribute. However, ! you may accept compensation in exchange for copies. If you ! distribute a large enough number of copies you must also follow ! the conditions in section 3. ! ! You may also lend copies, under the same conditions stated above, ! and you may publicly display copies. ! ! 3. COPYING IN QUANTITY ! ! If you publish printed copies (or copies in media that commonly ! have printed covers) of the Document, numbering more than 100, and ! the Document's license notice requires Cover Texts, you must ! enclose the copies in covers that carry, clearly and legibly, all ! these Cover Texts: Front-Cover Texts on the front cover, and ! Back-Cover Texts on the back cover. Both covers must also clearly ! and legibly identify you as the publisher of these copies. The ! front cover must present the full title with all words of the ! title equally prominent and visible. You may add other material ! on the covers in addition. Copying with changes limited to the ! covers, as long as they preserve the title of the Document and ! satisfy these conditions, can be treated as verbatim copying in ! other respects. ! ! If the required texts for either cover are too voluminous to fit ! legibly, you should put the first ones listed (as many as fit ! reasonably) on the actual cover, and continue the rest onto ! adjacent pages. ! ! If you publish or distribute Opaque copies of the Document ! numbering more than 100, you must either include a ! machine-readable Transparent copy along with each Opaque copy, or ! state in or with each Opaque copy a computer-network location from ! which the general network-using public has access to download ! using public-standard network protocols a complete Transparent ! copy of the Document, free of added material. If you use the ! latter option, you must take reasonably prudent steps, when you ! begin distribution of Opaque copies in quantity, to ensure that ! this Transparent copy will remain thus accessible at the stated ! location until at least one year after the last time you ! distribute an Opaque copy (directly or through your agents or ! retailers) of that edition to the public. ! ! It is requested, but not required, that you contact the authors of ! the Document well before redistributing any large number of ! copies, to give them a chance to provide you with an updated ! version of the Document. ! ! 4. MODIFICATIONS ! ! You may copy and distribute a Modified Version of the Document ! under the conditions of sections 2 and 3 above, provided that you ! release the Modified Version under precisely this License, with ! the Modified Version filling the role of the Document, thus ! licensing distribution and modification of the Modified Version to ! whoever possesses a copy of it. In addition, you must do these ! things in the Modified Version: ! ! A. Use in the Title Page (and on the covers, if any) a title ! distinct from that of the Document, and from those of ! previous versions (which should, if there were any, be listed ! in the History section of the Document). You may use the ! same title as a previous version if the original publisher of ! that version gives permission. ! ! B. List on the Title Page, as authors, one or more persons or ! entities responsible for authorship of the modifications in ! the Modified Version, together with at least five of the ! principal authors of the Document (all of its principal ! authors, if it has fewer than five), unless they release you ! from this requirement. ! ! C. State on the Title page the name of the publisher of the ! Modified Version, as the publisher. ! ! D. Preserve all the copyright notices of the Document. ! ! E. Add an appropriate copyright notice for your modifications ! adjacent to the other copyright notices. ! ! F. Include, immediately after the copyright notices, a license ! notice giving the public permission to use the Modified ! Version under the terms of this License, in the form shown in ! the Addendum below. ! ! G. Preserve in that license notice the full lists of Invariant ! Sections and required Cover Texts given in the Document's ! license notice. ! ! H. Include an unaltered copy of this License. ! ! I. Preserve the section Entitled "History", Preserve its Title, ! and add to it an item stating at least the title, year, new ! authors, and publisher of the Modified Version as given on ! the Title Page. If there is no section Entitled "History" in ! the Document, create one stating the title, year, authors, ! and publisher of the Document as given on its Title Page, ! then add an item describing the Modified Version as stated in ! the previous sentence. ! ! J. Preserve the network location, if any, given in the Document ! for public access to a Transparent copy of the Document, and ! likewise the network locations given in the Document for ! previous versions it was based on. These may be placed in ! the "History" section. You may omit a network location for a ! work that was published at least four years before the ! Document itself, or if the original publisher of the version ! it refers to gives permission. ! ! K. For any section Entitled "Acknowledgements" or "Dedications", ! Preserve the Title of the section, and preserve in the ! section all the substance and tone of each of the contributor ! acknowledgements and/or dedications given therein. ! ! L. Preserve all the Invariant Sections of the Document, ! unaltered in their text and in their titles. Section numbers ! or the equivalent are not considered part of the section ! titles. ! ! M. Delete any section Entitled "Endorsements". Such a section ! may not be included in the Modified Version. ! ! N. Do not retitle any existing section to be Entitled ! "Endorsements" or to conflict in title with any Invariant ! Section. ! ! O. Preserve any Warranty Disclaimers. ! ! If the Modified Version includes new front-matter sections or ! appendices that qualify as Secondary Sections and contain no ! material copied from the Document, you may at your option ! designate some or all of these sections as invariant. To do this, ! add their titles to the list of Invariant Sections in the Modified ! Version's license notice. These titles must be distinct from any ! other section titles. ! ! You may add a section Entitled "Endorsements", provided it contains ! nothing but endorsements of your Modified Version by various ! parties--for example, statements of peer review or that the text ! has been approved by an organization as the authoritative ! definition of a standard. ! ! You may add a passage of up to five words as a Front-Cover Text, ! and a passage of up to 25 words as a Back-Cover Text, to the end ! of the list of Cover Texts in the Modified Version. Only one ! passage of Front-Cover Text and one of Back-Cover Text may be ! added by (or through arrangements made by) any one entity. If the ! Document already includes a cover text for the same cover, ! previously added by you or by arrangement made by the same entity ! you are acting on behalf of, you may not add another; but you may ! replace the old one, on explicit permission from the previous ! publisher that added the old one. ! ! The author(s) and publisher(s) of the Document do not by this ! License give permission to use their names for publicity for or to ! assert or imply endorsement of any Modified Version. ! ! 5. COMBINING DOCUMENTS ! ! You may combine the Document with other documents released under ! this License, under the terms defined in section 4 above for ! modified versions, provided that you include in the combination ! all of the Invariant Sections of all of the original documents, ! unmodified, and list them all as Invariant Sections of your ! combined work in its license notice, and that you preserve all ! their Warranty Disclaimers. ! ! The combined work need only contain one copy of this License, and ! multiple identical Invariant Sections may be replaced with a single ! copy. If there are multiple Invariant Sections with the same name ! but different contents, make the title of each such section unique ! by adding at the end of it, in parentheses, the name of the ! original author or publisher of that section if known, or else a ! unique number. Make the same adjustment to the section titles in ! the list of Invariant Sections in the license notice of the ! combined work. ! ! In the combination, you must combine any sections Entitled ! "History" in the various original documents, forming one section ! Entitled "History"; likewise combine any sections Entitled ! "Acknowledgements", and any sections Entitled "Dedications". You ! must delete all sections Entitled "Endorsements." ! ! 6. COLLECTIONS OF DOCUMENTS ! ! You may make a collection consisting of the Document and other ! documents released under this License, and replace the individual ! copies of this License in the various documents with a single copy ! that is included in the collection, provided that you follow the ! rules of this License for verbatim copying of each of the ! documents in all other respects. ! ! You may extract a single document from such a collection, and ! distribute it individually under this License, provided you insert ! a copy of this License into the extracted document, and follow ! this License in all other respects regarding verbatim copying of ! that document. ! ! 7. AGGREGATION WITH INDEPENDENT WORKS ! ! A compilation of the Document or its derivatives with other ! separate and independent documents or works, in or on a volume of ! a storage or distribution medium, is called an "aggregate" if the ! copyright resulting from the compilation is not used to limit the ! legal rights of the compilation's users beyond what the individual ! works permit. When the Document is included an aggregate, this ! License does not apply to the other works in the aggregate which ! are not themselves derivative works of the Document. ! ! If the Cover Text requirement of section 3 is applicable to these ! copies of the Document, then if the Document is less than one half ! of the entire aggregate, the Document's Cover Texts may be placed ! on covers that bracket the Document within the aggregate, or the ! electronic equivalent of covers if the Document is in electronic ! form. Otherwise they must appear on printed covers that bracket ! the whole aggregate. ! ! 8. TRANSLATION ! ! Translation is considered a kind of modification, so you may ! distribute translations of the Document under the terms of section ! 4. Replacing Invariant Sections with translations requires special ! permission from their copyright holders, but you may include ! translations of some or all Invariant Sections in addition to the ! original versions of these Invariant Sections. You may include a ! translation of this License, and all the license notices in the ! Document, and any Warrany Disclaimers, provided that you also ! include the original English version of this License and the ! original versions of those notices and disclaimers. In case of a ! disagreement between the translation and the original version of ! this License or a notice or disclaimer, the original version will ! prevail. ! ! If a section in the Document is Entitled "Acknowledgements", ! "Dedications", or "History", the requirement (section 4) to ! Preserve its Title (section 1) will typically require changing the ! actual title. ! ! 9. TERMINATION ! ! You may not copy, modify, sublicense, or distribute the Document ! except as expressly provided for under this License. Any other ! attempt to copy, modify, sublicense or distribute the Document is ! void, and will automatically terminate your rights under this ! License. However, parties who have received copies, or rights, ! from you under this License will not have their licenses ! terminated so long as such parties remain in full compliance. ! ! 10. FUTURE REVISIONS OF THIS LICENSE ! ! The Free Software Foundation may publish new, revised versions of ! the GNU Free Documentation License from time to time. Such new ! versions will be similar in spirit to the present version, but may ! differ in detail to address new problems or concerns. See ! `http://www.gnu.org/copyleft/'. ! ! Each version of the License is given a distinguishing version ! number. If the Document specifies that a particular numbered ! version of this License "or any later version" applies to it, you ! have the option of following the terms and conditions either of ! that specified version or of any later version that has been ! published (not as a draft) by the Free Software Foundation. If ! the Document does not specify a version number of this License, ! you may choose any version ever published (not as a draft) by the ! Free Software Foundation. ! ! ADDENDUM: How to use this License for your documents ! ==================================================== ! ! To use this License in a document you have written, include a copy of ! the License in the document and put the following copyright and license ! notices just after the title page: ! ! Copyright (C) YEAR YOUR NAME. ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 ! or any later version published by the Free Software Foundation; ! with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. ! A copy of the license is included in the section entitled ``GNU ! Free Documentation License''. ! ! If you have Invariant Sections, Front-Cover Texts and Back-Cover ! Texts, replace the "with...Texts." line with this: ! ! with the Invariant Sections being LIST THEIR TITLES, with ! the Front-Cover Texts being LIST, and with the Back-Cover Texts ! being LIST. ! ! If you have Invariant Sections without Cover Texts, or some other ! combination of the three, merge those two alternatives to suit the ! situation. ! ! If your document contains nontrivial examples of program code, we ! recommend releasing these examples in parallel under your choice of ! free software license, such as the GNU General Public License, to ! permit their use in free software. ! !  ! File: cpp.info, Node: Index of Directives, Next: Option Index, Prev: GNU Free Documentation License, Up: Top ! ! Index of Directives ! ******************* ! ! * Menu: ! ! * #assert: Assertions. ! * #define: Object-like Macros. ! * #elif: Elif. ! * #else: Else. ! * #endif: Ifdef. ! * #error: Diagnostics. ! * #ident: Other Directives. ! * #if: Conditional Syntax. ! * #ifdef: Ifdef. ! * #ifndef: Ifdef. ! * #import: Obsolete once-only headers. ! * #include: Include Syntax. ! * #include_next: Wrapper Headers. ! * #line: Line Control. ! * #pragma GCC dependency: Pragmas. ! * #pragma GCC poison: Pragmas. ! * #pragma GCC system_header <1>: Pragmas. ! * #pragma GCC system_header: System Headers. ! * #sccs: Other Directives. ! * #unassert: Assertions. ! * #undef: Undefining and Redefining Macros. ! * #warning: Diagnostics. ! !  ! File: cpp.info, Node: Option Index, Next: Concept Index, Prev: Index of Directives, Up: Top ! ! Option Index ! ************ ! ! CPP's command line options and environment variables are indexed here ! without any initial `-' or `--'. ! ! * Menu: ! ! * A: Invocation. ! * ansi: Invocation. ! * C: Invocation. ! * C_INCLUDE_PATH: Environment Variables. ! * CPATH: Environment Variables. ! * CPLUS_INCLUDE_PATH: Environment Variables. ! * D: Invocation. ! * dD: Invocation. ! * DEPENDENCIES_OUTPUT: Environment Variables. ! * dI: Invocation. ! * dM: Invocation. ! * dN: Invocation. ! * fno-show-column: Invocation. ! * fpreprocessed: Invocation. ! * ftabstop: Invocation. ! * gcc: Invocation. ! * H: Invocation. ! * help: Invocation. ! * I: Invocation. ! * I-: Invocation. ! * idirafter: Invocation. ! * imacros: Invocation. ! * include: Invocation. ! * iprefix: Invocation. ! * isystem: Invocation. ! * iwithprefix: Invocation. ! * iwithprefixbefore: Invocation. ! * M: Invocation. ! * MD: Invocation. ! * MF: Invocation. ! * MG: Invocation. ! * MM: Invocation. ! * MMD: Invocation. ! * MP: Invocation. ! * MQ: Invocation. ! * MT: Invocation. ! * nostdinc: Invocation. ! * nostdinc++: Invocation. ! * o: Invocation. ! * OBJC_INCLUDE_PATH: Environment Variables. ! * P: Invocation. ! * pedantic: Invocation. ! * pedantic-errors: Invocation. ! * remap: Invocation. ! * std=: Invocation. ! * SUNPRO_DEPENDENCIES: Environment Variables. ! * target-help: Invocation. ! * traditional-cpp: Invocation. ! * trigraphs: Invocation. ! * U: Invocation. ! * undef: Invocation. ! * v: Invocation. ! * version: Invocation. ! * w: Invocation. ! * Wall: Invocation. ! * Wcomment: Invocation. ! * Wcomments: Invocation. ! * Wendif-labels: Invocation. ! * Werror: Invocation. ! * Wimport: Invocation. ! * Wsystem-headers: Invocation. ! * Wtraditional: Invocation. ! * Wtrigraphs: Invocation. ! * Wundef: Invocation. ! * Wunused-macros: Invocation. ! * x: Invocation. ! !  ! File: cpp.info, Node: Concept Index, Prev: Option Index, Up: Top ! ! Concept Index ! ************* ! ! * Menu: ! ! * # operator: Stringification. ! * ## operator: Concatenation. ! * _Pragma: Pragmas. ! * alternative tokens: Tokenization. ! * arguments: Macro Arguments. ! * arguments in macro definitions: Macro Arguments. ! * assertions: Assertions. ! * assertions, canceling: Assertions. ! * backslash-newline: Initial processing. ! * block comments: Initial processing. ! * C++ named operators: C++ Named Operators. ! * character constants: Tokenization. ! * character sets: Initial processing. ! * command line: Invocation. ! * commenting out code: Deleted Code. ! * comments: Initial processing. ! * common predefined macros: Common Predefined Macros. ! * computed includes: Computed Includes. ! * concatenation: Concatenation. ! * conditional group: Ifdef. ! * conditionals: Conditionals. ! * continued lines: Initial processing. ! * controlling macro: Once-Only Headers. ! * defined: Defined. ! * dependencies for make as output: Environment Variables. ! * dependencies, make: Invocation. ! * diagnostic: Diagnostics. ! * differences from previous versions: Differences from previous versions. ! * digraphs: Tokenization. ! * directive line: The preprocessing language. ! * directive name: The preprocessing language. ! * directives: The preprocessing language. ! * empty macro arguments: Macro Arguments. ! * environment variables: Environment Variables. ! * expansion of arguments: Argument Prescan. ! * FDL, GNU Free Documentation License: GNU Free Documentation License. ! * function-like macros: Function-like Macros. ! * grouping options: Invocation. ! * guard macro: Once-Only Headers. ! * header file: Header Files. ! * header file names: Tokenization. ! * identifiers: Tokenization. ! * implementation limits: Implementation limits. ! * implementation-defined behavior: Implementation-defined behavior. ! * including just once: Once-Only Headers. ! * invocation: Invocation. ! * iso646.h: C++ Named Operators. ! * line comments: Initial processing. ! * line control: Line Control. ! * line endings: Initial processing. ! * linemarkers: Preprocessor Output. ! * macro argument expansion: Argument Prescan. ! * macro arguments and directives: Directives Within Macro Arguments. ! * macros in include: Computed Includes. ! * macros with arguments: Macro Arguments. ! * macros with variable arguments: Variadic Macros. ! * make: Invocation. ! * manifest constants: Object-like Macros. ! * named operators: C++ Named Operators. ! * newlines in macro arguments: Newlines in Arguments. ! * null directive: Other Directives. ! * numbers: Tokenization. ! * object-like macro: Object-like Macros. ! * options: Invocation. ! * options, grouping: Invocation. ! * other tokens: Tokenization. ! * output format: Preprocessor Output. ! * overriding a header file: Wrapper Headers. ! * parentheses in macro bodies: Operator Precedence Problems. ! * pitfalls of macros: Macro Pitfalls. ! * predefined macros: Predefined Macros. ! * predefined macros, system-specific: System-specific Predefined Macros. ! * predicates: Assertions. ! * preprocessing directives: The preprocessing language. ! * preprocessing numbers: Tokenization. ! * preprocessing tokens: Tokenization. ! * prescan of macro arguments: Argument Prescan. ! * problems with macros: Macro Pitfalls. ! * punctuators: Tokenization. ! * redefining macros: Undefining and Redefining Macros. ! * repeated inclusion: Once-Only Headers. ! * reporting errors: Diagnostics. ! * reporting warnings: Diagnostics. ! * reserved namespace: System-specific Predefined Macros. ! * self-reference: Self-Referential Macros. ! * semicolons (after macro calls): Swallowing the Semicolon. ! * side effects (in macro arguments): Duplication of Side Effects. ! * standard predefined macros.: Standard Predefined Macros. ! * string constants: Tokenization. ! * string literals: Tokenization. ! * stringification: Stringification. ! * symbolic constants: Object-like Macros. ! * system header files <1>: System Headers. ! * system header files: Header Files. ! * system-specific predefined macros: System-specific Predefined Macros. ! * testing predicates: Assertions. ! * token concatenation: Concatenation. ! * token pasting: Concatenation. ! * tokens: Tokenization. ! * trigraphs: Initial processing. ! * undefining macros: Undefining and Redefining Macros. ! * unsafe macros: Duplication of Side Effects. ! * variable number of arguments: Variadic Macros. ! * variadic macros: Variadic Macros. ! * wrapper #ifndef: Once-Only Headers. ! * wrapper headers: Wrapper Headers. ! !  Tag Table: ! Node: Top1016 ! Node: Overview2808 ! Node: Initial processing6434 ! Ref: trigraphs8552 ! Node: Tokenization12658 ! Ref: Tokenization-Footnote-119707 ! Node: The preprocessing language19818 ! Node: Header Files22691 ! Node: Include Syntax24569 ! Node: Include Operation26071 ! Node: Search Path27924 ! Node: Once-Only Headers31001 ! Node: Computed Includes32651 ! Node: Wrapper Headers35790 ! Node: System Headers38209 ! Node: Macros40254 ! Node: Object-like Macros41392 ! Node: Function-like Macros44978 ! Node: Macro Arguments46588 ! Node: Stringification50733 ! Node: Concatenation53934 ! Node: Variadic Macros57048 ! Node: Predefined Macros61830 ! Node: Standard Predefined Macros62413 ! Node: Common Predefined Macros68014 ! Node: System-specific Predefined Macros75785 ! Node: C++ Named Operators77797 ! Node: Undefining and Redefining Macros78752 ! Node: Directives Within Macro Arguments80849 ! Node: Macro Pitfalls82392 ! Node: Misnesting82918 ! Node: Operator Precedence Problems84019 ! Node: Swallowing the Semicolon85874 ! Node: Duplication of Side Effects87886 ! Node: Self-Referential Macros90058 ! Node: Argument Prescan92468 ! Node: Newlines in Arguments96211 ! Node: Conditionals97156 ! Node: Conditional Uses98985 ! Node: Conditional Syntax100338 ! Node: Ifdef100653 ! Node: If103815 ! Node: Defined106228 ! Node: Else107501 ! Node: Elif108062 ! Node: Deleted Code109342 ! Node: Diagnostics110584 ! Node: Line Control112201 ! Node: Pragmas116004 ! Node: Other Directives120272 ! Node: Preprocessor Output121464 ! Node: Traditional Mode124664 ! Node: Traditional lexical analysis125719 ! Node: Traditional macros128215 ! Node: Traditional miscellany132009 ! Node: Traditional warnings132999 ! Node: Implementation Details135189 ! Node: Implementation-defined behavior135807 ! Node: Implementation limits138481 ! Node: Obsolete Features141172 ! Node: Assertions141619 ! Node: Obsolete once-only headers144149 ! Node: Differences from previous versions145873 ! Node: Invocation149945 ! Ref: -MF158481 ! Node: Environment Variables171340 ! Node: GNU Free Documentation License174293 ! Node: Index of Directives196723 ! Node: Option Index198103 ! Node: Concept Index201907  End Tag Table diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.info-1 gcc-3.3/gcc/doc/cpp.info-1 *** gcc-3.2.3/gcc/doc/cpp.info-1 2003-04-22 07:07:09.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.info-1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1240 **** - This is doc/cpp.info, produced by makeinfo version 4.5 from - doc/cpp.texi. - - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Cpp: (cpp). The GNU C preprocessor. - END-INFO-DIR-ENTRY - -  - File: cpp.info, Node: Top, Next: Overview, Up: (dir) - - - - The C preprocessor implements the macro language used to transform C, - C++, and Objective-C programs before they are compiled. It can also be - useful on its own. - - * Menu: - - * Overview:: - * Header Files:: - * Macros:: - * Conditionals:: - * Diagnostics:: - * Line Control:: - * Pragmas:: - * Other Directives:: - * Preprocessor Output:: - * Traditional Mode:: - * Implementation Details:: - * Invocation:: - * Environment Variables:: - * GNU Free Documentation License:: - * Option Index:: - * Index of Directives:: - * Concept Index:: - - --- The Detailed Node Listing --- - - Overview - - * Initial processing:: - * Tokenization:: - * The preprocessing language:: - - Header Files - - * Include Syntax:: - * Include Operation:: - * Search Path:: - * Once-Only Headers:: - * Computed Includes:: - * Wrapper Headers:: - * System Headers:: - - Macros - - * Object-like Macros:: - * Function-like Macros:: - * Macro Arguments:: - * Stringification:: - * Concatenation:: - * Variadic Macros:: - * Predefined Macros:: - * Undefining and Redefining Macros:: - * Macro Pitfalls:: - - Predefined Macros - - * Standard Predefined Macros:: - * Common Predefined Macros:: - * System-specific Predefined Macros:: - * C++ Named Operators:: - - Macro Pitfalls - - * Misnesting:: - * Operator Precedence Problems:: - * Swallowing the Semicolon:: - * Duplication of Side Effects:: - * Self-Referential Macros:: - * Argument Prescan:: - * Newlines in Arguments:: - - Conditionals - - * Conditional Uses:: - * Conditional Syntax:: - * Deleted Code:: - - Conditional Syntax - - * Ifdef:: - * If:: - * Defined:: - * Else:: - * Elif:: - - Implementation Details - - * Implementation-defined behavior:: - * Implementation limits:: - * Obsolete Features:: - * Differences from previous versions:: - - Obsolete Features - - * Assertions:: - * Obsolete once-only headers:: - * Miscellaneous obsolete features:: - - Copyright (C) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation. A copy of - the license is included in the section entitled "GNU Free Documentation - License". - - This manual contains no Invariant Sections. The Front-Cover Texts - are (a) (see below), and the Back-Cover Texts are (b) (see below). - - (a) The FSF's Front-Cover Text is: - - A GNU Manual - - (b) The FSF's Back-Cover Text is: - - You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise funds - for GNU development. - -  - File: cpp.info, Node: Overview, Next: Header Files, Prev: Top, Up: Top - - Overview - ******** - - The C preprocessor, often known as "cpp", is a "macro processor" - that is used automatically by the C compiler to transform your program - before compilation. It is called a macro processor because it allows - you to define "macros", which are brief abbreviations for longer - constructs. - - The C preprocessor is intended to be used only with C, C++, and - Objective-C source code. In the past, it has been abused as a general - text processor. It will choke on input which does not obey C's lexical - rules. For example, apostrophes will be interpreted as the beginning of - character constants, and cause errors. Also, you cannot rely on it - preserving characteristics of the input which are not significant to - C-family languages. If a Makefile is preprocessed, all the hard tabs - will be removed, and the Makefile will not work. - - Having said that, you can often get away with using cpp on things - which are not C. Other Algol-ish programming languages are often safe - (Pascal, Ada, etc.) So is assembly, with caution. `-traditional' mode - preserves more white space, and is otherwise more permissive. Many of - the problems can be avoided by writing C or C++ style comments instead - of native language comments, and keeping macros simple. - - Wherever possible, you should use a preprocessor geared to the - language you are writing in. Modern versions of the GNU assembler have - macro facilities. Most high level programming languages have their own - conditional compilation and inclusion mechanism. If all else fails, - try a true general text processor, such as GNU M4. - - C preprocessors vary in some details. This manual discusses the GNU - C preprocessor, which provides a small superset of the features of ISO - Standard C. In its default mode, the GNU C preprocessor does not do a - few things required by the standard. These are features which are - rarely, if ever, used, and may cause surprising changes to the meaning - of a program which does not expect them. To get strict ISO Standard C, - you should use the `-std=c89' or `-std=c99' options, depending on which - version of the standard you want. To get all the mandatory - diagnostics, you must also use `-pedantic'. *Note Invocation::. - - * Menu: - - * Initial processing:: - * Tokenization:: - * The preprocessing language:: - -  - File: cpp.info, Node: Initial processing, Next: Tokenization, Up: Overview - - Initial processing - ================== - - The preprocessor performs a series of textual transformations on its - input. These happen before all other processing. Conceptually, they - happen in a rigid order, and the entire file is run through each - transformation before the next one begins. GNU CPP actually does them - all at once, for performance reasons. These transformations correspond - roughly to the first three "phases of translation" described in the C - standard. - - 1. The input file is read into memory and broken into lines. - - GNU CPP expects its input to be a text file, that is, an - unstructured stream of ASCII characters, with some characters - indicating the end of a line of text. Extended ASCII character - sets, such as ISO Latin-1 or Unicode encoded in UTF-8, are also - acceptable. Character sets that are not strict supersets of - seven-bit ASCII will not work. We plan to add complete support - for international character sets in a future release. - - Different systems use different conventions to indicate the end of - a line. GCC accepts the ASCII control sequences `LF', `CR LF', - `CR', and `LF CR' as end-of-line markers. The first three are the - canonical sequences used by Unix, DOS and VMS, and the classic Mac - OS (before OSX) respectively. You may therefore safely copy - source code written on any of those systems to a different one and - use it without conversion. (GCC may lose track of the current - line number if a file doesn't consistently use one convention, as - sometimes happens when it is edited on computers with different - conventions that share a network file system.) `LF CR' is - included because it has been reported as an end-of-line marker - under exotic conditions. - - If the last line of any input file lacks an end-of-line marker, - the end of the file is considered to implicitly supply one. The C - standard says that this condition provokes undefined behavior, so - GCC will emit a warning message. - - 2. If trigraphs are enabled, they are replaced by their corresponding - single characters. - - These are nine three-character sequences, all starting with `??', - that are defined by ISO C to stand for single characters. They - permit obsolete systems that lack some of C's punctuation to use - C. For example, `??/' stands for `\', so '??/n' is a character - constant for a newline. By default, GCC ignores trigraphs, but if - you request a strictly conforming mode with the `-std' option, then - it converts them. - - Trigraphs are not popular and many compilers implement them - incorrectly. Portable code should not rely on trigraphs being - either converted or ignored. If you use the `-Wall' or - `-Wtrigraphs' options, GCC will warn you when a trigraph would - change the meaning of your program if it were converted. - - In a string constant, you can prevent a sequence of question marks - from being confused with a trigraph by inserting a backslash - between the question marks. "(??\?)" is the string `(???)', not - `(?]'. Traditional C compilers do not recognize this idiom. - - The nine trigraphs and their replacements are - - Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??- - Replacement: [ ] { } # \ ^ | ~ - - 3. Continued lines are merged into one long line. - - A continued line is a line which ends with a backslash, `\'. The - backslash is removed and the following line is joined with the - current one. No space is inserted, so you may split a line - anywhere, even in the middle of a word. (It is generally more - readable to split lines only at white space.) - - The trailing backslash on a continued line is commonly referred to - as a "backslash-newline". - - If there is white space between a backslash and the end of a line, - that is still a continued line. However, as this is usually the - result of an editing mistake, and many compilers will not accept - it as a continued line, GCC will warn you about it. - - 4. All comments are replaced with single spaces. - - There are two kinds of comments. "Block comments" begin with `/*' - and continue until the next `*/'. Block comments do not nest: - - /* this is /* one comment */ text outside comment - - "Line comments" begin with `//' and continue to the end of the - current line. Line comments do not nest either, but it does not - matter, because they would end in the same place anyway. - - // this is // one comment - text outside comment - - It is safe to put line comments inside block comments, or vice versa. - - /* block comment - // contains line comment - yet more comment - */ outside comment - - // line comment /* contains block comment */ - - But beware of commenting out one end of a block comment with a line - comment. - - // l.c. /* block comment begins - oops! this isn't a comment anymore */ - - Comments are not recognized within string literals. "/* blah */" is - the string constant `/* blah */', not an empty string. - - Line comments are not in the 1989 edition of the C standard, but they - are recognized by GCC as an extension. In C++ and in the 1999 edition - of the C standard, they are an official part of the language. - - Since these transformations happen before all other processing, you - can split a line mechanically with backslash-newline anywhere. You can - comment out the end of a line. You can continue a line comment onto the - next line with backslash-newline. You can even split `/*', `*/', and - `//' onto multiple lines with backslash-newline. For example: - - /\ - * - */ # /* - */ defi\ - ne FO\ - O 10\ - 20 - - is equivalent to `#define FOO 1020'. All these tricks are extremely - confusing and should not be used in code intended to be readable. - - There is no way to prevent a backslash at the end of a line from - being interpreted as a backslash-newline. - - "foo\\ - bar" - - is equivalent to `"foo\bar"', not to `"foo\\bar"'. To avoid having to - worry about this, do not use the deprecated GNU extension which permits - multi-line strings. Instead, use string literal concatenation: - - "foo\\" - "bar" - - Your program will be more portable this way, too. - -  - File: cpp.info, Node: Tokenization, Next: The preprocessing language, Prev: Initial processing, Up: Overview - - Tokenization - ============ - - After the textual transformations are finished, the input file is - converted into a sequence of "preprocessing tokens". These mostly - correspond to the syntactic tokens used by the C compiler, but there are - a few differences. White space separates tokens; it is not itself a - token of any kind. Tokens do not have to be separated by white space, - but it is often necessary to avoid ambiguities. - - When faced with a sequence of characters that has more than one - possible tokenization, the preprocessor is greedy. It always makes - each token, starting from the left, as big as possible before moving on - to the next token. For instance, `a+++++b' is interpreted as - `a ++ ++ + b', not as `a ++ + ++ b', even though the latter - tokenization could be part of a valid C program and the former could - not. - - Once the input file is broken into tokens, the token boundaries never - change, except when the `##' preprocessing operator is used to paste - tokens together. *Note Concatenation::. For example, - - #define foo() bar - foo()baz - ==> bar baz - _not_ - ==> barbaz - - The compiler does not re-tokenize the preprocessor's output. Each - preprocessing token becomes one compiler token. - - Preprocessing tokens fall into five broad classes: identifiers, - preprocessing numbers, string literals, punctuators, and other. An - "identifier" is the same as an identifier in C: any sequence of - letters, digits, or underscores, which begins with a letter or - underscore. Keywords of C have no significance to the preprocessor; - they are ordinary identifiers. You can define a macro whose name is a - keyword, for instance. The only identifier which can be considered a - preprocessing keyword is `defined'. *Note Defined::. - - This is mostly true of other languages which use the C preprocessor. - However, a few of the keywords of C++ are significant even in the - preprocessor. *Note C++ Named Operators::. - - In the 1999 C standard, identifiers may contain letters which are not - part of the "basic source character set," at the implementation's - discretion (such as accented Latin letters, Greek letters, or Chinese - ideograms). This may be done with an extended character set, or the - `\u' and `\U' escape sequences. GCC does not presently implement - either feature in the preprocessor or the compiler. - - As an extension, GCC treats `$' as a letter. This is for - compatibility with some systems, such as VMS, where `$' is commonly - used in system-defined function and object names. `$' is not a letter - in strictly conforming mode, or if you specify the `-$' option. *Note - Invocation::. - - A "preprocessing number" has a rather bizarre definition. The - category includes all the normal integer and floating point constants - one expects of C, but also a number of other things one might not - initially recognize as a number. Formally, preprocessing numbers begin - with an optional period, a required decimal digit, and then continue - with any sequence of letters, digits, underscores, periods, and - exponents. Exponents are the two-character sequences `e+', `e-', `E+', - `E-', `p+', `p-', `P+', and `P-'. (The exponents that begin with `p' - or `P' are new to C99. They are used for hexadecimal floating-point - constants.) - - The purpose of this unusual definition is to isolate the preprocessor - from the full complexity of numeric constants. It does not have to - distinguish between lexically valid and invalid floating-point numbers, - which is complicated. The definition also permits you to split an - identifier at any position and get exactly two tokens, which can then be - pasted back together with the `##' operator. - - It's possible for preprocessing numbers to cause programs to be - misinterpreted. For example, `0xE+12' is a preprocessing number which - does not translate to any valid numeric constant, therefore a syntax - error. It does not mean `0xE + 12', which is what you might have - intended. - - "String literals" are string constants, character constants, and - header file names (the argument of `#include').(1) String constants - and character constants are straightforward: "..." or '...'. In either - case embedded quotes should be escaped with a backslash: '\'' is the - character constant for `''. There is no limit on the length of a - character constant, but the value of a character constant that contains - more than one character is implementation-defined. *Note - Implementation Details::. - - Header file names either look like string constants, "...", or are - written with angle brackets instead, <...>. In either case, backslash - is an ordinary character. There is no way to escape the closing quote - or angle bracket. The preprocessor looks for the header file in - different places depending on which form you use. *Note Include - Operation::. - - In standard C, no string literal may extend past the end of a line. - GNU CPP accepts multi-line string constants, but not multi-line - character constants or header file names. This extension is deprecated - and will be removed in GCC 3.1. You may use continued lines instead, - or string constant concatenation. *Note Differences from previous - versions::. - - "Punctuators" are all the usual bits of punctuation which are - meaningful to C and C++. All but three of the punctuation characters in - ASCII are C punctuators. The exceptions are `@', `$', and ``'. In - addition, all the two- and three-character operators are punctuators. - There are also six "digraphs", which the C++ standard calls - "alternative tokens", which are merely alternate ways to spell other - punctuators. This is a second attempt to work around missing - punctuation in obsolete systems. It has no negative side effects, - unlike trigraphs, but does not cover as much ground. The digraphs and - their corresponding normal punctuators are: - - Digraph: <% %> <: :> %: %:%: - Punctuator: { } [ ] # ## - - Any other single character is considered "other." It is passed on to - the preprocessor's output unmolested. The C compiler will almost - certainly reject source code containing "other" tokens. In ASCII, the - only other characters are `@', `$', ``', and control characters other - than NUL (all bits zero). (Note that `$' is normally considered a - letter.) All characters with the high bit set (numeric range - 0x7F-0xFF) are also "other" in the present implementation. This will - change when proper support for international character sets is added to - GCC. - - NUL is a special case because of the high probability that its - appearance is accidental, and because it may be invisible to the user - (many terminals do not display NUL at all). Within comments, NULs are - silently ignored, just as any other character would be. In running - text, NUL is considered white space. For example, these two directives - have the same meaning. - - #define X^@1 - #define X 1 - - (where `^@' is ASCII NUL). Within string or character constants, NULs - are preserved. In the latter two cases the preprocessor emits a - warning message. - - ---------- Footnotes ---------- - - (1) The C standard uses the term "string literal" to refer only to - what we are calling "string constants". - -  - File: cpp.info, Node: The preprocessing language, Prev: Tokenization, Up: Overview - - The preprocessing language - ========================== - - After tokenization, the stream of tokens may simply be passed - straight to the compiler's parser. However, if it contains any - operations in the "preprocessing language", it will be transformed - first. This stage corresponds roughly to the standard's "translation - phase 4" and is what most people think of as the preprocessor's job. - - The preprocessing language consists of "directives" to be executed - and "macros" to be expanded. Its primary capabilities are: - - * Inclusion of header files. These are files of declarations that - can be substituted into your program. - - * Macro expansion. You can define "macros", which are abbreviations - for arbitrary fragments of C code. The preprocessor will replace - the macros with their definitions throughout the program. Some - macros are automatically defined for you. - - * Conditional compilation. You can include or exclude parts of the - program according to various conditions. - - * Line control. If you use a program to combine or rearrange source - files into an intermediate file which is then compiled, you can - use line control to inform the compiler where each source line - originally came from. - - * Diagnostics. You can detect problems at compile time and issue - errors or warnings. - - There are a few more, less useful, features. - - Except for expansion of predefined macros, all these operations are - triggered with "preprocessing directives". Preprocessing directives - are lines in your program that start with `#'. Whitespace is allowed - before and after the `#'. The `#' is followed by an identifier, the - "directive name". It specifies the operation to perform. Directives - are commonly referred to as `#NAME' where NAME is the directive name. - For example, `#define' is the directive that defines a macro. - - The `#' which begins a directive cannot come from a macro expansion. - Also, the directive name is not macro expanded. Thus, if `foo' is - defined as a macro expanding to `define', that does not make `#foo' a - valid preprocessing directive. - - The set of valid directive names is fixed. Programs cannot define - new preprocessing directives. - - Some directives require arguments; these make up the rest of the - directive line and must be separated from the directive name by - whitespace. For example, `#define' must be followed by a macro name - and the intended expansion of the macro. - - A preprocessing directive cannot cover more than one line. The line - may, however, be continued with backslash-newline, or by a block comment - which extends past the end of the line. In either case, when the - directive is processed, the continuations have already been merged with - the first line to make one long line. - -  - File: cpp.info, Node: Header Files, Next: Macros, Prev: Overview, Up: Top - - Header Files - ************ - - A header file is a file containing C declarations and macro - definitions (*note Macros::) to be shared between several source files. - You request the use of a header file in your program by "including" - it, with the C preprocessing directive `#include'. - - Header files serve two purposes. - - * System header files declare the interfaces to parts of the - operating system. You include them in your program to supply the - definitions and declarations you need to invoke system calls and - libraries. - - * Your own header files contain declarations for interfaces between - the source files of your program. Each time you have a group of - related declarations and macro definitions all or most of which - are needed in several different source files, it is a good idea to - create a header file for them. - - Including a header file produces the same results as copying the - header file into each source file that needs it. Such copying would be - time-consuming and error-prone. With a header file, the related - declarations appear in only one place. If they need to be changed, they - can be changed in one place, and programs that include the header file - will automatically use the new version when next recompiled. The header - file eliminates the labor of finding and changing all the copies as well - as the risk that a failure to find one copy will result in - inconsistencies within a program. - - In C, the usual convention is to give header files names that end - with `.h'. It is most portable to use only letters, digits, dashes, and - underscores in header file names, and at most one dot. - - * Menu: - - * Include Syntax:: - * Include Operation:: - * Search Path:: - * Once-Only Headers:: - * Computed Includes:: - * Wrapper Headers:: - * System Headers:: - -  - File: cpp.info, Node: Include Syntax, Next: Include Operation, Up: Header Files - - Include Syntax - ============== - - Both user and system header files are included using the - preprocessing directive `#include'. It has two variants: - - `#include ' - This variant is used for system header files. It searches for a - file named FILE in a standard list of system directories. You can - prepend directories to this list with the `-I' option (*note - Invocation::). - - `#include "FILE"' - This variant is used for header files of your own program. It - searches for a file named FILE first in the directory containing - the current file, then in the same directories used for `'. - - The argument of `#include', whether delimited with quote marks or - angle brackets, behaves like a string constant in that comments are not - recognized, and macro names are not expanded. Thus, `#include ' - specifies inclusion of a system header file named `x/*y'. - - However, if backslashes occur within FILE, they are considered - ordinary text characters, not escape characters. None of the character - escape sequences appropriate to string constants in C are processed. - Thus, `#include "x\n\\y"' specifies a filename containing three - backslashes. (Some systems interpret `\' as a pathname separator. All - of these also interpret `/' the same way. It is most portable to use - only `/'.) - - It is an error if there is anything (other than comments) on the line - after the file name. - -  - File: cpp.info, Node: Include Operation, Next: Search Path, Prev: Include Syntax, Up: Header Files - - Include Operation - ================= - - The `#include' directive works by directing the C preprocessor to - scan the specified file as input before continuing with the rest of the - current file. The output from the preprocessor contains the output - already generated, followed by the output resulting from the included - file, followed by the output that comes from the text after the - `#include' directive. For example, if you have a header file - `header.h' as follows, - - char *test (void); - - and a main program called `program.c' that uses the header file, like - this, - - int x; - #include "header.h" - - int - main (void) - { - puts (test ()); - } - - the compiler will see the same token stream as it would if `program.c' - read - - int x; - char *test (void); - - int - main (void) - { - puts (test ()); - } - - Included files are not limited to declarations and macro definitions; - those are merely the typical uses. Any fragment of a C program can be - included from another file. The include file could even contain the - beginning of a statement that is concluded in the containing file, or - the end of a statement that was started in the including file. However, - a comment or a string or character constant may not start in the - included file and finish in the including file. An unterminated - comment, string constant or character constant in an included file is - considered to end (with an error message) at the end of the file. - - To avoid confusion, it is best if header files contain only complete - syntactic units--function declarations or definitions, type - declarations, etc. - - The line following the `#include' directive is always treated as a - separate line by the C preprocessor, even if the included file lacks a - final newline. - -  - File: cpp.info, Node: Search Path, Next: Once-Only Headers, Prev: Include Operation, Up: Header Files - - Search Path - =========== - - GCC looks in several different places for headers. On a normal Unix - system, if you do not instruct it otherwise, it will look for headers - requested with `#include ' in: - - /usr/local/include - /usr/lib/gcc-lib/TARGET/VERSION/include - /usr/TARGET/include - /usr/include - - For C++ programs, it will also look in `/usr/include/g++-v3', first. - In the above, TARGET is the canonical name of the system GCC was - configured to compile code for; often but not always the same as the - canonical name of the system it runs on. VERSION is the version of GCC - in use. - - You can add to this list with the `-IDIR' command line option. All - the directories named by `-I' are searched, in left-to-right order, - _before_ the default directories. The only exception is when `dir' is - already searched by default. In this case, the option is ignored and - the search order for system directories remains unchanged. - - Duplicate directories are removed from the quote and bracket search - chains before the two chains are merged to make the final search chain. - Thus, it is possible for a directory to occur twice in the final search - chain if it was specified in both the quote and bracket chains. - - You can prevent GCC from searching any of the default directories - with the `-nostdinc' option. This is useful when you are compiling an - operating system kernel or some other program that does not use the - standard C library facilities, or the standard C library itself. `-I' - options are not ignored as described above when `-nostdinc' is in - effect. - - GCC looks for headers requested with `#include "FILE"' first in the - directory containing the current file, then in the same places it would - have looked for a header requested with angle brackets. For example, - if `/usr/include/sys/stat.h' contains `#include "types.h"', GCC looks - for `types.h' first in `/usr/include/sys', then in its usual search - path. - - `#line' (*note Line Control::) does not change GCC's idea of the - directory containing the current file. - - You may put `-I-' at any point in your list of `-I' options. This - has two effects. First, directories appearing before the `-I-' in the - list are searched only for headers requested with quote marks. - Directories after `-I-' are searched for all headers. Second, the - directory containing the current file is not searched for anything, - unless it happens to be one of the directories named by an `-I' switch. - - `-I. -I-' is not the same as no `-I' options at all, and does not - cause the same behavior for `<>' includes that `""' includes get with - no special options. `-I.' searches the compiler's current working - directory for header files. That may or may not be the same as the - directory containing the current file. - - If you need to look for headers in a directory named `-', write - `-I./-'. - - There are several more ways to adjust the header search path. They - are generally less useful. *Note Invocation::. - -  - File: cpp.info, Node: Once-Only Headers, Next: Computed Includes, Prev: Search Path, Up: Header Files - - Once-Only Headers - ================= - - If a header file happens to be included twice, the compiler will - process its contents twice. This is very likely to cause an error, - e.g. when the compiler sees the same structure definition twice. Even - if it does not, it will certainly waste time. - - The standard way to prevent this is to enclose the entire real - contents of the file in a conditional, like this: - - /* File foo. */ - #ifndef FILE_FOO_SEEN - #define FILE_FOO_SEEN - - THE ENTIRE FILE - - #endif /* !FILE_FOO_SEEN */ - - This construct is commonly known as a "wrapper #ifndef". When the - header is included again, the conditional will be false, because - `FILE_FOO_SEEN' is defined. The preprocessor will skip over the entire - contents of the file, and the compiler will not see it twice. - - GNU CPP optimizes even further. It remembers when a header file has - a wrapper `#ifndef'. If a subsequent `#include' specifies that header, - and the macro in the `#ifndef' is still defined, it does not bother to - rescan the file at all. - - You can put comments outside the wrapper. They will not interfere - with this optimization. - - The macro `FILE_FOO_SEEN' is called the "controlling macro" or - "guard macro". In a user header file, the macro name should not begin - with `_'. In a system header file, it should begin with `__' to avoid - conflicts with user programs. In any kind of header file, the macro - name should contain the name of the file and some additional text, to - avoid conflicts with other header files. - -  - File: cpp.info, Node: Computed Includes, Next: Wrapper Headers, Prev: Once-Only Headers, Up: Header Files - - Computed Includes - ================= - - Sometimes it is necessary to select one of several different header - files to be included into your program. They might specify - configuration parameters to be used on different sorts of operating - systems, for instance. You could do this with a series of conditionals, - - #if SYSTEM_1 - # include "system_1.h" - #elif SYSTEM_2 - # include "system_2.h" - #elif SYSTEM_3 - ... - #endif - - That rapidly becomes tedious. Instead, the preprocessor offers the - ability to use a macro for the header name. This is called a "computed - include". Instead of writing a header name as the direct argument of - `#include', you simply put a macro name there instead: - - #define SYSTEM_H "system_1.h" - ... - #include SYSTEM_H - - `SYSTEM_H' will be expanded, and the preprocessor will look for - `system_1.h' as if the `#include' had been written that way originally. - `SYSTEM_H' could be defined by your Makefile with a `-D' option. - - You must be careful when you define the macro. `#define' saves - tokens, not text. The preprocessor has no way of knowing that the macro - will be used as the argument of `#include', so it generates ordinary - tokens, not a header name. This is unlikely to cause problems if you - use double-quote includes, which are close enough to string constants. - If you use angle brackets, however, you may have trouble. - - The syntax of a computed include is actually a bit more general than - the above. If the first non-whitespace character after `#include' is - not `"' or `<', then the entire line is macro-expanded like running - text would be. - - If the line expands to a single string constant, the contents of that - string constant are the file to be included. CPP does not re-examine - the string for embedded quotes, but neither does it process backslash - escapes in the string. Therefore - - #define HEADER "a\"b" - #include HEADER - - looks for a file named `a\"b'. CPP searches for the file according to - the rules for double-quoted includes. - - If the line expands to a token stream beginning with a `<' token and - including a `>' token, then the tokens between the `<' and the first - `>' are combined to form the filename to be included. Any whitespace - between tokens is reduced to a single space; then any space after the - initial `<' is retained, but a trailing space before the closing `>' is - ignored. CPP searches for the file according to the rules for - angle-bracket includes. - - In either case, if there are any tokens on the line after the file - name, an error occurs and the directive is not processed. It is also - an error if the result of expansion does not match either of the two - expected forms. - - These rules are implementation-defined behavior according to the C - standard. To minimize the risk of different compilers interpreting your - computed includes differently, we recommend you use only a single - object-like macro which expands to a string constant. This will also - minimize confusion for people reading your program. - -  - File: cpp.info, Node: Wrapper Headers, Next: System Headers, Prev: Computed Includes, Up: Header Files - - Wrapper Headers - =============== - - Sometimes it is necessary to adjust the contents of a system-provided - header file without editing it directly. GCC's `fixincludes' operation - does this, for example. One way to do that would be to create a new - header file with the same name and insert it in the search path before - the original header. That works fine as long as you're willing to - replace the old header entirely. But what if you want to refer to the - old header from the new one? - - You cannot simply include the old header with `#include'. That will - start from the beginning, and find your new header again. If your - header is not protected from multiple inclusion (*note Once-Only - Headers::), it will recurse infinitely and cause a fatal error. - - You could include the old header with an absolute pathname: - #include "/usr/include/old-header.h" - - This works, but is not clean; should the system headers ever move, you - would have to edit the new headers to match. - - There is no way to solve this problem within the C standard, but you - can use the GNU extension `#include_next'. It means, "Include the - _next_ file with this name." This directive works like `#include' - except in searching for the specified file: it starts searching the - list of header file directories _after_ the directory in which the - current file was found. - - Suppose you specify `-I /usr/local/include', and the list of - directories to search also includes `/usr/include'; and suppose both - directories contain `signal.h'. Ordinary `#include ' finds - the file under `/usr/local/include'. If that file contains - `#include_next ', it starts searching after that directory, - and finds the file in `/usr/include'. - - `#include_next' does not distinguish between `' and `"FILE"' - inclusion, nor does it check that the file you specify has the same - name as the current file. It simply looks for the file named, starting - with the directory in the search path after the one where the current - file was found. - - The use of `#include_next' can lead to great confusion. We - recommend it be used only when there is no other alternative. In - particular, it should not be used in the headers belonging to a specific - program; it should be used only to make global corrections along the - lines of `fixincludes'. - -  - File: cpp.info, Node: System Headers, Prev: Wrapper Headers, Up: Header Files - - System Headers - ============== - - The header files declaring interfaces to the operating system and - runtime libraries often cannot be written in strictly conforming C. - Therefore, GCC gives code found in "system headers" special treatment. - All warnings, other than those generated by `#warning' (*note - Diagnostics::), are suppressed while GCC is processing a system header. - Macros defined in a system header are immune to a few warnings - wherever they are expanded. This immunity is granted on an ad-hoc - basis, when we find that a warning generates lots of false positives - because of code in macros defined in system headers. - - Normally, only the headers found in specific directories are - considered system headers. These directories are determined when GCC - is compiled. There are, however, two ways to make normal headers into - system headers. - - The `-isystem' command line option adds its argument to the list of - directories to search for headers, just like `-I'. Any headers found - in that directory will be considered system headers. - - All directories named by `-isystem' are searched _after_ all - directories named by `-I', no matter what their order was on the - command line. If the same directory is named by both `-I' and - `-isystem', the `-I' option is ignored. GCC provides an informative - message when this occurs if `-v' is used. - - There is also a directive, `#pragma GCC system_header', which tells - GCC to consider the rest of the current include file a system header, - no matter where it was found. Code that comes before the `#pragma' in - the file will not be affected. `#pragma GCC system_header' has no - effect in the primary source file. - - On very old systems, some of the pre-defined system header - directories get even more special treatment. GNU C++ considers code in - headers found in those directories to be surrounded by an `extern "C"' - block. There is no way to request this behavior with a `#pragma', or - from the command line. - -  - File: cpp.info, Node: Macros, Next: Conditionals, Prev: Header Files, Up: Top - - Macros - ****** - - A "macro" is a fragment of code which has been given a name. - Whenever the name is used, it is replaced by the contents of the macro. - There are two kinds of macros. They differ mostly in what they look - like when they are used. "Object-like" macros resemble data objects - when used, "function-like" macros resemble function calls. - - You may define any valid identifier as a macro, even if it is a C - keyword. The preprocessor does not know anything about keywords. This - can be useful if you wish to hide a keyword such as `const' from an - older compiler that does not understand it. However, the preprocessor - operator `defined' (*note Defined::) can never be defined as a macro, - and C++'s named operators (*note C++ Named Operators::) cannot be - macros when you are compiling C++. - - * Menu: - - * Object-like Macros:: - * Function-like Macros:: - * Macro Arguments:: - * Stringification:: - * Concatenation:: - * Variadic Macros:: - * Predefined Macros:: - * Undefining and Redefining Macros:: - * Macro Pitfalls:: - -  - File: cpp.info, Node: Object-like Macros, Next: Function-like Macros, Up: Macros - - Object-like Macros - ================== - - An "object-like macro" is a simple identifier which will be replaced - by a code fragment. It is called object-like because it looks like a - data object in code that uses it. They are most commonly used to give - symbolic names to numeric constants. - - You create macros with the `#define' directive. `#define' is - followed by the name of the macro and then the token sequence it should - be an abbreviation for, which is variously referred to as the macro's - "body", "expansion" or "replacement list". For example, - - #define BUFFER_SIZE 1024 - - defines a macro named `BUFFER_SIZE' as an abbreviation for the token - `1024'. If somewhere after this `#define' directive there comes a C - statement of the form - - foo = (char *) malloc (BUFFER_SIZE); - - then the C preprocessor will recognize and "expand" the macro - `BUFFER_SIZE'. The C compiler will see the same tokens as it would if - you had written - - foo = (char *) malloc (1024); - - By convention, macro names are written in upper case. Programs are - easier to read when it is possible to tell at a glance which names are - macros. - - The macro's body ends at the end of the `#define' line. You may - continue the definition onto multiple lines, if necessary, using - backslash-newline. When the macro is expanded, however, it will all - come out on one line. For example, - - #define NUMBERS 1, \ - 2, \ - 3 - int x[] = { NUMBERS }; - ==> int x[] = { 1, 2, 3 }; - - The most common visible consequence of this is surprising line numbers - in error messages. - - There is no restriction on what can go in a macro body provided it - decomposes into valid preprocessing tokens. Parentheses need not - balance, and the body need not resemble valid C code. (If it does not, - you may get error messages from the C compiler when you use the macro.) - - The C preprocessor scans your program sequentially. Macro - definitions take effect at the place you write them. Therefore, the - following input to the C preprocessor - - foo = X; - #define X 4 - bar = X; - - produces - - foo = X; - bar = 4; - - When the preprocessor expands a macro name, the macro's expansion - replaces the macro invocation, then the expansion is examined for more - macros to expand. For example, - - #define TABLESIZE BUFSIZE - #define BUFSIZE 1024 - TABLESIZE - ==> BUFSIZE - ==> 1024 - - `TABLESIZE' is expanded first to produce `BUFSIZE', then that macro is - expanded to produce the final result, `1024'. - - Notice that `BUFSIZE' was not defined when `TABLESIZE' was defined. - The `#define' for `TABLESIZE' uses exactly the expansion you - specify--in this case, `BUFSIZE'--and does not check to see whether it - too contains macro names. Only when you _use_ `TABLESIZE' is the - result of its expansion scanned for more macro names. - - This makes a difference if you change the definition of `BUFSIZE' at - some point in the source file. `TABLESIZE', defined as shown, will - always expand using the definition of `BUFSIZE' that is currently in - effect: - - #define BUFSIZE 1020 - #define TABLESIZE BUFSIZE - #undef BUFSIZE - #define BUFSIZE 37 - - Now `TABLESIZE' expands (in two stages) to `37'. - - If the expansion of a macro contains its own name, either directly or - via intermediate macros, it is not expanded again when the expansion is - examined for more macros. This prevents infinite recursion. *Note - Self-Referential Macros::, for the precise details. - -  - File: cpp.info, Node: Function-like Macros, Next: Macro Arguments, Prev: Object-like Macros, Up: Macros - - Function-like Macros - ==================== - - You can also define macros whose use looks like a function call. - These are called "function-like macros". To define a function-like - macro, you use the same `#define' directive, but you put a pair of - parentheses immediately after the macro name. For example, - - #define lang_init() c_init() - lang_init() - ==> c_init() - - A function-like macro is only expanded if its name appears with a - pair of parentheses after it. If you write just the name, it is left - alone. This can be useful when you have a function and a macro of the - same name, and you wish to use the function sometimes. - - extern void foo(void); - #define foo() /* optimized inline version */ - ... - foo(); - funcptr = foo; - - Here the call to `foo()' will use the macro, but the function - pointer will get the address of the real function. If the macro were to - be expanded, it would cause a syntax error. - - If you put spaces between the macro name and the parentheses in the - macro definition, that does not define a function-like macro, it defines - an object-like macro whose expansion happens to begin with a pair of - parentheses. - - #define lang_init () c_init() - lang_init() - ==> () c_init()() - - The first two pairs of parentheses in this expansion come from the - macro. The third is the pair that was originally after the macro - invocation. Since `lang_init' is an object-like macro, it does not - consume those parentheses. - -  - File: cpp.info, Node: Macro Arguments, Next: Stringification, Prev: Function-like Macros, Up: Macros - - Macro Arguments - =============== - - Function-like macros can take "arguments", just like true functions. - To define a macro that uses arguments, you insert "parameters" between - the pair of parentheses in the macro definition that make the macro - function-like. The parameters must be valid C identifiers, separated - by commas and optionally whitespace. - - To invoke a macro that takes arguments, you write the name of the - macro followed by a list of "actual arguments" in parentheses, separated - by commas. The invocation of the macro need not be restricted to a - single logical line--it can cross as many lines in the source file as - you wish. The number of arguments you give must match the number of - parameters in the macro definition. When the macro is expanded, each - use of a parameter in its body is replaced by the tokens of the - corresponding argument. (You need not use all of the parameters in the - macro body.) - - As an example, here is a macro that computes the minimum of two - numeric values, as it is defined in many C programs, and some uses. - - #define min(X, Y) ((X) < (Y) ? (X) : (Y)) - x = min(a, b); ==> x = ((a) < (b) ? (a) : (b)); - y = min(1, 2); ==> y = ((1) < (2) ? (1) : (2)); - z = min(a + 28, *p); ==> z = ((a + 28) < (*p) ? (a + 28) : (*p)); - - (In this small example you can already see several of the dangers of - macro arguments. *Note Macro Pitfalls::, for detailed explanations.) - - Leading and trailing whitespace in each argument is dropped, and all - whitespace between the tokens of an argument is reduced to a single - space. Parentheses within each argument must balance; a comma within - such parentheses does not end the argument. However, there is no - requirement for square brackets or braces to balance, and they do not - prevent a comma from separating arguments. Thus, - - macro (array[x = y, x + 1]) - - passes two arguments to `macro': `array[x = y' and `x + 1]'. If you - want to supply `array[x = y, x + 1]' as an argument, you can write it - as `array[(x = y, x + 1)]', which is equivalent C code. - - All arguments to a macro are completely macro-expanded before they - are substituted into the macro body. After substitution, the complete - text is scanned again for macros to expand, including the arguments. - This rule may seem strange, but it is carefully designed so you need - not worry about whether any function call is actually a macro - invocation. You can run into trouble if you try to be too clever, - though. *Note Argument Prescan::, for detailed discussion. - - For example, `min (min (a, b), c)' is first expanded to - - min (((a) < (b) ? (a) : (b)), (c)) - - and then to - - ((((a) < (b) ? (a) : (b))) < (c) - ? (((a) < (b) ? (a) : (b))) - : (c)) - - (Line breaks shown here for clarity would not actually be generated.) - - You can leave macro arguments empty; this is not an error to the - preprocessor (but many macros will then expand to invalid code). You - cannot leave out arguments entirely; if a macro takes two arguments, - there must be exactly one comma at the top level of its argument list. - Here are some silly examples using `min': - - min(, b) ==> (( ) < (b) ? ( ) : (b)) - min(a, ) ==> ((a ) < ( ) ? (a ) : ( )) - min(,) ==> (( ) < ( ) ? ( ) : ( )) - min((,),) ==> (((,)) < ( ) ? ((,)) : ( )) - - min() error--> macro "min" requires 2 arguments, but only 1 given - min(,,) error--> macro "min" passed 3 arguments, but takes just 2 - - Whitespace is not a preprocessing token, so if a macro `foo' takes - one argument, `foo ()' and `foo ( )' both supply it an empty argument. - Previous GNU preprocessor implementations and documentation were - incorrect on this point, insisting that a function-like macro that - takes a single argument be passed a space if an empty argument was - required. - - Macro parameters appearing inside string literals are not replaced by - their corresponding actual arguments. - - #define foo(x) x, "x" - foo(bar) ==> bar, "x" - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.info-2 gcc-3.3/gcc/doc/cpp.info-2 *** gcc-3.2.3/gcc/doc/cpp.info-2 2003-04-22 07:07:10.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.info-2 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1148 **** - This is doc/cpp.info, produced by makeinfo version 4.5 from - doc/cpp.texi. - - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Cpp: (cpp). The GNU C preprocessor. - END-INFO-DIR-ENTRY - -  - File: cpp.info, Node: Stringification, Next: Concatenation, Prev: Macro Arguments, Up: Macros - - Stringification - =============== - - Sometimes you may want to convert a macro argument into a string - constant. Parameters are not replaced inside string constants, but you - can use the `#' preprocessing operator instead. When a macro parameter - is used with a leading `#', the preprocessor replaces it with the - literal text of the actual argument, converted to a string constant. - Unlike normal parameter replacement, the argument is not macro-expanded - first. This is called "stringification". - - There is no way to combine an argument with surrounding text and - stringify it all together. Instead, you can write a series of adjacent - string constants and stringified arguments. The preprocessor will - replace the stringified arguments with string constants. The C - compiler will then combine all the adjacent string constants into one - long string. - - Here is an example of a macro definition that uses stringification: - - #define WARN_IF(EXP) \ - do { if (EXP) \ - fprintf (stderr, "Warning: " #EXP "\n"); } \ - while (0) - WARN_IF (x == 0); - ==> do { if (x == 0) - fprintf (stderr, "Warning: " "x == 0" "\n"); } while (0); - - The argument for `EXP' is substituted once, as-is, into the `if' - statement, and once, stringified, into the argument to `fprintf'. If - `x' were a macro, it would be expanded in the `if' statement, but not - in the string. - - The `do' and `while (0)' are a kludge to make it possible to write - `WARN_IF (ARG);', which the resemblance of `WARN_IF' to a function - would make C programmers want to do; see *Note Swallowing the - Semicolon::. - - Stringification in C involves more than putting double-quote - characters around the fragment. The preprocessor backslash-escapes the - quotes surrounding embedded string constants, and all backslashes - within string and character constants, in order to get a valid C string - constant with the proper contents. Thus, stringifying `p = "foo\n";' - results in "p = \"foo\\n\";". However, backslashes that are not inside - string or character constants are not duplicated: `\n' by itself - stringifies to "\n". - - All leading and trailing whitespace in text being stringified is - ignored. Any sequence of whitespace in the middle of the text is - converted to a single space in the stringified result. Comments are - replaced by whitespace long before stringification happens, so they - never appear in stringified text. - - There is no way to convert a macro argument into a character - constant. - - If you want to stringify the result of expansion of a macro argument, - you have to use two levels of macros. - - #define xstr(s) str(s) - #define str(s) #s - #define foo 4 - str (foo) - ==> "foo" - xstr (foo) - ==> xstr (4) - ==> str (4) - ==> "4" - - `s' is stringified when it is used in `str', so it is not - macro-expanded first. But `s' is an ordinary argument to `xstr', so it - is completely macro-expanded before `xstr' itself is expanded (*note - Argument Prescan::). Therefore, by the time `str' gets to its - argument, it has already been macro-expanded. - -  - File: cpp.info, Node: Concatenation, Next: Variadic Macros, Prev: Stringification, Up: Macros - - Concatenation - ============= - - It is often useful to merge two tokens into one while expanding - macros. This is called "token pasting" or "token concatenation". The - `##' preprocessing operator performs token pasting. When a macro is - expanded, the two tokens on either side of each `##' operator are - combined into a single token, which then replaces the `##' and the two - original tokens in the macro expansion. Usually both will be - identifiers, or one will be an identifier and the other a preprocessing - number. When pasted, they make a longer identifier. This isn't the - only valid case. It is also possible to concatenate two numbers (or a - number and a name, such as `1.5' and `e3') into a number. Also, - multi-character operators such as `+=' can be formed by token pasting. - - However, two tokens that don't together form a valid token cannot be - pasted together. For example, you cannot concatenate `x' with `+' in - either order. If you try, the preprocessor issues a warning and emits - the two tokens. Whether it puts white space between the tokens is - undefined. It is common to find unnecessary uses of `##' in complex - macros. If you get this warning, it is likely that you can simply - remove the `##'. - - Both the tokens combined by `##' could come from the macro body, but - you could just as well write them as one token in the first place. - Token pasting is most useful when one or both of the tokens comes from a - macro argument. If either of the tokens next to an `##' is a parameter - name, it is replaced by its actual argument before `##' executes. As - with stringification, the actual argument is not macro-expanded first. - If the argument is empty, that `##' has no effect. - - Keep in mind that the C preprocessor converts comments to whitespace - before macros are even considered. Therefore, you cannot create a - comment by concatenating `/' and `*'. You can put as much whitespace - between `##' and its operands as you like, including comments, and you - can put comments in arguments that will be concatenated. However, it - is an error if `##' appears at either end of a macro body. - - Consider a C program that interprets named commands. There probably - needs to be a table of commands, perhaps an array of structures declared - as follows: - - struct command - { - char *name; - void (*function) (void); - }; - - struct command commands[] = - { - { "quit", quit_command }, - { "help", help_command }, - ... - }; - - It would be cleaner not to have to give each command name twice, - once in the string constant and once in the function name. A macro - which takes the name of a command as an argument can make this - unnecessary. The string constant can be created with stringification, - and the function name by concatenating the argument with `_command'. - Here is how it is done: - - #define COMMAND(NAME) { #NAME, NAME ## _command } - - struct command commands[] = - { - COMMAND (quit), - COMMAND (help), - ... - }; - -  - File: cpp.info, Node: Variadic Macros, Next: Predefined Macros, Prev: Concatenation, Up: Macros - - Variadic Macros - =============== - - A macro can be declared to accept a variable number of arguments - much as a function can. The syntax for defining the macro is similar - to that of a function. Here is an example: - - #define eprintf(...) fprintf (stderr, __VA_ARGS__) - - This kind of macro is called "variadic". When the macro is invoked, - all the tokens in its argument list after the last named argument (this - macro has none), including any commas, become the "variable argument". - This sequence of tokens replaces the identifier `__VA_ARGS__' in the - macro body wherever it appears. Thus, we have this expansion: - - eprintf ("%s:%d: ", input_file, lineno) - ==> fprintf (stderr, "%s:%d: ", input_file, lineno) - - The variable argument is completely macro-expanded before it is - inserted into the macro expansion, just like an ordinary argument. You - may use the `#' and `##' operators to stringify the variable argument - or to paste its leading or trailing token with another token. (But see - below for an important special case for `##'.) - - If your macro is complicated, you may want a more descriptive name - for the variable argument than `__VA_ARGS__'. GNU CPP permits this, as - an extension. You may write an argument name immediately before the - `...'; that name is used for the variable argument. The `eprintf' - macro above could be written - - #define eprintf(args...) fprintf (stderr, args) - - using this extension. You cannot use `__VA_ARGS__' and this extension - in the same macro. - - You can have named arguments as well as variable arguments in a - variadic macro. We could define `eprintf' like this, instead: - - #define eprintf(format, ...) fprintf (stderr, format, __VA_ARGS__) - - This formulation looks more descriptive, but unfortunately it is less - flexible: you must now supply at least one argument after the format - string. In standard C, you cannot omit the comma separating the named - argument from the variable arguments. Furthermore, if you leave the - variable argument empty, you will get a syntax error, because there - will be an extra comma after the format string. - - eprintf("success!\n", ); - ==> fprintf(stderr, "success!\n", ); - - GNU CPP has a pair of extensions which deal with this problem. - First, you are allowed to leave the variable argument out entirely: - - eprintf ("success!\n") - ==> fprintf(stderr, "success!\n", ); - - Second, the `##' token paste operator has a special meaning when placed - between a comma and a variable argument. If you write - - #define eprintf(format, ...) fprintf (stderr, format, ##__VA_ARGS__) - - and the variable argument is left out when the `eprintf' macro is used, - then the comma before the `##' will be deleted. This does _not_ happen - if you pass an empty argument, nor does it happen if the token - preceding `##' is anything other than a comma. - - eprintf ("success!\n") - ==> fprintf(stderr, "success!\n"); - - The above explanation is ambiguous about the case where the only macro - parameter is a variable arguments parameter, as it is meaningless to - try to distinguish whether no argument at all is an empty argument or a - missing argument. In this case the C99 standard is clear that the - comma must remain, however the existing GCC extension used to swallow - the comma. So CPP retains the comma when conforming to a specific C - standard, and drops it otherwise. - - C99 mandates that the only place the identifier `__VA_ARGS__' can - appear is in the replacement list of a variadic macro. It may not be - used as a macro name, macro argument name, or within a different type - of macro. It may also be forbidden in open text; the standard is - ambiguous. We recommend you avoid using it except for its defined - purpose. - - Variadic macros are a new feature in C99. GNU CPP has supported them - for a long time, but only with a named variable argument (`args...', - not `...' and `__VA_ARGS__'). If you are concerned with portability to - previous versions of GCC, you should use only named variable arguments. - On the other hand, if you are concerned with portability to other - conforming implementations of C99, you should use only `__VA_ARGS__'. - - Previous versions of GNU CPP implemented the comma-deletion extension - much more generally. We have restricted it in this release to minimize - the differences from C99. To get the same effect with both this and - previous versions of GCC, the token preceding the special `##' must be - a comma, and there must be white space between that comma and whatever - comes immediately before it: - - #define eprintf(format, args...) fprintf (stderr, format , ##args) - - *Note Differences from previous versions::, for the gory details. - -  - File: cpp.info, Node: Predefined Macros, Next: Undefining and Redefining Macros, Prev: Variadic Macros, Up: Macros - - Predefined Macros - ================= - - Several object-like macros are predefined; you use them without - supplying their definitions. They fall into three classes: standard, - common, and system-specific. - - In C++, there is a fourth category, the named operators. They act - like predefined macros, but you cannot undefine them. - - * Menu: - - * Standard Predefined Macros:: - * Common Predefined Macros:: - * System-specific Predefined Macros:: - * C++ Named Operators:: - -  - File: cpp.info, Node: Standard Predefined Macros, Next: Common Predefined Macros, Up: Predefined Macros - - Standard Predefined Macros - -------------------------- - - The standard predefined macros are specified by the C and/or C++ - language standards, so they are available with all compilers that - implement those standards. Older compilers may not provide all of - them. Their names all start with double underscores. - - `__FILE__' - This macro expands to the name of the current input file, in the - form of a C string constant. This is the path by which the - preprocessor opened the file, not the short name specified in - `#include' or as the input file name argument. For example, - `"/usr/local/include/myheader.h"' is a possible expansion of this - macro. - - `__LINE__' - This macro expands to the current input line number, in the form - of a decimal integer constant. While we call it a predefined - macro, it's a pretty strange macro, since its "definition" changes - with each new line of source code. - - `__FILE__' and `__LINE__' are useful in generating an error message - to report an inconsistency detected by the program; the message can - state the source line at which the inconsistency was detected. For - example, - - fprintf (stderr, "Internal error: " - "negative string length " - "%d at %s, line %d.", - length, __FILE__, __LINE__); - - An `#include' directive changes the expansions of `__FILE__' and - `__LINE__' to correspond to the included file. At the end of that - file, when processing resumes on the input file that contained the - `#include' directive, the expansions of `__FILE__' and `__LINE__' - revert to the values they had before the `#include' (but `__LINE__' is - then incremented by one as processing moves to the line after the - `#include'). - - A `#line' directive changes `__LINE__', and may change `__FILE__' as - well. *Note Line Control::. - - C99 introduces `__func__', and GCC has provided `__FUNCTION__' for a - long time. Both of these are strings containing the name of the - current function (there are slight semantic differences; see the GCC - manual). Neither of them is a macro; the preprocessor does not know the - name of the current function. They tend to be useful in conjunction - with `__FILE__' and `__LINE__', though. - - `__DATE__' - This macro expands to a string constant that describes the date on - which the preprocessor is being run. The string constant contains - eleven characters and looks like `"Feb 12 1996"'. If the day of - the month is less than 10, it is padded with a space on the left. - - `__TIME__' - This macro expands to a string constant that describes the time at - which the preprocessor is being run. The string constant contains - eight characters and looks like `"23:59:01"'. - - `__STDC__' - In normal operation, this macro expands to the constant 1, to - signify that this compiler conforms to ISO Standard C. If GNU CPP - is used with a compiler other than GCC, this is not necessarily - true; however, the preprocessor always conforms to the standard, - unless the `-traditional' option is used. - - This macro is not defined if the `-traditional' option is used. - - On some hosts, the system compiler uses a different convention, - where `__STDC__' is normally 0, but is 1 if the user specifies - strict conformance to the C Standard. GNU CPP follows the host - convention when processing system header files, but when - processing user files `__STDC__' is always 1. This has been - reported to cause problems; for instance, some versions of Solaris - provide X Windows headers that expect `__STDC__' to be either - undefined or 1. *Note Invocation::. - - `__STDC_VERSION__' - This macro expands to the C Standard's version number, a long - integer constant of the form `YYYYMML' where YYYY and MM are the - year and month of the Standard version. This signifies which - version of the C Standard the compiler conforms to. Like - `__STDC__', this is not necessarily accurate for the entire - implementation, unless GNU CPP is being used with GCC. - - The value `199409L' signifies the 1989 C standard as amended in - 1994, which is the current default; the value `199901L' signifies - the 1999 revision of the C standard. Support for the 1999 - revision is not yet complete. - - This macro is not defined if the `-traditional' option is used, nor - when compiling C++ or Objective-C. - - `__STDC_HOSTED__' - This macro is defined, with value 1, if the compiler's target is a - "hosted environment". A hosted environment has the complete - facilities of the standard C library available. - - `__cplusplus' - This macro is defined when the C++ compiler is in use. You can use - `__cplusplus' to test whether a header is compiled by a C compiler - or a C++ compiler. This macro is similar to `__STDC_VERSION__', in - that it expands to a version number. A fully conforming - implementation of the 1998 C++ standard will define this macro to - `199711L'. The GNU C++ compiler is not yet fully conforming, so - it uses `1' instead. We hope to complete our implementation in - the near future. - - -  - File: cpp.info, Node: Common Predefined Macros, Next: System-specific Predefined Macros, Prev: Standard Predefined Macros, Up: Predefined Macros - - Common Predefined Macros - ------------------------ - - The common predefined macros are GNU C extensions. They are - available with the same meanings regardless of the machine or operating - system on which you are using GNU C. Their names all start with double - underscores. - - `__GNUC__' - `__GNUC_MINOR__' - `__GNUC_PATCHLEVEL__' - These macros are defined by all GNU compilers that use the C - preprocessor: C, C++, and Objective-C. Their values are the major - version, minor version, and patch level of the compiler, as integer - constants. For example, GCC 3.2.1 will define `__GNUC__' to 3, - `__GNUC_MINOR__' to 2, and `__GNUC_PATCHLEVEL__' to 1. They are - defined only when the entire compiler is in use; if you invoke the - preprocessor directly, they are not defined. - - `__GNUC_PATCHLEVEL__' is new to GCC 3.0; it is also present in the - widely-used development snapshots leading up to 3.0 (which identify - themselves as GCC 2.96 or 2.97, depending on which snapshot you - have). - - If all you need to know is whether or not your program is being - compiled by GCC, you can simply test `__GNUC__'. If you need to - write code which depends on a specific version, you must be more - careful. Each time the minor version is increased, the patch - level is reset to zero; each time the major version is increased - (which happens rarely), the minor version and patch level are - reset. If you wish to use the predefined macros directly in the - conditional, you will need to write it like this: - - /* Test for GCC > 3.2.0 */ - #if __GNUC__ > 3 || \ - (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \ - (__GNUC_MINOR__ == 2 && \ - __GNUC_PATCHLEVEL__ > 0)) - - Another approach is to use the predefined macros to calculate a - single number, then compare that against a threshold: - - #define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) - ... - /* Test for GCC > 3.2.0 */ - #if GCC_VERSION > 30200 - - Many people find this form easier to understand. - - `__OBJC__' - This macro is defined, with value 1, when the Objective-C compiler - is in use. You can use `__OBJC__' to test whether a header is - compiled by a C compiler or a Objective-C compiler. - - `__GNUG__' - The GNU C++ compiler defines this. Testing it is equivalent to - testing `(__GNUC__ && __cplusplus)'. - - `__STRICT_ANSI__' - GCC defines this macro if and only if the `-ansi' switch, or a - `-std' switch specifying strict conformance to some version of ISO - C, was specified when GCC was invoked. It is defined to `1'. - This macro exists primarily to direct GNU libc's header files to - restrict their definitions to the minimal set found in the 1989 C - standard. - - `__BASE_FILE__' - This macro expands to the name of the main input file, in the form - of a C string constant. This is the source file that was specified - on the command line of the preprocessor or C compiler. - - `__INCLUDE_LEVEL__' - This macro expands to a decimal integer constant that represents - the depth of nesting in include files. The value of this macro is - incremented on every `#include' directive and decremented at the - end of every included file. It starts out at 0, it's value within - the base file specified on the command line. - - `__VERSION__' - This macro expands to a string constant which describes the - version of the compiler in use. You should not rely on its - contents having any particular form, but it can be counted on to - contain at least the release number. - - `__OPTIMIZE__' - `__OPTIMIZE_SIZE__' - `__NO_INLINE__' - These macros describe the compilation mode. `__OPTIMIZE__' is - defined in all optimizing compilations. `__OPTIMIZE_SIZE__' is - defined if the compiler is optimizing for size, not speed. - `__NO_INLINE__' is defined if no functions will be inlined into - their callers (when not optimizing, or when inlining has been - specifically disabled by `-fno-inline'). - - These macros cause certain GNU header files to provide optimized - definitions, using macros or inline functions, of system library - functions. You should not use these macros in any way unless you - make sure that programs will execute with the same effect whether - or not they are defined. If they are defined, their value is 1. - - `__CHAR_UNSIGNED__' - GCC defines this macro if and only if the data type `char' is - unsigned on the target machine. It exists to cause the standard - header file `limits.h' to work correctly. You should not use this - macro yourself; instead, refer to the standard macros defined in - `limits.h'. - - `__REGISTER_PREFIX__' - This macro expands to a single token (not a string constant) which - is the prefix applied to CPU register names in assembly language - for this target. You can use it to write assembly that is usable - in multiple environments. For example, in the `m68k-aout' - environment it expands to nothing, but in the `m68k-coff' - environment it expands to a single `%'. - - `__USER_LABEL_PREFIX__' - This macro expands to a single token which is the prefix applied to - user labels (symbols visible to C code) in assembly. For example, - in the `m68k-aout' environment it expands to an `_', but in the - `m68k-coff' environment it expands to nothing. - - This macro will have the correct definition even if - `-f(no-)underscores' is in use, but it will not be correct if - target-specific options that adjust this prefix are used (e.g. the - OSF/rose `-mno-underscores' option). - - `__SIZE_TYPE__' - `__PTRDIFF_TYPE__' - `__WCHAR_TYPE__' - `__WINT_TYPE__' - These macros are defined to the correct underlying types for the - `size_t', `ptrdiff_t', `wchar_t', and `wint_t' typedefs, - respectively. They exist to make the standard header files - `stddef.h' and `wchar.h' work correctly. You should not use these - macros directly; instead, include the appropriate headers and use - the typedefs. - - `__USING_SJLJ_EXCEPTIONS__' - This macro is defined, with value 1, if the compiler uses the old - mechanism based on `setjmp' and `longjmp' for exception handling. - -  - File: cpp.info, Node: System-specific Predefined Macros, Next: C++ Named Operators, Prev: Common Predefined Macros, Up: Predefined Macros - - System-specific Predefined Macros - --------------------------------- - - The C preprocessor normally predefines several macros that indicate - what type of system and machine is in use. They are obviously - different on each target supported by GCC. This manual, being for all - systems and machines, cannot tell you what their names are, but you can - use `cpp -dM' to see them all. *Note Invocation::. All system-specific - predefined macros expand to the constant 1, so you can test them with - either `#ifdef' or `#if'. - - The C standard requires that all system-specific macros be part of - the "reserved namespace". All names which begin with two underscores, - or an underscore and a capital letter, are reserved for the compiler and - library to use as they wish. However, historically system-specific - macros have had names with no special prefix; for instance, it is common - to find `unix' defined on Unix systems. For all such macros, GCC - provides a parallel macro with two underscores added at the beginning - and the end. If `unix' is defined, `__unix__' will be defined too. - There will never be more than two underscores; the parallel of `_mips' - is `__mips__'. - - When the `-ansi' option, or any `-std' option that requests strict - conformance, is given to the compiler, all the system-specific - predefined macros outside the reserved namespace are suppressed. The - parallel macros, inside the reserved namespace, remain defined. - - We are slowly phasing out all predefined macros which are outside the - reserved namespace. You should never use them in new programs, and we - encourage you to correct older code to use the parallel macros whenever - you find it. We don't recommend you use the system-specific macros that - are in the reserved namespace, either. It is better in the long run to - check specifically for features you need, using a tool such as - `autoconf'. - -  - File: cpp.info, Node: C++ Named Operators, Prev: System-specific Predefined Macros, Up: Predefined Macros - - C++ Named Operators - ------------------- - - In C++, there are eleven keywords which are simply alternate - spellings of operators normally written with punctuation. These - keywords are treated as such even in the preprocessor. They function - as operators in `#if', and they cannot be defined as macros or - poisoned. In C, you can request that those keywords take their C++ - meaning by including `iso646.h'. That header defines each one as a - normal object-like macro expanding to the appropriate punctuator. - - These are the named operators and their corresponding punctuators: - - Named Operator Punctuator - `and' `&&' - `and_eq' `&=' - `bitand' `&' - `bitor' `|' - `compl' `~' - `not' `!' - `not_eq' `!=' - `or' `||' - `or_eq' `|=' - `xor' `^' - `xor_eq' `^=' - -  - File: cpp.info, Node: Undefining and Redefining Macros, Next: Macro Pitfalls, Prev: Predefined Macros, Up: Macros - - Undefining and Redefining Macros - ================================ - - If a macro ceases to be useful, it may be "undefined" with the - `#undef' directive. `#undef' takes a single argument, the name of the - macro to undefine. You use the bare macro name, even if the macro is - function-like. It is an error if anything appears on the line after - the macro name. `#undef' has no effect if the name is not a macro. - - #define FOO 4 - x = FOO; ==> x = 4; - #undef FOO - x = FOO; ==> x = FOO; - - Once a macro has been undefined, that identifier may be "redefined" - as a macro by a subsequent `#define' directive. The new definition - need not have any resemblance to the old definition. - - However, if an identifier which is currently a macro is redefined, - then the new definition must be "effectively the same" as the old one. - Two macro definitions are effectively the same if: - * Both are the same type of macro (object- or function-like). - - * All the tokens of the replacement list are the same. - - * If there are any parameters, they are the same. - - * Whitespace appears in the same places in both. It need not be - exactly the same amount of whitespace, though. Remember that - comments count as whitespace. - - These definitions are effectively the same: - #define FOUR (2 + 2) - #define FOUR (2 + 2) - #define FOUR (2 /* two */ + 2) - - but these are not: - #define FOUR (2 + 2) - #define FOUR ( 2+2 ) - #define FOUR (2 * 2) - #define FOUR(score,and,seven,years,ago) (2 + 2) - - If a macro is redefined with a definition that is not effectively the - same as the old one, the preprocessor issues a warning and changes the - macro to use the new definition. If the new definition is effectively - the same, the redefinition is silently ignored. This allows, for - instance, two different headers to define a common macro. The - preprocessor will only complain if the definitions do not match. - -  - File: cpp.info, Node: Macro Pitfalls, Prev: Undefining and Redefining Macros, Up: Macros - - Macro Pitfalls - ============== - - In this section we describe some special rules that apply to macros - and macro expansion, and point out certain cases in which the rules have - counter-intuitive consequences that you must watch out for. - - * Menu: - - * Misnesting:: - * Operator Precedence Problems:: - * Swallowing the Semicolon:: - * Duplication of Side Effects:: - * Self-Referential Macros:: - * Argument Prescan:: - * Newlines in Arguments:: - -  - File: cpp.info, Node: Misnesting, Next: Operator Precedence Problems, Up: Macro Pitfalls - - Misnesting - ---------- - - When a macro is called with arguments, the arguments are substituted - into the macro body and the result is checked, together with the rest of - the input file, for more macro calls. It is possible to piece together - a macro call coming partially from the macro body and partially from the - arguments. For example, - - #define twice(x) (2*(x)) - #define call_with_1(x) x(1) - call_with_1 (twice) - ==> twice(1) - ==> (2*(1)) - - Macro definitions do not have to have balanced parentheses. By - writing an unbalanced open parenthesis in a macro body, it is possible - to create a macro call that begins inside the macro body but ends - outside of it. For example, - - #define strange(file) fprintf (file, "%s %d", - ... - strange(stderr) p, 35) - ==> fprintf (stderr, "%s %d", p, 35) - - The ability to piece together a macro call can be useful, but the - use of unbalanced open parentheses in a macro body is just confusing, - and should be avoided. - -  - File: cpp.info, Node: Operator Precedence Problems, Next: Swallowing the Semicolon, Prev: Misnesting, Up: Macro Pitfalls - - Operator Precedence Problems - ---------------------------- - - You may have noticed that in most of the macro definition examples - shown above, each occurrence of a macro argument name had parentheses - around it. In addition, another pair of parentheses usually surround - the entire macro definition. Here is why it is best to write macros - that way. - - Suppose you define a macro as follows, - - #define ceil_div(x, y) (x + y - 1) / y - - whose purpose is to divide, rounding up. (One use for this operation is - to compute how many `int' objects are needed to hold a certain number - of `char' objects.) Then suppose it is used as follows: - - a = ceil_div (b & c, sizeof (int)); - ==> a = (b & c + sizeof (int) - 1) / sizeof (int); - - This does not do what is intended. The operator-precedence rules of C - make it equivalent to this: - - a = (b & (c + sizeof (int) - 1)) / sizeof (int); - - What we want is this: - - a = ((b & c) + sizeof (int) - 1)) / sizeof (int); - - Defining the macro as - - #define ceil_div(x, y) ((x) + (y) - 1) / (y) - - provides the desired result. - - Unintended grouping can result in another way. Consider `sizeof - ceil_div(1, 2)'. That has the appearance of a C expression that would - compute the size of the type of `ceil_div (1, 2)', but in fact it means - something very different. Here is what it expands to: - - sizeof ((1) + (2) - 1) / (2) - - This would take the size of an integer and divide it by two. The - precedence rules have put the division outside the `sizeof' when it was - intended to be inside. - - Parentheses around the entire macro definition prevent such problems. - Here, then, is the recommended way to define `ceil_div': - - #define ceil_div(x, y) (((x) + (y) - 1) / (y)) - -  - File: cpp.info, Node: Swallowing the Semicolon, Next: Duplication of Side Effects, Prev: Operator Precedence Problems, Up: Macro Pitfalls - - Swallowing the Semicolon - ------------------------ - - Often it is desirable to define a macro that expands into a compound - statement. Consider, for example, the following macro, that advances a - pointer (the argument `p' says where to find it) across whitespace - characters: - - #define SKIP_SPACES(p, limit) \ - { char *lim = (limit); \ - while (p < lim) { \ - if (*p++ != ' ') { \ - p--; break; }}} - - Here backslash-newline is used to split the macro definition, which must - be a single logical line, so that it resembles the way such code would - be laid out if not part of a macro definition. - - A call to this macro might be `SKIP_SPACES (p, lim)'. Strictly - speaking, the call expands to a compound statement, which is a complete - statement with no need for a semicolon to end it. However, since it - looks like a function call, it minimizes confusion if you can use it - like a function call, writing a semicolon afterward, as in `SKIP_SPACES - (p, lim);' - - This can cause trouble before `else' statements, because the - semicolon is actually a null statement. Suppose you write - - if (*p != 0) - SKIP_SPACES (p, lim); - else ... - - The presence of two statements--the compound statement and a null - statement--in between the `if' condition and the `else' makes invalid C - code. - - The definition of the macro `SKIP_SPACES' can be altered to solve - this problem, using a `do ... while' statement. Here is how: - - #define SKIP_SPACES(p, limit) \ - do { char *lim = (limit); \ - while (p < lim) { \ - if (*p++ != ' ') { \ - p--; break; }}} \ - while (0) - - Now `SKIP_SPACES (p, lim);' expands into - - do {...} while (0); - - which is one statement. The loop executes exactly once; most compilers - generate no extra code for it. - -  - File: cpp.info, Node: Duplication of Side Effects, Next: Self-Referential Macros, Prev: Swallowing the Semicolon, Up: Macro Pitfalls - - Duplication of Side Effects - --------------------------- - - Many C programs define a macro `min', for "minimum", like this: - - #define min(X, Y) ((X) < (Y) ? (X) : (Y)) - - When you use this macro with an argument containing a side effect, - as shown here, - - next = min (x + y, foo (z)); - - it expands as follows: - - next = ((x + y) < (foo (z)) ? (x + y) : (foo (z))); - - where `x + y' has been substituted for `X' and `foo (z)' for `Y'. - - The function `foo' is used only once in the statement as it appears - in the program, but the expression `foo (z)' has been substituted twice - into the macro expansion. As a result, `foo' might be called two times - when the statement is executed. If it has side effects or if it takes - a long time to compute, the results might not be what you intended. We - say that `min' is an "unsafe" macro. - - The best solution to this problem is to define `min' in a way that - computes the value of `foo (z)' only once. The C language offers no - standard way to do this, but it can be done with GNU extensions as - follows: - - #define min(X, Y) \ - ({ typeof (X) x_ = (X); \ - typeof (Y) y_ = (Y); \ - (x_ < y_) ? x_ : y_; }) - - The `({ ... })' notation produces a compound statement that acts as - an expression. Its value is the value of its last statement. This - permits us to define local variables and assign each argument to one. - The local variables have underscores after their names to reduce the - risk of conflict with an identifier of wider scope (it is impossible to - avoid this entirely). Now each argument is evaluated exactly once. - - If you do not wish to use GNU C extensions, the only solution is to - be careful when _using_ the macro `min'. For example, you can - calculate the value of `foo (z)', save it in a variable, and use that - variable in `min': - - #define min(X, Y) ((X) < (Y) ? (X) : (Y)) - ... - { - int tem = foo (z); - next = min (x + y, tem); - } - - (where we assume that `foo' returns type `int'). - -  - File: cpp.info, Node: Self-Referential Macros, Next: Argument Prescan, Prev: Duplication of Side Effects, Up: Macro Pitfalls - - Self-Referential Macros - ----------------------- - - A "self-referential" macro is one whose name appears in its - definition. Recall that all macro definitions are rescanned for more - macros to replace. If the self-reference were considered a use of the - macro, it would produce an infinitely large expansion. To prevent this, - the self-reference is not considered a macro call. It is passed into - the preprocessor output unchanged. Let's consider an example: - - #define foo (4 + foo) - - where `foo' is also a variable in your program. - - Following the ordinary rules, each reference to `foo' will expand - into `(4 + foo)'; then this will be rescanned and will expand into `(4 - + (4 + foo))'; and so on until the computer runs out of memory. - - The self-reference rule cuts this process short after one step, at - `(4 + foo)'. Therefore, this macro definition has the possibly useful - effect of causing the program to add 4 to the value of `foo' wherever - `foo' is referred to. - - In most cases, it is a bad idea to take advantage of this feature. A - person reading the program who sees that `foo' is a variable will not - expect that it is a macro as well. The reader will come across the - identifier `foo' in the program and think its value should be that of - the variable `foo', whereas in fact the value is four greater. - - One common, useful use of self-reference is to create a macro which - expands to itself. If you write - - #define EPERM EPERM - - then the macro `EPERM' expands to `EPERM'. Effectively, it is left - alone by the preprocessor whenever it's used in running text. You can - tell that it's a macro with `#ifdef'. You might do this if you want to - define numeric constants with an `enum', but have `#ifdef' be true for - each constant. - - If a macro `x' expands to use a macro `y', and the expansion of `y' - refers to the macro `x', that is an "indirect self-reference" of `x'. - `x' is not expanded in this case either. Thus, if we have - - #define x (4 + y) - #define y (2 * x) - - then `x' and `y' expand as follows: - - x ==> (4 + y) - ==> (4 + (2 * x)) - - y ==> (2 * x) - ==> (2 * (4 + y)) - - Each macro is expanded when it appears in the definition of the other - macro, but not when it indirectly appears in its own definition. - -  - File: cpp.info, Node: Argument Prescan, Next: Newlines in Arguments, Prev: Self-Referential Macros, Up: Macro Pitfalls - - Argument Prescan - ---------------- - - Macro arguments are completely macro-expanded before they are - substituted into a macro body, unless they are stringified or pasted - with other tokens. After substitution, the entire macro body, including - the substituted arguments, is scanned again for macros to be expanded. - The result is that the arguments are scanned _twice_ to expand macro - calls in them. - - Most of the time, this has no effect. If the argument contained any - macro calls, they are expanded during the first scan. The result - therefore contains no macro calls, so the second scan does not change - it. If the argument were substituted as given, with no prescan, the - single remaining scan would find the same macro calls and produce the - same results. - - You might expect the double scan to change the results when a - self-referential macro is used in an argument of another macro (*note - Self-Referential Macros::): the self-referential macro would be - expanded once in the first scan, and a second time in the second scan. - However, this is not what happens. The self-references that do not - expand in the first scan are marked so that they will not expand in the - second scan either. - - You might wonder, "Why mention the prescan, if it makes no - difference? And why not skip it and make the preprocessor faster?" - The answer is that the prescan does make a difference in three special - cases: - - * Nested calls to a macro. - - We say that "nested" calls to a macro occur when a macro's argument - contains a call to that very macro. For example, if `f' is a macro - that expects one argument, `f (f (1))' is a nested pair of calls to - `f'. The desired expansion is made by expanding `f (1)' and - substituting that into the definition of `f'. The prescan causes - the expected result to happen. Without the prescan, `f (1)' itself - would be substituted as an argument, and the inner use of `f' would - appear during the main scan as an indirect self-reference and - would not be expanded. - - * Macros that call other macros that stringify or concatenate. - - If an argument is stringified or concatenated, the prescan does not - occur. If you _want_ to expand a macro, then stringify or - concatenate its expansion, you can do that by causing one macro to - call another macro that does the stringification or concatenation. - For instance, if you have - - #define AFTERX(x) X_ ## x - #define XAFTERX(x) AFTERX(x) - #define TABLESIZE 1024 - #define BUFSIZE TABLESIZE - - then `AFTERX(BUFSIZE)' expands to `X_BUFSIZE', and - `XAFTERX(BUFSIZE)' expands to `X_1024'. (Not to `X_TABLESIZE'. - Prescan always does a complete expansion.) - - * Macros used in arguments, whose expansions contain unshielded - commas. - - This can cause a macro expanded on the second scan to be called - with the wrong number of arguments. Here is an example: - - #define foo a,b - #define bar(x) lose(x) - #define lose(x) (1 + (x)) - - We would like `bar(foo)' to turn into `(1 + (foo))', which would - then turn into `(1 + (a,b))'. Instead, `bar(foo)' expands into - `lose(a,b)', and you get an error because `lose' requires a single - argument. In this case, the problem is easily solved by the same - parentheses that ought to be used to prevent misnesting of - arithmetic operations: - - #define foo (a,b) - or - #define bar(x) lose((x)) - - The extra pair of parentheses prevents the comma in `foo''s - definition from being interpreted as an argument separator. - - -  - File: cpp.info, Node: Newlines in Arguments, Prev: Argument Prescan, Up: Macro Pitfalls - - Newlines in Arguments - --------------------- - - The invocation of a function-like macro can extend over many logical - lines. However, in the present implementation, the entire expansion - comes out on one line. Thus line numbers emitted by the compiler or - debugger refer to the line the invocation started on, which might be - different to the line containing the argument causing the problem. - - Here is an example illustrating this: - - #define ignore_second_arg(a,b,c) a; c - - ignore_second_arg (foo (), - ignored (), - syntax error); - - The syntax error triggered by the tokens `syntax error' results in an - error message citing line three--the line of ignore_second_arg-- even - though the problematic code comes from line five. - - We consider this a bug, and intend to fix it in the near future. - -  - File: cpp.info, Node: Conditionals, Next: Diagnostics, Prev: Macros, Up: Top - - Conditionals - ************ - - A "conditional" is a directive that instructs the preprocessor to - select whether or not to include a chunk of code in the final token - stream passed to the compiler. Preprocessor conditionals can test - arithmetic expressions, or whether a name is defined as a macro, or both - simultaneously using the special `defined' operator. - - A conditional in the C preprocessor resembles in some ways an `if' - statement in C, but it is important to understand the difference between - them. The condition in an `if' statement is tested during the - execution of your program. Its purpose is to allow your program to - behave differently from run to run, depending on the data it is - operating on. The condition in a preprocessing conditional directive is - tested when your program is compiled. Its purpose is to allow different - code to be included in the program depending on the situation at the - time of compilation. - - However, the distinction is becoming less clear. Modern compilers - often do test `if' statements when a program is compiled, if their - conditions are known not to vary at run time, and eliminate code which - can never be executed. If you can count on your compiler to do this, - you may find that your program is more readable if you use `if' - statements with constant conditions (perhaps determined by macros). Of - course, you can only use this to exclude code, not type definitions or - other preprocessing directives, and you can only do it if the code - remains syntactically valid when it is not to be used. - - GCC version 3 eliminates this kind of never-executed code even when - not optimizing. Older versions did it only when optimizing. - - * Menu: - - * Conditional Uses:: - * Conditional Syntax:: - * Deleted Code:: - -  - File: cpp.info, Node: Conditional Uses, Next: Conditional Syntax, Up: Conditionals - - Conditional Uses - ================ - - There are three general reasons to use a conditional. - - * A program may need to use different code depending on the machine - or operating system it is to run on. In some cases the code for - one operating system may be erroneous on another operating system; - for example, it might refer to data types or constants that do not - exist on the other system. When this happens, it is not enough to - avoid executing the invalid code. Its mere presence will cause - the compiler to reject the program. With a preprocessing - conditional, the offending code can be effectively excised from - the program when it is not valid. - - * You may want to be able to compile the same source file into two - different programs. One version might make frequent time-consuming - consistency checks on its intermediate data, or print the values of - those data for debugging, and the other not. - - * A conditional whose condition is always false is one way to - exclude code from the program but keep it as a sort of comment for - future reference. - - Simple programs that do not need system-specific logic or complex - debugging hooks generally will not need to use preprocessing - conditionals. - -  - File: cpp.info, Node: Conditional Syntax, Next: Deleted Code, Prev: Conditional Uses, Up: Conditionals - - Conditional Syntax - ================== - - A conditional in the C preprocessor begins with a "conditional - directive": `#if', `#ifdef' or `#ifndef'. - - * Menu: - - * Ifdef:: - * If:: - * Defined:: - * Else:: - * Elif:: - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.info-3 gcc-3.3/gcc/doc/cpp.info-3 *** gcc-3.2.3/gcc/doc/cpp.info-3 2003-04-22 07:07:10.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.info-3 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1103 **** - This is doc/cpp.info, produced by makeinfo version 4.5 from - doc/cpp.texi. - - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Cpp: (cpp). The GNU C preprocessor. - END-INFO-DIR-ENTRY - -  - File: cpp.info, Node: Ifdef, Next: If, Up: Conditional Syntax - - Ifdef - ----- - - The simplest sort of conditional is - - #ifdef MACRO - - CONTROLLED TEXT - - #endif /* MACRO */ - - This block is called a "conditional group". CONTROLLED TEXT will be - included in the output of the preprocessor if and only if MACRO is - defined. We say that the conditional "succeeds" if MACRO is defined, - "fails" if it is not. - - The CONTROLLED TEXT inside of a conditional can include - preprocessing directives. They are executed only if the conditional - succeeds. You can nest conditional groups inside other conditional - groups, but they must be completely nested. In other words, `#endif' - always matches the nearest `#ifdef' (or `#ifndef', or `#if'). Also, - you cannot start a conditional group in one file and end it in another. - - Even if a conditional fails, the CONTROLLED TEXT inside it is still - run through initial transformations and tokenization. Therefore, it - must all be lexically valid C. Normally the only way this matters is - that all comments and string literals inside a failing conditional group - must still be properly ended. - - The comment following the `#endif' is not required, but it is a good - practice if there is a lot of CONTROLLED TEXT, because it helps people - match the `#endif' to the corresponding `#ifdef'. Older programs - sometimes put MACRO directly after the `#endif' without enclosing it in - a comment. This is invalid code according to the C standard. GNU CPP - accepts it with a warning. It never affects which `#ifndef' the - `#endif' matches. - - Sometimes you wish to use some code if a macro is _not_ defined. - You can do this by writing `#ifndef' instead of `#ifdef'. One common - use of `#ifndef' is to include code only the first time a header file - is included. *Note Once-Only Headers::. - - Macro definitions can vary between compilations for several reasons. - Here are some samples. - - * Some macros are predefined on each kind of machine (*note - System-specific Predefined Macros::). This allows you to provide - code specially tuned for a particular machine. - - * System header files define more macros, associated with the - features they implement. You can test these macros with - conditionals to avoid using a system feature on a machine where it - is not implemented. - - * Macros can be defined or undefined with the `-D' and `-U' command - line options when you compile the program. You can arrange to - compile the same source file into two different programs by - choosing a macro name to specify which program you want, writing - conditionals to test whether or how this macro is defined, and - then controlling the state of the macro with command line options, - perhaps set in the Makefile. *Note Invocation::. - - * Your program might have a special header file (often called - `config.h') that is adjusted when the program is compiled. It can - define or not define macros depending on the features of the - system and the desired capabilities of the program. The - adjustment can be automated by a tool such as `autoconf', or done - by hand. - -  - File: cpp.info, Node: If, Next: Defined, Prev: Ifdef, Up: Conditional Syntax - - If - -- - - The `#if' directive allows you to test the value of an arithmetic - expression, rather than the mere existence of one macro. Its syntax is - - #if EXPRESSION - - CONTROLLED TEXT - - #endif /* EXPRESSION */ - - EXPRESSION is a C expression of integer type, subject to stringent - restrictions. It may contain - - * Integer constants. - - * Character constants, which are interpreted as they would be in - normal code. - - * Arithmetic operators for addition, subtraction, multiplication, - division, bitwise operations, shifts, comparisons, and logical - operations (`&&' and `||'). The latter two obey the usual - short-circuiting rules of standard C. - - * Macros. All macros in the expression are expanded before actual - computation of the expression's value begins. - - * Uses of the `defined' operator, which lets you check whether macros - are defined in the middle of an `#if'. - - * Identifiers that are not macros, which are all considered to be the - number zero. This allows you to write `#if MACRO' instead of - `#ifdef MACRO', if you know that MACRO, when defined, will always - have a nonzero value. Function-like macros used without their - function call parentheses are also treated as zero. - - In some contexts this shortcut is undesirable. The `-Wundef' - option causes GCC to warn whenever it encounters an identifier - which is not a macro in an `#if'. - - The preprocessor does not know anything about types in the language. - Therefore, `sizeof' operators are not recognized in `#if', and neither - are `enum' constants. They will be taken as identifiers which are not - macros, and replaced by zero. In the case of `sizeof', this is likely - to cause the expression to be invalid. - - The preprocessor calculates the value of EXPRESSION. It carries out - all calculations in the widest integer type known to the compiler; on - most machines supported by GCC this is 64 bits. This is not the same - rule as the compiler uses to calculate the value of a constant - expression, and may give different results in some cases. If the value - comes out to be nonzero, the `#if' succeeds and the CONTROLLED TEXT is - included; otherwise it is skipped. - - If EXPRESSION is not correctly formed, GCC issues an error and - treats the conditional as having failed. - -  - File: cpp.info, Node: Defined, Next: Else, Prev: If, Up: Conditional Syntax - - Defined - ------- - - The special operator `defined' is used in `#if' and `#elif' - expressions to test whether a certain name is defined as a macro. - `defined NAME' and `defined (NAME)' are both expressions whose value is - 1 if NAME is defined as a macro at the current point in the program, - and 0 otherwise. Thus, `#if defined MACRO' is precisely equivalent to - `#ifdef MACRO'. - - `defined' is useful when you wish to test more than one macro for - existence at once. For example, - - #if defined (__vax__) || defined (__ns16000__) - - would succeed if either of the names `__vax__' or `__ns16000__' is - defined as a macro. - - Conditionals written like this: - - #if defined BUFSIZE && BUFSIZE >= 1024 - - can generally be simplified to just `#if BUFSIZE >= 1024', since if - `BUFSIZE' is not defined, it will be interpreted as having the value - zero. - - If the `defined' operator appears as a result of a macro expansion, - the C standard says the behavior is undefined. GNU cpp treats it as a - genuine `defined' operator and evaluates it normally. It will warn - wherever your code uses this feature if you use the command-line option - `-pedantic', since other compilers may handle it differently. - -  - File: cpp.info, Node: Else, Next: Elif, Prev: Defined, Up: Conditional Syntax - - Else - ---- - - The `#else' directive can be added to a conditional to provide - alternative text to be used if the condition fails. This is what it - looks like: - - #if EXPRESSION - TEXT-IF-TRUE - #else /* Not EXPRESSION */ - TEXT-IF-FALSE - #endif /* Not EXPRESSION */ - - If EXPRESSION is nonzero, the TEXT-IF-TRUE is included and the - TEXT-IF-FALSE is skipped. If EXPRESSION is zero, the opposite happens. - - You can use `#else' with `#ifdef' and `#ifndef', too. - -  - File: cpp.info, Node: Elif, Prev: Else, Up: Conditional Syntax - - Elif - ---- - - One common case of nested conditionals is used to check for more - than two possible alternatives. For example, you might have - - #if X == 1 - ... - #else /* X != 1 */ - #if X == 2 - ... - #else /* X != 2 */ - ... - #endif /* X != 2 */ - #endif /* X != 1 */ - - Another conditional directive, `#elif', allows this to be - abbreviated as follows: - - #if X == 1 - ... - #elif X == 2 - ... - #else /* X != 2 and X != 1*/ - ... - #endif /* X != 2 and X != 1*/ - - `#elif' stands for "else if". Like `#else', it goes in the middle - of a conditional group and subdivides it; it does not require a - matching `#endif' of its own. Like `#if', the `#elif' directive - includes an expression to be tested. The text following the `#elif' is - processed only if the original `#if'-condition failed and the `#elif' - condition succeeds. - - More than one `#elif' can go in the same conditional group. Then - the text after each `#elif' is processed only if the `#elif' condition - succeeds after the original `#if' and all previous `#elif' directives - within it have failed. - - `#else' is allowed after any number of `#elif' directives, but - `#elif' may not follow `#else'. - -  - File: cpp.info, Node: Deleted Code, Prev: Conditional Syntax, Up: Conditionals - - Deleted Code - ============ - - If you replace or delete a part of the program but want to keep the - old code around for future reference, you often cannot simply comment it - out. Block comments do not nest, so the first comment inside the old - code will end the commenting-out. The probable result is a flood of - syntax errors. - - One way to avoid this problem is to use an always-false conditional - instead. For instance, put `#if 0' before the deleted code and - `#endif' after it. This works even if the code being turned off - contains conditionals, but they must be entire conditionals (balanced - `#if' and `#endif'). - - Some people use `#ifdef notdef' instead. This is risky, because - `notdef' might be accidentally defined as a macro, and then the - conditional would succeed. `#if 0' can be counted on to fail. - - Do not use `#if 0' for comments which are not C code. Use a real - comment, instead. The interior of `#if 0' must consist of complete - tokens; in particular, single-quote characters must balance. Comments - often contain unbalanced single-quote characters (known in English as - apostrophes). These confuse `#if 0'. They don't confuse `/*'. - -  - File: cpp.info, Node: Diagnostics, Next: Line Control, Prev: Conditionals, Up: Top - - Diagnostics - *********** - - The directive `#error' causes the preprocessor to report a fatal - error. The tokens forming the rest of the line following `#error' are - used as the error message. - - You would use `#error' inside of a conditional that detects a - combination of parameters which you know the program does not properly - support. For example, if you know that the program will not run - properly on a VAX, you might write - - #ifdef __vax__ - #error "Won't work on VAXen. See comments at get_last_object." - #endif - - If you have several configuration parameters that must be set up by - the installation in a consistent way, you can use conditionals to detect - an inconsistency and report it with `#error'. For example, - - #if !defined(UNALIGNED_INT_ASM_OP) && defined(DWARF2_DEBUGGING_INFO) - #error "DWARF2_DEBUGGING_INFO requires UNALIGNED_INT_ASM_OP." - #endif - - The directive `#warning' is like `#error', but causes the - preprocessor to issue a warning and continue preprocessing. The tokens - following `#warning' are used as the warning message. - - You might use `#warning' in obsolete header files, with a message - directing the user to the header file which should be used instead. - - Neither `#error' nor `#warning' macro-expands its argument. - Internal whitespace sequences are each replaced with a single space. - The line must consist of complete tokens. It is wisest to make the - argument of these directives be a single string constant; this avoids - problems with apostrophes and the like. - -  - File: cpp.info, Node: Line Control, Next: Pragmas, Prev: Diagnostics, Up: Top - - Line Control - ************ - - The C preprocessor informs the C compiler of the location in your - source code where each token came from. Presently, this is just the - file name and line number. All the tokens resulting from macro - expansion are reported as having appeared on the line of the source - file where the outermost macro was used. We intend to be more accurate - in the future. - - If you write a program which generates source code, such as the - `bison' parser generator, you may want to adjust the preprocessor's - notion of the current file name and line number by hand. Parts of the - output from `bison' are generated from scratch, other parts come from a - standard parser file. The rest are copied verbatim from `bison''s - input. You would like compiler error messages and symbolic debuggers - to be able to refer to `bison''s input file. - - `bison' or any such program can arrange this by writing `#line' - directives into the output file. `#line' is a directive that specifies - the original line number and source file name for subsequent input in - the current preprocessor input file. `#line' has three variants: - - `#line LINENUM' - LINENUM is a non-negative decimal integer constant. It specifies - the line number which should be reported for the following line of - input. Subsequent lines are counted from LINENUM. - - `#line LINENUM FILENAME' - LINENUM is the same as for the first form, and has the same - effect. In addition, FILENAME is a string constant. The - following line and all subsequent lines are reported to come from - the file it specifies, until something else happens to change that. - FILENAME is interpreted according to the normal rules for a string - constant: backslash escapes are interpreted. This is different - from `#include'. - - Previous versions of GNU CPP did not interpret escapes in `#line'; - we have changed it because the standard requires they be - interpreted, and most other compilers do. - - `#line ANYTHING ELSE' - ANYTHING ELSE is checked for macro calls, which are expanded. The - result should match one of the above two forms. - - `#line' directives alter the results of the `__FILE__' and - `__LINE__' predefined macros from that point on. *Note Standard - Predefined Macros::. They do not have any effect on `#include''s idea - of the directory containing the current file. This is a change from - GCC 2.95. Previously, a file reading - - #line 1 "../src/gram.y" - #include "gram.h" - - would search for `gram.h' in `../src', then the `-I' chain; the - directory containing the physical source file would not be searched. - In GCC 3.0 and later, the `#include' is not affected by the presence of - a `#line' referring to a different directory. - - We made this change because the old behavior caused problems when - generated source files were transported between machines. For instance, - it is common practice to ship generated parsers with a source release, - so that people building the distribution do not need to have yacc or - Bison installed. These files frequently have `#line' directives - referring to the directory tree of the system where the distribution was - created. If GCC tries to search for headers in those directories, the - build is likely to fail. - - The new behavior can cause failures too, if the generated file is not - in the same directory as its source and it attempts to include a header - which would be visible searching from the directory containing the - source file. However, this problem is easily solved with an additional - `-I' switch on the command line. The failures caused by the old - semantics could sometimes be corrected only by editing the generated - files, which is difficult and error-prone. - -  - File: cpp.info, Node: Pragmas, Next: Other Directives, Prev: Line Control, Up: Top - - Pragmas - ******* - - The `#pragma' directive is the method specified by the C standard - for providing additional information to the compiler, beyond what is - conveyed in the language itself. Three forms of this directive - (commonly known as "pragmas") are specified by the 1999 C standard. A - C compiler is free to attach any meaning it likes to other pragmas. - - GCC has historically preferred to use extensions to the syntax of the - language, such as `__attribute__', for this purpose. However, GCC does - define a few pragmas of its own. These mostly have effects on the - entire translation unit or source file. - - In GCC version 3, all GNU-defined, supported pragmas have been given - a `GCC' prefix. This is in line with the `STDC' prefix on all pragmas - defined by C99. For backward compatibility, pragmas which were - recognized by previous versions are still recognized without the `GCC' - prefix, but that usage is deprecated. Some older pragmas are - deprecated in their entirety. They are not recognized with the `GCC' - prefix. *Note Obsolete Features::. - - C99 introduces the `_Pragma' operator. This feature addresses a - major problem with `#pragma': being a directive, it cannot be produced - as the result of macro expansion. `_Pragma' is an operator, much like - `sizeof' or `defined', and can be embedded in a macro. - - Its syntax is `_Pragma (STRING-LITERAL)', where STRING-LITERAL can - be either a normal or wide-character string literal. It is - destringized, by replacing all `\\' with a single `\' and all `\"' with - a `"'. The result is then processed as if it had appeared as the right - hand side of a `#pragma' directive. For example, - - _Pragma ("GCC dependency \"parse.y\"") - - has the same effect as `#pragma GCC dependency "parse.y"'. The same - effect could be achieved using macros, for example - - #define DO_PRAGMA(x) _Pragma (#x) - DO_PRAGMA (GCC dependency "parse.y") - - The standard is unclear on where a `_Pragma' operator can appear. - The preprocessor does not accept it within a preprocessing conditional - directive like `#if'. To be safe, you are probably best keeping it out - of directives other than `#define', and putting it on a line of its own. - - This manual documents the pragmas which are meaningful to the - preprocessor itself. Other pragmas are meaningful to the C or C++ - compilers. They are documented in the GCC manual. - - `#pragma GCC dependency' - `#pragma GCC dependency' allows you to check the relative dates of - the current file and another file. If the other file is more - recent than the current file, a warning is issued. This is useful - if the current file is derived from the other file, and should be - regenerated. The other file is searched for using the normal - include search path. Optional trailing text can be used to give - more information in the warning message. - - #pragma GCC dependency "parse.y" - #pragma GCC dependency "/usr/include/time.h" rerun fixincludes - - `#pragma GCC poison' - Sometimes, there is an identifier that you want to remove - completely from your program, and make sure that it never creeps - back in. To enforce this, you can "poison" the identifier with - this pragma. `#pragma GCC poison' is followed by a list of - identifiers to poison. If any of those identifiers appears - anywhere in the source after the directive, it is a hard error. - For example, - - #pragma GCC poison printf sprintf fprintf - sprintf(some_string, "hello"); - - will produce an error. - - If a poisoned identifier appears as part of the expansion of a - macro which was defined before the identifier was poisoned, it - will _not_ cause an error. This lets you poison an identifier - without worrying about system headers defining macros that use it. - - For example, - - #define strrchr rindex - #pragma GCC poison rindex - strrchr(some_string, 'h'); - - will not produce an error. - - `#pragma GCC system_header' - This pragma takes no arguments. It causes the rest of the code in - the current file to be treated as if it came from a system header. - *Note System Headers::. - - -  - File: cpp.info, Node: Other Directives, Next: Preprocessor Output, Prev: Pragmas, Up: Top - - Other Directives - **************** - - The `#ident' directive takes one argument, a string constant. On - some systems, that string constant is copied into a special segment of - the object file. On other systems, the directive is ignored. - - This directive is not part of the C standard, but it is not an - official GNU extension either. We believe it came from System V. - - The `#sccs' directive is recognized on some systems, because it - appears in their header files. It is a very old, obscure, extension - which we did not invent, and we have been unable to find any - documentation of what it should do, so GCC simply ignores it. - - The "null directive" consists of a `#' followed by a newline, with - only whitespace (including comments) in between. A null directive is - understood as a preprocessing directive but has no effect on the - preprocessor output. The primary significance of the existence of the - null directive is that an input line consisting of just a `#' will - produce no output, rather than a line of output containing just a `#'. - Supposedly some old C programs contain such lines. - -  - File: cpp.info, Node: Preprocessor Output, Next: Traditional Mode, Prev: Other Directives, Up: Top - - Preprocessor Output - ******************* - - When the C preprocessor is used with the C, C++, or Objective-C - compilers, it is integrated into the compiler and communicates a stream - of binary tokens directly to the compiler's parser. However, it can - also be used in the more conventional standalone mode, where it produces - textual output. - - The output from the C preprocessor looks much like the input, except - that all preprocessing directive lines have been replaced with blank - lines and all comments with spaces. Long runs of blank lines are - discarded. - - The ISO standard specifies that it is implementation defined whether - a preprocessor preserves whitespace between tokens, or replaces it with - e.g. a single space. In GNU CPP, whitespace between tokens is collapsed - to become a single space, with the exception that the first token on a - non-directive line is preceded with sufficient spaces that it appears in - the same column in the preprocessed output that it appeared in the - original source file. This is so the output is easy to read. *Note - Differences from previous versions::. CPP does not insert any - whitespace where there was none in the original source, except where - necessary to prevent an accidental token paste. - - Source file name and line number information is conveyed by lines of - the form - - # LINENUM FILENAME FLAGS - - These are called "linemarkers". They are inserted as needed into the - output (but never within a string or character constant). They mean - that the following line originated in file FILENAME at line LINENUM. - FILENAME will never contain any non-printing characters; they are - replaced with octal escape sequences. - - After the file name comes zero or more flags, which are `1', `2', - `3', or `4'. If there are multiple flags, spaces separate them. Here - is what the flags mean: - - `1' - This indicates the start of a new file. - - `2' - This indicates returning to a file (after having included another - file). - - `3' - This indicates that the following text comes from a system header - file, so certain warnings should be suppressed. - - `4' - This indicates that the following text should be treated as being - wrapped in an implicit `extern "C"' block. - - As an extension, the preprocessor accepts linemarkers in - non-assembler input files. They are treated like the corresponding - `#line' directive, (*note Line Control::), except that trailing flags - are permitted, and are interpreted with the meanings described above. - If multiple flags are given, they must be in ascending order. - - Some directives may be duplicated in the output of the preprocessor. - These are `#ident' (always), `#pragma' (only if the preprocessor does - not handle the pragma itself), and `#define' and `#undef' (with certain - debugging options). If this happens, the `#' of the directive will - always be in the first column, and there will be no space between the - `#' and the directive name. If macro expansion happens to generate - tokens which might be mistaken for a duplicated directive, a space will - be inserted between the `#' and the directive name. - -  - File: cpp.info, Node: Traditional Mode, Next: Implementation Details, Prev: Preprocessor Output, Up: Top - - Traditional Mode - **************** - - Traditional (pre-standard) C preprocessing is rather different from - the preprocessing specified by the standard. When GCC is given the - `-traditional' option, it attempts to emulate a traditional - preprocessor. We do not guarantee that GCC's behavior under - `-traditional' matches any pre-standard preprocessor exactly. - - Traditional mode exists only for backward compatibility. We have no - plans to augment it in any way nor will we change it except to fix - catastrophic bugs. You should be aware that modern C libraries often - have header files which are incompatible with traditional mode. - - This is a list of the differences. It may not be complete, and may - not correspond exactly to the behavior of either GCC or a true - traditional preprocessor. - - * Traditional macro expansion pays no attention to single-quote or - double-quote characters; macro argument symbols are replaced by the - argument values even when they appear within apparent string or - character constants. - - * Traditionally, it is permissible for a macro expansion to end in - the middle of a string or character constant. The constant - continues into the text surrounding the macro call. - - * However, the end of the line terminates a string or character - constant, with no error. (This is a kluge. Traditional mode is - commonly used to preprocess things which are not C, and have a - different comment syntax. Single apostrophes often appear in - comments. This kluge prevents the traditional preprocessor from - issuing errors on such comments.) - - * Preprocessing directives are recognized in traditional C only when - their leading `#' appears in the first column. There can be no - whitespace between the beginning of the line and the `#'. - - * In traditional C, a comment is equivalent to no text at all. (In - ISO C, a comment counts as whitespace.) It can be used sort of - the same way that `##' is used in ISO C, to paste macro arguments - together. - - * Traditional C does not have the concept of a preprocessing number. - - * A macro is not suppressed within its own definition, in - traditional C. Thus, any macro that is used recursively - inevitably causes an error. - - * The `#' and `##' operators are not available in traditional C. - - * In traditional C, the text at the end of a macro expansion can run - together with the text after the macro call, to produce a single - token. This is impossible in ISO C. - - * None of the GNU extensions to the preprocessor are available in - traditional mode, with the exception of a partial implementation of - assertions, and those may be removed in the future. - - * A true traditional C preprocessor does not recognize `#elif', - `#error', or `#pragma'. GCC supports `#elif' and `#error' even in - traditional mode, but not `#pragma'. - - * Traditional mode is text-based, not token-based, and comments are - stripped after macro expansion. Therefore, `/**/' can be used to - paste tokens together provided that there is no whitespace between - it and the tokens to be pasted. - - * Traditional mode preserves the amount and form of whitespace - provided by the user. Hard tabs remain hard tabs. This can be - useful, e.g. if you are preprocessing a Makefile (which we do not - encourage). - - You can request warnings about features that did not exist, or worked - differently, in traditional C with the `-Wtraditional' option. This - works only if you do _not_ specify `-traditional'. GCC does not warn - about features of ISO C which you must use when you are using a - conforming compiler, such as the `#' and `##' operators. - - Presently `-Wtraditional' warns about: - - * Macro parameters that appear within string literals in the macro - body. In traditional C macro replacement takes place within - string literals, but does not in ISO C. - - * In traditional C, some preprocessor directives did not exist. - Traditional preprocessors would only consider a line to be a - directive if the `#' appeared in column 1 on the line. Therefore - `-Wtraditional' warns about directives that traditional C - understands but would ignore because the `#' does not appear as the - first character on the line. It also suggests you hide directives - like `#pragma' not understood by traditional C by indenting them. - Some traditional implementations would not recognize `#elif', so it - suggests avoiding it altogether. - - * A function-like macro that appears without an argument list. In - traditional C this was an error. In ISO C it merely means that the - macro is not expanded. - - * The unary plus operator. This did not exist in traditional C. - - * The `U' and `LL' integer constant suffixes, which were not - available in traditional C. (Traditional C does support the `L' - suffix for simple long integer constants.) You are not warned - about uses of these suffixes in macros defined in system headers. - For instance, `UINT_MAX' may well be defined as `4294967295U', but - you will not be warned if you use `UINT_MAX'. - - You can usually avoid the warning, and the related warning about - constants which are so large that they are unsigned, by writing the - integer constant in question in hexadecimal, with no U suffix. - Take care, though, because this gives the wrong result in exotic - cases. - -  - File: cpp.info, Node: Implementation Details, Next: Invocation, Prev: Traditional Mode, Up: Top - - Implementation Details - ********************** - - Here we document details of how the preprocessor's implementation - affects its user-visible behavior. You should try to avoid undue - reliance on behavior described here, as it is possible that it will - change subtly in future implementations. - - Also documented here are obsolete features and changes from previous - versions of GNU CPP. - - * Menu: - - * Implementation-defined behavior:: - * Implementation limits:: - * Obsolete Features:: - * Differences from previous versions:: - -  - File: cpp.info, Node: Implementation-defined behavior, Next: Implementation limits, Up: Implementation Details - - Implementation-defined behavior - =============================== - - This is how GNU CPP behaves in all the cases which the C standard - describes as "implementation-defined". This term means that the - implementation is free to do what it likes, but must document its choice - and stick to it. - - * The mapping of physical source file multi-byte characters to the - execution character set. - - Currently, GNU cpp only supports character sets that are strict - supersets of ASCII, and performs no translation of characters. - - * Non-empty sequences of whitespace characters. - - In textual output, each whitespace sequence is collapsed to a - single space. For aesthetic reasons, the first token on each - non-directive line of output is preceded with sufficient spaces - that it appears in the same column as it did in the original - source file. - - * The numeric value of character constants in preprocessor - expressions. - - The preprocessor and compiler interpret character constants in the - same way; escape sequences such as `\a' are given the values they - would have on the target machine. - - Multi-character character constants are interpreted a character at - a time, shifting the previous result left by the number of bits per - character on the host, and adding the new character. For example, - 'ab' on an 8-bit host would be interpreted as 'a' * 256 + 'b'. If - there are more characters in the constant than can fit in the - widest native integer type on the host, usually a `long', the - excess characters are ignored and a diagnostic is given. - - * Source file inclusion. - - For a discussion on how the preprocessor locates header files, - *Note Include Operation::. - - * Interpretation of the filename resulting from a macro-expanded - `#include' directive. - - *Note Computed Includes::. - - * Treatment of a `#pragma' directive that after macro-expansion - results in a standard pragma. - - No macro expansion occurs on any `#pragma' directive line, so the - question does not arise. - - Note that GCC does not yet implement any of the standard pragmas. - - -  - File: cpp.info, Node: Implementation limits, Next: Obsolete Features, Prev: Implementation-defined behavior, Up: Implementation Details - - Implementation limits - ===================== - - GNU CPP has a small number of internal limits. This section lists - the limits which the C standard requires to be no lower than some - minimum, and all the others we are aware of. We intend there to be as - few limits as possible. If you encounter an undocumented or - inconvenient limit, please report that to us as a bug. (See the - section on reporting bugs in the GCC manual.) - - Where we say something is limited "only by available memory", that - means that internal data structures impose no intrinsic limit, and space - is allocated with `malloc' or equivalent. The actual limit will - therefore depend on many things, such as the size of other things - allocated by the compiler at the same time, the amount of memory - consumed by other processes on the same computer, etc. - - * Nesting levels of `#include' files. - - We impose an arbitrary limit of 200 levels, to avoid runaway - recursion. The standard requires at least 15 levels. - - * Nesting levels of conditional inclusion. - - The C standard mandates this be at least 63. GNU CPP is limited - only by available memory. - - * Levels of parenthesised expressions within a full expression. - - The C standard requires this to be at least 63. In preprocessor - conditional expressions, it is limited only by available memory. - - * Significant initial characters in an identifier or macro name. - - The preprocessor treats all characters as significant. The C - standard requires only that the first 63 be significant. - - * Number of macros simultaneously defined in a single translation - unit. - - The standard requires at least 4095 be possible. GNU CPP is - limited only by available memory. - - * Number of parameters in a macro definition and arguments in a - macro call. - - We allow `USHRT_MAX', which is no smaller than 65,535. The minimum - required by the standard is 127. - - * Number of characters on a logical source line. - - The C standard requires a minimum of 4096 be permitted. GNU CPP - places no limits on this, but you may get incorrect column numbers - reported in diagnostics for lines longer than 65,535 characters. - - * Maximum size of a source file. - - The standard does not specify any lower limit on the maximum size - of a source file. GNU cpp maps files into memory, so it is - limited by the available address space. This is generally at - least two gigabytes. Depending on the operating system, the size - of physical memory may or may not be a limitation. - - -  - File: cpp.info, Node: Obsolete Features, Next: Differences from previous versions, Prev: Implementation limits, Up: Implementation Details - - Obsolete Features - ================= - - GNU CPP has a number of features which are present mainly for - compatibility with older programs. We discourage their use in new code. - In some cases, we plan to remove the feature in a future version of GCC. - - * Menu: - - * Assertions:: - * Obsolete once-only headers:: - * Miscellaneous obsolete features:: - -  - File: cpp.info, Node: Assertions, Next: Obsolete once-only headers, Up: Obsolete Features - - Assertions - ---------- - - "Assertions" are a deprecated alternative to macros in writing - conditionals to test what sort of computer or system the compiled - program will run on. Assertions are usually predefined, but you can - define them with preprocessing directives or command-line options. - - Assertions were intended to provide a more systematic way to describe - the compiler's target system. However, in practice they are just as - unpredictable as the system-specific predefined macros. In addition, - they are not part of any standard, and only a few compilers support - them. Therefore, the use of assertions is *less* portable than the use - of system-specific predefined macros. We recommend you do not use them - at all. - - An assertion looks like this: - - #PREDICATE (ANSWER) - - PREDICATE must be a single identifier. ANSWER can be any sequence of - tokens; all characters are significant except for leading and trailing - whitespace, and differences in internal whitespace sequences are - ignored. (This is similar to the rules governing macro redefinition.) - Thus, `(x + y)' is different from `(x+y)' but equivalent to - `( x + y )'. Parentheses do not nest inside an answer. - - To test an assertion, you write it in an `#if'. For example, this - conditional succeeds if either `vax' or `ns16000' has been asserted as - an answer for `machine'. - - #if #machine (vax) || #machine (ns16000) - - You can test whether _any_ answer is asserted for a predicate by - omitting the answer in the conditional: - - #if #machine - - Assertions are made with the `#assert' directive. Its sole argument - is the assertion to make, without the leading `#' that identifies - assertions in conditionals. - - #assert PREDICATE (ANSWER) - - You may make several assertions with the same predicate and different - answers. Subsequent assertions do not override previous ones for the - same predicate. All the answers for any given predicate are - simultaneously true. - - Assertions can be cancelled with the `#unassert' directive. It has - the same syntax as `#assert'. In that form it cancels only the answer - which was specified on the `#unassert' line; other answers for that - predicate remain true. You can cancel an entire predicate by leaving - out the answer: - - #unassert PREDICATE - - In either form, if no such assertion has been made, `#unassert' has no - effect. - - You can also make or cancel assertions using command line options. - *Note Invocation::. - -  - File: cpp.info, Node: Obsolete once-only headers, Next: Miscellaneous obsolete features, Prev: Assertions, Up: Obsolete Features - - Obsolete once-only headers - -------------------------- - - GNU CPP supports two more ways of indicating that a header file - should be read only once. Neither one is as portable as a wrapper - `#ifndef', and we recommend you do not use them in new programs. - - In the Objective-C language, there is a variant of `#include' called - `#import' which includes a file, but does so at most once. If you use - `#import' instead of `#include', then you don't need the conditionals - inside the header file to prevent multiple inclusion of the contents. - GCC permits the use of `#import' in C and C++ as well as Objective-C. - However, it is not in standard C or C++ and should therefore not be - used by portable programs. - - `#import' is not a well designed feature. It requires the users of - a header file to know that it should only be included once. It is much - better for the header file's implementor to write the file so that users - don't need to know this. Using a wrapper `#ifndef' accomplishes this - goal. - - In the present implementation, a single use of `#import' will - prevent the file from ever being read again, by either `#import' or - `#include'. You should not rely on this; do not use both `#import' and - `#include' to refer to the same header file. - - Another way to prevent a header file from being included more than - once is with the `#pragma once' directive. If `#pragma once' is seen - when scanning a header file, that file will never be read again, no - matter what. - - `#pragma once' does not have the problems that `#import' does, but - it is not recognized by all preprocessors, so you cannot rely on it in - a portable program. - -  - File: cpp.info, Node: Miscellaneous obsolete features, Prev: Obsolete once-only headers, Up: Obsolete Features - - Miscellaneous obsolete features - ------------------------------- - - Here are a few more obsolete features. - - * Attempting to paste two tokens which together do not form a valid - preprocessing token. - - The preprocessor currently warns about this, and the resulting - preprocessed output is undefined. The tokens remain distinct if - the preprocessor is being used directly by the compiler front end. - - Most of the time, when you get this warning, you will find that - `##' is being used superstitiously, to guard against whitespace - appearing between two tokens. It is almost always safe to delete - the `##'. - - * `#pragma poison' - - This is the same as `#pragma GCC poison'. The version without the - `GCC' prefix is deprecated. *Note Pragmas::. - - * Multi-line string constants - - GCC currently allows a string constant to extend across multiple - logical lines of the source file. This extension is deprecated - and will be removed in a future version of GCC. Such string - constants are already rejected in all directives apart from - `#define'. - - Instead, make use of ISO C concatenation of adjacent string - literals, or use `\n' followed by a backslash-newline. - - -  - File: cpp.info, Node: Differences from previous versions, Prev: Obsolete Features, Up: Implementation Details - - Differences from previous versions - ================================== - - This section details behavior which has changed from previous - versions of GNU CPP. We do not plan to change it again in the near - future, but we do not promise not to, either. - - The "previous versions" discussed here are 2.95 and before. The - behavior of GCC 3.0 is mostly the same as the behavior of the widely - used 2.96 and 2.97 development snapshots. Where there are differences, - they generally represent bugs in the snapshots. - - * Order of evaluation of `#' and `##' operators - - The standard does not specify the order of evaluation of a chain of - `##' operators, nor whether `#' is evaluated before, after, or at - the same time as `##'. You should therefore not write any code - which depends on any specific ordering. It is possible to - guarantee an ordering, if you need one, by suitable use of nested - macros. - - An example of where this might matter is pasting the arguments `1', - `e' and `-2'. This would be fine for left-to-right pasting, but - right-to-left pasting would produce an invalid token `e-2'. - - GCC 3.0 evaluates `#' and `##' at the same time and strictly left - to right. Older versions evaluated all `#' operators first, then - all `##' operators, in an unreliable order. - - * The form of whitespace betwen tokens in preprocessor output - - *Note Preprocessor Output::, for the current textual format. This - is also the format used by stringification. Normally, the - preprocessor communicates tokens directly to the compiler's - parser, and whitespace does not come up at all. - - Older versions of GCC preserved all whitespace provided by the - user and inserted lots more whitespace of their own, because they - could not accurately predict when extra spaces were needed to - prevent accidental token pasting. - - * Optional argument when invoking rest argument macros - - As an extension, GCC permits you to omit the variable arguments - entirely when you use a variable argument macro. This is - forbidden by the 1999 C standard, and will provoke a pedantic - warning with GCC 3.0. Previous versions accepted it silently. - - * `##' swallowing preceding text in rest argument macros - - Formerly, in a macro expansion, if `##' appeared before a variable - arguments parameter, and the set of tokens specified for that - argument in the macro invocation was empty, previous versions of - GNU CPP would back up and remove the preceding sequence of - non-whitespace characters (*not* the preceding token). This - extension is in direct conflict with the 1999 C standard and has - been drastically pared back. - - In the current version of the preprocessor, if `##' appears between - a comma and a variable arguments parameter, and the variable - argument is omitted entirely, the comma will be removed from the - expansion. If the variable argument is empty, or the token before - `##' is not a comma, then `##' behaves as a normal token paste. - - * Traditional mode and GNU extensions - - Traditional mode used to be implemented in the same program as - normal preprocessing. Therefore, all the GNU extensions to the - preprocessor were still available in traditional mode. It is now - a separate program and does not implement any of the GNU - extensions, except for a partial implementation of assertions. - Even those may be removed in a future release. - - * `#line' and `#include' - - The `#line' directive used to change GCC's notion of the - "directory containing the current file," used by `#include' with a - double-quoted header file name. In 3.0 and later, it does not. - *Note Line Control::, for further explanation. - - * Syntax of `#line' - - In GCC 2.95 and previous, the string constant argument to `#line' - was treated the same way as the argument to `#include': backslash - escapes were not honored, and the string ended at the second `"'. - This is not compliant with the C standard. In GCC 3.0, an attempt - was made to correct the behavior, so that the string was treated - as a real string constant, but it turned out to be buggy. In 3.1, - the bugs have been fixed. (We are not fixing the bugs in 3.0 - because they affect relatively few people and the fix is quite - invasive.) - - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.info-4 gcc-3.3/gcc/doc/cpp.info-4 *** gcc-3.2.3/gcc/doc/cpp.info-4 2003-04-22 07:07:10.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.info-4 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1054 **** - This is doc/cpp.info, produced by makeinfo version 4.5 from - doc/cpp.texi. - - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Cpp: (cpp). The GNU C preprocessor. - END-INFO-DIR-ENTRY - -  - File: cpp.info, Node: Invocation, Next: Environment Variables, Prev: Implementation Details, Up: Top - - Invocation - ********** - - Most often when you use the C preprocessor you will not have to - invoke it explicitly: the C compiler will do so automatically. - However, the preprocessor is sometimes useful on its own. All the - options listed here are also acceptable to the C compiler and have the - same meaning, except that the C compiler has different rules for - specifying the output file. - - *Note:* Whether you use the preprocessor by way of `gcc' or `cpp', - the "compiler driver" is run first. This program's purpose is to - translate your command into invocations of the programs that do the - actual work. Their command line interfaces are similar but not - identical to the documented interface, and may change without notice. - - The C preprocessor expects two file names as arguments, INFILE and - OUTFILE. The preprocessor reads INFILE together with any other files - it specifies with `#include'. All the output generated by the combined - input files is written in OUTFILE. - - Either INFILE or OUTFILE may be `-', which as INFILE means to read - from standard input and as OUTFILE means to write to standard output. - Also, if either file is omitted, it means the same as if `-' had been - specified for that file. - - Unless otherwise noted, or the option ends in `=', all options which - take an argument may have that argument appear either immediately after - the option, or with a space between option and argument: `-Ifoo' and - `-I foo' have the same effect. - - Many options have multi-letter names; therefore multiple - single-letter options may _not_ be grouped: `-dM' is very different from - `-d -M'. - - `-D NAME' - Predefine NAME as a macro, with definition `1'. - - `-D NAME=DEFINITION' - Predefine NAME as a macro, with definition DEFINITION. There are - no restrictions on the contents of DEFINITION, but if you are - invoking the preprocessor from a shell or shell-like program you - may need to use the shell's quoting syntax to protect characters - such as spaces that have a meaning in the shell syntax. - - If you wish to define a function-like macro on the command line, - write its argument list with surrounding parentheses before the - equals sign (if any). Parentheses are meaningful to most shells, - so you will need to quote the option. With `sh' and `csh', - `-D'NAME(ARGS...)=DEFINITION'' works. - - `-D' and `-U' options are processed in the order they are given on - the command line. All `-imacros FILE' and `-include FILE' options - are processed after all `-D' and `-U' options. - - `-U NAME' - Cancel any previous definition of NAME, either built in or - provided with a `-D' option. - - `-undef' - Do not predefine any system-specific macros. The common predefined - macros remain defined. - - `-I DIR' - Add the directory DIR to the list of directories to be searched - for header files. *Note Search Path::. Directories named by `-I' - are searched before the standard system include directories. - - It is dangerous to specify a standard system include directory in - an `-I' option. This defeats the special treatment of system - headers (*note System Headers::) . It can also defeat the repairs - to buggy system headers which GCC makes when it is installed. - - `-o FILE' - Write output to FILE. This is the same as specifying FILE as the - second non-option argument to `cpp'. `gcc' has a different - interpretation of a second non-option argument, so you must use - `-o' to specify the output file. - - `-Wall' - Turns on all optional warnings which are desirable for normal - code. At present this is `-Wcomment' and `-Wtrigraphs'. Note that - many of the preprocessor's warnings are on by default and have no - options to control them. - - `-Wcomment' - `-Wcomments' - Warn whenever a comment-start sequence `/*' appears in a `/*' - comment, or whenever a backslash-newline appears in a `//' comment. - (Both forms have the same effect.) - - `-Wtrigraphs' - Warn if any trigraphs are encountered. This option used to take - effect only if `-trigraphs' was also specified, but now works - independently. Warnings are not given for trigraphs within - comments, as they do not affect the meaning of the program. - - `-Wtraditional' - Warn about certain constructs that behave differently in - traditional and ISO C. Also warn about ISO C constructs that have - no traditional C equivalent, and problematic constructs which - should be avoided. *Note Traditional Mode::. - - `-Wimport' - Warn the first time `#import' is used. - - `-Wundef' - Warn whenever an identifier which is not a macro is encountered in - an `#if' directive, outside of `defined'. Such identifiers are - replaced with zero. - - `-Werror' - Make all warnings into hard errors. Source code which triggers - warnings will be rejected. - - `-Wsystem-headers' - Issue warnings for code in system headers. These are normally - unhelpful in finding bugs in your own code, therefore suppressed. - If you are responsible for the system library, you may want to see - them. - - `-w' - Suppress all warnings, including those which GNU CPP issues by - default. - - `-pedantic' - Issue all the mandatory diagnostics listed in the C standard. - Some of them are left out by default, since they trigger - frequently on harmless code. - - `-pedantic-errors' - Issue all the mandatory diagnostics, and make all mandatory - diagnostics into errors. This includes mandatory diagnostics that - GCC issues without `-pedantic' but treats as warnings. - - `-M' - Instead of outputting the result of preprocessing, output a rule - suitable for `make' describing the dependencies of the main source - file. The preprocessor outputs one `make' rule containing the - object file name for that source file, a colon, and the names of - all the included files, including those coming from `-include' or - `-imacros' command line options. - - Unless specified explicitly (with `-MT' or `-MQ'), the object file - name consists of the basename of the source file with any suffix - replaced with object file suffix. If there are many included - files then the rule is split into several lines using `\'-newline. - The rule has no commands. - - This option does not suppress the preprocessor's debug output, - such as `-dM'. To avoid mixing such debug output with the - dependency rules you should explicitly specify the dependency - output file with `-MF', or use an environment variable like - `DEPENDENCIES_OUTPUT' (*note DEPENDENCIES_OUTPUT::). Debug output - will still be sent to the regular output stream as normal. - - Passing `-M' to the driver implies `-E'. - - `-MM' - Like `-M' but do not mention header files that are found in system - header directories, nor header files that are included, directly - or indirectly, from such a header. - - This implies that the choice of angle brackets or double quotes in - an `#include' directive does not in itself determine whether that - header will appear in `-MM' dependency output. This is a slight - change in semantics from GCC versions 3.0 and earlier. - - `-MF FILE' - When used with `-M' or `-MM', specifies a file to write the - dependencies to. If no `-MF' switch is given the preprocessor - sends the rules to the same place it would have sent preprocessed - output. - - When used with the driver options `-MD' or `-MMD', `-MF' overrides - the default dependency output file. - - `-MG' - When used with `-M' or `-MM', `-MG' says to treat missing header - files as generated files and assume they live in the same - directory as the source file. It suppresses preprocessed output, - as a missing header file is ordinarily an error. - - This feature is used in automatic updating of makefiles. - - `-MP' - This option instructs CPP to add a phony target for each dependency - other than the main file, causing each to depend on nothing. These - dummy rules work around errors `make' gives if you remove header - files without updating the `Makefile' to match. - - This is typical output: - - test.o: test.c test.h - - test.h: - - `-MT TARGET' - Change the target of the rule emitted by dependency generation. By - default CPP takes the name of the main input file, including any - path, deletes any file suffix such as `.c', and appends the - platform's usual object suffix. The result is the target. - - An `-MT' option will set the target to be exactly the string you - specify. If you want multiple targets, you can specify them as a - single argument to `-MT', or use multiple `-MT' options. - - For example, `-MT '$(objpfx)foo.o'' might give - - $(objpfx)foo.o: foo.c - - `-MQ TARGET' - Same as `-MT', but it quotes any characters which are special to - Make. `-MQ '$(objpfx)foo.o'' gives - - $$(objpfx)foo.o: foo.c - - The default target is automatically quoted, as if it were given - with `-MQ'. - - `-MD' - `-MD' is equivalent to `-M -MF FILE', except that `-E' is not - implied. The driver determines FILE based on whether an `-o' - option is given. If it is, the driver uses its argument but with - a suffix of `.d', otherwise it take the basename of the input file - and applies a `.d' suffix. - - If `-MD' is used in conjunction with `-E', any `-o' switch is - understood to specify the dependency output file (but *note - -MF::), but if used without `-E', each `-o' is understood to - specify a target object file. - - Since `-E' is not implied, `-MD' can be used to generate a - dependency output file as a side-effect of the compilation process. - - `-MMD' - Like `-MD' except mention only user header files, not system - -header files. - - `-x c' - `-x c++' - `-x objective-c' - `-x assembler-with-cpp' - Specify the source language: C, C++, Objective-C, or assembly. - This has nothing to do with standards conformance or extensions; - it merely selects which base syntax to expect. If you give none - of these options, cpp will deduce the language from the extension - of the source file: `.c', `.cc', `.m', or `.S'. Some other common - extensions for C++ and assembly are also recognized. If cpp does - not recognize the extension, it will treat the file as C; this is - the most generic mode. - - *Note:* Previous versions of cpp accepted a `-lang' option which - selected both the language and the standards conformance level. - This option has been removed, because it conflicts with the `-l' - option. - - `-std=STANDARD' - `-ansi' - Specify the standard to which the code should conform. Currently - cpp only knows about the standards for C; other language standards - will be added in the future. - - STANDARD may be one of: - `iso9899:1990' - `c89' - The ISO C standard from 1990. `c89' is the customary - shorthand for this version of the standard. - - The `-ansi' option is equivalent to `-std=c89'. - - `iso9899:199409' - The 1990 C standard, as amended in 1994. - - `iso9899:1999' - `c99' - `iso9899:199x' - `c9x' - The revised ISO C standard, published in December 1999. - Before publication, this was known as C9X. - - `gnu89' - The 1990 C standard plus GNU extensions. This is the default. - - `gnu99' - `gnu9x' - The 1999 C standard plus GNU extensions. - - `-I-' - Split the include path. Any directories specified with `-I' - options before `-I-' are searched only for headers requested with - `#include "FILE"'; they are not searched for `#include '. - If additional directories are specified with `-I' options after - the `-I-', those directories are searched for all `#include' - directives. - - In addition, `-I-' inhibits the use of the directory of the current - file directory as the first search directory for `#include "FILE"'. - *Note Search Path::. - - `-nostdinc' - Do not search the standard system directories for header files. - Only the directories you have specified with `-I' options (and the - directory of the current file, if appropriate) are searched. - - `-nostdinc++' - Do not search for header files in the C++-specific standard - directories, but do still search the other standard directories. - (This option is used when building the C++ library.) - - `-include FILE' - Process FILE as if `#include "file"' appeared as the first line of - the primary source file. However, the first directory searched - for FILE is the preprocessor's working directory _instead of_ the - directory containing the main source file. If not found there, it - is searched for in the remainder of the `#include "..."' search - chain as normal. - - If multiple `-include' options are given, the files are included - in the order they appear on the command line. - - `-imacros FILE' - Exactly like `-include', except that any output produced by - scanning FILE is thrown away. Macros it defines remain defined. - This allows you to acquire all the macros from a header without - also processing its declarations. - - All files specified by `-imacros' are processed before all files - specified by `-include'. - - `-idirafter DIR' - Search DIR for header files, but do it _after_ all directories - specified with `-I' and the standard system directories have been - exhausted. DIR is treated as a system include directory. - - `-iprefix PREFIX' - Specify PREFIX as the prefix for subsequent `-iwithprefix' - options. If the prefix represents a directory, you should include - the final `/'. - - `-iwithprefix DIR' - `-iwithprefixbefore DIR' - Append DIR to the prefix specified previously with `-iprefix', and - add the resulting directory to the include search path. - `-iwithprefixbefore' puts it in the same place `-I' would; - `-iwithprefix' puts it where `-idirafter' would. - - Use of these options is discouraged. - - `-isystem DIR' - Search DIR for header files, after all directories specified by - `-I' but before the standard system directories. Mark it as a - system directory, so that it gets the same special treatment as is - applied to the standard system directories. *Note System - Headers::. - - `-fpreprocessed' - Indicate to the preprocessor that the input file has already been - preprocessed. This suppresses things like macro expansion, - trigraph conversion, escaped newline splicing, and processing of - most directives. The preprocessor still recognizes and removes - comments, so that you can pass a file preprocessed with `-C' to - the compiler without problems. In this mode the integrated - preprocessor is little more than a tokenizer for the front ends. - - `-fpreprocessed' is implicit if the input file has one of the - extensions `.i', `.ii' or `.mi'. These are the extensions that - GCC uses for preprocessed files created by `-save-temps'. - - `-ftabstop=WIDTH' - Set the distance between tab stops. This helps the preprocessor - report correct column numbers in warnings or errors, even if tabs - appear on the line. If the value is less than 1 or greater than - 100, the option is ignored. The default is 8. - - `-fno-show-column' - Do not print column numbers in diagnostics. This may be necessary - if diagnostics are being scanned by a program that does not - understand the column numbers, such as `dejagnu'. - - `-A PREDICATE=ANSWER' - Make an assertion with the predicate PREDICATE and answer ANSWER. - This form is preferred to the older form `-A PREDICATE(ANSWER)', - which is still supported, because it does not use shell special - characters. *Note Assertions::. - - `-A -PREDICATE=ANSWER' - Cancel an assertion with the predicate PREDICATE and answer ANSWER. - - `-A-' - Cancel all predefined assertions and all assertions preceding it on - the command line. Also, undefine all predefined macros and all - macros preceding it on the command line. (This is a historical - wart and may change in the future.) - - `-dCHARS' - CHARS is a sequence of one or more of the following characters, - and must not be preceded by a space. Other characters are - interpreted by the compiler proper, or reserved for future - versions of GCC, and so are silently ignored. If you specify - characters whose behavior conflicts, the result is undefined. - - `M' - Instead of the normal output, generate a list of `#define' - directives for all the macros defined during the execution of - the preprocessor, including predefined macros. This gives - you a way of finding out what is predefined in your version - of the preprocessor. Assuming you have no file `foo.h', the - command - - touch foo.h; cpp -dM foo.h - - will show all the predefined macros. - - `D' - Like `M' except in two respects: it does _not_ include the - predefined macros, and it outputs _both_ the `#define' - directives and the result of preprocessing. Both kinds of - output go to the standard output file. - - `N' - Like `D', but emit only the macro names, not their expansions. - - `I' - Output `#include' directives in addition to the result of - preprocessing. - - `-P' - Inhibit generation of linemarkers in the output from the - preprocessor. This might be useful when running the preprocessor - on something that is not C code, and will be sent to a program - which might be confused by the linemarkers. *Note Preprocessor - Output::. - - `-C' - Do not discard comments. All comments are passed through to the - output file, except for comments in processed directives, which - are deleted along with the directive. - - You should be prepared for side effects when using `-C'; it causes - the preprocessor to treat comments as tokens in their own right. - For example, comments appearing at the start of what would be a - directive line have the effect of turning that line into an - ordinary source line, since the first token on the line is no - longer a `#'. - - `-gcc' - Define the macros __GNUC__, __GNUC_MINOR__ and - __GNUC_PATCHLEVEL__. These are defined automatically when you use - `gcc -E'; you can turn them off in that case with `-no-gcc'. - - `-traditional' - Try to imitate the behavior of old-fashioned C, as opposed to ISO - C. *Note Traditional Mode::. - - `-trigraphs' - Process trigraph sequences. *Note Initial processing::. - - `-remap' - Enable special code to work around file systems which only permit - very short file names, such as MS-DOS. - - `-$' - Forbid the use of `$' in identifiers. The C standard allows - implementations to define extra characters that can appear in - identifiers. By default GNU CPP permits `$', a common extension. - - `-h' - `--help' - `--target-help' - Print text describing all the command line options instead of - preprocessing anything. - - `-v' - Verbose mode. Print out GNU CPP's version number at the beginning - of execution, and report the final form of the include path. - - `-H' - Print the name of each header file used, in addition to other - normal activities. Each name is indented to show how deep in the - `#include' stack it is. - - `-version' - `--version' - Print out GNU CPP's version number. With one dash, proceed to - preprocess as normal. With two dashes, exit immediately. - -  - File: cpp.info, Node: Environment Variables, Next: GNU Free Documentation License, Prev: Invocation, Up: Top - - Environment Variables - ********************* - - This section describes the environment variables that affect how CPP - operates. You can use them to specify directories or prefixes to use - when searching for include files, or to control dependency output. - - Note that you can also specify places to search using options such as - `-I', and control dependency output with options like `-M' (*note - Invocation::). These take precedence over environment variables, which - in turn take precedence over the configuration of GCC. - - `CPATH' - `C_INCLUDE_PATH' - `CPLUS_INCLUDE_PATH' - `OBJC_INCLUDE_PATH' - Each variable's value is a list of directories separated by a - special character, much like `PATH', in which to look for header - files. The special character, `PATH_SEPARATOR', is - target-dependent and determined at GCC build time. For - Windows-based targets it is a semicolon, and for almost all other - targets it is a colon. - - `CPATH' specifies a list of directories to be searched as if - specified with `-I', but after any paths given with `-I' options - on the command line. The environment variable is used regardless - of which language is being preprocessed. - - The remaining environment variables apply only when preprocessing - the particular language indicated. Each specifies a list of - directories to be searched as if specified with `-isystem', but - after any paths given with `-isystem' options on the command line. - - See also *Note Search Path::. - - `DEPENDENCIES_OUTPUT' - If this variable is set, its value specifies how to output - dependencies for Make based on the non-system header files - processed by the compiler. System header files are ignored in the - dependency output. - - The value of `DEPENDENCIES_OUTPUT' can be just a file name, in - which case the Make rules are written to that file, guessing the - target name from the source file name. Or the value can have the - form `FILE TARGET', in which case the rules are written to file - FILE using TARGET as the target name. - - In other words, this environment variable is equivalent to - combining the options `-MM' and `-MF' (*note Invocation::), with - an optional `-MT' switch too. - - `SUNPRO_DEPENDENCIES' - This variable is the same as the environment variable - `DEPENDENCIES_OUTPUT' (*note DEPENDENCIES_OUTPUT::), except that - system header files are not ignored, so it implies `-M' rather - than `-MM'. However, the dependence on the main input file is - omitted. *Note Invocation::. - -  - File: cpp.info, Node: GNU Free Documentation License, Next: Option Index, Prev: Environment Variables, Up: Top - - GNU Free Documentation License - ****************************** - - Version 1.1, March 2000 - Copyright (C) 2000 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - written document "free" in the sense of freedom: to assure everyone - the effective freedom to copy and redistribute it, with or without - modifying it, either commercially or noncommercially. Secondarily, - this License preserves for the author and publisher a way to get - credit for their work, while not being considered responsible for - modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work that contains a - notice placed by the copyright holder saying it can be distributed - under the terms of this License. The "Document", below, refers to - any such manual or work. Any member of the public is a licensee, - and is addressed as "you". - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter - section of the Document that deals exclusively with the - relationship of the publishers or authors of the Document to the - Document's overall subject (or to related matters) and contains - nothing that could fall directly within that overall subject. - (For example, if the Document is in part a textbook of - mathematics, a Secondary Section may not explain any mathematics.) - The relationship could be a matter of historical connection with - the subject or with related matters, or of legal, commercial, - philosophical, ethical or political position regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, whose contents can be viewed and edited directly - and straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup has been designed - to thwart or discourage subsequent modification by readers is not - Transparent. A copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML designed for human modification. - Opaque formats include PostScript, PDF, proprietary formats that - can be read and edited only by proprietary word processors, SGML - or XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML produced by some word - processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies of the Document numbering more than - 100, and the Document's license notice requires Cover Texts, you - must enclose the copies in covers that carry, clearly and legibly, - all these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a publicly-accessible - computer-network location containing a complete Transparent copy - of the Document, free of added material, which the general - network-using public has access to download anonymously at no - charge using public-standard network protocols. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has less than five). - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section entitled "History", and its title, and - add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. In any section entitled "Acknowledgments" or "Dedications", - preserve the section's title, and preserve in the section all - the substance and tone of each of the contributor - acknowledgments and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section as "Endorsements" or to - conflict in title with any Invariant Section. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections entitled - "History" in the various original documents, forming one section - entitled "History"; likewise combine any sections entitled - "Acknowledgments", and any sections entitled "Dedications". You - must delete all sections entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, does not as a whole count as a - Modified Version of the Document, provided no compilation - copyright is claimed for the compilation. Such a compilation is - called an "aggregate", and this License does not apply to the - other self-contained works thus compiled with the Document, on - account of their being thus compiled, if they are not themselves - derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one - quarter of the entire aggregate, the Document's Cover Texts may be - placed on covers that surround only the Document within the - aggregate. Otherwise they must appear on covers around the whole - aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License provided that you also include the - original English version of this License. In case of a - disagreement between the translation and the original English - version of this License, the original English version will prevail. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - - ADDENDUM: How to use this License for your documents - ==================================================== - - To use this License in a document you have written, include a copy of - the License in the document and put the following copyright and license - notices just after the title page: - - Copyright (C) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have no Invariant Sections, write "with no Invariant Sections" - instead of saying which ones are invariant. If you have no Front-Cover - Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being - LIST"; likewise for Back-Cover Texts. - - If your document contains nontrivial examples of program code, we - recommend releasing these examples in parallel under your choice of - free software license, such as the GNU General Public License, to - permit their use in free software. - -  - File: cpp.info, Node: Option Index, Next: Index of Directives, Prev: GNU Free Documentation License, Up: Top - - Option Index - ************ - - CPP's command line options are indexed here without any initial `-' - or `--'. - - * Menu: - - * $: Invocation. - * A: Invocation. - * A-: Invocation. - * ansi: Invocation. - * C: Invocation. - * D: Invocation. - * dD: Invocation. - * dI: Invocation. - * dM: Invocation. - * dN: Invocation. - * fno-show-column: Invocation. - * fpreprocessed: Invocation. - * ftabstop: Invocation. - * gcc: Invocation. - * H: Invocation. - * h: Invocation. - * help: Invocation. - * I: Invocation. - * I-: Invocation. - * idirafter: Invocation. - * imacros: Invocation. - * include: Invocation. - * iprefix: Invocation. - * isystem: Invocation. - * iwithprefix: Invocation. - * iwithprefixbefore: Invocation. - * M: Invocation. - * MD: Invocation. - * MF: Invocation. - * MG: Invocation. - * MM: Invocation. - * MMD: Invocation. - * MP: Invocation. - * MQ: Invocation. - * MT: Invocation. - * nostdinc: Invocation. - * nostdinc++: Invocation. - * o: Invocation. - * P: Invocation. - * pedantic: Invocation. - * pedantic-errors: Invocation. - * remap: Invocation. - * std=: Invocation. - * target-help: Invocation. - * traditional: Invocation. - * trigraphs: Invocation. - * U: Invocation. - * undef: Invocation. - * v: Invocation. - * version: Invocation. - * w: Invocation. - * Wall: Invocation. - * Wcomment: Invocation. - * Wcomments: Invocation. - * Werror: Invocation. - * Wimport: Invocation. - * Wsystem-headers: Invocation. - * Wtraditional: Invocation. - * Wtrigraphs: Invocation. - * Wundef: Invocation. - * x: Invocation. - -  - File: cpp.info, Node: Index of Directives, Next: Concept Index, Prev: Option Index, Up: Top - - Index of Directives - ******************* - - * Menu: - - * #assert: Assertions. - * #define: Object-like Macros. - * #elif: Elif. - * #else: Else. - * #endif: Ifdef. - * #error: Diagnostics. - * #ident: Other Directives. - * #if: Conditional Syntax. - * #ifdef: Ifdef. - * #ifndef: Ifdef. - * #import: Obsolete once-only headers. - * #include: Include Syntax. - * #include_next: Wrapper Headers. - * #line: Line Control. - * #pragma GCC dependency: Pragmas. - * #pragma GCC poison: Pragmas. - * #pragma GCC system_header <1>: Pragmas. - * #pragma GCC system_header: System Headers. - * #sccs: Other Directives. - * #unassert: Assertions. - * #undef: Undefining and Redefining Macros. - * #warning: Diagnostics. - * C_INCLUDE_PATH: Environment Variables. - * CPATH: Environment Variables. - * CPLUS_INCLUDE_PATH: Environment Variables. - * DEPENDENCIES_OUTPUT: Environment Variables. - * OBJC_INCLUDE_PATH: Environment Variables. - * SUNPRO_DEPENDENCIES: Environment Variables. - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.info-5 gcc-3.3/gcc/doc/cpp.info-5 *** gcc-3.2.3/gcc/doc/cpp.info-5 2003-04-22 07:07:10.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.info-5 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,126 **** - This is doc/cpp.info, produced by makeinfo version 4.5 from - doc/cpp.texi. - - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Cpp: (cpp). The GNU C preprocessor. - END-INFO-DIR-ENTRY - -  - File: cpp.info, Node: Concept Index, Prev: Index of Directives, Up: Top - - Concept Index - ************* - - * Menu: - - * # operator: Stringification. - * ## operator: Concatenation. - * _Pragma: Pragmas. - * alternative tokens: Tokenization. - * arguments: Macro Arguments. - * arguments in macro definitions: Macro Arguments. - * assertions: Assertions. - * assertions, cancelling: Assertions. - * backslash-newline: Initial processing. - * block comments: Initial processing. - * C++ named operators: C++ Named Operators. - * character constants: Tokenization. - * character sets: Initial processing. - * command line: Invocation. - * commenting out code: Deleted Code. - * comments: Initial processing. - * common predefined macros: Common Predefined Macros. - * computed includes: Computed Includes. - * concatenation: Concatenation. - * conditional group: Ifdef. - * conditionals: Conditionals. - * continued lines: Initial processing. - * controlling macro: Once-Only Headers. - * defined: Defined. - * dependencies for make as output: Environment Variables. - * dependencies, make: Invocation. - * diagnostic: Diagnostics. - * differences from previous versions: Differences from previous versions. - * digraphs: Tokenization. - * directive line: The preprocessing language. - * directive name: The preprocessing language. - * directives: The preprocessing language. - * empty macro arguments: Macro Arguments. - * environment variables: Environment Variables. - * expansion of arguments: Argument Prescan. - * FDL, GNU Free Documentation License: GNU Free Documentation License. - * function-like macros: Function-like Macros. - * grouping options: Invocation. - * guard macro: Once-Only Headers. - * header file: Header Files. - * header file names: Tokenization. - * identifiers: Tokenization. - * implementation limits: Implementation limits. - * implementation-defined behavior: Implementation-defined behavior. - * including just once: Once-Only Headers. - * invalid token paste: Miscellaneous obsolete features. - * invocation: Invocation. - * iso646.h: C++ Named Operators. - * line comments: Initial processing. - * line control: Line Control. - * line endings: Initial processing. - * linemarkers: Preprocessor Output. - * macro argument expansion: Argument Prescan. - * macros in include: Computed Includes. - * macros with arguments: Macro Arguments. - * macros with variable arguments: Variadic Macros. - * make: Invocation. - * manifest constants: Object-like Macros. - * multi-line string constants: Miscellaneous obsolete features. - * named operators: C++ Named Operators. - * newlines in macro arguments: Newlines in Arguments. - * null directive: Other Directives. - * numbers: Tokenization. - * object-like macro: Object-like Macros. - * options: Invocation. - * options, grouping: Invocation. - * other tokens: Tokenization. - * output format: Preprocessor Output. - * overriding a header file: Wrapper Headers. - * parentheses in macro bodies: Operator Precedence Problems. - * pitfalls of macros: Macro Pitfalls. - * pragma poison: Miscellaneous obsolete features. - * predefined macros: Predefined Macros. - * predefined macros, system-specific: System-specific Predefined Macros. - * predicates: Assertions. - * preprocessing directives: The preprocessing language. - * preprocessing numbers: Tokenization. - * preprocessing tokens: Tokenization. - * prescan of macro arguments: Argument Prescan. - * problems with macros: Macro Pitfalls. - * punctuators: Tokenization. - * redefining macros: Undefining and Redefining Macros. - * repeated inclusion: Once-Only Headers. - * reporting errors: Diagnostics. - * reporting warnings: Diagnostics. - * reserved namespace: System-specific Predefined Macros. - * self-reference: Self-Referential Macros. - * semicolons (after macro calls): Swallowing the Semicolon. - * side effects (in macro arguments): Duplication of Side Effects. - * standard predefined macros.: Standard Predefined Macros. - * string constants: Tokenization. - * string literals: Tokenization. - * stringification: Stringification. - * symbolic constants: Object-like Macros. - * system header files <1>: System Headers. - * system header files: Header Files. - * system-specific predefined macros: System-specific Predefined Macros. - * testing predicates: Assertions. - * token concatenation: Concatenation. - * token pasting: Concatenation. - * tokens: Tokenization. - * trigraphs: Initial processing. - * undefining macros: Undefining and Redefining Macros. - * unsafe macros: Duplication of Side Effects. - * variable number of arguments: Variadic Macros. - * variadic macros: Variadic Macros. - * wrapper #ifndef: Once-Only Headers. - * wrapper headers: Wrapper Headers. - - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/doc/cppinternals.info gcc-3.3/gcc/doc/cppinternals.info *** gcc-3.2.3/gcc/doc/cppinternals.info 2003-04-22 07:07:26.000000000 +0000 --- gcc-3.3/gcc/doc/cppinternals.info 2003-05-14 00:31:48.000000000 +0000 *************** *** 1,4 **** ! This is doc/cppinternals.info, produced by makeinfo version 4.5 from doc/cppinternals.texi. INFO-DIR-SECTION Programming --- 1,4 ---- ! This is doc/cppinternals.info, produced by makeinfo version 4.2 from doc/cppinternals.texi. INFO-DIR-SECTION Programming diff -Nrc3pad gcc-3.2.3/gcc/doc/cppopts.texi gcc-3.3/gcc/doc/cppopts.texi *** gcc-3.2.3/gcc/doc/cppopts.texi 2002-09-11 16:40:27.000000000 +0000 --- gcc-3.3/gcc/doc/cppopts.texi 2003-03-16 14:13:10.000000000 +0000 *************** for header files. *** 51,66 **** @xref{Search Path}. @end ifset Directories named by @option{-I} are searched before the standard ! system include directories. ! ! It is dangerous to specify a standard system include directory in an ! @option{-I} option. This defeats the special treatment of system ! headers @ifset cppmanual (@pxref{System Headers}) @end ifset ! . It can also defeat the repairs to buggy system headers which GCC ! makes when it is installed. @item -o @var{file} @opindex o --- 51,64 ---- @xref{Search Path}. @end ifset Directories named by @option{-I} are searched before the standard ! system include directories. If the directory @var{dir} is a standard ! system include directory, the option is ignored to ensure that the ! default search order for system directories and the special treatment ! of system headers are not defeated @ifset cppmanual (@pxref{System Headers}) @end ifset ! . @item -o @var{file} @opindex o *************** Warn whenever an identifier which is not *** 110,115 **** --- 108,151 ---- @samp{#if} directive, outside of @samp{defined}. Such identifiers are replaced with zero. + @item -Wunused-macros + @opindex Wunused-macros + Warn about macros defined in the main file that are unused. A macro + is @dfn{used} if it is expanded or tested for existence at least once. + The preprocessor will also warn if the macro has not been used at the + time it is redefined or undefined. + + Built-in macros, macros defined on the command line, and macros + defined in include files are not warned about. + + @strong{Note:} If a macro is actually used, but only used in skipped + conditional blocks, then CPP will report it as unused. To avoid the + warning in such a case, you might improve the scope of the macro's + definition by, for example, moving it into the first skipped block. + Alternatively, you could provide a dummy use with something like: + + @smallexample + #if defined the_macro_causing_the_warning + #endif + @end smallexample + + @item -Wendif-labels + @opindex Wendif-labels + Warn whenever an @samp{#else} or an @samp{#endif} are followed by text. + This usually happens in code of the form + + @smallexample + #if FOO + @dots{} + #else FOO + @dots{} + #endif FOO + @end smallexample + + @noindent + The second and third @code{FOO} should be in comments, but often are not + in older programs. This warning is on by default. + @item -Werror @opindex Werror Make all warnings into hard errors. Source code which triggers warnings *************** This option does not suppress the prepro *** 158,167 **** @option{-dM}. To avoid mixing such debug output with the dependency rules you should explicitly specify the dependency output file with @option{-MF}, or use an environment variable like ! @env{DEPENDENCIES_OUTPUT} (@pxref{DEPENDENCIES_OUTPUT}). Debug output will still be sent to the regular output stream as normal. ! Passing @option{-M} to the driver implies @option{-E}. @item -MM @opindex MM --- 194,204 ---- @option{-dM}. To avoid mixing such debug output with the dependency rules you should explicitly specify the dependency output file with @option{-MF}, or use an environment variable like ! @env{DEPENDENCIES_OUTPUT} (@pxref{Environment Variables}). Debug output will still be sent to the regular output stream as normal. ! Passing @option{-M} to the driver implies @option{-E}, and suppresses ! warnings with an implicit @option{-w}. @item -MM @opindex MM *************** When used with the driver options @optio *** 187,196 **** @item -MG @opindex MG ! When used with @option{-M} or @option{-MM}, @option{-MG} says to treat missing ! header files as generated files and assume they live in the same ! directory as the source file. It suppresses preprocessed output, as a ! missing header file is ordinarily an error. This feature is used in automatic updating of makefiles. --- 224,236 ---- @item -MG @opindex MG ! In conjunction with an option such as @option{-M} requesting ! dependency generation, @option{-MG} assumes missing header files are ! generated files and adds them to the dependency list without raising ! an error. The dependency filename is taken directly from the ! @code{#include} directive without prepending any path. @option{-MG} ! also suppresses preprocessed output, as a missing header file renders ! this useless. This feature is used in automatic updating of makefiles. *************** option. *** 284,292 **** @itemx -ansi @opindex ansi @opindex std= ! Specify the standard to which the code should conform. Currently cpp ! only knows about the standards for C; other language standards will be ! added in the future. @var{standard} may be one of: --- 324,331 ---- @itemx -ansi @opindex ansi @opindex std= ! Specify the standard to which the code should conform. Currently CPP ! knows about C and C++ standards; others may be added in the future. @var{standard} may be one of: *************** The 1990 C standard plus GNU extensions. *** 314,319 **** --- 353,365 ---- @item gnu99 @itemx gnu9x The 1999 C standard plus GNU extensions. + + @item c++98 + The 1998 ISO C++ standard plus amendments. + + @item gnu++98 + The same as @option{-std=c++98} plus GNU extensions. This is the + default for C++ code. @end table @item -I- *************** it does not use shell special characters *** 441,453 **** Cancel an assertion with the predicate @var{predicate} and answer @var{answer}. - @item -A- - @opindex A- - Cancel all predefined assertions and all assertions preceding it on - the command line. Also, undefine all predefined macros and all - macros preceding it on the command line. (This is a historical wart and - may change in the future.) - @item -dCHARS @var{CHARS} is a sequence of one or more of the following characters, and must not be preceded by a space. Other characters are interpreted --- 487,492 ---- *************** For example, comments appearing at the s *** 510,515 **** --- 549,567 ---- directive line have the effect of turning that line into an ordinary source line, since the first token on the line is no longer a @samp{#}. + @item -CC + Do not discard comments, including during macro expansion. This is + like @option{-C}, except that comments contained within macros are + also passed through to the output file where the macro is expanded. + + In addition to the side-effects of the @option{-C} option, the + @option{-CC} option causes all C++-style comments inside a macro + to be converted to C-style comments. This is to prevent later use + of that macro from inadvertently commenting out the remainder of + the source line. + + The @option{-CC} option is generally used to support lint comments. + @item -gcc @opindex gcc Define the macros @sc{__gnuc__}, @sc{__gnuc_minor__} and *************** Define the macros @sc{__gnuc__}, @sc{__g *** 517,526 **** @command{gcc -E}; you can turn them off in that case with @option{-no-gcc}. ! @item -traditional ! @opindex traditional ! Try to imitate the behavior of old-fashioned C, as opposed to ISO ! C@. @ifset cppmanual @xref{Traditional Mode}. @end ifset --- 569,578 ---- @command{gcc -E}; you can turn them off in that case with @option{-no-gcc}. ! @item -traditional-cpp ! @opindex traditional-cpp ! Try to imitate the behavior of old-fashioned C preprocessors, as ! opposed to ISO C preprocessors. @ifset cppmanual @xref{Traditional Mode}. @end ifset *************** Replacement: [ ] @{ @} *** 552,567 **** Enable special code to work around file systems which only permit very short file names, such as MS-DOS@. - @item -$ - @opindex $ - Forbid the use of @samp{$} in identifiers. The C standard allows - implementations to define extra characters that can appear in - identifiers. By default GNU CPP permits @samp{$}, a common extension. - - @item -h @itemx --help @itemx --target-help - @opindex h @opindex help @opindex target-help Print text describing all the command line options instead of --- 604,611 ---- diff -Nrc3pad gcc-3.2.3/gcc/doc/cpp.texi gcc-3.3/gcc/doc/cpp.texi *** gcc-3.2.3/gcc/doc/cpp.texi 2002-10-05 09:36:28.000000000 +0000 --- gcc-3.3/gcc/doc/cpp.texi 2003-01-26 20:56:54.000000000 +0000 *************** *** 6,15 **** @c @cropmarks @c @finalout ! @macro copyrightnotice @c man begin COPYRIGHT Copyright @copyright{} 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document --- 6,15 ---- @c @cropmarks @c @finalout ! @copying @c man begin COPYRIGHT Copyright @copyright{} 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document *************** section entitled ``GNU Free Documentatio *** 23,31 **** man page gfdl(7). @c man end @end ignore - @end macro - @macro covertexts @c man begin COPYRIGHT This manual contains no Invariant Sections. The Front-Cover Texts are (a) (see below), and the Back-Cover Texts are (b) (see below). --- 23,29 ---- *************** This manual contains no Invariant Sectio *** 40,46 **** software. Copies published by the Free Software Foundation raise funds for GNU development. @c man end ! @end macro @macro gcctabopt{body} @code{\body\} --- 38,44 ---- software. Copies published by the Free Software Foundation raise funds for GNU development. @c man end ! @end copying @macro gcctabopt{body} @code{\body\} *************** This manual contains no Invariant Sectio *** 48,53 **** --- 46,52 ---- @c Create a separate index for command line options. @defcodeindex op + @syncodeindex vr op @c Used in cppopts.texi and cppenv.texi. @set cppmanual *************** This manual contains no Invariant Sectio *** 69,80 **** @c There is a fill at the bottom of the page, so we need a filll to @c override it. @vskip 0pt plus 1filll ! @copyrightnotice{} ! @covertexts{} @end titlepage @contents @page @node Top @top The C preprocessor implements the macro language used to transform C, --- 68,79 ---- @c There is a fill at the bottom of the page, so we need a filll to @c override it. @vskip 0pt plus 1filll ! @insertcopying @end titlepage @contents @page + @ifnottex @node Top @top The C preprocessor implements the macro language used to transform C, *************** useful on its own. *** 96,103 **** * Invocation:: * Environment Variables:: * GNU Free Documentation License:: - * Option Index:: * Index of Directives:: * Concept Index:: @detailmenu --- 95,102 ---- * Invocation:: * Environment Variables:: * GNU Free Documentation License:: * Index of Directives:: + * Option Index:: * Concept Index:: @detailmenu *************** Macros *** 129,134 **** --- 128,134 ---- * Variadic Macros:: * Predefined Macros:: * Undefining and Redefining Macros:: + * Directives Within Macro Arguments:: * Macro Pitfalls:: Predefined Macros *************** Obsolete Features *** 173,186 **** * Assertions:: * Obsolete once-only headers:: - * Miscellaneous obsolete features:: @end detailmenu @end menu ! @ifnottex ! @copyrightnotice{} ! @covertexts{} @end ifnottex @node Overview --- 173,183 ---- * Assertions:: * Obsolete once-only headers:: @end detailmenu @end menu ! @insertcopying @end ifnottex @node Overview *************** will be removed, and the Makefile will n *** 203,209 **** Having said that, you can often get away with using cpp on things which are not C@. Other Algol-ish programming languages are often safe ! (Pascal, Ada, etc.) So is assembly, with caution. @option{-traditional} mode preserves more white space, and is otherwise more permissive. Many of the problems can be avoided by writing C or C++ style comments instead of native language comments, and keeping macros simple. --- 200,206 ---- Having said that, you can often get away with using cpp on things which are not C@. Other Algol-ish programming languages are often safe ! (Pascal, Ada, etc.) So is assembly, with caution. @option{-traditional-cpp} mode preserves more white space, and is otherwise more permissive. Many of the problems can be avoided by writing C or C++ style comments instead of native language comments, and keeping macros simple. *************** of a program which does not expect them. *** 223,228 **** --- 220,235 ---- you should use the @option{-std=c89} or @option{-std=c99} options, depending on which version of the standard you want. To get all the mandatory diagnostics, you must also use @option{-pedantic}. @xref{Invocation}. + + This manual describes the behavior of the ISO preprocessor. To + minimize gratuitous differences, where the ISO preprocessor's + behavior does not conflict with traditional semantics, the + traditional preprocessor should behave the same way. The various + differences that do exist are detailed in the section @ref{Traditional + Mode}. + + For clarity, unless noted otherwise, references to @samp{CPP} in this + manual refer to GNU CPP. @c man end @menu *************** diagnostics, you must also use @option{- *** 237,243 **** The preprocessor performs a series of textual transformations on its input. These happen before all other processing. Conceptually, they happen in a rigid order, and the entire file is run through each ! transformation before the next one begins. GNU CPP actually does them all at once, for performance reasons. These transformations correspond roughly to the first three ``phases of translation'' described in the C standard. --- 244,250 ---- The preprocessor performs a series of textual transformations on its input. These happen before all other processing. Conceptually, they happen in a rigid order, and the entire file is run through each ! transformation before the next one begins. CPP actually does them all at once, for performance reasons. These transformations correspond roughly to the first three ``phases of translation'' described in the C standard. *************** standard. *** 248,254 **** @cindex line endings The input file is read into memory and broken into lines. ! GNU CPP expects its input to be a text file, that is, an unstructured stream of ASCII characters, with some characters indicating the end of a line of text. Extended ASCII character sets, such as ISO Latin-1 or Unicode encoded in UTF-8, are also acceptable. Character sets that are --- 255,261 ---- @cindex line endings The input file is read into memory and broken into lines. ! CPP expects its input to be a text file, that is, an unstructured stream of ASCII characters, with some characters indicating the end of a line of text. Extended ASCII character sets, such as ISO Latin-1 or Unicode encoded in UTF-8, are also acceptable. Character sets that are *************** warning message. *** 274,289 **** @item @cindex trigraphs ! If trigraphs are enabled, they are replaced by their corresponding ! single characters. These are nine three-character sequences, all starting with @samp{??}, that are defined by ISO C to stand for single characters. They permit obsolete systems that lack some of C's punctuation to use C@. For example, @samp{??/} stands for @samp{\}, so @t{'??/n'} is a character ! constant for a newline. By default, GCC ignores trigraphs, but if you ! request a strictly conforming mode with the @option{-std} option, then ! it converts them. Trigraphs are not popular and many compilers implement them incorrectly. Portable code should not rely on trigraphs being either converted or --- 281,297 ---- @item @cindex trigraphs ! @anchor{trigraphs}If trigraphs are enabled, they are replaced by their ! corresponding single characters. By default GCC ignores trigraphs, ! but if you request a strictly conforming mode with the @option{-std} ! option, or you specify the @option{-trigraphs} option, then it ! converts them. These are nine three-character sequences, all starting with @samp{??}, that are defined by ISO C to stand for single characters. They permit obsolete systems that lack some of C's punctuation to use C@. For example, @samp{??/} stands for @samp{\}, so @t{'??/n'} is a character ! constant for a newline. Trigraphs are not popular and many compilers implement them incorrectly. Portable code should not rely on trigraphs being either converted or *************** extremely confusing and should not be us *** 401,426 **** readable. There is no way to prevent a backslash at the end of a line from being ! interpreted as a backslash-newline. ! ! @example ! "foo\\ ! bar" ! @end example ! ! @noindent ! is equivalent to @code{"foo\bar"}, not to @code{"foo\\bar"}. To avoid ! having to worry about this, do not use the deprecated GNU extension ! which permits multi-line strings. Instead, use string literal ! concatenation: ! ! @example ! "foo\\" ! "bar" ! @end example ! ! @noindent ! Your program will be more portable this way, too. @node Tokenization @section Tokenization --- 409,416 ---- readable. There is no way to prevent a backslash at the end of a line from being ! interpreted as a backslash-newline. This cannot affect any correct ! program, however. @node Tokenization @section Tokenization *************** closing quote or angle bracket. The pre *** 535,545 **** file in different places depending on which form you use. @xref{Include Operation}. ! In standard C, no string literal may extend past the end of a line. GNU ! CPP accepts multi-line string constants, but not multi-line character ! constants or header file names. This extension is deprecated and will ! be removed in GCC 3.1. You may use continued lines instead, or string ! constant concatenation. @xref{Differences from previous versions}. @cindex punctuators @cindex digraphs --- 525,534 ---- file in different places depending on which form you use. @xref{Include Operation}. ! No string literal may extend past the end of a line. Older versions ! of GCC accepted multi-line string constants. You may use continued ! lines instead, or string constant concatenation. @xref{Differences ! from previous versions}. @cindex punctuators @cindex digraphs *************** those are merely the typical uses. Any *** 795,804 **** included from another file. The include file could even contain the beginning of a statement that is concluded in the containing file, or the end of a statement that was started in the including file. However, ! a comment or a string or character constant may not start in the ! included file and finish in the including file. An unterminated ! comment, string constant or character constant in an included file is ! considered to end (with an error message) at the end of the file. To avoid confusion, it is best if header files contain only complete syntactic units---function declarations or definitions, type --- 784,793 ---- included from another file. The include file could even contain the beginning of a statement that is concluded in the containing file, or the end of a statement that was started in the including file. However, ! an included file must consist of complete tokens. Comments and string ! literals which have not been closed by the end of an included file are ! invalid. For error recovery, they are considered to end at the end of ! the file. To avoid confusion, it is best if header files contain only complete syntactic units---function declarations or definitions, type *************** because @code{FILE_FOO_SEEN} is defined. *** 909,915 **** over the entire contents of the file, and the compiler will not see it twice. ! GNU CPP optimizes even further. It remembers when a header file has a wrapper @samp{#ifndef}. If a subsequent @samp{#include} specifies that header, and the macro in the @samp{#ifndef} is still defined, it does not bother to rescan the file at all. --- 898,904 ---- over the entire contents of the file, and the compiler will not see it twice. ! CPP optimizes even further. It remembers when a header file has a wrapper @samp{#ifndef}. If a subsequent @samp{#include} specifies that header, and the macro in the @samp{#ifndef} is still defined, it does not bother to rescan the file at all. *************** macros when you are compiling C++. *** 1128,1133 **** --- 1117,1123 ---- * Variadic Macros:: * Predefined Macros:: * Undefining and Redefining Macros:: + * Directives Within Macro Arguments:: * Macro Pitfalls:: @end menu *************** or to paste its leading or trailing toke *** 1621,1627 **** below for an important special case for @samp{##}.) If your macro is complicated, you may want a more descriptive name for ! the variable argument than @code{@w{__VA_ARGS__}}. GNU CPP permits this, as an extension. You may write an argument name immediately before the @samp{@dots{}}; that name is used for the variable argument. The @code{eprintf} macro above could be written --- 1611,1617 ---- below for an important special case for @samp{##}.) If your macro is complicated, you may want a more descriptive name for ! the variable argument than @code{@w{__VA_ARGS__}}. CPP permits this, as an extension. You may write an argument name immediately before the @samp{@dots{}}; that name is used for the variable argument. The @code{eprintf} macro above could be written *************** The @code{eprintf} macro above could be *** 1631,1637 **** @end example @noindent ! using this extension. You cannot use @code{__VA_ARGS__} and this extension in the same macro. You can have named arguments as well as variable arguments in a variadic --- 1621,1627 ---- @end example @noindent ! using this extension. You cannot use @code{@w{__VA_ARGS__}} and this extension in the same macro. You can have named arguments as well as variable arguments in a variadic *************** only named variable arguments. On the o *** 1705,1711 **** with portability to other conforming implementations of C99, you should use only @code{@w{__VA_ARGS__}}. ! Previous versions of GNU CPP implemented the comma-deletion extension much more generally. We have restricted it in this release to minimize the differences from C99. To get the same effect with both this and previous versions of GCC, the token preceding the special @samp{##} must --- 1695,1701 ---- with portability to other conforming implementations of C99, you should use only @code{@w{__VA_ARGS__}}. ! Previous versions of CPP implemented the comma-deletion extension much more generally. We have restricted it in this release to minimize the differences from C99. To get the same effect with both this and previous versions of GCC, the token preceding the special @samp{##} must *************** the preprocessor is being run. The stri *** 1800,1822 **** characters and looks like @code{@w{"Feb 12 1996"}}. If the day of the month is less than 10, it is padded with a space on the left. @item __TIME__ This macro expands to a string constant that describes the time at which the preprocessor is being run. The string constant contains eight characters and looks like @code{"23:59:01"}. @item __STDC__ In normal operation, this macro expands to the constant 1, to signify that this compiler conforms to ISO Standard C@. If GNU CPP is used with a compiler other than GCC, this is not necessarily true; however, the ! preprocessor always conforms to the standard, unless the ! @option{-traditional} option is used. ! This macro is not defined if the @option{-traditional} option is used. On some hosts, the system compiler uses a different convention, where @code{__STDC__} is normally 0, but is 1 if the user specifies strict ! conformance to the C Standard. GNU CPP follows the host convention when processing system header files, but when processing user files @code{__STDC__} is always 1. This has been reported to cause problems; for instance, some versions of Solaris provide X Windows headers that --- 1790,1820 ---- characters and looks like @code{@w{"Feb 12 1996"}}. If the day of the month is less than 10, it is padded with a space on the left. + If GCC cannot determine the current date, it will emit a warning message + (once per compilation) and @code{__DATE__} will expand to + @code{@w{"??? ?? ????"}}. + @item __TIME__ This macro expands to a string constant that describes the time at which the preprocessor is being run. The string constant contains eight characters and looks like @code{"23:59:01"}. + If GCC cannot determine the current time, it will emit a warning message + (once per compilation) and @code{__TIME__} will expand to + @code{"??:??:??"}. + @item __STDC__ In normal operation, this macro expands to the constant 1, to signify that this compiler conforms to ISO Standard C@. If GNU CPP is used with a compiler other than GCC, this is not necessarily true; however, the ! preprocessor always conforms to the standard unless the ! @option{-traditional-cpp} option is used. ! This macro is not defined if the @option{-traditional-cpp} option is used. On some hosts, the system compiler uses a different convention, where @code{__STDC__} is normally 0, but is 1 if the user specifies strict ! conformance to the C Standard. CPP follows the host convention when processing system header files, but when processing user files @code{__STDC__} is always 1. This has been reported to cause problems; for instance, some versions of Solaris provide X Windows headers that *************** The value @code{199409L} signifies the 1 *** 1835,1842 **** the 1999 revision of the C standard. Support for the 1999 revision is not yet complete. ! This macro is not defined if the @option{-traditional} option is used, nor ! when compiling C++ or Objective-C@. @item __STDC_HOSTED__ This macro is defined, with value 1, if the compiler's target is a --- 1833,1840 ---- the 1999 revision of the C standard. Support for the 1999 revision is not yet complete. ! This macro is not defined if the @option{-traditional-cpp} option is ! used, nor when compiling C++ or Objective-C@. @item __STDC_HOSTED__ This macro is defined, with value 1, if the compiler's target is a *************** unsigned on the target machine. It exis *** 1970,1975 **** --- 1968,1977 ---- file @file{limits.h} to work correctly. You should not use this macro yourself; instead, refer to the standard macros defined in @file{limits.h}. + @item __WCHAR_UNSIGNED__ + Like @code{__CHAR_UNSIGNED__}, this macro is defined if and only if the + data type @code{wchar_t} is unsigned and the front-end is in C++ mode. + @item __REGISTER_PREFIX__ This macro expands to a single token (not a string constant) which is the prefix applied to CPU register names in assembly language for this *************** typedefs, respectively. They exist to m *** 2000,2009 **** --- 2002,2036 ---- these macros directly; instead, include the appropriate headers and use the typedefs. + @item __CHAR_BIT__ + Defined to the number of bits used in the representation of the + @code{char} data type. It exists to make the standard header given + numerical limits work correctly. You should not use + this macro directly; instead, include the appropriate headers. + + @item __SCHAR_MAX__ + @itemx __WCHAR_MAX__ + @itemx __SHRT_MAX__ + @itemx __INT_MAX__ + @itemx __LONG_MAX__ + @itemx __LONG_LONG_MAX__ + Defined to the maximum value of the @code{signed char}, @code{wchar_t}, + @code{signed short}, + @code{signed int}, @code{signed long}, and @code{signed long long} types + respectively. They exist to make the standard header given numerical limits + work correctly. You should not use these macros directly; instead, include + the appropriate headers. + @item __USING_SJLJ_EXCEPTIONS__ This macro is defined, with value 1, if the compiler uses the old mechanism based on @code{setjmp} and @code{longjmp} for exception handling. + + @item __NEXT_RUNTIME__ + This macro is defined, with value 1, if (and only if) the NeXT runtime + (as in @option{-fnext-runtime}) is in use for Objective-C. If the GNU + runtime is used, this macro is not defined, so that you can use this + macro to determine which runtime (NeXT or GNU) is being used. @end table @node System-specific Predefined Macros *************** the same, the redefinition is silently i *** 2136,2141 **** --- 2163,2212 ---- instance, two different headers to define a common macro. The preprocessor will only complain if the definitions do not match. + @node Directives Within Macro Arguments + @section Directives Within Macro Arguments + @cindex macro arguments and directives + + Occasionally it is convenient to use preprocessor directives within + the arguments of a macro. The C and C++ standards declare that + behavior in these cases is undefined. + + Versions of CPP prior to 3.2 would reject such constructs with an + error message. This was the only syntactic difference between normal + functions and function-like macros, so it seemed attractive to remove + this limitation, and people would often be surprised that they could + not use macros in this way. Moreover, sometimes people would use + conditional compilation in the argument list to a normal library + function like @samp{printf}, only to find that after a library upgrade + @samp{printf} had changed to be a function-like macro, and their code + would no longer compile. So from version 3.2 we changed CPP to + successfully process arbitrary directives within macro arguments in + exactly the same way as it would have processed the directive were the + function-like macro invocation not present. + + If, within a macro invocation, that macro is redefined, then the new + definition takes effect in time for argument pre-expansion, but the + original definition is still used for argument replacement. Here is a + pathological example: + + @smallexample + #define f(x) x x + f (1 + #undef f + #define f 2 + f) + @end smallexample + + @noindent + which expands to + + @smallexample + 1 2 1 2 + @end smallexample + + @noindent + with the semantics described above. + @node Macro Pitfalls @section Macro Pitfalls @cindex problems with macros *************** good practice if there is a lot of @var{ *** 2723,2729 **** helps people match the @samp{#endif} to the corresponding @samp{#ifdef}. Older programs sometimes put @var{MACRO} directly after the @samp{#endif} without enclosing it in a comment. This is invalid code ! according to the C standard. GNU CPP accepts it with a warning. It never affects which @samp{#ifndef} the @samp{#endif} matches. @findex #ifndef --- 2794,2800 ---- helps people match the @samp{#endif} to the corresponding @samp{#ifdef}. Older programs sometimes put @var{MACRO} directly after the @samp{#endif} without enclosing it in a comment. This is invalid code ! according to the C standard. CPP accepts it with a warning. It never affects which @samp{#ifndef} the @samp{#endif} matches. @findex #ifndef *************** file it specifies, until something else *** 3059,3065 **** constant: backslash escapes are interpreted. This is different from @samp{#include}. ! Previous versions of GNU CPP did not interpret escapes in @samp{#line}; we have changed it because the standard requires they be interpreted, and most other compilers do. --- 3130,3136 ---- constant: backslash escapes are interpreted. This is different from @samp{#include}. ! Previous versions of CPP did not interpret escapes in @samp{#line}; we have changed it because the standard requires they be interpreted, and most other compilers do. *************** This directive is not part of the C stan *** 3226,3233 **** GNU extension either. We believe it came from System V@. @findex #sccs ! The @samp{#sccs} directive is recognized on some systems, because it ! appears in their header files. It is a very old, obscure, extension which we did not invent, and we have been unable to find any documentation of what it should do, so GCC simply ignores it. --- 3297,3304 ---- GNU extension either. We believe it came from System V@. @findex #sccs ! The @samp{#sccs} directive is recognized, because it appears in the ! header files of some systems. It is a very old, obscure, extension which we did not invent, and we have been unable to find any documentation of what it should do, so GCC simply ignores it. *************** the directive name. *** 3321,3411 **** Traditional (pre-standard) C preprocessing is rather different from the preprocessing specified by the standard. When GCC is given the ! @option{-traditional} option, it attempts to emulate a traditional ! preprocessor. We do not guarantee that GCC's behavior under ! @option{-traditional} matches any pre-standard preprocessor exactly. ! Traditional mode exists only for backward compatibility. We have no ! plans to augment it in any way nor will we change it except to fix ! catastrophic bugs. You should be aware that modern C libraries often ! have header files which are incompatible with traditional mode. ! This is a list of the differences. It may not be complete, and may not ! correspond exactly to the behavior of either GCC or a true traditional ! preprocessor. ! @itemize @bullet ! @item ! Traditional macro expansion pays no attention to single-quote or ! double-quote characters; macro argument symbols are replaced by the ! argument values even when they appear within apparent string or ! character constants. ! @item ! Traditionally, it is permissible for a macro expansion to end in the ! middle of a string or character constant. The constant continues into ! the text surrounding the macro call. ! @item ! However, the end of the line terminates a string or character constant, ! with no error. (This is a kluge. Traditional mode is commonly used to ! preprocess things which are not C, and have a different comment syntax. ! Single apostrophes often appear in comments. This kluge prevents the ! traditional preprocessor from issuing errors on such comments.) ! @item ! Preprocessing directives are recognized in traditional C only when their ! leading @samp{#} appears in the first column. There can be no ! whitespace between the beginning of the line and the @samp{#}. ! @item ! In traditional C, a comment is equivalent to no text at all. (In ISO ! C, a comment counts as whitespace.) It can be used sort of the same way ! that @samp{##} is used in ISO C, to paste macro arguments together. ! @item ! Traditional C does not have the concept of a preprocessing number. ! @item ! A macro is not suppressed within its own definition, in traditional C@. ! Thus, any macro that is used recursively inevitably causes an error. ! @item ! The @samp{#} and @samp{##} operators are not available in traditional ! C@. @item ! In traditional C, the text at the end of a macro expansion can run ! together with the text after the macro call, to produce a single token. ! This is impossible in ISO C@. @item ! None of the GNU extensions to the preprocessor are available in ! traditional mode, with the exception of a partial implementation of ! assertions, and those may be removed in the future. @item ! A true traditional C preprocessor does not recognize @samp{#elif}, ! @samp{#error}, or @samp{#pragma}. GCC supports @samp{#elif} and ! @samp{#error} even in traditional mode, but not @samp{#pragma}. @item ! Traditional mode is text-based, not token-based, and comments are ! stripped after macro expansion. Therefore, @samp{/**/} can be used to ! paste tokens together provided that there is no whitespace between it ! and the tokens to be pasted. @item ! Traditional mode preserves the amount and form of whitespace provided by ! the user. Hard tabs remain hard tabs. This can be useful, e.g.@: if you ! are preprocessing a Makefile (which we do not encourage). @end itemize You can request warnings about features that did not exist, or worked differently, in traditional C with the @option{-Wtraditional} option. ! This works only if you do @emph{not} specify @option{-traditional}. GCC ! does not warn about features of ISO C which you must use when you are ! using a conforming compiler, such as the @samp{#} and @samp{##} operators. Presently @option{-Wtraditional} warns about: --- 3392,3621 ---- Traditional (pre-standard) C preprocessing is rather different from the preprocessing specified by the standard. When GCC is given the ! @option{-traditional-cpp} option, it attempts to emulate a traditional ! preprocessor. ! GCC versions 3.2 and later only support traditional mode semantics in ! the preprocessor, and not in the compiler front ends. This chapter ! outlines the traditional preprocessor semantics we implemented. ! The implementation does not correspond precisely to the behavior of ! earlier versions of GCC, nor to any true traditional preprocessor. ! After all, inconsistencies among traditional implementations were a ! major motivation for C standardization. However, we intend that it ! should be compatible with true traditional preprocessors in all ways ! that actually matter. ! @menu ! * Traditional lexical analysis:: ! * Traditional macros:: ! * Traditional miscellany:: ! * Traditional warnings:: ! @end menu ! @node Traditional lexical analysis ! @section Traditional lexical analysis ! The traditional preprocessor does not decompose its input into tokens ! the same way a standards-conforming preprocessor does. The input is ! simply treated as a stream of text with minimal internal form. ! This implementation does not treat trigraphs (@pxref{trigraphs}) ! specially since they were an invention of the standards committee. It ! handles arbitrarily-positioned escaped newlines properly and splices ! the lines as you would expect; many traditional preprocessors did not ! do this. ! The form of horizontal whitespace in the input file is preserved in ! the output. In particular, hard tabs remain hard tabs. This can be ! useful if, for example, you are preprocessing a Makefile. ! Traditional CPP only recognizes C-style block comments, and treats the ! @samp{/*} sequence as introducing a comment only if it lies outside ! quoted text. Quoted text is introduced by the usual single and double ! quotes, and also by an initial @samp{<} in a @code{#include} ! directive. ! Traditionally, comments are completely removed and are not replaced ! with a space. Since a traditional compiler does its own tokenization ! of the output of the preprocessor, this means that comments can ! effectively be used as token paste operators. However, comments ! behave like separators for text handled by the preprocessor itself, ! since it doesn't re-lex its input. For example, in ! @smallexample ! #if foo/**/bar ! @end smallexample ! ! @noindent ! @samp{foo} and @samp{bar} are distinct identifiers and expanded ! separately if they happen to be macros. In other words, this ! directive is equivalent to ! ! @smallexample ! #if foo bar ! @end smallexample ! ! @noindent ! rather than ! ! @smallexample ! #if foobar ! @end smallexample ! ! Generally speaking, in traditional mode an opening quote need not have ! a matching closing quote. In particular, a macro may be defined with ! replacement text that contains an unmatched quote. Of course, if you ! attempt to compile preprocessed output containing an unmatched quote ! you will get a syntax error. ! ! However, all preprocessing directives other than @code{#define} ! require matching quotes. For example: ! ! @smallexample ! #define m This macro's fine and has an unmatched quote ! "/* This is not a comment. */ ! /* This is a comment. The following #include directive ! is ill-formed. */ ! #include = 0 && i < 10) ? i : abort()}. ! As a GNU extension, the C language front-ends allow the second ! operand of the @code{?:} operator may be omitted in the source. ! For example, @code{x ? : 3} is equivalent to @code{x ? x : 3}, ! assuming that @code{x} is an expression without side-effects. ! In the tree representation, however, the second operand is always ! present, possibly protected by @code{SAVE_EXPR} if the first ! argument does cause side-effects. @item CALL_EXPR These nodes are used to represent calls to functions, including *************** The first operand is the expression that *** 2312,2315 **** --- 2309,2318 ---- The second operand is the @code{VAR_DECL} of the vtable. The third operand is an @code{INTEGER_CST} of the byte offset into the vtable. + @item VA_ARG_EXPR + This node is used to implement support for the C/C++ variable argument-list + mechanism. It represents expressions like @code{va_arg (ap, type)}. + Its @code{TREE_TYPE} yields the tree representation for @code{type} and + its sole argument yields the representation for @code{ap}. + @end table diff -Nrc3pad gcc-3.2.3/gcc/doc/.cvsignore gcc-3.3/gcc/doc/.cvsignore *** gcc-3.2.3/gcc/doc/.cvsignore 2001-12-17 19:19:57.000000000 +0000 --- gcc-3.3/gcc/doc/.cvsignore 2002-06-06 20:03:04.000000000 +0000 *************** *** 1,5 **** --- 1,6 ---- gcc.info* gccint.info* + gccinstall.info* cpp.info* cppinternals.info* gcc.1 diff -Nrc3pad gcc-3.2.3/gcc/doc/extend.texi gcc-3.3/gcc/doc/extend.texi *** gcc-3.2.3/gcc/doc/extend.texi 2003-03-21 15:02:35.000000000 +0000 --- gcc-3.3/gcc/doc/extend.texi 2003-04-30 14:16:58.000000000 +0000 *************** *** 1,4 **** ! @c Copyright (C) 1988,1989,1992,1993,1994,1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,5 ---- ! @c Copyright (C) 1988,1989,1992,1993,1994,1996,1998,1999,2000,2001,2002, ! @c 2003 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** along with the section number from the I *** 35,40 **** --- 36,43 ---- @item @cite{How a diagnostic is identified (3.10, 5.1.1.3).} + Diagnostics consist of all the output sent to stderr by GCC. + @item @cite{Whether each nonempty sequence of white-space characters other than new-line is retained or replaced by one space character in translation *************** and their correspondence to universal ch *** 58,63 **** --- 61,71 ---- @item @cite{The number of significant initial characters in an identifier (5.2.4.1, 6.4.2).} + + For internal names, all characters are significant. For external names, + the number of significant characters are defined by the linker; for + almost all targets, all characters are significant. + @end itemize @node Characters implementation *************** sequence not represented in the executio *** 123,128 **** --- 131,139 ---- two's complement, or one's complement, and whether the extraordinary value is a trap representation or an ordinary value (6.2.6.2).} + GCC supports only two's complement integer types, and all bit patterns + are ordinary values. + @item @cite{The rank of any extended integer type relative to another extended integer type with the same precision (6.3.1.1).} *************** of the same array (6.5.6).} *** 238,247 **** --- 249,284 ---- @cite{The extent to which suggestions made by using the @code{register} storage-class specifier are effective (6.7.1).} + The @code{register} specifier affects code generation only in these ways: + + @itemize @bullet + @item + When used as part of the register variable extension, see + @ref{Explicit Reg Vars}. + + @item + When @option{-O0} is in use, the compiler allocates distinct stack + memory for all variables that do not have the @code{register} + storage-class specifier; if @code{register} is specified, the variable + may have a shorter lifespan than the code would indicate and may never + be placed in memory. + + @item + On some rare x86 targets, @code{setjmp} doesn't save the registers in + all circumstances. In those cases, GCC doesn't allocate any variables + in registers unless they are marked @code{register}. + + @end itemize + @item @cite{The extent to which suggestions made by using the inline function specifier are effective (6.7.4).} + GCC will not inline any functions if the @option{-fno-inline} option is + used or if @option{-O0} is used. Otherwise, GCC may still be unable to + inline a function for many reasons; the @option{-Winline} option may be + used to determine if a function has not been inlined and why not. + @end itemize @node Structures unions enumerations and bit-fields implementation *************** name (6.10.2).} *** 315,320 **** --- 352,359 ---- @item @cite{The nesting limit for @code{#include} processing (6.10.2).} + GCC imposes a limit of 200 nested @code{#include}s. + @item @cite{Whether the @samp{#} operator inserts a @samp{\} character before the @samp{\} character that begins a universal character name in a *************** directive (6.10.6).} *** 328,333 **** --- 367,376 ---- @cite{The definitions for @code{__DATE__} and @code{__TIME__} when respectively, the date and time of translation are not available (6.10.8).} + If the date and time are not available, @code{__DATE__} expands to + @code{@w{"??? ?? ????"}} and @code{__TIME__} expands to + @code{"??:??:??"}. + @end itemize @node Library functions implementation *************** extensions, accepted by GCC in C89 mode *** 393,398 **** --- 436,442 ---- * Hex Floats:: Hexadecimal floating-point constants. * Zero Length:: Zero-length arrays. * Variable Length:: Arrays whose length is computed at run time. + * Empty Structures:: Structures with no members. * Variadic Macros:: Macros with a variable number of arguments. * Escaped Newlines:: Slightly looser rules for escaped newlines. * Multi-line Strings:: String literals with embedded newlines. *************** extensions, accepted by GCC in C89 mode *** 431,436 **** --- 475,481 ---- * Target Builtins:: Built-in functions specific to particular targets. * Pragmas:: Pragmas accepted by GCC. * Unnamed Fields:: Unnamed struct/union fields within structs/unions. + * Thread-Local:: Per-thread variables. @end menu @node Statement Exprs *************** extensions, accepted by GCC in C89 mode *** 442,448 **** @c the above section title wrapped and causes an underfull hbox.. i @c changed it from "within" to "in". --mew 4feb93 - A compound statement enclosed in parentheses may appear as an expression in GNU C@. This allows you to use loops, switches, and local variables within an expression. --- 487,492 ---- *************** __label__ @var{label}; *** 549,555 **** or @example ! __label__ @var{label1}, @var{label2}, @dots{}; @end example Local label declarations must come at the beginning of the statement --- 593,599 ---- or @example ! __label__ @var{label1}, @var{label2}, /* @r{@dots{}} */; @end example Local label declarations must come at the beginning of the statement *************** wherever a constant of that type is vali *** 600,606 **** @example void *ptr; ! @dots{} ptr = &&foo; @end example --- 644,650 ---- @example void *ptr; ! /* @r{@dots{}} */ ptr = &&foo; @end example *************** bar (int *array, int offset, int size) *** 695,703 **** int access (int *array, int index) @{ return array[index + offset]; @} int i; ! @dots{} for (i = 0; i < size; i++) ! @dots{} access (array, i) @dots{} @} @end group @end example --- 739,747 ---- int access (int *array, int index) @{ return array[index + offset]; @} int i; ! /* @r{@dots{}} */ for (i = 0; i < size; i++) ! /* @r{@dots{}} */ access (array, i) /* @r{@dots{}} */ @} @end group @end example *************** bar (int *array, int offset, int size) *** 757,766 **** return array[index + offset]; @} int i; ! @dots{} for (i = 0; i < size; i++) ! @dots{} access (array, i) @dots{} ! @dots{} return 0; /* @r{Control comes here from @code{access} --- 801,810 ---- return array[index + offset]; @} int i; ! /* @r{@dots{}} */ for (i = 0; i < size; i++) ! /* @r{@dots{}} */ access (array, i) /* @r{@dots{}} */ ! /* @r{@dots{}} */ return 0; /* @r{Control comes here from @code{access} *************** bar (int *array, int offset, int size) *** 781,794 **** @{ __label__ failure; auto int access (int *, int); ! @dots{} int access (int *array, int index) @{ if (index > size) goto failure; return array[index + offset]; @} ! @dots{} @} @end example --- 825,838 ---- @{ __label__ failure; auto int access (int *, int); ! /* @r{@dots{}} */ int access (int *array, int index) @{ if (index > size) goto failure; return array[index + offset]; @} ! /* @r{@dots{}} */ @} @end example *************** This will work with all versions of GCC@ *** 989,994 **** --- 1033,1039 ---- @cindex lvalues, generalized @cindex extensions, @code{?:} @cindex @code{?:} extensions + Compound expressions, conditional expressions and casts are allowed as lvalues provided their operands are lvalues. This means that you can take their addresses or store values into them. *************** provided as built-in functions by GCC@. *** 1181,1197 **** GCC can allocate complex automatic variables in a noncontiguous fashion; it's even possible for the real part to be in a register while ! the imaginary part is on the stack (or vice-versa). None of the ! supported debugging info formats has a way to represent noncontiguous ! allocation like this, so GCC describes a noncontiguous complex ! variable as if it were two separate variables of noncomplex type. If the variable's actual name is @code{foo}, the two fictitious variables are named @code{foo$real} and @code{foo$imag}. You can examine and set these two fictitious variables with your debugger. - A future version of GDB will know how to recognize such pairs and treat - them as a single variable with a complex type. - @node Hex Floats @section Hex Floats @cindex hex floats --- 1226,1239 ---- GCC can allocate complex automatic variables in a noncontiguous fashion; it's even possible for the real part to be in a register while ! the imaginary part is on the stack (or vice-versa). Only the DWARF2 ! debug info format can represent this, so use of DWARF2 is recommended. ! If you are using the stabs debug info format, GCC describes a noncontiguous ! complex variable as if it were two separate variables of noncomplex type. If the variable's actual name is @code{foo}, the two fictitious variables are named @code{foo$real} and @code{foo$imag}. You can examine and set these two fictitious variables with your debugger. @node Hex Floats @section Hex Floats @cindex hex floats *************** struct line *thisline = (struct line *) *** 1241,1247 **** thisline->length = this_length; @end example ! In ISO C89, you would have to give @code{contents} a length of 1, which means either you waste space or complicate the argument to @code{malloc}. In ISO C99, you would use a @dfn{flexible array member}, which is --- 1283,1289 ---- thisline->length = this_length; @end example ! In ISO C90, you would have to give @code{contents} a length of 1, which means either you waste space or complicate the argument to @code{malloc}. In ISO C99, you would use a @dfn{flexible array member}, which is *************** of zero-length arrays, @code{sizeof} eva *** 1260,1265 **** --- 1302,1313 ---- @item Flexible array members may only appear as the last member of a @code{struct} that is otherwise non-empty. + + @item + A structure containing a flexible array member, or a union containing + such a structure (possibly recursively), may not be a member of a + structure or an element of an array. (However, these uses are + permitted by GCC as extensions.) @end itemize GCC versions before 3.0 allowed zero-length arrays to be statically *************** struct bar c = @{ @{ 1, @{ @} @} @}; *** 1311,1316 **** --- 1359,1379 ---- struct foo d[1] = @{ @{ 1 @{ 2, 3, 4 @} @} @}; // @r{Invalid.} @end example + @node Empty Structures + @section Structures With No Members + @cindex empty structures + @cindex zero-size structures + + GCC permits a C structure to have no members: + + @example + struct empty @{ + @}; + @end example + + The structure will have size zero. In C++, empty structures are part + of the language, and the language standard says they have size 1. + @node Variable Length @section Arrays of Variable Length @cindex variable-length arrays *************** You can also use variable-length arrays *** 1363,1369 **** struct entry tester (int len, char data[len][len]) @{ ! @dots{} @} @end example --- 1426,1432 ---- struct entry tester (int len, char data[len][len]) @{ ! /* @r{@dots{}} */ @} @end example *************** use a forward declaration in the paramet *** 1378,1384 **** struct entry tester (int len; char data[len][len], int len) @{ ! @dots{} @} @end example --- 1441,1447 ---- struct entry tester (int len; char data[len][len], int len) @{ ! /* @r{@dots{}} */ @} @end example *************** argument, these arguments are not macro *** 1463,1470 **** @cindex escaped newlines @cindex newlines (escaped) ! Recently, the non-traditional preprocessor has relaxed its treatment of ! escaped newlines. Previously, the newline had to immediately follow a backslash. The current implementation allows whitespace in the form of spaces, horizontal and vertical tabs, and form feeds between the backslash and the subsequent newline. The preprocessor issues a --- 1526,1533 ---- @cindex escaped newlines @cindex newlines (escaped) ! Recently, the preprocessor has relaxed its treatment of escaped ! newlines. Previously, the newline had to immediately follow a backslash. The current implementation allows whitespace in the form of spaces, horizontal and vertical tabs, and form feeds between the backslash and the subsequent newline. The preprocessor issues a *************** Here is an example of an initializer wit *** 1545,1551 **** foo (float f, float g) @{ float beat_freqs[2] = @{ f-g, f+g @}; ! @dots{} @} @end example --- 1608,1614 ---- foo (float f, float g) @{ float beat_freqs[2] = @{ f-g, f+g @}; ! /* @r{@dots{}} */ @} @end example *************** union type is equivalent to storing in a *** 1834,1840 **** @example union foo u; ! @dots{} u = (union foo) x @equiv{} u.i = x u = (union foo) y @equiv{} u.d = y @end example --- 1897,1903 ---- @example union foo u; ! /* @r{@dots{}} */ u = (union foo) x @equiv{} u.i = x u = (union foo) y @equiv{} u.d = y @end example *************** You can also use the union cast as a fun *** 1843,1849 **** @example void hack (union foo); ! @dots{} hack ((union foo) x); @end example --- 1906,1912 ---- @example void hack (union foo); ! /* @r{@dots{}} */ hack ((union foo) x); @end example *************** C89 mode. For example, you could do: *** 1859,1865 **** @example int i; ! @dots{} i++; int j = i + 2; @end example --- 1922,1928 ---- @example int i; ! /* @r{@dots{}} */ i++; int j = i + 2; @end example *************** the enclosing block. *** 1878,1883 **** --- 1941,1947 ---- @cindex @code{volatile} applied to function @cindex @code{const} applied to function @cindex functions with @code{printf}, @code{scanf}, @code{strftime} or @code{strfmon} style arguments + @cindex functions with non-null pointer arguments @cindex functions that are passed arguments in registers on the 386 @cindex functions that pop the argument stack on the 386 @cindex functions that do not pop the argument stack on the 386 *************** attributes when making a declaration. T *** 1891,1904 **** attribute specification inside double parentheses. The following attributes are currently defined for functions on all targets: @code{noreturn}, @code{noinline}, @code{always_inline}, ! @code{pure}, @code{const}, @code{format}, @code{format_arg}, @code{no_instrument_function}, @code{section}, @code{constructor}, @code{destructor}, @code{used}, ! @code{unused}, @code{deprecated}, @code{weak}, @code{malloc}, and ! @code{alias}. Several other attributes are defined for functions on ! particular target systems. Other attributes, including @code{section} ! are supported for variables declarations (@pxref{Variable Attributes}) ! and for types (@pxref{Type Attributes}). You may also specify attributes with @samp{__} preceding and following each keyword. This allows you to use them in header files without --- 1955,1968 ---- attribute specification inside double parentheses. The following attributes are currently defined for functions on all targets: @code{noreturn}, @code{noinline}, @code{always_inline}, ! @code{pure}, @code{const}, @code{nothrow}, @code{format}, @code{format_arg}, @code{no_instrument_function}, @code{section}, @code{constructor}, @code{destructor}, @code{used}, ! @code{unused}, @code{deprecated}, @code{weak}, @code{malloc}, ! @code{alias}, and @code{nonnull}. Several other attributes are defined ! for functions on particular target systems. Other attributes, including ! @code{section} are supported for variables declarations ! (@pxref{Variable Attributes}) and for types (@pxref{Type Attributes}). You may also specify attributes with @samp{__} preceding and following each keyword. This allows you to use them in header files without *************** their own functions that never return. *** 1921,1929 **** void fatal () __attribute__ ((noreturn)); void ! fatal (@dots{}) @{ ! @dots{} /* @r{Print error message.} */ @dots{} exit (1); @} @end group --- 1985,1993 ---- void fatal () __attribute__ ((noreturn)); void ! fatal (/* @r{@dots{}} */) @{ ! /* @r{@dots{}} */ /* @r{Print error message.} */ /* @r{@dots{}} */ exit (1); @} @end group *************** extern const intfn square; *** 2015,2020 **** --- 2079,2092 ---- This approach does not work in GNU C++ from 2.6.0 on, since the language specifies that the @samp{const} must be attached to the return value. + @cindex @code{nothrow} function attribute + @item nothrow + The @code{nothrow} attribute is used to inform the compiler that a + function cannot throw an exception. For example, most functions in + the standard C library can be guaranteed not to throw an exception + with the notable exceptions of @code{qsort} and @code{bsearch} that + take function pointer arguments. The @code{nothrow} attribute is not + implemented in GCC versions earlier than 3.2. @item format (@var{archetype}, @var{string-index}, @var{first-to-check}) @cindex @code{format} function attribute *************** requested by @option{-ansi} or an approp *** 2110,2115 **** --- 2182,2216 ---- @option{-ffreestanding} is used. @xref{C Dialect Options,,Options Controlling C Dialect}. + @item nonnull (@var{arg-index}, @dots{}) + @cindex @code{nonnull} function attribute + The @code{nonnull} attribute specifies that some function parameters should + be non-null pointers. For instance, the declaration: + + @smallexample + extern void * + my_memcpy (void *dest, const void *src, size_t len) + __attribute__((nonnull (1, 2))); + @end smallexample + + @noindent + causes the compiler to check that, in calls to @code{my_memcpy}, + arguments @var{dest} and @var{src} are non-null. If the compiler + determines that a null pointer is passed in an argument slot marked + as non-null, and the @option{-Wnonnull} option is enabled, a warning + is issued. The compiler may also choose to make optimizations based + on the knowledge that certain function arguments will not be null. + + If no argument index list is given to the @code{nonnull} attribute, + all pointer arguments are marked as non-null. To illustrate, the + following declaration is equivalent to the previous example: + + @smallexample + extern void * + my_memcpy (void *dest, const void *src, size_t len) + __attribute__((nonnull)); + @end smallexample + @item no_instrument_function @cindex @code{no_instrument_function} function attribute @opindex finstrument-functions *************** The @code{alias} attribute causes the de *** 2208,2214 **** alias for another symbol, which must be specified. For instance, @smallexample ! void __f () @{ /* do something */; @} void f () __attribute__ ((weak, alias ("__f"))); @end smallexample --- 2309,2315 ---- alias for another symbol, which must be specified. For instance, @smallexample ! void __f () @{ /* @r{Do something.} */; @} void f () __attribute__ ((weak, alias ("__f"))); @end smallexample *************** mangled name for the target must be used *** 2217,2222 **** --- 2318,2375 ---- Not all target machines support this attribute. + @item visibility ("@var{visibility_type}") + @cindex @code{visibility} attribute + The @code{visibility} attribute on ELF targets causes the declaration + to be emitted with default, hidden, protected or internal visibility. + + @smallexample + void __attribute__ ((visibility ("protected"))) + f () @{ /* @r{Do something.} */; @} + int i __attribute__ ((visibility ("hidden"))); + @end smallexample + + See the ELF gABI for complete details, but the short story is + + @table @dfn + @item default + Default visibility is the normal case for ELF. This value is + available for the visibility attribute to override other options + that may change the assumed visibility of symbols. + + @item hidden + Hidden visibility indicates that the symbol will not be placed into + the dynamic symbol table, so no other @dfn{module} (executable or + shared library) can reference it directly. + + @item protected + Protected visibility indicates that the symbol will be placed in the + dynamic symbol table, but that references within the defining module + will bind to the local symbol. That is, the symbol cannot be overridden + by another module. + + @item internal + Internal visibility is like hidden visibility, but with additional + processor specific semantics. Unless otherwise specified by the psABI, + gcc defines internal visibility to mean that the function is @emph{never} + called from another module. Note that hidden symbols, while then cannot + be referenced directly by other modules, can be referenced indirectly via + function pointers. By indicating that a symbol cannot be called from + outside the module, gcc may for instance omit the load of a PIC register + since it is known that the calling function loaded the correct value. + @end table + + Not all ELF targets support this attribute. + + @item tls_model ("@var{tls_model}") + @cindex @code{tls_model} attribute + The @code{tls_model} attribute sets thread-local storage model + (@pxref{Thread-Local}) of a particular @code{__thread} variable, + overriding @code{-ftls-model=} command line switch on a per-variable + basis. + The @var{tls_model} argument should be one of @code{global-dynamic}, + @code{local-dynamic}, @code{initial-exec} or @code{local-exec}. + @item regparm (@var{number}) @cindex functions that are passed arguments in registers on the 386 On the Intel 386, the @code{regparm} attribute causes the compiler to *************** useful to override the effects of the @o *** 2245,2256 **** The PowerPC compiler for Windows NT currently ignores the @code{cdecl} attribute. ! @item longcall @cindex functions called via pointer on the RS/6000 and PowerPC On the RS/6000 and PowerPC, the @code{longcall} attribute causes the ! compiler to always call the function via a pointer, so that functions ! which reside further than 64 megabytes (67,108,864 bytes) from the ! current location can be called. @item long_call/short_call @cindex indirect calls on ARM --- 2398,2414 ---- The PowerPC compiler for Windows NT currently ignores the @code{cdecl} attribute. ! @item longcall/shortcall @cindex functions called via pointer on the RS/6000 and PowerPC On the RS/6000 and PowerPC, the @code{longcall} attribute causes the ! compiler to always call this function via a pointer, just as it would if ! the @option{-mlongcall} option had been specified. The @code{shortcall} ! attribute causes the compiler not to do this. These attributes override ! both the @option{-mlongcall} switch and the @code{#pragma longcall} ! setting. ! ! @xref{RS/6000 and PowerPC Options}, for more information on when long ! calls are and are not necessary. @item long_call/short_call @cindex indirect calls on ARM *************** attribute is present. Interrupts will b *** 2372,2380 **** @item naked @cindex function without a prologue/epilogue code ! Use this attribute on the ARM or AVR ports to indicate that the specified ! function do not need prologue/epilogue sequences generated by the ! compiler. It is up to the programmer to provide these sequences. @item model (@var{model-name}) @cindex function addressability on the M32R/D --- 2530,2538 ---- @item naked @cindex function without a prologue/epilogue code ! Use this attribute on the ARM, AVR and IP2K ports to indicate that the ! specified function do not need prologue/epilogue sequences generated by ! the compiler. It is up to the programmer to provide these sequences. @item model (@var{model-name}) @cindex function addressability on the M32R/D *************** compiler will generate @code{seth/add3} *** 2396,2401 **** --- 2554,2583 ---- and may not be reachable with the @code{bl} instruction (the compiler will generate the much slower @code{seth/add3/jl} instruction sequence). + @item far + @cindex functions which handle memory bank switching + On 68HC11 and 68HC12 the @code{far} attribute causes the compiler to + use a calling convention that takes care of switching memory banks when + entering and leaving a function. This calling convention is also the + default when using the @option{-mlong-calls} option. + + On 68HC12 the compiler will use the @code{call} and @code{rtc} instructions + to call and return from a function. + + On 68HC11 the compiler will generate a sequence of instructions + to invoke a board-specific routine to switch the memory bank and call the + real function. The board-specific routine simulates a @code{call}. + At the end of a function, it will jump to a board-specific routine + instead of using @code{rts}. The board-specific return routine simulates + the @code{rtc}. + + @item near + @cindex functions which do not handle memory bank switching on 68HC11/68HC12 + On 68HC11 and 68HC12 the @code{near} attribute causes the compiler to + use the normal calling convention based on @code{jsr} and @code{rts}. + This attribute can be used to cancel the effect of the @option{-mlong-calls} + option. + @end table You can specify multiple attributes in a declaration by separating them *************** extension is irrelevant. *** 2729,2739 **** In GNU C, you may use C++ style comments, which start with @samp{//} and continue until the end of the line. Many other C implementations allow ! such comments, and they are likely to be in a future C standard. ! However, C++ style comments are not recognized if you specify ! @w{@option{-ansi}}, a @option{-std} option specifying a version of ISO C ! before C99, or @w{@option{-traditional}}, since they are incompatible ! with traditional constructs like @code{dividend//*comment*/divisor}. @node Dollar Signs @section Dollar Signs in Identifier Names --- 2911,2920 ---- In GNU C, you may use C++ style comments, which start with @samp{//} and continue until the end of the line. Many other C implementations allow ! such comments, and they are included in the 1999 C standard. However, ! C++ style comments are not recognized if you specify an @option{-std} ! option specifying a version of ISO C before C99, or @option{-ansi} ! (equivalent to @option{-std=c89}). @node Dollar Signs @section Dollar Signs in Identifier Names *************** packed))}. *** 3078,3087 **** The keyword @code{__attribute__} allows you to specify special attributes of @code{struct} and @code{union} types when you define such types. This keyword is followed by an attribute specification inside ! double parentheses. Five attributes are currently defined for types: @code{aligned}, @code{packed}, @code{transparent_union}, @code{unused}, ! and @code{deprecated}. Other attributes are defined for functions ! (@pxref{Function Attributes}) and for variables (@pxref{Variable Attributes}). You may also specify any one of these attributes with @samp{__} preceding and following its keyword. This allows you to use these --- 3259,3269 ---- The keyword @code{__attribute__} allows you to specify special attributes of @code{struct} and @code{union} types when you define such types. This keyword is followed by an attribute specification inside ! double parentheses. Six attributes are currently defined for types: @code{aligned}, @code{packed}, @code{transparent_union}, @code{unused}, ! @code{deprecated} and @code{may_alias}. Other attributes are defined for ! functions (@pxref{Function Attributes}) and for variables ! (@pxref{Variable Attributes}). You may also specify any one of these attributes with @samp{__} preceding and following its keyword. This allows you to use these *************** typedef int more_aligned_int __attribute *** 3115,3121 **** @noindent force the compiler to insure (as far as it can) that each variable whose type is @code{struct S} or @code{more_aligned_int} will be allocated and ! aligned @emph{at least} on a 8-byte boundary. On a Sparc, having all variables of type @code{struct S} aligned to 8-byte boundaries allows the compiler to use the @code{ldd} and @code{std} (doubleword load and store) instructions when copying one variable of type @code{struct S} to --- 3297,3303 ---- @noindent force the compiler to insure (as far as it can) that each variable whose type is @code{struct S} or @code{more_aligned_int} will be allocated and ! aligned @emph{at least} on a 8-byte boundary. On a SPARC, having all variables of type @code{struct S} aligned to 8-byte boundaries allows the compiler to use the @code{ldd} and @code{std} (doubleword load and store) instructions when copying one variable of type @code{struct S} to *************** deprecated. Similarly for line 6. *** 3292,3297 **** --- 3474,3509 ---- The @code{deprecated} attribute can also be used for functions and variables (@pxref{Function Attributes}, @pxref{Variable Attributes}.) + @item may_alias + Accesses to objects with types with this attribute are not subjected to + type-based alias analysis, but are instead assumed to be able to alias + any other type of objects, just like the @code{char} type. See + @option{-fstrict-aliasing} for more information on aliasing issues. + + Example of use: + + @smallexample + typedef short __attribute__((__may_alias__)) short_a; + + int + main (void) + @{ + int a = 0x12345678; + short_a *b = (short_a *) &a; + + b[1] = 0; + + if (a == 0x12345678) + abort(); + + exit(0); + @} + @end smallexample + + If you replaced @code{short_a} with @code{short} in the variable + declaration, the above program would abort when compiled with + @option{-fstrict-aliasing}, which is on by default at @option{-O2} or + above in recent GCC versions. @end table To specify multiple attributes, separate them by commas within the *************** asm volatile ("movc3 %0,%1,%2" *** 3550,3556 **** You may not write a clobber description in a way that overlaps with an input or output operand. For example, you may not have an operand describing a register class with one member if you mention that register ! in the clobber list. There is no way for you to specify that an input operand is modified without also specifying it as an output operand. Note that if all the output operands you specify are for this purpose (and hence unused), you will then also need to specify --- 3762,3771 ---- You may not write a clobber description in a way that overlaps with an input or output operand. For example, you may not have an operand describing a register class with one member if you mention that register ! in the clobber list. Variables declared to live in specific registers ! (@pxref{Explicit Reg Vars}), and used as asm input or output operands must ! have no part mentioned in the clobber description. ! There is no way for you to specify that an input operand is modified without also specifying it as an output operand. Note that if all the output operands you specify are for this purpose (and hence unused), you will then also need to specify *************** extern func () asm ("FUNC"); *** 3854,3860 **** func (x, y) int x, y; ! @dots{} @end example It is up to you to make sure that the assembler names you choose do not --- 4069,4075 ---- func (x, y) int x, y; ! /* @r{@dots{}} */ @end example It is up to you to make sure that the assembler names you choose do not *************** being used for other purposes in the pre *** 3990,3996 **** Global register variables may not have initial values, because an executable file has no means to supply initial contents for a register. ! On the Sparc, there are reports that g3 @dots{} g7 are suitable registers, but certain library functions, such as @code{getwd}, as well as the subroutines for division and remainder, modify g3 and g4. g1 and g2 are local temporaries. --- 4205,4211 ---- Global register variables may not have initial values, because an executable file has no means to supply initial contents for a register. ! On the SPARC, there are reports that g3 @dots{} g7 are suitable registers, but certain library functions, such as @code{getwd}, as well as the subroutines for division and remainder, modify g3 and g4. g1 and g2 are local temporaries. *************** be deleted or moved or simplified. *** 4047,4071 **** @cindex alternate keywords @cindex keywords, alternate - The option @option{-traditional} disables certain keywords; @option{-ansi} and the various @option{-std} options disable certain ! others. This causes trouble when you want to use GNU C extensions, or ! ISO C features, in a general-purpose header file that should be usable ! by all programs, including ISO C programs and traditional ones. The ! keywords @code{asm}, @code{typeof} and @code{inline} cannot be used ! since they won't work in a program compiled with @option{-ansi} ! (although @code{inline} can be used in a program compiled with ! @option{-std=c99}), while the keywords @code{const}, @code{volatile}, ! @code{signed}, @code{typeof} and @code{inline} won't work in a program ! compiled with @option{-traditional}. The ISO C99 keyword @code{restrict} is only available when @option{-std=gnu99} (which will eventually be the default) or @option{-std=c99} (or the equivalent @option{-std=iso9899:1999}) is used. The way to solve these problems is to put @samp{__} at the beginning and end of each problematical keyword. For example, use @code{__asm__} ! instead of @code{asm}, @code{__const__} instead of @code{const}, and ! @code{__inline__} instead of @code{inline}. Other C compilers won't accept these alternative keywords; if you want to compile with another compiler, you can define the alternate keywords as --- 4262,4281 ---- @cindex alternate keywords @cindex keywords, alternate @option{-ansi} and the various @option{-std} options disable certain ! keywords. This causes trouble when you want to use GNU C extensions, or ! a general-purpose header file that should be usable by all programs, ! including ISO C programs. The keywords @code{asm}, @code{typeof} and ! @code{inline} are not available in programs compiled with ! @option{-ansi} or @option{-std} (although @code{inline} can be used in a ! program compiled with @option{-std=c99}). The ISO C99 keyword @code{restrict} is only available when @option{-std=gnu99} (which will eventually be the default) or @option{-std=c99} (or the equivalent @option{-std=iso9899:1999}) is used. The way to solve these problems is to put @samp{__} at the beginning and end of each problematical keyword. For example, use @code{__asm__} ! instead of @code{asm}, and @code{__inline__} instead of @code{inline}. Other C compilers won't accept these alternative keywords; if you want to compile with another compiler, you can define the alternate keywords as *************** This function returns the return address *** 4197,4203 **** one of its callers. The @var{level} argument is number of frames to scan up the call stack. A value of @code{0} yields the return address of the current function, a value of @code{1} yields the return address ! of the caller of the current function, and so forth. The @var{level} argument must be a constant integer. --- 4407,4416 ---- one of its callers. The @var{level} argument is number of frames to scan up the call stack. A value of @code{0} yields the return address of the current function, a value of @code{1} yields the return address ! of the caller of the current function, and so forth. When inlining ! the expected behavior is that the function will return the address of ! the function that will be returned to. To work around this behavior use ! the @code{noinline} function attribute. The @var{level} argument must be a constant integer. *************** A floating point value, as wide as a SI *** 4273,4300 **** A floating point value, as wide as a DI mode integer, usually 64 bits. @end table ! Not all base types or combinations are always valid; which modes can be used ! is determined by the target machine. For example, if targetting the i386 MMX ! extensions, only @code{V8QI}, @code{V4HI} and @code{V2SI} are allowed modes. ! There are no @code{V1xx} vector modes - they would be identical to the ! corresponding base mode. ! There is no distinction between signed and unsigned vector modes. This ! distinction is made by the operations that perform on the vectors, not ! by the data type. ! The types defined in this manner are somewhat special, they cannot be ! used with most normal C operations (i.e., a vector addition can @emph{not} ! be represented by a normal addition of two vector type variables). You ! can declare only variables and use them in function calls and returns, as ! well as in assignments and some casts. It is possible to cast from one ! vector type to another, provided they are of the same size (in fact, you ! can also cast vectors to and from other datatypes of the same size). ! A port that supports vector operations provides a set of built-in functions ! that can be used to operate on vectors. For example, a function to add two ! vectors and multiply the result by a third could look like this: @example v4si f (v4si a, v4si b, v4si c) --- 4486,4534 ---- A floating point value, as wide as a DI mode integer, usually 64 bits. @end table ! Specifying a combination that is not valid for the current architecture ! will cause gcc to synthesize the instructions using a narrower mode. ! For example, if you specify a variable of type @code{V4SI} and your ! architecture does not allow for this specific SIMD type, gcc will ! produce code that uses 4 @code{SIs}. ! The types defined in this manner can be used with a subset of normal C ! operations. Currently, gcc will allow using the following operators on ! these types: @code{+, -, *, /, unary minus}@. ! The operations behave like C++ @code{valarrays}. Addition is defined as ! the addition of the corresponding elements of the operands. For ! example, in the code below, each of the 4 elements in @var{a} will be ! added to the corresponding 4 elements in @var{b} and the resulting ! vector will be stored in @var{c}. ! @example ! typedef int v4si __attribute__ ((mode(V4SI))); ! v4si a, b, c; ! ! c = a + b; ! @end example ! ! Subtraction, multiplication, and division operate in a similar manner. ! Likewise, the result of using the unary minus operator on a vector type ! is a vector whose elements are the negative value of the corresponding ! elements in the operand. ! ! You can declare variables and use them in function calls and returns, as ! well as in assignments and some casts. You can specify a vector type as ! a return type for a function. Vector types can also be used as function ! arguments. It is possible to cast from one vector type to another, ! provided they are of the same size (in fact, you can also cast vectors ! to and from other datatypes of the same size). ! ! You cannot operate between vectors of different lengths or different ! signedness without a cast. ! ! A port that supports hardware vector operations, usually provides a set ! of built-in functions that can be used to operate on vectors. For ! example, a function to add two vectors and multiply the result by a ! third could look like this: @example v4si f (v4si a, v4si b, v4si c) *************** v4si f (v4si a, v4si b, v4si c) *** 4334,4339 **** --- 4568,4576 ---- @findex exit @findex _exit @findex _Exit + @findex exp + @findex expf + @findex expl @findex fabs @findex fabsf @findex fabsl *************** v4si f (v4si a, v4si b, v4si c) *** 4346,4363 **** --- 4583,4609 ---- @findex index @findex labs @findex llabs + @findex log + @findex logf + @findex logl @findex memcmp @findex memcpy @findex memset @findex printf @findex printf_unlocked + @findex putchar + @findex puts @findex rindex + @findex scanf @findex sin @findex sinf @findex sinl + @findex snprintf + @findex sprintf @findex sqrt @findex sqrtf @findex sqrtl + @findex sscanf @findex strcat @findex strchr @findex strcmp *************** v4si f (v4si a, v4si b, v4si c) *** 4371,4376 **** --- 4617,4627 ---- @findex strrchr @findex strspn @findex strstr + @findex vprintf + @findex vscanf + @findex vsnprintf + @findex vsprintf + @findex vsscanf GCC provides a large number of built-in functions other than the ones mentioned above. Some of these are for internal use in the processing *************** The functions @code{abort}, @code{exit}, *** 4395,4401 **** are recognized and presumed not to return, but otherwise are not built in. @code{_exit} is not recognized in strict ISO C mode (@option{-ansi}, @option{-std=c89} or @option{-std=c99}). @code{_Exit} is not recognized in ! strict C89 mode (@option{-ansi} or @option{-std=c89}). Outside strict ISO C mode, the functions @code{alloca}, @code{bcmp}, @code{bzero}, @code{index}, @code{rindex}, @code{ffs}, @code{fputs_unlocked}, --- 4646,4654 ---- are recognized and presumed not to return, but otherwise are not built in. @code{_exit} is not recognized in strict ISO C mode (@option{-ansi}, @option{-std=c89} or @option{-std=c99}). @code{_Exit} is not recognized in ! strict C89 mode (@option{-ansi} or @option{-std=c89}). All these functions ! have corresponding versions prefixed with @code{__builtin_}, which may be ! used even in strict C89 mode. Outside strict ISO C mode, the functions @code{alloca}, @code{bcmp}, @code{bzero}, @code{index}, @code{rindex}, @code{ffs}, @code{fputs_unlocked}, *************** mode. *** 4406,4425 **** The ISO C99 functions @code{conj}, @code{conjf}, @code{conjl}, @code{creal}, @code{crealf}, @code{creall}, @code{cimag}, @code{cimagf}, ! @code{cimagl}, @code{llabs} and @code{imaxabs} are handled as built-in ! functions except in strict ISO C89 mode. There are also built-in versions of the ISO C99 functions @code{cosf}, @code{cosl}, ! @code{fabsf}, @code{fabsl}, @code{sinf}, @code{sinl}, @code{sqrtf}, and ! @code{sqrtl}, that are recognized in any mode since ISO C89 reserves these names for the purpose to which ISO C99 puts them. All these functions have corresponding versions prefixed with @code{__builtin_}. ! The ISO C89 functions @code{abs}, @code{cos}, @code{fabs}, ! @code{fprintf}, @code{fputs}, @code{labs}, @code{memcmp}, @code{memcpy}, ! @code{memset}, @code{printf}, @code{sin}, @code{sqrt}, @code{strcat}, @code{strchr}, @code{strcmp}, @code{strcpy}, @code{strcspn}, @code{strlen}, @code{strncat}, @code{strncmp}, @code{strncpy}, ! @code{strpbrk}, @code{strrchr}, @code{strspn}, and @code{strstr} are all recognized as built-in functions unless @option{-fno-builtin} is specified (or @option{-fno-builtin-@var{function}} is specified for an individual function). All of these functions have corresponding --- 4659,4684 ---- The ISO C99 functions @code{conj}, @code{conjf}, @code{conjl}, @code{creal}, @code{crealf}, @code{creall}, @code{cimag}, @code{cimagf}, ! @code{cimagl}, @code{imaxabs}, @code{llabs}, @code{snprintf}, ! @code{vscanf}, @code{vsnprintf} and @code{vsscanf} are handled as built-in ! functions except in strict ISO C90 mode. There are also built-in versions of the ISO C99 functions @code{cosf}, @code{cosl}, ! @code{expf}, @code{expl}, @code{fabsf}, @code{fabsl}, ! @code{logf}, @code{logl}, @code{sinf}, @code{sinl}, @code{sqrtf}, and ! @code{sqrtl}, that are recognized in any mode since ISO C90 reserves these names for the purpose to which ISO C99 puts them. All these functions have corresponding versions prefixed with @code{__builtin_}. ! The ISO C90 functions @code{abs}, @code{cos}, @code{exp}, @code{fabs}, ! @code{fprintf}, @code{fputs}, @code{labs}, @code{log}, ! @code{memcmp}, @code{memcpy}, ! @code{memset}, @code{printf}, @code{putchar}, @code{puts}, @code{scanf}, ! @code{sin}, @code{snprintf}, @code{sprintf}, @code{sqrt}, @code{sscanf}, ! @code{strcat}, @code{strchr}, @code{strcmp}, @code{strcpy}, @code{strcspn}, @code{strlen}, @code{strncat}, @code{strncmp}, @code{strncpy}, ! @code{strpbrk}, @code{strrchr}, @code{strspn}, @code{strstr}, ! @code{vprintf} and @code{vsprintf} are all recognized as built-in functions unless @option{-fno-builtin} is specified (or @option{-fno-builtin-@var{function}} is specified for an individual function). All of these functions have corresponding *************** as @var{exp2}. *** 4506,4518 **** Example: @smallexample ! #define foo(x) \ ! __builtin_choose_expr (__builtin_types_compatible_p (typeof (x), double), \ ! foo_double (x), \ ! __builtin_choose_expr (__builtin_types_compatible_p (typeof (x), float), \ ! foo_float (x), \ ! /* @r{The void expression results in a compile-time error} \ ! @r{when assigning the result to something.} */ \ (void)0)) @end smallexample --- 4765,4779 ---- Example: @smallexample ! #define foo(x) \ ! __builtin_choose_expr ( \ ! __builtin_types_compatible_p (typeof (x), double), \ ! foo_double (x), \ ! __builtin_choose_expr ( \ ! __builtin_types_compatible_p (typeof (x), float), \ ! foo_float (x), \ ! /* @r{The void expression results in a compile-time error} \ ! @r{when assigning the result to something.} */ \ (void)0)) @end smallexample *************** data. For instance, you can write *** 4559,4565 **** @smallexample static const int table[] = @{ __builtin_constant_p (EXPRESSION) ? (EXPRESSION) : -1, ! /* ... */ @}; @end smallexample --- 4820,4826 ---- @smallexample static const int table[] = @{ __builtin_constant_p (EXPRESSION) ? (EXPRESSION) : -1, ! /* @r{@dots{}} */ @}; @end smallexample *************** for (i = 0; i < n; i++) *** 4635,4641 **** a[i] = a[i] + b[i]; __builtin_prefetch (&a[i+j], 1, 1); __builtin_prefetch (&b[i+j], 0, 1); ! /* ... */ @} @end smallexample --- 4896,4902 ---- a[i] = a[i] + b[i]; __builtin_prefetch (&a[i+j], 1, 1); __builtin_prefetch (&b[i+j], 0, 1); ! /* @r{@dots{}} */ @} @end smallexample *************** is evaluated if it includes side effects *** 4649,4654 **** --- 4910,4983 ---- and GCC does not issue a warning. @end deftypefn + @deftypefn {Built-in Function} double __builtin_huge_val (void) + Returns a positive infinity, if supported by the floating-point format, + else @code{DBL_MAX}. This function is suitable for implementing the + ISO C macro @code{HUGE_VAL}. + @end deftypefn + + @deftypefn {Built-in Function} float __builtin_huge_valf (void) + Similar to @code{__builtin_huge_val}, except the return type is @code{float}. + @end deftypefn + + @deftypefn {Built-in Function} {long double} __builtin_huge_vall (void) + Similar to @code{__builtin_huge_val}, except the return + type is @code{long double}. + @end deftypefn + + @deftypefn {Built-in Function} double __builtin_inf (void) + Similar to @code{__builtin_huge_val}, except a warning is generated + if the target floating-point format does not support infinities. + This function is suitable for implementing the ISO C99 macro @code{INFINITY}. + @end deftypefn + + @deftypefn {Built-in Function} float __builtin_inff (void) + Similar to @code{__builtin_inf}, except the return type is @code{float}. + @end deftypefn + + @deftypefn {Built-in Function} {long double} __builtin_infl (void) + Similar to @code{__builtin_inf}, except the return + type is @code{long double}. + @end deftypefn + + @deftypefn {Built-in Function} double __builtin_nan (const char *str) + This is an implementation of the ISO C99 function @code{nan}. + + Since ISO C99 defines this function in terms of @code{strtod}, which we + do not implement, a description of the parsing is in order. The string + is parsed as by @code{strtol}; that is, the base is recognized by + leading @samp{0} or @samp{0x} prefixes. The number parsed is placed + in the significand such that the least significant bit of the number + is at the least significant bit of the significand. The number is + truncated to fit the significand field provided. The significand is + forced to be a quiet NaN. + + This function, if given a string literal, is evaluated early enough + that it is considered a compile-time constant. + @end deftypefn + + @deftypefn {Built-in Function} float __builtin_nanf (const char *str) + Similar to @code{__builtin_nan}, except the return type is @code{float}. + @end deftypefn + + @deftypefn {Built-in Function} {long double} __builtin_nanl (const char *str) + Similar to @code{__builtin_nan}, except the return type is @code{long double}. + @end deftypefn + + @deftypefn {Built-in Function} double __builtin_nans (const char *str) + Similar to @code{__builtin_nan}, except the significand is forced + to be a signaling NaN. The @code{nans} function is proposed by + @uref{http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/n965.htm,,WG14 N965}. + @end deftypefn + + @deftypefn {Built-in Function} float __builtin_nansf (const char *str) + Similar to @code{__builtin_nans}, except the return type is @code{float}. + @end deftypefn + + @deftypefn {Built-in Function} {long double} __builtin_nansl (const char *str) + Similar to @code{__builtin_nans}, except the return type is @code{long double}. + @end deftypefn + @node Target Builtins @section Built-in Functions Specific to Particular Target Machines *************** to those machines. Generally these gene *** 4657,4666 **** --- 4986,5078 ---- instructions, but allow the compiler to schedule those calls. @menu + * Alpha Built-in Functions:: * X86 Built-in Functions:: * PowerPC AltiVec Built-in Functions:: @end menu + @node Alpha Built-in Functions + @subsection Alpha Built-in Functions + + These built-in functions are available for the Alpha family of + processors, depending on the command-line switches used. + + The following built-in functions are always available. They + all generate the machine instruction that is part of the name. + + @example + long __builtin_alpha_implver (void) + long __builtin_alpha_rpcc (void) + long __builtin_alpha_amask (long) + long __builtin_alpha_cmpbge (long, long) + long __builtin_alpha_extbl (long, long) + long __builtin_alpha_extwl (long, long) + long __builtin_alpha_extll (long, long) + long __builtin_alpha_extql (long, long) + long __builtin_alpha_extwh (long, long) + long __builtin_alpha_extlh (long, long) + long __builtin_alpha_extqh (long, long) + long __builtin_alpha_insbl (long, long) + long __builtin_alpha_inswl (long, long) + long __builtin_alpha_insll (long, long) + long __builtin_alpha_insql (long, long) + long __builtin_alpha_inswh (long, long) + long __builtin_alpha_inslh (long, long) + long __builtin_alpha_insqh (long, long) + long __builtin_alpha_mskbl (long, long) + long __builtin_alpha_mskwl (long, long) + long __builtin_alpha_mskll (long, long) + long __builtin_alpha_mskql (long, long) + long __builtin_alpha_mskwh (long, long) + long __builtin_alpha_msklh (long, long) + long __builtin_alpha_mskqh (long, long) + long __builtin_alpha_umulh (long, long) + long __builtin_alpha_zap (long, long) + long __builtin_alpha_zapnot (long, long) + @end example + + The following built-in functions are always with @option{-mmax} + or @option{-mcpu=@var{cpu}} where @var{cpu} is @code{pca56} or + later. They all generate the machine instruction that is part + of the name. + + @example + long __builtin_alpha_pklb (long) + long __builtin_alpha_pkwb (long) + long __builtin_alpha_unpkbl (long) + long __builtin_alpha_unpkbw (long) + long __builtin_alpha_minub8 (long, long) + long __builtin_alpha_minsb8 (long, long) + long __builtin_alpha_minuw4 (long, long) + long __builtin_alpha_minsw4 (long, long) + long __builtin_alpha_maxub8 (long, long) + long __builtin_alpha_maxsb8 (long, long) + long __builtin_alpha_maxuw4 (long, long) + long __builtin_alpha_maxsw4 (long, long) + long __builtin_alpha_perr (long, long) + @end example + + The following built-in functions are always with @option{-mcix} + or @option{-mcpu=@var{cpu}} where @var{cpu} is @code{ev67} or + later. They all generate the machine instruction that is part + of the name. + + @example + long __builtin_alpha_cttz (long) + long __builtin_alpha_ctlz (long) + long __builtin_alpha_ctpop (long) + @end example + + The following builtins are available on systems that use the OSF/1 + PALcode. Normally they invoke the @code{rduniq} and @code{wruniq} + PAL calls, but when invoked with @option{-mtls-kernel}, they invoke + @code{rdval} and @code{wrval}. + + @example + void *__builtin_thread_pointer (void) + void __builtin_set_thread_pointer (void *) + @end example + @node X86 Built-in Functions @subsection X86 Built-in Functions *************** v4si __builtin_ia32_cmpordps (v4sf, v4sf *** 4784,4797 **** v4si __builtin_ia32_cmpeqss (v4sf, v4sf) v4si __builtin_ia32_cmpltss (v4sf, v4sf) v4si __builtin_ia32_cmpless (v4sf, v4sf) - v4si __builtin_ia32_cmpgtss (v4sf, v4sf) - v4si __builtin_ia32_cmpgess (v4sf, v4sf) v4si __builtin_ia32_cmpunordss (v4sf, v4sf) v4si __builtin_ia32_cmpneqss (v4sf, v4sf) v4si __builtin_ia32_cmpnlts (v4sf, v4sf) v4si __builtin_ia32_cmpnless (v4sf, v4sf) - v4si __builtin_ia32_cmpngtss (v4sf, v4sf) - v4si __builtin_ia32_cmpngess (v4sf, v4sf) v4si __builtin_ia32_cmpordss (v4sf, v4sf) v4sf __builtin_ia32_maxps (v4sf, v4sf) v4sf __builtin_ia32_maxss (v4sf, v4sf) --- 5196,5205 ---- *************** The following functions are made availab *** 4904,4909 **** --- 5312,5336 ---- @option{-mabi=altivec}. The functions implement the functionality described in Motorola's AltiVec Programming Interface Manual. + There are a few differences from Motorola's documentation and GCC's + implementation. Vector constants are done with curly braces (not + parentheses). Vector initializers require no casts if the vector + constant is of the same type as the variable it is initializing. The + @code{vector bool} type is deprecated and will be discontinued in + further revisions. Use @code{vector signed} instead. If @code{signed} + or @code{unsigned} is omitted, the vector type will default to + @code{signed}. Lastly, all overloaded functions are implemented with macros + for the C implementation. So code the following example will not work: + + @smallexample + vec_add ((vector signed int)@{1, 2, 3, 4@}, foo); + @end smallexample + + Since vec_add is a macro, the vector constant in the above example will + be treated as four different arguments. Wrap the entire argument in + parentheses for this to work. The C++ implementation does not use + macros. + @emph{Note:} Only the @code{} interface is supported. Internally, GCC uses built-in functions to achieve the functionality in the aforementioned header file, but they are not supported and are *************** vector unsigned int vec_mulo (vector uns *** 5249,5255 **** --- 5676,5684 ---- vector signed int vec_mulo (vector signed short, vector signed short); vector float vec_nmsub (vector float, vector float, vector float); + @end smallexample + @smallexample vector float vec_nor (vector float, vector float); vector signed int vec_nor (vector signed int, vector signed int); vector unsigned int vec_nor (vector unsigned int, vector unsigned int); *************** vector signed int vec_any_eq (vector sig *** 5815,5821 **** --- 6244,6252 ---- vector signed int vec_any_eq (vector signed char, vector signed char); vector signed int vec_any_eq (vector unsigned char, vector signed char); + @end smallexample + @smallexample vector signed int vec_any_eq (vector unsigned char, vector unsigned char); vector signed int vec_any_eq (vector signed short, *************** for further explanation. *** 5970,5975 **** --- 6401,6407 ---- @menu * ARM Pragmas:: + * RS/6000 and PowerPC Pragmas:: * Darwin Pragmas:: * Solaris Pragmas:: * Tru64 Pragmas:: *************** Do not affect the @code{long_call} or @c *** 5998,6003 **** --- 6430,6456 ---- subsequent functions. @end table + @node RS/6000 and PowerPC Pragmas + @subsection RS/6000 and PowerPC Pragmas + + The RS/6000 and PowerPC targets define one pragma for controlling + whether or not the @code{longcall} attribute is added to function + declarations by default. This pragma overrides the @option{-mlongcall} + option, but not the @code{longcall} and @code{shortcall} attributes. + @xref{RS/6000 and PowerPC Options}, for more information about when long + calls are and are not necessary. + + @table @code + @item longcall (1) + @cindex pragma, longcall + Apply the @code{longcall} attribute to all subsequent function + declarations. + + @item longcall (0) + Do not apply the @code{longcall} attribute to subsequent function + declarations. + @end table + @c Describe c4x pragmas here. @c Describe h8300 pragmas here. @c Describe i370 pragmas here. *************** subsequent functions. *** 6010,6016 **** The following pragmas are available for all architectures running the Darwin operating system. These are useful for compatibility with other ! MacOS compilers. @table @code @item mark @var{tokens}@dots{} --- 6463,6469 ---- The following pragmas are available for all architectures running the Darwin operating system. These are useful for compatibility with other ! Mac OS compilers. @table @code @item mark @var{tokens}@dots{} *************** is supported. *** 6066,6072 **** This pragma renames all subsequent function and variable declarations such that @var{string} is prepended to the name. This effect may be ! terminated by using another @code{extern_prefix} pragma with the empty string. This pragma is similar in intent to to the asm labels extension --- 6519,6525 ---- This pragma renames all subsequent function and variable declarations such that @var{string} is prepended to the name. This effect may be ! terminated by using another @code{extern_prefix} pragma with the empty string. This pragma is similar in intent to to the asm labels extension *************** It is ambiguous which @code{a} is being *** 6117,6122 **** --- 6570,6834 ---- Such constructs are not supported and must be avoided. In the future, such constructs may be detected and treated as compilation errors. + @node Thread-Local + @section Thread-Local Storage + @cindex Thread-Local Storage + @cindex @acronym{TLS} + @cindex __thread + + Thread-local storage (@acronym{TLS}) is a mechanism by which variables + are allocated such that there is one instance of the variable per extant + thread. The run-time model GCC uses to implement this originates + in the IA-64 processor-specific ABI, but has since been migrated + to other processors as well. It requires significant support from + the linker (@command{ld}), dynamic linker (@command{ld.so}), and + system libraries (@file{libc.so} and @file{libpthread.so}), so it + is not available everywhere. + + At the user level, the extension is visible with a new storage + class keyword: @code{__thread}. For example: + + @example + __thread int i; + extern __thread struct state s; + static __thread char *p; + @end example + + The @code{__thread} specifier may be used alone, with the @code{extern} + or @code{static} specifiers, but with no other storage class specifier. + When used with @code{extern} or @code{static}, @code{__thread} must appear + immediately after the other storage class specifier. + + The @code{__thread} specifier may be applied to any global, file-scoped + static, function-scoped static, or static data member of a class. It may + not be applied to block-scoped automatic or non-static data member. + + When the address-of operator is applied to a thread-local variable, it is + evaluated at run-time and returns the address of the current thread's + instance of that variable. An address so obtained may be used by any + thread. When a thread terminates, any pointers to thread-local variables + in that thread become invalid. + + No static initialization may refer to the address of a thread-local variable. + + In C++, if an initializer is present for a thread-local variable, it must + be a @var{constant-expression}, as defined in 5.19.2 of the ANSI/ISO C++ + standard. + + See @uref{http://people.redhat.com/drepper/tls.pdf, + ELF Handling For Thread-Local Storage} for a detailed explanation of + the four thread-local storage addressing models, and how the run-time + is expected to function. + + @menu + * C99 Thread-Local Edits:: + * C++98 Thread-Local Edits:: + @end menu + + @node C99 Thread-Local Edits + @subsection ISO/IEC 9899:1999 Edits for Thread-Local Storage + + The following are a set of changes to ISO/IEC 9899:1999 (aka C99) + that document the exact semantics of the language extension. + + @itemize @bullet + @item + @cite{5.1.2 Execution environments} + + Add new text after paragraph 1 + + @quotation + Within either execution environment, a @dfn{thread} is a flow of + control within a program. It is implementation defined whether + or not there may be more than one thread associated with a program. + It is implementation defined how threads beyond the first are + created, the name and type of the function called at thread + startup, and how threads may be terminated. However, objects + with thread storage duration shall be initialized before thread + startup. + @end quotation + + @item + @cite{6.2.4 Storage durations of objects} + + Add new text before paragraph 3 + + @quotation + An object whose identifier is declared with the storage-class + specifier @w{@code{__thread}} has @dfn{thread storage duration}. + Its lifetime is the entire execution of the thread, and its + stored value is initialized only once, prior to thread startup. + @end quotation + + @item + @cite{6.4.1 Keywords} + + Add @code{__thread}. + + @item + @cite{6.7.1 Storage-class specifiers} + + Add @code{__thread} to the list of storage class specifiers in + paragraph 1. + + Change paragraph 2 to + + @quotation + With the exception of @code{__thread}, at most one storage-class + specifier may be given [@dots{}]. The @code{__thread} specifier may + be used alone, or immediately following @code{extern} or + @code{static}. + @end quotation + + Add new text after paragraph 6 + + @quotation + The declaration of an identifier for a variable that has + block scope that specifies @code{__thread} shall also + specify either @code{extern} or @code{static}. + + The @code{__thread} specifier shall be used only with + variables. + @end quotation + @end itemize + + @node C++98 Thread-Local Edits + @subsection ISO/IEC 14882:1998 Edits for Thread-Local Storage + + The following are a set of changes to ISO/IEC 14882:1998 (aka C++98) + that document the exact semantics of the language extension. + + @itemize @bullet + @b{[intro.execution]} + + New text after paragraph 4 + + @quotation + A @dfn{thread} is a flow of control within the abstract machine. + It is implementation defined whether or not there may be more than + one thread. + @end quotation + + New text after paragraph 7 + + @quotation + It is unspecified whether additional action must be taken to + ensure when and whether side effects are visible to other threads. + @end quotation + + @item + @b{[lex.key]} + + Add @code{__thread}. + + @item + @b{[basic.start.main]} + + Add after paragraph 5 + + @quotation + The thread that begins execution at the @code{main} function is called + the @dfn{main thread}. It is implementation defined how functions + beginning threads other than the main thread are designated or typed. + A function so designated, as well as the @code{main} function, is called + a @dfn{thread startup function}. It is implementation defined what + happens if a thread startup function returns. It is implementation + defined what happens to other threads when any thread calls @code{exit}. + @end quotation + + @item + @b{[basic.start.init]} + + Add after paragraph 4 + + @quotation + The storage for an object of thread storage duration shall be + statically initialized before the first statement of the thread startup + function. An object of thread storage duration shall not require + dynamic initialization. + @end quotation + + @item + @b{[basic.start.term]} + + Add after paragraph 3 + + @quotation + The type of an object with thread storage duration shall not have a + non-trivial destructor, nor shall it be an array type whose elements + (directly or indirectly) have non-trivial destructors. + @end quotation + + @item + @b{[basic.stc]} + + Add ``thread storage duration'' to the list in paragraph 1. + + Change paragraph 2 + + @quotation + Thread, static, and automatic storage durations are associated with + objects introduced by declarations [@dots{}]. + @end quotation + + Add @code{__thread} to the list of specifiers in paragraph 3. + + @item + @b{[basic.stc.thread]} + + New section before @b{[basic.stc.static]} + + @quotation + The keyword @code{__thread} applied to an non-local object gives the + object thread storage duration. + + A local variable or class data member declared both @code{static} + and @code{__thread} gives the variable or member thread storage + duration. + @end quotation + + @item + @b{[basic.stc.static]} + + Change paragraph 1 + + @quotation + All objects which have neither thread storage duration, dynamic + storage duration nor are local [@dots{}]. + @end quotation + + @item + @b{[dcl.stc]} + + Add @code{__thread} to the list in paragraph 1. + + Change paragraph 1 + + @quotation + With the exception of @code{__thread}, at most one + @var{storage-class-specifier} shall appear in a given + @var{decl-specifier-seq}. The @code{__thread} specifier may + be used alone, or immediately following the @code{extern} or + @code{static} specifiers. [@dots{}] + @end quotation + + Add after paragraph 5 + + @quotation + The @code{__thread} specifier can be applied only to the names of objects + and to anonymous unions. + @end quotation + + @item + @b{[class.mem]} + + Add after paragraph 6 + + @quotation + Non-@code{static} members shall not be @code{__thread}. + @end quotation + @end itemize + @node C++ Extensions @chapter Extensions to the C++ Language @cindex extensions, C++ language *************** context. *** 6291,6297 **** @example void fn (int *__restrict__ rptr, int &__restrict__ rref) @{ ! @dots{} @} @end example --- 7003,7009 ---- @example void fn (int *__restrict__ rptr, int &__restrict__ rref) @{ ! /* @r{@dots{}} */ @} @end example *************** unaliased by using @code{__restrict__} a *** 6305,6311 **** @example void T::fn () __restrict__ @{ ! @dots{} @} @end example --- 7017,7023 ---- @example void T::fn () __restrict__ @{ ! /* @r{@dots{}} */ @} @end example *************** If any calls were not inlined, you will *** 6516,6522 **** @node Template Instantiation @section Where's the Template? - @cindex template instantiation C++ templates are the first language feature to require more --- 7228,7233 ---- *************** compile it without @option{-fno-implicit *** 6635,6642 **** instances required by your explicit instantiations (but not by any other files) without having to specify them as well. ! g++ has extended the template instantiation syntax outlined in the ! Working Paper to allow forward declaration of explicit instantiations (with @code{extern}), instantiation of the compiler support data for a template class (i.e.@: the vtable) without instantiating any of its members (with @code{inline}), and instantiation of only the static data --- 7346,7353 ---- instances required by your explicit instantiations (but not by any other files) without having to specify them as well. ! g++ has extended the template instantiation syntax given in the ISO ! standard to allow forward declaration of explicit instantiations (with @code{extern}), instantiation of the compiler support data for a template class (i.e.@: the vtable) without instantiating any of its members (with @code{inline}), and instantiation of only the static data *************** each translation unit will contain insta *** 6656,6703 **** uses. In a large program, this can lead to an unacceptable amount of code duplication. - @item - @opindex fexternal-templates - Add @samp{#pragma interface} to all files containing template - definitions. For each of these files, add @samp{#pragma implementation - "@var{filename}"} to the top of some @samp{.C} file which - @samp{#include}s it. Then compile everything with - @option{-fexternal-templates}. The templates will then only be expanded - in the translation unit which implements them (i.e.@: has a @samp{#pragma - implementation} line for the file where they live); all other files will - use external references. If you're lucky, everything should work - properly. If you get undefined symbol errors, you need to make sure - that each template instance which is used in the program is used in the - file which implements that template. If you don't have any use for a - particular instance in that file, you can just instantiate it - explicitly, using the syntax from the latest C++ working paper: - - @example - template class A; - template ostream& operator << (ostream&, const A&); - @end example - - This strategy will work with code written for either model. If you are - using code written for the Cfront model, the file containing a class - template and the file containing its member templates should be - implemented in the same translation unit. - - @item - @opindex falt-external-templates - A slight variation on this approach is to use the flag - @option{-falt-external-templates} instead. This flag causes template - instances to be emitted in the translation unit that implements the - header where they are first instantiated, rather than the one which - implements the file where the templates are defined. This header must - be the same in all translation units, or things are likely to break. - @xref{C++ Interface,,Declarations and Definitions in One Header}, for more discussion of these pragmas. @end enumerate @node Bound member functions @section Extracting the function pointer from a bound pointer to member function - @cindex pmf @cindex pointer to member function @cindex bound pointer to member function --- 7367,7378 ---- *************** Floating and complex non-type template p *** 6854,6860 **** and are now removed from g++. The implicit typename extension has been deprecated and will be removed ! from g++ at some point. In some cases g++ determines that a dependant type such as @code{TPL::X} is a type without needing a @code{typename} keyword, contrary to the standard. --- 7529,7535 ---- and are now removed from g++. The implicit typename extension has been deprecated and will be removed ! from g++ at some point. In some cases g++ determines that a dependent type such as @code{TPL::X} is a type without needing a @code{typename} keyword, contrary to the standard. diff -Nrc3pad gcc-3.2.3/gcc/doc/frontends.texi gcc-3.3/gcc/doc/frontends.texi *** gcc-3.2.3/gcc/doc/frontends.texi 2002-04-15 18:59:52.000000000 +0000 --- gcc-3.3/gcc/doc/frontends.texi 2002-06-09 22:40:14.000000000 +0000 *************** *** 4,19 **** @c For copying conditions, see the file gcc.texi. @node G++ and GCC ! @chapter Compile C, C++, Objective-C, Ada, Fortran, or Java @cindex Objective-C @cindex Fortran @cindex Java @cindex Ada Several versions of the compiler (C, C++, Objective-C, Ada, ! Fortran, and Java) are integrated; this is why we use the name ``GNU Compiler Collection''. GCC can compile programs written in any of these ! languages. The Ada, Fortran, and Java compilers are described in separate manuals. @cindex GCC --- 4,20 ---- @c For copying conditions, see the file gcc.texi. @node G++ and GCC ! @chapter Compile C, C++, Objective-C, Ada, Fortran, Java, or treelang @cindex Objective-C @cindex Fortran @cindex Java @cindex Ada + @cindex treelang Several versions of the compiler (C, C++, Objective-C, Ada, ! Fortran, Java and treelang) are integrated; this is why we use the name ``GNU Compiler Collection''. GCC can compile programs written in any of these ! languages. The Ada, Fortran, Java and treelang compilers are described in separate manuals. @cindex GCC diff -Nrc3pad gcc-3.2.3/gcc/doc/fsf-funding.7 gcc-3.3/gcc/doc/fsf-funding.7 *** gcc-3.2.3/gcc/doc/fsf-funding.7 2003-04-22 07:07:34.000000000 +0000 --- gcc-3.3/gcc/doc/fsf-funding.7 2003-05-14 00:32:06.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:34 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,147 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" ! .IX Title "fsf-funding 7" ! .TH fsf-funding 7 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" ! fsf-funding \- Funding Free Software .SH "DESCRIPTION" .IX Header "DESCRIPTION" .Sh "Funding Free Software" --- 126,137 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" ! .IX Title "FSF-FUNDING 7" ! .TH FSF-FUNDING 7 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" ! fsf\-funding \- Funding Free Software .SH "DESCRIPTION" .IX Header "DESCRIPTION" .Sh "Funding Free Software" diff -Nrc3pad gcc-3.2.3/gcc/doc/gcc.1 gcc-3.3/gcc/doc/gcc.1 *** gcc-3.2.3/gcc/doc/gcc.1 2003-04-22 07:07:33.000000000 +0000 --- gcc-3.3/gcc/doc/gcc.1 2003-05-14 00:32:04.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:29 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,147 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "GCC 1" ! .TH GCC 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" ! gcc \- \s-1GNU\s0 project C and \*(C+ compiler .SH "SYNOPSIS" .IX Header "SYNOPSIS" gcc [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] [\fB\-std=\fR\fIstandard\fR] --- 126,137 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "GCC 1" ! .TH GCC 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" ! gcc \- GNU project C and C++ compiler .SH "SYNOPSIS" .IX Header "SYNOPSIS" gcc [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] [\fB\-std=\fR\fIstandard\fR] *************** of the same kind; for example, if you sp *** 183,192 **** the directories are searched in the order specified. .PP Many options have long names starting with \fB\-f\fR or with ! \&\fB\-W\fR\-\-\-for example, \fB\-fforce-mem\fR, ! \&\fB\-fstrength-reduce\fR, \fB\-Wformat\fR and so on. Most of these have both positive and negative forms; the negative form of ! \&\fB\-ffoo\fR would be \fB\-fno-foo\fR. This manual documents only one of these two forms, whichever one is not the default. .SH "OPTIONS" .IX Header "OPTIONS" --- 173,182 ---- the directories are searched in the order specified. .PP Many options have long names starting with \fB\-f\fR or with ! \&\fB\-W\fR\-\-\-for example, \fB\-fforce\-mem\fR, ! \&\fB\-fstrength\-reduce\fR, \fB\-Wformat\fR and so on. Most of these have both positive and negative forms; the negative form of ! \&\fB\-ffoo\fR would be \fB\-fno\-foo\fR. This manual documents only one of these two forms, whichever one is not the default. .SH "OPTIONS" .IX Header "OPTIONS" *************** only one of these two forms, whichever o *** 194,322 **** .IX Subsection "Option Summary" Here is a summary of all the options, grouped by type. Explanations are in the following sections. ! .Ip "\fIOverall Options\fR" 4 .IX Item "Overall Options" ! \&\fB\-c \-S \-E \-o\fR \fIfile\fR \fB\-pipe \-pass-exit-codes \-x\fR \fIlanguage\fR ! \&\fB\-v \-### \-\-help \-\-target-help \-\-version\fR ! .Ip "\fIC Language Options\fR" 4 .IX Item "C Language Options" ! \&\fB\-ansi \-std=\fR\fIstandard\fR \fB\-aux-info\fR \fIfilename\fR ! \&\fB\-fno-asm \-fno-builtin \-fno-builtin-\fR\fIfunction\fR ! \&\fB\-fhosted \-ffreestanding ! \&\-trigraphs \-no-integrated-cpp \-traditional \-traditional-cpp ! \&\-fallow-single-precision \-fcond-mismatch ! \&\-fsigned-bitfields \-fsigned-char ! \&\-funsigned-bitfields \-funsigned-char ! \&\-fwritable-strings\fR ! .Ip "\fI\*(C+ Language Options\fR" 4 .IX Item " Language Options" ! \&\fB\-fno-access-control \-fcheck-new \-fconserve-space ! \&\-fno-const-strings \-fdollars-in-identifiers ! \&\-fno-elide-constructors ! \&\-fno-enforce-eh-specs \-fexternal-templates ! \&\-falt-external-templates ! \&\-ffor-scope \-fno-for-scope \-fno-gnu-keywords ! \&\-fno-implicit-templates ! \&\-fno-implicit-inline-templates ! \&\-fno-implement-inlines \-fms-extensions ! \&\-fno-nonansi-builtins \-fno-operator-names ! \&\-fno-optional-diags \-fpermissive ! \&\-frepo \-fno-rtti \-fstats \-ftemplate-depth-\fR\fIn\fR ! \&\fB\-fuse-cxa-atexit \-fvtable-gc \-fno-weak \-nostdinc++ ! \&\-fno-default-inline \-Wabi \-Wctor-dtor-privacy ! \&\-Wnon-virtual-dtor \-Wreorder ! \&\-Weffc++ \-Wno-deprecated ! \&\-Wno-non-template-friend \-Wold-style-cast ! \&\-Woverloaded-virtual \-Wno-pmf-conversions ! \&\-Wsign-promo \-Wsynth\fR ! .Ip "\fIObjective-C Language Options\fR" 4 .IX Item "Objective-C Language Options" ! \&\fB\-fconstant-string-class=\fR\fIclass-name\fR ! \&\fB\-fgnu-runtime \-fnext-runtime \-gen-decls ! \&\-Wno-protocol \-Wselector\fR ! .Ip "\fILanguage Independent Options\fR" 4 .IX Item "Language Independent Options" ! \&\fB\-fmessage-length=\fR\fIn\fR ! \&\fB\-fdiagnostics-show-location=\fR[\fBonce\fR|\fBevery-line\fR] ! .Ip "\fIWarning Options\fR" 4 .IX Item "Warning Options" ! \&\fB\-fsyntax-only \-pedantic \-pedantic-errors ! \&\-w \-W \-Wall \-Waggregate-return ! \&\-Wcast-align \-Wcast-qual \-Wchar-subscripts \-Wcomment ! \&\-Wconversion \-Wno-deprecated-declarations ! \&\-Wdisabled-optimization \-Wdiv-by-zero \-Werror ! \&\-Wfloat-equal \-Wformat \-Wformat=2 ! \&\-Wformat-nonliteral \-Wformat-security ! \&\-Wimplicit \-Wimplicit-int ! \&\-Wimplicit-function-declaration ! \&\-Werror-implicit-function-declaration ! \&\-Wimport \-Winline ! \&\-Wlarger-than-\fR\fIlen\fR \fB\-Wlong-long ! \&\-Wmain \-Wmissing-braces ! \&\-Wmissing-format-attribute \-Wmissing-noreturn ! \&\-Wmultichar \-Wno-format-extra-args \-Wno-format-y2k ! \&\-Wno-import \-Wpacked \-Wpadded ! \&\-Wparentheses \-Wpointer-arith \-Wredundant-decls ! \&\-Wreturn-type \-Wsequence-point \-Wshadow ! \&\-Wsign-compare \-Wswitch \-Wsystem-headers ! \&\-Wtrigraphs \-Wundef \-Wuninitialized ! \&\-Wunknown-pragmas \-Wunreachable-code ! \&\-Wunused \-Wunused-function \-Wunused-label \-Wunused-parameter ! \&\-Wunused-value \-Wunused-variable \-Wwrite-strings\fR ! .Ip "\fIC-only Warning Options\fR" 4 .IX Item "C-only Warning Options" ! \&\fB\-Wbad-function-cast \-Wmissing-declarations ! \&\-Wmissing-prototypes \-Wnested-externs ! \&\-Wstrict-prototypes \-Wtraditional\fR ! .Ip "\fIDebugging Options\fR" 4 .IX Item "Debugging Options" \&\fB\-d\fR\fIletters\fR \fB\-dumpspecs \-dumpmachine \-dumpversion ! \&\-fdump-unnumbered \-fdump-translation-unit\fR[\fB-\fR\fIn\fR] ! \&\fB\-fdump-class-hierarchy\fR[\fB-\fR\fIn\fR] ! \&\fB\-fdump-tree-original\fR[\fB-\fR\fIn\fR] \fB\-fdump-tree-optimized\fR[\fB-\fR\fIn\fR] ! \&\fB\-fdump-tree-inlined\fR[\fB-\fR\fIn\fR] ! \&\fB\-fmem-report \-fpretend-float ! \&\-fprofile-arcs \-fsched-verbose=\fR\fIn\fR ! \&\fB\-ftest-coverage \-ftime-report ! \&\-g \-g\fR\fIlevel\fR \fB\-gcoff \-gdwarf \-gdwarf-1 \-gdwarf-1+ \-gdwarf-2 \&\-ggdb \-gstabs \-gstabs+ \-gvms \-gxcoff \-gxcoff+ ! \&\-p \-pg \-print-file-name=\fR\fIlibrary\fR \fB\-print-libgcc-file-name ! \&\-print-multi-directory \-print-multi-lib ! \&\-print-prog-name=\fR\fIprogram\fR \fB\-print-search-dirs \-Q ! \&\-save-temps \-time\fR ! .Ip "\fIOptimization Options\fR" 4 .IX Item "Optimization Options" ! \&\fB\-falign-functions=\fR\fIn\fR \fB\-falign-jumps=\fR\fIn\fR ! \&\fB\-falign-labels=\fR\fIn\fR \fB\-falign-loops=\fR\fIn\fR ! \&\fB\-fbounds-check ! \&\-fbranch-probabilities \-fcaller-saves \-fcprop-registers ! \&\-fcse-follow-jumps \-fcse-skip-blocks \-fdata-sections ! \&\-fdelayed-branch \-fdelete-null-pointer-checks ! \&\-fexpensive-optimizations \-ffast-math \-ffloat-store ! \&\-fforce-addr \-fforce-mem \-ffunction-sections ! \&\-fgcse \-fgcse-lm \-fgcse-sm ! \&\-finline-functions \-finline-limit=\fR\fIn\fR \fB\-fkeep-inline-functions ! \&\-fkeep-static-consts \-fmerge-constants \-fmerge-all-constants ! \&\-fmove-all-movables \-fno-branch-count-reg ! \&\-fno-default-inline \-fno-defer-pop ! \&\-fno-function-cse \-fno-guess-branch-probability ! \&\-fno-inline \-fno-math-errno \-fno-peephole \-fno-peephole2 ! \&\-funsafe-math-optimizations \-fno-trapping-math ! \&\-fomit-frame-pointer \-foptimize-register-move ! \&\-foptimize-sibling-calls \-fprefetch-loop-arrays ! \&\-freduce-all-givs \-fregmove \-frename-registers ! \&\-frerun-cse-after-loop \-frerun-loop-opt ! \&\-fschedule-insns \-fschedule-insns2 ! \&\-fno-sched-interblock \-fno-sched-spec ! \&\-fsched-spec-load \-fsched-spec-load-dangerous ! \&\-fsingle-precision-constant \-fssa \-fssa-ccp \-fssa-dce ! \&\-fstrength-reduce \-fstrict-aliasing \-fthread-jumps ! \&\-ftrapv \-funroll-all-loops \-funroll-loops ! \&\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR \&\fB\-O \-O0 \-O1 \-O2 \-O3 \-Os\fR ! .Ip "\fIPreprocessor Options\fR" 4 .IX Item "Preprocessor Options" ! \&\fB\-$ \-A\fR\fIquestion\fR\fB=\fR\fIanswer\fR \fB\-A-\fR\fIquestion\fR[\fB=\fR\fIanswer\fR] \&\fB\-C \-dD \-dI \-dM \-dN \&\-D\fR\fImacro\fR[\fB=\fR\fIdefn\fR] \fB\-E \-H \&\-idirafter\fR \fIdir\fR --- 184,317 ---- .IX Subsection "Option Summary" Here is a summary of all the options, grouped by type. Explanations are in the following sections. ! .IP "\fIOverall Options\fR" 4 .IX Item "Overall Options" ! \&\fB\-c \-S \-E \-o\fR \fIfile\fR \fB\-pipe \-pass\-exit\-codes ! \&\-x\fR \fIlanguage\fR \fB\-v \-### \-\-help \-\-target\-help \-\-version\fR ! .IP "\fIC Language Options\fR" 4 .IX Item "C Language Options" ! \&\fB\-ansi \-std=\fR\fIstandard\fR \fB\-aux\-info\fR \fIfilename\fR ! \&\fB\-fno\-asm \-fno\-builtin \-fno\-builtin\-\fR\fIfunction\fR ! \&\fB\-fhosted \-ffreestanding \-fms\-extensions ! \&\-trigraphs \-no\-integrated\-cpp \-traditional \-traditional\-cpp ! \&\-fallow\-single\-precision \-fcond\-mismatch ! \&\-fsigned\-bitfields \-fsigned\-char ! \&\-funsigned\-bitfields \-funsigned\-char ! \&\-fwritable\-strings\fR ! .IP "\fI\*(C+ Language Options\fR" 4 .IX Item " Language Options" ! \&\fB\-fabi\-version=\fR\fIn\fR \fB\-fno\-access\-control \-fcheck\-new ! \&\-fconserve\-space \-fno\-const\-strings \-fdollars\-in\-identifiers ! \&\-fno\-elide\-constructors ! \&\-fno\-enforce\-eh\-specs \-fexternal\-templates ! \&\-falt\-external\-templates ! \&\-ffor\-scope \-fno\-for\-scope \-fno\-gnu\-keywords ! \&\-fno\-implicit\-templates ! \&\-fno\-implicit\-inline\-templates ! \&\-fno\-implement\-inlines \-fms\-extensions ! \&\-fno\-nonansi\-builtins \-fno\-operator\-names ! \&\-fno\-optional\-diags \-fpermissive ! \&\-frepo \-fno\-rtti \-fstats \-ftemplate\-depth\-\fR\fIn\fR ! \&\fB\-fuse\-cxa\-atexit \-fvtable\-gc \-fno\-weak \-nostdinc++ ! \&\-fno\-default\-inline \-Wabi \-Wctor\-dtor\-privacy ! \&\-Wnon\-virtual\-dtor \-Wreorder ! \&\-Weffc++ \-Wno\-deprecated ! \&\-Wno\-non\-template\-friend \-Wold\-style\-cast ! \&\-Woverloaded\-virtual \-Wno\-pmf\-conversions ! \&\-Wsign\-promo \-Wsynth\fR ! .IP "\fIObjective-C Language Options\fR" 4 .IX Item "Objective-C Language Options" ! \&\fB\-fconstant\-string\-class=\fR\fIclass-name\fR ! \&\fB\-fgnu\-runtime \-fnext\-runtime \-gen\-decls ! \&\-Wno\-protocol \-Wselector \-Wundeclared\-selector\fR ! .IP "\fILanguage Independent Options\fR" 4 .IX Item "Language Independent Options" ! \&\fB\-fmessage\-length=\fR\fIn\fR ! \&\fB\-fdiagnostics\-show\-location=\fR[\fBonce\fR|\fBevery-line\fR] ! .IP "\fIWarning Options\fR" 4 .IX Item "Warning Options" ! \&\fB\-fsyntax\-only \-pedantic \-pedantic\-errors ! \&\-w \-W \-Wall \-Waggregate\-return ! \&\-Wcast\-align \-Wcast\-qual \-Wchar\-subscripts \-Wcomment ! \&\-Wconversion \-Wno\-deprecated\-declarations ! \&\-Wdisabled\-optimization \-Wno\-div\-by\-zero \-Werror ! \&\-Wfloat\-equal \-Wformat \-Wformat=2 ! \&\-Wformat\-nonliteral \-Wformat\-security ! \&\-Wimplicit \-Wimplicit\-int ! \&\-Wimplicit\-function\-declaration ! \&\-Werror\-implicit\-function\-declaration ! \&\-Wimport \-Winline \-Wno\-endif\-labels ! \&\-Wlarger\-than\-\fR\fIlen\fR \fB\-Wlong\-long ! \&\-Wmain \-Wmissing\-braces ! \&\-Wmissing\-format\-attribute \-Wmissing\-noreturn ! \&\-Wno\-multichar \-Wno\-format\-extra\-args \-Wno\-format\-y2k ! \&\-Wno\-import \-Wnonnull \-Wpacked \-Wpadded ! \&\-Wparentheses \-Wpointer\-arith \-Wredundant\-decls ! \&\-Wreturn\-type \-Wsequence\-point \-Wshadow ! \&\-Wsign\-compare \-Wstrict\-aliasing ! \&\-Wswitch \-Wswitch\-default \-Wswitch\-enum ! \&\-Wsystem\-headers \-Wtrigraphs \-Wundef \-Wuninitialized ! \&\-Wunknown\-pragmas \-Wunreachable\-code ! \&\-Wunused \-Wunused\-function \-Wunused\-label \-Wunused\-parameter ! \&\-Wunused\-value \-Wunused\-variable \-Wwrite\-strings\fR ! .IP "\fIC\-only Warning Options\fR" 4 .IX Item "C-only Warning Options" ! \&\fB\-Wbad\-function\-cast \-Wmissing\-declarations ! \&\-Wmissing\-prototypes \-Wnested\-externs ! \&\-Wstrict\-prototypes \-Wtraditional\fR ! .IP "\fIDebugging Options\fR" 4 .IX Item "Debugging Options" \&\fB\-d\fR\fIletters\fR \fB\-dumpspecs \-dumpmachine \-dumpversion ! \&\-fdump\-unnumbered \-fdump\-translation\-unit\fR[\fB\-\fR\fIn\fR] ! \&\fB\-fdump\-class\-hierarchy\fR[\fB\-\fR\fIn\fR] ! \&\fB\-fdump\-tree\-original\fR[\fB\-\fR\fIn\fR] ! \&\fB\-fdump\-tree\-optimized\fR[\fB\-\fR\fIn\fR] ! \&\fB\-fdump\-tree\-inlined\fR[\fB\-\fR\fIn\fR] ! \&\fB\-feliminate\-dwarf2\-dups \-fmem\-report ! \&\-fprofile\-arcs \-fsched\-verbose=\fR\fIn\fR ! \&\fB\-ftest\-coverage \-ftime\-report ! \&\-g \-g\fR\fIlevel\fR \fB\-gcoff \-gdwarf \-gdwarf\-1 \-gdwarf\-1+ \-gdwarf\-2 \&\-ggdb \-gstabs \-gstabs+ \-gvms \-gxcoff \-gxcoff+ ! \&\-p \-pg \-print\-file\-name=\fR\fIlibrary\fR \fB\-print\-libgcc\-file\-name ! \&\-print\-multi\-directory \-print\-multi\-lib ! \&\-print\-prog\-name=\fR\fIprogram\fR \fB\-print\-search\-dirs \-Q ! \&\-save\-temps \-time\fR ! .IP "\fIOptimization Options\fR" 4 .IX Item "Optimization Options" ! \&\fB\-falign\-functions=\fR\fIn\fR \fB\-falign\-jumps=\fR\fIn\fR ! \&\fB\-falign\-labels=\fR\fIn\fR \fB\-falign\-loops=\fR\fIn\fR ! \&\fB\-fbranch\-probabilities \-fcaller\-saves \-fcprop\-registers ! \&\-fcse\-follow\-jumps \-fcse\-skip\-blocks \-fdata\-sections ! \&\-fdelayed\-branch \-fdelete\-null\-pointer\-checks ! \&\-fexpensive\-optimizations \-ffast\-math \-ffloat\-store ! \&\-fforce\-addr \-fforce\-mem \-ffunction\-sections ! \&\-fgcse \-fgcse\-lm \-fgcse\-sm \-floop\-optimize \-fcrossjumping ! \&\-fif\-conversion \-fif\-conversion2 ! \&\-finline\-functions \-finline\-limit=\fR\fIn\fR \fB\-fkeep\-inline\-functions ! \&\-fkeep\-static\-consts \-fmerge\-constants \-fmerge\-all\-constants ! \&\-fmove\-all\-movables \-fnew\-ra \-fno\-branch\-count\-reg ! \&\-fno\-default\-inline \-fno\-defer\-pop ! \&\-fno\-function\-cse \-fno\-guess\-branch\-probability ! \&\-fno\-inline \-fno\-math\-errno \-fno\-peephole \-fno\-peephole2 ! \&\-funsafe\-math\-optimizations \-ffinite\-math\-only ! \&\-fno\-trapping\-math \-fno\-zero\-initialized\-in\-bss ! \&\-fomit\-frame\-pointer \-foptimize\-register\-move ! \&\-foptimize\-sibling\-calls \-fprefetch\-loop\-arrays ! \&\-freduce\-all\-givs \-fregmove \-frename\-registers ! \&\-freorder\-blocks \-freorder\-functions ! \&\-frerun\-cse\-after\-loop \-frerun\-loop\-opt ! \&\-fschedule\-insns \-fschedule\-insns2 ! \&\-fno\-sched\-interblock \-fno\-sched\-spec \-fsched\-spec\-load ! \&\-fsched\-spec\-load\-dangerous \-fsignaling\-nans ! \&\-fsingle\-precision\-constant \-fssa \-fssa\-ccp \-fssa\-dce ! \&\-fstrength\-reduce \-fstrict\-aliasing \-ftracer \-fthread\-jumps ! \&\-funroll\-all\-loops \-funroll\-loops ! \&\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR \&\fB\-O \-O0 \-O1 \-O2 \-O3 \-Os\fR ! .IP "\fIPreprocessor Options\fR" 4 .IX Item "Preprocessor Options" ! \&\fB\-$ \-A\fR\fIquestion\fR\fB=\fR\fIanswer\fR ! \&\fB\-A\-\fR\fIquestion\fR[\fB=\fR\fIanswer\fR] \&\fB\-C \-dD \-dI \-dM \-dN \&\-D\fR\fImacro\fR[\fB=\fR\fIdefn\fR] \fB\-E \-H \&\-idirafter\fR \fIdir\fR *************** in the following sections. *** 325,698 **** \&\fB\-iwithprefixbefore\fR \fIdir\fR \fB\-isystem\fR \fIdir\fR \&\fB\-M \-MM \-MF \-MG \-MP \-MQ \-MT \-nostdinc \-P \-remap \&\-trigraphs \-undef \-U\fR\fImacro\fR \fB\-Wp,\fR\fIoption\fR ! .Ip "\fIAssembler Option\fR" 4 .IX Item "Assembler Option" \&\fB\-Wa,\fR\fIoption\fR ! .Ip "\fILinker Options\fR" 4 .IX Item "Linker Options" ! \&\fB ! \&\fR\fIobject-file-name\fR \fB\-l\fR\fIlibrary\fR \&\fB\-nostartfiles \-nodefaultlibs \-nostdlib ! \&\-s \-static \-static-libgcc \-shared \-shared-libgcc \-symbolic \&\-Wl,\fR\fIoption\fR \fB\-Xlinker\fR \fIoption\fR \&\fB\-u\fR \fIsymbol\fR ! .Ip "\fIDirectory Options\fR" 4 .IX Item "Directory Options" ! \&\fB\-B\fR\fIprefix\fR \fB\-I\fR\fIdir\fR \fB\-I- \-L\fR\fIdir\fR \fB\-specs=\fR\fIfile\fR ! .Ip "\fITarget Options\fR" 4 .IX Item "Target Options" ! \&\fB\-b\fR \fImachine\fR \fB\-V\fR \fIversion\fR ! .Ip "\fIMachine Dependent Options\fR" 4 .IX Item "Machine Dependent Options" \&\fIM680x0 Options\fR - .Sp \&\fB\-m68000 \-m68020 \-m68020\-40 \-m68020\-60 \-m68030 \-m68040 \&\-m68060 \-mcpu32 \-m5200 \-m68881 \-mbitfield \-mc68000 \-mc68020 ! \&\-mfpa \-mnobitfield \-mrtd \-mshort \-msoft-float \-mpcrel ! \&\-malign-int \-mstrict-align\fR .Sp \&\fIM68hc1x Options\fR ! .Sp ! \&\fB\-m6811 \-m6812 \-m68hc11 \-m68hc12 ! \&\-mauto-incdec \-mshort \-msoft-reg-count=\fR\fIcount\fR .Sp \&\fI\s-1VAX\s0 Options\fR - .Sp \&\fB\-mg \-mgnu \-munix\fR .Sp \&\fI\s-1SPARC\s0 Options\fR - .Sp \&\fB\-mcpu=\fR\fIcpu-type\fR \&\fB\-mtune=\fR\fIcpu-type\fR \&\fB\-mcmodel=\fR\fIcode-model\fR \&\fB\-m32 \-m64 ! \&\-mapp-regs \-mbroken-saverestore \-mcypress ! \&\-mfaster-structs \-mflat ! \&\-mfpu \-mhard-float \-mhard-quad-float ! \&\-mimpure-text \-mlive-g0 \-mno-app-regs ! \&\-mno-faster-structs \-mno-flat \-mno-fpu ! \&\-mno-impure-text \-mno-stack-bias \-mno-unaligned-doubles ! \&\-msoft-float \-msoft-quad-float \-msparclite \-mstack-bias ! \&\-msupersparc \-munaligned-doubles \-mv8\fR ! .Sp ! \&\fIConvex Options\fR ! .Sp ! \&\fB\-mc1 \-mc2 \-mc32 \-mc34 \-mc38 ! \&\-margcount \-mnoargcount ! \&\-mlong32 \-mlong64 ! \&\-mvolatile-cache \-mvolatile-nocache\fR ! .Sp ! \&\fI\s-1AMD29K\s0 Options\fR ! .Sp ! \&\fB\-m29000 \-m29050 \-mbw \-mnbw \-mdw \-mndw ! \&\-mlarge \-mnormal \-msmall ! \&\-mkernel-registers \-mno-reuse-arg-regs ! \&\-mno-stack-check \-mno-storem-bug ! \&\-mreuse-arg-regs \-msoft-float \-mstack-check ! \&\-mstorem-bug \-muser-registers\fR .Sp \&\fI\s-1ARM\s0 Options\fR ! .Sp ! \&\fB\-mapcs-frame \-mno-apcs-frame ! \&\-mapcs-26 \-mapcs-32 ! \&\-mapcs-stack-check \-mno-apcs-stack-check ! \&\-mapcs-float \-mno-apcs-float ! \&\-mapcs-reentrant \-mno-apcs-reentrant ! \&\-msched-prolog \-mno-sched-prolog ! \&\-mlittle-endian \-mbig-endian \-mwords-little-endian ! \&\-malignment-traps \-mno-alignment-traps ! \&\-msoft-float \-mhard-float \-mfpe ! \&\-mthumb-interwork \-mno-thumb-interwork \&\-mcpu=\fR\fIname\fR \fB\-march=\fR\fIname\fR \fB\-mfpe=\fR\fIname\fR ! \&\fB\-mstructure-size-boundary=\fR\fIn\fR ! \&\fB\-mbsd \-mxopen \-mno-symrename ! \&\-mabort-on-noreturn ! \&\-mlong-calls \-mno-long-calls ! \&\-msingle-pic-base \-mno-single-pic-base ! \&\-mpic-register=\fR\fIreg\fR ! \&\fB\-mnop-fun-dllimport ! \&\-mpoke-function-name \&\-mthumb \-marm ! \&\-mtpcs-frame \-mtpcs-leaf-frame ! \&\-mcaller-super-interworking \-mcallee-super-interworking\fR .Sp \&\fI\s-1MN10200\s0 Options\fR - .Sp \&\fB\-mrelax\fR .Sp \&\fI\s-1MN10300\s0 Options\fR ! .Sp ! \&\fB\-mmult-bug \-mno-mult-bug ! \&\-mam33 \-mno-am33 ! \&\-mno-crt0 \-mrelax\fR .Sp \&\fIM32R/D Options\fR ! .Sp ! \&\fB\-m32rx \-m32r \-mcode-model=\fR\fImodel-type\fR \fB\-msdata=\fR\fIsdata-type\fR ! \&\fB\-G\fR \fInum\fR .Sp \&\fIM88K Options\fR ! .Sp ! \&\fB\-m88000 \-m88100 \-m88110 \-mbig-pic ! \&\-mcheck-zero-division \-mhandle-large-shift ! \&\-midentify-revision \-mno-check-zero-division ! \&\-mno-ocs-debug-info \-mno-ocs-frame-position ! \&\-mno-optimize-arg-area \-mno-serialize-volatile ! \&\-mno-underscores \-mocs-debug-info ! \&\-mocs-frame-position \-moptimize-arg-area ! \&\-mserialize-volatile \-mshort-data-\fR\fInum\fR \fB\-msvr3 ! \&\-msvr4 \-mtrap-large-shift \-muse-div-instruction ! \&\-mversion-03.00 \-mwarn-passed-structs\fR .Sp \&\fI\s-1RS/6000\s0 and PowerPC Options\fR - .Sp \&\fB\-mcpu=\fR\fIcpu-type\fR \&\fB\-mtune=\fR\fIcpu-type\fR ! \&\fB\-mpower \-mno-power \-mpower2 \-mno-power2 ! \&\-mpowerpc \-mpowerpc64 \-mno-powerpc ! \&\-maltivec \-mno-altivec ! \&\-mpowerpc-gpopt \-mno-powerpc-gpopt ! \&\-mpowerpc-gfxopt \-mno-powerpc-gfxopt ! \&\-mnew-mnemonics \-mold-mnemonics ! \&\-mfull-toc \-mminimal-toc \-mno-fp-in-toc \-mno-sum-in-toc ! \&\-m64 \-m32 \-mxl-call \-mno-xl-call \-mpe ! \&\-msoft-float \-mhard-float \-mmultiple \-mno-multiple ! \&\-mstring \-mno-string \-mupdate \-mno-update ! \&\-mfused-madd \-mno-fused-madd \-mbit-align \-mno-bit-align ! \&\-mstrict-align \-mno-strict-align \-mrelocatable ! \&\-mno-relocatable \-mrelocatable-lib \-mno-relocatable-lib ! \&\-mtoc \-mno-toc \-mlittle \-mlittle-endian \-mbig \-mbig-endian ! \&\-mcall-aix \-mcall-sysv \-mcall-netbsd ! \&\-maix-struct-return \-msvr4\-struct-return ! \&\-mabi=altivec \-mabi=no-altivec ! \&\-mprototype \-mno-prototype ! \&\-msim \-mmvme \-mads \-myellowknife \-memb \-msdata ! \&\-msdata=\fR\fIopt\fR \fB\-mvxworks \-G\fR \fInum\fR \fB\-pthread\fR .Sp ! \&\fI\s-1RT\s0 Options\fR .Sp ! \&\fB\-mcall-lib-mul \-mfp-arg-in-fpregs \-mfp-arg-in-gregs ! \&\-mfull-fp-blocks \-mhc-struct-return \-min-line-mul ! \&\-mminimum-fp-blocks \-mnohc-struct-return\fR .Sp ! \&\fI\s-1MIPS\s0 Options\fR .Sp ! \&\fB\-mabicalls \-march=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu=type\fR ! \&\fB\-mcpu=\fR\fIcpu-type\fR \fB\-membedded-data \-muninit-const-in-rodata ! \&\-membedded-pic \-mfp32 \-mfp64 \-mfused-madd \-mno-fused-madd \&\-mgas \-mgp32 \-mgp64 ! \&\-mgpopt \-mhalf-pic \-mhard-float \-mint64 \-mips1 ! \&\-mips2 \-mips3 \-mips4 \-mlong64 \-mlong32 \-mlong-calls \-mmemcpy ! \&\-mmips-as \-mmips-tfile \-mno-abicalls ! \&\-mno-embedded-data \-mno-uninit-const-in-rodata ! \&\-mno-embedded-pic \-mno-gpopt \-mno-long-calls ! \&\-mno-memcpy \-mno-mips-tfile \-mno-rnames \-mno-stats ! \&\-mrnames \-msoft-float ! \&\-m4650 \-msingle-float \-mmad \&\-mstats \-EL \-EB \-G\fR \fInum\fR \fB\-nocpp \&\-mabi=32 \-mabi=n32 \-mabi=64 \-mabi=eabi ! \&\-mfix7000 \-mno-crt0 \-mflush-func=\fR\fIfunc\fR \fB\-mno-flush-func\fR .Sp \&\fIi386 and x86\-64 Options\fR ! .Sp ! \&\fB\-mcpu=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR \fB\-mfpmath=\fR\fIunit\fR ! \&\fB\-masm=\fR\fIdialect\fR \fB\-mno-fancy-math-387 ! \&\-mno-fp-ret-in-387 \-msoft-float \-msvr3\-shlib ! \&\-mno-wide-multiply \-mrtd \-malign-double ! \&\-mpreferred-stack-boundary=\fR\fInum\fR ! \&\fB\-mmmx \-msse \-msse2 \-m3dnow ! \&\-mthreads \-mno-align-stringops \-minline-all-stringops ! \&\-mpush-args \-maccumulate-outgoing-args \-m128bit-long-double ! \&\-m96bit-long-double \-mregparm=\fR\fInum\fR \fB\-momit-leaf-frame-pointer ! \&\-mno-red-zone \&\-mcmodel=\fR\fIcode-model\fR ! \&\fB\-m32 \-m64\fR .Sp \&\fI\s-1HPPA\s0 Options\fR - .Sp \&\fB\-march=\fR\fIarchitecture-type\fR ! \&\fB\-mbig-switch \-mdisable-fpregs \-mdisable-indexing ! \&\-mfast-indirect-calls \-mgas \-mjump-in-delay ! \&\-mlong-load-store \-mno-big-switch \-mno-disable-fpregs ! \&\-mno-disable-indexing \-mno-fast-indirect-calls \-mno-gas ! \&\-mno-jump-in-delay \-mno-long-load-store ! \&\-mno-portable-runtime \-mno-soft-float ! \&\-mno-space-regs \-msoft-float \-mpa-risc-1\-0 ! \&\-mpa-risc-1\-1 \-mpa-risc-2\-0 \-mportable-runtime ! \&\-mschedule=\fR\fIcpu-type\fR \fB\-mspace-regs\fR .Sp \&\fIIntel 960 Options\fR ! .Sp ! \&\fB\-m\fR\fIcpu-type\fR \fB\-masm-compat \-mclean-linkage ! \&\-mcode-align \-mcomplex-addr \-mleaf-procedures ! \&\-mic-compat \-mic2.0\-compat \-mic3.0\-compat ! \&\-mintel-asm \-mno-clean-linkage \-mno-code-align ! \&\-mno-complex-addr \-mno-leaf-procedures ! \&\-mno-old-align \-mno-strict-align \-mno-tail-call ! \&\-mnumerics \-mold-align \-msoft-float \-mstrict-align ! \&\-mtail-call\fR .Sp \&\fI\s-1DEC\s0 Alpha Options\fR ! .Sp ! \&\fB\-mno-fp-regs \-msoft-float \-malpha-as \-mgas ! \&\-mieee \-mieee-with-inexact \-mieee-conformant ! \&\-mfp-trap-mode=\fR\fImode\fR \fB\-mfp-rounding-mode=\fR\fImode\fR ! \&\fB\-mtrap-precision=\fR\fImode\fR \fB\-mbuild-constants \&\-mcpu=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu-type\fR \&\fB\-mbwx \-mmax \-mfix \-mcix ! \&\-mfloat-vax \-mfloat-ieee ! \&\-mexplicit-relocs \-msmall-data \-mlarge-data ! \&\-mmemory-latency=\fR\fItime\fR .Sp \&\fI\s-1DEC\s0 Alpha/VMS Options\fR ! .Sp ! \&\fB\-mvms-return-codes\fR ! .Sp ! \&\fIClipper Options\fR ! .Sp ! \&\fB\-mc300 \-mc400\fR .Sp \&\fIH8/300 Options\fR ! .Sp ! \&\fB\-mrelax \-mh \-ms \-mint32 \-malign-300\fR .Sp \&\fI\s-1SH\s0 Options\fR - .Sp \&\fB\-m1 \-m2 \-m3 \-m3e ! \&\-m4\-nofpu \-m4\-single-only \-m4\-single \-m4 ! \&\-m5\-64media \-m5\-64media-nofpu ! \&\-m5\-32media \-m5\-32media-nofpu ! \&\-m5\-compact \-m5\-compact-nofpu \&\-mb \-ml \-mdalign \-mrelax \&\-mbigtable \-mfmovd \-mhitachi \-mnomacsave \&\-mieee \-misize \-mpadstruct \-mspace \&\-mprefergot \-musermode\fR .Sp \&\fISystem V Options\fR - .Sp \&\fB\-Qy \-Qn \-YP,\fR\fIpaths\fR \fB\-Ym,\fR\fIdir\fR .Sp \&\fI\s-1ARC\s0 Options\fR - .Sp \&\fB\-EB \-EL ! \&\-mmangle-cpu \-mcpu=\fR\fIcpu\fR \fB\-mtext=\fR\fItext-section\fR \&\fB\-mdata=\fR\fIdata-section\fR \fB\-mrodata=\fR\fIreadonly-data-section\fR .Sp \&\fITMS320C3x/C4x Options\fR - .Sp \&\fB\-mcpu=\fR\fIcpu\fR \fB\-mbig \-msmall \-mregparm \-mmemparm ! \&\-mfast-fix \-mmpyi \-mbk \-mti \-mdp-isr-reload ! \&\-mrpts=\fR\fIcount\fR \fB\-mrptb \-mdb \-mloop-unsigned ! \&\-mparallel-insns \-mparallel-mpy \-mpreserve-float\fR .Sp \&\fIV850 Options\fR ! .Sp ! \&\fB\-mlong-calls \-mno-long-calls \-mep \-mno-ep ! \&\-mprolog-function \-mno-prolog-function \-mspace \&\-mtda=\fR\fIn\fR \fB\-msda=\fR\fIn\fR \fB\-mzda=\fR\fIn\fR ! \&\fB\-mv850 \-mbig-switch\fR .Sp \&\fI\s-1NS32K\s0 Options\fR - .Sp \&\fB\-m32032 \-m32332 \-m32532 \-m32081 \-m32381 ! \&\-mmult-add \-mnomult-add \-msoft-float \-mrtd \-mnortd \&\-mregparam \-mnoregparam \-msb \-mnosb \&\-mbitfield \-mnobitfield \-mhimem \-mnohimem\fR .Sp \&\fI\s-1AVR\s0 Options\fR ! .Sp ! \&\fB\-mmcu=\fR\fImcu\fR \fB\-msize \-minit-stack=\fR\fIn\fR \fB\-mno-interrupts ! \&\-mcall-prologues \-mno-tablejump \-mtiny-stack\fR .Sp \&\fIMCore Options\fR ! .Sp ! \&\fB\-mhardlit \-mno-hardlit \-mdiv \-mno-div \-mrelax-immediates ! \&\-mno-relax-immediates \-mwide-bitfields \-mno-wide-bitfields ! \&\-m4byte-functions \-mno-4byte-functions \-mcallgraph-data ! \&\-mno-callgraph-data \-mslow-bytes \-mno-slow-bytes \-mno-lsim ! \&\-mlittle-endian \-mbig-endian \-m210 \-m340 \-mstack-increment\fR .Sp \&\fI\s-1MMIX\s0 Options\fR .Sp ! \&\fB\-mlibfuncs \-mno-libfuncs \-mepsilon \-mno-epsilon \-mabi=gnu ! \&\-mabi=mmixware \-mzero-extend \-mknuthdiv \-mtoplevel-symbols ! \&\-melf \-mbranch-predict \-mno-branch-predict \-mbase-addresses ! \&\-mno-base-addresses\fR ! .Sp ! \&\fI\s-1IA-64\s0 Options\fR ! .Sp ! \&\fB\-mbig-endian \-mlittle-endian \-mgnu-as \-mgnu-ld \-mno-pic ! \&\-mvolatile-asm-stop \-mb-step \-mregister-names \-mno-sdata ! \&\-mconstant-gp \-mauto-pic \-minline-divide-min-latency ! \&\-minline-divide-max-throughput \-mno-dwarf2\-asm ! \&\-mfixed-range=\fR\fIregister-range\fR .Sp \&\fID30V Options\fR ! .Sp ! \&\fB\-mextmem \-mextmemory \-monchip \-mno-asm-optimize ! \&\-masm-optimize \-mbranch-cost=\fR\fIn\fR \fB\-mcond-exec=\fR\fIn\fR .Sp \&\fIS/390 and zSeries Options\fR ! .Sp ! \&\fB\-mhard-float \-msoft-float \-mbackchain \-mno-backchain ! \&\-msmall-exec \-mno-small-exec \-mmvcle \-mno-mvcle ! \&\-m64 \-m31 \-mdebug \-mno-debug\fR .Sp \&\fI\s-1CRIS\s0 Options\fR .Sp ! \&\fB\-mcpu=\fR\fIcpu\fR \fB\-march=\fR\fIcpu\fR \fB\-mtune=\fR\fIcpu\fR ! \&\fB\-mmax-stack-frame=\fR\fIn\fR \fB\-melinux-stacksize=\fR\fIn\fR ! \&\fB\-metrax4 \-metrax100 \-mpdebug \-mcc-init \-mno-side-effects ! \&\-mstack-align \-mdata-align \-mconst-align ! \&\-m32\-bit \-m16\-bit \-m8\-bit \-mno-prologue-epilogue \-mno-gotplt ! \&\-melf \-maout \-melinux \-mlinux \-sim \-sim2\fR ! .Sp ! \&\fI\s-1PDP-11\s0 Options\fR ! .Sp ! \&\fB\-mfpu \-msoft-float \-mac0 \-mno-ac0 \-m40 \-m45 \-m10 ! \&\-mbcopy \-mbcopy-builtin \-mint32 \-mno-int16 ! \&\-mint16 \-mno-int32 \-mfloat32 \-mno-float64 ! \&\-mfloat64 \-mno-float32 \-mabshi \-mno-abshi ! \&\-mbranch-expensive \-mbranch-cheap ! \&\-msplit \-mno-split \-munix-asm \-mdec-asm\fR .Sp \&\fIXstormy16 Options\fR - .Sp \&\fB\-msim\fR .Sp \&\fIXtensa Options\fR .Sp ! \&\fB\-mbig-endian \-mlittle-endian ! \&\-mdensity \-mno-density ! \&\-mmac16 \-mno-mac16 ! \&\-mmul16 \-mno-mul16 ! \&\-mmul32 \-mno-mul32 ! \&\-mnsa \-mno-nsa ! \&\-mminmax \-mno-minmax ! \&\-msext \-mno-sext ! \&\-mbooleans \-mno-booleans ! \&\-mhard-float \-msoft-float ! \&\-mfused-madd \-mno-fused-madd ! \&\-mserialize-volatile \-mno-serialize-volatile ! \&\-mtext-section-literals \-mno-text-section-literals ! \&\-mtarget-align \-mno-target-align ! \&\-mlongcalls \-mno-longcalls\fR ! .Ip "\fICode Generation Options\fR" 4 .IX Item "Code Generation Options" ! \&\fB\-fcall-saved-\fR\fIreg\fR \fB\-fcall-used-\fR\fIreg\fR ! \&\fB\-ffixed-\fR\fIreg\fR \fB\-fexceptions ! \&\-fnon-call-exceptions \-funwind-tables ! \&\-fasynchronous-unwind-tables ! \&\-finhibit-size-directive \-finstrument-functions ! \&\-fno-common \-fno-ident \-fno-gnu-linker ! \&\-fpcc-struct-return \-fpic \-fPIC ! \&\-freg-struct-return \-fshared-data \-fshort-enums ! \&\-fshort-double \-fshort-wchar \-fvolatile ! \&\-fvolatile-global \-fvolatile-static ! \&\-fverbose-asm \-fpack-struct \-fstack-check ! \&\-fstack-limit-register=\fR\fIreg\fR \fB\-fstack-limit-symbol=\fR\fIsym\fR ! \&\fB\-fargument-alias \-fargument-noalias ! \&\-fargument-noalias-global \-fleading-underscore\fR .Sh "Options Controlling the Kind of Output" .IX Subsection "Options Controlling the Kind of Output" Compilation can involve up to four stages: preprocessing, compilation --- 320,684 ---- \&\fB\-iwithprefixbefore\fR \fIdir\fR \fB\-isystem\fR \fIdir\fR \&\fB\-M \-MM \-MF \-MG \-MP \-MQ \-MT \-nostdinc \-P \-remap \&\-trigraphs \-undef \-U\fR\fImacro\fR \fB\-Wp,\fR\fIoption\fR ! .IP "\fIAssembler Option\fR" 4 .IX Item "Assembler Option" \&\fB\-Wa,\fR\fIoption\fR ! .IP "\fILinker Options\fR" 4 .IX Item "Linker Options" ! \&\fIobject-file-name\fR \fB\-l\fR\fIlibrary\fR \&\fB\-nostartfiles \-nodefaultlibs \-nostdlib ! \&\-s \-static \-static\-libgcc \-shared \-shared\-libgcc \-symbolic \&\-Wl,\fR\fIoption\fR \fB\-Xlinker\fR \fIoption\fR \&\fB\-u\fR \fIsymbol\fR ! .IP "\fIDirectory Options\fR" 4 .IX Item "Directory Options" ! \&\fB\-B\fR\fIprefix\fR \fB\-I\fR\fIdir\fR \fB\-I\- \-L\fR\fIdir\fR \fB\-specs=\fR\fIfile\fR ! .IP "\fITarget Options\fR" 4 .IX Item "Target Options" ! \&\fB\-V\fR \fIversion\fR \fB\-b\fR \fImachine\fR ! .IP "\fIMachine Dependent Options\fR" 4 .IX Item "Machine Dependent Options" \&\fIM680x0 Options\fR \&\fB\-m68000 \-m68020 \-m68020\-40 \-m68020\-60 \-m68030 \-m68040 \&\-m68060 \-mcpu32 \-m5200 \-m68881 \-mbitfield \-mc68000 \-mc68020 ! \&\-mfpa \-mnobitfield \-mrtd \-mshort \-msoft\-float \-mpcrel ! \&\-malign\-int \-mstrict\-align\fR .Sp \&\fIM68hc1x Options\fR ! \&\fB\-m6811 \-m6812 \-m68hc11 \-m68hc12 \-m68hcs12 ! \&\-mauto\-incdec \-minmax \-mlong\-calls \-mshort ! \&\-msoft\-reg\-count=\fR\fIcount\fR .Sp \&\fI\s-1VAX\s0 Options\fR \&\fB\-mg \-mgnu \-munix\fR .Sp \&\fI\s-1SPARC\s0 Options\fR \&\fB\-mcpu=\fR\fIcpu-type\fR \&\fB\-mtune=\fR\fIcpu-type\fR \&\fB\-mcmodel=\fR\fIcode-model\fR \&\fB\-m32 \-m64 ! \&\-mapp\-regs \-mbroken\-saverestore \-mcypress ! \&\-mfaster\-structs \-mflat ! \&\-mfpu \-mhard\-float \-mhard\-quad\-float ! \&\-mimpure\-text \-mlive\-g0 \-mno\-app\-regs ! \&\-mno\-faster\-structs \-mno\-flat \-mno\-fpu ! \&\-mno\-impure\-text \-mno\-stack\-bias \-mno\-unaligned\-doubles ! \&\-msoft\-float \-msoft\-quad\-float \-msparclite \-mstack\-bias ! \&\-msupersparc \-munaligned\-doubles \-mv8\fR .Sp \&\fI\s-1ARM\s0 Options\fR ! \&\fB\-mapcs\-frame \-mno\-apcs\-frame ! \&\-mapcs\-26 \-mapcs\-32 ! \&\-mapcs\-stack\-check \-mno\-apcs\-stack\-check ! \&\-mapcs\-float \-mno\-apcs\-float ! \&\-mapcs\-reentrant \-mno\-apcs\-reentrant ! \&\-msched\-prolog \-mno\-sched\-prolog ! \&\-mlittle\-endian \-mbig\-endian \-mwords\-little\-endian ! \&\-malignment\-traps \-mno\-alignment\-traps ! \&\-msoft\-float \-mhard\-float \-mfpe ! \&\-mthumb\-interwork \-mno\-thumb\-interwork \&\-mcpu=\fR\fIname\fR \fB\-march=\fR\fIname\fR \fB\-mfpe=\fR\fIname\fR ! \&\fB\-mstructure\-size\-boundary=\fR\fIn\fR ! \&\fB\-mabort\-on\-noreturn ! \&\-mlong\-calls \-mno\-long\-calls ! \&\-msingle\-pic\-base \-mno\-single\-pic\-base ! \&\-mpic\-register=\fR\fIreg\fR ! \&\fB\-mnop\-fun\-dllimport ! \&\-mpoke\-function\-name \&\-mthumb \-marm ! \&\-mtpcs\-frame \-mtpcs\-leaf\-frame ! \&\-mcaller\-super\-interworking \-mcallee\-super\-interworking\fR .Sp \&\fI\s-1MN10200\s0 Options\fR \&\fB\-mrelax\fR .Sp \&\fI\s-1MN10300\s0 Options\fR ! \&\fB\-mmult\-bug \-mno\-mult\-bug ! \&\-mam33 \-mno\-am33 ! \&\-mno\-crt0 \-mrelax\fR .Sp \&\fIM32R/D Options\fR ! \&\fB\-m32rx \-m32r \-mcode\-model=\fR\fImodel-type\fR ! \&\fB\-msdata=\fR\fIsdata-type\fR \fB\-G\fR \fInum\fR .Sp \&\fIM88K Options\fR ! \&\fB\-m88000 \-m88100 \-m88110 \-mbig\-pic ! \&\-mcheck\-zero\-division \-mhandle\-large\-shift ! \&\-midentify\-revision \-mno\-check\-zero\-division ! \&\-mno\-ocs\-debug\-info \-mno\-ocs\-frame\-position ! \&\-mno\-optimize\-arg\-area \-mno\-serialize\-volatile ! \&\-mno\-underscores \-mocs\-debug\-info ! \&\-mocs\-frame\-position \-moptimize\-arg\-area ! \&\-mserialize\-volatile \-mshort\-data\-\fR\fInum\fR \fB\-msvr3 ! \&\-msvr4 \-mtrap\-large\-shift \-muse\-div\-instruction ! \&\-mversion\-03.00 \-mwarn\-passed\-structs\fR .Sp \&\fI\s-1RS/6000\s0 and PowerPC Options\fR \&\fB\-mcpu=\fR\fIcpu-type\fR \&\fB\-mtune=\fR\fIcpu-type\fR ! \&\fB\-mpower \-mno\-power \-mpower2 \-mno\-power2 ! \&\-mpowerpc \-mpowerpc64 \-mno\-powerpc ! \&\-maltivec \-mno\-altivec ! \&\-mpowerpc\-gpopt \-mno\-powerpc\-gpopt ! \&\-mpowerpc\-gfxopt \-mno\-powerpc\-gfxopt ! \&\-mnew\-mnemonics \-mold\-mnemonics ! \&\-mfull\-toc \-mminimal\-toc \-mno\-fp\-in\-toc \-mno\-sum\-in\-toc ! \&\-m64 \-m32 \-mxl\-call \-mno\-xl\-call \-mpe ! \&\-msoft\-float \-mhard\-float \-mmultiple \-mno\-multiple ! \&\-mstring \-mno\-string \-mupdate \-mno\-update ! \&\-mfused\-madd \-mno\-fused\-madd \-mbit\-align \-mno\-bit\-align ! \&\-mstrict\-align \-mno\-strict\-align \-mrelocatable ! \&\-mno\-relocatable \-mrelocatable\-lib \-mno\-relocatable\-lib ! \&\-mtoc \-mno\-toc \-mlittle \-mlittle\-endian \-mbig \-mbig\-endian ! \&\-mcall\-aix \-mcall\-sysv \-mcall\-netbsd ! \&\-maix\-struct\-return \-msvr4\-struct\-return ! \&\-mabi=altivec \-mabi=no\-altivec ! \&\-mabi=spe \-mabi=no\-spe ! \&\-misel=yes \-misel=no ! \&\-mprototype \-mno\-prototype ! \&\-msim \-mmvme \-mads \-myellowknife \-memb \-msdata ! \&\-msdata=\fR\fIopt\fR \fB\-mvxworks \-mwindiss \-G\fR \fInum\fR \fB\-pthread\fR .Sp ! \&\fIDarwin Options\fR .Sp ! \&\fB\-all_load \-allowable_client \-arch \-arch_errors_fatal ! \&\-arch_only \-bind_at_load \-bundle \-bundle_loader ! \&\-client_name \-compatibility_version \-current_version ! \&\-dependency\-file \-dylib_file \-dylinker_install_name ! \&\-dynamic \-dynamiclib \-exported_symbols_list ! \&\-filelist \-flat_namespace \-force_cpusubtype_ALL ! \&\-force_flat_namespace \-headerpad_max_install_names ! \&\-image_base \-init \-install_name \-keep_private_externs ! \&\-multi_module \-multiply_defined \-multiply_defined_unused ! \&\-noall_load \-nomultidefs \-noprebind \-noseglinkedit ! \&\-pagezero_size \-prebind \-prebind_all_twolevel_modules ! \&\-private_bundle \-read_only_relocs \-sectalign ! \&\-sectobjectsymbols \-whyload \-seg1addr ! \&\-sectcreate \-sectobjectsymbols \-sectorder ! \&\-seg_addr_table \-seg_addr_table_filename \-seglinkedit ! \&\-segprot \-segs_read_only_addr \-segs_read_write_addr ! \&\-single_module \-static \-sub_library \-sub_umbrella ! \&\-twolevel_namespace \-umbrella \-undefined ! \&\-unexported_symbols_list \-weak_reference_mismatches \-whatsloaded\fR .Sp ! \&\fI\s-1RT\s0 Options\fR ! \&\fB\-mcall\-lib\-mul \-mfp\-arg\-in\-fpregs \-mfp\-arg\-in\-gregs ! \&\-mfull\-fp\-blocks \-mhc\-struct\-return \-min\-line\-mul ! \&\-mminimum\-fp\-blocks \-mnohc\-struct\-return\fR .Sp ! \&\fI\s-1MIPS\s0 Options\fR ! \&\fB\-mabicalls \-march=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu=type\fR ! \&\fB\-mcpu=\fR\fIcpu-type\fR \fB\-membedded\-data \-muninit\-const\-in\-rodata ! \&\-membedded\-pic \-mfp32 \-mfp64 \-mfused\-madd \-mno\-fused\-madd \&\-mgas \-mgp32 \-mgp64 ! \&\-mgpopt \-mhalf\-pic \-mhard\-float \-mint64 \-mips1 ! \&\-mips2 \-mips3 \-mips4 \-mlong64 \-mlong32 \-mlong\-calls \-mmemcpy ! \&\-mmips\-as \-mmips\-tfile \-mno\-abicalls ! \&\-mno\-embedded\-data \-mno\-uninit\-const\-in\-rodata ! \&\-mno\-embedded\-pic \-mno\-gpopt \-mno\-long\-calls ! \&\-mno\-memcpy \-mno\-mips\-tfile \-mno\-rnames \-mno\-stats ! \&\-mrnames \-msoft\-float ! \&\-m4650 \-msingle\-float \-mmad \&\-mstats \-EL \-EB \-G\fR \fInum\fR \fB\-nocpp \&\-mabi=32 \-mabi=n32 \-mabi=64 \-mabi=eabi ! \&\-mfix7000 \-mno\-crt0 \-mflush\-func=\fR\fIfunc\fR \fB\-mno\-flush\-func ! \&\-mbranch\-likely \-mno\-branch\-likely\fR .Sp \&\fIi386 and x86\-64 Options\fR ! \&\fB\-mcpu=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR ! \&\fB\-mfpmath=\fR\fIunit\fR \fB\-masm=\fR\fIdialect\fR \fB\-mno\-fancy\-math\-387 ! \&\-mno\-fp\-ret\-in\-387 \-msoft\-float \-msvr3\-shlib ! \&\-mno\-wide\-multiply \-mrtd \-malign\-double ! \&\-mpreferred\-stack\-boundary=\fR\fInum\fR ! \&\fB\-mmmx \-msse \-msse2 \-m3dnow ! \&\-mthreads \-mno\-align\-stringops \-minline\-all\-stringops ! \&\-mpush\-args \-maccumulate\-outgoing\-args \-m128bit\-long\-double ! \&\-m96bit\-long\-double \-mregparm=\fR\fInum\fR \fB\-momit\-leaf\-frame\-pointer ! \&\-mno\-red\-zone \&\-mcmodel=\fR\fIcode-model\fR ! \&\fB\-m32 \-m64\fR .Sp \&\fI\s-1HPPA\s0 Options\fR \&\fB\-march=\fR\fIarchitecture-type\fR ! \&\fB\-mbig\-switch \-mdisable\-fpregs \-mdisable\-indexing ! \&\-mfast\-indirect\-calls \-mgas \-mgnu\-ld \-mhp\-ld ! \&\-mjump\-in\-delay \-mlinker\-opt \-mlong\-calls ! \&\-mlong\-load\-store \-mno\-big\-switch \-mno\-disable\-fpregs ! \&\-mno\-disable\-indexing \-mno\-fast\-indirect\-calls \-mno\-gas ! \&\-mno\-jump\-in\-delay \-mno\-long\-load\-store ! \&\-mno\-portable\-runtime \-mno\-soft\-float ! \&\-mno\-space\-regs \-msoft\-float \-mpa\-risc\-1\-0 ! \&\-mpa\-risc\-1\-1 \-mpa\-risc\-2\-0 \-mportable\-runtime ! \&\-mschedule=\fR\fIcpu-type\fR \fB\-mspace\-regs \-msio \-mwsio ! \&\-nolibdld \-static \-threads\fR .Sp \&\fIIntel 960 Options\fR ! \&\fB\-m\fR\fIcpu-type\fR \fB\-masm\-compat \-mclean\-linkage ! \&\-mcode\-align \-mcomplex\-addr \-mleaf\-procedures ! \&\-mic\-compat \-mic2.0\-compat \-mic3.0\-compat ! \&\-mintel\-asm \-mno\-clean\-linkage \-mno\-code\-align ! \&\-mno\-complex\-addr \-mno\-leaf\-procedures ! \&\-mno\-old\-align \-mno\-strict\-align \-mno\-tail\-call ! \&\-mnumerics \-mold\-align \-msoft\-float \-mstrict\-align ! \&\-mtail\-call\fR .Sp \&\fI\s-1DEC\s0 Alpha Options\fR ! \&\fB\-mno\-fp\-regs \-msoft\-float \-malpha\-as \-mgas ! \&\-mieee \-mieee\-with\-inexact \-mieee\-conformant ! \&\-mfp\-trap\-mode=\fR\fImode\fR \fB\-mfp\-rounding\-mode=\fR\fImode\fR ! \&\fB\-mtrap\-precision=\fR\fImode\fR \fB\-mbuild\-constants \&\-mcpu=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu-type\fR \&\fB\-mbwx \-mmax \-mfix \-mcix ! \&\-mfloat\-vax \-mfloat\-ieee ! \&\-mexplicit\-relocs \-msmall\-data \-mlarge\-data ! \&\-mmemory\-latency=\fR\fItime\fR .Sp \&\fI\s-1DEC\s0 Alpha/VMS Options\fR ! \&\fB\-mvms\-return\-codes\fR .Sp \&\fIH8/300 Options\fR ! \&\fB\-mrelax \-mh \-ms \-mn \-mint32 \-malign\-300\fR .Sp \&\fI\s-1SH\s0 Options\fR \&\fB\-m1 \-m2 \-m3 \-m3e ! \&\-m4\-nofpu \-m4\-single\-only \-m4\-single \-m4 ! \&\-m5\-64media \-m5\-64media\-nofpu ! \&\-m5\-32media \-m5\-32media\-nofpu ! \&\-m5\-compact \-m5\-compact\-nofpu \&\-mb \-ml \-mdalign \-mrelax \&\-mbigtable \-mfmovd \-mhitachi \-mnomacsave \&\-mieee \-misize \-mpadstruct \-mspace \&\-mprefergot \-musermode\fR .Sp \&\fISystem V Options\fR \&\fB\-Qy \-Qn \-YP,\fR\fIpaths\fR \fB\-Ym,\fR\fIdir\fR .Sp \&\fI\s-1ARC\s0 Options\fR \&\fB\-EB \-EL ! \&\-mmangle\-cpu \-mcpu=\fR\fIcpu\fR \fB\-mtext=\fR\fItext-section\fR \&\fB\-mdata=\fR\fIdata-section\fR \fB\-mrodata=\fR\fIreadonly-data-section\fR .Sp \&\fITMS320C3x/C4x Options\fR \&\fB\-mcpu=\fR\fIcpu\fR \fB\-mbig \-msmall \-mregparm \-mmemparm ! \&\-mfast\-fix \-mmpyi \-mbk \-mti \-mdp\-isr\-reload ! \&\-mrpts=\fR\fIcount\fR \fB\-mrptb \-mdb \-mloop\-unsigned ! \&\-mparallel\-insns \-mparallel\-mpy \-mpreserve\-float\fR .Sp \&\fIV850 Options\fR ! \&\fB\-mlong\-calls \-mno\-long\-calls \-mep \-mno\-ep ! \&\-mprolog\-function \-mno\-prolog\-function \-mspace \&\-mtda=\fR\fIn\fR \fB\-msda=\fR\fIn\fR \fB\-mzda=\fR\fIn\fR ! \&\fB\-mapp\-regs \-mno\-app\-regs ! \&\-mdisable\-callt \-mno\-disable\-callt ! \&\-mv850e ! \&\-mv850 \-mbig\-switch\fR .Sp \&\fI\s-1NS32K\s0 Options\fR \&\fB\-m32032 \-m32332 \-m32532 \-m32081 \-m32381 ! \&\-mmult\-add \-mnomult\-add \-msoft\-float \-mrtd \-mnortd \&\-mregparam \-mnoregparam \-msb \-mnosb \&\-mbitfield \-mnobitfield \-mhimem \-mnohimem\fR .Sp \&\fI\s-1AVR\s0 Options\fR ! \&\fB\-mmcu=\fR\fImcu\fR \fB\-msize \-minit\-stack=\fR\fIn\fR \fB\-mno\-interrupts ! \&\-mcall\-prologues \-mno\-tablejump \-mtiny\-stack\fR .Sp \&\fIMCore Options\fR ! \&\fB\-mhardlit \-mno\-hardlit \-mdiv \-mno\-div \-mrelax\-immediates ! \&\-mno\-relax\-immediates \-mwide\-bitfields \-mno\-wide\-bitfields ! \&\-m4byte\-functions \-mno\-4byte\-functions \-mcallgraph\-data ! \&\-mno\-callgraph\-data \-mslow\-bytes \-mno\-slow\-bytes \-mno\-lsim ! \&\-mlittle\-endian \-mbig\-endian \-m210 \-m340 \-mstack\-increment\fR .Sp \&\fI\s-1MMIX\s0 Options\fR + \&\fB\-mlibfuncs \-mno\-libfuncs \-mepsilon \-mno\-epsilon \-mabi=gnu + \&\-mabi=mmixware \-mzero\-extend \-mknuthdiv \-mtoplevel\-symbols + \&\-melf \-mbranch\-predict \-mno\-branch\-predict \-mbase\-addresses + \&\-mno\-base\-addresses \-msingle\-exit \-mno\-single\-exit\fR .Sp ! \&\fI\s-1IA\-64\s0 Options\fR ! \&\fB\-mbig\-endian \-mlittle\-endian \-mgnu\-as \-mgnu\-ld \-mno\-pic ! \&\-mvolatile\-asm\-stop \-mb\-step \-mregister\-names \-mno\-sdata ! \&\-mconstant\-gp \-mauto\-pic \-minline\-float\-divide\-min\-latency ! \&\-minline\-float\-divide\-max\-throughput ! \&\-minline\-int\-divide\-min\-latency ! \&\-minline\-int\-divide\-max\-throughput \-mno\-dwarf2\-asm ! \&\-mfixed\-range=\fR\fIregister-range\fR .Sp \&\fID30V Options\fR ! \&\fB\-mextmem \-mextmemory \-monchip \-mno\-asm\-optimize ! \&\-masm\-optimize \-mbranch\-cost=\fR\fIn\fR \fB\-mcond\-exec=\fR\fIn\fR .Sp \&\fIS/390 and zSeries Options\fR ! \&\fB\-mhard\-float \-msoft\-float \-mbackchain \-mno\-backchain ! \&\-msmall\-exec \-mno\-small\-exec \-mmvcle \-mno\-mvcle ! \&\-m64 \-m31 \-mdebug \-mno\-debug\fR .Sp \&\fI\s-1CRIS\s0 Options\fR + \&\fB\-mcpu=\fR\fIcpu\fR \fB\-march=\fR\fIcpu\fR \fB\-mtune=\fR\fIcpu\fR + \&\fB\-mmax\-stack\-frame=\fR\fIn\fR \fB\-melinux\-stacksize=\fR\fIn\fR + \&\fB\-metrax4 \-metrax100 \-mpdebug \-mcc\-init \-mno\-side\-effects + \&\-mstack\-align \-mdata\-align \-mconst\-align + \&\-m32\-bit \-m16\-bit \-m8\-bit \-mno\-prologue\-epilogue \-mno\-gotplt + \&\-melf \-maout \-melinux \-mlinux \-sim \-sim2\fR .Sp ! \&\fI\s-1PDP\-11\s0 Options\fR ! \&\fB\-mfpu \-msoft\-float \-mac0 \-mno\-ac0 \-m40 \-m45 \-m10 ! \&\-mbcopy \-mbcopy\-builtin \-mint32 \-mno\-int16 ! \&\-mint16 \-mno\-int32 \-mfloat32 \-mno\-float64 ! \&\-mfloat64 \-mno\-float32 \-mabshi \-mno\-abshi ! \&\-mbranch\-expensive \-mbranch\-cheap ! \&\-msplit \-mno\-split \-munix\-asm \-mdec\-asm\fR .Sp \&\fIXstormy16 Options\fR \&\fB\-msim\fR .Sp \&\fIXtensa Options\fR + \&\fB\-mbig\-endian \-mlittle\-endian + \&\-mdensity \-mno\-density + \&\-mmac16 \-mno\-mac16 + \&\-mmul16 \-mno\-mul16 + \&\-mmul32 \-mno\-mul32 + \&\-mnsa \-mno\-nsa + \&\-mminmax \-mno\-minmax + \&\-msext \-mno\-sext + \&\-mbooleans \-mno\-booleans + \&\-mhard\-float \-msoft\-float + \&\-mfused\-madd \-mno\-fused\-madd + \&\-mserialize\-volatile \-mno\-serialize\-volatile + \&\-mtext\-section\-literals \-mno\-text\-section\-literals + \&\-mtarget\-align \-mno\-target\-align + \&\-mlongcalls \-mno\-longcalls\fR .Sp ! \&\fI\s-1FRV\s0 Options\fR ! \&\fB\-mgpr\-32 \-mgpr\-64 \-mfpr\-32 \-mfpr\-64 ! \&\-mhard\-float \-msoft\-float \-malloc\-cc \-mfixed\-cc ! \&\-mdword \-mno\-dword \-mdouble \-mno\-double ! \&\-mmedia \-mno\-media \-mmuladd \-mno\-muladd \-mlibrary\-pic ! \&\-macc\-4 \-macc\-8 \-mpack \-mno\-pack \-mno\-eflags ! \&\-mcond\-move \-mno\-cond\-move \-mscc \-mno\-scc ! \&\-mcond\-exec \-mno\-cond\-exec \-mvliw\-branch \-mno\-vliw\-branch ! \&\-mmulti\-cond\-exec \-mno\-multi\-cond\-exec \-mnested\-cond\-exec ! \&\-mno\-nested\-cond\-exec \-mtomcat\-stats ! \&\-mcpu=\fR\fIcpu\fR ! .IP "\fICode Generation Options\fR" 4 .IX Item "Code Generation Options" ! \&\fB\-fcall\-saved\-\fR\fIreg\fR \fB\-fcall\-used\-\fR\fIreg\fR ! \&\fB\-ffixed\-\fR\fIreg\fR \fB\-fexceptions ! \&\-fnon\-call\-exceptions \-funwind\-tables ! \&\-fasynchronous\-unwind\-tables ! \&\-finhibit\-size\-directive \-finstrument\-functions ! \&\-fno\-common \-fno\-ident \-fno\-gnu\-linker ! \&\-fpcc\-struct\-return \-fpic \-fPIC ! \&\-freg\-struct\-return \-fshared\-data \-fshort\-enums ! \&\-fshort\-double \-fshort\-wchar \-fvolatile ! \&\-fvolatile\-global \-fvolatile\-static ! \&\-fverbose\-asm \-fpack\-struct \-fstack\-check ! \&\-fstack\-limit\-register=\fR\fIreg\fR \fB\-fstack\-limit\-symbol=\fR\fIsym\fR ! \&\fB\-fargument\-alias \-fargument\-noalias ! \&\-fargument\-noalias\-global \-fleading\-underscore ! \&\-ftls\-model=\fR\fImodel\fR ! \&\fB\-ftrapv \-fbounds\-check\fR .Sh "Options Controlling the Kind of Output" .IX Subsection "Options Controlling the Kind of Output" Compilation can involve up to four stages: preprocessing, compilation *************** compiled, and those specified as input) *** 703,798 **** .PP For any given input file, the file name suffix determines what kind of compilation is done: ! .Ip "\fIfile\fR\fB.c\fR" 4 .IX Item "file.c" C source code which must be preprocessed. ! .Ip "\fIfile\fR\fB.i\fR" 4 .IX Item "file.i" C source code which should not be preprocessed. ! .Ip "\fIfile\fR\fB.ii\fR" 4 .IX Item "file.ii" \&\*(C+ source code which should not be preprocessed. ! .Ip "\fIfile\fR\fB.m\fR" 4 .IX Item "file.m" Objective-C source code. Note that you must link with the library \&\fIlibobjc.a\fR to make an Objective-C program work. ! .Ip "\fIfile\fR\fB.mi\fR" 4 .IX Item "file.mi" Objective-C source code which should not be preprocessed. ! .Ip "\fIfile\fR\fB.h\fR" 4 .IX Item "file.h" C header file (not to be compiled or linked). ! .Ip "\fIfile\fR\fB.cc\fR" 4 .IX Item "file.cc" .PD 0 ! .Ip "\fIfile\fR\fB.cp\fR" 4 .IX Item "file.cp" ! .Ip "\fIfile\fR\fB.cxx\fR" 4 .IX Item "file.cxx" ! .Ip "\fIfile\fR\fB.cpp\fR" 4 .IX Item "file.cpp" ! .Ip "\fIfile\fR\fB.c++\fR" 4 .IX Item "file.c++" ! .Ip "\fIfile\fR\fB.C\fR" 4 .IX Item "file.C" .PD \&\*(C+ source code which must be preprocessed. Note that in \fB.cxx\fR, the last two letters must both be literally \fBx\fR. Likewise, \&\fB.C\fR refers to a literal capital C. ! .Ip "\fIfile\fR\fB.f\fR" 4 .IX Item "file.f" .PD 0 ! .Ip "\fIfile\fR\fB.for\fR" 4 .IX Item "file.for" ! .Ip "\fIfile\fR\fB.FOR\fR" 4 .IX Item "file.FOR" .PD Fortran source code which should not be preprocessed. ! .Ip "\fIfile\fR\fB.F\fR" 4 .IX Item "file.F" .PD 0 ! .Ip "\fIfile\fR\fB.fpp\fR" 4 .IX Item "file.fpp" ! .Ip "\fIfile\fR\fB.FPP\fR" 4 .IX Item "file.FPP" .PD Fortran source code which must be preprocessed (with the traditional preprocessor). ! .Ip "\fIfile\fR\fB.r\fR" 4 .IX Item "file.r" Fortran source code which must be preprocessed with a \s-1RATFOR\s0 preprocessor (not included with \s-1GCC\s0). ! .Ip "\fIfile\fR\fB.ads\fR" 4 .IX Item "file.ads" Ada source code file which contains a library unit declaration (a declaration of a package, subprogram, or generic, or a generic instantiation), or a library unit renaming declaration (a package, generic, or subprogram renaming declaration). Such files are also called \fIspecs\fR. ! .Ip "\fIfile\fR\fB.adb\fR" 4 .IX Item "file.adb" Ada source code file containing a library unit body (a subprogram or package body). Such files are also called \fIbodies\fR. ! .Ip "\fIfile\fR\fB.s\fR" 4 .IX Item "file.s" Assembler code. ! .Ip "\fIfile\fR\fB.S\fR" 4 .IX Item "file.S" Assembler code which must be preprocessed. ! .Ip "\fIother\fR" 4 .IX Item "other" An object file to be fed straight into linking. Any file name with no recognized suffix is treated this way. .PP You can specify the input language explicitly with the \fB\-x\fR option: ! .Ip "\fB\-x\fR \fIlanguage\fR" 4 .IX Item "-x language" Specify explicitly the \fIlanguage\fR for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next \fB\-x\fR option. Possible values for \fIlanguage\fR are: .Sp ! .Vb 7 \& c c-header cpp-output \& c++ c++-cpp-output \& objective-c objc-cpp-output --- 689,784 ---- .PP For any given input file, the file name suffix determines what kind of compilation is done: ! .IP "\fIfile\fR\fB.c\fR" 4 .IX Item "file.c" C source code which must be preprocessed. ! .IP "\fIfile\fR\fB.i\fR" 4 .IX Item "file.i" C source code which should not be preprocessed. ! .IP "\fIfile\fR\fB.ii\fR" 4 .IX Item "file.ii" \&\*(C+ source code which should not be preprocessed. ! .IP "\fIfile\fR\fB.m\fR" 4 .IX Item "file.m" Objective-C source code. Note that you must link with the library \&\fIlibobjc.a\fR to make an Objective-C program work. ! .IP "\fIfile\fR\fB.mi\fR" 4 .IX Item "file.mi" Objective-C source code which should not be preprocessed. ! .IP "\fIfile\fR\fB.h\fR" 4 .IX Item "file.h" C header file (not to be compiled or linked). ! .IP "\fIfile\fR\fB.cc\fR" 4 .IX Item "file.cc" .PD 0 ! .IP "\fIfile\fR\fB.cp\fR" 4 .IX Item "file.cp" ! .IP "\fIfile\fR\fB.cxx\fR" 4 .IX Item "file.cxx" ! .IP "\fIfile\fR\fB.cpp\fR" 4 .IX Item "file.cpp" ! .IP "\fIfile\fR\fB.c++\fR" 4 .IX Item "file.c++" ! .IP "\fIfile\fR\fB.C\fR" 4 .IX Item "file.C" .PD \&\*(C+ source code which must be preprocessed. Note that in \fB.cxx\fR, the last two letters must both be literally \fBx\fR. Likewise, \&\fB.C\fR refers to a literal capital C. ! .IP "\fIfile\fR\fB.f\fR" 4 .IX Item "file.f" .PD 0 ! .IP "\fIfile\fR\fB.for\fR" 4 .IX Item "file.for" ! .IP "\fIfile\fR\fB.FOR\fR" 4 .IX Item "file.FOR" .PD Fortran source code which should not be preprocessed. ! .IP "\fIfile\fR\fB.F\fR" 4 .IX Item "file.F" .PD 0 ! .IP "\fIfile\fR\fB.fpp\fR" 4 .IX Item "file.fpp" ! .IP "\fIfile\fR\fB.FPP\fR" 4 .IX Item "file.FPP" .PD Fortran source code which must be preprocessed (with the traditional preprocessor). ! .IP "\fIfile\fR\fB.r\fR" 4 .IX Item "file.r" Fortran source code which must be preprocessed with a \s-1RATFOR\s0 preprocessor (not included with \s-1GCC\s0). ! .IP "\fIfile\fR\fB.ads\fR" 4 .IX Item "file.ads" Ada source code file which contains a library unit declaration (a declaration of a package, subprogram, or generic, or a generic instantiation), or a library unit renaming declaration (a package, generic, or subprogram renaming declaration). Such files are also called \fIspecs\fR. ! .IP "\fIfile\fR\fB.adb\fR" 4 .IX Item "file.adb" Ada source code file containing a library unit body (a subprogram or package body). Such files are also called \fIbodies\fR. ! .IP "\fIfile\fR\fB.s\fR" 4 .IX Item "file.s" Assembler code. ! .IP "\fIfile\fR\fB.S\fR" 4 .IX Item "file.S" Assembler code which must be preprocessed. ! .IP "\fIother\fR" 4 .IX Item "other" An object file to be fed straight into linking. Any file name with no recognized suffix is treated this way. .PP You can specify the input language explicitly with the \fB\-x\fR option: ! .IP "\fB\-x\fR \fIlanguage\fR" 4 .IX Item "-x language" Specify explicitly the \fIlanguage\fR for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next \fB\-x\fR option. Possible values for \fIlanguage\fR are: .Sp ! .Vb 8 \& c c-header cpp-output \& c++ c++-cpp-output \& objective-c objc-cpp-output *************** the next \fB\-x\fR option. Possible val *** 800,816 **** \& ada \& f77 f77-cpp-input ratfor \& java .Ve ! .Ip "\fB\-x none\fR" 4 .IX Item "-x none" Turn off any specification of a language, so that subsequent files are handled according to their file name suffixes (as they are if \fB\-x\fR has not been used at all). ! .Ip "\fB\-pass-exit-codes\fR" 4 .IX Item "-pass-exit-codes" Normally the \fBgcc\fR program will exit with the code of 1 if any phase of the compiler returns a non-success return code. If you specify ! \&\fB\-pass-exit-codes\fR, the \fBgcc\fR program will instead return with numerically highest error produced by any phase that returned an error indication. .PP --- 786,803 ---- \& ada \& f77 f77-cpp-input ratfor \& java + \& treelang .Ve ! .IP "\fB\-x none\fR" 4 .IX Item "-x none" Turn off any specification of a language, so that subsequent files are handled according to their file name suffixes (as they are if \fB\-x\fR has not been used at all). ! .IP "\fB\-pass\-exit\-codes\fR" 4 .IX Item "-pass-exit-codes" Normally the \fBgcc\fR program will exit with the code of 1 if any phase of the compiler returns a non-success return code. If you specify ! \&\fB\-pass\-exit\-codes\fR, the \fBgcc\fR program will instead return with numerically highest error produced by any phase that returned an error indication. .PP *************** If you only want some of the stages of c *** 819,825 **** one of the options \fB\-c\fR, \fB\-S\fR, or \fB\-E\fR to say where \&\fBgcc\fR is to stop. Note that some combinations (for example, \&\fB\-x cpp-output \-E\fR) instruct \fBgcc\fR to do nothing at all. ! .Ip "\fB\-c\fR" 4 .IX Item "-c" Compile or assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an --- 806,812 ---- one of the options \fB\-c\fR, \fB\-S\fR, or \fB\-E\fR to say where \&\fBgcc\fR is to stop. Note that some combinations (for example, \&\fB\-x cpp-output \-E\fR) instruct \fBgcc\fR to do nothing at all. ! .IP "\fB\-c\fR" 4 .IX Item "-c" Compile or assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an *************** the suffix \fB.c\fR, \fB.i\fR, \fB.s\fR, *** 830,836 **** .Sp Unrecognized input files, not requiring compilation or assembly, are ignored. ! .Ip "\fB\-S\fR" 4 .IX Item "-S" Stop after the stage of compilation proper; do not assemble. The output is in the form of an assembler code file for each non-assembler input --- 817,823 ---- .Sp Unrecognized input files, not requiring compilation or assembly, are ignored. ! .IP "\fB\-S\fR" 4 .IX Item "-S" Stop after the stage of compilation proper; do not assemble. The output is in the form of an assembler code file for each non-assembler input *************** By default, the assembler file name for *** 840,853 **** replacing the suffix \fB.c\fR, \fB.i\fR, etc., with \fB.s\fR. .Sp Input files that don't require compilation are ignored. ! .Ip "\fB\-E\fR" 4 .IX Item "-E" Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output. .Sp Input files which don't require preprocessing are ignored. ! .Ip "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Place output in file \fIfile\fR. This applies regardless to whatever sort of output is being produced, whether it be an executable file, --- 827,840 ---- replacing the suffix \fB.c\fR, \fB.i\fR, etc., with \fB.s\fR. .Sp Input files that don't require compilation are ignored. ! .IP "\fB\-E\fR" 4 .IX Item "-E" Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output. .Sp Input files which don't require preprocessing are ignored. ! .IP "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Place output in file \fIfile\fR. This applies regardless to whatever sort of output is being produced, whether it be an executable file, *************** If \fB\-o\fR is not specified, the defau *** 861,897 **** in \fIa.out\fR, the object file for \fI\fIsource\fI.\fIsuffix\fI\fR in \&\fI\fIsource\fI.o\fR, its assembler file in \fI\fIsource\fI.s\fR, and all preprocessed C source on standard output. ! .Ip "\fB\-v\fR" 4 .IX Item "-v" Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper. ! .Ip "\fB\-###\fR" 4 .IX Item "-###" Like \fB\-v\fR except the commands are not executed and all command arguments are quoted. This is useful for shell scripts to capture the driver-generated command lines. ! .Ip "\fB\-pipe\fR" 4 .IX Item "-pipe" Use pipes rather than temporary files for communication between the various stages of compilation. This fails to work on some systems where the assembler is unable to read from a pipe; but the \s-1GNU\s0 assembler has no trouble. ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print (on the standard output) a description of the command line options understood by \fBgcc\fR. If the \fB\-v\fR option is also specified ! then \fB\*(--help\fR will also be passed on to the various processes invoked by \fBgcc\fR, so that they can display the command line options they accept. If the \fB\-W\fR option is also specified then command line options which have no documentation associated with them will also be displayed. ! .Ip "\fB\*(--target-help\fR" 4 ! .IX Item "target-help" Print (on the standard output) a description of target specific command line options for each tool. ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" Display the version number and copyrights of the invoked \s-1GCC\s0. .Sh "Compiling \*(C+ Programs" .IX Subsection "Compiling Programs" --- 848,884 ---- in \fIa.out\fR, the object file for \fI\fIsource\fI.\fIsuffix\fI\fR in \&\fI\fIsource\fI.o\fR, its assembler file in \fI\fIsource\fI.s\fR, and all preprocessed C source on standard output. ! .IP "\fB\-v\fR" 4 .IX Item "-v" Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper. ! .IP "\fB\-###\fR" 4 .IX Item "-###" Like \fB\-v\fR except the commands are not executed and all command arguments are quoted. This is useful for shell scripts to capture the driver-generated command lines. ! .IP "\fB\-pipe\fR" 4 .IX Item "-pipe" Use pipes rather than temporary files for communication between the various stages of compilation. This fails to work on some systems where the assembler is unable to read from a pipe; but the \s-1GNU\s0 assembler has no trouble. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print (on the standard output) a description of the command line options understood by \fBgcc\fR. If the \fB\-v\fR option is also specified ! then \fB\-\-help\fR will also be passed on to the various processes invoked by \fBgcc\fR, so that they can display the command line options they accept. If the \fB\-W\fR option is also specified then command line options which have no documentation associated with them will also be displayed. ! .IP "\fB\-\-target\-help\fR" 4 ! .IX Item "--target-help" Print (on the standard output) a description of target specific command line options for each tool. ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" Display the version number and copyrights of the invoked \s-1GCC\s0. .Sh "Compiling \*(C+ Programs" .IX Subsection "Compiling Programs" *************** languages; or options that are meaningfu *** 918,931 **** .Sh "Options Controlling C Dialect" .IX Subsection "Options Controlling C Dialect" The following options control the dialect of C (or languages derived ! from C, such as \*(C+ and Objective-C) that the compiler accepts: ! .Ip "\fB\-ansi\fR" 4 .IX Item "-ansi" ! In C mode, support all \s-1ISO\s0 C89 programs. In \*(C+ mode, remove \s-1GNU\s0 extensions that conflict with \s-1ISO\s0 \*(C+. .Sp This turns off certain features of \s-1GCC\s0 that are incompatible with \s-1ISO\s0 ! C89 (when compiling C code), or of standard \*(C+ (when compiling \*(C+ code), such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, and predefined macros such as \f(CW\*(C`unix\*(C'\fR and \f(CW\*(C`vax\*(C'\fR that identify the type of system you are using. It also enables the undesirable and --- 905,918 ---- .Sh "Options Controlling C Dialect" .IX Subsection "Options Controlling C Dialect" The following options control the dialect of C (or languages derived ! from C, such as \*(C+ and Objective\-C) that the compiler accepts: ! .IP "\fB\-ansi\fR" 4 .IX Item "-ansi" ! In C mode, support all \s-1ISO\s0 C90 programs. In \*(C+ mode, remove \s-1GNU\s0 extensions that conflict with \s-1ISO\s0 \*(C+. .Sp This turns off certain features of \s-1GCC\s0 that are incompatible with \s-1ISO\s0 ! C90 (when compiling C code), or of standard \*(C+ (when compiling \*(C+ code), such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, and predefined macros such as \f(CW\*(C`unix\*(C'\fR and \f(CW\*(C`vax\*(C'\fR that identify the type of system you are using. It also enables the undesirable and *************** programs that might use these names for *** 954,999 **** Functions which would normally be built in but do not have semantics defined by \s-1ISO\s0 C (such as \f(CW\*(C`alloca\*(C'\fR and \f(CW\*(C`ffs\*(C'\fR) are not built-in functions with \fB\-ansi\fR is used. ! .Ip "\fB\-std=\fR" 4 .IX Item "-std=" Determine the language standard. This option is currently only ! supported when compiling C. A value for this option must be provided; ! possible values are .RS 4 ! .Ip "\fBc89\fR" 4 .IX Item "c89" .PD 0 ! .Ip "\fBiso9899:1990\fR" 4 .IX Item "iso9899:1990" .PD ! \&\s-1ISO\s0 C89 (same as \fB\-ansi\fR). ! .Ip "\fBiso9899:199409\fR" 4 .IX Item "iso9899:199409" ! \&\s-1ISO\s0 C89 as modified in amendment 1. ! .Ip "\fBc99\fR" 4 .IX Item "c99" .PD 0 ! .Ip "\fBc9x\fR" 4 .IX Item "c9x" ! .Ip "\fBiso9899:1999\fR" 4 .IX Item "iso9899:1999" ! .Ip "\fBiso9899:199x\fR" 4 .IX Item "iso9899:199x" .PD \&\s-1ISO\s0 C99. Note that this standard is not yet fully supported; see ! <\fBhttp://gcc.gnu.org/gcc-3.1/c99status.html\fR> for more information. The names \fBc9x\fR and \fBiso9899:199x\fR are deprecated. ! .Ip "\fBgnu89\fR" 4 .IX Item "gnu89" ! Default, \s-1ISO\s0 C89 plus \s-1GNU\s0 extensions (including some C99 features). ! .Ip "\fBgnu99\fR" 4 .IX Item "gnu99" .PD 0 ! .Ip "\fBgnu9x\fR" 4 .IX Item "gnu9x" .PD \&\s-1ISO\s0 C99 plus \s-1GNU\s0 extensions. When \s-1ISO\s0 C99 is fully implemented in \s-1GCC\s0, this will become the default. The name \fBgnu9x\fR is deprecated. .RE .RS 4 .Sp --- 941,993 ---- Functions which would normally be built in but do not have semantics defined by \s-1ISO\s0 C (such as \f(CW\*(C`alloca\*(C'\fR and \f(CW\*(C`ffs\*(C'\fR) are not built-in functions with \fB\-ansi\fR is used. ! .IP "\fB\-std=\fR" 4 .IX Item "-std=" Determine the language standard. This option is currently only ! supported when compiling C or \*(C+. A value for this option must be ! provided; possible values are .RS 4 ! .IP "\fBc89\fR" 4 .IX Item "c89" .PD 0 ! .IP "\fBiso9899:1990\fR" 4 .IX Item "iso9899:1990" .PD ! \&\s-1ISO\s0 C90 (same as \fB\-ansi\fR). ! .IP "\fBiso9899:199409\fR" 4 .IX Item "iso9899:199409" ! \&\s-1ISO\s0 C90 as modified in amendment 1. ! .IP "\fBc99\fR" 4 .IX Item "c99" .PD 0 ! .IP "\fBc9x\fR" 4 .IX Item "c9x" ! .IP "\fBiso9899:1999\fR" 4 .IX Item "iso9899:1999" ! .IP "\fBiso9899:199x\fR" 4 .IX Item "iso9899:199x" .PD \&\s-1ISO\s0 C99. Note that this standard is not yet fully supported; see ! <\fBhttp://gcc.gnu.org/gcc\-3.3/c99status.html\fR> for more information. The names \fBc9x\fR and \fBiso9899:199x\fR are deprecated. ! .IP "\fBgnu89\fR" 4 .IX Item "gnu89" ! Default, \s-1ISO\s0 C90 plus \s-1GNU\s0 extensions (including some C99 features). ! .IP "\fBgnu99\fR" 4 .IX Item "gnu99" .PD 0 ! .IP "\fBgnu9x\fR" 4 .IX Item "gnu9x" .PD \&\s-1ISO\s0 C99 plus \s-1GNU\s0 extensions. When \s-1ISO\s0 C99 is fully implemented in \s-1GCC\s0, this will become the default. The name \fBgnu9x\fR is deprecated. + .IP "\fBc++98\fR" 4 + .IX Item "c++98" + The 1998 \s-1ISO\s0 \*(C+ standard plus amendments. + .IP "\fBgnu++98\fR" 4 + .IX Item "gnu++98" + The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the + default for \*(C+ code. .RE .RS 4 .Sp *************** previous C standards. For example, you *** 1003,1013 **** when \fB\-std=c99\fR is not specified. .Sp The \fB\-std\fR options specifying some version of \s-1ISO\s0 C have the same ! effects as \fB\-ansi\fR, except that features that were not in \s-1ISO\s0 C89 but are in the specified version (for example, \fB//\fR comments and the \f(CW\*(C`inline\*(C'\fR keyword in \s-1ISO\s0 C99) are not disabled. .RE ! .Ip "\fB\-aux-info\fR \fIfilename\fR" 4 .IX Item "-aux-info filename" Output to the given filename prototyped declarations for all functions declared and/or defined in a translation unit, including those in header --- 997,1007 ---- when \fB\-std=c99\fR is not specified. .Sp The \fB\-std\fR options specifying some version of \s-1ISO\s0 C have the same ! effects as \fB\-ansi\fR, except that features that were not in \s-1ISO\s0 C90 but are in the specified version (for example, \fB//\fR comments and the \f(CW\*(C`inline\*(C'\fR keyword in \s-1ISO\s0 C99) are not disabled. .RE ! .IP "\fB\-aux\-info\fR \fIfilename\fR" 4 .IX Item "-aux-info filename" Output to the given filename prototyped declarations for all functions declared and/or defined in a translation unit, including those in header *************** implicit, prototyped or unprototyped (\f *** 1019,1045 **** \&\fBO\fR for old, respectively, in the first character after the line number and the colon), and whether it came from a declaration or a definition (\fBC\fR or \fBF\fR, respectively, in the following ! character). In the case of function definitions, a K&R-style list of arguments followed by their declarations is also provided, inside comments, after the declaration. ! .Ip "\fB\-fno-asm\fR" 4 .IX Item "-fno-asm" Do not recognize \f(CW\*(C`asm\*(C'\fR, \f(CW\*(C`inline\*(C'\fR or \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use these words as identifiers. You can use the keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR ! instead. \fB\-ansi\fR implies \fB\-fno-asm\fR. .Sp In \*(C+, this switch only affects the \f(CW\*(C`typeof\*(C'\fR keyword, since \&\f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`inline\*(C'\fR are standard keywords. You may want to ! use the \fB\-fno-gnu-keywords\fR flag instead, which has the same effect. In C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this switch only affects the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, since \&\f(CW\*(C`inline\*(C'\fR is a standard keyword in \s-1ISO\s0 C99. ! .Ip "\fB\-fno-builtin\fR" 4 .IX Item "-fno-builtin" .PD 0 ! .Ip "\fB\-fno-builtin-\fR\fIfunction\fR\fB \fR(C and Objective-C only)" 4 ! .IX Item "-fno-builtin-function (C and Objective-C only)" .PD Don't recognize built-in functions that do not begin with \&\fB_\|_builtin_\fR as prefix. --- 1013,1039 ---- \&\fBO\fR for old, respectively, in the first character after the line number and the colon), and whether it came from a declaration or a definition (\fBC\fR or \fBF\fR, respectively, in the following ! character). In the case of function definitions, a K&R\-style list of arguments followed by their declarations is also provided, inside comments, after the declaration. ! .IP "\fB\-fno\-asm\fR" 4 .IX Item "-fno-asm" Do not recognize \f(CW\*(C`asm\*(C'\fR, \f(CW\*(C`inline\*(C'\fR or \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use these words as identifiers. You can use the keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR ! instead. \fB\-ansi\fR implies \fB\-fno\-asm\fR. .Sp In \*(C+, this switch only affects the \f(CW\*(C`typeof\*(C'\fR keyword, since \&\f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`inline\*(C'\fR are standard keywords. You may want to ! use the \fB\-fno\-gnu\-keywords\fR flag instead, which has the same effect. In C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this switch only affects the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, since \&\f(CW\*(C`inline\*(C'\fR is a standard keyword in \s-1ISO\s0 C99. ! .IP "\fB\-fno\-builtin\fR" 4 .IX Item "-fno-builtin" .PD 0 ! .IP "\fB\-fno\-builtin\-\fR\fIfunction\fR" 4 ! .IX Item "-fno-builtin-function" .PD Don't recognize built-in functions that do not begin with \&\fB_\|_builtin_\fR as prefix. *************** and faster, but since the function calls *** 1052,1168 **** cannot set a breakpoint on those calls, nor can you change the behavior of the functions by linking with a different library. .Sp ! In \*(C+, \fB\-fno-builtin\fR is always in effect. The \fB\-fbuiltin\fR ! option has no effect. Therefore, in \*(C+, the only way to get the ! optimization benefits of built-in functions is to call the function ! using the \fB_\|_builtin_\fR prefix. The \s-1GNU\s0 \*(C+ Standard Library uses ! built-in functions to implement many functions (like ! \&\f(CW\*(C`std::strchr\*(C'\fR), so that you automatically get efficient code. ! .Sp ! With the \fB\-fno-builtin-\fR\fIfunction\fR option, not available ! when compiling \*(C+, only the built-in function \fIfunction\fR is disabled. \fIfunction\fR must not begin with \fB_\|_builtin_\fR. If a function is named this is not built-in in this version of \s-1GCC\s0, this option is ignored. There is no corresponding ! \&\fB\-fbuiltin-\fR\fIfunction\fR option; if you wish to enable ! built-in functions selectively when using \fB\-fno-builtin\fR or \&\fB\-ffreestanding\fR, you may define macros such as: .Sp .Vb 2 \& #define abs(n) __builtin_abs ((n)) \& #define strcpy(d, s) __builtin_strcpy ((d), (s)) .Ve ! .Ip "\fB\-fhosted\fR" 4 .IX Item "-fhosted" Assert that compilation takes place in a hosted environment. This implies \&\fB\-fbuiltin\fR. A hosted environment is one in which the entire standard library is available, and in which \f(CW\*(C`main\*(C'\fR has a return type of \f(CW\*(C`int\*(C'\fR. Examples are nearly everything except a kernel. ! This is equivalent to \fB\-fno-freestanding\fR. ! .Ip "\fB\-ffreestanding\fR" 4 .IX Item "-ffreestanding" Assert that compilation takes place in a freestanding environment. This ! implies \fB\-fno-builtin\fR. A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at \f(CW\*(C`main\*(C'\fR. The most obvious example is an \s-1OS\s0 kernel. ! This is equivalent to \fB\-fno-hosted\fR. ! .Ip "\fB\-trigraphs\fR" 4 .IX Item "-trigraphs" Support \s-1ISO\s0 C trigraphs. The \fB\-ansi\fR option (and \fB\-std\fR options for strict \s-1ISO\s0 C conformance) implies \fB\-trigraphs\fR. ! .Ip "\fB\-no-integrated-cpp\fR" 4 .IX Item "-no-integrated-cpp" ! Invoke the external cpp during compilation. The default is to use the ! integrated cpp (internal cpp). This option also allows a ! user-supplied cpp via the \fB\-B\fR option. This flag is applicable ! in both C and \*(C+ modes. .Sp ! We do not guarantee to retain this option in future, and we may change ! its semantics. ! .Ip "\fB\-traditional\fR" 4 .IX Item "-traditional" ! Attempt to support some aspects of traditional C compilers. ! Specifically: ! .RS 4 ! .Ip "\(bu" 4 ! All \f(CW\*(C`extern\*(C'\fR declarations take effect globally even if they ! are written inside of a function definition. This includes implicit ! declarations of functions. ! .Ip "\(bu" 4 ! The newer keywords \f(CW\*(C`typeof\*(C'\fR, \f(CW\*(C`inline\*(C'\fR, \f(CW\*(C`signed\*(C'\fR, \f(CW\*(C`const\*(C'\fR ! and \f(CW\*(C`volatile\*(C'\fR are not recognized. (You can still use the ! alternative keywords such as \f(CW\*(C`_\|_typeof_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR, and ! so on.) ! .Ip "\(bu" 4 ! Comparisons between pointers and integers are always allowed. ! .Ip "\(bu" 4 ! Integer types \f(CW\*(C`unsigned short\*(C'\fR and \f(CW\*(C`unsigned char\*(C'\fR promote ! to \f(CW\*(C`unsigned int\*(C'\fR. ! .Ip "\(bu" 4 ! Out-of-range floating point literals are not an error. ! .Ip "\(bu" 4 ! Certain constructs which \s-1ISO\s0 regards as a single invalid preprocessing ! number, such as \fB0xe-0xd\fR, are treated as expressions instead. ! .Ip "\(bu" 4 ! String ``constants'' are not necessarily constant; they are stored in ! writable space, and identical looking constants are allocated ! separately. (This is the same as the effect of ! \&\fB\-fwritable-strings\fR.) ! .Ip "\(bu" 4 ! All automatic variables not declared \f(CW\*(C`register\*(C'\fR are preserved by ! \&\f(CW\*(C`longjmp\*(C'\fR. Ordinarily, \s-1GNU\s0 C follows \s-1ISO\s0 C: automatic variables ! not declared \f(CW\*(C`volatile\*(C'\fR may be clobbered. ! .Ip "\(bu" 4 ! The character escape sequences \fB\ex\fR and \fB\ea\fR evaluate as the ! literal characters \fBx\fR and \fBa\fR respectively. Without ! \&\fB\-traditional\fR, \fB\ex\fR is a prefix for the hexadecimal ! representation of a character, and \fB\ea\fR produces a bell. ! .RE ! .RS 4 ! .Sp ! This option is deprecated and may be removed. ! .Sp ! You may wish to use \fB\-fno-builtin\fR as well as \fB\-traditional\fR ! if your program uses names that are normally \s-1GNU\s0 C built-in functions for ! other purposes of its own. ! .Sp ! You cannot use \fB\-traditional\fR if you include any header files that ! rely on \s-1ISO\s0 C features. Some vendors are starting to ship systems with ! \&\s-1ISO\s0 C header files and you cannot use \fB\-traditional\fR on such ! systems to compile files that include any system headers. ! .Sp ! The \fB\-traditional\fR option also enables \fB\-traditional-cpp\fR. ! .RE ! .Ip "\fB\-traditional-cpp\fR" 4 .IX Item "-traditional-cpp" ! Attempt to support some aspects of traditional C preprocessors. ! See the \s-1GNU\s0 \s-1CPP\s0 manual for details. ! .Ip "\fB\-fcond-mismatch\fR" 4 .IX Item "-fcond-mismatch" Allow conditional expressions with mismatched types in the second and third arguments. The value of such an expression is void. This option is not supported for \*(C+. ! .Ip "\fB\-funsigned-char\fR" 4 .IX Item "-funsigned-char" Let the type \f(CW\*(C`char\*(C'\fR be unsigned, like \f(CW\*(C`unsigned char\*(C'\fR. .Sp --- 1046,1111 ---- cannot set a breakpoint on those calls, nor can you change the behavior of the functions by linking with a different library. .Sp ! With the \fB\-fno\-builtin\-\fR\fIfunction\fR option ! only the built-in function \fIfunction\fR is disabled. \fIfunction\fR must not begin with \fB_\|_builtin_\fR. If a function is named this is not built-in in this version of \s-1GCC\s0, this option is ignored. There is no corresponding ! \&\fB\-fbuiltin\-\fR\fIfunction\fR option; if you wish to enable ! built-in functions selectively when using \fB\-fno\-builtin\fR or \&\fB\-ffreestanding\fR, you may define macros such as: .Sp .Vb 2 \& #define abs(n) __builtin_abs ((n)) \& #define strcpy(d, s) __builtin_strcpy ((d), (s)) .Ve ! .IP "\fB\-fhosted\fR" 4 .IX Item "-fhosted" Assert that compilation takes place in a hosted environment. This implies \&\fB\-fbuiltin\fR. A hosted environment is one in which the entire standard library is available, and in which \f(CW\*(C`main\*(C'\fR has a return type of \f(CW\*(C`int\*(C'\fR. Examples are nearly everything except a kernel. ! This is equivalent to \fB\-fno\-freestanding\fR. ! .IP "\fB\-ffreestanding\fR" 4 .IX Item "-ffreestanding" Assert that compilation takes place in a freestanding environment. This ! implies \fB\-fno\-builtin\fR. A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at \f(CW\*(C`main\*(C'\fR. The most obvious example is an \s-1OS\s0 kernel. ! This is equivalent to \fB\-fno\-hosted\fR. ! .IP "\fB\-fms\-extensions\fR" 4 ! .IX Item "-fms-extensions" ! Accept some non-standard constructs used in Microsoft header files. ! .IP "\fB\-trigraphs\fR" 4 .IX Item "-trigraphs" Support \s-1ISO\s0 C trigraphs. The \fB\-ansi\fR option (and \fB\-std\fR options for strict \s-1ISO\s0 C conformance) implies \fB\-trigraphs\fR. ! .IP "\fB\-no\-integrated\-cpp\fR" 4 .IX Item "-no-integrated-cpp" ! Performs a compilation in two passes: preprocessing and compiling. This ! option allows a user supplied \*(L"cc1\*(R", \*(L"cc1plus\*(R", or \*(L"cc1obj\*(R" via the ! \&\fB\-B\fR option. The user supplied compilation step can then add in ! an additional preprocessing step after normal preprocessing but before ! compiling. The default is to use the integrated cpp (internal cpp) .Sp ! The semantics of this option will change if \*(L"cc1\*(R", \*(L"cc1plus\*(R", and ! \&\*(L"cc1obj\*(R" are merged. ! .IP "\fB\-traditional\fR" 4 .IX Item "-traditional" ! .PD 0 ! .IP "\fB\-traditional\-cpp\fR" 4 .IX Item "-traditional-cpp" ! .PD ! Formerly, these options caused \s-1GCC\s0 to attempt to emulate a pre-standard ! C compiler. They are now only supported with the \fB\-E\fR switch. ! The preprocessor continues to support a pre-standard mode. See the \s-1GNU\s0 ! \&\s-1CPP\s0 manual for details. ! .IP "\fB\-fcond\-mismatch\fR" 4 .IX Item "-fcond-mismatch" Allow conditional expressions with mismatched types in the second and third arguments. The value of such an expression is void. This option is not supported for \*(C+. ! .IP "\fB\-funsigned\-char\fR" 4 .IX Item "-funsigned-char" Let the type \f(CW\*(C`char\*(C'\fR be unsigned, like \f(CW\*(C`unsigned char\*(C'\fR. .Sp *************** make such a program work with the opposi *** 1180,1230 **** The type \f(CW\*(C`char\*(C'\fR is always a distinct type from each of \&\f(CW\*(C`signed char\*(C'\fR or \f(CW\*(C`unsigned char\*(C'\fR, even though its behavior is always just like one of those two. ! .Ip "\fB\-fsigned-char\fR" 4 .IX Item "-fsigned-char" Let the type \f(CW\*(C`char\*(C'\fR be signed, like \f(CW\*(C`signed char\*(C'\fR. .Sp ! Note that this is equivalent to \fB\-fno-unsigned-char\fR, which is ! the negative form of \fB\-funsigned-char\fR. Likewise, the option ! \&\fB\-fno-signed-char\fR is equivalent to \fB\-funsigned-char\fR. ! .Ip "\fB\-fsigned-bitfields\fR" 4 .IX Item "-fsigned-bitfields" .PD 0 ! .Ip "\fB\-funsigned-bitfields\fR" 4 .IX Item "-funsigned-bitfields" ! .Ip "\fB\-fno-signed-bitfields\fR" 4 .IX Item "-fno-signed-bitfields" ! .Ip "\fB\-fno-unsigned-bitfields\fR" 4 .IX Item "-fno-unsigned-bitfields" .PD These options control whether a bit-field is signed or unsigned, when the declaration does not use either \f(CW\*(C`signed\*(C'\fR or \f(CW\*(C`unsigned\*(C'\fR. By default, such a bit-field is signed, because this is consistent: the basic integer types such as \f(CW\*(C`int\*(C'\fR are signed types. ! .Sp ! However, when \fB\-traditional\fR is used, bit-fields are all unsigned ! no matter what. ! .Ip "\fB\-fwritable-strings\fR" 4 .IX Item "-fwritable-strings" Store string constants in the writable data segment and don't uniquize them. This is for compatibility with old programs which assume they can ! write into string constants. The option \fB\-traditional\fR also has ! this effect. .Sp Writing into string constants is a very bad idea; ``constants'' should be constant. - .Ip "\fB\-fallow-single-precision\fR" 4 - .IX Item "-fallow-single-precision" - Do not promote single precision math operations to double precision, - even when compiling with \fB\-traditional\fR. - .Sp - Traditional K&R C promotes all floating point operations to double - precision, regardless of the sizes of the operands. On the - architecture for which you are compiling, single precision may be faster - than double precision. If you must use \fB\-traditional\fR, but want - to use single precision operations when the operands are single - precision, use this option. This option has no effect when compiling - with \s-1ISO\s0 or \s-1GNU\s0 C conventions (the default). .Sh "Options Controlling \*(C+ Dialect" .IX Subsection "Options Controlling Dialect" This section describes the command-line options that are only meaningful --- 1123,1157 ---- The type \f(CW\*(C`char\*(C'\fR is always a distinct type from each of \&\f(CW\*(C`signed char\*(C'\fR or \f(CW\*(C`unsigned char\*(C'\fR, even though its behavior is always just like one of those two. ! .IP "\fB\-fsigned\-char\fR" 4 .IX Item "-fsigned-char" Let the type \f(CW\*(C`char\*(C'\fR be signed, like \f(CW\*(C`signed char\*(C'\fR. .Sp ! Note that this is equivalent to \fB\-fno\-unsigned\-char\fR, which is ! the negative form of \fB\-funsigned\-char\fR. Likewise, the option ! \&\fB\-fno\-signed\-char\fR is equivalent to \fB\-funsigned\-char\fR. ! .IP "\fB\-fsigned\-bitfields\fR" 4 .IX Item "-fsigned-bitfields" .PD 0 ! .IP "\fB\-funsigned\-bitfields\fR" 4 .IX Item "-funsigned-bitfields" ! .IP "\fB\-fno\-signed\-bitfields\fR" 4 .IX Item "-fno-signed-bitfields" ! .IP "\fB\-fno\-unsigned\-bitfields\fR" 4 .IX Item "-fno-unsigned-bitfields" .PD These options control whether a bit-field is signed or unsigned, when the declaration does not use either \f(CW\*(C`signed\*(C'\fR or \f(CW\*(C`unsigned\*(C'\fR. By default, such a bit-field is signed, because this is consistent: the basic integer types such as \f(CW\*(C`int\*(C'\fR are signed types. ! .IP "\fB\-fwritable\-strings\fR" 4 .IX Item "-fwritable-strings" Store string constants in the writable data segment and don't uniquize them. This is for compatibility with old programs which assume they can ! write into string constants. .Sp Writing into string constants is a very bad idea; ``constants'' should be constant. .Sh "Options Controlling \*(C+ Dialect" .IX Subsection "Options Controlling Dialect" This section describes the command-line options that are only meaningful *************** might compile a file \f(CW\*(C`firstClas *** 1235,1261 **** .Vb 1 \& g++ -g -frepo -O -c firstClass.C .Ve In this example, only \fB\-frepo\fR is an option meant only for \*(C+ programs; you can use the other options with any language supported by \s-1GCC\s0. .PP Here is a list of options that are \fIonly\fR for compiling \*(C+ programs: ! .Ip "\fB\-fno-access-control\fR" 4 .IX Item "-fno-access-control" Turn off all access checking. This switch is mainly useful for working around bugs in the access control code. ! .Ip "\fB\-fcheck-new\fR" 4 .IX Item "-fcheck-new" Check that the pointer returned by \f(CW\*(C`operator new\*(C'\fR is non-null ! before attempting to modify the storage allocated. The current Working ! Paper requires that \f(CW\*(C`operator new\*(C'\fR never return a null pointer, so ! this check is normally unnecessary. ! .Sp ! An alternative to using this option is to specify that your ! \&\f(CW\*(C`operator new\*(C'\fR does not throw any exceptions; if you declare it ! \&\fB\f(BIthrow()\fB\fR, G++ will check the return value. See also \fBnew ! (nothrow)\fR. ! .Ip "\fB\-fconserve-space\fR" 4 .IX Item "-fconserve-space" Put uninitialized or runtime-initialized global variables into the common segment, as C does. This saves space in the executable at the --- 1162,1198 ---- .Vb 1 \& g++ -g -frepo -O -c firstClass.C .Ve + .PP In this example, only \fB\-frepo\fR is an option meant only for \*(C+ programs; you can use the other options with any language supported by \s-1GCC\s0. .PP Here is a list of options that are \fIonly\fR for compiling \*(C+ programs: ! .IP "\fB\-fabi\-version=\fR\fIn\fR" 4 ! .IX Item "-fabi-version=n" ! Use version \fIn\fR of the \*(C+ \s-1ABI\s0. Version 1 is the version of the \*(C+ ! \&\s-1ABI\s0 that first appeared in G++ 3.2. Version 0 will always be the ! version that conforms most closely to the \*(C+ \s-1ABI\s0 specification. ! Therefore, the \s-1ABI\s0 obtained using version 0 will change as \s-1ABI\s0 bugs are ! fixed. ! .Sp ! The default is version 1. ! .IP "\fB\-fno\-access\-control\fR" 4 .IX Item "-fno-access-control" Turn off all access checking. This switch is mainly useful for working around bugs in the access control code. ! .IP "\fB\-fcheck\-new\fR" 4 .IX Item "-fcheck-new" Check that the pointer returned by \f(CW\*(C`operator new\*(C'\fR is non-null ! before attempting to modify the storage allocated. This check is ! normally unnecessary because the \*(C+ standard specifies that ! \&\f(CW\*(C`operator new\*(C'\fR will only return \f(CW0\fR if it is declared ! \&\fB\f(BIthrow()\fB\fR, in which case the compiler will always check the ! return value even without this option. In all other cases, when ! \&\f(CW\*(C`operator new\*(C'\fR has a non-empty exception specification, memory ! exhaustion is signalled by throwing \f(CW\*(C`std::bad_alloc\*(C'\fR. See also ! \&\fBnew (nothrow)\fR. ! .IP "\fB\-fconserve\-space\fR" 4 .IX Item "-fconserve-space" Put uninitialized or runtime-initialized global variables into the common segment, as C does. This saves space in the executable at the *************** two definitions were merged. *** 1266,1324 **** .Sp This option is no longer useful on most targets, now that support has been added for putting variables into \s-1BSS\s0 without making them common. ! .Ip "\fB\-fno-const-strings\fR" 4 .IX Item "-fno-const-strings" Give string constants type \f(CW\*(C`char *\*(C'\fR instead of type \f(CW\*(C`const char *\*(C'\fR. By default, G++ uses type \f(CW\*(C`const char *\*(C'\fR as required by ! the standard. Even if you use \fB\-fno-const-strings\fR, you cannot actually modify the value of a string constant, unless you also use ! \&\fB\-fwritable-strings\fR. .Sp This option might be removed in a future release of G++. For maximum portability, you should structure your code so that it works with string constants that have type \f(CW\*(C`const char *\*(C'\fR. ! .Ip "\fB\-fdollars-in-identifiers\fR" 4 .IX Item "-fdollars-in-identifiers" Accept \fB$\fR in identifiers. You can also explicitly prohibit use of ! \&\fB$\fR with the option \fB\-fno-dollars-in-identifiers\fR. (\s-1GNU\s0 C allows \&\fB$\fR by default on most target systems, but there are a few exceptions.) Traditional C allowed the character \fB$\fR to form part of identifiers. However, \s-1ISO\s0 C and \*(C+ forbid \fB$\fR in identifiers. ! .Ip "\fB\-fno-elide-constructors\fR" 4 .IX Item "-fno-elide-constructors" The \*(C+ standard allows an implementation to omit creating a temporary which is only used to initialize another object of the same type. Specifying this option disables that optimization, and forces G++ to call the copy constructor in all cases. ! .Ip "\fB\-fno-enforce-eh-specs\fR" 4 .IX Item "-fno-enforce-eh-specs" Don't check for violation of exception specifications at runtime. This option violates the \*(C+ standard, but may be useful for reducing code size in production builds, much like defining \fB\s-1NDEBUG\s0\fR. The compiler will still optimize based on the exception specifications. ! .Ip "\fB\-fexternal-templates\fR" 4 .IX Item "-fexternal-templates" Cause \fB#pragma interface\fR and \fBimplementation\fR to apply to template instantiation; template instances are emitted or not according to the location of the template definition. .Sp This option is deprecated. ! .Ip "\fB\-falt-external-templates\fR" 4 .IX Item "-falt-external-templates" ! Similar to \fB\-fexternal-templates\fR, but template instances are emitted or not according to the place where they are first instantiated. .Sp This option is deprecated. ! .Ip "\fB\-ffor-scope\fR" 4 .IX Item "-ffor-scope" .PD 0 ! .Ip "\fB\-fno-for-scope\fR" 4 .IX Item "-fno-for-scope" .PD ! If \fB\-ffor-scope\fR is specified, the scope of variables declared in a \fIfor-init-statement\fR is limited to the \fBfor\fR loop itself, as specified by the \*(C+ standard. ! If \fB\-fno-for-scope\fR is specified, the scope of variables declared in a \fIfor-init-statement\fR extends to the end of the enclosing scope, as was the case in old versions of G++, and other (traditional) implementations of \*(C+. --- 1203,1261 ---- .Sp This option is no longer useful on most targets, now that support has been added for putting variables into \s-1BSS\s0 without making them common. ! .IP "\fB\-fno\-const\-strings\fR" 4 .IX Item "-fno-const-strings" Give string constants type \f(CW\*(C`char *\*(C'\fR instead of type \f(CW\*(C`const char *\*(C'\fR. By default, G++ uses type \f(CW\*(C`const char *\*(C'\fR as required by ! the standard. Even if you use \fB\-fno\-const\-strings\fR, you cannot actually modify the value of a string constant, unless you also use ! \&\fB\-fwritable\-strings\fR. .Sp This option might be removed in a future release of G++. For maximum portability, you should structure your code so that it works with string constants that have type \f(CW\*(C`const char *\*(C'\fR. ! .IP "\fB\-fdollars\-in\-identifiers\fR" 4 .IX Item "-fdollars-in-identifiers" Accept \fB$\fR in identifiers. You can also explicitly prohibit use of ! \&\fB$\fR with the option \fB\-fno\-dollars\-in\-identifiers\fR. (\s-1GNU\s0 C allows \&\fB$\fR by default on most target systems, but there are a few exceptions.) Traditional C allowed the character \fB$\fR to form part of identifiers. However, \s-1ISO\s0 C and \*(C+ forbid \fB$\fR in identifiers. ! .IP "\fB\-fno\-elide\-constructors\fR" 4 .IX Item "-fno-elide-constructors" The \*(C+ standard allows an implementation to omit creating a temporary which is only used to initialize another object of the same type. Specifying this option disables that optimization, and forces G++ to call the copy constructor in all cases. ! .IP "\fB\-fno\-enforce\-eh\-specs\fR" 4 .IX Item "-fno-enforce-eh-specs" Don't check for violation of exception specifications at runtime. This option violates the \*(C+ standard, but may be useful for reducing code size in production builds, much like defining \fB\s-1NDEBUG\s0\fR. The compiler will still optimize based on the exception specifications. ! .IP "\fB\-fexternal\-templates\fR" 4 .IX Item "-fexternal-templates" Cause \fB#pragma interface\fR and \fBimplementation\fR to apply to template instantiation; template instances are emitted or not according to the location of the template definition. .Sp This option is deprecated. ! .IP "\fB\-falt\-external\-templates\fR" 4 .IX Item "-falt-external-templates" ! Similar to \fB\-fexternal\-templates\fR, but template instances are emitted or not according to the place where they are first instantiated. .Sp This option is deprecated. ! .IP "\fB\-ffor\-scope\fR" 4 .IX Item "-ffor-scope" .PD 0 ! .IP "\fB\-fno\-for\-scope\fR" 4 .IX Item "-fno-for-scope" .PD ! If \fB\-ffor\-scope\fR is specified, the scope of variables declared in a \fIfor-init-statement\fR is limited to the \fBfor\fR loop itself, as specified by the \*(C+ standard. ! If \fB\-fno\-for\-scope\fR is specified, the scope of variables declared in a \fIfor-init-statement\fR extends to the end of the enclosing scope, as was the case in old versions of G++, and other (traditional) implementations of \*(C+. *************** implementations of \*(C+. *** 1326,1380 **** The default if neither flag is given to follow the standard, but to allow and give a warning for old-style code that would otherwise be invalid, or have different behavior. ! .Ip "\fB\-fno-gnu-keywords\fR" 4 .IX Item "-fno-gnu-keywords" Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use this word as an identifier. You can use the keyword \f(CW\*(C`_\|_typeof_\|_\*(C'\fR instead. ! \&\fB\-ansi\fR implies \fB\-fno-gnu-keywords\fR. ! .Ip "\fB\-fno-implicit-templates\fR" 4 .IX Item "-fno-implicit-templates" Never emit code for non-inline templates which are instantiated implicitly (i.e. by use); only emit code for explicit instantiations. ! .Ip "\fB\-fno-implicit-inline-templates\fR" 4 .IX Item "-fno-implicit-inline-templates" Don't emit code for implicit instantiations of inline templates, either. The default is to handle inlines differently so that compiles with and without optimization will need the same set of explicit instantiations. ! .Ip "\fB\-fno-implement-inlines\fR" 4 .IX Item "-fno-implement-inlines" To save space, do not emit out-of-line copies of inline functions controlled by \fB#pragma implementation\fR. This will cause linker errors if these functions are not inlined everywhere they are called. ! .Ip "\fB\-fms-extensions\fR" 4 .IX Item "-fms-extensions" Disable pedantic warnings about constructs used in \s-1MFC\s0, such as implicit int and getting a pointer to member function via non-standard syntax. ! .Ip "\fB\-fno-nonansi-builtins\fR" 4 .IX Item "-fno-nonansi-builtins" Disable built-in declarations of functions that are not mandated by \&\s-1ANSI/ISO\s0 C. These include \f(CW\*(C`ffs\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`_exit\*(C'\fR, \&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions. ! .Ip "\fB\-fno-operator-names\fR" 4 .IX Item "-fno-operator-names" Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR, \&\f(CW\*(C`bitor\*(C'\fR, \f(CW\*(C`compl\*(C'\fR, \f(CW\*(C`not\*(C'\fR, \f(CW\*(C`or\*(C'\fR and \f(CW\*(C`xor\*(C'\fR as synonyms as keywords. ! .Ip "\fB\-fno-optional-diags\fR" 4 .IX Item "-fno-optional-diags" Disable diagnostics that the standard says a compiler does not need to issue. Currently, the only such diagnostic issued by G++ is the one for a name having multiple meanings within a class. ! .Ip "\fB\-fpermissive\fR" 4 .IX Item "-fpermissive" Downgrade messages about nonconformant code from errors to warnings. By ! default, G++ effectively sets \fB\-pedantic-errors\fR without \&\fB\-pedantic\fR; this option reverses that. This behavior and this option are superseded by \fB\-pedantic\fR, which works as it does for \s-1GNU\s0 C. ! .Ip "\fB\-frepo\fR" 4 .IX Item "-frepo" Enable automatic template instantiation at link time. This option also ! implies \fB\-fno-implicit-templates\fR. ! .Ip "\fB\-fno-rtti\fR" 4 .IX Item "-fno-rtti" Disable generation of information about every class with virtual functions for use by the \*(C+ runtime type identification features --- 1263,1317 ---- The default if neither flag is given to follow the standard, but to allow and give a warning for old-style code that would otherwise be invalid, or have different behavior. ! .IP "\fB\-fno\-gnu\-keywords\fR" 4 .IX Item "-fno-gnu-keywords" Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use this word as an identifier. You can use the keyword \f(CW\*(C`_\|_typeof_\|_\*(C'\fR instead. ! \&\fB\-ansi\fR implies \fB\-fno\-gnu\-keywords\fR. ! .IP "\fB\-fno\-implicit\-templates\fR" 4 .IX Item "-fno-implicit-templates" Never emit code for non-inline templates which are instantiated implicitly (i.e. by use); only emit code for explicit instantiations. ! .IP "\fB\-fno\-implicit\-inline\-templates\fR" 4 .IX Item "-fno-implicit-inline-templates" Don't emit code for implicit instantiations of inline templates, either. The default is to handle inlines differently so that compiles with and without optimization will need the same set of explicit instantiations. ! .IP "\fB\-fno\-implement\-inlines\fR" 4 .IX Item "-fno-implement-inlines" To save space, do not emit out-of-line copies of inline functions controlled by \fB#pragma implementation\fR. This will cause linker errors if these functions are not inlined everywhere they are called. ! .IP "\fB\-fms\-extensions\fR" 4 .IX Item "-fms-extensions" Disable pedantic warnings about constructs used in \s-1MFC\s0, such as implicit int and getting a pointer to member function via non-standard syntax. ! .IP "\fB\-fno\-nonansi\-builtins\fR" 4 .IX Item "-fno-nonansi-builtins" Disable built-in declarations of functions that are not mandated by \&\s-1ANSI/ISO\s0 C. These include \f(CW\*(C`ffs\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`_exit\*(C'\fR, \&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions. ! .IP "\fB\-fno\-operator\-names\fR" 4 .IX Item "-fno-operator-names" Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR, \&\f(CW\*(C`bitor\*(C'\fR, \f(CW\*(C`compl\*(C'\fR, \f(CW\*(C`not\*(C'\fR, \f(CW\*(C`or\*(C'\fR and \f(CW\*(C`xor\*(C'\fR as synonyms as keywords. ! .IP "\fB\-fno\-optional\-diags\fR" 4 .IX Item "-fno-optional-diags" Disable diagnostics that the standard says a compiler does not need to issue. Currently, the only such diagnostic issued by G++ is the one for a name having multiple meanings within a class. ! .IP "\fB\-fpermissive\fR" 4 .IX Item "-fpermissive" Downgrade messages about nonconformant code from errors to warnings. By ! default, G++ effectively sets \fB\-pedantic\-errors\fR without \&\fB\-pedantic\fR; this option reverses that. This behavior and this option are superseded by \fB\-pedantic\fR, which works as it does for \s-1GNU\s0 C. ! .IP "\fB\-frepo\fR" 4 .IX Item "-frepo" Enable automatic template instantiation at link time. This option also ! implies \fB\-fno\-implicit\-templates\fR. ! .IP "\fB\-fno\-rtti\fR" 4 .IX Item "-fno-rtti" Disable generation of information about every class with virtual functions for use by the \*(C+ runtime type identification features *************** functions for use by the \*(C+ runtime t *** 1382,1422 **** of the language, you can save some space by using this flag. Note that exception handling uses the same information, but it will generate it as needed. ! .Ip "\fB\-fstats\fR" 4 .IX Item "-fstats" Emit statistics about front-end processing at the end of the compilation. This information is generally only useful to the G++ development team. ! .Ip "\fB\-ftemplate-depth-\fR\fIn\fR" 4 .IX Item "-ftemplate-depth-n" Set the maximum instantiation depth for template classes to \fIn\fR. A limit on the template instantiation depth is needed to detect endless recursions during template class instantiation. \s-1ANSI/ISO\s0 \*(C+ conforming programs must not rely on a maximum depth greater than 17. ! .Ip "\fB\-fuse-cxa-atexit\fR" 4 .IX Item "-fuse-cxa-atexit" Register destructors for objects with static storage duration with the \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR function rather than the \f(CW\*(C`atexit\*(C'\fR function. This option is required for fully standards-compliant handling of static destructors, but will only work if your C library supports \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR. ! .Ip "\fB\-fvtable-gc\fR" 4 .IX Item "-fvtable-gc" Emit special relocations for vtables and virtual function references so that the linker can identify unused virtual functions and zero out vtable slots that refer to them. This is most useful with ! \&\fB\-ffunction-sections\fR and \fB\-Wl,\-\-gc-sections\fR, in order to also discard the functions themselves. .Sp This optimization requires \s-1GNU\s0 as and \s-1GNU\s0 ld. Not all systems support ! this option. \fB\-Wl,\-\-gc-sections\fR is ignored without \fB\-static\fR. ! .Ip "\fB\-fno-weak\fR" 4 .IX Item "-fno-weak" Do not use weak symbol support, even if it is provided by the linker. By default, G++ will use weak symbols if they are available. This ! option exists only for testing, and should not be used by end-users; it will result in inferior code and has no benefits. This option may be removed in a future release of G++. ! .Ip "\fB\-nostdinc++\fR" 4 .IX Item "-nostdinc++" Do not search for header files in the standard directories specific to \&\*(C+, but do still search the other standard directories. (This option --- 1319,1359 ---- of the language, you can save some space by using this flag. Note that exception handling uses the same information, but it will generate it as needed. ! .IP "\fB\-fstats\fR" 4 .IX Item "-fstats" Emit statistics about front-end processing at the end of the compilation. This information is generally only useful to the G++ development team. ! .IP "\fB\-ftemplate\-depth\-\fR\fIn\fR" 4 .IX Item "-ftemplate-depth-n" Set the maximum instantiation depth for template classes to \fIn\fR. A limit on the template instantiation depth is needed to detect endless recursions during template class instantiation. \s-1ANSI/ISO\s0 \*(C+ conforming programs must not rely on a maximum depth greater than 17. ! .IP "\fB\-fuse\-cxa\-atexit\fR" 4 .IX Item "-fuse-cxa-atexit" Register destructors for objects with static storage duration with the \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR function rather than the \f(CW\*(C`atexit\*(C'\fR function. This option is required for fully standards-compliant handling of static destructors, but will only work if your C library supports \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR. ! .IP "\fB\-fvtable\-gc\fR" 4 .IX Item "-fvtable-gc" Emit special relocations for vtables and virtual function references so that the linker can identify unused virtual functions and zero out vtable slots that refer to them. This is most useful with ! \&\fB\-ffunction\-sections\fR and \fB\-Wl,\-\-gc\-sections\fR, in order to also discard the functions themselves. .Sp This optimization requires \s-1GNU\s0 as and \s-1GNU\s0 ld. Not all systems support ! this option. \fB\-Wl,\-\-gc\-sections\fR is ignored without \fB\-static\fR. ! .IP "\fB\-fno\-weak\fR" 4 .IX Item "-fno-weak" Do not use weak symbol support, even if it is provided by the linker. By default, G++ will use weak symbols if they are available. This ! option exists only for testing, and should not be used by end\-users; it will result in inferior code and has no benefits. This option may be removed in a future release of G++. ! .IP "\fB\-nostdinc++\fR" 4 .IX Item "-nostdinc++" Do not search for header files in the standard directories specific to \&\*(C+, but do still search the other standard directories. (This option *************** is used when building the \*(C+ library. *** 1424,1436 **** .PP In addition, these optimization, warning, and code generation options have meanings only for \*(C+ programs: ! .Ip "\fB\-fno-default-inline\fR" 4 .IX Item "-fno-default-inline" Do not assume \fBinline\fR for functions defined inside a class scope. Note that these functions will have linkage like inline functions; they just won't be inlined by default. ! .Ip "\fB\-Wabi\fR (\*(C+ only)" 4 .IX Item "-Wabi ( only)" Warn when G++ generates code that is probably not compatible with the vendor-neutral \*(C+ \s-1ABI\s0. Although an effort has been made to warn about --- 1361,1373 ---- .PP In addition, these optimization, warning, and code generation options have meanings only for \*(C+ programs: ! .IP "\fB\-fno\-default\-inline\fR" 4 .IX Item "-fno-default-inline" Do not assume \fBinline\fR for functions defined inside a class scope. Note that these functions will have linkage like inline functions; they just won't be inlined by default. ! .IP "\fB\-Wabi\fR (\*(C+ only)" 4 .IX Item "-Wabi ( only)" Warn when G++ generates code that is probably not compatible with the vendor-neutral \*(C+ \s-1ABI\s0. Although an effort has been made to warn about *************** You should rewrite your code to avoid th *** 1443,1464 **** concerned about the fact that code generated by G++ may not be binary compatible with code generated by other compilers. .Sp ! The known incompatibilites at this point include: .RS 4 ! .Ip "\(bu" 4 ! Incorrect handling of tail-padding for bit-fields. G++ may attempt to pack data into the same byte as a base class. For example: .Sp .Vb 2 \& struct A { virtual void f(); int f1 : 1; }; \& struct B : public A { int f2 : 1; }; .Ve In this case, G++ will place \f(CW\*(C`B::f2\*(C'\fR into the same byte as\f(CW\*(C`A::f1\*(C'\fR; other compilers will not. You can avoid this problem by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of the byte size on your platform; that will cause G++ and other compilers to layout \f(CW\*(C`B\*(C'\fR identically. ! .Ip "\(bu" 4 Incorrect handling of tail-padding for virtual bases. G++ does not use tail padding when laying out virtual bases. For example: .Sp --- 1380,1402 ---- concerned about the fact that code generated by G++ may not be binary compatible with code generated by other compilers. .Sp ! The known incompatibilities at this point include: .RS 4 ! .IP "\(bu" 4 ! Incorrect handling of tail-padding for bit\-fields. G++ may attempt to pack data into the same byte as a base class. For example: .Sp .Vb 2 \& struct A { virtual void f(); int f1 : 1; }; \& struct B : public A { int f2 : 1; }; .Ve + .Sp In this case, G++ will place \f(CW\*(C`B::f2\*(C'\fR into the same byte as\f(CW\*(C`A::f1\*(C'\fR; other compilers will not. You can avoid this problem by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of the byte size on your platform; that will cause G++ and other compilers to layout \f(CW\*(C`B\*(C'\fR identically. ! .IP "\(bu" 4 Incorrect handling of tail-padding for virtual bases. G++ does not use tail padding when laying out virtual bases. For example: .Sp *************** tail padding when laying out virtual bas *** 1467,1490 **** \& struct B { B(); char c2; }; \& struct C : public A, public virtual B {}; .Ve In this case, G++ will not place \f(CW\*(C`B\*(C'\fR into the tail-padding for \&\f(CW\*(C`A\*(C'\fR; other compilers will. You can avoid this problem by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of its alignment (ignoring virtual base classes); that will cause G++ and other compilers to layout \f(CW\*(C`C\*(C'\fR identically. .RE .RS 4 .RE ! .Ip "\fB\-Wctor-dtor-privacy\fR (\*(C+ only)" 4 .IX Item "-Wctor-dtor-privacy ( only)" Warn when a class seems unusable, because all the constructors or destructors in a class are private and the class has no friends or ! public static member functions. ! .Ip "\fB\-Wnon-virtual-dtor\fR (\*(C+ only)" 4 .IX Item "-Wnon-virtual-dtor ( only)" Warn when a class declares a non-virtual destructor that should probably be virtual, because it looks like the class will be used polymorphically. ! .Ip "\fB\-Wreorder\fR (\*(C+ only)" 4 .IX Item "-Wreorder ( only)" Warn when the order of member initializers given in the code does not match the order in which they must be executed. For instance: --- 1405,1477 ---- \& struct B { B(); char c2; }; \& struct C : public A, public virtual B {}; .Ve + .Sp In this case, G++ will not place \f(CW\*(C`B\*(C'\fR into the tail-padding for \&\f(CW\*(C`A\*(C'\fR; other compilers will. You can avoid this problem by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of its alignment (ignoring virtual base classes); that will cause G++ and other compilers to layout \f(CW\*(C`C\*(C'\fR identically. + .IP "\(bu" 4 + Incorrect handling of bit-fields with declared widths greater than that + of their underlying types, when the bit-fields appear in a union. For + example: + .Sp + .Vb 1 + \& union U { int i : 4096; }; + .Ve + .Sp + Assuming that an \f(CW\*(C`int\*(C'\fR does not have 4096 bits, G++ will make the + union too small by the number of bits in an \f(CW\*(C`int\*(C'\fR. + .IP "\(bu" 4 + Empty classes can be placed at incorrect offsets. For example: + .Sp + .Vb 1 + \& struct A {}; + .Ve + .Sp + .Vb 4 + \& struct B { + \& A a; + \& virtual void f (); + \& }; + .Ve + .Sp + .Vb 1 + \& struct C : public B, public A {}; + .Ve + .Sp + G++ will place the \f(CW\*(C`A\*(C'\fR base class of \f(CW\*(C`C\*(C'\fR at a nonzero offset; + it should be placed at offset zero. G++ mistakenly believes that the + \&\f(CW\*(C`A\*(C'\fR data member of \f(CW\*(C`B\*(C'\fR is already at offset zero. + .IP "\(bu" 4 + Names of template functions whose types involve \f(CW\*(C`typename\*(C'\fR or + template template parameters can be mangled incorrectly. + .Sp + .Vb 2 + \& template + \& void f(typename Q::X) {} + .Ve + .Sp + .Vb 2 + \& template